WinUi3-Templates: Class List

  • Main Page
  • Namespaces
  • Classes
  • Files
  • Directories
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
AcrylicBrush |
AcrylicBrushFactory |
AcrylicBrushProperties |
AcrylicTestApi |
AnimatedAcceptVisualSource |
AnimatedAcceptVisualSource_AnimatedVisual |
AnimatedBackVisualSource |
AnimatedBackVisualSource_AnimatedVisual |
AnimatedChevronDownSmallVisualSource |
AnimatedChevronDownSmallVisualSource_AnimatedVisual |
AnimatedChevronRightDownSmallVisualSource |
AnimatedChevronRightDownSmallVisualSource_AnimatedVisual |
AnimatedChevronUpDownSmallVisualSource |
AnimatedChevronUpDownSmallVisualSource_AnimatedVisual |
AnimatedFindVisualSource |
AnimatedFindVisualSource_AnimatedVisual |
AnimatedGlobalNavigationButtonVisualSource |
AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual |
AnimatedIcon |
AnimatedIconProperties |
AnimatedIconSource |
AnimatedIconSourceProperties |
AnimatedIconTestHooks |
AnimatedSettingsVisualSource |
AnimatedSettingsVisualSource_AnimatedVisual |
AnimatedVisualPlayer |
AnimatedVisualPlayer::final |
AnimatedVisualPlayerAutomationPeer |
AnimatedVisualPlayerProperties |
BrightnessSun |
BrightnessSun::BrightnessSun_AnimatedVisual |
LottieLogo |
LottieLogo::LottieLogo_AnimatedVisual |
Nullsource |
ProgressRingDeterminate |
ProgressRingDeterminate::AnimatedVisual |
ProgressRingIndeterminate |
AnnotatedScrollBar |
AnnotatedScrollBarDetailLabelRequestedEventArgs |
AnnotatedScrollBarLabel |
AnnotatedScrollBarPanningInfo |
AnnotatedScrollBarProperties |
AnnotatedScrollBarScrollingEventArgs |
AnnotatedScrollBarTrace |
AnimatedVisual |
AnimatedVisual |
Entry |
auto_cast |
auto_unbox |
AutoSuggestBoxHelper |
AutoSuggestBoxHelperProperties |
AutoSuggestEventRevokers |
Awaitable |
Awaitable::PTP_WAIT_traits |
BindableVector< flags, Helper > |
TreeNode |
TreeStructure |
BreadcrumbBar |
BreadcrumbBarItem |
BreadcrumbBarItemAutomationPeer |
BreadcrumbBarItemClickedEventArgs |
BreadcrumbBarProperties |
BreadcrumbElementFactory |
BreadcrumbIterable |
BreadcrumbIterator |
BreadcrumbLayout |
BringIntoViewOffsetsChange |
ButtonInteraction |
ButtonInteractionInvokedEventArgs |
ButtonInteractionProperties |
CachedVisualTreeHelpers |
CanvasGeometry |
ChildHandlers |
ChildrenInTabFocusOrderIterable |
ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator |
ColorChangedEventArgs |
ColorPicker |
ColorPickerProperties |
ColorPickerSlider |
ColorPickerSliderAutomationPeer |
ColorPickerSliderProperties |
ColorSpectrum |
ColorSpectrumAutomationPeer |
ColorSpectrumProperties |
ColumnMajorUniformToLargestGridLayout |
ColumnMajorUniformToLargestGridLayoutProperties |
ComboBoxDropDownEventRevokers |
ComboBoxHelper |
ComboBoxHelperProperties |
CommandBarFlyout |
CommandBarFlyoutCommandBar |
CommandBarFlyoutCommandBarAutomationProperties |
CommandBarFlyoutCommandBarAutomationPropertiesFactory |
CommandBarFlyoutCommandBarAutomationPropertiesProperties |
CommandBarFlyoutCommandBarProperties |
CommandBarFlyoutCommandBarTemplateSettings |
CommandBarFlyoutCommandBarTemplateSettingsFactory |
CommandBarFlyoutCommandBarTemplateSettingsProperties |
CommandBarFlyoutTrace |
IconSourceToIconSourceElementConverter |
PlatformConfiguration |
ComposableBasePointersImplTType< isDependencyObjectBase > |
ComposableBasePointersImplTType< false > |
ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase > |
ComposableBasePointersImplTTypeForIterator< false > |
CoreWebView2InitializedEventArgs |
CornerRadiusFilterConverter |
CornerRadiusFilterConverterProperties |
CornerRadiusToThicknessConverter |
CornerRadiusToThicknessConverterProperties |
CustomProperty |
DeriveFromBitmapIconHelper_base |
DeriveFromBitmapIconSourceHelper_base |
DeriveFromPanelHelper_base |
DeriveFromPathIconHelper_base |
DeriveFromPathIconSourceHelper_base |
DeriveFromToggleMenuFlyoutItemHelper_base |
DesktopAcrylicBackdrop |
DesktopAcrylicBackdrop::ControllerEntry |
CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)> |
CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > |
DispatcherHelper |
DisplayRegionHelper |
DisplayRegionHelperInfo |
DisplayRegionHelperTestApi |
DoubleUtil |
DropDownButton |
DropDownButtonAutomationPeer |
EasingInfo |
ElementFactory |
ElementFactoryGetArgsDownlevel |
ElementFactoryRecycleArgsDownlevel |
ElementInfo |
enum_array< E, T, N > |
enum_vector< E, T > |
EnumXamlType |
event< T > |
event_base< ImplT, T, StorageT > |
event_source< T > |
Expander |
ExpanderAutomationPeer |
ExpanderProperties |
ExpanderTemplateSettings |
ExpanderTemplateSettingsProperties |
ExtendedSelector |
final |
final::PinnedElementInfo |
Flex |
Flex::FlexState |
Flex::LineInfo |
UniformGrid2DLayout |
VirtualizingUniformCarouselStackLayout |
FloatUtil |
FlowLayout |
FlowLayoutAlgorithm |
FlowLayoutProperties |
FlowLayoutState |
FocusHelper |
GenericInkCallback |
GlobalDependencyProperty |
HashMap< K, V > |
HashMap< K, V >::Iterator |
HashMap< K, V >::Iterator::KeyValuePair |
Hsv |
IFlowLayoutAlgorithmDelegates |
ImageIcon |
ImageIconProperties |
ImageIconSource |
ImageIconSourceProperties |
IndexPath |
IndexRange |
InfoBadge |
InfoBadgeProperties |
InfoBadgeTemplateSettings |
InfoBadgeTemplateSettingsProperties |
InfoBar |
InfoBarAutomationPeer |
InfoBarClosedEventArgs |
InfoBarClosingEventArgs |
InfoBarPanel |
InfoBarPanelProperties |
InfoBarProperties |
InfoBarTemplateSettings |
InfoBarTemplateSettingsProperties |
InitialsGenerator | PersonPicture Control
InkCanvas |
InkCanvas::TargetData |
InkCanvasAutomationPeer |
InkCanvasProperties |
InkToolBar |
InkToolBarAutomationPeer |
InkToolBarBallpointPenButton |
InkToolBarCustomPen |
InkToolBarCustomPenButton |
InkToolBarCustomPenButtonProperties |
InkToolBarCustomToggleButton |
InkToolBarCustomToolButton |
InkToolBarCustomToolButtonProperties |
InkToolBarEraserButton |
InkToolBarEraserButtonInternal |
InkToolBarEraserButtonProperties |
InkToolBarEraserFlyoutItemClickedEventArgs |
InkToolBarFlyoutItem |
InkToolBarFlyoutItemAutomationPeer |
InkToolBarFlyoutItemProperties |
InkToolBarHighlighterButton |
InkToolBarIsStencilButtonCheckedChangedEventArgs |
InkToolBarMenuButton |
InkToolBarMenuButtonAutomationPeer |
InkToolBarMenuButtonProperties |
InkToolBarPenButton |
InkToolBarPenButtonProperties |
InkToolBarPencilButton |
InkToolBarPenConfigurationControl |
InkToolBarPenConfigurationControlProperties |
InkToolBarProperties |
InkToolBarStencilButton |
InkToolBarStencilButtonProperties |
InkToolBarToggleButton |
InkToolBarToolButton |
InkToolBarToolButtonAutomationPeer |
InkToolBarToolButtonProperties |
InkToolBarTrace |
InspectingDataSource |
InteractionTrackerAsyncOperation |
InteractionTrackerOwner |
is_flags_enum< T > |
is_flags_enum< PointerOverStatus > |
is_flags_enum< PointerPressedStatus > |
ItemCollectionTransition |
ItemCollectionTransitionCompletedEventArgs |
ItemCollectionTransitionProgress |
ItemCollectionTransitionProvider |
ItemCollectionTransitionProviderProperties |
ItemContainer |
ItemContainerAutomationPeer |
ItemContainerInvokedEventArgs |
ItemContainerProperties |
ItemContainerRevokers |
ItemContainerTrace |
ItemsRepeater |
ItemsRepeaterElementClearingEventArgs |
ItemsRepeaterElementIndexChangedEventArgs |
ItemsRepeaterElementPreparedEventArgs |
ItemsRepeaterProperties |
ItemsRepeaterScrollHost |
ItemsRepeaterScrollHost::BringIntoViewState |
ItemsRepeaterScrollHost::CandidateInfo |
ItemsRepeaterTrace |
ItemsSourceView |
ItemsSourceViewFactory |
ItemsSourceViewProperties |
ItemsView |
ItemsViewAutomationPeer |
ItemsViewItemInvokedEventArgs |
ItemsViewProperties |
ItemsViewSelectionChangedEventArgs |
ItemsViewTestHooks |
ItemsViewTrace |
ItemTemplateWrapper |
ITrackerHandleManager |
IUnknownAccessor< T, Enable > |
IUnknownAccessor< com_ptr< T > > |
IVectorOwner< EventSource, T > |
Layout |
LayoutContext |
LayoutContextAdapter |
LayoutPanel |
LayoutPanelLayoutContext |
LayoutPanelProperties |
LayoutProperties |
LayoutsTestHooks |
LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs |
LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs |
LifetimeHandler |
LinedFlowLayout |
LinedFlowLayout::ItemsInfo |
LinedFlowLayout::ItemsLayout |
LinedFlowLayoutItemAspectRatios |
LinedFlowLayoutItemAspectRatios::ItemAspectRatio |
LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock |
LinedFlowLayoutItemCollectionTransitionProvider |
LinedFlowLayoutItemsInfoRequestedEventArgs |
LinedFlowLayoutProperties |
LinedFlowLayoutTrace |
MapControl |
MapControlMapServiceErrorOccurredEventArgs |
MapControlProperties |
MapElement |
MapElementClickEventArgs |
MapElementsLayer |
MapElementsLayerProperties |
MapIcon |
MapIconProperties |
MapLayer |
MaterialHelper |
MaterialHelperBase |
MaterialHelperTestApi |
MathToken |
MenuBar |
MenuBarAutomationPeer |
MenuBarItem |
MenuBarItemAutomationPeer |
MenuBarItemFlyout |
MenuBarItemProperties |
MenuBarProperties |
MicaBackdrop |
MicaBackdrop::ControllerEntry |
MicaBackdropProperties |
AlphaMaskEffect |
ArithmeticCompositeEffect |
BlendEffect |
BorderEffect |
ColorMatrixEffect |
ColorSourceEffect |
CompositeStepEffect |
ContrastEffect |
CrossFadeEffect |
DistantDiffuseEffect |
DistantSpecularEffect |
EffectBase |
EffectBase::NamedProperty |
ExposureEffect |
GammaTransferEffect |
GaussianBlurEffect |
GrayscaleEffect |
HueRotationEffect |
IAlphaMaskEffect |
IArithmeticCompositeEffect |
IBlendEffect |
IBorderEffect |
IColorMatrixEffect |
IColorSourceEffect |
ICompositeStepEffect |
IContrastEffect |
ICrossFadeEffect |
IDistantDiffuseEffect |
IDistantSpecularEffect |
IExposureEffect |
IGammaTransferEffect |
IGaussianBlurEffect |
IGrayscaleEffect |
IHueRotationEffect |
IInvertEffect |
ILinearTransferEffect |
ILuminanceToAlphaEffect |
InvertEffect |
IOpacityEffect |
IPointDiffuseEffect |
IPointSpecularEffect |
IPosterizeEffect |
IPremultiplyEffect |
ISaturationEffect |
ISepiaEffect |
ISpotDiffuseEffect |
ISpotSpecularEffect |
ITemperatureAndTintEffect |
ITintEffect |
ITransform2DEffect |
IUnPremultiplyEffect |
LinearTransferEffect |
LuminanceToAlphaEffect |
Matrix5x4 |
OpacityEffect |
PointDiffuseEffect |
PointSpecularEffect |
PosterizeEffect |
PremultiplyEffect |
SaturationEffect |
SepiaEffect |
SpotDiffuseEffect |
SpotSpecularEffect |
TemperatureAndTintEffect |
TintEffect |
Transform2DEffect |
UnPremultiplyEffect |
RegisterMetadata |
AcrylicBrushTests |
AnimatedIconTests |
AnnotatedScrollBarTests |
AutoSuggestBoxTests |
BreadcrumbTests |
BreadcrumbTests::MockClass |
ButtonInteractionTests |
CalendarViewTests |
Category |
ColorPickerTests |
ComboBoxTests |
CommandBarFlyoutTests |
CommonStylesApiTests |
CommonStylesVisualTreeTestSamples |
CommonStylesVisualTreeTestSamples::CustomizedFilter |
CommonStylesVisualTreeTestSamples::CustomizedTranslator |
ControlVisualTreeTestFilter |
ExpanderTests |
IconSourceApiTests |
ImageIconTests |
InfoBadgeTests |
ItemContainerTests |
ItemsViewTests |
LayoutPanelTests |
LightConfigurationTests |
MainWindowLightConfiguration |
MapControlTests |
MyCustomNonVirtualizingStackLayout |
NavigationViewTests |
NumberBoxTests |
PagerControlTests |
ParallaxViewTests |
PersonPictureTests |
PipsPagerTests |
ProgressBarTests |
ProgressRingTests |
RadioButtonsTests |
RatingControlTests |
RefreshInfoProviderImpl |
RefreshVisualizerTests |
AccessibilityTests |
CustomItemsSource |
CustomItemsSourceView |
CustomItemsSourceViewWithUniqueIdMapping |
CustomItemsSourceWithUniqueId |
DataAsElementElementFactory |
ElementFromElementElementFactory |
FlowLayoutDerived |
ItemCollectionTransitionProviderDerived |
MockElementFactory |
MockElementFactory::GetElementCallInfo |
MockElementFactory::RecycleElementCallInfo |
MockItemsSource |
MockItemsSource::GetAtCallInfo |
MockItemsSource::KeyFromIndexCallInfo |
MockItemsSourceWithUniqueIdMapping |
MockNonVirtualizingLayout |
MockStackLayout |
MockVirtualizingLayout |
NamedGroup-g< T > |
NonVirtualStackLayout |
OrientationBasedMeasures |
ReadOnlyNotifyPropertyChangedCollection-g< T > |
RecyclingElementFactoryDerived |
WinRTCollection |
WinRTCollection::VectorChangedEventArgs |
CustomSelectionModel |
EffectiveViewportScrollPresenterTests |
EffectiveViewportTests |
FlowLayoutCollectionChangeTests |
FlowLayoutTests |
IndexPathTests |
InspectingDataSourceTests |
InspectingDataSourceTests::CollectionChangeRecorder |
InspectingDataSourceTests::CustomEnumerable |
InspectingDataSourceTests::ObservableVectorWithUniqueIds |
InspectingDataSourceTests::WinRTObservableVector |
InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs |
ItemCollectionTransitionProviderTests |
ItemCollectionTransitionProviderTests::CallInfo |
ItemTemplateTests |
LayoutTests |
LinedFlowLayoutTests |
MyContainerSelector |
MySelector |
PhasingTests |
PhasingTests::CustomElementFactory |
PhasingTests::ElementPhasingManager |
RecyclePoolTests |
RepeaterFocusTests |
RepeaterTests |
SelectionModelTests |
SelectionModelTests::TreeWalkNodeInfo |
ViewManagerTests |
ViewportTests |
ViewportTests::TestGridLayout |
ViewportTests::TestScrollingSurface |
ViewportTests::TestStackLayout |
RevealTests |
ScrollPresenterTests |
ScrollPresenterTests::ScrollPresenterOperation |
ScrollPresenterTests::TestDataSource |
ScrollViewerAdapterTests |
ScrollViewTests |
ScrollViewVisualStateCounts |
SecondaryWindowLightConfiguration |
SelectorBarTests |
SliderInteractionTests |
SpecialTreeView |
SpecialTreeViewItem |
SpecialTreeViewList |
SpecialTreeViewNode |
SplitButtonTests |
SwipeControlTests |
TabViewTests |
TeachingTipTests |
TestCommand |
TreeViewTests |
TwoPaneViewTests |
AcrylicBrushTests |
AnimatedVisualPlayerTests |
AnnotatedScrollBarInteractionTests |
AutoSuggestBox |
BreadcrumbBarItem |
BreadcrumbBarItem::BreadcrumbBarItemFactory |
BreadcrumbTests |
ButtonInteractionTests |
ColorChangedEventWaiter |
ColorPickerSlider |
ColorPickerSlider::ColorPickerSliderFactory |
ColorPickerTests |
ColorPickerTests::Color |
ColorPickerTests::ColorPickerTestSetupHelper |
ColorSpectrum |
ColorSpectrum::ColorSpectrumFactory |
CommandBarFlyoutTests |
CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper |
CommonStylesTests |
DropDownButton |
DropDownButton::DropDownButtonFactory |
DropDownButtonTests |
Expander |
Expander::ExpanderFactory |
ExpanderTests |
ImageIconTests |
InfoBarTests |
ItemContainerTests |
ItemsViewTestsWithInputHelper |
ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper |
ItemsViewTestsWithInputHelper::LoggingHelper |
MapControlTests |
MenuBarTests |
CommonTests |
EventTests |
FocusBehaviorTests |
NavigationViewTestsBase |
PaneBehaviorTests |
RegressionTestScenario |
SelectionTests |
TopModeTests |
NumberBoxTests |
PagerControlTestBase |
PagerControlTestPageElements |
PagerControlTests |
ParallaxViewTests |
PersonPictureTests |
PipsPagerElements |
PipsPagerTestBase |
PipsPagerTests |
ProgressBarTests |
ProgressRingTests |
RadialGradientBrushTests |
RadioButtonsFocusTestPageElements |
RadioButtonsTestPageElements |
RadioButtonsTests |
RadioMenuFlyoutItemTests |
RatingControlTests |
RefreshContainerTests |
RepeaterTests |
RevealBrushTests |
ScrollPresenterTestsBase |
ScrollPresenterTestsWithAutomationPeer |
ScrollPresenterTestsWithInputHelper |
ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements |
ScrollViewerAdapterTests |
ScrollViewTestsWithInputHelper |
ScrollViewTestsWithInputHelper::LoggingHelper |
SelectorBarTests |
SliderInteractionTests |
SplitButtonTests |
SwipeControlTests |
TabViewTearOutTests |
TabViewTests |
TeachingTipFocusTestPageElements |
TeachingTipTestPageElements |
TeachingTipTests |
TextCommandBarFlyoutTests |
TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper |
TitleBarTests |
TreeViewTests |
TwoPaneViewTests |
WebView2Tests |
WebView2Tests::WebView2TestSetupHelper |
MonochromaticOverlayPresenter |
MonochromaticOverlayPresenterProperties |
IAdapterAnimationHandler |
IRefreshContainerPrivate |
IRefreshInfoProvider |
IRefreshInfoProviderAdapter |
IRefreshVisualizerPrivate |
IRepeaterScrollingSurface |
IAcrylicBrushStaticsPrivate |
IAnimatedVisual |
IAnimatedVisualSource |
IAnimatedVisualSource3 |
IApplicationViewSpanningRects |
IClosable |
IKeyIndexMapping |
MultipleSelector |
MutexLockedResource< T > |
AspectRatioRespectingControl |
AutoHandle< THandlePolicy > |
HandlePolicy |
MUXControlsFactory |
AcrylicBrushBasicPage |
AcrylicBrushLuminosityTestPage | An empty page that can be used on its own or navigated to within a Frame
AcrylicBrushPage |
AcrylicBrushPage::WrapperEffectBrush |
AcrylicColorPage |
AcrylicMarkupPage |
AcrylicPage |
AcrylicRenderingPage |
AcrylicRenderingPage::SampledColors |
AnimatedIconHost |
AnimatedIconPage |
AnimatedVisualPlayerPage |
AnimationHandler |
AnnotatedScrollBarIScrollControllerPage |
AnnotatedScrollBarPage |
AnnotatedScrollBarRangeBasePage |
AnnotatedScrollBarSummaryPage |
AppBarPage |
AutoSuggestBoxPage |
BlankPage |
BorderThicknessPage |
BreadcrumbBarAxeTestPage |
BreadcrumbBarFolder |
BreadcrumbBarPage |
Bridge |
BridgeAnotherClass |
ButtonInteractionPage |
CalendarDatePickerPage |
CalendarViewPage |
CanvasScrollControllerConsumer |
Category |
CheckBoxPage |
ColorItem |
ColorPickerPage |
ColorToSolidColorBrushConverter |
ComboBoxPage |
CommandBarCenterPage |
CommandBarFlyoutMainPage |
CommandBarFlyoutPage |
CommandBarPage |
CommandBarSummaryPage |
CommonStylesPage |
CompactPage |
ContentDialogPage |
CoreWindowEventsPage |
CornerRadiusPage |
CustomContent |
Customer |
Customers |
CustomNavigationViewItem |
DataItem |
DataModelWithINPC |
DatePickerPage |
DialogWithNavView |
DoubleToStringConverter |
DropDownButtonPage |
DynamicPage |
EnumToStringConverter |
ExpanderPage |
ExtraCommandBarFlyoutPage |
FallbackGrid |
FlatItemsControlPage |
FlipViewPage |
GridViewPage |
GroupedItemsControlGroupItem |
GroupedItemsControlItem |
GroupedItemsControlPage |
GroupedItemsControlViewModel |
GroupedListViewBaseGroupItem |
GroupedListViewBaseItem |
GroupedListViewBasePage |
GroupedListViewBaseViewModel |
HierarchicalNavigationViewDataBinding |
HierarchicalNavigationViewMarkup |
ICoreWebView2Interop |
ImageIconPage |
ImageIRefreshInfoProviderAdapter |
ImagePage |
InfoBadgePage |
InfobarAxeTestage |
InfoBarPage |
Ingredient |
InkToolbarPage |
IScrollControllerAdapter |
ItemContainerLayoutPage |
ItemContainerPage |
ItemContainerSummaryPage |
ItemsControlPage |
ItemsViewBlankPage |
ItemsViewIntegrationPage |
ItemsViewInteractiveTestsPage |
ItemsViewPage |
ItemsViewPictureLibraryPage |
ItemsViewSummaryPage |
ItemsViewSummaryPage::QueuedOperation |
ItemsViewTransitionPage |
ListViewAnchoringPage |
ListViewBackgroundPage |
ListViewBasePage |
ListViewBasePage::QueuedOperation |
ListViewElementNameBindingPage |
ListViewHeaderPage |
ListViewItemPage |
ListViewPage |
MapControlPage |
MediaTransportControlsPage |
MenuBarPage |
MenuFlyoutPage |
MockAnimatedIconSource |
MockIAnimatedIconSource2 |
MonochromaticOverlayPresenterPage |
MultipleTabViewPage |
MyColorSpectrum |
MyCommand |
MyData |
NavigationViewAnimationPage |
NavigationViewAxeTestPage |
NavigationViewBlankPage1 |
NavigationViewCaseBundle |
NavigationViewCompactPaneLengthTestPage |
NavigationViewCustomMenuItemPage |
NavigationViewCustomThemeResourcesPage |
NavigationViewInfoBadgeTestPage | An empty page that can be used on its own or navigated to within a Frame
NavigationViewInitPage |
NavigationViewIsPaneOpenPage |
NavigationViewItemTemplatePage |
NavigationViewMenuItemsSourcePage |
NavigationViewMenuItemStretchPage |
NavigationViewMinimalPage |
NavigationViewPage |
NavigationViewPageDataContext |
NavigationViewRS3Page | Verify ShouldPreserveNavigationViewRS3Behavior
NavigationViewRS4Page |
NavigationViewSelectedItemEdgeCasePage |
NavigationViewStretchPage |
NavigationViewTopNavOnlyPage |
NavigationViewTopNavOverflowButtonPage |
NavigationViewTopNavPage |
NavigationViewTopNavStorePage |
NavViewPageData |
NestedGridViewsPage |
NestedItemsControlsPage |
NestedListViewsPage |
NewWindowRootPage |
NullableBooleanToBooleanConverter |
NumberBoxAxeTestPage |
NumberBoxPage |
PageInfo |
PagerControlAxeTestPage |
PagerControlPage |
PaneFooterTestPage | An empty page that can be used on its own or navigated to within a Frame
PaneLayoutTestPage | An empty page that can be used on its own or navigated to within a Frame
ParallaxViewPage |
ParallaxViewStackPanelPage |
PersonInfo |
PersonPicturePage |
PersonPicturePage::SportsGroup |
PersonPicturePage::SportsPerson |
Picture |
PictureLibrary |
PipsPagerAxeTestPage |
PipsPagerExamples |
PipsPagerPage |
PivotPage |
PrefixConverter |
ProgressBarAxeTestPage |
ProgressBarPage |
ProgressBarReTemplatePage |
ProgressRingAxeTestPage |
ProgressRingCustomLottieSourcePage |
ProgressRingPage |
ProgressRingStoryboardAnimationPage |
PTRPage |
RadialGradientBrushPage |
RadioButtonsPage |
RadioMenuFlyoutItemPage |
RatingControlPage |
RefreshableCollection-g< T > |
RefreshContainerOnImagePage |
RefreshContainerPage |
RefreshInfoProviderImplementation |
RefreshVisualizerPage |
RepeaterTestUIPage |
RevealBackgroundItem |
RevealBasicPage |
RevealColorPage |
RevealFallbackPage |
RevealGridItem |
RevealGridTypeItem |
RevealItem |
RevealListPage |
RevealMarkupPage |
RevealPage |
RevealRegressionTestsPage |
RevealScenarioColors |
RevealScenarioGrid |
RevealScenarioItem |
RevealScenarioLights |
RevealScenarioList |
RevealScenarios |
RevealScenarioSecondaryView |
RevealSimpleListPage |
RevealStatesPage |
RevealThemeItem |
ActivityFeedLayout | This is a custom layout that displays elements in two different sizes wide (w) and narrow (n)
ActivityFeedLayoutState |
ActivityFeedSamplePage |
AnimationsDemoPage |
AnimationsDemoPage::AnimationElementFactory |
BasicDemo |
Category |
CircleLayout |
CircleLayoutSamplePage |
CollectionChangeDemo |
CollectionChangeDemo::MyDataSource |
Defaults |
DelegatingItemsSource |
DisposableUserControl |
ElementsInItemsSourcePage |
FixedSizeItem |
FlowLayoutDemoPage |
Item |
ItemsViewWithDataPage |
ItemTemplateDemo |
KeyboardNavigationSample |
LinedFlowLayoutDemo |
Recipe |
RecipeGroup |
Year |
MyCollection |
MyData |
MyItem |
MyItemsRepeater |
MySelector |
NonVirtualStackLayout |
NonVirtualStackLayoutSamplePage |
ObjectModelTestPage |
Person |
PersonDataSource |
PersonElementFactory |
PinterestLayout |
PinterestLayoutSamplePage |
RadialItemCollectionTransitionProvider |
RecipeElementFactory |
ScaleAnimatedVerticalListDemo |
BoolToBrushConverter |
BoolToVisibilityConverter |
Data |
FlatSample |
GroupedRepeaterItem |
GroupedRepeaterItemAutomationPeer |
GroupedSample |
RepeaterItem |
RepeaterItemAutomationPeer |
SelectionContainer |
SelectionContainerAutomationPeer |
TreeViewItem |
TreeViewItemAutomationPeer |
TreeViewSample |
SortingAndFilteringPage |
StoreDemoPage |
StoreMockData |
UICollection |
UniformGridLayoutDemo |
VariableSizedItemsPage |
VariableSizeItem |
VirtualizingStackLayout |
VirtualizingStackLayoutSamplePage |
VirtualizingUniformStackLayout |
VirtualizingUniformStackLayoutSamplePage |
SampleSuggestions |
ScrollBarController |
ScrollBarPage |
ScrollPresenterAccessibilityPage |
ScrollPresenterBringIntoViewPage |
ScrollPresenterBringIntoViewPage::SampleDataSource |
ScrollPresenterChainingAndRailingPage |
ScrollPresenterDynamicPage |
ScrollPresenterDynamicPage::QueuedOperation |
ScrollPresenterExpressionAnimationSourcesPage |
ScrollPresenterLeakDetectionPage |
ScrollPresenterManipulationModePage |
ScrollPresenterMousePanningPage |
ScrollPresenterPage |
ScrollPresenterRepeaterAnchoringPage |
ScrollPresenterRepeaterAnchoringPage::QueuedOperation |
ScrollPresenterRepeaterAnchoringPage::SampleDataSource |
ScrollPresenterScrollSnapPointsPage |
ScrollPresenterStackPanelAnchoringPage |
ScrollPresenterStackPanelAnchoringPage::QueuedOperation |
ScrollPresentersWithSimpleContentsPage |
ScrollPresenterWithBiDirectionalScrollControllerPage |
ScrollPresenterWithCompositionScrollControllersPage |
ScrollPresenterWithSimpleScrollControllersPage |
ScrollPresenterZoomSnapPointsPage |
ScrollViewBlankPage |
ScrollViewBringIntoViewPage |
ScrollViewDynamicPage |
ScrollViewerAdapterPage |
ScrollViewerPage |
ScrollViewKeyboardAndGamepadNavigationPage |
ScrollViewPage |
ScrollViewsWithSimpleContentsPage |
ScrollViewWithRTLFlowDirectionPage |
ScrollViewWithScrollControllersPage |
SelectionModeItem |
SelectorBarPage |
SelectorBarSamplePage |
SelectorBarSummaryPage |
SimpleRectanglePage |
SimpleVerify |
SliderInteractionPage |
SliderPage |
SplitButtonPage |
SplitViewPage |
Square |
SwipeControlClearPage | Test page used for clearing existing SwipeControls
SwipeControlPage |
SwipeControlPage2 |
SwipePage |
TabDataItem |
TabViewAxeTestPage |
TabViewPage |
TabViewSizingPage |
TabViewTabClosingBehaviorPage | An empty page that can be used on its own or navigated to within a Frame
TabViewTabItemsSourcePage |
TabViewTearOutWindowWithDataItems |
TabViewTearOutWindowWithoutDataItems |
TargetElement |
TeachingTipCaseBundle |
TeachingTipFocusPage |
TeachingTipInXamlPage |
TeachingTipPage |
TestControl |
TestControlAutomationPeer |
TextCommandBarFlyoutPage |
TextControlsPage |
TextPage |
TimePickerPage |
TitleBarPage |
TitleBarPageWindow |
ToggleAnimatedIconHost |
ToolTipPage |
TreeViewItemSource |
TreeViewItemsSourceTestPage |
TreeViewItemStyleSelector |
TreeViewItemTemplateSelector |
TreeViewItemTemplateSelectorTestPage |
TreeViewLateDataInitTest | Test page for late initialization data binding. ItemsSource is null until we click the button to set it
TreeViewNode2 |
TreeViewNodeInMarkupTestPage |
TreeViewPage |
TreeViewUnrealizedChildrenTestPage | An empty page that can be used on its own or navigated to within a Frame
TreeViewViewModel |
TreeViewViewModelItem |
TwoPaneViewPage |
UriToStringConverter |
BiDirectionalScrollController |
BiDirectionalScrollController::OperationInfo |
BiDirectionalScrollController::UniScrollController |
BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs |
BiDirectionalScrollControllerScrollingScrollCompletedEventArgs |
CompositionScrollController |
CompositionScrollController::OperationInfo |
CompositionScrollControllerOffsetChangeCompletedEventArgs |
CompositionScrollControllerPanningInfo |
ExpressionAnimationStatusChange |
ScrollPresenterTestHooksHelper |
ScrollViewTestHooksHelper |
DefaultItemCollectionTransitionProvider |
ResetableCollection-g< T > |
VirtualizingDataSource |
VirtualizingStackPanelPage |
VisualPropertiesPage |
VisualStatesPage |
WebView2BasicPage |
WebView2Common |
WebView2CoreObjectsPage |
WebView2Page |
WebView2WithCursor |
WindowPage |
MUXControlsTestHooks |
MUXControlsTestHooksLoggingMessageEventArgs |
NavigationView |
NavigationViewAutomationPeer |
NavigationViewBackRequestedEventArgs |
NavigationViewDisplayModeChangedEventArgs |
NavigationViewItem |
NavigationViewItemAutomationPeer |
NavigationViewItemBase |
NavigationViewItemBaseProperties |
NavigationViewItemBaseRevokers |
NavigationViewItemCollapsedEventArgs |
NavigationViewItemExpandingEventArgs |
NavigationViewItemHeader |
NavigationViewItemHelper< T > |
NavigationViewItemInvokedEventArgs |
NavigationViewItemPresenter |
NavigationViewItemPresenterProperties |
NavigationViewItemPresenterTemplateSettings |
NavigationViewItemPresenterTemplateSettingsProperties |
NavigationViewItemProperties |
NavigationViewItemSeparator |
NavigationViewItemsFactory |
NavigationViewPaneClosingEventArgs |
NavigationViewProperties |
NavigationViewSelectionChangedEventArgs |
NavigationViewTemplateSettings |
NavigationViewTemplateSettingsProperties |
NavigationViewTrace |
NonReferenceTrackerStorageHelper< T > |
NonVirtualizingLayout |
NonVirtualizingLayoutContext |
NullableXamlType |
NullSelector |
NumberBox |
NumberBoxAutomationPeer |
NumberBoxParser |
NumberBoxProperties |
NumberBoxValueChangedEventArgs |
ObservableTraits< T, isObservable, isBindable > |
ObservableTraits< T, isObservable, isBindable >::Dummy |
ObservableTraits< T, true, isBindable > |
ObservableVector< T > |
ObservableVector< T >::Iterator |
ObservableVectorInnerImpl< VectorOptions, Wrapper > |
OffsetsChange |
OffsetsChangeWithAdditionalVelocity |
OrientationBasedMeasures |
PagerControl |
PagerControlAutomationPeer |
PagerControlProperties |
PagerControlSelectedIndexChangedEventArgs |
PagerControlTemplateSettings |
PagerControlTemplateSettingsProperties |
ParallaxView |
ParallaxViewProperties |
PerfXamlEvent_RAII |
PersonPicture |
PersonPictureAutomationPeer |
PersonPictureProperties |
PersonPictureTemplateSettings |
PersonPictureTemplateSettingsProperties |
PipsPager |
PipsPagerAutomationPeer |
PipsPagerProperties |
PipsPagerSelectedIndexChangedEventArgs |
PipsPagerTemplateSettings |
PipsPagerTemplateSettingsProperties |
PipsPagerViewItemRevokers |
PointerInfo< T > |
PointerInfoRevokers |
PrimitiveXamlType |
ProgressBar |
ProgressBarAutomationPeer |
ProgressBarProperties |
ProgressBarTemplateSettings |
ProgressBarTemplateSettingsProperties |
ProgressRing |
ProgressRingAutomationPeer |
ProgressRingProperties |
ProgressRingTemplateSettings |
ProgressRingTemplateSettingsProperties |
PropertyChanged_revoker |
PullToRefreshPage | An empty page that can be used on its own or navigated to within a Frame
PTRTrace |
PullToRefreshHelperTestApi |
RadialGradientBrush |
RadialGradientBrushProperties |
RadioButtons |
RadioButtonsCaseBundle |
RadioButtonsFocusPage |
RadioButtonsAutomationPeer |
RadioButtonsElementFactory |
RadioButtonsProperties |
RadioButtonsTestHooks |
RadioMenuFlyoutItem |
RadioMenuFlyoutItemProperties |
RatingControl |
RatingControlAutomationPeer |
RatingControlProperties |
RatingItemFontInfo |
RatingItemFontInfoProperties |
RatingItemImageInfo |
RatingItemImageInfoProperties |
RatingItemInfo |
RecyclePool |
RecyclePool::ElementInfo |
RecyclePoolProperties |
RecyclingElementFactory |
RecyclingElementFactoryProperties |
reference_tracker_custom_implements_t< WinRTClassType, ImplT > |
reference_tracker_implements< D, WinRTClassType, ImplT, I > |
reference_tracker_implements_t< WinRTClassType > |
type< AnnotatedScrollBarPanningInfo, I...,::IReferenceTrackerExtension > |
type< BreadcrumbIterable, I...,::IReferenceTrackerExtension > |
type< ChildrenCollection< T >, I...,::IReferenceTrackerExtension > |
type< ChildrenInTabFocusOrderIterable, I...,::IReferenceTrackerExtension > |
type< ElementFactoryGetArgsDownlevel, I...,::IReferenceTrackerExtension > |
type< ElementFactoryRecycleArgsDownlevel, I...,::IReferenceTrackerExtension > |
type< HashMap< K, V >, I...,::IReferenceTrackerExtension > |
type< Iterator, I...,::IReferenceTrackerExtension > |
type< KeyValuePair, I...,::IReferenceTrackerExtension > |
type< RefreshInfoProviderImpl, I...,::IReferenceTrackerExtension > |
type< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, I...,::IReferenceTrackerExtension > |
type< SelectedItems< T >, I...,::IReferenceTrackerExtension > |
type< SelectedItemsVector, I...,::IReferenceTrackerExtension > |
type< SelectedTreeNodeVector, I...,::IReferenceTrackerExtension > |
type< TreeViewNodeVector, I...,::IReferenceTrackerExtension > |
type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, I...,::IReferenceTrackerExtension > |
type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension > |
type< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension > |
type< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, I...,::IReferenceTrackerExtension > |
type< ViewModel, I...,::IReferenceTrackerExtension > |
ReferenceTracker< D, ImplT, I > |
ReferenceTrackerContainerBase |
ReferenceTrackerStorageHelper< ImplT, T > |
RefreshContainer |
RefreshContainerProperties |
RefreshInfoProviderImpl |
RefreshInteractionRatioChangedEventArgs |
RefreshRequestedEventArgs |
RefreshStateChangedEventArgs |
RefreshVisualizer |
RefreshVisualizerProperties |
RefreshInfoProviderImplementation |
SliderRefreshInfoProviderAdapter |
RegUtil |
RepeatedScrollSnapPoint |
RepeatedZoomSnapPoint |
RepeaterAutomationPeer |
RepeaterLayoutContext |
RepeaterTestHooks |
RevealBackgroundBrush |
RevealBorderBrush |
RevealBorderLight |
RevealBorderSpotlightInfo< ValueType > |
RevealBorderSpotlightStateDesc |
RevealBrush |
RevealBrushProperties |
RevealBrushTestApi |
RevealHoverLight |
RevealHoverSpotlightAnimationInfo< ValueType > |
RevealHoverSpotlightStateDesc |
RevealListViewItemPresenter |
RevealTestApi |
Rgb |
RoutedEventHandler_revoker |
RoutedEventTraits< eventType > |
RoutedEventTraits< RoutedEventType::DragEnter > |
RoutedEventTraits< RoutedEventType::DragLeave > |
RoutedEventTraits< RoutedEventType::Drop > |
RoutedEventTraits< RoutedEventType::GettingFocus > |
RoutedEventTraits< RoutedEventType::KeyDown > |
RoutedEventTraits< RoutedEventType::LosingFocus > |
RoutedEventTraits< RoutedEventType::PointerCanceled > |
RoutedEventTraits< RoutedEventType::PointerCaptureLost > |
RoutedEventTraits< RoutedEventType::PointerExited > |
RoutedEventTraits< RoutedEventType::PointerPressed > |
RoutedEventTraits< RoutedEventType::PointerReleased > |
CMethodProfileGroup< size > |
CMethodProfileGroupBase |
FunctionTelemetryCount |
ProfileGroupInfo |
ScopedBatchCompleted_revoker |
ScrollBarController |
ScrollControllerAddScrollVelocityRequestedEventArgs |
ScrollControllerPanRequestedEventArgs |
ScrollControllerScrollByRequestedEventArgs |
ScrollControllerScrollToRequestedEventArgs |
ScrollingAnchorRequestedEventArgs |
ScrollingBringingIntoViewEventArgs |
ScrollingScrollAnimationStartingEventArgs |
ScrollingScrollCompletedEventArgs |
ScrollingScrollOptions |
ScrollingScrollStartingEventArgs |
ScrollingZoomAnimationStartingEventArgs |
ScrollingZoomCompletedEventArgs |
ScrollingZoomOptions |
ScrollingZoomStartingEventArgs |
ScrollInputHelper |
ScrollPresenter |
ScrollPresenterAutomationPeer |
ScrollPresenterProperties |
ScrollPresenterTestHooks |
ScrollPresenterTestHooksAnchorEvaluatedEventArgs |
ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs |
ScrollPresenterTestHooksInteractionSourcesChangedEventArgs |
ScrollPresenterTrace |
ScrollSnapPoint |
ScrollSnapPointBase |
ScrollView |
ScrollView::AutoHideScrollBarsState |
ScrollViewBringIntoViewOperation |
ScrollViewerIRefreshInfoProviderAdapter |
ScrollViewerIRefreshInfoProviderDefaultAnimationHandler |
ScrollViewProperties |
ScrollViewTestHooks |
ScrollViewTrace |
sealed< T, fallback, RawStorageT > | Resource Accessor
SelectedItemInfo |
SelectedItems< T > |
SelectedItems< T >::Iterator |
SelectedItemsVector |
SelectedTreeNodeVector |
SelectionModel |
SelectionModelChildrenRequestedEventArgs |
SelectionModelProperties |
SelectionModelSelectionChangedEventArgs |
SelectionTreeHelper |
SelectionTreeHelper::TreeWalkNodeInfo |
SelectorBar |
SelectorBarItem |
SelectorBarItemAutomationPeer |
SelectorBarItemProperties |
SelectorBarProperties |
SelectorBarSelectionChangedEventArgs |
SelectorBarTestHooks |
SelectorBarTrace |
SelectorBase |
SelectTemplateEventArgs |
SharedHelpers |
SimpleXamlStartStopEvent_RAII |
SingleSelector |
SliderInteraction |
SliderInteractionProperties |
SnapPointBase |
SnapPointSortPredicate |
SnapPointWrapper< T > |
SnapPointWrapperComparator< T > |
SpectrumBrush |
SpectrumBrushProperties |
SplitButton |
SplitButtonAutomationPeer |
SplitButtonClickEventArgs |
SplitButtonProperties |
SplitButtonTestApi |
SplitButtonTestHelper |
SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > |
SplitVector< T, SplitVectorID > |
StackLayout |
StackLayoutProperties |
StackLayoutState |
SwipeControl |
TestCommand |
SwipeControlInteractionTrackerOwner |
SwipeControlProperties |
SwipeControlTrace |
SwipeItem |
SwipeItemInvokedEventArgs |
SwipeItemProperties |
SwipeItems |
SwipeItemsProperties |
SwipeTestHooks |
TabView |
TabViewAutomationPeer |
TabViewExternalTornOutTabsDroppedEventArgs |
TabViewExternalTornOutTabsDroppingEventArgs |
TabViewItem |
TabViewItemAutomationPeer |
TabViewItemProperties |
TabViewItemTemplateSettings |
TabViewItemTemplateSettingsProperties |
TabViewListView |
TabViewProperties |
TabViewTabCloseRequestedEventArgs |
TabViewTabDragCompletedEventArgs |
TabViewTabDragStartingEventArgs |
TabViewTabDroppedOutsideEventArgs |
TabViewTabTearOutRequestedEventArgs |
TabViewTabTearOutWindowRequestedEventArgs |
TabViewTrace |
TeachingTip |
TeachingTipAutomationPeer |
TeachingTipClosedEventArgs |
TeachingTipClosingEventArgs |
TeachingTipProperties |
TeachingTipTemplateSettings |
TeachingTipTemplateSettingsProperties |
TeachingTipTestHooks |
TextCommandBarFlyout |
ThreadData |
TitleBar |
TitleBarAutomationPeer |
TitleBarProperties |
TitleBarTemplateSettings |
TitleBarTemplateSettingsProperties |
ToggleSplitButton |
ToggleSplitButtonAutomationPeer |
ToggleSplitButtonIsCheckedChangedEventArgs |
ToggleSplitButtonProperties |
TopNavigationViewDataProvider |
tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > |
TreeView |
TreeViewCollapsedEventArgs |
TreeViewDragItemsCompletedEventArgs |
TreeViewDragItemsStartingEventArgs |
TreeViewExpandingEventArgs |
TreeViewItem |
TreeViewItemAutomationPeer |
TreeViewItemDataAutomationPeer |
TreeViewItemInvokedEventArgs |
TreeViewItemProperties |
TreeViewItemTemplateSettings |
TreeViewItemTemplateSettingsProperties |
TreeViewList |
TreeViewListAutomationPeer |
TreeViewNode |
TreeViewNodeProperties |
TreeViewNodeVector |
TreeViewProperties |
TreeViewSelectionChangedEventArgs |
TStorageWrapperImpl< T, isNoTrackerRef > |
TStorageWrapperImpl< T, true > |
TwoPaneView |
TwoPaneViewProperties |
UniformGridLayout |
UniformGridLayoutProperties |
UniformGridLayoutState |
ValueHelper< T, Enable > |
ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > |
ValueHelper< winrt::hstring, void > |
ValueProviderThunk< Owner > |
Vector< T, flags, Helper > |
VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > |
VectorChangedEventArgs |
VectorFlagHelper< flag > |
VectorInnerImpl< VectorOptions, Wrapper > |
VectorInterfaceHelper< T, isBindable > |
VectorInterfaceHelper< T, true > |
VectorIterator< T, isBindable, isDependencyObjectBase, Traits > |
VectorIteratorTraits< T, isBindable, isDependencyObjectBase > |
VectorIteratorTraits< T, true, isDependencyObjectBase > |
VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > |
IVectorOwner |
VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef > |
VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > |
VectorOptionsFromFlag< T, flag, Helper > |
ViewChange |
ViewChangeBase |
ViewModel |
ViewportManager |
ViewportManagerDownLevel |
ViewportManagerDownLevel::ScrollerInfo |
ViewportManagerWithPlatformFeatures |
VirtualizationInfo |
VirtualizingLayout |
VirtualizingLayoutContext |
VirtualLayoutContextAdapter |
VirtualLayoutContextAdapter::ChildrenCollection< T > |
VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator |
VisualStateUtil |
WebView2 |
WebView2::XamlFocusChangeInfo |
WebView2_TryCompleteInitialization_RAII |
WebView2AutomationPeer |
WebView2Properties |
WebView2RenderingVerifier |
WebView2RenderingVerifier::NativeMethods::RECT |
AcrylicBrushT |
AcrylicTestApiT |
AnimatedVisualPlayerAutomationPeerT |
AnnotatedScrollBarDetailLabelRequestedEventArgsT |
AnnotatedScrollBarLabelT |
AnnotatedScrollBarScrollingEventArgsT |
AnnotatedScrollBarT |
BreadcrumbBarItemAutomationPeerT |
BreadcrumbBarItemT |
BreadcrumbBarT |
ButtonInteractionInvokedEventArgsT |
ButtonInteractionT |
ColorPickerSliderAutomationPeerT |
ColorPickerSliderT |
ColorPickerT |
ColorSpectrumAutomationPeerT |
ColorSpectrumT |
ColumnMajorUniformToLargestGridLayoutT |
CommandBarFlyoutCommandBarT |
CommandBarFlyoutT |
DesktopAcrylicBackdropT |
DropDownButtonAutomationPeerT |
DropDownButtonT |
ExpanderAutomationPeerT |
ExpanderT |
FlowLayoutStateT |
FlowLayoutT |
InfoBadgeT |
InfoBarAutomationPeerT |
InfoBarClosingEventArgsT |
InfoBarPanelT |
InfoBarT |
InkCanvasAutomationPeerT |
InkCanvasT |
InkToolBarAutomationPeerT |
InkToolBarCustomPenT |
InkToolBarEraserButtonInternalTundefined |
InkToolBarEraserFlyoutItemClickedEventArgsT |
InkToolBarFlyoutItemAutomationPeerT |
InkToolBarFlyoutItemT |
InkToolBarIsStencilButtonCheckedChangedEventArgsT |
InkToolBarMenuButtonAutomationPeerT |
InkToolBarMenuButtonT |
InkToolBarPenConfigurationControlT |
InkToolBarT |
InkToolBarToggleButtonT |
InkToolBarToolButtonAutomationPeerT |
InkToolBarToolButtonT |
ItemCollectionTransitionCompletedEventArgsT |
ItemCollectionTransitionProgressT |
ItemCollectionTransitionProviderT |
ItemCollectionTransitionT |
ItemContainerAutomationPeerT |
ItemContainerInvokedEventArgsT |
ItemContainerT |
ItemsRepeaterElementClearingEventArgsT |
ItemsRepeaterElementIndexChangedEventArgsT |
ItemsRepeaterElementPreparedEventArgsT |
ItemsSourceViewT |
ItemsViewAutomationPeerT |
ItemsViewItemInvokedEventArgsT |
ItemsViewT |
LayoutPanelT |
LinedFlowLayoutItemsInfoRequestedEventArgsT |
LinedFlowLayoutT |
MapControlT |
MapElementsLayerT |
MapIconT |
MaterialHelperTestApiT |
MenuBarAutomationPeerT |
MenuBarItemAutomationPeerT |
MenuBarItemFlyoutT |
MenuBarItemT |
MenuBarT |
MicaBackdropT |
MonochromaticOverlayPresenterT |
NavigationViewAutomationPeerT |
NavigationViewItemAutomationPeerT |
NavigationViewItemBaseT |
NavigationViewItemCollapsedEventArgsT |
NavigationViewItemExpandingEventArgsT |
NavigationViewItemInvokedEventArgsT |
NavigationViewItemPresenterT |
NavigationViewPaneClosingEventArgsT |
NavigationViewSelectionChangedEventArgsT |
NavigationViewT |
NumberBoxAutomationPeerT |
NumberBoxT |
PagerControlAutomationPeerT |
PagerControlT |
PersonPictureAutomationPeerT |
PersonPictureT |
PipsPagerAutomationPeerT |
PipsPagerT |
ProgressBarAutomationPeerT |
ProgressBarT |
ProgressRingAutomationPeerT |
ProgressRingT |
RadialGradientBrushT |
RadioButtonsAutomationPeerT |
RadioButtonsT |
RatingControlAutomationPeerT |
RatingControlT |
RatingItemInfoT |
RecyclePoolT |
RecyclingElementFactoryT |
RefreshContainerT |
RefreshRequestedEventArgsT |
RefreshVisualizerT |
RepeaterAutomationPeerT |
RevealBackgroundBrushT |
RevealBorderBrushT |
RevealBorderLightT |
RevealBrushTestApiT |
RevealHoverLightT |
RevealListViewItemPresenterT |
RevealTestApiT |
ScrollingAnchorRequestedEventArgsT |
ScrollPresenterAutomationPeerT |
ScrollViewerIRefreshInfoProviderAdapterT |
ScrollViewT |
SelectionModelChildrenRequestedEventArgsT |
SelectionModelT |
SelectorBarT |
SelectTemplateEventArgsT |
SliderInteractionT |
SnapPointBaseT |
SpectrumBrushT |
SplitButtonAutomationPeerT |
SplitButtonT |
StackLayoutStateT |
StackLayoutT |
SwipeControlT |
SwipeItemsT |
SwipeItemT |
TabViewAutomationPeerT |
TabViewItemAutomationPeerT |
TabViewItemT |
TabViewListViewT |
TabViewT |
TeachingTipAutomationPeerT |
TeachingTipClosingEventArgsT |
TeachingTipT |
TitleBarAutomationPeerT |
TitleBarT |
ToggleSplitButtonAutomationPeerT |
TreeViewCollapsedEventArgsT |
TreeViewDragItemsCompletedEventArgsT |
TreeViewDragItemsStartingEventArgsT |
TreeViewExpandingEventArgsT |
TreeViewItemAutomationPeerT |
TreeViewItemDataAutomationPeerT |
TreeViewItemInvokedEventArgsT |
TreeViewItemT |
TreeViewListAutomationPeerT |
TreeViewListT |
TreeViewNodeT |
TreeViewSelectionChangedEventArgsT |
TreeViewT |
TwoPaneViewT |
UniformGridLayoutStateT |
UniformGridLayoutT |
WebView2AutomationPeerT |
XamlAmbientLightT |
XamlControlsResourcesT |
WorkInfo |
XamlAmbientLight |
XamlAmbientLightProperties |
XamlCompBrush |
XamlControlsResources |
XamlControlsResourcesProperties |
XamlMember |
XamlMetadataProvider |
XamlRootChanged_revoker |
XamlType |
XamlTypeBase |
ZoomFactorChange |
ZoomFactorChangeWithAdditionalVelocity |
ZoomSnapPoint |
ZoomSnapPointBase |
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrush Class Reference

  • Files
  • Directories
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

AcrylicBrush Class Reference

#include "AcrylicBrush.h"

Inherits ReferenceTracker< AcrylicBrush, winrt::implementation::AcrylicBrushT >, and AcrylicBrushProperties.

List of all members.

Public Member Functions

AcrylicBrush ()
virtual | ~AcrylicBrush ()
void | CoerceToZeroOneRange (double &value)
void | CoerceToZeroOneRange_Nullable (winrt::IReference< double > &value)
void | OnConnected ()
void | OnDisconnected ()
void | OnMaterialPolicyStatusChanged (const com_ptr< MaterialHelperBase > &sender, bool isDisabledByMaterialPolicy)
void | OnNoiseChanged (const com_ptr< MaterialHelperBase > &sender)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Static Public Member Functions

static
winrt::CompositionEffectBrush 		CreateAcrylicBrushWorker (const winrt::Compositor &compositor, bool useCrossFadeEffect, winrt::Color tintColor, winrt::Color luminosityColor, winrt::Color fallbackColor, bool shouldBrushBeOpaque, bool useCache=false)

Private Member Functions

void | CancelFallbackAnimationCompleteWait ()
void | CreateAcrylicBrush (bool useCrossFadeEffect, bool forceCreateAcrylicBrush=false)
void | CreateAnimation (const winrt::CompositionBrush &brush, winrt::CompositionScopedBatch &scopedBatch, winrt::event_token &token, float acrylicStart, float acrylicEnd, const winrt::TypedEventHandler< winrt::IInspectable, winrt::CompositionBatchCompletedEventArgs > &handler)
void | EnsureNoiseBrush ()
winrt::Color | GetEffectiveLuminosityColor ()
winrt::Color | GetEffectiveTintColor ()
bool | IsInFallbackMode ()
void | OnFallbackColorChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | PolicyStatusChangedHelper (bool isDisabledByMaterialPolicy)
void | UpdateAcrylicBrush ()
void | UpdateAcrylicStatus ()

Static Private Member Functions

static winrt::IGraphicsEffect | CombineNoiseWithTintEffect_Luminosity (const winrt::IGraphicsEffectSource &blurredSource, const winrt::Microsoft::UI::Private::Composition::Effects::ColorSourceEffect &tintColorEffect, const winrt::Color initialLuminosityColor, std::vector< winrt::hstring > &animatedProperties)
static
winrt::CompositionEffectFactory 		CreateAcrylicBrushCompositionEffectFactory (const winrt::Compositor &compositor, bool shouldBrushBeOpaque, bool useCrossFadeEffect, winrt::Color initialTintColor, winrt::Color initialLuminosityColor, winrt::Color initialFallbackColor)
static
winrt::CompositionEffectFactory 		GetOrCreateAcrylicBrushCompositionEffectFactory (const winrt::Compositor &compositor, bool shouldBrushBeOpaque, bool useCrossFadeEffect, winrt::Color initialTintColor, winrt::Color initialLuminosityColor, winrt::Color initialFallbackColor, bool useCache)
static winrt::CompositionAnimation | MakeColorAnimation (const winrt::Color &color, const winrt::TimeSpan &duration, const winrt::Compositor &compositor)
static winrt::CompositionAnimation | MakeFloatAnimation (float fromValue, float toValue, const winrt::TimeSpan &duration, const winrt::CompositionEasingFunction &easing, const winrt::Compositor &compositor)
static void | PlayCrossFadeAnimation (const winrt::CompositionBrush &brush, float acrylicStart, float acrylicEnd)

Private Attributes

friend | AcrylicTestApi
friend | MaterialHelper

Static Private Attributes

static constexpr float | sc_blurRadius = 30.0f
static constexpr float | sc_noiseOpacity = 0.02f
static constexpr float | sc_saturation = 1.25f

Detailed Description

Definition at line 22 of file AcrylicBrush.h.

Constructor & Destructor Documentation

AcrylicBrush ( )
virtual ~AcrylicBrush ( ) [virtual]

Member Function Documentation

void CancelFallbackAnimationCompleteWait ( ) [private]
void CoerceToZeroOneRange ( double & value )
void CoerceToZeroOneRange_Nullable ( winrt::IReference< double > & value )
static winrt::IGraphicsEffect CombineNoiseWithTintEffect_Luminosity | ( | const winrt::IGraphicsEffectSource & | blurredSource,
 |  | const winrt::Microsoft::UI::Private::Composition::Effects::ColorSourceEffect & | tintColorEffect,
 |  | const winrt::Color | initialLuminosityColor,
 |  | std::vector< winrt::hstring > & | animatedProperties |
 | ) |  |  | [static, private]
void CreateAcrylicBrush | ( | bool | useCrossFadeEffect,
 |  | bool | forceCreateAcrylicBrush = false |
 | ) |  |  | [private]
static winrt::CompositionEffectFactory CreateAcrylicBrushCompositionEffectFactory | ( | const winrt::Compositor & | compositor,
 |  | bool | shouldBrushBeOpaque,
 |  | bool | useCrossFadeEffect,
 |  | winrt::Color | initialTintColor,
 |  | winrt::Color | initialLuminosityColor,
 |  | winrt::Color | initialFallbackColor |
 | ) |  |  | [static, private]
static winrt::CompositionEffectBrush CreateAcrylicBrushWorker | ( | const winrt::Compositor & | compositor,
 |  | bool | useCrossFadeEffect,
 |  | winrt::Color | tintColor,
 |  | winrt::Color | luminosityColor,
 |  | winrt::Color | fallbackColor,
 |  | bool | shouldBrushBeOpaque,
 |  | bool | useCache = false |
 | ) |  |  | [static]
void CreateAnimation | ( | const winrt::CompositionBrush & | brush,
 |  | winrt::CompositionScopedBatch & | scopedBatch,
 |  | winrt::event_token & | token,
 |  | float | acrylicStart,
 |  | float | acrylicEnd,
 |  | const winrt::TypedEventHandler< winrt::IInspectable, winrt::CompositionBatchCompletedEventArgs > & | handler |
 | ) |  |  | [private]
void EnsureNoiseBrush ( ) [private]
winrt::Color GetEffectiveLuminosityColor ( ) [private]
winrt::Color GetEffectiveTintColor ( ) [private]
static winrt::CompositionEffectFactory GetOrCreateAcrylicBrushCompositionEffectFactory | ( | const winrt::Compositor & | compositor,
 |  | bool | shouldBrushBeOpaque,
 |  | bool | useCrossFadeEffect,
 |  | winrt::Color | initialTintColor,
 |  | winrt::Color | initialLuminosityColor,
 |  | winrt::Color | initialFallbackColor,
 |  | bool | useCache |
 | ) |  |  | [static, private]
bool IsInFallbackMode ( ) [inline, private]

Definition at line 122 of file AcrylicBrush.h.

{ return !m_isUsingAcrylicBrush; }

static winrt::CompositionAnimation MakeColorAnimation | ( | const winrt::Color & | color,
 |  | const winrt::TimeSpan & | duration,
 |  | const winrt::Compositor & | compositor |
 | ) |  |  | [static, private]
static winrt::CompositionAnimation MakeFloatAnimation | ( | float | fromValue,
 |  | float | toValue,
 |  | const winrt::TimeSpan & | duration,
 |  | const winrt::CompositionEasingFunction & | easing,
 |  | const winrt::Compositor & | compositor |
 | ) |  |  | [static, private]
void OnConnected ( )
void OnDisconnected ( )
void OnFallbackColorChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnMaterialPolicyStatusChanged | ( | const com_ptr< MaterialHelperBase > & | sender,
 |  | bool | isDisabledByMaterialPolicy
 | ) |  |
void OnNoiseChanged ( const com_ptr< MaterialHelperBase > & sender )
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
static void PlayCrossFadeAnimation | ( | const winrt::CompositionBrush & | brush,
 |  | float | acrylicStart,
 |  | float | acrylicEnd |
 | ) |  |  | [static, private]
void PolicyStatusChangedHelper ( bool isDisabledByMaterialPolicy ) [private]
void UpdateAcrylicBrush ( ) [private]
void UpdateAcrylicStatus ( ) [private]

Member Data Documentation

friend AcrylicTestApi [private]

Definition at line 26 of file AcrylicBrush.h.

friend MaterialHelper [private]

Definition at line 27 of file AcrylicBrush.h.

constexpr float sc_blurRadius = 30.0f [static, private]

Definition at line 64 of file AcrylicBrush.h.

constexpr float sc_noiseOpacity = 0.02f [static, private]

Definition at line 65 of file AcrylicBrush.h.

constexpr float sc_saturation = 1.25f [static, private]

Definition at line 67 of file AcrylicBrush.h.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/AcrylicBrush.h
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

AcrylicBrushFactory Class Reference

#include "AcrylicBrushFactory.h"

List of all members.

Public Member Functions

AcrylicBrushFactory ()

Detailed Description

Definition at line 8 of file AcrylicBrushFactory.h.

Constructor & Destructor Documentation

AcrylicBrushFactory ( )

Definition at line 8 of file AcrylicBrushFactory.cpp.

{
    AcrylicBrush::EnsureProperties();
}

The documentation for this class was generated from the following files:
  • Materials/Acrylic/AcrylicBrushFactory.h
  • Materials/Acrylic/AcrylicBrushFactory.cpp
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

AcrylicBrushProperties Class Reference

#include "AcrylicBrush.properties.h"

Inherited by AcrylicBrush.

List of all members.

Public Member Functions

AcrylicBrushProperties ()
void | AlwaysUseFallback (bool value)
bool | AlwaysUseFallback ()
void | TintColor (winrt::Color const &value)
winrt::Color | TintColor ()
winrt::IReference< double > | TintLuminosityOpacity ()
void | TintLuminosityOpacity (winrt::IReference< double > const &value)
double | TintOpacity ()
void | TintOpacity (double value)
void | TintTransitionDuration (winrt::TimeSpan const &value)
winrt::TimeSpan | TintTransitionDuration ()

Static Public Member Functions

static winrt::DependencyProperty | AlwaysUseFallbackProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static void | OnAlwaysUseFallbackPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTintColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTintLuminosityOpacityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTintOpacityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTintTransitionDurationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TintColorProperty ()
static winrt::DependencyProperty | TintLuminosityOpacityProperty ()
static winrt::DependencyProperty | TintOpacityProperty ()
static winrt::DependencyProperty | TintTransitionDurationProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_AlwaysUseFallbackProperty
static GlobalDependencyProperty | s_TintColorProperty
static GlobalDependencyProperty | s_TintLuminosityOpacityProperty
static GlobalDependencyProperty | s_TintOpacityProperty
static GlobalDependencyProperty | s_TintTransitionDurationProperty

Detailed Description

Definition at line 7 of file AcrylicBrush.properties.h.

Constructor & Destructor Documentation

AcrylicBrushProperties ( )

Definition at line 15 of file AcrylicBrush.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void AlwaysUseFallback ( bool value )

Definition at line 148 of file AcrylicBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AcrylicBrush*>(this)->SetValue(s_AlwaysUseFallbackProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool AlwaysUseFallback ( )

Definition at line 156 of file AcrylicBrush.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<AcrylicBrush*>(this)->GetValue(s_AlwaysUseFallbackProperty));
}

static winrt::DependencyProperty AlwaysUseFallbackProperty ( ) [inline, static]

Definition at line 27 of file AcrylicBrush.properties.h.

{ return s_AlwaysUseFallbackProperty; }

void ClearProperties ( ) [static]

Definition at line 79 of file AcrylicBrush.properties.cpp.

{
    s_AlwaysUseFallbackProperty = nullptr;
    s_TintColorProperty = nullptr;
    s_TintLuminosityOpacityProperty = nullptr;
    s_TintOpacityProperty = nullptr;
    s_TintTransitionDurationProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 20 of file AcrylicBrush.properties.cpp.

{
    if (!s_AlwaysUseFallbackProperty)
    {
        s_AlwaysUseFallbackProperty =
            InitializeDependencyProperty(
                L"AlwaysUseFallback",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::AcrylicBrush>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnAlwaysUseFallbackPropertyChanged));
    }
    if (!s_TintColorProperty)
    {
        s_TintColorProperty =
            InitializeDependencyProperty(
                L"TintColor",
                winrt::name_of<winrt::Color>(),
                winrt::name_of<winrt::AcrylicBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::Color>::BoxValueIfNecessary(AcrylicBrush::sc_defaultTintColor),
                winrt::PropertyChangedCallback(&OnTintColorPropertyChanged));
    }
    if (!s_TintLuminosityOpacityProperty)
    {
        s_TintLuminosityOpacityProperty =
            InitializeDependencyProperty(
                L"TintLuminosityOpacity",
                winrt::name_of<winrt::IReference<double>>(),
                winrt::name_of<winrt::AcrylicBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::IReference<double>>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnTintLuminosityOpacityPropertyChanged));
    }
    if (!s_TintOpacityProperty)
    {
        s_TintOpacityProperty =
            InitializeDependencyProperty(
                L"TintOpacity",
                winrt::name_of<double>(),
                winrt::name_of<winrt::AcrylicBrush>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(AcrylicBrush::sc_defaultTintOpacity),
                winrt::PropertyChangedCallback(&OnTintOpacityPropertyChanged));
    }
    if (!s_TintTransitionDurationProperty)
    {
        s_TintTransitionDurationProperty =
            InitializeDependencyProperty(
                L"TintTransitionDuration",
                winrt::name_of<winrt::TimeSpan>(),
                winrt::name_of<winrt::AcrylicBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::TimeSpan>::BoxValueIfNecessary(AcrylicBrush::sc_defaultTintTransitionDuration),
                winrt::PropertyChangedCallback(&OnTintTransitionDurationPropertyChanged));
    }
}

void OnAlwaysUseFallbackPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 88 of file AcrylicBrush.properties.cpp.

{
    auto owner = sender.as<winrt::AcrylicBrush>();
    winrt::get_self<AcrylicBrush>(owner)->OnPropertyChanged(args);
}

void OnTintColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 96 of file AcrylicBrush.properties.cpp.

{
    auto owner = sender.as<winrt::AcrylicBrush>();
    winrt::get_self<AcrylicBrush>(owner)->OnPropertyChanged(args);
}

void OnTintLuminosityOpacityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 104 of file AcrylicBrush.properties.cpp.

{
    auto owner = sender.as<winrt::AcrylicBrush>();

    auto value = winrt::unbox_value<winrt::IReference<double>>(args.NewValue());
    auto coercedValue = value;
    winrt::get_self<AcrylicBrush>(owner)->CoerceToZeroOneRange_Nullable(coercedValue);
    if (value != coercedValue)
    {
        sender.SetValue(args.Property(), winrt::box_value<winrt::IReference<double>>(coercedValue));
        return;
    }

    winrt::get_self<AcrylicBrush>(owner)->OnPropertyChanged(args);
}

void OnTintOpacityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 122 of file AcrylicBrush.properties.cpp.

{
    auto owner = sender.as<winrt::AcrylicBrush>();

    auto value = winrt::unbox_value<double>(args.NewValue());
    auto coercedValue = value;
    winrt::get_self<AcrylicBrush>(owner)->CoerceToZeroOneRange(coercedValue);
    if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
    {
        sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
        return;
    }

    winrt::get_self<AcrylicBrush>(owner)->OnPropertyChanged(args);
}

void OnTintTransitionDurationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 140 of file AcrylicBrush.properties.cpp.

{
    auto owner = sender.as<winrt::AcrylicBrush>();
    winrt::get_self<AcrylicBrush>(owner)->OnPropertyChanged(args);
}

winrt::Color TintColor ( )

Definition at line 169 of file AcrylicBrush.properties.cpp.

{
    return ValueHelper<winrt::Color>::CastOrUnbox(static_cast<AcrylicBrush*>(this)->GetValue(s_TintColorProperty));
}

void TintColor ( winrt::Color const & value )

Definition at line 161 of file AcrylicBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AcrylicBrush*>(this)->SetValue(s_TintColorProperty, ValueHelper<winrt::Color>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TintColorProperty ( ) [inline, static]

Definition at line 28 of file AcrylicBrush.properties.h.

{ return s_TintColorProperty; }

void TintLuminosityOpacity ( winrt::IReference< double > const & value )

Definition at line 174 of file AcrylicBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    winrt::IReference<double> coercedValue = value;
    static_cast<AcrylicBrush*>(this)->CoerceToZeroOneRange_Nullable(coercedValue);
    static_cast<AcrylicBrush*>(this)->SetValue(s_TintLuminosityOpacityProperty, ValueHelper<winrt::IReference<double>>::BoxValueIfNecessary(coercedValue));
    }
}

winrt::IReference< double > TintLuminosityOpacity ( )

Definition at line 184 of file AcrylicBrush.properties.cpp.

{
    return ValueHelper<winrt::IReference<double>>::CastOrUnbox(static_cast<AcrylicBrush*>(this)->GetValue(s_TintLuminosityOpacityProperty));
}

static winrt::DependencyProperty TintLuminosityOpacityProperty ( ) [inline, static]

Definition at line 29 of file AcrylicBrush.properties.h.

{ return s_TintLuminosityOpacityProperty; }

double TintOpacity ( )

Definition at line 199 of file AcrylicBrush.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<AcrylicBrush*>(this)->GetValue(s_TintOpacityProperty));
}

void TintOpacity ( double value )

Definition at line 189 of file AcrylicBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    double coercedValue = value;
    static_cast<AcrylicBrush*>(this)->CoerceToZeroOneRange(coercedValue);
    static_cast<AcrylicBrush*>(this)->SetValue(s_TintOpacityProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
    }
}

static winrt::DependencyProperty TintOpacityProperty ( ) [inline, static]

Definition at line 30 of file AcrylicBrush.properties.h.

{ return s_TintOpacityProperty; }

winrt::TimeSpan TintTransitionDuration ( )

Definition at line 212 of file AcrylicBrush.properties.cpp.

{
    return ValueHelper<winrt::TimeSpan>::CastOrUnbox(static_cast<AcrylicBrush*>(this)->GetValue(s_TintTransitionDurationProperty));
}

void TintTransitionDuration ( winrt::TimeSpan const & value )

Definition at line 204 of file AcrylicBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AcrylicBrush*>(this)->SetValue(s_TintTransitionDurationProperty, ValueHelper<winrt::TimeSpan>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TintTransitionDurationProperty ( ) [inline, static]

Definition at line 31 of file AcrylicBrush.properties.h.

{ return s_TintTransitionDurationProperty; }

Member Data Documentation

GlobalDependencyProperty s_AlwaysUseFallbackProperty [static]

Definition at line 33 of file AcrylicBrush.properties.h.

GlobalDependencyProperty s_TintColorProperty [static]

Definition at line 34 of file AcrylicBrush.properties.h.

GlobalDependencyProperty s_TintLuminosityOpacityProperty [static]

Definition at line 35 of file AcrylicBrush.properties.h.

GlobalDependencyProperty s_TintOpacityProperty [static]

Definition at line 36 of file AcrylicBrush.properties.h.

GlobalDependencyProperty s_TintTransitionDurationProperty [static]

Definition at line 37 of file AcrylicBrush.properties.h.

The documentation for this class was generated from the following files:
  • Generated/AcrylicBrush.properties.h
  • Generated/AcrylicBrush.properties.cpp
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicTestApi Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

AcrylicTestApi Class Reference

#include "AcrylicTestApi.h"

Inherits ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable >.

List of all members.

Public Member Functions

winrt::AcrylicBrush | AcrylicBrush ()
void | AcrylicBrush (winrt::AcrylicBrush const &value)
winrt::CompositionBrush | CompositionBrush ()
void | ForceCreateAcrylicBrush (bool useCrossFadeEffect)
bool | IsUsingAcrylicBrush ()
winrt::CompositionBrush | NoiseBrush ()

Detailed Description

Definition at line 8 of file AcrylicTestApi.h.

Member Function Documentation

winrt::AcrylicBrush AcrylicBrush ( )

Definition at line 11 of file AcrylicTestApi.cpp.

{
    return m_acrylicBrush;
}

void AcrylicBrush ( winrt::AcrylicBrush const & value )

Definition at line 16 of file AcrylicTestApi.cpp.

{
    m_acrylicBrush = value;
}

winrt::CompositionBrush CompositionBrush ( )

Definition at line 26 of file AcrylicTestApi.cpp.

{
    return (winrt::get_self<::AcrylicBrush>(m_acrylicBrush))->m_brush;
}

void ForceCreateAcrylicBrush ( bool useCrossFadeEffect )

Definition at line 36 of file AcrylicTestApi.cpp.

{
    auto acrylicBrush = winrt::get_self<::AcrylicBrush>(m_acrylicBrush);

    acrylicBrush->CreateAcrylicBrush(useCrossFadeEffect, true);
}

bool IsUsingAcrylicBrush ( )

Definition at line 21 of file AcrylicTestApi.cpp.

{
    return winrt::get_self<::AcrylicBrush>(m_acrylicBrush)->m_isUsingAcrylicBrush;
}

winrt::CompositionBrush NoiseBrush ( )

Definition at line 31 of file AcrylicTestApi.cpp.

{
    return (winrt::get_self<::AcrylicBrush>(m_acrylicBrush))->m_noiseBrush;
}

The documentation for this class was generated from the following files:
  • Materials/Acrylic/AcrylicTestApi.h
  • Materials/Acrylic/AcrylicTestApi.cpp
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedAcceptVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedAcceptVisualSource Class Reference

#include "AnimatedAcceptVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 77 of file AnimatedAcceptVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
TimeSpan Duration ( )

Definition at line 1930 of file AnimatedAcceptVisualSource.cpp.

{
    return TimeSpan{ 26666666L };
}

winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
Color Foreground ( ) [inline]

Definition at line 1882 of file AnimatedAcceptVisualSource.cpp.

{
    return _themeForeground;
}

double FrameCount ( )

Definition at line 1920 of file AnimatedAcceptVisualSource.cpp.

{
    return 160.0;
}

double Framerate ( )

Definition at line 1925 of file AnimatedAcceptVisualSource.cpp.

{
    return 60.0;
}

double FrameToProgress ( double frameNumber )

Definition at line 1935 of file AnimatedAcceptVisualSource.cpp.

{
    return frameNumber / 160.0;
}

winrt::Windows::Foundation::Collections::IMapView< hstring, double > Markers ( )

Definition at line 1940 of file AnimatedAcceptVisualSource.cpp.

{
    return winrt::single_threaded_map<winrt::hstring, double>(
        std::map<winrt::hstring, double>
        {
            { L"NormalOnToNormalOff_Start", 0.0 },
            { L"NormalOnToNormalOff_End", 0.0253125 },
            { L"NormalOnToPointerOverOn_Start", 0.0315625 },
            { L"NormalOnToPointerOverOn_End", 0.0565625 },
            { L"NormalOnToPressedOn_Start", 0.0628125 },
            { L"NormalOnToPressedOn_End", 0.0878125 },
            { L"NormalOffToNormalOn_Start", 0.0940625 },
            { L"NormalOffToNormalOn_End", 0.2128125 },
            { L"NormalOffToPointerOverOff_Start", 0.2190625 },
            { L"NormalOffToPointerOverOff_End", 0.2440625 },
            { L"NormalOffToPressedOff_Start", 0.2503125 },
            { L"NormalOffToPressedOff_End", 0.2753125 },
            { L"PointerOverOnToPointerOverOff_Start", 0.2815625 },
            { L"PointerOverOnToPointerOverOff_End", 0.3065625 },
            { L"PointerOverOnToNormalOn_Start", 0.3128125 },
            { L"PointerOverOnToNormalOn_End", 0.3378125 },
            { L"PointerOverOnToPressedOn_Start", 0.3440625 },
            { L"PointerOverOnToPressedOn_End", 0.3690625 },
            { L"PointerOverOffToPointerOverOn_Start", 0.3753125 },
            { L"PointerOverOffToPointerOverOn_End", 0.4940625 },
            { L"PointerOverOffToNormalOff_Start", 0.5003125 },
            { L"PointerOverOffToNormalOff_End", 0.5253125 },
            { L"PointerOverOffToPressedOff_Start", 0.5315625 },
            { L"PointerOverOffToPressedOff_End", 0.5565625 },
            { L"PressedOnToPressedOff_Start", 0.5628125 },
            { L"PressedOnToPressedOff_End", 0.5878125 },
            { L"PressedOnToPointerOverOff_Start", 0.5940625 },
            { L"PressedOnToPointerOverOff_End", 0.6190625 },
            { L"PressedOnToNormalOff_Start", 0.6253125 },
            { L"PressedOnToNormalOff_End", 0.6503125 },
            { L"PressedOffToPressedOn_Start", 0.6565625 },
            { L"PressedOffToPressedOn_End", 0.7128125 },
            { L"PressedOffToPointerOverOn_Start", 0.7190625 },
            { L"PressedOffToPointerOverOn_End", 0.8378125 },
            { L"PressedOffToNormalOn_Start", 0.8440625 },
            { L"PressedOffToNormalOn_End", 0.9628125 },
            { L"NormalIndeterminate", 0.9690625 },
            { L"PointerOverIndeterminate", 0.9815625 },
            { L"PressedIndeterminate", 0.9940625 },
        }
    ).GetView();
}

void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |

Definition at line 2005 of file AnimatedAcceptVisualSource.cpp.

{
}

winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.h
  • AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedAcceptVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedAcceptVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedAcceptVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
ContainerVisual | ContainerVisual_00 ()
ContainerVisual | ContainerVisual_01 ()
ContainerVisual | ContainerVisual_02 ()
ContainerVisual | ContainerVisual_03 ()
ContainerVisual | ContainerVisual_04 ()
ContainerVisual | ContainerVisual_05 ()
ContainerVisual | ContainerVisual_06 ()
ContainerVisual | ContainerVisual_07 ()
ContainerVisual | ContainerVisual_08 ()
ContainerVisual | ContainerVisual_09 ()
ContainerVisual | ContainerVisual_10 ()
ContainerVisual | ContainerVisual_11 ()
ContainerVisual | ContainerVisual_12 ()
ContainerVisual | ContainerVisual_13 ()
ContainerVisual | ContainerVisual_14 ()
ContainerVisual | ContainerVisual_15 ()
ContainerVisual | ContainerVisual_16 ()
ContainerVisual | ContainerVisual_17 ()
ContainerVisual | ContainerVisual_18 ()
ContainerVisual | ContainerVisual_19 ()
ContainerVisual | ContainerVisual_20 ()
ContainerVisual | ContainerVisual_21 ()
ContainerVisual | ContainerVisual_22 ()
ContainerVisual | ContainerVisual_23 ()
ContainerVisual | ContainerVisual_24 ()
ContainerVisual | ContainerVisual_25 ()
ContainerVisual | ContainerVisual_26 ()
ContainerVisual | ContainerVisual_27 ()
ContainerVisual | ContainerVisual_28 ()
ContainerVisual | ContainerVisual_29 ()
ContainerVisual | ContainerVisual_30 ()
ContainerVisual | ContainerVisual_31 ()
ContainerVisual | ContainerVisual_32 ()
ContainerVisual | ContainerVisual_33 ()
ContainerVisual | ContainerVisual_34 ()
ContainerVisual | ContainerVisual_35 ()
ContainerVisual | ContainerVisual_36 ()
ContainerVisual | ContainerVisual_37 ()
ContainerVisual | ContainerVisual_38 ()
ContainerVisual | ContainerVisual_39 ()
ContainerVisual | ContainerVisual_40 ()
ContainerVisual | ContainerVisual_41 ()
BooleanKeyFrameAnimation | CreateBooleanKeyFrameAnimation (float initialProgress, bool initialValue)
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, winrt::float3x2 transformMatrix)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
winrt::com_ptr< CanvasGeometry > | Geometry_0 ()
winrt::com_ptr< CanvasGeometry > | Geometry_1 ()
winrt::com_ptr< CanvasGeometry > | Geometry_2 ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_00 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_01 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_02 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_03 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_04 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_05 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_06 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_07 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_08 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_09 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_10 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_11 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_12 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_13 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_14 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_15 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_16 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_17 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_18 ()
CompositionPath | Path ()
CompositionPathGeometry | PathGeometry_00 ()
CompositionPathGeometry | PathGeometry_01 ()
CompositionPathGeometry | PathGeometry_02 ()
CompositionPathGeometry | PathGeometry_03 ()
CompositionPathGeometry | PathGeometry_04 ()
CompositionPathGeometry | PathGeometry_05 ()
CompositionPathGeometry | PathGeometry_06 ()
CompositionPathGeometry | PathGeometry_07 ()
CompositionPathGeometry | PathGeometry_08 ()
CompositionPathGeometry | PathGeometry_09 ()
CompositionPathGeometry | PathGeometry_10 ()
CompositionPathGeometry | PathGeometry_11 ()
CompositionPathGeometry | PathGeometry_12 ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ShapeVisual | ShapeVisual_00 ()
ShapeVisual | ShapeVisual_01 ()
ShapeVisual | ShapeVisual_02 ()
ShapeVisual | ShapeVisual_03 ()
ShapeVisual | ShapeVisual_04 ()
ShapeVisual | ShapeVisual_05 ()
ShapeVisual | ShapeVisual_06 ()
ShapeVisual | ShapeVisual_07 ()
ShapeVisual | ShapeVisual_08 ()
ShapeVisual | ShapeVisual_09 ()
ShapeVisual | ShapeVisual_10 ()
ShapeVisual | ShapeVisual_11 ()
ShapeVisual | ShapeVisual_12 ()
ShapeVisual | ShapeVisual_13 ()
ShapeVisual | ShapeVisual_14 ()
CompositionSpriteShape | SpriteShape_00 ()
CompositionSpriteShape | SpriteShape_01 ()
CompositionSpriteShape | SpriteShape_02 ()
CompositionSpriteShape | SpriteShape_03 ()
CompositionSpriteShape | SpriteShape_04 ()
CompositionSpriteShape | SpriteShape_05 ()
CompositionSpriteShape | SpriteShape_06 ()
CompositionSpriteShape | SpriteShape_07 ()
CompositionSpriteShape | SpriteShape_08 ()
CompositionSpriteShape | SpriteShape_09 ()
CompositionSpriteShape | SpriteShape_10 ()
CompositionSpriteShape | SpriteShape_11 ()
CompositionSpriteShape | SpriteShape_12 ()
CompositionSpriteShape | SpriteShape_13 ()
CompositionSpriteShape | SpriteShape_14 ()
StepEasingFunction | StepThenHoldEasingFunction ()
CompositionColorBrush | ThemeColor_Foreground ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_1_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_1_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_1_2 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_1_3 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_1_4 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0_to_1_0 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0_to_1_1 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0_to_1_2 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0_to_1_3 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0_to_1_4 ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 100 of file AnimatedAcceptVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedAcceptVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 1826 of file AnimatedAcceptVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 1831 of file AnimatedAcceptVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 132 of file AnimatedAcceptVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 1820 of file AnimatedAcceptVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 1837 of file AnimatedAcceptVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

ContainerVisual ContainerVisual_00 ( ) [inline, private]

Definition at line 828 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_01());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_00(), RootProgress());
        return result;
    }

ContainerVisual ContainerVisual_01 ( ) [inline, private]

Definition at line 842 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_00());
        return result;
    }

ContainerVisual ContainerVisual_02 ( ) [inline, private]

Definition at line 855 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_03());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_01(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_03 ( ) [inline, private]

Definition at line 870 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_01());
        return result;
    }

ContainerVisual ContainerVisual_04 ( ) [inline, private]

Definition at line 883 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_05());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_02(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_05 ( ) [inline, private]

Definition at line 898 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_02());
        return result;
    }

ContainerVisual ContainerVisual_06 ( ) [inline, private]

Definition at line 911 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_07());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_03(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_07 ( ) [inline, private]

Definition at line 926 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 2
        result.Children().InsertAtTop(ShapeVisual_03());
        return result;
    }

ContainerVisual ContainerVisual_08 ( ) [inline, private]

Definition at line 939 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_09());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_04(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_09 ( ) [inline, private]

Definition at line 954 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_04());
        return result;
    }

ContainerVisual ContainerVisual_10 ( ) [inline, private]

Definition at line 967 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_11());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_05(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_11 ( ) [inline, private]

Definition at line 982 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_05());
        return result;
    }

ContainerVisual ContainerVisual_12 ( ) [inline, private]

Definition at line 995 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_13());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_06(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_13 ( ) [inline, private]

Definition at line 1010 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_06());
        return result;
    }

ContainerVisual ContainerVisual_14 ( ) [inline, private]

Definition at line 1023 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_15());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_07(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_15 ( ) [inline, private]

Definition at line 1038 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        result.Children().InsertAtTop(ContainerVisual_16());
        return result;
    }

ContainerVisual ContainerVisual_16 ( ) [inline, private]

Definition at line 1051 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        return result;
    }

ContainerVisual ContainerVisual_17 ( ) [inline, private]

Definition at line 1060 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_18());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_08(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_18 ( ) [inline, private]

Definition at line 1075 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        result.Children().InsertAtTop(ContainerVisual_19());
        return result;
    }

ContainerVisual ContainerVisual_19 ( ) [inline, private]

Definition at line 1088 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        return result;
    }

ContainerVisual ContainerVisual_20 ( ) [inline, private]

Definition at line 1097 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_21());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_09(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_21 ( ) [inline, private]

Definition at line 1112 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_07());
        return result;
    }

ContainerVisual ContainerVisual_22 ( ) [inline, private]

Definition at line 1125 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_23());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_10(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_23 ( ) [inline, private]

Definition at line 1140 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_08());
        return result;
    }

ContainerVisual ContainerVisual_24 ( ) [inline, private]

Definition at line 1153 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_25());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_11(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_25 ( ) [inline, private]

Definition at line 1168 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_09());
        return result;
    }

ContainerVisual ContainerVisual_26 ( ) [inline, private]

Definition at line 1181 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_27());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_12(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_27 ( ) [inline, private]

Definition at line 1196 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_10());
        return result;
    }

ContainerVisual ContainerVisual_28 ( ) [inline, private]

Definition at line 1209 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_29());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_13(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_29 ( ) [inline, private]

Definition at line 1224 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        result.Children().InsertAtTop(ContainerVisual_30());
        return result;
    }

ContainerVisual ContainerVisual_30 ( ) [inline, private]

Definition at line 1237 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        return result;
    }

ContainerVisual ContainerVisual_31 ( ) [inline, private]

Definition at line 1246 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_32());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_14(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_32 ( ) [inline, private]

Definition at line 1261 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        result.Children().InsertAtTop(ContainerVisual_33());
        return result;
    }

ContainerVisual ContainerVisual_33 ( ) [inline, private]

Definition at line 1274 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        return result;
    }

ContainerVisual ContainerVisual_34 ( ) [inline, private]

Definition at line 1283 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_35());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_15(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_35 ( ) [inline, private]

Definition at line 1298 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_11());
        return result;
    }

ContainerVisual ContainerVisual_36 ( ) [inline, private]

Definition at line 1311 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_37());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_16(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_37 ( ) [inline, private]

Definition at line 1326 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Check
        result.Children().InsertAtTop(ShapeVisual_12());
        return result;
    }

ContainerVisual ContainerVisual_38 ( ) [inline, private]

Definition at line 1339 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.IsVisible(false);
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_39());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_17(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_39 ( ) [inline, private]

Definition at line 1354 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Check
        result.Children().InsertAtTop(ShapeVisual_13());
        return result;
    }

ContainerVisual ContainerVisual_40 ( ) [inline, private]

Definition at line 1367 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        // Offset:<24, 24>, Scale:<1.05, 1.05>
        result.TransformMatrix({ 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 1.04999995F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 24.0F, 24.0F, 0.0F, 1.0F });
        // Transforms for Null 230 Scale(1.05,1.05,0), Offset(24,24,0)
        result.Children().InsertAtTop(ContainerVisual_41());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_18(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_41 ( ) [inline, private]

Definition at line 1381 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Offset:<-24, -24>, Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -24.0F, -24.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Shape Layer 1
        result.Children().InsertAtTop(ShapeVisual_14());
        return result;
    }

BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation | ( | float | initialProgress,
 |  | bool | initialValue |
 | ) |  |  | [inline, private]

Definition at line 145 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateBooleanKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue);
        return result;
    }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 153 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateScalarKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | winrt::float3x2 | transformMatrix |
 | ) |  |  | [inline, private]

Definition at line 161 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(geometry);
        result.TransformMatrix(transformMatrix);
        return result;
    }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 1441 of file AnimatedAcceptVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.550000012F, 0.0F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 1446 of file AnimatedAcceptVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.833000004F, 0.833000004F });
    }

TimeSpan Duration ( ) const [inline]

Definition at line 1845 of file AnimatedAcceptVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

winrt::com_ptr<CanvasGeometry> Geometry_0 ( ) [inline, private]

Definition at line 358 of file AnimatedAcceptVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->BeginFigure({ -11.75F, -0.125F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 11.875F, -0.125F });
        sink->EndFigure(D2D1_FIGURE_END_OPEN);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_1 ( ) [inline, private]

Definition at line 372 of file AnimatedAcceptVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->BeginFigure({ -15.1719999F, 0.0160000008F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ -5.0F, 10.1879997F });
        sink->AddLine({ 15.3369999F, -10.3369999F });
        sink->EndFigure(D2D1_FIGURE_END_OPEN);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_2 ( ) [inline, private]

Definition at line 392 of file AnimatedAcceptVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->BeginFigure({ -15.1719999F, 0.0160000008F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ -5.0F, 10.1879997F });
        sink->AddLine({ 15.3369999F, -10.2810001F });
        sink->EndFigure(D2D1_FIGURE_END_OPEN);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 1806 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 1458 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _insetClip_0 = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 1860 of file AnimatedAcceptVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_00 ( ) [inline, private]

Definition at line 169 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 155.
        const auto result = CreateBooleanKeyFrameAnimation(0.96875F, true);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_01 ( ) [inline, private]

Definition at line 177 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 135.
        const auto result = CreateBooleanKeyFrameAnimation(0.84375F, true);
        // Frame 155.
        result.InsertKeyFrame(0.96875F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_02 ( ) [inline, private]

Definition at line 187 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 115.
        const auto result = CreateBooleanKeyFrameAnimation(0.71875F, true);
        // Frame 135.
        result.InsertKeyFrame(0.84375F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_03 ( ) [inline, private]

Definition at line 197 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 105.
        const auto result = CreateBooleanKeyFrameAnimation(0.65625F, true);
        // Frame 115.
        result.InsertKeyFrame(0.71875F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_04 ( ) [inline, private]

Definition at line 207 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 100.
        const auto result = CreateBooleanKeyFrameAnimation(0.625F, true);
        // Frame 105.
        result.InsertKeyFrame(0.65625F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_05 ( ) [inline, private]

Definition at line 217 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 95.
        const auto result = CreateBooleanKeyFrameAnimation(0.59375F, true);
        // Frame 100.
        result.InsertKeyFrame(0.625F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_06 ( ) [inline, private]

Definition at line 227 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 90.
        const auto result = CreateBooleanKeyFrameAnimation(0.5625F, true);
        // Frame 95.
        result.InsertKeyFrame(0.59375F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_07 ( ) [inline, private]

Definition at line 237 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 85.
        const auto result = CreateBooleanKeyFrameAnimation(0.53125F, true);
        // Frame 90.
        result.InsertKeyFrame(0.5625F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_08 ( ) [inline, private]

Definition at line 247 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 80.
        const auto result = CreateBooleanKeyFrameAnimation(0.5F, true);
        // Frame 85.
        result.InsertKeyFrame(0.53125F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_09 ( ) [inline, private]

Definition at line 257 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 60.
        const auto result = CreateBooleanKeyFrameAnimation(0.375F, true);
        // Frame 80.
        result.InsertKeyFrame(0.5F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_10 ( ) [inline, private]

Definition at line 267 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 55.
        const auto result = CreateBooleanKeyFrameAnimation(0.34375F, true);
        // Frame 60.
        result.InsertKeyFrame(0.375F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_11 ( ) [inline, private]

Definition at line 277 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 50.
        const auto result = CreateBooleanKeyFrameAnimation(0.3125F, true);
        // Frame 55.
        result.InsertKeyFrame(0.34375F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_12 ( ) [inline, private]

Definition at line 287 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 45.
        const auto result = CreateBooleanKeyFrameAnimation(0.28125F, true);
        // Frame 50.
        result.InsertKeyFrame(0.3125F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_13 ( ) [inline, private]

Definition at line 297 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 40.
        const auto result = CreateBooleanKeyFrameAnimation(0.25F, true);
        // Frame 45.
        result.InsertKeyFrame(0.28125F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_14 ( ) [inline, private]

Definition at line 307 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 35.
        const auto result = CreateBooleanKeyFrameAnimation(0.21875F, true);
        // Frame 40.
        result.InsertKeyFrame(0.25F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_15 ( ) [inline, private]

Definition at line 317 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 15.
        const auto result = CreateBooleanKeyFrameAnimation(0.09375F, true);
        // Frame 35.
        result.InsertKeyFrame(0.21875F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_16 ( ) [inline, private]

Definition at line 327 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 10.
        const auto result = CreateBooleanKeyFrameAnimation(0.0625F, true);
        // Frame 15.
        result.InsertKeyFrame(0.09375F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_17 ( ) [inline, private]

Definition at line 337 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 5.
        const auto result = CreateBooleanKeyFrameAnimation(0.03125F, true);
        // Frame 10.
        result.InsertKeyFrame(0.0625F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_18 ( ) [inline, private]

Definition at line 347 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 5.
        const auto result = CreateBooleanKeyFrameAnimation(0.03125F, false);
        return result;
    }

CompositionPath Path ( ) [inline, private]

Definition at line 415 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _path = CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_1()));
        return result;
    }

CompositionPathGeometry PathGeometry_00 ( ) [inline, private]

Definition at line 425 of file AnimatedAcceptVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_0())));
    }

CompositionPathGeometry PathGeometry_01 ( ) [inline, private]

Definition at line 434 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(Path());
        StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_1_0(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_02 ( ) [inline, private]

Definition at line 445 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_1_1(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_03 ( ) [inline, private]

Definition at line 456 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_1_2(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_04 ( ) [inline, private]

Definition at line 467 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimStart", TrimStartScalarAnimation_0_to_1_0(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_05 ( ) [inline, private]

Definition at line 478 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimStart", TrimStartScalarAnimation_0_to_1_1(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_06 ( ) [inline, private]

Definition at line 489 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimStart", TrimStartScalarAnimation_0_to_1_2(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_07 ( ) [inline, private]

Definition at line 501 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_1_3(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_08 ( ) [inline, private]

Definition at line 512 of file AnimatedAcceptVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_2())));
    }

CompositionPathGeometry PathGeometry_09 ( ) [inline, private]

Definition at line 517 of file AnimatedAcceptVisualSource.cpp.

    {
        return _pathGeometry_09 = _c.CreatePathGeometry(_path);
    }

CompositionPathGeometry PathGeometry_10 ( ) [inline, private]

Definition at line 527 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimStart", TrimStartScalarAnimation_0_to_1_3(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_11 ( ) [inline, private]

Definition at line 538 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_1_4(), _rootProgress);
        return result;
    }

CompositionPathGeometry PathGeometry_12 ( ) [inline, private]

Definition at line 549 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreatePathGeometry(_path);
        StartProgressBoundAnimation(result, L"TrimStart", TrimStartScalarAnimation_0_to_1_4(), _rootProgress);
        return result;
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 1394 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        const auto children = result.Children();
        // PreComp layer: Indeterminate State
        children.InsertAtTop(ContainerVisual_00());
        // PreComp layer: Controls - 01 - Check - 18 - PressedOffToNormalOn
        children.InsertAtTop(ContainerVisual_02());
        // PreComp layer: Controls - 01 - Check - 17 - PressedOffToPointerOverOn
        children.InsertAtTop(ContainerVisual_04());
        // PreComp layer: Controls - 01 - Check - 16 - PressedOffToPressedOn
        children.InsertAtTop(ContainerVisual_06());
        // PreComp layer: Controls - 01 - Check - 15 - PressedOnToNormalOff
        children.InsertAtTop(ContainerVisual_08());
        // PreComp layer: Controls - 01 - Check - 14 - PressedOnToPointerOverOff
        children.InsertAtTop(ContainerVisual_10());
        // PreComp layer: Controls - 01 - Check - 13 - PressedOnToPressedOff
        children.InsertAtTop(ContainerVisual_12());
        // PreComp layer: Controls - 01 - Check - 12 - PointerOverOffToPressedOff
        children.InsertAtTop(ContainerVisual_14());
        // PreComp layer: Controls - 01 - Check - 11 - PointerOverOffToNormalOff
        children.InsertAtTop(ContainerVisual_17());
        // PreComp layer: Controls - 01 - Check - 10 - PointerOverOffToPointerOverOn
        children.InsertAtTop(ContainerVisual_20());
        // PreComp layer: Controls - 01 - Check - 09 - PointerOverOnToPressedOn
        children.InsertAtTop(ContainerVisual_22());
        // PreComp layer: Controls - 01 - Check - 08 - PointerOverOnToNormalOn
        children.InsertAtTop(ContainerVisual_24());
        // PreComp layer: Controls - 01 - Check - 07 - PointerOverOnToPointerOverOff
        children.InsertAtTop(ContainerVisual_26());
        // PreComp layer: Controls - 01 - Check - 06 - NormalOffToPressedOff
        children.InsertAtTop(ContainerVisual_28());
        // PreComp layer: Controls - 01 - Check - 05 - NormalOffToPointerOverOff
        children.InsertAtTop(ContainerVisual_31());
        // PreComp layer: Controls - 01 - Check - 04 - NormalOffToNormalOn
        children.InsertAtTop(ContainerVisual_34());
        // PreComp layer: Controls - 01 - Check - 03 - NormalOnToPressedOn
        children.InsertAtTop(ContainerVisual_36());
        // PreComp layer: Controls - 01 - Check - 02 - NormalOnToPointerOverOn
        children.InsertAtTop(ContainerVisual_38());
        // PreComp layer: Controls - 01 - Check - 01 - NormalOnToNormalOff
        children.InsertAtTop(ContainerVisual_40());
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 1451 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 1850 of file AnimatedAcceptVisualSource.cpp.

    {
        return _root;
    }

ShapeVisual ShapeVisual_00 ( ) [inline, private]

Definition at line 1629 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 24>
        result.Shapes().Append(SpriteShape_00());
        return result;
    }

ShapeVisual ShapeVisual_01 ( ) [inline, private]

Definition at line 1641 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_01());
        return result;
    }

ShapeVisual ShapeVisual_02 ( ) [inline, private]

Definition at line 1653 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_02());
        return result;
    }

ShapeVisual ShapeVisual_03 ( ) [inline, private]

Definition at line 1665 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_03());
        return result;
    }

ShapeVisual ShapeVisual_04 ( ) [inline, private]

Definition at line 1677 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_04());
        return result;
    }

ShapeVisual ShapeVisual_05 ( ) [inline, private]

Definition at line 1689 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_05());
        return result;
    }

ShapeVisual ShapeVisual_06 ( ) [inline, private]

Definition at line 1701 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_06());
        return result;
    }

ShapeVisual ShapeVisual_07 ( ) [inline, private]

Definition at line 1713 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_07());
        return result;
    }

ShapeVisual ShapeVisual_08 ( ) [inline, private]

Definition at line 1725 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_08());
        return result;
    }

ShapeVisual ShapeVisual_09 ( ) [inline, private]

Definition at line 1737 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_09());
        return result;
    }

ShapeVisual ShapeVisual_10 ( ) [inline, private]

Definition at line 1749 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_10());
        return result;
    }

ShapeVisual ShapeVisual_11 ( ) [inline, private]

Definition at line 1761 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_11());
        return result;
    }

ShapeVisual ShapeVisual_12 ( ) [inline, private]

Definition at line 1773 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_12());
        return result;
    }

ShapeVisual ShapeVisual_13 ( ) [inline, private]

Definition at line 1785 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_13());
        return result;
    }

ShapeVisual ShapeVisual_14 ( ) [inline, private]

Definition at line 1797 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // Scale:0.7,0.7, Offset:<24, 23>
        result.Shapes().Append(SpriteShape_14());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 1855 of file AnimatedAcceptVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape_00 ( ) [inline, private]

Definition at line 560 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 24>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_00(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 24.0F });
        result.StrokeBrush(ThemeColor_Foreground());
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_01 ( ) [inline, private]

Definition at line 577 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_01(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_02 ( ) [inline, private]

Definition at line 595 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_02(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_03 ( ) [inline, private]

Definition at line 613 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_03(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_04 ( ) [inline, private]

Definition at line 631 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_04(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_05 ( ) [inline, private]

Definition at line 649 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_05(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_06 ( ) [inline, private]

Definition at line 667 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_06(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_07 ( ) [inline, private]

Definition at line 686 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_07(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_08 ( ) [inline, private]

Definition at line 704 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_08(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_09 ( ) [inline, private]

Definition at line 722 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_09(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_10 ( ) [inline, private]

Definition at line 741 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_10(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_11 ( ) [inline, private]

Definition at line 759 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_11(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_12 ( ) [inline, private]

Definition at line 777 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(_pathGeometry_09, { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_13 ( ) [inline, private]

Definition at line 795 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(_pathGeometry_09, { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

CompositionSpriteShape SpriteShape_14 ( ) [inline, private]

Definition at line 813 of file AnimatedAcceptVisualSource.cpp.

    {
        // Offset:<24, 23>, Scale:<0.7, 0.7>
        const auto result = CreateSpriteShape(PathGeometry_12(), { 0.699999988F, 0.0F, 0.0F, 0.699999988F, 24.0F, 23.0F });
        result.StrokeBrush(_themeColor_Foreground);
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        result.StrokeThickness(4.0F);
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 120 of file AnimatedAcceptVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 1813 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
        result.IsInitialStepSingleFrame(true);
        return result;
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 408 of file AnimatedAcceptVisualSource.cpp.

    {
        const auto result = _themeColor_Foreground = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1_0 ( ) [inline, private]

Definition at line 1469 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, StepThenHoldEasingFunction());
        // Frame 135.
        result.InsertKeyFrame(0.84375F, 0.0F, HoldThenStepEasingFunction());
        // Frame 154.
        result.InsertKeyFrame(0.962499976F, 1.0F, CubicBezierEasingFunction_0());
        return result;
    }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1_1 ( ) [inline, private]

Definition at line 1486 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 115.
        result.InsertKeyFrame(0.71875F, 0.0F, _holdThenStepEasingFunction);
        // Frame 134.
        result.InsertKeyFrame(0.837499976F, 1.0F, _cubicBezierEasingFunction_0);
        return result;
    }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1_2 ( ) [inline, private]

Definition at line 1502 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 105.
        result.InsertKeyFrame(0.65625F, 0.0F, _holdThenStepEasingFunction);
        // Frame 114.
        result.InsertKeyFrame(0.712499976F, 1.0F, _cubicBezierEasingFunction_0);
        return result;
    }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1_3 ( ) [inline, private]

Definition at line 1519 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 60.
        result.InsertKeyFrame(0.375F, 0.0F, _holdThenStepEasingFunction);
        // Frame 79.
        result.InsertKeyFrame(0.493750006F, 1.0F, _cubicBezierEasingFunction_0);
        return result;
    }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1_4 ( ) [inline, private]

Definition at line 1535 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 15.
        result.InsertKeyFrame(0.09375F, 0.0F, _holdThenStepEasingFunction);
        // Frame 34.
        result.InsertKeyFrame(0.212500006F, 1.0F, _cubicBezierEasingFunction_0);
        return result;
    }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_1_0 ( ) [inline, private]

Definition at line 1551 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 100.
        result.InsertKeyFrame(0.625F, 0.0F, _holdThenStepEasingFunction);
        // Frame 104.
        result.InsertKeyFrame(0.649999976F, 1.0F, CubicBezierEasingFunction_1());
        return result;
    }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_1_1 ( ) [inline, private]

Definition at line 1568 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 95.
        result.InsertKeyFrame(0.59375F, 0.0F, _holdThenStepEasingFunction);
        // Frame 99.
        result.InsertKeyFrame(0.618749976F, 1.0F, _cubicBezierEasingFunction_1);
        return result;
    }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_1_2 ( ) [inline, private]

Definition at line 1584 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 90.
        result.InsertKeyFrame(0.5625F, 0.0F, _holdThenStepEasingFunction);
        // Frame 94.
        result.InsertKeyFrame(0.587499976F, 1.0F, _cubicBezierEasingFunction_1);
        return result;
    }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_1_3 ( ) [inline, private]

Definition at line 1601 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 45.
        result.InsertKeyFrame(0.28125F, 0.0F, _holdThenStepEasingFunction);
        // Frame 49.
        result.InsertKeyFrame(0.306250006F, 1.0F, _cubicBezierEasingFunction_1);
        return result;
    }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_1_4 ( ) [inline, private]

Definition at line 1617 of file AnimatedAcceptVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _holdThenStepEasingFunction);
        // Frame 4.
        result.InsertKeyFrame(0.0250000004F, 1.0F, _cubicBezierEasingFunction_1);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedBackVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedBackVisualSource Class Reference

#include "AnimatedBackVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 51 of file AnimatedBackVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
TimeSpan Duration ( )

Definition at line 838 of file AnimatedBackVisualSource.cpp.

{
    return TimeSpan{ 13333333L };
}

winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
Color Foreground ( ) [inline]

Definition at line 790 of file AnimatedBackVisualSource.cpp.

{
    return _themeForeground;
}

double FrameCount ( )

Definition at line 828 of file AnimatedBackVisualSource.cpp.

{
    return 80.0;
}

double Framerate ( )

Definition at line 833 of file AnimatedBackVisualSource.cpp.

{
    return 60.0;
}

double FrameToProgress ( double frameNumber )

Definition at line 843 of file AnimatedBackVisualSource.cpp.

{
    return frameNumber / 80.0;
}

winrt::Windows::Foundation::Collections::IMapView< hstring, double > Markers ( )

Definition at line 848 of file AnimatedBackVisualSource.cpp.

{
    return winrt::single_threaded_map<winrt::hstring, double>(
        std::map<winrt::hstring, double>
        {
            { L"NormalToPointerOver_Start", 0.0 },
            { L"NormalToPointerOver_End", 0.113125 },
            { L"NormalToPressed_Start", 0.125625 },
            { L"NormalToPressed_End", 0.238125 },
            { L"PointerOverToNormal_Start", 0.250625 },
            { L"PointerOverToNormal_End", 0.363125 },
            { L"PointerOverToPressed_Start", 0.375625 },
            { L"PointerOverToPressed_End", 0.488125 },
            { L"PressedToNormal_Start", 0.500625 },
            { L"PressedToNormal_End", 0.738125 },
            { L"PressedToPointerOver_Start", 0.750625 },
            { L"PressedToPointerOver_End", 0.988125 },
        }
    ).GetView();
}

void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |

Definition at line 886 of file AnimatedBackVisualSource.cpp.

{
}

winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.h
  • AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedBackVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedBackVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedBackVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
CompositionContainerShape | ContainerShape ()
ContainerVisual | ContainerVisual_0 ()
ContainerVisual | ContainerVisual_1 ()
BooleanKeyFrameAnimation | CreateBooleanKeyFrameAnimation (float initialProgress, bool initialValue)
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_2 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_3 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_4 ()
winrt::com_ptr< CanvasGeometry > | Geometry_0 ()
winrt::com_ptr< CanvasGeometry > | Geometry_1 ()
winrt::com_ptr< CanvasGeometry > | Geometry_2 ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_1 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_0 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_1 ()
ScalarKeyFrameAnimation | OpacityScalarAnimation_1_to_1_0 ()
ScalarKeyFrameAnimation | OpacityScalarAnimation_1_to_1_1 ()
CompositionPathGeometry | PathGeometry_0 ()
CompositionPathGeometry | PathGeometry_1 ()
CompositionPathGeometry | PathGeometry_2 ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ScalarKeyFrameAnimation | ScaleXScalarAnimation_2p25_to_2p25 ()
ScalarKeyFrameAnimation | ScaleYScalarAnimation_2p25_to_2p25 ()
ShapeVisual | ShapeVisual_0 ()
ShapeVisual | ShapeVisual_1 ()
CompositionSpriteShape | SpriteShape_0 ()
CompositionSpriteShape | SpriteShape_1 ()
CompositionSpriteShape | SpriteShape_2 ()
CompositionSpriteShape | SpriteShape_3 ()
CompositionSpriteShape | SpriteShape_4 ()
CompositionSpriteShape | SpriteShape_5 ()
StepEasingFunction | StepThenHoldEasingFunction ()
ScalarKeyFrameAnimation | t0ScalarAnimation_0_to_1 ()
CompositionColorBrush | ThemeColor_Foreground ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 99 of file AnimatedBackVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedBackVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 734 of file AnimatedBackVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 739 of file AnimatedBackVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 135 of file AnimatedBackVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 728 of file AnimatedBackVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 745 of file AnimatedBackVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

CompositionContainerShape ContainerShape ( ) [inline, private]

Definition at line 278 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateContainerShape();
        const auto shapes = result.Shapes();
        // Transforms: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2 Scale:2.25,2.25
        shapes.Append(SpriteShape_0());
        // Transforms: Stem 2 Stem 2 Stem 2 Stem 2
        shapes.Append(SpriteShape_1());
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_0(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_0 ( ) [inline, private]

Definition at line 398 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.IsVisible(false);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
        // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
        // 03 - Back - 06 - PressedToPointerOver
        result.Children().InsertAtTop(ShapeVisual_0());
        StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_0(), _rootProgress);
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_0(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_1 ( ) [inline, private]

Definition at line 417 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Opacity for layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
        // Back - 03 - PointerOverToNormal
        result.Children().InsertAtTop(ShapeVisual_1());
        StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_1(), _rootProgress);
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_1(), _rootProgress);
        return result;
    }

BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation | ( | float | initialProgress,
 |  | bool | initialValue |
 | ) |  |  | [inline, private]

Definition at line 148 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateBooleanKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue);
        return result;
    }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 156 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateScalarKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | winrt::float3x2 | transformMatrix,
 |  | CompositionBrush | fillBrush |
 | ) |  |  | [inline, private]

Definition at line 172 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(geometry);
        result.TransformMatrix(transformMatrix);
        result.FillBrush(fillBrush);
        return result;
    }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | winrt::float2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 164 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateVector2KeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 451 of file AnimatedBackVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 456 of file AnimatedBackVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.550000012F, 0.0F }, { 0.75F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_2 ( ) [inline, private]

Definition at line 461 of file AnimatedBackVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_3 ( ) [inline, private]

Definition at line 466 of file AnimatedBackVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.0F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_4 ( ) [inline, private]

Definition at line 471 of file AnimatedBackVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_4 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.75F, 1.0F });
    }

TimeSpan Duration ( ) const [inline]

Definition at line 753 of file AnimatedBackVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

winrt::com_ptr<CanvasGeometry> Geometry_0 ( ) [inline, private]

Definition at line 199 of file AnimatedBackVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.5F, 0.499000013F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { 7.77600002F, 0.499000013F }, { 8.0F, 0.275000006F }, { 8.0F, -0.00100000005F } });
        sink->AddBezier({ { 8.0F, -0.27700001F }, { 7.77600002F, -0.500999987F }, { 7.5F, -0.500999987F } });
        sink->AddLine({ 7.5F, 0.499000013F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_1 ( ) [inline, private]

Definition at line 216 of file AnimatedBackVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -5.33400011F, 0.495000005F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 7.5F, 0.499000013F });
        sink->AddLine({ 7.5F, -0.500999987F });
        sink->AddLine({ -5.33099985F, -0.504999995F });
        sink->AddLine({ -5.33400011F, 0.495000005F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_2 ( ) [inline, private]

Definition at line 234 of file AnimatedBackVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -0.837000012F, 6.86800003F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { -0.633000016F, 7.0539999F }, { -0.317000002F, 7.03999996F }, { -0.130999997F, 6.83599997F } });
        sink->AddBezier({ { 0.0549999997F, 6.63199997F }, { 0.0410000011F, 6.31500006F }, { -0.163000003F, 6.12900019F } });
        sink->AddLine({ -6.33099985F, 0.499000013F });
        sink->AddLine({ -5.32800007F, 0.488999993F });
        sink->AddLine({ -5.32800007F, -0.510999978F });
        sink->AddLine({ -6.32800007F, -0.500999987F });
        sink->AddLine({ -0.163000003F, -6.12900019F });
        sink->AddBezier({ { 0.0410000011F, -6.31500006F }, { 0.0549999997F, -6.63199997F }, { -0.130999997F, -6.83599997F } });
        sink->AddBezier({ { -0.317000002F, -7.03999996F }, { -0.633000016F, -7.0539999F }, { -0.837000012F, -6.86800003F } });
        sink->AddLine({ -7.75299978F, -0.55400002F });
        sink->AddBezier({ { -7.89300013F, -0.425999999F }, { -7.97300005F, -0.257999986F }, { -7.99300003F, -0.0850000009F } });
        sink->AddBezier({ { -7.99800014F, -0.0579999983F }, { -8.0F, -0.0299999993F }, { -8.0F, -0.00100000005F } });
        sink->AddBezier({ { -8.0F, 0.0260000005F }, { -7.99800014F, 0.0520000011F }, { -7.99399996F, 0.0780000016F } });
        sink->AddBezier({ { -7.97599983F, 0.254000008F }, { -7.89499998F, 0.423999995F }, { -7.75299978F, 0.55400002F } });
        sink->AddLine({ -0.837000012F, 6.86800003F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 639 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 483 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _insetClip_0 = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 768 of file AnimatedBackVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_0 ( ) [inline, private]

Definition at line 183 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 10.
        const auto result = CreateBooleanKeyFrameAnimation(0.125F, true);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_1 ( ) [inline, private]

Definition at line 192 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 30.
        const auto result = CreateBooleanKeyFrameAnimation(0.375F, false);
        return result;
    }

Vector2KeyFrameAnimation OffsetVector2Animation_0 ( ) [inline, private]

Definition at line 661 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
        result.SetReferenceParameter(L"_", _root);
        // Frame 10.
        result.InsertKeyFrame(0.125F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, { 24.9379997F, 24.0F }, _cubicBezierEasingFunction_0);
        // Frame 30.
        result.InsertKeyFrame(0.375F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, { 24.9379997F, 24.0F }, _cubicBezierEasingFunction_0);
        // Frame 40.
        result.InsertKeyFrame(0.5F, { 24.9379997F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 50.
        result.InsertKeyFrame(0.625F, { 20.25F, 24.0F }, _cubicBezierEasingFunction_1);
        // Frame 59.
        result.InsertExpressionKeyFrame(0.737499952F, L"Pow(1-_.t0,3)*Vector2(20.25,24)+(3*Square(1-_.t0)*_.t0*Vector2(20.094,24))+(3*(1-_.t0)*Square(_.t0)*Vector2(23.375,24))+(Pow(_.t0,3)*Vector2(24,24))", _stepThenHoldEasingFunction);
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
        // Frame 60.
        result.InsertKeyFrame(0.75F, { 24.9379997F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 70.
        result.InsertKeyFrame(0.875F, { 20.25F, 24.0F }, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertExpressionKeyFrame(0.987499952F, L"Pow(1-_.t0,3)*Vector2(20.25,24)+(3*Square(1-_.t0)*_.t0*Vector2(20.094,24))+(3*(1-_.t0)*Square(_.t0)*Vector2(23.375,24))+(Pow(_.t0,3)*Vector2(24,24))", _stepThenHoldEasingFunction);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
        return result;
    }

Vector2KeyFrameAnimation OffsetVector2Animation_1 ( ) [inline, private]

Definition at line 701 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, { 33.0F, 24.0F }, _cubicBezierEasingFunction_0);
        // Frame 30.
        result.InsertKeyFrame(0.375F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, { 33.0F, 24.0F }, _cubicBezierEasingFunction_0);
        // Frame 40.
        result.InsertKeyFrame(0.5F, { 33.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 50.
        result.InsertKeyFrame(0.625F, { 19.9839993F, 24.0F }, CubicBezierEasingFunction_4());
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
        // Frame 60.
        result.InsertKeyFrame(0.75F, { 33.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 70.
        result.InsertKeyFrame(0.875F, { 19.9839993F, 24.0F }, _cubicBezierEasingFunction_4);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
        return result;
    }

ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_0 ( ) [inline, private]

Definition at line 493 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _stepThenHoldEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 1.0F, _holdThenStepEasingFunction);
        // Frame 20.
        result.InsertKeyFrame(0.25F, 0.0F, _holdThenStepEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.375F, 1.0F, _holdThenStepEasingFunction);
        return result;
    }

ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_1 ( ) [inline, private]

Definition at line 509 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 0.0F, _holdThenStepEasingFunction);
        // Frame 20.
        result.InsertKeyFrame(0.25F, 1.0F, _holdThenStepEasingFunction);
        return result;
    }

CompositionPathGeometry PathGeometry_0 ( ) [inline, private]

Definition at line 290 of file AnimatedBackVisualSource.cpp.

    {
        return _pathGeometry_0 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_0())));
    }

CompositionPathGeometry PathGeometry_1 ( ) [inline, private]

Definition at line 295 of file AnimatedBackVisualSource.cpp.

    {
        return _pathGeometry_1 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_1())));
    }

CompositionPathGeometry PathGeometry_2 ( ) [inline, private]

Definition at line 300 of file AnimatedBackVisualSource.cpp.

    {
        return _pathGeometry_2 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_2())));
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 433 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        propertySet.InsertScalar(L"t0", 0.0F);
        const auto children = result.Children();
        // PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
        // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
        // 03 - Back - 06 - PressedToPointerOver
        children.InsertAtTop(ContainerVisual_0());
        // PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 - Back
        // - 03 - PointerOverToNormal
        children.InsertAtTop(ContainerVisual_1());
        StartProgressBoundAnimation(propertySet, L"t0", t0ScalarAnimation_0_to_1(), _rootProgress);
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 476 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 758 of file AnimatedBackVisualSource.cpp.

    {
        return _root;
    }

ScalarKeyFrameAnimation ScaleXScalarAnimation_2p25_to_2p25 ( ) [inline, private]

Definition at line 529 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.25F, StepThenHoldEasingFunction());
        // Frame 10.
        result.InsertKeyFrame(0.125F, 2.25F, HoldThenStepEasingFunction());
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, 1.62211001F, CubicBezierEasingFunction_0());
        // Frame 30.
        result.InsertKeyFrame(0.375F, 2.25F, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, 1.62211001F, _cubicBezierEasingFunction_0);
        // Frame 40.
        result.InsertKeyFrame(0.5F, 1.62211001F, _holdThenStepEasingFunction);
        // Frame 50.
        result.InsertKeyFrame(0.625F, 2.26947999F, CubicBezierEasingFunction_1());
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, 2.25F, CubicBezierEasingFunction_2());
        // Frame 60.
        result.InsertKeyFrame(0.75F, 1.62211001F, _holdThenStepEasingFunction);
        // Frame 70.
        result.InsertKeyFrame(0.875F, 2.26947999F, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, 2.25F, _cubicBezierEasingFunction_2);
        return result;
    }

ScalarKeyFrameAnimation ScaleYScalarAnimation_2p25_to_2p25 ( ) [inline, private]

Definition at line 565 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.25F, _stepThenHoldEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 2.25F, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, 2.25F, CubicBezierEasingFunction_3());
        // Frame 30.
        result.InsertKeyFrame(0.375F, 2.25F, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, 2.25F, _cubicBezierEasingFunction_3);
        // Frame 40.
        result.InsertKeyFrame(0.5F, 2.25F, _holdThenStepEasingFunction);
        // Frame 50.
        result.InsertKeyFrame(0.625F, 2.25F, _cubicBezierEasingFunction_1);
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, 2.25F, _cubicBezierEasingFunction_2);
        // Frame 60.
        result.InsertKeyFrame(0.75F, 2.25F, _holdThenStepEasingFunction);
        // Frame 70.
        result.InsertKeyFrame(0.875F, 2.25F, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, 2.25F, _cubicBezierEasingFunction_2);
        return result;
    }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 610 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        const auto shapes = result.Shapes();
        // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
        shapes.Append(ContainerShape());
        // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
        shapes.Append(SpriteShape_2());
        return result;
    }

ShapeVisual ShapeVisual_1 ( ) [inline, private]

Definition at line 625 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        const auto shapes = result.Shapes();
        // Layer: Round Cap 2 Round Cap 2
        shapes.Append(SpriteShape_3());
        // Layer: Round Cap 2 Round Cap 2
        shapes.Append(SpriteShape_4());
        // Layer: Round Cap 2 Round Cap 2
        shapes.Append(SpriteShape_5());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 763 of file AnimatedBackVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape_0 ( ) [inline, private]

Definition at line 313 of file AnimatedBackVisualSource.cpp.

    {
        // Scale:<2.25, 2.25>
        const auto geometry = PathGeometry_0();
        const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 0.0F, 0.0F }, ThemeColor_Foreground());
        return result;
    }

CompositionSpriteShape SpriteShape_1 ( ) [inline, private]

Definition at line 329 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry_1());
        result.CenterPoint({ 7.5F, -0.00300000003F });
        result.Offset({ 9.375F, -0.00400000019F });
        result.FillBrush(_themeColor_Foreground);
        StartProgressBoundAnimation(result, L"Scale.X", ScaleXScalarAnimation_2p25_to_2p25(), RootProgress());
        StartProgressBoundAnimation(result, L"Scale.Y", ScaleYScalarAnimation_2p25_to_2p25(), _rootProgress);
        return result;
    }

CompositionSpriteShape SpriteShape_2 ( ) [inline, private]

Definition at line 347 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry_2());
        result.Scale({ 2.25F, 2.25F });
        result.FillBrush(_themeColor_Foreground);
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_1(), _rootProgress);
        return result;
    }

CompositionSpriteShape SpriteShape_3 ( ) [inline, private]

Definition at line 361 of file AnimatedBackVisualSource.cpp.

    {
        // Offset:<24, 24>, Scale:<2.25, 2.25>
        const auto geometry = _pathGeometry_0;
        const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 24.0F, 24.0F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_4 ( ) [inline, private]

Definition at line 374 of file AnimatedBackVisualSource.cpp.

    {
        // Offset:<24, 23.99975>, Scale:<2.25, 2.25>
        const auto geometry = _pathGeometry_1;
        const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 24.0F, 23.9997501F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_5 ( ) [inline, private]

Definition at line 387 of file AnimatedBackVisualSource.cpp.

    {
        // Offset:<24, 24>, Scale:<2.25, 2.25>
        const auto geometry = _pathGeometry_2;
        const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 24.0F, 24.0F }, _themeColor_Foreground);
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 123 of file AnimatedBackVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 646 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
        result.IsInitialStepSingleFrame(true);
        return result;
    }

ScalarKeyFrameAnimation t0ScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 592 of file AnimatedBackVisualSource.cpp.

    {
        // Frame 50.
        const auto result = CreateScalarKeyFrameAnimation(0.62500006F, 0.0F, _stepThenHoldEasingFunction);
        result.SetReferenceParameter(L"_", _root);
        // Frame 59.
        result.InsertKeyFrame(0.737499952F, 1.0F, _cubicBezierEasingFunction_2);
        // Frame 70.
        result.InsertKeyFrame(0.87500006F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 79.
        result.InsertKeyFrame(0.987499952F, 1.0F, _cubicBezierEasingFunction_2);
        return result;
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 264 of file AnimatedBackVisualSource.cpp.

    {
        const auto result = _themeColor_Foreground = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedChevronDownSmallVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedChevronDownSmallVisualSource Class Reference

#include "AnimatedChevronDownSmallVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 50 of file AnimatedChevronDownSmallVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
TimeSpan Duration ( )

Definition at line 460 of file AnimatedChevronDownSmallVisualSource.cpp.

{
    return TimeSpan{ 4833333L };
}

winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
Color Foreground ( ) [inline]

Definition at line 412 of file AnimatedChevronDownSmallVisualSource.cpp.

{
    return _themeForeground;
}

double FrameCount ( )

Definition at line 450 of file AnimatedChevronDownSmallVisualSource.cpp.

{
    return 29.0;
}

double Framerate ( )

Definition at line 455 of file AnimatedChevronDownSmallVisualSource.cpp.

{
    return 60.0;
}

double FrameToProgress ( double frameNumber )

Definition at line 465 of file AnimatedChevronDownSmallVisualSource.cpp.

{
    return frameNumber / 29.0;
}

winrt::Windows::Foundation::Collections::IMapView< hstring, double > Markers ( )

Definition at line 470 of file AnimatedChevronDownSmallVisualSource.cpp.

{
    return winrt::single_threaded_map<winrt::hstring, double>(
        std::map<winrt::hstring, double>
        {
            { L"NormalToPointerOver_Start", 0.0 },
            { L"NormalToPointerOver_End", 0.0 },
            { L"NormalToPressed_Start", 0.0 },
            { L"NormalToPressed_End", 0.312068965517241 },
            { L"PointerOverToNormal_Start", 0.0 },
            { L"PointerOverToNormal_End", 0.0 },
            { L"PointerOverToPressed_Start", 0.0 },
            { L"PointerOverToPressed_End", 0.312068965517241 },
            { L"PressedToNormal_Start", 0.346551724137931 },
            { L"PressedToNormal_End", 0.967241379310345 },
            { L"PressedToPointerOver_Start", 0.346551724137931 },
            { L"PressedToPointerOver_End", 0.967241379310345 },
        }
    ).GetView();
}

void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |

Definition at line 508 of file AnimatedChevronDownSmallVisualSource.cpp.

{
}

winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.h
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedChevronDownSmallVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedChevronDownSmallVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedChevronDownSmallVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
ContainerVisual | ContainerVisual_0 ()
ContainerVisual | ContainerVisual_1 ()
BooleanKeyFrameAnimation | CreateBooleanKeyFrameAnimation (float initialProgress, bool initialValue)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
winrt::com_ptr< CanvasGeometry > | Geometry ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_1 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_0 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_1 ()
CompositionPathGeometry | PathGeometry ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ShapeVisual | ShapeVisual_0 ()
ShapeVisual | ShapeVisual_1 ()
CompositionSpriteShape | SpriteShape_0 ()
CompositionSpriteShape | SpriteShape_1 ()
CompositionColorBrush | ThemeColor_Foreground ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 99 of file AnimatedChevronDownSmallVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedChevronDownSmallVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 356 of file AnimatedChevronDownSmallVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 361 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 126 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 350 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 367 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

ContainerVisual ContainerVisual_0 ( ) [inline, private]

Definition at line 232 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.IsVisible(false);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Transforms for Controls - 06 - Dropdown - 05 - PressedToNormal Scale(1,1,0)
        result.Children().InsertAtTop(ShapeVisual_0());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_0(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_1 ( ) [inline, private]

Definition at line 247 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Transforms for Controls - 06 - Dropdown - 04 - PointerOverToPressed Scale(1,1,0)
        result.Children().InsertAtTop(ShapeVisual_1());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_1(), _rootProgress);
        return result;
    }

BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation | ( | float | initialProgress,
 |  | bool | initialValue |
 | ) |  |  | [inline, private]

Definition at line 139 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateBooleanKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue);
        return result;
    }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | winrt::float2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 147 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateVector2KeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

TimeSpan Duration ( ) const [inline]

Definition at line 375 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

winrt::com_ptr<CanvasGeometry> Geometry ( ) [inline, private]

Definition at line 171 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -3.85400009F, -2.10400009F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { -3.65899992F, -2.29900002F }, { -3.34100008F, -2.29900002F }, { -3.14599991F, -2.10400009F } });
        sink->AddLine({ 0.0F, 1.04299998F });
        sink->AddLine({ 3.14599991F, -2.10400009F });
        sink->AddBezier({ { 3.34100008F, -2.29900002F }, { 3.65899992F, -2.29900002F }, { 3.85400009F, -2.10400009F } });
        sink->AddBezier({ { 4.04899979F, -1.90900004F }, { 4.04899979F, -1.59099996F }, { 3.85400009F, -1.39600003F } });
        sink->AddLine({ 0.354000002F, 2.10400009F });
        sink->AddBezier({ { 0.158999994F, 2.29900002F }, { -0.158999994F, 2.29900002F }, { -0.354000002F, 2.10400009F } });
        sink->AddLine({ -3.85400009F, -1.39600003F });
        sink->AddBezier({ { -4.04899979F, -1.59099996F }, { -4.04899979F, -1.90900004F }, { -3.85400009F, -2.10400009F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 313 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 281 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _insetClip_0 = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 390 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_0 ( ) [inline, private]

Definition at line 156 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        // Frame 10.
        const auto result = CreateBooleanKeyFrameAnimation(0.344827592F, true);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_1 ( ) [inline, private]

Definition at line 164 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        // Frame 10.
        const auto result = CreateBooleanKeyFrameAnimation(0.344827592F, false);
        return result;
    }

Vector2KeyFrameAnimation OffsetVector2Animation_0 ( ) [inline, private]

Definition at line 324 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, HoldThenStepEasingFunction());
        // Frame 10.
        result.InsertKeyFrame(0.344827592F, { 24.0F, 31.5F }, _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F }));
        // Frame 15.
        result.InsertKeyFrame(0.517241359F, { 24.0F, 21.0F }, _c.CreateCubicBezierEasingFunction({ 0.550000012F, 0.0F }, { 0.75F, 1.0F }));
        // Frame 29.
        result.InsertKeyFrame(1.0F, { 24.0F, 24.0F }, _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F }));
        return result;
    }

Vector2KeyFrameAnimation OffsetVector2Animation_1 ( ) [inline, private]

Definition at line 341 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.833000004F, 0.833000004F }));
        // Frame 9.
        result.InsertKeyFrame(0.310344815F, { 24.0F, 31.5F }, _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.649999976F, 1.0F }));
        return result;
    }

CompositionPathGeometry PathGeometry ( ) [inline, private]

Definition at line 202 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        return _pathGeometry = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry())));
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 261 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        const auto children = result.Children();
        // PreComp layer: Controls - 06 - Dropdown - 05 - PressedToNormal
        children.InsertAtTop(ContainerVisual_0());
        // PreComp layer: Controls - 06 - Dropdown - 04 - PointerOverToPressed
        children.InsertAtTop(ContainerVisual_1());
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 274 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 380 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        return _root;
    }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 289 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // ShapeGroup: Group 1
        result.Shapes().Append(SpriteShape_0());
        return result;
    }

ShapeVisual ShapeVisual_1 ( ) [inline, private]

Definition at line 300 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // ShapeGroup: Group 1
        result.Shapes().Append(SpriteShape_1());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 385 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape_0 ( ) [inline, private]

Definition at line 210 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry());
        result.Scale({ 4.0F, 4.0F });
        result.FillBrush(ThemeColor_Foreground());
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_0(), RootProgress());
        return result;
    }

CompositionSpriteShape SpriteShape_1 ( ) [inline, private]

Definition at line 222 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(_pathGeometry);
        result.Scale({ 4.0F, 4.0F });
        result.FillBrush(_themeColor_Foreground);
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_1(), _rootProgress);
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 114 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 195 of file AnimatedChevronDownSmallVisualSource.cpp.

    {
        const auto result = _themeColor_Foreground = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedChevronRightDownSmallVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedChevronRightDownSmallVisualSource Class Reference

#include "AnimatedChevronRightDownSmallVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 75 of file AnimatedChevronRightDownSmallVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
TimeSpan Duration ( )

Definition at line 716 of file AnimatedChevronRightDownSmallVisualSource.cpp.

{
    return TimeSpan{ 36666666L };
}

winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
Color Foreground ( ) [inline]

Definition at line 668 of file AnimatedChevronRightDownSmallVisualSource.cpp.

{
    return _themeForeground;
}

double FrameCount ( )

Definition at line 706 of file AnimatedChevronRightDownSmallVisualSource.cpp.

{
    return 220.0;
}

double Framerate ( )

Definition at line 711 of file AnimatedChevronRightDownSmallVisualSource.cpp.

{
    return 60.0;
}

double FrameToProgress ( double frameNumber )

Definition at line 721 of file AnimatedChevronRightDownSmallVisualSource.cpp.

{
    return frameNumber / 220.0;
}

winrt::Windows::Foundation::Collections::IMapView< hstring, double > Markers ( )

Definition at line 726 of file AnimatedChevronRightDownSmallVisualSource.cpp.

{
    return winrt::single_threaded_map<winrt::hstring, double>(
        std::map<winrt::hstring, double>
        {
            { L"NormalOnToNormalOff_Start", 0.0 },
            { L"NormalOnToNormalOff_End", 0.0411363636363636 },
            { L"NormalOnToPointerOverOn_Start", 0.0456818181818182 },
            { L"NormalOnToPointerOverOn_End", 0.0865909090909091 },
            { L"NormalOnToPressedOn_Start", 0.0911363636363636 },
            { L"NormalOnToPressedOn_End", 0.132045454545455 },
            { L"NormalOffToNormalOn_Start", 0.136590909090909 },
            { L"NormalOffToNormalOn_End", 0.268409090909091 },
            { L"NormalOffToPointerOverOff_Start", 0.272954545454545 },
            { L"NormalOffToPointerOverOff_End", 0.313863636363636 },
            { L"NormalOffToPressedOff_Start", 0.318409090909091 },
            { L"NormalOffToPressedOff_End", 0.359318181818182 },
            { L"PointerOverOnToPointerOverOff_Start", 0.363863636363636 },
            { L"PointerOverOnToPointerOverOff_End", 0.404772727272727 },
            { L"PointerOverOnToNormalOn_Start", 0.409318181818182 },
            { L"PointerOverOnToNormalOn_End", 0.450227272727273 },
            { L"PointerOverOnToPressedOn_Start", 0.454772727272727 },
            { L"PointerOverOnToPressedOn_End", 0.495681818181818 },
            { L"PointerOverOffToPointerOverOn_Start", 0.500227272727273 },
            { L"PointerOverOffToPointerOverOn_End", 0.541136363636364 },
            { L"PointerOverOffToNormalOff_Start", 0.545681818181818 },
            { L"PointerOverOffToNormalOff_End", 0.586590909090909 },
            { L"PointerOverOffToPressedOff_Start", 0.591136363636364 },
            { L"PointerOverOffToPressedOff_End", 0.632045454545455 },
            { L"PressedOnToPressedOff_Start", 0.636590909090909 },
            { L"PressedOnToPressedOff_End", 0.6775 },
            { L"PressedOnToPointerOverOff_Start", 0.682045454545455 },
            { L"PressedOnToPointerOverOff_End", 0.722954545454546 },
            { L"PressedOnToNormalOff_Start", 0.7275 },
            { L"PressedOnToNormalOff_End", 0.768409090909091 },
            { L"PressedOffToPressedOn_Start", 0.772954545454546 },
            { L"PressedOffToPressedOn_End", 0.813863636363636 },
            { L"PressedOffToPointerOverOn_Start", 0.818409090909091 },
            { L"PressedOffToPointerOverOn_End", 0.904772727272727 },
            { L"PressedOffToNormalOn_Start", 0.909318181818182 },
            { L"PressedOffToNormalOn_End", 0.995681818181818 },
        }
    ).GetView();
}

void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |

Definition at line 788 of file AnimatedChevronRightDownSmallVisualSource.cpp.

{
}

winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.h
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedChevronRightDownSmallVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedChevronRightDownSmallVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedChevronRightDownSmallVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
CompositionContainerShape | ContainerShape ()
ContainerVisual | ContainerVisual_0 ()
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_2 ()
winrt::com_ptr< CanvasGeometry > | Geometry ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
Vector2KeyFrameAnimation | OffsetVector2Animation ()
CompositionPathGeometry | PathGeometry ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ScalarKeyFrameAnimation | RotationAngleInDegreesScalarAnimation_90_to_90 ()
ShapeVisual | ShapeVisual_0 ()
CompositionSpriteShape | SpriteShape ()
CompositionColorBrush | ThemeColor_Foreground ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 98 of file AnimatedChevronRightDownSmallVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 612 of file AnimatedChevronRightDownSmallVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 617 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 126 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 606 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 623 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

CompositionContainerShape ContainerShape ( ) [inline, private]

Definition at line 257 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateContainerShape();
        result.Scale({ 4.0F, 4.0F });
        // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
        // Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
        // RotationDegrees:270
        result.Shapes().Append(SpriteShape());
        StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_90_to_90(), RootProgress());
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_0 ( ) [inline, private]

Definition at line 342 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
        // Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
        // Layer 2
        result.Children().InsertAtTop(ShapeVisual_0());
        return result;
    }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 139 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateScalarKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | winrt::float3x2 | transformMatrix,
 |  | CompositionBrush | fillBrush |
 | ) |  |  | [inline, private]

Definition at line 155 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(geometry);
        result.TransformMatrix(transformMatrix);
        result.FillBrush(fillBrush);
        return result;
    }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | winrt::float2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 147 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateVector2KeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 382 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 387 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.75F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_2 ( ) [inline, private]

Definition at line 392 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
    }

TimeSpan Duration ( ) const [inline]

Definition at line 631 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

winrt::com_ptr<CanvasGeometry> Geometry ( ) [inline, private]

Definition at line 185 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -3.85400009F, -2.10400009F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { -3.65899992F, -2.29900002F }, { -3.34100008F, -2.29900002F }, { -3.14599991F, -2.10400009F } });
        sink->AddLine({ 0.0F, 1.04299998F });
        sink->AddLine({ 3.14599991F, -2.10400009F });
        sink->AddBezier({ { 3.34100008F, -2.29900002F }, { 3.65899992F, -2.29900002F }, { 3.85400009F, -2.10400009F } });
        sink->AddBezier({ { 4.04899979F, -1.90900004F }, { 4.04899979F, -1.59099996F }, { 3.85400009F, -1.39600003F } });
        sink->AddLine({ 0.354000002F, 2.10400009F });
        sink->AddBezier({ { 0.158999994F, 2.29900002F }, { -0.158999994F, 2.29900002F }, { -0.354000002F, 2.10400009F } });
        sink->AddLine({ -3.85400009F, -1.39600003F });
        sink->AddBezier({ { -4.04899979F, -1.59099996F }, { -4.04899979F, -1.90900004F }, { -3.85400009F, -2.10400009F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 532 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 420 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 646 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

Vector2KeyFrameAnimation OffsetVector2Animation ( ) [inline, private]

Definition at line 559 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.0454545468F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.13636364F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 40.
        result.InsertKeyFrame(0.181818187F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 45.
        result.InsertKeyFrame(0.204545453F, { 24.0F, 30.0F }, CubicBezierEasingFunction_1());
        // Frame 59.
        result.InsertKeyFrame(0.268181831F, { 24.0F, 24.0F }, CubicBezierEasingFunction_2());
        // Frame 60.
        result.InsertKeyFrame(0.272727281F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 70.
        result.InsertKeyFrame(0.318181813F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 80.
        result.InsertKeyFrame(0.363636374F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 90.
        result.InsertKeyFrame(0.409090906F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 100.
        result.InsertKeyFrame(0.454545468F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 110.
        result.InsertKeyFrame(0.5F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 120.
        result.InsertKeyFrame(0.545454562F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 130.
        result.InsertKeyFrame(0.590909064F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 140.
        result.InsertKeyFrame(0.636363626F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 180.
        result.InsertKeyFrame(0.818181813F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 185.
        result.InsertKeyFrame(0.840909064F, { 24.0F, 30.0F }, _cubicBezierEasingFunction_1);
        // Frame 199.
        result.InsertKeyFrame(0.904545426F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
        // Frame 200.
        result.InsertKeyFrame(0.909090936F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 205.
        result.InsertKeyFrame(0.931818187F, { 24.0F, 30.0F }, _cubicBezierEasingFunction_1);
        // Frame 219.
        result.InsertKeyFrame(0.99545455F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
        return result;
    }

CompositionPathGeometry PathGeometry ( ) [inline, private]

Definition at line 292 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry())));
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 357 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        // PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff Controls -
        // 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 - TreeViewExpand -
        // 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 - NormalOffToNormalOn
        // Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff Controls - 08 -
        // TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 - TreeViewExpand - 07 -
        // PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand - 08 -
        // PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
        // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
        // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
        // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
        // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
        // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
        // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
        // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
        // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
        // TreeViewExpand - 18 - PressedOffToNormalOn
        result.Children().InsertAtTop(ContainerVisual_0());
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 397 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 636 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return _root;
    }

ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_90_to_90 ( ) [inline, private]

Definition at line 446 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 90.0F, HoldThenStepEasingFunction());
        // Frame 9.
        result.InsertKeyFrame(0.0409090891F, 0.0F, CubicBezierEasingFunction_0());
        // Frame 10.
        result.InsertKeyFrame(0.0454545468F, 90.0F, _holdThenStepEasingFunction);
        // Frame 20.
        result.InsertKeyFrame(0.0909090936F, 90.0F, _holdThenStepEasingFunction);
        // Frame 29.
        result.InsertKeyFrame(0.131818175F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 30.
        result.InsertKeyFrame(0.13636364F, 0.0F, _holdThenStepEasingFunction);
        // Frame 40.
        result.InsertKeyFrame(0.181818187F, 90.0F, _cubicBezierEasingFunction_0);
        // Frame 60.
        result.InsertKeyFrame(0.272727281F, 0.0F, _holdThenStepEasingFunction);
        // Frame 70.
        result.InsertKeyFrame(0.318181813F, 0.0F, _holdThenStepEasingFunction);
        // Frame 79.
        result.InsertKeyFrame(0.359090894F, 90.0F, _cubicBezierEasingFunction_0);
        // Frame 80.
        result.InsertKeyFrame(0.363636374F, 90.0F, _holdThenStepEasingFunction);
        // Frame 89.
        result.InsertKeyFrame(0.404545456F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 90.
        result.InsertKeyFrame(0.409090906F, 90.0F, _holdThenStepEasingFunction);
        // Frame 100.
        result.InsertKeyFrame(0.454545468F, 90.0F, _holdThenStepEasingFunction);
        // Frame 109.
        result.InsertKeyFrame(0.49545455F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 110.
        result.InsertKeyFrame(0.5F, 0.0F, _holdThenStepEasingFunction);
        // Frame 119.
        result.InsertKeyFrame(0.540909111F, 90.0F, _cubicBezierEasingFunction_0);
        // Frame 120.
        result.InsertKeyFrame(0.545454562F, 0.0F, _holdThenStepEasingFunction);
        // Frame 130.
        result.InsertKeyFrame(0.590909064F, 0.0F, _holdThenStepEasingFunction);
        // Frame 139.
        result.InsertKeyFrame(0.631818175F, 90.0F, _cubicBezierEasingFunction_0);
        // Frame 140.
        result.InsertKeyFrame(0.636363626F, 0.0F, _holdThenStepEasingFunction);
        // Frame 149.
        result.InsertKeyFrame(0.677272737F, 90.0F, _cubicBezierEasingFunction_0);
        // Frame 150.
        result.InsertKeyFrame(0.681818187F, 0.0F, _holdThenStepEasingFunction);
        // Frame 160.
        result.InsertKeyFrame(0.727272749F, 0.0F, _holdThenStepEasingFunction);
        // Frame 170.
        result.InsertKeyFrame(0.772727251F, 90.0F, _holdThenStepEasingFunction);
        // Frame 179.
        result.InsertKeyFrame(0.813636363F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 180.
        result.InsertKeyFrame(0.818181813F, 90.0F, _holdThenStepEasingFunction);
        return result;
    }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 524 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        result.Shapes().Append(ContainerShape());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 641 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape ( ) [inline, private]

Definition at line 318 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        // Rotation:-90 degrees
        const auto geometry = PathGeometry();
        const auto result = CreateSpriteShape(geometry, { 0.0F, -1.0F, 1.0F, 0.0F, 0.0F, 0.0F }, ThemeColor_Foreground());
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 114 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 231 of file AnimatedChevronRightDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedChevronUpDownSmallVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedChevronUpDownSmallVisualSource Class Reference

#include "AnimatedChevronUpDownSmallVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 74 of file AnimatedChevronUpDownSmallVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
TimeSpan Duration ( )

Definition at line 774 of file AnimatedChevronUpDownSmallVisualSource.cpp.

{
    return TimeSpan{ 43333333L };
}

winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
Color Foreground ( ) [inline]

Definition at line 726 of file AnimatedChevronUpDownSmallVisualSource.cpp.

{
    return _themeForeground;
}

double FrameCount ( )

Definition at line 764 of file AnimatedChevronUpDownSmallVisualSource.cpp.

{
    return 260.0;
}

double Framerate ( )

Definition at line 769 of file AnimatedChevronUpDownSmallVisualSource.cpp.

{
    return 60.0;
}

double FrameToProgress ( double frameNumber )

Definition at line 779 of file AnimatedChevronUpDownSmallVisualSource.cpp.

{
    return frameNumber / 260.0;
}

winrt::Windows::Foundation::Collections::IMapView< hstring, double > Markers ( )

Definition at line 784 of file AnimatedChevronUpDownSmallVisualSource.cpp.

{
    return winrt::single_threaded_map<winrt::hstring, double>(
        std::map<winrt::hstring, double>
        {
            { L"NormalOnToNormalOff_Start", 0.0 },
            { L"NormalOnToNormalOff_End", 0.111730769230769 },
            { L"NormalOnToPointerOverOn_Start", 0.115576923076923 },
            { L"NormalOnToPointerOverOn_End", 0.150192307692308 },
            { L"NormalOnToPressedOn_Start", 0.154038461538462 },
            { L"NormalOnToPressedOn_End", 0.188653846153846 },
            { L"NormalOffToNormalOn_Start", 0.1925 },
            { L"NormalOffToNormalOn_End", 0.304038461538462 },
            { L"NormalOffToPointerOverOff_Start", 0.307884615384615 },
            { L"NormalOffToPointerOverOff_End", 0.3425 },
            { L"NormalOffToPressedOff_Start", 0.346346153846154 },
            { L"NormalOffToPressedOff_End", 0.380961538461538 },
            { L"PointerOverOnToPointerOverOff_Start", 0.384807692307692 },
            { L"PointerOverOnToPointerOverOff_End", 0.419423076923077 },
            { L"PointerOverOnToNormalOn_Start", 0.423269230769231 },
            { L"PointerOverOnToNormalOn_End", 0.457884615384615 },
            { L"PointerOverOnToPressedOn_Start", 0.461730769230769 },
            { L"PointerOverOnToPressedOn_End", 0.496346153846154 },
            { L"PointerOverOffToPointerOverOn_Start", 0.500192307692308 },
            { L"PointerOverOffToPointerOverOn_End", 0.534807692307692 },
            { L"PointerOverOffToNormalOff_Start", 0.538653846153846 },
            { L"PointerOverOffToNormalOff_End", 0.573269230769231 },
            { L"PointerOverOffToPressedOff_Start", 0.577115384615385 },
            { L"PointerOverOffToPressedOff_End", 0.611730769230769 },
            { L"PressedOnToPressedOff_Start", 0.615576923076923 },
            { L"PressedOnToPressedOff_End", 0.650192307692308 },
            { L"PressedOnToPointerOverOff_Start", 0.654038461538462 },
            { L"PressedOnToPointerOverOff_End", 0.727115384615385 },
            { L"PressedOnToNormalOff_Start", 0.730961538461539 },
            { L"PressedOnToNormalOff_End", 0.804038461538462 },
            { L"PressedOffToPressedOn_Start", 0.807884615384615 },
            { L"PressedOffToPressedOn_End", 0.8425 },
            { L"PressedOffToPointerOverOn_Start", 0.846346153846154 },
            { L"PressedOffToPointerOverOn_End", 0.919423076923077 },
            { L"PressedOffToNormalOn_Start", 0.923269230769231 },
            { L"PressedOffToNormalOn_End", 0.996346153846154 },
        }
    ).GetView();
}

void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |

Definition at line 846 of file AnimatedChevronUpDownSmallVisualSource.cpp.

{
}

winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.h
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedChevronUpDownSmallVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedChevronUpDownSmallVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedChevronUpDownSmallVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
ContainerVisual | ContainerVisual_0 ()
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_2 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_3 ()
winrt::com_ptr< CanvasGeometry > | Geometry ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
Vector2KeyFrameAnimation | OffsetVector2Animation ()
CompositionPathGeometry | PathGeometry ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ScalarKeyFrameAnimation | RotationAngleInDegreesScalarAnimation_180_to_180 ()
ShapeVisual | ShapeVisual_0 ()
CompositionSpriteShape | SpriteShape ()
StepEasingFunction | StepThenHoldEasingFunction ()
CompositionColorBrush | ThemeColor_Foreground ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 99 of file AnimatedChevronUpDownSmallVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 670 of file AnimatedChevronUpDownSmallVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 675 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 128 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 664 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 681 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

ContainerVisual ContainerVisual_0 ( ) [inline, private]

Definition at line 308 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Shape tree root for layer: DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2
        // DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2
        // DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2
        // DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2
        // DownArrowRotate 2 DownArrowRotate 2 DownArrowRotate 2
        result.Children().InsertAtTop(ShapeVisual_0());
        return result;
    }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 141 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateScalarKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | winrt::float2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 149 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateVector2KeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 350 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 355 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.75F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_2 ( ) [inline, private]

Definition at line 360 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_3 ( ) [inline, private]

Definition at line 365 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.449999988F, 1.0F });
    }

TimeSpan Duration ( ) const [inline]

Definition at line 689 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

winrt::com_ptr<CanvasGeometry> Geometry ( ) [inline, private]

Definition at line 180 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->BeginFigure({ -3.54299998F, -1.79299998F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 0.0199999996F, 1.70700002F });
        sink->AddLine({ 3.48900008F, -1.71500003F });
        sink->EndFigure(D2D1_FIGURE_END_OPEN);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 527 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 393 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 704 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

Vector2KeyFrameAnimation OffsetVector2Animation ( ) [inline, private]

Definition at line 589 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.0384615399F, { 24.0F, 26.0F }, _cubicBezierEasingFunction_0);
        // Frame 15.
        result.InsertKeyFrame(0.057692308F, { 24.0F, 18.0F }, CubicBezierEasingFunction_1());
        // Frame 29.
        result.InsertKeyFrame(0.111538462F, { 24.1709995F, 23.9230003F }, CubicBezierEasingFunction_2());
        // Frame 30.
        result.InsertKeyFrame(0.115384616F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 40.
        result.InsertKeyFrame(0.15384616F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 49.
        result.InsertKeyFrame(0.188461542F, { 24.0F, 26.0F }, _cubicBezierEasingFunction_0);
        // Frame 50.
        result.InsertKeyFrame(0.192307696F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 60.
        result.InsertKeyFrame(0.230769232F, { 24.0F, 22.0F }, _cubicBezierEasingFunction_0);
        // Frame 65.
        result.InsertKeyFrame(0.25F, { 24.0F, 30.0F }, CubicBezierEasingFunction_3());
        // Frame 79.
        result.InsertKeyFrame(0.303846151F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
        // Frame 90.
        result.InsertKeyFrame(0.346153855F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 99.
        result.InsertKeyFrame(0.380769223F, { 24.0F, 22.0F }, _cubicBezierEasingFunction_0);
        // Frame 100.
        result.InsertKeyFrame(0.384615391F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 120.
        result.InsertKeyFrame(0.461538464F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 129.
        result.InsertKeyFrame(0.496153831F, { 24.0F, 26.0F }, _cubicBezierEasingFunction_0);
        // Frame 130.
        result.InsertKeyFrame(0.5F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 150.
        result.InsertKeyFrame(0.576923072F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
        // Frame 159.
        result.InsertKeyFrame(0.61153847F, { 24.0F, 22.0F }, _cubicBezierEasingFunction_0);
        // Frame 160.
        result.InsertKeyFrame(0.615384638F, { 24.0F, 26.0F }, _holdThenStepEasingFunction);
        // Frame 169.
        result.InsertKeyFrame(0.649999976F, { 24.0F, 22.0F }, _cubicBezierEasingFunction_0);
        // Frame 170.
        result.InsertKeyFrame(0.653846145F, { 24.0F, 26.0F }, _holdThenStepEasingFunction);
        // Frame 175.
        result.InsertKeyFrame(0.673076928F, { 24.0F, 18.0F }, _cubicBezierEasingFunction_1);
        // Frame 189.
        result.InsertKeyFrame(0.726923048F, { 24.1709995F, 23.9230003F }, _cubicBezierEasingFunction_2);
        // Frame 190.
        result.InsertKeyFrame(0.730769217F, { 24.0F, 26.0F }, _holdThenStepEasingFunction);
        // Frame 195.
        result.InsertKeyFrame(0.75F, { 24.0F, 18.0F }, _cubicBezierEasingFunction_1);
        // Frame 209.
        result.InsertKeyFrame(0.80384618F, { 24.1709995F, 23.9230003F }, _cubicBezierEasingFunction_2);
        // Frame 210.
        result.InsertKeyFrame(0.807692289F, { 24.0F, 22.0F }, _holdThenStepEasingFunction);
        // Frame 219.
        result.InsertKeyFrame(0.842307687F, { 24.0F, 26.0F }, _cubicBezierEasingFunction_0);
        // Frame 220.
        result.InsertKeyFrame(0.846153855F, { 24.0F, 22.0F }, _holdThenStepEasingFunction);
        // Frame 225.
        result.InsertKeyFrame(0.865384638F, { 24.0F, 30.0F }, _cubicBezierEasingFunction_3);
        // Frame 239.
        result.InsertKeyFrame(0.919230759F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
        // Frame 240.
        result.InsertKeyFrame(0.923076928F, { 24.0F, 22.0F }, _holdThenStepEasingFunction);
        // Frame 245.
        result.InsertKeyFrame(0.942307711F, { 24.0F, 30.0F }, _cubicBezierEasingFunction_3);
        // Frame 259.
        result.InsertKeyFrame(0.996153831F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
        return result;
    }

CompositionPathGeometry PathGeometry ( ) [inline, private]

Definition at line 249 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry())));
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 325 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        // PreComp layer: Controls - 07 - Dropdown Rotate - 01 - NormalOnToNormalOff Controls
        // - 07 - Dropdown Rotate - 02 - NormalOnToPointerOverOn Controls - 07 - Dropdown
        // Rotate - 03 - NormalOnToPressedOn Controls - 07 - Dropdown Rotate - 04 -
        // NormalOffToNormalOn Controls - 07 - Dropdown Rotate - 05 -NormalOffToPointerOverOff
        // Controls - 07 - Dropdown Rotate - 06 - NormalOffToPressedOff Controls - 07 -
        // Dropdown Rotate - 07 - PointerOverOnToPointerOverOff Controls - 07 - Dropdown
        // Rotate - 08 - PointerOverOnToNormalOn Controls - 07 - Dropdown Rotate - 09 -
        // PointerOverOnToPressedOn Controls - 07 - Dropdown Rotate - 10 -
        // PointerOverOffToPointerOverOn Controls - 07 - Dropdown Rotate - 11 -
        // PointerOverOffToNormalOff Controls - 07 - Dropdown Rotate - 12 -
        // PointerOverOffToPressedOff Controls - 07 - Dropdown Rotate - 13 -
        // PressedOnToPressedOff Controls - 07 - Dropdown Rotate - 14 -
        // PressedOnToPointerOverOff Controls - 07 - Dropdown Rotate - 15 -
        // PressedOnToNormalOff Controls - 07 - Dropdown Rotate - 16 - PressedOffToPressedOn
        // Controls - 07 - Dropdown Rotate - 17 - PressedOffToPointerOverOn Controls - 07 -
        // Dropdown Rotate - 18 - PressedOffToNormalOn
        result.Children().InsertAtTop(ContainerVisual_0());
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 370 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 694 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return _root;
    }

ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_180_to_180 ( ) [inline, private]

Definition at line 423 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 180.0F, StepThenHoldEasingFunction());
        // Frame 15.
        result.InsertKeyFrame(0.057692308F, 180.0F, HoldThenStepEasingFunction());
        // Frame 25.
        result.InsertKeyFrame(0.0961538479F, 0.0F, CubicBezierEasingFunction_0());
        // Frame 30.
        result.InsertKeyFrame(0.115384616F, 180.0F, _holdThenStepEasingFunction);
        // Frame 40.
        result.InsertKeyFrame(0.15384616F, 180.0F, _holdThenStepEasingFunction);
        // Frame 50.
        result.InsertKeyFrame(0.192307696F, 0.0F, _holdThenStepEasingFunction);
        // Frame 65.
        result.InsertKeyFrame(0.25F, 0.0F, _holdThenStepEasingFunction);
        // Frame 75.
        result.InsertKeyFrame(0.288461536F, 180.0F, _cubicBezierEasingFunction_0);
        // Frame 80.
        result.InsertKeyFrame(0.307692319F, 0.0F, _holdThenStepEasingFunction);
        // Frame 90.
        result.InsertKeyFrame(0.346153855F, 0.0F, _holdThenStepEasingFunction);
        // Frame 100.
        result.InsertKeyFrame(0.384615391F, 180.0F, _holdThenStepEasingFunction);
        // Frame 109.
        result.InsertKeyFrame(0.419230759F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 110.
        result.InsertKeyFrame(0.423076928F, 180.0F, _holdThenStepEasingFunction);
        // Frame 120.
        result.InsertKeyFrame(0.461538464F, 180.0F, _holdThenStepEasingFunction);
        // Frame 130.
        result.InsertKeyFrame(0.5F, 0.0F, _holdThenStepEasingFunction);
        // Frame 139.
        result.InsertKeyFrame(0.534615397F, 180.0F, _cubicBezierEasingFunction_0);
        // Frame 140.
        result.InsertKeyFrame(0.538461566F, 0.0F, _holdThenStepEasingFunction);
        // Frame 150.
        result.InsertKeyFrame(0.576923072F, 0.0F, _holdThenStepEasingFunction);
        // Frame 160.
        result.InsertKeyFrame(0.615384638F, 180.0F, _holdThenStepEasingFunction);
        // Frame 169.
        result.InsertKeyFrame(0.649999976F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 170.
        result.InsertKeyFrame(0.653846145F, 180.0F, _holdThenStepEasingFunction);
        // Frame 175.
        result.InsertKeyFrame(0.673076928F, 180.0F, _holdThenStepEasingFunction);
        // Frame 185.
        result.InsertKeyFrame(0.711538434F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 190.
        result.InsertKeyFrame(0.730769217F, 180.0F, _holdThenStepEasingFunction);
        // Frame 195.
        result.InsertKeyFrame(0.75F, 180.0F, _holdThenStepEasingFunction);
        // Frame 205.
        result.InsertKeyFrame(0.788461566F, 0.0F, _cubicBezierEasingFunction_0);
        // Frame 210.
        result.InsertKeyFrame(0.807692289F, 0.0F, _holdThenStepEasingFunction);
        // Frame 219.
        result.InsertKeyFrame(0.842307687F, 180.0F, _cubicBezierEasingFunction_0);
        // Frame 220.
        result.InsertKeyFrame(0.846153855F, 0.0F, _holdThenStepEasingFunction);
        // Frame 225.
        result.InsertKeyFrame(0.865384638F, 0.0F, _holdThenStepEasingFunction);
        // Frame 235.
        result.InsertKeyFrame(0.903846145F, 180.0F, _cubicBezierEasingFunction_0);
        // Frame 240.
        result.InsertKeyFrame(0.923076928F, 0.0F, _holdThenStepEasingFunction);
        // Frame 245.
        result.InsertKeyFrame(0.942307711F, 0.0F, _holdThenStepEasingFunction);
        // Frame 255.
        result.InsertKeyFrame(0.980769217F, 180.0F, _cubicBezierEasingFunction_0);
        return result;
    }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 517 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // ShapeGroup: Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1
        // Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1 Shape 1
        result.Shapes().Append(SpriteShape());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 699 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape ( ) [inline, private]

Definition at line 277 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry());
        result.Scale({ 4.0F, 4.0F });
        result.StrokeBrush(ThemeColor_Foreground());
        result.StrokeDashCap(CompositionStrokeCap::Round);
        result.StrokeStartCap(CompositionStrokeCap::Round);
        result.StrokeEndCap(CompositionStrokeCap::Round);
        result.StrokeLineJoin(CompositionStrokeLineJoin::Round);
        result.StrokeMiterLimit(2.0F);
        StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_180_to_180(), RootProgress());
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation(), _rootProgress);
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 116 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 558 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateStepEasingFunction();
        result.IsInitialStepSingleFrame(true);
        return result;
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 219 of file AnimatedChevronUpDownSmallVisualSource.cpp.

    {
        const auto result = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedFindVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedFindVisualSource Class Reference

#include "AnimatedFindVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 50 of file AnimatedFindVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
TimeSpan Duration ( )

Definition at line 682 of file AnimatedFindVisualSource.cpp.

{
    return TimeSpan{ 13333333L };
}

winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
Color Foreground ( ) [inline]

Definition at line 634 of file AnimatedFindVisualSource.cpp.

{
    return _themeForeground;
}

double FrameCount ( )

Definition at line 672 of file AnimatedFindVisualSource.cpp.

{
    return 80.0;
}

double Framerate ( )

Definition at line 677 of file AnimatedFindVisualSource.cpp.

{
    return 60.0;
}

double FrameToProgress ( double frameNumber )

Definition at line 687 of file AnimatedFindVisualSource.cpp.

{
    return frameNumber / 80.0;
}

winrt::Windows::Foundation::Collections::IMapView< hstring, double > Markers ( )

Definition at line 692 of file AnimatedFindVisualSource.cpp.

{
    return winrt::single_threaded_map<winrt::hstring, double>(
        std::map<winrt::hstring, double>
        {
            { L"NormalToPointerOver_Start", 0.0 },
            { L"NormalToPointerOver_End", 0.113125 },
            { L"NormalToPressed_Start", 0.125625 },
            { L"NormalToPressed_End", 0.238125 },
            { L"PointerOverToNormal_Start", 0.250625 },
            { L"PointerOverToNormal_End", 0.363125 },
            { L"PointerOverToPressed_Start", 0.375625 },
            { L"PointerOverToPressed_End", 0.488125 },
            { L"PressedToNormal_Start", 0.500625 },
            { L"PressedToNormal_End", 0.738125 },
            { L"PressedToPointerOver_Start", 0.750625 },
            { L"PressedToPointerOver_End", 0.988125 },
        }
    ).GetView();
}

void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |

Definition at line 730 of file AnimatedFindVisualSource.cpp.

{
}

winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.h
  • AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedFindVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedFindVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedFindVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
CompositionContainerShape | ContainerShape ()
ContainerVisual | ContainerVisual_0 ()
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, winrt::float3x2 transformMatrix)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_2 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_3 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_4 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_5 ()
CompositionEllipseGeometry | Ellipse_14p188 ()
winrt::com_ptr< CanvasGeometry > | Geometry ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
Vector2KeyFrameAnimation | OffsetVector2Animation ()
CompositionPathGeometry | PathGeometry ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ScalarKeyFrameAnimation | ScalarAnimation_1_to_1 ()
ShapeVisual | ShapeVisual_0 ()
ShapeVisual | ShapeVisual_1 ()
CompositionSpriteShape | SpriteShape_0 ()
CompositionSpriteShape | SpriteShape_1 ()
StepEasingFunction | StepThenHoldEasingFunction ()
ScalarKeyFrameAnimation | StrokeThicknessScalarAnimation_2p5_to_2p5 ()
ScalarKeyFrameAnimation | t0ScalarAnimation_0_to_1 ()
ScalarKeyFrameAnimation | t1ScalarAnimation_0_to_1 ()
ScalarKeyFrameAnimation | t2ScalarAnimation_0_to_1 ()
CompositionColorBrush | ThemeColor_Foreground ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 99 of file AnimatedFindVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedFindVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 578 of file AnimatedFindVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 583 of file AnimatedFindVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 133 of file AnimatedFindVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 572 of file AnimatedFindVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 589 of file AnimatedFindVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

CompositionContainerShape ContainerShape ( ) [inline, private]

Definition at line 211 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateContainerShape();
        result.CenterPoint({ 3.81299996F, -3.93799996F });
        result.Offset({ 24.0F, 24.0F });
        // ShapeGroup: Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1
        // Scale:0.92286,0.92286, Offset:<3.812, -3.938>
        result.Shapes().Append(SpriteShape_1());
        StartProgressBoundAnimation(result, L"Scale.X", ScalarAnimation_1_to_1(), _rootProgress);
        StartProgressBoundAnimation(result, L"Scale.Y", _scalarAnimation_1_to_1, _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_0 ( ) [inline, private]

Definition at line 290 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        const auto children = result.Children();
        // Shape tree root for layer: Layer 4 Layer 4 Layer 4 Layer 4 Layer 4 Layer 4
        children.InsertAtTop(ShapeVisual_0());
        // Opacity for layer: Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape
        // Layer 2 Shape Layer 2
        children.InsertAtTop(ShapeVisual_1());
        return result;
    }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 146 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateScalarKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | winrt::float3x2 | transformMatrix |
 | ) |  |  | [inline, private]

Definition at line 162 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(geometry);
        result.TransformMatrix(transformMatrix);
        return result;
    }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | winrt::float2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 154 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateVector2KeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 326 of file AnimatedFindVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 331 of file AnimatedFindVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.550000012F, 0.0F }, { 0.75F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_2 ( ) [inline, private]

Definition at line 336 of file AnimatedFindVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_3 ( ) [inline, private]

Definition at line 341 of file AnimatedFindVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.449999988F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_4 ( ) [inline, private]

Definition at line 346 of file AnimatedFindVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_4 = _c.CreateCubicBezierEasingFunction({ 0.449999988F, 0.0F }, { 0.75F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_5 ( ) [inline, private]

Definition at line 351 of file AnimatedFindVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_5 = _c.CreateCubicBezierEasingFunction({ 0.75F, 0.0F }, { 0.75F, 1.0F });
    }

TimeSpan Duration ( ) const [inline]

Definition at line 597 of file AnimatedFindVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

CompositionEllipseGeometry Ellipse_14p188 ( ) [inline, private]

Definition at line 235 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateEllipseGeometry();
        result.Radius({ 14.1875F, 14.1875F });
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry ( ) [inline, private]

Definition at line 176 of file AnimatedFindVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 12.9329996F, 278.140015F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 9.42300034F, 281.64801F });
        sink->AddBezier({ { 9.25599957F, 281.815002F }, { 9.25599957F, 282.087006F }, { 9.42300034F, 282.253998F } });
        sink->AddBezier({ { 9.57199955F, 282.403015F }, { 9.80300045F, 282.419006F }, { 9.97000027F, 282.303009F } });
        sink->AddLine({ 10.0290003F, 282.253998F });
        sink->AddLine({ 13.5340004F, 278.748993F });
        sink->AddBezier({ { 13.5340004F, 278.748993F }, { 13.3599997F, 278.609985F }, { 13.1879997F, 278.432007F } });
        sink->AddBezier({ { 13.0159998F, 278.253998F }, { 12.9329996F, 278.140015F }, { 12.9329996F, 278.140015F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 513 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 367 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 612 of file AnimatedFindVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

Vector2KeyFrameAnimation OffsetVector2Animation ( ) [inline, private]

Definition at line 534 of file AnimatedFindVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 5.64699984F, -249.322998F }, HoldThenStepEasingFunction());
        result.SetReferenceParameter(L"_", _root);
        // Frame 10.
        result.InsertKeyFrame(0.125F, { 5.64699984F, -249.322998F }, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertExpressionKeyFrame(0.237499982F, L"Pow(1-_.t0,3)*Vector2(5.647,-249.323)+(3*Square(1-_.t0)*_.t0*Vector2(5.939,-249.615))+(3*(1-_.t0)*Square(_.t0)*Vector2(7.105,-250.781))+(Pow(_.t0,3)*Vector2(7.397,-251.073))", StepThenHoldEasingFunction());
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, { 7.39699984F, -251.072998F }, _stepThenHoldEasingFunction);
        // Frame 20.
        result.InsertKeyFrame(0.25F, { 5.64699984F, -249.322998F }, _holdThenStepEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.375F, { 5.64699984F, -249.322998F }, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertExpressionKeyFrame(0.487499982F, L"Pow(1-_.t0,3)*Vector2(5.647,-249.323)+(3*Square(1-_.t0)*_.t0*Vector2(5.939,-249.615))+(3*(1-_.t0)*Square(_.t0)*Vector2(7.105,-250.781))+(Pow(_.t0,3)*Vector2(7.397,-251.073))", _stepThenHoldEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, { 7.39699984F, -251.072998F }, _stepThenHoldEasingFunction);
        // Frame 40.
        result.InsertKeyFrame(0.5F, { 7.39699984F, -251.072998F }, _holdThenStepEasingFunction);
        // Frame 45.
        result.InsertExpressionKeyFrame(0.56249994F, L"Pow(1-_.t1,3)*Vector2(7.397,-251.073)+(3*Square(1-_.t1)*_.t1*Vector2(6.767,-250.443))+(3*(1-_.t1)*Square(_.t1)*Vector2(3.616,-247.292))+(Pow(_.t1,3)*Vector2(3.616,-247.292))", _stepThenHoldEasingFunction);
        // Frame 59.
        result.InsertExpressionKeyFrame(0.737499952F, L"Pow(1-_.t1,3)*Vector2(3.616,-247.292)+(3*Square(1-_.t1)*_.t1*Vector2(3.616,-247.292))+(3*(1-_.t1)*Square(_.t1)*Vector2(5.308,-248.984))+(Pow(_.t1,3)*Vector2(5.647,-249.323))", _stepThenHoldEasingFunction);
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, { 5.64699984F, -249.322998F }, _stepThenHoldEasingFunction);
        // Frame 60.
        result.InsertKeyFrame(0.75F, { 7.39699984F, -251.072998F }, _holdThenStepEasingFunction);
        // Frame 65.
        result.InsertExpressionKeyFrame(0.81249994F, L"Pow(1-_.t2,3)*Vector2(7.397,-251.073)+(3*Square(1-_.t2)*_.t2*Vector2(6.767,-250.443))+(3*(1-_.t2)*Square(_.t2)*Vector2(3.616,-247.292))+(Pow(_.t2,3)*Vector2(3.616,-247.292))", _stepThenHoldEasingFunction);
        // Frame 79.
        result.InsertExpressionKeyFrame(0.987499952F, L"Pow(1-_.t2,3)*Vector2(3.616,-247.292)+(3*Square(1-_.t2)*_.t2*Vector2(3.616,-247.292))+(3*(1-_.t2)*Square(_.t2)*Vector2(5.308,-248.984))+(Pow(_.t2,3)*Vector2(5.647,-249.323))", _stepThenHoldEasingFunction);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, { 5.64699984F, -249.322998F }, _stepThenHoldEasingFunction);
        return result;
    }

CompositionPathGeometry PathGeometry ( ) [inline, private]

Definition at line 248 of file AnimatedFindVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry())));
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 307 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        propertySet.InsertScalar(L"t0", 0.0F);
        propertySet.InsertScalar(L"t1", 0.0F);
        propertySet.InsertScalar(L"t2", 0.0F);
        // PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
        // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
        // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
        // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
        result.Children().InsertAtTop(ContainerVisual_0());
        StartProgressBoundAnimation(propertySet, L"t0", t0ScalarAnimation_0_to_1(), _rootProgress);
        StartProgressBoundAnimation(propertySet, L"t1", t1ScalarAnimation_0_to_1(), _rootProgress);
        StartProgressBoundAnimation(propertySet, L"t2", t2ScalarAnimation_0_to_1(), _rootProgress);
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 356 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 602 of file AnimatedFindVisualSource.cpp.

    {
        return _root;
    }

ScalarKeyFrameAnimation ScalarAnimation_1_to_1 ( ) [inline, private]

Definition at line 374 of file AnimatedFindVisualSource.cpp.

    {
        // Frame 0.
        const auto result = _scalarAnimation_1_to_1 = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 1.0F, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, 0.800000012F, CubicBezierEasingFunction_3());
        // Frame 20.
        result.InsertKeyFrame(0.25F, 1.0F, _holdThenStepEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.375F, 1.0F, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, 0.800000012F, _cubicBezierEasingFunction_3);
        // Frame 40.
        result.InsertKeyFrame(0.5F, 0.800000012F, _holdThenStepEasingFunction);
        // Frame 45.
        result.InsertKeyFrame(0.5625F, 1.20000005F, CubicBezierEasingFunction_4());
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, 1.0F, _cubicBezierEasingFunction_2);
        // Frame 60.
        result.InsertKeyFrame(0.75F, 0.800000012F, _holdThenStepEasingFunction);
        // Frame 65.
        result.InsertKeyFrame(0.8125F, 1.20000005F, _cubicBezierEasingFunction_4);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, 1.0F, _cubicBezierEasingFunction_2);
        return result;
    }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 489 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
        result.Shapes().Append(SpriteShape_0());
        return result;
    }

ShapeVisual ShapeVisual_1 ( ) [inline, private]

Definition at line 504 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Opacity(0.970000029F);
        result.Size({ 48.0F, 48.0F });
        result.Shapes().Append(ContainerShape());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 607 of file AnimatedFindVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape_0 ( ) [inline, private]

Definition at line 259 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry());
        result.CenterPoint({ 13.566F, 278.109985F });
        result.Scale({ 3.0F, 3.0F });
        result.FillBrush(ThemeColor_Foreground());
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation(), RootProgress());
        return result;
    }

CompositionSpriteShape SpriteShape_1 ( ) [inline, private]

Definition at line 277 of file AnimatedFindVisualSource.cpp.

    {
        // Offset:<3.812, -3.938>, Scale:<0.92286, 0.92286>
        const auto result = CreateSpriteShape(Ellipse_14p188(), { 0.922860026F, 0.0F, 0.0F, 0.922860026F, 3.81200004F, -3.93799996F });
        result.StrokeBrush(_themeColor_Foreground);
        StartProgressBoundAnimation(result, L"StrokeThickness", StrokeThicknessScalarAnimation_2p5_to_2p5(), _rootProgress);
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 121 of file AnimatedFindVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 520 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
        result.IsInitialStepSingleFrame(true);
        return result;
    }

ScalarKeyFrameAnimation StrokeThicknessScalarAnimation_2p5_to_2p5 ( ) [inline, private]

Definition at line 413 of file AnimatedFindVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.5F, _holdThenStepEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 2.5F, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, 3.0F, CubicBezierEasingFunction_0());
        // Frame 20.
        result.InsertKeyFrame(0.25F, 2.5F, _holdThenStepEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.375F, 2.5F, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, 3.0F, _cubicBezierEasingFunction_0);
        // Frame 40.
        result.InsertKeyFrame(0.5F, 3.0F, _holdThenStepEasingFunction);
        // Frame 45.
        result.InsertKeyFrame(0.5625F, 2.20000005F, CubicBezierEasingFunction_1());
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, 2.5F, CubicBezierEasingFunction_2());
        // Frame 60.
        result.InsertKeyFrame(0.75F, 3.0F, _holdThenStepEasingFunction);
        // Frame 65.
        result.InsertKeyFrame(0.8125F, 2.20000005F, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, 2.5F, _cubicBezierEasingFunction_2);
        return result;
    }

ScalarKeyFrameAnimation t0ScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 442 of file AnimatedFindVisualSource.cpp.

    {
        // Frame 10.
        const auto result = CreateScalarKeyFrameAnimation(0.125000015F, 0.0F, _stepThenHoldEasingFunction);
        result.SetReferenceParameter(L"_", _root);
        // Frame 19.
        result.InsertKeyFrame(0.237499982F, 1.0F, _cubicBezierEasingFunction_3);
        // Frame 30.
        result.InsertKeyFrame(0.37500003F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487499982F, 1.0F, _cubicBezierEasingFunction_3);
        return result;
    }

ScalarKeyFrameAnimation t1ScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 456 of file AnimatedFindVisualSource.cpp.

    {
        // Frame 40.
        const auto result = CreateScalarKeyFrameAnimation(0.50000006F, 0.0F, _stepThenHoldEasingFunction);
        result.SetReferenceParameter(L"_", _root);
        // Frame 45.
        result.InsertKeyFrame(0.56249994F, 1.0F, CubicBezierEasingFunction_5());
        // Frame 45.
        result.InsertKeyFrame(0.5625F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 59.
        result.InsertKeyFrame(0.737499952F, 1.0F, _cubicBezierEasingFunction_2);
        return result;
    }

ScalarKeyFrameAnimation t2ScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 470 of file AnimatedFindVisualSource.cpp.

    {
        // Frame 60.
        const auto result = CreateScalarKeyFrameAnimation(0.75000006F, 0.0F, _stepThenHoldEasingFunction);
        result.SetReferenceParameter(L"_", _root);
        // Frame 65.
        result.InsertKeyFrame(0.81249994F, 1.0F, _cubicBezierEasingFunction_5);
        // Frame 65.
        result.InsertKeyFrame(0.8125F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 79.
        result.InsertKeyFrame(0.987499952F, 1.0F, _cubicBezierEasingFunction_2);
        return result;
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 198 of file AnimatedFindVisualSource.cpp.

    {
        const auto result = _themeColor_Foreground = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedGlobalNavigationButtonVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedGlobalNavigationButtonVisualSource Class Reference

#include "AnimatedGlobalNavigationButtonVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 50 of file AnimatedGlobalNavigationButtonVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
winrt::Windows::Foundation::TimeSpan Duration ( )
winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
winrt::Windows::UI::Color Foreground ( ) [inline]
double FrameCount ( )
double Framerate ( )
double FrameToProgress ( double frameNumber )
winrt::Windows::Foundation::Collections::IMapView<hstring, double> Markers ( )
void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.h
Generated on Sun Dec 1 2024 20:52:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
CompositionContainerShape | ContainerShape_0 ()
CompositionContainerShape | ContainerShape_1 ()
CompositionContainerShape | ContainerShape_2 ()
ContainerVisual | ContainerVisual_0 ()
ContainerVisual | ContainerVisual_1 ()
BooleanKeyFrameAnimation | CreateBooleanKeyFrameAnimation (float initialProgress, bool initialValue)
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_2 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_3 ()
winrt::com_ptr< CanvasGeometry > | Geometry_00 ()
winrt::com_ptr< CanvasGeometry > | Geometry_01 ()
winrt::com_ptr< CanvasGeometry > | Geometry_02 ()
winrt::com_ptr< CanvasGeometry > | Geometry_03 ()
winrt::com_ptr< CanvasGeometry > | Geometry_04 ()
winrt::com_ptr< CanvasGeometry > | Geometry_05 ()
winrt::com_ptr< CanvasGeometry > | Geometry_06 ()
winrt::com_ptr< CanvasGeometry > | Geometry_07 ()
winrt::com_ptr< CanvasGeometry > | Geometry_08 ()
winrt::com_ptr< CanvasGeometry > | Geometry_09 ()
winrt::com_ptr< CanvasGeometry > | Geometry_10 ()
winrt::com_ptr< CanvasGeometry > | Geometry_11 ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_1 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_0 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_1 ()
ScalarKeyFrameAnimation | OpacityScalarAnimation_1_to_1_0 ()
ScalarKeyFrameAnimation | OpacityScalarAnimation_1_to_1_1 ()
CompositionPathGeometry | PathGeometry_00 ()
CompositionPathGeometry | PathGeometry_01 ()
CompositionPathGeometry | PathGeometry_02 ()
CompositionPathGeometry | PathGeometry_03 ()
CompositionPathGeometry | PathGeometry_04 ()
CompositionPathGeometry | PathGeometry_05 ()
CompositionPathGeometry | PathGeometry_06 ()
CompositionPathGeometry | PathGeometry_07 ()
CompositionPathGeometry | PathGeometry_08 ()
CompositionPathGeometry | PathGeometry_09 ()
CompositionPathGeometry | PathGeometry_10 ()
CompositionPathGeometry | PathGeometry_11 ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ScalarKeyFrameAnimation | ScaleXScalarAnimation_2p749_to_2p749 ()
ScalarKeyFrameAnimation | ScaleYScalarAnimation_2p75_to_2p75 ()
ShapeVisual | ShapeVisual_0 ()
ShapeVisual | ShapeVisual_1 ()
CompositionSpriteShape | SpriteShape_00 ()
CompositionSpriteShape | SpriteShape_01 ()
CompositionSpriteShape | SpriteShape_02 ()
CompositionSpriteShape | SpriteShape_03 ()
CompositionSpriteShape | SpriteShape_04 ()
CompositionSpriteShape | SpriteShape_05 ()
CompositionSpriteShape | SpriteShape_06 ()
CompositionSpriteShape | SpriteShape_07 ()
CompositionSpriteShape | SpriteShape_08 ()
CompositionSpriteShape | SpriteShape_09 ()
CompositionSpriteShape | SpriteShape_10 ()
CompositionSpriteShape | SpriteShape_11 ()
CompositionSpriteShape | SpriteShape_12 ()
CompositionSpriteShape | SpriteShape_13 ()
CompositionSpriteShape | SpriteShape_14 ()
CompositionSpriteShape | SpriteShape_15 ()
CompositionSpriteShape | SpriteShape_16 ()
CompositionSpriteShape | SpriteShape_17 ()
StepEasingFunction | StepThenHoldEasingFunction ()
CompositionColorBrush | ThemeColor_Foreground ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 99 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 1225 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 1230 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 137 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 1219 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 1236 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

CompositionContainerShape ContainerShape_0 ( ) [inline, private]

Definition at line 477 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateContainerShape();
        result.CenterPoint({ 7.5F, -5.0F });
        result.Scale({ 2.75F, 2.75F });
        const auto shapes = result.Shapes();
        // ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
        shapes.Append(SpriteShape_00());
        // ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
        shapes.Append(SpriteShape_01());
        // ShapeGroup: Group 1 Group 1 Group 1 Group 1
        shapes.Append(SpriteShape_02());
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_0(), RootProgress());
        return result;
    }

CompositionContainerShape ContainerShape_1 ( ) [inline, private]

Definition at line 500 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateContainerShape();
        result.CenterPoint({ -7.5F, -5.0F });
        result.Scale({ 2.75F, 2.75F });
        const auto shapes = result.Shapes();
        // ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
        shapes.Append(SpriteShape_03());
        // ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
        shapes.Append(SpriteShape_04());
        // ShapeGroup: Group 1 Group 1 Group 1 Group 1
        shapes.Append(SpriteShape_05());
        StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_1(), _rootProgress);
        return result;
    }

CompositionContainerShape ContainerShape_2 ( ) [inline, private]

Definition at line 523 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateContainerShape();
        result.CenterPoint({ 0.0480000004F, -5.0F });
        result.Offset({ 23.9559994F, 29.0F });
        const auto shapes = result.Shapes();
        // ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
        shapes.Append(SpriteShape_06());
        // ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
        shapes.Append(SpriteShape_07());
        // ShapeGroup: Group 1 Group 1 Group 1 Group 1
        shapes.Append(SpriteShape_08());
        StartProgressBoundAnimation(result, L"Scale.X", ScaleXScalarAnimation_2p749_to_2p749(), _rootProgress);
        StartProgressBoundAnimation(result, L"Scale.Y", ScaleYScalarAnimation_2p75_to_2p75(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_0 ( ) [inline, private]

Definition at line 903 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.IsVisible(false);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
        // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
        // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
        result.Children().InsertAtTop(ShapeVisual_0());
        StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_0(), _rootProgress);
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_0(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_1 ( ) [inline, private]

Definition at line 922 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
        // 02 - Hamburger - 03 - PointerOverToNormal
        result.Children().InsertAtTop(ShapeVisual_1());
        StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_1(), _rootProgress);
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_1(), _rootProgress);
        return result;
    }

BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation | ( | float | initialProgress,
 |  | bool | initialValue |
 | ) |  |  | [inline, private]

Definition at line 150 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateBooleanKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue);
        return result;
    }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 158 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateScalarKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | winrt::float3x2 | transformMatrix,
 |  | CompositionBrush | fillBrush |
 | ) |  |  | [inline, private]

Definition at line 174 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(geometry);
        result.TransformMatrix(transformMatrix);
        result.FillBrush(fillBrush);
        return result;
    }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | winrt::float2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 166 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateVector2KeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 954 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 959 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.75F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_2 ( ) [inline, private]

Definition at line 964 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_3 ( ) [inline, private]

Definition at line 969 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.0F }, { 0.0F, 1.0F });
    }

TimeSpan Duration ( ) const [inline]

Definition at line 1244 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

winrt::com_ptr<CanvasGeometry> Geometry_00 ( ) [inline, private]

Definition at line 201 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.5F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { 7.63500023F, 0.5F }, { 7.75299978F, 0.451000005F }, { 7.85200024F, 0.351999998F } });
        sink->AddBezier({ { 7.95100021F, 0.252999991F }, { 8.0F, 0.135000005F }, { 8.0F, 0.0F } });
        sink->AddBezier({ { 8.0F, -0.135000005F }, { 7.95100021F, -0.252999991F }, { 7.85200024F, -0.351999998F } });
        sink->AddBezier({ { 7.75299978F, -0.451000005F }, { 7.63500023F, -0.5F }, { 7.5F, -0.5F } });
        sink->AddLine({ 7.5F, 0.5F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_01 ( ) [inline, private]

Definition at line 220 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.5F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 7.5F, 0.513000011F });
        sink->AddBezier({ { 7.63500023F, 0.513000011F }, { 7.75299978F, 0.463F }, { 7.85200024F, 0.363999993F } });
        sink->AddBezier({ { 7.95100021F, 0.264999986F }, { 8.0F, 0.148000002F }, { 8.0F, 0.0130000003F } });
        sink->AddBezier({ { 8.0F, -0.122000001F }, { 7.95100021F, -0.239999995F }, { 7.85200024F, -0.338999987F } });
        sink->AddBezier({ { 7.75299978F, -0.437999994F }, { 7.63500023F, -0.486999989F }, { 7.5F, -0.486999989F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_02 ( ) [inline, private]

Definition at line 239 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.5F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 7.5F, 0.5F });
        sink->AddBezier({ { 7.63500023F, 0.5F }, { 7.75299978F, 0.451000005F }, { 7.85200024F, 0.351999998F } });
        sink->AddBezier({ { 7.95100021F, 0.252999991F }, { 8.0F, 0.135000005F }, { 8.0F, 0.0F } });
        sink->AddBezier({ { 8.0F, -0.135000005F }, { 7.95100021F, -0.252999991F }, { 7.85200024F, -0.351999998F } });
        sink->AddBezier({ { 7.75299978F, -0.451000005F }, { 7.63500023F, -0.5F }, { 7.5F, -0.5F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_03 ( ) [inline, private]

Definition at line 258 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -7.5F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ -7.5F, -0.5F });
        sink->AddBezier({ { -7.63500023F, -0.5F }, { -7.75299978F, -0.451000005F }, { -7.85200024F, -0.351999998F } });
        sink->AddBezier({ { -7.95100021F, -0.252999991F }, { -8.0F, -0.135000005F }, { -8.0F, 0.0F } });
        sink->AddBezier({ { -8.0F, 0.135000005F }, { -7.95100021F, 0.252999991F }, { -7.85200024F, 0.351999998F } });
        sink->AddBezier({ { -7.75299978F, 0.451000005F }, { -7.63500023F, 0.5F }, { -7.5F, 0.5F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_04 ( ) [inline, private]

Definition at line 277 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -7.5F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { -7.63500023F, -0.486999989F }, { -7.75299978F, -0.437999994F }, { -7.85200024F, -0.338999987F } });
        sink->AddBezier({ { -7.95100021F, -0.239999995F }, { -8.0F, -0.122000001F }, { -8.0F, 0.0130000003F } });
        sink->AddBezier({ { -8.0F, 0.148000002F }, { -7.95100021F, 0.264999986F }, { -7.85200024F, 0.363999993F } });
        sink->AddBezier({ { -7.75299978F, 0.463F }, { -7.63500023F, 0.513000011F }, { -7.5F, 0.513000011F } });
        sink->AddLine({ -7.5F, -0.486999989F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_05 ( ) [inline, private]

Definition at line 296 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -7.5F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { -7.63500023F, -0.5F }, { -7.75299978F, -0.451000005F }, { -7.85200024F, -0.351999998F } });
        sink->AddBezier({ { -7.95100021F, -0.252999991F }, { -8.0F, -0.135000005F }, { -8.0F, 0.0F } });
        sink->AddBezier({ { -8.0F, 0.135000005F }, { -7.95100021F, 0.252999991F }, { -7.85200024F, 0.351999998F } });
        sink->AddBezier({ { -7.75299978F, 0.451000005F }, { -7.63500023F, 0.5F }, { -7.5F, 0.5F } });
        sink->AddLine({ -7.5F, -0.5F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_06 ( ) [inline, private]

Definition at line 323 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -7.60599995F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 7.70100021F, 0.5F });
        sink->AddLine({ 7.70100021F, -0.5F });
        sink->AddLine({ -7.60599995F, -0.5F });
        sink->AddLine({ -7.60599995F, 0.5F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_07 ( ) [inline, private]

Definition at line 349 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.70100021F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ -7.60599995F, -0.486999989F });
        sink->AddLine({ -7.60599995F, 0.513000011F });
        sink->AddLine({ 7.70100021F, 0.513000011F });
        sink->AddLine({ 7.70100021F, -0.486999989F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_08 ( ) [inline, private]

Definition at line 375 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.70100021F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ -7.60500002F, -0.5F });
        sink->AddLine({ -7.60500002F, 0.5F });
        sink->AddLine({ 7.70100021F, 0.5F });
        sink->AddLine({ 7.70100021F, -0.5F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_09 ( ) [inline, private]

Definition at line 398 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ -7.5999999F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 7.6960001F, 0.5F });
        sink->AddLine({ 7.6960001F, -0.5F });
        sink->AddLine({ -7.5999999F, -0.5F });
        sink->AddLine({ -7.5999999F, 0.5F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_10 ( ) [inline, private]

Definition at line 421 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.6960001F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ -7.5999999F, -0.486999989F });
        sink->AddLine({ -7.5999999F, 0.513000011F });
        sink->AddLine({ 7.6960001F, 0.513000011F });
        sink->AddLine({ 7.6960001F, -0.486999989F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_11 ( ) [inline, private]

Definition at line 444 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 7.6960001F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ -7.59899998F, -0.5F });
        sink->AddLine({ -7.59899998F, 0.5F });
        sink->AddLine({ 7.6960001F, 0.5F });
        sink->AddLine({ 7.6960001F, -0.5F });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 1135 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 981 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _insetClip_0 = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 1259 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_0 ( ) [inline, private]

Definition at line 185 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 10.
        const auto result = CreateBooleanKeyFrameAnimation(0.125F, true);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_1 ( ) [inline, private]

Definition at line 194 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 30.
        const auto result = CreateBooleanKeyFrameAnimation(0.375F, false);
        return result;
    }

Vector2KeyFrameAnimation OffsetVector2Animation_0 ( ) [inline, private]

Definition at line 1157 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 37.5079994F, 29.0F }, StepThenHoldEasingFunction());
        // Frame 10.
        result.InsertKeyFrame(0.125F, { 37.5079994F, 29.0F }, HoldThenStepEasingFunction());
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, { 27.5079994F, 29.0F }, CubicBezierEasingFunction_0());
        // Frame 30.
        result.InsertKeyFrame(0.375F, { 37.5079994F, 29.0F }, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, { 27.5079994F, 29.0F }, _cubicBezierEasingFunction_0);
        // Frame 40.
        result.InsertKeyFrame(0.5F, { 27.5079994F, 29.0F }, _holdThenStepEasingFunction);
        // Frame 48.
        result.InsertKeyFrame(0.600000024F, { 38.5040016F, 29.0F }, CubicBezierEasingFunction_1());
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, { 37.5079994F, 29.0F }, CubicBezierEasingFunction_2());
        // Frame 60.
        result.InsertKeyFrame(0.75F, { 27.5079994F, 29.0F }, _holdThenStepEasingFunction);
        // Frame 68.
        result.InsertKeyFrame(0.850000024F, { 38.5040016F, 29.0F }, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, { 37.5079994F, 29.0F }, _cubicBezierEasingFunction_2);
        return result;
    }

Vector2KeyFrameAnimation OffsetVector2Animation_1 ( ) [inline, private]

Definition at line 1192 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateVector2KeyFrameAnimation(0.0F, { 10.5039997F, 29.0F }, _stepThenHoldEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, { 10.5039997F, 29.0F }, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, { 20.5079994F, 29.0F }, _cubicBezierEasingFunction_0);
        // Frame 30.
        result.InsertKeyFrame(0.375F, { 10.5039997F, 29.0F }, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, { 20.5079994F, 29.0F }, _cubicBezierEasingFunction_0);
        // Frame 40.
        result.InsertKeyFrame(0.5F, { 20.5079994F, 29.0F }, _holdThenStepEasingFunction);
        // Frame 48.
        result.InsertKeyFrame(0.600000024F, { 9.50800037F, 29.0F }, _cubicBezierEasingFunction_1);
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, { 10.5039997F, 29.0F }, _cubicBezierEasingFunction_2);
        // Frame 60.
        result.InsertKeyFrame(0.75F, { 20.5079994F, 29.0F }, _holdThenStepEasingFunction);
        // Frame 68.
        result.InsertKeyFrame(0.850000024F, { 9.50800037F, 29.0F }, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, { 10.5039997F, 29.0F }, _cubicBezierEasingFunction_2);
        return result;
    }

ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_0 ( ) [inline, private]

Definition at line 991 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _stepThenHoldEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 1.0F, _holdThenStepEasingFunction);
        // Frame 20.
        result.InsertKeyFrame(0.25F, 0.0F, _holdThenStepEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.375F, 1.0F, _holdThenStepEasingFunction);
        return result;
    }

ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_1 ( ) [inline, private]

Definition at line 1007 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 0.0F, _holdThenStepEasingFunction);
        // Frame 20.
        result.InsertKeyFrame(0.25F, 1.0F, _holdThenStepEasingFunction);
        return result;
    }

CompositionPathGeometry PathGeometry_00 ( ) [inline, private]

Definition at line 540 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _pathGeometry_00 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_00())));
    }

CompositionPathGeometry PathGeometry_01 ( ) [inline, private]

Definition at line 545 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _pathGeometry_01 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_01())));
    }

CompositionPathGeometry PathGeometry_02 ( ) [inline, private]

Definition at line 550 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _pathGeometry_02 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_02())));
    }

CompositionPathGeometry PathGeometry_03 ( ) [inline, private]

Definition at line 555 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _pathGeometry_03 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_03())));
    }

CompositionPathGeometry PathGeometry_04 ( ) [inline, private]

Definition at line 560 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _pathGeometry_04 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_04())));
    }

CompositionPathGeometry PathGeometry_05 ( ) [inline, private]

Definition at line 565 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _pathGeometry_05 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_05())));
    }

CompositionPathGeometry PathGeometry_06 ( ) [inline, private]

Definition at line 578 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_06())));
    }

CompositionPathGeometry PathGeometry_07 ( ) [inline, private]

Definition at line 591 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_07())));
    }

CompositionPathGeometry PathGeometry_08 ( ) [inline, private]

Definition at line 604 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_08())));
    }

CompositionPathGeometry PathGeometry_09 ( ) [inline, private]

Definition at line 614 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_09())));
    }

CompositionPathGeometry PathGeometry_10 ( ) [inline, private]

Definition at line 624 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_10())));
    }

CompositionPathGeometry PathGeometry_11 ( ) [inline, private]

Definition at line 634 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_11())));
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 938 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        const auto children = result.Children();
        // PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
        // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
        // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
        children.InsertAtTop(ContainerVisual_0());
        // PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02 -
        // Hamburger - 03 - PointerOverToNormal
        children.InsertAtTop(ContainerVisual_1());
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 974 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 1249 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return _root;
    }

ScalarKeyFrameAnimation ScaleXScalarAnimation_2p749_to_2p749 ( ) [inline, private]

Definition at line 1026 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.74900007F, _stepThenHoldEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 2.74900007F, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, 1.43256998F, _cubicBezierEasingFunction_0);
        // Frame 30.
        result.InsertKeyFrame(0.375F, 2.74900007F, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, 1.43256998F, _cubicBezierEasingFunction_0);
        // Frame 40.
        result.InsertKeyFrame(0.5F, 1.43256998F, _holdThenStepEasingFunction);
        // Frame 48.
        result.InsertKeyFrame(0.600000024F, 2.88000011F, _cubicBezierEasingFunction_1);
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, 2.74850011F, _cubicBezierEasingFunction_2);
        // Frame 60.
        result.InsertKeyFrame(0.75F, 1.43256998F, _holdThenStepEasingFunction);
        // Frame 68.
        result.InsertKeyFrame(0.850000024F, 2.88000011F, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, 2.74850011F, _cubicBezierEasingFunction_2);
        return result;
    }

ScalarKeyFrameAnimation ScaleYScalarAnimation_2p75_to_2p75 ( ) [inline, private]

Definition at line 1061 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.75F, _stepThenHoldEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.125F, 2.75F, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.237499997F, 2.75F, CubicBezierEasingFunction_3());
        // Frame 30.
        result.InsertKeyFrame(0.375F, 2.75F, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.487500012F, 2.75F, _cubicBezierEasingFunction_3);
        // Frame 40.
        result.InsertKeyFrame(0.5F, 2.75F, _holdThenStepEasingFunction);
        // Frame 48.
        result.InsertKeyFrame(0.600000024F, 2.73294997F, _cubicBezierEasingFunction_1);
        // Frame 59.
        result.InsertKeyFrame(0.737500012F, 2.75F, _cubicBezierEasingFunction_2);
        // Frame 60.
        result.InsertKeyFrame(0.75F, 2.75F, _holdThenStepEasingFunction);
        // Frame 68.
        result.InsertKeyFrame(0.850000024F, 2.73294997F, _cubicBezierEasingFunction_1);
        // Frame 79.
        result.InsertKeyFrame(0.987500012F, 2.75F, _cubicBezierEasingFunction_2);
        return result;
    }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 1092 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        const auto shapes = result.Shapes();
        // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
        shapes.Append(ContainerShape_0());
        // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
        shapes.Append(ContainerShape_1());
        // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
        shapes.Append(ContainerShape_2());
        return result;
    }

ShapeVisual ShapeVisual_1 ( ) [inline, private]

Definition at line 1109 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        const auto shapes = result.Shapes();
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_09());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_10());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_11());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_12());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_13());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_14());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_15());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_16());
        // Layer: Right Caps 2 Right Caps 2
        shapes.Append(SpriteShape_17());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 1254 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape_00 ( ) [inline, private]

Definition at line 647 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<0, -10>
        const auto geometry = PathGeometry_00();
        const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -10.0F }, ThemeColor_Foreground());
        return result;
    }

CompositionSpriteShape SpriteShape_01 ( ) [inline, private]

Definition at line 663 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<0, -4.85>
        const auto geometry = PathGeometry_01();
        const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -4.8499999F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_02 ( ) [inline, private]

Definition at line 679 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry_02());
        result.FillBrush(_themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_03 ( ) [inline, private]

Definition at line 694 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<0, -10>
        const auto geometry = PathGeometry_03();
        const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -10.0F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_04 ( ) [inline, private]

Definition at line 710 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<0, -4.85>
        const auto geometry = PathGeometry_04();
        const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -4.8499999F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_05 ( ) [inline, private]

Definition at line 726 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry_05());
        result.FillBrush(_themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_06 ( ) [inline, private]

Definition at line 741 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<0, -10>
        const auto geometry = PathGeometry_06();
        const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -10.0F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_07 ( ) [inline, private]

Definition at line 757 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<0, -4.85>
        const auto geometry = PathGeometry_07();
        const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -4.8499999F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_08 ( ) [inline, private]

Definition at line 773 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry_08());
        result.FillBrush(_themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_09 ( ) [inline, private]

Definition at line 785 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<24.383, 10.25>, Scale:<2.75, 2.75>
        const auto geometry = _pathGeometry_00;
        const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 24.3829994F, 10.25F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_10 ( ) [inline, private]

Definition at line 798 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<24.383, 24.4125>, Scale:<2.75, 2.75>
        const auto geometry = _pathGeometry_01;
        const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 24.3829994F, 24.4125004F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_11 ( ) [inline, private]

Definition at line 811 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<24.383, 37.75>, Scale:<2.75, 2.75>
        const auto geometry = _pathGeometry_02;
        const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 24.3829994F, 37.75F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_12 ( ) [inline, private]

Definition at line 824 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<23.629, 10.25>, Scale:<2.75, 2.75>
        const auto geometry = _pathGeometry_03;
        const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 23.6289997F, 10.25F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_13 ( ) [inline, private]

Definition at line 837 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<23.629, 24.4125>, Scale:<2.75, 2.75>
        const auto geometry = _pathGeometry_04;
        const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 23.6289997F, 24.4125004F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_14 ( ) [inline, private]

Definition at line 850 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<23.629, 37.75>, Scale:<2.75, 2.75>
        const auto geometry = _pathGeometry_05;
        const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 23.6289997F, 37.75F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_15 ( ) [inline, private]

Definition at line 863 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<23.872047, 10.25>, Rotation:-0.009138340298435101 degrees,
        // Scale:<2.749, 2.75>
        const auto geometry = PathGeometry_09();
        const auto result = CreateSpriteShape(geometry, { 2.74900007F, 0.0F, 0.0F, 2.75F, 23.8720474F, 10.25F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_16 ( ) [inline, private]

Definition at line 877 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<23.872047, 24.4125>, Rotation:-0.009138340298435101 degrees,
        // Scale:<2.749, 2.75>
        const auto geometry = PathGeometry_10();
        const auto result = CreateSpriteShape(geometry, { 2.74900007F, 0.0F, 0.0F, 2.75F, 23.8720474F, 24.4125004F }, _themeColor_Foreground);
        return result;
    }

CompositionSpriteShape SpriteShape_17 ( ) [inline, private]

Definition at line 891 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        // Offset:<23.872047, 37.75>, Rotation:-0.009138340298435101 degrees,
        // Scale:<2.749, 2.75>
        const auto geometry = PathGeometry_11();
        const auto result = CreateSpriteShape(geometry, { 2.74900007F, 0.0F, 0.0F, 2.75F, 23.8720474F, 37.75F }, _themeColor_Foreground);
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 125 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 1142 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
        result.IsInitialStepSingleFrame(true);
        return result;
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 463 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

    {
        const auto result = _themeColor_Foreground = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions

AnimatedIcon Class Reference

#include "AnimatedIcon.h"

Inherits ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon >, and AnimatedIconProperties.

List of all members.

Public Member Functions

AnimatedIcon ()
~AnimatedIcon ()
winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
winrt::hstring | GetLastAnimationSegment ()
winrt::hstring | GetLastAnimationSegmentEnd ()
winrt::hstring | GetLastAnimationSegmentStart ()
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | OnAncestorAnimatedIconStatePropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnApplyTemplate ()
void | OnFallbackIconSourcePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnLayoutUpdatedAfterStateChanged (winrt::IInspectable const &sender, winrt::IInspectable const &args)
void | OnLoaded (winrt::IInspectable const &, winrt::RoutedEventArgs const &)
void | OnMirroredWhenRightToLeftPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnSourcePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnStatePropertyChanged ()
void | SetAnimationQueueBehavior (winrt::AnimatedIconAnimationQueueBehavior behavior)
void | SetDurationMultiplier (float multiplier)
void | SetQueueLength (unsigned int length)
void | SetSpeedUpMultiplier (float multiplier)

Static Public Member Functions

static winrt::DependencyProperty | AnimatedIconStateProperty ()
static void | OnAnimatedIconStatePropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

winrt::Visual | ConstructVisual ()
bool | InsertVisual (winrt::Visual visual)
void | OnAnimationCompleted (winrt::IInspectable const &, winrt::CompositionBatchCompletedEventArgs const &)
void | OnFlowDirectionPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnForegroundBrushColorPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnForegroundPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | PlaySegment (float from, float to, const std::function< void()> &cleanupAction=nullptr, float playbackMultiplier=1.0f)
void | SetRootPanelChildToFallbackIcon ()
void | TransitionAndUpdateStates (const winrt::hstring &fromState, const winrt::hstring &toState, float playbackMultiplier=1.0f)
void | TransitionStates (const winrt::hstring &fromState, const winrt::hstring &toState, const std::function< void()> &cleanupAction, float playtbackMultiplier=1.0f)
void | TrySetForegroundProperty (winrt::Color color, winrt::IAnimatedVisualSource2 const &source=nullptr)
void | TrySetForegroundProperty (winrt::IAnimatedVisualSource2 const &source=nullptr)
void | UpdateMirrorTransform ()

Detailed Description

Definition at line 13 of file AnimatedIcon.h.

Constructor & Destructor Documentation

AnimatedIcon ( )
~AnimatedIcon ( ) [inline]

Definition at line 20 of file AnimatedIcon.h.

{}

Member Function Documentation

static winrt::DependencyProperty AnimatedIconStateProperty ( ) [inline, static]

Definition at line 42 of file AnimatedIcon.h.

{ return s_StateProperty; }

winrt::Size ArrangeOverride ( winrt::Size const & finalSize )
winrt::Visual ConstructVisual ( ) [private]
winrt::hstring GetLastAnimationSegment ( )
winrt::hstring GetLastAnimationSegmentEnd ( )
winrt::hstring GetLastAnimationSegmentStart ( )
bool InsertVisual ( winrt::Visual visual ) [private]
winrt::Size MeasureOverride ( winrt::Size const & availableSize )
void OnAncestorAnimatedIconStatePropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args
 | ) |  |
static void OnAnimatedIconStatePropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static]
void OnAnimationCompleted | ( | winrt::IInspectable const & | ,
 |  | winrt::CompositionBatchCompletedEventArgs const & |  |
 | ) |  |  | [private]
void OnApplyTemplate ( )
void OnFallbackIconSourcePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & )
void OnFlowDirectionPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnForegroundBrushColorPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnForegroundPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnLayoutUpdatedAfterStateChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::IInspectable const & | args
 | ) |  |
void OnLoaded | ( | winrt::IInspectable const & | ,
 |  | winrt::RoutedEventArgs const & |
 | ) |  |
void OnMirroredWhenRightToLeftPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & )
void OnSourcePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & )
void OnStatePropertyChanged ( )
void PlaySegment | ( | float | from,
 |  | float | to,
 |  | const std::function< void()> & | cleanupAction = nullptr,
 |  | float | playbackMultiplier = 1.0f |
 | ) |  |  | [private]
void SetAnimationQueueBehavior ( winrt::AnimatedIconAnimationQueueBehavior behavior )
void SetDurationMultiplier ( float multiplier )
void SetQueueLength ( unsigned int length )
void SetRootPanelChildToFallbackIcon ( ) [private]
void SetSpeedUpMultiplier ( float multiplier )
void TransitionAndUpdateStates | ( | const winrt::hstring & | fromState,
 |  | const winrt::hstring & | toState,
 |  | float | playbackMultiplier = 1.0f |
 | ) |  |  | [private]
void TransitionStates | ( | const winrt::hstring & | fromState,
 |  | const winrt::hstring & | toState,
 |  | const std::function< void()> & | cleanupAction,
 |  | float | playtbackMultiplier = 1.0f |
 | ) |  |  | [private]
void TrySetForegroundProperty | ( | winrt::Color | color,
 |  | winrt::IAnimatedVisualSource2 const & | source = nullptr |
 | ) |  |  | [private]
void TrySetForegroundProperty ( winrt::IAnimatedVisualSource2 const & source = nullptr ) [private]
void UpdateMirrorTransform ( ) [private]
The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedIcon.h
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIconProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

AnimatedIconProperties Class Reference

#include "AnimatedIcon.properties.h"

Inherited by AnimatedIcon.

List of all members.

Public Member Functions

AnimatedIconProperties ()
void | FallbackIconSource (winrt::IconSource const &value)
winrt::IconSource | FallbackIconSource ()
bool | MirroredWhenRightToLeft ()
void | MirroredWhenRightToLeft (bool value)
void | Source (winrt::IAnimatedVisualSource2 const &value)
winrt::IAnimatedVisualSource2 | Source ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FallbackIconSourceProperty ()
static winrt::hstring | GetState (winrt::DependencyObject const &target)
static winrt::DependencyProperty | MirroredWhenRightToLeftProperty ()
static void | OnFallbackIconSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMirroredWhenRightToLeftPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | SetState (winrt::DependencyObject const &target, winrt::hstring const &value)
static winrt::DependencyProperty | SourceProperty ()
static winrt::DependencyProperty | StateProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_FallbackIconSourceProperty
static GlobalDependencyProperty | s_MirroredWhenRightToLeftProperty
static GlobalDependencyProperty | s_SourceProperty
static GlobalDependencyProperty | s_StateProperty

Detailed Description

Definition at line 7 of file AnimatedIcon.properties.h.

Constructor & Destructor Documentation

AnimatedIconProperties ( )

Definition at line 21 of file AnimatedIcon.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 74 of file AnimatedIcon.properties.cpp.

{
    s_FallbackIconSourceProperty = nullptr;
    s_MirroredWhenRightToLeftProperty = nullptr;
    s_SourceProperty = nullptr;
    s_StateProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 26 of file AnimatedIcon.properties.cpp.

{
    if (!s_FallbackIconSourceProperty)
    {
        s_FallbackIconSourceProperty =
            InitializeDependencyProperty(
                L"FallbackIconSource",
                winrt::name_of<winrt::IconSource>(),
                winrt::name_of<winrt::AnimatedIcon>(),
                false /* isAttached */,
                ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnFallbackIconSourcePropertyChanged));
    }
    if (!s_MirroredWhenRightToLeftProperty)
    {
        s_MirroredWhenRightToLeftProperty =
            InitializeDependencyProperty(
                L"MirroredWhenRightToLeft",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::AnimatedIcon>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnMirroredWhenRightToLeftPropertyChanged));
    }
    if (!s_SourceProperty)
    {
        s_SourceProperty =
            InitializeDependencyProperty(
                L"Source",
                winrt::name_of<winrt::IAnimatedVisualSource2>(),
                winrt::name_of<winrt::AnimatedIcon>(),
                false /* isAttached */,
                ValueHelper<winrt::IAnimatedVisualSource2>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnSourcePropertyChanged));
    }
    if (!s_StateProperty)
    {
        s_StateProperty =
            InitializeDependencyProperty(
                L"State",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::AnimatedIcon>(),
                true /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                &AnimatedIcon::OnAnimatedIconStatePropertyChanged);
    }
}

winrt::IconSource FallbackIconSource ( )

Definition at line 114 of file AnimatedIcon.properties.cpp.

{
    return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<AnimatedIcon*>(this)->GetValue(s_FallbackIconSourceProperty));
}

void FallbackIconSource ( winrt::IconSource const & value )

Definition at line 106 of file AnimatedIcon.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedIcon*>(this)->SetValue(s_FallbackIconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty FallbackIconSourceProperty ( ) [inline, static]

Definition at line 24 of file AnimatedIcon.properties.h.

{ return s_FallbackIconSourceProperty; }

winrt::hstring GetState ( winrt::DependencyObject const & target ) [static]

Definition at line 151 of file AnimatedIcon.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(target.GetValue(s_StateProperty));
}

bool MirroredWhenRightToLeft ( )

Definition at line 127 of file AnimatedIcon.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedIcon*>(this)->GetValue(s_MirroredWhenRightToLeftProperty));
}

void MirroredWhenRightToLeft ( bool value )

Definition at line 119 of file AnimatedIcon.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedIcon*>(this)->SetValue(s_MirroredWhenRightToLeftProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MirroredWhenRightToLeftProperty ( ) [inline, static]

Definition at line 25 of file AnimatedIcon.properties.h.

{ return s_MirroredWhenRightToLeftProperty; }

void OnFallbackIconSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 82 of file AnimatedIcon.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedIcon>();
    winrt::get_self<AnimatedIcon>(owner)->OnFallbackIconSourcePropertyChanged(args);
}

void OnMirroredWhenRightToLeftPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 90 of file AnimatedIcon.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedIcon>();
    winrt::get_self<AnimatedIcon>(owner)->OnMirroredWhenRightToLeftPropertyChanged(args);
}

void OnSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 98 of file AnimatedIcon.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedIcon>();
    winrt::get_self<AnimatedIcon>(owner)->OnSourcePropertyChanged(args);
}

void SetState | ( | winrt::DependencyObject const & | target,
 |  | winrt::hstring const & | value |
 | ) |  |  | [static]

Definition at line 146 of file AnimatedIcon.properties.cpp.

{
    target.SetValue(s_StateProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
}

void Source ( winrt::IAnimatedVisualSource2 const & value )

Definition at line 132 of file AnimatedIcon.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedIcon*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::IAnimatedVisualSource2>::BoxValueIfNecessary(value));
    }
}

winrt::IAnimatedVisualSource2 Source ( )

Definition at line 140 of file AnimatedIcon.properties.cpp.

{
    return ValueHelper<winrt::IAnimatedVisualSource2>::CastOrUnbox(static_cast<AnimatedIcon*>(this)->GetValue(s_SourceProperty));
}

static winrt::DependencyProperty SourceProperty ( ) [inline, static]

Definition at line 26 of file AnimatedIcon.properties.h.

{ return s_SourceProperty; }

static winrt::DependencyProperty StateProperty ( ) [inline, static]

Definition at line 27 of file AnimatedIcon.properties.h.

{ return s_StateProperty; }

Member Data Documentation

GlobalDependencyProperty s_FallbackIconSourceProperty [static]

Definition at line 29 of file AnimatedIcon.properties.h.

GlobalDependencyProperty s_MirroredWhenRightToLeftProperty [static]

Definition at line 30 of file AnimatedIcon.properties.h.

GlobalDependencyProperty s_SourceProperty [static]

Definition at line 31 of file AnimatedIcon.properties.h.

GlobalDependencyProperty s_StateProperty [static]

Definition at line 32 of file AnimatedIcon.properties.h.

The documentation for this class was generated from the following files:
  • Generated/AnimatedIcon.properties.h
  • Generated/AnimatedIcon.properties.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIconSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

AnimatedIconSource Class Reference

#include "AnimatedIconSource.h"

Inherits ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource >, and AnimatedIconSourceProperties.

List of all members.

Public Member Functions

winrt::IconElement | CreateIconElementCore ()
winrt::DependencyProperty | GetIconElementPropertyCore (winrt::DependencyProperty sourceProperty)

Detailed Description

Definition at line 9 of file AnimatedIconSource.h.

Member Function Documentation

winrt::IconElement CreateIconElementCore ( )

Definition at line 9 of file AnimatedIconSource.cpp.

{
    winrt::AnimatedIcon animatedIcon;
    if (auto const source = Source())
    {
        animatedIcon.Source(source);
    }
    if (auto const fallbackIconSource = FallbackIconSource())
    {
        animatedIcon.FallbackIconSource(fallbackIconSource);
    }
    if (const auto newForeground = Foreground())
    {
        animatedIcon.Foreground(newForeground);
    }
    animatedIcon.MirroredWhenRightToLeft(MirroredWhenRightToLeft());

    return animatedIcon;
}

winrt::DependencyProperty GetIconElementPropertyCore ( winrt::DependencyProperty sourceProperty )

Definition at line 29 of file AnimatedIconSource.cpp.

{
    if (sourceProperty == s_SourceProperty)
    {
        return winrt::AnimatedIcon::SourceProperty();
    }
    else if (sourceProperty == s_FallbackIconSourceProperty)
    {
        return winrt::AnimatedIcon::FallbackIconSourceProperty();
    }
    else if (sourceProperty == s_MirroredWhenRightToLeftProperty)
    {
        return winrt::AnimatedIcon::MirroredWhenRightToLeftProperty();
    }

    return __super::GetIconElementPropertyCore(sourceProperty);
}

The documentation for this class was generated from the following files:
  • IconSource/AnimatedIconSource.h
  • IconSource/AnimatedIconSource.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIconSourceProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

AnimatedIconSourceProperties Class Reference

#include "AnimatedIconSource.properties.h"

Inherited by AnimatedIconSource.

List of all members.

Public Member Functions

AnimatedIconSourceProperties ()
void | FallbackIconSource (winrt::IconSource const &value)
winrt::IconSource | FallbackIconSource ()
bool | MirroredWhenRightToLeft ()
void | MirroredWhenRightToLeft (bool value)
void | Source (winrt::IAnimatedVisualSource2 const &value)
winrt::IAnimatedVisualSource2 | Source ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FallbackIconSourceProperty ()
static winrt::DependencyProperty | MirroredWhenRightToLeftProperty ()
static winrt::DependencyProperty | SourceProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_FallbackIconSourceProperty
static GlobalDependencyProperty | s_MirroredWhenRightToLeftProperty
static GlobalDependencyProperty | s_SourceProperty

Detailed Description

Definition at line 7 of file AnimatedIconSource.properties.h.

Constructor & Destructor Documentation

AnimatedIconSourceProperties ( )

Definition at line 20 of file AnimatedIconSource.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 62 of file AnimatedIconSource.properties.cpp.

{
    s_FallbackIconSourceProperty = nullptr;
    s_MirroredWhenRightToLeftProperty = nullptr;
    s_SourceProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 25 of file AnimatedIconSource.properties.cpp.

{
    if (!s_FallbackIconSourceProperty)
    {
        s_FallbackIconSourceProperty =
            InitializeDependencyProperty(
                L"FallbackIconSource",
                winrt::name_of<winrt::IconSource>(),
                winrt::name_of<winrt::AnimatedIconSource>(),
                false /* isAttached */,
                ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_MirroredWhenRightToLeftProperty)
    {
        s_MirroredWhenRightToLeftProperty =
            InitializeDependencyProperty(
                L"MirroredWhenRightToLeft",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::AnimatedIconSource>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SourceProperty)
    {
        s_SourceProperty =
            InitializeDependencyProperty(
                L"Source",
                winrt::name_of<winrt::IAnimatedVisualSource2>(),
                winrt::name_of<winrt::AnimatedIconSource>(),
                false /* isAttached */,
                ValueHelper<winrt::IAnimatedVisualSource2>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IconSource FallbackIconSource ( )

Definition at line 77 of file AnimatedIconSource.properties.cpp.

{
    return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<AnimatedIconSource*>(this)->GetValue(s_FallbackIconSourceProperty));
}

void FallbackIconSource ( winrt::IconSource const & value )

Definition at line 69 of file AnimatedIconSource.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedIconSource*>(this)->SetValue(s_FallbackIconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty FallbackIconSourceProperty ( ) [inline, static]

Definition at line 21 of file AnimatedIconSource.properties.h.

{ return s_FallbackIconSourceProperty; }

bool MirroredWhenRightToLeft ( )

Definition at line 90 of file AnimatedIconSource.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedIconSource*>(this)->GetValue(s_MirroredWhenRightToLeftProperty));
}

void MirroredWhenRightToLeft ( bool value )

Definition at line 82 of file AnimatedIconSource.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedIconSource*>(this)->SetValue(s_MirroredWhenRightToLeftProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MirroredWhenRightToLeftProperty ( ) [inline, static]

Definition at line 22 of file AnimatedIconSource.properties.h.

{ return s_MirroredWhenRightToLeftProperty; }

void Source ( winrt::IAnimatedVisualSource2 const & value )

Definition at line 95 of file AnimatedIconSource.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedIconSource*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::IAnimatedVisualSource2>::BoxValueIfNecessary(value));
    }
}

winrt::IAnimatedVisualSource2 Source ( )

Definition at line 103 of file AnimatedIconSource.properties.cpp.

{
    return ValueHelper<winrt::IAnimatedVisualSource2>::CastOrUnbox(static_cast<AnimatedIconSource*>(this)->GetValue(s_SourceProperty));
}

static winrt::DependencyProperty SourceProperty ( ) [inline, static]

Definition at line 23 of file AnimatedIconSource.properties.h.

{ return s_SourceProperty; }

Member Data Documentation

GlobalDependencyProperty s_FallbackIconSourceProperty [static]

Definition at line 25 of file AnimatedIconSource.properties.h.

GlobalDependencyProperty s_MirroredWhenRightToLeftProperty [static]

Definition at line 26 of file AnimatedIconSource.properties.h.

GlobalDependencyProperty s_SourceProperty [static]

Definition at line 27 of file AnimatedIconSource.properties.h.

The documentation for this class was generated from the following files:
  • Generated/AnimatedIconSource.properties.h
  • Generated/AnimatedIconSource.properties.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIconTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Attributes | Static Private Attributes

AnimatedIconTestHooks Class Reference

#include "AnimatedIconTestHooks.h"

List of all members.

Static Public Member Functions

static com_ptr
< AnimatedIconTestHooks > 		EnsureGlobalTestHooks ()
static com_ptr
< AnimatedIconTestHooks > 		GetGlobalTestHooks ()
static winrt::hstring | GetLastAnimationSegment (const winrt::AnimatedIcon &animatedIcon)
static winrt::hstring | GetLastAnimationSegmentEnd (const winrt::AnimatedIcon &animatedIcon)
static winrt::hstring | GetLastAnimationSegmentStart (const winrt::AnimatedIcon &animatedIcon)
static winrt::event_token | LastAnimationSegmentChanged (winrt::TypedEventHandler< winrt::AnimatedIcon, winrt::IInspectable > const &value)
static void | LastAnimationSegmentChanged (winrt::event_token const &token)
static void | NotifyLastAnimationSegmentChanged (const winrt::AnimatedIcon &sender)
static void | SetAnimationQueueBehavior (const winrt::AnimatedIcon &animatedIcon, winrt::AnimatedIconAnimationQueueBehavior behavior)
static void | SetDurationMultiplier (const winrt::AnimatedIcon &animatedIcon, float multiplier)
static void | SetQueueLength (const winrt::AnimatedIcon &animatedIcon, int length)
static void | SetSpeedUpMultiplier (const winrt::AnimatedIcon &animatedIcon, float multiplier)

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::AnimatedIcon,
winrt::IInspectable > > 		m_lastAnimationSegmentChangedEventSource

Static Private Attributes

static com_ptr
< AnimatedIconTestHooks > 		s_testHooks

Detailed Description

Definition at line 7 of file AnimatedIconTestHooks.h.

Member Function Documentation

com_ptr< AnimatedIconTestHooks > EnsureGlobalTestHooks ( ) [static]

Definition at line 9 of file AnimatedIconTestHooks.cpp.

{
    static bool s_initialized = []() {
        s_testHooks = winrt::make_self<AnimatedIconTestHooks>();
        return true;
    }();
    return s_testHooks;
}

static com_ptr<AnimatedIconTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 11 of file AnimatedIconTestHooks.h.

    {
        return s_testHooks;
    }

winrt::hstring GetLastAnimationSegment ( const winrt::AnimatedIcon & animatedIcon ) [static]

Definition at line 50 of file AnimatedIconTestHooks.cpp.

{
    if (animatedIcon)
    {
        return winrt::get_self<AnimatedIcon>(animatedIcon)->GetLastAnimationSegment();
    }
    return L"";
}

winrt::hstring GetLastAnimationSegmentEnd ( const winrt::AnimatedIcon & animatedIcon ) [static]

Definition at line 68 of file AnimatedIconTestHooks.cpp.

{
    if (animatedIcon)
    {
        return winrt::get_self<AnimatedIcon>(animatedIcon)->GetLastAnimationSegmentEnd();
    }
    return L"";
}

winrt::hstring GetLastAnimationSegmentStart ( const winrt::AnimatedIcon & animatedIcon ) [static]

Definition at line 59 of file AnimatedIconTestHooks.cpp.

{
    if (animatedIcon)
    {
        return winrt::get_self<AnimatedIcon>(animatedIcon)->GetLastAnimationSegmentStart();
    }
    return L"";
}

winrt::event_token LastAnimationSegmentChanged ( winrt::TypedEventHandler< winrt::AnimatedIcon, winrt::IInspectable > const & value ) [static]

Definition at line 86 of file AnimatedIconTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_lastAnimationSegmentChangedEventSource.add(value);
}

void LastAnimationSegmentChanged ( winrt::event_token const & token ) [static]

Definition at line 92 of file AnimatedIconTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_lastAnimationSegmentChangedEventSource.remove(token);
}

void NotifyLastAnimationSegmentChanged ( const winrt::AnimatedIcon & sender ) [static]

Definition at line 77 of file AnimatedIconTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_lastAnimationSegmentChangedEventSource)
    {
        hooks->m_lastAnimationSegmentChangedEventSource(sender, nullptr);
    }
}

void SetAnimationQueueBehavior | ( | const winrt::AnimatedIcon & | animatedIcon,
 |  | winrt::AnimatedIconAnimationQueueBehavior | behavior |
 | ) |  |  | [static]

Definition at line 18 of file AnimatedIconTestHooks.cpp.

{
    if (animatedIcon)
    {
        winrt::get_self<AnimatedIcon>(animatedIcon)->SetAnimationQueueBehavior(behavior);
    }
}

void SetDurationMultiplier | ( | const winrt::AnimatedIcon & | animatedIcon,
 |  | float | multiplier |
 | ) |  |  | [static]

Definition at line 26 of file AnimatedIconTestHooks.cpp.

{
    if (animatedIcon)
    {
        winrt::get_self<AnimatedIcon>(animatedIcon)->SetDurationMultiplier(multiplier);
    }
}

void SetQueueLength | ( | const winrt::AnimatedIcon & | animatedIcon,
 |  | int | length |
 | ) |  |  | [static]

Definition at line 42 of file AnimatedIconTestHooks.cpp.

{
    if (animatedIcon)
    {
        winrt::get_self<AnimatedIcon>(animatedIcon)->SetQueueLength(length);
    }
}

void SetSpeedUpMultiplier | ( | const winrt::AnimatedIcon & | animatedIcon,
 |  | float | multiplier |
 | ) |  |  | [static]

Definition at line 34 of file AnimatedIconTestHooks.cpp.

{
    if (animatedIcon)
    {
        winrt::get_self<AnimatedIcon>(animatedIcon)->SetSpeedUpMultiplier(multiplier);
    }
}

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::AnimatedIcon, winrt::IInspectable> > m_lastAnimationSegmentChangedEventSource [private]

Definition at line 32 of file AnimatedIconTestHooks.h.

com_ptr<AnimatedIconTestHooks> s_testHooks [static, private]

Definition at line 31 of file AnimatedIconTestHooks.h.

The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedIconTestHooks.h
  • AnimatedIcon/AnimatedIconTestHooks.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedSettingsVisualSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedSettingsVisualSource Class Reference

#include "AnimatedSettingsVisualSource.h"

List of all members.

Public Member Functions

winrt::Windows::Foundation::TimeSpan | Duration ()
void | Foreground (winrt::Windows::UI::Color value)
winrt::Windows::UI::Color | Foreground ()
double | FrameCount ()
double | Framerate ()
double | FrameToProgress (double frameNumber)
winrt::Windows::Foundation::Collections::IMapView
< hstring, double > 		Markers ()
void | SetColorProperty (hstring const &propertyName, winrt::Windows::UI::Color value)
void | SetScalarProperty (hstring const &propertyName, double value)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics)
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual | TryCreateAnimatedVisual (winrt::Microsoft::UI::Composition::Compositor const &compositor)

Private Member Functions

winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)

Static Private Member Functions

static
winrt::Windows::Foundation::Numerics::float4 		ColorAsVector4 (winrt::Windows::UI::Color color)

Detailed Description

Definition at line 50 of file AnimatedSettingsVisualSource.h.

Member Function Documentation

static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [static, private]
TimeSpan Duration ( )

Definition at line 720 of file AnimatedSettingsVisualSource.cpp.

{
    return TimeSpan{ 20000000L };
}

winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
void Foreground ( winrt::Windows::UI::Color value )
Color Foreground ( ) [inline]

Definition at line 672 of file AnimatedSettingsVisualSource.cpp.

{
    return _themeForeground;
}

double FrameCount ( )

Definition at line 710 of file AnimatedSettingsVisualSource.cpp.

{
    return 120.0;
}

double Framerate ( )

Definition at line 715 of file AnimatedSettingsVisualSource.cpp.

{
    return 60.0;
}

double FrameToProgress ( double frameNumber )

Definition at line 725 of file AnimatedSettingsVisualSource.cpp.

{
    return frameNumber / 120.0;
}

winrt::Windows::Foundation::Collections::IMapView< hstring, double > Markers ( )

Definition at line 730 of file AnimatedSettingsVisualSource.cpp.

{
    return winrt::single_threaded_map<winrt::hstring, double>(
        std::map<winrt::hstring, double>
        {
            { L"NormalToPointerOver_Start", 0.0 },
            { L"NormalToPointerOver_End", 0.0754166666666667 },
            { L"NormalToPressed_Start", 0.08375 },
            { L"NormalToPressed_End", 0.15875 },
            { L"PointerOverToNormal_Start", 0.167083333333333 },
            { L"PointerOverToNormal_End", 0.242083333333333 },
            { L"PointerOverToPressed_Start", 0.250416666666667 },
            { L"PointerOverToPressed_End", 0.325416666666667 },
            { L"PressedToNormal_Start", 0.33375 },
            { L"PressedToNormal_End", 0.65875 },
            { L"PressedToPointerOver_Start", 0.667083333333333 },
            { L"PressedToPointerOver_End", 0.992083333333333 },
        }
    ).GetView();
}

void SetColorProperty | ( | hstring const & | propertyName,
 |  | winrt::Windows::UI::Color | value
 | ) |  |
void SetScalarProperty | ( | hstring const & | propertyName,
 |  | double | value
 | ) |  |

Definition at line 768 of file AnimatedSettingsVisualSource.cpp.

{
}

winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | winrt::Microsoft::UI::Composition::Compositor const & | compositor,
 |  | winrt::Windows::Foundation::IInspectable & | diagnostics
 | ) |  |
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual ( winrt::Microsoft::UI::Composition::Compositor const & compositor )
The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.h
  • AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedSettingsVisualSource_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedSettingsVisualSource_AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedSettingsVisualSource_AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
_reusableExpressionAnimation (compositor.CreateExpressionAnimation())
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
winrt::float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
ContainerVisual | ContainerVisual_0 ()
ContainerVisual | ContainerVisual_1 ()
ContainerVisual | ContainerVisual_2 ()
BooleanKeyFrameAnimation | CreateBooleanKeyFrameAnimation (float initialProgress, bool initialValue)
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
winrt::com_ptr< CanvasGeometry > | Geometry_0 ()
winrt::com_ptr< CanvasGeometry > | Geometry_1 ()
winrt::com_ptr< CanvasGeometry > | Geometry_2 ()
winrt::com_ptr< CanvasGeometry > | Geometry_3 ()
winrt::com_ptr< CanvasGeometry > | Geometry_4 ()
StepEasingFunction | HoldThenStepEasingFunction ()
InsetClip | InsetClip_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_0 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_1 ()
BooleanKeyFrameAnimation | IsVisibleBooleanAnimation_2 ()
CompositionPathGeometry | PathGeometry ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ScalarKeyFrameAnimation | RotationAngleInDegreesScalarAnimation_0_to_360_0 ()
ScalarKeyFrameAnimation | RotationAngleInDegreesScalarAnimation_0_to_360_1 ()
ScalarKeyFrameAnimation | RotationAngleInDegreesScalarAnimation_0_to_m20 ()
ShapeVisual | ShapeVisual_0 ()
ShapeVisual | ShapeVisual_1 ()
ShapeVisual | ShapeVisual_2 ()
CompositionSpriteShape | SpriteShape_0 ()
CompositionSpriteShape | SpriteShape_1 ()
CompositionSpriteShape | SpriteShape_2 ()
StepEasingFunction | StepThenHoldEasingFunction ()
CompositionColorBrush | ThemeColor_Foreground ()

Static Private Member Functions

static IGeometrySource2D | CanvasGeometryToIGeometrySource2D (winrt::com_ptr< CanvasGeometry > geo)
static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 99 of file AnimatedSettingsVisualSource.cpp.

Constructor & Destructor Documentation

AnimatedSettingsVisualSource_AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 616 of file AnimatedSettingsVisualSource.cpp.

        : _c{compositor}

Member Function Documentation

_reusableExpressionAnimation ( compositor. CreateExpressionAnimation() ) [inline]

Definition at line 621 of file AnimatedSettingsVisualSource.cpp.

    {
        winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
        const auto _ = Root();
    }

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 130 of file AnimatedSettingsVisualSource.cpp.

    {
        _reusableExpressionAnimation.ClearAllParameters();
        _reusableExpressionAnimation.Expression(expression);
        _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
        target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
    }

static IGeometrySource2D CanvasGeometryToIGeometrySource2D ( winrt::com_ptr< CanvasGeometry > geo ) [inline, static, private]

Definition at line 610 of file AnimatedSettingsVisualSource.cpp.

    {
        return geo.as<IGeometrySource2D>();
    }

void Close ( ) [inline]

Definition at line 627 of file AnimatedSettingsVisualSource.cpp.

    {
        if (_root)
        {
            _root.Close();
        }
    }

ContainerVisual ContainerVisual_0 ( ) [inline, private]

Definition at line 413 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(InsetClip_0());
        result.IsVisible(false);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Transforms for Controls - 04 - Settings - 06 - PressedToPointerOver Scale(1,1,0)
        result.Children().InsertAtTop(ShapeVisual_0());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_0(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_1 ( ) [inline, private]

Definition at line 428 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.IsVisible(false);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Transforms for Controls - 04 - Settings - 05 - PressedToNormal Scale(1,1,0)
        result.Children().InsertAtTop(ShapeVisual_1());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_1(), _rootProgress);
        return result;
    }

ContainerVisual ContainerVisual_2 ( ) [inline, private]

Definition at line 445 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateContainerVisual();
        result.Clip(_insetClip_0);
        result.Size({ 48.0F, 48.0F });
        // Scale:<1, 1>
        result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
        // Transforms for Controls - 04 - Settings - 01 - NormalToPointerOver Controls - 04 -
        // Settings - 02 - NormalToPressed Controls - 04 - Settings - 03 - PointerOverToNormal
        // Controls - 04 - Settings - 04 - PointerOverToPressed Scale(1,1,0)
        result.Children().InsertAtTop(ShapeVisual_2());
        StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_2(), _rootProgress);
        return result;
    }

BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation | ( | float | initialProgress,
 |  | bool | initialValue |
 | ) |  |  | [inline, private]

Definition at line 143 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateBooleanKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue);
        return result;
    }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 151 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateScalarKeyFrameAnimation();
        result.Duration(TimeSpan{ c_durationTicks });
        result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
        return result;
    }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 478 of file AnimatedSettingsVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 1.0F, 1.0F });
    }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 483 of file AnimatedSettingsVisualSource.cpp.

    {
        return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.0F, 0.0F }, { 0.0F, 1.0F });
    }

TimeSpan Duration ( ) const [inline]

Definition at line 635 of file AnimatedSettingsVisualSource.cpp.

    {
        return TimeSpan{ c_durationTicks };
    }

winrt::com_ptr<CanvasGeometry> Geometry_0 ( ) [inline, private]

Definition at line 188 of file AnimatedSettingsVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1Geometry> geometries[4]
        {
            Geometry_1().get()->Geometry(),
            Geometry_2().get()->Geometry(),
            Geometry_3().get()->Geometry(),
            Geometry_4().get()->Geometry(),
        };
        winrt::com_ptr<ID2D1GeometryGroup> group{ nullptr };
        winrt::check_hresult(_d2dFactory->CreateGeometryGroup(
            D2D1_FILL_MODE_WINDING,
            (ID2D1Geometry**)(&geometries),
            4,
            group.put()));
        auto result = winrt::make_self<CanvasGeometry>(group);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_1 ( ) [inline, private]

Definition at line 208 of file AnimatedSettingsVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 48.8800011F, 30.9810009F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { 49.1990013F, 29.9960003F }, { 49.7229996F, 29.0919991F }, { 50.4160004F, 28.3250008F } });
        sink->AddBezier({ { 50.5330009F, 28.1949997F }, { 50.7169991F, 28.1490002F }, { 50.8810005F, 28.2080002F } });
        sink->AddLine({ 52.5359993F, 28.7989998F });
        sink->AddBezier({ { 52.9850006F, 28.9589996F }, { 53.4790001F, 28.7259998F }, { 53.6389999F, 28.2770004F } });
        sink->AddBezier({ { 53.6549988F, 28.2329998F }, { 53.6669998F, 28.1879997F }, { 53.6749992F, 28.1420002F } });
        sink->AddLine({ 53.9900017F, 26.4109993F });
        sink->AddBezier({ { 54.0209999F, 26.2390003F }, { 54.1539993F, 26.1019993F }, { 54.3250008F, 26.066F } });
        sink->AddBezier({ { 54.8260002F, 25.9589996F }, { 55.3390007F, 25.9060001F }, { 55.8590012F, 25.9060001F } });
        sink->AddBezier({ { 56.3790016F, 25.9060001F }, { 56.8919983F, 25.9599991F }, { 57.3919983F, 26.066F } });
        sink->AddBezier({ { 57.5629997F, 26.1019993F }, { 57.6949997F, 26.2390003F }, { 57.7260017F, 26.4109993F } });
        sink->AddLine({ 58.0419998F, 28.1420002F });
        sink->AddBezier({ { 58.1279984F, 28.6110001F }, { 58.5769997F, 28.9209995F }, { 59.0460014F, 28.8360004F } });
        sink->AddBezier({ { 59.0919991F, 28.8279991F }, { 59.137001F, 28.8150005F }, { 59.1809998F, 28.7989998F } });
        sink->AddLine({ 60.8359985F, 28.2080002F });
        sink->AddBezier({ { 61.0F, 28.1490002F }, { 61.1850014F, 28.1949997F }, { 61.3019981F, 28.3250008F } });
        sink->AddBezier({ { 61.9949989F, 29.0919991F }, { 62.519001F, 29.9960003F }, { 62.8380013F, 30.9810009F } });
        sink->AddBezier({ { 62.8919983F, 31.1469994F }, { 62.8390007F, 31.3299999F }, { 62.7060013F, 31.4430008F } });
        sink->AddLine({ 61.3650017F, 32.5810013F });
        sink->AddBezier({ { 61.0019989F, 32.8889999F }, { 60.9580002F, 33.4350014F }, { 61.2659988F, 33.7980003F } });
        sink->AddBezier({ { 61.2960014F, 33.8339996F }, { 61.3289986F, 33.8670006F }, { 61.3650017F, 33.8969994F } });
        sink->AddLine({ 62.7060013F, 35.0359993F });
        sink->AddBezier({ { 62.8390007F, 35.1489983F }, { 62.8919983F, 35.3310013F }, { 62.8380013F, 35.4970016F } });
        sink->AddBezier({ { 62.519001F, 36.4819984F }, { 61.9949989F, 37.387001F }, { 61.3019981F, 38.1539993F } });
        sink->AddBezier({ { 61.1850014F, 38.2840004F }, { 61.0F, 38.3300018F }, { 60.8359985F, 38.2709999F } });
        sink->AddLine({ 59.1809998F, 37.6790009F });
        sink->AddBezier({ { 58.7319984F, 37.519001F }, { 58.2389984F, 37.7519989F }, { 58.0789986F, 38.2010002F } });
        sink->AddBezier({ { 58.0629997F, 38.2449989F }, { 58.0499992F, 38.2910004F }, { 58.0419998F, 38.3370018F } });
        sink->AddLine({ 57.7260017F, 40.0680008F });
        sink->AddBezier({ { 57.6949997F, 40.2400017F }, { 57.5629997F, 40.3759995F }, { 57.3919983F, 40.4119987F } });
        sink->AddBezier({ { 56.8919983F, 40.5180016F }, { 56.3790016F, 40.5730019F }, { 55.8590012F, 40.5730019F } });
        sink->AddBezier({ { 55.3390007F, 40.5730019F }, { 54.8260002F, 40.519001F }, { 54.3250008F, 40.4119987F } });
        sink->AddBezier({ { 54.1539993F, 40.3759995F }, { 54.0209999F, 40.2389984F }, { 53.9900017F, 40.0670013F } });
        sink->AddLine({ 53.6749992F, 38.3370018F });
        sink->AddBezier({ { 53.5900002F, 37.868F }, { 53.1409988F, 37.5569992F }, { 52.6720009F, 37.6430016F } });
        sink->AddBezier({ { 52.6259995F, 37.651001F }, { 52.5800018F, 37.6629982F }, { 52.5359993F, 37.6790009F } });
        sink->AddLine({ 50.8810005F, 38.2709999F });
        sink->AddBezier({ { 50.7169991F, 38.3300018F }, { 50.5330009F, 38.2840004F }, { 50.4160004F, 38.1539993F } });
        sink->AddBezier({ { 49.7229996F, 37.387001F }, { 49.1990013F, 36.4819984F }, { 48.8800011F, 35.4970016F } });
        sink->AddBezier({ { 48.8260002F, 35.3310013F }, { 48.8779984F, 35.1489983F }, { 49.0110016F, 35.0359993F } });
        sink->AddLine({ 50.3520012F, 33.8969994F });
        sink->AddBezier({ { 50.7150002F, 33.5890007F }, { 50.7599983F, 33.0439987F }, { 50.4519997F, 32.6809998F } });
        sink->AddBezier({ { 50.4220009F, 32.6450005F }, { 50.3880005F, 32.6110001F }, { 50.3520012F, 32.5810013F } });
        sink->AddLine({ 49.0110016F, 31.4430008F });
        sink->AddBezier({ { 48.8779984F, 31.3299999F }, { 48.8260002F, 31.1469994F }, { 48.8800011F, 30.9810009F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_2 ( ) [inline, private]

Definition at line 267 of file AnimatedSettingsVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 49.7949982F, 30.9759998F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddLine({ 50.9109993F, 31.9239998F });
        sink->AddBezier({ { 50.9819984F, 31.9850006F }, { 51.0480003F, 32.0509987F }, { 51.1090012F, 32.1220016F } });
        sink->AddBezier({ { 51.7260017F, 32.8479996F }, { 51.637001F, 33.9370003F }, { 50.9109993F, 34.5540009F } });
        sink->AddLine({ 49.7949982F, 35.5019989F });
        sink->AddBezier({ { 50.0470009F, 36.1769981F }, { 50.4099998F, 36.8040009F }, { 50.8689995F, 37.3590012F } });
        sink->AddLine({ 52.2459984F, 36.8670006F });
        sink->AddBezier({ { 52.3339996F, 36.8349991F }, { 52.4249992F, 36.8110008F }, { 52.5169983F, 36.7939987F } });
        sink->AddBezier({ { 53.4550018F, 36.6230011F }, { 54.3530006F, 37.2439995F }, { 54.5239983F, 38.1819992F } });
        sink->AddLine({ 54.7859993F, 39.6209984F });
        sink->AddBezier({ { 55.1380005F, 39.6800003F }, { 55.4970016F, 39.7099991F }, { 55.8590012F, 39.7099991F } });
        sink->AddBezier({ { 56.2210007F, 39.7099991F }, { 56.5789986F, 39.6800003F }, { 56.9309998F, 39.6209984F } });
        sink->AddLine({ 57.1940002F, 38.1819992F });
        sink->AddBezier({ { 57.2109985F, 38.0900002F }, { 57.2340012F, 37.9990005F }, { 57.2659988F, 37.9109993F } });
        sink->AddBezier({ { 57.5870018F, 37.0139999F }, { 58.5740013F, 36.5460014F }, { 59.4720001F, 36.8670006F } });
        sink->AddLine({ 60.848999F, 37.3590012F });
        sink->AddBezier({ { 61.3069992F, 36.8040009F }, { 61.6710014F, 36.1769981F }, { 61.9230003F, 35.5019989F } });
        sink->AddLine({ 60.8069992F, 34.5540009F });
        sink->AddBezier({ { 60.7360001F, 34.493F }, { 60.6689987F, 34.4269981F }, { 60.6080017F, 34.355999F } });
        sink->AddBezier({ { 59.9910011F, 33.6300011F }, { 60.0810013F, 32.5410004F }, { 60.8069992F, 31.9239998F } });
        sink->AddLine({ 61.9230003F, 30.9759998F });
        sink->AddBezier({ { 61.6710014F, 30.3010006F }, { 61.3069992F, 29.6739998F }, { 60.848999F, 29.1189995F } });
        sink->AddLine({ 59.4720001F, 29.6119995F });
        sink->AddBezier({ { 59.3839989F, 29.6439991F }, { 59.2929993F, 29.6669998F }, { 59.2010002F, 29.684F } });
        sink->AddBezier({ { 58.2639999F, 29.8549995F }, { 57.3650017F, 29.2339993F }, { 57.1940002F, 28.2970009F } });
        sink->AddLine({ 56.9309998F, 26.8570004F });
        sink->AddBezier({ { 56.5789986F, 26.7980003F }, { 56.2210007F, 26.7679996F }, { 55.8590012F, 26.7679996F } });
        sink->AddBezier({ { 55.4970016F, 26.7679996F }, { 55.1380005F, 26.7980003F }, { 54.7859993F, 26.8570004F } });
        sink->AddLine({ 54.5239983F, 28.2959995F });
        sink->AddBezier({ { 54.507F, 28.3880005F }, { 54.4830017F, 28.4799995F }, { 54.4510002F, 28.5680008F } });
        sink->AddBezier({ { 54.1300011F, 29.4650002F }, { 53.1430016F, 29.9330006F }, { 52.2459984F, 29.6119995F } });
        sink->AddLine({ 50.8689995F, 29.1189995F });
        sink->AddBezier({ { 50.4099998F, 29.6739998F }, { 50.0470009F, 30.3010006F }, { 49.7949982F, 30.9759998F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_3 ( ) [inline, private]

Definition at line 314 of file AnimatedSettingsVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 53.7019997F, 33.2389984F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { 53.7019997F, 32.0480003F }, { 54.6679993F, 31.0820007F }, { 55.8590012F, 31.0820007F } });
        sink->AddBezier({ { 57.0499992F, 31.0820007F }, { 58.0159988F, 32.0480003F }, { 58.0159988F, 33.2389984F } });
        sink->AddBezier({ { 58.0159988F, 34.4300003F }, { 57.0499992F, 35.3959999F }, { 55.8590012F, 35.3959999F } });
        sink->AddBezier({ { 54.6679993F, 35.3959999F }, { 53.7019997F, 34.4300003F }, { 53.7019997F, 33.2389984F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

winrt::com_ptr<CanvasGeometry> Geometry_4 ( ) [inline, private]

Definition at line 333 of file AnimatedSettingsVisualSource.cpp.

    {
        winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
        winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
        winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
        winrt::check_hresult(path->Open(sink.put()));
        sink->SetFillMode(D2D1_FILL_MODE_WINDING);
        sink->BeginFigure({ 54.5649986F, 33.2389984F }, D2D1_FIGURE_BEGIN_FILLED);
        sink->AddBezier({ { 54.5649986F, 33.9539986F }, { 55.144001F, 34.5330009F }, { 55.8590012F, 34.5330009F } });
        sink->AddBezier({ { 56.5740013F, 34.5330009F }, { 57.1529999F, 33.9539986F }, { 57.1529999F, 33.2389984F } });
        sink->AddBezier({ { 57.1529999F, 32.5239983F }, { 56.5740013F, 31.9449997F }, { 55.8590012F, 31.9449997F } });
        sink->AddBezier({ { 55.144001F, 31.9449997F }, { 54.5649986F, 32.5239983F }, { 54.5649986F, 33.2389984F } });
        sink->EndFigure(D2D1_FIGURE_END_CLOSED);
        winrt::check_hresult(sink->Close());
        auto result = winrt::make_self<CanvasGeometry>(path);
        return result;
    }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 596 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
        result.IsFinalStepSingleFrame(true);
        return result;
    }

InsetClip InsetClip_0 ( ) [inline, private]

Definition at line 495 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _insetClip_0 = _c.CreateInsetClip();
        return result;
    }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 650 of file AnimatedSettingsVisualSource.cpp.

    {
        return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_0 ( ) [inline, private]

Definition at line 160 of file AnimatedSettingsVisualSource.cpp.

    {
        // Frame 80.
        const auto result = CreateBooleanKeyFrameAnimation(0.666666687F, true);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_1 ( ) [inline, private]

Definition at line 168 of file AnimatedSettingsVisualSource.cpp.

    {
        // Frame 40.
        const auto result = CreateBooleanKeyFrameAnimation(0.333333343F, true);
        // Frame 80.
        result.InsertKeyFrame(0.666666687F, false);
        return result;
    }

BooleanKeyFrameAnimation IsVisibleBooleanAnimation_2 ( ) [inline, private]

Definition at line 180 of file AnimatedSettingsVisualSource.cpp.

    {
        // Frame 40.
        const auto result = CreateBooleanKeyFrameAnimation(0.333333343F, false);
        return result;
    }

CompositionPathGeometry PathGeometry ( ) [inline, private]

Definition at line 360 of file AnimatedSettingsVisualSource.cpp.

    {
        return _pathGeometry = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_0())));
    }

ContainerVisual Root ( ) [inline, private]

Definition at line 461 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _root = _c.CreateContainerVisual();
        const auto propertySet = result.Properties();
        propertySet.InsertScalar(L"Progress", 0.0F);
        const auto children = result.Children();
        // PreComp layer: Controls - 04 - Settings - 06 - PressedToPointerOver
        children.InsertAtTop(ContainerVisual_0());
        // PreComp layer: Controls - 04 - Settings - 05 - PressedToNormal
        children.InsertAtTop(ContainerVisual_1());
        // PreComp layer: Controls - 04 - Settings - 01 - NormalToPointerOver Controls - 04 -
        // Settings - 02 - NormalToPressed Controls - 04 - Settings - 03 - PointerOverToNormal
        // Controls - 04 - Settings - 04 - PointerOverToPressed
        children.InsertAtTop(ContainerVisual_2());
        return result;
    }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 488 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
        result.SetReferenceParameter(L"_", _root);
        return result;
    }

Visual RootVisual ( ) const [inline]

Definition at line 640 of file AnimatedSettingsVisualSource.cpp.

    {
        return _root;
    }

ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_360_0 ( ) [inline, private]

Definition at line 505 of file AnimatedSettingsVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, StepThenHoldEasingFunction());
        // Frame 70.
        result.InsertKeyFrame(0.583333313F, 0.0F, HoldThenStepEasingFunction());
        // Frame 80.
        result.InsertKeyFrame(0.666666687F, -20.0F, CubicBezierEasingFunction_0());
        // Frame 119.
        result.InsertKeyFrame(0.991666675F, 360.0F, CubicBezierEasingFunction_1());
        return result;
    }

ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_360_1 ( ) [inline, private]

Definition at line 522 of file AnimatedSettingsVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _stepThenHoldEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.25F, 0.0F, _holdThenStepEasingFunction);
        // Frame 40.
        result.InsertKeyFrame(0.333333343F, -20.0F, _cubicBezierEasingFunction_0);
        // Frame 79.
        result.InsertKeyFrame(0.658333361F, 360.0F, _cubicBezierEasingFunction_1);
        return result;
    }

ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_m20 ( ) [inline, private]

Definition at line 544 of file AnimatedSettingsVisualSource.cpp.

    {
        // Frame 0.
        const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _holdThenStepEasingFunction);
        // Frame 10.
        result.InsertKeyFrame(0.0833333358F, 0.0F, _holdThenStepEasingFunction);
        // Frame 19.
        result.InsertKeyFrame(0.158333331F, -20.0F, _cubicBezierEasingFunction_0);
        // Frame 20.
        result.InsertKeyFrame(0.166666672F, 0.0F, _holdThenStepEasingFunction);
        // Frame 30.
        result.InsertKeyFrame(0.25F, 0.0F, _holdThenStepEasingFunction);
        // Frame 39.
        result.InsertKeyFrame(0.324999988F, -20.0F, _cubicBezierEasingFunction_0);
        return result;
    }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 563 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // ShapeGroup: Group 1
        result.Shapes().Append(SpriteShape_0());
        return result;
    }

ShapeVisual ShapeVisual_1 ( ) [inline, private]

Definition at line 574 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // ShapeGroup: Group 1
        result.Shapes().Append(SpriteShape_1());
        return result;
    }

ShapeVisual ShapeVisual_2 ( ) [inline, private]

Definition at line 587 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateShapeVisual();
        result.Size({ 48.0F, 48.0F });
        // ShapeGroup: Group 1 Group 1 Group 1 Group 1
        result.Shapes().Append(SpriteShape_2());
        return result;
    }

winrt::float2 Size ( ) const [inline]

Definition at line 645 of file AnimatedSettingsVisualSource.cpp.

    {
        return { 48.0F, 48.0F };
    }

CompositionSpriteShape SpriteShape_0 ( ) [inline, private]

Definition at line 368 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(PathGeometry());
        result.CenterPoint({ 55.8590012F, 33.2389984F });
        result.Offset({ -31.8590012F, -9.23899841F });
        result.Scale({ 3.0F, 3.0F });
        result.FillBrush(ThemeColor_Foreground());
        StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_360_0(), RootProgress());
        return result;
    }

CompositionSpriteShape SpriteShape_1 ( ) [inline, private]

Definition at line 382 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(_pathGeometry);
        result.CenterPoint({ 55.8590012F, 33.2389984F });
        result.Offset({ -31.8590012F, -9.23899841F });
        result.Scale({ 3.0F, 3.0F });
        result.FillBrush(_themeColor_Foreground);
        StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_360_1(), _rootProgress);
        return result;
    }

CompositionSpriteShape SpriteShape_2 ( ) [inline, private]

Definition at line 401 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _c.CreateSpriteShape(_pathGeometry);
        result.CenterPoint({ 55.8590012F, 33.2389984F });
        result.Offset({ -31.8590012F, -9.23899841F });
        result.Scale({ 3.0F, 3.0F });
        result.FillBrush(_themeColor_Foreground);
        StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_m20(), _rootProgress);
        return result;
    }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 118 of file AnimatedSettingsVisualSource.cpp.

    {
        target.StartAnimation(animatedPropertyName, animation);
        const auto controller = target.TryGetAnimationController(animatedPropertyName);
        controller.Pause();
        controller.StartAnimation(L"Progress", controllerProgressExpression);
    }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 603 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
        result.IsInitialStepSingleFrame(true);
        return result;
    }

CompositionColorBrush ThemeColor_Foreground ( ) [inline, private]

Definition at line 352 of file AnimatedSettingsVisualSource.cpp.

    {
        const auto result = _themeColor_Foreground = _c.CreateColorBrush();
        BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
        return result;
    }

The documentation for this class was generated from the following file:
  • AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends

AnimatedVisualPlayer Struct Reference

#include "AnimatedVisualPlayer.h"

Inherits ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 >, and AnimatedVisualPlayerProperties.

List of all members.

Classes

struct | final

Public Member Functions

AnimatedVisualPlayer ()
~AnimatedVisualPlayer ()
winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | Pause ()
winrt::IAsyncAction | PlayAsync (double fromProgress, double toProgress, bool looped)
winrt::CompositionObject | ProgressObject ()
void | Resume ()
void | SetProgress (double progress)
void | Stop ()

Private Member Functions

void | CreateAnimations ()
void | DestroyAnimations ()
void | LoadFallbackContent ()
void | OnAnimationOptimizationPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnAutoPlayPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnFallbackContentPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnHiding ()
void | OnLoaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnPlaybackRatePropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnSourcePropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnStretchPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnUnhiding ()
void | OnUnloaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | SetFallbackContent (winrt::UIElement const &uiElement)
void | UnloadContent ()
void | UnloadFallbackContent ()
void | UpdateContent ()

Private Attributes

uint32_t | m_createAnimationsCounter = 0

Friends

class | AnimatedVisualPlayerProperties

Detailed Description

Definition at line 15 of file AnimatedVisualPlayer.h.

Constructor & Destructor Documentation

AnimatedVisualPlayer ( )

Definition at line 308 of file AnimatedVisualPlayer.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_AnimatedVisualPlayer);

    EnsureProperties();

    auto compositor = winrt::ElementCompositionPreview::GetElementVisual(*this).Compositor();
    m_rootVisual = compositor.CreateSpriteVisual();
    m_progressPropertySet = m_rootVisual.Properties();

    // Set an initial value for the Progress property.
    m_progressPropertySet.InsertScalar(L"Progress", 0);

    // Ensure the content can't render outside the bounds of the element.
    m_rootVisual.Clip(compositor.CreateInsetClip());

    // Subscribe to suspending, resuming, and visibility events so we can pause the animation if it's
    // definitely not visible.
    m_suspendingRevoker = winrt::Application::Current().Suspending(winrt::auto_revoke, [weakThis{ get_weak() }](
        auto const& /*sender*/,
        auto const& /*e*/)
    {
        if (auto strongThis = weakThis.get())
        {
            strongThis->OnHiding();
        }
    });

    m_resumingRevoker = winrt::Application::Current().Resuming(winrt::auto_revoke, [weakThis{ get_weak() }](
        auto const& /*sender*/,
        auto const& /*e*/)
    {
        if (auto strongThis = weakThis.get())
        {
            if (winrt::CoreWindow::GetForCurrentThread().Visible())
            {
                strongThis->OnUnhiding();
            }
        }
    });

    // Subscribe to the Loaded/Unloaded events to ensure we unload the animated visual then reload
    // when it is next loaded.
    m_loadedRevoker = Loaded(winrt::auto_revoke, { this, &AnimatedVisualPlayer::OnLoaded });
    m_unloadedRevoker = Unloaded(winrt::auto_revoke, { this, &AnimatedVisualPlayer::OnUnloaded });
}

~AnimatedVisualPlayer ( )

Definition at line 355 of file AnimatedVisualPlayer.cpp.

{
    // Ensure any outstanding play is stopped.
    if (m_nowPlaying)
    {
        // To stop and destroy m_nowPlaying we need to call Complete()
        // But we need to detach us (m_owner) from m_nowPlaying first so that AnimationPlay
        // will not try to call us (m_owner), since we are already in the destructor
        m_nowPlaying->ResetOwner();
        m_nowPlaying->Complete();
    }
}

Member Function Documentation

winrt::Size ArrangeOverride ( winrt::Size const & finalSize )

Definition at line 538 of file AnimatedVisualPlayer.cpp.

{
    if (m_isFallenBack && Children().Size() > 0)
    {
        // We are showing the fallback content due to a failure to load an animated visual.
        // Tell the content to arrange itself.
        Children().GetAt(0).Arrange(winrt::Rect{ winrt::Point{0,0}, finalSize });
        return finalSize;
    }

    winrt::float2 scale;
    winrt::float2 arrangedSize;

    if (!m_animatedVisualRoot)
    {
        // No content. 0 size.
        scale = { 1, 1 };
        arrangedSize = { 0,0 };
    }
    else
    {
        const auto stretch = Stretch();
        if (stretch == winrt::Stretch::None)
        {
            // Do not scale, do not center.
            scale = { 1, 1 };
            arrangedSize = {
                std::min(finalSize.Width, m_animatedVisualSize.x),
                std::min(finalSize.Height, m_animatedVisualSize.y)
            };
        }
        else
        {
            scale = static_cast<winrt::float2>(finalSize) / m_animatedVisualSize;

            switch (stretch)
            {
            case winrt::Stretch::Uniform:
                // Scale both dimensions by the same amount.
                if (scale.x < scale.y)
                {
                    scale.y = scale.x;
                }
                else
                {
                    scale.x = scale.y;
                }
                break;
            case winrt::Stretch::UniformToFill:
                // Scale both dimensions by the same amount and leave no gaps around the edges.
                if (scale.x > scale.y)
                {
                    scale.y = scale.x;
                }
                else
                {
                    scale.x = scale.y;
                }
                break;
            }

            // A size needs to be set because there's an InsetClip applied, and without a
            // size the clip will prevent anything from being visible.
            arrangedSize = {
                std::min(finalSize.Width / scale.x, m_animatedVisualSize.x),
                std::min(finalSize.Height / scale.y, m_animatedVisualSize.y)
            };

            // Center the animation within the available space.
            const auto offset = (finalSize - (m_animatedVisualSize * scale)) / 2;
            const auto z = 0.0F;
            m_rootVisual.Offset({ offset, z });

            // Adjust the position of the clip.
            m_rootVisual.Clip().Offset(
                (stretch == winrt::Stretch::UniformToFill)
                ? -(offset / scale)
                : winrt::float2::zero()
            );
        }
    }

    m_rootVisual.Size(arrangedSize);
    const auto z = 1.0F;
    m_rootVisual.Scale({ scale, z });

    return finalSize;
}

void CreateAnimations ( ) [private]

Definition at line 808 of file AnimatedVisualPlayer.cpp.

                                            {
    m_createAnimationsCounter++;

    if (m_isAnimationsCreated || m_animatedVisual == nullptr)
    {
        return;
    }

    // Check if current animated visual supports creating animations and create them.
    if (const auto& animatedVisual = m_animatedVisual.get())
    {
        if (const auto& animatedVisual2 = animatedVisual.try_as<winrt::IAnimatedVisual2>())
        {
            animatedVisual2.CreateAnimations();
            m_isAnimationsCreated = true;
        }
    }
}

void DestroyAnimations ( ) [private]

Definition at line 827 of file AnimatedVisualPlayer.cpp.

                                             {
    if (!m_isAnimationsCreated || m_animatedVisual == nullptr)
    {
        return;
    }

    // Call RequestCommit to make sure that previous compositor calls complete before destroying animations.
    // RequestCommitAsync is available only for RS4+
    m_rootVisual.Compositor().RequestCommitAsync().Completed(
        [me_weak = get_weak(), createAnimationsCounter = m_createAnimationsCounter](auto, auto) {
            auto me = me_weak.get();

            if (!me)
            {
                return;
            }

            // Check if there was any CreateAnimations call after DestroyAnimations.
            // We should not destroy animations in this case,
            // they will be destroyed by the following DestroyAnimations call.
            if (createAnimationsCounter != me->m_createAnimationsCounter) {
                return;
            }

            // Check if current animated visual supports destroyig animations.
            if (const auto& animatedVisual = me->m_animatedVisual.get())
            {
                if (const auto& animatedVisual2 = animatedVisual.try_as<winrt::IAnimatedVisual2>())
                {
                    animatedVisual2.DestroyAnimations();
                    me->m_isAnimationsCreated = false;
                }
            }
        }
    );
}

void LoadFallbackContent ( ) [private]

Definition at line 1059 of file AnimatedVisualPlayer.cpp.

{
    MUX_ASSERT(m_isFallenBack);

    winrt::UIElement fallbackContentElement{ nullptr };
    auto fallbackContentTemplate = FallbackContent();
    if (fallbackContentTemplate)
    {
        // Load the content from the DataTemplate. It should be a UIElement tree root.
        winrt::DependencyObject fallbackContentObject = fallbackContentTemplate.LoadContent();
        // Get the content.
        fallbackContentElement = fallbackContentObject.as<winrt::UIElement>();
    }

    // Set the (possibly null) content. We allow null content so as to handle the
    // case where the fallback content got removed - in which case we want to
    // clear out the existing content if any.
    SetFallbackContent(fallbackContentElement);
}

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 470 of file AnimatedVisualPlayer.cpp.

{
    if (m_isFallenBack && Children().Size() > 0)
    {
        // We are showing the fallback content due to a failure to load an animated visual.
        // Tell the content to measure itself.
        Children().GetAt(0).Measure(availableSize);
        // Our size is whatever the fallback content desires.
        return Children().GetAt(0).DesiredSize();
    }

    if ((!m_animatedVisualRoot) || (m_animatedVisualSize == winrt::float2::zero()))
    {
        return { 0, 0 };
    }

    switch (Stretch())
    {
    case winrt::Stretch::None:
        // No scaling will be done. Measured size is the smallest of each dimension.
        return { std::min(m_animatedVisualSize.x, availableSize.Width), std::min(m_animatedVisualSize.y, availableSize.Height) };
    case winrt::Stretch::Fill:
        // Both height and width will be scaled to fill the available space.
        if (availableSize.Width != std::numeric_limits<double>::infinity() && availableSize.Height != std::numeric_limits<double>::infinity())
        {
            // We will scale both dimensions to fill all available space.
            return availableSize;
        }
        // One of the dimensions is infinite and we can't fill infinite dimensions, so
        // fall back to Uniform so at least the non-infinite dimension will be filled.
        break;
    case winrt::Stretch::UniformToFill:
        // Height and width will be scaled by the same amount such that there is no space
        // around the edges.
        if (availableSize.Width != std::numeric_limits<double>::infinity() && availableSize.Height != std::numeric_limits<double>::infinity())
        {
            // Scale so there is no space around the edge.
            const auto widthScale = availableSize.Width / m_animatedVisualSize.x;
            const auto heightScale = availableSize.Height / m_animatedVisualSize.y;
            auto measuredSize = (heightScale < widthScale)
                ? winrt::Size{ availableSize.Width, m_animatedVisualSize.y * widthScale }
                : winrt::Size{ m_animatedVisualSize.x * heightScale, availableSize.Height };

            // Clip the size to the available size.
            measuredSize = winrt::Size{
                            std::min(measuredSize.Width, availableSize.Width),
                            std::min(measuredSize.Height, availableSize.Height)
            };

            return measuredSize;
        }
        // One of the dimensions is infinite and we can't fill infinite dimensions, so
        // fall back to Uniform so at least the non-infinite dimension will be filled.
        break;
    } // end switch

        // Uniform scaling.
        // Scale so that one dimension fits exactly and no dimension exceeds the boundary.
    const auto widthScale = ((availableSize.Width == std::numeric_limits<double>::infinity()) ? FLT_MAX : availableSize.Width) / m_animatedVisualSize.x;
    const auto heightScale = ((availableSize.Height == std::numeric_limits<double>::infinity()) ? FLT_MAX : availableSize.Height) / m_animatedVisualSize.y;
    return (heightScale > widthScale)
        ? winrt::Size{ availableSize.Width, m_animatedVisualSize.y * widthScale }
        : winrt::Size{ m_animatedVisualSize.x * heightScale, availableSize.Height };
}

void OnAnimationOptimizationPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 787 of file AnimatedVisualPlayer.cpp.

{
    auto optimization = unbox_value<winrt::PlayerAnimationOptimization>(args.NewValue());

    if (m_nowPlaying)
    {
        // If there is something in play right now we should not create/destroy animations.
        return;
    }

    if (optimization == winrt::PlayerAnimationOptimization::Resources)
    {
        DestroyAnimations();
    }
    else if (optimization == winrt::PlayerAnimationOptimization::Latency)
    {
        CreateAnimations();
    }
}

void OnAutoPlayPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 772 of file AnimatedVisualPlayer.cpp.

{
    auto newValue = unbox_value<bool>(args.NewValue());

    if (newValue && IsAnimatedVisualLoaded() && !m_nowPlaying)
    {
        // Start playing immediately.
        const auto from = 0;
        const auto to = 1;
        const auto looped = true;
        auto ignore = PlayAsync(from, to, looped);
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 462 of file AnimatedVisualPlayer.cpp.

{
    return winrt::make<AnimatedVisualPlayerAutomationPeer>(*this);
}

void OnFallbackContentPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 864 of file AnimatedVisualPlayer.cpp.

{
    if (m_isFallenBack)
    {
        LoadFallbackContent();
    }
}

void OnHiding ( ) [private]

Definition at line 444 of file AnimatedVisualPlayer.cpp.

{
    if (m_nowPlaying)
    {
        m_nowPlaying->OnHiding();
    }
}

void OnLoaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 368 of file AnimatedVisualPlayer.cpp.

{
    //
    // Do initialization here rather than in the constructor because when the
    // constructor is called the outer object is not fully initialized.
    //
    // Any initialization that can call back into the outer object MUST be
    // done here rather than the constructor.
    //
    // Other initialization can be done here too, so rather than having to
    // guess whether an initialization call calls back into the outer, just
    // put most of the initialization here.
    //

    // Calls back into the outer - must be done OnLoaded rather than in the constructor.
    winrt::ElementCompositionPreview::SetElementChildVisual(*this, m_rootVisual);

    // Set the background for AnimatedVisualPlayer to ensure it will be visible to
    // hit-testing. XAML does not hit test anything that has a null background.
    // Set here rather than in the constructor so we don't have to worry about it
    // calling back into the outer.
    Background(winrt::SolidColorBrush(winrt::Colors::Transparent()));

    if (m_isUnloaded)
    {
        // Reload the content.
        // Only do this if the element had been previously unloaded so that the
        // first Loaded event doesn't overwrite any state that was set before
        // the event was fired.
        UpdateContent();
        m_isUnloaded = false;
    }

    m_xamlRootChangedRevoker = this->XamlRoot().Changed(winrt::auto_revoke, [weakThis{ get_weak() }](
        auto const& /*sender*/,
        auto const& args)
    {
        if (auto strongThis = weakThis.get())
        {
            auto xamlRoot = strongThis->XamlRoot();
            bool hostVisibility = xamlRoot.IsHostVisible();
            if (hostVisibility != strongThis->m_isHostVisible)
            {
                strongThis->m_isHostVisible = hostVisibility;
                if (hostVisibility)
                {
                    // Transition from invisible to visible.
                    strongThis->OnUnhiding();
                }
                else
                {
                    // Transition from visible to invisible.
                    strongThis->OnHiding();
                }

            }
        }
    });
}

void OnPlaybackRatePropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 1100 of file AnimatedVisualPlayer.cpp.

{
    if (m_nowPlaying)
    {
        m_nowPlaying->SetPlaybackRate(static_cast<float>(unbox_value<double>(args.NewValue())));
    }
}

void OnSourcePropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 873 of file AnimatedVisualPlayer.cpp.

{
    auto newSource = args.NewValue().as<winrt::IAnimatedVisualSource>();

    // WARNING - this may cause reentrance via the IsPlaying DP iff m_nowPlaying.
    Stop();

    // Disconnect from the update notifications of the old source.
    m_dynamicAnimatedVisualInvalidatedRevoker.revoke();

    if (auto newDynamicSource = newSource.try_as<winrt::IDynamicAnimatedVisualSource>())
    {
        // Connect to the update notifications of the new source.
        m_dynamicAnimatedVisualInvalidatedRevoker
            = newDynamicSource.AnimatedVisualInvalidated(winrt::auto_revoke, [weakThis{ get_weak() }](
                auto const& /*sender*/,
                auto const& /*e*/)
        {
            if (auto strongThis = weakThis.get())
            {
                strongThis->UpdateContent();
            }
        });
    }

    UpdateContent();
}

void OnStretchPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 1109 of file AnimatedVisualPlayer.cpp.

{
    InvalidateMeasure();
}

void OnUnhiding ( ) [private]

Definition at line 452 of file AnimatedVisualPlayer.cpp.

{
    if (m_nowPlaying)
    {
        m_nowPlaying->OnUnhiding();
    }
}

void OnUnloaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 429 of file AnimatedVisualPlayer.cpp.

{
   // There is an anomaly in the Loading/Loaded/Unloaded events that can cause an Unloaded event to
   // fire when the element is in the tree. When this happens, we end up unlaoding our content
   // and not displaying it. Unfortunately, we can't fix this until at least version 2.0 so for
   // for now we will work around it (as we have suggested to customers to do), by checking to see
   // if we are actually unloaded before removing our content.
   if (!IsLoaded())
    {
        m_isUnloaded = true;
        // Remove any content. If we get reloaded the content will get reloaded.
        UnloadContent();
    }
}

void Pause ( )

Definition at line 637 of file AnimatedVisualPlayer.cpp.

{
    if (m_nowPlaying)
    {
        m_nowPlaying->Pause();
    }
}

winrt::IAsyncAction PlayAsync | ( | double | fromProgress,
 |  | double | toProgress,
 |  | bool | looped
 | ) |  |

Definition at line 646 of file AnimatedVisualPlayer.cpp.

{
    // Make sure that animations are created.
    CreateAnimations();

    // Used to detect reentrance.
    const auto version = ++m_playAsyncVersion;

    // Complete m_nowPlaying if it is still running.
    // Identical to Stop() call but without destroying the animations.
    // WARNING - this call may cause reentrance via the IsPlaying DP.
    if (m_nowPlaying)
    {
        m_progressPropertySet.InsertScalar(L"Progress", static_cast<float>(m_currentPlayFromProgress));
        m_nowPlaying->Complete();
    }

    if (version != m_playAsyncVersion)
    {
        // The call was overtaken by another call due to reentrance.
        co_return;
    }

    MUX_ASSERT(!m_nowPlaying);

    // Adjust for the case where there is a segment that
    // goes from [fromProgress..0] where m_fromProgress > 0.
    // This is equivalent to [fromProgress..1], and by setting
    // toProgress to 1 it saves us from generating extra key frames.
    if (toProgress == 0 && fromProgress > 0)
    {
        toProgress = 1;
    }

    // Adjust for the case where there is a segment that
    // goes from [1..toProgress] where toProgress > 0.
    // This is equivalent to [0..toProgress], and by setting
    // fromProgress to 0 it saves us from generating extra key frames.
    if (toProgress > 0 && fromProgress == 1)
    {
        fromProgress = 0;
    }

    // Create an AnimationPlay to hold the play information.
    // Keep a copy of the pointer because reentrance may cause the m_nowPlaying
    // value to change.
    auto thisPlay = m_nowPlaying = std::make_shared<AnimationPlay>(
        *this,
        std::clamp(static_cast<float>(fromProgress), 0.0F, 1.0F),
        std::clamp(static_cast<float>(toProgress), 0.0F, 1.0F),
        looped);

    if (IsAnimatedVisualLoaded())
    {
        // There is an animated visual loaded, so start it playing.
        // WARNING - this may cause reentrance via IsPlaying DP.
        thisPlay->Start();
    }

    // Capture the context so we can finish in the calling thread.
    winrt::apartment_context calling_thread;

    // Await the current play. The await will complete when the animation completes
    // or Stop() is called. It can complete on any thread.
    co_await *thisPlay;

    // Get back to the calling thread.
    // This is necessary to destruct the AnimationPlay, and because callers
    // from the dispatcher thread will expect to continue on the dispatcher thread.
    co_await calling_thread;
}

winrt::CompositionObject ProgressObject ( )

Definition at line 630 of file AnimatedVisualPlayer.cpp.

{
    return m_progressPropertySet;
}

void Resume ( )

Definition at line 719 of file AnimatedVisualPlayer.cpp.

{
    if (m_nowPlaying)
    {
        m_nowPlaying->Resume();
    }
}

void SetFallbackContent ( winrt::UIElement const & uiElement ) [private]

Definition at line 1085 of file AnimatedVisualPlayer.cpp.

{
    // Clear out the existing content.
    Children().Clear();

    // Place the content in the tree.
    if (uiElement)
    {
        Children().Append(uiElement);
    }

    // Size has probably changed. Tell XAML to re-measure.
    InvalidateMeasure();
}

void SetProgress ( double progress )

Definition at line 729 of file AnimatedVisualPlayer.cpp.

{
    // Make sure that animations are created.
    CreateAnimations();

    auto clampedProgress = std::clamp(static_cast<float>(progress), 0.0F, 1.0F);

    // WARNING: Reentrance via IsPlaying DP may occur from this point down to the end of the method
    //          iff m_nowPlaying.

    // Setting the Progress value will stop the current play.
    m_progressPropertySet.InsertScalar(L"Progress", static_cast<float>(clampedProgress));

    // Ensure the current PlayAsync task is completed.
    // Note that this explicit call is necessary, even though InsertScalar
    // will stop the current animation, because the BatchCompleted event for
    // the animation only gets hooked up if the animation is not looped.
    // If there was a BatchCompleted event and it already fired from setting the Progress
    // value then Complete() is a no-op.
    if (m_nowPlaying)
    {
        m_nowPlaying->Complete();
    }

    // If optimization is set to Resources - destroy annimations immediately.
    if (AnimationOptimization() == winrt::PlayerAnimationOptimization::Resources) {
        DestroyAnimations();
    }
}

void Stop ( )

Definition at line 761 of file AnimatedVisualPlayer.cpp.

{
    if (m_nowPlaying)
    {
        // Stop the animation by setting the Progress value to the fromProgress of the
        // most recent play.
        // This may cause reentrance via the IsPlaying DP.
        SetProgress(m_currentPlayFromProgress);
    }
}

void UnloadContent ( ) [private]

Definition at line 903 of file AnimatedVisualPlayer.cpp.

{
    if (m_animatedVisualRoot)
    {
        // This will complete any current play.
        // WARNING - this may cause reentrance via IsPlaying DP iff m_nowPlaying.
        Stop();

        // Remove the old animated visual (if any).
        auto animatedVisual = m_animatedVisual.get();
        if (animatedVisual)
        {
            m_rootVisual.Children().RemoveAll();
            m_animatedVisualRoot = nullptr;
            // Notify the animated visual that it will no longer be used.
            animatedVisual.as<winrt::IClosable>().Close();
            m_animatedVisual.set(nullptr);
        }

        // Size has changed. Tell XAML to re-measure.
        InvalidateMeasure();

        // WARNING - these may cause reentrance.
        Duration(winrt::TimeSpan{ 0 });
        Diagnostics(nullptr);
        // Set IsAnimatedVisualLoaded last as it is the property that is most likely
        // to have user code react to its state change.
        IsAnimatedVisualLoaded(false);
    }
}

void UnloadFallbackContent ( ) [private]

Definition at line 1079 of file AnimatedVisualPlayer.cpp.

{
    MUX_ASSERT(!m_isFallenBack);
    SetFallbackContent(nullptr);
}

void UpdateContent ( ) [private]

Definition at line 934 of file AnimatedVisualPlayer.cpp.

{
    // Unload the existing content, if any.
    UnloadContent();

    // Try to create a new animated visual.
    auto source = Source();
    if (!source)
    {
        // No source set. Nothing to do.
        return;
    }

    winrt::IInspectable diagnostics{};
    winrt::IAnimatedVisual animatedVisual;

    const bool createAnimations = AnimationOptimization() == winrt::PlayerAnimationOptimization::Latency;

    if (auto source3 = source.try_as<winrt::IAnimatedVisualSource3>())
    {
        animatedVisual = source3.TryCreateAnimatedVisual(m_rootVisual.Compositor(), diagnostics, createAnimations);
        m_isAnimationsCreated = createAnimations;
        m_animatedVisual.set(animatedVisual);
    }
    else
    {
        animatedVisual = source.TryCreateAnimatedVisual(m_rootVisual.Compositor(), diagnostics);
        m_isAnimationsCreated = true;

        // m_animatedVisual should be updated before DestroyAnimations call
        m_animatedVisual.set(animatedVisual);

        // Destroy animations if we don't need them.
        // Old IAnimatedVisualSource interface always creates them.
        if (!createAnimations) {
            DestroyAnimations();
        }
    }

    if (!animatedVisual)
    {
        // Create failed.

        if (!m_isFallenBack)
        {
            // Show the fallback content, if any.
            m_isFallenBack = true;
            LoadFallbackContent();
        }

        // Complete any play that was started during loading.
        // WARNING - this may cause reentrance via IsPlaying DP iff m_nowPlaying.
        Stop();

        // WARNING - this may cause reentrance.
        Diagnostics(diagnostics);

        return;
    }

    // If the content is empty, do nothing. If we are in fallback from a previous
    // failure to load, stay fallen back.
    // Empty content means the source has nothing to show yet.
    if (!animatedVisual.RootVisual() || animatedVisual.Size() == winrt::float2::zero())
    {
        // WARNING - this may cause reentrance.
        Diagnostics(diagnostics);

        return;
    }

    // We have non-empty content to show.
    // If we were in fallback, clear that fallback content.
    if (m_isFallenBack)
    {
        // Get out of the fallback state.
        m_isFallenBack = false;
        UnloadFallbackContent();
    }

    // Hook up the new animated visual.
    m_animatedVisualRoot = animatedVisual.RootVisual();
    m_animatedVisualSize = animatedVisual.Size();
    m_rootVisual.Children().InsertAtTop(m_animatedVisualRoot);

    // Size has changed. Tell XAML to re-measure.
    InvalidateMeasure();

    // Ensure the animated visual has a Progress property. This guarantees that a composition without
    // a Progress property won't blow up when we create an expression that references it below.
    // Normally the animated visual  would have a Progress property that all its expressions reference,
    // but just in case, insert it here.
    m_animatedVisualRoot.Properties().InsertScalar(L"Progress", 0.0F);

    // Tie the animated visual's Progress property to the player Progress with an ExpressionAnimation.
    auto compositor = m_rootVisual.Compositor();
    auto progressAnimation = compositor.CreateExpressionAnimation(L"_.Progress");
    progressAnimation.SetReferenceParameter(L"_", m_progressPropertySet);
    m_animatedVisualRoot.Properties().StartAnimation(L"Progress", progressAnimation);

    // WARNING - these may cause reentrance.
    // Set these properties before the if (AutoPlay()) branch calls PlayAsync(...)
    // so that the properties are updated before playing starts.
    Duration(animatedVisual.Duration());
    Diagnostics(diagnostics);
    // Set IsAnimatedVisualLoaded last as it is the property that is most likely
    // to have user code react to its state change.
    IsAnimatedVisualLoaded(true);

    // Check whether playing has been started already via reentrance from a DP handler.
    if (m_nowPlaying)
    {
        m_nowPlaying->Start();
    }
    else if (AutoPlay())
    {
        // Start playing immediately.
        const auto from = 0;
        const auto to = 1;
        const auto looped = true;
        // NOTE: If !IsAnimatedVisualLoaded() then this is a no-op.
        auto ignore = PlayAsync(from, to, looped);
    }
}

Friends And Related Function Documentation

friend class AnimatedVisualPlayerProperties [friend]

Definition at line 20 of file AnimatedVisualPlayer.h.

Member Data Documentation

uint32_t m_createAnimationsCounter = 0 [private]

Definition at line 152 of file AnimatedVisualPlayer.h.

The documentation for this struct was generated from the following files:
  • AnimatedVisualPlayer/AnimatedVisualPlayer.h
  • AnimatedVisualPlayer/AnimatedVisualPlayer.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer::final Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisualPlayer
  • AnimatedVisualPlayer::final
Public Member Functions | Private Attributes

AnimatedVisualPlayer::final Struct Reference

Inherits Awaitable.

List of all members.

Public Member Functions

AnimationPlay (AnimatedVisualPlayer &owner, float fromProgress, float toProgress, bool looped)
void | Complete ()
float | FromProgress ()
bool | IsCurrentPlay ()
void | OnHiding ()
void | OnUnhiding ()
void | Pause ()
void | ResetOwner ()
void | Resume ()
void | SetPlaybackRate (float value)
void | Start ()

Private Attributes

AnimatedVisualPlayer * m_owner

Detailed Description

Definition at line 42 of file AnimatedVisualPlayer.h.

Member Function Documentation

AnimationPlay | ( | AnimatedVisualPlayer & | owner,
 |  | float | fromProgress,
 |  | float | toProgress,
 |  | bool | looped
 | ) |  |
void Complete ( )
float FromProgress ( )
bool IsCurrentPlay ( )
void OnHiding ( )
void OnUnhiding ( )
void Pause ( )
void ResetOwner ( )
void Resume ( )
void SetPlaybackRate ( float value )
void Start ( )

Member Data Documentation

AnimatedVisualPlayer* m_owner [private]

Definition at line 72 of file AnimatedVisualPlayer.h.

The documentation for this struct was generated from the following file:
  • AnimatedVisualPlayer/AnimatedVisualPlayer.h
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayerAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

AnimatedVisualPlayerAutomationPeer Class Reference

#include "AnimatedVisualPlayerAutomationPeer.h"

Inherits ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT >.

List of all members.

Public Member Functions

AnimatedVisualPlayerAutomationPeer (winrt::AnimatedVisualPlayer const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()

Detailed Description

Definition at line 7 of file AnimatedVisualPlayerAutomationPeer.h.

Constructor & Destructor Documentation

AnimatedVisualPlayerAutomationPeer ( winrt::AnimatedVisualPlayer const & owner )

Definition at line 8 of file AnimatedVisualPlayerAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 18 of file AnimatedVisualPlayerAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Image;
}

hstring GetClassNameCore ( )

Definition at line 13 of file AnimatedVisualPlayerAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::AnimatedVisualPlayer>();
}

The documentation for this class was generated from the following files:
  • AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.h
  • AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayerProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

AnimatedVisualPlayerProperties Class Reference

#include "AnimatedVisualPlayer.properties.h"

Inherited by AnimatedVisualPlayer.

List of all members.

Public Member Functions

AnimatedVisualPlayerProperties ()
void | AnimationOptimization (winrt::PlayerAnimationOptimization const &value)
winrt::PlayerAnimationOptimization | AnimationOptimization ()
void | AutoPlay (bool value)
bool | AutoPlay ()
void | Diagnostics (winrt::IInspectable const &value)
winrt::IInspectable | Diagnostics ()
void | Duration (winrt::TimeSpan const &value)
winrt::TimeSpan | Duration ()
void | FallbackContent (winrt::DataTemplate const &value)
winrt::DataTemplate | FallbackContent ()
void | IsAnimatedVisualLoaded (bool value)
bool | IsAnimatedVisualLoaded ()
bool | IsPlaying ()
void | IsPlaying (bool value)
void | PlaybackRate (double value)
double | PlaybackRate ()
void | Source (winrt::IAnimatedVisualSource const &value)
winrt::IAnimatedVisualSource | Source ()
winrt::Stretch | Stretch ()
void | Stretch (winrt::Stretch const &value)

Static Public Member Functions

static winrt::DependencyProperty | AnimationOptimizationProperty ()
static winrt::DependencyProperty | AutoPlayProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | DiagnosticsProperty ()
static winrt::DependencyProperty | DurationProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FallbackContentProperty ()
static winrt::DependencyProperty | IsAnimatedVisualLoadedProperty ()
static winrt::DependencyProperty | IsPlayingProperty ()
static void | OnAnimationOptimizationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnAutoPlayPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFallbackContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPlaybackRatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnStretchPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PlaybackRateProperty ()
static winrt::DependencyProperty | SourceProperty ()
static winrt::DependencyProperty | StretchProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_AnimationOptimizationProperty
static GlobalDependencyProperty | s_AutoPlayProperty
static GlobalDependencyProperty | s_DiagnosticsProperty
static GlobalDependencyProperty | s_DurationProperty
static GlobalDependencyProperty | s_FallbackContentProperty
static GlobalDependencyProperty | s_IsAnimatedVisualLoadedProperty
static GlobalDependencyProperty | s_IsPlayingProperty
static GlobalDependencyProperty | s_PlaybackRateProperty
static GlobalDependencyProperty | s_SourceProperty
static GlobalDependencyProperty | s_StretchProperty

Detailed Description

Definition at line 7 of file AnimatedVisualPlayer.properties.h.

Constructor & Destructor Documentation

AnimatedVisualPlayerProperties ( )

Definition at line 27 of file AnimatedVisualPlayer.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void AnimationOptimization ( winrt::PlayerAnimationOptimization const & value )

Definition at line 208 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_AnimationOptimizationProperty, ValueHelper<winrt::PlayerAnimationOptimization>::BoxValueIfNecessary(value));
    }
}

winrt::PlayerAnimationOptimization AnimationOptimization ( )

Definition at line 216 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<winrt::PlayerAnimationOptimization>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_AnimationOptimizationProperty));
}

static winrt::DependencyProperty AnimationOptimizationProperty ( ) [inline, static]

Definition at line 42 of file AnimatedVisualPlayer.properties.h.

{ return s_AnimationOptimizationProperty; }

bool AutoPlay ( )

Definition at line 229 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_AutoPlayProperty));
}

void AutoPlay ( bool value )

Definition at line 221 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_AutoPlayProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty AutoPlayProperty ( ) [inline, static]

Definition at line 43 of file AnimatedVisualPlayer.properties.h.

{ return s_AutoPlayProperty; }

void ClearProperties ( ) [static]

Definition at line 146 of file AnimatedVisualPlayer.properties.cpp.

{
    s_AnimationOptimizationProperty = nullptr;
    s_AutoPlayProperty = nullptr;
    s_DiagnosticsProperty = nullptr;
    s_DurationProperty = nullptr;
    s_FallbackContentProperty = nullptr;
    s_IsAnimatedVisualLoadedProperty = nullptr;
    s_IsPlayingProperty = nullptr;
    s_PlaybackRateProperty = nullptr;
    s_SourceProperty = nullptr;
    s_StretchProperty = nullptr;
}

void Diagnostics ( winrt::IInspectable const & value )

Definition at line 234 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_DiagnosticsProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
    }
}

winrt::IInspectable Diagnostics ( )

Definition at line 242 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_DiagnosticsProperty));
}

static winrt::DependencyProperty DiagnosticsProperty ( ) [inline, static]

Definition at line 44 of file AnimatedVisualPlayer.properties.h.

{ return s_DiagnosticsProperty; }

winrt::TimeSpan Duration ( )

Definition at line 255 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<winrt::TimeSpan>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_DurationProperty));
}

void Duration ( winrt::TimeSpan const & value )

Definition at line 247 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_DurationProperty, ValueHelper<winrt::TimeSpan>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty DurationProperty ( ) [inline, static]

Definition at line 45 of file AnimatedVisualPlayer.properties.h.

{ return s_DurationProperty; }

void EnsureProperties ( ) [static]

Definition at line 32 of file AnimatedVisualPlayer.properties.cpp.

{
    if (!s_AnimationOptimizationProperty)
    {
        s_AnimationOptimizationProperty =
            InitializeDependencyProperty(
                L"AnimationOptimization",
                winrt::name_of<winrt::PlayerAnimationOptimization>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<winrt::PlayerAnimationOptimization>::BoxValueIfNecessary(winrt::PlayerAnimationOptimization::Latency),
                winrt::PropertyChangedCallback(&OnAnimationOptimizationPropertyChanged));
    }
    if (!s_AutoPlayProperty)
    {
        s_AutoPlayProperty =
            InitializeDependencyProperty(
                L"AutoPlay",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnAutoPlayPropertyChanged));
    }
    if (!s_DiagnosticsProperty)
    {
        s_DiagnosticsProperty =
            InitializeDependencyProperty(
                L"Diagnostics",
                winrt::name_of<winrt::IInspectable>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_DurationProperty)
    {
        s_DurationProperty =
            InitializeDependencyProperty(
                L"Duration",
                winrt::name_of<winrt::TimeSpan>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<winrt::TimeSpan>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_FallbackContentProperty)
    {
        s_FallbackContentProperty =
            InitializeDependencyProperty(
                L"FallbackContent",
                winrt::name_of<winrt::DataTemplate>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnFallbackContentPropertyChanged));
    }
    if (!s_IsAnimatedVisualLoadedProperty)
    {
        s_IsAnimatedVisualLoadedProperty =
            InitializeDependencyProperty(
                L"IsAnimatedVisualLoaded",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_IsPlayingProperty)
    {
        s_IsPlayingProperty =
            InitializeDependencyProperty(
                L"IsPlaying",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PlaybackRateProperty)
    {
        s_PlaybackRateProperty =
            InitializeDependencyProperty(
                L"PlaybackRate",
                winrt::name_of<double>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(1),
                winrt::PropertyChangedCallback(&OnPlaybackRatePropertyChanged));
    }
    if (!s_SourceProperty)
    {
        s_SourceProperty =
            InitializeDependencyProperty(
                L"Source",
                winrt::name_of<winrt::IAnimatedVisualSource>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<winrt::IAnimatedVisualSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnSourcePropertyChanged));
    }
    if (!s_StretchProperty)
    {
        s_StretchProperty =
            InitializeDependencyProperty(
                L"Stretch",
                winrt::name_of<winrt::Stretch>(),
                winrt::name_of<winrt::AnimatedVisualPlayer>(),
                false /* isAttached */,
                ValueHelper<winrt::Stretch>::BoxValueIfNecessary(winrt::Stretch::Uniform),
                winrt::PropertyChangedCallback(&OnStretchPropertyChanged));
    }
}

void FallbackContent ( winrt::DataTemplate const & value )

Definition at line 260 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_FallbackContentProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
    }
}

winrt::DataTemplate FallbackContent ( )

Definition at line 268 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_FallbackContentProperty));
}

static winrt::DependencyProperty FallbackContentProperty ( ) [inline, static]

Definition at line 46 of file AnimatedVisualPlayer.properties.h.

{ return s_FallbackContentProperty; }

void IsAnimatedVisualLoaded ( bool value )

Definition at line 273 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_IsAnimatedVisualLoadedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsAnimatedVisualLoaded ( )

Definition at line 281 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_IsAnimatedVisualLoadedProperty));
}

static winrt::DependencyProperty IsAnimatedVisualLoadedProperty ( ) [inline, static]

Definition at line 47 of file AnimatedVisualPlayer.properties.h.

{ return s_IsAnimatedVisualLoadedProperty; }

void IsPlaying ( bool value )

Definition at line 286 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_IsPlayingProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsPlaying ( )

Definition at line 294 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_IsPlayingProperty));
}

static winrt::DependencyProperty IsPlayingProperty ( ) [inline, static]

Definition at line 48 of file AnimatedVisualPlayer.properties.h.

{ return s_IsPlayingProperty; }

void OnAnimationOptimizationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 160 of file AnimatedVisualPlayer.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedVisualPlayer>();
    winrt::get_self<AnimatedVisualPlayer>(owner)->OnAnimationOptimizationPropertyChanged(args);
}

void OnAutoPlayPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 168 of file AnimatedVisualPlayer.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedVisualPlayer>();
    winrt::get_self<AnimatedVisualPlayer>(owner)->OnAutoPlayPropertyChanged(args);
}

void OnFallbackContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 176 of file AnimatedVisualPlayer.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedVisualPlayer>();
    winrt::get_self<AnimatedVisualPlayer>(owner)->OnFallbackContentPropertyChanged(args);
}

void OnPlaybackRatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 184 of file AnimatedVisualPlayer.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedVisualPlayer>();
    winrt::get_self<AnimatedVisualPlayer>(owner)->OnPlaybackRatePropertyChanged(args);
}

void OnSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 192 of file AnimatedVisualPlayer.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedVisualPlayer>();
    winrt::get_self<AnimatedVisualPlayer>(owner)->OnSourcePropertyChanged(args);
}

void OnStretchPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 200 of file AnimatedVisualPlayer.properties.cpp.

{
    auto owner = sender.as<winrt::AnimatedVisualPlayer>();
    winrt::get_self<AnimatedVisualPlayer>(owner)->OnStretchPropertyChanged(args);
}

double PlaybackRate ( )

Definition at line 307 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_PlaybackRateProperty));
}

void PlaybackRate ( double value )

Definition at line 299 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_PlaybackRateProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty PlaybackRateProperty ( ) [inline, static]

Definition at line 49 of file AnimatedVisualPlayer.properties.h.

{ return s_PlaybackRateProperty; }

void Source ( winrt::IAnimatedVisualSource const & value )

Definition at line 312 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::IAnimatedVisualSource>::BoxValueIfNecessary(value));
    }
}

winrt::IAnimatedVisualSource Source ( )

Definition at line 320 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<winrt::IAnimatedVisualSource>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_SourceProperty));
}

static winrt::DependencyProperty SourceProperty ( ) [inline, static]

Definition at line 50 of file AnimatedVisualPlayer.properties.h.

{ return s_SourceProperty; }

winrt::Stretch Stretch ( )

Definition at line 333 of file AnimatedVisualPlayer.properties.cpp.

{
    return ValueHelper<winrt::Stretch>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_StretchProperty));
}

void Stretch ( winrt::Stretch const & value )

Definition at line 325 of file AnimatedVisualPlayer.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_StretchProperty, ValueHelper<winrt::Stretch>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty StretchProperty ( ) [inline, static]

Definition at line 51 of file AnimatedVisualPlayer.properties.h.

{ return s_StretchProperty; }

Member Data Documentation

GlobalDependencyProperty s_AnimationOptimizationProperty [static]

Definition at line 53 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_AutoPlayProperty [static]

Definition at line 54 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_DiagnosticsProperty [static]

Definition at line 55 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_DurationProperty [static]

Definition at line 56 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_FallbackContentProperty [static]

Definition at line 57 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_IsAnimatedVisualLoadedProperty [static]

Definition at line 58 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_IsPlayingProperty [static]

Definition at line 59 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_PlaybackRateProperty [static]

Definition at line 60 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_SourceProperty [static]

Definition at line 61 of file AnimatedVisualPlayer.properties.h.

GlobalDependencyProperty s_StretchProperty [static]

Definition at line 62 of file AnimatedVisualPlayer.properties.h.

The documentation for this class was generated from the following files:
  • Generated/AnimatedVisualPlayer.properties.h
  • Generated/AnimatedVisualPlayer.properties.cpp
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BrightnessSun Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • BrightnessSun
Classes | Public Member Functions | Public Attributes | Properties | Private Attributes

BrightnessSun Class Reference

List of all members.

Classes

class | BrightnessSun_AnimatedVisual

Public Member Functions

double | FrameToProgress (double frameNumber)
void | SetColorProperty (string propertyName, Color value)
void | SetScalarProperty (string propertyName, double value)
Microsoft.UI.Xaml.Controls.IAnimatedVisual | TryCreateAnimatedVisual (Compositor compositor)
Microsoft.UI.Xaml.Controls.IAnimatedVisual | TryCreateAnimatedVisual (Compositor compositor, out object diagnostics)

Public Attributes

TimeSpan | Duration = > TimeSpan.FromTicks(c_durationTicks)
double | FrameCount = > 40d
double | Framerate = > 25d
IReadOnlyDictionary< string,
double > 		Markers

Properties

IReadOnlyDictionary< string,
double > 		double

Private Attributes

internal const long | c_durationTicks = 16000000

Detailed Description

Definition at line 60 of file BrightnessSun.cs.

Member Function Documentation

double FrameToProgress ( double frameNumber ) [inline]

Converts a zero-based frame number to the corresponding progress value denoting the start of the frame.

Definition at line 101 of file BrightnessSun.cs.

        {
            return frameNumber / 40d;
        }

void SetColorProperty | ( | string | propertyName,
 |  | Color | value |
 | ) |  |  | [inline]

Sets the color property with the given name, or does nothing if no such property exists.

Definition at line 118 of file BrightnessSun.cs.

        {
        }

void SetScalarProperty | ( | string | propertyName,
 |  | double | value |
 | ) |  |  | [inline]

Sets the scalar property with the given name, or does nothing if no such property exists.

Definition at line 126 of file BrightnessSun.cs.

        {
        }

Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual ( Compositor compositor ) [inline]

Definition at line 66 of file BrightnessSun.cs.

        {
            object ignored = null;
            return TryCreateAnimatedVisual(compositor, out ignored);
        }

Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual | ( | Compositor | compositor,
 |  | out object | diagnostics |
 | ) |  |  | [inline]

Definition at line 72 of file BrightnessSun.cs.

        {
            diagnostics = null;

            return
                new BrightnessSun_AnimatedVisual(
                    compositor
                    );
        }

Member Data Documentation

internal const long c_durationTicks = 16000000 [private]

Definition at line 64 of file BrightnessSun.cs.

TimeSpan Duration = > TimeSpan.FromTicks(c_durationTicks)

Gets the duration of the animation.

Definition at line 95 of file BrightnessSun.cs.

double FrameCount = > 40d

Gets the number of frames in the animation.

Definition at line 85 of file BrightnessSun.cs.

double Framerate = > 25d

Gets the frame rate of the animation.

Definition at line 90 of file BrightnessSun.cs.

IReadOnlyDictionary<string, double> Markers
Initial value:
>
            new Dictionary<string

Returns a map from marker names to corresponding progress values.

Definition at line 109 of file BrightnessSun.cs.

Property Documentation

IReadOnlyDictionary<string, double> double

Definition at line 111 of file BrightnessSun.cs.

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/BrightnessSun.cs
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BrightnessSun::BrightnessSun_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • BrightnessSun
  • BrightnessSun::BrightnessSun_AnimatedVisual
Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes

BrightnessSun::BrightnessSun_AnimatedVisual Class Reference

List of all members.

Public Attributes

TimeSpan | Duration = > TimeSpan.FromTicks(c_durationTicks)
Visual | RootVisual = > _root
Vector2 | Size = > new Vector2(380F, 324F)

Private Member Functions

internal | BrightnessSun_AnimatedVisual (Compositor compositor)
void | BindProperty (CompositionObject target, string animatedPropertyName, string expression, string referenceParameterName, CompositionObject referencedObject)
CompositionColorBrush | ColorBrush_AlmostDarkOrange_FFF18F13 ()
CompositionColorBrush | ColorBrush_AlmostGoldenrod_FFE4950C ()
CompositionColorBrush | ColorBrush_SemiTransparentWhite ()
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, Matrix3x2 transformMatrix, CompositionBrush fillBrush)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, Matrix3x2 transformMatrix)
void IDisposable. | Dispose ()
CompositionEllipseGeometry | Ellipse_74p5 ()
CanvasGeometry Geometry_0 ()
CanvasGeometry Geometry_1 ()
StepEasingFunction | HoldThenStepEasingFunction ()
CompositionPath | Path ()
CompositionPathGeometry | PathGeometry_00 ()
CompositionPathGeometry | PathGeometry_01 ()
CompositionPathGeometry | PathGeometry_02 ()
CompositionPathGeometry | PathGeometry_03 ()
CompositionPathGeometry | PathGeometry_04 ()
CompositionPathGeometry | PathGeometry_05 ()
CompositionPathGeometry | PathGeometry_06 ()
CompositionPathGeometry | PathGeometry_07 ()
CompositionPathGeometry | PathGeometry_08 ()
CompositionPathGeometry | PathGeometry_09 ()
CompositionPathGeometry | PathGeometry_10 ()
CompositionPathGeometry | PathGeometry_11 ()
CompositionPathGeometry | PathGeometry_12 ()
CompositionPathGeometry | PathGeometry_13 ()
CompositionPathGeometry | PathGeometry_14 ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ShapeVisual | ShapeVisual_0 ()
CompositionSpriteShape | SpriteShape_00 ()
CompositionSpriteShape | SpriteShape_01 ()
CompositionSpriteShape | SpriteShape_02 ()
CompositionSpriteShape | SpriteShape_03 ()
CompositionSpriteShape | SpriteShape_04 ()
CompositionSpriteShape | SpriteShape_05 ()
CompositionSpriteShape | SpriteShape_06 ()
CompositionSpriteShape | SpriteShape_07 ()
CompositionSpriteShape | SpriteShape_08 ()
CompositionSpriteShape | SpriteShape_09 ()
CompositionSpriteShape | SpriteShape_10 ()
CompositionSpriteShape | SpriteShape_11 ()
CompositionSpriteShape | SpriteShape_12 ()
CompositionSpriteShape | SpriteShape_13 ()
CompositionSpriteShape | SpriteShape_14 ()
CompositionSpriteShape | SpriteShape_15 ()
StepEasingFunction | StepThenHoldEasingFunction ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_1_to_0 ()

Static Private Member Functions

static void | StartProgressBoundAnimation (CompositionObject target, string animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Private Attributes

readonly Compositor | _c
CompositionColorBrush | _colorBrush_AlmostGoldenrod_FFE4950C
StepEasingFunction | _holdThenStepEasingFunction
CompositionPath | _path
readonly ExpressionAnimation | _reusableExpressionAnimation
ContainerVisual | _root
ExpressionAnimation | _rootProgress
ScalarKeyFrameAnimation | _tEndScalarAnimation_1_to_0
ScalarKeyFrameAnimation | _tStartScalarAnimation_1_to_0
const long | c_durationTicks = 16000000

Detailed Description

Definition at line 130 of file BrightnessSun.cs.

Constructor & Destructor Documentation

internal BrightnessSun_AnimatedVisual ( Compositor compositor ) [inline, private]

Definition at line 770 of file BrightnessSun.cs.

            {
                _c = compositor;
                _reusableExpressionAnimation = compositor.CreateExpressionAnimation();
                Root();
            }

Member Function Documentation

void BindProperty | ( | CompositionObject | target,
 |  | string | animatedPropertyName,
 |  | string | expression,
 |  | string | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 155 of file BrightnessSun.cs.

            {
                _reusableExpressionAnimation.ClearAllParameters();
                _reusableExpressionAnimation.Expression = expression;
                _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
                target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
            }

CompositionColorBrush ColorBrush_AlmostDarkOrange_FFF18F13 ( ) [inline, private]

Definition at line 224 of file BrightnessSun.cs.

            {
                return _c.CreateColorBrush(Color.FromArgb(0xFF, 0xF1, 0x8F, 0x13));
            }

CompositionColorBrush ColorBrush_AlmostGoldenrod_FFE4950C ( ) [inline, private]

Definition at line 229 of file BrightnessSun.cs.

            {
                return _colorBrush_AlmostGoldenrod_FFE4950C = _c.CreateColorBrush(Color.FromArgb(0xFF, 0xE4, 0x95, 0x0C));
            }

CompositionColorBrush ColorBrush_SemiTransparentWhite ( ) [inline, private]

Definition at line 236 of file BrightnessSun.cs.

            {
                return _c.CreateColorBrush(Color.FromArgb(0x38, 0xFF, 0xFF, 0xFF));
            }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 168 of file BrightnessSun.cs.

            {
                var result = _c.CreateScalarKeyFrameAnimation();
                result.Duration = TimeSpan.FromTicks(c_durationTicks);
                result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
                return result;
            }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | Matrix3x2 | transformMatrix |
 | ) |  |  | [inline, private]

Definition at line 176 of file BrightnessSun.cs.

            {
                var result = _c.CreateSpriteShape(geometry);
                result.TransformMatrix = transformMatrix;
                return result;
            }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | Matrix3x2 | transformMatrix,
 |  | CompositionBrush | fillBrush |
 | ) |  |  | [inline, private]

Definition at line 183 of file BrightnessSun.cs.

            {
                var result = _c.CreateSpriteShape(geometry);
                result.TransformMatrix = transformMatrix;
                result.FillBrush = fillBrush;
                return result;
            }

void IDisposable. Dispose ( ) [private]
CompositionEllipseGeometry Ellipse_74p5 ( ) [inline, private]

Definition at line 244 of file BrightnessSun.cs.

            {
                var result = _c.CreateEllipseGeometry();
                result.Radius = new Vector2(74.5F, 74.5F);
                return result;
            }

CanvasGeometry Geometry_0 ( ) [inline, private]

Definition at line 191 of file BrightnessSun.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-9F, -134F));
                    builder.AddLine(new Vector2(-9F, -68F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_1 ( ) [inline, private]

Definition at line 206 of file BrightnessSun.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.SetFilledRegionDetermination(CanvasFilledRegionDetermination.Winding);
                    builder.BeginFigure(new Vector2(3F, -54F));
                    builder.AddCubicBezier(new Vector2(22.2800007F, -39.7159996F), new Vector2(51F, 26F), new Vector2(0F, 53F));
                    builder.AddCubicBezier(new Vector2(17.1389999F, 58.6279984F), new Vector2(43.5250015F, 26.9519997F), new Vector2(40.9780006F, -6.6079998F));
                    builder.AddCubicBezier(new Vector2(39.7750015F, -22.4619999F), new Vector2(30.8500004F, -43.4980011F), new Vector2(3F, -54F));
                    builder.EndFigure(CanvasFigureLoop.Closed);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 755 of file BrightnessSun.cs.

            {
                var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
                result.IsFinalStepSingleFrame = true;
                return result;
            }

CompositionPath Path ( ) [inline, private]

Definition at line 251 of file BrightnessSun.cs.

            {
                var result = _path = new CompositionPath(Geometry_0());
                return result;
            }

CompositionPathGeometry PathGeometry_00 ( ) [inline, private]

Definition at line 257 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(Path());
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", TStartScalarAnimation_1_to_0(), RootProgress());
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", TEndScalarAnimation_1_to_0(), _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_01 ( ) [inline, private]

Definition at line 270 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_02 ( ) [inline, private]

Definition at line 283 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_03 ( ) [inline, private]

Definition at line 296 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_04 ( ) [inline, private]

Definition at line 309 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_05 ( ) [inline, private]

Definition at line 322 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_06 ( ) [inline, private]

Definition at line 335 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_07 ( ) [inline, private]

Definition at line 348 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_08 ( ) [inline, private]

Definition at line 361 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_09 ( ) [inline, private]

Definition at line 374 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_10 ( ) [inline, private]

Definition at line 387 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_11 ( ) [inline, private]

Definition at line 400 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_12 ( ) [inline, private]

Definition at line 413 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_13 ( ) [inline, private]

Definition at line 426 of file BrightnessSun.cs.

            {
                var result = _c.CreatePathGeometry(_path);
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 1F);
                StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
                StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
                BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
                return result;
            }

CompositionPathGeometry PathGeometry_14 ( ) [inline, private]

Definition at line 441 of file BrightnessSun.cs.

            {
                return _c.CreatePathGeometry(new CompositionPath(Geometry_1()));
            }

ContainerVisual Root ( ) [inline, private]

Definition at line 680 of file BrightnessSun.cs.

            {
                var result = _root = _c.CreateContainerVisual();
                var propertySet = result.Properties;
                propertySet.InsertScalar("Progress", 0F);
                // Layer aggregator
                result.Children.InsertAtTop(ShapeVisual_0());
                return result;
            }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 690 of file BrightnessSun.cs.

            {
                var result = _rootProgress = _c.CreateExpressionAnimation("_.Progress");
                result.SetReferenceParameter("_", _root);
                return result;
            }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 715 of file BrightnessSun.cs.

            {
                var result = _c.CreateShapeVisual();
                result.Size = new Vector2(380F, 324F);
                var shapes = result.Shapes;
                // Scale:0.8,0.8, Offset:<178.4, 151.2>
                shapes.Add(SpriteShape_00());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_01());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_02());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_03());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_04());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_05());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_06());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_07());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_08());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_09());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_10());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_11());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_12());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_13());
                // Offset:<192, 161>
                shapes.Add(SpriteShape_14());
                // Scale:0.70016,1.05751, Offset:<202, 162>
                shapes.Add(SpriteShape_15());
                return result;
            }

CompositionSpriteShape SpriteShape_00 ( ) [inline, private]

Definition at line 448 of file BrightnessSun.cs.

            {
                // Offset:<190, 162>, Rotation:-0.011598425070025746 degrees, Scale:<0.8, 0.8>
                var result = CreateSpriteShape(Ellipse_74p5(), new Matrix3x2(0.800000012F, 0F, 0F, 0.800000012F, 190F, 162F), ColorBrush_AlmostDarkOrange_FFF18F13());
                return result;
            }

CompositionSpriteShape SpriteShape_01 ( ) [inline, private]

Definition at line 457 of file BrightnessSun.cs.

            {
                // Offset:<193.31511, 158.30362>, Rotation:25.999998864742253 degrees
                var result = CreateSpriteShape(PathGeometry_00(), new Matrix3x2(0.898794055F, 0.438371152F, -0.438371152F, 0.898794055F, 193.315109F, 158.303619F));
                result.StrokeBrush = ColorBrush_AlmostGoldenrod_FFE4950C();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_02 ( ) [inline, private]

Definition at line 472 of file BrightnessSun.cs.

            {
                // Offset:<195.67914, 156.45663>, Rotation:52.00000073708994 degrees, Scale:<1, 1>
                var result = CreateSpriteShape(PathGeometry_01(), new Matrix3x2(0.615661502F, 0.788010776F, -0.788010776F, 0.615661502F, 195.679138F, 156.456635F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_03 ( ) [inline, private]

Definition at line 487 of file BrightnessSun.cs.

            {
                // Offset:<198.61359, 155.8329>, Rotation:78.00000018744032 degrees, Scale:<1, 1>
                var result = CreateSpriteShape(PathGeometry_02(), new Matrix3x2(0.2079117F, 0.978147626F, -0.978147626F, 0.2079117F, 198.613586F, 155.832901F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_04 ( ) [inline, private]

Definition at line 502 of file BrightnessSun.cs.

            {
                // Offset:<201.52448, 156.55867>, Rotation:104.00000036039357 degrees
                var result = CreateSpriteShape(PathGeometry_03(), new Matrix3x2(-0.241921902F, 0.970295727F, -0.970295727F, -0.241921902F, 201.524475F, 156.55867F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_05 ( ) [inline, private]

Definition at line 517 of file BrightnessSun.cs.

            {
                // Offset:<203.8226, 158.48703>, Rotation:130.0000019177151 degrees
                var result = CreateSpriteShape(PathGeometry_04(), new Matrix3x2(-0.642787635F, 0.766044438F, -0.766044438F, -0.642787635F, 203.822601F, 158.48703F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_06 ( ) [inline, private]

Definition at line 532 of file BrightnessSun.cs.

            {
                // Offset:<205.04282, 161.22766>, Rotation:156.0000044610642 degrees
                var result = CreateSpriteShape(PathGeometry_05(), new Matrix3x2(-0.913545489F, 0.406736642F, -0.406736642F, -0.913545489F, 205.042816F, 161.227661F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_07 ( ) [inline, private]

Definition at line 547 of file BrightnessSun.cs.

            {
                // Offset:<204.93811, 164.22583>, Rotation:-178.0000222417307 degrees, Scale:<1, 1>
                var result = CreateSpriteShape(PathGeometry_06(), new Matrix3x2(-0.9993909F, -0.034899503F, 0.034899503F, -0.9993909F, 204.93811F, 164.22583F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_08 ( ) [inline, private]

Definition at line 562 of file BrightnessSun.cs.

            {
                // Offset:<203.5297, 166.87468>, Rotation:-151.99999734470822 degrees, Scale:<1, 1>
                var result = CreateSpriteShape(PathGeometry_07(), new Matrix3x2(-0.882947624F, -0.469471633F, 0.469471633F, -0.882947624F, 203.529694F, 166.87468F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_09 ( ) [inline, private]

Definition at line 577 of file BrightnessSun.cs.

            {
                // Offset:<201.10265, 168.63803>, Rotation:-125.99999693065644 degrees, Scale:<1, 1>
                var result = CreateSpriteShape(PathGeometry_08(), new Matrix3x2(-0.587785244F, -0.809017062F, 0.809017062F, -0.587785244F, 201.102646F, 168.638031F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_10 ( ) [inline, private]

Definition at line 592 of file BrightnessSun.cs.

            {
                // Offset:<198.14822, 169.15898>, Rotation:-99.99999771691004 degrees, Scale:<1, 1>
                var result = CreateSpriteShape(PathGeometry_09(), new Matrix3x2(-0.173648149F, -0.984807849F, 0.984807849F, -0.173648149F, 198.148224F, 169.158981F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_11 ( ) [inline, private]

Definition at line 607 of file BrightnessSun.cs.

            {
                // Offset:<195.26443, 168.33206>, Rotation:-73.999998250233 degrees,
                // Scale:<1.0000001, 1.0000001>
                var result = CreateSpriteShape(PathGeometry_10(), new Matrix3x2(0.275637418F, -0.961261809F, 0.961261809F, 0.275637418F, 195.264435F, 168.332062F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_12 ( ) [inline, private]

Definition at line 623 of file BrightnessSun.cs.

            {
                // Offset:<193.035, 166.32468>, Rotation:-47.9999987246911 degrees,
                // Scale:<1.0000001, 1.0000001>
                var result = CreateSpriteShape(PathGeometry_11(), new Matrix3x2(0.669130743F, -0.743144929F, 0.743144929F, 0.669130743F, 193.035004F, 166.324677F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_13 ( ) [inline, private]

Definition at line 639 of file BrightnessSun.cs.

            {
                // Offset:<191.91118, 163.54312>, Rotation:-22.000004635862652 degrees,
                // Scale:<1.0000002, 1.0000002>
                var result = CreateSpriteShape(PathGeometry_12(), new Matrix3x2(0.927184045F, -0.374606639F, 0.374606639F, 0.927184045F, 191.911179F, 163.543121F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_14 ( ) [inline, private]

Definition at line 655 of file BrightnessSun.cs.

            {
                // Offset:<192.12045, 160.55043>, Rotation:4.000026206779586 degrees,
                // Scale:<1.0000002, 1.0000002>
                var result = CreateSpriteShape(PathGeometry_13(), new Matrix3x2(0.997564256F, 0.0697565377F, -0.0697565377F, 0.997564256F, 192.120453F, 160.55043F));
                result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 10F;
                return result;
            }

CompositionSpriteShape SpriteShape_15 ( ) [inline, private]

Definition at line 671 of file BrightnessSun.cs.

            {
                // Offset:<202, 162>, Rotation:-0.008999309291422224 degrees,
                // Scale:<1.1669357, 1.05751>
                var result = CreateSpriteShape(PathGeometry_14(), new Matrix3x2(1.16693568F, 0F, 0F, 1.05751002F, 202F, 162F), ColorBrush_SemiTransparentWhite());
                return result;
            }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | string | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 143 of file BrightnessSun.cs.

            {
                target.StartAnimation(animatedPropertyName, animation);
                var controller = target.TryGetAnimationController(animatedPropertyName);
                controller.Pause();
                controller.StartAnimation("Progress", controllerProgressExpression);
            }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 763 of file BrightnessSun.cs.

            {
                var result = _c.CreateStepEasingFunction();
                result.IsInitialStepSingleFrame = true;
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0 ( ) [inline, private]

Definition at line 698 of file BrightnessSun.cs.

            {
                var result = _tEndScalarAnimation_1_to_0 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                result.InsertKeyFrame(0.125F, 1F, _holdThenStepEasingFunction);
                result.InsertKeyFrame(0.75F, 0F, _c.CreateCubicBezierEasingFunction(new Vector2(0F, 0F), new Vector2(0F, 0.899999976F)));
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_1_to_0 ( ) [inline, private]

Definition at line 707 of file BrightnessSun.cs.

            {
                var result = _tStartScalarAnimation_1_to_0 = CreateScalarKeyFrameAnimation(0F, 1F, HoldThenStepEasingFunction());
                result.InsertKeyFrame(0.649999976F, 0F, _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0F), new Vector2(0F, 0.896000028F)));
                return result;
            }

Member Data Documentation

readonly Compositor _c [private]

Definition at line 133 of file BrightnessSun.cs.

CompositionColorBrush _colorBrush_AlmostGoldenrod_FFE4950C [private]

Definition at line 135 of file BrightnessSun.cs.

StepEasingFunction _holdThenStepEasingFunction [private]

Definition at line 141 of file BrightnessSun.cs.

CompositionPath _path [private]

Definition at line 136 of file BrightnessSun.cs.

readonly ExpressionAnimation _reusableExpressionAnimation [private]

Definition at line 134 of file BrightnessSun.cs.

ContainerVisual _root [private]

Definition at line 137 of file BrightnessSun.cs.

ExpressionAnimation _rootProgress [private]

Definition at line 138 of file BrightnessSun.cs.

ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0 [private]

Definition at line 139 of file BrightnessSun.cs.

ScalarKeyFrameAnimation _tStartScalarAnimation_1_to_0 [private]

Definition at line 140 of file BrightnessSun.cs.

const long c_durationTicks = 16000000 [private]

Definition at line 132 of file BrightnessSun.cs.

TimeSpan Duration = > TimeSpan.FromTicks(c_durationTicks)

Definition at line 780 of file BrightnessSun.cs.

Visual RootVisual = > _root

Definition at line 779 of file BrightnessSun.cs.

Vector2 Size = > new Vector2(380F, 324F)

Definition at line 781 of file BrightnessSun.cs.

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/BrightnessSun.cs
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LottieLogo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • LottieLogo
Classes | Public Member Functions | Public Attributes | Properties | Private Attributes

LottieLogo Class Reference

List of all members.

Classes

class | LottieLogo_AnimatedVisual

Public Member Functions

double | FrameToProgress (double frameNumber)
void | SetColorProperty (string propertyName, Color value)
void | SetScalarProperty (string propertyName, double value)
Microsoft.UI.Xaml.Controls.IAnimatedVisual | TryCreateAnimatedVisual (Compositor compositor)
Microsoft.UI.Xaml.Controls.IAnimatedVisual | TryCreateAnimatedVisual (Compositor compositor, out object diagnostics)

Public Attributes

TimeSpan | Duration = > TimeSpan.FromTicks(c_durationTicks)
double | FrameCount = > 179d
double | Framerate = > 30d
IReadOnlyDictionary< string,
double > 		Markers

Properties

IReadOnlyDictionary< string,
double > 		double

Private Attributes

internal const long | c_durationTicks = 59666666

Detailed Description

Definition at line 62 of file LottieLogo.cs.

Member Function Documentation

double FrameToProgress ( double frameNumber ) [inline]

Converts a zero-based frame number to the corresponding progress value denoting the start of the frame.

Definition at line 105 of file LottieLogo.cs.

        {
            return frameNumber / 179d;
        }

void SetColorProperty | ( | string | propertyName,
 |  | Color | value |
 | ) |  |  | [inline]

Sets the color property with the given name, or does nothing if no such property exists.

Definition at line 122 of file LottieLogo.cs.

        {
        }

void SetScalarProperty | ( | string | propertyName,
 |  | double | value |
 | ) |  |  | [inline]

Sets the scalar property with the given name, or does nothing if no such property exists.

Definition at line 130 of file LottieLogo.cs.

        {
        }

Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual ( Compositor compositor ) [inline]

Definition at line 68 of file LottieLogo.cs.

        {
            object ignored = null;
            return TryCreateAnimatedVisual(compositor, out ignored);
        }

Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual | ( | Compositor | compositor,
 |  | out object | diagnostics |
 | ) |  |  | [inline]

Definition at line 74 of file LottieLogo.cs.

        {
            diagnostics = null;

            var res =
                new LottieLogo_AnimatedVisual(
                    compositor
                    );
                res.CreateAnimations();
                return res;
        }

Member Data Documentation

internal const long c_durationTicks = 59666666 [private]

Definition at line 66 of file LottieLogo.cs.

TimeSpan Duration = > TimeSpan.FromTicks(c_durationTicks)

Gets the duration of the animation.

Definition at line 99 of file LottieLogo.cs.

double FrameCount = > 179d

Gets the number of frames in the animation.

Definition at line 89 of file LottieLogo.cs.

double Framerate = > 30d

Gets the frame rate of the animation.

Definition at line 94 of file LottieLogo.cs.

IReadOnlyDictionary<string, double> Markers
Initial value:
>
            new Dictionary<string

Returns a map from marker names to corresponding progress values.

Definition at line 113 of file LottieLogo.cs.

Property Documentation

IReadOnlyDictionary<string, double> double

Definition at line 115 of file LottieLogo.cs.

The documentation for this class was generated from the following file:
  • AnimatedVisualPlayer/TestUI/LottieLogo.cs
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LottieLogo::LottieLogo_AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • LottieLogo
  • LottieLogo::LottieLogo_AnimatedVisual
Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes

LottieLogo::LottieLogo_AnimatedVisual Class Reference

List of all members.

Public Member Functions

void | CreateAnimations ()
void | DestroyAnimations ()

Public Attributes

TimeSpan | Duration = > TimeSpan.FromTicks(c_durationTicks)
Visual | RootVisual = > _root
Vector2 | Size = > new Vector2(375F, 667F)

Private Member Functions

internal | LottieLogo_AnimatedVisual (Compositor compositor)
void | BindProperty (CompositionObject target, string animatedPropertyName, string expression, string referenceParameterName, CompositionObject referencedObject)
CompositionColorBrush | ColorBrush_AlmostDarkTurquoise_FF00D1C1 ()
CompositionColorBrush | ColorBrush_AlmostTeal_FF007A87 ()
CompositionColorBrush | ColorBrush_White ()
CompositionContainerShape | ContainerShape_00 ()
CompositionContainerShape | ContainerShape_01 ()
CompositionContainerShape | ContainerShape_02 ()
CompositionContainerShape | ContainerShape_03 ()
CompositionContainerShape | ContainerShape_04 ()
CompositionContainerShape | ContainerShape_05 ()
CompositionContainerShape | ContainerShape_06 ()
CompositionContainerShape | ContainerShape_07 ()
CompositionContainerShape | ContainerShape_08 ()
CompositionContainerShape | ContainerShape_09 ()
CompositionContainerShape | ContainerShape_10 ()
CompositionContainerShape | ContainerShape_11 ()
CompositionContainerShape | ContainerShape_12 ()
CompositionContainerShape | ContainerShape_13 ()
CompositionContainerShape | ContainerShape_14 ()
CompositionContainerShape | ContainerShape_15 ()
CompositionContainerShape | ContainerShape_16 ()
CompositionContainerShape | ContainerShape_17 ()
CompositionContainerShape | ContainerShape_18 ()
CompositionContainerShape | ContainerShape_19 ()
CompositionContainerShape | ContainerShape_20 ()
CompositionContainerShape | ContainerShape_21 ()
CompositionContainerShape | ContainerShape_22 ()
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, Matrix3x2 transformMatrix)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, Matrix3x2 transformMatrix, CompositionBrush fillBrush)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, Vector2 initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_1 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_2 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_3 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_4 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_5 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_6 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_7 ()
CubicBezierEasingFunction | CubicBezierEasingFunction_8 ()
void IDisposable. | Dispose ()
CompositionEllipseGeometry | Ellipse_0_0 ()
CompositionEllipseGeometry | Ellipse_0_1 ()
CompositionEllipseGeometry | Ellipse_4p6 ()
CompositionEllipseGeometry | Ellipse_4p7 ()
CanvasGeometry Geometry_00 ()
CanvasGeometry Geometry_01 ()
CanvasGeometry Geometry_02 ()
CanvasGeometry Geometry_03 ()
CanvasGeometry Geometry_04 ()
CanvasGeometry Geometry_05 ()
CanvasGeometry Geometry_06 ()
CanvasGeometry Geometry_07 ()
CanvasGeometry Geometry_08 ()
CanvasGeometry Geometry_09 ()
CanvasGeometry Geometry_10 ()
CanvasGeometry Geometry_11 ()
CanvasGeometry Geometry_12 ()
CanvasGeometry Geometry_13 ()
CanvasGeometry Geometry_14 ()
CanvasGeometry Geometry_15 ()
CanvasGeometry Geometry_16 ()
CanvasGeometry Geometry_17 ()
CanvasGeometry Geometry_18 ()
CanvasGeometry Geometry_19 ()
CanvasGeometry Geometry_20 ()
CanvasGeometry Geometry_21 ()
CanvasGeometry Geometry_22 ()
CanvasGeometry Geometry_23 ()
CanvasGeometry Geometry_24 ()
CanvasGeometry Geometry_25 ()
CanvasGeometry Geometry_26 ()
CanvasGeometry Geometry_27 ()
CanvasGeometry Geometry_28 ()
StepEasingFunction | HoldThenStepEasingFunction ()
Vector2KeyFrameAnimation | OffsetVector2Animation_00 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_01 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_02 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_03 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_04 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_05 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_06 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_07 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_08 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_09 ()
Vector2KeyFrameAnimation | OffsetVector2Animation_10 ()
CompositionPath | Path_0 ()
CompositionPath | Path_1 ()
CompositionPath | Path_2 ()
CompositionPath | Path_3 ()
CompositionPath | Path_4 ()
CompositionPath | Path_5 ()
CompositionPath | Path_6 ()
CompositionPath | Path_7 ()
CompositionPath | Path_8 ()
CompositionPathGeometry | PathGeometry_00 ()
CompositionPathGeometry | PathGeometry_01 ()
CompositionPathGeometry | PathGeometry_02 ()
CompositionPathGeometry | PathGeometry_03 ()
CompositionPathGeometry | PathGeometry_04 ()
CompositionPathGeometry | PathGeometry_05 ()
CompositionPathGeometry | PathGeometry_06 ()
CompositionPathGeometry | PathGeometry_07 ()
CompositionPathGeometry | PathGeometry_08 ()
CompositionPathGeometry | PathGeometry_09 ()
CompositionPathGeometry | PathGeometry_10 ()
CompositionPathGeometry | PathGeometry_11 ()
CompositionPathGeometry | PathGeometry_12 ()
CompositionPathGeometry | PathGeometry_13 ()
CompositionPathGeometry | PathGeometry_14 ()
CompositionPathGeometry | PathGeometry_15 ()
CompositionPathGeometry | PathGeometry_16 ()
CompositionPathGeometry | PathGeometry_17 ()
CompositionPathGeometry | PathGeometry_18 ()
CompositionPathGeometry | PathGeometry_19 ()
CompositionPathGeometry | PathGeometry_20 ()
CompositionPathGeometry | PathGeometry_21 ()
CompositionPathGeometry | PathGeometry_22 ()
CompositionPathGeometry | PathGeometry_23 ()
CompositionPathGeometry | PathGeometry_24 ()
CompositionPathGeometry | PathGeometry_25 ()
CompositionPathGeometry | PathGeometry_26 ()
CompositionPathGeometry | PathGeometry_27 ()
CompositionPathGeometry | PathGeometry_28 ()
CompositionPathGeometry | PathGeometry_29 ()
CompositionPathGeometry | PathGeometry_30 ()
CompositionPathGeometry | PathGeometry_31 ()
CompositionPathGeometry | PathGeometry_32 ()
CompositionPathGeometry | PathGeometry_33 ()
CompositionPathGeometry | PathGeometry_34 ()
CompositionPathGeometry | PathGeometry_35 ()
CompositionPathGeometry | PathGeometry_36 ()
CompositionPathGeometry | PathGeometry_37 ()
CompositionPathGeometry | PathGeometry_38 ()
Vector2KeyFrameAnimation | RadiusVector2Animation ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
CompositionRoundedRectangleGeometry | RoundedRectangle_375x667 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_00 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_01 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_02 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_03 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_04 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_05 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_06 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_07 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_08 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_09 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_10 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_11 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_12 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_13 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_14 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_15 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_16 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_17 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_18 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_19 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_20 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_21 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_22 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_23 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_24 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_25 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_26 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_27 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_28 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_29 ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation_30 ()
ShapeVisual | ShapeVisual_0 ()
CompositionSpriteShape | SpriteShape_00 ()
CompositionSpriteShape | SpriteShape_01 ()
CompositionSpriteShape | SpriteShape_02 ()
CompositionSpriteShape | SpriteShape_03 ()
CompositionSpriteShape | SpriteShape_04 ()
CompositionSpriteShape | SpriteShape_05 ()
CompositionSpriteShape | SpriteShape_06 ()
CompositionSpriteShape | SpriteShape_07 ()
CompositionSpriteShape | SpriteShape_08 ()
CompositionSpriteShape | SpriteShape_09 ()
CompositionSpriteShape | SpriteShape_10 ()
CompositionSpriteShape | SpriteShape_11 ()
CompositionSpriteShape | SpriteShape_12 ()
CompositionSpriteShape | SpriteShape_13 ()
CompositionSpriteShape | SpriteShape_14 ()
CompositionSpriteShape | SpriteShape_15 ()
CompositionSpriteShape | SpriteShape_16 ()
CompositionSpriteShape | SpriteShape_17 ()
CompositionSpriteShape | SpriteShape_18 ()
CompositionSpriteShape | SpriteShape_19 ()
CompositionSpriteShape | SpriteShape_20 ()
CompositionSpriteShape | SpriteShape_21 ()
CompositionSpriteShape | SpriteShape_22 ()
CompositionSpriteShape | SpriteShape_23 ()
CompositionSpriteShape | SpriteShape_24 ()
CompositionSpriteShape | SpriteShape_25 ()
CompositionSpriteShape | SpriteShape_26 ()
CompositionSpriteShape | SpriteShape_27 ()
CompositionSpriteShape | SpriteShape_28 ()
CompositionSpriteShape | SpriteShape_29 ()
CompositionSpriteShape | SpriteShape_30 ()
CompositionSpriteShape | SpriteShape_31 ()
CompositionSpriteShape | SpriteShape_32 ()
CompositionSpriteShape | SpriteShape_33 ()
CompositionSpriteShape | SpriteShape_34 ()
CompositionSpriteShape | SpriteShape_35 ()
CompositionSpriteShape | SpriteShape_36 ()
CompositionSpriteShape | SpriteShape_37 ()
CompositionSpriteShape | SpriteShape_38 ()
CompositionSpriteShape | SpriteShape_39 ()
CompositionSpriteShape | SpriteShape_40 ()
CompositionSpriteShape | SpriteShape_41 ()
CompositionSpriteShape | SpriteShape_42 ()
CompositionSpriteShape | SpriteShape_43 ()
CompositionSpriteShape | SpriteShape_44 ()
StepEasingFunction | StepThenHoldEasingFunction ()
ScalarKeyFrameAnimation | t0ScalarAnimation_0_to_1 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_0_to_1_0 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_0_to_1_1 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_0p81_to_0p734_0 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_0p81_to_0p734_1 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_00 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_01 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_02 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_03 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_04 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_05 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_06 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_07 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_08 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_09 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_10 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_11 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_12 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_13 ()
ScalarKeyFrameAnimation | TEndScalarAnimation_1_to_0_14 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p316_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p316_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p375_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p375_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p43_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p43_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p457_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p457_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0p117_to_1_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0p117_to_1_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0p249_to_0p891 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0p411_to_0p665_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0p411_to_0p665_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0p5_to_1_0 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0p5_to_1_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_1_to_0p88 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0_to_0p399 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0p29_to_0_0 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0p29_to_0_1 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0p5_to_0_0 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0p5_to_0_1 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0_to_0p249 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_00 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_01 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_02 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_03 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_04 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_05 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_06 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_07 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_08 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_09 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_10 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_11 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_12 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_13 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_14 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_15 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_16 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_17 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p87_to_0_18 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p8_to_0 ()
ScalarKeyFrameAnimation | TStartScalarAnimation_0p8_to_0p3 ()

Static Private Member Functions

static void | StartProgressBoundAnimation (CompositionObject target, string animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Private Attributes

readonly Compositor | _c
CompositionColorBrush | _colorBrush_AlmostTeal_FF007A87
CompositionColorBrush | _colorBrush_White
CompositionContainerShape | _containerShape_00
CompositionContainerShape | _containerShape_01
CompositionContainerShape | _containerShape_02
CompositionContainerShape | _containerShape_03
CompositionContainerShape | _containerShape_04
CompositionContainerShape | _containerShape_05
CompositionContainerShape | _containerShape_06
CompositionContainerShape | _containerShape_07
CompositionContainerShape | _containerShape_08
CompositionContainerShape | _containerShape_09
CompositionContainerShape | _containerShape_10
CompositionContainerShape | _containerShape_11
CompositionContainerShape | _containerShape_12
CompositionContainerShape | _containerShape_13
CompositionContainerShape | _containerShape_14
CompositionContainerShape | _containerShape_15
CompositionContainerShape | _containerShape_16
CompositionContainerShape | _containerShape_17
CompositionContainerShape | _containerShape_18
CompositionContainerShape | _containerShape_19
CompositionContainerShape | _containerShape_20
CompositionContainerShape | _containerShape_21
CompositionContainerShape | _containerShape_22
CubicBezierEasingFunction | _cubicBezierEasingFunction_0
CubicBezierEasingFunction | _cubicBezierEasingFunction_1
CubicBezierEasingFunction | _cubicBezierEasingFunction_2
CubicBezierEasingFunction | _cubicBezierEasingFunction_3
CubicBezierEasingFunction | _cubicBezierEasingFunction_4
CubicBezierEasingFunction | _cubicBezierEasingFunction_5
CubicBezierEasingFunction | _cubicBezierEasingFunction_6
CubicBezierEasingFunction | _cubicBezierEasingFunction_7
CubicBezierEasingFunction | _cubicBezierEasingFunction_8
CompositionEllipseGeometry | _ellipse_0_0
CompositionEllipseGeometry | _ellipse_0_1
CompositionEllipseGeometry | _ellipse_4p7
StepEasingFunction | _holdThenStepEasingFunction
Vector2KeyFrameAnimation | _offsetVector2Animation_02
Vector2KeyFrameAnimation | _offsetVector2Animation_03
Vector2KeyFrameAnimation | _offsetVector2Animation_04
Vector2KeyFrameAnimation | _offsetVector2Animation_05
Vector2KeyFrameAnimation | _offsetVector2Animation_06
CompositionPath | _path_0
CompositionPath | _path_1
CompositionPath | _path_2
CompositionPath | _path_3
CompositionPath | _path_4
CompositionPath | _path_5
CompositionPath | _path_6
CompositionPath | _path_7
CompositionPath | _path_8
CompositionPathGeometry | _pathGeometry_00
CompositionPathGeometry | _pathGeometry_01
CompositionPathGeometry | _pathGeometry_02
CompositionPathGeometry | _pathGeometry_03
CompositionPathGeometry | _pathGeometry_04
CompositionPathGeometry | _pathGeometry_05
CompositionPathGeometry | _pathGeometry_06
CompositionPathGeometry | _pathGeometry_07
CompositionPathGeometry | _pathGeometry_08
CompositionPathGeometry | _pathGeometry_09
CompositionPathGeometry | _pathGeometry_10
CompositionPathGeometry | _pathGeometry_11
CompositionPathGeometry | _pathGeometry_12
CompositionPathGeometry | _pathGeometry_13
CompositionPathGeometry | _pathGeometry_14
CompositionPathGeometry | _pathGeometry_15
CompositionPathGeometry | _pathGeometry_16
CompositionPathGeometry | _pathGeometry_17
CompositionPathGeometry | _pathGeometry_18
CompositionPathGeometry | _pathGeometry_19
CompositionPathGeometry | _pathGeometry_20
CompositionPathGeometry | _pathGeometry_21
CompositionPathGeometry | _pathGeometry_22
CompositionPathGeometry | _pathGeometry_23
CompositionPathGeometry | _pathGeometry_24
CompositionPathGeometry | _pathGeometry_25
CompositionPathGeometry | _pathGeometry_26
CompositionPathGeometry | _pathGeometry_27
CompositionPathGeometry | _pathGeometry_28
CompositionPathGeometry | _pathGeometry_29
CompositionPathGeometry | _pathGeometry_30
CompositionPathGeometry | _pathGeometry_31
CompositionPathGeometry | _pathGeometry_32
CompositionPathGeometry | _pathGeometry_33
CompositionPathGeometry | _pathGeometry_34
CompositionPathGeometry | _pathGeometry_35
CompositionPathGeometry | _pathGeometry_36
CompositionPathGeometry | _pathGeometry_37
CompositionPathGeometry | _pathGeometry_38
Vector2KeyFrameAnimation | _radiusVector2Animation
readonly ExpressionAnimation | _reusableExpressionAnimation
ContainerVisual | _root
ExpressionAnimation | _rootProgress
Vector2KeyFrameAnimation | _shapeVisibilityAnimation_04
CompositionSpriteShape | _spriteShape_11
CompositionSpriteShape | _spriteShape_12
CompositionSpriteShape | _spriteShape_13
CompositionSpriteShape | _spriteShape_14
CompositionSpriteShape | _spriteShape_15
CompositionSpriteShape | _spriteShape_19
CompositionSpriteShape | _spriteShape_22
CompositionSpriteShape | _spriteShape_23
CompositionSpriteShape | _spriteShape_36
CompositionSpriteShape | _spriteShape_37
CompositionSpriteShape | _spriteShape_38
StepEasingFunction | _stepThenHoldEasingFunction
ScalarKeyFrameAnimation | _tEndScalarAnimation_1_to_0_02
ScalarKeyFrameAnimation | _tEndScalarAnimation_1_to_0_03
ScalarKeyFrameAnimation | _tEndScalarAnimation_1_to_0_06
ScalarKeyFrameAnimation | _tEndScalarAnimation_1_to_0_11
ScalarKeyFrameAnimation | _tEndScalarAnimation_1_to_0_13
ScalarKeyFrameAnimation | _tStartScalarAnimation_0_to_0p249
ScalarKeyFrameAnimation | _tStartScalarAnimation_0p87_to_0_02
const long | c_durationTicks = 59666666

Detailed Description

Definition at line 134 of file LottieLogo.cs.

Constructor & Destructor Documentation

internal LottieLogo_AnimatedVisual ( Compositor compositor ) [inline, private]

Definition at line 4212 of file LottieLogo.cs.

            {
                _c = compositor;
                _reusableExpressionAnimation = compositor.CreateExpressionAnimation();
                Root();
            }

Member Function Documentation

void BindProperty | ( | CompositionObject | target,
 |  | string | animatedPropertyName,
 |  | string | expression,
 |  | string | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 517 of file LottieLogo.cs.

            {
                _reusableExpressionAnimation.ClearAllParameters();
                _reusableExpressionAnimation.Expression = expression;
                _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
                target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
            }

CompositionColorBrush ColorBrush_AlmostDarkTurquoise_FF00D1C1 ( ) [inline, private]

Definition at line 954 of file LottieLogo.cs.

            {
                return _c.CreateColorBrush(Color.FromArgb(0xFF, 0x00, 0xD1, 0xC1));
            }

CompositionColorBrush ColorBrush_AlmostTeal_FF007A87 ( ) [inline, private]

Definition at line 959 of file LottieLogo.cs.

            {
                return (_colorBrush_AlmostTeal_FF007A87 == null)
                    ? _colorBrush_AlmostTeal_FF007A87 = _c.CreateColorBrush(Color.FromArgb(0xFF, 0x00, 0x7A, 0x87))
                    : _colorBrush_AlmostTeal_FF007A87;
            }

CompositionColorBrush ColorBrush_White ( ) [inline, private]

Definition at line 966 of file LottieLogo.cs.

            {
                return (_colorBrush_White == null)
                    ? _colorBrush_White = _c.CreateColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF))
                    : _colorBrush_White;
            }

CompositionContainerShape ContainerShape_00 ( ) [inline, private]

Definition at line 975 of file LottieLogo.cs.

            {
                if (_containerShape_00 != null) { return _containerShape_00; }
                var result = _containerShape_00 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // Transforms: Dot-Y
                result.Shapes.Add(ContainerShape_01());
                return result;
            }

CompositionContainerShape ContainerShape_01 ( ) [inline, private]

Definition at line 990 of file LottieLogo.cs.

            {
                if (_containerShape_01 != null) { return _containerShape_01; }
                var result = _containerShape_01 = _c.CreateContainerShape();
                // ShapeGroup: Ellipse 1 Offset:<196, 267>
                result.Shapes.Add(SpriteShape_01());
                return result;
            }

CompositionContainerShape ContainerShape_02 ( ) [inline, private]

Definition at line 1001 of file LottieLogo.cs.

            {
                if (_containerShape_02 != null) { return _containerShape_02; }
                var result = _containerShape_02 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // ShapeGroup: Group 1 Offset:<344.674, 261.877>
                result.Shapes.Add(SpriteShape_02());
                return result;
            }

CompositionContainerShape ContainerShape_03 ( ) [inline, private]

Definition at line 1015 of file LottieLogo.cs.

            {
                if (_containerShape_03 != null) { return _containerShape_03; }
                var result = _containerShape_03 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // Transforms: E3-B Offset:<0.06500244, 0>
                result.Shapes.Add(SpriteShape_03());
                return result;
            }

CompositionContainerShape ContainerShape_04 ( ) [inline, private]

Definition at line 1029 of file LottieLogo.cs.

            {
                if (_containerShape_04 != null) { return _containerShape_04; }
                var result = _containerShape_04 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // ShapeGroup: Group 6 Offset:<304.135, 282.409>
                result.Shapes.Add(SpriteShape_04());
                return result;
            }

CompositionContainerShape ContainerShape_05 ( ) [inline, private]

Definition at line 1043 of file LottieLogo.cs.

            {
                if (_containerShape_05 != null) { return _containerShape_05; }
                var result = _containerShape_05 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // Transforms: I-B
                result.Shapes.Add(SpriteShape_05());
                return result;
            }

CompositionContainerShape ContainerShape_06 ( ) [inline, private]

Definition at line 1057 of file LottieLogo.cs.

            {
                if (_containerShape_06 != null) { return _containerShape_06; }
                var result = _containerShape_06 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // ShapeGroup: Group 3 Offset:<331.664, 238.14>
                result.Shapes.Add(SpriteShape_06());
                return result;
            }

CompositionContainerShape ContainerShape_07 ( ) [inline, private]

Definition at line 1071 of file LottieLogo.cs.

            {
                if (_containerShape_07 != null) { return _containerShape_07; }
                var result = _containerShape_07 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // Transforms: E2-B
                result.Shapes.Add(SpriteShape_07());
                return result;
            }

CompositionContainerShape ContainerShape_08 ( ) [inline, private]

Definition at line 1085 of file LottieLogo.cs.

            {
                if (_containerShape_08 != null) { return _containerShape_08; }
                var result = _containerShape_08 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // ShapeGroup: Group 2 Offset:<344.672, 214.842>
                result.Shapes.Add(SpriteShape_08());
                return result;
            }

CompositionContainerShape ContainerShape_09 ( ) [inline, private]

Definition at line 1099 of file LottieLogo.cs.

            {
                if (_containerShape_09 != null) { return _containerShape_09; }
                var result = _containerShape_09 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // Transforms: E1-B
                result.Shapes.Add(SpriteShape_09());
                return result;
            }

CompositionContainerShape ContainerShape_10 ( ) [inline, private]

Definition at line 1113 of file LottieLogo.cs.

            {
                if (_containerShape_10 != null) { return _containerShape_10; }
                var result = _containerShape_10 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // ShapeGroup: Group 9 Offset:<227.677, 234.375>
                result.Shapes.Add(SpriteShape_10());
                return result;
            }

CompositionContainerShape ContainerShape_11 ( ) [inline, private]

Definition at line 1127 of file LottieLogo.cs.

            {
                if (_containerShape_11 != null) { return _containerShape_11; }
                var result = _containerShape_11 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                var shapes = result.Shapes;
                // ShapeGroup: Ellipse 1 Offset:<196, 267>
                shapes.Add(SpriteShape_16());
                // ShapeGroup: Ellipse 1 Offset:<196, 267>
                shapes.Add(SpriteShape_17());
                return result;
            }

CompositionContainerShape ContainerShape_12 ( ) [inline, private]

Definition at line 1144 of file LottieLogo.cs.

            {
                if (_containerShape_12 != null) { return _containerShape_12; }
                var result = _containerShape_12 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // ShapeGroup: Group 9 Offset:<227.677, 234.375>
                result.Shapes.Add(SpriteShape_18());
                return result;
            }

CompositionContainerShape ContainerShape_13 ( ) [inline, private]

Definition at line 1158 of file LottieLogo.cs.

            {
                if (_containerShape_13 != null) { return _containerShape_13; }
                var result = _containerShape_13 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // Transforms: T1a-B
                result.Shapes.Add(SpriteShape_20());
                return result;
            }

CompositionContainerShape ContainerShape_14 ( ) [inline, private]

Definition at line 1172 of file LottieLogo.cs.

            {
                if (_containerShape_14 != null) { return _containerShape_14; }
                var result = _containerShape_14 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // Transforms: Dot-Y
                result.Shapes.Add(ContainerShape_15());
                return result;
            }

CompositionContainerShape ContainerShape_15 ( ) [inline, private]

Definition at line 1187 of file LottieLogo.cs.

            {
                if (_containerShape_15 != null) { return _containerShape_15; }
                var result = _containerShape_15 = _c.CreateContainerShape();
                // ShapeGroup: Ellipse 1 Offset:<196, 267>
                result.Shapes.Add(SpriteShape_21());
                return result;
            }

CompositionContainerShape ContainerShape_16 ( ) [inline, private]

Definition at line 1198 of file LottieLogo.cs.

            {
                if (_containerShape_16 != null) { return _containerShape_16; }
                var result = _containerShape_16 = _c.CreateContainerShape();
                // Offset:<154.457, 287.822>
                result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
                // ShapeGroup: Ellipse 1 Offset:<196, 267>
                result.Shapes.Add(SpriteShape_24());
                return result;
            }

CompositionContainerShape ContainerShape_17 ( ) [inline, private]

Definition at line 1211 of file LottieLogo.cs.

            {
                if (_containerShape_17 != null) { return _containerShape_17; }
                var result = _containerShape_17 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                var shapes = result.Shapes;
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_25());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_26());
                return result;
            }

CompositionContainerShape ContainerShape_18 ( ) [inline, private]

Definition at line 1226 of file LottieLogo.cs.

            {
                if (_containerShape_18 != null) { return _containerShape_18; }
                var result = _containerShape_18 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                var shapes = result.Shapes;
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_27());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_28());
                return result;
            }

CompositionContainerShape ContainerShape_19 ( ) [inline, private]

Definition at line 1241 of file LottieLogo.cs.

            {
                if (_containerShape_19 != null) { return _containerShape_19; }
                var result = _containerShape_19 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                var shapes = result.Shapes;
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_29());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_30());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_31());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_32());
                return result;
            }

CompositionContainerShape ContainerShape_20 ( ) [inline, private]

Definition at line 1260 of file LottieLogo.cs.

            {
                if (_containerShape_20 != null) { return _containerShape_20; }
                var result = _containerShape_20 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                var shapes = result.Shapes;
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_33());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_34());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_35());
                return result;
            }

CompositionContainerShape ContainerShape_21 ( ) [inline, private]

Definition at line 1277 of file LottieLogo.cs.

            {
                if (_containerShape_21 != null) { return _containerShape_21; }
                var result = _containerShape_21 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                var shapes = result.Shapes;
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_39());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_40());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_41());
                return result;
            }

CompositionContainerShape ContainerShape_22 ( ) [inline, private]

Definition at line 1294 of file LottieLogo.cs.

            {
                if (_containerShape_22 != null) { return _containerShape_22; }
                var result = _containerShape_22 = _c.CreateContainerShape();
                result.Scale = new Vector2(0F, 0F);
                var shapes = result.Shapes;
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_42());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_43());
                // Offset:<154.457, 287.822>
                shapes.Add(SpriteShape_44());
                return result;
            }

void CreateAnimations ( ) [inline]

Definition at line 254 of file LottieLogo.cs.

            {
                StartProgressBoundAnimation(_containerShape_00, "Offset", OffsetVector2Animation_01(), RootProgress());
                StartProgressBoundAnimation(_containerShape_00, "Scale", ShapeVisibilityAnimation_00(), RootProgress());
                StartProgressBoundAnimation(_containerShape_01, "Offset", OffsetVector2Animation_00(), RootProgress());
                StartProgressBoundAnimation(_containerShape_02, "Offset", OffsetVector2Animation_02(), RootProgress());
                StartProgressBoundAnimation(_containerShape_02, "Scale", ShapeVisibilityAnimation_01(), RootProgress());
                StartProgressBoundAnimation(_containerShape_03, "Offset", OffsetVector2Animation_02(), RootProgress());
                StartProgressBoundAnimation(_containerShape_03, "Scale", ShapeVisibilityAnimation_02(), RootProgress());
                StartProgressBoundAnimation(_containerShape_04, "Offset", OffsetVector2Animation_03(), RootProgress());
                StartProgressBoundAnimation(_containerShape_04, "Scale", ShapeVisibilityAnimation_03(), RootProgress());
                StartProgressBoundAnimation(_containerShape_05, "Offset", OffsetVector2Animation_03(), RootProgress());
                StartProgressBoundAnimation(_containerShape_05, "Scale", ShapeVisibilityAnimation_04(), RootProgress());
                StartProgressBoundAnimation(_containerShape_06, "Offset", OffsetVector2Animation_04(), RootProgress());
                StartProgressBoundAnimation(_containerShape_06, "Scale", ShapeVisibilityAnimation_05(), RootProgress());
                StartProgressBoundAnimation(_containerShape_07, "Offset", OffsetVector2Animation_04(), RootProgress());
                StartProgressBoundAnimation(_containerShape_07, "Scale", ShapeVisibilityAnimation_06(), RootProgress());
                StartProgressBoundAnimation(_containerShape_08, "Offset", OffsetVector2Animation_05(), RootProgress());
                StartProgressBoundAnimation(_containerShape_08, "Scale", ShapeVisibilityAnimation_07(), RootProgress());
                StartProgressBoundAnimation(_containerShape_09, "Offset", OffsetVector2Animation_05(), RootProgress());
                StartProgressBoundAnimation(_containerShape_09, "Scale", ShapeVisibilityAnimation_08(), RootProgress());
                StartProgressBoundAnimation(_containerShape_10, "Offset", OffsetVector2Animation_06(), RootProgress());
                StartProgressBoundAnimation(_containerShape_10, "Scale", ShapeVisibilityAnimation_09(), RootProgress());
                StartProgressBoundAnimation(_containerShape_11, "Offset", OffsetVector2Animation_07(), RootProgress());
                StartProgressBoundAnimation(_containerShape_11, "Scale", ShapeVisibilityAnimation_14(), RootProgress());
                StartProgressBoundAnimation(_containerShape_12, "Offset", OffsetVector2Animation_06(), RootProgress());
                StartProgressBoundAnimation(_containerShape_12, "Scale", ShapeVisibilityAnimation_15(), RootProgress());
                StartProgressBoundAnimation(_containerShape_13, "Offset", OffsetVector2Animation_06(), RootProgress());
                StartProgressBoundAnimation(_containerShape_13, "Scale", ShapeVisibilityAnimation_17(), RootProgress());
                StartProgressBoundAnimation(_containerShape_14, "Offset", OffsetVector2Animation_09(), RootProgress());
                StartProgressBoundAnimation(_containerShape_14, "Scale", ShapeVisibilityAnimation_18(), RootProgress());
                StartProgressBoundAnimation(_containerShape_15, "Offset", OffsetVector2Animation_08(), RootProgress());
                _containerShape_16.StartAnimation("Offset", OffsetVector2Animation_10());
                var controller = _containerShape_16.TryGetAnimationController("Offset");
                controller.Pause();
                BindProperty(controller, "Progress", "_.Progress*0.9835165+0.01648352", "_", _root);
                StartProgressBoundAnimation(_containerShape_16, "Scale", ShapeVisibilityAnimation_21(), RootProgress());
                StartProgressBoundAnimation(_containerShape_17, "Scale", ShapeVisibilityAnimation_22(), RootProgress());
                StartProgressBoundAnimation(_containerShape_18, "Scale", ShapeVisibilityAnimation_23(), RootProgress());
                StartProgressBoundAnimation(_containerShape_19, "Scale", ShapeVisibilityAnimation_24(), RootProgress());
                StartProgressBoundAnimation(_containerShape_20, "Scale", ShapeVisibilityAnimation_25(), RootProgress());
                StartProgressBoundAnimation(_containerShape_21, "Scale", ShapeVisibilityAnimation_29(), RootProgress());
                StartProgressBoundAnimation(_containerShape_22, "Scale", ShapeVisibilityAnimation_30(), RootProgress());
                StartProgressBoundAnimation(_ellipse_0_0, "Radius", RadiusVector2Animation(), RootProgress());
                StartProgressBoundAnimation(_ellipse_0_1, "Radius", RadiusVector2Animation(), RootProgress());
                StartProgressBoundAnimation(_ellipse_0_1, "TrimStart", TrimStartScalarAnimation_0_to_0p399(), RootProgress());
                StartProgressBoundAnimation(_ellipse_0_1, "TrimEnd", TrimEndScalarAnimation_1_to_0p88(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_00, "TrimEnd", TrimEndScalarAnimation_0_to_0p316_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_01, "TrimEnd", TrimEndScalarAnimation_0_to_0p316_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_02, "TrimEnd", TrimEndScalarAnimation_0_to_0p457_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_03, "TrimEnd", TrimEndScalarAnimation_0_to_0p457_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_04, "TrimEnd", TrimEndScalarAnimation_0_to_0p43_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_05, "TrimEnd", TrimEndScalarAnimation_0_to_0p43_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_06, "TrimEnd", TrimEndScalarAnimation_0_to_0p375_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_07, "TrimEnd", TrimEndScalarAnimation_0_to_0p375_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_08, "TStart", TStartScalarAnimation_0_to_0p249(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_08, "TEnd", TEndScalarAnimation_0_to_1_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_09, "TrimStart", TrimStartScalarAnimation_0p29_to_0_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_09, "TrimEnd", TrimEndScalarAnimation_0p411_to_0p665_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_10, "TrimStart", TrimStartScalarAnimation_0p5_to_0_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_10, "TrimEnd", TrimEndScalarAnimation_0p5_to_1_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_11, "TrimStart", TrimStartScalarAnimation_0p29_to_0_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_11, "TrimEnd", TrimEndScalarAnimation_0p411_to_0p665_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_12, "TrimEnd", TrimEndScalarAnimation_0p117_to_1_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_13, "TrimEnd", TrimEndScalarAnimation_0p117_to_1_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_14, "TStart", TStartScalarAnimation_0_to_0p249(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_14, "TEnd", TEndScalarAnimation_0_to_1_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_15, "TrimStart", TrimStartScalarAnimation_0p5_to_0_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_15, "TrimEnd", TrimEndScalarAnimation_0p5_to_1_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_16, "TrimEnd", TrimEndScalarAnimation_0p249_to_0p891(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_17, "TStart", TStartScalarAnimation_0p8_to_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_17, "TEnd", TEndScalarAnimation_0p81_to_0p734_0(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_18, "TStart", TStartScalarAnimation_0p8_to_0p3(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_18, "TEnd", TEndScalarAnimation_0p81_to_0p734_1(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_19, "TStart", TStartScalarAnimation_0p87_to_0_00(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_19, "TEnd", TEndScalarAnimation_1_to_0_00(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_20, "TStart", TStartScalarAnimation_0p87_to_0_01(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_20, "TEnd", TEndScalarAnimation_1_to_0_01(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_21, "TStart", TStartScalarAnimation_0p87_to_0_02(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_21, "TEnd", TEndScalarAnimation_1_to_0_02(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_22, "TStart", TStartScalarAnimation_0p87_to_0_02(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_22, "TEnd", TEndScalarAnimation_1_to_0_02(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_23, "TStart", TStartScalarAnimation_0p87_to_0_03(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_23, "TEnd", TEndScalarAnimation_1_to_0_03(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_24, "TStart", TStartScalarAnimation_0p87_to_0_04(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_24, "TEnd", TEndScalarAnimation_1_to_0_03(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_25, "TStart", TStartScalarAnimation_0p87_to_0_05(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_25, "TEnd", TEndScalarAnimation_1_to_0_04(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_26, "TStart", TStartScalarAnimation_0p87_to_0_06(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_26, "TEnd", TEndScalarAnimation_1_to_0_05(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_27, "TStart", TStartScalarAnimation_0p87_to_0_07(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_27, "TEnd", TEndScalarAnimation_1_to_0_06(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_28, "TStart", TStartScalarAnimation_0p87_to_0_08(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_28, "TEnd", TEndScalarAnimation_1_to_0_06(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_29, "TStart", TStartScalarAnimation_0p87_to_0_09(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_29, "TEnd", TEndScalarAnimation_1_to_0_07(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_30, "TStart", TStartScalarAnimation_0p87_to_0_10(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_30, "TEnd", TEndScalarAnimation_1_to_0_08(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_31, "TStart", TStartScalarAnimation_0p87_to_0_11(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_31, "TEnd", TEndScalarAnimation_1_to_0_09(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_32, "TStart", TStartScalarAnimation_0p87_to_0_12(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_32, "TEnd", TEndScalarAnimation_1_to_0_10(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_33, "TStart", TStartScalarAnimation_0p87_to_0_13(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_33, "TEnd", TEndScalarAnimation_1_to_0_11(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_34, "TStart", TStartScalarAnimation_0p87_to_0_14(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_34, "TEnd", TEndScalarAnimation_1_to_0_11(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_35, "TStart", TStartScalarAnimation_0p87_to_0_15(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_35, "TEnd", TEndScalarAnimation_1_to_0_12(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_36, "TStart", TStartScalarAnimation_0p87_to_0_16(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_36, "TEnd", TEndScalarAnimation_1_to_0_13(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_37, "TStart", TStartScalarAnimation_0p87_to_0_17(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_37, "TEnd", TEndScalarAnimation_1_to_0_13(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_38, "TStart", TStartScalarAnimation_0p87_to_0_18(), RootProgress());
                StartProgressBoundAnimation(_pathGeometry_38, "TEnd", TEndScalarAnimation_1_to_0_14(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_11, "Scale", ShapeVisibilityAnimation_10(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_12, "Scale", ShapeVisibilityAnimation_11(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_13, "Scale", ShapeVisibilityAnimation_12(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_14, "Scale", ShapeVisibilityAnimation_13(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_15, "Scale", ShapeVisibilityAnimation_04(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_19, "Scale", ShapeVisibilityAnimation_16(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_22, "Scale", ShapeVisibilityAnimation_19(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_23, "Scale", ShapeVisibilityAnimation_20(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_36, "Scale", ShapeVisibilityAnimation_26(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_37, "Scale", ShapeVisibilityAnimation_27(), RootProgress());
                StartProgressBoundAnimation(_spriteShape_38, "Scale", ShapeVisibilityAnimation_28(), RootProgress());
                StartProgressBoundAnimation(_root.Properties, "t0", t0ScalarAnimation_0_to_1(), RootProgress());
            }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 530 of file LottieLogo.cs.

            {
                var result = _c.CreateScalarKeyFrameAnimation();
                result.Duration = TimeSpan.FromTicks(c_durationTicks);
                result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
                return result;
            }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | Matrix3x2 | transformMatrix,
 |  | CompositionBrush | fillBrush |
 | ) |  |  | [inline, private]

Definition at line 553 of file LottieLogo.cs.

            {
                var result = _c.CreateSpriteShape(geometry);
                result.TransformMatrix = transformMatrix;
                result.FillBrush = fillBrush;
                return result;
            }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | Matrix3x2 | transformMatrix |
 | ) |  |  | [inline, private]

Definition at line 546 of file LottieLogo.cs.

            {
                var result = _c.CreateSpriteShape(geometry);
                result.TransformMatrix = transformMatrix;
                return result;
            }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | Vector2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 538 of file LottieLogo.cs.

            {
                var result = _c.CreateVector2KeyFrameAnimation();
                result.Duration = TimeSpan.FromTicks(c_durationTicks);
                result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
                return result;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 2591 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_0 == null)
                    ? _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.180000007F, 1F))
                    : _cubicBezierEasingFunction_0;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_1 ( ) [inline, private]

Definition at line 2598 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_1 == null)
                    ? _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction(new Vector2(0.819999993F, 0F), new Vector2(0.833000004F, 0.833000004F))
                    : _cubicBezierEasingFunction_1;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_2 ( ) [inline, private]

Definition at line 2605 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_2 == null)
                    ? _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.833000004F, 0.833000004F))
                    : _cubicBezierEasingFunction_2;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_3 ( ) [inline, private]

Definition at line 2612 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_3 == null)
                    ? _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.666999996F, 1F))
                    : _cubicBezierEasingFunction_3;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_4 ( ) [inline, private]

Definition at line 2619 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_4 == null)
                    ? _cubicBezierEasingFunction_4 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.119999997F, 1F))
                    : _cubicBezierEasingFunction_4;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_5 ( ) [inline, private]

Definition at line 2626 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_5 == null)
                    ? _cubicBezierEasingFunction_5 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0F), new Vector2(0.119999997F, 1F))
                    : _cubicBezierEasingFunction_5;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_6 ( ) [inline, private]

Definition at line 2633 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_6 == null)
                    ? _cubicBezierEasingFunction_6 = _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0F), new Vector2(0.666999996F, 1F))
                    : _cubicBezierEasingFunction_6;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_7 ( ) [inline, private]

Definition at line 2640 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_7 == null)
                    ? _cubicBezierEasingFunction_7 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.0599999987F, 1F))
                    : _cubicBezierEasingFunction_7;
            }

CubicBezierEasingFunction CubicBezierEasingFunction_8 ( ) [inline, private]

Definition at line 2647 of file LottieLogo.cs.

            {
                return (_cubicBezierEasingFunction_8 == null)
                    ? _cubicBezierEasingFunction_8 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.337000012F, 1F))
                    : _cubicBezierEasingFunction_8;
            }

void DestroyAnimations ( ) [inline]

Definition at line 381 of file LottieLogo.cs.

            {
                _containerShape_00.StopAnimation("Offset");
                _containerShape_00.StopAnimation("Scale");
                _containerShape_01.StopAnimation("Offset");
                _containerShape_02.StopAnimation("Offset");
                _containerShape_02.StopAnimation("Scale");
                _containerShape_03.StopAnimation("Offset");
                _containerShape_03.StopAnimation("Scale");
                _containerShape_04.StopAnimation("Offset");
                _containerShape_04.StopAnimation("Scale");
                _containerShape_05.StopAnimation("Offset");
                _containerShape_05.StopAnimation("Scale");
                _containerShape_06.StopAnimation("Offset");
                _containerShape_06.StopAnimation("Scale");
                _containerShape_07.StopAnimation("Offset");
                _containerShape_07.StopAnimation("Scale");
                _containerShape_08.StopAnimation("Offset");
                _containerShape_08.StopAnimation("Scale");
                _containerShape_09.StopAnimation("Offset");
                _containerShape_09.StopAnimation("Scale");
                _containerShape_10.StopAnimation("Offset");
                _containerShape_10.StopAnimation("Scale");
                _containerShape_11.StopAnimation("Offset");
                _containerShape_11.StopAnimation("Scale");
                _containerShape_12.StopAnimation("Offset");
                _containerShape_12.StopAnimation("Scale");
                _containerShape_13.StopAnimation("Offset");
                _containerShape_13.StopAnimation("Scale");
                _containerShape_14.StopAnimation("Offset");
                _containerShape_14.StopAnimation("Scale");
                _containerShape_15.StopAnimation("Offset");
                _containerShape_16.StopAnimation("Offset");
                _containerShape_16.StopAnimation("Scale");
                _containerShape_17.StopAnimation("Scale");
                _containerShape_18.StopAnimation("Scale");
                _containerShape_19.StopAnimation("Scale");
                _containerShape_20.StopAnimation("Scale");
                _containerShape_21.StopAnimation("Scale");
                _containerShape_22.StopAnimation("Scale");
                _ellipse_0_0.StopAnimation("Radius");
                _ellipse_0_1.StopAnimation("Radius");
                _ellipse_0_1.StopAnimation("TrimStart");
                _ellipse_0_1.StopAnimation("TrimEnd");
                _pathGeometry_00.StopAnimation("TrimEnd");
                _pathGeometry_01.StopAnimation("TrimEnd");
                _pathGeometry_02.StopAnimation("TrimEnd");
                _pathGeometry_03.StopAnimation("TrimEnd");
                _pathGeometry_04.StopAnimation("TrimEnd");
                _pathGeometry_05.StopAnimation("TrimEnd");
                _pathGeometry_06.StopAnimation("TrimEnd");
                _pathGeometry_07.StopAnimation("TrimEnd");
                _pathGeometry_08.StopAnimation("TStart");
                _pathGeometry_08.StopAnimation("TEnd");
                _pathGeometry_09.StopAnimation("TrimStart");
                _pathGeometry_09.StopAnimation("TrimEnd");
                _pathGeometry_10.StopAnimation("TrimStart");
                _pathGeometry_10.StopAnimation("TrimEnd");
                _pathGeometry_11.StopAnimation("TrimStart");
                _pathGeometry_11.StopAnimation("TrimEnd");
                _pathGeometry_12.StopAnimation("TrimEnd");
                _pathGeometry_13.StopAnimation("TrimEnd");
                _pathGeometry_14.StopAnimation("TStart");
                _pathGeometry_14.StopAnimation("TEnd");
                _pathGeometry_15.StopAnimation("TrimStart");
                _pathGeometry_15.StopAnimation("TrimEnd");
                _pathGeometry_16.StopAnimation("TrimEnd");
                _pathGeometry_17.StopAnimation("TStart");
                _pathGeometry_17.StopAnimation("TEnd");
                _pathGeometry_18.StopAnimation("TStart");
                _pathGeometry_18.StopAnimation("TEnd");
                _pathGeometry_19.StopAnimation("TStart");
                _pathGeometry_19.StopAnimation("TEnd");
                _pathGeometry_20.StopAnimation("TStart");
                _pathGeometry_20.StopAnimation("TEnd");
                _pathGeometry_21.StopAnimation("TStart");
                _pathGeometry_21.StopAnimation("TEnd");
                _pathGeometry_22.StopAnimation("TStart");
                _pathGeometry_22.StopAnimation("TEnd");
                _pathGeometry_23.StopAnimation("TStart");
                _pathGeometry_23.StopAnimation("TEnd");
                _pathGeometry_24.StopAnimation("TStart");
                _pathGeometry_24.StopAnimation("TEnd");
                _pathGeometry_25.StopAnimation("TStart");
                _pathGeometry_25.StopAnimation("TEnd");
                _pathGeometry_26.StopAnimation("TStart");
                _pathGeometry_26.StopAnimation("TEnd");
                _pathGeometry_27.StopAnimation("TStart");
                _pathGeometry_27.StopAnimation("TEnd");
                _pathGeometry_28.StopAnimation("TStart");
                _pathGeometry_28.StopAnimation("TEnd");
                _pathGeometry_29.StopAnimation("TStart");
                _pathGeometry_29.StopAnimation("TEnd");
                _pathGeometry_30.StopAnimation("TStart");
                _pathGeometry_30.StopAnimation("TEnd");
                _pathGeometry_31.StopAnimation("TStart");
                _pathGeometry_31.StopAnimation("TEnd");
                _pathGeometry_32.StopAnimation("TStart");
                _pathGeometry_32.StopAnimation("TEnd");
                _pathGeometry_33.StopAnimation("TStart");
                _pathGeometry_33.StopAnimation("TEnd");
                _pathGeometry_34.StopAnimation("TStart");
                _pathGeometry_34.StopAnimation("TEnd");
                _pathGeometry_35.StopAnimation("TStart");
                _pathGeometry_35.StopAnimation("TEnd");
                _pathGeometry_36.StopAnimation("TStart");
                _pathGeometry_36.StopAnimation("TEnd");
                _pathGeometry_37.StopAnimation("TStart");
                _pathGeometry_37.StopAnimation("TEnd");
                _pathGeometry_38.StopAnimation("TStart");
                _pathGeometry_38.StopAnimation("TEnd");
                _spriteShape_11.StopAnimation("Scale");
                _spriteShape_12.StopAnimation("Scale");
                _spriteShape_13.StopAnimation("Scale");
                _spriteShape_14.StopAnimation("Scale");
                _spriteShape_15.StopAnimation("Scale");
                _spriteShape_19.StopAnimation("Scale");
                _spriteShape_22.StopAnimation("Scale");
                _spriteShape_23.StopAnimation("Scale");
                _spriteShape_36.StopAnimation("Scale");
                _spriteShape_37.StopAnimation("Scale");
                _spriteShape_38.StopAnimation("Scale");
                _root.Properties.StopAnimation("t0");
            }

void IDisposable. Dispose ( ) [private]
CompositionEllipseGeometry Ellipse_0_0 ( ) [inline, private]

Definition at line 1313 of file LottieLogo.cs.

            {
                if (_ellipse_0_0 != null) { return _ellipse_0_0; }
                var result = _ellipse_0_0 = _c.CreateEllipseGeometry();
                result.Center = new Vector2(0.800000012F, -0.5F);
                result.Radius = new Vector2(0F, 0F);
                return result;
            }

CompositionEllipseGeometry Ellipse_0_1 ( ) [inline, private]

Definition at line 1326 of file LottieLogo.cs.

            {
                if (_ellipse_0_1 != null) { return _ellipse_0_1; }
                var result = _ellipse_0_1 = _c.CreateEllipseGeometry();
                result.Center = new Vector2(0.800000012F, -0.5F);
                result.Radius = new Vector2(0F, 0F);
                return result;
            }

CompositionEllipseGeometry Ellipse_4p6 ( ) [inline, private]

Definition at line 1340 of file LottieLogo.cs.

            {
                var result = _c.CreateEllipseGeometry();
                result.Center = new Vector2(0.800000012F, -0.5F);
                result.Radius = new Vector2(4.5999999F, 4.5999999F);
                return result;
            }

CompositionEllipseGeometry Ellipse_4p7 ( ) [inline, private]

Definition at line 1349 of file LottieLogo.cs.

            {
                if (_ellipse_4p7 != null) { return _ellipse_4p7; }
                var result = _ellipse_4p7 = _c.CreateEllipseGeometry();
                result.Center = new Vector2(0.800000012F, -0.5F);
                result.Radius = new Vector2(4.69999981F, 4.69999981F);
                return result;
            }

CanvasGeometry Geometry_00 ( ) [inline, private]

Definition at line 561 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F));
                    builder.AddLine(new Vector2(75.663002F, 0.289999992F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_01 ( ) [inline, private]

Definition at line 574 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(0.859000027F, -21.1429996F));
                    builder.AddLine(new Vector2(-4.35900021F, 70.3919983F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_02 ( ) [inline, private]

Definition at line 587 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-26.6700001F, -0.282999992F));
                    builder.AddLine(new Vector2(99.1709976F, 0.0659999996F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_03 ( ) [inline, private]

Definition at line 600 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F));
                    builder.AddLine(new Vector2(62.1629982F, 0.289999992F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_04 ( ) [inline, private]

Definition at line 613 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-30.7199993F, 63.7610016F));
                    builder.AddCubicBezier(new Vector2(-30.6889992F, 63.1669998F), new Vector2(-30.7889996F, 50.8470001F), new Vector2(-30.7409992F, 45.1920013F));
                    builder.AddCubicBezier(new Vector2(-30.6650009F, 36.2140007F), new Vector2(-37.3429985F, 27.0739994F), new Vector2(-37.3969994F, 27.0139999F));
                    builder.AddCubicBezier(new Vector2(-38.5579987F, 25.7140007F), new Vector2(-39.7519989F, 24.1469994F), new Vector2(-40.6980019F, 22.6609993F));
                    builder.AddCubicBezier(new Vector2(-46.637001F, 13.3339996F), new Vector2(-47.8400002F, 0.933000028F), new Vector2(-37.8730011F, -7.1170001F));
                    builder.AddCubicBezier(new Vector2(-13.1960001F, -27.0459995F), new Vector2(8.96000004F, 11.559F), new Vector2(49.5060005F, 11.559F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_05 ( ) [inline, private]

Definition at line 630 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(246.649994F, 213.813995F));
                    builder.AddLine(new Vector2(340.955994F, 213.628006F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_06 ( ) [inline, private]

Definition at line 643 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(1.68099999F, -29.9920006F));
                    builder.AddLine(new Vector2(-1.68099999F, 29.9920006F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_07 ( ) [inline, private]

Definition at line 656 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(1.76800001F, -25.9659996F));
                    builder.AddLine(new Vector2(-1.76800001F, 25.9659996F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_08 ( ) [inline, private]

Definition at line 669 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-8.83699989F, -58.2290001F));
                    builder.AddCubicBezier(new Vector2(-8.83699989F, -58.2290001F), new Vector2(-10.1630001F, 29.4950008F), new Vector2(-35.8339996F, 33.6619987F));
                    builder.AddCubicBezier(new Vector2(-44.0579987F, 34.9970016F), new Vector2(-50.2319984F, 30.0499992F), new Vector2(-51.6879997F, 23.1480007F));
                    builder.AddCubicBezier(new Vector2(-53.144001F, 16.2450008F), new Vector2(-49.6549988F, 9.15600014F), new Vector2(-41.1739998F, 7.29300022F));
                    builder.AddCubicBezier(new Vector2(-17.3570004F, 2.05999994F), new Vector2(4.23500013F, 57.1879997F), new Vector2(51.7970009F, 44.1780014F));
                    builder.AddCubicBezier(new Vector2(51.9570007F, 44.1339989F), new Vector2(52.6870003F, 43.8740005F), new Vector2(53.1879997F, 43.7410011F));
                    builder.AddCubicBezier(new Vector2(53.6889992F, 43.6080017F), new Vector2(68.9710007F, 41.3569984F), new Vector2(140.393997F, 43.6720009F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_09 ( ) [inline, private]

Definition at line 687 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-67.125F, -112F));
                    builder.AddCubicBezier(new Vector2(-67.125F, -112F), new Vector2(-73.5579987F, -100.719002F), new Vector2(-75.4580002F, -89.9509964F));
                    builder.AddCubicBezier(new Vector2(-78.625F, -72F), new Vector2(-79.375F, -58.25F), new Vector2(-80.375F, -39.25F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_10 ( ) [inline, private]

Definition at line 701 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-67.25F, -105.5F));
                    builder.AddCubicBezier(new Vector2(-67.25F, -105.5F), new Vector2(-70.4329987F, -94.9690018F), new Vector2(-72.3330002F, -84.2009964F));
                    builder.AddCubicBezier(new Vector2(-75.5F, -66.25F), new Vector2(-75.5F, -56.75F), new Vector2(-76.5F, -37.75F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_11 ( ) [inline, private]

Definition at line 715 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(34.5F, -13.0500002F));
                    builder.AddCubicBezier(new Vector2(7.5F, -14.5F), new Vector2(-4F, -37F), new Vector2(-35.0460014F, -35.5789986F));
                    builder.AddCubicBezier(new Vector2(-61.4720001F, -34.3689995F), new Vector2(-62.25F, -5.75F), new Vector2(-62.25F, -5.75F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_12 ( ) [inline, private]

Definition at line 729 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-3F, 35.9500008F));
                    builder.AddCubicBezier(new Vector2(-3F, 35.9500008F), new Vector2(-1.5F, 7.5F), new Vector2(-1.352F, -6.75600004F));
                    builder.AddCubicBezier(new Vector2(-9.90299988F, -15.0190001F), new Vector2(-21.5699997F, -20.5790005F), new Vector2(-32.0460014F, -20.5790005F));
                    builder.AddCubicBezier(new Vector2(-53.5F, -20.5790005F), new Vector2(-42.25F, 4.25F), new Vector2(-42.25F, 4.25F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_13 ( ) [inline, private]

Definition at line 744 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(16.2310009F, 39.0730019F));
                    builder.AddLine(new Vector2(-32.769001F, 57.3650017F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_14 ( ) [inline, private]

Definition at line 757 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(7.44999981F, 21.9500008F));
                    builder.AddLine(new Vector2(-32.75F, 55.75F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_15 ( ) [inline, private]

Definition at line 770 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-94.5F, 37.0730019F));
                    builder.AddLine(new Vector2(-48.769001F, 55.3650017F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_16 ( ) [inline, private]

Definition at line 783 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(-87.5F, 20.9500008F));
                    builder.AddLine(new Vector2(-48.75F, 54.75F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_17 ( ) [inline, private]

Definition at line 796 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(166.731003F, -7.92700005F));
                    builder.AddLine(new Vector2(136.731003F, 7.11499977F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_18 ( ) [inline, private]

Definition at line 809 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(156.449997F, -23.0499992F));
                    builder.AddLine(new Vector2(132F, 2.75F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_19 ( ) [inline, private]

Definition at line 822 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(169.5F, 18.073F));
                    builder.AddLine(new Vector2(137.481003F, 11.3649998F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_20 ( ) [inline, private]

Definition at line 835 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(119.5F, -45.0499992F));
                    builder.AddLine(new Vector2(82.75F, -44.75F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_21 ( ) [inline, private]

Definition at line 848 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(119.25F, -20.0499992F));
                    builder.AddLine(new Vector2(63.5F, -20.5F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_22 ( ) [inline, private]

Definition at line 861 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(128F, 3.6500001F));
                    builder.AddLine(new Vector2(78.25F, 3.5F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_23 ( ) [inline, private]

Definition at line 874 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(149.623993F, 8.24400043F));
                    builder.AddLine(new Vector2(136.647995F, 10.1560001F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_24 ( ) [inline, private]

Definition at line 887 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(144.429001F, -5.39699984F));
                    builder.AddLine(new Vector2(132.274994F, 4.73099995F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_25 ( ) [inline, private]

Definition at line 900 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(145.677002F, 22.2199993F));
                    builder.AddLine(new Vector2(134.921997F, 14.7489996F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_26 ( ) [inline, private]

Definition at line 913 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(147.699005F, 13.0249996F));
                    builder.AddLine(new Vector2(133.195007F, 13.21F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_27 ( ) [inline, private]

Definition at line 926 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(142.182999F, -5.11199999F));
                    builder.AddLine(new Vector2(130.029007F, 5.01599979F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

CanvasGeometry Geometry_28 ( ) [inline, private]

Definition at line 939 of file LottieLogo.cs.

            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.BeginFigure(new Vector2(142.037994F, 29.2779999F));
                    builder.AddLine(new Vector2(131.281998F, 21.8069992F));
                    builder.EndFigure(CanvasFigureLoop.Open);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 3631 of file LottieLogo.cs.

            {
                if (_holdThenStepEasingFunction != null) { return _holdThenStepEasingFunction; }
                var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
                result.IsFinalStepSingleFrame = true;
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_00 ( ) [inline, private]

Definition at line 3651 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-153.528F, -206.753998F), StepThenHoldEasingFunction());
                // Frame 96.
                result.InsertKeyFrame(0.536312878F, new Vector2(-153.528F, -206.753998F), HoldThenStepEasingFunction());
                // Frame 108.
                result.InsertKeyFrame(0.603351951F, new Vector2(-134.278F, -206.753998F), _c.CreateCubicBezierEasingFunction(new Vector2(0F, 0F), new Vector2(0F, 0.811999977F)));
                // Frame 115.
                result.InsertKeyFrame(0.642458081F, new Vector2(-133.028F, -206.753998F), _c.CreateCubicBezierEasingFunction(new Vector2(0.389999986F, 0.707000017F), new Vector2(0.708000004F, 1F)));
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_01 ( ) [inline, private]

Definition at line 3667 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(104.781998F, -2.52699995F), StepThenHoldEasingFunction());
                // Frame 96.
                result.InsertKeyFrame(0.536312878F, new Vector2(104.781998F, -2.52699995F), HoldThenStepEasingFunction());
                // Frame 99.
                result.InsertKeyFrame(0.553072631F, new Vector2(104.781998F, -4.52699995F), CubicBezierEasingFunction_0());
                // Frame 102.
                result.InsertKeyFrame(0.569832385F, new Vector2(104.781998F, -2.52699995F), CubicBezierEasingFunction_1());
                // Frame 105.
                result.InsertKeyFrame(0.586592197F, new Vector2(104.781998F, -3.09100008F), CubicBezierEasingFunction_0());
                // Frame 108.
                result.InsertKeyFrame(0.603351951F, new Vector2(104.781998F, -2.52699995F), CubicBezierEasingFunction_1());
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_02 ( ) [inline, private]

Definition at line 3685 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_offsetVector2Animation_02 != null) { return _offsetVector2Animation_02; }
                var result = _offsetVector2Animation_02 = CreateVector2KeyFrameAnimation(0F, new Vector2(-225.957001F, -204.322006F), StepThenHoldEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, new Vector2(-225.957001F, -204.322006F), HoldThenStepEasingFunction());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, new Vector2(-207.957001F, -204.322006F), CubicBezierEasingFunction_3());
                // Frame 96.
                result.InsertKeyFrame(0.536312878F, new Vector2(-210.957001F, -204.322006F), _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0F), new Vector2(0.666999996F, 1F)));
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_03 ( ) [inline, private]

Definition at line 3700 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_offsetVector2Animation_03 != null) { return _offsetVector2Animation_03; }
                var result = _offsetVector2Animation_03 = CreateVector2KeyFrameAnimation(0F, new Vector2(-210.207993F, -219.320999F), StepThenHoldEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, new Vector2(-210.207993F, -219.320999F), HoldThenStepEasingFunction());
                // Frame 88.
                result.InsertKeyFrame(0.491620123F, new Vector2(-211.175995F, -199.352997F), CubicBezierEasingFunction_4());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, new Vector2(-210.957993F, -204.320999F), CubicBezierEasingFunction_5());
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_04 ( ) [inline, private]

Definition at line 3715 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_offsetVector2Animation_04 != null) { return _offsetVector2Animation_04; }
                var result = _offsetVector2Animation_04 = CreateVector2KeyFrameAnimation(0F, new Vector2(-222.957993F, -204.322006F), StepThenHoldEasingFunction());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, new Vector2(-222.957993F, -204.322006F), HoldThenStepEasingFunction());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, new Vector2(-210.957993F, -204.322006F), CubicBezierEasingFunction_4());
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_05 ( ) [inline, private]

Definition at line 3728 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_offsetVector2Animation_05 != null) { return _offsetVector2Animation_05; }
                var result = _offsetVector2Animation_05 = CreateVector2KeyFrameAnimation(0F, new Vector2(-230.957001F, -205.695999F), StepThenHoldEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, new Vector2(-230.957001F, -205.695999F), HoldThenStepEasingFunction());
                // Frame 88.
                result.InsertKeyFrame(0.491620123F, new Vector2(-206.957001F, -205.695999F), CubicBezierEasingFunction_4());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, new Vector2(-210.957001F, -205.695999F), CubicBezierEasingFunction_5());
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_06 ( ) [inline, private]

Definition at line 3743 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_offsetVector2Animation_06 != null) { return _offsetVector2Animation_06; }
                var result = _offsetVector2Animation_06 = CreateVector2KeyFrameAnimation(0F, new Vector2(-210.957001F, -201.322006F), StepThenHoldEasingFunction());
                // Frame 56.
                result.InsertKeyFrame(0.312849164F, new Vector2(-210.957001F, -201.322006F), HoldThenStepEasingFunction());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, new Vector2(-210.957001F, -204.322006F), CubicBezierEasingFunction_3());
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_07 ( ) [inline, private]

Definition at line 3758 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-259.583008F, -193.447006F), StepThenHoldEasingFunction());
                result.SetReferenceParameter("_", _root);
                // Frame 31.
                result.InsertKeyFrame(0.17318435F, new Vector2(-259.583008F, -193.447006F), HoldThenStepEasingFunction());
                // Frame 35.26.
                result.InsertKeyFrame(0.196966484F, new Vector2(-250.582993F, -258.946991F), CubicBezierEasingFunction_2());
                // Frame 44.
                result.InsertExpressionKeyFrame(0.245810047F, "Pow(1-_.t0,3)*Vector2(-250.583,-258.947)+(3*Square(1-_.t0)*_.t0*Vector2(-250.583,-258.947))+(3*(1-_.t0)*Square(_.t0)*Vector2(-249.6143,-337.5837))+(Pow(_.t0,3)*Vector2(-230.458,-339.322))", StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertExpressionKeyFrame(0.301675946F, "Pow(1-_.t0,3)*Vector2(-230.458,-339.322)+(3*Square(1-_.t0)*_.t0*Vector2(-214.2505,-340.7927))+(3*(1-_.t0)*Square(_.t0)*Vector2(-210.958,-164.322))+(Pow(_.t0,3)*Vector2(-210.958,-164.322))", StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, new Vector2(-210.957993F, -164.322006F), StepThenHoldEasingFunction());
                // Frame 63.
                result.InsertKeyFrame(0.351955295F, new Vector2(-210.957993F, -207.322006F), _c.CreateCubicBezierEasingFunction(new Vector2(0.180000007F, 0F), new Vector2(0.34799999F, 1F)));
                // Frame 73.
                result.InsertKeyFrame(0.407821238F, new Vector2(-210.957993F, -204.322006F), _c.CreateCubicBezierEasingFunction(new Vector2(0.693000019F, 0F), new Vector2(0.270000011F, 1F)));
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_08 ( ) [inline, private]

Definition at line 3784 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-156.916F, -206.503998F), StepThenHoldEasingFunction());
                // Frame 28.
                result.InsertKeyFrame(0.156424582F, new Vector2(-156.916F, -206.503998F), HoldThenStepEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, new Vector2(-117.416F, -206.503998F), CubicBezierEasingFunction_2());
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_09 ( ) [inline, private]

Definition at line 3798 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-93.6669998F, -51.8180008F), StepThenHoldEasingFunction());
                // Frame 28.
                result.InsertKeyFrame(0.156424582F, new Vector2(-93.6669998F, -51.8180008F), HoldThenStepEasingFunction());
                // Frame 40.
                result.InsertKeyFrame(0.223463684F, new Vector2(-93.6669998F, -132.817993F), _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.25999999F, 1F)));
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, new Vector2(-93.6669998F, 42.0569992F), _c.CreateCubicBezierEasingFunction(new Vector2(0.74000001F, 0F), new Vector2(0.833000004F, 0.833000004F)));
                return result;
            }

Vector2KeyFrameAnimation OffsetVector2Animation_10 ( ) [inline, private]

Definition at line 3814 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(98.9800034F, -157.509995F), HoldThenStepEasingFunction());
                // Frame 18.69.
                result.InsertKeyFrame(0.104395606F, new Vector2(-161.020004F, -157.509995F), _c.CreateCubicBezierEasingFunction(new Vector2(0.823000014F, 0F), new Vector2(0.833000004F, 0.833000004F)));
                return result;
            }

CompositionPath Path_0 ( ) [inline, private]

Definition at line 1358 of file LottieLogo.cs.

            {
                if (_path_0 != null) { return _path_0; }
                var result = _path_0 = new CompositionPath(Geometry_00());
                return result;
            }

CompositionPath Path_1 ( ) [inline, private]

Definition at line 1365 of file LottieLogo.cs.

            {
                if (_path_1 != null) { return _path_1; }
                var result = _path_1 = new CompositionPath(Geometry_01());
                return result;
            }

CompositionPath Path_2 ( ) [inline, private]

Definition at line 1372 of file LottieLogo.cs.

            {
                if (_path_2 != null) { return _path_2; }
                var result = _path_2 = new CompositionPath(Geometry_02());
                return result;
            }

CompositionPath Path_3 ( ) [inline, private]

Definition at line 1379 of file LottieLogo.cs.

            {
                if (_path_3 != null) { return _path_3; }
                var result = _path_3 = new CompositionPath(Geometry_03());
                return result;
            }

CompositionPath Path_4 ( ) [inline, private]

Definition at line 1386 of file LottieLogo.cs.

            {
                if (_path_4 != null) { return _path_4; }
                var result = _path_4 = new CompositionPath(Geometry_04());
                return result;
            }

CompositionPath Path_5 ( ) [inline, private]

Definition at line 1393 of file LottieLogo.cs.

            {
                if (_path_5 != null) { return _path_5; }
                var result = _path_5 = new CompositionPath(Geometry_05());
                return result;
            }

CompositionPath Path_6 ( ) [inline, private]

Definition at line 1400 of file LottieLogo.cs.

            {
                if (_path_6 != null) { return _path_6; }
                var result = _path_6 = new CompositionPath(Geometry_06());
                return result;
            }

CompositionPath Path_7 ( ) [inline, private]

Definition at line 1407 of file LottieLogo.cs.

            {
                if (_path_7 != null) { return _path_7; }
                var result = _path_7 = new CompositionPath(Geometry_07());
                return result;
            }

CompositionPath Path_8 ( ) [inline, private]

Definition at line 1414 of file LottieLogo.cs.

            {
                if (_path_8 != null) { return _path_8; }
                var result = _path_8 = new CompositionPath(Geometry_08());
                return result;
            }

CompositionPathGeometry PathGeometry_00 ( ) [inline, private]

Definition at line 1424 of file LottieLogo.cs.

            {
                if (_pathGeometry_00 != null) { return _pathGeometry_00; }
                var result = _pathGeometry_00 = _c.CreatePathGeometry(Path_0());
                return result;
            }

CompositionPathGeometry PathGeometry_01 ( ) [inline, private]

Definition at line 1434 of file LottieLogo.cs.

            {
                if (_pathGeometry_01 != null) { return _pathGeometry_01; }
                var result = _pathGeometry_01 = _c.CreatePathGeometry(Path_0());
                return result;
            }

CompositionPathGeometry PathGeometry_02 ( ) [inline, private]

Definition at line 1444 of file LottieLogo.cs.

            {
                if (_pathGeometry_02 != null) { return _pathGeometry_02; }
                var result = _pathGeometry_02 = _c.CreatePathGeometry(Path_1());
                return result;
            }

CompositionPathGeometry PathGeometry_03 ( ) [inline, private]

Definition at line 1454 of file LottieLogo.cs.

            {
                if (_pathGeometry_03 != null) { return _pathGeometry_03; }
                var result = _pathGeometry_03 = _c.CreatePathGeometry(Path_1());
                return result;
            }

CompositionPathGeometry PathGeometry_04 ( ) [inline, private]

Definition at line 1464 of file LottieLogo.cs.

            {
                if (_pathGeometry_04 != null) { return _pathGeometry_04; }
                var result = _pathGeometry_04 = _c.CreatePathGeometry(Path_2());
                return result;
            }

CompositionPathGeometry PathGeometry_05 ( ) [inline, private]

Definition at line 1474 of file LottieLogo.cs.

            {
                if (_pathGeometry_05 != null) { return _pathGeometry_05; }
                var result = _pathGeometry_05 = _c.CreatePathGeometry(Path_2());
                return result;
            }

CompositionPathGeometry PathGeometry_06 ( ) [inline, private]

Definition at line 1484 of file LottieLogo.cs.

            {
                if (_pathGeometry_06 != null) { return _pathGeometry_06; }
                var result = _pathGeometry_06 = _c.CreatePathGeometry(Path_3());
                return result;
            }

CompositionPathGeometry PathGeometry_07 ( ) [inline, private]

Definition at line 1494 of file LottieLogo.cs.

            {
                if (_pathGeometry_07 != null) { return _pathGeometry_07; }
                var result = _pathGeometry_07 = _c.CreatePathGeometry(Path_3());
                return result;
            }

CompositionPathGeometry PathGeometry_08 ( ) [inline, private]

Definition at line 1501 of file LottieLogo.cs.

            {
                if (_pathGeometry_08 != null) { return _pathGeometry_08; }
                var result = _pathGeometry_08 = _c.CreatePathGeometry(Path_4());
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 0F);
                propertySet.InsertScalar("TStart", 0F);
                BindProperty(_pathGeometry_08, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_08);
                BindProperty(_pathGeometry_08, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_08);
                return result;
            }

CompositionPathGeometry PathGeometry_09 ( ) [inline, private]

Definition at line 1515 of file LottieLogo.cs.

            {
                if (_pathGeometry_09 != null) { return _pathGeometry_09; }
                var result = _pathGeometry_09 = _c.CreatePathGeometry(Path_5());
                return result;
            }

CompositionPathGeometry PathGeometry_10 ( ) [inline, private]

Definition at line 1524 of file LottieLogo.cs.

            {
                if (_pathGeometry_10 != null) { return _pathGeometry_10; }
                var result = _pathGeometry_10 = _c.CreatePathGeometry(Path_6());
                return result;
            }

CompositionPathGeometry PathGeometry_11 ( ) [inline, private]

Definition at line 1533 of file LottieLogo.cs.

            {
                if (_pathGeometry_11 != null) { return _pathGeometry_11; }
                var result = _pathGeometry_11 = _c.CreatePathGeometry(Path_5());
                return result;
            }

CompositionPathGeometry PathGeometry_12 ( ) [inline, private]

Definition at line 1542 of file LottieLogo.cs.

            {
                if (_pathGeometry_12 != null) { return _pathGeometry_12; }
                var result = _pathGeometry_12 = _c.CreatePathGeometry(Path_7());
                return result;
            }

CompositionPathGeometry PathGeometry_13 ( ) [inline, private]

Definition at line 1551 of file LottieLogo.cs.

            {
                if (_pathGeometry_13 != null) { return _pathGeometry_13; }
                var result = _pathGeometry_13 = _c.CreatePathGeometry(Path_7());
                return result;
            }

CompositionPathGeometry PathGeometry_14 ( ) [inline, private]

Definition at line 1558 of file LottieLogo.cs.

            {
                if (_pathGeometry_14 != null) { return _pathGeometry_14; }
                var result = _pathGeometry_14 = _c.CreatePathGeometry(Path_4());
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 0F);
                propertySet.InsertScalar("TStart", 0F);
                BindProperty(_pathGeometry_14, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_14);
                BindProperty(_pathGeometry_14, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_14);
                return result;
            }

CompositionPathGeometry PathGeometry_15 ( ) [inline, private]

Definition at line 1572 of file LottieLogo.cs.

            {
                if (_pathGeometry_15 != null) { return _pathGeometry_15; }
                var result = _pathGeometry_15 = _c.CreatePathGeometry(Path_6());
                return result;
            }

CompositionPathGeometry PathGeometry_16 ( ) [inline, private]

Definition at line 1582 of file LottieLogo.cs.

            {
                if (_pathGeometry_16 != null) { return _pathGeometry_16; }
                var result = _pathGeometry_16 = _c.CreatePathGeometry(Path_4());
                result.TrimStart = 0.248999998F;
                return result;
            }

CompositionPathGeometry PathGeometry_17 ( ) [inline, private]

Definition at line 1590 of file LottieLogo.cs.

            {
                if (_pathGeometry_17 != null) { return _pathGeometry_17; }
                var result = _pathGeometry_17 = _c.CreatePathGeometry(Path_8());
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 0.810000002F);
                propertySet.InsertScalar("TStart", 0.800000012F);
                BindProperty(_pathGeometry_17, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_17);
                BindProperty(_pathGeometry_17, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_17);
                return result;
            }

CompositionPathGeometry PathGeometry_18 ( ) [inline, private]

Definition at line 1602 of file LottieLogo.cs.

            {
                if (_pathGeometry_18 != null) { return _pathGeometry_18; }
                var result = _pathGeometry_18 = _c.CreatePathGeometry(Path_8());
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 0.810000002F);
                propertySet.InsertScalar("TStart", 0.800000012F);
                BindProperty(_pathGeometry_18, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_18);
                BindProperty(_pathGeometry_18, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_18);
                return result;
            }

CompositionPathGeometry PathGeometry_19 ( ) [inline, private]

Definition at line 1614 of file LottieLogo.cs.

            {
                if (_pathGeometry_19 != null) { return _pathGeometry_19; }
                var result = _pathGeometry_19 = _c.CreatePathGeometry(new CompositionPath(Geometry_09()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_19, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_19);
                BindProperty(_pathGeometry_19, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_19);
                return result;
            }

CompositionPathGeometry PathGeometry_20 ( ) [inline, private]

Definition at line 1626 of file LottieLogo.cs.

            {
                if (_pathGeometry_20 != null) { return _pathGeometry_20; }
                var result = _pathGeometry_20 = _c.CreatePathGeometry(new CompositionPath(Geometry_10()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_20, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_20);
                BindProperty(_pathGeometry_20, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_20);
                return result;
            }

CompositionPathGeometry PathGeometry_21 ( ) [inline, private]

Definition at line 1638 of file LottieLogo.cs.

            {
                if (_pathGeometry_21 != null) { return _pathGeometry_21; }
                var result = _pathGeometry_21 = _c.CreatePathGeometry(new CompositionPath(Geometry_11()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_21, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_21);
                BindProperty(_pathGeometry_21, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_21);
                return result;
            }

CompositionPathGeometry PathGeometry_22 ( ) [inline, private]

Definition at line 1650 of file LottieLogo.cs.

            {
                if (_pathGeometry_22 != null) { return _pathGeometry_22; }
                var result = _pathGeometry_22 = _c.CreatePathGeometry(new CompositionPath(Geometry_12()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_22, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_22);
                BindProperty(_pathGeometry_22, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_22);
                return result;
            }

CompositionPathGeometry PathGeometry_23 ( ) [inline, private]

Definition at line 1662 of file LottieLogo.cs.

            {
                if (_pathGeometry_23 != null) { return _pathGeometry_23; }
                var result = _pathGeometry_23 = _c.CreatePathGeometry(new CompositionPath(Geometry_13()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_23, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_23);
                BindProperty(_pathGeometry_23, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_23);
                return result;
            }

CompositionPathGeometry PathGeometry_24 ( ) [inline, private]

Definition at line 1674 of file LottieLogo.cs.

            {
                if (_pathGeometry_24 != null) { return _pathGeometry_24; }
                var result = _pathGeometry_24 = _c.CreatePathGeometry(new CompositionPath(Geometry_14()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_24, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_24);
                BindProperty(_pathGeometry_24, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_24);
                return result;
            }

CompositionPathGeometry PathGeometry_25 ( ) [inline, private]

Definition at line 1686 of file LottieLogo.cs.

            {
                if (_pathGeometry_25 != null) { return _pathGeometry_25; }
                var result = _pathGeometry_25 = _c.CreatePathGeometry(new CompositionPath(Geometry_15()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_25, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_25);
                BindProperty(_pathGeometry_25, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_25);
                return result;
            }

CompositionPathGeometry PathGeometry_26 ( ) [inline, private]

Definition at line 1698 of file LottieLogo.cs.

            {
                if (_pathGeometry_26 != null) { return _pathGeometry_26; }
                var result = _pathGeometry_26 = _c.CreatePathGeometry(new CompositionPath(Geometry_16()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_26, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_26);
                BindProperty(_pathGeometry_26, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_26);
                return result;
            }

CompositionPathGeometry PathGeometry_27 ( ) [inline, private]

Definition at line 1710 of file LottieLogo.cs.

            {
                if (_pathGeometry_27 != null) { return _pathGeometry_27; }
                var result = _pathGeometry_27 = _c.CreatePathGeometry(new CompositionPath(Geometry_17()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_27, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_27);
                BindProperty(_pathGeometry_27, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_27);
                return result;
            }

CompositionPathGeometry PathGeometry_28 ( ) [inline, private]

Definition at line 1722 of file LottieLogo.cs.

            {
                if (_pathGeometry_28 != null) { return _pathGeometry_28; }
                var result = _pathGeometry_28 = _c.CreatePathGeometry(new CompositionPath(Geometry_18()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_28, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_28);
                BindProperty(_pathGeometry_28, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_28);
                return result;
            }

CompositionPathGeometry PathGeometry_29 ( ) [inline, private]

Definition at line 1734 of file LottieLogo.cs.

            {
                if (_pathGeometry_29 != null) { return _pathGeometry_29; }
                var result = _pathGeometry_29 = _c.CreatePathGeometry(new CompositionPath(Geometry_19()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_29, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_29);
                BindProperty(_pathGeometry_29, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_29);
                return result;
            }

CompositionPathGeometry PathGeometry_30 ( ) [inline, private]

Definition at line 1746 of file LottieLogo.cs.

            {
                if (_pathGeometry_30 != null) { return _pathGeometry_30; }
                var result = _pathGeometry_30 = _c.CreatePathGeometry(new CompositionPath(Geometry_20()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_30, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_30);
                BindProperty(_pathGeometry_30, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_30);
                return result;
            }

CompositionPathGeometry PathGeometry_31 ( ) [inline, private]

Definition at line 1758 of file LottieLogo.cs.

            {
                if (_pathGeometry_31 != null) { return _pathGeometry_31; }
                var result = _pathGeometry_31 = _c.CreatePathGeometry(new CompositionPath(Geometry_21()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_31, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_31);
                BindProperty(_pathGeometry_31, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_31);
                return result;
            }

CompositionPathGeometry PathGeometry_32 ( ) [inline, private]

Definition at line 1770 of file LottieLogo.cs.

            {
                if (_pathGeometry_32 != null) { return _pathGeometry_32; }
                var result = _pathGeometry_32 = _c.CreatePathGeometry(new CompositionPath(Geometry_22()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_32, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_32);
                BindProperty(_pathGeometry_32, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_32);
                return result;
            }

CompositionPathGeometry PathGeometry_33 ( ) [inline, private]

Definition at line 1782 of file LottieLogo.cs.

            {
                if (_pathGeometry_33 != null) { return _pathGeometry_33; }
                var result = _pathGeometry_33 = _c.CreatePathGeometry(new CompositionPath(Geometry_23()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_33, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_33);
                BindProperty(_pathGeometry_33, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_33);
                return result;
            }

CompositionPathGeometry PathGeometry_34 ( ) [inline, private]

Definition at line 1794 of file LottieLogo.cs.

            {
                if (_pathGeometry_34 != null) { return _pathGeometry_34; }
                var result = _pathGeometry_34 = _c.CreatePathGeometry(new CompositionPath(Geometry_24()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_34, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_34);
                BindProperty(_pathGeometry_34, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_34);
                return result;
            }

CompositionPathGeometry PathGeometry_35 ( ) [inline, private]

Definition at line 1806 of file LottieLogo.cs.

            {
                if (_pathGeometry_35 != null) { return _pathGeometry_35; }
                var result = _pathGeometry_35 = _c.CreatePathGeometry(new CompositionPath(Geometry_25()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_35, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_35);
                BindProperty(_pathGeometry_35, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_35);
                return result;
            }

CompositionPathGeometry PathGeometry_36 ( ) [inline, private]

Definition at line 1818 of file LottieLogo.cs.

            {
                if (_pathGeometry_36 != null) { return _pathGeometry_36; }
                var result = _pathGeometry_36 = _c.CreatePathGeometry(new CompositionPath(Geometry_26()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_36, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_36);
                BindProperty(_pathGeometry_36, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_36);
                return result;
            }

CompositionPathGeometry PathGeometry_37 ( ) [inline, private]

Definition at line 1830 of file LottieLogo.cs.

            {
                if (_pathGeometry_37 != null) { return _pathGeometry_37; }
                var result = _pathGeometry_37 = _c.CreatePathGeometry(new CompositionPath(Geometry_27()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_37, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_37);
                BindProperty(_pathGeometry_37, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_37);
                return result;
            }

CompositionPathGeometry PathGeometry_38 ( ) [inline, private]

Definition at line 1842 of file LottieLogo.cs.

            {
                if (_pathGeometry_38 != null) { return _pathGeometry_38; }
                var result = _pathGeometry_38 = _c.CreatePathGeometry(new CompositionPath(Geometry_28()));
                var propertySet = result.Properties;
                propertySet.InsertScalar("TEnd", 1F);
                propertySet.InsertScalar("TStart", 0.870000005F);
                BindProperty(_pathGeometry_38, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_38);
                BindProperty(_pathGeometry_38, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_38);
                return result;
            }

Vector2KeyFrameAnimation RadiusVector2Animation ( ) [inline, private]

Definition at line 3824 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_radiusVector2Animation != null) { return _radiusVector2Animation; }
                var result = _radiusVector2Animation = CreateVector2KeyFrameAnimation(0F, new Vector2(1.5F, 1.5F), StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, new Vector2(1.5F, 1.5F), HoldThenStepEasingFunction());
                // Frame 61.
                result.InsertKeyFrame(0.340782136F, new Vector2(22.2999992F, 22.2999992F), _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0F), new Vector2(0.666999996F, 1F)));
                return result;
            }

ContainerVisual Root ( ) [inline, private]

Definition at line 2579 of file LottieLogo.cs.

            {
                if (_root != null) { return _root; }
                var result = _root = _c.CreateContainerVisual();
                var propertySet = result.Properties;
                propertySet.InsertScalar("Progress", 0F);
                propertySet.InsertScalar("t0", 0F);
                // Layer aggregator
                result.Children.InsertAtTop(ShapeVisual_0());
                return result;
            }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 2654 of file LottieLogo.cs.

            {
                if (_rootProgress != null) { return _rootProgress; }
                var result = _rootProgress = _c.CreateExpressionAnimation("_.Progress");
                result.SetReferenceParameter("_", _root);
                return result;
            }

CompositionRoundedRectangleGeometry RoundedRectangle_375x667 ( ) [inline, private]

Definition at line 1857 of file LottieLogo.cs.

            {
                var result = _c.CreateRoundedRectangleGeometry();
                result.CornerRadius = new Vector2(9.99999997E-07F, 9.99999997E-07F);
                result.Offset = new Vector2(-187.5F, -333.5F);
                result.Size = new Vector2(375F, 667F);
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_00 ( ) [inline, private]

Definition at line 3838 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 96.
                result.InsertKeyFrame(0.536312878F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_01 ( ) [inline, private]

Definition at line 3849 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 102.
                result.InsertKeyFrame(0.569832385F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_02 ( ) [inline, private]

Definition at line 3862 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_03 ( ) [inline, private]

Definition at line 3873 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 93.
                result.InsertKeyFrame(0.519553065F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_04 ( ) [inline, private]

Definition at line 3884 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_shapeVisibilityAnimation_04 != null) { return _shapeVisibilityAnimation_04; }
                var result = _shapeVisibilityAnimation_04 = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 81.
                result.InsertKeyFrame(0.452513963F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_05 ( ) [inline, private]

Definition at line 3896 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 96.
                result.InsertKeyFrame(0.536312878F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_06 ( ) [inline, private]

Definition at line 3909 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 86.
                result.InsertKeyFrame(0.480446935F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_07 ( ) [inline, private]

Definition at line 3920 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 94.
                result.InsertKeyFrame(0.525139689F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_08 ( ) [inline, private]

Definition at line 3933 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_09 ( ) [inline, private]

Definition at line 3944 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 59.
                result.InsertKeyFrame(0.329608947F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 156.
                result.InsertKeyFrame(0.87150836F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_10 ( ) [inline, private]

Definition at line 3957 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_11 ( ) [inline, private]

Definition at line 3970 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 72.
                result.InsertKeyFrame(0.402234644F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 89.
                result.InsertKeyFrame(0.497206718F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_12 ( ) [inline, private]

Definition at line 3983 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_13 ( ) [inline, private]

Definition at line 3994 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 70.
                result.InsertKeyFrame(0.391061455F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 161.
                result.InsertKeyFrame(0.899441361F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_14 ( ) [inline, private]

Definition at line 4007 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_15 ( ) [inline, private]

Definition at line 4018 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 59.
                result.InsertKeyFrame(0.329608947F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_16 ( ) [inline, private]

Definition at line 4029 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_17 ( ) [inline, private]

Definition at line 4040 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 70.
                result.InsertKeyFrame(0.391061455F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_18 ( ) [inline, private]

Definition at line 4051 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 28.
                result.InsertKeyFrame(0.156424582F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_19 ( ) [inline, private]

Definition at line 4064 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 16.
                result.InsertKeyFrame(0.0893854722F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_20 ( ) [inline, private]

Definition at line 4075 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 18.
                result.InsertKeyFrame(0.100558661F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_21 ( ) [inline, private]

Definition at line 4086 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 17.
                result.InsertKeyFrame(0.0949720666F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_22 ( ) [inline, private]

Definition at line 4097 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 30.
                result.InsertKeyFrame(0.167597771F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 37.
                result.InsertKeyFrame(0.206703916F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_23 ( ) [inline, private]

Definition at line 4110 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 65.
                result.InsertKeyFrame(0.363128483F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_24 ( ) [inline, private]

Definition at line 4123 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_25 ( ) [inline, private]

Definition at line 4136 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 97.
                result.InsertKeyFrame(0.541899443F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 107.
                result.InsertKeyFrame(0.597765386F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_26 ( ) [inline, private]

Definition at line 4149 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 80.
                result.InsertKeyFrame(0.446927369F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 90.
                result.InsertKeyFrame(0.502793312F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_27 ( ) [inline, private]

Definition at line 4162 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 94.
                result.InsertKeyFrame(0.525139689F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_28 ( ) [inline, private]

Definition at line 4175 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 85.
                result.InsertKeyFrame(0.47486034F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 95.
                result.InsertKeyFrame(0.530726254F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_29 ( ) [inline, private]

Definition at line 4188 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

Vector2KeyFrameAnimation ShapeVisibilityAnimation_30 ( ) [inline, private]

Definition at line 4201 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
                return result;
            }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 3557 of file LottieLogo.cs.

            {
                var result = _c.CreateShapeVisual();
                result.Size = new Vector2(375F, 667F);
                var shapes = result.Shapes;
                // Offset:<187.5, 333.5>
                shapes.Add(SpriteShape_00());
                // Layer: Dot-Y
                shapes.Add(ContainerShape_00());
                // Layer: E3-Y
                shapes.Add(ContainerShape_02());
                // Layer: E3-B
                shapes.Add(ContainerShape_03());
                // Layer: I-Y
                shapes.Add(ContainerShape_04());
                // Layer: I-B
                shapes.Add(ContainerShape_05());
                // Layer: E2-Y
                shapes.Add(ContainerShape_06());
                // Layer: E2-B
                shapes.Add(ContainerShape_07());
                // Layer: E1-Y
                shapes.Add(ContainerShape_08());
                // Layer: E1-B
                shapes.Add(ContainerShape_09());
                // Layer: T1a-Y
                shapes.Add(ContainerShape_10());
                // Layer: T2b-Y
                shapes.Add(SpriteShape_11());
                // Layer: T2a-Y
                shapes.Add(SpriteShape_12());
                // Layer: T2b-B
                shapes.Add(SpriteShape_13());
                // Layer: T1b-Y
                shapes.Add(SpriteShape_14());
                // Layer: T1b-B
                shapes.Add(SpriteShape_15());
                // Layer: O-Y
                shapes.Add(ContainerShape_11());
                // Layer: T1a-Y 2
                shapes.Add(ContainerShape_12());
                // Layer: T2a-B
                shapes.Add(SpriteShape_19());
                // Layer: T1a-B
                shapes.Add(ContainerShape_13());
                // Layer: Dot-Y
                shapes.Add(ContainerShape_14());
                // Layer: L-Y
                shapes.Add(SpriteShape_22());
                // Layer: L-B
                shapes.Add(SpriteShape_23());
                // Layer: Dot1
                shapes.Add(ContainerShape_16());
                // Layer: S1-Y
                shapes.Add(ContainerShape_17());
                // Layer: S7
                shapes.Add(ContainerShape_18());
                // Layer: S3-Y
                shapes.Add(ContainerShape_19());
                // Layer: S3-Y 2
                shapes.Add(ContainerShape_20());
                // Layer: S11
                shapes.Add(SpriteShape_36());
                // Layer: S12
                shapes.Add(SpriteShape_37());
                // Layer: S13
                shapes.Add(SpriteShape_38());
                // Layer: S3-Y 3
                shapes.Add(ContainerShape_21());
                // Layer: S3-Y 4
                shapes.Add(ContainerShape_22());
                return result;
            }

CompositionSpriteShape SpriteShape_00 ( ) [inline, private]

Definition at line 1868 of file LottieLogo.cs.

            {
                // Offset:<187.5, 333.5>
                var geometry = RoundedRectangle_375x667();
                var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 187.5F, 333.5F), ColorBrush_AlmostDarkTurquoise_FF00D1C1());
                return result;
            }

CompositionSpriteShape SpriteShape_01 ( ) [inline, private]

Definition at line 1880 of file LottieLogo.cs.

            {
                // Offset:<196, 267>
                var geometry = Ellipse_4p6();
                var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F), ColorBrush_White());
                return result;
            }

CompositionSpriteShape SpriteShape_02 ( ) [inline, private]

Definition at line 1891 of file LottieLogo.cs.

            {
                // Offset:<344.674, 261.877>
                var result = CreateSpriteShape(PathGeometry_00(), new Matrix3x2(1F, 0F, 0F, 1F, 344.674011F, 261.877014F));
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.56200027F;
                return result;
            }

CompositionSpriteShape SpriteShape_03 ( ) [inline, private]

Definition at line 1907 of file LottieLogo.cs.

            {
                // Offset:<344.739, 261.877>
                var result = CreateSpriteShape(PathGeometry_01(), new Matrix3x2(1F, 0F, 0F, 1F, 344.739014F, 261.877014F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.56200027F;
                return result;
            }

CompositionSpriteShape SpriteShape_04 ( ) [inline, private]

Definition at line 1923 of file LottieLogo.cs.

            {
                // Offset:<304.135, 282.409>
                var result = CreateSpriteShape(PathGeometry_02(), new Matrix3x2(1F, 0F, 0F, 1F, 304.13501F, 282.408997F));
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Square;
                result.StrokeStartCap = CompositionStrokeCap.Square;
                result.StrokeEndCap = CompositionStrokeCap.Square;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 8.39999962F;
                return result;
            }

CompositionSpriteShape SpriteShape_05 ( ) [inline, private]

Definition at line 1939 of file LottieLogo.cs.

            {
                // Offset:<304.135, 282.409>
                var result = CreateSpriteShape(PathGeometry_03(), new Matrix3x2(1F, 0F, 0F, 1F, 304.13501F, 282.408997F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Square;
                result.StrokeStartCap = CompositionStrokeCap.Square;
                result.StrokeEndCap = CompositionStrokeCap.Square;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_06 ( ) [inline, private]

Definition at line 1955 of file LottieLogo.cs.

            {
                // Offset:<331.664, 238.14>
                var result = CreateSpriteShape(PathGeometry_04(), new Matrix3x2(1F, 0F, 0F, 1F, 331.664001F, 238.139999F));
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 8.39999962F;
                return result;
            }

CompositionSpriteShape SpriteShape_07 ( ) [inline, private]

Definition at line 1971 of file LottieLogo.cs.

            {
                // Offset:<331.664, 238.14>
                var result = CreateSpriteShape(PathGeometry_05(), new Matrix3x2(1F, 0F, 0F, 1F, 331.664001F, 238.139999F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.56200027F;
                return result;
            }

CompositionSpriteShape SpriteShape_08 ( ) [inline, private]

Definition at line 1987 of file LottieLogo.cs.

            {
                // Offset:<344.672, 214.842>
                var result = CreateSpriteShape(PathGeometry_06(), new Matrix3x2(1F, 0F, 0F, 1F, 344.671997F, 214.841995F));
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 8.39999962F;
                return result;
            }

CompositionSpriteShape SpriteShape_09 ( ) [inline, private]

Definition at line 2003 of file LottieLogo.cs.

            {
                // Offset:<344.672, 214.842>
                var result = CreateSpriteShape(PathGeometry_07(), new Matrix3x2(1F, 0F, 0F, 1F, 344.671997F, 214.841995F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.56200027F;
                return result;
            }

CompositionSpriteShape SpriteShape_10 ( ) [inline, private]

Definition at line 2019 of file LottieLogo.cs.

            {
                // Offset:<227.677, 234.375>
                var result = CreateSpriteShape(PathGeometry_08(), new Matrix3x2(1F, 0F, 0F, 1F, 227.677002F, 234.375F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 8.39999962F;
                return result;
            }

CompositionSpriteShape SpriteShape_11 ( ) [inline, private]

Definition at line 2034 of file LottieLogo.cs.

            {
                // Offset:<-56.5, 83.5>
                if (_spriteShape_11 != null) { return _spriteShape_11; }
                var result = _spriteShape_11 = CreateSpriteShape(PathGeometry_09(), new Matrix3x2(1F, 0F, 0F, 1F, -56.5F, 83.5F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_12 ( ) [inline, private]

Definition at line 2051 of file LottieLogo.cs.

            {
                // Offset:<221.198, 330.758>
                if (_spriteShape_12 != null) { return _spriteShape_12; }
                var result = _spriteShape_12 = CreateSpriteShape(PathGeometry_10(), new Matrix3x2(1F, 0F, 0F, 1F, 221.197998F, 330.757996F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Square;
                result.StrokeStartCap = CompositionStrokeCap.Square;
                result.StrokeEndCap = CompositionStrokeCap.Square;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_13 ( ) [inline, private]

Definition at line 2068 of file LottieLogo.cs.

            {
                // Offset:<-56.5, 83.5>
                if (_spriteShape_13 != null) { return _spriteShape_13; }
                var result = _spriteShape_13 = CreateSpriteShape(PathGeometry_11(), new Matrix3x2(1F, 0F, 0F, 1F, -56.5F, 83.5F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_14 ( ) [inline, private]

Definition at line 2085 of file LottieLogo.cs.

            {
                // Offset:<186.256, 349.081>
                if (_spriteShape_14 != null) { return _spriteShape_14; }
                var result = _spriteShape_14 = CreateSpriteShape(PathGeometry_12(), new Matrix3x2(1F, 0F, 0F, 1F, 186.255997F, 349.080994F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeLineJoin = CompositionStrokeLineJoin.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 8.39999962F;
                return result;
            }

CompositionSpriteShape SpriteShape_15 ( ) [inline, private]

Definition at line 2103 of file LottieLogo.cs.

            {
                // Offset:<186.256, 349.081>
                if (_spriteShape_15 != null) { return _spriteShape_15; }
                var result = _spriteShape_15 = CreateSpriteShape(PathGeometry_13(), new Matrix3x2(1F, 0F, 0F, 1F, 186.255997F, 349.080994F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeLineJoin = CompositionStrokeLineJoin.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_16 ( ) [inline, private]

Definition at line 2122 of file LottieLogo.cs.

            {
                // Offset:<196, 267>
                var result = CreateSpriteShape(Ellipse_0_0(), new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeThickness = 8.80000019F;
                return result;
            }

CompositionSpriteShape SpriteShape_17 ( ) [inline, private]

Definition at line 2134 of file LottieLogo.cs.

            {
                // Offset:<196, 267>
                var result = CreateSpriteShape(Ellipse_0_1(), new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F));
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_18 ( ) [inline, private]

Definition at line 2149 of file LottieLogo.cs.

            {
                // Offset:<227.677, 234.375>
                var result = CreateSpriteShape(PathGeometry_14(), new Matrix3x2(1F, 0F, 0F, 1F, 227.677002F, 234.375F));
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 8.39999962F;
                return result;
            }

CompositionSpriteShape SpriteShape_19 ( ) [inline, private]

Definition at line 2164 of file LottieLogo.cs.

            {
                // Offset:<221.198, 330.758>
                if (_spriteShape_19 != null) { return _spriteShape_19; }
                var result = _spriteShape_19 = CreateSpriteShape(PathGeometry_15(), new Matrix3x2(1F, 0F, 0F, 1F, 221.197998F, 330.757996F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Square;
                result.StrokeStartCap = CompositionStrokeCap.Square;
                result.StrokeEndCap = CompositionStrokeCap.Square;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_20 ( ) [inline, private]

Definition at line 2182 of file LottieLogo.cs.

            {
                // Offset:<227.677, 234.375>
                var result = CreateSpriteShape(PathGeometry_16(), new Matrix3x2(1F, 0F, 0F, 1F, 227.677002F, 234.375F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_21 ( ) [inline, private]

Definition at line 2199 of file LottieLogo.cs.

            {
                // Offset:<196, 267>
                var geometry = Ellipse_4p7();
                var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F), ColorBrush_White());
                return result;
            }

CompositionSpriteShape SpriteShape_22 ( ) [inline, private]

Definition at line 2209 of file LottieLogo.cs.

            {
                // Offset:<109.52901, 354.143>
                if (_spriteShape_22 != null) { return _spriteShape_22; }
                var result = _spriteShape_22 = CreateSpriteShape(PathGeometry_17(), new Matrix3x2(1F, 0F, 0F, 1F, 109.529007F, 354.143005F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 8.39999962F;
                return result;
            }

CompositionSpriteShape SpriteShape_23 ( ) [inline, private]

Definition at line 2226 of file LottieLogo.cs.

            {
                // Offset:<109.52901, 354.143>
                if (_spriteShape_23 != null) { return _spriteShape_23; }
                var result = _spriteShape_23 = CreateSpriteShape(PathGeometry_18(), new Matrix3x2(1F, 0F, 0F, 1F, 109.529007F, 354.143005F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 5F;
                result.StrokeThickness = 9.19400024F;
                return result;
            }

CompositionSpriteShape SpriteShape_24 ( ) [inline, private]

Definition at line 2244 of file LottieLogo.cs.

            {
                // Offset:<196, 267>
                var geometry = Ellipse_4p7();
                var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F), ColorBrush_White());
                return result;
            }

CompositionSpriteShape SpriteShape_25 ( ) [inline, private]

Definition at line 2255 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_19(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 1.5F;
                return result;
            }

CompositionSpriteShape SpriteShape_26 ( ) [inline, private]

Definition at line 2271 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_20(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 1.5F;
                return result;
            }

CompositionSpriteShape SpriteShape_27 ( ) [inline, private]

Definition at line 2287 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_21(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 1.5F;
                return result;
            }

CompositionSpriteShape SpriteShape_28 ( ) [inline, private]

Definition at line 2303 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_22(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 1.5F;
                return result;
            }

CompositionSpriteShape SpriteShape_29 ( ) [inline, private]

Definition at line 2319 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_23(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_30 ( ) [inline, private]

Definition at line 2335 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_24(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_31 ( ) [inline, private]

Definition at line 2351 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_25(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_32 ( ) [inline, private]

Definition at line 2367 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_26(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_33 ( ) [inline, private]

Definition at line 2383 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_27(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_34 ( ) [inline, private]

Definition at line 2399 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_28(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_35 ( ) [inline, private]

Definition at line 2415 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                var result = CreateSpriteShape(PathGeometry_29(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_36 ( ) [inline, private]

Definition at line 2430 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                if (_spriteShape_36 != null) { return _spriteShape_36; }
                var result = _spriteShape_36 = CreateSpriteShape(PathGeometry_30(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 1.5F;
                return result;
            }

CompositionSpriteShape SpriteShape_37 ( ) [inline, private]

Definition at line 2447 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                if (_spriteShape_37 != null) { return _spriteShape_37; }
                var result = _spriteShape_37 = CreateSpriteShape(PathGeometry_31(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 1.5F;
                return result;
            }

CompositionSpriteShape SpriteShape_38 ( ) [inline, private]

Definition at line 2464 of file LottieLogo.cs.

            {
                // Offset:<179.5, 333.5>
                if (_spriteShape_38 != null) { return _spriteShape_38; }
                var result = _spriteShape_38 = CreateSpriteShape(PathGeometry_32(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
                result.Scale = new Vector2(0F, 0F);
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 1.5F;
                return result;
            }

CompositionSpriteShape SpriteShape_39 ( ) [inline, private]

Definition at line 2482 of file LottieLogo.cs.

            {
                // Offset:<212.662, 248.428>, Rotation:97.90000401019934 degrees
                var result = CreateSpriteShape(PathGeometry_33(), new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_40 ( ) [inline, private]

Definition at line 2498 of file LottieLogo.cs.

            {
                // Offset:<212.662, 248.428>, Rotation:97.90000401019934 degrees
                var result = CreateSpriteShape(PathGeometry_34(), new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_41 ( ) [inline, private]

Definition at line 2514 of file LottieLogo.cs.

            {
                // Offset:<212.662, 248.428>, Rotation:97.90000401019934 degrees
                var result = CreateSpriteShape(PathGeometry_35(), new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_42 ( ) [inline, private]

Definition at line 2530 of file LottieLogo.cs.

            {
                // Offset:<207.662, 419.42798>, Rotation:-89.09999525232098 degrees,
                // Scale:<0.99999994, 0.99999994>
                var result = CreateSpriteShape(PathGeometry_36(), new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_43 ( ) [inline, private]

Definition at line 2547 of file LottieLogo.cs.

            {
                // Offset:<207.662, 419.42798>, Rotation:-89.09999525232098 degrees,
                // Scale:<0.99999994, 0.99999994>
                var result = CreateSpriteShape(PathGeometry_37(), new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

CompositionSpriteShape SpriteShape_44 ( ) [inline, private]

Definition at line 2564 of file LottieLogo.cs.

            {
                // Offset:<207.662, 419.42798>, Rotation:-89.09999525232098 degrees,
                // Scale:<0.99999994, 0.99999994>
                var result = CreateSpriteShape(PathGeometry_38(), new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F));
                result.StrokeBrush = ColorBrush_White();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 2F;
                result.StrokeThickness = 2F;
                return result;
            }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | string | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 505 of file LottieLogo.cs.

            {
                target.StartAnimation(animatedPropertyName, animation);
                var controller = target.TryGetAnimationController(animatedPropertyName);
                controller.Pause();
                controller.StartAnimation("Progress", controllerProgressExpression);
            }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 3639 of file LottieLogo.cs.

            {
                if (_stepThenHoldEasingFunction != null) { return _stepThenHoldEasingFunction; }
                var result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
                result.IsInitialStepSingleFrame = true;
                return result;
            }

ScalarKeyFrameAnimation t0ScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 2662 of file LottieLogo.cs.

            {
                // Frame 35.26.
                var result = CreateScalarKeyFrameAnimation(0.196966499F, 0F, StepThenHoldEasingFunction());
                result.SetReferenceParameter("_", _root);
                // Frame 44.
                result.InsertKeyFrame(0.245810047F, 1F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.197999999F), new Vector2(0.638000011F, 1F)));
                // Frame 44.
                result.InsertKeyFrame(0.245810062F, 0F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675946F, 1F, _c.CreateCubicBezierEasingFunction(new Vector2(0.523000002F, 0F), new Vector2(0.795000017F, 1F)));
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_0_to_1_0 ( ) [inline, private]

Definition at line 2677 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
                // Frame 74.
                result.InsertKeyFrame(0.413407832F, 1F, CubicBezierEasingFunction_6());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_0_to_1_1 ( ) [inline, private]

Definition at line 2689 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, 1F, CubicBezierEasingFunction_6());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_0p81_to_0p734_0 ( ) [inline, private]

Definition at line 2701 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.810000002F, StepThenHoldEasingFunction());
                // Frame 16.
                result.InsertKeyFrame(0.0893854722F, 0.810000002F, HoldThenStepEasingFunction());
                // Frame 27.
                result.InsertKeyFrame(0.150837988F, 0.734000027F, CubicBezierEasingFunction_8());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_0p81_to_0p734_1 ( ) [inline, private]

Definition at line 2713 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.810000002F, StepThenHoldEasingFunction());
                // Frame 18.
                result.InsertKeyFrame(0.100558661F, 0.810000002F, HoldThenStepEasingFunction());
                // Frame 29.
                result.InsertKeyFrame(0.162011176F, 0.734000027F, CubicBezierEasingFunction_8());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_00 ( ) [inline, private]

Definition at line 2725 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 29.
                result.InsertKeyFrame(0.162011176F, 1F, HoldThenStepEasingFunction());
                // Frame 33.
                result.InsertKeyFrame(0.184357539F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 36.
                result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_01 ( ) [inline, private]

Definition at line 2739 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 29.
                result.InsertKeyFrame(0.162011176F, 1F, HoldThenStepEasingFunction());
                // Frame 33.
                result.InsertKeyFrame(0.184357539F, 0.690559983F, CubicBezierEasingFunction_2());
                // Frame 36.
                result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_02 ( ) [inline, private]

Definition at line 2753 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_tEndScalarAnimation_1_to_0_02 != null) { return _tEndScalarAnimation_1_to_0_02; }
                var result = _tEndScalarAnimation_1_to_0_02 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 65.
                result.InsertKeyFrame(0.363128483F, 1F, HoldThenStepEasingFunction());
                // Frame 70.
                result.InsertKeyFrame(0.391061455F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_03 ( ) [inline, private]

Definition at line 2768 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_tEndScalarAnimation_1_to_0_03 != null) { return _tEndScalarAnimation_1_to_0_03; }
                var result = _tEndScalarAnimation_1_to_0_03 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
                // Frame 57.
                result.InsertKeyFrame(0.318435758F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_04 ( ) [inline, private]

Definition at line 2783 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
                // Frame 57.
                result.InsertKeyFrame(0.318435758F, 0.758560002F, CubicBezierEasingFunction_2());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_05 ( ) [inline, private]

Definition at line 2797 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
                // Frame 57.
                result.InsertKeyFrame(0.318435758F, 0.704559982F, CubicBezierEasingFunction_2());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_06 ( ) [inline, private]

Definition at line 2811 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_tEndScalarAnimation_1_to_0_06 != null) { return _tEndScalarAnimation_1_to_0_06; }
                var result = _tEndScalarAnimation_1_to_0_06 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 97.
                result.InsertKeyFrame(0.541899443F, 1F, HoldThenStepEasingFunction());
                // Frame 100.
                result.InsertKeyFrame(0.558659196F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 107.
                result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_07 ( ) [inline, private]

Definition at line 2826 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 97.
                result.InsertKeyFrame(0.541899443F, 1F, HoldThenStepEasingFunction());
                // Frame 100.
                result.InsertKeyFrame(0.558659196F, 0.758560002F, CubicBezierEasingFunction_2());
                // Frame 107.
                result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_08 ( ) [inline, private]

Definition at line 2840 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 80.
                result.InsertKeyFrame(0.446927369F, 1F, HoldThenStepEasingFunction());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 87.
                result.InsertKeyFrame(0.486033529F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_09 ( ) [inline, private]

Definition at line 2854 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, 1F, HoldThenStepEasingFunction());
                // Frame 87.
                result.InsertKeyFrame(0.486033529F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 91.
                result.InsertKeyFrame(0.508379877F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_10 ( ) [inline, private]

Definition at line 2868 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 85.
                result.InsertKeyFrame(0.47486034F, 1F, HoldThenStepEasingFunction());
                // Frame 90.
                result.InsertKeyFrame(0.502793312F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 94.
                result.InsertKeyFrame(0.525139689F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_11 ( ) [inline, private]

Definition at line 2882 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_tEndScalarAnimation_1_to_0_11 != null) { return _tEndScalarAnimation_1_to_0_11; }
                var result = _tEndScalarAnimation_1_to_0_11 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 1F, HoldThenStepEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_12 ( ) [inline, private]

Definition at line 2897 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 1F, HoldThenStepEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, 0.758560002F, CubicBezierEasingFunction_2());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_13 ( ) [inline, private]

Definition at line 2911 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_tEndScalarAnimation_1_to_0_13 != null) { return _tEndScalarAnimation_1_to_0_13; }
                var result = _tEndScalarAnimation_1_to_0_13 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, 1F, HoldThenStepEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, 0.663559973F, CubicBezierEasingFunction_2());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_14 ( ) [inline, private]

Definition at line 2926 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, 1F, HoldThenStepEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, 0.758560002F, CubicBezierEasingFunction_2());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p316_0 ( ) [inline, private]

Definition at line 2973 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, 0F, HoldThenStepEasingFunction());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, 0.316000015F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p316_1 ( ) [inline, private]

Definition at line 2988 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, 0F, HoldThenStepEasingFunction());
                // Frame 97.
                result.InsertKeyFrame(0.541899443F, 0.316000015F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p375_0 ( ) [inline, private]

Definition at line 3003 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, 0F, HoldThenStepEasingFunction());
                // Frame 88.
                result.InsertKeyFrame(0.491620123F, 0.375F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p375_1 ( ) [inline, private]

Definition at line 3018 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, 0F, HoldThenStepEasingFunction());
                // Frame 93.
                result.InsertKeyFrame(0.519553065F, 0.375F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p43_0 ( ) [inline, private]

Definition at line 2943 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0F, HoldThenStepEasingFunction());
                // Frame 92.
                result.InsertKeyFrame(0.513966501F, 0.430000007F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p43_1 ( ) [inline, private]

Definition at line 2958 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 86.
                result.InsertKeyFrame(0.480446935F, 0F, HoldThenStepEasingFunction());
                // Frame 95.
                result.InsertKeyFrame(0.530726254F, 0.430000007F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p457_0 ( ) [inline, private]

Definition at line 3033 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, 0F, HoldThenStepEasingFunction());
                // Frame 88.
                result.InsertKeyFrame(0.491620123F, 0.456999987F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p457_1 ( ) [inline, private]

Definition at line 3048 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 81.
                result.InsertKeyFrame(0.452513963F, 0F, HoldThenStepEasingFunction());
                // Frame 91.
                result.InsertKeyFrame(0.508379877F, 0.456999987F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0p117_to_1_0 ( ) [inline, private]

Definition at line 3090 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.116999999F, StepThenHoldEasingFunction());
                // Frame 70.
                result.InsertKeyFrame(0.391061455F, 0.116999999F, HoldThenStepEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 1F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0p117_to_1_1 ( ) [inline, private]

Definition at line 3104 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.116999999F, StepThenHoldEasingFunction());
                // Frame 81.
                result.InsertKeyFrame(0.452513963F, 0.116999999F, HoldThenStepEasingFunction());
                // Frame 88.
                result.InsertKeyFrame(0.491620123F, 1F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.209999993F, 1F)));
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0p249_to_0p891 ( ) [inline, private]

Definition at line 3119 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.248999998F, StepThenHoldEasingFunction());
                // Frame 70.
                result.InsertKeyFrame(0.391061455F, 0.248999998F, HoldThenStepEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, 0.890999973F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.672999978F, 1F)));
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0p411_to_0p665_0 ( ) [inline, private]

Definition at line 3133 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.411000013F, StepThenHoldEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, 0.411000013F, HoldThenStepEasingFunction());
                // Frame 85.
                result.InsertKeyFrame(0.47486034F, 0.665000021F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0p411_to_0p665_1 ( ) [inline, private]

Definition at line 3147 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.411000013F, StepThenHoldEasingFunction());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0.411000013F, HoldThenStepEasingFunction());
                // Frame 91.
                result.InsertKeyFrame(0.508379877F, 0.665000021F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0p5_to_1_0 ( ) [inline, private]

Definition at line 3062 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
                // Frame 72.
                result.InsertKeyFrame(0.402234644F, 0.5F, HoldThenStepEasingFunction());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 1F, CubicBezierEasingFunction_7());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0p5_to_1_1 ( ) [inline, private]

Definition at line 3076 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 0.5F, HoldThenStepEasingFunction());
                // Frame 85.
                result.InsertKeyFrame(0.47486034F, 1F, CubicBezierEasingFunction_7());
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_1_to_0p88 ( ) [inline, private]

Definition at line 3163 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
                // Frame 63.
                result.InsertKeyFrame(0.351955295F, 0.879999995F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_0p399 ( ) [inline, private]

Definition at line 3179 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
                // Frame 63.
                result.InsertKeyFrame(0.351955295F, 0.300000012F, CubicBezierEasingFunction_2());
                // Frame 91.
                result.InsertKeyFrame(0.508379877F, 0.398999989F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 1F), new Vector2(0.432000011F, 1F)));
                return result;
            }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0p29_to_0_0 ( ) [inline, private]

Definition at line 3223 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.289999992F, StepThenHoldEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, 0.289999992F, HoldThenStepEasingFunction());
                // Frame 85.
                result.InsertKeyFrame(0.47486034F, 0F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0p29_to_0_1 ( ) [inline, private]

Definition at line 3237 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.289999992F, StepThenHoldEasingFunction());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0.289999992F, HoldThenStepEasingFunction());
                // Frame 91.
                result.InsertKeyFrame(0.508379877F, 0F, CubicBezierEasingFunction_4());
                return result;
            }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0p5_to_0_0 ( ) [inline, private]

Definition at line 3195 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
                // Frame 72.
                result.InsertKeyFrame(0.402234644F, 0.5F, HoldThenStepEasingFunction());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_7());
                return result;
            }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0p5_to_0_1 ( ) [inline, private]

Definition at line 3209 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 0.5F, HoldThenStepEasingFunction());
                // Frame 85.
                result.InsertKeyFrame(0.47486034F, 0F, CubicBezierEasingFunction_7());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0_to_0p249 ( ) [inline, private]

Definition at line 3249 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_tStartScalarAnimation_0_to_0p249 != null) { return _tStartScalarAnimation_0_to_0p249; }
                var result = _tStartScalarAnimation_0_to_0p249 = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
                // Frame 70.
                result.InsertKeyFrame(0.391061455F, 0.248999998F, _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0F), new Vector2(0.833000004F, 1F)));
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_00 ( ) [inline, private]

Definition at line 3290 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 29.
                result.InsertKeyFrame(0.162011176F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 33.
                result.InsertKeyFrame(0.184357539F, 0.375330001F, CubicBezierEasingFunction_2());
                // Frame 36.
                result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_01 ( ) [inline, private]

Definition at line 3304 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 29.
                result.InsertKeyFrame(0.162011176F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 33.
                result.InsertKeyFrame(0.184357539F, 0.253329992F, CubicBezierEasingFunction_2());
                // Frame 36.
                result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_02 ( ) [inline, private]

Definition at line 3318 of file LottieLogo.cs.

            {
                // Frame 0.
                if (_tStartScalarAnimation_0p87_to_0_02 != null) { return _tStartScalarAnimation_0p87_to_0_02; }
                var result = _tStartScalarAnimation_0p87_to_0_02 = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 65.
                result.InsertKeyFrame(0.363128483F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 70.
                result.InsertKeyFrame(0.391061455F, 0.212329999F, CubicBezierEasingFunction_2());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_03 ( ) [inline, private]

Definition at line 3333 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 57.
                result.InsertKeyFrame(0.318435758F, 0.421330005F, CubicBezierEasingFunction_2());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_04 ( ) [inline, private]

Definition at line 3347 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 57.
                result.InsertKeyFrame(0.318435758F, 0.438329995F, CubicBezierEasingFunction_2());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_05 ( ) [inline, private]

Definition at line 3361 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 57.
                result.InsertKeyFrame(0.318435758F, 0.506330013F, CubicBezierEasingFunction_2());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_06 ( ) [inline, private]

Definition at line 3375 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 54.
                result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 57.
                result.InsertKeyFrame(0.318435758F, 0.439330012F, CubicBezierEasingFunction_2());
                // Frame 64.
                result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_07 ( ) [inline, private]

Definition at line 3389 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 97.
                result.InsertKeyFrame(0.541899443F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 100.
                result.InsertKeyFrame(0.558659196F, 0.421330005F, CubicBezierEasingFunction_2());
                // Frame 107.
                result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_08 ( ) [inline, private]

Definition at line 3403 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 97.
                result.InsertKeyFrame(0.541899443F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 100.
                result.InsertKeyFrame(0.558659196F, 0.438329995F, CubicBezierEasingFunction_2());
                // Frame 107.
                result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_09 ( ) [inline, private]

Definition at line 3417 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 97.
                result.InsertKeyFrame(0.541899443F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 100.
                result.InsertKeyFrame(0.558659196F, 0.506330013F, CubicBezierEasingFunction_2());
                // Frame 107.
                result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_10 ( ) [inline, private]

Definition at line 3431 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 80.
                result.InsertKeyFrame(0.446927369F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0.212329999F, CubicBezierEasingFunction_2());
                // Frame 87.
                result.InsertKeyFrame(0.486033529F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_11 ( ) [inline, private]

Definition at line 3445 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 84.
                result.InsertKeyFrame(0.469273746F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 87.
                result.InsertKeyFrame(0.486033529F, 0.212329999F, CubicBezierEasingFunction_2());
                // Frame 91.
                result.InsertKeyFrame(0.508379877F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_12 ( ) [inline, private]

Definition at line 3459 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 85.
                result.InsertKeyFrame(0.47486034F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 90.
                result.InsertKeyFrame(0.502793312F, 0.212329999F, CubicBezierEasingFunction_2());
                // Frame 94.
                result.InsertKeyFrame(0.525139689F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_13 ( ) [inline, private]

Definition at line 3473 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, 0.421330005F, CubicBezierEasingFunction_2());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_14 ( ) [inline, private]

Definition at line 3487 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, 0.438329995F, CubicBezierEasingFunction_2());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_15 ( ) [inline, private]

Definition at line 3501 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 75.
                result.InsertKeyFrame(0.418994427F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 78.
                result.InsertKeyFrame(0.43575418F, 0.506330013F, CubicBezierEasingFunction_2());
                // Frame 82.
                result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_16 ( ) [inline, private]

Definition at line 3515 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, 0.421330005F, CubicBezierEasingFunction_2());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_17 ( ) [inline, private]

Definition at line 3529 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, 0.438329995F, CubicBezierEasingFunction_2());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_18 ( ) [inline, private]

Definition at line 3543 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
                // Frame 76.
                result.InsertKeyFrame(0.424580991F, 0.870000005F, HoldThenStepEasingFunction());
                // Frame 79.
                result.InsertKeyFrame(0.441340774F, 0.506330013F, CubicBezierEasingFunction_2());
                // Frame 83.
                result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p8_to_0 ( ) [inline, private]

Definition at line 3262 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.800000012F, StepThenHoldEasingFunction());
                // Frame 16.
                result.InsertKeyFrame(0.0893854722F, 0.800000012F, HoldThenStepEasingFunction());
                // Frame 20.
                result.InsertKeyFrame(0.111731842F, 0.5F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.856999993F)));
                // Frame 28.
                result.InsertKeyFrame(0.156424582F, 0F, _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0.202000007F), new Vector2(0.938000023F, 1F)));
                return result;
            }

ScalarKeyFrameAnimation TStartScalarAnimation_0p8_to_0p3 ( ) [inline, private]

Definition at line 3276 of file LottieLogo.cs.

            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0.800000012F, StepThenHoldEasingFunction());
                // Frame 18.
                result.InsertKeyFrame(0.100558661F, 0.800000012F, HoldThenStepEasingFunction());
                // Frame 23.
                result.InsertKeyFrame(0.128491625F, 0.5F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.82099998F)));
                // Frame 55.
                result.InsertKeyFrame(0.30726257F, 0.300000012F, _c.CreateCubicBezierEasingFunction(new Vector2(0.0370000005F, 0.167999998F), new Vector2(0.263000011F, 1F)));
                return result;
            }

Member Data Documentation

readonly Compositor _c [private]

Definition at line 137 of file LottieLogo.cs.

CompositionColorBrush _colorBrush_AlmostTeal_FF007A87 [private]

Definition at line 139 of file LottieLogo.cs.

CompositionColorBrush _colorBrush_White [private]

Definition at line 140 of file LottieLogo.cs.

CompositionContainerShape _containerShape_00 [private]

Definition at line 141 of file LottieLogo.cs.

CompositionContainerShape _containerShape_01 [private]

Definition at line 142 of file LottieLogo.cs.

CompositionContainerShape _containerShape_02 [private]

Definition at line 143 of file LottieLogo.cs.

CompositionContainerShape _containerShape_03 [private]

Definition at line 144 of file LottieLogo.cs.

CompositionContainerShape _containerShape_04 [private]

Definition at line 145 of file LottieLogo.cs.

CompositionContainerShape _containerShape_05 [private]

Definition at line 146 of file LottieLogo.cs.

CompositionContainerShape _containerShape_06 [private]

Definition at line 147 of file LottieLogo.cs.

CompositionContainerShape _containerShape_07 [private]

Definition at line 148 of file LottieLogo.cs.

CompositionContainerShape _containerShape_08 [private]

Definition at line 149 of file LottieLogo.cs.

CompositionContainerShape _containerShape_09 [private]

Definition at line 150 of file LottieLogo.cs.

CompositionContainerShape _containerShape_10 [private]

Definition at line 151 of file LottieLogo.cs.

CompositionContainerShape _containerShape_11 [private]

Definition at line 152 of file LottieLogo.cs.

CompositionContainerShape _containerShape_12 [private]

Definition at line 153 of file LottieLogo.cs.

CompositionContainerShape _containerShape_13 [private]

Definition at line 154 of file LottieLogo.cs.

CompositionContainerShape _containerShape_14 [private]

Definition at line 155 of file LottieLogo.cs.

CompositionContainerShape _containerShape_15 [private]

Definition at line 156 of file LottieLogo.cs.

CompositionContainerShape _containerShape_16 [private]

Definition at line 157 of file LottieLogo.cs.

CompositionContainerShape _containerShape_17 [private]

Definition at line 158 of file LottieLogo.cs.

CompositionContainerShape _containerShape_18 [private]

Definition at line 159 of file LottieLogo.cs.

CompositionContainerShape _containerShape_19 [private]

Definition at line 160 of file LottieLogo.cs.

CompositionContainerShape _containerShape_20 [private]

Definition at line 161 of file LottieLogo.cs.

CompositionContainerShape _containerShape_21 [private]

Definition at line 162 of file LottieLogo.cs.

CompositionContainerShape _containerShape_22 [private]

Definition at line 163 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_0 [private]

Definition at line 227 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_1 [private]

Definition at line 228 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_2 [private]

Definition at line 229 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_3 [private]

Definition at line 230 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_4 [private]

Definition at line 231 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_5 [private]

Definition at line 232 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_6 [private]

Definition at line 233 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_7 [private]

Definition at line 234 of file LottieLogo.cs.

CubicBezierEasingFunction _cubicBezierEasingFunction_8 [private]

Definition at line 235 of file LottieLogo.cs.

CompositionEllipseGeometry _ellipse_0_0 [private]

Definition at line 164 of file LottieLogo.cs.

CompositionEllipseGeometry _ellipse_0_1 [private]

Definition at line 165 of file LottieLogo.cs.

CompositionEllipseGeometry _ellipse_4p7 [private]

Definition at line 166 of file LottieLogo.cs.

StepEasingFunction _holdThenStepEasingFunction [private]

Definition at line 244 of file LottieLogo.cs.

Vector2KeyFrameAnimation _offsetVector2Animation_02 [private]

Definition at line 246 of file LottieLogo.cs.

Vector2KeyFrameAnimation _offsetVector2Animation_03 [private]

Definition at line 247 of file LottieLogo.cs.

Vector2KeyFrameAnimation _offsetVector2Animation_04 [private]

Definition at line 248 of file LottieLogo.cs.

Vector2KeyFrameAnimation _offsetVector2Animation_05 [private]

Definition at line 249 of file LottieLogo.cs.

Vector2KeyFrameAnimation _offsetVector2Animation_06 [private]

Definition at line 250 of file LottieLogo.cs.

CompositionPath _path_0 [private]

Definition at line 167 of file LottieLogo.cs.

CompositionPath _path_1 [private]

Definition at line 168 of file LottieLogo.cs.

CompositionPath _path_2 [private]

Definition at line 169 of file LottieLogo.cs.

CompositionPath _path_3 [private]

Definition at line 170 of file LottieLogo.cs.

CompositionPath _path_4 [private]

Definition at line 171 of file LottieLogo.cs.

CompositionPath _path_5 [private]

Definition at line 172 of file LottieLogo.cs.

CompositionPath _path_6 [private]

Definition at line 173 of file LottieLogo.cs.

CompositionPath _path_7 [private]

Definition at line 174 of file LottieLogo.cs.

CompositionPath _path_8 [private]

Definition at line 175 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_00 [private]

Definition at line 176 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_01 [private]

Definition at line 177 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_02 [private]

Definition at line 178 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_03 [private]

Definition at line 179 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_04 [private]

Definition at line 180 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_05 [private]

Definition at line 181 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_06 [private]

Definition at line 182 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_07 [private]

Definition at line 183 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_08 [private]

Definition at line 184 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_09 [private]

Definition at line 185 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_10 [private]

Definition at line 186 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_11 [private]

Definition at line 187 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_12 [private]

Definition at line 188 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_13 [private]

Definition at line 189 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_14 [private]

Definition at line 190 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_15 [private]

Definition at line 191 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_16 [private]

Definition at line 192 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_17 [private]

Definition at line 193 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_18 [private]

Definition at line 194 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_19 [private]

Definition at line 195 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_20 [private]

Definition at line 196 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_21 [private]

Definition at line 197 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_22 [private]

Definition at line 198 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_23 [private]

Definition at line 199 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_24 [private]

Definition at line 200 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_25 [private]

Definition at line 201 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_26 [private]

Definition at line 202 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_27 [private]

Definition at line 203 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_28 [private]

Definition at line 204 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_29 [private]

Definition at line 205 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_30 [private]

Definition at line 206 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_31 [private]

Definition at line 207 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_32 [private]

Definition at line 208 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_33 [private]

Definition at line 209 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_34 [private]

Definition at line 210 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_35 [private]

Definition at line 211 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_36 [private]

Definition at line 212 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_37 [private]

Definition at line 213 of file LottieLogo.cs.

CompositionPathGeometry _pathGeometry_38 [private]

Definition at line 214 of file LottieLogo.cs.

Vector2KeyFrameAnimation _radiusVector2Animation [private]

Definition at line 251 of file LottieLogo.cs.

readonly ExpressionAnimation _reusableExpressionAnimation [private]

Definition at line 138 of file LottieLogo.cs.

ContainerVisual _root [private]

Definition at line 226 of file LottieLogo.cs.

ExpressionAnimation _rootProgress [private]

Definition at line 236 of file LottieLogo.cs.

Vector2KeyFrameAnimation _shapeVisibilityAnimation_04 [private]

Definition at line 252 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_11 [private]

Definition at line 215 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_12 [private]

Definition at line 216 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_13 [private]

Definition at line 217 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_14 [private]

Definition at line 218 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_15 [private]

Definition at line 219 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_19 [private]

Definition at line 220 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_22 [private]

Definition at line 221 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_23 [private]

Definition at line 222 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_36 [private]

Definition at line 223 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_37 [private]

Definition at line 224 of file LottieLogo.cs.

CompositionSpriteShape _spriteShape_38 [private]

Definition at line 225 of file LottieLogo.cs.

StepEasingFunction _stepThenHoldEasingFunction [private]

Definition at line 245 of file LottieLogo.cs.

ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_02 [private]

Definition at line 237 of file LottieLogo.cs.

ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_03 [private]

Definition at line 238 of file LottieLogo.cs.

ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_06 [private]

Definition at line 239 of file LottieLogo.cs.

ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_11 [private]

Definition at line 240 of file LottieLogo.cs.

ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_13 [private]

Definition at line 241 of file LottieLogo.cs.

ScalarKeyFrameAnimation _tStartScalarAnimation_0_to_0p249 [private]

Definition at line 242 of file LottieLogo.cs.

ScalarKeyFrameAnimation _tStartScalarAnimation_0p87_to_0_02 [private]

Definition at line 243 of file LottieLogo.cs.

const long c_durationTicks = 59666666 [private]

Definition at line 136 of file LottieLogo.cs.

TimeSpan Duration = > TimeSpan.FromTicks(c_durationTicks)

Definition at line 4222 of file LottieLogo.cs.

Visual RootVisual = > _root

Definition at line 4221 of file LottieLogo.cs.

Vector2 Size = > new Vector2(375F, 667F)

Definition at line 4223 of file LottieLogo.cs.

The documentation for this class was generated from the following file:
  • AnimatedVisualPlayer/TestUI/LottieLogo.cs
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Nullsource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • Nullsource
Public Member Functions

Nullsource Class Reference

List of all members.

Public Member Functions

IAnimatedVisual TryCreateAnimatedVisual (Compositor compositor, out object diagnostics)

Detailed Description

Definition at line 11 of file nullsource.cs.

Member Function Documentation

IAnimatedVisual TryCreateAnimatedVisual | ( | Compositor | compositor,
 |  | out object | diagnostics |
 | ) |  |  | [inline]

Definition at line 13 of file nullsource.cs.

        {
            diagnostics = null;
            // Return null to indicate failure.
            return null;
        }

The documentation for this class was generated from the following file:
  • AnimatedVisualPlayer/TestUI/nullsource.cs
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingDeterminate Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • ProgressRingDeterminate
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions

ProgressRingDeterminate Class Reference

#include "ProgressRingDeterminate.h"

List of all members.

Classes

class | AnimatedVisual

Public Member Functions

virtual
winrt::Microsoft::UI::Composition::CompositionPropertySet 		GetThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)
IAnimatedVisual | TryCreateAnimatedVisual (Compositor compositor, out object diagnostics)
virtual
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual 		TryCreateAnimatedVisual (const winrt::Microsoft::UI::Composition::Compositor &compositor, winrt::IInspectable &diagnostics)

Private Member Functions

winrt::Windows::UI::Color | Background ()
void | Background (winrt::Windows::UI::Color value)
winrt::float4 | ColorAsVector4 (winrt::Windows::UI::Color color)
winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)
winrt::Windows::UI::Color | Foreground ()
void | Foreground (winrt::Windows::UI::Color value)

Static Private Member Functions

static bool | IsRuntimeCompatible ()

Detailed Description

Definition at line 32 of file ProgressRingDeterminate.h.

Member Function Documentation

Color Background ( ) [inline, private]

Definition at line 384 of file ProgressRingDeterminate.cpp.

{
    return _themeBackground;
}

void Background ( winrt::Windows::UI::Color value ) [private]
winrt::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [private]
winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
Color Foreground ( ) [private]

Definition at line 398 of file ProgressRingDeterminate.cpp.

{
    return _themeForeground;
}

void Foreground ( winrt::Windows::UI::Color value ) [private]
virtual winrt::Microsoft::UI::Composition::CompositionPropertySet GetThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [virtual]
static bool IsRuntimeCompatible ( ) [inline, static, private]

Definition at line 29 of file ProgressRingDeterminate.cs.

        {
            // WinUI 3 specific change: .NET 6's IsTypePresent call returns false here, causing a failure in LottieCustomSourceTest since it won't create
            // the animated visual for the ProgressRing and ProgressRingCustomLottieSourcePage.xaml's IsPlayingText text will be False instead of True
            // since there's no animated visual to play.
            /*
            if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Microsoft.UI.Composition.CompositionGeometricClip"))
            {
                throw new PlatformNotSupportedException("Could not find CompositionGeometricClip for ProgressRingDeterminate");
            }
            */
            return true;
        }

IAnimatedVisual TryCreateAnimatedVisual | ( | Compositor | compositor,
 |  | out object | diagnostics |
 | ) |  |  | [inline]

Definition at line 19 of file ProgressRingDeterminate.cs.

        {
            diagnostics = null;
            if (!IsRuntimeCompatible())
            {
                return null;
            }
            return new AnimatedVisual(compositor);
        }

virtual winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | const winrt::Microsoft::UI::Composition::Compositor & | compositor,
 |  | winrt::IInspectable & | diagnostics |
 | ) |  |  | [virtual]
The documentation for this class was generated from the following files:
  • ProgressRing/AnimatedVisuals/ProgressRingDeterminate.h
  • ProgressRing/TestUI/ProgressRingDeterminate.cs
  • ProgressRing/AnimatedVisuals/ProgressRingDeterminate.cpp
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingDeterminate::AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • ProgressRingDeterminate
  • ProgressRingDeterminate::AnimatedVisual
Private Member Functions | Private Attributes

ProgressRingDeterminate::AnimatedVisual Class Reference

List of all members.

Private Member Functions

internal | AnimatedVisual (Compositor compositor)
CompositionColorBrush | ColorBrush_AlmostDodgerBlue_FF0078D7 ()
CompositionColorBrush | ColorBrush_LightGray ()
CubicBezierEasingFunction | CubicBezierEasingFunction ()
void IDisposable. | Dispose ()
CompositionEllipseGeometry | Ellipse_7_0 ()
CompositionEllipseGeometry | Ellipse_7_1 ()
StepEasingFunction | HoldThenStepEasingFunction ()
ContainerVisual | Root ()
ShapeVisual | ShapeVisual ()
CompositionSpriteShape | SpriteShape_0 ()
CompositionSpriteShape | SpriteShape_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_1 ()

Private Attributes

readonly Compositor | _c
readonly ExpressionAnimation | _reusableExpressionAnimation
ContainerVisual | _root
const long | c_durationTicks = 20000000
TimeSpan IAnimatedVisual. | Duration = > TimeSpan.FromTicks(c_durationTicks)
Visual IAnimatedVisual. | RootVisual = > _root
Vector2 IAnimatedVisual. | Size = > new Vector2(80, 80)

Detailed Description

Definition at line 43 of file ProgressRingDeterminate.cs.

Constructor & Destructor Documentation

internal AnimatedVisual ( Compositor compositor ) [inline, private]

Definition at line 170 of file ProgressRingDeterminate.cs.

            {
                _c = compositor;
                _reusableExpressionAnimation = compositor.CreateExpressionAnimation();
                Root();
            }

Member Function Documentation

CompositionColorBrush ColorBrush_AlmostDodgerBlue_FF0078D7 ( ) [inline, private]

Definition at line 51 of file ProgressRingDeterminate.cs.

            {
                return _c.CreateColorBrush(Color.FromArgb(0xFF, 0x00, 0x78, 0xD7));
            }

CompositionColorBrush ColorBrush_LightGray ( ) [inline, private]

Definition at line 57 of file ProgressRingDeterminate.cs.

            {
                return _c.CreateColorBrush(Color.FromArgb(0xFF, 0xD3, 0xD3, 0xD3));
            }

CubicBezierEasingFunction CubicBezierEasingFunction ( ) [inline, private]

Definition at line 65 of file ProgressRingDeterminate.cs.

            {
                return _c.CreateCubicBezierEasingFunction(new Vector2(0.400000006F, 0), new Vector2(0.833000004F, 0.833000004F));
            }

void IDisposable. Dispose ( ) [private]
CompositionEllipseGeometry Ellipse_7_0 ( ) [inline, private]

Definition at line 72 of file ProgressRingDeterminate.cs.

            {
                var result = _c.CreateEllipseGeometry();
                result.Radius = new Vector2(7, 7);
                return result;
            }

CompositionEllipseGeometry Ellipse_7_1 ( ) [inline, private]

Definition at line 81 of file ProgressRingDeterminate.cs.

            {
                var result = _c.CreateEllipseGeometry();
                result.Radius = new Vector2(7, 7);
                result.StartAnimation("TrimEnd", TrimEndScalarAnimation_0_to_1());
                var controller = result.TryGetAnimationController("TrimEnd");
                controller.Pause();
                _reusableExpressionAnimation.ClearAllParameters();
                _reusableExpressionAnimation.Expression = "_.Progress";
                _reusableExpressionAnimation.SetReferenceParameter("_", _root);
                controller.StartAnimation("Progress", _reusableExpressionAnimation);
                return result;
            }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 98 of file ProgressRingDeterminate.cs.

            {
                var result = _c.CreateStepEasingFunction();
                result.IsFinalStepSingleFrame  = true;
                return result;
            }

ContainerVisual Root ( ) [inline, private]

Definition at line 106 of file ProgressRingDeterminate.cs.

            {
                var result = _root = _c.CreateContainerVisual();
                var propertySet = result.Properties;
                propertySet.InsertScalar("Progress", 0);
                var children = result.Children;
                children.InsertAtTop(ShapeVisual());
                return result;
            }

ShapeVisual ShapeVisual ( ) [inline, private]

Definition at line 116 of file ProgressRingDeterminate.cs.

            {
                var result = _c.CreateShapeVisual();
                result.Size = new Vector2(80, 80);
                var shapes = result.Shapes;
                // Ellipse Path
                shapes.Add(SpriteShape_0());
                // Ellipse Path
                shapes.Add(SpriteShape_1());
                return result;
            }

CompositionSpriteShape SpriteShape_0 ( ) [inline, private]

Definition at line 129 of file ProgressRingDeterminate.cs.

            {
                var result = _c.CreateSpriteShape();
                result.TransformMatrix = new Matrix3x2(5, 0, 0, 5, 40, 40);
                result.Geometry = Ellipse_7_0();
                result.StrokeBrush = ColorBrush_LightGray();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 4;
                result.StrokeThickness = 2;
                return result;
            }

CompositionSpriteShape SpriteShape_1 ( ) [inline, private]

Definition at line 144 of file ProgressRingDeterminate.cs.

            {
                var result = _c.CreateSpriteShape();
                result.TransformMatrix = new Matrix3x2(5, 0, 0, 5, 40, 40);
                result.Geometry = Ellipse_7_1();
                result.StrokeBrush = ColorBrush_AlmostDodgerBlue_FF0078D7();
                result.StrokeDashCap = CompositionStrokeCap.Round;
                result.StrokeEndCap = CompositionStrokeCap.Round;
                result.StrokeStartCap = CompositionStrokeCap.Round;
                result.StrokeMiterLimit = 4;
                result.StrokeThickness = 2;
                return result;
            }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 161 of file ProgressRingDeterminate.cs.

            {
                var result = _c.CreateScalarKeyFrameAnimation();
                result.Duration = TimeSpan.FromTicks(c_durationTicks);
                result.InsertKeyFrame(0, 9.99999975E-05F, HoldThenStepEasingFunction());
                result.InsertKeyFrame(0.991666675F, 1, CubicBezierEasingFunction());
                return result;
            }

Member Data Documentation

readonly Compositor _c [private]

Definition at line 46 of file ProgressRingDeterminate.cs.

readonly ExpressionAnimation _reusableExpressionAnimation [private]

Definition at line 47 of file ProgressRingDeterminate.cs.

ContainerVisual _root [private]

Definition at line 48 of file ProgressRingDeterminate.cs.

const long c_durationTicks = 20000000 [private]

Definition at line 45 of file ProgressRingDeterminate.cs.

TimeSpan IAnimatedVisual. Duration = > TimeSpan.FromTicks(c_durationTicks) [private]

Definition at line 178 of file ProgressRingDeterminate.cs.

Visual IAnimatedVisual. RootVisual = > _root [private]

Definition at line 177 of file ProgressRingDeterminate.cs.

Vector2 IAnimatedVisual. Size = > new Vector2(80, 80) [private]

Definition at line 179 of file ProgressRingDeterminate.cs.

The documentation for this class was generated from the following file:
  • ProgressRing/TestUI/ProgressRingDeterminate.cs
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingIndeterminate Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AnimatedVisuals
  • ProgressRingIndeterminate
Public Member Functions | Private Member Functions

ProgressRingIndeterminate Class Reference

#include "ProgressRingIndeterminate.h"

List of all members.

Public Member Functions

virtual
winrt::Microsoft::UI::Composition::CompositionPropertySet 		GetThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)
virtual
winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual 		TryCreateAnimatedVisual (const winrt::Microsoft::UI::Composition::Compositor &compositor, winrt::IInspectable &diagnostics)

Private Member Functions

winrt::Windows::UI::Color | Background ()
void | Background (winrt::Windows::UI::Color value)
winrt::float4 | ColorAsVector4 (winrt::Windows::UI::Color color)
winrt::Microsoft::UI::Composition::CompositionPropertySet | EnsureThemeProperties (winrt::Microsoft::UI::Composition::Compositor compositor)
winrt::Windows::UI::Color | Foreground ()
void | Foreground (winrt::Windows::UI::Color value)

Detailed Description

Definition at line 29 of file ProgressRingIndeterminate.h.

Member Function Documentation

Color Background ( ) [inline, private]

Definition at line 412 of file ProgressRingIndeterminate.cpp.

{
    return _themeBackground;
}

void Background ( winrt::Windows::UI::Color value ) [private]
winrt::float4 ColorAsVector4 ( winrt::Windows::UI::Color color ) [private]
winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [private]
Color Foreground ( ) [private]

Definition at line 426 of file ProgressRingIndeterminate.cpp.

{
    return _themeForeground;
}

void Foreground ( winrt::Windows::UI::Color value ) [private]
virtual winrt::Microsoft::UI::Composition::CompositionPropertySet GetThemeProperties ( winrt::Microsoft::UI::Composition::Compositor compositor ) [virtual]
virtual winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual | ( | const winrt::Microsoft::UI::Composition::Compositor & | compositor,
 |  | winrt::IInspectable & | diagnostics |
 | ) |  |  | [virtual]
The documentation for this class was generated from the following files:
  • ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.h
  • ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.cpp
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

AnnotatedScrollBar Class Reference

#include "AnnotatedScrollBar.h"

Inherits ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > >, and AnnotatedScrollBarProperties.

List of all members.

Public Member Functions

AnnotatedScrollBar ()
~AnnotatedScrollBar ()
winrt::event_token | AddScrollVelocityRequested (winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerAddScrollVelocityRequestedEventArgs > const &value)
void | AddScrollVelocityRequested (winrt::event_token const &token)
bool | CanScroll ()
winrt::event_token | CanScrollChanged (winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value)
void | CanScrollChanged (winrt::event_token const &token)
winrt::CompositionAnimation | GetScrollAnimation (int correlationId, winrt::float2 const &startPosition, winrt::float2 const &endPosition, winrt::CompositionAnimation const &defaultAnimation)
bool | IsScrollingWithMouse ()
void | IsScrollingWithMouseChanged (winrt::event_token const &token)
winrt::event_token | IsScrollingWithMouseChanged (winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value)
void | NotifyRequestedScrollCompleted (int correlationId)
void | OnApplyTemplate ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
winrt::IScrollControllerPanningInfo | PanningInfo ()
winrt::event_token | ScrollByRequested (winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollByRequestedEventArgs > const &value)
void | ScrollByRequested (winrt::event_token const &token)
winrt::IScrollController | ScrollController ()
void | ScrollToRequested (winrt::event_token const &token)
winrt::event_token | ScrollToRequested (winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollToRequestedEventArgs > const &value)
void | SetIsScrollable (bool isScrollable)
void | SetValues (double minOffset, double maxOffset, double offset, double viewportLength)

Private Member Functions

void | CollapseCollidingAndOutOfBoundsLabels ()
void | CreateLabelContainers ()
void | EnsurePanningInfo ()
void | EnsureSmallChangeValue ()
double | GetLabelVerticalOffset (winrt::AnnotatedScrollBarLabel label)
void | HideHoverVisuals ()
void | HookInputEvents ()
bool | IgnorePointerId (const winrt::PointerRoutedEventArgs &args)
bool | IsOutOfVerticalGridBounds (const winrt::Point &point)
void | LayoutLabels ()
double | Maximum ()
void | Maximum (double maximum)
void | Minimum (double minimum)
double | Minimum ()
void | OnDecrementRepeatButtonClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnDetailLabelToolTipOpened (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnIncrementRepeatButtonClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnIsEnabledChanged (const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args)
void | OnLabelsCollectionChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnLabelsGridSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnVerticalGridPointerCanceled (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnVerticalGridPointerCaptureLost (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnVerticalGridPointerEntered (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnVerticalGridPointerExited (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnVerticalGridPointerMoved (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnVerticalGridPointerPressed (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnVerticalGridPointerReleased (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | ProcessVerticalGridPointerCanceled (const winrt::PointerRoutedEventArgs &args)
void | QueueLayoutLabels (unsigned int millisecondWait)
void | RaiseAddScrollVelocityRequested (double offsetDelta)
void | RaiseCanScrollChanged ()
winrt::IInspectable | RaiseDetailLabelRequested (double offsetFromTop)
void | RaiseIsScrollingWithMouseChanged ()
void | RaiseScrollByRequested (double offsetDelta)
bool | RaiseScrolling (double offset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind)
void | RaiseScrollToRequested (double offset)
void | ResetTrackedPointerId ()
void | ScrollTo (double offset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind)
void | SetThumbGhostVisibility (winrt::Visibility visibility)
void | SetToolTipIsOpen (bool isOpen)
void | SetUpInteractionElements ()
void | ShowHoverVisuals (double offsetFromTopToolTip, double offsetFromTopThumbGhost)
void | ShowThumbGhostAtOffset (double offsetFromTop)
void | ShowToolTipAtOffset (double offsetFromTop)
void | UnhookHandlers (bool isFromDestructor)
void | UpdateCanScroll ()
void | UpdateLabelContainersOffsets ()
void | UpdatePositionsOfAnchoredElements ()
void | UpdateScrollOffsetToLabelOffsetFactor ()
double | Value ()
void | Value (double value)
double | ViewportSize ()
void | ViewportSize (double viewportSize)

Detailed Description

Definition at line 11 of file AnnotatedScrollBar.h.

Constructor & Destructor Documentation

AnnotatedScrollBar ( )

Definition at line 26 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    __RP_Marker_ClassById(RuntimeProfiler::ProfId_AnnotatedScrollBar);

    EnsureProperties();
    SetDefaultStyleKey(this);

    m_sizeChangedRevoker = SizeChanged(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnSizeChanged });
#ifdef DBG
    m_loadedRevoker = Loaded(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnLoaded });
#endif
    m_isEnabledRevoker = IsEnabledChanged(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnIsEnabledChanged });

    SetValue(s_LabelsProperty, winrt::make<ObservableVector<winrt::AnnotatedScrollBarLabel>>());

    auto observableVector = Labels().try_as<winrt::IObservableVector<winrt::AnnotatedScrollBarLabel>>();
    m_labelsVectorChangedRevoker = observableVector.VectorChanged(winrt::auto_revoke,{ this, &AnnotatedScrollBar::OnLabelsCollectionChanged });

    SmallChange(0);
}

~AnnotatedScrollBar ( )

Definition at line 49 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    UnhookHandlers(true /*isFromDestructor*/);
}

Member Function Documentation

winrt::event_token AddScrollVelocityRequested ( winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerAddScrollVelocityRequestedEventArgs > const & value )

Definition at line 1233 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    return m_addScrollVelocityRequested.add(value);
}

void AddScrollVelocityRequested ( winrt::event_token const & token )

Definition at line 1240 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_addScrollVelocityRequested.remove(token);
}

bool CanScroll ( )

Definition at line 1109 of file AnnotatedScrollBar.cpp.

{
    return m_canScroll;
}

winrt::event_token CanScrollChanged ( winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const & value )

Definition at line 1247 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    return m_canScrollChanged.add(value);
}

void CanScrollChanged ( winrt::event_token const & token )

Definition at line 1254 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_canScrollChanged.remove(token);
}

void CollapseCollidingAndOutOfBoundsLabels ( ) [private]

Definition at line 393 of file AnnotatedScrollBar.cpp.

{
    auto const labelsGrid = m_labelsGrid.get();
    MUX_ASSERT(labelsGrid);

    auto const labelsGridHeight = labelsGrid.ActualSize().y;
    auto const labelsSize = Labels().Size();
    if (labelsSize == 0 ||
        labelsGridHeight == 0)
    {
        return;
    }

    MUX_ASSERT(labelsSize == labelsGrid.Children().Size());
    MUX_ASSERT(labelsSize == m_labelSizes.size());

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    // Collapse colliding or out of bounds labels
    double previousLabelTopPosition = -1;
    int previousLabelIndex = (int)labelsGrid.Children().Size();
    for (int currentLabelIndex = previousLabelIndex - 1; currentLabelIndex >= 0; currentLabelIndex--)
    {
       auto const currentLabel = labelsGrid.Children().GetAt(currentLabelIndex).as<winrt::FrameworkElement>();
       auto const currentLabelTopPosition = currentLabel.Margin().Top;
       double const currentLabelBottomPosition = currentLabelTopPosition + m_labelSizes[currentLabelIndex];

       auto const isLabelOutOfBounds = currentLabelTopPosition < 0 ||
                                       currentLabelBottomPosition > labelsGridHeight;

       auto const isLabelColliding = previousLabelTopPosition >= 0 &&
                                     previousLabelTopPosition <= currentLabelBottomPosition;

       if (isLabelOutOfBounds)
       {
           currentLabel.Visibility(winrt::Visibility::Collapsed);
       }
       else if (isLabelColliding)
       {
           // The bottom item displayed should always stay shown in any collision.
           // The first item should also be always displayed with an exception
           // in the case that it is colliding with the last item.
           int indexToCollapse = currentLabelIndex;
           if (currentLabelIndex == 0 &&
               previousLabelIndex < (int)labelsGrid.Children().Size() - 1)
           {
               indexToCollapse = previousLabelIndex;
           }

           auto const labelToCollapse = labelsGrid.Children().GetAt(indexToCollapse).as<winrt::FrameworkElement>();
           labelToCollapse.Visibility(winrt::Visibility::Collapsed);
       }
       else
       {
           currentLabel.Visibility(winrt::Visibility::Visible);
           previousLabelTopPosition = currentLabelTopPosition;
           previousLabelIndex = currentLabelIndex;
       }
    }
}

void CreateLabelContainers ( ) [private]

Definition at line 342 of file AnnotatedScrollBar.cpp.

{
    auto labelsGrid = m_labelsGrid.get();
    MUX_ASSERT(labelsGrid);
    MUX_ASSERT(m_labelSizes.size() == 0);

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    for (auto label : Labels())
    {
        auto labelContentPresenter = winrt::ContentPresenter();
        labelContentPresenter.HorizontalAlignment(winrt::HorizontalAlignment::Right);
        labelContentPresenter.Content(label);

        if (auto dataElementFactory = LabelTemplate())
        {
            if (auto dataTemplate = dataElementFactory.try_as<winrt::DataTemplate>())
            {
                labelContentPresenter.ContentTemplate(dataTemplate);
            }
            else if (auto dataTemplateSelector = dataElementFactory.try_as<winrt::DataTemplateSelector>())
            {
                labelContentPresenter.ContentTemplateSelector(dataTemplateSelector);
            }
        }

        float const labelHeight = LayoutUtils::MeasureAndGetDesiredHeightFor(labelContentPresenter, c_infSize);
        m_labelSizes.push_back(labelHeight);

        auto const labelVerticalOffset = GetLabelVerticalOffset(label);
        labelContentPresenter.Margin({ 0,labelVerticalOffset,0,0 });
        labelsGrid.Children().Append(labelContentPresenter);
    }
}

void EnsurePanningInfo ( ) [private]

Definition at line 474 of file AnnotatedScrollBar.cpp.

{
    if (!m_panningInfo)
    {
        m_panningInfo.set(winrt::make_self<AnnotatedScrollBarPanningInfo>());
    }
}

void EnsureSmallChangeValue ( ) [private]

Definition at line 482 of file AnnotatedScrollBar.cpp.

{
    if (SmallChange() == 0.0)
    {
       SmallChange(ViewportSize()/s_defaultViewportToSmallChangeRatio);
    }
}

double GetLabelVerticalOffset ( winrt::AnnotatedScrollBarLabel label ) [private]

Definition at line 454 of file AnnotatedScrollBar.cpp.

{
    return label.ScrollOffset() * m_scrollOffsetToLabelOffsetFactor;
}

winrt::CompositionAnimation GetScrollAnimation | ( | int | correlationId,
 |  | winrt::float2 const & | startPosition,
 |  | winrt::float2 const & | endPosition,
 |  | winrt::CompositionAnimation const & | defaultAnimation
 | ) |  |

Definition at line 1174 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, correlationId);

    // Using the consumer's default animation.
    return defaultAnimation;
}

void HideHoverVisuals ( ) [private]

Definition at line 504 of file AnnotatedScrollBar.cpp.

{
    SetToolTipIsOpen(false);
    SetThumbGhostVisibility(winrt::Visibility::Collapsed);
}

void HookInputEvents ( ) [private]

Definition at line 230 of file AnnotatedScrollBar.cpp.

{
    if (auto const verticalGrid = m_verticalGrid.get())
    {
        m_verticalGridPointerEnteredRevoker = verticalGrid.PointerEntered(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnVerticalGridPointerEntered });
        m_verticalGridPointerMovedRevoker = verticalGrid.PointerMoved(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnVerticalGridPointerMoved });
        m_verticalGridPointerPressedRevoker = verticalGrid.PointerPressed(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnVerticalGridPointerPressed });

        m_verticalGridPointerExitedRevoker = AddRoutedEventHandler<RoutedEventType::PointerExited>(
        *this,
        { this, &AnnotatedScrollBar::OnVerticalGridPointerExited },
        true /*handledEventsToo*/);
        m_verticalGridPointerReleasedRevoker = AddRoutedEventHandler<RoutedEventType::PointerReleased>(
        *this,
        { this, &AnnotatedScrollBar::OnVerticalGridPointerReleased },
        true /*handledEventsToo*/);
        m_verticalGridPointerCanceledRevoker = AddRoutedEventHandler<RoutedEventType::PointerCanceled>(
        *this,
        { this, &AnnotatedScrollBar::OnVerticalGridPointerCanceled },
        true /*handledEventsToo*/);
        m_verticalGridPointerCaptureLostRevoker = AddRoutedEventHandler<RoutedEventType::PointerCaptureLost>(
        *this,
        { this, &AnnotatedScrollBar::OnVerticalGridPointerCaptureLost },
        true /*handledEventsToo*/);
    }

    if (auto detailLabelToolTip = m_detailLabelToolTip.get())
    {
        m_detailLabelToolTipOpenedRevoker = detailLabelToolTip.Opened(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnDetailLabelToolTipOpened });
    }
}

bool IgnorePointerId ( const winrt::PointerRoutedEventArgs & args ) [private]

Definition at line 620 of file AnnotatedScrollBar.cpp.

{
    uint32_t pointerId = args.Pointer().PointerId();

    if (m_verticalGridTrackedPointerId == 0)
    {
        m_verticalGridTrackedPointerId = pointerId;
    }
    else if (m_verticalGridTrackedPointerId != pointerId)
    {
        return true;
    }
    return false;
}

bool IsOutOfVerticalGridBounds ( const winrt::Point & point ) [private]

Definition at line 875 of file AnnotatedScrollBar.cpp.

                                                                          {

    if (auto verticalGrid = m_verticalGrid.get())
    {
        // This is a conservative check. It is okay to say we are
        // out of the bounds when close to the edge to account for rounding.
        const auto tolerance = 1.0;
        const auto actualWidth = verticalGrid.ActualWidth();
        const auto actualHeight = verticalGrid.ActualHeight();
        return point.X < tolerance ||
            point.X > actualWidth - tolerance ||
            point.Y < tolerance ||
            point.Y > actualHeight - tolerance;
    }
    return true;
}

bool IsScrollingWithMouse ( )

Definition at line 1114 of file AnnotatedScrollBar.cpp.

{
    return m_isScrollingWithMouse;
}

winrt::event_token IsScrollingWithMouseChanged ( winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const & value )

Definition at line 1261 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    return m_isScrollingWithMouseChanged.add(value);
}

void IsScrollingWithMouseChanged ( winrt::event_token const & token )

Definition at line 1268 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_isScrollingWithMouseChanged.remove(token);
}

void LayoutLabels ( ) [private]

Definition at line 322 of file AnnotatedScrollBar.cpp.

{
    auto labelsGrid = m_labelsGrid.safe_get();
    if (!labelsGrid)
    {
        return;
    }

    if (labelsGrid.Children().Size() == 0)
    {
        CreateLabelContainers();
    }
    else
    {
        UpdateLabelContainersOffsets();
    }

    CollapseCollidingAndOutOfBoundsLabels();
}

void Maximum ( double maximum ) [private]

Definition at line 75 of file AnnotatedScrollBar.cpp.

{
    if (maximum != m_maximum)
    {
        m_maximum = maximum;
        UpdatePositionsOfAnchoredElements();
    }
}

double Maximum ( ) [private]

Definition at line 84 of file AnnotatedScrollBar.cpp.

{
    return m_maximum;
}

void Minimum ( double minimum ) [private]

Definition at line 89 of file AnnotatedScrollBar.cpp.

{
    if (minimum != m_minimum)
    {
        m_minimum = minimum;
        UpdatePositionsOfAnchoredElements();
    }
}

double Minimum ( ) [private]

Definition at line 98 of file AnnotatedScrollBar.cpp.

{
    return m_minimum;
}

void NotifyRequestedScrollCompleted ( int correlationId )

Definition at line 1186 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(
        *this,
        TRACE_MSG_METH_INT,
        METH_NAME,
        this,
        correlationId);

    MUX_ASSERT(m_operationsCount > 0);
    m_operationsCount--;

    if (m_operationsCount == 0 && Value() != m_lastOffset)
    {
        Value(m_lastOffset);
    }
}

void OnApplyTemplate ( )

Definition at line 185 of file AnnotatedScrollBar.cpp.

{
    UnhookHandlers(false /*isFromDestructor*/);

    __super::OnApplyTemplate();

    winrt::IControlProtected controlProtected = *this;

    m_verticalThumb.set(GetTemplateChildT<winrt::Border>(s_verticalThumbPartName, controlProtected));
    m_verticalThumbGhost.set(GetTemplateChildT<winrt::Border>(s_verticalThumbGhostPartName, controlProtected));
    m_verticalDecrementRepeatButton.set(GetTemplateChildT<winrt::RepeatButton>(s_verticalDecrementRepeatButtonPartName, controlProtected));
    m_verticalIncrementRepeatButton.set(GetTemplateChildT<winrt::RepeatButton>(s_verticalIncrementRepeatButtonPartName, controlProtected));
    m_verticalGrid.set(GetTemplateChildT<winrt::Grid>(s_verticalGridPartName, controlProtected));
    m_labelsGrid.set(GetTemplateChildT<winrt::Grid>(s_labelsGridPartName, controlProtected));
    m_tooltipContentPresenter.set(GetTemplateChildT<winrt::ContentPresenter>(s_tooltipContentPresenterPartName, controlProtected));
    m_detailLabelToolTip.set(GetTemplateChildT<winrt::ToolTip>(s_detailLabelToolTipPartName, controlProtected));

    SetUpInteractionElements();
    HookInputEvents();
}

void OnDecrementRepeatButtonClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 609 of file AnnotatedScrollBar.cpp.

{
    // We pass in 0 for offset here because it is determined in ScrollTo()
    ScrollTo(0, winrt::AnnotatedScrollBarScrollingEventKind::DecrementButton);
}

void OnDetailLabelToolTipOpened | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 593 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
    // Circumvent tooltip opening after hover delay when it is not in use
    if (!m_detailLabelRequestedEventSource)
    {
        SetToolTipIsOpen(false);
    }
}

void OnIncrementRepeatButtonClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 603 of file AnnotatedScrollBar.cpp.

{
    // We pass in 0 for offset here because it is determined in ScrollTo()
    ScrollTo(0, winrt::AnnotatedScrollBarScrollingEventKind::IncrementButton);
}

void OnIsEnabledChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 153 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!IsEnabled())
    {
        m_isPressed = false;
        m_isPointerOver = false;

        if (m_capturedPointer)
        {
            if (auto verticalGrid = m_verticalGrid.get())
            {
                verticalGrid.ReleasePointerCapture(m_capturedPointer);
                m_capturedPointer = nullptr;
            }
        }
        ResetTrackedPointerId();
    }
    UpdateCanScroll();
}

void OnLabelsCollectionChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 175 of file AnnotatedScrollBar.cpp.

{
    if (auto labelsGrid = m_labelsGrid.get())
    {
        labelsGrid.Children().Clear();
    }
    m_labelSizes.clear();
    QueueLayoutLabels(50 /*millisecondWait*/);
}

void OnLabelsGridSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 116 of file AnnotatedScrollBar.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_LabelTemplateProperty)
    {
        QueueLayoutLabels(50 /*millisecondWait*/);
    }
    else if (property == s_DetailLabelTemplateProperty)
    {
        m_detailLabelTemplateApplied = false;
    }
    else if (property == s_LabelsProperty)
    {
        if (auto labelsGrid = m_labelsGrid.get())
        {
            labelsGrid.Children().Clear();
        }
        m_labelSizes.clear();
        QueueLayoutLabels(50 /*millisecondWait*/);
    }
}

void OnSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 139 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    UpdatePositionsOfAnchoredElements();
}

void OnVerticalGridPointerCanceled | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 833 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    ProcessVerticalGridPointerCanceled(args);
}

void OnVerticalGridPointerCaptureLost | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 840 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    ProcessVerticalGridPointerCanceled(args);
}

void OnVerticalGridPointerEntered | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 635 of file AnnotatedScrollBar.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    m_isPointerOver = true;

    MUX_ASSERT(m_verticalGrid.get() != nullptr);

    const auto offsetFromTop = args.GetCurrentPoint(m_verticalGrid.get()).Position().Y;
    auto offsetFromTopToolTip = offsetFromTop;
    const auto offsetFromTopThumbGhost = offsetFromTop;

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, offsetFromTop);

    auto const& pointerDeviceType = args.Pointer().PointerDeviceType();
    if (pointerDeviceType == winrt::PointerDeviceType::Touch)
    {
        offsetFromTopToolTip -= s_toolTipTouchOffset;
    }

    ShowHoverVisuals(offsetFromTopToolTip, offsetFromTopThumbGhost);
}

void OnVerticalGridPointerExited | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 709 of file AnnotatedScrollBar.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    const bool isTouch = args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch;
    if (isTouch && !m_capturedPointer)
    {
        // The hiding of elements for non-mouse input events is handled in OnVerticalGridPointerReleased.
        // The PointerReleased and PointerExited events can happen in any order so we need to make sure to reset the tracked pointer id here as well.
        ResetTrackedPointerId();
    }
    if (IsOutOfVerticalGridBounds(args.GetCurrentPoint(m_verticalGrid.get()).Position()) && !isTouch)
    {
        // We do the vertical bounds check because PointerExited can sometimes happen when the mouse has hovered over the open tooltip.
        // In these cases we need to test if the pointer is over the vertical grid to maintain the proper state.
        m_isPressed = false;
        m_isPointerOver = false;

        if (!m_capturedPointer)
        {
            ResetTrackedPointerId();
        }

        HideHoverVisuals();
    }
}

void OnVerticalGridPointerMoved | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 661 of file AnnotatedScrollBar.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    m_isPointerOver = true;

    auto verticalGrid = m_verticalGrid.get();
    MUX_ASSERT(verticalGrid != nullptr);

    auto offsetFromTop = args.GetCurrentPoint(verticalGrid).Position().Y;

    offsetFromTop = std::max(0.0f, offsetFromTop);
    offsetFromTop = std::min((float)verticalGrid.ActualHeight(), offsetFromTop);

    auto offsetFromTopToolTip = offsetFromTop;
    const auto offsetFromTopThumbGhost = offsetFromTop;

    ANNOTATEDSCROLLBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH_DBL, METH_NAME, this, offsetFromTop);

    // If pointer hasn't moved we do nothing
    auto detailLabelToolTip = m_detailLabelToolTip.get();
    if (detailLabelToolTip && detailLabelToolTip.IsOpen())
    {
         if (offsetFromTop == m_lastVerticalGridPointerMovedOffset)
         {
             return;
         }
    }
    m_lastVerticalGridPointerMovedOffset = offsetFromTop;

    auto const& pointerDeviceType = args.Pointer().PointerDeviceType();
    if (pointerDeviceType == winrt::PointerDeviceType::Touch)
    {
        offsetFromTopToolTip -= s_toolTipTouchOffset;
    }

    ShowHoverVisuals(offsetFromTopToolTip, offsetFromTopThumbGhost);

    if (m_isPressed || m_capturedPointer)
    {
        double const newScrollOffset = offsetFromTop / m_scrollOffsetToLabelOffsetFactor;
        ScrollTo(newScrollOffset, winrt::AnnotatedScrollBarScrollingEventKind::Drag);
    }
}

void OnVerticalGridPointerPressed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 741 of file AnnotatedScrollBar.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    m_isPressed = true;

    const double newScrollOffset = args.GetCurrentPoint(m_verticalGrid.get()).Position().Y / m_scrollOffsetToLabelOffsetFactor;

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, newScrollOffset);

    ScrollTo(newScrollOffset, winrt::AnnotatedScrollBarScrollingEventKind::Click);

    auto pointer = args.Pointer();
    if (auto verticalGrid = m_verticalGrid.get())
    {
        if (verticalGrid.CapturePointer(pointer))
        {
            m_capturedPointer = pointer;
        }
    }

    switch (pointer.PointerDeviceType())
    {
        case winrt::PointerDeviceType::Touch:
        case winrt::PointerDeviceType::Pen:
        {
            if (m_panningInfo)
            {
                // Attempt an UI-thread-independent pan.
                //TODO as part of bug fix 45076500. Start an independent pan.
                //m_panningInfo.get()->RaisePanRequested(args.GetCurrentPoint(nullptr));
            }
            break;
        }
        case winrt::PointerDeviceType::Mouse:
        {
            if (!m_isScrollingWithMouse)
            {
                m_isScrollingWithMouse = true;
                RaiseIsScrollingWithMouseChanged();
            }
            break;
        }
    }
}

void OnVerticalGridPointerReleased | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 790 of file AnnotatedScrollBar.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_isPressed = false;
    auto verticalGrid = m_verticalGrid.get();

    if (m_capturedPointer && verticalGrid)
    {
        verticalGrid.ReleasePointerCapture(m_capturedPointer);
        m_capturedPointer = nullptr;

        // OnVerticalGridPointerCaptureLost does not get called in the case of Touch.
        // In that case we want to make sure to hide the required elements here.
        auto const& pointerDeviceType = args.Pointer().PointerDeviceType();

        switch (pointerDeviceType)
        {
            case winrt::PointerDeviceType::Touch:
            {
                m_isPointerOver = false;
                HideHoverVisuals();
                ResetTrackedPointerId();
                break;
            }
            case winrt::PointerDeviceType::Mouse:
            {
                if (m_isScrollingWithMouse)
                {
                    m_isScrollingWithMouse = false;
                    RaiseIsScrollingWithMouseChanged();
                }
                break;
            }
        }
    }
}

winrt::IScrollControllerPanningInfo PanningInfo ( )

Definition at line 1102 of file AnnotatedScrollBar.cpp.

{
    EnsurePanningInfo();

    return m_panningInfo.try_as<winrt::IScrollControllerPanningInfo>();
}

void ProcessVerticalGridPointerCanceled ( const winrt::PointerRoutedEventArgs & args ) [private]

Definition at line 847 of file AnnotatedScrollBar.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_isPressed = false;
    // We do this check because PointerCaptureLost can sometimes take the place of PointerReleased events.
    // In these cases we need to test if the pointer is over the vertical grid to maintain the proper state.
    if (IsOutOfVerticalGridBounds(args.GetCurrentPoint(m_verticalGrid.get()).Position()))
    {
        m_isPointerOver = false;
        HideHoverVisuals();
    }

    if (m_isScrollingWithMouse && args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Mouse)
    {
        m_isScrollingWithMouse = false;
        RaiseIsScrollingWithMouseChanged();
    }

    m_capturedPointer = nullptr;
    ResetTrackedPointerId();
}

void QueueLayoutLabels ( unsigned int millisecondWait ) [private]

Definition at line 296 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!m_labelsDebounce.test_and_set())
    {
        auto weakThis = get_weak();
        auto runLayoutLabelsAction = [weakThis]()
        {
            if (winrt::WindowsXamlManager::GetForCurrentThread() == nullptr)
            {
                // Exit early if Xaml core has already shut down.
                return;
            }

            if (auto strongThis = weakThis.get())
            {
                strongThis->m_labelsDebounce.clear();
                strongThis->LayoutLabels();
            }
        };

        SharedHelpers::ScheduleActionAfterWait(runLayoutLabelsAction, millisecondWait);
    }
}

void RaiseAddScrollVelocityRequested ( double offsetDelta ) [private]

Definition at line 1072 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, offsetDelta);

    if (!m_addScrollVelocityRequested)
    {
        return;
    }

    double const offsetVelocity = offsetDelta * s_velocityNeededPerPixel;

    auto addScrollVelocityRequestedEventArgs = winrt::make_self<ScrollControllerAddScrollVelocityRequestedEventArgs>(
        static_cast<float>(offsetVelocity),
        s_smallChangeInertiaDecayRate);

    m_addScrollVelocityRequested(*this, *addScrollVelocityRequestedEventArgs);

    int32_t offsetChangeCorrelationId = addScrollVelocityRequestedEventArgs.as<winrt::ScrollControllerAddScrollVelocityRequestedEventArgs>().CorrelationId();

    // Only increment m_operationsCount when the returned OffsetsChangeCorrelationId represents a new request that was not coalesced with a pending request.
    if (offsetChangeCorrelationId != -1 && offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForAddScrollVelocity)
    {
        m_lastOffsetChangeCorrelationIdForAddScrollVelocity = offsetChangeCorrelationId;
        m_operationsCount++;
    }
}

void RaiseCanScrollChanged ( ) [private]

Definition at line 990 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!m_canScrollChanged)
    {
        return;
    }

    m_canScrollChanged(*this, nullptr);
}

winrt::IInspectable RaiseDetailLabelRequested ( double offsetFromTop ) [private]

Definition at line 974 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, offsetFromTop);

    if (!m_detailLabelRequestedEventSource)
    {
        return nullptr;
    }

    const auto value = std::min(offsetFromTop / m_scrollOffsetToLabelOffsetFactor, Maximum() + ViewportSize());
    auto detailLabelRequestedEventArgs = winrt::make_self<AnnotatedScrollBarDetailLabelRequestedEventArgs>(value);

    m_detailLabelRequestedEventSource(*this, *detailLabelRequestedEventArgs);
    return detailLabelRequestedEventArgs.as<winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs>().Content();
}

void RaiseIsScrollingWithMouseChanged ( ) [private]

Definition at line 1002 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!m_isScrollingWithMouseChanged)
    {
        return;
    }

    m_isScrollingWithMouseChanged(*this, nullptr);
}

void RaiseScrollByRequested ( double offsetDelta ) [private]

Definition at line 1043 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, offsetDelta);

    if (!m_scrollByRequested)
    {
        return;
    }

    auto options = winrt::make_self<ScrollingScrollOptions>(
        winrt::ScrollingAnimationMode::Disabled,
        winrt::ScrollingSnapPointsMode::Ignore);

    auto scrollByRequestedEventArgs = winrt::make_self<ScrollControllerScrollByRequestedEventArgs>(
        offsetDelta,
        *options);

    m_scrollByRequested(*this, *scrollByRequestedEventArgs);

    int32_t offsetChangeCorrelationId = scrollByRequestedEventArgs.as<winrt::ScrollControllerScrollByRequestedEventArgs>().CorrelationId();

    // Only increment m_operationsCount when the returned OffsetsChangeCorrelationId represents a new request that was not coalesced with a pending request.
    if (offsetChangeCorrelationId != -1 && offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollBy)
    {
        m_lastOffsetChangeCorrelationIdForScrollBy = offsetChangeCorrelationId;
        m_operationsCount++;
    }
}

bool RaiseScrolling | ( | double | offset,
 |  | winrt::AnnotatedScrollBarScrollingEventKind | scrollingEventKind |
 | ) |  |  | [private]

Definition at line 958 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH_DBL_INT, METH_NAME, this, offset, scrollingEventKind);

    if (!m_scrollingEventSource)
    {
        return false;
    }

    auto scrollingEventArgs = winrt::make_self<AnnotatedScrollBarScrollingEventArgs>(offset, scrollingEventKind);

    m_scrollingEventSource(*this, *scrollingEventArgs);

    return scrollingEventArgs.as<winrt::AnnotatedScrollBarScrollingEventArgs>().Cancel();
}

void RaiseScrollToRequested ( double offset ) [private]

Definition at line 1014 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, offset);

    if (!m_scrollToRequested)
    {
        return;
    }

    auto options = winrt::make_self<ScrollingScrollOptions>(
        winrt::ScrollingAnimationMode::Disabled,
        winrt::ScrollingSnapPointsMode::Ignore);

    auto scrollToRequestedEventArgs = winrt::make_self<ScrollControllerScrollToRequestedEventArgs>(
        offset,
        *options);

    m_scrollToRequested(*this, *scrollToRequestedEventArgs);

    int32_t offsetChangeCorrelationId = scrollToRequestedEventArgs.as<winrt::ScrollControllerScrollToRequestedEventArgs>().CorrelationId();

    // Only increment m_operationsCount when the returned OffsetsChangeCorrelationId represents a new request that was not coalesced with a pending request.
    if (offsetChangeCorrelationId != -1 && offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollTo)
    {
        m_lastOffsetChangeCorrelationIdForScrollTo = offsetChangeCorrelationId;
        m_operationsCount++;
    }
}

void ResetTrackedPointerId ( ) [private]

Definition at line 615 of file AnnotatedScrollBar.cpp.

{
    m_verticalGridTrackedPointerId = 0;
}

winrt::event_token ScrollByRequested ( winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollByRequestedEventArgs > const & value )

Definition at line 1219 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    return m_scrollByRequested.add(value);
}

void ScrollByRequested ( winrt::event_token const & token )

Definition at line 1226 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_scrollByRequested.remove(token);
}

winrt::IScrollController ScrollController ( )

Definition at line 56 of file AnnotatedScrollBar.cpp.

{
    return static_cast<winrt::IScrollController>(*this);
}

void ScrollTo | ( | double | offset,
 |  | winrt::AnnotatedScrollBarScrollingEventKind | scrollingEventKind |
 | ) |  |  | [private]

Definition at line 892 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH_DBL_INT, METH_NAME, this, offset, scrollingEventKind);

    auto scrollOffset = offset;
    // In the case of increment buttons, calculate the new offset
    double changeAmount = 0;

    switch (scrollingEventKind)
    {
        case winrt::AnnotatedScrollBarScrollingEventKind::IncrementButton:
        {
            EnsureSmallChangeValue();
            changeAmount = -1 * SmallChange();
            scrollOffset = Value() + changeAmount;
            scrollOffset = std::max(scrollOffset, Minimum());
            break;
        }
        case winrt::AnnotatedScrollBarScrollingEventKind::DecrementButton:
        {
            EnsureSmallChangeValue();
            changeAmount = SmallChange();
            scrollOffset = Value() + changeAmount;
            scrollOffset = std::min(scrollOffset, Maximum());
            break;
        }
    }

    if (RaiseScrolling(scrollOffset, scrollingEventKind))
    {
        return;
    }

    switch (scrollingEventKind)
    {
        case winrt::AnnotatedScrollBarScrollingEventKind::Click:
        {
            RaiseScrollToRequested(scrollOffset);
            break;
        }
        case winrt::AnnotatedScrollBarScrollingEventKind::Drag:
        {
            // TODO as part of bug fix 45076500.
            // RaiseScrollToRequested must not be called during a touch-driven independent pan.
            //if (m_isScrollingWithMouse)
            {
                RaiseScrollToRequested(scrollOffset);
            }
            break;
        }
        case winrt::AnnotatedScrollBarScrollingEventKind::IncrementButton:
        case winrt::AnnotatedScrollBarScrollingEventKind::DecrementButton:
        {
            if (SharedHelpers::IsAnimationsEnabled())
            {
                RaiseAddScrollVelocityRequested(changeAmount);
            }
            else
            {
                RaiseScrollByRequested(changeAmount);
            }
            break;
        }
    }
}

void ScrollToRequested ( winrt::event_token const & token )

Definition at line 1212 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_scrollToRequested.remove(token);
}

winrt::event_token ScrollToRequested ( winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollToRequestedEventArgs > const & value )

Definition at line 1205 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    return m_scrollToRequested.add(value);
}

void SetIsScrollable ( bool isScrollable )

Definition at line 1119 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(
        *this,
        TRACE_MSG_METH_INT,
        METH_NAME,
        this,
        isScrollable);

    m_isScrollable = isScrollable;
    UpdateCanScroll();
}

void SetThumbGhostVisibility ( winrt::Visibility visibility ) [private]

Definition at line 490 of file AnnotatedScrollBar.cpp.

{
    if (auto verticalThumbGhost = m_verticalThumbGhost.get())
    {
        verticalThumbGhost.Visibility(visibility);
    }
}

void SetToolTipIsOpen ( bool isOpen ) [private]

Definition at line 510 of file AnnotatedScrollBar.cpp.

{
    if (!m_detailLabelRequestedEventSource)
    {
        return;
    }

    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (auto detailLabelToolTip = m_detailLabelToolTip.get())
    {
        detailLabelToolTip.IsOpen(isOpen);
    }
}

void SetUpInteractionElements ( ) [private]

Definition at line 262 of file AnnotatedScrollBar.cpp.

{
    if (auto verticalIncrementRepeatButton = m_verticalIncrementRepeatButton.get())
    {
        m_verticalIncrementRepeatButtonClickRevoker = verticalIncrementRepeatButton.Click(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnIncrementRepeatButtonClick });
    }

    if (auto verticalDecrementRepeatButton = m_verticalDecrementRepeatButton.get())
    {
        m_verticalDecrementRepeatButtonClickRevoker = verticalDecrementRepeatButton.Click(winrt::auto_revoke, { this, &AnnotatedScrollBar::OnDecrementRepeatButtonClick });
    }

    EnsurePanningInfo();

    m_panningInfo.get()->PanningFrameworkElement(m_verticalThumb.get());
    m_panningInfo.get()->PanningElementAncestor(m_verticalGrid.get());
}

void SetValues | ( | double | minOffset,
 |  | double | maxOffset,
 |  | double | offset,
 |  | double | viewportLength
 | ) |  |

Definition at line 1133 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(
        *this,
        L"%s[0x%p](minOffset:%lf, maxOffset:%lf, offset:%lf, viewportLength:%lf, operationsCount:%d)\n",
        METH_NAME,
        this,
        minOffset,
        maxOffset,
        offset,
        viewportLength,
        m_operationsCount);

    if (maxOffset < minOffset)
    {
        throw winrt::hresult_invalid_argument(L"maxOffset cannot be smaller than minOffset.");
    }

    if (viewportLength < 0.0)
    {
        throw winrt::hresult_invalid_argument(L"viewportLength cannot be negative.");
    }

    offset = std::max(minOffset, offset);
    offset = std::min(maxOffset, offset);
    m_lastOffset = offset;

    Minimum(minOffset);
    Maximum(maxOffset);
    ViewportSize(viewportLength);

    if (m_operationsCount == 0)
    {
        Value(offset);
    }
}

void ShowHoverVisuals | ( | double | offsetFromTopToolTip,
 |  | double | offsetFromTopThumbGhost |
 | ) |  |  | [private]

Definition at line 498 of file AnnotatedScrollBar.cpp.

{
    ShowToolTipAtOffset(offsetFromTopToolTip);
    ShowThumbGhostAtOffset(offsetFromTopThumbGhost);
}

void ShowThumbGhostAtOffset ( double offsetFromTop ) [private]

Definition at line 569 of file AnnotatedScrollBar.cpp.

{
    if (auto verticalThumbGhost = m_verticalThumbGhost.get())
    {
        verticalThumbGhost.Margin({verticalThumbGhost.Margin().Left,
                                    offsetFromTop,
                                    verticalThumbGhost.Margin().Right,
                                    verticalThumbGhost.Margin().Bottom});
        SetThumbGhostVisibility(winrt::Visibility::Visible);
    }
}

void ShowToolTipAtOffset ( double offsetFromTop ) [private]

Definition at line 525 of file AnnotatedScrollBar.cpp.

{
    auto data = RaiseDetailLabelRequested(offsetFromTop);

    auto detailLabelToolTip = m_detailLabelToolTip.get();
    auto tooltipContentPresenter = m_tooltipContentPresenter.get();
    if (data &&
        detailLabelToolTip &&
        tooltipContentPresenter)
    {
        tooltipContentPresenter.Content(data);

        if (!m_detailLabelTemplateApplied ||
            (!tooltipContentPresenter.ContentTemplate() && !tooltipContentPresenter.ContentTemplateSelector()))
        {
            if (auto dataElementFactory = DetailLabelTemplate())
            {
                if (auto dataTemplate = dataElementFactory.try_as<winrt::DataTemplate>())
                {
                    tooltipContentPresenter.ContentTemplateSelector(nullptr);
                    tooltipContentPresenter.ContentTemplate(dataTemplate);
                    m_detailLabelTemplateApplied = true;
                }
                else if (auto dataTemplateSelector = dataElementFactory.try_as<winrt::DataTemplateSelector>())
                {
                    tooltipContentPresenter.ContentTemplate(nullptr);
                    tooltipContentPresenter.ContentTemplateSelector(dataTemplateSelector);
                    m_detailLabelTemplateApplied = true;
                }
            }
        }

        auto const detailLabelToolTipWidth = LayoutUtils::MeasureAndGetDesiredWidthFor(tooltipContentPresenter, c_infSize);
        // +2 extra pixels to offset the tooltip border for proper alignment
        auto const horizontalPosition = static_cast<float>((-1*detailLabelToolTipWidth/2) + 2);
        const winrt::Rect placementRect(horizontalPosition,
                                        static_cast<float>(offsetFromTop),
                                        0,
                                        0);
        detailLabelToolTip.PlacementRect(placementRect);
        SetToolTipIsOpen(true);
    }
}

void UnhookHandlers ( bool isFromDestructor ) [private]

Definition at line 206 of file AnnotatedScrollBar.cpp.

{
    m_verticalGridPointerEnteredRevoker.revoke();
    m_verticalGridPointerMovedRevoker.revoke();
    m_verticalGridPointerExitedRevoker.revoke();
    m_verticalGridPointerPressedRevoker.revoke();
    m_verticalGridPointerReleasedRevoker.revoke();
    m_verticalGridPointerCanceledRevoker.revoke();
    m_verticalGridPointerCaptureLostRevoker.revoke();
    m_verticalIncrementRepeatButtonClickRevoker.revoke();
    m_verticalDecrementRepeatButtonClickRevoker.revoke();
    m_detailLabelToolTipOpenedRevoker.revoke();

    if (isFromDestructor)
    {
        m_sizeChangedRevoker.revoke();
#ifdef DBG
        m_loadedRevoker.revoke();
#endif
        m_isEnabledRevoker.revoke();
        m_labelsVectorChangedRevoker.revoke();
    }
}

void UpdateCanScroll ( ) [private]

Definition at line 581 of file AnnotatedScrollBar.cpp.

{
    const bool oldCanScroll = m_canScroll;

    m_canScroll = m_isScrollable && IsEnabled();

    if (oldCanScroll != m_canScroll)
    {
        RaiseCanScrollChanged();
    }
}

void UpdateLabelContainersOffsets ( ) [private]

Definition at line 377 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    auto labelsGrid = m_labelsGrid.get();
    MUX_ASSERT(labelsGrid);

    for (auto const labelContainer : labelsGrid.Children())
    {
        auto const labelContentPresenter = labelContainer.as<winrt::ContentPresenter>();
        auto const label = labelContentPresenter.Content().as<winrt::AnnotatedScrollBarLabel>();
        auto const labelVerticalOffset = GetLabelVerticalOffset(label);
        labelContentPresenter.Margin({ 0,labelVerticalOffset,0,0 });
    }
}

void UpdatePositionsOfAnchoredElements ( ) [private]

Definition at line 281 of file AnnotatedScrollBar.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    // Run the math for the mapping factor again
    UpdateScrollOffsetToLabelOffsetFactor();

    // Update thumb animation multiplier
    EnsurePanningInfo();

    m_panningInfo.get()->PanningElementOffsetMultiplier(static_cast<float>(-1.0 / m_scrollOffsetToLabelOffsetFactor));

    QueueLayoutLabels(500 /*millisecondWait*/);
}

void UpdateScrollOffsetToLabelOffsetFactor ( ) [private]

Definition at line 459 of file AnnotatedScrollBar.cpp.

{
    double scrollOffsetToLabelOffsetFactor = 1;
    auto labelsGrid = m_labelsGrid.get();
    auto interactionFrameworkElement = m_verticalThumb.get();

    if (labelsGrid && interactionFrameworkElement)
    {
        double scrollViewScrollableHeight = Maximum() - Minimum();
        scrollViewScrollableHeight = scrollViewScrollableHeight == 0 ? 1 : scrollViewScrollableHeight;
        scrollOffsetToLabelOffsetFactor = (labelsGrid.ActualHeight() - interactionFrameworkElement.ActualHeight()) / scrollViewScrollableHeight * (1 - ViewportSize() / (ViewportSize() + scrollViewScrollableHeight));
    }
    m_scrollOffsetToLabelOffsetFactor = scrollOffsetToLabelOffsetFactor;
}

double Value ( ) [private]

Definition at line 111 of file AnnotatedScrollBar.cpp.

{
    return m_value;
}

void Value ( double value ) [private]

Definition at line 103 of file AnnotatedScrollBar.cpp.

{
    if (value != m_value)
    {
        m_value = value;
    }
}

void ViewportSize ( double viewportSize ) [private]

Definition at line 61 of file AnnotatedScrollBar.cpp.

{
    if (viewportSize != m_viewportSize)
    {
        m_viewportSize = viewportSize;
        UpdatePositionsOfAnchoredElements();
    }
}

double ViewportSize ( ) [private]

Definition at line 70 of file AnnotatedScrollBar.cpp.

{
    return m_viewportSize;
}

The documentation for this class was generated from the following files:
  • AnnotatedScrollBar/AnnotatedScrollBar.h
  • AnnotatedScrollBar/AnnotatedScrollBar.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarDetailLabelRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

AnnotatedScrollBarDetailLabelRequestedEventArgs Class Reference

#include "AnnotatedScrollBarDetailLabelRequestedEventArgs.h"

Inherits ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

AnnotatedScrollBarDetailLabelRequestedEventArgs (double scrollOffset)
winrt::IInspectable | Content ()
void | Content (const winrt::IInspectable &content)
double | ScrollOffset ()

Detailed Description

Definition at line 8 of file AnnotatedScrollBarDetailLabelRequestedEventArgs.h.

Constructor & Destructor Documentation

AnnotatedScrollBarDetailLabelRequestedEventArgs ( double scrollOffset )

Definition at line 8 of file AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp.

{
    m_scrollOffset = scrollOffset;
}

Member Function Documentation

winrt::IInspectable Content ( )

Definition at line 15 of file AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp.

{
    return m_content.get();
}

void Content ( const winrt::IInspectable & content )

Definition at line 20 of file AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp.

{
    m_content.set(content);
}

double ScrollOffset ( )

Definition at line 25 of file AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp.

{
    return m_scrollOffset;
}

The documentation for this class was generated from the following files:
  • AnnotatedScrollBar/AnnotatedScrollBarDetailLabelRequestedEventArgs.h
  • AnnotatedScrollBar/AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarLabel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

AnnotatedScrollBarLabel Class Reference

#include "AnnotatedScrollBarLabel.h"

Inherits ReferenceTracker< AnnotatedScrollBarLabel, winrt::implementation::AnnotatedScrollBarLabelT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

AnnotatedScrollBarLabel (const winrt::IInspectable &content, double scrollOffset)
winrt::IInspectable | Content ()
double | ScrollOffset ()

Detailed Description

Definition at line 8 of file AnnotatedScrollBarLabel.h.

Constructor & Destructor Documentation

AnnotatedScrollBarLabel | ( | const winrt::IInspectable & | content,
 |  | double | scrollOffset
 | ) |  |

Definition at line 8 of file AnnotatedScrollBarLabel.cpp.

{
    m_content.set(content);
    m_scrollOffset = scrollOffset;
}

Member Function Documentation

winrt::IInspectable Content ( )

Definition at line 14 of file AnnotatedScrollBarLabel.cpp.

{
    return m_content.get();
}

double ScrollOffset ( )

Definition at line 19 of file AnnotatedScrollBarLabel.cpp.

{
    return m_scrollOffset;
}

The documentation for this class was generated from the following files:
  • AnnotatedScrollBar/AnnotatedScrollBarLabel.h
  • AnnotatedScrollBar/AnnotatedScrollBarLabel.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarPanningInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

AnnotatedScrollBarPanningInfo Class Reference

#include "AnnotatedScrollBarPanningInfo.h"

Inherits ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type >.

List of all members.

Public Member Functions

AnnotatedScrollBarPanningInfo ()
~AnnotatedScrollBarPanningInfo ()
void | Changed (const winrt::event_token &token)
winrt::event_token | Changed (const winrt::TypedEventHandler< winrt::IScrollControllerPanningInfo, winrt::IInspectable > &handler)
bool | IsRailEnabled ()
winrt::UIElement | PanningElementAncestor ()
void | PanningElementAncestor (const winrt::UIElement &value)
void | PanningElementOffsetMultiplier (float value)
void | PanningFrameworkElement (const winrt::FrameworkElement &value)
winrt::Orientation | PanOrientation ()
void | PanRequested (const winrt::event_token &token)
winrt::event_token | PanRequested (const winrt::TypedEventHandler< winrt::IScrollControllerPanningInfo, winrt::ScrollControllerPanRequestedEventArgs > &handler)
bool | RaisePanRequested (const winrt::PointerPoint &pointerPoint)
void | SetPanningElementExpressionAnimationSources (const winrt::CompositionPropertySet &propertySet, const winrt::hstring &minOffsetPropertyName, const winrt::hstring &maxOffsetPropertyName, const winrt::hstring &offsetPropertyName, const winrt::hstring &multiplierPropertyName)

Private Member Functions

void | EnsureThumbAnimation ()
void | RaiseChanged ()
void | StartThumbAnimation ()
void | StopThumbAnimation ()
void | UpdatePanningElementOffsetMultiplier ()
void | UpdateThumbExpression ()

Detailed Description

Definition at line 6 of file AnnotatedScrollBarPanningInfo.h.

Constructor & Destructor Documentation

AnnotatedScrollBarPanningInfo ( )

Definition at line 10 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~AnnotatedScrollBarPanningInfo ( )

Definition at line 15 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

winrt::event_token Changed ( const winrt::TypedEventHandler< winrt::IScrollControllerPanningInfo, winrt::IInspectable > & handler )

Definition at line 73 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");

    return m_changedEventSource.add(handler);
}

void Changed ( const winrt::event_token & token )

Definition at line 80 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");

    m_changedEventSource.remove(token);
}

void EnsureThumbAnimation ( ) [private]

Definition at line 170 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (!m_thumbOffsetAnimation &&
        m_expressionAnimationSources &&
        m_offsetPropertyName != L"" &&
        m_minOffsetPropertyName != L"" &&
        m_maxOffsetPropertyName != L"" &&
        m_multiplierPropertyName != L"")
    {
        m_thumbOffsetAnimation = m_expressionAnimationSources.Compositor().CreateExpressionAnimation();
        m_thumbOffsetAnimation.SetReferenceParameter(L"sources", m_expressionAnimationSources);
    }
}

bool IsRailEnabled ( )

Definition at line 22 of file AnnotatedScrollBarPanningInfo.cpp.

{
    return true;
}

void PanningElementAncestor ( const winrt::UIElement & value )

Definition at line 123 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (m_panningElementAncestor.get() != value)
    {
        m_panningElementAncestor.set(value);
        RaiseChanged();
    }
}

winrt::UIElement PanningElementAncestor ( )

Definition at line 32 of file AnnotatedScrollBarPanningInfo.cpp.

{
    return m_panningElementAncestor.get();
}

void PanningElementOffsetMultiplier ( float value )

Definition at line 132 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (m_panningElementOffsetMultiplier != value)
    {
        m_panningElementOffsetMultiplier = value;

        UpdatePanningElementOffsetMultiplier();
    }
}

void PanningFrameworkElement ( const winrt::FrameworkElement & value )

Definition at line 103 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (m_panningFrameworkElement.get() != value)
    {
        m_panningFrameworkElement.set(value);

        if (m_panningFrameworkElement)
        {
            m_panningVisual.set(winrt::ElementCompositionPreview::GetElementVisual(m_panningFrameworkElement.get()));
            winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_panningFrameworkElement.get(), true);
            StartThumbAnimation();
        }
        else
        {
            StopThumbAnimation();
            m_panningVisual.set(nullptr);
        }
    }
}

winrt::Orientation PanOrientation ( )

Definition at line 27 of file AnnotatedScrollBarPanningInfo.cpp.

{
    return winrt::Orientation::Vertical;
}

void PanRequested ( const winrt::event_token & token )

Definition at line 94 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");

    m_panRequestedEventSource.remove(token);
}

winrt::event_token PanRequested ( const winrt::TypedEventHandler< winrt::IScrollControllerPanningInfo, winrt::ScrollControllerPanRequestedEventArgs > & handler )

Definition at line 87 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");

    return m_panRequestedEventSource.add(handler);
}

void RaiseChanged ( ) [private]

Definition at line 142 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (m_changedEventSource)
    {
        m_changedEventSource(*this, nullptr);
    }
}

bool RaisePanRequested ( const winrt::PointerPoint & pointerPoint )

Definition at line 152 of file AnnotatedScrollBarPanningInfo.cpp.

{
    ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (m_panRequestedEventSource)
    {
        auto scrollControllerPanRequestedEventArgs = winrt::make<ScrollControllerPanRequestedEventArgs>(pointerPoint);

        m_panRequestedEventSource(*this, scrollControllerPanRequestedEventArgs);

        return scrollControllerPanRequestedEventArgs.Handled();
    }

    return false;
}

void SetPanningElementExpressionAnimationSources | ( | const winrt::CompositionPropertySet & | propertySet,
 |  | const winrt::hstring & | minOffsetPropertyName,
 |  | const winrt::hstring & | maxOffsetPropertyName,
 |  | const winrt::hstring & | offsetPropertyName,
 |  | const winrt::hstring & | multiplierPropertyName
 | ) |  |

Definition at line 37 of file AnnotatedScrollBarPanningInfo.cpp.

{
    m_expressionAnimationSources = propertySet;

    if (m_expressionAnimationSources)
    {
        m_minOffsetPropertyName = minOffsetPropertyName;
        m_maxOffsetPropertyName = maxOffsetPropertyName;
        m_offsetPropertyName = offsetPropertyName;
        m_multiplierPropertyName = multiplierPropertyName;

        UpdatePanningElementOffsetMultiplier();

        if (!m_thumbOffsetAnimation)
        {
            EnsureThumbAnimation();
            UpdateThumbExpression();
            StartThumbAnimation();
        }
    }
    else
    {
        m_minOffsetPropertyName = L"";
        m_maxOffsetPropertyName = L"";
        m_offsetPropertyName = L"";
        m_multiplierPropertyName = L"";
        m_thumbOffsetAnimation = nullptr;
        StopThumbAnimation();
    }
}

void StartThumbAnimation ( ) [private]

Definition at line 184 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (m_panningVisual && m_thumbOffsetAnimation)
    {
        m_panningVisual.get().StartAnimation(L"Translation.Y", m_thumbOffsetAnimation);
    }
}

void StopThumbAnimation ( ) [private]

Definition at line 192 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (m_panningVisual)
    {
        m_panningVisual.get().StopAnimation(L"Translation.Y");
    }
}

void UpdatePanningElementOffsetMultiplier ( ) [private]

Definition at line 214 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (m_expressionAnimationSources && m_multiplierPropertyName != L"")
    {
        m_expressionAnimationSources.InsertScalar(m_multiplierPropertyName, m_panningElementOffsetMultiplier);
    }
}

void UpdateThumbExpression ( ) [private]

Definition at line 202 of file AnnotatedScrollBarPanningInfo.cpp.

{
    if (m_thumbOffsetAnimation)
    {
        m_thumbOffsetAnimation.Expression(
            L"min(sources." + m_maxOffsetPropertyName +
            L",max(sources." + m_minOffsetPropertyName +
            L",sources." + m_offsetPropertyName +
            L"))/(-sources." + m_multiplierPropertyName + L")");
    }
}

The documentation for this class was generated from the following files:
  • AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.h
  • AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

AnnotatedScrollBarProperties Class Reference

#include "AnnotatedScrollBar.properties.h"

Inherited by AnnotatedScrollBar.

List of all members.

Public Member Functions

AnnotatedScrollBarProperties ()
winrt::event_token | DetailLabelRequested (winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs > const &value)
void | DetailLabelRequested (winrt::event_token const &token)
void | DetailLabelTemplate (winrt::IElementFactory const &value)
winrt::IElementFactory | DetailLabelTemplate ()
void | Labels (winrt::IVector< winrt::AnnotatedScrollBarLabel > const &value)
winrt::IVector
< winrt::AnnotatedScrollBarLabel > 		Labels ()
winrt::IElementFactory | LabelTemplate ()
void | LabelTemplate (winrt::IElementFactory const &value)
void | Scrolling (winrt::event_token const &token)
winrt::event_token | Scrolling (winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs > const &value)
void | SmallChange (double value)
double | SmallChange ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | DetailLabelTemplateProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | LabelsProperty ()
static winrt::DependencyProperty | LabelTemplateProperty ()
static void | OnDetailLabelTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLabelsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLabelTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSmallChangePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SmallChangeProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::AnnotatedScrollBar,
winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs > > 		m_detailLabelRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::AnnotatedScrollBar,
winrt::AnnotatedScrollBarScrollingEventArgs > > 		m_scrollingEventSource

Static Public Attributes

static GlobalDependencyProperty | s_DetailLabelTemplateProperty
static GlobalDependencyProperty | s_LabelsProperty
static GlobalDependencyProperty | s_LabelTemplateProperty
static GlobalDependencyProperty | s_SmallChangeProperty

Detailed Description

Definition at line 7 of file AnnotatedScrollBar.properties.h.

Constructor & Destructor Documentation

AnnotatedScrollBarProperties ( )

Definition at line 21 of file AnnotatedScrollBar.properties.cpp.

    : m_detailLabelRequestedEventSource{static_cast<AnnotatedScrollBar*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
winrt::event_token DetailLabelRequested ( winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs > const & value )
void DetailLabelRequested ( winrt::event_token const & token )
winrt::IElementFactory DetailLabelTemplate ( )
void DetailLabelTemplate ( winrt::IElementFactory const & value )
static winrt::DependencyProperty DetailLabelTemplateProperty ( ) [inline, static]

Definition at line 24 of file AnnotatedScrollBar.properties.h.

{ return s_DetailLabelTemplateProperty; }

static void EnsureProperties ( ) [static]
winrt::IVector<winrt::AnnotatedScrollBarLabel> Labels ( )
void Labels ( winrt::IVector< winrt::AnnotatedScrollBarLabel > const & value )
static winrt::DependencyProperty LabelsProperty ( ) [inline, static]

Definition at line 25 of file AnnotatedScrollBar.properties.h.

{ return s_LabelsProperty; }

void LabelTemplate ( winrt::IElementFactory const & value )
winrt::IElementFactory LabelTemplate ( )
static winrt::DependencyProperty LabelTemplateProperty ( ) [inline, static]

Definition at line 26 of file AnnotatedScrollBar.properties.h.

{ return s_LabelTemplateProperty; }

static void OnDetailLabelTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLabelsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLabelTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSmallChangePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void Scrolling ( winrt::event_token const & token )
winrt::event_token Scrolling ( winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs > const & value )
double SmallChange ( )
void SmallChange ( double value )
static winrt::DependencyProperty SmallChangeProperty ( ) [inline, static]

Definition at line 27 of file AnnotatedScrollBar.properties.h.

{ return s_SmallChangeProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs> > m_detailLabelRequestedEventSource

Definition at line 39 of file AnnotatedScrollBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs> > m_scrollingEventSource

Definition at line 40 of file AnnotatedScrollBar.properties.h.

GlobalDependencyProperty s_DetailLabelTemplateProperty [static]

Definition at line 29 of file AnnotatedScrollBar.properties.h.

GlobalDependencyProperty s_LabelsProperty [static]

Definition at line 30 of file AnnotatedScrollBar.properties.h.

GlobalDependencyProperty s_LabelTemplateProperty [static]

Definition at line 31 of file AnnotatedScrollBar.properties.h.

GlobalDependencyProperty s_SmallChangeProperty [static]

Definition at line 32 of file AnnotatedScrollBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/AnnotatedScrollBar.properties.h
  • Generated/AnnotatedScrollBar.properties.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarScrollingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

AnnotatedScrollBarScrollingEventArgs Class Reference

#include "AnnotatedScrollBarScrollingEventArgs.h"

Inherits ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

AnnotatedScrollBarScrollingEventArgs (double scrollOffset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind)
bool | Cancel ()
void | Cancel (bool cancel)
winrt::AnnotatedScrollBarScrollingEventKind | ScrollingEventKind ()
double | ScrollOffset ()

Private Attributes

winrt::AnnotatedScrollBarScrollingEventKind | m_scrollingEventKind

Detailed Description

Definition at line 8 of file AnnotatedScrollBarScrollingEventArgs.h.

Constructor & Destructor Documentation

AnnotatedScrollBarScrollingEventArgs | ( | double | scrollOffset,
 |  | winrt::AnnotatedScrollBarScrollingEventKind | scrollingEventKind
 | ) |  |

Definition at line 8 of file AnnotatedScrollBarScrollingEventArgs.cpp.

{
    m_scrollOffset = scrollOffset;
    m_scrollingEventKind = scrollingEventKind;
}

Member Function Documentation

void Cancel ( bool cancel )

Definition at line 26 of file AnnotatedScrollBarScrollingEventArgs.cpp.

{
    m_cancel = cancel;
}

bool Cancel ( )

Definition at line 31 of file AnnotatedScrollBarScrollingEventArgs.cpp.

{
    return m_cancel;
}

winrt::AnnotatedScrollBarScrollingEventKind ScrollingEventKind ( )

Definition at line 16 of file AnnotatedScrollBarScrollingEventArgs.cpp.

{
    return m_scrollingEventKind;
}

double ScrollOffset ( )

Definition at line 21 of file AnnotatedScrollBarScrollingEventArgs.cpp.

{
    return m_scrollOffset;
}

Member Data Documentation

winrt::AnnotatedScrollBarScrollingEventKind m_scrollingEventKind [private]

Definition at line 22 of file AnnotatedScrollBarScrollingEventArgs.h.

The documentation for this class was generated from the following files:
  • AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.h
  • AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

AnnotatedScrollBarTrace Class Reference

#include "AnnotatedScrollBarTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file AnnotatedScrollBarTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file AnnotatedScrollBarTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "AnnotatedScrollBarInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_ANNOTATEDSCROLLBAR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"AnnotatedScrollBar") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 152 of file AnnotatedScrollBarTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "AnnotatedScrollBarPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_ANNOTATEDSCROLLBAR),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file AnnotatedScrollBarTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "AnnotatedScrollBarVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_ANNOTATEDSCROLLBAR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"AnnotatedScrollBar") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file AnnotatedScrollBarTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file AnnotatedScrollBarTrace.h.

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/AnnotatedScrollBarTrace.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • anonymous_namespace{ProgressRingDeterminate.cpp}
  • AnimatedVisual
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedVisual (Compositor compositor, winrt::CompositionPropertySet themeProperties)
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
float2 | Size () const

Static Public Member Functions

static bool | IsRuntimeCompatible ()

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
CompositionContainerShape | ContainerShape ()
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, float3x2 transformMatrix)
Vector2KeyFrameAnimation | CreateVector2KeyFrameAnimation (float initialProgress, float2 initialValue, CompositionEasingFunction initialEasingFunction)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CompositionEllipseGeometry | Ellipse_7_0 ()
CompositionEllipseGeometry | Ellipse_7_1 ()
CompositionEllipseGeometry | Ellipse_7_2 ()
StepEasingFunction | HoldThenStepEasingFunction ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
Vector2KeyFrameAnimation | ShapeVisibilityAnimation ()
ShapeVisual | ShapeVisual_0 ()
CompositionSpriteShape | SpriteShape_0 ()
CompositionSpriteShape | SpriteShape_1 ()
CompositionSpriteShape | SpriteShape_2 ()
StepEasingFunction | StepThenHoldEasingFunction ()
CompositionColorBrush | ThemeColor_Background ()
CompositionColorBrush | ThemeColor_Foreground_0 ()
CompositionColorBrush | ThemeColor_Foreground_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_1 ()

Static Private Member Functions

static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 58 of file ProgressRingDeterminate.cpp.

Constructor & Destructor Documentation

AnimatedVisual | ( | Compositor | compositor,
 |  | winrt::CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 322 of file ProgressRingDeterminate.cpp.

            : _c(compositor)
            , _themeProperties(themeProperties)
            , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
        {
            const auto _ = Root();
        }

Member Function Documentation

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 82 of file ProgressRingDeterminate.cpp.

        {
            _reusableExpressionAnimation.ClearAllParameters();
            _reusableExpressionAnimation.Expression(expression);
            _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
            target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
        }

void Close ( ) [inline]

Definition at line 330 of file ProgressRingDeterminate.cpp.

        {
            if (_root)
            {
                _root.Close();
            }
        }

CompositionContainerShape ContainerShape ( ) [inline, private]

Definition at line 152 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateContainerShape();
            result.Scale({ 0.0F, 0.0F });
            const auto shapes = result.Shapes();
            // Offset:<16, 16>
            shapes.Append(SpriteShape_1());
            // Offset:<16, 16>
            shapes.Append(SpriteShape_2());
            StartProgressBoundAnimation(result, L"Scale", ShapeVisibilityAnimation(), _rootProgress);
            return result;
        }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 95 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateScalarKeyFrameAnimation();
            result.Duration(TimeSpan{ c_durationTicks });
            result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
            return result;
        }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | float3x2 | transformMatrix |
 | ) |  |  | [inline, private]

Definition at line 111 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateSpriteShape(geometry);
            result.TransformMatrix(transformMatrix);
            return result;
        }

Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation | ( | float | initialProgress,
 |  | float2 | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 103 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateVector2KeyFrameAnimation();
            result.Duration(TimeSpan{ c_durationTicks });
            result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
            return result;
        }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 252 of file ProgressRingDeterminate.cpp.

        {
            return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.833000004F, 0.833000004F });
        }

TimeSpan Duration ( ) const [inline]

Definition at line 338 of file ProgressRingDeterminate.cpp.

        {
            return { TimeSpan{ c_durationTicks } };
        }

CompositionEllipseGeometry Ellipse_7_0 ( ) [inline, private]

Definition at line 168 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateEllipseGeometry();
            result.Radius({ 8.0F, 8.0F });
            return result;
        }

CompositionEllipseGeometry Ellipse_7_1 ( ) [inline, private]

Definition at line 179 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateEllipseGeometry();
            result.TrimEnd(0.5F);
            result.Radius({ 8.0F, 8.0F });
            return result;
        }

CompositionEllipseGeometry Ellipse_7_2 ( ) [inline, private]

Definition at line 191 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateEllipseGeometry();
            result.Radius({ 8.0F, 8.0F });
            StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_1(), RootProgress());
            return result;
        }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 294 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
            result.IsFinalStepSingleFrame(true);
            return result;
        }

static bool IsRuntimeCompatible ( ) [inline, static]

Definition at line 355 of file ProgressRingDeterminate.cpp.

        {
            return  winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
        }

ContainerVisual Root ( ) [inline, private]

Definition at line 242 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _root = _c.CreateContainerVisual();
            const auto propertySet = result.Properties();
            propertySet.InsertScalar(L"Progress", 0.0F);
            // Layer aggregator
            result.Children().InsertAtTop(ShapeVisual_0());
            return result;
        }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 257 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
            result.SetReferenceParameter(L"_", _root);
            return result;
        }

Visual RootVisual ( ) const [inline]

Definition at line 344 of file ProgressRingDeterminate.cpp.

        {
            return _root;
        }

Vector2KeyFrameAnimation ShapeVisibilityAnimation ( ) [inline, private]

Definition at line 315 of file ProgressRingDeterminate.cpp.

        {
            const auto result = CreateVector2KeyFrameAnimation(0.00833333377F, { 1.0F, 1.0F }, _holdThenStepEasingFunction);
            return result;
        }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 282 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateShapeVisual();
            result.Size({ 32.0F, 32.0F });
            const auto shapes = result.Shapes();
            // Offset:<16, 16>
            shapes.Append(SpriteShape_0());
            // Layer: Radial
            shapes.Append(ContainerShape());
            return result;
        }

float2 Size ( ) const [inline]

Definition at line 350 of file ProgressRingDeterminate.cpp.

        {
            return { 32.0F, 32.0F };
        }

CompositionSpriteShape SpriteShape_0 ( ) [inline, private]

Definition at line 201 of file ProgressRingDeterminate.cpp.

        {
            // Offset:<16, 16>, Rotation:-0.008387561908827789 degrees, Scale:<1.77, 1.77>
            const auto result = CreateSpriteShape(Ellipse_7_0(), { 1.76999998F, 0.0F, 0.0F, 1.76999998F, 16.0F, 16.0F });
            result.StrokeBrush(ThemeColor_Background());
            result.StrokeDashCap(CompositionStrokeCap::Round);
            result.StrokeThickness(1.5F);
            return result;
        }

CompositionSpriteShape SpriteShape_1 ( ) [inline, private]

Definition at line 214 of file ProgressRingDeterminate.cpp.

        {
            // Offset:<16, 16>, Rotation:-0.008387561908827789 degrees, Scale:<1.77, 1.77>
            const auto result = CreateSpriteShape(Ellipse_7_1(), { 1.76999998F, 0.0F, 0.0F, 1.76999998F, 16.0F, 16.0F });
            result.StrokeBrush(ThemeColor_Foreground_0());
            result.StrokeDashCap(CompositionStrokeCap::Round);
            result.StrokeStartCap(CompositionStrokeCap::Round);
            result.StrokeEndCap(CompositionStrokeCap::Round);
            result.StrokeThickness(1.5F);
            return result;
        }

CompositionSpriteShape SpriteShape_2 ( ) [inline, private]

Definition at line 229 of file ProgressRingDeterminate.cpp.

        {
            // Offset:<16, 16>, Rotation:-0.008387561908827789 degrees, Scale:<1.77, 1.77>
            const auto result = CreateSpriteShape(Ellipse_7_2(), { 1.76999998F, 0.0F, 0.0F, 1.76999998F, 16.0F, 16.0F });
            result.StrokeBrush(ThemeColor_Foreground_1());
            result.StrokeDashCap(CompositionStrokeCap::Round);
            result.StrokeStartCap(CompositionStrokeCap::Round);
            result.StrokeEndCap(CompositionStrokeCap::Round);
            result.StrokeThickness(1.5F);
            return result;
        }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 70 of file ProgressRingDeterminate.cpp.

        {
            target.StartAnimation(animatedPropertyName, animation);
            const auto controller = target.TryGetAnimationController(animatedPropertyName);
            controller.Pause();
            controller.StartAnimation(L"Progress", controllerProgressExpression);
        }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 306 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateStepEasingFunction();
            result.IsInitialStepSingleFrame(true);
            return result;
        }

CompositionColorBrush ThemeColor_Background ( ) [inline, private]

Definition at line 121 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateColorBrush();
            BindProperty(result, L"Color", L"ColorRGB(_theme.Background.W*1,_theme.Background.X,_theme.Background.Y,_theme.Background.Z)", L"_theme", _themeProperties);
            return result;
        }

CompositionColorBrush ThemeColor_Foreground_0 ( ) [inline, private]

Definition at line 132 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateColorBrush();
            BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W*0,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
            return result;
        }

CompositionColorBrush ThemeColor_Foreground_1 ( ) [inline, private]

Definition at line 143 of file ProgressRingDeterminate.cpp.

        {
            const auto result = _c.CreateColorBrush();
            BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W*1,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
            return result;
        }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 269 of file ProgressRingDeterminate.cpp.

        {
            const auto result = CreateScalarKeyFrameAnimation(0.0F, 9.99999975E-05F, StepThenHoldEasingFunction());
            result.InsertKeyFrame(0.00833333377F, 9.99999975E-05F, HoldThenStepEasingFunction());
            result.InsertKeyFrame(0.25F, 0.25F, CubicBezierEasingFunction_0());
            result.InsertKeyFrame(0.5F, 0.5F, _cubicBezierEasingFunction_0);
            result.InsertKeyFrame(0.75F, 0.75F, _cubicBezierEasingFunction_0);
            result.InsertKeyFrame(0.983333349F, 0.96666666F, _cubicBezierEasingFunction_0);
            result.InsertKeyFrame(0.991666675F, 1.0F, _cubicBezierEasingFunction_0);
            return result;
        }

The documentation for this class was generated from the following file:
  • ProgressRing/AnimatedVisuals/ProgressRingDeterminate.cpp
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisual Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • anonymous_namespace{ProgressRingIndeterminate.cpp}
  • AnimatedVisual
Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedVisual Class Reference

List of all members.

Public Member Functions

AnimatedVisual (Compositor compositor, CompositionPropertySet themeProperties)
void | Close ()
TimeSpan | Duration () const
Visual | RootVisual () const
float2 | Size () const

Private Member Functions

void | BindProperty (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject)
void | BindProperty2 (CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName0, CompositionObject referencedObject0, winrt::hstring referenceParameterName1, CompositionObject referencedObject1)
CompositionContainerShape | ContainerShape ()
ScalarKeyFrameAnimation | CreateScalarKeyFrameAnimation (float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
CompositionSpriteShape | CreateSpriteShape (CompositionGeometry geometry, float3x2 transformMatrix)
CubicBezierEasingFunction | CubicBezierEasingFunction_0 ()
CompositionEllipseGeometry | Ellipse_7_0 ()
CompositionEllipseGeometry | Ellipse_7_1 ()
CompositionEllipseGeometry | Ellipse_7_2 ()
StepEasingFunction | HoldThenStepEasingFunction ()
ScalarKeyFrameAnimation | Opacity0ScalarAnimation_0_to_1 ()
ScalarKeyFrameAnimation | Opacity0ScalarAnimation_1_to_0 ()
ContainerVisual | Root ()
ExpressionAnimation | RootProgress ()
ScalarKeyFrameAnimation | RotationAngleInDegreesScalarAnimation_0_to_900 ()
ShapeVisual | ShapeVisual_0 ()
CompositionSpriteShape | SpriteShape_0 ()
CompositionSpriteShape | SpriteShape_1 ()
CompositionSpriteShape | SpriteShape_2 ()
StepEasingFunction | StepThenHoldEasingFunction ()
CompositionColorBrush | ThemeColor_Background ()
CompositionColorBrush | ThemeColor_Foreground_0 ()
CompositionColorBrush | ThemeColor_Foreground_1 ()
ScalarKeyFrameAnimation | TrimEndScalarAnimation_0_to_0p5 ()
ScalarKeyFrameAnimation | TrimStartScalarAnimation_0_to_0p5 ()

Static Private Member Functions

static void | StartProgressBoundAnimation (CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression)

Detailed Description

Definition at line 48 of file ProgressRingIndeterminate.cpp.

Constructor & Destructor Documentation

AnimatedVisual | ( | Compositor | compositor,
 |  | CompositionPropertySet | themeProperties |
 | ) |  |  | [inline]

Definition at line 355 of file ProgressRingIndeterminate.cpp.

            : _c(compositor)
            , _themeProperties(themeProperties)
            , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
        {
            const auto _ = Root();
        }

Member Function Documentation

void BindProperty | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName,
 |  | CompositionObject | referencedObject |
 | ) |  |  | [inline, private]

Definition at line 74 of file ProgressRingIndeterminate.cpp.

        {
            _reusableExpressionAnimation.ClearAllParameters();
            _reusableExpressionAnimation.Expression(expression);
            _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
            target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
        }

void BindProperty2 | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | winrt::hstring | expression,
 |  | winrt::hstring | referenceParameterName0,
 |  | CompositionObject | referencedObject0,
 |  | winrt::hstring | referenceParameterName1,
 |  | CompositionObject | referencedObject1 |
 | ) |  |  | [inline, private]

Definition at line 87 of file ProgressRingIndeterminate.cpp.

        {
            _reusableExpressionAnimation.ClearAllParameters();
            _reusableExpressionAnimation.Expression(expression);
            _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName0, referencedObject0);
            _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName1, referencedObject1);
            target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
        }

void Close ( ) [inline]

Definition at line 363 of file ProgressRingIndeterminate.cpp.

        {
            if (_root)
            {
                _root.Close();
            }
        }

CompositionContainerShape ContainerShape ( ) [inline, private]

Definition at line 158 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateContainerShape();
            // Offset:<40, 40>, Scale:<5, 5>
            result.TransformMatrix({ 5.0F, 0.0F, 0.0F, 5.0F, 40.0F, 40.0F });
            const auto shapes = result.Shapes();
            // ShapeGroup: Ellipse B
            shapes.Append(SpriteShape_1());
            // ShapeGroup: Ellipse B
            shapes.Append(SpriteShape_2());
            StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_900(), _rootProgress);
            return result;
        }

ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation | ( | float | initialProgress,
 |  | float | initialValue,
 |  | CompositionEasingFunction | initialEasingFunction |
 | ) |  |  | [inline, private]

Definition at line 103 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateScalarKeyFrameAnimation();
            result.Duration(TimeSpan{ c_durationTicks });
            result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
            return result;
        }

CompositionSpriteShape CreateSpriteShape | ( | CompositionGeometry | geometry,
 |  | float3x2 | transformMatrix |
 | ) |  |  | [inline, private]

Definition at line 111 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateSpriteShape(geometry);
            result.TransformMatrix(transformMatrix);
            return result;
        }

CubicBezierEasingFunction CubicBezierEasingFunction_0 ( ) [inline, private]

Definition at line 258 of file ProgressRingIndeterminate.cpp.

        {
            return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.833000004F, 0.833000004F });
        }

TimeSpan Duration ( ) const [inline]

Definition at line 371 of file ProgressRingIndeterminate.cpp.

        {
            return { TimeSpan{ c_durationTicks } };
        }

CompositionEllipseGeometry Ellipse_7_0 ( ) [inline, private]

Definition at line 175 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateEllipseGeometry();
            result.Radius({ 7.0F, 7.0F });
            return result;
        }

CompositionEllipseGeometry Ellipse_7_1 ( ) [inline, private]

Definition at line 186 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateEllipseGeometry();
            result.TrimEnd(0.5F);
            result.Radius({ 7.0F, 7.0F });
            StartProgressBoundAnimation(result, L"TrimStart", TrimStartScalarAnimation_0_to_0p5(), RootProgress());
            return result;
        }

CompositionEllipseGeometry Ellipse_7_2 ( ) [inline, private]

Definition at line 199 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateEllipseGeometry();
            result.Radius({ 7.0F, 7.0F });
            StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_0p5(), _rootProgress);
            return result;
        }

StepEasingFunction HoldThenStepEasingFunction ( ) [inline, private]

Definition at line 335 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
            result.IsFinalStepSingleFrame(true);
            return result;
        }

ScalarKeyFrameAnimation Opacity0ScalarAnimation_0_to_1 ( ) [inline, private]

Definition at line 271 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _holdThenStepEasingFunction);
            result.InsertKeyFrame(0.5F, 1.0F, _holdThenStepEasingFunction);
            return result;
        }

ScalarKeyFrameAnimation Opacity0ScalarAnimation_1_to_0 ( ) [inline, private]

Definition at line 279 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
            result.InsertKeyFrame(0.5F, 0.0F, _holdThenStepEasingFunction);
            return result;
        }

ContainerVisual Root ( ) [inline, private]

Definition at line 248 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _root = _c.CreateContainerVisual();
            const auto propertySet = result.Properties();
            propertySet.InsertScalar(L"Progress", 0.0F);
            // Layer aggregator
            result.Children().InsertAtTop(ShapeVisual_0());
            return result;
        }

ExpressionAnimation RootProgress ( ) [inline, private]

Definition at line 263 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
            result.SetReferenceParameter(L"_", _root);
            return result;
        }

Visual RootVisual ( ) const [inline]

Definition at line 377 of file ProgressRingIndeterminate.cpp.

        {
            return _root;
        }

ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_900 ( ) [inline, private]

Definition at line 289 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _holdThenStepEasingFunction);
            result.InsertKeyFrame(0.5F, 450.0F, _cubicBezierEasingFunction_0);
            result.InsertKeyFrame(1.0F, 900.0F, _cubicBezierEasingFunction_0);
            return result;
        }

ShapeVisual ShapeVisual_0 ( ) [inline, private]

Definition at line 323 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateShapeVisual();
            result.Size({ 80.0F, 80.0F });
            const auto shapes = result.Shapes();
            // Scale:5,5, Offset:<40, 40>
            shapes.Append(SpriteShape_0());
            // Scale:5,5, Offset:<40, 40>
            shapes.Append(ContainerShape());
            return result;
        }

float2 Size ( ) const [inline]

Definition at line 383 of file ProgressRingIndeterminate.cpp.

        {
            return { 80.0F, 80.0F };
        }

CompositionSpriteShape SpriteShape_0 ( ) [inline, private]

Definition at line 209 of file ProgressRingIndeterminate.cpp.

        {
            // Offset:<40, 40>, Scale:<5, 5>
            const auto result = CreateSpriteShape(Ellipse_7_0(), { 5.0F, 0.0F, 0.0F, 5.0F, 40.0F, 40.0F });
            result.StrokeBrush(ThemeColor_Background());
            result.StrokeDashCap(CompositionStrokeCap::Round);
            result.StrokeThickness(1.5F);
            return result;
        }

CompositionSpriteShape SpriteShape_1 ( ) [inline, private]

Definition at line 222 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateSpriteShape(Ellipse_7_1());
            result.StrokeBrush(ThemeColor_Foreground_0());
            result.StrokeDashCap(CompositionStrokeCap::Round);
            result.StrokeStartCap(CompositionStrokeCap::Round);
            result.StrokeEndCap(CompositionStrokeCap::Round);
            result.StrokeThickness(1.5F);
            return result;
        }

CompositionSpriteShape SpriteShape_2 ( ) [inline, private]

Definition at line 236 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateSpriteShape(Ellipse_7_2());
            result.StrokeBrush(ThemeColor_Foreground_1());
            result.StrokeDashCap(CompositionStrokeCap::Round);
            result.StrokeStartCap(CompositionStrokeCap::Round);
            result.StrokeEndCap(CompositionStrokeCap::Round);
            result.StrokeThickness(1.5F);
            return result;
        }

static void StartProgressBoundAnimation | ( | CompositionObject | target,
 |  | winrt::hstring | animatedPropertyName,
 |  | CompositionAnimation | animation,
 |  | ExpressionAnimation | controllerProgressExpression |
 | ) |  |  | [inline, static, private]

Definition at line 62 of file ProgressRingIndeterminate.cpp.

        {
            target.StartAnimation(animatedPropertyName, animation);
            const auto controller = target.TryGetAnimationController(animatedPropertyName);
            controller.Pause();
            controller.StartAnimation(L"Progress", controllerProgressExpression);
        }

StepEasingFunction StepThenHoldEasingFunction ( ) [inline, private]

Definition at line 347 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateStepEasingFunction();
            result.IsInitialStepSingleFrame(true);
            return result;
        }

CompositionColorBrush ThemeColor_Background ( ) [inline, private]

Definition at line 121 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _c.CreateColorBrush();
            BindProperty(result, L"Color", L"ColorRGB(_theme.Background.W*1,_theme.Background.X,_theme.Background.Y,_theme.Background.Z)", L"_theme", _themeProperties);
            return result;
        }

CompositionColorBrush ThemeColor_Foreground_0 ( ) [inline, private]

Definition at line 132 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _themeColor_Foreground_0 = _c.CreateColorBrush();
            const auto propertySet = result.Properties();
            propertySet.InsertScalar(L"Opacity0", 0.0F);
            BindProperty2(result, L"Color", L"ColorRGB(_theme.Foreground.W*my.Opacity0,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties, L"my", propertySet);
            StartProgressBoundAnimation(propertySet, L"Opacity0", Opacity0ScalarAnimation_0_to_1(), _rootProgress);
            return result;
        }

CompositionColorBrush ThemeColor_Foreground_1 ( ) [inline, private]

Definition at line 146 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = _themeColor_Foreground_1 = _c.CreateColorBrush();
            const auto propertySet = result.Properties();
            propertySet.InsertScalar(L"Opacity0", 1.0F);
            BindProperty2(result, L"Color", L"ColorRGB(_theme.Foreground.W*my.Opacity0,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties, L"my", propertySet);
            StartProgressBoundAnimation(propertySet, L"Opacity0", Opacity0ScalarAnimation_1_to_0(), _rootProgress);
            return result;
        }

ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p5 ( ) [inline, private]

Definition at line 302 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = CreateScalarKeyFrameAnimation(0.0F, 9.99999975E-05F, _holdThenStepEasingFunction);
            result.InsertKeyFrame(0.5F, 0.5F, _cubicBezierEasingFunction_0);
            return result;
        }

ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_0p5 ( ) [inline, private]

Definition at line 314 of file ProgressRingIndeterminate.cpp.

        {
            const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, StepThenHoldEasingFunction());
            result.InsertKeyFrame(0.5F, 0.0F, HoldThenStepEasingFunction());
            result.InsertKeyFrame(1.0F, 0.5F, CubicBezierEasingFunction_0());
            return result;
        }

The documentation for this class was generated from the following file:
  • ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.cpp
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Entry Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • anonymous_namespace{XamlMetadataProviderGenerated.h}
  • Entry
Public Attributes

Entry Struct Reference

#include "XamlMetadataProviderGenerated.h"

List of all members.

Public Attributes

std::function< winrt::IXamlType()> | createXamlTypeCallback
hstring | typeName
winrt::IXamlType | xamlType

Detailed Description

Definition at line 46 of file XamlMetadataProviderGenerated.h.

Member Data Documentation

std::function<winrt::IXamlType()> createXamlTypeCallback

Definition at line 49 of file XamlMetadataProviderGenerated.h.

hstring typeName

Definition at line 48 of file XamlMetadataProviderGenerated.h.

winrt::IXamlType xamlType

Definition at line 50 of file XamlMetadataProviderGenerated.h.

The documentation for this struct was generated from the following file:
  • dll/XamlMetadataProviderGenerated.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: auto_cast Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

auto_cast Struct Reference

#include "CastHelpers.h"

List of all members.

Public Member Functions

auto_cast (winrt::IInspectable const &value)
template<typename T >
operator T () const

Private Attributes

winrt::IInspectable const & m_value

Detailed Description

Definition at line 6 of file CastHelpers.h.

Constructor & Destructor Documentation

auto_cast ( winrt::IInspectable const & value ) [inline, explicit]

Definition at line 8 of file CastHelpers.h.

                                                       : m_value(value)
    {
    }

Member Function Documentation

operator T ( ) const [inline]

Definition at line 13 of file CastHelpers.h.

    {
        return m_value.as<T>();
    }

Member Data Documentation

winrt::IInspectable const& m_value [private]

Definition at line 19 of file CastHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/CastHelpers.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: auto_unbox Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

auto_unbox Struct Reference

#include "BoxHelpers.h"

List of all members.

Public Member Functions

auto_unbox (winrt::IInspectable const &value)
template<typename T >
operator T () const

Private Attributes

winrt::IInspectable const & m_value

Detailed Description

Definition at line 17 of file BoxHelpers.h.

Constructor & Destructor Documentation

auto_unbox ( winrt::IInspectable const & value ) [inline, explicit]

Definition at line 19 of file BoxHelpers.h.

                                                        : m_value(value)
    {
    }

Member Function Documentation

operator T ( ) const [inline]

Definition at line 24 of file BoxHelpers.h.

    {
        return unbox_value<T>(m_value);
    }

Member Data Documentation

winrt::IInspectable const& m_value [private]

Definition at line 30 of file BoxHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/BoxHelpers.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBoxHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions

AutoSuggestBoxHelper Class Reference

#include "AutoSuggestBoxHelper.h"

Inherits AutoSuggestBoxHelperProperties.

List of all members.

Public Member Functions

AutoSuggestBoxHelper ()

Static Public Member Functions

static winrt::DependencyProperty | AutoSuggestEventRevokersProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static void | OnKeepInteriorCornersSquarePropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Static Public Attributes

static GlobalDependencyProperty | s_AutoSuggestEventRevokersProperty

Static Private Member Functions

static bool | IsPopupOpenDown (const winrt::AutoSuggestBox &autoSuggestBox)
static void | OnAutoSuggestBoxLoaded (const winrt::IInspectable &sender, const winrt::IInspectable &args)
static void | UpdateCornerRadius (const winrt::AutoSuggestBox &autoSuggestBox, bool isPopupOpen)

Detailed Description

Definition at line 8 of file AutoSuggestBoxHelper.h.

Constructor & Destructor Documentation

AutoSuggestBoxHelper ( )

Definition at line 17 of file AutoSuggestBoxHelper.cpp.

{
    EnsureProperties();
}

Member Function Documentation

static winrt::DependencyProperty AutoSuggestEventRevokersProperty ( ) [inline, static]

Definition at line 18 of file AutoSuggestBoxHelper.h.

{ return s_AutoSuggestEventRevokersProperty; }

void ClearProperties ( ) [static]

Reimplemented from AutoSuggestBoxHelperProperties.

Definition at line 39 of file AutoSuggestBoxHelper.cpp.

{
    s_AutoSuggestEventRevokersProperty = nullptr;
    AutoSuggestBoxHelperProperties::ClearProperties();
}

void EnsureProperties ( ) [static]

Reimplemented from AutoSuggestBoxHelperProperties.

Definition at line 22 of file AutoSuggestBoxHelper.cpp.

{
    if (!s_AutoSuggestEventRevokersProperty)
    {
        s_AutoSuggestEventRevokersProperty =
            InitializeDependencyProperty(
                L"AutoSuggestEventRevokers",
                winrt::name_of<winrt::IInspectable>(),
                winrt::name_of<winrt::AutoSuggestBoxHelper>(),
                true /* isAttached */,
                ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
                nullptr);
    }

    AutoSuggestBoxHelperProperties::EnsureProperties();
}

bool IsPopupOpenDown ( const winrt::AutoSuggestBox & autoSuggestBox ) [static, private]

Definition at line 132 of file AutoSuggestBoxHelper.cpp.

{
    double verticalOffset = 0;
    if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, autoSuggestBox))
    {
        if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_textBoxName, autoSuggestBox))
        {
            const auto transform = popupBorder.TransformToVisual(textBox);
            const auto popupTop = transform.TransformPoint(winrt::Point(0, 0));
            verticalOffset = popupTop.Y;
        }
    }
    return verticalOffset >= 0;
}

void OnAutoSuggestBoxLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [static, private]

Definition at line 71 of file AutoSuggestBoxHelper.cpp.

{
    auto autoSuggestBox = sender.as<winrt::AutoSuggestBox>();
    auto revokers = autoSuggestBox.GetValue(AutoSuggestEventRevokersProperty()).as<AutoSuggestEventRevokers>();

    if (!revokers->m_popupOpenedRevoker || !revokers->m_popupClosedRevoker)
    {
        if (auto popup = GetTemplateChildT<winrt::Popup>(c_popupName, autoSuggestBox))
        {
            auto autoSuggestBoxWeakRef = winrt::make_weak(autoSuggestBox);

            revokers->m_popupOpenedRevoker = popup.Opened(winrt::auto_revoke,
                [autoSuggestBoxWeakRef](const winrt::IInspectable& sender, const winrt::IInspectable& args)
                {
                    if (auto autoSuggestBox = autoSuggestBoxWeakRef.get())
                    {
                        UpdateCornerRadius(autoSuggestBox, /*IsDropDownOpen=*/true);
                    }
                });

            revokers->m_popupClosedRevoker = popup.Closed(winrt::auto_revoke,
                [autoSuggestBoxWeakRef](const winrt::IInspectable& sender, const winrt::IInspectable& args)
                {
                    if (auto autoSuggestBox = autoSuggestBoxWeakRef.get())
                    {
                        UpdateCornerRadius(autoSuggestBox, /*IsDropDownOpen=*/false);
                    }
                });
        }
    }
}

void OnKeepInteriorCornersSquarePropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static]

Definition at line 49 of file AutoSuggestBoxHelper.cpp.

{
    if (auto autoSuggestBox = sender.try_as<winrt::AutoSuggestBox>())
    {
        bool shouldMonitorAutoSuggestEvents = unbox_value<bool>(args.NewValue());
        if (shouldMonitorAutoSuggestEvents)
        {
            auto revokersInspectable = winrt::make<AutoSuggestEventRevokers>();
            auto revokers = revokersInspectable.as<AutoSuggestEventRevokers>();

            revokers->m_autoSuggestBoxLoadedRevoker = autoSuggestBox.Loaded(winrt::auto_revoke, AutoSuggestBoxHelper::OnAutoSuggestBoxLoaded);
            autoSuggestBox.SetValue(AutoSuggestEventRevokersProperty(), revokersInspectable);
        }
        else
        {
            autoSuggestBox.SetValue(AutoSuggestEventRevokersProperty(), nullptr);
        }
    }
}

void UpdateCornerRadius | ( | const winrt::AutoSuggestBox & | autoSuggestBox,
 |  | bool | isPopupOpen |
 | ) |  |  | [static, private]

Definition at line 103 of file AutoSuggestBoxHelper.cpp.

{
    auto popupRadius = unbox_value<winrt::CornerRadius>(ResourceAccessor::ResourceLookup(autoSuggestBox, box_value(c_overlayCornerRadiusKey)));

    auto textBoxRadius = autoSuggestBox.CornerRadius();

    if (isPopupOpen)
    {
        auto const isOpenDown = IsPopupOpenDown(autoSuggestBox);
        auto cornerRadiusConverter = winrt::make_self<CornerRadiusFilterConverter>();

        const auto popupRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Bottom : winrt::CornerRadiusFilterKind::Top;
        popupRadius = cornerRadiusConverter->Convert(popupRadius, popupRadiusFilter);

        const auto textBoxRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Top : winrt::CornerRadiusFilterKind::Bottom;
        textBoxRadius = cornerRadiusConverter->Convert(textBoxRadius, textBoxRadiusFilter);
    }

    if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, autoSuggestBox))
    {
        popupBorder.CornerRadius(popupRadius);
    }

    if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_textBoxName, autoSuggestBox))
    {
        textBox.CornerRadius(textBoxRadius);
    }
}

Member Data Documentation

GlobalDependencyProperty s_AutoSuggestEventRevokersProperty [static]

Definition at line 21 of file AutoSuggestBoxHelper.h.

The documentation for this class was generated from the following files:
  • AutoSuggestBox/AutoSuggestBoxHelper.h
  • AutoSuggestBox/AutoSuggestBoxHelper.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBoxHelperProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

AutoSuggestBoxHelperProperties Class Reference

#include "AutoSuggestBoxHelper.properties.h"

Inherited by AutoSuggestBoxHelper.

List of all members.

Public Member Functions

AutoSuggestBoxHelperProperties ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static bool | GetKeepInteriorCornersSquare (winrt::AutoSuggestBox const &target)
static winrt::DependencyProperty | KeepInteriorCornersSquareProperty ()
static void | SetKeepInteriorCornersSquare (winrt::AutoSuggestBox const &target, bool value)

Static Public Attributes

static GlobalDependencyProperty | s_KeepInteriorCornersSquareProperty

Detailed Description

Definition at line 7 of file AutoSuggestBoxHelper.properties.h.

Constructor & Destructor Documentation

AutoSuggestBoxHelperProperties ( )

Definition at line 18 of file AutoSuggestBoxHelper.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Reimplemented in AutoSuggestBoxHelper.

Definition at line 38 of file AutoSuggestBoxHelper.properties.cpp.

{
    s_KeepInteriorCornersSquareProperty = nullptr;
}

void EnsureProperties ( ) [static]

Reimplemented in AutoSuggestBoxHelper.

Definition at line 23 of file AutoSuggestBoxHelper.properties.cpp.

{
    if (!s_KeepInteriorCornersSquareProperty)
    {
        s_KeepInteriorCornersSquareProperty =
            InitializeDependencyProperty(
                L"KeepInteriorCornersSquare",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::AutoSuggestBoxHelper>(),
                true /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(false),
                &AutoSuggestBoxHelper::OnKeepInteriorCornersSquarePropertyChanged);
    }
}

bool GetKeepInteriorCornersSquare ( winrt::AutoSuggestBox const & target ) [static]

Definition at line 49 of file AutoSuggestBoxHelper.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(target.GetValue(s_KeepInteriorCornersSquareProperty));
}

static winrt::DependencyProperty KeepInteriorCornersSquareProperty ( ) [inline, static]

Definition at line 15 of file AutoSuggestBoxHelper.properties.h.

{ return s_KeepInteriorCornersSquareProperty; }

void SetKeepInteriorCornersSquare | ( | winrt::AutoSuggestBox const & | target,
 |  | bool | value |
 | ) |  |  | [static]

Definition at line 44 of file AutoSuggestBoxHelper.properties.cpp.

{
    target.SetValue(s_KeepInteriorCornersSquareProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
}

Member Data Documentation

GlobalDependencyProperty s_KeepInteriorCornersSquareProperty [static]

Definition at line 17 of file AutoSuggestBoxHelper.properties.h.

The documentation for this class was generated from the following files:
  • Generated/AutoSuggestBoxHelper.properties.h
  • Generated/AutoSuggestBoxHelper.properties.cpp
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestEventRevokers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

AutoSuggestEventRevokers Class Reference

#include "AutoSuggestBoxHelper.h"

List of all members.

Public Attributes

winrt::AutoSuggestBox::Loaded_revoker | m_autoSuggestBoxLoadedRevoker
winrt::Popup::Closed_revoker | m_popupClosedRevoker
winrt::Popup::Opened_revoker | m_popupOpenedRevoker

Detailed Description

Definition at line 30 of file AutoSuggestBoxHelper.h.

Member Data Documentation

winrt::AutoSuggestBox::Loaded_revoker m_autoSuggestBoxLoadedRevoker

Definition at line 34 of file AutoSuggestBoxHelper.h.

winrt::Popup::Closed_revoker m_popupClosedRevoker

Definition at line 36 of file AutoSuggestBoxHelper.h.

winrt::Popup::Opened_revoker m_popupOpenedRevoker

Definition at line 35 of file AutoSuggestBoxHelper.h.

The documentation for this class was generated from the following file:
  • AutoSuggestBox/AutoSuggestBoxHelper.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Awaitable Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes

Awaitable Struct Reference

#include "CppWinRTHelpers.h"

Inherited by AnimatedVisualPlayer::final, and final.

List of all members.

Classes

struct | PTP_WAIT_traits

Public Member Functions

Awaitable ()
bool | await_ready () const noexcept
void | await_resume () const noexcept
void | await_suspend (std::experimental::coroutine_handle<> resume)

Protected Member Functions

void | CompleteAwaits () const noexcept

Static Private Member Functions

static void __stdcall | CoroutineCompletedCallback (PTP_CALLBACK_INSTANCE, void *context, PTP_WAIT, TP_WAIT_RESULT) noexcept

Private Attributes

winrt::handle | m_signal
winrt::handle_type
< PTP_WAIT_traits > 		m_wait

Detailed Description

Definition at line 482 of file CppWinRTHelpers.h.

Constructor & Destructor Documentation

Awaitable ( ) [inline]

Definition at line 484 of file CppWinRTHelpers.h.

    {
        m_signal.attach(::CreateEvent(nullptr, true, false, nullptr));
    }

Member Function Documentation

bool await_ready ( ) const [inline]

Definition at line 491 of file CppWinRTHelpers.h.

    {
        return ::WaitForSingleObject(m_signal.get(), 0) == 0;
    }

void await_resume ( ) const [inline]

Definition at line 509 of file CppWinRTHelpers.h.

{ }

void await_suspend ( std::experimental::coroutine_handle<> resume ) [inline]

Definition at line 497 of file CppWinRTHelpers.h.

    {
        m_wait.attach(
            winrt::check_pointer(
                ::CreateThreadpoolWait(CoroutineCompletedCallback, resume.address(), nullptr)
            )
        );
        ::SetThreadpoolWait(m_wait.get(), m_signal.get(), nullptr);
    }

void CompleteAwaits ( ) const [inline, protected]

Definition at line 512 of file CppWinRTHelpers.h.

    {
        ::SetEvent(m_signal.get());
    }

static void __stdcall CoroutineCompletedCallback | ( | PTP_CALLBACK_INSTANCE | ,
 |  | void * | context,
 |  | PTP_WAIT | ,
 |  | TP_WAIT_RESULT |  |
 | ) |  |  | [inline, static, private]

Definition at line 518 of file CppWinRTHelpers.h.

    {
        // Resumes anyone waiting on the awaitable.
        std::experimental::coroutine_handle<>::from_address(context)();
    }

Member Data Documentation

winrt::handle m_signal [private]

Definition at line 541 of file CppWinRTHelpers.h.

winrt::handle_type<PTP_WAIT_traits> m_wait [private]

Definition at line 542 of file CppWinRTHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Awaitable::PTP_WAIT_traits Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Awaitable
  • Awaitable::PTP_WAIT_traits
Static Public Member Functions

Awaitable::PTP_WAIT_traits Struct Reference

List of all members.

Static Public Member Functions

static void | close (type value) noexcept
static constexpr type | invalid () noexcept

Detailed Description

Definition at line 527 of file CppWinRTHelpers.h.

Member Function Documentation

static void close ( type value ) [inline, static]

Definition at line 531 of file CppWinRTHelpers.h.

        {
            ::CloseThreadpoolWait(value);
        }

static constexpr type invalid ( ) [inline, static]

Definition at line 536 of file CppWinRTHelpers.h.

        {
            return nullptr;
        }

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BindableVector< flags, Helper > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BindableVector< flags, Helper > Class Template Reference

#include "BindableVector.h"

Inherits VectorBase< winrt::IInspectable, Helper::isObservable, true, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >.

List of all members.

Detailed Description

template<int flags = MakeVectorParam<VectorFlag::Bindable, VectorFlag::Observable, VectorFlag::DependencyObjectBase>(), typename Helper = VectorFlagHelper<flags>>
class BindableVector< flags, Helper >

Definition at line 9 of file BindableVector.h.

The documentation for this class was generated from the following file:
  • Collections/BindableVector.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeNode Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Breadcrumb_TestUI
  • TreeNode
Public Member Functions | Properties | Private Attributes

TreeNode Class Reference

List of all members.

Public Member Functions

List< object > | GetBreadCrumbPath ()
override string | ToString ()
void | UpdateParents (TreeNode parent)

Properties

List< object > | Children [get, set]
string | CustomAutomationName [get]
string | Name [get, set]

Private Attributes

TreeNode | Parent = null

Detailed Description

Definition at line 22 of file TreeStructure.cs.

Member Function Documentation

List<object> GetBreadCrumbPath ( ) [inline]

Definition at line 29 of file TreeStructure.cs.

        {
            List<object> path = new List<object>();

            TreeNode currentNode = this;
            while (currentNode != null)
            {
                path.Add(currentNode);
                currentNode = currentNode.Parent;
            }

            path.Reverse();

            return path;
        }

override string ToString ( ) [inline]

Definition at line 54 of file TreeStructure.cs.

        {
            return Name;
        }

void UpdateParents ( TreeNode parent ) [inline]

Definition at line 45 of file TreeStructure.cs.

        {
            Parent = parent;
            foreach (TreeNode node in Children)
            {
                node.UpdateParents(this);
            }
        }

Member Data Documentation

TreeNode Parent = null [private]

Definition at line 24 of file TreeStructure.cs.

Property Documentation

List<object> Children [get, set]

Definition at line 27 of file TreeStructure.cs.

string CustomAutomationName [get]

Definition at line 60 of file TreeStructure.cs.

string Name [get, set]

Definition at line 25 of file TreeStructure.cs.

The documentation for this class was generated from the following file:
  • Breadcrumb/TestUI/TreeStructure.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeStructure Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Breadcrumb_TestUI
  • TreeStructure
Public Member Functions | Public Attributes

TreeStructure Class Reference

List of all members.

Public Member Functions

List< TreeNode > | GetRootAsList ()
void | UpdateParents ()

Public Attributes

TreeNode | Root = null

Detailed Description

Definition at line 7 of file TreeStructure.cs.

Member Function Documentation

List<TreeNode> GetRootAsList ( ) [inline]

Definition at line 11 of file TreeStructure.cs.

        {
            return new List<TreeNode>() { Root };
        }

void UpdateParents ( ) [inline]

Definition at line 16 of file TreeStructure.cs.

        {
            Root.UpdateParents(null);
        }

Member Data Documentation

TreeNode Root = null

Definition at line 9 of file TreeStructure.cs.

The documentation for this class was generated from the following file:
  • Breadcrumb/TestUI/TreeStructure.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

BreadcrumbBar Class Reference

#include "BreadcrumbBar.h"

Inherits ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT >, and BreadcrumbBarProperties.

List of all members.

Public Member Functions

BreadcrumbBar ()
~BreadcrumbBar ()
winrt::IVector
< winrt::IInspectable > 		HiddenElements () const
void | OnApplyTemplate ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RaiseItemClickedEvent (const winrt::IInspectable &content, const uint32_t index)
void | ReIndexVisibleElementsForAccessibility () const
void | RevokeListeners ()

Private Member Functions

void | FocusElementAt (int index)
void | ForceUpdateLastElement ()
winrt::FindNextElementOptions | GetFindNextElementOptions ()
winrt::IVector
< winrt::IInspectable > 		GetHiddenElementsList (uint32_t firstShownElement) const
bool | MoveFocus (int initialIndexIncrement)
bool | MoveFocusNext ()
bool | MoveFocusPrevious ()
void | OnAccessKeyInvoked (const winrt::UIElement &, const winrt::AccessKeyInvokedEventArgs &args)
void | OnBreadcrumbBarItemsRepeaterLoaded (const winrt::IInspectable &, const winrt::RoutedEventArgs &)
void | OnBreadcrumbBarItemsSourceCollectionChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnChildPreviewKeyDown (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | OnElementClearingEvent (const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementClearingEventArgs &)
void | OnElementIndexChangedEvent (const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementIndexChangedEventArgs &)
void | OnElementPreparedEvent (const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementPreparedEventArgs &)
void | OnFlowDirectionChanged (winrt::DependencyObject const &, winrt::DependencyProperty const &)
void | OnGettingFocus (const winrt::IInspectable &, const winrt::GettingFocusEventArgs &args)
void | ResetLastBreadcrumbBarItem ()
void | UpdateBreadcrumbBarItemsFlowDirection ()
void | UpdateEllipsisBreadcrumbBarItemDropDownItemTemplate ()
void | UpdateItemsRepeaterItemsSource ()
void | UpdateItemTemplate ()
void | UpdateLastElement (const winrt::BreadcrumbBarItem &newLastBreadcrumbBarItem)

Detailed Description

Definition at line 16 of file BreadcrumbBar.h.

Constructor & Destructor Documentation

BreadcrumbBar ( )
~BreadcrumbBar ( ) [inline]

Definition at line 23 of file BreadcrumbBar.h.

{}

Member Function Documentation

void FocusElementAt ( int index ) [private]
void ForceUpdateLastElement ( ) [private]
winrt::FindNextElementOptions GetFindNextElementOptions ( ) [private]
winrt::IVector<winrt::IInspectable> GetHiddenElementsList ( uint32_t firstShownElement ) const [private]
winrt::IVector<winrt::IInspectable> HiddenElements ( ) const
bool MoveFocus ( int initialIndexIncrement ) [private]
bool MoveFocusNext ( ) [private]
bool MoveFocusPrevious ( ) [private]
void OnAccessKeyInvoked | ( | const winrt::UIElement & | ,
 |  | const winrt::AccessKeyInvokedEventArgs & | args |
 | ) |  |  | [private]
void OnApplyTemplate ( )
void OnBreadcrumbBarItemsRepeaterLoaded | ( | const winrt::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]
void OnBreadcrumbBarItemsSourceCollectionChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]
void OnChildPreviewKeyDown | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnElementClearingEvent | ( | const winrt::ItemsRepeater & | ,
 |  | const winrt::ItemsRepeaterElementClearingEventArgs & |  |
 | ) |  |  | [private]
void OnElementIndexChangedEvent | ( | const winrt::ItemsRepeater & | ,
 |  | const winrt::ItemsRepeaterElementIndexChangedEventArgs & |  |
 | ) |  |  | [private]
void OnElementPreparedEvent | ( | const winrt::ItemsRepeater & | ,
 |  | const winrt::ItemsRepeaterElementPreparedEventArgs & |  |
 | ) |  |  | [private]
void OnFlowDirectionChanged | ( | winrt::DependencyObject const & | ,
 |  | winrt::DependencyProperty const & |  |
 | ) |  |  | [private]
void OnGettingFocus | ( | const winrt::IInspectable & | ,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void RaiseItemClickedEvent | ( | const winrt::IInspectable & | content,
 |  | const uint32_t | index
 | ) |  |
void ReIndexVisibleElementsForAccessibility ( ) const
void ResetLastBreadcrumbBarItem ( ) [private]
void RevokeListeners ( )
void UpdateBreadcrumbBarItemsFlowDirection ( ) [private]
void UpdateEllipsisBreadcrumbBarItemDropDownItemTemplate ( ) [private]
void UpdateItemsRepeaterItemsSource ( ) [private]
void UpdateItemTemplate ( ) [private]
void UpdateLastElement ( const winrt::BreadcrumbBarItem & newLastBreadcrumbBarItem ) [private]
The documentation for this class was generated from the following file:
  • Breadcrumb/BreadcrumbBar.h
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

BreadcrumbBarItem Class Reference

#include "BreadcrumbBarItem.h"

Inherits ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT >.

List of all members.

Public Member Functions

BreadcrumbBarItem ()
~BreadcrumbBarItem ()
void | CloseFlyout ()
bool | IsEllipsisDropDownItem () const
void | OnApplyTemplate ()
void | OnClickEvent (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnPointerCanceled (winrt::PointerRoutedEventArgs const &args)
void | OnPointerCaptureLost (winrt::PointerRoutedEventArgs const &args)
void | OnPointerEntered (winrt::PointerRoutedEventArgs const &args)
void | OnPointerExited (winrt::PointerRoutedEventArgs const &args)
void | OnPointerMoved (winrt::PointerRoutedEventArgs const &args)
void | OnPointerPressed (winrt::PointerRoutedEventArgs const &args)
void | OnPointerReleased (winrt::PointerRoutedEventArgs const &args)
void | RaiseItemClickedEvent (const winrt::IInspectable &content, const uint32_t index)
void | ResetVisualProperties ()
void | SetEllipsisDropDownItemDataTemplate (const winrt::IInspectable &newDataTemplate)
void | SetEllipsisItem (const winrt::BreadcrumbBarItem &ellipsisItem)
void | SetIndex (const uint32_t index)
void | SetIsEllipsisDropDownItem (bool isEllipsisDropDownItem)
void | SetParentBreadcrumb (const winrt::BreadcrumbBar &parent)
void | SetPropertiesForEllipsisItem ()
void | SetPropertiesForLastItem ()

Private Member Functions

winrt::IInspectable | CloneEllipsisItemSource (const winrt::Collections::IVector< winrt::IInspectable > &ellipsisItemsSource)
void | HookListeners (bool forEllipsisDropDownItem)
bool | IgnorePointerId (const winrt::PointerRoutedEventArgs &args)
void | InstantiateFlyout ()
void | OnBreadcrumbBarItemClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnChildPreviewKeyDown (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | OnEllipsisItemClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnFlowDirectionChanged (winrt::DependencyObject const &, winrt::DependencyProperty const &)
void | OnFlyoutElementIndexChangedEvent (const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementIndexChangedEventArgs &)
void | OnFlyoutElementPreparedEvent (winrt::ItemsRepeater sender, winrt::ItemsRepeaterElementPreparedEventArgs args)
void | OnIsEnabledChanged (const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args)
void | OnLoadedEvent (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnVisualPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OpenFlyout ()
void | ProcessPointerCanceled (const winrt::PointerRoutedEventArgs &args)
void | ProcessPointerOver (const winrt::PointerRoutedEventArgs &args)
void | ResetTrackedPointerId ()
void | RevokeListeners ()
void | RevokePartsListeners ()
void | UpdateButtonCommonVisualState (bool useTransitions)
void | UpdateEllipsisDropDownItemCommonVisualState (bool useTransitions)
void | UpdateFlyoutIndex (const winrt::UIElement &element, const uint32_t index)
void | UpdateInlineItemTypeVisualState (bool useTransitions)
void | UpdateItemTypeVisualState ()

Detailed Description

Definition at line 12 of file BreadcrumbBarItem.h.

Constructor & Destructor Documentation

BreadcrumbBarItem ( )

Definition at line 19 of file BreadcrumbBarItem.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_BreadcrumbBarItem);

    SetDefaultStyleKey(this);
}

~BreadcrumbBarItem ( )

Definition at line 26 of file BreadcrumbBarItem.cpp.

{
    RevokeListeners();
}

Member Function Documentation

winrt::IInspectable CloneEllipsisItemSource ( const winrt::Collections::IVector< winrt::IInspectable > & ellipsisItemsSource ) [private]

Definition at line 279 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    // A copy of the hidden elements array in BreadcrumbLayout is created
    // to avoid getting a Layout cycle exception
    auto newItemsSource = winrt::make<Vector<winrt::IInspectable>>();

    // The new list contains all the elements in reverse order
    const int itemsSourceSize = ellipsisItemsSource.Size();
    if(itemsSourceSize > 0)
    {
        for (int i = itemsSourceSize - 1; i >= 0; --i)
        {
            const auto& item = ellipsisItemsSource.GetAt(i);
            newItemsSource.Append(item);
        }
    }

    return newItemsSource;
}

void CloseFlyout ( )

Definition at line 312 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    if (auto flyout = m_ellipsisFlyout.get())
    {
        flyout.Hide();
    }
}

void HookListeners ( bool forEllipsisDropDownItem ) [private]

Definition at line 31 of file BreadcrumbBarItem.cpp.

{
    if (!m_childPreviewKeyDownToken.value)
    {
        m_childPreviewKeyDownToken = PreviewKeyDown({ this, &BreadcrumbBarItem::OnChildPreviewKeyDown });
    }

    if (forEllipsisDropDownItem)
    {
        if (!m_isEnabledChangedRevoker)
        {
            m_isEnabledChangedRevoker = IsEnabledChanged(winrt::auto_revoke, { this,  &BreadcrumbBarItem::OnIsEnabledChanged });
        }
    }
    else if (!m_flowDirectionChangedToken.value)
    {
        m_flowDirectionChangedToken.value = RegisterPropertyChangedCallback(winrt::FrameworkElement::FlowDirectionProperty(), { this, &BreadcrumbBarItem::OnFlowDirectionChanged });
    }
}

bool IgnorePointerId ( const winrt::PointerRoutedEventArgs & args ) [private]

Definition at line 695 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(m_isEllipsisDropDownItem);

    uint32_t pointerId = args.Pointer().PointerId();

    if (m_trackedPointerId == 0)
    {
        m_trackedPointerId = pointerId;
    }
    else if (m_trackedPointerId != pointerId)
    {
        return true;
    }
    return false;
}

void InstantiateFlyout ( ) [private]

Definition at line 489 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    // Only if the element has been created visually, instantiate the flyout
    if (const auto& button = m_button.get())
    {
        if (const auto& ellipsisFlyout = m_ellipsisFlyout.get())
        {
            // Create ItemsRepeater and set the DataTemplate
            const auto& ellipsisItemsRepeater = winrt::ItemsRepeater();
            ellipsisItemsRepeater.Name(s_ellipsisItemsRepeaterPartName);
            winrt::AutomationProperties::SetName(ellipsisItemsRepeater, s_ellipsisItemsRepeaterAutomationName);
            ellipsisItemsRepeater.HorizontalAlignment(winrt::HorizontalAlignment::Stretch);

            ellipsisItemsRepeater.Layout(winrt::StackLayout());

            m_ellipsisElementFactory = winrt::make_self<BreadcrumbElementFactory>();
            ellipsisItemsRepeater.ItemTemplate(*m_ellipsisElementFactory);

            if (const auto& dataTemplate = m_ellipsisDropDownItemDataTemplate.get())
            {
                m_ellipsisElementFactory->UserElementFactory(dataTemplate);
            }

            m_ellipsisRepeaterElementPreparedRevoker = ellipsisItemsRepeater.ElementPrepared(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnFlyoutElementPreparedEvent });
            m_ellipsisRepeaterElementIndexChangedRevoker = ellipsisItemsRepeater.ElementIndexChanged(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnFlyoutElementIndexChangedEvent });

            m_ellipsisItemsRepeater.set(ellipsisItemsRepeater);

            // Set the repeater as the content.
            winrt::AutomationProperties::SetName(ellipsisFlyout, s_ellipsisFlyoutAutomationName);
            ellipsisFlyout.Content(ellipsisItemsRepeater);
            ellipsisFlyout.Placement(winrt::FlyoutPlacementMode::Bottom);

            m_ellipsisFlyout.set(ellipsisFlyout);
        }
    }
}

bool IsEllipsisDropDownItem ( ) const [inline]

Definition at line 28 of file BreadcrumbBarItem.h.

    {
        return m_isEllipsisDropDownItem;
    }

void OnApplyTemplate ( )

Definition at line 79 of file BreadcrumbBarItem.cpp.

{
    __super::OnApplyTemplate();

    if (m_isEllipsisDropDownItem)
    {
        UpdateEllipsisDropDownItemCommonVisualState(false /*useTransitions*/);
    }
    else
    {
        RevokePartsListeners();
        winrt::IControlProtected controlProtected{ *this };

        if (m_isEllipsisItem)
        {
            m_ellipsisFlyout.set(GetTemplateChildT<winrt::Flyout>(s_itemEllipsisFlyoutPartName, controlProtected));
        }

        m_button.set(GetTemplateChildT<winrt::Button>(s_itemButtonPartName, controlProtected));

        if (const auto& button = m_button.get())
        {
            m_buttonLoadedRevoker = button.Loaded(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnLoadedEvent });

            m_isPressedButtonRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPressedProperty(), { this, &BreadcrumbBarItem::OnVisualPropertyChanged });
            m_isPointerOverButtonRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPointerOverProperty(), { this, &BreadcrumbBarItem::OnVisualPropertyChanged });
            m_isEnabledButtonRevoker = RegisterPropertyChanged(button, winrt::Control::IsEnabledProperty(), { this, &BreadcrumbBarItem::OnVisualPropertyChanged });
        }

        UpdateButtonCommonVisualState(false /*useTransitions*/);
        UpdateInlineItemTypeVisualState(false /*useTransitions*/);
    }

    UpdateItemTypeVisualState();
}

void OnBreadcrumbBarItemClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 190 of file BreadcrumbBarItem.cpp.

{
    RaiseItemClickedEvent(Content(), m_index - 1);
}

void OnChildPreviewKeyDown | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 224 of file BreadcrumbBarItem.cpp.

{
    if (m_isEllipsisDropDownItem)
    {
        if (args.Key() == winrt::VirtualKey::Enter || args.Key() == winrt::VirtualKey::Space)
        {
            this->OnClickEvent(sender, nullptr);
            args.Handled(true);
        }
    }
    else if (args.Key() == winrt::VirtualKey::Enter || args.Key() == winrt::VirtualKey::Space)
    {
        if (m_isEllipsisItem)
        {
            OnEllipsisItemClick(nullptr, nullptr);
        }
        else
        {
            OnBreadcrumbBarItemClick(nullptr, nullptr);
        }
        args.Handled(true);
    }
}

void OnClickEvent | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args
 | ) |  |

Definition at line 712 of file BreadcrumbBarItem.cpp.

{
    if (m_isEllipsisDropDownItem)
    {
        if (const auto& ellipsisItem = m_ellipsisItem.get())
        {
            // Once an element has been clicked, close the flyout
            if (const auto& ellipsisItemImpl = winrt::get_self<BreadcrumbBarItem>(ellipsisItem))
            {
                ellipsisItemImpl->CloseFlyout();
                ellipsisItemImpl->RaiseItemClickedEvent(Content(), m_index - 1);
            }
        }
    }
    else if (m_isEllipsisItem)
    {
        OnEllipsisItemClick(nullptr, nullptr);
    }
    else
    {
        OnBreadcrumbBarItemClick(nullptr, nullptr);
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 549 of file BreadcrumbBarItem.cpp.

{
    return winrt::make<BreadcrumbBarItemAutomationPeer>(*this);
}

void OnEllipsisItemClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 429 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    if (const auto& breadcrumb = m_parentBreadcrumb.get())
    {
        if (const auto& breadcrumbImpl = breadcrumb.try_as<BreadcrumbBar>())
        {
            const auto& hiddenElements = CloneEllipsisItemSource(breadcrumbImpl->HiddenElements());

            if (const auto& dataTemplate = m_ellipsisDropDownItemDataTemplate.get())
            {
                m_ellipsisElementFactory->UserElementFactory(dataTemplate);
            }

            if (const auto& flyoutRepeater = m_ellipsisItemsRepeater.get())
            {
                flyoutRepeater.ItemsSource(hiddenElements);
            }

            OpenFlyout();
        }
    }
}

void OnFlowDirectionChanged | ( | winrt::DependencyObject const & | ,
 |  | winrt::DependencyProperty const & |  |
 | ) |  |  | [private]

Definition at line 217 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    UpdateInlineItemTypeVisualState(true /*useTransitions*/);
}

void OnFlyoutElementIndexChangedEvent | ( | const winrt::ItemsRepeater & | ,
 |  | const winrt::ItemsRepeaterElementIndexChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 210 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    UpdateFlyoutIndex(args.Element(), args.NewIndex());
}

void OnFlyoutElementPreparedEvent | ( | winrt::ItemsRepeater | sender,
 |  | winrt::ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [private]

Definition at line 195 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    if (const auto& ellipsisDropDownItem = args.Element().try_as<winrt::BreadcrumbBarItem>())
    {
        if (const auto& ellipsisDropDownItemImpl = winrt::get_self<BreadcrumbBarItem>(ellipsisDropDownItem))
        {
            ellipsisDropDownItemImpl->SetIsEllipsisDropDownItem(true /*isEllipsisDropDownItem*/);
        }
    }

    UpdateFlyoutIndex(args.Element(), args.Index());
}

void OnIsEnabledChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 248 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(m_isEllipsisDropDownItem);

    UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
}

void OnLoadedEvent | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 115 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    m_buttonLoadedRevoker.revoke();

    if (auto button = m_button.get())
    {
        m_buttonClickRevoker.revoke();
        if (m_isEllipsisItem)
        {
            m_buttonClickRevoker = button.Click(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnEllipsisItemClick });
        }
        else
        {
            m_buttonClickRevoker = button.Click(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnBreadcrumbBarItemClick });
        }
    }

    if (m_isEllipsisItem)
    {
        SetPropertiesForEllipsisItem();
    }
    else if (m_isLastItem)
    {
        SetPropertiesForLastItem();
    }
    else
    {
        ResetVisualProperties();
    }
}

void OnPointerCanceled ( winrt::PointerRoutedEventArgs const & args )

Definition at line 634 of file BreadcrumbBarItem.cpp.

{
    __super::OnPointerCanceled(args);

    if (m_isEllipsisDropDownItem)
    {
        ProcessPointerCanceled(args);
    }
}

void OnPointerCaptureLost ( winrt::PointerRoutedEventArgs const & args )

Definition at line 644 of file BreadcrumbBarItem.cpp.

{
    __super::OnPointerCaptureLost(args);

    if (m_isEllipsisDropDownItem)
    {
        ProcessPointerCanceled(args);
    }
}

void OnPointerEntered ( winrt::PointerRoutedEventArgs const & args )

Definition at line 554 of file BreadcrumbBarItem.cpp.

{
    __super::OnPointerEntered(args);

    if (m_isEllipsisDropDownItem)
    {
        ProcessPointerOver(args);
    }
}

void OnPointerExited ( winrt::PointerRoutedEventArgs const & args )

Definition at line 574 of file BreadcrumbBarItem.cpp.

{
    __super::OnPointerExited(args);

    if (m_isEllipsisDropDownItem)
    {
        ProcessPointerCanceled(args);
    }
}

void OnPointerMoved ( winrt::PointerRoutedEventArgs const & args )

Definition at line 564 of file BreadcrumbBarItem.cpp.

{
    __super::OnPointerMoved(args);

    if (m_isEllipsisDropDownItem)
    {
        ProcessPointerOver(args);
    }
}

void OnPointerPressed ( winrt::PointerRoutedEventArgs const & args )

Definition at line 584 of file BreadcrumbBarItem.cpp.

{
    __super::OnPointerPressed(args);

    if (m_isEllipsisDropDownItem)
    {
        if (IgnorePointerId(args))
        {
            return;
        }

        MUX_ASSERT(!m_isPressed);

        if (args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Mouse)
        {
            auto pointerProperties = args.GetCurrentPoint(*this).Properties();
            m_isPressed = pointerProperties.IsLeftButtonPressed();
        }
        else
        {
            m_isPressed = true;
        }

        if (m_isPressed)
        {
            UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
        }
    }
}

void OnPointerReleased ( winrt::PointerRoutedEventArgs const & args )

Definition at line 614 of file BreadcrumbBarItem.cpp.

{
    __super::OnPointerReleased(args);

    if (m_isEllipsisDropDownItem)
    {
        if (IgnorePointerId(args))
        {
            return;
        }

        if (m_isPressed)
        {
            m_isPressed = false;
            UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
            OnClickEvent(nullptr, nullptr);
        }
    }
}

void OnVisualPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |  |
 | ) |  |  | [private]

Definition at line 322 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    UpdateButtonCommonVisualState(true /*useTransitions*/);
}

void OpenFlyout ( ) [private]

Definition at line 301 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    if (auto flyout = m_ellipsisFlyout.get())
    {
        winrt::FlyoutShowOptions options{};
        flyout.ShowAt(*this, options);
    }
}

void ProcessPointerCanceled ( const winrt::PointerRoutedEventArgs & args ) [private]

Definition at line 670 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(m_isEllipsisDropDownItem);

    if (IgnorePointerId(args))
    {
        return;
    }

    m_isPressed = false;
    m_isPointerOver = false;
    ResetTrackedPointerId();
    UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
}

void ProcessPointerOver ( const winrt::PointerRoutedEventArgs & args ) [private]

Definition at line 654 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(m_isEllipsisDropDownItem);

    if (IgnorePointerId(args))
    {
        return;
    }

    if (!m_isPointerOver)
    {
        m_isPointerOver = true;
        UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
    }
}

void RaiseItemClickedEvent | ( | const winrt::IInspectable & | content,
 |  | const uint32_t | index
 | ) |  |

Definition at line 181 of file BreadcrumbBarItem.cpp.

{
    if (const auto& breadcrumb = m_parentBreadcrumb.get())
    {
        auto breadcrumbImpl = winrt::get_self<BreadcrumbBar>(breadcrumb);
        breadcrumbImpl->RaiseItemClickedEvent(content, index);
    }
}

void ResetTrackedPointerId ( ) [private]

Definition at line 685 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(m_isEllipsisDropDownItem);

    m_trackedPointerId = 0;
}

void ResetVisualProperties ( )

Definition at line 465 of file BreadcrumbBarItem.cpp.

{
    if (m_isEllipsisDropDownItem)
    {
        UpdateEllipsisDropDownItemCommonVisualState(false /*useTransitions*/);
    }
    else
    {
        m_isEllipsisItem = false;
        m_isLastItem = false;

        if (const auto& button = m_button.get())
        {
            button.Flyout(nullptr);
        }
        m_ellipsisFlyout.set(nullptr);
        m_ellipsisItemsRepeater.set(nullptr);
        m_ellipsisElementFactory = nullptr;

        UpdateButtonCommonVisualState(false /*useTransitions*/);
        UpdateInlineItemTypeVisualState(false /*useTransitions*/);
    }
}

void RevokeListeners ( ) [private]

Definition at line 51 of file BreadcrumbBarItem.cpp.

{
    if (m_flowDirectionChangedToken.value)
    {
        UnregisterPropertyChangedCallback(winrt::FrameworkElement::FlowDirectionProperty(), m_flowDirectionChangedToken.value);
        m_flowDirectionChangedToken.value = 0;
    }

    if (m_childPreviewKeyDownToken.value)
    {
        PreviewKeyDown(m_childPreviewKeyDownToken);
        m_childPreviewKeyDownToken.value = 0;
    }

    m_keyDownRevoker.revoke();
}

void RevokePartsListeners ( ) [private]

Definition at line 68 of file BreadcrumbBarItem.cpp.

{
    m_buttonLoadedRevoker.revoke();
    m_buttonClickRevoker.revoke();
    m_ellipsisRepeaterElementPreparedRevoker.revoke();
    m_ellipsisRepeaterElementIndexChangedRevoker.revoke();
    m_isPressedButtonRevoker.revoke();
    m_isPointerOverButtonRevoker.revoke();
    m_isEnabledButtonRevoker.revoke();
}

void SetEllipsisDropDownItemDataTemplate ( const winrt::IInspectable & newDataTemplate )

Definition at line 155 of file BreadcrumbBarItem.cpp.

{
    if (auto const& dataTemplate = newDataTemplate.try_as<winrt::IElementFactory>())
    {
        m_ellipsisDropDownItemDataTemplate.set(dataTemplate);
    }
    else if (!newDataTemplate)
    {
        m_ellipsisDropDownItemDataTemplate.set(nullptr);
    }
}

void SetEllipsisItem ( const winrt::BreadcrumbBarItem & ellipsisItem )

Definition at line 542 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(m_isEllipsisDropDownItem);

    m_ellipsisItem.set(ellipsisItem);
}

void SetIndex ( const uint32_t index )

Definition at line 167 of file BreadcrumbBarItem.cpp.

{
    m_index = index;
}

void SetIsEllipsisDropDownItem ( bool isEllipsisDropDownItem )

Definition at line 172 of file BreadcrumbBarItem.cpp.

{
    m_isEllipsisDropDownItem = isEllipsisDropDownItem;

    HookListeners(m_isEllipsisDropDownItem);

    UpdateItemTypeVisualState();
}

void SetParentBreadcrumb ( const winrt::BreadcrumbBar & parent )

Definition at line 148 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    m_parentBreadcrumb = winrt::make_weak(parent);
}

void SetPropertiesForEllipsisItem ( )

Definition at line 529 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    m_isEllipsisItem = true;
    m_isLastItem = false;

    InstantiateFlyout();

    UpdateButtonCommonVisualState(false /*useTransitions*/);
    UpdateInlineItemTypeVisualState(false /*useTransitions*/);
}

void SetPropertiesForLastItem ( )

Definition at line 454 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    m_isEllipsisItem = false;
    m_isLastItem = true;

    UpdateButtonCommonVisualState(false /*useTransitions*/);
    UpdateInlineItemTypeVisualState(false /*useTransitions*/);
}

void UpdateButtonCommonVisualState ( bool useTransitions ) [private]

Definition at line 394 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    if (const auto& button = m_button.get())
    {
        hstring commonVisualStateName = L"";

        // If is last item: place Current as prefix for visual state
        if (m_isLastItem)
        {
            commonVisualStateName = s_currentStateName;
        }

        if (!button.IsEnabled())
        {
            commonVisualStateName = commonVisualStateName + s_disabledStateName;
        }
        else if (button.IsPressed())
        {
            commonVisualStateName = commonVisualStateName + s_pressedStateName;
        }
        else if (button.IsPointerOver())
        {
            commonVisualStateName = commonVisualStateName + s_pointerOverStateName;
        }
        else
        {
            commonVisualStateName = commonVisualStateName + s_normalStateName;
        }

        winrt::VisualStateManager::GoToState(button, commonVisualStateName, useTransitions);
    }
}

void UpdateEllipsisDropDownItemCommonVisualState ( bool useTransitions ) [private]

Definition at line 334 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(m_isEllipsisDropDownItem);

    hstring commonVisualStateName;

    if (!IsEnabled())
    {
        commonVisualStateName = s_disabledStateName;
    }
    else if (m_isPressed)
    {
        commonVisualStateName = s_pressedStateName;
    }
    else if (m_isPointerOver)
    {
        commonVisualStateName = s_pointerOverStateName;
    }
    else
    {
        commonVisualStateName = s_normalStateName;
    }

    winrt::VisualStateManager::GoToState(*this, commonVisualStateName, useTransitions);
}

void UpdateFlyoutIndex | ( | const winrt::UIElement & | element,
 |  | const uint32_t | index |
 | ) |  |  | [private]

Definition at line 257 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    if (auto const& ellipsisItemsRepeater = m_ellipsisItemsRepeater.get())
    {
        if (auto const& itemSourceView = ellipsisItemsRepeater.ItemsSourceView())
        {
            const uint32_t itemCount = itemSourceView.Count();

            if (const auto& ellipsisDropDownItemImpl = element.try_as<BreadcrumbBarItem>())
            {
                ellipsisDropDownItemImpl->SetEllipsisItem(*this);
                ellipsisDropDownItemImpl->SetIndex(itemCount - index);
            }

            element.SetValue(winrt::AutomationProperties::PositionInSetProperty(), box_value(index + 1));
            element.SetValue(winrt::AutomationProperties::SizeOfSetProperty(), box_value(itemCount));
        }
    }
}

void UpdateInlineItemTypeVisualState ( bool useTransitions ) [private]

Definition at line 360 of file BreadcrumbBarItem.cpp.

{
    MUX_ASSERT(!m_isEllipsisDropDownItem);

    const bool isLeftToRight = (FlowDirection() == winrt::FlowDirection::LeftToRight);
    hstring visualStateName;

    if (m_isEllipsisItem)
    {
        if (isLeftToRight)
        {
            visualStateName = s_ellipsisStateName;
        }
        else
        {
            visualStateName = s_ellipsisRTLStateName;
        }
    }
    else if (m_isLastItem)
    {
        visualStateName = s_lastItemStateName;
    }
    else if (isLeftToRight)
    {
        visualStateName = s_defaultStateName;
    }
    else
    {
        visualStateName = s_defaultRTLStateName;
    }

    winrt::VisualStateManager::GoToState(*this, visualStateName, useTransitions);
}

void UpdateItemTypeVisualState ( ) [private]

Definition at line 329 of file BreadcrumbBarItem.cpp.

{
    winrt::VisualStateManager::GoToState(*this, m_isEllipsisDropDownItem ? s_ellipsisDropDownStateName : s_inlineStateName, false /*useTransitions*/);
}

The documentation for this class was generated from the following files:
  • Breadcrumb/BreadcrumbBarItem.h
  • Breadcrumb/BreadcrumbBarItem.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

BreadcrumbBarItemAutomationPeer Class Reference

#include "BreadcrumbBarItemAutomationPeer.h"

Inherits ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT >.

List of all members.

Public Member Functions

BreadcrumbBarItemAutomationPeer (winrt::BreadcrumbBarItem const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
hstring | GetLocalizedControlTypeCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
void | Invoke ()

Private Member Functions

com_ptr< BreadcrumbBarItem > | GetImpl ()

Detailed Description

Definition at line 9 of file BreadcrumbBarItemAutomationPeer.h.

Constructor & Destructor Documentation

BreadcrumbBarItemAutomationPeer ( winrt::BreadcrumbBarItem const & owner )

Definition at line 11 of file BreadcrumbBarItemAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 37 of file BreadcrumbBarItemAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Button;
}

hstring GetClassNameCore ( )

Definition at line 32 of file BreadcrumbBarItemAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::BreadcrumbBarItem>();
}

com_ptr< BreadcrumbBarItem > GetImpl ( ) [private]

Definition at line 42 of file BreadcrumbBarItemAutomationPeer.cpp.

{
    com_ptr<BreadcrumbBarItem> impl = nullptr;

    if (auto breadcrumbItem = Owner().try_as<winrt::BreadcrumbBarItem>())
    {
        impl = winrt::get_self<BreadcrumbBarItem>(breadcrumbItem)->get_strong();
    }

    return impl;
}

hstring GetLocalizedControlTypeCore ( )

Definition at line 17 of file BreadcrumbBarItemAutomationPeer.cpp.

{
    return ResourceAccessor::GetLocalizedStringResource(SR_BreadcrumbBarItemLocalizedControlType);
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 22 of file BreadcrumbBarItemAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Invoke)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

void Invoke ( )

Definition at line 55 of file BreadcrumbBarItemAutomationPeer.cpp.

{
    if (auto breadcrumbItem = GetImpl())
    {
        breadcrumbItem->OnClickEvent(nullptr, nullptr);
    }
}

The documentation for this class was generated from the following files:
  • Breadcrumb/BreadcrumbBarItemAutomationPeer.h
  • Breadcrumb/BreadcrumbBarItemAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarItemClickedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

BreadcrumbBarItemClickedEventArgs Class Reference

#include "BreadcrumbBarItemClickedEventArgs.h"

List of all members.

Public Member Functions

int | Index ()
void | Index (const int &index)
winrt::IInspectable | Item ()
void | Item (const winrt::IInspectable &item)

Detailed Description

Definition at line 8 of file BreadcrumbBarItemClickedEventArgs.h.

Member Function Documentation

int Index ( )

Definition at line 18 of file BreadcrumbBarItemClickedEventArgs.cpp.

{
    return m_index;
}

void Index ( const int & index )

Definition at line 23 of file BreadcrumbBarItemClickedEventArgs.cpp.

{
    m_index = index;
}

winrt::IInspectable Item ( )

Definition at line 8 of file BreadcrumbBarItemClickedEventArgs.cpp.

{
    return m_item;
}

void Item ( const winrt::IInspectable & item )

Definition at line 13 of file BreadcrumbBarItemClickedEventArgs.cpp.

{
    m_item = item;
}

The documentation for this class was generated from the following files:
  • Breadcrumb/BreadcrumbBarItemClickedEventArgs.h
  • Breadcrumb/BreadcrumbBarItemClickedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

BreadcrumbBarProperties Class Reference

#include "BreadcrumbBar.properties.h"

Inherited by BreadcrumbBar.

List of all members.

Public Member Functions

BreadcrumbBarProperties ()
void | ItemClicked (winrt::event_token const &token)
winrt::event_token | ItemClicked (winrt::TypedEventHandler< winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs > const &value)
void | ItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | ItemsSource ()
void | ItemTemplate (winrt::IInspectable const &value)
winrt::IInspectable | ItemTemplate ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ItemsSourceProperty ()
static winrt::DependencyProperty | ItemTemplateProperty ()
static void | OnItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::BreadcrumbBar,
winrt::BreadcrumbBarItemClickedEventArgs > > 		m_itemClickedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ItemsSourceProperty
static GlobalDependencyProperty | s_ItemTemplateProperty

Detailed Description

Definition at line 7 of file BreadcrumbBar.properties.h.

Constructor & Destructor Documentation

BreadcrumbBarProperties ( )

Definition at line 19 of file BreadcrumbBar.properties.cpp.

    : m_itemClickedEventSource{static_cast<BreadcrumbBar*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
void ItemClicked ( winrt::event_token const & token )
winrt::event_token ItemClicked ( winrt::TypedEventHandler< winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs > const & value )
winrt::IInspectable ItemsSource ( )
void ItemsSource ( winrt::IInspectable const & value )
static winrt::DependencyProperty ItemsSourceProperty ( ) [inline, static]

Definition at line 18 of file BreadcrumbBar.properties.h.

{ return s_ItemsSourceProperty; }

winrt::IInspectable ItemTemplate ( )
void ItemTemplate ( winrt::IInspectable const & value )
static winrt::DependencyProperty ItemTemplateProperty ( ) [inline, static]

Definition at line 19 of file BreadcrumbBar.properties.h.

{ return s_ItemTemplateProperty; }

static void OnItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs> > m_itemClickedEventSource

Definition at line 27 of file BreadcrumbBar.properties.h.

GlobalDependencyProperty s_ItemsSourceProperty [static]

Definition at line 21 of file BreadcrumbBar.properties.h.

GlobalDependencyProperty s_ItemTemplateProperty [static]

Definition at line 22 of file BreadcrumbBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/BreadcrumbBar.properties.h
  • Generated/BreadcrumbBar.properties.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

BreadcrumbElementFactory Class Reference

#include "BreadcrumbBarElementFactory.h"

List of all members.

Public Member Functions

BreadcrumbElementFactory ()
winrt::UIElement | GetElementCore (const winrt::ElementFactoryGetArgs &args) override
void | RecycleElementCore (const winrt::ElementFactoryRecycleArgs &args) override
void | UserElementFactory (const winrt::IInspectable &newValue)

Detailed Description

Definition at line 8 of file BreadcrumbBarElementFactory.h.

Constructor & Destructor Documentation

BreadcrumbElementFactory ( )

Definition at line 10 of file BreadcrumbBarElementFactory.cpp.

{
}

Member Function Documentation

winrt::UIElement GetElementCore ( const winrt::ElementFactoryGetArgs & args ) [override]

Definition at line 30 of file BreadcrumbBarElementFactory.cpp.

{
    auto const newContent = [itemTemplateWrapper = m_itemTemplateWrapper, args]()
    {
        if (args.Data().try_as<winrt::BreadcrumbBarItem>())
        {
            return args.Data();
        }

        if (itemTemplateWrapper)
        {
            return itemTemplateWrapper.GetElement(args).as<winrt::IInspectable>();
        }
        return args.Data();
    }();

    // Element is already a BreadcrumbBarItem, so we just return it.
    if (auto const breadcrumbItem = newContent.try_as<winrt::BreadcrumbBarItem>())
    {
        // When the list has not changed the returned item is still a BreadcrumbBarItem but the
        // item is not reset, so we set the content here
        breadcrumbItem.Content(args.Data());
        return breadcrumbItem;
    }

    auto const newBreadcrumbBarItem = winrt::BreadcrumbBarItem{};
    newBreadcrumbBarItem.Content(args.Data());

    // If a user provided item template exists, we pass the template down
    // to the ContentPresenter of the BreadcrumbBarItem.
    if (auto const itemTemplateWrapper = m_itemTemplateWrapper.try_as<ItemTemplateWrapper>())
    {
        newBreadcrumbBarItem.ContentTemplate(itemTemplateWrapper->Template());
    }

    return newBreadcrumbBarItem;
}

void RecycleElementCore ( const winrt::ElementFactoryRecycleArgs & args ) [override]

Definition at line 68 of file BreadcrumbBarElementFactory.cpp.

{
    if (auto element = args.Element())
    {
        bool isEllipsisDropDownItem = false; // Use of isEllipsisDropDownItem is workaround for
        // crashing bug when attempting to show ellipsis dropdown after clicking one of its items.

        if (auto breadcrumbItem = element.try_as<winrt::BreadcrumbBarItem>())
        {
            auto breadcrumbItemImpl = winrt::get_self<BreadcrumbBarItem>(breadcrumbItem);
            breadcrumbItemImpl->ResetVisualProperties();

            isEllipsisDropDownItem = breadcrumbItemImpl->IsEllipsisDropDownItem();
        }

        if (m_itemTemplateWrapper && isEllipsisDropDownItem)
        {
            m_itemTemplateWrapper.RecycleElement(args);
        }
    }
}

void UserElementFactory ( const winrt::IInspectable & newValue )

Definition at line 14 of file BreadcrumbBarElementFactory.cpp.

{
    if (auto dataTemplate = newValue.try_as<winrt::DataTemplate>())
    {
        m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(dataTemplate);
    }
    else if (auto selector = newValue.try_as<winrt::DataTemplateSelector>())
    {
        m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(selector);
    }
    else if (auto customElementFactory = newValue.try_as<winrt::IElementFactory>())
    {
        m_itemTemplateWrapper = customElementFactory;
    }
}

The documentation for this class was generated from the following files:
  • Breadcrumb/BreadcrumbBarElementFactory.h
  • Breadcrumb/BreadcrumbBarElementFactory.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbIterable Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

BreadcrumbIterable Class Reference

#include "BreadcrumbIterable.h"

Inherits ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type >.

List of all members.

Public Member Functions

BreadcrumbIterable ()
BreadcrumbIterable (const winrt::IInspectable &itemsSource)
winrt::IIterator
< winrt::IInspectable > 		First ()
void ItemsSource (const winrt::IInspectable &itemsSource)

Detailed Description

Definition at line 10 of file BreadcrumbIterable.h.

Constructor & Destructor Documentation

BreadcrumbIterable ( )

Definition at line 9 of file BreadcrumbIterable.cpp.

{
}

BreadcrumbIterable ( const winrt::IInspectable & itemsSource )

Definition at line 13 of file BreadcrumbIterable.cpp.

{
    ItemsSource(itemsSource);
}

Member Function Documentation

winrt::IIterator< winrt::IInspectable > First ( )

Definition at line 23 of file BreadcrumbIterable.cpp.

{
    return winrt::make<BreadcrumbIterator>(m_itemsSource.get());
}

void ItemsSource ( const winrt::IInspectable & itemsSource )

Definition at line 18 of file BreadcrumbIterable.cpp.

{
    m_itemsSource.set(itemsSource);
}

The documentation for this class was generated from the following files:
  • Breadcrumb/BreadcrumbIterable.h
  • Breadcrumb/BreadcrumbIterable.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbIterator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

BreadcrumbIterator Class Reference

#include "BreadcrumbIterator.h"

List of all members.

Public Member Functions

BreadcrumbIterator (const winrt::IInspectable &itemsSource)
winrt::IInspectable | Current ()
uint32_t | GetMany (winrt::array_view< winrt::IInspectable > items)
bool | HasCurrent ()
bool | MoveNext ()

Detailed Description

Definition at line 11 of file BreadcrumbIterator.h.

Constructor & Destructor Documentation

BreadcrumbIterator ( const winrt::IInspectable & itemsSource )

Definition at line 8 of file BreadcrumbIterator.cpp.

{
    m_currentIndex = 0;

    if (itemsSource)
    {
        m_breadcrumbItemsSourceView = winrt::ItemsSourceView(itemsSource);

        // Add 1 to account for the leading null/ellipsis element
        m_size = static_cast<uint32_t>(m_breadcrumbItemsSourceView.Count() + 1);
    }
    else
    {
        m_size = 1;
    }
}

Member Function Documentation

winrt::IInspectable Current ( )

Definition at line 25 of file BreadcrumbIterator.cpp.

{
    if (m_currentIndex == 0)
    {
        return nullptr;
    }
    else if (HasCurrent())
    {
        return m_breadcrumbItemsSourceView.GetAt(m_currentIndex - 1);
    }
    else
    {
        throw winrt::hresult_out_of_bounds();
    }
}

uint32_t GetMany ( winrt::array_view< winrt::IInspectable > items )

Definition at line 46 of file BreadcrumbIterator.cpp.

{
    uint32_t howMany{};
    if (HasCurrent())
    {
        do
        {
            if (howMany >= items.size()) break;

            items[howMany] = Current();
            howMany++;
        } while (MoveNext());
    }

    return howMany;
}

bool HasCurrent ( )

Definition at line 41 of file BreadcrumbIterator.cpp.

{
    return (m_currentIndex < m_size);
}

bool MoveNext ( )

Definition at line 63 of file BreadcrumbIterator.cpp.

{
    if (HasCurrent())
    {
        ++m_currentIndex;
        return HasCurrent();
    }
    else
    {
        throw winrt::hresult_out_of_bounds();
    }

    return false;
}

The documentation for this class was generated from the following files:
  • Breadcrumb/BreadcrumbIterator.h
  • Breadcrumb/BreadcrumbIterator.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

BreadcrumbLayout Class Reference

#include "BreadcrumbLayout.h"

List of all members.

Public Member Functions

BreadcrumbLayout ()
BreadcrumbLayout (const winrt::BreadcrumbBar &breadcrumb)
~BreadcrumbLayout ()
winrt::Size | ArrangeOverride (winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &finalSize)
bool | EllipsisIsRendered ()
uint32_t | FirstRenderedItemIndexAfterEllipsis ()
uint32_t | GetVisibleItemsCount ()
winrt::Size | MeasureOverride (winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &availableSize)

Private Member Functions

void | ArrangeItem (const winrt::UIElement &breadcrumbItem, float &accumulatedWidths, float maxElementHeight)
void | ArrangeItem (const winrt::NonVirtualizingLayoutContext &context, int index, float &accumulatedWidths, float maxElementHeight)
float | GetBreadcrumbBarItemsHeight (winrt::NonVirtualizingLayoutContext const &context, int firstItemToRender)
winrt::UIElement | GetElementAt (winrt::NonVirtualizingLayoutContext const &context, uint32_t index)
int | GetFirstBreadcrumbBarItemToArrange (winrt::NonVirtualizingLayoutContext const &context)
uint32_t | GetItemCount (winrt::NonVirtualizingLayoutContext const &context)
void | HideItem (const winrt::NonVirtualizingLayoutContext &context, int index)
void | HideItem (const winrt::UIElement &breadcrumbItem)

Detailed Description

Definition at line 11 of file BreadcrumbLayout.h.

Constructor & Destructor Documentation

BreadcrumbLayout ( )

Definition at line 10 of file BreadcrumbLayout.cpp.

{
}

BreadcrumbLayout ( const winrt::BreadcrumbBar & breadcrumb )

Definition at line 14 of file BreadcrumbLayout.cpp.

{
    m_breadcrumb = winrt::make_weak(breadcrumb);
}

~BreadcrumbLayout ( )

Definition at line 19 of file BreadcrumbLayout.cpp.

{
}

Member Function Documentation

void ArrangeItem | ( | const winrt::UIElement & | breadcrumbItem,
 |  | float & | accumulatedWidths,
 |  | float | maxElementHeight |
 | ) |  |  | [private]

Definition at line 74 of file BreadcrumbLayout.cpp.

{
    const winrt::Size elementSize = breadcrumbItem.DesiredSize();
    const winrt::Rect arrangeRect(accumulatedWidths, 0, elementSize.Width, maxElementHeight);
    breadcrumbItem.Arrange(arrangeRect);

    accumulatedWidths += elementSize.Width;
}

void ArrangeItem | ( | const winrt::NonVirtualizingLayoutContext & | context,
 |  | int | index,
 |  | float & | accumulatedWidths,
 |  | float | maxElementHeight |
 | ) |  |  | [private]

Definition at line 83 of file BreadcrumbLayout.cpp.

{
    const auto& element = GetElementAt(context, index);
    ArrangeItem(element, accumulatedWidths, maxElementHeight);
}

winrt::Size ArrangeOverride | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize
 | ) |  |

Definition at line 139 of file BreadcrumbLayout.cpp.

{
    const int itemCount = GetItemCount(context);
    int firstElementToRender{};
    m_firstRenderedItemIndexAfterEllipsis = itemCount - 1;
    m_visibleItemsCount = 0;

    // If the ellipsis must be drawn, then we find the index (x) of the first element to be rendered, any element with
    // a lower index than x will be hidden (except for the ellipsis button) and every element after x (including x) will
    // be drawn. At the very least, the ellipis and the last item will be rendered
    if (m_ellipsisIsRendered)
    {
        firstElementToRender = GetFirstBreadcrumbBarItemToArrange(context);
        m_firstRenderedItemIndexAfterEllipsis = firstElementToRender;
    }

    float accumulatedWidths{};
    const float maxElementHeight = GetBreadcrumbBarItemsHeight(context, firstElementToRender);

    // If there is at least one element, we may render the ellipsis item
    if (itemCount > 0)
    {
        const auto& ellipsisButton = m_ellipsisButton;

        if (m_ellipsisIsRendered)
        {
            ArrangeItem(ellipsisButton, accumulatedWidths, maxElementHeight);
        }
        else
        {
            HideItem(ellipsisButton);
        }
    }

    // For each item, if the item has an equal or larger index to the first element to render, then
    // render it, otherwise, hide it and add it to the list of hidden items
    for (int i = 1; i < itemCount; ++i)
    {
        if (i < firstElementToRender)
        {
            HideItem(context, i);
        }
        else
        {
            ArrangeItem(context, i, accumulatedWidths, maxElementHeight);
            ++m_visibleItemsCount;
        }
    }

    if (const auto& breadcrumb = m_breadcrumb.get())
    {
        auto breadcrumbImpl = winrt::get_self<BreadcrumbBar>(breadcrumb);
        breadcrumbImpl->ReIndexVisibleElementsForAccessibility();
    }

    return finalSize;
}

bool EllipsisIsRendered ( )

Definition at line 197 of file BreadcrumbLayout.cpp.

{
    return m_ellipsisIsRendered;
}

uint32_t FirstRenderedItemIndexAfterEllipsis ( )

Definition at line 202 of file BreadcrumbLayout.cpp.

{
    return m_firstRenderedItemIndexAfterEllipsis;
}

float GetBreadcrumbBarItemsHeight | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | int | firstItemToRender |
 | ) |  |  | [private]

Definition at line 120 of file BreadcrumbLayout.cpp.

{
    float maxElementHeight{};

    if (m_ellipsisIsRendered)
    {
        maxElementHeight = m_ellipsisButton.DesiredSize().Height;
    }

    for (uint32_t i = firstItemToRender; i < GetItemCount(context); ++i)
    {
        maxElementHeight = std::max(maxElementHeight, GetElementAt(context, i).DesiredSize().Height);
    }

    return maxElementHeight;
}

winrt::UIElement GetElementAt | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | uint32_t | index |
 | ) |  |  | [private]

Definition at line 28 of file BreadcrumbLayout.cpp.

{
    return context.Children().GetAt(index);
}

int GetFirstBreadcrumbBarItemToArrange ( winrt::NonVirtualizingLayoutContext const & context ) [private]

Definition at line 101 of file BreadcrumbLayout.cpp.

{
    const int itemCount = GetItemCount(context);
    float accumLength = GetElementAt(context, itemCount - 1).DesiredSize().Width +
        m_ellipsisButton.DesiredSize().Width;

    for (int i = itemCount - 2; i >= 0; --i)
    {
        float newAccumLength = accumLength + GetElementAt(context, i).DesiredSize().Width;
        if (newAccumLength > m_availableSize.Width)
        {
            return i + 1;
        }
        accumLength = newAccumLength;
    }

    return 0;
}

uint32_t GetItemCount ( winrt::NonVirtualizingLayoutContext const & context ) [private]

Definition at line 23 of file BreadcrumbLayout.cpp.

{
    return static_cast<uint32_t>(context.Children().Size());
}

uint32_t GetVisibleItemsCount ( )

Definition at line 207 of file BreadcrumbLayout.cpp.

{
    return m_visibleItemsCount;
}

void HideItem ( const winrt::UIElement & breadcrumbItem ) [private]

Definition at line 89 of file BreadcrumbLayout.cpp.

{
    const winrt::Rect arrangeRect(0, 0, 0, 0);
    breadcrumbItem.Arrange(arrangeRect);
}

void HideItem | ( | const winrt::NonVirtualizingLayoutContext & | context,
 |  | int | index |
 | ) |  |  | [private]

Definition at line 95 of file BreadcrumbLayout.cpp.

{
    const auto& element = GetElementAt(context, index);
    HideItem(element);
}

winrt::Size MeasureOverride | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize
 | ) |  |

Definition at line 35 of file BreadcrumbLayout.cpp.

{
    m_availableSize = availableSize;

    winrt::Size accumulatedCrumbsSize(0, 0);

    for (uint32_t i = 0; i < GetItemCount(context); ++i)
    {
        auto breadcrumbItem = GetElementAt(context, i).as<BreadcrumbBarItem>();
        breadcrumbItem->Measure(availableSize);

        if (i != 0)
        {
            accumulatedCrumbsSize.Width += breadcrumbItem->DesiredSize().Width;
            accumulatedCrumbsSize.Height = std::max(accumulatedCrumbsSize.Height, breadcrumbItem->DesiredSize().Height);
        }
    }

    // Save a reference to the ellipsis button to avoid querying for it multiple times
    if (GetItemCount(context) > 0)
    {
        if (const auto& ellipsisButton = GetElementAt(context, 0).try_as<winrt::BreadcrumbBarItem>())
        {
            m_ellipsisButton = ellipsisButton;
        }
    }

    if (accumulatedCrumbsSize.Width > availableSize.Width)
    {
        m_ellipsisIsRendered = true;
    }
    else
    {
        m_ellipsisIsRendered = false;
    }

    return accumulatedCrumbsSize;
}

The documentation for this class was generated from the following files:
  • Breadcrumb/BreadcrumbLayout.h
  • Breadcrumb/BreadcrumbLayout.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BringIntoViewOffsetsChange Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

BringIntoViewOffsetsChange Class Reference

#include "BringIntoViewOffsetsChange.h"

Inherits OffsetsChange.

List of all members.

Public Member Functions

BringIntoViewOffsetsChange (const ITrackerHandleManager *owner, double zoomedHorizontalOffset, double zoomedVerticalOffset, ScrollPresenterViewKind offsetsKind, winrt::IInspectable const &options, winrt::UIElement const &element, winrt::Rect const &elementRect, double horizontalAlignmentRatio, double verticalAlignmentRatio, double horizontalOffset, double verticalOffset)
~BringIntoViewOffsetsChange ()
winrt::UIElement | Element () const
winrt::Rect | ElementRect () const
double | HorizontalAlignmentRatio () const
double | HorizontalOffset () const
double | VerticalAlignmentRatio () const
double | VerticalOffset () const

Private Attributes

winrt::Rect | m_elementRect
double | m_horizontalAlignmentRatio
double | m_horizontalOffset
const ITrackerHandleManager * | m_owner
double | m_verticalAlignmentRatio
double | m_verticalOffset

Detailed Description

Definition at line 8 of file BringIntoViewOffsetsChange.h.

Constructor & Destructor Documentation

BringIntoViewOffsetsChange | ( | const ITrackerHandleManager * | owner,
 |  | double | zoomedHorizontalOffset,
 |  | double | zoomedVerticalOffset,
 |  | ScrollPresenterViewKind | offsetsKind,
 |  | winrt::IInspectable const & | options,
 |  | winrt::UIElement const & | element,
 |  | winrt::Rect const & | elementRect,
 |  | double | horizontalAlignmentRatio,
 |  | double | verticalAlignmentRatio,
 |  | double | horizontalOffset,
 |  | double | verticalOffset
 | ) |  |

Definition at line 10 of file BringIntoViewOffsetsChange.cpp.

                           :
        m_owner(owner),
        m_elementRect(elementRect),
        m_horizontalAlignmentRatio(horizontalAlignmentRatio),
        m_verticalAlignmentRatio(verticalAlignmentRatio),
        m_horizontalOffset(horizontalOffset),
        m_verticalOffset(verticalOffset),
        OffsetsChange(zoomedHorizontalOffset, zoomedVerticalOffset, offsetsKind, options)
{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_element.set(element);
}

~BringIntoViewOffsetsChange ( )

Definition at line 35 of file BringIntoViewOffsetsChange.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

winrt::UIElement Element ( ) const [inline]

Definition at line 25 of file BringIntoViewOffsetsChange.h.

    {
        return m_element.get();
    }

winrt::Rect ElementRect ( ) const [inline]

Definition at line 30 of file BringIntoViewOffsetsChange.h.

    {
        return m_elementRect;
    }

double HorizontalAlignmentRatio ( ) const [inline]

Definition at line 35 of file BringIntoViewOffsetsChange.h.

    {
        return m_horizontalAlignmentRatio;
    }

double HorizontalOffset ( ) const [inline]

Definition at line 45 of file BringIntoViewOffsetsChange.h.

    {
        return m_horizontalOffset;
    }

double VerticalAlignmentRatio ( ) const [inline]

Definition at line 40 of file BringIntoViewOffsetsChange.h.

    {
        return m_verticalAlignmentRatio;
    }

double VerticalOffset ( ) const [inline]

Definition at line 50 of file BringIntoViewOffsetsChange.h.

    {
        return m_verticalOffset;
    }

Member Data Documentation

winrt::Rect m_elementRect [private]

Definition at line 57 of file BringIntoViewOffsetsChange.h.

double m_horizontalAlignmentRatio [private]

Definition at line 59 of file BringIntoViewOffsetsChange.h.

double m_horizontalOffset [private]

Definition at line 61 of file BringIntoViewOffsetsChange.h.

const ITrackerHandleManager* m_owner [private]

Definition at line 56 of file BringIntoViewOffsetsChange.h.

double m_verticalAlignmentRatio [private]

Definition at line 60 of file BringIntoViewOffsetsChange.h.

double m_verticalOffset [private]

Definition at line 62 of file BringIntoViewOffsetsChange.h.

The documentation for this class was generated from the following files:
  • ScrollPresenter/BringIntoViewOffsetsChange.h
  • ScrollPresenter/BringIntoViewOffsetsChange.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteraction Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ButtonInteraction Class Reference

#include "ButtonInteraction.h"

Inherits ReferenceTracker< ButtonInteraction, winrt::implementation::ButtonInteractionT >, and ButtonInteractionProperties.

List of all members.

Public Member Functions

winrt::IVectorView
< winrt::RoutedEvent > 		GetSupportedEventsCore ()
void | InvokeMode (winrt::ButtonInteractionInvokeMode const &value)
winrt::ButtonInteractionInvokeMode | InvokeMode ()
bool | IsHovering ()
bool | IsPressing ()
void | OnKeyDown (winrt::UIElement const &sender, winrt::KeyRoutedEventArgs const &args)
void | OnKeyUp (winrt::UIElement const &sender, winrt::KeyRoutedEventArgs const &args)
void | OnPointerCanceled (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerCaptureLost (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerEntered (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerExited (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerPressed (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerReleased (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
winrt::event_token | PropertyChanged (winrt::PropertyChangedEventHandler const &value)
void | PropertyChanged (winrt::event_token const &token)

Private Member Functions

void | RaiseInvoked (winrt::UIElement target)
void | UpdateIsHovering (bool isHovering)
void | UpdateIsPressing (bool isPressing)

Detailed Description

Definition at line 9 of file ButtonInteraction.h.

Member Function Documentation

winrt::IVectorView< winrt::RoutedEvent > GetSupportedEventsCore ( )

Definition at line 47 of file ButtonInteraction.cpp.

{
    std::vector<winrt::RoutedEvent> supportedEvents;

    // Build the list of events that we'll respond to.
    supportedEvents.push_back(winrt::UIElement::KeyDownEvent());
    supportedEvents.push_back(winrt::UIElement::KeyUpEvent());
    supportedEvents.push_back(winrt::UIElement::PointerExitedEvent());
    supportedEvents.push_back(winrt::UIElement::PointerEnteredEvent());
    supportedEvents.push_back(winrt::UIElement::PointerExitedEvent());
    supportedEvents.push_back(winrt::UIElement::PointerPressedEvent());
    supportedEvents.push_back(winrt::UIElement::PointerReleasedEvent());
    supportedEvents.push_back(winrt::UIElement::PointerCanceledEvent());
    supportedEvents.push_back(winrt::UIElement::PointerCaptureLostEvent());

    return winrt::single_threaded_vector(std::move(supportedEvents)).GetView();
}

void InvokeMode ( winrt::ButtonInteractionInvokeMode const & value )

Definition at line 17 of file ButtonInteraction.cpp.

{
    const auto invokeMode = value;
    if (invokeMode != m_invokeMode)
    {
        m_invokeMode = value;
        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"InvokeMode"));
    }
}

winrt::ButtonInteractionInvokeMode InvokeMode ( )

Definition at line 12 of file ButtonInteraction.cpp.

{
    return m_invokeMode;
}

bool IsHovering ( )

Definition at line 27 of file ButtonInteraction.cpp.

{
    return m_isHovering;
}

bool IsPressing ( )

Definition at line 32 of file ButtonInteraction.cpp.

{
    return m_isPressing;
}

void OnKeyDown | ( | winrt::UIElement const & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args
 | ) |  |

Definition at line 65 of file ButtonInteraction.cpp.

{
    // Only process key events if the pointer is not currently being pressed.
    if (!m_hasPointerCapture)
    {
        auto target = sender;
        auto keyArgs = args;

        switch (keyArgs.Key())
        {
        case winrt::VirtualKey::Space:
        case winrt::VirtualKey::Enter:
            UpdateIsPressing(true);

            if (m_invokeMode == winrt::ButtonInteractionInvokeMode::Press)
            {
                RaiseInvoked(target);
            }
            break;
        }
    }
}

void OnKeyUp | ( | winrt::UIElement const & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args
 | ) |  |

Definition at line 88 of file ButtonInteraction.cpp.

{
    // Only process key events if the pointer is not currently being pressed.
    if (!m_hasPointerCapture)
    {
        auto target = sender;
        auto keyArgs = args;

        switch (keyArgs.Key())
        {
        case winrt::VirtualKey::Space:
        case winrt::VirtualKey::Enter:
            UpdateIsPressing(false);

            if (m_invokeMode == winrt::ButtonInteractionInvokeMode::Release)
            {
                RaiseInvoked(target);
            }

            break;
        }
    }
}

void OnPointerCanceled | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 173 of file ButtonInteraction.cpp.

{
    auto target = sender;
    auto pointerArgs = args;

    if (m_hasPointerCapture)
    {
        target.ReleasePointerCapture(pointerArgs.Pointer());
    }

    UpdateIsPressing(false);
}

void OnPointerCaptureLost | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 186 of file ButtonInteraction.cpp.

{
    auto target = sender;

    m_hasPointerCapture = false;
    UpdateIsPressing(false);
}

void OnPointerEntered | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 112 of file ButtonInteraction.cpp.

{
    auto target = sender;
    auto pointerArgs = args;

    UpdateIsHovering(true);

    if (m_invokeMode == winrt::ButtonInteractionInvokeMode::Hover)
    {
        UpdateIsPressing(true);
        RaiseInvoked(target);
    }
}

void OnPointerExited | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 126 of file ButtonInteraction.cpp.

{
    auto target = sender;

    UpdateIsHovering(false);

    if (m_invokeMode == winrt::ButtonInteractionInvokeMode::Hover || m_hasPointerCapture)
    {
        UpdateIsPressing(false);
    }
}

void OnPointerPressed | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 138 of file ButtonInteraction.cpp.

{
    auto target = sender;
    auto pointerArgs = args;

    UpdateIsPressing(true);

    if (m_invokeMode == winrt::ButtonInteractionInvokeMode::Press)
    {
        RaiseInvoked(target);
    }

    m_hasPointerCapture = target.CapturePointer(pointerArgs.Pointer());
}

void OnPointerReleased | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 153 of file ButtonInteraction.cpp.

{
    const auto target = sender;
    const auto pointerArgs = args;

    const bool wasPressing = m_isPressing;

    UpdateIsPressing(false);

    if (wasPressing && m_invokeMode == winrt::ButtonInteractionInvokeMode::Release)
    {
        RaiseInvoked(target);
    }

    if (m_hasPointerCapture)
    {
        target.ReleasePointerCapture(pointerArgs.Pointer());
    }
}

winrt::event_token PropertyChanged ( winrt::PropertyChangedEventHandler const & value )

Reimplemented from ButtonInteractionProperties.

Definition at line 37 of file ButtonInteraction.cpp.

{
    return m_propertyChangedEventSource.add(value);
}

void PropertyChanged ( winrt::event_token const & token )

Reimplemented from ButtonInteractionProperties.

Definition at line 42 of file ButtonInteraction.cpp.

{
    m_propertyChangedEventSource.remove(token);
}

void RaiseInvoked ( winrt::UIElement target ) [private]

Definition at line 194 of file ButtonInteraction.cpp.

{
    auto eventArgs = winrt::make_self<ButtonInteractionInvokedEventArgs>(target);
    m_invokedEventSource(*this, *eventArgs);
}

void UpdateIsHovering ( bool isHovering ) [private]

Definition at line 200 of file ButtonInteraction.cpp.

{
    if (isHovering != m_isHovering)
    {
        m_isHovering = isHovering;
        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"IsHovering"));
    }
}

void UpdateIsPressing ( bool isPressing ) [private]

Definition at line 209 of file ButtonInteraction.cpp.

{
    if (isPressing != m_isPressing)
    {
        m_isPressing = isPressing;
        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"IsPressing"));
    }
}

The documentation for this class was generated from the following files:
  • Interactions/ButtonInteraction/ButtonInteraction.h
  • Interactions/ButtonInteraction/ButtonInteraction.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteractionInvokedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ButtonInteractionInvokedEventArgs Class Reference

#include "ButtonInteractionInvokedEventArgs.h"

Inherits ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

ButtonInteractionInvokedEventArgs (winrt::UIElement const &target)
winrt::UIElement Target ()

Detailed Description

Definition at line 8 of file ButtonInteractionInvokedEventArgs.h.

Constructor & Destructor Documentation

ButtonInteractionInvokedEventArgs ( winrt::UIElement const & target )

Definition at line 9 of file ButtonInteractionInvokedEventArgs.cpp.

{
    m_target.set(target);
}

Member Function Documentation

winrt::UIElement Target ( )

Definition at line 14 of file ButtonInteractionInvokedEventArgs.cpp.

{
    return m_target.get();
}

The documentation for this class was generated from the following files:
  • Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.h
  • Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteractionProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

ButtonInteractionProperties Class Reference

#include "ButtonInteraction.properties.h"

Inherited by ButtonInteraction.

List of all members.

Public Member Functions

ButtonInteractionProperties ()
winrt::event_token | Invoked (winrt::TypedEventHandler< winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs > const &value)
void | Invoked (winrt::event_token const &token)
winrt::event_token | PropertyChanged (winrt::PropertyChangedEventHandler const &value)
void | PropertyChanged (winrt::event_token const &token)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ButtonInteraction,
winrt::ButtonInteractionInvokedEventArgs > > 		m_invokedEventSource
event_source
< winrt::PropertyChangedEventHandler > 		m_propertyChangedEventSource

Detailed Description

Definition at line 7 of file ButtonInteraction.properties.h.

Constructor & Destructor Documentation

ButtonInteractionProperties ( )

Definition at line 17 of file ButtonInteraction.properties.cpp.

    : m_invokedEventSource{static_cast<ButtonInteraction*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
void Invoked ( winrt::event_token const & token )
winrt::event_token Invoked ( winrt::TypedEventHandler< winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs > const & value )
winrt::event_token PropertyChanged ( winrt::PropertyChangedEventHandler const & value )

Reimplemented in ButtonInteraction.

void PropertyChanged ( winrt::event_token const & token )

Reimplemented in ButtonInteraction.

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs> > m_invokedEventSource

Definition at line 19 of file ButtonInteraction.properties.h.

event_source<winrt::PropertyChangedEventHandler> m_propertyChangedEventSource

Definition at line 20 of file ButtonInteraction.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ButtonInteraction.properties.h
  • Generated/ButtonInteraction.properties.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CachedVisualTreeHelpers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Attributes

CachedVisualTreeHelpers Class Reference

#include "ItemsRepeater.common.h"

List of all members.

Static Public Member Functions

static
winrt::IDataTemplateComponent 		GetDataTemplateComponent (winrt::UIElement const &element)
static winrt::Rect | GetLayoutSlot (winrt::FrameworkElement const &element)
static winrt::DependencyObject | GetParent (winrt::DependencyObject const &child)

Private Attributes

winrt::ILayoutInformationStatics | m_layoutInfo
winrt::IVisualTreeHelperStatics | m_visualTreeHelper
winrt::IXamlBindingHelperStatics | m_xamlBindingHelperStatics

Detailed Description

Definition at line 13 of file ItemsRepeater.common.h.

Member Function Documentation

winrt::IDataTemplateComponent GetDataTemplateComponent ( winrt::UIElement const & element ) [static]

Definition at line 37 of file ItemsRepeater.common.cpp.

{
    auto instance = LifetimeHandler::GetCachedVisualTreeHelpersInstance();
    MUX_ASSERT(instance);

    if (!instance->m_xamlBindingHelperStatics)
    {
        instance->m_xamlBindingHelperStatics = winrt::get_activation_factory<winrt::XamlBindingHelper, winrt::IXamlBindingHelperStatics>();
    }

    return instance->m_xamlBindingHelperStatics.GetDataTemplateComponent(element);
}

winrt::Rect GetLayoutSlot ( winrt::FrameworkElement const & element ) [static]

Definition at line 10 of file ItemsRepeater.common.cpp.

{
    auto instance = LifetimeHandler::GetCachedVisualTreeHelpersInstance();
    MUX_ASSERT(instance);

    if (!instance->m_layoutInfo)
    {
        instance->m_layoutInfo = winrt::get_activation_factory<winrt::LayoutInformation, winrt::ILayoutInformationStatics>();
    }

    return instance->m_layoutInfo.GetLayoutSlot(element);
}

winrt::DependencyObject GetParent ( winrt::DependencyObject const & child ) [static]

Definition at line 24 of file ItemsRepeater.common.cpp.

{
    auto instance = LifetimeHandler::GetCachedVisualTreeHelpersInstance();
    MUX_ASSERT(instance);

    if (!instance->m_visualTreeHelper)
    {
        instance->m_visualTreeHelper = winrt::get_activation_factory<winrt::VisualTreeHelper, winrt::IVisualTreeHelperStatics>();
    }

    return instance->m_visualTreeHelper.GetParent(child);
}

Member Data Documentation

winrt::ILayoutInformationStatics m_layoutInfo [private]

Definition at line 23 of file ItemsRepeater.common.h.

winrt::IVisualTreeHelperStatics m_visualTreeHelper [private]

Definition at line 24 of file ItemsRepeater.common.h.

winrt::IXamlBindingHelperStatics m_xamlBindingHelperStatics [private]

Definition at line 25 of file ItemsRepeater.common.h.

The documentation for this class was generated from the following files:
  • Repeater/ItemsRepeater.common.h
  • Repeater/ItemsRepeater.common.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CanvasGeometry Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CanvasGeometry Class Reference

List of all members.

Public Member Functions

CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)
CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)
CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)
CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)
CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)
CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)
CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)
CanvasGeometry (winrt::com_ptr< ID2D1Geometry > geometry)

Detailed Description

Definition at line 73 of file AnimatedAcceptVisualSource.cpp.

Constructor & Destructor Documentation

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 80 of file AnimatedAcceptVisualSource.cpp.

        : _geometry{ geometry }

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 79 of file AnimatedBackVisualSource.cpp.

        : _geometry{ geometry }

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 79 of file AnimatedChevronDownSmallVisualSource.cpp.

        : _geometry{ geometry }

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 78 of file AnimatedChevronRightDownSmallVisualSource.cpp.

        : _geometry{ geometry }

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 79 of file AnimatedChevronUpDownSmallVisualSource.cpp.

        : _geometry{ geometry }

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 79 of file AnimatedFindVisualSource.cpp.

        : _geometry{ geometry }

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 79 of file AnimatedGlobalNavigationButtonVisualSource.cpp.

        : _geometry{ geometry }

CanvasGeometry ( winrt::com_ptr< ID2D1Geometry > geometry ) [inline]

Definition at line 79 of file AnimatedSettingsVisualSource.cpp.

        : _geometry{ geometry }

The documentation for this class was generated from the following files:
  • AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.cpp
  • AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.cpp
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.cpp
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.cpp
  • AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.cpp
  • AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.cpp
  • AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.cpp
  • AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ChildHandlers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

ChildHandlers Class Reference

#include "RadioButtons.h"

List of all members.

Public Attributes

winrt::ToggleButton::Checked_revoker | checkedRevoker
winrt::ToggleButton::Unchecked_revoker | uncheckedRevoker

Detailed Description

Definition at line 18 of file RadioButtons.h.

Member Data Documentation

winrt::ToggleButton::Checked_revoker checkedRevoker

Definition at line 21 of file RadioButtons.h.

winrt::ToggleButton::Unchecked_revoker uncheckedRevoker

Definition at line 22 of file RadioButtons.h.

The documentation for this class was generated from the following file:
  • RadioButtons/RadioButtons.h
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ChildrenInTabFocusOrderIterable Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions

ChildrenInTabFocusOrderIterable Class Reference

#include "ChildrenInTabFocusOrderIterable.h"

Inherits ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type >.

List of all members.

Classes

class ChildrenInTabFocusOrderIterator

Public Member Functions

ChildrenInTabFocusOrderIterable (const winrt::ItemsRepeater &repeater)
winrt::IIterator
< winrt::DependencyObject > 		First ()

Detailed Description

Definition at line 6 of file ChildrenInTabFocusOrderIterable.h.

Constructor & Destructor Documentation

ChildrenInTabFocusOrderIterable ( const winrt::ItemsRepeater & repeater )

Definition at line 10 of file ChildrenInTabFocusOrderIterable.cpp.

{
    m_repeater.set(repeater);
}

Member Function Documentation

winrt::IIterator< winrt::DependencyObject > First ( )

Definition at line 16 of file ChildrenInTabFocusOrderIterable.cpp.

{
    return winrt::make<ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator>(m_repeater.get());
}

The documentation for this class was generated from the following files:
  • Repeater/ChildrenInTabFocusOrderIterable.h
  • Repeater/ChildrenInTabFocusOrderIterable.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ChildrenInTabFocusOrderIterable
  • ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
Public Member Functions | Private Attributes

ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator Class Reference

List of all members.

Public Member Functions

ChildrenInTabFocusOrderIterator (const winrt::ItemsRepeater &repeater)
winrt::DependencyObject | Current ()
uint32_t | GetMany (winrt::array_view< winrt::DependencyObject > values)
bool | HasCurrent ()
bool | MoveNext ()

Private Attributes

int | m_index = 0
std::vector< std::pair< int,
winrt::UIElement > > 		m_realizedChildren

Detailed Description

Definition at line 20 of file ChildrenInTabFocusOrderIterable.h.

Constructor & Destructor Documentation

ChildrenInTabFocusOrderIterator ( const winrt::ItemsRepeater & repeater )

Definition at line 21 of file ChildrenInTabFocusOrderIterable.cpp.

{
    auto children = repeater.as<winrt::Panel>().Children();
    m_realizedChildren.reserve(children.Size());

    // Filter out unrealized children.
    for (unsigned i = 0u; i < children.Size(); ++i)
    {
        auto element = children.GetAt(i);
        auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
        if (virtInfo->IsRealized())
        {
            m_realizedChildren.push_back(std::make_pair(virtInfo->Index(), element));
        }
    }

    // Sort children by index.
    std::sort(m_realizedChildren.begin(), m_realizedChildren.end(), [](const auto& lhs, const auto& rhs) { return lhs.first < rhs.first; });
}

Member Function Documentation

winrt::DependencyObject Current ( )

Definition at line 42 of file ChildrenInTabFocusOrderIterable.cpp.

{
    if (m_index < static_cast<int>(m_realizedChildren.size()))
    {
        return m_realizedChildren[m_index].second.as<winrt::DependencyObject>();
    }
    else
    {
        throw winrt::hresult_out_of_bounds();
    }

    return nullptr;
}

uint32_t GetMany ( winrt::array_view< winrt::DependencyObject > values ) [inline]

Definition at line 47 of file ChildrenInTabFocusOrderIterable.h.

        {
            uint32_t howMany = 0;
            if (HasCurrent())
            {
                do
                {
                    if (howMany >= values.size()) break;

                    values[howMany] = Current();
                    howMany++;
                } while (MoveNext());
            }

            return howMany;
        }

bool HasCurrent ( ) [inline]

Definition at line 28 of file ChildrenInTabFocusOrderIterable.h.

        {
            return (m_index < static_cast<int>(m_realizedChildren.size()));
        }

bool MoveNext ( ) [inline]

Definition at line 32 of file ChildrenInTabFocusOrderIterable.h.

        {
            if (m_index < static_cast<int>(m_realizedChildren.size()))
            {
                ++m_index;
                return (m_index < static_cast<int>(m_realizedChildren.size()));
            }
            else
            {
                throw winrt::hresult_out_of_bounds();
            }

            return false;
        }

Member Data Documentation

int m_index = 0 [private]

Definition at line 67 of file ChildrenInTabFocusOrderIterable.h.

std::vector<std::pair<int , winrt::UIElement> > m_realizedChildren [private]

Definition at line 66 of file ChildrenInTabFocusOrderIterable.h.

The documentation for this class was generated from the following files:
  • Repeater/ChildrenInTabFocusOrderIterable.h
  • Repeater/ChildrenInTabFocusOrderIterable.cpp
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ColorChangedEventArgs Class Reference

#include "ColorChangedEventArgs.h"

List of all members.

Public Member Functions

winrt::Color | NewColor ()
void | NewColor (winrt::Color const &value)
void | OldColor (winrt::Color const &value)
winrt::Color | OldColor ()

Detailed Description

Definition at line 8 of file ColorChangedEventArgs.h.

Member Function Documentation

winrt::Color NewColor ( )
void NewColor ( winrt::Color const & value )
void OldColor ( winrt::Color const & value )
winrt::Color OldColor ( )
The documentation for this class was generated from the following file:
  • ColorPicker/ColorChangedEventArgs.h
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions

ColorPicker Class Reference

#include "ColorPicker.h"

Inherits ReferenceTracker< ColorPicker, winrt::implementation::ColorPickerT >, and ColorPickerProperties.

List of all members.

Public Member Functions

ColorPicker ()
Hsv & GetCurrentHsv ()
void | OnApplyTemplate ()
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)

Private Types

enum ColorUpdateReason {
InitializingColor, ColorPropertyChanged, ColorSpectrumColorChanged, ThirdDimensionSliderChanged,
AlphaSliderChanged, RgbTextBoxChanged, HsvTextBoxChanged, AlphaTextBoxChanged,
HexTextBoxChanged
}

Private Member Functions

Rgb | ApplyConstraintsToRgbColor (const Rgb &rgb)
void | CreateAlphaSliderCheckeredBackground ()
void | CreateColorPreviewCheckeredBackground ()
winrt::Color | GetCheckerColor ()
winrt::hstring | GetCurrentHexValue ()
Hsv GetHsvColorFromTextBoxes ()
Rgb GetRgbColorFromTextBoxes ()
void | InitializeColor ()
void | OnAlphaSliderBackgroundRectangleSizeChanged (winrt::IInspectable const &sender, winrt::SizeChangedEventArgs const &args)
void | OnAlphaSliderValueChanged (winrt::IInspectable const &sender, winrt::RangeBaseValueChangedEventArgs const &args)
void | OnAlphaTextChanging (winrt::TextBox const &sender, winrt::TextBoxTextChangingEventArgs const &args)
void | OnCheckerColorChanged (winrt::DependencyObject const &o, winrt::DependencyProperty const &p)
void | OnColorChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnColorPreviewRectangleGridSizeChanged (winrt::IInspectable const &sender, winrt::SizeChangedEventArgs const &args)
void | OnColorRepresentationComboBoxSelectionChanged (winrt::IInspectable const &sender, winrt::SelectionChangedEventArgs const &args)
void | OnColorSpectrumColorChanged (const winrt::ColorSpectrum &sender, const winrt::ColorChangedEventArgs &args)
void | OnColorSpectrumComponentsChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnColorSpectrumSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnHexTextChanging (winrt::TextBox const &sender, winrt::TextBoxTextChangingEventArgs const &args)
void | OnHueTextChanging (winrt::TextBox const &sender, winrt::TextBoxTextChangingEventArgs const &args)
void | OnIsAlphaEnabledChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnMinMaxHueChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnMinMaxSaturationChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnMinMaxValueChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnMoreButtonChecked (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnMoreButtonClicked (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnMoreButtonUnchecked (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnOrientationChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnPartVisibilityChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnPreviousColorChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnRgbTextChanging (winrt::TextBox const &sender, winrt::TextBoxTextChangingEventArgs const &args)
void | OnSaturationTextChanging (winrt::TextBox const &sender, winrt::TextBoxTextChangingEventArgs const &args)
void | OnTextBoxGotFocus (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnTextBoxLostFocus (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnThirdDimensionSliderValueChanged (winrt::IInspectable const &sender, winrt::RangeBaseValueChangedEventArgs const &args)
void | OnUnloaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnValueTextChanging (winrt::TextBox const &sender, winrt::TextBoxTextChangingEventArgs const &args)
void | SetColorAndUpdateControls (ColorUpdateReason reason)
void | SetThirdDimensionSliderChannel ()
void | UpdateAlphaSlider ()
void | UpdateColor (const Hsv &hsv, ColorUpdateReason reason)
void | UpdateColor (const Rgb &rgb, ColorUpdateReason reason)
void | UpdateColor (double alpha, ColorUpdateReason reason)
void | UpdateColorControls (ColorUpdateReason reason)
void | UpdateMoreButton ()
void | UpdatePreviousColorRectangle ()
void | UpdateThirdDimensionSlider ()
void | UpdateVisualState (bool useTransitions)

Static Private Member Functions

static void | AddGradientStop (const winrt::LinearGradientBrush &brush, double offset, Hsv hsvColor, double alpha)

Detailed Description

Definition at line 13 of file ColorPicker.h.

Member Enumeration Documentation

enum ColorUpdateReason [private]
Enumerator:
InitializingColor
ColorPropertyChanged
ColorSpectrumColorChanged
ThirdDimensionSliderChanged
AlphaSliderChanged
RgbTextBoxChanged
HsvTextBoxChanged
AlphaTextBoxChanged
HexTextBoxChanged

Definition at line 89 of file ColorPicker.h.

    {
        InitializingColor,
        ColorPropertyChanged,
        ColorSpectrumColorChanged,
        ThirdDimensionSliderChanged,
        AlphaSliderChanged,
        RgbTextBoxChanged,
        HsvTextBoxChanged,
        AlphaTextBoxChanged,
        HexTextBoxChanged,
    };

Constructor & Destructor Documentation

ColorPicker ( )

Definition at line 15 of file ColorPicker.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_ColorPicker);

    SetDefaultStyleKey(this);

    Unloaded({ this, &ColorPicker::OnUnloaded });
}

Member Function Documentation

void AddGradientStop | ( | const winrt::LinearGradientBrush & | brush,
 |  | double | offset,
 |  | Hsv | hsvColor,
 |  | double | alpha |
 | ) |  |  | [static, private]

Definition at line 1254 of file ColorPicker.cpp.

{
    winrt::GradientStop stop;

    Rgb rgbColor = HsvToRgb(hsvColor);

    stop.Color(winrt::ColorHelper::FromArgb(
        static_cast<unsigned char>(round(alpha * 255)),
        static_cast<unsigned char>(round(rgbColor.r * 255)),
        static_cast<unsigned char>(round(rgbColor.g * 255)),
        static_cast<unsigned char>(round(rgbColor.b * 255))));
    stop.Offset(offset);

    brush.GradientStops().Append(stop);
}

Rgb ApplyConstraintsToRgbColor ( const Rgb & rgb ) [private]

Definition at line 1020 of file ColorPicker.cpp.

{
    double minHue = MinHue();
    double maxHue = MaxHue();
    double minSaturation = MinSaturation() / 100.0;
    double maxSaturation = MaxSaturation() / 100.0;
    double minValue = MinValue() / 100.0;
    double maxValue = MaxValue() / 100.0;

    Hsv hsv = RgbToHsv(rgb);

    hsv.h = min(max(hsv.h, minHue), maxHue);
    hsv.s = min(max(hsv.s, minSaturation), maxSaturation);
    hsv.v = min(max(hsv.v, minValue), maxValue);

    return HsvToRgb(hsv);
}

void CreateAlphaSliderCheckeredBackground ( ) [private]

Definition at line 1225 of file ColorPicker.cpp.

{
    if (SharedHelpers::IsInDesignMode()) return;

    if (auto&& alphaSliderBackgroundRectangle = m_alphaSliderBackgroundRectangle.get())
    {
        if (m_alphaSliderCheckeredBackgroundImageBrush.get())
        {
            int width = static_cast<int>(round(alphaSliderBackgroundRectangle.ActualWidth()));
            int height = static_cast<int>(round(alphaSliderBackgroundRectangle.ActualHeight()));
            shared_ptr<vector<::byte>> bgraCheckeredPixelData = make_shared<vector<::byte>>();
            auto strongThis = get_strong();

            auto dispatcherQueue = DispatcherQueue();
            CreateCheckeredBackgroundAsync(
                width,
                height,
                GetCheckerColor(),
                bgraCheckeredPixelData,
                m_alphaSliderCheckeredBackgroundBitmapAction,
                dispatcherQueue,
                [strongThis](winrt::WriteableBitmap checkeredBackgroundSoftwareBitmap)
                {
                    strongThis->m_alphaSliderCheckeredBackgroundImageBrush.get().ImageSource(checkeredBackgroundSoftwareBitmap);
                });
        }
    }
}

void CreateColorPreviewCheckeredBackground ( ) [private]

Definition at line 1196 of file ColorPicker.cpp.

{
    if (SharedHelpers::IsInDesignMode()) return;

    if (auto&& colorPreviewRectangleGrid = m_colorPreviewRectangleGrid.get())
    {
        if (m_colorPreviewRectangleCheckeredBackgroundImageBrush.get())
        {
            int width = static_cast<int>(round(colorPreviewRectangleGrid.ActualWidth()));
            int height = static_cast<int>(round(colorPreviewRectangleGrid.ActualHeight()));
            shared_ptr<vector<::byte>> bgraCheckeredPixelData = make_shared<vector<::byte>>();
            auto strongThis = get_strong();

            auto dispatcherQueue = DispatcherQueue();
            CreateCheckeredBackgroundAsync(
                width,
                height,
                GetCheckerColor(),
                bgraCheckeredPixelData,
                m_createColorPreviewRectangleCheckeredBackgroundBitmapAction,
                dispatcherQueue,
                [strongThis](winrt::WriteableBitmap checkeredBackgroundSoftwareBitmap)
                {
                    strongThis->m_colorPreviewRectangleCheckeredBackgroundImageBrush.get().ImageSource(checkeredBackgroundSoftwareBitmap);
                });
        }
    }
}

winrt::Color GetCheckerColor ( ) [private]

Definition at line 1270 of file ColorPicker.cpp.

{
    winrt::Color checkerColor;

    if (auto&& checkerColorBrush = m_checkerColorBrush.get())
    {
        checkerColor = checkerColorBrush.Color();
    }
    else
    {
        winrt::IInspectable checkerColorAsI = winrt::Application::Current().Resources().Lookup(box_value(L"SystemListLowColor"));
        checkerColor = unbox_value<winrt::Color>(checkerColorAsI);
    }

    return checkerColor;
}

winrt::hstring GetCurrentHexValue ( ) [private]

Definition at line 1015 of file ColorPicker.cpp.

{
    return IsAlphaEnabled() ? RgbaToHex(m_currentRgb, m_currentAlpha) : RgbToHex(m_currentRgb);
}

Hsv& GetCurrentHsv ( ) [inline]

Definition at line 26 of file ColorPicker.h.

{ return m_currentHsv; }

Hsv GetHsvColorFromTextBoxes ( ) [private]

Definition at line 1010 of file ColorPicker.cpp.

{
    return Hsv(_wtoi(m_hueTextBox.get().Text().data()), _wtoi(m_saturationTextBox.get().Text().data()) / 100.0, _wtoi(m_valueTextBox.get().Text().data()) / 100.0);
}

Rgb GetRgbColorFromTextBoxes ( ) [private]

Definition at line 1005 of file ColorPicker.cpp.

{
    return Rgb(_wtoi(m_redTextBox.get().Text().data()) / 255.0, _wtoi(m_greenTextBox.get().Text().data()) / 255.0, _wtoi(m_blueTextBox.get().Text().data()) / 255.0);
}

void InitializeColor ( ) [private]

Definition at line 480 of file ColorPicker.cpp.

{
    auto color = Color();

    m_currentRgb = Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0);
    m_currentHsv = RgbToHsv(m_currentRgb);
    m_currentAlpha = color.A / 255.0;
    m_currentHex = GetCurrentHexValue();

    SetColorAndUpdateControls(ColorUpdateReason::InitializingColor);
}

void OnAlphaSliderBackgroundRectangleSizeChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::SizeChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 686 of file ColorPicker.cpp.

{
    CreateAlphaSliderCheckeredBackground();
}

void OnAlphaSliderValueChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::RangeBaseValueChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 728 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    UpdateColor(m_alphaSlider.get().Value() / 100.0, ColorUpdateReason::AlphaSliderChanged);
}

void OnAlphaTextChanging | ( | winrt::TextBox const & | sender,
 |  | winrt::TextBoxTextChangingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 924 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    if (auto&& alphaTextBox = m_alphaTextBox.get())
    {
        // If the user hasn't entered a %, we'll do that for them, keeping the cursor
        // where it was before.
        int cursorPosition = alphaTextBox.SelectionStart() + alphaTextBox.SelectionLength();

        const auto text = alphaTextBox.Text();
        if (text.empty() || text.begin()[text.size() - 1] != '%')
        {
            alphaTextBox.Text(static_cast<wstring>(text) + wstring(L"%"));
            alphaTextBox.SelectionStart(cursorPosition);
        }

        // We'll respond to the text change if the user has entered a valid value.
        // Otherwise, we'll do nothing except mark the text box's contents as invalid.
        winrt::hstring alphaString{ static_cast<wstring>(alphaTextBox.Text()).substr(0, alphaTextBox.Text().size() - 1) };
        auto alphaValue = TryParseInt(alphaString);
        if (!alphaValue.has_value() || alphaValue.value() < 0 || alphaValue.value() > 100)
        {
            m_isFocusedTextBoxValid = false;
        }
        else
        {
            m_isFocusedTextBoxValid = true;
            UpdateColor(alphaValue.value() / 100.0, ColorUpdateReason::AlphaTextBoxChanged);
        }
    }
}

void OnApplyTemplate ( )

Definition at line 24 of file ColorPicker.cpp.

{
    winrt::IControlProtected thisAsControlProtected = *this;

    m_colorSpectrum.set(GetTemplateChildT<winrt::ColorSpectrum>(L"ColorSpectrum", thisAsControlProtected));

    m_colorPreviewRectangleGrid.set(GetTemplateChildT<winrt::Grid>(L"ColorPreviewRectangleGrid", thisAsControlProtected));
    m_colorPreviewRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"ColorPreviewRectangle", thisAsControlProtected));
    m_previousColorRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"PreviousColorRectangle", thisAsControlProtected));
    m_colorPreviewRectangleCheckeredBackgroundImageBrush.set(GetTemplateChildT<winrt::ImageBrush>(L"ColorPreviewRectangleCheckeredBackgroundImageBrush", thisAsControlProtected));

    m_thirdDimensionSlider.set(GetTemplateChildT<winrt::ColorPickerSlider>(L"ThirdDimensionSlider", thisAsControlProtected));
    m_thirdDimensionSliderGradientBrush.set(GetTemplateChildT<winrt::LinearGradientBrush>(L"ThirdDimensionSliderGradientBrush", thisAsControlProtected));

    m_alphaSlider.set(GetTemplateChildT<winrt::ColorPickerSlider>(L"AlphaSlider", thisAsControlProtected));
    m_alphaSliderGradientBrush.set(GetTemplateChildT<winrt::LinearGradientBrush>(L"AlphaSliderGradientBrush", thisAsControlProtected));
    m_alphaSliderBackgroundRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"AlphaSliderBackgroundRectangle", thisAsControlProtected));
    m_alphaSliderCheckeredBackgroundImageBrush.set(GetTemplateChildT<winrt::ImageBrush>(L"AlphaSliderCheckeredBackgroundImageBrush", thisAsControlProtected));

    m_moreButton.set(GetTemplateChildT<winrt::ButtonBase>(L"MoreButton", thisAsControlProtected));

    m_colorRepresentationComboBox.set(GetTemplateChildT<winrt::ComboBox>(L"ColorRepresentationComboBox", thisAsControlProtected));

    m_redTextBox.set(GetTemplateChildT<winrt::TextBox>(L"RedTextBox", thisAsControlProtected));
    m_greenTextBox.set(GetTemplateChildT<winrt::TextBox>(L"GreenTextBox", thisAsControlProtected));
    m_blueTextBox.set(GetTemplateChildT<winrt::TextBox>(L"BlueTextBox", thisAsControlProtected));
    m_hueTextBox.set(GetTemplateChildT<winrt::TextBox>(L"HueTextBox", thisAsControlProtected));
    m_saturationTextBox.set(GetTemplateChildT<winrt::TextBox>(L"SaturationTextBox", thisAsControlProtected));
    m_valueTextBox.set(GetTemplateChildT<winrt::TextBox>(L"ValueTextBox", thisAsControlProtected));
    m_alphaTextBox.set(GetTemplateChildT<winrt::TextBox>(L"AlphaTextBox", thisAsControlProtected));
    m_hexTextBox.set(GetTemplateChildT<winrt::TextBox>(L"HexTextBox", thisAsControlProtected));

    m_RgbComboBoxItem.set(GetTemplateChildT<winrt::ComboBoxItem>(L"RGBComboBoxItem", thisAsControlProtected));
    m_HsvComboBoxItem.set(GetTemplateChildT<winrt::ComboBoxItem>(L"HSVComboBoxItem", thisAsControlProtected));
    m_redLabel.set(GetTemplateChildT<winrt::TextBlock>(L"RedLabel", thisAsControlProtected));
    m_greenLabel.set(GetTemplateChildT<winrt::TextBlock>(L"GreenLabel", thisAsControlProtected));
    m_blueLabel.set(GetTemplateChildT<winrt::TextBlock>(L"BlueLabel", thisAsControlProtected));
    m_hueLabel.set(GetTemplateChildT<winrt::TextBlock>(L"HueLabel", thisAsControlProtected));
    m_saturationLabel.set(GetTemplateChildT<winrt::TextBlock>(L"SaturationLabel", thisAsControlProtected));
    m_valueLabel.set(GetTemplateChildT<winrt::TextBlock>(L"ValueLabel", thisAsControlProtected));
    m_alphaLabel.set(GetTemplateChildT<winrt::TextBlock>(L"AlphaLabel", thisAsControlProtected));

    m_checkerColorBrush.set(GetTemplateChildT<winrt::SolidColorBrush>(L"CheckerColorBrush", thisAsControlProtected));

    if (auto&& colorSpectrum = m_colorSpectrum.get())
    {
        colorSpectrum.ColorChanged({ this, &ColorPicker::OnColorSpectrumColorChanged });
        colorSpectrum.SizeChanged({ this, &ColorPicker::OnColorSpectrumSizeChanged });

        winrt::AutomationProperties::SetName(colorSpectrum, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameColorSpectrum));
    }

    if (auto&& colorPreviewRectangleGrid = m_colorPreviewRectangleGrid.get())
    {
        colorPreviewRectangleGrid.SizeChanged({ this, &ColorPicker::OnColorPreviewRectangleGridSizeChanged });
    }

    if (auto&& thirdDimensionSlider = m_thirdDimensionSlider.get())
    {
        thirdDimensionSlider.ValueChanged({ this, &ColorPicker::OnThirdDimensionSliderValueChanged });
        SetThirdDimensionSliderChannel();
    }

    if (auto&& alphaSlider = m_alphaSlider.get())
    {
        alphaSlider.ValueChanged({ this, &ColorPicker::OnAlphaSliderValueChanged });
        alphaSlider.ColorChannel(winrt::ColorPickerHsvChannel::Alpha);

        winrt::AutomationProperties::SetName(alphaSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameAlphaSlider));
    }

    if (auto&& alphaSliderBackgroundRectangle = m_alphaSliderBackgroundRectangle.get())
    {
        alphaSliderBackgroundRectangle.SizeChanged({ this, &ColorPicker::OnAlphaSliderBackgroundRectangleSizeChanged });
    }

    if (auto&& moreButton = m_moreButton.get())
    {
        if (const auto moreButtonAsToggleButton = moreButton.try_as<winrt::ToggleButton>())
        {
            moreButtonAsToggleButton.Checked({ this, &ColorPicker::OnMoreButtonChecked });
            moreButtonAsToggleButton.Unchecked({ this, &ColorPicker::OnMoreButtonUnchecked });
        }
        else
        {
            moreButton.Click({ this, &ColorPicker::OnMoreButtonClicked });
        }

        winrt::AutomationProperties::SetName(moreButton, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameMoreButtonCollapsed));
        winrt::AutomationProperties::SetHelpText(moreButton, ResourceAccessor::GetLocalizedStringResource(SR_HelpTextMoreButton));

        if (const auto moreButtonLabel = GetTemplateChildT<winrt::TextBlock>(L"MoreButtonLabel", thisAsControlProtected))
        {
            m_moreButtonLabel.set(moreButtonLabel);
            moreButtonLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextMoreButtonLabelCollapsed));
        }
    }

    if (auto&& colorRepresentationComboBox = m_colorRepresentationComboBox.get())
    {
        colorRepresentationComboBox.SelectionChanged({ this, &ColorPicker::OnColorRepresentationComboBoxSelectionChanged });

        winrt::AutomationProperties::SetName(colorRepresentationComboBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameColorModelComboBox));
    }

    if (auto&& redTextBox = m_redTextBox.get())
    {
        redTextBox.TextChanging({ this, &ColorPicker::OnRgbTextChanging });
        redTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        redTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(redTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameRedTextBox));
    }

    if (auto&& greenTextBox = m_greenTextBox.get())
    {
        greenTextBox.TextChanging({ this, &ColorPicker::OnRgbTextChanging });
        greenTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        greenTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(greenTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameGreenTextBox));
    }

    if (auto&& blueTextBox = m_blueTextBox.get())
    {
        blueTextBox.TextChanging({ this, &ColorPicker::OnRgbTextChanging });
        blueTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        blueTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(blueTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameBlueTextBox));
    }

    if (auto&& hueTextBox = m_hueTextBox.get())
    {
        hueTextBox.TextChanging({ this, &ColorPicker::OnHueTextChanging });
        hueTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        hueTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(hueTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameHueTextBox));
    }

    if (auto&& saturationTextBox = m_saturationTextBox.get())
    {
        saturationTextBox.TextChanging({ this, &ColorPicker::OnSaturationTextChanging });
        saturationTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        saturationTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(saturationTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameSaturationTextBox));
    }

    if (auto&& valueTextBox = m_valueTextBox.get())
    {
        valueTextBox.TextChanging({ this, &ColorPicker::OnValueTextChanging });
        valueTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        valueTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(valueTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameValueTextBox));
    }

    if (auto&& alphaTextBox = m_alphaTextBox.get())
    {
        alphaTextBox.TextChanging({ this, &ColorPicker::OnAlphaTextChanging });
        alphaTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        alphaTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(alphaTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameAlphaTextBox));
    }

    if (auto&& hexTextBox = m_hexTextBox.get())
    {
        hexTextBox.TextChanging({ this, &ColorPicker::OnHexTextChanging });
        hexTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
        hexTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });

        winrt::AutomationProperties::SetName(hexTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameRGBHexTextBox));
    }

    if (auto&& rgbComboBoxItem = m_RgbComboBoxItem.get())
    {
        rgbComboBoxItem.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_ContentRGBComboBoxItem)));
    }

    if (auto&& hsvComboBoxItem = m_HsvComboBoxItem.get())
    {
        hsvComboBoxItem.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_ContentHSVComboBoxItem)));
    }

    if (auto&& redLabel = m_redLabel.get())
    {
        redLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextRedLabel));
    }

    if (auto&& greenLabel = m_greenLabel.get())
    {
        greenLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextGreenLabel));
    }

    if (auto&& blueLabel = m_blueLabel.get())
    {
        blueLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextBlueLabel));
    }

    if (auto&& hueLabel = m_hueLabel.get())
    {
        hueLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextHueLabel));
    }

    if (auto&& saturationLabel = m_saturationLabel.get())
    {
        saturationLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextSaturationLabel));
    }

    if (auto&& valueLabel = m_valueLabel.get())
    {
        valueLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextValueLabel));
    }

    if (auto&& alphaLabel = m_alphaLabel.get())
    {
        alphaLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextAlphaLabel));
    }

    if (auto&& checkerColorBrush = m_checkerColorBrush.get())
    {
        checkerColorBrush.RegisterPropertyChangedCallback(winrt::SolidColorBrush::ColorProperty(), { this, &ColorPicker::OnCheckerColorChanged });
    }

    CreateColorPreviewCheckeredBackground();
    CreateAlphaSliderCheckeredBackground();
    UpdateVisualState(false /* useTransitions */);
    InitializeColor();
    UpdatePreviousColorRectangle();
}

void OnCheckerColorChanged | ( | winrt::DependencyObject const & | o,
 |  | winrt::DependencyProperty const & | p |
 | ) |  |  | [private]

Definition at line 675 of file ColorPicker.cpp.

{
    CreateColorPreviewCheckeredBackground();
    CreateAlphaSliderCheckeredBackground();
}

void OnColorChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 310 of file ColorPicker.cpp.

{
    // If we're in the process of internally updating the color, then we don't want to respond to the Color property changing,
    // aside from raising the ColorChanged event.
    if (!m_updatingColor)
    {
        winrt::Color color = Color();

        m_currentRgb = Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0);
        m_currentAlpha = color.A / 255.0;
        m_currentHsv = RgbToHsv(m_currentRgb);
        m_currentHex = GetCurrentHexValue();

        UpdateColorControls(ColorUpdateReason::ColorPropertyChanged);
    }

    winrt::Color oldColor = unbox_value<winrt::Color>(args.OldValue());
    winrt::Color newColor = unbox_value<winrt::Color>(args.NewValue());

    if (oldColor.A != newColor.A ||
        oldColor.R != newColor.R ||
        oldColor.G != newColor.G ||
        oldColor.B != newColor.B)
    {
        auto colorChangedEventArgs = winrt::make_self<ColorChangedEventArgs>();

        colorChangedEventArgs->OldColor(oldColor);
        colorChangedEventArgs->NewColor(newColor);

        m_colorChangedEventSource(*this, *colorChangedEventArgs);
    }
}

void OnColorPreviewRectangleGridSizeChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::SizeChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 681 of file ColorPicker.cpp.

{
    CreateColorPreviewCheckeredBackground();
}

void OnColorRepresentationComboBoxSelectionChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::SelectionChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 775 of file ColorPicker.cpp.

{
    /* Update UIA Name for Hex TextBox */
    if (auto&& colorRepresentationComboBox = m_colorRepresentationComboBox.get())
    {
        if (auto&& hexTextBox = m_hexTextBox.get())
        {
            if (colorRepresentationComboBox.SelectedIndex() == 0)
            {
                winrt::AutomationProperties::SetName(hexTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameRGBHexTextBox));
            }
            else
            {
                winrt::AutomationProperties::SetName(hexTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameHSVHexTextBox));
            }
        }
    }

    UpdateVisualState(true /* useTransitions */);
}

void OnColorSpectrumColorChanged | ( | const winrt::ColorSpectrum & | sender,
 |  | const winrt::ColorChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 643 of file ColorPicker.cpp.

{
    // If we're updating controls, then this is being raised in response to that,
    // so we'll ignore it.
    if (m_updatingControls)
    {
        return;
    }

    auto hsvColor = sender.HsvColor();
    UpdateColor(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor)), ColorUpdateReason::ColorSpectrumColorChanged);
}

void OnColorSpectrumComponentsChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 429 of file ColorPicker.cpp.

{
    UpdateThirdDimensionSlider();
    SetThirdDimensionSliderChannel();
}

void OnColorSpectrumSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 656 of file ColorPicker.cpp.

{
    // Since the ColorPicker is arranged vertically, the ColorSpectrum's height can be whatever we want it to be -
    // the width is the limiting factor.  Since we want it to always be a square, we'll set its height to whatever its width is.
    if (args.NewSize().Width != args.PreviousSize().Width)
    {
        m_colorSpectrum.get().Height(args.NewSize().Width);
    }
}

void OnHexTextChanging | ( | winrt::TextBox const & | sender,
 |  | winrt::TextBoxTextChangingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 963 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    auto&& hexTextBox = m_hexTextBox.get();

    // If the user hasn't entered a #, we'll do that for them, keeping the cursor
    // where it was before.
    const auto text = hexTextBox.Text();
    if (text.empty() || text.begin()[0] != '#')
    {
        hexTextBox.Text(wstring(L"#") + static_cast<wstring>(text));
        hexTextBox.SelectionStart(hexTextBox.Text().size());
    }

    // We'll respond to the text change if the user has entered a valid value.
    // Otherwise, we'll do nothing except mark the text box's contents as invalid.
    bool isAlphaEnabled = IsAlphaEnabled();
    auto [rgbValue, alphaValue] = [this, isAlphaEnabled]() {
        return isAlphaEnabled ?
            HexToRgba(m_hexTextBox.get().Text()) :
            std::make_tuple(HexToRgb(m_hexTextBox.get().Text()), 1.0);
    }();

    if ((rgbValue.r == -1 && rgbValue.g == -1 && rgbValue.b == -1 && alphaValue == -1) || alphaValue < 0 || alphaValue > 1)
    {
        m_isFocusedTextBoxValid = false;
    }
    else
    {
        m_isFocusedTextBoxValid = true;
        UpdateColor(ApplyConstraintsToRgbColor(rgbValue), ColorUpdateReason::HexTextBoxChanged);
        UpdateColor(alphaValue, ColorUpdateReason::HexTextBoxChanged);
    }
}

void OnHueTextChanging | ( | winrt::TextBox const & | sender,
 |  | winrt::TextBoxTextChangingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 846 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    // We'll respond to the text change if the user has entered a valid value.
    // Otherwise, we'll do nothing except mark the text box's contents as invalid.
    auto hueValue = TryParseInt(m_hueTextBox.get().Text());
    if (!hueValue.has_value() ||
        hueValue.value() < static_cast<unsigned long>(MinHue()) ||
        hueValue.value() > static_cast<unsigned long>(MaxHue()))
    {
        m_isFocusedTextBoxValid = false;
    }
    else
    {
        m_isFocusedTextBoxValid = true;
        UpdateColor(GetHsvColorFromTextBoxes(), ColorUpdateReason::HsvTextBoxChanged);
    }
}

void OnIsAlphaEnabledChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 349 of file ColorPicker.cpp.

{
    m_currentHex = GetCurrentHexValue();

    if (auto&& hexTextBox = m_hexTextBox.get())
    {
        m_updatingControls = true;
        hexTextBox.Text(m_currentHex);
        m_updatingControls = false;
    }

    OnPartVisibilityChanged(args);
}

void OnMinMaxHueChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 369 of file ColorPicker.cpp.

{
    int minHue = MinHue();
    int maxHue = MaxHue();

    if (minHue < 0 || minHue > 359)
    {
        throw winrt::hresult_invalid_argument(L"MinHue must be between 0 and 359.");
    }
    else if (maxHue < 0 || maxHue > 359)
    {
        throw winrt::hresult_invalid_argument(L"MaxHue must be between 0 and 359.");
    }

    m_currentHsv.h = max(static_cast<double>(minHue), min(m_currentHsv.h, static_cast<double>(maxHue)));

    UpdateColor(m_currentHsv, ColorUpdateReason::ColorPropertyChanged);
    UpdateThirdDimensionSlider();
}

void OnMinMaxSaturationChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 389 of file ColorPicker.cpp.

{
    int minSaturation = MinSaturation();
    int maxSaturation = MaxSaturation();

    if (minSaturation < 0 || minSaturation > 100)
    {
        throw winrt::hresult_invalid_argument(L"MinSaturation must be between 0 and 100.");
    }
    else if (maxSaturation < 0 || maxSaturation > 100)
    {
        throw winrt::hresult_invalid_argument(L"MaxSaturation must be between 0 and 100.");
    }

    m_currentHsv.s = max(static_cast<double>(minSaturation) / 100, min(m_currentHsv.s, static_cast<double>(maxSaturation) / 100));

    UpdateColor(m_currentHsv, ColorUpdateReason::ColorPropertyChanged);
    UpdateThirdDimensionSlider();
}

void OnMinMaxValueChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 409 of file ColorPicker.cpp.

{
    int minValue = MinValue();
    int maxValue = MaxValue();

    if (minValue < 0 || minValue > 100)
    {
        throw winrt::hresult_invalid_argument(L"MinValue must be between 0 and 100.");
    }
    else if (maxValue < 0 || maxValue > 100)
    {
        throw winrt::hresult_invalid_argument(L"MaxValue must be between 0 and 100.");
    }

    m_currentHsv.v = max(static_cast<double>(minValue) / 100, min(m_currentHsv.v, static_cast<double>(maxValue) / 100));

    UpdateColor(m_currentHsv, ColorUpdateReason::ColorPropertyChanged);
    UpdateThirdDimensionSlider();
}

void OnMoreButtonChecked | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 747 of file ColorPicker.cpp.

{
    m_textEntryGridOpened = true;
    UpdateMoreButton();
}

void OnMoreButtonClicked | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 741 of file ColorPicker.cpp.

{
    m_textEntryGridOpened = !m_textEntryGridOpened;
    UpdateMoreButton();
}

void OnMoreButtonUnchecked | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 753 of file ColorPicker.cpp.

{
    m_textEntryGridOpened = false;
    UpdateMoreButton();
}

void OnOrientationChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 435 of file ColorPicker.cpp.

{
    UpdateVisualState(true);
}

void OnPartVisibilityChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 364 of file ColorPicker.cpp.

{
    UpdateVisualState(true /* useTransitions */);
}

void OnPreviousColorChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 343 of file ColorPicker.cpp.

{
    UpdatePreviousColorRectangle();
    UpdateVisualState(true /* useTransitions */);
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 258 of file ColorPicker.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_ColorProperty)
    {
        OnColorChanged(args);
    }
    else if (property == s_PreviousColorProperty)
    {
        OnPreviousColorChanged(args);
    }
    else if (property == s_IsAlphaEnabledProperty)
    {
        OnIsAlphaEnabledChanged(args);
    }
    else if (property == s_IsColorSpectrumVisibleProperty ||
        property == s_IsColorPreviewVisibleProperty ||
        property == s_IsColorSliderVisibleProperty ||
        property == s_IsAlphaSliderVisibleProperty ||
        property == s_IsMoreButtonVisibleProperty ||
        property == s_IsColorChannelTextInputVisibleProperty ||
        property == s_IsAlphaTextInputVisibleProperty ||
        property == s_IsHexInputVisibleProperty)
    {
        OnPartVisibilityChanged(args);
    }
    else if (property == s_MinHueProperty ||
        property == s_MaxHueProperty)
    {
        OnMinMaxHueChanged(args);
    }
    else if (property == s_MinSaturationProperty ||
        property == s_MaxSaturationProperty)
    {
        OnMinMaxSaturationChanged(args);
    }
    else if (property == s_MinValueProperty ||
        property == s_MaxValueProperty)
    {
        OnMinMaxValueChanged(args);
    }
    else if (property == s_ColorSpectrumComponentsProperty)
    {
        OnColorSpectrumComponentsChanged(args);
    }
    else if (property == s_OrientationProperty)
    {
        OnOrientationChanged(args);
    }
}

void OnRgbTextChanging | ( | winrt::TextBox const & | sender,
 |  | winrt::TextBoxTextChangingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 820 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    // We'll respond to the text change if the user has entered a valid value.
    // Otherwise, we'll do nothing except mark the text box's contents as invalid.
    auto componentValue = TryParseInt(sender.Text());
    if (!componentValue.has_value() ||
        componentValue.value() < 0 ||
        componentValue.value() > 255)
    {
        m_isFocusedTextBoxValid = false;
    }
    else
    {
        m_isFocusedTextBoxValid = true;
        UpdateColor(ApplyConstraintsToRgbColor(GetRgbColorFromTextBoxes()), ColorUpdateReason::RgbTextBoxChanged);
    }
}

void OnSaturationTextChanging | ( | winrt::TextBox const & | sender,
 |  | winrt::TextBoxTextChangingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 872 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    // We'll respond to the text change if the user has entered a valid value.
    // Otherwise, we'll do nothing except mark the text box's contents as invalid.
    auto saturationValue = TryParseInt(m_saturationTextBox.get().Text());
    if (!saturationValue.has_value() ||
        saturationValue.value() < static_cast<unsigned long>(MinSaturation()) ||
        saturationValue.value() > static_cast<unsigned long>(MaxSaturation()))
    {
        m_isFocusedTextBoxValid = false;
    }
    else
    {
        m_isFocusedTextBoxValid = true;
        UpdateColor(GetHsvColorFromTextBoxes(), ColorUpdateReason::HsvTextBoxChanged);
    }
}

void OnTextBoxGotFocus | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 796 of file ColorPicker.cpp.

{
    winrt::TextBox textBox = sender.as<winrt::TextBox>();

    m_isFocusedTextBoxValid = true;
    m_previousString = textBox.Text();
}

void OnTextBoxLostFocus | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 804 of file ColorPicker.cpp.

{
    winrt::TextBox textBox = sender.as<winrt::TextBox>();

    // When a text box loses focus, we want to check whether its contents were valid.
    // If they weren't, then we'll roll back its contents to their last valid value.
    if (!m_isFocusedTextBoxValid)
    {
        textBox.Text(m_previousString);
    }

    // Now that we know that no text box is currently being edited, we'll update all of the color controls
    // in order to clear away any invalid values currently in any text box.
    UpdateColorControls(ColorUpdateReason::ColorPropertyChanged);
}

void OnThirdDimensionSliderValueChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::RangeBaseValueChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 691 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    winrt::ColorSpectrumComponents components = ColorSpectrumComponents();

    double h = m_currentHsv.h;
    double s = m_currentHsv.s;
    double v = m_currentHsv.v;

    switch (components)
    {
    case winrt::ColorSpectrumComponents::HueValue:
    case winrt::ColorSpectrumComponents::ValueHue:
        s = m_thirdDimensionSlider.get().Value() / 100.0;
        break;

    case winrt::ColorSpectrumComponents::HueSaturation:
    case winrt::ColorSpectrumComponents::SaturationHue:
        v = m_thirdDimensionSlider.get().Value() / 100.0;
        break;

    case winrt::ColorSpectrumComponents::ValueSaturation:
    case winrt::ColorSpectrumComponents::SaturationValue:
        h = m_thirdDimensionSlider.get().Value();
        break;
    }

    UpdateColor(Hsv(h, s, v), ColorUpdateReason::ThirdDimensionSliderChanged);
}

void OnUnloaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 666 of file ColorPicker.cpp.

{
    // If we're in the middle of creating image bitmaps while being unloaded,
    // we'll want to synchronously cancel it so we don't have any asynchronous actions
    // lingering beyond our lifetime.
    CancelAsyncAction(m_createColorPreviewRectangleCheckeredBackgroundBitmapAction);
    CancelAsyncAction(m_alphaSliderCheckeredBackgroundBitmapAction);
}

void OnValueTextChanging | ( | winrt::TextBox const & | sender,
 |  | winrt::TextBoxTextChangingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 898 of file ColorPicker.cpp.

{
    // If we're in the process of updating controls in response to a color change,
    // then we don't want to do anything in response to a control being updated,
    // since otherwise we'll get into an infinite loop of updating.
    if (m_updatingControls)
    {
        return;
    }

    // We'll respond to the text change if the user has entered a valid value.
    // Otherwise, we'll do nothing except mark the text box's contents as invalid.
    auto value = TryParseInt(m_valueTextBox.get().Text());
    if (!value.has_value() ||
        value.value() < static_cast<unsigned long>(MinValue()) ||
        value.value() > static_cast<unsigned long>(MaxValue()))
    {
        m_isFocusedTextBoxValid = false;
    }
    else
    {
        m_isFocusedTextBoxValid = true;
        UpdateColor(GetHsvColorFromTextBoxes(), ColorUpdateReason::HsvTextBoxChanged);
    }
}

void SetColorAndUpdateControls ( ColorUpdateReason reason ) [private]

Definition at line 518 of file ColorPicker.cpp.

{
    m_updatingColor = true;

    Color(ColorFromRgba(m_currentRgb, m_currentAlpha));
    UpdateColorControls(reason);

    m_updatingColor = false;
}

void SetThirdDimensionSliderChannel ( ) [private]

Definition at line 1144 of file ColorPicker.cpp.

{
    if (auto&& thirdDimensionSlider = m_thirdDimensionSlider.get())
    {
        switch (ColorSpectrumComponents())
        {
        case winrt::ColorSpectrumComponents::ValueSaturation:
        case winrt::ColorSpectrumComponents::SaturationValue:
            thirdDimensionSlider.ColorChannel(winrt::ColorPickerHsvChannel::Hue);
            winrt::AutomationProperties::SetName(thirdDimensionSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameHueSlider));
            break;

        case winrt::ColorSpectrumComponents::HueValue:
        case winrt::ColorSpectrumComponents::ValueHue:
            thirdDimensionSlider.ColorChannel(winrt::ColorPickerHsvChannel::Saturation);
            winrt::AutomationProperties::SetName(thirdDimensionSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameSaturationSlider));
            break;

        case winrt::ColorSpectrumComponents::HueSaturation:
        case winrt::ColorSpectrumComponents::SaturationHue:
            thirdDimensionSlider.ColorChannel(winrt::ColorPickerHsvChannel::Value);
            winrt::AutomationProperties::SetName(thirdDimensionSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameValueSlider));
            break;
        }
    }
}

void UpdateAlphaSlider ( ) [private]

Definition at line 1171 of file ColorPicker.cpp.

{
    if (!m_alphaSlider || !m_alphaSliderGradientBrush)
    {
        return;
    }

    auto&& alphaSlider = m_alphaSlider.get();
    auto&& alphaSliderGradientBrush = m_alphaSliderGradientBrush.get();

    // Since the slider changes only one color dimension, we can use a LinearGradientBrush
    // for its background instead of needing to manually set pixels ourselves.
    // We'll have the gradient go between the minimum and maximum values in the case where
    // the slider handles saturation or value, or in the case where it handles hue,
    // we'll have it go between red, yellow, green, cyan, blue, and purple, in that order.
    alphaSliderGradientBrush.GradientStops().Clear();

    alphaSlider.Minimum(0);
    alphaSlider.Maximum(100);
    alphaSlider.Value(m_currentAlpha * 100);

    AddGradientStop(alphaSliderGradientBrush, 0.0, m_currentHsv, 0.0);
    AddGradientStop(alphaSliderGradientBrush, 1.0, m_currentHsv, 1.0);
}

void UpdateColor | ( | const Rgb & | rgb,
 |  | ColorUpdateReason | reason |
 | ) |  |  | [private]

Definition at line 492 of file ColorPicker.cpp.

{
    m_currentRgb = rgb;
    m_currentHsv = RgbToHsv(m_currentRgb);
    m_currentHex = GetCurrentHexValue();

    SetColorAndUpdateControls(reason);
}

void UpdateColor | ( | const Hsv & | hsv,
 |  | ColorUpdateReason | reason |
 | ) |  |  | [private]

Definition at line 501 of file ColorPicker.cpp.

{
    m_currentHsv = hsv;
    m_currentRgb = HsvToRgb(hsv);
    m_currentHex = GetCurrentHexValue();

    SetColorAndUpdateControls(reason);
}

void UpdateColor | ( | double | alpha,
 |  | ColorUpdateReason | reason |
 | ) |  |  | [private]

Definition at line 510 of file ColorPicker.cpp.

{
    m_currentAlpha = alpha;
    m_currentHex = GetCurrentHexValue();

    SetColorAndUpdateControls(reason);
}

void UpdateColorControls ( ColorUpdateReason reason ) [private]

Definition at line 546 of file ColorPicker.cpp.

{
    // If we're updating the controls internally, we don't want to execute any of the controls'
    // event handlers, because that would then update the color, which would update the color controls,
    // and then we'd be in an infinite loop.
    m_updatingControls = true;

    // We pass in the reason why we're updating the color controls because
    // we don't want to re-update any control that was the cause of this update.
    // For example, if a user selected a color on the ColorSpectrum, then we
    // don't want to update the ColorSpectrum's color based on this change.
    if (reason != ColorUpdateReason::ColorSpectrumColorChanged && m_colorSpectrum)
    {
        m_colorSpectrum.get().HsvColor(winrt::float4{ static_cast<float>(m_currentHsv.h), static_cast<float>(m_currentHsv.s), static_cast<float>(m_currentHsv.v), static_cast<float>(m_currentAlpha) });
    }

    if (auto&& colorPreviewRectangle = m_colorPreviewRectangle.get())
    {
        auto color = Color();

        colorPreviewRectangle.Fill(winrt::SolidColorBrush(color));
    }

    if (reason != ColorUpdateReason::ThirdDimensionSliderChanged && m_thirdDimensionSlider)
    {
        UpdateThirdDimensionSlider();
    }

    if (reason != ColorUpdateReason::AlphaSliderChanged && m_alphaSlider)
    {
        UpdateAlphaSlider();
    }

    auto strongThis = get_strong();
    auto updateTextBoxes = [strongThis, reason]()
    {
        if (reason != ColorUpdateReason::RgbTextBoxChanged)
        {
            if (auto&& redTextBox = strongThis->m_redTextBox.get())
            {
                redTextBox.Text(to_wstring(static_cast<::byte>(round(strongThis->m_currentRgb.r * 255))));
            }

            if (auto&& greenTextBox = strongThis->m_greenTextBox.get())
            {
                greenTextBox.Text(to_wstring(static_cast<::byte>(round(strongThis->m_currentRgb.g * 255))));
            }

            if (auto&& blueTextBox = strongThis->m_blueTextBox.get())
            {
                blueTextBox.Text(to_wstring(static_cast<::byte>(round(strongThis->m_currentRgb.b * 255))));
            }
        }

        if (reason != ColorUpdateReason::HsvTextBoxChanged)
        {
            if (auto&& hueTextBox = strongThis->m_hueTextBox.get())
            {
                hueTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentHsv.h))));
            }

            if (auto&& saturationTextBox = strongThis->m_saturationTextBox.get())
            {
                saturationTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentHsv.s * 100))));
            }

            if (auto&& valueTextBox = strongThis->m_valueTextBox.get())
            {
                valueTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentHsv.v * 100))));
            }
        }

        if (reason != ColorUpdateReason::AlphaTextBoxChanged)
        {
            if (auto&& alphaTextBox = strongThis->m_alphaTextBox.get())
            {
                alphaTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentAlpha * 100))) + wstring(L"%"));
            }
        }

        if (reason != ColorUpdateReason::HexTextBoxChanged)
        {
            if (auto&& hexTextBox = strongThis->m_hexTextBox.get())
            {
                hexTextBox.Text(strongThis->m_currentHex);
            }
        }

    };

    updateTextBoxes();

    m_updatingControls = false;
}

void UpdateMoreButton ( ) [private]

Definition at line 759 of file ColorPicker.cpp.

{
    if (auto&& moreButton = m_moreButton.get())
    {
        winrt::AutomationProperties::SetName(moreButton, ResourceAccessor::GetLocalizedStringResource(m_textEntryGridOpened ? SR_AutomationNameMoreButtonExpanded : SR_AutomationNameMoreButtonCollapsed));
    }

    if (auto&& moreButtonLabel = m_moreButtonLabel.get())
    {
        moreButtonLabel.Text(ResourceAccessor::GetLocalizedStringResource(m_textEntryGridOpened ? SR_TextMoreButtonLabelExpanded : SR_TextMoreButtonLabelCollapsed));
    }

    UpdateVisualState(true /* useTransitions */);
}

void UpdatePreviousColorRectangle ( ) [private]

Definition at line 528 of file ColorPicker.cpp.

{
    if (auto&& previousColorRectangle = m_previousColorRectangle.get())
    {
        winrt::IReference<winrt::Color> previousColor = PreviousColor();

        if (previousColor)
        {
            previousColorRectangle.Fill(winrt::SolidColorBrush(previousColor.Value()));
        }
        else
        {
            previousColorRectangle.Fill(nullptr);
        }
    }
}

void UpdateThirdDimensionSlider ( ) [private]

Definition at line 1038 of file ColorPicker.cpp.

{
    if (!m_thirdDimensionSlider || !m_thirdDimensionSliderGradientBrush)
    {
        return;
    }

    auto&& thirdDimensionSlider = m_thirdDimensionSlider.get();
    auto&& thirdDimensionSliderGradientBrush = m_thirdDimensionSliderGradientBrush.get();

    // Since the slider changes only one color dimension, we can use a LinearGradientBrush
    // for its background instead of needing to manually set pixels ourselves.
    // We'll have the gradient go between the minimum and maximum values in the case where
    // the slider handles saturation or value, or in the case where it handles hue,
    // we'll have it go between red, yellow, green, cyan, blue, and purple, in that order.
    thirdDimensionSliderGradientBrush.GradientStops().Clear();

    switch (ColorSpectrumComponents())
    {
    case winrt::ColorSpectrumComponents::HueValue:
    case winrt::ColorSpectrumComponents::ValueHue:
    {
        int minSaturation = MinSaturation();
        int maxSaturation = MaxSaturation();

        thirdDimensionSlider.Minimum(minSaturation);
        thirdDimensionSlider.Maximum(maxSaturation);
        thirdDimensionSlider.Value(m_currentHsv.s * 100);

        // If MinSaturation >= MaxSaturation, then by convention MinSaturation is the only value
        // that the slider can take.
        if (minSaturation >= maxSaturation)
        {
            maxSaturation = minSaturation;
        }

        AddGradientStop(thirdDimensionSliderGradientBrush, 0.0, { m_currentHsv.h, minSaturation / 100.0, 1.0 }, 1.0);
        AddGradientStop(thirdDimensionSliderGradientBrush, 1.0, { m_currentHsv.h, maxSaturation / 100.0, 1.0 }, 1.0);
    }
    break;

    case winrt::ColorSpectrumComponents::HueSaturation:
    case winrt::ColorSpectrumComponents::SaturationHue:
    {
        int minValue = MinValue();
        int maxValue = MaxValue();

        thirdDimensionSlider.Minimum(minValue);
        thirdDimensionSlider.Maximum(maxValue);
        thirdDimensionSlider.Value(m_currentHsv.v * 100);

        // If MinValue >= MaxValue, then by convention MinValue is the only value
        // that the slider can take.
        if (minValue >= maxValue)
        {
            maxValue = minValue;
        }

        AddGradientStop(thirdDimensionSliderGradientBrush, 0.0, { m_currentHsv.h, m_currentHsv.s, minValue / 100.0 }, 1.0);
        AddGradientStop(thirdDimensionSliderGradientBrush, 1.0, { m_currentHsv.h, m_currentHsv.s, maxValue / 100.0 }, 1.0);
    }
    break;

    case winrt::ColorSpectrumComponents::ValueSaturation:
    case winrt::ColorSpectrumComponents::SaturationValue:
    {
        int minHue = MinHue();
        int maxHue = MaxHue();

        thirdDimensionSlider.Minimum(minHue);
        thirdDimensionSlider.Maximum(maxHue);
        thirdDimensionSlider.Value(m_currentHsv.h);

        // If MinHue >= MaxHue, then by convention MinHue is the only value
        // that the slider can take.
        if (minHue >= maxHue)
        {
            maxHue = minHue;
        }

        double minOffset = minHue / 359.0;
        double maxOffset = maxHue / 359.0;

        // With unclamped hue values, we have six different gradient stops, corresponding to red, yellow, green, cyan, blue, and purple.
        // However, with clamped hue values, we may not need all of those gradient stops.
        // We know we need a gradient stop at the start and end corresponding to the min and max values for hue,
        // and then in the middle, we'll add any gradient stops corresponding to the hue of those six pure colors that exist
        // between the min and max hue.
        AddGradientStop(thirdDimensionSliderGradientBrush, 0.0, { static_cast<double>(minHue), 1.0, 1.0 }, 1.0);

        for (int sextant = 1; sextant <= 5; sextant++)
        {
            double offset = sextant / 6.0;

            if (minOffset < offset && maxOffset > offset)
            {
                AddGradientStop(thirdDimensionSliderGradientBrush, (offset - minOffset) / (maxOffset - minOffset), { 60.0 * sextant, 1.0, 1.0 }, 1.0);
            }
        }

        AddGradientStop(thirdDimensionSliderGradientBrush, 1.0, { static_cast<double>(maxHue), 1.0, 1.0 }, 1.0);
    }
    break;
    }
}

void UpdateVisualState ( bool useTransitions ) [private]

Definition at line 440 of file ColorPicker.cpp.

{
    winrt::IReference<winrt::Color> previousColor = PreviousColor();
    bool isAlphaEnabled = IsAlphaEnabled();
    bool isColorSpectrumVisible = IsColorSpectrumVisible();
    const bool isVerticalOrientation = Orientation() == winrt::Orientation::Vertical;

    const wchar_t *previousColorStateName;

    if (isColorSpectrumVisible)
    {
        previousColorStateName = previousColor ? L"PreviousColorVisibleVertical" : L"PreviousColorCollapsedVertical";
    }
    else
    {
        previousColorStateName = previousColor ? L"PreviousColorVisibleHorizontal" : L"PreviousColorCollapsedHorizontal";
    }

    winrt::VisualStateManager::GoToState(*this, isColorSpectrumVisible ? L"ColorSpectrumVisible" : L"ColorSpectrumCollapsed", useTransitions);
    winrt::VisualStateManager::GoToState(*this, previousColorStateName, useTransitions);
    winrt::VisualStateManager::GoToState(*this, IsColorPreviewVisible() ? L"ColorPreviewVisible" : L"ColorPreviewCollapsed", useTransitions);
    winrt::VisualStateManager::GoToState(*this, IsColorSliderVisible() ? L"ThirdDimensionSliderVisible" : L"ThirdDimensionSliderCollapsed", useTransitions);
    winrt::VisualStateManager::GoToState(*this, isAlphaEnabled && IsAlphaSliderVisible() ? L"AlphaSliderVisible" : L"AlphaSliderCollapsed", useTransitions);
    // More button is disabled in horizontal orientation; only respect IsMoreButtonVisible states when switching to Vertical orientation.
    winrt::VisualStateManager::GoToState(*this, IsMoreButtonVisible() && isVerticalOrientation ? L"MoreButtonVisible" : L"MoreButtonCollapsed", useTransitions);
    winrt::VisualStateManager::GoToState(*this, !IsMoreButtonVisible() || m_textEntryGridOpened || !isVerticalOrientation ? L"TextEntryGridVisible" : L"TextEntryGridCollapsed", useTransitions);

    if (auto&& colorRepresentationComboBox = m_colorRepresentationComboBox.get())
    {
        winrt::VisualStateManager::GoToState(*this, colorRepresentationComboBox.SelectedIndex() == 0 ? L"RgbSelected" : L"HsvSelected", useTransitions);
    }

    winrt::VisualStateManager::GoToState(*this, IsColorChannelTextInputVisible() ? L"ColorChannelTextInputVisible" : L"ColorChannelTextInputCollapsed", useTransitions);
    winrt::VisualStateManager::GoToState(*this, isAlphaEnabled && IsAlphaTextInputVisible() ? L"AlphaTextInputVisible" : L"AlphaTextInputCollapsed", useTransitions);
    winrt::VisualStateManager::GoToState(*this, IsHexInputVisible() ? L"HexInputVisible" : L"HexInputCollapsed", useTransitions);
    winrt::VisualStateManager::GoToState(*this, isAlphaEnabled ? L"AlphaEnabled" : L"AlphaDisabled", useTransitions);
    winrt::VisualStateManager::GoToState(*this, isVerticalOrientation ? L"Vertical" : L"Horizontal", useTransitions);

}

The documentation for this class was generated from the following files:
  • ColorPicker/ColorPicker.h
  • ColorPicker/ColorPicker.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ColorPickerProperties Class Reference

#include "ColorPicker.properties.h"

Inherited by ColorPicker.

List of all members.

Public Member Functions

ColorPickerProperties ()
void | Color (winrt::Color const &value)
winrt::Color | Color ()
winrt::event_token | ColorChanged (winrt::TypedEventHandler< winrt::ColorPicker, winrt::ColorChangedEventArgs > const &value)
void | ColorChanged (winrt::event_token const &token)
void | ColorSpectrumComponents (winrt::ColorSpectrumComponents const &value)
winrt::ColorSpectrumComponents | ColorSpectrumComponents ()
void | ColorSpectrumShape (winrt::ColorSpectrumShape const &value)
winrt::ColorSpectrumShape | ColorSpectrumShape ()
void | IsAlphaEnabled (bool value)
bool | IsAlphaEnabled ()
void | IsAlphaSliderVisible (bool value)
bool | IsAlphaSliderVisible ()
void | IsAlphaTextInputVisible (bool value)
bool | IsAlphaTextInputVisible ()
void | IsColorChannelTextInputVisible (bool value)
bool | IsColorChannelTextInputVisible ()
void | IsColorPreviewVisible (bool value)
bool | IsColorPreviewVisible ()
void | IsColorSliderVisible (bool value)
bool | IsColorSliderVisible ()
void | IsColorSpectrumVisible (bool value)
bool | IsColorSpectrumVisible ()
void | IsHexInputVisible (bool value)
bool | IsHexInputVisible ()
void | IsMoreButtonVisible (bool value)
bool | IsMoreButtonVisible ()
int | MaxHue ()
void | MaxHue (int value)
int | MaxSaturation ()
void | MaxSaturation (int value)
int | MaxValue ()
void | MaxValue (int value)
void | MinHue (int value)
int | MinHue ()
int | MinSaturation ()
void | MinSaturation (int value)
int | MinValue ()
void | MinValue (int value)
winrt::Orientation | Orientation ()
void | Orientation (winrt::Orientation const &value)
winrt::IReference< winrt::Color > | PreviousColor ()
void | PreviousColor (winrt::IReference< winrt::Color > const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ColorProperty ()
static winrt::DependencyProperty | ColorSpectrumComponentsProperty ()
static winrt::DependencyProperty | ColorSpectrumShapeProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsAlphaEnabledProperty ()
static winrt::DependencyProperty | IsAlphaSliderVisibleProperty ()
static winrt::DependencyProperty | IsAlphaTextInputVisibleProperty ()
static winrt::DependencyProperty | IsColorChannelTextInputVisibleProperty ()
static winrt::DependencyProperty | IsColorPreviewVisibleProperty ()
static winrt::DependencyProperty | IsColorSliderVisibleProperty ()
static winrt::DependencyProperty | IsColorSpectrumVisibleProperty ()
static winrt::DependencyProperty | IsHexInputVisibleProperty ()
static winrt::DependencyProperty | IsMoreButtonVisibleProperty ()
static winrt::DependencyProperty | MaxHueProperty ()
static winrt::DependencyProperty | MaxSaturationProperty ()
static winrt::DependencyProperty | MaxValueProperty ()
static winrt::DependencyProperty | MinHueProperty ()
static winrt::DependencyProperty | MinSaturationProperty ()
static winrt::DependencyProperty | MinValueProperty ()
static void | OnColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnColorSpectrumComponentsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnColorSpectrumShapePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsAlphaEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsAlphaSliderVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsAlphaTextInputVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsColorChannelTextInputVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsColorPreviewVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsColorSliderVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsColorSpectrumVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsHexInputVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsMoreButtonVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxHuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxSaturationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinHuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinSaturationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreviousColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | OrientationProperty ()
static winrt::DependencyProperty | PreviousColorProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ColorPicker,
winrt::ColorChangedEventArgs > > 		m_colorChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ColorProperty
static GlobalDependencyProperty | s_ColorSpectrumComponentsProperty
static GlobalDependencyProperty | s_ColorSpectrumShapeProperty
static GlobalDependencyProperty | s_IsAlphaEnabledProperty
static GlobalDependencyProperty | s_IsAlphaSliderVisibleProperty
static GlobalDependencyProperty | s_IsAlphaTextInputVisibleProperty
static GlobalDependencyProperty | s_IsColorChannelTextInputVisibleProperty
static GlobalDependencyProperty | s_IsColorPreviewVisibleProperty
static GlobalDependencyProperty | s_IsColorSliderVisibleProperty
static GlobalDependencyProperty | s_IsColorSpectrumVisibleProperty
static GlobalDependencyProperty | s_IsHexInputVisibleProperty
static GlobalDependencyProperty | s_IsMoreButtonVisibleProperty
static GlobalDependencyProperty | s_MaxHueProperty
static GlobalDependencyProperty | s_MaxSaturationProperty
static GlobalDependencyProperty | s_MaxValueProperty
static GlobalDependencyProperty | s_MinHueProperty
static GlobalDependencyProperty | s_MinSaturationProperty
static GlobalDependencyProperty | s_MinValueProperty
static GlobalDependencyProperty | s_OrientationProperty
static GlobalDependencyProperty | s_PreviousColorProperty

Detailed Description

Definition at line 7 of file ColorPicker.properties.h.

Constructor & Destructor Documentation

ColorPickerProperties ( )

Definition at line 37 of file ColorPicker.properties.cpp.

    : m_colorChangedEventSource{static_cast<ColorPicker*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
void Color ( winrt::Color const & value )
winrt::Color Color ( )
winrt::event_token ColorChanged ( winrt::TypedEventHandler< winrt::ColorPicker, winrt::ColorChangedEventArgs > const & value )
void ColorChanged ( winrt::event_token const & token )
static winrt::DependencyProperty ColorProperty ( ) [inline, static]

Definition at line 72 of file ColorPicker.properties.h.

{ return s_ColorProperty; }

winrt::ColorSpectrumComponents ColorSpectrumComponents ( )
void ColorSpectrumComponents ( winrt::ColorSpectrumComponents const & value )
static winrt::DependencyProperty ColorSpectrumComponentsProperty ( ) [inline, static]

Definition at line 73 of file ColorPicker.properties.h.

{ return s_ColorSpectrumComponentsProperty; }

void ColorSpectrumShape ( winrt::ColorSpectrumShape const & value )
winrt::ColorSpectrumShape ColorSpectrumShape ( )
static winrt::DependencyProperty ColorSpectrumShapeProperty ( ) [inline, static]

Definition at line 74 of file ColorPicker.properties.h.

{ return s_ColorSpectrumShapeProperty; }

static void EnsureProperties ( ) [static]
bool IsAlphaEnabled ( )
void IsAlphaEnabled ( bool value )
static winrt::DependencyProperty IsAlphaEnabledProperty ( ) [inline, static]

Definition at line 75 of file ColorPicker.properties.h.

{ return s_IsAlphaEnabledProperty; }

void IsAlphaSliderVisible ( bool value )
bool IsAlphaSliderVisible ( )
static winrt::DependencyProperty IsAlphaSliderVisibleProperty ( ) [inline, static]

Definition at line 76 of file ColorPicker.properties.h.

{ return s_IsAlphaSliderVisibleProperty; }

void IsAlphaTextInputVisible ( bool value )
bool IsAlphaTextInputVisible ( )
static winrt::DependencyProperty IsAlphaTextInputVisibleProperty ( ) [inline, static]

Definition at line 77 of file ColorPicker.properties.h.

{ return s_IsAlphaTextInputVisibleProperty; }

void IsColorChannelTextInputVisible ( bool value )
bool IsColorChannelTextInputVisible ( )
static winrt::DependencyProperty IsColorChannelTextInputVisibleProperty ( ) [inline, static]

Definition at line 78 of file ColorPicker.properties.h.

{ return s_IsColorChannelTextInputVisibleProperty; }

bool IsColorPreviewVisible ( )
void IsColorPreviewVisible ( bool value )
static winrt::DependencyProperty IsColorPreviewVisibleProperty ( ) [inline, static]

Definition at line 79 of file ColorPicker.properties.h.

{ return s_IsColorPreviewVisibleProperty; }

void IsColorSliderVisible ( bool value )
bool IsColorSliderVisible ( )
static winrt::DependencyProperty IsColorSliderVisibleProperty ( ) [inline, static]

Definition at line 80 of file ColorPicker.properties.h.

{ return s_IsColorSliderVisibleProperty; }

void IsColorSpectrumVisible ( bool value )
bool IsColorSpectrumVisible ( )
static winrt::DependencyProperty IsColorSpectrumVisibleProperty ( ) [inline, static]

Definition at line 81 of file ColorPicker.properties.h.

{ return s_IsColorSpectrumVisibleProperty; }

void IsHexInputVisible ( bool value )
bool IsHexInputVisible ( )
static winrt::DependencyProperty IsHexInputVisibleProperty ( ) [inline, static]

Definition at line 82 of file ColorPicker.properties.h.

{ return s_IsHexInputVisibleProperty; }

void IsMoreButtonVisible ( bool value )
bool IsMoreButtonVisible ( )
static winrt::DependencyProperty IsMoreButtonVisibleProperty ( ) [inline, static]

Definition at line 83 of file ColorPicker.properties.h.

{ return s_IsMoreButtonVisibleProperty; }

void MaxHue ( int value )
int MaxHue ( )
static winrt::DependencyProperty MaxHueProperty ( ) [inline, static]

Definition at line 84 of file ColorPicker.properties.h.

{ return s_MaxHueProperty; }

void MaxSaturation ( int value )
int MaxSaturation ( )
static winrt::DependencyProperty MaxSaturationProperty ( ) [inline, static]

Definition at line 85 of file ColorPicker.properties.h.

{ return s_MaxSaturationProperty; }

void MaxValue ( int value )
int MaxValue ( )
static winrt::DependencyProperty MaxValueProperty ( ) [inline, static]

Definition at line 86 of file ColorPicker.properties.h.

{ return s_MaxValueProperty; }

int MinHue ( )
void MinHue ( int value )
static winrt::DependencyProperty MinHueProperty ( ) [inline, static]

Definition at line 87 of file ColorPicker.properties.h.

{ return s_MinHueProperty; }

void MinSaturation ( int value )
int MinSaturation ( )
static winrt::DependencyProperty MinSaturationProperty ( ) [inline, static]

Definition at line 88 of file ColorPicker.properties.h.

{ return s_MinSaturationProperty; }

void MinValue ( int value )
int MinValue ( )
static winrt::DependencyProperty MinValueProperty ( ) [inline, static]

Definition at line 89 of file ColorPicker.properties.h.

{ return s_MinValueProperty; }

static void OnColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnColorSpectrumComponentsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnColorSpectrumShapePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsAlphaEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsAlphaSliderVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsAlphaTextInputVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsColorChannelTextInputVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsColorPreviewVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsColorSliderVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsColorSpectrumVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsHexInputVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsMoreButtonVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxHuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxSaturationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinHuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinSaturationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPreviousColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::Orientation Orientation ( )
void Orientation ( winrt::Orientation const & value )
static winrt::DependencyProperty OrientationProperty ( ) [inline, static]

Definition at line 90 of file ColorPicker.properties.h.

{ return s_OrientationProperty; }

void PreviousColor ( winrt::IReference< winrt::Color > const & value )
winrt::IReference<winrt::Color> PreviousColor ( )
static winrt::DependencyProperty PreviousColorProperty ( ) [inline, static]

Definition at line 91 of file ColorPicker.properties.h.

{ return s_PreviousColorProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ColorPicker, winrt::ColorChangedEventArgs> > m_colorChangedEventSource

Definition at line 117 of file ColorPicker.properties.h.

GlobalDependencyProperty s_ColorProperty [static]

Definition at line 93 of file ColorPicker.properties.h.

GlobalDependencyProperty s_ColorSpectrumComponentsProperty [static]

Definition at line 94 of file ColorPicker.properties.h.

GlobalDependencyProperty s_ColorSpectrumShapeProperty [static]

Definition at line 95 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsAlphaEnabledProperty [static]

Definition at line 96 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsAlphaSliderVisibleProperty [static]

Definition at line 97 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsAlphaTextInputVisibleProperty [static]

Definition at line 98 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsColorChannelTextInputVisibleProperty [static]

Definition at line 99 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsColorPreviewVisibleProperty [static]

Definition at line 100 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsColorSliderVisibleProperty [static]

Definition at line 101 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsColorSpectrumVisibleProperty [static]

Definition at line 102 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsHexInputVisibleProperty [static]

Definition at line 103 of file ColorPicker.properties.h.

GlobalDependencyProperty s_IsMoreButtonVisibleProperty [static]

Definition at line 104 of file ColorPicker.properties.h.

GlobalDependencyProperty s_MaxHueProperty [static]

Definition at line 105 of file ColorPicker.properties.h.

GlobalDependencyProperty s_MaxSaturationProperty [static]

Definition at line 106 of file ColorPicker.properties.h.

GlobalDependencyProperty s_MaxValueProperty [static]

Definition at line 107 of file ColorPicker.properties.h.

GlobalDependencyProperty s_MinHueProperty [static]

Definition at line 108 of file ColorPicker.properties.h.

GlobalDependencyProperty s_MinSaturationProperty [static]

Definition at line 109 of file ColorPicker.properties.h.

GlobalDependencyProperty s_MinValueProperty [static]

Definition at line 110 of file ColorPicker.properties.h.

GlobalDependencyProperty s_OrientationProperty [static]

Definition at line 111 of file ColorPicker.properties.h.

GlobalDependencyProperty s_PreviousColorProperty [static]

Definition at line 112 of file ColorPicker.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ColorPicker.properties.h
  • Generated/ColorPicker.properties.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerSlider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ColorPickerSlider Class Reference

#include "ColorPickerSlider.h"

Inherits ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT >, and ColorPickerSliderProperties.

List of all members.

Public Member Functions

ColorPickerSlider ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnGotFocus (winrt::RoutedEventArgs const &e)
void | OnKeyDown (winrt::KeyRoutedEventArgs const &e)
void | OnLostFocus (winrt::RoutedEventArgs const &e)

Private Member Functions

winrt::ColorPicker | GetParentColorPicker ()
winrt::hstring | GetToolTipString ()
void | OnValueChangedEvent (winrt::IInspectable const &sender, winrt::RangeBaseValueChangedEventArgs const &args)

Detailed Description

Definition at line 9 of file ColorPickerSlider.h.

Constructor & Destructor Documentation

ColorPickerSlider ( )

Definition at line 13 of file ColorPickerSlider.cpp.

{
    // We want the ColorPickerSlider to pick up everything for its default style from the Slider's default style,
    // since its purpose is just to turn off keyboarding.  So we'll give it Slider's control name as its default style key
    // instead of ColorPickerSlider.
    winrt::IControlProtected controlProtected = *this;
    auto propertyValue = box_value(L"Microsoft.UI.Xaml.Controls.Slider");
    controlProtected.DefaultStyleKey(propertyValue);

    ValueChanged({ this, &ColorPickerSlider::OnValueChangedEvent });
}

Member Function Documentation

winrt::ColorPicker GetParentColorPicker ( ) [private]

Definition at line 195 of file ColorPickerSlider.cpp.

{
    winrt::ColorPicker parentColorPicker{ nullptr };
    winrt::DependencyObject currentObject = *this;

    while (currentObject && !(parentColorPicker = currentObject.try_as<winrt::ColorPicker>()))
    {
        currentObject = winrt::VisualTreeHelper::GetParent(currentObject);
    }

    return parentColorPicker;
}

winrt::hstring GetToolTipString ( ) [private]

Definition at line 208 of file ColorPickerSlider.cpp.

{
    const unsigned int sliderValue = static_cast<unsigned int>(round(Value()));

    if (ColorChannel() == winrt::ColorPickerHsvChannel::Alpha)
    {
        return StringUtil::FormatString(
            ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringAlphaSlider),
            sliderValue);
    }
    else
    {
        winrt::ColorPicker parentColorPicker = GetParentColorPicker();
        if (parentColorPicker)
        {
            Hsv currentHsv = winrt::get_self<ColorPicker>(parentColorPicker)->GetCurrentHsv();
            winrt::hstring localizedString;

            switch (ColorChannel())
            {
            case winrt::ColorPickerHsvChannel::Hue:
                currentHsv.h = Value();
                localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringHueSliderWithColorName);
                break;

            case winrt::ColorPickerHsvChannel::Saturation:
                localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringSaturationSliderWithColorName);
                currentHsv.s = Value() / 100;
                break;

            case winrt::ColorPickerHsvChannel::Value:
                localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringValueSliderWithColorName);
                currentHsv.v = Value() / 100;
                break;
            default:
                throw winrt::hresult_error(E_FAIL);
            }

            return StringUtil::FormatString(
                localizedString,
                sliderValue,
                winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(currentHsv))).data());
        }
        else
        {
            winrt::hstring localizedString;
            switch (ColorChannel())
            {
            case winrt::ColorPickerHsvChannel::Hue:
                localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringHueSliderWithoutColorName);
                break;
            case winrt::ColorPickerHsvChannel::Saturation:
                localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringSaturationSliderWithoutColorName);
                break;
            case winrt::ColorPickerHsvChannel::Value:
                localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringValueSliderWithoutColorName);
                break;
            default:
                throw winrt::hresult_error(E_FAIL);
            }

            return StringUtil::FormatString(
                localizedString,
                sliderValue);
        }
    }
}

void OnApplyTemplate ( )

Definition at line 30 of file ColorPickerSlider.cpp.

{
    __super::OnApplyTemplate();

    winrt::IControlProtected thisAsControlProtected = *this;

    m_toolTip.set(GetTemplateChildT<winrt::ToolTip>(L"ToolTip", thisAsControlProtected));

    if (auto toolTip = m_toolTip.get())
    {
        toolTip.Content(box_value(GetToolTipString()));
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 25 of file ColorPickerSlider.cpp.

{
    return winrt::make<ColorPickerSliderAutomationPeer>(*this);
}

void OnGotFocus ( winrt::RoutedEventArgs const & e )

Definition at line 145 of file ColorPickerSlider.cpp.

{
    if (auto toolTip = m_toolTip.get())
    {
        toolTip.Content(box_value(GetToolTipString()));
        toolTip.IsEnabled(true);
        toolTip.IsOpen(true);
    }
}

void OnKeyDown ( winrt::KeyRoutedEventArgs const & e )

Definition at line 44 of file ColorPickerSlider.cpp.

{
    if (args.Key() != winrt::VirtualKey::Left &&
        args.Key() != winrt::VirtualKey::Right &&
        args.Key() != winrt::VirtualKey::Up &&
        args.Key() != winrt::VirtualKey::Down)
    {
        __super::OnKeyDown(args);
        return;
    }

    winrt::ColorPicker parentColorPicker = GetParentColorPicker();

    if (!parentColorPicker)
    {
        return;
    }

    const bool isControlDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    double minBound = 0;
    double maxBound = 0;

    Hsv currentHsv = winrt::get_self<ColorPicker>(parentColorPicker)->GetCurrentHsv();
    double currentAlpha = 0;

    switch (ColorChannel())
    {
    case winrt::ColorPickerHsvChannel::Hue:
        minBound = parentColorPicker.MinHue();
        maxBound = parentColorPicker.MaxHue();
        currentHsv.h = Value();
        break;

    case winrt::ColorPickerHsvChannel::Saturation:
        minBound = parentColorPicker.MinSaturation();
        maxBound = parentColorPicker.MaxSaturation();
        currentHsv.s = Value() / 100;
        break;

    case winrt::ColorPickerHsvChannel::Value:
        minBound = parentColorPicker.MinValue();
        maxBound = parentColorPicker.MaxValue();
        currentHsv.v = Value() / 100;
        break;

    case winrt::ColorPickerHsvChannel::Alpha:
        minBound = 0;
        maxBound = 100;
        currentAlpha = Value() / 100;
        break;

    default:
        throw winrt::hresult_error(E_FAIL);
    }

    const bool shouldInvertHorizontalDirection = FlowDirection() == winrt::FlowDirection::RightToLeft && !IsDirectionReversed();

    const IncrementDirection direction =
        ((args.Key() == winrt::VirtualKey::Left && !shouldInvertHorizontalDirection)    ||
            (args.Key() == winrt::VirtualKey::Right && shouldInvertHorizontalDirection) ||
             args.Key() == winrt::VirtualKey::Down) ?
        IncrementDirection::Lower :
        IncrementDirection::Higher;

    const IncrementAmount amount = isControlDown ? IncrementAmount::Large : IncrementAmount::Small;

    if (ColorChannel() != winrt::ColorPickerHsvChannel::Alpha)
    {
        currentHsv = IncrementColorChannel(currentHsv, ColorChannel(), direction, amount, false /* shouldWrap */, minBound, maxBound);
    }
    else
    {
        currentAlpha = IncrementAlphaChannel(currentAlpha, direction, amount, false /* shouldWrap */, minBound, maxBound);
    }

    switch (ColorChannel())
    {
    case winrt::ColorPickerHsvChannel::Hue:
        Value(currentHsv.h);
        break;

    case winrt::ColorPickerHsvChannel::Saturation:
        Value(currentHsv.s * 100);
        break;

    case winrt::ColorPickerHsvChannel::Value:
        Value(currentHsv.v * 100);
        break;

    case winrt::ColorPickerHsvChannel::Alpha:
        Value(currentAlpha * 100);
        break;

    default:
        MUX_ASSERT(false);
    }

    args.Handled(true);
}

void OnLostFocus ( winrt::RoutedEventArgs const & e )

Definition at line 155 of file ColorPickerSlider.cpp.

{
    if (auto toolTip = m_toolTip.get())
    {
        toolTip.IsOpen(false);
    }
}

void OnValueChangedEvent | ( | winrt::IInspectable const & | sender,
 |  | winrt::RangeBaseValueChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 163 of file ColorPickerSlider.cpp.

{
    if (auto toolTip = m_toolTip.get())
    {
        toolTip.Content(box_value(GetToolTipString()));

        // ToolTip doesn't currently provide any way to re-run its placement logic if its placement target moves,
        // so toggling IsEnabled induces it to do that without incurring any visual glitches.
        toolTip.IsEnabled(false);
        toolTip.IsEnabled(true);
    }

    winrt::DependencyObject currentObject = *this;
    winrt::ColorPicker owningColorPicker{ nullptr };

    while (currentObject && (owningColorPicker = currentObject.try_as<winrt::ColorPicker>()) == nullptr)
    {
        currentObject = winrt::VisualTreeHelper::GetParent(currentObject);
    }

    if (owningColorPicker)
    {
        const winrt::Color oldColor = owningColorPicker.Color();
        Hsv hsv = RgbToHsv(RgbFromColor(oldColor));
        hsv.v = args.NewValue() / 100.0;
        const winrt::Color newColor = ColorFromRgba(HsvToRgb(hsv));

        winrt::ColorPickerSliderAutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this).as<winrt::ColorPickerSliderAutomationPeer>();
        winrt::get_self<ColorPickerSliderAutomationPeer>(peer)->RaisePropertyChangedEvent(oldColor, newColor, static_cast<int>(round(args.OldValue())), static_cast<int>(round(args.NewValue())));
    }
}

The documentation for this class was generated from the following files:
  • ColorPicker/ColorPickerSlider.h
  • ColorPicker/ColorPickerSlider.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerSliderAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ColorPickerSliderAutomationPeer Class Reference

#include "ColorPickerSliderAutomationPeer.h"

Inherits ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider >.

List of all members.

Public Member Functions

ColorPickerSliderAutomationPeer (winrt::ColorPickerSlider const &owner)
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | IsReadOnly ()
void | RaisePropertyChangedEvent (winrt::Color oldColor, winrt::Color newColor, int oldValue, int newValue)
void | SetValue (winrt::hstring const &value)
winrt::hstring | Value ()

Private Member Functions

winrt::hstring | GetValueString (winrt::Color color, int value)

Detailed Description

Definition at line 10 of file ColorPickerSliderAutomationPeer.h.

Constructor & Destructor Documentation

ColorPickerSliderAutomationPeer ( winrt::ColorPickerSlider const & owner )

Definition at line 14 of file ColorPickerSliderAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file ColorPickerSliderAutomationPeer.cpp.

{
    // If this slider is handling the alpha channel, then we don't want to do anything special for it -
    // in that case, we'll just return the base SliderAutomationPeer.
    if (Owner().as<winrt::ColorPickerSlider>().ColorChannel() != winrt::ColorPickerHsvChannel::Alpha && patternInterface == winrt::PatternInterface::Value)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::hstring GetValueString | ( | winrt::Color | color,
 |  | int | value |
 | ) |  |  | [private]

Definition at line 73 of file ColorPickerSliderAutomationPeer.cpp.

{
    winrt::hstring resourceStringWithName;
    switch (Owner().as<winrt::ColorPickerSlider>().ColorChannel())
    {
    case winrt::ColorPickerHsvChannel::Hue:
        resourceStringWithName = ResourceAccessor::GetLocalizedStringResource(SR_ValueStringHueSliderWithColorName);
         break;
    case winrt::ColorPickerHsvChannel::Saturation:
        resourceStringWithName = ResourceAccessor::GetLocalizedStringResource(SR_ValueStringSaturationSliderWithColorName);
        break;
    case winrt::ColorPickerHsvChannel::Value:
        resourceStringWithName = ResourceAccessor::GetLocalizedStringResource(SR_ValueStringValueSliderWithColorName);
        break;
    default:
        return L"";
    }

    return StringUtil::FormatString(
        resourceStringWithName,
        value,
        winrt::ColorDisplayNameHelper::ToDisplayName(color).data());
}

bool IsReadOnly ( )

Definition at line 31 of file ColorPickerSliderAutomationPeer.cpp.

{
    return false;
}

void RaisePropertyChangedEvent | ( | winrt::Color | oldColor,
 |  | winrt::Color | newColor,
 |  | int | oldValue,
 |  | int | newValue
 | ) |  |

Definition at line 65 of file ColorPickerSliderAutomationPeer.cpp.

{
    winrt::hstring oldValueString = GetValueString(oldColor, oldValue);
    winrt::hstring newValueString = GetValueString(newColor, newValue);

    __super::RaisePropertyChangedEvent(winrt::ValuePatternIdentifiers::ValueProperty(), box_value(oldValueString), box_value(newValueString));
}

void SetValue ( winrt::hstring const & value )

Definition at line 60 of file ColorPickerSliderAutomationPeer.cpp.

{
    MUX_ASSERT(false); // Not implemented.
}

winrt::hstring Value ( )

Definition at line 36 of file ColorPickerSliderAutomationPeer.cpp.

{
    winrt::ColorPickerSlider owner = Owner().as<winrt::ColorPickerSlider>();
    winrt::DependencyObject currentObject = owner;
    winrt::ColorPicker owningColorPicker{ nullptr };

    while (currentObject && !(owningColorPicker = currentObject.try_as<winrt::ColorPicker>()))
    {
        currentObject = winrt::VisualTreeHelper::GetParent(currentObject);
    }

    if (owningColorPicker)
    {
        const winrt::Color color = owningColorPicker.Color();
        const double sliderValue = owner.Value();

        return GetValueString(color, static_cast<int>(round(sliderValue)));
    }
    else
    {
        return L"";
    }
}

The documentation for this class was generated from the following files:
  • ColorPicker/ColorPickerSliderAutomationPeer.h
  • ColorPicker/ColorPickerSliderAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerSliderProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ColorPickerSliderProperties Class Reference

#include "ColorPickerSlider.properties.h"

Inherited by ColorPickerSlider.

List of all members.

Public Member Functions

ColorPickerSliderProperties ()
winrt::ColorPickerHsvChannel | ColorChannel ()
void | ColorChannel (winrt::ColorPickerHsvChannel const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ColorChannelProperty ()
static void | EnsureProperties ()

Static Public Attributes

static GlobalDependencyProperty | s_ColorChannelProperty

Detailed Description

Definition at line 7 of file ColorPickerSlider.properties.h.

Constructor & Destructor Documentation

ColorPickerSliderProperties ( )

Definition at line 18 of file ColorPickerSlider.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file ColorPickerSlider.properties.cpp.

{
    s_ColorChannelProperty = nullptr;
}

winrt::ColorPickerHsvChannel ColorChannel ( )

Definition at line 51 of file ColorPickerSlider.properties.cpp.

{
    return ValueHelper<winrt::ColorPickerHsvChannel>::CastOrUnbox(static_cast<ColorPickerSlider*>(this)->GetValue(s_ColorChannelProperty));
}

void ColorChannel ( winrt::ColorPickerHsvChannel const & value )

Definition at line 43 of file ColorPickerSlider.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ColorPickerSlider*>(this)->SetValue(s_ColorChannelProperty, ValueHelper<winrt::ColorPickerHsvChannel>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ColorChannelProperty ( ) [inline, static]

Definition at line 15 of file ColorPickerSlider.properties.h.

{ return s_ColorChannelProperty; }

void EnsureProperties ( ) [static]

Definition at line 23 of file ColorPickerSlider.properties.cpp.

{
    if (!s_ColorChannelProperty)
    {
        s_ColorChannelProperty =
            InitializeDependencyProperty(
                L"ColorChannel",
                winrt::name_of<winrt::ColorPickerHsvChannel>(),
                winrt::name_of<winrt::ColorPickerSlider>(),
                false /* isAttached */,
                ValueHelper<winrt::ColorPickerHsvChannel>::BoxValueIfNecessary(winrt::ColorPickerHsvChannel::Value),
                nullptr);
    }
}

Member Data Documentation

GlobalDependencyProperty s_ColorChannelProperty [static]

Definition at line 17 of file ColorPickerSlider.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ColorPickerSlider.properties.h
  • Generated/ColorPickerSlider.properties.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSpectrum Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

ColorSpectrum Class Reference

#include "ColorSpectrum.h"

Inherits ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT >, and ColorSpectrumProperties.

Inherited by MyColorSpectrum.

List of all members.

Public Member Functions

ColorSpectrum ()
winrt::Rect | GetBoundingRectangle ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnGotFocus (winrt::RoutedEventArgs const &e)
void | OnKeyDown (winrt::KeyRoutedEventArgs const &e)
void | OnLostFocus (winrt::RoutedEventArgs const &e)
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | RaiseColorChanged ()

Private Member Functions

void | CreateBitmapsAndColorMap ()
void | OnColorChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnComponentsChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnHsvColorChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnInputTargetPointerEntered (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnInputTargetPointerExited (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnInputTargetPointerMoved (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnInputTargetPointerPressed (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnInputTargetPointerReleased (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnLayoutRootSizeChanged (winrt::IInspectable const &sender, winrt::SizeChangedEventArgs const &args)
void | OnMinMaxHueChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnMinMaxSaturationChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnMinMaxValueChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnSelectionEllipseFlowDirectionChanged (winrt::DependencyObject const &o, winrt::DependencyProperty const &p)
void | OnShapeChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnUnloaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
bool | SelectionEllipseShouldBeLight ()
void | SetColor ()
void | UpdateBitmapSources ()
void | UpdateColor (Hsv newHsv)
void | UpdateColorFromPoint (const winrt::PointerPoint &point)
void | UpdateEllipse ()
void | UpdateVisualState (bool useTransitions)

Static Private Member Functions

static void | FillPixelForBox (double x, double y, const Hsv &baseHsv, double minDimension, winrt::ColorSpectrumComponents components, double minHue, double maxHue, double minSaturation, double maxSaturation, double minValue, double maxValue, std::shared_ptr< std::vector< byte >> bgraMinPixelData, std::shared_ptr< std::vector< byte >> bgraMiddle1PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle2PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle3PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle4PixelData, std::shared_ptr< std::vector< byte >> bgraMaxPixelData, std::shared_ptr< std::vector< Hsv >> newHsvValues)
static void | FillPixelForRing (double x, double y, double radius, const Hsv &baseHsv, winrt::ColorSpectrumComponents components, double minHue, double maxHue, double minSaturation, double maxSaturation, double minValue, double maxValue, std::shared_ptr< std::vector< byte >> bgraMinPixelData, std::shared_ptr< std::vector< byte >> bgraMiddle1PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle2PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle3PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle4PixelData, std::shared_ptr< std::vector< byte >> bgraMaxPixelData, std::shared_ptr< std::vector< Hsv >> newHsvValues)

Private Attributes

std::vector< Hsv > | m_hsvValues
bool | m_isPointerOver
bool | m_isPointerPressed
bool | m_shouldShowLargeSelection
bool | m_updatingColor
bool | m_updatingHsvColor

Detailed Description

Definition at line 12 of file ColorSpectrum.h.

Constructor & Destructor Documentation

ColorSpectrum ( )

Definition at line 13 of file ColorSpectrum.cpp.

{
    SetDefaultStyleKey(this);

    m_updatingColor = false;
    m_updatingHsvColor = false;
    m_isPointerOver = false;
    m_isPointerPressed = false;
    m_shouldShowLargeSelection = false;

    m_shapeFromLastBitmapCreation = Shape();
    m_componentsFromLastBitmapCreation = Components();
    m_imageWidthFromLastBitmapCreation = 0;
    m_imageHeightFromLastBitmapCreation = 0;
    m_minHueFromLastBitmapCreation = MinHue();
    m_maxHueFromLastBitmapCreation = MaxHue();
    m_minSaturationFromLastBitmapCreation = MinSaturation();
    m_maxSaturationFromLastBitmapCreation = MaxSaturation();
    m_minValueFromLastBitmapCreation = MinValue();
    m_maxValueFromLastBitmapCreation = MaxValue();

    Unloaded({ this, &ColorSpectrum::OnUnloaded });
}

Member Function Documentation

void CreateBitmapsAndColorMap ( ) [private]

Definition at line 844 of file ColorSpectrum.cpp.

{
    auto&& layoutRoot = m_layoutRoot.get();
    auto&& sizingGrid = m_sizingGrid.get();
    auto&& inputTarget = m_inputTarget.get();
    auto&& spectrumRectangle = m_spectrumRectangle.get();
    auto&& spectrumEllipse = m_spectrumEllipse.get();
    auto&& spectrumOverlayRectangle = m_spectrumOverlayRectangle.get();
    auto&& spectrumOverlayEllipse = m_spectrumOverlayEllipse.get();

    if (!m_layoutRoot ||
        !m_sizingGrid ||
        !m_inputTarget ||
        !m_spectrumRectangle ||
        !m_spectrumEllipse ||
        !m_spectrumOverlayRectangle ||
        !m_spectrumOverlayEllipse ||
        SharedHelpers::IsInDesignMode())
    {
        return;
    }

    const double minDimension = min(layoutRoot.ActualWidth(), layoutRoot.ActualHeight());

    if (minDimension == 0)
    {
        return;
    }

    sizingGrid.Width(minDimension);
    sizingGrid.Height(minDimension);

    if (sizingGrid.Clip())
    {
        sizingGrid.Clip().Rect({ 0, 0, static_cast<float>(minDimension), static_cast<float>(minDimension) });
    }

    inputTarget.Width(minDimension);
    inputTarget.Height(minDimension);
    spectrumRectangle.Width(minDimension);
    spectrumRectangle.Height(minDimension);
    spectrumEllipse.Width(minDimension);
    spectrumEllipse.Height(minDimension);
    spectrumOverlayRectangle.Width(minDimension);
    spectrumOverlayRectangle.Height(minDimension);
    spectrumOverlayEllipse.Width(minDimension);
    spectrumOverlayEllipse.Height(minDimension);

    const winrt::float4 hsvColor = HsvColor();
    const int minHue = MinHue();
    int maxHue = MaxHue();
    const int minSaturation = MinSaturation();
    int maxSaturation = MaxSaturation();
    const int minValue = MinValue();
    int maxValue = MaxValue();
    const winrt::ColorSpectrumShape shape = Shape();
    const winrt::ColorSpectrumComponents components = Components();

    // If min >= max, then by convention, min is the only number that a property can have.
    if (minHue >= maxHue)
    {
        maxHue = minHue;
    }

    if (minSaturation >= maxSaturation)
    {
        maxSaturation = minSaturation;
    }

    if (minValue >= maxValue)
    {
        maxValue = minValue;
    }

    const Hsv hsv = { hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor) };

    // The middle 4 are only needed and used in the case of hue as the third dimension.
    // Saturation and luminosity need only a min and max.
    shared_ptr<vector<::byte>> bgraMinPixelData = make_shared<vector<::byte>>();
    shared_ptr<vector<::byte>> bgraMiddle1PixelData = make_shared<vector<::byte>>();
    shared_ptr<vector<::byte>> bgraMiddle2PixelData = make_shared<vector<::byte>>();
    shared_ptr<vector<::byte>> bgraMiddle3PixelData = make_shared<vector<::byte>>();
    shared_ptr<vector<::byte>> bgraMiddle4PixelData = make_shared<vector<::byte>>();
    shared_ptr<vector<::byte>> bgraMaxPixelData = make_shared<vector<::byte>>();
    shared_ptr<vector<Hsv>> newHsvValues = make_shared<vector<Hsv>>();

    const auto pixelCount = static_cast<size_t>(round(minDimension) * round(minDimension));
    const size_t pixelDataSize = pixelCount * 4;
    bgraMinPixelData->reserve(pixelDataSize);

    // We'll only save pixel data for the middle bitmaps if our third dimension is hue.
    if (components == winrt::ColorSpectrumComponents::ValueSaturation ||
        components == winrt::ColorSpectrumComponents::SaturationValue)
    {
        bgraMiddle1PixelData->reserve(pixelDataSize);
        bgraMiddle2PixelData->reserve(pixelDataSize);
        bgraMiddle3PixelData->reserve(pixelDataSize);
        bgraMiddle4PixelData->reserve(pixelDataSize);
    }

    bgraMaxPixelData->reserve(pixelDataSize);
    newHsvValues->reserve(pixelCount);

    const int minDimensionInt = static_cast<int>(round(minDimension));
    winrt::WorkItemHandler workItemHandler(
        [minDimensionInt, hsv, minHue, maxHue, minSaturation, maxSaturation, minValue, maxValue, shape, components,
        bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData, newHsvValues]
    (winrt::IAsyncAction workItem)
        {
            // As the user perceives it, every time the third dimension not represented in the ColorSpectrum changes,
            // the ColorSpectrum will visually change to accommodate that value.  For example, if the ColorSpectrum handles hue and luminosity,
            // and the saturation externally goes from 1.0 to 0.5, then the ColorSpectrum will visually change to look more washed out
            // to represent that third dimension's new value.
            // Internally, however, we don't want to regenerate the ColorSpectrum bitmap every single time this happens, since that's very expensive.
            // In order to make it so that we don't have to, we implement an optimization where, rather than having only one bitmap,
            // we instead have multiple that we blend together using opacity to create the effect that we want.
            // In the case where the third dimension is saturation or luminosity, we only need two: one bitmap at the minimum value
            // of the third dimension, and one bitmap at the maximum.  Then we set the second's opacity at whatever the value of
            // the third dimension is - e.g., a saturation of 0.5 implies an opacity of 50%.
            // In the case where the third dimension is hue, we need six: one bitmap corresponding to red, yellow, green, cyan, blue, and purple.
            // We'll then blend between whichever colors our hue exists between - e.g., an orange color would use red and yellow with an opacity of 50%.
            // This optimization does incur slightly more startup time initially since we have to generate multiple bitmaps at once instead of only one,
            // but the running time savings after that are *huge* when we can just set an opacity instead of generating a brand new bitmap.
            if (shape == winrt::ColorSpectrumShape::Box)
            {
                for (int x = minDimensionInt - 1; x >= 0; --x)
                {
                    for (int y = minDimensionInt - 1; y >= 0; --y)
                    {
                        if (workItem.Status() == winrt::AsyncStatus::Canceled)
                        {
                            break;
                        }

                        ColorSpectrum::FillPixelForBox(
                            x, y, hsv, minDimensionInt, components, minHue, maxHue, minSaturation, maxSaturation, minValue, maxValue,
                            bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData,
                            newHsvValues);
                    }
                }
            }
            else
            {
                for (int y = 0; y < minDimensionInt; ++y)
                {
                    for (int x = 0; x < minDimensionInt; ++x)
                    {
                        if (workItem.Status() == winrt::AsyncStatus::Canceled)
                        {
                            break;
                        }

                        ColorSpectrum::FillPixelForRing(
                            x, y, minDimensionInt / 2.0, hsv, components, minHue, maxHue, minSaturation, maxSaturation, minValue, maxValue,
                            bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData,
                            newHsvValues);
                    }
                }
            }
        });

    if (m_createImageBitmapAction)
    {
        m_createImageBitmapAction.Cancel();
    }

    m_createImageBitmapAction = winrt::ThreadPool::RunAsync(workItemHandler);
    auto strongThis = get_strong();
    m_createImageBitmapAction.Completed(winrt::AsyncActionCompletedHandler(
        [strongThis, minDimension, components, bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData, newHsvValues]
    (winrt::IAsyncAction asyncInfo, winrt::AsyncStatus asyncStatus)
    {
        if (asyncStatus != winrt::AsyncStatus::Completed)
        {
            return;
        }

        strongThis->m_createImageBitmapAction = nullptr;

        strongThis->DispatcherQueue().TryEnqueue(winrt::DispatcherQueueHandler(
            [strongThis, minDimension, bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData, newHsvValues]()
        {
            const int pixelWidth = static_cast<int>(round(minDimension));
            const int pixelHeight = static_cast<int>(round(minDimension));

            const winrt::ColorSpectrumComponents components = strongThis->Components();
            winrt::LoadedImageSurface minSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMinPixelData);
            winrt::LoadedImageSurface maxSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMaxPixelData);

            switch (components)
            {
            case winrt::ColorSpectrumComponents::HueValue:
            case winrt::ColorSpectrumComponents::ValueHue:
                strongThis->m_saturationMinimumSurface = minSurface;
                strongThis->m_saturationMaximumSurface = maxSurface;
                break;
            case winrt::ColorSpectrumComponents::HueSaturation:
            case winrt::ColorSpectrumComponents::SaturationHue:
                strongThis->m_valueSurface = maxSurface;
                break;
            case winrt::ColorSpectrumComponents::ValueSaturation:
            case winrt::ColorSpectrumComponents::SaturationValue:
                strongThis->m_hueRedSurface = minSurface;
                strongThis->m_hueYellowSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle1PixelData);
                strongThis->m_hueGreenSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle2PixelData);
                strongThis->m_hueCyanSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle3PixelData);
                strongThis->m_hueBlueSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle4PixelData);
                strongThis->m_huePurpleSurface = maxSurface;
                break;
            }

            strongThis->m_shapeFromLastBitmapCreation = strongThis->Shape();
            strongThis->m_componentsFromLastBitmapCreation = strongThis->Components();
            strongThis->m_imageWidthFromLastBitmapCreation = minDimension;
            strongThis->m_imageHeightFromLastBitmapCreation = minDimension;
            strongThis->m_minHueFromLastBitmapCreation = strongThis->MinHue();
            strongThis->m_maxHueFromLastBitmapCreation = strongThis->MaxHue();
            strongThis->m_minSaturationFromLastBitmapCreation = strongThis->MinSaturation();
            strongThis->m_maxSaturationFromLastBitmapCreation = strongThis->MaxSaturation();
            strongThis->m_minValueFromLastBitmapCreation = strongThis->MinValue();
            strongThis->m_maxValueFromLastBitmapCreation = strongThis->MaxValue();

            strongThis->m_hsvValues = *newHsvValues;

            strongThis->UpdateBitmapSources();
            strongThis->UpdateEllipse();
        }));
    }));
}

static void FillPixelForBox | ( | double | x,
 |  | double | y,
 |  | const Hsv & | baseHsv,
 |  | double | minDimension,
 |  | winrt::ColorSpectrumComponents | components,
 |  | double | minHue,
 |  | double | maxHue,
 |  | double | minSaturation,
 |  | double | maxSaturation,
 |  | double | minValue,
 |  | double | maxValue,
 |  | std::shared_ptr< std::vector< byte >> | bgraMinPixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle1PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle2PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle3PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle4PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMaxPixelData,
 |  | std::shared_ptr< std::vector< Hsv >> | newHsvValues |
 | ) |  |  | [static, private]
static void FillPixelForRing | ( | double | x,
 |  | double | y,
 |  | double | radius,
 |  | const Hsv & | baseHsv,
 |  | winrt::ColorSpectrumComponents | components,
 |  | double | minHue,
 |  | double | maxHue,
 |  | double | minSaturation,
 |  | double | maxSaturation,
 |  | double | minValue,
 |  | double | maxValue,
 |  | std::shared_ptr< std::vector< byte >> | bgraMinPixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle1PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle2PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle3PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMiddle4PixelData,
 |  | std::shared_ptr< std::vector< byte >> | bgraMaxPixelData,
 |  | std::shared_ptr< std::vector< Hsv >> | newHsvValues |
 | ) |  |  | [static, private]
winrt::Rect GetBoundingRectangle ( )

Definition at line 448 of file ColorSpectrum.cpp.

{
    winrt::Rect localRect{ 0, 0, 0, 0 };

    if (auto&& inputTarget = m_inputTarget.get())
    {
        localRect.Width = static_cast<float>(inputTarget.ActualWidth());
        localRect.Height = static_cast<float>(inputTarget.ActualHeight());
    }

    const auto globalBounds = TransformToVisual(nullptr).TransformBounds(localRect);
    return SharedHelpers::ConvertDipsToPhysical(*this, globalBounds);
}

void OnApplyTemplate ( )

Reimplemented in MyColorSpectrum.

Definition at line 42 of file ColorSpectrum.cpp.

{
    winrt::IControlProtected thisAsControlProtected = *this;

    m_layoutRoot.set(GetTemplateChildT<winrt::Grid>(L"LayoutRoot", thisAsControlProtected));
    m_sizingGrid.set(GetTemplateChildT<winrt::Grid>(L"SizingGrid", thisAsControlProtected));
    m_spectrumRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"SpectrumRectangle", thisAsControlProtected));
    m_spectrumEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"SpectrumEllipse", thisAsControlProtected));
    m_spectrumOverlayRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"SpectrumOverlayRectangle", thisAsControlProtected));
    m_spectrumOverlayEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"SpectrumOverlayEllipse", thisAsControlProtected));
    m_inputTarget.set(GetTemplateChildT<winrt::FrameworkElement>(L"InputTarget", thisAsControlProtected));
    m_selectionEllipsePanel.set(GetTemplateChildT<winrt::Panel>(L"SelectionEllipsePanel", thisAsControlProtected));
    m_colorNameToolTip.set(GetTemplateChildT<winrt::ToolTip>(L"ColorNameToolTip", thisAsControlProtected));

    if (auto&& layoutRoot = m_layoutRoot.get())
    {
        layoutRoot.SizeChanged({ this, &ColorSpectrum::OnLayoutRootSizeChanged });
    }

    if (auto&& inputTarget = m_inputTarget.get())
    {
        inputTarget.PointerEntered({ this, &ColorSpectrum::OnInputTargetPointerEntered });
        inputTarget.PointerExited({ this, &ColorSpectrum::OnInputTargetPointerExited });
        inputTarget.PointerPressed({ this, &ColorSpectrum::OnInputTargetPointerPressed });
        inputTarget.PointerMoved({ this, &ColorSpectrum::OnInputTargetPointerMoved });
        inputTarget.PointerReleased({ this, &ColorSpectrum::OnInputTargetPointerReleased });
    }

    if (auto&& colorNameToolTip = m_colorNameToolTip.get())
    {
        colorNameToolTip.Content(box_value(winrt::ColorDisplayNameHelper::ToDisplayName(Color())));
    }

    if (auto&& selectionEllipsePanel = m_selectionEllipsePanel.get())
    {
        selectionEllipsePanel.RegisterPropertyChangedCallback(winrt::FrameworkElement::FlowDirectionProperty(), { this, &ColorSpectrum::OnSelectionEllipseFlowDirectionChanged });
    }

    // If we haven't yet created our bitmaps, do so now.
    if (m_hsvValues.size() == 0)
    {
        CreateBitmapsAndColorMap();
    }

    UpdateEllipse();
    UpdateVisualState(false /* useTransitions */);
}

void OnColorChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 265 of file ColorSpectrum.cpp.

{
    // If we're in the process of internally updating the color, then we don't want to respond to the Color property changing.
    if (!m_updatingColor)
    {
        const winrt::Color color = Color();

        m_updatingHsvColor = true;
        const Hsv newHsv = RgbToHsv(Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0));
        HsvColor(winrt::float4{ static_cast<float>(newHsv.h), static_cast<float>(newHsv.s), static_cast<float>(newHsv.v), static_cast<float>(color.A / 255.0) });
        m_updatingHsvColor = false;

        UpdateEllipse();
        UpdateBitmapSources();
    }

    m_oldColor = unbox_value<winrt::Color>(args.OldValue());
}

void OnComponentsChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 427 of file ColorSpectrum.cpp.

{
    CreateBitmapsAndColorMap();
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 37 of file ColorSpectrum.cpp.

{
    return winrt::make<ColorSpectrumAutomationPeer>(*this);
}

void OnGotFocus ( winrt::RoutedEventArgs const & e )

Definition at line 208 of file ColorSpectrum.cpp.

{
    if (auto&& colorNameToolTip = m_colorNameToolTip.get())
    {
        colorNameToolTip.IsOpen(true);
    }

    UpdateVisualState(true /* useTransitions */);
}

void OnHsvColorChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 284 of file ColorSpectrum.cpp.

{
    // If we're in the process of internally updating the HSV color, then we don't want to respond to the HsvColor property changing.
    if (!m_updatingHsvColor)
    {
        SetColor();
    }

    m_oldHsvColor = unbox_value<winrt::float4>(args.OldValue());
}

void OnInputTargetPointerEntered | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 783 of file ColorSpectrum.cpp.

{
    m_isPointerOver = true;
    UpdateVisualState(true /* useTransitions*/);
    args.Handled(true);
}

void OnInputTargetPointerExited | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 790 of file ColorSpectrum.cpp.

{
    m_isPointerOver = false;
    UpdateVisualState(true /* useTransitions*/);
    args.Handled(true);
}

void OnInputTargetPointerMoved | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 816 of file ColorSpectrum.cpp.

{
    if (!m_isPointerPressed)
    {
        return;
    }

    UpdateColorFromPoint(args.GetCurrentPoint(m_inputTarget.get()));
    args.Handled(true);
}

void OnInputTargetPointerPressed | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 797 of file ColorSpectrum.cpp.

{
    auto&& inputTarget = m_inputTarget.get();

    Focus(winrt::FocusState::Pointer);

    m_isPointerPressed = true;
    m_shouldShowLargeSelection =
        args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Pen ||
        args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch;

    inputTarget.CapturePointer(args.Pointer());
    UpdateColorFromPoint(args.GetCurrentPoint(inputTarget));
    UpdateVisualState(true /* useTransitions*/);
    UpdateEllipse();

    args.Handled(true);
}

void OnInputTargetPointerReleased | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 827 of file ColorSpectrum.cpp.

{
    m_isPointerPressed = false;
    m_shouldShowLargeSelection = false;

    m_inputTarget.get().ReleasePointerCapture(args.Pointer());
    UpdateVisualState(true /* useTransitions*/);
    UpdateEllipse();

    args.Handled(true);
}

void OnKeyDown ( winrt::KeyRoutedEventArgs const & e )

Definition at line 90 of file ColorSpectrum.cpp.

{
    if (args.Key() != winrt::VirtualKey::Left &&
        args.Key() != winrt::VirtualKey::Right &&
        args.Key() != winrt::VirtualKey::Up &&
        args.Key() != winrt::VirtualKey::Down)
    {
        __super::OnKeyDown(args);
        return;
    }

    const bool isControlDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    winrt::ColorPickerHsvChannel incrementChannel = winrt::ColorPickerHsvChannel::Hue;

    bool isSaturationValue = false;

    if (args.Key() == winrt::VirtualKey::Left ||
        args.Key() == winrt::VirtualKey::Right)
    {
        switch (Components())
        {
        case winrt::ColorSpectrumComponents::HueSaturation:
        case winrt::ColorSpectrumComponents::HueValue:
            incrementChannel = winrt::ColorPickerHsvChannel::Hue;
            break;

        case winrt::ColorSpectrumComponents::SaturationValue:
            isSaturationValue = true;
            [[fallthrough]]; // fallthrough is explicitly wanted
        case winrt::ColorSpectrumComponents::SaturationHue:
            incrementChannel = winrt::ColorPickerHsvChannel::Saturation;
            break;

        case winrt::ColorSpectrumComponents::ValueHue:
        case winrt::ColorSpectrumComponents::ValueSaturation:
            incrementChannel = winrt::ColorPickerHsvChannel::Value;
            break;
        }
    }
    else if (args.Key() == winrt::VirtualKey::Up ||
        args.Key() == winrt::VirtualKey::Down)
    {
        switch (Components())
        {
        case winrt::ColorSpectrumComponents::SaturationHue:
        case winrt::ColorSpectrumComponents::ValueHue:
            incrementChannel = winrt::ColorPickerHsvChannel::Hue;
            break;

        case winrt::ColorSpectrumComponents::HueSaturation:
        case winrt::ColorSpectrumComponents::ValueSaturation:
            incrementChannel = winrt::ColorPickerHsvChannel::Saturation;
            break;

        case winrt::ColorSpectrumComponents::SaturationValue:
            isSaturationValue = true;
            [[fallthrough]]; // fallthrough is explicitly wanted
        case winrt::ColorSpectrumComponents::HueValue:
            incrementChannel = winrt::ColorPickerHsvChannel::Value;
            break;
        }
    }

    double minBound = 0;
    double maxBound = 0;

    switch (incrementChannel)
    {
    case winrt::ColorPickerHsvChannel::Hue:
        minBound = MinHue();
        maxBound = MaxHue();
        break;

    case winrt::ColorPickerHsvChannel::Saturation:
        minBound = MinSaturation();
        maxBound = MaxSaturation();
        break;

    case winrt::ColorPickerHsvChannel::Value:
        minBound = MinValue();
        maxBound = MaxValue();
        break;
    }

    // The order of saturation and value in the spectrum is reversed - the max value is at the bottom while the min value is at the top -
    // so we want left and up to be lower for hue, but higher for saturation and value.
    // This will ensure that the icon always moves in the direction of the key press.
    IncrementDirection direction =
        (incrementChannel == winrt::ColorPickerHsvChannel::Hue && (args.Key() == winrt::VirtualKey::Left || args.Key() == winrt::VirtualKey::Up)) ||
        (incrementChannel != winrt::ColorPickerHsvChannel::Hue && (args.Key() == winrt::VirtualKey::Right || args.Key() == winrt::VirtualKey::Down)) ?
        IncrementDirection::Lower :
        IncrementDirection::Higher;

    // Image is flipped in RightToLeft, so we need to invert direction in that case.
    // The combination saturation and value is also flipped, so we need to invert in that case too.
    // If both are false, we don't need to invert.
    // If both are true, we would invert twice, so not invert at all.
    if ((FlowDirection() == winrt::FlowDirection::RightToLeft) != isSaturationValue &&
        (args.Key() == winrt::VirtualKey::Left || args.Key() == winrt::VirtualKey::Right))
    {
        if (direction == IncrementDirection::Higher)
        {
            direction = IncrementDirection::Lower;
        }
        else
        {
            direction = IncrementDirection::Higher;
        }
    }

    const IncrementAmount amount = isControlDown ? IncrementAmount::Large : IncrementAmount::Small;

    const winrt::float4 hsvColor = HsvColor();
    UpdateColor(IncrementColorChannel(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor)), incrementChannel, direction, amount, true /* shouldWrap */, minBound, maxBound));
    args.Handled(true);
}

void OnLayoutRootSizeChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::SizeChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 776 of file ColorSpectrum.cpp.

{
    // We want ColorSpectrum to always be a square, so we'll take the smaller of the dimensions
    // and size the sizing grid to that.
    CreateBitmapsAndColorMap();
}

void OnLostFocus ( winrt::RoutedEventArgs const & e )

Definition at line 218 of file ColorSpectrum.cpp.

{
    if (auto&& colorNameToolTip = m_colorNameToolTip.get())
    {
        colorNameToolTip.IsOpen(false);
    }

    UpdateVisualState(true /* useTransitions */);
}

void OnMinMaxHueChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 347 of file ColorSpectrum.cpp.

{
    const int minHue = MinHue();
    const int maxHue = MaxHue();

    if (minHue < 0 || minHue > 359)
    {
        throw winrt::hresult_invalid_argument(L"MinHue must be between 0 and 359.");
    }
    else if (maxHue < 0 || maxHue > 359)
    {
        throw winrt::hresult_invalid_argument(L"MaxHue must be between 0 and 359.");
    }

    const winrt::ColorSpectrumComponents components = Components();

    // If hue is one of the axes in the spectrum bitmap, then we'll need to regenerate it
    // if the maximum or minimum value has changed.
    if (components != winrt::ColorSpectrumComponents::SaturationValue &&
        components != winrt::ColorSpectrumComponents::ValueSaturation)
    {
        CreateBitmapsAndColorMap();
    }
}

void OnMinMaxSaturationChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 372 of file ColorSpectrum.cpp.

{
    const int minSaturation = MinSaturation();
    const int maxSaturation = MaxSaturation();

    if (minSaturation < 0 || minSaturation > 100)
    {
        throw winrt::hresult_invalid_argument(L"MinSaturation must be between 0 and 100.");
    }
    else if (maxSaturation < 0 || maxSaturation > 100)
    {
        throw winrt::hresult_invalid_argument(L"MaxSaturation must be between 0 and 100.");
    }

    const winrt::ColorSpectrumComponents components = Components();

    // If value is one of the axes in the spectrum bitmap, then we'll need to regenerate it
    // if the maximum or minimum value has changed.
    if (components != winrt::ColorSpectrumComponents::HueValue &&
        components != winrt::ColorSpectrumComponents::ValueHue)
    {
        CreateBitmapsAndColorMap();
    }
}

void OnMinMaxValueChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 397 of file ColorSpectrum.cpp.

{
    const int minValue = MinValue();
    const int maxValue = MaxValue();

    if (minValue < 0 || minValue > 100)
    {
        throw winrt::hresult_invalid_argument(L"MinValue must be between 0 and 100.");
    }
    else if (maxValue < 0 || maxValue > 100)
    {
        throw winrt::hresult_invalid_argument(L"MaxValue must be between 0 and 100.");
    }

    const winrt::ColorSpectrumComponents components = Components();

    // If value is one of the axes in the spectrum bitmap, then we'll need to regenerate it
    // if the maximum or minimum value has changed.
    if (components != winrt::ColorSpectrumComponents::HueSaturation &&
        components != winrt::ColorSpectrumComponents::SaturationHue)
    {
        CreateBitmapsAndColorMap();
    }
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 228 of file ColorSpectrum.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_ColorProperty)
    {
        OnColorChanged(args);
    }
    else if (property == s_HsvColorProperty)
    {
        OnHsvColorChanged(args);
    }
    else if (property == s_MinHueProperty ||
        property == s_MaxHueProperty)
    {
        OnMinMaxHueChanged(args);
    }
    else if (property == s_MinSaturationProperty ||
        property == s_MaxSaturationProperty)
    {
        OnMinMaxSaturationChanged(args);
    }
    else if (property == s_MinValueProperty ||
        property == s_MaxValueProperty)
    {
        OnMinMaxValueChanged(args);
    }
    else if (property == s_ShapeProperty)
    {
        OnShapeChanged(args);
    }
    else if (property == s_ComponentsProperty)
    {
        OnComponentsChanged(args);
    }
}

void OnSelectionEllipseFlowDirectionChanged | ( | winrt::DependencyObject const & | o,
 |  | winrt::DependencyProperty const & | p |
 | ) |  |  | [private]

Definition at line 839 of file ColorSpectrum.cpp.

{
    UpdateEllipse();
}

void OnShapeChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]

Definition at line 422 of file ColorSpectrum.cpp.

{
    CreateBitmapsAndColorMap();
}

void OnUnloaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 432 of file ColorSpectrum.cpp.

{
    // There is an anomaly in the Loading/Loaded/Unloaded events that can cause an Unloaded event to
    // fire when the element is in the tree. When this happens, we end up cancelling the spectrum
    // image generation and don't display it.  Unfortunately, we can't fix this until at least version
    // 2.0, so for now we will work around it (as we have suggested to customers to do), by checking
    // to see if we are actually unloaded before cancelling.
    if (!IsLoaded())
    {
        // If we're in the middle of creating an image bitmap while being unloaded,
        // we'll want to synchronously cancel it so we don't have any asynchronous actions
        // lingering beyond our lifetime.
        CancelAsyncAction(m_createImageBitmapAction);
    }
}

void RaiseColorChanged ( )

Definition at line 311 of file ColorSpectrum.cpp.

{
    const winrt::Color newColor = Color();
    const auto colorChanged =
        m_oldColor.A != newColor.A ||
        m_oldColor.R != newColor.R ||
        m_oldColor.G != newColor.G ||
        m_oldColor.B != newColor.B;
    const auto areBothColorsBlack =
        (m_oldColor.R == newColor.R && newColor.R == 0) ||
        (m_oldColor.G == newColor.G && newColor.G == 0) ||
        (m_oldColor.B == newColor.B && newColor.B == 0);

    if (colorChanged || areBothColorsBlack)
    {
        auto colorChangedEventArgs = winrt::make_self<ColorChangedEventArgs>();

        colorChangedEventArgs->OldColor(m_oldColor);
        colorChangedEventArgs->NewColor(newColor);

        m_colorChangedEventSource(*this, *colorChangedEventArgs);

        if (auto&& colorNameToolTip = m_colorNameToolTip.get())
        {
            colorNameToolTip.Content(box_value(winrt::ColorDisplayNameHelper::ToDisplayName(newColor)));
        }

        auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this);
        if (peer)
        {
            winrt::ColorSpectrumAutomationPeer colorSpectrumPeer = peer.as<winrt::ColorSpectrumAutomationPeer>();
            winrt::get_self<ColorSpectrumAutomationPeer>(colorSpectrumPeer)->RaisePropertyChangedEvent(m_oldColor, newColor, m_oldHsvColor, HsvColor());
        }
    }
}

bool SelectionEllipseShouldBeLight ( ) [private]

Definition at line 1538 of file ColorSpectrum.cpp.

{
    // The selection ellipse should be light if and only if the chosen color
    // contrasts more with black than it does with white.
    // To find how much something contrasts with white, we use the equation
    // for relative luminance, which is given by
    //
    // L = 0.2126 * Rg + 0.7152 * Gg + 0.0722 * Bg
    //
    // where Xg = { X/3294 if X <= 10, (R/269 + 0.0513)^2.4 otherwise }
    //
    // If L is closer to 1, then the color is closer to white; if it is closer to 0,
    // then the color is closer to black.  This is based on the fact that the human
    // eye perceives green to be much brighter than red, which in turn is perceived to be
    // brighter than blue.
    //
    // If the third dimension is value, then we won't be updating the spectrum's displayed colors,
    // so in that case we should use a value of 1 when considering the backdrop
    // for the selection ellipse.
    winrt::Color displayedColor = {};

    if (Components() == winrt::ColorSpectrumComponents::HueSaturation ||
        Components() == winrt::ColorSpectrumComponents::SaturationHue)
    {
        const winrt::float4 hsvColor = HsvColor();
        const Rgb color = HsvToRgb(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), 1.0));
        displayedColor = ColorFromRgba(color, hsv::GetAlpha(hsvColor));
    }
    else
    {
        displayedColor = Color();
    }

    const double rg = displayedColor.R <= 10 ? displayedColor.R / 3294.0 : pow(displayedColor.R / 269.0 + 0.0513, 2.4);
    const double gg = displayedColor.G <= 10 ? displayedColor.G / 3294.0 : pow(displayedColor.G / 269.0 + 0.0513, 2.4);
    const double bg = displayedColor.B <= 10 ? displayedColor.B / 3294.0 : pow(displayedColor.B / 269.0 + 0.0513, 2.4);

    return 0.2126 * rg + 0.7152 * gg + 0.0722 * bg <= 0.5;
}

void SetColor ( ) [private]

Definition at line 295 of file ColorSpectrum.cpp.

{
    const winrt::float4 hsvColor = HsvColor();

    m_updatingColor = true;
    const Rgb newRgb = HsvToRgb(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor)));

    Color(ColorFromRgba(newRgb, hsv::GetAlpha(hsvColor)));

    m_updatingColor = false;

    UpdateEllipse();
    UpdateBitmapSources();
    RaiseColorChanged();
}

void UpdateBitmapSources ( ) [private]

Definition at line 1420 of file ColorSpectrum.cpp.

{
    auto&& spectrumOverlayRectangle = m_spectrumOverlayRectangle.get();
    auto&& spectrumOverlayEllipse = m_spectrumOverlayEllipse.get();

    if (!spectrumOverlayRectangle ||
        !spectrumOverlayEllipse)
    {
        return;
    }

    auto&& spectrumRectangle = m_spectrumRectangle.get();
    auto&& spectrumEllipse = m_spectrumEllipse.get();

    const winrt::float4 hsvColor = HsvColor();
    const winrt::ColorSpectrumComponents components = Components();

    // We'll set the base image and the overlay image based on which component is our third dimension.
    // If it's saturation or luminosity, then the base image is that dimension at its minimum value,
    // while the overlay image is that dimension at its maximum value.
    // If it's hue, then we'll figure out where in the color wheel we are, and then use the two
    // colors on either side of our position as our base image and overlay image.
    // For example, if our hue is orange, then the base image would be red and the overlay image yellow.
    switch (components)
    {
    case winrt::ColorSpectrumComponents::HueValue:
    case winrt::ColorSpectrumComponents::ValueHue:
        {
            if (!m_saturationMinimumSurface ||
                !m_saturationMaximumSurface)
            {
                return;
            }

            winrt::SpectrumBrush spectrumBrush{ winrt::make<SpectrumBrush>() };

            spectrumBrush.MinSurface(m_saturationMinimumSurface);
            spectrumBrush.MaxSurface(m_saturationMaximumSurface);
            spectrumBrush.MaxSurfaceOpacity(hsv::GetSaturation(hsvColor));
            spectrumRectangle.Fill(spectrumBrush);
            spectrumEllipse.Fill(spectrumBrush);
        }
        break;

    case winrt::ColorSpectrumComponents::HueSaturation:
    case winrt::ColorSpectrumComponents::SaturationHue:
        {
            if (!m_valueSurface)
            {
                return;
            }

            winrt::SpectrumBrush spectrumBrush{ winrt::make<SpectrumBrush>() };

            spectrumBrush.MinSurface(m_valueSurface);
            spectrumBrush.MaxSurface(m_valueSurface);
            spectrumBrush.MaxSurfaceOpacity(1);
            spectrumRectangle.Fill(spectrumBrush);
            spectrumEllipse.Fill(spectrumBrush);
        }
        break;

    case winrt::ColorSpectrumComponents::ValueSaturation:
    case winrt::ColorSpectrumComponents::SaturationValue:
        {
            if (!m_hueRedSurface ||
                !m_hueYellowSurface ||
                !m_hueGreenSurface ||
                !m_hueCyanSurface ||
                !m_hueBlueSurface ||
                !m_huePurpleSurface)
            {
                return;
            }

            winrt::SpectrumBrush spectrumBrush{ winrt::make<SpectrumBrush>() };

            const double sextant = hsv::GetHue(hsvColor) / 60.0;

            if (sextant < 1)
            {
                spectrumBrush.MinSurface(m_hueRedSurface);
                spectrumBrush.MaxSurface(m_hueYellowSurface);
            }
            else if (sextant >= 1 && sextant < 2)
            {
                spectrumBrush.MinSurface(m_hueYellowSurface);
                spectrumBrush.MaxSurface(m_hueGreenSurface);
            }
            else if (sextant >= 2 && sextant < 3)
            {
                spectrumBrush.MinSurface(m_hueGreenSurface);
                spectrumBrush.MaxSurface(m_hueCyanSurface);
            }
            else if (sextant >= 3 && sextant < 4)
            {
                spectrumBrush.MinSurface(m_hueCyanSurface);
                spectrumBrush.MaxSurface(m_hueBlueSurface);
            }
            else if (sextant >= 4 && sextant < 5)
            {
                spectrumBrush.MinSurface(m_hueBlueSurface);
                spectrumBrush.MaxSurface(m_huePurpleSurface);
            }
            else
            {
                spectrumBrush.MinSurface(m_huePurpleSurface);
                spectrumBrush.MaxSurface(m_hueRedSurface);
            }

            spectrumBrush.MaxSurfaceOpacity(sextant - static_cast<int>(sextant));
            spectrumRectangle.Fill(spectrumBrush);
            spectrumEllipse.Fill(spectrumBrush);
        }
        break;
    }
}

void UpdateColor ( Hsv newHsv ) [private]

Definition at line 499 of file ColorSpectrum.cpp.

{
    m_updatingColor = true;
    m_updatingHsvColor = true;

    const Rgb newRgb = HsvToRgb(newHsv);
    const float alpha = hsv::GetAlpha(HsvColor());

    Color(ColorFromRgba(newRgb, alpha));
    HsvColor({ static_cast<float>(newHsv.h), static_cast<float>(newHsv.s), static_cast<float>(newHsv.v), alpha });

    UpdateEllipse();
    UpdateVisualState(true /* useTransitions */);

    m_updatingHsvColor = false;
    m_updatingColor = false;

    RaiseColorChanged();
}

void UpdateColorFromPoint ( const winrt::PointerPoint & point ) [private]

Definition at line 519 of file ColorSpectrum.cpp.

{
    // If we haven't initialized our HSV value array yet, then we should just ignore any user input -
    // we don't yet know what to do with it.
    if (m_hsvValues.size() == 0)
    {
        return;
    }

    double xPosition = point.Position().X;
    double yPosition = point.Position().Y;
    const double radius = min(m_imageWidthFromLastBitmapCreation, m_imageHeightFromLastBitmapCreation) / 2;
    const double distanceFromRadius = sqrt(pow(xPosition - radius, 2) + pow(yPosition - radius, 2));

    const auto shape = Shape();

    // If the point is outside the circle, we should bring it back into the circle.
    if (distanceFromRadius > radius && shape == winrt::ColorSpectrumShape::Ring)
    {
        xPosition = (radius / distanceFromRadius) * (xPosition - radius) + radius;
        yPosition = (radius / distanceFromRadius) * (yPosition - radius) + radius;
    }

    // Now we need to find the index into the array of HSL values at each point in the spectrum m_image.
    int x = static_cast<int>(round(xPosition));
    int y = static_cast<int>(round(yPosition));
    const int width = static_cast<int>(round(m_imageWidthFromLastBitmapCreation));

    if (x < 0)
    {
        x = 0;
    }
    else if (x >= m_imageWidthFromLastBitmapCreation)
    {
        x = static_cast<int>(round(m_imageWidthFromLastBitmapCreation)) - 1;
    }

    if (y < 0)
    {
        y = 0;
    }
    else if (y >= m_imageHeightFromLastBitmapCreation)
    {
        y = static_cast<int>(round(m_imageHeightFromLastBitmapCreation)) - 1;
    }

    // The gradient image contains two dimensions of HSL information, but not the third.
    // We should keep the third where it already was.
    Hsv hsvAtPoint = m_hsvValues[static_cast<std::vector<Hsv>::size_type>(y) * width + x];

    const auto components = Components();
    const auto hsvColor = HsvColor();

    switch (components)
    {
    case winrt::ColorSpectrumComponents::HueValue:
    case winrt::ColorSpectrumComponents::ValueHue:
        hsvAtPoint.s = hsv::GetSaturation(hsvColor);
        break;

    case winrt::ColorSpectrumComponents::HueSaturation:
    case winrt::ColorSpectrumComponents::SaturationHue:
        hsvAtPoint.v = hsv::GetValue(hsvColor);
        break;

    case winrt::ColorSpectrumComponents::ValueSaturation:
    case winrt::ColorSpectrumComponents::SaturationValue:
        hsvAtPoint.h = hsv::GetHue(hsvColor);
        break;
    }

    UpdateColor(hsvAtPoint);
}

void UpdateEllipse ( ) [private]

Definition at line 593 of file ColorSpectrum.cpp.

{
    auto&& selectionEllipsePanel = m_selectionEllipsePanel.get();

    if (!selectionEllipsePanel)
    {
        return;
    }

    // If we don't have an image size yet, we shouldn't be showing the ellipse.
    if (m_imageWidthFromLastBitmapCreation == 0 ||
        m_imageHeightFromLastBitmapCreation == 0)
    {
        selectionEllipsePanel.Visibility(winrt::Visibility::Collapsed);
        return;
    }
    else
    {
        selectionEllipsePanel.Visibility(winrt::Visibility::Visible);
    }

    double xPosition;
    double yPosition;

    winrt::float4 hsvColor = HsvColor();

    hsv::SetHue(hsvColor, clamp(hsv::GetHue(hsvColor), static_cast<float>(m_minHueFromLastBitmapCreation), static_cast<float> (m_maxHueFromLastBitmapCreation)));
    hsv::SetSaturation(hsvColor, clamp(hsv::GetSaturation(hsvColor), m_minSaturationFromLastBitmapCreation / 100.0f, m_maxSaturationFromLastBitmapCreation / 100.0f));
    hsv::SetValue(hsvColor, clamp(hsv::GetValue(hsvColor), m_minValueFromLastBitmapCreation / 100.0f, m_maxValueFromLastBitmapCreation / 100.0f));

    if (m_shapeFromLastBitmapCreation == winrt::ColorSpectrumShape::Box)
    {
        double xPercent = 0;
        double yPercent = 0;

        const double hPercent = (hsv::GetHue(hsvColor) - m_minHueFromLastBitmapCreation) / (m_maxHueFromLastBitmapCreation - m_minHueFromLastBitmapCreation);
        double sPercent = (hsv::GetSaturation(hsvColor) * 100.0 - m_minSaturationFromLastBitmapCreation) / (static_cast<double>(m_maxSaturationFromLastBitmapCreation) - m_minSaturationFromLastBitmapCreation);
        double vPercent = (hsv::GetValue(hsvColor) * 100.0 - m_minValueFromLastBitmapCreation) / (static_cast<double>(m_maxValueFromLastBitmapCreation) - m_minValueFromLastBitmapCreation);

        // In the case where saturation was an axis in the spectrum with hue, or value is an axis, full stop,
        // we inverted the direction of that axis in order to put more hue on the outside of the ring,
        // so we need to do similarly here when positioning the ellipse.
        if (m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::HueSaturation ||
            m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::SaturationHue)
        {
            sPercent = 1 - sPercent;
        }
        else
        {
            vPercent = 1 - vPercent;
        }

        switch (m_componentsFromLastBitmapCreation)
        {
        case winrt::ColorSpectrumComponents::HueValue:
            xPercent = hPercent;
            yPercent = vPercent;
            break;

        case winrt::ColorSpectrumComponents::HueSaturation:
            xPercent = hPercent;
            yPercent = sPercent;
            break;

        case winrt::ColorSpectrumComponents::ValueHue:
            xPercent = vPercent;
            yPercent = hPercent;
            break;

        case winrt::ColorSpectrumComponents::ValueSaturation:
            xPercent = vPercent;
            yPercent = sPercent;
            break;

        case winrt::ColorSpectrumComponents::SaturationHue:
            xPercent = sPercent;
            yPercent = hPercent;
            break;

        case winrt::ColorSpectrumComponents::SaturationValue:
            xPercent = sPercent;
            yPercent = vPercent;
            break;
        }

        xPosition = m_imageWidthFromLastBitmapCreation * xPercent;
        yPosition = m_imageHeightFromLastBitmapCreation * yPercent;
    }
    else
    {
        double thetaValue = 0;
        double rValue = 0;

        const double hThetaValue =
            m_maxHueFromLastBitmapCreation != m_minHueFromLastBitmapCreation ?
            360 * (hsv::GetHue(hsvColor) - m_minHueFromLastBitmapCreation) / (m_maxHueFromLastBitmapCreation - m_minHueFromLastBitmapCreation) :
            0;
        double sThetaValue =
            m_maxSaturationFromLastBitmapCreation != m_minSaturationFromLastBitmapCreation ?
            360 * (hsv::GetSaturation(hsvColor) * 100.0 - m_minSaturationFromLastBitmapCreation) / (static_cast<double>(m_maxSaturationFromLastBitmapCreation) - m_minSaturationFromLastBitmapCreation) :
            0;
        double vThetaValue =
            m_maxValueFromLastBitmapCreation != m_minValueFromLastBitmapCreation ?
            360 * (hsv::GetValue(hsvColor) * 100.0 - m_minValueFromLastBitmapCreation) / (static_cast<double>(m_maxValueFromLastBitmapCreation) - m_minValueFromLastBitmapCreation) :
            0;
        const double hRValue = m_maxHueFromLastBitmapCreation != m_minHueFromLastBitmapCreation ?
            (hsv::GetHue(hsvColor) - m_minHueFromLastBitmapCreation) / (m_maxHueFromLastBitmapCreation - m_minHueFromLastBitmapCreation) - 1 :
            0;
        double sRValue = m_maxSaturationFromLastBitmapCreation != m_minSaturationFromLastBitmapCreation ?
            (hsv::GetSaturation(hsvColor) * 100.0 - m_minSaturationFromLastBitmapCreation) / (static_cast<double>(m_maxSaturationFromLastBitmapCreation) - m_minSaturationFromLastBitmapCreation) - 1 :
            0;
        double vRValue = m_maxValueFromLastBitmapCreation != m_minValueFromLastBitmapCreation ?
            (hsv::GetValue(hsvColor) * 100.0 - m_minValueFromLastBitmapCreation) / (static_cast<double>(m_maxValueFromLastBitmapCreation) - m_minValueFromLastBitmapCreation) - 1 :
            0;

        // In the case where saturation was an axis in the spectrum with hue, or value is an axis, full stop,
        // we inverted the direction of that axis in order to put more hue on the outside of the ring,
        // so we need to do similarly here when positioning the ellipse.
        if (m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::HueSaturation ||
            m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::SaturationHue)
        {
            sThetaValue = 360 - sThetaValue;
            sRValue = -sRValue - 1;
        }
        else
        {
            vThetaValue = 360 - vThetaValue;
            vRValue = -vRValue - 1;
        }

        switch (m_componentsFromLastBitmapCreation)
        {
        case winrt::ColorSpectrumComponents::HueValue:
            thetaValue = hThetaValue;
            rValue = vRValue;
            break;

        case winrt::ColorSpectrumComponents::HueSaturation:
            thetaValue = hThetaValue;
            rValue = sRValue;
            break;

        case winrt::ColorSpectrumComponents::ValueHue:
            thetaValue = vThetaValue;
            rValue = hRValue;
            break;

        case winrt::ColorSpectrumComponents::ValueSaturation:
            thetaValue = vThetaValue;
            rValue = sRValue;
            break;

        case winrt::ColorSpectrumComponents::SaturationHue:
            thetaValue = sThetaValue;
            rValue = hRValue;
            break;

        case winrt::ColorSpectrumComponents::SaturationValue:
            thetaValue = sThetaValue;
            rValue = vRValue;
            break;
        }

        const double radius = min(m_imageWidthFromLastBitmapCreation, m_imageHeightFromLastBitmapCreation) / 2;

        xPosition = (cos((thetaValue * M_PI / 180) + M_PI) * radius * rValue) + radius;
        yPosition = (sin((thetaValue * M_PI / 180) + M_PI) * radius * rValue) + radius;
    }

    winrt::Canvas::SetLeft(selectionEllipsePanel, xPosition - (selectionEllipsePanel.Width() / 2));
    winrt::Canvas::SetTop(selectionEllipsePanel, yPosition - (selectionEllipsePanel.Height() / 2));

    if (auto&& colorNameToolTip = m_colorNameToolTip.get())
    {
        // ToolTip doesn't currently provide any way to re-run its placement logic if its placement target moves,
        // so toggling IsEnabled induces it to do that without incurring any visual glitches.
        colorNameToolTip.IsEnabled(false);
        colorNameToolTip.IsEnabled(true);
    }

    UpdateVisualState(true /* useTransitions */);
}

void UpdateVisualState ( bool useTransitions ) [private]

Definition at line 462 of file ColorSpectrum.cpp.

{
    winrt::Control thisAsControl = *this;

    if (m_isPointerPressed)
    {
        winrt::VisualStateManager::GoToState(thisAsControl, m_shouldShowLargeSelection ? L"PressedLarge" : L"Pressed", useTransitions);
    }
    else if (m_isPointerOver)
    {
        winrt::VisualStateManager::GoToState(thisAsControl, L"PointerOver", useTransitions);
    }
    else
    {
        winrt::VisualStateManager::GoToState(thisAsControl, L"Normal", useTransitions);
    }

    winrt::VisualStateManager::GoToState(thisAsControl, m_shapeFromLastBitmapCreation == winrt::ColorSpectrumShape::Box ? L"BoxSelected" : L"RingSelected", useTransitions);
    winrt::VisualStateManager::GoToState(thisAsControl, SelectionEllipseShouldBeLight() ? L"SelectionEllipseLight" : L"SelectionEllipseDark", useTransitions);

    if (IsEnabled() && FocusState() != winrt::FocusState::Unfocused)
    {
        if (FocusState() == winrt::FocusState::Pointer)
        {
            winrt::VisualStateManager::GoToState(thisAsControl, L"PointerFocused", useTransitions);
        }
        else
        {
            winrt::VisualStateManager::GoToState(thisAsControl, L"Focused", useTransitions);
        }
    }
    else
    {
        winrt::VisualStateManager::GoToState(thisAsControl, L"Unfocused", useTransitions);
    }
}

Member Data Documentation

std::vector<Hsv> m_hsvValues [private]

Definition at line 117 of file ColorSpectrum.h.

bool m_isPointerOver [private]

Definition at line 114 of file ColorSpectrum.h.

bool m_isPointerPressed [private]

Definition at line 115 of file ColorSpectrum.h.

bool m_shouldShowLargeSelection [private]

Definition at line 116 of file ColorSpectrum.h.

bool m_updatingColor [private]

Definition at line 112 of file ColorSpectrum.h.

bool m_updatingHsvColor [private]

Definition at line 113 of file ColorSpectrum.h.

The documentation for this class was generated from the following files:
  • ColorPicker/ColorSpectrum.h
  • ColorPicker/ColorSpectrum.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSpectrumAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Private Member Functions

ColorSpectrumAutomationPeer Class Reference

#include "ColorSpectrumAutomationPeer.h"

Inherits ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider >.

List of all members.

Public Member Functions

ColorSpectrumAutomationPeer (winrt::ColorSpectrum const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::Rect | GetBoundingRectangleCore ()
winrt::hstring | GetClassNameCore ()
winrt::Point | GetClickablePointCore ()
winrt::hstring | GetHelpTextCore ()
winrt::hstring | GetLocalizedControlTypeCore ()
winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | IsReadOnly ()
void | RaisePropertyChangedEvent (winrt::Color oldColor, winrt::Color newColor, winrt::float4 oldHsvColor, winrt::float4 newHsvColor)
void | SetValue (winrt::hstring const &value)
winrt::hstring | Value ()

Static Private Member Functions

static winrt::hstring | GetValueString (winrt::Color color, winrt::float4 hsvColor)

Detailed Description

Definition at line 10 of file ColorSpectrumAutomationPeer.h.

Constructor & Destructor Documentation

ColorSpectrumAutomationPeer ( winrt::ColorSpectrum const & owner )

Definition at line 13 of file ColorSpectrumAutomationPeer.cpp.

                                                                                :
    ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 28 of file ColorSpectrumAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Slider;
}

winrt::Rect GetBoundingRectangleCore ( )

Definition at line 62 of file ColorSpectrumAutomationPeer.cpp.

{
    winrt::Rect boundingRectangle = winrt::get_self<ColorSpectrum>(Owner().as<winrt::ColorSpectrum>())->GetBoundingRectangle();
    return boundingRectangle;
}

winrt::hstring GetClassNameCore ( )

Definition at line 52 of file ColorSpectrumAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::ColorSpectrum>();
}

winrt::Point GetClickablePointCore ( )

Definition at line 68 of file ColorSpectrumAutomationPeer.cpp.

{
    const auto boundingRect = GetBoundingRectangleCore(); // Call potentially overridden method

    return winrt::Point{ boundingRect.X + boundingRect.Width / 2, boundingRect.Y + boundingRect.Height / 2 };
}

winrt::hstring GetHelpTextCore ( )

Definition at line 57 of file ColorSpectrumAutomationPeer.cpp.

{
    return ResourceAccessor::GetLocalizedStringResource(SR_HelpTextColorSpectrum);
}

winrt::hstring GetLocalizedControlTypeCore ( )

Definition at line 33 of file ColorSpectrumAutomationPeer.cpp.

{
    return ResourceAccessor::GetLocalizedStringResource(SR_LocalizedControlTypeColorSpectrum);
}

winrt::hstring GetNameCore ( )

Definition at line 38 of file ColorSpectrumAutomationPeer.cpp.

{
    winrt::hstring nameString = __super::GetNameCore();

    // If a name hasn't been provided by AutomationProperties.Name in markup,
    // then we'll return the default value.
    if (nameString.empty())
    {
        nameString = ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameColorSpectrum);
    }

    return nameString;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 18 of file ColorSpectrumAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Value)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::hstring GetValueString | ( | winrt::Color | color,
 |  | winrt::float4 | hsvColor |
 | ) |  |  | [static, private]

Definition at line 110 of file ColorSpectrumAutomationPeer.cpp.

{
    const auto hue = static_cast<unsigned int>(round(hsv::GetHue(hsvColor)));
    const auto saturation = static_cast<unsigned int>(round(hsv::GetSaturation(hsvColor) * 100));
    const auto value = static_cast<unsigned int>(round(hsv::GetValue(hsvColor) * 100));

    return StringUtil::FormatString(
        ResourceAccessor::GetLocalizedStringResource(SR_ValueStringColorSpectrumWithColorName),
        winrt::ColorDisplayNameHelper::ToDisplayName(color).data(),
        hue, saturation, value);
}

bool IsReadOnly ( )

Definition at line 75 of file ColorSpectrumAutomationPeer.cpp.

{
    return false;
}

void RaisePropertyChangedEvent | ( | winrt::Color | oldColor,
 |  | winrt::Color | newColor,
 |  | winrt::float4 | oldHsvColor,
 |  | winrt::float4 | newHsvColor
 | ) |  |

Definition at line 102 of file ColorSpectrumAutomationPeer.cpp.

{
    winrt::hstring oldValueString = GetValueString(oldColor, oldHsvColor);
    winrt::hstring newValueString = GetValueString(newColor, newHsvColor);

    __super::RaisePropertyChangedEvent(winrt::ValuePatternIdentifiers::ValueProperty(), box_value(oldValueString), box_value(newValueString));
}

void SetValue ( winrt::hstring const & value )

Definition at line 89 of file ColorSpectrumAutomationPeer.cpp.

{
    winrt::ColorSpectrum colorSpectrumOwner = Owner().as<winrt::ColorSpectrum>();
    winrt::Color color = unbox_value<winrt::Color>(winrt::XamlBindingHelper::ConvertValue({ winrt::hstring_name_of<winrt::Color>(), winrt::TypeKind::Metadata }, box_value(value)));

    colorSpectrumOwner.Color(color);

    // Since ColorPicker sets ColorSpectrum.Color and ColorPicker also responds to ColorSpectrum.ColorChanged,
    // we could get into an infinite loop if we always raised ColorSpectrum.ColorChanged when ColorSpectrum.Color changed.
    // Because of that, we'll raise the event manually.
    winrt::get_self<ColorSpectrum>(colorSpectrumOwner)->RaiseColorChanged();
}

winrt::hstring Value ( )

Definition at line 80 of file ColorSpectrumAutomationPeer.cpp.

{
    const winrt::ColorSpectrum colorSpectrumOwner = Owner().as<winrt::ColorSpectrum>();
    const winrt::Color color = colorSpectrumOwner.Color();
    const winrt::float4 hsvColor = colorSpectrumOwner.HsvColor();

    return GetValueString(color, hsvColor);
}

The documentation for this class was generated from the following files:
  • ColorPicker/ColorSpectrumAutomationPeer.h
  • ColorPicker/ColorSpectrumAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSpectrumProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ColorSpectrumProperties Class Reference

#include "ColorSpectrum.properties.h"

Inherited by ColorSpectrum.

List of all members.

Public Member Functions

ColorSpectrumProperties ()
void | Color (winrt::Color const &value)
winrt::Color | Color ()
winrt::event_token | ColorChanged (winrt::TypedEventHandler< winrt::ColorSpectrum, winrt::ColorChangedEventArgs > const &value)
void | ColorChanged (winrt::event_token const &token)
void | Components (winrt::ColorSpectrumComponents const &value)
winrt::ColorSpectrumComponents | Components ()
void | HsvColor (winrt::float4 const &value)
winrt::float4 | HsvColor ()
void | MaxHue (int value)
int | MaxHue ()
void | MaxSaturation (int value)
int | MaxSaturation ()
int | MaxValue ()
void | MaxValue (int value)
int | MinHue ()
void | MinHue (int value)
void | MinSaturation (int value)
int | MinSaturation ()
void | MinValue (int value)
int | MinValue ()
void | Shape (winrt::ColorSpectrumShape const &value)
winrt::ColorSpectrumShape | Shape ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ColorProperty ()
static winrt::DependencyProperty | ComponentsProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HsvColorProperty ()
static winrt::DependencyProperty | MaxHueProperty ()
static winrt::DependencyProperty | MaxSaturationProperty ()
static winrt::DependencyProperty | MaxValueProperty ()
static winrt::DependencyProperty | MinHueProperty ()
static winrt::DependencyProperty | MinSaturationProperty ()
static winrt::DependencyProperty | MinValueProperty ()
static void | OnColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnComponentsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHsvColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxHuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxSaturationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinHuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinSaturationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnShapePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | ShapeProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ColorSpectrum,
winrt::ColorChangedEventArgs > > 		m_colorChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ColorProperty
static GlobalDependencyProperty | s_ComponentsProperty
static GlobalDependencyProperty | s_HsvColorProperty
static GlobalDependencyProperty | s_MaxHueProperty
static GlobalDependencyProperty | s_MaxSaturationProperty
static GlobalDependencyProperty | s_MaxValueProperty
static GlobalDependencyProperty | s_MinHueProperty
static GlobalDependencyProperty | s_MinSaturationProperty
static GlobalDependencyProperty | s_MinValueProperty
static GlobalDependencyProperty | s_ShapeProperty

Detailed Description

Definition at line 7 of file ColorSpectrum.properties.h.

Constructor & Destructor Documentation

ColorSpectrumProperties ( )

Definition at line 27 of file ColorSpectrum.properties.cpp.

    : m_colorChangedEventSource{static_cast<ColorSpectrum*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
void Color ( winrt::Color const & value )
winrt::Color Color ( )
void ColorChanged ( winrt::event_token const & token )
winrt::event_token ColorChanged ( winrt::TypedEventHandler< winrt::ColorSpectrum, winrt::ColorChangedEventArgs > const & value )
static winrt::DependencyProperty ColorProperty ( ) [inline, static]

Definition at line 42 of file ColorSpectrum.properties.h.

{ return s_ColorProperty; }

winrt::ColorSpectrumComponents Components ( )
void Components ( winrt::ColorSpectrumComponents const & value )
static winrt::DependencyProperty ComponentsProperty ( ) [inline, static]

Definition at line 43 of file ColorSpectrum.properties.h.

{ return s_ComponentsProperty; }

static void EnsureProperties ( ) [static]
void HsvColor ( winrt::float4 const & value )
winrt::float4 HsvColor ( )
static winrt::DependencyProperty HsvColorProperty ( ) [inline, static]

Definition at line 44 of file ColorSpectrum.properties.h.

{ return s_HsvColorProperty; }

int MaxHue ( )
void MaxHue ( int value )
static winrt::DependencyProperty MaxHueProperty ( ) [inline, static]

Definition at line 45 of file ColorSpectrum.properties.h.

{ return s_MaxHueProperty; }

void MaxSaturation ( int value )
int MaxSaturation ( )
static winrt::DependencyProperty MaxSaturationProperty ( ) [inline, static]

Definition at line 46 of file ColorSpectrum.properties.h.

{ return s_MaxSaturationProperty; }

void MaxValue ( int value )
int MaxValue ( )
static winrt::DependencyProperty MaxValueProperty ( ) [inline, static]

Definition at line 47 of file ColorSpectrum.properties.h.

{ return s_MaxValueProperty; }

void MinHue ( int value )
int MinHue ( )
static winrt::DependencyProperty MinHueProperty ( ) [inline, static]

Definition at line 48 of file ColorSpectrum.properties.h.

{ return s_MinHueProperty; }

int MinSaturation ( )
void MinSaturation ( int value )
static winrt::DependencyProperty MinSaturationProperty ( ) [inline, static]

Definition at line 49 of file ColorSpectrum.properties.h.

{ return s_MinSaturationProperty; }

void MinValue ( int value )
int MinValue ( )
static winrt::DependencyProperty MinValueProperty ( ) [inline, static]

Definition at line 50 of file ColorSpectrum.properties.h.

{ return s_MinValueProperty; }

static void OnColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnComponentsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHsvColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxHuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxSaturationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinHuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinSaturationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnShapePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::ColorSpectrumShape Shape ( )
void Shape ( winrt::ColorSpectrumShape const & value )
static winrt::DependencyProperty ShapeProperty ( ) [inline, static]

Definition at line 51 of file ColorSpectrum.properties.h.

{ return s_ShapeProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ColorSpectrum, winrt::ColorChangedEventArgs> > m_colorChangedEventSource

Definition at line 67 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_ColorProperty [static]

Definition at line 53 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_ComponentsProperty [static]

Definition at line 54 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_HsvColorProperty [static]

Definition at line 55 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_MaxHueProperty [static]

Definition at line 56 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_MaxSaturationProperty [static]

Definition at line 57 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_MaxValueProperty [static]

Definition at line 58 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_MinHueProperty [static]

Definition at line 59 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_MinSaturationProperty [static]

Definition at line 60 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_MinValueProperty [static]

Definition at line 61 of file ColorSpectrum.properties.h.

GlobalDependencyProperty s_ShapeProperty [static]

Definition at line 62 of file ColorSpectrum.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ColorSpectrum.properties.h
  • Generated/ColorSpectrum.properties.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColumnMajorUniformToLargestGridLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

ColumnMajorUniformToLargestGridLayout Class Reference

#include "ColumnMajorUniformToLargestGridLayout.h"

Inherits ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout >, and ColumnMajorUniformToLargestGridLayoutProperties.

List of all members.

Public Member Functions

ColumnMajorUniformToLargestGridLayout ()
winrt::Size | ArrangeOverride (winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &finalSize)
int | GetColumns ()
int | GetLargerColumns ()
int | GetRows ()
winrt::event_token | LayoutChanged (winrt::TypedEventHandler< winrt::ColumnMajorUniformToLargestGridLayout, winrt::IInspectable > const &value)
void | LayoutChanged (winrt::event_token const &token)
winrt::Size | MeasureOverride (winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &availableSize)
void | OnColumnSpacingPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnMaxColumnsPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnRowSpacingPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | SetTestHooksEnabled (bool enabled)

Static Public Member Functions

static void | ValidateGreaterThanZero (int value)

Private Member Functions

int | CalculateColumns (int childCount, float maxItemWidth, float availableWidth)

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::ColumnMajorUniformToLargestGridLayout,
winrt::IInspectable > > 		m_layoutChangedEventSource

Detailed Description

Definition at line 12 of file ColumnMajorUniformToLargestGridLayout.h.

Constructor & Destructor Documentation

ColumnMajorUniformToLargestGridLayout ( )

Member Function Documentation

winrt::Size ArrangeOverride | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize
 | ) |  |

Definition at line 48 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    if (auto const children = context.Children())
    {
        auto const itemCount = children.Size();
        auto const minitemsPerColumn = static_cast<int>(std::floor(static_cast<float>(itemCount) / m_actualColumnCount));
        auto const numberOfColumnsWithExtraElements = static_cast<int>(itemCount % static_cast<int>(m_actualColumnCount));

        auto const columnSpacing = static_cast<float>(ColumnSpacing());
        auto const rowSpacing = static_cast<float>(RowSpacing());

        auto horizontalOffset = 0.0f;
        auto verticalOffset = 0.0f;
        auto index = 0;
        auto column = 0;
        for (auto const child : children)
        {
            auto const desiredSize = child.DesiredSize();
            child.Arrange(winrt::Rect{ horizontalOffset, verticalOffset, desiredSize.Width, desiredSize.Height });
            if (column < numberOfColumnsWithExtraElements)
            {
                if (index % (minitemsPerColumn + 1) == minitemsPerColumn)
                {
                    horizontalOffset += m_largestChildSize.Width + columnSpacing;
                    verticalOffset = 0.0;
                    column++;
                }
                else
                {
                    verticalOffset += m_largestChildSize.Height + rowSpacing;
                }
            }
            else
            {
                auto const indexAfterExtraLargeColumns = index - (numberOfColumnsWithExtraElements * (minitemsPerColumn + 1));
                if (indexAfterExtraLargeColumns % minitemsPerColumn == minitemsPerColumn - 1)
                {
                    horizontalOffset += m_largestChildSize.Width + columnSpacing;
                    verticalOffset = 0.0;
                    column++;
                }
                else
                {
                    verticalOffset += m_largestChildSize.Height + rowSpacing;
                }
            }
            index++;
        }

        if (m_testHooksEnabled)
        {
            //Testhooks setup
            if (m_largerColumns != numberOfColumnsWithExtraElements ||
                m_columns != column ||
                m_rows != minitemsPerColumn)
            {
                m_largerColumns = numberOfColumnsWithExtraElements;
                m_columns = column;
                m_rows = minitemsPerColumn;

                m_layoutChangedEventSource(*this, nullptr);
            }
        }
    }
    return finalSize;
}

int CalculateColumns | ( | int | childCount,
 |  | float | maxItemWidth,
 |  | float | availableWidth |
 | ) |  |  | [private]

Definition at line 132 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    /*
    --------------------------------------------------------------
    |      |-----------|-----------| | widthNeededForExtraColumn |
    |                                |                           |
    |      |------|    |------|      | ColumnSpacing             |
    | |----|      |----|      |----| | maxItemWidth              |
    |  O RB        O RB        O RB  |                           |
    --------------------------------------------------------------
    */

    // Every column execpt the first takes this ammount of space to fit on screen.
    auto const widthNeededForExtraColumn = ColumnSpacing() + maxItemWidth;
    // The number of columns from data and api ignoring available space
    auto const requestedColumnCount = std::min(MaxColumns(), childCount);

    // If columns can be added with effectively 0 extra space return as many columns as needed.
    if (widthNeededForExtraColumn < std::numeric_limits<float>::epsilon())
    {
        return requestedColumnCount;
    }

    auto const extraWidthAfterFirstColumn = availableWidth - maxItemWidth;
    auto const maxExtraColumns = std::max(0.0, std::floor(extraWidthAfterFirstColumn / widthNeededForExtraColumn));

    // The smaller of number of columns from data and api and
    // the number of columns the available space can support
    auto const effectiveColumnCount = std::min(static_cast<double>(requestedColumnCount), maxExtraColumns + 1);
    // return 1 even if there isn't any data
    return std::max(1, static_cast<int>(effectiveColumnCount));
}

int GetColumns ( )

Definition at line 184 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    return m_columns;
}

int GetLargerColumns ( )

Definition at line 189 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    return m_largerColumns;
}

int GetRows ( )

Definition at line 179 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    return m_rows;
}

winrt::event_token LayoutChanged ( winrt::TypedEventHandler< winrt::ColumnMajorUniformToLargestGridLayout, winrt::IInspectable > const & value )

Definition at line 194 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    return m_layoutChangedEventSource.add(value);
}

void LayoutChanged ( winrt::event_token const & token )

Definition at line 199 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    m_layoutChangedEventSource.remove(token);
}

winrt::Size MeasureOverride | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize
 | ) |  |

Definition at line 10 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    if (auto const children = context.Children())
    {
        m_largestChildSize = [children, availableSize]()
        {
            auto largestChildWidth = 0.0f;
            auto largestChildHeight = 0.0f;
            for (auto const child : children)
            {
                child.Measure(availableSize);
                auto const desiredSize = child.DesiredSize();
                if (desiredSize.Width > largestChildWidth)
                {
                    largestChildWidth = desiredSize.Width;
                }
                if (desiredSize.Height > largestChildHeight)
                {
                    largestChildHeight = desiredSize.Height;
                }
            }
            return winrt::Size(largestChildWidth, largestChildHeight);
        }();

        m_actualColumnCount = CalculateColumns(children.Size(), m_largestChildSize.Width, availableSize.Width);
        auto const maxItemsPerColumn = static_cast<int>(std::ceil(static_cast<double>(children.Size()) / static_cast<double>(m_actualColumnCount)));
        return winrt::Size(
            (m_largestChildSize.Width * m_actualColumnCount) +
            (static_cast<float>(ColumnSpacing()) * (m_actualColumnCount - 1)),
            (m_largestChildSize.Height * maxItemsPerColumn) +
            (static_cast<float>(RowSpacing()) * (maxItemsPerColumn - 1))
        );
    }
    return winrt::Size(0, 0);
}

void OnColumnSpacingPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & )

Definition at line 117 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    InvalidateMeasure();
}

void OnMaxColumnsPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 127 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    InvalidateMeasure();
}

void OnRowSpacingPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & )

Definition at line 122 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    InvalidateMeasure();
}

void SetTestHooksEnabled ( bool enabled )

Definition at line 174 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    m_testHooksEnabled = enabled;
}

void ValidateGreaterThanZero ( int value ) [static]

Definition at line 165 of file ColumnMajorUniformToLargestGridLayout.cpp.

{
    if (value <= 0)
    {
        throw winrt::hresult_invalid_argument();
    }
}

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::ColumnMajorUniformToLargestGridLayout, winrt::IInspectable> > m_layoutChangedEventSource [private]

Definition at line 41 of file ColumnMajorUniformToLargestGridLayout.h.

The documentation for this class was generated from the following files:
  • RadioButtons/ColumnMajorUniformToLargestGridLayout.h
  • RadioButtons/ColumnMajorUniformToLargestGridLayout.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColumnMajorUniformToLargestGridLayoutProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ColumnMajorUniformToLargestGridLayoutProperties Class Reference

#include "ColumnMajorUniformToLargestGridLayout.properties.h"

Inherited by ColumnMajorUniformToLargestGridLayout.

List of all members.

Public Member Functions

ColumnMajorUniformToLargestGridLayoutProperties ()
void | ColumnSpacing (double value)
double | ColumnSpacing ()
int | MaxColumns ()
void | MaxColumns (int value)
void | RowSpacing (double value)
double | RowSpacing ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ColumnSpacingProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MaxColumnsProperty ()
static void | OnColumnSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxColumnsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnRowSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | RowSpacingProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ColumnSpacingProperty
static GlobalDependencyProperty | s_MaxColumnsProperty
static GlobalDependencyProperty | s_RowSpacingProperty

Detailed Description

Definition at line 7 of file ColumnMajorUniformToLargestGridLayout.properties.h.

Constructor & Destructor Documentation

ColumnMajorUniformToLargestGridLayoutProperties ( )

Definition at line 20 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 62 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    s_ColumnSpacingProperty = nullptr;
    s_MaxColumnsProperty = nullptr;
    s_RowSpacingProperty = nullptr;
}

void ColumnSpacing ( double value )

Definition at line 103 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->SetValue(s_ColumnSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ColumnSpacing ( )

Definition at line 111 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->GetValue(s_ColumnSpacingProperty));
}

static winrt::DependencyProperty ColumnSpacingProperty ( ) [inline, static]

Definition at line 21 of file ColumnMajorUniformToLargestGridLayout.properties.h.

{ return s_ColumnSpacingProperty; }

void EnsureProperties ( ) [static]

Definition at line 25 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    if (!s_ColumnSpacingProperty)
    {
        s_ColumnSpacingProperty =
            InitializeDependencyProperty(
                L"ColumnSpacing",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ColumnMajorUniformToLargestGridLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnColumnSpacingPropertyChanged));
    }
    if (!s_MaxColumnsProperty)
    {
        s_MaxColumnsProperty =
            InitializeDependencyProperty(
                L"MaxColumns",
                winrt::name_of<int>(),
                winrt::name_of<winrt::ColumnMajorUniformToLargestGridLayout>(),
                false /* isAttached */,
                ValueHelper<int>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnMaxColumnsPropertyChanged));
    }
    if (!s_RowSpacingProperty)
    {
        s_RowSpacingProperty =
            InitializeDependencyProperty(
                L"RowSpacing",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ColumnMajorUniformToLargestGridLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnRowSpacingPropertyChanged));
    }
}

int MaxColumns ( )

Definition at line 126 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    return ValueHelper<int>::CastOrUnbox(static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->GetValue(s_MaxColumnsProperty));
}

void MaxColumns ( int value )

Definition at line 116 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    int coercedValue = value;
    static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->ValidateGreaterThanZero(coercedValue);
    static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->SetValue(s_MaxColumnsProperty, ValueHelper<int>::BoxValueIfNecessary(coercedValue));
    }
}

static winrt::DependencyProperty MaxColumnsProperty ( ) [inline, static]

Definition at line 22 of file ColumnMajorUniformToLargestGridLayout.properties.h.

{ return s_MaxColumnsProperty; }

void OnColumnSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 69 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::ColumnMajorUniformToLargestGridLayout>();
    winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->OnColumnSpacingPropertyChanged(args);
}

void OnMaxColumnsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 77 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::ColumnMajorUniformToLargestGridLayout>();

    auto value = winrt::unbox_value<int>(args.NewValue());
    auto coercedValue = value;
    winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->ValidateGreaterThanZero(coercedValue);
    if (value != coercedValue)
    {
        sender.SetValue(args.Property(), winrt::box_value<int>(coercedValue));
        return;
    }

    winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->OnMaxColumnsPropertyChanged(args);
}

void OnRowSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 95 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::ColumnMajorUniformToLargestGridLayout>();
    winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->OnRowSpacingPropertyChanged(args);
}

void RowSpacing ( double value )

Definition at line 131 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->SetValue(s_RowSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double RowSpacing ( )

Definition at line 139 of file ColumnMajorUniformToLargestGridLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->GetValue(s_RowSpacingProperty));
}

static winrt::DependencyProperty RowSpacingProperty ( ) [inline, static]

Definition at line 23 of file ColumnMajorUniformToLargestGridLayout.properties.h.

{ return s_RowSpacingProperty; }

Member Data Documentation

GlobalDependencyProperty s_ColumnSpacingProperty [static]

Definition at line 25 of file ColumnMajorUniformToLargestGridLayout.properties.h.

GlobalDependencyProperty s_MaxColumnsProperty [static]

Definition at line 26 of file ColumnMajorUniformToLargestGridLayout.properties.h.

GlobalDependencyProperty s_RowSpacingProperty [static]

Definition at line 27 of file ColumnMajorUniformToLargestGridLayout.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ColumnMajorUniformToLargestGridLayout.properties.h
  • Generated/ColumnMajorUniformToLargestGridLayout.properties.cpp
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBoxDropDownEventRevokers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

ComboBoxDropDownEventRevokers Class Reference

#include "ComboBoxHelper.h"

List of all members.

Public Member Functions

void | RevokeAll ()

Public Attributes

winrt::ComboBox::DropDownClosed_revoker | m_dropDownClosedRevoker
winrt::ComboBox::DropDownOpened_revoker | m_dropDownOpenedRevoker

Detailed Description

Definition at line 30 of file ComboBoxHelper.h.

Member Function Documentation

void RevokeAll ( ) [inline]

Definition at line 34 of file ComboBoxHelper.h.

    {
        m_dropDownOpenedRevoker.revoke();
        m_dropDownClosedRevoker.revoke();
    }

Member Data Documentation

winrt::ComboBox::DropDownClosed_revoker m_dropDownClosedRevoker

Definition at line 41 of file ComboBoxHelper.h.

winrt::ComboBox::DropDownOpened_revoker m_dropDownOpenedRevoker

Definition at line 40 of file ComboBoxHelper.h.

The documentation for this class was generated from the following file:
  • ComboBox/ComboBoxHelper.h
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBoxHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions

ComboBoxHelper Class Reference

#include "ComboBoxHelper.h"

Inherits ComboBoxHelperProperties.

List of all members.

Public Member Functions

ComboBoxHelper ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | DropDownEventRevokersProperty ()
static void | EnsureProperties ()
static void | OnKeepInteriorCornersSquarePropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Static Public Attributes

static GlobalDependencyProperty | s_DropDownEventRevokersProperty

Static Private Member Functions

static bool | IsPopupOpenDown (const winrt::ComboBox &comboBox)
static void | OnDropDownClosed (const winrt::IInspectable &sender, const winrt::IInspectable &args)
static void | OnDropDownOpened (const winrt::IInspectable &sender, const winrt::IInspectable &args)
static void | UpdateCornerRadius (const winrt::ComboBox &comboBox, bool isDropDownOpen)

Detailed Description

Definition at line 8 of file ComboBoxHelper.h.

Constructor & Destructor Documentation

ComboBoxHelper ( )

Definition at line 16 of file ComboBoxHelper.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Reimplemented from ComboBoxHelperProperties.

Definition at line 38 of file ComboBoxHelper.cpp.

{
    s_DropDownEventRevokersProperty = nullptr;
    ComboBoxHelperProperties::ClearProperties();
}

static winrt::DependencyProperty DropDownEventRevokersProperty ( ) [inline, static]

Definition at line 18 of file ComboBoxHelper.h.

{ return s_DropDownEventRevokersProperty; }

void EnsureProperties ( ) [static]

Reimplemented from ComboBoxHelperProperties.

Definition at line 21 of file ComboBoxHelper.cpp.

{
    if (!s_DropDownEventRevokersProperty)
    {
        s_DropDownEventRevokersProperty =
            InitializeDependencyProperty(
                L"DropDownEventRevokers",
                winrt::name_of<winrt::IInspectable>(),
                winrt::name_of<winrt::ComboBoxHelper>(),
                true /* isAttached */,
                ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
                nullptr);
    }

    ComboBoxHelperProperties::EnsureProperties();
}

bool IsPopupOpenDown ( const winrt::ComboBox & comboBox ) [static, private]

Definition at line 125 of file ComboBoxHelper.cpp.

{
    double verticalOffset = 0;
    if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, comboBox))
    {
        if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_editableTextName, comboBox))
        {
            const auto transform = popupBorder.TransformToVisual(textBox);
            const auto popupTop = transform.TransformPoint(winrt::Point(0, 0));
            verticalOffset = popupTop.Y;
        }
    }
    return verticalOffset > 0;
}

void OnDropDownClosed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [static, private]

Definition at line 87 of file ComboBoxHelper.cpp.

{
    auto comboBox = sender.as<winrt::ComboBox>();
    UpdateCornerRadius(comboBox, /*IsDropDownOpen=*/false);
}

void OnDropDownOpened | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [static, private]

Definition at line 72 of file ComboBoxHelper.cpp.

{
    auto comboBox = sender.as<winrt::ComboBox>();
    // We need to know whether the dropDown opens above or below the ComboBox in order to update corner radius correctly.
    // Sometimes TransformToPoint value is incorrect because popup is not fully opened when this function gets called.
    // Use dispatcher to make sure we get correct VerticalOffset.
    if(auto dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread())
    {
        auto result = dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler([comboBox]()
        {
            UpdateCornerRadius(comboBox, /*IsDropDownOpen=*/true);
        }));
    }
}

void OnKeepInteriorCornersSquarePropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static]

Definition at line 48 of file ComboBoxHelper.cpp.

{
    if (auto comboBox = sender.try_as<winrt::ComboBox>())
    {
        bool shouldMonitorDropDownState = unbox_value<bool>(args.NewValue());
        if (shouldMonitorDropDownState)
        {
            auto revokersInspectable = winrt::make<ComboBoxDropDownEventRevokers>();
            auto revokers = revokersInspectable.as<ComboBoxDropDownEventRevokers>();

            revokers->m_dropDownOpenedRevoker = comboBox.DropDownOpened(winrt::auto_revoke, ComboBoxHelper::OnDropDownOpened);
            revokers->m_dropDownClosedRevoker = comboBox.DropDownClosed(winrt::auto_revoke, ComboBoxHelper::OnDropDownClosed);

            comboBox.SetValue(DropDownEventRevokersProperty(), revokersInspectable);
        }
        else
        {
            comboBox.SetValue(DropDownEventRevokersProperty(), nullptr);
        }
    }
}

void UpdateCornerRadius | ( | const winrt::ComboBox & | comboBox,
 |  | bool | isDropDownOpen |
 | ) |  |  | [static, private]

Definition at line 93 of file ComboBoxHelper.cpp.

{
    if (comboBox.IsEditable())
    {
        auto popupRadius = unbox_value<winrt::CornerRadius>(ResourceAccessor::ResourceLookup(comboBox, box_value(c_overlayCornerRadiusKey)));

        auto textBoxRadius = comboBox.CornerRadius();

        if (isDropDownOpen)
        {
            const bool isOpenDown = IsPopupOpenDown(comboBox);
            auto cornerRadiusConverter = winrt::make_self<CornerRadiusFilterConverter>();

            const auto popupRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Bottom : winrt::CornerRadiusFilterKind::Top;
            popupRadius = cornerRadiusConverter->Convert(popupRadius, popupRadiusFilter);

            const auto textBoxRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Top : winrt::CornerRadiusFilterKind::Bottom;
            textBoxRadius = cornerRadiusConverter->Convert(textBoxRadius, textBoxRadiusFilter);
        }

        if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, comboBox))
        {
            popupBorder.CornerRadius(popupRadius);
        }

        if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_editableTextName, comboBox))
        {
            textBox.CornerRadius(textBoxRadius);
        }
    }
}

Member Data Documentation

GlobalDependencyProperty s_DropDownEventRevokersProperty [static]

Definition at line 21 of file ComboBoxHelper.h.

The documentation for this class was generated from the following files:
  • ComboBox/ComboBoxHelper.h
  • ComboBox/ComboBoxHelper.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBoxHelperProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ComboBoxHelperProperties Class Reference

#include "ComboBoxHelper.properties.h"

Inherited by ComboBoxHelper.

List of all members.

Public Member Functions

ComboBoxHelperProperties ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static bool | GetKeepInteriorCornersSquare (winrt::ComboBox const &target)
static winrt::DependencyProperty | KeepInteriorCornersSquareProperty ()
static void | SetKeepInteriorCornersSquare (winrt::ComboBox const &target, bool value)

Static Public Attributes

static GlobalDependencyProperty | s_KeepInteriorCornersSquareProperty

Detailed Description

Definition at line 7 of file ComboBoxHelper.properties.h.

Constructor & Destructor Documentation

ComboBoxHelperProperties ( )

Definition at line 18 of file ComboBoxHelper.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Reimplemented in ComboBoxHelper.

Definition at line 38 of file ComboBoxHelper.properties.cpp.

{
    s_KeepInteriorCornersSquareProperty = nullptr;
}

void EnsureProperties ( ) [static]

Reimplemented in ComboBoxHelper.

Definition at line 23 of file ComboBoxHelper.properties.cpp.

{
    if (!s_KeepInteriorCornersSquareProperty)
    {
        s_KeepInteriorCornersSquareProperty =
            InitializeDependencyProperty(
                L"KeepInteriorCornersSquare",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ComboBoxHelper>(),
                true /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(false),
                &ComboBoxHelper::OnKeepInteriorCornersSquarePropertyChanged);
    }
}

bool GetKeepInteriorCornersSquare ( winrt::ComboBox const & target ) [static]

Definition at line 49 of file ComboBoxHelper.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(target.GetValue(s_KeepInteriorCornersSquareProperty));
}

static winrt::DependencyProperty KeepInteriorCornersSquareProperty ( ) [inline, static]

Definition at line 15 of file ComboBoxHelper.properties.h.

{ return s_KeepInteriorCornersSquareProperty; }

void SetKeepInteriorCornersSquare | ( | winrt::ComboBox const & | target,
 |  | bool | value |
 | ) |  |  | [static]

Definition at line 44 of file ComboBoxHelper.properties.cpp.

{
    target.SetValue(s_KeepInteriorCornersSquareProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
}

Member Data Documentation

GlobalDependencyProperty s_KeepInteriorCornersSquareProperty [static]

Definition at line 17 of file ComboBoxHelper.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ComboBoxHelper.properties.h
  • Generated/ComboBoxHelper.properties.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

CommandBarFlyout Class Reference

#include "CommandBarFlyout.h"

Inherits ReferenceTracker< CommandBarFlyout, winrt::implementation::CommandBarFlyoutT >.

List of all members.

Public Member Functions

CommandBarFlyout ()
~CommandBarFlyout ()
void | AddDropShadow ()
void | AlwaysExpanded (bool value)
bool | AlwaysExpanded ()
winrt::Control | CreatePresenter ()
tracker_ref
< winrt::FlyoutPresenter > 		GetPresenter ()
winrt::IObservableVector
< winrt::ICommandBarElement > 		PrimaryCommands ()
void | RemoveDropShadow ()
winrt::IObservableVector
< winrt::ICommandBarElement > 		SecondaryCommands ()

Private Member Functions

void | HookAllCommandBarElementDependencyPropertyChanges ()
void | HookAppBarButtonDependencyPropertyChanges (winrt::AppBarButton const &appBarButton, int index)
void | HookAppBarToggleButtonDependencyPropertyChanges (winrt::AppBarToggleButton const &appBarToggleButton, int index)
void | OnCommandBarElementDependencyPropertyChanged (winrt::DependencyObject const &dependencyObject, winrt::DependencyProperty const &dependencyProperty)
void | SetSecondaryCommandsToCloseWhenExecuted ()
void | UnhookAllCommandBarElementDependencyPropertyChanges ()
void | UnhookCommandBarElementDependencyPropertyChanges (int index, bool eraseRevokers=true)

Private Attributes

std::map< int,
PropertyChanged_revoker[s_commandBarElementDependencyPropertiesCount]> 		m_propertyChangedRevokersByIndexMap
std::map< int,
winrt::ButtonBase::Click_revoker > 		m_secondaryButtonClickRevokerByIndexMap
std::map< int,
winrt::ToggleButton::Checked_revoker > 		m_secondaryToggleButtonCheckedRevokerByIndexMap
std::map< int,
winrt::ToggleButton::Unchecked_revoker > 		m_secondaryToggleButtonUncheckedRevokerByIndexMap

Static Private Attributes

static winrt::DependencyProperty | s_appBarButtonDependencyProperties [s_commandBarElementDependencyPropertiesCount]
static winrt::DependencyProperty | s_appBarToggleButtonDependencyProperties [s_commandBarElementDependencyPropertiesCount]

Detailed Description

Definition at line 9 of file CommandBarFlyout.h.

Constructor & Destructor Documentation

CommandBarFlyout ( )

Definition at line 24 of file CommandBarFlyout.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_CommandBarFlyout);

    // Initialize s_appBarButtonDependencyProperties and s_appBarToggleButtonDependencyProperties if needed.
    if (s_appBarButtonDependencyProperties[0] == nullptr)
    {
        s_appBarButtonDependencyProperties[0] = winrt::AppBarButton::IconProperty();
        s_appBarButtonDependencyProperties[1] = winrt::AppBarButton::LabelProperty();

        s_appBarToggleButtonDependencyProperties[0] = winrt::AppBarToggleButton::IconProperty();
        s_appBarToggleButtonDependencyProperties[1] = winrt::AppBarToggleButton::LabelProperty();

        s_appBarButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount - 1] = winrt::AppBarButton::KeyboardAcceleratorTextOverrideProperty();
        s_appBarToggleButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount - 1] = winrt::AppBarToggleButton::KeyboardAcceleratorTextOverrideProperty();
    }

    if (winrt::IFlyoutBase thisAsFlyoutBase = *this)
    {
        thisAsFlyoutBase.ShouldConstrainToRootBounds(false);
        thisAsFlyoutBase.AreOpenCloseAnimationsEnabled(false);
    }

    m_primaryCommands = winrt::make<Vector<winrt::ICommandBarElement>>().as<winrt::IObservableVector<winrt::ICommandBarElement>>();
    m_secondaryCommands = winrt::make<Vector<winrt::ICommandBarElement>>().as<winrt::IObservableVector<winrt::ICommandBarElement>>();

    m_primaryCommandsVectorChangedToken = m_primaryCommands.VectorChanged({
        [this](winrt::IObservableVector<winrt::ICommandBarElement> const& sender, winrt::IVectorChangedEventArgs const& args)
        {
            if (auto commandBar = m_commandBar.get())
            {
                SharedHelpers::ForwardVectorChange(sender, commandBar.PrimaryCommands(), args);
            }
        }
    });

    m_secondaryCommandsVectorChangedToken = m_secondaryCommands.VectorChanged({
        [this](winrt::IObservableVector<winrt::ICommandBarElement> const& sender, winrt::IVectorChangedEventArgs const& args)
        {
            if (auto commandBar = m_commandBar.get())
            {
                SharedHelpers::ForwardVectorChange(sender, commandBar.SecondaryCommands(), args);

                // We want to ensure that any interaction with secondary items causes the CommandBarFlyout
                // to close, so we'll attach a Click handler to any buttons and Checked/Unchecked handlers
                // to any toggle buttons that we get and close the flyout when they're invoked.
                // The only exception is buttons with flyouts - in that case, clicking on the button
                // will just open the flyout rather than executing an action, so we don't want that to
                // do anything.
                const int index = args.Index();
                const auto closeFlyoutFunc = [this](auto const& sender, auto const& args) { Hide(); };

                switch (args.CollectionChange())
                {
                case winrt::CollectionChange::ItemChanged:
                {
                    auto element = sender.GetAt(index);
                    auto button = element.try_as<winrt::AppBarButton>();
                    auto toggleButton = element.try_as<winrt::AppBarToggleButton>();

                    UnhookCommandBarElementDependencyPropertyChanges(index);

                    if (button)
                    {
                        HookAppBarButtonDependencyPropertyChanges(button, index);
                    }
                    else if (toggleButton)
                    {
                        HookAppBarToggleButtonDependencyPropertyChanges(toggleButton, index);
                    }

                    if (button && !button.Flyout())
                    {
                        m_secondaryButtonClickRevokerByIndexMap[index] = button.Click(winrt::auto_revoke, closeFlyoutFunc);
                        SharedHelpers::EraseIfExists(m_secondaryToggleButtonCheckedRevokerByIndexMap, index);
                        SharedHelpers::EraseIfExists(m_secondaryToggleButtonUncheckedRevokerByIndexMap, index);
                    }
                    else if (toggleButton)
                    {
                        SharedHelpers::EraseIfExists(m_secondaryButtonClickRevokerByIndexMap, index);
                        m_secondaryToggleButtonCheckedRevokerByIndexMap[index] = toggleButton.Checked(winrt::auto_revoke, closeFlyoutFunc);
                        m_secondaryToggleButtonUncheckedRevokerByIndexMap[index] = toggleButton.Unchecked(winrt::auto_revoke, closeFlyoutFunc);
                    }
                    else
                    {
                        SharedHelpers::EraseIfExists(m_secondaryButtonClickRevokerByIndexMap, index);
                        SharedHelpers::EraseIfExists(m_secondaryToggleButtonCheckedRevokerByIndexMap, index);
                        SharedHelpers::EraseIfExists(m_secondaryToggleButtonUncheckedRevokerByIndexMap, index);
                    }
                    break;
                }
                case winrt::CollectionChange::ItemInserted:
                {
                    auto element = sender.GetAt(index);
                    auto button = element.try_as<winrt::AppBarButton>();
                    auto toggleButton = element.try_as<winrt::AppBarToggleButton>();

                    if (button)
                    {
                        HookAppBarButtonDependencyPropertyChanges(button, index);
                    }
                    else if (toggleButton)
                    {
                        HookAppBarToggleButtonDependencyPropertyChanges(toggleButton, index);
                    }

                    if (button && !button.Flyout())
                    {
                        m_secondaryButtonClickRevokerByIndexMap[index] = button.Click(winrt::auto_revoke, closeFlyoutFunc);
                    }
                    else if (toggleButton)
                    {
                        m_secondaryToggleButtonCheckedRevokerByIndexMap[index] = toggleButton.Checked(winrt::auto_revoke, closeFlyoutFunc);
                        m_secondaryToggleButtonUncheckedRevokerByIndexMap[index] = toggleButton.Unchecked(winrt::auto_revoke, closeFlyoutFunc);
                    }
                    break;
                }
                case winrt::CollectionChange::ItemRemoved:
                    UnhookCommandBarElementDependencyPropertyChanges(index);

                    SharedHelpers::EraseIfExists(m_secondaryButtonClickRevokerByIndexMap, index);
                    SharedHelpers::EraseIfExists(m_secondaryToggleButtonCheckedRevokerByIndexMap, index);
                    SharedHelpers::EraseIfExists(m_secondaryToggleButtonUncheckedRevokerByIndexMap, index);
                    break;
                case winrt::CollectionChange::Reset:
                    SetSecondaryCommandsToCloseWhenExecuted();
                    HookAllCommandBarElementDependencyPropertyChanges();
                    break;
                default:
                    MUX_ASSERT(false);
                }
            }
        }
    });

    Opening({
        [this](auto const&, auto const&)
        {
            // The CommandBarFlyout is shown in standard mode in the case
            // where it's being opened as a context menu, rather than as a selection flyout.
            // In that circumstance, we want to have the flyout be open from the start.
            winrt::IFlyoutBase thisAsFlyoutBase = *this;

            if (auto commandBar = m_commandBar.get())
            {
                // If we are in AlwaysExpanded mode then we want to make sure we open in Standard ShowMode
                // Otherwise the timing on the creation of the two drops shows is such that the primary items
                // draw their shadow on top of the secondary items.
                // When CommandBarFlyout is in AlwaysOpen state, don't show the overflow button
                if (AlwaysExpanded())
                {
                    commandBar.OverflowButtonVisibility(winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility::Collapsed);
                    ShowMode(winrt::FlyoutShowMode::Standard);
                }
                else
                {
                    commandBar.OverflowButtonVisibility(winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility::Auto);
                }
                SharedHelpers::QueueCallbackForCompositionRendering(
                    [strongThis = get_strong(), commandBar]
                    {
                        if (auto const commandBarFlyoutCommandBar = winrt::get_self<CommandBarFlyoutCommandBar>(commandBar))
                        {
                            auto const scopeGuard = gsl::finally([commandBarFlyoutCommandBar]()
                                {
                                    commandBarFlyoutCommandBar->m_commandBarFlyoutIsOpening = false;
                                });
                            commandBarFlyoutCommandBar->m_commandBarFlyoutIsOpening = true;

                            // If we don't have IFlyoutBase5 available, then we assume a standard show mode.
                            if (strongThis->ShowMode() == winrt::FlyoutShowMode::Standard)
                            {
                                commandBar.IsOpen(true);
                            }
                        }
                    }
                );
            }

            if (m_primaryCommands.Size() > 0)
            {
                AddDropShadow();
            }
        }
    });

    Opened({
        [this](auto const&, auto const&)
        {
            if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
            {
                if (commandBar->HasOpenAnimation())
                {
                    commandBar->PlayOpenAnimation();
                }
            }

            if (auto commandBarPeer = winrt::FrameworkElementAutomationPeer::FromElement(m_commandBar.get()))
            {
                commandBarPeer.RaiseAutomationEvent(winrt::AutomationEvents::MenuOpened);
            }
        }
    });

    Closing({
        [this](auto const&, winrt::FlyoutBaseClosingEventArgs const& args)
        {
            if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
            {
                // We are not able to fade this shadow out with the V2 default opacity closing animition.
                // Additionally we drop shadows doing play well with the clip animation of the V1 style.
                // So we need to remove it in all cases.
                RemoveDropShadow();

                if (!m_isClosingAfterCloseAnimation && commandBar->HasCloseAnimation())
                {
                    args.Cancel(true);

                    const winrt::CommandBarFlyout commandBarFlyout = *this;

                    commandBar->PlayCloseAnimation(
                        winrt::make_weak(commandBarFlyout),
                        [this]()
                        {
                            m_isClosingAfterCloseAnimation = true;
                            Hide();
                            m_isClosingAfterCloseAnimation = false;
                        });
                }
                else
                {
                    // If we don't have an animation, close the command bar and thus it's subflyouts.
                    commandBar->IsOpen(false);
                }

                //Drop shadows do not play nicely with clip animations, if we are using both, clear the shadow
                if (commandBar->OpenAnimationKind() == CommandBarFlyoutOpenCloseAnimationKind::Clip)
                {
                    commandBar->ClearShadow();
                }
            }
        }
    });

    // Close the CommandBar in order to ensure that we're always starting from a known state when opening the flyout.
    Closed({
        [this](auto const&, auto const&)
        {
            if (auto& commandBar = m_commandBar.get())
            {
                if (commandBar.IsOpen())
                {
                    commandBar.IsOpen(false);
                }

                if (auto commandBarPeer = winrt::FrameworkElementAutomationPeer::FromElement(commandBar))
                {
                    commandBarPeer.RaiseAutomationEvent(winrt::AutomationEvents::MenuClosed);
                }
            }
        }
    });
}

~CommandBarFlyout ( )

Definition at line 288 of file CommandBarFlyout.cpp.

{
    m_primaryCommands.VectorChanged(m_primaryCommandsVectorChangedToken);
    m_secondaryCommands.VectorChanged(m_secondaryCommandsVectorChangedToken);

    UnhookAllCommandBarElementDependencyPropertyChanges();
}

Member Function Documentation

void AddDropShadow ( )

Definition at line 424 of file CommandBarFlyout.cpp.

{
    if (auto&& presenter = m_presenter.get())
    {
        winrt::Microsoft::UI::Xaml::Media::ThemeShadow shadow;
        presenter.Shadow(shadow);
    }
}

void AlwaysExpanded ( bool value ) [inline]

Definition at line 17 of file CommandBarFlyout.h.

{ m_alwaysExpanded = value; }

bool AlwaysExpanded ( ) [inline]

Definition at line 16 of file CommandBarFlyout.h.

{ return m_alwaysExpanded; }

winrt::Control CreatePresenter ( )

Definition at line 306 of file CommandBarFlyout.cpp.

{
    auto commandBar = winrt::make_self<CommandBarFlyoutCommandBar>();

    // Localized string resource lookup is more expensive on MRTCore. Do the lookup ahead of time and reuse it for all
    // the CommandBarFlyoutCommandBar::EnsureLocalizedControlTypes calls in response to PrimaryCommands/SecondCommands
    // changed events.
    commandBar->CacheLocalizedStringResources();
    auto const scopeGuard = gsl::finally([commandBar]()
        {
            commandBar->ClearLocalizedStringResourceCache();
        });

    SharedHelpers::CopyVector(m_primaryCommands, commandBar->PrimaryCommands());
    SharedHelpers::CopyVector(m_secondaryCommands, commandBar->SecondaryCommands());

    SetSecondaryCommandsToCloseWhenExecuted();
    HookAllCommandBarElementDependencyPropertyChanges();

    winrt::FlyoutPresenter presenter;
    presenter.Background(nullptr);
    presenter.Foreground(nullptr);
    presenter.BorderBrush(nullptr);
    presenter.MinWidth(0);
    presenter.MaxWidth(std::numeric_limits<double>::infinity());
    presenter.MinHeight(0);
    presenter.MaxHeight(std::numeric_limits<double>::infinity());
    presenter.BorderThickness(winrt::ThicknessHelper::FromUniformLength(0));
    presenter.Padding(winrt::ThicknessHelper::FromUniformLength(0));
    presenter.Content(*commandBar);
    // Clear the default CornerRadius(4) on FlyoutPresenter, CommandBarFlyout will do its own handling.
    presenter.CornerRadius({ 0 });
    presenter.Translation({ 0.0f, 0.0f, 32.0f });

    // Disable the default shadow, as we'll be providing our own shadow.
    presenter.IsDefaultShadowEnabled(false);

    m_presenter.set(presenter);

    m_commandBarOpenedRevoker = commandBar->Opened(winrt::auto_revoke, {
        [this](auto const&, auto const&)
        {
            // If we open the CommandBar, then we should no longer be in a transient show mode -
            // we now know that the user wants to interact with us.
            ShowMode(winrt::FlyoutShowMode::Standard);
        }
    });

    commandBar->SetPresenter(presenter);

    // We'll need to remove the presenter's drop shadow on the commandBar's Opening/Closing
    // because we need it to disappear during its expand/shrink animation when the Overflow is opened.
    // It will be re-added once the storyboard for the overflow animations are completed.
    // That code can be found inside CommandBarFlyoutCommandBar.
    m_commandBarOpeningRevoker = commandBar->Opening(winrt::auto_revoke, {
        [this, presenter](auto const&, auto const&)
        {
            if (const auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
            {
                if (commandBar->HasSecondaryOpenCloseAnimations())
                {
                    // We'll only need to do the mid-animation remove/add when the "..." button is
                    // pressed to open/close the overflow. This means we shouldn't do it for AlwaysExpanded
                    // and if there's nothing in the overflow.
                    if (m_secondaryCommands.Size() > 0)
                    {
                        RemoveDropShadow();
                    }
                }
            }
        }
        });

    m_commandBarClosingRevoker = commandBar->Closing(winrt::auto_revoke, {
        [this](auto const&, auto const&)
        {
            if (const auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
            {
                if (commandBar->HasSecondaryOpenCloseAnimations())
                {
                    RemoveDropShadow();
                }
            }
        }
        });

    commandBar->SetOwningFlyout(*this);

    m_commandBar.set(*commandBar);
    return presenter;
}

tracker_ref< winrt::FlyoutPresenter > GetPresenter ( )

Definition at line 441 of file CommandBarFlyout.cpp.

{
    return m_presenter;
}

void HookAllCommandBarElementDependencyPropertyChanges ( ) [private]

Definition at line 472 of file CommandBarFlyout.cpp.

{
    UnhookAllCommandBarElementDependencyPropertyChanges();

    for (uint32_t i = 0; i < SecondaryCommands().Size(); i++)
    {
        auto element = SecondaryCommands().GetAt(i);
        auto button = element.try_as<winrt::AppBarButton>();
        auto toggleButton = element.try_as<winrt::AppBarToggleButton>();

        if (button)
        {
            HookAppBarButtonDependencyPropertyChanges(button, i);
        }
        else if (toggleButton)
        {
            HookAppBarToggleButtonDependencyPropertyChanges(toggleButton, i);
        }
    }
}

void HookAppBarButtonDependencyPropertyChanges | ( | winrt::AppBarButton const & | appBarButton,
 |  | int | index |
 | ) |  |  | [private]

Definition at line 446 of file CommandBarFlyout.cpp.

{
    const auto commandBarElementDependencyPropertiesCount = s_commandBarElementDependencyPropertiesCount;

    for (int commandBarElementDependencyPropertyIndex = 0; commandBarElementDependencyPropertyIndex < commandBarElementDependencyPropertiesCount; commandBarElementDependencyPropertyIndex++)
    {
        m_propertyChangedRevokersByIndexMap[index][commandBarElementDependencyPropertyIndex] =
            RegisterPropertyChanged(
                appBarButton,
                s_appBarButtonDependencyProperties[commandBarElementDependencyPropertyIndex], { this, &CommandBarFlyout::OnCommandBarElementDependencyPropertyChanged });
    }
}

void HookAppBarToggleButtonDependencyPropertyChanges | ( | winrt::AppBarToggleButton const & | appBarToggleButton,
 |  | int | index |
 | ) |  |  | [private]

Definition at line 459 of file CommandBarFlyout.cpp.

{
    const auto commandBarElementDependencyPropertiesCount = s_commandBarElementDependencyPropertiesCount;

    for (int commandBarElementDependencyPropertyIndex = 0; commandBarElementDependencyPropertyIndex < commandBarElementDependencyPropertiesCount; commandBarElementDependencyPropertyIndex++)
    {
        m_propertyChangedRevokersByIndexMap[index][commandBarElementDependencyPropertyIndex] =
            RegisterPropertyChanged(
                appBarToggleButton,
                s_appBarToggleButtonDependencyProperties[commandBarElementDependencyPropertyIndex], { this, &CommandBarFlyout::OnCommandBarElementDependencyPropertyChanged });
    }
}

void OnCommandBarElementDependencyPropertyChanged | ( | winrt::DependencyObject const & | dependencyObject,
 |  | winrt::DependencyProperty const & | dependencyProperty |
 | ) |  |  | [private]

Definition at line 522 of file CommandBarFlyout.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
    {
        commandBar->OnCommandBarElementDependencyPropertyChanged();
    }
}

winrt::IObservableVector< winrt::ICommandBarElement > PrimaryCommands ( )

Definition at line 296 of file CommandBarFlyout.cpp.

{
    return m_primaryCommands;
}

void RemoveDropShadow ( )

Definition at line 433 of file CommandBarFlyout.cpp.

{
    if (auto&& presenter = m_presenter.get())
    {
        presenter.Shadow(nullptr);
    }
}

winrt::IObservableVector< winrt::ICommandBarElement > SecondaryCommands ( )

Definition at line 301 of file CommandBarFlyout.cpp.

{
    return m_secondaryCommands;
}

void SetSecondaryCommandsToCloseWhenExecuted ( ) [private]

Definition at line 398 of file CommandBarFlyout.cpp.

{
    m_secondaryButtonClickRevokerByIndexMap.clear();
    m_secondaryToggleButtonCheckedRevokerByIndexMap.clear();
    m_secondaryToggleButtonUncheckedRevokerByIndexMap.clear();

    const auto closeFlyoutFunc = [this](auto const& sender, auto const& args) { Hide(); };

    for (uint32_t i = 0; i < SecondaryCommands().Size(); i++)
    {
        auto element = SecondaryCommands().GetAt(i);
        auto button = element.try_as<winrt::AppBarButton>();
        auto toggleButton = element.try_as<winrt::AppBarToggleButton>();

        if (button && !button.Flyout())
        {
            m_secondaryButtonClickRevokerByIndexMap[i] = button.Click(winrt::auto_revoke, closeFlyoutFunc);
        }
        else if (toggleButton)
        {
            m_secondaryToggleButtonCheckedRevokerByIndexMap[i] = toggleButton.Checked(winrt::auto_revoke, closeFlyoutFunc);
            m_secondaryToggleButtonUncheckedRevokerByIndexMap[i] = toggleButton.Unchecked(winrt::auto_revoke, closeFlyoutFunc);
        }
    }
}

void UnhookAllCommandBarElementDependencyPropertyChanges ( ) [private]

Definition at line 512 of file CommandBarFlyout.cpp.

{
    for (auto const& revokers : m_propertyChangedRevokersByIndexMap)
    {
        UnhookCommandBarElementDependencyPropertyChanges(revokers.first, false /*eraseRevokers*/);
    }
    m_propertyChangedRevokersByIndexMap.clear();
}

void UnhookCommandBarElementDependencyPropertyChanges | ( | int | index,
 |  | bool | eraseRevokers = true |
 | ) |  |  | [private]

Definition at line 493 of file CommandBarFlyout.cpp.

{
    const auto revokers = m_propertyChangedRevokersByIndexMap.find(index);
    if (revokers != m_propertyChangedRevokersByIndexMap.end())
    {
        const auto commandBarElementDependencyPropertiesCount = s_commandBarElementDependencyPropertiesCount;

        for (int commandBarElementDependencyPropertyIndex = 0; commandBarElementDependencyPropertyIndex < commandBarElementDependencyPropertiesCount; commandBarElementDependencyPropertyIndex++)
        {
            m_propertyChangedRevokersByIndexMap[index][commandBarElementDependencyPropertyIndex].revoke();
        }

        if (eraseRevokers)
        {
            m_propertyChangedRevokersByIndexMap.erase(revokers);
        }
    }
}

Member Data Documentation

std::map<int, PropertyChanged_revoker[s_commandBarElementDependencyPropertiesCount]> m_propertyChangedRevokersByIndexMap [private]

Definition at line 64 of file CommandBarFlyout.h.

std::map<int, winrt::ButtonBase::Click_revoker> m_secondaryButtonClickRevokerByIndexMap [private]

Definition at line 46 of file CommandBarFlyout.h.

std::map<int, winrt::ToggleButton::Checked_revoker> m_secondaryToggleButtonCheckedRevokerByIndexMap [private]

Definition at line 62 of file CommandBarFlyout.h.

std::map<int, winrt::ToggleButton::Unchecked_revoker> m_secondaryToggleButtonUncheckedRevokerByIndexMap [private]

Definition at line 63 of file CommandBarFlyout.h.

winrt::DependencyProperty s_appBarButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount] [static, private]

Definition at line 30 of file CommandBarFlyout.h.

winrt::DependencyProperty s_appBarToggleButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount] [static, private]

Definition at line 36 of file CommandBarFlyout.h.

The documentation for this class was generated from the following files:
  • CommandBarFlyout/CommandBarFlyout.h
  • CommandBarFlyout/CommandBarFlyout.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

CommandBarFlyoutCommandBar Class Reference

#include "CommandBarFlyoutCommandBar.h"

Inherits ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT >, and CommandBarFlyoutCommandBarProperties.

List of all members.

Public Member Functions

CommandBarFlyoutCommandBar ()
~CommandBarFlyoutCommandBar ()
void | BindOwningFlyoutPresenterToCornerRadius ()
void | CacheLocalizedStringResources ()
void | ClearLocalizedStringResourceCache ()
void | ClearShadow ()
bool | HasCloseAnimation ()
bool | HasOpenAnimation ()
bool | HasSecondaryOpenCloseAnimations ()
void | OnApplyTemplate ()
void | OnCommandBarElementDependencyPropertyChanged ()
void | OnKeyDown (winrt::KeyRoutedEventArgs const &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
CommandBarFlyoutOpenCloseAnimationKind OpenAnimationKind ()
void | PlayCloseAnimation (const winrt::weak_ref< winrt::CommandBarFlyout > &weakCommandBarFlyout, std::function< void()> onCompleteFunc)
void | PlayOpenAnimation ()
void | SetOwningFlyout (winrt::CommandBarFlyout const &owningFlyout)
void | SetPresenter (winrt::FlyoutPresenter const &presenter)

Private Member Functions

void | AttachControlEventHandlers ()
void | AttachEventsToSecondaryStoryboards ()
void | AttachItemEventHandlers ()
void | DetachEventHandlers ()
void | EnsureAutomationSetCountAndPosition ()
void | EnsureLocalizedControlTypes ()
template<class TCommand >
bool | HasVisibleLabel (TCommand const &command)
void | PopulateAccessibleControls ()
void | SetKnownCommandLocalizedControlTypes (winrt::ICommandBarElement const &command)
void | SetPresenterName (winrt::FlyoutPresenter const &presenter)
void | TryConnectSystemBackdrop ()
void | UpdateFlowsFromAndFlowsTo ()
void | UpdateItemVisualState (winrt::Control const &item, bool isPrimaryItem)
void | UpdateTemplateSettings ()
void | UpdateUI (bool useTransitions=true, bool isForSizeChange=false)
void | UpdateVisualState (bool useTransitions, bool isForSizeChange=false)

Static Private Member Functions

static void | EnsureTabStopUniqueness (winrt::IObservableVector< winrt::ICommandBarElement > const &commands, winrt::Control const &moreButton)
static winrt::IAsyncOperation
< bool > 		FocusCommand (winrt::IObservableVector< winrt::ICommandBarElement > commands, winrt::Control moreButton, winrt::FocusState focusState, bool firstCommand, bool ensureTabStopUniqueness)
static winrt::IAsyncOperation
< bool > 		FocusControl (winrt::Control newFocus, winrt::Control oldFocus, winrt::FocusState focusState, bool updateTabStop)
static winrt::Control | GetFirstTabStopControl (winrt::IObservableVector< winrt::ICommandBarElement > const &commands)
static bool | IsControlFocusable (winrt::Control const &control, bool checkTabStop)

Detailed Description

Definition at line 16 of file CommandBarFlyoutCommandBar.h.

Constructor & Destructor Documentation

CommandBarFlyoutCommandBar ( )

Definition at line 13 of file CommandBarFlyoutCommandBar.cpp.

{
    SetDefaultStyleKey(this);

    SetValue(s_FlyoutTemplateSettingsProperty, winrt::make<CommandBarFlyoutCommandBarTemplateSettings>());

    Loaded({
        [this](auto const&, auto const&)
        {
            COMMANDBARFLYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Loaded");

            UpdateUI(!m_commandBarFlyoutIsOpening);

            if (auto owningFlyout = m_owningFlyout.get())
            {
                // We only want to focus an initial element if we're opening in standard mode -
                // in transient mode, we don't want to be taking focus.
                if (owningFlyout.ShowMode() == winrt::FlyoutShowMode::Standard)
                {
                    // Programmatically focus the first primary command if any, else programmatically focus the first secondary command if any.
                    auto commands = PrimaryCommands().Size() > 0 ? PrimaryCommands() : (SecondaryCommands().Size() > 0 ? SecondaryCommands() : nullptr);

                    if (commands)
                    {
                        const bool usingPrimaryCommands = commands == PrimaryCommands();
                        const bool ensureTabStopUniqueness = usingPrimaryCommands;
                        const auto firstCommandAsFrameworkElement = commands.GetAt(0).try_as<winrt::FrameworkElement>();

                        if (firstCommandAsFrameworkElement)
                        {
                            if (firstCommandAsFrameworkElement.IsLoaded())
                            {
                                FocusCommand(
                                    commands,
                                    usingPrimaryCommands ? m_moreButton.get() : nullptr /*moreButton*/,
                                    winrt::FocusState::Programmatic /*focusState*/,
                                    true /*firstCommand*/,
                                    ensureTabStopUniqueness);
                            }
                            else
                            {
                                m_firstItemLoadedRevoker = firstCommandAsFrameworkElement.Loaded(winrt::auto_revoke,
                                {
                                    [this, commands, usingPrimaryCommands, ensureTabStopUniqueness](winrt::IInspectable const& sender, auto const&)
                                    {
                                        FocusCommand(
                                            commands,
                                            usingPrimaryCommands ? m_moreButton.get() : nullptr /*moreButton*/,
                                            winrt::FocusState::Programmatic /*focusState*/,
                                            true /*firstCommand*/,
                                            ensureTabStopUniqueness);
                                        m_firstItemLoadedRevoker.revoke();
                                    }
                                });
                            }
                        }
                    }
                }
            }

            TryConnectSystemBackdrop();
            // If we have a SystemBackdrop, it should be connected by now.
            MUX_ASSERT(m_registeredWithSystemBackdrop || !m_systemBackdrop);
        }
    });

    SizeChanged({
        [this](auto const&, auto const&)
        {
            COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"SizeChanged");

            UpdateUI(!m_commandBarFlyoutIsOpening, true /*isForSizeChange*/);
        }
    });

    Closing({
        [this](auto const&, auto const&)
        {
            COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Closing");

            if (auto owningFlyout = m_owningFlyout.get())
            {
                if (owningFlyout.AlwaysExpanded())
                {
                    // Don't close the secondary commands list when the flyout is AlwaysExpanded.
                    IsOpen(true);
                }
            }
        }
    });

    Closed({
        [this](auto const&, auto const&)
        {
            COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Closed");

            m_secondaryItemsRootSized = false;
        }
    });

    RegisterPropertyChangedCallback(
        winrt::AppBar::IsOpenProperty(),
        [this](auto const&, auto const&)
        {
            COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"IsOpenProperty changed");

            UpdateFlowsFromAndFlowsTo();
            UpdateUI(!m_commandBarFlyoutIsOpening);
        });

    // Since we own these vectors, we don't need to cache the event tokens -
    // in fact, if we tried to remove these handlers in our destructor,
    // these properties will have already been cleared, and we'll nullref.
    PrimaryCommands().VectorChanged({
        [this](auto const&, auto const&)
        {
            COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"PrimaryCommands VectorChanged");

            EnsureLocalizedControlTypes();
            PopulateAccessibleControls();
            UpdateFlowsFromAndFlowsTo();
            UpdateUI(!m_commandBarFlyoutIsOpening);
            AttachItemEventHandlers();
        }
    });

    SecondaryCommands().VectorChanged({
        [this](auto const&, auto const&)
        {
            COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"SecondaryCommands VectorChanged");

            m_secondaryItemsRootSized = false;
            EnsureLocalizedControlTypes();
            PopulateAccessibleControls();
            UpdateFlowsFromAndFlowsTo();
            UpdateUI(!m_commandBarFlyoutIsOpening);
            AttachItemEventHandlers();
        }
    });
}

~CommandBarFlyoutCommandBar ( )

Definition at line 154 of file CommandBarFlyoutCommandBar.cpp.

{
    // The SystemBackdrop DP has already been cleared out. Use our cached field.
    if (m_registeredWithSystemBackdrop)
    {
        if (auto systemBackdrop = m_systemBackdrop.get())
        {
            systemBackdrop.OnTargetDisconnected(m_backdropLink);
            systemBackdrop.OnTargetDisconnected(m_overflowPopupBackdropLink);
        }
    }
}

Member Function Documentation

void AttachControlEventHandlers ( ) [private]

Definition at line 286 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (auto overflowPopup = m_overflowPopup.get())
    {
        m_overflowPopupActualPlacementChangedRevoker = overflowPopup.ActualPlacementChanged(winrt::auto_revoke,
        {
            [this](auto const&, auto const&)
            {
                COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"OverflowPopup ActualPlacementChanged");

                UpdateUI();
            }
        });
    }

    if (auto secondaryItemsRoot = m_secondaryItemsRoot.get())
    {
        m_secondaryItemsRootSizeChangedRevoker = secondaryItemsRoot.SizeChanged(winrt::auto_revoke,
        {
            [this](auto const&, auto const&)
            {
                COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"secondaryItemsRoot SizeChanged");

                m_secondaryItemsRootSized = true;
                UpdateUI(!m_commandBarFlyoutIsOpening, true /*isForSizeChange*/);
            }
        });

        m_secondaryItemsRootPreviewKeyDownRevoker = secondaryItemsRoot.PreviewKeyDown(winrt::auto_revoke,
        {
            [this](auto const&, winrt::KeyRoutedEventArgs const& args)
            {
                COMMANDBARFLYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this,
                    TypeLogging::KeyRoutedEventArgsToString(args).c_str());

                if (args.Handled())
                {
                    return;
                }

                switch (args.Key())
                {
                case winrt::VirtualKey::Escape:
                {
                    // In addition to closing the CommandBar if someone hits the escape key,
                    // we also want to close the whole flyout.
                    if (auto owningFlyout = m_owningFlyout.get())
                    {
                        owningFlyout.Hide();
                    }
                    break;
                }

                case winrt::VirtualKey::Down:
                case winrt::VirtualKey::Up:
                {
                    OnKeyDown(args);
                    break;
                }
                }
            }
        });
    }

    if (m_openingStoryboard)
    {
        m_openingStoryboardCompletedRevoker =
            m_openingStoryboard.get().Completed(winrt::auto_revoke,
            {
                [this](auto const&, auto const&) { m_openingStoryboard.get().Stop(); }
            });
    }
}

void AttachEventsToSecondaryStoryboards ( ) [private]

Definition at line 1444 of file CommandBarFlyoutCommandBar.cpp.

{
    winrt::IControlProtected thisAsControlProtected = *this;

    const auto addDropShadowFunc = [this](auto const&, auto const&)
    {
        if (SharedHelpers::IsAnimationsEnabled())
        {
            if (const auto owningFlyout = m_owningFlyout.get())
            {
                if (const auto actualFlyout = winrt::get_self<CommandBarFlyout>(owningFlyout))
                {
                    actualFlyout->AddDropShadow();
                }
            }
        }
    };

    if (const auto expandedDownToCollapsed = GetTemplateChildT<winrt::Storyboard>(L"ExpandedDownToCollapsed", thisAsControlProtected))
    {
        m_expandedDownToCollapsedStoryboardRevoker = expandedDownToCollapsed.Completed(winrt::auto_revoke, addDropShadowFunc);
    }

    if (const auto expandedUpToCollapsed = GetTemplateChildT<winrt::Storyboard>(L"ExpandedUpToCollapsed", thisAsControlProtected))
    {
        m_expandedUpToCollapsedStoryboardRevoker = expandedUpToCollapsed.Completed(winrt::auto_revoke, addDropShadowFunc);
    }

    if (const auto collapsedToExpandedUp = GetTemplateChildT<winrt::Storyboard>(L"CollapsedToExpandedUp", thisAsControlProtected))
    {
        m_collapsedToExpandedUpStoryboardRevoker = collapsedToExpandedUp.Completed(winrt::auto_revoke, addDropShadowFunc);
    }

    if (const auto collapsedToExpandedDown = GetTemplateChildT<winrt::Storyboard>(L"CollapsedToExpandedDown", thisAsControlProtected))
    {
        m_collapsedToExpandedDownStoryboardRevoker = collapsedToExpandedDown.Completed(winrt::auto_revoke, addDropShadowFunc);
    }
}

void AttachItemEventHandlers ( ) [private]

Definition at line 362 of file CommandBarFlyoutCommandBar.cpp.

{
    m_itemLoadedRevokerVector.clear();
    m_itemSizeChangedRevokerVector.clear();

    for (auto const& command : PrimaryCommands())
    {
        if (auto commandAsFE = command.try_as<winrt::FrameworkElement>())
        {
            m_itemLoadedRevokerVector.push_back(commandAsFE.Loaded(winrt::auto_revoke, {
                [this](winrt::IInspectable const& sender, auto const&)
                {
                    UpdateItemVisualState(sender.as<winrt::Control>(), true /* isPrimaryControl */);
                    UpdateTemplateSettings();
                }
            }));

            m_itemSizeChangedRevokerVector.push_back(commandAsFE.SizeChanged(winrt::auto_revoke, {
                [this](winrt::IInspectable const& sender, auto const&)
                {
                    UpdateItemVisualState(sender.as<winrt::Control>(), true /* isPrimaryControl */);
                    UpdateTemplateSettings();
                }
            }));
        }
    }

    for (auto const& command : SecondaryCommands())
    {
        if (auto commandAsFE = command.try_as<winrt::FrameworkElement>())
        {
            m_itemLoadedRevokerVector.push_back(commandAsFE.Loaded(winrt::auto_revoke, {
                [this](winrt::IInspectable const& sender, auto const&)
                {
                    UpdateItemVisualState(sender.as<winrt::Control>(), false /* isPrimaryControl */);
                    UpdateTemplateSettings();
                }
            }));

            m_itemSizeChangedRevokerVector.push_back(commandAsFE.SizeChanged(winrt::auto_revoke, {
                [this](winrt::IInspectable const& sender, auto const&)
                {
                    UpdateItemVisualState(sender.as<winrt::Control>(), false /* isPrimaryControl */);
                    UpdateTemplateSettings();
                }
            }));
        }
    }
}

void BindOwningFlyoutPresenterToCornerRadius ( )

Definition at line 1483 of file CommandBarFlyoutCommandBar.cpp.

{
    if (const auto owningFlyout = m_owningFlyout.get())
    {
        if (const auto actualFlyout = winrt::get_self<CommandBarFlyout>(owningFlyout))
        {
            winrt::IControlProtected thisAsControlProtected = *this;
            if (const auto root = GetTemplateChildT<winrt::Grid>(L"LayoutRoot", thisAsControlProtected))
            {
                winrt::Binding binding;
                binding.Source(root);
                binding.Path(winrt::PropertyPath(L"CornerRadius"));
                binding.Mode(winrt::BindingMode::OneWay);
                if (auto&& presenter = actualFlyout->GetPresenter().get())
                {
                    presenter.SetBinding(winrt::Control::CornerRadiusProperty(), binding);
                }
            }
        }
    }
}

void CacheLocalizedStringResources ( )

Definition at line 1003 of file CommandBarFlyoutCommandBar.cpp.

{
    m_localizedCommandBarFlyoutAppBarButtonControlType = ResourceAccessor::GetLocalizedStringResource(SR_CommandBarFlyoutAppBarButtonLocalizedControlType);
    m_localizedCommandBarFlyoutAppBarToggleButtonControlType = ResourceAccessor::GetLocalizedStringResource(SR_CommandBarFlyoutAppBarToggleButtonLocalizedControlType);
    m_areLocalizedStringResourcesCached = true;
}

void ClearLocalizedStringResourceCache ( )

Definition at line 1010 of file CommandBarFlyoutCommandBar.cpp.

{
    m_areLocalizedStringResourcesCached = false;
    m_localizedCommandBarFlyoutAppBarButtonControlType.clear();
    m_localizedCommandBarFlyoutAppBarToggleButtonControlType.clear();
}

void ClearShadow ( )

Definition at line 1407 of file CommandBarFlyoutCommandBar.cpp.

{
    winrt::VisualStateManager::GoToState(*this, L"NoOuterOverflowContentRootShadow", true/*useTransitions*/);
}

void DetachEventHandlers ( ) [private]

Definition at line 412 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_keyDownRevoker.revoke();
    m_secondaryItemsRootPreviewKeyDownRevoker.revoke();
    m_secondaryItemsRootSizeChangedRevoker.revoke();
    m_firstItemLoadedRevoker.revoke();
    m_itemLoadedRevokerVector.clear();
    m_openingStoryboardCompletedRevoker.revoke();
    m_closingStoryboardCompletedCallbackRevoker.revoke();
    m_expandedUpToCollapsedStoryboardRevoker.revoke();
    m_expandedDownToCollapsedStoryboardRevoker.revoke();
    m_collapsedToExpandedUpStoryboardRevoker.revoke();
    m_collapsedToExpandedDownStoryboardRevoker.revoke();
}

void EnsureAutomationSetCountAndPosition ( ) [private]

Definition at line 930 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    auto moreButton = m_moreButton.get();
    int sizeOfSet = 0;

    for (const auto& command : PrimaryCommands())
    {
        if (auto commandAsUIElement = command.try_as<winrt::UIElement>())
        {
            // Don't count AppBarSeparator if IsTabStop is false
            if (auto separator = commandAsUIElement.try_as<winrt::AppBarSeparator>())
            {
                if (!separator.IsTabStop())
                {
                    continue;
                }
            }
            else if (commandAsUIElement.Visibility() == winrt::Visibility::Visible)
            {
                sizeOfSet++;
            }
        }
    }

    if (moreButton && moreButton.Visibility() == winrt::Visibility::Visible)
    {
        // Accounting for the MoreButton
        sizeOfSet++;
    }

    for (const auto& command : PrimaryCommands())
    {
        if (auto commandAsUIElement = command.try_as<winrt::UIElement>())
        {
            // Don't count AppBarSeparator if IsTabStop is false
            if (auto separator = commandAsUIElement.try_as<winrt::AppBarSeparator>())
            {
                if (!separator.IsTabStop())
                {
                    continue;
                }
            }
            else if (commandAsUIElement.Visibility() == winrt::Visibility::Visible)
            {
                winrt::AutomationProperties::SetSizeOfSet(commandAsUIElement, sizeOfSet);
            }
        }
    }

    if (moreButton && moreButton.Visibility() == winrt::Visibility::Visible)
    {
        winrt::AutomationProperties::SetSizeOfSet(moreButton, sizeOfSet);
        winrt::AutomationProperties::SetPositionInSet(moreButton, sizeOfSet);
    }
}

void EnsureLocalizedControlTypes ( ) [private]

Definition at line 988 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    for (auto const& command : PrimaryCommands())
    {
        SetKnownCommandLocalizedControlTypes(command);
    }

    for (auto const& command : SecondaryCommands())
    {
        SetKnownCommandLocalizedControlTypes(command);
    }
}

void EnsureTabStopUniqueness | ( | winrt::IObservableVector< winrt::ICommandBarElement > const & | commands,
 |  | winrt::Control const & | moreButton |
 | ) |  |  | [static, private]

Definition at line 1359 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, nullptr);

    MUX_ASSERT(commands);

    bool tabStopSeen = moreButton && moreButton.IsTabStop();

    if (tabStopSeen || GetFirstTabStopControl(commands))
    {
        // Make sure only one command or the MoreButton has IsTabStop set
        for (const auto& command : commands)
        {
            if (auto commandAsControl = command.try_as<winrt::Control>())
            {
                if (IsControlFocusable(commandAsControl, false /*checkTabStop*/) && commandAsControl.IsTabStop())
                {
                    if (!tabStopSeen)
                    {
                        tabStopSeen = true;
                    }
                    else
                    {
                        commandAsControl.IsTabStop(false);
                    }
                }
            }
        }
    }
    else
    {
        // Set IsTabStop to first focusable command
        for (const auto& command : commands)
        {
            if (auto commandAsControl = command.try_as<winrt::Control>())
            {
                if (IsControlFocusable(commandAsControl, false /*checkTabStop*/))
                {
                    commandAsControl.IsTabStop(true);
                    break;
                }
            }
        }
    }
}

winrt::IAsyncOperation< bool > FocusCommand | ( | winrt::IObservableVector< winrt::ICommandBarElement > | commands,
 |  | winrt::Control | moreButton,
 |  | winrt::FocusState | focusState,
 |  | bool | firstCommand,
 |  | bool | ensureTabStopUniqueness |
 | ) |  |  | [static, private]

Definition at line 1295 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, nullptr);

    MUX_ASSERT(commands);

    // Give focus to the first or last focusable command
    winrt::Control focusedControl = nullptr;
    int startIndex = 0;
    int endIndex = static_cast<int>(commands.Size());
    int deltaIndex = 1;

    if (!firstCommand)
    {
        deltaIndex = -1;
        startIndex = endIndex - 1;
        endIndex = -1;
    }

    for (int index = startIndex; index != endIndex; index += deltaIndex)
    {
        auto command = commands.GetAt(index);

        if (auto commandAsControl = command.try_as<winrt::Control>())
        {
            if (IsControlFocusable(commandAsControl, !ensureTabStopUniqueness /*checkTabStop*/))
            {
                if (!focusedControl)
                {
                    if (co_await FocusControl(
                        commandAsControl /*newFocus*/,
                        nullptr /*oldFocus*/,
                        focusState /*focusState*/,
                        ensureTabStopUniqueness /*updateTabStop*/))
                    {
                        if (ensureTabStopUniqueness && moreButton && moreButton.IsTabStop())
                        {
                            moreButton.IsTabStop(false);
                        }

                        focusedControl = commandAsControl;

                        if (!ensureTabStopUniqueness)
                        {
                            break;
                        }
                    }
                }
                else if (focusedControl && commandAsControl.IsTabStop())
                {
                    commandAsControl.IsTabStop(false);
                }
            }
        }
    }

    co_return focusedControl != nullptr;
}

winrt::IAsyncOperation< bool > FocusControl | ( | winrt::Control | newFocus,
 |  | winrt::Control | oldFocus,
 |  | winrt::FocusState | focusState,
 |  | bool | updateTabStop |
 | ) |  |  | [static, private]

Definition at line 1263 of file CommandBarFlyoutCommandBar.cpp.

{
    MUX_ASSERT(newFocus);

    if (updateTabStop)
    {
        newFocus.IsTabStop(true);
    }

    // Setting focus can cause us to enter the window message handler loop, which is bad if
    // CXcpDispatcher::OnReentrancyProtectedWindowMessage is on the callstack, since that can lead to reentry.
    // Switching to a background thread and then back to the UI thread ensures that this call to Control.Focus()
    // occurs outside that callstack.
    winrt::apartment_context uiThread;
    co_await winrt::resume_background();
    co_await uiThread;

    if (newFocus.Focus(focusState))
    {
        if (oldFocus && updateTabStop && oldFocus != newFocus)
        {
            oldFocus.IsTabStop(false);
        }
        co_return true;
    }
    co_return false;
}

winrt::Control GetFirstTabStopControl ( winrt::IObservableVector< winrt::ICommandBarElement > const & commands ) [static, private]

Definition at line 1247 of file CommandBarFlyoutCommandBar.cpp.

{
    for (const auto& command : commands)
    {
        if (auto commandAsControl = command.try_as<winrt::Control>())
        {
            if (commandAsControl.IsTabStop())
            {
                return commandAsControl;
            }
        }
    }
    return nullptr;
}

bool HasCloseAnimation ( )

Definition at line 450 of file CommandBarFlyoutCommandBar.cpp.

{
    return static_cast<bool>(m_closingStoryboard) && SharedHelpers::IsAnimationsEnabled();
}

bool HasOpenAnimation ( )

Definition at line 429 of file CommandBarFlyoutCommandBar.cpp.

{
    return static_cast<bool>(m_openingStoryboard) && SharedHelpers::IsAnimationsEnabled();
}

bool HasSecondaryOpenCloseAnimations ( )

Definition at line 1435 of file CommandBarFlyoutCommandBar.cpp.

{
    return SharedHelpers::IsAnimationsEnabled() &&
           static_cast<bool>(m_expandedDownToCollapsedStoryboardRevoker ||
                             m_expandedUpToCollapsedStoryboardRevoker ||
                             m_collapsedToExpandedUpStoryboardRevoker ||
                             m_collapsedToExpandedDownStoryboardRevoker);
}

bool HasVisibleLabel ( TCommand const & command ) [inline, private]

Definition at line 73 of file CommandBarFlyoutCommandBar.h.

    {
        return command &&
            command.Label().size() > 0 &&
            command.Visibility() == winrt::Visibility::Visible &&
            command.LabelPosition() == winrt::CommandBarLabelPosition::Default;
    };

bool IsControlFocusable | ( | winrt::Control const & | control,
 |  | bool | checkTabStop |
 | ) |  |  | [static, private]

Definition at line 1237 of file CommandBarFlyoutCommandBar.cpp.

{
    return control &&
        control.Visibility() == winrt::Visibility::Visible &&
        (control.IsEnabled() || control.AllowFocusWhenDisabled()) &&
        (control.IsTabStop() || (!checkTabStop && !control.try_as<winrt::AppBarSeparator>())); // AppBarSeparator is not focusable if IsTabStop is false
}

void OnApplyTemplate ( )

Definition at line 167 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    __super::OnApplyTemplate();
    DetachEventHandlers();

    if (auto& overflowPopup = m_overflowPopup.get())
    {
        overflowPopup.PlacementTarget(nullptr);
        overflowPopup.DesiredPlacement(winrt::PopupPlacementMode::Auto);
    }

    winrt::AutomationProperties::SetLocalizedControlType(*this, ResourceAccessor::GetLocalizedStringResource(SR_CommandBarFlyoutCommandBarLocalizedControlType));
    EnsureLocalizedControlTypes();

    winrt::IControlProtected thisAsControlProtected = *this;

    m_primaryItemsRoot.set(GetTemplateChildT<winrt::FrameworkElement>(L"PrimaryItemsRoot", thisAsControlProtected));
    m_overflowPopup.set(GetTemplateChildT<winrt::Popup>(L"OverflowPopup", thisAsControlProtected));
    m_secondaryItemsRoot.set(GetTemplateChildT<winrt::FrameworkElement>(L"OverflowContentRoot", thisAsControlProtected));
    m_moreButton.set(GetTemplateChildT<winrt::ButtonBase>(L"MoreButton", thisAsControlProtected));
    m_openingStoryboard.set([this, thisAsControlProtected]()
        {
            if (auto const opacityStoryBoard = GetTemplateChildT<winrt::Storyboard>(L"OpeningOpacityStoryboard", thisAsControlProtected))
            {
                m_openAnimationKind = CommandBarFlyoutOpenCloseAnimationKind::Opacity;
                return opacityStoryBoard;
            }
            m_openAnimationKind = CommandBarFlyoutOpenCloseAnimationKind::Clip;
            return GetTemplateChildT<winrt::Storyboard>(L"OpeningStoryboard", thisAsControlProtected);
        }());
    m_closingStoryboard.set([this, thisAsControlProtected]()
        {
            if (auto const opacityStoryBoard = GetTemplateChildT<winrt::Storyboard>(L"ClosingOpacityStoryboard", thisAsControlProtected))
            {
                return opacityStoryBoard;
            }
            return GetTemplateChildT<winrt::Storyboard>(L"ClosingStoryboard", thisAsControlProtected);
        }());

    m_primaryItemsSystemBackdropRoot.set(GetTemplateChildT<winrt::FrameworkElement>(L"PrimaryItemsSystemBackdropRoot", thisAsControlProtected));
    m_overflowPopupSystemBackdropRoot.set(GetTemplateChildT<winrt::FrameworkElement>(L"OverflowPopupSystemBackdropRoot", thisAsControlProtected));
    m_outerOverflowContentRootV2.set(GetTemplateChildT<winrt::FrameworkElement>(L"OuterOverflowContentRootV2", thisAsControlProtected));

    auto& primaryItemsRoot = m_primaryItemsRoot.get();
    auto& primaryItemsSystemBackdropRoot = m_primaryItemsSystemBackdropRoot.get();
    if (primaryItemsRoot && primaryItemsSystemBackdropRoot && m_backdropLink)
    {
        winrt::Visual placementVisual = m_backdropLink.PlacementVisual();

        // Hard-code a large size for the placement visual. The size and position of this lifted visual controls the
        // size and position of the system visual with the backdrop. This visual is parented in a windowed popup, so it
        // should use the popup's coordinate space, but we're seeing it use the main island's coordinate space instead.
        // We don't easily have the popup island's offset from outside MUX.dll, so just size the placement visual to a
        // large number to cover everything. We'll apply a clip to this placement visual later to size it to the
        // CommandBarFlyoutCommandBar's contents.
        placementVisual.Size({10000, 10000});
        // Replace with this when the coordinate space issue is fixed - http://task.ms/44279950
        //placementVisual.Size({static_cast<float>(primaryItemsRoot.ActualWidth()), static_cast<float>(primaryItemsRoot.ActualHeight())});

        winrt::ElementCompositionPreview::SetElementChildVisual(primaryItemsSystemBackdropRoot, placementVisual);
    }

    const auto& overflowContentRootV2 = m_outerOverflowContentRootV2.get();
    const auto& overflowPopupSystemBackdropRoot = m_overflowPopupSystemBackdropRoot.get();
    if (overflowContentRootV2 && overflowPopupSystemBackdropRoot && m_overflowPopupBackdropLink)
    {
        winrt::Visual popupPlacementVisual = m_overflowPopupBackdropLink.PlacementVisual();

        // Use a hardcoded size. See above.
        popupPlacementVisual.Size({10000, 10000});
        // Replace with this when the coordinate space issue is fixed - http://task.ms/44279950
        //popupPlacementVisual.Size({static_cast<float>(overflowContentRootV2.ActualWidth()), static_cast<float>(overflowContentRootV2.ActualHeight())});

        // Don't put the overflow popup's backdrop visual in the tree yet. The popup may not be open yet and we don't
        // want anything to flicker. The backdrop will be put in the tree in UpdateVisualState once we've opened and
        // measured the overflow popup.
    }

    if (auto& overflowPopup = m_overflowPopup.get())
    {
        overflowPopup.PlacementTarget(m_primaryItemsRoot.get());
        overflowPopup.DesiredPlacement(winrt::PopupPlacementMode::BottomEdgeAlignedLeft);
    }

    if (auto& moreButton = m_moreButton.get())
    {
        // Initially only the first focusable primary and secondary commands
        // keep their IsTabStop set to True.
        if (moreButton.IsTabStop())
        {
            moreButton.IsTabStop(false);
        }
    }

    if (m_owningFlyout)
    {
        AttachEventsToSecondaryStoryboards();
    }

    // Keep the owning FlyoutPresenter's corner radius in sync with the
    // primary commands's corner radius.
    BindOwningFlyoutPresenterToCornerRadius();

    AttachControlEventHandlers();
    AttachItemEventHandlers();
    PopulateAccessibleControls();
    UpdateFlowsFromAndFlowsTo();
    UpdateUI(false /* useTransitions */);
    SetPresenterName(m_flyoutPresenter.get());
}

void OnCommandBarElementDependencyPropertyChanged ( )

Definition at line 1506 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    // Only refresh the UI when the CommandBarFlyoutCommandBar is already open since it will be refreshed anyways in the event it gets opened.
    if (IsOpen())
    {
        UpdateUI(!m_commandBarFlyoutIsOpening, true /*isForSizeChange*/);
    }
}

void OnKeyDown ( winrt::KeyRoutedEventArgs const & args )

Definition at line 1098 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this,
        TypeLogging::KeyRoutedEventArgsToString(args).c_str());

    if (args.Handled())
    {
        return;
    }

    switch (args.Key())
    {
    case winrt::VirtualKey::Tab:
    {
        if (SecondaryCommands().Size() > 0 && !IsOpen())
        {
            // Ensure the secondary commands flyout is open ...
            IsOpen(true);

            // ... and focus the first focusable command
            FocusCommand(
                SecondaryCommands() /*commands*/,
                nullptr /*moreButton*/,
                winrt::FocusState::Keyboard /*focusState*/,
                true /*firstCommand*/,
                true /*ensureTabStopUniqueness*/);
        }
        break;
    }

    case winrt::VirtualKey::Escape:
    {
        if (auto owningFlyout = m_owningFlyout.get())
        {
            owningFlyout.Hide();
            args.Handled(true);
        }
        break;
    }

    case winrt::VirtualKey::Right:
    case winrt::VirtualKey::Left:
    case winrt::VirtualKey::Down:
    case winrt::VirtualKey::Up:
    {
        const bool isRightToLeft = m_primaryItemsRoot && m_primaryItemsRoot.get().FlowDirection() == winrt::FlowDirection::RightToLeft;
        const bool isLeft = (args.Key() == winrt::VirtualKey::Left && !isRightToLeft) || (args.Key() == winrt::VirtualKey::Right && isRightToLeft);
        const bool isRight = (args.Key() == winrt::VirtualKey::Right && !isRightToLeft) || (args.Key() == winrt::VirtualKey::Left && isRightToLeft);
        const bool isDown = args.Key() == winrt::VirtualKey::Down;
        const bool isUp = args.Key() == winrt::VirtualKey::Up;

        // To avoid code duplication, we'll use the key directionality to determine
        // both which control list to use and in which direction to iterate through
        // it to find the next control to focus.  Then we'll do that iteration
        // to focus the next control.
        auto const& accessibleControls{ isUp || isDown ? m_verticallyAccessibleControls : m_horizontallyAccessibleControls };
        int const startIndex = isLeft || isUp ? accessibleControls.Size() - 1 : 0;
        int const endIndex = isLeft || isUp ? -1 : accessibleControls.Size();
        int const deltaIndex = isLeft || isUp ? -1 : 1;
        bool const shouldLoop = isUp || isDown;
        winrt::Control focusedControl{ nullptr };
        int focusedControlIndex = -1;

        for (int i = startIndex;
            // We'll stop looping at the end index unless we're looping,
            // in which case we want to wrap back around to the start index.
            (i != endIndex || shouldLoop) ||
            // If we found a focused control but have looped all the way back around,
            // then there wasn't another control to focus, so we should quit.
            (focusedControlIndex > 0 && i == focusedControlIndex);
            i += deltaIndex)
        {
            // If we've reached the end index, that means we want to loop.
            // We'll wrap around to the start index.
            if (i == endIndex)
            {
                MUX_ASSERT(shouldLoop);

                if (focusedControl)
                {
                    i = startIndex;
                }
                else
                {
                    // If no focused control was found after going through the entire list of controls,
                    // then we have nowhere for focus to go.  Let's early-out in that case.
                    break;
                }
            }

            auto const& control = accessibleControls.GetAt(i);

            // If we've yet to find the focused control, we'll keep looking for it.
            // Otherwise, we'll try to focus the next control after it.
            if (!focusedControl)
            {
                if (control.FocusState() != winrt::FocusState::Unfocused)
                {
                    focusedControl = control;
                    focusedControlIndex = i;
                }
            }
            else if (IsControlFocusable(control, false /*checkTabStop*/))
            {
                // If the control we're trying to focus is in the secondary command list,
                // then we'll make sure that that list is open before trying to focus the control.
                if (auto const& controlAsCommandBarElement = control.try_as<winrt::ICommandBarElement>())
                {
                    uint32_t index = 0;
                    if (SecondaryCommands().IndexOf(controlAsCommandBarElement, index) && !IsOpen())
                    {
                        IsOpen(true);
                    }
                }

                FocusControl(
                    accessibleControls.GetAt(i) /*newFocus*/,
                    focusedControl /*oldFocus*/,
                    winrt::FocusState::Keyboard /*focusState*/,
                    true /*updateTabStop*/);

                args.Handled(true);
                break;
            }
        }

        if (!args.Handled())
        {
            // Occurs for example with Right key while MoreButton has focus. Stay on that MoreButton.
            args.Handled(true);
        }
        break;
    }
    }

    __super::OnKeyDown(args);
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 1517 of file CommandBarFlyoutCommandBar.cpp.

{
    const winrt::IDependencyProperty& property = args.Property();

    if (property == s_SystemBackdropProperty)
    {
        if (args.NewValue() != args.OldValue())
        {
            const auto& oldSystemBackdrop = args.OldValue().try_as<winrt::SystemBackdrop>();
            const auto& newSystemBackdrop = args.NewValue().try_as<winrt::SystemBackdrop>();

            if (oldSystemBackdrop)
            {
                oldSystemBackdrop.OnTargetDisconnected(m_backdropLink);
                oldSystemBackdrop.OnTargetDisconnected(m_overflowPopupBackdropLink);
                m_registeredWithSystemBackdrop = false;
            }

            m_systemBackdrop = newSystemBackdrop;

            if (newSystemBackdrop)
            {
                if (!m_backdropLink)
                {
                    auto visual = winrt::ElementCompositionPreview::GetElementVisual(*this);
                    auto compositor = visual.Compositor();
                    m_backdropLink = winrt::ContentExternalBackdropLink::Create(compositor);
                    m_overflowPopupBackdropLink = winrt::ContentExternalBackdropLink::Create(compositor);
                }

                TryConnectSystemBackdrop();
            }
            else
            {
                m_backdropLink = nullptr;
                m_overflowPopupBackdropLink = nullptr;
            }
        }
    }
}

CommandBarFlyoutOpenCloseAnimationKind OpenAnimationKind ( ) [inline]

Definition at line 30 of file CommandBarFlyoutCommandBar.h.

{ return m_openAnimationKind; };

void PlayCloseAnimation | ( | const winrt::weak_ref< winrt::CommandBarFlyout > & | weakCommandBarFlyout,
 |  | std::function< void()> | onCompleteFunc
 | ) |  |

Definition at line 455 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (auto closingStoryboard = m_closingStoryboard.get())
    {
        if (closingStoryboard.GetCurrentState() != winrt::ClockState::Active)
        {
            m_closingStoryboardCompletedCallbackRevoker = closingStoryboard.Completed(winrt::auto_revoke,
            {
                [this, weakCommandBarFlyout, onCompleteFunc](auto const&, auto const&)
                {
                    if (weakCommandBarFlyout.get())
                    {
                        onCompleteFunc();
                    }
                }
            });

            UpdateTemplateSettings();
            closingStoryboard.Begin();
        }
    }
    else
    {
        onCompleteFunc();
    }
}

void PlayOpenAnimation ( )

Definition at line 434 of file CommandBarFlyoutCommandBar.cpp.

{
    if (auto const& closingStoryboard = m_closingStoryboard.get())
    {
        closingStoryboard.Stop();
    }

    if (auto openingStoryboard = m_openingStoryboard.get())
    {
        if (openingStoryboard.GetCurrentState() != winrt::ClockState::Active)
        {
            openingStoryboard.Begin();
        }
    }
}

void PopulateAccessibleControls ( ) [private]

Definition at line 1047 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    // The primary commands and the more button are the only controls accessible
    // using left and right arrow keys. All of the commands are accessible using
    // the up and down arrow keys.
    if (!m_horizontallyAccessibleControls)
    {
        MUX_ASSERT(!m_verticallyAccessibleControls);

        m_horizontallyAccessibleControls = winrt::make<Vector<winrt::Control>>();
        m_verticallyAccessibleControls = winrt::make<Vector<winrt::Control>>();
    }
    else
    {
        MUX_ASSERT(m_verticallyAccessibleControls);

        m_horizontallyAccessibleControls.Clear();
        m_verticallyAccessibleControls.Clear();
    }

    const auto primaryCommands = PrimaryCommands();

    for (winrt::ICommandBarElement const& command : primaryCommands)
    {
        if (auto const& commandAsControl = command.try_as<winrt::Control>())
        {
            m_horizontallyAccessibleControls.Append(commandAsControl);
            m_verticallyAccessibleControls.Append(commandAsControl);
        }
    }

    if (auto const& moreButton = m_moreButton.get())
    {
        if (primaryCommands.Size() > 0)
        {
            m_horizontallyAccessibleControls.Append(moreButton);
            m_verticallyAccessibleControls.Append(moreButton);
        }
    }

    for (winrt::ICommandBarElement const& command : SecondaryCommands())
    {
        if (auto const& commandAsControl = command.try_as<winrt::Control>())
        {
            m_verticallyAccessibleControls.Append(commandAsControl);
        }
    }
}

void SetKnownCommandLocalizedControlTypes ( winrt::ICommandBarElement const & command ) [private]

Definition at line 1017 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    if (auto const& appBarButton = command.try_as<winrt::AppBarButton>())
    {
        if (m_areLocalizedStringResourcesCached)
        {
            MUX_ASSERT(!m_localizedCommandBarFlyoutAppBarButtonControlType.empty());
            winrt::AutomationProperties::SetLocalizedControlType(appBarButton, m_localizedCommandBarFlyoutAppBarButtonControlType);
        }
        else
        {
            winrt::AutomationProperties::SetLocalizedControlType(appBarButton, ResourceAccessor::GetLocalizedStringResource(SR_CommandBarFlyoutAppBarButtonLocalizedControlType));
        }
    }
    else if (auto const& appBarToggleButton = command.try_as<winrt::AppBarToggleButton>())
    {
        if (m_areLocalizedStringResourcesCached)
        {
            MUX_ASSERT(!m_localizedCommandBarFlyoutAppBarToggleButtonControlType.empty());
            winrt::AutomationProperties::SetLocalizedControlType(appBarToggleButton, m_localizedCommandBarFlyoutAppBarToggleButtonControlType);
        }
        else
        {
            winrt::AutomationProperties::SetLocalizedControlType(appBarToggleButton, ResourceAccessor::GetLocalizedStringResource(SR_CommandBarFlyoutAppBarToggleButtonLocalizedControlType));
        }
    }
}

void SetOwningFlyout ( winrt::CommandBarFlyout const & owningFlyout )

Definition at line 280 of file CommandBarFlyoutCommandBar.cpp.

{
    m_owningFlyout = owningFlyout;
}

void SetPresenter ( winrt::FlyoutPresenter const & presenter )

Definition at line 1412 of file CommandBarFlyoutCommandBar.cpp.

{
    m_flyoutPresenter = winrt::make_weak(presenter);
}

void SetPresenterName ( winrt::FlyoutPresenter const & presenter ) [private]

Definition at line 1417 of file CommandBarFlyoutCommandBar.cpp.

{
    // Since DropShadows don't play well with clip entrance animations for the presenter,
    // we'll need to fade it in. This name helps us locate the element to set the fade in
    // flag in the OS code.
    if (presenter)
    {
        if (OpenAnimationKind() == CommandBarFlyoutOpenCloseAnimationKind::Clip)
        {
            presenter.Name(L"DropShadowFadeInTarget");
        }
        else
        {
            presenter.Name(L"");
        }
    }
}

void TryConnectSystemBackdrop ( ) [private]

Definition at line 1558 of file CommandBarFlyoutCommandBar.cpp.

{
    if (!m_registeredWithSystemBackdrop)
    {
        if (auto systemBackdrop = m_systemBackdrop.get())
        {
            MUX_ASSERT(m_backdropLink);
            MUX_ASSERT(m_overflowPopupBackdropLink);

            auto xamlRoot = XamlRoot();

            if (xamlRoot)
            {
                systemBackdrop.OnTargetConnected(m_backdropLink, XamlRoot());
                systemBackdrop.OnTargetConnected(m_overflowPopupBackdropLink, XamlRoot());
                m_registeredWithSystemBackdrop = true;
            }
        }
    }
}

void UpdateFlowsFromAndFlowsTo ( ) [private]

Definition at line 486 of file CommandBarFlyoutCommandBar.cpp.

{
    auto moreButton = m_moreButton.get();

    // Ensure there is only one focusable command with IsTabStop set to True
    // to enable tabbing from primary to secondary commands and vice-versa
    // with a single Tab keystroke.
    EnsureTabStopUniqueness(PrimaryCommands(), moreButton);
    EnsureTabStopUniqueness(SecondaryCommands(), nullptr);

    // Ensure the SizeOfSet and PositionInSet automation properties
    // for the primary commands and the MoreButton account for the
    // potential MoreButton.
    EnsureAutomationSetCountAndPosition();

    if (m_currentPrimaryItemsEndElement)
    {
        winrt::AutomationProperties::GetFlowsTo(m_currentPrimaryItemsEndElement.get()).Clear();
        m_currentPrimaryItemsEndElement.set(nullptr);
    }

    if (m_currentSecondaryItemsStartElement)
    {
        winrt::AutomationProperties::GetFlowsFrom(m_currentSecondaryItemsStartElement.get()).Clear();
        m_currentSecondaryItemsStartElement.set(nullptr);
    }

    // If we're not open, then we don't want to do anything special - the only time we do need to do something special
    // is when the secondary commands are showing, in which case we want to connect the primary and secondary command lists.
    if (IsOpen())
    {
        auto isElementFocusable = [](winrt::ICommandBarElement const& element)
        {
            winrt::Control primaryCommandAsControl = element.try_as<winrt::Control>();
            return IsControlFocusable(primaryCommandAsControl, false);
        };

        auto primaryCommands = PrimaryCommands();
        for (int i = static_cast<int>(primaryCommands.Size() - 1); i >= 0; i--)
        {
            auto primaryCommand = primaryCommands.GetAt(i);
            if (isElementFocusable(primaryCommand))
            {
                m_currentPrimaryItemsEndElement.set(primaryCommand.try_as<winrt::FrameworkElement>());
                break;
            }
        }

        // If we have a more button and at least one focusable primary item, then
        // we'll use the more button as the last element in our primary items list.
        if (moreButton && moreButton.Visibility() == winrt::Visibility::Visible && m_currentPrimaryItemsEndElement)
        {
            m_currentPrimaryItemsEndElement.set(moreButton);
        }

        for (const auto& secondaryCommand : SecondaryCommands())
        {
            if (isElementFocusable(secondaryCommand))
            {
                m_currentSecondaryItemsStartElement.set(secondaryCommand.try_as<winrt::FrameworkElement>());
                break;
            }
        }

        if (m_currentPrimaryItemsEndElement && m_currentSecondaryItemsStartElement)
        {
            winrt::AutomationProperties::GetFlowsTo(m_currentPrimaryItemsEndElement.get()).Append(m_currentSecondaryItemsStartElement.get());
            winrt::AutomationProperties::GetFlowsFrom(m_currentSecondaryItemsStartElement.get()).Append(m_currentPrimaryItemsEndElement.get());
        }
    }
}

void UpdateItemVisualState | ( | winrt::Control const & | item,
 |  | bool | isPrimaryItem |
 | ) |  |  | [private]

Definition at line 773 of file CommandBarFlyoutCommandBar.cpp.

{
    if (isPrimaryItem)
    {
        bool hasPrimaryCommandLabels = false;
        for (auto const& primaryCommand : PrimaryCommands())
        {
            if (HasVisibleLabel(primaryCommand.try_as<winrt::AppBarButton>()) ||
                HasVisibleLabel(primaryCommand.try_as<winrt::AppBarToggleButton>()))
            {
                hasPrimaryCommandLabels = true;
                break;
            }
        }

        winrt::VisualStateManager::GoToState(item, hasPrimaryCommandLabels ? L"HasPrimaryLabels" : L"NoPrimaryLabels", false /* useTransitions */);
    }
    else
    {
        winrt::VisualStateManager::GoToState(item, L"NoPrimaryLabels", false /* useTransitions */);
    }
}

void UpdateTemplateSettings ( ) [private]

Definition at line 796 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, IsOpen());

    if (m_primaryItemsRoot && m_secondaryItemsRoot)
    {
        const auto flyoutTemplateSettings = winrt::get_self<CommandBarFlyoutCommandBarTemplateSettings>(FlyoutTemplateSettings());
        const auto maxWidth = static_cast<float>(MaxWidth());

        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old ExpandedWidth:", flyoutTemplateSettings->ExpandedWidth());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old CurrentWidth:", flyoutTemplateSettings->CurrentWidth());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old WidthExpansionDelta:", flyoutTemplateSettings->WidthExpansionDelta());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old WidthExpansionAnimationStartPosition:", flyoutTemplateSettings->WidthExpansionAnimationStartPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old WidthExpansionAnimationEndPosition:", flyoutTemplateSettings->WidthExpansionAnimationEndPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old OpenAnimationStartPosition:", flyoutTemplateSettings->OpenAnimationStartPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old OpenAnimationEndPosition:", flyoutTemplateSettings->OpenAnimationEndPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"old CloseAnimationEndPosition:", flyoutTemplateSettings->CloseAnimationEndPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"MaxWidth:", maxWidth);

        const winrt::Size infiniteSize = { std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() };
        m_primaryItemsRoot.get().Measure(infiniteSize);
        const winrt::Size primaryItemsRootDesiredSize = m_primaryItemsRoot.get().DesiredSize();
        float collapsedWidth = std::min(maxWidth, primaryItemsRootDesiredSize.Width);

        if (m_secondaryItemsRoot)
        {
            m_secondaryItemsRoot.get().Measure(infiniteSize);
            const auto overflowPopupSize = m_secondaryItemsRoot.get().DesiredSize();

            flyoutTemplateSettings->ExpandedWidth(std::min(maxWidth, std::max(collapsedWidth, overflowPopupSize.Width)));
            flyoutTemplateSettings->ExpandUpOverflowVerticalPosition(-overflowPopupSize.Height);
            flyoutTemplateSettings->ExpandUpAnimationStartPosition(overflowPopupSize.Height / 2);
            flyoutTemplateSettings->ExpandUpAnimationEndPosition(0);
            flyoutTemplateSettings->ExpandUpAnimationHoldPosition(overflowPopupSize.Height);
            flyoutTemplateSettings->ExpandDownAnimationStartPosition(-overflowPopupSize.Height / 2);
            flyoutTemplateSettings->ExpandDownAnimationEndPosition(0);
            flyoutTemplateSettings->ExpandDownAnimationHoldPosition(-overflowPopupSize.Height);
            // This clip needs to cover the border at the bottom of the overflow otherwise it'll
            // clip the border. The measure size seems slightly off from what we eventually require
            // so we're going to compensate just a bit to make sure there's room for any borders.
            flyoutTemplateSettings->OverflowContentClipRect({ 0, 0, static_cast<float>(flyoutTemplateSettings->ExpandedWidth()), overflowPopupSize.Height + 2 });
        }
        else
        {
            flyoutTemplateSettings->ExpandedWidth(collapsedWidth);
            flyoutTemplateSettings->ExpandUpOverflowVerticalPosition(0);
            flyoutTemplateSettings->ExpandUpAnimationStartPosition(0);
            flyoutTemplateSettings->ExpandUpAnimationEndPosition(0);
            flyoutTemplateSettings->ExpandUpAnimationHoldPosition(0);
            flyoutTemplateSettings->ExpandDownAnimationStartPosition(0);
            flyoutTemplateSettings->ExpandDownAnimationEndPosition(0);
            flyoutTemplateSettings->ExpandDownAnimationHoldPosition(0);
            flyoutTemplateSettings->OverflowContentClipRect({ 0, 0, 0, 0 });
        }

        const double expandedWidth = flyoutTemplateSettings->ExpandedWidth();

        // If collapsedWidth is 0, then we'll never be showing in collapsed mode,
        // so we'll set it equal to expandedWidth to ensure that our open/close animations are correct.
        if (collapsedWidth == 0)
        {
            collapsedWidth = static_cast<float>(expandedWidth);
        }

        flyoutTemplateSettings->WidthExpansionDelta(collapsedWidth - expandedWidth);
        flyoutTemplateSettings->WidthExpansionAnimationStartPosition(-flyoutTemplateSettings->WidthExpansionDelta() / 2.0);
        flyoutTemplateSettings->WidthExpansionAnimationEndPosition(-flyoutTemplateSettings->WidthExpansionDelta());
        flyoutTemplateSettings->ContentClipRect({ 0, 0, static_cast<float>(expandedWidth), primaryItemsRootDesiredSize.Height });

        if (IsOpen())
        {
            flyoutTemplateSettings->CurrentWidth(expandedWidth);
        }
        else
        {
            flyoutTemplateSettings->CurrentWidth(collapsedWidth);
        }

        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"collapsedWidth:", collapsedWidth);
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new ExpandedWidth:", expandedWidth);
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new CurrentWidth:", flyoutTemplateSettings->CurrentWidth());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new WidthExpansionDelta:", flyoutTemplateSettings->WidthExpansionDelta());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new WidthExpansionAnimationStartPosition:", flyoutTemplateSettings->WidthExpansionAnimationStartPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new WidthExpansionAnimationEndPosition:", flyoutTemplateSettings->WidthExpansionAnimationEndPosition());

        // If we're currently playing the close animation, don't update these properties -
        // the animation is expecting them not to change out from under it.
        // After the close animation has completed, the flyout will close and no further
        // visual updates will occur, so there's no need to update these values in that case.
        bool isPlayingCloseAnimation = false;

        if (auto closingStoryboard = m_closingStoryboard.get())
        {
            isPlayingCloseAnimation = closingStoryboard.GetCurrentState() == winrt::ClockState::Active;
        }

        if (!isPlayingCloseAnimation)
        {
            if (IsOpen())
            {
                flyoutTemplateSettings->OpenAnimationStartPosition(-expandedWidth / 2);
                flyoutTemplateSettings->OpenAnimationEndPosition(0);
            }
            else
            {
                flyoutTemplateSettings->OpenAnimationStartPosition(flyoutTemplateSettings->WidthExpansionDelta() - collapsedWidth / 2);
                flyoutTemplateSettings->OpenAnimationEndPosition(flyoutTemplateSettings->WidthExpansionDelta());
            }

            flyoutTemplateSettings->CloseAnimationEndPosition(-expandedWidth);
        }

        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new OpenAnimationStartPosition:", flyoutTemplateSettings->OpenAnimationStartPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new OpenAnimationEndPosition:", flyoutTemplateSettings->OpenAnimationEndPosition());
        COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"new CloseAnimationEndPosition:", flyoutTemplateSettings->CloseAnimationEndPosition());

        flyoutTemplateSettings->WidthExpansionMoreButtonAnimationStartPosition(flyoutTemplateSettings->WidthExpansionDelta() / 2);
        flyoutTemplateSettings->WidthExpansionMoreButtonAnimationEndPosition(flyoutTemplateSettings->WidthExpansionDelta());

        if (PrimaryCommands().Size() > 0)
        {
            // This needs to be calculated like these other properties, but because this property needs to be set on the CommandBarFlyoutCommandBar itself,
            // we can't use a template setting.  So we'll just set the property itself here.
            Height(primaryItemsRootDesiredSize.Height);

            flyoutTemplateSettings->ExpandDownOverflowVerticalPosition(primaryItemsRootDesiredSize.Height);
        }
        else
        {
            flyoutTemplateSettings->ExpandDownOverflowVerticalPosition(0);
        }
    }
}

void UpdateUI | ( | bool | useTransitions = true,
 |  | bool | isForSizeChange = false |
 | ) |  |  | [private]

Definition at line 558 of file CommandBarFlyoutCommandBar.cpp.

{
    COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, useTransitions, isForSizeChange);

    UpdateTemplateSettings();
    UpdateVisualState(useTransitions, isForSizeChange);
}

void UpdateVisualState | ( | bool | useTransitions,
 |  | bool | isForSizeChange = false |
 | ) |  |  | [private]

Definition at line 567 of file CommandBarFlyoutCommandBar.cpp.

{
    if (IsOpen())
    {
        //
        // If we're currently open, have overflow items, and haven't yet sized our overflow item root, then we want to
        // wait until then to update visual state - otherwise, we'll be animating to incorrect values.  Animations only
        // retrieve values from bindings when they begin, so if we begin an animation and then update a bound template
        // setting, that won't take effect.
        //
        // This also skips copying the size into the placement visual's clip. If the secondary items haven't been sized
        // yet, then we can't copy that size into the clip. Note that we don't want to remove the backdrop placement
        // visual from the tree. It's possible for the items to change while their layout size stay the same, in which
        // case the m_secondaryItemsRootSized flag will never be reset. In that case the old placement visual still has
        // the correct size, so leave it in the tree.
        //
        if (!m_secondaryItemsRootSized)
        {
            return;
        }

        bool shouldExpandUp = false;
        bool hadActualPlacement = false;

        if (auto overflowPopup = m_overflowPopup.get())
        {
            // If we have a value set for ActualPlacement, then we'll directly use that -
            // that tells us where our popup's been placed, so we don't need to try to
            // infer where it should go.
            if (overflowPopup.ActualPlacement() != winrt::PopupPlacementMode::Auto)
            {
                hadActualPlacement = true;
                shouldExpandUp =
                    overflowPopup.ActualPlacement() == winrt::PopupPlacementMode::TopEdgeAlignedLeft ||
                    overflowPopup.ActualPlacement() == winrt::PopupPlacementMode::TopEdgeAlignedRight;
            }
        }

        // If there isn't enough space to display the overflow below the command bar,
        // and if there is enough space above, then we'll display it above instead.
        if (m_secondaryItemsRoot)
        {
            double availableHeight = -1;
            const auto controlBounds = TransformToVisual(nullptr).TransformBounds({ 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight()) });

            if (winrt::CoreWindow::GetForCurrentThread())
            {
                try
                {
                    // Note: this doesn't work right for islands scenarios
                    // Bug 19617460: CommandBarFlyoutCommandBar isn't able to decide whether to open up or down because it doesn't know where it is relative to the monitor
                    auto view = winrt::ApplicationView::GetForCurrentView();
                    availableHeight = view.VisibleBounds().Height;
                }
                catch (winrt::hresult_error)
                {
                    // Calling GetForCurrentView on threads without a CoreWindow throws an error. This comes up in places like LogonUI.
                    // In this circumstance, we'll just always expand down, since we can't get bounds information.
                }
            }

            if (availableHeight >= 0)
            {
                m_secondaryItemsRoot.get().Measure({ std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() });
                const auto overflowPopupSize = m_secondaryItemsRoot.get().DesiredSize();

                shouldExpandUp =
                    static_cast<double>(controlBounds.Y) + controlBounds.Height + overflowPopupSize.Height > availableHeight &&
                    controlBounds.Y - overflowPopupSize.Height >= 0;
            }
        }

        if (isForSizeChange)
        {
            // UpdateVisualState is called as a result of a size change (for instance caused by a secondary command bar element dependency property change). This CommandBarFlyoutCommandBar is already open
            // and expanded. Jump to the Collapsed and back to ExpandedUp/ExpandedDown state to apply all refreshed CommandBarFlyoutCommandBarTemplateSettings values.
            winrt::VisualStateManager::GoToState(*this, L"Collapsed", false);
        }

        winrt::VisualStateManager::GoToState(*this, shouldExpandUp ? L"ExpandedUp" : L"ExpandedDown", useTransitions && !isForSizeChange);

        // Union of AvailableCommandsStates and ExpansionStates
        bool hasPrimaryCommands = (PrimaryCommands().Size() != 0);
        if (hasPrimaryCommands)
        {
            if (shouldExpandUp)
            {
                winrt::VisualStateManager::GoToState(*this, L"NoOuterOverflowContentRootShadow", useTransitions);
                winrt::VisualStateManager::GoToState(*this, L"ExpandedUpWithPrimaryCommands", useTransitions);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, L"OuterOverflowContentRootShadow", useTransitions);
                winrt::VisualStateManager::GoToState(*this, L"ExpandedDownWithPrimaryCommands", useTransitions);
            }
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, L"OuterOverflowContentRootShadow", useTransitions);
            if (shouldExpandUp)
            {
                winrt::VisualStateManager::GoToState(*this, L"ExpandedUpWithoutPrimaryCommands", useTransitions);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, L"ExpandedDownWithoutPrimaryCommands", useTransitions);
            }
        }

        // Update the corner radius clip on the backdrop. We copy the corner radius from the elements in the template,
        // which depends on the visual state of the CommandBarFlyoutCommandBar.
        if (m_overflowPopupBackdropLink && m_outerOverflowContentRootV2)
        {
            winrt::Visual popupPlacementVisual = m_overflowPopupBackdropLink.PlacementVisual();
            winrt::Grid overflowContentRootV2 = m_outerOverflowContentRootV2.get().try_as<winrt::Grid>();
            auto cornerRadius = overflowContentRootV2.CornerRadius();

            auto compositor = popupPlacementVisual.Compositor();
            winrt::RectangleClip rectangleClip = compositor.CreateRectangleClip();
            rectangleClip.Right(static_cast<float>(overflowContentRootV2.ActualWidth()));
            rectangleClip.Bottom(static_cast<float>(overflowContentRootV2.ActualHeight()));
            rectangleClip.TopLeftRadius({static_cast<float>(cornerRadius.TopLeft), static_cast<float>(cornerRadius.TopLeft)});
            rectangleClip.TopRightRadius({static_cast<float>(cornerRadius.TopRight), static_cast<float>(cornerRadius.TopRight)});
            rectangleClip.BottomLeftRadius({static_cast<float>(cornerRadius.BottomLeft), static_cast<float>(cornerRadius.BottomLeft)});
            rectangleClip.BottomRightRadius({static_cast<float>(cornerRadius.BottomRight), static_cast<float>(cornerRadius.BottomRight)});
            popupPlacementVisual.Clip(rectangleClip);
        }

        if (m_overflowPopupBackdropLink && m_overflowPopupSystemBackdropRoot)
        {
            winrt::Visual popupPlacementVisual = m_overflowPopupBackdropLink.PlacementVisual();
            const auto& overflowPopupSystemBackdropRoot = m_overflowPopupSystemBackdropRoot.get();
            winrt::ElementCompositionPreview::SetElementChildVisual(overflowPopupSystemBackdropRoot, popupPlacementVisual);
        }
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"NoOuterOverflowContentRootShadow", useTransitions);
        winrt::VisualStateManager::GoToState(*this, L"Default", useTransitions);
        winrt::VisualStateManager::GoToState(*this, L"Collapsed", useTransitions);

        // Take the backdrop behind the overflow popup out of the tree. If the entire CommandBarFlyoutCommandBar is
        // closed and reopens, the overflow popup could be closed and we don't want the backdrop behind the overflow
        // popup to flicker.
        if (m_overflowPopupBackdropLink && m_overflowPopupSystemBackdropRoot)
        {
            const auto& overflowPopupSystemBackdropRoot = m_overflowPopupSystemBackdropRoot.get();
            winrt::ElementCompositionPreview::SetElementChildVisual(overflowPopupSystemBackdropRoot, nullptr);
        }
    }

    // Update the corner radius clip on the backdrop. We copy the corner radius from the elements in the template, which
    // depends on the visual state of the CommandBarFlyoutCommandBar.
    if (m_backdropLink && m_primaryItemsRoot)
    {
        winrt::Visual placementVisual = m_backdropLink.PlacementVisual();

        winrt::Grid primaryItemsRoot = m_primaryItemsRoot.get().try_as<winrt::Grid>();
        auto cornerRadius = primaryItemsRoot.CornerRadius();

        // Copy the rounded corner clip from the templated element with the rounded corner clip set on it
        auto compositor = placementVisual.Compositor();
        winrt::RectangleClip rectangleClip = compositor.CreateRectangleClip();
        rectangleClip.Right(static_cast<float>(primaryItemsRoot.ActualWidth()));
        rectangleClip.Bottom(static_cast<float>(primaryItemsRoot.ActualHeight()));
        rectangleClip.TopLeftRadius({static_cast<float>(cornerRadius.TopLeft), static_cast<float>(cornerRadius.TopLeft)});
        rectangleClip.TopRightRadius({static_cast<float>(cornerRadius.TopRight), static_cast<float>(cornerRadius.TopRight)});
        rectangleClip.BottomLeftRadius({static_cast<float>(cornerRadius.BottomLeft), static_cast<float>(cornerRadius.BottomLeft)});
        rectangleClip.BottomRightRadius({static_cast<float>(cornerRadius.BottomRight), static_cast<float>(cornerRadius.BottomRight)});
        placementVisual.Clip(rectangleClip);
    }

    // If no primary command has labels, then we'll shrink down the size of primary commands since the extra space to accommodate labels is unnecessary.
    bool hasPrimaryCommandLabels = false;
    for (auto const& primaryCommand : PrimaryCommands())
    {
        if (HasVisibleLabel(primaryCommand.try_as<winrt::AppBarButton>()) ||
            HasVisibleLabel(primaryCommand.try_as<winrt::AppBarToggleButton>()))
        {
            hasPrimaryCommandLabels = true;
            break;
        }
    }

    for (auto const& command : PrimaryCommands())
    {
        if (auto commandControl = command.try_as<winrt::Control>())
        {
            winrt::VisualStateManager::GoToState(commandControl, hasPrimaryCommandLabels ? L"HasPrimaryLabels" : L"NoPrimaryLabels", useTransitions);
        }
    }

    // Secondary commands by definition will not have any primary commands that they need to accommodate, so we'll set all of them to that state.
    for (auto const& command : SecondaryCommands())
    {
        if (auto commandControl = command.try_as<winrt::Control>())
        {
            winrt::VisualStateManager::GoToState(commandControl, L"NoPrimaryLabels", useTransitions);
        }
    }

    winrt::VisualStateManager::GoToState(*this, hasPrimaryCommandLabels ? L"HasPrimaryLabels" : L"NoPrimaryLabels", useTransitions);
}

The documentation for this class was generated from the following files:
  • CommandBarFlyout/CommandBarFlyoutCommandBar.h
  • CommandBarFlyout/CommandBarFlyoutCommandBar.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarAutomationProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

CommandBarFlyoutCommandBarAutomationProperties Class Reference

#include "CommandBarFlyoutCommandBarAutomationProperties.h"

Inherits CommandBarFlyoutCommandBarAutomationPropertiesProperties.

List of all members.

Static Public Member Functions

static void OnControlTypePropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Detailed Description

Definition at line 9 of file CommandBarFlyoutCommandBarAutomationProperties.h.

Member Function Documentation

void OnControlTypePropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static]

Definition at line 11 of file CommandBarFlyoutCommandBarAutomationProperties.cpp.

{
    if (auto senderAsUIE = sender.try_as<winrt::UIElement>())
    {
        winrt::AutomationProperties::SetAutomationControlType(senderAsUIE, unbox_value<winrt::AutomationControlType>(args.NewValue()));
    }
}

The documentation for this class was generated from the following files:
  • CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.h
  • CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarAutomationPropertiesFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutCommandBarAutomationPropertiesFactory Class Reference

#include "CommandBarFlyoutCommandBarAutomationProperties.h"

Detailed Description

Definition at line 18 of file CommandBarFlyoutCommandBarAutomationProperties.h.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarAutomationPropertiesProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

CommandBarFlyoutCommandBarAutomationPropertiesProperties Class Reference

#include "CommandBarFlyoutCommandBarAutomationProperties.properties.h"

Inherited by CommandBarFlyoutCommandBarAutomationProperties.

List of all members.

Public Member Functions

CommandBarFlyoutCommandBarAutomationPropertiesProperties ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ControlTypeProperty ()
static void | EnsureProperties ()
static winrt::AutomationControlType | GetControlType (winrt::UIElement const &target)
static void | SetControlType (winrt::UIElement const &target, winrt::AutomationControlType const &value)

Static Public Attributes

static GlobalDependencyProperty | s_ControlTypeProperty

Detailed Description

Definition at line 7 of file CommandBarFlyoutCommandBarAutomationProperties.properties.h.

Constructor & Destructor Documentation

CommandBarFlyoutCommandBarAutomationPropertiesProperties ( )

Definition at line 18 of file CommandBarFlyoutCommandBarAutomationProperties.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file CommandBarFlyoutCommandBarAutomationProperties.properties.cpp.

{
    s_ControlTypeProperty = nullptr;
}

static winrt::DependencyProperty ControlTypeProperty ( ) [inline, static]

Definition at line 15 of file CommandBarFlyoutCommandBarAutomationProperties.properties.h.

{ return s_ControlTypeProperty; }

void EnsureProperties ( ) [static]

Definition at line 23 of file CommandBarFlyoutCommandBarAutomationProperties.properties.cpp.

{
    if (!s_ControlTypeProperty)
    {
        s_ControlTypeProperty =
            InitializeDependencyProperty(
                L"ControlType",
                winrt::name_of<winrt::AutomationControlType>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarAutomationProperties>(),
                true /* isAttached */,
                ValueHelper<winrt::AutomationControlType>::BoxValueIfNecessary(winrt::AutomationControlType::Custom),
                &CommandBarFlyoutCommandBarAutomationProperties::OnControlTypePropertyChanged);
    }
}

winrt::AutomationControlType GetControlType ( winrt::UIElement const & target ) [static]

Definition at line 49 of file CommandBarFlyoutCommandBarAutomationProperties.properties.cpp.

{
    return ValueHelper<winrt::AutomationControlType>::CastOrUnbox(target.GetValue(s_ControlTypeProperty));
}

void SetControlType | ( | winrt::UIElement const & | target,
 |  | winrt::AutomationControlType const & | value |
 | ) |  |  | [static]

Definition at line 44 of file CommandBarFlyoutCommandBarAutomationProperties.properties.cpp.

{
    target.SetValue(s_ControlTypeProperty, ValueHelper<winrt::AutomationControlType>::BoxValueIfNecessary(value));
}

Member Data Documentation

GlobalDependencyProperty s_ControlTypeProperty [static]

Definition at line 17 of file CommandBarFlyoutCommandBarAutomationProperties.properties.h.

The documentation for this class was generated from the following files:
  • Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.h
  • Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

CommandBarFlyoutCommandBarProperties Class Reference

#include "CommandBarFlyoutCommandBar.properties.h"

Inherited by CommandBarFlyoutCommandBar.

List of all members.

Public Member Functions

CommandBarFlyoutCommandBarProperties ()
void | FlyoutTemplateSettings (winrt::CommandBarFlyoutCommandBarTemplateSettings const &value)
winrt::CommandBarFlyoutCommandBarTemplateSettings | FlyoutTemplateSettings ()
void | SystemBackdrop (winrt::SystemBackdrop const &value)
winrt::SystemBackdrop | SystemBackdrop ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FlyoutTemplateSettingsProperty ()
static void | OnSystemBackdropPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SystemBackdropProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_FlyoutTemplateSettingsProperty
static GlobalDependencyProperty | s_SystemBackdropProperty

Detailed Description

Definition at line 7 of file CommandBarFlyoutCommandBar.properties.h.

Constructor & Destructor Documentation

CommandBarFlyoutCommandBarProperties ( )

Definition at line 19 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    s_FlyoutTemplateSettingsProperty = nullptr;
    s_SystemBackdropProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    if (!s_FlyoutTemplateSettingsProperty)
    {
        s_FlyoutTemplateSettingsProperty =
            InitializeDependencyProperty(
                L"FlyoutTemplateSettings",
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBar>(),
                false /* isAttached */,
                ValueHelper<winrt::CommandBarFlyoutCommandBarTemplateSettings>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SystemBackdropProperty)
    {
        s_SystemBackdropProperty =
            InitializeDependencyProperty(
                L"SystemBackdrop",
                winrt::name_of<winrt::SystemBackdrop>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBar>(),
                false /* isAttached */,
                ValueHelper<winrt::SystemBackdrop>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnSystemBackdropPropertyChanged));
    }
}

winrt::CommandBarFlyoutCommandBarTemplateSettings FlyoutTemplateSettings ( )

Definition at line 72 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    return ValueHelper<winrt::CommandBarFlyoutCommandBarTemplateSettings>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBar*>(this)->GetValue(s_FlyoutTemplateSettingsProperty));
}

void FlyoutTemplateSettings ( winrt::CommandBarFlyoutCommandBarTemplateSettings const & value )

Definition at line 64 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBar*>(this)->SetValue(s_FlyoutTemplateSettingsProperty, ValueHelper<winrt::CommandBarFlyoutCommandBarTemplateSettings>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty FlyoutTemplateSettingsProperty ( ) [inline, static]

Definition at line 18 of file CommandBarFlyoutCommandBar.properties.h.

{ return s_FlyoutTemplateSettingsProperty; }

void OnSystemBackdropPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 56 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    auto owner = sender.as<winrt::CommandBarFlyoutCommandBar>();
    winrt::get_self<CommandBarFlyoutCommandBar>(owner)->OnPropertyChanged(args);
}

winrt::SystemBackdrop SystemBackdrop ( )

Definition at line 85 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    return ValueHelper<winrt::SystemBackdrop>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBar*>(this)->GetValue(s_SystemBackdropProperty));
}

void SystemBackdrop ( winrt::SystemBackdrop const & value )

Definition at line 77 of file CommandBarFlyoutCommandBar.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBar*>(this)->SetValue(s_SystemBackdropProperty, ValueHelper<winrt::SystemBackdrop>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SystemBackdropProperty ( ) [inline, static]

Definition at line 19 of file CommandBarFlyoutCommandBar.properties.h.

{ return s_SystemBackdropProperty; }

Member Data Documentation

GlobalDependencyProperty s_FlyoutTemplateSettingsProperty [static]

Definition at line 21 of file CommandBarFlyoutCommandBar.properties.h.

GlobalDependencyProperty s_SystemBackdropProperty [static]

Definition at line 22 of file CommandBarFlyoutCommandBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/CommandBarFlyoutCommandBar.properties.h
  • Generated/CommandBarFlyoutCommandBar.properties.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutCommandBarTemplateSettings Class Reference

#include "CommandBarFlyoutCommandBarTemplateSettings.h"

Inherits CommandBarFlyoutCommandBarTemplateSettingsProperties.

List of all members.

Detailed Description

Definition at line 9 of file CommandBarFlyoutCommandBarTemplateSettings.h.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarTemplateSettingsFactory Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

CommandBarFlyoutCommandBarTemplateSettingsFactory Struct Reference

#include "CommandBarFlyoutCommandBarTemplateSettings.h"

List of all members.

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Detailed Description

Definition at line 18 of file CommandBarFlyoutCommandBarTemplateSettings.h.

Member Function Documentation

static void ClearProperties ( ) [inline, static]

Definition at line 20 of file CommandBarFlyoutCommandBarTemplateSettings.h.

{ CommandBarFlyoutCommandBarTemplateSettings::ClearProperties(); }

static void EnsureProperties ( ) [inline, static]

Definition at line 21 of file CommandBarFlyoutCommandBarTemplateSettings.h.

{ CommandBarFlyoutCommandBarTemplateSettings::EnsureProperties(); }

The documentation for this struct was generated from the following file:
  • CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

CommandBarFlyoutCommandBarTemplateSettingsProperties Class Reference

#include "CommandBarFlyoutCommandBarTemplateSettings.properties.h"

Inherited by CommandBarFlyoutCommandBarTemplateSettings.

List of all members.

Public Member Functions

CommandBarFlyoutCommandBarTemplateSettingsProperties ()
void | CloseAnimationEndPosition (double value)
double | CloseAnimationEndPosition ()
void | ContentClipRect (winrt::Rect const &value)
winrt::Rect | ContentClipRect ()
void | CurrentWidth (double value)
double | CurrentWidth ()
void | ExpandDownAnimationEndPosition (double value)
double | ExpandDownAnimationEndPosition ()
void | ExpandDownAnimationHoldPosition (double value)
double | ExpandDownAnimationHoldPosition ()
void | ExpandDownAnimationStartPosition (double value)
double | ExpandDownAnimationStartPosition ()
void | ExpandDownOverflowVerticalPosition (double value)
double | ExpandDownOverflowVerticalPosition ()
void | ExpandedWidth (double value)
double | ExpandedWidth ()
void | ExpandUpAnimationEndPosition (double value)
double | ExpandUpAnimationEndPosition ()
void | ExpandUpAnimationHoldPosition (double value)
double | ExpandUpAnimationHoldPosition ()
double | ExpandUpAnimationStartPosition ()
void | ExpandUpAnimationStartPosition (double value)
void | ExpandUpOverflowVerticalPosition (double value)
double | ExpandUpOverflowVerticalPosition ()
double | OpenAnimationEndPosition ()
void | OpenAnimationEndPosition (double value)
double | OpenAnimationStartPosition ()
void | OpenAnimationStartPosition (double value)
winrt::Rect | OverflowContentClipRect ()
void | OverflowContentClipRect (winrt::Rect const &value)
void | WidthExpansionAnimationEndPosition (double value)
double | WidthExpansionAnimationEndPosition ()
double | WidthExpansionAnimationStartPosition ()
void | WidthExpansionAnimationStartPosition (double value)
double | WidthExpansionDelta ()
void | WidthExpansionDelta (double value)
double | WidthExpansionMoreButtonAnimationEndPosition ()
void | WidthExpansionMoreButtonAnimationEndPosition (double value)
double | WidthExpansionMoreButtonAnimationStartPosition ()
void | WidthExpansionMoreButtonAnimationStartPosition (double value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | CloseAnimationEndPositionProperty ()
static winrt::DependencyProperty | ContentClipRectProperty ()
static winrt::DependencyProperty | CurrentWidthProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ExpandDownAnimationEndPositionProperty ()
static winrt::DependencyProperty | ExpandDownAnimationHoldPositionProperty ()
static winrt::DependencyProperty | ExpandDownAnimationStartPositionProperty ()
static winrt::DependencyProperty | ExpandDownOverflowVerticalPositionProperty ()
static winrt::DependencyProperty | ExpandedWidthProperty ()
static winrt::DependencyProperty | ExpandUpAnimationEndPositionProperty ()
static winrt::DependencyProperty | ExpandUpAnimationHoldPositionProperty ()
static winrt::DependencyProperty | ExpandUpAnimationStartPositionProperty ()
static winrt::DependencyProperty | ExpandUpOverflowVerticalPositionProperty ()
static winrt::DependencyProperty | OpenAnimationEndPositionProperty ()
static winrt::DependencyProperty | OpenAnimationStartPositionProperty ()
static winrt::DependencyProperty | OverflowContentClipRectProperty ()
static winrt::DependencyProperty | WidthExpansionAnimationEndPositionProperty ()
static winrt::DependencyProperty | WidthExpansionAnimationStartPositionProperty ()
static winrt::DependencyProperty | WidthExpansionDeltaProperty ()
static winrt::DependencyProperty | WidthExpansionMoreButtonAnimationEndPositionProperty ()
static winrt::DependencyProperty | WidthExpansionMoreButtonAnimationStartPositionProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_CloseAnimationEndPositionProperty
static GlobalDependencyProperty | s_ContentClipRectProperty
static GlobalDependencyProperty | s_CurrentWidthProperty
static GlobalDependencyProperty | s_ExpandDownAnimationEndPositionProperty
static GlobalDependencyProperty | s_ExpandDownAnimationHoldPositionProperty
static GlobalDependencyProperty | s_ExpandDownAnimationStartPositionProperty
static GlobalDependencyProperty | s_ExpandDownOverflowVerticalPositionProperty
static GlobalDependencyProperty | s_ExpandedWidthProperty
static GlobalDependencyProperty | s_ExpandUpAnimationEndPositionProperty
static GlobalDependencyProperty | s_ExpandUpAnimationHoldPositionProperty
static GlobalDependencyProperty | s_ExpandUpAnimationStartPositionProperty
static GlobalDependencyProperty | s_ExpandUpOverflowVerticalPositionProperty
static GlobalDependencyProperty | s_OpenAnimationEndPositionProperty
static GlobalDependencyProperty | s_OpenAnimationStartPositionProperty
static GlobalDependencyProperty | s_OverflowContentClipRectProperty
static GlobalDependencyProperty | s_WidthExpansionAnimationEndPositionProperty
static GlobalDependencyProperty | s_WidthExpansionAnimationStartPositionProperty
static GlobalDependencyProperty | s_WidthExpansionDeltaProperty
static GlobalDependencyProperty | s_WidthExpansionMoreButtonAnimationEndPositionProperty
static GlobalDependencyProperty | s_WidthExpansionMoreButtonAnimationStartPositionProperty

Detailed Description

Definition at line 7 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

Constructor & Destructor Documentation

CommandBarFlyoutCommandBarTemplateSettingsProperties ( )

Definition at line 30 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 259 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    s_CloseAnimationEndPositionProperty = nullptr;
    s_ContentClipRectProperty = nullptr;
    s_CurrentWidthProperty = nullptr;
    s_ExpandDownAnimationEndPositionProperty = nullptr;
    s_ExpandDownAnimationHoldPositionProperty = nullptr;
    s_ExpandDownAnimationStartPositionProperty = nullptr;
    s_ExpandDownOverflowVerticalPositionProperty = nullptr;
    s_ExpandedWidthProperty = nullptr;
    s_ExpandUpAnimationEndPositionProperty = nullptr;
    s_ExpandUpAnimationHoldPositionProperty = nullptr;
    s_ExpandUpAnimationStartPositionProperty = nullptr;
    s_ExpandUpOverflowVerticalPositionProperty = nullptr;
    s_OpenAnimationEndPositionProperty = nullptr;
    s_OpenAnimationStartPositionProperty = nullptr;
    s_OverflowContentClipRectProperty = nullptr;
    s_WidthExpansionAnimationEndPositionProperty = nullptr;
    s_WidthExpansionAnimationStartPositionProperty = nullptr;
    s_WidthExpansionDeltaProperty = nullptr;
    s_WidthExpansionMoreButtonAnimationEndPositionProperty = nullptr;
    s_WidthExpansionMoreButtonAnimationStartPositionProperty = nullptr;
}

double CloseAnimationEndPosition ( )

Definition at line 291 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_CloseAnimationEndPositionProperty));
}

void CloseAnimationEndPosition ( double value )

Definition at line 283 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_CloseAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty CloseAnimationEndPositionProperty ( ) [inline, static]

Definition at line 72 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_CloseAnimationEndPositionProperty; }

winrt::Rect ContentClipRect ( )

Definition at line 304 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Rect>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ContentClipRectProperty));
}

void ContentClipRect ( winrt::Rect const & value )

Definition at line 296 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ContentClipRectProperty, ValueHelper<winrt::Rect>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ContentClipRectProperty ( ) [inline, static]

Definition at line 73 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ContentClipRectProperty; }

void CurrentWidth ( double value )

Definition at line 309 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_CurrentWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double CurrentWidth ( )

Definition at line 317 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_CurrentWidthProperty));
}

static winrt::DependencyProperty CurrentWidthProperty ( ) [inline, static]

Definition at line 74 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_CurrentWidthProperty; }

void EnsureProperties ( ) [static]

Definition at line 35 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    if (!s_CloseAnimationEndPositionProperty)
    {
        s_CloseAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"CloseAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ContentClipRectProperty)
    {
        s_ContentClipRectProperty =
            InitializeDependencyProperty(
                L"ContentClipRect",
                winrt::name_of<winrt::Rect>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Rect>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_CurrentWidthProperty)
    {
        s_CurrentWidthProperty =
            InitializeDependencyProperty(
                L"CurrentWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandDownAnimationEndPositionProperty)
    {
        s_ExpandDownAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"ExpandDownAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandDownAnimationHoldPositionProperty)
    {
        s_ExpandDownAnimationHoldPositionProperty =
            InitializeDependencyProperty(
                L"ExpandDownAnimationHoldPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandDownAnimationStartPositionProperty)
    {
        s_ExpandDownAnimationStartPositionProperty =
            InitializeDependencyProperty(
                L"ExpandDownAnimationStartPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandDownOverflowVerticalPositionProperty)
    {
        s_ExpandDownOverflowVerticalPositionProperty =
            InitializeDependencyProperty(
                L"ExpandDownOverflowVerticalPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandedWidthProperty)
    {
        s_ExpandedWidthProperty =
            InitializeDependencyProperty(
                L"ExpandedWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandUpAnimationEndPositionProperty)
    {
        s_ExpandUpAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"ExpandUpAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandUpAnimationHoldPositionProperty)
    {
        s_ExpandUpAnimationHoldPositionProperty =
            InitializeDependencyProperty(
                L"ExpandUpAnimationHoldPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandUpAnimationStartPositionProperty)
    {
        s_ExpandUpAnimationStartPositionProperty =
            InitializeDependencyProperty(
                L"ExpandUpAnimationStartPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandUpOverflowVerticalPositionProperty)
    {
        s_ExpandUpOverflowVerticalPositionProperty =
            InitializeDependencyProperty(
                L"ExpandUpOverflowVerticalPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_OpenAnimationEndPositionProperty)
    {
        s_OpenAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"OpenAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_OpenAnimationStartPositionProperty)
    {
        s_OpenAnimationStartPositionProperty =
            InitializeDependencyProperty(
                L"OpenAnimationStartPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_OverflowContentClipRectProperty)
    {
        s_OverflowContentClipRectProperty =
            InitializeDependencyProperty(
                L"OverflowContentClipRect",
                winrt::name_of<winrt::Rect>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Rect>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_WidthExpansionAnimationEndPositionProperty)
    {
        s_WidthExpansionAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"WidthExpansionAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_WidthExpansionAnimationStartPositionProperty)
    {
        s_WidthExpansionAnimationStartPositionProperty =
            InitializeDependencyProperty(
                L"WidthExpansionAnimationStartPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_WidthExpansionDeltaProperty)
    {
        s_WidthExpansionDeltaProperty =
            InitializeDependencyProperty(
                L"WidthExpansionDelta",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_WidthExpansionMoreButtonAnimationEndPositionProperty)
    {
        s_WidthExpansionMoreButtonAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"WidthExpansionMoreButtonAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_WidthExpansionMoreButtonAnimationStartPositionProperty)
    {
        s_WidthExpansionMoreButtonAnimationStartPositionProperty =
            InitializeDependencyProperty(
                L"WidthExpansionMoreButtonAnimationStartPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
}

double ExpandDownAnimationEndPosition ( )

Definition at line 330 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandDownAnimationEndPositionProperty));
}

void ExpandDownAnimationEndPosition ( double value )

Definition at line 322 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandDownAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ExpandDownAnimationEndPositionProperty ( ) [inline, static]

Definition at line 75 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandDownAnimationEndPositionProperty; }

void ExpandDownAnimationHoldPosition ( double value )

Definition at line 335 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandDownAnimationHoldPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ExpandDownAnimationHoldPosition ( )

Definition at line 343 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandDownAnimationHoldPositionProperty));
}

static winrt::DependencyProperty ExpandDownAnimationHoldPositionProperty ( ) [inline, static]

Definition at line 76 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandDownAnimationHoldPositionProperty; }

void ExpandDownAnimationStartPosition ( double value )

Definition at line 348 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandDownAnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ExpandDownAnimationStartPosition ( )

Definition at line 356 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandDownAnimationStartPositionProperty));
}

static winrt::DependencyProperty ExpandDownAnimationStartPositionProperty ( ) [inline, static]

Definition at line 77 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandDownAnimationStartPositionProperty; }

void ExpandDownOverflowVerticalPosition ( double value )

Definition at line 361 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandDownOverflowVerticalPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ExpandDownOverflowVerticalPosition ( )

Definition at line 369 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandDownOverflowVerticalPositionProperty));
}

static winrt::DependencyProperty ExpandDownOverflowVerticalPositionProperty ( ) [inline, static]

Definition at line 78 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandDownOverflowVerticalPositionProperty; }

double ExpandedWidth ( )

Definition at line 382 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandedWidthProperty));
}

void ExpandedWidth ( double value )

Definition at line 374 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandedWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ExpandedWidthProperty ( ) [inline, static]

Definition at line 79 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandedWidthProperty; }

void ExpandUpAnimationEndPosition ( double value )

Definition at line 387 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandUpAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ExpandUpAnimationEndPosition ( )

Definition at line 395 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandUpAnimationEndPositionProperty));
}

static winrt::DependencyProperty ExpandUpAnimationEndPositionProperty ( ) [inline, static]

Definition at line 80 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandUpAnimationEndPositionProperty; }

void ExpandUpAnimationHoldPosition ( double value )

Definition at line 400 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandUpAnimationHoldPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ExpandUpAnimationHoldPosition ( )

Definition at line 408 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandUpAnimationHoldPositionProperty));
}

static winrt::DependencyProperty ExpandUpAnimationHoldPositionProperty ( ) [inline, static]

Definition at line 81 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandUpAnimationHoldPositionProperty; }

void ExpandUpAnimationStartPosition ( double value )

Definition at line 413 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandUpAnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ExpandUpAnimationStartPosition ( )

Definition at line 421 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandUpAnimationStartPositionProperty));
}

static winrt::DependencyProperty ExpandUpAnimationStartPositionProperty ( ) [inline, static]

Definition at line 82 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandUpAnimationStartPositionProperty; }

void ExpandUpOverflowVerticalPosition ( double value )

Definition at line 426 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_ExpandUpOverflowVerticalPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ExpandUpOverflowVerticalPosition ( )

Definition at line 434 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_ExpandUpOverflowVerticalPositionProperty));
}

static winrt::DependencyProperty ExpandUpOverflowVerticalPositionProperty ( ) [inline, static]

Definition at line 83 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_ExpandUpOverflowVerticalPositionProperty; }

void OpenAnimationEndPosition ( double value )

Definition at line 439 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_OpenAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double OpenAnimationEndPosition ( )

Definition at line 447 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_OpenAnimationEndPositionProperty));
}

static winrt::DependencyProperty OpenAnimationEndPositionProperty ( ) [inline, static]

Definition at line 84 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_OpenAnimationEndPositionProperty; }

void OpenAnimationStartPosition ( double value )

Definition at line 452 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_OpenAnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double OpenAnimationStartPosition ( )

Definition at line 460 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_OpenAnimationStartPositionProperty));
}

static winrt::DependencyProperty OpenAnimationStartPositionProperty ( ) [inline, static]

Definition at line 85 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_OpenAnimationStartPositionProperty; }

void OverflowContentClipRect ( winrt::Rect const & value )

Definition at line 465 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_OverflowContentClipRectProperty, ValueHelper<winrt::Rect>::BoxValueIfNecessary(value));
    }
}

winrt::Rect OverflowContentClipRect ( )

Definition at line 473 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Rect>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_OverflowContentClipRectProperty));
}

static winrt::DependencyProperty OverflowContentClipRectProperty ( ) [inline, static]

Definition at line 86 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_OverflowContentClipRectProperty; }

double WidthExpansionAnimationEndPosition ( )

Definition at line 486 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_WidthExpansionAnimationEndPositionProperty));
}

void WidthExpansionAnimationEndPosition ( double value )

Definition at line 478 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_WidthExpansionAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty WidthExpansionAnimationEndPositionProperty ( ) [inline, static]

Definition at line 87 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_WidthExpansionAnimationEndPositionProperty; }

double WidthExpansionAnimationStartPosition ( )

Definition at line 499 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_WidthExpansionAnimationStartPositionProperty));
}

void WidthExpansionAnimationStartPosition ( double value )

Definition at line 491 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_WidthExpansionAnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty WidthExpansionAnimationStartPositionProperty ( ) [inline, static]

Definition at line 88 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_WidthExpansionAnimationStartPositionProperty; }

double WidthExpansionDelta ( )

Definition at line 512 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_WidthExpansionDeltaProperty));
}

void WidthExpansionDelta ( double value )

Definition at line 504 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_WidthExpansionDeltaProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty WidthExpansionDeltaProperty ( ) [inline, static]

Definition at line 89 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_WidthExpansionDeltaProperty; }

void WidthExpansionMoreButtonAnimationEndPosition ( double value )

Definition at line 517 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_WidthExpansionMoreButtonAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double WidthExpansionMoreButtonAnimationEndPosition ( )

Definition at line 525 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_WidthExpansionMoreButtonAnimationEndPositionProperty));
}

static winrt::DependencyProperty WidthExpansionMoreButtonAnimationEndPositionProperty ( ) [inline, static]

Definition at line 90 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_WidthExpansionMoreButtonAnimationEndPositionProperty; }

void WidthExpansionMoreButtonAnimationStartPosition ( double value )

Definition at line 530 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->SetValue(s_WidthExpansionMoreButtonAnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double WidthExpansionMoreButtonAnimationStartPosition ( )

Definition at line 538 of file CommandBarFlyoutCommandBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBarTemplateSettings*>(this)->GetValue(s_WidthExpansionMoreButtonAnimationStartPositionProperty));
}

static winrt::DependencyProperty WidthExpansionMoreButtonAnimationStartPositionProperty ( ) [inline, static]

Definition at line 91 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

{ return s_WidthExpansionMoreButtonAnimationStartPositionProperty; }

Member Data Documentation

GlobalDependencyProperty s_CloseAnimationEndPositionProperty [static]

Definition at line 93 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ContentClipRectProperty [static]

Definition at line 94 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_CurrentWidthProperty [static]

Definition at line 95 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandDownAnimationEndPositionProperty [static]

Definition at line 96 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandDownAnimationHoldPositionProperty [static]

Definition at line 97 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandDownAnimationStartPositionProperty [static]

Definition at line 98 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandDownOverflowVerticalPositionProperty [static]

Definition at line 99 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandedWidthProperty [static]

Definition at line 100 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandUpAnimationEndPositionProperty [static]

Definition at line 101 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandUpAnimationHoldPositionProperty [static]

Definition at line 102 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandUpAnimationStartPositionProperty [static]

Definition at line 103 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandUpOverflowVerticalPositionProperty [static]

Definition at line 104 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_OpenAnimationEndPositionProperty [static]

Definition at line 105 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_OpenAnimationStartPositionProperty [static]

Definition at line 106 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_OverflowContentClipRectProperty [static]

Definition at line 107 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_WidthExpansionAnimationEndPositionProperty [static]

Definition at line 108 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_WidthExpansionAnimationStartPositionProperty [static]

Definition at line 109 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_WidthExpansionDeltaProperty [static]

Definition at line 110 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_WidthExpansionMoreButtonAnimationEndPositionProperty [static]

Definition at line 111 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

GlobalDependencyProperty s_WidthExpansionMoreButtonAnimationStartPositionProperty [static]

Definition at line 112 of file CommandBarFlyoutCommandBarTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/CommandBarFlyoutCommandBarTemplateSettings.properties.h
  • Generated/CommandBarFlyoutCommandBarTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

CommandBarFlyoutTrace Class Reference

#include "CommandBarFlyoutTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 67 of file CommandBarFlyoutTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 73 of file CommandBarFlyoutTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "CommandBarFlyoutInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_COMMANDBARFLYOUT),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"CommandBarFlyout") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 106 of file CommandBarFlyoutTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "CommandBarFlyoutVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_COMMANDBARFLYOUT),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"CommandBarFlyout") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 70 of file CommandBarFlyoutTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 71 of file CommandBarFlyoutTrace.h.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/CommandBarFlyoutTrace.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSourceToIconSourceElementConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • CommandingHelpers
  • IconSourceToIconSourceElementConverter
Public Member Functions

IconSourceToIconSourceElementConverter Class Reference

#include "CommandingHelpers.h"

List of all members.

Public Member Functions

winrt::IInspectable | Convert (winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language)
winrt::IInspectable | ConvertBack (winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language) noexcept

Detailed Description

Definition at line 8 of file CommandingHelpers.h.

Member Function Documentation

winrt::IInspectable Convert | ( | winrt::IInspectable const & | value,
 |  | winrt::TypeName const & | targetType,
 |  | winrt::IInspectable const & | parameter,
 |  | winrt::hstring const & | language
 | ) |  |

Definition at line 9 of file CommandingHelpers.cpp.

{
    if (value)
    {
        winrt::IconSource iconSource{ value.as<winrt::IconSource>() };
        winrt::IconSourceElement iconSourceElement;
        iconSourceElement.IconSource(iconSource);
        return iconSourceElement;
    }

    return nullptr;
}

winrt::IInspectable ConvertBack | ( | winrt::IInspectable const & | value,
 |  | winrt::TypeName const & | targetType,
 |  | winrt::IInspectable const & | parameter,
 |  | winrt::hstring const & | language
 | ) |  |

Definition at line 26 of file CommandingHelpers.cpp.

{
    winrt::throw_hresult(E_NOTIMPL);
}

The documentation for this class was generated from the following files:
  • inc/CommandingHelpers.h
  • dll/CommandingHelpers.cpp
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PlatformConfiguration Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Common
  • PlatformConfiguration
Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

PlatformConfiguration Class Reference

List of all members.

Static Public Member Functions

static ushort | GetCurrentAPIVersion ()
static bool | IsDebugBuildConfiguration ()
static bool | IsDevice (DeviceType type)
static bool | IsOsVersion (OSVersion version)
static bool | IsOsVersionGreaterThan (OSVersion version)
static bool | IsOsVersionGreaterThanOrEqual (OSVersion version)
static bool | IsOSVersionLessThan (OSVersion version)

Static Private Member Functions

static bool | IsApiContractPresent (ushort version)

Private Attributes

const ushort | InvalidAPIVersion = 255

Static Private Attributes

static ushort | _currentAPIVersion = InvalidAPIVersion

Detailed Description

Definition at line 33 of file PlatformConfiguration.cs.

Member Function Documentation

static ushort GetCurrentAPIVersion ( ) [inline, static]

Definition at line 43 of file PlatformConfiguration.cs.

        {
            if (_currentAPIVersion == InvalidAPIVersion)
            {
                ushort currentAPIVersion = 3;
                while (IsApiContractPresent((ushort)(currentAPIVersion + 1)))
                {
                    currentAPIVersion++;
                }

                _currentAPIVersion = currentAPIVersion;
            }
            return _currentAPIVersion;
        }

static bool IsApiContractPresent ( ushort version ) [inline, static, private]

Definition at line 38 of file PlatformConfiguration.cs.

        {
            return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", version);
        }

static bool IsDebugBuildConfiguration ( ) [inline, static]

Definition at line 104 of file PlatformConfiguration.cs.

        {
#if DEBUG
            return true;
#else
            return false;
#endif
        }

static bool IsDevice ( DeviceType type ) [inline, static]

Definition at line 58 of file PlatformConfiguration.cs.

        {
            var deviceFamily = AnalyticsInfo.VersionInfo.DeviceFamily;

            if (type == DeviceType.Desktop && deviceFamily == "Windows.Desktop")
            {
                return true;
            }
            else if (type == DeviceType.Phone && deviceFamily == "Windows.Mobile")
            {
                return true;
            }
            else if (type == DeviceType.OneCore && deviceFamily != "Windows.Desktop" && deviceFamily != "Windows.Mobile")
            {
                return true;
            }

            return false;
        }

static bool IsOsVersion ( OSVersion version ) [inline, static]

Definition at line 78 of file PlatformConfiguration.cs.

        {
            // We can determine the OS version by checking for the presence of the Universal contract
            // corresonding to that version and the absense of the contract version corresonding to
            // the next OS version.
            return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", (ushort)version)
                && !ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", (ushort)(version + 1));
        }

static bool IsOsVersionGreaterThan ( OSVersion version ) [inline, static]

Definition at line 87 of file PlatformConfiguration.cs.

        {
            // We can determine that the OS version is greater than the specified version by checking for
            // the presence of the Universal contract corresonding to the next version.
            return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", (ushort)(version + 1));
        }

static bool IsOsVersionGreaterThanOrEqual ( OSVersion version ) [inline, static]

Definition at line 94 of file PlatformConfiguration.cs.

        {
            return IsOsVersionGreaterThan(version) || IsOsVersion(version);
        }

static bool IsOSVersionLessThan ( OSVersion version ) [inline, static]

Definition at line 99 of file PlatformConfiguration.cs.

        {
            return !IsOsVersionGreaterThanOrEqual(version);
        }

Member Data Documentation

ushort _currentAPIVersion = InvalidAPIVersion [static, private]

Definition at line 36 of file PlatformConfiguration.cs.

const ushort InvalidAPIVersion = 255 [private]

Definition at line 35 of file PlatformConfiguration.cs.

The documentation for this class was generated from the following file:
  • CommonManaged/PlatformConfiguration.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComposableBasePointersImplTType< isDependencyObjectBase > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComposableBasePointersImplTType< isDependencyObjectBase > Struct Template Reference

#include "Vector.h"

Inherited by VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > [private], and VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef > [private].

Detailed Description

template<bool isDependencyObjectBase>
struct ComposableBasePointersImplTType< isDependencyObjectBase >

Definition at line 462 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComposableBasePointersImplTType< false > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComposableBasePointersImplTType< false > Struct Template Reference

#include "Vector.h"

Detailed Description

template<>
struct ComposableBasePointersImplTType< false >

Definition at line 469 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase > Struct Template Reference

#include "VectorIterator.h"

Inherited by VectorIteratorTraits< T, isBindable, isDependencyObjectBase >, and VectorIteratorTraits< T, true, isDependencyObjectBase >.

Detailed Description

template<bool isDependencyObjectBase>
struct ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase >

Definition at line 8 of file VectorIterator.h.

The documentation for this struct was generated from the following file:
  • Collections/VectorIterator.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComposableBasePointersImplTTypeForIterator< false > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComposableBasePointersImplTTypeForIterator< false > Struct Template Reference

#include "VectorIterator.h"

Detailed Description

template<>
struct ComposableBasePointersImplTTypeForIterator< false >

Definition at line 15 of file VectorIterator.h.

The documentation for this struct was generated from the following file:
  • Collections/VectorIterator.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CoreWebView2InitializedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CoreWebView2InitializedEventArgs Class Reference

#include "WebView2.h"

List of all members.

Public Member Functions

CoreWebView2InitializedEventArgs (winrt::hresult Exception)
winrt::hresult | Exception ()
void | Exception (winrt::hresult exception)

Detailed Description

Definition at line 42 of file WebView2.h.

Constructor & Destructor Documentation

CoreWebView2InitializedEventArgs ( winrt::hresult Exception ) [inline]

Definition at line 46 of file WebView2.h.

: m_exception(Exception) {};

Member Function Documentation

void Exception ( winrt::hresult exception ) [inline]

Definition at line 48 of file WebView2.h.

{ m_exception = exception; };

winrt::hresult Exception ( ) [inline]

Definition at line 49 of file WebView2.h.

{ return m_exception; }

The documentation for this class was generated from the following file:
  • WebView2/WebView2.h
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CornerRadiusFilterConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

CornerRadiusFilterConverter Class Reference

#include "CornerRadiusFilterConverter.h"

Inherits CornerRadiusFilterConverterProperties.

List of all members.

Public Member Functions

winrt::CornerRadius | Convert (winrt::CornerRadius const &radius, winrt::CornerRadiusFilterKind const &filterKind)
winrt::IInspectable | Convert (winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language)
winrt::IInspectable | ConvertBack (winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language)

Private Member Functions

double | GetDoubleValue (winrt::CornerRadius const &radius, winrt::CornerRadiusFilterKind const &filterKind)

Detailed Description

Definition at line 8 of file CornerRadiusFilterConverter.h.

Member Function Documentation

winrt::CornerRadius Convert | ( | winrt::CornerRadius const & | radius,
 |  | winrt::CornerRadiusFilterKind const & | filterKind
 | ) |  |

Definition at line 8 of file CornerRadiusFilterConverter.cpp.

{
    winrt::CornerRadius result = radius;

    switch (filterKind)
    {
    case winrt::CornerRadiusFilterKind::Top:
        result.BottomLeft = 0;
        result.BottomRight = 0;
        break;
    case winrt::CornerRadiusFilterKind::Right:
        result.TopLeft = 0;
        result.BottomLeft = 0;
        break;
    case winrt::CornerRadiusFilterKind::Bottom:
        result.TopLeft = 0;
        result.TopRight = 0;
        break;
    case winrt::CornerRadiusFilterKind::Left:
        result.TopRight = 0;
        result.BottomRight = 0;
        break;
    }

    return result;
}

winrt::IInspectable Convert | ( | winrt::IInspectable const & | value,
 |  | winrt::TypeName const & | targetType,
 |  | winrt::IInspectable const & | parameter,
 |  | winrt::hstring const & | language
 | ) |  |

Definition at line 47 of file CornerRadiusFilterConverter.cpp.

{
    auto cornerRadius = unbox_value<winrt::CornerRadius>(value);

    const auto scale = Scale();
    if (!std::isnan(scale))
    {
        cornerRadius.TopLeft *= scale;
        cornerRadius.TopRight *= scale;
        cornerRadius.BottomRight *= scale;
        cornerRadius.BottomLeft *= scale;
    }

    const auto filterType = Filter();
    if (filterType == winrt::CornerRadiusFilterKind::TopLeftValue ||
        filterType == winrt::CornerRadiusFilterKind::BottomRightValue)
    {
        return box_value(GetDoubleValue(cornerRadius, Filter()));
    }

    return box_value(Convert(cornerRadius, Filter()));
}

winrt::IInspectable ConvertBack | ( | winrt::IInspectable const & | value,
 |  | winrt::TypeName const & | targetType,
 |  | winrt::IInspectable const & | parameter,
 |  | winrt::hstring const & | language
 | ) |  |

Definition at line 74 of file CornerRadiusFilterConverter.cpp.

{
    winrt::throw_hresult(E_NOTIMPL);
}

double GetDoubleValue | ( | winrt::CornerRadius const & | radius,
 |  | winrt::CornerRadiusFilterKind const & | filterKind |
 | ) |  |  | [private]

Definition at line 35 of file CornerRadiusFilterConverter.cpp.

{
    switch (filterKind)
    {
    case winrt::CornerRadiusFilterKind::TopLeftValue:
        return radius.TopLeft;
    case winrt::CornerRadiusFilterKind::BottomRightValue:
        return radius.BottomRight;
    }
    return 0;
}

The documentation for this class was generated from the following files:
  • Common/CornerRadiusFilterConverter.h
  • Common/CornerRadiusFilterConverter.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CornerRadiusFilterConverterProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

CornerRadiusFilterConverterProperties Class Reference

#include "CornerRadiusFilterConverter.properties.h"

Inherited by CornerRadiusFilterConverter.

List of all members.

Public Member Functions

CornerRadiusFilterConverterProperties ()
void | Filter (winrt::CornerRadiusFilterKind const &value)
winrt::CornerRadiusFilterKind | Filter ()
void | Scale (double value)
double | Scale ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FilterProperty ()
static winrt::DependencyProperty | ScaleProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_FilterProperty
static GlobalDependencyProperty | s_ScaleProperty

Detailed Description

Definition at line 7 of file CornerRadiusFilterConverter.properties.h.

Constructor & Destructor Documentation

CornerRadiusFilterConverterProperties ( )

Definition at line 19 of file CornerRadiusFilterConverter.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file CornerRadiusFilterConverter.properties.cpp.

{
    s_FilterProperty = nullptr;
    s_ScaleProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file CornerRadiusFilterConverter.properties.cpp.

{
    if (!s_FilterProperty)
    {
        s_FilterProperty =
            InitializeDependencyProperty(
                L"Filter",
                winrt::name_of<winrt::CornerRadiusFilterKind>(),
                winrt::name_of<winrt::CornerRadiusFilterConverter>(),
                false /* isAttached */,
                ValueHelper<winrt::CornerRadiusFilterKind>::BoxValueIfNecessary(winrt::CornerRadiusFilterKind::None),
                nullptr);
    }
    if (!s_ScaleProperty)
    {
        s_ScaleProperty =
            InitializeDependencyProperty(
                L"Scale",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CornerRadiusFilterConverter>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(1.0),
                nullptr);
    }
}

winrt::CornerRadiusFilterKind Filter ( )

Definition at line 64 of file CornerRadiusFilterConverter.properties.cpp.

{
    return ValueHelper<winrt::CornerRadiusFilterKind>::CastOrUnbox(static_cast<CornerRadiusFilterConverter*>(this)->GetValue(s_FilterProperty));
}

void Filter ( winrt::CornerRadiusFilterKind const & value )

Definition at line 56 of file CornerRadiusFilterConverter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CornerRadiusFilterConverter*>(this)->SetValue(s_FilterProperty, ValueHelper<winrt::CornerRadiusFilterKind>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty FilterProperty ( ) [inline, static]

Definition at line 18 of file CornerRadiusFilterConverter.properties.h.

{ return s_FilterProperty; }

double Scale ( )

Definition at line 77 of file CornerRadiusFilterConverter.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CornerRadiusFilterConverter*>(this)->GetValue(s_ScaleProperty));
}

void Scale ( double value )

Definition at line 69 of file CornerRadiusFilterConverter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CornerRadiusFilterConverter*>(this)->SetValue(s_ScaleProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ScaleProperty ( ) [inline, static]

Definition at line 19 of file CornerRadiusFilterConverter.properties.h.

{ return s_ScaleProperty; }

Member Data Documentation

GlobalDependencyProperty s_FilterProperty [static]

Definition at line 21 of file CornerRadiusFilterConverter.properties.h.

GlobalDependencyProperty s_ScaleProperty [static]

Definition at line 22 of file CornerRadiusFilterConverter.properties.h.

The documentation for this class was generated from the following files:
  • Generated/CornerRadiusFilterConverter.properties.h
  • Generated/CornerRadiusFilterConverter.properties.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CornerRadiusToThicknessConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

CornerRadiusToThicknessConverter Class Reference

#include "CornerRadiusToThicknessConverter.h"

Inherits CornerRadiusToThicknessConverterProperties.

List of all members.

Public Member Functions

winrt::Thickness | Convert (winrt::CornerRadius const &radius, winrt::CornerRadiusToThicknessConverterKind const &filterKind, double multiplier)
winrt::IInspectable | Convert (winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language)
winrt::IInspectable | ConvertBack (winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language)

Detailed Description

Definition at line 8 of file CornerRadiusToThicknessConverter.h.

Member Function Documentation

winrt::Thickness Convert | ( | winrt::CornerRadius const & | radius,
 |  | winrt::CornerRadiusToThicknessConverterKind const & | filterKind,
 |  | double | multiplier
 | ) |  |

Definition at line 8 of file CornerRadiusToThicknessConverter.cpp.

{
    auto result = winrt::Thickness{};

    switch (filterKind)
    {
    case winrt::CornerRadiusToThicknessConverterKind::FilterLeftAndRightFromTop:
        result.Left = radius.TopLeft * multiplier;
        result.Right = radius.TopRight * multiplier;
        result.Top = 0;
        result.Bottom = 0;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterLeftAndRightFromBottom:
        result.Left = radius.BottomLeft * multiplier;
        result.Right = radius.BottomRight * multiplier;
        result.Top = 0;
        result.Bottom = 0;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterTopAndBottomFromLeft:
        result.Left = 0;
        result.Right = 0;
        result.Top = radius.TopLeft * multiplier;
        result.Bottom = radius.BottomLeft * multiplier;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterTopAndBottomFromRight:
        result.Left = 0;
        result.Right = 0;
        result.Top = radius.TopRight * multiplier;
        result.Bottom = radius.BottomRight * multiplier;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterTopFromTopLeft:
        result.Left = 0;
        result.Right = 0;
        result.Top = radius.TopLeft * multiplier;
        result.Bottom = 0;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterTopFromTopRight:
        result.Left = 0;
        result.Right = 0;
        result.Top = radius.TopRight * multiplier;
        result.Bottom = 0;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterRightFromTopRight:
        result.Left = 0;
        result.Right = radius.TopRight * multiplier;
        result.Top = 0;
        result.Bottom = 0;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterRightFromBottomRight:
        result.Left = 0;
        result.Right = radius.BottomRight * multiplier;
        result.Top = 0;
        result.Bottom = 0;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterBottomFromBottomRight:
        result.Left = 0;
        result.Right = 0;
        result.Top = 0;
        result.Bottom = radius.BottomRight * multiplier;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterBottomFromBottomLeft:
        result.Left = 0;
        result.Right = 0;
        result.Top = 0;
        result.Bottom = radius.BottomLeft * multiplier;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterLeftFromBottomLeft:
        result.Left = radius.BottomLeft * multiplier;
        result.Right = 0;
        result.Top = 0;
        result.Bottom = 0;
        break;
    case winrt::CornerRadiusToThicknessConverterKind::FilterLeftFromTopLeft:
        result.Left = radius.TopLeft * multiplier;
        result.Right = 0;
        result.Top = 0;
        result.Bottom = 0;
        break;
    }

    return result;
}

winrt::IInspectable Convert | ( | winrt::IInspectable const & | value,
 |  | winrt::TypeName const & | targetType,
 |  | winrt::IInspectable const & | parameter,
 |  | winrt::hstring const & | language
 | ) |  |

Definition at line 93 of file CornerRadiusToThicknessConverter.cpp.

{
    auto radius = unbox_value<winrt::CornerRadius>(value);
    const auto multiplier = Multiplier();
    return box_value(Convert(radius, ConversionKind(),multiplier));
}

winrt::IInspectable ConvertBack | ( | winrt::IInspectable const & | value,
 |  | winrt::TypeName const & | targetType,
 |  | winrt::IInspectable const & | parameter,
 |  | winrt::hstring const & | language
 | ) |  |

Definition at line 104 of file CornerRadiusToThicknessConverter.cpp.

{
    winrt::throw_hresult(E_NOTIMPL);

}

The documentation for this class was generated from the following files:
  • Common/CornerRadiusToThicknessConverter.h
  • Common/CornerRadiusToThicknessConverter.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CornerRadiusToThicknessConverterProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

CornerRadiusToThicknessConverterProperties Class Reference

#include "CornerRadiusToThicknessConverter.properties.h"

Inherited by CornerRadiusToThicknessConverter.

List of all members.

Public Member Functions

CornerRadiusToThicknessConverterProperties ()
void | ConversionKind (winrt::CornerRadiusToThicknessConverterKind const &value)
winrt::CornerRadiusToThicknessConverterKind | ConversionKind ()
void | Multiplier (double value)
double | Multiplier ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ConversionKindProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MultiplierProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ConversionKindProperty
static GlobalDependencyProperty | s_MultiplierProperty

Detailed Description

Definition at line 7 of file CornerRadiusToThicknessConverter.properties.h.

Constructor & Destructor Documentation

CornerRadiusToThicknessConverterProperties ( )

Definition at line 19 of file CornerRadiusToThicknessConverter.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file CornerRadiusToThicknessConverter.properties.cpp.

{
    s_ConversionKindProperty = nullptr;
    s_MultiplierProperty = nullptr;
}

void ConversionKind ( winrt::CornerRadiusToThicknessConverterKind const & value )

Definition at line 56 of file CornerRadiusToThicknessConverter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CornerRadiusToThicknessConverter*>(this)->SetValue(s_ConversionKindProperty, ValueHelper<winrt::CornerRadiusToThicknessConverterKind>::BoxValueIfNecessary(value));
    }
}

winrt::CornerRadiusToThicknessConverterKind ConversionKind ( )

Definition at line 64 of file CornerRadiusToThicknessConverter.properties.cpp.

{
    return ValueHelper<winrt::CornerRadiusToThicknessConverterKind>::CastOrUnbox(static_cast<CornerRadiusToThicknessConverter*>(this)->GetValue(s_ConversionKindProperty));
}

static winrt::DependencyProperty ConversionKindProperty ( ) [inline, static]

Definition at line 18 of file CornerRadiusToThicknessConverter.properties.h.

{ return s_ConversionKindProperty; }

void EnsureProperties ( ) [static]

Definition at line 24 of file CornerRadiusToThicknessConverter.properties.cpp.

{
    if (!s_ConversionKindProperty)
    {
        s_ConversionKindProperty =
            InitializeDependencyProperty(
                L"ConversionKind",
                winrt::name_of<winrt::CornerRadiusToThicknessConverterKind>(),
                winrt::name_of<winrt::CornerRadiusToThicknessConverter>(),
                false /* isAttached */,
                ValueHelper<winrt::CornerRadiusToThicknessConverterKind>::BoxValueIfNecessary(winrt::CornerRadiusToThicknessConverterKind::FilterLeftAndRightFromTop),
                nullptr);
    }
    if (!s_MultiplierProperty)
    {
        s_MultiplierProperty =
            InitializeDependencyProperty(
                L"Multiplier",
                winrt::name_of<double>(),
                winrt::name_of<winrt::CornerRadiusToThicknessConverter>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(1.0f),
                nullptr);
    }
}

double Multiplier ( )

Definition at line 77 of file CornerRadiusToThicknessConverter.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<CornerRadiusToThicknessConverter*>(this)->GetValue(s_MultiplierProperty));
}

void Multiplier ( double value )

Definition at line 69 of file CornerRadiusToThicknessConverter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<CornerRadiusToThicknessConverter*>(this)->SetValue(s_MultiplierProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MultiplierProperty ( ) [inline, static]

Definition at line 19 of file CornerRadiusToThicknessConverter.properties.h.

{ return s_MultiplierProperty; }

Member Data Documentation

GlobalDependencyProperty s_ConversionKindProperty [static]

Definition at line 21 of file CornerRadiusToThicknessConverter.properties.h.

GlobalDependencyProperty s_MultiplierProperty [static]

Definition at line 22 of file CornerRadiusToThicknessConverter.properties.h.

The documentation for this class was generated from the following files:
  • Generated/CornerRadiusToThicknessConverter.properties.h
  • Generated/CornerRadiusToThicknessConverter.properties.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomProperty Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

CustomProperty Class Reference

#include "CustomProperty.h"

List of all members.

Public Member Functions

CustomProperty (winrt::hstring const &name, winrt::TypeName const &typeName, std::function< winrt::IInspectable(winrt::IInspectable const &)>, std::function< void(winrt::IInspectable const &, winrt::IInspectable const &)> m_setter)
bool | CanRead ()
bool | CanWrite ()
winrt::IInspectable | GetIndexedValue (winrt::IInspectable const &target, winrt::IInspectable const &index)
winrt::IInspectable | GetValue (winrt::IInspectable const &target)
winrt::hstring | Name ()
void | SetIndexedValue (winrt::IInspectable const &target, winrt::IInspectable const &value, winrt::IInspectable const &index)
void | SetValue (winrt::IInspectable const &target, winrt::IInspectable const &value)
winrt::TypeName | Type ()

Private Attributes

std::function
< winrt::IInspectable(winrt::IInspectable
const &)> 		m_getter
std::function< void(winrt::IInspectable
const &, winrt::IInspectable
const &)> 		m_setter

Detailed Description

Definition at line 8 of file CustomProperty.h.

Constructor & Destructor Documentation

CustomProperty | ( | winrt::hstring const & | name,
 |  | winrt::TypeName const & | typeName,
 |  | std::function< winrt::IInspectable(winrt::IInspectable const &)> | getter,
 |  | std::function< void(winrt::IInspectable const &, winrt::IInspectable const &)> | m_setter
 | ) |  |

Definition at line 7 of file CustomProperty.cpp.

{
    m_name = name;
    m_typeName = typeName;
    m_getter = getter;
    m_setter = setter;
}

Member Function Documentation

bool CanRead ( )

Definition at line 19 of file CustomProperty.cpp.

{
    return m_getter != nullptr;
}

bool CanWrite ( )

Definition at line 24 of file CustomProperty.cpp.

{
    return m_setter != nullptr;
}

winrt::IInspectable GetIndexedValue | ( | winrt::IInspectable const & | target,
 |  | winrt::IInspectable const & | index
 | ) |  |

Definition at line 49 of file CustomProperty.cpp.

{
    throw winrt::hresult_not_implemented();
}

winrt::IInspectable GetValue ( winrt::IInspectable const & target )

Definition at line 39 of file CustomProperty.cpp.

{
    return m_getter(target);
}

winrt::hstring Name ( )

Definition at line 29 of file CustomProperty.cpp.

{
    return m_name;
}

void SetIndexedValue | ( | winrt::IInspectable const & | target,
 |  | winrt::IInspectable const & | value,
 |  | winrt::IInspectable const & | index
 | ) |  |

Definition at line 54 of file CustomProperty.cpp.

{
    throw winrt::hresult_not_implemented();
}

void SetValue | ( | winrt::IInspectable const & | target,
 |  | winrt::IInspectable const & | value
 | ) |  |

Definition at line 44 of file CustomProperty.cpp.

{
    m_setter(target, value);
}

winrt::TypeName Type ( )

Definition at line 34 of file CustomProperty.cpp.

{
    return m_typeName;
}

Member Data Documentation

std::function<winrt::IInspectable(winrt::IInspectable const&)> m_getter [private]

Definition at line 30 of file CustomProperty.h.

std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> m_setter [private]

Definition at line 33 of file CustomProperty.h.

The documentation for this class was generated from the following files:
  • Repeater/CustomProperty.h
  • Repeater/CustomProperty.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DeriveFromBitmapIconHelper_base Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DeriveFromBitmapIconHelper_base Class Reference

Inherited by ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DeriveFromBitmapIconSourceHelper_base Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DeriveFromBitmapIconSourceHelper_base Class Reference

Inherited by ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DeriveFromPanelHelper_base Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DeriveFromPanelHelper_base Class Reference

Inherited by ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 >, ReferenceTracker< ItemsRepeater, DeriveFromPanelHelper_base, winrt::ItemsRepeater, winrt::IItemsRepeater2 >, ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > >, ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView >, ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface >, and ReferenceTracker< WebView2, DeriveFromPanelHelper_base, winrt::WebView2, winrt::IWebView22, IHwndComponentHost >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DeriveFromPathIconHelper_base Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DeriveFromPathIconHelper_base Class Reference

Inherited by ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DeriveFromPathIconSourceHelper_base Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DeriveFromPathIconSourceHelper_base Class Reference

Inherited by ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DeriveFromToggleMenuFlyoutItemHelper_base Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DeriveFromToggleMenuFlyoutItemHelper_base Class Reference

Inherited by ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DesktopAcrylicBackdrop Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Attributes

DesktopAcrylicBackdrop Class Reference

#include "DesktopAcrylicBackdrop.h"

Inherits ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT >.

List of all members.

Classes

class | ControllerEntry

Public Member Functions

DesktopAcrylicBackdrop ()
virtual | ~DesktopAcrylicBackdrop ()
void | OnTargetConnected (ICompositionSupportsSystemBackdrop connectedTarget, winrt::Microsoft::UI::Xaml::XamlRoot xamlRoot)
void | OnTargetDisconnected (ICompositionSupportsSystemBackdrop disconnectedTarget)

Private Attributes

std::vector< std::unique_ptr
< ControllerEntry > > 		m_controllers

Detailed Description

Definition at line 13 of file DesktopAcrylicBackdrop.h.

Constructor & Destructor Documentation

DesktopAcrylicBackdrop ( )
virtual ~DesktopAcrylicBackdrop ( ) [virtual]

Member Function Documentation

void OnTargetConnected | ( | ICompositionSupportsSystemBackdrop | connectedTarget,
 |  | winrt::Microsoft::UI::Xaml::XamlRoot | xamlRoot
 | ) |  |

Definition at line 10 of file DesktopAcrylicBackdrop.cpp.

{
    __super::OnTargetConnected(target, xamlRoot);

    auto newController = DesktopAcrylicController();
    auto systemBackdrop = this->try_as<winrt::Microsoft::UI::Xaml::Media::SystemBackdrop>();
    auto configuration = systemBackdrop.GetDefaultSystemBackdropConfiguration(target, xamlRoot);
    m_controllers.push_back(std::make_unique<ControllerEntry>(target, newController, configuration));
}

void OnTargetDisconnected ( ICompositionSupportsSystemBackdrop disconnectedTarget )

Definition at line 20 of file DesktopAcrylicBackdrop.cpp.

{
    __super::OnTargetDisconnected(target);

    auto entryIterator = std::find_if(
        m_controllers.begin(),
        m_controllers.end(),
        [target](const std::unique_ptr<ControllerEntry>& entry){ return entry->m_target == target; });
    // Workaround for Bug 44926194: SystemBackdrop's BaseController can fail to ensure system DQ before framework gets shutdown notification
    // OnTargetConnected could fail in IXP's BaseController when ensuring a system DispatcherQueue. If that happens
    // we'll skip adding to the list of controllers, which means we won't find anything when trying to remove it later.
    // When the bug is fixed, take out this if condition and always assert and erase.
    // We hit the failure when the app has started DQ shutdown, but Xaml hasn't received any notification yet.
    if (entryIterator != m_controllers.end())
    {
        MUX_ASSERT(entryIterator != m_controllers.end());
        m_controllers.erase(entryIterator);
    }
}

Member Data Documentation

std::vector<std::unique_ptr<ControllerEntry> > m_controllers [private]

Definition at line 38 of file DesktopAcrylicBackdrop.h.

The documentation for this class was generated from the following files:
  • Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.h
  • Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DesktopAcrylicBackdrop::ControllerEntry Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • DesktopAcrylicBackdrop
  • DesktopAcrylicBackdrop::ControllerEntry
Public Member Functions | Public Attributes

DesktopAcrylicBackdrop::ControllerEntry Class Reference

List of all members.

Public Member Functions

ControllerEntry (ICompositionSupportsSystemBackdrop target, DesktopAcrylicController controller, SystemBackdropConfiguration configuration)
ControllerEntry (const ControllerEntry &other)
~ControllerEntry ()
ControllerEntry & | operator= (const ControllerEntry &other)

Public Attributes

DesktopAcrylicController | m_controller
ICompositionSupportsSystemBackdrop | m_target

Detailed Description

Definition at line 24 of file DesktopAcrylicBackdrop.h.

Constructor & Destructor Documentation

ControllerEntry | ( | ICompositionSupportsSystemBackdrop | target,
 |  | DesktopAcrylicController | controller,
 |  | SystemBackdropConfiguration | configuration
 | ) |  |

Definition at line 40 of file DesktopAcrylicBackdrop.cpp.

    : m_target(target)
    , m_controller(controller)
{
    controller.AddSystemBackdropTarget(target);
    controller.SetSystemBackdropConfiguration(configuration);
}

~ControllerEntry ( )

Definition at line 48 of file DesktopAcrylicBackdrop.cpp.

{
    m_controller.RemoveSystemBackdropTarget(m_target);
    m_controller.Close();
    m_controller = nullptr;
}

ControllerEntry ( const ControllerEntry & other )

Member Function Documentation

ControllerEntry& operator= ( const ControllerEntry & other )

Member Data Documentation

DesktopAcrylicController m_controller

Definition at line 35 of file DesktopAcrylicBackdrop.h.

ICompositionSupportsSystemBackdrop m_target

Definition at line 34 of file DesktopAcrylicBackdrop.h.

The documentation for this class was generated from the following files:
  • Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.h
  • Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)> Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • details
  • CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>
Classes

CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)> Struct Template Reference

#include "InvokableCallbackHelper.h"

Classes

struct InvokeCallback

Detailed Description

template<typename TDelegateInterface, typename... TArgs>
struct details::CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>

Definition at line 12 of file InvokableCallbackHelper.h.

The documentation for this struct was generated from the following file:
  • WebView2/InvokableCallbackHelper.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • details
  • CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>
  • CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
Public Member Functions | Private Attributes

CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > Struct Template Reference

#include "InvokableCallbackHelper.h"

List of all members.

Public Member Functions

InvokeCallback ()
InvokeCallback (std::function< HRESULT STDMETHODCALLTYPE(TArgs...)> &&func_obj)
HRESULT STDMETHODCALLTYPE Invoke (TArgs...args) override

Private Attributes

std::function< HRESULT
STDMETHODCALLTYPE(TArgs...)> 		m_invokeFunction

Detailed Description

template<typename TDelegateInterface, typename... TArgs>
template<typename TDelegateInterface>
struct details::CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >

Definition at line 16 of file InvokableCallbackHelper.h.

Constructor & Destructor Documentation

InvokeCallback ( )
InvokeCallback ( std::function< HRESULT STDMETHODCALLTYPE(TArgs...)> && func_obj ) [inline]

Definition at line 25 of file InvokableCallbackHelper.h.

: m_invokeFunction(func_obj) {}

Member Function Documentation

HRESULT STDMETHODCALLTYPE Invoke ( TArgs... args ) [inline, override]

Definition at line 27 of file InvokableCallbackHelper.h.

            {
                return m_invokeFunction(args...);
            }

Member Data Documentation

std::function<HRESULT STDMETHODCALLTYPE(TArgs...)> m_invokeFunction [private]

Definition at line 19 of file InvokableCallbackHelper.h.

The documentation for this struct was generated from the following file:
  • WebView2/InvokableCallbackHelper.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DispatcherHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

DispatcherHelper Class Reference

#include "DispatcherHelper.h"

List of all members.

Public Member Functions

DispatcherHelper (const winrt::DependencyObject &dependencyObject=nullptr)
void RunAsync (std::function< void()> func, bool fallbackToThisThread=false) const

Detailed Description

Definition at line 7 of file DispatcherHelper.h.

Constructor & Destructor Documentation

DispatcherHelper ( const winrt::DependencyObject & dependencyObject = nullptr ) [inline]

Definition at line 11 of file DispatcherHelper.h.

    {
        dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread();
    }

Member Function Documentation

void RunAsync | ( | std::function< void()> | func,
 |  | bool | fallbackToThisThread = false |
 | ) |  |  | const [inline]

Definition at line 16 of file DispatcherHelper.h.

    {
        auto result = dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler(func));
        if (!result)
        {
            if (fallbackToThisThread)
            {
                func();
            }
        }
    }

The documentation for this class was generated from the following file:
  • inc/DispatcherHelper.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DisplayRegionHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Member Functions

DisplayRegionHelper Class Reference

#include "DisplayRegionHelper.h"

List of all members.

Static Public Member Functions

static DisplayRegionHelperInfo | GetRegionInfo ()
static void | SimulateDisplayRegions (bool value)
static bool | SimulateDisplayRegions ()
static winrt::TwoPaneViewMode | SimulateMode ()
static void | SimulateMode (winrt::TwoPaneViewMode value)
static winrt::UIElement | WindowElement ()
static winrt::Rect | WindowRect ()

Private Member Functions

void | OnDisplayModeChanged (const winrt::IInspectable &sender, const winrt::IInspectable &args)

Detailed Description

Definition at line 14 of file DisplayRegionHelper.h.

Member Function Documentation

DisplayRegionHelperInfo GetRegionInfo ( ) [static]

Definition at line 15 of file DisplayRegionHelper.cpp.

{
    auto instance = LifetimeHandler::GetDisplayRegionHelperInstance();

    DisplayRegionHelperInfo info;
    info.Mode = winrt::TwoPaneViewMode::SinglePane;

    if (instance->m_simulateDisplayRegions)
    {
        // Create fake rectangles for test app
        if (instance->m_simulateMode == winrt::TwoPaneViewMode::Wide)
        {
            info.Regions[0] = m_simulateWide0;
            info.Regions[1] = m_simulateWide1;
            info.Mode = winrt::TwoPaneViewMode::Wide;
        }
        else if (instance->m_simulateMode == winrt::TwoPaneViewMode::Tall)
        {
            info.Regions[0] = m_simulateTall0;
            info.Regions[1] = m_simulateTall1;
            info.Mode = winrt::TwoPaneViewMode::Tall;
        }
        else
        {
            info.Regions[0] = m_simulateWide0;
        }
    }
    else
    {
        // ApplicationView::GetForCurrentView throws on failure; in that case we just won't do anything.
        winrt::ApplicationView view{ nullptr };
        if (winrt::CoreWindow::GetForCurrentThread())
        {
            try
            {
                view = winrt::ApplicationView::GetForCurrentView();
            }
            catch (...) {}
        }

        if (view && view.ViewMode() == (winrt::Windows::UI::ViewManagement::ApplicationViewMode)c_ApplicationViewModeSpanning)
        {
            if (const auto appView = view.try_as<winrt::IApplicationViewSpanningRects>())
            {
                winrt::IVectorView<winrt::Rect> rects = appView.GetSpanningRects();

                if (rects.Size() == 2)
                {
                    info.Regions[0] = rects.GetAt(0);
                    info.Regions[1] = rects.GetAt(1);

                    // Determine orientation. If neither of these are true, default to doing nothing.
                    if (info.Regions[0].X < info.Regions[1].X && info.Regions[0].Y == info.Regions[1].Y)
                    {
                        // Double portrait
                        info.Mode = winrt::TwoPaneViewMode::Wide;
                    }
                    else if (info.Regions[0].X == info.Regions[1].X && info.Regions[0].Y < info.Regions[1].Y)
                    {
                        // Double landscape
                        info.Mode = winrt::TwoPaneViewMode::Tall;
                    }
                }
            }
        }
    }

    return info;
}

void OnDisplayModeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void SimulateDisplayRegions ( bool value ) [static]

Definition at line 131 of file DisplayRegionHelper.cpp.

{
    auto instance = LifetimeHandler::GetDisplayRegionHelperInstance();
    instance->m_simulateDisplayRegions = value;
}

bool SimulateDisplayRegions ( ) [static]

Definition at line 138 of file DisplayRegionHelper.cpp.

{
    auto instance = LifetimeHandler::GetDisplayRegionHelperInstance();
    return instance->m_simulateDisplayRegions;
}

winrt::TwoPaneViewMode SimulateMode ( ) [static]

Definition at line 152 of file DisplayRegionHelper.cpp.

{
    auto instance = LifetimeHandler::GetDisplayRegionHelperInstance();
    return instance->m_simulateMode;
}

void SimulateMode ( winrt::TwoPaneViewMode value ) [static]

Definition at line 145 of file DisplayRegionHelper.cpp.

{
    auto instance = LifetimeHandler::GetDisplayRegionHelperInstance();
    instance->m_simulateMode = value;
}

winrt::UIElement WindowElement ( ) [static]

Definition at line 86 of file DisplayRegionHelper.cpp.

{
    auto instance = LifetimeHandler::GetDisplayRegionHelperInstance();
    auto content = winrt::Window::Current() ? winrt::Window::Current().Content() : nullptr;

    if (instance->m_simulateDisplayRegions)
    {
        // Instead of returning the actual window, find the SimulatedWindow element
        winrt::UIElement window = nullptr;

        if (auto fe = content.as<winrt::FrameworkElement>())
        {
            window = SharedHelpers::FindInVisualTreeByName(fe, L"SimulatedWindow");
        }

        return window;
    }
    else
    {
        return content;
    }
}

winrt::Rect WindowRect ( ) [static]

Definition at line 110 of file DisplayRegionHelper.cpp.

{
    auto instance = LifetimeHandler::GetDisplayRegionHelperInstance();

    if (instance->m_simulateDisplayRegions)
    {
        // Return the bounds of the simulated window
        winrt::FrameworkElement window = DisplayRegionHelper::WindowElement().as<winrt::FrameworkElement>();
        const winrt::Rect rc = {
            0, 0,
            (float)window.ActualWidth(),
            (float)window.ActualHeight() };
        return rc;
    }
    else
    {
        return winrt::Window::Current() ? winrt::Window::Current().Bounds() : winrt::Rect();
    }
}

The documentation for this class was generated from the following files:
  • TwoPaneView/DisplayRegionHelper.h
  • TwoPaneView/DisplayRegionHelper.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DisplayRegionHelperInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DisplayRegionHelperInfo Struct Reference

#include "DisplayRegionHelper.h"

Detailed Description

Definition at line 8 of file DisplayRegionHelper.h.

The documentation for this struct was generated from the following file:
  • TwoPaneView/DisplayRegionHelper.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DisplayRegionHelperTestApi Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

DisplayRegionHelperTestApi Class Reference

#include "DisplayRegionHelperTestApi.h"

List of all members.

Static Public Member Functions

static bool | SimulateDisplayRegions ()
static void | SimulateDisplayRegions (bool value)
static winrt::TwoPaneViewMode | SimulateMode ()
static void | SimulateMode (winrt::TwoPaneViewMode const &value)

Detailed Description

Definition at line 8 of file DisplayRegionHelperTestApi.h.

Member Function Documentation

bool SimulateDisplayRegions ( ) [static]

Definition at line 9 of file DisplayRegionHelperTestApi.cpp.

{
    return DisplayRegionHelper::SimulateDisplayRegions();
}

void SimulateDisplayRegions ( bool value ) [static]

Definition at line 14 of file DisplayRegionHelperTestApi.cpp.

{
    DisplayRegionHelper::SimulateDisplayRegions(value);
}

winrt::TwoPaneViewMode SimulateMode ( ) [static]

Definition at line 19 of file DisplayRegionHelperTestApi.cpp.

{
    return DisplayRegionHelper::SimulateMode();
}

void SimulateMode ( winrt::TwoPaneViewMode const & value ) [static]

Definition at line 24 of file DisplayRegionHelperTestApi.cpp.

{
    DisplayRegionHelper::SimulateMode(value);
}

The documentation for this class was generated from the following files:
  • TwoPaneView/DisplayRegionHelperTestApi.h
  • TwoPaneView/DisplayRegionHelperTestApi.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DoubleUtil Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Attributes

DoubleUtil Class Reference

#include "DoubleUtil.h"

List of all members.

Static Public Attributes

static const double NaN = std::numeric_limits<double>::quiet_NaN()

Detailed Description

Definition at line 6 of file DoubleUtil.h.

Member Data Documentation

const double NaN = std::numeric_limits<double>::quiet_NaN() [static]

Definition at line 10 of file DoubleUtil.h.

The documentation for this class was generated from the following files:
  • inc/DoubleUtil.h
  • dll/DoubleUtil.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

DropDownButton Class Reference

#include "DropDownButton.h"

Inherits ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT >.

List of all members.

Public Member Functions

DropDownButton ()
void | CloseFlyout ()
bool | IsFlyoutOpen ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OpenFlyout ()

Private Member Functions

void | OnFlyoutClosed (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnFlyoutOpened (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnFlyoutPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | RegisterFlyoutEvents ()

Detailed Description

Definition at line 11 of file DropDownButton.h.

Constructor & Destructor Documentation

DropDownButton ( )

Definition at line 13 of file DropDownButton.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_DropDownButton);

    SetDefaultStyleKey(this);
}

Member Function Documentation

void CloseFlyout ( )

Definition at line 52 of file DropDownButton.cpp.

{
    if (auto flyout = Flyout())
    {
        flyout.Hide();
    }
}

bool IsFlyoutOpen ( )

Definition at line 39 of file DropDownButton.cpp.

{
    return m_isFlyoutOpen;
};

void OnApplyTemplate ( )

Definition at line 20 of file DropDownButton.cpp.

{
    m_flyoutPropertyChangedRevoker = RegisterPropertyChanged(*this, winrt::Button::FlyoutProperty(), { this, &DropDownButton::OnFlyoutPropertyChanged });

    RegisterFlyoutEvents();
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 77 of file DropDownButton.cpp.

{
    return winrt::make<DropDownButtonAutomationPeer>(*this);
}

void OnFlyoutClosed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 71 of file DropDownButton.cpp.

{
    m_isFlyoutOpen = false;
    SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Expanded, winrt::ExpandCollapseState::Collapsed);
}

void OnFlyoutOpened | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 65 of file DropDownButton.cpp.

{
    m_isFlyoutOpen = true;
    SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Collapsed, winrt::ExpandCollapseState::Expanded);
}

void OnFlyoutPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 60 of file DropDownButton.cpp.

{
    RegisterFlyoutEvents();
}

void OpenFlyout ( )

Definition at line 44 of file DropDownButton.cpp.

{
    if (auto flyout = Flyout())
    {
        flyout.ShowAt(*this);
    }
}

void RegisterFlyoutEvents ( ) [private]

Definition at line 27 of file DropDownButton.cpp.

{
    m_flyoutOpenedRevoker.revoke();
    m_flyoutClosedRevoker.revoke();

    if (Flyout())
    {
        m_flyoutOpenedRevoker = Flyout().Opened(winrt::auto_revoke, { this, &DropDownButton::OnFlyoutOpened });
        m_flyoutClosedRevoker = Flyout().Closed(winrt::auto_revoke, { this, &DropDownButton::OnFlyoutClosed });
    }
}

The documentation for this class was generated from the following files:
  • DropDownButton/DropDownButton.h
  • DropDownButton/DropDownButton.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButtonAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

DropDownButtonAutomationPeer Class Reference

#include "DropDownButtonAutomationPeer.h"

Inherits ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT >.

List of all members.

Public Member Functions

DropDownButtonAutomationPeer (winrt::DropDownButton const &owner)
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
hstring | GetClassNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)

Private Member Functions

com_ptr< DropDownButton > | GetImpl ()

Detailed Description

Definition at line 9 of file DropDownButtonAutomationPeer.h.

Constructor & Destructor Documentation

DropDownButtonAutomationPeer ( winrt::DropDownButton const & owner )

Definition at line 14 of file DropDownButtonAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

void Collapse ( )

Definition at line 71 of file DropDownButtonAutomationPeer.cpp.

{
    if (auto dropDownButton = GetImpl())
    {
        dropDownButton->CloseFlyout();
    }
}

void Expand ( )

Definition at line 63 of file DropDownButtonAutomationPeer.cpp.

{
    if (auto dropDownButton = GetImpl())
    {
        dropDownButton->OpenFlyout();
    }
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 48 of file DropDownButtonAutomationPeer.cpp.

{
    winrt::ExpandCollapseState currentState = winrt::ExpandCollapseState::Collapsed;

    if (auto dropDownButton = GetImpl())
    {
        if (dropDownButton->IsFlyoutOpen())
        {
            currentState = winrt::ExpandCollapseState::Expanded;
        }
    }

    return currentState;
}

hstring GetClassNameCore ( )

Definition at line 30 of file DropDownButtonAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::DropDownButton>();
}

com_ptr< DropDownButton > GetImpl ( ) [private]

Definition at line 35 of file DropDownButtonAutomationPeer.cpp.

{
    com_ptr<DropDownButton> impl;

    if (auto dropDownButton = Owner().try_as<winrt::DropDownButton>())
    {
        impl = winrt::get_self<DropDownButton>(dropDownButton)->get_strong();
    }

    return impl;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 20 of file DropDownButtonAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::ExpandCollapse)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

The documentation for this class was generated from the following files:
  • DropDownButton/DropDownButtonAutomationPeer.h
  • DropDownButton/DropDownButtonAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EasingInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

EasingInfo Struct Reference

#include "SpotLightStateHelper.h"

Detailed Description

Definition at line 46 of file SpotLightStateHelper.h.

The documentation for this struct was generated from the following file:
  • Lights/SpotLightStateHelper.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ElementFactory Class Reference

#include "ElementFactory.h"

List of all members.

Public Member Functions

winrt::UIElement | GetElement (winrt::ElementFactoryGetArgs const &args)
virtual winrt::UIElement | GetElementCore (winrt::ElementFactoryGetArgs const &args)
virtual unsigned long __stdcall | NonDelegatingAddRef ()
virtual int32_t __stdcall | NonDelegatingQueryInterface (const winrt::guid &id, void **object)
virtual unsigned long __stdcall | NonDelegatingRelease ()
void | RecycleElement (winrt::ElementFactoryRecycleArgs const &args)
virtual void | RecycleElementCore (winrt::ElementFactoryRecycleArgs const &args)

Detailed Description

Definition at line 8 of file ElementFactory.h.

Member Function Documentation

winrt::UIElement GetElement ( winrt::ElementFactoryGetArgs const & args )
virtual winrt::UIElement GetElementCore ( winrt::ElementFactoryGetArgs const & args ) [virtual]
virtual unsigned long __stdcall NonDelegatingAddRef ( ) [inline, virtual]

Definition at line 28 of file ElementFactory.h.

    {
        return __super::NonDelegatingAddRef();
    }

virtual int32_t __stdcall NonDelegatingQueryInterface | ( | const winrt::guid & | id,
 |  | void ** | object |
 | ) |  |  | [inline, virtual]

Definition at line 23 of file ElementFactory.h.

    {
        return __super::NonDelegatingQueryInterface(id, object);
    }

virtual unsigned long __stdcall NonDelegatingRelease ( ) [inline, virtual]

Definition at line 33 of file ElementFactory.h.

    {
        return __super::NonDelegatingRelease();
    }

void RecycleElement ( winrt::ElementFactoryRecycleArgs const & args )
virtual void RecycleElementCore ( winrt::ElementFactoryRecycleArgs const & args ) [virtual]
The documentation for this class was generated from the following file:
  • Repeater/ElementFactory.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ElementFactoryGetArgsDownlevel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ElementFactoryGetArgsDownlevel Class Reference

#include "ElementFactoryGetArgsDownlevel.h"

Inherits ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type >.

List of all members.

Public Member Functions

winrt::IInspectable | Data ()
void | Data (winrt::IInspectable const &value)
hstring | GetRuntimeClassName () const
void | Index (int value)
int | Index ()
operator class_type () const noexcept
winrt::UIElement | Parent ()
void | Parent (winrt::UIElement const &value)

Detailed Description

Definition at line 11 of file ElementFactoryGetArgsDownlevel.h.

Member Function Documentation

winrt::IInspectable Data ( )

Definition at line 10 of file ElementFactoryGetArgsDownlevel.cpp.

{
    return m_data.get();
}

void Data ( winrt::IInspectable const & value )

Definition at line 15 of file ElementFactoryGetArgsDownlevel.cpp.

{
    m_data.set(value);
}

hstring GetRuntimeClassName ( ) const [inline]

Definition at line 24 of file ElementFactoryGetArgsDownlevel.h.

    {
        // The type name being in windows namespace is intentional.
        return L"Microsoft.UI.Xaml.ElementFactoryGetArgs";
    }

void Index ( int value )

Definition at line 37 of file ElementFactoryGetArgsDownlevel.cpp.

{
    m_index = value;
}

int Index ( )

Definition at line 32 of file ElementFactoryGetArgsDownlevel.cpp.

{
    return m_index;
}

operator class_type ( ) const [inline]

Definition at line 19 of file ElementFactoryGetArgsDownlevel.h.

    {
        return static_cast<winrt::IInspectable>(*this).as<class_type>();
    }

winrt::UIElement Parent ( )

Definition at line 20 of file ElementFactoryGetArgsDownlevel.cpp.

{
    return m_parent.get();
}

void Parent ( winrt::UIElement const & value )

Definition at line 25 of file ElementFactoryGetArgsDownlevel.cpp.

{
    m_parent.set(value);
}

The documentation for this class was generated from the following files:
  • Repeater/ElementFactoryGetArgsDownlevel.h
  • Repeater/ElementFactoryGetArgsDownlevel.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ElementFactoryRecycleArgsDownlevel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ElementFactoryRecycleArgsDownlevel Class Reference

#include "ElementFactoryRecycleArgsDownlevel.h"

Inherits ReferenceTracker< ElementFactoryRecycleArgsDownlevel, reference_tracker_implements_t< winrt::Microsoft::UI::Xaml::IElementFactoryRecycleArgs >::type >.

List of all members.

Public Member Functions

winrt::UIElement | Element ()
void | Element (winrt::UIElement const &value)
hstring | GetRuntimeClassName () const
operator class_type () const noexcept
winrt::UIElement | Parent ()
void | Parent (winrt::UIElement const &value)

Detailed Description

Definition at line 11 of file ElementFactoryRecycleArgsDownlevel.h.

Member Function Documentation

winrt::UIElement Element ( )

Definition at line 10 of file ElementFactoryRecycleArgsDownlevel.cpp.

{
    return m_element.get();
}

void Element ( winrt::UIElement const & value )

Definition at line 15 of file ElementFactoryRecycleArgsDownlevel.cpp.

{
    m_element.set(value);
}

hstring GetRuntimeClassName ( ) const [inline]

Definition at line 24 of file ElementFactoryRecycleArgsDownlevel.h.

    {
        // The type name being in windows namespace is intentional.
        return L"Microsoft.UI.Xaml.ElementFactoryRecycleArgs";
    }

operator class_type ( ) const [inline]

Definition at line 19 of file ElementFactoryRecycleArgsDownlevel.h.

    {
        return static_cast<winrt::IInspectable>(*this).as<class_type>();
    }

winrt::UIElement Parent ( )

Definition at line 20 of file ElementFactoryRecycleArgsDownlevel.cpp.

{
    return m_parent.get();
}

void Parent ( winrt::UIElement const & value )

Definition at line 25 of file ElementFactoryRecycleArgsDownlevel.cpp.

{
    m_parent.set(value);
}

The documentation for this class was generated from the following files:
  • Repeater/ElementFactoryRecycleArgsDownlevel.h
  • Repeater/ElementFactoryRecycleArgsDownlevel.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ElementInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ElementInfo Struct Reference

#include "Phaser.h"

List of all members.

Public Member Functions

ElementInfo (const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo)
winrt::UIElement Element () const
winrt::com_ptr
< VirtualizationInfo > 		VirtInfo () const

Detailed Description

Definition at line 8 of file Phaser.h.

Constructor & Destructor Documentation

ElementInfo | ( | const winrt::UIElement & | element,
 |  | const winrt::com_ptr< VirtualizationInfo > & | virtInfo
 | ) |  |

Definition at line 13 of file Phaser.cpp.

                                                                                :
    m_element(element),
    m_virtInfo(virtInfo)
{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, virtInfo->Index());
}

Member Function Documentation

winrt::UIElement Element ( ) const [inline]

Definition at line 12 of file Phaser.h.

{ return m_element; }

winrt::com_ptr<VirtualizationInfo> VirtInfo ( ) const [inline]

Definition at line 13 of file Phaser.h.

{ return m_virtInfo; }

The documentation for this struct was generated from the following files:
  • Repeater/Phaser.h
  • Repeater/Phaser.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: enum_array< E, T, N > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

enum_array< E, T, N > Class Template Reference

#include "enum_array.h"

List of all members.

Public Member Functions

T & | operator[] (E e)
const T & | operator[] (E e) const

Detailed Description

template<typename E, class T, std::size_t N>
class enum_array< E, T, N >

Definition at line 5 of file enum_array.h.

Member Function Documentation

T& operator[] ( E e ) [inline]

Definition at line 7 of file enum_array.h.

                        {
        return std::array<T, N>::operator[]((std::size_t)e);
    }

const T& operator[] ( E e ) const [inline]

Definition at line 11 of file enum_array.h.

                                    {
        return std::array<T, N>::operator[]((std::size_t)e);
    }

The documentation for this class was generated from the following file:
  • inc/enum_array.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: enum_vector< E, T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

enum_vector< E, T > Class Template Reference

#include "enum_vector.h"

List of all members.

Public Member Functions

T & | operator[] (E e)
const T & | operator[] (E e) const

Detailed Description

template<typename E, class T>
class enum_vector< E, T >

Definition at line 4 of file enum_vector.h.

Member Function Documentation

T& operator[] ( E e ) [inline]

Definition at line 6 of file enum_vector.h.

                        {
        return std::vector<T, N>::operator[]((std::size_t)e);
    }

const T& operator[] ( E e ) const [inline]

Definition at line 10 of file enum_vector.h.

                                    {
        return std::vector<T, N>::operator[]((std::size_t)e);
    }

The documentation for this class was generated from the following file:
  • inc/enum_vector.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EnumXamlType Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

EnumXamlType Class Reference

#include "XamlType.h"

Inherits XamlTypeBase.

List of all members.

Public Member Functions

EnumXamlType (wstring_view const &typeName, std::function< winrt::IInspectable(hstring)> createFromString)

Detailed Description

Definition at line 79 of file XamlType.h.

Constructor & Destructor Documentation

EnumXamlType | ( | wstring_view const & | typeName,
 |  | std::function< winrt::IInspectable(hstring)> | createFromString
 | ) |  |

Definition at line 221 of file XamlType.cpp.

{
    static winrt::IXamlType baseType = XamlMetadataProvider::LookupXamlType(winrt::name_of<int32_t>());

    m_typeName = typeName;
    m_baseType = baseType;
    m_createFromString = createFromString;
}

The documentation for this class was generated from the following files:
  • dll/XamlType.h
  • dll/XamlType.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: event< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

event< T > Class Template Reference

#include "event.h"

Inherits event_base< event< T >, T, T >, and NonReferenceTrackerStorageHelper< T >.

List of all members.

Detailed Description

template<typename T>
class event< T >

Definition at line 106 of file event.h.

The documentation for this class was generated from the following file:
  • inc/event.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: event_base< ImplT, T, StorageT > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes | Private Member Functions

event_base< ImplT, T, StorageT > Class Template Reference

#include "event.h"

List of all members.

Public Member Functions

event_base (const event_base &)
event_base ()
~event_base ()
winrt::event_token | add (const T &value)
operator bool () const noexcept
template<typename... A>
void | operator() (A const &...args) const
event_base & | operator= (const event_base &)
void | remove (const winrt::event_token token)

Protected Attributes

std::shared_ptr< std::map
< int64_t, StorageT > > 		m_handlers

Private Member Functions

const ImplT * | Impl () const

Detailed Description

template<typename ImplT, typename T, typename StorageT = T>
class event_base< ImplT, T, StorageT >

Definition at line 16 of file event.h.

Constructor & Destructor Documentation

event_base ( const event_base< ImplT, T, StorageT > & )
event_base ( )
~event_base ( ) [inline]

Definition at line 28 of file event.h.

    {
    }

Member Function Documentation

winrt::event_token add ( const T & value ) [inline]

Definition at line 32 of file event.h.

    {
        auto token = InterlockedIncrement64(&s_eventHandlerId);

        // Make a new map because add/remove during event call-out can happen and we want to
        // swap in a new container instead of modifying the one that we're iterating over.
        // This is a tradeoff -- either we copy the map every time during invoke in case add/remove
        // happens or we make a new copy during add/remove. We (and the C++/WinRT implementation
        // we're copied from) choose the latter.
        auto handlers = std::make_shared<std::map<int64_t, StorageT>>();

        if (auto * before = m_handlers.get())
        {
            handlers->insert(before->begin(), before->end());
        }

        auto holder = Impl()->wrap(value);
        handlers->insert({ token, holder });
        m_handlers = std::move(handlers);
        return winrt::event_token{ token };
    }

const ImplT* Impl ( ) const [inline, private]

Definition at line 88 of file event.h.

{ return static_cast<const ImplT*>(this); }

operator bool ( ) const [inline, explicit]

Definition at line 82 of file event.h.

    {
        return static_cast<bool>(m_handlers) && m_handlers.get()->size() > 0;
    }

void operator() ( A const &... args ) const [inline]

Definition at line 68 of file event.h.

    {
        auto handlers = m_handlers;

        if (auto * map = handlers.get())
        {
            for (const auto & pair : *map)
            {
                auto handler = Impl()->unwrap(pair.second);
                handler(args...);
            }
        }
    }

event_base& operator= ( const event_base< ImplT, T, StorageT > & )
void remove ( const winrt::event_token token ) [inline]

Definition at line 54 of file event.h.

    {
        // See comment in add(), we make a copy of the map on add/remove just like the C++/WinRT event implementation.
        auto handlers = std::make_shared<std::map<int64_t, StorageT>>();

        if (auto * before = m_handlers.get())
        {
            handlers->insert(before->begin(), before->end());
        }

        handlers->erase(token.value);
        m_handlers = std::move(handlers);
    }

Member Data Documentation

std::shared_ptr<std::map<int64_t, StorageT> > m_handlers [protected]

Definition at line 19 of file event.h.

The documentation for this class was generated from the following file:
  • inc/event.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: event_source< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

event_source< T > Class Template Reference

#include "event.h"

Inherits event_base< event_source< T >, T, tracker_ref< T > >, ReferenceTrackerContainerBase, and ReferenceTrackerStorageHelper< event_source< T >, T >.

List of all members.

Public Member Functions

event_source (ITrackerHandleManager *owner)

Detailed Description

template<typename T>
class event_source< T >

Definition at line 92 of file event.h.

Constructor & Destructor Documentation

event_source ( ITrackerHandleManager * owner ) [inline]

Definition at line 98 of file event.h.

        : ReferenceTrackerContainerBase{ owner }

The documentation for this class was generated from the following file:
  • inc/event.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

Expander Class Reference

#include "Expander.h"

Inherits ReferenceTracker< Expander, winrt::implementation::ExpanderT >, and ExpanderProperties.

List of all members.

Public Member Functions

Expander ()
~Expander ()
void | OnApplyTemplate ()
virtual winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnExpandDirectionPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsExpandedPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RaiseCollapsedEvent (const winrt::Expander &container)
void | RaiseExpandingEvent (const winrt::Expander &container)

Private Member Functions

void | OnContentSizeChanged (const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args)
void | UpdateExpandDirection (bool useTransitions)
void | UpdateExpandState (bool useTransitions)

Detailed Description

Definition at line 14 of file Expander.h.

Constructor & Destructor Documentation

Expander ( )
~Expander ( ) [inline]

Definition at line 20 of file Expander.h.

{}

Member Function Documentation

void OnApplyTemplate ( )
void OnContentSizeChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]
virtual winrt::AutomationPeer OnCreateAutomationPeer ( ) [virtual]
void OnExpandDirectionPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnIsExpandedPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void RaiseCollapsedEvent ( const winrt::Expander & container )
void RaiseExpandingEvent ( const winrt::Expander & container )
void UpdateExpandDirection ( bool useTransitions ) [private]
void UpdateExpandState ( bool useTransitions ) [private]
The documentation for this class was generated from the following file:
  • Expander/Expander.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ExpanderAutomationPeer Class Reference

#include "ExpanderAutomationPeer.h"

Inherits ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT >.

List of all members.

Public Member Functions

ExpanderAutomationPeer (winrt::Expander const &owner)
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::IVector
< winrt::AutomationPeer > 		GetChildrenCore ()
hstring | GetClassNameCore ()
hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
winrt::AutomationPeer | GetPeerFromPointCore (winrt::Point point)
bool | HasKeyboardFocusCore ()
bool | IsKeyboardFocusableCore ()
void | RaiseExpandCollapseAutomationEvent (winrt::ExpandCollapseState newState)

Private Member Functions

winrt::AutomationPeer | GetExpanderToggleButtonPeer ()
com_ptr< Expander > | GetImpl ()

Detailed Description

Definition at line 9 of file ExpanderAutomationPeer.h.

Constructor & Destructor Documentation

ExpanderAutomationPeer ( winrt::Expander const & owner )

Definition at line 18 of file ExpanderAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

void Collapse ( )

Definition at line 163 of file ExpanderAutomationPeer.cpp.

{
    if (auto const expander = Owner().try_as<winrt::Expander>())
    {
        expander.IsExpanded(false);
        RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Collapsed);
    }
}

void Expand ( )

Definition at line 154 of file ExpanderAutomationPeer.cpp.

{
    if (auto const expander = Owner().try_as<winrt::Expander>())
    {
        expander.IsExpanded(true);
        RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Expanded);
    }
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 141 of file ExpanderAutomationPeer.cpp.

{
    auto state = winrt::ExpandCollapseState::Collapsed;
    if (auto const expander = Owner().try_as<winrt::Expander>())
    {
        state = expander.IsExpanded() ?
            winrt::ExpandCollapseState::Expanded :
            winrt::ExpandCollapseState::Collapsed;
    }

    return state;
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 46 of file ExpanderAutomationPeer.cpp.

{
    // WPF uses "Group" as its control type core
    return winrt::AutomationControlType::Group;
}

winrt::IVector< winrt::AutomationPeer > GetChildrenCore ( )

Definition at line 114 of file ExpanderAutomationPeer.cpp.

{
    auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();
    auto peers = winrt::make<Vector<winrt::AutomationPeer, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>(
                                        static_cast<int>(childrenPeers.Size() - 1) /* capacity */);
    for (auto peer : childrenPeers)
    {
        if (peer.GetAutomationId() != s_ExpanderToggleButtonName)
        {
            peers.Append(peer);
        }
        else
        {
            // If it is ExpanderToggleButton, we want to exclude it but add its children into the peer
            auto expanderToggleButtonChildrenPeers = peer.GetChildrenCore();
            for (auto expanderHeaderPeer : expanderToggleButtonChildrenPeers)
            {
                peers.Append(expanderHeaderPeer);
            }
        }
    }

    return peers;
}

hstring GetClassNameCore ( )

Definition at line 35 of file ExpanderAutomationPeer.cpp.

{
    // WPF uses "Expander" as its class name
    return winrt::hstring_name_of<winrt::Expander>();
}

winrt::AutomationPeer GetExpanderToggleButtonPeer ( ) [private]

Definition at line 52 of file ExpanderAutomationPeer.cpp.

{
    // We are not going to call the overriden one because that one doesn't have the toggle button.
    auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();

    for (auto peer : childrenPeers)
    {
        if (peer.GetAutomationId() == s_ExpanderToggleButtonName)
        {
            return peer;
        }
    }

    return nullptr;
}

com_ptr< Expander > GetImpl ( ) [private]

Definition at line 187 of file ExpanderAutomationPeer.cpp.

{
    com_ptr<Expander> impl = nullptr;

    if (auto expander = Owner().try_as<winrt::Expander>())
    {
        impl = winrt::get_self<Expander>(expander)->get_strong();
    }

    return impl;
}

hstring GetNameCore ( )

Definition at line 41 of file ExpanderAutomationPeer.cpp.

{
    return __super::GetNameCore();
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 25 of file ExpanderAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::ExpandCollapse)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::AutomationPeer GetPeerFromPointCore ( winrt::Point point )

Definition at line 96 of file ExpanderAutomationPeer.cpp.

{
    auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();

    if(auto toggleButtonPeer = GetExpanderToggleButtonPeer())
    {
        auto frameworkElementPeer = toggleButtonPeer.as<winrt::FrameworkElementAutomationPeer>();
        auto toggleButton = frameworkElementPeer.Owner().as<winrt::ToggleButton>();
        toggleButton.Focus(winrt::FocusState::Programmatic);
        return toggleButtonPeer;
    }

    return __super::GetPeerFromPointCore(point);
}

bool HasKeyboardFocusCore ( )

Definition at line 68 of file ExpanderAutomationPeer.cpp.

{
    if(auto toggleButtonPeer = GetExpanderToggleButtonPeer())
    {
        // Since the EventsSource of the toggle button
        // is the same as the expander's, we need to
        // redirect the focus of the expander and base it on the toggle button's.
        return toggleButtonPeer.HasKeyboardFocus();
    }

    // If the toggle button doesn't have the current focus, then
    // the expander's not focused.
    return false;
}

bool IsKeyboardFocusableCore ( )

Definition at line 83 of file ExpanderAutomationPeer.cpp.

{
    if(auto toggleButtonPeer = GetExpanderToggleButtonPeer())
    {
        return toggleButtonPeer.IsKeyboardFocusable();
    }

    return false;
}

void RaiseExpandCollapseAutomationEvent ( winrt::ExpandCollapseState newState )

Definition at line 172 of file ExpanderAutomationPeer.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
    {
        const winrt::ExpandCollapseState oldState = (newState == winrt::ExpandCollapseState::Expanded) ?
            winrt::ExpandCollapseState::Collapsed :
            winrt::ExpandCollapseState::Expanded;

        // if box_value(oldState) doesn't work here, use ReferenceWithABIRuntimeClassName to make Narrator unbox it.
        RaisePropertyChangedEvent(winrt::ExpandCollapsePatternIdentifiers::ExpandCollapseStateProperty(),
            box_value(oldState),
            box_value(newState));
    }
}

The documentation for this class was generated from the following files:
  • Expander/ExpanderAutomationPeer.h
  • Expander/ExpanderAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ExpanderProperties Class Reference

#include "Expander.properties.h"

Inherited by Expander.

List of all members.

Public Member Functions

ExpanderProperties ()
winrt::event_token | Collapsed (winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderCollapsedEventArgs > const &value)
void | Collapsed (winrt::event_token const &token)
void | ExpandDirection (winrt::ExpandDirection const &value)
winrt::ExpandDirection | ExpandDirection ()
winrt::event_token | Expanding (winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderExpandingEventArgs > const &value)
void | Expanding (winrt::event_token const &token)
winrt::IInspectable | Header ()
void | Header (winrt::IInspectable const &value)
void | HeaderTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | HeaderTemplate ()
void | HeaderTemplateSelector (winrt::DataTemplateSelector const &value)
winrt::DataTemplateSelector | HeaderTemplateSelector ()
void | IsExpanded (bool value)
bool | IsExpanded ()
winrt::ExpanderTemplateSettings | TemplateSettings ()
void | TemplateSettings (winrt::ExpanderTemplateSettings const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ExpandDirectionProperty ()
static winrt::DependencyProperty | HeaderProperty ()
static winrt::DependencyProperty | HeaderTemplateProperty ()
static winrt::DependencyProperty | HeaderTemplateSelectorProperty ()
static winrt::DependencyProperty | IsExpandedProperty ()
static void | OnExpandDirectionPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsExpandedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TemplateSettingsProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::Expander,
winrt::ExpanderCollapsedEventArgs > > 		m_collapsedEventSource
event_source
< winrt::TypedEventHandler
< winrt::Expander,
winrt::ExpanderExpandingEventArgs > > 		m_expandingEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ExpandDirectionProperty
static GlobalDependencyProperty | s_HeaderProperty
static GlobalDependencyProperty | s_HeaderTemplateProperty
static GlobalDependencyProperty | s_HeaderTemplateSelectorProperty
static GlobalDependencyProperty | s_IsExpandedProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty

Detailed Description

Definition at line 7 of file Expander.properties.h.

Constructor & Destructor Documentation

ExpanderProperties ( )

Definition at line 23 of file Expander.properties.cpp.

    : m_collapsedEventSource{static_cast<Expander*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
void Collapsed ( winrt::event_token const & token )
winrt::event_token Collapsed ( winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderCollapsedEventArgs > const & value )
static void EnsureProperties ( ) [static]
winrt::ExpandDirection ExpandDirection ( )
void ExpandDirection ( winrt::ExpandDirection const & value )
static winrt::DependencyProperty ExpandDirectionProperty ( ) [inline, static]

Definition at line 30 of file Expander.properties.h.

{ return s_ExpandDirectionProperty; }

winrt::event_token Expanding ( winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderExpandingEventArgs > const & value )
void Expanding ( winrt::event_token const & token )
winrt::IInspectable Header ( )
void Header ( winrt::IInspectable const & value )
static winrt::DependencyProperty HeaderProperty ( ) [inline, static]

Definition at line 31 of file Expander.properties.h.

{ return s_HeaderProperty; }

void HeaderTemplate ( winrt::DataTemplate const & value )
winrt::DataTemplate HeaderTemplate ( )
static winrt::DependencyProperty HeaderTemplateProperty ( ) [inline, static]

Definition at line 32 of file Expander.properties.h.

{ return s_HeaderTemplateProperty; }

winrt::DataTemplateSelector HeaderTemplateSelector ( )
void HeaderTemplateSelector ( winrt::DataTemplateSelector const & value )
static winrt::DependencyProperty HeaderTemplateSelectorProperty ( ) [inline, static]

Definition at line 33 of file Expander.properties.h.

{ return s_HeaderTemplateSelectorProperty; }

void IsExpanded ( bool value )
bool IsExpanded ( )
static winrt::DependencyProperty IsExpandedProperty ( ) [inline, static]

Definition at line 34 of file Expander.properties.h.

{ return s_IsExpandedProperty; }

static void OnExpandDirectionPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsExpandedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::ExpanderTemplateSettings TemplateSettings ( )
void TemplateSettings ( winrt::ExpanderTemplateSettings const & value )
static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 35 of file Expander.properties.h.

{ return s_TemplateSettingsProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderCollapsedEventArgs> > m_collapsedEventSource

Definition at line 49 of file Expander.properties.h.

event_source<winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderExpandingEventArgs> > m_expandingEventSource

Definition at line 50 of file Expander.properties.h.

GlobalDependencyProperty s_ExpandDirectionProperty [static]

Definition at line 37 of file Expander.properties.h.

GlobalDependencyProperty s_HeaderProperty [static]

Definition at line 38 of file Expander.properties.h.

GlobalDependencyProperty s_HeaderTemplateProperty [static]

Definition at line 39 of file Expander.properties.h.

GlobalDependencyProperty s_HeaderTemplateSelectorProperty [static]

Definition at line 40 of file Expander.properties.h.

GlobalDependencyProperty s_IsExpandedProperty [static]

Definition at line 41 of file Expander.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 42 of file Expander.properties.h.

The documentation for this class was generated from the following files:
  • Generated/Expander.properties.h
  • Generated/Expander.properties.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ExpanderTemplateSettings Class Reference

#include "ExpanderTemplateSettings.h"

Inherits ExpanderTemplateSettingsProperties.

List of all members.

Public Member Functions

ExpanderTemplateSettings ()

Detailed Description

Definition at line 9 of file ExpanderTemplateSettings.h.

Constructor & Destructor Documentation

ExpanderTemplateSettings ( )

Definition at line 8 of file ExpanderTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • Expander/ExpanderTemplateSettings.h
  • Expander/ExpanderTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ExpanderTemplateSettingsProperties Class Reference

#include "ExpanderTemplateSettings.properties.h"

Inherited by ExpanderTemplateSettings.

List of all members.

Public Member Functions

ExpanderTemplateSettingsProperties ()
void | ContentHeight (double value)
double | ContentHeight ()
void | NegativeContentHeight (double value)
double | NegativeContentHeight ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ContentHeightProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | NegativeContentHeightProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ContentHeightProperty
static GlobalDependencyProperty | s_NegativeContentHeightProperty

Detailed Description

Definition at line 7 of file ExpanderTemplateSettings.properties.h.

Constructor & Destructor Documentation

ExpanderTemplateSettingsProperties ( )

Definition at line 12 of file ExpanderTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 43 of file ExpanderTemplateSettings.properties.cpp.

{
    s_ContentHeightProperty = nullptr;
    s_NegativeContentHeightProperty = nullptr;
}

void ContentHeight ( double value )

Definition at line 49 of file ExpanderTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ExpanderTemplateSettings*>(this)->SetValue(s_ContentHeightProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ContentHeight ( )

Definition at line 57 of file ExpanderTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ExpanderTemplateSettings*>(this)->GetValue(s_ContentHeightProperty));
}

static winrt::DependencyProperty ContentHeightProperty ( ) [inline, static]

Definition at line 18 of file ExpanderTemplateSettings.properties.h.

{ return s_ContentHeightProperty; }

void EnsureProperties ( ) [static]

Definition at line 17 of file ExpanderTemplateSettings.properties.cpp.

{
    if (!s_ContentHeightProperty)
    {
        s_ContentHeightProperty =
            InitializeDependencyProperty(
                L"ContentHeight",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ExpanderTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_NegativeContentHeightProperty)
    {
        s_NegativeContentHeightProperty =
            InitializeDependencyProperty(
                L"NegativeContentHeight",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ExpanderTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
}

double NegativeContentHeight ( )

Definition at line 70 of file ExpanderTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ExpanderTemplateSettings*>(this)->GetValue(s_NegativeContentHeightProperty));
}

void NegativeContentHeight ( double value )

Definition at line 62 of file ExpanderTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ExpanderTemplateSettings*>(this)->SetValue(s_NegativeContentHeightProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty NegativeContentHeightProperty ( ) [inline, static]

Definition at line 19 of file ExpanderTemplateSettings.properties.h.

{ return s_NegativeContentHeightProperty; }

Member Data Documentation

GlobalDependencyProperty s_ContentHeightProperty [static]

Definition at line 21 of file ExpanderTemplateSettings.properties.h.

GlobalDependencyProperty s_NegativeContentHeightProperty [static]

Definition at line 22 of file ExpanderTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ExpanderTemplateSettings.properties.h
  • Generated/ExpanderTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExtendedSelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ExtendedSelector Class Reference

#include "ExtendedSelector.h"

Inherits SelectorBase.

List of all members.

Public Member Functions

ExtendedSelector ()
~ExtendedSelector ()
void | OnFocusedAction (winrt::IndexPath const &index, bool ctrl, bool shift) override
void | OnInteractedAction (winrt::IndexPath const &index, bool ctrl, bool shift) override

Detailed Description

Definition at line 8 of file ExtendedSelector.h.

Constructor & Destructor Documentation

ExtendedSelector ( )

Definition at line 8 of file ExtendedSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~ExtendedSelector ( )

Definition at line 13 of file ExtendedSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

void OnFocusedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [override, virtual]

Reimplemented from SelectorBase.

Definition at line 55 of file ExtendedSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, ctrl, shift);

    auto selectionModel = GetSelectionModel();

    if (shift && ctrl)
    {
        if (selectionModel.AnchorIndex())
        {
            selectionModel.SelectRangeFromAnchorTo(index);
        }
    }
    else if (shift)
    {
        auto anchorIndex = selectionModel.AnchorIndex();
        if (anchorIndex)
        {
            selectionModel.ClearSelection();
            selectionModel.AnchorIndex(anchorIndex);
            selectionModel.SelectRangeFromAnchorTo(index);
        }
    }
    else if (!ctrl)
    {
        selectionModel.ClearSelection();
        selectionModel.SelectAt(index);
    }
}

void OnInteractedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [override, virtual]

Reimplemented from SelectorBase.

Definition at line 18 of file ExtendedSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, ctrl, shift);

    auto selectionModel = GetSelectionModel();
    if (shift)
    {
        auto anchorIndex = selectionModel.AnchorIndex();
        if (anchorIndex)
        {
            selectionModel.ClearSelection();
            selectionModel.AnchorIndex(anchorIndex);
            selectionModel.SelectRangeFromAnchorTo(index);
        }
    }
    else if (ctrl)
    {
        if (IsSelected(index))
        {
            selectionModel.DeselectAt(index);
        }
        else
        {
            selectionModel.SelectAt(index);
        }
    }
    else
    {
        // Only clear selection if interacting with a different item.
        if (!IsSelected(index))
        {
            selectionModel.ClearSelection();
            selectionModel.SelectAt(index);
        }
    }
}

The documentation for this class was generated from the following files:
  • ItemsView/ExtendedSelector.h
  • ItemsView/ExtendedSelector.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: final Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

final Struct Reference

#include "BuildTreeScheduler.h"

Inherits Awaitable.

List of all members.

Classes

struct | PinnedElementInfo

Public Member Functions

~SelectionNode ()
void | Add (const winrt::UIElement &element, int dataIndex)
void | Add (const winrt::UIElement &element)
int | AnchorIndex ()
void | AnchorIndex (int value)
AsyncWebViewOperations ()
auto | begin () const
int | ChildrenNodeCount ()
void | Clear ()
void | Clear ()
void | ClearElement (const winrt::UIElement &element, bool isClearedDueToCollectionChange)
bool | ClearElement (const winrt::UIElement &element)
void | ClearElementToElementFactory (const winrt::UIElement &element)
void | ClearRealizedRange (int realizedIndex, int count)
void | ClearRealizedRange ()
int | DataCount ()
void | DataSourceChanged (const winrt::IInspectable &source, winrt::NotifyCollectionChangedEventArgs const &args)
DEFINE_TRACELOGGING_EVENT_PARAM1 (MapControl_WebViewNavigationCompleted, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
DEFINE_TRACELOGGING_EVENT_PARAM2 (MapControl_InitializeWebMap, bool, IsStart, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
DEFINE_TRACELOGGING_EVENT_PARAM2 (WebView2_FireNavigationCompleted, uint64_t, ObjectPointer, bool, hasEventHandlers, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
DEFINE_TRACELOGGING_EVENT_PARAM2 (WebView2_CreateCoreObjects, bool, IsStart, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
DEFINE_TRACELOGGING_EVENT_PARAM2 (WebView2_TryCompleteInitialization, bool, IsStart, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
DEFINE_TRACELOGGING_EVENT_PARAM2 (MapControl_WebMessageReceived_Error, uint64_t, ObjectPointer, PCWSTR, Message, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
DEFINE_TRACELOGGING_EVENT_PARAM4 (PublicApiCall, bool, IsStart, uint64_t, ObjectPointer, PCSTR, MethodName, uint32_t, HR, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
DEFINE_TRACELOGGING_EVENT_PARAM4 (PerfXamlEvent, bool, IsStart, uint64_t, ObjectPointer, PCSTR, EventName, bool, IsInteresting, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE))
void | DiscardElementsOutsideWindow (bool forward, int startIndex)
int | DurationInMilliSeconds () const
ElementManager (const ElementManager &that)
ElementManager (const ITrackerHandleManager *owner, bool useLayoutBounds=true)
ElementManager & | ElementManager::operator= (const ElementManager &other)
auto | end () const
void | EnsureElementRealized (bool forward, int dataIndex, const wstring_view &layoutId)
SelectionState EvaluateIsSelectedBasedOnChildrenNodes ()
std::shared_ptr< SelectionNode > | GetAt (int index, bool realizeChild)
winrt::UIElement | GetAt (int realizedIndex)
int | GetDataIndexFromRealizedRangeIndex (int rangeIndex) const
winrt::UIElement | GetElement (int index, bool forceCreate, bool suppressAutoRecycle)
int | GetElementDataIndex (const winrt::UIElement &suggestedAnchor) const
int | GetElementIndex (const winrt::com_ptr< VirtualizationInfo > &virtInfo)
int | GetFirstRealizedDataIndex () const
winrt::Rect | GetLayoutBoundsForDataIndex (int dataIndex) const
winrt::Rect | GetLayoutBoundsForRealizedIndex (int realizedIndex) const
winrt::UIElement | GetRealizedElement (int dataIndex)
int | GetRealizedElementCount () const
int | GetRealizedRangeIndexFromDataIndex (int dataIndex) const
winrt::IndexPath | IndexPath ()
void | Insert (int realizedIndex, int dataIndex, const winrt::UIElement &element)
bool | IsDataIndexRealized (int index) const
bool | IsIndexValidInData (int currentIndex) const
bool | IsSelected (int index)
winrt::IReference< bool > | IsSelectedWithPartial ()
winrt::IReference< bool > | IsSelectedWithPartial (int index)
bool | IsWindowConnected (const winrt::Rect &window, const ScrollOrientation &orientation, bool scrollOrientationSameAsFlow) const
winrt::ItemsSourceView | ItemsSourceView ()
void | OnBeginMeasure (const ScrollOrientation &orientation)
void | OnElementBoundsChanged (const winrt::UIElement &element, winrt::Rect oldBounds, winrt::Rect newBounds)
void | OnElementPrepared (const winrt::UIElement &element)
void | OnItemsSourceChanged (const winrt::IInspectable &source, const winrt::NotifyCollectionChangedEventArgs &args)
void | OnItemsSourceChanged (const winrt::IInspectable &source, const winrt::NotifyCollectionChangedEventArgs &args)
void | OnLayoutChanging ()
void | OnLayoutChanging ()
void | OnOwnerArranged ()
void | OnOwnerArranged ()
void | OnTransitionProviderChanged (const winrt::ItemCollectionTransitionProvider &newTransitionProvider)
void | PhaseElement (const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo)
Phaser (ItemsRepeater *owner)
void | PrunePinnedElements ()
QPCTimer ()
int | RealizedChildrenNodeCount ()
winrt::UIElement | Remove (int index)
void | Reset ()
bool | Select (int index, bool select)
void | SelectAll ()
int | SelectedCount ()
int | SelectedIndex ()
void | SelectedIndex (int value)
std::vector< int > | SelectedIndices ()
SelectionNode (SelectionModel *manager, SelectionNode *parent)
bool | SelectRange (const IndexRange &range, bool select)
void | SetContext (const winrt::VirtualizingLayoutContext &virtualContext)
void | SetLayoutBoundsForDataIndex (int dataIndex, const winrt::Rect &bounds)
void | SetLayoutBoundsForRealizedIndex (int realizedIndex, const winrt::Rect &bounds)
winrt::IInspectable | Source ()
void | Source (const winrt::IInspectable &value)
void | StopPhasing (const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo)
void | StopWaiting ()
bool | ToggleSelect (int index)
TransitionManager (ItemsRepeater *owner)
UniqueIdElementPool (ItemsRepeater *owner)
void | UpdatePin (const winrt::UIElement &element, bool addPin)
ViewManager (ItemsRepeater *owner)

Static Public Member Functions

static winrt::IReference< bool > | ConvertToNullableBool (SelectionState isSelected)
static void | RegisterWork (int priority, const std::function< void()> &workFunc)
static bool | ShouldYield ()

Private Member Functions

void | AddRange (const IndexRange &addRange, bool raiseOnSelectionChanged)
bool | ClearElementToAnimator (const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo)
bool | ClearElementToPinnedPool (const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo, bool isClearedDueToCollectionChange)
bool | ClearElementToUniqueIdResetPool (const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo)
void | ClearSelection ()
void | DiscardElementsOutsideWindow (const winrt::Rect &window, const ScrollOrientation &orientation)
void | DoPhasedWorkCallback ()
void | EnsureEventSubscriptions ()
void | EnsureFirstLastRealizedIndices ()
winrt::Control | FindFocusCandidate (int clearedIndex, winrt::UIElement &focusedChild)
winrt::UIElement | GetElementFromElementFactory (int index)
winrt::UIElement | GetElementFromPinnedElements (int index)
winrt::UIElement | GetElementFromUniqueIdResetPool (int index)
winrt::UIElement | GetElementIfAlreadyHeldByLayout (int index)
void | HookupCollectionChangedHandler ()
IMPLEMENT_TELEMETRY_CLASS (XamlTelemetry, XamlTelemetryLogging)
void | InvalidateRealizedIndicesHeldByLayout ()
bool | IsValidIndex (int index)
bool | IsVirtualizingContext () const
void | MarkCallbackRecieved ()
void | MoveFocusFromClearedIndex (int clearedIndex)
void | OnFocusChanged (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
bool | OnItemsAdded (int index, int count)
void | OnItemsAdded (int index, int count)
void | OnItemsRemoved (int index, int count)
bool | OnItemsRemoved (int index, int count)
void | OnSelectionChanged ()
void | OnSourceListChanged (const winrt::IInspectable &dataSource, const winrt::NotifyCollectionChangedEventArgs &args)
void | OnTransitionProviderTransitionCompleted (const winrt::ItemCollectionTransitionProvider &sender, const winrt::ItemCollectionTransitionCompletedEventArgs &args)
void | RegisterForCallback ()
void | RemoveRange (const IndexRange &removeRange, bool raiseOnSelectionChanged)
bool | Select (int index, bool select, bool raiseOnSelectionChanged)
void | SortElements (const winrt::Rect &visibleWindow)
void | UnhookCollectionChangedHandler ()
void | UpdateElementIndex (const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo, int index)
void | UpdateFocusedElement ()

Static Private Member Functions

static bool | Intersects (const winrt::Rect &lhs, const winrt::Rect &rhs, const ScrollOrientation &orientation)
static void | OnRendering (const winrt::IInspectable &sender, const winrt::IInspectable &args)
static void | QueueTick ()
static void | ValidatePhaseOrdering (int currentPhase, int nextPhase)

Private Attributes

std::vector< std::shared_ptr
< SelectionNode > > 		m_childrenNodes
tracker_ref
< winrt::ItemsSourceView > 		m_dataSource
tracker_ref
< winrt::Microsoft::UI::Xaml::ElementFactoryGetArgs > 		m_ElementFactoryGetArgs
tracker_ref
< winrt::Microsoft::UI::Xaml::ElementFactoryRecycleArgs > 		m_ElementFactoryRecycleArgs
std::map< std::wstring,
tracker_ref< winrt::UIElement > > 		m_elementMap
LARGE_INTEGER | m_frequency
tracker_ref< winrt::UIElement > | m_lastFocusedElement
SelectionModel * m_manager
const ITrackerHandleManager * | m_owner
ItemsRepeater * m_owner
::Phaser | m_phaser
std::vector< PinnedElementInfo > | m_pinnedPool
std::vector< winrt::Rect > | m_realizedElementLayoutBounds
std::vector< tracker_ref
< winrt::UIElement > > 		m_realizedElements
UniqueIdElementPool | m_resetPool
std::vector< IndexRange > | m_selected
std::vector< int > | m_selectedIndicesCached
bool | m_selectedIndicesCacheIsValid = false
tracker_ref< winrt::IInspectable > | m_source
LARGE_INTEGER | m_start
tracker_ref
< winrt::ItemCollectionTransitionProvider > 		m_transitionProvider

Static Private Attributes

static constexpr int | FirstRealizedElementIndexDefault = std::numeric_limits<int>::max()
static constexpr int | LastRealizedElementIndexDefault = std::numeric_limits<int>::min()
static double | m_budgetInMs
static thread_local
std::vector< WorkInfo > 		m_pendingWork
static thread_local
winrt::event_token 		m_renderingToken
static thread_local QPCTimer | m_timer

Detailed Description

Definition at line 22 of file BuildTreeScheduler.h.

Constructor & Destructor Documentation

~SelectionNode ( )

Member Function Documentation

void Add | ( | const winrt::UIElement & | element,
 |  | int | dataIndex
 | ) |  |
void Add ( const winrt::UIElement & element )
void AddRange | ( | const IndexRange & | addRange,
 |  | bool | raiseOnSelectionChanged |
 | ) |  |  | [private]
int AnchorIndex ( )
void AnchorIndex ( int value )
AsyncWebViewOperations ( )
auto begin ( ) const [inline]

Definition at line 17 of file UniqueIdElementPool.h.

{ return m_elementMap.begin(); }

int ChildrenNodeCount ( )
void Clear ( )
void Clear ( )
bool ClearElement ( const winrt::UIElement & element )
void ClearElement | ( | const winrt::UIElement & | element,
 |  | bool | isClearedDueToCollectionChange
 | ) |  |
bool ClearElementToAnimator | ( | const winrt::UIElement & | element,
 |  | const winrt::com_ptr< VirtualizationInfo > & | virtInfo |
 | ) |  |  | [private]
void ClearElementToElementFactory ( const winrt::UIElement & element )
bool ClearElementToPinnedPool | ( | const winrt::UIElement & | element,
 |  | const winrt::com_ptr< VirtualizationInfo > & | virtInfo,
 |  | bool | isClearedDueToCollectionChange |
 | ) |  |  | [private]
bool ClearElementToUniqueIdResetPool | ( | const winrt::UIElement & | element,
 |  | const winrt::com_ptr< VirtualizationInfo > & | virtInfo |
 | ) |  |  | [private]
void ClearRealizedRange | ( | int | realizedIndex,
 |  | int | count
 | ) |  |
void ClearRealizedRange ( )
void ClearSelection ( ) [private]
static winrt::IReference<bool> ConvertToNullableBool ( SelectionState isSelected ) [static]
int DataCount ( )
void DataSourceChanged | ( | const winrt::IInspectable & | source,
 |  | winrt::NotifyCollectionChangedEventArgs const & | args
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM1 | ( | MapControl_WebViewNavigationCompleted | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM2 | ( | MapControl_InitializeWebMap | ,
 |  | bool | ,
 |  | IsStart | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM2 | ( | MapControl_WebMessageReceived_Error | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | PCWSTR | ,
 |  | Message | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM2 | ( | WebView2_TryCompleteInitialization | ,
 |  | bool | ,
 |  | IsStart | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM2 | ( | WebView2_FireNavigationCompleted | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | bool | ,
 |  | hasEventHandlers | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM2 | ( | WebView2_CreateCoreObjects | ,
 |  | bool | ,
 |  | IsStart | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM4 | ( | PerfXamlEvent | ,
 |  | bool | ,
 |  | IsStart | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | PCSTR | ,
 |  | EventName | ,
 |  | bool | ,
 |  | IsInteresting | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
DEFINE_TRACELOGGING_EVENT_PARAM4 | ( | PublicApiCall | ,
 |  | bool | ,
 |  | IsStart | ,
 |  | uint64_t | ,
 |  | ObjectPointer | ,
 |  | PCSTR | ,
 |  | MethodName | ,
 |  | uint32_t | ,
 |  | HR | ,
 |  | TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE) |
 | ) |  |
void DiscardElementsOutsideWindow | ( | const winrt::Rect & | window,
 |  | const ScrollOrientation & | orientation |
 | ) |  |  | [private]
void DiscardElementsOutsideWindow | ( | bool | forward,
 |  | int | startIndex
 | ) |  |
void DoPhasedWorkCallback ( ) [private]
int DurationInMilliSeconds ( ) const
ElementManager | ( | const ITrackerHandleManager * | owner,
 |  | bool | useLayoutBounds = true |
 | ) |  |  | [inline]

Definition at line 14 of file ElementManager.h.

: m_owner(owner), m_useLayoutBounds(useLayoutBounds) { }

ElementManager ( const ElementManager & that )
ElementManager& ElementManager::operator= ( const ElementManager & other )
auto end ( ) const [inline]

Definition at line 18 of file UniqueIdElementPool.h.

{ return m_elementMap.end(); }

void EnsureElementRealized | ( | bool | forward,
 |  | int | dataIndex,
 |  | const wstring_view & | layoutId
 | ) |  |
void EnsureEventSubscriptions ( ) [private]
void EnsureFirstLastRealizedIndices ( ) [private]
SelectionState EvaluateIsSelectedBasedOnChildrenNodes ( )
winrt::Control FindFocusCandidate | ( | int | clearedIndex,
 |  | winrt::UIElement & | focusedChild |
 | ) |  |  | [private]
winrt::UIElement GetAt ( int realizedIndex )
std::shared_ptr<SelectionNode> GetAt | ( | int | index,
 |  | bool | realizeChild
 | ) |  |
int GetDataIndexFromRealizedRangeIndex ( int rangeIndex ) const
winrt::UIElement GetElement | ( | int | index,
 |  | bool | forceCreate,
 |  | bool | suppressAutoRecycle
 | ) |  |
int GetElementDataIndex ( const winrt::UIElement & suggestedAnchor ) const
winrt::UIElement GetElementFromElementFactory ( int index ) [private]
winrt::UIElement GetElementFromPinnedElements ( int index ) [private]
winrt::UIElement GetElementFromUniqueIdResetPool ( int index ) [private]
winrt::UIElement GetElementIfAlreadyHeldByLayout ( int index ) [private]
int GetElementIndex ( const winrt::com_ptr< VirtualizationInfo > & virtInfo )
int GetFirstRealizedDataIndex ( ) const
winrt::Rect GetLayoutBoundsForDataIndex ( int dataIndex ) const
winrt::Rect GetLayoutBoundsForRealizedIndex ( int realizedIndex ) const
winrt::UIElement GetRealizedElement ( int dataIndex )
int GetRealizedElementCount ( ) const
int GetRealizedRangeIndexFromDataIndex ( int dataIndex ) const
void HookupCollectionChangedHandler ( ) [private]
IMPLEMENT_TELEMETRY_CLASS | ( | XamlTelemetry | ,
 |  | XamlTelemetryLogging |  |
 | ) |  |  | [private]
winrt::IndexPath IndexPath ( )
void Insert | ( | int | realizedIndex,
 |  | int | dataIndex,
 |  | const winrt::UIElement & | element
 | ) |  |
static bool Intersects | ( | const winrt::Rect & | lhs,
 |  | const winrt::Rect & | rhs,
 |  | const ScrollOrientation & | orientation |
 | ) |  |  | [static, private]
void InvalidateRealizedIndicesHeldByLayout ( ) [private]
bool IsDataIndexRealized ( int index ) const
bool IsIndexValidInData ( int currentIndex ) const
bool IsSelected ( int index )
winrt::IReference<bool> IsSelectedWithPartial ( )
winrt::IReference<bool> IsSelectedWithPartial ( int index )
bool IsValidIndex ( int index ) [private]
bool IsVirtualizingContext ( ) const [private]
bool IsWindowConnected | ( | const winrt::Rect & | window,
 |  | const ScrollOrientation & | orientation,
 |  | bool | scrollOrientationSameAsFlow |
 | ) |  |  | const
winrt::ItemsSourceView ItemsSourceView ( )
void MarkCallbackRecieved ( ) [private]
void MoveFocusFromClearedIndex ( int clearedIndex ) [private]
void OnBeginMeasure ( const ScrollOrientation & orientation )
void OnElementBoundsChanged | ( | const winrt::UIElement & | element,
 |  | winrt::Rect | oldBounds,
 |  | winrt::Rect | newBounds
 | ) |  |
void OnElementPrepared ( const winrt::UIElement & element )
void OnFocusChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnItemsAdded | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]
bool OnItemsAdded | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]
void OnItemsRemoved | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]
bool OnItemsRemoved | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]
void OnItemsSourceChanged | ( | const winrt::IInspectable & | source,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args
 | ) |  |
void OnItemsSourceChanged | ( | const winrt::IInspectable & | source,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args
 | ) |  |
void OnLayoutChanging ( )
void OnLayoutChanging ( )
void OnOwnerArranged ( )
void OnOwnerArranged ( )
static void OnRendering | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [static, private]
void OnSelectionChanged ( ) [private]
void OnSourceListChanged | ( | const winrt::IInspectable & | dataSource,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args |
 | ) |  |  | [private]
void OnTransitionProviderChanged ( const winrt::ItemCollectionTransitionProvider & newTransitionProvider )
void OnTransitionProviderTransitionCompleted | ( | const winrt::ItemCollectionTransitionProvider & | sender,
 |  | const winrt::ItemCollectionTransitionCompletedEventArgs & | args |
 | ) |  |  | [private]
void PhaseElement | ( | const winrt::UIElement & | element,
 |  | const winrt::com_ptr< VirtualizationInfo > & | virtInfo
 | ) |  |
Phaser ( ItemsRepeater * owner )
void PrunePinnedElements ( )
QPCTimer ( )
static void QueueTick ( ) [static, private]
int RealizedChildrenNodeCount ( )
void RegisterForCallback ( ) [private]
static void RegisterWork | ( | int | priority,
 |  | const std::function< void()> & | workFunc |
 | ) |  |  | [static]
winrt::UIElement Remove ( int index )
void RemoveRange | ( | const IndexRange & | removeRange,
 |  | bool | raiseOnSelectionChanged |
 | ) |  |  | [private]
void Reset ( )
bool Select | ( | int | index,
 |  | bool | select
 | ) |  |
bool Select | ( | int | index,
 |  | bool | select,
 |  | bool | raiseOnSelectionChanged |
 | ) |  |  | [private]
void SelectAll ( )
int SelectedCount ( )
int SelectedIndex ( )
void SelectedIndex ( int value )
std::vector<int> SelectedIndices ( )
SelectionNode | ( | SelectionModel * | manager,
 |  | SelectionNode * | parent
 | ) |  |
bool SelectRange | ( | const IndexRange & | range,
 |  | bool | select
 | ) |  |
void SetContext ( const winrt::VirtualizingLayoutContext & virtualContext )
void SetLayoutBoundsForDataIndex | ( | int | dataIndex,
 |  | const winrt::Rect & | bounds
 | ) |  |
void SetLayoutBoundsForRealizedIndex | ( | int | realizedIndex,
 |  | const winrt::Rect & | bounds
 | ) |  |
static bool ShouldYield ( ) [static]
void SortElements ( const winrt::Rect & visibleWindow ) [private]
void Source ( const winrt::IInspectable & value )
winrt::IInspectable Source ( )
void StopPhasing | ( | const winrt::UIElement & | element,
 |  | const winrt::com_ptr< VirtualizationInfo > & | virtInfo
 | ) |  |
void StopWaiting ( ) [inline]

Definition at line 35 of file WebView2.h.

    {
        // async operation completed, stop all awaits
        CompleteAwaits();
    }

bool ToggleSelect ( int index )
TransitionManager ( ItemsRepeater * owner )
void UnhookCollectionChangedHandler ( ) [private]
UniqueIdElementPool ( ItemsRepeater * owner )
void UpdateElementIndex | ( | const winrt::UIElement & | element,
 |  | const winrt::com_ptr< VirtualizationInfo > & | virtInfo,
 |  | int | index |
 | ) |  |  | [private]
void UpdateFocusedElement ( ) [private]
void UpdatePin | ( | const winrt::UIElement & | element,
 |  | bool | addPin
 | ) |  |
static void ValidatePhaseOrdering | ( | int | currentPhase,
 |  | int | nextPhase |
 | ) |  |  | [static, private]
ViewManager ( ItemsRepeater * owner )

Member Data Documentation

constexpr int FirstRealizedElementIndexDefault = std::numeric_limits<int>::max() [static, private]

Definition at line 106 of file ViewManager.h.

constexpr int LastRealizedElementIndexDefault = std::numeric_limits<int>::min() [static, private]

Definition at line 107 of file ViewManager.h.

double m_budgetInMs [static, private]

Definition at line 32 of file BuildTreeScheduler.h.

std::vector<std::shared_ptr<SelectionNode> > m_childrenNodes [private]

Definition at line 72 of file SelectionNode.h.

tracker_ref<winrt::ItemsSourceView> m_dataSource [private]

Definition at line 80 of file SelectionNode.h.

tracker_ref<winrt::Microsoft::UI::Xaml::ElementFactoryGetArgs> m_ElementFactoryGetArgs [private]

Definition at line 97 of file ViewManager.h.

tracker_ref<winrt::Microsoft::UI::Xaml::ElementFactoryRecycleArgs> m_ElementFactoryRecycleArgs [private]

Definition at line 98 of file ViewManager.h.

std::map<std::wstring, tracker_ref<winrt::UIElement> > m_elementMap [private]

Definition at line 25 of file UniqueIdElementPool.h.

LARGE_INTEGER m_frequency [private]

Definition at line 16 of file QPCTimer.h.

tracker_ref<winrt::UIElement> m_lastFocusedElement [private]

Definition at line 87 of file ViewManager.h.

SelectionModel* m_manager [private]

Definition at line 66 of file SelectionNode.h.

ItemsRepeater* m_owner [private]

Definition at line 26 of file TransitionManager.h.

const ITrackerHandleManager* m_owner [private]

Definition at line 62 of file ElementManager.h.

thread_local std::vector<WorkInfo> m_pendingWork [static, private]

Definition at line 35 of file BuildTreeScheduler.h.

::Phaser m_phaser [private]

Definition at line 88 of file ViewManager.h.

std::vector<PinnedElementInfo> m_pinnedPool [private]

Definition at line 79 of file ViewManager.h.

std::vector<winrt::Rect> m_realizedElementLayoutBounds [private]

Definition at line 66 of file ElementManager.h.

std::vector<tracker_ref<winrt::UIElement> > m_realizedElements [private]

Definition at line 64 of file ElementManager.h.

thread_local winrt::event_token m_renderingToken [static, private]

Definition at line 36 of file BuildTreeScheduler.h.

UniqueIdElementPool m_resetPool [private]

Definition at line 83 of file ViewManager.h.

std::vector<IndexRange> m_selected [private]

Definition at line 74 of file SelectionNode.h.

std::vector<int> m_selectedIndicesCached [private]

Definition at line 81 of file SelectionNode.h.

bool m_selectedIndicesCacheIsValid = false [private]

Definition at line 85 of file SelectionNode.h.

tracker_ref<winrt::IInspectable> m_source [private]

Definition at line 79 of file SelectionNode.h.

LARGE_INTEGER m_start [private]

Definition at line 15 of file QPCTimer.h.

thread_local QPCTimer m_timer [static, private]

Definition at line 34 of file BuildTreeScheduler.h.

tracker_ref<winrt::ItemCollectionTransitionProvider> m_transitionProvider [private]

Definition at line 27 of file TransitionManager.h.

The documentation for this struct was generated from the following files:
  • Repeater/BuildTreeScheduler.h
  • Repeater/ElementManager.h
  • Repeater/QPCTimer.h
  • Repeater/SelectionNode.h
  • Repeater/TransitionManager.h
  • Repeater/UniqueIdElementPool.h
  • Repeater/ViewManager.h
  • Repeater/Phaser.h
  • Telemetry/MuxcTraceLogging.h
  • WebView2/WebView2.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: final::PinnedElementInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • final
  • final::PinnedElementInfo
Public Member Functions | Private Attributes

final::PinnedElementInfo Struct Reference

List of all members.

Public Member Functions

PinnedElementInfo (const ITrackerHandleManager *owner, const winrt::UIElement &element)
winrt::UIElement | PinnedElement () const
winrt::com_ptr
< VirtualizationInfo > 		VirtualizationInfo () const

Private Attributes

tracker_ref< winrt::UIElement > | m_pinnedElement
tracker_com_ref
<::VirtualizationInfo > 		m_virtInfo

Detailed Description

Definition at line 61 of file ViewManager.h.

Constructor & Destructor Documentation

PinnedElementInfo | ( | const ITrackerHandleManager * | owner,
 |  | const winrt::UIElement & | element
 | ) |  |

Member Function Documentation

winrt::UIElement PinnedElement ( ) const [inline]

Definition at line 65 of file ViewManager.h.

{ return m_pinnedElement.get(); }

winrt::com_ptr<VirtualizationInfo> VirtualizationInfo ( ) const [inline]

Definition at line 66 of file ViewManager.h.

{ return m_virtInfo.get(); }

Member Data Documentation

tracker_ref<winrt::UIElement> m_pinnedElement [private]

Definition at line 69 of file ViewManager.h.

tracker_com_ref<::VirtualizationInfo> m_virtInfo [private]

Definition at line 76 of file ViewManager.h.

The documentation for this struct was generated from the following file:
  • Repeater/ViewManager.h
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Flex Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Flick
  • Flex
Classes | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions

Flex Class Reference

Inherits NonVirtualizingLayout.

List of all members.

Classes

class | FlexState
class | LineInfo

Static Public Member Functions

static AlignItems | GetAlignSelf (DependencyObject obj)
static int | GetFlexBasis (DependencyObject obj)
static int | GetFlexGrow (DependencyObject obj)
static int | GetFlexShrink (DependencyObject obj)
static void | SetAlignSelf (DependencyObject obj, AlignItems value)
static void | SetFlexBasis (DependencyObject obj, int value)
static void | SetFlexGrow (DependencyObject obj, int value)
static void | SetFlexShrink (DependencyObject obj, int value)

Static Public Attributes

static readonly DependencyProperty | AlignContentProperty
static readonly DependencyProperty | AlignItemsProperty
static readonly DependencyProperty | AlignSelfProperty
static readonly DependencyProperty | FlexBasisProperty
static readonly DependencyProperty | FlexDirectionProperty
static readonly DependencyProperty | FlexGrowProperty
static readonly DependencyProperty | FlexShrinkProperty
static readonly DependencyProperty | FlexWrapProperty
static readonly DependencyProperty | JustifyContentProperty

Protected Member Functions

override Size | ArrangeOverride (NonVirtualizingLayoutContext context, Size finalSize)
override void | InitializeForContextCore (NonVirtualizingLayoutContext context)
override Size | MeasureOverride (NonVirtualizingLayoutContext context, Size availableSize)
override void | UninitializeForContextCore (NonVirtualizingLayoutContext context)

Properties

AlignContent | AlignContent [get, set]
AlignItems | AlignItems [get, set]
FlexDirection | FlexDirection [get, set]
FlexWrap | FlexWrap [get, set]
JustifyContent | JustifyContent [get, set]

Private Member Functions

double | Cross (Size size)
double | GetContentAlignedCrossOffset (double extraCrossSpaceInExtent, int lineIndex, FlexState state)
double | GetContentJustifiedMainOffset (int countInLine, double extraMainSpace, int itemIndex)
double | GetItemsAlignedCrossOffset (LineInfo line, double itemCrossSize, AlignItems alignment)
void | GrowLineIfNeeded (ref LineInfo currentLine, IReadOnlyList< UIElement > children, Size availableSize, bool isReverse)
double | Main (Size size)
Rect | Rect (double main, double cross, double mainSize, double crossSize)
void | ShrinkLineIfNeeded (ref LineInfo currentLine, IReadOnlyList< UIElement > children, Size availableSize, bool isReverse)
Size | Size (double main, double cross)
FlexState | State (NonVirtualizingLayoutContext context)

Static Private Member Functions

static void | OnPropertyChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)

Detailed Description

Definition at line 23 of file Flex.cs.

Member Function Documentation

override Size ArrangeOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 204 of file Flex.cs.

        {
            var state = State(context);
            bool isReverse = FlexDirection == FlexDirection.RowReverse || FlexDirection == FlexDirection.ColumnReverse;
            int step = isReverse ? -1 : 1;
            int childIndex = isReverse ? context.Children.Count - 1 : 0;
            var layoutItemAlignment = AlignItems;
            double extraCrossSpaceInExtent = Cross(finalSize) - Cross(state.LastExtent);
            for (int lineIndex = 0; lineIndex < state.Lines.Count; lineIndex++)
            {
                var currentLine = state.Lines[lineIndex];
                var mainPosition = 0.0;

                double crossContentOffset = GetContentAlignedCrossOffset(extraCrossSpaceInExtent, lineIndex, state);
                double extraMainSpaceInLine = Main(finalSize) - currentLine.MainSize;

                for (int indexInLine = 0; indexInLine < currentLine.CountInLine; indexInLine++)
                {
                    var currentChild = context.Children[childIndex];
                    var childAlign = GetAlignSelf(currentChild);
                    var itemAlignment = childAlign == AlignItems.Auto ? layoutItemAlignment : childAlign;
                    double itemMainSize = Main(currentChild.DesiredSize);
                    double itemCrossSize = Cross(currentChild.DesiredSize);

                    double mainOffset = mainPosition;
                    if (extraMainSpaceInLine > 0)
                    {
                        mainOffset += GetContentJustifiedMainOffset(currentLine.CountInLine, extraMainSpaceInLine, indexInLine);
                    }

                    double crossOffset = currentLine.CrossPosition + crossContentOffset + GetItemsAlignedCrossOffset(currentLine, itemCrossSize, itemAlignment);

                    if (AlignContent == AlignContent.Stretch)
                    {
                        itemCrossSize = currentLine.CrossSize + extraCrossSpaceInExtent / state.Lines.Count;
                    }
                    else if (itemAlignment == AlignItems.Stretch)
                    {
                        itemCrossSize = currentLine.CrossSize;
                    }

                    currentChild.Arrange(Rect(mainOffset, crossOffset, itemMainSize, itemCrossSize));
                    mainPosition += Main(currentChild.DesiredSize);

                    childIndex += step;
                }
            }

            return finalSize;
        }

double Cross ( Size size ) [inline, private]

Definition at line 435 of file Flex.cs.

        {
            double value = 0.0;
            switch (FlexDirection)
            {
                case FlexDirection.Row:
                case FlexDirection.RowReverse:
                    value = size.Height;
                    break;
                case FlexDirection.Column:
                case FlexDirection.ColumnReverse:
                    value = size.Width;
                    break;
                default:
                    throw new NotImplementedException();
            }

            return value;
        }

static AlignItems GetAlignSelf ( DependencyObject obj ) [inline, static]

Definition at line 74 of file Flex.cs.

        {
            return (AlignItems)obj.GetValue(AlignSelfProperty);
        }

double GetContentAlignedCrossOffset | ( | double | extraCrossSpaceInExtent,
 |  | int | lineIndex,
 |  | FlexState | state |
 | ) |  |  | [inline, private]

Definition at line 311 of file Flex.cs.

        {
            double crossContentOffset = 0;
            if (extraCrossSpaceInExtent > 0)
            {
                switch (AlignContent)
                {
                    case AlignContent.FlexStart:
                        break;
                    case AlignContent.FlexEnd:
                        crossContentOffset = extraCrossSpaceInExtent;
                        break;
                    case AlignContent.Center:
                        crossContentOffset = extraCrossSpaceInExtent / 2;
                        break;
                    case AlignContent.Stretch:
                        crossContentOffset = lineIndex * extraCrossSpaceInExtent / (state.Lines.Count);
                        break;
                    case AlignContent.SpaceBetween:
                        if (state.Lines.Count > 1)
                        {
                            crossContentOffset = lineIndex * (extraCrossSpaceInExtent / (state.Lines.Count - 1));
                        }
                        break;
                    case AlignContent.SpaceAround:
                        crossContentOffset = (lineIndex * 2 + 1) * extraCrossSpaceInExtent / (state.Lines.Count * 2);
                        break;
                }
            }

            return crossContentOffset;
        }

double GetContentJustifiedMainOffset | ( | int | countInLine,
 |  | double | extraMainSpace,
 |  | int | itemIndex |
 | ) |  |  | [inline, private]

Definition at line 368 of file Flex.cs.

        {
            double mainOffset = 0;
            switch (JustifyContent)
            {
                case JustifyContent.FlexStart:
                    break;
                case JustifyContent.FlexEnd:
                    mainOffset = extraMainSpace;
                    break;
                case JustifyContent.Center:
                    mainOffset = extraMainSpace / 2;
                    break;
                case JustifyContent.SpaceBetween:
                    mainOffset = countInLine > 1 ?
                        itemIndex * (extraMainSpace / (countInLine - 1)) :
                        0;
                    break;
                case JustifyContent.SpaceAround:
                    mainOffset = extraMainSpace / (countInLine * 2) + (itemIndex) * (extraMainSpace / countInLine);
                    break;
                case JustifyContent.SpaceEvenly:
                    mainOffset = (itemIndex + 1) * (extraMainSpace / (countInLine + 1));
                    break;

                default:
                    throw new NotImplementedException();
            }

            return mainOffset;
        }

static int GetFlexBasis ( DependencyObject obj ) [inline, static]

Definition at line 116 of file Flex.cs.

        {
            return (int)obj.GetValue(FlexBasisProperty);
        }

static int GetFlexGrow ( DependencyObject obj ) [inline, static]

Definition at line 88 of file Flex.cs.

        {
            return (int)obj.GetValue(FlexGrowProperty);
        }

static int GetFlexShrink ( DependencyObject obj ) [inline, static]

Definition at line 102 of file Flex.cs.

        {
            return (int)obj.GetValue(FlexShrinkProperty);
        }

double GetItemsAlignedCrossOffset | ( | LineInfo | line,
 |  | double | itemCrossSize,
 |  | AlignItems | alignment |
 | ) |  |  | [inline, private]

Definition at line 344 of file Flex.cs.

        {
            double crossOffset = 0.0;
            double extraCrossSpace = line.CrossSize - itemCrossSize;
            switch (alignment)
            {
                case AlignItems.Auto:
                case AlignItems.FlexStart:
                    break;
                case AlignItems.FlexEnd:
                    crossOffset = extraCrossSpace;
                    break;
                case AlignItems.Center:
                    crossOffset = extraCrossSpace / 2;
                    break;
                case AlignItems.Stretch:
                    break;
                default:
                    throw new NotImplementedException();
            }

            return crossOffset;
        }

void GrowLineIfNeeded | ( | ref LineInfo | currentLine,
 |  | IReadOnlyList< UIElement > | children,
 |  | Size | availableSize,
 |  | bool | isReverse |
 | ) |  |  | [inline, private]

Definition at line 255 of file Flex.cs.

        {
            var mainAvailableSize = Main(availableSize);
            if (currentLine.SumGrow > 0 && mainAvailableSize > currentLine.MainSize)
            {
                var extraMainSpaceInLine = mainAvailableSize - currentLine.MainSize;
                // Line eats up all the space.
                currentLine.MainSize = Main(availableSize);
                currentLine.CrossSize = 0.0;
                for (int i = 0; i < currentLine.CountInLine; i++)
                {
                    // grow the item
                    var childIndex = isReverse ? currentLine.StartIndex - i : currentLine.StartIndex + i;
                    var currentChild = children[childIndex];
                    var currentChildFlexGrow = GetFlexGrow(currentChild);
                    // no need to re-measure if we are not going to grow this item.
                    if (currentChildFlexGrow > 0)
                    {
                        var growBy = (extraMainSpaceInLine / currentLine.SumGrow) * currentChildFlexGrow;
                        var basis = GetFlexBasis(currentChild);
                        var measureSize = basis != 0 ? Size(Math.Min(basis + growBy, Main(availableSize)), Cross(availableSize)) : availableSize;
                        currentChild.Measure(measureSize);
                    }
                    currentLine.CrossSize = Math.Max(currentLine.CrossSize, Cross(currentChild.DesiredSize));
                }
            }
        }

override void InitializeForContextCore ( NonVirtualizingLayoutContext context ) [inline, protected]

Definition at line 131 of file Flex.cs.

        {
            context.LayoutState = new FlexState();
        }

double Main ( Size size ) [inline, private]

Definition at line 415 of file Flex.cs.

        {
            double value = 0.0;
            switch (FlexDirection)
            {
                case FlexDirection.Row:
                case FlexDirection.RowReverse:
                    value = size.Width;
                    break;
                case FlexDirection.Column:
                case FlexDirection.ColumnReverse:
                    value = size.Height;
                    break;
                default:
                    throw new NotImplementedException();
            }

            return value;
        }

override Size MeasureOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 147 of file Flex.cs.

        {
            var state = State(context);
            double mainPosition = 0.0;
            double crossPosition = 0.0;
            var children = context.Children;
            bool isReverse = FlexDirection == FlexDirection.RowReverse || FlexDirection == FlexDirection.ColumnReverse;
            state.Lines.Clear();
            var currentLine = new LineInfo();
            currentLine.StartIndex = isReverse ? children.Count - 1 : 0;
            for (int i = 0; i < children.Count; i++)
            {
                var childIndex = isReverse ? children.Count - 1 - i : i;
                var child = children[childIndex];
                var basis = GetFlexBasis(child);
                var measureSize = basis != 0 ? Size(Math.Min(basis, Main(availableSize)), Cross(availableSize)) : availableSize;
                child.Measure(measureSize);

                if (FlexWrap == FlexWrap.Wrap)
                {
                    if (Main(availableSize) - (mainPosition + Main(child.DesiredSize)) < 0)
                    {
                        // wrap since the current item will not fit.
                        currentLine.MainSize = mainPosition;
                        GrowLineIfNeeded(ref currentLine, children, availableSize, isReverse);
                        ShrinkLineIfNeeded(ref currentLine, children, availableSize, isReverse);
                        state.Lines.Add(currentLine);
                        mainPosition = 0.0;
                        crossPosition += currentLine.CrossSize;
                        currentLine = new LineInfo();
                        currentLine.StartIndex = childIndex;
                        currentLine.CrossPosition = crossPosition;
                    }
                }

                // Let's position child at mainPosition, crossPosition
                currentLine.SumGrow += GetFlexGrow(child);
                currentLine.SumShrink += GetFlexShrink(child);
                currentLine.CountInLine++;

                // Now calculate position for next child.
                mainPosition += Main(child.DesiredSize);
                currentLine.CrossSize = Math.Max(currentLine.CrossSize, Cross(child.DesiredSize));
            }

            if (currentLine.CountInLine > 0)
            {
                currentLine.MainSize = mainPosition;
                GrowLineIfNeeded(ref currentLine, children, availableSize, isReverse);
                ShrinkLineIfNeeded(ref currentLine, children, availableSize, isReverse);
                state.Lines.Add(currentLine);
            }

            state.LastExtent = Size(mainPosition, crossPosition + currentLine.CrossSize);
            return state.LastExtent;
        }

static void OnPropertyChanged | ( | DependencyObject | d,
 |  | DependencyPropertyChangedEventArgs | e |
 | ) |  |  | [inline, static, private]

Definition at line 400 of file Flex.cs.

        {
            var layout = (d as Flex);
            if (layout != null)
            {
                layout.InvalidateMeasure();
            }
            else if (d is UIElement)
            {
                (d as UIElement).InvalidateMeasure();
            }
        }

Rect Rect | ( | double | main,
 |  | double | cross,
 |  | double | mainSize,
 |  | double | crossSize |
 | ) |  |  | [inline, private]

Definition at line 470 of file Flex.cs.

        {
            switch (FlexDirection)
            {
                case FlexDirection.Row:
                case FlexDirection.RowReverse:
                    return new Rect(main, cross, mainSize, crossSize);
                case FlexDirection.Column:
                case FlexDirection.ColumnReverse:
                    return new Rect(cross, main, crossSize, mainSize);
                default:
                    throw new NotImplementedException();
            }
        }

static void SetAlignSelf | ( | DependencyObject | obj,
 |  | AlignItems | value |
 | ) |  |  | [inline, static]

Definition at line 79 of file Flex.cs.

        {
            obj.SetValue(AlignSelfProperty, value);
        }

static void SetFlexBasis | ( | DependencyObject | obj,
 |  | int | value |
 | ) |  |  | [inline, static]

Definition at line 121 of file Flex.cs.

        {
            obj.SetValue(FlexBasisProperty, value);
        }

static void SetFlexGrow | ( | DependencyObject | obj,
 |  | int | value |
 | ) |  |  | [inline, static]

Definition at line 93 of file Flex.cs.

        {
            obj.SetValue(FlexGrowProperty, value);
        }

static void SetFlexShrink | ( | DependencyObject | obj,
 |  | int | value |
 | ) |  |  | [inline, static]

Definition at line 107 of file Flex.cs.

        {
            obj.SetValue(FlexShrinkProperty, value);
        }

void ShrinkLineIfNeeded | ( | ref LineInfo | currentLine,
 |  | IReadOnlyList< UIElement > | children,
 |  | Size | availableSize,
 |  | bool | isReverse |
 | ) |  |  | [inline, private]

Definition at line 283 of file Flex.cs.

        {
            var mainAvailableSize = Main(availableSize);
            if (currentLine.SumShrink > 0 && mainAvailableSize < currentLine.MainSize)
            {
                var deficitMainSpaceInLine = currentLine.MainSize - mainAvailableSize;
                // Line eats up all the space.
                currentLine.MainSize = Main(availableSize);
                currentLine.CrossSize = 0.0;
                for (int i = 0; i < currentLine.CountInLine; i++)
                {
                    // grow the item
                    var childIndex = isReverse ? currentLine.StartIndex - i : currentLine.StartIndex + i;
                    var currentChild = children[childIndex];
                    var currentChildFlexShrink = GetFlexShrink(currentChild);
                    // no need to re-measure if we are not going to grow this item.
                    if (currentChildFlexShrink > 0)
                    {
                        var shrinkBy = (deficitMainSpaceInLine / currentLine.SumShrink) * currentChildFlexShrink;
                        var basis = GetFlexBasis(currentChild);
                        var measureSize = basis != 0 ? Size(Math.Min(basis - shrinkBy, Main(availableSize)), Cross(availableSize)) : availableSize;
                        currentChild.Measure(measureSize);
                    }
                    currentLine.CrossSize = Math.Max(currentLine.CrossSize, Cross(currentChild.DesiredSize));
                }
            }
        }

Size Size | ( | double | main,
 |  | double | cross |
 | ) |  |  | [inline, private]

Definition at line 455 of file Flex.cs.

        {
            switch (FlexDirection)
            {
                case FlexDirection.Row:
                case FlexDirection.RowReverse:
                    return new Size(main, cross);
                case FlexDirection.Column:
                case FlexDirection.ColumnReverse:
                    return new Size(cross, main);
                default:
                    throw new NotImplementedException();
            }
        }

FlexState State ( NonVirtualizingLayoutContext context ) [inline, private]

Definition at line 141 of file Flex.cs.

        {
            return context.LayoutState as FlexState;
        }

override void UninitializeForContextCore ( NonVirtualizingLayoutContext context ) [inline, protected]

Definition at line 136 of file Flex.cs.

        {
            context.LayoutState = null;
        }

Member Data Documentation

readonly DependencyProperty AlignContentProperty [static]
Initial value:
            DependencyProperty.Register("AlignContent", typeof(AlignContent), typeof(Flex), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 71 of file Flex.cs.

readonly DependencyProperty AlignItemsProperty [static]
Initial value:
            DependencyProperty.Register("AlignItems", typeof(AlignItems), typeof(Flex), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 62 of file Flex.cs.

readonly DependencyProperty AlignSelfProperty [static]
Initial value:
            DependencyProperty.RegisterAttached("AlignSelf", typeof(AlignItems), typeof(Flex), new PropertyMetadata(0))

Definition at line 84 of file Flex.cs.

readonly DependencyProperty FlexBasisProperty [static]
Initial value:
            DependencyProperty.RegisterAttached("FlexBasis", typeof(int), typeof(Flex), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 126 of file Flex.cs.

readonly DependencyProperty FlexDirectionProperty [static]
Initial value:
            DependencyProperty.Register("FlexDirection", typeof(FlexDirection), typeof(Flex), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 34 of file Flex.cs.

readonly DependencyProperty FlexGrowProperty [static]
Initial value:
            DependencyProperty.RegisterAttached("FlexGrow", typeof(int), typeof(Flex), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 98 of file Flex.cs.

readonly DependencyProperty FlexShrinkProperty [static]
Initial value:
            DependencyProperty.RegisterAttached("FlexShrink", typeof(int), typeof(Flex), new PropertyMetadata(1, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 112 of file Flex.cs.

readonly DependencyProperty FlexWrapProperty [static]
Initial value:
            DependencyProperty.Register("FlexWrap", typeof(FlexWrap), typeof(Flex), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 43 of file Flex.cs.

readonly DependencyProperty JustifyContentProperty [static]
Initial value:
            DependencyProperty.Register("JustifyContent", typeof(JustifyContent), typeof(Flex), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 53 of file Flex.cs.

Property Documentation

AlignContent AlignContent [get, set]

Definition at line 66 of file Flex.cs.

AlignItems AlignItems [get, set]

Definition at line 57 of file Flex.cs.

FlexDirection FlexDirection [get, set]

Definition at line 29 of file Flex.cs.

FlexWrap FlexWrap [get, set]

Definition at line 38 of file Flex.cs.

JustifyContent JustifyContent [get, set]

Definition at line 48 of file Flex.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/Flex.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Flex::FlexState Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Flick
  • Flex
  • Flex::FlexState
Properties

Flex::FlexState Class Reference

List of all members.

Properties

Size | LastExtent = new List<LineInfo>() [get, set]
List< LineInfo > | Lines [get, set]

Detailed Description

Definition at line 503 of file Flex.cs.

Property Documentation

Size LastExtent = new List<LineInfo>() [get, set]

Definition at line 506 of file Flex.cs.

List<LineInfo> Lines [get, set]

Definition at line 505 of file Flex.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/Flex.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Flex::LineInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Flick
  • Flex
  • Flex::LineInfo
Public Member Functions | Properties

Flex::LineInfo Class Reference

List of all members.

Public Member Functions

override string | ToString ()

Properties

int | CountInLine [get, set]
double | CrossPosition [get, set]
double | CrossSize [get, set]
double | MainSize [get, set]
int | StartIndex [get, set]
int | SumGrow [get, set]
int | SumShrink [get, set]

Detailed Description

Definition at line 487 of file Flex.cs.

Member Function Documentation

override string ToString ( ) [inline]

Definition at line 497 of file Flex.cs.

            {
                return $"Offset:{CrossPosition} Count:{CountInLine} Main:{MainSize} Cross:{CrossSize}";
            }

Property Documentation

int CountInLine [get, set]

Definition at line 491 of file Flex.cs.

double CrossPosition [get, set]

Definition at line 489 of file Flex.cs.

double CrossSize [get, set]

Definition at line 493 of file Flex.cs.

double MainSize [get, set]

Definition at line 492 of file Flex.cs.

int StartIndex [get, set]

Definition at line 490 of file Flex.cs.

int SumGrow [get, set]

Definition at line 494 of file Flex.cs.

int SumShrink [get, set]

Definition at line 495 of file Flex.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/Flex.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UniformGrid2DLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Flick
  • UniformGrid2DLayout
Protected Member Functions | Properties | Private Member Functions

UniformGrid2DLayout Class Reference

Inherits VirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

bool | EnlargeFocusedItem [get, set]
double | FocusedItemHeight [get, set]
double | FocusedItemWidth [get, set]
double | ItemHeight [get, set]
double | ItemWidth [get, set]
double | Spacing [get, set]

Private Member Functions

int | Clamp (int index, int count)
int | FirstRealizedRowIndexInRect (Rect realizationRect, int itemCount)
int | FirsttRealizedColumnIndexInRect (Rect realizationRect, int itemCount)
int | GetElementIndex (int row, int col, int count)
int | LastRealizedColumnIndexInRect (Rect realizationRect, int itemCount)
int | LastRealizedRowIndexInRect (Rect realizationRect, int itemCount)

Detailed Description

Definition at line 13 of file UniformGrid2DLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 60 of file UniformGrid2DLayout.cs.

        {

            var realizationRect = context.RealizationRect;
            int itemCount = context.ItemCount;
            var firstRow = FirstRealizedRowIndexInRect(realizationRect, itemCount);
            var firstCol = FirsttRealizedColumnIndexInRect(realizationRect, itemCount);
            var lastRow = LastRealizedRowIndexInRect(realizationRect, itemCount);
            var lastCol = LastRealizedColumnIndexInRect(realizationRect, itemCount);

            Debug.WriteLine("Arrange:" + realizationRect.ToString());

            // Viewport + Buffer Rect.
            for (int rowIndex = firstRow; rowIndex <= lastRow; rowIndex++)
            {
                for (int colIndex = firstCol; colIndex <= lastCol; colIndex++)
                {
                    var realIndex = GetElementIndex(rowIndex, colIndex, context.ItemCount);
                    if (realIndex >= 0 && realIndex < itemCount)
                    {
                        var element = context.GetOrCreateElementAt(realIndex);
                        if (EnlargeFocusedItem && FocusManager.GetFocusedElement(element.XamlRoot) == element)
                        {
                            var widthDiff = FocusedItemWidth - ItemWidth;
                            var heightDiff = FocusedItemHeight - ItemHeight;
                            var arrangeRect = new Rect(colIndex * (ItemWidth + Spacing) - widthDiff / 2, rowIndex * (ItemHeight + Spacing) - heightDiff / 2, FocusedItemWidth, FocusedItemHeight);
                            element.Arrange(arrangeRect);
                            Debug.WriteLine("   Arrange:" + realIndex + " :" + arrangeRect);
                            Canvas.SetZIndex(element, 1);
                        }
                        else
                        {
                            var arrangeRect = new Rect(colIndex * (ItemWidth + Spacing), rowIndex * (ItemHeight + Spacing), ItemWidth, ItemHeight);
                            element.Arrange(arrangeRect);
                            Debug.WriteLine("   Arrange:" + realIndex + " :" + arrangeRect);
                            Canvas.SetZIndex(element, 0);
                        }
                    }
                }
            }

            return finalSize;
        }

int Clamp | ( | int | index,
 |  | int | count |
 | ) |  |  | [inline, private]

Definition at line 132 of file UniformGrid2DLayout.cs.

        {
            return Math.Min(Math.Max(0, index), count - 1);
        }

int FirstRealizedRowIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 112 of file UniformGrid2DLayout.cs.

        {
            return Clamp((int)(realizationRect.Y / (ItemHeight + Spacing)), itemCount);
        }

int FirsttRealizedColumnIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 122 of file UniformGrid2DLayout.cs.

        {
            return Clamp((int)(realizationRect.X / (ItemWidth + Spacing)), itemCount);
        }

int GetElementIndex | ( | int | row,
 |  | int | col,
 |  | int | count |
 | ) |  |  | [inline, private]

Definition at line 106 of file UniformGrid2DLayout.cs.

        {
            int numRowsOrColumns = (int)Math.Sqrt(count);
            return (row * numRowsOrColumns + col);
        }

int LastRealizedColumnIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 127 of file UniformGrid2DLayout.cs.

        {
            return Clamp((int)(realizationRect.Right / (ItemWidth + Spacing)), itemCount);
        }

int LastRealizedRowIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 117 of file UniformGrid2DLayout.cs.

        {
            return Clamp((int)(realizationRect.Bottom / (ItemHeight + Spacing)), itemCount);
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 24 of file UniformGrid2DLayout.cs.

        {
            var realizationRect = context.RealizationRect;
            int itemCount = context.ItemCount;
            var firstRow = FirstRealizedRowIndexInRect(realizationRect, itemCount);
            var firstCol = FirsttRealizedColumnIndexInRect(realizationRect, itemCount);
            var lastRow = LastRealizedRowIndexInRect(realizationRect, itemCount);
            var lastCol = LastRealizedColumnIndexInRect(realizationRect, itemCount);

            Debug.WriteLine("Measure:" + realizationRect.ToString());

            // Viewport + Buffer Rect.
            for (int rowIndex = firstRow; rowIndex <= lastRow; rowIndex++)
            {
                for (int colIndex = firstCol; colIndex <= lastCol; colIndex++)
                {
                    var realIndex = GetElementIndex(rowIndex, colIndex, context.ItemCount);
                    if (realIndex >= 0 && realIndex < itemCount)
                    {
                        var element = context.GetOrCreateElementAt(realIndex);
                        if (EnlargeFocusedItem && FocusManager.GetFocusedElement(element.XamlRoot) == element)
                        {
                            element.Measure(new Size(FocusedItemWidth, FocusedItemHeight));
                        }
                        else
                        {
                            element.Measure(new Size(ItemWidth, ItemHeight));
                        }
                    }
                }
            }

            int numRowsOrColumns = (int)Math.Sqrt(context.ItemCount);
            return new Size(ItemWidth * numRowsOrColumns, ItemHeight * numRowsOrColumns);
        }

Property Documentation

bool EnlargeFocusedItem [get, set]

Definition at line 22 of file UniformGrid2DLayout.cs.

double FocusedItemHeight [get, set]

Definition at line 20 of file UniformGrid2DLayout.cs.

double FocusedItemWidth [get, set]

Definition at line 19 of file UniformGrid2DLayout.cs.

double ItemHeight [get, set]

Definition at line 16 of file UniformGrid2DLayout.cs.

double ItemWidth [get, set]

Definition at line 15 of file UniformGrid2DLayout.cs.

double Spacing [get, set]

Definition at line 17 of file UniformGrid2DLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/UniformGrid2DLayout.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingUniformCarouselStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Flick
  • VirtualizingUniformCarouselStackLayout
Protected Member Functions | Properties | Private Member Functions

VirtualizingUniformCarouselStackLayout Class Reference

Inherits VirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

double | ItemHeight [get, set]
double | ItemWidth [get, set]
bool | Repeat = 500 [get, set]
int | RepeatCount [get, set]
double | Spacing [get, set]

Private Member Functions

int | FirstRealizedIndexInRect (Rect realizationRect, int itemCount)
int | LastRealizedIndexInRect (Rect realizationRect, int itemCount)

Detailed Description

Definition at line 8 of file VirtualizingUniformCarouselStackLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 53 of file VirtualizingUniformCarouselStackLayout.cs.

        {
            var realizationRect = context.RealizationRect;
            int itemCount = context.ItemCount;

            if (realizationRect.Width < itemCount * (ItemWidth + Spacing)) // TODO: Better math
            {
                int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
                int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
                Debug.WriteLine("Arrange:" + realizationRect.ToString());

                // Viewport + Buffer Rect.
                for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
                {
                    var realIndex = Math.Abs(currentIndex % context.ItemCount);
                    var element = context.GetOrCreateElementAt(realIndex);
                    var arrangeRect = new Rect(currentIndex * (ItemWidth + Spacing), 0, ItemWidth, ItemHeight);
                    element.Arrange(arrangeRect);
                    Debug.WriteLine("   Arrange:" + currentIndex + " :" + arrangeRect);
                }
            }
            else
            {
                for (int i = 0; i < itemCount; i++)
                {
                    var element = context.GetOrCreateElementAt(i);
                    var arrangeRect = new Rect(i * (ItemWidth + Spacing), 0, ItemWidth, ItemHeight);
                    element.Arrange(arrangeRect);
                    Debug.WriteLine("   Arrange:" + i + " :" + arrangeRect);
                }
            }

            return finalSize;
        }

int FirstRealizedIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 90 of file VirtualizingUniformCarouselStackLayout.cs.

        {
            return (int)(realizationRect.X / (ItemWidth + Spacing));
        }

int LastRealizedIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 95 of file VirtualizingUniformCarouselStackLayout.cs.

        {
            int index = (int)(realizationRect.Right / (ItemWidth + Spacing));
            return index;
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 20 of file VirtualizingUniformCarouselStackLayout.cs.

        {
            var realizationRect = context.RealizationRect;
            int itemCount = context.ItemCount;

            if (realizationRect.Width == 0 || realizationRect.Width < itemCount * (ItemWidth + Spacing)) // TODO: Better math
            {
                int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
                int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
                Debug.WriteLine("Measure:" + realizationRect.ToString());

                // Viewport + Buffer Rect.
                for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
                {
                    var realIndex = Math.Abs(currentIndex % context.ItemCount);
                    var element = context.GetOrCreateElementAt(realIndex);
                    element.Measure(new Size(ItemWidth, ItemHeight));
                }

                return new Size(((ItemWidth + Spacing) * context.ItemCount * 1000) - Spacing, ItemHeight);
            }
            else
            {
                for(int i=0; i< itemCount; i++)
                {
                    var element = context.GetOrCreateElementAt(i);
                    element.Measure(new Size(ItemWidth, ItemHeight));
                }

                return new Size((ItemWidth + Spacing) * context.ItemCount - Spacing, ItemHeight);
            }
        }

Property Documentation

double ItemHeight [get, set]

Definition at line 11 of file VirtualizingUniformCarouselStackLayout.cs.

double ItemWidth [get, set]

Definition at line 10 of file VirtualizingUniformCarouselStackLayout.cs.

bool Repeat = 500 [get, set]

Definition at line 18 of file VirtualizingUniformCarouselStackLayout.cs.

int RepeatCount [get, set]

Definition at line 16 of file VirtualizingUniformCarouselStackLayout.cs.

double Spacing [get, set]

Definition at line 12 of file VirtualizingUniformCarouselStackLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformCarouselStackLayout.cs
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FloatUtil Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Attributes

FloatUtil Class Reference

#include "FloatUtil.h"

List of all members.

Static Public Attributes

static const float NaN = std::numeric_limits<float>::quiet_NaN()

Detailed Description

Definition at line 6 of file FloatUtil.h.

Member Data Documentation

const float NaN = std::numeric_limits<float>::quiet_NaN() [static]

Definition at line 10 of file FloatUtil.h.

The documentation for this class was generated from the following files:
  • inc/FloatUtil.h
  • dll/FloatUtil.cpp
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

FlowLayout Class Reference

#include "FlowLayout.h"

Inherits ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout >, IFlowLayoutAlgorithmDelegates, OrientationBasedMeasures, and FlowLayoutProperties.

Inherited by FlowLayoutDerived.

List of all members.

Public Member Functions

FlowLayout ()
winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForRealizationRect (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForTargetElement (int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::Rect | Algorithm_GetExtent (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds) override
winrt::Size | Algorithm_GetMeasureSize (int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::Size | Algorithm_GetProvisionalArrangeSize (int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context) override
void | Algorithm_OnElementMeasured (const winrt::UIElement &element, const int index, const winrt::Size &availableSize, const winrt::Size &measureSize, const winrt::Size &desiredSize, const winrt::Size &provisionalArrangeSize, const winrt::VirtualizingLayoutContext &context) override
void | Algorithm_OnLineArranged (int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext &context) override
bool | Algorithm_ShouldBreakLine (int index, double remainingSpace) override
winrt::Size | ArrangeOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize)
winrt::FlowLayoutAnchorInfo | GetAnchorForRealizationRect (winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context)
winrt::FlowLayoutAnchorInfo | GetAnchorForTargetElement (int targetIndex, winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context)
winrt::Rect | GetExtent (winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context, winrt::UIElement const &firstRealized, int firstRealizedItemIndex, winrt::Rect const &firstRealizedLayoutBounds, winrt::UIElement const &lastRealized, int lastRealizedItemIndex, winrt::Rect const &lastRealizedLayoutBounds)
winrt::Size | GetMeasureSize (int index, winrt::Size const &availableSize)
winrt::Size | GetProvisionalArrangeSize (int index, winrt::Size const &measureSize, winrt::Size const &desiredSize)
void | InitializeForContextCore (winrt::VirtualizingLayoutContext const &context)
winrt::Size | MeasureOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize)
void | OnElementMeasured (winrt::UIElement const &element, int index, winrt::Size const &availableSize, winrt::Size const &measureSize, winrt::Size const &desiredSize, winrt::Size const &provisionalArrangeSize, winrt::VirtualizingLayoutContext const &context)
void | OnItemsChangedCore (winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args)
void | OnLineArranged (int startIndex, int countInLine, double lineSize, winrt::VirtualizingLayoutContext const &context)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
bool | ShouldBreakLine (int index, double remainingSpace)
void | UninitializeForContextCore (winrt::VirtualizingLayoutContext const &context)

Private Member Functions

bool | DoesRealizationWindowOverlapExtent (const winrt::Rect &realizationWindow, const winrt::Rect &extent)
winrt::com_ptr< FlowLayoutState > | GetAsFlowState (const winrt::IInspectable &state)
double | GetAverageLineInfo (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::com_ptr< FlowLayoutState > &flowState, double &avgCountInLine)
::FlowLayoutAlgorithm & | GetFlowAlgorithm (const winrt::VirtualizingLayoutContext &context)
void | InvalidateLayout ()
double | LineSpacing ()
double | MinItemSpacing ()
void | UpdateIndexBasedLayoutOrientation (const winrt::Orientation &orientation)

Detailed Description

Definition at line 13 of file FlowLayout.h.

Constructor & Destructor Documentation

FlowLayout ( )

Definition at line 13 of file FlowLayout.cpp.

{
    LayoutId(L"FlowLayout");

    UpdateIndexBasedLayoutOrientation(winrt::Orientation::Horizontal);
}

Member Function Documentation

winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForRealizationRect | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]

Definition at line 318 of file FlowLayout.cpp.

{
    return overridable().GetAnchorForRealizationRect(availableSize, context);
}

winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForTargetElement | ( | int | targetIndex,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]

Definition at line 325 of file FlowLayout.cpp.

{
    return overridable().GetAnchorForTargetElement(targetIndex, availableSize, context);
}

winrt::Rect Algorithm_GetExtent | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | const winrt::UIElement & | firstRealized,
 |  | int | firstRealizedItemIndex,
 |  | const winrt::Rect & | firstRealizedLayoutBounds,
 |  | const winrt::UIElement & | lastRealized,
 |  | int | lastRealizedItemIndex,
 |  | const winrt::Rect & | lastRealizedLayoutBounds |
 | ) |  |  | [override]

Definition at line 333 of file FlowLayout.cpp.

{
    return overridable().GetExtent(
        availableSize,
        context,
        firstRealized,
        firstRealizedItemIndex,
        firstRealizedLayoutBounds,
        lastRealized,
        lastRealizedItemIndex,
        lastRealizedLayoutBounds);
}

winrt::Size Algorithm_GetMeasureSize | ( | int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]

Definition at line 303 of file FlowLayout.cpp.

{
    return overridable().GetMeasureSize(index, availableSize);
}

winrt::Size Algorithm_GetProvisionalArrangeSize | ( | int | index,
 |  | const winrt::Size & | measureSize,
 |  | winrt::Size const & | desiredSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]

Definition at line 308 of file FlowLayout.cpp.

{
    return overridable().GetProvisionalArrangeSize(index, measureSize, desiredSize);
}

void Algorithm_OnElementMeasured | ( | const winrt::UIElement & | element,
 |  | const int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::Size & | measureSize,
 |  | const winrt::Size & | desiredSize,
 |  | const winrt::Size & | provisionalArrangeSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]

Definition at line 354 of file FlowLayout.cpp.

{
    overridable().OnElementMeasured(
        element,
        index,
        availableSize,
        measureSize,
        desiredSize,
        provisionalArrangeSize,
        context);
}

void Algorithm_OnLineArranged | ( | int | startIndex,
 |  | int | countInLine,
 |  | double | lineSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]

Definition at line 373 of file FlowLayout.cpp.

{
    return overridable().OnLineArranged(
        startIndex,
        countInLine,
        lineSize,
        context);
}

bool Algorithm_ShouldBreakLine | ( | int | index,
 |  | double | remainingSpace |
 | ) |  |  | [override]

Definition at line 313 of file FlowLayout.cpp.

{
    return overridable().ShouldBreakLine(index, remainingSpace);
}

winrt::Size ArrangeOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize
 | ) |  |

Definition at line 69 of file FlowLayout.cpp.

{
    auto value = GetFlowAlgorithm(context).Arrange(
        finalSize,
        context,
        true, /* isWrapping */
        static_cast<FlowLayoutAlgorithm::LineAlignment>(m_lineAlignment),
        LayoutId());
    return value;
}

bool DoesRealizationWindowOverlapExtent | ( | const winrt::Rect & | realizationWindow,
 |  | const winrt::Rect & | extent |
 | ) |  |  | [inline, private]

Definition at line 141 of file FlowLayout.h.

    {
        return MajorEnd(realizationWindow) >= MajorStart(extent) && MajorStart(realizationWindow) <= MajorEnd(extent);
    }

winrt::FlowLayoutAnchorInfo GetAnchorForRealizationRect | ( | winrt::Size const & | availableSize,
 |  | winrt::VirtualizingLayoutContext const & | context
 | ) |  |

Definition at line 119 of file FlowLayout.cpp.

{
    int anchorIndex = -1;
    double offset = DoubleUtil::NaN;

    // Constants
    const int itemsCount = context.ItemCount();
    if (itemsCount > 0)
    {
        const auto realizationRect = context.RealizationRect();
        const auto state = context.LayoutState();
        const auto flowState = GetAsFlowState(state);
        const auto lastExtent = flowState->FlowAlgorithm().LastExtent();

        double averageItemsPerLine = 0;
        const double averageLineSize = GetAverageLineInfo(availableSize, context, flowState, averageItemsPerLine) + LineSpacing();
        MUX_ASSERT(averageItemsPerLine != 0);

        const double extentMajorSize = MajorSize(lastExtent) == 0 ? (itemsCount / averageItemsPerLine) * averageLineSize : MajorSize(lastExtent);
        if (itemsCount > 0 &&
            MajorSize(realizationRect) > 0 &&
            DoesRealizationWindowOverlapExtent(realizationRect, MinorMajorRect(MinorStart(lastExtent), MajorStart(lastExtent), Minor(availableSize), static_cast<float>(extentMajorSize))))
        {
            const double realizationWindowStartWithinExtent = static_cast<double>(MajorStart(realizationRect)) - static_cast<double>(MajorStart(lastExtent));
            const int lineIndex = std::max(0, (int)(realizationWindowStartWithinExtent / averageLineSize));
            anchorIndex = (int)(lineIndex * averageItemsPerLine);

            // Clamp it to be within valid range
            anchorIndex = std::max(0, std::min(itemsCount - 1, anchorIndex));
            offset = lineIndex * averageLineSize + MajorStart(lastExtent);
        }
    }

    return { anchorIndex, offset };
}

winrt::FlowLayoutAnchorInfo GetAnchorForTargetElement | ( | int | targetIndex,
 |  | winrt::Size const & | availableSize,
 |  | winrt::VirtualizingLayoutContext const & | context
 | ) |  |

Definition at line 157 of file FlowLayout.cpp.

{
    double offset = DoubleUtil::NaN;
    int index = -1;
    const int itemsCount = context.ItemCount();

    if (targetIndex >= 0 && targetIndex < itemsCount)
    {
        index = targetIndex;
        const auto state = context.LayoutState();
        auto flowState = GetAsFlowState(state);
        double averageItemsPerLine = 0;
        const double averageLineSize = GetAverageLineInfo(availableSize, context, flowState, averageItemsPerLine) + LineSpacing();
        const int lineIndex = (int)(targetIndex / averageItemsPerLine);
        offset = lineIndex * averageLineSize + MajorStart(flowState->FlowAlgorithm().LastExtent());
    }

    return { index, offset };
}

winrt::com_ptr<FlowLayoutState> GetAsFlowState ( const winrt::IInspectable & state ) [inline, private]

Definition at line 126 of file FlowLayout.h.

    {
        return winrt::get_self<FlowLayoutState>(state.as<winrt::FlowLayoutState>())->get_strong();
    }

double GetAverageLineInfo | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | const winrt::com_ptr< FlowLayoutState > & | flowState,
 |  | double & | avgCountInLine |
 | ) |  |  | [private]

Definition at line 420 of file FlowLayout.cpp.

{
    // default to 1 item per line with 0 size
    double avgLineSize = 0;
    avgCountInLine = 1;

    MUX_ASSERT(context.ItemCountCore() > 0);
    if (flowState->TotalLinesMeasured() == 0)
    {
        const auto tmpElement = context.GetOrCreateElementAt(0, winrt::ElementRealizationOptions::ForceCreate | winrt::ElementRealizationOptions::SuppressAutoRecycle);
        const auto desiredSize = flowState->FlowAlgorithm().MeasureElement(tmpElement, 0, availableSize, context);
        context.RecycleElement(tmpElement);

        const int estimatedCountInLine = std::max(1, static_cast<int>(Minor(availableSize) / Minor(desiredSize)));
        flowState->OnLineArranged(0, estimatedCountInLine, Major(desiredSize), context);
        flowState->SpecialElementDesiredSize(desiredSize);
    }

    avgCountInLine = std::max(1.0, flowState->TotalItemsPerLine() / flowState->TotalLinesMeasured());
    avgLineSize = round(flowState->TotalLineSize() / flowState->TotalLinesMeasured());

    return avgLineSize;
}

winrt::Rect GetExtent | ( | winrt::Size const & | availableSize,
 |  | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::UIElement const & | firstRealized,
 |  | int | firstRealizedItemIndex,
 |  | winrt::Rect const & | firstRealizedLayoutBounds,
 |  | winrt::UIElement const & | lastRealized,
 |  | int | lastRealizedItemIndex,
 |  | winrt::Rect const & | lastRealizedLayoutBounds
 | ) |  |

Definition at line 180 of file FlowLayout.cpp.

{
    UNREFERENCED_PARAMETER(lastRealized);

    auto extent = winrt::Rect{};

    const int itemsCount = context.ItemCount();

    if (itemsCount > 0)
    {
        const float availableSizeMinor = Minor(availableSize);
        const auto state = context.LayoutState();
        const auto flowState = GetAsFlowState(state);
        double averageItemsPerLine = 0;
        const double averageLineSize = GetAverageLineInfo(availableSize, context, flowState, averageItemsPerLine) + LineSpacing();

        MUX_ASSERT(averageItemsPerLine != 0);
        if (firstRealized)
        {
            MUX_ASSERT(lastRealized);
            const int linesBeforeFirst = static_cast<int>(firstRealizedItemIndex / averageItemsPerLine);
            const double extentMajorStart = MajorStart(firstRealizedLayoutBounds) - linesBeforeFirst * averageLineSize;
            MajorStart(extent) = static_cast<float>(extentMajorStart);
            const int remainingItems = itemsCount - lastRealizedItemIndex - 1;
            const int remainingLinesAfterLast = static_cast<int>((remainingItems / averageItemsPerLine));
            const double extentMajorSize = static_cast<double>(MajorEnd(lastRealizedLayoutBounds)) - static_cast<double>(MajorStart(extent)) + remainingLinesAfterLast * averageLineSize;
            MajorSize(extent) = static_cast<float>(extentMajorSize);

            // If the available size is infinite, we will have realized all the items in one line.
            // In that case, the extent in the non virtualizing direction should be based on the
            // right/bottom of the last realized element.
            MinorSize(extent) =
                std::isfinite(availableSizeMinor) ?
                availableSizeMinor :
                std::max(0.0f, MinorEnd(lastRealizedLayoutBounds));
        }
        else
        {
            const auto lineSpacing = LineSpacing();
            const auto minItemSpacing = MinItemSpacing();
            // We dont have anything realized. make an educated guess.
            const int numLines = (int)std::ceil(itemsCount / averageItemsPerLine);
            extent =
                std::isfinite(availableSizeMinor) ?
                MinorMajorRect(0, 0, availableSizeMinor, std::max(0.0f, static_cast<float>(numLines * averageLineSize - lineSpacing))) :
                MinorMajorRect(
                    0,
                    0,
                    std::max(0.0f, static_cast<float>((Minor(flowState->SpecialElementDesiredSize()) + minItemSpacing) * itemsCount - minItemSpacing)),
                    std::max(0.0f, static_cast<float>(averageLineSize - lineSpacing)));
            ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
                winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), LayoutId().data(),
                L"Estimating extent with no realized elements.");
        }

#ifdef DBG
        const int indentDbg = winrt::get_self<VirtualizingLayoutContext>(context)->Indent();

        ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_IND_STR_STR_FLT_FLT, METH_NAME, this,
            indentDbg, LayoutId().data(),
            L"Extent:", extent.Width, extent.Height);
        ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_IND_STR_STR_FLT, METH_NAME, this,
            indentDbg, LayoutId().data(),
            L"Based on average line size:", averageLineSize);
        ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_IND_STR_STR_FLT_FLT, METH_NAME, this,
            indentDbg, LayoutId().data(),
            L"Based on average items per line:", averageItemsPerLine);
#endif // DBG
    }
    else
    {
        MUX_ASSERT(firstRealizedItemIndex == -1);
        MUX_ASSERT(lastRealizedItemIndex == -1);

        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_FLT_FLT, METH_NAME, this,
            winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), LayoutId().data(),
            L"ItemCount is 0. Extent:", extent.Width, extent.Height);
    }

    return extent;
}

::FlowLayoutAlgorithm& GetFlowAlgorithm ( const winrt::VirtualizingLayoutContext & context ) [inline, private]

Definition at line 136 of file FlowLayout.h.

    {
        return GetAsFlowState(context.LayoutState())->FlowAlgorithm();
    }

winrt::Size GetMeasureSize | ( | int | index,
 |  | winrt::Size const & | availableSize
 | ) |  |

Definition at line 97 of file FlowLayout.cpp.

{
    return availableSize;
}

winrt::Size GetProvisionalArrangeSize | ( | int | index,
 |  | winrt::Size const & | measureSize,
 |  | winrt::Size const & | desiredSize
 | ) |  |

Definition at line 104 of file FlowLayout.cpp.

{
    return desiredSize;
}

void InitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )

Definition at line 22 of file FlowLayout.cpp.

{
    auto state = context.LayoutState();
    winrt::com_ptr<FlowLayoutState> flowState = nullptr;
    if (state)
    {
        flowState = GetAsFlowState(state);
    }

    if (!flowState)
    {
        if (state)
        {
            throw winrt::hresult_error(E_FAIL, L"LayoutState must derive from FlowLayoutState.");
        }

        // Custom deriving layouts could potentially be stateful.
        // If that is the case, we will just create the base state required by FlowLayout ourselves.
        flowState = winrt::make_self<FlowLayoutState>();
    }

    flowState->InitializeForContext(context, this);
}

void InvalidateLayout ( ) [inline, private]

Definition at line 131 of file FlowLayout.h.

    {
        InvalidateMeasure();
    }

double LineSpacing ( ) [inline, private]

Definition at line 146 of file FlowLayout.h.

    {
        return GetScrollOrientation() == ScrollOrientation::Vertical ? m_minRowSpacing : m_minColumnSpacing;
    }

winrt::Size MeasureOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize
 | ) |  |

Definition at line 52 of file FlowLayout.cpp.

{
    auto desiredSize = GetFlowAlgorithm(context).Measure(
        availableSize,
        context,
        true, /* isWrapping*/
        MinItemSpacing(),
        LineSpacing(),
        std::numeric_limits<unsigned int>::max() /* maxItemsPerLine */,
        OrientationBasedMeasures::GetScrollOrientation(),
        true /* isVirtualizationEnabled */,
        LayoutId());
    return desiredSize;
}

double MinItemSpacing ( ) [inline, private]

Definition at line 151 of file FlowLayout.h.

    {
        return GetScrollOrientation() == ScrollOrientation::Vertical ? m_minColumnSpacing : m_minRowSpacing;
    }

void OnElementMeasured | ( | winrt::UIElement const & | element,
 |  | int | index,
 |  | winrt::Size const & | availableSize,
 |  | winrt::Size const & | measureSize,
 |  | winrt::Size const & | desiredSize,
 |  | winrt::Size const & | provisionalArrangeSize,
 |  | winrt::VirtualizingLayoutContext const & | context
 | ) |  |

Definition at line 270 of file FlowLayout.cpp.

{
}

void OnItemsChangedCore | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::IInspectable const & | source,
 |  | winrt::NotifyCollectionChangedEventArgs const & | args
 | ) |  |

Definition at line 83 of file FlowLayout.cpp.

{
    GetFlowAlgorithm(context).OnItemsSourceChanged(source, args, context);
    // Always invalidate layout to keep the view accurate.
    InvalidateLayout();
}

void OnLineArranged | ( | int | startIndex,
 |  | int | countInLine,
 |  | double | lineSize,
 |  | winrt::VirtualizingLayoutContext const & | context
 | ) |  |

Definition at line 281 of file FlowLayout.cpp.

{
#ifdef DBG
    const int indentDbg = winrt::get_self<VirtualizingLayoutContext>(context)->Indent();

    ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this, indentDbg, LayoutId().data(), L"startIndex", startIndex);
    ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this, indentDbg, LayoutId().data(), L"Count", countInLine);
    ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this, indentDbg, LayoutId().data(), L"LineHeight", lineSize);
#endif

    const auto flowState = GetAsFlowState(context.LayoutState());
    flowState->OnLineArranged(startIndex, countInLine, lineSize, context);
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 388 of file FlowLayout.cpp.

{
    auto property = args.Property();
    if (property == s_OrientationProperty)
    {
        auto orientation = unbox_value<winrt::Orientation>(args.NewValue());

        //Note: For FlowLayout Vertical Orientation means we have a Horizontal ScrollOrientation. Horizontal Orientation means we have a Vertical ScrollOrientation.
        //i.e. the properties are the inverse of each other.
        const auto scrollOrientation = (orientation == winrt::Orientation::Horizontal) ? ScrollOrientation::Vertical : ScrollOrientation::Horizontal;
        OrientationBasedMeasures::SetScrollOrientation(scrollOrientation);

        UpdateIndexBasedLayoutOrientation(orientation);
    }
    else if (property == s_MinColumnSpacingProperty)
    {
        m_minColumnSpacing = unbox_value<double>(args.NewValue());
    }
    else if (property == s_MinRowSpacingProperty)
    {
        m_minRowSpacing = unbox_value<double>(args.NewValue());
    }
    else if (property == s_LineAlignmentProperty)
    {
        m_lineAlignment = unbox_value<winrt::FlowLayoutLineAlignment>(args.NewValue());
    }

    InvalidateLayout();
}

bool ShouldBreakLine | ( | int | index,
 |  | double | remainingSpace
 | ) |  |

Reimplemented in FlowLayoutDerived.

Definition at line 112 of file FlowLayout.cpp.

{
    return remainingSpace < 0;
}

void UninitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )

Definition at line 46 of file FlowLayout.cpp.

{
    auto flowState = GetAsFlowState(context.LayoutState());
    flowState->UninitializeForContext(context);
}

void UpdateIndexBasedLayoutOrientation ( const winrt::Orientation & orientation ) [private]

Definition at line 448 of file FlowLayout.cpp.

{
    SetIndexBasedLayoutOrientation(orientation == winrt::Orientation::Horizontal ?
        winrt::IndexBasedLayoutOrientation::LeftToRight : winrt::IndexBasedLayoutOrientation::TopToBottom);
}

The documentation for this class was generated from the following files:
  • Repeater/FlowLayout.h
  • Repeater/FlowLayout.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutAlgorithm Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

FlowLayoutAlgorithm Class Reference

#include "FlowLayoutAlgorithm.h"

Inherits OrientationBasedMeasures.

List of all members.

Public Types

enum LineAlignment {
Start, Center, End, SpaceAround,
SpaceBetween, SpaceEvenly
}

Public Member Functions

FlowLayoutAlgorithm (const ITrackerHandleManager *owner)
winrt::Size | Arrange (const winrt::Size &finalSize, const winrt::VirtualizingLayoutContext &context, bool isWrapping, FlowLayoutAlgorithm::LineAlignment lineAlignment, const wstring_view &layoutId)
winrt::UIElement | GetElementIfRealized (int dataindex)
void | InitializeForContext (const winrt::VirtualizingLayoutContext &context, IFlowLayoutAlgorithmDelegates *callbacks)
winrt::Rect | LastExtent () const
winrt::Size | Measure (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, bool isWrapping, double minItemSpacing, double lineSpacing, unsigned int maxItemsPerLine, const ScrollOrientation &orientation, const bool isVirtualizationEnabled, const wstring_view &layoutId)
winrt::Size | MeasureElement (const winrt::UIElement &element, int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)
void | OnItemsSourceChanged (const winrt::IInspectable &source, winrt::NotifyCollectionChangedEventArgs const &args, const winrt::IVirtualizingLayoutContext &context)
void | UninitializeForContext (const winrt::VirtualizingLayoutContext &context)

Private Types

enum | GenerateDirection { Forward, Backward }

Private Member Functions

void | ArrangeVirtualizingLayout (const winrt::Size &finalSize, FlowLayoutAlgorithm::LineAlignment lineAlignment, bool isWrapping, const wstring_view &layoutId)
winrt::Rect | EstimateExtent (const winrt::Size &availableSize, const wstring_view &layoutId)
void | Generate (GenerateDirection direction, int anchorIndex, const winrt::Size &availableSize, bool isWrapping, double minItemSpacing, double lineSpacing, unsigned int maxItemsPerLine, const bool isVirtualizationEnabled, const wstring_view &layoutId)
int | GetAnchorIndex (const winrt::Size &availableSize, bool isWrapping, double minItemSpacing, const bool isVirtualizationEnabled, const wstring_view &layoutId)
bool | IsReflowRequired () const
bool | IsVirtualizingContext ()
void | MakeAnchor (const winrt::VirtualizingLayoutContext &context, int index, const winrt::Size &availableSize)
void | PerformLineAlignment (int lineStartIndex, int countInLine, float spaceAtLineStart, float spaceAtLineEnd, float lineSize, FlowLayoutAlgorithm::LineAlignment lineAlignment, bool isWrapping, const winrt::Size &finalSize, const wstring_view &layoutId)
void | RaiseLineArranged ()
winrt::Rect | RealizationRect ()
void | SetLayoutOrigin ()
bool | ShouldContinueFillingUpSpace (int index, GenerateDirection direction)

Private Attributes

tracker_ref
< winrt::VirtualizingLayoutContext > 		m_context
::ElementManager | m_elementManager
const ITrackerHandleManager * | m_owner

Detailed Description

Definition at line 10 of file FlowLayoutAlgorithm.h.

Member Enumeration Documentation

enum GenerateDirection [private]
Enumerator:
Forward
Backward

Definition at line 67 of file FlowLayoutAlgorithm.h.

    {
        Forward,
        Backward
    };

enum LineAlignment
Enumerator:
Start
Center
End
SpaceAround
SpaceBetween
SpaceEvenly

Definition at line 14 of file FlowLayoutAlgorithm.h.

    {
        Start,
        Center,
        End,
        SpaceAround,
        SpaceBetween,
        SpaceEvenly
    };

Constructor & Destructor Documentation

FlowLayoutAlgorithm ( const ITrackerHandleManager * owner ) [inline]

Definition at line 24 of file FlowLayoutAlgorithm.h.

                                                            :
        m_owner(owner),
        m_elementManager(owner),
        m_context(owner)
    { }

Member Function Documentation

winrt::Size Arrange | ( | const winrt::Size & | finalSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | bool | isWrapping,
 |  | FlowLayoutAlgorithm::LineAlignment | lineAlignment,
 |  | const wstring_view & | layoutId
 | ) |  |

Definition at line 98 of file FlowLayoutAlgorithm.cpp.

{
    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
        winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(), L"ArrangeLayout");

    ArrangeVirtualizingLayout(finalSize, lineAlignment, isWrapping, layoutId);

    return winrt::Size
    {
        std::max(finalSize.Width, m_lastExtent.Width),
        std::max(finalSize.Height, m_lastExtent.Height)
    };
}

void ArrangeVirtualizingLayout | ( | const winrt::Size & | finalSize,
 |  | FlowLayoutAlgorithm::LineAlignment | lineAlignment,
 |  | bool | isWrapping,
 |  | const wstring_view & | layoutId |
 | ) |  |  | [private]

Definition at line 625 of file FlowLayoutAlgorithm.cpp.

{
    // Walk through the realized elements one line at a time and
    // align them. Then call element.Arrange with the arranged bounds.
    const int realizedElementCount = m_elementManager.GetRealizedElementCount();
    if (realizedElementCount > 0)
    {
        int countInLine = 1;
        auto previousElementBounds = m_elementManager.GetLayoutBoundsForRealizedIndex(0);
        auto currentLineOffset = MajorStart(previousElementBounds);
        auto spaceAtLineStart = MinorStart(previousElementBounds);
        float spaceAtLineEnd = 0;
        float currentLineSize = MajorSize(previousElementBounds);

        for (int i = 1; i < realizedElementCount; i++)
        {
            const auto currentBounds = m_elementManager.GetLayoutBoundsForRealizedIndex(i);

            if (MajorStart(currentBounds) != currentLineOffset)
            {
                spaceAtLineEnd = Minor(finalSize) - MinorStart(previousElementBounds) - MinorSize(previousElementBounds);
                PerformLineAlignment(i - countInLine, countInLine, spaceAtLineStart, spaceAtLineEnd, currentLineSize, lineAlignment, isWrapping, finalSize, layoutId);
                spaceAtLineStart = MinorStart(currentBounds);
                countInLine = 0;
                currentLineOffset = MajorStart(currentBounds);
                currentLineSize = 0;
            }

            countInLine++; // for current element
            currentLineSize = std::max(currentLineSize, MajorSize(currentBounds));
            previousElementBounds = currentBounds;
        }

        // Last line - potentially have a property to customize
        // aligning the last line or not.
        if (countInLine > 0)
        {
            const float spaceAtEnd = Minor(finalSize) - MinorStart(previousElementBounds) - MinorSize(previousElementBounds);

            PerformLineAlignment(realizedElementCount - countInLine, countInLine, spaceAtLineStart, spaceAtEnd, currentLineSize, lineAlignment, isWrapping, finalSize, layoutId);
        }
    }
}

winrt::Rect EstimateExtent | ( | const winrt::Size & | availableSize,
 |  | const wstring_view & | layoutId |
 | ) |  |  | [private]

Definition at line 547 of file FlowLayoutAlgorithm.cpp.

{
    winrt::UIElement firstRealizedElement = nullptr;
    winrt::Rect firstBounds{};
    winrt::UIElement lastRealizedElement = nullptr;
    winrt::Rect lastBounds{};
    int firstDataIndex = -1;
    int lastDataIndex = -1;

    if (m_elementManager.GetRealizedElementCount() > 0)
    {
        firstRealizedElement = m_elementManager.GetAt(0);
        firstBounds = m_elementManager.GetLayoutBoundsForRealizedIndex(0);
        firstDataIndex = m_elementManager.GetDataIndexFromRealizedRangeIndex(0);

        const int last = m_elementManager.GetRealizedElementCount() - 1;
        lastRealizedElement = m_elementManager.GetAt(last);
        lastDataIndex = m_elementManager.GetDataIndexFromRealizedRangeIndex(last);
        lastBounds = m_elementManager.GetLayoutBoundsForRealizedIndex(last);
    }

    const winrt::Rect extent = m_algorithmCallbacks->Algorithm_GetExtent(
        availableSize,
        m_context.get(),
        firstRealizedElement,
        firstDataIndex,
        firstBounds,
        lastRealizedElement,
        lastDataIndex,
        lastBounds);

    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
        winrt::get_self<VirtualizingLayoutContext>(m_context.get())->Indent(), layoutId.data(),
        L"Extent:", extent.X, extent.Y, extent.Width, extent.Height);

    return extent;
}

void Generate | ( | GenerateDirection | direction,
 |  | int | anchorIndex,
 |  | const winrt::Size & | availableSize,
 |  | bool | isWrapping,
 |  | double | minItemSpacing,
 |  | double | lineSpacing,
 |  | unsigned int | maxItemsPerLine,
 |  | const bool | isVirtualizationEnabled,
 |  | const wstring_view & | layoutId |
 | ) |  |  | [private]

Definition at line 317 of file FlowLayoutAlgorithm.cpp.

{
    if (anchorIndex != -1)
    {
        const int step = (direction == GenerateDirection::Forward) ? 1 : -1;

        ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this,
            winrt::get_self<VirtualizingLayoutContext>(m_context.get())->Indent(), layoutId.data(),
            direction == GenerateDirection::Forward ? L"Generating forward from anchor:" : L"Generating backward from anchor:",
            anchorIndex);

        TraceLoggingProviderWrite(
            XamlTelemetryLogging, "FlowLayoutAlgorithm_Generate",
            TraceLoggingWideString(layoutId.data(), "LayoutId"),
            TraceLoggingWideString(direction == GenerateDirection::Forward ? L"Forward" : L"Backward", "Direction"),
            TraceLoggingInt32(anchorIndex, "Anchor"),
            TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));

        int previousIndex = anchorIndex;
        int currentIndex = anchorIndex + step;
        const auto anchorBounds = m_elementManager.GetLayoutBoundsForDataIndex(anchorIndex);
        float lineOffset = MajorStart(anchorBounds);
        float lineMajorSize = MajorSize(anchorBounds);
        unsigned int countInLine = 1;
        bool lineNeedsReposition = false;

        while (m_elementManager.IsIndexValidInData(currentIndex) &&
              (!isVirtualizationEnabled || ShouldContinueFillingUpSpace(previousIndex, direction)))
        {
            // Ensure layout element.
            m_elementManager.EnsureElementRealized(direction == GenerateDirection::Forward, currentIndex, layoutId);
            const auto currentElement = m_elementManager.GetRealizedElement(currentIndex);
            const auto desiredSize = MeasureElement(currentElement, currentIndex, availableSize, m_context.get());

            // Lay it out.
            const auto previousElement = m_elementManager.GetRealizedElement(previousIndex);
            const winrt::Rect currentBounds = winrt::Rect{ 0, 0, desiredSize.Width, desiredSize.Height };
            const auto previousElementBounds = m_elementManager.GetLayoutBoundsForDataIndex(previousIndex);

            TraceLoggingProviderWrite(
                XamlTelemetryLogging, "FlowLayoutAlgorithm_Generate_CurrentBounds",
                TraceLoggingWideString(layoutId.data(), "LayoutId"),
                TraceLoggingInt32(currentIndex, "CurrentIndex"),
                TraceLoggingFloat32(currentBounds.X, "X"),
                TraceLoggingFloat32(currentBounds.Y, "Y"),
                TraceLoggingFloat32(currentBounds.Width, "Width"),
                TraceLoggingFloat32(currentBounds.Height, "Height"),
                TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));

            if (direction == GenerateDirection::Forward)
            {
                const double remainingSpace = static_cast<double>(Minor(availableSize)) -
                                              (static_cast<double>(MinorStart(previousElementBounds)) +
                                               static_cast<double>(MinorSize(previousElementBounds)) +
                                               minItemSpacing +
                                               static_cast<double>(Minor(desiredSize)));
                if (countInLine >= maxItemsPerLine || m_algorithmCallbacks->Algorithm_ShouldBreakLine(currentIndex, remainingSpace))
                {
                    // No more space in this row. wrap to next row.
                    MinorStart(currentBounds) = 0;
                    MajorStart(currentBounds) = MajorStart(previousElementBounds) + lineMajorSize + static_cast<float>(lineSpacing);

                    if (lineNeedsReposition)
                    {
                        // reposition the previous line (countInLine items)
                        for (unsigned int i = 0; i < countInLine; i++)
                        {
                            const auto dataIndex = currentIndex - 1 - i;
                            const auto bounds = m_elementManager.GetLayoutBoundsForDataIndex(dataIndex);
                            MajorSize(bounds) = lineMajorSize;
                            m_elementManager.SetLayoutBoundsForDataIndex(dataIndex, bounds);
                        }
                    }

                    // Setup for next line.
                    lineMajorSize = MajorSize(currentBounds);
                    lineOffset = MajorStart(currentBounds);
                    lineNeedsReposition = false;
                    countInLine = 1;
                }
                else
                {
                    // More space is available in this row.
                    MinorStart(currentBounds) = MinorStart(previousElementBounds) + MinorSize(previousElementBounds) + static_cast<float>(minItemSpacing);
                    MajorStart(currentBounds) = lineOffset;
                    lineMajorSize = std::max(lineMajorSize, MajorSize(currentBounds));
                    lineNeedsReposition = MajorSize(previousElementBounds) != MajorSize(currentBounds);
                    countInLine++;
                }
            }
            else
            {
                // Backward
                const double remainingSpace = MinorStart(previousElementBounds) - (Minor(desiredSize) + minItemSpacing);
                if (countInLine >= maxItemsPerLine || m_algorithmCallbacks->Algorithm_ShouldBreakLine(currentIndex, remainingSpace))
                {
                    if (isWrapping)
                    {
                        // Does not fit, wrap to the previous row
                        const auto availableSizeMinor = Minor(availableSize);
                        // If the last available size is finite, start from end and subtract our desired size.
                        // Otherwise, look at the last extent and use that for positioning.
                        MinorStart(currentBounds) = std::isfinite(availableSizeMinor) ? availableSizeMinor - Minor(desiredSize) : MinorSize(LastExtent()) - Minor(desiredSize);
                    }
                    // else keep MinorStart(currentBounds) at 0. Same as for GenerateDirection::Forward.

                    MajorStart(currentBounds) = lineOffset - Major(desiredSize) - static_cast<float>(lineSpacing);

                    if (lineNeedsReposition)
                    {
                        auto previousLineOffset = MajorStart(m_elementManager.GetLayoutBoundsForDataIndex(currentIndex + countInLine + 1));
                        // reposition the previous line (countInLine items)
                        for (unsigned int i = 0; i < countInLine; i++)
                        {
                            const auto dataIndex = currentIndex + 1 + (int)i;
                            if (dataIndex != anchorIndex)
                            {
                                const auto bounds = m_elementManager.GetLayoutBoundsForDataIndex(dataIndex);
                                MajorStart(bounds) = previousLineOffset - lineMajorSize - static_cast<float>(lineSpacing);
                                MajorSize(bounds) = lineMajorSize;
                                m_elementManager.SetLayoutBoundsForDataIndex(dataIndex, bounds);

                                ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT, METH_NAME, this,
                                    winrt::get_self<VirtualizingLayoutContext>(m_context.get())->Indent(), layoutId.data(),
                                    L"Element dataIndex & corrected layout bounds:", dataIndex, bounds.X, bounds.Y, bounds.Width, bounds.Height);
                            }
                        }
                    }

                    // Setup for next line.
                    lineMajorSize = MajorSize(currentBounds);
                    lineOffset = MajorStart(currentBounds);
                    lineNeedsReposition = false;
                    countInLine = 1;
                }
                else
                {
                    // Fits in this row. put it in the previous position
                    MinorStart(currentBounds) = MinorStart(previousElementBounds) - Minor(desiredSize) - static_cast<float>(minItemSpacing);
                    MajorStart(currentBounds) = lineOffset;
                    lineMajorSize = std::max(lineMajorSize, MajorSize(currentBounds));
                    lineNeedsReposition = MajorSize(previousElementBounds) != MajorSize(currentBounds);
                    countInLine++;
                }
            }

            m_elementManager.SetLayoutBoundsForDataIndex(currentIndex, currentBounds);

            ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT, METH_NAME, this,
                winrt::get_self<VirtualizingLayoutContext>(m_context.get())->Indent(), layoutId.data(),
                L"Element dataIndex & Layout bounds:", currentIndex, currentBounds.X, currentBounds.Y, currentBounds.Width, currentBounds.Height);

            previousIndex = currentIndex;
            currentIndex += step;
        }

        const int dataCount = m_context.get().ItemCount();

        // If we did not reach the top or bottom of the extent, we realized one
        // extra item before we knew we were outside the realization window. Do not
        // account for that element in the indices inside the realization window.
        if (direction == GenerateDirection::Forward)
        {
            m_lastRealizedDataIndexInsideRealizationWindow = previousIndex == dataCount - 1 ? dataCount - 1 : previousIndex - 1;
            m_lastRealizedDataIndexInsideRealizationWindow = std::max(0, m_lastRealizedDataIndexInsideRealizationWindow);
        }
        else
        {
            m_firstRealizedDataIndexInsideRealizationWindow = previousIndex == 0 ? 0 : previousIndex + 1;
            m_firstRealizedDataIndexInsideRealizationWindow = std::min(dataCount - 1, m_firstRealizedDataIndexInsideRealizationWindow);
        }

        m_elementManager.DiscardElementsOutsideWindow(direction == GenerateDirection::Forward, currentIndex);
    }
}

int GetAnchorIndex | ( | const winrt::Size & | availableSize,
 |  | bool | isWrapping,
 |  | double | minItemSpacing,
 |  | const bool | isVirtualizationEnabled,
 |  | const wstring_view & | layoutId |
 | ) |  |  | [private]

Definition at line 163 of file FlowLayoutAlgorithm.cpp.

{
    int anchorIndex = -1;
    winrt::Point anchorPosition{};
    auto context = m_context.get();

    if (!IsVirtualizingContext() || !isVirtualizationEnabled)
    {
        // Non virtualizing host, start generating from the element 0
        anchorIndex = context.ItemCountCore() > 0 ? 0 : -1;
    }
    else
    {
        const bool isRealizationWindowConnected = m_elementManager.IsWindowConnected(RealizationRect(), GetScrollOrientation(), m_scrollOrientationSameAsFlow);
        // Item spacing and size in non-virtualizing direction change can cause elements to reflow
        // and get a new column position. In that case we need the anchor to be positioned in the
        // correct column.
        const bool needAnchorColumnReevaluation = isWrapping && (
            Minor(m_lastAvailableSize) != Minor(availableSize) ||
            m_lastItemSpacing != minItemSpacing ||
            m_collectionChangePending);

        const auto suggestedAnchorIndex = m_context.get().RecommendedAnchorIndex();

        const bool isAnchorSuggestionValid = suggestedAnchorIndex >= 0 &&
            m_elementManager.IsDataIndexRealized(suggestedAnchorIndex);

        if (isAnchorSuggestionValid)
        {
            ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this,
                winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(),
                L"Using suggested anchor:", suggestedAnchorIndex);

            anchorIndex = m_algorithmCallbacks->Algorithm_GetAnchorForTargetElement(
                suggestedAnchorIndex,
                availableSize,
                context).Index;

            if (m_elementManager.IsDataIndexRealized(anchorIndex))
            {
                const auto anchorBounds = m_elementManager.GetLayoutBoundsForDataIndex(anchorIndex);
                if (needAnchorColumnReevaluation)
                {
                    // We were provided a valid anchor, but its position might be incorrect because for example it is in
                    // the wrong column. We do know that the anchor is the first element in the row, so we can force the minor position
                    // to start at 0.
                    anchorPosition = MinorMajorPoint(0, MajorStart(anchorBounds));
                }
                else
                {
                    anchorPosition = winrt::Point(anchorBounds.X, anchorBounds.Y);
                }
            }
            else
            {
                // It is possible to end up in a situation during a collection change where GetAnchorForTargetElement returns an index
                // which is not in the realized range. Eg. insert one item at index 0 for a grid layout.
                // SuggestedAnchor will be 1 (used to be 0) and GetAnchorForTargetElement will return 0 (left most item in row). However 0 is not in the
                // realized range yet. In this case we realize the gap between the target anchor and the suggested anchor.
                const int firstRealizedDataIndex = m_elementManager.GetDataIndexFromRealizedRangeIndex(0);
                MUX_ASSERT(anchorIndex < firstRealizedDataIndex);
                for (int i = firstRealizedDataIndex - 1; i >= anchorIndex; --i)
                {
                    m_elementManager.EnsureElementRealized(false /*forward*/, i, layoutId);
                }

                const auto anchorBounds = m_elementManager.GetLayoutBoundsForDataIndex(suggestedAnchorIndex);
                anchorPosition = MinorMajorPoint(0, MajorStart(anchorBounds));
            }
        }
        else if (needAnchorColumnReevaluation || !isRealizationWindowConnected)
        {
            if (needAnchorColumnReevaluation)
            {
                ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
                    winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(), L"NeedAnchorColumnReevaluation.");
            }

            if (!isRealizationWindowConnected)
            {
                ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
                    winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(), L"Disconnected Window.");
            }

            // The anchor is based on the realization window because a connected ItemsRepeater might intersect the realization window
            // but not the visible window. In that situation, we still need to produce a valid anchor.
            const auto anchorInfo = m_algorithmCallbacks->Algorithm_GetAnchorForRealizationRect(availableSize, context);
            anchorIndex = anchorInfo.Index;
            anchorPosition = MinorMajorPoint(0, static_cast<float>(anchorInfo.Offset));
        }
        else
        {
            ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
                winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(),
                L"Connected Window - picking first realized element as anchor.");

            // No suggestion - just pick first in realized range
            anchorIndex = m_elementManager.GetDataIndexFromRealizedRangeIndex(0);
            anchorPosition = MinorMajorPoint(0, MajorStart(m_elementManager.GetLayoutBoundsForRealizedIndex(0)));
        }
    }

    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this,
        winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(),
        L"Picked anchor:", anchorIndex);

    MUX_ASSERT(anchorIndex == -1 || m_elementManager.IsIndexValidInData(anchorIndex));
    m_firstRealizedDataIndexInsideRealizationWindow = m_lastRealizedDataIndexInsideRealizationWindow = anchorIndex;
    if (m_elementManager.IsIndexValidInData(anchorIndex))
    {
        if (!m_elementManager.IsDataIndexRealized(anchorIndex))
        {
            // Disconnected, throw everything and create new anchor
            ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
                winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(),
                L"Disconnected Window - throwing away all realized elements.");

            m_elementManager.ClearRealizedRange();

            auto anchor = m_context.get().GetOrCreateElementAt(anchorIndex, winrt::ElementRealizationOptions::ForceCreate | winrt::ElementRealizationOptions::SuppressAutoRecycle);
            m_elementManager.Add(anchor, anchorIndex);
        }

        const auto anchorElement = m_elementManager.GetRealizedElement(anchorIndex);
        const auto desiredSize = MeasureElement(anchorElement, anchorIndex, availableSize, m_context.get());
        const auto layoutBounds = winrt::Rect{ anchorPosition.X, anchorPosition.Y, desiredSize.Width, desiredSize.Height };
        m_elementManager.SetLayoutBoundsForDataIndex(anchorIndex, layoutBounds);

        ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT, METH_NAME, this,
            winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(),
            L"Anchor index & Layout bounds:", anchorIndex, layoutBounds.X, layoutBounds.Y, layoutBounds.Width, layoutBounds.Height);
    }
    else
    {
        // Throw everything away
        ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
            winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(),
            L"Anchor index is not valid - throwing away all realized elements.");
        m_elementManager.ClearRealizedRange();
    }

    // TODO: Perhaps we can track changes in the property setter
    m_lastAvailableSize = availableSize;
    m_lastItemSpacing = minItemSpacing;

    return anchorIndex;
}

winrt::UIElement GetElementIfRealized ( int dataindex )

Definition at line 790 of file FlowLayoutAlgorithm.cpp.

{
    if (m_elementManager.IsDataIndexRealized(dataIndex))
    {
        return m_elementManager.GetRealizedElement(dataIndex);
    }

    return  nullptr;
}

void InitializeForContext | ( | const winrt::VirtualizingLayoutContext & | context,
 |  | IFlowLayoutAlgorithmDelegates * | callbacks
 | ) |  |

Definition at line 11 of file FlowLayoutAlgorithm.cpp.

{
    m_algorithmCallbacks = callbacks;
    m_context.set(context);
    m_elementManager.SetContext(context);
}

bool IsReflowRequired ( ) const [private]

Definition at line 502 of file FlowLayoutAlgorithm.cpp.

{
    // If first element is realized and is not at the very beginning we need to reflow.
    return
        m_elementManager.GetRealizedElementCount() > 0 &&
        m_elementManager.GetDataIndexFromRealizedRangeIndex(0) == 0 &&
        (GetScrollOrientation() == ScrollOrientation::Vertical ?
        m_elementManager.GetLayoutBoundsForRealizedIndex(0).X != 0 :
        m_elementManager.GetLayoutBoundsForRealizedIndex(0).Y != 0);
}

bool IsVirtualizingContext ( ) [private]

Definition at line 801 of file FlowLayoutAlgorithm.cpp.

{
    if (m_context)
    {
        const auto rect = m_context.get().RealizationRect();
        const bool hasInfiniteSize = (rect.Height == std::numeric_limits<float>::infinity() || rect.Width == std::numeric_limits<float>::infinity());
        return !hasInfiniteSize;
    }
    return false;
}

winrt::Rect LastExtent ( ) const [inline]

Definition at line 31 of file FlowLayoutAlgorithm.h.

{ return m_lastExtent; }

void MakeAnchor | ( | const winrt::VirtualizingLayoutContext & | context,
 |  | int | index,
 |  | const winrt::Size & | availableSize |
 | ) |  |  | [private]

Definition at line 117 of file FlowLayoutAlgorithm.cpp.

{
    m_elementManager.ClearRealizedRange();
    // FlowLayout requires that the anchor is the first element in the row.
    const auto internalAnchor = m_algorithmCallbacks->Algorithm_GetAnchorForTargetElement(index, availableSize, context);
    MUX_ASSERT(internalAnchor.Index <= index);

    // No need to set the position of the anchor.
    // (0,0) is fine for now since the extent can
    // grow in any direction.
    for (int dataIndex = internalAnchor.Index; dataIndex < index + 1; ++dataIndex)
    {
        auto element = context.GetOrCreateElementAt(dataIndex, winrt::ElementRealizationOptions::ForceCreate | winrt::ElementRealizationOptions::SuppressAutoRecycle);
        element.Measure(m_algorithmCallbacks->Algorithm_GetMeasureSize(dataIndex, availableSize, context));
        m_elementManager.Add(element, dataIndex);
    }
}

winrt::Size Measure | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | bool | isWrapping,
 |  | double | minItemSpacing,
 |  | double | lineSpacing,
 |  | unsigned int | maxItemsPerLine,
 |  | const ScrollOrientation & | orientation,
 |  | const bool | isVirtualizationEnabled,
 |  | const wstring_view & | layoutId
 | ) |  |

Definition at line 31 of file FlowLayoutAlgorithm.cpp.

{
    SetScrollOrientation(orientation);

    // If minor size is infinity, there is only one line and no need to align that line.
    m_scrollOrientationSameAsFlow = Minor(availableSize) == std::numeric_limits<float>::infinity();
    const auto realizationRect = RealizationRect();

    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
        winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(),
        L"MeasureLayout Realization:", realizationRect.X, realizationRect.Y, realizationRect.Width, realizationRect.Height);

    TraceLoggingProviderWrite(
        XamlTelemetryLogging, "FlowLayoutAlgorithm_Measure",
        TraceLoggingWideString(layoutId.data(), "LayoutId"),
        TraceLoggingFloat32(realizationRect.X, "X"),
        TraceLoggingFloat32(realizationRect.Y, "Y"),
        TraceLoggingFloat32(realizationRect.Width, "Width"),
        TraceLoggingFloat32(realizationRect.Height, "Height"),
        TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));

    const auto suggestedAnchorIndex = m_context.get().RecommendedAnchorIndex();
    if (m_elementManager.IsIndexValidInData(suggestedAnchorIndex))
    {
        const auto anchorRealized = m_elementManager.IsDataIndexRealized(suggestedAnchorIndex);
        if (!anchorRealized)
        {
            MakeAnchor(m_context.get(), suggestedAnchorIndex, availableSize);
        }
    }

    if (isVirtualizationEnabled)
    {
        m_elementManager.OnBeginMeasure(orientation);
    }

    const int anchorIndex = GetAnchorIndex(availableSize, isWrapping, minItemSpacing, isVirtualizationEnabled, layoutId);
    Generate(GenerateDirection::Forward, anchorIndex, availableSize, isWrapping, minItemSpacing, lineSpacing, maxItemsPerLine, isVirtualizationEnabled, layoutId);
    Generate(GenerateDirection::Backward, anchorIndex, availableSize, isWrapping, minItemSpacing, lineSpacing, maxItemsPerLine, isVirtualizationEnabled, layoutId);
    if (isWrapping && IsReflowRequired())
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR, METH_NAME, this,
            winrt::get_self<VirtualizingLayoutContext>(context)->Indent(), layoutId.data(), L"Reflow Pass.");

        const auto firstElementBounds = m_elementManager.GetLayoutBoundsForRealizedIndex(0);
        MinorStart(firstElementBounds) = 0;
        m_elementManager.SetLayoutBoundsForRealizedIndex(0, firstElementBounds);
        Generate(GenerateDirection::Forward, 0 /*anchorIndex*/, availableSize, isWrapping, minItemSpacing, lineSpacing, maxItemsPerLine, isVirtualizationEnabled, layoutId);
    }

    RaiseLineArranged();
    m_collectionChangePending = false;
    m_lastExtent = EstimateExtent(availableSize, layoutId);
    SetLayoutOrigin();

    return winrt::Size{ m_lastExtent.Width, m_lastExtent.Height };
}

winrt::Size MeasureElement | ( | const winrt::UIElement & | element,
 |  | int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context
 | ) |  |

Definition at line 147 of file FlowLayoutAlgorithm.cpp.

{
    const auto measureSize = m_algorithmCallbacks->Algorithm_GetMeasureSize(index, availableSize, context);
    element.Measure(measureSize);
    const auto provisionalArrangeSize = m_algorithmCallbacks->Algorithm_GetProvisionalArrangeSize(index, measureSize, element.DesiredSize(), context);
    m_algorithmCallbacks->Algorithm_OnElementMeasured(element, index, availableSize, measureSize, element.DesiredSize(), provisionalArrangeSize, context);

    return provisionalArrangeSize;
}

void OnItemsSourceChanged | ( | const winrt::IInspectable & | source,
 |  | winrt::NotifyCollectionChangedEventArgs const & | args,
 |  | const winrt::IVirtualizingLayoutContext & | context
 | ) |  |

Definition at line 138 of file FlowLayoutAlgorithm.cpp.

{
    m_elementManager.DataSourceChanged(source, args);
    m_collectionChangePending = true;
}

void PerformLineAlignment | ( | int | lineStartIndex,
 |  | int | countInLine,
 |  | float | spaceAtLineStart,
 |  | float | spaceAtLineEnd,
 |  | float | lineSize,
 |  | FlowLayoutAlgorithm::LineAlignment | lineAlignment,
 |  | bool | isWrapping,
 |  | const winrt::Size & | finalSize,
 |  | const wstring_view & | layoutId |
 | ) |  |  | [private]

Definition at line 675 of file FlowLayoutAlgorithm.cpp.

{
    for (int rangeIndex = lineStartIndex; rangeIndex < lineStartIndex + countInLine; ++rangeIndex)
    {
        auto bounds = m_elementManager.GetLayoutBoundsForRealizedIndex(rangeIndex);
        MajorSize(bounds) = lineSize;

        if (!m_scrollOrientationSameAsFlow)
        {
            // Note: Space at start could potentially be negative
            if (spaceAtLineStart != 0 || spaceAtLineEnd != 0)
            {
                float totalSpace = spaceAtLineStart + spaceAtLineEnd;
                switch (lineAlignment)
                {
                case FlowLayoutAlgorithm::LineAlignment::Start:
                {
                    MinorStart(bounds) -= spaceAtLineStart;
                    break;
                }

                case FlowLayoutAlgorithm::LineAlignment::End:
                {
                    MinorStart(bounds) += spaceAtLineEnd;
                    break;
                }

                case FlowLayoutAlgorithm::LineAlignment::Center:
                {
                    MinorStart(bounds) -= spaceAtLineStart;
                    MinorStart(bounds) += totalSpace / 2;
                    break;
                }

                case FlowLayoutAlgorithm::LineAlignment::SpaceAround:
                {
                    float interItemSpace = countInLine >= 1 ? totalSpace / (countInLine * 2) : 0;
                    MinorStart(bounds) -= spaceAtLineStart;
                    MinorStart(bounds) += interItemSpace * ((rangeIndex - lineStartIndex + 1) * 2 - 1);
                    break;
                }

                case FlowLayoutAlgorithm::LineAlignment::SpaceBetween:
                {
                    float interItemSpace = countInLine > 1 ? totalSpace / (countInLine - 1) : 0;
                    MinorStart(bounds) -= spaceAtLineStart;
                    MinorStart(bounds) += interItemSpace * (rangeIndex - lineStartIndex);
                    break;
                }

                case FlowLayoutAlgorithm::LineAlignment::SpaceEvenly:
                {
                    float interItemSpace = countInLine >= 1 ? totalSpace / (countInLine + 1) : 0;
                    MinorStart(bounds) -= spaceAtLineStart;
                    MinorStart(bounds) += interItemSpace * (rangeIndex - lineStartIndex + 1);
                    break;
                }
                }
            }
        }

        bounds.X -= m_lastExtent.X;
        bounds.Y -= m_lastExtent.Y;

        if (!isWrapping)
        {
            MinorSize(bounds) = std::max(MinorSize(bounds), Minor(finalSize));
        }

        auto element = m_elementManager.GetAt(rangeIndex);

        ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT, METH_NAME, this,
            winrt::get_self<VirtualizingLayoutContext>(m_context.get())->Indent(), layoutId.data(),
            L"Element dataIndex & arrange bounds:",
            m_elementManager.GetDataIndexFromRealizedRangeIndex(rangeIndex),
            bounds.X, bounds.Y, bounds.Width, bounds.Height);

        element.Arrange(bounds);
    }
}

void RaiseLineArranged ( ) [private]

Definition at line 585 of file FlowLayoutAlgorithm.cpp.

{
    const auto realizationRect = RealizationRect();
    if (realizationRect.Width != 0.0f || realizationRect.Height != 0.0f)
    {
        const int realizedElementCount = m_elementManager.GetRealizedElementCount();
        if (realizedElementCount > 0)
        {
            MUX_ASSERT(m_firstRealizedDataIndexInsideRealizationWindow != -1 && m_lastRealizedDataIndexInsideRealizationWindow != -1);
            int countInLine = 0;
            auto previousElementBounds = m_elementManager.GetLayoutBoundsForDataIndex(m_firstRealizedDataIndexInsideRealizationWindow);
            auto currentLineOffset = MajorStart(previousElementBounds);
            auto currentLineSize = MajorSize(previousElementBounds);
            for (int currentDataIndex = m_firstRealizedDataIndexInsideRealizationWindow; currentDataIndex <= m_lastRealizedDataIndexInsideRealizationWindow; currentDataIndex++)
            {
                const auto currentBounds = m_elementManager.GetLayoutBoundsForDataIndex(currentDataIndex);
                if (MajorStart(currentBounds) != currentLineOffset)
                {
                    // Starting a new line
                    m_algorithmCallbacks->Algorithm_OnLineArranged(currentDataIndex - countInLine, countInLine, currentLineSize, m_context.get());
                    countInLine = 0;
                    currentLineOffset = MajorStart(currentBounds);
                    currentLineSize = 0;
                }

                currentLineSize = std::max(static_cast<float>(currentLineSize), MajorSize(currentBounds));
                countInLine++;
                previousElementBounds = currentBounds;
            }

            // Raise for the last line.
            m_algorithmCallbacks->Algorithm_OnLineArranged(m_lastRealizedDataIndexInsideRealizationWindow - countInLine + 1, countInLine, currentLineSize, m_context.get());
        }
    }
}

winrt::Rect RealizationRect ( ) [private]

Definition at line 769 of file FlowLayoutAlgorithm.cpp.

{
    return IsVirtualizingContext() ?
        m_context.get().RealizationRect() :
        winrt::Rect{ 0, 0, std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() };
}

void SetLayoutOrigin ( ) [private]

Definition at line 776 of file FlowLayoutAlgorithm.cpp.

{
    if (IsVirtualizingContext())
    {
        m_context.get().LayoutOrigin(winrt::Point{ m_lastExtent.X, m_lastExtent.Y });
    }
    else
    {
        // Should have 0 origin for non-virtualizing layout since we always start from
        // the first item
        MUX_ASSERT(m_lastExtent.X == 0 && m_lastExtent.Y == 0);
    }
}

bool ShouldContinueFillingUpSpace | ( | int | index,
 |  | GenerateDirection | direction |
 | ) |  |  | [private]

Definition at line 513 of file FlowLayoutAlgorithm.cpp.

{
    bool shouldContinue = false;
    if (!IsVirtualizingContext())
    {
        shouldContinue = true;
    }
    else
    {
        const auto realizationRect = m_context.get().RealizationRect();
        const auto elementBounds = m_elementManager.GetLayoutBoundsForDataIndex(index);

        const auto elementMajorStart = MajorStart(elementBounds);
        const auto elementMajorEnd = MajorEnd(elementBounds);
        const auto rectMajorStart = MajorStart(realizationRect);
        const auto rectMajorEnd = MajorEnd(realizationRect);

        const auto elementMinorStart = MinorStart(elementBounds);
        const auto elementMinorEnd = MinorEnd(elementBounds);
        const auto rectMinorStart = MinorStart(realizationRect);
        const auto rectMinorEnd = MinorEnd(realizationRect);

        // Ensure that both minor and major directions are taken into consideration so that if the scrolling direction
        // is the same as the flow direction we still stop at the end of the viewport rectangle.
        shouldContinue = direction == GenerateDirection::Forward
            ? elementMajorStart < rectMajorEnd && elementMinorStart < rectMinorEnd
            : elementMajorEnd > rectMajorStart && elementMinorEnd > rectMinorStart;
    }

    return shouldContinue;
}

void UninitializeForContext ( const winrt::VirtualizingLayoutContext & context )

Definition at line 20 of file FlowLayoutAlgorithm.cpp.

{
    if (IsVirtualizingContext())
    {
        // This layout is about to be detached. Let go of all elements
        // being held and remove the layout state from the context.
        m_elementManager.ClearRealizedRange();
    }
    context.LayoutStateCore(nullptr);
}

Member Data Documentation

tracker_ref<winrt::VirtualizingLayoutContext> m_context [private]

Definition at line 131 of file FlowLayoutAlgorithm.h.

::ElementManager m_elementManager [private]

Definition at line 130 of file FlowLayoutAlgorithm.h.

const ITrackerHandleManager* m_owner [private]

Definition at line 129 of file FlowLayoutAlgorithm.h.

The documentation for this class was generated from the following files:
  • Repeater/FlowLayoutAlgorithm.h
  • Repeater/FlowLayoutAlgorithm.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

FlowLayoutProperties Class Reference

#include "FlowLayout.properties.h"

Inherited by FlowLayout.

List of all members.

Public Member Functions

FlowLayoutProperties ()
void | LineAlignment (winrt::FlowLayoutLineAlignment const &value)
winrt::FlowLayoutLineAlignment | LineAlignment ()
void | MinColumnSpacing (double value)
double | MinColumnSpacing ()
double | MinRowSpacing ()
void | MinRowSpacing (double value)
winrt::Orientation | Orientation ()
void | Orientation (winrt::Orientation const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | LineAlignmentProperty ()
static winrt::DependencyProperty | MinColumnSpacingProperty ()
static winrt::DependencyProperty | MinRowSpacingProperty ()
static void | OnLineAlignmentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinColumnSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinRowSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | OrientationProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_LineAlignmentProperty
static GlobalDependencyProperty | s_MinColumnSpacingProperty
static GlobalDependencyProperty | s_MinRowSpacingProperty
static GlobalDependencyProperty | s_OrientationProperty

Detailed Description

Definition at line 7 of file FlowLayout.properties.h.

Constructor & Destructor Documentation

FlowLayoutProperties ( )

Definition at line 21 of file FlowLayout.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 74 of file FlowLayout.properties.cpp.

{
    s_LineAlignmentProperty = nullptr;
    s_MinColumnSpacingProperty = nullptr;
    s_MinRowSpacingProperty = nullptr;
    s_OrientationProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 26 of file FlowLayout.properties.cpp.

{
    if (!s_LineAlignmentProperty)
    {
        s_LineAlignmentProperty =
            InitializeDependencyProperty(
                L"LineAlignment",
                winrt::name_of<winrt::FlowLayoutLineAlignment>(),
                winrt::name_of<winrt::FlowLayout>(),
                false /* isAttached */,
                ValueHelper<winrt::FlowLayoutLineAlignment>::BoxValueIfNecessary(winrt::FlowLayoutLineAlignment::Start),
                winrt::PropertyChangedCallback(&OnLineAlignmentPropertyChanged));
    }
    if (!s_MinColumnSpacingProperty)
    {
        s_MinColumnSpacingProperty =
            InitializeDependencyProperty(
                L"MinColumnSpacing",
                winrt::name_of<double>(),
                winrt::name_of<winrt::FlowLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnMinColumnSpacingPropertyChanged));
    }
    if (!s_MinRowSpacingProperty)
    {
        s_MinRowSpacingProperty =
            InitializeDependencyProperty(
                L"MinRowSpacing",
                winrt::name_of<double>(),
                winrt::name_of<winrt::FlowLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnMinRowSpacingPropertyChanged));
    }
    if (!s_OrientationProperty)
    {
        s_OrientationProperty =
            InitializeDependencyProperty(
                L"Orientation",
                winrt::name_of<winrt::Orientation>(),
                winrt::name_of<winrt::FlowLayout>(),
                false /* isAttached */,
                ValueHelper<winrt::Orientation>::BoxValueIfNecessary(winrt::Orientation::Horizontal),
                winrt::PropertyChangedCallback(&OnOrientationPropertyChanged));
    }
}

winrt::FlowLayoutLineAlignment LineAlignment ( )

Definition at line 122 of file FlowLayout.properties.cpp.

{
    return ValueHelper<winrt::FlowLayoutLineAlignment>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_LineAlignmentProperty));
}

void LineAlignment ( winrt::FlowLayoutLineAlignment const & value )

Definition at line 114 of file FlowLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<FlowLayout*>(this)->SetValue(s_LineAlignmentProperty, ValueHelper<winrt::FlowLayoutLineAlignment>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty LineAlignmentProperty ( ) [inline, static]

Definition at line 24 of file FlowLayout.properties.h.

{ return s_LineAlignmentProperty; }

double MinColumnSpacing ( )

Definition at line 135 of file FlowLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_MinColumnSpacingProperty));
}

void MinColumnSpacing ( double value )

Definition at line 127 of file FlowLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<FlowLayout*>(this)->SetValue(s_MinColumnSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MinColumnSpacingProperty ( ) [inline, static]

Definition at line 25 of file FlowLayout.properties.h.

{ return s_MinColumnSpacingProperty; }

void MinRowSpacing ( double value )

Definition at line 140 of file FlowLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<FlowLayout*>(this)->SetValue(s_MinRowSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double MinRowSpacing ( )

Definition at line 148 of file FlowLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_MinRowSpacingProperty));
}

static winrt::DependencyProperty MinRowSpacingProperty ( ) [inline, static]

Definition at line 26 of file FlowLayout.properties.h.

{ return s_MinRowSpacingProperty; }

void OnLineAlignmentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 82 of file FlowLayout.properties.cpp.

{
    auto owner = sender.as<winrt::FlowLayout>();
    winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
}

void OnMinColumnSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 90 of file FlowLayout.properties.cpp.

{
    auto owner = sender.as<winrt::FlowLayout>();
    winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
}

void OnMinRowSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 98 of file FlowLayout.properties.cpp.

{
    auto owner = sender.as<winrt::FlowLayout>();
    winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
}

void OnOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 106 of file FlowLayout.properties.cpp.

{
    auto owner = sender.as<winrt::FlowLayout>();
    winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
}

winrt::Orientation Orientation ( )

Definition at line 161 of file FlowLayout.properties.cpp.

{
    return ValueHelper<winrt::Orientation>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_OrientationProperty));
}

void Orientation ( winrt::Orientation const & value )

Definition at line 153 of file FlowLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<FlowLayout*>(this)->SetValue(s_OrientationProperty, ValueHelper<winrt::Orientation>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty OrientationProperty ( ) [inline, static]

Definition at line 27 of file FlowLayout.properties.h.

{ return s_OrientationProperty; }

Member Data Documentation

GlobalDependencyProperty s_LineAlignmentProperty [static]

Definition at line 29 of file FlowLayout.properties.h.

GlobalDependencyProperty s_MinColumnSpacingProperty [static]

Definition at line 30 of file FlowLayout.properties.h.

GlobalDependencyProperty s_MinRowSpacingProperty [static]

Definition at line 31 of file FlowLayout.properties.h.

GlobalDependencyProperty s_OrientationProperty [static]

Definition at line 32 of file FlowLayout.properties.h.

The documentation for this class was generated from the following files:
  • Generated/FlowLayout.properties.h
  • Generated/FlowLayout.properties.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutState Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Private Attributes

FlowLayoutState Class Reference

#include "FlowLayoutState.h"

Inherits ReferenceTracker< FlowLayoutState, winrt::implementation::FlowLayoutStateT, winrt::composing >.

List of all members.

Public Member Functions

::FlowLayoutAlgorithm & FlowAlgorithm ()
void | InitializeForContext (const winrt::VirtualizingLayoutContext &context, IFlowLayoutAlgorithmDelegates *callbacks)
void | OnLineArranged (int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext &context)
void | SpecialElementDesiredSize (winrt::Size value)
winrt::Size | SpecialElementDesiredSize () const
double | TotalItemsPerLine () const
double | TotalLineSize () const
int | TotalLinesMeasured () const
void | UninitializeForContext (const winrt::VirtualizingLayoutContext &context)

Static Private Attributes

static const int | BufferSize = 100

Detailed Description

Definition at line 9 of file FlowLayoutState.h.

Member Function Documentation

::FlowLayoutAlgorithm& FlowAlgorithm ( ) [inline]

Definition at line 19 of file FlowLayoutState.h.

{ return m_flowAlgorithm; }

void InitializeForContext | ( | const winrt::VirtualizingLayoutContext & | context,
 |  | IFlowLayoutAlgorithmDelegates * | callbacks
 | ) |  |

Definition at line 12 of file FlowLayoutState.cpp.

{
    m_flowAlgorithm.InitializeForContext(context, callbacks);

    if (m_lineSizeEstimationBuffer.size() == 0)
    {
        m_lineSizeEstimationBuffer.resize(BufferSize, 0.0f);
        m_itemsPerLineEstimationBuffer.resize(BufferSize, 0.0f);
    }

    context.LayoutStateCore(*this);
}

void OnLineArranged | ( | int | startIndex,
 |  | int | countInLine,
 |  | double | lineSize,
 |  | const winrt::VirtualizingLayoutContext & | context
 | ) |  |

Definition at line 32 of file FlowLayoutState.cpp.

{
    // If we do not have any estimation information, use the line for estimation.
    // If we do have some estimation information, don't account for the last line which is quite likely
    // different from the rest of the lines and can throw off estimation.
    if (m_totalLinesMeasured == 0 || startIndex + countInLine != context.ItemCount())
    {
        const int estimationBufferIndex = startIndex % m_lineSizeEstimationBuffer.size();
        const bool alreadyMeasured = m_lineSizeEstimationBuffer[estimationBufferIndex] != 0;

        if (!alreadyMeasured)
        {
            ++m_totalLinesMeasured;
        }

        m_totalLineSize -= m_lineSizeEstimationBuffer[estimationBufferIndex];
        m_totalLineSize += lineSize;
        m_lineSizeEstimationBuffer[estimationBufferIndex] = lineSize;

        m_totalItemsPerLine -= m_itemsPerLineEstimationBuffer[estimationBufferIndex];
        m_totalItemsPerLine += countInLine;
        m_itemsPerLineEstimationBuffer[estimationBufferIndex] = countInLine;
    }
}

void SpecialElementDesiredSize ( winrt::Size value ) [inline]

Definition at line 25 of file FlowLayoutState.h.

{ m_specialElementDesiredSize = value; }

winrt::Size SpecialElementDesiredSize ( ) const [inline]

Definition at line 24 of file FlowLayoutState.h.

{ return m_specialElementDesiredSize; }

double TotalItemsPerLine ( ) const [inline]

Definition at line 22 of file FlowLayoutState.h.

{ return m_totalItemsPerLine; }

double TotalLineSize ( ) const [inline]

Definition at line 20 of file FlowLayoutState.h.

{ return m_totalLineSize; }

int TotalLinesMeasured ( ) const [inline]

Definition at line 21 of file FlowLayoutState.h.

{ return m_totalLinesMeasured; }

void UninitializeForContext ( const winrt::VirtualizingLayoutContext & context )

Definition at line 27 of file FlowLayoutState.cpp.

{
    m_flowAlgorithm.UninitializeForContext(context);
}

Member Data Documentation

const int BufferSize = 100 [static, private]

Definition at line 35 of file FlowLayoutState.h.

The documentation for this class was generated from the following files:
  • Repeater/FlowLayoutState.h
  • Repeater/FlowLayoutState.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FocusHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

FocusHelper Class Reference

#include "FocusHelper.h"

List of all members.

Static Public Member Functions

static
winrt::FocusNavigationDirection
constexpr 		GetNavigationDirection (winrt::VirtualKey key)
static
winrt::FocusNavigationDirection
constexpr 		GetOppositeDirection (winrt::FocusNavigationDirection direction)
static
winrt::FocusNavigationDirection
constexpr 		GetPageNavigationDirection (winrt::VirtualKey key)
static winrt::UIElement | GetUIElementForFocusCandidate (const winrt::DependencyObject &dobj)
static bool constexpr | IsGamepadNavigationDirection (winrt::VirtualKey key)
static bool constexpr | IsGamepadPageNavigationDirection (winrt::VirtualKey key)

Detailed Description

Definition at line 9 of file FocusHelper.h.

Member Function Documentation

static winrt::FocusNavigationDirection constexpr GetNavigationDirection ( winrt::VirtualKey key ) [inline, static]

Definition at line 31 of file FocusHelper.h.

    {
        winrt::FocusNavigationDirection direction = winrt::FocusNavigationDirection::None;

        switch (key)
        {
        case winrt::VirtualKey::GamepadDPadUp:
        case winrt::VirtualKey::GamepadLeftThumbstickUp:
        case winrt::VirtualKey::Up:
            direction = winrt::FocusNavigationDirection::Up;
            break;
        case winrt::VirtualKey::GamepadDPadDown:
        case winrt::VirtualKey::GamepadLeftThumbstickDown:
        case winrt::VirtualKey::Down:
            direction = winrt::FocusNavigationDirection::Down;
            break;
        case winrt::VirtualKey::GamepadDPadLeft:
        case winrt::VirtualKey::GamepadLeftThumbstickLeft:
        case winrt::VirtualKey::Left:
            direction = winrt::FocusNavigationDirection::Left;
            break;
        case winrt::VirtualKey::GamepadDPadRight:
        case winrt::VirtualKey::GamepadLeftThumbstickRight:
        case winrt::VirtualKey::Right:
            direction = winrt::FocusNavigationDirection::Right;
            break;
        }

static winrt::FocusNavigationDirection constexpr GetOppositeDirection ( winrt::FocusNavigationDirection direction ) [inline, static]

Definition at line 85 of file FocusHelper.h.

    {
        winrt::FocusNavigationDirection oppositeDirection = winrt::FocusNavigationDirection::None;
        switch (direction)
        {
        case winrt::FocusNavigationDirection::Down:
            oppositeDirection = winrt::FocusNavigationDirection::Up;
            break;
        case winrt::FocusNavigationDirection::Up:
            oppositeDirection = winrt::FocusNavigationDirection::Down;
            break;
        case winrt::FocusNavigationDirection::Left:
            oppositeDirection = winrt::FocusNavigationDirection::Right;
            break;
        case winrt::FocusNavigationDirection::Right:
            oppositeDirection = winrt::FocusNavigationDirection::Left;
            break;
        case winrt::FocusNavigationDirection::Next:
            oppositeDirection = winrt::FocusNavigationDirection::Previous;
            break;
        case winrt::FocusNavigationDirection::Previous:
            oppositeDirection = winrt::FocusNavigationDirection::Next;
            break;
        }

static winrt::FocusNavigationDirection constexpr GetPageNavigationDirection ( winrt::VirtualKey key ) [inline, static]

Definition at line 62 of file FocusHelper.h.

    {
        winrt::FocusNavigationDirection direction = winrt::FocusNavigationDirection::None;

        switch (key)
        {
        case winrt::VirtualKey::GamepadLeftTrigger:
            direction = winrt::FocusNavigationDirection::Up;
            break;
        case winrt::VirtualKey::GamepadRightTrigger:
            direction = winrt::FocusNavigationDirection::Down;
            break;
        case winrt::VirtualKey::GamepadLeftShoulder:
            direction = winrt::FocusNavigationDirection::Left;
            break;
        case winrt::VirtualKey::GamepadRightShoulder:
            direction = winrt::FocusNavigationDirection::Right;
            break;
        }

static winrt::UIElement GetUIElementForFocusCandidate ( const winrt::DependencyObject & dobj ) [inline, static]

Definition at line 112 of file FocusHelper.h.

    {
        auto uielement = dobj.try_as<winrt::UIElement>();
        auto parent = dobj;
        while (uielement == nullptr && parent != nullptr)
        {
            parent = winrt::VisualTreeHelper::GetParent(dobj);
            if (parent)
            {
                uielement = dobj.try_as<winrt::UIElement>();
            }
        }

static bool constexpr IsGamepadNavigationDirection ( winrt::VirtualKey key ) [inline, static]

Definition at line 10 of file FocusHelper.h.

{
public:
    static bool constexpr IsGamepadNavigationDirection(winrt::VirtualKey key)
    {
        return key == winrt::VirtualKey::GamepadLeftThumbstickDown
            || key == winrt::VirtualKey::GamepadDPadDown
            || key == winrt::VirtualKey::GamepadLeftThumbstickUp
            || key == winrt::VirtualKey::GamepadDPadUp
            || key == winrt::VirtualKey::GamepadLeftThumbstickRight
            || key == winrt::VirtualKey::GamepadDPadRight
            || key == winrt::VirtualKey::GamepadLeftThumbstickLeft

static bool constexpr IsGamepadPageNavigationDirection ( winrt::VirtualKey key ) [inline, static]

Definition at line 22 of file FocusHelper.h.

    {
        return
            key == winrt::VirtualKey::GamepadLeftShoulder ||
            key == winrt::VirtualKey::GamepadRightShoulder ||
            key == winrt::VirtualKey::GamepadLeftTrigger ||

The documentation for this class was generated from the following file:
  • inc/FocusHelper.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GenericInkCallback Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

GenericInkCallback Struct Reference

List of all members.

Public Member Functions

GenericInkCallback (const std::function< void()> &func)
IFACEMETHODIMP | Invoke ()

Private Attributes

std::function< void()> | m_func

Detailed Description

Definition at line 42 of file InkCanvas.cpp.

Constructor & Destructor Documentation

GenericInkCallback ( const std::function< void()> & func ) [inline]

Definition at line 44 of file InkCanvas.cpp.

        : m_func(func)
    {
    }

Member Function Documentation

IFACEMETHODIMP Invoke ( ) [inline]

Definition at line 49 of file InkCanvas.cpp.

    {
        m_func();
        return S_OK;
    }
    catch (...)
    {
        // REVIEW: Is this the way that we want to handle this?  IInkHostWorkItem::Invoke needs to return
        //         a HRESULT, but I can't find any information on what happens if it does.  There is no way
        //         to pass it back and raise it on the UI thread.
        return winrt::to_hresult();
    }

Member Data Documentation

std::function<void()> m_func [private]

Definition at line 63 of file InkCanvas.cpp.

The documentation for this struct was generated from the following file:
  • InkCanvas/InkCanvas.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GlobalDependencyProperty Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

GlobalDependencyProperty Struct Reference

#include "GlobalDependencyProperty.h"

List of all members.

Public Member Functions

GlobalDependencyProperty ()
constexpr | GlobalDependencyProperty (nullptr_t)
GlobalDependencyProperty (winrt::DependencyProperty const &other)
GlobalDependencyProperty (GlobalDependencyProperty const &)
operator bool () const
operator winrt::DependencyProperty () const
GlobalDependencyProperty & | operator= (GlobalDependencyProperty const &other)
GlobalDependencyProperty & | operator= (winrt::DependencyProperty const &other)
GlobalDependencyProperty & | operator= (nullptr_t)
bool | operator== (winrt::DependencyProperty const &other) const
bool | operator== (nullptr_t) const

Private Member Functions

winrt::DependencyProperty & | Property ()
winrt::DependencyProperty const & | Property () const

Detailed Description

Definition at line 8 of file GlobalDependencyProperty.h.

Constructor & Destructor Documentation

GlobalDependencyProperty ( )
constexpr GlobalDependencyProperty ( nullptr_t ) [inline]

Definition at line 12 of file GlobalDependencyProperty.h.

    {
    }

GlobalDependencyProperty ( winrt::DependencyProperty const & other ) [inline]

Definition at line 30 of file GlobalDependencyProperty.h.

    {
        Property() = other;
    }

GlobalDependencyProperty ( GlobalDependencyProperty const & )

Member Function Documentation

operator bool ( ) const [inline]

Definition at line 44 of file GlobalDependencyProperty.h.

    {
        return static_cast<bool>(m_dependencyProperty);
    }

operator winrt::DependencyProperty ( ) const [inline]

Definition at line 39 of file GlobalDependencyProperty.h.

    {
        return Property();
    }

GlobalDependencyProperty& operator= ( winrt::DependencyProperty const & other ) [inline]

Definition at line 24 of file GlobalDependencyProperty.h.

    {
        Property() = other;
        return *this;
    }

GlobalDependencyProperty& operator= ( nullptr_t ) [inline]

Definition at line 17 of file GlobalDependencyProperty.h.

    {
        Property() = nullptr;
        return *this;
    }

GlobalDependencyProperty& operator= ( GlobalDependencyProperty const & other )
bool operator== ( nullptr_t ) const [inline]

Definition at line 54 of file GlobalDependencyProperty.h.

    {
        return Property() == nullptr;
    }

bool operator== ( winrt::DependencyProperty const & other ) const [inline]

Definition at line 49 of file GlobalDependencyProperty.h.

    {
        return Property() == other;
    }

winrt::DependencyProperty const& Property ( ) const [inline, private]

Definition at line 65 of file GlobalDependencyProperty.h.

    {
        return reinterpret_cast<winrt::DependencyProperty const&>(m_dependencyProperty);
    }

winrt::DependencyProperty& Property ( ) [inline, private]

Definition at line 60 of file GlobalDependencyProperty.h.

    {
        return reinterpret_cast<winrt::DependencyProperty&>(m_dependencyProperty);
    }

The documentation for this struct was generated from the following file:
  • inc/GlobalDependencyProperty.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: HashMap< K, V > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes

HashMap< K, V > Class Template Reference

#include "HashMap.h"

Inherits ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > >.

List of all members.

Classes

class | Iterator

Public Member Functions

T_iterator | Begin () const
void | Clear ()
T_iterator | End () const
winrt::IIterator< KVP > | First ()
unsigned int | GetMutationCount () const
winrt::IMapView< K, V > | GetView ()
bool | HasKey (K const &key)
bool | Insert (K const &key, V const &value)
V | Lookup (K const &key)
void | Remove (K const &key)
int32_t | Size ()
void | Split (winrt::IMapView< K, V > &firstPartition, winrt::IMapView< K, V > &secondPartition)

Private Types

typedef winrt::IKeyValuePair
< K, V > 		KVP
typedef std::map< K_storage,
V_storage >::const_iterator 		T_iterator

Private Member Functions

auto | FindKey (K const &key)

Private Attributes

std::map< K_storage, V_storage > | m_map
unsigned int | m_mutationCount = 0

Detailed Description

template<typename K, typename V>
class HashMap< K, V >

Definition at line 7 of file HashMap.h.

Member Typedef Documentation

typedef winrt::IKeyValuePair<K, V> KVP [private]

Definition at line 16 of file HashMap.h.

typedef std::map<K_storage, V_storage>::const_iterator T_iterator [private]

Definition at line 18 of file HashMap.h.

Member Function Documentation

T_iterator Begin ( ) const [inline]

Definition at line 103 of file HashMap.h.

    {
        return m_map.cbegin();
    }

void Clear ( ) [inline]

Definition at line 77 of file HashMap.h.

    {
        ++m_mutationCount;
        m_map.clear();
    }

T_iterator End ( ) const [inline]

Definition at line 108 of file HashMap.h.

    {
        return m_map.cend();
    }

auto FindKey ( K const & key ) [inline, private]

Definition at line 114 of file HashMap.h.

    {
        return std::find_if(m_map.begin(), m_map.end(), [&key](const auto& entry) { return entry.first == key; });
    }

winrt::IIterator<KVP> First ( ) [inline]

Definition at line 92 of file HashMap.h.

    {
        return winrt::make<HashMap<K, V>::Iterator>(this);
    }

unsigned int GetMutationCount ( ) const [inline]

Definition at line 98 of file HashMap.h.

    {
        return m_mutationCount;
    }

winrt::IMapView<K, V> GetView ( ) [inline]

Definition at line 45 of file HashMap.h.

    {
        return *this;
    }

bool HasKey ( K const & key ) [inline]

Definition at line 40 of file HashMap.h.

    {
        return (FindKey(key) != m_map.end());
    }

bool Insert | ( | K const & | key,
 |  | V const & | value |
 | ) |  |  | [inline]

Definition at line 50 of file HashMap.h.

    {
        ++m_mutationCount;
        auto it = FindKey(key);
        const bool found = (it != m_map.end());
        if (found)
        {
            it->second = tracker_ref<V>{ this, value };
        }
        else
        {
            m_map.insert(std::make_pair(tracker_ref<K>{ this, key }, tracker_ref<V>{ this, value }));
        }

        return found;
    }

V Lookup ( K const & key ) [inline]

Definition at line 22 of file HashMap.h.

    {
        auto it = FindKey(key);
        if (it != m_map.end())
        {
            return it->second.get();
        }
        else
        {
            return nullptr;
        }
    }

void Remove ( K const & key ) [inline]

Definition at line 67 of file HashMap.h.

    {
        ++m_mutationCount;
        auto it = FindKey(key);
        if (it != m_map.end())
        {
            m_map.erase(it);
        }
    }

int32_t Size ( ) [inline]

Definition at line 35 of file HashMap.h.

    {
        return static_cast<unsigned int>(m_map.size());
    }

void Split | ( | winrt::IMapView< K, V > & | firstPartition,
 |  | winrt::IMapView< K, V > & | secondPartition |
 | ) |  |  | [inline]

Definition at line 83 of file HashMap.h.

    {
        // This view doesn't allow spliting.
        firstPartition = nullptr;
        secondPartition = nullptr;
    }

Member Data Documentation

std::map<K_storage, V_storage> m_map [private]

Definition at line 225 of file HashMap.h.

unsigned int m_mutationCount = 0 [private]

Definition at line 226 of file HashMap.h.

The documentation for this class was generated from the following file:
  • Collections/HashMap.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: HashMap< K, V >::Iterator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • HashMap< K, V >
  • HashMap< K, V >::Iterator
Classes | Public Member Functions | Private Member Functions | Private Attributes

HashMap< K, V >::Iterator Class Reference

Inherits ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type >.

List of all members.

Classes

class | KeyValuePair

Public Member Functions

Iterator (HashMap< K, V > *map)
KVP Current ()
uint32_t | GetMany (winrt::array_view< KVP > values)
bool | HasCurrent ()
bool | MoveNext ()

Private Member Functions

void | CheckMutationCount () const

Private Attributes

unsigned int | m_expectedMutationCount = 0
T_iterator m_iterator

Detailed Description

template<typename K, typename V>
class HashMap< K, V >::Iterator

Definition at line 119 of file HashMap.h.

Constructor & Destructor Documentation

Iterator ( HashMap< K, V > * map ) [inline]

Definition at line 125 of file HashMap.h.

        {
            m_map.set(map->get_strong());
            m_expectedMutationCount = map->GetMutationCount();
            m_iterator = map->Begin();
        }

Member Function Documentation

void CheckMutationCount ( ) const [inline, private]

Definition at line 184 of file HashMap.h.

        {
            if (m_map.get()->GetMutationCount() != m_expectedMutationCount)
            {
                throw winrt::hresult_out_of_bounds();
            }
        }

KVP Current ( ) [inline]

Definition at line 132 of file HashMap.h.

        {
            CheckMutationCount();

            if (m_iterator != m_map.get()->End())
            {
                return winrt::make<KeyValuePair>(m_iterator->first.get(), m_iterator->second.get());
            }
            else
            {
                throw winrt::hresult_out_of_bounds();
            }
        }

uint32_t GetMany ( winrt::array_view< KVP > values ) [inline]

Definition at line 167 of file HashMap.h.

        {
            uint32_t howMany = 0;
            if (HasCurrent())
            {
                do
                {
                    if (howMany >= values.size()) break;

                    values[howMany] = Current();
                    howMany++;
                } while (MoveNext());
            }

            return howMany;
        }

bool HasCurrent ( ) [inline]

Definition at line 146 of file HashMap.h.

        {
            CheckMutationCount();
            return (m_iterator != m_map.get()->End());
        }

bool MoveNext ( ) [inline]

Definition at line 152 of file HashMap.h.

        {
            CheckMutationCount();

            if (m_iterator != m_map.get()->End())
            {
                ++m_iterator;
                return (m_iterator != m_map.get()->End());
            }
            else
            {
                throw winrt::hresult_out_of_bounds();
            }
        }

Member Data Documentation

unsigned int m_expectedMutationCount = 0 [private]

Definition at line 194 of file HashMap.h.

T_iterator m_iterator [private]

Definition at line 192 of file HashMap.h.

The documentation for this class was generated from the following file:
  • Collections/HashMap.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: HashMap< K, V >::Iterator::KeyValuePair Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • HashMap< K, V >
  • HashMap< K, V >::Iterator
  • HashMap< K, V >::Iterator::KeyValuePair
Public Member Functions

HashMap< K, V >::Iterator::KeyValuePair Class Reference

Inherits ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type >.

List of all members.

Public Member Functions

KeyValuePair (K const &key, V const &value)
K | Key ()
V | Value ()

Detailed Description

template<typename K, typename V>
class HashMap< K, V >::Iterator::KeyValuePair

Definition at line 196 of file HashMap.h.

Constructor & Destructor Documentation

KeyValuePair | ( | K const & | key,
 |  | V const & | value |
 | ) |  |  | [inline]

Definition at line 203 of file HashMap.h.

            {
                m_key.set(key);
                m_value.set(value);
            }

Member Function Documentation

K Key ( ) [inline]

Definition at line 209 of file HashMap.h.

            {
                return m_key.get();
            }

V Value ( ) [inline]

Definition at line 214 of file HashMap.h.

            {
                return m_value.get();
            }

The documentation for this class was generated from the following file:
  • Collections/HashMap.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Hsv Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

Hsv Class Reference

#include "ColorConversion.h"

List of all members.

Public Member Functions

Hsv ()
Hsv (double h, double s, double v)

Detailed Description

Definition at line 19 of file ColorConversion.h.

Constructor & Destructor Documentation

Hsv ( )
Hsv | ( | double | h,
 |  | double | s,
 |  | double | v
 | ) |  |
The documentation for this class was generated from the following file:
  • Common/ColorConversion.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IFlowLayoutAlgorithmDelegates Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

IFlowLayoutAlgorithmDelegates Class Reference

#include "IFlowLayoutAlgorithmDelegates.h"

Inherited by FlowLayout, StackLayout, and UniformGridLayout.

List of all members.

Public Member Functions

virtual | ~IFlowLayoutAlgorithmDelegates ()
virtual winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForRealizationRect (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0
virtual winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForTargetElement (int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0
virtual winrt::Rect | Algorithm_GetExtent (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds)=0
virtual winrt::Size | Algorithm_GetMeasureSize (int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0
virtual winrt::Size | Algorithm_GetProvisionalArrangeSize (int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context)=0
virtual void | Algorithm_OnElementMeasured (const winrt::UIElement &element, int index, const winrt::Size &availableSize, const winrt::Size &measureSize, const winrt::Size &desiredSize, const winrt::Size &provisionalArrangeSize, const winrt::VirtualizingLayoutContext &context)=0
virtual void | Algorithm_OnLineArranged (int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext &context)=0
virtual bool | Algorithm_ShouldBreakLine (int index, double remainingSpace)=0

Detailed Description

Definition at line 6 of file IFlowLayoutAlgorithmDelegates.h.

Constructor & Destructor Documentation

virtual ~IFlowLayoutAlgorithmDelegates ( ) [virtual]

Member Function Documentation

virtual winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForRealizationRect | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [pure virtual]
virtual winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForTargetElement | ( | int | targetIndex,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [pure virtual]
virtual winrt::Rect Algorithm_GetExtent | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | const winrt::UIElement & | firstRealized,
 |  | int | firstRealizedItemIndex,
 |  | const winrt::Rect & | firstRealizedLayoutBounds,
 |  | const winrt::UIElement & | lastRealized,
 |  | int | lastRealizedItemIndex,
 |  | const winrt::Rect & | lastRealizedLayoutBounds |
 | ) |  |  | [pure virtual]
virtual winrt::Size Algorithm_GetMeasureSize | ( | int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [pure virtual]
virtual winrt::Size Algorithm_GetProvisionalArrangeSize | ( | int | index,
 |  | const winrt::Size & | measureSize,
 |  | winrt::Size const & | desiredSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [pure virtual]
virtual void Algorithm_OnElementMeasured | ( | const winrt::UIElement & | element,
 |  | int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::Size & | measureSize,
 |  | const winrt::Size & | desiredSize,
 |  | const winrt::Size & | provisionalArrangeSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [pure virtual]
virtual void Algorithm_OnLineArranged | ( | int | startIndex,
 |  | int | countInLine,
 |  | double | lineSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [pure virtual]
virtual bool Algorithm_ShouldBreakLine | ( | int | index,
 |  | double | remainingSpace |
 | ) |  |  | [pure virtual]
The documentation for this class was generated from the following file:
  • Repeater/IFlowLayoutAlgorithmDelegates.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ImageIcon Class Reference

#include "ImageIcon.h"

Inherits ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon >, and ImageIconProperties.

List of all members.

Public Member Functions

ImageIcon ()
~ImageIcon ()
void | OnApplyTemplate ()
void | OnSourcePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Detailed Description

Definition at line 12 of file ImageIcon.h.

Constructor & Destructor Documentation

ImageIcon ( )
~ImageIcon ( ) [inline]

Definition at line 19 of file ImageIcon.h.

{}

Member Function Documentation

void OnApplyTemplate ( )
void OnSourcePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
The documentation for this class was generated from the following file:
  • ImageIcon/ImageIcon.h
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIconProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ImageIconProperties Class Reference

#include "ImageIcon.properties.h"

Inherited by ImageIcon.

List of all members.

Public Member Functions

ImageIconProperties ()
winrt::ImageSource | Source ()
void | Source (winrt::ImageSource const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static void | OnSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SourceProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_SourceProperty

Detailed Description

Definition at line 7 of file ImageIcon.properties.h.

Constructor & Destructor Documentation

ImageIconProperties ( )

Definition at line 18 of file ImageIcon.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file ImageIcon.properties.cpp.

{
    s_SourceProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file ImageIcon.properties.cpp.

{
    if (!s_SourceProperty)
    {
        s_SourceProperty =
            InitializeDependencyProperty(
                L"Source",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::ImageIcon>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnSourcePropertyChanged));
    }
}

void OnSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 43 of file ImageIcon.properties.cpp.

{
    auto owner = sender.as<winrt::ImageIcon>();
    winrt::get_self<ImageIcon>(owner)->OnSourcePropertyChanged(args);
}

winrt::ImageSource Source ( )

Definition at line 59 of file ImageIcon.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<ImageIcon*>(this)->GetValue(s_SourceProperty));
}

void Source ( winrt::ImageSource const & value )

Definition at line 51 of file ImageIcon.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ImageIcon*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SourceProperty ( ) [inline, static]

Definition at line 15 of file ImageIcon.properties.h.

{ return s_SourceProperty; }

Member Data Documentation

GlobalDependencyProperty s_SourceProperty [static]

Definition at line 17 of file ImageIcon.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ImageIcon.properties.h
  • Generated/ImageIcon.properties.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIconSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ImageIconSource Class Reference

#include "ImageIconSource.h"

Inherits ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource >, and ImageIconSourceProperties.

List of all members.

Public Member Functions

winrt::IconElement | CreateIconElementCore ()
winrt::DependencyProperty | GetIconElementPropertyCore (winrt::DependencyProperty sourceProperty)

Detailed Description

Definition at line 9 of file ImageIconSource.h.

Member Function Documentation

winrt::IconElement CreateIconElementCore ( )

Definition at line 9 of file ImageIconSource.cpp.

{
    winrt::ImageIcon imageIcon;
    if (const auto imageSource = ImageSource())
    {
        imageIcon.Source(imageSource);
    }
    if (const auto newForeground = Foreground())
    {
        imageIcon.Foreground(newForeground);
    }
    return imageIcon;
}

winrt::DependencyProperty GetIconElementPropertyCore ( winrt::DependencyProperty sourceProperty )

Definition at line 23 of file ImageIconSource.cpp.

{
    if (sourceProperty == s_ImageSourceProperty)
    {
        return winrt::ImageIcon::SourceProperty();
    }

    return __super::GetIconElementPropertyCore(sourceProperty);
}

The documentation for this class was generated from the following files:
  • IconSource/ImageIconSource.h
  • IconSource/ImageIconSource.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIconSourceProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ImageIconSourceProperties Class Reference

#include "ImageIconSource.properties.h"

Inherited by ImageIconSource.

List of all members.

Public Member Functions

ImageIconSourceProperties ()
winrt::ImageSource | ImageSource ()
void | ImageSource (winrt::ImageSource const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ImageSourceProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ImageSourceProperty

Detailed Description

Definition at line 7 of file ImageIconSource.properties.h.

Constructor & Destructor Documentation

ImageIconSourceProperties ( )

Definition at line 18 of file ImageIconSource.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file ImageIconSource.properties.cpp.

{
    s_ImageSourceProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file ImageIconSource.properties.cpp.

{
    if (!s_ImageSourceProperty)
    {
        s_ImageSourceProperty =
            InitializeDependencyProperty(
                L"ImageSource",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::ImageIconSource>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::ImageSource ImageSource ( )

Definition at line 51 of file ImageIconSource.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<ImageIconSource*>(this)->GetValue(s_ImageSourceProperty));
}

void ImageSource ( winrt::ImageSource const & value )

Definition at line 43 of file ImageIconSource.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ImageIconSource*>(this)->SetValue(s_ImageSourceProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ImageSourceProperty ( ) [inline, static]

Definition at line 15 of file ImageIconSource.properties.h.

{ return s_ImageSourceProperty; }

Member Data Documentation

GlobalDependencyProperty s_ImageSourceProperty [static]

Definition at line 17 of file ImageIconSource.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ImageIconSource.properties.h
  • Generated/ImageIconSource.properties.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IndexPath Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Attributes

IndexPath Class Reference

#include "IndexPath.h"

List of all members.

Public Member Functions

IndexPath (int index)
IndexPath (int groupIndex, int itemIndex)
IndexPath (const std::vector< int > &indices)
IndexPath (const winrt::IVector< int > &indices)
winrt::IndexPath | CloneWithChildIndex (int childIndex) const
int32_t | CompareTo (winrt::IndexPath const &rhs)
int32_t | GetAt (int index)
int32_t | GetSize ()
bool | IsValid () const
hstring | ToString ()

Static Public Member Functions

template<typename... Args>
static winrt::IndexPath | CreateFrom (Args &&...args)
template<typename T >
static winrt::IndexPath | CreateFromIndices (T &&indices)

Private Attributes

std::vector< int > | m_path

Detailed Description

Definition at line 8 of file IndexPath.h.

Constructor & Destructor Documentation

IndexPath ( int index )

Definition at line 11 of file IndexPath.cpp.

{
    m_path.emplace_back(index);
}

IndexPath | ( | int | groupIndex,
 |  | int | itemIndex
 | ) |  |

Definition at line 16 of file IndexPath.cpp.

{
    m_path.emplace_back(groupIndex);
    m_path.emplace_back(itemIndex);
}

IndexPath ( const winrt::IVector< int > & indices )

Definition at line 22 of file IndexPath.cpp.

{
    if (indices)
    {
        for (auto i = 0u; i < indices.Size(); i++)
        {
            m_path.emplace_back(indices.GetAt(i));
        }
    }
}

IndexPath ( const std::vector< int > & indices )

Definition at line 33 of file IndexPath.cpp.

{
    for (auto i = 0u; i < indices.size(); i++)
    {
        m_path.emplace_back(indices[i]);
    }
}

Member Function Documentation

winrt::IndexPath CloneWithChildIndex ( int childIndex ) const

Definition at line 127 of file IndexPath.cpp.

{
    auto newPath = std::vector<int>(m_path);
    newPath.emplace_back(childIndex);
    return winrt::make<IndexPath>(newPath);
}

int32_t CompareTo ( winrt::IndexPath const & rhs )

Definition at line 53 of file IndexPath.cpp.

{
    const auto rhsPath = winrt::get_self<IndexPath>(rhs);
    int compareResult = 0;
    const int lhsCount = static_cast<int>(m_path.size());
    const int rhsCount = static_cast<int>(rhsPath->m_path.size());

    if (lhsCount == 0 || rhsCount == 0)
    {
        // one of the paths are empty, compare based on size
        compareResult = (lhsCount - rhsCount);
    }
    else
    {
        // both paths are non-empty, but can be of different size
        for (int i = 0; i < std::min(lhsCount, rhsCount); i++)
        {
            if (m_path[i] < rhsPath->m_path[i])
            {
                compareResult = -1;
                break;
            }
            else if (m_path[i] > rhsPath->m_path[i])
            {
                compareResult = 1;
                break;
            }
        }

        // if both match upto min(lhsCount, rhsCount), compare based on size
        compareResult = compareResult == 0 ? (lhsCount - rhsCount) : compareResult;
    }

    if (compareResult != 0)
    {
        compareResult = compareResult > 0 ? 1 : -1;
    }

    return compareResult;
}

static winrt::IndexPath CreateFrom ( Args &&... args ) [inline, static]

Definition at line 17 of file IndexPath.h.

    {
        return winrt::make<IndexPath>(std::forward<Args>(args) ...);
    }

static winrt::IndexPath CreateFromIndices ( T && indices ) [inline, static]

Definition at line 23 of file IndexPath.h.

    {
        return winrt::make<IndexPath>(std::forward<T>(indices));
    }

int32_t GetAt ( int index )

Definition at line 48 of file IndexPath.cpp.

{
    return m_path.at(index);
}

int32_t GetSize ( )

Definition at line 43 of file IndexPath.cpp.

{
    return static_cast<int>(m_path.size());
}

bool IsValid ( ) const

Definition at line 112 of file IndexPath.cpp.

{
    bool isValid = true;
    for (int i = 0; i < static_cast<int>(m_path.size()); i++)
    {
        if (m_path[i] < 0)
        {
            isValid = false;
            break;
        }
    }

    return isValid;
}

hstring ToString ( )

Definition at line 98 of file IndexPath.cpp.

{
    std::wstring result = L"R";
    for (const int index : m_path)
    {
        result.append(L".");
        result = result + std::to_wstring(index);
    }

    return hstring{ result };
}

Member Data Documentation

std::vector<int> m_path [private]

Definition at line 42 of file IndexPath.h.

The documentation for this class was generated from the following files:
  • Repeater/IndexPath.h
  • Repeater/IndexPath.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IndexRange Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

IndexRange Struct Reference

#include "IndexRange.h"

List of all members.

Public Member Functions

IndexRange ()
IndexRange (int begin, int end)
int | Begin () const
bool | Contains (int index) const
int | End () const
bool | Intersects (const IndexRange &other) const
bool | operator== (const IndexRange &rhs) const
bool | Split (int splitIndex, IndexRange &before, IndexRange &after)

Private Attributes

int | m_begin = -1
int | m_end = -1

Detailed Description

Definition at line 7 of file IndexRange.h.

Constructor & Destructor Documentation

IndexRange ( )
IndexRange | ( | int | begin,
 |  | int | end
 | ) |  |

Definition at line 7 of file IndexRange.cpp.

{
    // Accept out of order begin/end pairs, just swap them.
    if (begin > end)
    {
        const int temp = begin;
        begin = end;
        end = temp;
    }

    MUX_ASSERT(begin <= end);

    m_begin = begin;
    m_end = end;
}

Member Function Documentation

int Begin ( ) const

Definition at line 23 of file IndexRange.cpp.

{
    return m_begin;
}

bool Contains ( int index ) const

Definition at line 33 of file IndexRange.cpp.

{
    return index >= m_begin && index <= m_end;
}

int End ( ) const

Definition at line 28 of file IndexRange.cpp.

{
    return m_end;
}

bool Intersects ( const IndexRange & other ) const

Definition at line 59 of file IndexRange.cpp.

{
    return ((m_begin <= other.End()) && (m_end >= other.Begin()));
}

bool operator== ( const IndexRange & rhs ) const

Definition at line 64 of file IndexRange.cpp.

{
    return m_begin == rhs.m_begin && m_end == rhs.m_end;
}

bool Split | ( | int | splitIndex,
 |  | IndexRange & | before,
 |  | IndexRange & | after
 | ) |  |

Definition at line 38 of file IndexRange.cpp.

{
    MUX_ASSERT(Contains(splitIndex));

    bool afterIsValid;

    before = IndexRange(m_begin, splitIndex);
    if (splitIndex < m_end)
    {
        after = IndexRange(splitIndex + 1, m_end);
        afterIsValid = true;
    }
    else
    {
        after = IndexRange();
        afterIsValid = false;
    }

    return afterIsValid;
}

Member Data Documentation

int m_begin = -1 [private]

Definition at line 21 of file IndexRange.h.

int m_end = -1 [private]

Definition at line 22 of file IndexRange.h.

The documentation for this struct was generated from the following files:
  • Repeater/IndexRange.h
  • Repeater/IndexRange.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

InfoBadge Class Reference

#include "InfoBadge.h"

Inherits ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT >, and InfoBadgeProperties.

List of all members.

Public Member Functions

InfoBadge ()
~InfoBadge ()
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | OnApplyTemplate ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | OnDisplayKindPropertiesChanged ()
void | OnSizeChanged (const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args)

Detailed Description

Definition at line 14 of file InfoBadge.h.

Constructor & Destructor Documentation

InfoBadge ( )

Definition at line 12 of file InfoBadge.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_InfoBadge);

    SetDefaultStyleKey(this);

    SetValue(s_TemplateSettingsProperty, winrt::make<::InfoBadgeTemplateSettings>());
    SizeChanged({ this, &InfoBadge::OnSizeChanged });
}

~InfoBadge ( ) [inline]

Definition at line 21 of file InfoBadge.h.

{}

Member Function Documentation

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 29 of file InfoBadge.cpp.

{
    auto const defaultDesiredSize = __super::MeasureOverride(availableSize);
    if (defaultDesiredSize.Width < defaultDesiredSize.Height)
    {
        return { defaultDesiredSize.Height, defaultDesiredSize.Height };
    }
    return defaultDesiredSize;
}

void OnApplyTemplate ( )

Definition at line 22 of file InfoBadge.cpp.

{
    winrt::IControlProtected controlProtected{ *this };

    OnDisplayKindPropertiesChanged();
}

void OnDisplayKindPropertiesChanged ( ) [private]

Definition at line 59 of file InfoBadge.cpp.

{
    winrt::Control const thisAsControl = *this;
    if (Value() >= 0)
    {
        winrt::VisualStateManager::GoToState(thisAsControl, L"Value", true);
    }
    else if (auto const iconSource = IconSource())
    {
        TemplateSettings().IconElement(SharedHelpers::MakeIconElementFrom(iconSource));

        if (auto const fontIconSource = iconSource.try_as<winrt::FontIconSource>())
        {
            winrt::VisualStateManager::GoToState(thisAsControl, L"FontIcon", true);
        }
        else
        {
            winrt::VisualStateManager::GoToState(thisAsControl, L"Icon", true);
        }
    }
    else
    {
        winrt::VisualStateManager::GoToState(thisAsControl, L"Dot", true);
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 39 of file InfoBadge.cpp.

{
    auto const property = args.Property();
    winrt::Control const thisAsControl = *this;

    if (property == winrt::InfoBadge::ValueProperty())
    {
        if (Value() < -1)
        {
            throw winrt::hresult_out_of_bounds(L"Value must be equal to or greater than -1");
        }
    }

    if (property == winrt::InfoBadge::ValueProperty() ||
             property == winrt::InfoBadge::IconSourceProperty())
    {
        OnDisplayKindPropertiesChanged();
    }
}

void OnSizeChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 86 of file InfoBadge.cpp.

{
    auto const value = [this]()
    {
        auto const cornerRadiusValue = ActualHeight() / 2;
        if (ReadLocalValue(winrt::Control::CornerRadiusProperty()) == winrt::DependencyProperty::UnsetValue())
        {
            return winrt::CornerRadius{ cornerRadiusValue, cornerRadiusValue, cornerRadiusValue, cornerRadiusValue };
        }
        else
        {
            return CornerRadius();
        }
        return winrt::CornerRadius{ cornerRadiusValue, cornerRadiusValue, cornerRadiusValue, cornerRadiusValue };
    }();

    TemplateSettings().InfoBadgeCornerRadius(value);
}

The documentation for this class was generated from the following files:
  • InfoBadge/InfoBadge.h
  • InfoBadge/InfoBadge.cpp
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadgeProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InfoBadgeProperties Class Reference

#include "InfoBadge.properties.h"

Inherited by InfoBadge.

List of all members.

Public Member Functions

InfoBadgeProperties ()
void | IconSource (winrt::IconSource const &value)
winrt::IconSource | IconSource ()
winrt::InfoBadgeTemplateSettings | TemplateSettings ()
void | TemplateSettings (winrt::InfoBadgeTemplateSettings const &value)
void | Value (int value)
int | Value ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconSourceProperty ()
static void | OnIconSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTemplateSettingsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TemplateSettingsProperty ()
static winrt::DependencyProperty | ValueProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconSourceProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty
static GlobalDependencyProperty | s_ValueProperty

Detailed Description

Definition at line 7 of file InfoBadge.properties.h.

Constructor & Destructor Documentation

InfoBadgeProperties ( )

Definition at line 20 of file InfoBadge.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 62 of file InfoBadge.properties.cpp.

{
    s_IconSourceProperty = nullptr;
    s_TemplateSettingsProperty = nullptr;
    s_ValueProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 25 of file InfoBadge.properties.cpp.

{
    if (!s_IconSourceProperty)
    {
        s_IconSourceProperty =
            InitializeDependencyProperty(
                L"IconSource",
                winrt::name_of<winrt::IconSource>(),
                winrt::name_of<winrt::InfoBadge>(),
                false /* isAttached */,
                ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIconSourcePropertyChanged));
    }
    if (!s_TemplateSettingsProperty)
    {
        s_TemplateSettingsProperty =
            InitializeDependencyProperty(
                L"TemplateSettings",
                winrt::name_of<winrt::InfoBadgeTemplateSettings>(),
                winrt::name_of<winrt::InfoBadge>(),
                false /* isAttached */,
                ValueHelper<winrt::InfoBadgeTemplateSettings>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnTemplateSettingsPropertyChanged));
    }
    if (!s_ValueProperty)
    {
        s_ValueProperty =
            InitializeDependencyProperty(
                L"Value",
                winrt::name_of<int>(),
                winrt::name_of<winrt::InfoBadge>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(-1),
                winrt::PropertyChangedCallback(&OnValuePropertyChanged));
    }
}

void IconSource ( winrt::IconSource const & value )

Definition at line 93 of file InfoBadge.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBadge*>(this)->SetValue(s_IconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
    }
}

winrt::IconSource IconSource ( )

Definition at line 101 of file InfoBadge.properties.cpp.

{
    return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<InfoBadge*>(this)->GetValue(s_IconSourceProperty));
}

static winrt::DependencyProperty IconSourceProperty ( ) [inline, static]

Definition at line 21 of file InfoBadge.properties.h.

{ return s_IconSourceProperty; }

void OnIconSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 69 of file InfoBadge.properties.cpp.

{
    auto owner = sender.as<winrt::InfoBadge>();
    winrt::get_self<InfoBadge>(owner)->OnPropertyChanged(args);
}

void OnTemplateSettingsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 77 of file InfoBadge.properties.cpp.

{
    auto owner = sender.as<winrt::InfoBadge>();
    winrt::get_self<InfoBadge>(owner)->OnPropertyChanged(args);
}

void OnValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 85 of file InfoBadge.properties.cpp.

{
    auto owner = sender.as<winrt::InfoBadge>();
    winrt::get_self<InfoBadge>(owner)->OnPropertyChanged(args);
}

winrt::InfoBadgeTemplateSettings TemplateSettings ( )

Definition at line 114 of file InfoBadge.properties.cpp.

{
    return ValueHelper<winrt::InfoBadgeTemplateSettings>::CastOrUnbox(static_cast<InfoBadge*>(this)->GetValue(s_TemplateSettingsProperty));
}

void TemplateSettings ( winrt::InfoBadgeTemplateSettings const & value )

Definition at line 106 of file InfoBadge.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBadge*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::InfoBadgeTemplateSettings>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 22 of file InfoBadge.properties.h.

{ return s_TemplateSettingsProperty; }

void Value ( int value )

Definition at line 119 of file InfoBadge.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBadge*>(this)->SetValue(s_ValueProperty, ValueHelper<int>::BoxValueIfNecessary(value));
    }
}

int Value ( )

Definition at line 127 of file InfoBadge.properties.cpp.

{
    return ValueHelper<int>::CastOrUnbox(static_cast<InfoBadge*>(this)->GetValue(s_ValueProperty));
}

static winrt::DependencyProperty ValueProperty ( ) [inline, static]

Definition at line 23 of file InfoBadge.properties.h.

{ return s_ValueProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconSourceProperty [static]

Definition at line 25 of file InfoBadge.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 26 of file InfoBadge.properties.h.

GlobalDependencyProperty s_ValueProperty [static]

Definition at line 27 of file InfoBadge.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InfoBadge.properties.h
  • Generated/InfoBadge.properties.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadgeTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InfoBadgeTemplateSettings Class Reference

#include "InfoBadgeTemplateSettings.h"

Inherits InfoBadgeTemplateSettingsProperties.

List of all members.

Public Member Functions

InfoBadgeTemplateSettings ()

Detailed Description

Definition at line 10 of file InfoBadgeTemplateSettings.h.

Constructor & Destructor Documentation

InfoBadgeTemplateSettings ( )

Definition at line 8 of file InfoBadgeTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • InfoBadge/InfoBadgeTemplateSettings.h
  • InfoBadge/InfoBadgeTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadgeTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InfoBadgeTemplateSettingsProperties Class Reference

#include "InfoBadgeTemplateSettings.properties.h"

Inherited by InfoBadgeTemplateSettings.

List of all members.

Public Member Functions

InfoBadgeTemplateSettingsProperties ()
void | IconElement (winrt::IconElement const &value)
winrt::IconElement | IconElement ()
void | InfoBadgeCornerRadius (winrt::CornerRadius const &value)
winrt::CornerRadius | InfoBadgeCornerRadius ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconElementProperty ()
static winrt::DependencyProperty | InfoBadgeCornerRadiusProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconElementProperty
static GlobalDependencyProperty | s_InfoBadgeCornerRadiusProperty

Detailed Description

Definition at line 7 of file InfoBadgeTemplateSettings.properties.h.

Constructor & Destructor Documentation

InfoBadgeTemplateSettingsProperties ( )

Definition at line 19 of file InfoBadgeTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file InfoBadgeTemplateSettings.properties.cpp.

{
    s_IconElementProperty = nullptr;
    s_InfoBadgeCornerRadiusProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file InfoBadgeTemplateSettings.properties.cpp.

{
    if (!s_IconElementProperty)
    {
        s_IconElementProperty =
            InitializeDependencyProperty(
                L"IconElement",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::InfoBadgeTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_InfoBadgeCornerRadiusProperty)
    {
        s_InfoBadgeCornerRadiusProperty =
            InitializeDependencyProperty(
                L"InfoBadgeCornerRadius",
                winrt::name_of<winrt::CornerRadius>(),
                winrt::name_of<winrt::InfoBadgeTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::CornerRadius>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IconElement IconElement ( )

Definition at line 64 of file InfoBadgeTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<InfoBadgeTemplateSettings*>(this)->GetValue(s_IconElementProperty));
}

void IconElement ( winrt::IconElement const & value )

Definition at line 56 of file InfoBadgeTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBadgeTemplateSettings*>(this)->SetValue(s_IconElementProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconElementProperty ( ) [inline, static]

Definition at line 18 of file InfoBadgeTemplateSettings.properties.h.

{ return s_IconElementProperty; }

winrt::CornerRadius InfoBadgeCornerRadius ( )

Definition at line 77 of file InfoBadgeTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::CornerRadius>::CastOrUnbox(static_cast<InfoBadgeTemplateSettings*>(this)->GetValue(s_InfoBadgeCornerRadiusProperty));
}

void InfoBadgeCornerRadius ( winrt::CornerRadius const & value )

Definition at line 69 of file InfoBadgeTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBadgeTemplateSettings*>(this)->SetValue(s_InfoBadgeCornerRadiusProperty, ValueHelper<winrt::CornerRadius>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty InfoBadgeCornerRadiusProperty ( ) [inline, static]

Definition at line 19 of file InfoBadgeTemplateSettings.properties.h.

{ return s_InfoBadgeCornerRadiusProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconElementProperty [static]

Definition at line 21 of file InfoBadgeTemplateSettings.properties.h.

GlobalDependencyProperty s_InfoBadgeCornerRadiusProperty [static]

Definition at line 22 of file InfoBadgeTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InfoBadgeTemplateSettings.properties.h
  • Generated/InfoBadgeTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

InfoBar Class Reference

#include "InfoBar.h"

Inherits ReferenceTracker< InfoBar, winrt::implementation::InfoBarT >, and InfoBarProperties.

List of all members.

Public Member Functions

InfoBar ()
~InfoBar ()
void | OnActionButtonPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnIconSourcePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsClosablePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsIconVisiblePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsOpenPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMessagePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSeverityPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnTitlePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

const winrt::hstring | GetCloseButtonResourceName (winrt::InfoBarSeverity severity)
const winrt::hstring | GetIconSeverityLevelResourceName (winrt::InfoBarSeverity severity)
const winrt::hstring | GetSeverityLevelResourceName (winrt::InfoBarSeverity severity)
void | OnCloseButtonClick (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnForegroundChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | RaiseClosedEvent ()
void | RaiseClosingEvent ()
void | UpdateCloseButton ()
void | UpdateContentPosition ()
void | UpdateForeground ()
void | UpdateIcon ()
void | UpdateIconVisibility ()
void | UpdateSeverity ()
void | UpdateVisibility (bool notify=true, bool force=false)

Detailed Description

Definition at line 12 of file InfoBar.h.

Constructor & Destructor Documentation

InfoBar ( )

Definition at line 19 of file InfoBar.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_InfoBar);

    SetValue(s_TemplateSettingsProperty, winrt::make<::InfoBarTemplateSettings>());

    RegisterPropertyChangedCallback(winrt::Control::ForegroundProperty(), { this, &InfoBar::OnForegroundChanged });

    SetDefaultStyleKey(this);
}

~InfoBar ( ) [inline]

Definition at line 19 of file InfoBar.h.

{}

Member Function Documentation

const winrt::hstring GetCloseButtonResourceName ( winrt::InfoBarSeverity severity ) [private]
const winrt::hstring GetIconSeverityLevelResourceName ( winrt::InfoBarSeverity severity ) [private]

Definition at line 285 of file InfoBar.cpp.

{
    switch (severity)
    {
    case winrt::InfoBarSeverity::Success: return SR_InfoBarIconSeveritySuccessName;
    case winrt::InfoBarSeverity::Warning: return SR_InfoBarIconSeverityWarningName;
    case winrt::InfoBarSeverity::Error: return SR_InfoBarIconSeverityErrorName;
    };
    return SR_InfoBarIconSeverityInformationalName;
}

const winrt::hstring GetSeverityLevelResourceName ( winrt::InfoBarSeverity severity ) [private]

Definition at line 274 of file InfoBar.cpp.

{
    switch (severity)
    {
    case winrt::InfoBarSeverity::Success: return SR_InfoBarSeveritySuccessName;
    case winrt::InfoBarSeverity::Warning: return SR_InfoBarSeverityWarningName;
    case winrt::InfoBarSeverity::Error: return SR_InfoBarSeverityErrorName;
    };
    return SR_InfoBarSeverityInformationalName;
}

void OnActionButtonPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 136 of file InfoBar.cpp.

{
    UpdateContentPosition();
}

void OnApplyTemplate ( )

Definition at line 35 of file InfoBar.cpp.

{
    m_applyTemplateCalled = true;

    winrt::IControlProtected controlProtected{ *this };

    if (const auto closeButton = GetTemplateChildT<winrt::Button>(c_closeButtonName, controlProtected))
    {
        m_closeButtonClickRevoker = closeButton.Click(winrt::auto_revoke, { this, &InfoBar::OnCloseButtonClick });

        // Do localization for the close button
        if (winrt::AutomationProperties::GetName(closeButton).empty())
        {
            const auto closeButtonName = ResourceAccessor::GetLocalizedStringResource(SR_InfoBarCloseButtonName);
            winrt::AutomationProperties::SetName(closeButton, closeButtonName);
        }
        // Setup the tooltip for the close button
        auto tooltip = winrt::ToolTip();
        const auto closeButtonTooltipText = ResourceAccessor::GetLocalizedStringResource(SR_InfoBarCloseButtonTooltip);
        tooltip.Content(box_value(closeButtonTooltipText));
        winrt::ToolTipService::SetToolTip(closeButton, tooltip);
    }

    if (const auto iconTextblock = GetTemplateChildT<winrt::FrameworkElement>(c_iconTextBlockName, controlProtected))
    {
        m_standardIconTextBlock.set(iconTextblock);
        winrt::AutomationProperties::SetName(iconTextblock, ResourceAccessor::GetLocalizedStringResource(GetIconSeverityLevelResourceName(Severity())));
    }

    winrt::AutomationProperties::SetLocalizedLandmarkType(*this, ResourceAccessor::GetLocalizedStringResource(SR_InfoBarCustomLandmarkName));

    UpdateVisibility(m_notifyOpen, true);
    m_notifyOpen = false;

    UpdateSeverity();
    UpdateIcon();
    UpdateIconVisibility();
    UpdateCloseButton();
    UpdateForeground();
    UpdateContentPosition();
}

void OnCloseButtonClick | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 77 of file InfoBar.cpp.

{
    m_closeButtonClickEventSource(*this, nullptr);
    m_lastCloseReason = winrt::InfoBarCloseReason::CloseButton;
    IsOpen(false);
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 30 of file InfoBar.cpp.

{
    return winrt::make<InfoBarAutomationPeer>(*this);
}

void OnForegroundChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 258 of file InfoBar.cpp.

{
    UpdateForeground();
}

void OnIconSourcePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 146 of file InfoBar.cpp.

{
    UpdateIcon();
    UpdateIconVisibility();
}

void OnIsClosablePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 157 of file InfoBar.cpp.

{
    UpdateCloseButton();
}

void OnIsIconVisiblePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 152 of file InfoBar.cpp.

{
    UpdateIconVisibility();
}

void OnIsOpenPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 111 of file InfoBar.cpp.

{
    if (IsOpen())
    {
        //Reset the close reason to the default value of programmatic.
        m_lastCloseReason = winrt::InfoBarCloseReason::Programmatic;

        UpdateVisibility();
    }
    else
    {
        RaiseClosingEvent();
    }
}

void OnMessagePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 131 of file InfoBar.cpp.

{
    UpdateContentPosition();
}

void OnSeverityPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 141 of file InfoBar.cpp.

{
    UpdateSeverity();
}

void OnTitlePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 126 of file InfoBar.cpp.

{
    UpdateContentPosition();
}

void RaiseClosedEvent ( ) [private]

Definition at line 104 of file InfoBar.cpp.

{
    auto const args = winrt::make_self<InfoBarClosedEventArgs>();
    args->Reason(m_lastCloseReason);
    m_closedEventSource(*this, *args);
}

void RaiseClosingEvent ( ) [private]

Definition at line 84 of file InfoBar.cpp.

{
    auto const args = winrt::make_self<InfoBarClosingEventArgs>();
    args->Reason(m_lastCloseReason);

    m_closingEventSource(*this, *args);

    if (!args->Cancel())
    {
        UpdateVisibility();
        RaiseClosedEvent();
    }
    else
    {
        // The developer has changed the Cancel property to true,
        // so we need to revert the IsOpen property to true.
        IsOpen(true);
    }
}

void UpdateCloseButton ( ) [private]

Definition at line 253 of file InfoBar.cpp.

{
    winrt::VisualStateManager::GoToState(*this, IsClosable() ? L"CloseButtonVisible" : L"CloseButtonCollapsed", false);
}

void UpdateContentPosition ( ) [private]

Definition at line 269 of file InfoBar.cpp.

{
    // If we don't have either a title or a message, then the content should move up
    winrt::VisualStateManager::GoToState(*this, Title().empty() && Message().empty() && !ActionButton() ? L"NoBannerContent" : L"BannerContent", false);
}

void UpdateForeground ( ) [private]

Definition at line 263 of file InfoBar.cpp.

{
    // If Foreground is set, then change Title and Message Foreground to match.
    winrt::VisualStateManager::GoToState(*this, ReadLocalValue(winrt::Control::ForegroundProperty()) == winrt::DependencyProperty::UnsetValue() ? L"ForegroundNotSet" : L"ForegroundSet", false);
}

void UpdateIcon ( ) [private]

Definition at line 235 of file InfoBar.cpp.

{
    auto const templateSettings = winrt::get_self<::InfoBarTemplateSettings>(TemplateSettings());
    if (auto const source = IconSource())
    {
        templateSettings->IconElement(SharedHelpers::MakeIconElementFrom(source));
    }
    else
    {
        templateSettings->IconElement(nullptr);
    }
}

void UpdateIconVisibility ( ) [private]

Definition at line 248 of file InfoBar.cpp.

{
    winrt::VisualStateManager::GoToState(*this, IsIconVisible() ? (IconSource() ? L"UserIconVisible" : L"StandardIconVisible") : L"NoIconVisible", false);
}

void UpdateSeverity ( ) [private]

Definition at line 210 of file InfoBar.cpp.

{
    auto severityState = L"Informational";

    switch (Severity())
    {
        case winrt::InfoBarSeverity::Success:
            severityState = L"Success";
            break;
        case winrt::InfoBarSeverity::Warning:
            severityState = L"Warning";
            break;
        case winrt::InfoBarSeverity::Error:
            severityState = L"Error";
            break;
    };

    if (const auto iconTextblock = m_standardIconTextBlock.get())
    {
        winrt::AutomationProperties::SetName(iconTextblock, ResourceAccessor::GetLocalizedStringResource(GetIconSeverityLevelResourceName(Severity())));
    }

    winrt::VisualStateManager::GoToState(*this, severityState, false);
}

void UpdateVisibility | ( | bool | notify = true,
 |  | bool | force = false |
 | ) |  |  | [private]

Definition at line 162 of file InfoBar.cpp.

{
    auto const peer = winrt::FrameworkElementAutomationPeer::FromElement(*this).try_as<winrt::InfoBarAutomationPeer>();
    if (!m_applyTemplateCalled)
    {
        // ApplyTemplate() hasn't been called yet but IsOpen has already been set.
        // Since this method will be called again shortly from ApplyTemplate, we'll just wait and send a notification then.
        m_notifyOpen = true;
    }
    else
    {
        // Don't do any work if nothing has changed (unless we are forcing a update)
        if (force || IsOpen() != m_isVisible)
        {
            if (IsOpen())
            {
                if (notify && peer)
                {
                    auto const notificationString = StringUtil::FormatString(
                        ResourceAccessor::GetLocalizedStringResource(SR_InfoBarOpenedNotification),
                        ResourceAccessor::GetLocalizedStringResource(GetIconSeverityLevelResourceName(Severity())).data(),
                        Title().data(),
                        Message().data());

                    winrt::get_self<InfoBarAutomationPeer>(peer)->RaiseOpenedEvent(Severity(), notificationString);
                }

                winrt::VisualStateManager::GoToState(*this, L"InfoBarVisible", false);
                winrt::AutomationProperties::SetAccessibilityView(*this, winrt::AccessibilityView::Control);
                m_isVisible = true;
            }
            else
            {
                if (notify && peer)
                {
                    auto const notificationString = ResourceAccessor::GetLocalizedStringResource(SR_InfoBarClosedNotification);

                    winrt::get_self<InfoBarAutomationPeer>(peer)->RaiseClosedEvent(Severity(), notificationString);
                }

                winrt::VisualStateManager::GoToState(*this, L"InfoBarCollapsed", false);
                winrt::AutomationProperties::SetAccessibilityView(*this, winrt::AccessibilityView::Raw);
                m_isVisible = false;
            }
        }
    }
}

The documentation for this class was generated from the following files:
  • InfoBar/InfoBar.h
  • InfoBar/InfoBar.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

InfoBarAutomationPeer Class Reference

#include "InfoBarAutomationPeer.h"

Inherits ReferenceTracker< InfoBarAutomationPeer, winrt::implementation::InfoBarAutomationPeerT >.

List of all members.

Public Member Functions

InfoBarAutomationPeer (winrt::InfoBar const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
void | RaiseClosedEvent (winrt::InfoBarSeverity severity, wstring_view const &displayString)
void | RaiseOpenedEvent (winrt::InfoBarSeverity severity, wstring_view const &displayString)

Private Member Functions

winrt::InfoBar | GetInfoBar ()
winrt::Peers::AutomationNotificationProcessing | GetProcessingForSeverity (winrt::InfoBarSeverity severity)

Detailed Description

Definition at line 5 of file InfoBarAutomationPeer.h.

Constructor & Destructor Documentation

InfoBarAutomationPeer ( winrt::InfoBar const & owner )

Definition at line 10 of file InfoBarAutomationPeer.cpp.

                                                                      : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 14 of file InfoBarAutomationPeer.cpp.

{
    return winrt::AutomationControlType::StatusBar;
}

winrt::hstring GetClassNameCore ( )

Definition at line 19 of file InfoBarAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::InfoBar>();
}

winrt::InfoBar GetInfoBar ( ) [private]

Definition at line 58 of file InfoBarAutomationPeer.cpp.

{
    winrt::UIElement owner = Owner();
    return owner.as<winrt::InfoBar>();
}

winrt::Peers::AutomationNotificationProcessing GetProcessingForSeverity ( winrt::InfoBarSeverity severity ) [private]

Definition at line 45 of file InfoBarAutomationPeer.cpp.

{
    winrt::Peers::AutomationNotificationProcessing processing = winrt::Peers::AutomationNotificationProcessing::CurrentThenMostRecent;

    if (severity == winrt::InfoBarSeverity::Error
        || severity == winrt::InfoBarSeverity::Warning)
    {
        processing = winrt::Peers::AutomationNotificationProcessing::ImportantAll;
    }

    return processing;
}

void RaiseClosedEvent | ( | winrt::InfoBarSeverity | severity,
 |  | wstring_view const & | displayString
 | ) |  |

Definition at line 33 of file InfoBarAutomationPeer.cpp.

{
    const winrt::Peers::AutomationNotificationProcessing processing = winrt::Peers::AutomationNotificationProcessing::CurrentThenMostRecent;

    RaiseNotificationEvent(
        winrt::Automation::Peers::AutomationNotificationKind::Other,
        GetProcessingForSeverity(severity),
        displayString,
        L"InfoBarClosedActivityId");
}

void RaiseOpenedEvent | ( | winrt::InfoBarSeverity | severity,
 |  | wstring_view const & | displayString
 | ) |  |

Definition at line 24 of file InfoBarAutomationPeer.cpp.

{
    RaiseNotificationEvent(
        winrt::Automation::Peers::AutomationNotificationKind::Other,
        GetProcessingForSeverity(severity),
        displayString,
        L"InfoBarOpenedActivityId");
}

The documentation for this class was generated from the following files:
  • InfoBar/InfoBarAutomationPeer.h
  • InfoBar/InfoBarAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarClosedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InfoBarClosedEventArgs Class Reference

#include "InfoBarClosedEventArgs.h"

List of all members.

Public Member Functions

winrt::InfoBarCloseReason | Reason ()
void | Reason (const winrt::InfoBarCloseReason &reason)

Detailed Description

Definition at line 5 of file InfoBarClosedEventArgs.h.

Member Function Documentation

winrt::InfoBarCloseReason Reason ( )

Definition at line 5 of file InfoBarClosedEventArgs.cpp.

{
    return m_reason;
}

void Reason ( const winrt::InfoBarCloseReason & reason )

Definition at line 10 of file InfoBarClosedEventArgs.cpp.

{
    m_reason = reason;
}

The documentation for this class was generated from the following files:
  • InfoBar/InfoBarClosedEventArgs.h
  • InfoBar/InfoBarClosedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarClosingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InfoBarClosingEventArgs Class Reference

#include "InfoBarClosingEventArgs.h"

Inherits ReferenceTracker< InfoBarClosingEventArgs, winrt::implementation::InfoBarClosingEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

bool | Cancel ()
void | Cancel (const bool cancel)
winrt::InfoBarCloseReason | Reason ()
void | Reason (const winrt::InfoBarCloseReason &reason)

Detailed Description

Definition at line 6 of file InfoBarClosingEventArgs.h.

Member Function Documentation

bool Cancel ( )

Definition at line 15 of file InfoBarClosingEventArgs.cpp.

{
    return m_cancel;
}

void Cancel ( const bool cancel )

Definition at line 20 of file InfoBarClosingEventArgs.cpp.

{
    m_cancel = cancel;
}

winrt::InfoBarCloseReason Reason ( )

Definition at line 5 of file InfoBarClosingEventArgs.cpp.

{
    return m_reason;
}

void Reason ( const winrt::InfoBarCloseReason & reason )

Definition at line 10 of file InfoBarClosingEventArgs.cpp.

{
    m_reason = reason;
}

The documentation for this class was generated from the following files:
  • InfoBar/InfoBarClosingEventArgs.h
  • InfoBar/InfoBarClosingEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarPanel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InfoBarPanel Class Reference

#include "InfoBarPanel.h"

Inherits ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT >, and InfoBarPanelProperties.

List of all members.

Public Member Functions

winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
winrt::Size | MeasureOverride (winrt::Size const &availableSize)

Detailed Description

Definition at line 8 of file InfoBarPanel.h.

Member Function Documentation

winrt::Size ArrangeOverride ( winrt::Size const & finalSize )

Definition at line 89 of file InfoBarPanel.cpp.

{
    winrt::Size result = finalSize;

    if (m_isVertical)
    {
        // Layout elements vertically
        const auto verticalOrientationPadding = VerticalOrientationPadding();
        float verticalOffset = (float)verticalOrientationPadding.Top;

        bool hasPreviousElement = false;
        for (winrt::UIElement const& child : Children())
        {
            if (auto childAsFe = child.try_as<winrt::FrameworkElement>())
            {
                auto const desiredSize = child.DesiredSize();
                if (desiredSize.Width != 0 && desiredSize.Height != 0)
                {
                    const auto verticalMargin = winrt::InfoBarPanel::GetVerticalOrientationMargin(child);

                    verticalOffset += hasPreviousElement ? (float)verticalMargin.Top : 0;
                    child.Arrange(winrt::Rect{ (float)verticalOrientationPadding.Left + (float)verticalMargin.Left, verticalOffset, desiredSize.Width, desiredSize.Height });
                    verticalOffset += desiredSize.Height + (float)verticalMargin.Bottom;

                    hasPreviousElement = true;
                }
            }
        }
    }
    else
    {
        // Layout elements horizontally
        const auto horizontalOrientationPadding = HorizontalOrientationPadding();
        float horizontalOffset = (float)horizontalOrientationPadding.Left;
        bool hasPreviousElement = false;

        const auto children = Children();
        const auto childCount = children.Size();
        for (unsigned int i=0; i< childCount; i++)
        {
            const auto child = children.GetAt(i);
            if (auto childAsFe = child.try_as<winrt::FrameworkElement>())
            {
                auto const desiredSize = child.DesiredSize();
                if (desiredSize.Width != 0 && desiredSize.Height != 0)
                {
                    auto horizontalMargin = winrt::InfoBarPanel::GetHorizontalOrientationMargin(child);

                    horizontalOffset += hasPreviousElement ? (float)horizontalMargin.Left : 0;
                    if (i < childCount - 1)
                    {
                        child.Arrange(winrt::Rect{ horizontalOffset, (float)horizontalOrientationPadding.Top + (float)horizontalMargin.Top, desiredSize.Width, desiredSize.Height });
                    }
                    else
                    {
                        // Give the rest of the horizontal space to the last child.
                        child.Arrange(winrt::Rect{ horizontalOffset, (float)horizontalOrientationPadding.Top + (float)horizontalMargin.Top,
                            std::max(desiredSize.Width, finalSize.Width - horizontalOffset), desiredSize.Height });
                    }

                    horizontalOffset += desiredSize.Width + (float)horizontalMargin.Right;

                    hasPreviousElement = true;
                }
            }
        }
    }

    return result;
}

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 8 of file InfoBarPanel.cpp.

{
    winrt::Size desiredSize{};

    float totalWidth = 0;
    float totalHeight = 0;
    float widthOfWidest = 0;
    float heightOfTallest = 0;
    float heightOfTallestInHorizontal = 0;
    int nItems = 0;

    const auto parent = this->Parent().try_as<winrt::FrameworkElement>();
    const float minHeight = !parent ? 0.0f : (float)(parent.MinHeight() - (Margin().Top + Margin().Bottom));

    const auto children = Children();
    const auto childCount = (int)children.Size();
    for (winrt::UIElement const& child : children)
    {
        child.Measure(availableSize);
        const auto childDesiredSize = child.DesiredSize();

        if (childDesiredSize.Width != 0 && childDesiredSize.Height != 0)
        {
            // Add up the width of all items if they were laid out horizontally
            const auto horizontalMargin = winrt::InfoBarPanel::GetHorizontalOrientationMargin(child);
            // Ignore left margin of first and right margin of last child
            totalWidth += childDesiredSize.Width +
                (nItems > 0 ? (float)horizontalMargin.Left : 0) +
                (nItems < childCount -1 ? (float)horizontalMargin.Right : 0);

            // Add up the height of all items if they were laid out vertically
            const auto verticalMargin = winrt::InfoBarPanel::GetVerticalOrientationMargin(child);
            // Ignore top margin of first and bottom margin of last child
            totalHeight += childDesiredSize.Height +
                (nItems > 0 ? (float)verticalMargin.Top : 0) +
                (nItems < childCount -1 ? (float)verticalMargin.Bottom: 0);

            if (childDesiredSize.Width > widthOfWidest)
            {
                widthOfWidest = childDesiredSize.Width;
            }

            if (childDesiredSize.Height > heightOfTallest)
            {
                heightOfTallest = childDesiredSize.Height;
            }

            const float childHeightInHorizontal = childDesiredSize.Height + (float)horizontalMargin.Top + float(horizontalMargin.Bottom);
            if (childHeightInHorizontal > heightOfTallestInHorizontal)
            {
                heightOfTallestInHorizontal = childHeightInHorizontal;
            }

            nItems++;
        }
    }

    // Since this panel is inside a *-sized grid column, availableSize.Width should not be infinite
    // If there is only one item inside the panel, we will count it as vertical (the margins work out better that way)
    // Also, if the height of any item is taller than the desired min height of the InfoBar,
    // the items should be laid out vertically even though they may seem to fit due to text wrapping.
    if (nItems == 1 || totalWidth > availableSize.Width || (minHeight > 0 && heightOfTallestInHorizontal > minHeight))
    {
        m_isVertical = true;
        const auto verticalPadding = VerticalOrientationPadding();

        desiredSize.Width = widthOfWidest + (float)verticalPadding.Left + (float)verticalPadding.Right;
        desiredSize.Height = totalHeight + (float)verticalPadding.Top + (float)verticalPadding.Bottom;
    }
    else
    {
        m_isVertical = false;
        const auto horizontalPadding = HorizontalOrientationPadding();

        desiredSize.Width = totalWidth + (float)horizontalPadding.Left + (float)horizontalPadding.Right;
        desiredSize.Height = heightOfTallest + (float)horizontalPadding.Top + (float)horizontalPadding.Bottom ;
    }

    return desiredSize;
}

The documentation for this class was generated from the following files:
  • InfoBar/InfoBarPanel.h
  • InfoBar/InfoBarPanel.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarPanelProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InfoBarPanelProperties Class Reference

#include "InfoBarPanel.properties.h"

Inherited by InfoBarPanel.

List of all members.

Public Member Functions

InfoBarPanelProperties ()
void | HorizontalOrientationPadding (winrt::Thickness const &value)
winrt::Thickness | HorizontalOrientationPadding ()
void | VerticalOrientationPadding (winrt::Thickness const &value)
winrt::Thickness | VerticalOrientationPadding ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::Thickness | GetHorizontalOrientationMargin (winrt::DependencyObject const &target)
static winrt::Thickness | GetVerticalOrientationMargin (winrt::DependencyObject const &target)
static winrt::DependencyProperty | HorizontalOrientationMarginProperty ()
static winrt::DependencyProperty | HorizontalOrientationPaddingProperty ()
static void | SetHorizontalOrientationMargin (winrt::DependencyObject const &target, winrt::Thickness const &value)
static void | SetVerticalOrientationMargin (winrt::DependencyObject const &target, winrt::Thickness const &value)
static winrt::DependencyProperty | VerticalOrientationMarginProperty ()
static winrt::DependencyProperty | VerticalOrientationPaddingProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_HorizontalOrientationMarginProperty
static GlobalDependencyProperty | s_HorizontalOrientationPaddingProperty
static GlobalDependencyProperty | s_VerticalOrientationMarginProperty
static GlobalDependencyProperty | s_VerticalOrientationPaddingProperty

Detailed Description

Definition at line 7 of file InfoBarPanel.properties.h.

Constructor & Destructor Documentation

InfoBarPanelProperties ( )

Definition at line 21 of file InfoBarPanel.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 74 of file InfoBarPanel.properties.cpp.

{
    s_HorizontalOrientationMarginProperty = nullptr;
    s_HorizontalOrientationPaddingProperty = nullptr;
    s_VerticalOrientationMarginProperty = nullptr;
    s_VerticalOrientationPaddingProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 26 of file InfoBarPanel.properties.cpp.

{
    if (!s_HorizontalOrientationMarginProperty)
    {
        s_HorizontalOrientationMarginProperty =
            InitializeDependencyProperty(
                L"HorizontalOrientationMargin",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::InfoBarPanel>(),
                true /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_HorizontalOrientationPaddingProperty)
    {
        s_HorizontalOrientationPaddingProperty =
            InitializeDependencyProperty(
                L"HorizontalOrientationPadding",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::InfoBarPanel>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_VerticalOrientationMarginProperty)
    {
        s_VerticalOrientationMarginProperty =
            InitializeDependencyProperty(
                L"VerticalOrientationMargin",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::InfoBarPanel>(),
                true /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_VerticalOrientationPaddingProperty)
    {
        s_VerticalOrientationPaddingProperty =
            InitializeDependencyProperty(
                L"VerticalOrientationPadding",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::InfoBarPanel>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::Thickness GetHorizontalOrientationMargin ( winrt::DependencyObject const & target ) [static]

Definition at line 88 of file InfoBarPanel.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(target.GetValue(s_HorizontalOrientationMarginProperty));
}

winrt::Thickness GetVerticalOrientationMargin ( winrt::DependencyObject const & target ) [static]

Definition at line 112 of file InfoBarPanel.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(target.GetValue(s_VerticalOrientationMarginProperty));
}

static winrt::DependencyProperty HorizontalOrientationMarginProperty ( ) [inline, static]

Definition at line 24 of file InfoBarPanel.properties.h.

{ return s_HorizontalOrientationMarginProperty; }

winrt::Thickness HorizontalOrientationPadding ( )

Definition at line 101 of file InfoBarPanel.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<InfoBarPanel*>(this)->GetValue(s_HorizontalOrientationPaddingProperty));
}

void HorizontalOrientationPadding ( winrt::Thickness const & value )

Definition at line 93 of file InfoBarPanel.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBarPanel*>(this)->SetValue(s_HorizontalOrientationPaddingProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty HorizontalOrientationPaddingProperty ( ) [inline, static]

Definition at line 25 of file InfoBarPanel.properties.h.

{ return s_HorizontalOrientationPaddingProperty; }

void SetHorizontalOrientationMargin | ( | winrt::DependencyObject const & | target,
 |  | winrt::Thickness const & | value |
 | ) |  |  | [static]

Definition at line 83 of file InfoBarPanel.properties.cpp.

{
    target.SetValue(s_HorizontalOrientationMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
}

void SetVerticalOrientationMargin | ( | winrt::DependencyObject const & | target,
 |  | winrt::Thickness const & | value |
 | ) |  |  | [static]

Definition at line 107 of file InfoBarPanel.properties.cpp.

{
    target.SetValue(s_VerticalOrientationMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
}

static winrt::DependencyProperty VerticalOrientationMarginProperty ( ) [inline, static]

Definition at line 26 of file InfoBarPanel.properties.h.

{ return s_VerticalOrientationMarginProperty; }

winrt::Thickness VerticalOrientationPadding ( )

Definition at line 125 of file InfoBarPanel.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<InfoBarPanel*>(this)->GetValue(s_VerticalOrientationPaddingProperty));
}

void VerticalOrientationPadding ( winrt::Thickness const & value )

Definition at line 117 of file InfoBarPanel.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBarPanel*>(this)->SetValue(s_VerticalOrientationPaddingProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty VerticalOrientationPaddingProperty ( ) [inline, static]

Definition at line 27 of file InfoBarPanel.properties.h.

{ return s_VerticalOrientationPaddingProperty; }

Member Data Documentation

GlobalDependencyProperty s_HorizontalOrientationMarginProperty [static]

Definition at line 29 of file InfoBarPanel.properties.h.

GlobalDependencyProperty s_HorizontalOrientationPaddingProperty [static]

Definition at line 30 of file InfoBarPanel.properties.h.

GlobalDependencyProperty s_VerticalOrientationMarginProperty [static]

Definition at line 31 of file InfoBarPanel.properties.h.

GlobalDependencyProperty s_VerticalOrientationPaddingProperty [static]

Definition at line 32 of file InfoBarPanel.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InfoBarPanel.properties.h
  • Generated/InfoBarPanel.properties.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

InfoBarProperties Class Reference

#include "InfoBar.properties.h"

Inherited by InfoBar.

List of all members.

Public Member Functions

InfoBarProperties ()
void | ActionButton (winrt::ButtonBase const &value)
winrt::ButtonBase | ActionButton ()
winrt::event_token | CloseButtonClick (winrt::TypedEventHandler< winrt::InfoBar, winrt::IInspectable > const &value)
void | CloseButtonClick (winrt::event_token const &token)
void | CloseButtonCommand (winrt::ICommand const &value)
winrt::ICommand | CloseButtonCommand ()
void | CloseButtonCommandParameter (winrt::IInspectable const &value)
winrt::IInspectable | CloseButtonCommandParameter ()
void | CloseButtonStyle (winrt::Style const &value)
winrt::Style | CloseButtonStyle ()
winrt::event_token | Closed (winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosedEventArgs > const &value)
void | Closed (winrt::event_token const &token)
winrt::event_token | Closing (winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosingEventArgs > const &value)
void | Closing (winrt::event_token const &token)
void | Content (winrt::IInspectable const &value)
winrt::IInspectable | Content ()
void | ContentTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | ContentTemplate ()
winrt::IconSource | IconSource ()
void | IconSource (winrt::IconSource const &value)
bool | IsClosable ()
void | IsClosable (bool value)
void | IsIconVisible (bool value)
bool | IsIconVisible ()
bool | IsOpen ()
void | IsOpen (bool value)
winrt::hstring | Message ()
void | Message (winrt::hstring const &value)
winrt::InfoBarSeverity | Severity ()
void | Severity (winrt::InfoBarSeverity const &value)
winrt::InfoBarTemplateSettings | TemplateSettings ()
void | TemplateSettings (winrt::InfoBarTemplateSettings const &value)
winrt::hstring | Title ()
void | Title (winrt::hstring const &value)

Static Public Member Functions

static winrt::DependencyProperty | ActionButtonProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | CloseButtonCommandParameterProperty ()
static winrt::DependencyProperty | CloseButtonCommandProperty ()
static winrt::DependencyProperty | CloseButtonStyleProperty ()
static winrt::DependencyProperty | ContentProperty ()
static winrt::DependencyProperty | ContentTemplateProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconSourceProperty ()
static winrt::DependencyProperty | IsClosableProperty ()
static winrt::DependencyProperty | IsIconVisibleProperty ()
static winrt::DependencyProperty | IsOpenProperty ()
static winrt::DependencyProperty | MessageProperty ()
static void | OnActionButtonPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIconSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsClosablePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsIconVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsOpenPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMessagePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSeverityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTitlePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SeverityProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()
static winrt::DependencyProperty | TitleProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::InfoBar,
winrt::IInspectable > > 		m_closeButtonClickEventSource
event_source
< winrt::TypedEventHandler
< winrt::InfoBar,
winrt::InfoBarClosedEventArgs > > 		m_closedEventSource
event_source
< winrt::TypedEventHandler
< winrt::InfoBar,
winrt::InfoBarClosingEventArgs > > 		m_closingEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ActionButtonProperty
static GlobalDependencyProperty | s_CloseButtonCommandParameterProperty
static GlobalDependencyProperty | s_CloseButtonCommandProperty
static GlobalDependencyProperty | s_CloseButtonStyleProperty
static GlobalDependencyProperty | s_ContentProperty
static GlobalDependencyProperty | s_ContentTemplateProperty
static GlobalDependencyProperty | s_IconSourceProperty
static GlobalDependencyProperty | s_IsClosableProperty
static GlobalDependencyProperty | s_IsIconVisibleProperty
static GlobalDependencyProperty | s_IsOpenProperty
static GlobalDependencyProperty | s_MessageProperty
static GlobalDependencyProperty | s_SeverityProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty
static GlobalDependencyProperty | s_TitleProperty

Detailed Description

Definition at line 7 of file InfoBar.properties.h.

Constructor & Destructor Documentation

InfoBarProperties ( )

Definition at line 31 of file InfoBar.properties.cpp.

    : m_closeButtonClickEventSource{static_cast<InfoBar*>(this)}

Member Function Documentation

void ActionButton ( winrt::ButtonBase const & value )
winrt::ButtonBase ActionButton ( )
static winrt::DependencyProperty ActionButtonProperty ( ) [inline, static]

Definition at line 54 of file InfoBar.properties.h.

{ return s_ActionButtonProperty; }

static void ClearProperties ( ) [static]
winrt::event_token CloseButtonClick ( winrt::TypedEventHandler< winrt::InfoBar, winrt::IInspectable > const & value )
void CloseButtonClick ( winrt::event_token const & token )
winrt::ICommand CloseButtonCommand ( )
void CloseButtonCommand ( winrt::ICommand const & value )
void CloseButtonCommandParameter ( winrt::IInspectable const & value )
winrt::IInspectable CloseButtonCommandParameter ( )
static winrt::DependencyProperty CloseButtonCommandParameterProperty ( ) [inline, static]

Definition at line 56 of file InfoBar.properties.h.

{ return s_CloseButtonCommandParameterProperty; }

static winrt::DependencyProperty CloseButtonCommandProperty ( ) [inline, static]

Definition at line 55 of file InfoBar.properties.h.

{ return s_CloseButtonCommandProperty; }

winrt::Style CloseButtonStyle ( )
void CloseButtonStyle ( winrt::Style const & value )
static winrt::DependencyProperty CloseButtonStyleProperty ( ) [inline, static]

Definition at line 57 of file InfoBar.properties.h.

{ return s_CloseButtonStyleProperty; }

winrt::event_token Closed ( winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosedEventArgs > const & value )
void Closed ( winrt::event_token const & token )
winrt::event_token Closing ( winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosingEventArgs > const & value )
void Closing ( winrt::event_token const & token )
void Content ( winrt::IInspectable const & value )
winrt::IInspectable Content ( )
static winrt::DependencyProperty ContentProperty ( ) [inline, static]

Definition at line 58 of file InfoBar.properties.h.

{ return s_ContentProperty; }

void ContentTemplate ( winrt::DataTemplate const & value )
winrt::DataTemplate ContentTemplate ( )
static winrt::DependencyProperty ContentTemplateProperty ( ) [inline, static]

Definition at line 59 of file InfoBar.properties.h.

{ return s_ContentTemplateProperty; }

static void EnsureProperties ( ) [static]
void IconSource ( winrt::IconSource const & value )
winrt::IconSource IconSource ( )
static winrt::DependencyProperty IconSourceProperty ( ) [inline, static]

Definition at line 60 of file InfoBar.properties.h.

{ return s_IconSourceProperty; }

bool IsClosable ( )
void IsClosable ( bool value )
static winrt::DependencyProperty IsClosableProperty ( ) [inline, static]

Definition at line 61 of file InfoBar.properties.h.

{ return s_IsClosableProperty; }

void IsIconVisible ( bool value )
bool IsIconVisible ( )
static winrt::DependencyProperty IsIconVisibleProperty ( ) [inline, static]

Definition at line 62 of file InfoBar.properties.h.

{ return s_IsIconVisibleProperty; }

void IsOpen ( bool value )
bool IsOpen ( )
static winrt::DependencyProperty IsOpenProperty ( ) [inline, static]

Definition at line 63 of file InfoBar.properties.h.

{ return s_IsOpenProperty; }

void Message ( winrt::hstring const & value )
winrt::hstring Message ( )
static winrt::DependencyProperty MessageProperty ( ) [inline, static]

Definition at line 64 of file InfoBar.properties.h.

{ return s_MessageProperty; }

static void OnActionButtonPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIconSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsClosablePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsIconVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsOpenPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMessagePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSeverityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTitlePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::InfoBarSeverity Severity ( )
void Severity ( winrt::InfoBarSeverity const & value )
static winrt::DependencyProperty SeverityProperty ( ) [inline, static]

Definition at line 65 of file InfoBar.properties.h.

{ return s_SeverityProperty; }

winrt::InfoBarTemplateSettings TemplateSettings ( )
void TemplateSettings ( winrt::InfoBarTemplateSettings const & value )
static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 66 of file InfoBar.properties.h.

{ return s_TemplateSettingsProperty; }

winrt::hstring Title ( )
void Title ( winrt::hstring const & value )
static winrt::DependencyProperty TitleProperty ( ) [inline, static]

Definition at line 67 of file InfoBar.properties.h.

{ return s_TitleProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::InfoBar, winrt::IInspectable> > m_closeButtonClickEventSource

Definition at line 91 of file InfoBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::InfoBar, winrt::InfoBarClosedEventArgs> > m_closedEventSource

Definition at line 92 of file InfoBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::InfoBar, winrt::InfoBarClosingEventArgs> > m_closingEventSource

Definition at line 93 of file InfoBar.properties.h.

GlobalDependencyProperty s_ActionButtonProperty [static]

Definition at line 69 of file InfoBar.properties.h.

GlobalDependencyProperty s_CloseButtonCommandParameterProperty [static]

Definition at line 71 of file InfoBar.properties.h.

GlobalDependencyProperty s_CloseButtonCommandProperty [static]

Definition at line 70 of file InfoBar.properties.h.

GlobalDependencyProperty s_CloseButtonStyleProperty [static]

Definition at line 72 of file InfoBar.properties.h.

GlobalDependencyProperty s_ContentProperty [static]

Definition at line 73 of file InfoBar.properties.h.

GlobalDependencyProperty s_ContentTemplateProperty [static]

Definition at line 74 of file InfoBar.properties.h.

GlobalDependencyProperty s_IconSourceProperty [static]

Definition at line 75 of file InfoBar.properties.h.

GlobalDependencyProperty s_IsClosableProperty [static]

Definition at line 76 of file InfoBar.properties.h.

GlobalDependencyProperty s_IsIconVisibleProperty [static]

Definition at line 77 of file InfoBar.properties.h.

GlobalDependencyProperty s_IsOpenProperty [static]

Definition at line 78 of file InfoBar.properties.h.

GlobalDependencyProperty s_MessageProperty [static]

Definition at line 79 of file InfoBar.properties.h.

GlobalDependencyProperty s_SeverityProperty [static]

Definition at line 80 of file InfoBar.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 81 of file InfoBar.properties.h.

GlobalDependencyProperty s_TitleProperty [static]

Definition at line 82 of file InfoBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InfoBar.properties.h
  • Generated/InfoBar.properties.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InfoBarTemplateSettings Class Reference

#include "InfoBarTemplateSettings.h"

Inherits InfoBarTemplateSettingsProperties.

List of all members.

Public Member Functions

InfoBarTemplateSettings ()

Detailed Description

Definition at line 9 of file InfoBarTemplateSettings.h.

Constructor & Destructor Documentation

InfoBarTemplateSettings ( )

Definition at line 8 of file InfoBarTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • InfoBar/InfoBarTemplateSettings.h
  • InfoBar/InfoBarTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InfoBarTemplateSettingsProperties Class Reference

#include "InfoBarTemplateSettings.properties.h"

Inherited by InfoBarTemplateSettings.

List of all members.

Public Member Functions

InfoBarTemplateSettingsProperties ()
winrt::IconElement | IconElement ()
void | IconElement (winrt::IconElement const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconElementProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconElementProperty

Detailed Description

Definition at line 7 of file InfoBarTemplateSettings.properties.h.

Constructor & Destructor Documentation

InfoBarTemplateSettingsProperties ( )

Definition at line 18 of file InfoBarTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file InfoBarTemplateSettings.properties.cpp.

{
    s_IconElementProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file InfoBarTemplateSettings.properties.cpp.

{
    if (!s_IconElementProperty)
    {
        s_IconElementProperty =
            InitializeDependencyProperty(
                L"IconElement",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::InfoBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IconElement IconElement ( )

Definition at line 51 of file InfoBarTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<InfoBarTemplateSettings*>(this)->GetValue(s_IconElementProperty));
}

void IconElement ( winrt::IconElement const & value )

Definition at line 43 of file InfoBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InfoBarTemplateSettings*>(this)->SetValue(s_IconElementProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconElementProperty ( ) [inline, static]

Definition at line 15 of file InfoBarTemplateSettings.properties.h.

{ return s_IconElementProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconElementProperty [static]

Definition at line 17 of file InfoBarTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InfoBarTemplateSettings.properties.h
  • Generated/InfoBarTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InitialsGenerator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Private Member Functions

InitialsGenerator Class Reference

PersonPicture Control. More...

#include "InitialsGenerator.h"

List of all members.

Static Public Member Functions

static CharacterType | GetCharacterType (const wstring_view &str)
static CharacterType | GetCharacterType (wchar_t character)
static winrt::hstring | InitialsFromContactObject (const winrt::Contact &contact)
static winrt::hstring | InitialsFromDisplayName (const wstring_view &contactDisplayName)

Static Private Member Functions

static std::wstring | GetFirstFullCharacter (const std::wstring &str)
static std::vector< std::wstring > | Split (const std::wstring &source, wchar_t delim, int maxIterations=25)
static void | StripTrailingBrackets (std::wstring &source)

Detailed Description

Displays the Profile Picture, or in its absence Initials, for a given Contact.

Definition at line 36 of file InitialsGenerator.h.

Member Function Documentation

CharacterType GetCharacterType ( const wstring_view & str ) [static]

Helper function which indicates the type of characters in a given string.

Parameters:
str String from which to detect character-set.
Returns:
Character set of the string: Latin, Symbolic, Glyph, or other.

Definition at line 242 of file InitialsGenerator.cpp.

{
    // Since we're doing initials, we're really only interested in the first
    // few characters. If the first three characters aren't a glyph then
    // we don't need to count it as such because we won't be changing meaning
    // by truncating to one or two.
    CharacterType result = CharacterType::Other;

    for (int i = 0; i < 3; i++)
    {
        // Break on null character. 0xFEFF is a terminating character which appears as null.
        if ((str.data()[i] == '\0') || (str.data()[i] == 0xFEFF))
        {
            break;
        }

        const wchar_t character = str.data()[i];
        const CharacterType evaluationResult = GetCharacterType(character);

        // In mix-match scenarios, we'll want to follow this order of precedence:
        // Glyph > Symbolic > Roman
        switch (evaluationResult)
        {
        case CharacterType::Glyph:
            result = CharacterType::Glyph;
            break;
        case CharacterType::Symbolic:
            // Don't override a Glyph state with a Symbolic State.
            if (result != CharacterType::Glyph)
            {
                result = CharacterType::Symbolic;
            }
            break;
        case CharacterType::Standard:
            // Don't override a Glyph or Symbolic state with a Latin state.
            if ((result != CharacterType::Glyph) && (result != CharacterType::Symbolic))
            {
                result = CharacterType::Standard;
            }
            break;
        default:
            // Preserve result's current state (if we never got data other
            // than "Other", it'll be set to other anyway).
            break;
        }
    }

    return result;
}

CharacterType GetCharacterType ( wchar_t character ) [static]

Helper function which indicates the character-set of a given character.

Parameters:
character Character for which to detect character-set.
Returns:
Character set of the string: Latin, Symbolic, Glyph, or other.

Definition at line 292 of file InitialsGenerator.cpp.

{
    // To ensure predictable behavior, we're currently operating on an allowed list of character sets.
    //
    // Each block below is a HEX range in the official Unicode spec, which defines a set
    // of Unicode characters. Changes to the character sets would only be made by Unicode, and
    // are highly unlikely (as it would break virtually every modern text parser).
    // Definitions available here: http://www.unicode.org/charts/
    //
    // GLYPH
    //
    // IPA Extensions
    if ((character >= 0x0250) && (character <= 0x02AF))
    {
        return CharacterType::Glyph;
    }

    // Arabic
    if ((character >= 0x0600) && (character <= 0x06FF))
    {
        return CharacterType::Glyph;
    }

    // Arabic Supplement
    if ((character >= 0x0750) && (character <= 0x077F))
    {
        return CharacterType::Glyph;
    }

    // Arabic Extended-A
    if ((character >= 0x08A0) && (character <= 0x08FF))
    {
        return CharacterType::Glyph;
    }

    // Arabic Presentation Forms-A
    if ((character >= 0xFB50) && (character <= 0xFDFF))
    {
        return CharacterType::Glyph;
    }

    // Arabic Presentation Forms-B
    if ((character >= 0xFE70) && (character <= 0xFEFF))
    {
        return CharacterType::Glyph;
    }

    // Devanagari
    if ((character >= 0x0900) && (character <= 0x097F))
    {
        return CharacterType::Glyph;
    }

    // Devanagari Extended
    if ((character >= 0xA8E0) && (character <= 0xA8FF))
    {
        return CharacterType::Glyph;
    }

    // Bangla
    if ((character >= 0x0980) && (character <= 0x09FF))
    {
        return CharacterType::Glyph;
    }

    // Gurmukhi
    if ((character >= 0x0A00) && (character <= 0x0A7F))
    {
        return CharacterType::Glyph;
    }

    // Gujarati
    if ((character >= 0x0A80) && (character <= 0x0AFF))
    {
        return CharacterType::Glyph;
    }

    // Odia
    if ((character >= 0x0B00) && (character <= 0x0B7F))
    {
        return CharacterType::Glyph;
    }

    // Tamil
    if ((character >= 0x0B80) && (character <= 0x0BFF))
    {
        return CharacterType::Glyph;
    }

    // Telugu
    if ((character >= 0x0C00) && (character <= 0x0C7F))
    {
        return CharacterType::Glyph;
    }

    // Kannada
    if ((character >= 0x0C80) && (character <= 0x0CFF))
    {
        return CharacterType::Glyph;
    }

    // Malayalam
    if ((character >= 0x0D00) && (character <= 0x0D7F))
    {
        return CharacterType::Glyph;
    }

    // Sinhala
    if ((character >= 0x0D80) && (character <= 0x0DFF))
    {
        return CharacterType::Glyph;
    }

    // Thai
    if ((character >= 0x0E00) && (character <= 0x0E7F))
    {
        return CharacterType::Glyph;
    }

    // Lao
    if ((character >= 0x0E80) && (character <= 0x0EFF))
    {
        return CharacterType::Glyph;
    }

    // SYMBOLIC
    //
    // CJK Unified Ideographs
    if ((character >= 0x4E00) && (character <= 0x9FFF))
    {
        return CharacterType::Symbolic;
    }

    // CJK Unified Ideographs Extension
    if ((character >= 0x3400) && (character <= 0x4DBF))
    {
        return CharacterType::Symbolic;
    }

    // CJK Unified Ideographs Extension B
    if ((character >= 0x20000) && (character <= 0x2A6DF))
    {
        return CharacterType::Symbolic;
    }

    // CJK Unified Ideographs Extension C
    if ((character >= 0x2A700) && (character <= 0x2B73F))
    {
        return CharacterType::Symbolic;
    }

    // CJK Unified Ideographs Extension D
    if ((character >= 0x2B740) && (character <= 0x2B81F))
    {
        return CharacterType::Symbolic;
    }

    // CJK Radicals Supplement
    if ((character >= 0x2E80) && (character <= 0x2EFF))
    {
        return CharacterType::Symbolic;
    }

    // CJK Symbols and Punctuation
    if ((character >= 0x3000) && (character <= 0x303F))
    {
        return CharacterType::Symbolic;
    }

    // CJK Strokes
    if ((character >= 0x31C0) && (character <= 0x31EF))
    {
        return CharacterType::Symbolic;
    }

    // Enclosed CJK Letters and Months
    if ((character >= 0x3200) && (character <= 0x32FF))
    {
        return CharacterType::Symbolic;
    }

    // CJK Compatibility
    if ((character >= 0x3300) && (character <= 0x33FF))
    {
        return CharacterType::Symbolic;
    }

    // CJK Compatibility Ideographs
    if ((character >= 0xF900) && (character <= 0xFAFF))
    {
        return CharacterType::Symbolic;
    }

    // CJK Compatibility Forms
    if ((character >= 0xFE30) && (character <= 0xFE4F))
    {
        return CharacterType::Symbolic;
    }

    // CJK Compatibility Ideographs Supplement
    if ((character >= 0x2F800) && (character <= 0x2FA1F))
    {
        return CharacterType::Symbolic;
    }

    // Greek and Coptic
    if ((character >= 0x0370) && (character <= 0x03FF))
    {
        return CharacterType::Symbolic;
    }

    // Hebrew
    if ((character >= 0x0590) && (character <= 0x05FF))
    {
        return CharacterType::Symbolic;
    }

    // Armenian
    if ((character >= 0x0530) && (character <= 0x058F))
    {
        return CharacterType::Symbolic;
    }

    // LATIN
    //
    // Basic Latin
    if ((character > 0x0000) && (character <= 0x007F))
    {
        return CharacterType::Standard;
    }

    // Latin-1 Supplement
    if ((character >= 0x0080) && (character <= 0x00FF))
    {
        return CharacterType::Standard;
    }

    // Latin Extended-A
    if ((character >= 0x0100) && (character <= 0x017F))
    {
        return CharacterType::Standard;
    }

    // Latin Extended-B
    if ((character >= 0x0180) && (character <= 0x024F))
    {
        return CharacterType::Standard;
    }

    // Latin Extended-C
    if ((character >= 0x2C60) && (character <= 0x2C7F))
    {
        return CharacterType::Standard;
    }

    // Latin Extended-D
    if ((character >= 0xA720) && (character <= 0xA7FF))
    {
        return CharacterType::Standard;
    }

    // Latin Extended-E
    if ((character >= 0xAB30) && (character <= 0xAB6F))
    {
        return CharacterType::Standard;
    }

    // Latin Extended Additional
    if ((character >= 0x1E00) && (character <= 0x1EFF))
    {
        return CharacterType::Standard;
    }

    // Cyrillic
    if ((character >= 0x0400) && (character <= 0x04FF))
    {
        return CharacterType::Standard;
    }

    // Cyrillic Supplement
    if ((character >= 0x0500) && (character <= 0x052F))
    {
        return CharacterType::Standard;
    }

    // Combining Diacritical Marks
    if ((character >= 0x0300) && (character <= 0x036F))
    {
        return CharacterType::Standard;
    }

    return CharacterType::Other;
}

std::wstring GetFirstFullCharacter ( const std::wstring & str ) [static, private]

Extracts the first full character from a given string, including any diacritics or combining characters.

Parameters:
str String from which to extract the character.
Returns:
A wstring which represents a given character.

Definition at line 126 of file InitialsGenerator.cpp.

{
    // Index should begin at the first desireable character.
    unsigned int start = 0;

    while (start < str.size())
    {
        const wchar_t character = str.at(start);

        // Omit ! " # $ % & ' ( ) * + , - . /
        if ((character >= 0x0021) && (character <= 0x002F))
        {
            start++;
            continue;
        }

        // Omit : ; < = > ? @
        if ((character >= 0x003A) && (character <= 0x0040))
        {
            start++;
            continue;
        }

        // Omit { | } ~
        if ((character >= 0x007B) && (character <= 0x007E))
        {
            start++;
            continue;
        }

        break;
    }

    // If no desireable characters exist, we'll start at index 1, as combining
    // characters begin only after the first character.
    if (start >= str.size())
    {
        start = 0;
    }

    // Combining characters begin only after the first character, so we should start
    // looking 1 after the start character.
    unsigned int index = start + 1;

    while (index < str.size())
    {
        const wchar_t character = str.at(index);

        // Combining Diacritical Marks -- Official Unicode character block
        if ((character < 0x0300) || (character > 0x036F))
        {
            break;
        }

        index++;
    }

    // Determine number of diacritics by adjusting for our initial offset.
    const unsigned int strLength = index - start;

    std::wstring result(&str.at(start), strLength);
    return result;
}

winrt::hstring InitialsFromContactObject ( const winrt::Contact & contact ) [static]

Helper function which takes a DisplayName, as generated by Windows.ApplicationModel.Contacts, and returns a initials representation.

Helper function which takes in a Contact object and produces initials which represent that contact.

Returns:
String containing the initials representation of the given DisplayName.

INTENDED LOGIC BEHAVIOR:

  • If the name contains glyphs, return a generic icon.
  • If we have access to First Name vs. Last Name data (First Name being set regionally - i.e. it equals Given Name or Family Name based on system setting), -> If non-symbolic, use the first letter of the First Name and first letter of the Last Name -> If symbolic, use the first character of the Given Name
  • If we don't have access to First/Last or Given/Family Name, (i.e. long string Dr. Jordan von Hammerspike III) -> If non-symbolic, break by space delimiter then follow the following rules: --> Use the first letter of the first word and the first letter of the last word --> If only one word, use a single letter -> If symbolic, use the first one or two characters of the string (decided by how squished it looks visually) --> Note: This branch of the logic falls apart in the Family Name, Given Name case.

Definition at line 29 of file InitialsGenerator.cpp.

{
    if (!contact)
    {
        return winrt::hstring(L"");
    }

    // Optimal case is we have a clearly defined First and Last name. If
    // available, that is the data which should be used.
    if (!contact.FirstName().empty() && !contact.LastName().empty())
    {
        CharacterType type = GetCharacterType(contact.FirstName());

        // We'll attempt to make initials only if we recognize a name in the Standard character set.
        if (type == CharacterType::Standard)
        {
            std::wstring firstName = static_cast<std::wstring>(contact.FirstName());
            std::wstring lastName = static_cast<std::wstring>(contact.LastName());

            std::wstring result = GetFirstFullCharacter(firstName.data());
            result.append(GetFirstFullCharacter(lastName.data()));

            std::transform(result.begin(), result.end(), result.begin(), ::towupper);

            return winrt::hstring(result);
        }
        else
        {
            // Return empty string. In our code-behind we will produce a generic glyph as a result.
            return winrt::hstring(L"");
        }
    }

    // If the supplied object does not contain granular name data, then we must
    // extract the correct initials from the DisplayName.
    if (!contact.DisplayName().empty())
    {
        return InitialsFromDisplayName(contact.DisplayName());
    }

    // Return empty string. In our code-behind we will produce a generic glyph as a result.
    return winrt::hstring(L"");
}

winrt::hstring InitialsFromDisplayName ( const wstring_view & contactDisplayName ) [static]

Helper function which takes a DisplayName, as generated by Windows.ApplicationModel.Contacts, and returns a initials representation.

<param name="contactDisplayName>The DisplayName of the person

Returns:
String containing the initials representation of the given DisplayName.

Definition at line 73 of file InitialsGenerator.cpp.

{
    const CharacterType type = GetCharacterType(contactDisplayName);

    // We'll attempt to make initials only if we recognize a name in the Standard character set.
    if (type == CharacterType::Standard)
    {
        std::wstring displayName(contactDisplayName.data());

        StripTrailingBrackets(displayName);

        std::vector<std::wstring> words = Split(displayName, L' ');

        if (words.size() == 1)
        {
            // If there's only a single long word, we'll show one initial.
            std::wstring firstWord = words.front();

            std::wstring result = GetFirstFullCharacter(firstWord);

            std::transform(result.begin(), result.end(), result.begin(), ::towupper);

            return winrt::hstring(result);
        }
        else if (words.size() > 1)
        {
            // If there's at least two words, we'll show two initials.
            //
            // NOTE: Based on current implementation, we could be showing punctuation.
            // For example, "John -Smith" would be "J-".
            std::wstring firstWord = words.front();
            std::wstring lastWord = words.back();

            std::wstring result = GetFirstFullCharacter(firstWord);
            result.append(GetFirstFullCharacter(lastWord));

            std::transform(result.begin(), result.end(), result.begin(), ::towupper);

            return winrt::hstring(result);
        }
        else
        {
            // If there's only spaces in the name, we'll get a Vector size of 0.
            return winrt::hstring(L"");
        }
    }
    else
    {
        // Return empty string. In our code-behind we will produce a generic glyph as a result.
        return winrt::hstring(L"");
    }
}

std::vector< std::wstring > Split | ( | const std::wstring & | source,
 |  | wchar_t | delim,
 |  | int | maxIterations = 25 |
 | ) |  |  | [static, private]

Helper function which takes in a string and returns a vector of pieces, separated by delimiter.

Parameters:
source | String on which to perform the split operation.
delim | String on which to perform the split operation.
maxIterations | Maximum number of times to perform a getline loop.
Returns:
A vector of pieces from the source string, separated by delimiter

Definition at line 190 of file InitialsGenerator.cpp.

{
    std::vector<std::wstring> result;

    std::wistringstream buffer(source);

    int i = 0;

    for (std::wstring token; std::getline(buffer, token, delim);)
    {
        if (!token.empty())
        {
            result.push_back(token);
        }
        if (++i >= maxIterations)
        {
            break;
        }
    }

    return result;
}

void StripTrailingBrackets ( std::wstring & source ) [static, private]

Helper function to remove bracket qualifier from the end of a display name if present.

Parameters:
source String on which to perform the operation.
Returns:
A string with the content within brackets removed.

Definition at line 213 of file InitialsGenerator.cpp.

{
    // Guidance from the world readiness team is that text within a final set of brackets
    // can be removed for the purposes of calculating initials. ex. John Smith (OSG)
    std::wstring_view delimiters[] = { L"{}"sv, L"()"sv, L"[]"sv };

    if (source.empty())
    {
        return;
    }

    for (const auto delimiter : delimiters)
    {
        if (source[source.length() - 1] != delimiter[1])
        {
            continue;
        }

        const auto start = source.find_last_of(delimiter[0]);
        if (start == std::string::npos)
        {
            continue;
        }

        source.erase(start);
        return;
    }
}

The documentation for this class was generated from the following files:
  • PersonPicture/InitialsGenerator.h
  • PersonPicture/InitialsGenerator.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

InkCanvas Class Reference

#include "InkCanvas.h"

Inherits ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT >, and InkCanvasProperties.

List of all members.

Classes

struct | TargetData

Public Member Functions

InkCanvas ()
virtual | ~InkCanvas ()
winrt::InkPresenter | InkPresenter ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnIsEnabledPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnLoaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnUnloaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
winrt::IAsyncAction | QueueInkPresenterWorkItem (winrt::DoInkPresenterWork workItem)

Protected Member Functions

bool | AttachToCompositionTarget ()
void | DetachFromCompositionTarget ()
void | PositionInkVisual ()
bool | UseSystemVisualLink ()

Protected Attributes

winrt::FrameworkElement::LayoutUpdated_revoker | m_layoutUpdatedRevoker
std::shared_ptr< TargetData > | m_targetData

Private Member Functions

void | AttachToVisualLink ()
void | CreateInkPresenter ()
void | DetachFromVisualLink ()
void | UpdateInkPresenterSize ()

Private Attributes

HWND | m_hostHwnd = NULL
winrt::com_ptr
< IDCompositionVisual > 		m_inkRootVisual
winrt::FrameworkElement::SizeChanged_revoker | m_sizeChanged_revoker
std::shared_ptr< ThreadData > | m_threadData

Detailed Description

Definition at line 14 of file InkCanvas.h.

Constructor & Destructor Documentation

InkCanvas ( )

Definition at line 72 of file InkCanvas.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_InkCanvas);

    m_loadedRevoker = Loaded(winrt::auto_revoke, { this, &InkCanvas::OnLoaded });
    m_unloadedRevoker = Unloaded(winrt::auto_revoke, { this, &InkCanvas::OnUnloaded });

    // Ensure that we have allocated our thread data
    m_threadData = s_tlsThreadData.lock();
    if (!m_threadData)
    {

        // This is our first Ink Canvas on this thread so do a little bit of thread initialization.

        m_threadData = std::make_unique<ThreadData>();
        s_tlsThreadData = m_threadData;

        // Create a desktop host which will create a ink thread.  Normally, I wouldn't want to do this until we actually needed
        // it, but unfortunately, we need the host to create the presenter and we need to create a presenter so that it can be
        // accessed prior to entering the tree.
        winrt::check_hresult(CoCreateInstance(__uuidof(InkDesktopHost), nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(m_threadData->m_inkHost.put())));
    }

    // Applications may want to access the ink presenter before they add the InkCanvas to the tree, so
    // make sure create one right away.
    CreateInkPresenter();
}

~InkCanvas ( ) [virtual]

Definition at line 100 of file InkCanvas.cpp.

{
    // Ensure that we have torn down our dcomp stuff
    DetachFromVisualLink();
}

Member Function Documentation

bool AttachToCompositionTarget ( ) [protected]

Definition at line 418 of file InkCanvas.cpp.

{
    if (UseSystemVisualLink())
    {
        return false;
    }

    m_targetData = TargetData::Get(m_hostHwnd);

    // If we haven't created our composition target and root visual yet, do so
    if (!m_targetData->m_targetRootVisual)
    {
        auto threadData = s_tlsThreadData.lock();
        // Create a "top-most" target for this window
        winrt::check_hresult(threadData->m_compositionDevice->CreateTargetForHwnd(m_hostHwnd, TRUE /*topmost*/, m_targetData->m_compositionTarget.put()));

        // Attach a host visual.  This is different than the ink root visual although both of them use the term root.
        // One is the root of the composition target (we will call that hostVisual) and one is the root of the
        // ink presenter (we will call that rootVisual)
        winrt::check_hresult(threadData->m_compositionDevice->CreateVisual(m_targetData->m_targetRootVisual.put()));
        winrt::check_hresult(m_targetData->m_compositionTarget->SetRoot(m_targetData->m_targetRootVisual.get()));

        m_threadData->m_compositionDevice->Commit();
    }

    // Attach the visual to the target root
    winrt::check_hresult(m_targetData->m_targetRootVisual->AddVisual(m_inkRootVisual.get(), true, nullptr));

    // Register for the LayoutChanged event so we can move the system visual as the underlying control moves
    m_layoutUpdatedRevoker = LayoutUpdated(winrt::auto_revoke,
        [weakThis{ get_weak() }](auto const& /*sender*/, auto const& /*args*/)
        {
            if (auto strongThis = weakThis.get())
            {
                strongThis->PositionInkVisual();
            }
        });

    return true;
}

void AttachToVisualLink ( ) [private]

Definition at line 293 of file InkCanvas.cpp.

{
    // Verify that we are still attached to the same hwnd.  If the application moves an ink canvas from one
    // window to another, we will need to detach and reattach to a new visual link.
    HWND hostHwnd = NULL;
    auto xamlRoot = this->XamlRoot();
    if (!xamlRoot)
    {
        throw winrt::hresult_error(E_UNEXPECTED);
    }

    winrt::com_ptr<IXamlRootNative> xamlRootNative = xamlRoot.as<IXamlRootNative>();
    winrt::check_hresult(xamlRootNative->get_HostWindow(&hostHwnd));

    // Our target is good, we can continue to use it.
    if (hostHwnd == m_hostHwnd)
    {
        return;
    }

    // Our current target is stale so detach from it
    if (m_hostHwnd)
    {
        DetachFromVisualLink();
    }

    m_hostHwnd = hostHwnd;

    // Ensure we have composition device for this thread.
    if (!m_threadData->m_compositionDevice)
    {
        if (!m_threadData->m_hmodDComp)
        {
            m_threadData->m_hmodDComp.reset(::LoadLibraryExW(L"dcomp.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32));
            if (!m_threadData->m_hmodDComp)
            {
                throw winrt::hresult(HRESULT_FROM_WIN32(GetLastError()));
            }
        }
        typedef HRESULT(__stdcall* DCompositionCreateDevice3fn)(IUnknown*, REFIID, void** dcompositionDevice);
        auto CompositionCreateDevice = reinterpret_cast<DCompositionCreateDevice3fn>(::GetProcAddress(m_threadData->m_hmodDComp.get(), "DCompositionCreateDevice3"));
        if (!CompositionCreateDevice)
        {
            throw winrt::hresult(HRESULT_FROM_WIN32(GetLastError()));
        }
        winrt::check_hresult(CompositionCreateDevice(nullptr, IID_PPV_ARGS(&m_threadData->m_compositionDevice)));
    }

    // Create our inking system visual
    winrt::check_hresult(m_threadData->m_compositionDevice->CreateVisual(m_inkRootVisual.put()));

    // Attach the visual to the presenter
    QueueInkPresenterWorkItem([rootVisual = m_inkRootVisual, compositionDevice = m_threadData->m_compositionDevice, useSystemVisualLink = UseSystemVisualLink()](auto presenter)
        {
            auto desktopPresenter = presenter.as<IInkPresenterDesktop>();
            winrt::check_hresult(desktopPresenter->SetRootVisual(rootVisual.get(), nullptr));
            // only request a commit here if we are using the visual link.  If we are using the composition
            // target method, it will be committed when we set position.
            if (useSystemVisualLink)
            {
                winrt::check_hresult(compositionDevice->Commit());
            }
        });

    // If we are using the composition target method then skip the visual link code
    if (AttachToCompositionTarget())
    {
        return;
    }

    // The visual link is created on the lifted side so we use the lifted compositor.
    auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

    // Create the the visual link
    m_systemVisualLink = winrt::ContentExternalOutputLink::Create(compositor);
    m_systemVisualLink.IsAboveContent(true);

    // Set our ink visual into the visual link
    winrt::com_ptr<IDCompositionTarget> target = m_systemVisualLink.as<IDCompositionTarget>();
    winrt::check_hresult(target->SetRoot(m_inkRootVisual.get()));

    // Add the visual link's lifted visual to our tree
    winrt::ElementCompositionPreview::SetElementChildVisual(*this, m_systemVisualLink.PlacementVisual());
}

void CreateInkPresenter ( ) [private]

Definition at line 241 of file InkCanvas.cpp.

{
    auto threadData = s_tlsThreadData.lock();
    auto inkHost = threadData->m_inkHost;
    auto weakThis = get_weak();

    auto callback = winrt::make<GenericInkCallback>([weakThis, inkHost]()
        {
            auto strongThis = weakThis.get();
            if (!strongThis)
            {
                return;
            }

            // Create ink presenter
            winrt::com_ptr inkPresenterDesktop = winrt::capture<IInkPresenterDesktop>(
                inkHost,
                &IInkDesktopHost::CreateInkPresenter);
            auto inkPresenter = inkPresenterDesktop.as<winrt::InkPresenter>();

            // Set up input devices
            winrt::CoreInputDeviceTypes types = winrt::CoreInputDeviceTypes::Mouse | winrt::CoreInputDeviceTypes::Pen | winrt::CoreInputDeviceTypes::Touch;
            inkPresenter.InputDeviceTypes(types);

            // Set the initial size.  This doesn't really mean anything and we can probably get away with out it,
            // but it helps in debugging, so for now we will leave it.
            winrt::check_hresult(inkPresenterDesktop->SetSize(400,400));

            // This m_inkPresetenr is only accessed on the ink thread, so we don't need to worry about contention.
            strongThis->m_inkPresenter = inkPresenter;
        });
    winrt::check_hresult(inkHost->QueueWorkItem(callback.get()));
}

void DetachFromCompositionTarget ( ) [protected]

Definition at line 459 of file InkCanvas.cpp.

{
    if (UseSystemVisualLink() || !m_targetData)
    {
        return;
    }

    // Quit listening for the layout changed event
    m_layoutUpdatedRevoker.revoke();

    // remove our system visual from the composition target tree
    winrt::check_hresult(m_targetData->m_targetRootVisual->RemoveVisual(m_inkRootVisual.get()));

    m_targetData.reset();
}

void DetachFromVisualLink ( ) [private]

Definition at line 378 of file InkCanvas.cpp.

{
    // This will noop if we aren't using the composition target
    DetachFromCompositionTarget();

    winrt::ElementCompositionPreview::SetElementChildVisual(*this, nullptr);

    m_systemVisualLink = nullptr;
    m_inkRootVisual = nullptr;
    m_hostHwnd = NULL;

    // When we give up our last reference to the system visual, we need to let the
    // the system compositor know it has work to do.  Note that it is possible that
    // the application created, the canvas, but never used it (attached it to the tree),
    // so we may not have a compositor.
    if (m_threadData->m_compositionDevice)
    {
        m_threadData->m_compositionDevice->Commit();
    }
}

winrt::InkPresenter InkPresenter ( ) [inline]

Definition at line 22 of file InkCanvas.h.

                                    {
        return m_inkPresenter;
    };

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 191 of file InkCanvas.cpp.

{
    return winrt::make<InkCanvasAutomationPeer>(*this);
}

void OnIsEnabledPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 181 of file InkCanvas.cpp.

{
    auto isEnabled = unbox_value<bool>(args.NewValue());

    QueueInkPresenterWorkItem([isEnabled](auto presenter)
        {
            presenter.IsInputEnabled(isEnabled);
        });
}

void OnLoaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args
 | ) |  |

Definition at line 106 of file InkCanvas.cpp.

{
    // Historically, there has been an issue with the firing of loaded/unloaded.  Although we are working
    // to fix this, we will implement the official workaround here to prevent any timing issues between these
    // changes;
    if (!IsLoaded())
    {
        return;
    }

    // Hook up this ink canvas with the DComp tree.
    AttachToVisualLink();

    // Although the visual link will maintain position and clipping for for our visual, it won't update the
    // size of the system visual, which is ok, because its size does not clip its children (its clipping could,
    // but not its size).  However, the presenter won't see this size change either, so we need to explicitly
    // set the size of the presenter when the system rasterization scale, actual size or scale transform has changed.

    m_xamlRootChangedRevoker = XamlRoot().Changed(winrt::auto_revoke,
        [weakThis{ get_weak() }](auto const& /*sender*/, auto const& /*args*/)
        {
            if (auto strongThis = weakThis.get())
            {
                // Our Rasterization Scale may have changed.
                strongThis->UpdateInkPresenterSize();
            }
        });

    m_sizeChanged_revoker = SizeChanged(winrt::auto_revoke,
        [weakThis{ get_weak() }](auto const& sender, auto const& /*args*/)
        {
            if (auto strongThis = weakThis.get())
            {
                strongThis->UpdateInkPresenterSize();
            }
        });

    // Bug 52084592: Need way to be notified of xaml scale factor changes above an element.
    //
    // There doesn't appear to be an event that we can listen to to know when the scale factor for the canvas has
    // changed.  This is required, because the Ink Canvas uses this scale factor to configure the Ink Presenter
    // size in physical pixels.  Note: this is the accumulated scale from the root, not just the scale on the Ink
    // canvas.
    //
    // When we know what event to be listening for, add it here.

    if (UseSystemVisualLink())
    {
        // This is the first time we know the size of the ink canvas so update the presenter
        UpdateInkPresenterSize();
    }
    else
    {
        // This is the first time we have a position for the ink canvas in the scene so position the dcomp pieces.
        PositionInkVisual();
    }
}

void OnUnloaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args
 | ) |  |

Definition at line 165 of file InkCanvas.cpp.

{
    // Historically, there has been an issue with the firing of loaded/unloaded.  Although we are working
    // to fix this, we will implement the official workaround here to prevent any timing issues between these
    // changes;
    if (this->IsLoaded())
    {
        return;
    }

    m_xamlRootChangedRevoker.revoke();
    m_sizeChanged_revoker.revoke();

    DetachFromVisualLink();
}

void PositionInkVisual ( ) [protected]

Definition at line 475 of file InkCanvas.cpp.

{
    // All of this is supposed be the functionality that we get from using the visual link
    if (UseSystemVisualLink()) return;

    // Get the transform from the root visual to the element
    auto transformer = TransformToVisual(nullptr);

    // Get the location of the Ink Canvas control in physical pixels.
    winrt::Rect rect { 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight())};
    rect = transformer.TransformBounds(rect);

    // Use the same transform to get the current Xaml scale(s)
    winrt::Rect scaleRect{ 0, 0, 1, 1};
    scaleRect = transformer.TransformBounds(scaleRect);

    //  Set the offset position of the canvas.  It seems that dcomp doesn't account for
    //  the root scale for the offset so we need to apply it.
    const float rootScale = static_cast<float>(XamlRoot().RasterizationScale());
    m_inkRootVisual->SetOffsetX(rect.X * rootScale);
    m_inkRootVisual->SetOffsetY(rect.Y * rootScale);

    // Create the transform on on the system system visual.
    D2D_MATRIX_3X2_F visualTransform {
        scaleRect.Width, 0,
        0, scaleRect.Height,
        0, 0
    };
    if (FlowDirection() == winrt::FlowDirection::RightToLeft)
    {
        visualTransform.m11 *= -1;
        visualTransform.dx = rect.Width * rootScale;
    }

    m_inkRootVisual->SetTransform(visualTransform);

    m_threadData->m_compositionDevice->Commit();

    UpdateInkPresenterSize();
}

winrt::IAsyncAction QueueInkPresenterWorkItem ( winrt::DoInkPresenterWork workItem )

Definition at line 196 of file InkCanvas.cpp.

{
    // Since the ink presenter is created on the ink thread, applications may want to request
    // presenter work before the presenter is created (e.g. setting rendering attributes).
    // This is Ok, because by the time the ink thread runs this work, the presenter will be there.
    //
    // Applications may also request presenter work as the InkCanvas is being shut down (e.g.
    // they want to save the ink strokes.  This is also OK, but we need to make sure that we
    // keep the presenter alive long enough for that work to occur.
    //
    // So we need to take a strong reference to the InkCanvas and pass that as part of the
    // work item so that we can retrieve the presenter if it isn't there yet and ensure that we
    // extend the life of the presenter until after the work is complete.

    concurrency::task_completion_event<void> taskComplete;

    auto workItemWrapper = [workItem, taskComplete, strongThis = get_strong()]()
        {
            try
            {
                // This shouldn't ever happen, since the first call to the ink thread should always be
                // to create the presenter.
                MUX_ASSERT(strongThis->m_inkPresenter);
                if (strongThis->m_inkPresenter)
                {
                    // Invoke the work item passing the presenter.
                    workItem(strongThis->m_inkPresenter);
                }
                taskComplete.set();
            }
            catch (...)
            {
                taskComplete.set_exception(std::current_exception);
            }
        };

    // Submit the work item to the ink thread
    winrt::check_hresult(m_threadData->m_inkHost->QueueWorkItem(winrt::make<GenericInkCallback>(workItemWrapper).get()));

    // create a task to wait for the work item to complete and await it.
    auto inktask = concurrency::create_task(taskComplete, concurrency::task_continuation_context::get_current_winrt_context());
    co_await inktask;

}

void UpdateInkPresenterSize ( ) [private]

Definition at line 275 of file InkCanvas.cpp.

{
    // Transform the width/height based on Xaml scaling
    auto transformer = TransformToVisual(nullptr);
    winrt::Rect rect{ 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight())};
    rect = transformer.TransformBounds(rect);

    // Get the system scale
    auto rootScale = XamlRoot().RasterizationScale();

    // Update the presenter
    QueueInkPresenterWorkItem([width = ActualWidth() * rootScale, height = ActualHeight() * rootScale](auto presenter)
        {
            auto inkPresenterDesktop = presenter.as<IInkPresenterDesktop>();
            inkPresenterDesktop->SetSize(static_cast<float>(width), static_cast<float>(height));
        });
}

bool UseSystemVisualLink ( ) [protected]

Definition at line 402 of file InkCanvas.cpp.

{
    static bool useSystemVisualLink = [] {
        // We control whether we are using the system visual link by defining a boolean resource UseSystemVisualLink
        // in the application resources.  We initialize it upon first use so everything in the app gets the same
        // treatment.
        auto useSystemVisualKey = box_value(L"UseSystemVisualLink");
        if (winrt::Application::Current().Resources().HasKey(useSystemVisualKey))
        {
            return unbox_value<bool>(winrt::Application::Current().Resources().Lookup(useSystemVisualKey));
        }
        return false;
        }();
    return useSystemVisualLink;
}

Member Data Documentation

HWND m_hostHwnd = NULL [private]

Definition at line 43 of file InkCanvas.h.

winrt::com_ptr<IDCompositionVisual> m_inkRootVisual [private]

Definition at line 44 of file InkCanvas.h.

winrt::FrameworkElement::LayoutUpdated_revoker m_layoutUpdatedRevoker [protected]

Definition at line 63 of file InkCanvas.h.

winrt::FrameworkElement::SizeChanged_revoker m_sizeChanged_revoker [private]

Definition at line 45 of file InkCanvas.h.

std::shared_ptr<TargetData> m_targetData [protected]

Definition at line 95 of file InkCanvas.h.

std::shared_ptr<ThreadData> m_threadData [private]

Definition at line 41 of file InkCanvas.h.

The documentation for this class was generated from the following files:
  • InkCanvas/InkCanvas.h
  • InkCanvas/InkCanvas.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas::TargetData Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • InkCanvas
  • InkCanvas::TargetData
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

InkCanvas::TargetData Struct Reference

#include "InkCanvas.h"

List of all members.

Public Member Functions

TargetData (HWND hwnd)
~TargetData ()

Static Public Member Functions

static std::shared_ptr
< TargetData > 		Get (HWND hwnd)

Public Attributes

winrt::com_ptr
< IDCompositionTarget > 		m_compositionTarget
HWND m_hwnd
winrt::com_ptr
< IDCompositionVisual > 		m_targetRootVisual

Static Public Attributes

static thread_local std::map
< HWND, std::weak_ptr
< TargetData > > 		m_tlsMap

Detailed Description

Definition at line 65 of file InkCanvas.h.

Constructor & Destructor Documentation

TargetData ( HWND hwnd ) [inline]

Definition at line 86 of file InkCanvas.h.

                              : m_hwnd(hwnd)
        {
        }

~TargetData ( ) [inline]

Definition at line 90 of file InkCanvas.h.

        {
            m_tlsMap.erase(m_hwnd);
        }

Member Function Documentation

static std::shared_ptr<TargetData> Get ( HWND hwnd ) [inline, static]

Definition at line 72 of file InkCanvas.h.

        {
            // Have we previously initialized target data for this hwnd.
            auto iter = m_tlsMap.find(hwnd);
            if (iter != m_tlsMap.end())
            {
                return iter->second.lock();
            }
            // No, so initialize it
            auto targetData = std::make_shared<TargetData>(hwnd);
            m_tlsMap[hwnd] = targetData;
            return targetData;
        }

Member Data Documentation

winrt::com_ptr<IDCompositionTarget> m_compositionTarget

Definition at line 68 of file InkCanvas.h.

HWND m_hwnd

Definition at line 70 of file InkCanvas.h.

winrt::com_ptr<IDCompositionVisual> m_targetRootVisual

Definition at line 69 of file InkCanvas.h.

thread_local std::map< HWND, std::weak_ptr< InkCanvas::TargetData > > m_tlsMap [static]

Definition at line 67 of file InkCanvas.h.

The documentation for this struct was generated from the following files:
  • InkCanvas/InkCanvas.h
  • InkCanvas/InkCanvas.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvasAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkCanvasAutomationPeer Class Reference

#include "InkCanvasAutomationPeer.h"

Inherits ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT >.

List of all members.

Public Member Functions

InkCanvasAutomationPeer (winrt::InkCanvas const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()

Detailed Description

Definition at line 7 of file InkCanvasAutomationPeer.h.

Constructor & Destructor Documentation

InkCanvasAutomationPeer ( winrt::InkCanvas const & owner )

Definition at line 8 of file InkCanvasAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 18 of file InkCanvasAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Pane;
}

hstring GetClassNameCore ( )

Definition at line 13 of file InkCanvasAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::InkCanvas>();
}

The documentation for this class was generated from the following files:
  • InkCanvas/InkCanvasAutomationPeer.h
  • InkCanvas/InkCanvasAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvasProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkCanvasProperties Class Reference

#include "InkCanvas.properties.h"

Inherited by InkCanvas.

List of all members.

Public Member Functions

InkCanvasProperties ()
bool | IsEnabled ()
void | IsEnabled (bool value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsEnabledProperty ()
static void | OnIsEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Static Public Attributes

static GlobalDependencyProperty | s_IsEnabledProperty

Detailed Description

Definition at line 7 of file InkCanvas.properties.h.

Constructor & Destructor Documentation

InkCanvasProperties ( )

Definition at line 18 of file InkCanvas.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file InkCanvas.properties.cpp.

{
    s_IsEnabledProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file InkCanvas.properties.cpp.

{
    if (!s_IsEnabledProperty)
    {
        s_IsEnabledProperty =
            InitializeDependencyProperty(
                L"IsEnabled",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkCanvas>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsEnabledPropertyChanged));
    }
}

void IsEnabled ( bool value )

Definition at line 51 of file InkCanvas.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkCanvas*>(this)->SetValue(s_IsEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsEnabled ( )

Definition at line 59 of file InkCanvas.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkCanvas*>(this)->GetValue(s_IsEnabledProperty));
}

static winrt::DependencyProperty IsEnabledProperty ( ) [inline, static]

Definition at line 15 of file InkCanvas.properties.h.

{ return s_IsEnabledProperty; }

void OnIsEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 43 of file InkCanvas.properties.cpp.

{
    auto owner = sender.as<winrt::InkCanvas>();
    winrt::get_self<InkCanvas>(owner)->OnIsEnabledPropertyChanged(args);
}

Member Data Documentation

GlobalDependencyProperty s_IsEnabledProperty [static]

Definition at line 17 of file InkCanvas.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkCanvas.properties.h
  • Generated/InkCanvas.properties.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBar Class Reference

#include "InkToolBar.h"

Inherits ReferenceTracker< InkToolBar, winrt::implementation::InkToolBarT >, and InkToolBarProperties.

List of all members.

Public Member Functions

winrt::InkToolBarToolButton | ActiveTool ()
void | ActiveTool (winrt::InkToolBarToolButton value)
winrt::InkToolBarButtonFlyoutPlacement | ButtonFlyoutPlacement ()
void | ButtonFlyoutPlacement (winrt::InkToolBarButtonFlyoutPlacement value)
winrt::DependencyObjectCollection | Children ()
winrt::InkToolBarMenuButton | GetMenuButton (winrt::InkToolBarMenuKind menu)
winrt::InkToolBarToggleButton | GetToggleButton (winrt::InkToolBarToggle tool)
winrt::InkToolBarToolButton | GetToolButton (winrt::InkToolBarTool tool)
void | InitialControls (winrt::InkToolBarInitialControls value)
winrt::InkToolBarInitialControls | InitialControls ()
winrt::InkDrawingAttributes | InkDrawingAttributes ()
void | IsRulerButtonChecked (bool value)
bool | IsRulerButtonChecked ()
bool | IsStencilButtonChecked ()
void | IsStencilButtonChecked (bool value)
void | Orientation (winrt::Orientation value)
winrt::Orientation | Orientation ()
winrt::InkCanvas | TargetInkCanvas ()
void | TargetInkCanvas (winrt::InkCanvas value)
void | TargetInkPresenter (winrt::IInspectable value)
winrt::IInspectable | TargetInkPresenter ()

Detailed Description

Definition at line 13 of file InkToolBar.h.

Member Function Documentation

winrt::InkToolBarToolButton ActiveTool ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 22 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void ActiveTool ( winrt::InkToolBarToolButton value ) [inline]

Definition at line 23 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarButtonFlyoutPlacement ButtonFlyoutPlacement ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 31 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void ButtonFlyoutPlacement ( winrt::InkToolBarButtonFlyoutPlacement value ) [inline]

Definition at line 32 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::DependencyObjectCollection Children ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 21 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarMenuButton GetMenuButton ( winrt::InkToolBarMenuKind menu ) [inline]

Definition at line 39 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarToggleButton GetToggleButton ( winrt::InkToolBarToggle tool ) [inline]

Definition at line 38 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarToolButton GetToolButton ( winrt::InkToolBarTool tool ) [inline]

Definition at line 37 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void InitialControls ( winrt::InkToolBarInitialControls value ) [inline]

Definition at line 20 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarInitialControls InitialControls ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 19 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkDrawingAttributes InkDrawingAttributes ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 24 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsRulerButtonChecked ( bool value ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 26 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

bool IsRulerButtonChecked ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 25 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

bool IsStencilButtonChecked ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 29 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsStencilButtonChecked ( bool value ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 30 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void Orientation ( winrt::Orientation value ) [inline]

Definition at line 34 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::Orientation Orientation ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 33 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkCanvas TargetInkCanvas ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 27 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void TargetInkCanvas ( winrt::InkCanvas value ) [inline]

Definition at line 28 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void TargetInkPresenter ( winrt::IInspectable value ) [inline]

Definition at line 36 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::IInspectable TargetInkPresenter ( ) [inline]

Reimplemented from InkToolBarProperties.

Definition at line 35 of file InkToolBar.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBar.h
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarAutomationPeer Class Reference

#include "InkToolbarAutomationPeer.h"

Inherits ReferenceTracker< InkToolBarAutomationPeer, winrt::implementation::InkToolBarAutomationPeerT >.

List of all members.

Public Member Functions

InkToolBarAutomationPeer (winrt::InkToolBar owner)

Detailed Description

Definition at line 12 of file InkToolbarAutomationPeer.h.

Constructor & Destructor Documentation

InkToolBarAutomationPeer ( winrt::InkToolBar owner ) [inline]

Definition at line 16 of file InkToolbarAutomationPeer.h.

{};

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolbarAutomationPeer.h
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarBallpointPenButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarBallpointPenButton Class Reference

#include "InkToolBarBallpointPenButton.h"

Detailed Description

Definition at line 14 of file InkToolBarBallpointPenButton.h.

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarBallpointPenButton.h
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarCustomPen Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarCustomPen Class Reference

#include "InkToolBarCustomPen.h"

Inherits ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT >.

List of all members.

Public Member Functions

winrt::InkDrawingAttributes | CreateInkDrawingAttributes (winrt::Brush brush, double strokeWidth)
winrt::InkDrawingAttributes | CreateInkDrawingAttributesCore (winrt::Brush brush, double strokeWidth)

Detailed Description

Definition at line 12 of file InkToolBarCustomPen.h.

Member Function Documentation

winrt::InkDrawingAttributes CreateInkDrawingAttributes | ( | winrt::Brush | brush,
 |  | double | strokeWidth |
 | ) |  |  | [inline]

Definition at line 17 of file InkToolBarCustomPen.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkDrawingAttributes CreateInkDrawingAttributesCore | ( | winrt::Brush | brush,
 |  | double | strokeWidth |
 | ) |  |  | [inline]

Definition at line 18 of file InkToolBarCustomPen.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarCustomPen.h
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarCustomPenButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarCustomPenButton Class Reference

#include "InkToolBarCustomPenButton.h"

Inherits InkToolBarCustomPenButtonProperties.

List of all members.

Public Member Functions

winrt::UIElement | ConfigurationContent ()
void | ConfigurationContent (winrt::UIElement value)
winrt::InkToolBarCustomPen | CustomPen ()
void | CustomPen (winrt::InkToolBarCustomPen value)

Detailed Description

Definition at line 15 of file InkToolBarCustomPenButton.h.

Member Function Documentation

winrt::UIElement ConfigurationContent ( ) [inline]

Reimplemented from InkToolBarCustomPenButtonProperties.

Definition at line 28 of file InkToolBarCustomPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void ConfigurationContent ( winrt::UIElement value ) [inline]

Definition at line 29 of file InkToolBarCustomPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarCustomPen CustomPen ( ) [inline]

Reimplemented from InkToolBarCustomPenButtonProperties.

Definition at line 26 of file InkToolBarCustomPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void CustomPen ( winrt::InkToolBarCustomPen value ) [inline]

Definition at line 27 of file InkToolBarCustomPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarCustomPenButton.h
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarCustomPenButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarCustomPenButtonProperties Class Reference

#include "InkToolBarCustomPenButton.properties.h"

Inherited by InkToolBarCustomPenButton.

List of all members.

Public Member Functions

InkToolBarCustomPenButtonProperties ()
void | ConfigurationContent (winrt::UIElement const &value)
winrt::UIElement | ConfigurationContent ()
void | CustomPen (winrt::InkToolBarCustomPen const &value)
winrt::InkToolBarCustomPen | CustomPen ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ConfigurationContentProperty ()
static winrt::DependencyProperty | CustomPenProperty ()
static void | EnsureProperties ()

Static Public Attributes

static GlobalDependencyProperty | s_ConfigurationContentProperty
static GlobalDependencyProperty | s_CustomPenProperty

Detailed Description

Definition at line 7 of file InkToolBarCustomPenButton.properties.h.

Constructor & Destructor Documentation

InkToolBarCustomPenButtonProperties ( )

Definition at line 19 of file InkToolBarCustomPenButton.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 51 of file InkToolBarCustomPenButton.properties.cpp.

{
    s_ConfigurationContentProperty = nullptr;
    s_CustomPenProperty = nullptr;
    InkToolBarPenButton::ClearProperties();
}

void ConfigurationContent ( winrt::UIElement const & value )

Definition at line 58 of file InkToolBarCustomPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarCustomPenButton*>(this)->SetValue(s_ConfigurationContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
    }
}

winrt::UIElement ConfigurationContent ( )

Reimplemented in InkToolBarCustomPenButton.

Definition at line 66 of file InkToolBarCustomPenButton.properties.cpp.

{
    return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<InkToolBarCustomPenButton*>(this)->GetValue(s_ConfigurationContentProperty));
}

static winrt::DependencyProperty ConfigurationContentProperty ( ) [inline, static]

Definition at line 18 of file InkToolBarCustomPenButton.properties.h.

{ return s_ConfigurationContentProperty; }

winrt::InkToolBarCustomPen CustomPen ( )

Reimplemented in InkToolBarCustomPenButton.

Definition at line 79 of file InkToolBarCustomPenButton.properties.cpp.

{
    return ValueHelper<winrt::InkToolBarCustomPen>::CastOrUnbox(static_cast<InkToolBarCustomPenButton*>(this)->GetValue(s_CustomPenProperty));
}

void CustomPen ( winrt::InkToolBarCustomPen const & value )

Definition at line 71 of file InkToolBarCustomPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarCustomPenButton*>(this)->SetValue(s_CustomPenProperty, ValueHelper<winrt::InkToolBarCustomPen>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty CustomPenProperty ( ) [inline, static]

Definition at line 19 of file InkToolBarCustomPenButton.properties.h.

{ return s_CustomPenProperty; }

void EnsureProperties ( ) [static]

Definition at line 24 of file InkToolBarCustomPenButton.properties.cpp.

{
    InkToolBarPenButton::EnsureProperties();
    if (!s_ConfigurationContentProperty)
    {
        s_ConfigurationContentProperty =
            InitializeDependencyProperty(
                L"ConfigurationContent",
                winrt::name_of<winrt::UIElement>(),
                winrt::name_of<winrt::InkToolBarCustomPenButton>(),
                false /* isAttached */,
                ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_CustomPenProperty)
    {
        s_CustomPenProperty =
            InitializeDependencyProperty(
                L"CustomPen",
                winrt::name_of<winrt::InkToolBarCustomPen>(),
                winrt::name_of<winrt::InkToolBarCustomPenButton>(),
                false /* isAttached */,
                ValueHelper<winrt::InkToolBarCustomPen>::BoxedDefaultValue(),
                nullptr);
    }
}

Member Data Documentation

GlobalDependencyProperty s_ConfigurationContentProperty [static]

Definition at line 21 of file InkToolBarCustomPenButton.properties.h.

GlobalDependencyProperty s_CustomPenProperty [static]

Definition at line 22 of file InkToolBarCustomPenButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarCustomPenButton.properties.h
  • Generated/InkToolBarCustomPenButton.properties.cpp
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarCustomToggleButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarCustomToggleButton Class Reference

#include "InkToolBarCustomToggleButton.h"

Detailed Description

Definition at line 14 of file InkToolBarCustomToggleButton.h.

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarCustomToggleButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarCustomToolButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarCustomToolButton Class Reference

#include "InkToolBarCustomToolButton.h"

Inherits InkToolBarCustomToolButtonProperties.

List of all members.

Public Member Functions

winrt::UIElement | ConfigurationContent ()
void | ConfigurationContent (winrt::UIElement value)

Detailed Description

Definition at line 15 of file InkToolBarCustomToolButton.h.

Member Function Documentation

winrt::UIElement ConfigurationContent ( ) [inline]

Reimplemented from InkToolBarCustomToolButtonProperties.

Definition at line 26 of file InkToolBarCustomToolButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void ConfigurationContent ( winrt::UIElement value ) [inline]

Definition at line 27 of file InkToolBarCustomToolButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarCustomToolButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarCustomToolButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarCustomToolButtonProperties Class Reference

#include "InkToolBarCustomToolButton.properties.h"

Inherited by InkToolBarCustomToolButton.

List of all members.

Public Member Functions

InkToolBarCustomToolButtonProperties ()
winrt::UIElement | ConfigurationContent ()
void | ConfigurationContent (winrt::UIElement const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ConfigurationContentProperty ()
static void | EnsureProperties ()

Static Public Attributes

static GlobalDependencyProperty | s_ConfigurationContentProperty

Detailed Description

Definition at line 7 of file InkToolBarCustomToolButton.properties.h.

Constructor & Destructor Documentation

InkToolBarCustomToolButtonProperties ( )

Definition at line 18 of file InkToolBarCustomToolButton.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 39 of file InkToolBarCustomToolButton.properties.cpp.

{
    s_ConfigurationContentProperty = nullptr;
    InkToolBarToolButton::ClearProperties();
}

winrt::UIElement ConfigurationContent ( )

Reimplemented in InkToolBarCustomToolButton.

Definition at line 53 of file InkToolBarCustomToolButton.properties.cpp.

{
    return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<InkToolBarCustomToolButton*>(this)->GetValue(s_ConfigurationContentProperty));
}

void ConfigurationContent ( winrt::UIElement const & value )

Definition at line 45 of file InkToolBarCustomToolButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarCustomToolButton*>(this)->SetValue(s_ConfigurationContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ConfigurationContentProperty ( ) [inline, static]

Definition at line 15 of file InkToolBarCustomToolButton.properties.h.

{ return s_ConfigurationContentProperty; }

void EnsureProperties ( ) [static]

Definition at line 23 of file InkToolBarCustomToolButton.properties.cpp.

{
    InkToolBarToolButton::EnsureProperties();
    if (!s_ConfigurationContentProperty)
    {
        s_ConfigurationContentProperty =
            InitializeDependencyProperty(
                L"ConfigurationContent",
                winrt::name_of<winrt::UIElement>(),
                winrt::name_of<winrt::InkToolBarCustomToolButton>(),
                false /* isAttached */,
                ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
                nullptr);
    }
}

Member Data Documentation

GlobalDependencyProperty s_ConfigurationContentProperty [static]

Definition at line 17 of file InkToolBarCustomToolButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarCustomToolButton.properties.h
  • Generated/InkToolBarCustomToolButton.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarEraserButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarEraserButton Class Reference

#include "InkToolBarEraserButton.h"

Inherits InkToolBarEraserButtonProperties.

List of all members.

Public Member Functions

bool | ArePrecisionErasersVisible ()
void | ArePrecisionErasersVisible (bool value)
void | IsClearAllVisible (bool value)
bool | IsClearAllVisible ()
bool | IsStrokeEraserVisible ()
void | IsStrokeEraserVisible (bool value)
winrt::InkToolBarEraserKind | SelectedEraser ()
void | SelectedEraser (winrt::InkToolBarEraserKind value)

Detailed Description

Definition at line 15 of file InkToolBarEraserButton.h.

Member Function Documentation

bool ArePrecisionErasersVisible ( ) [inline]

Reimplemented from InkToolBarEraserButtonProperties.

Definition at line 32 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void ArePrecisionErasersVisible ( bool value ) [inline]

Reimplemented from InkToolBarEraserButtonProperties.

Definition at line 33 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsClearAllVisible ( bool value ) [inline]

Reimplemented from InkToolBarEraserButtonProperties.

Definition at line 29 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

bool IsClearAllVisible ( ) [inline]

Reimplemented from InkToolBarEraserButtonProperties.

Definition at line 28 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

bool IsStrokeEraserVisible ( ) [inline]

Reimplemented from InkToolBarEraserButtonProperties.

Definition at line 30 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsStrokeEraserVisible ( bool value ) [inline]

Reimplemented from InkToolBarEraserButtonProperties.

Definition at line 31 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarEraserKind SelectedEraser ( ) [inline]

Reimplemented from InkToolBarEraserButtonProperties.

Definition at line 26 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void SelectedEraser ( winrt::InkToolBarEraserKind value ) [inline]

Definition at line 27 of file InkToolBarEraserButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarEraserButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarEraserButtonInternal Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarEraserButtonInternal Class Reference

#include "InkToolBarEraserButtonInternal.h"

Inherits ReferenceTracker< InkToolBarEraserButtonInternal, winrt::implementation::InkToolBarEraserButtonInternalTundefined >.

List of all members.

Detailed Description

Definition at line 12 of file InkToolBarEraserButtonInternal.h.

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarEraserButtonInternal.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarEraserButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarEraserButtonProperties Class Reference

#include "InkToolBarEraserButton.properties.h"

Inherited by InkToolBarEraserButton.

List of all members.

Public Member Functions

InkToolBarEraserButtonProperties ()
void | ArePrecisionErasersVisible (bool value)
bool | ArePrecisionErasersVisible ()
void | IsClearAllVisible (bool value)
bool | IsClearAllVisible ()
bool | IsStrokeEraserVisible ()
void | IsStrokeEraserVisible (bool value)
winrt::InkToolBarEraserKind | SelectedEraser ()
void | SelectedEraser (winrt::InkToolBarEraserKind const &value)

Static Public Member Functions

static winrt::DependencyProperty | ArePrecisionErasersVisibleProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsClearAllVisibleProperty ()
static winrt::DependencyProperty | IsStrokeEraserVisibleProperty ()
static winrt::DependencyProperty | SelectedEraserProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ArePrecisionErasersVisibleProperty
static GlobalDependencyProperty | s_IsClearAllVisibleProperty
static GlobalDependencyProperty | s_IsStrokeEraserVisibleProperty
static GlobalDependencyProperty | s_SelectedEraserProperty

Detailed Description

Definition at line 7 of file InkToolBarEraserButton.properties.h.

Constructor & Destructor Documentation

InkToolBarEraserButtonProperties ( )

Definition at line 21 of file InkToolBarEraserButton.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ArePrecisionErasersVisible ( bool value )

Reimplemented in InkToolBarEraserButton.

Definition at line 84 of file InkToolBarEraserButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarEraserButton*>(this)->SetValue(s_ArePrecisionErasersVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool ArePrecisionErasersVisible ( )

Reimplemented in InkToolBarEraserButton.

Definition at line 92 of file InkToolBarEraserButton.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_ArePrecisionErasersVisibleProperty));
}

static winrt::DependencyProperty ArePrecisionErasersVisibleProperty ( ) [inline, static]

Definition at line 24 of file InkToolBarEraserButton.properties.h.

{ return s_ArePrecisionErasersVisibleProperty; }

void ClearProperties ( ) [static]

Definition at line 75 of file InkToolBarEraserButton.properties.cpp.

{
    s_ArePrecisionErasersVisibleProperty = nullptr;
    s_IsClearAllVisibleProperty = nullptr;
    s_IsStrokeEraserVisibleProperty = nullptr;
    s_SelectedEraserProperty = nullptr;
    InkToolBarToolButton::ClearProperties();
}

void EnsureProperties ( ) [static]

Definition at line 26 of file InkToolBarEraserButton.properties.cpp.

{
    InkToolBarToolButton::EnsureProperties();
    if (!s_ArePrecisionErasersVisibleProperty)
    {
        s_ArePrecisionErasersVisibleProperty =
            InitializeDependencyProperty(
                L"ArePrecisionErasersVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkToolBarEraserButton>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_IsClearAllVisibleProperty)
    {
        s_IsClearAllVisibleProperty =
            InitializeDependencyProperty(
                L"IsClearAllVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkToolBarEraserButton>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_IsStrokeEraserVisibleProperty)
    {
        s_IsStrokeEraserVisibleProperty =
            InitializeDependencyProperty(
                L"IsStrokeEraserVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkToolBarEraserButton>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SelectedEraserProperty)
    {
        s_SelectedEraserProperty =
            InitializeDependencyProperty(
                L"SelectedEraser",
                winrt::name_of<winrt::InkToolBarEraserKind>(),
                winrt::name_of<winrt::InkToolBarEraserButton>(),
                false /* isAttached */,
                ValueHelper<winrt::InkToolBarEraserKind>::BoxedDefaultValue(),
                nullptr);
    }
}

bool IsClearAllVisible ( )

Reimplemented in InkToolBarEraserButton.

Definition at line 105 of file InkToolBarEraserButton.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_IsClearAllVisibleProperty));
}

void IsClearAllVisible ( bool value )

Reimplemented in InkToolBarEraserButton.

Definition at line 97 of file InkToolBarEraserButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarEraserButton*>(this)->SetValue(s_IsClearAllVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsClearAllVisibleProperty ( ) [inline, static]

Definition at line 25 of file InkToolBarEraserButton.properties.h.

{ return s_IsClearAllVisibleProperty; }

bool IsStrokeEraserVisible ( )

Reimplemented in InkToolBarEraserButton.

Definition at line 118 of file InkToolBarEraserButton.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_IsStrokeEraserVisibleProperty));
}

void IsStrokeEraserVisible ( bool value )

Reimplemented in InkToolBarEraserButton.

Definition at line 110 of file InkToolBarEraserButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarEraserButton*>(this)->SetValue(s_IsStrokeEraserVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsStrokeEraserVisibleProperty ( ) [inline, static]

Definition at line 26 of file InkToolBarEraserButton.properties.h.

{ return s_IsStrokeEraserVisibleProperty; }

winrt::InkToolBarEraserKind SelectedEraser ( )

Reimplemented in InkToolBarEraserButton.

Definition at line 131 of file InkToolBarEraserButton.properties.cpp.

{
    return ValueHelper<winrt::InkToolBarEraserKind>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_SelectedEraserProperty));
}

void SelectedEraser ( winrt::InkToolBarEraserKind const & value )

Definition at line 123 of file InkToolBarEraserButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarEraserButton*>(this)->SetValue(s_SelectedEraserProperty, ValueHelper<winrt::InkToolBarEraserKind>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SelectedEraserProperty ( ) [inline, static]

Definition at line 27 of file InkToolBarEraserButton.properties.h.

{ return s_SelectedEraserProperty; }

Member Data Documentation

GlobalDependencyProperty s_ArePrecisionErasersVisibleProperty [static]

Definition at line 29 of file InkToolBarEraserButton.properties.h.

GlobalDependencyProperty s_IsClearAllVisibleProperty [static]

Definition at line 30 of file InkToolBarEraserButton.properties.h.

GlobalDependencyProperty s_IsStrokeEraserVisibleProperty [static]

Definition at line 31 of file InkToolBarEraserButton.properties.h.

GlobalDependencyProperty s_SelectedEraserProperty [static]

Definition at line 32 of file InkToolBarEraserButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarEraserButton.properties.h
  • Generated/InkToolBarEraserButton.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarEraserFlyoutItemClickedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarEraserFlyoutItemClickedEventArgs Class Reference

#include "InkToolBarEraserFlyoutItemClickedEventArgs.h"

Inherits ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT >.

List of all members.

Public Member Functions

winrt::InkToolBarEraserFlyoutItemKind | EraserFlyoutItemKind ()
void | Handled (bool value)
bool | Handled ()

Detailed Description

Definition at line 12 of file InkToolBarEraserFlyoutItemClickedEventArgs.h.

Member Function Documentation

winrt::InkToolBarEraserFlyoutItemKind EraserFlyoutItemKind ( ) [inline]

Definition at line 17 of file InkToolBarEraserFlyoutItemClickedEventArgs.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void Handled ( bool value ) [inline]

Definition at line 19 of file InkToolBarEraserFlyoutItemClickedEventArgs.h.

{ winrt::throw_hresult(E_NOTIMPL); }

bool Handled ( ) [inline]

Definition at line 18 of file InkToolBarEraserFlyoutItemClickedEventArgs.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarEraserFlyoutItemClickedEventArgs.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarFlyoutItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarFlyoutItem Class Reference

#include "InkToolBarFlyoutItem.h"

Inherits ReferenceTracker< InkToolBarFlyoutItem, winrt::implementation::InkToolBarFlyoutItemT >, and InkToolBarFlyoutItemProperties.

List of all members.

Public Member Functions

bool | IsChecked ()
void | IsChecked (bool value)
winrt::InkToolBarFlyoutItemKind | Kind ()
void | Kind (winrt::InkToolBarFlyoutItemKind value)

Detailed Description

Definition at line 13 of file InkToolBarFlyoutItem.h.

Member Function Documentation

bool IsChecked ( ) [inline]

Reimplemented from InkToolBarFlyoutItemProperties.

Definition at line 21 of file InkToolBarFlyoutItem.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsChecked ( bool value ) [inline]

Reimplemented from InkToolBarFlyoutItemProperties.

Definition at line 22 of file InkToolBarFlyoutItem.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarFlyoutItemKind Kind ( ) [inline]

Reimplemented from InkToolBarFlyoutItemProperties.

Definition at line 19 of file InkToolBarFlyoutItem.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void Kind ( winrt::InkToolBarFlyoutItemKind value ) [inline]

Definition at line 20 of file InkToolBarFlyoutItem.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarFlyoutItem.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarFlyoutItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarFlyoutItemAutomationPeer Class Reference

#include "InkToolBarFlyoutItemAutomationPeer.h"

Inherits ReferenceTracker< InkToolBarFlyoutItemAutomationPeer, winrt::implementation::InkToolBarFlyoutItemAutomationPeerT >.

List of all members.

Public Member Functions

InkToolBarFlyoutItemAutomationPeer (winrt::InkToolBarFlyoutItem owner)

Detailed Description

Definition at line 12 of file InkToolBarFlyoutItemAutomationPeer.h.

Constructor & Destructor Documentation

InkToolBarFlyoutItemAutomationPeer ( winrt::InkToolBarFlyoutItem owner ) [inline]

Definition at line 16 of file InkToolBarFlyoutItemAutomationPeer.h.

{};

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarFlyoutItemAutomationPeer.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarFlyoutItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

InkToolBarFlyoutItemProperties Class Reference

#include "InkToolBarFlyoutItem.properties.h"

Inherited by InkToolBarFlyoutItem.

List of all members.

Public Member Functions

InkToolBarFlyoutItemProperties ()
winrt::event_token | Checked (winrt::TypedEventHandler< winrt::InkToolBarFlyoutItem, winrt::IInspectable > const &value)
void | Checked (winrt::event_token const &token)
void | IsChecked (bool value)
bool | IsChecked ()
winrt::InkToolBarFlyoutItemKind | Kind ()
void | Kind (winrt::InkToolBarFlyoutItemKind const &value)
winrt::event_token | Unchecked (winrt::TypedEventHandler< winrt::InkToolBarFlyoutItem, winrt::IInspectable > const &value)
void | Unchecked (winrt::event_token const &token)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsCheckedProperty ()
static winrt::DependencyProperty | KindProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::InkToolBarFlyoutItem,
winrt::IInspectable > > 		m_checkedEventSource
event_source
< winrt::TypedEventHandler
< winrt::InkToolBarFlyoutItem,
winrt::IInspectable > > 		m_uncheckedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_IsCheckedProperty
static GlobalDependencyProperty | s_KindProperty

Detailed Description

Definition at line 7 of file InkToolBarFlyoutItem.properties.h.

Constructor & Destructor Documentation

InkToolBarFlyoutItemProperties ( )

Definition at line 19 of file InkToolBarFlyoutItem.properties.cpp.

    : m_checkedEventSource{static_cast<InkToolBarFlyoutItem*>(this)}

Member Function Documentation

winrt::event_token Checked ( winrt::TypedEventHandler< winrt::InkToolBarFlyoutItem, winrt::IInspectable > const & value )
void Checked ( winrt::event_token const & token )
static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
bool IsChecked ( )

Reimplemented in InkToolBarFlyoutItem.

void IsChecked ( bool value )

Reimplemented in InkToolBarFlyoutItem.

static winrt::DependencyProperty IsCheckedProperty ( ) [inline, static]

Definition at line 18 of file InkToolBarFlyoutItem.properties.h.

{ return s_IsCheckedProperty; }

winrt::InkToolBarFlyoutItemKind Kind ( )

Reimplemented in InkToolBarFlyoutItem.

void Kind ( winrt::InkToolBarFlyoutItemKind const & value )
static winrt::DependencyProperty KindProperty ( ) [inline, static]

Definition at line 19 of file InkToolBarFlyoutItem.properties.h.

{ return s_KindProperty; }

winrt::event_token Unchecked ( winrt::TypedEventHandler< winrt::InkToolBarFlyoutItem, winrt::IInspectable > const & value )
void Unchecked ( winrt::event_token const & token )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable> > m_checkedEventSource

Definition at line 29 of file InkToolBarFlyoutItem.properties.h.

event_source<winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable> > m_uncheckedEventSource

Definition at line 30 of file InkToolBarFlyoutItem.properties.h.

GlobalDependencyProperty s_IsCheckedProperty [static]

Definition at line 21 of file InkToolBarFlyoutItem.properties.h.

GlobalDependencyProperty s_KindProperty [static]

Definition at line 22 of file InkToolBarFlyoutItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarFlyoutItem.properties.h
  • Generated/InkToolBarFlyoutItem.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarHighlighterButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarHighlighterButton Class Reference

#include "InkToolBarHighlighterButton.h"

Detailed Description

Definition at line 14 of file InkToolBarHighlighterButton.h.

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarHighlighterButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarIsStencilButtonCheckedChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarIsStencilButtonCheckedChangedEventArgs Class Reference

#include "InkToolBarIsStencilButtonCheckedChangedEventArgs.h"

Inherits ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT >.

List of all members.

Public Member Functions

winrt::InkToolBarStencilButton | StencilButton ()
winrt::InkToolBarStencilKind | StencilKind ()

Detailed Description

Definition at line 12 of file InkToolBarIsStencilButtonCheckedChangedEventArgs.h.

Member Function Documentation

winrt::InkToolBarStencilButton StencilButton ( ) [inline]

Definition at line 17 of file InkToolBarIsStencilButtonCheckedChangedEventArgs.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarStencilKind StencilKind ( ) [inline]

Definition at line 18 of file InkToolBarIsStencilButtonCheckedChangedEventArgs.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarIsStencilButtonCheckedChangedEventArgs.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarMenuButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarMenuButton Class Reference

#include "InkToolBarMenuButton.h"

Inherits ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable >, and InkToolBarMenuButtonProperties.

List of all members.

Public Member Functions

bool | IsExtensionGlyphShown ()
void | IsExtensionGlyphShown (bool value)
winrt::InkToolBarMenuKind | MenuKind ()

Detailed Description

Definition at line 13 of file InkToolBarMenuButton.h.

Member Function Documentation

bool IsExtensionGlyphShown ( ) [inline]

Reimplemented from InkToolBarMenuButtonProperties.

Definition at line 20 of file InkToolBarMenuButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsExtensionGlyphShown ( bool value ) [inline]

Reimplemented from InkToolBarMenuButtonProperties.

Definition at line 21 of file InkToolBarMenuButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarMenuKind MenuKind ( ) [inline]

Reimplemented from InkToolBarMenuButtonProperties.

Definition at line 19 of file InkToolBarMenuButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarMenuButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarMenuButtonAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarMenuButtonAutomationPeer Class Reference

#include "InkToolBarMenuButtonAutomationPeer.h"

Inherits ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT >.

List of all members.

Public Member Functions

InkToolBarMenuButtonAutomationPeer (winrt::InkToolBarMenuButton owner)

Detailed Description

Definition at line 12 of file InkToolBarMenuButtonAutomationPeer.h.

Constructor & Destructor Documentation

InkToolBarMenuButtonAutomationPeer ( winrt::InkToolBarMenuButton owner ) [inline]

Definition at line 16 of file InkToolBarMenuButtonAutomationPeer.h.

{};

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarMenuButtonAutomationPeer.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarMenuButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarMenuButtonProperties Class Reference

#include "InkToolBarMenuButton.properties.h"

Inherited by InkToolBarMenuButton.

List of all members.

Public Member Functions

InkToolBarMenuButtonProperties ()
void | IsExtensionGlyphShown (bool value)
bool | IsExtensionGlyphShown ()
void | MenuKind (winrt::InkToolBarMenuKind const &value)
winrt::InkToolBarMenuKind | MenuKind ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsExtensionGlyphShownProperty ()
static winrt::DependencyProperty | MenuKindProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IsExtensionGlyphShownProperty
static GlobalDependencyProperty | s_MenuKindProperty

Detailed Description

Definition at line 7 of file InkToolBarMenuButton.properties.h.

Constructor & Destructor Documentation

InkToolBarMenuButtonProperties ( )

Definition at line 19 of file InkToolBarMenuButton.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file InkToolBarMenuButton.properties.cpp.

{
    s_IsExtensionGlyphShownProperty = nullptr;
    s_MenuKindProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file InkToolBarMenuButton.properties.cpp.

{
    if (!s_IsExtensionGlyphShownProperty)
    {
        s_IsExtensionGlyphShownProperty =
            InitializeDependencyProperty(
                L"IsExtensionGlyphShown",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkToolBarMenuButton>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_MenuKindProperty)
    {
        s_MenuKindProperty =
            InitializeDependencyProperty(
                L"MenuKind",
                winrt::name_of<winrt::InkToolBarMenuKind>(),
                winrt::name_of<winrt::InkToolBarMenuButton>(),
                false /* isAttached */,
                ValueHelper<winrt::InkToolBarMenuKind>::BoxedDefaultValue(),
                nullptr);
    }
}

bool IsExtensionGlyphShown ( )

Reimplemented in InkToolBarMenuButton.

Definition at line 64 of file InkToolBarMenuButton.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarMenuButton*>(this)->GetValue(s_IsExtensionGlyphShownProperty));
}

void IsExtensionGlyphShown ( bool value )

Reimplemented in InkToolBarMenuButton.

Definition at line 56 of file InkToolBarMenuButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarMenuButton*>(this)->SetValue(s_IsExtensionGlyphShownProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsExtensionGlyphShownProperty ( ) [inline, static]

Definition at line 18 of file InkToolBarMenuButton.properties.h.

{ return s_IsExtensionGlyphShownProperty; }

winrt::InkToolBarMenuKind MenuKind ( )

Reimplemented in InkToolBarMenuButton.

Definition at line 77 of file InkToolBarMenuButton.properties.cpp.

{
    return ValueHelper<winrt::InkToolBarMenuKind>::CastOrUnbox(static_cast<InkToolBarMenuButton*>(this)->GetValue(s_MenuKindProperty));
}

void MenuKind ( winrt::InkToolBarMenuKind const & value )

Definition at line 69 of file InkToolBarMenuButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarMenuButton*>(this)->SetValue(s_MenuKindProperty, ValueHelper<winrt::InkToolBarMenuKind>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MenuKindProperty ( ) [inline, static]

Definition at line 19 of file InkToolBarMenuButton.properties.h.

{ return s_MenuKindProperty; }

Member Data Documentation

GlobalDependencyProperty s_IsExtensionGlyphShownProperty [static]

Definition at line 21 of file InkToolBarMenuButton.properties.h.

GlobalDependencyProperty s_MenuKindProperty [static]

Definition at line 22 of file InkToolBarMenuButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarMenuButton.properties.h
  • Generated/InkToolBarMenuButton.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarPenButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarPenButton Class Reference

#include "InkToolBarPenButton.h"

Inherits InkToolBarPenButtonProperties.

List of all members.

Public Member Functions

double | MaxStrokeWidth ()
void | MaxStrokeWidth (double value)
double | MinStrokeWidth ()
void | MinStrokeWidth (double value)
void | Palette (winrt::IVector< winrt::Brush > value)
winrt::IVector< winrt::Brush > | Palette ()
winrt::Brush | SelectedBrush ()
int32_t | SelectedBrushIndex ()
void | SelectedBrushIndex (int32_t value)
void | SelectedStrokeWidth (double value)
double | SelectedStrokeWidth ()

Detailed Description

Definition at line 15 of file InkToolBarPenButton.h.

Member Function Documentation

double MaxStrokeWidth ( ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 30 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void MaxStrokeWidth ( double value ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 31 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

double MinStrokeWidth ( ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 28 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void MinStrokeWidth ( double value ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 29 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void Palette ( winrt::IVector< winrt::Brush > value ) [inline]

Definition at line 27 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::IVector<winrt::Brush> Palette ( ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 26 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::Brush SelectedBrush ( ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 32 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

int32_t SelectedBrushIndex ( ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 33 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void SelectedBrushIndex ( int32_t value ) [inline]

Definition at line 34 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void SelectedStrokeWidth ( double value ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 36 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

double SelectedStrokeWidth ( ) [inline]

Reimplemented from InkToolBarPenButtonProperties.

Definition at line 35 of file InkToolBarPenButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarPenButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarPenButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarPenButtonProperties Class Reference

#include "InkToolBarPenButton.properties.h"

Inherited by InkToolBarPenButton.

List of all members.

Public Member Functions

InkToolBarPenButtonProperties ()
void | MaxStrokeWidth (double value)
double | MaxStrokeWidth ()
void | MinStrokeWidth (double value)
double | MinStrokeWidth ()
void | Palette (winrt::IVector< winrt::Brush > const &value)
winrt::IVector< winrt::Brush > | Palette ()
void | SelectedBrush (winrt::Brush const &value)
winrt::Brush | SelectedBrush ()
int | SelectedBrushIndex ()
void | SelectedBrushIndex (int value)
double | SelectedStrokeWidth ()
void | SelectedStrokeWidth (double value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MaxStrokeWidthProperty ()
static winrt::DependencyProperty | MinStrokeWidthProperty ()
static winrt::DependencyProperty | PaletteProperty ()
static winrt::DependencyProperty | SelectedBrushIndexProperty ()
static winrt::DependencyProperty | SelectedBrushProperty ()
static winrt::DependencyProperty | SelectedStrokeWidthProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_MaxStrokeWidthProperty
static GlobalDependencyProperty | s_MinStrokeWidthProperty
static GlobalDependencyProperty | s_PaletteProperty
static GlobalDependencyProperty | s_SelectedBrushIndexProperty
static GlobalDependencyProperty | s_SelectedBrushProperty
static GlobalDependencyProperty | s_SelectedStrokeWidthProperty

Detailed Description

Definition at line 7 of file InkToolBarPenButton.properties.h.

Constructor & Destructor Documentation

InkToolBarPenButtonProperties ( )

Definition at line 23 of file InkToolBarPenButton.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 99 of file InkToolBarPenButton.properties.cpp.

{
    s_MaxStrokeWidthProperty = nullptr;
    s_MinStrokeWidthProperty = nullptr;
    s_PaletteProperty = nullptr;
    s_SelectedBrushProperty = nullptr;
    s_SelectedBrushIndexProperty = nullptr;
    s_SelectedStrokeWidthProperty = nullptr;
    InkToolBarToolButton::ClearProperties();
}

void EnsureProperties ( ) [static]

Definition at line 28 of file InkToolBarPenButton.properties.cpp.

{
    InkToolBarToolButton::EnsureProperties();
    if (!s_MaxStrokeWidthProperty)
    {
        s_MaxStrokeWidthProperty =
            InitializeDependencyProperty(
                L"MaxStrokeWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::InkToolBarPenButton>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_MinStrokeWidthProperty)
    {
        s_MinStrokeWidthProperty =
            InitializeDependencyProperty(
                L"MinStrokeWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::InkToolBarPenButton>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PaletteProperty)
    {
        s_PaletteProperty =
            InitializeDependencyProperty(
                L"Palette",
                winrt::name_of<winrt::IVector<winrt::Brush>>(),
                winrt::name_of<winrt::InkToolBarPenButton>(),
                false /* isAttached */,
                ValueHelper<winrt::IVector<winrt::Brush>>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SelectedBrushProperty)
    {
        s_SelectedBrushProperty =
            InitializeDependencyProperty(
                L"SelectedBrush",
                winrt::name_of<winrt::Brush>(),
                winrt::name_of<winrt::InkToolBarPenButton>(),
                false /* isAttached */,
                ValueHelper<winrt::Brush>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SelectedBrushIndexProperty)
    {
        s_SelectedBrushIndexProperty =
            InitializeDependencyProperty(
                L"SelectedBrushIndex",
                winrt::name_of<int>(),
                winrt::name_of<winrt::InkToolBarPenButton>(),
                false /* isAttached */,
                ValueHelper<int>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SelectedStrokeWidthProperty)
    {
        s_SelectedStrokeWidthProperty =
            InitializeDependencyProperty(
                L"SelectedStrokeWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::InkToolBarPenButton>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
}

double MaxStrokeWidth ( )

Reimplemented in InkToolBarPenButton.

Definition at line 118 of file InkToolBarPenButton.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_MaxStrokeWidthProperty));
}

void MaxStrokeWidth ( double value )

Reimplemented in InkToolBarPenButton.

Definition at line 110 of file InkToolBarPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarPenButton*>(this)->SetValue(s_MaxStrokeWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MaxStrokeWidthProperty ( ) [inline, static]

Definition at line 30 of file InkToolBarPenButton.properties.h.

{ return s_MaxStrokeWidthProperty; }

double MinStrokeWidth ( )

Reimplemented in InkToolBarPenButton.

Definition at line 131 of file InkToolBarPenButton.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_MinStrokeWidthProperty));
}

void MinStrokeWidth ( double value )

Reimplemented in InkToolBarPenButton.

Definition at line 123 of file InkToolBarPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarPenButton*>(this)->SetValue(s_MinStrokeWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MinStrokeWidthProperty ( ) [inline, static]

Definition at line 31 of file InkToolBarPenButton.properties.h.

{ return s_MinStrokeWidthProperty; }

void Palette ( winrt::IVector< winrt::Brush > const & value )

Definition at line 136 of file InkToolBarPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarPenButton*>(this)->SetValue(s_PaletteProperty, ValueHelper<winrt::IVector<winrt::Brush>>::BoxValueIfNecessary(value));
    }
}

winrt::IVector< winrt::Brush > Palette ( )

Reimplemented in InkToolBarPenButton.

Definition at line 144 of file InkToolBarPenButton.properties.cpp.

{
    return ValueHelper<winrt::IVector<winrt::Brush>>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_PaletteProperty));
}

static winrt::DependencyProperty PaletteProperty ( ) [inline, static]

Definition at line 32 of file InkToolBarPenButton.properties.h.

{ return s_PaletteProperty; }

winrt::Brush SelectedBrush ( )

Reimplemented in InkToolBarPenButton.

Definition at line 157 of file InkToolBarPenButton.properties.cpp.

{
    return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_SelectedBrushProperty));
}

void SelectedBrush ( winrt::Brush const & value )

Definition at line 149 of file InkToolBarPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarPenButton*>(this)->SetValue(s_SelectedBrushProperty, ValueHelper<winrt::Brush>::BoxValueIfNecessary(value));
    }
}

int SelectedBrushIndex ( )

Reimplemented in InkToolBarPenButton.

Definition at line 170 of file InkToolBarPenButton.properties.cpp.

{
    return ValueHelper<int>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_SelectedBrushIndexProperty));
}

void SelectedBrushIndex ( int value )

Definition at line 162 of file InkToolBarPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarPenButton*>(this)->SetValue(s_SelectedBrushIndexProperty, ValueHelper<int>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SelectedBrushIndexProperty ( ) [inline, static]

Definition at line 34 of file InkToolBarPenButton.properties.h.

{ return s_SelectedBrushIndexProperty; }

static winrt::DependencyProperty SelectedBrushProperty ( ) [inline, static]

Definition at line 33 of file InkToolBarPenButton.properties.h.

{ return s_SelectedBrushProperty; }

double SelectedStrokeWidth ( )

Reimplemented in InkToolBarPenButton.

Definition at line 183 of file InkToolBarPenButton.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_SelectedStrokeWidthProperty));
}

void SelectedStrokeWidth ( double value )

Reimplemented in InkToolBarPenButton.

Definition at line 175 of file InkToolBarPenButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarPenButton*>(this)->SetValue(s_SelectedStrokeWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SelectedStrokeWidthProperty ( ) [inline, static]

Definition at line 35 of file InkToolBarPenButton.properties.h.

{ return s_SelectedStrokeWidthProperty; }

Member Data Documentation

GlobalDependencyProperty s_MaxStrokeWidthProperty [static]

Definition at line 37 of file InkToolBarPenButton.properties.h.

GlobalDependencyProperty s_MinStrokeWidthProperty [static]

Definition at line 38 of file InkToolBarPenButton.properties.h.

GlobalDependencyProperty s_PaletteProperty [static]

Definition at line 39 of file InkToolBarPenButton.properties.h.

GlobalDependencyProperty s_SelectedBrushIndexProperty [static]

Definition at line 41 of file InkToolBarPenButton.properties.h.

GlobalDependencyProperty s_SelectedBrushProperty [static]

Definition at line 40 of file InkToolBarPenButton.properties.h.

GlobalDependencyProperty s_SelectedStrokeWidthProperty [static]

Definition at line 42 of file InkToolBarPenButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarPenButton.properties.h
  • Generated/InkToolBarPenButton.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarPencilButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarPencilButton Class Reference

#include "InktoolBarPencilButton.h"

Detailed Description

Definition at line 14 of file InktoolBarPencilButton.h.

The documentation for this class was generated from the following file:
  • InkToolBar/InktoolBarPencilButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarPenConfigurationControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarPenConfigurationControl Class Reference

#include "InkToolBarPenConfigurationControl.h"

Inherits ReferenceTracker< InkToolBarPenConfigurationControl, winrt::implementation::InkToolBarPenConfigurationControlT >, and InkToolBarPenConfigurationControlProperties.

List of all members.

Public Member Functions

winrt::InkToolBarPenButton PenButton ()

Detailed Description

Definition at line 13 of file InkToolBarPenConfigurationControl.h.

Member Function Documentation

winrt::InkToolBarPenButton PenButton ( ) [inline]

Reimplemented from InkToolBarPenConfigurationControlProperties.

Definition at line 19 of file InkToolBarPenConfigurationControl.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarPenConfigurationControl.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarPenConfigurationControlProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarPenConfigurationControlProperties Class Reference

#include "InkToolBarPenConfigurationControl.properties.h"

Inherited by InkToolBarPenConfigurationControl.

List of all members.

Public Member Functions

InkToolBarPenConfigurationControlProperties ()
winrt::InkToolBarPenButton | PenButton ()
void | PenButton (winrt::InkToolBarPenButton const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | PenButtonProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_PenButtonProperty

Detailed Description

Definition at line 7 of file InkToolBarPenConfigurationControl.properties.h.

Constructor & Destructor Documentation

InkToolBarPenConfigurationControlProperties ( )

Definition at line 18 of file InkToolBarPenConfigurationControl.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file InkToolBarPenConfigurationControl.properties.cpp.

{
    s_PenButtonProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file InkToolBarPenConfigurationControl.properties.cpp.

{
    if (!s_PenButtonProperty)
    {
        s_PenButtonProperty =
            InitializeDependencyProperty(
                L"PenButton",
                winrt::name_of<winrt::InkToolBarPenButton>(),
                winrt::name_of<winrt::InkToolBarPenConfigurationControl>(),
                false /* isAttached */,
                ValueHelper<winrt::InkToolBarPenButton>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::InkToolBarPenButton PenButton ( )

Reimplemented in InkToolBarPenConfigurationControl.

Definition at line 51 of file InkToolBarPenConfigurationControl.properties.cpp.

{
    return ValueHelper<winrt::InkToolBarPenButton>::CastOrUnbox(static_cast<InkToolBarPenConfigurationControl*>(this)->GetValue(s_PenButtonProperty));
}

void PenButton ( winrt::InkToolBarPenButton const & value )

Definition at line 43 of file InkToolBarPenConfigurationControl.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarPenConfigurationControl*>(this)->SetValue(s_PenButtonProperty, ValueHelper<winrt::InkToolBarPenButton>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty PenButtonProperty ( ) [inline, static]

Definition at line 15 of file InkToolBarPenConfigurationControl.properties.h.

{ return s_PenButtonProperty; }

Member Data Documentation

GlobalDependencyProperty s_PenButtonProperty [static]

Definition at line 17 of file InkToolBarPenConfigurationControl.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarPenConfigurationControl.properties.h
  • Generated/InkToolBarPenConfigurationControl.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

InkToolBarProperties Class Reference

#include "InkToolBar.properties.h"

Inherited by InkToolBar.

List of all members.

Public Member Functions

InkToolBarProperties ()
void | ActiveTool (winrt::InkToolBarToolButton const &value)
winrt::InkToolBarToolButton | ActiveTool ()
winrt::event_token | ActiveToolChanged (winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const &value)
void | ActiveToolChanged (winrt::event_token const &token)
void | ButtonFlyoutPlacement (winrt::InkToolBarButtonFlyoutPlacement const &value)
winrt::InkToolBarButtonFlyoutPlacement | ButtonFlyoutPlacement ()
void | Children (winrt::DependencyObjectCollection const &value)
winrt::DependencyObjectCollection | Children ()
winrt::event_token | EraseAllClicked (winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const &value)
void | EraseAllClicked (winrt::event_token const &token)
void | EraserFlyoutItemClicked (winrt::event_token const &token)
winrt::event_token | EraserFlyoutItemClicked (winrt::TypedEventHandler< winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable > const &value)
void | InitialControls (winrt::InkToolBarInitialControls const &value)
winrt::InkToolBarInitialControls | InitialControls ()
void | InkDrawingAttributes (winrt::InkDrawingAttributes const &value)
winrt::InkDrawingAttributes | InkDrawingAttributes ()
void | InkDrawingAttributesChanged (winrt::event_token const &token)
winrt::event_token | InkDrawingAttributesChanged (winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const &value)
bool | IsRulerButtonChecked ()
void | IsRulerButtonChecked (bool value)
void | IsStencilButtonChecked (bool value)
bool | IsStencilButtonChecked ()
void | IsStencilButtonCheckedChanged (winrt::event_token const &token)
winrt::event_token | IsStencilButtonCheckedChanged (winrt::TypedEventHandler< winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs > const &value)
void | Orientation (winrt::Orientation const &value)
winrt::Orientation | Orientation ()
void | TargetInkCanvas (winrt::InkCanvas const &value)
winrt::InkCanvas | TargetInkCanvas ()
winrt::IInspectable | TargetInkPresenter ()
void | TargetInkPresenter (winrt::IInspectable const &value)

Static Public Member Functions

static winrt::DependencyProperty | ActiveToolProperty ()
static winrt::DependencyProperty | ButtonFlyoutPlacementProperty ()
static winrt::DependencyProperty | ChildrenProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | InitialControlsProperty ()
static winrt::DependencyProperty | InkDrawingAttributesProperty ()
static winrt::DependencyProperty | IsRulerButtonCheckedProperty ()
static winrt::DependencyProperty | IsStencilButtonCheckedProperty ()
static winrt::DependencyProperty | OrientationProperty ()
static winrt::DependencyProperty | TargetInkCanvasProperty ()
static winrt::DependencyProperty | TargetInkPresenterProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::InkToolBar,
winrt::IInspectable > > 		m_activeToolChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::InkToolBar,
winrt::IInspectable > > 		m_eraseAllClickedEventSource
event_source
< winrt::TypedEventHandler
< winrt::InkToolBarEraserFlyoutItemClickedEventArgs,
winrt::IInspectable > > 		m_eraserFlyoutItemClickedEventSource
event_source
< winrt::TypedEventHandler
< winrt::InkToolBar,
winrt::IInspectable > > 		m_inkDrawingAttributesChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::InkToolBar,
winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs > > 		m_isStencilButtonCheckedChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ActiveToolProperty
static GlobalDependencyProperty | s_ButtonFlyoutPlacementProperty
static GlobalDependencyProperty | s_ChildrenProperty
static GlobalDependencyProperty | s_InitialControlsProperty
static GlobalDependencyProperty | s_InkDrawingAttributesProperty
static GlobalDependencyProperty | s_IsRulerButtonCheckedProperty
static GlobalDependencyProperty | s_IsStencilButtonCheckedProperty
static GlobalDependencyProperty | s_OrientationProperty
static GlobalDependencyProperty | s_TargetInkCanvasProperty
static GlobalDependencyProperty | s_TargetInkPresenterProperty

Detailed Description

Definition at line 7 of file InkToolBar.properties.h.

Constructor & Destructor Documentation

InkToolBarProperties ( )

Definition at line 27 of file InkToolBar.properties.cpp.

    : m_activeToolChangedEventSource{static_cast<InkToolBar*>(this)}

Member Function Documentation

void ActiveTool ( winrt::InkToolBarToolButton const & value )
winrt::InkToolBarToolButton ActiveTool ( )

Reimplemented in InkToolBar.

void ActiveToolChanged ( winrt::event_token const & token )
winrt::event_token ActiveToolChanged ( winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const & value )
static winrt::DependencyProperty ActiveToolProperty ( ) [inline, static]

Definition at line 42 of file InkToolBar.properties.h.

{ return s_ActiveToolProperty; }

winrt::InkToolBarButtonFlyoutPlacement ButtonFlyoutPlacement ( )

Reimplemented in InkToolBar.

void ButtonFlyoutPlacement ( winrt::InkToolBarButtonFlyoutPlacement const & value )
static winrt::DependencyProperty ButtonFlyoutPlacementProperty ( ) [inline, static]

Definition at line 43 of file InkToolBar.properties.h.

{ return s_ButtonFlyoutPlacementProperty; }

void Children ( winrt::DependencyObjectCollection const & value )
winrt::DependencyObjectCollection Children ( )

Reimplemented in InkToolBar.

static winrt::DependencyProperty ChildrenProperty ( ) [inline, static]

Definition at line 44 of file InkToolBar.properties.h.

{ return s_ChildrenProperty; }

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::event_token EraseAllClicked ( winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const & value )
void EraseAllClicked ( winrt::event_token const & token )
winrt::event_token EraserFlyoutItemClicked ( winrt::TypedEventHandler< winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable > const & value )
void EraserFlyoutItemClicked ( winrt::event_token const & token )
winrt::InkToolBarInitialControls InitialControls ( )

Reimplemented in InkToolBar.

void InitialControls ( winrt::InkToolBarInitialControls const & value )
static winrt::DependencyProperty InitialControlsProperty ( ) [inline, static]

Definition at line 45 of file InkToolBar.properties.h.

{ return s_InitialControlsProperty; }

void InkDrawingAttributes ( winrt::InkDrawingAttributes const & value )
winrt::InkDrawingAttributes InkDrawingAttributes ( )

Reimplemented in InkToolBar.

void InkDrawingAttributesChanged ( winrt::event_token const & token )
winrt::event_token InkDrawingAttributesChanged ( winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const & value )
static winrt::DependencyProperty InkDrawingAttributesProperty ( ) [inline, static]

Definition at line 46 of file InkToolBar.properties.h.

{ return s_InkDrawingAttributesProperty; }

void IsRulerButtonChecked ( bool value )

Reimplemented in InkToolBar.

bool IsRulerButtonChecked ( )

Reimplemented in InkToolBar.

static winrt::DependencyProperty IsRulerButtonCheckedProperty ( ) [inline, static]

Definition at line 47 of file InkToolBar.properties.h.

{ return s_IsRulerButtonCheckedProperty; }

void IsStencilButtonChecked ( bool value )

Reimplemented in InkToolBar.

bool IsStencilButtonChecked ( )

Reimplemented in InkToolBar.

winrt::event_token IsStencilButtonCheckedChanged ( winrt::TypedEventHandler< winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs > const & value )
void IsStencilButtonCheckedChanged ( winrt::event_token const & token )
static winrt::DependencyProperty IsStencilButtonCheckedProperty ( ) [inline, static]

Definition at line 48 of file InkToolBar.properties.h.

{ return s_IsStencilButtonCheckedProperty; }

winrt::Orientation Orientation ( )

Reimplemented in InkToolBar.

void Orientation ( winrt::Orientation const & value )
static winrt::DependencyProperty OrientationProperty ( ) [inline, static]

Definition at line 49 of file InkToolBar.properties.h.

{ return s_OrientationProperty; }

void TargetInkCanvas ( winrt::InkCanvas const & value )
winrt::InkCanvas TargetInkCanvas ( )

Reimplemented in InkToolBar.

static winrt::DependencyProperty TargetInkCanvasProperty ( ) [inline, static]

Definition at line 50 of file InkToolBar.properties.h.

{ return s_TargetInkCanvasProperty; }

winrt::IInspectable TargetInkPresenter ( )

Reimplemented in InkToolBar.

void TargetInkPresenter ( winrt::IInspectable const & value )
static winrt::DependencyProperty TargetInkPresenterProperty ( ) [inline, static]

Definition at line 51 of file InkToolBar.properties.h.

{ return s_TargetInkPresenterProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> > m_activeToolChangedEventSource

Definition at line 75 of file InkToolBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> > m_eraseAllClickedEventSource

Definition at line 76 of file InkToolBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable> > m_eraserFlyoutItemClickedEventSource

Definition at line 77 of file InkToolBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> > m_inkDrawingAttributesChangedEventSource

Definition at line 78 of file InkToolBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs> > m_isStencilButtonCheckedChangedEventSource

Definition at line 79 of file InkToolBar.properties.h.

GlobalDependencyProperty s_ActiveToolProperty [static]

Definition at line 53 of file InkToolBar.properties.h.

GlobalDependencyProperty s_ButtonFlyoutPlacementProperty [static]

Definition at line 54 of file InkToolBar.properties.h.

GlobalDependencyProperty s_ChildrenProperty [static]

Definition at line 55 of file InkToolBar.properties.h.

GlobalDependencyProperty s_InitialControlsProperty [static]

Definition at line 56 of file InkToolBar.properties.h.

GlobalDependencyProperty s_InkDrawingAttributesProperty [static]

Definition at line 57 of file InkToolBar.properties.h.

GlobalDependencyProperty s_IsRulerButtonCheckedProperty [static]

Definition at line 58 of file InkToolBar.properties.h.

GlobalDependencyProperty s_IsStencilButtonCheckedProperty [static]

Definition at line 59 of file InkToolBar.properties.h.

GlobalDependencyProperty s_OrientationProperty [static]

Definition at line 60 of file InkToolBar.properties.h.

GlobalDependencyProperty s_TargetInkCanvasProperty [static]

Definition at line 61 of file InkToolBar.properties.h.

GlobalDependencyProperty s_TargetInkPresenterProperty [static]

Definition at line 62 of file InkToolBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBar.properties.h
  • Generated/InkToolBar.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarStencilButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarStencilButton Class Reference

#include "InkToolBarStencilButton.h"

Inherits InkToolBarStencilButtonProperties.

List of all members.

Public Member Functions

bool | IsProtractorItemVisible ()
void | IsProtractorItemVisible (bool value)
void | IsRulerItemVisible (bool value)
bool | IsRulerItemVisible ()
winrt::InkPresenterProtractor | Protractor ()
winrt::InkPresenterRuler | Ruler ()
winrt::InkToolBarStencilKind | SelectedStencil ()
void | SelectedStencil (winrt::InkToolBarStencilKind value)

Detailed Description

Definition at line 15 of file InkToolBarStencilButton.h.

Member Function Documentation

bool IsProtractorItemVisible ( ) [inline]

Reimplemented from InkToolBarStencilButtonProperties.

Definition at line 28 of file InkToolBarStencilButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsProtractorItemVisible ( bool value ) [inline]

Reimplemented from InkToolBarStencilButtonProperties.

Definition at line 29 of file InkToolBarStencilButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsRulerItemVisible ( bool value ) [inline]

Reimplemented from InkToolBarStencilButtonProperties.

Definition at line 27 of file InkToolBarStencilButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

bool IsRulerItemVisible ( ) [inline]

Reimplemented from InkToolBarStencilButtonProperties.

Definition at line 26 of file InkToolBarStencilButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkPresenterProtractor Protractor ( ) [inline]

Reimplemented from InkToolBarStencilButtonProperties.

Definition at line 23 of file InkToolBarStencilButton.h.

winrt::InkPresenterRuler Ruler ( ) [inline]

Reimplemented from InkToolBarStencilButtonProperties.

Definition at line 22 of file InkToolBarStencilButton.h.

winrt::InkToolBarStencilKind SelectedStencil ( ) [inline]

Reimplemented from InkToolBarStencilButtonProperties.

Definition at line 24 of file InkToolBarStencilButton.h.

void SelectedStencil ( winrt::InkToolBarStencilKind value ) [inline]

Definition at line 25 of file InkToolBarStencilButton.h.

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarStencilButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarStencilButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarStencilButtonProperties Class Reference

#include "InkToolBarStencilButton.properties.h"

Inherited by InkToolBarStencilButton.

List of all members.

Public Member Functions

InkToolBarStencilButtonProperties ()
void | IsProtractorItemVisible (bool value)
bool | IsProtractorItemVisible ()
void | IsRulerItemVisible (bool value)
bool | IsRulerItemVisible ()
winrt::InkPresenterProtractor | Protractor ()
void | Protractor (winrt::InkPresenterProtractor const &value)
winrt::InkPresenterRuler | Ruler ()
void | Ruler (winrt::InkPresenterRuler const &value)
void | SelectedStencil (winrt::InkToolBarStencilKind const &value)
winrt::InkToolBarStencilKind | SelectedStencil ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsProtractorItemVisibleProperty ()
static winrt::DependencyProperty | IsRulerItemVisibleProperty ()
static winrt::DependencyProperty | ProtractorProperty ()
static winrt::DependencyProperty | RulerProperty ()
static winrt::DependencyProperty | SelectedStencilProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IsProtractorItemVisibleProperty
static GlobalDependencyProperty | s_IsRulerItemVisibleProperty
static GlobalDependencyProperty | s_ProtractorProperty
static GlobalDependencyProperty | s_RulerProperty
static GlobalDependencyProperty | s_SelectedStencilProperty

Detailed Description

Definition at line 7 of file InkToolBarStencilButton.properties.h.

Constructor & Destructor Documentation

InkToolBarStencilButtonProperties ( )

Definition at line 22 of file InkToolBarStencilButton.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 87 of file InkToolBarStencilButton.properties.cpp.

{
    s_IsProtractorItemVisibleProperty = nullptr;
    s_IsRulerItemVisibleProperty = nullptr;
    s_ProtractorProperty = nullptr;
    s_RulerProperty = nullptr;
    s_SelectedStencilProperty = nullptr;
    InkToolBarMenuButton::ClearProperties();
}

void EnsureProperties ( ) [static]

Definition at line 27 of file InkToolBarStencilButton.properties.cpp.

{
    InkToolBarMenuButton::EnsureProperties();
    if (!s_IsProtractorItemVisibleProperty)
    {
        s_IsProtractorItemVisibleProperty =
            InitializeDependencyProperty(
                L"IsProtractorItemVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkToolBarStencilButton>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_IsRulerItemVisibleProperty)
    {
        s_IsRulerItemVisibleProperty =
            InitializeDependencyProperty(
                L"IsRulerItemVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkToolBarStencilButton>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ProtractorProperty)
    {
        s_ProtractorProperty =
            InitializeDependencyProperty(
                L"Protractor",
                winrt::name_of<winrt::InkPresenterProtractor>(),
                winrt::name_of<winrt::InkToolBarStencilButton>(),
                false /* isAttached */,
                ValueHelper<winrt::InkPresenterProtractor>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_RulerProperty)
    {
        s_RulerProperty =
            InitializeDependencyProperty(
                L"Ruler",
                winrt::name_of<winrt::InkPresenterRuler>(),
                winrt::name_of<winrt::InkToolBarStencilButton>(),
                false /* isAttached */,
                ValueHelper<winrt::InkPresenterRuler>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SelectedStencilProperty)
    {
        s_SelectedStencilProperty =
            InitializeDependencyProperty(
                L"SelectedStencil",
                winrt::name_of<winrt::InkToolBarStencilKind>(),
                winrt::name_of<winrt::InkToolBarStencilButton>(),
                false /* isAttached */,
                ValueHelper<winrt::InkToolBarStencilKind>::BoxedDefaultValue(),
                nullptr);
    }
}

void IsProtractorItemVisible ( bool value )

Reimplemented in InkToolBarStencilButton.

Definition at line 97 of file InkToolBarStencilButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarStencilButton*>(this)->SetValue(s_IsProtractorItemVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsProtractorItemVisible ( )

Reimplemented in InkToolBarStencilButton.

Definition at line 105 of file InkToolBarStencilButton.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_IsProtractorItemVisibleProperty));
}

static winrt::DependencyProperty IsProtractorItemVisibleProperty ( ) [inline, static]

Definition at line 27 of file InkToolBarStencilButton.properties.h.

{ return s_IsProtractorItemVisibleProperty; }

bool IsRulerItemVisible ( )

Reimplemented in InkToolBarStencilButton.

Definition at line 118 of file InkToolBarStencilButton.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_IsRulerItemVisibleProperty));
}

void IsRulerItemVisible ( bool value )

Reimplemented in InkToolBarStencilButton.

Definition at line 110 of file InkToolBarStencilButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarStencilButton*>(this)->SetValue(s_IsRulerItemVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsRulerItemVisibleProperty ( ) [inline, static]

Definition at line 28 of file InkToolBarStencilButton.properties.h.

{ return s_IsRulerItemVisibleProperty; }

void Protractor ( winrt::InkPresenterProtractor const & value )

Definition at line 123 of file InkToolBarStencilButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarStencilButton*>(this)->SetValue(s_ProtractorProperty, ValueHelper<winrt::InkPresenterProtractor>::BoxValueIfNecessary(value));
    }
}

winrt::InkPresenterProtractor Protractor ( )

Reimplemented in InkToolBarStencilButton.

Definition at line 131 of file InkToolBarStencilButton.properties.cpp.

{
    return ValueHelper<winrt::InkPresenterProtractor>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_ProtractorProperty));
}

static winrt::DependencyProperty ProtractorProperty ( ) [inline, static]

Definition at line 29 of file InkToolBarStencilButton.properties.h.

{ return s_ProtractorProperty; }

winrt::InkPresenterRuler Ruler ( )

Reimplemented in InkToolBarStencilButton.

Definition at line 144 of file InkToolBarStencilButton.properties.cpp.

{
    return ValueHelper<winrt::InkPresenterRuler>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_RulerProperty));
}

void Ruler ( winrt::InkPresenterRuler const & value )

Definition at line 136 of file InkToolBarStencilButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarStencilButton*>(this)->SetValue(s_RulerProperty, ValueHelper<winrt::InkPresenterRuler>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty RulerProperty ( ) [inline, static]

Definition at line 30 of file InkToolBarStencilButton.properties.h.

{ return s_RulerProperty; }

void SelectedStencil ( winrt::InkToolBarStencilKind const & value )

Definition at line 149 of file InkToolBarStencilButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarStencilButton*>(this)->SetValue(s_SelectedStencilProperty, ValueHelper<winrt::InkToolBarStencilKind>::BoxValueIfNecessary(value));
    }
}

winrt::InkToolBarStencilKind SelectedStencil ( )

Reimplemented in InkToolBarStencilButton.

Definition at line 157 of file InkToolBarStencilButton.properties.cpp.

{
    return ValueHelper<winrt::InkToolBarStencilKind>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_SelectedStencilProperty));
}

static winrt::DependencyProperty SelectedStencilProperty ( ) [inline, static]

Definition at line 31 of file InkToolBarStencilButton.properties.h.

{ return s_SelectedStencilProperty; }

Member Data Documentation

GlobalDependencyProperty s_IsProtractorItemVisibleProperty [static]

Definition at line 33 of file InkToolBarStencilButton.properties.h.

GlobalDependencyProperty s_IsRulerItemVisibleProperty [static]

Definition at line 34 of file InkToolBarStencilButton.properties.h.

GlobalDependencyProperty s_ProtractorProperty [static]

Definition at line 35 of file InkToolBarStencilButton.properties.h.

GlobalDependencyProperty s_RulerProperty [static]

Definition at line 36 of file InkToolBarStencilButton.properties.h.

GlobalDependencyProperty s_SelectedStencilProperty [static]

Definition at line 37 of file InkToolBarStencilButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarStencilButton.properties.h
  • Generated/InkToolBarStencilButton.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarToggleButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarToggleButton Class Reference

#include "InkToolBarToggleButton.h"

Inherits ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable >.

List of all members.

Public Member Functions

winrt::InkToolBarToggle ToggleKind ()

Detailed Description

Definition at line 12 of file InkToolBarToggleButton.h.

Member Function Documentation

winrt::InkToolBarToggle ToggleKind ( ) [inline]

Definition at line 17 of file InkToolBarToggleButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarToggleButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarToolButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarToolButton Class Reference

#include "InkToolBarToolButton.h"

Inherits ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable >, and InkToolBarToolButtonProperties.

List of all members.

Public Member Functions

bool | IsExtensionGlyphShown ()
void | IsExtensionGlyphShown (bool value)
winrt::InkToolBarToggle | ToggleKind ()
winrt::InkToolBarTool | ToolKind ()

Detailed Description

Definition at line 13 of file InkToolBarToolButton.h.

Member Function Documentation

bool IsExtensionGlyphShown ( ) [inline]

Reimplemented from InkToolBarToolButtonProperties.

Definition at line 20 of file InkToolBarToolButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

void IsExtensionGlyphShown ( bool value ) [inline]

Reimplemented from InkToolBarToolButtonProperties.

Definition at line 21 of file InkToolBarToolButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarToggle ToggleKind ( ) [inline]

Definition at line 22 of file InkToolBarToolButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

winrt::InkToolBarTool ToolKind ( ) [inline]

Definition at line 19 of file InkToolBarToolButton.h.

{ winrt::throw_hresult(E_NOTIMPL); }

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarToolButton.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarToolButtonAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InkToolBarToolButtonAutomationPeer Class Reference

#include "InkToolBarToolButtonAutomationPeer.h"

Inherits ReferenceTracker< InkToolBarToolButtonAutomationPeer, winrt::implementation::InkToolBarToolButtonAutomationPeerT >.

List of all members.

Public Member Functions

InkToolBarToolButtonAutomationPeer (winrt::InkToolBarToolButton owner)

Detailed Description

Definition at line 12 of file InkToolBarToolButtonAutomationPeer.h.

Constructor & Destructor Documentation

InkToolBarToolButtonAutomationPeer ( winrt::InkToolBarToolButton owner ) [inline]

Definition at line 16 of file InkToolBarToolButtonAutomationPeer.h.

{};

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarToolButtonAutomationPeer.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarToolButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

InkToolBarToolButtonProperties Class Reference

#include "InkToolBarToolButton.properties.h"

Inherited by InkToolBarToolButton.

List of all members.

Public Member Functions

InkToolBarToolButtonProperties ()
bool | IsExtensionGlyphShown ()
void | IsExtensionGlyphShown (bool value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsExtensionGlyphShownProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IsExtensionGlyphShownProperty

Detailed Description

Definition at line 7 of file InkToolBarToolButton.properties.h.

Constructor & Destructor Documentation

InkToolBarToolButtonProperties ( )

Definition at line 18 of file InkToolBarToolButton.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file InkToolBarToolButton.properties.cpp.

{
    s_IsExtensionGlyphShownProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file InkToolBarToolButton.properties.cpp.

{
    if (!s_IsExtensionGlyphShownProperty)
    {
        s_IsExtensionGlyphShownProperty =
            InitializeDependencyProperty(
                L"IsExtensionGlyphShown",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::InkToolBarToolButton>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
}

bool IsExtensionGlyphShown ( )

Reimplemented in InkToolBarToolButton.

Definition at line 51 of file InkToolBarToolButton.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarToolButton*>(this)->GetValue(s_IsExtensionGlyphShownProperty));
}

void IsExtensionGlyphShown ( bool value )

Reimplemented in InkToolBarToolButton.

Definition at line 43 of file InkToolBarToolButton.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<InkToolBarToolButton*>(this)->SetValue(s_IsExtensionGlyphShownProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsExtensionGlyphShownProperty ( ) [inline, static]

Definition at line 15 of file InkToolBarToolButton.properties.h.

{ return s_IsExtensionGlyphShownProperty; }

Member Data Documentation

GlobalDependencyProperty s_IsExtensionGlyphShownProperty [static]

Definition at line 17 of file InkToolBarToolButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/InkToolBarToolButton.properties.h
  • Generated/InkToolBarToolButton.properties.cpp
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

InkToolBarTrace Class Reference

#include "InkToolBarTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 72 of file InkToolBarTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 78 of file InkToolBarTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "InkToolBarInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_INKTOOLBAR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"InkToolBar") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 111 of file InkToolBarTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "InkToolBarVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_INKTOOLBAR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"InkToolBar") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 75 of file InkToolBarTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 76 of file InkToolBarTrace.h.

The documentation for this class was generated from the following file:
  • InkToolBar/InkToolBarTrace.h
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InspectingDataSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

InspectingDataSource Class Reference

#include "InspectingDataSource.h"

List of all members.

Public Member Functions

winrt::IInspectable | GetAtCore (int index) override
int32_t | GetSizeCore () override
bool | HasKeyIndexMappingCore () override
int | IndexFromKeyCore (winrt::hstring const &id) override
int | IndexOfCore (winrt::IInspectable const &value)
winrt::hstring | KeyFromIndexCore (int index) override

Private Member Functions

void | ListenToCollectionChanges ()
void | OnBindableVectorChanged (const winrt::IBindableObservableVector &sender, const winrt::IInspectable &e)
void | OnCollectionChanged (const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &e)
void | OnVectorChanged (const winrt::Collections::IObservableVector< winrt::IInspectable > &sender, const winrt::Collections::IVectorChangedEventArgs &e)
void | UnListenToCollectionChanges ()
winrt::Collections::IVector
< winrt::IInspectable > 		WrapIterable (const winrt::Collections::IIterable< winrt::IInspectable > &iterable)

Detailed Description

Definition at line 8 of file InspectingDataSource.h.

Member Function Documentation

winrt::IInspectable GetAtCore ( int index ) [override]

Definition at line 67 of file InspectingDataSource.cpp.

{
    if (m_vectorView)
    {
        return m_vectorView.get().GetAt(static_cast<unsigned>(index));
    }
    else
    {
        return m_vector.get().GetAt(static_cast<unsigned>(index));
    }
}

int32_t GetSizeCore ( ) [override]

Definition at line 55 of file InspectingDataSource.cpp.

{
    if (m_vectorView)
    {
        return static_cast<int>(m_vectorView.get().Size());
    }
    else
    {
        return static_cast<int>(m_vector.get().Size());
    }
}

bool HasKeyIndexMappingCore ( ) [override]

Definition at line 79 of file InspectingDataSource.cpp.

{
    return m_uniqueIdMaping != nullptr;
}

int IndexFromKeyCore ( winrt::hstring const & id ) [override]

Definition at line 96 of file InspectingDataSource.cpp.

{
    if (m_uniqueIdMaping)
    {
        return m_uniqueIdMaping.IndexFromKey(id);
    }
    else
    {
        throw winrt::hresult_not_implemented();
    }
}

int IndexOfCore ( winrt::IInspectable const & value )

Definition at line 108 of file InspectingDataSource.cpp.

{
    int index = -1;
    if (m_vectorView)
    {
        auto v = static_cast<uint32_t>(-1);
        if (m_vectorView.get().IndexOf(value, v))
        {
            index = static_cast<int>(v);
        }
    }
    else if (m_vector)
    {
        auto v = static_cast<uint32_t>(-1);
        if (m_vector.get().IndexOf(value, v))
        {
            index = static_cast<int>(v);
        }
    }
    return index;
}

winrt::hstring KeyFromIndexCore ( int index ) [override]

Definition at line 84 of file InspectingDataSource.cpp.

{
    if (m_uniqueIdMaping)
    {
        return m_uniqueIdMaping.KeyFromIndex(index);
    }
    else
    {
        throw winrt::hresult_not_implemented();
    }
}

void ListenToCollectionChanges ( ) [private]

Definition at line 162 of file InspectingDataSource.cpp.

{
    if (!m_vector)
    {
        MUX_ASSERT(m_vectorView);
    }
    else
    {
        MUX_ASSERT(m_vector);
    }
    const auto incc = [this]() {
        if (m_vectorView)
        {
            return m_vectorView.try_as<winrt::INotifyCollectionChanged>();
        }
        else
        {
            return m_vector.try_as<winrt::INotifyCollectionChanged>();
        }
    }();

    if(incc)
    {
        m_eventToken = incc.CollectionChanged({ this, &InspectingDataSource::OnCollectionChanged });
        m_notifyCollectionChanged.set(incc);
    }
    else if (const auto bindableObservableVector = m_vector.try_as<winrt::IBindableObservableVector>())
    {
        m_eventToken = bindableObservableVector.VectorChanged({ this, &InspectingDataSource::OnBindableVectorChanged });
        m_bindableObservableVector.set(bindableObservableVector);

    }
    else if(const auto observableVector = m_vector.try_as<winrt::IObservableVector<winrt::IInspectable>>()){
        m_eventToken = observableVector.VectorChanged({ this, &InspectingDataSource::OnVectorChanged });
        m_observableVector.set(observableVector);
    }
}

void OnBindableVectorChanged | ( | const winrt::IBindableObservableVector & | sender,
 |  | const winrt::IInspectable & | e |
 | ) |  |  | [private]

Definition at line 207 of file InspectingDataSource.cpp.

{
    OnVectorChanged(
        reinterpret_cast<const winrt::IObservableVector<winrt::IInspectable>&>(sender),
        reinterpret_cast<const winrt::Collections::IVectorChangedEventArgs&>(e));
}

void OnCollectionChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::NotifyCollectionChangedEventArgs & | e |
 | ) |  |  | [private]

Definition at line 200 of file InspectingDataSource.cpp.

{
    OnItemsSourceChanged(e);
}

void OnVectorChanged | ( | const winrt::Collections::IObservableVector< winrt::IInspectable > & | sender,
 |  | const winrt::Collections::IVectorChangedEventArgs & | e |
 | ) |  |  | [private]

Definition at line 216 of file InspectingDataSource.cpp.

{
    // We need to build up NotifyCollectionChangedEventArgs here to raise the event.
    // There is opportunity to make this faster by caching the args if it does
    // show up as a perf issue.
    // Also note that we do not access the data - we just add nullptr. We just
    // need the count.

    winrt::NotifyCollectionChangedAction action{};
    int oldStartingIndex = -1;
    int newStartingIndex = -1;

    auto oldItems = winrt::make<Vector<winrt::IInspectable, MakeVectorParam<VectorFlag::Bindable>()>>();
    auto newItems = winrt::make<Vector<winrt::IInspectable, MakeVectorParam<VectorFlag::Bindable>()>>();

    switch (e.CollectionChange())
    {
    case winrt::Collections::CollectionChange::ItemInserted:
        action = winrt::NotifyCollectionChangedAction::Add;
        newStartingIndex = static_cast<int>(e.Index());
        newItems.Append(nullptr);
        break;
    case winrt::Collections::CollectionChange::ItemRemoved:
        action = winrt::NotifyCollectionChangedAction::Remove;
        oldStartingIndex = static_cast<int>(e.Index());
        oldItems.Append(nullptr);
        break;
    case winrt::Collections::CollectionChange::ItemChanged:
        action = winrt::NotifyCollectionChangedAction::Replace;
        oldStartingIndex = static_cast<int>(e.Index());
        newStartingIndex = oldStartingIndex;
        newItems.Append(nullptr);
        oldItems.Append(nullptr);
        break;
    case winrt::Collections::CollectionChange::Reset:
        action = winrt::NotifyCollectionChangedAction::Reset;
        break;
    default:
        MUX_ASSERT(false);
        break;
    }

    OnItemsSourceChanged(
        winrt::NotifyCollectionChangedEventArgs(
            action,
            newItems,
            oldItems,
            newStartingIndex,
            oldStartingIndex));
}

void UnListenToCollectionChanges ( ) [private]

Definition at line 146 of file InspectingDataSource.cpp.

{
    if (auto notifyCollection = m_notifyCollectionChanged.safe_get())
    {
        notifyCollection.CollectionChanged(m_eventToken);
    }
    else if (auto bindableObservableCollection = m_bindableObservableVector.safe_get())
    {
        bindableObservableCollection.VectorChanged(m_eventToken);
    }
    else if (auto observableCollection = m_observableVector.safe_get())
    {
        observableCollection.VectorChanged(m_eventToken);
    }
}

winrt::Collections::IVector<winrt::IInspectable> WrapIterable ( const winrt::Collections::IIterable< winrt::IInspectable > & iterable ) [private]
The documentation for this class was generated from the following files:
  • Repeater/InspectingDataSource.h
  • Repeater/InspectingDataSource.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InteractionTrackerAsyncOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

InteractionTrackerAsyncOperation Class Reference

#include "InteractionTrackerAsyncOperation.h"

List of all members.

Public Member Functions

InteractionTrackerAsyncOperation (InteractionTrackerAsyncOperationType operationType, InteractionTrackerAsyncOperationTrigger operationTrigger, bool isDelayed, std::shared_ptr< ViewChangeBase > viewChangeBase)
~InteractionTrackerAsyncOperation ()
InteractionTrackerAsyncOperationTrigger | GetOperationTrigger () const
InteractionTrackerAsyncOperationType | GetOperationType () const
int | GetRequestId () const
std::shared_ptr
< InteractionTrackerAsyncOperation > 		GetRequiredOperation () const
int | GetTicksCountdown () const
std::shared_ptr< ViewChangeBase > | GetViewChangeBase () const
int32_t | GetViewChangeCorrelationId () const
bool | IsAnimated () const
bool | IsCanceled () const
bool | IsCompleted () const
bool | IsDelayed () const
bool | IsHorizontalScrollControllerRequest () const
bool | IsQueued () const
bool | IsUnqueueing () const
bool | IsVerticalScrollControllerRequest () const
void | SetIsCanceled (bool isCanceled)
void | SetIsCompleted (bool isCompleted)
void | SetIsDelayed (bool isDelayed)
void | SetIsScrollControllerRequest (bool isFromHorizontalScrollController)
void | SetMaxTicksCountdown ()
void | SetRequestId (int requestId)
void | SetRequiredOperation (std::shared_ptr< InteractionTrackerAsyncOperation > requiredOperation)
void | SetTicksCountdown (int ticksCountdown)
void | SetViewChangeCorrelationId (int32_t viewChangeCorrelationId)
bool | TickNonAnimatedOperation ()
bool | TickQueuedOperation ()

Private Attributes

std::shared_ptr< ViewChangeBase > | m_viewChangeBase

Detailed Description

Definition at line 41 of file InteractionTrackerAsyncOperation.h.

Constructor & Destructor Documentation

InteractionTrackerAsyncOperation | ( | InteractionTrackerAsyncOperationType | operationType,
 |  | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | bool | isDelayed,
 |  | std::shared_ptr< ViewChangeBase > | viewChangeBase
 | ) |  |

Definition at line 10 of file InteractionTrackerAsyncOperation.cpp.

    : m_operationType(operationType)
    , m_operationTrigger(operationTrigger)
    , m_isDelayed(isDelayed)
    , m_viewChangeBase(viewChangeBase)
{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, L"%s[0x%p](operationType: %s, operationTrigger: %s, isDelayed: %d, viewChange: 0x%p)\n",
        METH_NAME, this, TypeLogging::InteractionTrackerAsyncOperationTypeToString(operationType).c_str(),
        TypeLogging::InteractionTrackerAsyncOperationTriggerToString(operationTrigger).c_str(), isDelayed, viewChangeBase);

    if (!IsAnimated())
    {
        m_postProcessingTicksCountdown = c_maxNonAnimatedOperationTicks;
    }
}

~InteractionTrackerAsyncOperation ( )

Definition at line 30 of file InteractionTrackerAsyncOperation.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

InteractionTrackerAsyncOperationTrigger GetOperationTrigger ( ) const [inline]

Definition at line 153 of file InteractionTrackerAsyncOperation.h.

    {
        return m_operationTrigger;
    }

InteractionTrackerAsyncOperationType GetOperationType ( ) const [inline]

Definition at line 205 of file InteractionTrackerAsyncOperation.h.

    {
        return m_operationType;
    }

int GetRequestId ( ) const [inline]

Definition at line 210 of file InteractionTrackerAsyncOperation.h.

    {
        return m_requestId;
    }

std::shared_ptr<InteractionTrackerAsyncOperation> GetRequiredOperation ( ) const [inline]

Definition at line 227 of file InteractionTrackerAsyncOperation.h.

    {
        return m_requiredOperation;
    }

int GetTicksCountdown ( ) const [inline]

Definition at line 124 of file InteractionTrackerAsyncOperation.h.

    {
        return m_preProcessingTicksCountdown;
    }

std::shared_ptr<ViewChangeBase> GetViewChangeBase ( ) const [inline]

Definition at line 222 of file InteractionTrackerAsyncOperation.h.

    {
        return m_viewChangeBase;
    }

int32_t GetViewChangeCorrelationId ( ) const [inline]

Definition at line 51 of file InteractionTrackerAsyncOperation.h.

    {
        return m_viewChangeCorrelationId;
    }

bool IsAnimated ( ) const [inline]

Definition at line 66 of file InteractionTrackerAsyncOperation.h.

    {
        switch (m_operationType)
        {
            case InteractionTrackerAsyncOperationType::TryUpdatePosition:
            case InteractionTrackerAsyncOperationType::TryUpdatePositionBy:
            case InteractionTrackerAsyncOperationType::TryUpdateScale:
                return false;
        }
        return true;
    }

bool IsCanceled ( ) const [inline]

Definition at line 78 of file InteractionTrackerAsyncOperation.h.

    {
        return m_isCanceled;
    }

bool IsCompleted ( ) const [inline]

Definition at line 112 of file InteractionTrackerAsyncOperation.h.

    {
        return m_isCompleted;
    }

bool IsDelayed ( ) const [inline]

Definition at line 90 of file InteractionTrackerAsyncOperation.h.

    {
        return m_isDelayed;
    }

bool IsHorizontalScrollControllerRequest ( ) const [inline]

Definition at line 159 of file InteractionTrackerAsyncOperation.h.

    {
        return static_cast<int>(m_operationTrigger) & static_cast<int>(InteractionTrackerAsyncOperationTrigger::HorizontalScrollControllerRequest);
    }

bool IsQueued ( ) const [inline]

Definition at line 102 of file InteractionTrackerAsyncOperation.h.

    {
        return m_preProcessingTicksCountdown > 0;
    }

bool IsUnqueueing ( ) const [inline]

Definition at line 107 of file InteractionTrackerAsyncOperation.h.

    {
        return m_preProcessingTicksCountdown > 0 && m_preProcessingTicksCountdown < m_queuedOperationTicks;
    }

bool IsVerticalScrollControllerRequest ( ) const [inline]

Definition at line 165 of file InteractionTrackerAsyncOperation.h.

    {
        return static_cast<int>(m_operationTrigger) & static_cast<int>(InteractionTrackerAsyncOperationTrigger::VerticalScrollControllerRequest);
    }

void SetIsCanceled ( bool isCanceled ) [inline]

Definition at line 83 of file InteractionTrackerAsyncOperation.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isCanceled);

        m_isCanceled = isCanceled;
    }

void SetIsCompleted ( bool isCompleted ) [inline]

Definition at line 117 of file InteractionTrackerAsyncOperation.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isCompleted);

        m_isCompleted = isCompleted;
    }

void SetIsDelayed ( bool isDelayed ) [inline]

Definition at line 95 of file InteractionTrackerAsyncOperation.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isDelayed);

        m_isDelayed = isDelayed;
    }

void SetIsScrollControllerRequest ( bool isFromHorizontalScrollController ) [inline]

Definition at line 170 of file InteractionTrackerAsyncOperation.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isFromHorizontalScrollController);

        if (isFromHorizontalScrollController)
            m_operationTrigger = static_cast<InteractionTrackerAsyncOperationTrigger>(static_cast<int>(m_operationTrigger) |
                                 static_cast<int>(InteractionTrackerAsyncOperationTrigger::HorizontalScrollControllerRequest));
        else
            m_operationTrigger = static_cast<InteractionTrackerAsyncOperationTrigger>(static_cast<int>(m_operationTrigger) |
                                 static_cast<int>(InteractionTrackerAsyncOperationTrigger::VerticalScrollControllerRequest));
    }

void SetMaxTicksCountdown ( ) [inline]

Definition at line 140 of file InteractionTrackerAsyncOperation.h.

    {
        const int ticksCountdownIncrement = std::max(0, c_queuedOperationTicks - m_preProcessingTicksCountdown);

        if (ticksCountdownIncrement > 0)
        {
            SCROLLPRESENTER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, ticksCountdownIncrement);

            m_preProcessingTicksCountdown += ticksCountdownIncrement;
            m_queuedOperationTicks += ticksCountdownIncrement;
        }
    }

void SetRequestId ( int requestId ) [inline]

Definition at line 215 of file InteractionTrackerAsyncOperation.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, requestId);

        m_requestId = requestId;
    }

void SetRequiredOperation ( std::shared_ptr< InteractionTrackerAsyncOperation > requiredOperation ) [inline]

Definition at line 232 of file InteractionTrackerAsyncOperation.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, requiredOperation);

        m_requiredOperation = requiredOperation;
    }

void SetTicksCountdown ( int ticksCountdown ) [inline]

Definition at line 129 of file InteractionTrackerAsyncOperation.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, ticksCountdown);

        MUX_ASSERT(ticksCountdown > 0);
        m_preProcessingTicksCountdown = m_queuedOperationTicks = ticksCountdown;
    }

void SetViewChangeCorrelationId ( int32_t viewChangeCorrelationId ) [inline]

Definition at line 56 of file InteractionTrackerAsyncOperation.h.

    {
        if (m_viewChangeCorrelationId != viewChangeCorrelationId)
        {
            SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, viewChangeCorrelationId);

            m_viewChangeCorrelationId = viewChangeCorrelationId;
        }
    }

bool TickNonAnimatedOperation ( ) [inline]

Definition at line 183 of file InteractionTrackerAsyncOperation.h.

    {
        MUX_ASSERT(!IsAnimated());
        MUX_ASSERT(m_postProcessingTicksCountdown > 0);

        m_postProcessingTicksCountdown--;

        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, m_postProcessingTicksCountdown);
        return m_postProcessingTicksCountdown == 0;
    }

bool TickQueuedOperation ( ) [inline]

Definition at line 195 of file InteractionTrackerAsyncOperation.h.

    {
        MUX_ASSERT(m_preProcessingTicksCountdown > 0);

        m_preProcessingTicksCountdown--;

        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, m_preProcessingTicksCountdown);
        return m_preProcessingTicksCountdown == 0;
    }

Member Data Documentation

std::shared_ptr<ViewChangeBase> m_viewChangeBase [private]

Definition at line 241 of file InteractionTrackerAsyncOperation.h.

The documentation for this class was generated from the following files:
  • ScrollPresenter/InteractionTrackerAsyncOperation.h
  • ScrollPresenter/InteractionTrackerAsyncOperation.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InteractionTrackerOwner Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

InteractionTrackerOwner Class Reference

#include "InteractionTrackerOwner.h"

List of all members.

Public Member Functions

InteractionTrackerOwner (const winrt::ScrollPresenter &scrollPresenter)
~InteractionTrackerOwner ()
void | CustomAnimationStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs &args)
void | IdleStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerIdleStateEnteredArgs &args)
void | InertiaStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInertiaStateEnteredArgs &args)
void | InteractingStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInteractingStateEnteredArgs &args)
void | RequestIgnored (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerRequestIgnoredArgs &args)
void | ValuesChanged (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerValuesChangedArgs &args)

Detailed Description

Definition at line 10 of file InteractionTrackerOwner.h.

Constructor & Destructor Documentation

InteractionTrackerOwner ( const winrt::ScrollPresenter & scrollPresenter )

Definition at line 9 of file InteractionTrackerOwner.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(scrollPresenter, TRACE_MSG_METH_PTR, METH_NAME, this, scrollPresenter);

    m_owner = scrollPresenter;
}

~InteractionTrackerOwner ( )

Definition at line 16 of file InteractionTrackerOwner.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_owner = nullptr;
}

Member Function Documentation

void CustomAnimationStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerCustomAnimationStateEnteredArgs & | args
 | ) |  |

Definition at line 114 of file InteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
        if (scrollPresenter)
        {
            scrollPresenter->CustomAnimationStateEntered(args);
        }
    }
}

void IdleStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerIdleStateEnteredArgs & | args
 | ) |  |

Definition at line 96 of file InteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
        if (scrollPresenter)
        {
            scrollPresenter->IdleStateEntered(args);
        }
    }
}

void InertiaStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerInertiaStateEnteredArgs & | args
 | ) |  |

Definition at line 78 of file InteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
        if (scrollPresenter)
        {
            scrollPresenter->InertiaStateEntered(args);
        }
    }
}

void InteractingStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerInteractingStateEnteredArgs & | args
 | ) |  |

Definition at line 60 of file InteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
        if (scrollPresenter)
        {
            scrollPresenter->InteractingStateEntered(args);
        }
    }
}

void RequestIgnored | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerRequestIgnoredArgs & | args
 | ) |  |

Definition at line 42 of file InteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
        if (scrollPresenter)
        {
            scrollPresenter->RequestIgnored(args);
        }
    }
}

void ValuesChanged | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerValuesChangedArgs & | args
 | ) |  |

Definition at line 24 of file InteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
        if (scrollPresenter)
        {
            scrollPresenter->ValuesChanged(args);
        }
    }
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/InteractionTrackerOwner.h
  • ScrollPresenter/InteractionTrackerOwner.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: is_flags_enum< T > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Attributes

is_flags_enum< T > Struct Template Reference

#include "Flags_Enum.h"

List of all members.

Static Public Attributes

static constexpr bool value = false

Detailed Description

template<typename T>
struct is_flags_enum< T >

Definition at line 11 of file Flags_Enum.h.

Member Data Documentation

constexpr bool value = false [static]

Definition at line 13 of file Flags_Enum.h.

The documentation for this struct was generated from the following file:
  • Common/Flags_Enum.h
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: is_flags_enum< PointerOverStatus > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Attributes

is_flags_enum< PointerOverStatus > Struct Template Reference

#include "PointerInfo.h"

List of all members.

Static Public Attributes

static constexpr bool value = true

Detailed Description

template<>
struct is_flags_enum< PointerOverStatus >

Definition at line 25 of file PointerInfo.h.

Member Data Documentation

constexpr bool value = true [static]

Definition at line 27 of file PointerInfo.h.

The documentation for this struct was generated from the following file:
  • Common/PointerInfo.h
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: is_flags_enum< PointerPressedStatus > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Attributes

is_flags_enum< PointerPressedStatus > Struct Template Reference

#include "PointerInfo.h"

List of all members.

Static Public Attributes

static constexpr bool value = true

Detailed Description

template<>
struct is_flags_enum< PointerPressedStatus >

Definition at line 31 of file PointerInfo.h.

Member Data Documentation

constexpr bool value = true [static]

Definition at line 33 of file PointerInfo.h.

The documentation for this struct was generated from the following file:
  • Common/PointerInfo.h
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransition Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ItemCollectionTransition Class Reference

#include "ItemCollectionTransition.h"

Inherits ReferenceTracker< ItemCollectionTransition, winrt::implementation::ItemCollectionTransitionT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

ItemCollectionTransition (winrt::ItemCollectionTransitionProvider const &owningProvider, winrt::UIElement const &element, winrt::ItemCollectionTransitionOperation const &operation, winrt::ItemCollectionTransitionTriggers const &triggers)
ItemCollectionTransition (winrt::ItemCollectionTransitionProvider const &owningProvider, winrt::UIElement const &element, winrt::ItemCollectionTransitionTriggers const &triggers, winrt::Rect const &oldBounds, winrt::Rect const &newBounds)
winrt::UIElement | Element ()
bool | HasStarted ()
winrt::Rect | NewBounds ()
winrt::Rect | OldBounds ()
winrt::ItemCollectionTransitionOperation | Operation ()
winrt::ItemCollectionTransitionProvider | OwningProvider ()
winrt::ItemCollectionTransitionProgress | Start ()
winrt::ItemCollectionTransitionTriggers | Triggers ()

Private Member Functions

ItemCollectionTransition (winrt::ItemCollectionTransitionProvider const &owningProvider, winrt::UIElement const &element, winrt::ItemCollectionTransitionOperation const &operation, winrt::ItemCollectionTransitionTriggers const &triggers, winrt::Rect const &oldBounds, winrt::Rect const &newBounds)

Detailed Description

Definition at line 11 of file ItemCollectionTransition.h.

Constructor & Destructor Documentation

ItemCollectionTransition | ( | winrt::ItemCollectionTransitionProvider const & | owningProvider,
 |  | winrt::UIElement const & | element,
 |  | winrt::ItemCollectionTransitionOperation const & | operation,
 |  | winrt::ItemCollectionTransitionTriggers const & | triggers
 | ) |  |

Definition at line 9 of file ItemCollectionTransition.cpp.

    : ItemCollectionTransition(
        owningProvider,
        element,
        operation,
        triggers,
        winrt::Rect{},

ItemCollectionTransition | ( | winrt::ItemCollectionTransitionProvider const & | owningProvider,
 |  | winrt::UIElement const & | element,
 |  | winrt::ItemCollectionTransitionTriggers const & | triggers,
 |  | winrt::Rect const & | oldBounds,
 |  | winrt::Rect const & | newBounds
 | ) |  |
ItemCollectionTransition | ( | winrt::ItemCollectionTransitionProvider const & | owningProvider,
 |  | winrt::UIElement const & | element,
 |  | winrt::ItemCollectionTransitionOperation const & | operation,
 |  | winrt::ItemCollectionTransitionTriggers const & | triggers,
 |  | winrt::Rect const & | oldBounds,
 |  | winrt::Rect const & | newBounds |
 | ) |  |  | [private]

Member Function Documentation

winrt::UIElement Element ( ) [inline]

Definition at line 29 of file ItemCollectionTransition.h.

{ return m_element.safe_get(); }

bool HasStarted ( ) [inline]

Definition at line 34 of file ItemCollectionTransition.h.

{ return static_cast<bool>(m_progress); }

winrt::Rect NewBounds ( ) [inline]

Definition at line 33 of file ItemCollectionTransition.h.

{ return m_newBounds; }

winrt::Rect OldBounds ( ) [inline]

Definition at line 32 of file ItemCollectionTransition.h.

{ return m_oldBounds; }

winrt::ItemCollectionTransitionOperation Operation ( ) [inline]

Definition at line 30 of file ItemCollectionTransition.h.

{ return m_operation; }

winrt::ItemCollectionTransitionProvider OwningProvider ( ) [inline]

Definition at line 28 of file ItemCollectionTransition.h.

{ return m_owningProvider.get(); }

winrt::ItemCollectionTransitionProgress Start ( )

Definition at line 57 of file ItemCollectionTransition.cpp.

{
    if (!m_progress)
    {
        m_progress.set(winrt::make<ItemCollectionTransitionProgress>(*this));
    }

    return m_progress.safe_get();
}

winrt::ItemCollectionTransitionTriggers Triggers ( ) [inline]

Definition at line 31 of file ItemCollectionTransition.h.

{ return m_triggers; }

The documentation for this class was generated from the following files:
  • Repeater/ItemCollectionTransition.h
  • Repeater/ItemCollectionTransition.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemCollectionTransitionCompletedEventArgs Class Reference

#include "ItemCollectionTransitionCompletedEventArgs.h"

Inherits ReferenceTracker< ItemCollectionTransitionCompletedEventArgs, winrt::implementation::ItemCollectionTransitionCompletedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

ItemCollectionTransitionCompletedEventArgs (winrt::ItemCollectionTransition const &transition)
winrt::UIElement | Element ()
winrt::ItemCollectionTransition | Transition ()

Detailed Description

Definition at line 11 of file ItemCollectionTransitionCompletedEventArgs.h.

Constructor & Destructor Documentation

ItemCollectionTransitionCompletedEventArgs ( winrt::ItemCollectionTransition const & transition )

Definition at line 9 of file ItemCollectionTransitionCompletedEventArgs.cpp.

{
    m_transition.set(transition);
}

Member Function Documentation

winrt::UIElement Element ( )

Definition at line 14 of file ItemCollectionTransitionCompletedEventArgs.cpp.

{
    return m_transition ? winrt::get_self<ItemCollectionTransition>(m_transition.safe_get())->Element() : nullptr;
}

winrt::ItemCollectionTransition Transition ( ) [inline]

Definition at line 17 of file ItemCollectionTransitionCompletedEventArgs.h.

{ return m_transition.safe_get(); }

The documentation for this class was generated from the following files:
  • Repeater/ItemCollectionTransitionCompletedEventArgs.h
  • Repeater/ItemCollectionTransitionCompletedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProgress Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemCollectionTransitionProgress Class Reference

#include "ItemCollectionTransitionProgress.h"

Inherits ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

ItemCollectionTransitionProgress (winrt::ItemCollectionTransition transition)
void | Complete ()
winrt::UIElement | Element ()
winrt::ItemCollectionTransition | Transition ()

Detailed Description

Definition at line 11 of file ItemCollectionTransitionProgress.h.

Constructor & Destructor Documentation

ItemCollectionTransitionProgress ( winrt::ItemCollectionTransition transition )

Definition at line 10 of file ItemCollectionTransitionProgress.cpp.

{
    m_transition = transition;
}

Member Function Documentation

void Complete ( )

Definition at line 27 of file ItemCollectionTransitionProgress.cpp.

{
    if (auto transition = m_transition.get())
    {
        auto transitionImpl = winrt::get_self<ItemCollectionTransition>(transition);
        auto transitionProvider = winrt::get_self<ItemCollectionTransitionProvider>(transitionImpl->OwningProvider());
        transitionProvider->NotifyTransitionCompleted(transition);
    }
}

winrt::UIElement Element ( )

Definition at line 15 of file ItemCollectionTransitionProgress.cpp.

{
    if (auto transition = m_transition.get())
    {
        return winrt::get_self<ItemCollectionTransition>(transition)->Element();
    }
    else
    {
        return nullptr;
    }
}

winrt::ItemCollectionTransition Transition ( ) [inline]

Definition at line 17 of file ItemCollectionTransitionProgress.h.

{ return m_transition.get(); }

The documentation for this class was generated from the following files:
  • Repeater/ItemCollectionTransitionProgress.h
  • Repeater/ItemCollectionTransitionProgress.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProvider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

ItemCollectionTransitionProvider Class Reference

#include "ItemCollectionTransitionProvider.h"

Inherits ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable >, and ItemCollectionTransitionProviderProperties.

Inherited by ItemCollectionTransitionProviderDerived, RadialItemCollectionTransitionProvider, and DefaultItemCollectionTransitionProvider.

List of all members.

Public Member Functions

~ItemCollectionTransitionProvider ()
void | NotifyTransitionCompleted (winrt::ItemCollectionTransition const &transition)
void | QueueTransition (winrt::ItemCollectionTransition const &transition)
bool | ShouldAnimate (winrt::ItemCollectionTransition const &transition)
virtual bool | ShouldAnimateCore (winrt::ItemCollectionTransition const &transition)
virtual void | StartTransitions (winrt::IVector< winrt::ItemCollectionTransition > const &transitions)

Private Member Functions

void | CleanTransitionsBatch ()
void | OnKeepAliveTimerTick (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnRendering (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | StartNewKeepAliveTimer ()

Private Attributes

std::map
< winrt::DispatcherTimer,
uint32_t > 		m_keepAliveTimersMap
std::map< uint32_t,
winrt::IVector
< winrt::ItemCollectionTransition > > 		m_transitionsMap
std::map< uint32_t,
winrt::IVector
< winrt::ItemCollectionTransition > > 		m_transitionsWithAnimationsMap

Detailed Description

Definition at line 14 of file ItemCollectionTransitionProvider.h.

Constructor & Destructor Documentation

~ItemCollectionTransitionProvider ( )

Definition at line 13 of file ItemCollectionTransitionProvider.cpp.

{
    for (auto const& keepAliveTimerBatchPair : m_keepAliveTimersMap)
    {
        if (auto const& keepAliveTimer = keepAliveTimerBatchPair.first)
        {
            keepAliveTimer.Stop();
        }
    }
}

Member Function Documentation

void CleanTransitionsBatch ( ) [private]

Definition at line 96 of file ItemCollectionTransitionProvider.cpp.

{
    // Called when none of a batch's transitions required a timer to keep them alive.
    // No completion notification is expected and all transitions can be released.
    m_transitionsWithAnimationsMap.erase(m_transitionsBatch);
    m_transitionsMap.erase(m_transitionsBatch);
}

void NotifyTransitionCompleted ( winrt::ItemCollectionTransition const & transition )

Definition at line 91 of file ItemCollectionTransitionProvider.cpp.

{
    m_transitionCompletedEventSource(*this, winrt::make<ItemCollectionTransitionCompletedEventArgs>(transition));
}

void OnKeepAliveTimerTick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 104 of file ItemCollectionTransitionProvider.cpp.

{
    // By the time this timer expires, all transitions associated with it are considered completed and they no longer need to be kept alive for
    // ItemCollectionTransitionProgress::Complete() to successfully trigger a ItemCollectionTransitionProvider::NotifyTransitionCompleted call.
    const auto keepAliveTimer = sender.try_as<winrt::DispatcherTimer>();

    if (keepAliveTimer)
    {
        // The timer is stopped, all its associated transitions are released and so is the timer itself.
        keepAliveTimer.Stop();

        const auto keepAliveTimersIterator = m_keepAliveTimersMap.find(keepAliveTimer);

        if (keepAliveTimersIterator == m_keepAliveTimersMap.end())
        {
            return;
        }

        const auto transitionsBatch = keepAliveTimersIterator->second;

        m_transitionsWithAnimationsMap.erase(transitionsBatch);
        m_transitionsMap.erase(transitionsBatch);

        m_keepAliveTimersMap.erase(keepAliveTimersIterator);
    }
}

void OnRendering | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 131 of file ItemCollectionTransitionProvider.cpp.

{
    m_rendering.revoke();

    bool keepAliveTimerRequired = false;

    auto scopeGuard = gsl::finally([this, &keepAliveTimerRequired]()
    {
        if (keepAliveTimerRequired)
        {
            // At least one transition in the batch requires a new 'keep alive' timer.
            StartNewKeepAliveTimer();
        }
        else
        {
            // None of the transitions in the batch requires a 'keep alive' timer. Simply discard them all.
            CleanTransitionsBatch();
        }
    });

    const auto transitionsWithAnimations = m_transitionsWithAnimationsMap[m_transitionsBatch];

    if (transitionsWithAnimations)
    {
        overridable().StartTransitions(transitionsWithAnimations);
    }

    // We'll automatically raise TransitionCompleted on all of the transitions that were not actually animated
    // in order to guarantee that every transition queued receives a corresponding TransitionCompleted event.
    const auto transitions = m_transitionsMap[m_transitionsBatch];

    if (transitions)
    {
        for (auto const& transition : transitions)
        {
            if (transition.HasStarted())
            {
                keepAliveTimerRequired = true;
            }
            else
            {
                NotifyTransitionCompleted(transition);
            }
        }
    }
}

void QueueTransition ( winrt::ItemCollectionTransition const & transition )

Definition at line 24 of file ItemCollectionTransitionProvider.cpp.

{
    // When usesNewTransitionsBatch remains 'false', the provided transition is added to the current batch
    // identified by the current m_transitionsBatch value.
    bool usesNewTransitionsBatch = false;

    if (!m_rendering)
    {
        // This marks the beginning of a new batch of transitions.
        usesNewTransitionsBatch = true;
        // The batch gets a new id.
        m_transitionsBatch++;
        m_rendering = winrt::CompositionTarget::Rendering(winrt::auto_revoke, { this, &ItemCollectionTransitionProvider::OnRendering });
    }

    // We'll animate if animations are enabled and the transition provider has indicated we should animate this transition.
    if (SharedHelpers::IsAnimationsEnabled() && ShouldAnimate(transition))
    {
        if (usesNewTransitionsBatch)
        {
            // Allocating a new array of ItemCollectionTransition with animations for this new batch.
            const auto batchTransitionsPair = std::make_pair(m_transitionsBatch, winrt::single_threaded_vector<winrt::ItemCollectionTransition>());

            m_transitionsWithAnimationsMap.insert(batchTransitionsPair);
        }

        const auto transitionsWithAnimations = m_transitionsWithAnimationsMap[m_transitionsBatch];

        transitionsWithAnimations.Append(transition);
    }

    // To ensure proper VirtualizationInfo ordering, we still need to raise TransitionCompleted in a
    // CompositionTarget.Rendering handler, even if we aren't going to animate anything for this transition.
    if (usesNewTransitionsBatch)
    {
        // Allocating a new array of ItemCollectionTransition for this new batch.
        const auto batchTransitionsPair = std::make_pair(m_transitionsBatch, winrt::single_threaded_vector<winrt::ItemCollectionTransition>());

        m_transitionsMap.insert(batchTransitionsPair);
    }

    const auto transitions = m_transitionsMap[m_transitionsBatch];

    transitions.Append(transition);
}

bool ShouldAnimate ( winrt::ItemCollectionTransition const & transition )

Definition at line 70 of file ItemCollectionTransitionProvider.cpp.

{
    return overridable().ShouldAnimateCore(transition);
}

bool ShouldAnimateCore ( winrt::ItemCollectionTransition const & transition ) [virtual]

Definition at line 84 of file ItemCollectionTransitionProvider.cpp.

{
    throw winrt::hresult_not_implemented();
}

void StartNewKeepAliveTimer ( ) [private]

Definition at line 178 of file ItemCollectionTransitionProvider.cpp.

{
    // This timer delays the release of the batch's transitions so that ItemCollectionTransitionProgress::Complete()
    // which uses transition weak references is able to trigger an ItemCollectionTransitionProvider::NotifyTransitionCompleted
    // call for completion. This is important for TransitionManager::OnTransitionProviderTransitionCompleted to be able to
    // update the ItemsRepeater's items ownership.
    MUX_ASSERT(m_transitionsMap[m_transitionsBatch].Size() > 0);

    auto timerDuration = 5s;
    const auto keepAliveTimer = winrt::DispatcherTimer();

    keepAliveTimer.Interval(winrt::TimeSpan::duration(timerDuration));
    keepAliveTimer.Tick({ this, &ItemCollectionTransitionProvider::OnKeepAliveTimerTick });
    keepAliveTimer.Start();

    const auto keepAliveTimerBatchPair = std::make_pair(keepAliveTimer, m_transitionsBatch);

    m_keepAliveTimersMap.insert(keepAliveTimerBatchPair);
}

void StartTransitions ( winrt::IVector< winrt::ItemCollectionTransition > const & transitions ) [virtual]

Definition at line 79 of file ItemCollectionTransitionProvider.cpp.

{
    throw winrt::hresult_not_implemented();
}

Member Data Documentation

std::map<winrt::DispatcherTimer, uint32_t> m_keepAliveTimersMap [private]

Definition at line 43 of file ItemCollectionTransitionProvider.h.

std::map<uint32_t, winrt::IVector<winrt::ItemCollectionTransition> > m_transitionsMap [private]

Definition at line 45 of file ItemCollectionTransitionProvider.h.

std::map<uint32_t, winrt::IVector<winrt::ItemCollectionTransition> > m_transitionsWithAnimationsMap [private]

Definition at line 46 of file ItemCollectionTransitionProvider.h.

The documentation for this class was generated from the following files:
  • Repeater/ItemCollectionTransitionProvider.h
  • Repeater/ItemCollectionTransitionProvider.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProviderProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

ItemCollectionTransitionProviderProperties Class Reference

#include "ItemCollectionTransitionProvider.properties.h"

Inherited by ItemCollectionTransitionProvider.

List of all members.

Public Member Functions

ItemCollectionTransitionProviderProperties ()
void | TransitionCompleted (winrt::event_token const &token)
winrt::event_token | TransitionCompleted (winrt::TypedEventHandler< winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs > const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ItemCollectionTransitionProvider,
winrt::ItemCollectionTransitionCompletedEventArgs > > 		m_transitionCompletedEventSource

Detailed Description

Definition at line 7 of file ItemCollectionTransitionProvider.properties.h.

Constructor & Destructor Documentation

ItemCollectionTransitionProviderProperties ( )

Definition at line 17 of file ItemCollectionTransitionProvider.properties.cpp.

    : m_transitionCompletedEventSource{static_cast<ItemCollectionTransitionProvider*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::event_token TransitionCompleted ( winrt::TypedEventHandler< winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs > const & value )
void TransitionCompleted ( winrt::event_token const & token )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs> > m_transitionCompletedEventSource

Definition at line 17 of file ItemCollectionTransitionProvider.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ItemCollectionTransitionProvider.properties.h
  • Generated/ItemCollectionTransitionProvider.properties.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ItemContainer Class Reference

#include "ItemContainer.h"

Inherits ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT >, and ItemContainerProperties.

List of all members.

Public Member Functions

ItemContainer ()
~ItemContainer ()
winrt::ItemContainerUserInvokeMode | CanUserInvokeInternal () const
void | CanUserInvokeInternal (const winrt::ItemContainerUserInvokeMode &value)
winrt::ItemContainerUserSelectMode | CanUserSelectInternal () const
void | CanUserSelectInternal (const winrt::ItemContainerUserSelectMode &value)
winrt::ItemContainerMultiSelectMode | MultiSelectModeInternal () const
void | MultiSelectModeInternal (const winrt::ItemContainerMultiSelectMode &value)
virtual void | OnApplyTemplate ()
virtual winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnDoubleTapped (winrt::DoubleTappedRoutedEventArgs const &args)
void | OnKeyDown (winrt::KeyRoutedEventArgs const &args)
void | OnPointerCanceled (winrt::PointerRoutedEventArgs const &args)
void | OnPointerCaptureLost (winrt::PointerRoutedEventArgs const &args)
void | OnPointerEntered (winrt::PointerRoutedEventArgs const &args)
void | OnPointerExited (winrt::PointerRoutedEventArgs const &args)
void | OnPointerMoved (winrt::PointerRoutedEventArgs const &args)
void | OnPointerPressed (winrt::PointerRoutedEventArgs const &args)
void | OnPointerReleased (winrt::PointerRoutedEventArgs const &args)
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnTapped (winrt::TappedRoutedEventArgs const &args)
bool | RaiseItemInvoked (const winrt::ItemContainerInteractionTrigger &interactionTrigger, const winrt::IInspectable &originalSource)

Private Member Functions

bool | CanRaiseItemInvoked ()
void | GoToState (std::wstring_view const &stateName, bool useTransitions)
void | LoadSelectionCheckbox ()
void | OnCheckToggle (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnIsEnabledChanged (winrt::IInspectable const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
void | ProcessPointerCanceled (winrt::PointerRoutedEventArgs const &args)
void | ProcessPointerOver (winrt::PointerRoutedEventArgs const &args, bool isPointerOver)
void | UpdateCheckboxState ()
void | UpdateMousePointerOverInstance (bool isPointerOver)
void | UpdateMultiSelectState (bool useTransitions)
void | UpdateVisualState (bool useTransitions)

Detailed Description

Definition at line 11 of file ItemContainer.h.

Constructor & Destructor Documentation

ItemContainer ( )

Definition at line 23 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    __RP_Marker_ClassById(RuntimeProfiler::ProfId_ItemContainer);

    EnsureProperties();
    SetDefaultStyleKey(this);
}

~ItemContainer ( )

Definition at line 33 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (auto mousePointerOverInstance = s_mousePointerOverInstance.get())
    {
        if (mousePointerOverInstance.get() == this)
        {
            s_mousePointerOverInstance = nullptr;
        }
    }
}

Member Function Documentation

bool CanRaiseItemInvoked ( ) [private]

Definition at line 556 of file ItemContainer.cpp.

{
#ifdef MUX_PRERELEASE
    return static_cast<int>(CanUserInvoke() & winrt::ItemContainerUserInvokeMode::UserCanInvoke) ||
        static_cast<int>(CanUserSelect() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
#else
    return static_cast<int>(CanUserInvokeInternal() & winrt::ItemContainerUserInvokeMode::UserCanInvoke) ||
        static_cast<int>(CanUserSelectInternal() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
#endif
}

void CanUserInvokeInternal ( const winrt::ItemContainerUserInvokeMode & value ) [inline]

Definition at line 64 of file ItemContainer.h.

    {
        if (m_canUserInvokeInternal != value)
        {
            m_canUserInvokeInternal = value;
        }
    }

winrt::ItemContainerUserInvokeMode CanUserInvokeInternal ( ) const [inline]

Definition at line 46 of file ItemContainer.h.

    {
        return m_canUserInvokeInternal;
    }

winrt::ItemContainerUserSelectMode CanUserSelectInternal ( ) const [inline]

Definition at line 41 of file ItemContainer.h.

    {
        return m_canUserSelectInternal;
    }

void CanUserSelectInternal ( const winrt::ItemContainerUserSelectMode & value ) [inline]

Definition at line 56 of file ItemContainer.h.

    {
        if (m_canUserSelectInternal != value)
        {
            m_canUserSelectInternal = value;
        }
    }

void GoToState | ( | std::wstring_view const & | stateName,
 |  | bool | useTransitions |
 | ) |  |  | [private]

Definition at line 171 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, stateName.data(), useTransitions);

    winrt::VisualStateManager::GoToState(*this, stateName, useTransitions);
}

void LoadSelectionCheckbox ( ) [private]

Definition at line 582 of file ItemContainer.cpp.

{
    winrt::IControlProtected controlProtected{ *this };

    m_selectionCheckbox.set(GetTemplateChildT<winrt::CheckBox>(s_selectionCheckboxName, controlProtected));

    if (auto&& selectionCheckbox = m_selectionCheckbox.get())
    {
        m_checked_revoker = selectionCheckbox.Checked(winrt::auto_revoke, { this, &ItemContainer::OnCheckToggle });
        m_unchecked_revoker = selectionCheckbox.Unchecked(winrt::auto_revoke, { this, &ItemContainer::OnCheckToggle });
    }
}

winrt::ItemContainerMultiSelectMode MultiSelectModeInternal ( ) const [inline]

Definition at line 51 of file ItemContainer.h.

    {
        return m_multiSelectModeInternal;
    }

void MultiSelectModeInternal ( const winrt::ItemContainerMultiSelectMode & value ) [inline]

Definition at line 72 of file ItemContainer.h.

    {
        if (m_multiSelectModeInternal != value)
        {
            m_multiSelectModeInternal = value;

            // Same code as in ItemContainer::OnPropertyChanged, when MultiSelectMode changed.
            if (m_pointerInfo != nullptr)
            {
                UpdateVisualState(true);
                UpdateMultiSelectState(true);
            }
        }
    }

void OnApplyTemplate ( ) [virtual]

Definition at line 46 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    // Unload events from previous template when ItemContainer gets a new template.
    if (auto&& selectionCheckbox = m_selectionCheckbox.get())
    {
        m_checked_revoker.revoke();
        m_unchecked_revoker.revoke();
    }

    winrt::IControlProtected controlProtected{ *this };
    m_rootPanel.set(GetTemplateChildT<winrt::Panel>(s_containerRootName, controlProtected));

    // If the Child property is already set, add it to the tree. After this point, the
    // property changed event for Child property will add it to the tree.
    if (const auto& child = Child())
    {
        if (auto&& rootPanel = m_rootPanel.get())
        {
            rootPanel.Children().InsertAt(0, child);
        }
    }

    m_pointerInfo = std::make_shared<PointerInfo<ItemContainer>>();
    m_isEnabledChangedRevoker.revoke();
    m_isEnabledChangedRevoker = IsEnabledChanged(winrt::auto_revoke, { this,  &ItemContainer::OnIsEnabledChanged });

    __super::OnApplyTemplate();

    UpdateVisualState(true);
    UpdateMultiSelectState(true);
}

void OnCheckToggle | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 595 of file ItemContainer.cpp.

{
    UpdateCheckboxState();
}

winrt::AutomationPeer OnCreateAutomationPeer ( ) [virtual]

Definition at line 80 of file ItemContainer.cpp.

{
    return winrt::make<ItemContainerAutomationPeer>(*this);
}

void OnDoubleTapped ( winrt::DoubleTappedRoutedEventArgs const & args )

Definition at line 525 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    __super::OnDoubleTapped(args);

    if (CanRaiseItemInvoked() && !args.Handled())
    {
        args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::DoubleTap, args.OriginalSource()));
    }
}

void OnIsEnabledChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 85 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, IsEnabled());

    if (!IsEnabled())
    {
        ProcessPointerCanceled(nullptr);
    }
    else
    {
        UpdateVisualState(true);
    }
}

void OnKeyDown ( winrt::KeyRoutedEventArgs const & args )

Definition at line 537 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::KeyRoutedEventArgsToString(args).c_str());

    __super::OnKeyDown(args);

    if (!args.Handled() && CanRaiseItemInvoked())
    {
        if (args.Key() == winrt::VirtualKey::Enter)
        {
            args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::EnterKey, args.OriginalSource()));
        }
        else if (args.Key() == winrt::VirtualKey::Space)
        {
            args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::SpaceKey, args.OriginalSource()));
        }
    }
}

void OnPointerCanceled ( winrt::PointerRoutedEventArgs const & args )

Definition at line 495 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());

    __super::OnPointerCanceled(args);

    ProcessPointerCanceled(args);
}

void OnPointerCaptureLost ( winrt::PointerRoutedEventArgs const & args )

Definition at line 504 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());

    __super::OnPointerCaptureLost(args);

    ProcessPointerCanceled(args);
}

void OnPointerEntered ( winrt::PointerRoutedEventArgs const & args )

Definition at line 352 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());

    __super::OnPointerEntered(args);

    ProcessPointerOver(args, true /*isPointerOver*/);
}

void OnPointerExited ( winrt::PointerRoutedEventArgs const & args )

Definition at line 368 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());

    __super::OnPointerExited(args);

    ProcessPointerOver(args, false /*isPointerOver*/);
}

void OnPointerMoved ( winrt::PointerRoutedEventArgs const & args )

Definition at line 361 of file ItemContainer.cpp.

{
    __super::OnPointerMoved(args);

    ProcessPointerOver(args, true /*isPointerOver*/);
}

void OnPointerPressed ( winrt::PointerRoutedEventArgs const & args )

Definition at line 377 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());

    __super::OnPointerPressed(args);

    if (m_pointerInfo == nullptr || args.Handled())
    {
        return;
    }

    auto const& pointer = args.Pointer();
    auto const& pointerDeviceType = pointer.PointerDeviceType();
    winrt::PointerUpdateKind pointerUpdateKind{ winrt::PointerUpdateKind::Other };

    if (pointerDeviceType == winrt::PointerDeviceType::Mouse)
    {
        const auto pointerProperties = args.GetCurrentPoint(*this).Properties();

        pointerUpdateKind = pointerProperties.PointerUpdateKind();

        if (pointerUpdateKind != winrt::PointerUpdateKind::LeftButtonPressed &&
            pointerUpdateKind != winrt::PointerUpdateKind::RightButtonPressed)
        {
            return;
        }
    }

    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, TypeLogging::PointerDeviceTypeToString(pointerDeviceType).c_str(), TypeLogging::PointerUpdateKindToString(pointerUpdateKind).c_str());

    const auto pointerId = pointer.PointerId();

    if (!m_pointerInfo->IsTrackingPointer())
    {
        m_pointerInfo->TrackPointerId(pointerId);
    }
    else if (!m_pointerInfo->IsPointerIdTracked(pointerId))
    {
        return;
    }

    bool canRaiseItemInvoked = CanRaiseItemInvoked();

    switch (pointerDeviceType)
    {
    case winrt::PointerDeviceType::Touch:
        m_pointerInfo->SetPointerPressed();
        m_pointerInfo->SetIsTouchPointerOver();
        break;
    case winrt::PointerDeviceType::Pen:
        m_pointerInfo->SetPointerPressed();
        m_pointerInfo->SetIsPenPointerOver();
        break;
    case winrt::PointerDeviceType::Mouse:
        m_pointerInfo->SetIsMouseButtonPressed(pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonPressed /*isForLeftMouseButton*/);
        canRaiseItemInvoked &= pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonPressed;
        m_pointerInfo->SetIsMousePointerOver();
        UpdateMousePointerOverInstance(true /*isPointerOver*/);
        break;
    }

    if (canRaiseItemInvoked)
    {
        args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::PointerPressed, args.OriginalSource()));
    }

    UpdateVisualState(true);
}

void OnPointerReleased ( winrt::PointerRoutedEventArgs const & args )

Definition at line 446 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());

    __super::OnPointerReleased(args);

    if (m_pointerInfo == nullptr ||
        !m_pointerInfo->IsPointerIdTracked(args.Pointer().PointerId()) ||
        !m_pointerInfo->IsPressed())
    {
        return;
    }

    m_pointerInfo->ResetTrackedPointerId();

    bool canRaiseItemInvoked = CanRaiseItemInvoked();
    auto const& pointerDeviceType = args.Pointer().PointerDeviceType();

    if (pointerDeviceType == winrt::PointerDeviceType::Mouse)
    {
        const auto pointerProperties = args.GetCurrentPoint(*this).Properties();
        const auto pointerUpdateKind = pointerProperties.PointerUpdateKind();

        ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, TypeLogging::PointerDeviceTypeToString(pointerDeviceType).c_str(), TypeLogging::PointerUpdateKindToString(pointerUpdateKind).c_str());

        if (pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonReleased ||
            pointerUpdateKind == winrt::PointerUpdateKind::RightButtonReleased)
        {
            m_pointerInfo->ResetIsMouseButtonPressed(pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonReleased /*isForLeftMouseButton*/);
        }
        canRaiseItemInvoked &= pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonReleased;
    }
    else
    {
        ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::PointerDeviceTypeToString(pointerDeviceType).c_str());

        m_pointerInfo->ResetPointerPressed();
    }

    if (canRaiseItemInvoked &&
        !args.Handled() &&
        !m_pointerInfo->IsPressed())
    {
        args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::PointerReleased, args.OriginalSource()));
    }

    UpdateVisualState(true);
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 99 of file ItemContainer.cpp.

{
    auto dependencyProperty = args.Property();

#ifdef DBG
    if (dependencyProperty == s_IsSelectedProperty)
    {
        const bool oldValue = unbox_value<bool>(args.OldValue());
        const bool newValue = unbox_value<bool>(args.NewValue());

        ITEMCONTAINER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"IsSelected", oldValue, newValue);
    }
    else if (dependencyProperty == s_MultiSelectModeProperty)
    {
        const winrt::ItemContainerMultiSelectMode oldValue = unbox_value<winrt::ItemContainerMultiSelectMode>(args.OldValue());
        const winrt::ItemContainerMultiSelectMode newValue = unbox_value<winrt::ItemContainerMultiSelectMode>(args.NewValue());

        ITEMCONTAINER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, L"MultiSelectMode", TypeLogging::ItemContainerMultiSelectModeToString(newValue).c_str());
    }
    else
    {
        ITEMCONTAINER_TRACE_VERBOSE(nullptr, L"%s[%p](property: %s)\n", METH_NAME, this, DependencyPropertyToString(dependencyProperty).c_str());
    }
#endif

    if (dependencyProperty == s_IsSelectedProperty)
    {
#ifdef MUX_PRERELEASE
        const bool isMultipleOrExtended = (static_cast<int>(MultiSelectMode() & (winrt::ItemContainerMultiSelectMode::Multiple | winrt::ItemContainerMultiSelectMode::Extended)));
#else
        const bool isMultipleOrExtended = (static_cast<int>(MultiSelectModeInternal() & (winrt::ItemContainerMultiSelectMode::Multiple | winrt::ItemContainerMultiSelectMode::Extended)));
#endif

        const winrt::AutomationEvents eventToRaise =
            IsSelected() ?
            (isMultipleOrExtended ? winrt::AutomationEvents::SelectionItemPatternOnElementAddedToSelection : winrt::AutomationEvents::SelectionItemPatternOnElementSelected) :
            (isMultipleOrExtended ? winrt::AutomationEvents::SelectionItemPatternOnElementRemovedFromSelection :winrt::AutomationEvents::PropertyChanged);

        if (eventToRaise != winrt::AutomationEvents::PropertyChanged && winrt::AutomationPeer::ListenerExists(eventToRaise))
        {
            if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(*this))
            {
                peer.RaiseAutomationEvent(eventToRaise);
            }
        }
    }
    else if (dependencyProperty == s_ChildProperty)
    {
        if (auto&& rootPanel = m_rootPanel.get())
        {
            unsigned int oldChildIndex{};

            if (args.OldValue() != nullptr && rootPanel.Children().IndexOf(args.OldValue().as<winrt::UIElement>(), oldChildIndex))
            {
                rootPanel.Children().RemoveAt(oldChildIndex);
            }

            rootPanel.Children().InsertAt(0, args.NewValue().as<winrt::UIElement>());
        }
    }

    if (m_pointerInfo != nullptr)
    {
        if (dependencyProperty == s_IsSelectedProperty ||
            dependencyProperty == s_MultiSelectModeProperty)
        {
            UpdateVisualState(true);
            UpdateMultiSelectState(true);
        }
    }
}

void OnTapped ( winrt::TappedRoutedEventArgs const & args )

Definition at line 513 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    __super::OnTapped(args);

    if (CanRaiseItemInvoked() && !args.Handled())
    {
        args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::Tap, args.OriginalSource()));
    }
}

void ProcessPointerCanceled ( winrt::PointerRoutedEventArgs const & args ) [private]

Definition at line 308 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, args == nullptr ? -1 : args.Pointer().PointerId());

    if (m_pointerInfo)
    {
        if (args == nullptr)
        {
            m_pointerInfo->ResetAll();
        }
        else
        {
            auto const& pointer = args.Pointer();

            if (m_pointerInfo->IsPointerIdTracked(pointer.PointerId()))
            {
                m_pointerInfo->ResetTrackedPointerId();
            }

            auto const& pointerDeviceType = pointer.PointerDeviceType();

            switch (pointerDeviceType)
            {
            case winrt::PointerDeviceType::Touch:
                m_pointerInfo->ResetPointerPressed();
                m_pointerInfo->ResetIsTouchPointerOver();
                break;
            case winrt::PointerDeviceType::Pen:
                m_pointerInfo->ResetPointerPressed();
                m_pointerInfo->ResetIsPenPointerOver();
                break;
            case winrt::PointerDeviceType::Mouse:
                m_pointerInfo->ResetIsMouseButtonPressed(true /*isForLeftMouseButton*/);
                m_pointerInfo->ResetIsMouseButtonPressed(false /*isForLeftMouseButton*/);
                m_pointerInfo->ResetIsMousePointerOver();
                UpdateMousePointerOverInstance(false /*isPointerOver*/);
                break;
            }
        }
    }

    UpdateVisualState(true);
}

void ProcessPointerOver | ( | winrt::PointerRoutedEventArgs const & | args,
 |  | bool | isPointerOver |
 | ) |  |  | [private]

Definition at line 253 of file ItemContainer.cpp.

{
    if (m_pointerInfo)
    {
        const bool oldIsPointerOver = m_pointerInfo->IsPointerOver();
        auto const& pointerDeviceType = args.Pointer().PointerDeviceType();

        if (pointerDeviceType == winrt::PointerDeviceType::Touch)
        {
            if (isPointerOver)
            {
                m_pointerInfo->SetIsTouchPointerOver();
            }
            else
            {
                // Once a touch pointer leaves the ItemContainer it is no longer tracked because this
                // ItemContainer may never receive a PointerReleased, PointerCanceled or PointerCaptureLost
                // for that PointerId.
                m_pointerInfo->ResetAll();
            }
        }
        else if (pointerDeviceType == winrt::PointerDeviceType::Pen)
        {
            if (isPointerOver)
            {
                m_pointerInfo->SetIsPenPointerOver();
            }
            else
            {
                // Once a pen pointer leaves the ItemContainer it is no longer tracked because this
                // ItemContainer may never receive a PointerReleased, PointerCanceled or PointerCaptureLost
                // for that PointerId.
                m_pointerInfo->ResetAll();
            }
        }
        else
        {
            if (isPointerOver)
            {
                m_pointerInfo->SetIsMousePointerOver();
            }
            else
            {
                m_pointerInfo->ResetIsMousePointerOver();
            }
            UpdateMousePointerOverInstance(isPointerOver);
        }

        if (m_pointerInfo->IsPointerOver() != oldIsPointerOver)
        {
            UpdateVisualState(true);
        }
    }
}

bool RaiseItemInvoked | ( | const winrt::ItemContainerInteractionTrigger & | interactionTrigger,
 |  | const winrt::IInspectable & | originalSource
 | ) |  |

Definition at line 567 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::ItemContainerInteractionTriggerToString(interactionTrigger).c_str());

    if (m_itemInvokedEventSource)
    {
        const auto itemInvokedEventArgs = winrt::make_self<ItemContainerInvokedEventArgs>(interactionTrigger, originalSource);
        m_itemInvokedEventSource(*this, *itemInvokedEventArgs);

        return itemInvokedEventArgs->Handled();
    }

    return false;
}

void UpdateCheckboxState ( ) [private]

Definition at line 600 of file ItemContainer.cpp.

{
    if (auto&& selectionCheckbox = m_selectionCheckbox.get())
    {
        const bool isChecked = SharedHelpers::IsTrue(selectionCheckbox.IsChecked());
        const bool isSelected = IsSelected();

        if (isChecked != isSelected)
        {
            selectionCheckbox.IsChecked(isSelected);
        }
    }
}

void UpdateMousePointerOverInstance ( bool isPointerOver ) [private]

Definition at line 614 of file ItemContainer.cpp.

{
    auto mousePointerOverInstance = s_mousePointerOverInstance.get();

    if (isPointerOver)
    {
        if (mousePointerOverInstance == nullptr || mousePointerOverInstance.get() != this)
        {
            if (mousePointerOverInstance != nullptr && mousePointerOverInstance->m_pointerInfo != nullptr)
            {
                mousePointerOverInstance->m_pointerInfo->ResetIsMousePointerOver();
            }

            s_mousePointerOverInstance = get_weak();
        }
    }
    else
    {
        if (mousePointerOverInstance != nullptr && mousePointerOverInstance.get() == this)
        {
            s_mousePointerOverInstance = nullptr;
        }
    }
}

void UpdateMultiSelectState ( bool useTransitions ) [private]

Definition at line 225 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, useTransitions);

#ifdef MUX_PRERELEASE
    const winrt::ItemContainerMultiSelectMode multiSelectMode = MultiSelectMode();
#else
    const winrt::ItemContainerMultiSelectMode multiSelectMode = MultiSelectModeInternal();
#endif

    // MultiSelectStates
    if (static_cast<int>(multiSelectMode & winrt::ItemContainerMultiSelectMode::Multiple))
    {
        GoToState(s_multipleStateName, useTransitions);

        if (!m_selectionCheckbox.get())
        {
            LoadSelectionCheckbox();
        }

        UpdateCheckboxState();
    }
    else
    {
        GoToState(s_singleStateName, useTransitions);
    }
}

void UpdateVisualState ( bool useTransitions ) [private]

Definition at line 178 of file ItemContainer.cpp.

{
    ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, useTransitions);

    // DisabledStates
    if (!IsEnabled())
    {
        GoToState(s_disabledStateName, useTransitions);
        GoToState(IsSelected() ? s_selectedNormalStateName : s_unselectedNormalStateName, useTransitions);
    }
    else
    {
        GoToState(s_enabledStateName, useTransitions);

        // CombinedStates
        if (m_pointerInfo == nullptr)
        {
            return;
        }

        if (m_pointerInfo->IsPressed() && IsSelected())
        {
            GoToState(s_selectedPressedStateName, useTransitions);
        }
        else if (m_pointerInfo->IsPressed())
        {
            GoToState(s_unselectedPressedStateName, useTransitions);
        }
        else if (m_pointerInfo->IsPointerOver() && IsSelected())
        {
            GoToState(s_selectedPointerOverStateName, useTransitions);
        }
        else if (m_pointerInfo->IsPointerOver())
        {
            GoToState(s_unselectedPointerOverStateName, useTransitions);
        }
        else if (IsSelected())
        {
            GoToState(s_selectedNormalStateName, useTransitions);
        }
        else
        {
            GoToState(s_unselectedNormalStateName, useTransitions);
        }
    }
}

The documentation for this class was generated from the following files:
  • ItemContainer/ItemContainer.h
  • ItemContainer/ItemContainer.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ItemContainerAutomationPeer Class Reference

#include "ItemContainerAutomationPeer.h"

Inherits ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT >.

List of all members.

Public Member Functions

ItemContainerAutomationPeer (winrt::FrameworkElement const &owner)
void | AddToSelection ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
virtual winrt::hstring | GetClassNameCore ()
virtual winrt::hstring | GetLocalizedControlTypeCore ()
virtual winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
void | Invoke ()
bool | IsSelected ()
void | RemoveFromSelection ()
void | Select ()
winrt::IRawElementProviderSimple | SelectionContainer ()

Private Member Functions

com_ptr< ItemContainer > | GetImpl ()
void | UpdateSelection (bool isSelected)

Detailed Description

Definition at line 9 of file ItemContainerAutomationPeer.h.

Constructor & Destructor Documentation

ItemContainerAutomationPeer ( winrt::FrameworkElement const & owner )

Definition at line 12 of file ItemContainerAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

void AddToSelection ( )

Definition at line 157 of file ItemContainerAutomationPeer.cpp.

{
    UpdateSelection(true);
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 75 of file ItemContainerAutomationPeer.cpp.

{
    return winrt::AutomationControlType::ListItem;
}

winrt::hstring GetClassNameCore ( ) [virtual]

Definition at line 85 of file ItemContainerAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::ItemContainer>();
}

com_ptr< ItemContainer > GetImpl ( ) [private]

Definition at line 172 of file ItemContainerAutomationPeer.cpp.

{
    com_ptr<ItemContainer> impl = nullptr;

    if (auto itemContainer = Owner().try_as<winrt::ItemContainer>())
    {
        impl = winrt::get_self<ItemContainer>(itemContainer)->get_strong();
    }

    return impl;
}

winrt::hstring GetLocalizedControlTypeCore ( ) [virtual]

Definition at line 80 of file ItemContainerAutomationPeer.cpp.

{
    return ResourceAccessor::GetLocalizedStringResource(SR_ItemContainerDefaultControlName);
}

winrt::hstring GetNameCore ( ) [virtual]

Definition at line 18 of file ItemContainerAutomationPeer.cpp.

{
    winrt::hstring returnHString = __super::GetNameCore();

    // If a name hasn't been provided by AutomationProperties.Name in markup:
    if (returnHString.empty())
    {
        if (auto itemContainer = Owner().try_as<winrt::ItemContainer>())
        {
            returnHString = SharedHelpers::TryGetStringRepresentationFromObject(itemContainer.Child());
        }
    }

    if (returnHString.empty())
    {
        returnHString = ResourceAccessor::GetLocalizedStringResource(SR_ItemContainerDefaultControlName);
    }

    return returnHString;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 39 of file ItemContainerAutomationPeer.cpp.

{
    if (auto itemContainer = Owner().try_as<winrt::ItemContainer>())
    {
        if (patternInterface == winrt::PatternInterface::SelectionItem)
        {
#ifdef MUX_PRERELEASE
            const bool canUserSelect = static_cast<int>(itemContainer.CanUserSelect() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
#else
            const bool canUserSelect = static_cast<int>(GetImpl()->CanUserSelectInternal() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
#endif

            if (canUserSelect)
            {
                return *this;
            }

        }
        else if (patternInterface == winrt::PatternInterface::Invoke)
        {
#ifdef MUX_PRERELEASE
            const bool canUserInvoke = static_cast<int>(itemContainer.CanUserInvoke() & winrt::ItemContainerUserInvokeMode::UserCanInvoke);
#else
            const bool canUserInvoke = static_cast<int>(GetImpl()->CanUserInvokeInternal() & winrt::ItemContainerUserInvokeMode::UserCanInvoke);
#endif

            if (canUserInvoke)
            {
                return *this;
            }
        }
    }

    return __super::GetPatternCore(patternInterface);
}

void Invoke ( )

Definition at line 91 of file ItemContainerAutomationPeer.cpp.

{
    if (auto itemContainer = GetImpl())
    {
#ifdef MUX_PRERELEASE
        const bool canUserInvoke = static_cast<int>(itemContainer->CanUserInvoke() & winrt::ItemContainerUserInvokeMode::UserCanInvoke);
#else
        const bool canUserInvoke = static_cast<int>(itemContainer->CanUserInvokeInternal() & winrt::ItemContainerUserInvokeMode::UserCanInvoke);
#endif

        if (canUserInvoke)
        {
            itemContainer->RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::AutomationInvoke, nullptr);
        }
    }
}

bool IsSelected ( )

Definition at line 109 of file ItemContainerAutomationPeer.cpp.

{
    if (auto itemContainer = GetImpl())
    {
        return itemContainer->IsSelected();
    }
    return false;
}

void RemoveFromSelection ( )

Definition at line 162 of file ItemContainerAutomationPeer.cpp.

{
    UpdateSelection(false);
}

void Select ( )

Definition at line 167 of file ItemContainerAutomationPeer.cpp.

{
    UpdateSelection(true);
}

winrt::IRawElementProviderSimple SelectionContainer ( )

Definition at line 118 of file ItemContainerAutomationPeer.cpp.

{
    if (auto itemContainer = GetImpl())
    {
        auto const selectionContainer = [itemContainer]()
        {
            auto parent = winrt::VisualTreeHelper::GetParent(*itemContainer);

            while (parent)
            {
                if (auto const parentAsUIElement = parent.try_as<winrt::UIElement>())
                {
                    if (auto const peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(parentAsUIElement))
                    {
                        if (auto const selectionProvider = peer.try_as<winrt::ISelectionProvider>())
                        {
                            return parentAsUIElement;
                        }
                    }
                }

                parent = winrt::VisualTreeHelper::GetParent(parent);
            }

            return parent.try_as<winrt::UIElement>();
        }();

        if (selectionContainer)
        {
            if (auto const peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(selectionContainer))
            {
                return ProviderFromPeer(peer);
            }
        }
    }

    return nullptr;
}

void UpdateSelection ( bool isSelected ) [private]

Definition at line 184 of file ItemContainerAutomationPeer.cpp.

{
    if (auto itemContainer = GetImpl())
    {
        if (isSelected)
        {
#ifdef MUX_PRERELEASE
            const bool canUserSelect = static_cast<int>(itemContainer->CanUserSelect() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
#else
            const bool canUserSelect = static_cast<int>(itemContainer->CanUserSelectInternal() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
#endif

            if (canUserSelect)
            {
                itemContainer->IsSelected(true);
            }
        }
        else
        {
            itemContainer->IsSelected(false);
        }
    }
}

The documentation for this class was generated from the following files:
  • ItemContainer/ItemContainerAutomationPeer.h
  • ItemContainer/ItemContainerAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerInvokedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemContainerInvokedEventArgs Class Reference

#include "ItemContainerInvokedEventArgs.h"

Inherits ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

ItemContainerInvokedEventArgs (const winrt::ItemContainerInteractionTrigger &interactionTrigger, const winrt::IInspectable &originalSource)
void | Handled (bool value)
bool | Handled ()
winrt::ItemContainerInteractionTrigger | InteractionTrigger ()
winrt::IInspectable | OriginalSource ()

Detailed Description

Definition at line 5 of file ItemContainerInvokedEventArgs.h.

Constructor & Destructor Documentation

ItemContainerInvokedEventArgs | ( | const winrt::ItemContainerInteractionTrigger & | interactionTrigger,
 |  | const winrt::IInspectable & | originalSource
 | ) |  |

Definition at line 8 of file ItemContainerInvokedEventArgs.cpp.

{
    m_interactionTrigger = interactionTrigger;
    m_originalSource.set(originalSource);
}

Member Function Documentation

bool Handled ( )

Definition at line 26 of file ItemContainerInvokedEventArgs.cpp.

{
    return m_handled;
}

void Handled ( bool value )

Definition at line 31 of file ItemContainerInvokedEventArgs.cpp.

{
    m_handled = value;
}

winrt::ItemContainerInteractionTrigger InteractionTrigger ( )

Definition at line 21 of file ItemContainerInvokedEventArgs.cpp.

{
    return m_interactionTrigger;
}

winrt::IInspectable OriginalSource ( )

Definition at line 16 of file ItemContainerInvokedEventArgs.cpp.

{
    return m_originalSource.get();
}

The documentation for this class was generated from the following files:
  • ItemContainer/ItemContainerInvokedEventArgs.h
  • ItemContainer/ItemContainerInvokedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ItemContainerProperties Class Reference

#include "ItemContainer.properties.h"

Inherited by ItemContainer.

List of all members.

Public Member Functions

ItemContainerProperties ()
void | CanUserInvoke (winrt::ItemContainerUserInvokeMode const &value)
winrt::ItemContainerUserInvokeMode | CanUserInvoke ()
void | CanUserSelect (winrt::ItemContainerUserSelectMode const &value)
winrt::ItemContainerUserSelectMode | CanUserSelect ()
void | Child (winrt::UIElement const &value)
winrt::UIElement | Child ()
void | IsSelected (bool value)
bool | IsSelected ()
winrt::event_token | ItemInvoked (winrt::TypedEventHandler< winrt::ItemContainer, winrt::ItemContainerInvokedEventArgs > const &value)
void | ItemInvoked (winrt::event_token const &token)
void | MultiSelectMode (winrt::ItemContainerMultiSelectMode const &value)
winrt::ItemContainerMultiSelectMode | MultiSelectMode ()

Static Public Member Functions

static winrt::DependencyProperty | CanUserInvokeProperty ()
static winrt::DependencyProperty | CanUserSelectProperty ()
static winrt::DependencyProperty | ChildProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsSelectedProperty ()
static winrt::DependencyProperty | MultiSelectModeProperty ()
static void | OnCanUserInvokePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCanUserSelectPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnChildPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsSelectedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMultiSelectModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ItemContainer,
winrt::ItemContainerInvokedEventArgs > > 		m_itemInvokedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_CanUserInvokeProperty
static GlobalDependencyProperty | s_CanUserSelectProperty
static GlobalDependencyProperty | s_ChildProperty
static GlobalDependencyProperty | s_IsSelectedProperty
static GlobalDependencyProperty | s_MultiSelectModeProperty

Detailed Description

Definition at line 7 of file ItemContainer.properties.h.

Constructor & Destructor Documentation

ItemContainerProperties ( )

Definition at line 22 of file ItemContainer.properties.cpp.

    : m_itemInvokedEventSource{static_cast<ItemContainer*>(this)}

Member Function Documentation

void CanUserInvoke ( winrt::ItemContainerUserInvokeMode const & value )
winrt::ItemContainerUserInvokeMode CanUserInvoke ( )
static winrt::DependencyProperty CanUserInvokeProperty ( ) [inline, static]

Definition at line 27 of file ItemContainer.properties.h.

{ return s_CanUserInvokeProperty; }

winrt::ItemContainerUserSelectMode CanUserSelect ( )
void CanUserSelect ( winrt::ItemContainerUserSelectMode const & value )
static winrt::DependencyProperty CanUserSelectProperty ( ) [inline, static]

Definition at line 28 of file ItemContainer.properties.h.

{ return s_CanUserSelectProperty; }

void Child ( winrt::UIElement const & value )
winrt::UIElement Child ( )
static winrt::DependencyProperty ChildProperty ( ) [inline, static]

Definition at line 29 of file ItemContainer.properties.h.

{ return s_ChildProperty; }

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
bool IsSelected ( )
void IsSelected ( bool value )
static winrt::DependencyProperty IsSelectedProperty ( ) [inline, static]

Definition at line 30 of file ItemContainer.properties.h.

{ return s_IsSelectedProperty; }

void ItemInvoked ( winrt::event_token const & token )
winrt::event_token ItemInvoked ( winrt::TypedEventHandler< winrt::ItemContainer, winrt::ItemContainerInvokedEventArgs > const & value )
void MultiSelectMode ( winrt::ItemContainerMultiSelectMode const & value )
winrt::ItemContainerMultiSelectMode MultiSelectMode ( )
static winrt::DependencyProperty MultiSelectModeProperty ( ) [inline, static]

Definition at line 31 of file ItemContainer.properties.h.

{ return s_MultiSelectModeProperty; }

static void OnCanUserInvokePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCanUserSelectPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnChildPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsSelectedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMultiSelectModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ItemContainer, winrt::ItemContainerInvokedEventArgs> > m_itemInvokedEventSource

Definition at line 42 of file ItemContainer.properties.h.

GlobalDependencyProperty s_CanUserInvokeProperty [static]

Definition at line 33 of file ItemContainer.properties.h.

GlobalDependencyProperty s_CanUserSelectProperty [static]

Definition at line 34 of file ItemContainer.properties.h.

GlobalDependencyProperty s_ChildProperty [static]

Definition at line 35 of file ItemContainer.properties.h.

GlobalDependencyProperty s_IsSelectedProperty [static]

Definition at line 36 of file ItemContainer.properties.h.

GlobalDependencyProperty s_MultiSelectModeProperty [static]

Definition at line 37 of file ItemContainer.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ItemContainer.properties.h
  • Generated/ItemContainer.properties.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerRevokers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemContainerRevokers Class Reference

#include "ItemContainerRevokers.h"

List of all members.

Public Member Functions

void RevokeAll (const winrt::ItemContainer &itemContainer)

Detailed Description

Definition at line 6 of file ItemContainerRevokers.h.

Member Function Documentation

void RevokeAll ( const winrt::ItemContainer & itemContainer ) [inline]

Definition at line 9 of file ItemContainerRevokers.h.

    {
        if (m_isSelectedPropertyChangedRevoker)
        {
            m_isSelectedPropertyChangedRevoker.revoke();
        }

        if (m_gettingFocusRevoker)
        {
            m_gettingFocusRevoker.revoke();
        }

        if (m_losingFocusRevoker)
        {
            m_losingFocusRevoker.revoke();
        }

        if (m_keyDownRevoker)
        {
            m_keyDownRevoker.revoke();
        }

        if (m_itemInvokedRevoker)
        {
            m_itemInvokedRevoker.revoke();
        }

#ifdef DBG_VERBOSE
        if (m_sizeChangedRevokerDbg)
        {
            m_sizeChangedRevokerDbg.revoke();
        }
#endif
    }

The documentation for this class was generated from the following file:
  • ItemContainer/ItemContainerRevokers.h
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

ItemContainerTrace Class Reference

#include "ItemContainerTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file ItemContainerTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file ItemContainerTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ItemContainerInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_ITEMCONTAINER),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ItemContainer") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 152 of file ItemContainerTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "ItemContainerPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_ITEMCONTAINER),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file ItemContainerTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ItemContainerVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_ITEMCONTAINER),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ItemContainer") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file ItemContainerTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file ItemContainerTrace.h.

The documentation for this class was generated from the following file:
  • ItemContainer/ItemContainerTrace.h
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeater Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions

ItemsRepeater Class Reference

#include "ItemsRepeater.h"

Inherits ReferenceTracker< ItemsRepeater, DeriveFromPanelHelper_base, winrt::ItemsRepeater, winrt::IItemsRepeater2 >, and ItemsRepeaterProperties.

List of all members.

Public Member Functions

ItemsRepeater ()
winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
void | ClearElementImpl (const winrt::UIElement &element)
winrt::IIterable
< winrt::DependencyObject > 		GetChildrenInTabFocusOrder ()
winrt::UIElement | GetElementFromIndexImpl (int index)
winrt::UIElement | GetElementImpl (int index, bool forceCreate, bool suppressAutoRecycle)
int32_t | GetElementIndex (winrt::UIElement const &element)
int | GetElementIndexImpl (const winrt::UIElement &element)
winrt::UIElement | GetOrCreateElement (int index)
winrt::UIElement | GetOrCreateElementImpl (int index)
int | Indent ()
winrt::ItemsSourceView | ItemsSourceView ()
winrt::Microsoft::UI::Xaml::IElementFactory | ItemTemplateShim ()
winrt::Point | LayoutOrigin () const
void | LayoutOrigin (winrt::Point value)
winrt::IInspectable | LayoutState () const
void | LayoutState (const winrt::IInspectable &value)
winrt::UIElement | MadeAnchor () const
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | OnBringIntoViewRequested (winrt::BringIntoViewRequestedEventArgs const &e)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnElementClearing (const winrt::UIElement &element)
void | OnElementIndexChanged (const winrt::UIElement &element, int oldIndex, int newIndex)
void | OnElementPrepared (const winrt::UIElement &element, int index)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | PinElement (winrt::UIElement const &element)
winrt::Rect | RealizationWindow () const
winrt::UIElement | SuggestedAnchor () const
TransitionManager & | TransitionManager ()
winrt::UIElement | TryGetElement (int index)
void | UnpinElement (winrt::UIElement const &element)
ViewManager & | ViewManager ()
winrt::Rect | VisibleWindow () const

Static Public Member Functions

static winrt::com_ptr
< VirtualizationInfo > 		CreateAndInitializeVirtualizationInfo (const winrt::UIElement &element)
static int | GetLogItemIndex ()
static winrt::com_ptr
< VirtualizationInfo > 		GetVirtualizationInfo (const winrt::UIElement &element)
static winrt::DependencyProperty | GetVirtualizationInfoProperty ()
static void | SetLogItemIndex (int logItemIndex)
static winrt::com_ptr
< VirtualizationInfo > 		TryGetVirtualizationInfo (const winrt::UIElement &element)

Static Public Attributes

static winrt::Point | ClearedElementsArrangePosition
static winrt::Rect | InvalidRect
static constexpr uint8_t | s_maxStackLayoutIterations = 60u

Private Member Functions

winrt::IIterable
< winrt::DependencyObject > 		CreateChildrenInTabFocusOrderIterable ()
void | EnsureDefaultLayoutState ()
winrt::Layout | GetDefaultLayout ()
winrt::Layout | GetEffectiveLayout ()
winrt::VirtualizingLayoutContext | GetLayoutContext ()
void | InvalidateArrangeForLayout (winrt::Layout const &sender, winrt::IInspectable const &args)
void | InvalidateMeasureForLayout (winrt::Layout const &sender, winrt::IInspectable const &args)
bool | IsProcessingCollectionChange () const
void | OnDataSourcePropertyChanged (const winrt::ItemsSourceView &oldValue, const winrt::ItemsSourceView &newValue)
void | OnItemsSourceViewChanged (const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &args)
void | OnItemTemplateChanged (const winrt::IElementFactory &oldValue, const winrt::IElementFactory &newValue)
void | OnLayoutChanged (winrt::Layout oldValue, winrt::Layout newValue)
void | OnLayoutUpdated (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnLoaded (const winrt::IInspectable &, const winrt::RoutedEventArgs &)
void | OnTransitionProviderChanged (const winrt::ItemCollectionTransitionProvider &oldValue, const winrt::ItemCollectionTransitionProvider &newValue)
void | OnUnloaded (const winrt::IInspectable &, const winrt::RoutedEventArgs &)

Detailed Description

Definition at line 18 of file ItemsRepeater.h.

Constructor & Destructor Documentation

ItemsRepeater ( )

Member Function Documentation

winrt::Size ArrangeOverride ( winrt::Size const & finalSize )
void ClearElementImpl ( const winrt::UIElement & element )
static winrt::com_ptr<VirtualizationInfo> CreateAndInitializeVirtualizationInfo ( const winrt::UIElement & element ) [static]
winrt::IIterable<winrt::DependencyObject> CreateChildrenInTabFocusOrderIterable ( ) [private]
void EnsureDefaultLayoutState ( ) [private]
winrt::IIterable<winrt::DependencyObject> GetChildrenInTabFocusOrder ( )
winrt::Layout GetDefaultLayout ( ) [private]
winrt::Layout GetEffectiveLayout ( ) [private]
winrt::UIElement GetElementFromIndexImpl ( int index )
winrt::UIElement GetElementImpl | ( | int | index,
 |  | bool | forceCreate,
 |  | bool | suppressAutoRecycle
 | ) |  |
int32_t GetElementIndex ( winrt::UIElement const & element )
int GetElementIndexImpl ( const winrt::UIElement & element )
winrt::VirtualizingLayoutContext GetLayoutContext ( ) [private]
static int GetLogItemIndex ( ) [static]
winrt::UIElement GetOrCreateElement ( int index )
winrt::UIElement GetOrCreateElementImpl ( int index )
static winrt::com_ptr<VirtualizationInfo> GetVirtualizationInfo ( const winrt::UIElement & element ) [static]
static winrt::DependencyProperty GetVirtualizationInfoProperty ( ) [inline, static]

Definition at line 110 of file ItemsRepeater.h.

    {
        static GlobalDependencyProperty s_VirtualizationInfoProperty =
            InitializeDependencyProperty(
                L"VirtualizationInfo",
                winrt::name_of<winrt::IInspectable>(),
                winrt::name_of<winrt::ItemsRepeater>(),
                true /* isAttached */,
                nullptr /* defaultValue */);

        return s_VirtualizationInfoProperty;
    }

int Indent ( )
void InvalidateArrangeForLayout | ( | winrt::Layout const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]
void InvalidateMeasureForLayout | ( | winrt::Layout const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]
bool IsProcessingCollectionChange ( ) const [inline, private]

Definition at line 146 of file ItemsRepeater.h.

{ return m_processingItemsSourceChange != nullptr; }

winrt::ItemsSourceView ItemsSourceView ( )
winrt::Microsoft::UI::Xaml::IElementFactory ItemTemplateShim ( ) [inline]

Definition at line 73 of file ItemsRepeater.h.

{ return m_itemTemplateWrapper; };

winrt::Point LayoutOrigin ( ) const [inline]

Definition at line 97 of file ItemsRepeater.h.

{ return m_layoutOrigin; }

void LayoutOrigin ( winrt::Point value ) [inline]

Definition at line 98 of file ItemsRepeater.h.

{ m_layoutOrigin = value; }

winrt::IInspectable LayoutState ( ) const [inline]

Definition at line 91 of file ItemsRepeater.h.

{ return m_layoutState.get(); }

void LayoutState ( const winrt::IInspectable & value ) [inline]

Definition at line 92 of file ItemsRepeater.h.

{ m_layoutState.set(value); }

winrt::UIElement MadeAnchor ( ) const [inline]

Definition at line 96 of file ItemsRepeater.h.

{ return m_viewportManager->MadeAnchor(); }

winrt::Size MeasureOverride ( winrt::Size const & availableSize )
void OnBringIntoViewRequested ( winrt::BringIntoViewRequestedEventArgs const & e )
winrt::AutomationPeer OnCreateAutomationPeer ( )
void OnDataSourcePropertyChanged | ( | const winrt::ItemsSourceView & | oldValue,
 |  | const winrt::ItemsSourceView & | newValue |
 | ) |  |  | [private]
void OnElementClearing ( const winrt::UIElement & element )
void OnElementIndexChanged | ( | const winrt::UIElement & | element,
 |  | int | oldIndex,
 |  | int | newIndex
 | ) |  |
void OnElementPrepared | ( | const winrt::UIElement & | element,
 |  | int | index
 | ) |  |
void OnItemsSourceViewChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args |
 | ) |  |  | [private]
void OnItemTemplateChanged | ( | const winrt::IElementFactory & | oldValue,
 |  | const winrt::IElementFactory & | newValue |
 | ) |  |  | [private]
void OnLayoutChanged | ( | winrt::Layout | oldValue,
 |  | winrt::Layout | newValue |
 | ) |  |  | [private]
void OnLayoutUpdated | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]
void OnLoaded | ( | const winrt::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnTransitionProviderChanged | ( | const winrt::ItemCollectionTransitionProvider & | oldValue,
 |  | const winrt::ItemCollectionTransitionProvider & | newValue |
 | ) |  |  | [private]
void OnUnloaded | ( | const winrt::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]
void PinElement ( winrt::UIElement const & element )
winrt::Rect RealizationWindow ( ) const [inline]

Definition at line 94 of file ItemsRepeater.h.

{ return m_viewportManager->GetLayoutRealizationWindow(); }

static void SetLogItemIndex ( int logItemIndex ) [static]
winrt::UIElement SuggestedAnchor ( ) const [inline]

Definition at line 95 of file ItemsRepeater.h.

{ return m_viewportManager->SuggestedAnchor(); }

TransitionManager& TransitionManager ( ) [inline]

Definition at line 75 of file ItemsRepeater.h.

{ return m_transitionManager; }

winrt::UIElement TryGetElement ( int index )
static winrt::com_ptr<VirtualizationInfo> TryGetVirtualizationInfo ( const winrt::UIElement & element ) [static]
void UnpinElement ( winrt::UIElement const & element )
ViewManager& ViewManager ( ) [inline]

Definition at line 74 of file ItemsRepeater.h.

{ return m_viewManager; }

winrt::Rect VisibleWindow ( ) const [inline]

Definition at line 93 of file ItemsRepeater.h.

{ return m_viewportManager->GetLayoutVisibleWindow(); }

Member Data Documentation

winrt::Point ClearedElementsArrangePosition [static]

Definition at line 31 of file ItemsRepeater.h.

winrt::Rect InvalidRect [static]

Definition at line 33 of file ItemsRepeater.h.

constexpr uint8_t s_maxStackLayoutIterations = 60u [static]

Definition at line 29 of file ItemsRepeater.h.

The documentation for this class was generated from the following file:
  • Repeater/ItemsRepeater.h
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterElementClearingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemsRepeaterElementClearingEventArgs Class Reference

#include "ItemsRepeaterElementClearingEventArgs.h"

Inherits ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

ItemsRepeaterElementClearingEventArgs (const winrt::UIElement &element)
winrt::UIElement | Element ()
void | Update (const winrt::UIElement &element)

Detailed Description

Definition at line 8 of file ItemsRepeaterElementClearingEventArgs.h.

Constructor & Destructor Documentation

ItemsRepeaterElementClearingEventArgs ( const winrt::UIElement & element )

Definition at line 9 of file ItemsRepeaterElementClearingEventArgs.cpp.

{
    Update(element);
}

Member Function Documentation

winrt::UIElement Element ( )

Definition at line 16 of file ItemsRepeaterElementClearingEventArgs.cpp.

{
    return m_element.get();
}

void Update ( const winrt::UIElement & element )

Definition at line 23 of file ItemsRepeaterElementClearingEventArgs.cpp.

{
    m_element.set(element);
}

The documentation for this class was generated from the following files:
  • Repeater/ItemsRepeaterElementClearingEventArgs.h
  • Repeater/ItemsRepeaterElementClearingEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterElementIndexChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

ItemsRepeaterElementIndexChangedEventArgs Class Reference

#include "ItemsRepeaterElementIndexChangedEventArgs.h"

Inherits ReferenceTracker< ItemsRepeaterElementIndexChangedEventArgs, winrt::implementation::ItemsRepeaterElementIndexChangedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

ItemsRepeaterElementIndexChangedEventArgs (const winrt::UIElement &element, int oldIndex, int newIndex)
winrt::UIElement | Element ()
int32_t | NewIndex ()
int32_t | OldIndex ()
void | Update (const winrt::UIElement &element, int oldIndex, int newIndex)

Private Attributes

int | m_newIndex
int | m_oldIndex

Detailed Description

Definition at line 8 of file ItemsRepeaterElementIndexChangedEventArgs.h.

Constructor & Destructor Documentation

ItemsRepeaterElementIndexChangedEventArgs | ( | const winrt::UIElement & | element,
 |  | int | oldIndex,
 |  | int | newIndex
 | ) |  |

Definition at line 9 of file ItemsRepeaterElementIndexChangedEventArgs.cpp.

{
    Update(element, oldIndex, newIndex);
}

Member Function Documentation

winrt::UIElement Element ( )

Definition at line 18 of file ItemsRepeaterElementIndexChangedEventArgs.cpp.

{
    return m_element.get();
}

int32_t NewIndex ( )

Definition at line 28 of file ItemsRepeaterElementIndexChangedEventArgs.cpp.

{
    return m_newIndex;
}

int32_t OldIndex ( )

Definition at line 23 of file ItemsRepeaterElementIndexChangedEventArgs.cpp.

{
    return m_oldIndex;
}

void Update | ( | const winrt::UIElement & | element,
 |  | int | oldIndex,
 |  | int | newIndex
 | ) |  |

Definition at line 35 of file ItemsRepeaterElementIndexChangedEventArgs.cpp.

{
    m_element.set(element);
    m_oldIndex = oldIndex;
    m_newIndex = newIndex;
}

Member Data Documentation

int m_newIndex [private]

Definition at line 28 of file ItemsRepeaterElementIndexChangedEventArgs.h.

int m_oldIndex [private]

Definition at line 26 of file ItemsRepeaterElementIndexChangedEventArgs.h.

The documentation for this class was generated from the following files:
  • Repeater/ItemsRepeaterElementIndexChangedEventArgs.h
  • Repeater/ItemsRepeaterElementIndexChangedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterElementPreparedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

ItemsRepeaterElementPreparedEventArgs Class Reference

#include "ItemsRepeaterElementPreparedEventArgs.h"

Inherits ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

ItemsRepeaterElementPreparedEventArgs (const winrt::UIElement &element, int index)
winrt::UIElement | Element ()
int32_t | Index ()
void | Update (const winrt::UIElement &element, int index)

Private Attributes

int | m_index
winrt::hstring | m_viewType

Detailed Description

Definition at line 8 of file ItemsRepeaterElementPreparedEventArgs.h.

Constructor & Destructor Documentation

ItemsRepeaterElementPreparedEventArgs | ( | const winrt::UIElement & | element,
 |  | int | index
 | ) |  |

Definition at line 9 of file ItemsRepeaterElementPreparedEventArgs.cpp.

{
    Update(element, index);
}

Member Function Documentation

winrt::UIElement Element ( )

Definition at line 18 of file ItemsRepeaterElementPreparedEventArgs.cpp.

{
    return m_element.get();
}

int32_t Index ( )

Definition at line 23 of file ItemsRepeaterElementPreparedEventArgs.cpp.

{
    return m_index;
}

void Update | ( | const winrt::UIElement & | element,
 |  | int | index
 | ) |  |

Definition at line 30 of file ItemsRepeaterElementPreparedEventArgs.cpp.

{
    m_element.set(element);
    m_index = index;
}

Member Data Documentation

int m_index [private]

Definition at line 24 of file ItemsRepeaterElementPreparedEventArgs.h.

winrt::hstring m_viewType [private]

Definition at line 26 of file ItemsRepeaterElementPreparedEventArgs.h.

The documentation for this class was generated from the following files:
  • Repeater/ItemsRepeaterElementPreparedEventArgs.h
  • Repeater/ItemsRepeaterElementPreparedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ItemsRepeaterProperties Class Reference

#include "ItemsRepeater.properties.h"

Inherited by ItemsRepeater.

List of all members.

Public Member Functions

ItemsRepeaterProperties ()
void | Background (winrt::Brush const &value)
winrt::Brush | Background ()
winrt::event_token | ElementClearing (winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs > const &value)
void | ElementClearing (winrt::event_token const &token)
void | ElementIndexChanged (winrt::event_token const &token)
winrt::event_token | ElementIndexChanged (winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs > const &value)
winrt::event_token | ElementPrepared (winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs > const &value)
void | ElementPrepared (winrt::event_token const &token)
void | HorizontalCacheLength (double value)
double | HorizontalCacheLength ()
void | ItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | ItemsSource ()
winrt::IInspectable | ItemTemplate ()
void | ItemTemplate (winrt::IInspectable const &value)
winrt::ItemCollectionTransitionProvider | ItemTransitionProvider ()
void | ItemTransitionProvider (winrt::ItemCollectionTransitionProvider const &value)
winrt::Layout | Layout ()
void | Layout (winrt::Layout const &value)
double | VerticalCacheLength ()
void | VerticalCacheLength (double value)

Static Public Member Functions

static winrt::DependencyProperty | BackgroundProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HorizontalCacheLengthProperty ()
static winrt::DependencyProperty | ItemsSourceProperty ()
static winrt::DependencyProperty | ItemTemplateProperty ()
static winrt::DependencyProperty | ItemTransitionProviderProperty ()
static winrt::DependencyProperty | LayoutProperty ()
static void | OnHorizontalCacheLengthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemTransitionProviderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLayoutPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalCacheLengthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | VerticalCacheLengthProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ItemsRepeater,
winrt::ItemsRepeaterElementClearingEventArgs > > 		m_elementClearingEventSource
event_source
< winrt::TypedEventHandler
< winrt::ItemsRepeater,
winrt::ItemsRepeaterElementIndexChangedEventArgs > > 		m_elementIndexChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ItemsRepeater,
winrt::ItemsRepeaterElementPreparedEventArgs > > 		m_elementPreparedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_BackgroundProperty
static GlobalDependencyProperty | s_HorizontalCacheLengthProperty
static GlobalDependencyProperty | s_ItemsSourceProperty
static GlobalDependencyProperty | s_ItemTemplateProperty
static GlobalDependencyProperty | s_ItemTransitionProviderProperty
static GlobalDependencyProperty | s_LayoutProperty
static GlobalDependencyProperty | s_VerticalCacheLengthProperty

Detailed Description

Definition at line 7 of file ItemsRepeater.properties.h.

Constructor & Destructor Documentation

ItemsRepeaterProperties ( )

Definition at line 24 of file ItemsRepeater.properties.cpp.

    : m_elementClearingEventSource{static_cast<ItemsRepeater*>(this)}

Member Function Documentation

void Background ( winrt::Brush const & value )
winrt::Brush Background ( )
static winrt::DependencyProperty BackgroundProperty ( ) [inline, static]

Definition at line 33 of file ItemsRepeater.properties.h.

{ return s_BackgroundProperty; }

static void ClearProperties ( ) [static]
winrt::event_token ElementClearing ( winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs > const & value )
void ElementClearing ( winrt::event_token const & token )
winrt::event_token ElementIndexChanged ( winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs > const & value )
void ElementIndexChanged ( winrt::event_token const & token )
winrt::event_token ElementPrepared ( winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs > const & value )
void ElementPrepared ( winrt::event_token const & token )
static void EnsureProperties ( ) [static]
double HorizontalCacheLength ( )
void HorizontalCacheLength ( double value )
static winrt::DependencyProperty HorizontalCacheLengthProperty ( ) [inline, static]

Definition at line 34 of file ItemsRepeater.properties.h.

{ return s_HorizontalCacheLengthProperty; }

void ItemsSource ( winrt::IInspectable const & value )
winrt::IInspectable ItemsSource ( )
static winrt::DependencyProperty ItemsSourceProperty ( ) [inline, static]

Definition at line 35 of file ItemsRepeater.properties.h.

{ return s_ItemsSourceProperty; }

winrt::IInspectable ItemTemplate ( )
void ItemTemplate ( winrt::IInspectable const & value )
static winrt::DependencyProperty ItemTemplateProperty ( ) [inline, static]

Definition at line 36 of file ItemsRepeater.properties.h.

{ return s_ItemTemplateProperty; }

void ItemTransitionProvider ( winrt::ItemCollectionTransitionProvider const & value )
winrt::ItemCollectionTransitionProvider ItemTransitionProvider ( )
static winrt::DependencyProperty ItemTransitionProviderProperty ( ) [inline, static]

Definition at line 37 of file ItemsRepeater.properties.h.

{ return s_ItemTransitionProviderProperty; }

void Layout ( winrt::Layout const & value )
winrt::Layout Layout ( )
static winrt::DependencyProperty LayoutProperty ( ) [inline, static]

Definition at line 38 of file ItemsRepeater.properties.h.

{ return s_LayoutProperty; }

static void OnHorizontalCacheLengthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemTransitionProviderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLayoutPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalCacheLengthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void VerticalCacheLength ( double value )
double VerticalCacheLength ( )
static winrt::DependencyProperty VerticalCacheLengthProperty ( ) [inline, static]

Definition at line 39 of file ItemsRepeater.properties.h.

{ return s_VerticalCacheLengthProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs> > m_elementClearingEventSource

Definition at line 56 of file ItemsRepeater.properties.h.

event_source<winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs> > m_elementIndexChangedEventSource

Definition at line 57 of file ItemsRepeater.properties.h.

event_source<winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs> > m_elementPreparedEventSource

Definition at line 58 of file ItemsRepeater.properties.h.

GlobalDependencyProperty s_BackgroundProperty [static]

Definition at line 41 of file ItemsRepeater.properties.h.

GlobalDependencyProperty s_HorizontalCacheLengthProperty [static]

Definition at line 42 of file ItemsRepeater.properties.h.

GlobalDependencyProperty s_ItemsSourceProperty [static]

Definition at line 43 of file ItemsRepeater.properties.h.

GlobalDependencyProperty s_ItemTemplateProperty [static]

Definition at line 44 of file ItemsRepeater.properties.h.

GlobalDependencyProperty s_ItemTransitionProviderProperty [static]

Definition at line 45 of file ItemsRepeater.properties.h.

GlobalDependencyProperty s_LayoutProperty [static]

Definition at line 46 of file ItemsRepeater.properties.h.

GlobalDependencyProperty s_VerticalCacheLengthProperty [static]

Definition at line 47 of file ItemsRepeater.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ItemsRepeater.properties.h
  • Generated/ItemsRepeater.properties.cpp
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterScrollHost Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Member Functions | Private Attributes

ItemsRepeaterScrollHost Class Reference

#include "ItemsRepeaterScrollHost.h"

Inherits ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > >.

List of all members.

Classes

struct | BringIntoViewState
struct | CandidateInfo

Public Member Functions

ItemsRepeaterScrollHost ()
winrt::UIElement | AnchorElement ()
winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
winrt::event_token | ConfigurationChanged (winrt::ConfigurationChangedEventHandler const &value)
void | ConfigurationChanged (winrt::event_token const &token)
winrt::UIElement | CurrentAnchor ()
winrt::Rect | GetRelativeViewport (winrt::UIElement const &element)
double | HorizontalAnchorRatio ()
void | HorizontalAnchorRatio (double value)
bool | IsHorizontallyScrollable ()
bool | IsVerticallyScrollable ()
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
winrt::event_token | PostArrange (winrt::PostArrangeEventHandler const &value)
void | PostArrange (winrt::event_token const &token)
void | RegisterAnchorCandidate (winrt::UIElement const &element)
winrt::FxScrollViewer | ScrollViewer ()
void | ScrollViewer (winrt::FxScrollViewer const &value)
void | StartBringIntoView (winrt::UIElement const &element, double alignmentX, double alignmentY, double offsetX, double offsetY, bool animate)
void | UnregisterAnchorCandidate (winrt::UIElement const &element)
double | VerticalAnchorRatio ()
void | VerticalAnchorRatio (double value)
winrt::event_token | ViewportChanged (winrt::ViewportChangedEventHandler const &value)
void | ViewportChanged (winrt::event_token const &token)

Private Member Functions

void | ApplyPendingChangeView (const winrt::FxScrollViewer &scrollViewer)
winrt::UIElement | GetAnchorElement (_Out_opt_ winrt::Rect *relativeBounds=nullptr)
bool | HasPendingBringIntoView () const
void | OnScrollViewerSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnScrollViewerViewChanged (winrt::IInspectable const &sender, winrt::ScrollViewerViewChangedEventArgs const &args)
void | OnScrollViewerViewChanging (const winrt::IInspectable &sender, const winrt::ScrollViewerViewChangingEventArgs &args)
double | TrackElement (const winrt::UIElement &element, winrt::Rect previousBounds, const winrt::FxScrollViewer &scrollViewer)

Private Attributes

std::vector< CandidateInfo > | m_candidates

Detailed Description

Definition at line 9 of file ItemsRepeaterScrollHost.h.

Constructor & Destructor Documentation

ItemsRepeaterScrollHost ( )

Definition at line 13 of file ItemsRepeaterScrollHost.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_ItemsRepeaterScrollHost);
}

Member Function Documentation

winrt::UIElement AnchorElement ( )

Definition at line 125 of file ItemsRepeaterScrollHost.cpp.

{
    return GetAnchorElement();
}

void ApplyPendingChangeView ( const winrt::FxScrollViewer & scrollViewer ) [private]

Definition at line 233 of file ItemsRepeaterScrollHost.cpp.

{
    auto bringIntoView = m_pendingBringIntoView;
    MUX_ASSERT(!bringIntoView.ChangeViewCalled());

    bringIntoView.ChangeViewCalled(true);

    const auto layoutSlot = CachedVisualTreeHelpers::GetLayoutSlot(bringIntoView.TargetElement().as<winrt::FrameworkElement>());

    // Arrange bounds are absolute.
    const auto arrangeBounds = bringIntoView
        .TargetElement()
        .TransformToVisual(scrollViewer.ContentTemplateRoot())
        .TransformBounds(winrt::Rect{ 0, 0, layoutSlot.Width, layoutSlot.Height });

    const auto scrollableArea = winrt::Point(
        static_cast<float>(scrollViewer.ViewportWidth() - arrangeBounds.Width),
        static_cast<float>(scrollViewer.ViewportHeight() - arrangeBounds.Height));

    // Calculate the target offset based on the alignment and offset parameters.
    // Make sure that we are constrained to the ScrollViewer's extent.
    const auto changeViewOffset = winrt::Point{
        std::max(0.0f, static_cast<float>(std::min(
            arrangeBounds.X + bringIntoView.OffsetX() - scrollableArea.X * bringIntoView.AlignmentX(),
            scrollViewer.ExtentWidth() - scrollViewer.ViewportWidth()))),
        std::max(0.0f, static_cast<float>(std::min(
            arrangeBounds.Y + bringIntoView.OffsetY() - scrollableArea.Y * bringIntoView.AlignmentY(),
            scrollViewer.ExtentHeight() - scrollViewer.ViewportHeight()))) };
    bringIntoView.ChangeViewOffset(changeViewOffset);

    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"ItemsRepeaterScrollHost scroll to absolute offset:", changeViewOffset.X, changeViewOffset.Y);
    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Animate:", bringIntoView.Animate());

    scrollViewer.ChangeView(
        box_value(static_cast<double>(changeViewOffset.X)).as<winrt::IReference<double>>(),
        box_value(static_cast<double>(changeViewOffset.Y)).as<winrt::IReference<double>>(),
        nullptr,
        !bringIntoView.Animate());

    m_pendingBringIntoView = std::move(bringIntoView);
}

winrt::Size ArrangeOverride ( winrt::Size const & finalSize )

Definition at line 60 of file ItemsRepeaterScrollHost.cpp.

{
    const winrt::Size result = finalSize;
    if (auto scrollViewer = ScrollViewer())
    {
        scrollViewer.Arrange({ 0, 0, finalSize.Width, finalSize.Height });
    }

    return result;
}

void ConfigurationChanged ( winrt::event_token const & token )

Definition at line 157 of file ItemsRepeaterScrollHost.cpp.

{
}

winrt::event_token ConfigurationChanged ( winrt::ConfigurationChangedEventHandler const & value )

Definition at line 151 of file ItemsRepeaterScrollHost.cpp.

{
    return {};
}

winrt::UIElement CurrentAnchor ( )

Definition at line 18 of file ItemsRepeaterScrollHost.cpp.

{
    return GetAnchorElement();
}

winrt::UIElement GetAnchorElement ( _Out_opt_ winrt::Rect * relativeBounds = nullptr ) [private]

Definition at line 339 of file ItemsRepeaterScrollHost.cpp.

{
    if (m_isAnchorElementDirty)
    {
        if (const auto scrollViewer = ScrollViewer())
        {
            // ScrollViewer.ChangeView is not synchronous, so we need to account for the pending ChangeView call
            // and make sure we are locked on the target viewport.
            const auto verticalOffset =
                HasPendingBringIntoView() && !m_pendingBringIntoView.Animate() ?
                m_pendingBringIntoView.ChangeViewOffset().Y :
                scrollViewer.VerticalOffset();
            const double viewportEdgeOffset = verticalOffset + HorizontalAnchorRatio() * scrollViewer.ViewportHeight() + m_pendingViewportShift;

            const CandidateInfo* bestCandidate{ nullptr };
            double bestCandidateDistance = std::numeric_limits<float>::max();

            for (auto& candidate : m_candidates)
            {
                const auto element = candidate.Element();

                if (!candidate.IsRelativeBoundsSet())
                {
                    const auto bounds = winrt::LayoutInformation::GetLayoutSlot(element.as<winrt::FrameworkElement>());
                    const auto transformer = element.TransformToVisual(scrollViewer.ContentTemplateRoot());
                    candidate.RelativeBounds(transformer.TransformBounds(winrt::Rect{
                        0.0f,
                        0.0f,
                        bounds.Width,
                        bounds.Height }));
                }

                const double elementEdgeOffset = candidate.RelativeBounds().Y + HorizontalAnchorRatio() * candidate.RelativeBounds().Height;
                const double candidateDistance = std::abs(elementEdgeOffset - viewportEdgeOffset);
                if (candidateDistance < bestCandidateDistance)
                {
                    bestCandidate = &candidate;
                    bestCandidateDistance = candidateDistance;
                }
            }

            if (bestCandidate)
            {
                m_anchorElement.set(bestCandidate->Element());
                m_anchorElementRelativeBounds = bestCandidate->RelativeBounds();
            }
            else
            {
                m_anchorElement.set(nullptr);
                m_anchorElementRelativeBounds = CandidateInfo::InvalidBounds;
            }
        }

        m_isAnchorElementDirty = false;
    }

    if (relativeBounds)
    {
        *relativeBounds = m_anchorElementRelativeBounds;
    }

    return m_anchorElement.get();
}

winrt::Rect GetRelativeViewport ( winrt::UIElement const & element )

Definition at line 200 of file ItemsRepeaterScrollHost.cpp.

{
    if (const auto scrollViewer = ScrollViewer())
    {
        const auto elem = element;
        const bool hasLockedViewport = HasPendingBringIntoView();
        const auto transformer = elem.TransformToVisual(hasLockedViewport ? scrollViewer.ContentTemplateRoot() : scrollViewer);
        const auto zoomFactor = static_cast<double>(scrollViewer.ZoomFactor());
        const double viewportWidth = scrollViewer.ViewportWidth() / zoomFactor;
        const double viewportHeight = scrollViewer.ViewportHeight() / zoomFactor;

        auto elementOffset = transformer.TransformPoint(winrt::Point{});

        elementOffset.X = -elementOffset.X;
        elementOffset.Y = -elementOffset.Y + static_cast<float>(m_pendingViewportShift);

        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"Pending shift:", m_pendingViewportShift);

        if (hasLockedViewport)
        {
            elementOffset.X += m_pendingBringIntoView.ChangeViewOffset().X;
            elementOffset.Y += m_pendingBringIntoView.ChangeViewOffset().Y;
        }

        return { elementOffset.X, elementOffset.Y, static_cast<float>(viewportWidth), static_cast<float>(viewportHeight) };
    }

    return {};
}

bool HasPendingBringIntoView ( ) const [inline, private]

Definition at line 86 of file ItemsRepeaterScrollHost.h.

{ return !!m_pendingBringIntoView.TargetElement(); }

void HorizontalAnchorRatio ( double value )

Definition at line 80 of file ItemsRepeaterScrollHost.cpp.

{
    m_horizontalEdge = value;
}

double HorizontalAnchorRatio ( )

Definition at line 75 of file ItemsRepeaterScrollHost.cpp.

{
    return m_horizontalEdge;
}

bool IsHorizontallyScrollable ( )

Definition at line 115 of file ItemsRepeaterScrollHost.cpp.

{
    return true;
}

bool IsVerticallyScrollable ( )

Definition at line 120 of file ItemsRepeaterScrollHost.cpp.

{
    return true;
}

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 48 of file ItemsRepeaterScrollHost.cpp.

{
    winrt::Size desiredSize = {};
    if (auto scrollViewer = ScrollViewer())
    {
        scrollViewer.Measure(availableSize);
        desiredSize = scrollViewer.DesiredSize();
    }

    return desiredSize;
}

void OnScrollViewerSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 430 of file ItemsRepeaterScrollHost.cpp.

{
    m_viewportChanged(*this, true /* isFinal */);
}

void OnScrollViewerViewChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::ScrollViewerViewChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 410 of file ItemsRepeaterScrollHost.cpp.

{
    const bool isFinal = !args.IsIntermediate();

    if (isFinal)
    {
        m_pendingViewportShift = 0.0;

        if (HasPendingBringIntoView() &&
            m_pendingBringIntoView.ChangeViewCalled() == true)
        {
            m_pendingBringIntoView.Reset();
        }
    }

    m_viewportChanged(*this, isFinal);
}

void OnScrollViewerViewChanging | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollViewerViewChangingEventArgs & | args |
 | ) |  |  | [private]

Definition at line 403 of file ItemsRepeaterScrollHost.cpp.

{
    m_viewportChanged(*this, false /* isFinal */);
}

void PostArrange ( winrt::event_token const & token )

Definition at line 146 of file ItemsRepeaterScrollHost.cpp.

{
    m_postArrange.remove(token);
}

winrt::event_token PostArrange ( winrt::PostArrangeEventHandler const & value )

Definition at line 141 of file ItemsRepeaterScrollHost.cpp.

{
    return m_postArrange.add(value);
}

void RegisterAnchorCandidate ( winrt::UIElement const & element )

Definition at line 162 of file ItemsRepeaterScrollHost.cpp.

{
    if (HorizontalAnchorRatio() != DoubleUtil::NaN || VerticalAnchorRatio() != DoubleUtil::NaN)
    {
        if (const auto scrollViewer = ScrollViewer())
        {

#ifdef DBG
            // We should not be registring the same element twice. Even through it is functionally ok,
            // we will end up spending more time during arrange than we must.
            // However checking if an element is already in the list every time a new element is registered is worse for perf.
            // So, I'm leaving an assert here to catch regression in our code but in release builds we run without the check.
            const auto elem = element;
            const auto it = std::find_if(m_candidates.cbegin(), m_candidates.cend(), [&elem](const CandidateInfo& c) { return c.Element() == elem; });
            if (it != m_candidates.cend())
            {
                MUX_ASSERT(false);
            }
#endif // DBG

            m_candidates.push_back(CandidateInfo(this /* owner */, element));
            m_isAnchorElementDirty = true;
        }
    }
}

winrt::FxScrollViewer ScrollViewer ( )

Definition at line 23 of file ItemsRepeaterScrollHost.cpp.

{
    winrt::FxScrollViewer value = nullptr;
    auto children = Children();
    if (children.Size() > 0)
    {
        value = children.GetAt(0).try_as<winrt::FxScrollViewer>();
    }

    return value;
}

void ScrollViewer ( winrt::FxScrollViewer const & value )

Definition at line 35 of file ItemsRepeaterScrollHost.cpp.

{
    m_scrollViewerViewChanging.revoke();
    m_scrollViewerViewChanged.revoke();
    m_scrollViewerSizeChanged.revoke();

    auto children = Children();
    children.Clear();
    children.Append(value);
}

void StartBringIntoView | ( | winrt::UIElement const & | element,
 |  | double | alignmentX,
 |  | double | alignmentY,
 |  | double | offsetX,
 |  | double | offsetY,
 |  | bool | animate
 | ) |  |

Definition at line 96 of file ItemsRepeaterScrollHost.cpp.

{

    m_pendingBringIntoView = {
        this /* owner */,
        element,
        alignmentX,
        alignmentY,
        offsetX,
        offsetY,
        !!animate };
}

double TrackElement | ( | const winrt::UIElement & | element,
 |  | winrt::Rect | previousBounds,
 |  | const winrt::FxScrollViewer & | scrollViewer |
 | ) |  |  | [private]

Definition at line 275 of file ItemsRepeaterScrollHost.cpp.

{
    const auto bounds = winrt::LayoutInformation::GetLayoutSlot(element.as<winrt::FrameworkElement>());
    const auto transformer = element.TransformToVisual(scrollViewer.ContentTemplateRoot());
    const auto newBounds = transformer.TransformBounds(winrt::Rect{
        0.0f,
        0.0f,
        bounds.Width,
        bounds.Height });

    const auto oldEdgeOffset = previousBounds.Y + HorizontalAnchorRatio() * previousBounds.Height;
    const auto newEdgeOffset = newBounds.Y + HorizontalAnchorRatio() * newBounds.Height;

    const auto unconstrainedPendingViewportShift = newEdgeOffset - oldEdgeOffset;
    auto pendingViewportShift = unconstrainedPendingViewportShift;

    // ScrollViewer.ChangeView is not synchronous, so we need to account for the pending ChangeView call
    // and make sure we are locked on the target viewport.
    const auto verticalOffset =
        HasPendingBringIntoView() && !m_pendingBringIntoView.Animate() ?
        m_pendingBringIntoView.ChangeViewOffset().Y :
        scrollViewer.VerticalOffset();

    // Constrain the viewport shift to the extent
    if (verticalOffset + pendingViewportShift < 0)
    {
        pendingViewportShift = -verticalOffset;
    }
    else if (verticalOffset + scrollViewer.ViewportHeight() + pendingViewportShift > scrollViewer.ExtentHeight())
    {
        pendingViewportShift = scrollViewer.ExtentHeight() - scrollViewer.ViewportHeight() - verticalOffset;
    }

    if (std::abs(pendingViewportShift) > 1)
    {
        // TODO: do we need to account for the zoom factor?
        // BUG:
        //  Unfortunately, if we have to correct while animating, we almost never
        //  update the ongoing animation correctly and we end up missing our target
        //  viewport. We should address that when building element tracking as part
        //  of the framework.
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"Viewport shift:", pendingViewportShift);
        scrollViewer.ChangeView(
            nullptr,
            box_value(verticalOffset + pendingViewportShift).as<winrt::IReference<double>>(),
            nullptr,
            true /* disableAnimation */);
    }
    else
    {
        pendingViewportShift = 0.0;

        // We can't shift the viewport to follow the tracked element. The viewport relative
        // to the tracked element will have changed. We need to raise ViewportChanged to make
        // sure the repeaters will get a second layout pass to fill any empty space they have.
        if (std::abs(unconstrainedPendingViewportShift) > 1)
        {
            m_viewportChanged(*this, true /* isFinal */);
        }
    }

    return pendingViewportShift;
}

void UnregisterAnchorCandidate ( winrt::UIElement const & element )

Definition at line 188 of file ItemsRepeaterScrollHost.cpp.

{
    const auto elem = element;
    const auto it = std::find_if(m_candidates.cbegin(), m_candidates.cend(), [&elem](const CandidateInfo& c) { return c.Element() == elem; });
    if (it != m_candidates.cend())
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Unregistered candidate:", it - m_candidates.begin());
        m_candidates.erase(it);
        m_isAnchorElementDirty = true;
    }
}

void VerticalAnchorRatio ( double value )

Definition at line 90 of file ItemsRepeaterScrollHost.cpp.

{
    m_verticalEdge = value;
}

double VerticalAnchorRatio ( )

Definition at line 85 of file ItemsRepeaterScrollHost.cpp.

{
    return m_verticalEdge;
}

void ViewportChanged ( winrt::event_token const & token )

Definition at line 136 of file ItemsRepeaterScrollHost.cpp.

{
    m_viewportChanged.remove(token);
}

winrt::event_token ViewportChanged ( winrt::ViewportChangedEventHandler const & value )

Definition at line 131 of file ItemsRepeaterScrollHost.cpp.

{
    return m_viewportChanged.add(value);
}

Member Data Documentation

std::vector<CandidateInfo> m_candidates [private]

Definition at line 158 of file ItemsRepeaterScrollHost.h.

The documentation for this class was generated from the following files:
  • Repeater/ItemsRepeaterScrollHost.h
  • Repeater/ItemsRepeaterScrollHost.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterScrollHost::BringIntoViewState Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ItemsRepeaterScrollHost
  • ItemsRepeaterScrollHost::BringIntoViewState
Public Member Functions | Private Attributes

ItemsRepeaterScrollHost::BringIntoViewState Struct Reference

List of all members.

Public Member Functions

BringIntoViewState (const ITrackerHandleManager *owner)
BringIntoViewState (const ITrackerHandleManager *owner, winrt::UIElement targetElement, double alignmentX, double alignmentY, double offsetX, double offsetY, bool animate)
double | AlignmentX () const
double | AlignmentY () const
bool | Animate () const
bool | ChangeViewCalled () const
void | ChangeViewCalled (bool value)
winrt::Point | ChangeViewOffset () const
void | ChangeViewOffset (winrt::Point value)
double | OffsetX () const
double | OffsetY () const
void | Reset ()
winrt::UIElement | TargetElement () const

Private Attributes

tracker_ref< winrt::UIElement > | m_targetElement

Detailed Description

Definition at line 107 of file ItemsRepeaterScrollHost.h.

Constructor & Destructor Documentation

BringIntoViewState ( const ITrackerHandleManager * owner ) [inline]

Definition at line 109 of file ItemsRepeaterScrollHost.h.

            : m_targetElement(owner)
        { }

BringIntoViewState | ( | const ITrackerHandleManager * | owner,
 |  | winrt::UIElement | targetElement,
 |  | double | alignmentX,
 |  | double | alignmentY,
 |  | double | offsetX,
 |  | double | offsetY,
 |  | bool | animate |
 | ) |  |  | [inline]

Definition at line 112 of file ItemsRepeaterScrollHost.h.

                          :
            m_targetElement(owner, targetElement),
            m_alignmentX(alignmentX),
            m_alignmentY(alignmentY),
            m_offsetX(offsetX),
            m_offsetY(offsetY),
            m_animate(animate)
        { }

Member Function Documentation

double AlignmentX ( ) const [inline]

Definition at line 129 of file ItemsRepeaterScrollHost.h.

{ return m_alignmentX; }

double AlignmentY ( ) const [inline]

Definition at line 130 of file ItemsRepeaterScrollHost.h.

{ return m_alignmentY; }

bool Animate ( ) const [inline]

Definition at line 133 of file ItemsRepeaterScrollHost.h.

{ return m_animate; }

void ChangeViewCalled ( bool value ) [inline]

Definition at line 135 of file ItemsRepeaterScrollHost.h.

{ m_changeViewCalled = value; }

bool ChangeViewCalled ( ) const [inline]

Definition at line 134 of file ItemsRepeaterScrollHost.h.

{ return m_changeViewCalled; }

winrt::Point ChangeViewOffset ( ) const [inline]

Definition at line 136 of file ItemsRepeaterScrollHost.h.

{ return m_changeViewOffset; }

void ChangeViewOffset ( winrt::Point value ) [inline]

Definition at line 137 of file ItemsRepeaterScrollHost.h.

{ m_changeViewOffset = value; }

double OffsetX ( ) const [inline]

Definition at line 131 of file ItemsRepeaterScrollHost.h.

{ return m_offsetX; }

double OffsetY ( ) const [inline]

Definition at line 132 of file ItemsRepeaterScrollHost.h.

{ return m_offsetY; }

void Reset ( ) [inline]

Definition at line 139 of file ItemsRepeaterScrollHost.h.

        {
            m_targetElement.set(nullptr);
            m_alignmentX = m_alignmentY = m_offsetX = m_offsetY = 0.0;
            m_animate = m_changeViewCalled = false;
            m_changeViewOffset = {};
        }

winrt::UIElement TargetElement ( ) const [inline]

Definition at line 128 of file ItemsRepeaterScrollHost.h.

{ return m_targetElement.get(); }

Member Data Documentation

tracker_ref<winrt::UIElement> m_targetElement [private]

Definition at line 148 of file ItemsRepeaterScrollHost.h.

The documentation for this struct was generated from the following file:
  • Repeater/ItemsRepeaterScrollHost.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterScrollHost::CandidateInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ItemsRepeaterScrollHost
  • ItemsRepeaterScrollHost::CandidateInfo
Public Member Functions | Private Attributes

ItemsRepeaterScrollHost::CandidateInfo Struct Reference

List of all members.

Public Member Functions

CandidateInfo (const ITrackerHandleManager *owner, winrt::UIElement element)
winrt::UIElement | Element () const
bool | IsRelativeBoundsSet () const
winrt::Rect | RelativeBounds () const
void | RelativeBounds (winrt::Rect bounds)

Private Attributes

tracker_ref< winrt::UIElement > | m_element

Detailed Description

Definition at line 88 of file ItemsRepeaterScrollHost.h.

Constructor & Destructor Documentation

CandidateInfo | ( | const ITrackerHandleManager * | owner,
 |  | winrt::UIElement | element |
 | ) |  |  | [inline]

Definition at line 90 of file ItemsRepeaterScrollHost.h.

                                    :
            m_element(owner, element)
        { }

Member Function Documentation

winrt::UIElement Element ( ) const [inline]

Definition at line 96 of file ItemsRepeaterScrollHost.h.

{ return m_element.get(); }

bool IsRelativeBoundsSet ( ) const [inline]

Definition at line 99 of file ItemsRepeaterScrollHost.h.

{ return m_relativeBounds != InvalidBounds; }

void RelativeBounds ( winrt::Rect bounds ) [inline]

Definition at line 98 of file ItemsRepeaterScrollHost.h.

{ m_relativeBounds = bounds; }

winrt::Rect RelativeBounds ( ) const [inline]

Definition at line 97 of file ItemsRepeaterScrollHost.h.

{ return m_relativeBounds; }

Member Data Documentation

tracker_ref<winrt::UIElement> m_element [private]

Definition at line 101 of file ItemsRepeaterScrollHost.h.

The documentation for this struct was generated from the following file:
  • Repeater/ItemsRepeaterScrollHost.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

ItemsRepeaterTrace Class Reference

#include "ItemsRepeaterTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file ItemsRepeaterTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file ItemsRepeaterTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ItemsRepeaterInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_ITEMSREPEATER),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ItemsRepeater") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 153 of file ItemsRepeaterTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "ItemsRepeaterPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_ITEMSREPEATER),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file ItemsRepeaterTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[1024]{};
        const HRESULT hr = StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args);
        if (SUCCEEDED(hr) || hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ItemsRepeaterVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_ITEMSREPEATER),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ItemsRepeater") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file ItemsRepeaterTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file ItemsRepeaterTrace.h.

The documentation for this class was generated from the following file:
  • Repeater/ItemsRepeaterTrace.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsSourceView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemsSourceView Class Reference

#include "ItemsSourceView.h"

Inherits ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing >.

List of all members.

Public Member Functions

winrt::event_token | CollectionChanged (winrt::NotifyCollectionChangedEventHandler const &value)
void | CollectionChanged (winrt::event_token const &token)
int32_t | Count ()
winrt::IInspectable | GetAt (int index)
virtual winrt::IInspectable | GetAtCore (int index)
virtual int32_t | GetSizeCore ()
bool | HasKeyIndexMapping ()
virtual bool | HasKeyIndexMappingCore ()
int | IndexFromKey (winrt::hstring const &id)
virtual int | IndexFromKeyCore (winrt::hstring const &id)
int | IndexOf (winrt::IInspectable const &value)
virtual int | IndexOfCore (winrt::IInspectable const &value)
winrt::hstring | KeyFromIndex (int index)
virtual winrt::hstring | KeyFromIndexCore (int index)
void | OnItemsSourceChanged (winrt::NotifyCollectionChangedEventArgs const &args)

Detailed Description

Definition at line 8 of file ItemsSourceView.h.

Member Function Documentation

winrt::event_token CollectionChanged ( winrt::NotifyCollectionChangedEventHandler const & value )

Definition at line 49 of file ItemsSourceView.cpp.

{
    return m_collectionChangedEventSource.add(value);
}

void CollectionChanged ( winrt::event_token const & token )

Definition at line 54 of file ItemsSourceView.cpp.

{
    m_collectionChangedEventSource.remove(token);
}

int32_t Count ( )

Definition at line 12 of file ItemsSourceView.cpp.

{
    if (m_cachedSize == -1)
    {
        // Call the override the very first time. After this,
        // we can just update the size when there is a data source change.
        m_cachedSize = GetSizeCore();
    }

    return m_cachedSize;
}

winrt::IInspectable GetAt ( int index )

Definition at line 24 of file ItemsSourceView.cpp.

{
    return GetAtCore(index);
}

winrt::IInspectable GetAtCore ( int index ) [virtual]

Definition at line 78 of file ItemsSourceView.cpp.

{
    throw winrt::hresult_not_implemented();
}

int32_t GetSizeCore ( ) [virtual]

Definition at line 73 of file ItemsSourceView.cpp.

{
    throw winrt::hresult_not_implemented();
}

bool HasKeyIndexMapping ( )

Definition at line 29 of file ItemsSourceView.cpp.

{
    return HasKeyIndexMappingCore();
}

bool HasKeyIndexMappingCore ( ) [virtual]

Definition at line 83 of file ItemsSourceView.cpp.

{
    throw winrt::hresult_not_implemented();
}

int IndexFromKey ( winrt::hstring const & id )

Definition at line 39 of file ItemsSourceView.cpp.

{
    return IndexFromKeyCore(id);
}

int IndexFromKeyCore ( winrt::hstring const & id ) [virtual]

Definition at line 93 of file ItemsSourceView.cpp.

{
    throw winrt::hresult_not_implemented();
}

int IndexOf ( winrt::IInspectable const & value )

Definition at line 44 of file ItemsSourceView.cpp.

{
    return IndexOfCore(value);
}

int IndexOfCore ( winrt::IInspectable const & value ) [virtual]

Definition at line 100 of file ItemsSourceView.cpp.

{
    throw winrt::hresult_not_implemented();
}

winrt::hstring KeyFromIndex ( int index )

Definition at line 34 of file ItemsSourceView.cpp.

{
    return KeyFromIndexCore(index);
}

winrt::hstring KeyFromIndexCore ( int index ) [virtual]

Definition at line 88 of file ItemsSourceView.cpp.

{
    throw winrt::hresult_not_implemented();
}

void OnItemsSourceChanged ( winrt::NotifyCollectionChangedEventArgs const & args )

Definition at line 63 of file ItemsSourceView.cpp.

{
    m_cachedSize = GetSizeCore();
    m_collectionChangedEventSource(*this, args);
}

The documentation for this class was generated from the following files:
  • Repeater/ItemsSourceView.h
  • Repeater/ItemsSourceView.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsSourceViewFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemsSourceViewFactory Class Reference

#include "ItemsSourceViewFactory.h"

List of all members.

Public Member Functions

winrt::IInspectable | ActivateInstance () const
winrt::ItemsSourceView | CreateInstance (winrt::IInspectable const &source, winrt::IInspectable const &baseInterface, winrt::IInspectable &innerInterface)
hstring | GetRuntimeClassName () const

Detailed Description

Definition at line 9 of file ItemsSourceViewFactory.h.

Member Function Documentation

winrt::IInspectable ActivateInstance ( ) const [inline]

Definition at line 19 of file ItemsSourceViewFactory.h.

    {
        throw winrt::hresult_not_implemented();
    }

winrt::ItemsSourceView CreateInstance | ( | winrt::IInspectable const & | source,
 |  | winrt::IInspectable const & | baseInterface,
 |  | winrt::IInspectable & | innerInterface |
 | ) |  |  | [inline]

Definition at line 25 of file ItemsSourceViewFactory.h.

    {
        assert(!baseInterface);
        assert(!innerInterface);
        auto result = winrt::make<InspectingDataSource>(source);
        innerInterface = result;
        return result;
    }

hstring GetRuntimeClassName ( ) const [inline]

Definition at line 14 of file ItemsSourceViewFactory.h.

    {
        return hstring{ winrt::name_of<winrt::ItemsSourceView>() };
    }

The documentation for this class was generated from the following file:
  • Repeater/ItemsSourceViewFactory.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsSourceViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

ItemsSourceViewProperties Class Reference

#include "ItemsSourceView.properties.h"

List of all members.

Public Member Functions

ItemsSourceViewProperties ()
void | CollectionChanged (winrt::event_token const &token)
winrt::event_token | CollectionChanged (winrt::NotifyCollectionChangedEventHandler const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Public Attributes

event_source
< winrt::NotifyCollectionChangedEventHandler > 		m_collectionChangedEventSource

Detailed Description

Definition at line 7 of file ItemsSourceView.properties.h.

Constructor & Destructor Documentation

ItemsSourceViewProperties ( )

Definition at line 17 of file ItemsSourceView.properties.cpp.

    : m_collectionChangedEventSource{static_cast<ItemsSourceView*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
void CollectionChanged ( winrt::event_token const & token )
winrt::event_token CollectionChanged ( winrt::NotifyCollectionChangedEventHandler const & value )
static void EnsureProperties ( ) [static]

Member Data Documentation

event_source<winrt::NotifyCollectionChangedEventHandler> m_collectionChangedEventSource

Definition at line 17 of file ItemsSourceView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ItemsSourceView.properties.h
  • Generated/ItemsSourceView.properties.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

ItemsView Class Reference

#include "ItemsView.h"

Inherits ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT >, and ItemsViewProperties.

List of all members.

Public Member Functions

ItemsView ()
~ItemsView ()
void | Deselect (int itemIndex)
void | DeselectAll ()
int | GetCurrentElementIndex () const
winrt::ItemsRepeater | GetItemsRepeaterPart () const
winrt::Point | GetKeyboardNavigationReferenceOffset () const
winrt::ScrollView | GetScrollViewPart () const
winrt::SelectionModel | GetSelectionModel () const
void | InvertSelection ()
bool | IsSelected (int itemIndex)
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnKeyDown (winrt::KeyRoutedEventArgs const &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
winrt::ScrollView | ScrollView () const
void | Select (int itemIndex)
void | SelectAll ()
winrt::IVectorView
< winrt::IInspectable > 		SelectedItems ()
void | StartBringItemIntoView (int32_t index, const winrt::BringIntoViewOptions &options)
bool | TryGetItemIndex (double horizontalViewportRatio, double verticalViewportRatio, int &index)

Private Member Functions

void | ApplySelectionModelSelectionChange ()
void | ApplyVerticalScrollController ()
bool | AreNavigationKeysOpposite (const winrt::VirtualKey &key1, const winrt::VirtualKey &key2) const
void | CacheOriginalVerticalScrollControllerAndVisibility ()
bool | CanRaiseItemInvoked (const winrt::ItemContainerInteractionTrigger &interactionTrigger, const winrt::ItemContainer &itemContainer)
bool | CanScrollVertically ()
void | ClearAllItemsViewItemContainerRevokers () noexcept
void | ClearItemsViewItemContainerRevokers (const winrt::ItemContainer &itemContainer)
void | CompleteStartBringItemIntoView ()
void | EnsureItemTemplate ()
int | GetAdjacentFocusableElementByDirection (const winrt::FocusNavigationDirection &focusNavigationDirection, bool hasIndexBasedLayoutOrientation)
int | GetAdjacentFocusableElementByIndex (bool getPreviousFocusableElement)
int | GetCornerFocusableItem (bool isForTopLeftItem)
void | GetDistanceToKeyboardNavigationReferenceOffset (const winrt::FocusNavigationDirection &focusNavigationDirection, const winrt::Rect &currentElementRect, const winrt::UIElement &element, const winrt::ItemsRepeater &itemsRepeater, float keyboardNavigationReferenceOffset, double roundingScaleFactor, float *navigationDirectionDistance, float *noneNavigationDirectionDistance) const
int | GetElementIndex (const winrt::UIElement &element) const
winrt::IndexPath | GetElementIndexPath (const winrt::UIElement &element, bool *isValid) const
winrt::IInspectable | GetElementItem (const winrt::UIElement &element, bool *valueReturned) const
winrt::Rect | GetElementRect (const winrt::UIElement &element, const winrt::ItemsRepeater &itemsRepeater) const
int | GetItemInternal (double horizontalViewportRatio, double verticalViewportRatio, bool isHorizontalDistanceFavored, bool isVerticalDistanceFavored, bool useKeyboardNavigationReferenceHorizontalOffset, bool useKeyboardNavigationReferenceVerticalOffset, bool capItemEdgesToViewportRatioEdges, bool forFocusableItemsOnly)
winrt::IndexBasedLayoutOrientation | GetLayoutIndexBasedLayoutOrientation ()
double | GetRoundingScaleFactor (const winrt::UIElement &xamlRootReference) const
int | GetTrailingNavigationKeyCount () const
winrt::Point | GetUpdatedKeyboardNavigationReferenceOffset ()
void | HookCompositionTargetRendering ()
void | HookItemsRepeaterEvents ()
void | HookItemsSourceViewEvents ()
void | HookScrollViewEvents ()
bool | IsCancelingNavigationKey (const winrt::VirtualKey &key, bool isRepeatKey)
bool | IsLayoutOrientationIndexBased (bool horizontal)
bool | IsNavigationKey (const winrt::VirtualKey &key) const
void | OnCompositionTargetRendering (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnCurrentElementSelectionModelSelectionChanged (const winrt::SelectionModel &selectionModel, const winrt::SelectionModelSelectionChangedEventArgs &args)
void | OnIsItemInvokedEnabledChanged ()
void | OnItemsRepeaterElementClearing (const winrt::ItemsRepeater &itemsRepeater, const winrt::ItemsRepeaterElementClearingEventArgs &args)
void | OnItemsRepeaterElementIndexChanged (const winrt::ItemsRepeater &itemsRepeater, const winrt::ItemsRepeaterElementIndexChangedEventArgs &args)
void | OnItemsRepeaterElementPrepared (const winrt::ItemsRepeater &itemsRepeater, const winrt::ItemsRepeaterElementPreparedEventArgs &args)
void | OnItemsRepeaterItemsSourceChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnItemsRepeaterLayoutUpdated (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnItemsRepeaterSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnItemsSourceChanged ()
void | OnItemsViewElementGettingFocus (const winrt::UIElement &element, const winrt::GettingFocusEventArgs &args)
void | OnItemsViewElementKeyDown (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | OnItemsViewItemContainerIsSelectedChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnItemsViewItemContainerItemInvoked (const winrt::ItemContainer &itemContainer, const winrt::ItemContainerInvokedEventArgs &args)
void | OnItemTemplateChanged ()
void | OnLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnScrollViewAnchorRequested (const winrt::ScrollView &scrollView, const winrt::ScrollingAnchorRequestedEventArgs &args)
void | OnScrollViewBringingIntoView (const winrt::ScrollView &scrollView, const winrt::ScrollingBringingIntoViewEventArgs &args)
void | OnScrollViewScrollCompleted (const winrt::ScrollView &scrollView, const winrt::ScrollingScrollCompletedEventArgs &args)
void | OnSelectionModeChanged ()
void | OnSelectionModelSelectionChanged (const winrt::SelectionModel &selectionModel, const winrt::SelectionModelSelectionChangedEventArgs &args)
void | OnSourceListChanged (const winrt::IInspectable &dataSource, const winrt::NotifyCollectionChangedEventArgs &args)
void | OnUnloaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnVerticalScrollControllerChanged ()
bool | ProcessInteraction (const winrt::UIElement &element, const winrt::FocusState &focusState)
bool | ProcessNavigationKeys ()
void | QueueNavigationKey (const winrt::VirtualKey &key)
void | RaiseItemInvoked (const winrt::UIElement &element)
void | RaiseSelectionChanged ()
void | RestoreOriginalVerticalScrollControllerAndVisibility ()
void | RevokeItemsViewItemContainerRevokers (const winrt::ItemContainer &itemContainer)
bool | SetCurrentElementIndex (int index, winrt::FocusState focusState, bool forceKeyboardNavigationReferenceReset, bool startBringIntoView=false, bool expectBringIntoView=false)
bool | SetFocusElementIndex (int index, winrt::FocusState focusState, bool startBringIntoView=false, bool expectBringIntoView=false)
void | SetItemsViewItemContainerRevokers (const winrt::ItemContainer &itemContainer)
void | SetVerticalScrollControllerOnLoaded ()
bool | StartBringItemIntoViewInternal (bool throwOutOfBounds, bool throwOnAnyFailure, int32_t index, const winrt::BringIntoViewOptions &options)
winrt::UIElement | TryGetElement (int index) const
void | UnhookCompositionTargetRendering ()
void | UnhookItemsRepeaterEvents (bool isForDestructor)
void | UnhookScrollViewEvents (bool isForDestructor)
void | UpdateItemsRepeater (const winrt::ItemsRepeater &itemsRepeater)
void | UpdateKeyboardNavigationReference ()
void | UpdateScrollView (const winrt::ScrollView &scrollView)
void | UpdateSelector ()
bool | ValidateItemIndex (bool throwIfInvalid, int index) const

Private Attributes

std::map< winrt::ItemContainer,
std::shared_ptr< PointerInfo
< ItemsView > > > 		m_itemContainersPointerInfos
std::set< winrt::ItemContainer > | m_itemContainersWithRevokers
std::list< winrt::VirtualKey > | m_navigationKeysToProcess
std::shared_ptr< SelectorBase > | m_selector

Detailed Description

Definition at line 12 of file ItemsView.h.

Constructor & Destructor Documentation

ItemsView ( )
~ItemsView ( )

Member Function Documentation

void ApplySelectionModelSelectionChange ( ) [private]
void ApplyVerticalScrollController ( ) [private]
bool AreNavigationKeysOpposite | ( | const winrt::VirtualKey & | key1,
 |  | const winrt::VirtualKey & | key2 |
 | ) |  |  | const [private]
void CacheOriginalVerticalScrollControllerAndVisibility ( ) [private]
bool CanRaiseItemInvoked | ( | const winrt::ItemContainerInteractionTrigger & | interactionTrigger,
 |  | const winrt::ItemContainer & | itemContainer |
 | ) |  |  | [private]
bool CanScrollVertically ( ) [private]
void ClearAllItemsViewItemContainerRevokers ( ) [private]
void ClearItemsViewItemContainerRevokers ( const winrt::ItemContainer & itemContainer ) [private]
void CompleteStartBringItemIntoView ( ) [private]
void Deselect ( int itemIndex )
void DeselectAll ( )
void EnsureItemTemplate ( ) [private]
int GetAdjacentFocusableElementByDirection | ( | const winrt::FocusNavigationDirection & | focusNavigationDirection,
 |  | bool | hasIndexBasedLayoutOrientation |
 | ) |  |  | [private]
int GetAdjacentFocusableElementByIndex ( bool getPreviousFocusableElement ) [private]
int GetCornerFocusableItem ( bool isForTopLeftItem ) [private]
int GetCurrentElementIndex ( ) const
void GetDistanceToKeyboardNavigationReferenceOffset | ( | const winrt::FocusNavigationDirection & | focusNavigationDirection,
 |  | const winrt::Rect & | currentElementRect,
 |  | const winrt::UIElement & | element,
 |  | const winrt::ItemsRepeater & | itemsRepeater,
 |  | float | keyboardNavigationReferenceOffset,
 |  | double | roundingScaleFactor,
 |  | float * | navigationDirectionDistance,
 |  | float * | noneNavigationDirectionDistance |
 | ) |  |  | const [private]
int GetElementIndex ( const winrt::UIElement & element ) const [private]
winrt::IndexPath GetElementIndexPath | ( | const winrt::UIElement & | element,
 |  | bool * | isValid |
 | ) |  |  | const [private]
winrt::IInspectable GetElementItem | ( | const winrt::UIElement & | element,
 |  | bool * | valueReturned |
 | ) |  |  | const [private]
winrt::Rect GetElementRect | ( | const winrt::UIElement & | element,
 |  | const winrt::ItemsRepeater & | itemsRepeater |
 | ) |  |  | const [private]
int GetItemInternal | ( | double | horizontalViewportRatio,
 |  | double | verticalViewportRatio,
 |  | bool | isHorizontalDistanceFavored,
 |  | bool | isVerticalDistanceFavored,
 |  | bool | useKeyboardNavigationReferenceHorizontalOffset,
 |  | bool | useKeyboardNavigationReferenceVerticalOffset,
 |  | bool | capItemEdgesToViewportRatioEdges,
 |  | bool | forFocusableItemsOnly |
 | ) |  |  | [private]
winrt::ItemsRepeater GetItemsRepeaterPart ( ) const
winrt::Point GetKeyboardNavigationReferenceOffset ( ) const
winrt::IndexBasedLayoutOrientation GetLayoutIndexBasedLayoutOrientation ( ) [private]
double GetRoundingScaleFactor ( const winrt::UIElement & xamlRootReference ) const [private]
winrt::ScrollView GetScrollViewPart ( ) const
winrt::SelectionModel GetSelectionModel ( ) const
int GetTrailingNavigationKeyCount ( ) const [private]
winrt::Point GetUpdatedKeyboardNavigationReferenceOffset ( ) [private]
void HookCompositionTargetRendering ( ) [private]
void HookItemsRepeaterEvents ( ) [private]
void HookItemsSourceViewEvents ( ) [private]
void HookScrollViewEvents ( ) [private]
void InvertSelection ( )
bool IsCancelingNavigationKey | ( | const winrt::VirtualKey & | key,
 |  | bool | isRepeatKey |
 | ) |  |  | [private]
bool IsLayoutOrientationIndexBased ( bool horizontal ) [private]
bool IsNavigationKey ( const winrt::VirtualKey & key ) const [private]
bool IsSelected ( int itemIndex )
void OnApplyTemplate ( )
void OnCompositionTargetRendering | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
winrt::AutomationPeer OnCreateAutomationPeer ( )
void OnCurrentElementSelectionModelSelectionChanged | ( | const winrt::SelectionModel & | selectionModel,
 |  | const winrt::SelectionModelSelectionChangedEventArgs & | args |
 | ) |  |  | [private]
void OnIsItemInvokedEnabledChanged ( ) [private]
void OnItemsRepeaterElementClearing | ( | const winrt::ItemsRepeater & | itemsRepeater,
 |  | const winrt::ItemsRepeaterElementClearingEventArgs & | args |
 | ) |  |  | [private]
void OnItemsRepeaterElementIndexChanged | ( | const winrt::ItemsRepeater & | itemsRepeater,
 |  | const winrt::ItemsRepeaterElementIndexChangedEventArgs & | args |
 | ) |  |  | [private]
void OnItemsRepeaterElementPrepared | ( | const winrt::ItemsRepeater & | itemsRepeater,
 |  | const winrt::ItemsRepeaterElementPreparedEventArgs & | args |
 | ) |  |  | [private]
void OnItemsRepeaterItemsSourceChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnItemsRepeaterLayoutUpdated | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnItemsRepeaterSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]
void OnItemsSourceChanged ( ) [private]
void OnItemsViewElementGettingFocus | ( | const winrt::UIElement & | element,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]
void OnItemsViewElementKeyDown | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnItemsViewItemContainerIsSelectedChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnItemsViewItemContainerItemInvoked | ( | const winrt::ItemContainer & | itemContainer,
 |  | const winrt::ItemContainerInvokedEventArgs & | args |
 | ) |  |  | [private]
void OnItemTemplateChanged ( ) [private]
void OnKeyDown ( winrt::KeyRoutedEventArgs const & args )
void OnLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnScrollViewAnchorRequested | ( | const winrt::ScrollView & | scrollView,
 |  | const winrt::ScrollingAnchorRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewBringingIntoView | ( | const winrt::ScrollView & | scrollView,
 |  | const winrt::ScrollingBringingIntoViewEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewScrollCompleted | ( | const winrt::ScrollView & | scrollView,
 |  | const winrt::ScrollingScrollCompletedEventArgs & | args |
 | ) |  |  | [private]
void OnSelectionModeChanged ( ) [private]
void OnSelectionModelSelectionChanged | ( | const winrt::SelectionModel & | selectionModel,
 |  | const winrt::SelectionModelSelectionChangedEventArgs & | args |
 | ) |  |  | [private]
void OnSourceListChanged | ( | const winrt::IInspectable & | dataSource,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args |
 | ) |  |  | [private]
void OnUnloaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnVerticalScrollControllerChanged ( ) [private]
bool ProcessInteraction | ( | const winrt::UIElement & | element,
 |  | const winrt::FocusState & | focusState |
 | ) |  |  | [private]
bool ProcessNavigationKeys ( ) [private]
void QueueNavigationKey ( const winrt::VirtualKey & key ) [private]
void RaiseItemInvoked ( const winrt::UIElement & element ) [private]
void RaiseSelectionChanged ( ) [private]
void RestoreOriginalVerticalScrollControllerAndVisibility ( ) [private]
void RevokeItemsViewItemContainerRevokers ( const winrt::ItemContainer & itemContainer ) [private]
winrt::ScrollView ScrollView ( ) const
void Select ( int itemIndex )
void SelectAll ( )
winrt::IVectorView<winrt::IInspectable> SelectedItems ( )
bool SetCurrentElementIndex | ( | int | index,
 |  | winrt::FocusState | focusState,
 |  | bool | forceKeyboardNavigationReferenceReset,
 |  | bool | startBringIntoView = false,
 |  | bool | expectBringIntoView = false |
 | ) |  |  | [private]
bool SetFocusElementIndex | ( | int | index,
 |  | winrt::FocusState | focusState,
 |  | bool | startBringIntoView = false,
 |  | bool | expectBringIntoView = false |
 | ) |  |  | [private]
void SetItemsViewItemContainerRevokers ( const winrt::ItemContainer & itemContainer ) [private]
void SetVerticalScrollControllerOnLoaded ( ) [private]
void StartBringItemIntoView | ( | int32_t | index,
 |  | const winrt::BringIntoViewOptions & | options
 | ) |  |
bool StartBringItemIntoViewInternal | ( | bool | throwOutOfBounds,
 |  | bool | throwOnAnyFailure,
 |  | int32_t | index,
 |  | const winrt::BringIntoViewOptions & | options |
 | ) |  |  | [private]
winrt::UIElement TryGetElement ( int index ) const [private]
bool TryGetItemIndex | ( | double | horizontalViewportRatio,
 |  | double | verticalViewportRatio,
 |  | int & | index
 | ) |  |
void UnhookCompositionTargetRendering ( ) [private]
void UnhookItemsRepeaterEvents ( bool isForDestructor ) [private]
void UnhookScrollViewEvents ( bool isForDestructor ) [private]
void UpdateItemsRepeater ( const winrt::ItemsRepeater & itemsRepeater ) [private]
void UpdateKeyboardNavigationReference ( ) [private]
void UpdateScrollView ( const winrt::ScrollView & scrollView ) [private]
void UpdateSelector ( ) [private]
bool ValidateItemIndex | ( | bool | throwIfInvalid,
 |  | int | index |
 | ) |  |  | const [private]

Member Data Documentation

std::map<winrt::ItemContainer, std::shared_ptr<PointerInfo<ItemsView> > > m_itemContainersPointerInfos [private]

Definition at line 403 of file ItemsView.h.

std::set<winrt::ItemContainer> m_itemContainersWithRevokers [private]

Definition at line 402 of file ItemsView.h.

std::list<winrt::VirtualKey> m_navigationKeysToProcess [private]

Definition at line 363 of file ItemsView.h.

std::shared_ptr<SelectorBase> m_selector [inline, private]

Definition at line 314 of file ItemsView.h.

The documentation for this class was generated from the following file:
  • ItemsView/ItemsView.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ItemsViewAutomationPeer Class Reference

#include "ItemsViewAutomationPeer.h"

Inherits ReferenceTracker< ItemsViewAutomationPeer, winrt::implementation::ItemsViewAutomationPeerT >.

List of all members.

Public Member Functions

ItemsViewAutomationPeer (winrt::ItemsView const &owner)
bool | CanSelectMultiple ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
winrt::com_array
< winrt::IRawElementProviderSimple > 		GetSelection ()
bool | IsSelectionRequired ()
void | RaiseSelectionChanged (double oldIndex, double newIndex)

Private Member Functions

com_ptr< ItemsView > | GetImpl ()

Detailed Description

Definition at line 9 of file ItemsViewAutomationPeer.h.

Constructor & Destructor Documentation

ItemsViewAutomationPeer ( winrt::ItemsView const & owner )

Definition at line 13 of file ItemsViewAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

bool CanSelectMultiple ( )

Definition at line 43 of file ItemsViewAutomationPeer.cpp.

{
    if (const auto itemsView = GetImpl())
    {
        const auto selectionMode = itemsView->SelectionMode();
        if (selectionMode == winrt::ItemsViewSelectionMode::Multiple ||
            selectionMode == winrt::ItemsViewSelectionMode::Extended)
        {
            return true;
        }
    }

    return false;
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 37 of file ItemsViewAutomationPeer.cpp.

{
    return winrt::AutomationControlType::List;
}

hstring GetClassNameCore ( )

Definition at line 32 of file ItemsViewAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::ItemsView>();
}

com_ptr< ItemsView > GetImpl ( ) [private]

Definition at line 109 of file ItemsViewAutomationPeer.cpp.

{
    com_ptr<ItemsView> impl = nullptr;

    if (const auto itemsView = Owner().try_as<winrt::ItemsView>())
    {
        impl = winrt::get_self<ItemsView>(itemsView)->get_strong();
    }

    return impl;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file ItemsViewAutomationPeer.cpp.

{
    if (const auto itemsView = Owner().try_as<winrt::ItemsView>())
    {
        if (patternInterface == winrt::PatternInterface::Selection && itemsView.SelectionMode() != winrt::ItemsViewSelectionMode::None)
        {
            return *this;
        }
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::com_array< winrt::IRawElementProviderSimple > GetSelection ( )

Definition at line 58 of file ItemsViewAutomationPeer.cpp.

{
    std::vector<winrt::IRawElementProviderSimple> selectionList;

    if (const auto itemsView = GetImpl())
    {
        if (const auto selectionModel = itemsView->GetSelectionModel())
        {
            if (const auto selectedIndices = selectionModel.SelectedIndices())
            {
                if (selectedIndices.Size() > 0)
                {
                    if (const auto repeater = ItemsViewTestHooks::GetItemsRepeaterPart(*itemsView))
                    {
                        for (const auto indexPath : selectedIndices)
                        {
                            // TODO: Update once ItemsView has grouping.
                            const auto index = indexPath.GetAt(0);

                            if (const auto itemElement = repeater.TryGetElement(index))
                            {
                                if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(itemElement))
                                {
                                    selectionList.push_back(ProviderFromPeer(peer));
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    return winrt::com_array(selectionList);
}

bool IsSelectionRequired ( ) [inline]

Definition at line 23 of file ItemsViewAutomationPeer.h.

{ return false; };

void RaiseSelectionChanged | ( | double | oldIndex,
 |  | double | newIndex
 | ) |  |

Definition at line 94 of file ItemsViewAutomationPeer.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::SelectionPatternOnInvalidated))
    {
        if (const auto itemsView = Owner().try_as<winrt::ItemsView>())
        {
            if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(itemsView))
            {
                peer.RaiseAutomationEvent(winrt::AutomationEvents::SelectionPatternOnInvalidated);
            }
        }

    }
}

The documentation for this class was generated from the following files:
  • ItemsView/ItemsViewAutomationPeer.h
  • ItemsView/ItemsViewAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewItemInvokedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemsViewItemInvokedEventArgs Class Reference

#include "ItemsViewItemInvokedEventArgs.h"

Inherits ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

ItemsViewItemInvokedEventArgs (const winrt::IInspectable &invokedItem)
~ItemsViewItemInvokedEventArgs ()
winrt::IInspectable InvokedItem ()

Detailed Description

Definition at line 8 of file ItemsViewItemInvokedEventArgs.h.

Constructor & Destructor Documentation

ItemsViewItemInvokedEventArgs ( const winrt::IInspectable & invokedItem )

Definition at line 9 of file ItemsViewItemInvokedEventArgs.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, invokedItem);

    m_invokedItem.set(invokedItem);
}

~ItemsViewItemInvokedEventArgs ( ) [inline]

Definition at line 14 of file ItemsViewItemInvokedEventArgs.h.

    {
        ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

winrt::IInspectable InvokedItem ( )

Definition at line 18 of file ItemsViewItemInvokedEventArgs.cpp.

{
    return m_invokedItem.get();
}

The documentation for this class was generated from the following files:
  • ItemsView/ItemsViewItemInvokedEventArgs.h
  • ItemsView/ItemsViewItemInvokedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ItemsViewProperties Class Reference

#include "ItemsView.properties.h"

Inherited by ItemsView.

List of all members.

Public Member Functions

ItemsViewProperties ()
void | CurrentItemIndex (int value)
int | CurrentItemIndex ()
void | IsItemInvokedEnabled (bool value)
bool | IsItemInvokedEnabled ()
void | ItemInvoked (winrt::event_token const &token)
winrt::event_token | ItemInvoked (winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs > const &value)
void | ItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | ItemsSource ()
void | ItemTemplate (winrt::IElementFactory const &value)
winrt::IElementFactory | ItemTemplate ()
void | ItemTransitionProvider (winrt::ItemCollectionTransitionProvider const &value)
winrt::ItemCollectionTransitionProvider | ItemTransitionProvider ()
void | Layout (winrt::Layout const &value)
winrt::Layout | Layout ()
winrt::ScrollView | ScrollView ()
void | ScrollView (winrt::ScrollView const &value)
winrt::IInspectable | SelectedItem ()
void | SelectedItem (winrt::IInspectable const &value)
void | SelectionChanged (winrt::event_token const &token)
winrt::event_token | SelectionChanged (winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs > const &value)
winrt::ItemsViewSelectionMode | SelectionMode ()
void | SelectionMode (winrt::ItemsViewSelectionMode const &value)
winrt::IScrollController | VerticalScrollController ()
void | VerticalScrollController (winrt::IScrollController const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | CurrentItemIndexProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsItemInvokedEnabledProperty ()
static winrt::DependencyProperty | ItemsSourceProperty ()
static winrt::DependencyProperty | ItemTemplateProperty ()
static winrt::DependencyProperty | ItemTransitionProviderProperty ()
static winrt::DependencyProperty | LayoutProperty ()
static void | OnCurrentItemIndexPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsItemInvokedEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemTransitionProviderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLayoutPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnScrollViewPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedItemPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectionModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollControllerPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | ScrollViewProperty ()
static winrt::DependencyProperty | SelectedItemProperty ()
static winrt::DependencyProperty | SelectionModeProperty ()
static winrt::DependencyProperty | VerticalScrollControllerProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ItemsView,
winrt::ItemsViewItemInvokedEventArgs > > 		m_itemInvokedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ItemsView,
winrt::ItemsViewSelectionChangedEventArgs > > 		m_selectionChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_CurrentItemIndexProperty
static GlobalDependencyProperty | s_IsItemInvokedEnabledProperty
static GlobalDependencyProperty | s_ItemsSourceProperty
static GlobalDependencyProperty | s_ItemTemplateProperty
static GlobalDependencyProperty | s_ItemTransitionProviderProperty
static GlobalDependencyProperty | s_LayoutProperty
static GlobalDependencyProperty | s_ScrollViewProperty
static GlobalDependencyProperty | s_SelectedItemProperty
static GlobalDependencyProperty | s_SelectionModeProperty
static GlobalDependencyProperty | s_VerticalScrollControllerProperty

Detailed Description

Definition at line 7 of file ItemsView.properties.h.

Constructor & Destructor Documentation

ItemsViewProperties ( )

Definition at line 27 of file ItemsView.properties.cpp.

    : m_itemInvokedEventSource{static_cast<ItemsView*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
void CurrentItemIndex ( int value )
int CurrentItemIndex ( )
static winrt::DependencyProperty CurrentItemIndexProperty ( ) [inline, static]

Definition at line 42 of file ItemsView.properties.h.

{ return s_CurrentItemIndexProperty; }

static void EnsureProperties ( ) [static]
bool IsItemInvokedEnabled ( )
void IsItemInvokedEnabled ( bool value )
static winrt::DependencyProperty IsItemInvokedEnabledProperty ( ) [inline, static]

Definition at line 43 of file ItemsView.properties.h.

{ return s_IsItemInvokedEnabledProperty; }

void ItemInvoked ( winrt::event_token const & token )
winrt::event_token ItemInvoked ( winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs > const & value )
void ItemsSource ( winrt::IInspectable const & value )
winrt::IInspectable ItemsSource ( )
static winrt::DependencyProperty ItemsSourceProperty ( ) [inline, static]

Definition at line 44 of file ItemsView.properties.h.

{ return s_ItemsSourceProperty; }

winrt::IElementFactory ItemTemplate ( )
void ItemTemplate ( winrt::IElementFactory const & value )
static winrt::DependencyProperty ItemTemplateProperty ( ) [inline, static]

Definition at line 45 of file ItemsView.properties.h.

{ return s_ItemTemplateProperty; }

void ItemTransitionProvider ( winrt::ItemCollectionTransitionProvider const & value )
winrt::ItemCollectionTransitionProvider ItemTransitionProvider ( )
static winrt::DependencyProperty ItemTransitionProviderProperty ( ) [inline, static]

Definition at line 46 of file ItemsView.properties.h.

{ return s_ItemTransitionProviderProperty; }

void Layout ( winrt::Layout const & value )
winrt::Layout Layout ( )
static winrt::DependencyProperty LayoutProperty ( ) [inline, static]

Definition at line 47 of file ItemsView.properties.h.

{ return s_LayoutProperty; }

static void OnCurrentItemIndexPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsItemInvokedEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemTransitionProviderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLayoutPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnScrollViewPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedItemPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectionModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollControllerPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void ScrollView ( winrt::ScrollView const & value )
winrt::ScrollView ScrollView ( )
static winrt::DependencyProperty ScrollViewProperty ( ) [inline, static]

Definition at line 48 of file ItemsView.properties.h.

{ return s_ScrollViewProperty; }

winrt::IInspectable SelectedItem ( )
void SelectedItem ( winrt::IInspectable const & value )
static winrt::DependencyProperty SelectedItemProperty ( ) [inline, static]

Definition at line 49 of file ItemsView.properties.h.

{ return s_SelectedItemProperty; }

void SelectionChanged ( winrt::event_token const & token )
winrt::event_token SelectionChanged ( winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs > const & value )
void SelectionMode ( winrt::ItemsViewSelectionMode const & value )
winrt::ItemsViewSelectionMode SelectionMode ( )
static winrt::DependencyProperty SelectionModeProperty ( ) [inline, static]

Definition at line 50 of file ItemsView.properties.h.

{ return s_SelectionModeProperty; }

winrt::IScrollController VerticalScrollController ( )
void VerticalScrollController ( winrt::IScrollController const & value )
static winrt::DependencyProperty VerticalScrollControllerProperty ( ) [inline, static]

Definition at line 51 of file ItemsView.properties.h.

{ return s_VerticalScrollControllerProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs> > m_itemInvokedEventSource

Definition at line 69 of file ItemsView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs> > m_selectionChangedEventSource

Definition at line 70 of file ItemsView.properties.h.

GlobalDependencyProperty s_CurrentItemIndexProperty [static]

Definition at line 53 of file ItemsView.properties.h.

GlobalDependencyProperty s_IsItemInvokedEnabledProperty [static]

Definition at line 54 of file ItemsView.properties.h.

GlobalDependencyProperty s_ItemsSourceProperty [static]

Definition at line 55 of file ItemsView.properties.h.

GlobalDependencyProperty s_ItemTemplateProperty [static]

Definition at line 56 of file ItemsView.properties.h.

GlobalDependencyProperty s_ItemTransitionProviderProperty [static]

Definition at line 57 of file ItemsView.properties.h.

GlobalDependencyProperty s_LayoutProperty [static]

Definition at line 58 of file ItemsView.properties.h.

GlobalDependencyProperty s_ScrollViewProperty [static]

Definition at line 59 of file ItemsView.properties.h.

GlobalDependencyProperty s_SelectedItemProperty [static]

Definition at line 60 of file ItemsView.properties.h.

GlobalDependencyProperty s_SelectionModeProperty [static]

Definition at line 61 of file ItemsView.properties.h.

GlobalDependencyProperty s_VerticalScrollControllerProperty [static]

Definition at line 62 of file ItemsView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ItemsView.properties.h
  • Generated/ItemsView.properties.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewSelectionChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewSelectionChangedEventArgs Class Reference

#include "ItemsViewSelectionChangedEventArgs.h"

Detailed Description

Definition at line 8 of file ItemsViewSelectionChangedEventArgs.h.

The documentation for this class was generated from the following file:
  • ItemsView/ItemsViewSelectionChangedEventArgs.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Attributes | Static Private Attributes

ItemsViewTestHooks Class Reference

#include "ItemsViewTestHooks.h"

List of all members.

Static Public Member Functions

static com_ptr
< ItemsViewTestHooks > 		EnsureGlobalTestHooks ()
static com_ptr
< ItemsViewTestHooks > 		GetGlobalTestHooks ()
static winrt::ItemsRepeater | GetItemsRepeaterPart (const winrt::ItemsView &itemsView)
static winrt::Point | GetKeyboardNavigationReferenceOffset (const winrt::ItemsView &itemsView)
static winrt::ScrollView | GetScrollViewPart (const winrt::ItemsView &itemsView)
static winrt::SelectionModel | GetSelectionModel (const winrt::ItemsView &itemsView)
static winrt::event_token | KeyboardNavigationReferenceOffsetChanged (winrt::TypedEventHandler< winrt::ItemsView, winrt::IInspectable > const &value)
static void | KeyboardNavigationReferenceOffsetChanged (winrt::event_token const &token)
static void | NotifyKeyboardNavigationReferenceOffsetChanged (const winrt::ItemsView &itemsView)

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::ItemsView,
winrt::IInspectable > > 		m_keyboardNavigationReferenceOffsetChangedEventSource

Static Private Attributes

static com_ptr
< ItemsViewTestHooks > 		s_testHooks

Detailed Description

Definition at line 9 of file ItemsViewTestHooks.h.

Member Function Documentation

static com_ptr<ItemsViewTestHooks> EnsureGlobalTestHooks ( ) [static]
static com_ptr<ItemsViewTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 13 of file ItemsViewTestHooks.h.

    {
        return s_testHooks;
    }

static winrt::ItemsRepeater GetItemsRepeaterPart ( const winrt::ItemsView & itemsView ) [static]
static winrt::Point GetKeyboardNavigationReferenceOffset ( const winrt::ItemsView & itemsView ) [static]
static winrt::ScrollView GetScrollViewPart ( const winrt::ItemsView & itemsView ) [static]
static winrt::SelectionModel GetSelectionModel ( const winrt::ItemsView & itemsView ) [static]
static winrt::event_token KeyboardNavigationReferenceOffsetChanged ( winrt::TypedEventHandler< winrt::ItemsView, winrt::IInspectable > const & value ) [static]
static void KeyboardNavigationReferenceOffsetChanged ( winrt::event_token const & token ) [static]
static void NotifyKeyboardNavigationReferenceOffsetChanged ( const winrt::ItemsView & itemsView ) [static]

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::ItemsView, winrt::IInspectable> > m_keyboardNavigationReferenceOffsetChangedEventSource [private]

Definition at line 31 of file ItemsViewTestHooks.h.

com_ptr<ItemsViewTestHooks> s_testHooks [static, private]

Definition at line 30 of file ItemsViewTestHooks.h.

The documentation for this class was generated from the following file:
  • ItemsView/ItemsViewTestHooks.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

ItemsViewTrace Class Reference

#include "ItemsViewTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file ItemsViewTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file ItemsViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ItemsViewInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_ITEMSVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ItemsView") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 152 of file ItemsViewTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "ItemsViewPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_ITEMSVIEW),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file ItemsViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ItemsViewVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_ITEMSVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ItemsView") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file ItemsViewTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file ItemsViewTrace.h.

The documentation for this class was generated from the following file:
  • ItemsView/ItemsViewTrace.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemTemplateWrapper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ItemTemplateWrapper Class Reference

#include "ItemTemplateWrapper.h"

List of all members.

Public Member Functions

ItemTemplateWrapper (winrt::DataTemplate const &dataTemplate)
ItemTemplateWrapper (winrt::DataTemplateSelector const &dataTemplateSelector)
winrt::UIElement | GetElement (winrt::ElementFactoryGetArgs const &args)
void | RecycleElement (winrt::ElementFactoryRecycleArgs const &args)
void | Template (winrt::DataTemplate const &value)
winrt::DataTemplate | Template ()
void | TemplateSelector (winrt::DataTemplateSelector const &value)
winrt::DataTemplateSelector | TemplateSelector ()

Detailed Description

Definition at line 8 of file ItemTemplateWrapper.h.

Constructor & Destructor Documentation

ItemTemplateWrapper ( winrt::DataTemplate const & dataTemplate )

Definition at line 9 of file ItemTemplateWrapper.cpp.

{
    m_dataTemplate = dataTemplate;
}

ItemTemplateWrapper ( winrt::DataTemplateSelector const & dataTemplateSelector )

Definition at line 14 of file ItemTemplateWrapper.cpp.

{
    m_dataTemplateSelector = dataTemplateSelector;
}

Member Function Documentation

winrt::UIElement GetElement ( winrt::ElementFactoryGetArgs const & args )

Definition at line 41 of file ItemTemplateWrapper.cpp.

{
    auto selectedTemplate = m_dataTemplate ? m_dataTemplate : m_dataTemplateSelector.SelectTemplate(args.Data());
    // Check if selected template we got is valid
    if (selectedTemplate == nullptr)
    {
        // Null template, use other SelectTemplate method
        try
        {
            selectedTemplate = m_dataTemplateSelector.SelectTemplate(args.Data(), nullptr);
        }
        catch (winrt::hresult_error e)
        {
            // The default implementation of SelectTemplate(IInspectable item, ILayout container) throws invalid arg for null container
            // To not force everbody to provide an implementation of that, catch that here
            if (e.code().value != E_INVALIDARG)
            {
                throw e;
            }
        }

        if (selectedTemplate == nullptr)
        {
            // Still nullptr, fail with a reasonable message now.
            throw winrt::hresult_invalid_argument(L"Null encountered as data template. That is not a valid value for a data template, and can not be used.");
        }
    }
    winrt::RecyclePool recyclePool = RecyclePool::GetPoolInstance(selectedTemplate);
    winrt::UIElement element = nullptr;

    if (recyclePool)
    {
        // try to get an element from the recycle pool.
        element = recyclePool.TryGetElement(L"" /* key */, args.Parent().as<winrt::FrameworkElement>());
    }

    if (!element)
    {
        // no element was found in recycle pool, create a new element
        element = selectedTemplate.LoadContent().as<winrt::FrameworkElement>();

        // Template returned null, so insert empty element to render nothing
        if (!element) {
            auto rectangle = winrt::Rectangle();
            rectangle.Width(0);
            rectangle.Height(0);
            element = rectangle;
        }

        // Associate template with element
        RecyclePool::SetOriginTemplate(element, selectedTemplate);
    }

    return element;
}

void RecycleElement ( winrt::ElementFactoryRecycleArgs const & args )

Definition at line 97 of file ItemTemplateWrapper.cpp.

{
    auto element = args.Element();
    winrt::DataTemplate selectedTemplate = m_dataTemplate?
        m_dataTemplate:
        RecyclePool::GetOriginTemplate(element);
    auto recyclePool = RecyclePool::GetPoolInstance(selectedTemplate);
    if (!recyclePool)
    {
        // No Recycle pool in the template, create one.
        recyclePool = winrt::make<RecyclePool>();
        RecyclePool::SetPoolInstance(selectedTemplate, recyclePool);
    }

    recyclePool.PutElement(args.Element(), L"" /* key */, args.Parent());
}

void Template ( winrt::DataTemplate const & value )

Definition at line 24 of file ItemTemplateWrapper.cpp.

{
    m_dataTemplate = value;
}

winrt::DataTemplate Template ( )

Definition at line 19 of file ItemTemplateWrapper.cpp.

{
    return m_dataTemplate;
}

winrt::DataTemplateSelector TemplateSelector ( )

Definition at line 29 of file ItemTemplateWrapper.cpp.

{
    return m_dataTemplateSelector;
}

void TemplateSelector ( winrt::DataTemplateSelector const & value )

Definition at line 34 of file ItemTemplateWrapper.cpp.

{
    m_dataTemplateSelector = value;
}

The documentation for this class was generated from the following files:
  • Repeater/ItemTemplateWrapper.h
  • Repeater/ItemTemplateWrapper.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ITrackerHandleManager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ITrackerHandleManager Class Reference

Inherited by ReferenceTracker< D, ImplT, I >, ReferenceTracker< AcrylicBrush, winrt::implementation::AcrylicBrushT >, ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable >, ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon >, ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource >, ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 >, ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT >, ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > >, ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< AnnotatedScrollBarLabel, winrt::implementation::AnnotatedScrollBarLabelT, winrt::composable, winrt::composing >, ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type >, ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT >, ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT >, ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT >, ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type >, ReferenceTracker< ButtonInteraction, winrt::implementation::ButtonInteractionT >, ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< ChildrenCollection< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >, ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type >, ReferenceTracker< ColorPicker, winrt::implementation::ColorPickerT >, ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT >, ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider >, ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT >, ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider >, ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout >, ReferenceTracker< CommandBarFlyout, winrt::implementation::CommandBarFlyoutT >, ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT >, ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT >, ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT >, ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT >, ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type >, ReferenceTracker< ElementFactoryRecycleArgsDownlevel, reference_tracker_implements_t< winrt::Microsoft::UI::Xaml::IElementFactoryRecycleArgs >::type >, ReferenceTracker< Expander, winrt::implementation::ExpanderT >, ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT >, ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout >, ReferenceTracker< FlowLayoutState, winrt::implementation::FlowLayoutStateT, winrt::composing >, ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > >, ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon >, ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource >, ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT >, ReferenceTracker< InfoBar, winrt::implementation::InfoBarT >, ReferenceTracker< InfoBarAutomationPeer, winrt::implementation::InfoBarAutomationPeerT >, ReferenceTracker< InfoBarClosingEventArgs, winrt::implementation::InfoBarClosingEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT >, ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT >, ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT >, ReferenceTracker< InkToolBar, winrt::implementation::InkToolBarT >, ReferenceTracker< InkToolBarAutomationPeer, winrt::implementation::InkToolBarAutomationPeerT >, ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT >, ReferenceTracker< InkToolBarEraserButtonInternal, winrt::implementation::InkToolBarEraserButtonInternalTundefined >, ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT >, ReferenceTracker< InkToolBarFlyoutItem, winrt::implementation::InkToolBarFlyoutItemT >, ReferenceTracker< InkToolBarFlyoutItemAutomationPeer, winrt::implementation::InkToolBarFlyoutItemAutomationPeerT >, ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT >, ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable >, ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT >, ReferenceTracker< InkToolBarPenConfigurationControl, winrt::implementation::InkToolBarPenConfigurationControlT >, ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable >, ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable >, ReferenceTracker< InkToolBarToolButtonAutomationPeer, winrt::implementation::InkToolBarToolButtonAutomationPeerT >, ReferenceTracker< ItemCollectionTransition, winrt::implementation::ItemCollectionTransitionT, winrt::composing, winrt::composable >, ReferenceTracker< ItemCollectionTransitionCompletedEventArgs, winrt::implementation::ItemCollectionTransitionCompletedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable >, ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable >, ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT >, ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT >, ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< ItemsRepeater, DeriveFromPanelHelper_base, winrt::ItemsRepeater, winrt::IItemsRepeater2 >, ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< ItemsRepeaterElementIndexChangedEventArgs, winrt::implementation::ItemsRepeaterElementIndexChangedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > >, ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing >, ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT >, ReferenceTracker< ItemsViewAutomationPeer, winrt::implementation::ItemsViewAutomationPeerT >, ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type >, ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type >, ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type >, ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT >, ReferenceTracker< LinedFlowLayout, winrt::implementation::LinedFlowLayoutT, VirtualizingLayout >, ReferenceTracker< LinedFlowLayoutItemsInfoRequestedEventArgs, winrt::implementation::LinedFlowLayoutItemsInfoRequestedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< MapControl, winrt::implementation::MapControlT >, ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer >, ReferenceTracker< MapIcon, winrt::implementation::MapIconT, MapElement >, ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable >, ReferenceTracker< MenuBar, winrt::implementation::MenuBarT >, ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT >, ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT >, ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT >, ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT >, ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT >, ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT >, ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT >, ReferenceTracker< NavigationViewAutomationPeer, winrt::implementation::NavigationViewAutomationPeerT, winrt::ISelectionProvider >, ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider >, ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable >, ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< NavigationViewItemExpandingEventArgs, winrt::implementation::NavigationViewItemExpandingEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< NavigationViewItemPresenter, winrt::implementation::NavigationViewItemPresenterT >, ReferenceTracker< NavigationViewPaneClosingEventArgs, winrt::implementation::NavigationViewPaneClosingEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT >, ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider >, ReferenceTracker< PagerControl, winrt::implementation::PagerControlT >, ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider >, ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView >, ReferenceTracker< PersonPicture, winrt::implementation::PersonPictureT >, ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT >, ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT >, ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider >, ReferenceTracker< ProgressBar, winrt::implementation::ProgressBarT >, ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider >, ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT >, ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT >, ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT >, ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT >, ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT >, ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem >, ReferenceTracker< RatingControl, winrt::implementation::RatingControlT >, ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider >, ReferenceTracker< RatingItemInfo, winrt::implementation::RatingItemInfoT >, ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing >, ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory >, ReferenceTracker< RefreshContainer, winrt::implementation::RefreshContainerT, winrt::IRefreshContainerPrivate >, ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner >, ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate >, ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT >, ReferenceTracker< RevealBackgroundBrush, winrt::implementation::RevealBackgroundBrushT, RevealBrush >, ReferenceTracker< RevealBorderBrush, winrt::implementation::RevealBorderBrushT, RevealBrush >, ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT >, ReferenceTracker< RevealBrushTestApi, winrt::implementation::RevealBrushTestApiT, winrt::composable >, ReferenceTracker< RevealHoverLight, winrt::implementation::RevealHoverLightT >, ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT >, ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable >, ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface >, ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider >, ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT >, ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing >, ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type >, ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >, ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType >, ReferenceTracker< SelectedTreeNodeVector, reference_tracker_implements_t< SelectedTreeNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >, ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing >, ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT >, ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< SliderInteraction, winrt::implementation::SliderInteractionT >, ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing >, ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable >, ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT >, ReferenceTracker< SplitButtonAutomationPeer, winrt::implementation::SplitButtonAutomationPeerT >, ReferenceTracker< StackLayout, winrt::implementation::StackLayoutT, VirtualizingLayout >, ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing >, ReferenceTracker< SwipeControl, winrt::implementation::SwipeControlT >, ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT >, ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > >, ReferenceTracker< TabView, winrt::implementation::TabViewT >, ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider >, ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT >, ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider >, ReferenceTracker< TabViewListView, winrt::implementation::TabViewListViewT >, ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT >, ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider >, ReferenceTracker< TeachingTipClosingEventArgs, winrt::implementation::TeachingTipClosingEventArgsT, winrt::composable, winrt::composing >, ReferenceTracker< TitleBar, winrt::implementation::TitleBarT >, ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT >, ReferenceTracker< ToggleSplitButtonAutomationPeer, winrt::implementation::ToggleSplitButtonAutomationPeerT >, ReferenceTracker< TreeView, winrt::implementation::TreeViewT >, ReferenceTracker< TreeViewCollapsedEventArgs, winrt::implementation::TreeViewCollapsedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT >, ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider >, ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT >, ReferenceTracker< TreeViewItemInvokedEventArgs, winrt::implementation::TreeViewItemInvokedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT >, ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider >, ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable >, ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >, ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >, ReferenceTracker< TwoPaneView, winrt::implementation::TwoPaneViewT >, ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout >, ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing >, ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > >, ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >, ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >, ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type >, ReferenceTracker< ViewModel, reference_tracker_implements_t< ViewModelVectorOptions::VectorType >::type, ViewModelVectorOptions::IterableType, ViewModelVectorOptions::ObservableVectorType >, ReferenceTracker< WebView2, DeriveFromPanelHelper_base, winrt::WebView2, winrt::IWebView22, IHwndComponentHost >, ReferenceTracker< WebView2AutomationPeer, winrt::implementation::WebView2AutomationPeerT, IAutomationPeerHwndInterop >, ReferenceTracker< XamlAmbientLight, winrt::implementation::XamlAmbientLightT >, and ReferenceTracker< XamlControlsResources, winrt::implementation::XamlControlsResourcesT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IUnknownAccessor< T, Enable > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

IUnknownAccessor< T, Enable > Struct Template Reference

#include "tracker_ref.h"

List of all members.

Static Public Member Functions

static com_ptr< IUnknown > const & get (T const &value)

Detailed Description

template<typename T, typename Enable = void>
struct IUnknownAccessor< T, Enable >

Definition at line 94 of file tracker_ref.h.

Member Function Documentation

static com_ptr<IUnknown> const& get ( T const & value ) [inline, static]

Definition at line 98 of file tracker_ref.h.

    {
        // This is known to be an IUnknown already, so reinterpret it
        return reinterpret_cast<com_ptr<IUnknown> const&>(value);
    }

The documentation for this struct was generated from the following file:
  • inc/tracker_ref.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IUnknownAccessor< com_ptr< T > > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

IUnknownAccessor< com_ptr< T > > Struct Template Reference

#include "tracker_ref.h"

List of all members.

Static Public Member Functions

static com_ptr< IUnknown > get (com_ptr< T > const &value)

Detailed Description

template<typename T>
struct IUnknownAccessor< com_ptr< T > >

Definition at line 106 of file tracker_ref.h.

Member Function Documentation

static com_ptr<IUnknown> get ( com_ptr< T > const & value ) [inline, static]

Definition at line 108 of file tracker_ref.h.

    {
        // com_ptr<T> is not necessarily an IUnknown so QI for it.
        if (value)
        {
            return value.as<IUnknown>();
        }

        return nullptr;
    }

The documentation for this struct was generated from the following file:
  • inc/tracker_ref.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IVectorOwner< EventSource, T > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

IVectorOwner< EventSource, T > Struct Template Reference

#include "Vector.h"

List of all members.

Public Member Functions

virtual ITrackerHandleManager * | GetExternalTrackerHandleManager ()=0
virtual winrt::IInspectable | GetVectorEventSender ()=0
virtual EventSource * | GetVectorEventSource ()=0

Public Attributes

virtual std::function< bool(T
const &value, uint32_t &index)> 		GetCustomIndexOfFunction ()

Detailed Description

template<typename EventSource, typename T>
struct IVectorOwner< EventSource, T >

Definition at line 146 of file Vector.h.

Member Function Documentation

virtual ITrackerHandleManager* GetExternalTrackerHandleManager ( ) [pure virtual]
virtual winrt::IInspectable GetVectorEventSender ( ) [pure virtual]
virtual EventSource* GetVectorEventSource ( ) [pure virtual]

Member Data Documentation

virtual std::function<bool(T const& value, uint32_t& index)> GetCustomIndexOfFunction() [inline]

Definition at line 151 of file Vector.h.

{ return nullptr; };

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Layout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

Layout Class Reference

#include "Layout.h"

List of all members.

Public Member Functions

winrt::Size | Arrange (winrt::LayoutContext const &context, winrt::Size const &finalSize)
winrt::event_token | ArrangeInvalidated (winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const &value)
void | ArrangeInvalidated (winrt::event_token const &token)
virtual
winrt::ItemCollectionTransitionProvider 		CreateDefaultItemTransitionProvider ()
winrt::IndexBasedLayoutOrientation | GetForcedIndexBasedLayoutOrientation ()
winrt::IndexBasedLayoutOrientation | IndexBasedLayoutOrientation ()
void | InitializeForContext (winrt::LayoutContext const &context)
void | InvalidateArrange ()
void | InvalidateMeasure ()
void | LayoutId (winrt::hstring const &state)
winrt::hstring | LayoutId ()
winrt::Size | Measure (winrt::LayoutContext const &context, winrt::Size const &availableSize)
winrt::event_token | MeasureInvalidated (winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const &value)
void | MeasureInvalidated (winrt::event_token const &token)
void | ResetForcedIndexBasedLayoutOrientation ()
void | SetForcedIndexBasedLayoutOrientation (winrt::IndexBasedLayoutOrientation forcedIndexBasedLayoutOrientation)
void | SetIndexBasedLayoutOrientation (winrt::IndexBasedLayoutOrientation orientation)
void | UninitializeForContext (winrt::LayoutContext const &context)

Private Attributes

winrt::hstring | m_layoutId

Detailed Description

Definition at line 9 of file Layout.h.

Member Function Documentation

winrt::Size Arrange | ( | winrt::LayoutContext const & | context,
 |  | winrt::Size const & | finalSize
 | ) |  |

Definition at line 144 of file Layout.cpp.

{
    auto spThis = get_strong();
    if (auto virtualizingLayout = spThis.try_as<winrt::IVirtualizingLayoutOverrides>())
    {
        auto virtualizingContext = GetVirtualizingLayoutContext(context);
        return virtualizingLayout.ArrangeOverride(virtualizingContext, finalSize);
    }
    else if (auto nonVirtualizingLayout = spThis.try_as<winrt::INonVirtualizingLayoutOverrides>())
    {
        auto nonVirtualizingContext = GetNonVirtualizingLayoutContext(context);
        return nonVirtualizingLayout.ArrangeOverride(nonVirtualizingContext, finalSize);
    }
    else
    {
        throw winrt::hresult_not_implemented();
    }
}

winrt::event_token ArrangeInvalidated ( winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const & value )

Definition at line 175 of file Layout.cpp.

{
    return m_arrangeInvalidatedEventSource.add(value);
}

void ArrangeInvalidated ( winrt::event_token const & token )

Definition at line 180 of file Layout.cpp.

{
    m_arrangeInvalidatedEventSource.remove(token);
}

virtual winrt::ItemCollectionTransitionProvider CreateDefaultItemTransitionProvider ( ) [inline, virtual]

Definition at line 36 of file Layout.h.

{ return nullptr; }

winrt::IndexBasedLayoutOrientation GetForcedIndexBasedLayoutOrientation ( )

Definition at line 24 of file Layout.cpp.

{
    return m_forcedIndexBasedLayoutOrientationDbg;
}

winrt::IndexBasedLayoutOrientation IndexBasedLayoutOrientation ( )

Definition at line 41 of file Layout.cpp.

{
    return m_isForcedIndexBasedLayoutOrientationSetDbg ? m_forcedIndexBasedLayoutOrientationDbg : m_indexBasedLayoutOrientation;
}

void InitializeForContext ( winrt::LayoutContext const & context )

Definition at line 84 of file Layout.cpp.

{
    auto spThis = get_strong();
    if (auto virtualizingLayout = spThis.try_as<winrt::IVirtualizingLayoutOverrides>())
    {
        auto virtualizingContext = GetVirtualizingLayoutContext(context);
        return virtualizingLayout.InitializeForContextCore(virtualizingContext);
    }
    else if (auto nonVirtualizingLayout = get_strong().try_as<winrt::INonVirtualizingLayoutOverrides>())
    {
        auto nonVirtualizingContext = GetNonVirtualizingLayoutContext(context);
        return nonVirtualizingLayout.InitializeForContextCore(nonVirtualizingContext);
    }
    else
    {
        throw winrt::hresult_not_implemented();
    }
}

void InvalidateArrange ( )

Definition at line 194 of file Layout.cpp.

{
    m_arrangeInvalidatedEventSource(*this, nullptr);
}

void InvalidateMeasure ( )

Definition at line 189 of file Layout.cpp.

{
    m_measureInvalidatedEventSource(*this, nullptr);
}

void LayoutId ( winrt::hstring const & state )

Definition at line 18 of file Layout.cpp.

{
    m_layoutId = value;
}

winrt::hstring LayoutId ( )

Definition at line 13 of file Layout.cpp.

{
    return m_layoutId;
}

winrt::Size Measure | ( | winrt::LayoutContext const & | context,
 |  | winrt::Size const & | availableSize
 | ) |  |

Definition at line 122 of file Layout.cpp.

{
    auto spThis = get_strong();
    if (auto virtualizingLayout = spThis.try_as<winrt::IVirtualizingLayoutOverrides>())
    {
        auto virtualizingContext = GetVirtualizingLayoutContext(context);
        return virtualizingLayout.MeasureOverride(virtualizingContext, availableSize);
    }
    else if (auto nonVirtualizingLayout = spThis.try_as<winrt::INonVirtualizingLayoutOverrides>())
    {
        auto nonVirtualizingContext = GetNonVirtualizingLayoutContext(context);
        return nonVirtualizingLayout.MeasureOverride(nonVirtualizingContext, availableSize);
    }
    else
    {
        throw winrt::hresult_not_implemented();
    }
}

winrt::event_token MeasureInvalidated ( winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const & value )

Definition at line 165 of file Layout.cpp.

{
    return m_measureInvalidatedEventSource.add(value);
}

void MeasureInvalidated ( winrt::event_token const & token )

Definition at line 170 of file Layout.cpp.

{
    m_measureInvalidatedEventSource.remove(token);
}

void ResetForcedIndexBasedLayoutOrientation ( )

Definition at line 35 of file Layout.cpp.

{
    m_forcedIndexBasedLayoutOrientationDbg = winrt::IndexBasedLayoutOrientation::None;
    m_isForcedIndexBasedLayoutOrientationSetDbg = false;
}

void SetForcedIndexBasedLayoutOrientation ( winrt::IndexBasedLayoutOrientation forcedIndexBasedLayoutOrientation )

Definition at line 29 of file Layout.cpp.

{
    m_forcedIndexBasedLayoutOrientationDbg = forcedIndexBasedLayoutOrientation;
    m_isForcedIndexBasedLayoutOrientationSetDbg = true;
}

void SetIndexBasedLayoutOrientation ( winrt::IndexBasedLayoutOrientation orientation )

Definition at line 199 of file Layout.cpp.

{
    m_indexBasedLayoutOrientation = orientation;
}

void UninitializeForContext ( winrt::LayoutContext const & context )

Definition at line 103 of file Layout.cpp.

{
    auto spThis = get_strong();
    if (auto virtualizingLayout = spThis.try_as<winrt::IVirtualizingLayoutOverrides>())
    {
        auto virtualizingContext = GetVirtualizingLayoutContext(context);
        return virtualizingLayout.UninitializeForContextCore(virtualizingContext);
    }
    else if (auto nonVirtualizingLayout = spThis.try_as<winrt::INonVirtualizingLayoutOverrides>())
    {
        auto nonVirtualizingContext = GetNonVirtualizingLayoutContext(context);
        return nonVirtualizingLayout.UninitializeForContextCore(nonVirtualizingContext);
    }
    else
    {
        throw winrt::hresult_not_implemented();
    }
}

Member Data Documentation

winrt::hstring m_layoutId [private]

Definition at line 46 of file Layout.h.

The documentation for this class was generated from the following files:
  • Repeater/Layout.h
  • Repeater/Layout.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutContext Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

LayoutContext Class Reference

#include "LayoutContext.h"

List of all members.

Public Member Functions

int | Indent ()
void | LayoutState (winrt::IInspectable const &value)
winrt::IInspectable | LayoutState ()
virtual winrt::IInspectable | LayoutStateCore ()
virtual void | LayoutStateCore (winrt::IInspectable const &state)

Detailed Description

Definition at line 8 of file LayoutContext.h.

Member Function Documentation

int Indent ( ) [inline]

Definition at line 36 of file LayoutContext.h.

    {
        return 0;
    }

void LayoutState ( winrt::IInspectable const & value )

Definition at line 16 of file LayoutContext.cpp.

{
    overridable().LayoutStateCore(value);
}

winrt::IInspectable LayoutState ( )

Definition at line 11 of file LayoutContext.cpp.

{
    return overridable().LayoutStateCore();
}

winrt::IInspectable LayoutStateCore ( ) [virtual]

Definition at line 25 of file LayoutContext.cpp.

{
    throw winrt::hresult_not_implemented();
}

void LayoutStateCore ( winrt::IInspectable const & state ) [virtual]

Definition at line 30 of file LayoutContext.cpp.

{
    throw winrt::hresult_not_implemented();
}

The documentation for this class was generated from the following files:
  • Repeater/LayoutContext.h
  • Repeater/LayoutContext.cpp
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutContextAdapter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

LayoutContextAdapter Class Reference

#include "LayoutContextAdapter.h"

List of all members.

Public Member Functions

LayoutContextAdapter (winrt::NonVirtualizingLayoutContext const &nonVirtualizingContext)
int32_t | GetElementIndexCore (winrt::UIElement const &element)
winrt::IInspectable | GetItemAtCore (int index)
winrt::UIElement | GetOrCreateElementAtCore (int index, winrt::ElementRealizationOptions const &options)
int32_t | ItemCountCore ()
void | LayoutOriginCore (winrt::Point const &value)
winrt::Point | LayoutOriginCore ()
winrt::IInspectable | LayoutStateCore ()
void | LayoutStateCore (winrt::IInspectable const &state)
winrt::Rect | RealizationRectCore ()
int32_t | RecommendedAnchorIndexCore ()
void | RecycleElementCore (winrt::UIElement const &element)
winrt::Rect | VisibleRectCore ()

Detailed Description

Definition at line 10 of file LayoutContextAdapter.h.

Constructor & Destructor Documentation

LayoutContextAdapter ( winrt::NonVirtualizingLayoutContext const & nonVirtualizingContext )

Definition at line 10 of file LayoutContextAdapter.cpp.

{
    m_nonVirtualizingContext = winrt::make_weak(nonVirtualizingContext);
}

Member Function Documentation

int32_t GetElementIndexCore ( winrt::UIElement const & element )

Definition at line 70 of file LayoutContextAdapter.cpp.

{
    if (auto context = m_nonVirtualizingContext.get())
    {
        auto children = context.Children();
        for (unsigned int i = 0; i < children.Size(); i++)
        {
            if (children.GetAt(i) == element)
            {
                return i;
            }
        }
    }

    return -1;
}

winrt::IInspectable GetItemAtCore ( int index )

Definition at line 47 of file LayoutContextAdapter.cpp.

{
    if (auto context = m_nonVirtualizingContext.get())
    {
        return context.Children().GetAt(index);
    }
    return nullptr;
}

winrt::UIElement GetOrCreateElementAtCore | ( | int | index,
 |  | winrt::ElementRealizationOptions const & | options
 | ) |  |

Definition at line 56 of file LayoutContextAdapter.cpp.

{
    if (auto context = m_nonVirtualizingContext.get())
    {
        return context.Children().GetAt(index);
    }
    return nullptr;
}

int32_t ItemCountCore ( )

Definition at line 38 of file LayoutContextAdapter.cpp.

{
    if (auto context = m_nonVirtualizingContext.get())
    {
        return context.Children().Size();
    }
    return 0;
}

winrt::Point LayoutOriginCore ( )

Definition at line 102 of file LayoutContextAdapter.cpp.

{
    return winrt::Point(0, 0);
}

void LayoutOriginCore ( winrt::Point const & value )

Definition at line 107 of file LayoutContextAdapter.cpp.

{
    if (value != winrt::Point(0, 0))
    {
        throw winrt::hresult_invalid_argument(L"LayoutOrigin must be at (0,0) when RealizationRect is infinite sized.");
    }
}

void LayoutStateCore ( winrt::IInspectable const & state )

Definition at line 26 of file LayoutContextAdapter.cpp.

{
    if (auto context = m_nonVirtualizingContext.get())
    {
        context.LayoutStateCore(state);
    }
}

winrt::IInspectable LayoutStateCore ( )

Definition at line 17 of file LayoutContextAdapter.cpp.

{
    if (auto context = m_nonVirtualizingContext.get())
    {
        return context.LayoutState();
    }
    return nullptr;
}

winrt::Rect RealizationRectCore ( )

Definition at line 92 of file LayoutContextAdapter.cpp.

{
    return winrt::Rect{ 0, 0, std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() };
}

int RecommendedAnchorIndexCore ( )

Definition at line 97 of file LayoutContextAdapter.cpp.

{
    return -1;
}

void RecycleElementCore ( winrt::UIElement const & element )

Definition at line 65 of file LayoutContextAdapter.cpp.

{

}

winrt::Rect VisibleRectCore ( )

Definition at line 87 of file LayoutContextAdapter.cpp.

{
    return winrt::Rect{ 0, 0, std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() };
}

The documentation for this class was generated from the following files:
  • Repeater/LayoutContextAdapter.h
  • Repeater/LayoutContextAdapter.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

LayoutPanel Class Reference

#include "LayoutPanel.h"

Inherits ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT >, and LayoutPanelProperties.

List of all members.

Public Member Functions

winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
void | LayoutState (winrt::IInspectable const &value)
winrt::IInspectable | LayoutState ()
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)

Private Member Functions

void | InvalidateArrangeForLayout (winrt::Layout const &sender, winrt::IInspectable const &args)
void | InvalidateMeasureForLayout (winrt::Layout const &sender, winrt::IInspectable const &args)
void | OnLayoutChanged (winrt::Layout const &oldValue, winrt::Layout const &newValue)

Detailed Description

Definition at line 8 of file LayoutPanel.h.

Member Function Documentation

winrt::Size ArrangeOverride ( winrt::Size const & finalSize )

Definition at line 91 of file LayoutPanel.cpp.

{
    winrt::Size result = finalSize;

    const auto padding = Padding();
    const auto borderThickness = BorderThickness();

    const auto effectiveHorizontalPadding = static_cast<float>(padding.Left + padding.Right + borderThickness.Left + borderThickness.Right);
    const auto effectiveVerticalPadding = static_cast<float>(padding.Top + padding.Bottom + borderThickness.Top + borderThickness.Bottom);
    const auto leftAdjustment = static_cast<float>(padding.Left + borderThickness.Left);
    const auto topAdjustment = static_cast<float>(padding.Top + borderThickness.Top);

    auto adjustedSize = finalSize;
    adjustedSize.Width -= effectiveHorizontalPadding;
    adjustedSize.Height -= effectiveVerticalPadding;

    adjustedSize.Width = std::max(0.0f, adjustedSize.Width);
    adjustedSize.Height = std::max(0.0f, adjustedSize.Height);

    if (auto layout = Layout())
    {
        auto layoutSize = layout.Arrange(m_layoutContext, adjustedSize);
        layoutSize.Width += effectiveHorizontalPadding;
        layoutSize.Height += effectiveVerticalPadding;

        // We need to reposition the child elements if we have top or left padding:
        if (leftAdjustment != 0 || topAdjustment != 0)
        {
            for (winrt::UIElement const& child: Children())
            {
                if (auto childAsFe = child.try_as<winrt::FrameworkElement>())
                {
                    auto layoutSlot = winrt::LayoutInformation::GetLayoutSlot(childAsFe);
                    layoutSlot.X += leftAdjustment;
                    layoutSlot.Y += topAdjustment;
                    childAsFe.Arrange(layoutSlot);
                }
            }
        }

        result = layoutSize;
    }
    else
    {
        const winrt::Rect arrangeRect = { leftAdjustment, topAdjustment, adjustedSize.Width, adjustedSize.Height };
        for (winrt::UIElement const& child : Children())
        {
            child.Arrange(arrangeRect);
        }
    }

    return result;
}

void InvalidateArrangeForLayout | ( | winrt::Layout const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]

Definition at line 176 of file LayoutPanel.cpp.

{
    InvalidateArrange();
}

void InvalidateMeasureForLayout | ( | winrt::Layout const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]

Definition at line 171 of file LayoutPanel.cpp.

{
    InvalidateMeasure();
}

winrt::IInspectable LayoutState ( ) [inline]

Definition at line 14 of file LayoutPanel.h.

{ return m_layoutState.get(); }

void LayoutState ( winrt::IInspectable const & value ) [inline]

Definition at line 15 of file LayoutPanel.h.

{ m_layoutState.set(value); }

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 50 of file LayoutPanel.cpp.

{
    winrt::Size desiredSize{};

    // We adjust availableSize based on our Padding and BorderThickness:
    const auto padding = Padding();
    const auto borderThickness = BorderThickness();
    const auto effectiveHorizontalPadding = static_cast<float>(padding.Left + padding.Right + borderThickness.Left + borderThickness.Right);
    const auto effectiveVerticalPadding = static_cast<float>(padding.Top + padding.Bottom + borderThickness.Top + borderThickness.Bottom);

    auto adjustedSize = availableSize;
    adjustedSize.Width -= effectiveHorizontalPadding;
    adjustedSize.Height -= effectiveVerticalPadding;

    adjustedSize.Width = std::max(0.0f, adjustedSize.Width);
    adjustedSize.Height = std::max(0.0f, adjustedSize.Height);

    if (auto layout = Layout())
    {
        auto layoutDesiredSize = layout.Measure(m_layoutContext, adjustedSize);
        layoutDesiredSize.Width += effectiveHorizontalPadding;
        layoutDesiredSize.Height += effectiveVerticalPadding;
        desiredSize = layoutDesiredSize;
    }
    else
    {
        winrt::Size desiredSizeUnpadded{};
        for (winrt::UIElement const& child : Children())
        {
            child.Measure(adjustedSize);
            const auto childDesiredSize = child.DesiredSize();
            desiredSizeUnpadded.Width = std::max(desiredSizeUnpadded.Width, childDesiredSize.Width);
            desiredSizeUnpadded.Height = std::max(desiredSizeUnpadded.Height, childDesiredSize.Height);
        }
        desiredSize = desiredSizeUnpadded;
        desiredSize.Width += effectiveHorizontalPadding;
        desiredSize.Height += effectiveVerticalPadding;
    }
    return desiredSize;
}

void OnLayoutChanged | ( | winrt::Layout const & | oldValue,
 |  | winrt::Layout const & | newValue |
 | ) |  |  | [private]

Definition at line 145 of file LayoutPanel.cpp.

{
    if (!m_layoutContext)
    {
        m_layoutContext = winrt::make<LayoutPanelLayoutContext>(*this);
    }

    if (oldValue)
    {
        oldValue.UninitializeForContext(m_layoutContext);
        m_measureInvalidated.revoke();
        m_arrangeInvalidated.revoke();
    }

    m_layout.set(newValue);

    if (newValue)
    {
        newValue.InitializeForContext(m_layoutContext);
        m_measureInvalidated = newValue.MeasureInvalidated(winrt::auto_revoke, { this, &LayoutPanel::InvalidateMeasureForLayout });
        m_arrangeInvalidated = newValue.ArrangeInvalidated(winrt::auto_revoke, { this, &LayoutPanel::InvalidateArrangeForLayout });
    }

    InvalidateMeasure();
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 11 of file LayoutPanel.cpp.

{
    const winrt::IDependencyProperty dependencyProperty = args.Property();

    if (dependencyProperty == s_LayoutProperty)
    {
        m_layout.set(args.NewValue().as<winrt::Layout>());
        OnLayoutChanged(args.OldValue().as<winrt::Layout>(), m_layout.get());
    }
#ifdef USE_INTERNAL_SDK
    else if (dependencyProperty == s_borderBrushProperty)
    {
        if (auto panelProtected = try_as<winrt::Microsoft::UI::Xaml::Controls::IPanelProtectedFeature_WUXCPreviewTypes>())
        {
            panelProtected.BorderBrushProtected(safe_cast<winrt::Brush>(args.NewValue()));
        }
    }
    else if (dependencyProperty == s_borderThicknessProperty)
    {
        if (auto panelProtected = try_as<winrt::Microsoft::UI::Xaml::Controls::IPanelProtectedFeature_WUXCPreviewTypes>())
        {
            panelProtected.BorderThicknessProtected(unbox_value<winrt::Thickness>(args.NewValue()));
        }
    }
    else if (dependencyProperty == s_cornerRadiusProperty)
    {
        if (auto panelProtected = try_as<winrt::Microsoft::UI::Xaml::Controls::IPanelProtectedFeature_WUXCPreviewTypes>())
        {
            panelProtected.CornerRadiusProtected(unbox_value<winrt::CornerRadius>(args.NewValue()));
        }
    }
#endif
    else if (dependencyProperty == s_PaddingProperty)
    {
        InvalidateMeasure();
    }
}

The documentation for this class was generated from the following files:
  • LayoutPanel/LayoutPanel.h
  • LayoutPanel/LayoutPanel.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanelLayoutContext Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

LayoutPanelLayoutContext Class Reference

#include "LayoutPanelLayoutContext.h"

List of all members.

Public Member Functions

LayoutPanelLayoutContext (winrt::LayoutPanel const &owner)
winrt::IVectorView
< winrt::UIElement > 		ChildrenCore ()
winrt::IInspectable | LayoutStateCore ()
void | LayoutStateCore (winrt::IInspectable const &state)

Private Member Functions

winrt::LayoutPanel | GetOwner ()

Private Attributes

winrt::weak_ref
< winrt::LayoutPanel > 		m_owner

Detailed Description

Definition at line 7 of file LayoutPanelLayoutContext.h.

Constructor & Destructor Documentation

LayoutPanelLayoutContext ( winrt::LayoutPanel const & owner )

Definition at line 9 of file LayoutPanelLayoutContext.cpp.

{
    m_owner = winrt::make_weak(owner);
}

Member Function Documentation

winrt::IVectorView< winrt::UIElement > ChildrenCore ( )

Definition at line 14 of file LayoutPanelLayoutContext.cpp.

{
    return winrt::get_self<LayoutPanel>(GetOwner())->Children().GetView();
}

winrt::LayoutPanel GetOwner ( ) [private]

Definition at line 29 of file LayoutPanelLayoutContext.cpp.

{
    return m_owner.get();
}

void LayoutStateCore ( winrt::IInspectable const & state )

Definition at line 24 of file LayoutPanelLayoutContext.cpp.

{
    winrt::get_self<LayoutPanel>(GetOwner())->LayoutState(value);
}

winrt::IInspectable LayoutStateCore ( )

Definition at line 19 of file LayoutPanelLayoutContext.cpp.

{
    return winrt::get_self<LayoutPanel>(GetOwner())->LayoutState();
}

Member Data Documentation

winrt::weak_ref<winrt::LayoutPanel> m_owner [private]

Definition at line 28 of file LayoutPanelLayoutContext.h.

The documentation for this class was generated from the following files:
  • LayoutPanel/LayoutPanelLayoutContext.h
  • LayoutPanel/LayoutPanelLayoutContext.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanelProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

LayoutPanelProperties Class Reference

#include "LayoutPanel.properties.h"

Inherited by LayoutPanel.

List of all members.

Public Member Functions

LayoutPanelProperties ()
void | BorderBrush (winrt::Brush const &value)
winrt::Brush | BorderBrush ()
void | BorderThickness (winrt::Thickness const &value)
winrt::Thickness | BorderThickness ()
winrt::CornerRadius | CornerRadius ()
void | CornerRadius (winrt::CornerRadius const &value)
winrt::Layout | Layout ()
void | Layout (winrt::Layout const &value)
void | Padding (winrt::Thickness const &value)
winrt::Thickness | Padding ()

Static Public Member Functions

static winrt::DependencyProperty | BorderBrushProperty ()
static winrt::DependencyProperty | BorderThicknessProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | CornerRadiusProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | LayoutProperty ()
static void | OnBorderBrushPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnBorderThicknessPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCornerRadiusPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLayoutPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPaddingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PaddingProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_BorderBrushProperty
static GlobalDependencyProperty | s_BorderThicknessProperty
static GlobalDependencyProperty | s_CornerRadiusProperty
static GlobalDependencyProperty | s_LayoutProperty
static GlobalDependencyProperty | s_PaddingProperty

Detailed Description

Definition at line 7 of file LayoutPanel.properties.h.

Constructor & Destructor Documentation

LayoutPanelProperties ( )

Definition at line 22 of file LayoutPanel.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void BorderBrush ( winrt::Brush const & value )

Definition at line 135 of file LayoutPanel.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<LayoutPanel*>(this)->SetValue(s_BorderBrushProperty, ValueHelper<winrt::Brush>::BoxValueIfNecessary(value));
    }
}

winrt::Brush BorderBrush ( )

Definition at line 143 of file LayoutPanel.properties.cpp.

{
    return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<LayoutPanel*>(this)->GetValue(s_BorderBrushProperty));
}

static winrt::DependencyProperty BorderBrushProperty ( ) [inline, static]

Definition at line 27 of file LayoutPanel.properties.h.

{ return s_BorderBrushProperty; }

winrt::Thickness BorderThickness ( )

Definition at line 156 of file LayoutPanel.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<LayoutPanel*>(this)->GetValue(s_BorderThicknessProperty));
}

void BorderThickness ( winrt::Thickness const & value )

Definition at line 148 of file LayoutPanel.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<LayoutPanel*>(this)->SetValue(s_BorderThicknessProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty BorderThicknessProperty ( ) [inline, static]

Definition at line 28 of file LayoutPanel.properties.h.

{ return s_BorderThicknessProperty; }

void ClearProperties ( ) [static]

Definition at line 86 of file LayoutPanel.properties.cpp.

{
    s_BorderBrushProperty = nullptr;
    s_BorderThicknessProperty = nullptr;
    s_CornerRadiusProperty = nullptr;
    s_LayoutProperty = nullptr;
    s_PaddingProperty = nullptr;
}

void CornerRadius ( winrt::CornerRadius const & value )

Definition at line 161 of file LayoutPanel.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<LayoutPanel*>(this)->SetValue(s_CornerRadiusProperty, ValueHelper<winrt::CornerRadius>::BoxValueIfNecessary(value));
    }
}

winrt::CornerRadius CornerRadius ( )

Definition at line 169 of file LayoutPanel.properties.cpp.

{
    return ValueHelper<winrt::CornerRadius>::CastOrUnbox(static_cast<LayoutPanel*>(this)->GetValue(s_CornerRadiusProperty));
}

static winrt::DependencyProperty CornerRadiusProperty ( ) [inline, static]

Definition at line 29 of file LayoutPanel.properties.h.

{ return s_CornerRadiusProperty; }

void EnsureProperties ( ) [static]

Definition at line 27 of file LayoutPanel.properties.cpp.

{
    if (!s_BorderBrushProperty)
    {
        s_BorderBrushProperty =
            InitializeDependencyProperty(
                L"BorderBrush",
                winrt::name_of<winrt::Brush>(),
                winrt::name_of<winrt::LayoutPanel>(),
                false /* isAttached */,
                ValueHelper<winrt::Brush>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnBorderBrushPropertyChanged));
    }
    if (!s_BorderThicknessProperty)
    {
        s_BorderThicknessProperty =
            InitializeDependencyProperty(
                L"BorderThickness",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::LayoutPanel>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnBorderThicknessPropertyChanged));
    }
    if (!s_CornerRadiusProperty)
    {
        s_CornerRadiusProperty =
            InitializeDependencyProperty(
                L"CornerRadius",
                winrt::name_of<winrt::CornerRadius>(),
                winrt::name_of<winrt::LayoutPanel>(),
                false /* isAttached */,
                ValueHelper<winrt::CornerRadius>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnCornerRadiusPropertyChanged));
    }
    if (!s_LayoutProperty)
    {
        s_LayoutProperty =
            InitializeDependencyProperty(
                L"Layout",
                winrt::name_of<winrt::Layout>(),
                winrt::name_of<winrt::LayoutPanel>(),
                false /* isAttached */,
                ValueHelper<winrt::Layout>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnLayoutPropertyChanged));
    }
    if (!s_PaddingProperty)
    {
        s_PaddingProperty =
            InitializeDependencyProperty(
                L"Padding",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::LayoutPanel>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnPaddingPropertyChanged));
    }
}

winrt::Layout Layout ( )

Definition at line 182 of file LayoutPanel.properties.cpp.

{
    return ValueHelper<winrt::Layout>::CastOrUnbox(static_cast<LayoutPanel*>(this)->GetValue(s_LayoutProperty));
}

void Layout ( winrt::Layout const & value )

Definition at line 174 of file LayoutPanel.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<LayoutPanel*>(this)->SetValue(s_LayoutProperty, ValueHelper<winrt::Layout>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty LayoutProperty ( ) [inline, static]

Definition at line 30 of file LayoutPanel.properties.h.

{ return s_LayoutProperty; }

void OnBorderBrushPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 95 of file LayoutPanel.properties.cpp.

{
    auto owner = sender.as<winrt::LayoutPanel>();
    winrt::get_self<LayoutPanel>(owner)->OnPropertyChanged(args);
}

void OnBorderThicknessPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 103 of file LayoutPanel.properties.cpp.

{
    auto owner = sender.as<winrt::LayoutPanel>();
    winrt::get_self<LayoutPanel>(owner)->OnPropertyChanged(args);
}

void OnCornerRadiusPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 111 of file LayoutPanel.properties.cpp.

{
    auto owner = sender.as<winrt::LayoutPanel>();
    winrt::get_self<LayoutPanel>(owner)->OnPropertyChanged(args);
}

void OnLayoutPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 119 of file LayoutPanel.properties.cpp.

{
    auto owner = sender.as<winrt::LayoutPanel>();
    winrt::get_self<LayoutPanel>(owner)->OnPropertyChanged(args);
}

void OnPaddingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 127 of file LayoutPanel.properties.cpp.

{
    auto owner = sender.as<winrt::LayoutPanel>();
    winrt::get_self<LayoutPanel>(owner)->OnPropertyChanged(args);
}

winrt::Thickness Padding ( )

Definition at line 195 of file LayoutPanel.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<LayoutPanel*>(this)->GetValue(s_PaddingProperty));
}

void Padding ( winrt::Thickness const & value )

Definition at line 187 of file LayoutPanel.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<LayoutPanel*>(this)->SetValue(s_PaddingProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty PaddingProperty ( ) [inline, static]

Definition at line 31 of file LayoutPanel.properties.h.

{ return s_PaddingProperty; }

Member Data Documentation

GlobalDependencyProperty s_BorderBrushProperty [static]

Definition at line 33 of file LayoutPanel.properties.h.

GlobalDependencyProperty s_BorderThicknessProperty [static]

Definition at line 34 of file LayoutPanel.properties.h.

GlobalDependencyProperty s_CornerRadiusProperty [static]

Definition at line 35 of file LayoutPanel.properties.h.

GlobalDependencyProperty s_LayoutProperty [static]

Definition at line 36 of file LayoutPanel.properties.h.

GlobalDependencyProperty s_PaddingProperty [static]

Definition at line 37 of file LayoutPanel.properties.h.

The documentation for this class was generated from the following files:
  • Generated/LayoutPanel.properties.h
  • Generated/LayoutPanel.properties.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

LayoutProperties Class Reference

#include "Layout.properties.h"

List of all members.

Public Member Functions

LayoutProperties ()
winrt::event_token | ArrangeInvalidated (winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const &value)
void | ArrangeInvalidated (winrt::event_token const &token)
winrt::event_token | MeasureInvalidated (winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const &value)
void | MeasureInvalidated (winrt::event_token const &token)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::Layout,
winrt::IInspectable > > 		m_arrangeInvalidatedEventSource
event_source
< winrt::TypedEventHandler
< winrt::Layout,
winrt::IInspectable > > 		m_measureInvalidatedEventSource

Detailed Description

Definition at line 7 of file Layout.properties.h.

Constructor & Destructor Documentation

LayoutProperties ( )

Definition at line 17 of file Layout.properties.cpp.

    : m_arrangeInvalidatedEventSource{static_cast<Layout*>(this)}

Member Function Documentation

winrt::event_token ArrangeInvalidated ( winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const & value )
void ArrangeInvalidated ( winrt::event_token const & token )
static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::event_token MeasureInvalidated ( winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const & value )
void MeasureInvalidated ( winrt::event_token const & token )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::Layout, winrt::IInspectable> > m_arrangeInvalidatedEventSource

Definition at line 19 of file Layout.properties.h.

event_source<winrt::TypedEventHandler<winrt::Layout, winrt::IInspectable> > m_measureInvalidatedEventSource

Definition at line 20 of file Layout.properties.h.

The documentation for this class was generated from the following files:
  • Generated/Layout.properties.h
  • Generated/Layout.properties.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutsTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

LayoutsTestHooks Class Reference

#include "LayoutsTestHooks.h"

List of all members.

Static Public Member Functions

static void | ClearLinedFlowLayoutItemAspectRatios (winrt::IInspectable const &linedFlowLayout)
static com_ptr< LayoutsTestHooks > | GetGlobalTestHooks ()
static int | GetLayoutFirstRealizedItemIndex (winrt::IInspectable const &layout)
static
winrt::IndexBasedLayoutOrientation 		GetLayoutForcedIndexBasedLayoutOrientation (winrt::IInspectable const &layout)
static int | GetLayoutLastRealizedItemIndex (winrt::IInspectable const &layout)
static double | GetLinedFlowLayoutAverageItemAspectRatio (winrt::IInspectable const &linedFlowLayout)
static int | GetLinedFlowLayoutFirstFrozenItemIndex (winrt::IInspectable const &linedFlowLayout)
static double | GetLinedFlowLayoutForcedAverageItemAspectRatio (winrt::IInspectable const &linedFlowLayout)
static double | GetLinedFlowLayoutForcedAverageItemsPerLineDivider (winrt::IInspectable const &linedFlowLayout)
static double | GetLinedFlowLayoutForcedWrapMultiplier (winrt::IInspectable const &linedFlowLayout)
static bool | GetLinedFlowLayoutIsFastPathSupported (winrt::IInspectable const &linedFlowLayout)
static int | GetLinedFlowLayoutLastFrozenItemIndex (winrt::IInspectable const &linedFlowLayout)
static int | GetLinedFlowLayoutLineIndex (winrt::IInspectable const &linedFlowLayout, int itemIndex)
static int | GetLinedFlowLayoutLogItemIndex (winrt::IInspectable const &linedFlowLayout)
static double | GetLinedFlowLayoutRawAverageItemsPerLine (winrt::IInspectable const &linedFlowLayout)
static double | GetLinedFlowLayoutSnappedAverageItemsPerLine (winrt::IInspectable const &linedFlowLayout)
static void | LayoutInvalidateMeasure (winrt::IInspectable const &layout, bool relayout)
static void | LinedFlowLayoutInvalidated (winrt::event_token const &token)
static winrt::event_token | LinedFlowLayoutInvalidated (winrt::TypedEventHandler< winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs > const &value)
static winrt::event_token | LinedFlowLayoutItemLocked (winrt::TypedEventHandler< winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs > const &value)
static void | LinedFlowLayoutItemLocked (winrt::event_token const &token)
static winrt::event_token | LinedFlowLayoutSnappedAverageItemsPerLineChanged (winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value)
static void | LinedFlowLayoutSnappedAverageItemsPerLineChanged (winrt::event_token const &token)
static void | NotifyLinedFlowLayoutInvalidated (winrt::IInspectable const &linedFlowLayout, winrt::LinedFlowLayoutInvalidationTrigger const &invalidationTrigger)
static void | NotifyLinedFlowLayoutItemLocked (winrt::IInspectable const &linedFlowLayout, int itemIndex, int lineIndex)
static void | NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged (winrt::IInspectable const &linedFlowLayout)
static void | ResetLayoutForcedIndexBasedLayoutOrientation (winrt::IInspectable const &layout)
static void | SetLayoutForcedIndexBasedLayoutOrientation (winrt::IInspectable const &layout, winrt::IndexBasedLayoutOrientation forcedIndexBasedLayoutOrientation)
static void | SetLinedFlowLayoutForcedAverageItemAspectRatio (winrt::IInspectable const &linedFlowLayout, double forcedAverageItemAspectRatio)
static void | SetLinedFlowLayoutForcedAverageItemsPerLineDivider (winrt::IInspectable const &linedFlowLayout, double forcedAverageItemsPerLineDivider)
static void | SetLinedFlowLayoutForcedWrapMultiplier (winrt::IInspectable const &linedFlowLayout, double forcedWrapMultiplier)
static void | SetLinedFlowLayoutIsFastPathSupported (winrt::IInspectable const &linedFlowLayout, bool isFastPathSupported)
static void | SetLinedFlowLayoutLogItemIndex (winrt::IInspectable const &linedFlowLayout, int logItemIndex)
static void | UnlockLinedFlowLayoutItems (winrt::IInspectable const &linedFlowLayout)

Static Private Member Functions

static void | EnsureHooks ()

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::IInspectable,
winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs > > 		m_linedFlowLayoutInvalidatedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::IInspectable,
winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs > > 		m_linedFlowLayoutItemLockedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::IInspectable,
winrt::IInspectable > > 		m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource

Static Private Attributes

static LayoutsTestHooks * | s_testHooks = nullptr

Detailed Description

Definition at line 9 of file LayoutsTestHooks.h.

Member Function Documentation

void ClearLinedFlowLayoutItemAspectRatios ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 277 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        instance->ClearItemAspectRatios();
    }
}

void EnsureHooks ( ) [static, private]

Definition at line 11 of file LayoutsTestHooksFactory.cpp.

{
    if (!s_testHooks)
    {
        s_testHooks = winrt::make_self<LayoutsTestHooks>().detach();
    }
}

static com_ptr<LayoutsTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 13 of file LayoutsTestHooks.h.

    {
        return s_testHooks->get_strong();
    }

int GetLayoutFirstRealizedItemIndex ( winrt::IInspectable const & layout ) [static]

Definition at line 65 of file LayoutsTestHooks.cpp.

{
    if (auto instance = layout.as<LinedFlowLayout>())
    {
        return instance->FirstRealizedItemIndexDbg();
    }

    return -1;
}

winrt::IndexBasedLayoutOrientation GetLayoutForcedIndexBasedLayoutOrientation ( winrt::IInspectable const & layout ) [static]

Definition at line 12 of file LayoutsTestHooks.cpp.

{
    if (auto instance = layout.as<Layout>())
    {
        return instance->GetForcedIndexBasedLayoutOrientation();
    }

    return winrt::IndexBasedLayoutOrientation::None;
}

int GetLayoutLastRealizedItemIndex ( winrt::IInspectable const & layout ) [static]

Definition at line 77 of file LayoutsTestHooks.cpp.

{
    if (auto instance = layout.as<LinedFlowLayout>())
    {
        return instance->LastRealizedItemIndexDbg();
    }

    return -1;
}

double GetLinedFlowLayoutAverageItemAspectRatio ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 113 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->AverageItemAspectRatioDbg();
    }

    return 0.0;
}

int GetLinedFlowLayoutFirstFrozenItemIndex ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 89 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->FirstFrozenItemIndexDbg();
    }

    return -1;
}

double GetLinedFlowLayoutForcedAverageItemAspectRatio ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 149 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->ForcedAverageItemAspectRatioDbg();
    }

    return 0.0;
}

double GetLinedFlowLayoutForcedAverageItemsPerLineDivider ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 172 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->ForcedAverageItemsPerLineDividerDbg();
    }

    return 0.0;
}

double GetLinedFlowLayoutForcedWrapMultiplier ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 195 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->ForcedWrapMultiplierDbg();
    }

    return 0.0;
}

bool GetLinedFlowLayoutIsFastPathSupported ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 218 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->IsFastPathSupportedDbg();
    }

    return false;
}

int GetLinedFlowLayoutLastFrozenItemIndex ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 101 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->LastFrozenItemIndexDbg();
    }

    return -1;
}

int GetLinedFlowLayoutLineIndex | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | int | itemIndex |
 | ) |  |  | [static]

Definition at line 264 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->GetLineIndexDbg(itemIndex);
    }

    return -1;
}

int GetLinedFlowLayoutLogItemIndex ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 241 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->LogItemIndexDbg();
    }

    return -1;
}

double GetLinedFlowLayoutRawAverageItemsPerLine ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 125 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->RawAverageItemsPerLineDbg();
    }

    return 0.0;
}

double GetLinedFlowLayoutSnappedAverageItemsPerLine ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 137 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        return instance->SnappedAverageItemsPerLineDbg();
    }

    return 0.0;
}

void LayoutInvalidateMeasure | ( | winrt::IInspectable const & | layout,
 |  | bool | relayout |
 | ) |  |  | [static]

Definition at line 45 of file LayoutsTestHooks.cpp.

{
    if (relayout)
    {
        if (auto instance = layout.as<LinedFlowLayout>())
        {
            instance->InvalidateLayout();
            return;
        }
    }

    if (auto instance = layout.as<Layout>())
    {
        instance->InvalidateMeasure();
    }
}

void LinedFlowLayoutInvalidated ( winrt::event_token const & token ) [static]

Definition at line 333 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    s_testHooks->m_linedFlowLayoutInvalidatedEventSource.remove(token);
}

winrt::event_token LinedFlowLayoutInvalidated ( winrt::TypedEventHandler< winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs > const & value ) [static]

Definition at line 325 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    return s_testHooks->m_linedFlowLayoutInvalidatedEventSource.add(value);
}

winrt::event_token LinedFlowLayoutItemLocked ( winrt::TypedEventHandler< winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs > const & value ) [static]

Definition at line 356 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    return s_testHooks->m_linedFlowLayoutItemLockedEventSource.add(value);
}

void LinedFlowLayoutItemLocked ( winrt::event_token const & token ) [static]

Definition at line 364 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    s_testHooks->m_linedFlowLayoutItemLockedEventSource.remove(token);
}

winrt::event_token LinedFlowLayoutSnappedAverageItemsPerLineChanged ( winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const & value ) [static]

Definition at line 297 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    return s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource.add(value);
}

void LinedFlowLayoutSnappedAverageItemsPerLineChanged ( winrt::event_token const & token ) [static]

Definition at line 305 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource.remove(token);
}

void NotifyLinedFlowLayoutInvalidated | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | winrt::LinedFlowLayoutInvalidationTrigger const & | invalidationTrigger |
 | ) |  |  | [static]

Definition at line 341 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    if (s_testHooks->m_linedFlowLayoutInvalidatedEventSource)
    {
        auto linedFlowLayoutInvalidatedEventArgs = winrt::make<LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs>(invalidationTrigger);

        s_testHooks->m_linedFlowLayoutInvalidatedEventSource(linedFlowLayout, linedFlowLayoutInvalidatedEventArgs);
    }
}

void NotifyLinedFlowLayoutItemLocked | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | int | itemIndex,
 |  | int | lineIndex |
 | ) |  |  | [static]

Definition at line 372 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    if (s_testHooks->m_linedFlowLayoutItemLockedEventSource)
    {
        auto linedFlowLayoutItemLockedEventArgs = winrt::make<LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs>(itemIndex, lineIndex);

        s_testHooks->m_linedFlowLayoutItemLockedEventSource(linedFlowLayout, linedFlowLayoutItemLockedEventArgs);
    }
}

void NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 313 of file LayoutsTestHooks.cpp.

{
    EnsureHooks();

    if (s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource)
    {
        s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource(linedFlowLayout, nullptr);
    }
}

void ResetLayoutForcedIndexBasedLayoutOrientation ( winrt::IInspectable const & layout ) [static]

Definition at line 35 of file LayoutsTestHooks.cpp.

{
    if (auto instance = layout.as<Layout>())
    {
        instance->ResetForcedIndexBasedLayoutOrientation();
    }
}

void SetLayoutForcedIndexBasedLayoutOrientation | ( | winrt::IInspectable const & | layout,
 |  | winrt::IndexBasedLayoutOrientation | forcedIndexBasedLayoutOrientation |
 | ) |  |  | [static]

Definition at line 24 of file LayoutsTestHooks.cpp.

{
    if (auto instance = layout.as<Layout>())
    {
        instance->SetForcedIndexBasedLayoutOrientation(forcedIndexBasedLayoutOrientation);
    }
}

void SetLinedFlowLayoutForcedAverageItemAspectRatio | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | double | forcedAverageItemAspectRatio |
 | ) |  |  | [static]

Definition at line 161 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        instance->ForcedAverageItemAspectRatioDbg(forcedAverageItemAspectRatio);
    }
}

void SetLinedFlowLayoutForcedAverageItemsPerLineDivider | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | double | forcedAverageItemsPerLineDivider |
 | ) |  |  | [static]

Definition at line 184 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        instance->ForcedAverageItemsPerLineDividerDbg(forcedAverageItemsPerLineDivider);
    }
}

void SetLinedFlowLayoutForcedWrapMultiplier | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | double | forcedWrapMultiplier |
 | ) |  |  | [static]

Definition at line 207 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        instance->ForcedWrapMultiplierDbg(forcedWrapMultiplier);
    }
}

void SetLinedFlowLayoutIsFastPathSupported | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | bool | isFastPathSupported |
 | ) |  |  | [static]

Definition at line 230 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        instance->IsFastPathSupportedDbg(isFastPathSupported);
    }
}

void SetLinedFlowLayoutLogItemIndex | ( | winrt::IInspectable const & | linedFlowLayout,
 |  | int | logItemIndex |
 | ) |  |  | [static]

Definition at line 253 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        instance->LogItemIndexDbg(logItemIndex);
    }
}

void UnlockLinedFlowLayoutItems ( winrt::IInspectable const & linedFlowLayout ) [static]

Definition at line 287 of file LayoutsTestHooks.cpp.

{
    if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
    {
        instance->UnlockItems();
    }
}

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs> > m_linedFlowLayoutInvalidatedEventSource [private]

Definition at line 70 of file LayoutsTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs> > m_linedFlowLayoutItemLockedEventSource [private]

Definition at line 71 of file LayoutsTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> > m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource [private]

Definition at line 69 of file LayoutsTestHooks.h.

LayoutsTestHooks * s_testHooks = nullptr [static, private]

Definition at line 67 of file LayoutsTestHooks.h.

The documentation for this class was generated from the following files:
  • Repeater/LayoutsTestHooks.h
  • Repeater/LayoutsTestHooks.cpp
  • Repeater/LayoutsTestHooksFactory.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs Class Reference

#include "LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h"

List of all members.

Public Member Functions

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs (winrt::LinedFlowLayoutInvalidationTrigger const &invalidationTrigger)
winrt::LinedFlowLayoutInvalidationTrigger | InvalidationTrigger ()

Private Attributes

winrt::LinedFlowLayoutInvalidationTrigger | m_invalidationTrigger

Detailed Description

Definition at line 8 of file LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h.

Constructor & Destructor Documentation

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs ( winrt::LinedFlowLayoutInvalidationTrigger const & invalidationTrigger )

Definition at line 8 of file LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp.

{
    m_invalidationTrigger = invalidationTrigger;
}

Member Function Documentation

winrt::LinedFlowLayoutInvalidationTrigger InvalidationTrigger ( )

Definition at line 16 of file LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp.

{
    return m_invalidationTrigger;
}

Member Data Documentation

winrt::LinedFlowLayoutInvalidationTrigger m_invalidationTrigger [private]

Definition at line 19 of file LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h.

The documentation for this class was generated from the following files:
  • Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h
  • Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs Class Reference

#include "LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h"

List of all members.

Public Member Functions

LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs (int itemIndex, int lineIndex)
int | ItemIndex ()
int | LineIndex ()

Private Attributes

int | m_itemIndex
int | m_lineIndex

Detailed Description

Definition at line 8 of file LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h.

Constructor & Destructor Documentation

LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs | ( | int | itemIndex,
 |  | int | lineIndex
 | ) |  |

Definition at line 8 of file LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp.

{
    m_itemIndex = itemIndex;
    m_lineIndex = lineIndex;
}

Member Function Documentation

int ItemIndex ( )

Definition at line 18 of file LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp.

{
    return m_itemIndex;
}

int LineIndex ( )

Definition at line 23 of file LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp.

{
    return m_lineIndex;
}

Member Data Documentation

int m_itemIndex [private]

Definition at line 21 of file LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h.

int m_lineIndex [private]

Definition at line 22 of file LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h.

The documentation for this class was generated from the following files:
  • Repeater/LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h
  • Repeater/LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LifetimeHandler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

LifetimeHandler Class Reference

#include "LifetimeHandler.h"

List of all members.

Public Member Functions

LifetimeHandler ()
~LifetimeHandler ()

Static Public Member Functions

static void | ClearMaterialHelperInstance ()
static com_ptr< MaterialHelper > | GetMaterialHelperInstance ()
static com_ptr< MaterialHelper > | TryGetMaterialHelperInstance ()

Static Private Member Functions

static LifetimeHandler & | Instance ()

Private Attributes

com_ptr< MaterialHelper > | m_materialHelper

Static Private Attributes

static thread_local
LifetimeHandler * 		s_tlsInstanceNoRef

Detailed Description

Definition at line 15 of file LifetimeHandler.h.

Constructor & Destructor Documentation

LifetimeHandler ( )
~LifetimeHandler ( )

Definition at line 13 of file LifetimeHandler.cpp.

{
    s_tlsInstanceNoRef = nullptr;
}

Member Function Documentation

void ClearMaterialHelperInstance ( ) [static]

Definition at line 120 of file LifetimeHandler.cpp.

{
    Instance().m_materialHelper = nullptr;
}

com_ptr< MaterialHelper > GetMaterialHelperInstance ( ) [static]

Definition at line 74 of file LifetimeHandler.cpp.

{
    if (const auto instance = TryGetMaterialHelperInstance())
    {
        return instance;
    }

    Instance().m_materialHelper = winrt::make_self<MaterialHelper>();

    return Instance().m_materialHelper;
}

LifetimeHandler & Instance ( ) [static, private]

Definition at line 18 of file LifetimeHandler.cpp.

{
    if (!s_tlsInstanceNoRef)
    {
        bool managedByCoreApplicationView = false;
        com_ptr<LifetimeHandler> strongInstance = winrt::make_self<LifetimeHandler>();
        s_tlsInstanceNoRef = strongInstance.get();

        if (!SharedHelpers::IsInDesignMode())
        {
            if (auto currentView = SharedHelpers::TryGetCurrentCoreApplicationView()) // Might be null in XamlPresenter scenarios
            {
                auto propertyName = MUXCONTROLSROOT_NAMESPACE_STR L".Controls.LifetimeHandler";
                auto properties = currentView.Properties();
                properties.Insert(propertyName, *strongInstance);
                managedByCoreApplicationView = true;
            }
        }

        if (!managedByCoreApplicationView)
        {
            // Keep alive indefinitely - the best we can do in this case
            strongInstance.detach();
        }
    }

    return *s_tlsInstanceNoRef;
}

com_ptr< MaterialHelper > TryGetMaterialHelperInstance ( ) [static]

Definition at line 87 of file LifetimeHandler.cpp.

{
    const auto instance = Instance().m_materialHelper;
    if (instance && instance->m_acrylicCompositor)
    {
        // Make sure that MaterialHelper's Compositor is the same Compositor XAML's using. If XAML shuts down and starts
        // back up on the same thread, it will have closed the previous Compositor and created a new one.  Make sure
        // we're not using comp objects based on a stale/closed Compositor.
        winrt::Compositor xamlCompositor {nullptr};

        // Calling winrt::CompositionTarget::GetCompositorForCurrentThread() can result in a noisy exception if this
        // call is happening after the XAML core has already shutdown. Avoid this by calling the ABI method, using
        // relevant winrt::impl types for the guid and interface definition.
        auto compositionTarget = winrt::get_activation_factory<winrt::CompositionTarget>();
        auto guid = winrt::impl::guid_v<winrt::Microsoft::UI::Xaml::Media::ICompositionTargetStatics>;
        com_ptr<winrt::impl::abi<winrt::Microsoft::UI::Xaml::Media::ICompositionTargetStatics>::type> compositionTargetStatics;
        auto hr = compositionTarget.as<IUnknown>()->QueryInterface(guid, compositionTargetStatics.put_void());
        if (SUCCEEDED(hr))
        {
            auto ignorehr = compositionTargetStatics->GetCompositorForCurrentThread(winrt::put_abi(xamlCompositor));
        }

        if (instance->m_acrylicCompositor != xamlCompositor)
        {
            ClearMaterialHelperInstance();
            return nullptr;
        }
    }

    return instance;
}

Member Data Documentation

com_ptr<MaterialHelper> m_materialHelper [private]

Definition at line 31 of file LifetimeHandler.h.

thread_local LifetimeHandler * s_tlsInstanceNoRef [static, private]

Definition at line 25 of file LifetimeHandler.h.

The documentation for this class was generated from the following files:
  • Common/LifetimeHandler.h
  • Common/LifetimeHandler.cpp
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Member Functions | Private Attributes

LinedFlowLayout Class Reference

#include "LinedFlowLayout.h"

Inherits ReferenceTracker< LinedFlowLayout, winrt::implementation::LinedFlowLayoutT, VirtualizingLayout >, and LinedFlowLayoutProperties.

List of all members.

Classes

struct | ItemsInfo
struct | ItemsLayout

Public Member Functions

LinedFlowLayout ()
~LinedFlowLayout ()
winrt::Size | ArrangeOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize)
double | AverageItemAspectRatioDbg () const
void | ClearItemAspectRatios ()
winrt::ItemCollectionTransitionProvider | CreateDefaultItemTransitionProvider () override
int | FirstFrozenItemIndexDbg () const
int | FirstRealizedItemIndexDbg () const
double | ForcedAverageItemAspectRatioDbg () const
void | ForcedAverageItemAspectRatioDbg (double forcedAverageItemAspectRatio)
double | ForcedAverageItemsPerLineDividerDbg () const
void | ForcedAverageItemsPerLineDividerDbg (double forcedAverageItemsPerLineDivider)
double | ForcedWrapMultiplierDbg () const
void | ForcedWrapMultiplierDbg (double forcedWrapMultiplier)
int | GetLineIndexDbg (int itemIndex) const
void | InitializeForContextCore (winrt::VirtualizingLayoutContext const &context)
void | InvalidateItemsInfo ()
void | InvalidateLayout (bool forceRelayout=true, bool resetItemsInfo=false, bool invalidateMeasure=true)
void | IsFastPathSupportedDbg (bool isFastPathSupported)
bool | IsFastPathSupportedDbg () const
int | LastFrozenItemIndexDbg () const
int | LastRealizedItemIndexDbg () const
int32_t | LockItemToLine (int32_t itemIndex)
void | LogItemIndexDbg (int logItemIndex)
int | LogItemIndexDbg () const
winrt::Size | MeasureOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize)
void | OnItemsChangedCore (winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args)
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
double | RawAverageItemsPerLineDbg () const
int | RequestedRangeLength ()
int | RequestedRangeStartIndex ()
void | SetDesiredAspectRatios (winrt::array_view< double const > const &values)
void | SetMaxWidths (winrt::array_view< double const > const &values)
void | SetMinWidths (winrt::array_view< double const > const &values)
double | SnappedAverageItemsPerLineDbg () const
void | UninitializeForContextCore (winrt::VirtualizingLayoutContext const &context)
void | UnlockItems ()

Private Member Functions

void | ArrangeConstrainedLines (winrt::VirtualizingLayoutContext const &context)
void | ArrangeUnconstrainedLine (winrt::VirtualizingLayoutContext const &context)
bool | ComputeFrozenItemsAndLayout (winrt::VirtualizingLayoutContext const &context, std::vector< int > &oldLineItemCounts, std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> oldElementAvailableWidths, std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> oldElementDesiredWidths, double scrollViewport, double scrollOffset, double lineSpacing, double actualLineHeight, float availableWidth, float nearSizedItemsRect, float farSizedItemsRect, float nearRealizationRect, float farRealizationRect, int lineCount, int sizedLineCount, int unsizedNearItemCount, int sizedItemCount, int firstStillSizedLineIndex, int lastStillSizedLineIndex, int firstStillSizedItemIndex, int lastStillSizedItemIndex)
bool | ComputeFrozenItemsRange (double scrollViewport, double scrollOffset, double lineSpacing, double actualLineHeight, int lineCount, int beginSizedLineIndex, int endSizedLineIndex, int beginSizedItemIndex, int endSizedItemIndex, int &adjustedBeginSizedItemIndex, int &adjustedEndSizedItemIndex)
void | ComputeItemsLayoutDrawback (double availableWidth, bool isLastSizedLineStretchEnabled, ItemsLayout &itemsLayout) const
float | ComputeItemsLayoutFastPath (float availableWidth, double actualLineHeight)
void | ComputeItemsLayoutRegularPath (float availableWidth, double scrollViewport, double lineSpacing, double actualLineHeight, int beginSizedLineIndex, int endSizedLineIndex, int beginSizedItemIndex, int endSizedItemIndex, int beginLineVectorIndex, bool isLastSizedLineStretchEnabled)
void | ComputeItemsLayoutWithLockedItems (ItemsLayout &itemsLayout, double availableWidth, double minItemSpacing, double actualLineHeight, double averageAspectRatio, int beginSizedLineIndex, int endSizedLineIndex, int beginSizedItemIndex, int endSizedItemIndex, int beginLineVectorIndex, bool isLastSizedLineStretchEnabled)
double | ComputeLineExpandFactor (bool forward, int sizedItemIndex, int lineItemsCount, double lineItemsWidth, double availableWidth, double minItemSpacings, double actualLineHeight, double averageAspectRatio)
double | ComputeLineShrinkFactor (bool forward, int sizedItemIndex, int lineItemsCount, double lineItemsWidth, double availableWidth, double minItemSpacings, double actualLineHeight, double averageAspectRatio)
void | CopyItemsInfo (std::vector< double > const &oldItemsInfoDesiredAspectRatios, std::vector< double > const &oldItemsInfoMinWidths, std::vector< double > const &oldItemsInfoMaxWidths, std::vector< float > const &oldItemsInfoArrangeWidths, int oldStart, int newStart, int copyCount)
void | EnsureAndMeasureItemRange (winrt::VirtualizingLayoutContext const &context, float availableWidth, double actualLineHeight, bool forward, int beginRealizedItemIndex, int endRealizedItemIndex)
void | EnsureAndResizeItemAspectRatios (double scrollViewport, double actualLineHeight, double lineSpacing)
void | EnsureElementAvailableWidths ()
void | EnsureElementDesiredWidths ()
void | EnsureElementRealized (bool forward, int itemIndex)
void | EnsureItemAspectRatios ()
void | EnsureItemRange (bool forward, int beginRealizedItemIndex, int endRealizedItemIndex)
void | EnsureItemRangeFastPath (winrt::VirtualizingLayoutContext const &context, double actualLineHeight)
void | EnsureItemsInfoArrangeWidths (int itemCount)
void | EnsureItemsInfoDesiredAspectRatios (int itemCount)
void | EnsureItemsInfoMaxWidths (int itemCount)
void | EnsureItemsInfoMinWidths (int itemCount)
void | EnsureLineItemCounts (int lineCount)
void | ExitRegularPath ()
double | GetArrangeWidth (double desiredAspectRatio, double minWidth, double maxWidth, double actualLineHeight, double scaleFactor) const
float | GetArrangeWidthFromItemsInfo (int sizedItemIndex, double actualLineHeight, double averageAspectRatio, double scaleFactor=1.0) const
double | GetAverageAspectRatio (float availableWidth, double actualLineHeight) const
double | GetAverageAspectRatioFromStorage () const
std::pair< double, double > | GetAverageItemsPerLine (float availableWidth)
double | GetDesiredAspectRatioFromItemsInfo (int itemIndex, bool usesFastPathLayout) const
winrt::Size | GetDesiredSizeForAvailableSize (int itemIndex, winrt::UIElement const &element, winrt::Size availableSize, double actualLineHeightToRestore)
void | GetFirstAndLastDisplayedLineIndexes (double scrollViewport, double scrollOffset, double padding, double lineSpacing, double actualLineHeight, int lineCount, bool forFullyDisplayedLines, int *firstDisplayedLineIndex, int *lastDisplayedLineIndex) const
void | GetFirstFullyRealizedLineIndex (int *firstFullyRealizedLineIndex, int *firstItemInFullyRealizedLine) const
int | GetFirstItemIndexInLineIndex (int lineVectorIndex) const
int | GetFrozenLineIndexFromFrozenItemIndex (int frozenItemIndex) const
double | GetItemDrawbackImprovement (double movingWidth, double availableWidth, double currentLineItemsWidth, double neighborLineItemsWidth, int currentLineIndex, int neighborLineIndex)
int | GetItemLineIndex (winrt::UIElement const &element)
void | GetItemsInfoRequestedRange (winrt::VirtualizingLayoutContext const &context, float availableWidth, double actualLineHeight, int *itemsRangeStartIndex, int *itemsRangeRequestedLength)
ItemsLayout | GetItemsLayout (std::map< int, int > *internalLockedItemIndexes, double scrollViewport, double availableWidth, double adjustedAvailableWidth, double averageLineItemsWidth, double averageAspectRatio, double lineSpacing, double actualLineHeight, int beginSizedLineIndex, int endSizedLineIndex, int beginSizedItemIndex, int endSizedItemIndex, int beginLineVectorIndex, bool isLastSizedLineStretchEnabled)
float | GetItemsRangeArrangeWidth (int beginSizedItemIndex, int endSizedItemIndex, bool usesArrangeWidthInfo)
double | GetItemWidthMultiplierThreshold () const
int | GetLastItemIndexInLineIndex (int lineVectorIndex) const
int | GetLineCount (double averageItemsPerLine) const
int | GetLineIndex (int itemIndex, bool usesFastPathLayout) const
int | GetLineIndexFromAverageItemsPerLine (int itemIndex, double averageItemsPerLine) const
float | GetLinesDesiredWidth ()
double | GetMaxWidthFromItemsInfo (int itemIndex) const
double | GetMinWidthFromItemsInfo (int itemIndex) const
void | GetNextLockedItem (std::map< int, int > *internalLockedItemIndexes, bool forward, int beginLineIndex, int endLineIndex, int itemIndex, int *lockedItemIndex, int *lockedLineIndex) const
float | GetRealizationRectHeightDeficit (winrt::VirtualizingLayoutContext const &context, double actualLineHeight, double lineSpacing) const
void | GetRealizedItemsFromSizedItems (int realizedLineCount, int lineCount, int *unrealizedNearItemCount, int *realizedItemCount) const
double | GetRoundedDouble (double value) const
float | GetRoundedFloat (float value) const
float | GetSizedItemsRectHeight (winrt::VirtualizingLayoutContext const &context, double actualLineHeight, double lineSpacing) const
void | InitializeForRelayout (int sizedLineCount, int &firstStillSizedLineIndex, int &lastStillSizedLineIndex, int &firstStillSizedItemIndex, int &lastStillSizedItemIndex)
void | InvalidateMeasureAsync ()
void | InvalidateMeasureTimerStart (int tickCount)
void | InvalidateMeasureTimerStop (bool isForDestructor)
void | InvalidateMeasureTimerTick (winrt::IInspectable const &sender, winrt::IInspectable const &args)
bool | IsItemsLayoutContractionWorthy (ItemsLayout const &itemsLayout)
bool | IsItemsLayoutEqualizationWorthy (ItemsLayout const &itemsLayout, bool withHeadItem)
bool | IsItemsLayoutExpansionWorthy (ItemsLayout const &itemsLayout)
bool | IsLockedItem (bool forward, int beginLineIndex, int endLineIndex, int itemIndex)
bool | IsVirtualizingContext (winrt::VirtualizingLayoutContext const &context) const
std::tuple< bool, bool, bool > | ItemRangesHaveNewDesiredWidths (std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> oldElementDesiredWidths, int beginRealizedItemIndex, int endRealizedItemIndex)
bool | LineHasInternalLockedItem (std::map< int, int > const &internalLockedItemIndexes, int lineIndex, bool before, int itemIndex) const
bool | LineHasLockedItem (int lineIndex, bool before, int itemIndex)
int | LineItemsCountTotal (int expectedTotal)
bool | LockItemToLineInternal (std::map< int, int > &internalLockedItemIndexes, int beginSizedLineIndex, int endSizedLineIndex, int beginSizedItemIndex, int endSizedItemIndex, int lineIndex, int itemIndex)
int | MeasureConstrainedLines (winrt::VirtualizingLayoutContext const &context, std::set< double > const &averageItemsPerLineProcessed, ItemsInfo const &itemsInfo, bool forceRelayout, float availableWidth, float nearRealizationRect, float farRealizationRect, double scrollViewport, double scrollOffset, double actualLineHeight, std::pair< double, double > *newAverageItemsPerLine)
std::tuple< int, float, ItemsInfo > | MeasureConstrainedLinesFastPath (winrt::VirtualizingLayoutContext const &context, float availableWidth, double actualLineHeight, bool forceLayoutWithoutItemsInfoRequest)
int | MeasureConstrainedLinesRegularPath (winrt::VirtualizingLayoutContext const &context, ItemsInfo const &itemsInfo, float availableWidth, double actualLineHeight)
void | MeasureItemRange (double actualLineHeight, int beginRealizedItemIndex, int endRealizedItemIndex)
void | MeasureItemRangeRegularPath (std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> elementAvailableWidths, double actualLineHeight, int beginRealizedItemIndex, int endRealizedItemIndex)
float | MeasureUnconstrainedLine (winrt::VirtualizingLayoutContext const &context)
void | NotifyLinedFlowLayoutInvalidatedDbg (winrt::LinedFlowLayoutInvalidationTrigger const &invalidationTrigger)
void | NotifyLinedFlowLayoutItemLockedDbg (int itemIndex, int lineIndex)
ItemsInfo | RaiseItemsInfoRequested (int itemsRangeStartIndex, int itemsRangeRequestedLength)
bool | RequestItemsInfo (ItemsInfo const &itemsInfo, int beginSizedItemIndex, int endSizedItemIndex)
void | ResetItemsInfo ()
void | ResetItemsInfoForFastPath ()
void | ResetLinesInfo ()
void | ResetSizedLines ()
void | SetArrangeWidthFromItemsInfo (int itemIndex, float arrangeWidth)
void | SetAverageItemsPerLine (std::pair< double, double > averageItemsPerLine, bool unlockItems=true)
void | SetDesiredAspectRatioFromItemsInfo (int itemIndex, double desiredAspectRatio)
float | SetItemRangeArrangeWidth (int beginItemIndex, int endItemIndex, double actualLineHeight, double averageAspectRatio, double scaleFactor=1.0)
std::pair< double, double > | SnapAverageItemsPerLine (double oldAverageItemsPerLineRaw, double newAverageItemsPerLineRaw) const
double | SnapToPower (double value, double valuePower) const
bool | UpdateActualLineHeight (winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize)
void | UpdateAspectRatiosWithItemsInfo ()
bool | UpdateItemsInfo (ItemsInfo const &itemsInfo, int oldFirstItemsInfoIndex, int oldLastItemsInfoIndex)
void | UpdateRoundingScaleFactor (winrt::UIElement const &xamlRootReference)
bool | UsesArrangeWidthInfo () const
bool | UsesFastPathLayout () const

Private Attributes

std::pair< double, double > | m_averageItemsPerLine
std::shared_ptr< std::map
< tracker_ref
< winrt::UIElement >, float > > 		m_elementAvailableWidths
std::shared_ptr< std::map
< tracker_ref
< winrt::UIElement >, float > > 		m_elementDesiredWidths
std::vector< float > | m_itemsInfoArrangeWidths
std::vector< double > | m_itemsInfoDesiredAspectRatiosForRegularPath
std::vector< double > | m_itemsInfoMaxWidthsForRegularPath
std::vector< double > | m_itemsInfoMinWidthsForRegularPath
std::vector< int > | m_lineItemCounts
std::map< int, int > | m_lockedItemIndexes

Detailed Description

Definition at line 13 of file LinedFlowLayout.h.

Constructor & Destructor Documentation

LinedFlowLayout ( )

Definition at line 35 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    __RP_Marker_ClassById(RuntimeProfiler::ProfId_LinedFlowLayout);
    LayoutId(L"LinedFlowLayout");

    EnsureProperties();

    SetIndexBasedLayoutOrientation(winrt::IndexBasedLayoutOrientation::LeftToRight);
}

~LinedFlowLayout ( )

Definition at line 47 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    InvalidateMeasureTimerStop(true /*isForDestructor*/);
}

Member Function Documentation

void ArrangeConstrainedLines ( winrt::VirtualizingLayoutContext const & context ) [private]

Definition at line 574 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    const double actualLineHeight = ActualLineHeight();

    if (m_lineItemCounts.size() == 0 || actualLineHeight <= 0.0)
    {
        return;
    }

    MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));

    const bool usesArrangeWidthInfo = UsesArrangeWidthInfo();
    const float minItemSpacing = static_cast<float>(MinItemSpacing());
    const double lineSpacing = LineSpacing();
    const int firstSizedLineIndex = m_firstSizedLineIndex == -1 ? 0 : m_firstSizedLineIndex;
    const int lineCount = m_firstSizedLineIndex == -1 ? static_cast<int>(m_lineItemCounts.size()) : GetLineCount(m_averageItemsPerLine.second);
    const auto itemsStretch = ItemsStretch();
    const auto itemsJustification = ItemsJustification();

#ifdef DBG
    const int sizedItemCountDbg = LineItemsCountTotal(m_firstSizedItemIndex == -1 ? 0 : m_lastSizedItemIndex - m_firstSizedItemIndex + 1);

    if (UsesFastPathLayout())
    {
        MUX_ASSERT(m_unsizedNearLineCount == -1);
    }
    else
    {
        MUX_ASSERT(m_firstSizedItemIndex < m_itemCount);
    }

    if (m_isVirtualizingContext)
    {
        const double scrollViewport = context.VisibleRect().Height;
        const double scrollOffset = context.VisibleRect().Y;

        GetFirstAndLastDisplayedLineIndexes(
            scrollViewport,
            scrollOffset,
            0 /*padding*/,
            lineSpacing,
            actualLineHeight,
            lineCount,
            false /*forFullyDisplayedLines*/,
            &m_previousFirstDisplayedArrangedLineIndexDbg,
            &m_previousLastDisplayedArrangedLineIndexDbg);
    }
#endif

    int firstFullyRealizedLineIndex{ -1 };
    int firstItemInFullyRealizedLine{ -1 };

    GetFirstFullyRealizedLineIndex(
        &firstFullyRealizedLineIndex,
        &firstItemInFullyRealizedLine);

    if (firstFullyRealizedLineIndex == -1)
    {
        // This situation can occur when context.VisibleRect().Height is 0.
        MUX_ASSERT(firstItemInFullyRealizedLine == -1);

        return;
    }

    const int itemsInfoArrangeWidthsOffset = m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex;
    const int lastSizedLineVectorIndex = static_cast<int>(m_lineItemCounts.size()) - 1;
    int sizedItemIndex = firstItemInFullyRealizedLine;

    for (int sizedLineVectorIndex = firstFullyRealizedLineIndex - firstSizedLineIndex; sizedLineVectorIndex <= lastSizedLineVectorIndex; sizedLineVectorIndex++)
    {
        float cumulatedOffset = 0.0f;
        float itemSpacing = minItemSpacing;
        const int lineItemsCount = m_lineItemCounts[sizedLineVectorIndex];
        const float lineArrangeWidth = GetItemsRangeArrangeWidth(sizedItemIndex /*beginSizedItemIndex*/, sizedItemIndex + lineItemsCount - 1 /*endSizedItemIndex*/, usesArrangeWidthInfo);
        const double lineExtraAvailableWidth = static_cast<double>(m_previousAvailableWidth) - lineArrangeWidth - itemSpacing * (static_cast<double>(lineItemsCount) - 1);

#ifdef DBG
        float cumulatedWidthDbg = 0.0;
#endif

        if (itemsStretch == winrt::LinedFlowLayoutItemsStretch::None)
        {
            if (lineExtraAvailableWidth > 0.0)
            {
                switch (itemsJustification)
                {
                case winrt::LinedFlowLayoutItemsJustification::Start:
#ifdef DBG
                    cumulatedWidthDbg = static_cast<float>(lineExtraAvailableWidth);
#endif
                    break;
                case winrt::LinedFlowLayoutItemsJustification::Center:
                    cumulatedOffset = static_cast<float>(lineExtraAvailableWidth / 2.0);
#ifdef DBG
                    cumulatedWidthDbg = 2.0f * cumulatedOffset;
#endif
                    break;
                case winrt::LinedFlowLayoutItemsJustification::End:
                    cumulatedOffset = static_cast<float>(lineExtraAvailableWidth);
#ifdef DBG
                    cumulatedWidthDbg = cumulatedOffset;
#endif
                    break;
                case winrt::LinedFlowLayoutItemsJustification::SpaceEvenly:
                    cumulatedOffset = static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) + 1));
                    itemSpacing += cumulatedOffset;
#ifdef DBG
                    cumulatedWidthDbg = 2.0f * cumulatedOffset;
#endif
                    break;
                case winrt::LinedFlowLayoutItemsJustification::SpaceAround:
                    cumulatedOffset = static_cast<float>(lineExtraAvailableWidth / lineItemsCount / 2.0);
                    itemSpacing += cumulatedOffset * 2.0f;
#ifdef DBG
                    cumulatedWidthDbg = 2.0f * cumulatedOffset;
#endif
                    break;
                case winrt::LinedFlowLayoutItemsJustification::SpaceBetween:
                    if (lineItemsCount > 1)
                    {
                        itemSpacing += static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) - 1));
                    }
                    break;
                }
            }
            else if (lineExtraAvailableWidth < 0.0)
            {
                if (lineExtraAvailableWidth >= -0.5 / m_roundingScaleFactor * lineItemsCount)
                {
                    // Because of pixel snapping based on m_roundingScaleFactor, lineExtraAvailableWidth can be slightly different from 0.0.
                    // In that case we adjust the minItemSpacing by distributing the small delta equally.
                    itemSpacing += static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) - 1));
                }
#ifdef DBG
                else
                {
                    // Because of items MinWidth, items could not be scaled down to make them fit in the line.
                    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineExtraAvailableWidth", lineExtraAvailableWidth);
                }
#endif
            }
        }
        else if (lineExtraAvailableWidth != 0.0)
        {
            // Condition #1. Because of pixel snapping based on m_roundingScaleFactor, lineExtraAvailableWidth can be slightly different from 0.0.
            // Condition #2. Because of MaxWidth constraining the expansion of line items, lineExtraAvailableWidth can be much larger than 0.0.
            // Condition #2. Because Image elements do not expand beyond MinWidth when their natural width is smaller than MinWidth, lineExtraAvailableWidth can be much larger than 0.0.
            // In those cases we adjust the minItemSpacing by distributing the small delta equally.
            const bool itemSpacingAdjustedForRounding = std::abs(lineExtraAvailableWidth) <= 0.5 / m_roundingScaleFactor * lineItemsCount;
            const bool itemSpacingAdjustedForMinMaxWidth = !itemSpacingAdjustedForRounding && lineExtraAvailableWidth > 0.0 && lineCount != firstSizedLineIndex + sizedLineVectorIndex + 1;

            if (itemSpacingAdjustedForRounding || itemSpacingAdjustedForMinMaxWidth)
            {
#ifdef DBG
                if (itemSpacingAdjustedForMinMaxWidth)
                {
                    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineExtraAvailableWidth", lineExtraAvailableWidth);
                }
#endif

                itemSpacing += static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) - 1));
            }
#ifdef DBG
            else
            {
                // In addition to those three cases above, the line items' MinWidth may prevent them from being shrunk sufficiently to fit in the available width. In those cases nothing is done.
                LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineExtraAvailableWidth", lineExtraAvailableWidth);
            }
#endif
        }

        const int lineIndex = sizedLineVectorIndex + (m_unsizedNearLineCount == -1 ? 0 : m_unsizedNearLineCount);

        MUX_ASSERT(lineIndex < lineCount);

        for (int sizedLineItemIndex = 0; sizedLineItemIndex < lineItemsCount; sizedLineItemIndex++)
        {
            if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
            {
                if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
                {
                    float arrangeWidth{};

                    if (usesArrangeWidthInfo)
                    {
                        // Use the item info provided by the ItemsInfoRequested handler since the DesiredSize
                        // may be different from the computed arrange width when the item content failed to load properly.
                        arrangeWidth = m_itemsInfoArrangeWidths[static_cast<size_t>(sizedItemIndex) - itemsInfoArrangeWidthsOffset];
                    }
                    else
                    {
                        arrangeWidth = element.DesiredSize().Width;
                    }

#ifdef DBG
                    if (arrangeWidth == 0.0f)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, usesArrangeWidthInfo ? L"Unexpected nil arrange width" : L"Unexpected nil desired width", sizedItemIndex);
                    }
#endif

                    const winrt::Rect elementRect{ cumulatedOffset, static_cast<float>(lineIndex * (actualLineHeight + lineSpacing)), arrangeWidth, static_cast<float>(actualLineHeight)};

                    element.Arrange(elementRect);

#ifdef DBG
                    if (sizedItemIndex == m_logItemIndexDbg)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_PTR_STR, METH_NAME, this, element, L"Arrange element");
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Arrange line", lineIndex);
                    }

                    if (m_elementAvailableWidths && m_elementDesiredWidths)
                    {
                        MUX_ASSERT(!UsesFastPathLayout());

                        const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
                        auto recordedSizeIterator = m_elementAvailableWidths->find(elementTracker);

                        if (recordedSizeIterator == m_elementAvailableWidths->end())
                        {
                            recordedSizeIterator = m_elementDesiredWidths->find(elementTracker);

                            if (recordedSizeIterator != m_elementDesiredWidths->end())
                            {
                                const float desiredWidth = recordedSizeIterator->second;

                                if ((std::abs(desiredWidth - element.DesiredSize().Width) >= 1.0f || std::abs(actualLineHeight - element.DesiredSize().Height) >= 1.0f) ||
                                    sizedItemIndex == m_logItemIndexDbg)
                                {
                                    if (sizedItemIndex != m_logItemIndexDbg)
                                    {
                                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedItemIndex", sizedItemIndex);
                                    }
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredWidth", desiredWidth);
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"element.DesiredSize.Width", element.DesiredSize().Width);
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredHeight", actualLineHeight);
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"element.DesiredSize.Height", element.DesiredSize().Height);
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"renderWidth", element.RenderSize().Width);
                                }
                            }
                        }
                        else
                        {
                            const float arrangeWidthDbg = recordedSizeIterator->second;

                            if (std::abs(arrangeWidthDbg - element.DesiredSize().Width) >= 1.0f ||
                                sizedItemIndex == m_logItemIndexDbg)
                            {
                                if (sizedItemIndex != m_logItemIndexDbg)
                                {
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedItemIndex", sizedItemIndex);
                                }
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"element.DesiredSize.Width", element.DesiredSize().Width);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidthDbg", arrangeWidthDbg);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"renderWidth", element.RenderSize().Width);
                            }
                        }
                    }
                    else if (sizedItemIndex == m_logItemIndexDbg)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredWidth", element.DesiredSize().Width);
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"renderWidth", element.RenderSize().Width);
                    }

                    if (sizedLineItemIndex > 0)
                    {
                        cumulatedWidthDbg += itemSpacing;
                    }

                    cumulatedWidthDbg += elementRect.Width;
#endif

                    cumulatedOffset += elementRect.Width + itemSpacing;
                }
            }
            else
            {
                // The unrealized area was reached.
                return;
            }

            sizedItemIndex++;
        }

#ifdef DBG
        if (std::abs(context.VisibleRect().Width - cumulatedWidthDbg) > 1.0f)
        {
            LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"cumulatedWidth", cumulatedWidthDbg);
        }
#endif
    }
}

winrt::Size ArrangeOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize
 | ) |  |

Definition at line 506 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"finalSize", finalSize.Width, finalSize.Height);

    MUX_ASSERT(m_itemCount == context.ItemCount());
    LogVirtualizingLayoutContextDbg(context);
    LogElementManagerDbg();
#endif

    if (std::isinf(m_previousAvailableWidth))
    {
        ArrangeUnconstrainedLine(context);
    }
    else
    {
        ArrangeConstrainedLines(context);
    }

    return finalSize;
}

void ArrangeUnconstrainedLine ( winrt::VirtualizingLayoutContext const & context ) [private]

Definition at line 876 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    if (ActualLineHeight() <= 0.0)
    {
        return;
    }

    const float minItemSpacing = static_cast<float>(MinItemSpacing());
    float cumulatedOffset = 0.0f;

    if (ItemsStretch() == winrt::LinedFlowLayoutItemsStretch::None)
    {
        switch (ItemsJustification())
        {
        case winrt::LinedFlowLayoutItemsJustification::SpaceEvenly:
            cumulatedOffset = minItemSpacing;
            break;
        case winrt::LinedFlowLayoutItemsJustification::SpaceAround:
            cumulatedOffset = minItemSpacing / 2.0f;
            break;
        }
    }

    for (int itemIndex = 0; itemIndex < context.ItemCount(); itemIndex++)
    {
        const auto element = m_elementManager.GetAt(itemIndex);

        if (element)
        {
            const auto desiredSize = element.DesiredSize();
            const auto itemWidth = desiredSize.Width;
            const winrt::Rect arrangeRect{ cumulatedOffset, 0.0f, itemWidth, desiredSize.Height };

            element.Arrange(arrangeRect);
            cumulatedOffset += itemWidth + minItemSpacing;
        }
    }
}

double AverageItemAspectRatioDbg ( ) const [inline]

Definition at line 110 of file LinedFlowLayout.h.

    {
        return m_averageItemAspectRatioDbg;
    };

void ClearItemAspectRatios ( )

Definition at line 918 of file LinedFlowLayout.cpp.

{
    if (m_aspectRatios)
    {
        m_aspectRatios->Clear();
    }
}

bool ComputeFrozenItemsAndLayout | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | std::vector< int > & | oldLineItemCounts,
 |  | std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> | oldElementAvailableWidths,
 |  | std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> | oldElementDesiredWidths,
 |  | double | scrollViewport,
 |  | double | scrollOffset,
 |  | double | lineSpacing,
 |  | double | actualLineHeight,
 |  | float | availableWidth,
 |  | float | nearSizedItemsRect,
 |  | float | farSizedItemsRect,
 |  | float | nearRealizationRect,
 |  | float | farRealizationRect,
 |  | int | lineCount,
 |  | int | sizedLineCount,
 |  | int | unsizedNearItemCount,
 |  | int | sizedItemCount,
 |  | int | firstStillSizedLineIndex,
 |  | int | lastStillSizedLineIndex,
 |  | int | firstStillSizedItemIndex,
 |  | int | lastStillSizedItemIndex |
 | ) |  |  | [private]

Definition at line 933 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
    MUX_ASSERT(nearSizedItemsRect <= nearRealizationRect);
    MUX_ASSERT(farSizedItemsRect >= farRealizationRect);
    MUX_ASSERT(sizedLineCount <= lineCount);
    MUX_ASSERT(sizedItemCount >= m_elementManager.GetRealizedElementCount());
#endif

    bool itemHasNewDesiredWidth{};

    if (firstStillSizedLineIndex != -1)
    {
        // Some line indexes are present in the previous measure pass and this new one.
#ifdef DBG
        MUX_ASSERT(m_isVirtualizingContext);
        MUX_ASSERT(lastStillSizedLineIndex != -1);
        MUX_ASSERT(m_firstSizedLineIndex <= firstStillSizedLineIndex);
        MUX_ASSERT(m_lastSizedLineIndex >= lastStillSizedLineIndex);
        MUX_ASSERT(m_firstSizedItemIndex <= firstStillSizedItemIndex);
        MUX_ASSERT(m_lastSizedItemIndex >= lastStillSizedItemIndex);
        MUX_ASSERT(m_lastSizedItemIndex - m_firstSizedItemIndex + 1 == sizedItemCount);
        MUX_ASSERT(lastStillSizedItemIndex - firstStillSizedItemIndex + 1 <= sizedItemCount);

        const int stillSizedItemCountDbg = LineItemsCountTotal(0);
        const int preStillSizedItemCountDbg = firstStillSizedItemIndex - m_firstSizedItemIndex;
        const int postStillSizedItemCountDbg = m_firstSizedItemIndex + sizedItemCount - lastStillSizedItemIndex - 1;

        MUX_ASSERT(preStillSizedItemCountDbg + stillSizedItemCountDbg + postStillSizedItemCountDbg == sizedItemCount);
#endif

        const int firstRealizedItemIndex = m_elementManager.GetFirstRealizedDataIndex();
        const int lastRealizedItemIndex = firstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;

        MUX_ASSERT(firstRealizedItemIndex >= 0);
        MUX_ASSERT(lastRealizedItemIndex >= 0);

        int adjustedFirstStillSizedItemIndex;
        int adjustedLastStillSizedItemIndex;
        bool preFrozenItemHasNewDesiredWidth = false;
        bool postFrozenItemHasNewDesiredWidth = false;

        bool forceRelayout = ComputeFrozenItemsRange(
            scrollViewport,
            scrollOffset,
            lineSpacing,
            actualLineHeight,
            lineCount,
            firstStillSizedLineIndex /*beginSizedLineIndex*/,
            lastStillSizedLineIndex  /*endSizedLineIndex*/,
            firstStillSizedItemIndex /*beginSizedItemIndex*/,
            lastStillSizedItemIndex  /*endSizedItemIndex*/,
            adjustedFirstStillSizedItemIndex,
            adjustedLastStillSizedItemIndex);

        if (!forceRelayout)
        {
            // m_firstFrozenItemIndex & m_lastFrozenItemIndex may still be -1 for example when scrollViewport==0.0.

            if (m_itemsInfoFirstIndex == -1)
            {
                if (oldElementDesiredWidths && oldElementAvailableWidths)
                {
                    const int clampedAdjustedFirstStillSizedItemIndex = std::clamp(adjustedFirstStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex);
                    const int clampedAdjustedLastStillSizedItemIndex = std::clamp(adjustedLastStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex);

                    EnsureAndMeasureItemRange(
                        context,
                        availableWidth,
                        actualLineHeight,
                        true /*forward*/,
                        clampedAdjustedFirstStillSizedItemIndex /*beginRealizedItemIndex*/,
                        clampedAdjustedLastStillSizedItemIndex /*endRealizedItemIndex*/);

                    // Check if any of the elements from m_firstFrozenItemIndex to m_lastFrozenItemIndex has a new or modified DesiredSize.
                    // In that case, a full re-layout is required.
                    // When a sized item before the frozen ones has a modified DesiredSize, it does not cause a full re-layout, but
                    // the pre-frozen-range is laid out in isolation. The same is applicable to the post-frozen-range.
                    std::tuple<bool /*preFrozenItemHasNewDesiredWidth*/, bool /*frozenItemHasNewDesiredWidth*/, bool /*postFrozenItemHasNewDesiredWidth*/> itemRangesHaveNewDesiredWidths =
                        ItemRangesHaveNewDesiredWidths(
                            oldElementDesiredWidths,
                            std::min(firstStillSizedItemIndex, m_firstFrozenItemIndex),
                            std::max(lastStillSizedItemIndex, m_lastFrozenItemIndex));

                    // forceRelayout is set to True when a frozen item has a new or modified DesiredSize.
                    forceRelayout = std::get<1>(itemRangesHaveNewDesiredWidths);

                    itemHasNewDesiredWidth = forceRelayout || std::get<0>(itemRangesHaveNewDesiredWidths) || std::get<2>(itemRangesHaveNewDesiredWidths);

                    if (!forceRelayout)
                    {
                        // preFrozenItemHasNewDesiredWidth is set to True when a sized item before the frozen ones has a modified DesiredSize.
                        preFrozenItemHasNewDesiredWidth = std::get<0>(itemRangesHaveNewDesiredWidths);

                        // postFrozenItemHasNewDesiredWidth is set to True when a sized item after the frozen ones has a modified DesiredSize.
                        postFrozenItemHasNewDesiredWidth = std::get<2>(itemRangesHaveNewDesiredWidths);

                        if (!preFrozenItemHasNewDesiredWidth && !postFrozenItemHasNewDesiredWidth)
                        {
                            // Measure realized items based on previously computed available widths 'oldElementAvailableWidths'.
                            // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
                            MeasureItemRangeRegularPath(
                                oldElementAvailableWidths,
                                actualLineHeight,
                                clampedAdjustedFirstStillSizedItemIndex /*beginRealizedItemIndex*/,
                                clampedAdjustedLastStillSizedItemIndex /*endRealizedItemIndex*/);
                        }
                        else
                        {
                            MUX_ASSERT(clampedAdjustedFirstStillSizedItemIndex <= m_firstFrozenItemIndex);
                            MUX_ASSERT(clampedAdjustedLastStillSizedItemIndex >= m_lastFrozenItemIndex);

                            // Measure frozen items based on previously computed available widths 'oldElementAvailableWidths'.
                            // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
                            MeasureItemRangeRegularPath(
                                oldElementAvailableWidths,
                                actualLineHeight,
                                m_firstFrozenItemIndex /*beginRealizedItemIndex*/,
                                m_lastFrozenItemIndex /*endRealizedItemIndex*/);

                            if (!preFrozenItemHasNewDesiredWidth && clampedAdjustedFirstStillSizedItemIndex <= m_firstFrozenItemIndex - 1)
                            {
                                // Measure pre-frozen items based on previously computed available widths 'oldElementAvailableWidths'.
                                // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
                                MeasureItemRangeRegularPath(
                                    oldElementAvailableWidths,
                                    actualLineHeight,
                                    clampedAdjustedFirstStillSizedItemIndex /*beginRealizedItemIndex*/,
                                    m_firstFrozenItemIndex - 1 /*endRealizedItemIndex*/);
                            }

                            if (!postFrozenItemHasNewDesiredWidth && m_lastFrozenItemIndex + 1 <= clampedAdjustedLastStillSizedItemIndex)
                            {
                                // Measure post-frozen items based on previously computed available widths 'oldElementAvailableWidths'.
                                // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
                                MeasureItemRangeRegularPath(
                                    oldElementAvailableWidths,
                                    actualLineHeight,
                                    m_lastFrozenItemIndex + 1 /*beginRealizedItemIndex*/,
                                    clampedAdjustedLastStillSizedItemIndex /*endRealizedItemIndex*/);
                            }
                        }
                    }
                }
            }
            else
            {
                MeasureItemRange(
                    actualLineHeight,
                    firstRealizedItemIndex /*beginRealizedItemIndex*/,
                    lastRealizedItemIndex  /*endRealizedItemIndex*/);
            }
        }

        if (forceRelayout)
        {
            // Layout all the sized lines.
            InitializeForRelayout(
                sizedLineCount,
                firstStillSizedLineIndex,
                lastStillSizedLineIndex,
                firstStillSizedItemIndex,
                lastStillSizedItemIndex);
            oldLineItemCounts.clear();

            ComputeItemsLayoutRegularPath(
                availableWidth,
                scrollViewport,
                lineSpacing,
                actualLineHeight,
                m_firstSizedLineIndex /*beginSizedLineIndex*/,
                m_lastSizedLineIndex  /*endSizedLineIndex*/,
                m_firstSizedItemIndex /*beginSizedItemIndex*/,
                m_lastSizedItemIndex  /*endSizedItemIndex*/,
                0 /*beginLineVectorIndex*/,
                m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);

            int adjustedFirstSizedItemIndex;
            int adjustedLastSizedItemIndex;

            ComputeFrozenItemsRange(
                scrollViewport,
                scrollOffset,
                lineSpacing,
                actualLineHeight,
                lineCount,
                m_firstSizedLineIndex /*beginSizedLineIndex*/,
                m_lastSizedLineIndex  /*endSizedLineIndex*/,
                m_firstSizedItemIndex /*beginSizedItemIndex*/,
                m_lastSizedItemIndex  /*endSizedItemIndex*/,
                adjustedFirstSizedItemIndex,
                adjustedLastSizedItemIndex);
        }
        else
        {
            MUX_ASSERT(adjustedFirstStillSizedItemIndex != -1 || m_firstSizedLineIndex == firstStillSizedLineIndex);
            MUX_ASSERT(adjustedLastStillSizedItemIndex != -1 || m_lastSizedLineIndex == lastStillSizedLineIndex);

            if (m_firstSizedLineIndex < firstStillSizedLineIndex)
            {
                if (m_firstFrozenLineIndex > firstStillSizedLineIndex)
                {
                    MUX_ASSERT(adjustedFirstStillSizedItemIndex - 1 >= firstStillSizedItemIndex);

                    EnsureAndMeasureItemRange(
                        context,
                        availableWidth,
                        actualLineHeight,
                        false /*forward*/,
                        std::clamp(adjustedFirstStillSizedItemIndex - 1, firstRealizedItemIndex, lastRealizedItemIndex) /*beginRealizedItemIndex*/,
                        std::clamp(firstStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex) /*endRealizedItemIndex*/);
                }

                // Layout unfrozen & sized lines before the frozen ones.
                MUX_ASSERT(firstStillSizedLineIndex < lineCount);
                MUX_ASSERT(m_firstFrozenLineIndex > 0);
                MUX_ASSERT(m_firstFrozenLineIndex - 1 >= m_firstSizedLineIndex);
                MUX_ASSERT(adjustedFirstStillSizedItemIndex - 1 >= m_firstSizedItemIndex);

                ComputeItemsLayoutRegularPath(
                    availableWidth,
                    scrollViewport,
                    lineSpacing,
                    actualLineHeight,
                    m_firstFrozenLineIndex - 1 /*beginSizedLineIndex*/,
                    m_firstSizedLineIndex /*endSizedLineIndex*/,
                    adjustedFirstStillSizedItemIndex - 1 /*beginSizedItemIndex*/,
                    m_firstSizedItemIndex /*endSizedItemIndex*/,
                    0 /*beginLineVectorIndex*/,
                    true /*isLastSizedLineStretchEnabled*/);
            }
            else if (preFrozenItemHasNewDesiredWidth)
            {
                MUX_ASSERT(m_firstFrozenLineIndex > 0);
                MUX_ASSERT(m_firstFrozenItemIndex > 0);
                MUX_ASSERT(m_firstSizedLineIndex <= m_firstFrozenLineIndex - 1);
                MUX_ASSERT(m_firstSizedItemIndex <= m_firstFrozenItemIndex - 1);

                // Re-layout the pre-frozen range since at least one of the items in there has a modified DesiredSize.
                ComputeItemsLayoutRegularPath(
                    availableWidth,
                    scrollViewport,
                    lineSpacing,
                    actualLineHeight,
                    m_firstFrozenLineIndex - 1 /*beginSizedLineIndex*/,
                    m_firstSizedLineIndex /*endSizedLineIndex*/,
                    m_firstFrozenItemIndex - 1 /*beginSizedItemIndex*/,
                    m_firstSizedItemIndex /*endSizedItemIndex*/,
                    0 /*beginLineVectorIndex*/,
                    true /*isLastSizedLineStretchEnabled*/);
            }

            if (m_lastSizedLineIndex > lastStillSizedLineIndex)
            {
                if (m_lastFrozenLineIndex < lastStillSizedLineIndex)
                {
                    MUX_ASSERT(adjustedLastStillSizedItemIndex + 1 <= lastStillSizedItemIndex);

                    EnsureAndMeasureItemRange(
                        context,
                        availableWidth,
                        actualLineHeight,
                        true /*forward*/,
                        std::clamp(adjustedLastStillSizedItemIndex + 1, firstRealizedItemIndex, lastRealizedItemIndex) /*beginRealizedItemIndex*/,
                        std::clamp(lastStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex) /*endRealizedItemIndex*/);
                }

                // Layout unfrozen & sized lines after the frozen ones.
                MUX_ASSERT(lastStillSizedLineIndex < lineCount);
                MUX_ASSERT(m_lastFrozenLineIndex < lineCount - 1);
                MUX_ASSERT(m_lastFrozenLineIndex + 1 <= m_lastSizedLineIndex);
                MUX_ASSERT(adjustedLastStillSizedItemIndex + 1 <= m_lastSizedItemIndex);

                ComputeItemsLayoutRegularPath(
                    availableWidth,
                    scrollViewport,
                    lineSpacing,
                    actualLineHeight,
                    m_lastFrozenLineIndex + 1 /*beginSizedLineIndex*/,
                    m_lastSizedLineIndex /*endSizedLineIndex*/,
                    adjustedLastStillSizedItemIndex + 1 /*beginSizedItemIndex*/,
                    m_lastSizedItemIndex /*endSizedItemIndex*/,
                    static_cast<int>(m_lineItemCounts.size()) - m_lastSizedLineIndex + m_lastFrozenLineIndex /*beginLineVectorIndex*/,
                    m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);
            }
            else if (postFrozenItemHasNewDesiredWidth)
            {
                MUX_ASSERT(m_lastFrozenLineIndex + 1 <= m_lastSizedLineIndex);
                MUX_ASSERT(m_lastFrozenItemIndex + 1 <= m_lastSizedItemIndex);

                // Re-layout the post-frozen range since at least one of the items in there has a modified DesiredSize.
                ComputeItemsLayoutRegularPath(
                    availableWidth,
                    scrollViewport,
                    lineSpacing,
                    actualLineHeight,
                    m_lastFrozenLineIndex + 1 /*beginSizedLineIndex*/,
                    m_lastSizedLineIndex /*endSizedLineIndex*/,
                    m_lastFrozenItemIndex + 1 /*beginSizedItemIndex*/,
                    m_lastSizedItemIndex /*endSizedItemIndex*/,
                    static_cast<int>(m_lineItemCounts.size()) - m_lastSizedLineIndex + m_lastFrozenLineIndex /*beginLineVectorIndex*/,
                    m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);
            }
        }
    }
    else
    {
        // No recurring sized lines. Layout all the new sized lines.
        ComputeItemsLayoutRegularPath(
            availableWidth,
            scrollViewport,
            lineSpacing,
            actualLineHeight,
            m_firstSizedLineIndex /*beginSizedLineIndex*/,
            m_lastSizedLineIndex  /*endSizedLineIndex*/,
            unsizedNearItemCount  /*beginSizedItemIndex*/,
            unsizedNearItemCount + sizedItemCount - 1 /*endSizedItemIndex*/,
            0 /*beginLineVectorIndex*/,
            m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);

        int adjustedFirstSizedItemIndex;
        int adjustedLastSizedItemIndex;

        ComputeFrozenItemsRange(
            scrollViewport,
            scrollOffset,
            lineSpacing,
            actualLineHeight,
            lineCount,
            m_firstSizedLineIndex /*beginSizedLineIndex*/,
            m_lastSizedLineIndex  /*endSizedLineIndex*/,
            unsizedNearItemCount  /*beginSizedItemIndex*/,
            unsizedNearItemCount + sizedItemCount - 1 /*endSizedItemIndex*/,
            adjustedFirstSizedItemIndex,
            adjustedLastSizedItemIndex);
    }

#ifdef DBG
    if (itemHasNewDesiredWidth)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns True");
    }
#endif

    return itemHasNewDesiredWidth;
}

bool ComputeFrozenItemsRange | ( | double | scrollViewport,
 |  | double | scrollOffset,
 |  | double | lineSpacing,
 |  | double | actualLineHeight,
 |  | int | lineCount,
 |  | int | beginSizedLineIndex,
 |  | int | endSizedLineIndex,
 |  | int | beginSizedItemIndex,
 |  | int | endSizedItemIndex,
 |  | int & | adjustedBeginSizedItemIndex,
 |  | int & | adjustedEndSizedItemIndex |
 | ) |  |  | [private]

Definition at line 1322 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(!UsesFastPathLayout());
    MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));
    MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
    MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
    MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));

    adjustedBeginSizedItemIndex = -1;
    adjustedEndSizedItemIndex = -1;

    if (!m_isVirtualizingContext)
    {
        // Layout operating in non-virtualizing mode. All lines and items are frozen.
        MUX_ASSERT(m_firstSizedLineIndex == 0);
        MUX_ASSERT(m_itemCount > 0);

        m_firstFrozenLineIndex = 0;
        m_lastFrozenLineIndex = m_lastSizedLineIndex;
        m_firstFrozenItemIndex = 0;
        m_lastFrozenItemIndex = m_itemCount - 1;
        return false;
    }

    int firstDisplayedLineIndex = -1;
    int lastDisplayedLineIndex = -1;

    GetFirstAndLastDisplayedLineIndexes(
        scrollViewport,
        scrollOffset,
        0 /*padding*/,
        lineSpacing,
        actualLineHeight,
        lineCount,
        false /*forFullyDisplayedLines*/,
        &firstDisplayedLineIndex,
        &lastDisplayedLineIndex);

    if (firstDisplayedLineIndex == -1)
    {
        // This situation occurs when actualLineHeight + lineSpacing or context.VisibleRect().Height is 0.
        m_firstFrozenLineIndex = -1;
        m_lastFrozenLineIndex = -1;
        m_firstFrozenItemIndex = -1;
        m_lastFrozenItemIndex = -1;
        return false;
    }

    MUX_ASSERT(lastDisplayedLineIndex != -1);
    MUX_ASSERT(firstDisplayedLineIndex >= m_firstSizedLineIndex);
    MUX_ASSERT(lastDisplayedLineIndex <= m_lastSizedLineIndex);

    const int linesPerScrollViewport = static_cast<int>(scrollViewport / (actualLineHeight + lineSpacing));

    // Frozen lines before the first displayed line use 80% of a scroll viewport or 40% of the sized area whichever is largest.
    int nearFrozenLinesCount = std::min(static_cast<int>(c_frozenLinesRatio * linesPerScrollViewport) + 1, firstDisplayedLineIndex - m_firstSizedLineIndex);
    nearFrozenLinesCount = std::max(nearFrozenLinesCount, static_cast<int>(c_frozenLinesRatio / 2.0 * (static_cast<double>(firstDisplayedLineIndex) - m_firstSizedLineIndex)));

    // Frozen lines after the last displayed line use 80% of a scroll viewport or 40% of the sized area whichever is largest.
    int farFrozenLinesCount = std::min(static_cast<int>(c_frozenLinesRatio * linesPerScrollViewport) + 1, m_lastSizedLineIndex - lastDisplayedLineIndex);
    farFrozenLinesCount = std::max(farFrozenLinesCount, static_cast<int>(c_frozenLinesRatio / 2.0 * (static_cast<double>(m_lastSizedLineIndex) - lastDisplayedLineIndex)));

    m_firstFrozenLineIndex = firstDisplayedLineIndex - nearFrozenLinesCount;
    m_lastFrozenLineIndex = lastDisplayedLineIndex + farFrozenLinesCount;

    MUX_ASSERT(m_firstFrozenLineIndex >= m_firstSizedLineIndex);
    MUX_ASSERT(m_lastFrozenLineIndex <= m_lastSizedLineIndex);

#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstFrozenLineIndex", m_firstFrozenLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastFrozenLineIndex", m_lastFrozenLineIndex);

    // Check if the previously first displayed & arranged line is still frozen
    if (m_previousFirstDisplayedArrangedLineIndexDbg != -1 && (m_previousFirstDisplayedArrangedLineIndexDbg < m_firstFrozenLineIndex || m_previousFirstDisplayedArrangedLineIndexDbg > m_lastFrozenLineIndex))
    {
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_previousFirstDisplayedArrangedLineIndexDbg", m_previousFirstDisplayedArrangedLineIndexDbg);
    }

    // Check if the previously last displayed & arranged line is still frozen
    if (m_previousLastDisplayedArrangedLineIndexDbg != -1 && (m_previousLastDisplayedArrangedLineIndexDbg < m_firstFrozenLineIndex || m_previousLastDisplayedArrangedLineIndexDbg > m_lastFrozenLineIndex))
    {
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_previousLastDisplayedArrangedLineIndexDbg", m_previousLastDisplayedArrangedLineIndexDbg);
    }
#endif

    const int nearUnfrozenLinesCount = m_firstFrozenLineIndex - beginSizedLineIndex;
    const int farUnfrozenLinesCount = endSizedLineIndex - m_lastFrozenLineIndex;

    if (nearUnfrozenLinesCount < 0 || farUnfrozenLinesCount < 0)
    {
        // nearUnfrozenLinesCount < 0 occurs when the scrolling offset has decreased too fast and the first frozen line has caught up and crossed the previous first sized line
        // farUnfrozenLinesCount < 0 occurs when the scrolling offset has increased too fast and the last frozen line has caught up and crossed the previous last sized line
        // These conditions can also occur when performing a large programmatic offset jump via ScrollView.ScrollTo/ScrollBy.  Trigger a full re-layout.

        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"nearUnfrozenLinesCount", nearUnfrozenLinesCount);
        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"farUnfrozenLinesCount", farUnfrozenLinesCount);

        return true;
    }

    int firstFrozenItemIndex = beginSizedItemIndex;
    int lastFrozenItemIndex = endSizedItemIndex;

    adjustedBeginSizedItemIndex = beginSizedItemIndex;
    adjustedEndSizedItemIndex = endSizedItemIndex;

    if (m_firstSizedLineIndex < beginSizedLineIndex)
    {
        MUX_ASSERT(beginSizedItemIndex > 0);
        MUX_ASSERT(m_firstSizedItemIndex <= beginSizedItemIndex);

        if (nearUnfrozenLinesCount > 0)
        {
            MUX_ASSERT(beginSizedLineIndex - m_firstSizedLineIndex + nearUnfrozenLinesCount <= static_cast<int>(m_lineItemCounts.size()));

            for (int frozenLineVectorIndex = beginSizedLineIndex - m_firstSizedLineIndex;
                frozenLineVectorIndex < beginSizedLineIndex - m_firstSizedLineIndex + nearUnfrozenLinesCount;
                frozenLineVectorIndex++)
            {
                MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);

                adjustedBeginSizedItemIndex += m_lineItemCounts[frozenLineVectorIndex];
                m_lineItemCounts[frozenLineVectorIndex] = 0;
            }

            firstFrozenItemIndex = adjustedBeginSizedItemIndex;
        }
    }
    else if (nearUnfrozenLinesCount > 0)
    {
        MUX_ASSERT(m_firstSizedLineIndex == beginSizedLineIndex);
        MUX_ASSERT(nearUnfrozenLinesCount <= static_cast<int>(m_lineItemCounts.size()));

        for (int frozenLineVectorIndex = 0; frozenLineVectorIndex < nearUnfrozenLinesCount; frozenLineVectorIndex++)
        {
            MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);

            firstFrozenItemIndex += m_lineItemCounts[frozenLineVectorIndex];
        }
    }

    if (endSizedLineIndex < m_lastSizedLineIndex)
    {
        if (farUnfrozenLinesCount > 0)
        {
            for (int frozenLineVectorIndex = static_cast<int>(m_lineItemCounts.size()) - farUnfrozenLinesCount - m_lastSizedLineIndex + endSizedLineIndex;
                frozenLineVectorIndex < static_cast<int>(m_lineItemCounts.size()) - m_lastSizedLineIndex + endSizedLineIndex;
                frozenLineVectorIndex++)
            {
                MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);

                adjustedEndSizedItemIndex -= m_lineItemCounts[frozenLineVectorIndex];
                m_lineItemCounts[frozenLineVectorIndex] = 0;
            }

            lastFrozenItemIndex = adjustedEndSizedItemIndex;
        }
    }
    else if (farUnfrozenLinesCount > 0)
    {
        MUX_ASSERT(endSizedLineIndex == m_lastSizedLineIndex);
        MUX_ASSERT(farUnfrozenLinesCount <= static_cast<int>(m_lineItemCounts.size()));

        for (int frozenLineVectorIndex = static_cast<int>(m_lineItemCounts.size()) - farUnfrozenLinesCount;
            frozenLineVectorIndex < static_cast<int>(m_lineItemCounts.size());
            frozenLineVectorIndex++)
        {
            MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);

            lastFrozenItemIndex -= m_lineItemCounts[frozenLineVectorIndex];
        }
    }

    m_firstFrozenItemIndex = firstFrozenItemIndex;
    m_lastFrozenItemIndex = lastFrozenItemIndex;

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstFrozenItemIndex", firstFrozenItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastFrozenItemIndex", lastFrozenItemIndex);

    return false;
}

void ComputeItemsLayoutDrawback | ( | double | availableWidth,
 |  | bool | isLastSizedLineStretchEnabled,
 |  | ItemsLayout & | itemsLayout |
 | ) |  |  | const [private]

Definition at line 1517 of file LinedFlowLayout.cpp.

{
    const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());
    const int lineVectorCount = static_cast<int>(isLastSizedLineStretchEnabled ? sizedLineCount : sizedLineCount - 1);

    if (lineVectorCount == 0)
    {
        itemsLayout.m_drawback = 0;
        return;
    }

    const double c_lineTooSmallExponent = 2.0;
    // Be careful when using std::pow(..., 3) as a negative input results in a negative output.
    // For the moment, c_lineTooLargeExponent is only applied to positive numbers, so its use is safe.
    const double c_lineTooLargeExponent = 3.0;
    double drawback = 0.0;

    for (int lineVectorIndex = 0; lineVectorIndex < lineVectorCount; lineVectorIndex++)
    {
        const double lineWidthDelta = itemsLayout.m_lineItemWidths[lineVectorIndex] - availableWidth;

        if (lineWidthDelta != 0.0)
        {
            // To minimize the occurrences of lines that exceed the available width, they are graded worse than lines that have room to spare.
            drawback += std::pow(lineWidthDelta, lineWidthDelta > 0.0 ? c_lineTooLargeExponent : c_lineTooSmallExponent);
        }
    }

    // The last line does not participate in the grading if it's smaller than the available width, whether ItemsStretch is Fill or not.
    if (!isLastSizedLineStretchEnabled)
    {
        const double lineWidthDelta = itemsLayout.m_lineItemWidths[static_cast<size_t>(sizedLineCount) - 1] - availableWidth;

        if (lineWidthDelta > 0.0)
        {
            // The last line exceeds the available width, grade it as such.
            drawback += std::pow(lineWidthDelta, c_lineTooLargeExponent);
        }
    }

    itemsLayout.m_drawback = drawback;
}

float ComputeItemsLayoutFastPath | ( | float | availableWidth,
 |  | double | actualLineHeight |
 | ) |  |  | [private]

Definition at line 1823 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_itemCount > 0);

    EnsureItemsInfoArrangeWidths(m_itemCount);

    MUX_ASSERT(UsesFastPathLayout());

    // The existing average aspect ratio is used as a fallback aspect ratio for items
    // given an aspect ratio <= 0 by the ItemsInfoRequested handler.
    const double averageAspectRatio = GetAverageAspectRatio(availableWidth, actualLineHeight);

    for (int itemIndex = 0; itemIndex < m_itemCount; itemIndex++)
    {
        const float arrangeWidth = GetArrangeWidthFromItemsInfo(itemIndex, actualLineHeight, averageAspectRatio);

        SetArrangeWidthFromItemsInfo(itemIndex, arrangeWidth);
    }

    // Final line count is originally unknown. m_lineItemCounts is originally allocated to accommodate 5 items per line.
    // The vector is progressively grown as needed when that assumption is too optimistic.
    constexpr int c_itemsPerLineAllocation = 5;
    // The vector capacity is increased by 25% each time its size becomes too small.
    constexpr double c_lineCountGrowthFactor = 1.25;
    int allocatedLineCount{ m_itemCount / c_itemsPerLineAllocation + 1 };

    EnsureLineItemCounts(allocatedLineCount);

    const float minItemSpacing{ static_cast<float>(MinItemSpacing()) };
    const bool itemsAreStretched{ ItemsStretch() == winrt::LinedFlowLayoutItemsStretch::Fill };
    int lineIndex{ -1 };
    int lineItemCount{ 0 };
    float lineWidth{ 0.0f };
    float maxLineWidth{ 0.0f };

    for (int itemIndex = 0; itemIndex < m_itemCount; itemIndex++)
    {
        const float arrangeWidth{ m_itemsInfoArrangeWidths[itemIndex] };
        double scaleFactor{ 1.0 };

        if (lineWidth == 0.0f || lineWidth + minItemSpacing + arrangeWidth > availableWidth)
        {
            bool cumulate{ lineWidth != 0.0f };

            if (cumulate)
            {
                // Additional item goes beyond the available width.
                MUX_ASSERT(lineWidth > 0.0);
                MUX_ASSERT(lineWidth + minItemSpacing + arrangeWidth > availableWidth);
                MUX_ASSERT(lineItemCount > 0);

                // Determine whether it is better to create a new line or not.

                const double shrinkScaleFactor = ComputeLineShrinkFactor(
                    true /*forward*/,
                    itemIndex - lineItemCount /*sizedItemIndex*/,
                    lineItemCount + 1,
                    static_cast<double>(lineWidth) + minItemSpacing + arrangeWidth /*lineItemsWidth*/,
                    availableWidth,
                    static_cast<double>(lineItemCount) * minItemSpacing /*minItemSpacings*/,
                    actualLineHeight,
                    averageAspectRatio);

                MUX_ASSERT(shrinkScaleFactor >= 0.0);
                MUX_ASSERT(shrinkScaleFactor < 1.0);

                const double expandScaleFactor = ComputeLineExpandFactor(
                    true /*forward*/,
                    itemIndex - lineItemCount /*sizedItemIndex*/,
                    lineItemCount,
                    lineWidth /*lineItemsWidth*/,
                    availableWidth,
                    (static_cast<double>(lineItemCount) - 1) * minItemSpacing /*minItemSpacings*/,
                    actualLineHeight,
                    averageAspectRatio);

                MUX_ASSERT(expandScaleFactor > 1.0);

                if (expandScaleFactor - 1.0 < 1.0 - shrinkScaleFactor || shrinkScaleFactor == 0.0)
                {
                    // Creating a new line and leaving a gap in the current one requires a smaller
                    // expansion than the shrinkage required to add this item.
                    // Or the items' min widths prevent the shrinkage required to fit them in the line.
                    cumulate = false;

                    if (itemsAreStretched)
                    {
                        // Only expand the items when ItemsStretch is LinedFlowLayoutItemsStretch::Fill.
                        scaleFactor = expandScaleFactor;
                    }
                }
                else
                {
                    // The line items need to shrink less to accommodate this additional item than expand to fill the gap,
                    // let it belong to the current line (cumulate == true).
                    scaleFactor = shrinkScaleFactor;
                }
            }

            if (cumulate)
            {
                lineWidth += minItemSpacing + arrangeWidth;
                lineItemCount++;
            }
            else
            {
                if (lineIndex >= 0 && m_lineItemCounts[lineIndex] == 0)
                {
                    MUX_ASSERT(lineIndex < allocatedLineCount);
                    MUX_ASSERT(lineItemCount > 0);
                    MUX_ASSERT(lineWidth > 0);

                    m_lineItemCounts[lineIndex] = lineItemCount;

                    if (lineIndex + 1 == allocatedLineCount)
                    {
                        allocatedLineCount = std::max(allocatedLineCount + 1, static_cast<int>(c_lineCountGrowthFactor * allocatedLineCount));
                        m_lineItemCounts.resize(allocatedLineCount, 0);
                    }

                    if (scaleFactor == 1.0)
                    {
                        maxLineWidth = std::max(lineWidth, maxLineWidth);
                    }
                    else
                    {
                        // Apply shrinking or expanding scale factor to line's m_itemsInfoArrangeWidths.
                        const float totalArrangeWidth = SetItemRangeArrangeWidth(
                            itemIndex - lineItemCount /*beginItemIndex*/,
                            itemIndex - 1 /*endItemIndex*/,
                            actualLineHeight,
                            averageAspectRatio,
                            scaleFactor);

                        maxLineWidth = std::max(totalArrangeWidth + (lineItemCount - 1) * minItemSpacing, maxLineWidth);
                    }
                }

                lineWidth = arrangeWidth;
                lineItemCount = 1;
                lineIndex++;
            }
        }
        else
        {
            lineWidth += minItemSpacing + arrangeWidth;
            lineItemCount++;
        }

        if (lineWidth >= availableWidth)
        {
            MUX_ASSERT(lineIndex >= 0);
            MUX_ASSERT(lineIndex < allocatedLineCount);
            MUX_ASSERT(lineItemCount > 0);
            MUX_ASSERT(lineWidth > 0);

            m_lineItemCounts[lineIndex] = lineItemCount;

            if (lineIndex + 1 == allocatedLineCount)
            {
                allocatedLineCount = std::max(allocatedLineCount + 1, static_cast<int>(c_lineCountGrowthFactor * allocatedLineCount));
                m_lineItemCounts.resize(allocatedLineCount, 0);
            }

            if (lineItemCount == 1 && lineWidth != availableWidth)
            {
                // The single item on the line is bigger than the available width.
                scaleFactor = ComputeLineShrinkFactor(
                    true /*forward*/,
                    itemIndex /*sizedItemIndex*/,
                    1 /*lineItemCount*/,
                    lineWidth /*lineItemsWidth*/,
                    availableWidth,
                    0.0 /*minItemSpacings*/,
                    actualLineHeight,
                    averageAspectRatio);

                MUX_ASSERT(scaleFactor >= 0.0);
                MUX_ASSERT(scaleFactor < 1.0);
            }

            if (scaleFactor != 0.0 && scaleFactor != 1.0)
            {
                // Apply shrinking scale factor to line's m_itemsInfoArrangeWidths.
                const float totalArrangeWidth = SetItemRangeArrangeWidth(
                    itemIndex - lineItemCount + 1 /*beginItemIndex*/,
                    itemIndex /*endItemIndex*/,
                    actualLineHeight,
                    averageAspectRatio,
                    scaleFactor);

                maxLineWidth = std::max(totalArrangeWidth + (lineItemCount - 1) * minItemSpacing, maxLineWidth);
            }
            else
            {
                maxLineWidth = std::max(lineWidth, maxLineWidth);
            }

            lineWidth = 0.0f;
            lineItemCount = 0;
        }
    }

    MUX_ASSERT(lineIndex >= 0);
    MUX_ASSERT(lineIndex < allocatedLineCount);

    if (lineItemCount > 0)
    {
        MUX_ASSERT(lineWidth > 0);
        MUX_ASSERT(availableWidth >= lineWidth);

        maxLineWidth = std::max(lineWidth, maxLineWidth);
        m_lineItemCounts[lineIndex] = lineItemCount;
    }

#ifdef DBG
    for (int lineIndexTmp = 0; lineIndexTmp <= lineIndex; lineIndexTmp++)
    {
        MUX_ASSERT(m_lineItemCounts[lineIndexTmp] > 0);
    }
#endif

    m_lineItemCounts.resize(static_cast<size_t>(lineIndex) + 1, 0);

#ifdef DBG
    for (int lineIndexTmp = 0; lineIndexTmp <= lineIndex; lineIndexTmp++)
    {
        MUX_ASSERT(m_lineItemCounts[lineIndexTmp] > 0);
    }
#endif

    return maxLineWidth;
}

void ComputeItemsLayoutRegularPath | ( | float | availableWidth,
 |  | double | scrollViewport,
 |  | double | lineSpacing,
 |  | double | actualLineHeight,
 |  | int | beginSizedLineIndex,
 |  | int | endSizedLineIndex,
 |  | int | beginSizedItemIndex,
 |  | int | endSizedItemIndex,
 |  | int | beginLineVectorIndex,
 |  | bool | isLastSizedLineStretchEnabled |
 | ) |  |  | [private]

Definition at line 2073 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedLineIndex", beginSizedLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedLineIndex", endSizedLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedItemIndex", beginSizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedItemIndex", endSizedItemIndex);

    MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));

    const int sizedItemCountDbg = m_lastSizedItemIndex - m_firstSizedItemIndex + 1;
    const int realizedItemCountDbg = m_elementManager.GetRealizedElementCount();
    const int unrealizedNearItemCountDbg = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;

    MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
    MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
    MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));
    MUX_ASSERT(beginSizedItemIndex > endSizedItemIndex || beginSizedItemIndex >= m_firstSizedItemIndex);
    MUX_ASSERT(beginSizedItemIndex > endSizedItemIndex || endSizedItemIndex <= m_firstSizedItemIndex + sizedItemCountDbg - 1);
    MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex || endSizedItemIndex >= m_firstSizedItemIndex);
    MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex || beginSizedItemIndex <= m_firstSizedItemIndex + sizedItemCountDbg - 1);
#endif

    const double minItemSpacing = MinItemSpacing();
    const double averageAspectRatio = GetAverageAspectRatio(availableWidth, actualLineHeight);
    double averageLineItemsWidth = std::numeric_limits<double>::max();
    std::vector<ItemsLayout> itemsLayouts;

    // Internal locks are used to force an item to belong to a particular line.
    std::map<int /*itemIndex*/, int /*lineIndex*/> internalLockedItemIndexes;

    // Phase 1: evaluate layout for an available width equal to the MeasureOverride's available width.
    ItemsLayout itemsLayout = GetItemsLayout(
        &internalLockedItemIndexes,
        scrollViewport,
        availableWidth,
        availableWidth /*adjustedAvailableWidth*/,
        -1.0 /*averageLineItemsWidth*/,
        averageAspectRatio,
        lineSpacing,
        actualLineHeight,
        beginSizedLineIndex,
        endSizedLineIndex,
        beginSizedItemIndex,
        endSizedItemIndex,
        beginLineVectorIndex,
        isLastSizedLineStretchEnabled);

    MUX_ASSERT(itemsLayout.m_availableLineItemsWidth > 0.0);
    MUX_ASSERT(itemsLayout.m_lineItemCounts.size() > 0);
    MUX_ASSERT(itemsLayout.m_lineItemWidths.size() > 0);

    itemsLayouts.push_back(itemsLayout);

#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"End-of-Phase-1 layout for MeasureOverride's availableWidth", availableWidth);
    LogItemsLayoutDbg(itemsLayout, 0);
#endif

    std::set<double> availableWidthsProcessed;

    if (beginSizedLineIndex != endSizedLineIndex)
    {
        availableWidthsProcessed.insert(availableWidth);

        // Phase 2: evaluate layout for an available width equal to the resulting average desired line items width of Phase 1.
        std::set<double> availableWidthsToProcess;

        double totalLineItemWidths = 0.0;

        for (const auto& lineItemWidthsIterator : itemsLayout.m_lineItemWidths)
        {
            totalLineItemWidths += lineItemWidthsIterator;
        }

        averageLineItemsWidth = totalLineItemWidths / itemsLayout.m_lineItemWidths.size();

        availableWidthsToProcess.insert(averageLineItemsWidth);

        double availableWidthLowerbound = averageLineItemsWidth;
        double availableWidthUpperbound = averageLineItemsWidth;

        while (availableWidthsToProcess.size() > 0)
        {
            const double adjustedAvailableWidth = *availableWidthsToProcess.begin();

            MUX_ASSERT(adjustedAvailableWidth >= 0.0);

            itemsLayout = GetItemsLayout(
                &internalLockedItemIndexes,
                scrollViewport,
                availableWidth,
                adjustedAvailableWidth,
                averageLineItemsWidth,
                averageAspectRatio,
                lineSpacing,
                actualLineHeight,
                beginSizedLineIndex,
                endSizedLineIndex,
                beginSizedItemIndex,
                endSizedItemIndex,
                beginLineVectorIndex,
                isLastSizedLineStretchEnabled);

#ifdef DBG
            LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"Phases-2&3 layout for adjustedAvailableWidth", adjustedAvailableWidth);
            LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
#endif

            itemsLayouts.push_back(itemsLayout);
            availableWidthsProcessed.insert(adjustedAvailableWidth);

            // Phase 3: evaluate layouts with an available width within 30% of the average desired line items width using the smallest head and smallest tail items of prior layouts.
            // Any layouts with an available width further away is not likely to produce the best layout. Pick the layout with the lowest drawback.
            const double availableWidthClampingPercent = 0.3;
            const bool isExpansionWorthy = IsItemsLayoutExpansionWorthy(itemsLayout);
            const bool isContractionWorthy = IsItemsLayoutContractionWorthy(itemsLayout);

            if (isExpansionWorthy)
            {
                MUX_ASSERT(itemsLayout.m_smallestHeadItemWidth > 0);

                const double availableWidthToProcess = adjustedAvailableWidth + minItemSpacing + itemsLayout.m_smallestHeadItemWidth;

                if (std::abs(availableWidthToProcess - averageLineItemsWidth) < availableWidthClampingPercent * averageLineItemsWidth &&
                    availableWidthToProcess > availableWidthUpperbound &&
                    availableWidthToProcess != availableWidth &&
                    availableWidthsProcessed.find(availableWidthToProcess) == availableWidthsProcessed.end() &&
                    availableWidthsToProcess.find(availableWidthToProcess) == availableWidthsToProcess.end())
                {
                    availableWidthUpperbound = availableWidthToProcess;
                    availableWidthsToProcess.insert(availableWidthToProcess);
                }
            }

            if (isContractionWorthy)
            {
                MUX_ASSERT(itemsLayout.m_smallestTailItemWidth > 0);

                const double availableWidthToProcess = adjustedAvailableWidth - minItemSpacing - itemsLayout.m_smallestTailItemWidth;

                if (availableWidthToProcess > 0.0 &&
                    std::abs(availableWidthToProcess - averageLineItemsWidth) < availableWidthClampingPercent * averageLineItemsWidth &&
                    availableWidthToProcess < availableWidthLowerbound &&
                    availableWidthToProcess != availableWidth &&
                    availableWidthsProcessed.find(availableWidthToProcess) == availableWidthsProcessed.end() &&
                    availableWidthsToProcess.find(availableWidthToProcess) == availableWidthsToProcess.end())
                {
                    availableWidthLowerbound = availableWidthToProcess;
                    availableWidthsToProcess.insert(availableWidthToProcess);
                }
            }

            availableWidthsToProcess.erase(adjustedAvailableWidth);
        }
    }

    ItemsLayout bestItemsLayout = itemsLayouts[0];

    if (itemsLayouts.size() > 1)
    {
        // Figure out the layout with the lowest drawback so far.
        double bestDrawback = std::numeric_limits<double>::max();

        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsLayouts.size", itemsLayouts.size());

        // Find the layout with the smallest drawback so far.
        for (const auto& itemsLayoutIterator : itemsLayouts)
        {
            ItemsLayout itemsLayoutTmp = itemsLayoutIterator;

            if (itemsLayoutTmp.m_drawback < bestDrawback)
            {
                bestDrawback = itemsLayoutTmp.m_drawback;
                bestItemsLayout = itemsLayoutTmp;
            }
        }

#ifdef DBG
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End-of-Phase-4 best layout");
        LogItemsLayoutDbg(bestItemsLayout, averageLineItemsWidth);

        MUX_ASSERT(beginSizedLineIndex != endSizedLineIndex);
#endif

        // Phase 4: try a layout with adjustedAvailableWidth = (bestItemsLayout.m_availableLineItemsWidth + averageLineItemsWidth) / 2.0,
        // i.e. the average of the best available width so far and the average line width, as it sometimes results in a lower drawback.
        // A layout for averageLineItemsWidth was performed in Phase 2, a layout for bestItemsLayout.m_availableLineItemsWidth was performed
        // in Phase 3 - the optimum available width is likely to be in the neighborhood of those two numbers and trying a layout with their
        // average has proven worthy through experimentations.
        const double adjustedAvailableWidth = (bestItemsLayout.m_availableLineItemsWidth + averageLineItemsWidth) / 2.0;

        // Make sure adjustedAvailableWidth has not been processed already in Phase 3.
        if (availableWidthsProcessed.find(adjustedAvailableWidth) == availableWidthsProcessed.end())
        {
            itemsLayout = GetItemsLayout(
                &internalLockedItemIndexes,
                scrollViewport,
                availableWidth,
                adjustedAvailableWidth,
                averageLineItemsWidth,
                averageAspectRatio,
                lineSpacing,
                actualLineHeight,
                beginSizedLineIndex,
                endSizedLineIndex,
                beginSizedItemIndex,
                endSizedItemIndex,
                beginLineVectorIndex,
                isLastSizedLineStretchEnabled);

#ifdef DBG
            LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"Phase-5 layout for adjustedAvailableWidth", adjustedAvailableWidth);
            LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
#endif

            if (itemsLayout.m_drawback < bestItemsLayout.m_drawback)
            {
                bestItemsLayout = itemsLayout;

                LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End-of-Phase-5 picking phase 5's layout");
            }
        }

        ItemsLayout itemsLayoutToImprove = bestItemsLayout;
        // noDrawbackDecreaseCount indicates how many successive attempts at decreasing the drawback have failed.
        int noDrawbackDecreaseCount = 0;
        const bool forward = beginSizedLineIndex < endSizedLineIndex;

        // Phase 5: keeping the available width from Phase 4, fine tune that layout by moving best equalizing head and best equalizing tail items into their neighboring lines using internal locks.
        // Whichever item among the best equalizing head and best equalizing tail is present and provides the largest drawback improvement is moved.

        // Incrementally improve the drawback by moving the best equalizing head to its previous line, or the best equalizing tail to its next line.
        // The move with the best anticipated outcome is performed until several attempts produce no drawback improvements.
        do
        {
            if (itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement != 0.0 &&
                (itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement == 0.0 ||
                 itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement > itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement))
            {
                if (IsItemsLayoutEqualizationWorthy(itemsLayoutToImprove, true /*withHeadItem*/))
                {
                    if (LockItemToLineInternal(
                            internalLockedItemIndexes,
                            beginSizedLineIndex,
                            endSizedLineIndex,
                            beginSizedItemIndex,
                            endSizedItemIndex,
                            forward ? itemsLayoutToImprove.m_bestEqualizingHeadLineIndex - 1 : itemsLayoutToImprove.m_bestEqualizingHeadLineIndex + 1,
                            itemsLayoutToImprove.m_bestEqualizingHeadItemIndex))
                    {
                        itemsLayout = GetItemsLayout(
                            &internalLockedItemIndexes,
                            scrollViewport,
                            availableWidth,
                            itemsLayoutToImprove.m_availableLineItemsWidth,
                            averageLineItemsWidth,
                            averageAspectRatio,
                            lineSpacing,
                            actualLineHeight,
                            beginSizedLineIndex,
                            endSizedLineIndex,
                            beginSizedItemIndex,
                            endSizedItemIndex,
                            beginLineVectorIndex,
                            isLastSizedLineStretchEnabled);

#ifdef DBG
                        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, L"Phase-6 layout after equalization attempt with head item", itemsLayout.m_drawback < bestItemsLayout.m_drawback ? L"improvement" : L"no improvement");
                        LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
#endif

                        if (itemsLayout.m_drawback < bestItemsLayout.m_drawback)
                        {
                            bestItemsLayout = itemsLayout;
                            noDrawbackDecreaseCount = 0;
                        }
                        else
                        {
                            noDrawbackDecreaseCount++;
                        }

                        itemsLayoutToImprove = itemsLayout;

                        continue;
                    }
                }
            }

            if (itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement != 0.0 &&
                (itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement == 0.0 ||
                 itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement > itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement))
            {
                if (IsItemsLayoutEqualizationWorthy(itemsLayoutToImprove, false /*withHeadItem*/))
                {
                    if (LockItemToLineInternal(
                            internalLockedItemIndexes,
                            beginSizedLineIndex,
                            endSizedLineIndex,
                            beginSizedItemIndex,
                            endSizedItemIndex,
                            forward ? itemsLayoutToImprove.m_bestEqualizingTailLineIndex + 1 : itemsLayoutToImprove.m_bestEqualizingTailLineIndex - 1,
                            itemsLayoutToImprove.m_bestEqualizingTailItemIndex))
                    {
                        itemsLayout = GetItemsLayout(
                            &internalLockedItemIndexes,
                            scrollViewport,
                            availableWidth,
                            itemsLayoutToImprove.m_availableLineItemsWidth,
                            averageLineItemsWidth,
                            averageAspectRatio,
                            lineSpacing,
                            actualLineHeight,
                            beginSizedLineIndex,
                            endSizedLineIndex,
                            beginSizedItemIndex,
                            endSizedItemIndex,
                            beginLineVectorIndex,
                            isLastSizedLineStretchEnabled);

#ifdef DBG
                        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, L"Phase-6 layout after equalization attempt with tail item", itemsLayout.m_drawback < bestItemsLayout.m_drawback ? L"improvement" : L"no improvement");
                        LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
#endif

                        if (itemsLayout.m_drawback < bestItemsLayout.m_drawback)
                        {
                            bestItemsLayout = itemsLayout;
                            noDrawbackDecreaseCount = 0;
                        }
                        else
                        {
                            noDrawbackDecreaseCount++;
                        }

                        itemsLayoutToImprove = itemsLayout;
                    }
                    else
                    {
                        break;
                    }
                }
                else
                {
                    break;
                }
            }
            else
            {
                break;
            }
        }
        while (noDrawbackDecreaseCount < static_cast<int>(bestItemsLayout.m_lineItemCounts.size() / 2));
        // TODO: Task 38031375 - Performance optimizations.
        // Given a line count, investigate what the typical number of iterations without drawback improvement
        // leads to no improvements no matter the number of subsequent tries.
    }

#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End-of-Phase-6 best layout");
    LogItemsLayoutDbg(bestItemsLayout, averageLineItemsWidth);
#endif

    // Phase 6: Final item measurements.
    ComputeItemsLayoutWithLockedItems(
        bestItemsLayout,
        availableWidth,
        minItemSpacing,
        actualLineHeight,
        averageAspectRatio,
        beginSizedLineIndex,
        endSizedLineIndex,
        beginSizedItemIndex,
        endSizedItemIndex,
        beginLineVectorIndex,
        isLastSizedLineStretchEnabled);

#ifdef DBG
    const bool forwardDbg = beginSizedItemIndex <= endSizedItemIndex;

    MUX_ASSERT(!(!forwardDbg && beginSizedLineIndex < endSizedLineIndex));

    const int sizedLineCountDbg = forwardDbg ? endSizedLineIndex - beginSizedLineIndex + 1 :
        beginSizedLineIndex - endSizedLineIndex + 1;
    const int sizedItemCountExpectedDbg = forwardDbg ? endSizedItemIndex - beginSizedItemIndex + 1 :
        beginSizedItemIndex - endSizedItemIndex + 1;

    MUX_ASSERT(sizedItemCountExpectedDbg >= sizedLineCountDbg);

    int sizedItemCountActualDbg = 0;

    for (int sizedLineVectorIndexDbg = 0; sizedLineVectorIndexDbg < sizedLineCountDbg; sizedLineVectorIndexDbg++)
    {
        const int lineItemsCountDbg = m_lineItemCounts[beginLineVectorIndex + sizedLineVectorIndexDbg /*lineVectorIndex*/];

        MUX_ASSERT(lineItemsCountDbg > 0);

        sizedItemCountActualDbg += lineItemsCountDbg;
    }

    MUX_ASSERT(sizedItemCountActualDbg == sizedItemCountExpectedDbg);
#endif
}

void ComputeItemsLayoutWithLockedItems | ( | ItemsLayout & | itemsLayout,
 |  | double | availableWidth,
 |  | double | minItemSpacing,
 |  | double | actualLineHeight,
 |  | double | averageAspectRatio,
 |  | int | beginSizedLineIndex,
 |  | int | endSizedLineIndex,
 |  | int | beginSizedItemIndex,
 |  | int | endSizedItemIndex,
 |  | int | beginLineVectorIndex,
 |  | bool | isLastSizedLineStretchEnabled |
 | ) |  |  | [private]

Definition at line 1565 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedLineIndex", beginSizedLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedLineIndex", endSizedLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedItemIndex", beginSizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedItemIndex", endSizedItemIndex);

    MUX_ASSERT(!UsesFastPathLayout());
    MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
    MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
    MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));

    const bool forward = beginSizedItemIndex <= endSizedItemIndex;
    const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemCounts.size());

#ifdef DBG
    MUX_ASSERT(sizedLineCount == static_cast<int>(forward ? endSizedLineIndex - beginSizedLineIndex + 1 : beginSizedLineIndex - endSizedLineIndex + 1));

    const int sizedLineCountDbg = forward ? endSizedItemIndex - beginSizedItemIndex + 1 : beginSizedItemIndex - endSizedItemIndex + 1;

    MUX_ASSERT(sizedLineCountDbg >= sizedLineCount);
#endif

    int lineVectorIndex;

    for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
    {
        MUX_ASSERT(itemsLayout.m_lineItemCounts[lineVectorIndex] > 0);

        m_lineItemCounts[static_cast<size_t>(beginLineVectorIndex) + lineVectorIndex] = itemsLayout.m_lineItemCounts[lineVectorIndex];
    }

    const bool itemsAreStretched = ItemsStretch() == winrt::LinedFlowLayoutItemsStretch::Fill;
    int sizedItemIndex = beginSizedItemIndex;

    for (lineVectorIndex = forward ? 0 : sizedLineCount - 1; ; lineVectorIndex = forward ? lineVectorIndex + 1 : lineVectorIndex - 1)
    {
        const int lineItemsCount = itemsLayout.m_lineItemCounts[lineVectorIndex];
        const double lineItemsWidth = itemsLayout.m_lineItemWidths[lineVectorIndex];
        const double minItemSpacings = lineItemsCount > 1 ? (static_cast<double>(lineItemsCount) - 1) * minItemSpacing : 0.0;
        double scaleFactor = 1.0;

        if (lineItemsWidth - minItemSpacings > 0.0)
        {
            if (lineItemsWidth > availableWidth)
            {
                scaleFactor = ComputeLineShrinkFactor(
                    forward,
                    sizedItemIndex,
                    lineItemsCount,
                    lineItemsWidth,
                    availableWidth,
                    minItemSpacings,
                    actualLineHeight,
                    averageAspectRatio);
                MUX_ASSERT(scaleFactor >= 0.0);
                MUX_ASSERT(scaleFactor < 1.0);
            }
            else if ((!forward || lineVectorIndex < (isLastSizedLineStretchEnabled ? sizedLineCount : sizedLineCount - 1)) &&
                lineItemsWidth < availableWidth &&
                itemsAreStretched)
            {
                scaleFactor = ComputeLineExpandFactor(
                    forward,
                    sizedItemIndex,
                    lineItemsCount,
                    lineItemsWidth,
                    availableWidth,
                    minItemSpacings,
                    actualLineHeight,
                    averageAspectRatio);
                MUX_ASSERT(scaleFactor > 1.0);
            }
        }

        if (scaleFactor != 1.0)
        {
            for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
            {
                MUX_ASSERT((forward && sizedItemIndex <= endSizedItemIndex) || (!forward && sizedItemIndex >= endSizedItemIndex));

                double minWidth{};

                if (m_itemsInfoFirstIndex == -1)
                {
                    MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndex));

                    if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
                    {
                        if (scaleFactor < 1.0)
                        {
                            if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
                            {
                                minWidth = frameworkElement.MinWidth();
                            }
                        }

                        auto elementAvailableSize = winrt::Size(
                            std::max(static_cast<float>(minWidth), static_cast<float>(element.DesiredSize().Width * scaleFactor)),
                            static_cast<float>(actualLineHeight));

                        element.Measure(elementAvailableSize);

                        const float itemWidth = element.DesiredSize().Width;

                        elementAvailableSize.Width = itemWidth;

                        MUX_ASSERT(m_elementAvailableWidths);

                        const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);

                        if (m_elementAvailableWidths->find(elementTracker) == m_elementAvailableWidths->end())
                        {
                            m_elementAvailableWidths->insert(std::pair<tracker_ref<winrt::UIElement>, float>(elementTracker, itemWidth));
                        }
                        else
                        {
                            m_elementAvailableWidths->emplace(elementTracker, itemWidth);
                        }

#ifdef DBG
                        if (sizedItemIndex == m_logItemIndexDbg)
                        {
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize (1)",
                                elementAvailableSize.Width,
                                elementAvailableSize.Height);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
                                element.DesiredSize().Width,
                                element.DesiredSize().Height);
                        }
#endif
                    }
                }
                else
                {
                    MUX_ASSERT(sizedItemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));

                    const float arrangeWidth = GetArrangeWidthFromItemsInfo(sizedItemIndex, actualLineHeight, averageAspectRatio, scaleFactor);

                    SetArrangeWidthFromItemsInfo(sizedItemIndex, arrangeWidth);

                    if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
                    {
                        if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
                        {
                            const auto elementAvailableSize = winrt::Size(
                                arrangeWidth,
                                static_cast<float>(actualLineHeight));

                            element.Measure(elementAvailableSize);

#ifdef DBG
                            if (sizedItemIndex == m_logItemIndexDbg)
                            {
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize (2)",
                                    elementAvailableSize.Width,
                                    elementAvailableSize.Height);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
                                    element.DesiredSize().Width,
                                    element.DesiredSize().Height);
                            }
#endif
                        }
                    }
                }

                sizedItemIndex = forward ? sizedItemIndex + 1 : sizedItemIndex - 1;
            }
        }
        else
        {
            // Measuring items even when no scale factor is applied so that they fill their available width (otherwise background-colored bands appear on the items' left/right edges).
            for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
            {
                MUX_ASSERT((forward && sizedItemIndex <= endSizedItemIndex) || (!forward && sizedItemIndex >= endSizedItemIndex));
                MUX_ASSERT(m_itemsInfoFirstIndex == -1 || sizedItemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));

                float arrangeWidth{};

                if (m_itemsInfoFirstIndex != -1)
                {
                    // Case where LinedFlowLayout.ItemsInfoRequested returned partial sizing information.
                    // Retrieve the item's arrange width computed from the m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath,
                    // m_itemsInfoMinWidth, m_itemsInfoMaxWidth fields.
                    arrangeWidth = GetArrangeWidthFromItemsInfo(sizedItemIndex, actualLineHeight, averageAspectRatio);

                    // Store that arrange width in the m_itemsInfoArrangeWidths vector.
                    SetArrangeWidthFromItemsInfo(sizedItemIndex, arrangeWidth);
                }

                if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
                {
                    if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
                    {
                        if (m_itemsInfoFirstIndex == -1)
                        {
                            // Case where LinedFlowLayout.ItemsInfoRequested returned no sizing information.
                            // Retrieve the item's arrange width as its desired width.
                            arrangeWidth = element.DesiredSize().Width;
                        }

                        const auto elementAvailableSize = winrt::Size(
                            arrangeWidth,
                            static_cast<float>(actualLineHeight));

                        element.Measure(elementAvailableSize);

#ifdef DBG
                        if (sizedItemIndex == m_logItemIndexDbg)
                        {
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize (3)",
                                elementAvailableSize.Width,
                                elementAvailableSize.Height);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
                                element.DesiredSize().Width,
                                element.DesiredSize().Height);
                        }
#endif
                    }
                }

                sizedItemIndex = forward ? sizedItemIndex + 1 : sizedItemIndex - 1;
            }

            // Making sure the items fill the line when ItemsStretch is Fill.
            MUX_ASSERT(!(itemsAreStretched && availableWidth - lineItemsWidth > lineItemsCount && lineItemsWidth > minItemSpacings && lineVectorIndex != sizedLineCount - 1));
        }

        if (forward && lineVectorIndex == sizedLineCount - 1)
        {
            break;
        }
        if (!forward && lineVectorIndex == 0)
        {
            break;
        }
    }
}

double ComputeLineExpandFactor | ( | bool | forward,
 |  | int | sizedItemIndex,
 |  | int | lineItemsCount,
 |  | double | lineItemsWidth,
 |  | double | availableWidth,
 |  | double | minItemSpacings,
 |  | double | actualLineHeight,
 |  | double | averageAspectRatio |
 | ) |  |  | [private]

Definition at line 2488 of file LinedFlowLayout.cpp.

{
    const bool usesFastPathLayout = UsesFastPathLayout();
    double scaleFactor;
    bool largerScaleFactorNeeded;
    std::set<int> ignoredItemIndexes;

    MUX_ASSERT(lineItemsWidth < availableWidth);

    availableWidth -= minItemSpacings;
    lineItemsWidth -= minItemSpacings;

    MUX_ASSERT(availableWidth > 0.0);
    MUX_ASSERT(lineItemsWidth > 0.0);

    do
    {
        int sizedItemIndexTmp = sizedItemIndex;

        largerScaleFactorNeeded = false;
        scaleFactor = availableWidth / lineItemsWidth;

        for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
        {
            if (ignoredItemIndexes.find(itemIndex) == ignoredItemIndexes.end())
            {
                double minWidth{}, maxWidth{ std::numeric_limits<double>::infinity() }, desiredWidth{};
                winrt::UIElement element = nullptr;

                if (!usesFastPathLayout && m_itemsInfoFirstIndex == -1)
                {
                    MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndexTmp));

                    if (element = m_elementManager.GetRealizedElement(sizedItemIndexTmp /*dataIndex*/))
                    {
                        if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
                        {
                            minWidth = frameworkElement.MinWidth();
                            maxWidth = frameworkElement.MaxWidth();
                            desiredWidth = element.DesiredSize().Width;
                        }
                    }
                }
                else
                {
                    double desiredAspectRatio = GetDesiredAspectRatioFromItemsInfo(sizedItemIndexTmp, usesFastPathLayout);

                    if (desiredAspectRatio <= 0)
                    {
                        // The average aspect ratio is used as a fallback value for items that were given a negative ratio
                        // by the ItemsInfoRequested handler.
                        desiredAspectRatio = averageAspectRatio;
                    }

                    desiredWidth = desiredAspectRatio * actualLineHeight;

                    const double desiredMinWidth = GetMinWidthFromItemsInfo(sizedItemIndexTmp);

                    if (desiredMinWidth >= 0.0)
                    {
                        minWidth = desiredMinWidth;
                        desiredWidth = std::max(minWidth, desiredWidth);
                    }

                    const double desiredMaxWidth = GetMaxWidthFromItemsInfo(sizedItemIndexTmp);

                    if (desiredMaxWidth >= 0.0)
                    {
                        maxWidth = desiredMaxWidth;
                        desiredWidth = std::min(maxWidth, desiredWidth);
                    }
                }

                if (maxWidth < desiredWidth * scaleFactor)
                {
                    availableWidth = std::max(0.0, availableWidth - maxWidth);
                    lineItemsWidth = std::max(0.0, lineItemsWidth - desiredWidth);

                    ignoredItemIndexes.insert(itemIndex);
                    largerScaleFactorNeeded = true;
                    break;
                }

                if (element != nullptr &&                                               // ItemsInfoRequested event did not provide sizing information.
                    (scaleFactor - 1.0) * minWidth > 1.0 / m_roundingScaleFactor &&     // scaleFactor is large enough that the rounded scaled desired width is expected to be larger than the rounded min width.
                    std::abs(minWidth - desiredWidth) <= 1.0 / m_roundingScaleFactor)   // element's DesiredSize.Width and element.MinWidth have the same rounded value.
                {
                    const auto scaledAvailableSize = winrt::Size(static_cast<float>(desiredWidth * scaleFactor), static_cast<float>(actualLineHeight));
                    const auto scaledDesiredSize = GetDesiredSizeForAvailableSize(sizedItemIndexTmp, element, scaledAvailableSize, actualLineHeight);

                    if (scaledDesiredSize.Width != -1.0f && std::abs(minWidth - scaledDesiredSize.Width) <= 1.0 / m_roundingScaleFactor)
                    {
                        // These are cases where the desired width matches the minimum width even though the element is given a larger available width.
                        availableWidth = std::max(0.0, availableWidth - minWidth);
                        lineItemsWidth = std::max(0.0, lineItemsWidth - minWidth);

                        ignoredItemIndexes.insert(itemIndex);
                        largerScaleFactorNeeded = true;
                        break;
                    }
                }
            }

            sizedItemIndexTmp = forward ? sizedItemIndexTmp + 1 : sizedItemIndexTmp - 1;
        }
    }
    while (availableWidth > 0.0 && lineItemsWidth > 0.0 && largerScaleFactorNeeded);

    MUX_ASSERT(scaleFactor > 1.0);

    return scaleFactor;
}

double ComputeLineShrinkFactor | ( | bool | forward,
 |  | int | sizedItemIndex,
 |  | int | lineItemsCount,
 |  | double | lineItemsWidth,
 |  | double | availableWidth,
 |  | double | minItemSpacings,
 |  | double | actualLineHeight,
 |  | double | averageAspectRatio |
 | ) |  |  | [private]

Definition at line 2611 of file LinedFlowLayout.cpp.

{
    const bool usesFastPathLayout = UsesFastPathLayout();
    double scaleFactor;
    bool smallerScaleFactorNeeded;
    std::set<int> ignoredItemIndexes;

    MUX_ASSERT(lineItemsWidth > availableWidth);

    availableWidth -= minItemSpacings;
    lineItemsWidth -= minItemSpacings;

    MUX_ASSERT(availableWidth > 0.0);
    MUX_ASSERT(lineItemsWidth > 0.0);

    do
    {
        int sizedItemIndexTmp = sizedItemIndex;

        smallerScaleFactorNeeded = false;
        scaleFactor = availableWidth / lineItemsWidth;

        for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
        {
            if (ignoredItemIndexes.find(itemIndex) == ignoredItemIndexes.end())
            {
                double minWidth{}, desiredWidth{};

                if (!usesFastPathLayout && m_itemsInfoFirstIndex == -1)
                {
                    MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndexTmp));

                    if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndexTmp /*dataIndex*/))
                    {
                        if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
                        {
                            minWidth = frameworkElement.MinWidth();
                        }

                        desiredWidth = element.DesiredSize().Width;
                    }
                }
                else
                {
                    double desiredAspectRatio = GetDesiredAspectRatioFromItemsInfo(sizedItemIndexTmp, usesFastPathLayout);

                    if (desiredAspectRatio <= 0)
                    {
                        // The average aspect ratio is used as a fallback value for items that were given a negative ratio
                        // by the ItemsInfoRequested handler.
                        desiredAspectRatio = averageAspectRatio;
                    }

                    desiredWidth = desiredAspectRatio * actualLineHeight;

                    const double desiredMaxWidth = GetMaxWidthFromItemsInfo(sizedItemIndexTmp);

                    if (desiredMaxWidth >= 0.0)
                    {
                        desiredWidth = std::min(desiredMaxWidth, desiredWidth);
                    }

                    const double desiredMinWidth = GetMinWidthFromItemsInfo(sizedItemIndexTmp);

                    if (desiredMinWidth >= 0.0)
                    {
                        minWidth = desiredMinWidth;
                        desiredWidth = std::max(minWidth, desiredWidth);
                    }
                }

                if (minWidth > desiredWidth * scaleFactor)
                {
                    availableWidth = std::max(0.0, availableWidth - minWidth);
                    lineItemsWidth = std::max(0.0, lineItemsWidth - desiredWidth);

                    ignoredItemIndexes.insert(itemIndex);
                    smallerScaleFactorNeeded = true;
                    break;
                }
            }

            sizedItemIndexTmp = forward ? sizedItemIndexTmp + 1 : sizedItemIndexTmp - 1;
        }
    }
    while (availableWidth > 0.0 && lineItemsWidth > 0.0 && smallerScaleFactorNeeded);

    MUX_ASSERT(scaleFactor > 0.0);
    MUX_ASSERT(scaleFactor < 1.0);

    return smallerScaleFactorNeeded ? 0.0 : scaleFactor;
}

void CopyItemsInfo | ( | std::vector< double > const & | oldItemsInfoDesiredAspectRatios,
 |  | std::vector< double > const & | oldItemsInfoMinWidths,
 |  | std::vector< double > const & | oldItemsInfoMaxWidths,
 |  | std::vector< float > const & | oldItemsInfoArrangeWidths,
 |  | int | oldStart,
 |  | int | newStart,
 |  | int | copyCount |
 | ) |  |  | [private]

Definition at line 2713 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"oldStart", oldStart);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newStart", newStart);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"copyCount", copyCount);

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, oldStart + copyCount, oldItemsInfoDesiredAspectRatios.size());
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, newStart + copyCount, m_itemsInfoDesiredAspectRatiosForRegularPath.size());

    MUX_ASSERT(oldStart >= 0);
    MUX_ASSERT(newStart >= 0);
    MUX_ASSERT(copyCount > 0);
    MUX_ASSERT(oldStart + copyCount <= static_cast<int>(oldItemsInfoDesiredAspectRatios.size()));
    MUX_ASSERT(newStart + copyCount <= static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));

    for (int index = 0; index < copyCount; index++)
    {
        SetDesiredAspectRatioFromItemsInfo(m_itemsInfoFirstIndex + newStart + index, oldItemsInfoDesiredAspectRatios[static_cast<size_t>(oldStart) + index]);

        MUX_ASSERT(m_itemsInfoDesiredAspectRatiosForRegularPath[newStart + index] == oldItemsInfoDesiredAspectRatios[oldStart + index]);

        if (oldItemsInfoMinWidths.size() > 0)
        {
            m_itemsInfoMinWidthsForRegularPath[static_cast<size_t>(newStart) + index] = oldItemsInfoMinWidths[static_cast<size_t>(oldStart) + index];
        }

        if (oldItemsInfoMaxWidths.size() > 0)
        {
            m_itemsInfoMaxWidthsForRegularPath[static_cast<size_t>(newStart) + index] = oldItemsInfoMaxWidths[static_cast<size_t>(oldStart) + index];
        }

        SetArrangeWidthFromItemsInfo(m_itemsInfoFirstIndex + newStart + index, oldItemsInfoArrangeWidths[static_cast<size_t>(oldStart) + index]);

        MUX_ASSERT(m_itemsInfoArrangeWidths[newStart + index] == oldItemsInfoArrangeWidths[oldStart + index]);
    }
}

winrt::ItemCollectionTransitionProvider CreateDefaultItemTransitionProvider ( ) [override]

Definition at line 201 of file LinedFlowLayout.cpp.

{
    return winrt::make<LinedFlowLayoutItemCollectionTransitionProvider>();
}

void EnsureAndMeasureItemRange | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | float | availableWidth,
 |  | double | actualLineHeight,
 |  | bool | forward,
 |  | int | beginRealizedItemIndex,
 |  | int | endRealizedItemIndex |
 | ) |  |  | [private]

Definition at line 2762 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);

    MUX_ASSERT(!(forward && beginRealizedItemIndex > endRealizedItemIndex));
    MUX_ASSERT(!(!forward && beginRealizedItemIndex < endRealizedItemIndex));
    MUX_ASSERT(beginRealizedItemIndex < context.ItemCount());
    MUX_ASSERT(endRealizedItemIndex < context.ItemCount());
    MUX_ASSERT(m_elementDesiredWidths);

    int beginNewRealizedItemIndexDbg = -1, endNewRealizedItemIndexDbg = -1;
#endif

    bool realizedNewElement = false;

    for (int realizedItemIndex = beginRealizedItemIndex; ; realizedItemIndex = forward ? realizedItemIndex + 1 : realizedItemIndex - 1)
    {
        bool isElementNewlyRealized = false;

        if (!m_elementManager.IsDataIndexRealized(realizedItemIndex))
        {
            EnsureElementRealized(forward, realizedItemIndex);

            realizedNewElement = isElementNewlyRealized = true;

#ifdef DBG
            if (beginNewRealizedItemIndexDbg == -1)
            {
                beginNewRealizedItemIndexDbg = realizedItemIndex;
            }
            else
            {
                endNewRealizedItemIndexDbg = realizedItemIndex;
            }
#endif
        }

        if (m_itemsInfoFirstIndex == -1)
        {
            if (const auto element = m_elementManager.GetRealizedElement(realizedItemIndex /*dataIndex*/))
            {
                const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);

                if (m_elementDesiredWidths->find(elementTracker) == m_elementDesiredWidths->end())
                {
                    const auto elementAvailableSize = winrt::Size(std::numeric_limits<float>::infinity(), static_cast<float>(actualLineHeight));

                    element.Measure(elementAvailableSize);

                    const auto desiredSize = element.DesiredSize();

                    bool desiredWidthGreaterThanMinWidth{};

                    if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
                    {
                        const float minWidth = static_cast<float>(frameworkElement.MinWidth());

                        if (desiredSize.Width > minWidth)
                        {
                            // Items for which the desired width is greater than the min width are immediately
                            // assigned the c_maxAspectRatioWeight weight. For the other items, the weight is
                            // incremented from 1 to c_maxAspectRatioWeight as the min width may be due to the
                            // item content not being loaded yet.
                            desiredWidthGreaterThanMinWidth = true;
                        }
                    }

                    m_elementDesiredWidths->insert(std::pair<tracker_ref<winrt::UIElement>, float>(elementTracker, desiredSize.Width));

                    if (desiredSize.Height != 0.0f && m_aspectRatios != nullptr)
                    {
                        LinedFlowLayoutItemAspectRatios::ItemAspectRatio itemAspectRatio = m_aspectRatios->GetAt(realizedItemIndex);
                        const float aspectRatio = desiredSize.Width / desiredSize.Height;

                        if (itemAspectRatio.m_weight == 0)
                        {
                            itemAspectRatio.m_aspectRatio = aspectRatio;
                            itemAspectRatio.m_weight = desiredWidthGreaterThanMinWidth ? c_maxAspectRatioWeight : 1;

#ifdef DBG
                            if (realizedItemIndex == m_logItemIndexDbg)
                            {
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"initial aspect ratio", aspectRatio);
                            }
#endif
                        }
                        else
                        {
                            if (isElementNewlyRealized)
                            {
                                itemAspectRatio.m_weight = desiredWidthGreaterThanMinWidth ? c_maxAspectRatioWeight : 1;
                            }
                            else
                            {
                                const int aspectRatioWeight = itemAspectRatio.m_weight;

                                MUX_ASSERT(itemAspectRatio.m_aspectRatio >= 0.0f);
                                MUX_ASSERT(aspectRatioWeight >= 1);
                                MUX_ASSERT(aspectRatioWeight <= c_maxAspectRatioWeight);

                                if (aspectRatioWeight < c_maxAspectRatioWeight)
                                {
                                    if (desiredWidthGreaterThanMinWidth)
                                    {
                                        itemAspectRatio.m_weight = c_maxAspectRatioWeight;
                                    }
                                    else
                                    {
                                        itemAspectRatio.m_weight++;
                                    }
                                }
                            }
#ifdef DBG
                            if (realizedItemIndex == m_logItemIndexDbg)
                            {
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this,
                                    itemAspectRatio.m_aspectRatio == aspectRatio ? L"same aspect ratio" : L"new aspect ratio", aspectRatio);
                                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"weight", itemAspectRatio.m_weight);
                            }
#endif
                            if (itemAspectRatio.m_aspectRatio != aspectRatio)
                            {
                                itemAspectRatio.m_aspectRatio = aspectRatio;
                            }
                        }

                        m_aspectRatios->SetAt(realizedItemIndex, itemAspectRatio);
                    }

#ifdef DBG
                    if (realizedItemIndex == m_logItemIndexDbg)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize",
                            elementAvailableSize.Width,
                            elementAvailableSize.Height);
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
                            desiredSize.Width,
                            desiredSize.Height);
                    }
#endif
                }
            }
        }

        if (realizedItemIndex == endRealizedItemIndex)
        {
            break;
        }
    }

#ifdef DBG
    if (beginNewRealizedItemIndexDbg != -1)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"newly realized item index range", beginNewRealizedItemIndexDbg, endNewRealizedItemIndexDbg);
    }
#endif

    if (realizedNewElement && !UsesArrangeWidthInfo())
    {
        InvalidateMeasureTimerStart(0 /*tickCount*/);
    }
}

void EnsureAndResizeItemAspectRatios | ( | double | scrollViewport,
 |  | double | actualLineHeight,
 |  | double | lineSpacing |
 | ) |  |  | [private]

Definition at line 2937 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_averageItemsPerLine.second > 0.0);
    MUX_ASSERT(m_firstSizedItemIndex >= 0);
    MUX_ASSERT(m_firstSizedItemIndex <= m_lastSizedItemIndex);

    EnsureItemAspectRatios();

    constexpr int c_scrollViewportCount = 10; // m_aspectRatios is sized large enough to hold aspect ratio information for 10 viewport worth of items.
    const int referenceItemIndex = static_cast<int>((m_lastSizedItemIndex - m_firstSizedItemIndex) / 2);
    const double c_minItemsPerScrollViewport = 20.0; // Avoid small aspect ratio sampling that is not statistically significant by forcing at least 20 items per viewport.
    const double linesPerScrollViewport = scrollViewport / (actualLineHeight + lineSpacing);
    const double averageItemsPerScrollViewport = std::max(c_minItemsPerScrollViewport, linesPerScrollViewport * m_averageItemsPerLine.second);
    int itemAspectRatiosStorageSize = std::max(static_cast<int>(averageItemsPerScrollViewport * c_scrollViewportCount), m_lastSizedItemIndex - m_firstSizedItemIndex + 1);

    itemAspectRatiosStorageSize = std::min(itemAspectRatiosStorageSize, m_itemCount);

    m_aspectRatios->Resize(itemAspectRatiosStorageSize, referenceItemIndex);
}

void EnsureElementAvailableWidths ( ) [private]

Definition at line 2960 of file LinedFlowLayout.cpp.

{
    if (!m_elementAvailableWidths)
    {
        m_elementAvailableWidths = std::make_shared<std::map<tracker_ref<winrt::UIElement>, float>>();
    }
}

void EnsureElementDesiredWidths ( ) [private]

Definition at line 2968 of file LinedFlowLayout.cpp.

{
    if (!m_elementDesiredWidths)
    {
        m_elementDesiredWidths = std::make_shared<std::map<tracker_ref<winrt::UIElement>, float>>();
    }
}

void EnsureElementRealized | ( | bool | forward,
 |  | int | itemIndex |
 | ) |  |  | [private]

Definition at line 2976 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_isVirtualizingContext);
    MUX_ASSERT(!m_elementManager.IsDataIndexRealized(itemIndex));

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex", itemIndex);

    m_elementManager.EnsureElementRealized(forward, itemIndex, LayoutId());
}

void EnsureItemAspectRatios ( ) [private]

Definition at line 2988 of file LinedFlowLayout.cpp.

{
    if (!m_aspectRatios)
    {
        m_aspectRatios = std::make_unique<LinedFlowLayoutItemAspectRatios>();
    }
}

void EnsureItemRange | ( | bool | forward,
 |  | int | beginRealizedItemIndex,
 |  | int | endRealizedItemIndex |
 | ) |  |  | [private]

Definition at line 2997 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);

    MUX_ASSERT(!(forward && beginRealizedItemIndex > endRealizedItemIndex));
    MUX_ASSERT(!(!forward && beginRealizedItemIndex < endRealizedItemIndex));
    MUX_ASSERT(beginRealizedItemIndex < m_itemCount);
    MUX_ASSERT(endRealizedItemIndex < m_itemCount);

    int beginNewRealizedItemIndexDbg = -1, endNewRealizedItemIndexDbg = -1;
#endif

    bool realizedNewElement = false;

    for (int realizedItemIndex = beginRealizedItemIndex; ; realizedItemIndex = forward ? realizedItemIndex + 1 : realizedItemIndex - 1)
    {
        if (!m_elementManager.IsDataIndexRealized(realizedItemIndex))
        {
            EnsureElementRealized(forward, realizedItemIndex);

#ifdef DBG
            if (beginNewRealizedItemIndexDbg == -1)
            {
                beginNewRealizedItemIndexDbg = realizedItemIndex;
            }
            else
            {
                endNewRealizedItemIndexDbg = realizedItemIndex;
            }
#endif
            realizedNewElement = true;
        }

        if (realizedItemIndex == endRealizedItemIndex)
        {
            break;
        }
    }

#ifdef DBG
    if (beginNewRealizedItemIndexDbg != -1)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"newly realized item index range", beginNewRealizedItemIndexDbg, endNewRealizedItemIndexDbg);
    }
#endif

    if (realizedNewElement && !UsesArrangeWidthInfo())
    {
        InvalidateMeasureTimerStart(0 /*tickCount*/);
    }
}

void EnsureItemRangeFastPath | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | double | actualLineHeight |
 | ) |  |  | [private]

Definition at line 3055 of file LinedFlowLayout.cpp.

{
    const int newRecommendedAnchorIndex{ context.RecommendedAnchorIndex() };

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"entry", actualLineHeight);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_anchorIndex", m_anchorIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newRecommendedAnchorIndex", newRecommendedAnchorIndex);

    MUX_ASSERT(actualLineHeight > 0.0);
    MUX_ASSERT(m_itemCount > 0);

    const double scrollViewport{ context.VisibleRect().Height };
    int newFirstRealizedItemIndex{ 0 };
    int newLastRealizedItemIndex{ 0 };

    MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));

    if (m_isVirtualizingContext)
    {
        const float realizationRectHeight{ context.RealizationRect().Height };

        if (realizationRectHeight == 0.0)
        {
            return;
        }

        const int lineCount{ static_cast<int>(m_lineItemCounts.size()) };

        MUX_ASSERT(lineCount >= 0);

        const double lineSpacing{ LineSpacing() };
        float nearRealizationRect{ GetRoundedFloat(context.RealizationRect().Y) };
        int firstRealizedLineIndex{ -1 };
        int lastRealizedLineIndex{ -1 };

        GetFirstAndLastDisplayedLineIndexes(
            realizationRectHeight /*scrollViewport*/,
            nearRealizationRect,
            0 /*padding*/,
            lineSpacing,
            actualLineHeight,
            lineCount,
            false /*forFullyDisplayedLines*/,
            &firstRealizedLineIndex,
            &lastRealizedLineIndex);

        MUX_ASSERT(firstRealizedLineIndex >= 0);
        MUX_ASSERT(lastRealizedLineIndex >= 0);
        MUX_ASSERT(firstRealizedLineIndex < lineCount);
        MUX_ASSERT(lastRealizedLineIndex < lineCount);

        newFirstRealizedItemIndex = GetFirstItemIndexInLineIndex(firstRealizedLineIndex);
        newLastRealizedItemIndex = GetLastItemIndexInLineIndex(lastRealizedLineIndex);

        MUX_ASSERT(newFirstRealizedItemIndex >= 0);
        MUX_ASSERT(newLastRealizedItemIndex >= 0);
        MUX_ASSERT(newFirstRealizedItemIndex < m_itemCount);
        MUX_ASSERT(newLastRealizedItemIndex < m_itemCount);

        bool realizationRectCenteredAroundAnchor{ false };

        if (m_anchorIndex != -1 || newRecommendedAnchorIndex != -1)
        {
            const int anchorLineIndex = GetLineIndex(newRecommendedAnchorIndex == -1 ? m_anchorIndex : newRecommendedAnchorIndex, true /*usesFastPathLayout*/);

            MUX_ASSERT(anchorLineIndex >= 0);
            MUX_ASSERT(anchorLineIndex < lineCount);

            if (anchorLineIndex < firstRealizedLineIndex || anchorLineIndex > lastRealizedLineIndex)
            {
                // The anchor line is disconnected. Centering the realization window around its center.
                const float anchorLineNearEdge = static_cast<float>(anchorLineIndex * (actualLineHeight + lineSpacing));
                const float anchorLineMiddle = static_cast<float>(anchorLineNearEdge + actualLineHeight / 2.0);

                nearRealizationRect = GetRoundedFloat(anchorLineMiddle - realizationRectHeight / 2.0f);
                realizationRectCenteredAroundAnchor = true;

                // Same comments and treatment as in LinedFlowLayout::MeasureConstrainedLinesRegularPath.
                // Sometimes during a bring-into-view operation the RecommendedAnchorIndex momentarily switches from the target index N to -1 and then back to the target index N.
                // To avoid momentarily setting m_anchorIndex to -1, its value is preserved c_maxAnchorIndexRetentionCount times, based purely on experimentations.
                // Without this momentary retention the bring-into-view operation lands on incorrect offsets. If m_anchorIndex were to be preserved without a countdown, large offset changes
                // through ScrollView.ScrollTo calls would not complete.
                // TODO: Bug 41896418 - Investigate why the occurrences of -1 sometimes come up - even when the ScrollView anchoring is turned on.
                //                      Does such a countdown need to be used? What is a reliable countdown starting value?
                if (newRecommendedAnchorIndex == -1)
                {
                    MUX_ASSERT(m_anchorIndexRetentionCountdown >= 1 && m_anchorIndexRetentionCountdown <= c_maxAnchorIndexRetentionCount);

                    m_anchorIndexRetentionCountdown--;

                    if (m_anchorIndexRetentionCountdown == 0)
                    {
                        m_anchorIndex = -1;
                    }
                }
                else
                {
                    m_anchorIndexRetentionCountdown = c_maxAnchorIndexRetentionCount;
                    m_anchorIndex = newRecommendedAnchorIndex;
                }

                LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Forcing layout pass to decrement m_anchorIndexRetentionCountdown");

                // Layout is invalidated to ensure that m_anchorIndexRetentionCountdown is decremented from c_maxAnchorIndexRetentionCount all the way to 0 (a few lines above).
                // Otherwise m_anchorIndex could be stuck to a value that prevents the realization window from moving to the actual scroller's offset.
                InvalidateMeasureAsync();
            }
        }

        if (realizationRectCenteredAroundAnchor)
        {
            // Re-evaluate realization range after centering around the anchor line.
            GetFirstAndLastDisplayedLineIndexes(
                realizationRectHeight /*scrollViewport*/,
                nearRealizationRect,
                0 /*padding*/,
                lineSpacing,
                actualLineHeight,
                lineCount,
                false /*forFullyDisplayedLines*/,
                &firstRealizedLineIndex,
                &lastRealizedLineIndex);

            MUX_ASSERT(firstRealizedLineIndex >= 0);
            MUX_ASSERT(lastRealizedLineIndex >= 0);
            MUX_ASSERT(firstRealizedLineIndex < lineCount);
            MUX_ASSERT(lastRealizedLineIndex < lineCount);

            newFirstRealizedItemIndex = GetFirstItemIndexInLineIndex(firstRealizedLineIndex);
            newLastRealizedItemIndex = GetLastItemIndexInLineIndex(lastRealizedLineIndex);

            MUX_ASSERT(newFirstRealizedItemIndex >= 0);
            MUX_ASSERT(newLastRealizedItemIndex >= 0);
            MUX_ASSERT(newFirstRealizedItemIndex < m_itemCount);
            MUX_ASSERT(newLastRealizedItemIndex < m_itemCount);
        }
        else if (m_anchorIndex != -1)
        {
            m_anchorIndex = -1;
        }
    }
    else
    {
        // All items are realized in non-virtualizing mode.
        MUX_ASSERT(context.VisibleRect().Y == 0.0f);

        newLastRealizedItemIndex = m_itemCount - 1;
    }

    const int newRealizedItemCount = newLastRealizedItemIndex - newFirstRealizedItemIndex + 1;

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newFirstRealizedItemIndex", newFirstRealizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newLastRealizedItemIndex", newLastRealizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newRealizedItemCount", newRealizedItemCount);

    const int oldFirstRealizedItemIndex = m_elementManager.GetFirstRealizedDataIndex(); // -1 and unused in non-virtualizing mode.
    const int oldLastRealizedItemIndex = oldFirstRealizedItemIndex == -1 ? -1 : oldFirstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;

    // Discard the first realized items fallen off the realization window.
    if (oldFirstRealizedItemIndex != -1 && oldFirstRealizedItemIndex < newFirstRealizedItemIndex)
    {
        MUX_ASSERT(m_isVirtualizingContext);

        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized head range",
            oldFirstRealizedItemIndex, newFirstRealizedItemIndex - 1);

        m_elementManager.DiscardElementsOutsideWindow(
            false /*forward*/,
            std::min(newFirstRealizedItemIndex, oldFirstRealizedItemIndex + m_elementManager.GetRealizedElementCount()) - 1 /*startIndex*/);
    }

    MUX_ASSERT(newFirstRealizedItemIndex <= m_elementManager.GetFirstRealizedDataIndex() || -1 == m_elementManager.GetFirstRealizedDataIndex());

    int firstStillRealizedItemIndex{ -1 };
    int lastStillRealizedItemIndex{ -1 };

    if (oldFirstRealizedItemIndex != -1 && oldLastRealizedItemIndex != -1)
    {
        if (newFirstRealizedItemIndex >= oldFirstRealizedItemIndex && newFirstRealizedItemIndex <= oldLastRealizedItemIndex)
        {
            firstStillRealizedItemIndex = newFirstRealizedItemIndex;
            lastStillRealizedItemIndex = std::min(oldLastRealizedItemIndex, newLastRealizedItemIndex);
        }
        else if (newLastRealizedItemIndex >= oldFirstRealizedItemIndex && newLastRealizedItemIndex <= oldLastRealizedItemIndex)
        {
            lastStillRealizedItemIndex = newLastRealizedItemIndex;
            firstStillRealizedItemIndex = std::max(oldFirstRealizedItemIndex, newFirstRealizedItemIndex);
        }
    }

    if (m_elementManager.GetFirstRealizedDataIndex() != -1 && newFirstRealizedItemIndex < m_elementManager.GetFirstRealizedDataIndex())
    {
        MUX_ASSERT(oldFirstRealizedItemIndex > 0);

        // Ensure and measure the realized items before the old first realized item.
        EnsureItemRange(
            false /*forward*/,
            std::min(oldFirstRealizedItemIndex - 1, newFirstRealizedItemIndex + newRealizedItemCount - 1) /*beginRealizedItemIndex*/,
            newFirstRealizedItemIndex /*endRealizedItemIndex*/);

        // Ensure and measure the realized items after the old first realized item.
        MUX_ASSERT(newFirstRealizedItemIndex == m_elementManager.GetFirstRealizedDataIndex());

        if (firstStillRealizedItemIndex != -1)
        {
            if (firstStillRealizedItemIndex > 0 && oldFirstRealizedItemIndex <= firstStillRealizedItemIndex - 1)
            {
                EnsureItemRange(
                    true /*forward*/,
                    oldFirstRealizedItemIndex /*beginRealizedItemIndex*/,
                    firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
            }

            if (lastStillRealizedItemIndex + 1 <= newFirstRealizedItemIndex + newRealizedItemCount - 1)
            {
                EnsureItemRange(
                    true /*forward*/,
                    lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
                    newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
            }
        }
        else if (newFirstRealizedItemIndex + newRealizedItemCount - 1 >= oldFirstRealizedItemIndex)
        {
            EnsureItemRange(
                true /*forward*/,
                oldFirstRealizedItemIndex /*beginRealizedItemIndex*/,
                newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
        }
    }
    else
    {
        // Ensure and measure the realized items.
        MUX_ASSERT(newFirstRealizedItemIndex == m_elementManager.GetFirstRealizedDataIndex() || m_elementManager.GetFirstRealizedDataIndex() == -1);

        if (firstStillRealizedItemIndex != -1)
        {
            if (firstStillRealizedItemIndex > 0 && newFirstRealizedItemIndex <= firstStillRealizedItemIndex - 1)
            {
                EnsureItemRange(
                    true /*forward*/,
                    newFirstRealizedItemIndex /*beginRealizedItemIndex*/,
                    firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
            }

            if (lastStillRealizedItemIndex + 1 <= newFirstRealizedItemIndex + newRealizedItemCount - 1)
            {
                EnsureItemRange(
                    true /*forward*/,
                    lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
                    newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
            }
        }
        else
        {
            EnsureItemRange(
                true /*forward*/,
                newFirstRealizedItemIndex /*beginRealizedItemIndex*/,
                newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
        }
    }

    // Discard the last realized items fallen off the realization window.
    if (oldLastRealizedItemIndex != -1 && oldLastRealizedItemIndex > newLastRealizedItemIndex)
    {
        MUX_ASSERT(m_isVirtualizingContext);
        MUX_ASSERT(m_elementManager.GetRealizedElementCount() > newRealizedItemCount);

        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized tail range",
            newFirstRealizedItemIndex + newRealizedItemCount, m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount() - 1);

        m_elementManager.DiscardElementsOutsideWindow(
            true /*forward*/,
            newLastRealizedItemIndex + 1 /*startIndex*/);
    }

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"exit");
}

void EnsureItemsInfoArrangeWidths ( int itemCount ) [private]

Definition at line 3356 of file LinedFlowLayout.cpp.

{
    m_itemsInfoArrangeWidths.clear();
    m_itemsInfoArrangeWidths.resize(itemCount, -1.0f);
}

void EnsureItemsInfoDesiredAspectRatios ( int itemCount ) [private]

Definition at line 3335 of file LinedFlowLayout.cpp.

{
    m_itemsInfoDesiredAspectRatiosForRegularPath.clear();
    m_itemsInfoDesiredAspectRatiosForRegularPath.resize(itemCount, -1.0);
}

void EnsureItemsInfoMaxWidths ( int itemCount ) [private]

Definition at line 3349 of file LinedFlowLayout.cpp.

{
    m_itemsInfoMaxWidthsForRegularPath.clear();
    m_itemsInfoMaxWidthsForRegularPath.resize(itemCount, -1.0);
}

void EnsureItemsInfoMinWidths ( int itemCount ) [private]

Definition at line 3342 of file LinedFlowLayout.cpp.

{
    m_itemsInfoMinWidthsForRegularPath.clear();
    m_itemsInfoMinWidthsForRegularPath.resize(itemCount, -1.0);
}

void EnsureLineItemCounts ( int lineCount ) [private]

Definition at line 3363 of file LinedFlowLayout.cpp.

{
    m_lineItemCounts.clear();
    m_lineItemCounts.resize(lineCount, 0);
}

void ExitRegularPath ( ) [private]

Definition at line 3370 of file LinedFlowLayout.cpp.

{
    m_itemsInfoFirstIndex = -1;
    m_unsizedNearLineCount = -1;
    m_unrealizedNearLineCount = -1;
    m_elementAvailableWidths = nullptr;
    m_elementDesiredWidths = nullptr;
    ResetSizedLines();
}

int FirstFrozenItemIndexDbg ( ) const [inline]

Definition at line 100 of file LinedFlowLayout.h.

    {
        return m_firstFrozenItemIndex;
    };

int FirstRealizedItemIndexDbg ( ) const [inline]

Definition at line 79 of file LinedFlowLayout.h.

    {
        if (!m_wasInitializedForContext)
        {
            return -1;
        }

        return m_elementManager.GetFirstRealizedDataIndex();
    };

double ForcedAverageItemAspectRatioDbg ( ) const [inline]

Definition at line 115 of file LinedFlowLayout.h.

    {
        return m_forcedAverageItemAspectRatioDbg;
    };

void ForcedAverageItemAspectRatioDbg ( double forcedAverageItemAspectRatio ) [inline]

Definition at line 120 of file LinedFlowLayout.h.

    {
        if (m_forcedAverageItemAspectRatioDbg != forcedAverageItemAspectRatio)
        {
            m_forcedAverageItemAspectRatioDbg = forcedAverageItemAspectRatio;
            InvalidateLayout();
        }
    };

double ForcedAverageItemsPerLineDividerDbg ( ) const [inline]

Definition at line 130 of file LinedFlowLayout.h.

    {
        return m_forcedAverageItemsPerLineDividerDbg;
    };

void ForcedAverageItemsPerLineDividerDbg ( double forcedAverageItemsPerLineDivider ) [inline]

Definition at line 135 of file LinedFlowLayout.h.

    {
        if (m_forcedAverageItemsPerLineDividerDbg != forcedAverageItemsPerLineDivider)
        {
            m_forcedAverageItemsPerLineDividerDbg = forcedAverageItemsPerLineDivider;
            InvalidateLayout();
        }
    };

double ForcedWrapMultiplierDbg ( ) const [inline]

Definition at line 145 of file LinedFlowLayout.h.

    {
        return m_forcedWrapMultiplierDbg;
    };

void ForcedWrapMultiplierDbg ( double forcedWrapMultiplier ) [inline]

Definition at line 151 of file LinedFlowLayout.h.

    {
        if (m_forcedWrapMultiplierDbg != forcedWrapMultiplier)
        {
            m_forcedWrapMultiplierDbg = forcedWrapMultiplier;
            InvalidateLayout();
        }
    };

double GetArrangeWidth | ( | double | desiredAspectRatio,
 |  | double | minWidth,
 |  | double | maxWidth,
 |  | double | actualLineHeight,
 |  | double | scaleFactor |
 | ) |  |  | const [private]

Definition at line 3380 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(desiredAspectRatio > 0.0);

    double arrangeWidth = desiredAspectRatio * actualLineHeight;

    minWidth = std::max(0.0, minWidth);

    arrangeWidth = std::max(minWidth, arrangeWidth);

    if (maxWidth >= 0.0)
    {
        arrangeWidth = std::min(maxWidth, arrangeWidth);
    }

    if (scaleFactor != 1.0)
    {
        arrangeWidth *= scaleFactor;

        if (scaleFactor < 1.0)
        {
            arrangeWidth = std::max(minWidth, arrangeWidth);
        }

        if (maxWidth >= 0.0 && scaleFactor > 1.0)
        {
            arrangeWidth = std::min(maxWidth, arrangeWidth);
        }
    }

    return arrangeWidth;
}

float GetArrangeWidthFromItemsInfo | ( | int | sizedItemIndex,
 |  | double | actualLineHeight,
 |  | double | averageAspectRatio,
 |  | double | scaleFactor = 1.0 |
 | ) |  |  | const [private]

Definition at line 3425 of file LinedFlowLayout.cpp.

{
    double desiredAspectRatio = GetDesiredAspectRatioFromItemsInfo(sizedItemIndex, UsesFastPathLayout());

    if (desiredAspectRatio <= 0)
    {
        // The average aspect ratio is used as a fallback value for items that were given a negative ratio
        // by the ItemsInfoRequested handler.
        desiredAspectRatio = averageAspectRatio;
    }

    return static_cast<float>(GetArrangeWidth(
        desiredAspectRatio,
        GetMinWidthFromItemsInfo(sizedItemIndex),
        GetMaxWidthFromItemsInfo(sizedItemIndex),
        actualLineHeight,
        scaleFactor));
}

double GetAverageAspectRatio | ( | float | availableWidth,
 |  | double | actualLineHeight |
 | ) |  |  | const [private]

Definition at line 3452 of file LinedFlowLayout.cpp.

{
    if (m_aspectRatios == nullptr || m_aspectRatios->IsEmpty())
    {
        if (m_averageItemsPerLine.second == 0.0 || actualLineHeight == 0.0)
        {
            constexpr double defaultAspectRatio{ 1.0 };

            return defaultAspectRatio;
        }
        else
        {
            return availableWidth / m_averageItemsPerLine.second / actualLineHeight;
        }
    }

    return GetAverageAspectRatioFromStorage();
}

double GetAverageAspectRatioFromStorage ( ) const [private]

Definition at line 3474 of file LinedFlowLayout.cpp.

{
    constexpr double defaultAspectRatio{ 1.0 };

    if (m_aspectRatios == nullptr || m_aspectRatios->IsEmpty())
    {
        return defaultAspectRatio;
    }

    const int firstRealizedItemIndex = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
    const int lastRealizedItemIndex = firstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;
    // Items outside the current realized range must have a weight equal to c_maxAspectRatioWeight to be taken into account.
    // Smaller weights may not reflect the real aspect ratio and negatively influence the average.
    float averageItemAspectRatio = m_aspectRatios->GetAverageAspectRatio(firstRealizedItemIndex, lastRealizedItemIndex, c_maxAspectRatioWeight);

    return averageItemAspectRatio == 0.0f ? defaultAspectRatio : averageItemAspectRatio;
}

std::pair< double, double > GetAverageItemsPerLine ( float availableWidth ) [private]

Definition at line 3492 of file LinedFlowLayout.cpp.

{
    double averageWidth;
    const double minItemSpacing = MinItemSpacing();
    const double actualLineHeight = ActualLineHeight();

    // During initial loading, in cases no sizing information is provided by an ItemsInfoRequested event handler,
    // the average item aspect ratio is set no lower than 1.5, 1.25 & 1.0 in the first 3 measure passes.
    // This is to avoid the unpopulated items' small MinWidth to artificially result in a small average aspect ratio
    // causing a momentary item realization that gets thrown away as soon as the real average aspect ratio is set.
    const double minAverageItemAspectRatio = m_measureCountdown * 0.25 + 0.5;

    if (m_aspectRatios != nullptr && !m_aspectRatios->IsEmpty())
    {
        double averageItemAspectRatio = GetAverageAspectRatioFromStorage();

        // During initial load, avoid small aspect ratios while the first items are still loading
        // to avoid unnecessary item realizations. This is only done when the ItemsInfoRequested event handler did not provide sizing information.
        if (m_itemsInfoFirstIndex == -1 && m_measureCountdown > 1 && averageItemAspectRatio < minAverageItemAspectRatio)
        {
            LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Forcing layout pass for low initial aspect ratio average");
            LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"minAverageItemAspectRatio", minAverageItemAspectRatio);
            LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"averageItemAspectRatio", averageItemAspectRatio);

            averageItemAspectRatio = minAverageItemAspectRatio;

            // Making sure there is another layout coming with a decreased m_measureCountdown value to stop using an adjusted averageItemAspectRatio.
            // Layout invalidation is done asynchronously to have an effect since this method, GetAverageItemsPerLine, is called during measure passes.
            InvalidateMeasureAsync();
        }

        m_averageItemAspectRatioDbg = averageItemAspectRatio;

        averageWidth = averageItemAspectRatio * actualLineHeight;
    }
    else
    {
        m_averageItemAspectRatioDbg = minAverageItemAspectRatio;

        // When no item is realized, minAverageItemAspectRatio which starts at 1.5 is used.
        averageWidth = minAverageItemAspectRatio * actualLineHeight;
    }

    if (m_forcedAverageItemAspectRatioDbg != 0.0)
    {
        averageWidth = m_forcedAverageItemAspectRatioDbg * actualLineHeight;
    }

    // Account for the minimum spacing between items by adding minItemSpacing
    // minItemSpacing is over-counted once for the last item.
    averageWidth = std::max(1.0, averageWidth + minItemSpacing);

    // minItemSpacing is added to the availableWidth to account for the over-counting above.
    double averageItemsPerLineRaw = (availableWidth + minItemSpacing) / averageWidth;

    averageItemsPerLineRaw = std::max(1.0, averageItemsPerLineRaw);

    std::pair<double, double> averageItemsPerLine = SnapAverageItemsPerLine(
        m_averageItemsPerLine.first /*oldAverageItemsPerLineRaw*/,
        averageItemsPerLineRaw /*newAverageItemsPerLineRaw*/);

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_DBL, METH_NAME, this, averageItemsPerLine.second);

    MUX_ASSERT(averageItemsPerLine.second >= 1.0);

    return averageItemsPerLine;
}

double GetDesiredAspectRatioFromItemsInfo | ( | int | itemIndex,
 |  | bool | usesFastPathLayout |
 | ) |  |  | const [private]

Definition at line 3561 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(itemIndex >= 0);
    MUX_ASSERT(itemIndex < m_itemCount);

    double desiredAspectRatio{};

    if (usesFastPathLayout)
    {
        MUX_ASSERT(m_itemsInfoFirstIndex == -1);
        MUX_ASSERT(itemIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForFastPath.size()));

        desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForFastPath[itemIndex];
    }
    else
    {
        MUX_ASSERT(m_itemsInfoFirstIndex >= 0);
        MUX_ASSERT(itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));

        desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex];
    }

    return desiredAspectRatio;
}

winrt::Size GetDesiredSizeForAvailableSize | ( | int | itemIndex,
 |  | winrt::UIElement const & | element,
 |  | winrt::Size | availableSize,
 |  | double | actualLineHeightToRestore |
 | ) |  |  | [private]

Definition at line 3590 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(element != nullptr);
    MUX_ASSERT(itemIndex >= 0);

    // When m_itemsInfoArrangeWidths is populated,
    // - m_itemsInfoFirstIndex != -1: Regular path layout case, with items info available (m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath).
    // - m_itemsInfoFirstIndex == -1: Fast path layout case, without items info available.
    const int itemsInfoArrangeWidthsIndex = itemIndex - (m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex);
    float measureWidthToRestore{};

    if (itemsInfoArrangeWidthsIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()))
    {
        const float arrangeWidth = m_itemsInfoArrangeWidths[itemsInfoArrangeWidthsIndex];

        if (arrangeWidth < 0.0f)
        {
            // The m_itemsInfoArrangeWidths vector has not been set for the provided 'itemIndex' yet.
            // The effects of measuring 'element' with 'availableSize' below could not be undone.
            // Returning -1, -1 to indicate no desired size could be measured.
            return winrt::Size{ -1.0f, -1.0f };
        }
        else
        {
            measureWidthToRestore = arrangeWidth;
        }
    }
    else if (m_elementAvailableWidths != nullptr && m_elementDesiredWidths != nullptr)
    {
        // Check if the element has a recorded desired or available width
        // to restore after measurement with the provided 'availableSize'.
        const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
        auto recordedSizeIterator = m_elementAvailableWidths->find(elementTracker);

        if (recordedSizeIterator == m_elementAvailableWidths->end())
        {
            recordedSizeIterator = m_elementDesiredWidths->find(elementTracker);

            if (recordedSizeIterator == m_elementDesiredWidths->end())
            {
                // No recorded width to use to undo effects of a measure with 'availableSize'.
                return winrt::Size{ -1.0f, -1.0f };
            }
            else
            {
                // Use the previous desired width to undo the effects of the measure with 'availableSize'.
                measureWidthToRestore = recordedSizeIterator->second;
            }
        }
        else
        {
            // Use the previous available width to undo the effects of the measure with 'availableSize'.
            measureWidthToRestore = recordedSizeIterator->second;
        }
    }

    element.Measure(availableSize);

    winrt::Size desiredSize = element.DesiredSize();

    element.Measure(winrt::Size{ measureWidthToRestore, static_cast<float>(actualLineHeightToRestore) });

    return desiredSize;
}

void GetFirstAndLastDisplayedLineIndexes | ( | double | scrollViewport,
 |  | double | scrollOffset,
 |  | double | padding,
 |  | double | lineSpacing,
 |  | double | actualLineHeight,
 |  | int | lineCount,
 |  | bool | forFullyDisplayedLines,
 |  | int * | firstDisplayedLineIndex,
 |  | int * | lastDisplayedLineIndex |
 | ) |  |  | const [private]

Definition at line 3659 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollViewport", scrollViewport);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollOffset", scrollOffset);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"padding", padding);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineSpacing", lineSpacing);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"actualLineHeight", actualLineHeight);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lineCount", lineCount);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"forFullyDisplayedLines", forFullyDisplayedLines);

    MUX_ASSERT(m_isVirtualizingContext);
    MUX_ASSERT(scrollViewport != std::numeric_limits<double>::infinity());
    MUX_ASSERT(lineCount > 0);

    *firstDisplayedLineIndex = *lastDisplayedLineIndex = -1;

    const double lineHeight = actualLineHeight + lineSpacing;

    if (lineHeight == 0.0 || scrollViewport == 0.0)
    {
        return;
    }

    const double linesSpacing = lineCount == 0 ? 0.0 : (static_cast<double>(lineCount) - 1) * lineSpacing;
    const double scrollExtent = lineCount * actualLineHeight + linesSpacing;
    const double maxScrollOffset = std::max(0.0, scrollExtent - scrollViewport);
    const double lineSpacingPortion = lineSpacing / lineHeight;

    scrollOffset = std::min(maxScrollOffset, scrollOffset);

    if (std::abs(scrollOffset) < c_offsetEqualityEpsilon)
    {
        scrollOffset = 0.0;
    }

    padding = std::min(padding, scrollViewport / 2.0);

    const double nearPadding = std::min(scrollOffset, padding);
    const double farPadding = std::min(maxScrollOffset - scrollOffset, padding);

    if (!(forFullyDisplayedLines && actualLineHeight + nearPadding + farPadding > scrollViewport))
    {
        double nearDisplayed = scrollOffset + nearPadding;
        double farDisplayed = scrollOffset + scrollViewport - farPadding;

        if (farDisplayed > 0.0 && nearDisplayed < scrollExtent)
        {
            nearDisplayed = std::max(0.0, nearDisplayed);
            farDisplayed = std::min(scrollExtent, farDisplayed);

            const double fractionalFirstDisplayedLineIndex = nearDisplayed / lineHeight;
            const int roundedFirstDisplayedLineIndex = static_cast<int>(fractionalFirstDisplayedLineIndex);

            if (static_cast<double>(roundedFirstDisplayedLineIndex) + 1 - fractionalFirstDisplayedLineIndex <= lineSpacingPortion &&
                roundedFirstDisplayedLineIndex + 1 < lineCount)
            {
                // The portion displayed before the first displayed item is smaller than the line spacing - it can be ignored.
                *firstDisplayedLineIndex = roundedFirstDisplayedLineIndex + 1;
            }
            else
            {
                *firstDisplayedLineIndex = roundedFirstDisplayedLineIndex;
            }

            if (forFullyDisplayedLines &&
                fractionalFirstDisplayedLineIndex > roundedFirstDisplayedLineIndex &&
                roundedFirstDisplayedLineIndex + 1 < lineCount)
            {
                *firstDisplayedLineIndex = roundedFirstDisplayedLineIndex + 1;
            }

            MUX_ASSERT(*firstDisplayedLineIndex >= 0);
            MUX_ASSERT(*firstDisplayedLineIndex < lineCount);

            const double fractionalLastDisplayedLineIndex = (farDisplayed + lineSpacing) / lineHeight;
            const int roundedLastDisplayedLineIndex = static_cast<int>(fractionalLastDisplayedLineIndex);

            *lastDisplayedLineIndex = roundedLastDisplayedLineIndex;

            if (forFullyDisplayedLines)
            {
                if (fractionalLastDisplayedLineIndex >= 1.0)
                {
                    *lastDisplayedLineIndex = std::min(roundedLastDisplayedLineIndex, lineCount) - 1;
                }
            }
            else
            {
                if (fractionalLastDisplayedLineIndex - roundedLastDisplayedLineIndex <= lineSpacingPortion)
                {
                    *lastDisplayedLineIndex = std::max(roundedLastDisplayedLineIndex - 1, 0);
                }
            }

            MUX_ASSERT(*lastDisplayedLineIndex >= 0);
            MUX_ASSERT(*lastDisplayedLineIndex < lineCount);

            if (*firstDisplayedLineIndex > *lastDisplayedLineIndex)
            {
                *firstDisplayedLineIndex = *lastDisplayedLineIndex = -1;
            }
        }
    }
    // else actualLineHeight is large enough that no line can be fully displayed in the scroll viewport.

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, forFullyDisplayedLines ? L"fullyDisplayedLines" : L"displayedLines", *firstDisplayedLineIndex, *lastDisplayedLineIndex);
}

void GetFirstFullyRealizedLineIndex | ( | int * | firstFullyRealizedLineIndex,
 |  | int * | firstItemInFullyRealizedLine |
 | ) |  |  | const [private]

Definition at line 3777 of file LinedFlowLayout.cpp.

{
    const int firstRealizedItemIndex = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;

    if (firstRealizedItemIndex == -1)
    {
        *firstFullyRealizedLineIndex = -1;
        *firstItemInFullyRealizedLine = -1;
        return;
    }

    int sizedItemIndex = m_firstSizedItemIndex == -1 ? 0 : m_firstSizedItemIndex;
    int sizedLineIndex = m_firstSizedLineIndex == -1 ? 0 : m_firstSizedLineIndex;
    int sizedLineVectorIndex = 0;

    MUX_ASSERT(firstRealizedItemIndex >= 0);
    MUX_ASSERT(sizedItemIndex >= 0);
    MUX_ASSERT(sizedLineIndex >= 0);

    while (sizedItemIndex < firstRealizedItemIndex)
    {
        sizedItemIndex += m_lineItemCounts[sizedLineVectorIndex];
        sizedLineIndex++;
        sizedLineVectorIndex++;
    }

    MUX_ASSERT(m_lastSizedLineIndex == -1 || sizedLineIndex <= m_lastSizedLineIndex);
    MUX_ASSERT(m_lastSizedItemIndex == -1 || sizedItemIndex <= m_lastSizedItemIndex);

    *firstFullyRealizedLineIndex = sizedLineIndex;
    *firstItemInFullyRealizedLine = sizedItemIndex;
}

int GetFirstItemIndexInLineIndex ( int lineVectorIndex ) const [private]

Definition at line 3813 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(lineVectorIndex >= 0);
    MUX_ASSERT(lineVectorIndex < static_cast<int>(m_lineItemCounts.size()));

    int itemIndex = 0;

    for (int lineVectorIndexTmp = 0; lineVectorIndexTmp < lineVectorIndex; lineVectorIndexTmp++)
    {
        itemIndex += m_lineItemCounts[lineVectorIndexTmp];
    }

    return itemIndex;
}

int GetFrozenLineIndexFromFrozenItemIndex ( int frozenItemIndex ) const [private]

Definition at line 3829 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_firstSizedLineIndex != -1);
    MUX_ASSERT(m_lastSizedLineIndex != -1);
    MUX_ASSERT(frozenItemIndex >= m_firstFrozenItemIndex);
    MUX_ASSERT(frozenItemIndex <= m_lastFrozenItemIndex);
    MUX_ASSERT(m_firstFrozenLineIndex != -1);
    MUX_ASSERT(m_lastFrozenLineIndex != -1);

    int frozenItemVectorIndex = frozenItemIndex - m_firstFrozenItemIndex;

    for (int frozenLineVectorIndex = m_firstFrozenLineIndex - m_firstSizedLineIndex;
        frozenLineVectorIndex <= m_lastFrozenLineIndex - m_firstSizedLineIndex;
        frozenLineVectorIndex++)
    {
        MUX_ASSERT(frozenLineVectorIndex >= 0);
        MUX_ASSERT(frozenLineVectorIndex < static_cast<int>(m_lineItemCounts.size()));

        if (frozenItemVectorIndex < m_lineItemCounts[frozenLineVectorIndex])
        {
            return frozenLineVectorIndex + m_firstSizedLineIndex;
        }
        frozenItemVectorIndex -= m_lineItemCounts[frozenLineVectorIndex];
    }

    MUX_ASSERT(false);
    return -1;
}

double GetItemDrawbackImprovement | ( | double | movingWidth,
 |  | double | availableWidth,
 |  | double | currentLineItemsWidth,
 |  | double | neighborLineItemsWidth,
 |  | int | currentLineIndex,
 |  | int | neighborLineIndex |
 | ) |  |  | [private]

Definition at line 3861 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(movingWidth - MinItemSpacing() <= currentLineItemsWidth);
    MUX_ASSERT(std::abs(currentLineIndex - neighborLineIndex) == 1);

    const int lastLineIndex = GetLineCount(m_averageItemsPerLine.second) - 1;
    double currentDrawback = 0.0;

    if (currentLineIndex != lastLineIndex || currentLineItemsWidth > availableWidth)
    {
        currentDrawback = std::pow(currentLineItemsWidth - availableWidth, 2.0);
    }

    if (neighborLineIndex != lastLineIndex || neighborLineItemsWidth > availableWidth)
    {
        currentDrawback += std::pow(neighborLineItemsWidth - availableWidth, 2.0);
    }

    double newDrawback = 0.0;

    if (currentLineIndex != lastLineIndex || currentLineItemsWidth - movingWidth > availableWidth)
    {
        newDrawback = std::pow(currentLineItemsWidth - movingWidth - availableWidth, 2.0);
    }

    if (neighborLineIndex != lastLineIndex || neighborLineItemsWidth + movingWidth > availableWidth)
    {
        newDrawback += std::pow(neighborLineItemsWidth + movingWidth - availableWidth, 2.0);
    }

    return currentDrawback - newDrawback;
}

int GetItemLineIndex ( winrt::UIElement const & element ) [private]

Definition at line 3901 of file LinedFlowLayout.cpp.

{
    const int sizedLineVectorCount = static_cast<int>(m_lineItemCounts.size());
    int sizedItemIndex = m_firstSizedItemIndex;

    for (int sizedLineVectorIndex = 0; sizedLineVectorIndex < sizedLineVectorCount; sizedLineVectorIndex++)
    {
        const int lineItemsCount = m_lineItemCounts[sizedLineVectorIndex];

        for (int itemVectorIndex = 0; itemVectorIndex < lineItemsCount; itemVectorIndex++)
        {
            if (m_elementManager.IsDataIndexRealized(sizedItemIndex) &&
                m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/) == element)
            {
                return sizedLineVectorIndex + m_firstSizedLineIndex;
            }

            sizedItemIndex++;
        }
    }

    return -1;
}

void GetItemsInfoRequestedRange | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | float | availableWidth,
 |  | double | actualLineHeight,
 |  | int * | itemsRangeStartIndex,
 |  | int * | itemsRangeRequestedLength |
 | ) |  |  | [private]

Definition at line 3927 of file LinedFlowLayout.cpp.

{
    if (m_isVirtualizingContext)
    {
        const float nearRealizationRect = GetRoundedFloat(context.RealizationRect().Y);
        const float farRealizationRect = nearRealizationRect + context.RealizationRect().Height;

        const double lineSpacing = LineSpacing();
        float sizedItemsRectHeight = GetSizedItemsRectHeight(context, actualLineHeight, lineSpacing);

        const float realizationRectHeightDeficit = std::max(0.0f, sizedItemsRectHeight - farRealizationRect + nearRealizationRect);
        float nearSizedItemsRect = nearRealizationRect - realizationRectHeightDeficit / 2.0f;
        float farSizedItemsRect = farRealizationRect + realizationRectHeightDeficit / 2.0f;

        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"sizedItemsRectHeight", sizedItemsRectHeight);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"nearRealizationRect", nearRealizationRect);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"farRealizationRect", farRealizationRect);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"realizationRectHeightDeficit", realizationRectHeightDeficit);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"nearSizedItemsRect", nearSizedItemsRect);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"farSizedItemsRect", farSizedItemsRect);

        const double minItemSpacing = MinItemSpacing();
        // Either an average was recorded in a prior measure pass, or the items are considered square for an initial rough estimation.
        const double averageItemsPerLine = m_averageItemsPerLine.second == 0.0 ? ((availableWidth + minItemSpacing) / (actualLineHeight + minItemSpacing)) : m_averageItemsPerLine.second;

        MUX_ASSERT(averageItemsPerLine > 0.0);

        const int lineCount = GetLineCount(averageItemsPerLine);

        MUX_ASSERT(lineCount >= 0);

        const int newRecommendedAnchorIndex = context.RecommendedAnchorIndex();

        sizedItemsRectHeight = farSizedItemsRect - nearSizedItemsRect;

        if (m_anchorIndex != -1 || newRecommendedAnchorIndex != -1)
        {
            const int anchorLineIndex = static_cast<int>((newRecommendedAnchorIndex == -1 ? m_anchorIndex : newRecommendedAnchorIndex) / averageItemsPerLine);

            MUX_ASSERT(anchorLineIndex >= 0);
            MUX_ASSERT(anchorLineIndex < lineCount);

            const float anchorLineNearEdge = static_cast<float>(anchorLineIndex * (actualLineHeight + lineSpacing));

            // Check if the sized items rect overlaps the anticipated anchor line, with 1 line of margin of error in the line index approximation.
            if (anchorLineNearEdge - 2 * actualLineHeight - lineSpacing <= nearSizedItemsRect || anchorLineNearEdge + actualLineHeight + lineSpacing >= farSizedItemsRect)
            {
                // Ensure the anchor index is sized by using a non-inflated sizing rect centered around the middle of the anticipated anchor line.
                const float anchorLineMiddle = static_cast<float>(anchorLineNearEdge + actualLineHeight / 2.0);

                sizedItemsRectHeight = farRealizationRect - nearRealizationRect;
                nearSizedItemsRect = GetRoundedFloat(anchorLineMiddle - sizedItemsRectHeight / 2.0f);
                farSizedItemsRect = nearSizedItemsRect + sizedItemsRectHeight;

                LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"nearSizedItemsRect", nearSizedItemsRect);
                LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"farSizedItemsRect", farSizedItemsRect);
            }
        }

        const double linesSpacing = lineCount == 0 ? 0.0 : (static_cast<double>(lineCount) - 1) * lineSpacing;
        const double linesHeight = lineCount * actualLineHeight + linesSpacing;
        const double scrollViewport = context.VisibleRect().Height;
        const double scrollableSize = std::max(0.0, linesHeight - scrollViewport);

        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"linesHeight", linesHeight);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollViewport", scrollViewport);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollableSize", scrollableSize);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"sizedItemsRectHeight", sizedItemsRectHeight);

        // nearSizedItemsRect must not be negative.
        if (nearSizedItemsRect < 0.0)
        {
            sizedItemsRectHeight += nearSizedItemsRect;
            nearSizedItemsRect = 0.0;

            MUX_ASSERT(sizedItemsRectHeight >= 0.0f);
        }

        // farSizedItemsRect must not exceed the extent value.
        if (farSizedItemsRect > linesHeight)
        {
            sizedItemsRectHeight += static_cast<float>(linesHeight - farSizedItemsRect);
            farSizedItemsRect = static_cast<float>(linesHeight);

            MUX_ASSERT(sizedItemsRectHeight >= 0.0f);
        }

        // clampedNearSizedItemsRect must not exceed the max offset value.
        double clampedNearSizedItemsRect = std::min(scrollableSize, static_cast<double>(nearSizedItemsRect));

        // clampedFarSizedItemsRect must not exceed the extent value.
        double clampedFarSizedItemsRect = std::max(clampedNearSizedItemsRect + sizedItemsRectHeight, static_cast<double>(farSizedItemsRect));
        clampedFarSizedItemsRect = std::min(linesHeight, clampedFarSizedItemsRect);

        clampedNearSizedItemsRect = std::min(clampedFarSizedItemsRect - sizedItemsRectHeight, clampedNearSizedItemsRect);
        clampedNearSizedItemsRect = std::max(0.0, clampedNearSizedItemsRect);

        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"clampedNearSizedItemsRect", clampedNearSizedItemsRect);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"clampedFarSizedItemsRect", clampedFarSizedItemsRect);

        MUX_ASSERT(clampedFarSizedItemsRect - clampedNearSizedItemsRect <= sizedItemsRectHeight + 0.001);
        MUX_ASSERT(clampedNearSizedItemsRect >= 0.0);
        MUX_ASSERT(clampedNearSizedItemsRect <= scrollableSize);
        MUX_ASSERT(clampedFarSizedItemsRect >= 0.0);
        MUX_ASSERT(clampedFarSizedItemsRect <= linesHeight);

        int firstSizedLineIndex{ -1 };
        int lastSizedLineIndex{ -1 };

        GetFirstAndLastDisplayedLineIndexes(
            clampedFarSizedItemsRect - clampedNearSizedItemsRect /*scrollViewport*/,
            clampedNearSizedItemsRect /*scrollOffset*/,
            0 /*padding*/,
            lineSpacing,
            actualLineHeight,
            lineCount,
            false /*forFullyDisplayedLines*/,
            &firstSizedLineIndex,
            &lastSizedLineIndex);

        MUX_ASSERT(firstSizedLineIndex >= 0);
        MUX_ASSERT(lastSizedLineIndex >= 0);
        MUX_ASSERT(firstSizedLineIndex < lineCount);
        MUX_ASSERT(lastSizedLineIndex < lineCount);

        int newFirstSizedItemIndex = std::max(0, static_cast<int>(firstSizedLineIndex * averageItemsPerLine) - 1);
        int newLastSizedItemIndex = std::min(m_itemCount - 1, static_cast<int>((lastSizedLineIndex + 1) * averageItemsPerLine));

        MUX_ASSERT(newFirstSizedItemIndex >= 0);
        MUX_ASSERT(newLastSizedItemIndex >= 0);
        MUX_ASSERT(newFirstSizedItemIndex < m_itemCount);
        MUX_ASSERT(newLastSizedItemIndex < m_itemCount);

        *itemsRangeStartIndex = newFirstSizedItemIndex;
        *itemsRangeRequestedLength = newLastSizedItemIndex - newFirstSizedItemIndex + 1;
    }
    else
    {
        // All items are realized in non-virtualizing mode, and the fast path requests items info for the entire source collection.
        MUX_ASSERT(context.VisibleRect().Y == 0.0f);

        *itemsRangeStartIndex = 0;
        *itemsRangeRequestedLength = m_itemCount;
    }
}

LinedFlowLayout::ItemsLayout GetItemsLayout | ( | std::map< int, int > * | internalLockedItemIndexes,
 |  | double | scrollViewport,
 |  | double | availableWidth,
 |  | double | adjustedAvailableWidth,
 |  | double | averageLineItemsWidth,
 |  | double | averageAspectRatio,
 |  | double | lineSpacing,
 |  | double | actualLineHeight,
 |  | int | beginSizedLineIndex,
 |  | int | endSizedLineIndex,
 |  | int | beginSizedItemIndex,
 |  | int | endSizedItemIndex,
 |  | int | beginLineVectorIndex,
 |  | bool | isLastSizedLineStretchEnabled |
 | ) |  |  | [private]

Definition at line 4095 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
    MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
    MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));

    const bool forward = beginSizedItemIndex <= endSizedItemIndex;
    const int sizedLineCount = forward ? endSizedLineIndex - beginSizedLineIndex + 1 : beginSizedLineIndex - endSizedLineIndex + 1;
    const double minItemSpacing = MinItemSpacing();
    int lineVectorIndex;
    int lineItemsCount = 0;
    int lastItemIndex = std::numeric_limits<int>::max();
    double cumulatedLinesWidth = 0.0;
    double cumulatedWidth = 0.0;
    double lastItemWidth = std::numeric_limits<double>::max();
    std::vector<double> headItemWidths(sizedLineCount);
    std::vector<double> tailItemWidths(sizedLineCount);
    std::vector<double> headItemDrawbackImprovements(sizedLineCount);
    std::vector<double> tailItemDrawbackImprovements(sizedLineCount);
    std::vector<int> headItemIndexes(sizedLineCount, std::numeric_limits<int>::max());
    std::vector<int> tailItemIndexes(sizedLineCount, std::numeric_limits<int>::max());

#ifdef DBG
    MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));
    MUX_ASSERT(internalLockedItemIndexes != nullptr);
    MUX_ASSERT(!forward || beginSizedItemIndex >= m_firstSizedItemIndex);
    MUX_ASSERT(!forward || endSizedItemIndex <= m_lastSizedItemIndex);
    MUX_ASSERT(forward || endSizedItemIndex >= m_firstSizedItemIndex);
    MUX_ASSERT(forward || beginSizedItemIndex <= m_lastSizedItemIndex);

    VerifyInternalLockedItemsDbg(
        *internalLockedItemIndexes,
        beginSizedLineIndex,
        endSizedLineIndex,
        beginSizedItemIndex,
        endSizedItemIndex);
#endif

    ItemsLayout itemsLayout;

    itemsLayout.m_availableLineItemsWidth = adjustedAvailableWidth;
    itemsLayout.m_lineItemCounts.resize(sizedLineCount);
    itemsLayout.m_lineItemWidths.resize(sizedLineCount);

    lineVectorIndex = forward ? 0 : sizedLineCount - 1;

#ifdef DBG
    const int lineCountDbg = GetLineCount(m_averageItemsPerLine.second);
    const int sizedItemCountDbg = forward ? endSizedItemIndex - beginSizedItemIndex + 1 : beginSizedItemIndex - endSizedItemIndex + 1;

    MUX_ASSERT(sizedItemCountDbg >= sizedLineCount);
#endif

    for (int sizedItemIndex = beginSizedItemIndex; ; sizedItemIndex = forward ? sizedItemIndex + 1 : sizedItemIndex - 1)
    {
        double itemWidth{};

        if (m_itemsInfoFirstIndex == -1)
        {
            MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndex));

            if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
            {
                itemWidth = element.DesiredSize().Width;

#ifdef DBG
                const auto frameworkElementDbg = element.try_as<winrt::FrameworkElement>();

                if (frameworkElementDbg)
                {
                    if (itemWidth < frameworkElementDbg.MinWidth() - 1.0 / m_roundingScaleFactor)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, itemWidth, frameworkElementDbg.MinWidth());
                    }
                    if (itemWidth > frameworkElementDbg.MaxWidth() + 1.0 / m_roundingScaleFactor)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, itemWidth, frameworkElementDbg.MaxWidth());
                    }
                    MUX_ASSERT(itemWidth >= frameworkElementDbg.MinWidth() - 1.0 / m_roundingScaleFactor);
                    MUX_ASSERT(itemWidth <= frameworkElementDbg.MaxWidth() + 1.0 / m_roundingScaleFactor);
                }
#endif
            }
        }
        else
        {
            MUX_ASSERT(sizedItemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));

            const double desiredMinWidth = GetMinWidthFromItemsInfo(sizedItemIndex);
            const double desiredMaxWidth = GetMaxWidthFromItemsInfo(sizedItemIndex);
            double desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForRegularPath[static_cast<size_t>(sizedItemIndex) - m_itemsInfoFirstIndex];

            if (desiredAspectRatio <= 0.0)
            {
                // The average aspect ratio is used as a fallback value for items that were given a negative ratio
                // by the ItemsInfoRequested handler.
                desiredAspectRatio = averageAspectRatio;
            }

            itemWidth = desiredAspectRatio * actualLineHeight;

            if (desiredMinWidth >= 0.0)
            {
                itemWidth = std::max(desiredMinWidth, itemWidth);
            }

            if (desiredMaxWidth >= 0.0)
            {
                itemWidth = std::min(desiredMaxWidth, itemWidth);
            }
        }

        const auto& internalLockedItemIndexesIterator = internalLockedItemIndexes->find(sizedItemIndex);
        const bool isInternalLockedItem = internalLockedItemIndexesIterator != internalLockedItemIndexes->end();
        const int internalLockedLineIndex = isInternalLockedItem ? internalLockedItemIndexesIterator->second : -1;

        MUX_ASSERT(!forward || beginSizedLineIndex + lineVectorIndex < lineCountDbg);
        MUX_ASSERT(forward || endSizedLineIndex + lineVectorIndex < lineCountDbg);

        const bool isLockedItem = IsLockedItem(
            forward,
            beginSizedLineIndex,
            endSizedLineIndex,
            sizedItemIndex);

        const int lockedLineIndex = isLockedItem ? m_lockedItemIndexes[sizedItemIndex] : -1;

        int nextLockedItemIndex, nextLockedLineIndex;

        GetNextLockedItem(
            internalLockedItemIndexes,
            forward,
            beginSizedLineIndex,
            endSizedLineIndex,
            sizedItemIndex,
            &nextLockedItemIndex,
            &nextLockedLineIndex);

        MUX_ASSERT(!(nextLockedItemIndex == -1 && nextLockedLineIndex != -1));
        MUX_ASSERT(!(nextLockedItemIndex != -1 && nextLockedLineIndex == -1));

        // mustCumulate is set to True when 'element' must be appended to the current line.
        const bool mustCumulate =
            lineItemsCount == 0 ||                                                                                                                            // No item is present on the current line - it must at least contain one item
            (forward && LineHasLockedItem(beginSizedLineIndex + lineVectorIndex, false /*before*/, sizedItemIndex)) ||                                        // A publicly locked item is ahead going forward, and must be on the current line
            (!forward && LineHasLockedItem(endSizedLineIndex + lineVectorIndex, true /*before*/, sizedItemIndex)) ||                                          // A publicly locked item is ahead going backward, and must be on the current line
            (forward && LineHasInternalLockedItem(*internalLockedItemIndexes, beginSizedLineIndex + lineVectorIndex, false /*before*/, sizedItemIndex)) ||    // An internally locked item is ahead going forward, and must be on the current line
            (!forward && LineHasInternalLockedItem(*internalLockedItemIndexes, endSizedLineIndex + lineVectorIndex, true /*before*/, sizedItemIndex)) ||      // An internally locked item is ahead going backward, and must be on the current line
            (forward && lineVectorIndex == sizedLineCount - 1) ||                                                                                             // The current line is the last one processed, going forward
            (!forward && lineVectorIndex == 0);                                                                                                               // The current line is the last one processed, going backward
        // canCumulate is set to True when 'element' has enough room to fit in the current line.
        const bool canCumulate = cumulatedWidth + (lineItemsCount == 0.0 ? 0.0 : minItemSpacing) + itemWidth <= adjustedAvailableWidth;
        // mustNotCumulate is set to True when 'element' must wrap to the next line.
        bool mustNotCumulate = false;
        // shouldNotCumulate is set to True when there is no mandatory assignment for 'element', there is still room for it on the current line,
        // but in order to equalize lines, wrapping is preferred over not wrapping,
        //   - because of an upcoming publicly locked item,
        //   - because the cumulated item widths significantly exceeds the expected one given the line index.
        bool shouldNotCumulate = false;
        // shouldCumulate is set to True when there is no mandatory assignment for 'element', there is no room for it on the current line,
        // but in order to equalize lines, wrapping is skipped because the cumulated item widths is significantly lower than the expected one given the line index.
        bool shouldCumulate = false;

#ifdef DBG
        // mustNotCumulateDbg is a replica of mustNotCumulate below. It is only evaluated in debug mode for the purpose of the assertion
        // in order to detect an expected situation where the current item must and must not belong to the current line at the same time.
        // This avoids the evaluation of mustNotCumulate when not needed in retail mode.
        const bool mustNotCumulateDbg =
            (forward && endSizedItemIndex - sizedItemIndex < sizedLineCount - 1 - lineVectorIndex) ||
            (!forward && sizedItemIndex - endSizedItemIndex < lineVectorIndex) ||
            (forward && isLockedItem && lockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||
            (!forward && isLockedItem && lockedLineIndex != endSizedLineIndex + lineVectorIndex) ||
            (forward && isInternalLockedItem && internalLockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||
            (!forward && isInternalLockedItem && internalLockedLineIndex != endSizedLineIndex + lineVectorIndex) ||
            (forward && nextLockedItemIndex != -1 && nextLockedItemIndex - sizedItemIndex < nextLockedLineIndex - (beginSizedLineIndex + lineVectorIndex)) ||
            (!forward && nextLockedItemIndex != -1 && sizedItemIndex - nextLockedItemIndex < endSizedLineIndex + lineVectorIndex - nextLockedLineIndex);

        MUX_ASSERT(!(mustCumulate && mustNotCumulateDbg));
#endif

        if (!mustCumulate)
        {
            mustNotCumulate =
                (forward && endSizedItemIndex - sizedItemIndex < sizedLineCount - 1 - lineVectorIndex) ||                                                         // There are as many items left as there are lines, going forward
                (!forward && sizedItemIndex - endSizedItemIndex < lineVectorIndex) ||                                                                             // There are as many items left as there are lines, going backward
                (forward && isLockedItem && lockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||                                                          // 'element' is a publicly locked item for the next line, going forward
                (!forward && isLockedItem && lockedLineIndex != endSizedLineIndex + lineVectorIndex) ||                                                           // 'element' is a publicly locked item for the next line, going backward
                (forward && isInternalLockedItem && internalLockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||                                          // 'element' is an internally locked item for the next line, going forward
                (!forward && isInternalLockedItem && internalLockedLineIndex != endSizedLineIndex + lineVectorIndex) ||                                           // 'element' is an internally locked item for the next line, going backward
                (forward && nextLockedItemIndex != -1 && nextLockedItemIndex - sizedItemIndex < nextLockedLineIndex - (beginSizedLineIndex + lineVectorIndex)) || // A locked item is ahead, going forward, just far enough to impose the minimum of one item per line
                (!forward && nextLockedItemIndex != -1 && sizedItemIndex - nextLockedItemIndex < endSizedLineIndex + lineVectorIndex - nextLockedLineIndex);      // A locked item is ahead, going backward, just far enough to impose the minimum of one item per line

            if (!mustNotCumulate)
            {
                if (canCumulate)
                {
                    if (nextLockedItemIndex != -1)
                    {
                        // Avoiding under-filled lines around publicly locked items.
                        int nextPublicLockedItemIndex, nextPublicLockedLineIndex;

                        GetNextLockedItem(
                            nullptr,
                            forward,
                            beginSizedLineIndex,
                            endSizedLineIndex,
                            sizedItemIndex,
                            &nextPublicLockedItemIndex,
                            &nextPublicLockedLineIndex);

                        if (nextPublicLockedItemIndex != -1)
                        {
                            MUX_ASSERT(nextPublicLockedLineIndex != -1);

                            const int linesToFill = forward ? nextPublicLockedLineIndex - beginSizedLineIndex - lineVectorIndex : endSizedLineIndex + lineVectorIndex - nextPublicLockedLineIndex;
                            const int linesPerScrollViewport = static_cast<int>(scrollViewport / (actualLineHeight + lineSpacing));

                            if (linesToFill <= linesPerScrollViewport)
                            {
                                MUX_ASSERT(lineItemsCount > 0);

                                const int itemsAvailable = forward ? nextPublicLockedItemIndex - sizedItemIndex + lineItemsCount : sizedItemIndex - nextPublicLockedItemIndex + lineItemsCount;
                                const int averageItemsToFill = static_cast<int>(m_averageItemsPerLine.second * linesToFill);

                                // shouldNotCumulate is set to true to wrap earlier than necessary to avoid under-filled lines around the publicly locked item.
                                shouldNotCumulate = itemsAvailable < averageItemsToFill;
                            }
                        }
                    }
                }

                if (averageLineItemsWidth > 0.0 && ((canCumulate && !shouldNotCumulate) || !canCumulate))
                {
                    MUX_ASSERT(!mustCumulate);
                    MUX_ASSERT(!mustNotCumulate);

                    // Check if cumulated total line widths is much larger or smaller than expected total based on average line width.
                    const int lineCount = forward ? (lineVectorIndex + 1) : (sizedLineCount - lineVectorIndex);
                    MUX_ASSERT(lineCount > 0);
                    const double itemWidthMultiplierThreshold = GetItemWidthMultiplierThreshold();
                    const double expectedCumulatedLinesWidth = averageLineItemsWidth * lineCount;
                    const double actualCumulatedLinesWidth = cumulatedLinesWidth + cumulatedWidth + itemWidth;

                    if (canCumulate && !shouldNotCumulate)
                    {
                        if (actualCumulatedLinesWidth - expectedCumulatedLinesWidth > itemWidthMultiplierThreshold * itemWidth)
                        {
                            // In order to equalize lines, wrapping is preferred over not wrapping because the cumulated item widths significantly exceeds the expected one given the line index.
                            shouldNotCumulate = true;
                        }
                    }
                    else
                    {
                        MUX_ASSERT(!canCumulate);
                        MUX_ASSERT(!shouldNotCumulate);

                        if (expectedCumulatedLinesWidth - actualCumulatedLinesWidth > itemWidthMultiplierThreshold * itemWidth)
                        {
                            // In order to equalize lines, not wrapping is preferred over wrapping because the cumulated item widths is significantly lower than the expected one given the line index.
                            shouldCumulate = true;
                        }
                    }
                }
            }
        }

        MUX_ASSERT(!shouldNotCumulate || !shouldCumulate);

        if (mustCumulate || ((canCumulate || shouldCumulate) && !mustNotCumulate && !shouldNotCumulate))
        {
            // The current item sizedItemIndex is appended on the current line.
            if (isLockedItem ||
                isInternalLockedItem ||
                sizedItemIndex == beginSizedItemIndex ||
                sizedItemIndex == endSizedItemIndex)
            {
                lastItemWidth = std::numeric_limits<double>::max();
                lastItemIndex = std::numeric_limits<int>::max();
            }
            else
            {
                lastItemWidth = itemWidth;
                lastItemIndex = sizedItemIndex;
            }

            if (lineItemsCount != 0.0)
            {
                cumulatedWidth += minItemSpacing;
            }

            cumulatedWidth += itemWidth;
            lineItemsCount++;
        }
        else
        {
            // The current item sizedItemIndex creates a brand new line.
            MUX_ASSERT(lineItemsCount > 0);

            if (lastItemWidth != std::numeric_limits<double>::max())
            {
                tailItemWidths[lineVectorIndex] = lastItemWidth;
                tailItemIndexes[lineVectorIndex] = lastItemIndex;

                lastItemWidth = std::numeric_limits<double>::max();
                lastItemIndex = std::numeric_limits<int>::max();
            }

            cumulatedLinesWidth += cumulatedWidth;
            cumulatedWidth = itemWidth;
            lineItemsCount = 1;

            if (isLockedItem)
            {
                lineVectorIndex = lockedLineIndex - (forward ? beginSizedLineIndex : endSizedLineIndex);
                MUX_ASSERT(lineVectorIndex >= 0);
                MUX_ASSERT(lineVectorIndex <= sizedLineCount - 1);
            }
            else if (isInternalLockedItem)
            {
                lineVectorIndex = internalLockedLineIndex - (forward ? beginSizedLineIndex : endSizedLineIndex);
                MUX_ASSERT(lineVectorIndex >= 0);
                MUX_ASSERT(lineVectorIndex <= sizedLineCount - 1);
            }
            else if (sizedItemIndex == endSizedItemIndex)
            {
                lineVectorIndex = forward ? sizedLineCount - 1 : 0;
#ifdef DBG
                if (forward)
                {
                    MUX_ASSERT(lineVectorIndex == 0 || itemsLayout.m_lineItemCounts[lineVectorIndex - 1] > 0);
                }
                else
                {
                    MUX_ASSERT(lineVectorIndex == sizedLineCount - 1 || itemsLayout.m_lineItemCounts[lineVectorIndex + 1] > 0);
                }
#endif
            }
            else
            {
                MUX_ASSERT(itemsLayout.m_lineItemCounts[lineVectorIndex] > 0);
                lineVectorIndex = forward ? lineVectorIndex + 1 : lineVectorIndex - 1;
                MUX_ASSERT(lineVectorIndex >= 0);
                MUX_ASSERT(lineVectorIndex <= sizedLineCount - 1);
            }

            if (!isLockedItem &&
                !isInternalLockedItem &&
                sizedItemIndex != beginSizedItemIndex &&
                sizedItemIndex != endSizedItemIndex &&
                ((forward && endSizedItemIndex - sizedItemIndex >= sizedLineCount - lineVectorIndex) ||
                    (!forward && sizedItemIndex - endSizedItemIndex > lineVectorIndex)))
            {
                headItemWidths[lineVectorIndex] = itemWidth;
                headItemIndexes[lineVectorIndex] = sizedItemIndex;
            }
        }

        itemsLayout.m_lineItemCounts[lineVectorIndex] = lineItemsCount;
        itemsLayout.m_lineItemWidths[lineVectorIndex] = cumulatedWidth;

        if (sizedItemIndex == endSizedItemIndex)
        {
            break;
        }
    }

#ifdef DBG
    if (forward)
    {
        MUX_ASSERT(headItemWidths[0] == 0.0);
        MUX_ASSERT(headItemIndexes[0] == std::numeric_limits<int>::max());
        MUX_ASSERT(tailItemWidths[sizedLineCount - 1] == 0.0);
        MUX_ASSERT(tailItemIndexes[sizedLineCount - 1] == std::numeric_limits<int>::max());
    }
    else
    {
        MUX_ASSERT(tailItemWidths[0] == 0.0);
        MUX_ASSERT(tailItemIndexes[0] == std::numeric_limits<int>::max());
        MUX_ASSERT(headItemWidths[sizedLineCount - 1] == 0.0);
        MUX_ASSERT(headItemIndexes[sizedLineCount - 1] == std::numeric_limits<int>::max());
    }

    for (lineVectorIndex = 1; lineVectorIndex < sizedLineCount; lineVectorIndex++)
    {
        MUX_ASSERT(headItemIndexes[lineVectorIndex - 1] == std::numeric_limits<int>::max() ||
            headItemIndexes[lineVectorIndex] == std::numeric_limits<int>::max() ||
            headItemIndexes[lineVectorIndex - 1] < headItemIndexes[lineVectorIndex]);
        MUX_ASSERT(tailItemIndexes[lineVectorIndex - 1] == std::numeric_limits<int>::max() ||
            tailItemIndexes[lineVectorIndex] == std::numeric_limits<int>::max() ||
            tailItemIndexes[lineVectorIndex - 1] < tailItemIndexes[lineVectorIndex]);
    }
#endif

    for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
    {
        if (headItemWidths[lineVectorIndex] != 0.0 && itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
        {
            MUX_ASSERT(!forward || lineVectorIndex - 1 >= 0);
            MUX_ASSERT(forward || lineVectorIndex + 1 < sizedLineCount);

            headItemDrawbackImprovements[lineVectorIndex] = GetItemDrawbackImprovement(
                headItemWidths[lineVectorIndex] + minItemSpacing,
                adjustedAvailableWidth,
                itemsLayout.m_lineItemWidths[lineVectorIndex],
                itemsLayout.m_lineItemWidths[forward ? lineVectorIndex - 1 : lineVectorIndex + 1],
                beginLineVectorIndex + lineVectorIndex,
                beginLineVectorIndex + (forward ? lineVectorIndex - 1 : lineVectorIndex + 1));
        }

        if (tailItemWidths[lineVectorIndex] != 0.0 && itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
        {
            MUX_ASSERT(!forward || lineVectorIndex + 1 < sizedLineCount);
            MUX_ASSERT(forward || lineVectorIndex - 1 >= 0);

            tailItemDrawbackImprovements[lineVectorIndex] = GetItemDrawbackImprovement(
                tailItemWidths[lineVectorIndex] + minItemSpacing,
                adjustedAvailableWidth,
                itemsLayout.m_lineItemWidths[lineVectorIndex],
                itemsLayout.m_lineItemWidths[forward ? lineVectorIndex + 1 : lineVectorIndex - 1],
                beginLineVectorIndex + lineVectorIndex,
                beginLineVectorIndex + (forward ? lineVectorIndex + 1 : lineVectorIndex - 1));
        }
    }

#ifdef DBG
    if (forward)
    {
        MUX_ASSERT(headItemDrawbackImprovements[0] == 0.0);
        MUX_ASSERT(tailItemDrawbackImprovements[sizedLineCount - 1] == 0.0);
    }
    else
    {
        MUX_ASSERT(tailItemDrawbackImprovements[0] == 0.0);
        MUX_ASSERT(headItemDrawbackImprovements[sizedLineCount - 1] == 0.0);
    }
#endif

    double smallestHeadItemWidth = std::numeric_limits<double>::max();
    double smallestTailItemWidth = std::numeric_limits<double>::max();
    double bestEqualizingHeadItemDrawbackImprovement = 0.0;
    double bestEqualizingTailItemDrawbackImprovement = 0.0;
    int smallestHeadItemIndex = std::numeric_limits<int>::max();
    int smallestTailItemIndex = std::numeric_limits<int>::max();
    int smallestHeadLineIndex = std::numeric_limits<int>::max();
    int smallestTailLineIndex = std::numeric_limits<int>::max();
    int bestEqualizingHeadItemIndex = std::numeric_limits<int>::max();
    int bestEqualizingTailItemIndex = std::numeric_limits<int>::max();
    int bestEqualizingHeadLineIndex = std::numeric_limits<int>::max();
    int bestEqualizingTailLineIndex = std::numeric_limits<int>::max();

    for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
    {
        if (smallestHeadItemWidth > headItemWidths[lineVectorIndex] &&
            headItemWidths[lineVectorIndex] > 0.0)
        {
            smallestHeadItemWidth = headItemWidths[lineVectorIndex];
            smallestHeadItemIndex = headItemIndexes[lineVectorIndex];
            smallestHeadLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
        }

        if (bestEqualizingHeadItemDrawbackImprovement < headItemDrawbackImprovements[lineVectorIndex])
        {
            bestEqualizingHeadItemDrawbackImprovement = headItemDrawbackImprovements[lineVectorIndex];
            bestEqualizingHeadItemIndex = headItemIndexes[lineVectorIndex];
            bestEqualizingHeadLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
        }

        if (itemsLayout.m_lineItemWidths[lineVectorIndex] <= adjustedAvailableWidth &&
            tailItemWidths[lineVectorIndex] > 0.0 &&
            smallestTailItemWidth > tailItemWidths[lineVectorIndex] + adjustedAvailableWidth - itemsLayout.m_lineItemWidths[lineVectorIndex])
        {
            smallestTailItemWidth = tailItemWidths[lineVectorIndex] + adjustedAvailableWidth - itemsLayout.m_lineItemWidths[lineVectorIndex];
            smallestTailItemIndex = tailItemIndexes[lineVectorIndex];
            smallestTailLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
        }

        if (bestEqualizingTailItemDrawbackImprovement < tailItemDrawbackImprovements[lineVectorIndex])
        {
            bestEqualizingTailItemDrawbackImprovement = tailItemDrawbackImprovements[lineVectorIndex];
            bestEqualizingTailItemIndex = tailItemIndexes[lineVectorIndex];
            bestEqualizingTailLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
        }
    }

#ifdef DBG
    if (forward)
    {
        MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex > beginSizedLineIndex);
        MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex <= endSizedLineIndex);
        MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex >= beginSizedLineIndex);
        MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex < endSizedLineIndex);

        MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex > beginSizedLineIndex);
        MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex <= endSizedLineIndex);
        MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex >= beginSizedLineIndex);
        MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex < endSizedLineIndex);
    }
    else
    {
        MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex >= endSizedLineIndex);
        MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex < beginSizedLineIndex);
        MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex > endSizedLineIndex);
        MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex <= beginSizedLineIndex);

        MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex >= endSizedLineIndex);
        MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex < beginSizedLineIndex);
        MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex > endSizedLineIndex);
        MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex <= beginSizedLineIndex);
    }

    MUX_ASSERT(smallestHeadItemIndex != beginSizedItemIndex);
    MUX_ASSERT(smallestHeadItemIndex != endSizedItemIndex);
    MUX_ASSERT(smallestTailItemIndex != beginSizedItemIndex);
    MUX_ASSERT(smallestTailItemIndex != endSizedItemIndex);

    MUX_ASSERT(bestEqualizingHeadItemIndex != beginSizedItemIndex);
    MUX_ASSERT(bestEqualizingHeadItemIndex != endSizedItemIndex);
    MUX_ASSERT(bestEqualizingTailItemIndex != beginSizedItemIndex);
    MUX_ASSERT(bestEqualizingTailItemIndex != endSizedItemIndex);
#endif

    itemsLayout.m_smallestHeadItemWidth = smallestHeadItemWidth;
    itemsLayout.m_smallestTailItemWidth = smallestTailItemWidth;
    itemsLayout.m_smallestHeadItemIndex = smallestHeadItemIndex;
    itemsLayout.m_smallestTailItemIndex = smallestTailItemIndex;
    itemsLayout.m_smallestHeadLineIndex = smallestHeadLineIndex;
    itemsLayout.m_smallestTailLineIndex = smallestTailLineIndex;

    itemsLayout.m_bestEqualizingHeadItemDrawbackImprovement = bestEqualizingHeadItemDrawbackImprovement;
    itemsLayout.m_bestEqualizingTailItemDrawbackImprovement = bestEqualizingTailItemDrawbackImprovement;
    itemsLayout.m_bestEqualizingHeadItemIndex = bestEqualizingHeadItemIndex;
    itemsLayout.m_bestEqualizingTailItemIndex = bestEqualizingTailItemIndex;
    itemsLayout.m_bestEqualizingHeadLineIndex = bestEqualizingHeadLineIndex;
    itemsLayout.m_bestEqualizingTailLineIndex = bestEqualizingTailLineIndex;

    // When itemsLayout.m_smallestTailItemWidth == std::numeric_limits<double>::max(), i.e. when all itemsLayout.m_lineItemWidths[lineVectorIndex] are greater
    // than adjustedAvailableWidth, it's not worth collapsing the adjustedAvailableWidth.
    // When all itemsLayout.m_lineItemWidths[lineVectorIndex] are smaller than adjustedAvailableWidth, it's not worth expanding the adjustedAvailableWidth.

    ComputeItemsLayoutDrawback(availableWidth, isLastSizedLineStretchEnabled, itemsLayout);

#ifdef DBG
    MUX_ASSERT(itemsLayout.m_lineItemCounts[0] > 0);
    MUX_ASSERT(itemsLayout.m_lineItemCounts[sizedLineCount - 1] > 0);

    int lineItemCountsDbg = 0;

    for (lineVectorIndex = 0; lineVectorIndex < static_cast<int>(itemsLayout.m_lineItemCounts.size()); lineVectorIndex++)
    {
        MUX_ASSERT(itemsLayout.m_lineItemCounts[lineVectorIndex] > 0);

        lineItemCountsDbg += itemsLayout.m_lineItemCounts[lineVectorIndex];
    }

    MUX_ASSERT(sizedItemCountDbg == lineItemCountsDbg);
#endif

    return itemsLayout;
}

float GetItemsRangeArrangeWidth | ( | int | beginSizedItemIndex,
 |  | int | endSizedItemIndex,
 |  | bool | usesArrangeWidthInfo |
 | ) |  |  | [private]

Definition at line 4670 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(beginSizedItemIndex >= 0);
    MUX_ASSERT(endSizedItemIndex < m_itemCount);
    MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex);
    MUX_ASSERT(!UsesFastPathLayout() || usesArrangeWidthInfo);
    MUX_ASSERT(!UsesFastPathLayout() || static_cast<int>(m_itemsInfoArrangeWidths.size()) > endSizedItemIndex);

    const int itemsInfoArrangeWidthsOffset = m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex;
    float cumulatedArrangeWidth{};

    for (int sizedItemIndex = beginSizedItemIndex; sizedItemIndex <= endSizedItemIndex; sizedItemIndex++)
    {
        if (usesArrangeWidthInfo)
        {
            // Use the item info provided by the ItemsInfoRequested handler since the DesiredSize.Width
            // may still be the MinWidth because the content is loading.
            // The use of m_itemsInfoArrangeWidths must be consistent with the one in LinedFlowLayout::ArrangeConstrainedLines.
            cumulatedArrangeWidth += m_itemsInfoArrangeWidths[static_cast<size_t>(sizedItemIndex) - itemsInfoArrangeWidthsOffset];
        }
        else if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
        {
            if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
            {
                cumulatedArrangeWidth += element.DesiredSize().Width;
            }
        }
    }

    return cumulatedArrangeWidth;
}

double GetItemWidthMultiplierThreshold ( ) const [private]

Definition at line 4081 of file LinedFlowLayout.cpp.

{
    // If the discrepancy between the actual and expected total line width is greater than twice the processed item width,
    // the default wrapping behavior is reversed.
    constexpr double c_itemWidthMultiplierThreshold = 2.0;

    const double forcedWrapMultiplierDbg = ForcedWrapMultiplierDbg();

    return forcedWrapMultiplierDbg != 0.0 ? forcedWrapMultiplierDbg : c_itemWidthMultiplierThreshold;
}

int GetLastItemIndexInLineIndex ( int lineVectorIndex ) const [private]

Definition at line 4706 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(lineVectorIndex >= 0);
    MUX_ASSERT(lineVectorIndex < static_cast<int>(m_lineItemCounts.size()));

    int firstItemIndexInLineIndex = GetFirstItemIndexInLineIndex(lineVectorIndex);

    return firstItemIndexInLineIndex + m_lineItemCounts[lineVectorIndex] - 1;
}

int GetLineCount ( double averageItemsPerLine ) const [private]

Definition at line 4717 of file LinedFlowLayout.cpp.

{
    if (m_itemCount == 0)
    {
        return 0;
    }

    MUX_ASSERT(m_itemCount > 0);

    const int lineCount = GetLineIndexFromAverageItemsPerLine(m_itemCount - 1, averageItemsPerLine) + 1;

#ifdef DBG_VERBOSE
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, lineCount);
#endif

    return lineCount;
}

int GetLineIndex | ( | int | itemIndex,
 |  | bool | usesFastPathLayout |
 | ) |  |  | const [private]

Definition at line 4737 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_isVirtualizingContext);
    MUX_ASSERT(itemIndex >= 0);
    MUX_ASSERT(itemIndex < m_itemCount);

    if (itemIndex == 0)
    {
        // May occur while m_averageItemsPerLine.second is still 0.
        return 0;
    }

    int lineIndex = 0;

    if (usesFastPathLayout)
    {
        int lineItemCounts{};

        while (lineItemCounts + m_lineItemCounts[lineIndex] <= itemIndex)
        {
            lineItemCounts += m_lineItemCounts[lineIndex];
            lineIndex++;
        }
    }
    else
    {
        MUX_ASSERT(m_averageItemsPerLine.second >= 1.0);

        const auto& lockedItemIterator = m_lockedItemIndexes.find(itemIndex);

        // Determine the element's line index depending on its locked status.
        if (lockedItemIterator != m_lockedItemIndexes.end())
        {
            // Since the item is locked, use the line index it's locked on.
            lineIndex = lockedItemIterator->second;
        }
        else
        {
            int sizedItemIndex = m_firstSizedItemIndex;
            const int sizedItemCount = m_lastSizedItemIndex - m_firstSizedItemIndex + 1;
            const int sizedLineVectorCount = static_cast<int>(m_lineItemCounts.size());

            // If the item is sized, use its sized line index.
            if (sizedItemIndex != -1 &&
                itemIndex >= sizedItemIndex &&
                itemIndex < sizedItemIndex + sizedItemCount &&
                m_lastSizedLineIndex - m_firstSizedLineIndex + 1 == sizedLineVectorCount)
            {
                MUX_ASSERT(m_firstSizedLineIndex >= 0);

                int sizedLineVectorIndex = 0;

                while (sizedItemIndex + m_lineItemCounts[sizedLineVectorIndex] - 1 < itemIndex)
                {
                    sizedItemIndex += m_lineItemCounts[sizedLineVectorIndex];
                    sizedLineVectorIndex++;

                    MUX_ASSERT(sizedLineVectorIndex < sizedLineVectorCount);
                }

                lineIndex = m_firstSizedLineIndex + sizedLineVectorIndex;
            }
            else
            {
                // As a last resort, use the estimated line index based on the average items per line.
                lineIndex = GetLineIndexFromAverageItemsPerLine(itemIndex, m_averageItemsPerLine.second);
            }
        }
    }

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, L"lineIndex", lineIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, L"itemIndex", itemIndex);

    return lineIndex;
}

int GetLineIndexDbg ( int itemIndex ) const [inline]

Definition at line 211 of file LinedFlowLayout.h.

    {
        return GetLineIndex(itemIndex, UsesFastPathLayout());
    }

int GetLineIndexFromAverageItemsPerLine | ( | int | itemIndex,
 |  | double | averageItemsPerLine |
 | ) |  |  | const [private]

Definition at line 4815 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(averageItemsPerLine >= 1.0);

    const int lineIndex = static_cast<int>(itemIndex / averageItemsPerLine);

    return lineIndex;
}

float GetLinesDesiredWidth ( ) [private]

Definition at line 4829 of file LinedFlowLayout.cpp.

{
    if (m_firstFrozenLineIndex == -1)
    {
        // This occurs when GetFirstAndLastDisplayedLineIndexes returns firstDisplayedLineIndex==-1
        // because the scrollViewport is still 0.0 for example.
        return 0.0;
    }

    MUX_ASSERT(m_firstSizedLineIndex >= 0);
    MUX_ASSERT(m_lastSizedLineIndex >= m_firstSizedLineIndex);
    MUX_ASSERT(m_firstSizedItemIndex >= 0);
    MUX_ASSERT(m_lastSizedItemIndex >= m_firstSizedItemIndex);
    MUX_ASSERT(m_firstFrozenLineIndex >= 0);
    MUX_ASSERT(m_lastFrozenLineIndex >= m_firstFrozenLineIndex);
    MUX_ASSERT(m_firstFrozenItemIndex >= 0);
    MUX_ASSERT(m_lastFrozenItemIndex >= m_firstFrozenItemIndex);

    const bool usesArrangeWidthInfo = UsesArrangeWidthInfo();
    const float minItemSpacing = static_cast<float>(MinItemSpacing());
    const int firstLineIndex = usesArrangeWidthInfo ? m_firstSizedLineIndex : m_firstFrozenLineIndex;
    const int lastLineIndex = usesArrangeWidthInfo ? m_lastSizedLineIndex : m_lastFrozenLineIndex;
    int itemIndex = usesArrangeWidthInfo ? m_firstSizedItemIndex : m_firstFrozenItemIndex;
    float maxLineWidth{};

    MUX_ASSERT(!usesArrangeWidthInfo || m_itemsInfoFirstIndex >= 0);

    for (int lineIndex = firstLineIndex; lineIndex <= lastLineIndex; lineIndex++)
    {
        const int lineItemsCount = m_lineItemCounts[static_cast<size_t>(lineIndex) - m_firstSizedLineIndex];
        float lineWidth{};

        for (int lineItemIndex = 0; lineItemIndex < lineItemsCount; lineItemIndex++)
        {
            float itemWidth{};

            if (usesArrangeWidthInfo)
            {
                itemWidth = m_itemsInfoArrangeWidths[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex];
            }
            else
            {
                MUX_ASSERT(m_elementManager.IsDataIndexRealized(itemIndex));

                if (const auto element = m_elementManager.GetRealizedElement(itemIndex))
                {
                    itemWidth = element.DesiredSize().Width;
                }
            }

            if (lineItemIndex > 0)
            {
                lineWidth += minItemSpacing;
            }

            lineWidth += itemWidth;

            itemIndex++;
        }

        maxLineWidth = std::max(lineWidth, maxLineWidth);
    }

    return maxLineWidth;
}

double GetMaxWidthFromItemsInfo ( int itemIndex ) const [private]

Definition at line 4895 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(itemIndex >= 0);
    MUX_ASSERT(itemIndex < m_itemCount);
    MUX_ASSERT(m_itemsInfoMaxWidth >= 0.0 || m_itemsInfoMaxWidth == -1.0);

    if (UsesFastPathLayout())
    {
        // Fast path layout
        if (itemIndex < static_cast<int>(m_itemsInfoMaxWidthsForFastPath.size()))
        {
            return std::min(m_itemsInfoMaxWidth, m_itemsInfoMaxWidthsForFastPath[itemIndex]);
        }
    }
    else
    {
        // Regular path layout
        if (itemIndex - m_itemsInfoFirstIndex >= 0 &&
            itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoMaxWidthsForRegularPath.size()))
        {
            return std::min(m_itemsInfoMaxWidth, m_itemsInfoMaxWidthsForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex]);
        }
    }

    return m_itemsInfoMaxWidth;
}

double GetMinWidthFromItemsInfo ( int itemIndex ) const [private]

Definition at line 4923 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(itemIndex >= 0);
    MUX_ASSERT(itemIndex < m_itemCount);
    MUX_ASSERT(m_itemsInfoMinWidth >= 0.0 || m_itemsInfoMinWidth == -1.0);

    if (UsesFastPathLayout())
    {
        // Fast path layout
        if (itemIndex < static_cast<int>(m_itemsInfoMinWidthsForFastPath.size()))
        {
            return std::max(m_itemsInfoMinWidth, m_itemsInfoMinWidthsForFastPath[itemIndex]);
        }
    }
    else
    {
        // Regular path layout
        if (itemIndex - m_itemsInfoFirstIndex >= 0 &&
            itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoMinWidthsForRegularPath.size()))
        {
            return std::max(m_itemsInfoMinWidth, m_itemsInfoMinWidthsForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex]);
        }
    }

    return m_itemsInfoMinWidth;
}

void GetNextLockedItem | ( | std::map< int, int > * | internalLockedItemIndexes,
 |  | bool | forward,
 |  | int | beginLineIndex,
 |  | int | endLineIndex,
 |  | int | itemIndex,
 |  | int * | lockedItemIndex,
 |  | int * | lockedLineIndex |
 | ) |  |  | const [private]

Definition at line 4951 of file LinedFlowLayout.cpp.

{
    *lockedItemIndex = *lockedLineIndex = -1;

    int distance = std::numeric_limits<int>::max();

    if (internalLockedItemIndexes != nullptr)
    {
        for (const auto& lockedItemIterator : *internalLockedItemIndexes)
        {
            if (forward &&
                lockedItemIterator.first > itemIndex &&
                lockedItemIterator.first - itemIndex < distance &&
                lockedItemIterator.second >= beginLineIndex &&
                lockedItemIterator.second <= endLineIndex)
            {
                distance = lockedItemIterator.first - itemIndex;
                *lockedItemIndex = lockedItemIterator.first;
                *lockedLineIndex = lockedItemIterator.second;
            }
            else if (!forward &&
                lockedItemIterator.first < itemIndex &&
                itemIndex - lockedItemIterator.first < distance &&
                lockedItemIterator.second <= beginLineIndex &&
                lockedItemIterator.second >= endLineIndex)
            {
                distance = itemIndex - lockedItemIterator.first;
                *lockedItemIndex = lockedItemIterator.first;
                *lockedLineIndex = lockedItemIterator.second;
            }
        }
    }

    for (const auto& lockedItemIterator : m_lockedItemIndexes)
    {
        if (forward &&
            lockedItemIterator.first > itemIndex &&
            lockedItemIterator.first - itemIndex < distance &&
            lockedItemIterator.second >= beginLineIndex &&
            lockedItemIterator.second <= endLineIndex)
        {
            distance = lockedItemIterator.first - itemIndex;
            *lockedItemIndex = lockedItemIterator.first;
            *lockedLineIndex = lockedItemIterator.second;
        }
        else if (!forward &&
            lockedItemIterator.first < itemIndex &&
            itemIndex - lockedItemIterator.first < distance &&
            lockedItemIterator.second <= beginLineIndex &&
            lockedItemIterator.second >= endLineIndex)
        {
            distance = itemIndex - lockedItemIterator.first;
            *lockedItemIndex = lockedItemIterator.first;
            *lockedLineIndex = lockedItemIterator.second;
        }
    }
}

float GetRealizationRectHeightDeficit | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | double | actualLineHeight,
 |  | double | lineSpacing |
 | ) |  |  | const [private]

Definition at line 5016 of file LinedFlowLayout.cpp.

{
    // This layout performs poorly when there are less than 20 lines to operate with in 5 scroll viewports.
    // The target realization height is at least 3 viewports and 12 lines, assuming that 2 more viewports worth
    // of unrealized sized items are used via the ItemsInfoRequested event. Otherwise the realization rect falls back to 5 viewports.
    constexpr float minimumCacheLength = 2.0f;
    constexpr float minimumCacheLineCount = 4.0f; // At least 4 x (minimumCacheLength + 1) = 12 lines worth of items.
    const float realizationRectHeight = context.RealizationRect().Height;
    const float nearRealizationRect = GetRoundedFloat(context.RealizationRect().Y);
    const float lineHeight = static_cast<float>(actualLineHeight + lineSpacing);
    const float scrollViewport = context.VisibleRect().Height;

    // Ensure there is a viewport buffer before and after the visible viewport.
    float realizationRectHeightDeficit = std::max(0.0f, (minimumCacheLength + 1.0f) * scrollViewport - realizationRectHeight);

    // Ensure there are 12 lines in the resulting 3 viewports.
    realizationRectHeightDeficit = std::max(realizationRectHeightDeficit, (minimumCacheLength + 1.0f) * minimumCacheLineCount * lineHeight - realizationRectHeight);

    MUX_ASSERT(realizationRectHeightDeficit >= 0.0);

    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_FLT, METH_NAME, this, realizationRectHeightDeficit);

    return realizationRectHeightDeficit;
}

void GetRealizedItemsFromSizedItems | ( | int | realizedLineCount,
 |  | int | lineCount,
 |  | int * | unrealizedNearItemCount,
 |  | int * | realizedItemCount |
 | ) |  |  | const [private]

Definition at line 5045 of file LinedFlowLayout.cpp.

{
    int unrealizedNearItemCountTmp = static_cast<int>(std::round(m_unrealizedNearLineCount * m_averageItemsPerLine.second));

    unrealizedNearItemCountTmp = std::min(m_itemCount - 1, unrealizedNearItemCountTmp);
    unrealizedNearItemCountTmp = std::max(m_unrealizedNearLineCount, unrealizedNearItemCountTmp);
    unrealizedNearItemCountTmp = std::max(m_firstSizedItemIndex, unrealizedNearItemCountTmp);

    int realizedItemCountTmp{};

    if (m_unrealizedNearLineCount + realizedLineCount == lineCount)
    {
        realizedItemCountTmp = m_itemCount - unrealizedNearItemCountTmp;
    }
    else
    {
        realizedItemCountTmp = static_cast<int>(std::round(realizedLineCount * m_averageItemsPerLine.second));
    }

    realizedItemCountTmp = std::max(1, realizedItemCountTmp);
    realizedItemCountTmp = std::max(realizedLineCount, realizedItemCountTmp);
    realizedItemCountTmp = std::min(m_lastSizedItemIndex - unrealizedNearItemCountTmp + 1, realizedItemCountTmp);

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unrealizedNearItemCount", unrealizedNearItemCountTmp);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"realizedItemCount", realizedItemCountTmp);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"realized item index range", unrealizedNearItemCountTmp, unrealizedNearItemCountTmp + realizedItemCountTmp - 1);

    MUX_ASSERT(unrealizedNearItemCountTmp < m_itemCount);
    MUX_ASSERT(unrealizedNearItemCountTmp >= m_unrealizedNearLineCount);
    MUX_ASSERT((m_unrealizedNearLineCount == 0 && unrealizedNearItemCountTmp == 0) || (m_unrealizedNearLineCount > 0 && unrealizedNearItemCountTmp > 0));
    MUX_ASSERT(realizedItemCountTmp > 0);
    MUX_ASSERT(realizedItemCountTmp >= realizedLineCount);
    MUX_ASSERT(unrealizedNearItemCountTmp + realizedItemCountTmp <= m_itemCount);

    *unrealizedNearItemCount = unrealizedNearItemCountTmp;
    *realizedItemCount = realizedItemCountTmp;
}

double GetRoundedDouble ( double value ) const [private]

Definition at line 5104 of file LinedFlowLayout.cpp.

{
    return std::round(value * m_roundingScaleFactor) / m_roundingScaleFactor;
}

float GetRoundedFloat ( float value ) const [private]

Definition at line 5110 of file LinedFlowLayout.cpp.

{
    return static_cast<float>(std::round(value * m_roundingScaleFactor) / m_roundingScaleFactor);
}

float GetSizedItemsRectHeight | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | double | actualLineHeight,
 |  | double | lineSpacing |
 | ) |  |  | const [private]

Definition at line 5087 of file LinedFlowLayout.cpp.

{
    // This layout performs poorly when there are less than 20 lines to operate with in 5 scroll viewports.
    // The target rect height for the realized + unrealized sized items is at least 5 viewports and 20 lines.
    constexpr float minimumCacheLength = 4.0f;
    constexpr float minimumCacheLineCount = 4.0f;

    // Ensure there are 4 buffer viewports before and after the visible viewport.
    const float sizedItemsRectHeight = (minimumCacheLength + 1.0f) * context.VisibleRect().Height;

    // Ensure there are 20 lines in the resulting 5 viewports.
    return std::max(sizedItemsRectHeight, (minimumCacheLength + 1.0f) * minimumCacheLineCount * static_cast<float>(actualLineHeight + lineSpacing));
}

void InitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )

Definition at line 210 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_wasInitializedForContext)
    {
        throw winrt::hresult_error(E_INVALID_OPERATION, s_cannotShareLinedFlowLayout);
    }

    __super::InitializeForContextCore(context);

    m_wasInitializedForContext = true;
    m_isVirtualizingContext = IsVirtualizingContext(context);
    m_itemCount = context.ItemCount();
    m_elementManager.SetContext(context);
}

void InitializeForRelayout | ( | int | sizedLineCount,
 |  | int & | firstStillSizedLineIndex,
 |  | int & | lastStillSizedLineIndex,
 |  | int & | firstStillSizedItemIndex,
 |  | int & | lastStillSizedItemIndex |
 | ) |  |  | [private]

Definition at line 5116 of file LinedFlowLayout.cpp.

{
    EnsureLineItemCounts(sizedLineCount);

    firstStillSizedLineIndex = -1;
    lastStillSizedLineIndex = -1;
    firstStillSizedItemIndex = -1;
    lastStillSizedItemIndex = -1;
}

void InvalidateItemsInfo ( )

Definition at line 5133 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    InvalidateLayout(true /*forceRelayout*/, true /*resetItemsInfo*/, true /*invalidateMeasure*/);
}

void InvalidateLayout | ( | bool | forceRelayout = true,
 |  | bool | resetItemsInfo = false,
 |  | bool | invalidateMeasure = true
 | ) |  |

Definition at line 5143 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(forceRelayout || resetItemsInfo || invalidateMeasure);

    if (forceRelayout)
    {
        // Perform a complete re-layout during the next layout pass.
        NotifyLinedFlowLayoutInvalidatedDbg(winrt::LinedFlowLayoutInvalidationTrigger::InvalidateLayoutCall);
        m_forceRelayout = true;
    }

    if (resetItemsInfo)
    {
        // Discard any potential item sizing info previously collected through the ItemsInfoRequested event.
        ResetItemsInfo();
    }

    if (invalidateMeasure)
    {
        // Trigger a new layout pass.
        __super::InvalidateMeasure();
    }
}

void InvalidateMeasureAsync ( ) [private]

Definition at line 5171 of file LinedFlowLayout.cpp.

{
    auto weakThis = get_weak();

    m_dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler(
        [weakThis]()
    {
        if (winrt::WindowsXamlManager::GetForCurrentThread() == nullptr)
        {
            // Exit early if Xaml core has already shut down.
            return;
        }

        if (auto strongThis = weakThis.get())
        {
            strongThis->InvalidateLayout(false /*forceRelayout*/, false /*resetItemsInfo*/, true /*invalidateMeasure*/);
        }
    }));
}

void InvalidateMeasureTimerStart ( int tickCount ) [private]

Definition at line 5199 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(!UsesArrangeWidthInfo());

    if (m_invalidateMeasureTimer)
    {
        if (m_invalidateMeasureTimer.IsEnabled())
        {
            m_invalidateMeasureTimer.Stop();
        }
    }
    else
    {
        m_invalidateMeasureTimer = winrt::DispatcherTimer();

        m_invalidateMeasureTimer.Tick({ this, &LinedFlowLayout::InvalidateMeasureTimerTick });
    }

    m_invalidateMeasureTimerTickCount = tickCount;

    constexpr double timerFactor = 1.5;
    const double timerMultiplier = std::pow(timerFactor, tickCount);

    constexpr int64_t timerBase = 1000000; // 100ms
    const int64_t timerInterval = static_cast<int64_t>(timerBase * timerMultiplier);

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"tickCount", tickCount);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"timerInterval", timerInterval);

    m_invalidateMeasureTimer.Interval(winrt::TimeSpan::duration(timerInterval));
    m_invalidateMeasureTimer.Start();
}

void InvalidateMeasureTimerStop ( bool isForDestructor ) [private]

Definition at line 5234 of file LinedFlowLayout.cpp.

{
    if (isForDestructor)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }
    else
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
    }

    if (m_invalidateMeasureTimer && m_invalidateMeasureTimer.IsEnabled())
    {
        m_invalidateMeasureTimer.Stop();
    }
}

void InvalidateMeasureTimerTick | ( | winrt::IInspectable const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]

Definition at line 5254 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    InvalidateMeasureAsync();

    // The asynchronous measure pass is triggered 8 times to check if the ItemsRepeater's children
    // have a new desired size. This is done because when a child is re-measured because its content changed,
    // the Xaml layout engine uses its previous available size, preventing the ItemsRepeater from being re-measured.
    constexpr int maxInvalidateMeasureTimerTickCount = 7;

    if (!UsesArrangeWidthInfo() && m_invalidateMeasureTimerTickCount < maxInvalidateMeasureTimerTickCount)
    {
        InvalidateMeasureTimerStart(m_invalidateMeasureTimerTickCount + 1);
    }
    else
    {
        InvalidateMeasureTimerStop(false /*isForDestructor*/);
    }
}

bool IsFastPathSupportedDbg ( ) const [inline]

Definition at line 161 of file LinedFlowLayout.h.

    {
        return m_isFastPathSupportedDbg;
    };

void IsFastPathSupportedDbg ( bool isFastPathSupported ) [inline]

Definition at line 169 of file LinedFlowLayout.h.

    {
        if (m_isFastPathSupportedDbg != isFastPathSupported)
        {
            m_isFastPathSupportedDbg = isFastPathSupported;

            if (UsesFastPathLayout())
            {
                ResetItemsInfo();
            }

            InvalidateLayout();
        }
    };

bool IsItemsLayoutContractionWorthy ( ItemsLayout const & itemsLayout ) [private]

Definition at line 5278 of file LinedFlowLayout.cpp.

{
    if (itemsLayout.m_smallestTailItemWidth == std::numeric_limits<double>::max() || itemsLayout.m_smallestTailItemWidth == 0.0)
    {
        return false;
    }

    const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());

    if (sizedLineCount > 1)
    {
        for (int lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
        {
            if (itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
            {
                return true;
            }
        }
    }

    return false;
}

bool IsItemsLayoutEqualizationWorthy | ( | ItemsLayout const & | itemsLayout,
 |  | bool | withHeadItem |
 | ) |  |  | [private]

Definition at line 5302 of file LinedFlowLayout.cpp.

{
    if ((withHeadItem && itemsLayout.m_bestEqualizingHeadItemIndex == std::numeric_limits<int>::max()) ||
        (!withHeadItem && itemsLayout.m_bestEqualizingTailItemIndex == std::numeric_limits<int>::max()))
    {
        return false;
    }

    const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());

    if (sizedLineCount > 1)
    {
        for (int lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
        {
            if (itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
            {
                return true;
            }
        }
    }

    return false;
}

bool IsItemsLayoutExpansionWorthy ( ItemsLayout const & itemsLayout ) [private]

Definition at line 5329 of file LinedFlowLayout.cpp.

{
    if (itemsLayout.m_smallestHeadItemWidth == std::numeric_limits<double>::max() || itemsLayout.m_smallestHeadItemWidth == 0.0)
    {
        return false;
    }

    const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());
    bool isExpansionWorthy = false;

    if (sizedLineCount > 1)
    {
        for (int lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
        {
            if (itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
            {
                isExpansionWorthy = true;
                break;
            }
        }
    }

    if (isExpansionWorthy)
    {
        int lineVectorIndex;

        for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
        {
            if (itemsLayout.m_lineItemWidths[lineVectorIndex] > itemsLayout.m_availableLineItemsWidth)
            {
                break;
            }
        }

        isExpansionWorthy = lineVectorIndex < sizedLineCount;
    }

    MUX_ASSERT(!isExpansionWorthy || itemsLayout.m_smallestHeadItemWidth > 0);

    return isExpansionWorthy;
}

bool IsLockedItem | ( | bool | forward,
 |  | int | beginLineIndex,
 |  | int | endLineIndex,
 |  | int | itemIndex |
 | ) |  |  | [private]

Definition at line 5373 of file LinedFlowLayout.cpp.

{
    const auto& lockedItemIterator = m_lockedItemIndexes.find(itemIndex);

    if (lockedItemIterator != m_lockedItemIndexes.end())
    {
        const int lineIndex = lockedItemIterator->second;

        if (forward)
        {
            if (lineIndex >= beginLineIndex && lineIndex <= endLineIndex)
            {
                return true;
            }
        }
        else
        {
            if (lineIndex <= beginLineIndex && lineIndex >= endLineIndex)
            {
                return true;
            }
        }
    }

    return false;
}

bool IsVirtualizingContext ( winrt::VirtualizingLayoutContext const & context ) const [private]

Definition at line 5404 of file LinedFlowLayout.cpp.

{
    if (context)
    {
        const auto rect = context.RealizationRect();
        const bool hasInfiniteSize = (rect.Height == std::numeric_limits<float>::infinity() || rect.Width == std::numeric_limits<float>::infinity());
        return !hasInfiniteSize;
    }
    return false;
}

std::tuple< bool, bool, bool > ItemRangesHaveNewDesiredWidths | ( | std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> | oldElementDesiredWidths,
 |  | int | beginRealizedItemIndex,
 |  | int | endRealizedItemIndex |
 | ) |  |  | [private]

Definition at line 5462 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_itemsInfoFirstIndex == -1);
    MUX_ASSERT(m_elementDesiredWidths);
    MUX_ASSERT(oldElementDesiredWidths);
    MUX_ASSERT(beginRealizedItemIndex <= endRealizedItemIndex);
    MUX_ASSERT(beginRealizedItemIndex <= m_firstFrozenItemIndex);
    MUX_ASSERT(endRealizedItemIndex >= m_lastFrozenItemIndex);

    bool preFrozenItemHasNewDesiredWidth = false;
    bool frozenItemHasNewDesiredWidth = false;

    for (int itemIndex = beginRealizedItemIndex; itemIndex <= endRealizedItemIndex; itemIndex++)
    {
        if (m_elementManager.IsDataIndexRealized(itemIndex))
        {
            if (const auto element = m_elementManager.GetRealizedElement(itemIndex /*dataIndex*/))
            {
                const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
                const bool hasNewDesiredWidth = m_elementDesiredWidths->find(elementTracker) != m_elementDesiredWidths->end();

                if (hasNewDesiredWidth)
                {
                    const bool hasOldDesiredWidth = oldElementDesiredWidths->find(elementTracker) != oldElementDesiredWidths->end();
                    const float newDesiredWidth = m_elementDesiredWidths->at(elementTracker);
                    bool desiredWidthChanged = false;

                    MUX_ASSERT(element.DesiredSize().Width == newDesiredWidth);

                    if (hasOldDesiredWidth)
                    {
                        const float oldDesiredWidth = oldElementDesiredWidths->at(elementTracker);

                        desiredWidthChanged = oldDesiredWidth != newDesiredWidth;

#ifdef DBG
                        if (desiredWidthChanged)
                        {
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"index causing relayout for changed desired size", itemIndex);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"oldDesiredWidth", oldDesiredWidth);
                        }
                        else if (itemIndex == m_logItemIndexDbg)
                        {
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"oldDesiredWidth", oldDesiredWidth);
                        }
#endif
                    }
#ifdef DBG
                    else
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"index causing relayout for new desired size", itemIndex);
                    }
#endif

                    if (desiredWidthChanged || !hasOldDesiredWidth)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"newDesiredWidth", newDesiredWidth);

                        NotifyLinedFlowLayoutInvalidatedDbg(winrt::LinedFlowLayoutInvalidationTrigger::ItemDesiredWidthChange);

                        if (itemIndex < m_firstFrozenItemIndex)
                        {
                            MUX_ASSERT(!preFrozenItemHasNewDesiredWidth);

                            preFrozenItemHasNewDesiredWidth = true;

                            // Now that preFrozenItemHasNewDesiredWidth was set for the initial unfrozen items range, skip the remaining initial unfrozen items after itemIndex.
                            itemIndex = m_firstFrozenItemIndex - 1;
                        }
                        else if (itemIndex <= m_lastFrozenItemIndex)
                        {
                            MUX_ASSERT(!frozenItemHasNewDesiredWidth);

                            frozenItemHasNewDesiredWidth = true;

                            // Now that frozenItemHasNewDesiredWidth was set for the frozen items range, skip the remaining frozen items after itemIndex.
                            itemIndex = m_lastFrozenItemIndex;
                        }
                        else
                        {
#ifdef DBG
                            if (preFrozenItemHasNewDesiredWidth)
                            {
                                if (frozenItemHasNewDesiredWidth)
                                {
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, true, true>");
                                }
                                else
                                {
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, false, true>");
                                }
                            }
                            else
                            {
                                if (frozenItemHasNewDesiredWidth)
                                {
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, true, true>");
                                }
                                else
                                {
                                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, false, true>");
                                }
                            }
#endif
                            return std::tuple<bool, bool, bool>(preFrozenItemHasNewDesiredWidth, frozenItemHasNewDesiredWidth, true /*postFrozenItemHasNewDesiredWidth*/);
                        }
                    }
#ifdef DBG
                    else if (itemIndex == m_logItemIndexDbg)
                    {
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"newDesiredWidth", newDesiredWidth);
                    }
#endif
                }
            }
        }
    }

#ifdef DBG
    if (preFrozenItemHasNewDesiredWidth)
    {
        if (frozenItemHasNewDesiredWidth)
        {
            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, true, false>");
        }
        else
        {
            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, false, false>");
        }
    }
    else
    {
        if (frozenItemHasNewDesiredWidth)
        {
            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, true, false>");
        }
        else
        {
            LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, false, false>");
        }
    }
#endif

    return std::tuple<bool, bool, bool>(preFrozenItemHasNewDesiredWidth, frozenItemHasNewDesiredWidth, false /*postFrozenItemHasNewDesiredWidth*/);
}

int LastFrozenItemIndexDbg ( ) const [inline]

Definition at line 105 of file LinedFlowLayout.h.

    {
        return m_lastFrozenItemIndex;
    };

int LastRealizedItemIndexDbg ( ) const [inline]

Definition at line 89 of file LinedFlowLayout.h.

    {
        if (!m_wasInitializedForContext)
        {
            return -1;
        }

        const int realizedElementCount = m_elementManager.GetRealizedElementCount();
        return realizedElementCount == 0 ? -1 : m_elementManager.GetFirstRealizedDataIndex() + realizedElementCount - 1;
    };

bool LineHasInternalLockedItem | ( | std::map< int, int > const & | internalLockedItemIndexes,
 |  | int | lineIndex,
 |  | bool | before,
 |  | int | itemIndex |
 | ) |  |  | const [private]

Definition at line 5416 of file LinedFlowLayout.cpp.

{
    for (const auto& lockedItemIterator : internalLockedItemIndexes)
    {
        if (lockedItemIterator.second == lineIndex)
        {
            const int lockedItemIndex = lockedItemIterator.first;

            if ((before && lockedItemIndex <= itemIndex) || (!before && lockedItemIndex >= itemIndex))
            {
                return true;
            }
        }
    }

    return false;
}

bool LineHasLockedItem | ( | int | lineIndex,
 |  | bool | before,
 |  | int | itemIndex |
 | ) |  |  | [private]

Definition at line 5438 of file LinedFlowLayout.cpp.

{
    for (const auto& lockedItemIterator : m_lockedItemIndexes)
    {
        if (lockedItemIterator.second == lineIndex)
        {
            const int lockedItemIndex = lockedItemIterator.first;

            if ((before && lockedItemIndex <= itemIndex) || (!before && lockedItemIndex >= itemIndex))
            {
                return true;
            }
        }
    }

    return false;
}

int LineItemsCountTotal ( int expectedTotal ) [private]

Definition at line 5617 of file LinedFlowLayout.cpp.

{
    int sizedItemCount = 0;

    for (const int lineItemsCount : m_lineItemCounts)
    {
        sizedItemCount += lineItemsCount;
    }

    MUX_ASSERT(expectedTotal == 0 || sizedItemCount == expectedTotal);

    return sizedItemCount;
}

int32_t LockItemToLine ( int32_t itemIndex )

Definition at line 56 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, itemIndex);

    if (itemIndex < 0 || itemIndex >= m_itemCount)
    {
        throw winrt::hresult_out_of_bounds();
    }

    if (m_averageItemsPerLine.second == 0.0)
    {
        // LockItemToLine is called before the first measure pass or when ActualLineHeight <= 0.
        // Returning -1 as an indication that LockItemToLine must be called later, after the measure pass has established an average items per line.
        return -1;
    }

    const bool usesFastPathLayout = UsesFastPathLayout();
    int lockedLineIndex{ -1 };

    if (itemIndex == 0)
    {
        // First item is implicitly locked on the first line - no need to update the m_lockedItemIndexes map.
        // Setting the m_isFirstOrLastItemLocked flag though so that ItemsUnlocked is raised when only the first and/or last item was locked.
        m_isFirstOrLastItemLocked = true;
        lockedLineIndex = 0;
    }
    else if (itemIndex == m_itemCount - 1)
    {
        // Last item is implicitly locked on the last line - no need to update the m_lockedItemIndexes map.
        // Setting the m_isFirstOrLastItemLocked flag though so that ItemsUnlocked is raised when only the first and/or last item was locked.
        m_isFirstOrLastItemLocked = true;
        lockedLineIndex = usesFastPathLayout ? GetLineIndex(itemIndex, true /*usesFastPathLayout*/) : GetLineIndexFromAverageItemsPerLine(itemIndex, m_averageItemsPerLine.second);
    }

    if (m_lockedItemIndexes.find(itemIndex) != m_lockedItemIndexes.end())
    {
        // Item is already locked - return its current lock line index.
        return m_lockedItemIndexes[itemIndex];
    }

    if (lockedLineIndex == -1)
    {
        if (usesFastPathLayout)
        {
            lockedLineIndex = GetLineIndex(itemIndex, true /*usesFastPathLayout*/);
        }
        else
        {
            if (m_firstFrozenItemIndex != -1 &&
                m_lastFrozenItemIndex != -1 &&
                itemIndex >= m_firstFrozenItemIndex &&
                itemIndex <= m_lastFrozenItemIndex)
            {
                // Item is among the frozen items - Return the current frozen line index for the item.
                lockedLineIndex = GetFrozenLineIndexFromFrozenItemIndex(itemIndex);
            }
            else
            {
                // Else return the line index based on the average items per line.
                lockedLineIndex = GetLineIndexFromAverageItemsPerLine(itemIndex, m_averageItemsPerLine.second);
            }
        }
    }

    MUX_ASSERT(lockedLineIndex >= 0);

    if (m_lockedItemIndexes.size() > 0)
    {
        // Check if that line already has locked items. Any unlocked item squeezed between two locked items is declared locked.
        for (const auto& lockedItemIterator : m_lockedItemIndexes)
        {
            if (lockedItemIterator.second == lockedLineIndex)
            {
                // Found a locked item on the same line
                const int lockedItemIndex = lockedItemIterator.first;

                if (lockedItemIndex < itemIndex)
                {
                    // It is before the newly locked one. Ensure all items in between them are locked.
                    for (int lockedItemIndexTmp = lockedItemIndex + 1; lockedItemIndexTmp < itemIndex; lockedItemIndexTmp++)
                    {
                        if (m_lockedItemIndexes.find(lockedItemIndexTmp) == m_lockedItemIndexes.end())
                        {
                            m_lockedItemIndexes.insert(std::pair<int, int>(lockedItemIndexTmp, lockedLineIndex));

                            NotifyLinedFlowLayoutItemLockedDbg(lockedItemIndexTmp, lockedLineIndex);
                        }
                    }

                    // No other item can possibly be locked on the same line.
                    break;
                }
                else
                {
                    // It is after the newly locked one. Ensure all items in between them are locked.
                    MUX_ASSERT(lockedItemIndex > itemIndex);

                    for (int lockedItemIndexTmp = lockedItemIndex - 1; lockedItemIndexTmp > itemIndex; lockedItemIndexTmp--)
                    {
                        if (m_lockedItemIndexes.find(lockedItemIndexTmp) == m_lockedItemIndexes.end())
                        {
                            m_lockedItemIndexes.insert(std::pair<int, int>(lockedItemIndexTmp, lockedLineIndex));

                            NotifyLinedFlowLayoutItemLockedDbg(lockedItemIndexTmp, lockedLineIndex);
                        }
                    }

                    // No other item can possibly be locked on the same line.
                    break;
                }
            }
        }
    }

    // Finally lock the provided item itself, unless it's the first or last item.
    MUX_ASSERT(m_lockedItemIndexes.find(itemIndex) == m_lockedItemIndexes.end());

    if (itemIndex != 0 && itemIndex != m_itemCount - 1)
    {
        m_lockedItemIndexes.insert(std::pair<int, int>(itemIndex, lockedLineIndex));
    }

    NotifyLinedFlowLayoutItemLockedDbg(itemIndex, lockedLineIndex);

    return lockedLineIndex;
}

bool LockItemToLineInternal | ( | std::map< int, int > & | internalLockedItemIndexes,
 |  | int | beginSizedLineIndex,
 |  | int | endSizedLineIndex,
 |  | int | beginSizedItemIndex,
 |  | int | endSizedItemIndex,
 |  | int | lineIndex,
 |  | int | itemIndex |
 | ) |  |  | [private]

Definition at line 5632 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, lineIndex, itemIndex);

    MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
    MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
    MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));

    if (lineIndex > itemIndex)
    {
        return false;
    }

    MUX_ASSERT(lineIndex <= itemIndex);

    const int lineCount = GetLineCount(m_averageItemsPerLine.second);

    MUX_ASSERT(lineCount > 0);
    MUX_ASSERT(lineIndex < lineCount);

    if (lineCount - lineIndex > m_itemCount - itemIndex)
    {
        return false;
    }

    if (std::abs(beginSizedLineIndex - lineIndex) > std::abs(beginSizedItemIndex - itemIndex))
    {
        return false;
    }

    if (std::abs(endSizedLineIndex - lineIndex) > std::abs(endSizedItemIndex - itemIndex))
    {
        return false;
    }

    int beforeLockedItemIndex, beforeLockedLineIndex, afterLockedItemIndex, afterLockedLineIndex;

    GetNextLockedItem(
        &internalLockedItemIndexes,
        false /*forward*/,
        lineCount - 1 /*beginLineIndex*/,
        0 /*endLineIndex*/,
        itemIndex,
        &beforeLockedItemIndex,
        &beforeLockedLineIndex);

    GetNextLockedItem(
        &internalLockedItemIndexes,
        true /*forward*/,
        0 /*beginLineIndex*/,
        lineCount - 1 /*endLineIndex*/,
        itemIndex,
        &afterLockedItemIndex,
        &afterLockedLineIndex);

    if ((beforeLockedItemIndex == -1 || (itemIndex - beforeLockedItemIndex >= lineIndex - beforeLockedLineIndex)) &&
        (afterLockedItemIndex == -1 || (afterLockedItemIndex - itemIndex >= afterLockedLineIndex - lineIndex)))
    {
        internalLockedItemIndexes.insert(std::pair<int, int>(itemIndex, lineIndex));

#ifdef DBG
        VerifyInternalLockedItemsDbg(
            internalLockedItemIndexes,
            beginSizedLineIndex,
            endSizedLineIndex,
            beginSizedItemIndex,
            endSizedItemIndex);
#endif
        return true;
    }

    return false;
}

int LogItemIndexDbg ( ) const [inline]

Definition at line 190 of file LinedFlowLayout.h.

    {
        return m_logItemIndexDbg;
    };

void LogItemIndexDbg ( int logItemIndex ) [inline]

Definition at line 195 of file LinedFlowLayout.h.

    {
        m_logItemIndexDbg = logItemIndex;
    };

int MeasureConstrainedLines | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | std::set< double > const & | averageItemsPerLineProcessed,
 |  | ItemsInfo const & | itemsInfo,
 |  | bool | forceRelayout,
 |  | float | availableWidth,
 |  | float | nearRealizationRect,
 |  | float | farRealizationRect,
 |  | double | scrollViewport,
 |  | double | scrollOffset,
 |  | double | actualLineHeight,
 |  | std::pair< double, double > * | newAverageItemsPerLine |
 | ) |  |  | [private]

Definition at line 6257 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, forceRelayout);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_unrealizedNearLineCount", m_unrealizedNearLineCount);

    MUX_ASSERT(!UsesFastPathLayout());
    MUX_ASSERT(actualLineHeight > 0.0);

    *newAverageItemsPerLine = m_averageItemsPerLine;

    const int lineCount = GetLineCount(m_averageItemsPerLine.second);

    if (m_unrealizedNearLineCount >= lineCount)
    {
        ResetLinesInfo();
        ResetSizedLines();
        return lineCount;
    }

    MUX_ASSERT(m_unrealizedNearLineCount < lineCount);
    MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));

    const double lineSpacing = LineSpacing();
    const double linesSpacing = lineCount == 0 ? 0.0 : (static_cast<double>(lineCount) - 1) * lineSpacing;
    const double linesHeight = lineCount * actualLineHeight + linesSpacing;
    const double clampedFarRealizationRect = std::max(0.0, std::min(linesHeight, static_cast<double>(farRealizationRect)));
    const int unrealizedFarLineCount = static_cast<int>((linesHeight - clampedFarRealizationRect) / (actualLineHeight + lineSpacing));
    const int realizedLineCount = lineCount - m_unrealizedNearLineCount - unrealizedFarLineCount;

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"realizedLineCount", realizedLineCount);

    MUX_ASSERT(realizedLineCount <= lineCount);

    if (realizedLineCount == 0)
    {
        ResetLinesInfo();
        ResetSizedLines();
        return lineCount;
    }

    MUX_ASSERT(realizedLineCount > 0);

    // Determine the rect size which includes the unrealized sized and realized items.
    const float sizedItemsRectHeight = GetSizedItemsRectHeight(context, actualLineHeight, lineSpacing);
    const float realizationRectHeightDeficit = std::max(0.0f, sizedItemsRectHeight - farRealizationRect + nearRealizationRect);
    const float nearSizedItemsRect = nearRealizationRect - realizationRectHeightDeficit / 2.0f;
    const float farSizedItemsRect = farRealizationRect + realizationRectHeightDeficit / 2.0f;
    const double clampedNearSizedItemsRect = std::max(0.0, static_cast<double>(nearSizedItemsRect));

    m_unsizedNearLineCount = static_cast<int>(clampedNearSizedItemsRect / (actualLineHeight + lineSpacing));

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_unsizedNearLineCount", m_unsizedNearLineCount);

    MUX_ASSERT(m_unsizedNearLineCount <= m_unrealizedNearLineCount);

    const double clampedFarSizedItemsRect = std::max(0.0, std::min(linesHeight, static_cast<double>(farSizedItemsRect)));
    const int unsizedFarLineCount = static_cast<int>((linesHeight - clampedFarSizedItemsRect) / (actualLineHeight + lineSpacing));
    const int sizedLineCount = lineCount - m_unsizedNearLineCount - unsizedFarLineCount;

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedLineCount", sizedLineCount);

    MUX_ASSERT(sizedLineCount <= lineCount);
    MUX_ASSERT(sizedLineCount >= realizedLineCount);

    const int oldFirstRealizedDataIndex = m_elementManager.GetFirstRealizedDataIndex(); // -1 and unused in non-virtualizing mode.
    const int oldLastRealizedDataIndex = oldFirstRealizedDataIndex == -1 ? -1 : oldFirstRealizedDataIndex + m_elementManager.GetRealizedElementCount() - 1;
    const int oldFirstSizedItemIndex = m_firstSizedItemIndex;
    const int oldLastSizedItemIndex = m_lastSizedItemIndex;
    const int oldFirstSizedLineIndex = m_firstSizedLineIndex;
    const int oldLastSizedLineIndex = m_lastSizedLineIndex;

    m_firstSizedLineIndex = m_unsizedNearLineCount;
    m_lastSizedLineIndex = m_unsizedNearLineCount + sizedLineCount - 1;

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstSizedLineIndex", m_firstSizedLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastSizedLineIndex", m_lastSizedLineIndex);

    std::vector<int> oldLineItemCounts;
    int oldFirstItemsInfoIndex = m_itemsInfoFirstIndex;
    int oldLastItemsInfoIndex = m_itemsInfoFirstIndex == -1 ? -1 : m_itemsInfoFirstIndex + static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()) - 1;

    if (!forceRelayout)
    {
        oldLineItemCounts = m_lineItemCounts;
    }

    std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementAvailableWidths;
    std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementDesiredWidths;

    if (m_elementAvailableWidths)
    {
        oldElementAvailableWidths = m_elementAvailableWidths;
        m_elementAvailableWidths = nullptr;
    }
    EnsureElementAvailableWidths();

    if (m_elementDesiredWidths)
    {
        oldElementDesiredWidths = m_elementDesiredWidths;
        m_elementDesiredWidths = nullptr;
    }
    EnsureElementDesiredWidths();

    int firstStillSizedLineIndex;
    int lastStillSizedLineIndex;
    int firstStillSizedItemIndex;
    int lastStillSizedItemIndex;
    int firstStillRealizedItemIndex{ -1 };
    int lastStillRealizedItemIndex{ -1 };

    InitializeForRelayout(
        sizedLineCount,
        firstStillSizedLineIndex,
        lastStillSizedLineIndex,
        firstStillSizedItemIndex,
        lastStillSizedItemIndex);

    if (!forceRelayout && !oldLineItemCounts.empty())
    {
        if (m_firstSizedLineIndex >= oldFirstSizedLineIndex && m_firstSizedLineIndex <= oldLastSizedLineIndex)
        {
            firstStillSizedLineIndex = m_firstSizedLineIndex;
            lastStillSizedLineIndex = std::min(oldLastSizedLineIndex, m_lastSizedLineIndex);
        }
        if (m_lastSizedLineIndex >= oldFirstSizedLineIndex && m_lastSizedLineIndex <= oldLastSizedLineIndex)
        {
            lastStillSizedLineIndex = m_lastSizedLineIndex;
            firstStillSizedLineIndex = std::max(oldFirstSizedLineIndex, m_firstSizedLineIndex);
        }
        if (m_firstSizedLineIndex <= oldFirstSizedLineIndex && m_lastSizedLineIndex >= oldLastSizedLineIndex)
        {
            firstStillSizedLineIndex = oldFirstSizedLineIndex;
            lastStillSizedLineIndex = oldLastSizedLineIndex;
        }

        MUX_ASSERT(!(firstStillSizedLineIndex == -1 && lastStillSizedLineIndex != -1));
        MUX_ASSERT(!(firstStillSizedLineIndex != -1 && lastStillSizedLineIndex == -1));

        if (firstStillSizedLineIndex != -1)
        {
            MUX_ASSERT(lastStillSizedLineIndex != -1);

            // When firstStillSizedLineIndex != -1 (and necessarily lastStillSizedLineIndex != -1),
            // lines oldLineItemCounts[Max(oldFirstSizedLineIndex, m_firstSizedLineIndex) - oldFirstSizedLineIndex]
            // to oldLineItemCounts[Min(oldLastSizedLineIndex, m_lastSizedLineIndex) - oldFirstSizedLineIndex] would become frozen without adjustment.
            const int oldFirstLineVectorIndex = std::max(oldFirstSizedLineIndex, m_firstSizedLineIndex) - oldFirstSizedLineIndex;
            const int oldLastLineVectorIndex = std::min(oldLastSizedLineIndex, m_lastSizedLineIndex) - oldFirstSizedLineIndex;

            MUX_ASSERT(oldFirstLineVectorIndex >= 0);
            MUX_ASSERT(oldFirstLineVectorIndex < static_cast<int>(oldLineItemCounts.size()));
            MUX_ASSERT(oldLastLineVectorIndex >= 0);
            MUX_ASSERT(oldLastLineVectorIndex < static_cast<int>(oldLineItemCounts.size()));

            firstStillSizedItemIndex = oldFirstSizedItemIndex;

            for (int lineVectorIndex = 0; lineVectorIndex < oldFirstLineVectorIndex; lineVectorIndex++)
            {
                firstStillSizedItemIndex += oldLineItemCounts[lineVectorIndex];
            }

            lastStillSizedItemIndex = firstStillSizedItemIndex;

            for (int lineVectorIndex = oldFirstLineVectorIndex; lineVectorIndex <= oldLastLineVectorIndex; lineVectorIndex++)
            {
                m_lineItemCounts[static_cast<size_t>(firstStillSizedLineIndex) - m_firstSizedLineIndex + lineVectorIndex - oldFirstLineVectorIndex] =
                    oldLineItemCounts[lineVectorIndex];

                lastStillSizedItemIndex += oldLineItemCounts[lineVectorIndex];
            }

            lastStillSizedItemIndex--;

            MUX_ASSERT(firstStillSizedItemIndex <= lastStillSizedItemIndex);
        }
    }

    int sizedItemCount = 0;

    if (m_isVirtualizingContext)
    {
        // Figure out how many items fill the sized rect.

        MUX_ASSERT(m_unsizedNearLineCount + sizedLineCount <= lineCount);

        if (firstStillSizedLineIndex != -1 && firstStillSizedLineIndex == m_firstSizedLineIndex && lastStillSizedLineIndex == m_lastSizedLineIndex)
        {
            sizedItemCount = LineItemsCountTotal(0);
        }
        else if (firstStillSizedLineIndex != -1 && 0 == m_firstSizedLineIndex && lastStillSizedLineIndex == m_lastSizedLineIndex)
        {
            sizedItemCount = LineItemsCountTotal(0) + firstStillSizedItemIndex;
        }
        else if (m_unsizedNearLineCount + sizedLineCount < lineCount)
        {
            sizedItemCount = static_cast<int>(std::round(sizedLineCount * m_averageItemsPerLine.second));

            if (firstStillSizedLineIndex != -1 && 0 == m_firstSizedLineIndex)
            {
                MUX_ASSERT(oldFirstSizedItemIndex != -1);
                MUX_ASSERT(oldLastSizedItemIndex != -1);

                const int oldSizedItemCount = oldLastSizedItemIndex - oldFirstSizedItemIndex + 1;

                if (sizedItemCount < oldSizedItemCount)
                {
                    sizedItemCount = oldSizedItemCount;
                }
            }

            sizedItemCount = std::min(sizedItemCount, m_itemCount);
        }
    }

    int unsizedNearItemCount = 0;

    if (firstStillSizedLineIndex != -1)
    {
        MUX_ASSERT(m_isVirtualizingContext);

        if (m_firstSizedLineIndex == 0)
        {
            MUX_ASSERT(m_unsizedNearLineCount == 0);

            unsizedNearItemCount = 0;
        }
        else
        {
            unsizedNearItemCount = firstStillSizedItemIndex;

            if (oldFirstSizedLineIndex > m_firstSizedLineIndex)
            {
                if (sizedItemCount == 0)
                {
                    MUX_ASSERT(m_unsizedNearLineCount + sizedLineCount == lineCount);

                    unsizedNearItemCount -=
                        std::min(unsizedNearItemCount, static_cast<int>(std::round((static_cast<double>(oldFirstSizedLineIndex) - m_firstSizedLineIndex) * m_averageItemsPerLine.second)));
                }
                else
                {
                    const int lineItemsCountTotal = LineItemsCountTotal(0);
                    const int newSizedItemCount = sizedItemCount - lineItemsCountTotal;
                    const int newNearSizedLineCount = oldFirstSizedLineIndex - m_firstSizedLineIndex;
                    const int newFarSizedLineCount = std::max(0, m_lastSizedLineIndex - oldLastSizedLineIndex);

                    // newSizedItemCount < newNearSizedLineCount + newFarSizedLineCount occurs when the average items per line of the still sized lines is
                    // greater than m_averageItemsPerLine & there are not enough items left to distribute at least one item per new sized line. Do a re-layout in those cases too.
                    if (unsizedNearItemCount < m_unsizedNearLineCount + newSizedItemCount ||
                        newSizedItemCount < newNearSizedLineCount + newFarSizedLineCount)
                    {
                        // Performing complete re-layout.
                        InitializeForRelayout(
                            sizedLineCount,
                            firstStillSizedLineIndex,
                            lastStillSizedLineIndex,
                            firstStillSizedItemIndex,
                            lastStillSizedItemIndex);
                        firstStillRealizedItemIndex = -1;
                        lastStillRealizedItemIndex = -1;
                        oldLineItemCounts.clear();
                        unsizedNearItemCount = static_cast<int>(std::round(m_unsizedNearLineCount * m_averageItemsPerLine.second));
                    }
                    else
                    {
                        // There are at least as many new sized items as there are new sized lines.
                        MUX_ASSERT(newSizedItemCount >= newNearSizedLineCount + newFarSizedLineCount);

                        // New near and far sized items allocations are proportional to the new line counts.
                        const int newNearSizedItemCount = std::max(newNearSizedLineCount, newNearSizedLineCount * newSizedItemCount / (newNearSizedLineCount + newFarSizedLineCount));

                        unsizedNearItemCount -= newNearSizedItemCount;
                    }
                }
            }
            else if (unsizedNearItemCount + sizedItemCount + unsizedFarLineCount > m_itemCount)
            {
                sizedItemCount = m_itemCount - unsizedNearItemCount - unsizedFarLineCount;
            }
        }
    }
    else if (m_isVirtualizingContext)
    {
        unsizedNearItemCount = static_cast<int>(std::round(m_unsizedNearLineCount * m_averageItemsPerLine.second));
    }

    MUX_ASSERT(unsizedNearItemCount < m_itemCount);
    MUX_ASSERT(unsizedNearItemCount >= m_unsizedNearLineCount);
    MUX_ASSERT((m_unsizedNearLineCount == 0 && unsizedNearItemCount == 0) || (m_unsizedNearLineCount > 0 && unsizedNearItemCount > 0));

    if (m_unsizedNearLineCount + sizedLineCount == lineCount)
    {
        sizedItemCount = m_itemCount - unsizedNearItemCount;
    }

    MUX_ASSERT(sizedItemCount > 0);
    MUX_ASSERT(sizedItemCount >= sizedLineCount);
    MUX_ASSERT(unsizedNearItemCount + sizedItemCount <= m_itemCount);

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedItemCount", sizedItemCount);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unsizedNearItemCount", unsizedNearItemCount);

    m_firstSizedItemIndex = unsizedNearItemCount;
    m_lastSizedItemIndex = m_firstSizedItemIndex + sizedItemCount - 1;

    MUX_ASSERT((firstStillSizedItemIndex == -1) == (lastStillSizedItemIndex == -1));
    MUX_ASSERT(m_firstSizedItemIndex <= firstStillSizedItemIndex || firstStillSizedItemIndex == -1);
    MUX_ASSERT(m_lastSizedItemIndex >= lastStillSizedItemIndex || lastStillSizedItemIndex == -1);

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstSizedItemIndex", m_firstSizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastSizedItemIndex", m_lastSizedItemIndex);

    EnsureAndResizeItemAspectRatios(
        scrollViewport,
        actualLineHeight,
        lineSpacing);

    if (m_isVirtualizingContext && UpdateItemsInfo(itemsInfo, oldFirstItemsInfoIndex, oldLastItemsInfoIndex))
    {
        // The fast path was enabled. Reset the fields specific to the regular path, and return -1 to indicate that
        // the fast path must be engaged as ratios were provided for the entire data source.
        ExitRegularPath();
        return -1;
    }

    int unrealizedNearItemCount{};
    int realizedItemCount{};

    if (!m_isVirtualizingContext || static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()) < sizedItemCount)
    {
        // The ItemsInfoRequested handler did not provide sizing information for all sized items, or the context is not virtualizing.
        // Fall back to realizing all sized items instead.
        unrealizedNearItemCount = unsizedNearItemCount;
        realizedItemCount = sizedItemCount;

        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unrealizedNearItemCount fallback", unrealizedNearItemCount);
        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"realizedItemCount fallback", realizedItemCount);
        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"realized item index range fallback", unrealizedNearItemCount, unrealizedNearItemCount + realizedItemCount - 1);
    }
    else
    {
        MUX_ASSERT(m_itemsInfoFirstIndex != -1);

        GetRealizedItemsFromSizedItems(
            realizedLineCount,
            lineCount,
            &unrealizedNearItemCount,
            &realizedItemCount);
    }

    MUX_ASSERT(sizedItemCount >= realizedItemCount);
    MUX_ASSERT(firstStillRealizedItemIndex == -1);
    MUX_ASSERT(lastStillRealizedItemIndex == -1);

    if (firstStillSizedLineIndex != -1)
    {
        MUX_ASSERT(lastStillSizedLineIndex != -1);

        const int newFirstRealizedDataIndex = unrealizedNearItemCount;
        const int newLastRealizedDataIndex = newFirstRealizedDataIndex + realizedItemCount - 1;

        MUX_ASSERT(m_firstSizedItemIndex <= newFirstRealizedDataIndex);
        MUX_ASSERT(m_lastSizedItemIndex >= newLastRealizedDataIndex);

        if (newFirstRealizedDataIndex >= oldFirstRealizedDataIndex && newFirstRealizedDataIndex <= oldLastRealizedDataIndex)
        {
            firstStillRealizedItemIndex = newFirstRealizedDataIndex;
            lastStillRealizedItemIndex = std::min(oldLastRealizedDataIndex, newLastRealizedDataIndex);
        }
        else if (newLastRealizedDataIndex >= oldFirstRealizedDataIndex && newLastRealizedDataIndex <= oldLastRealizedDataIndex)
        {
            lastStillRealizedItemIndex = newLastRealizedDataIndex;
            firstStillRealizedItemIndex = std::max(oldFirstRealizedDataIndex, newFirstRealizedDataIndex);
        }
    }

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstStillSizedLineIndex", firstStillSizedLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastStillSizedLineIndex", lastStillSizedLineIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstStillSizedItemIndex", firstStillSizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastStillSizedItemIndex", lastStillSizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstStillRealizedItemIndex", firstStillRealizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastStillRealizedItemIndex", lastStillRealizedItemIndex);

    // Discard the first realized items fallen off the realization window.
    if (m_elementManager.GetFirstRealizedDataIndex() != -1 && unrealizedNearItemCount > m_elementManager.GetFirstRealizedDataIndex())
    {
        MUX_ASSERT(m_isVirtualizingContext);

        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized head range",
            m_elementManager.GetFirstRealizedDataIndex(), unrealizedNearItemCount - 1);

        m_elementManager.DiscardElementsOutsideWindow(
            false /*forward*/,
            std::min(unrealizedNearItemCount, m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount()) - 1 /*startIndex*/);
    }

    MUX_ASSERT(unrealizedNearItemCount <= m_elementManager.GetFirstRealizedDataIndex() || -1 == m_elementManager.GetFirstRealizedDataIndex());

    if (m_elementManager.GetFirstRealizedDataIndex() != -1 && unrealizedNearItemCount < m_elementManager.GetFirstRealizedDataIndex())
    {
        MUX_ASSERT(oldFirstRealizedDataIndex > 0);

        // Ensure and measure the realized items before the old first realized item.
        EnsureAndMeasureItemRange(
            context,
            availableWidth,
            actualLineHeight,
            false /*forward*/,
            std::min(oldFirstRealizedDataIndex - 1, unrealizedNearItemCount + realizedItemCount - 1) /*beginRealizedItemIndex*/,
            unrealizedNearItemCount /*endRealizedItemIndex*/);

        // Ensure and measure the realized & unfrozen items after the old first realized item.
        MUX_ASSERT(unrealizedNearItemCount == m_elementManager.GetFirstRealizedDataIndex());

        if (firstStillRealizedItemIndex != -1)
        {
            if (firstStillRealizedItemIndex > 0 && oldFirstRealizedDataIndex <= firstStillRealizedItemIndex - 1)
            {
                EnsureAndMeasureItemRange(
                    context,
                    availableWidth,
                    actualLineHeight,
                    true /*forward*/,
                    oldFirstRealizedDataIndex /*beginRealizedItemIndex*/,
                    firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
            }

            if (lastStillRealizedItemIndex + 1 <= unrealizedNearItemCount + realizedItemCount - 1)
            {
                EnsureAndMeasureItemRange(
                    context,
                    availableWidth,
                    actualLineHeight,
                    true /*forward*/,
                    lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
                    unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
            }
        }
        else if (unrealizedNearItemCount + realizedItemCount - 1 >= oldFirstRealizedDataIndex)
        {
            EnsureAndMeasureItemRange(
                context,
                availableWidth,
                actualLineHeight,
                true /*forward*/,
                oldFirstRealizedDataIndex /*beginRealizedItemIndex*/,
                unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
        }
    }
    else
    {
        // Ensure and measure the realized & unfrozen items.
        MUX_ASSERT(unrealizedNearItemCount == m_elementManager.GetFirstRealizedDataIndex() || m_elementManager.GetFirstRealizedDataIndex() == -1);

        if (firstStillRealizedItemIndex != -1)
        {
            if (firstStillRealizedItemIndex > 0 && unrealizedNearItemCount <= firstStillRealizedItemIndex - 1)
            {
                EnsureAndMeasureItemRange(
                    context,
                    availableWidth,
                    actualLineHeight,
                    true /*forward*/,
                    unrealizedNearItemCount /*beginRealizedItemIndex*/,
                    firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
            }

            if (lastStillRealizedItemIndex + 1 <= unrealizedNearItemCount + realizedItemCount - 1)
            {
                EnsureAndMeasureItemRange(
                    context,
                    availableWidth,
                    actualLineHeight,
                    true /*forward*/,
                    lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
                    unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
            }
        }
        else
        {
            EnsureAndMeasureItemRange(
                context,
                availableWidth,
                actualLineHeight,
                true /*forward*/,
                unrealizedNearItemCount /*beginRealizedItemIndex*/,
                unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
        }
    }

    // Discard the last realized items fallen off the realization window.
    if (m_isVirtualizingContext && unrealizedFarLineCount > 0 && m_elementManager.GetRealizedElementCount() > realizedItemCount)
    {
        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized tail range",
            unrealizedNearItemCount + realizedItemCount, m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount() - 1);

        m_elementManager.DiscardElementsOutsideWindow(
            true /*forward*/,
            unrealizedNearItemCount + realizedItemCount /*startIndex*/);
    }

    MUX_ASSERT(unrealizedNearItemCount >= 0);
    MUX_ASSERT(m_isVirtualizingContext || unrealizedNearItemCount == 0);
    MUX_ASSERT(!m_isVirtualizingContext || m_elementManager.GetFirstRealizedDataIndex() == unrealizedNearItemCount);
    MUX_ASSERT(m_elementManager.GetRealizedElementCount() == realizedItemCount);

    if (const auto firstElement = m_elementManager.GetRealizedElement(unrealizedNearItemCount))
    {
        UpdateRoundingScaleFactor(firstElement);
    }

    std::pair<double, double> averageItemsPerLine = GetAverageItemsPerLine(availableWidth);

    // Only request a new average items per line value when it has never been attempted in this layout pass.
    // Otherwise carry on with the current m_averageItemsPerLine value.
    if (averageItemsPerLine.second == m_averageItemsPerLine.second)
    {
        // When the snapped average-items-per-line value is unchanged, just save the raw value if it changed.
        if (averageItemsPerLine.first != m_averageItemsPerLine.first)
        {
            // The new raw value becomes the source of the snapped value and the reference point for detecting
            // deltas accross the median point (1.1^(N+1) - 1.1^N) / 2 greater than 0.1.
            SetAverageItemsPerLine(averageItemsPerLine);
        }
    }
    else if (averageItemsPerLineProcessed.find(averageItemsPerLine.second) == averageItemsPerLineProcessed.end())
    {
        *newAverageItemsPerLine = averageItemsPerLine;

        m_firstSizedLineIndex = -1;
        m_lastSizedLineIndex = -1;
        return lineCount;
    }

    MUX_ASSERT(!(firstStillSizedLineIndex != -1 && forceRelayout));
    MUX_ASSERT(unrealizedNearItemCount >= 0);
    MUX_ASSERT(m_isVirtualizingContext || unrealizedNearItemCount == 0);
    MUX_ASSERT(!m_isVirtualizingContext || m_elementManager.GetFirstRealizedDataIndex() == unrealizedNearItemCount);
    MUX_ASSERT(unsizedNearItemCount <= unrealizedNearItemCount);

    const bool itemHasNewDesiredWidth = ComputeFrozenItemsAndLayout(
        context,
        oldLineItemCounts,
        oldElementAvailableWidths,
        oldElementDesiredWidths,
        scrollViewport,
        scrollOffset,
        lineSpacing,
        actualLineHeight,
        availableWidth,
        nearSizedItemsRect,
        farSizedItemsRect,
        nearRealizationRect,
        farRealizationRect,
        lineCount,
        sizedLineCount,
        unsizedNearItemCount,
        sizedItemCount,
        firstStillSizedLineIndex,
        lastStillSizedLineIndex,
        firstStillSizedItemIndex,
        lastStillSizedItemIndex);

#ifdef DBG
    const int sizedItemCountDbg = LineItemsCountTotal(m_lastSizedItemIndex - m_firstSizedItemIndex + 1);

    VerifyLockedItemsDbg();
#endif

    if (itemHasNewDesiredWidth)
    {
        // When at least one item has a new desired width, the average items-per-line evaluation may change.
        averageItemsPerLine = GetAverageItemsPerLine(availableWidth);

        if (averageItemsPerLine.second != m_averageItemsPerLine.second &&
            averageItemsPerLineProcessed.find(averageItemsPerLine.second) == averageItemsPerLineProcessed.end())
        {
            // Computed average items-per-line is different and has not been processed yet.
            m_firstSizedLineIndex = -1;
            m_lastSizedLineIndex = -1;

            // Return the new average which will trigger a new layout.
            *newAverageItemsPerLine = averageItemsPerLine;
        }
    }

    return lineCount;
}

std::tuple< int, float, LinedFlowLayout::ItemsInfo > MeasureConstrainedLinesFastPath | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | float | availableWidth,
 |  | double | actualLineHeight,
 |  | bool | forceLayoutWithoutItemsInfoRequest |
 | ) |  |  | [private]

Definition at line 5740 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, availableWidth, actualLineHeight);

    MUX_ASSERT(m_itemCount > 0);

    float maxLineWidth{ 0.0f };
    bool unlockItems{ false };

    do
    {
        if (m_forceRelayout || m_previousAvailableWidth != availableWidth || forceLayoutWithoutItemsInfoRequest)
        {
            if (forceLayoutWithoutItemsInfoRequest)
            {
                // MeasureConstrainedLinesFastPath is invoked with forceLayoutWithoutItemsInfoRequest==True when
                // a transition from the regular path to the fast path was enabled in MeasureConstrainedLinesRegularPath
                // because (m_forceRelayout || m_previousAvailableWidth != availableWidth) == False.
                // In that case, the ItemsInfoRequested handler already provided the info for the entire data source.
                // Reset forceLayoutWithoutItemsInfoRequest so that RaiseItemsInfoRequested is called in the case
                // m_forceRelayout is set to True by EnsureItemRangeFastPath below.
                forceLayoutWithoutItemsInfoRequest = false;
            }
            else
            {
                int itemsRangeStartIndex{};
                int itemsRangeRequestedLength{};

                // Based on the average items per line, the realization rect size and offset, compute the item range for the ItemsInfoRequested event.
                GetItemsInfoRequestedRange(
                    context,
                    availableWidth,
                    actualLineHeight,
                    &itemsRangeStartIndex,
                    &itemsRangeRequestedLength);

                MUX_ASSERT(itemsRangeStartIndex >= 0);
                MUX_ASSERT(itemsRangeRequestedLength > 0);
                MUX_ASSERT(itemsRangeStartIndex + itemsRangeRequestedLength - 1 < m_itemCount);

                const ItemsInfo itemsInfo = RaiseItemsInfoRequested(itemsRangeStartIndex, itemsRangeRequestedLength);

#ifdef DBG
                LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"ItemsInfo for fast path");
                LogItemsInfoDbg(itemsRangeStartIndex, itemsRangeRequestedLength, itemsInfo);
#endif

                // Fall back to regular layout path when ItemsInfo::m_itemsRangeStartIndex is not 0.
                if (itemsInfo.m_itemsRangeStartIndex != 0)
                {
                    if (m_itemsInfoFirstIndex == -1)
                    {
                        ResetItemsInfo();
                    }

                    return std::tuple<int, float, ItemsInfo>(-1 /*lineCount*/, 0.0f /*maxLineWidth*/, itemsInfo);
                }

                // Fall back to regular layout path when ItemsInfo::m_itemsRangeLength is smaller than the collection item count.
                if (itemsInfo.m_itemsRangeLength < m_itemCount)
                {
                    if (m_itemsInfoFirstIndex == -1)
                    {
                        ResetItemsInfo();
                    }

                    return std::tuple<int, float, ItemsInfo>(-1 /*lineCount*/, 0.0f /*maxLineWidth*/, itemsInfo);
                }

                // Carry on with the fast path and reset items info from the potential prior regular path.
                ResetItemsInfo();

                m_itemsInfoMinWidth = itemsInfo.m_minWidth < 0.0 ? -1.0 : itemsInfo.m_minWidth;
                m_itemsInfoMaxWidth = itemsInfo.m_maxWidth < 0.0 ? -1.0 : itemsInfo.m_maxWidth;
            }

            maxLineWidth = ComputeItemsLayoutFastPath(
                availableWidth,
                actualLineHeight);

            // Immediately clear the arrays collected from the ItemsInfoRequested event handler.
            // ComputeItemsLayoutFastPath called above is the only method making use of them.
            ResetItemsInfoForFastPath();

            m_forceRelayout = false;
            unlockItems = true;
        }
        else if (!UsesFastPathLayout())
        {
            return std::tuple<int, float, ItemsInfo>(-1 /*lineCount*/, 0.0f /*maxLineWidth*/, s_emptyItemsInfo);
        }

        MUX_ASSERT(!m_forceRelayout);

        EnsureItemRangeFastPath(
            context,
            actualLineHeight);
    }
    while (m_forceRelayout);

    if (m_isVirtualizingContext)
    {
        if (m_elementManager.GetRealizedElementCount() > 0)
        {
            MeasureItemRange(
                actualLineHeight,
                m_elementManager.GetFirstRealizedDataIndex() /*beginRealizedItemIndex*/,
                m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount() - 1 /*endRealizedItemIndex*/);
        }

        if (maxLineWidth == 0.0f)
        {
            maxLineWidth = m_maxLineWidth;
        }
    }
    else
    {
        MeasureItemRange(
            actualLineHeight,
            0 /*beginRealizedItemIndex*/,
            m_itemCount - 1 /*endRealizedItemIndex*/);
    }

    // Set m_averageItemsPerLine for the next re-layout. It is used above to estimate the requested item range for the ItemsInfoRequested event.
    const int lineCount = static_cast<int>(m_lineItemCounts.size());

    MUX_ASSERT(lineCount >= 1);

    // In the multi-line cases, the last line does not contribute to the average evaluation because it is likely incomplete.
    const double averageItemsPerLine = (lineCount == 1) ? m_itemCount : (static_cast<double>(m_itemCount) - m_lineItemCounts[static_cast<size_t>(lineCount) - 1]) / (static_cast<double>(lineCount) - 1);

    SetAverageItemsPerLine(std::pair<double, double>(averageItemsPerLine /*averageItemsPerLineRaw*/, averageItemsPerLine /*averageItemsPerLineSnapped*/), false /*unlockItems*/);

    if (unlockItems)
    {
        UnlockItems();
    }

    return std::tuple<int, float, ItemsInfo>(lineCount, maxLineWidth, s_emptyItemsInfo);
}

int MeasureConstrainedLinesRegularPath | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | ItemsInfo const & | itemsInfo,
 |  | float | availableWidth,
 |  | double | actualLineHeight |
 | ) |  |  | [private]

Definition at line 6026 of file LinedFlowLayout.cpp.

{
    const double lineSpacing = LineSpacing();

    MUX_ASSERT(actualLineHeight > 0.0);

    const int newRecommendedAnchorIndex = context.RecommendedAnchorIndex();
    const double scrollViewport = context.VisibleRect().Height;

    MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));

    int lineCount = 0;
    int lineIndexApproximationCache = 0;
    bool isDisconnectedAnchorVirtualized = false;

    do
    {
        float nearRealizationRect = GetRoundedFloat(context.RealizationRect().Y);
        float farRealizationRect = nearRealizationRect + context.RealizationRect().Height;
        float realizationRectHeight = 0.0f;
        double clampedNearRealizationRect = 0;
        double scrollOffset = 0;

        if (m_isVirtualizingContext)
        {
            // It is assumed that the ItemsInfoRequested event will produce sizing information for lines around the realized ones when ItemsRepeater.VerticalCacheSize is smaller than 4. Only 3 viewports are forcefully realized.
            // In the case ItemsInfoRequested can not provide the requested info, it is advised to bump up the ItemsRepeater.VerticalCacheSize to 4 from the default 2.
            const float realizationRectHeightDeficit = GetRealizationRectHeightDeficit(context, actualLineHeight, lineSpacing) / 2.0f / m_measureCountdown + static_cast<float>(lineIndexApproximationCache * (actualLineHeight + lineSpacing));
            const float inflatedNearRealizationRect = nearRealizationRect - realizationRectHeightDeficit;
            const float inflatedFarRealizationRect = farRealizationRect + realizationRectHeightDeficit;
            bool realizationRectCenteredAroundAnchor = false;

            if (m_anchorIndex != -1 || newRecommendedAnchorIndex != -1)
            {
                const int anchorLineIndex = GetLineIndex(newRecommendedAnchorIndex == -1 ? m_anchorIndex : newRecommendedAnchorIndex, false /*usesFastPathLayout*/);
                const float anchorLineNearEdge = static_cast<float>(anchorLineIndex * (actualLineHeight + lineSpacing));

                // Check if the normal inflated realization rect overlaps the anticipated anchor line, with 1 line of margin of error in the line index approximation.
                if (anchorLineNearEdge - 2 * actualLineHeight - lineSpacing <= inflatedNearRealizationRect || anchorLineNearEdge + actualLineHeight + lineSpacing >= inflatedFarRealizationRect)
                {
                    // The anchor index would not be realized if the normal path (realizationRectCenteredAroundAnchor == false) were followed.
                    // A non-inflated realization rect is centered around the middle of the anticipated anchor line.
                    const float anchorLineMiddle = static_cast<float>(anchorLineNearEdge + actualLineHeight / 2.0);

                    realizationRectHeight = farRealizationRect - nearRealizationRect;
                    nearRealizationRect = GetRoundedFloat(anchorLineMiddle - realizationRectHeight / 2.0f);
                    farRealizationRect = nearRealizationRect + realizationRectHeight;
                    scrollOffset = std::max(0.0, anchorLineMiddle - scrollViewport / 2.0);
                    realizationRectCenteredAroundAnchor = true;

                    // Same comments and treatment as in LinedFlowLayout::EnsureItemRangeFastPath.
                    // Sometimes during a bring-into-view operation the RecommendedAnchorIndex momentarily switches from the target index N to -1 and then back to the target index N.
                    // To avoid momentarily setting m_anchorIndex to -1, its value is preserved c_maxAnchorIndexRetentionCount times, based purely on experimentations.
                    // Without this momentary retention the bring-into-view operation lands on incorrect offsets. If m_anchorIndex were to be preserved without a countdown, large offset changes
                    // through ScrollView.ScrollTo calls would not complete.
                    // TODO: Bug 41896418 - Investigate why the occurrences of -1 sometimes come up - even when the ScrollView anchoring is turned on.
                    //                      Does such a countdown need to be used? What is a reliable countdown starting value?
                    if (newRecommendedAnchorIndex == -1)
                    {
                        MUX_ASSERT(m_anchorIndexRetentionCountdown >= 1 && m_anchorIndexRetentionCountdown <= c_maxAnchorIndexRetentionCount);

                        m_anchorIndexRetentionCountdown--;

                        if (m_anchorIndexRetentionCountdown == 0)
                        {
                            m_anchorIndex = -1;
                        }
                    }
                    else
                    {
                        m_anchorIndexRetentionCountdown = c_maxAnchorIndexRetentionCount;
                        m_anchorIndex = newRecommendedAnchorIndex;
                    }

                    // Layout is invalidated to ensure that m_anchorIndexRetentionCountdown is decremented from c_maxAnchorIndexRetentionCount all the way to 0 (a few lines above).
                    // Otherwise m_anchorIndex could be stuck to a value that prevents the realization window from moving to the actual scroller's offset.
                    InvalidateMeasureAsync();

                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_INT, METH_NAME, this, scrollOffset, m_anchorIndex);
                }
            }

            if (!realizationRectCenteredAroundAnchor)
            {
                if (m_anchorIndex != -1)
                {
                    m_anchorIndex = -1;
                }

                nearRealizationRect = inflatedNearRealizationRect;
                farRealizationRect = inflatedFarRealizationRect;
                realizationRectHeight = farRealizationRect - nearRealizationRect;
                scrollOffset = context.VisibleRect().Y;
            }

            clampedNearRealizationRect = std::max(0.0, static_cast<double>(nearRealizationRect));
            m_unrealizedNearLineCount = static_cast<int>(clampedNearRealizationRect / (actualLineHeight + lineSpacing));
        }
        else
        {
            // All lines are realized in non-virtualizing mode.
            m_unrealizedNearLineCount = 0;

            MUX_ASSERT(context.VisibleRect().Y == 0.0f);
        }

        if (m_averageItemsPerLine.second == 0.0)
        {
            MUX_ASSERT(m_averageItemsPerLine.first == 0.0);

            SetAverageItemsPerLine(GetAverageItemsPerLine(availableWidth));
        }

        std::set<double> averageItemsPerLineProcessed;
        bool forceRelayout = false;

        if (m_forceRelayout)
        {
            forceRelayout = true;
            m_forceRelayout = false;
        }
        else if (m_previousAvailableWidth != availableWidth)
        {
            // Perform a re-layout for example when the width of the owning control changed.
            forceRelayout = true;
        }

        do
        {
            averageItemsPerLineProcessed.insert(m_averageItemsPerLine.second);

            std::pair<double, double> newAverageItemsPerLine{ m_averageItemsPerLine.first, 0.0 };

            lineCount = MeasureConstrainedLines(
                context,
                averageItemsPerLineProcessed,
                itemsInfo,
                forceRelayout,
                availableWidth,
                nearRealizationRect,
                farRealizationRect,
                scrollViewport,
                scrollOffset,
                actualLineHeight,
                &newAverageItemsPerLine);

            if (lineCount == -1)
            {
                // This indicates the fast path can be engaged as the ItemsInfoRequested event handler provided ratios for the entire collection.
                return -1;
            }

            if (newAverageItemsPerLine.second == m_averageItemsPerLine.second)
            {
                // This branch is guaranteed to be hit and end the loop because averageItemsPerLineProcessed is never populated twice with the same value.
                forceRelayout = false;
            }
            else
            {
                // The method MeasureConstrainedLines is not expected to request a new average items per line that was already processed in this layout pass.
                MUX_ASSERT(averageItemsPerLineProcessed.find(newAverageItemsPerLine.second) == averageItemsPerLineProcessed.end());

                const std::pair<double, double> oldAverageItemsPerLine = m_averageItemsPerLine;

                SetAverageItemsPerLine(newAverageItemsPerLine);

                NotifyLinedFlowLayoutInvalidatedDbg(winrt::LinedFlowLayoutInvalidationTrigger::SnappedAverageItemsPerLineChange);

                if (m_isVirtualizingContext)
                {
                    // Adjust the realization window, scroll offset and number of unrealized lines before the realized ones according to the new
                    // average items per line. The new scroll offset is an approximate value based on the old offset & old and new average items
                    // per line. Scroll anchoring through VerticalAnchorRatio will potentially correct that approximation.

                    lineCount = GetLineCount(m_averageItemsPerLine.second);
                    MUX_ASSERT(lineCount != 0);

                    const double linesSpacing = (static_cast<double>(lineCount) - 1) * lineSpacing;
                    const double scrollExtent = lineCount * actualLineHeight + linesSpacing;
                    const double maxScrollOffset = std::max(0.0, scrollExtent - scrollViewport);
                    const double newScrollOffset = std::min(maxScrollOffset, GetRoundedDouble(scrollOffset * oldAverageItemsPerLine.second / newAverageItemsPerLine.second));

                    nearRealizationRect = static_cast<float>(GetRoundedDouble(nearRealizationRect + newScrollOffset - scrollOffset));
                    farRealizationRect = nearRealizationRect + realizationRectHeight;
                    clampedNearRealizationRect = std::max(0.0, static_cast<double>(nearRealizationRect));
                    m_unrealizedNearLineCount = static_cast<int>(clampedNearRealizationRect / (actualLineHeight + lineSpacing));
                    scrollOffset = newScrollOffset;
                }

                forceRelayout = true;
            }
        }
        while (forceRelayout);

        isDisconnectedAnchorVirtualized = newRecommendedAnchorIndex != -1 && !m_elementManager.IsDataIndexRealized(newRecommendedAnchorIndex);

        if (isDisconnectedAnchorVirtualized)
        {
            // This rare case occurs when GetLineIndex for the anchor index returned an approximation off enough that the anchor element was actually not realized in the iteration above.
            // Increasing the cache by one line so that the next iteration has a much greater probability of realizing that anchor.
            lineIndexApproximationCache++;
        }
    }
    while (isDisconnectedAnchorVirtualized);

    // Clear the arrays collected from the ItemsInfoRequested event handler.
    ResetItemsInfoForFastPath();

#ifdef DBG
    if (m_isVirtualizingContext)
    {
        const int newRecommendedAnchorIndexDbg = context.RecommendedAnchorIndex();

        MUX_ASSERT(newRecommendedAnchorIndexDbg == -1 || m_elementManager.IsDataIndexRealized(newRecommendedAnchorIndexDbg));

        const int anchorLineIndexDbg = newRecommendedAnchorIndexDbg == -1 ? -1 : GetLineIndex(newRecommendedAnchorIndexDbg, false /*usesFastPathLayout*/);

        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"realized anchor", anchorLineIndexDbg, newRecommendedAnchorIndexDbg);
    }
#endif

    return lineCount;
}

void MeasureItemRange | ( | double | actualLineHeight,
 |  | int | beginRealizedItemIndex,
 |  | int | endRealizedItemIndex |
 | ) |  |  | [private]

Definition at line 6857 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);

    MUX_ASSERT(beginRealizedItemIndex >= 0);
    MUX_ASSERT(beginRealizedItemIndex <= endRealizedItemIndex);
    MUX_ASSERT(m_itemsInfoArrangeWidths.size() > 0);

    const int itemsInfoArrangeWidthsOffset = m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex;

    for (int realizedItemIndex = beginRealizedItemIndex; realizedItemIndex <= endRealizedItemIndex; realizedItemIndex++)
    {
        MUX_ASSERT(m_elementManager.IsDataIndexRealized(realizedItemIndex));

        const auto element = m_elementManager.GetRealizedElement(realizedItemIndex /*dataIndex*/);

        // Making sure the element is not null for safety.
        if (element)
        {
            MUX_ASSERT(realizedItemIndex - itemsInfoArrangeWidthsOffset<static_cast<int>(m_itemsInfoArrangeWidths.size()));

            const float arrangeWidth = m_itemsInfoArrangeWidths[static_cast<size_t>(realizedItemIndex) - itemsInfoArrangeWidthsOffset];

            if (arrangeWidth >= 0.0f)
            {
                element.Measure(winrt::Size{ arrangeWidth, static_cast<float>(actualLineHeight) });
            }

#ifdef DBG
            if (realizedItemIndex == m_logItemIndexDbg)
            {
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize",
                    arrangeWidth,
                    actualLineHeight);
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
                    element.DesiredSize().Width,
                    element.DesiredSize().Height);
            }
#endif
        }
    }
}

void MeasureItemRangeRegularPath | ( | std::shared_ptr< std::map< tracker_ref< winrt::UIElement >, float >> | elementAvailableWidths,
 |  | double | actualLineHeight,
 |  | int | beginRealizedItemIndex,
 |  | int | endRealizedItemIndex |
 | ) |  |  | [private]

Definition at line 6907 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"with ElementAvailableSize", beginRealizedItemIndex, endRealizedItemIndex);

    MUX_ASSERT(m_itemsInfoFirstIndex == -1);
    MUX_ASSERT(beginRealizedItemIndex <= endRealizedItemIndex);
    MUX_ASSERT(elementAvailableWidths);

    for (int realizedItemIndex = beginRealizedItemIndex; realizedItemIndex <= endRealizedItemIndex; realizedItemIndex++)
    {
        MUX_ASSERT(m_elementManager.IsDataIndexRealized(realizedItemIndex));

        const auto element = m_elementManager.GetRealizedElement(realizedItemIndex /*dataIndex*/);

        // Making sure the element is not null for safety.
        if (element)
        {
            const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
            float elementAvailableWidth{ -1.0f };

            if (elementAvailableWidths->find(elementTracker) != elementAvailableWidths->end())
            {
                // The element has an existing recorded available width because it needs to be scaled up or down, to fill or fit the available line width respectively.
                elementAvailableWidth = elementAvailableWidths->at(elementTracker);

                MUX_ASSERT(m_elementAvailableWidths);
                MUX_ASSERT(m_elementAvailableWidths->find(elementTracker) == m_elementAvailableWidths->end());

                // Maintain that recording and measure the element again with it.
                m_elementAvailableWidths->insert(std::pair<tracker_ref<winrt::UIElement>, float>(elementTracker, elementAvailableWidth));
            }
            else if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
            {
                // The element has no recorded available width because it is not scaled down or up, so only its desired width is recorded.
                const float minWidth = static_cast<float>(frameworkElement.MinWidth());

                if (element.DesiredSize().Width == minWidth)
                {
                    // Making sure the item is measured and stretched according to the MinWidth value (otherwise background-colored bands appear on the items' left/right edges).
                    elementAvailableWidth = minWidth;
                }
            }

            if (elementAvailableWidth != -1.0f)
            {
                element.Measure(winrt::Size{ elementAvailableWidth, static_cast<float>(actualLineHeight) });
            }
#ifdef DBG
            if (realizedItemIndex == m_logItemIndexDbg)
            {
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize",
                    elementAvailableWidth,
                    actualLineHeight);
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
                    element.DesiredSize().Width,
                    element.DesiredSize().Height);
            }
#endif
        }
    }
}

winrt::Size MeasureOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize
 | ) |  |

Definition at line 250 of file LinedFlowLayout.cpp.

{
    const float availableWidth = availableSize.Width;

#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"availableSize", availableWidth, availableSize.Height);

    MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
    LogVirtualizingLayoutContextDbg(context);
    LogElementManagerDbg();
#endif

    if (!m_isVirtualizingContext)
    {
        // LinedFlowLayout is expected to be hosted by a panel like LayoutPanel. Always perform a complete re-layout in non-virtualizing scenarios.
        // No measure passes occur on simple scrolling, and realization window is infinite.
        m_forceRelayout = true;

        const int newItemCount = context.ItemCount();

        if (!UsesArrangeWidthInfo())
        {
            if (m_itemCount < newItemCount)
            {
                // In the non-virtualizing case, the asynchronous measure passes are started only when the item count increased.
                // Ideally InvalidateMeasureTimerStart should be called instead whenever an item is added or replaced, or when
                // the collection is reset, but LinedFlowLayout::OnItemsChangedCore is not invoked in the non-virtualizing case.
                InvalidateMeasureTimerStart(0 /*tickCount*/);
            }
            else if (m_itemCount > 0 && newItemCount == 0)
            {
                // Stop the potential timer as the collection is empty now.
                InvalidateMeasureTimerStop(false /*isForDestructor*/);
            }
        }

        // LayoutPanel.Children.Count may have changed. LinedFlowLayout::OnItemsChangedCore is not invoked in non-virtualizing scenarios.
        m_itemCount = newItemCount;

        // Item locks are systematically invalidated since the measure pass must be the result of a child or Children collection change.
        UnlockItems();
    }

    MUX_ASSERT(m_itemCount == context.ItemCount());

    if (m_measureCountdown > 1)
    {
        m_measureCountdown--;
    }

    const bool actualLineHeightChanged = UpdateActualLineHeight(context, availableSize);
    const double actualLineHeight = ActualLineHeight();
    float desiredWidth = 0.0f;
    double linesSpacing = 0.0;
    int lineCount = 0;

    if (m_itemCount > 0 && actualLineHeight > 0.0)
    {
        winrt::Point layoutOrigin{};

        context.LayoutOrigin(layoutOrigin);

        if (std::isinf(availableWidth))
        {
            // Clearing the items info that may have been gathered during a previous pass while availableSize.Width != infinity.
            ResetItemsInfo();

            // Set desiredWidth to total desired width of items, plus the MinItemSpacing between them.
            desiredWidth = MeasureUnconstrainedLine(context);
            lineCount = 1;
        }
        else
        {
            // Desired width beyond the available width.
            float desiredExtraWidth = 0.0f;

            // Do not even attempt to perform the fast path when there is no listener for the ItemsInfoRequested event.
            // Instead, fall back to the regular path right away.
            if (IsFastPathSupportedDbg() && m_itemsInfoRequestedEventSource)
            {
                if (actualLineHeightChanged && !m_forceRelayout)
                {
                    // Because ActualLineHeight changed above, MeasureConstrainedLinesFastPath below needs to call
                    // ComputeItemsLayoutFastPath to perform a re-layout of all items when the fast path is enabled.
                    // The ItemsInfoRequest event needs to be raised though because of a prior ResetItemsInfoForFastPath call,
                    // so forceLayoutWithoutItemsInfoRequest cannot simply be used as True.
                    m_forceRelayout = true;
                }

                std::tuple<int /*lineCount*/, float /*maxLineWidth*/, ItemsInfo> fastPathLayoutResults = MeasureConstrainedLinesFastPath(
                    context,
                    availableWidth,
                    actualLineHeight,
                    false /*forceLayoutWithoutItemsInfoRequest*/);

                lineCount = std::get<0>(fastPathLayoutResults);

                if (lineCount == -1)
                {
                    // The items info gathered during the fast path attempt above is handed off
                    // to the regular path since in many cases it is enough to not require a
                    // new ItemsInfoRequested event to be raised.
                    lineCount = MeasureConstrainedLinesRegularPath(
                        context,
                        std::get<2>(fastPathLayoutResults) /*itemsInfo*/,
                        availableWidth,
                        actualLineHeight);

                    if (lineCount == -1)
                    {
                        // The fast path was enabled by the ItemsInfoRequested handler. This case can occur when
                        // (m_forceRelayout || m_previousAvailableWidth != availableWidth) evaluated to False in the
                        // MeasureConstrainedLinesFastPath call above, and a transition out of the regular path is
                        // enabled in MeasureConstrainedLinesRegularPath.

                        LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"MeasureConstrainedLinesRegularPath enabled fast path");

                        fastPathLayoutResults = MeasureConstrainedLinesFastPath(
                            context,
                            availableWidth,
                            actualLineHeight,
                            true /*forceLayoutWithoutItemsInfoRequest*/);

                        lineCount = std::get<0>(fastPathLayoutResults);

                        MUX_ASSERT(lineCount > 0);

                        m_maxLineWidth = std::get<1>(fastPathLayoutResults);
                    }
                    else
                    {
                        m_maxLineWidth = GetLinesDesiredWidth();
                    }

#ifdef DBG
                    if (m_aspectRatios != nullptr && !m_aspectRatios->IsEmpty())
                    {
                        // Uncomment for verbose tracing off all stored aspect ratios & weights.
                        //m_aspectRatios->LogItemAspectRatiosDbg();
                        const int firstRealizedItemIndexDbg = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
                        const int lastRealizedItemIndexDbg = firstRealizedItemIndexDbg + m_elementManager.GetRealizedElementCount() - 1;
                        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"averageAspectRatio (1)", m_aspectRatios->GetAverageAspectRatio(firstRealizedItemIndexDbg, lastRealizedItemIndexDbg, c_maxAspectRatioWeight));
                    }
#endif
                }
                else
                {
                    m_maxLineWidth = std::get<1>(fastPathLayoutResults);

                    // Reset the fields specific to the regular path.
                    ExitRegularPath();
                }
            }
            else
            {
                if (UsesArrangeWidthInfo())
                {
                    // Necessary for cases where a prior fast path is turned off because the ItemsInfoRequested handler was removed.
                    m_itemsInfoArrangeWidths.clear();
                }

                lineCount = MeasureConstrainedLinesRegularPath(
                    context,
                    s_emptyItemsInfo,
                    availableWidth,
                    actualLineHeight);

                m_maxLineWidth = GetLinesDesiredWidth();

#ifdef DBG
                if (m_aspectRatios != nullptr && !m_aspectRatios->IsEmpty())
                {
                    // Uncomment for verbose tracing off all stored aspect ratios & weights.
                    //m_aspectRatios->LogItemAspectRatiosDbg();
                    const int firstRealizedItemIndexDbg = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
                    const int lastRealizedItemIndexDbg = firstRealizedItemIndexDbg + m_elementManager.GetRealizedElementCount() - 1;
                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"averageAspectRatio (2)", m_aspectRatios->GetAverageAspectRatio(firstRealizedItemIndexDbg, lastRealizedItemIndexDbg, c_maxAspectRatioWeight));
                }
#endif
            }

            desiredWidth = availableWidth;
            desiredExtraWidth = m_maxLineWidth - availableWidth;

#ifdef DBG
            if (desiredExtraWidth != 0.0f)
            {
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredExtraWidth used", desiredExtraWidth);
            }
#endif

            // Only account for the extra desired width if it goes beyond pixel snapping rounding.
            if (desiredExtraWidth > 0.5f / static_cast<float>(m_roundingScaleFactor) * m_averageItemsPerLine.second)
            {
                desiredWidth += desiredExtraWidth;
            }

#ifdef DBG_VERBOSE
            LogLayoutDbg();
#endif
        }

        linesSpacing = (static_cast<double>(lineCount) - 1) * LineSpacing();

        if (m_isVirtualizingContext && m_itemsInfoFirstIndex == -1 && m_aspectRatios != nullptr)
        {
            const int firstRealizedItemIndex = m_elementManager.GetFirstRealizedDataIndex();
            const int lastRealizedItemIndex = firstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;

            MUX_ASSERT(firstRealizedItemIndex >= 0);
            MUX_ASSERT(lastRealizedItemIndex >= 0);

            if (m_aspectRatios->HasLowerWeight(firstRealizedItemIndex, lastRealizedItemIndex, c_maxAspectRatioWeight))
            {
                LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Forcing layout pass for low aspect ratio weight");

                // No items info was provided in the ItemsInfoRequest handler and there is at least an aspect ratio with a growing weight.
                // Making sure there is another layout coming so that weights below c_maxAspectRatioWeight can be increased and ultimately
                // reach c_maxAspectRatioWeight. Otherwise scrolling could trigger weight increases, an average-items-per-line change and re-layout.
                InvalidateMeasureAsync();
            }
        }
    }
    else
    {
        if (m_isVirtualizingContext)
        {
            m_elementManager.ClearRealizedRange();
        }
        m_elementAvailableWidths = nullptr;
        m_elementDesiredWidths = nullptr;
        SetAverageItemsPerLine(std::pair<double, double>(0.0 /*averageItemsPerLineRaw*/, 0.0 /*averageItemsPerLineSnapped*/));
        ClearItemAspectRatios();
        m_averageItemAspectRatioDbg = 0.0f;
        m_unsizedNearLineCount = -1;
        m_unrealizedNearLineCount = -1;
        m_maxLineWidth = 0.0f;
        ResetItemsInfo();
        ResetLinesInfo();
        ResetSizedLines();
    }

    m_previousAvailableWidth = availableSize.Width;

    winrt::Size desiredSize{ desiredWidth, static_cast<float>(lineCount * actualLineHeight + linesSpacing) };

#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"desiredSize", desiredSize.Width, desiredSize.Height);
    LogElementManagerDbg();
#endif

    return desiredSize;
}

float MeasureUnconstrainedLine ( winrt::VirtualizingLayoutContext const & context ) [private]

Definition at line 6975 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_itemCount == context.ItemCount());
    MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
    MUX_ASSERT(!UsesArrangeWidthInfo());

    const float actualLineHeight = static_cast<float>(ActualLineHeight());
    const winrt::Size measureAvailableSize{ std::numeric_limits<float>::infinity(), actualLineHeight };
    float desiredWidth = 0.0f;
    bool isNewlyRealizedElementMeasuredWithMinWidth = false;

    for (int itemIndex = 0; itemIndex < m_itemCount; itemIndex++)
    {
        bool isElementNewlyRealized = false;

        if (m_isVirtualizingContext && !m_elementManager.IsDataIndexRealized(itemIndex))
        {
            EnsureElementRealized(true /*forward*/, itemIndex);

            isElementNewlyRealized = true;
        }

        if (auto element = m_elementManager.GetAt(itemIndex))
        {
            element.Measure(measureAvailableSize);

            if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
            {
                const float minWidth = static_cast<float>(frameworkElement.MinWidth());

                if (element.DesiredSize().Width == minWidth)
                {
                    // Making sure the item is stretched according to the MinWidth value.
                    element.Measure(winrt::Size{ minWidth, actualLineHeight });

                    if (isElementNewlyRealized)
                    {
                        isNewlyRealizedElementMeasuredWithMinWidth = true;
                    }
                }
            }

            desiredWidth += element.DesiredSize().Width;
        }
    }

    if (isNewlyRealizedElementMeasuredWithMinWidth)
    {
        InvalidateMeasureTimerStart(0 /*tickCount*/);
    }

    SetAverageItemsPerLine(SnapAverageItemsPerLine(
        m_averageItemsPerLine.first /*oldAverageItemsPerLineRaw*/,
        m_itemCount /*newAverageItemsPerLineRaw*/));

    if (m_itemCount > 0)
    {
        desiredWidth += static_cast<float>((m_itemCount - 1) * MinItemSpacing());
    }

    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_DBL, METH_NAME, this, desiredWidth);

    return desiredWidth;
}

void NotifyLinedFlowLayoutInvalidatedDbg ( winrt::LinedFlowLayoutInvalidationTrigger const & invalidationTrigger ) [private]

Definition at line 7042 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, static_cast<int>(invalidationTrigger));

    com_ptr<LayoutsTestHooks> globalTestHooks = LayoutsTestHooks::GetGlobalTestHooks();

    if (globalTestHooks)
    {
        globalTestHooks->NotifyLinedFlowLayoutInvalidated(*this, invalidationTrigger);
    }
}

void NotifyLinedFlowLayoutItemLockedDbg | ( | int | itemIndex,
 |  | int | lineIndex |
 | ) |  |  | [private]

Definition at line 7056 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, itemIndex, lineIndex);

    com_ptr<LayoutsTestHooks> globalTestHooks = LayoutsTestHooks::GetGlobalTestHooks();

    if (globalTestHooks)
    {
        globalTestHooks->NotifyLinedFlowLayoutItemLocked(*this, itemIndex, lineIndex);
    }
}

void OnItemsChangedCore | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::IInspectable const & | source,
 |  | winrt::NotifyCollectionChangedEventArgs const & | args
 | ) |  |

Definition at line 530 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_elementManager.DataSourceChanged(source, args);

    m_itemCount = context.ItemCount();

    if (m_itemCount == 0 && !UsesArrangeWidthInfo())
    {
        // Stop the potential timer as the collection is empty now.
        InvalidateMeasureTimerStop(false /*isForDestructor*/);
    }

    // Discard any potential item sizing info previously collected through the ItemsInfoRequested event.
    // Perform a complete re-layout after the data source change.
    InvalidateLayout(true /*forceRelayout*/, true /*resetItemsInfo*/, false /*invalidateMeasure*/);

    if (args.Action() == winrt::NotifyCollectionChangedAction::Reset)
    {
        // Discard any aspect ratio previously recorded since the data source has significantly changed.
        ClearItemAspectRatios();

        // Reset the measure pass countdown to avoid extreme aspect ratio again.
        m_measureCountdown = s_measureCountdownStart;

        m_averageItemAspectRatioDbg = 0.0f;
    }

    // Calls InvalidateMeasure() to ensure the layout reflects the data source change.
    __super::OnItemsChangedCore(context, source, args);

    // Item locks are invalidated by the data source change.
    UnlockItems();
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 184 of file LinedFlowLayout.cpp.

{
    auto dependencyProperty = args.Property();

    LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, L"%s(property: %s)\n", METH_NAME, DependencyPropertyToStringDbg(dependencyProperty).c_str());

    if (dependencyProperty != s_ActualLineHeightProperty)
    {
        InvalidateLayout();
    }
}

LinedFlowLayout::ItemsInfo RaiseItemsInfoRequested | ( | int | itemsRangeStartIndex,
 |  | int | itemsRangeRequestedLength |
 | ) |  |  | [private]

Definition at line 7070 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(itemsRangeStartIndex >= 0);
    MUX_ASSERT(itemsRangeRequestedLength > 0);
    MUX_ASSERT(itemsRangeStartIndex + itemsRangeRequestedLength - 1 < m_itemCount);

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsRangeStartIndex", itemsRangeStartIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsRangeRequestedLength", itemsRangeRequestedLength);

    if (m_itemsInfoRequestedEventSource)
    {
        auto itemsInfoRequestedEventArgs = winrt::make_self<LinedFlowLayoutItemsInfoRequestedEventArgs>(*this, itemsRangeStartIndex, itemsRangeRequestedLength);

        if (itemsInfoRequestedEventArgs != nullptr)
        {
            m_itemsInfoRequestedEventSource(*this, *itemsInfoRequestedEventArgs);

            // Disconnect the LinedFlowLayout from the LinedFlowLayoutItemsInfoRequestedEventArgs so that any subsequent calls to
            // SetDesiredAspectRatios/SetMinWiths/SetMaxWiths have no effect.
            itemsInfoRequestedEventArgs->ResetLinedFlowLayout();

            // The original LinedFlowLayoutItemsInfoRequestedEventArgs.ItemsRangeStartIndex value may have been overwritten by the handler to a smaller value.
            // This allows a handler to provide more information than requested, because it's available and performant to do so. It reduces subsequent needs to
            // raise the ItemsRangeStartIndex event again.
            return ItemsInfo{
                itemsInfoRequestedEventArgs->ItemsRangeStartIndex(),
                itemsInfoRequestedEventArgs->ItemsRangeLength(),
                static_cast<float>(itemsInfoRequestedEventArgs->MinWidth()),
                static_cast<float>(itemsInfoRequestedEventArgs->MaxWidth()) };
        }
    }

    return s_emptyItemsInfo;
}

double RawAverageItemsPerLineDbg ( ) const [inline]

Definition at line 201 of file LinedFlowLayout.h.

    {
        return m_averageItemsPerLine.first;
    };

int RequestedRangeLength ( )

Definition at line 7123 of file LinedFlowLayout.cpp.

{
    return UsesFastPathLayout() ? m_itemCount : static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size());
}

int RequestedRangeStartIndex ( )

Definition at line 7114 of file LinedFlowLayout.cpp.

{
    return UsesFastPathLayout() ? 0 : m_itemsInfoFirstIndex;
}

bool RequestItemsInfo | ( | ItemsInfo const & | itemsInfo,
 |  | int | beginSizedItemIndex,
 |  | int | endSizedItemIndex |
 | ) |  |  | [private]

Definition at line 7131 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedItemIndex", beginSizedItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedItemIndex", endSizedItemIndex);

    MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex);
    MUX_ASSERT(beginSizedItemIndex >= m_firstSizedItemIndex);
    MUX_ASSERT(endSizedItemIndex <= m_lastSizedItemIndex);

    ItemsInfo newItemsInfo{};
    int desiredAspectRatiosCount{};

    if (itemsInfo.m_itemsRangeStartIndex != -1 &&
        beginSizedItemIndex >= itemsInfo.m_itemsRangeStartIndex &&
        endSizedItemIndex <= itemsInfo.m_itemsRangeStartIndex + itemsInfo.m_itemsRangeLength - 1)
    {
        // The items info gathered during the fast path attempt covers the current request.
        // Use it instead of launching a new request.
        newItemsInfo = itemsInfo;

        desiredAspectRatiosCount = newItemsInfo.m_itemsRangeLength;

        MUX_ASSERT(desiredAspectRatiosCount == static_cast<int>(m_itemsInfoDesiredAspectRatiosForFastPath.size()));
        MUX_ASSERT(desiredAspectRatiosCount >= endSizedItemIndex - beginSizedItemIndex + 1);
    }
    else
    {
        const int itemsRangeStartIndex{ beginSizedItemIndex };
        const int itemsRangeRequestedLength{ endSizedItemIndex - beginSizedItemIndex + 1 };

        MUX_ASSERT(itemsRangeStartIndex + itemsRangeRequestedLength - 1 < m_itemCount);

        newItemsInfo = RaiseItemsInfoRequested(itemsRangeStartIndex, itemsRangeRequestedLength);

#ifdef DBG
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"ItemsInfo for regular path");
        LogItemsInfoDbg(itemsRangeStartIndex, itemsRangeRequestedLength, newItemsInfo);
#endif

        desiredAspectRatiosCount = newItemsInfo.m_itemsRangeLength;

        if (desiredAspectRatiosCount <= 0)
        {
            // No aspect ratios were provided. Discard all info and use the fallback pass with larger realization rect.
            ResetItemsInfo();
            return false;
        }

        MUX_ASSERT(newItemsInfo.m_itemsRangeStartIndex >= 0);
        MUX_ASSERT(newItemsInfo.m_itemsRangeStartIndex <= beginSizedItemIndex);
        MUX_ASSERT(newItemsInfo.m_itemsRangeStartIndex + desiredAspectRatiosCount - 1 >= endSizedItemIndex);
    }

    m_itemsInfoMinWidth = newItemsInfo.m_minWidth < 0.0 ? -1.0 : newItemsInfo.m_minWidth;
    m_itemsInfoMaxWidth = newItemsInfo.m_maxWidth < 0.0 ? -1.0 : newItemsInfo.m_maxWidth;

    const int minWidthsCount = static_cast<int>(m_itemsInfoMinWidthsForFastPath.size());
    const int maxWidthsCount = static_cast<int>(m_itemsInfoMaxWidthsForFastPath.size());
    const int itemsRangeLength = std::min(desiredAspectRatiosCount, m_itemCount - newItemsInfo.m_itemsRangeStartIndex);

    MUX_ASSERT(itemsRangeLength > 0);

    if (itemsRangeLength == m_itemCount)
    {
        // The ItemsInfoRequested event handler provided ratios for the entire data source. This situation can occur when a measure path
        // is performed and (m_forceRelayout || m_previousAvailableWidth != availableWidth) evaluated to False in the initial fast path attempt,
        // in LinedFlowLayout::MeasureConstrainedLinesFastPath. The ItemsInfoRequested event was thus skipped. Here a transition from regular path
        // to fast path is enabled. One of two unfortunate behaviors needs to be picked:
        // a. Remain in the regular path until a future measure path with m_forceRelayout==True or a different availableWidth is triggered.
        //    The m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath
        //    vectors could grow very large hindering performance.
        // b. Stop the regular path and backtrack to the fast path since aspect ratios were provided for the entire collection.
        //    This can result in a re-arrangement of the visible items.
        // Option b. is picked for its perf benefits.
        return true;
    }

    if (m_itemsInfoFirstIndex == -1)
    {
        m_itemsInfoFirstIndex = newItemsInfo.m_itemsRangeStartIndex;
    }
    else
    {
        m_itemsInfoFirstIndex = std::min(newItemsInfo.m_itemsRangeStartIndex, m_itemsInfoFirstIndex);
    }

    const int minItemsInfoRequiredSize = std::min(newItemsInfo.m_itemsRangeStartIndex + itemsRangeLength - m_itemsInfoFirstIndex, m_itemCount);

    if (static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()) < minItemsInfoRequiredSize)
    {
        m_itemsInfoDesiredAspectRatiosForRegularPath.resize(minItemsInfoRequiredSize, -1.0);
    }

    if (minWidthsCount > 0 && static_cast<int>(m_itemsInfoMinWidthsForRegularPath.size()) < minItemsInfoRequiredSize)
    {
        m_itemsInfoMinWidthsForRegularPath.resize(minItemsInfoRequiredSize, -1.0);
    }

    if (maxWidthsCount > 0 && static_cast<int>(m_itemsInfoMaxWidthsForRegularPath.size()) < minItemsInfoRequiredSize)
    {
        m_itemsInfoMaxWidthsForRegularPath.resize(minItemsInfoRequiredSize, -1.0);
    }

    if (static_cast<int>(m_itemsInfoArrangeWidths.size()) < minItemsInfoRequiredSize)
    {
        m_itemsInfoArrangeWidths.resize(minItemsInfoRequiredSize, -1.0f);
    }

    const int itemsInfoIndexStart = newItemsInfo.m_itemsRangeStartIndex - m_itemsInfoFirstIndex;

    for (int index = 0; index < itemsRangeLength; index++)
    {
        const double desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForFastPath[index];

        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"desiredAspectRatio", desiredAspectRatio);

        SetDesiredAspectRatioFromItemsInfo(
            m_itemsInfoFirstIndex + itemsInfoIndexStart + index,
            desiredAspectRatio);

        MUX_ASSERT(m_itemsInfoDesiredAspectRatiosForRegularPath[itemsInfoIndexStart + index] == desiredAspectRatio);

        if (minWidthsCount > 0 && index < minWidthsCount)
        {
            LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"minWidth", m_itemsInfoMinWidthsForFastPath[index]);

            m_itemsInfoMinWidthsForRegularPath[static_cast<size_t>(itemsInfoIndexStart) + index] = m_itemsInfoMinWidthsForFastPath[index];
        }

        if (maxWidthsCount > 0 && index < maxWidthsCount)
        {
            LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"maxWidth", m_itemsInfoMaxWidthsForFastPath[index]);

            m_itemsInfoMaxWidthsForRegularPath[static_cast<size_t>(itemsInfoIndexStart) + index] = m_itemsInfoMaxWidthsForFastPath[index];
        }
    }

    return false;
}

void ResetItemsInfo ( ) [private]

Definition at line 7274 of file LinedFlowLayout.cpp.

{
    m_itemsInfoDesiredAspectRatiosForRegularPath.clear();
    m_itemsInfoMinWidthsForRegularPath.clear();
    m_itemsInfoMaxWidthsForRegularPath.clear();
    m_itemsInfoArrangeWidths.clear();
    m_itemsInfoFirstIndex = -1;
    m_itemsInfoMinWidth = -1.0f;
    m_itemsInfoMaxWidth = -1.0f;
}

void ResetItemsInfoForFastPath ( ) [private]

Definition at line 7285 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    m_itemsInfoDesiredAspectRatiosForFastPath.clear();
    m_itemsInfoMinWidthsForFastPath.clear();
    m_itemsInfoMaxWidthsForFastPath.clear();
}

void ResetLinesInfo ( ) [private]

Definition at line 7294 of file LinedFlowLayout.cpp.

{
    m_lineItemCounts.clear();
}

void ResetSizedLines ( ) [private]

Definition at line 7299 of file LinedFlowLayout.cpp.

{
    m_firstSizedLineIndex = -1;
    m_lastSizedLineIndex = -1;
    m_firstSizedItemIndex = -1;
    m_lastSizedItemIndex = -1;
    m_firstFrozenLineIndex = -1;
    m_lastFrozenLineIndex = -1;
    m_firstFrozenItemIndex = -1;
    m_lastFrozenItemIndex = -1;
}

void SetArrangeWidthFromItemsInfo | ( | int | itemIndex,
 |  | float | arrangeWidth |
 | ) |  |  | [private]

Definition at line 7312 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex", itemIndex);

    if (itemIndex == m_logItemIndexDbg)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
    }
    else
    {
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
    }
#endif

    MUX_ASSERT(m_itemsInfoFirstIndex >= -1);

    // m_itemsInfoFirstIndex >=  0: Regular path layout case, with items info available (m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath).
    // m_itemsInfoFirstIndex == -1: Fast path layout case, without items info available.
    const int itemsInfoArrangeWidthsIndex = itemIndex - (m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex);

    MUX_ASSERT(itemsInfoArrangeWidthsIndex >= 0);
    MUX_ASSERT(itemsInfoArrangeWidthsIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));

    m_itemsInfoArrangeWidths[itemsInfoArrangeWidthsIndex] = arrangeWidth;
}

void SetAverageItemsPerLine | ( | std::pair< double, double > | averageItemsPerLine,
 |  | bool | unlockItems = true |
 | ) |  |  | [private]

Definition at line 7342 of file LinedFlowLayout.cpp.

{
    if (averageItemsPerLine.second == m_averageItemsPerLine.second)
    {
        // When the old and new snapped average-items-per-line are identical,
        // just retain the raw value change.
        m_averageItemsPerLine.first = averageItemsPerLine.first;
    }
    else
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, m_averageItemsPerLine.second, averageItemsPerLine.second);

        m_averageItemsPerLine = averageItemsPerLine;

        if (unlockItems)
        {
            UnlockItems();
        }

        com_ptr<LayoutsTestHooks> globalTestHooks = LayoutsTestHooks::GetGlobalTestHooks();

        if (globalTestHooks)
        {
            globalTestHooks->NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged(*this);
        }
    }
}

void SetDesiredAspectRatioFromItemsInfo | ( | int | itemIndex,
 |  | double | desiredAspectRatio |
 | ) |  |  | [private]

Definition at line 7372 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex", itemIndex);

    if (itemIndex == m_logItemIndexDbg)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"desiredAspectRatio", desiredAspectRatio);
    }
    else
    {
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"desiredAspectRatio", desiredAspectRatio);
    }

    MUX_ASSERT(itemIndex < m_itemCount);
    MUX_ASSERT(m_itemsInfoFirstIndex >= 0);
    MUX_ASSERT(itemIndex - m_itemsInfoFirstIndex >= 0);
    MUX_ASSERT(itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));
#endif

    m_itemsInfoDesiredAspectRatiosForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex] = desiredAspectRatio;
}

void SetDesiredAspectRatios ( winrt::array_view< double const > const & values ) [inline]

Definition at line 52 of file LinedFlowLayout.h.

    {
        m_itemsInfoDesiredAspectRatiosForFastPath = { values.begin(), values.end() };
    }

float SetItemRangeArrangeWidth | ( | int | beginItemIndex,
 |  | int | endItemIndex,
 |  | double | actualLineHeight,
 |  | double | averageAspectRatio,
 |  | double | scaleFactor = 1.0 |
 | ) |  |  | [private]

Definition at line 7399 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(beginItemIndex <= endItemIndex);
    MUX_ASSERT(beginItemIndex >= 0);
    MUX_ASSERT(endItemIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));

    float totalArrangeWidth = 0.0f;

    for (int itemIndex = beginItemIndex; itemIndex <= endItemIndex; itemIndex++)
    {
        const float arrangeWidth = GetArrangeWidthFromItemsInfo(itemIndex, actualLineHeight, averageAspectRatio, scaleFactor);

        SetArrangeWidthFromItemsInfo(itemIndex, arrangeWidth);

        totalArrangeWidth += arrangeWidth;
    }

    return totalArrangeWidth;
}

void SetMaxWidths ( winrt::array_view< double const > const & values ) [inline]

Definition at line 62 of file LinedFlowLayout.h.

    {
        m_itemsInfoMaxWidthsForFastPath = { values.begin(), values.end() };
    }

void SetMinWidths ( winrt::array_view< double const > const & values ) [inline]

Definition at line 57 of file LinedFlowLayout.h.

    {
        m_itemsInfoMinWidthsForFastPath = { values.begin(), values.end() };
    }

std::pair< double, double > SnapAverageItemsPerLine | ( | double | oldAverageItemsPerLineRaw,
 |  | double | newAverageItemsPerLineRaw |
 | ) |  |  | const [private]

Definition at line 7425 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(oldAverageItemsPerLineRaw == 0.0 || oldAverageItemsPerLineRaw >= 1.0);
    MUX_ASSERT(newAverageItemsPerLineRaw == 0.0 || newAverageItemsPerLineRaw >= 1.0);

    // A snapped average-items-per-line value must be a power of 1.1.
    constexpr double valuePower = 1.1;
    // When the raw value crosses the median line betweeen two successive powers of 1.1, the old snapped value is retained unless the raw delta is greater than 0.1.
    constexpr double distanceThreshold = 0.1;
    const double appliedValuePower = m_forcedAverageItemsPerLineDividerDbg == 0.0 ? valuePower : m_forcedAverageItemsPerLineDividerDbg;
    const double oldAverageItemsPerLineSnapped = (oldAverageItemsPerLineRaw == 0.0) ? 0.0 : SnapToPower(oldAverageItemsPerLineRaw, appliedValuePower);
    const double newAverageItemsPerLineSnapped = (newAverageItemsPerLineRaw == 0.0) ? 0.0 : SnapToPower(newAverageItemsPerLineRaw, appliedValuePower);

    if (oldAverageItemsPerLineSnapped != newAverageItemsPerLineSnapped &&
        std::abs(oldAverageItemsPerLineRaw - newAverageItemsPerLineRaw) <= distanceThreshold)
    {
        // The old and new snapped values are different, but their respective raw values are close (i.e. within a distanceThreshold delta).
        // Instead of returning newAverageItemsPerLineSnapped, return oldAverageItemsPerLineSnapped so the applied average items per line
        // is more stable when the raw values hover around the middle point between 1.1^N and 1.1^(N+1).
        // Example:
        // 1.1^14 = 3.7975, 1.1^15 = 4.1772. Their middle point is about 3.9874.
        // oldAverageItemsPerLineRaw = 3.95 snapped to oldAverageItemsPerLineSnapped = 1.1^14 = 3.7975.
        // newAverageItemsPerLineRaw = 4.00 would normally snap to 1.1^15 = 4.1772, but because |3.95 - 4.00| <= 0.1, the old pair is returned.
        return std::pair<double, double>(oldAverageItemsPerLineRaw, oldAverageItemsPerLineSnapped);
    }

    return std::pair<double, double>(newAverageItemsPerLineRaw, newAverageItemsPerLineSnapped);
}

double SnappedAverageItemsPerLineDbg ( ) const [inline]

Definition at line 206 of file LinedFlowLayout.h.

    {
        return m_averageItemsPerLine.second;
    };

double SnapToPower | ( | double | value,
 |  | double | valuePower |
 | ) |  |  | const [private]

Definition at line 7458 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    constexpr double defaultValuePowerDbg = 1.1;

    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"value", value);
    if (valuePower != defaultValuePowerDbg)
    {
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valuePower", valuePower);
    }

    MUX_ASSERT(value >= 1.0);
#endif

    const double dividerLog = std::log(valuePower);
    const double valueLog = std::log(value);
    const double valueExp = std::ceil(valueLog / dividerLog);
    const double valueRndCeil = std::pow(valuePower, valueExp);
    const double valueRndFloor = valueRndCeil / valuePower;

#ifdef DBG
    if (valuePower != defaultValuePowerDbg)
    {
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"dividerLog", dividerLog);
        LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueLog", valueLog);
    }
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueExp", valueExp);
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueRndCeil", valueRndCeil);
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueRndFloor", valueRndFloor);
#endif

    // Return valuePower^valueExp or valuePower^(valueExp - 1), whichever is closest to value.
    if (std::abs(valueRndCeil - value) <= std::abs(valueRndFloor - value))
    {
        return valueRndCeil;
    }
    else
    {
        return valueRndFloor;
    }
}

void UninitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )

Definition at line 228 of file LinedFlowLayout.cpp.

{
    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    MUX_ASSERT(m_wasInitializedForContext);
    MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));

    __super::UninitializeForContextCore(context);

    m_wasInitializedForContext = false;
    m_itemCount = 0;
    if (m_isVirtualizingContext)
    {
        m_isVirtualizingContext = false;
        m_elementManager.ClearRealizedRange();
    }

    InvalidateMeasureTimerStop(false /*isForDestructor*/);
    UnlockItems();
}

void UnlockItems ( )

Definition at line 7505 of file LinedFlowLayout.cpp.

{
    if (m_lockedItemIndexes.size() > 0 || m_isFirstOrLastItemLocked)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, m_lockedItemIndexes.size(), m_isFirstOrLastItemLocked);

        m_lockedItemIndexes.clear();
        m_isFirstOrLastItemLocked = false;
        m_itemsUnlockedEventSource(*this, nullptr);
    }
}

bool UpdateActualLineHeight | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize |
 | ) |  |  | [private]

Definition at line 7518 of file LinedFlowLayout.cpp.

{
    const double lineHeight = LineHeight();
    const double oldActualLineHeight = ActualLineHeight();
    double newActualLineHeight{ 0.0 };

    if (std::isnan(lineHeight))
    {
        if (context.ItemCount() > 0)
        {
            winrt::UIElement element = nullptr;
            winrt::Size desiredSize{ -1.0f, -1.0f };

            // Element for first data item determines ActualLineHeight value.
            if (oldActualLineHeight != 0.0 &&
                m_elementManager.IsDataIndexRealized(0) &&
                (element = m_elementManager.GetRealizedElement(0)))
            {
                // Check if the realized element at index 0 has a recorded desired or available size
                // to restore after measurement with the provided 'availableSize'.
                desiredSize = GetDesiredSizeForAvailableSize(0, element, availableSize, oldActualLineHeight);

                if (desiredSize.Height != -1.0f)
                {
                    newActualLineHeight = desiredSize.Height;
                }
                // Else use context.GetOrCreateElementAt instead.
            }

            if (desiredSize.Height == -1.0f)
            {
                // The element for the first item is not realized or has no recorded measurement size, so generate a new element and let it be recycled.
                // Since LineHeight is NaN, this element is not meant to have a height based on content asynchronously loaded.
                // That would lead to a temporary incorrect ActualLineHeight and potentially numerous item realizations.
                if (element = context.GetOrCreateElementAt(0 /*dataIndex*/, winrt::ElementRealizationOptions::ForceCreate))
                {
                    element.Measure(availableSize);
                    newActualLineHeight = element.DesiredSize().Height;
                    //TODO: Bug 41896454.
                    //      Why is this RecycleElement call triggering endless measure passes?
                    //      This element needs to be discarded or else bring-into-view operations to index 0 will be animated (because index 0 is considered realized).
                    //context.RecycleElement(element);
                }
            }
        }
    }
    else
    {
        newActualLineHeight = lineHeight;
    }

    if (oldActualLineHeight != newActualLineHeight)
    {
        LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, newActualLineHeight);

        ActualLineHeight(newActualLineHeight);

        return true;
    }

    return false;
}

void UpdateAspectRatiosWithItemsInfo ( ) [private]

Definition at line 7591 of file LinedFlowLayout.cpp.

{
    MUX_ASSERT(m_aspectRatios != nullptr);

    const int itemsInfoCount = static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size());
    const double actualLineHeight = ActualLineHeight();

    for (int index = 0; index < itemsInfoCount; index++)
    {
        double desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForRegularPath[index];

        if (desiredAspectRatio <= 0.0)
        {
            continue;
        }

        const double minWidth = GetMinWidthFromItemsInfo(m_itemsInfoFirstIndex + index);
        const double maxWidth = GetMaxWidthFromItemsInfo(m_itemsInfoFirstIndex + index);

        if (minWidth > 0.0 || maxWidth >= 0.0)
        {
            double desiredWidth = desiredAspectRatio * actualLineHeight;

            if (minWidth > 0.0 && minWidth > desiredWidth)
            {
                desiredWidth = minWidth;
            }

            if (maxWidth >= 0.0 && maxWidth < desiredWidth)
            {
                desiredWidth = maxWidth;
            }

            desiredAspectRatio = desiredWidth / actualLineHeight;
        }

        LinedFlowLayoutItemAspectRatios::ItemAspectRatio itemAspectRatio = m_aspectRatios->GetAt(m_itemsInfoFirstIndex + index);
        const float aspectRatio = static_cast<float>(desiredAspectRatio);
        bool updateItemAspectRatio = false;

        if (itemAspectRatio.m_weight == 0)
        {
            itemAspectRatio.m_aspectRatio = aspectRatio;
            itemAspectRatio.m_weight = c_maxAspectRatioWeight;
            updateItemAspectRatio = true;

#ifdef DBG
            if (m_itemsInfoFirstIndex + index == m_logItemIndexDbg)
            {
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"ItemsInfo aspect ratio", aspectRatio);
            }
#endif
        }
        else
        {
            MUX_ASSERT(itemAspectRatio.m_aspectRatio >= 0.0f);
            MUX_ASSERT(itemAspectRatio.m_weight >= 1);
            MUX_ASSERT(itemAspectRatio.m_weight <= c_maxAspectRatioWeight);

            if (itemAspectRatio.m_weight != c_maxAspectRatioWeight)
            {
                itemAspectRatio.m_weight = c_maxAspectRatioWeight;
                updateItemAspectRatio = true;
            }

            // Ignore aspect ratio deltas coming from pixel snapping rounding. The aspect ratios coming from UIElement.Measure are preserved.
            if (std::abs(itemAspectRatio.m_aspectRatio - aspectRatio) > 0.5 / (m_roundingScaleFactor * actualLineHeight))
            {
#ifdef DBG
                if (m_itemsInfoFirstIndex + index == m_logItemIndexDbg)
                {
                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
                    LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"ItemsInfo aspect ratio overwriting", itemAspectRatio.m_aspectRatio, aspectRatio);
                }
#endif
                itemAspectRatio.m_aspectRatio = aspectRatio;
                updateItemAspectRatio = true;
            }
        }

        if (updateItemAspectRatio)
        {
            m_aspectRatios->SetAt(m_itemsInfoFirstIndex + index, itemAspectRatio);
        }
    }
}

bool UpdateItemsInfo | ( | ItemsInfo const & | itemsInfo,
 |  | int | oldFirstItemsInfoIndex,
 |  | int | oldLastItemsInfoIndex |
 | ) |  |  | [private]

Definition at line 7682 of file LinedFlowLayout.cpp.

{
#ifdef DBG
    LogItemsInfoDbg(-1, -1, itemsInfo);
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"oldFirstItemsInfoIndex", oldFirstItemsInfoIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"oldLastItemsInfoIndex", oldLastItemsInfoIndex);
#endif

    // Raise ItemsInfoRequested events.
    if (oldFirstItemsInfoIndex == -1 || m_lastSizedItemIndex < oldFirstItemsInfoIndex || m_firstSizedItemIndex > oldLastItemsInfoIndex)
    {
        // No overlapping of old items info and new sized items. Build the items info from scratch.
        ResetItemsInfo();

        // Raise event for [m_firstSizedItemIndex, m_lastSizedItemIndex] range.
        if (RequestItemsInfo(itemsInfo, m_firstSizedItemIndex /*beginSizedItemIndex*/, m_lastSizedItemIndex /*endSizedItemIndex*/))
        {
            return true;
        }

        UpdateAspectRatiosWithItemsInfo();
    }
    else if (m_firstSizedItemIndex < oldFirstItemsInfoIndex || m_lastSizedItemIndex > oldLastItemsInfoIndex)
    {
        // Partial overlapping.
        MUX_ASSERT(oldLastItemsInfoIndex != -1);

        // TODO as part of perf Task 42298247 - see if these copies can be avoided by copying vector elements 'in place'.
        std::vector<double> oldItemsInfoDesiredAspectRatios = m_itemsInfoDesiredAspectRatiosForRegularPath;
        std::vector<double> oldItemsInfoMinWidths = m_itemsInfoMinWidthsForRegularPath;
        std::vector<double> oldItemsInfoMaxWidths = m_itemsInfoMaxWidthsForRegularPath;
        std::vector<float> oldItemsInfoArrangeWidths = m_itemsInfoArrangeWidths;

        const int newItemsInfoCount = m_lastSizedItemIndex - m_firstSizedItemIndex + 1;

        EnsureItemsInfoDesiredAspectRatios(newItemsInfoCount /*itemCount*/);

        if (m_itemsInfoMinWidthsForRegularPath.size() > 0)
        {
            EnsureItemsInfoMinWidths(newItemsInfoCount /*itemCount*/);
        }

        if (m_itemsInfoMaxWidthsForRegularPath.size() > 0)
        {
            EnsureItemsInfoMaxWidths(newItemsInfoCount /*itemCount*/);
        }

        EnsureItemsInfoArrangeWidths(newItemsInfoCount /*itemCount*/);

        m_itemsInfoFirstIndex = m_firstSizedItemIndex;

        const bool oldFirstOverlaps = oldFirstItemsInfoIndex >= m_firstSizedItemIndex && oldFirstItemsInfoIndex <= m_lastSizedItemIndex;
        const bool oldLastOverlaps = oldLastItemsInfoIndex >= m_firstSizedItemIndex && oldLastItemsInfoIndex <= m_lastSizedItemIndex;
        const bool newFirstOverlaps = m_firstSizedItemIndex >= oldFirstItemsInfoIndex && m_firstSizedItemIndex <= oldLastItemsInfoIndex;
        const bool newLastOverlaps = m_lastSizedItemIndex >= oldFirstItemsInfoIndex && m_lastSizedItemIndex <= oldLastItemsInfoIndex;

        if (oldFirstOverlaps || oldLastOverlaps || newFirstOverlaps || newLastOverlaps)
        {
            MUX_ASSERT(!newFirstOverlaps || !newLastOverlaps);

            // Fill m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath, m_itemsInfoArrangeWidths vectors with overlapping
            // oldItemsInfoDesiredAspectRatios, oldItemsInfoMinWidths, oldItemsInfoMaxWidths, oldItemsInfoArrangeWidths ones.
            if (oldFirstOverlaps && oldLastOverlaps)
            {
                CopyItemsInfo(
                    oldItemsInfoDesiredAspectRatios,
                    oldItemsInfoMinWidths,
                    oldItemsInfoMaxWidths,
                    oldItemsInfoArrangeWidths,
                    0 /*oldStart*/,
                    oldFirstItemsInfoIndex - m_firstSizedItemIndex /*newStart*/,
                    oldLastItemsInfoIndex - oldFirstItemsInfoIndex + 1 /*copyCount*/);
            }
            else if (newFirstOverlaps && oldLastOverlaps)
            {
                CopyItemsInfo(
                    oldItemsInfoDesiredAspectRatios,
                    oldItemsInfoMinWidths,
                    oldItemsInfoMaxWidths,
                    oldItemsInfoArrangeWidths,
                    m_firstSizedItemIndex - oldFirstItemsInfoIndex /*oldStart*/,
                    0 /*newStart*/,
                    oldLastItemsInfoIndex - m_firstSizedItemIndex + 1 /*copyCount*/);
            }
            else if (oldFirstOverlaps && newLastOverlaps)
            {
                CopyItemsInfo(
                    oldItemsInfoDesiredAspectRatios,
                    oldItemsInfoMinWidths,
                    oldItemsInfoMaxWidths,
                    oldItemsInfoArrangeWidths,
                    0 /*oldStart*/,
                    oldFirstItemsInfoIndex - m_firstSizedItemIndex /*newStart*/,
                    m_lastSizedItemIndex - oldFirstItemsInfoIndex + 1 /*copyCount*/);
            }
        }

        if (m_firstSizedItemIndex < oldFirstItemsInfoIndex)
        {
            // Raise event for [m_firstSizedItemIndex, oldFirstItemsInfoIndex - 1] range.
            if (RequestItemsInfo(itemsInfo, m_firstSizedItemIndex /*beginSizedItemIndex*/, oldFirstItemsInfoIndex - 1 /*endSizedItemIndex*/))
            {
                return true;
            }
        }

        if (m_lastSizedItemIndex > oldLastItemsInfoIndex)
        {
            // Raise event for [oldLastItemsInfoIndex + 1, m_lastSizedItemIndex] range.
            if (RequestItemsInfo(itemsInfo, oldLastItemsInfoIndex + 1 /*beginSizedItemIndex*/, m_lastSizedItemIndex /*endSizedItemIndex*/))
            {
                return true;
            }
        }

        UpdateAspectRatiosWithItemsInfo();
    }
    else
    {
        // Full overlapping. [m_firstSizedItemIndex, m_lastSizedItemIndex] is a subset of [oldFirstItemsInfoIndex, oldLastItemsInfoIndex].
        // m_itemsInfoDesiredAspectRatiosForRegularPath left unchanged.
        MUX_ASSERT(m_itemsInfoFirstIndex != -1);
        MUX_ASSERT(m_firstSizedItemIndex >= oldFirstItemsInfoIndex);
        MUX_ASSERT(m_firstSizedItemIndex <= oldLastItemsInfoIndex);
        MUX_ASSERT(m_lastSizedItemIndex >= oldFirstItemsInfoIndex);
        MUX_ASSERT(m_lastSizedItemIndex <= oldLastItemsInfoIndex);
    }

    return false;
}

void UpdateRoundingScaleFactor ( winrt::UIElement const & xamlRootReference ) [private]

Definition at line 7816 of file LinedFlowLayout.cpp.

{
    try
    {
        m_roundingScaleFactor = static_cast<float>(xamlRootReference.XamlRoot().RasterizationScale());
    }
    catch (winrt::hresult_error)
    {
        // Calling GetForCurrentView on threads without a CoreWindow throws an error.
        // In this circumstance, we'll just always round to the closest integer.
        m_roundingScaleFactor = 1.0f;
    }
}

bool UsesArrangeWidthInfo ( ) const [private]

Definition at line 7837 of file LinedFlowLayout.cpp.

{
    return m_itemsInfoArrangeWidths.size() > 0;
}

bool UsesFastPathLayout ( ) const [private]

Definition at line 7845 of file LinedFlowLayout.cpp.

{
    return UsesArrangeWidthInfo() && m_itemsInfoFirstIndex == -1;
}

Member Data Documentation

std::pair<double, double> m_averageItemsPerLine [private]

Definition at line 784 of file LinedFlowLayout.h.

std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float> > m_elementAvailableWidths [private]

Definition at line 769 of file LinedFlowLayout.h.

std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float> > m_elementDesiredWidths [private]

Definition at line 774 of file LinedFlowLayout.h.

std::vector<float> m_itemsInfoArrangeWidths [private]

Definition at line 777 of file LinedFlowLayout.h.

std::vector<double> m_itemsInfoDesiredAspectRatiosForRegularPath [private]

Definition at line 781 of file LinedFlowLayout.h.

std::vector<double> m_itemsInfoMaxWidthsForRegularPath [private]

Definition at line 783 of file LinedFlowLayout.h.

std::vector<double> m_itemsInfoMinWidthsForRegularPath [private]

Definition at line 782 of file LinedFlowLayout.h.

std::vector<int> m_lineItemCounts [private]

Definition at line 776 of file LinedFlowLayout.h.

std::map<int, int> m_lockedItemIndexes [private]

Definition at line 758 of file LinedFlowLayout.h.

The documentation for this class was generated from the following files:
  • Repeater/LinedFlowLayout.h
  • Repeater/LinedFlowLayout.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayout::ItemsInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LinedFlowLayout
  • LinedFlowLayout::ItemsInfo

LinedFlowLayout::ItemsInfo Struct Reference

Detailed Description

Definition at line 222 of file LinedFlowLayout.h.

The documentation for this struct was generated from the following file:
  • Repeater/LinedFlowLayout.h
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayout::ItemsLayout Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LinedFlowLayout
  • LinedFlowLayout::ItemsLayout

LinedFlowLayout::ItemsLayout Struct Reference

Detailed Description

Definition at line 231 of file LinedFlowLayout.h.

The documentation for this struct was generated from the following file:
  • Repeater/LinedFlowLayout.h
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutItemAspectRatios Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Member Functions

LinedFlowLayoutItemAspectRatios Class Reference

#include "LinedFlowLayoutItemAspectRatios.h"

List of all members.

Classes

struct | ItemAspectRatio
class | ItemAspectRatioBlock

Public Member Functions

LinedFlowLayoutItemAspectRatios ()
void | Clear ()
ItemAspectRatio | GetAt (int itemIndex) const
float | GetAverageAspectRatio (int firstItemIndex, int lastItemIndex, int weight) const
bool | HasLowerWeight (int firstItemIndex, int lastItemIndex, int weight) const
bool | IsEmpty () const
void | Resize (int size, int referenceItemIndex)
void | SetAt (int itemIndex, ItemAspectRatio itemAspectRatio)

Private Member Functions

std::shared_ptr
< ItemAspectRatioBlock > 		GetEmptyOrFurthestBlock (int fromItemIndex)

Detailed Description

Definition at line 26 of file LinedFlowLayoutItemAspectRatios.h.

Constructor & Destructor Documentation

LinedFlowLayoutItemAspectRatios ( ) [inline]

Definition at line 29 of file LinedFlowLayoutItemAspectRatios.h.

{};

Member Function Documentation

void Clear ( )

Definition at line 132 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    const int c_minBlockCount{ 4 };

    // Keep at most c_minBlockCount ItemAspectRatioBlock instances allocated for future use, to avoid reallocations.
    while (m_itemAspectRatioBlocks.size() > c_minBlockCount)
    {
        m_itemAspectRatioBlocks.erase(m_itemAspectRatioBlocks.begin());
    }

    // Each remaining ItemAspectRatioBlock is cleared for future reuse.
    for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
    {
        itemAspectRatioBlock->Clear();
    }

    MUX_ASSERT(IsEmpty());
}

LinedFlowLayoutItemAspectRatios::ItemAspectRatio GetAt ( int itemIndex ) const

Definition at line 86 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
    {
        if (itemAspectRatioBlock->IncludesItemIndex(itemIndex))
        {
            return itemAspectRatioBlock->GetAt(itemIndex);
        }
    }

    return s_emptyItemAspectRatio;
}

float GetAverageAspectRatio | ( | int | firstItemIndex,
 |  | int | lastItemIndex,
 |  | int | weight |
 | ) |  |  | const

Definition at line 51 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstItemIndex", firstItemIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastItemIndex", lastItemIndex);

    MUX_ASSERT(!IsEmpty());

    float totalAspectRatios{ 0.0f };
    int totalWeights{ 0 };

    for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
    {
        const ItemAspectRatio itemAspectRatioBlockTotals = itemAspectRatioBlock->GetTotals(firstItemIndex, lastItemIndex, weight);

        totalAspectRatios += itemAspectRatioBlockTotals.m_aspectRatio;
        totalWeights += itemAspectRatioBlockTotals.m_weight;
    }

    if (totalAspectRatios > 0.0f && totalWeights > 0)
    {
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"totalAspectRatios", totalAspectRatios);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"totalWeights", totalWeights);
        LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"returned value", totalAspectRatios / totalWeights);

        return totalAspectRatios / totalWeights;
    }

    return 0.0f;
}

std::shared_ptr< LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock > GetEmptyOrFurthestBlock ( int fromItemIndex ) [private]

Definition at line 201 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    std::shared_ptr<ItemAspectRatioBlock> furthestItemAspectRatioBlock{ nullptr };

    for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
    {
        if (itemAspectRatioBlock->StartIndex() == -1)
        {
            return itemAspectRatioBlock;
        }
        else if (furthestItemAspectRatioBlock == nullptr ||
            std::abs((furthestItemAspectRatioBlock->StartIndex() + furthestItemAspectRatioBlock->EndIndex()) / 2 - fromItemIndex) < std::abs((itemAspectRatioBlock->StartIndex() + itemAspectRatioBlock->EndIndex()) / 2 - fromItemIndex))
        {
            furthestItemAspectRatioBlock = itemAspectRatioBlock;
        }
    }

    return furthestItemAspectRatioBlock;
}

bool HasLowerWeight | ( | int | firstItemIndex,
 |  | int | lastItemIndex,
 |  | int | weight |
 | ) |  |  | const

Definition at line 10 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
    {
        if (itemAspectRatioBlock->HasLowerWeight(firstItemIndex, lastItemIndex, weight))
        {
            LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstItemIndex", firstItemIndex);
            LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastItemIndex", lastItemIndex);
            LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"returns True");

            return true;
        }
    }

    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstItemIndex", firstItemIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastItemIndex", lastItemIndex);
    LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"returns False");

    return false;
}

bool IsEmpty ( ) const

Definition at line 35 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
    {
        if (itemAspectRatioBlock->StartIndex() != -1)
        {
            // StartIndex() != -1 indicates that this block tracks at least one aspect ratio.
            return false;
        }
    }

    return true;
}

void Resize | ( | int | size,
 |  | int | referenceItemIndex
 | ) |  |

Definition at line 153 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, size, referenceItemIndex);

    MUX_ASSERT(size >= 1);
    MUX_ASSERT(referenceItemIndex >= 0);

    const int requiredBlocks = static_cast<int>(std::ceil(static_cast<double>(size) / ItemAspectRatioBlock::BlockSize()));
    const int existingBlocks = static_cast<int>(m_itemAspectRatioBlocks.size());

    if (requiredBlocks == existingBlocks)
    {
        return;
    }

    LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"size", size);
    LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"referenceItemIndex", referenceItemIndex);
    LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"requiredBlocks", requiredBlocks);
    LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"existingBlocks", existingBlocks);

    if (requiredBlocks > existingBlocks)
    {
        for (int block = existingBlocks + 1; block <= requiredBlocks; block++)
        {
            std::shared_ptr<ItemAspectRatioBlock> newItemAspectRatioBlock =
                std::make_shared<ItemAspectRatioBlock>();

            m_itemAspectRatioBlocks.insert(newItemAspectRatioBlock);
        }
    }
    else
    {
        for (int block = requiredBlocks; block < existingBlocks; block++)
        {
            std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlockToRemove = GetEmptyOrFurthestBlock(referenceItemIndex);

            MUX_ASSERT(itemAspectRatioBlockToRemove != nullptr);

            m_itemAspectRatioBlocks.erase(itemAspectRatioBlockToRemove);
        }
    }

    MUX_ASSERT(requiredBlocks == static_cast<int>(m_itemAspectRatioBlocks.size()));
}

void SetAt | ( | int | itemIndex,
 |  | ItemAspectRatio | itemAspectRatio
 | ) |  |

Definition at line 101 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    // Look through the existing blocks to see if one already covers the provided index.
    for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
    {
        if (itemAspectRatioBlock->IncludesItemIndex(itemIndex))
        {
            // Found a match for the provided index. Use that existing block to store the ItemAspectRatio.
            itemAspectRatioBlock->SetAt(itemIndex, itemAspectRatio);
            return;
        }
    }

    // Get a block to store the ItemAspectRatio. GetEmptyOrFurthestBlock either returns a still empty block or the furthest away block from itemIndex.
    std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlockToReuse = GetEmptyOrFurthestBlock(itemIndex);

    MUX_ASSERT(itemAspectRatioBlockToReuse != nullptr);

    if (itemAspectRatioBlockToReuse->StartIndex() != -1)
    {
        // Clear the furthest block from itemIndex.
        itemAspectRatioBlockToReuse->Clear();
    }

    // Use it to store the provided ItemAspectRatio.
    // Blocks are such that m_startIndex has to be a multiple of c_blockSize: 0, 64, 128, etc... to avoid having two blocks covering the same item index.
    itemAspectRatioBlockToReuse->StartIndex((itemIndex / ItemAspectRatioBlock::BlockSize()) * ItemAspectRatioBlock::BlockSize());
    itemAspectRatioBlockToReuse->SetAt(itemIndex, itemAspectRatio);
}

The documentation for this class was generated from the following files:
  • Repeater/LinedFlowLayoutItemAspectRatios.h
  • Repeater/LinedFlowLayoutItemAspectRatios.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutItemAspectRatios::ItemAspectRatio Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LinedFlowLayoutItemAspectRatios
  • LinedFlowLayoutItemAspectRatios::ItemAspectRatio

LinedFlowLayoutItemAspectRatios::ItemAspectRatio Struct Reference

#include "LinedFlowLayoutItemAspectRatios.h"

Detailed Description

Definition at line 31 of file LinedFlowLayoutItemAspectRatios.h.

The documentation for this struct was generated from the following file:
  • Repeater/LinedFlowLayoutItemAspectRatios.h
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • LinedFlowLayoutItemAspectRatios
  • LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
Public Member Functions | Static Public Member Functions | Private Attributes

LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock Class Reference

List of all members.

Public Member Functions

ItemAspectRatioBlock ()
void | Clear ()
int | EndIndex () const
ItemAspectRatio | GetAt (int itemIndex) const
ItemAspectRatio | GetTotals (int firstItemIndex, int lastItemIndex, int weight) const
bool | HasLowerWeight (int firstItemIndex, int lastItemIndex, int weight) const
bool | IncludesItemIndex (int itemIndex) const
void | SetAt (int itemIndex, ItemAspectRatio itemAspectRatio)
int | StartIndex () const
void | StartIndex (int startIndex)

Static Public Member Functions

static int | BlockSize ()

Private Attributes

ItemAspectRatio | m_aspectRatios [c_blockSize]

Detailed Description

Definition at line 72 of file LinedFlowLayoutItemAspectRatios.h.

Constructor & Destructor Documentation

ItemAspectRatioBlock ( ) [inline]

Definition at line 75 of file LinedFlowLayoutItemAspectRatios.h.

{};

Member Function Documentation

static int BlockSize ( ) [inline, static]

Definition at line 110 of file LinedFlowLayoutItemAspectRatios.h.

        {
            return c_blockSize;
        }

void Clear ( )

Definition at line 320 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    m_startIndex = -1;

    for (int itemAspectRatioIndex = 0; itemAspectRatioIndex < c_blockSize; itemAspectRatioIndex++)
    {
        m_aspectRatios[itemAspectRatioIndex].m_aspectRatio = 0.0f;
        m_aspectRatios[itemAspectRatioIndex].m_weight = 0;
    }
}

int EndIndex ( ) const [inline]

Definition at line 105 of file LinedFlowLayoutItemAspectRatios.h.

        {
            return m_startIndex == -1 ? -1 : m_startIndex + c_blockSize - 1;
        }

LinedFlowLayoutItemAspectRatios::ItemAspectRatio GetAt ( int itemIndex ) const

Definition at line 298 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    MUX_ASSERT(m_startIndex >= 0);
    MUX_ASSERT(itemIndex >= m_startIndex);
    MUX_ASSERT(itemIndex <= m_startIndex + c_blockSize - 1);

    return m_aspectRatios[itemIndex - m_startIndex];
}

LinedFlowLayoutItemAspectRatios::ItemAspectRatio GetTotals | ( | int | firstItemIndex,
 |  | int | lastItemIndex,
 |  | int | weight |
 | ) |  |  | const

Definition at line 257 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    if (m_startIndex == -1)
    {
        return LinedFlowLayoutItemAspectRatios::s_emptyItemAspectRatio;
    }

    float totalAspectRatios{ 0.0f };
    int totalWeights{ 0 };

    for (int itemAspectRatioIndex = 0; itemAspectRatioIndex < c_blockSize; itemAspectRatioIndex++)
    {
        const int currentWeight = m_aspectRatios[itemAspectRatioIndex].m_weight;
        const int currentIndex = m_startIndex + itemAspectRatioIndex;

        if (currentWeight == weight || (currentIndex >= firstItemIndex && currentIndex <= lastItemIndex))
        {
            LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex included", currentIndex);
            LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"weight included", currentWeight);
            LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"aspect ratio included", m_aspectRatios[itemAspectRatioIndex].m_aspectRatio);

            totalAspectRatios += m_aspectRatios[itemAspectRatioIndex].m_aspectRatio * currentWeight;
            totalWeights += currentWeight;
        }
#ifdef DBG
        else if (currentWeight != 0)
        {
            LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex excluded", currentIndex);
            LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"weight excluded", currentWeight);
            LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"aspect ratio excluded", m_aspectRatios[itemAspectRatioIndex].m_aspectRatio);
        }
#endif
    }

    return { totalAspectRatios, totalWeights };
}

bool HasLowerWeight | ( | int | firstItemIndex,
 |  | int | lastItemIndex,
 |  | int | weight |
 | ) |  |  | const

Definition at line 224 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    if (m_startIndex == -1)
    {
        return false;
    }

    for (int itemAspectRatioIndex = 0; itemAspectRatioIndex < c_blockSize; itemAspectRatioIndex++)
    {
        const int currentWeight = m_aspectRatios[itemAspectRatioIndex].m_weight;
        const int currentIndex = m_startIndex + itemAspectRatioIndex;

        if (currentWeight > 0 && currentWeight < weight &&
            currentIndex >= firstItemIndex && currentIndex <= lastItemIndex)
        {
            return true;
        }
    }

    return false;
}

bool IncludesItemIndex ( int itemIndex ) const

Definition at line 249 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    return StartIndex() <= itemIndex && EndIndex() >= itemIndex;
}

void SetAt | ( | int | itemIndex,
 |  | ItemAspectRatio | itemAspectRatio
 | ) |  |

Definition at line 309 of file LinedFlowLayoutItemAspectRatios.cpp.

{
    MUX_ASSERT(m_startIndex >= 0);
    MUX_ASSERT(itemIndex >= m_startIndex);
    MUX_ASSERT(itemIndex <= m_startIndex + c_blockSize - 1);

    m_aspectRatios[itemIndex - m_startIndex].m_aspectRatio = itemAspectRatio.m_aspectRatio;
    m_aspectRatios[itemIndex - m_startIndex].m_weight = itemAspectRatio.m_weight;
}

int StartIndex ( ) const [inline]

Definition at line 94 of file LinedFlowLayoutItemAspectRatios.h.

        {
            return m_startIndex;
        }

void StartIndex ( int startIndex ) [inline]

Definition at line 99 of file LinedFlowLayoutItemAspectRatios.h.

        {
            m_startIndex = startIndex;
        }

Member Data Documentation

ItemAspectRatio m_aspectRatios[c_blockSize] [private]

Definition at line 122 of file LinedFlowLayoutItemAspectRatios.h.

The documentation for this class was generated from the following files:
  • Repeater/LinedFlowLayoutItemAspectRatios.h
  • Repeater/LinedFlowLayoutItemAspectRatios.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutItemCollectionTransitionProvider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Private Member Functions | Static Private Member Functions | Private Attributes

LinedFlowLayoutItemCollectionTransitionProvider Class Reference

#include "LinedFlowLayoutItemCollectionTransitionProvider.h"

List of all members.

Private Member Functions

winrt::CubicBezierEasingFunction | GetEaseInFunction (winrt::Compositor const &compositor)
winrt::CubicBezierEasingFunction | GetEaseOutFunction (winrt::Compositor const &compositor)
void | ScaleIn (winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, std::chrono::milliseconds const &delay, bool presetInitialValue=false)
void | ScaleOut (winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, std::chrono::milliseconds const &delay, bool presetInitialValue=false)
void | SlideIn (winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, std::chrono::milliseconds const &delay)
void | StartAddTransitions (std::vector< winrt::ItemCollectionTransition > const &transitions, bool hasRemoveTransitions, bool hasMoveTransitions)
void | StartAnimationGroup (winrt::Visual const &visual, winrt::CompositionAnimationGroup const &animationGroup)
void | StartMoveTransitions (std::vector< winrt::ItemCollectionTransition > const &transitions, bool hasRemoveTransitions)
void | StartRemoveTransitions (std::vector< winrt::ItemCollectionTransition > const &transitions, bool hasAddAnimations)
void | Translate (winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, winrt::Rect const &from, winrt::Rect const &to, std::chrono::milliseconds const &delay, bool presetInitialValue=false)

Static Private Member Functions

static winrt::float3 | GetCenterPoint (winrt::UIElement const &element)

Private Attributes

const std::chrono::milliseconds | DefaultAnimationDuration = DebugSlowDownFactor * 250ms
const float | Epsilon = 0.001f
const std::chrono::milliseconds | QuickAnimationDuration = DebugSlowDownFactor * 167ms
const float | SlideInDistance = 100.0f

Detailed Description

Definition at line 20 of file LinedFlowLayoutItemCollectionTransitionProvider.h.

Member Function Documentation

winrt::float3 GetCenterPoint ( winrt::UIElement const & element ) [static, private]

Definition at line 358 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    return winrt::float3(element.ActualSize().x / 2, element.ActualSize().y / 2, 0.0f);
}

winrt::CubicBezierEasingFunction GetEaseInFunction ( winrt::Compositor const & compositor ) [private]

Definition at line 363 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    if (m_easeInFunction == nullptr)
    {
        m_easeInFunction = compositor.CreateCubicBezierEasingFunction(winrt::float2(0.55f, 0), winrt::float2(0, 1));
    }

    return m_easeInFunction;
}

winrt::CubicBezierEasingFunction GetEaseOutFunction ( winrt::Compositor const & compositor ) [private]

Definition at line 373 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    if (m_easeOutFunction == nullptr)
    {
        m_easeOutFunction = compositor.CreateCubicBezierEasingFunction(winrt::float2(1, 0), winrt::float2(1, 1));
    }

    return m_easeOutFunction;
}

void ScaleIn | ( | winrt::CompositionAnimationGroup const & | group,
 |  | winrt::Compositor const & | compositor,
 |  | std::chrono::milliseconds const & | delay,
 |  | bool | presetInitialValue = false |
 | ) |  |  | [private]

Definition at line 291 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    auto animation = compositor.CreateVector3KeyFrameAnimation();
    animation.InsertKeyFrame(0.0f, ScaleCollapsed);
    animation.InsertKeyFrame(1.0f, ScaleVisible, GetEaseInFunction(compositor));
    animation.Duration(QuickAnimationDuration);
    animation.Target(L"Scale");

    if (delay > 0ms)
    {
        animation.DelayTime(delay);
        animation.DelayBehavior(presetInitialValue ?
            winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay :
            winrt::AnimationDelayBehavior::SetInitialValueAfterDelay);
    }

    group.Add(animation);
}

void ScaleOut | ( | winrt::CompositionAnimationGroup const & | group,
 |  | winrt::Compositor const & | compositor,
 |  | std::chrono::milliseconds const & | delay,
 |  | bool | presetInitialValue = false |
 | ) |  |  | [private]

Definition at line 314 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    auto animation = compositor.CreateVector3KeyFrameAnimation();
    animation.InsertKeyFrame(0.0f, ScaleVisible);
    animation.InsertKeyFrame(1.0f, ScaleCollapsed, GetEaseOutFunction(compositor));
    animation.Duration(QuickAnimationDuration);
    animation.Target(L"Scale");

    if (delay > 0ms)
    {
        animation.DelayTime(delay);
        animation.DelayBehavior(presetInitialValue ?
            winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay :
            winrt::AnimationDelayBehavior::SetInitialValueAfterDelay);
    }

    group.Add(animation);
}

void SlideIn | ( | winrt::CompositionAnimationGroup const & | group,
 |  | winrt::Compositor const & | compositor,
 |  | std::chrono::milliseconds const & | delay |
 | ) |  |  | [private]

Definition at line 255 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    auto opacityAnimation = compositor.CreateScalarKeyFrameAnimation();
    opacityAnimation.InsertKeyFrame(0.0f, 0.0f);
    opacityAnimation.InsertKeyFrame(1.0f, 1.0f);
    opacityAnimation.Duration(DefaultAnimationDuration);
    opacityAnimation.Target(L"Opacity");

    if (delay > 0ms)
    {
        opacityAnimation.DelayTime(delay);
        opacityAnimation.DelayBehavior(winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay);
    }

    auto translationAnimation = compositor.CreateVector2KeyFrameAnimation();
    translationAnimation.SetVector2Parameter(L"start", winrt::float2(0, SlideInDistance));
    translationAnimation.SetVector2Parameter(L"end", winrt::float2());
    translationAnimation.InsertExpressionKeyFrame(0.0f, L"start");
    translationAnimation.InsertExpressionKeyFrame(1.0f, L"end", GetEaseInFunction(compositor));
    translationAnimation.Duration(DefaultAnimationDuration);
    translationAnimation.Target(L"TransformMatrix._41_42");

    if (delay > 0ms)
    {
        translationAnimation.DelayTime(delay);
        translationAnimation.DelayBehavior(winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay);
    }

    group.Add(opacityAnimation);
    group.Add(translationAnimation);
}

void StartAddTransitions | ( | std::vector< winrt::ItemCollectionTransition > const & | transitions,
 |  | bool | hasRemoveTransitions,
 |  | bool | hasMoveTransitions |
 | ) |  |  | [private]

Definition at line 47 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    for (auto const& transition : transitions)
    {
        auto progress = transition.Start();
        auto visual = winrt::ElementCompositionPreview::GetElementVisual(progress.Element());
        auto compositor = visual.Compositor();
        auto animationGroup = compositor.CreateAnimationGroup();

        // There are two options for what a add animation can mean.
        // It can either mean that we're adding all elements for the first time,
        // or it can mean that we're newly adding a new element being added to the collection.
        // We'll interpret a add animation outside of the context of being added to a collection
        // as the former option, and an animation within the context of an add as the latter option.
        if (!WI_IsFlagSet(transition.Triggers(), winrt::ItemCollectionTransitionTriggers::CollectionChangeAdd))
        {
            visual.Scale(ScaleVisible);

            SlideIn(animationGroup, compositor, 0ms);
        }
        else
        {
            // Animations proceed in the order of delete, then move, then add.
            // Since all animations are begun at the same time, we need to delay Add
            // animations until the former two animations will have completed.
            auto delay = 0ms;

            if (hasMoveTransitions)
            {
                delay += DefaultAnimationDuration * 2;
            }

            if (hasRemoveTransitions)
            {
                delay += QuickAnimationDuration;
            }

            visual.CenterPoint(GetCenterPoint(progress.Element()));
            visual.Opacity(1.0f);
            visual.TransformMatrix(winrt::float4x4::identity());

            ScaleIn(animationGroup, compositor, delay, true /* presetInitialValue */);
        }

        auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
        StartAnimationGroup(visual, animationGroup);
        batch.End();
        batch.Completed([strongThis = get_strong(), visual, progress](auto const&, auto const&)
            {
                if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
                {
                    strongThis->m_currentAnimationGroupByVisual.Remove(visual);
                }

                progress.Complete();
            });
    }
}

void StartAnimationGroup | ( | winrt::Visual const & | visual,
 |  | winrt::CompositionAnimationGroup const & | animationGroup |
 | ) |  |  | [private]

Definition at line 385 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    if (m_currentAnimationGroupByVisual.HasKey(visual))
    {
        visual.StopAnimationGroup(m_currentAnimationGroupByVisual.Lookup(visual));
        m_currentAnimationGroupByVisual.Remove(visual);
    }

    m_currentAnimationGroupByVisual.Insert(visual, animationGroup);
    visual.StartAnimationGroup(animationGroup);
}

void StartMoveTransitions | ( | std::vector< winrt::ItemCollectionTransition > const & | transitions,
 |  | bool | hasRemoveTransitions |
 | ) |  |  | [private]

Definition at line 150 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    for (auto const& transition : transitions)
    {
        // Moved can occur in the context of initial add animations with a trigger of LayoutTransition
        // as elements shift to their initial positions, and in that case we don't want to animate the transition.
        if (WI_IsFlagSet(transition.Triggers(), winrt::ItemCollectionTransitionTriggers::LayoutTransition))
        {
            continue;
        }

        auto progress = transition.Start();
        auto oldBounds = transition.OldBounds();
        auto newBounds = transition.NewBounds();

        auto visual = winrt::ElementCompositionPreview::GetElementVisual(progress.Element());
        auto compositor = visual.Compositor();
        auto animationGroup = compositor.CreateAnimationGroup();
        std::function finishedAction = [progress]()
        {
            progress.Complete();
        };

        auto waitBeforeAnimations = hasRemoveTransitions ? QuickAnimationDuration : 0ms;

        // If we're still in the same line, then we'll translate from the old position to the new position.
        // Otherwise, we'll scale out and then scale in for the transition.
        if (std::abs(oldBounds.Y - newBounds.Y) < Epsilon)
        {
            visual.Opacity(1.0f);
            visual.Scale(ScaleVisible);
            Translate(animationGroup, compositor, oldBounds, newBounds, waitBeforeAnimations + QuickAnimationDuration / 2, true /* presetInitialValue */);
        }
        else
        {
            // The animation when changing lines is more complicated.  We want to scale out the visual from
            // its original position, and then scale it back in in its new position.  However, under the covers,
            // the visual has already snapped to its new position, so we need to set its position back to the
            // original position, use its center point in that location as the scaling center point,
            // then set its position to the new position and use its new center point at that location as the
            // scaling center point when scaling it back in.
            winrt::float3 scaleInCenterPoint{ GetCenterPoint(progress.Element()) };
            winrt::float3 scaleOutCenterPoint(
                scaleInCenterPoint.x + (float)(oldBounds.X - newBounds.X),
                scaleInCenterPoint.y + (float)(oldBounds.Y - newBounds.Y),
                scaleInCenterPoint.z);

            winrt::float3 startBounds(
                (float)(oldBounds.X - newBounds.X),
                (float)(oldBounds.Y - newBounds.Y),
                0.0f);

            auto originalTransformMatrix = visual.TransformMatrix();

            visual.CenterPoint(scaleOutCenterPoint);
            visual.Opacity(1.0f);
            visual.TransformMatrix(originalTransformMatrix * winrt::make_float4x4_translation(startBounds));

            ScaleOut(animationGroup, compositor, waitBeforeAnimations + QuickAnimationDuration / 2, true /* presetInitialValue */);

            // We'll wait until the scale-out animation has completed before we begin the scale-in animation;
            // otherwise, the center point can sometimes be very briefly set to the wrong value and cause a stutter effect.
            finishedAction = [this, visual, compositor, scaleInCenterPoint, animationGroup, progress, originalTransformMatrix]()
            {
                visual.CenterPoint(scaleInCenterPoint);
                visual.TransformMatrix(originalTransformMatrix);

                ScaleIn(animationGroup, compositor, 0ms);

                auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
                StartAnimationGroup(visual, animationGroup);
                batch.End();
                batch.Completed([strongThis = get_strong(), visual, progress](auto const&, auto const&)
                    {
                        if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
                        {
                            strongThis->m_currentAnimationGroupByVisual.Remove(visual);
                        }

                        progress.Complete();
                    });
            };
        }

        auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
        StartAnimationGroup(visual, animationGroup);
        batch.End();
        batch.Completed([strongThis = get_strong(), visual, finishedAction](auto const&, auto const&)
            {
                if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
                {
                    strongThis->m_currentAnimationGroupByVisual.Remove(visual);
                }

                finishedAction();
            });
    }
}

void StartRemoveTransitions | ( | std::vector< winrt::ItemCollectionTransition > const & | transitions,
 |  | bool | hasAddAnimations |
 | ) |  |  | [private]

Definition at line 109 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    for (auto const& transition : transitions)
    {
        // If the collection has been reset and we're going to play add animations, then we don't want to play delete animations -
        // we'll just immediately delete the elements and then animate them in during the add animations.
        if (WI_IsFlagSet(transition.Triggers(), winrt::ItemCollectionTransitionTriggers::CollectionChangeReset) &&
            hasAddAnimations)
        {
            continue;
        }

        auto progress = transition.Start();
        auto visual = winrt::ElementCompositionPreview::GetElementVisual(progress.Element());
        auto compositor = visual.Compositor();
        auto animationGroup = compositor.CreateAnimationGroup();

        visual.CenterPoint(GetCenterPoint(progress.Element()));
        visual.Opacity(1.0f);
        visual.TransformMatrix(winrt::float4x4::identity());

        ScaleOut(animationGroup, compositor, 0ms);

        auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
        StartAnimationGroup(visual, animationGroup);
        batch.End();

        batch.Completed([strongThis = get_strong(), visual, progress](auto const&, auto const&)
            {
                if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
                {
                    strongThis->m_currentAnimationGroupByVisual.Remove(visual);
                }

                progress.Complete();
            });
    }
}

void Translate | ( | winrt::CompositionAnimationGroup const & | group,
 |  | winrt::Compositor const & | compositor,
 |  | winrt::Rect const & | from,
 |  | winrt::Rect const & | to,
 |  | std::chrono::milliseconds const & | delay,
 |  | bool | presetInitialValue = false |
 | ) |  |  | [private]

Definition at line 335 of file LinedFlowLayoutItemCollectionTransitionProvider.cpp.

{
    auto positionAnimation = compositor.CreateVector2KeyFrameAnimation();
    positionAnimation.SetVector2Parameter(L"start", winrt::float2((float)(from.X - to.X), (float)(from.Y - to.Y)));
    positionAnimation.SetVector2Parameter(L"end", winrt::float2());
    positionAnimation.InsertExpressionKeyFrame(0.0f, L"start");
    positionAnimation.InsertExpressionKeyFrame(1.0f, L"end", GetEaseInFunction(compositor));
    positionAnimation.Duration(DefaultAnimationDuration);
    positionAnimation.Target(L"TransformMatrix._41_42");

    if (delay > 0ms)
    {
        positionAnimation.DelayTime(delay);
        positionAnimation.DelayBehavior(presetInitialValue ?
            winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay :
            winrt::AnimationDelayBehavior::SetInitialValueAfterDelay);
    }

    group.Add(positionAnimation);
}

Member Data Documentation

const std::chrono::milliseconds DefaultAnimationDuration = DebugSlowDownFactor * 250ms [private]

Definition at line 52 of file LinedFlowLayoutItemCollectionTransitionProvider.h.

const float Epsilon = 0.001f [private]

Definition at line 49 of file LinedFlowLayoutItemCollectionTransitionProvider.h.

const std::chrono::milliseconds QuickAnimationDuration = DebugSlowDownFactor * 167ms [private]

Definition at line 51 of file LinedFlowLayoutItemCollectionTransitionProvider.h.

const float SlideInDistance = 100.0f [private]

Definition at line 54 of file LinedFlowLayoutItemCollectionTransitionProvider.h.

The documentation for this class was generated from the following files:
  • Repeater/LinedFlowLayoutItemCollectionTransitionProvider.h
  • Repeater/LinedFlowLayoutItemCollectionTransitionProvider.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutItemsInfoRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

LinedFlowLayoutItemsInfoRequestedEventArgs Class Reference

#include "LinedFlowLayoutItemsInfoRequestedEventArgs.h"

Inherits ReferenceTracker< LinedFlowLayoutItemsInfoRequestedEventArgs, winrt::implementation::LinedFlowLayoutItemsInfoRequestedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

LinedFlowLayoutItemsInfoRequestedEventArgs (winrt::LinedFlowLayout const &linedFlowLayout, int itemsRangeStartIndex, int itemsRangeRequestedLength)
~LinedFlowLayoutItemsInfoRequestedEventArgs ()
int | ItemsRangeLength ()
int32_t | ItemsRangeRequestedLength ()
int32_t | ItemsRangeStartIndex ()
void | ItemsRangeStartIndex (int32_t value)
void | MaxWidth (double value)
double | MaxWidth ()
void | MinWidth (double value)
double | MinWidth ()
void | ResetLinedFlowLayout ()
void | SetDesiredAspectRatios (winrt::array_view< double const > const &values)
void | SetMaxWidths (winrt::array_view< double const > const &values)
void | SetMinWidths (winrt::array_view< double const > const &values)

Private Member Functions

void | SetItemsRangeEstablishedLength (int value)

Detailed Description

Definition at line 8 of file LinedFlowLayoutItemsInfoRequestedEventArgs.h.

Constructor & Destructor Documentation

LinedFlowLayoutItemsInfoRequestedEventArgs | ( | winrt::LinedFlowLayout const & | linedFlowLayout,
 |  | int | itemsRangeStartIndex,
 |  | int | itemsRangeRequestedLength
 | ) |  |

Definition at line 10 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

                                   :
    m_itemsRangeStartIndex(itemsRangeStartIndex),
    m_itemsRangeRequestedStartIndex(itemsRangeStartIndex),
    m_itemsRangeRequestedLength(itemsRangeRequestedLength)
{
    MUX_ASSERT(itemsRangeStartIndex >= 0);
    MUX_ASSERT(itemsRangeRequestedLength > 0);

    LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, itemsRangeStartIndex, itemsRangeRequestedLength);

    m_linedFlowLayout.set(linedFlowLayout);
}

~LinedFlowLayoutItemsInfoRequestedEventArgs ( )

Definition at line 26 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

int ItemsRangeLength ( ) [inline]

Definition at line 32 of file LinedFlowLayoutItemsInfoRequestedEventArgs.h.

{ return m_itemsRangeLength; }

int32_t ItemsRangeRequestedLength ( ) [inline]

Definition at line 21 of file LinedFlowLayoutItemsInfoRequestedEventArgs.h.

{ return m_itemsRangeRequestedLength; }

int32_t ItemsRangeStartIndex ( ) [inline]

Definition at line 20 of file LinedFlowLayoutItemsInfoRequestedEventArgs.h.

{ return m_itemsRangeStartIndex; }

void ItemsRangeStartIndex ( int32_t value )

Definition at line 33 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, value);

    if (value < 0)
    {
        throw winrt::hresult_invalid_argument(L"'ItemsRangeStartIndex' must be positive.");
    }

    if (value > m_itemsRangeStartIndex)
    {
        throw winrt::hresult_invalid_argument(L"'ItemsRangeStartIndex' cannot be increased.");
    }

    if (m_itemsRangeEstablishedLength != 0 && value + m_itemsRangeEstablishedLength < m_itemsRangeRequestedStartIndex + m_itemsRangeRequestedLength)
    {
        throw winrt::hresult_invalid_argument(L"Value is too small given the array length already provided.");
    }

    m_itemsRangeStartIndex = value;
}

double MaxWidth ( ) [inline]

Definition at line 23 of file LinedFlowLayoutItemsInfoRequestedEventArgs.h.

{ return m_maxWidth; }

void MaxWidth ( double value )

Definition at line 67 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    if (value < 0.0)
    {
        m_maxWidth = -1.0;
    }
    else
    {
        m_maxWidth = value;
    }
}

void MinWidth ( double value )

Definition at line 55 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    if (value < 0.0)
    {
        m_minWidth = -1.0;
    }
    else
    {
        m_minWidth = value;
    }
}

double MinWidth ( ) [inline]

Definition at line 22 of file LinedFlowLayoutItemsInfoRequestedEventArgs.h.

{ return m_minWidth; }

void ResetLinedFlowLayout ( ) [inline]

Definition at line 33 of file LinedFlowLayoutItemsInfoRequestedEventArgs.h.

{ m_linedFlowLayout.set(nullptr); };

void SetDesiredAspectRatios ( winrt::array_view< double const > const & values )

Definition at line 79 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    if (auto linedFlowLayout = winrt::get_self<LinedFlowLayout>(m_linedFlowLayout.get()))
    {
        SetItemsRangeEstablishedLength(values.size());

        m_itemsRangeLength = m_itemsRangeEstablishedLength;

        linedFlowLayout->SetDesiredAspectRatios(values);
    }
}

void SetItemsRangeEstablishedLength ( int value ) [private]

Definition at line 111 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    if (value != m_itemsRangeEstablishedLength)
    {
        if (value < m_itemsRangeRequestedLength && m_itemsRangeStartIndex == m_itemsRangeRequestedStartIndex)
        {
            throw winrt::hresult_invalid_argument(L"The provided array length must be greater than or equal to 'ItemsRangeRequestedLength'.");
        }

        if (m_itemsRangeStartIndex + value < m_itemsRangeRequestedStartIndex + m_itemsRangeRequestedLength && m_itemsRangeStartIndex < m_itemsRangeRequestedStartIndex)
        {
            throw winrt::hresult_invalid_argument(L"The provided array length is too small given the decreased 'ItemsRangeStartIndex' and the 'ItemsRangeRequestedLength' values.");
        }

        if (m_itemsRangeEstablishedLength > 0)
        {
            throw winrt::hresult_invalid_argument(L"All provided arrays must have the same length.");
        }

        m_itemsRangeEstablishedLength = value;
    }
}

void SetMaxWidths ( winrt::array_view< double const > const & values )

Definition at line 101 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    if (auto linedFlowLayout = winrt::get_self<LinedFlowLayout>(m_linedFlowLayout.get()))
    {
        SetItemsRangeEstablishedLength(values.size());

        linedFlowLayout->SetMaxWidths(values);
    }
}

void SetMinWidths ( winrt::array_view< double const > const & values )

Definition at line 91 of file LinedFlowLayoutItemsInfoRequestedEventArgs.cpp.

{
    if (auto linedFlowLayout = winrt::get_self<LinedFlowLayout>(m_linedFlowLayout.get()))
    {
        SetItemsRangeEstablishedLength(values.size());

        linedFlowLayout->SetMinWidths(values);
    }
}

The documentation for this class was generated from the following files:
  • Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.h
  • Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

LinedFlowLayoutProperties Class Reference

#include "LinedFlowLayout.properties.h"

Inherited by LinedFlowLayout.

List of all members.

Public Member Functions

LinedFlowLayoutProperties ()
void | ActualLineHeight (double value)
double | ActualLineHeight ()
winrt::event_token | ItemsInfoRequested (winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs > const &value)
void | ItemsInfoRequested (winrt::event_token const &token)
void | ItemsJustification (winrt::LinedFlowLayoutItemsJustification const &value)
winrt::LinedFlowLayoutItemsJustification | ItemsJustification ()
void | ItemsStretch (winrt::LinedFlowLayoutItemsStretch const &value)
winrt::LinedFlowLayoutItemsStretch | ItemsStretch ()
void | ItemsUnlocked (winrt::event_token const &token)
winrt::event_token | ItemsUnlocked (winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::IInspectable > const &value)
double | LineHeight ()
void | LineHeight (double value)
void | LineSpacing (double value)
double | LineSpacing ()
double | MinItemSpacing ()
void | MinItemSpacing (double value)

Static Public Member Functions

static winrt::DependencyProperty | ActualLineHeightProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ItemsJustificationProperty ()
static winrt::DependencyProperty | ItemsStretchProperty ()
static winrt::DependencyProperty | LineHeightProperty ()
static winrt::DependencyProperty | LineSpacingProperty ()
static winrt::DependencyProperty | MinItemSpacingProperty ()
static void | OnActualLineHeightPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsJustificationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsStretchPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLineHeightPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLineSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinItemSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::LinedFlowLayout,
winrt::LinedFlowLayoutItemsInfoRequestedEventArgs > > 		m_itemsInfoRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::LinedFlowLayout,
winrt::IInspectable > > 		m_itemsUnlockedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ActualLineHeightProperty
static GlobalDependencyProperty | s_ItemsJustificationProperty
static GlobalDependencyProperty | s_ItemsStretchProperty
static GlobalDependencyProperty | s_LineHeightProperty
static GlobalDependencyProperty | s_LineSpacingProperty
static GlobalDependencyProperty | s_MinItemSpacingProperty

Detailed Description

Definition at line 7 of file LinedFlowLayout.properties.h.

Constructor & Destructor Documentation

LinedFlowLayoutProperties ( )

Definition at line 23 of file LinedFlowLayout.properties.cpp.

    : m_itemsInfoRequestedEventSource{static_cast<LinedFlowLayout*>(this)}

Member Function Documentation

void ActualLineHeight ( double value )
double ActualLineHeight ( )
static winrt::DependencyProperty ActualLineHeightProperty ( ) [inline, static]

Definition at line 30 of file LinedFlowLayout.properties.h.

{ return s_ActualLineHeightProperty; }

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::event_token ItemsInfoRequested ( winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs > const & value )
void ItemsInfoRequested ( winrt::event_token const & token )
winrt::LinedFlowLayoutItemsJustification ItemsJustification ( )
void ItemsJustification ( winrt::LinedFlowLayoutItemsJustification const & value )
static winrt::DependencyProperty ItemsJustificationProperty ( ) [inline, static]

Definition at line 31 of file LinedFlowLayout.properties.h.

{ return s_ItemsJustificationProperty; }

void ItemsStretch ( winrt::LinedFlowLayoutItemsStretch const & value )
winrt::LinedFlowLayoutItemsStretch ItemsStretch ( )
static winrt::DependencyProperty ItemsStretchProperty ( ) [inline, static]

Definition at line 32 of file LinedFlowLayout.properties.h.

{ return s_ItemsStretchProperty; }

winrt::event_token ItemsUnlocked ( winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::IInspectable > const & value )
void ItemsUnlocked ( winrt::event_token const & token )
double LineHeight ( )
void LineHeight ( double value )
static winrt::DependencyProperty LineHeightProperty ( ) [inline, static]

Definition at line 33 of file LinedFlowLayout.properties.h.

{ return s_LineHeightProperty; }

void LineSpacing ( double value )
double LineSpacing ( )
static winrt::DependencyProperty LineSpacingProperty ( ) [inline, static]

Definition at line 34 of file LinedFlowLayout.properties.h.

{ return s_LineSpacingProperty; }

void MinItemSpacing ( double value )
double MinItemSpacing ( )
static winrt::DependencyProperty MinItemSpacingProperty ( ) [inline, static]

Definition at line 35 of file LinedFlowLayout.properties.h.

{ return s_MinItemSpacingProperty; }

static void OnActualLineHeightPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemsJustificationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemsStretchPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLineHeightPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLineSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinItemSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs> > m_itemsInfoRequestedEventSource

Definition at line 49 of file LinedFlowLayout.properties.h.

event_source<winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::IInspectable> > m_itemsUnlockedEventSource

Definition at line 50 of file LinedFlowLayout.properties.h.

GlobalDependencyProperty s_ActualLineHeightProperty [static]

Definition at line 37 of file LinedFlowLayout.properties.h.

GlobalDependencyProperty s_ItemsJustificationProperty [static]

Definition at line 38 of file LinedFlowLayout.properties.h.

GlobalDependencyProperty s_ItemsStretchProperty [static]

Definition at line 39 of file LinedFlowLayout.properties.h.

GlobalDependencyProperty s_LineHeightProperty [static]

Definition at line 40 of file LinedFlowLayout.properties.h.

GlobalDependencyProperty s_LineSpacingProperty [static]

Definition at line 41 of file LinedFlowLayout.properties.h.

GlobalDependencyProperty s_MinItemSpacingProperty [static]

Definition at line 42 of file LinedFlowLayout.properties.h.

The documentation for this class was generated from the following files:
  • Generated/LinedFlowLayout.properties.h
  • Generated/LinedFlowLayout.properties.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

LinedFlowLayoutTrace Class Reference

#include "LinedFlowLayoutTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file LinedFlowLayoutTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file LinedFlowLayoutTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "LinedFlowLayoutInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_LINEDFLOWLAYOUT),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"LinedFlowLayout") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 153 of file LinedFlowLayoutTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "LinedFlowLayoutPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_LINEDFLOWLAYOUT),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file LinedFlowLayoutTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[1024]{};
        const HRESULT hr = StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args);
        if (SUCCEEDED(hr) || hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "LinedFlowLayoutVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_LINEDFLOWLAYOUT),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"LinedFlowLayout") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file LinedFlowLayoutTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file LinedFlowLayoutTrace.h.

The documentation for this class was generated from the following file:
  • Repeater/LinedFlowLayoutTrace.h
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes

MapControl Class Reference

#include "MapControl.h"

Inherits ReferenceTracker< MapControl, winrt::implementation::MapControlT >, and MapControlProperties.

List of all members.

Public Member Functions

MapControl ()
winrt::IAsyncAction | LayerElementsChanged (const winrt::MapElementsLayer &layer, winrt::IVector< winrt::MapElement > elements, const winrt::Collections::IVectorChangedEventArgs &args, winrt::hstring elementId)
void | OnApplyTemplate ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
winrt::fire_and_forget | UpdateMapIcon (winrt::Geopoint mapIconPoint, winrt::hstring pointId, winrt::hstring layerId)

Private Member Functions

winrt::IAsyncOperation
< winrt::hstring > 		AddMapIcon (winrt::Geopoint mapIconPoint, winrt::hstring layerId)
winrt::fire_and_forget | ClearLayer (winrt::hstring layerId)
winrt::IAsyncOperation
< winrt::CoreWebView2 > 		GetCoreWebView2 ()
winrt::IAsyncOperation
< winrt::hstring > 		InitializeWebMap ()
winrt::fire_and_forget | OnLayerAdded (const winrt::MapElementsLayer layer)
void | OnLayersVectorChanged (const winrt::IObservableVector< winrt::MapLayer > &, const winrt::Collections::IVectorChangedEventArgs &args)
winrt::fire_and_forget | RemoveMapIcon (winrt::hstring pointId, winrt::hstring layerId)
winrt::fire_and_forget | ResetLayerCollection ()
winrt::fire_and_forget | SetUpWebView ()
winrt::fire_and_forget | UpdateCenterInWebPage ()
winrt::fire_and_forget | UpdateControlsInWebPage ()
winrt::fire_and_forget | UpdateMapServiceTokenInWebPage ()
winrt::fire_and_forget | UpdateZoomLevelInWebPage ()
void | WebMessageReceived (winrt::WebView2 sender, winrt::CoreWebView2WebMessageReceivedEventArgs args)

Static Private Member Functions

static winrt::IAsyncOperation
< winrt::hstring > 		GetMapHtmlContent ()

Static Private Attributes

static winrt::hstring | s_mapHtmlContent

Detailed Description

Definition at line 16 of file MapControl.h.

Constructor & Destructor Documentation

MapControl ( )

Definition at line 22 of file MapControl.cpp.

{
    SetDefaultStyleKey(this);

    // Create layers vector that can hold MapElements to display information and be interacted with on the map
    auto layers = winrt::make<Vector<winrt::MapLayer>>().as<winrt::IObservableVector<winrt::MapLayer>>();
    layers.VectorChanged({ this, &MapControl::OnLayersVectorChanged });
    SetValue(s_LayersProperty, layers);
}

Member Function Documentation

winrt::IAsyncOperation< winrt::hstring > AddMapIcon | ( | winrt::Geopoint | mapIconPoint,
 |  | winrt::hstring | layerId |
 | ) |  |  | [private]

Definition at line 309 of file MapControl.cpp.

{
    winrt::hstring returnedValue{};
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();

        const auto mapIconPosition = mapIconPoint.Position();
        const auto latitude = winrt::to_hstring(mapIconPosition.Latitude);
        const auto longitude = winrt::to_hstring(mapIconPosition.Longitude);

        returnedValue = co_await core.ExecuteScriptAsync(L"addPoint(" + longitude + L", " + latitude + L"," + layerId + L");");
    }
    co_return returnedValue;
}

winrt::fire_and_forget ClearLayer ( winrt::hstring layerId ) [private]

Definition at line 233 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();
        co_await core.ExecuteScriptAsync(L"clearLayer(" + layerId + L");");
    }
}

winrt::IAsyncOperation< winrt::CoreWebView2 > GetCoreWebView2 ( ) [private]

Definition at line 54 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        co_await webView.EnsureCoreWebView2Async();
        co_return webView.CoreWebView2();
    }
    co_return nullptr;
}

winrt::IAsyncOperation< winrt::hstring > GetMapHtmlContent ( ) [static, private]

Definition at line 381 of file MapControl.cpp.

{
    if (s_mapHtmlContent.size() == 0)
    {
        s_mapHtmlContent = co_await ResourceAccessor::GetFileContents(FR_Map_Html);
    }

    co_return s_mapHtmlContent;
}

winrt::IAsyncOperation< winrt::hstring > InitializeWebMap ( ) [private]

Definition at line 76 of file MapControl.cpp.

{
    XamlTelemetry::MapControl_InitializeWebMap(true, reinterpret_cast<uint64_t>(this));

    winrt::hstring returnedValue{};
    auto center = Center();
    winrt::hstring pos = L"0,0";
    if (center != nullptr)
    {
        const auto centerPosition = center.Position();
        pos = std::format(L"{},{}", centerPosition.Longitude, centerPosition.Latitude);
    }

    auto token = winrt::Windows::Data::Json::JsonValue::CreateStringValue(MapServiceToken());
    // Initializing Azure Maps on WebView
    // params: longitude, latitude, mapServiceToken
    auto script = std::format(L"initializeMap({},{});", pos, token.Stringify().c_str());

    if (auto webView = m_webView.get())
    {
        auto core = webView.CoreWebView2();
        returnedValue = co_await core.ExecuteScriptAsync(script);

        for (uint32_t i = 0; i < Layers().Size(); i++)
        {
            winrt::MapElementsLayer layer = Layers().GetAt(i).as<winrt::MapElementsLayer>();
            OnLayerAdded(layer);
        }
    }
    UpdateControlsInWebPage();

    XamlTelemetry::MapControl_InitializeWebMap(false, reinterpret_cast<uint64_t>(this));
    co_return returnedValue;
}

winrt::IAsyncAction LayerElementsChanged | ( | const winrt::MapElementsLayer & | layer,
 |  | winrt::IVector< winrt::MapElement > | elements,
 |  | const winrt::Collections::IVectorChangedEventArgs & | args,
 |  | winrt::hstring | elementId
 | ) |  |

Definition at line 349 of file MapControl.cpp.

{
    const auto index = args.Index();
    auto layerId = winrt::get_self<MapElementsLayer>(layer)->Id;

    switch (args.CollectionChange())
    {
    case winrt::Collections::CollectionChange::ItemInserted:
    {
        auto element = elements.GetAt(index);
        winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(element.as<winrt::MapIcon>().Location(), layerId);
        break;
    }
    case winrt::Collections::CollectionChange::ItemRemoved:
        RemoveMapIcon(elementId,  layerId);
        break;
    case winrt::Collections::CollectionChange::ItemChanged:
    {
        auto element = elements.GetAt(index);
        RemoveMapIcon(elementId, layerId);
        winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(element.as<winrt::MapIcon>().Location(), layerId);
        break;
    }
    case winrt::Collections::CollectionChange::Reset:
    {
        OnLayerAdded(layer);
        break;
    }
    }
    co_return;
}

void OnApplyTemplate ( )

Definition at line 32 of file MapControl.cpp.

{
    m_webviewWebMessageReceivedRevoker.revoke();
    m_webviewNavigationCompletedRevoker.revoke();

    winrt::IControlProtected thisAsControlProtected = *this;
    if (auto webview = GetTemplateChildT<winrt::WebView2>(L"PART_WebView2", thisAsControlProtected))
    {
        m_webView.set(webview);

        m_webviewWebMessageReceivedRevoker = webview.WebMessageReceived(winrt::auto_revoke, { this, &MapControl::WebMessageReceived });
        m_webviewNavigationCompletedRevoker = webview.NavigationCompleted(winrt::auto_revoke, {
        [this](auto const&, winrt::CoreWebView2NavigationCompletedEventArgs const& args)
        {
            XamlTelemetry::MapControl_WebViewNavigationCompleted(reinterpret_cast<uint64_t>(this));
            InitializeWebMap();
        }});

        SetUpWebView();
    }
}

winrt::fire_and_forget OnLayerAdded ( const winrt::MapElementsLayer layer ) [private]

Definition at line 289 of file MapControl.cpp.

{
    auto mapLayer = winrt::get_self<MapElementsLayer>(layer);
    mapLayer->SetParentMapControl(*this);
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();
        auto layerId = winrt::get_self<MapElementsLayer>(layer)->Id;
        winrt::get_self<MapElementsLayer>(layer)->Id = co_await core.ExecuteScriptAsync(L"addSymbolLayer();");

        auto elements = layer.MapElements();
        for (uint32_t i = 0; i < elements.Size(); i++)
        {
            auto element = elements.GetAt(i);
            auto location = element.as<winrt::MapIcon>().Location();
            winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(location,  winrt::get_self<MapElementsLayer>(layer)->Id);
        }
    }
}

void OnLayersVectorChanged | ( | const winrt::IObservableVector< winrt::MapLayer > & | ,
 |  | const winrt::Collections::IVectorChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 265 of file MapControl.cpp.

{
    if (args.CollectionChange() == winrt::Collections::CollectionChange::ItemInserted)
    {
        if (winrt::MapElementsLayer elementLayer = Layers().GetAt(args.Index()).try_as<winrt::MapElementsLayer>())
        {
            OnLayerAdded(elementLayer);
        }
    }
    else if (args.CollectionChange() == winrt::Collections::CollectionChange::ItemRemoved)
    {

        if (winrt::MapElementsLayer elementLayer = Layers().GetAt(args.Index()).try_as<winrt::MapElementsLayer>())
        {
            auto layerId = winrt::get_self<MapElementsLayer>(elementLayer)->Id;
            ClearLayer(layerId);
        }
    }
    else if (args.CollectionChange() == winrt::Collections::CollectionChange::Reset)
    {
        ResetLayerCollection();
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 111 of file MapControl.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_MapServiceTokenProperty)
    {
        UpdateMapServiceTokenInWebPage();
    }
    else if (property == s_CenterProperty)
    {
        UpdateCenterInWebPage();
    }
    else if (property == s_ZoomLevelProperty)
    {
        UpdateZoomLevelInWebPage();
    }
    else if (property == s_InteractiveControlsVisibleProperty)
    {
        UpdateControlsInWebPage();
    }
}

winrt::fire_and_forget RemoveMapIcon | ( | winrt::hstring | pointId,
 |  | winrt::hstring | layerId |
 | ) |  |  | [private]

Definition at line 325 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();

        auto result = co_await core.ExecuteScriptAsync(L"removePoint(" + pointId + L"," + layerId + L");");
    }
}

winrt::fire_and_forget ResetLayerCollection ( ) [private]

Definition at line 242 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();

        for (uint32_t i = 0; i < Layers().Size(); i++)
        {
            winrt::MapElementsLayer layer = Layers().GetAt(i).as<winrt::MapElementsLayer>();
            auto layerId = winrt::get_self<MapElementsLayer>(layer)->Id;
            co_await core.ExecuteScriptAsync(L"clearLayer(" + winrt::to_hstring(layerId) + L");");

            auto elements = layer.MapElements();
            for (uint32_t j = 0; j < elements.Size(); j++)
            {
                auto element = elements.GetAt(j);
                auto location = element.as<winrt::MapIcon>().Location();
                winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(location,  layerId);
            }
        }
    }
}

winrt::fire_and_forget SetUpWebView ( ) [private]

Definition at line 64 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();

        // azure maps might not be displayed correctly with tracking prevention enabled
        core.Profile().PreferredTrackingPreventionLevel(winrt::CoreWebView2TrackingPreventionLevel::None);
        webView.NavigateToString(co_await GetMapHtmlContent());
    }
}

winrt::fire_and_forget UpdateCenterInWebPage ( ) [private]

Definition at line 157 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();

        auto newCenter = Center().Position();
        auto pos = std::format(L"{},{}", newCenter.Longitude, newCenter.Latitude);
        // Updates center of map in WebView
        // params: longitude, latitude
        co_await core.ExecuteScriptAsync(L"updateCenter(" + pos + L")");
    }
}

winrt::fire_and_forget UpdateControlsInWebPage ( ) [private]

Definition at line 180 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();
        core.ExecuteScriptAsync(L"interactiveControlsVisible(" + winrt::to_hstring(InteractiveControlsVisible()) + L")");
    }
}

winrt::fire_and_forget UpdateMapIcon | ( | winrt::Geopoint | mapIconPoint,
 |  | winrt::hstring | pointId,
 |  | winrt::hstring | layerId
 | ) |  |

Definition at line 335 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();

        const auto mapIconPosition = mapIconPoint.Position();
        const auto latitude = winrt::to_hstring(mapIconPosition.Latitude);
        const auto longitude = winrt::to_hstring(mapIconPosition.Longitude);

        co_await core.ExecuteScriptAsync(L"updatePoint(" + longitude + L", " + latitude + L"," + pointId + L"," + layerId + L");");
    }
}

winrt::fire_and_forget UpdateMapServiceTokenInWebPage ( ) [private]

Definition at line 134 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();
        // Sends new token to WebView
        // params: mapServiceToken
        auto token = winrt::Windows::Data::Json::JsonValue::CreateStringValue(MapServiceToken());
        auto script = std::format(L"updateMapServiceToken({});", token.Stringify().c_str());
        co_await core.ExecuteScriptAsync(script);

        for (uint32_t i = 0; i < Layers().Size(); i++)
        {
            winrt::MapElementsLayer layer = Layers().GetAt(i).try_as<winrt::MapElementsLayer>();
            OnLayerAdded(layer);
        }

        UpdateControlsInWebPage();
        UpdateCenterInWebPage();
        UpdateZoomLevelInWebPage();
    }
}

winrt::fire_and_forget UpdateZoomLevelInWebPage ( ) [private]

Definition at line 171 of file MapControl.cpp.

{
    if (auto webView = m_webView.get())
    {
        auto core = co_await GetCoreWebView2();
        core.ExecuteScriptAsync(L"updateZoom(" + winrt::to_hstring(ZoomLevel()) + L")");
    }
}

void WebMessageReceived | ( | winrt::WebView2 | sender,
 |  | winrt::CoreWebView2WebMessageReceivedEventArgs | args |
 | ) |  |  | [private]

Definition at line 189 of file MapControl.cpp.

{
    auto jsonAsString = args.WebMessageAsJson();
    if (!jsonAsString.empty())
    {
        winrt::Windows::Data::Json::JsonObject obj = winrt::Windows::Data::Json::JsonObject();
        if (winrt::Windows::Data::Json::JsonObject::TryParse(jsonAsString, obj))
        {
            auto type = obj.TryLookup(L"type");
            // Handles click events on MapElements
            if (type.GetString() == L"pushpinClickEvent")
            {
                auto clickedLayer = Layers().GetAt(static_cast<uint32_t>(obj.TryLookup(L"layer").GetNumber())).try_as<MapElementsLayer>();
                auto location = winrt::Geopoint{ winrt::BasicGeoposition{
                    obj.TryLookup(L"coordinate").GetObject().TryLookup(L"longitude").GetNumber(),
                    obj.TryLookup(L"coordinate").GetObject().TryLookup(L"latitude").GetNumber() }};

                auto pointId = obj.TryLookup(L"point").GetNumber();
                winrt::MapElement clickedElement{nullptr};
                auto elements = clickedLayer->MapElements();
                for (uint32_t i = 0; i < elements.Size(); i++)
                {
                    auto elem = elements.GetAt(i);
                    if (winrt::get_self<MapElement>(elem)->Id == winrt::to_hstring(pointId))
                    {
                        clickedElement = elem.try_as<winrt::MapElement>();
                    }
                }
                auto clickArgs = winrt::make_self<MapElementClickEventArgs>(location, clickedElement);
                m_mapElementClickEventSource(*this, *clickArgs);

                clickedLayer->RaiseMapElementClick(*clickArgs);
            }
            // Raises error events from WebView
            else if (type.GetString() == L"javascriptError")
            {
                auto errorArgs = winrt::make_self<MapControlMapServiceErrorOccurredEventArgs>(jsonAsString);
                XamlTelemetry::MapControl_WebMessageReceived_Error(reinterpret_cast<uint64_t>(this), jsonAsString.data());
                m_mapServiceErrorOccurredEventSource(*this, *errorArgs);
            }
        }
    }
}

Member Data Documentation

winrt::hstring s_mapHtmlContent [static, private]

Definition at line 56 of file MapControl.h.

The documentation for this class was generated from the following files:
  • MapControl/MapControl.h
  • MapControl/MapControl.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControlMapServiceErrorOccurredEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

MapControlMapServiceErrorOccurredEventArgs Class Reference

#include "MapControlMapServiceErrorOccurredEventArgs.h"

List of all members.

Public Member Functions

MapControlMapServiceErrorOccurredEventArgs (winrt::hstring diagnosticMessage)
winrt::hstring | DiagnosticMessage ()

Private Attributes

winrt::hstring | m_diagnosticMessage

Detailed Description

Definition at line 11 of file MapControlMapServiceErrorOccurredEventArgs.h.

Constructor & Destructor Documentation

MapControlMapServiceErrorOccurredEventArgs ( winrt::hstring diagnosticMessage ) [inline]

Definition at line 16 of file MapControlMapServiceErrorOccurredEventArgs.h.

                                                                               :
        m_diagnosticMessage(diagnosticMessage) {};

Member Function Documentation

winrt::hstring DiagnosticMessage ( ) [inline]

Definition at line 19 of file MapControlMapServiceErrorOccurredEventArgs.h.

{ return m_diagnosticMessage; };

Member Data Documentation

winrt::hstring m_diagnosticMessage [private]

Definition at line 19 of file MapControlMapServiceErrorOccurredEventArgs.h.

The documentation for this class was generated from the following file:
  • MapControl/MapControlMapServiceErrorOccurredEventArgs.h
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControlProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

MapControlProperties Class Reference

#include "MapControl.properties.h"

Inherited by MapControl.

List of all members.

Public Member Functions

MapControlProperties ()
void | Center (winrt::Geopoint const &value)
winrt::Geopoint | Center ()
void | InteractiveControlsVisible (bool value)
bool | InteractiveControlsVisible ()
void | Layers (winrt::IVector< winrt::MapLayer > const &value)
winrt::IVector< winrt::MapLayer > | Layers ()
void | MapElementClick (winrt::event_token const &token)
winrt::event_token | MapElementClick (winrt::TypedEventHandler< winrt::MapControl, winrt::MapElementClickEventArgs > const &value)
void | MapServiceErrorOccurred (winrt::event_token const &token)
winrt::event_token | MapServiceErrorOccurred (winrt::TypedEventHandler< winrt::MapControl, winrt::MapControlMapServiceErrorOccurredEventArgs > const &value)
winrt::hstring | MapServiceToken ()
void | MapServiceToken (winrt::hstring const &value)
void | ZoomLevel (double value)
double | ZoomLevel ()

Static Public Member Functions

static winrt::DependencyProperty | CenterProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | InteractiveControlsVisibleProperty ()
static winrt::DependencyProperty | LayersProperty ()
static winrt::DependencyProperty | MapServiceTokenProperty ()
static void | OnCenterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnInteractiveControlsVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLayersPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMapServiceTokenPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnZoomLevelPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | ZoomLevelProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::MapControl,
winrt::MapElementClickEventArgs > > 		m_mapElementClickEventSource
event_source
< winrt::TypedEventHandler
< winrt::MapControl,
winrt::MapControlMapServiceErrorOccurredEventArgs > > 		m_mapServiceErrorOccurredEventSource

Static Public Attributes

static GlobalDependencyProperty | s_CenterProperty
static GlobalDependencyProperty | s_InteractiveControlsVisibleProperty
static GlobalDependencyProperty | s_LayersProperty
static GlobalDependencyProperty | s_MapServiceTokenProperty
static GlobalDependencyProperty | s_ZoomLevelProperty

Detailed Description

Definition at line 7 of file MapControl.properties.h.

Constructor & Destructor Documentation

MapControlProperties ( )

Definition at line 22 of file MapControl.properties.cpp.

    : m_mapElementClickEventSource{static_cast<MapControl*>(this)}

Member Function Documentation

void Center ( winrt::Geopoint const & value )
winrt::Geopoint Center ( )
static winrt::DependencyProperty CenterProperty ( ) [inline, static]

Definition at line 27 of file MapControl.properties.h.

{ return s_CenterProperty; }

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
bool InteractiveControlsVisible ( )
void InteractiveControlsVisible ( bool value )
static winrt::DependencyProperty InteractiveControlsVisibleProperty ( ) [inline, static]

Definition at line 28 of file MapControl.properties.h.

{ return s_InteractiveControlsVisibleProperty; }

void Layers ( winrt::IVector< winrt::MapLayer > const & value )
winrt::IVector<winrt::MapLayer> Layers ( )
static winrt::DependencyProperty LayersProperty ( ) [inline, static]

Definition at line 29 of file MapControl.properties.h.

{ return s_LayersProperty; }

winrt::event_token MapElementClick ( winrt::TypedEventHandler< winrt::MapControl, winrt::MapElementClickEventArgs > const & value )
void MapElementClick ( winrt::event_token const & token )
void MapServiceErrorOccurred ( winrt::event_token const & token )
winrt::event_token MapServiceErrorOccurred ( winrt::TypedEventHandler< winrt::MapControl, winrt::MapControlMapServiceErrorOccurredEventArgs > const & value )
winrt::hstring MapServiceToken ( )
void MapServiceToken ( winrt::hstring const & value )
static winrt::DependencyProperty MapServiceTokenProperty ( ) [inline, static]

Definition at line 30 of file MapControl.properties.h.

{ return s_MapServiceTokenProperty; }

static void OnCenterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnInteractiveControlsVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLayersPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMapServiceTokenPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnZoomLevelPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
double ZoomLevel ( )
void ZoomLevel ( double value )
static winrt::DependencyProperty ZoomLevelProperty ( ) [inline, static]

Definition at line 31 of file MapControl.properties.h.

{ return s_ZoomLevelProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::MapControl, winrt::MapElementClickEventArgs> > m_mapElementClickEventSource

Definition at line 44 of file MapControl.properties.h.

event_source<winrt::TypedEventHandler<winrt::MapControl, winrt::MapControlMapServiceErrorOccurredEventArgs> > m_mapServiceErrorOccurredEventSource

Definition at line 45 of file MapControl.properties.h.

GlobalDependencyProperty s_CenterProperty [static]

Definition at line 33 of file MapControl.properties.h.

GlobalDependencyProperty s_InteractiveControlsVisibleProperty [static]

Definition at line 34 of file MapControl.properties.h.

GlobalDependencyProperty s_LayersProperty [static]

Definition at line 35 of file MapControl.properties.h.

GlobalDependencyProperty s_MapServiceTokenProperty [static]

Definition at line 36 of file MapControl.properties.h.

GlobalDependencyProperty s_ZoomLevelProperty [static]

Definition at line 37 of file MapControl.properties.h.

The documentation for this class was generated from the following files:
  • Generated/MapControl.properties.h
  • Generated/MapControl.properties.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapElement Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

MapElement Class Reference

#include "MapElement.h"

List of all members.

Public Member Functions

MapElement ()

Public Attributes

winrt::hstring Id

Detailed Description

Definition at line 11 of file MapElement.h.

Constructor & Destructor Documentation

MapElement ( )

Definition at line 11 of file MapElement.cpp.

{
}

Member Data Documentation

winrt::hstring Id

Definition at line 16 of file MapElement.h.

The documentation for this class was generated from the following files:
  • MapControl/MapElement.h
  • MapControl/MapElement.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapElementClickEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

MapElementClickEventArgs Class Reference

#include "MapElementClickEventArgs.h"

List of all members.

Public Member Functions

MapElementClickEventArgs (winrt::Geopoint location, winrt::MapElement element)
winrt::MapElement | Element ()
winrt::Geopoint | Location ()

Private Attributes

winrt::MapElement | m_element
winrt::Geopoint | m_location

Detailed Description

Definition at line 13 of file MapElementClickEventArgs.h.

Constructor & Destructor Documentation

MapElementClickEventArgs | ( | winrt::Geopoint | location,
 |  | winrt::MapElement | element |
 | ) |  |  | [inline]

Definition at line 18 of file MapElementClickEventArgs.h.

                                                                              :
        m_location(location), m_element(element) {};

Member Function Documentation

winrt::MapElement Element ( ) [inline]

Definition at line 22 of file MapElementClickEventArgs.h.

{ return m_element; };

winrt::Geopoint Location ( ) [inline]

Definition at line 21 of file MapElementClickEventArgs.h.

{ return m_location; };

Member Data Documentation

winrt::MapElement m_element [private]

Definition at line 26 of file MapElementClickEventArgs.h.

winrt::Geopoint m_location [private]

Definition at line 22 of file MapElementClickEventArgs.h.

The documentation for this class was generated from the following file:
  • MapControl/MapElementClickEventArgs.h
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapElementsLayer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Private Member Functions

MapElementsLayer Class Reference

#include "MapElementsLayer.h"

Inherits ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer >, and MapElementsLayerProperties.

List of all members.

Public Member Functions

MapElementsLayer ()
void | OnMapElementsVectorChanged (const winrt::IObservableVector< winrt::MapElement > &, const winrt::Collections::IVectorChangedEventArgs &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RaiseMapElementClick (MapElementClickEventArgs const &args)
void | SetParentMapControl (const winrt::MapControl &parent)

Public Attributes

winrt::IVector< winrt::hstring > | m_elementIds

Private Member Functions

winrt::fire_and_forget | HandleMapElementsChanged (const winrt::IObservableVector< winrt::MapElement > &, const winrt::Collections::IVectorChangedEventArgs &args)

Detailed Description

Definition at line 15 of file MapElementsLayer.h.

Constructor & Destructor Documentation

MapElementsLayer ( )

Definition at line 15 of file MapElementsLayer.cpp.

{
    auto elements = winrt::make<Vector<winrt::MapElement>>();
    auto observableVector = elements.try_as<winrt::IObservableVector<winrt::MapElement>>();
    observableVector.VectorChanged({ this, &MapElementsLayer::OnMapElementsVectorChanged });
    SetValue(s_MapElementsProperty, elements);

    m_elementIds = winrt::make<Vector<winrt::hstring>>();

}

Member Function Documentation

winrt::fire_and_forget HandleMapElementsChanged | ( | const winrt::IObservableVector< winrt::MapElement > & | sender,
 |  | const winrt::Collections::IVectorChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 41 of file MapElementsLayer.cpp.

{
    const auto index = args.Index();
    if (const auto& mapControl = m_parentMapControl.get())
    {
        auto mapControlImpl = winrt::get_self<MapControl>(mapControl);
        switch (args.CollectionChange())
        {
            case winrt::Collections::CollectionChange::ItemInserted:
            {
                co_await mapControlImpl->LayerElementsChanged(*this, MapElements(), args, L"");
                m_elementIds.Append(winrt::get_self<MapElement>(MapElements().GetAt(index))->Id);
                break;
            }
            case winrt::Collections::CollectionChange::ItemRemoved:
            {
                co_await mapControlImpl->LayerElementsChanged(*this, MapElements(), args, m_elementIds.GetAt(index));
                m_elementIds.RemoveAt(index);
                break;
            }
            case winrt::Collections::CollectionChange::ItemChanged:
            {
                auto elements = MapElements();
                co_await mapControlImpl->LayerElementsChanged(*this, elements, args, m_elementIds.GetAt(index));
                m_elementIds.SetAt(index, winrt::get_self<MapElement>(elements.GetAt(index))->Id);
                break;
            }
            case winrt::Collections::CollectionChange::Reset:
            {
                auto elements = MapElements();
                co_await mapControlImpl->LayerElementsChanged(*this, elements, args, L"");
                m_elementIds.Clear();
                for (uint32_t i = 0; i < elements.Size(); i++)
                {
                    auto elementId = winrt::get_self<MapElement>(elements.GetAt(i))->Id;
                    m_elementIds.Append(elementId);
                }
                break;
            }
        }
    }
}

void OnMapElementsVectorChanged | ( | const winrt::IObservableVector< winrt::MapElement > & | sender,
 |  | const winrt::Collections::IVectorChangedEventArgs & | args
 | ) |  |

Definition at line 84 of file MapElementsLayer.cpp.

{
    HandleMapElementsChanged(sender, args);
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 31 of file MapElementsLayer.cpp.

{
    winrt::IDependencyProperty property = args.Property();

}

void RaiseMapElementClick ( MapElementClickEventArgs const & args )

Definition at line 36 of file MapElementsLayer.cpp.

{
    m_mapElementClickEventSource(*this, args);
}

void SetParentMapControl ( const winrt::MapControl & parent )

Definition at line 26 of file MapElementsLayer.cpp.

{
    m_parentMapControl = winrt::make_weak(parent);
}

Member Data Documentation

winrt::IVector<winrt::hstring> m_elementIds

Definition at line 23 of file MapElementsLayer.h.

The documentation for this class was generated from the following files:
  • MapControl/MapElementsLayer.h
  • MapControl/MapElementsLayer.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapElementsLayerProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

MapElementsLayerProperties Class Reference

#include "MapElementsLayer.properties.h"

Inherited by MapElementsLayer.

List of all members.

Public Member Functions

MapElementsLayerProperties ()
void | MapElementClick (winrt::event_token const &token)
winrt::event_token | MapElementClick (winrt::TypedEventHandler< winrt::MapElementsLayer, winrt::MapElementClickEventArgs > const &value)
winrt::IVector< winrt::MapElement > | MapElements ()
void | MapElements (winrt::IVector< winrt::MapElement > const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MapElementsProperty ()
static void | OnMapElementsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::MapElementsLayer,
winrt::MapElementClickEventArgs > > 		m_mapElementClickEventSource

Static Public Attributes

static GlobalDependencyProperty | s_MapElementsProperty

Detailed Description

Definition at line 7 of file MapElementsLayer.properties.h.

Constructor & Destructor Documentation

MapElementsLayerProperties ( )

Definition at line 18 of file MapElementsLayer.properties.cpp.

    : m_mapElementClickEventSource{static_cast<MapElementsLayer*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
void MapElementClick ( winrt::event_token const & token )
winrt::event_token MapElementClick ( winrt::TypedEventHandler< winrt::MapElementsLayer, winrt::MapElementClickEventArgs > const & value )
void MapElements ( winrt::IVector< winrt::MapElement > const & value )
winrt::IVector<winrt::MapElement> MapElements ( )
static winrt::DependencyProperty MapElementsProperty ( ) [inline, static]

Definition at line 15 of file MapElementsLayer.properties.h.

{ return s_MapElementsProperty; }

static void OnMapElementsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::MapElementsLayer, winrt::MapElementClickEventArgs> > m_mapElementClickEventSource

Definition at line 22 of file MapElementsLayer.properties.h.

GlobalDependencyProperty s_MapElementsProperty [static]

Definition at line 17 of file MapElementsLayer.properties.h.

The documentation for this class was generated from the following files:
  • Generated/MapElementsLayer.properties.h
  • Generated/MapElementsLayer.properties.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapIcon Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

MapIcon Class Reference

#include "MapIcon.h"

Inherits ReferenceTracker< MapIcon, winrt::implementation::MapIconT, MapElement >, and MapIconProperties.

List of all members.

Public Member Functions

MapIcon ()
void OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Detailed Description

Definition at line 13 of file MapIcon.h.

Constructor & Destructor Documentation

MapIcon ( )

Definition at line 12 of file MapIcon.cpp.

{
}

Member Function Documentation

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 16 of file MapIcon.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_LocationProperty)
    {
        auto map = SharedHelpers::GetAncestorOfType<winrt::MapControl>(winrt::VisualTreeHelper::GetParent(*this));
        auto layer = SharedHelpers::GetAncestorOfType<winrt::MapElementsLayer>(winrt::VisualTreeHelper::GetParent(*this));
        if (map && layer)
        {
            winrt::get_self<MapControl>(map)->UpdateMapIcon(Location(), Id,  winrt::get_self<MapElementsLayer>(layer)->Id);
        }
    }
}

The documentation for this class was generated from the following files:
  • MapControl/MapIcon.h
  • MapControl/MapIcon.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapIconProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

MapIconProperties Class Reference

#include "MapIcon.properties.h"

Inherited by MapIcon.

List of all members.

Public Member Functions

MapIconProperties ()
winrt::Geopoint | Location ()
void | Location (winrt::Geopoint const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | LocationProperty ()
static void | OnLocationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Static Public Attributes

static GlobalDependencyProperty | s_LocationProperty

Detailed Description

Definition at line 7 of file MapIcon.properties.h.

Constructor & Destructor Documentation

MapIconProperties ( )

Definition at line 18 of file MapIcon.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file MapIcon.properties.cpp.

{
    s_LocationProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file MapIcon.properties.cpp.

{
    if (!s_LocationProperty)
    {
        s_LocationProperty =
            InitializeDependencyProperty(
                L"Location",
                winrt::name_of<winrt::Geopoint>(),
                winrt::name_of<winrt::MapIcon>(),
                false /* isAttached */,
                ValueHelper<winrt::Geopoint>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnLocationPropertyChanged));
    }
}

void Location ( winrt::Geopoint const & value )

Definition at line 51 of file MapIcon.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<MapIcon*>(this)->SetValue(s_LocationProperty, ValueHelper<winrt::Geopoint>::BoxValueIfNecessary(value));
    }
}

winrt::Geopoint Location ( )

Definition at line 59 of file MapIcon.properties.cpp.

{
    return ValueHelper<winrt::Geopoint>::CastOrUnbox(static_cast<MapIcon*>(this)->GetValue(s_LocationProperty));
}

static winrt::DependencyProperty LocationProperty ( ) [inline, static]

Definition at line 15 of file MapIcon.properties.h.

{ return s_LocationProperty; }

void OnLocationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 43 of file MapIcon.properties.cpp.

{
    auto owner = sender.as<winrt::MapIcon>();
    winrt::get_self<MapIcon>(owner)->OnPropertyChanged(args);
}

Member Data Documentation

GlobalDependencyProperty s_LocationProperty [static]

Definition at line 17 of file MapIcon.properties.h.

The documentation for this class was generated from the following files:
  • Generated/MapIcon.properties.h
  • Generated/MapIcon.properties.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapLayer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

MapLayer Class Reference

#include "MapLayer.h"

List of all members.

Public Member Functions

MapLayer ()

Public Attributes

winrt::hstring Id

Detailed Description

Definition at line 11 of file MapLayer.h.

Constructor & Destructor Documentation

MapLayer ( )

Definition at line 10 of file MapLayer.cpp.

{
}

Member Data Documentation

winrt::hstring Id

Definition at line 16 of file MapLayer.h.

The documentation for this class was generated from the following files:
  • MapControl/MapLayer.h
  • MapControl/MapLayer.cpp
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MaterialHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

MaterialHelper Class Reference

#include "MaterialHelper.h"

List of all members.

Public Member Functions

MaterialHelper ()
virtual | ~MaterialHelper ()
void | UpdatePolicyStatus (bool onUIThread=false)

Static Public Member Functions

static
winrt::CompositionSurfaceBrush 		GetNoiseBrush ()
static bool | IncrementAndCheckFailedToAttachLightsCount ()
static winrt::event_token | NoiseChanged (const std::function< void(const com_ptr< MaterialHelperBase > &)> &handler)
static void | NoiseChanged (winrt::event_token removeToken)
static void | PolicyChanged (winrt::event_token removeToken)
static winrt::event_token | PolicyChanged (const std::function< void(const com_ptr< MaterialHelperBase > &, bool)> &handler)
static void | ResetFailedToAttachLightsCount ()
static bool | RS2IsSafeToCreateNoise ()
static void | SetShouldBeginAttachingLights (bool shouldBeginAttachingLights)
static void | SetShouldContinueAttachingLights (bool shouldContinueAttachingLights)
static bool | ShouldBeginAttachingLights ()
static bool | ShouldContinueAttachingLights ()

Private Member Functions

void | EnsureCompositionCapabilities ()
bool | FailedToAttachLights ()
winrt::CompositionSurfaceBrush | GetNoiseBrushImpl ()
void | HookupDpiChangedHandler ()
bool | IsFullScreenOrTabletModeImpl ()
void | OnCompositionCapabilitiesChanged (const winrt::CompositionCapabilities &, const winrt::IInspectable &)
void | OnDpiChanged (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnEnergySaverStatusChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnUISettingsChanged (const winrt::UISettings &, const winrt::IInspectable &)
void | ResetNoise ()

Private Attributes

event< std::function< void(com_ptr
< MaterialHelperBase >)> > 		m_noiseChangedListeners
event< std::function< void(com_ptr
< MaterialHelperBase >, bool)> > 		m_policyChangedListeners
winrt::CoreWindow::VisibilityChanged_revoker | m_visibilityChangedRevoker

Static Private Attributes

static const unsigned int | sc_maxFailedToAttachLightsCount = 100

Detailed Description

Definition at line 113 of file MaterialHelper.h.

Constructor & Destructor Documentation

MaterialHelper ( )

Definition at line 271 of file MaterialHelper.cpp.

{
    try
    {
        m_energySaverStatusChangedRevoker = winrt::PowerManager::EnergySaverStatusChanged(winrt::auto_revoke, { this, &MaterialHelper::OnEnergySaverStatusChanged });
        m_energySaverStatusChangedRevokerValid = true;
    }
    catch (winrt::hresult_error)
    {
        // Some processes like EdgeCP don't have access to activate PowerManager. In those cases, just
        // always run in fallback mode.
    }

    // Sometimes we are called so early that we can't access the CoreWindow yet. In these cases we know that
    // the CompositionCapabilities API will also fail. So don't try to do that until CompositionTarget::Rendering.
    // Same for accessing DisplayInformation and obtainting CoreWindow for this view.
    m_dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread();
    const auto coreWindow = winrt::CoreWindow::GetForCurrentThread();
    if (coreWindow)
    {
        EnsureCompositionCapabilities();
        HookupDpiChangedHandler();
    }
    else
    {
        auto strongThis = get_strong();
        SharedHelpers::QueueCallbackForCompositionRendering([strongThis]() {
            // Try again to evaluate composition capabilities.
            strongThis->EnsureCompositionCapabilities();
            strongThis->UpdatePolicyStatus(true /* onUIThread */);

            // ... and DisplayInformation to sign up for DpiChanged
            strongThis->HookupDpiChangedHandler();
        });
    }

    winrt::UISettings uiSettings; // Make an instance to be able to listen for changes.
    m_uiSettings = uiSettings.try_as<winrt::IUISettings4>();
    m_advancedEffectsEnabledChangedToken = m_uiSettings.AdvancedEffectsEnabledChanged({ this, &MaterialHelper::OnUISettingsChanged });

    UpdatePolicyStatus(true /* onUIThread */);
}

~MaterialHelper ( ) [virtual]

Definition at line 348 of file MaterialHelper.cpp.

{
    if (m_compositionCapabilities)
    {
        m_compositionCapabilities.Changed(m_compositionCapabilitiesChangedToken);
    }

    if (m_uiSettings)
    {
        m_uiSettings.AdvancedEffectsEnabledChanged(m_advancedEffectsEnabledChangedToken);
    }
}

Member Function Documentation

void EnsureCompositionCapabilities ( ) [private]

Definition at line 331 of file MaterialHelper.cpp.

{
    if (!m_compositionCapabilities)
    {
        try
        {
            m_compositionCapabilities = winrt::CompositionCapabilities();
            m_compositionCapabilitiesChangedToken = m_compositionCapabilities.Changed({ this, &MaterialHelper::OnCompositionCapabilitiesChanged });
        }
        catch (winrt::hresult_error)
        {
            // Some processes don't have access to activate CompositionCapabilities. In those cases, just
            // always run in fallback mode.
        }
    }
}

bool FailedToAttachLights ( ) [private]

Definition at line 565 of file MaterialHelper.cpp.

{
    return m_failedToAttachLightsCount > sc_maxFailedToAttachLightsCount;
}

winrt::CompositionSurfaceBrush GetNoiseBrush ( ) [static]

Definition at line 473 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    return instance->GetNoiseBrushImpl();
}

winrt::CompositionSurfaceBrush GetNoiseBrushImpl ( ) [private]

Definition at line 479 of file MaterialHelper.cpp.

{
    if (!m_noiseBrush)
    {
        int resScaleInt = 100; // maps to winrt::ResolutionScale::Scale100Percent;

        if (winrt::CoreWindow::GetForCurrentThread())
        {
            try
            {
                winrt::ResolutionScale resScale{ winrt::DisplayInformation::GetForCurrentView().ResolutionScale() };
                if (resScale != winrt::ResolutionScale::Invalid)
                {
                    resScaleInt = static_cast<int>(resScale);
                }
                else
                {
                    MUX_ASSERT_MSG(false, "Could not get ResolutionScale for display.");
                }
            }
            catch (const winrt::hresult_error&)
            {
                // Calling GetForCurrentView on threads without a CoreWindow throws an error. This comes up in places like LogonUI.
                // Assume 1.0 scaling and don't touch the noise brush.
                // Assuming 1.0 scaling isn't correct. Xaml has internal code that handles XamlPresenter scenarios, but that isn't available through public APIs. We can fix this for WUXC but not MUX.
            }
        }

        m_noiseBrush = CreateScaledBrush(resScaleInt);
    }

    return m_noiseBrush;
}

void HookupDpiChangedHandler ( ) [private]

Definition at line 314 of file MaterialHelper.cpp.

{
    if (auto currentView = SharedHelpers::TryGetCurrentCoreApplicationView())
    {
        winrt::DisplayInformation displayInformation = winrt::DisplayInformation::GetForCurrentView();
        m_dpiChangedRevoker = displayInformation.DpiChanged(winrt::auto_revoke, { this, &MaterialHelper::OnDpiChanged });
        m_logicalDpi = displayInformation.LogicalDpi();
    }
    else
    {
        // Calling GetForCurrentView on threads without a CoreWindow throws an error. This comes up in places like LogonUI.
        // Ignore the error and assume a DPI.

        m_logicalDpi = 96;  // This isn't correct. Xaml has internal code that handles XamlPresenter scenarios, but that isn't available through public APIs. We can fix this for WUXC but not MUX.
    }
}

bool IncrementAndCheckFailedToAttachLightsCount ( ) [static]

Definition at line 558 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    instance->m_failedToAttachLightsCount++;
    return instance->FailedToAttachLights();
}

bool IsFullScreenOrTabletModeImpl ( ) [private]
void NoiseChanged ( winrt::event_token removeToken ) [static]

Definition at line 263 of file MaterialHelper.cpp.

{
    if (auto instance = LifetimeHandler::TryGetMaterialHelperInstance())
    {
        instance->m_noiseChangedListeners.remove(removeToken);
    }
}

winrt::event_token NoiseChanged ( const std::function< void(const com_ptr< MaterialHelperBase > &)> & handler ) [static]

Definition at line 255 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    handler(instance);
    return instance->m_noiseChangedListeners.add(handler);
}

void OnCompositionCapabilitiesChanged | ( | const winrt::CompositionCapabilities & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 366 of file MaterialHelper.cpp.

{
    UpdatePolicyStatus();
}

void OnDpiChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 378 of file MaterialHelper.cpp.

{
    const auto previousLogicalDpi = m_logicalDpi;

    try
    {
        m_logicalDpi = (sender.as<winrt::DisplayInformation>()).LogicalDpi();
    }
    catch (winrt::hresult_error)
    {
        // Watson Bugs 12990478 and 13071055 suggest CDisplayInformation::get_LogicalDpi can fail with
        // 0x80070578 : ERROR_INVALID_WINDOW_HANDLE  if the current view  is somehow not available.
        // This likely means the view has been closed and its logical DPI is no longer relevant.
        // Ignore the error and do not notify subscriber materials in this case.

        // TODO: Consider adding below assert to get data on whether we are swallowing other errors here.
        //MUX_ASSERT(e.to_abi() == ERROR_INVALID_WINDOW_HANDLE);
    }

    // We also get here in case of (logical) Resolution change, ignore that case
    if (previousLogicalDpi != m_logicalDpi)
    {
        ResetNoise();
        auto strongThis = get_strong();
        m_noiseChangedListeners(strongThis);
    }
}

void OnEnergySaverStatusChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 361 of file MaterialHelper.cpp.

{
    UpdatePolicyStatus();
}

void OnUISettingsChanged | ( | const winrt::UISettings & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 371 of file MaterialHelper.cpp.

{
    UpdatePolicyStatus();
}

void PolicyChanged ( winrt::event_token removeToken ) [static]

Definition at line 246 of file MaterialHelper.cpp.

{
    if (auto instance = LifetimeHandler::TryGetMaterialHelperInstance())
    {
        instance->m_policyChangedListeners.remove(removeToken);
    }
}

winrt::event_token PolicyChanged ( const std::function< void(const com_ptr< MaterialHelperBase > &, bool)> & handler ) [static]

Definition at line 238 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    handler(instance, instance->m_isDisabledByMaterialPolicy);
    return instance->m_policyChangedListeners.add(handler);
}

void ResetFailedToAttachLightsCount ( ) [static]

Definition at line 551 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    instance->m_failedToAttachLightsCount = 0;
}

void ResetNoise ( ) [private]

Definition at line 457 of file MaterialHelper.cpp.

{
    if (m_noiseSurface)
    {
        m_noiseSurface.Close();
        m_noiseSurface = nullptr;
    }

    if (m_noiseBrush)
    {
        m_noiseBrush.Close();
        m_noiseBrush = nullptr;
    }
}

bool RS2IsSafeToCreateNoise ( ) [static]

Definition at line 516 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    return !instance->m_wasWindowHidden && !instance->m_waitingForRenderingAfterBecomingVisible;
}

void SetShouldBeginAttachingLights ( bool shouldBeginAttachingLights ) [static]

Definition at line 523 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    instance->m_shouldBeginAttachingLights = shouldBeginAttachingLights;
}

void SetShouldContinueAttachingLights ( bool shouldContinueAttachingLights ) [static]

Definition at line 537 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    instance->m_shouldContinueAttachingLights = shouldContinueAttachingLights;
}

bool ShouldBeginAttachingLights ( ) [static]

Definition at line 530 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    return instance->m_shouldBeginAttachingLights;
}

bool ShouldContinueAttachingLights ( ) [static]

Definition at line 544 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    return instance->m_shouldContinueAttachingLights;
}

void UpdatePolicyStatus ( bool onUIThread = false )

Definition at line 406 of file MaterialHelper.cpp.

{
    auto strongThis = get_strong();
    auto callback = [strongThis, this]() {
        const bool isEnergySaverMode = m_energySaverStatusChangedRevokerValid ? winrt::PowerManager::EnergySaverStatus() == winrt::EnergySaverStatus::On : true;
        const bool areEffectsFast = m_compositionCapabilities ? (m_compositionCapabilities.AreEffectsFast() || m_ignoreAreEffectsFast) : false;

        // We are hitting an issue in Photos where UISettings::AdvancedEffectsEnabled is returning RPC_E_WRONG_THREAD.
        // We work around this issue by;
        //   1. Use a fresh instance of UISettings instead of the cached m_uiSettings.
        //   2. Ignore RPC_E_WRONG_THREAD and use a fallback value.
        bool advancedEffectsEnabled = false;
        try
        {
            winrt::UISettings uiSettings;
            advancedEffectsEnabled = uiSettings.AdvancedEffectsEnabled();
        }
        catch (winrt::hresult_error e)
        {
            if (e.to_abi() != RPC_E_WRONG_THREAD) { throw; }
        }

        bool isDisabledByPolicy = m_simulateDisabledByPolicy || (isEnergySaverMode || !areEffectsFast || !advancedEffectsEnabled);

        if (m_isDisabledByMaterialPolicy != isDisabledByPolicy)
        {
            m_isDisabledByMaterialPolicy = isDisabledByPolicy;
            m_policyChangedListeners(strongThis, m_isDisabledByMaterialPolicy);
        }
    };

    if (onUIThread)
    {
        callback();
    }
    else
    {
        if (m_dispatcherQueue) // We might have no dispatcher in XamlPresenter scenarios, in this case we will always be in the disabled state.
        {
            if (m_dispatcherQueue.HasThreadAccess())
            {
                callback();
            }
            else
            {
                m_dispatcherQueue.TryEnqueue(callback);
            }
        }
    }
}

Member Data Documentation

event<std::function<void(com_ptr<MaterialHelperBase>)> > m_noiseChangedListeners [private]

Definition at line 181 of file MaterialHelper.h.

event<std::function<void(com_ptr<MaterialHelperBase>, bool)> > m_policyChangedListeners [private]

Definition at line 164 of file MaterialHelper.h.

winrt::CoreWindow::VisibilityChanged_revoker m_visibilityChangedRevoker [private]

Definition at line 156 of file MaterialHelper.h.

const unsigned int sc_maxFailedToAttachLightsCount = 100 [static, private]

Definition at line 200 of file MaterialHelper.h.

The documentation for this class was generated from the following files:
  • Lights/MaterialHelper.h
  • Lights/MaterialHelper.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MaterialHelperBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

MaterialHelperBase Class Reference

#include "MaterialHelper.h"

List of all members.

Public Types

enum | AcrylicBrushCacheHelperParam { ShouldBrushBeOpaque = 1, UseCrossFadeEffect = 4, MaxCacheSize = 8 }
enum | RevealBrushCacheFlags { IsBorder = 1, IsInverted = 2, HasBaseColor = 4, MaxCacheSize = 8 }

Public Member Functions

void | AssertUniqueCompositorOrUpdate (const winrt::Compositor &compositor)
winrt::CompositionSurfaceBrush | CreateScaledBrush (int dpiScale)

Static Public Member Functions

static int constexpr | BuildAcrylicBrushCompositionEffectFactoryKey (bool shouldBrushBeOpaque, bool useCrossFadeEffect)
static
winrt::CompositionEffectFactory 		GetOrCreateAcrylicBrushCompositionEffectFactoryFromCache (const winrt::Compositor &compositor, bool shouldBrushBeOpaque, bool useCrossFadeEffect, bool useCache, std::function< winrt::CompositionEffectFactory()> cacheMissingCallback)
static
winrt::CompositionEffectFactory 		GetOrCreateRevealBrushCompositionEffectFactoryFromCache (bool isBorder, bool isInverted, bool hasBaseColor, std::function< winrt::CompositionEffectFactory()> cacheMissingCallback)
static void | IgnoreAreEffectsFast (bool value)
static bool | IgnoreAreEffectsFast ()
template<typename T >
static void | LightPolicyChangedHelper (T *instance, bool isDisabledByMaterialPolicy)
static void | OnRevealBrushConnected ()
static void | OnRevealBrushDisconnected ()
static void | SimulateDisabledByPolicy (bool value)
static bool | SimulateDisabledByPolicy ()
static void | TrackRevealLightsToRemove (const winrt::IVector< winrt::XamlLight > &lights, const std::vector< winrt::XamlLight > &revealLightsToRemove)

Public Attributes

std::array
< winrt::ICompositionEffectFactory,
AcrylicBrushCacheHelperParam::MaxCacheSize > 		m_acrylicBrushCompositionEffectFactoryCache
std::array
< winrt::ICompositionEffectFactory,(size_t)
RevealBrushCacheFlags::MaxCacheSize > 		m_revealBrushCompositionEffectFactoryCache
std::vector< std::pair
< winrt::IVector
< winrt::XamlLight >
, std::vector
< winrt::XamlLight > > > 		m_revealLightsToRemove

Detailed Description

Definition at line 36 of file MaterialHelper.h.

Member Enumeration Documentation

enum AcrylicBrushCacheHelperParam
Enumerator:
ShouldBrushBeOpaque
UseCrossFadeEffect
MaxCacheSize

Definition at line 71 of file MaterialHelper.h.

    {
        ShouldBrushBeOpaque = 1,
        UseCrossFadeEffect = 4,
        // If you add more value in, please update MaxCacheSize too
        MaxCacheSize = 8
    };

enum RevealBrushCacheFlags
Enumerator:
IsBorder
IsInverted
HasBaseColor
MaxCacheSize

Definition at line 79 of file MaterialHelper.h.

    {
        IsBorder = 1,
        IsInverted = 2,
        HasBaseColor = 4,
        MaxCacheSize = 8,
    };

Member Function Documentation

void AssertUniqueCompositorOrUpdate ( const winrt::Compositor & compositor )

Definition at line 182 of file MaterialHelper.cpp.

{
    if (m_acrylicCompositor)
    {
        MUX_ASSERT(compositor == m_acrylicCompositor);
    }
    else
    {
        m_acrylicCompositor = compositor;
    }
}

int constexpr BuildAcrylicBrushCompositionEffectFactoryKey | ( | bool | shouldBrushBeOpaque,
 |  | bool | useCrossFadeEffect |
 | ) |  |  | [static]

Definition at line 172 of file MaterialHelper.cpp.

{
    int key = 0;
    key |= shouldBrushBeOpaque ? AcrylicBrushCacheHelperParam::ShouldBrushBeOpaque : 0;
    key |= useCrossFadeEffect ? AcrylicBrushCacheHelperParam::UseCrossFadeEffect : 0;
    return key;
}

winrt::CompositionSurfaceBrush CreateScaledBrush ( int dpiScale )

Definition at line 194 of file MaterialHelper.cpp.

{
    winrt::Compositor compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
    winrt::LoadedImageSurface surface{ ResourceAccessor::GetImageSurface(IR_NoiseAsset_256X256_PNG, { 256, 256 }) };
    winrt::CompositionSurfaceBrush noiseBrush = compositor.CreateSurfaceBrush(surface);

    // Noise should never be stretched (we tile it instead)
    noiseBrush.Stretch(winrt::CompositionStretch::None);
    // Align the noise to the top-left. This way it doesn't move around when the element gets resized to the right or bottom.
    // The default has it centered, which moves the noise texture as elements are resized and makes them shimmer.
    noiseBrush.HorizontalAlignmentRatio(0.0f);
    noiseBrush.VerticalAlignmentRatio(0.0f);

    // Undo dpi scale on the noise (we tile it instead)
    noiseBrush.Scale(winrt::float2(1.0f / (static_cast<float>(dpiScale) / 100.0f)));

    return noiseBrush;
}

winrt::CompositionEffectFactory GetOrCreateAcrylicBrushCompositionEffectFactoryFromCache | ( | const winrt::Compositor & | compositor,
 |  | bool | shouldBrushBeOpaque,
 |  | bool | useCrossFadeEffect,
 |  | bool | useCache,
 |  | std::function< winrt::CompositionEffectFactory()> | cacheMissingCallback |
 | ) |  |  | [static]

Definition at line 108 of file MaterialHelper.cpp.

{
    winrt::CompositionEffectFactory factory{ nullptr };

    if (useCache)
    {
        auto instance = LifetimeHandler::GetMaterialHelperInstance();
        instance->AssertUniqueCompositorOrUpdate(compositor);

        const auto key = BuildAcrylicBrushCompositionEffectFactoryKey(shouldBrushBeOpaque, useCrossFadeEffect);
        auto value = instance->m_acrylicBrushCompositionEffectFactoryCache[key];
        if (value)
        {
            // hit cache
            factory = static_cast<winrt::CompositionEffectFactory&>(value);
        }
        else
        {
            // miss, request to create new one and update cache
            factory = cacheMissingCallback();
            instance->m_acrylicBrushCompositionEffectFactoryCache[key] = factory;
        }
    }
    else
    {
        // always create a new one
        factory = cacheMissingCallback();
    }
    return factory;
}

winrt::CompositionEffectFactory GetOrCreateRevealBrushCompositionEffectFactoryFromCache | ( | bool | isBorder,
 |  | bool | isInverted,
 |  | bool | hasBaseColor,
 |  | std::function< winrt::CompositionEffectFactory()> | cacheMissingCallback |
 | ) |  |  | [static]

Definition at line 146 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();

    int key = 0;
    key |= isBorder ? static_cast<int>(RevealBrushCacheFlags::IsBorder) : 0;
    key |= isInverted ? static_cast<int>(RevealBrushCacheFlags::IsInverted) : 0;
    key |= hasBaseColor ? static_cast<int>(RevealBrushCacheFlags::HasBaseColor) : 0;

    winrt::ICompositionEffectFactory& factory =
        instance->m_revealBrushCompositionEffectFactoryCache[key];

    if (!factory)
    {
        // miss cache, write the result back into the field we grabbed above.
        factory = cacheMissingCallback();
    }

    return static_cast<winrt::CompositionEffectFactory&>(factory);
}

void IgnoreAreEffectsFast ( bool value ) [static]

Definition at line 42 of file MaterialHelper.cpp.

{
    const auto instance = LifetimeHandler::GetMaterialHelperInstance();
    const bool oldValue = instance->m_ignoreAreEffectsFast;
    if (oldValue != value)
    {
        instance->m_ignoreAreEffectsFast = value;
        instance->UpdatePolicyStatus();
    }
}

bool IgnoreAreEffectsFast ( ) [static]

Definition at line 35 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    return instance ? instance->m_ignoreAreEffectsFast : false;
}

void LightPolicyChangedHelper | ( | T * | instance,
 |  | bool | isDisabledByMaterialPolicy |
 | ) |  |  | [static]

Definition at line 214 of file MaterialHelper.cpp.

{
    if (instance->m_isDisabledByMaterialPolicy != isDisabledByMaterialPolicy)
    {
        instance->m_isDisabledByMaterialPolicy = isDisabledByMaterialPolicy;

        if (instance->m_isDisabledByMaterialPolicy)
        {
            instance->ReleaseCompositionResources();
        }
        else
        {
            instance->EnsureCompositionResources();
        }
    }
}

void OnRevealBrushConnected ( ) [static]

Definition at line 54 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    instance->m_revealBrushConnectedCount++;

    if (instance->m_revealBrushConnectedCount == 1)
    {
        // If this is the first connected brush, attach lights.
        if (instance->m_revealLightsToRemove.size() == 0)
        {
            RevealBrush::AttachLights();
        }
    }
}

void OnRevealBrushDisconnected ( ) [static]

Definition at line 70 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();

    MUX_ASSERT(instance->m_revealBrushConnectedCount > 0);
    instance->m_revealBrushConnectedCount--;

    if (instance->m_revealBrushConnectedCount == 0)
    {
        // Remove all the lights we created/attached previously now that there's no RevealBrushes active.
        for (auto pair : instance->m_revealLightsToRemove)
        {
            for (auto lightToRemove : pair.second)
            {
                uint32_t index{};
                if (pair.first.IndexOf(lightToRemove, index))
                {
                    pair.first.RemoveAt(index);
                }
            }
        }

        instance->m_revealLightsToRemove.clear();

        // We just removed all lights from the tree. If we were still in the middle of multi-step process of attaching lights,
        // then don't finish attaching the rest. Otherwise we'll leave the tree in a partially-lit state.
        RevealBrush::StopAttachingLights();
    }
}

void SimulateDisabledByPolicy ( bool value ) [static]

Definition at line 23 of file MaterialHelper.cpp.

{
    const auto instance = LifetimeHandler::GetMaterialHelperInstance();
    const bool oldValue = instance->m_simulateDisabledByPolicy;
    if (oldValue != value)
    {
        instance->m_simulateDisabledByPolicy = value;
        instance->UpdatePolicyStatus();
    }
}

bool SimulateDisabledByPolicy ( ) [static]

Definition at line 16 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    return instance ? instance->m_simulateDisabledByPolicy : false;
}

void TrackRevealLightsToRemove | ( | const winrt::IVector< winrt::XamlLight > & | lights,
 |  | const std::vector< winrt::XamlLight > & | revealLightsToRemove |
 | ) |  |  | [static]

Definition at line 101 of file MaterialHelper.cpp.

{
    auto instance = LifetimeHandler::GetMaterialHelperInstance();
    instance->m_revealLightsToRemove.emplace_back(lights, revealLightsToRemove);
}

Member Data Documentation

std::array<winrt::ICompositionEffectFactory, AcrylicBrushCacheHelperParam::MaxCacheSize> m_acrylicBrushCompositionEffectFactoryCache

Definition at line 93 of file MaterialHelper.h.

std::array<winrt::ICompositionEffectFactory, (size_t)RevealBrushCacheFlags::MaxCacheSize> m_revealBrushCompositionEffectFactoryCache

Definition at line 98 of file MaterialHelper.h.

std::vector<std::pair<winrt::IVector<winrt::XamlLight>, std::vector<winrt::XamlLight> > > m_revealLightsToRemove

Definition at line 67 of file MaterialHelper.h.

The documentation for this class was generated from the following files:
  • Lights/MaterialHelper.h
  • Lights/MaterialHelper.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MaterialHelperTestApi Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

MaterialHelperTestApi Class Reference

#include "MaterialHelperTestApi.h"

Inherits ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable >.

List of all members.

Static Public Member Functions

static bool | IgnoreAreEffectsFast ()
static void | IgnoreAreEffectsFast (bool value)
static bool | SimulateDisabledByPolicy ()
static void | SimulateDisabledByPolicy (bool value)

Detailed Description

Definition at line 8 of file MaterialHelperTestApi.h.

Member Function Documentation

static bool IgnoreAreEffectsFast ( ) [static]
static void IgnoreAreEffectsFast ( bool value ) [static]
static bool SimulateDisabledByPolicy ( ) [static]
static void SimulateDisabledByPolicy ( bool value ) [static]
The documentation for this class was generated from the following file:
  • Lights/MaterialHelperTestApi.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MathToken Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes

MathToken Struct Reference

#include "NumberBoxParser.h"

List of all members.

Public Member Functions

MathToken (MathTokenType t, wchar_t c)
MathToken (MathTokenType t, double d)

Public Attributes

wchar_t | Char
MathTokenType Type
double | Value

Detailed Description

Definition at line 18 of file NumberBoxParser.h.

Constructor & Destructor Documentation

MathToken | ( | MathTokenType | t,
 |  | wchar_t | c |
 | ) |  |  | [inline]

Definition at line 20 of file NumberBoxParser.h.

: Type(t), Char(c), Value(std::numeric_limits<double>::quiet_NaN()) {}

MathToken | ( | MathTokenType | t,
 |  | double | d |
 | ) |  |  | [inline]

Definition at line 21 of file NumberBoxParser.h.

: Type(t), Value(d), Char(0) {}

Member Data Documentation

wchar_t Char

Definition at line 24 of file NumberBoxParser.h.

MathTokenType Type

Definition at line 23 of file NumberBoxParser.h.

double Value

Definition at line 25 of file NumberBoxParser.h.

The documentation for this struct was generated from the following file:
  • NumberBox/NumberBoxParser.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

MenuBar Class Reference

#include "MenuBar.h"

Inherits ReferenceTracker< MenuBar, winrt::implementation::MenuBarT >, and MenuBarProperties.

List of all members.

Public Member Functions

MenuBar ()
void | IsFlyoutOpen (bool state)
bool | IsFlyoutOpen ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | RequestPassThroughElement (const winrt::Microsoft::UI::Xaml::Controls::MenuBarItem &menuBarItem)

Private Member Functions

void | SetUpTemplateParts ()
void | UpdateAutomationSizeAndPosition ()

Detailed Description

Definition at line 9 of file MenuBar.h.

Constructor & Destructor Documentation

MenuBar ( )

Definition at line 12 of file MenuBar.cpp.

{
    SetDefaultStyleKey(this);

    auto items = winrt::make<ObservableVector<winrt::MenuBarItem>>();
    SetValue(s_ItemsProperty, items);

    auto observableVector = Items().try_as<winrt::IObservableVector<winrt::MenuBarItem>>();
    m_itemsVectorChangedRevoker = observableVector.VectorChanged(winrt::auto_revoke,
    {
        [this](auto const&, auto const&)
        {
            UpdateAutomationSizeAndPosition();
        }
    });
}

Member Function Documentation

bool IsFlyoutOpen ( ) [inline]

Definition at line 18 of file MenuBar.h.

{ return m_isFlyoutOpen; };

void IsFlyoutOpen ( bool state )

Definition at line 64 of file MenuBar.cpp.

{
    m_isFlyoutOpen = state;
}

void OnApplyTemplate ( )

Definition at line 35 of file MenuBar.cpp.

{
    SetUpTemplateParts();
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 30 of file MenuBar.cpp.

{
    return winrt::make<MenuBarAutomationPeer>(*this);
}

void RequestPassThroughElement ( const winrt::Microsoft::UI::Xaml::Controls::MenuBarItem & menuBarItem )

Definition at line 58 of file MenuBar.cpp.

{
    // To enable switching flyout on hover, every menubar item needs the MenuBar root to include it for hit detection with flyouts open
    winrt::get_self<MenuBarItem>(menuBarItem)->AddPassThroughElement(m_layoutRoot.get());
}

void SetUpTemplateParts ( ) [private]

Definition at line 40 of file MenuBar.cpp.

{
    winrt::IControlProtected thisAsControlProtected = *this;
    if (auto layoutRoot = GetTemplateChildT<winrt::Grid>(L"LayoutRoot", thisAsControlProtected))
    {
        m_layoutRoot.set(layoutRoot);
    }
    if (auto contentRoot = GetTemplateChildT<winrt::ItemsControl>(L"ContentRoot", thisAsControlProtected))
    {
        contentRoot.XYFocusKeyboardNavigation(winrt::XYFocusKeyboardNavigationMode::Enabled);

        auto observableVector = Items().try_as<winrt::IObservableVector<winrt::MenuBarItem>>();
        contentRoot.ItemsSource(observableVector);

        m_contentRoot.set(contentRoot);
    }
}

void UpdateAutomationSizeAndPosition ( ) [private]

Definition at line 70 of file MenuBar.cpp.

{
    int sizeOfSet = 0;

    for (const auto& item : Items())
    {
        if (auto itemAsUIElement = item.try_as<winrt::UIElement>())
        {
            if (itemAsUIElement.Visibility() == winrt::Visibility::Visible)
            {
                sizeOfSet++;
                winrt::AutomationProperties::SetPositionInSet(itemAsUIElement, sizeOfSet);
            }
        }
    }

    for (const auto& item : Items())
    {
        if (auto itemAsUIElement = item.try_as<winrt::UIElement>())
        {
            if (itemAsUIElement.Visibility() == winrt::Visibility::Visible)
            {
                winrt::AutomationProperties::SetSizeOfSet(itemAsUIElement, sizeOfSet);
            }
        }
    }
}

The documentation for this class was generated from the following files:
  • MenuBar/MenuBar.h
  • MenuBar/MenuBar.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

MenuBarAutomationPeer Class Reference

#include "MenuBarAutomationPeer.h"

Inherits ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT >.

List of all members.

Public Member Functions

MenuBarAutomationPeer (winrt::MenuBar const &owner)
winrt::AutomationControlType GetAutomationControlTypeCore ()

Detailed Description

Definition at line 9 of file MenuBarAutomationPeer.h.

Constructor & Destructor Documentation

MenuBarAutomationPeer ( winrt::MenuBar const & owner )

Definition at line 12 of file MenuBarAutomationPeer.cpp.

                                                                      : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 16 of file MenuBarAutomationPeer.cpp.

{
    return winrt::AutomationControlType::MenuBar;
}

The documentation for this class was generated from the following files:
  • MenuBar/MenuBarAutomationPeer.h
  • MenuBar/MenuBarAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

MenuBarItem Class Reference

#include "MenuBarItem.h"

Inherits ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT >, and MenuBarItemProperties.

List of all members.

Public Member Functions

MenuBarItem ()
virtual | ~MenuBarItem ()
void | AddPassThroughElement (const winrt::DependencyObject &element)
void | CloseMenuFlyout ()
void | Invoke ()
bool | IsFlyoutOpen ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | ShowMenuFlyout ()

Private Member Functions

void | AttachEventHandlers ()
void | DetachEventHandlers (bool useSafeGet=false)
winrt::MenuBarItem | FocusAndReturnNextFocusableItem (int index, int direction)
void | MoveFocusTo (FlyoutLocation location)
void | OnFlyoutClosed (winrt::IInspectable const &sender, winrt::IInspectable const &args)
void | OnFlyoutOpening (winrt::IInspectable const &sender, winrt::IInspectable const &args)
void | OnItemsVectorChanged (winrt::Collections::IObservableVector< winrt::MenuFlyoutItemBase > const &sender, winrt::Collections::IVectorChangedEventArgs const &e)
void | OnMenuBarItemAccessKeyInvoked (winrt::IInspectable const &sender, winrt::AccessKeyInvokedEventArgs const &args)
void | OnMenuBarItemKeyDown (winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args)
void | OnMenuBarItemPointerEntered (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnMenuBarItemPointerPressed (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPresenterKeyDown (winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args)
void | OnVisualPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OpenFlyoutFrom (FlyoutLocation location)
void | PopulateContent ()
void | UpdateVisualStates ()

Private Attributes

weak_ref< winrt::MenuBar > | m_menuBar
weak_ref< winrt::DependencyObject > | m_passThroughElement

Detailed Description

Definition at line 15 of file MenuBarItem.h.

Constructor & Destructor Documentation

MenuBarItem ( )

Definition at line 13 of file MenuBarItem.cpp.

{
    SetDefaultStyleKey(this);

    auto items = winrt::make<Vector<winrt::MenuFlyoutItemBase>>();
    auto observableVector = items.try_as<winrt::IObservableVector<winrt::MenuFlyoutItemBase>>();
    observableVector.VectorChanged({ this, &MenuBarItem::OnItemsVectorChanged });
    SetValue(s_ItemsProperty, items);
}

~MenuBarItem ( ) [virtual]

Definition at line 23 of file MenuBarItem.cpp.

{
    DetachEventHandlers(true);
}

Member Function Documentation

void AddPassThroughElement ( const winrt::DependencyObject & element )

Definition at line 349 of file MenuBarItem.cpp.

{
    m_passThroughElement = winrt::make_weak(element);
}

void AttachEventHandlers ( ) [private]

Definition at line 80 of file MenuBarItem.cpp.

{
    if (auto button = m_button.get())
    {
        m_pressedRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPressedProperty(), { this, &MenuBarItem::OnVisualPropertyChanged });
        m_pointerOverRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPointerOverProperty(), { this, &MenuBarItem::OnVisualPropertyChanged });
    }

    m_onMenuBarItemPointerPressedRevoker = AddRoutedEventHandler<RoutedEventType::PointerPressed>(
        *this,
        [this](auto const& sender, auto const& args)
        {
            OnMenuBarItemPointerPressed(sender, args);
        },
        true /*handledEventsToo*/
    );

    m_onMenuBarItemKeyDownRevoker = AddRoutedEventHandler<RoutedEventType::KeyDown>(
        *this,
        [this](auto const& sender, auto const& args)
        {
            OnMenuBarItemKeyDown(sender, args);
        },
        true /*handledEventsToo*/
    );

    if (auto flyout = m_flyout.get())
    {
        m_flyoutClosedRevoker = flyout.Closed(winrt::auto_revoke, { this, &MenuBarItem::OnFlyoutClosed });
        m_flyoutOpeningRevoker = flyout.Opening(winrt::auto_revoke, { this, &MenuBarItem::OnFlyoutOpening });
    }

    m_pointerEnteredRevoker = PointerEntered(winrt::auto_revoke, { this, &MenuBarItem::OnMenuBarItemPointerEntered });

    m_accessKeyInvokedRevoker = AccessKeyInvoked(winrt::auto_revoke, { this, &MenuBarItem::OnMenuBarItemAccessKeyInvoked });
}

void CloseMenuFlyout ( )

Definition at line 280 of file MenuBarItem.cpp.

{
    m_flyout.get().Hide();
}

void DetachEventHandlers ( bool useSafeGet = false ) [private]

Definition at line 117 of file MenuBarItem.cpp.

{
    m_pressedRevoker.revoke();
    m_pointerOverRevoker.revoke();

    m_flyoutClosedRevoker.revoke();
    m_flyoutOpeningRevoker.revoke();

    m_onMenuBarItemPointerPressedRevoker.revoke();
    m_onMenuBarItemKeyDownRevoker.revoke();
}

winrt::MenuBarItem FocusAndReturnNextFocusableItem | ( | int | index,
 |  | int | direction |
 | ) |  |  | [private]

Definition at line 310 of file MenuBarItem.cpp.

{
    if (const auto menuBar = m_menuBar.get())
    {
        const int itemsCount = menuBar.Items().Size();
        // index + direction might be negative so account for that by adding itemsCount.
        int itemIndex = (index + direction + itemsCount) % itemsCount;
        while (!menuBar.Items().GetAt(itemIndex).Focus(winrt::FocusState::Programmatic))
        {
            // index + direction might be negative so account for that by adding itemsCount.
            itemIndex = (itemIndex + direction + itemsCount) % itemsCount;
            if (itemIndex == index)
            {
                // We are where we started, return no new item.
                return nullptr;
            }
        }
        return menuBar.Items().GetAt(itemIndex);
    }
    return nullptr;
}

void Invoke ( )

Definition at line 359 of file MenuBarItem.cpp.

{
    if (IsFlyoutOpen())
    {
        CloseMenuFlyout();
    }
    else
    {
        ShowMenuFlyout();
    }
}

bool IsFlyoutOpen ( )

Definition at line 354 of file MenuBarItem.cpp.

{
    return m_isFlyoutOpen;
}

void MoveFocusTo ( FlyoutLocation location ) [private]

Definition at line 332 of file MenuBarItem.cpp.

{
    if (auto menuBar = m_menuBar.get())
    {
        uint32_t index = 0;
        menuBar.Items().IndexOf(*this, index);
        if (location == FlyoutLocation::Left)
        {
            winrt::get_self<MenuBarItem>(menuBar.Items().GetAt(((index - 1) + menuBar.Items().Size()) % menuBar.Items().Size()))->Focus(winrt::FocusState::Programmatic);
        }
        else
        {
            winrt::get_self<MenuBarItem>(menuBar.Items().GetAt((index + 1) % menuBar.Items().Size()))->Focus(winrt::FocusState::Programmatic);
        }
    }
}

void OnApplyTemplate ( )

Definition at line 35 of file MenuBarItem.cpp.

{
    m_button.set(GetTemplateChildT<winrt::Button>(L"ContentButton", *this));

    auto menuBar = SharedHelpers::GetAncestorOfType<winrt::MenuBar>(winrt::VisualTreeHelper::GetParent(*this));
    if (menuBar)
    {
        m_menuBar = winrt::make_weak(menuBar);
        // Ask parent MenuBar for its root to enable pass through
        winrt::get_self<MenuBar>(menuBar)->RequestPassThroughElement(*this);
    }

    PopulateContent();
    DetachEventHandlers();
    AttachEventHandlers();
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 29 of file MenuBarItem.cpp.

{
    return winrt::make<MenuBarItemAutomationPeer>(*this);
}

void OnFlyoutClosed | ( | winrt::IInspectable const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]

Definition at line 372 of file MenuBarItem.cpp.

{
    m_isFlyoutOpen = false;

    if (auto menuBar = m_menuBar.get())
    {
        winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen(false);
    }

    UpdateVisualStates();
}

void OnFlyoutOpening | ( | winrt::IInspectable const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]

Definition at line 384 of file MenuBarItem.cpp.

{
    Focus(winrt::FocusState::Programmatic);

    m_isFlyoutOpen = true;

    if (auto menuBar = m_menuBar.get())
    {
        winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen(true);
    }

    UpdateVisualStates();
}

void OnItemsVectorChanged | ( | winrt::Collections::IObservableVector< winrt::MenuFlyoutItemBase > const & | sender,
 |  | winrt::Collections::IVectorChangedEventArgs const & | e |
 | ) |  |  | [private]

Definition at line 230 of file MenuBarItem.cpp.

{
    if (auto flyout = m_flyout.safe_get())
    {
        const auto index = e.Index();
        switch (e.CollectionChange())
        {
        case winrt::Collections::CollectionChange::ItemInserted:
            flyout.Items().InsertAt(index, Items().GetAt(index));
            break;
        case winrt::Collections::CollectionChange::ItemRemoved:
            flyout.Items().RemoveAt(index);
            break;
        default:
            break;
        }
    }
}

void OnMenuBarItemAccessKeyInvoked | ( | winrt::IInspectable const & | sender,
 |  | winrt::AccessKeyInvokedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 249 of file MenuBarItem.cpp.

{
    ShowMenuFlyout();
    args.Handled(true);
}

void OnMenuBarItemKeyDown | ( | winrt::IInspectable const & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 154 of file MenuBarItem.cpp.

{
    const auto isAltDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    if(!isAltDown)
    {
        const auto key = args.Key();
        if (key == winrt::VirtualKey::Down
            || key == winrt::VirtualKey::Enter
            || key == winrt::VirtualKey::Space)
        {
            ShowMenuFlyout();
        }
        else if (key == winrt::VirtualKey::Right)
        {
            if (FlowDirection() == winrt::FlowDirection::RightToLeft)
            {
                MoveFocusTo(FlyoutLocation::Left);
            }
            else
            {
                MoveFocusTo(FlyoutLocation::Right);
            }
            args.Handled(TRUE);
        }
        else if (key == winrt::VirtualKey::Left)
        {
            if (FlowDirection() == winrt::FlowDirection::RightToLeft)
            {
                MoveFocusTo(FlyoutLocation::Right);
            }
            else
            {
                MoveFocusTo(FlyoutLocation::Left);
            }
            args.Handled(TRUE);
        }
    }
}

void OnMenuBarItemPointerEntered | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 130 of file MenuBarItem.cpp.

{
    if (auto menuBar = m_menuBar.get())
    {
        const auto flyoutOpen = (winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen());
        if (flyoutOpen)
        {
            ShowMenuFlyout();
        }
    }
}

void OnMenuBarItemPointerPressed | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 142 of file MenuBarItem.cpp.

{
    if (auto menuBar = m_menuBar.get())
    {
        const auto flyoutOpen = (winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen());
        if (!flyoutOpen)
        {
            ShowMenuFlyout();
        }
    }
}

void OnPresenterKeyDown | ( | winrt::IInspectable const & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 194 of file MenuBarItem.cpp.

{
    // If the event came from a MenuFlyoutSubItem it means right/left arrow will open it, so we should not handle them to not override default behaviour
    if (auto const& subitem = args.OriginalSource().try_as<winrt::MenuFlyoutSubItem>())
    {
        if (subitem.Items().GetAt(0))
        {
            return;
        }
    }

    const auto key = args.Key();
    if (key == winrt::VirtualKey::Right)
    {
        if (FlowDirection() == winrt::FlowDirection::RightToLeft)
        {
            OpenFlyoutFrom(FlyoutLocation::Left);
        }
        else
        {
            OpenFlyoutFrom(FlyoutLocation::Right);
        }
    }
    else if (key == winrt::VirtualKey::Left)
    {
        if (FlowDirection() == winrt::FlowDirection::RightToLeft)
        {
            OpenFlyoutFrom(FlyoutLocation::Right);
        }
        else
        {
            OpenFlyoutFrom(FlyoutLocation::Left);
        }
    }
}

void OnVisualPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 398 of file MenuBarItem.cpp.

{
    UpdateVisualStates();
}

void OpenFlyoutFrom ( FlyoutLocation location ) [private]

Definition at line 285 of file MenuBarItem.cpp.

{
    if (auto menuBar = m_menuBar.get())
    {
        uint32_t index = 0;
        menuBar.Items().IndexOf(*this, index);
        CloseMenuFlyout();
        if (location == FlyoutLocation::Left)
        {
            if (const auto item = FocusAndReturnNextFocusableItem(index, -1).try_as<MenuBarItem>())
            {
                item->ShowMenuFlyout();
            }
        }
        else
        {
            if (const auto item = FocusAndReturnNextFocusableItem(index, +1).try_as<MenuBarItem>())
            {
                item->ShowMenuFlyout();
            }
        }
    }
}

void PopulateContent ( ) [private]

Definition at line 52 of file MenuBarItem.cpp.

{
    // Create flyout
    winrt::MenuBarItemFlyout flyout;

    for (winrt::MenuFlyoutItemBase const& flyoutItem : Items())
    {
        flyout.Items().Append(flyoutItem);
    }

    flyout.Placement(winrt::FlyoutPlacementMode::Bottom);

    if (m_passThroughElement)
    {
        if (winrt::IFlyoutBase flyoutBase = flyout)
        {
            flyout.OverlayInputPassThroughElement(m_passThroughElement.get());
        }
    }
    m_flyout.set(flyout);

    if (auto button = m_button.get())
    {
        button.IsAccessKeyScope(true);
        button.ContextFlyout(flyout);
    }
}

void ShowMenuFlyout ( )

Definition at line 256 of file MenuBarItem.cpp.

{
    if (Items().Size() != 0)
    {
        if (auto button = m_button.get())
        {
            const auto width = static_cast<float>(button.ActualWidth());
            const auto height = static_cast<float>(button.ActualHeight());

            // Sets an exclusion rect over the button that generates the flyout so that even if the menu opens upwards
            // (which is the default in touch mode) it doesn't cover the menu bar button.
            winrt::FlyoutShowOptions options{};
            options.Position(winrt::Point(0, height));
            options.Placement(winrt::FlyoutPlacementMode::Bottom);
            options.ExclusionRect(winrt::Rect(0, 0, width, height));
            m_flyout.get().ShowAt(button, options);

            // Attach keyboard event handler
            auto presenter = winrt::get_self<MenuBarItemFlyout>(m_flyout.get())->m_presenter.get();
            m_presenterKeyDownRevoker = presenter.KeyDown(winrt::auto_revoke, { this,  &MenuBarItem::OnPresenterKeyDown });
        }
    }
}

void UpdateVisualStates ( ) [private]

Definition at line 403 of file MenuBarItem.cpp.

{
    if (auto button = m_button.get())
    {
        if (button.IsPressed())
        {
            winrt::VisualStateManager::GoToState(*this, L"Pressed", false);
        }
        else if (button.IsPointerOver())
        {
            winrt::VisualStateManager::GoToState(*this, L"PointerOver", false);
        }
        else
        {
            if (m_isFlyoutOpen)
            {
                winrt::VisualStateManager::GoToState(*this, L"Selected", false);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, L"Normal", false);
            }
        }
    }
}

Member Data Documentation

weak_ref<winrt::MenuBar> m_menuBar [private]

Definition at line 65 of file MenuBarItem.h.

weak_ref<winrt::DependencyObject> m_passThroughElement [private]

Definition at line 62 of file MenuBarItem.h.

The documentation for this class was generated from the following files:
  • MenuBar/MenuBarItem.h
  • MenuBar/MenuBarItem.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

MenuBarItemAutomationPeer Class Reference

#include "MenuBarItemAutomationPeer.h"

Inherits ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT >.

List of all members.

Public Member Functions

MenuBarItemAutomationPeer (winrt::MenuBarItem const &owner)
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
void | Invoke ()

Detailed Description

Definition at line 9 of file MenuBarItemAutomationPeer.h.

Constructor & Destructor Documentation

MenuBarItemAutomationPeer ( winrt::MenuBarItem const & owner )

Definition at line 14 of file MenuBarItemAutomationPeer.cpp.

                                                                                : ReferenceTracker(owner)
{
}

Member Function Documentation

void Collapse ( )

Definition at line 71 of file MenuBarItemAutomationPeer.cpp.

{
    auto owner = Owner().as<winrt::MenuBarItem>();
    winrt::get_self<MenuBarItem>(owner)->CloseMenuFlyout();
}

void Expand ( )

Definition at line 77 of file MenuBarItemAutomationPeer.cpp.

{
    auto owner = Owner().as<winrt::MenuBarItem>();
    winrt::get_self<MenuBarItem>(owner)->ShowMenuFlyout();
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 57 of file MenuBarItemAutomationPeer.cpp.

{
    winrt::UIElement owner = Owner();
    auto menuBarItem = owner.as<winrt::MenuBarItem>();
    if (winrt::get_self<MenuBarItem>(menuBarItem)->IsFlyoutOpen())
    {
        return winrt::ExpandCollapseState::Expanded;
    }
    else
    {
        return winrt::ExpandCollapseState::Collapsed;
    }
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 18 of file MenuBarItemAutomationPeer.cpp.

{
    return winrt::AutomationControlType::MenuItem;
}

winrt::hstring GetClassNameCore ( )

Definition at line 46 of file MenuBarItemAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::MenuBarItem>();
}

winrt::hstring GetNameCore ( )

Definition at line 32 of file MenuBarItemAutomationPeer.cpp.

{
    //Check to see if the item has a defined AutomationProperties.Name
    winrt::hstring name = __super::GetNameCore();

    if (name.empty())
    {
        auto owner = Owner().as<winrt::MenuBarItem>();
        name = owner.Title();
    }

    return name;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 23 of file MenuBarItemAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Invoke || patternInterface == winrt::PatternInterface::ExpandCollapse)
    {
        return *this;
    }
    return __super::GetPatternCore(patternInterface);
}

void Invoke ( )

Definition at line 51 of file MenuBarItemAutomationPeer.cpp.

{
    auto owner = Owner().as<winrt::MenuBarItem>();
    winrt::get_self<MenuBarItem>(owner)->Invoke();
}

The documentation for this class was generated from the following files:
  • MenuBar/MenuBarItemAutomationPeer.h
  • MenuBar/MenuBarItemAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarItemFlyout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions

MenuBarItemFlyout Class Reference

#include "MenuBarItemFlyout.h"

Inherits ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT >.

List of all members.

Public Member Functions

winrt::Control | CreatePresenter ()

Static Public Member Functions

static void | OnPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Detailed Description

Definition at line 8 of file MenuBarItemFlyout.h.

Member Function Documentation

winrt::Control CreatePresenter ( )

Definition at line 10 of file MenuBarItemFlyout.cpp.

{
    m_presenter.set(__super::CreatePresenter());
    return m_presenter.get();
}

static void OnPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [inline, static]

Definition at line 13 of file MenuBarItemFlyout.h.

                                                             {}

The documentation for this class was generated from the following files:
  • MenuBar/MenuBarItemFlyout.h
  • MenuBar/MenuBarItemFlyout.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

MenuBarItemProperties Class Reference

#include "MenuBarItem.properties.h"

Inherited by MenuBarItem.

List of all members.

Public Member Functions

MenuBarItemProperties ()
void | Items (winrt::IVector< winrt::MenuFlyoutItemBase > const &value)
winrt::IVector
< winrt::MenuFlyoutItemBase > 		Items ()
void | Title (winrt::hstring const &value)
winrt::hstring | Title ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ItemsProperty ()
static winrt::DependencyProperty | TitleProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ItemsProperty
static GlobalDependencyProperty | s_TitleProperty

Detailed Description

Definition at line 7 of file MenuBarItem.properties.h.

Constructor & Destructor Documentation

MenuBarItemProperties ( )

Definition at line 19 of file MenuBarItem.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file MenuBarItem.properties.cpp.

{
    s_ItemsProperty = nullptr;
    s_TitleProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file MenuBarItem.properties.cpp.

{
    if (!s_ItemsProperty)
    {
        s_ItemsProperty =
            InitializeDependencyProperty(
                L"Items",
                winrt::name_of<winrt::IVector<winrt::MenuFlyoutItemBase>>(),
                winrt::name_of<winrt::MenuBarItem>(),
                false /* isAttached */,
                ValueHelper<winrt::IVector<winrt::MenuFlyoutItemBase>>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_TitleProperty)
    {
        s_TitleProperty =
            InitializeDependencyProperty(
                L"Title",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::MenuBarItem>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IVector< winrt::MenuFlyoutItemBase > Items ( )

Definition at line 64 of file MenuBarItem.properties.cpp.

{
    return ValueHelper<winrt::IVector<winrt::MenuFlyoutItemBase>>::CastOrUnbox(static_cast<MenuBarItem*>(this)->GetValue(s_ItemsProperty));
}

void Items ( winrt::IVector< winrt::MenuFlyoutItemBase > const & value )

Definition at line 56 of file MenuBarItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<MenuBarItem*>(this)->SetValue(s_ItemsProperty, ValueHelper<winrt::IVector<winrt::MenuFlyoutItemBase>>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ItemsProperty ( ) [inline, static]

Definition at line 18 of file MenuBarItem.properties.h.

{ return s_ItemsProperty; }

winrt::hstring Title ( )

Definition at line 77 of file MenuBarItem.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<MenuBarItem*>(this)->GetValue(s_TitleProperty));
}

void Title ( winrt::hstring const & value )

Definition at line 69 of file MenuBarItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<MenuBarItem*>(this)->SetValue(s_TitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TitleProperty ( ) [inline, static]

Definition at line 19 of file MenuBarItem.properties.h.

{ return s_TitleProperty; }

Member Data Documentation

GlobalDependencyProperty s_ItemsProperty [static]

Definition at line 21 of file MenuBarItem.properties.h.

GlobalDependencyProperty s_TitleProperty [static]

Definition at line 22 of file MenuBarItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/MenuBarItem.properties.h
  • Generated/MenuBarItem.properties.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

MenuBarProperties Class Reference

#include "MenuBar.properties.h"

Inherited by MenuBar.

List of all members.

Public Member Functions

MenuBarProperties ()
winrt::IVector
< winrt::MenuBarItem > 		Items ()
void | Items (winrt::IVector< winrt::MenuBarItem > const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ItemsProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ItemsProperty

Detailed Description

Definition at line 7 of file MenuBar.properties.h.

Constructor & Destructor Documentation

MenuBarProperties ( )

Definition at line 18 of file MenuBar.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file MenuBar.properties.cpp.

{
    s_ItemsProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file MenuBar.properties.cpp.

{
    if (!s_ItemsProperty)
    {
        s_ItemsProperty =
            InitializeDependencyProperty(
                L"Items",
                winrt::name_of<winrt::IVector<winrt::MenuBarItem>>(),
                winrt::name_of<winrt::MenuBar>(),
                false /* isAttached */,
                ValueHelper<winrt::IVector<winrt::MenuBarItem>>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IVector< winrt::MenuBarItem > Items ( )

Definition at line 51 of file MenuBar.properties.cpp.

{
    return ValueHelper<winrt::IVector<winrt::MenuBarItem>>::CastOrUnbox(static_cast<MenuBar*>(this)->GetValue(s_ItemsProperty));
}

void Items ( winrt::IVector< winrt::MenuBarItem > const & value )

Definition at line 43 of file MenuBar.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<MenuBar*>(this)->SetValue(s_ItemsProperty, ValueHelper<winrt::IVector<winrt::MenuBarItem>>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ItemsProperty ( ) [inline, static]

Definition at line 15 of file MenuBar.properties.h.

{ return s_ItemsProperty; }

Member Data Documentation

GlobalDependencyProperty s_ItemsProperty [static]

Definition at line 17 of file MenuBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/MenuBar.properties.h
  • Generated/MenuBar.properties.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MicaBackdrop Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Attributes

MicaBackdrop Class Reference

#include "MicaBackdrop.h"

Inherits ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT >, and MicaBackdropProperties.

List of all members.

Classes

class | ControllerEntry

Public Member Functions

MicaBackdrop ()
virtual | ~MicaBackdrop ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnTargetConnected (ICompositionSupportsSystemBackdrop connectedTarget, winrt::Microsoft::UI::Xaml::XamlRoot xamlRoot)
void | OnTargetDisconnected (ICompositionSupportsSystemBackdrop disconnectedTarget)

Private Attributes

std::vector< std::unique_ptr
< ControllerEntry > > 		m_controllers

Detailed Description

Definition at line 14 of file MicaBackdrop.h.

Constructor & Destructor Documentation

MicaBackdrop ( )
virtual ~MicaBackdrop ( ) [virtual]

Member Function Documentation

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 31 of file MicaBackdrop.cpp.

{
    const winrt::IDependencyProperty& property = args.Property();

    if (property == s_KindProperty)
    {
        // If no controller exists, Kind will get set as part of OnTargetConnected
        for (const std::unique_ptr<ControllerEntry>& entry : m_controllers)
        {
            entry->m_controller.Kind(Kind());
        }
    }
}

void OnTargetConnected | ( | ICompositionSupportsSystemBackdrop | connectedTarget,
 |  | winrt::Microsoft::UI::Xaml::XamlRoot | xamlRoot
 | ) |  |

Definition at line 8 of file MicaBackdrop.cpp.

{
    __super::OnTargetConnected(target, xamlRoot);

    auto newController = MicaController();
    newController.Kind(Kind());
    auto systemBackdrop = this->try_as<winrt::Microsoft::UI::Xaml::Media::SystemBackdrop>();
    auto configuration = systemBackdrop.GetDefaultSystemBackdropConfiguration(target, xamlRoot);
    m_controllers.push_back(std::make_unique<ControllerEntry>(target, newController, configuration));
}

void OnTargetDisconnected ( ICompositionSupportsSystemBackdrop disconnectedTarget )

Definition at line 19 of file MicaBackdrop.cpp.

{
    __super::OnTargetDisconnected(target);

    auto entryIterator = std::find_if(
        m_controllers.begin(),
        m_controllers.end(),
        [target](const std::unique_ptr<ControllerEntry>& entry){ return entry->m_target == target; });
    MUX_ASSERT(entryIterator != m_controllers.end());
    m_controllers.erase(entryIterator);
}

Member Data Documentation

std::vector<std::unique_ptr<ControllerEntry> > m_controllers [private]

Definition at line 42 of file MicaBackdrop.h.

The documentation for this class was generated from the following files:
  • Materials/MicaBackdrop/MicaBackdrop.h
  • Materials/MicaBackdrop/MicaBackdrop.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MicaBackdrop::ControllerEntry Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MicaBackdrop
  • MicaBackdrop::ControllerEntry
Public Member Functions | Public Attributes

MicaBackdrop::ControllerEntry Class Reference

List of all members.

Public Member Functions

ControllerEntry (ICompositionSupportsSystemBackdrop target, MicaController controller, SystemBackdropConfiguration configuration)
ControllerEntry (const ControllerEntry &other)
~ControllerEntry ()
ControllerEntry & | operator= (const ControllerEntry &other)

Public Attributes

MicaController | m_controller
ICompositionSupportsSystemBackdrop | m_target

Detailed Description

Definition at line 28 of file MicaBackdrop.h.

Constructor & Destructor Documentation

ControllerEntry | ( | ICompositionSupportsSystemBackdrop | target,
 |  | MicaController | controller,
 |  | SystemBackdropConfiguration | configuration
 | ) |  |

Definition at line 45 of file MicaBackdrop.cpp.

    : m_target(target)
    , m_controller(controller)
{
    controller.AddSystemBackdropTarget(target);
    controller.SetSystemBackdropConfiguration(configuration);
}

~ControllerEntry ( )

Definition at line 53 of file MicaBackdrop.cpp.

{
    m_controller.RemoveSystemBackdropTarget(m_target);
    m_controller.Close();
    m_controller = nullptr;
}

ControllerEntry ( const ControllerEntry & other )

Member Function Documentation

ControllerEntry& operator= ( const ControllerEntry & other )

Member Data Documentation

MicaController m_controller

Definition at line 39 of file MicaBackdrop.h.

ICompositionSupportsSystemBackdrop m_target

Definition at line 38 of file MicaBackdrop.h.

The documentation for this class was generated from the following files:
  • Materials/MicaBackdrop/MicaBackdrop.h
  • Materials/MicaBackdrop/MicaBackdrop.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MicaBackdropProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

MicaBackdropProperties Class Reference

#include "MicaBackdrop.properties.h"

Inherited by MicaBackdrop.

List of all members.

Public Member Functions

MicaBackdropProperties ()
winrt::MicaKind | Kind ()
void | Kind (winrt::MicaKind const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | KindProperty ()
static void | OnKindPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Static Public Attributes

static GlobalDependencyProperty | s_KindProperty

Detailed Description

Definition at line 7 of file MicaBackdrop.properties.h.

Constructor & Destructor Documentation

MicaBackdropProperties ( )

Definition at line 18 of file MicaBackdrop.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file MicaBackdrop.properties.cpp.

{
    s_KindProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file MicaBackdrop.properties.cpp.

{
    if (!s_KindProperty)
    {
        s_KindProperty =
            InitializeDependencyProperty(
                L"Kind",
                winrt::name_of<winrt::MicaKind>(),
                winrt::name_of<winrt::MicaBackdrop>(),
                false /* isAttached */,
                ValueHelper<winrt::MicaKind>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnKindPropertyChanged));
    }
}

void Kind ( winrt::MicaKind const & value )

Definition at line 51 of file MicaBackdrop.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<MicaBackdrop*>(this)->SetValue(s_KindProperty, ValueHelper<winrt::MicaKind>::BoxValueIfNecessary(value));
    }
}

winrt::MicaKind Kind ( )

Definition at line 59 of file MicaBackdrop.properties.cpp.

{
    return ValueHelper<winrt::MicaKind>::CastOrUnbox(static_cast<MicaBackdrop*>(this)->GetValue(s_KindProperty));
}

static winrt::DependencyProperty KindProperty ( ) [inline, static]

Definition at line 15 of file MicaBackdrop.properties.h.

{ return s_KindProperty; }

void OnKindPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 43 of file MicaBackdrop.properties.cpp.

{
    auto owner = sender.as<winrt::MicaBackdrop>();
    winrt::get_self<MicaBackdrop>(owner)->OnPropertyChanged(args);
}

Member Data Documentation

GlobalDependencyProperty s_KindProperty [static]

Definition at line 17 of file MicaBackdrop.properties.h.

The documentation for this class was generated from the following files:
  • Generated/MicaBackdrop.properties.h
  • Generated/MicaBackdrop.properties.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AlphaMaskEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • AlphaMaskEffect
Public Member Functions

AlphaMaskEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1AlphaMask)
DECLARE_DUAL_SOURCES (Source, Mask)

Detailed Description

Definition at line 283 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1AlphaMask )
DECLARE_DUAL_SOURCES | ( | Source | ,
 |  | Mask |
 | ) |  |
The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ArithmeticCompositeEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ArithmeticCompositeEffect
Public Member Functions

ArithmeticCompositeEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1ArithmeticComposite)
DECLARE_DUAL_SOURCES (Source1, Source2)
DECLARE_NAMED_PROPERTY_MAPPING ({L"MultiplyAmount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX},{L"Source1Amount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY},{L"Source2Amount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ},{L"Offset", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW},{L"ClampOutput", D2D1_ARITHMETICCOMPOSITE_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Source1Amount, float, 0.0f, true)
DECLARE_POD_PROPERTY (ClampOutput, bool, false, true)
DECLARE_POD_PROPERTY (Offset, float, 0.0f, true)
DECLARE_POD_PROPERTY (Source2Amount, float, 0.0f, true)
DECLARE_POD_PROPERTY (MultiplyAmount, float, 1.0f, true)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 293 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1ArithmeticComposite )
DECLARE_DUAL_SOURCES | ( | Source1 | ,
 |  | Source2 |
 | ) |  |
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Source1Amount | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | ClampOutput | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | Offset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | Source2Amount | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | MultiplyAmount | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 314 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS:
                    {
                        float coefficients[4] = { m_MultiplyAmount, m_Source1Amount, m_Source2Amount, m_Offset };
                        return winrt::PropertyValue::CreateSingleArray({ coefficients });
                    }
                    case D2D1_ARITHMETICCOMPOSITE_PROP_CLAMP_OUTPUT:
                        return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
                    default:
                        throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 312 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 2; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BlendEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • BlendEffect
Public Member Functions

BlendEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Blend)
DECLARE_DUAL_SOURCES (Background, Foreground)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Mode", D2D1_BLEND_PROP_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Mode, winrt::BlendEffectMode, winrt::BlendEffectMode::Multiply, true)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 336 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Blend )
DECLARE_DUAL_SOURCES | ( | Background | ,
 |  | Foreground |
 | ) |  |
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Mode | ,
 |  | winrt::BlendEffectMode | ,
 |  | winrt::BlendEffectMode::Multiply | ,
 |  | true |
 | ) |  |
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 349 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_BLEND_PROP_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_Mode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 347 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BorderEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • BorderEffect
Public Member Functions

BorderEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Border)
DECLARE_NAMED_PROPERTY_MAPPING ({L"ExtendX", D2D1_BORDER_PROP_EDGE_MODE_X, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"ExtendY", D2D1_BORDER_PROP_EDGE_MODE_Y, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (ExtendY, winrt::CanvasEdgeBehavior, winrt::CanvasEdgeBehavior::Clamp, true)
DECLARE_POD_PROPERTY (ExtendX, winrt::CanvasEdgeBehavior, winrt::CanvasEdgeBehavior::Clamp, true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 364 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Border )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | ExtendY | ,
 |  | winrt::CanvasEdgeBehavior | ,
 |  | winrt::CanvasEdgeBehavior::Clamp | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | ExtendX | ,
 |  | winrt::CanvasEdgeBehavior | ,
 |  | winrt::CanvasEdgeBehavior::Clamp | ,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 379 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                case D2D1_BORDER_PROP_EDGE_MODE_X: return winrt::PropertyValue::CreateUInt32((UINT32)m_ExtendX);
                case D2D1_BORDER_PROP_EDGE_MODE_Y: return winrt::PropertyValue::CreateUInt32((UINT32)m_ExtendY);
                default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 377 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 2; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorMatrixEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ColorMatrixEffect
Public Member Functions

ColorMatrixEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1ColorMatrix)
DECLARE_NAMED_PROPERTY_MAPPING ({L"ColorMatrix", D2D1_COLORMATRIX_PROP_COLOR_MATRIX, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaMode", D2D1_COLORMATRIX_PROP_ALPHA_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE},{L"ClampOutput", D2D1_COLORMATRIX_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (AlphaMode, winrt::CanvasAlphaMode, winrt::CanvasAlphaMode::Premultiplied, value!=winrt::CanvasAlphaMode::Ignore)
DECLARE_POD_PROPERTY (ClampOutput, bool, false, true)
DECLARE_POD_PROPERTY (ColorMatrix, winrt::Matrix5x4,(winrt::Matrix5x4{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0}), true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 395 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1ColorMatrix )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | AlphaMode | ,
 |  | winrt::CanvasAlphaMode | ,
 |  | winrt::CanvasAlphaMode::Premultiplied | ,
 |  | value! | = winrt::CanvasAlphaMode::Ignore
 | ) |  |
DECLARE_POD_PROPERTY | ( | ClampOutput | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | ColorMatrix | ,
 |  | winrt::Matrix5x4 | ,
 |  | (winrt::Matrix5x4{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0}) | ,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 412 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_COLORMATRIX_PROP_COLOR_MATRIX: return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 20>&>(m_ColorMatrix));
                    case D2D1_COLORMATRIX_PROP_ALPHA_MODE:
                    {
                        switch (m_AlphaMode)
                        {
                            case winrt::CanvasAlphaMode::Premultiplied:
                                return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_PREMULTIPLIED);
                            case winrt::CanvasAlphaMode::Straight:
                                return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_STRAIGHT);
                        }
                        break;
                    }
                    case D2D1_COLORMATRIX_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
                }
                throw winrt::hresult_invalid_argument();
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 410 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 3; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSourceEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ColorSourceEffect
Public Member Functions

ColorSourceEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Flood)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Color", D2D1_FLOOD_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4})
DECLARE_POD_PROPERTY (Color, UIColor,(UIColor{255, 0, 0, 0}), true)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 439 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Flood )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Color | ,
 |  | UIColor | ,
 |  | (UIColor{255, 0, 0, 0}) | ,
 |  | true |
 | ) |  |
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 451 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_FLOOD_PROP_COLOR: return CreateColor<4>(m_Color);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 449 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CompositeStepEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • CompositeStepEffect
Public Member Functions

CompositeStepEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Composite)
DECLARE_DUAL_SOURCES (Destination, Source)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Mode", D2D1_COMPOSITE_PROP_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Mode, winrt::CanvasComposite, winrt::CanvasComposite::SourceOver, true)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 469 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Composite )
DECLARE_DUAL_SOURCES | ( | Destination | ,
 |  | Source |
 | ) |  |
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Mode | ,
 |  | winrt::CanvasComposite | ,
 |  | winrt::CanvasComposite::SourceOver | ,
 |  | true |
 | ) |  |
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 482 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_COMPOSITE_PROP_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_Mode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 480 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ContrastEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ContrastEffect
Public Member Functions

ContrastEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Contrast)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Contrast", D2D1_CONTRAST_PROP_CONTRAST, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"ClampSource", D2D1_CONTRAST_PROP_CLAMP_INPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (ClampSource, bool, false, true)
DECLARE_POD_PROPERTY (Contrast, float, 0.0f, value >=-1.0f &&value<=1.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 497 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Contrast )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | ClampSource | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | Contrast | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | value >=-1.0f &&value<=1. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 512 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_CONTRAST_PROP_CONTRAST: return winrt::PropertyValue::CreateSingle(m_Contrast);
                    case D2D1_CONTRAST_PROP_CLAMP_INPUT: return winrt::PropertyValue::CreateBoolean(m_ClampSource);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 510 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 2; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CrossFadeEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • CrossFadeEffect
Public Member Functions

CrossFadeEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1CrossFade)
DECLARE_DUAL_SOURCES (Source1, Source2)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Weight", D2D1_CROSSFADE_PROP_WEIGHT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Weight, float, 0.5f, value >=0.0f &&value<=1.0f)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 528 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1CrossFade )
DECLARE_DUAL_SOURCES | ( | Source1 | ,
 |  | Source2 |
 | ) |  |
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Weight | ,
 |  | float | ,
 |  | 0. | 5f,
 |  | value >=0.0f &&value<=1. | 0f
 | ) |  |
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 541 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_CROSSFADE_PROP_WEIGHT: return winrt::PropertyValue::CreateSingle(m_Weight);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 539 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DistantDiffuseEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • DistantDiffuseEffect
Public Member Functions

DistantDiffuseEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1DistantDiffuse)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Azimuth", D2D1_DISTANTDIFFUSE_PROP_AZIMUTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"Elevation", D2D1_DISTANTDIFFUSE_PROP_ELEVATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"DiffuseAmount", D2D1_DISTANTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_DISTANTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_DISTANTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_DISTANTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_DISTANTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},)
DECLARE_POD_PROPERTY (HeightMapKernelSize, winrt::float2,(winrt::float2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f)
DECLARE_POD_PROPERTY (DiffuseAmount, float, 1.0f, value >=0.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true)
DECLARE_POD_PROPERTY (Elevation, float, 0.0f, true)
DECLARE_POD_PROPERTY (LightColor, UIColor,(UIColor{255, 255, 255, 255}), true)
DECLARE_POD_PROPERTY (HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (Azimuth, float, 0.0f, true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 556 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1DistantDiffuse )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | HeightMapKernelSize | ,
 |  | winrt::float2 | ,
 |  | (winrt::float2{1.0f, 1.0f}) | ,
 |  | value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | DiffuseAmount | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=0.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapInterpolationMode | ,
 |  | winrt::CanvasImageInterpolation | ,
 |  | winrt::CanvasImageInterpolation::Linear | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | Elevation | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightColor | ,
 |  | UIColor | ,
 |  | (UIColor{255, 255, 255, 255}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapScale | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | Azimuth | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 582 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_DISTANTDIFFUSE_PROP_AZIMUTH: return winrt::PropertyValue::CreateSingle(m_Azimuth * k_DegreesPerRadian);
                    case D2D1_DISTANTDIFFUSE_PROP_ELEVATION: return winrt::PropertyValue::CreateSingle(m_Elevation * k_DegreesPerRadian);
                    case D2D1_DISTANTDIFFUSE_PROP_DIFFUSE_CONSTANT: return winrt::PropertyValue::CreateSingle(m_DiffuseAmount);
                    case D2D1_DISTANTDIFFUSE_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
                    case D2D1_DISTANTDIFFUSE_PROP_COLOR: return CreateColor<3>(m_LightColor);
                    case D2D1_DISTANTDIFFUSE_PROP_KERNEL_UNIT_LENGTH:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
                    case D2D1_DISTANTDIFFUSE_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 580 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 7; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DistantSpecularEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • DistantSpecularEffect
Public Member Functions

DistantSpecularEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1DistantSpecular)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Azimuth", D2D1_DISTANTSPECULAR_PROP_AZIMUTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"Elevation", D2D1_DISTANTSPECULAR_PROP_ELEVATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"SpecularExponent", D2D1_DISTANTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"SpecularAmount", D2D1_DISTANTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_DISTANTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_DISTANTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_DISTANTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_DISTANTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},)
DECLARE_POD_PROPERTY (LightColor, UIColor,(UIColor{255, 255, 255, 255}), true)
DECLARE_POD_PROPERTY (SpecularExponent, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true)
DECLARE_POD_PROPERTY (HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f)
DECLARE_POD_PROPERTY (Elevation, float, 0.0f, true)
DECLARE_POD_PROPERTY (HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (SpecularAmount, float, 1.0f, value >=0.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (Azimuth, float, 0.0f, true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 604 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1DistantSpecular )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | LightColor | ,
 |  | UIColor | ,
 |  | (UIColor{255, 255, 255, 255}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | SpecularExponent | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapInterpolationMode | ,
 |  | winrt::CanvasImageInterpolation | ,
 |  | winrt::CanvasImageInterpolation::Linear | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapKernelSize | ,
 |  | Vector2 | ,
 |  | (Vector2{1.0f, 1.0f}) | ,
 |  | value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | Elevation | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapScale | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | SpecularAmount | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=0.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | Azimuth | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 632 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_DISTANTSPECULAR_PROP_AZIMUTH: return winrt::PropertyValue::CreateSingle(m_Azimuth * k_DegreesPerRadian);
                    case D2D1_DISTANTSPECULAR_PROP_ELEVATION: return winrt::PropertyValue::CreateSingle(m_Elevation * k_DegreesPerRadian);
                    case D2D1_DISTANTSPECULAR_PROP_SPECULAR_EXPONENT: return winrt::PropertyValue::CreateSingle(m_SpecularExponent);
                    case D2D1_DISTANTSPECULAR_PROP_SPECULAR_CONSTANT: return winrt::PropertyValue::CreateSingle(m_SpecularAmount);
                    case D2D1_DISTANTSPECULAR_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
                    case D2D1_DISTANTSPECULAR_PROP_COLOR: return CreateColor<3>(m_LightColor);
                    case D2D1_DISTANTSPECULAR_PROP_KERNEL_UNIT_LENGTH:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
                    case D2D1_DISTANTSPECULAR_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 630 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 8; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EffectBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • EffectBase
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes

EffectBase Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Classes

struct | NamedProperty

Public Member Functions

IFACEMETHODIMP | GetNamedPropertyMapping (LPCWSTR, _Out_ UINT *, _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING *) override
IFACEMETHODIMP | GetProperty (UINT, _Outptr_ abi::IPropertyValue **) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override
IFACEMETHODIMP | GetSource (UINT, _Outptr_ abi::IGraphicsEffectSource **) override
IFACEMETHODIMP | GetSourceCount (_Out_ UINT *count) override
winrt::hstring | Name ()
void | Name (winrt::hstring const &value)

Public Attributes

winrt::hstring | m_Name

Protected Member Functions

HRESULT | GetNamedPropertyMappingImpl (_In_count_(mappingCount) const NamedProperty *namedProperties, UINT namedPropertyCount, LPCWSTR name, _Out_ UINT *index, _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING *mapping)

Static Protected Member Functions

template<UINT32 ComponentCount>
static winrt::IInspectable | CreateColor (UIColor color)
static HRESULT | UsePropertyFactory (_Outptr_ abi::IPropertyValue **value, std::function< winrt::IInspectable()> const &func)

Static Protected Attributes

static constexpr float | k_DegreesPerRadian = 180.0f / k_PI
static constexpr float | k_PI = 3.14159265358979f

Detailed Description

Definition at line 122 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

static winrt::IInspectable CreateColor ( UIColor color ) [inline, static, protected]

Definition at line 173 of file microsoft.ui.private.composition.effects_impl.h.

        {
            static_assert(ComponentCount == 3 || ComponentCount == 4, "Unexpected color component count.");
            float values[] = { color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f };
            return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, ComponentCount>&>(values));
        }

IFACEMETHODIMP GetNamedPropertyMapping | ( | LPCWSTR | ,
 |  | _Out_ UINT * | ,
 |  | _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING * |  |
 | ) |  |  | [inline, override]

Definition at line 156 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return E_INVALIDARG;
        }

HRESULT GetNamedPropertyMappingImpl | ( | _In_count_(mappingCount) const NamedProperty * | namedProperties,
 |  | UINT | namedPropertyCount,
 |  | LPCWSTR | name,
 |  | _Out_ UINT * | index,
 |  | _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING * | mapping |
 | ) |  |  | [inline, protected]

Definition at line 188 of file microsoft.ui.private.composition.effects_impl.h.

        {
            for (UINT i = 0; i < namedPropertyCount; ++i)
            {
                const auto& prop = namedProperties[i];
                if (_wcsicmp(name, prop.Name) == 0)
                {
                    *index = prop.Index;
                    *mapping = prop.Mapping;
                    return S_OK;
                }
            }
            return E_INVALIDARG;
        }

IFACEMETHODIMP GetProperty | ( | UINT | ,
 |  | _Outptr_ abi::IPropertyValue ** |  |
 | ) |  |  | [inline, override]

Definition at line 151 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return E_INVALIDARG;
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 144 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 0; return S_OK; }

IFACEMETHODIMP GetSource | ( | UINT | ,
 |  | _Outptr_ abi::IGraphicsEffectSource ** |  |
 | ) |  |  | [inline, override]

Definition at line 146 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return E_INVALIDARG;
        }

IFACEMETHODIMP GetSourceCount ( _Out_ UINT * count ) [inline, override]

Definition at line 143 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 0; return S_OK; }

void Name ( winrt::hstring const & value ) [inline]

Definition at line 140 of file microsoft.ui.private.composition.effects_impl.h.

{ m_Name = value; }

winrt::hstring Name ( ) [inline]

Definition at line 139 of file microsoft.ui.private.composition.effects_impl.h.

{ return m_Name; }

static HRESULT UsePropertyFactory | ( | _Outptr_ abi::IPropertyValue ** | value,
 |  | std::function< winrt::IInspectable()> const & | func |
 | ) |  |  | [inline, static, protected]

Definition at line 164 of file microsoft.ui.private.composition.effects_impl.h.

        {
            auto ret = func();
            auto propertyValue = ret.as<winrt::IPropertyValue>();
            to_winrt(*value) = propertyValue;
            MUX_CATCH_RETURN;
        }

Member Data Documentation

constexpr float k_DegreesPerRadian = 180.0f / k_PI [static, protected]

Definition at line 210 of file microsoft.ui.private.composition.effects_impl.h.

constexpr float k_PI = 3.14159265358979f [static, protected]

Definition at line 209 of file microsoft.ui.private.composition.effects_impl.h.

winrt::hstring m_Name

Definition at line 213 of file microsoft.ui.private.composition.effects_impl.h.

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EffectBase::NamedProperty Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • EffectBase
  • EffectBase::NamedProperty
Public Attributes

EffectBase::NamedProperty Struct Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Attributes

UINT | Index
GRAPHICS_EFFECT_PROPERTY_MAPPING Mapping
const wchar_t * | Name

Detailed Description

Definition at line 181 of file microsoft.ui.private.composition.effects_impl.h.

Member Data Documentation

UINT Index

Definition at line 184 of file microsoft.ui.private.composition.effects_impl.h.

GRAPHICS_EFFECT_PROPERTY_MAPPING Mapping

Definition at line 185 of file microsoft.ui.private.composition.effects_impl.h.

const wchar_t* Name

Definition at line 183 of file microsoft.ui.private.composition.effects_impl.h.

The documentation for this struct was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExposureEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ExposureEffect
Public Member Functions

ExposureEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Exposure)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Exposure", D2D1_EXPOSURE_PROP_EXPOSURE_VALUE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Exposure, float, 0.0f, value >=-2.0f &&value<=2.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 655 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Exposure )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Exposure | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | value >=-2.0f &&value<=2. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 668 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_EXPOSURE_PROP_EXPOSURE_VALUE: return winrt::PropertyValue::CreateSingle(m_Exposure);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 666 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GammaTransferEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • GammaTransferEffect
Public Member Functions

GammaTransferEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1GammaTransfer)
DECLARE_NAMED_PROPERTY_MAPPING ({L"RedAmplitude", D2D1_GAMMATRANSFER_PROP_RED_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"RedExponent", D2D1_GAMMATRANSFER_PROP_RED_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"RedOffset", D2D1_GAMMATRANSFER_PROP_RED_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"RedDisable", D2D1_GAMMATRANSFER_PROP_RED_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenAmplitude", D2D1_GAMMATRANSFER_PROP_GREEN_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenExponent", D2D1_GAMMATRANSFER_PROP_GREEN_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenOffset", D2D1_GAMMATRANSFER_PROP_GREEN_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenDisable", D2D1_GAMMATRANSFER_PROP_GREEN_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueAmplitude", D2D1_GAMMATRANSFER_PROP_BLUE_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueExponent", D2D1_GAMMATRANSFER_PROP_BLUE_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueOffset", D2D1_GAMMATRANSFER_PROP_BLUE_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueDisable", D2D1_GAMMATRANSFER_PROP_BLUE_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaAmplitude", D2D1_GAMMATRANSFER_PROP_ALPHA_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaExponent", D2D1_GAMMATRANSFER_PROP_ALPHA_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaOffset", D2D1_GAMMATRANSFER_PROP_ALPHA_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaDisable", D2D1_GAMMATRANSFER_PROP_ALPHA_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"ClampOutput", D2D1_GAMMATRANSFER_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (GreenExponent, float, 1.0f, true)
DECLARE_POD_PROPERTY (GreenDisable, bool, false, true)
DECLARE_POD_PROPERTY (ClampOutput, bool, false, true)
DECLARE_POD_PROPERTY (AlphaDisable, bool, false, true)
DECLARE_POD_PROPERTY (AlphaExponent, float, 1.0f, true)
DECLARE_POD_PROPERTY (AlphaOffset, float, 0.0f, true)
DECLARE_POD_PROPERTY (AlphaAmplitude, float, 1.0f, true)
DECLARE_POD_PROPERTY (BlueDisable, bool, false, true)
DECLARE_POD_PROPERTY (BlueOffset, float, 0.0f, true)
DECLARE_POD_PROPERTY (BlueExponent, float, 1.0f, true)
DECLARE_POD_PROPERTY (BlueAmplitude, float, 1.0f, true)
DECLARE_POD_PROPERTY (RedOffset, float, 0.0f, true)
DECLARE_POD_PROPERTY (GreenOffset, float, 0.0f, true)
DECLARE_POD_PROPERTY (RedExponent, float, 1.0f, true)
DECLARE_POD_PROPERTY (GreenAmplitude, float, 1.0f, true)
DECLARE_POD_PROPERTY (RedDisable, bool, false, true)
DECLARE_POD_PROPERTY (RedAmplitude, float, 1.0f, true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 683 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1GammaTransfer )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | GreenExponent | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | GreenDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | ClampOutput | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | AlphaDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | AlphaExponent | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | AlphaOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | AlphaAmplitude | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueExponent | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueAmplitude | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | RedOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | GreenOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | RedExponent | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | GreenAmplitude | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | RedDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | RedAmplitude | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 728 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_GAMMATRANSFER_PROP_RED_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_RedAmplitude);
                    case D2D1_GAMMATRANSFER_PROP_RED_EXPONENT: return winrt::PropertyValue::CreateSingle(m_RedExponent);
                    case D2D1_GAMMATRANSFER_PROP_RED_OFFSET: return winrt::PropertyValue::CreateSingle(m_RedOffset);
                    case D2D1_GAMMATRANSFER_PROP_RED_DISABLE: return winrt::PropertyValue::CreateBoolean(m_RedDisable);
                    case D2D1_GAMMATRANSFER_PROP_GREEN_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_GreenAmplitude);
                    case D2D1_GAMMATRANSFER_PROP_GREEN_EXPONENT: return winrt::PropertyValue::CreateSingle(m_GreenExponent);
                    case D2D1_GAMMATRANSFER_PROP_GREEN_OFFSET: return winrt::PropertyValue::CreateSingle(m_GreenOffset);
                    case D2D1_GAMMATRANSFER_PROP_GREEN_DISABLE: return winrt::PropertyValue::CreateBoolean(m_GreenDisable);
                    case D2D1_GAMMATRANSFER_PROP_BLUE_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_BlueAmplitude);
                    case D2D1_GAMMATRANSFER_PROP_BLUE_EXPONENT: return winrt::PropertyValue::CreateSingle(m_BlueExponent);
                    case D2D1_GAMMATRANSFER_PROP_BLUE_OFFSET: return winrt::PropertyValue::CreateSingle(m_BlueOffset);
                    case D2D1_GAMMATRANSFER_PROP_BLUE_DISABLE: return winrt::PropertyValue::CreateBoolean(m_BlueDisable);
                    case D2D1_GAMMATRANSFER_PROP_ALPHA_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_AlphaAmplitude);
                    case D2D1_GAMMATRANSFER_PROP_ALPHA_EXPONENT: return winrt::PropertyValue::CreateSingle(m_AlphaExponent);
                    case D2D1_GAMMATRANSFER_PROP_ALPHA_OFFSET: return winrt::PropertyValue::CreateSingle(m_AlphaOffset);
                    case D2D1_GAMMATRANSFER_PROP_ALPHA_DISABLE: return winrt::PropertyValue::CreateBoolean(m_AlphaDisable);
                    case D2D1_GAMMATRANSFER_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 726 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 17; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GaussianBlurEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • GaussianBlurEffect
Public Member Functions

GaussianBlurEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1GaussianBlur)
DECLARE_NAMED_PROPERTY_MAPPING ({L"BlurAmount", D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Optimization", D2D1_GAUSSIANBLUR_PROP_OPTIMIZATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BorderMode", D2D1_GAUSSIANBLUR_PROP_BORDER_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Optimization, winrt::EffectOptimization, winrt::EffectOptimization::Balanced, true)
DECLARE_POD_PROPERTY (BorderMode, winrt::EffectBorderMode, winrt::EffectBorderMode::Soft, true)
DECLARE_POD_PROPERTY (BlurAmount, float, 3.0f, value >=0.0f &&value<=250.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 758 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1GaussianBlur )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Optimization | ,
 |  | winrt::EffectOptimization | ,
 |  | winrt::EffectOptimization::Balanced | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BorderMode | ,
 |  | winrt::EffectBorderMode | ,
 |  | winrt::EffectBorderMode::Soft | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlurAmount | ,
 |  | float | ,
 |  | 3. | 0f,
 |  | value >=0.0f &&value<=250. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 775 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION: return winrt::PropertyValue::CreateSingle(m_BlurAmount);
                    case D2D1_GAUSSIANBLUR_PROP_OPTIMIZATION: return winrt::PropertyValue::CreateUInt32((UINT32)m_Optimization);
                    case D2D1_GAUSSIANBLUR_PROP_BORDER_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_BorderMode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 773 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 3; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GrayscaleEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • GrayscaleEffect
Public Member Functions

GrayscaleEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Grayscale)
DECLARE_SINGLE_SOURCE (Source)

Detailed Description

Definition at line 792 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Grayscale )
DECLARE_SINGLE_SOURCE ( Source )
The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: HueRotationEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • HueRotationEffect
Public Member Functions

HueRotationEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1HueRotation)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Angle", D2D1_HUEROTATION_PROP_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES})
DECLARE_POD_PROPERTY (Angle, float, 0.0f, true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 802 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1HueRotation )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Angle | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 815 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_HUEROTATION_PROP_ANGLE:
                        return winrt::PropertyValue::CreateSingle(m_Angle * k_DegreesPerRadian);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 813 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IAlphaMaskEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IAlphaMaskEffect
Public Member Functions

IAlphaMaskEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Mask ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Mask ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 126 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Mask ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Mask ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IArithmeticCompositeEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IArithmeticCompositeEffect
Public Member Functions

IArithmeticCompositeEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | ClampOutput ([out, retval] boolean *value)
HRESULT | ClampOutput ([in] boolean value)
HRESULT | MultiplyAmount ([in] float value)
HRESULT | MultiplyAmount ([out, retval] float *value)
HRESULT | Offset ([out, retval] float *value)
HRESULT | Offset ([in] float value)
HRESULT | Source1 ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source1 ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source1Amount ([out, retval] float *value)
HRESULT | Source1Amount ([in] float value)
HRESULT | Source2 ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source2 ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source2Amount ([in] float value)
HRESULT | Source2Amount ([out, retval] float *value)

Detailed Description

Definition at line 147 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT ClampOutput ( [out, retval] boolean * value ) [get]
HRESULT ClampOutput ( [in] boolean value ) [set]
HRESULT MultiplyAmount ( [in] float value ) [set]
HRESULT MultiplyAmount ( [out, retval] float * value ) [get]
HRESULT Offset ( [out, retval] float * value ) [get]
HRESULT Offset ( [in] float value ) [set]
HRESULT Source1 ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source1 ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source1Amount ( [out, retval] float * value ) [get]
HRESULT Source1Amount ( [in] float value ) [set]
HRESULT Source2 ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source2 ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source2Amount ( [in] float value ) [set]
HRESULT Source2Amount ( [out, retval] float * value ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IBlendEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IBlendEffect
Public Member Functions

IBlendEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Background ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Background ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Foreground ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Foreground ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Mode ([in] BlendEffectMode value)
HRESULT | Mode ([out, retval] BlendEffectMode *value)

Detailed Description

Definition at line 214 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Background ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Background ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Foreground ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Foreground ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Mode ( [in] BlendEffectMode value ) [set]
HRESULT Mode ( [out, retval] BlendEffectMode * value ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IBorderEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IBorderEffect
Public Member Functions

IBorderEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | ExtendX ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior *value)
HRESULT | ExtendX ([in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value)
HRESULT | ExtendY ([in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value)
HRESULT | ExtendY ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)

Detailed Description

Definition at line 238 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT ExtendX ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior * value ) [get]
HRESULT ExtendX ( [in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value ) [set]
HRESULT ExtendY ( [in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value ) [set]
HRESULT ExtendY ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IColorMatrixEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IColorMatrixEffect
Public Member Functions

IColorMatrixEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | AlphaMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode *value)
HRESULT | AlphaMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value)
HRESULT | ClampOutput ([out, retval] boolean *value)
HRESULT | ClampOutput ([in] boolean value)
HRESULT | ColorMatrix ([in] Matrix5x4 value)
HRESULT | ColorMatrix ([out, retval] Matrix5x4 *value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 262 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT AlphaMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode * value ) [get]
HRESULT AlphaMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value ) [set]
HRESULT ClampOutput ( [out, retval] boolean * value ) [get]
HRESULT ClampOutput ( [in] boolean value ) [set]
HRESULT ColorMatrix ( [in] Matrix5x4 value ) [set]
HRESULT ColorMatrix ( [out, retval] Matrix5x4 * value ) [get]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IColorSourceEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IColorSourceEffect
Public Member Functions

IColorSourceEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Color ([out, retval] Windows.UI.Color *value)
HRESULT | Color ([in] Windows.UI.Color value)

Detailed Description

Definition at line 289 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Color ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT Color ( [in] Windows.UI.Color value ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ICompositeStepEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ICompositeStepEffect
Public Member Functions

ICompositeStepEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Destination ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Destination ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Mode ([in] Microsoft.UI.Private.Composition.Effects.CanvasComposite value)
HRESULT | Mode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasComposite *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)

Detailed Description

Definition at line 308 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Destination ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Destination ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Mode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasComposite value ) [set]
HRESULT Mode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasComposite * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IContrastEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IContrastEffect
Public Member Functions

IContrastEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | ClampSource ([out, retval] boolean *value)
HRESULT | ClampSource ([in] boolean value)
HRESULT | Contrast ([in] float value)
HRESULT | Contrast ([out, retval] float *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)

Detailed Description

Definition at line 332 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT ClampSource ( [out, retval] boolean * value ) [get]
HRESULT ClampSource ( [in] boolean value ) [set]
HRESULT Contrast ( [in] float value ) [set]
HRESULT Contrast ( [out, retval] float * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ICrossFadeEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ICrossFadeEffect
Public Member Functions

ICrossFadeEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Source1 ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source1 ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source2 ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source2 ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Weight ([in] float value)
HRESULT | Weight ([out, retval] float *value)

Detailed Description

Definition at line 356 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Source1 ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source1 ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source2 ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source2 ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Weight ( [in] float value ) [set]
HRESULT Weight ( [out, retval] float * value ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IDistantDiffuseEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IDistantDiffuseEffect
Public Member Functions

IDistantDiffuseEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Azimuth ([out, retval] float *value)
HRESULT | Azimuth ([in] float value)
HRESULT | DiffuseAmount ([out, retval] float *value)
HRESULT | DiffuseAmount ([in] float value)
HRESULT | Elevation ([in] float value)
HRESULT | Elevation ([out, retval] float *value)
HRESULT | HeightMapInterpolationMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value)
HRESULT | HeightMapInterpolationMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value)
HRESULT | HeightMapKernelSize ([out, retval] Windows.Foundation.Numerics.Vector2 *value)
HRESULT | HeightMapKernelSize ([in] Windows.Foundation.Numerics.Vector2 value)
HRESULT | HeightMapScale ([in] float value)
HRESULT | HeightMapScale ([out, retval] float *value)
HRESULT | LightColor ([out, retval] Windows.UI.Color *value)
HRESULT | LightColor ([in] Windows.UI.Color value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 380 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Azimuth ( [out, retval] float * value ) [get]
HRESULT Azimuth ( [in] float value ) [set]
HRESULT DiffuseAmount ( [out, retval] float * value ) [get]
HRESULT DiffuseAmount ( [in] float value ) [set]
HRESULT Elevation ( [in] float value ) [set]
HRESULT Elevation ( [out, retval] float * value ) [get]
HRESULT HeightMapInterpolationMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation * value ) [get]
HRESULT HeightMapInterpolationMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value ) [set]
HRESULT HeightMapKernelSize ( [out, retval] Windows.Foundation.Numerics.Vector2 * value ) [get]
HRESULT HeightMapKernelSize ( [in] Windows.Foundation.Numerics.Vector2 value ) [set]
HRESULT HeightMapScale ( [in] float value ) [set]
HRESULT HeightMapScale ( [out, retval] float * value ) [get]
HRESULT LightColor ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT LightColor ( [in] Windows.UI.Color value ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IDistantSpecularEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IDistantSpecularEffect
Public Member Functions

IDistantSpecularEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Azimuth ([out, retval] float *value)
HRESULT | Azimuth ([in] float value)
HRESULT | Elevation ([in] float value)
HRESULT | Elevation ([out, retval] float *value)
HRESULT | HeightMapInterpolationMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value)
HRESULT | HeightMapInterpolationMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value)
HRESULT | HeightMapKernelSize ([out, retval] Windows.Foundation.Numerics.Vector2 *value)
HRESULT | HeightMapKernelSize ([in] Windows.Foundation.Numerics.Vector2 value)
HRESULT | HeightMapScale ([out, retval] float *value)
HRESULT | HeightMapScale ([in] float value)
HRESULT | LightColor ([out, retval] Windows.UI.Color *value)
HRESULT | LightColor ([in] Windows.UI.Color value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | SpecularAmount ([out, retval] float *value)
HRESULT | SpecularAmount ([in] float value)
HRESULT | SpecularExponent ([in] float value)
HRESULT | SpecularExponent ([out, retval] float *value)

Detailed Description

Definition at line 419 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Azimuth ( [out, retval] float * value ) [get]
HRESULT Azimuth ( [in] float value ) [set]
HRESULT Elevation ( [in] float value ) [set]
HRESULT Elevation ( [out, retval] float * value ) [get]
HRESULT HeightMapInterpolationMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value ) [set]
HRESULT HeightMapInterpolationMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation * value ) [get]
HRESULT HeightMapKernelSize ( [out, retval] Windows.Foundation.Numerics.Vector2 * value ) [get]
HRESULT HeightMapKernelSize ( [in] Windows.Foundation.Numerics.Vector2 value ) [set]
HRESULT HeightMapScale ( [out, retval] float * value ) [get]
HRESULT HeightMapScale ( [in] float value ) [set]
HRESULT LightColor ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT LightColor ( [in] Windows.UI.Color value ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT SpecularAmount ( [out, retval] float * value ) [get]
HRESULT SpecularAmount ( [in] float value ) [set]
HRESULT SpecularExponent ( [in] float value ) [set]
HRESULT SpecularExponent ( [out, retval] float * value ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IExposureEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IExposureEffect
Public Member Functions

IExposureEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Exposure ([out, retval] float *value)
HRESULT | Exposure ([in] float value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 461 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Exposure ( [out, retval] float * value ) [get]
HRESULT Exposure ( [in] float value ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IGammaTransferEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IGammaTransferEffect
Public Member Functions

IGammaTransferEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | AlphaAmplitude ([out, retval] float *value)
HRESULT | AlphaAmplitude ([in] float value)
HRESULT | AlphaDisable ([in] boolean value)
HRESULT | AlphaDisable ([out, retval] boolean *value)
HRESULT | AlphaExponent ([out, retval] float *value)
HRESULT | AlphaExponent ([in] float value)
HRESULT | AlphaOffset ([out, retval] float *value)
HRESULT | AlphaOffset ([in] float value)
HRESULT | BlueAmplitude ([in] float value)
HRESULT | BlueAmplitude ([out, retval] float *value)
HRESULT | BlueDisable ([out, retval] boolean *value)
HRESULT | BlueDisable ([in] boolean value)
HRESULT | BlueExponent ([out, retval] float *value)
HRESULT | BlueExponent ([in] float value)
HRESULT | BlueOffset ([out, retval] float *value)
HRESULT | BlueOffset ([in] float value)
HRESULT | ClampOutput ([out, retval] boolean *value)
HRESULT | ClampOutput ([in] boolean value)
HRESULT | GreenAmplitude ([out, retval] float *value)
HRESULT | GreenAmplitude ([in] float value)
HRESULT | GreenDisable ([in] boolean value)
HRESULT | GreenDisable ([out, retval] boolean *value)
HRESULT | GreenExponent ([out, retval] float *value)
HRESULT | GreenExponent ([in] float value)
HRESULT | GreenOffset ([out, retval] float *value)
HRESULT | GreenOffset ([in] float value)
HRESULT | RedAmplitude ([out, retval] float *value)
HRESULT | RedAmplitude ([in] float value)
HRESULT | RedDisable ([in] boolean value)
HRESULT | RedDisable ([out, retval] boolean *value)
HRESULT | RedExponent ([in] float value)
HRESULT | RedExponent ([out, retval] float *value)
HRESULT | RedOffset ([in] float value)
HRESULT | RedOffset ([out, retval] float *value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 482 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT AlphaAmplitude ( [out, retval] float * value ) [get]
HRESULT AlphaAmplitude ( [in] float value ) [set]
HRESULT AlphaDisable ( [in] boolean value ) [set]
HRESULT AlphaDisable ( [out, retval] boolean * value ) [get]
HRESULT AlphaExponent ( [out, retval] float * value ) [get]
HRESULT AlphaExponent ( [in] float value ) [set]
HRESULT AlphaOffset ( [out, retval] float * value ) [get]
HRESULT AlphaOffset ( [in] float value ) [set]
HRESULT BlueAmplitude ( [in] float value ) [set]
HRESULT BlueAmplitude ( [out, retval] float * value ) [get]
HRESULT BlueDisable ( [out, retval] boolean * value ) [get]
HRESULT BlueDisable ( [in] boolean value ) [set]
HRESULT BlueExponent ( [out, retval] float * value ) [get]
HRESULT BlueExponent ( [in] float value ) [set]
HRESULT BlueOffset ( [out, retval] float * value ) [get]
HRESULT BlueOffset ( [in] float value ) [set]
HRESULT ClampOutput ( [out, retval] boolean * value ) [get]
HRESULT ClampOutput ( [in] boolean value ) [set]
HRESULT GreenAmplitude ( [out, retval] float * value ) [get]
HRESULT GreenAmplitude ( [in] float value ) [set]
HRESULT GreenDisable ( [in] boolean value ) [set]
HRESULT GreenDisable ( [out, retval] boolean * value ) [get]
HRESULT GreenExponent ( [out, retval] float * value ) [get]
HRESULT GreenExponent ( [in] float value ) [set]
HRESULT GreenOffset ( [out, retval] float * value ) [get]
HRESULT GreenOffset ( [in] float value ) [set]
HRESULT RedAmplitude ( [out, retval] float * value ) [get]
HRESULT RedAmplitude ( [in] float value ) [set]
HRESULT RedDisable ( [in] boolean value ) [set]
HRESULT RedDisable ( [out, retval] boolean * value ) [get]
HRESULT RedExponent ( [in] float value ) [set]
HRESULT RedExponent ( [out, retval] float * value ) [get]
HRESULT RedOffset ( [in] float value ) [set]
HRESULT RedOffset ( [out, retval] float * value ) [get]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IGaussianBlurEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IGaussianBlurEffect
Public Member Functions

IGaussianBlurEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | BlurAmount ([out, retval] float *value)
HRESULT | BlurAmount ([in] float value)
HRESULT | BorderMode ([out, retval] EffectBorderMode *value)
HRESULT | BorderMode ([in] EffectBorderMode value)
HRESULT | Optimization ([in] EffectOptimization value)
HRESULT | Optimization ([out, retval] EffectOptimization *value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 551 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT BlurAmount ( [out, retval] float * value ) [get]
HRESULT BlurAmount ( [in] float value ) [set]
HRESULT BorderMode ( [out, retval] EffectBorderMode * value ) [get]
HRESULT BorderMode ( [in] EffectBorderMode value ) [set]
HRESULT Optimization ( [in] EffectOptimization value ) [set]
HRESULT Optimization ( [out, retval] EffectOptimization * value ) [get]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IGrayscaleEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IGrayscaleEffect
Public Member Functions

IGrayscaleEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 578 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IHueRotationEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IHueRotationEffect
Public Member Functions

IHueRotationEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Angle ([out, retval] float *value)
HRESULT | Angle ([in] float value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 596 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Angle ( [out, retval] float * value ) [get]
HRESULT Angle ( [in] float value ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IInvertEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IInvertEffect
Public Member Functions

IInvertEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 617 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ILinearTransferEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ILinearTransferEffect
Public Member Functions

ILinearTransferEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | AlphaDisable ([out, retval] boolean *value)
HRESULT | AlphaDisable ([in] boolean value)
HRESULT | AlphaOffset ([out, retval] float *value)
HRESULT | AlphaOffset ([in] float value)
HRESULT | AlphaSlope ([out, retval] float *value)
HRESULT | AlphaSlope ([in] float value)
HRESULT | BlueDisable ([in] boolean value)
HRESULT | BlueDisable ([out, retval] boolean *value)
HRESULT | BlueOffset ([out, retval] float *value)
HRESULT | BlueOffset ([in] float value)
HRESULT | BlueSlope ([in] float value)
HRESULT | BlueSlope ([out, retval] float *value)
HRESULT | ClampOutput ([out, retval] boolean *value)
HRESULT | ClampOutput ([in] boolean value)
HRESULT | GreenDisable ([in] boolean value)
HRESULT | GreenDisable ([out, retval] boolean *value)
HRESULT | GreenOffset ([out, retval] float *value)
HRESULT | GreenOffset ([in] float value)
HRESULT | GreenSlope ([out, retval] float *value)
HRESULT | GreenSlope ([in] float value)
HRESULT | RedDisable ([out, retval] boolean *value)
HRESULT | RedDisable ([in] boolean value)
HRESULT | RedOffset ([in] float value)
HRESULT | RedOffset ([out, retval] float *value)
HRESULT | RedSlope ([in] float value)
HRESULT | RedSlope ([out, retval] float *value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 635 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT AlphaDisable ( [out, retval] boolean * value ) [get]
HRESULT AlphaDisable ( [in] boolean value ) [set]
HRESULT AlphaOffset ( [out, retval] float * value ) [get]
HRESULT AlphaOffset ( [in] float value ) [set]
HRESULT AlphaSlope ( [out, retval] float * value ) [get]
HRESULT AlphaSlope ( [in] float value ) [set]
HRESULT BlueDisable ( [in] boolean value ) [set]
HRESULT BlueDisable ( [out, retval] boolean * value ) [get]
HRESULT BlueOffset ( [out, retval] float * value ) [get]
HRESULT BlueOffset ( [in] float value ) [set]
HRESULT BlueSlope ( [in] float value ) [set]
HRESULT BlueSlope ( [out, retval] float * value ) [get]
HRESULT ClampOutput ( [out, retval] boolean * value ) [get]
HRESULT ClampOutput ( [in] boolean value ) [set]
HRESULT GreenDisable ( [in] boolean value ) [set]
HRESULT GreenDisable ( [out, retval] boolean * value ) [get]
HRESULT GreenOffset ( [out, retval] float * value ) [get]
HRESULT GreenOffset ( [in] float value ) [set]
HRESULT GreenSlope ( [out, retval] float * value ) [get]
HRESULT GreenSlope ( [in] float value ) [set]
HRESULT RedDisable ( [out, retval] boolean * value ) [get]
HRESULT RedDisable ( [in] boolean value ) [set]
HRESULT RedOffset ( [in] float value ) [set]
HRESULT RedOffset ( [out, retval] float * value ) [get]
HRESULT RedSlope ( [in] float value ) [set]
HRESULT RedSlope ( [out, retval] float * value ) [get]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ILuminanceToAlphaEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ILuminanceToAlphaEffect
Public Member Functions

ILuminanceToAlphaEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 692 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InvertEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • InvertEffect
Public Member Functions

InvertEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Invert)
DECLARE_SINGLE_SOURCE (Source)

Detailed Description

Definition at line 831 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Invert )
DECLARE_SINGLE_SOURCE ( Source )
The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IOpacityEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IOpacityEffect
Public Member Functions

IOpacityEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Opacity ([out, retval] float *value)
HRESULT | Opacity ([in] float value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 710 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Opacity ( [out, retval] float * value ) [get]
HRESULT Opacity ( [in] float value ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IPointDiffuseEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IPointDiffuseEffect
Public Member Functions

IPointDiffuseEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | DiffuseAmount ([out, retval] float *value)
HRESULT | DiffuseAmount ([in] float value)
HRESULT | HeightMapInterpolationMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value)
HRESULT | HeightMapInterpolationMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value)
HRESULT | HeightMapKernelSize ([out, retval] Windows.Foundation.Numerics.Vector2 *value)
HRESULT | HeightMapKernelSize ([in] Windows.Foundation.Numerics.Vector2 value)
HRESULT | HeightMapScale ([out, retval] float *value)
HRESULT | HeightMapScale ([in] float value)
HRESULT | LightColor ([in] Windows.UI.Color value)
HRESULT | LightColor ([out, retval] Windows.UI.Color *value)
HRESULT | LightPosition ([in] Windows.Foundation.Numerics.Vector3 value)
HRESULT | LightPosition ([out, retval] Windows.Foundation.Numerics.Vector3 *value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 731 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT DiffuseAmount ( [out, retval] float * value ) [get]
HRESULT DiffuseAmount ( [in] float value ) [set]
HRESULT HeightMapInterpolationMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation * value ) [get]
HRESULT HeightMapInterpolationMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value ) [set]
HRESULT HeightMapKernelSize ( [out, retval] Windows.Foundation.Numerics.Vector2 * value ) [get]
HRESULT HeightMapKernelSize ( [in] Windows.Foundation.Numerics.Vector2 value ) [set]
HRESULT HeightMapScale ( [out, retval] float * value ) [get]
HRESULT HeightMapScale ( [in] float value ) [set]
HRESULT LightColor ( [in] Windows.UI.Color value ) [set]
HRESULT LightColor ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT LightPosition ( [in] Windows.Foundation.Numerics.Vector3 value ) [set]
HRESULT LightPosition ( [out, retval] Windows.Foundation.Numerics.Vector3 * value ) [get]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IPointSpecularEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IPointSpecularEffect
Public Member Functions

IPointSpecularEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | HeightMapInterpolationMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value)
HRESULT | HeightMapInterpolationMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value)
HRESULT | HeightMapKernelSize ([in] Windows.Foundation.Numerics.Vector2 value)
HRESULT | HeightMapKernelSize ([out, retval] Windows.Foundation.Numerics.Vector2 *value)
HRESULT | HeightMapScale ([out, retval] float *value)
HRESULT | HeightMapScale ([in] float value)
HRESULT | LightColor ([out, retval] Windows.UI.Color *value)
HRESULT | LightColor ([in] Windows.UI.Color value)
HRESULT | LightPosition ([in] Windows.Foundation.Numerics.Vector3 value)
HRESULT | LightPosition ([out, retval] Windows.Foundation.Numerics.Vector3 *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | SpecularAmount ([out, retval] float *value)
HRESULT | SpecularAmount ([in] float value)
HRESULT | SpecularExponent ([out, retval] float *value)
HRESULT | SpecularExponent ([in] float value)

Detailed Description

Definition at line 767 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT HeightMapInterpolationMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation * value ) [get]
HRESULT HeightMapInterpolationMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value ) [set]
HRESULT HeightMapKernelSize ( [in] Windows.Foundation.Numerics.Vector2 value ) [set]
HRESULT HeightMapKernelSize ( [out, retval] Windows.Foundation.Numerics.Vector2 * value ) [get]
HRESULT HeightMapScale ( [out, retval] float * value ) [get]
HRESULT HeightMapScale ( [in] float value ) [set]
HRESULT LightColor ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT LightColor ( [in] Windows.UI.Color value ) [set]
HRESULT LightPosition ( [in] Windows.Foundation.Numerics.Vector3 value ) [set]
HRESULT LightPosition ( [out, retval] Windows.Foundation.Numerics.Vector3 * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT SpecularAmount ( [out, retval] float * value ) [get]
HRESULT SpecularAmount ( [in] float value ) [set]
HRESULT SpecularExponent ( [out, retval] float * value ) [get]
HRESULT SpecularExponent ( [in] float value ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IPosterizeEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IPosterizeEffect
Public Member Functions

IPosterizeEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | BlueValueCount ([out, retval] INT32 *value)
HRESULT | BlueValueCount ([in] INT32 value)
HRESULT | GreenValueCount ([out, retval] INT32 *value)
HRESULT | GreenValueCount ([in] INT32 value)
HRESULT | RedValueCount ([in] INT32 value)
HRESULT | RedValueCount ([out, retval] INT32 *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)

Detailed Description

Definition at line 806 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT BlueValueCount ( [out, retval] INT32 * value ) [get]
HRESULT BlueValueCount ( [in] INT32 value ) [set]
HRESULT GreenValueCount ( [out, retval] INT32 * value ) [get]
HRESULT GreenValueCount ( [in] INT32 value ) [set]
HRESULT RedValueCount ( [in] INT32 value ) [set]
HRESULT RedValueCount ( [out, retval] INT32 * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IPremultiplyEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IPremultiplyEffect
Public Member Functions

IPremultiplyEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 833 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ISaturationEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ISaturationEffect
Public Member Functions

ISaturationEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Saturation ([out, retval] float *value)
HRESULT | Saturation ([in] float value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 851 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Saturation ( [out, retval] float * value ) [get]
HRESULT Saturation ( [in] float value ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ISepiaEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ISepiaEffect
Public Member Functions

ISepiaEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | AlphaMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode *value)
HRESULT | AlphaMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value)
HRESULT | Intensity ([in] float value)
HRESULT | Intensity ([out, retval] float *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)

Detailed Description

Definition at line 872 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT AlphaMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode * value ) [get]
HRESULT AlphaMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value ) [set]
HRESULT Intensity ( [in] float value ) [set]
HRESULT Intensity ( [out, retval] float * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ISpotDiffuseEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ISpotDiffuseEffect
Public Member Functions

ISpotDiffuseEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | DiffuseAmount ([out, retval] float *value)
HRESULT | DiffuseAmount ([in] float value)
HRESULT | Focus ([out, retval] float *value)
HRESULT | Focus ([in] float value)
HRESULT | HeightMapInterpolationMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value)
HRESULT | HeightMapInterpolationMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value)
HRESULT | HeightMapKernelSize ([in] Windows.Foundation.Numerics.Vector2 value)
HRESULT | HeightMapKernelSize ([out, retval] Windows.Foundation.Numerics.Vector2 *value)
HRESULT | HeightMapScale ([out, retval] float *value)
HRESULT | HeightMapScale ([in] float value)
HRESULT | LightColor ([out, retval] Windows.UI.Color *value)
HRESULT | LightColor ([in] Windows.UI.Color value)
HRESULT | LightPosition ([out, retval] Windows.Foundation.Numerics.Vector3 *value)
HRESULT | LightPosition ([in] Windows.Foundation.Numerics.Vector3 value)
HRESULT | LightTarget ([in] Windows.Foundation.Numerics.Vector3 value)
HRESULT | LightTarget ([out, retval] Windows.Foundation.Numerics.Vector3 *value)
HRESULT | LimitingConeAngle ([out, retval] float *value)
HRESULT | LimitingConeAngle ([in] float value)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 896 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT DiffuseAmount ( [out, retval] float * value ) [get]
HRESULT DiffuseAmount ( [in] float value ) [set]
HRESULT Focus ( [out, retval] float * value ) [get]
HRESULT Focus ( [in] float value ) [set]
HRESULT HeightMapInterpolationMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation * value ) [get]
HRESULT HeightMapInterpolationMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value ) [set]
HRESULT HeightMapKernelSize ( [in] Windows.Foundation.Numerics.Vector2 value ) [set]
HRESULT HeightMapKernelSize ( [out, retval] Windows.Foundation.Numerics.Vector2 * value ) [get]
HRESULT HeightMapScale ( [out, retval] float * value ) [get]
HRESULT HeightMapScale ( [in] float value ) [set]
HRESULT LightColor ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT LightColor ( [in] Windows.UI.Color value ) [set]
HRESULT LightPosition ( [out, retval] Windows.Foundation.Numerics.Vector3 * value ) [get]
HRESULT LightPosition ( [in] Windows.Foundation.Numerics.Vector3 value ) [set]
HRESULT LightTarget ( [in] Windows.Foundation.Numerics.Vector3 value ) [set]
HRESULT LightTarget ( [out, retval] Windows.Foundation.Numerics.Vector3 * value ) [get]
HRESULT LimitingConeAngle ( [out, retval] float * value ) [get]
HRESULT LimitingConeAngle ( [in] float value ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ISpotSpecularEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ISpotSpecularEffect
Public Member Functions

ISpotSpecularEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Focus ([out, retval] float *value)
HRESULT | Focus ([in] float value)
HRESULT | HeightMapInterpolationMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value)
HRESULT | HeightMapInterpolationMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value)
HRESULT | HeightMapKernelSize ([out, retval] Windows.Foundation.Numerics.Vector2 *value)
HRESULT | HeightMapKernelSize ([in] Windows.Foundation.Numerics.Vector2 value)
HRESULT | HeightMapScale ([out, retval] float *value)
HRESULT | HeightMapScale ([in] float value)
HRESULT | LightColor ([in] Windows.UI.Color value)
HRESULT | LightColor ([out, retval] Windows.UI.Color *value)
HRESULT | LightPosition ([out, retval] Windows.Foundation.Numerics.Vector3 *value)
HRESULT | LightPosition ([in] Windows.Foundation.Numerics.Vector3 value)
HRESULT | LightTarget ([in] Windows.Foundation.Numerics.Vector3 value)
HRESULT | LightTarget ([out, retval] Windows.Foundation.Numerics.Vector3 *value)
HRESULT | LimitingConeAngle ([out, retval] float *value)
HRESULT | LimitingConeAngle ([in] float value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | SpecularAmount ([in] float value)
HRESULT | SpecularAmount ([out, retval] float *value)
HRESULT | SpecularExponent ([out, retval] float *value)
HRESULT | SpecularExponent ([in] float value)

Detailed Description

Definition at line 941 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Focus ( [out, retval] float * value ) [get]
HRESULT Focus ( [in] float value ) [set]
HRESULT HeightMapInterpolationMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation * value ) [get]
HRESULT HeightMapInterpolationMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value ) [set]
HRESULT HeightMapKernelSize ( [out, retval] Windows.Foundation.Numerics.Vector2 * value ) [get]
HRESULT HeightMapKernelSize ( [in] Windows.Foundation.Numerics.Vector2 value ) [set]
HRESULT HeightMapScale ( [out, retval] float * value ) [get]
HRESULT HeightMapScale ( [in] float value ) [set]
HRESULT LightColor ( [in] Windows.UI.Color value ) [set]
HRESULT LightColor ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT LightPosition ( [out, retval] Windows.Foundation.Numerics.Vector3 * value ) [get]
HRESULT LightPosition ( [in] Windows.Foundation.Numerics.Vector3 value ) [set]
HRESULT LightTarget ( [in] Windows.Foundation.Numerics.Vector3 value ) [set]
HRESULT LightTarget ( [out, retval] Windows.Foundation.Numerics.Vector3 * value ) [get]
HRESULT LimitingConeAngle ( [out, retval] float * value ) [get]
HRESULT LimitingConeAngle ( [in] float value ) [set]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT SpecularAmount ( [in] float value ) [set]
HRESULT SpecularAmount ( [out, retval] float * value ) [get]
HRESULT SpecularExponent ( [out, retval] float * value ) [get]
HRESULT SpecularExponent ( [in] float value ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ITemperatureAndTintEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ITemperatureAndTintEffect
Public Member Functions

ITemperatureAndTintEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Temperature ([in] float value)
HRESULT | Temperature ([out, retval] float *value)
HRESULT | Tint ([out, retval] float *value)
HRESULT | Tint ([in] float value)

Detailed Description

Definition at line 989 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Temperature ( [in] float value ) [set]
HRESULT Temperature ( [out, retval] float * value ) [get]
HRESULT Tint ( [out, retval] float * value ) [get]
HRESULT Tint ( [in] float value ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ITintEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ITintEffect
Public Member Functions

ITintEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | ClampOutput ([out, retval] boolean *value)
HRESULT | ClampOutput ([in] boolean value)
HRESULT | Color ([in] Windows.UI.Color value)
HRESULT | Color ([out, retval] Windows.UI.Color *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)

Detailed Description

Definition at line 1013 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT ClampOutput ( [out, retval] boolean * value ) [get]
HRESULT ClampOutput ( [in] boolean value ) [set]
HRESULT Color ( [in] Windows.UI.Color value ) [set]
HRESULT Color ( [out, retval] Windows.UI.Color * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ITransform2DEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • ITransform2DEffect
Public Member Functions

ITransform2DEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | BorderMode ([out, retval] EffectBorderMode *value)
HRESULT | BorderMode ([in] EffectBorderMode value)
HRESULT | InterpolationMode ([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value)
HRESULT | InterpolationMode ([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value)
HRESULT | Sharpness ([in] float value)
HRESULT | Sharpness ([out, retval] float *value)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)
HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | TransformMatrix ([in] Windows.Foundation.Numerics.Matrix3x2 value)
HRESULT | TransformMatrix ([out, retval] Windows.Foundation.Numerics.Matrix3x2 *value)

Detailed Description

Definition at line 1037 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT BorderMode ( [out, retval] EffectBorderMode * value ) [get]
HRESULT BorderMode ( [in] EffectBorderMode value ) [set]
HRESULT InterpolationMode ( [in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value ) [set]
HRESULT InterpolationMode ( [out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation * value ) [get]
HRESULT Sharpness ( [in] float value ) [set]
HRESULT Sharpness ( [out, retval] float * value ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT TransformMatrix ( [in] Windows.Foundation.Numerics.Matrix3x2 value ) [set]
HRESULT TransformMatrix ( [out, retval] Windows.Foundation.Numerics.Matrix3x2 * value ) [get]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IUnPremultiplyEffect Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • IUnPremultiplyEffect
Public Member Functions

IUnPremultiplyEffect Interface Reference

import "microsoft.ui.private.composition.effects.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

HRESULT | Source ([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source)
HRESULT | Source ([in] Windows.Graphics.Effects.IGraphicsEffectSource *source)

Detailed Description

Definition at line 1067 of file microsoft.ui.private.composition.effects.idl.

Member Function Documentation

HRESULT Source ( [out, retval] Windows.Graphics.Effects.IGraphicsEffectSource ** source ) [get]
HRESULT Source ( [in] Windows.Graphics.Effects.IGraphicsEffectSource * source ) [set]
The documentation for this interface was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinearTransferEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • LinearTransferEffect
Public Member Functions

LinearTransferEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1LinearTransfer)
DECLARE_NAMED_PROPERTY_MAPPING ({L"RedOffset", D2D1_LINEARTRANSFER_PROP_RED_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"RedSlope", D2D1_LINEARTRANSFER_PROP_RED_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"RedDisable", D2D1_LINEARTRANSFER_PROP_RED_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenOffset", D2D1_LINEARTRANSFER_PROP_GREEN_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenSlope", D2D1_LINEARTRANSFER_PROP_GREEN_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenDisable", D2D1_LINEARTRANSFER_PROP_GREEN_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueOffset", D2D1_LINEARTRANSFER_PROP_BLUE_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueSlope", D2D1_LINEARTRANSFER_PROP_BLUE_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueDisable", D2D1_LINEARTRANSFER_PROP_BLUE_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaOffset", D2D1_LINEARTRANSFER_PROP_ALPHA_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaSlope", D2D1_LINEARTRANSFER_PROP_ALPHA_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaDisable", D2D1_LINEARTRANSFER_PROP_ALPHA_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"ClampOutput", D2D1_LINEARTRANSFER_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (RedSlope, float, 1.0f, true)
DECLARE_POD_PROPERTY (GreenDisable, bool, false, true)
DECLARE_POD_PROPERTY (ClampOutput, bool, false, true)
DECLARE_POD_PROPERTY (AlphaDisable, bool, false, true)
DECLARE_POD_PROPERTY (AlphaSlope, float, 1.0f, true)
DECLARE_POD_PROPERTY (AlphaOffset, float, 0.0f, true)
DECLARE_POD_PROPERTY (BlueDisable, bool, false, true)
DECLARE_POD_PROPERTY (BlueSlope, float, 1.0f, true)
DECLARE_POD_PROPERTY (BlueOffset, float, 0.0f, true)
DECLARE_POD_PROPERTY (RedDisable, bool, false, true)
DECLARE_POD_PROPERTY (GreenSlope, float, 1.0f, true)
DECLARE_POD_PROPERTY (GreenOffset, float, 0.0f, true)
DECLARE_POD_PROPERTY (RedOffset, float, 0.0f, true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 841 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1LinearTransfer )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | RedSlope | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | GreenDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | ClampOutput | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | AlphaDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | AlphaSlope | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | AlphaOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueSlope | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | RedDisable | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | GreenSlope | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | GreenOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | RedOffset | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 878 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_LINEARTRANSFER_PROP_RED_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_RedOffset);
                    case D2D1_LINEARTRANSFER_PROP_RED_SLOPE: return winrt::PropertyValue::CreateSingle(m_RedSlope);
                    case D2D1_LINEARTRANSFER_PROP_RED_DISABLE: return winrt::PropertyValue::CreateBoolean(m_RedDisable);
                    case D2D1_LINEARTRANSFER_PROP_GREEN_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_GreenOffset);
                    case D2D1_LINEARTRANSFER_PROP_GREEN_SLOPE: return winrt::PropertyValue::CreateSingle(m_GreenSlope);
                    case D2D1_LINEARTRANSFER_PROP_GREEN_DISABLE: return winrt::PropertyValue::CreateBoolean(m_GreenDisable);
                    case D2D1_LINEARTRANSFER_PROP_BLUE_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_BlueOffset);
                    case D2D1_LINEARTRANSFER_PROP_BLUE_SLOPE: return winrt::PropertyValue::CreateSingle(m_BlueSlope);
                    case D2D1_LINEARTRANSFER_PROP_BLUE_DISABLE: return winrt::PropertyValue::CreateBoolean(m_BlueDisable);
                    case D2D1_LINEARTRANSFER_PROP_ALPHA_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_AlphaOffset);
                    case D2D1_LINEARTRANSFER_PROP_ALPHA_SLOPE: return winrt::PropertyValue::CreateSingle(m_AlphaSlope);
                    case D2D1_LINEARTRANSFER_PROP_ALPHA_DISABLE: return winrt::PropertyValue::CreateBoolean(m_AlphaDisable);
                    case D2D1_LINEARTRANSFER_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 876 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 13; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LuminanceToAlphaEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • LuminanceToAlphaEffect
Public Member Functions

LuminanceToAlphaEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1LuminanceToAlpha)
DECLARE_SINGLE_SOURCE (Source)

Detailed Description

Definition at line 905 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1LuminanceToAlpha )
DECLARE_SINGLE_SOURCE ( Source )
The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Matrix5x4 Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • Matrix5x4
Public Attributes

Matrix5x4 Struct Reference

import "microsoft.ui.private.composition.effects.idl";

List of all members.

Public Attributes

float | M11
float | M12
float | M13
float | M14
float | M21
float | M22
float | M23
float | M24
float | M31
float | M32
float | M33
float | M34
float | M41
float | M42
float | M43
float | M44
float | M51
float | M52
float | M53
float | M54

Detailed Description

Definition at line 110 of file microsoft.ui.private.composition.effects.idl.

Member Data Documentation

float M11

Definition at line 112 of file microsoft.ui.private.composition.effects.idl.

float M12

Definition at line 112 of file microsoft.ui.private.composition.effects.idl.

float M13

Definition at line 112 of file microsoft.ui.private.composition.effects.idl.

float M14

Definition at line 112 of file microsoft.ui.private.composition.effects.idl.

float M21

Definition at line 113 of file microsoft.ui.private.composition.effects.idl.

float M22

Definition at line 113 of file microsoft.ui.private.composition.effects.idl.

float M23

Definition at line 113 of file microsoft.ui.private.composition.effects.idl.

float M24

Definition at line 113 of file microsoft.ui.private.composition.effects.idl.

float M31

Definition at line 114 of file microsoft.ui.private.composition.effects.idl.

float M32

Definition at line 114 of file microsoft.ui.private.composition.effects.idl.

float M33

Definition at line 114 of file microsoft.ui.private.composition.effects.idl.

float M34

Definition at line 114 of file microsoft.ui.private.composition.effects.idl.

float M41

Definition at line 115 of file microsoft.ui.private.composition.effects.idl.

float M42

Definition at line 115 of file microsoft.ui.private.composition.effects.idl.

float M43

Definition at line 115 of file microsoft.ui.private.composition.effects.idl.

float M44

Definition at line 115 of file microsoft.ui.private.composition.effects.idl.

float M51

Definition at line 116 of file microsoft.ui.private.composition.effects.idl.

float M52

Definition at line 116 of file microsoft.ui.private.composition.effects.idl.

float M53

Definition at line 116 of file microsoft.ui.private.composition.effects.idl.

float M54

Definition at line 116 of file microsoft.ui.private.composition.effects.idl.

The documentation for this struct was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: OpacityEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • OpacityEffect
Public Member Functions

OpacityEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Opacity)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Opacity", D2D1_OPACITY_PROP_OPACITY, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Opacity, float, 1.0f, value >=0.0f &&value<=1.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 915 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Opacity )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Opacity | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=0.0f &&value<=1. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 928 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_OPACITY_PROP_OPACITY: return winrt::PropertyValue::CreateSingle(m_Opacity);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 926 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PointDiffuseEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • PointDiffuseEffect
Public Member Functions

PointDiffuseEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1PointDiffuse)
DECLARE_NAMED_PROPERTY_MAPPING ({L"LightPosition", D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"DiffuseAmount", D2D1_POINTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_POINTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_POINTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_POINTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_POINTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},)
DECLARE_POD_PROPERTY (DiffuseAmount, float, 1.0f, value >=0.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true)
DECLARE_POD_PROPERTY (HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f)
DECLARE_POD_PROPERTY (LightColor, UIColor,(UIColor{255, 255, 255, 255}), true)
DECLARE_POD_PROPERTY (LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 943 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1PointDiffuse )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | DiffuseAmount | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=0.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapInterpolationMode | ,
 |  | winrt::CanvasImageInterpolation | ,
 |  | winrt::CanvasImageInterpolation::Linear | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapScale | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapKernelSize | ,
 |  | Vector2 | ,
 |  | (Vector2{1.0f, 1.0f}) | ,
 |  | value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightColor | ,
 |  | UIColor | ,
 |  | (UIColor{255, 255, 255, 255}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightPosition | ,
 |  | Vector3 | ,
 |  | (Vector3{0.0f, 0.0f, 0.0f}) | ,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 967 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
                    case D2D1_POINTDIFFUSE_PROP_DIFFUSE_CONSTANT: return winrt::PropertyValue::CreateSingle(m_DiffuseAmount);
                    case D2D1_POINTDIFFUSE_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
                    case D2D1_POINTDIFFUSE_PROP_COLOR: return CreateColor<3>(m_LightColor);
                    case D2D1_POINTDIFFUSE_PROP_KERNEL_UNIT_LENGTH:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
                    case D2D1_POINTDIFFUSE_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 965 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 6; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PointSpecularEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • PointSpecularEffect
Public Member Functions

PointSpecularEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1PointSpecular)
DECLARE_NAMED_PROPERTY_MAPPING ({L"LightPosition", D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"SpecularExponent", D2D1_POINTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"SpecularAmount", D2D1_POINTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_POINTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_POINTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_POINTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_POINTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},)
DECLARE_POD_PROPERTY (HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f)
DECLARE_POD_PROPERTY (SpecularAmount, float, 1.0f, value >=0.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true)
DECLARE_POD_PROPERTY (SpecularExponent, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (LightColor, UIColor,(UIColor{255, 255, 255, 255}), true)
DECLARE_POD_PROPERTY (HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 989 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1PointSpecular )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | HeightMapKernelSize | ,
 |  | Vector2 | ,
 |  | (Vector2{1.0f, 1.0f}) | ,
 |  | value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | SpecularAmount | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=0.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapInterpolationMode | ,
 |  | winrt::CanvasImageInterpolation | ,
 |  | winrt::CanvasImageInterpolation::Linear | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | SpecularExponent | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightColor | ,
 |  | UIColor | ,
 |  | (UIColor{255, 255, 255, 255}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapScale | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightPosition | ,
 |  | Vector3 | ,
 |  | (Vector3{0.0f, 0.0f, 0.0f}) | ,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1015 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
                    case D2D1_POINTSPECULAR_PROP_SPECULAR_EXPONENT: return winrt::PropertyValue::CreateSingle(m_SpecularExponent);
                    case D2D1_POINTSPECULAR_PROP_SPECULAR_CONSTANT: return winrt::PropertyValue::CreateSingle(m_SpecularAmount);
                    case D2D1_POINTSPECULAR_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
                    case D2D1_POINTSPECULAR_PROP_COLOR: return CreateColor<3>(m_LightColor);
                    case D2D1_POINTSPECULAR_PROP_KERNEL_UNIT_LENGTH:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
                    case D2D1_POINTSPECULAR_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1013 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 7; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PosterizeEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • PosterizeEffect
Public Member Functions

PosterizeEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Posterize)
DECLARE_NAMED_PROPERTY_MAPPING ({L"RedValueCount", D2D1_POSTERIZE_PROP_RED_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenValueCount", D2D1_POSTERIZE_PROP_GREEN_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueValueCount", D2D1_POSTERIZE_PROP_BLUE_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (GreenValueCount, int, 4, value >=2 &&value<=16)
DECLARE_POD_PROPERTY (BlueValueCount, int, 4, value >=2 &&value<=16)
DECLARE_POD_PROPERTY (RedValueCount, int, 4, value >=2 &&value<=16)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1038 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Posterize )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | GreenValueCount | ,
 |  | int | ,
 |  | 4 | ,
 |  | value >=2 &&value<= | 16
 | ) |  |
DECLARE_POD_PROPERTY | ( | BlueValueCount | ,
 |  | int | ,
 |  | 4 | ,
 |  | value >=2 &&value<= | 16
 | ) |  |
DECLARE_POD_PROPERTY | ( | RedValueCount | ,
 |  | int | ,
 |  | 4 | ,
 |  | value >=2 &&value<= | 16
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1055 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_POSTERIZE_PROP_RED_VALUE_COUNT: return winrt::PropertyValue::CreateInt32(m_RedValueCount);
                    case D2D1_POSTERIZE_PROP_GREEN_VALUE_COUNT: return winrt::PropertyValue::CreateInt32(m_GreenValueCount);
                    case D2D1_POSTERIZE_PROP_BLUE_VALUE_COUNT: return winrt::PropertyValue::CreateInt32(m_BlueValueCount);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1053 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PremultiplyEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • PremultiplyEffect
Public Member Functions

PremultiplyEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Premultiply)
DECLARE_SINGLE_SOURCE (Source)

Detailed Description

Definition at line 1072 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Premultiply )
DECLARE_SINGLE_SOURCE ( Source )
The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SaturationEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • SaturationEffect
Public Member Functions

SaturationEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Saturation)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Saturation", D2D1_SATURATION_PROP_SATURATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Saturation, float, 0.5f, value >=0.0f &&value<=2.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1082 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Saturation )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Saturation | ,
 |  | float | ,
 |  | 0. | 5f,
 |  | value >=0.0f &&value<=2. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1095 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_SATURATION_PROP_SATURATION: return winrt::PropertyValue::CreateSingle(m_Saturation);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1093 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 1; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SepiaEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • SepiaEffect
Public Member Functions

SepiaEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Sepia)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Intensity", D2D1_SEPIA_PROP_INTENSITY, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaMode", D2D1_SEPIA_PROP_ALPHA_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE})
DECLARE_POD_PROPERTY (AlphaMode, winrt::CanvasAlphaMode, winrt::CanvasAlphaMode::Premultiplied, value!=winrt::CanvasAlphaMode::Ignore)
DECLARE_POD_PROPERTY (Intensity, float, 0.5f, value >=0.0f &&value<=1.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1110 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Sepia )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | AlphaMode | ,
 |  | winrt::CanvasAlphaMode | ,
 |  | winrt::CanvasAlphaMode::Premultiplied | ,
 |  | value! | = winrt::CanvasAlphaMode::Ignore
 | ) |  |
DECLARE_POD_PROPERTY | ( | Intensity | ,
 |  | float | ,
 |  | 0. | 5f,
 |  | value >=0.0f &&value<=1. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1125 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_SEPIA_PROP_INTENSITY: return winrt::PropertyValue::CreateSingle(m_Intensity);
                    case D2D1_SEPIA_PROP_ALPHA_MODE:
                    {
                        switch (m_AlphaMode)
                        {
                            case winrt::CanvasAlphaMode::Premultiplied:
                                return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_PREMULTIPLIED);
                            case winrt::CanvasAlphaMode::Straight:
                                return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_STRAIGHT);
                        }
                        break;
                    }
                }
                throw winrt::hresult_invalid_argument();
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1123 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 2; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpotDiffuseEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • SpotDiffuseEffect
Public Member Functions

SpotDiffuseEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1SpotDiffuse)
DECLARE_NAMED_PROPERTY_MAPPING ({L"LightPosition", D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightTarget", D2D1_SPOTDIFFUSE_PROP_POINTS_AT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Focus", D2D1_SPOTDIFFUSE_PROP_FOCUS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LimitingConeAngle", D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"DiffuseAmount", D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_SPOTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_SPOTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},)
DECLARE_POD_PROPERTY (LightTarget, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true)
DECLARE_POD_PROPERTY (HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true)
DECLARE_POD_PROPERTY (HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f)
DECLARE_POD_PROPERTY (LightColor, UIColor,(UIColor{255, 255, 255, 255}), true)
DECLARE_POD_PROPERTY (Focus, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (DiffuseAmount, float, 1.0f, value >=0.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (LimitingConeAngle, float, k_PI/2.0f, true)
DECLARE_POD_PROPERTY (LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1151 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1SpotDiffuse )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | LightTarget | ,
 |  | Vector3 | ,
 |  | (Vector3{0.0f, 0.0f, 0.0f}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapScale | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapInterpolationMode | ,
 |  | winrt::CanvasImageInterpolation | ,
 |  | winrt::CanvasImageInterpolation::Linear | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapKernelSize | ,
 |  | Vector2 | ,
 |  | (Vector2{1.0f, 1.0f}) | ,
 |  | value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightColor | ,
 |  | UIColor | ,
 |  | (UIColor{255, 255, 255, 255}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | Focus | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | DiffuseAmount | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=0.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | LimitingConeAngle | ,
 |  | float | ,
 |  | k_PI/2. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightPosition | ,
 |  | Vector3 | ,
 |  | (Vector3{0.0f, 0.0f, 0.0f}) | ,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1181 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
                    case D2D1_SPOTDIFFUSE_PROP_POINTS_AT:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightTarget));
                    case D2D1_SPOTDIFFUSE_PROP_FOCUS: return winrt::PropertyValue::CreateSingle(m_Focus);
                    case D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE:
                        return winrt::PropertyValue::CreateSingle(m_LimitingConeAngle * k_DegreesPerRadian);
                    case D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT: return winrt::PropertyValue::CreateSingle(m_DiffuseAmount);
                    case D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
                    case D2D1_SPOTDIFFUSE_PROP_COLOR: return CreateColor<3>(m_LightColor);
                    case D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
                    case D2D1_SPOTDIFFUSE_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1179 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 9; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpotSpecularEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • SpotSpecularEffect
Public Member Functions

SpotSpecularEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1SpotSpecular)
DECLARE_NAMED_PROPERTY_MAPPING ({L"LightPosition", D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightTarget", D2D1_SPOTDIFFUSE_PROP_POINTS_AT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Focus", D2D1_SPOTDIFFUSE_PROP_FOCUS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LimitingConeAngle", D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"SpecularExponent", D2D1_SPOTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"SpecularAmount", D2D1_SPOTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_SPOTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_SPOTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_SPOTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_SPOTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},)
DECLARE_POD_PROPERTY (LightTarget, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true)
DECLARE_POD_PROPERTY (LimitingConeAngle, float, k_PI/2.0f, true)
DECLARE_POD_PROPERTY (SpecularAmount, float, 1.0f, value >=0.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f)
DECLARE_POD_PROPERTY (LightColor, UIColor,(UIColor{255, 255, 255, 255}), true)
DECLARE_POD_PROPERTY (HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (Focus, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (SpecularExponent, float, 1.0f, value >=-10000.0f &&value<=10000.0f)
DECLARE_POD_PROPERTY (HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true)
DECLARE_POD_PROPERTY (LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1208 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1SpotSpecular )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | LightTarget | ,
 |  | Vector3 | ,
 |  | (Vector3{0.0f, 0.0f, 0.0f}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | LimitingConeAngle | ,
 |  | float | ,
 |  | k_PI/2. | 0f,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | SpecularAmount | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=0.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapKernelSize | ,
 |  | Vector2 | ,
 |  | (Vector2{1.0f, 1.0f}) | ,
 |  | value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightColor | ,
 |  | UIColor | ,
 |  | (UIColor{255, 255, 255, 255}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapScale | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | Focus | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | SpecularExponent | ,
 |  | float | ,
 |  | 1. | 0f,
 |  | value >=-10000.0f &&value<=10000. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | HeightMapInterpolationMode | ,
 |  | winrt::CanvasImageInterpolation | ,
 |  | winrt::CanvasImageInterpolation::Linear | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | LightPosition | ,
 |  | Vector3 | ,
 |  | (Vector3{0.0f, 0.0f, 0.0f}) | ,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1240 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
                    case D2D1_SPOTDIFFUSE_PROP_POINTS_AT:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightTarget));
                    case D2D1_SPOTDIFFUSE_PROP_FOCUS: return winrt::PropertyValue::CreateSingle(m_Focus);
                    case D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE:
                        return winrt::PropertyValue::CreateSingle(m_LimitingConeAngle * k_DegreesPerRadian);
                    case D2D1_SPOTSPECULAR_PROP_SPECULAR_EXPONENT: return winrt::PropertyValue::CreateSingle(m_SpecularExponent);
                    case D2D1_SPOTSPECULAR_PROP_SPECULAR_CONSTANT: return winrt::PropertyValue::CreateSingle(m_SpecularAmount);
                    case D2D1_SPOTSPECULAR_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
                    case D2D1_SPOTSPECULAR_PROP_COLOR: return CreateColor<3>(m_LightColor);
                    case D2D1_SPOTSPECULAR_PROP_KERNEL_UNIT_LENGTH:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
                    case D2D1_SPOTSPECULAR_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1238 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 10; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TemperatureAndTintEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • TemperatureAndTintEffect
Public Member Functions

TemperatureAndTintEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1TemperatureTint)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Temperature", D2D1_TEMPERATUREANDTINT_PROP_TEMPERATURE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Tint", D2D1_TEMPERATUREANDTINT_PROP_TINT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (Tint, float, 0.0f, value >=-1.0f &&value<=1.0f)
DECLARE_POD_PROPERTY (Temperature, float, 0.0f, value >=-1.0f &&value<=1.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1268 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1TemperatureTint )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | Tint | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | value >=-1.0f &&value<=1. | 0f
 | ) |  |
DECLARE_POD_PROPERTY | ( | Temperature | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | value >=-1.0f &&value<=1. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1283 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_TEMPERATUREANDTINT_PROP_TEMPERATURE: return winrt::PropertyValue::CreateSingle(m_Temperature);
                    case D2D1_TEMPERATUREANDTINT_PROP_TINT: return winrt::PropertyValue::CreateSingle(m_Tint);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1281 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 2; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TintEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • TintEffect
Public Member Functions

TintEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1Tint)
DECLARE_NAMED_PROPERTY_MAPPING ({L"Color", D2D1_TINT_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4},{L"ClampOutput", D2D1_TINT_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (ClampOutput, bool, false, true)
DECLARE_POD_PROPERTY (Color, UIColor,(UIColor{255, 255, 255, 255}), true)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1299 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1Tint )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | ClampOutput | ,
 |  | bool | ,
 |  | false | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | Color | ,
 |  | UIColor | ,
 |  | (UIColor{255, 255, 255, 255}) | ,
 |  | true |
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1314 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_TINT_PROP_COLOR: return CreateColor<4>(m_Color);
                    case D2D1_TINT_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1312 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 2; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Transform2DEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • Transform2DEffect
Public Member Functions

Transform2DEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D12DAffineTransform)
DECLARE_NAMED_PROPERTY_MAPPING ({L"InterpolationMode", D2D1_2DAFFINETRANSFORM_PROP_INTERPOLATION_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BorderMode", D2D1_2DAFFINETRANSFORM_PROP_BORDER_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"TransformMatrix", D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Sharpness", D2D1_2DAFFINETRANSFORM_PROP_SHARPNESS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT})
DECLARE_POD_PROPERTY (BorderMode, winrt::EffectBorderMode, winrt::EffectBorderMode::Soft, true)
DECLARE_POD_PROPERTY (InterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true)
DECLARE_POD_PROPERTY (TransformMatrix, winrt::float3x2,(winrt::float3x2{1, 0, 0, 1, 0, 0}), true)
DECLARE_POD_PROPERTY (Sharpness, float, 0.0f, value >=0.0f &&value<=1.0f)
DECLARE_SINGLE_SOURCE (Source)
IFACEMETHODIMP | GetProperty (UINT index, _Outptr_ abi::IPropertyValue **value) override
IFACEMETHODIMP | GetPropertyCount (_Out_ UINT *count) override

Detailed Description

Definition at line 1330 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D12DAffineTransform )
DECLARE_NAMED_PROPERTY_MAPPING ( )
DECLARE_POD_PROPERTY | ( | BorderMode | ,
 |  | winrt::EffectBorderMode | ,
 |  | winrt::EffectBorderMode::Soft | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | InterpolationMode | ,
 |  | winrt::CanvasImageInterpolation | ,
 |  | winrt::CanvasImageInterpolation::Linear | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | TransformMatrix | ,
 |  | winrt::float3x2 | ,
 |  | (winrt::float3x2{1, 0, 0, 1, 0, 0}) | ,
 |  | true |
 | ) |  |
DECLARE_POD_PROPERTY | ( | Sharpness | ,
 |  | float | ,
 |  | 0. | 0f,
 |  | value >=0.0f &&value<=1. | 0f
 | ) |  |
DECLARE_SINGLE_SOURCE ( Source )
IFACEMETHODIMP GetProperty | ( | UINT | index,
 |  | _Outptr_ abi::IPropertyValue ** | value |
 | ) |  |  | [inline, override]

Definition at line 1349 of file microsoft.ui.private.composition.effects_impl.h.

        {
            return UsePropertyFactory(value, [=]()
            {
                switch (index)
                {
                    case D2D1_2DAFFINETRANSFORM_PROP_INTERPOLATION_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_InterpolationMode);
                    case D2D1_2DAFFINETRANSFORM_PROP_BORDER_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_BorderMode);
                    case D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX:
                        return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 6>&>(m_TransformMatrix));
                    case D2D1_2DAFFINETRANSFORM_PROP_SHARPNESS: return winrt::PropertyValue::CreateSingle(m_Sharpness);
                    default: throw winrt::hresult_invalid_argument();
                }
            });
        }

IFACEMETHODIMP GetPropertyCount ( _Out_ UINT * count ) [inline, override]

Definition at line 1347 of file microsoft.ui.private.composition.effects_impl.h.

{ *count = 4; return S_OK; }

The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UnPremultiplyEffect Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
  • UnPremultiplyEffect
Public Member Functions

UnPremultiplyEffect Class Reference

#include "microsoft.ui.private.composition.effects_impl.h"

List of all members.

Public Member Functions

DECLARE_D2D_GUID (CLSID_D2D1UnPremultiply)
DECLARE_SINGLE_SOURCE (Source)

Detailed Description

Definition at line 1368 of file microsoft.ui.private.composition.effects_impl.h.

Member Function Documentation

DECLARE_D2D_GUID ( CLSID_D2D1UnPremultiply )
DECLARE_SINGLE_SOURCE ( Source )
The documentation for this class was generated from the following file:
  • Effects/microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RegisterMetadata Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Design
  • RegisterMetadata
Properties

RegisterMetadata Class Reference

List of all members.

Properties

AttributeTable AttributeTable [get]

Detailed Description

Definition at line 8 of file RegisterMetadata.cs.

Property Documentation

AttributeTable AttributeTable [get]

Definition at line 11 of file RegisterMetadata.cs.

The documentation for this class was generated from the following file:
  • Microsoft.UI.Xaml.Design/RegisterMetadata.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • AcrylicBrushTests
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

AcrylicBrushTests Class Reference

List of all members.

Public Member Functions

void | VerifyAcrylicBrushHasCorrectFallbackColor ()
void | VerifyAcrylicBrushNameRule ()
void | VerifyDefaultPropertyValues ()

Private Member Functions

Color | GetAcrylicBrushFallbackColor (string brushName, ResourceDictionary dict)
IEnumerable< string > | GetAcrylicBrushNames ()
Color | GetColorByName (string name, ResourceDictionary dict)
string | GetFallBackColorName (String brushName)
Color | GetSolidColorBrushColor (string brushName, ResourceDictionary dict)
void | SetupDefaultUI ()
void | VerifyAcrylicBrushHasCorrectFallbackColorOnTheme (IEnumerable< KeyValuePair< string, string >> brushAndFallbackColorNamePairs, ResourceDictionary theme)

Private Attributes

Rectangle | _rectangle1 = null
StackPanel | _rootSP = null
Color | unknownColor = Microsoft.UI.ColorHelper.FromArgb(111, 112, 113, 114)

Static Private Attributes

static string | pattern = @"SystemControl(.*)(AcrylicWindow|AcrylicElement).*Brush"
static Regex | rgx = new Regex(pattern, RegexOptions.IgnoreCase)

Detailed Description

Definition at line 25 of file AcrylicBrushTests.cs.

Member Function Documentation

Color GetAcrylicBrushFallbackColor | ( | string | brushName,
 |  | ResourceDictionary | dict |
 | ) |  |  | [inline, private]

Definition at line 149 of file AcrylicBrushTests.cs.

        {
            Color color = unknownColor;

            var brush = dict[brushName] as AcrylicBrush;
            if (brush != null)
                color = brush.FallbackColor;

            return color;
        }

IEnumerable<string> GetAcrylicBrushNames ( ) [inline, private]

Definition at line 159 of file AcrylicBrushTests.cs.

        {
            return AcrylicColorPage.AcrylicBrushNames;
        }

Color GetColorByName | ( | string | name,
 |  | ResourceDictionary | dict |
 | ) |  |  | [inline, private]

Definition at line 131 of file AcrylicBrushTests.cs.

        {
            object color;
            if (dict.TryGetValue(name, out color))
                return (Color)color;
            return unknownColor;
        }

string GetFallBackColorName ( String brushName ) [inline, private]

brush name is: SystemControl <fallback color>=""> Acrylic <background source>=""> <fallback color>=""> should be part of FallbackColor eg: SystemControlBaseHighAcrylicElementBrush <-> SystemBaseHighColor BaseHigh is <fallback color>=""> and SystemBaseHighColor is the expected fallback Color name

Definition at line 170 of file AcrylicBrushTests.cs.

        {
            string name = "";
            Match m = rgx.Match(brushName);

            if (m.Success)
                name = m.Groups[1].Value;

            if (!String.IsNullOrEmpty(name))
            {
                switch (name)
                {
                    case "AccentDark1": name = "SystemAccentColorDark1"; break;
                    case "AccentDark2": name = "SystemAccentColorDark2"; break;
                    case "AccentDark3": name = "SystemAccentColorDark3"; break;
                    case "Accent": name = "SystemAccentColor"; break;
                    case "AccentLight1": name = "SystemAccentColorLight1"; break;
                    case "AccentLight2": name = "SystemAccentColorLight2"; break;
                    case "AccentLight3": name = "SystemAccentColorLight3"; break;
                    default:
                        name = string.Format("System{0}Color", name); break;
                }
            }

            return name;
        }

Color GetSolidColorBrushColor | ( | string | brushName,
 |  | ResourceDictionary | dict |
 | ) |  |  | [inline, private]

Definition at line 139 of file AcrylicBrushTests.cs.

        {
            Color color = unknownColor;
            var brush = dict[brushName] as SolidColorBrush;
            if (brush != null)
                color = brush.Color;

            return color;
        }

void SetupDefaultUI ( ) [inline, private]

Definition at line 117 of file AcrylicBrushTests.cs.

        {
            _rectangle1 = new Rectangle();
            _rectangle1.Width = 200;
            _rectangle1.Height = 100;
            _rectangle1.Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple);

            _rootSP = new StackPanel();
            _rootSP.Children.Add(_rectangle1);

            Log.Comment("Setting window content");
            Content = _rootSP;
        }

void VerifyAcrylicBrushHasCorrectFallbackColor ( ) [inline]

SystemControl <fallback color>=""> Acrylic <background source>=""> <tint color="" and="" tint="" opacity>=""> Brush In practice, we’ll have: SystemControlAcrylicWindowBrush SystemControlAcrylicElementMediumHighBrush SystemControlAccentDark1AcrylicWindowAccentDark1Brush SystemControlBaseHighAcrylicElementBrush SystemControlBaseHighAcrylicWindowMediumHighBrush.

deduce color by name: brush name -> <fallback color>=""> -> System{<fallback color>="">}Color -> Color get color by function: brush name -> FallbackColor -> Color then compare the two Microsoft.UI.Colors.

Definition at line 57 of file AcrylicBrushTests.cs.

        {
            if (PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone2))
            {
                Log.Comment("Using system XAML AcrylicBrushes post-RS2, so nothing to test.");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                // only select the pair whose <fallback color> is not empty
                var brushAndFallbackColorNamePairs = GetAcrylicBrushNames()
                    .Select(brushName => new KeyValuePair<string, string>(brushName, GetFallBackColorName(brushName)))
                    .Where(pair => !String.IsNullOrEmpty(pair.Value));

                var lightTheme = Application.Current.Resources.MergedDictionaries.First().ThemeDictionaries["Light"] as ResourceDictionary;
                var darkTheme = Application.Current.Resources.MergedDictionaries.First().ThemeDictionaries["Default"] as ResourceDictionary;

                Log.Comment("Verify Dark");
                VerifyAcrylicBrushHasCorrectFallbackColorOnTheme(brushAndFallbackColorNamePairs, darkTheme);
                Log.Comment("Verify Light");
                VerifyAcrylicBrushHasCorrectFallbackColorOnTheme(brushAndFallbackColorNamePairs, lightTheme);
            }
            );
        }

void VerifyAcrylicBrushHasCorrectFallbackColorOnTheme | ( | IEnumerable< KeyValuePair< string, string >> | brushAndFallbackColorNamePairs,
 |  | ResourceDictionary | theme |
 | ) |  |  | [inline, private]

Definition at line 83 of file AcrylicBrushTests.cs.

        {
            foreach (var namePair in brushAndFallbackColorNamePairs)
            {
                Color fallbackColor = GetAcrylicBrushFallbackColor(namePair.Key, theme); ;
                Color fallbackExpectedColor = GetColorByName(namePair.Value, theme);
                Verify.AreEqual(fallbackColor, fallbackExpectedColor,
                    string.Format("Fallback Color for AcrylicBrush {0} and Color {1} are the same", namePair.Key, namePair.Value));
            };
        }

void VerifyAcrylicBrushNameRule ( ) [inline]

SystemControl <fallback color>=""> Acrylic <background source>=""> <tint color="" and="" tint="" opacity>=""> Brush.

Definition at line 35 of file AcrylicBrushTests.cs.

        {
            foreach (var brushName in GetAcrylicBrushNames())
            {
                Verify.IsTrue(rgx.Match(brushName).Success, brushName + " match the pattern");
            }
        }

void VerifyDefaultPropertyValues ( ) [inline]

Verifies the AcrylicBrush default properties.

Definition at line 98 of file AcrylicBrushTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                AcrylicBrush acrylicBrush = new AcrylicBrush();
                Verify.IsNotNull(acrylicBrush);

                MatrixTransform identityTransform = new MatrixTransform();
                identityTransform.Matrix = Matrix.Identity;

                Log.Comment("Verifying AcrylicBrush default property values");
                Verify.AreEqual(acrylicBrush.FallbackColor, Microsoft.UI.ColorHelper.FromArgb(0, 255, 255, 255));
                Verify.AreEqual(acrylicBrush.AlwaysUseFallback, false);
                Verify.AreEqual(acrylicBrush.TintColor, Microsoft.UI.ColorHelper.FromArgb(204, 255, 255, 255));
                Verify.AreEqual(acrylicBrush.TintOpacity, 1.0);
                Verify.AreEqual(acrylicBrush.Opacity, 1.0);
            });
        }

Member Data Documentation

Rectangle _rectangle1 = null [private]

Definition at line 27 of file AcrylicBrushTests.cs.

StackPanel _rootSP = null [private]

Definition at line 28 of file AcrylicBrushTests.cs.

string pattern = @"SystemControl(.*)(AcrylicWindow|AcrylicElement).*Brush" [static, private]

Definition at line 29 of file AcrylicBrushTests.cs.

Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase) [static, private]

Definition at line 30 of file AcrylicBrushTests.cs.

Color unknownColor = Microsoft.UI.ColorHelper.FromArgb(111, 112, 113, 114) [private]

Definition at line 31 of file AcrylicBrushTests.cs.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/APITests/AcrylicBrushTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIconTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • AnimatedIconTests
Public Member Functions

AnimatedIconTests Class Reference

List of all members.

Public Member Functions

void | AddingAnimatedIconToGridWithoutAStateDoesNotPropogateState ()
void | CanChangeSourceAfterState ()
void | CanSetStateOnAnimatedIconDirectlyWithoutPropagationToChild ()
void | ChangingSourcePropertyChangesRenderSize ()
void | ChangingVisualTrees ()
void | ForegroundInheritsFromParent ()
void | SettingStateOnGrandParentPropagatesToGrandChildAnimatedIcon ()
void | SettingStateOnParentDoesNotPropagateToChildNonAnimatedIcon ()
void | SettingStateOnParentPropagatesToChildAnimatedIcon ()
void | TransitionFallbackLogic ()

Detailed Description

Definition at line 26 of file AnimatedIconTests.cs.

Member Function Documentation

void AddingAnimatedIconToGridWithoutAStateDoesNotPropogateState ( ) [inline]

Definition at line 165 of file AnimatedIconTests.cs.

        {
            // This is not actually a desired behavior.  Ideally we would be able to set
            // the AnimatedIcon.State property on any ancestor of an animated icon at any
            // time and that would reach the icon. However this is challenging to do
            // efficiently so instead we require that the parent have an AnimatedIcon.State
            // value when the icon is loaded.
            AnimatedIcon animatedIcon = null;
            Grid parentGrid = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                parentGrid = new Grid();
                parentGrid.Children.Add(animatedIcon);

                Content = parentGrid;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                string stateString = "Test State";
                AnimatedIcon.SetState(parentGrid, stateString);
                Verify.AreNotEqual(stateString, AnimatedIcon.GetState(animatedIcon));
            });
        }

void CanChangeSourceAfterState ( ) [inline]

Definition at line 247 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            Grid parentGrid = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                parentGrid = new Grid();
                parentGrid.Children.Add(animatedIcon);

                Content = parentGrid;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                animatedIcon.Source = new AnimatedChevronDownSmallVisualSource();
                AnimatedIcon.SetState(parentGrid, "Normal");
                animatedIcon.Source = new AnimatedSettingsVisualSource();
                AnimatedIcon.SetState(parentGrid, "PointerOver");
                animatedIcon.Source = null;
                AnimatedIcon.SetState(parentGrid, "");
            });
        }

void CanSetStateOnAnimatedIconDirectlyWithoutPropagationToChild ( ) [inline]

Definition at line 195 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();

                Content = animatedIcon;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                string stateString = "Test State";
                AnimatedIcon.SetState(animatedIcon, stateString);
                Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
                Verify.AreNotEqual(stateString, AnimatedIcon.GetState(VisualTreeHelper.GetChild(animatedIcon, 0)));
            });
        }

void ChangingSourcePropertyChangesRenderSize ( ) [inline]

Definition at line 426 of file AnimatedIconTests.cs.

        {
            AnimatedIcon icon = null;
            RunOnUIThread.Execute(() =>
            {
                icon = new AnimatedIcon();
                Content = new StackPanel() {
                    Children = { icon }
                };
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Icon height will be zero if the source property is not set.
                Verify.IsTrue(Math.Abs(icon.ActualHeight) < 0.1);
                icon.Source = new AnimatedChevronDownSmallVisualSource();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Icon will have a height if the AnimatedIcon also updated the visual tree to rerender.
                Verify.IsTrue(Math.Abs(icon.ActualHeight) > 10);
            });
        }

void ChangingVisualTrees ( ) [inline]

Definition at line 83 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            Grid parentGrid = null;
            Grid grandParentGrid = null;
            Grid newParentGrid = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                parentGrid = new Grid();
                grandParentGrid = new Grid();
                newParentGrid = new Grid();
                parentGrid.Children.Add(animatedIcon);
                grandParentGrid.Children.Add(parentGrid);
                AnimatedIcon.SetState(parentGrid, "Initial State");

                Content = grandParentGrid;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                string stateString = "Test State";
                AnimatedIcon.SetState(parentGrid, stateString);
                Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));

                parentGrid.Children.Clear();
                newParentGrid.Children.Add(animatedIcon);
                grandParentGrid.Children.Clear();
                grandParentGrid.Children.Add(newParentGrid);
                AnimatedIcon.SetState(newParentGrid, "Initial State");

                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                string state2String = "Test State2";
                AnimatedIcon.SetState(newParentGrid, state2String);
                Verify.AreEqual(state2String, AnimatedIcon.GetState(animatedIcon));

                string badStateString = "Bad State";
                AnimatedIcon.SetState(parentGrid, badStateString);
                Verify.AreNotEqual(badStateString, AnimatedIcon.GetState(animatedIcon));
            });
        }

void ForegroundInheritsFromParent ( ) [inline]

Definition at line 218 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            ContentControl parentContentControl = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                parentContentControl = new ContentControl();
                parentContentControl.Content = animatedIcon;

                Content = parentContentControl;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var foregroundBrush = new SolidColorBrush(Colors.Red);
                parentContentControl.Foreground = foregroundBrush;
                Verify.AreEqual(foregroundBrush, animatedIcon.Foreground);

                var newForegroundBrush = new SolidColorBrush(Colors.Blue);
                animatedIcon.Foreground = newForegroundBrush;
                Verify.AreEqual(newForegroundBrush, animatedIcon.Foreground);
            });
        }

void SettingStateOnGrandParentPropagatesToGrandChildAnimatedIcon ( ) [inline]

Definition at line 54 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            Grid parentGrid = null;
            Grid grandParentGrid = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                parentGrid = new Grid();
                grandParentGrid = new Grid();
                parentGrid.Children.Add(animatedIcon);
                grandParentGrid.Children.Add(parentGrid);
                AnimatedIcon.SetState(grandParentGrid, "Initial State");

                Content = grandParentGrid;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                string stateString = "Test State";
                AnimatedIcon.SetState(grandParentGrid, stateString);
                Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
            });
        }

void SettingStateOnParentDoesNotPropagateToChildNonAnimatedIcon ( ) [inline]

Definition at line 135 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            Grid parentGrid = null;
            Grid childGrid = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                parentGrid = new Grid();
                childGrid = new Grid();
                parentGrid.Children.Add(childGrid);
                childGrid.Children.Add(animatedIcon);
                AnimatedIcon.SetState(parentGrid, "Initial State");

                Content = parentGrid;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                string stateString = "Test State";
                AnimatedIcon.SetState(parentGrid, stateString);
                Verify.AreNotEqual(stateString, AnimatedIcon.GetState(childGrid));
                Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
            });
        }

void SettingStateOnParentPropagatesToChildAnimatedIcon ( ) [inline]

Definition at line 29 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            Grid parentGrid = null;
            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                parentGrid = new Grid();
                parentGrid.Children.Add(animatedIcon);
                AnimatedIcon.SetState(parentGrid, "Initial State");

                Content = parentGrid;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                string stateString = "Test State";
                AnimatedIcon.SetState(parentGrid, stateString);
                Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
            });
        }

void TransitionFallbackLogic ( ) [inline]

Definition at line 275 of file AnimatedIconTests.cs.

        {
            AnimatedIcon animatedIcon = null;
            var layoutUpdatedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                animatedIcon = new AnimatedIcon();
                animatedIcon.Source = new MockIAnimatedIconSource2();

                Content = animatedIcon;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                animatedIcon.LayoutUpdated += AnimatedIcon_LayoutUpdated;
                AnimatedIcon.SetState(animatedIcon, "a");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "b");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("aTob_Start", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                Verify.AreEqual("aTob_End", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));

                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "c");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("bToc_Start", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                // bToc_End is undefined in MockIAnimatedIconSource2
                Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));

                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "d");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                // cTod_Start is undefined in MockIAnimatedIconSource2
                Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                Verify.AreEqual("cTod_End", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));

                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "e");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                // dToe_Start and dToe_End are undefined in MockIAnimatedIconSource2, the first backup is dToe
                Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                Verify.AreEqual("dToe", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));

                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "f");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                // eTof_Start, eTof_End, and eTof are undefined in MockIAnimatedIconSource2, the second backup is f
                Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                Verify.AreEqual("f", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));

                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "b");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                // fTob_Start, fTob_End, fTob and b are all undefined in MockIAnimatedIconSource2, the third backup is any
                // marker which ends with the string "Tob_End"
                Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                Verify.AreEqual("aTob_End", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));

                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "0.12345");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                // bTo0.12345_Start, bTo0.12345_End, bTo0.12345, and 0.12345  are all undefined in MockIAnimatedIconSource2, and
                // there are no markers which end with the string "To0.12345_End" so finally we attempt to interpret the state as
                // a float to get the position to animate to.
                Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                Verify.AreEqual("0.12345", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));

                layoutUpdatedEvent.Reset();
                AnimatedIcon.SetState(animatedIcon, "Failure");
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            layoutUpdatedEvent.WaitOne();

            RunOnUIThread.Execute(() =>
            {
                // 0.12345ToFailure_Start, 0.12345ToFailure_End, 0.12345ToFailure, and Failure are all undefined in MockIAnimatedIconSource2, and
                // there are no markers which end with the string "ToFailure_End" and Failure is not a float, so we have failed to find a marker.
                Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
                Verify.AreEqual("0.0", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
            });

            void AnimatedIcon_LayoutUpdated(object sender, object e)
            {
                layoutUpdatedEvent.Set();
            }
        }

The documentation for this class was generated from the following file:
  • AnimatedIcon/APITests/AnimatedIconTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • AnnotatedScrollBarTests
Public Member Functions | Private Member Functions

AnnotatedScrollBarTests Class Reference

List of all members.

Public Member Functions

void | VerifyDefaultPropertyValues ()

Private Member Functions

void | LogAnnotatedScrollBarProperties (AnnotatedScrollBar annotatedScrollBar)

Detailed Description

Definition at line 17 of file AnnotatedScrollBarTests.cs.

Member Function Documentation

void LogAnnotatedScrollBarProperties ( AnnotatedScrollBar annotatedScrollBar ) [inline, private]

Definition at line 39 of file AnnotatedScrollBarTests.cs.

        {
            Log.Comment(" - annotatedScrollBar.Labels.Count: " + annotatedScrollBar.Labels.Count);
            Log.Comment(" - annotatedScrollBar.LabelTemplate: " + (annotatedScrollBar.LabelTemplate == null ? "null" : "non-null"));
            Log.Comment(" - annotatedScrollBar.DetailLabelTemplate: " + (annotatedScrollBar.DetailLabelTemplate == null ? "null" : "non-null"));
            Log.Comment(" - annotatedScrollBar.SmallChange: " + annotatedScrollBar.SmallChange);
        }

void VerifyDefaultPropertyValues ( ) [inline]

Definition at line 21 of file AnnotatedScrollBarTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                AnnotatedScrollBar annotatedScrollBar = new AnnotatedScrollBar();
                Verify.IsNotNull(annotatedScrollBar);

                Log.Comment("Logging AnnotatedScrollBar default property values");
                LogAnnotatedScrollBarProperties(annotatedScrollBar);

                Log.Comment("Verifying AnnotatedScrollBar default property values");
                Verify.IsNotNull(annotatedScrollBar.Labels);
                Verify.IsNull(annotatedScrollBar.LabelTemplate);
                Verify.IsNull(annotatedScrollBar.DetailLabelTemplate);
                Verify.AreEqual(annotatedScrollBar.SmallChange, 0);
            });
        }

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/APITests/AnnotatedScrollBarTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBoxTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • AutoSuggestBoxTests
Public Member Functions | Private Member Functions

AutoSuggestBoxTests Class Reference

List of all members.

Public Member Functions

void | VerifyAutoSuggestBoxCornerRadius ()
void | VerifyVisualTree ()

Private Member Functions

AutoSuggestBox | SetupAutoSuggestBox ()

Detailed Description

Definition at line 19 of file AutoSuggestBoxTests.cs.

Member Function Documentation

AutoSuggestBox SetupAutoSuggestBox ( ) [inline, private]

Definition at line 65 of file AutoSuggestBoxTests.cs.

        {
            AutoSuggestBox autoSuggestBox = null;
            RunOnUIThread.Execute(() =>
            {
                autoSuggestBox = new AutoSuggestBox();
                List<string> suggestions = new List<string>
                {
                    "Item 1", "Item 2", "Item 3"
                };
                autoSuggestBox.ItemsSource = suggestions;
                autoSuggestBox.Width = 400;
            });
            TestUtilities.SetAsVisualTreeRoot(autoSuggestBox);
            Verify.IsNotNull(autoSuggestBox);
            return autoSuggestBox;
        }

void VerifyAutoSuggestBoxCornerRadius ( ) [inline]

Definition at line 23 of file AutoSuggestBoxTests.cs.

        {
            var autoSuggestBox = SetupAutoSuggestBox();

            RunOnUIThread.Execute(() =>
            {
                autoSuggestBox.CornerRadius = new CornerRadius(2);
                autoSuggestBox.Focus(FocusState.Keyboard);
                autoSuggestBox.Text = "123";
                autoSuggestBox.MaxHeight = 32;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var textBox = TestUtilities.FindDescendents<TextBox>(autoSuggestBox).Where(e => e.Name == "TextBox").Single();

                // Flyout might open differently and as such flip corner radii values
                Verify.IsTrue(new CornerRadius(2, 2, 0, 0) == textBox.CornerRadius || new CornerRadius(0,0,2,2) == textBox.CornerRadius);

                var overlayCornerRadius = new CornerRadius(0, 0, 0, 0);
                var radius = App.Current.Resources["OverlayCornerRadius"];
                if (radius != null)
                {
                    overlayCornerRadius = (CornerRadius)radius;
                }
                var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(autoSuggestBox.XamlRoot).Last();
                var popupBorder = popup.Child as Border;

                // Flyout might open differently and as such flip corner radii values
                Verify.IsTrue(new CornerRadius(0, 0, overlayCornerRadius.BottomRight, overlayCornerRadius.BottomLeft) == popupBorder.CornerRadius
                    || new CornerRadius(overlayCornerRadius.TopRight, overlayCornerRadius.TopLeft, 0, 0) == popupBorder.CornerRadius);
            });
        }

void VerifyVisualTree ( ) [inline]

Definition at line 59 of file AutoSuggestBoxTests.cs.

        {
            var autoSuggestBox = SetupAutoSuggestBox();
            VisualTreeTestHelper.VerifyVisualTree(root: autoSuggestBox, verificationFileNamePrefix: "AutoSuggestBox");
        }

The documentation for this class was generated from the following file:
  • AutoSuggestBox/APITests/AutoSuggestBoxTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • BreadcrumbTests
Classes | Public Member Functions

BreadcrumbTests Class Reference

List of all members.

Classes

class | MockClass

Public Member Functions

void | VerifyBreadcrumbDefaultAPIValues ()
void | VerifyCollectionChangeGetsRespected ()
void | VerifyCustomItemTemplate ()
void | VerifyDefaultBreadcrumb ()
void | VerifyDropdownItemTemplate ()
void | VerifyDropdownItemTemplateWithNoControl ()
void | VerifyNumericItemsSource ()
void | VerifyObjectItemsSource ()

Detailed Description

Definition at line 25 of file BreadcrumbTests.cs.

Member Function Documentation

void VerifyBreadcrumbDefaultAPIValues ( ) [inline]

Definition at line 29 of file BreadcrumbTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                BreadcrumbBar breadcrumb = new BreadcrumbBar();
                var stackPanel = new StackPanel();
                stackPanel.Children.Add(breadcrumb);

                Content = stackPanel;
                Content.UpdateLayout();

                Verify.IsNull(breadcrumb.ItemsSource, "The default ItemsSource property value must be null");
                Verify.IsNull(breadcrumb.ItemTemplate, "The default ItemTemplate property value must be null");
            });
        }

void VerifyCollectionChangeGetsRespected ( ) [inline]

Definition at line 392 of file BreadcrumbTests.cs.

        {
            BreadcrumbBar breadcrumb = null;
            ItemsRepeater breadcrumbItemsRepeater = null;
            RunOnUIThread.Execute(() =>
            {
                // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                            xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                            xmlns:controls='using:Microsoft.UI.Xaml.Controls'
                            xmlns:local='using:Microsoft.UI.Xaml.Tests.MUXControls.ApiTests'>
                            <controls:BreadcrumbBarItem Content='{Binding}'>
                                <controls:BreadcrumbBarItem.ContentTemplate>
                                    <DataTemplate>
                                        <TextBlock Text='{Binding MockProperty}'/>
                                    </DataTemplate>
                                </controls:BreadcrumbBarItem.ContentTemplate>
                            </controls:BreadcrumbBarItem>
                        </DataTemplate>");

                breadcrumb = new BreadcrumbBar();
                breadcrumb.ItemsSource = new List<MockClass>() {
                    new MockClass { MockProperty = "Node 1" },
                    new MockClass { MockProperty = "Node 2" },
                };
                breadcrumb.ItemTemplate = itemTemplate;

                var stackPanel = new StackPanel();
                stackPanel.Children.Add(breadcrumb);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");

                var breadcrumbNode2 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
                Verify.IsNotNull(breadcrumbNode2, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");

                breadcrumb.ItemsSource = new List<MockClass>() {
                    new MockClass { MockProperty = "Node 1" },
                    new MockClass { MockProperty = "Node 2" },
                    new MockClass { MockProperty = "Node 3" },
                    new MockClass { MockProperty = "Node 4" },
                };
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var breadcrumbNode3 = breadcrumbItemsRepeater.TryGetElement(3) as BreadcrumbBarItem;
                Verify.IsNotNull(breadcrumbNode3, "A fourth item should have been rendered by the BreadcrumControl");
            });
        }

void VerifyCustomItemTemplate ( ) [inline]

Definition at line 72 of file BreadcrumbTests.cs.

        {
            BreadcrumbBar breadcrumb = null;
            BreadcrumbBar breadcrumb2 = null;
            RunOnUIThread.Execute(() =>
            {
                breadcrumb = new BreadcrumbBar();
                breadcrumb.ItemsSource = new List<string>() { "Node 1", "Node 2" };

                // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}'/>
                        </DataTemplate>");

                breadcrumb.ItemTemplate = itemTemplate;

                breadcrumb2 = new BreadcrumbBar();
                breadcrumb2.ItemsSource = new List<string>() { "Node 1", "Node 2" };

                // Set a custom ItemTemplate which is already a BreadcrumbBarItem. No wrapping should be performed.
                var itemTemplate2 = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                            xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                            <controls:BreadcrumbBarItem Foreground='Blue'>
                              <TextBlock Text = '{Binding}'/>
                            </controls:BreadcrumbBarItem>
                        </DataTemplate>");

                breadcrumb2.ItemTemplate = itemTemplate2;

                var stackPanel = new StackPanel();
                stackPanel.Children.Add(breadcrumb);
                stackPanel.Children.Add(breadcrumb2);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
                ItemsRepeater breadcrumbItemsRepeater2 = (ItemsRepeater)breadcrumb2.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");
                Verify.IsNotNull(breadcrumbItemsRepeater2, "The underlying items repeater could not be retrieved");

                var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
                var breadcrumbNode2 = breadcrumbItemsRepeater2.TryGetElement(1) as BreadcrumbBarItem;
                Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
                Verify.IsNotNull(breadcrumbNode2, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");

                // change this conditions
                bool testCondition = !(breadcrumbNode1.Foreground is SolidColorBrush brush && brush.Color == Colors.Blue);
                Verify.IsTrue(testCondition, "Default foreground color of the BreadcrumbBarItem should not have been [blue].");

                testCondition = breadcrumbNode2.Foreground is SolidColorBrush brush2 && brush2.Color == Colors.Blue;
                Verify.IsTrue(testCondition, "The foreground color of the BreadcrumbBarItem should have been [blue].");
            });
        }

void VerifyDefaultBreadcrumb ( ) [inline]

Definition at line 46 of file BreadcrumbTests.cs.

        {
            BreadcrumbBar breadcrumb = null;
            RunOnUIThread.Execute(() =>
            {
                breadcrumb = new BreadcrumbBar();
                var stackPanel = new StackPanel();
                stackPanel.Children.Add(breadcrumb);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");

                var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1);
                Verify.IsNull(breadcrumbNode1, "There should be no items.");
            });
        }

void VerifyDropdownItemTemplate ( ) [inline]

Definition at line 238 of file BreadcrumbTests.cs.

        {
            BreadcrumbBar breadcrumb = null;

            RunOnUIThread.Execute(() =>
            {
                breadcrumb = new BreadcrumbBar();
                breadcrumb.ItemsSource = new List<MockClass>() {
                    new MockClass { MockProperty = "Node 1" },
                    new MockClass { MockProperty = "Node 2" },
                };

                // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
                var itemTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                            xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                            xmlns:controls='using:Microsoft.UI.Xaml.Controls'
                            xmlns:local='using:Microsoft.UI.Xaml.Tests.MUXControls.ApiTests'>
                            <controls:BreadcrumbBarItem Content='{Binding}'>
                                <controls:BreadcrumbBarItem.ContentTemplate>
                                    <DataTemplate>
                                        <TextBlock Text='{Binding MockProperty}'/>
                                    </DataTemplate>
                                </controls:BreadcrumbBarItem.ContentTemplate>
                            </controls:BreadcrumbBarItem>
                        </DataTemplate>");

                breadcrumb.ItemTemplate = itemTemplate;

                var stackPanel = new StackPanel();
                stackPanel.Width = 60;
                stackPanel.Children.Add(breadcrumb);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            Button ellipsisButton = null;
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater (1) could not be retrieved");

                var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(0) as BreadcrumbBarItem;
                Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate (1) should have been wrapped in a BreadcrumbBarItem.");

                ellipsisButton = (Button)breadcrumbNode1.FindVisualChildByName("PART_ItemButton");
                Verify.IsNotNull(ellipsisButton, "The ellipsis item (1) could not be retrieved");

                var automationPeer = new ButtonAutomationPeer(ellipsisButton);
                var invokationPattern = automationPeer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
                invokationPattern?.Invoke();
            });

            // GetOpenPopups returns empty list in RS3. The scenario works, this just seems to be a
            // test/infra issue in RS3, so filtering it out for now.
            if (PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone3))
            {
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    var flyout = VisualTreeHelper.GetOpenPopupsForXamlRoot(Content.XamlRoot).Last();
                    Verify.IsNotNull(flyout, "Flyout could not be retrieved");
                    var ellipsisItemsRepeater = TestUtilities.FindDescendents<ItemsRepeater>(flyout).Single();
                    Verify.IsNotNull(ellipsisItemsRepeater, "The underlying flyout items repeater (1) could not be retrieved");

                    ellipsisItemsRepeater.Loaded += (object sender, RoutedEventArgs e) =>
                    {
                        TextBlock ellipsisNode1 = ellipsisItemsRepeater.TryGetElement(0) as TextBlock;
                        Verify.IsNotNull(ellipsisNode1, "Our flyout ItemTemplate (1) should have been wrapped in a TextBlock.");

                    // change this conditions
                    bool testCondition = !(ellipsisNode1.Foreground is SolidColorBrush brush && brush.Color == Colors.Blue);
                        Verify.IsTrue(testCondition, "Default foreground color of the BreadcrumbBarItem should not have been [blue].");
                    };
                });
            }
        }

void VerifyDropdownItemTemplateWithNoControl ( ) [inline]

Definition at line 321 of file BreadcrumbTests.cs.

        {
            BreadcrumbBar breadcrumb = null;

            RunOnUIThread.Execute(() =>
            {
                breadcrumb = new BreadcrumbBar();
                breadcrumb.ItemsSource = new List<string>() { "Node 1", "Node 2" };

                // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
                var itemTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}'/>
                        </DataTemplate>");

                breadcrumb.ItemTemplate = itemTemplate;

                var stackPanel = new StackPanel();
                stackPanel.Width = 60;
                stackPanel.Children.Add(breadcrumb);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            Button ellipsisButton = null;
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater (1) could not be retrieved");

                var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(0) as BreadcrumbBarItem;
                Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate (1) should have been wrapped in a BreadcrumbBarItem.");

                ellipsisButton = (Button)breadcrumbNode1.FindVisualChildByName("PART_ItemButton");
                Verify.IsNotNull(ellipsisButton, "The ellipsis item (1) could not be retrieved");

                var automationPeer = new ButtonAutomationPeer(ellipsisButton);
                var invokationPattern = automationPeer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
                invokationPattern?.Invoke();
            });

            // GetOpenPopups returns empty list in RS3. The scenario works, this just seems to be a
            // test/infra issue in RS3, so filtering it out for now.
            if (PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone3))
            {
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    var flyout = VisualTreeHelper.GetOpenPopupsForXamlRoot(Content.XamlRoot).Last();
                    Verify.IsNotNull(flyout, "Flyout could not be retrieved");
                    var ellipsisItemsRepeater = TestUtilities.FindDescendents<ItemsRepeater>(flyout).Single();
                    Verify.IsNotNull(ellipsisItemsRepeater, "The underlying flyout items repeater (1) could not be retrieved");

                    ellipsisItemsRepeater.Loaded += (object sender, RoutedEventArgs e) =>
                    {
                        TextBlock ellipsisNode1 = ellipsisItemsRepeater.TryGetElement(0) as TextBlock;
                        Verify.IsNotNull(ellipsisNode1, "Our flyout ItemTemplate (1) should have been wrapped in a TextBlock.");

                    // change this conditions
                    bool testCondition = !(ellipsisNode1.Foreground is SolidColorBrush brush && brush.Color == Colors.Blue);
                        Verify.IsTrue(testCondition, "Default foreground color of the BreadcrumbBarItem should not have been [blue].");
                    };
                });
            }
        }

void VerifyNumericItemsSource ( ) [inline]

Definition at line 135 of file BreadcrumbTests.cs.

        {
            BreadcrumbBar breadcrumb = null;
            BreadcrumbBar breadcrumb2 = null;
            RunOnUIThread.Execute(() =>
            {
                // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}'/>
                        </DataTemplate>");

                breadcrumb = new BreadcrumbBar();
                breadcrumb.ItemsSource = new List<int>() { 1, 2 };
                breadcrumb.ItemTemplate = itemTemplate;

                breadcrumb2 = new BreadcrumbBar();
                breadcrumb2.ItemsSource = new List<float>() { 1.4f, 4.5f };
                breadcrumb2.ItemTemplate = itemTemplate;

                var stackPanel = new StackPanel();
                stackPanel.Children.Add(breadcrumb);
                stackPanel.Children.Add(breadcrumb2);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");

                ItemsRepeater breadcrumbItemsRepeater2 = (ItemsRepeater)breadcrumb2.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater2, "The underlying items repeater could not be retrieved");

                var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
                var breadcrumbNode2 = breadcrumbItemsRepeater2.TryGetElement(1) as BreadcrumbBarItem;
                Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
                Verify.IsNotNull(breadcrumbNode2, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
            });
        }

void VerifyObjectItemsSource ( ) [inline]

Definition at line 190 of file BreadcrumbTests.cs.

        {
            BreadcrumbBar breadcrumb = null;
            RunOnUIThread.Execute(() =>
            {
                // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                            xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                            xmlns:controls='using:Microsoft.UI.Xaml.Controls'
                            xmlns:local='using:Microsoft.UI.Xaml.Tests.MUXControls.ApiTests'>
                            <controls:BreadcrumbBarItem Content='{Binding}'>
                                <controls:BreadcrumbBarItem.ContentTemplate>
                                    <DataTemplate>
                                        <TextBlock Text='{Binding MockProperty}'/>
                                    </DataTemplate>
                                </controls:BreadcrumbBarItem.ContentTemplate>
                            </controls:BreadcrumbBarItem>
                        </DataTemplate>");

                breadcrumb = new BreadcrumbBar();
                breadcrumb.ItemsSource = new List<MockClass>() {
                    new MockClass { MockProperty = "Node 1" },
                    new MockClass { MockProperty = "Node 2" },
                };
                breadcrumb.ItemTemplate = itemTemplate;

                var stackPanel = new StackPanel();
                stackPanel.Children.Add(breadcrumb);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
                Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");

                var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
                Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
            });
        }

The documentation for this class was generated from the following file:
  • Breadcrumb/APITests/BreadcrumbTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbTests::MockClass Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • BreadcrumbTests
  • BreadcrumbTests::MockClass
Public Member Functions | Properties

BreadcrumbTests::MockClass Class Reference

List of all members.

Public Member Functions

MockClass ()

Properties

string MockProperty [get, set]

Detailed Description

Definition at line 180 of file BreadcrumbTests.cs.

Constructor & Destructor Documentation

MockClass ( ) [inline]

Definition at line 184 of file BreadcrumbTests.cs.

            {
            }

Property Documentation

string MockProperty [get, set]

Definition at line 182 of file BreadcrumbTests.cs.

The documentation for this class was generated from the following file:
  • Breadcrumb/APITests/BreadcrumbTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteractionTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ButtonInteractionTests
Public Member Functions

ButtonInteractionTests Class Reference

List of all members.

Public Member Functions

void | DoesAdvertiseSupportedEvents ()
void | ValidateDefaultValues ()

Detailed Description

Definition at line 23 of file ButtonInteractionTests.cs.

Member Function Documentation

void DoesAdvertiseSupportedEvents ( ) [inline]

Definition at line 45 of file ButtonInteractionTests.cs.

        {
            if (!ApiInformation.IsPropertyPresent("Microsoft.UI.Xaml.UIElement", "Interactions"))
            {
                Log.Warning("UIElement.Interactions not supported on this build.");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                var interaction = new ButtonInteraction();
                var supportedEvents = interaction.GetSupportedEvents();

                Verify.IsGreaterThan(supportedEvents.Count, 0);
            });
        }

void ValidateDefaultValues ( ) [inline]

Definition at line 26 of file ButtonInteractionTests.cs.

        {
            if (!ApiInformation.IsPropertyPresent("Microsoft.UI.Xaml.UIElement", "Interactions"))
            {
                Log.Warning("UIElement.Interactions not supported on this build.");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                var interaction = new ButtonInteraction();

                Verify.AreEqual(ButtonInteractionInvokeMode.Release, interaction.InvokeMode);
                Verify.AreEqual(false, interaction.IsHovering);
                Verify.AreEqual(false, interaction.IsPressing);
            });
        }

The documentation for this class was generated from the following file:
  • Interactions/ButtonInteraction/APITests/ButtonInteractionTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CalendarViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • CalendarViewTests
Public Member Functions

CalendarViewTests Class Reference

List of all members.

Public Member Functions

void VerifyVisualTree ()

Detailed Description

Definition at line 19 of file CalendarViewTests.cs.

Member Function Documentation

void VerifyVisualTree ( ) [inline]

Definition at line 24 of file CalendarViewTests.cs.

        {
            CalendarView calendarView = null;
            RunOnUIThread.Execute(() =>
            {
                calendarView = new CalendarView();
                calendarView.Width = 400;
                calendarView.Height = 400;
                calendarView.SetDisplayDate(new DateTime(2000, 1, 1));
            });
            TestUtilities.SetAsVisualTreeRoot(calendarView);

            VisualTreeTestHelper.VerifyVisualTree(root: calendarView, verificationFileNamePrefix: "CalendarView");
        }

The documentation for this class was generated from the following file:
  • CommonStyles/APITests/CalendarViewTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Category Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • Category
Public Member Functions | Properties

Category Class Reference

List of all members.

Public Member Functions

Category (String content, String name, String icon, ObservableCollection< Category > children, bool selectsOnInvoked)

Properties

ObservableCollection< Category > | Children [get, set]
String | Content [get, set]
String | Icon [get, set]
String | Name [get, set]
bool | SelectsOnInvoked [get, set]

Detailed Description

Definition at line 30 of file NavigationViewTests.cs.

Constructor & Destructor Documentation

Category | ( | String | content,
 |  | String | name,
 |  | String | icon,
 |  | ObservableCollection< Category > | children,
 |  | bool | selectsOnInvoked |
 | ) |  |  | [inline]

Definition at line 38 of file NavigationViewTests.cs.

        {
            this.Content = content;
            this.Name = name;
            this.Icon = icon;
            this.Children = children;
            this.SelectsOnInvoked = selectsOnInvoked;
        }

Property Documentation

ObservableCollection<Category> Children [get, set]

Definition at line 35 of file NavigationViewTests.cs.

String Content [get, set]

Definition at line 32 of file NavigationViewTests.cs.

String Icon [get, set]

Definition at line 34 of file NavigationViewTests.cs.

String Name [get, set]

Definition at line 33 of file NavigationViewTests.cs.

bool SelectsOnInvoked [get, set]

Definition at line 36 of file NavigationViewTests.cs.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_ApiTests/NavigationViewTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ColorPickerTests
Public Member Functions | Private Member Functions

ColorPickerTests Class Reference

List of all members.

Public Member Functions

void | ColorPickerDerivationTest ()
void | ColorPickerEventsTest ()
void | ColorPickerTest ()
void | ColorSpectrumEventsTest ()
void | ColorSpectrumTest ()
void | ValidateFractionalWidthDoesNotCrash ()
void | ValidateHueRange ()
void | VerifyClearingAlphaChannelInputFieldDoesNotCrash ()
void | VerifyClearingHexInputFieldDoesNotCrash ()
void | VerifyColorPropertyMetadata ()
void | VerifyVisualTree ()

Private Member Functions

void | SetAsRootAndWaitForColorSpectrumFill (FrameworkElement element)

Detailed Description

Definition at line 28 of file ColorPickerTests.cs.

Member Function Documentation

void ColorPickerDerivationTest ( ) [inline]

Definition at line 193 of file ColorPickerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                // Just create the derived type -- all we're exercising here is the initialization path.
                // (ColorSpectrum does things in its initialization path that would QueryInterface the outer).
                MyColorSpectrum colorSpectrum = new MyColorSpectrum();
            });

            IdleSynchronizer.Wait();
        }

void ColorPickerEventsTest ( ) [inline]

Definition at line 105 of file ColorPickerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ColorPicker colorPicker = new ColorPicker();

                colorPicker.ColorChanged += (ColorPicker sender, ColorChangedEventArgs args) =>
                {
                    Verify.AreEqual(args.OldColor, Microsoft.UI.Colors.White);
                    Verify.AreEqual(args.NewColor, Microsoft.UI.Colors.Green);
                };

                colorPicker.Color = Microsoft.UI.Colors.Green;
            });
        }

void ColorPickerTest ( ) [inline]

Definition at line 31 of file ColorPickerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ColorPicker colorPicker = new ColorPicker();
                Verify.IsNotNull(colorPicker);

                Verify.AreEqual(Microsoft.UI.Colors.White, colorPicker.Color);
                Verify.IsNull(colorPicker.PreviousColor);
                Verify.IsFalse(colorPicker.IsAlphaEnabled);
                Verify.IsTrue(colorPicker.IsColorSpectrumVisible);
                Verify.IsTrue(colorPicker.IsColorPreviewVisible);
                Verify.IsTrue(colorPicker.IsColorSliderVisible);
                Verify.IsTrue(colorPicker.IsAlphaSliderVisible);
                Verify.IsFalse(colorPicker.IsMoreButtonVisible);
                Verify.IsTrue(colorPicker.IsColorChannelTextInputVisible);
                Verify.IsTrue(colorPicker.IsAlphaTextInputVisible);
                Verify.IsTrue(colorPicker.IsHexInputVisible);
                Verify.AreEqual(0, colorPicker.MinHue);
                Verify.AreEqual(359, colorPicker.MaxHue);
                Verify.AreEqual(0, colorPicker.MinSaturation);
                Verify.AreEqual(100, colorPicker.MaxSaturation);
                Verify.AreEqual(0, colorPicker.MinValue);
                Verify.AreEqual(100, colorPicker.MaxValue);
                Verify.AreEqual(ColorSpectrumShape.Box, colorPicker.ColorSpectrumShape);
                Verify.AreEqual(ColorSpectrumComponents.HueSaturation, colorPicker.ColorSpectrumComponents);

                // Clamping the min and max properties changes the color value,
                // so let's test this new value before we change those.
                colorPicker.Color = Microsoft.UI.Colors.Green;
                Verify.AreEqual(Microsoft.UI.Colors.Green, colorPicker.Color);

                colorPicker.PreviousColor = Microsoft.UI.Colors.Red;
                colorPicker.IsAlphaEnabled = true;
                colorPicker.IsColorSpectrumVisible = false;
                colorPicker.IsColorPreviewVisible = false;
                colorPicker.IsColorSliderVisible = false;
                colorPicker.IsAlphaSliderVisible = false;
                colorPicker.IsMoreButtonVisible = true;
                colorPicker.IsColorChannelTextInputVisible = false;
                colorPicker.IsAlphaTextInputVisible = false;
                colorPicker.IsHexInputVisible = false;
                colorPicker.MinHue = 10;
                colorPicker.MaxHue = 300;
                colorPicker.MinSaturation = 10;
                colorPicker.MaxSaturation = 90;
                colorPicker.MinValue = 10;
                colorPicker.MaxValue = 90;
                colorPicker.ColorSpectrumShape = ColorSpectrumShape.Ring;
                colorPicker.ColorSpectrumComponents = ColorSpectrumComponents.HueValue;

                Verify.AreNotEqual(Microsoft.UI.Colors.Green, colorPicker.Color);
                Verify.AreEqual(Microsoft.UI.Colors.Red, colorPicker.PreviousColor);
                Verify.IsTrue(colorPicker.IsAlphaEnabled);
                Verify.IsFalse(colorPicker.IsColorSpectrumVisible);
                Verify.IsFalse(colorPicker.IsColorPreviewVisible);
                Verify.IsFalse(colorPicker.IsColorSliderVisible);
                Verify.IsFalse(colorPicker.IsAlphaSliderVisible);
                Verify.IsTrue(colorPicker.IsMoreButtonVisible);
                Verify.IsFalse(colorPicker.IsColorChannelTextInputVisible);
                Verify.IsFalse(colorPicker.IsAlphaTextInputVisible);
                Verify.IsFalse(colorPicker.IsHexInputVisible);
                Verify.AreEqual(10, colorPicker.MinHue);
                Verify.AreEqual(300, colorPicker.MaxHue);
                Verify.AreEqual(10, colorPicker.MinSaturation);
                Verify.AreEqual(90, colorPicker.MaxSaturation);
                Verify.AreEqual(10, colorPicker.MinValue);
                Verify.AreEqual(90, colorPicker.MaxValue);
                Verify.AreEqual(ColorSpectrumShape.Ring, colorPicker.ColorSpectrumShape);
                Verify.AreEqual(ColorSpectrumComponents.HueValue, colorPicker.ColorSpectrumComponents);
            });
        }

void ColorSpectrumEventsTest ( ) [inline]

Definition at line 176 of file ColorPickerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ColorSpectrum colorSpectrum = new ColorSpectrum();

                colorSpectrum.ColorChanged += (ColorSpectrum sender, ColorChangedEventArgs args) =>
                {
                    Verify.AreEqual(args.OldColor, Microsoft.UI.Colors.Red);
                    Verify.AreEqual(args.NewColor, Microsoft.UI.Colors.Green);
                };

                colorSpectrum.Color = Microsoft.UI.Colors.Green;
            });
        }

void ColorSpectrumTest ( ) [inline]

Definition at line 122 of file ColorPickerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ColorSpectrum colorSpectrum = new ColorSpectrum();
                Verify.IsNotNull(colorSpectrum);

                Verify.AreEqual(Microsoft.UI.Colors.White, colorSpectrum.Color);
                Verify.AreEqual(new Vector4() { X = 0.0f, Y = 0.0f, Z = 1.0f, W = 1.0f}, colorSpectrum.HsvColor);
                Verify.AreEqual(0, colorSpectrum.MinHue);
                Verify.AreEqual(359, colorSpectrum.MaxHue);
                Verify.AreEqual(0, colorSpectrum.MinSaturation);
                Verify.AreEqual(100, colorSpectrum.MaxSaturation);
                Verify.AreEqual(0, colorSpectrum.MinValue);
                Verify.AreEqual(100, colorSpectrum.MaxValue);
                Verify.AreEqual(ColorSpectrumShape.Box, colorSpectrum.Shape);
                Verify.AreEqual(ColorSpectrumComponents.HueSaturation, colorSpectrum.Components);

                colorSpectrum.Color = Microsoft.UI.Colors.Green;
                colorSpectrum.MinHue = 10;
                colorSpectrum.MaxHue = 300;
                colorSpectrum.MinSaturation = 10;
                colorSpectrum.MaxSaturation = 90;
                colorSpectrum.MinValue = 10;
                colorSpectrum.MaxValue = 90;
                colorSpectrum.Shape = ColorSpectrumShape.Ring;
                colorSpectrum.Components = ColorSpectrumComponents.HueValue;

                Verify.AreEqual(Microsoft.UI.Colors.Green, colorSpectrum.Color);

                // We'll probably encounter some level of rounding error here,
                // so we want to check that the HSV color is *close* to what's expected,
                // not exactly equal.
                Verify.IsLessThan(Math.Abs(colorSpectrum.HsvColor.X - 120.0), 0.1);
                Verify.IsLessThan(Math.Abs(colorSpectrum.HsvColor.Y - 1.0), 0.1);
                Verify.IsLessThan(Math.Abs(colorSpectrum.HsvColor.Z - 0.5), 0.1);

                Verify.AreEqual(10, colorSpectrum.MinHue);
                Verify.AreEqual(300, colorSpectrum.MaxHue);
                Verify.AreEqual(10, colorSpectrum.MinSaturation);
                Verify.AreEqual(90, colorSpectrum.MaxSaturation);
                Verify.AreEqual(10, colorSpectrum.MinValue);
                Verify.AreEqual(90, colorSpectrum.MaxValue);
                Verify.AreEqual(ColorSpectrumShape.Ring, colorSpectrum.Shape);
                Verify.AreEqual(ColorSpectrumComponents.HueValue, colorSpectrum.Components);

                colorSpectrum.HsvColor = new Vector4() { X = 120.0f, Y = 1.0f, Z = 1.0f, W = 1.0f };

                Verify.AreEqual(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0), colorSpectrum.Color);
                Verify.AreEqual(new Vector4() { X = 120.0f, Y = 1.0f, Z = 1.0f, W = 1.0f }, colorSpectrum.HsvColor);
            });
        }

void SetAsRootAndWaitForColorSpectrumFill ( FrameworkElement element ) [inline, private]

Definition at line 329 of file ColorPickerTests.cs.

        {
            ManualResetEvent spectrumLoadedEvent = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                element.Loaded += (sender, args) =>
                {
                    var spectrumRectangle = VisualTreeUtils.FindVisualChildByName(element, "SpectrumRectangle") as Rectangle;
                    Verify.IsNotNull(spectrumRectangle);

                    spectrumRectangle.RegisterPropertyChangedCallback(Shape.FillProperty, (o, dp) =>
                    {
                        spectrumLoadedEvent.Set();
                    });
                };

                Content = element;
                Content.UpdateLayout();
            });

            spectrumLoadedEvent.WaitOne();
        }

void ValidateFractionalWidthDoesNotCrash ( ) [inline]

Definition at line 228 of file ColorPickerTests.cs.

        {
            ColorSpectrum colorSpectrum = null;

            RunOnUIThread.Execute(() =>
            {
                colorSpectrum = new ColorSpectrum();

                // 332.75 is the fractional value that caused a crash in Settings when DPI was set to 200%
                // and text scaling was set to >160%.  It ensures that we exercise all of the round() fixes
                // that we made in ColorSpectrum to ensure we always round fractional values instead of
                // truncating them.
                colorSpectrum.Width = 332.75;
                colorSpectrum.Height = 332.75;
            });

            SetAsRootAndWaitForColorSpectrumFill(colorSpectrum);
        }

void ValidateHueRange ( ) [inline]

Definition at line 206 of file ColorPickerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var colorPicker = new ColorPicker();
                try
                {
                    colorPicker.MinHue = -1;
                    Verify.Fail("Invalid argument exception wasn't raised.");
                }
                catch (ArgumentException /*e*/)
                {
                    // Due to a bug in C#/WinRT (https://github.com/microsoft/CsWinRT/issues/430),
                    // we don't get a specific exception message. We should re-enable this check once that bug is fixed.
                    //Verify.IsTrue(e.Message.Contains("MinHue must be between 0 and 359."));
                }
            });

            IdleSynchronizer.Wait();
        }

void VerifyClearingAlphaChannelInputFieldDoesNotCrash ( ) [inline]

Definition at line 274 of file ColorPickerTests.cs.

        {
            ColorPicker colorPicker = null;

            RunOnUIThread.Execute(() =>
            {
                colorPicker = new ColorPicker();
                colorPicker.IsAlphaEnabled = true;

                Content = colorPicker;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var alphaChannelTextBox = VisualTreeUtils.FindVisualChildByName(colorPicker, "AlphaTextBox") as TextBox;

                Verify.IsGreaterThan(alphaChannelTextBox.Text.Length, 0, "Alpha channel TextBox should have not been empty.");

                // Clearing the alpha channel input field should not crash the app.
                alphaChannelTextBox.Text = "";
            });
        }

void VerifyClearingHexInputFieldDoesNotCrash ( ) [inline]

Definition at line 248 of file ColorPickerTests.cs.

        {
            ColorPicker colorPicker = null;

            RunOnUIThread.Execute(() =>
            {
                colorPicker = new ColorPicker();
                colorPicker.IsHexInputVisible = true;

                Content = colorPicker;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var hexTextBox = VisualTreeUtils.FindVisualChildByName(colorPicker, "HexTextBox") as TextBox;

                Verify.IsGreaterThan(hexTextBox.Text.Length, 0, "Hex TextBox should have not been empty.");

                // Clearing the hex input field should not crash the app.
                hexTextBox.Text = "";
            });
        }

void VerifyColorPropertyMetadata ( ) [inline]

Definition at line 302 of file ColorPickerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                XamlControlsXamlMetaDataProvider provider = new XamlControlsXamlMetaDataProvider();
                var colorPickerType = provider.GetXamlType(typeof(ColorPicker).FullName);
                var colorMember = colorPickerType.GetMember("Color");
                var memberType = colorMember.Type;
                Verify.AreEqual(memberType.BaseType.FullName, "ValueType");
            });
        }

void VerifyVisualTree ( ) [inline]

Definition at line 316 of file ColorPickerTests.cs.

        {
            ColorPicker colorPicker = null;
            RunOnUIThread.Execute(() =>
            {
                colorPicker = new ColorPicker { IsAlphaEnabled = true, Width=300, Height=600 };
            });
            TestUtilities.SetAsVisualTreeRoot(colorPicker);

            VisualTreeTestHelper.VerifyVisualTree(root: colorPicker, verificationFileNamePrefix: "ColorPicker");
        }

The documentation for this class was generated from the following file:
  • ColorPicker/APITests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBoxTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ComboBoxTests
Public Member Functions | Private Member Functions

ComboBoxTests Class Reference

List of all members.

Public Member Functions

void | VerifyComboBoxEditModeCornerRadius ()
void | VerifyComboBoxOverlayCornerRadius ()
void | VerifyVisualTree ()

Private Member Functions

ComboBox | SetupComboBox (bool useContent=true)

Detailed Description

Definition at line 18 of file ComboBoxTests.cs.

Member Function Documentation

ComboBox SetupComboBox ( bool useContent = true ) [inline, private]

Definition at line 90 of file ComboBoxTests.cs.

        {
            ComboBox comboBox = null;
            RunOnUIThread.Execute(() =>
            {
                comboBox = new ComboBox();
                comboBox.Items.Add("Item 1");
                comboBox.Items.Add("Item 2");
                comboBox.Items.Add("Item 3");
                comboBox.Items.Add("Item 4");
                comboBox.Items.Add("Item 5");
                comboBox.Items.Add("Item 6");
                if (useContent)
                {
                    Content = comboBox;
                    Content.UpdateLayout();
                }
            });
            if(!useContent)
            {
                TestUtilities.SetAsVisualTreeRoot(comboBox);
            }
            Verify.IsNotNull(comboBox);
            return comboBox;
        }

void VerifyComboBoxEditModeCornerRadius ( ) [inline]

Definition at line 49 of file ComboBoxTests.cs.

        {
            var comboBox = SetupComboBox();
            RunOnUIThread.Execute(() =>
            {
                comboBox.CornerRadius = new CornerRadius(2);
                comboBox.IsEditable = true;
                comboBox.IsDropDownOpen = true;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var editableText = TestUtilities.FindDescendents<TextBox>(comboBox).Where(e => e.Name == "EditableText").Single();
                Verify.AreEqual(new CornerRadius(2, 2, 0, 0), editableText.CornerRadius);

                var overlayCornerRadius = new CornerRadius(0, 0, 0, 0);
                var radius = App.Current.Resources["OverlayCornerRadius"];
                if (radius != null)
                {
                    overlayCornerRadius = (CornerRadius)radius;
                }
                var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(comboBox.XamlRoot).Last();
                var popupBorder = TestUtilities.FindDescendents<Border>(popup).Where(e => e.Name == "PopupBorder").Single();
                Verify.AreEqual(new CornerRadius(0, 0, overlayCornerRadius.BottomRight, overlayCornerRadius.BottomLeft), popupBorder.CornerRadius);
            });
        }

void VerifyComboBoxOverlayCornerRadius ( ) [inline]

Definition at line 21 of file ComboBoxTests.cs.

        {
            var comboBox = SetupComboBox();
            RunOnUIThread.Execute(() =>
            {
                comboBox.CornerRadius = new CornerRadius(2);
                comboBox.IsDropDownOpen = true;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var background = TestUtilities.FindDescendents<Border>(comboBox).Where(e => e.Name == "Background").Single();
                Verify.AreEqual(new CornerRadius(2, 2, 2, 2), background.CornerRadius);

                var overlayCornerRadius = new CornerRadius(0, 0, 0, 0);
                var radius = App.Current.Resources["OverlayCornerRadius"];
                if (radius != null)
                {
                    overlayCornerRadius = (CornerRadius)radius;
                }
                var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(comboBox.XamlRoot).Last();
                var popupBorder = TestUtilities.FindDescendents<Border>(popup).Where(e => e.Name=="PopupBorder").Single();
                Verify.AreEqual(overlayCornerRadius, popupBorder.CornerRadius);
            });
        }

void VerifyVisualTree ( ) [inline]

Definition at line 78 of file ComboBoxTests.cs.

        {
            var comboBox = SetupComboBox(useContent: false);
            RunOnUIThread.Execute(() =>
            {
                comboBox.IsDropDownOpen = true;
            });
            IdleSynchronizer.Wait();

            VisualTreeTestHelper.VerifyVisualTree(root: comboBox, verificationFileNamePrefix: "ComboBox");
        }

The documentation for this class was generated from the following file:
  • ComboBox/APITests/ComboBoxTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • CommandBarFlyoutTests
Public Member Functions | Private Types | Private Member Functions

CommandBarFlyoutTests Class Reference

List of all members.

Public Member Functions

void | VerifyCommandBarSizingPrimaryItemsLarger ()
void | VerifyCommandBarSizingSecondaryItemsLarger ()
void | VerifyCommandBarSizingSecondaryItemsMaxHeight ()
void | VerifyCommandBarSizingSecondaryItemsMaxWidth ()
void | VerifyDisconnectedFlyoutCommandBar ()
void | VerifyFlyoutCommandsArePropagatedToTheCommandBar ()
void | VerifyFlyoutDefaultPropertyValues ()
void | VerifyPrimaryCommandLabelsAffectLayout ()
void | VerifyPrimaryCommandsCanOverflowToSecondaryItemsControl ()

Private Types

enum | CommandBarSizingOptions { PrimaryItemsLarger, SecondaryItemsLarger, SecondaryItemsMaxWidth, SecondaryItemsMaxHeight }

Private Member Functions

void | CloseFlyout (CommandBarFlyout flyout)
void | OpenFlyout (CommandBarFlyout flyout, Button flyoutTarget)
void | SetupCommandBarFlyoutTest (out CommandBarFlyout flyout, out Button flyoutTarget)
void | VerifyCommandBarSizing (CommandBarSizingOptions sizingOptions)

Detailed Description

Definition at line 25 of file CommandBarFlyoutTests.cs.

Member Enumeration Documentation

enum CommandBarSizingOptions [private]
Enumerator:
PrimaryItemsLarger
SecondaryItemsLarger
SecondaryItemsMaxWidth
SecondaryItemsMaxHeight

Definition at line 76 of file CommandBarFlyoutTests.cs.

        {
            PrimaryItemsLarger,
            SecondaryItemsLarger,
            SecondaryItemsMaxWidth,
            SecondaryItemsMaxHeight,
        }

Member Function Documentation

void CloseFlyout ( CommandBarFlyout flyout ) [inline, private]

Definition at line 447 of file CommandBarFlyoutTests.cs.

        {
            Log.Comment("Closing flyout...");
            AutoResetEvent closedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                flyout.Closed += (sender, args) => closedEvent.Set();
                flyout.Hide();
            });

            TestUtilities.WaitForEvent(closedEvent);
            IdleSynchronizer.Wait();
            Log.Comment("Flyout closed.");
        }

void OpenFlyout | ( | CommandBarFlyout | flyout,
 |  | Button | flyoutTarget |
 | ) |  |  | [inline, private]

Definition at line 431 of file CommandBarFlyoutTests.cs.

        {
            Log.Comment("Opening flyout...");
            AutoResetEvent openedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                flyout.Opened += (sender, args) => openedEvent.Set();
                flyout.ShowAt(flyoutTarget, new FlyoutShowOptions { ShowMode = FlyoutShowMode.Transient });
            });

            TestUtilities.WaitForEvent(openedEvent);
            IdleSynchronizer.Wait();
            Log.Comment("Flyout opened.");
        }

void SetupCommandBarFlyoutTest | ( | out CommandBarFlyout | flyout,
 |  | out Button | flyoutTarget |
 | ) |  |  | [inline, private]

Definition at line 395 of file CommandBarFlyoutTests.cs.

        {
            CommandBarFlyout commandBarFlyout = null;
            Button commandBarFlyoutTarget = null;

            RunOnUIThread.Execute(() =>
            {
                commandBarFlyout = new CommandBarFlyout() { Placement = FlyoutPlacementMode.Right };

                commandBarFlyout.PrimaryCommands.Add(new AppBarButton() { Icon = new SymbolIcon(Symbol.Cut) });
                commandBarFlyout.PrimaryCommands.Add(new AppBarButton() { Icon = new SymbolIcon(Symbol.Copy) });
                commandBarFlyout.PrimaryCommands.Add(new AppBarButton() { Icon = new SymbolIcon(Symbol.Paste) });
                commandBarFlyout.PrimaryCommands.Add(new AppBarButton() { Icon = new SymbolIcon(Symbol.Bold) });
                commandBarFlyout.PrimaryCommands.Add(new AppBarButton() { Icon = new SymbolIcon(Symbol.Italic) });
                commandBarFlyout.PrimaryCommands.Add(new AppBarButton() { Icon = new SymbolIcon(Symbol.Underline) });

                AppBarButton undoButton = new AppBarButton() { Label = "Undo", Icon = new SymbolIcon(Symbol.Undo) };
                commandBarFlyout.SecondaryCommands.Add(undoButton);
                AppBarButton redoButton = new AppBarButton() { Label = "Redo", Icon = new SymbolIcon(Symbol.Redo) };
                commandBarFlyout.SecondaryCommands.Add(redoButton);
                AppBarButton selectAllButton = new AppBarButton() { Label = "Select all" };
                commandBarFlyout.SecondaryCommands.Add(selectAllButton);

                undoButton.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
                redoButton.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
                selectAllButton.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });

                commandBarFlyoutTarget = new Button() { Content = "Click for flyout" };
                Content = commandBarFlyoutTarget;
                Content.UpdateLayout();
            });

            flyout = commandBarFlyout;
            flyoutTarget = commandBarFlyoutTarget;
        }

void VerifyCommandBarSizing ( CommandBarSizingOptions sizingOptions ) [inline, private]

Definition at line 112 of file CommandBarFlyoutTests.cs.

        {
            CommandBarFlyout commandBarFlyout = null;
            Button commandBarFlyoutTarget = null;

            SetupCommandBarFlyoutTest(out commandBarFlyout, out commandBarFlyoutTarget);

            RunOnUIThread.Execute(() =>
            {
                switch (sizingOptions)
                {
                    case CommandBarSizingOptions.SecondaryItemsLarger:
                        commandBarFlyout.SecondaryCommands.Add(new AppBarButton() { Label = "Item with a label wider than primary items" });
                        break;
                    case CommandBarSizingOptions.SecondaryItemsMaxWidth:
                        commandBarFlyout.SecondaryCommands.Add(new AppBarButton() { Label = "Item with a really really really long label that will not fit in the space provided" });
                        break;
                    case CommandBarSizingOptions.SecondaryItemsMaxHeight:
                        for (int i = 0; i < 20; i++)
                        {
                            commandBarFlyout.SecondaryCommands.Add(new AppBarButton() { Label = "Do another thing" });
                        }
                        break;
                }
            });

            OpenFlyout(commandBarFlyout, commandBarFlyoutTarget);

            CommandBar commandBar = null;

            RunOnUIThread.Execute(() =>
            {
                Popup flyoutPopup = VisualTreeHelper.GetOpenPopupsForXamlRoot(commandBarFlyout.XamlRoot).Last();
                commandBar = TestUtilities.FindDescendents<CommandBar>(flyoutPopup).Single();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Pre-RS5, CommandBarFlyouts always open expanded, so to put us in a known good state,
                // we'll collapse the flyout before we do anything else.
                commandBar.IsOpen = false;
            });

            IdleSynchronizer.Wait();

            double originalWidth = 0;
            double originalHeight = 0;

            RunOnUIThread.Execute(() =>
            {
                Popup flyoutPopup = VisualTreeHelper.GetOpenPopupsForXamlRoot(commandBar.XamlRoot).Last();
                commandBar = TestUtilities.FindDescendents<CommandBar>(flyoutPopup).Single();

                originalWidth = commandBar.ActualWidth;
                originalHeight = commandBar.ActualHeight;

                commandBar.IsOpen = true;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                CommandBarOverflowPresenter overflowPresenter = TestUtilities.FindDescendents<CommandBarOverflowPresenter>(commandBar).Single();

                if (sizingOptions == CommandBarSizingOptions.PrimaryItemsLarger ||
                    sizingOptions == CommandBarSizingOptions.SecondaryItemsMaxHeight)
                {
                    Verify.AreEqual(originalWidth, commandBar.ActualWidth);
                    Verify.AreEqual(originalWidth, overflowPresenter.ActualWidth);
                }
                else
                {
                    Verify.IsLessThan(originalWidth, commandBar.ActualWidth);
                    Verify.AreEqual(overflowPresenter.ActualWidth, commandBar.ActualWidth);
                }

                Verify.AreEqual(originalHeight, commandBar.ActualHeight);

                if (sizingOptions == CommandBarSizingOptions.SecondaryItemsMaxWidth)
                {
                    Verify.AreEqual(commandBar.MaxWidth, commandBar.ActualWidth);
                }
                else if (sizingOptions == CommandBarSizingOptions.SecondaryItemsMaxHeight)
                {
                    Verify.AreEqual(overflowPresenter.MaxHeight, overflowPresenter.ActualHeight);
                }

                commandBar.IsOpen = false;
            });

            IdleSynchronizer.Wait();
            CloseFlyout(commandBarFlyout);
        }

void VerifyCommandBarSizingPrimaryItemsLarger ( ) [inline]

Definition at line 86 of file CommandBarFlyoutTests.cs.

        {
            VerifyCommandBarSizing(CommandBarSizingOptions.PrimaryItemsLarger);
        }

void VerifyCommandBarSizingSecondaryItemsLarger ( ) [inline]

Definition at line 93 of file CommandBarFlyoutTests.cs.

        {
            VerifyCommandBarSizing(CommandBarSizingOptions.SecondaryItemsLarger);
        }

void VerifyCommandBarSizingSecondaryItemsMaxHeight ( ) [inline]

Definition at line 107 of file CommandBarFlyoutTests.cs.

        {
            VerifyCommandBarSizing(CommandBarSizingOptions.SecondaryItemsMaxHeight);
        }

void VerifyCommandBarSizingSecondaryItemsMaxWidth ( ) [inline]

Definition at line 100 of file CommandBarFlyoutTests.cs.

        {
            VerifyCommandBarSizing(CommandBarSizingOptions.SecondaryItemsMaxWidth);
        }

void VerifyDisconnectedFlyoutCommandBar ( ) [inline]

Definition at line 372 of file CommandBarFlyoutTests.cs.

        {
            CommandBarFlyoutCommandBar cbfcb = null;
            DesktopAcrylicBackdrop dba = null;

            RunOnUIThread.Execute(() =>
            {
                cbfcb = new CommandBarFlyoutCommandBar();
                dba = new DesktopAcrylicBackdrop();

                // cbfcb isn't in the tree yet. Setting this shouldn't crash. The parser will do this (set properties before inserting into tree).
                cbfcb.SystemBackdrop = dba;

                // dbfcb shouldn't crash when it's destroyed.
                cbfcb = null;
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
            });

            IdleSynchronizer.Wait();
        }

void VerifyFlyoutCommandsArePropagatedToTheCommandBar ( ) [inline]

Definition at line 45 of file CommandBarFlyoutTests.cs.

        {
            CommandBarFlyout commandBarFlyout = null;
            Button commandBarFlyoutTarget = null;

            SetupCommandBarFlyoutTest(out commandBarFlyout, out commandBarFlyoutTarget);
            OpenFlyout(commandBarFlyout, commandBarFlyoutTarget);

            RunOnUIThread.Execute(() =>
            {
                Popup flyoutPopup = VisualTreeHelper.GetOpenPopupsForXamlRoot(commandBarFlyout.XamlRoot).Last();
                CommandBar commandBar = TestUtilities.FindDescendents<CommandBar>(flyoutPopup).Single();

                Verify.AreEqual(commandBarFlyout.PrimaryCommands.Count, commandBar.PrimaryCommands.Count);

                for (int i = 0; i < commandBarFlyout.PrimaryCommands.Count; i++)
                {
                    Verify.AreEqual(commandBarFlyout.PrimaryCommands[i], commandBar.PrimaryCommands[i]);
                }

                Verify.AreEqual(commandBarFlyout.SecondaryCommands.Count, commandBar.SecondaryCommands.Count);

                for (int i = 0; i < commandBarFlyout.SecondaryCommands.Count; i++)
                {
                    Verify.AreEqual(commandBarFlyout.SecondaryCommands[i], commandBar.SecondaryCommands[i]);
                }
            });

            CloseFlyout(commandBarFlyout);
        }

void VerifyFlyoutDefaultPropertyValues ( ) [inline]

Definition at line 29 of file CommandBarFlyoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                CommandBarFlyout commandBarFlyout = new CommandBarFlyout();
                Verify.IsNotNull(commandBarFlyout);

                Verify.IsNotNull(commandBarFlyout.PrimaryCommands);
                Verify.AreEqual(0, commandBarFlyout.PrimaryCommands.Count);
                Verify.IsNotNull(commandBarFlyout.SecondaryCommands);
                Verify.AreEqual(0, commandBarFlyout.SecondaryCommands.Count);
            });
        }

void VerifyPrimaryCommandLabelsAffectLayout ( ) [inline]

Definition at line 278 of file CommandBarFlyoutTests.cs.

        {
            CommandBarFlyout flyout = null;
            Button flyoutTarget = null;
            AppBarButton button1 = null;
            AppBarButton button2 = null;

            RunOnUIThread.Execute(() =>
            {
                flyout = new CommandBarFlyout() { Placement = FlyoutPlacementMode.Right };

                button1 = new AppBarButton();
                button2 = new AppBarButton();

                flyout.PrimaryCommands.Add(button1);
                flyout.PrimaryCommands.Add(button2);

                flyoutTarget = new Button() { Content = "Click for flyout" };
                Content = flyoutTarget;
                Content.UpdateLayout();
            });

            OpenFlyout(flyout, flyoutTarget);

            double originalWidth = 0;
            double originalHeight = 0;

            CommandBar commandBar = null;
            TextBlock button1TextLabel = null;
            TextBlock button2TextLabel = null;

            RunOnUIThread.Execute(() =>
            {
                button1TextLabel = TestUtilities.FindDescendents<TextBlock>(button1).Where(textBlock => textBlock.Name == "TextLabel").Single();
                button2TextLabel = TestUtilities.FindDescendents<TextBlock>(button2).Where(textBlock => textBlock.Name == "TextLabel").Single();

                Log.Comment("We expect the TextLabel template parts to be collapsed when the Label property is empty.");
                Verify.AreEqual(Visibility.Collapsed, button1TextLabel.Visibility);
                Verify.AreEqual(Visibility.Collapsed, button2TextLabel.Visibility);

                Popup flyoutPopup = VisualTreeHelper.GetOpenPopupsForXamlRoot(flyoutTarget.XamlRoot).Last();
                commandBar = TestUtilities.FindDescendents<CommandBar>(flyoutPopup).Single();

                originalWidth = commandBar.ActualWidth;
                originalHeight = commandBar.ActualHeight;
            });

            CloseFlyout(flyout);

            RunOnUIThread.Execute(() =>
            {
                button1.Label = "Item 1";
            });

            OpenFlyout(flyout, flyoutTarget);

            double finalWidth = 0;
            double finalHeight = 0;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("We expect the TextLabel template parts to be visible when the Label property is set.");
                Verify.AreEqual(Visibility.Visible, button1TextLabel.Visibility);
                Verify.AreEqual(Visibility.Visible, button2TextLabel.Visibility);

                finalWidth = commandBar.ActualWidth;
                finalHeight = commandBar.ActualHeight;

                Log.Comment("We also expect the width and height of the AppBarButtons to be larger when the Label property is set on at least one primary command.");
                Verify.IsGreaterThan(finalWidth, originalWidth);
                Verify.IsGreaterThan(finalHeight, originalHeight);
            });

            CloseFlyout(flyout);

            RunOnUIThread.Execute(() =>
            {
                button2.Label = "Item 2";
            });

            OpenFlyout(flyout, flyoutTarget);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Having all labels set should not make things any wider or taller than only some labels set.");
                Verify.AreEqual(Math.Round(finalWidth), Math.Round(commandBar.ActualWidth));
                Verify.AreEqual(Math.Round(finalHeight), Math.Round(commandBar.ActualHeight));
            });

            CloseFlyout(flyout);
        }

void VerifyPrimaryCommandsCanOverflowToSecondaryItemsControl ( ) [inline]

Definition at line 211 of file CommandBarFlyoutTests.cs.

        {
            CommandBarFlyout flyout = null;
            Button flyoutTarget = null;

            RunOnUIThread.Execute(() =>
            {
                flyout = new CommandBarFlyout() { Placement = FlyoutPlacementMode.Right };

                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());
                flyout.PrimaryCommands.Add(new AppBarButton());

                flyout.SecondaryCommands.Add(new AppBarButton() { Label = "Item 21" });
                flyout.SecondaryCommands.Add(new AppBarButton() { Label = "Item 22" });
                flyout.SecondaryCommands.Add(new AppBarButton() { Label = "Item 23" });
                flyout.SecondaryCommands.Add(new AppBarButton() { Label = "Item 24" });
                flyout.SecondaryCommands.Add(new AppBarButton() { Label = "Item 25" });

                flyoutTarget = new Button() { Content = "Click for flyout" };
                Content = flyoutTarget;
                Content.UpdateLayout();
            });

            OpenFlyout(flyout, flyoutTarget);

            RunOnUIThread.Execute(() =>
            {
                Popup flyoutPopup = VisualTreeHelper.GetOpenPopupsForXamlRoot(flyoutTarget.XamlRoot).Last();
                CommandBar commandBar = TestUtilities.FindDescendents<CommandBar>(flyoutPopup).Single();

                IList<ItemsControl> itemsControls = TestUtilities.FindDescendents<ItemsControl>(commandBar);

                Log.Comment("We expect there to be 2 ItemsControls inside the CommandBar; {0} were found.", itemsControls.Count);
                Verify.AreEqual(2, itemsControls.Count);

                ItemsControl primaryItemsControl = itemsControls[0];
                ItemsControl secondaryItemsControl = itemsControls[1];

                Log.Comment("We expect there to be 9 items located inside the primary ItemsControl; {0} were found.", primaryItemsControl.Items.Count);
                Verify.AreEqual(9, primaryItemsControl.Items.Count);
                Log.Comment("We expect there to be 17 items located inside the secondary ItemsControl (16 + autogenerated separator); {0} were found.", secondaryItemsControl.Items.Count);
                Verify.AreEqual(17, secondaryItemsControl.Items.Count);
            });

            CloseFlyout(flyout);
        }

The documentation for this class was generated from the following file:
  • CommandBarFlyout/APITests/CommandBarFlyoutTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStylesApiTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • CommonStylesApiTests
Public Member Functions | Private Member Functions

CommonStylesApiTests Class Reference

List of all members.

Public Member Functions

void | CornerRadiusFilterConverterTest ()
void | DumpThemeResources ()
void | VerifyAllThemesContainSameResourceKeys ()
void | VerifyAppBarButtonChevronMarginsDoNotCollide ()
void | VerifyAppBarButtonLightweightStyling ()
void | VerifyNoResourceKeysWereRemovedFromPreviousStableReleaseInV2Styles ()
void | VerifyVisualTreeForCommandBarCornerRadius ()
void | VerifyVisualTreeForCommandBarOverflowMenu ()
void | VerifyVisualTreeForControlsInCommonStyles ()

Private Member Functions

bool | AreKeysFromExpectedInActualDictionary (ResourceDictionary expectedDictionary, string expectedDictionaryName, ResourceDictionary actualDictionary, string actualDictionaryName)
void | EnsureNoMissingThemeResources (IList< string > baseline, XamlControlsResources dictionaryToVerify)
FrameworkElement | GetVisualChildByName (DependencyObject root, string name)
string | XamlStringForControl (string controlName)

Detailed Description

Definition at line 31 of file CommonStylesTests.cs.

Member Function Documentation

bool AreKeysFromExpectedInActualDictionary | ( | ResourceDictionary | expectedDictionary,
 |  | string | expectedDictionaryName,
 |  | ResourceDictionary | actualDictionary,
 |  | string | actualDictionaryName |
 | ) |  |  | [inline, private]

Definition at line 85 of file CommonStylesTests.cs.

        {
            List<string> missingKeysInActualDictionary = new List<string>();
            foreach (var entry in expectedDictionary)
            {
                if (!actualDictionary.ContainsKey(entry.Key))
                {
                    missingKeysInActualDictionary.Add(entry.Key.ToString());
                }
            }

            if (missingKeysInActualDictionary.Count > 0)
            {
                Log.Comment("Keys found in " + expectedDictionaryName + " but not in " + actualDictionaryName);
                foreach (var missingKey in missingKeysInActualDictionary)
                {
                    Log.Error("* " + missingKey);
                }
            }

            return (missingKeysInActualDictionary.Count == 0);
        }

void CornerRadiusFilterConverterTest ( ) [inline]

Definition at line 207 of file CommonStylesTests.cs.

        {
            if (!PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone4))
            {
                Log.Comment("Corner radius is only available on RS5+");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                var root = (StackPanel)XamlReader.Load(
                    @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                             xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'>
                            <StackPanel.Resources>
                                <primitives:CornerRadiusFilterConverter x:Key='TopCornerRadiusFilterConverter' Filter='Top' Scale='2'/>
                                <primitives:CornerRadiusFilterConverter x:Key='RightCornerRadiusFilterConverter' Filter='Right'/>
                                <primitives:CornerRadiusFilterConverter x:Key='BottomCornerRadiusFilterConverter' Filter='Bottom'/>
                                <primitives:CornerRadiusFilterConverter x:Key='LeftCornerRadiusFilterConverter' Filter='Left'/>
                                <CornerRadius x:Key='testCornerRadius'>6,6,6,6</CornerRadius>
                            </StackPanel.Resources>
                            <Grid x:Name='TopRadiusGrid'
                                CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}'>
                            </Grid>
                            <Grid x:Name='RightRadiusGrid'
                                CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}'>
                            </Grid>
                            <Grid x:Name='BottomRadiusGrid'
                                CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource BottomCornerRadiusFilterConverter}}'>
                            </Grid>
                            <Grid x:Name='LeftRadiusGrid'
                                CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource LeftCornerRadiusFilterConverter}}'>
                            </Grid>
                       </StackPanel>");

                var topRadiusGrid = (Grid)root.FindName("TopRadiusGrid");
                var rightRadiusGrid = (Grid)root.FindName("RightRadiusGrid");
                var bottomRadiusGrid = (Grid)root.FindName("BottomRadiusGrid");
                var leftRadiusGrid = (Grid)root.FindName("LeftRadiusGrid");

                Verify.AreEqual(new CornerRadius(12, 12, 0, 0), topRadiusGrid.CornerRadius);
                Verify.AreEqual(new CornerRadius(0, 6, 6, 0), rightRadiusGrid.CornerRadius);
                Verify.AreEqual(new CornerRadius(0, 0, 6, 6), bottomRadiusGrid.CornerRadius);
                Verify.AreEqual(new CornerRadius(6, 0, 0, 6), leftRadiusGrid.CornerRadius);
            });
        }

void DumpThemeResources ( ) [inline]

Definition at line 155 of file CommonStylesTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var resourceDictionary = new XamlControlsResources();

                Log.Comment("ThemeDictionaries");
                foreach (var key in resourceDictionary.ThemeDictionaries.Keys)
                {
                    Log.Comment("* " + key.ToString());

                    var themeDictionary = resourceDictionary.ThemeDictionaries[key] as ResourceDictionary;
                    foreach (var entry in themeDictionary)
                    {
                        Log.Comment("\t*" + entry.ToString());
                    }
                }

                Log.Comment("Entries in Resource Dictionary");
                foreach (var entry in resourceDictionary)
                {
                    Log.Comment("* " + entry.ToString());
                }
            });
        }

void EnsureNoMissingThemeResources | ( | IList< string > | baseline,
 |  | XamlControlsResources | dictionaryToVerify |
 | ) |  |  | [inline, private]

Definition at line 108 of file CommonStylesTests.cs.

        {
            var actualResourcesKeys = new HashSet<string>();
            var resourceDictionaries = dictionaryToVerify;

            foreach (var dictionaryName in resourceDictionaries.ThemeDictionaries.Keys)
            {
                var themeDictionary = resourceDictionaries.ThemeDictionaries[dictionaryName] as ResourceDictionary;

                foreach (var entry in themeDictionary)
                {
                    string entryKey = entry.Key as string;
                    if (!actualResourcesKeys.Contains(entryKey))
                    {
                        actualResourcesKeys.Add(entryKey);
                    }
                }
            }

            foreach (var entry in resourceDictionaries)
            {
                string entryKey = entry.Key as string;
                if (!actualResourcesKeys.Contains(entryKey))
                {
                    actualResourcesKeys.Add(entryKey);
                }
            }

            StringBuilder missingKeysList = new StringBuilder();

            bool allBaselineResourceKeysExist = true;
            foreach (var baselineResourceKey in baseline)
            {
                if (!actualResourcesKeys.Contains(baselineResourceKey))
                {
                    missingKeysList.Append(baselineResourceKey + ", ");
                    allBaselineResourceKeysExist = false;
                }
            }

            Verify.IsTrue(allBaselineResourceKeysExist, "List of missing resource keys: " + missingKeysList.ToString());
            if(!allBaselineResourceKeysExist)
            {
                Log.Error("List of missing resource keys: " + missingKeysList.ToString());
            }
        }

FrameworkElement GetVisualChildByName | ( | DependencyObject | root,
 |  | string | name |
 | ) |  |  | [inline, private]

Definition at line 499 of file CommonStylesTests.cs.

        {
            if (root is FrameworkElement element && element.Name == name)
            {
                return element;
            }

            int childCount = VisualTreeHelper.GetChildrenCount(root);

            for (int i = 0; i < childCount; i++)
            {
                FrameworkElement visualChild = GetVisualChildByName(VisualTreeHelper.GetChild(root, i), name);

                if (visualChild != null)
                {
                    return visualChild;
                }
            }

            return null;
        }

void VerifyAllThemesContainSameResourceKeys ( ) [inline]

Definition at line 34 of file CommonStylesTests.cs.

        {
            bool dictionariesContainSameElements = true;
            RunOnUIThread.Execute(() =>
            {
                var resourceDictionaries = new XamlControlsResources();
                Log.Comment("ThemeDictionaries");

                var defaultThemeDictionary = resourceDictionaries.ThemeDictionaries["Default"] as ResourceDictionary;

                foreach (var dictionaryName in resourceDictionaries.ThemeDictionaries.Keys)
                {
                    // Skip the Default theme dictionary
                    if (dictionaryName.ToString() == "Default")
                    {
                        continue;
                    }

                    Log.Comment("Comparing against " + dictionaryName.ToString());
                    var themeDictionary = resourceDictionaries.ThemeDictionaries[dictionaryName] as ResourceDictionary;

                    Log.Comment("Keys count in Default: " + defaultThemeDictionary.Keys.Count);
                    Log.Comment("Keys count in " + dictionaryName + ": " + themeDictionary.Keys.Count);

                    bool allKeysInDefaultExistInDictionary = AreKeysFromExpectedInActualDictionary(defaultThemeDictionary, "Default", themeDictionary, dictionaryName.ToString());
                    bool allKeysInDictionaryExistInDefault = AreKeysFromExpectedInActualDictionary(themeDictionary, dictionaryName.ToString(), defaultThemeDictionary, "Default");

                    dictionariesContainSameElements &= (allKeysInDefaultExistInDictionary && allKeysInDictionaryExistInDefault);
                }

                Verify.AreEqual(0, resourceDictionaries.MergedDictionaries.Count, "MergedDictionaries is not empty, Verify if you really wanted to update the merged dictionary. If so, update the test");
            });

            Verify.IsTrue(dictionariesContainSameElements, "Resource Keys you have added are missing in one of the theme dictionaries. This is trouble since we might end up crashing when trying to resolve the key in that Theme.");
            if(!dictionariesContainSameElements)
            {
                Log.Error("Resource Keys you have added are missing in one of the theme dictionaries. This is trouble since we might end up crashing when trying to resolve the key in that Theme.");
            }
        }

void VerifyAppBarButtonChevronMarginsDoNotCollide ( ) [inline]

Definition at line 415 of file CommonStylesTests.cs.

        {
            StackPanel root = null;
            ManualResetEvent rootLoadedEvent = new ManualResetEvent(false);
            CommandBar commandBar = null;
            ManualResetEvent commandBarSizeChangedEvent = new ManualResetEvent(false);
            AppBarButton appBarButton = null;

            RunOnUIThread.Execute(() =>
            {
                root = (StackPanel)XamlReader.Load(
                    @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                            <StackPanel.Resources>
                                <Visibility x:Key='AppBarButtonHasFlyoutChevronVisibility'>Visible</Visibility>
                                <x:String x:Key='AppBarButtonFlyoutGlyph'>&#xE972;</x:String>
                                <Thickness x:Key='AppBarButtonSubItemChevronMargin'>-22,20,12,0</Thickness>
                                <Thickness x:Key='AppBarButtonSubItemChevronLabelOnRightMargin'>-6,20,12,0</Thickness>
                                <MenuFlyout x:Key='MenuFlyout' Placement='Bottom'>
                                    <MenuFlyoutItem Text='Item 1'/>
                                    <MenuFlyoutItem Text='Item 2'/>
                                    <MenuFlyoutItem Text='Item 3'/>
                                </MenuFlyout>
                            </StackPanel.Resources>
                            <CommandBar x:Name='CommandBar' DefaultLabelPosition='Right'>
                                <AppBarButton Label='Add' Icon='Add' Flyout='{StaticResource MenuFlyout}'/>
                                <AppBarSeparator />
                                <AppBarButton x:Name='LastAppBarButton' Label='Add' Icon='Add' Flyout='{StaticResource MenuFlyout}'/>
                                <AppBarSeparator />
                                <CommandBar.SecondaryCommands>
                                    <AppBarButton Icon='Add' Label='Add' />
                                </CommandBar.SecondaryCommands>
                            </CommandBar>
                      </StackPanel>");

                root.Loaded += (sender, args) => { rootLoadedEvent.Set(); };
                commandBar = (CommandBar)root.FindName("CommandBar");
                commandBar.SizeChanged += (sender, args) => { commandBarSizeChangedEvent.Set(); };
                appBarButton = (AppBarButton)root.FindName("LastAppBarButton");

                Content = root;
                Content.UpdateLayout();
            });

            rootLoadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            FontIcon subItemChevron = null;

            RunOnUIThread.Execute(() =>
            {
                subItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "SubItemChevron");

                Verify.AreEqual((Thickness)root.Resources["AppBarButtonSubItemChevronLabelOnRightMargin"], subItemChevron.Margin);

                commandBarSizeChangedEvent.Reset();
                commandBar.Width = 0;
            });

            commandBarSizeChangedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                commandBarSizeChangedEvent.Reset();
                commandBar.Width = double.NaN;
            });

            commandBarSizeChangedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual((Thickness)root.Resources["AppBarButtonSubItemChevronLabelOnRightMargin"], subItemChevron.Margin);
            });
        }

void VerifyAppBarButtonLightweightStyling ( ) [inline]

Definition at line 361 of file CommonStylesTests.cs.

        {
            StackPanel root = null;
            AppBarButton appBarButton = null;
            ManualResetEvent appBarButtonLoadedEvent = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                root = (StackPanel)XamlReader.Load(
                    @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                            <StackPanel.Resources>
                                <Visibility x:Key='AppBarButtonHasFlyoutChevronVisibility'>Collapsed</Visibility>
                                <SolidColorBrush x:Key='AppBarButtonSubItemChevronForeground' Color='Red' />
                                <x:String x:Key='AppBarButtonFlyoutGlyph'>&#xE972;</x:String>
                                <x:Double x:Key='AppBarButtonSubItemChevronFontSize'>12</x:Double>
                                <Thickness x:Key='AppBarButtonSubItemChevronMargin'>-24,20,12,0</Thickness>
                                <x:String x:Key='AppBarButtonOverflowFlyoutGlyph'>&#xE973;</x:String>
                                <x:Double x:Key='AppBarButtonSecondarySubItemChevronFontSize'>14</x:Double>
                                <Thickness x:Key='AppBarButtonSecondarySubItemChevronMargin'>-25,20,12,0</Thickness>
                            </StackPanel.Resources>
                            <AppBarButton x:Name='TestAppBarButton'/>
                      </StackPanel>");

                appBarButton = (AppBarButton)root.FindName("TestAppBarButton");
                appBarButton.Loaded += (sender, args) => { appBarButtonLoadedEvent.Set(); };
                Content = root;
                Content.UpdateLayout();
            });

            appBarButtonLoadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Panel subItemChevronPanel = (Panel)GetVisualChildByName(appBarButton, "SubItemChevronPanel");
                FontIcon subItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "SubItemChevron");
                FontIcon overflowSubItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "OverflowSubItemChevron");

                Verify.AreEqual((Visibility)root.Resources["AppBarButtonHasFlyoutChevronVisibility"], subItemChevronPanel.Visibility);

                Verify.AreEqual((string)root.Resources["AppBarButtonFlyoutGlyph"], subItemChevron.Glyph);
                Verify.AreEqual((double)root.Resources["AppBarButtonSubItemChevronFontSize"], subItemChevron.FontSize);
                Verify.AreEqual(((SolidColorBrush)root.Resources["AppBarButtonSubItemChevronForeground"]).Color, ((SolidColorBrush)subItemChevron.Foreground).Color);
                Verify.AreEqual((Thickness)root.Resources["AppBarButtonSubItemChevronMargin"], subItemChevron.Margin);

                Verify.AreEqual((string)root.Resources["AppBarButtonOverflowFlyoutGlyph"], overflowSubItemChevron.Glyph);
                Verify.AreEqual((double)root.Resources["AppBarButtonSecondarySubItemChevronFontSize"], overflowSubItemChevron.FontSize);
                Verify.AreEqual(((SolidColorBrush)root.Resources["AppBarButtonSubItemChevronForeground"]).Color, ((SolidColorBrush)overflowSubItemChevron.Foreground).Color);
                Verify.AreEqual((Thickness)root.Resources["AppBarButtonSecondarySubItemChevronMargin"], overflowSubItemChevron.Margin);
            });
        }

void VerifyNoResourceKeysWereRemovedFromPreviousStableReleaseInV2Styles ( ) [inline]

Definition at line 75 of file CommonStylesTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                EnsureNoMissingThemeResources(
                BaselineResources.BaselineResourcesList2dot5Stable,
                new XamlControlsResources());
            });
        }

void VerifyVisualTreeForCommandBarCornerRadius ( ) [inline]

Definition at line 288 of file CommonStylesTests.cs.

        {
            var xaml =
                @"<StackPanel Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                        <CommandBar Background='Green' CornerRadius='10,10,10,10' IsOpen='True'>
                        <AppBarToggleButton Icon='Shuffle' Label='Shuffle'  />
                        <AppBarToggleButton Icon='RepeatAll' Label='Repeat' />
                        <AppBarSeparator Margin='20,10,20,0' Foreground='Yellow'/>

                        <CommandBar.Content>
                            <TextBlock Text='Now playing...' Margin='12,14'/>
                        </CommandBar.Content>
                        </CommandBar>
                        <CommandBar Background='Green' CornerRadius='5,10,5,10' IsOpen='False'>
                        <AppBarToggleButton Icon='Shuffle' Label='Shuffle'  />
                        <AppBarToggleButton Icon='RepeatAll' Label='Repeat' />
                        <AppBarSeparator Margin='20,10,20,0' Padding='16,12,15,12' Foreground='Yellow'/>
                        <CommandBar.Content>
                            <TextBlock Text='Now playing...' Margin='12,14'/>
                        </CommandBar.Content>
                        </CommandBar>
                    </StackPanel>";

            VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
                verificationFileNamePrefix: "VerifyVisualTreeForCommandBarCornerRadius");
        }

void VerifyVisualTreeForCommandBarOverflowMenu ( ) [inline]

Definition at line 317 of file CommonStylesTests.cs.

        {
            StackPanel root = null;
            CommandBar commandBar = null;
            UIElement overflowContent = null;

            RunOnUIThread.Execute(() =>
            {
                root = (StackPanel)XamlReader.Load(
                    @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                            <CommandBar x:Name='TestCommandBar'>
                                <AppBarButton Icon='AddFriend'/>
                                <AppBarButton Icon='World' Label='World'/>
                                <AppBarToggleButton Icon='Volume' Label='Volume'/>
                                <CommandBar.SecondaryCommands>
                                    <AppBarButton Label='Like'/>
                                    <AppBarButton Label='Dislike'/>
                                    <AppBarToggleButton Label='Toggle'/>
                                </CommandBar.SecondaryCommands>
                                <CommandBar.Content>
                                    <TextBlock Text='Hello World' Margin='12'/>
                                </CommandBar.Content>
                            </CommandBar>
                      </StackPanel>");

                commandBar = (CommandBar)root.FindName("TestCommandBar");
                Verify.IsNotNull(commandBar);
                Content = root;
                Content.UpdateLayout();
                commandBar.IsOpen = true;
                Content.UpdateLayout();
                var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(Content.XamlRoot).Last();
                Verify.IsNotNull(popup);
                overflowContent = popup.Child;
            });

            var visualTreeDumperFilter = new VisualTreeDumper.DefaultFilter();
            visualTreeDumperFilter.PropertyNameAllowedList.Remove("MaxWidth");
            visualTreeDumperFilter.PropertyNameAllowedList.Remove("MaxHeight");
            VisualTreeTestHelper.VerifyVisualTree(root: overflowContent, verificationFileNamePrefix: "CommandBarOverflowMenu", filter: visualTreeDumperFilter);
        }

void VerifyVisualTreeForControlsInCommonStyles ( ) [inline]

Definition at line 257 of file CommonStylesTests.cs.

        {
            var controlsToVerify = new List<string> {
                "AppBarButton", /*"AppBarToggleButton",*/ "Button", "CheckBox",
                "CommandBar", "ContentDialog", "DatePicker", "FlipView", "ListViewItem",
                "PasswordBox", "Pivot", "PivotItem", "RichEditBox", "Slider", "SplitView",
                "TextBox", "TimePicker", "ToolTip", "ToggleButton", "ToggleSwitch"};

            bool failed = false;

            foreach (var control in controlsToVerify)
            {
                try
                {
                    Log.Comment($"Verify visual tree for {control}");
                    VisualTreeTestHelper.VerifyVisualTree(xaml: XamlStringForControl(control), verificationFileNamePrefix: control);
                }
                catch (Exception e)
                {
                    failed = true;
                    Log.Error(e.Message);
                }
            }

            if (failed)
            {
                Verify.Fail("One or more visual tree verification failed, see details above");
            }
        }

string XamlStringForControl ( string controlName ) [inline, private]

Definition at line 492 of file CommonStylesTests.cs.

        {
            return $@"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                          <{controlName} />
                   </Grid>";
        }

The documentation for this class was generated from the following file:
  • CommonStyles/APITests/CommonStylesTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStylesVisualTreeTestSamples Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • CommonStylesVisualTreeTestSamples
Classes | Public Member Functions

CommonStylesVisualTreeTestSamples Class Reference

List of all members.

Classes

class | CustomizedFilter
class | CustomizedTranslator

Public Member Functions

void | VerifyVisualTreeExampleForLightTheme ()
void | VerifyVisualTreeExampleLoadAndVerifyForAllThemes ()
void | VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName ()
void | VerifyVisualTreeExampleWithCustomerFilter ()
void | VerifyVisualTreeExampleWithCustomerPropertyValueTranslator ()
void | VerifyVisualTreeForAppBarAndAppBarToggleButton ()

Detailed Description

Definition at line 531 of file CommonStylesTests.cs.

Member Function Documentation

void VerifyVisualTreeExampleForLightTheme ( ) [inline]

Definition at line 572 of file CommonStylesTests.cs.

        {
            var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                       </Grid>";
            UIElement root = VisualTreeTestHelper.SetupVisualTree(xaml);
            VisualTreeTestHelper.VerifyVisualTree(root: root,
                verificationFileNamePrefix: "VerifyVisualTreeExampleForLightTheme",
                theme: Theme.Light);
        }

void VerifyVisualTreeExampleLoadAndVerifyForAllThemes ( ) [inline]

Definition at line 548 of file CommonStylesTests.cs.

        {
            var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                       </Grid>";
            VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
                verificationFileNamePrefix: "VerifyVisualTreeExampleLoadAndVerifyForAllThemes",
                theme: Theme.All);
        }

void VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName ( ) [inline]

Definition at line 558 of file CommonStylesTests.cs.

        {
            var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                       </Grid>";
            UIElement root = VisualTreeTestHelper.SetupVisualTree(xaml);
            RunOnUIThread.Execute(() =>
            {
                (root as FrameworkElement).RequestedTheme = ElementTheme.Dark;
            });
            VisualTreeTestHelper.VerifyVisualTree(root: root,
                verificationFileNamePrefix: "VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName");
        }

void VerifyVisualTreeExampleWithCustomerFilter ( ) [inline]

Definition at line 584 of file CommonStylesTests.cs.

        {
            var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                        <TextBlock Text='Abc' />
                       </Grid>";

            VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
                verificationFileNamePrefix: "VerifyVisualTreeExampleWithCustomerFilter",
                filter: new CustomizedFilter());
        }

void VerifyVisualTreeExampleWithCustomerPropertyValueTranslator ( ) [inline]

Definition at line 597 of file CommonStylesTests.cs.

        {
            var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                            <TextBlock Text='Abc' />
                       </Grid>";

            VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
                verificationFileNamePrefix: "VerifyVisualTreeExampleWithCustomerPropertyValueTranslator",
                translator: new CustomizedTranslator());
        }

void VerifyVisualTreeForAppBarAndAppBarToggleButton ( ) [inline]

Definition at line 535 of file CommonStylesTests.cs.

        {
            var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                            <StackPanel>
                                <AppBarButton Icon='Accept' Label='Accept'/>
                                <AppBarToggleButton Icon='Dislike' Label='Dislike'/>
                            </StackPanel>
                       </Grid>";
            VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
                verificationFileNamePrefix: "VerifyVisualTreeForAppBarAndAppBarToggleButton");
        }

The documentation for this class was generated from the following file:
  • CommonStyles/APITests/CommonStylesTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStylesVisualTreeTestSamples::CustomizedFilter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • CommonStylesVisualTreeTestSamples
  • CommonStylesVisualTreeTestSamples::CustomizedFilter
Public Member Functions | Static Private Attributes

CommonStylesVisualTreeTestSamples::CustomizedFilter Class Reference

List of all members.

Public Member Functions

bool | ShouldVisitElement (string elementName)
bool | ShouldVisitProperty (string propertyName)
bool | ShouldVisitPropertyValuePair (string propertyName, string value)

Static Private Attributes

static readonly Dictionary
< string, string > 		_knownPropertyValueDict
static readonly string[] | _propertyNameBlockList
static readonly string[] | _propertyNamePostfixBlockList = new string[] { "Property", "Transitions", "Template", "Style", "Selector" }

Detailed Description

Definition at line 608 of file CommonStylesTests.cs.

Member Function Documentation

bool ShouldVisitElement ( string elementName ) [inline]

Definition at line 693 of file CommonStylesTests.cs.

            {
                return true;
            }

bool ShouldVisitProperty ( string propertyName ) [inline]

Definition at line 698 of file CommonStylesTests.cs.

            {
                return (_propertyNamePostfixBlockList.Where(item => propertyName.EndsWith(item)).Count()) == 0 &&
                    !_propertyNameBlockList.Contains(propertyName);
            }

bool ShouldVisitPropertyValuePair | ( | string | propertyName,
 |  | string | value |
 | ) |  |  | [inline]

Definition at line 687 of file CommonStylesTests.cs.

            {
                string v = _knownPropertyValueDict.ContainsKey(propertyName) ? _knownPropertyValueDict[propertyName] : VisualTreeDumper.ValueNULL;
                return !(v.Equals(value) || (!string.IsNullOrEmpty(value) && value.StartsWith("Exception")));
            }

Member Data Documentation

readonly Dictionary<string, string> _knownPropertyValueDict [static, private]

Definition at line 618 of file CommonStylesTests.cs.

readonly string [] _propertyNameBlockList [static, private]
Initial value:
 new string[] { "Interactions", "ColumnDefinitions", "RowDefinitions",
            "Children", "Resources", "Transitions", "Dispatcher", "TemplateSettings", "ContentTemplate", "ContentTransitions",
            "ContentTemplateSelector", "Content", "ContentTemplateRoot", "XYFocusUp", "XYFocusRight", "XYFocusLeft", "Parent",
            "Triggers", "RequestedTheme", "XamlRoot", "IsLoaded", "BaseUri", "Resources"}

Definition at line 613 of file CommonStylesTests.cs.

readonly string [] _propertyNamePostfixBlockList = new string[] { "Property", "Transitions", "Template", "Style", "Selector" } [static, private]

Definition at line 611 of file CommonStylesTests.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/APITests/CommonStylesTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStylesVisualTreeTestSamples::CustomizedTranslator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • CommonStylesVisualTreeTestSamples
  • CommonStylesVisualTreeTestSamples::CustomizedTranslator
Public Member Functions

CommonStylesVisualTreeTestSamples::CustomizedTranslator Class Reference

List of all members.

Public Member Functions

override string PropertyValueToString (string propertyName, object value)

Detailed Description

Definition at line 705 of file CommonStylesTests.cs.

Member Function Documentation

override string PropertyValueToString | ( | string | propertyName,
 |  | object | value |
 | ) |  |  | [inline]

Definition at line 707 of file CommonStylesTests.cs.

            {
                return "MyValue" + base.PropertyValueToString(propertyName, value);
            }

The documentation for this class was generated from the following file:
  • CommonStyles/APITests/CommonStylesTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ControlVisualTreeTestFilter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ControlVisualTreeTestFilter
Public Member Functions

ControlVisualTreeTestFilter Class Reference

List of all members.

Public Member Functions

override bool ShouldVisitProperty (string propertyName)

Detailed Description

Definition at line 522 of file CommonStylesTests.cs.

Member Function Documentation

override bool ShouldVisitProperty ( string propertyName ) [inline]

Definition at line 524 of file CommonStylesTests.cs.

        {
            return base.ShouldVisitProperty(propertyName) && !propertyName.Contains("RenderSize");
        }

The documentation for this class was generated from the following file:
  • CommonStyles/APITests/CommonStylesTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ExpanderTests
Public Member Functions

ExpanderTests Class Reference

List of all members.

Public Member Functions

void ExpanderAutomationPeerTest ()

Detailed Description

Definition at line 23 of file ExpanderTests.cs.

Member Function Documentation

void ExpanderAutomationPeerTest ( ) [inline]

Definition at line 26 of file ExpanderTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var root = (StackPanel)XamlReader.Load(
    @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                             xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'
                             xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                             <controls:Expander x:Name ='ExpandedExpander' AutomationProperties.Name='ExpandedExpander' IsExpanded='True' Margin='12' HorizontalAlignment='Left'>
                                <controls:Expander.Header>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition Width='80'/>
                                        </Grid.ColumnDefinitions>
                                        <StackPanel Margin='0,14,0,16'>
                                            <TextBlock AutomationProperties.Name='test' Text='This expander is expanded by default.'  Margin='0,0,0,4' />
                                            <TextBlock Text='This is the second line of text.' />
                                        </StackPanel>
                                        <ToggleSwitch Grid.Column='1'/>
                                    </Grid>
                                </controls:Expander.Header>
                                <Button AutomationProperties.AutomationId = 'ExpandedExpanderContent'> Content </Button>
                             </controls:Expander>
                                    </StackPanel>");

                Content = root;
                Content.UpdateLayout();

                var expander = VisualTreeHelper.GetChild(root, 0) as Expander;

                expander.IsExpanded = true;
                Content.UpdateLayout();

                var grid = VisualTreeHelper.GetChild(expander, 0);
                var toggleButton = VisualTreeHelper.GetChild(grid, 0);
                var toggleButtonGrid = VisualTreeHelper.GetChild(toggleButton, 0);
                var contentPresenter = VisualTreeHelper.GetChild(toggleButtonGrid, 0);
                var grid2 = VisualTreeHelper.GetChild(contentPresenter, 0);
                var stackPanel = VisualTreeHelper.GetChild(grid2, 0);
                var textBlock1 = VisualTreeHelper.GetChild(stackPanel, 0) as TextBlock;
                var textBlock2 = VisualTreeHelper.GetChild(stackPanel, 1) as TextBlock;
                var toggleSwitch = VisualTreeHelper.GetChild(grid2, 1) as ToggleSwitch;

                var border = VisualTreeHelper.GetChild(grid, 1);
                var expanderContentBorder = VisualTreeHelper.GetChild(border, 0);
                var expanderContentContentPresenter = VisualTreeHelper.GetChild(expanderContentBorder, 0);
                var button = VisualTreeHelper.GetChild(expanderContentContentPresenter, 0) as Button;

                Verify.AreEqual("ExpandedExpander", AutomationProperties.GetName(expander));

                // Verify ExpandedExpander header content are included in the accessibility tree
                Verify.AreEqual(AutomationProperties.GetAccessibilityView(textBlock1), AccessibilityView.Content);
                Verify.AreEqual(AutomationProperties.GetAccessibilityView(textBlock2), AccessibilityView.Content);
                Verify.AreEqual(AutomationProperties.GetAccessibilityView(toggleSwitch), AccessibilityView.Content);

                // Verify ExpandedExpander content is included in the accessibility tree
                Verify.AreEqual(AutomationProperties.GetAccessibilityView(button), AccessibilityView.Content);

                expander.IsExpanded = false;
                Content.UpdateLayout();

                // Verify ExpandedExpander content is not included in the accessibility tree and not readable once collapsed
                Verify.AreNotEqual(AutomationProperties.GetAccessibilityView(button), AccessibilityView.Raw);
            });
        }

The documentation for this class was generated from the following file:
  • Expander/APITests/ExpanderTests.cs
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSourceApiTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • IconSourceApiTests
Public Member Functions

IconSourceApiTests Class Reference

List of all members.

Public Member Functions

void | AnimatedIconSourceTest ()
void | ImageIconSourceTest ()

Detailed Description

Definition at line 24 of file IconSourceApiTests.cs.

Member Function Documentation

void AnimatedIconSourceTest ( ) [inline]

Definition at line 68 of file IconSourceApiTests.cs.

        {
            AnimatedIconSource iconSource = null;
            IAnimatedVisualSource2 source = null;
            AnimatedIcon animatedIcon = null;

            RunOnUIThread.Execute(() =>
            {
                iconSource = new AnimatedIconSource();
                source = new AnimatedChevronDownSmallVisualSource();
                animatedIcon = iconSource.CreateIconElement() as AnimatedIcon;

                // IconSource.Foreground should be null to allow foreground inheritance from
                // the parent to work.
                Verify.AreEqual(iconSource.Foreground, null);
                //Verify.AreEqual(animatedIcon.Foreground, null);
                Verify.AreEqual(iconSource.MirroredWhenRightToLeft, false);
                Verify.AreEqual(animatedIcon.MirroredWhenRightToLeft, false);

                Log.Comment("Validate the defaults match BitmapIcon.");

                var icon = new AnimatedIcon();
                Verify.AreEqual(icon.Source, iconSource.Source);
                Verify.AreEqual(animatedIcon.Source, iconSource.Source);
                Verify.AreEqual(icon.MirroredWhenRightToLeft, iconSource.MirroredWhenRightToLeft);

                Log.Comment("Validate that you can change the properties.");

                iconSource.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Red);
                iconSource.Source = source;
                iconSource.MirroredWhenRightToLeft = true;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsTrue(iconSource.Foreground is SolidColorBrush);
                Verify.IsTrue(animatedIcon.Foreground is SolidColorBrush);
                Verify.AreEqual(Microsoft.UI.Colors.Red, (iconSource.Foreground as SolidColorBrush).Color);
                Verify.AreEqual(Microsoft.UI.Colors.Red, (animatedIcon.Foreground as SolidColorBrush).Color);
                Verify.AreEqual(source, iconSource.Source);
                Verify.AreEqual(source, animatedIcon.Source);
                Verify.IsTrue(iconSource.MirroredWhenRightToLeft);
                Verify.IsTrue(animatedIcon.MirroredWhenRightToLeft);
            });
        }

void ImageIconSourceTest ( ) [inline]

Definition at line 27 of file IconSourceApiTests.cs.

        {
            ImageIconSource iconSource = null;
            ImageIcon imageIcon = null;
            var uri = new Uri("ms-appx:///Assets/Nuclear_symbol.svg");

            RunOnUIThread.Execute(() =>
            {
                iconSource = new ImageIconSource();
                imageIcon = iconSource.CreateIconElement() as ImageIcon;

                // IconSource.Foreground should be null to allow foreground inheritance from
                // the parent to work.
                Verify.AreEqual(iconSource.Foreground, null);
                //Verify.AreEqual(imageIcon.Foreground, null);

                Log.Comment("Validate the defaults match BitmapIcon.");

                var icon = new ImageIcon();
                Verify.AreEqual(icon.Source, iconSource.ImageSource);
                Verify.AreEqual(imageIcon.Source, iconSource.ImageSource);

                Log.Comment("Validate that you can change the properties.");

                iconSource.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Red);
                iconSource.ImageSource = new SvgImageSource(uri);
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsTrue(iconSource.Foreground is SolidColorBrush);
                Verify.IsTrue(imageIcon.Foreground is SolidColorBrush);
                Verify.AreEqual(Microsoft.UI.Colors.Red, (iconSource.Foreground as SolidColorBrush).Color);
                Verify.AreEqual(Microsoft.UI.Colors.Red, (imageIcon.Foreground as SolidColorBrush).Color);
                Verify.AreEqual(uri, ((SvgImageSource)iconSource.ImageSource).UriSource);
                Verify.AreEqual(uri, ((SvgImageSource)imageIcon.Source).UriSource);
            });
        }

The documentation for this class was generated from the following file:
  • IconSource/APITests/IconSourceApiTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIconTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ImageIconTests
Public Member Functions

ImageIconTests Class Reference

List of all members.

Public Member Functions

void ImageIconTest ()

Detailed Description

Definition at line 21 of file ImageIconTests.cs.

Member Function Documentation

void ImageIconTest ( ) [inline]

Definition at line 24 of file ImageIconTests.cs.

        {
            ImageIcon imageIcon = null;
            var uri = new Uri("ms-appx:///Assets/Nuclear_symbol.svg");

            RunOnUIThread.Execute(() =>
            {
                imageIcon = new ImageIcon();

                /*
                #3949 is created to re-enable this part
                This is an unparented ImageIcon, so looking up the default foreground and verifying
                is a bit wierd. The colors are also chaning, so this is going to fail with those changes
                So commenting this check out for now to make the test more resilient.

                var theme = Application.Current.RequestedTheme;
                if (theme == ApplicationTheme.Dark)
                {
                    Verify.AreEqual(((SolidColorBrush)imageIcon.Foreground).Color, Colors.White);
                }
                else
                {
                    Verify.AreEqual(((SolidColorBrush)imageIcon.Foreground).Color, Colors.Black);
                }
                */

                Log.Comment("Validate that you can change the properties.");

                imageIcon.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Red);
                imageIcon.Source = new SvgImageSource(uri);
                Content = imageIcon;
                Content.UpdateLayout();
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsTrue(imageIcon.Foreground is SolidColorBrush);
                Verify.AreEqual(Microsoft.UI.Colors.Red, (imageIcon.Foreground as SolidColorBrush).Color);
                Verify.AreEqual(uri, ((SvgImageSource)imageIcon.Source).UriSource);
                if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone5))
                {
                    var image = ((Image)VisualTreeHelper.GetChild(VisualTreeHelper.GetChild(imageIcon, 0), 0));
                    Verify.IsTrue(image.IsLoaded);
                }
            });
        }

The documentation for this class was generated from the following file:
  • ImageIcon/APITests/ImageIconTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadgeTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • InfoBadgeTests
Public Member Functions

InfoBadgeTests Class Reference

List of all members.

Public Member Functions

void | InfoBadgeDisplayKindTest ()
void | InfoBadgeSupportsAllIconTypes ()
void | InfoBadgeValueLessThanNegativeOneCrashes ()

Detailed Description

Definition at line 28 of file InfoBadgeTests.cs.

Member Function Documentation

void InfoBadgeDisplayKindTest ( ) [inline]

Definition at line 31 of file InfoBadgeTests.cs.

        {
            InfoBadge infoBadge = null;
            SymbolIconSource symbolIconSource = null;
            RunOnUIThread.Execute(() =>
            {
                infoBadge = new InfoBadge();
                symbolIconSource = new SymbolIconSource();
                symbolIconSource.Symbol = Symbol.Setting;

                Content = infoBadge;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                FrameworkElement textBlock = infoBadge.FindVisualChildByName("ValueTextBlock");
                Verify.IsNotNull(textBlock, "The underlying value text block could not be retrieved");

                FrameworkElement iconViewBox = infoBadge.FindVisualChildByName("IconPresenter");
                Verify.IsNotNull(textBlock, "The underlying icon presenter view box could not be retrieved");

                Verify.AreEqual(Visibility.Collapsed, textBlock.Visibility, "The value text block should be initally collapsed since the default value is -1");
                Verify.AreEqual(Visibility.Collapsed, iconViewBox.Visibility, "The icon presenter should be initally collapsed since the default value is null");

                infoBadge.IconSource = symbolIconSource;
                Content.UpdateLayout();

                Verify.AreEqual(Visibility.Collapsed, textBlock.Visibility, "The value text block should be initally collapsed since the default value is -1");
                Verify.AreEqual(Visibility.Visible, iconViewBox.Visibility, "The icon presenter should be visible since we've set the icon source property and value is -1");

                infoBadge.Value = 10;
                Content.UpdateLayout();

                Verify.AreEqual(Visibility.Visible, textBlock.Visibility, "The value text block should be visible since the value is set to 10");
                Verify.AreEqual(Visibility.Collapsed, iconViewBox.Visibility, "The icon presenter should be collapsed since we've set the icon source property but value is not -1");

                infoBadge.IconSource = null;
                Content.UpdateLayout();

                Verify.AreEqual(Visibility.Visible, textBlock.Visibility, "The value text block should be visible since the value is set to 10");
                Verify.AreEqual(Visibility.Collapsed, iconViewBox.Visibility, "The icon presenter should be collapsed since the icon source property is null");

                infoBadge.Value = -1;
                Content.UpdateLayout();

                Verify.AreEqual(Visibility.Collapsed, textBlock.Visibility, "The value text block should be collapsed since the value is set to -1");
                Verify.AreEqual(Visibility.Collapsed, iconViewBox.Visibility, "The icon presenter should be collapsed since the value is set to null");
            });
        }

void InfoBadgeSupportsAllIconTypes ( ) [inline]

Definition at line 85 of file InfoBadgeTests.cs.

        {
            InfoBadge infoBadge = null;
            SymbolIconSource symbolIconSource = null;
            PathIconSource pathIconSource = null;
            AnimatedIconSource animatedIconSource = null;
            BitmapIconSource bitmapIconSource = null;
            ImageIconSource imageIconSource = null;
            FontIconSource fontIconSource = null;

            RunOnUIThread.Execute(() =>
            {
                infoBadge = new InfoBadge();
                symbolIconSource = new SymbolIconSource();
                symbolIconSource.Symbol = Symbol.Setting;

                fontIconSource = new FontIconSource();
                fontIconSource.Glyph = "99+";
                fontIconSource.FontFamily = new FontFamily("XamlAutoFontFamily");

                bitmapIconSource = new BitmapIconSource();
                bitmapIconSource.ShowAsMonochrome = false;
                Uri bitmapUri = new Uri("ms-appx:/Assets/ingredient1.png");
                bitmapIconSource.UriSource = bitmapUri;

                imageIconSource = new ImageIconSource();
                var imageUri = new Uri("https://raw.githubusercontent.com/DiemenDesign/LibreICONS/master/svg-color/libre-camera-panorama.svg");
                imageIconSource.ImageSource = new SvgImageSource(imageUri);

                pathIconSource = new PathIconSource();
                var geometry = new RectangleGeometry();
                geometry.Rect = new Rect { Width = 5, Height = 2, X = 0, Y = 0 };
                pathIconSource.Data = geometry;

                animatedIconSource = new AnimatedIconSource();
                animatedIconSource.Source = new AnimatedSettingsVisualSource();

                Content = infoBadge;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Switch to Symbol Icon");
                infoBadge.IconSource = symbolIconSource;
                Content.UpdateLayout();

                Log.Comment("Switch to Path Icon");
                infoBadge.IconSource = pathIconSource;
                Content.UpdateLayout();

                Log.Comment("Switch to Font Icon");
                infoBadge.IconSource = fontIconSource;
                Content.UpdateLayout();

                Log.Comment("Switch to bitmap Icon");
                infoBadge.IconSource = bitmapIconSource;
                Content.UpdateLayout();

                Log.Comment("Switch to Image Icon");
                infoBadge.IconSource = imageIconSource;
                Content.UpdateLayout();

                Log.Comment("Switch to Animated Icon");
                infoBadge.IconSource = animatedIconSource;
                Content.UpdateLayout();
            });
        }

void InfoBadgeValueLessThanNegativeOneCrashes ( ) [inline]

Definition at line 157 of file InfoBadgeTests.cs.

        {
            InfoBadge infoBadge = null;
            RunOnUIThread.Execute(() =>
            {
                infoBadge = new InfoBadge();
                Content = infoBadge;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.Throws<Exception>(() => { infoBadge.Value = -10; });
            });
        }

The documentation for this class was generated from the following file:
  • InfoBadge/APITests/InfoBadgeTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ItemContainerTests
Public Member Functions

ItemContainerTests Class Reference

List of all members.

Public Member Functions

void | VerifyDefaultPropertyValues ()
void | VerifyItemContainerUIASelectionBehavior ()
void | VerifySettableAPIValues ()

Detailed Description

Definition at line 20 of file ItemContainerTests.cs.

Member Function Documentation

void VerifyDefaultPropertyValues ( ) [inline]

Definition at line 23 of file ItemContainerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemContainer itemContainer = new ItemContainer();
                Verify.IsNotNull(itemContainer);
                Verify.IsNull(itemContainer.Child);
                Verify.IsFalse(itemContainer.IsSelected);

#if MUX_PRERELEASE
                Verify.AreEqual(itemContainer.MultiSelectMode, ItemContainerMultiSelectMode.Auto);
                Log.Comment("ItemContainer MultiSelectMode is Auto by default");
                Verify.AreEqual(itemContainer.CanUserSelect, ItemContainerUserSelectMode.Auto);
                Log.Comment("ItemContainer CanUserSelect is Auto by default");
                Verify.AreEqual(itemContainer.CanUserInvoke, ItemContainerUserInvokeMode.Auto);
                Log.Comment("ItemContainer CanUserInvoke is Auto by default");
#endif
            });
        }

void VerifyItemContainerUIASelectionBehavior ( ) [inline]

Definition at line 96 of file ItemContainerTests.cs.

        {
            ISelectionItemProvider selectionItemProvider = null;
            ItemContainer itemContainer = null;

            RunOnUIThread.Execute(() =>
            {
                itemContainer = new ItemContainer();
                Content = itemContainer;
                Content.UpdateLayout();

                var itemContainerPeer = FrameworkElementAutomationPeer.CreatePeerForElement(itemContainer);
                Verify.IsNotNull(itemContainerPeer);
                var itemContainerSelectionPattern = itemContainerPeer.GetPattern(PatternInterface.SelectionItem);
                Verify.IsNotNull(itemContainerSelectionPattern);
                selectionItemProvider = itemContainerSelectionPattern as ISelectionItemProvider;

                Verify.IsNull(selectionItemProvider.SelectionContainer);
                Log.Comment("ItemContainer SelectionContainer is Null if not child of ItemsView");

                // ItemContainer IsSelected is false by default.
                Verify.IsFalse(selectionItemProvider.IsSelected);

#if MUX_PRERELEASE
                Verify.AreEqual(itemContainer.CanUserSelect, ItemContainerUserSelectMode.Auto);
                Log.Comment("ItemContainer CanUserSelect is Auto by default");
                Verify.AreEqual(itemContainer.CanUserInvoke, ItemContainerUserInvokeMode.Auto);
                Log.Comment("ItemContainer CanUserInvoke is Auto by default");
#endif

                // Change selection through automationPeer.
                selectionItemProvider.Select();
                Verify.IsTrue(selectionItemProvider.IsSelected, "ItemContainer should be selected");

                // Setting selection through itemContainer API.
                itemContainer.IsSelected = false;
                Verify.IsFalse(selectionItemProvider.IsSelected, "ItemContainer should not be selected");

#if MUX_PRERELEASE
                itemContainer.CanUserSelect = ItemContainerUserSelectMode.UserCannotSelect;
                Verify.AreEqual(itemContainer.CanUserSelect, ItemContainerUserSelectMode.UserCannotSelect);
                Log.Comment("Set ItemContainer CanUserSelect to UserCannotSelect");
#endif
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
#if MUX_PRERELEASE
                // Try change selection through automationPeer.
                selectionItemProvider.Select();
                Verify.IsFalse(selectionItemProvider.IsSelected, "ItemContainer should not be selected since UserCannotSelect");
#endif

                // Try setting selection through itemContainer API.
                itemContainer.IsSelected = true;
                Verify.IsTrue(selectionItemProvider.IsSelected, "ItemContainer should be selected since IsSelected bypasses SelectionItemProvider.Select()");
            });
        }

void VerifySettableAPIValues ( ) [inline]

Definition at line 44 of file ItemContainerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Instantiate and verify default ItemContainer values");
                ItemContainer itemContainer = new ItemContainer();
                Verify.IsNotNull(itemContainer);
                Verify.IsNull(itemContainer.Child);
                Verify.IsFalse(itemContainer.IsSelected);

                itemContainer.IsSelected = true;
                Verify.IsTrue(itemContainer.IsSelected, "Can set ItemContainer IsSelected to true");

                itemContainer.Child = new Grid();
                Verify.IsNotNull(itemContainer.Child, "Can set ItemContainer's Child");

#if MUX_PRERELEASE
                Verify.AreEqual(itemContainer.MultiSelectMode, ItemContainerMultiSelectMode.Auto);
                Log.Comment("ItemContainer MultiSelectMode is Auto by default");
                itemContainer.MultiSelectMode = ItemContainerMultiSelectMode.Single;
                Verify.AreEqual(itemContainer.MultiSelectMode, ItemContainerMultiSelectMode.Single);
                Log.Comment("Can set ItemContainer MultiSelectMode to Single");
                itemContainer.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
                Verify.AreEqual(itemContainer.MultiSelectMode, ItemContainerMultiSelectMode.Multiple);
                Log.Comment("Can set ItemContainer MultiSelectMode to Multiple");

                Verify.AreEqual(itemContainer.CanUserSelect, ItemContainerUserSelectMode.Auto);
                Log.Comment("ItemContainer CanUserSelect is Auto by default");
                itemContainer.CanUserSelect = ItemContainerUserSelectMode.UserCanSelect;
                Verify.AreEqual(itemContainer.CanUserSelect, ItemContainerUserSelectMode.UserCanSelect);
                Log.Comment("Can set ItemContainer CanUserSelect to UserCanSelect");
                itemContainer.CanUserSelect = ItemContainerUserSelectMode.UserCannotSelect;
                Verify.AreEqual(itemContainer.CanUserSelect, ItemContainerUserSelectMode.UserCannotSelect);
                Log.Comment("Can set ItemContainer CanUserSelect to UserCannotSelect");

                Verify.AreEqual(itemContainer.CanUserInvoke, ItemContainerUserInvokeMode.Auto);
                Log.Comment("ItemContainer CanUserInvoke is Auto by default");
                itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.UserCanInvoke;
                Verify.AreEqual(itemContainer.CanUserInvoke, ItemContainerUserInvokeMode.UserCanInvoke);
                Log.Comment("Can set ItemContainer CanUserInvoke to UserCanInvoke");
                itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.UserCannotInvoke;
                Verify.AreEqual(itemContainer.CanUserInvoke, ItemContainerUserInvokeMode.UserCannotInvoke);
                Log.Comment("Can set ItemContainer CanUserInvoke to UserCannotInvoke");
#endif

                Verify.IsTrue(itemContainer.IsEnabled, "ItemContainer is enabled by default");
                itemContainer.IsEnabled = false;
                Verify.IsFalse(itemContainer.IsEnabled, "Can set ItemContainer IsEnabled to false");
            });
        }

The documentation for this class was generated from the following file:
  • ItemContainer/APITests/ItemContainerTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ItemsViewTests
Public Member Functions | Properties | Private Types | Private Member Functions | Private Attributes

ItemsViewTests Class Reference

List of all members.

Public Member Functions

void | AlternateLayoutPathsByUnhookingItemsInfoRequested ()
void | AlternateLayoutPathsWithSizeArrays ()
void | AlternateLayoutPathsWithUniformSizes ()
void | CanBindSelectedItem ()
void | CanBringItemIntoView ()
void | CanChangeLayoutProperty ()
void | CanChangeSelectionModeProperty ()
void | CanSetItemContainerIsSelectedProperty ()
void | CanSetItemTemplateAfterItemsSourceProperty ()
void | CanUseItemsSourceWithItemContainers ()
void | HandleItemsInfoRequested ()
void | HandleItemsInfoRequestedWithExtraInfo ()
void | HandleItemsInfoRequestedWithSizeArrays ()
void | HandleItemsInfoRequestedWithSizeArraysAndExtraInfo ()
void | HandleItemsInfoRequestedWithTemporaryAndExtraInfo ()
void | HandleItemsInfoRequestedWithTemporaryInfo ()
void | TriggerLinedFlowLayoutItemsInfoRequestedEventArgsExceptions ()
void | VerifyCanInvertSelection ()
void | VerifyDefaultPropertyValues ()
void | VerifyItemsViewUIABehavior ()
void | VerifyItemsViewUIASelectionProviderBehavior ()
void | VerifyLinedFlowLayoutAverageItemsPerLineStability ()
void | VerifyPropertySetters ()
void | VerifyPropertyValuesAfterTemplateApplication ()
void | VerifySelectionPersistsAfterRecycling ()

Properties

IEnumerable< int > | Digits [get]

Private Types

enum LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger {
ItemsRangeStartIndexNegative, ItemsRangeStartIndexIncreased, ItemsRangeStartIndexTooSmall, ArrayLengthSmallerThanItemsRangeRequestedLength,
ArrayLengthTooSmallForDecreasedItemsRangeStartIndex, ArrayLengthInconsistent
}

Private Member Functions

void | AlternateLayoutPaths (bool useSizeArrays)
void | BringItemIntoView (int index, ItemsView itemsView, AutoResetEvent scrollViewBringingIntoViewEvent, AutoResetEvent scrollViewScrollCompletedEvent)
void | CanBringItemIntoView (bool useLinedFlowLayout, bool useUniformGridLayout)
void | HandleItemsInfoRequested (bool useSizeArrays, bool useExtraInfo, bool useTemporaryAspectRatio)
void | LinedFlowLayout_ItemsInfoRequested (LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
void | LogItemsViewProperties (ItemsView itemsView)
void | SetupDefaultUI (ItemsView itemsView, AutoResetEvent itemsViewLoadedEvent=null, AutoResetEvent itemsViewUnloadedEvent=null, bool setAsContentRoot=true, bool useParentGrid=false)
double | SnapToPower (double value)
void | TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException (LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger trigger)
void | WaitForEvent (string logComment, EventWaitHandle eventWaitHandle)

Private Attributes

const double | c_defaultUIItemsViewHeight = 400.0
const double | c_defaultUIItemsViewWidth = 200.0
const int | c_MaxWaitDuration = 5000

Detailed Description

Definition at line 28 of file ItemsViewTests.cs.

Member Enumeration Documentation

enum LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger [private]
Enumerator:
ItemsRangeStartIndexNegative
ItemsRangeStartIndexIncreased
ItemsRangeStartIndexTooSmall
ArrayLengthSmallerThanItemsRangeRequestedLength
ArrayLengthTooSmallForDecreasedItemsRangeStartIndex
ArrayLengthInconsistent

Definition at line 43 of file ItemsViewTests.cs.

        {
            ItemsRangeStartIndexNegative,
            ItemsRangeStartIndexIncreased,
            ItemsRangeStartIndexTooSmall,
            ArrayLengthSmallerThanItemsRangeRequestedLength,
            ArrayLengthTooSmallForDecreasedItemsRangeStartIndex,
            ArrayLengthInconsistent
        }

Member Function Documentation

void AlternateLayoutPaths ( bool useSizeArrays ) [inline, private]

Definition at line 1433 of file ItemsViewTests.cs.

        {
            List<string> types = new List<string>
            {
                "ItemsView",
                "ScrollView",
                "ItemsRepeater",
                "LinedFlowLayout"
            };

            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
            {
                ItemsView itemsView = null;
                ScrollView scrollView = null;
                LinedFlowLayout linedFlowLayout = null;
                int itemsInfoRequestedCount = 0;
                bool provideItemsInfo = false;
                bool provideExtraItemsInfo = false;
                Random rnd = new Random();
                ObservableCollection<string> itemsSource = new ObservableCollection<string>(Enumerable.Range(0, 1000).Select(k => k + "-" + rnd.Next(20)));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
                AutoResetEvent linedFlowLayoutItemsInfoRequestedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    linedFlowLayout = new LinedFlowLayout()
                    {
                        LineHeight = 50.0
                    };

                    linedFlowLayout.ItemsInfoRequested += (sender, args) =>
                    {
                        Log.Comment("LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex=" + args.ItemsRangeStartIndex + ", ItemsRangeRequestedLength=" + args.ItemsRangeRequestedLength);

                        Verify.IsGreaterThanOrEqual(args.ItemsRangeStartIndex, 0);
                        Verify.IsGreaterThan(args.ItemsRangeRequestedLength, 0);

                        if (!provideItemsInfo)
                        {
                            // For the next ItemsInfoRequested handling: provide requested items info only.
                            provideItemsInfo = true;

                            // Trigger the regular path without ItemsInfo at all.
                            return;
                        }

                        int arrayStart = provideExtraItemsInfo ? 0 : args.ItemsRangeStartIndex;
                        int arrayLength = provideExtraItemsInfo ? itemsSource.Count : args.ItemsRangeRequestedLength;

                        args.ItemsRangeStartIndex = arrayStart;

                        double[] desiredAspectRatios = new double[arrayLength];

                        for (int index = 0; index < arrayLength; index++)
                        {
                            desiredAspectRatios[index] = 0.8 + (index + arrayStart) / 600.0;
                        }

                        args.SetDesiredAspectRatios(desiredAspectRatios);

                        if (useSizeArrays)
                        {
                            args.MinWidth = -1.0;
                            args.MaxWidth = -1.0;

                            double[] minWidths = new double[arrayLength];

                            for (int index = 0; index < arrayLength; index++)
                            {
                                minWidths[index] = (index + arrayStart) / 25.0;
                            }

                            args.SetMinWidths(minWidths);

                            double[] maxWidths = new double[arrayLength];

                            for (int index = 0; index < arrayLength; index++)
                            {
                                maxWidths[index] = (index + arrayStart) / 5.0 + 125.0;
                            }

                            args.SetMaxWidths(maxWidths);
                        }
                        else
                        {
                            args.MinWidth = 40.0;
                            args.MaxWidth = 140.0;
                        }

                        itemsInfoRequestedCount++;

                        if (provideExtraItemsInfo)
                        {
                            // For the next ItemsInfoRequested handling: do not provide any items info at all.

                            provideItemsInfo = false;
                            provideExtraItemsInfo = false;
                        }
                        else
                        {
                            // For the next ItemsInfoRequested handling: provide items info for the entire collection.

                            provideExtraItemsInfo = true;
                        }

                        linedFlowLayoutItemsInfoRequestedEvent.Set();
                    };

                    itemsView = new ItemsView()
                    {
                        Layout = linedFlowLayout,
                        ItemsSource = itemsSource
                    };

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
                WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ScrollView");
                    scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
                    Verify.IsNotNull(scrollView);

                    scrollView.ScrollCompleted += (sender, args) =>
                    {
                        Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);

                        scrollViewScrollCompletedEvent.Set();
                    };
                });

                for (int scrollCount = 0; scrollCount < 5; scrollCount++)
                {
                    RunOnUIThread.Execute(() =>
                    {
                        scrollViewScrollCompletedEvent.Reset();

                        Log.Comment("Invoking ScrollView.ScrollTo");
                        scrollView.ScrollTo(0.0, scrollView.ScrollableHeight / 6 * (scrollCount + 1), new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                    });

                    WaitForEvent("Waiting for ScrollCompleted event", scrollViewScrollCompletedEvent);

                    IdleSynchronizer.Wait();

                    RunOnUIThread.Execute(() =>
                    {
                        linedFlowLayoutItemsInfoRequestedEvent.Reset();

                        Log.Comment("Adding datasource item");
                        itemsSource.Add((1000 + scrollCount).ToString() + "-" + rnd.Next(20));
                    });

                    WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);

                    IdleSynchronizer.Wait();

                    Log.Comment($"ItemsInfoRequested event count={itemsInfoRequestedCount}");
                }

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Resetting window content and ItemsView");
                    Content = null;
                    itemsView = null;
                });

                WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
                Log.Comment("Done");
            }
        }

void AlternateLayoutPathsByUnhookingItemsInfoRequested ( ) [inline]

Definition at line 1239 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "LinedFlowLayout"))
            {
                ItemsView itemsView = null;
                LinedFlowLayout linedFlowLayout = null;
                Random rnd = new Random();
                ObservableCollection<string> itemsSource = new ObservableCollection<string>(Enumerable.Range(0, 75).Select(k => k + "-" + rnd.Next(20)));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    linedFlowLayout = new LinedFlowLayout()
                    {
                        LineHeight = 50.0
                    };

                    itemsView = new ItemsView()
                    {
                        Layout = linedFlowLayout,
                        ItemsSource = itemsSource
                    };

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                IdleSynchronizer.Wait();

                for (int resizeCount = 0; resizeCount < 6; resizeCount++)
                {
                    RunOnUIThread.Execute(() =>
                    {
                        if (resizeCount % 2 == 0)
                        {
                            Log.Comment($"Hooking LinedFlowLayout.ItemsInfoRequested");
                            linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
                        }
                        else
                        {
                            Log.Comment($"Unhooking LinedFlowLayout.ItemsInfoRequested");
                            linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;
                        }

                        Log.Comment($"ItemsView resized to {itemsView.ActualWidth + 1}");
                        itemsView.Width = itemsView.ActualWidth + 1;
                    });

                    IdleSynchronizer.Wait();
                }

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Resetting window content and ItemsView");
                    Content = null;
                    itemsView = null;
                });

                WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
                Log.Comment("Done");
            }
        }

void AlternateLayoutPathsWithSizeArrays ( ) [inline]

Definition at line 1225 of file ItemsViewTests.cs.

        {
            AlternateLayoutPaths(useSizeArrays: true);
        }

void AlternateLayoutPathsWithUniformSizes ( ) [inline]

Definition at line 1232 of file ItemsViewTests.cs.

        {
            AlternateLayoutPaths(useSizeArrays: false);
        }

void BringItemIntoView | ( | int | index,
 |  | ItemsView | itemsView,
 |  | AutoResetEvent | scrollViewBringingIntoViewEvent,
 |  | AutoResetEvent | scrollViewScrollCompletedEvent |
 | ) |  |  | [inline, private]

Definition at line 2054 of file ItemsViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                scrollViewBringingIntoViewEvent.Reset();
                scrollViewScrollCompletedEvent.Reset();

                Log.Comment("Invoking ItemsView.StartBringItemIntoView(" + index + ")");

                BringIntoViewOptions bringIntoViewOptions = new BringIntoViewOptions()
                {
                    AnimationDesired = false
                };

                itemsView.StartBringItemIntoView(index, bringIntoViewOptions);
            });

            WaitForEvent("Waiting for BringingIntoView event", scrollViewBringingIntoViewEvent);

            WaitForEvent("Waiting for ScrollCompleted event", scrollViewScrollCompletedEvent);

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                int topLeftElementIndex;
                int bottomRightElementIndex;

                itemsView.TryGetItemIndex(horizontalViewportRatio: 0.0, verticalViewportRatio: 0.0, out topLeftElementIndex);
                itemsView.TryGetItemIndex(horizontalViewportRatio: 1.0, verticalViewportRatio: 1.0, out bottomRightElementIndex);

                Log.Comment("Top left element index=" + topLeftElementIndex);
                Log.Comment("Bottom right element index=" + bottomRightElementIndex);

                Verify.IsGreaterThanOrEqual(index, topLeftElementIndex);
                Verify.IsLessThanOrEqual(index, bottomRightElementIndex);
            });
        }

void CanBindSelectedItem ( ) [inline]

Definition at line 863 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ItemsRepeater"))
            {
                Panel rootPanel = null;
                TextBlock textBlock = null;
                AutoResetEvent rootPanelLoadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    string panelXaml =
                        @"<StackPanel
                              xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                              xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
                              <ItemsView x:Name='itemsView' ItemsSource='{Binding Digits, Mode=OneWay}'>
                                  <ItemsView.ItemTemplate>
                                      <DataTemplate>
                                          <ItemContainer>
                                              <TextBlock Text='{Binding}'/>
                                          </ItemContainer>
                                      </DataTemplate>
                                  </ItemsView.ItemTemplate>
                              </ItemsView>
                              <TextBlock Text='{Binding ElementName=itemsView, Path=SelectedItem, Mode=OneWay}'/>
                          </StackPanel>";

                    Log.Comment("Loading XAML markup.");
                    rootPanel = XamlReader.Load(panelXaml) as Panel;
                    Verify.IsNotNull(rootPanel);

                    rootPanel.Loaded += (object sender, RoutedEventArgs e) =>
                    {
                        Log.Comment("Panel.Loaded event handler");
                        rootPanelLoadedEvent.Set();
                    };

                    rootPanel.DataContext = this;

                    Log.Comment("Setting window Content.");
                    Content = rootPanel;
                });

                WaitForEvent("Waiting for Panel.Loaded event", rootPanelLoadedEvent);

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Accessing ItemsView.");
                    ItemsView itemsView = rootPanel.Children[0] as ItemsView;
                    Verify.IsNotNull(itemsView);

                    Log.Comment("Accessing databound TextBlock.");
                    textBlock = rootPanel.Children[1] as TextBlock;
                    Verify.IsNotNull(textBlock);

                    Log.Comment($"TextBlock.Text={textBlock.Text}");
                    Verify.AreEqual(string.Empty, textBlock.Text);

                    Log.Comment("Selecting item @ index 5.");
                    itemsView.Select(5);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"TextBlock.Text={textBlock.Text}");
                    Verify.AreEqual("5", textBlock.Text);
                });
            }
        }

void CanBringItemIntoView ( ) [inline]

Definition at line 854 of file ItemsViewTests.cs.

        {
            CanBringItemIntoView(useLinedFlowLayout: false, useUniformGridLayout: false);
            CanBringItemIntoView(useLinedFlowLayout: true, useUniformGridLayout: false);
            CanBringItemIntoView(useLinedFlowLayout: false, useUniformGridLayout: true);
        }

void CanBringItemIntoView | ( | bool | useLinedFlowLayout,
 |  | bool | useUniformGridLayout |
 | ) |  |  | [inline, private]

Definition at line 1931 of file ItemsViewTests.cs.

        {
            List<string> types = null;

            if (useLinedFlowLayout)
            {
                types = new List<string>(4);
                types.Add("LinedFlowLayout");
            }
            else
            {
                types = new List<string>(3);
            }

            types.Add("ItemsRepeater");
            types.Add("ScrollView");
            types.Add("ItemsView");

            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
            {
                ItemsView itemsView = null;
                ScrollView scrollView = null;
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView();

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;

                    scrollView.BringingIntoView += (sender, args) =>
                    {
                        Log.Comment("ScrollView.BringingIntoView raised - CorrelationId=" + args.CorrelationId + ", TargetVerticalOffset=" + args.TargetVerticalOffset);

                        scrollViewBringingIntoViewEvent.Set();
                    };

                    scrollView.ScrollCompleted += (sender, args) =>
                    {
                        Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);

                        scrollViewScrollCompletedEvent.Set();
                    };

                    Log.Comment("Setting ItemsSource");
                    Random rnd = new Random();
                    List<string> itemsSource = new List<string>(Enumerable.Range(0, 500).Select(k => k + " - " + rnd.Next(500)));
                    Verify.IsNull(itemsView.ItemsSource);
                    itemsView.ItemsSource = itemsSource;
                    Verify.IsNotNull(itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemTemplate");
                    DataTemplate itemTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ItemContainer>
                              <TextBlock Text='{Binding}' Foreground='Red'/>
                            </ItemContainer>
                          </DataTemplate>") as DataTemplate;
                    Verify.IsNotNull(itemsView.ItemTemplate);
                    itemsView.ItemTemplate = itemTemplate;
                    Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting Layout");

                    Verify.IsNotNull(itemsView.Layout);
                    Verify.IsTrue(itemsView.Layout is StackLayout);

                    if (useLinedFlowLayout)
                    {
                        LinedFlowLayout linedFlowLayout = new LinedFlowLayout()
                        {
                            LineHeight = 96,
                            LineSpacing = 4,
                            MinItemSpacing = 4
                        };

                        itemsView.Layout = linedFlowLayout;
                        Verify.IsTrue(itemsView.Layout is LinedFlowLayout);
                    }
                    else if (useUniformGridLayout)
                    {
                        UniformGridLayout uniformGridLayout = new UniformGridLayout()
                        {
                            MaximumRowsOrColumns = 4,
                            MinColumnSpacing = 10,
                            MinRowSpacing = 10,
                            MinItemWidth = 100,
                            MinItemHeight = 100
                        };

                        itemsView.Layout = uniformGridLayout;
                        Verify.IsTrue(itemsView.Layout is UniformGridLayout);
                    }
                });

                IdleSynchronizer.Wait();

                BringItemIntoView(350, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
                BringItemIntoView(340, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
                BringItemIntoView(150, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
                BringItemIntoView(160, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
            }
        }

void CanChangeLayoutProperty ( ) [inline]

Definition at line 703 of file ItemsViewTests.cs.

        {
            List<string> types = new List<string>
            {
                "ItemsView",
                "ScrollView",
                "ItemsRepeater",
                "LinedFlowLayout"
            };

            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
            {
                ItemsView itemsView = null;
                Random rnd = new Random();
                List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView() { ItemsSource = itemsSource };

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.Layout is StackLayout);

                    itemsView.Layout = new UniformGridLayout();
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.Layout is UniformGridLayout);

                    itemsView.Layout = new LinedFlowLayout();
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.Layout is LinedFlowLayout);

                    Log.Comment("Resetting window content and ItemsView");
                    Content = null;
                    itemsView = null;
                });

                WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
                Log.Comment("Done");
            }
        }

void CanChangeSelectionModeProperty ( ) [inline]

Definition at line 348 of file ItemsViewTests.cs.

        {
            List<string> types = new List<string>(3);
            types.Add("ItemsView");
            types.Add("ItemsRepeater");
            types.Add("ItemContainer");

            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
            {
                ItemsView itemsView = null;
                ItemContainer itemContainer = null;
                Random rnd = new Random();
                List<string> itemsSource = new List<string>(Enumerable.Range(0, 10).Select(k => k + " - " + rnd.Next(100)));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView();

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.Layout is StackLayout);
                    Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemTemplate with ItemContainer");
                    DataTemplate itemTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ItemContainer>
                              <TextBlock Text='{Binding}' Foreground='Blue'/>
                            </ItemContainer>
                          </DataTemplate>") as DataTemplate;
                    Verify.IsNotNull(itemTemplate);
                    itemsView.ItemTemplate = itemTemplate;
                    Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemsSource");
                    itemsView.ItemsSource = itemsSource;
                    Verify.AreEqual(itemsSource, itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ItemsRepeater");
                    ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
                    Verify.IsNotNull(scrollView);
                    ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
                    Verify.IsNotNull(itemsRepeater);

                    int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
                    Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
                    itemContainer = itemsRepeater.FindVisualChildByType<ItemContainer>();
                    Verify.IsNotNull(itemContainer);
                    Verify.IsFalse(itemContainer.IsSelected);
#if MUX_PRERELEASE
                    Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
                    Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);
#endif

                    Log.Comment("Selecting first ItemContainer");
                    itemContainer.IsSelected = true;
                    Verify.IsTrue(itemContainer.IsSelected);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Selecting Extended SelectionMode");
                    itemsView.SelectionMode = ItemsViewSelectionMode.Extended;
                    Verify.AreEqual(ItemsViewSelectionMode.Extended, itemsView.SelectionMode);
                    Verify.IsTrue(itemContainer.IsSelected);
#if MUX_PRERELEASE
                    Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
                    Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Extended, itemContainer.MultiSelectMode);
#endif
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Selecting Extended SelectionMode");
                    itemsView.SelectionMode = ItemsViewSelectionMode.Multiple;
                    Verify.AreEqual(ItemsViewSelectionMode.Multiple, itemsView.SelectionMode);
                    Verify.IsTrue(itemContainer.IsSelected);
#if MUX_PRERELEASE
                    Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
                    Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Multiple, itemContainer.MultiSelectMode);
#endif
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Selecting None SelectionMode");
                    itemsView.SelectionMode = ItemsViewSelectionMode.None;
                    Verify.AreEqual(ItemsViewSelectionMode.None, itemsView.SelectionMode);
                    Verify.IsFalse(itemContainer.IsSelected);
#if MUX_PRERELEASE
                    Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCannotSelect, itemContainer.CanUserSelect);
                    Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);
#endif
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Selecting Single SelectionMode");
                    itemsView.SelectionMode = ItemsViewSelectionMode.Single;
                    Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
                    Verify.IsFalse(itemContainer.IsSelected);
#if MUX_PRERELEASE
                    Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
                    Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);
#endif
                });
            }
        }

void CanSetItemContainerIsSelectedProperty ( ) [inline]

Definition at line 614 of file ItemsViewTests.cs.

        {
            List<string> types = new List<string>(3);
            types.Add("ItemsView");
            types.Add("ItemsRepeater");
            types.Add("ItemContainer");

            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
            {
                ItemsView itemsView = null;
                ItemContainer itemContainer = null;
                Random rnd = new Random();
                List<string> itemsSource = new List<string>(Enumerable.Range(0, 10).Select(k => k + " - " + rnd.Next(100)));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView();

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.Layout is StackLayout);
                    Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemTemplate with ItemContainer");
                    DataTemplate itemTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ItemContainer>
                              <TextBlock Text='{Binding}' Foreground='Blue'/>
                            </ItemContainer>
                          </DataTemplate>") as DataTemplate;
                    Verify.IsNotNull(itemTemplate);
                    itemsView.ItemTemplate = itemTemplate;
                    Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemsSource");
                    itemsView.ItemsSource = itemsSource;
                    Verify.AreEqual(itemsSource, itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ItemsRepeater");
                    ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
                    Verify.IsNotNull(scrollView);
                    ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
                    Verify.IsNotNull(itemsRepeater);

                    int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
                    Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
                    itemContainer = itemsRepeater.FindVisualChildByType<ItemContainer>();
                    Verify.IsNotNull(itemContainer);
                    Verify.IsFalse(itemContainer.IsSelected);
#if MUX_PRERELEASE
                    Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
                    Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);

                    Log.Comment("Preventing interactive selection");
                    itemContainer.CanUserSelect = ItemContainerUserSelectMode.UserCannotSelect;
                    Verify.AreEqual(ItemContainerUserSelectMode.UserCannotSelect, itemContainer.CanUserSelect);
#endif

                    Log.Comment("Selecting first ItemContainer programmatically");
                    itemContainer.IsSelected = true;
                    Verify.IsTrue(itemContainer.IsSelected);
                });
            }
        }

void CanSetItemTemplateAfterItemsSourceProperty ( ) [inline]

Definition at line 764 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ItemsRepeater"))
            {
                DataTemplate itemTemplate = null;
                ItemsView itemsView = null;
                List<string> itemsSource = null;
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsSource = new List<string>(Enumerable.Range(0, 10).Select(k => k.ToString()));
                    itemsView = new ItemsView();

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemsSource");
                    itemsView.ItemsSource = itemsSource;
                    Verify.AreEqual(itemsSource, itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemTemplate with ItemContainer");
                    itemTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ItemContainer>
                              <TextBlock Text='{Binding}' Foreground='Blue'/>
                            </ItemContainer>
                          </DataTemplate>") as DataTemplate;
                    Verify.IsNotNull(itemTemplate);
                    itemsView.ItemTemplate = itemTemplate;
                    Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ScrollView");
                    ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
                    Verify.IsNotNull(scrollView);

                    Log.Comment("Extracting ItemsRepeater");
                    ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
                    Verify.IsNotNull(itemsRepeater);

                    Log.Comment("Expecting ItemTemplate of ItemsView and ItemRepeater to be identical");
                    Verify.AreEqual(itemsRepeater.ItemTemplate, itemsView.ItemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Resetting ItemTemplate");
                    itemsView.ItemTemplate = null;

                    Log.Comment("Expecting non-null ItemTemplate");
                    Verify.IsNotNull(itemsView.ItemTemplate);

                    Log.Comment("Expecting modified ItemTemplate");
                    Verify.AreNotEqual(itemsView.ItemTemplate, itemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Resetting window content and ItemsView");
                    Content = null;
                    itemsView = null;
                });

                WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
                Log.Comment("Done");
            }
        }

void CanUseItemsSourceWithItemContainers ( ) [inline]

Definition at line 293 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView"))
            {
                ItemsView itemsView = null;
                List<ItemContainer> itemsSource = new List<ItemContainer>();
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    for (int i = 0; i < 3; i++)
                    {
                        ItemContainer itemContainer = new ItemContainer()
                        {
                            Name = "itemContainer" + i.ToString(),
                            Child = new TextBlock()
                            {
                                Text = i.ToString()
                            }
                        };
                        itemsSource.Add(itemContainer);
                    }

                    itemsView = new ItemsView() { ItemsSource = itemsSource };
                    SetupDefaultUI(itemsView, itemsViewLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Logging ItemsView property values after Loaded event");
                    LogItemsViewProperties(itemsView);

                    Log.Comment("Accessing inner ItemsRepeater");
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
                    Verify.IsNotNull(itemsRepeater);

                    Log.Comment("Verifying ItemsRepeater children count");
                    int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
                    Verify.AreEqual(3, childrenCount);

                    Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
                    ItemContainer itemContainer = itemsRepeater.FindVisualChildByType<ItemContainer>();
                    Verify.IsNotNull(itemContainer);

                    Log.Comment("Verifying ItemsContainer name");
                    Verify.AreEqual("itemContainer0", itemContainer.Name);
                });
            }
        }

void HandleItemsInfoRequested ( ) [inline]

Definition at line 1170 of file ItemsViewTests.cs.

        {
            HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: false, useTemporaryAspectRatio: false);
        }

void HandleItemsInfoRequested | ( | bool | useSizeArrays,
 |  | bool | useExtraInfo,
 |  | bool | useTemporaryAspectRatio |
 | ) |  |  | [inline, private]

Definition at line 1612 of file ItemsViewTests.cs.

        {
            List<string> types = new List<string>
            {
                "ItemsView",
                "ScrollView",
                "ItemsRepeater"
            };

            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
            {
                ItemsView itemsView = null;
                ScrollView scrollView = null;
                LinedFlowLayout linedFlowLayout = null;
                int itemsInfoRequestedCount = 0;
                bool provideNilAspectRatios = useTemporaryAspectRatio;
                Random rnd = new Random();
                List<string> itemsSource = new List<string>(Enumerable.Range(0, 200).Select(k => k + " - " + rnd.Next(100)));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
                AutoResetEvent linedFlowLayoutItemsInfoRequestedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    linedFlowLayout = new LinedFlowLayout()
                    {
                        LineHeight = 50.0
                    };

                    linedFlowLayout.ItemsInfoRequested += (sender, args) =>
                    {
                        Log.Comment("LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex=" + args.ItemsRangeStartIndex + ", ItemsRangeRequestedLength=" + args.ItemsRangeRequestedLength);

                        Verify.IsGreaterThanOrEqual(args.ItemsRangeStartIndex, 0);
                        Verify.IsGreaterThan(args.ItemsRangeRequestedLength, 0);

                        int arrayStart = useExtraInfo ? 0 : args.ItemsRangeStartIndex;
                        int arrayLength = useExtraInfo ? itemsSource.Count : args.ItemsRangeRequestedLength;

                        args.ItemsRangeStartIndex = arrayStart;

                        double[] desiredAspectRatios = new double[arrayLength];

                        for (int index = 0; index < arrayLength; index++)
                        {
                            if (provideNilAspectRatios && index % 10 == 0)
                            {
                                // An aspect ratio <= 0 indicates that the actual number is still unknown.
                                desiredAspectRatios[index] = 0.0;
                            }
                            else
                            {
                                desiredAspectRatios[index] = 5.0 / (index + arrayStart + 1.0);
                            }
                        }

                        args.SetDesiredAspectRatios(desiredAspectRatios);

                        if (useSizeArrays)
                        {
                            double[] minWidths = new double[arrayLength];

                            for (int index = 0; index < arrayLength; index++)
                            {
                                minWidths[index] = index + arrayStart;
                            }

                            args.SetMinWidths(minWidths);

                            double[] maxWidths = new double[arrayLength];

                            for (int index = 0; index < arrayLength; index++)
                            {
                                maxWidths[index] = index + arrayStart + 100.0;
                            }

                            args.SetMaxWidths(maxWidths);
                        }
                        else
                        {
                            args.MinWidth = 40.0;
                            args.MaxWidth = 140.0;
                        }

                        itemsInfoRequestedCount++;

                        linedFlowLayoutItemsInfoRequestedEvent.Set();
                    };

                    itemsView = new ItemsView()
                    {
                        Layout = linedFlowLayout,
                        ItemsSource = itemsSource
                    };

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
                WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ScrollView");
                    scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
                    Verify.IsNotNull(scrollView);

                    scrollView.ScrollCompleted += (sender, args) =>
                    {
                        Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);

                        scrollViewScrollCompletedEvent.Set();
                    };

                    linedFlowLayoutItemsInfoRequestedEvent.Reset();

                    Log.Comment("Invoking ScrollView.ScrollTo");
                    scrollView.ScrollTo(0.0, 2000.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                });

                WaitForEvent("Waiting for ScrollCompleted event", scrollViewScrollCompletedEvent);

                IdleSynchronizer.Wait();

                Log.Comment($"ItemsInfoRequested event count={itemsInfoRequestedCount}");

                if (useExtraInfo)
                {
                    Verify.AreEqual(itemsInfoRequestedCount, 1);
                }
                else
                {
                    WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);

                    Verify.IsGreaterThan(itemsInfoRequestedCount, 1);
                }

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ItemsRepeater");
                    ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
                    Verify.IsNotNull(itemsRepeater);

                    int itemsRepeaterChildrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
                    Log.Comment($"ItemsRepeater children count: {itemsRepeaterChildrenCount}");

                    if (useTemporaryAspectRatio)
                    {
                        provideNilAspectRatios = false;
                        linedFlowLayoutItemsInfoRequestedEvent.Reset();

                        Log.Comment("Invoking LinedFlowLayout.InvalidateItemsInfo to trigger a new ItemsInfoRequested event");
                        linedFlowLayout.InvalidateItemsInfo();
                    }
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    if (useTemporaryAspectRatio)
                    {
                        WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);

                        Log.Comment($"ItemsInfoRequested event count={itemsInfoRequestedCount}");
                        if (useExtraInfo)
                        {
                            Verify.AreEqual(itemsInfoRequestedCount, 2);
                        }
                        else
                        {
                            Verify.IsGreaterThan(itemsInfoRequestedCount, 2);
                        }
                    }

                    Log.Comment("Resetting window content and ItemsView");
                    Content = null;
                    itemsView = null;
                });

                WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
                Log.Comment("Done");
            }
        }

void HandleItemsInfoRequestedWithExtraInfo ( ) [inline]

Definition at line 1184 of file ItemsViewTests.cs.

        {
            HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: true, useTemporaryAspectRatio: false);
        }

void HandleItemsInfoRequestedWithSizeArrays ( ) [inline]

Definition at line 1177 of file ItemsViewTests.cs.

        {
            HandleItemsInfoRequested(useSizeArrays: true, useExtraInfo: false, useTemporaryAspectRatio: false);
        }

void HandleItemsInfoRequestedWithSizeArraysAndExtraInfo ( ) [inline]

Definition at line 1191 of file ItemsViewTests.cs.

        {
            HandleItemsInfoRequested(useSizeArrays: true, useExtraInfo: true, useTemporaryAspectRatio: false);
        }

void HandleItemsInfoRequestedWithTemporaryAndExtraInfo ( ) [inline]

Definition at line 1205 of file ItemsViewTests.cs.

        {
            HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: true, useTemporaryAspectRatio: true);
        }

void HandleItemsInfoRequestedWithTemporaryInfo ( ) [inline]

Definition at line 1198 of file ItemsViewTests.cs.

        {
            HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: false, useTemporaryAspectRatio: true);
        }

void LinedFlowLayout_ItemsInfoRequested | ( | LinedFlowLayout | sender,
 |  | LinedFlowLayoutItemsInfoRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1418 of file ItemsViewTests.cs.

        {
            Log.Comment("LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex=" + args.ItemsRangeStartIndex + ", ItemsRangeRequestedLength=" + args.ItemsRangeRequestedLength);

            double[] desiredAspectRatios = new double[100];

            for (int desiredAspectRatioIndex = 0; desiredAspectRatioIndex < 100; desiredAspectRatioIndex++)
            {
                desiredAspectRatios[desiredAspectRatioIndex] = 1.0;
            }

            args.ItemsRangeStartIndex = 0;
            args.SetDesiredAspectRatios(desiredAspectRatios);
        }

void LogItemsViewProperties ( ItemsView itemsView ) [inline, private]

Definition at line 2157 of file ItemsViewTests.cs.

        {
            Log.Comment(" - itemsView.ItemTemplate: " + (itemsView.ItemTemplate == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.ItemsSource: " + (itemsView.ItemsSource == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.SelectedItem: " + (itemsView.SelectedItem == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.CurrentItemIndex: " + itemsView.CurrentItemIndex);
            Log.Comment(" - itemsView.Layout: " + (itemsView.Layout == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.Layout as StackLayout: " + ((itemsView.Layout as StackLayout) == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.IsEnabled: " + itemsView.IsEnabled);
            Log.Comment(" - itemsView.IsTabStop: " + itemsView.IsTabStop);
            Log.Comment(" - itemsView.XYFocusKeyboardNavigation: " + itemsView.XYFocusKeyboardNavigation);
            Log.Comment(" - itemsView.TabNavigation: " + itemsView.TabNavigation);
            Log.Comment(" - itemsView.SelectionMode: " + itemsView.SelectionMode);
        }

void SetupDefaultUI | ( | ItemsView | itemsView,
 |  | AutoResetEvent | itemsViewLoadedEvent = null,
 |  | AutoResetEvent | itemsViewUnloadedEvent = null,
 |  | bool | setAsContentRoot = true,
 |  | bool | useParentGrid = false |
 | ) |  |  | [inline, private]

Definition at line 2097 of file ItemsViewTests.cs.

        {
            Log.Comment("Setting up default UI with ItemsView");

            Verify.IsNotNull(itemsView);
            itemsView.Name = "itemsView";
            itemsView.Width = c_defaultUIItemsViewWidth;
            itemsView.Height = c_defaultUIItemsViewHeight;

            if (itemsViewLoadedEvent != null)
            {
                itemsView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ItemsView.Loaded event handler");
                    itemsViewLoadedEvent.Set();
                };
            }

            if (itemsViewUnloadedEvent != null)
            {
                itemsView.Unloaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ItemsView.Unloaded event handler");
                    itemsViewUnloadedEvent.Set();
                };
            }

            Grid parentGrid = null;

            if (useParentGrid)
            {
                parentGrid = new Grid();
                parentGrid.Width = c_defaultUIItemsViewWidth * 2;
                parentGrid.Height = c_defaultUIItemsViewHeight * 2;

                itemsView.HorizontalAlignment = HorizontalAlignment.Left;
                itemsView.VerticalAlignment = VerticalAlignment.Top;

                parentGrid.Children.Add(itemsView);
            }

            if (setAsContentRoot)
            {
                Log.Comment("Setting window content");
                if (useParentGrid)
                {
                    Content = parentGrid;
                }
                else
                {
                    Content = itemsView;
                }
            }
        }

double SnapToPower ( double value ) [inline, private]

Definition at line 1398 of file ItemsViewTests.cs.

        {
            double valuePower = 1.1;
            double dividerLog = Math.Log(valuePower);
            double valueLog = Math.Log(value);
            double valueExp = Math.Ceiling(valueLog / dividerLog);
            double valueRndCeil = Math.Pow(valuePower, valueExp);
            double valueRndFloor = valueRndCeil / valuePower;

            // Return valuePower^valueExp or valuePower^(valueExp - 1), whichever is closest to value.
            if (Math.Abs(valueRndCeil - value) <= Math.Abs(valueRndFloor - value))
            {
                return valueRndCeil;
            }
            else
            {
                return valueRndFloor;
            }
        }

void TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException ( LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger trigger ) [inline, private]

Definition at line 1800 of file ItemsViewTests.cs.

        {
            Log.Comment($"TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException - trigger={trigger}");

            ItemsView itemsView = null;
            LinedFlowLayout linedFlowLayout = null;
            List<string> itemsSource = new List<string>(Enumerable.Range(0, 300).Select(k => k + " - " + (new Random()).Next(100)));
            AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
            AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
            AutoResetEvent linedFlowLayoutItemsInfoRequestedEvent = new AutoResetEvent(false);
            bool linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown = false;

            RunOnUIThread.Execute(() =>
            {
                linedFlowLayout = new LinedFlowLayout()
                {
                    LineHeight = 50.0
                };

                itemsView = new ItemsView()
                {
                    Layout = linedFlowLayout,
                    ItemsSource = itemsSource
                };

                SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                itemsView.ScrollView.BringingIntoView += (sender, args) =>
                {
                    Log.Comment($"ScrollView.BringingIntoView raised - CorrelationId={args.CorrelationId}, TargetVerticalOffset={args.TargetVerticalOffset}");

                    scrollViewBringingIntoViewEvent.Set();
                };

                itemsView.ScrollView.ScrollCompleted += (sender, args) =>
                {
                    Log.Comment($"ScrollView.ScrollCompleted raised - CorrelationId={args.CorrelationId}, VerticalOffset={itemsView.ScrollView.VerticalOffset}");

                    scrollViewScrollCompletedEvent.Set();
                };
            });

            BringItemIntoView(150, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                linedFlowLayout.ItemsInfoRequested += (sender, args) =>
                {
                    Log.Comment($"LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");

                    Verify.IsGreaterThanOrEqual(args.ItemsRangeStartIndex, 0);
                    Verify.IsGreaterThan(args.ItemsRangeRequestedLength, 0);

                    try
                    {
                        switch (trigger)
                        {
                            case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexNegative:
                            {
                                args.ItemsRangeStartIndex = -1;
                                break;
                            }
                            case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexIncreased:
                            {
                                args.ItemsRangeStartIndex++;
                                break;
                            }
                            case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexTooSmall:
                            {
                                args.SetMinWidths(new double[args.ItemsRangeRequestedLength]);
                                args.ItemsRangeStartIndex--;
                                break;
                            }
                            case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthSmallerThanItemsRangeRequestedLength:
                            {
                                args.SetMinWidths(new double[args.ItemsRangeRequestedLength - 1]);
                                break;
                            }
                            case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthTooSmallForDecreasedItemsRangeStartIndex:
                            {
                                args.ItemsRangeStartIndex--;
                                args.SetMinWidths(new double[args.ItemsRangeRequestedLength]);
                                break;
                            }
                            case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthInconsistent:
                            {
                                args.SetMinWidths(new double[args.ItemsRangeRequestedLength]);
                                args.SetMaxWidths(new double[args.ItemsRangeRequestedLength + 1]);
                                break;
                            }
                        }
                    }
                    catch (Exception exception)
                    {
                        Log.Comment($"Exception={exception.ToString()}");
                        linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown = true;
                    }

                    linedFlowLayoutItemsInfoRequestedEvent.Set();
                };

                Log.Comment("Triggering the ItemsInfoRequested event");
                itemsView.ScrollView.ScrollBy(0.0, 1.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });

            WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown={linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown}");
                Verify.IsTrue(linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown);

                Log.Comment("Resetting window content and ItemsView");
                Content = null;
                itemsView = null;
            });

            WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
            Log.Comment("Done");
        }

void TriggerLinedFlowLayoutItemsInfoRequestedEventArgsExceptions ( ) [inline]

Definition at line 1213 of file ItemsViewTests.cs.

        {
            TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexNegative);
            TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexIncreased);
            TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexTooSmall);
            TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthSmallerThanItemsRangeRequestedLength);
            TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthTooSmallForDecreasedItemsRangeStartIndex);
            TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthInconsistent);
        }

void VerifyCanInvertSelection ( ) [inline]

Definition at line 489 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView"))
            {
                ItemsView itemsView = null;
                List<int> itemsSource = new List<int>(Enumerable.Range(0, 5000));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView() { ItemsSource = itemsSource };
                    SetupDefaultUI(itemsView, itemsViewLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Logging ItemsView property values after Loaded event");
                    LogItemsViewProperties(itemsView);

                    itemsView.Select(0);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.IsSelected(0), "Selected item is 0");

                    itemsView.InvertSelection();
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    var totalItemCount = itemsSource.Count;
                    var numSelectedItems = itemsView.SelectedItems.Count;

                    Verify.IsFalse(itemsView.IsSelected(0), "Item 0 is not selected");
                    Verify.AreEqual(numSelectedItems, totalItemCount - 1 , "Verify expected number of items are selected");
                });

                IdleSynchronizer.Wait();
                Log.Comment("Done");
            }
        }

void VerifyDefaultPropertyValues ( ) [inline]

Definition at line 55 of file ItemsViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemsView itemsView = new ItemsView();
                Verify.IsNotNull(itemsView);

                Log.Comment("Logging ItemsView default property values");
                LogItemsViewProperties(itemsView);

                Log.Comment("Verifying ItemsView default property values");
                Verify.IsNull(itemsView.ItemTemplate);
                Verify.IsNull(itemsView.ItemsSource);
                Verify.IsNull(itemsView.SelectedItem);
                Verify.IsNull(itemsView.Layout);
                Verify.IsTrue(itemsView.IsEnabled);
                Verify.IsTrue(itemsView.IsTabStop);
                Verify.AreEqual(XYFocusKeyboardNavigationMode.Auto, itemsView.XYFocusKeyboardNavigation);
                Verify.AreEqual(KeyboardNavigationMode.Local, itemsView.TabNavigation);
                Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
                Verify.AreEqual(0, itemsView.SelectedItems.Count());
                Verify.AreEqual(-1, itemsView.CurrentItemIndex);
            });
        }

void VerifyItemsViewUIABehavior ( ) [inline]

Definition at line 937 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
            {
                ItemsView itemsView = null;
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView();

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemsSource");
                    Random rnd = new Random();
                    List<string> itemsSource = new List<string>(Enumerable.Range(0, 25).Select(k => k + " - " + rnd.Next(100)));
                    Verify.IsNull(itemsView.ItemsSource);
                    itemsView.ItemsSource = itemsSource;

                    Verify.IsNotNull(itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    for (int i = 0; i < 25; i++)
                    {
                        ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
                        Verify.IsNotNull(itemsRepeater);

                        var element = itemsRepeater.TryGetElement(i);
                        Verify.IsNotNull(element);

                        Verify.AreEqual(i + 1, element.GetValue(AutomationProperties.PositionInSetProperty));
                        Verify.AreEqual(25, element.GetValue(AutomationProperties.SizeOfSetProperty));
                    }
                });
            }
        }

void VerifyItemsViewUIASelectionProviderBehavior ( ) [inline]

Definition at line 985 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
            {
                ItemsView itemsView = null;
                ItemContainer itemContainer = null;
                ItemsRepeater itemsRepeater = null;
                ScrollView scrollView = null;
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
                ISelectionProvider selectionProvider = null;
                ISelectionItemProvider selectionItemProvider = null;

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView();

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemTemplate with ItemContainer");
                    DataTemplate itemTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ItemContainer>
                              <TextBlock Text='{Binding}' Foreground='Blue'/>
                            </ItemContainer>
                          </DataTemplate>") as DataTemplate;
                    Verify.IsNotNull(itemTemplate);
                    itemsView.ItemTemplate = itemTemplate;
                    Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
                });

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ScrollView");
                    scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
                    Verify.IsNotNull(scrollView);

                    scrollView.BringingIntoView += (sender, args) =>
                    {
                        Log.Comment("ScrollView.BringingIntoView raised - CorrelationId=" + args.CorrelationId + ", TargetVerticalOffset=" + args.TargetVerticalOffset);

                        scrollViewBringingIntoViewEvent.Set();
                    };

                    scrollView.ScrollCompleted += (sender, args) =>
                    {
                        Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);

                        scrollViewScrollCompletedEvent.Set();
                    };

                    Log.Comment("Setting ItemsSource");
                    Random rnd = new Random();
                    List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
                    Verify.IsNull(itemsView.ItemsSource);
                    itemsView.ItemsSource = itemsSource;

                    Verify.IsNotNull(itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    var itemsViewPeer = FrameworkElementAutomationPeer.CreatePeerForElement(itemsView);
                    Verify.IsNotNull(itemsViewPeer);
                    var itemsViewSelectionPattern = itemsViewPeer.GetPattern(PatternInterface.Selection);
                    Verify.IsNotNull(itemsViewSelectionPattern);
                    selectionProvider = itemsViewSelectionPattern as ISelectionProvider;

                    // ItemsView CanSelectMultiple is false by default.
                    Verify.IsFalse(selectionProvider.CanSelectMultiple, "CanSelectMultiple returns false when ItemsViewSelectionMode is single");

                    itemsView.SelectionMode = ItemsViewSelectionMode.Multiple;
                    Verify.IsTrue(selectionProvider.CanSelectMultiple, "CanSelectMultiple returns true when ItemsViewSelectionMode is multiple");

                    itemsView.SelectionMode = ItemsViewSelectionMode.Extended;
                    Verify.IsTrue(selectionProvider.CanSelectMultiple, "CanSelectMultiple returns true when ItemsViewSelectionMode is extended");

                    Verify.IsNull(selectionProvider.GetSelection());
                    Log.Comment("GetSelection returns null as no items are selected.");
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting ItemsRepeater");
                    ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
                    Verify.IsNotNull(scrollView);
                    itemsRepeater = scrollView.Content as ItemsRepeater;
                    Verify.IsNotNull(itemsRepeater);

                    int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
                    Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
                    itemContainer = itemsRepeater.TryGetElement(0) as ItemContainer;
                    Verify.IsNotNull(itemContainer);
                    Verify.IsFalse(itemContainer.IsSelected);

                    Log.Comment("Selecting first ItemContainer");
                    itemContainer.IsSelected = true;
                    Verify.IsTrue(itemContainer.IsSelected);

                    Verify.IsNotNull(selectionProvider.GetSelection());
                    Log.Comment("GetSelection returns peer of selected ItemContainer.");

                    Log.Comment("Extracting second ItemContainer.");
                    itemContainer = itemsRepeater.TryGetElement(1) as ItemContainer;
                    Verify.IsNotNull(itemContainer);
                    Verify.IsFalse(itemContainer.IsSelected);

                    Log.Comment("Selecting second ItemContainer");
                    itemContainer.IsSelected = true;
                    Verify.IsTrue(itemContainer.IsSelected);

                    Verify.IsNotNull(selectionProvider.GetSelection());
                    Verify.AreEqual(selectionProvider.GetSelection().Count(), 2);
                    Log.Comment("GetSelection returns list of 2 ItemContainer peers.");

                    Log.Comment("Extracting last ItemContainer.");
                    itemContainer = itemsRepeater.TryGetElement(49) as ItemContainer;
                    Verify.IsNull(itemContainer);
                    Log.Comment("ItemContainer is null as it is out of view and not realized.");
                });

                IdleSynchronizer.Wait();

                Log.Comment("Scroll to last item.");
                BringItemIntoView(49, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Extracting last ItemContainer.");
                    itemContainer = itemsRepeater.TryGetElement(49) as ItemContainer;
                    Verify.IsNotNull(itemContainer);
                    Log.Comment("ItemContainer is non-null as it is in view and realized.");

                    Log.Comment("Selecting last ItemContainer");
                    itemContainer.IsSelected = true;
                    Verify.IsTrue(itemContainer.IsSelected);

                    Verify.IsNotNull(selectionProvider.GetSelection());
                    Verify.AreEqual(selectionProvider.GetSelection().Count(), 1);
                    Log.Comment("GetSelection returns 1 ItemContainer peer that is in view and realized.");

                    var itemContainerPeer = FrameworkElementAutomationPeer.CreatePeerForElement(itemContainer);
                    Verify.IsNotNull(itemContainerPeer);
                    var itemContainerSelectionPattern = itemContainerPeer.GetPattern(PatternInterface.SelectionItem);
                    Verify.IsNotNull(itemContainerSelectionPattern);
                    selectionItemProvider = itemContainerSelectionPattern as ISelectionItemProvider;

                    Verify.IsNotNull(selectionItemProvider.SelectionContainer);
                    Log.Comment("ItemContainer SelectionContainer returns parent ItemsView.");
                });

                Log.Comment("Scroll back to first item.");
                BringItemIntoView(0, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsNotNull(selectionProvider.GetSelection());
                    Verify.AreEqual(selectionProvider.GetSelection().Count(), 2);
                    Log.Comment("GetSelection returns list of 2 ItemContainer peers that are in view and realized.");

                    var itemContainerPeer = FrameworkElementAutomationPeer.CreatePeerForElement(itemContainer);
                    Verify.IsNotNull(itemContainerPeer);
                    var itemContainerSelectionPattern = itemContainerPeer.GetPattern(PatternInterface.SelectionItem);
                    Verify.IsNotNull(itemContainerSelectionPattern);
                    selectionItemProvider = itemContainerSelectionPattern as ISelectionItemProvider;

                    Verify.IsNotNull(selectionItemProvider.SelectionContainer);
                    Log.Comment("ItemContainer SelectionContainer returns parent ItemsView.");
                });
            }
        }

void VerifyLinedFlowLayoutAverageItemsPerLineStability ( ) [inline]

Definition at line 1306 of file ItemsViewTests.cs.

        {
            ItemsView itemsView = null;
            LinedFlowLayout linedFlowLayout = null;
            ObservableCollection<string> itemsSource = new ObservableCollection<string>();
            AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
            double previousRawAverageItemsPerLine = 0.0;
            double previousSnappedAverageItemsPerLine = 0.0;

            RunOnUIThread.Execute(() =>
            {
                linedFlowLayout = new LinedFlowLayout()
                {
                    LineHeight = 50.0
                };

                itemsView = new ItemsView()
                {
                    Layout = linedFlowLayout,
                    ItemsSource = itemsSource
                };

                SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);

                itemsView.Height = 700.0;
            });

            WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

            IdleSynchronizer.Wait();

            for (int newItemCount = 0; newItemCount < 10; newItemCount++)
            {
                for (int duplicate = 0; duplicate < 16; duplicate++)
                {
                    RunOnUIThread.Execute(() =>
                    {
                        string newItem = Math.Pow(2, newItemCount).ToString();

                        Log.Comment($"Adding item: {newItem}");

                        itemsSource.Add(newItem);
                    });

                    IdleSynchronizer.Wait();

                    RunOnUIThread.Execute(() =>
                    {
                        double averageItemAspectRatio = LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(linedFlowLayout);
                        double snappedAverageItemsPerLine = LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(linedFlowLayout);
                        double rawAverageItemsPerLine1 = LayoutsTestHooks.GetLinedFlowLayoutRawAverageItemsPerLine(linedFlowLayout);
                        double rawAverageItemsPerLine2 = c_defaultUIItemsViewWidth / (averageItemAspectRatio * linedFlowLayout.ActualLineHeight);

                        Log.Comment($"LinedFlowLayout averageItemAspectRatio: {averageItemAspectRatio.ToString()}, snappedAverageItemsPerLine: {snappedAverageItemsPerLine.ToString()}");
                        Log.Comment($"LinedFlowLayout rawAverageItemsPerLine1: {rawAverageItemsPerLine1.ToString()}, rawAverageItemsPerLine2: {rawAverageItemsPerLine2.ToString()}");

                        double previousRawAverageItemsPerLineSnappedToPower = SnapToPower(previousRawAverageItemsPerLine);
                        double rawAverageItemsPerLineSnappedToPower = SnapToPower(rawAverageItemsPerLine2);

                        if (previousRawAverageItemsPerLineSnappedToPower != rawAverageItemsPerLineSnappedToPower &&
                            previousSnappedAverageItemsPerLine != snappedAverageItemsPerLine)
                        {
                            Log.Comment($"previousRawAverageItemsPerLine: {previousRawAverageItemsPerLine}");
                            Log.Comment($"previousSnappedAverageItemsPerLine: {previousSnappedAverageItemsPerLine}");

                            Log.Comment($"previousRawAverageItemsPerLineSnappedToPower: {previousRawAverageItemsPerLineSnappedToPower}");
                            Log.Comment($"rawAverageItemsPerLineSnappedToPower: {rawAverageItemsPerLineSnappedToPower}");

                            // When the previous and new snapped average-items-per-line differ, it must be a raw variation of more than 0.1.
                            Verify.IsGreaterThan(Math.Abs(rawAverageItemsPerLine2 - previousRawAverageItemsPerLine), 0.1);
                        }

                        previousRawAverageItemsPerLine = rawAverageItemsPerLine2;
                        previousSnappedAverageItemsPerLine = snappedAverageItemsPerLine;
                    });
                }
            }

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Resetting window content and ItemsView");
                Content = null;
                itemsView = null;
            });

            WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
            Log.Comment("Done");
        }

void VerifyPropertySetters ( ) [inline]

Definition at line 148 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
            {
                ItemsView itemsView = null;
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView();

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemsSource");
                    Random rnd = new Random();
                    List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
                    Verify.IsNull(itemsView.ItemTemplate);
                    Verify.IsNull(itemsView.ItemsSource);
                    itemsView.ItemsSource = itemsSource;
                    Verify.IsNotNull(itemsView.ItemTemplate);
                    Verify.AreEqual(itemsSource, itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ItemTemplate");
                    DataTemplate itemTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ItemContainer>
                              <TextBlock Text='{Binding}' Foreground='Red'/>
                            </ItemContainer>
                          </DataTemplate>") as DataTemplate;
                    Verify.IsNotNull(itemTemplate);
                    itemsView.ItemTemplate = itemTemplate;
                    Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting Layout");
                    UniformGridLayout uniformGridLayout = new UniformGridLayout()
                    {
                        MaximumRowsOrColumns = 4,
                        MinColumnSpacing = 10,
                        MinRowSpacing = 10,
                        MinItemWidth = 100,
                        MinItemHeight = 100
                    };
                    Verify.IsNotNull(itemsView.Layout);
                    Verify.IsTrue(itemsView.Layout is StackLayout);
                    itemsView.Layout = uniformGridLayout;
                    Verify.IsTrue(itemsView.Layout is UniformGridLayout);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting SelectionMode");
                    Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
                    itemsView.SelectionMode = ItemsViewSelectionMode.None;
                    Verify.AreEqual(ItemsViewSelectionMode.None, itemsView.SelectionMode);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Changing ItemTemplate");
                    DataTemplate itemTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ItemContainer>
                              <TextBlock Text='{Binding}' Foreground='Green'/>
                            </ItemContainer>
                          </DataTemplate>") as DataTemplate;
                    Verify.IsNotNull(itemsView.ItemTemplate);
                    itemsView.ItemTemplate = itemTemplate;
                    Verify.IsNotNull(itemsView.ItemTemplate);
                    Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Changing ItemsSource");
                    Random rnd = new Random();
                    List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
                    Verify.IsNotNull(itemsView.ItemsSource);
                    itemsView.ItemsSource = itemsSource;
                    Verify.IsNotNull(itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Resetting Layout");
                    Verify.IsNotNull(itemsView.Layout);
                    itemsView.Layout = null;
                    Verify.IsNull(itemsView.Layout);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Resetting ItemsSource");
                    Verify.IsNotNull(itemsView.ItemsSource);
                    itemsView.ItemsSource = null;
                    Verify.IsNull(itemsView.ItemsSource);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Resetting window content and ItemsView");
                    Content = null;
                    itemsView = null;
                });

                WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);

                IdleSynchronizer.Wait();
                Log.Comment("Garbage collecting...");
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                Log.Comment("Done");
            }
        }

void VerifyPropertyValuesAfterTemplateApplication ( ) [inline]

Definition at line 82 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
            {
                ItemsView itemsView = null;
                Random rnd = new Random();
                List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView() { ItemsSource = itemsSource };

                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Logging ItemsView property values after Loaded event");
                    LogItemsViewProperties(itemsView);

                    Log.Comment("Verifying ItemsView property values after Loaded event");
                    Verify.IsNotNull(itemsView.ItemTemplate);
                    Verify.IsNotNull(itemsView.ItemsSource);
                    Verify.IsNull(itemsView.SelectedItem);
                    Verify.IsNotNull(itemsView.Layout);
                    Verify.IsTrue(itemsView.Layout is StackLayout);
                    Verify.IsTrue(itemsView.IsEnabled);
                    Verify.IsFalse(itemsView.IsTabStop);
                    Verify.AreEqual(XYFocusKeyboardNavigationMode.Disabled, itemsView.XYFocusKeyboardNavigation);
                    Verify.AreEqual(KeyboardNavigationMode.Once, itemsView.TabNavigation);
                    Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
                    Verify.AreEqual(0, itemsView.SelectedItems.Count());
                    Verify.AreEqual(-1, itemsView.CurrentItemIndex);

                    Verify.AreEqual(c_defaultUIItemsViewWidth, itemsView.ActualWidth);
                    Verify.AreEqual(c_defaultUIItemsViewHeight, itemsView.ActualHeight);

                    Log.Comment("Verifying ScrollView property values after Loaded event");
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                    Verify.IsNotNull(scrollView);
                    Verify.AreEqual(c_defaultUIItemsViewWidth, scrollView.ViewportWidth);
                    Verify.AreEqual(c_defaultUIItemsViewHeight, scrollView.ViewportHeight);

                    Log.Comment("Resetting window content and ItemsView");
                    Content = null;
                    itemsView = null;
                });

                WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);

                IdleSynchronizer.Wait();
                Log.Comment("Garbage collecting...");
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                Log.Comment("Done");
            }
        }

void VerifySelectionPersistsAfterRecycling ( ) [inline]

Definition at line 540 of file ItemsViewTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
            {
                ItemsView itemsView = null;
                ScrollView scrollView = null;
                List<int> itemsSource = new List<int>(Enumerable.Range(0, 5000));
                AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    itemsView = new ItemsView() { ItemsSource = itemsSource };
                    SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;

                    scrollView.BringingIntoView += (sender, args) =>
                    {
                        Log.Comment("ScrollView.BringingIntoView raised - CorrelationId=" + args.CorrelationId + ", TargetVerticalOffset=" + args.TargetVerticalOffset);

                        scrollViewBringingIntoViewEvent.Set();
                    };

                    scrollView.ScrollCompleted += (sender, args) =>
                    {
                        Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);

                        scrollViewScrollCompletedEvent.Set();
                    };
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Logging ItemsView property values after Loaded event");
                    LogItemsViewProperties(itemsView);

                    itemsView.Select(0);
                });

                IdleSynchronizer.Wait();

                // Scroll to the end
                BringItemIntoView(itemsSource.Count-1, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.IsSelected(0), "Selected item is still 0");
                });

                // Scroll back to 0
                BringItemIntoView(0, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(itemsView.IsSelected(0), "Selected item is still 0");
                });

                IdleSynchronizer.Wait();
                Log.Comment("Done");
            }
        }

void WaitForEvent | ( | string | logComment,
 |  | EventWaitHandle | eventWaitHandle |
 | ) |  |  | [inline, private]

Definition at line 2172 of file ItemsViewTests.cs.

        {
            Log.Comment(logComment);
            if (!eventWaitHandle.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration)))
            {
                throw new Exception("Timeout expiration in WaitForEvent.");
            }
        }

Member Data Documentation

const double c_defaultUIItemsViewHeight = 400.0 [private]

Definition at line 33 of file ItemsViewTests.cs.

const double c_defaultUIItemsViewWidth = 200.0 [private]

Definition at line 32 of file ItemsViewTests.cs.

const int c_MaxWaitDuration = 5000 [private]

Definition at line 30 of file ItemsViewTests.cs.

Property Documentation

IEnumerable<int> Digits [get]

Definition at line 36 of file ItemsViewTests.cs.

The documentation for this class was generated from the following file:
  • ItemsView/APITests/ItemsViewTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanelTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • LayoutPanelTests
Public Member Functions | Static Public Member Functions

LayoutPanelTests Class Reference

List of all members.

Public Member Functions

void | VerifyCustomNonVirtualizingLayout ()
void | VerifyPaddingAndBorderThicknessLayoutOffset ()
void | VerifyPaddingAndBorderThicknessLayoutOffset_StackLayout ()
void | VerifySwitchingLayoutDynamically ()

Static Public Member Functions

static void | ClassInitialize (TestContext context)

Detailed Description

Definition at line 22 of file LayoutPanelTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext context ) [inline, static]

Definition at line 26 of file LayoutPanelTests.cs.

{ }

void VerifyCustomNonVirtualizingLayout ( ) [inline]

Definition at line 163 of file LayoutPanelTests.cs.

        {
            LayoutPanel panel = null;
            Button button1 = null;
            Button button2 = null;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Create LayoutPanel with MyCustomNonVirtualizingStackLayout");

                panel = new LayoutPanel() { Width = 400, Height = 400 };

                var customStackLayout = new MyCustomNonVirtualizingStackLayout();
                panel.Layout = customStackLayout;

                button1 = new Button { Height = 100, Width = 400, Content = "1" };
                button2 = new Button { Height = 100, Width = 400, Content = "2" };
                panel.Children.Add(button1);
                panel.Children.Add(button2);

                Content = panel;
                Content.UpdateLayout();

                Log.Comment("Verify layout for StackLayout:");
                Verify.AreEqual(new Rect(0, 0, 400, 100), LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
                Verify.AreEqual(new Rect(0, 100, 400, 100), LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
            });

            IdleSynchronizer.Wait();
        }

void VerifyPaddingAndBorderThicknessLayoutOffset ( ) [inline]

Definition at line 29 of file LayoutPanelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                double width = 400;
                double height = 400;
                Thickness borderThickness = new Thickness(5, 10, 15, 20);
                Thickness padding = new Thickness(2, 4, 6, 8);

                LayoutPanel panel = new LayoutPanel();
                panel.Width = width;
                panel.Height = height;
                panel.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
                panel.BorderThickness = borderThickness;
                panel.Padding = padding;

                var button = new Button { Content = "Button", VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch };
                var expectedButtonLayoutSlot = new Rect
                {
                    Width = width - borderThickness.Left - borderThickness.Right - padding.Left - padding.Right,
                    Height = height - borderThickness.Top - borderThickness.Bottom - padding.Top - padding.Bottom,
                    X = borderThickness.Left + padding.Left,
                    Y = borderThickness.Top + padding.Top,
                };
                panel.Children.Add(button);

                Content = panel;
                Content.UpdateLayout();

                Verify.AreEqual(expectedButtonLayoutSlot, LayoutInformation.GetLayoutSlot(button), "Verify LayoutSlot of child Button");
            });
        }

void VerifyPaddingAndBorderThicknessLayoutOffset_StackLayout ( ) [inline]

Definition at line 63 of file LayoutPanelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                double width = 400;
                double height = 400;
                Thickness borderThickness = new Thickness(5, 10, 15, 20);
                Thickness padding = new Thickness(2, 4, 6, 8);

                LayoutPanel panel = new LayoutPanel();
                panel.Layout = new StackLayout();
                panel.Width = width;
                panel.Height = height;
                panel.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
                panel.BorderThickness = borderThickness;
                panel.Padding = padding;

                double unpaddedWidth = width - borderThickness.Left - borderThickness.Right - padding.Left - padding.Right;
                double itemHeight = 50;
                double unpaddedX = borderThickness.Left + padding.Left;
                double unpaddedY = borderThickness.Top + padding.Top;

                var button1 = new Button { Content = "Button", Height = itemHeight, HorizontalAlignment = HorizontalAlignment.Stretch };
                var button2 = new Button { Content = "Button", Height = itemHeight, HorizontalAlignment = HorizontalAlignment.Stretch };
                var expectedButton1LayoutSlot = new Rect
                {
                    Width = unpaddedWidth,
                    Height = itemHeight,
                    X = unpaddedX,
                    Y = unpaddedY,
                };
                var expectedButton2LayoutSlot = new Rect
                {
                    Width = unpaddedWidth,
                    Height = itemHeight,
                    X = unpaddedX,
                    Y = unpaddedY + itemHeight,
                };
                panel.Children.Add(button1);
                panel.Children.Add(button2);

                Content = panel;
                Content.UpdateLayout();

                Verify.AreEqual(expectedButton1LayoutSlot, LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
                Verify.AreEqual(expectedButton2LayoutSlot, LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
            });
        }

void VerifySwitchingLayoutDynamically ( ) [inline]

Definition at line 113 of file LayoutPanelTests.cs.

        {
            LayoutPanel panel = null;
            Button button1 = null;
            Button button2 = null;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Create LayoutPanel with StackLayout");

                panel = new LayoutPanel() { Width = 400, Height = 400 };

                var stackLayout = new StackLayout
                {
                    Orientation = Orientation.Vertical
                };
                panel.Layout = stackLayout;

                button1 = new Button { Height = 100, Content = "1" };
                button2 = new Button { Height = 100, Content = "2" };
                panel.Children.Add(button1);
                panel.Children.Add(button2);

                Content = panel;
                Content.UpdateLayout();

                Log.Comment("Verify layout for StackLayout:");
                Verify.AreEqual(new Rect(0, 0, 400, 100), LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
                Verify.AreEqual(new Rect(0, 100, 400, 100), LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Switch LayoutPanel to UniformGridLayout");
                UniformGridLayout gridLayout = new UniformGridLayout();
                gridLayout.MinItemWidth = 100;
                gridLayout.MinItemHeight = 100;
                panel.Layout = gridLayout;

                Content.UpdateLayout();

                Log.Comment("Verify layout for UniformGridLayout:");
                Verify.AreEqual(new Rect(0, 0, 100, 100), LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
                Verify.AreEqual(new Rect(100, 0, 100, 100), LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
            });
        }

The documentation for this class was generated from the following file:
  • LayoutPanel/APITests/LayoutPanelTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LightConfigurationTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • LightConfigurationTests
Public Member Functions | Static Public Member Functions | Properties | Private Member Functions | Private Attributes

LightConfigurationTests Class Reference

List of all members.

Public Member Functions

void | VerifyLightsAfterResettingContentOnMainWindow ()
void | VerifyLightsAfterResettingContentOnSecondaryWindow ()
void | VerifyLightsAttachedDuringLayoutOnSecondaryWindow ()
void | VerifyLightsOnMainWindow ()
void | VerifyLightsOnSecondaryWindow ()

Static Public Member Functions

static string | GetBrushName (string fullName)

Properties

static IEnumerable< string > | BackgroundBrushNames [get]
IEnumerable< KeyValuePair
< string, Brush > > 		RevealBackgroundBrushes [get]

Private Member Functions

void | CompositionTarget_Rendering (object sender, object e)
void | CTR_CheckCleanup (object sender, object e)
UIElement | GetTopParent (UIElement current)
void | PollTimer_Tick (object sender, object e)
void | VerifyLights (CoreApplicationView whichView, bool forceLightAttachDuringLayout, bool resetWindowContent)

Private Attributes

AutoResetEvent | _cleanupVerified
UIElement | _fullWindowMediaRoot
DispatcherTimer | _lightValidationTimer
AutoResetEvent | _mediaFullScreened
MediaPlayerElement | _mpe
TimeSpan | _pollInterval = new TimeSpan(16667)
int | _pollMaxRetries = 60
int | _pollRetry = 0
UIElement | _popupRoot
AutoResetEvent | _validationCompleted
UIElement | _visualRoot

Detailed Description

Definition at line 59 of file LightConfigurationTests.cs.

Member Function Documentation

void CompositionTarget_Rendering | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 336 of file LightConfigurationTests.cs.

        {
            CompositionTarget.Rendering -= CompositionTarget_Rendering;

            // Find and store FullWindow Media Root
            _fullWindowMediaRoot = GetTopParent(_mpe.TransportControls);
            Verify.AreNotEqual(_visualRoot, _fullWindowMediaRoot);

            _mpe.IsFullWindow = false;
            _mediaFullScreened.Set();
        }

void CTR_CheckCleanup | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 348 of file LightConfigurationTests.cs.

        {
            CompositionTarget.Rendering -= CTR_CheckCleanup;

            Log.Comment("Check that lights are detached once all RevealBrushes in the main tree are gone");

            Verify.AreEqual(_visualRoot.Lights.Count, 0, "App.CurrentWindow.Content.Lights.Count should be 0");
            Verify.AreEqual(_popupRoot.Lights.Count, 0, "PopupRoot.Lights.Count should be 0");
            // In RS3 we made a change where WUX internally sets lights on the RootScrollViewer on the RootVisual instead. If that
            // happens, then we don't need to attach lights to the other roots. This change was made around the time that
            // Symbol.GlobalNavigationButton was added.
            bool wuxSetsRSVLightOnRootVisual = ApiInformation.IsEnumNamedValuePresent("Microsoft.UI.Xaml.Controls.Symbol", "GlobalNavigationButton");
            if (!wuxSetsRSVLightOnRootVisual)
            {
                Verify.AreEqual(_fullWindowMediaRoot.Lights.Count, 5, "FullWindowMediaRoot.Lights.Count should be 5 (because they were manually added)");
            }
            else
            {
                Verify.AreEqual(_fullWindowMediaRoot.Lights.Count, 0, "FullWindowMediaRoot.Lights.Count should be 0 (because they were never manually added)");
            }

            _cleanupVerified.Set();
        }

static string GetBrushName ( string fullName ) [inline, static]

Definition at line 445 of file LightConfigurationTests.cs.

        {
            //SystemControlTransparentRevealBackgroundBrush
            //SystemControlBackgroundTransparentRevealBorderBrush
            if (fullName == null || fullName.Length <= 24)
                return string.Empty;

            return fullName.Substring(19, fullName.Length - 24);
        }

UIElement GetTopParent ( UIElement current ) [inline, private]

Definition at line 372 of file LightConfigurationTests.cs.

        {
            UIElement parent = current;
            do
            {
                current = parent;
                parent = (UIElement)VisualTreeHelper.GetParent(current);
            } while (parent != null);

            return current;
        }

void PollTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 384 of file LightConfigurationTests.cs.

        {
            int expectedLightsOnPopupRoot = 5;
            int expectedLightsOnFWMediaRoot = 5;

            // In RS3 we made a change where WUX internally sets lights on the RootScrollViewer on the RootVisual instead. If that
            // happens, then we don't need to attach lights to the other roots. This change was made around the time that
            // Symbol.GlobalNavigationButton was added.
            bool wuxSetsRSVLightOnRootVisual = ApiInformation.IsEnumNamedValuePresent("Microsoft.UI.Xaml.Controls.Symbol", "GlobalNavigationButton");
            if (wuxSetsRSVLightOnRootVisual)
            {
                Log.Comment("WUX sets RootScrollViewer lights on root visual");
                expectedLightsOnPopupRoot = 0;
                expectedLightsOnFWMediaRoot = 0;
            }

            bool rootHaslights = _visualRoot.Lights.Count == 5;
            bool popupRootHaslights = _popupRoot.Lights.Count == expectedLightsOnPopupRoot;
            bool fullWindowMediaHaslights = _fullWindowMediaRoot.Lights.Count == expectedLightsOnFWMediaRoot;

            _pollRetry++;
            Log.Comment("Validating lights, attempt #" + _pollRetry);

            if ((rootHaslights && popupRootHaslights && fullWindowMediaHaslights) ||
                _pollRetry == _pollMaxRetries)
            {
                Verify.AreEqual(_visualRoot.Lights.Count, 5, "App.CurrentWindow.Content.Lights.Count should be 5");
                Verify.AreEqual(_popupRoot.Lights.Count, expectedLightsOnPopupRoot, "PopupRoot.Lights.Count should be " + expectedLightsOnPopupRoot);
                Verify.AreEqual(_fullWindowMediaRoot.Lights.Count, expectedLightsOnFWMediaRoot, "FullWindowMediaRoot.Lights.Count should be " + expectedLightsOnFWMediaRoot);

                ((DispatcherTimer)sender).Stop();
                _validationCompleted.Set();
            }
            else
            {
                Log.Comment("App.CurrentWindow.Content.Lights.Count is " + _visualRoot.Lights.Count + ", should be 5");
                Log.Comment("PopupRoot.Lights.Count is " + _popupRoot.Lights.Count + ", should be " + expectedLightsOnPopupRoot);
                Log.Comment("FullWindowMediaRoot.Lights.Count is " + _fullWindowMediaRoot.Lights.Count + ", should be " + expectedLightsOnFWMediaRoot);
            }
        }

void VerifyLights | ( | CoreApplicationView | whichView,
 |  | bool | forceLightAttachDuringLayout,
 |  | bool | resetWindowContent |
 | ) |  |  | [inline, private]

Definition at line 125 of file LightConfigurationTests.cs.

        {
            AutoResetEvent popupOpened = null;
            Popup myPopup = null;
            StackPanel mySPRoot = null;

            RunOnUIThread.Execute(whichView, () =>
            {
                mySPRoot = new StackPanel();

                // Lights will be created when the first RevealBrush enters the tree
                if (!forceLightAttachDuringLayout)
                {
                    Button myButton = new Button();
                    myButton.Width = 75;
                    myButton.Height = 50;
                    myButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
                    mySPRoot.Children.Add(myButton);
                }
                else
                {
                    string popupWithGridview = TestUtilities.ProcessTestXamlForRepo(
                        @"<Popup xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:controls='using:Microsoft.UI.Xaml.Controls' x:Name='MarkupPopup' IsOpen='False'>
                        <Popup.Resources>
                            <Style TargetType='GridViewItem' x:Key='RevealExampleGridViewItem'>
                                <Setter Property='Background' Value='Transparent' />
                                <Setter Property='HorizontalContentAlignment' Value='Center' />
                                <Setter Property='VerticalContentAlignment' Value='Center' />
                                <Setter Property='Template'>
                                    <Setter.Value>
                                        <ControlTemplate TargetType='GridViewItem'>
                                            <controls:RevealListViewItemPresenter ContentTransitions='{TemplateBinding ContentTransitions}'
                                        SelectionCheckMarkVisualEnabled='{ThemeResource GridViewItemSelectionCheckMarkVisualEnabled}'
                                        CheckBrush='Transparent'
                                        CheckBoxBrush='Transparent'
                                        DragBackground='{ThemeResource GridViewItemDragBackground}'
                                        DragForeground='{ThemeResource GridViewItemDragForeground}'
                                        FocusBorderBrush='{ThemeResource GridViewItemFocusBorderBrush}'
                                        FocusSecondaryBorderBrush='{ThemeResource GridViewItemFocusSecondaryBorderBrush}'
                                        PlaceholderBackground='Transparent'
                                        PointerOverBackground='Transparent'
                                        PointerOverForeground='{ThemeResource GridViewItemForegroundPointerOver}'
                                        SelectedBackground='Transparent'
                                        SelectedForeground='{ThemeResource GridViewItemForegroundSelected}'
                                        SelectedPointerOverBackground='Transparent'
                                        PressedBackground='Transparent'
                                        SelectedPressedBackground='Transparent'
                                        DisabledOpacity='{ThemeResource ListViewItemDisabledThemeOpacity}'
                                        DragOpacity='{ThemeResource ListViewItemDragThemeOpacity}'
                                        ReorderHintOffset='{ThemeResource GridViewItemReorderHintThemeOffset}'
                                        HorizontalContentAlignment='{TemplateBinding HorizontalContentAlignment}'
                                        VerticalContentAlignment='{TemplateBinding VerticalContentAlignment}'
                                        ContentMargin='{TemplateBinding Padding}'
                                        CheckMode='{ThemeResource GridViewItemCheckMode}' />
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>

                            <DataTemplate x:Key='BackgroundBrushDataTemplate'>
                                <Grid Margin='5' Background='{Binding Value}' >
                                    <TextBlock
                                Margin='3'
                                FontSize='12'
                                MinWidth='200'
                                MinHeight='36'
                                MaxWidth='330'
                                TextWrapping='Wrap'
                                Text='{Binding Key}' />
                                </Grid>
                            </DataTemplate>
                            <DataTemplate x:Key='BorderBrushDataTemplate'>
                                <Border Margin='5' BorderBrush='{Binding Value}' BorderThickness='3'>
                                    <TextBlock
                                Margin='3'
                                FontSize='12'
                                MinWidth='200'
                                MinHeight='36'
                                MaxWidth='330'
                                TextWrapping='Wrap'
                                Text='{Binding Key}' />
                                </Border>
                            </DataTemplate>
                        </Popup.Resources>
                        <GridView Name='BackgroundList' ItemsSource='{Binding RevealBackgroundBrushes, Mode=OneWay}' ItemContainerStyle='{StaticResource RevealExampleGridViewItem}' ItemTemplate='{StaticResource BackgroundBrushDataTemplate}' MaxWidth='700' Margin='10' MaxHeight='200'/>
                    </Popup>");

                    myPopup = XamlReader.Load(popupWithGridview) as Popup;
                    myPopup.DataContext = this;
                    mySPRoot.Children.Add(myPopup);
                }

                if (whichView != CoreApplication.MainView)
                {
                    App.CurrentWindow.Content = mySPRoot;
                }
                else
                {
                    Content = mySPRoot;
                }
            });
            IdleSynchronizer.Wait();

            if (resetWindowContent)
            {
                RunOnUIThread.Execute(whichView, () =>
                {
                    StackPanel newSPRoot = new StackPanel();
                    Button myButton = new Button();
                    myButton.Width = 75;
                    myButton.Height = 50;
                    myButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
                    newSPRoot.Children.Add(myButton);

                    if (whichView != CoreApplication.MainView)
                    {
                        App.CurrentWindow.Content = newSPRoot;

                    }
                    else
                    {
                        Content = newSPRoot;
                    }
                });
                IdleSynchronizer.Wait();
            }

            RunOnUIThread.Execute(whichView, () =>
            {
                if (forceLightAttachDuringLayout)
                {
                    myPopup.IsOpen = true;
                }

            // Find and store public Visual Root
            _visualRoot = GetTopParent(App.CurrentWindow.Content);

                popupOpened = new AutoResetEvent(false);
            // Make an unparented popup and open it so we can check that the popup root has lights set on it too.
            Popup popup = new Popup();
                popup.Child = new Grid();
                popup.Opened += (sender, args) =>
                {

                // Find and store Popup Root
                _popupRoot = GetTopParent(popup.Child);
                    Verify.AreNotEqual(_visualRoot, _popupRoot);
                    popup.IsOpen = false;
                    popupOpened.Set();
                };
                popup.IsOpen = true;
            });
            IdleSynchronizer.Wait();

            Verify.IsTrue(popupOpened.WaitOne(TimeSpan.FromMinutes(2)), "Waiting for popup to open ");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(whichView, () =>
            {
                _mediaFullScreened = new AutoResetEvent(false);

                Log.Comment("Creating MediaPlayerElement and going to full screen.");
                _mpe = new MediaPlayerElement();
                _mpe.AreTransportControlsEnabled = true;
                mySPRoot.Children.Add(_mpe);
                _mpe.IsFullWindow = true;
                XamlControlsResources.EnsureRevealLights(_mpe.TransportControls);
                CompositionTarget.Rendering += CompositionTarget_Rendering;
            });

            Verify.IsTrue(_mediaFullScreened.WaitOne(TimeSpan.FromMinutes(2)), "Waiting for media player to go full screen");
            IdleSynchronizer.Wait();

            // Validate each root has the expected lights
            RunOnUIThread.Execute(whichView, () =>
            {
                _pollRetry = 0;
                _validationCompleted = new AutoResetEvent(false);
                _lightValidationTimer = new DispatcherTimer();
                _lightValidationTimer.Interval = _pollInterval;
                _lightValidationTimer.Tick += PollTimer_Tick;
                _lightValidationTimer.Start();
            });

            Verify.IsTrue(_validationCompleted.WaitOne(TimeSpan.FromMinutes(2)), "Waiting for light validation to complete");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(whichView, () =>
            {
                if (whichView == CoreApplication.MainView)
                {
                    Content = null;
                }
                else
                {
                    App.CurrentWindow.Content = null;
                }
            });
            IdleSynchronizer.Wait();

            _cleanupVerified = new AutoResetEvent(false);
            RunOnUIThread.Execute(whichView, () =>
            {
            // RevealBrush cleans itself up in a CompositionTarget.Rendering callback. Put the cleanup validation in CT.R
            // as well to let the cleanup code run.
            CompositionTarget.Rendering += CTR_CheckCleanup;
            });

            Verify.IsTrue(_cleanupVerified.WaitOne(TimeSpan.FromMinutes(1)), "Waiting for cleanup validation");
        }

void VerifyLightsAfterResettingContentOnMainWindow ( ) [inline]

Definition at line 97 of file LightConfigurationTests.cs.

        {
            using (var config = new MainWindowLightConfiguration())
            {
                VerifyLights(config.View, false, true);
            }
        }

void VerifyLightsAfterResettingContentOnSecondaryWindow ( ) [inline]

Definition at line 107 of file LightConfigurationTests.cs.

        {
            using (var config = new SecondaryWindowLightConfiguration())
            {
                VerifyLights(config.View, false, true);
            }
        }

void VerifyLightsAttachedDuringLayoutOnSecondaryWindow ( ) [inline]

Definition at line 117 of file LightConfigurationTests.cs.

        {
            using (var config = new SecondaryWindowLightConfiguration())
            {
                VerifyLights(config.View, true, false);
            }
        }

void VerifyLightsOnMainWindow ( ) [inline]

Definition at line 77 of file LightConfigurationTests.cs.

        {
            using (var config = new MainWindowLightConfiguration())
            {
                VerifyLights(config.View, false, false);
            }
        }

void VerifyLightsOnSecondaryWindow ( ) [inline]

Definition at line 87 of file LightConfigurationTests.cs.

        {
            using (var config = new SecondaryWindowLightConfiguration())
            {
                VerifyLights(config.View, false, false);
            }
        }

Member Data Documentation

AutoResetEvent _cleanupVerified [private]

Definition at line 63 of file LightConfigurationTests.cs.

UIElement _fullWindowMediaRoot [private]

Definition at line 71 of file LightConfigurationTests.cs.

DispatcherTimer _lightValidationTimer [private]

Definition at line 65 of file LightConfigurationTests.cs.

AutoResetEvent _mediaFullScreened [private]

Definition at line 62 of file LightConfigurationTests.cs.

MediaPlayerElement _mpe [private]

Definition at line 61 of file LightConfigurationTests.cs.

TimeSpan _pollInterval = new TimeSpan(16667) [private]

Definition at line 66 of file LightConfigurationTests.cs.

int _pollMaxRetries = 60 [private]

Definition at line 67 of file LightConfigurationTests.cs.

int _pollRetry = 0 [private]

Definition at line 68 of file LightConfigurationTests.cs.

UIElement _popupRoot [private]

Definition at line 70 of file LightConfigurationTests.cs.

AutoResetEvent _validationCompleted [private]

Definition at line 72 of file LightConfigurationTests.cs.

UIElement _visualRoot [private]

Definition at line 69 of file LightConfigurationTests.cs.

Property Documentation

IEnumerable<string> BackgroundBrushNames [static, get]

Definition at line 426 of file LightConfigurationTests.cs.

IEnumerable<KeyValuePair<string, Brush> > RevealBackgroundBrushes [get]

Definition at line 456 of file LightConfigurationTests.cs.

The documentation for this class was generated from the following file:
  • Lights/ApiTests/Lights_ApiTests/LightConfigurationTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MainWindowLightConfiguration Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • MainWindowLightConfiguration
Public Member Functions | Public Attributes

MainWindowLightConfiguration Class Reference

List of all members.

Public Member Functions

MainWindowLightConfiguration ()
void | Dispose ()

Public Attributes

CoreApplicationView | View = null

Detailed Description

Definition at line 24 of file LightConfigurationTests.cs.

Constructor & Destructor Documentation

MainWindowLightConfiguration ( ) [inline]

Definition at line 27 of file LightConfigurationTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                View = CoreApplication.MainView;
            });
            IdleSynchronizer.Wait();
        }

Member Function Documentation

void Dispose ( ) [inline]

Definition at line 36 of file LightConfigurationTests.cs.

        {
        }

Member Data Documentation

CoreApplicationView View = null

Definition at line 26 of file LightConfigurationTests.cs.

The documentation for this class was generated from the following file:
  • Lights/ApiTests/Lights_ApiTests/LightConfigurationTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • MapControlTests

MapControlTests Class Reference

Detailed Description

Definition at line 18 of file MapControlTests.cs.

The documentation for this class was generated from the following file:
  • MapControl/APITests/MapControlTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyCustomNonVirtualizingStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • MyCustomNonVirtualizingStackLayout
Protected Member Functions

MyCustomNonVirtualizingStackLayout Class Reference

Inherits NonVirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (NonVirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (NonVirtualizingLayoutContext context, Size availableSize)

Detailed Description

Definition at line 195 of file LayoutPanelTests.cs.

Member Function Documentation

override Size ArrangeOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 211 of file LayoutPanelTests.cs.

        {
            double offset = 0.0;
            foreach (var element in context.Children)
            {
                element.Arrange(new Rect(0, offset, element.DesiredSize.Width, element.DesiredSize.Height));
                offset += element.DesiredSize.Height;
            }

            return finalSize;
        }

override Size MeasureOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 197 of file LayoutPanelTests.cs.

        {
            double extentHeight = 0.0;
            double extentWidth = 0.0;
            foreach (var element in context.Children)
            {
                element.Measure(availableSize);
                extentHeight += element.DesiredSize.Height;
                extentWidth = Math.Max(extentWidth, element.DesiredSize.Width);
            }

            return new Size(extentWidth, extentHeight);
        }

The documentation for this class was generated from the following file:
  • LayoutPanel/APITests/LayoutPanelTests.cs
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • NavigationViewTests
Public Member Functions | Private Member Functions | Static Private Member Functions

NavigationViewTests Class Reference

List of all members.

Public Member Functions

void | VerifyAutomationPeerExpandCollapsePatternBehavior ()
void | VerifyClearingItemsCollectionDoesNotCrashWhenItemSelectedOnTopNav ()
void | VerifyClosedCompactVisualState ()
void | VerifyContainerIsNonNullWhenSelectingANewlyAddedItem ()
void | VerifyDefaultsAndBasicSetting ()
void | VerifyExpandCollapseChevronVisibility ()
void | VerifyHeaderContentMarginOnMinimalNav ()
void | VerifyHeaderContentMarginOnTopNav ()
void | VerifyHierarchicalNavigationTopModeMenuItemsSourceDoesNotCrash ()
void | VerifyMenuItemAndContainerMappingMenuItems ()
void | VerifyMenuItemAndContainerMappingMenuItemsSource ()
void | VerifyNavigationItemUIAType ()
void | VerifyNavigationViewItemInFooterDoesNotCrash ()
void | VerifyNavigationViewItemToolTipCreation ()
void | VerifyNavigationViewItemToolTipPaneDisplayMode ()
void | VerifyNVIOutlivingNVDoesNotCrash ()
void | VerifyOverflowButtonToolTip ()
void | VerifyPaneDisplayModeAndDisplayModeMapping ()
void | VerifyPaneDisplayModeAndIsPaneOpenInterplayOnNavViewLaunch ()
void | VerifyPaneDisplayModeChangingPaneAccordingly ()
void | VerifyPaneProperties ()
void | VerifySelectedItemIsNullWhenNoItemIsSelected ()
void | VerifySelectingACollapsedItemShowsSelectionIndicator ()
void | VerifySelectingANewItemAfterExpandingShowsSelectionIndicatorInTheCorrectLocation ()
void | VerifySettingsItemTag ()
void | VerifySettingsItemToolTip ()
void | VerifySingleSelection ()
void | VerifyValuesCoercion ()
void | VerifyVisualTree ()

Private Member Functions

NavigationView | SetupNavigationView (NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto)
NavigationView | SetupNavigationViewHierarchy (NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto)
NavigationView | SetupNavigationViewPaneContent (NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto)
NavigationView | SetupNavigationViewScrolling (NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto)
void | VerifyHeaderContentMargin (NavigationViewPaneDisplayMode paneDisplayMode, string verificationFileNamePrefix)

Static Private Member Functions

static ItemsRepeater | GetRepeater (DependencyObject parent)
static bool | ItemHasSelectionIndicator (NavigationView navView, string expectedContent)
static void | SelectItem (NavigationView navView, object item, ManualResetEvent selectionChangedEvent=null)

Detailed Description

Definition at line 49 of file NavigationViewTests.cs.

Member Function Documentation

static ItemsRepeater GetRepeater ( DependencyObject parent ) [inline, static, private]

Definition at line 1643 of file NavigationViewTests.cs.

        {
            static ItemsRepeater GetNavigationViewRepeaterHelper(DependencyObject root)
            {
                if (root is ItemsRepeater itemsRepeater &&
                    (itemsRepeater.Name == "MenuItemsHost" ||
                    itemsRepeater.Name == "NavigationViewItemMenuItemsHost"))
                {
                    return itemsRepeater;
                }

                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(root); i++)
                {
                    var repeater = GetNavigationViewRepeaterHelper(VisualTreeHelper.GetChild(root, i));

                    if (repeater != null)
                    {
                        return repeater;
                    }
                }

                return null;
            }

            return GetNavigationViewRepeaterHelper(parent);
        }

static bool ItemHasSelectionIndicator | ( | NavigationView | navView,
 |  | string | expectedContent |
 | ) |  |  | [inline, static, private]

Definition at line 1670 of file NavigationViewTests.cs.

        {
            static bool ItemHasSelectionIndicatorHelper(DependencyObject root, string expectedContent, NavigationViewItemBase lastSeenItem)
            {
                if (root is Rectangle possibleSelectionIndicator &&
                    possibleSelectionIndicator.Name == "SelectionIndicator" &&
                    possibleSelectionIndicator.Opacity > 0 &&
                    lastSeenItem.Content == expectedContent)
                {
                    return true;
                }
                else if (root is NavigationViewItemBase item)
                {
                    lastSeenItem = item;
                }

                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(root); i++)
                {
                    var hasSelectionIndicator = ItemHasSelectionIndicatorHelper(VisualTreeHelper.GetChild(root, i), expectedContent, lastSeenItem);

                    if (hasSelectionIndicator)
                    {
                        return true;
                    }
                }

                return false;
            }

            bool hasSelectionIndicator = false;

            RunOnUIThread.Execute(() =>
            {
                hasSelectionIndicator = ItemHasSelectionIndicatorHelper(navView, expectedContent, null);
            });

            return hasSelectionIndicator;
        }

static void SelectItem | ( | NavigationView | navView,
 |  | object | item,
 |  | ManualResetEvent | selectionChangedEvent = null |
 | ) |  |  | [inline, static, private]

Definition at line 1709 of file NavigationViewTests.cs.

        {
            IdleSynchronizer.Wait();

            if (selectionChangedEvent != null)
            {
                selectionChangedEvent.Reset();
            }

            RunOnUIThread.Execute(() =>
            {
                navView.SelectedItem = item;
            });

            if (selectionChangedEvent != null)
            {
                selectionChangedEvent.WaitOne();
            }

            IdleSynchronizer.Wait();
        }

NavigationView SetupNavigationView ( NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto ) [inline, private]

Definition at line 51 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;
            RunOnUIThread.Execute(() =>
            {
                navView = new NavigationView();
                var undoNVI = new NavigationViewItem() { Content = "Undo", Icon = new SymbolIcon(Symbol.Undo) };
                undoNVI.Resources.Add("NavigationViewItemIconBackground", new SolidColorBrush(Colors.Red));
                navView.MenuItems.Add(undoNVI);
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Cut", Icon = new SymbolIcon(Symbol.Cut) });

                navView.PaneTitle = "Title";
                navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
                navView.IsSettingsVisible = true;
                navView.PaneDisplayMode = paneDisplayMode;
                navView.OpenPaneLength = 120.0;
                navView.ExpandedModeThresholdWidth = 600.0;
                navView.CompactModeThresholdWidth = 400.0;
                navView.Width = 800.0;
                navView.Height = 600.0;
                navView.Content = "This is a simple test";
                Content = navView;

                if (CoreWindow.GetForCurrentThread() != null)
                {
                    try
                    {
                        ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
                    }
                    catch (COMException)
                    {
                        // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
                    }
                }
            });

            IdleSynchronizer.Wait();
            return navView;
        }

NavigationView SetupNavigationViewHierarchy ( NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto ) [inline, private]

Definition at line 203 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;
            RunOnUIThread.Execute(() =>
            {
                navView = new NavigationView();

                NavigationViewItem navViewItem1 = new NavigationViewItem() { Content = "NVI1" };
                navViewItem1.MenuItems.Add(new NavigationViewItem() { Content = "NVI1" });

                NavigationViewItem navViewItem2 = new NavigationViewItem() { Content = "NVI2" };

                navView.MenuItems.Add(navViewItem1);
                navView.MenuItems.Add(navViewItem2);

                navView.PaneTitle = "Hierarchical NavView";
                navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
                navView.IsSettingsVisible = true;
                navView.PaneDisplayMode = paneDisplayMode;
                navView.OpenPaneLength = 120.0;
                navView.ExpandedModeThresholdWidth = 600.0;
                navView.CompactModeThresholdWidth = 400.0;
                navView.Width = 800.0;
                navView.Height = 600.0;
                navView.Content = "This is a simple Hierarchical Navigation View test";
                Content = navView;

                try
                {
                    ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
                }
                catch (COMException)
                {
                    // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
                }
            });

            IdleSynchronizer.Wait();
            return navView;
        }

NavigationView SetupNavigationViewPaneContent ( NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto ) [inline, private]

Definition at line 141 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;
            RunOnUIThread.Execute(() =>
            {
                navView = new NavigationView();
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Undo", Icon = new SymbolIcon(Symbol.Undo) });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Cut", Icon = new SymbolIcon(Symbol.Cut) });

                // Navigation View Pane Elements
                Button headerButton = new Button();
                headerButton.Content = "Header Button";

                Button footerButton = new Button();
                footerButton.Content = "Footer Button";

                // NavigationView Content Elements
                Button contentButtonOne = new Button();
                contentButtonOne.Content = "Content Button One";

                Button contentButtonTwo = new Button();
                contentButtonTwo.Content = "Content Button Two";
                contentButtonTwo.Margin = new Thickness(50, 0, 0, 0);

                StackPanel contentStackPanel = new StackPanel();
                contentStackPanel.Children.Add(contentButtonOne);
                contentStackPanel.Children.Add(contentButtonTwo);

                // Set NavigationView Properties

                navView.PaneHeader = headerButton;
                navView.PaneFooter = footerButton;
                navView.Header = "NavigationView Header";
                navView.AutoSuggestBox = new AutoSuggestBox();
                navView.Content = contentStackPanel;
                navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
                navView.IsSettingsVisible = true;
                navView.PaneDisplayMode = paneDisplayMode;
                navView.OpenPaneLength = 300.0;
                navView.ExpandedModeThresholdWidth = 600.0;
                navView.CompactModeThresholdWidth = 400.0;
                navView.Width = 800.0;
                navView.Height = 600.0;
                Content = navView;

                if (CoreWindow.GetForCurrentThread() != null)
                {
                    try
                    {
                        ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
                    }
                    catch (COMException)
                    {
                        // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
                    }
                }
            });

            IdleSynchronizer.Wait();
            return navView;
        }

NavigationView SetupNavigationViewScrolling ( NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto ) [inline, private]

Definition at line 91 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;
            RunOnUIThread.Execute(() =>
            {
                navView = new NavigationView();
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #1", Icon = new SymbolIcon(Symbol.Undo) });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #2", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItemHeader() { Content = "Item #3" });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #4", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #5", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItemSeparator());
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #7", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #8", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #9", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #10", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItemHeader() { Content = "Item #11" });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #12", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #13", Icon = new SymbolIcon(Symbol.Cut) });
                navView.MenuItems.Add(new NavigationViewItemSeparator());
                navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #15", Icon = new SymbolIcon(Symbol.Cut) });

                navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
                navView.IsSettingsVisible = true;
                navView.PaneDisplayMode = paneDisplayMode;
                navView.OpenPaneLength = 120.0;
                navView.ExpandedModeThresholdWidth = 600.0;
                navView.CompactModeThresholdWidth = 400.0;
                navView.Width = 800.0;
                navView.Height = 200.0;
                navView.Content = "This test should have enough NavigationViewItems to scroll.";
                Content = navView;

                if (CoreWindow.GetForCurrentThread() != null)
                {
                    try
                    {
                        ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
                    }
                    catch (COMException)
                    {
                        // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
                    }
                }
            });

            IdleSynchronizer.Wait();
            return navView;
        }

void VerifyAutomationPeerExpandCollapsePatternBehavior ( ) [inline]

Definition at line 865 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {

                var menuItem1 = new NavigationViewItem();
                var menuItem2 = new NavigationViewItem();
                var menuItem3 = new NavigationViewItem();
                var menuItem4 = new NavigationViewItem();
                menuItem1.Content = "Item 1";
                menuItem2.Content = "Item 2";
                menuItem3.Content = "Item 3";
                menuItem4.Content = "Item 4";

                menuItem2.MenuItems.Add(menuItem3);
                menuItem4.HasUnrealizedChildren = true;

                var expandPeer = NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetPattern(PatternInterface.ExpandCollapse);

                Verify.IsNull(expandPeer, "Verify NavigationViewItem with no children has no ExpandCollapse pattern");

                expandPeer = NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem2).GetPattern(PatternInterface.ExpandCollapse);
                Verify.IsNotNull(expandPeer, "Verify NavigationViewItem with children has an ExpandCollapse pattern provided");

                expandPeer = NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem4).GetPattern(PatternInterface.ExpandCollapse);
                Verify.IsNotNull(expandPeer, "Verify NavigationViewItem without children but with UnrealizedChildren set to true has an ExpandCollapse pattern provided");
            });
        }

void VerifyClearingItemsCollectionDoesNotCrashWhenItemSelectedOnTopNav ( ) [inline]

Definition at line 1170 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;

                var navViewItem1 = new NavigationViewItem() { Content = "MenuItem 1", };
                var navViewItem2 = new NavigationViewItem() { Content = "MenuItem 2" };

                Log.Comment("Set up the MenuItems collection");
                navView.MenuItems.Add(navViewItem1);
                navView.MenuItems.Add(navViewItem2);

                Content = navView;
                Content.UpdateLayout();

                Log.Comment("Set MenuItem 1 as selected");
                navView.SelectedItem = navViewItem1;
                Verify.AreEqual(navViewItem1, navView.SelectedItem, "MenuItem 1 should have been selected");

                // Clearing the MenuItems collection should not crash the app
                Log.Comment("Clear the MenuItems collection");
                navView.MenuItems.Clear();

                Log.Comment("Set up the MenuItemsSource collection");
                var itemsSource = new ObservableCollection<NavigationViewItem>() { navViewItem1, navViewItem2 };
                navView.MenuItemsSource = itemsSource;

                Content.UpdateLayout();

                Log.Comment("Set MenuItem 1 as selected");
                navView.SelectedItem = navViewItem1;
                Verify.AreEqual(navViewItem1, navView.SelectedItem, "MenuItem 1 should have been selected");

                // Clearing the MenuItemsSource collection should not crash the app
                Log.Comment("Clear the MenuItemsSource collection");
                itemsSource.Clear();
            });
        }

void VerifyClosedCompactVisualState ( ) [inline]

Definition at line 770 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;
            RunOnUIThread.Execute(() =>
            {
                navView = new NavigationView();
                Content = navView;

                var template = (DataTemplate)XamlReader.Load(@"
                    <DataTemplate
                        xmlns ='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                        xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                        <controls:NavigationViewItem
                            Content='Item'>
                            <controls:NavigationViewItem.Icon>
                                <SymbolIcon Symbol='Home' />
                            </controls:NavigationViewItem.Icon>
                         </controls:NavigationViewItem>
                      </DataTemplate>");
                navView.MenuItemTemplate = template;
                navView.IsPaneOpen = false;
                navView.IsSettingsVisible = false;

                RoutedEventHandler loaded = null;
                loaded = (object sender, RoutedEventArgs args) =>
                {
                    navView.Loaded -= loaded;

                    var items = new List<object>() { new object() }; ;
                    navView.MenuItemsSource = items;
                };
                navView.Loaded += loaded;

                Content.UpdateLayout();
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var footerRepeater = VisualTreeUtils.FindVisualChildByName(navView, "MenuItemsHost") as FrameworkElement;
                var menuItem = VisualTreeHelper.GetChild(footerRepeater, 0) as FrameworkElement;
                var menuItemLayoutRoot = VisualTreeHelper.GetChild(menuItem, 0) as FrameworkElement;
                var navItemPresenter = VisualTreeHelper.GetChild(menuItemLayoutRoot, 0) as FrameworkElement;
                var navItemPresenterLayoutRoot = VisualTreeHelper.GetChild(navItemPresenter, 0) as FrameworkElement;
                var statesGroups = VisualStateManager.GetVisualStateGroups(navItemPresenterLayoutRoot);

                string navItemPresenter1CurrentState = null;
                foreach (var visualStateGroup in statesGroups)
                {
                    if (visualStateGroup.Name == "PaneAndTopLevelItemStates")
                    {
                        navItemPresenter1CurrentState = visualStateGroup.CurrentState.Name;
                    }
                }

                Verify.AreEqual("ClosedCompactAndTopLevelItem", navItemPresenter1CurrentState);
            });
        }

void VerifyContainerIsNonNullWhenSelectingANewlyAddedItem ( ) [inline]

Definition at line 1461 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;

            ObservableCollection<Category> subCategories = null;
            Category firstItem = null;
            Category secondItem = null;
            Category subItem = null;

            ManualResetEvent loadedEvent = new(false);
            ManualResetEvent selectionChangedEvent = new(false);

            Action<NavigationViewSelectionChangedEventArgs> selectionChangedVerification = null;

            RunOnUIThread.Execute(() =>
            {
                subItem = new("Menu Item 3", "MI3", "Icon", null, true);

                subCategories = new ObservableCollection<Category> {
                    subItem
                };

                firstItem = new("Menu Item 1", "MI1", "Icon", null, true);
                secondItem = new("Menu Item 2", "MI2", "Icon", subCategories, false);

                var categories = new ObservableCollection<Category> {
                    firstItem,
                    secondItem
                };

                navView = new NavigationView {
                    MenuItemsSource = categories,
                    MenuItemTemplate = (DataTemplate)XamlReader.Load(@"
<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
  <NavigationViewItem Content='{Binding Content}' Name='{Binding Name}' MenuItemsSource='{Binding Children}' SelectsOnInvoked='{Binding SelectsOnInvoked}'/>
</DataTemplate>")
                };

                navView.Loaded += (sender, args) => loadedEvent.Set();

                navView.SelectionChanged += (sender, args) =>
                {
                    selectionChangedVerification?.Invoke(args);
                    selectionChangedEvent.Set();
                };

                Content = navView;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            selectionChangedVerification = (args) =>
            {
                Verify.IsNotNull(args.SelectedItemContainer);
                Verify.AreEqual(subItem.Content, args.SelectedItemContainer.Content);
            };

            SelectItem(navView, subItem, selectionChangedEvent);

            Category newItem = null;

            RunOnUIThread.Execute(() =>
            {
                newItem = new("Menu Item 4", "MI4", "Icon", null, true);
                subCategories.Add(newItem);
            });

            selectionChangedVerification = (args) =>
            {
                Verify.IsNotNull(args.SelectedItemContainer);
                Verify.AreEqual(newItem.Content, args.SelectedItemContainer.Content);
            };

            SelectItem(navView, newItem, selectionChangedEvent);

            ManualResetEvent expandedEvent = new(false);

            RunOnUIThread.Execute(() =>
            {
                var secondItemNvi = (NavigationViewItem)navView.ContainerFromMenuItem(secondItem);

                var itemRepeater = GetRepeater(secondItemNvi);
                itemRepeater.ElementPrepared += (sender, args) =>
                {
                    if (((NavigationViewItem)args.Element).Content == "Menu Item 4")
                    {
                        expandedEvent.Set();
                    }
                };

                secondItemNvi.IsExpanded = true;
            });

            expandedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Category newItem2 = new("Menu Item 5", "MI5", "Icon", null, true);
                subCategories.Add(newItem2);

                selectionChangedVerification = (args) =>
                {
                    Verify.IsNotNull(args.SelectedItemContainer);
                    Verify.AreEqual(newItem2.Content, args.SelectedItemContainer.Content);
                };

                selectionChangedEvent.Reset();
                navView.SelectedItem = newItem2;
            });

            selectionChangedEvent.WaitOne();
            IdleSynchronizer.Wait();
        }

void VerifyDefaultsAndBasicSetting ( ) [inline]

Definition at line 532 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;
            Rectangle footer = null;
            TextBlock header = null;
            Setter styleSetter = null;
            Style hamburgerStyle = null;

            RunOnUIThread.Execute(() =>
            {
                footer = new Rectangle();
                footer.Height = 40;

                header = new TextBlock();
                header.Text = "Header";

                styleSetter = new Setter();
                styleSetter.Property = FrameworkElement.MinHeightProperty;
                styleSetter.Value = "80";
                hamburgerStyle = new Style();

                navView = new NavigationView();

                // Verify Defaults
                Verify.IsTrue(navView.IsPaneOpen);
                Verify.AreEqual(641, navView.CompactModeThresholdWidth);
                Verify.AreEqual(1008, navView.ExpandedModeThresholdWidth);
                Verify.IsNull(navView.PaneFooter);
                Verify.IsNull(navView.Header);
                Verify.IsTrue(navView.IsSettingsVisible);
                Verify.IsTrue(navView.IsPaneToggleButtonVisible);
                Verify.IsTrue(navView.IsTitleBarAutoPaddingEnabled);
                Verify.IsTrue(navView.AlwaysShowHeader);
                Verify.AreEqual(48, navView.CompactPaneLength);
                Verify.AreEqual(320, navView.OpenPaneLength);
                Verify.IsNull(navView.PaneToggleButtonStyle);
                Verify.AreEqual(0, navView.MenuItems.Count);
                Verify.AreEqual(NavigationViewDisplayMode.Minimal, navView.DisplayMode);
                Verify.AreEqual("", navView.PaneTitle);
                Verify.IsFalse(navView.IsBackEnabled);
                Verify.AreEqual(NavigationViewBackButtonVisible.Auto, navView.IsBackButtonVisible);

                // Verify basic setters
                navView.IsPaneOpen = true;
                navView.CompactModeThresholdWidth = 500;
                navView.ExpandedModeThresholdWidth = 1000;
                navView.PaneFooter = footer;
                navView.Header = header;
                navView.IsSettingsVisible = false;
                navView.IsPaneToggleButtonVisible = false;
                navView.IsTitleBarAutoPaddingEnabled = false;
                navView.AlwaysShowHeader = false;
                navView.CompactPaneLength = 40;
                navView.OpenPaneLength = 300;
                navView.PaneToggleButtonStyle = hamburgerStyle;
                navView.PaneTitle = "ChangedTitle";
                navView.IsBackEnabled = true;
                navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
                // TODO(test adding a MenuItem programmatically)
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsTrue(navView.IsPaneOpen);
                Verify.AreEqual(500, navView.CompactModeThresholdWidth);
                Verify.AreEqual(1000, navView.ExpandedModeThresholdWidth);
                Verify.AreEqual(footer, navView.PaneFooter);
                Verify.AreEqual(header, navView.Header);
                Verify.IsFalse(navView.IsSettingsVisible);
                Verify.IsFalse(navView.IsPaneToggleButtonVisible);
                Verify.IsFalse(navView.IsTitleBarAutoPaddingEnabled);
                Verify.IsFalse(navView.AlwaysShowHeader);
                Verify.AreEqual(40, navView.CompactPaneLength);
                Verify.AreEqual(300, navView.OpenPaneLength);
                Verify.AreEqual(hamburgerStyle, navView.PaneToggleButtonStyle);
                Verify.AreEqual("ChangedTitle", navView.PaneTitle);
                Verify.IsTrue(navView.IsBackEnabled);
                Verify.AreEqual(NavigationViewBackButtonVisible.Visible, navView.IsBackButtonVisible);

                // Verify nullable values
                navView.PaneFooter = null;
                navView.Header = null;
                navView.PaneToggleButtonStyle = null;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsNull(navView.PaneFooter);
                Verify.IsNull(navView.Header);
                Verify.IsNull(navView.PaneToggleButtonStyle);
            });
        }

void VerifyExpandCollapseChevronVisibility ( ) [inline]

Definition at line 1090 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;
            NavigationViewItem parentItem = null;
            ObservableCollection<string> children = null;

            RunOnUIThread.Execute(() =>
            {
                navView = new NavigationView();
                Content = navView;

                children = new ObservableCollection<string>();
                parentItem = new NavigationViewItem() { Content = "ParentItem", MenuItemsSource = children };

                navView.MenuItems.Add(parentItem);

                navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
                Content.UpdateLayout();

                UIElement chevronUIElement = (UIElement)VisualTreeUtils.FindVisualChildByName(parentItem, "ExpandCollapseChevron");
                Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem has no children");

                // Add a child to parentItem through the MenuItemsSource API. This should make the chevron visible.
                children.Add("Child 1");
                Content.UpdateLayout();

                Verify.IsTrue(chevronUIElement.Visibility == Visibility.Visible, "chevron should have been visible as NavViewItem now has children");

                // Remove all children of parentItem. This should collapse the chevron
                children.Clear();
                Content.UpdateLayout();

                Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem no longer has children");

                // Add a child to parentItem and set the MenuItemsSource as null. This should collapse the chevron
                children.Add("Child 2");
                Content.UpdateLayout();

                // we are doing this so that when we set MenuItemsSource as null, we can check if the chevron's visibility really changes
                Verify.IsTrue(chevronUIElement.Visibility == Visibility.Visible, "chevron should have been visible as NavViewItem now has children");

                parentItem.MenuItemsSource = null;
                Content.UpdateLayout();

                Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem no longer has children");

                // Add a child to parentItem through the MenuItems API. This should make the chevron visible.
                parentItem.MenuItems.Add(new NavigationViewItem() { Content = "Child 3" });
                Content.UpdateLayout();

                Verify.IsTrue(chevronUIElement.Visibility == Visibility.Visible, "chevron should have been visible as NavViewItem now has children");

                // Remove all children of parentItem. This should collapse the chevron
                parentItem.MenuItems.Clear();
                Content.UpdateLayout();

                Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem no longer has children");
            });
        }

void VerifyHeaderContentMargin | ( | NavigationViewPaneDisplayMode | paneDisplayMode,
 |  | string | verificationFileNamePrefix |
 | ) |  |  | [inline, private]

Definition at line 948 of file NavigationViewTests.cs.

        {
            UIElement headerContent = null;

            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView() { Header = "HEADER", PaneDisplayMode = paneDisplayMode, Width = 400.0 };
                Content = navView;
                Content.UpdateLayout();
                Grid rootGrid = VisualTreeHelper.GetChild(navView, 0) as Grid;
                if (rootGrid != null)
                {
                    headerContent = rootGrid.FindName("HeaderContent") as UIElement;
                }
            });

            VisualTreeTestHelper.VerifyVisualTree(
                root: headerContent,
                verificationFileNamePrefix: verificationFileNamePrefix);
        }

void VerifyHeaderContentMarginOnMinimalNav ( ) [inline]

Definition at line 943 of file NavigationViewTests.cs.

        {
            VerifyHeaderContentMargin(NavigationViewPaneDisplayMode.LeftMinimal, "VerifyVerifyHeaderContentMarginOnMinimalNav");
        }

void VerifyHeaderContentMarginOnTopNav ( ) [inline]

Definition at line 937 of file NavigationViewTests.cs.

        {
            VerifyHeaderContentMargin(NavigationViewPaneDisplayMode.Top, "VerifyVerifyHeaderContentMarginOnTopNav");
        }

void VerifyHierarchicalNavigationTopModeMenuItemsSourceDoesNotCrash ( ) [inline]

Definition at line 1212 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                Content = navView;

                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;

                var childItem = new NavigationViewItem() { Content = "Item 1.1" };
                var parentItem = new NavigationViewItem() { Content = "Item 1", MenuItemsSource = new ObservableCollection<NavigationViewItem>() { childItem } };
                navView.MenuItemsSource = new ObservableCollection<NavigationViewItem>() { parentItem };

                Content.UpdateLayout();
            });
        }

void VerifyMenuItemAndContainerMappingMenuItems ( ) [inline]

Definition at line 998 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                MUXControlsTestApp.App.TestContentRoot = navView;

                var menuItem1 = new NavigationViewItem();
                var menuItem2 = new NavigationViewItem();
                menuItem1.Content = "Item 1";
                menuItem2.Content = "Item 2";

                navView.MenuItems.Add(menuItem1);
                navView.MenuItems.Add(menuItem2);
                navView.Width = 1008; // forces the control into Expanded mode so that the menu renders

                MUXControlsTestApp.App.TestContentRoot.UpdateLayout();

                // Get container for item
                var itemContainer = navView.ContainerFromMenuItem(menuItem2) as NavigationViewItem;
                bool correctContainerReturned = itemContainer != null && itemContainer == menuItem2;
                Verify.IsTrue(correctContainerReturned, "Correct container should be returned for passed in menu item.");

                // Get item for container
                var returnedItem = navView.MenuItemFromContainer(menuItem2) as NavigationViewItem;
                bool correctItemReturned = returnedItem != null && returnedItem == menuItem2;
                Verify.IsTrue(correctItemReturned, "Correct item should be returned for passed in container.");

                // Try to get an item that is not in the NavigationView
                NavigationViewItem menuItem3 = new NavigationViewItem();
                menuItem3.Content = "Item 3";
                var returnedItemForNonExistentContainer = navView.MenuItemFromContainer(menuItem3);
                Verify.IsTrue(returnedItemForNonExistentContainer == null, "Returned item should be null.");

                MUXControlsTestApp.App.TestContentRoot = null;
            });
        }

void VerifyMenuItemAndContainerMappingMenuItemsSource ( ) [inline]

Definition at line 970 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                MUXControlsTestApp.App.TestContentRoot = navView;

                navView.MenuItemsSource = new ObservableCollection<string> { "Item 1", "Item 2" };
                navView.Width = 1008; // forces the control into Expanded mode so that the menu renders

                MUXControlsTestApp.App.TestContentRoot.UpdateLayout();

                var menuItem = "Item 2";
                // Get container for item
                var itemContainer = navView.ContainerFromMenuItem(menuItem) as NavigationViewItem;
                bool correctContainerReturned = itemContainer != null && (itemContainer.Content as string) == menuItem;
                Verify.IsTrue(correctContainerReturned, "Correct container should be returned for passed in menu item.");

                // Get item for container
                var returnedItem = navView.MenuItemFromContainer(itemContainer) as string;
                bool correctItemReturned = returnedItem != null && returnedItem == menuItem;
                Verify.IsTrue(correctItemReturned, "Correct item should be returned for passed in container.");

                MUXControlsTestApp.App.TestContentRoot = null;
            });
        }

void VerifyNavigationItemUIAType ( ) [inline]

Definition at line 832 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                Content = navView;

                var menuItem1 = new NavigationViewItem();
                var menuItem2 = new NavigationViewItem();
                menuItem1.Content = "Item 1";
                menuItem2.Content = "Item 2";

                navView.MenuItems.Add(menuItem1);
                navView.MenuItems.Add(menuItem2);
                navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
                Content.UpdateLayout();

                Verify.AreEqual(
                    AutomationControlType.ListItem,
                    NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetAutomationControlType());
                Verify.IsNull(NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetPattern(PatternInterface.Invoke));

                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;
                Content.UpdateLayout();
                Verify.AreEqual(
                    AutomationControlType.TabItem,
                    NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetAutomationControlType());
                // Tabs should only provide SelectionItem pattern but not Invoke pattern
                Verify.IsNull(NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetPattern(PatternInterface.Invoke));
            });
        }

void VerifyNavigationViewItemInFooterDoesNotCrash ( ) [inline]

Definition at line 1069 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();

                Content = navView;

                var navViewItem = new NavigationViewItem() { Content = "Footer item" };

                navView.PaneFooter = navViewItem;

                navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
                Content.UpdateLayout();

                // If we don't get here, app has crashed. This verify is just making sure code got run
                Verify.IsTrue(true);
            });
        }

void VerifyNavigationViewItemToolTipCreation ( ) [inline]

Definition at line 1230 of file NavigationViewTests.cs.

        {
            if (!PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone5))
            {
                Log.Warning("On RS4 and earlier the test needs to be modified slightly.");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();

                // Item with null content
                var menuItem1 = new NavigationViewItem();

                // Item with empty string as content
                var menuItem2 = new NavigationViewItem();
                menuItem2.Content = "";

                // Item with null content and custom tooltip
                var menuItem3 = new NavigationViewItem();
                ToolTipService.SetToolTip(menuItem3, "Custom tooltip");

                // Item with non-empty string content
                var menuItem4 = new NavigationViewItem();
                menuItem4.Content = "Item 4";

                navView.MenuItems.Add(menuItem1);
                navView.MenuItems.Add(menuItem2);
                navView.MenuItems.Add(menuItem3);
                navView.MenuItems.Add(menuItem4);

                // Use a pane configuration where tooltips are shown.
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
                navView.IsPaneOpen = false;

                Content = navView;
                navView.UpdateLayout();

                Verify.AreEqual(null, ToolTipService.GetToolTip(menuItem1), "Item 1's tooltip should have been [null].");
                Verify.AreEqual(null, ToolTipService.GetToolTip(menuItem2), "Item 2's tooltip should have been [null].");
                Verify.AreEqual("Custom tooltip", ToolTipService.GetToolTip(menuItem3), "Item 3's tooltip should have been \"Custom tooltip\".");
                Verify.AreEqual("Item 4", ToolTipService.GetToolTip(menuItem4), "Item 4's tooltip should have been  \"Item 4\".");
            });
        }

void VerifyNavigationViewItemToolTipPaneDisplayMode ( ) [inline]

Definition at line 1277 of file NavigationViewTests.cs.

        {
            if (!PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone5))
            {
                Log.Warning("On RS4 and earlier the test needs to be modified slightly.");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();

                // Item with non-empty string content using in-built tooltip
                var menuItem1 = new NavigationViewItem();
                menuItem1.Content = "Item 1";

                // Item with custom tooltip
                var menuItem2 = new NavigationViewItem();
                menuItem2.Content = "Item 2";
                ToolTipService.SetToolTip(menuItem2, "Custom tooltip");

                navView.MenuItems.Add(menuItem1);
                navView.MenuItems.Add(menuItem2);

                Content = navView;

                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");
                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, true, null, "Custom tooltip");

                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.LeftCompact, false, "Item 1", "Custom tooltip");
                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.LeftCompact, true, null, "Custom tooltip");

                // Show tooltips again
                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");

                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.LeftMinimal, true, null, "Custom tooltip");

                // Show tooltips again
                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");

                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Top, false, null, "Custom tooltip");

                // Show tooltips again
                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");

                SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Top, true, null, "Custom tooltip");

                void SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode paneDisplayMode, bool isPaneOpen, string expectedDefaultToolTip, string expectedCustomToolTip)
                {
                    Log.Comment($"Verifying tooltips with PaneDisplayMode=[{paneDisplayMode}] and IsPaneOpen=[{isPaneOpen}]");
                    navView.PaneDisplayMode = paneDisplayMode;
                    navView.IsPaneOpen = isPaneOpen;
                    Content.UpdateLayout();

                    Verify.AreEqual(expectedDefaultToolTip, ToolTipService.GetToolTip(menuItem1), $"Item 1's tooltip should have been \"{expectedDefaultToolTip ?? "null"}\".");
                    Verify.AreEqual(expectedCustomToolTip, ToolTipService.GetToolTip(menuItem2), $"Item 2's tooltip should have been {expectedCustomToolTip}.");
                }
            });
        }

void VerifyNVIOutlivingNVDoesNotCrash ( ) [inline]

Definition at line 1338 of file NavigationViewTests.cs.

        {
            NavigationViewItem menuItem1 = null;
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                menuItem1 = new NavigationViewItem();

                navView.MenuItems.Add(menuItem1);
                Content = navView;
                Content.UpdateLayout();

                navView.MenuItems.Clear();
                Content = menuItem1;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                GC.Collect();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // NavigationView has a handler on NVI's IsSelected DependencyPropertyChangedEvent.
                menuItem1.IsSelected = !menuItem1.IsSelected;
            });
        }

void VerifyOverflowButtonToolTip ( ) [inline]

Definition at line 1151 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;

                Content = navView;
                Content.UpdateLayout();

                var overflowButton = VisualTreeUtils.FindVisualChildByName(navView, "TopNavOverflowButton") as Button;
                var toolTipObject = ToolTipService.GetToolTip(overflowButton);

                bool testCondition = toolTipObject is ToolTip toolTip && toolTip.Content.Equals("More");
                Verify.IsTrue(testCondition, "ToolTip text should have been \"More\".");
            });
        }

void VerifyPaneDisplayModeAndDisplayModeMapping ( ) [inline]

Definition at line 285 of file NavigationViewTests.cs.

        {
            var navView = SetupNavigationView();
            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Expanded);
                Verify.IsTrue(navView.IsPaneOpen, "Pane opened");
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Minimal, "Top Minimal");
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Expanded, "Left Expanded");
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftCompact;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Compact, "LeftCompact Compact");
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftMinimal;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Minimal, "LeftMinimal Minimal");
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Auto;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Expanded, "Auto Expanded");
                navView.Width = navView.ExpandedModeThresholdWidth - 10.0;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Compact, "Auto Compact");
                navView.Width = navView.CompactModeThresholdWidth - 10.0;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Minimal, "Auto Minimal");
            });
        }

void VerifyPaneDisplayModeAndIsPaneOpenInterplayOnNavViewLaunch ( ) [inline]

Definition at line 372 of file NavigationViewTests.cs.

        {
            Log.Comment("--- PaneDisplayMode: LeftMinimal ---");
            VerifyForPaneDisplayModeLeftMinimal();

            Log.Comment("--- PaneDisplayMode: LeftCompact ---");
            VerifyForPaneDisplayModeLeftCompact();

            Log.Comment("--- PaneDisplayMode: Left ---");
            VerifyForPaneDisplayModeLeft();

            Log.Comment("--- PaneDisplayMode: Auto ---");
            VerifyForPaneDisplayModeAuto();

            void VerifyForPaneDisplayModeLeftMinimal()
            {
                Log.Comment("Verify pane is closed when IsPaneOpen=true");
                var navView = SetupNavView(NavigationViewPaneDisplayMode.LeftMinimal, true);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });

                Log.Comment("Verify pane is closed when IsPaneOpen=false");
                navView = SetupNavView(NavigationViewPaneDisplayMode.LeftMinimal, false);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });
            }

            void VerifyForPaneDisplayModeLeftCompact()
            {
                Log.Comment("Verify pane is closed when IsPaneOpen=true");
                var navView = SetupNavView(NavigationViewPaneDisplayMode.LeftCompact, true);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });

                Log.Comment("Verify pane is closed when IsPaneOpen=false");
                navView = SetupNavView(NavigationViewPaneDisplayMode.LeftCompact, false);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });
            }

            void VerifyForPaneDisplayModeLeft()
            {
                Log.Comment("Verify pane is open when IsPaneOpen=true");
                var navView = SetupNavView(NavigationViewPaneDisplayMode.Left, true);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(navView.IsPaneOpen, "NavigationView pane should have been open");
                });

                Log.Comment("Verify pane is closed when IsPaneOpen=false");
                navView = SetupNavView(NavigationViewPaneDisplayMode.Left, false);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });
            }

            void VerifyForPaneDisplayModeAuto()
            {
                Log.Comment("Verify pane is closed when launched in minimal state and IsPaneOpen=true");
                var navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, true, NavigationViewDisplayMode.Minimal);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });

                Log.Comment("Verify pane is closed when launched in compact state and IsPaneOpen=true");
                navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, true, NavigationViewDisplayMode.Compact);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });

                Log.Comment("Verify pane is open when launched in expanded state and IsPaneOpen=true");
                navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, true, NavigationViewDisplayMode.Expanded);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsTrue(navView.IsPaneOpen, "NavigationView pane should have been open");
                });

                Log.Comment("Verify pane is closed when launched in minimal state and IsPaneOpen=false");
                navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, false, NavigationViewDisplayMode.Minimal);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });

                Log.Comment("Verify pane is closed when launched in compact state and IsPaneOpen=false");
                navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, false, NavigationViewDisplayMode.Compact);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });

                Log.Comment("Verify pane is closed when launched in expanded state and IsPaneOpen=false");
                navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, false, NavigationViewDisplayMode.Expanded);

                RunOnUIThread.Execute(() =>
                {
                    Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
                });
            }

            NavigationView SetupNavView(NavigationViewPaneDisplayMode paneDisplayMode, bool isPaneOpen, NavigationViewDisplayMode displayMode = NavigationViewDisplayMode.Expanded)
            {
                NavigationView navView = null;
                RunOnUIThread.Execute(() =>
                {
                    navView = new NavigationView();
                    navView.MenuItems.Add(new NavigationViewItem() { Content = "MenuItem" });

                    navView.PaneDisplayMode = paneDisplayMode;
                    navView.IsPaneOpen = isPaneOpen;
                    navView.ExpandedModeThresholdWidth = 600.0;
                    navView.CompactModeThresholdWidth = 400.0;

                    if (paneDisplayMode == NavigationViewPaneDisplayMode.Auto)
                    {
                        switch (displayMode)
                        {
                            case NavigationViewDisplayMode.Minimal:
                                navView.Width = navView.CompactModeThresholdWidth - 10.0;
                                break;
                            case NavigationViewDisplayMode.Compact:
                                navView.Width = navView.ExpandedModeThresholdWidth - 10.0;
                                break;
                            case NavigationViewDisplayMode.Expanded:
                                navView.Width = navView.ExpandedModeThresholdWidth + 10.0;
                                break;
                        }
                    }

                    Content = navView;
                });

                IdleSynchronizer.Wait();
                return navView;
            }
        }

void VerifyPaneDisplayModeChangingPaneAccordingly ( ) [inline]

Definition at line 345 of file NavigationViewTests.cs.

        {
            var navView = SetupNavigationView();

            foreach (var paneDisplayMode in Enum.GetValues(typeof(NavigationViewPaneDisplayMode)))
            {
                RunOnUIThread.Execute(() =>
                {
                    navView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftMinimal;
                    navView.IsPaneOpen = false;
                    // Set it below threshold width for auto mode
                    navView.Width = navView.CompactModeThresholdWidth - 20;

                    Content.UpdateLayout();

                    navView.PaneDisplayMode = (NavigationViewPaneDisplayMode)paneDisplayMode;

                    Content.UpdateLayout();

                    // We only want to open the pane when explicitly set, otherwise it should be closed
                    // since we set the width below the threshold width
                    Verify.AreEqual((NavigationViewPaneDisplayMode)paneDisplayMode == NavigationViewPaneDisplayMode.Left, navView.IsPaneOpen);
                });
            }
        }

void VerifyPaneProperties ( ) [inline]

Definition at line 649 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                NavigationView navView = new NavigationView();

                // These properties are template-bound to SplitView properties, so testing getters/setters should be sufficient
                navView.IsPaneOpen = false;
                navView.CompactPaneLength = 100.0;
                navView.OpenPaneLength = 200.0;

                Verify.AreEqual(false, navView.IsPaneOpen);
                Verify.AreEqual(100.0, navView.CompactPaneLength);
                Verify.AreEqual(200.0, navView.OpenPaneLength);

                navView.IsPaneOpen = true;
                Verify.AreEqual(true, navView.IsPaneOpen);
            });
        }

void VerifySelectedItemIsNullWhenNoItemIsSelected ( ) [inline]

Definition at line 1037 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();
                Content = navView;

                var menuItem1 = new NavigationViewItem();
                menuItem1.Content = "Item 1";

                navView.MenuItems.Add(menuItem1);
                navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
                Content.UpdateLayout();

                Verify.IsFalse(menuItem1.IsSelected);
                Verify.AreEqual(null, navView.SelectedItem);

                menuItem1.IsSelected = true;
                Content.UpdateLayout();

                Verify.IsTrue(menuItem1.IsSelected);
                Verify.AreEqual(menuItem1, navView.SelectedItem);

                menuItem1.IsSelected = false;
                Content.UpdateLayout();

                Verify.IsFalse(menuItem1.IsSelected);
                Verify.AreEqual(null, navView.SelectedItem, "SelectedItem should have been [null] as no item is selected");
            });
        }

void VerifySelectingACollapsedItemShowsSelectionIndicator ( ) [inline]

Definition at line 1372 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;

            ObservableCollection<Category> subCategories = null;
            Category firstItem = null;
            Category secondItem = null;
            Category subItem = null;

            ManualResetEvent loadedEvent = new(false);
            ManualResetEvent selectionChangedEvent = new(false);

            RunOnUIThread.Execute(() =>
            {
                subItem = new("Menu Item 3", "MI3", "Icon", null, true);

                subCategories = new ObservableCollection<Category> {
                    subItem
                };

                firstItem = new("Menu Item 1", "MI1", "Icon", null, true);
                secondItem = new("Menu Item 2", "MI2", "Icon", subCategories, false);

                var categories = new ObservableCollection<Category> {
                    firstItem,
                    secondItem
                };

                navView = new NavigationView {
                    MenuItemsSource = categories,
                    MenuItemTemplate = (DataTemplate)XamlReader.Load(@"
<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
  <NavigationViewItem Content='{Binding Content}' Name='{Binding Name}' MenuItemsSource='{Binding Children}' SelectsOnInvoked='{Binding SelectsOnInvoked}'/>
</DataTemplate>")
                };

                navView.Loaded += (sender, args) => loadedEvent.Set();
                navView.SelectionChanged += (sender, args) => selectionChangedEvent.Set();
                Content = navView;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            SelectItem(navView, subItem, selectionChangedEvent);
            Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 2"));
            SelectItem(navView, firstItem, selectionChangedEvent);
            Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 1"));

            Category newItem = null;

            RunOnUIThread.Execute(() =>
            {
                newItem = new("Menu Item 4", "MI4", "Icon", null, true);
                subCategories.Add(newItem);
            });

            SelectItem(navView, newItem, selectionChangedEvent);
            Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 2"));
            SelectItem(navView, firstItem, selectionChangedEvent);
            Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 1"));

            RunOnUIThread.Execute(() =>
            {
                var secondItemNvi = (NavigationViewItem)navView.ContainerFromMenuItem(secondItem);
                secondItemNvi.IsExpanded = true;
            });

            IdleSynchronizer.Wait();

            selectionChangedEvent.Reset();

            RunOnUIThread.Execute(() =>
            {
                Category newItem2 = new("Menu Item 5", "MI5", "Icon", null, true);
                subCategories.Add(newItem2);
                // This doesn't use SelectItem. I'm guessing we're testing for adding an item and immediately selecting
                // it, rather than waiting for it to render first.
                navView.SelectedItem = newItem2;
            });

            selectionChangedEvent.WaitOne();
            IdleSynchronizer.Wait();

            // Disabled - see Bug 50123187: NavigationViewTests.VerifySelectingACollapsedItemShowsSelectionIndicator is unstable
            //Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 5"));
        }

void VerifySelectingANewItemAfterExpandingShowsSelectionIndicatorInTheCorrectLocation ( ) [inline]

Definition at line 1578 of file NavigationViewTests.cs.

        {
            NavigationView navView = null;

            ObservableCollection<Category> subCategories = null;
            Category firstItem = null;
            Category secondItem = null;

            ManualResetEvent loadedEvent = new(false);
            ManualResetEvent selectionChangedEvent = new(false);

            RunOnUIThread.Execute(() =>
            {
                ObservableCollection<Category> subSubCategories = new ObservableCollection<Category> {
                    new("Menu Item 6", "MI6", "Icon", null, true)
                };

                subCategories = new ObservableCollection<Category> {
                    new("Menu Item 3", "MI3", "Icon", null, true),
                    new("Menu Item 4", "MI4", "Icon", subSubCategories, false),
                    new("Menu Item 5", "MI5", "Icon", null, true),
                };

                firstItem = new("Menu Item 1", "MI1", "Icon", null, true);
                secondItem = new("Menu Item 2", "MI2", "Icon", subCategories, false);

                var categories = new ObservableCollection<Category> {
                    firstItem,
                    secondItem
                };

                navView = new NavigationView {
                    MenuItemsSource = categories,
                    MenuItemTemplate = (DataTemplate)XamlReader.Load(@"
<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
  <NavigationViewItem Content='{Binding Content}' Name='{Binding Name}' MenuItemsSource='{Binding Children}' SelectsOnInvoked='{Binding SelectsOnInvoked}'/>
</DataTemplate>")
                };

                navView.Loaded += (sender, args) => loadedEvent.Set();
                navView.SelectionChanged += (sender, args) => selectionChangedEvent.Set();
                Content = navView;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            Category newItem = null;

            RunOnUIThread.Execute(() =>
            {
                newItem = new("Menu Item 7", "MI7", "Icon", null, true);
                subCategories.Add(newItem);
                navView.SelectedItem = newItem;

                var secondItemNvi = (NavigationViewItem)navView.ContainerFromMenuItem(secondItem);
                secondItemNvi.IsExpanded = true;
            });

            selectionChangedEvent.WaitOne();
            IdleSynchronizer.Wait();

            Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 7"));
        }

void VerifySettingsItemTag ( ) [inline]

Definition at line 920 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();

                navView.IsSettingsVisible = true;
                navView.IsPaneOpen = true;
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
                Content = navView;
                Content.UpdateLayout();
                var settingsItem = (NavigationViewItem)navView.SettingsItem;
                Verify.AreEqual(settingsItem.Tag, "Settings");
            });
        }

void VerifySettingsItemToolTip ( ) [inline]

Definition at line 895 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var navView = new NavigationView();

                navView.IsSettingsVisible = true;
                navView.IsPaneOpen = true;
                navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
                Content = navView;
                Content.UpdateLayout();
                var settingsItem = (NavigationViewItem)navView.SettingsItem;

                var toolTip = ToolTipService.GetToolTip(settingsItem);
                Verify.IsNull(toolTip, "Verify tooltip is disabled when pane is open");

                navView.IsPaneOpen = false;
                Content.UpdateLayout();

                toolTip = ToolTipService.GetToolTip(settingsItem);
                Verify.IsNotNull(toolTip, "Verify tooltip is enabled when pane is closed");
            });
        }

void VerifySingleSelection ( ) [inline]

Definition at line 670 of file NavigationViewTests.cs.

        {
            string navItemPresenter1CurrentState = string.Empty;
            string navItemPresenter2CurrentState = string.Empty;
            NavigationView navView = null;
            NavigationViewItem menuItem1 = null;
            NavigationViewItem menuItem2 = null;

            RunOnUIThread.Execute(() =>
            {
                navView = new NavigationView();
                Content = navView;

                menuItem1 = new NavigationViewItem();
                menuItem2 = new NavigationViewItem();
                menuItem1.Content = "Item 1";
                menuItem2.Content = "Item 2";

                navView.MenuItems.Add(menuItem1);
                navView.MenuItems.Add(menuItem2);
                navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
                Content.UpdateLayout();

                var menuItemLayoutRoot = VisualTreeHelper.GetChild(menuItem1, 0) as FrameworkElement;
                var navItemPresenter = VisualTreeHelper.GetChild(menuItemLayoutRoot, 0) as FrameworkElement;
                var navItemPresenterLayoutRoot = VisualTreeHelper.GetChild(navItemPresenter, 0) as FrameworkElement;
                var statesGroups = VisualStateManager.GetVisualStateGroups(navItemPresenterLayoutRoot);

                foreach (var visualStateGroup in statesGroups)
                {
                    Log.Comment($"VisualStateGroup1: Name={visualStateGroup.Name}, CurrentState={visualStateGroup.CurrentState.Name}");

                    visualStateGroup.CurrentStateChanged += (object sender, VisualStateChangedEventArgs e) =>
                    {
                        Log.Comment($"VisualStateChangedEventArgs1: Name={e.Control.Name}, OldState={e.OldState.Name}, NewState={e.NewState.Name}");
                        navItemPresenter1CurrentState = e.NewState.Name;
                    };
                }

                menuItemLayoutRoot = VisualTreeHelper.GetChild(menuItem2, 0) as FrameworkElement;
                navItemPresenter = VisualTreeHelper.GetChild(menuItemLayoutRoot, 0) as FrameworkElement;
                navItemPresenterLayoutRoot = VisualTreeHelper.GetChild(navItemPresenter, 0) as FrameworkElement;
                statesGroups = VisualStateManager.GetVisualStateGroups(navItemPresenterLayoutRoot);

                foreach (var visualStateGroup in statesGroups)
                {
                    Log.Comment($"VisualStateGroup2: Name={visualStateGroup.Name}, CurrentState={visualStateGroup.CurrentState.Name}");

                    visualStateGroup.CurrentStateChanged += (object sender, VisualStateChangedEventArgs e) =>
                    {
                        Log.Comment($"VisualStateChangedEventArgs2: Name={e.Control.Name}, OldState={e.OldState.Name}, NewState={e.NewState.Name}");
                        navItemPresenter2CurrentState = e.NewState.Name;
                    };
                }

                Verify.IsFalse(menuItem1.IsSelected);
                Verify.IsFalse(menuItem2.IsSelected);
                Verify.AreEqual(null, navView.SelectedItem);

                menuItem1.IsSelected = true;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content.UpdateLayout();
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("Selected", navItemPresenter1CurrentState);
                Verify.AreEqual(string.Empty, navItemPresenter2CurrentState);

                Verify.IsTrue(menuItem1.IsSelected);
                Verify.IsFalse(menuItem2.IsSelected);
                Verify.AreEqual(menuItem1, navView.SelectedItem);

                menuItem2.IsSelected = true;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content.UpdateLayout();
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("Normal", navItemPresenter1CurrentState);
                Verify.AreEqual("Selected", navItemPresenter2CurrentState);

                Verify.IsTrue(menuItem2.IsSelected);
                Verify.IsFalse(menuItem1.IsSelected, "MenuItem1 should have been deselected when MenuItem2 was selected");
                Verify.AreEqual(menuItem2, navView.SelectedItem);
            });
        }

void VerifyValuesCoercion ( ) [inline]

Definition at line 630 of file NavigationViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                NavigationView navView = new NavigationView();

                navView.CompactModeThresholdWidth = -1;
                navView.ExpandedModeThresholdWidth = -1;
                navView.CompactPaneLength = -1;
                navView.OpenPaneLength = -1;

                Verify.AreEqual(0, navView.CompactModeThresholdWidth, "Should coerce negative CompactModeThresholdWidth values to 0");
                Verify.AreEqual(0, navView.ExpandedModeThresholdWidth, "Should coerce negative ExpandedModeThresholdWidth values to 0");
                Verify.AreEqual(0, navView.CompactPaneLength, "Should coerce negative CompactPaneLength values to 0");
                Verify.AreEqual(0, navView.OpenPaneLength, "Should coerce negative OpenPaneLength values to 0");
            });
        }

void VerifyVisualTree ( ) [inline]

Definition at line 245 of file NavigationViewTests.cs.

        {
            using (VisualTreeVerifier visualTreeVerifier = new VisualTreeVerifier())
            {
                // Generate a basic NavigationView verification file for all the pane display modes
                foreach (var paneDisplayMode in Enum.GetValues(typeof(NavigationViewPaneDisplayMode)))
                {
                    var filePrefix = "NavigationView" + paneDisplayMode;
                    NavigationViewPaneDisplayMode displayMode = (NavigationViewPaneDisplayMode)paneDisplayMode;

                    // We can skip generating a verification file for Left mode since Auto is achieving the same result.
                    if (displayMode == NavigationViewPaneDisplayMode.Left)
                    {
                        continue;
                    }

                    Log.Comment($"Verify visual tree for NavigationViewPaneDisplayMode: {paneDisplayMode}");
                    var navigationView = SetupNavigationView(displayMode);
                    visualTreeVerifier.VerifyVisualTreeNoException(root: navigationView, verificationFileNamePrefix: filePrefix);
                }

                Log.Comment($"Verify visual tree for NavigationViewScrolling");
                var leftNavViewScrolling = SetupNavigationViewScrolling(NavigationViewPaneDisplayMode.Left);
                visualTreeVerifier.VerifyVisualTreeNoException(root: leftNavViewScrolling, verificationFileNamePrefix: "NavigationViewScrolling");

                Log.Comment($"Verify visual tree for NavigationViewLeftPaneContent");
                var leftNavViewPaneContent = SetupNavigationViewPaneContent(NavigationViewPaneDisplayMode.Left);
                visualTreeVerifier.VerifyVisualTreeNoException(root: leftNavViewPaneContent, verificationFileNamePrefix: "NavigationViewLeftPaneContent");

                Log.Comment($"Verify visual tree for NavigationViewTopPaneContent");
                var topNavViewPaneContent = SetupNavigationViewPaneContent(NavigationViewPaneDisplayMode.Top);
                visualTreeVerifier.VerifyVisualTreeNoException(root: topNavViewPaneContent, verificationFileNamePrefix: "NavigationViewTopPaneContent");

                Log.Comment($"Verify visual tree for NavigationViewHierarchy");
                var hierarchyNavViewPaneContent = SetupNavigationViewHierarchy(NavigationViewPaneDisplayMode.Left);
                visualTreeVerifier.VerifyVisualTreeNoException(root: hierarchyNavViewPaneContent, verificationFileNamePrefix: "NavigationViewHierarchy");
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_ApiTests/NavigationViewTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • NumberBoxTests
Public Member Functions | Private Member Functions

NumberBoxTests Class Reference

List of all members.

Public Member Functions

void | VerifyInputScopePropogates ()
void | VerifyIsEnabledChangeUpdatesVisualState ()
void | VerifyTextAlignmentPropogates ()
void | VerifyUIANameBehavior ()

Private Member Functions

NumberBox SetupNumberBox ()

Detailed Description

Definition at line 24 of file NumberBoxTests.cs.

Member Function Documentation

NumberBox SetupNumberBox ( ) [inline, private]

Definition at line 177 of file NumberBoxTests.cs.

        {
            NumberBox numberBox = null;
            RunOnUIThread.Execute(() =>
            {
                numberBox = new NumberBox();
                Content = numberBox;
            });

            return numberBox;
        }

void VerifyInputScopePropogates ( ) [inline]

Definition at line 47 of file NumberBoxTests.cs.

        {
            var numberBox = SetupNumberBox();

            RunOnUIThread.Execute(() =>
            {
                Content.UpdateLayout();
                var inputTextBox = TestUtilities.FindDescendents<TextBox>(numberBox).Where(e => e.Name == "InputBox").Single();

                Verify.AreEqual(1, inputTextBox.InputScope.Names.Count);
                Verify.AreEqual(InputScopeNameValue.Number, inputTextBox.InputScope.Names[0].NameValue, "The default InputScope should be 'Number'.");

                var scopeName = new InputScopeName();
                scopeName.NameValue = InputScopeNameValue.CurrencyAmountAndSymbol;
                var scope = new InputScope();
                scope.Names.Add(scopeName);

                numberBox.InputScope = scope;
                Content.UpdateLayout();

                Verify.AreEqual(1, inputTextBox.InputScope.Names.Count);
                Verify.AreEqual(InputScopeNameValue.CurrencyAmountAndSymbol, inputTextBox.InputScope.Names[0].NameValue, "The InputScope should be 'CurrencyAmountAndSymbol'.");
            });

            return;
        }

void VerifyIsEnabledChangeUpdatesVisualState ( ) [inline]

Definition at line 76 of file NumberBoxTests.cs.

        {
            var numberBox = SetupNumberBox();

            VisualStateGroup commonStatesGroup = null;
            RunOnUIThread.Execute(() =>
            {
                // Check 1: Set IsEnabled to true.
                numberBox.IsEnabled = true;
                Content.UpdateLayout();

                var numberBoxLayoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(numberBox, 0);
                commonStatesGroup = VisualStateManager.GetVisualStateGroups(numberBoxLayoutRoot).First(vsg => vsg.Name.Equals("CommonStates"));

                Verify.AreEqual("Normal", commonStatesGroup.CurrentState.Name);

                // Check 2: Set IsEnabled to false.
                numberBox.IsEnabled = false;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("Disabled", commonStatesGroup.CurrentState.Name);

                // Check 3: Set IsEnabled back to true.
                numberBox.IsEnabled = true;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("Normal", commonStatesGroup.CurrentState.Name);
            });
        }

void VerifyTextAlignmentPropogates ( ) [inline]

Definition at line 27 of file NumberBoxTests.cs.

        {
            var numberBox = SetupNumberBox();
            TextBox textBox = null;

            RunOnUIThread.Execute(() =>
            {
                Content.UpdateLayout();

                textBox = TestUtilities.FindDescendents<TextBox>(numberBox).Where(e => e.Name == "InputBox").Single();
                Verify.AreEqual(TextAlignment.Left, textBox.TextAlignment, "The default TextAlignment should be left.");

                numberBox.TextAlignment = TextAlignment.Right;
                Content.UpdateLayout();

                Verify.AreEqual(TextAlignment.Right, textBox.TextAlignment, "The TextAlignment should have been updated to Right.");
            });
        }

void VerifyUIANameBehavior ( ) [inline]

Definition at line 113 of file NumberBoxTests.cs.

        {
            NumberBox numberBox = null;
            TextBox textBox = null;

            RunOnUIThread.Execute(() =>
            {
                numberBox = new NumberBox();
                Content = numberBox;
                Content.UpdateLayout();

                textBox = TestPage.FindVisualChildrenByType<TextBox>(numberBox)[0];
                Verify.IsNotNull(textBox);
                numberBox.Header = "Some header";
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                VerifyUIAName("Some header");
                numberBox.Header = new Button();
                AutomationProperties.SetName(numberBox, "Some UIA name");
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                VerifyUIAName("Some UIA name");
                numberBox.Header = new Button();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                VerifyUIAName("Some UIA name");
                numberBox.Minimum = 0;
                numberBox.Maximum = 10;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                VerifyUIAName("Some UIA name Minimum0 Maximum10");
                numberBox.Minimum = 50;
                numberBox.Maximum = 100;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                VerifyUIAName("Some UIA name Minimum50 Maximum100");
            });

            void VerifyUIAName(string value)
            {
                Verify.AreEqual(value, FrameworkElementAutomationPeer.CreatePeerForElement(textBox).GetName());
            }
        }

The documentation for this class was generated from the following file:
  • NumberBox/APITests/NumberBoxTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • PagerControlTests
Public Member Functions

PagerControlTests Class Reference

List of all members.

Public Member Functions

void | VerifyAutomationPeerBehavior ()
void | VerifyComboBoxItemsInfiniteItems ()
void | VerifyComboBoxItemsListNormal ()
void | VerifyEmptyPagerDoesNotCrash ()
void | VerifyNumberPanelButtonUIABehavior ()
void | VerifySelectedIndexChangedEventArgs ()

Detailed Description

Definition at line 27 of file PagerControlTests.cs.

Member Function Documentation

void VerifyAutomationPeerBehavior ( ) [inline]

Definition at line 31 of file PagerControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var pagerControl = new PagerControl();
                pagerControl.NumberOfPages = 5;
                Content = pagerControl;

                var peer = PagerControlAutomationPeer.CreatePeerForElement(pagerControl);
                var selectionPeer = peer as ISelectionProvider;
                Verify.AreEqual(false, selectionPeer.CanSelectMultiple);
                Verify.AreEqual(true, selectionPeer.IsSelectionRequired);
                Verify.AreEqual(AutomationLandmarkType.Navigation, peer.GetLandmarkType());
            });
        }

void VerifyComboBoxItemsInfiniteItems ( ) [inline]

Definition at line 111 of file PagerControlTests.cs.

        {
            PagerControl control = null;
            RunOnUIThread.Execute(() =>
            {
                control = new PagerControl();
                control.NumberOfPages = 5;
                control.DisplayMode = PagerControlDisplayMode.ComboBox;
                Content = control;
                control.NumberOfPages = -1;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(100, control.TemplateSettings.Pages.Count);
                for (int i = 0; i < 100; i++)
                {
                    Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
                }
                control.NumberOfPages = 200;
                control.UpdateLayout();
                control.NumberOfPages = -1;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(200, control.TemplateSettings.Pages.Count);
                for (int i = 0; i < 200; i++)
                {
                    Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
                }
            });
        }

void VerifyComboBoxItemsListNormal ( ) [inline]

Definition at line 75 of file PagerControlTests.cs.

        {
            PagerControl control = null;
            RunOnUIThread.Execute(() =>
            {
                control = new PagerControl();
                control.NumberOfPages = 5;
                control.DisplayMode = PagerControlDisplayMode.ComboBox;
                Content = control;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(control.NumberOfPages, control.TemplateSettings.Pages.Count);
                for(int i=0;i<control.NumberOfPages;i++)
                {
                    Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
                }
                control.NumberOfPages = 100;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(control.NumberOfPages, control.TemplateSettings.Pages.Count);
                for (int i = 0; i < control.NumberOfPages; i++)
                {
                    Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
                }
            });
        }

void VerifyEmptyPagerDoesNotCrash ( ) [inline]

Definition at line 150 of file PagerControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                Content = new PagerControl();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsNotNull(Content);
            });
        }

void VerifyNumberPanelButtonUIABehavior ( ) [inline]

Definition at line 48 of file PagerControlTests.cs.

        {
            RunOnUIThread.Execute(()=>{
                var pagerControl = new PagerControl();
                pagerControl.NumberOfPages = 5;
                pagerControl.DisplayMode = PagerControlDisplayMode.ButtonPanel;
                Content = pagerControl;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var rootGrid = VisualTreeHelper.GetChild(Content, 0) as Grid;
                var repeater = VisualTreeHelper.GetChild(rootGrid, 2) as ItemsRepeater;

                for(int i=0;i<5;i++)
                {
                    var button = repeater.TryGetElement(i);
                    Verify.IsNotNull(button);
                    Verify.AreEqual(i + 1, button.GetValue(AutomationProperties.PositionInSetProperty));
                    Verify.AreEqual(5, button.GetValue(AutomationProperties.SizeOfSetProperty));
                }
            });
        }

void VerifySelectedIndexChangedEventArgs ( ) [inline]

Definition at line 166 of file PagerControlTests.cs.

        {
            PagerControl pager = null;
            var previousIndex = -2;
            var newIndex = -2;
            RunOnUIThread.Execute(() =>
            {
                pager = new PagerControl();
                pager.SelectedIndexChanged += Pager_SelectedIndexChanged;
                Content = pager;

            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                VerifySelectionChanged(-1, 0);

                pager.NumberOfPages = 10;
                VerifySelectionChanged(-1, 0);

                pager.SelectedPageIndex = 9;
                VerifySelectionChanged(0, 9);

                pager.SelectedPageIndex = 4;
                VerifySelectionChanged(9, 4);
            });

            void Pager_SelectedIndexChanged(PagerControl sender, PagerControlSelectedIndexChangedEventArgs args)
            {
                previousIndex = args.PreviousPageIndex;
                newIndex = args.NewPageIndex;
            }

            void VerifySelectionChanged(int expectedPreviousIndex, int expectedNewIndex)
            {
                Verify.AreEqual(expectedPreviousIndex, previousIndex, "Expected PreviousPageIndex:" + expectedPreviousIndex + ", actual: " + previousIndex);
                Verify.AreEqual(expectedNewIndex, newIndex, "Expected PreviousPageIndex:" + expectedNewIndex + ", actual: " + newIndex);
            }
        }

The documentation for this class was generated from the following file:
  • PagerControl/APITests/PagerControlTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ParallaxViewTests
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

ParallaxViewTests Class Reference

List of all members.

Public Member Functions

void | ChangeAlignmentOfDisconnectedParallaxViewChild ()
void | ChangeSizeOfDisconnectedScrollViewerContent ()
void | VerifyBasicParallaxingInsideScroller ()
void | VerifyBasicParallaxingInsideScrollViewer ()
void | VerifyBasicParallaxingWithListView ()
void | VerifyBasicParallaxingWithScroller ()
void | VerifyBasicParallaxingWithScrollViewer ()
void | VerifyDefaultPropertyValues ()
void | VerifyHeaderParallaxingInsideScrollViewer ()
void | VerifyParallaxingWithAbsoluteExtremes ()
void | VerifyParallaxingWithClamping ()
void | VerifyParallaxingWithMaxRatios ()
void | VerifyParallaxingWithoutClamping ()
void | VerifyParallaxingWithSizeChanges ()
void | VerifyParallaxingWithZooming ()
void | VerifyParallaxViewOffsetChangeInsideScrollViewer ()
void | VerifyPropertyGettersAndSetters ()

Private Types

enum | PropertyId { ParallaxViewChildVerticalAlignment, ScrollViewerContentHeight }
enum | SourceType { ScrollViewer, ScrollPresenter }

Private Member Functions

void | ChangePropertyAfterParallaxViewDisposal (PropertyId propertyToChange)
void | SetupDefaultUIWithListView (ParallaxView parallaxView, Rectangle rectanglePVChild, ListView listView, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent listViewLoadedEvent)
void | SetupDefaultUIWithScrollPresenter (ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollPresenterLoadedEvent)
void | SetupDefaultUIWithScrollViewer (ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollViewer scrollViewer, Rectangle rectangleSVContent, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollViewerLoadedEvent)
void | SetupUIWithParallaxViewInsideScrollPresenter (ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollPresenter scrollPresenter, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollPresenterLoadedEvent)
void | SetupUIWithParallaxViewInsideScrollViewer (double verticalParallaxViewOffset, ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollViewer scrollViewer, StackPanel stackPanelSVContent, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollViewerLoadedEvent)
void | VerifyParallaxingWithDefaultSourceUI (SourceType sourceType, ParallaxSourceOffsetKind horizontalSourceOffsetKind, double horizontalSourceStartOffset, double horizontalSourceEndOffset, double maxHorizontalShiftRatio, bool isHorizontalShiftClamped, double expectedHorizontalShift, ParallaxSourceOffsetKind verticalSourceOffsetKind, double verticalSourceStartOffset, double verticalSourceEndOffset, double maxVerticalShiftRatio, bool isVerticalShiftClamped, double expectedVerticalShift)
void | VerifyParallaxingWithParallaxViewInsideScrollPresenter (double scrollPresenterHorizontalOffset, double scrollPresenterVerticalOffset, double expectedHorizontalShift, double expectedVerticalShift)
void | VerifyParallaxingWithParallaxViewInsideScrollViewer (ParallaxSourceOffsetKind verticalSourceOffsetKind, double verticalSourceStartOffset, double verticalSourceEndOffset, double maxVerticalShiftRatio, double verticalParallaxViewOffset, bool isVerticalShiftClamped, double expectedVerticalShift)

Static Private Member Functions

static void | ChangeScrollPresenterView (ScrollPresenter scrollPresenter, double?horizontalOffset, double?verticalOffset, float?zoomFactor, bool disableAnimation, Visual visualPPChild, ref float?finalHorizontalShift, ref float?finalVerticalShift)
static void | ChangeScrollViewerView (ScrollViewer scrollViewer, double?horizontalOffset, double?verticalOffset, float?zoomFactor, bool disableAnimation, Visual visualPPChild, ref float?finalHorizontalShift, ref float?finalVerticalShift)
static ScrollViewer | FindInnerScrollViewer (ItemsControl ic)
static string | GetVisualHorizontalTargetedPropertyName ()
static string | GetVisualVerticalTargetedPropertyName ()
static void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)

Private Attributes

const double | c_defaultHorizontalShift = 0.0
const double | c_defaultHorizontalSourceEndOffset = 0.0
const ParallaxSourceOffsetKind | c_defaultHorizontalSourceOffsetKind = ParallaxSourceOffsetKind.Relative
const double | c_defaultHorizontalSourceStartOffset = 0.0
const bool | c_defaultIsHorizontalShiftClamped = true
const bool | c_defaultIsVerticalShiftClamped = true
const double | c_defaultMaxHorizontalShiftRatio = 1.0
const double | c_defaultMaxVerticalShiftRatio = 1.0
const double | c_defaultUIFinalScrollPresenterHorizontalOffset = 100.0
const double | c_defaultUIFinalScrollPresenterVerticalOffset = 50.0
const double | c_defaultUIFinalScrollViewerHorizontalOffset = 100.0
const double | c_defaultUIFinalScrollViewerVerticalOffset = 50.0
const double | c_defaultUIHorizontalShift = 100.0
const double | c_defaultUIScrollPresenterContentHeight = 600.0
const double | c_defaultUIScrollPresenterContentWidth = 1200.0
const double | c_defaultUIScrollPresenterHeight = 100.0
const double | c_defaultUIScrollPresenterWidth = 200.0
const double | c_defaultUIScrollViewerContentHeight = 600.0
const double | c_defaultUIScrollViewerContentWidth = 1200.0
const double | c_defaultUIScrollViewerHeight = 100.0
const double | c_defaultUIScrollViewerWidth = 200.0
const double | c_defaultUIVerticalShift = 50.0
const double | c_defaultVerticalShift = 0.0
const double | c_defaultVerticalSourceEndOffset = 0.0
const ParallaxSourceOffsetKind | c_defaultVerticalSourceOffsetKind = ParallaxSourceOffsetKind.Relative
const double | c_defaultVerticalSourceStartOffset = 0.0
const int | c_MaxWaitDuration = 5000
const double | c_scrollPresenterMaxOverpanRatio = 1.0
const double | c_scrollViewerMaxOverpanRatio = 0.1
const double | c_scrollViewerMaxOverpanRatioWithZoom = 1.0
const float | c_shiftTolerance = 0.0001f

Detailed Description

Definition at line 29 of file ParallaxViewTests.cs.

Member Enumeration Documentation

enum PropertyId [private]
Enumerator:
ParallaxViewChildVerticalAlignment
ScrollViewerContentHeight

Definition at line 66 of file ParallaxViewTests.cs.

        {
            ParallaxViewChildVerticalAlignment,
            ScrollViewerContentHeight,
        }

enum SourceType [private]
Enumerator:
ScrollViewer
ScrollPresenter

Definition at line 72 of file ParallaxViewTests.cs.

        {
            ScrollViewer,
            ScrollPresenter,
        }

Member Function Documentation

void ChangeAlignmentOfDisconnectedParallaxViewChild ( ) [inline]

Definition at line 791 of file ParallaxViewTests.cs.

        {
            ChangePropertyAfterParallaxViewDisposal(PropertyId.ParallaxViewChildVerticalAlignment);
        }

void ChangePropertyAfterParallaxViewDisposal ( PropertyId propertyToChange ) [inline, private]

Definition at line 1634 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollViewer scrollViewer = null;
            Rectangle rectangleSVContent = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent scrollViewerLoadedEvent = null;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                scrollViewerLoadedEvent = new AutoResetEvent(false);
                rectangleSVContent = new Rectangle();
                scrollViewer = new ScrollViewer();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                scrollViewer.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollViewer.Loaded event handler");
                    scrollViewerLoadedEvent.Set();
                };

                SetupDefaultUIWithScrollViewer(
                    parallaxView, rectanglePVChild, scrollViewer, rectangleSVContent,
                    parallaxViewLoadedEvent, scrollViewerLoadedEvent: null);

                parallaxView.Source = scrollViewer;
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            scrollViewerLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Disposing the ParallaxView");
                (Content as StackPanel).Children.Remove(parallaxView);
                WeakReference parallaxViewWeakReference = new WeakReference(parallaxView);
                parallaxView = null;
                Log.Comment("Garbage-collecting the ParallaxView");
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                Verify.IsNull(parallaxViewWeakReference.Target);

                switch (propertyToChange)
                {
                    case PropertyId.ParallaxViewChildVerticalAlignment:
                        Log.Comment("Changing prior ParallaxView.Child's VerticalAlignment");
                        rectanglePVChild.VerticalAlignment = VerticalAlignment.Bottom;
                        break;
                    case PropertyId.ScrollViewerContentHeight:
                        Log.Comment("Changing ScrollViewer.Content.Height");
                        rectangleSVContent.Height += 10;
                        break;
                }
            });
        }

static void ChangeScrollPresenterView | ( | ScrollPresenter | scrollPresenter,
 |  | double? | horizontalOffset,
 |  | double? | verticalOffset,
 |  | float? | zoomFactor,
 |  | bool | disableAnimation,
 |  | Visual | visualPPChild,
 |  | ref float? | finalHorizontalShift,
 |  | ref float? | finalVerticalShift |
 | ) |  |  | [inline, static, private]

Definition at line 1815 of file ParallaxViewTests.cs.

        {
            bool isPrivateLoggingEnabled = false;
            AutoResetEvent scrollPresenterStateChangedEvent = null;
            bool spyOnHorizontalShift = visualPPChild != null && finalHorizontalShift != null;
            bool spyOnVerticalShift = visualPPChild != null && finalVerticalShift != null;
            float horizontalShift = 0f;
            float verticalShift = 0f;

            RunOnUIThread.Execute(() =>
            {
                if (isPrivateLoggingEnabled)
                {
                    // Turn on private tracing for ScrollPresenter control
                    MUXControlsTestHooks.SetOutputDebugStringLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
                }

                scrollPresenterStateChangedEvent = new AutoResetEvent(false);

                scrollPresenter.ViewChanged += (ScrollPresenter sender, object e) =>
                {
                    try
                    {
                        Log.Comment("ScrollPresenter.ViewChanged - View=({0}, {1}, {2})", scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                        CompositionGetValueStatus status;

                        if (spyOnHorizontalShift)
                        {
                            status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out horizontalShift);
                            Log.Comment("Target transform during view change: status={0}, horizontal offset={1}", status, horizontalShift);
                        }

                        if (spyOnVerticalShift)
                        {
                            status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out verticalShift);
                            Log.Comment("Target transform during view change: status={0}, vertical offset={1}", status, verticalShift);
                        }
                    }
                    catch (Exception ex)
                    {
                        Log.Error("Exception in ScrollPresenter.ViewChanged: " + ex.ToString());
                    }
                };

                scrollPresenter.StateChanged += (ScrollPresenter sender, object e) =>
                {
                    try
                    {
                        Log.Comment("ScrollPresenter.StateChanged - State={0}", scrollPresenter.State);
                        if (scrollPresenter.State == ScrollingInteractionState.Idle)
                        {
                            Log.Comment("ScrollPresenter - idling notification. Final view: {0}, {1}, {2}", scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
                            scrollPresenterStateChangedEvent.Set();
                        }
                    }
                    catch (Exception ex)
                    {
                        Log.Error("Exception in ScrollPresenter.StateChanged: " + ex.ToString());
                    }
                };

                Log.Comment("Changing ScrollPresenter view to ({0}, {1}, {2}) with disableAnimation={3}", horizontalOffset, verticalOffset, zoomFactor, disableAnimation);
                if (zoomFactor != null && (float)zoomFactor != scrollPresenter.ZoomFactor)
                {
                    int viewChangeCorrelationId = scrollPresenter.ZoomTo(
                        (float)zoomFactor,
                        Vector2.Zero,
                        new ScrollingZoomOptions(
                            disableAnimation ? ScrollingAnimationMode.Disabled : ScrollingAnimationMode.Enabled,
                            ScrollingSnapPointsMode.Ignore));
                    Verify.IsGreaterThan(viewChangeCorrelationId, 0);
                }

                if ((horizontalOffset != null && (double)horizontalOffset != scrollPresenter.HorizontalOffset) || (verticalOffset != null && (double)verticalOffset != scrollPresenter.VerticalOffset))
                {
                    Log.Comment("Invoking ScrollPresenter.ChangeOffsets");
                    int viewChangeCorrelationId = scrollPresenter.ScrollTo(
                        horizontalOffset == null ? scrollPresenter.HorizontalOffset : (double)horizontalOffset,
                        verticalOffset == null ? scrollPresenter.VerticalOffset : (double)verticalOffset,
                        new ScrollingScrollOptions(
                            disableAnimation ? ScrollingAnimationMode.Disabled : ScrollingAnimationMode.Enabled,
                            ScrollingSnapPointsMode.Ignore));
                    Verify.IsGreaterThan(viewChangeCorrelationId, 0);
                }
            });

            Log.Comment("Waiting for scrollPresenterStateChangedEvent event");
            scrollPresenterStateChangedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("First view change completed");

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            if (spyOnHorizontalShift || spyOnVerticalShift)
            {
                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Cancelling spying");

                    if (spyOnHorizontalShift)
                    {
                        CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                    }
                    if (spyOnVerticalShift)
                    {
                        CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
                    }
                });

                Log.Comment("Waiting for captured properties to be updated");
                CompositionPropertySpy.SynchronouslyTickUIThread(10);

                RunOnUIThread.Execute(() =>
                {
                    CompositionGetValueStatus status;

                    Log.Comment("Accessing final shift values");

                    if (spyOnHorizontalShift)
                    {
                        status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out horizontalShift);
                        Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, horizontalShift);
                    }

                    if (spyOnVerticalShift)
                    {
                        status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out verticalShift);
                        Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, verticalShift);
                    }

                    if (isPrivateLoggingEnabled)
                    {
                        // Turn off private tracing for ScrollPresenter control
                        MUXControlsTestHooks.SetOutputDebugStringLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
                        MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
                        MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
                    }
                });

                if (spyOnHorizontalShift)
                {
                    finalHorizontalShift = horizontalShift;
                }

                if (spyOnVerticalShift)
                {
                    finalVerticalShift = verticalShift;
                }
            }
        }

static void ChangeScrollViewerView | ( | ScrollViewer | scrollViewer,
 |  | double? | horizontalOffset,
 |  | double? | verticalOffset,
 |  | float? | zoomFactor,
 |  | bool | disableAnimation,
 |  | Visual | visualPPChild,
 |  | ref float? | finalHorizontalShift,
 |  | ref float? | finalVerticalShift |
 | ) |  |  | [inline, static, private]

Definition at line 1696 of file ParallaxViewTests.cs.

        {
            AutoResetEvent scrollViewerViewChangedEvent = null;
            double? targetHorizontalOffset = horizontalOffset;
            double? targetVerticalOffset = verticalOffset;
            float? targetZoomFactor = zoomFactor;
            bool spyOnHorizontalShift = visualPPChild != null && finalHorizontalShift != null;
            bool spyOnVerticalShift = visualPPChild != null && finalVerticalShift != null;
            float horizontalShift = 0f;
            float verticalShift = 0f;

            RunOnUIThread.Execute(() =>
            {
                scrollViewerViewChangedEvent = new AutoResetEvent(false);

                scrollViewer.ViewChanged += (object sender, ScrollViewerViewChangedEventArgs e) =>
                {
                    try
                    {
                        Log.Comment("ScrollViewer.ViewChanged - IsIntermediate={0}, View=({1}, {2}, {3})",
                            e.IsIntermediate, scrollViewer.HorizontalOffset, scrollViewer.VerticalOffset, scrollViewer.ZoomFactor);

                        CompositionGetValueStatus status;

                        if (spyOnHorizontalShift)
                        {
                            status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out horizontalShift);
                            Log.Comment("Target transform during view change: status={0}, horizontal offset={1}", status, horizontalShift);
                        }

                        if (spyOnVerticalShift)
                        {
                            status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out verticalShift);
                            Log.Comment("Target transform during view change: status={0}, vertical offset={1}", status, verticalShift);
                        }

                        if (!e.IsIntermediate)
                        {
                            Log.Comment("ScrollViewer - final notification. Final view: {0}, {1}, {2}", scrollViewer.HorizontalOffset, scrollViewer.VerticalOffset, scrollViewer.ZoomFactor);
                            scrollViewerViewChangedEvent.Set();
                        }
                    }
                    catch (Exception ex)
                    {
                        Log.Error("Exception in ScrollViewer.ViewChanged: " + ex.ToString());
                    }
                };

                Log.Comment("Changing ScrollViewer view to ({0}, {1}, {2}) with disableAnimation={3}", targetHorizontalOffset, targetVerticalOffset, targetZoomFactor, disableAnimation);
                bool result = scrollViewer.ChangeView(targetHorizontalOffset, targetVerticalOffset, targetZoomFactor, disableAnimation);
                Log.Comment("View change result: {0}", result);
                Verify.IsTrue(result);
            });

            Log.Comment("Waiting for scrollViewerViewChangedEvent event");
            scrollViewerViewChangedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("First view change completed");

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            if (spyOnHorizontalShift || spyOnVerticalShift)
            {
                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Cancelling spying");

                    if (spyOnHorizontalShift)
                    {
                        CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                    }
                    if (spyOnVerticalShift)
                    {
                        CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
                    }
                });

                Log.Comment("Waiting for captured properties to be updated");
                CompositionPropertySpy.SynchronouslyTickUIThread(10);

                RunOnUIThread.Execute(() =>
                {
                    CompositionGetValueStatus status;

                    Log.Comment("Accessing final shift values");

                    if (spyOnHorizontalShift)
                    {
                        status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out horizontalShift);
                        Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, horizontalShift);
                    }

                    if (spyOnVerticalShift)
                    {
                        status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out verticalShift);
                        Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, verticalShift);
                    }
                });

                if (spyOnHorizontalShift)
                {
                    finalHorizontalShift = horizontalShift;
                }

                if (spyOnVerticalShift)
                {
                    finalVerticalShift = verticalShift;
                }
            }
        }

void ChangeSizeOfDisconnectedScrollViewerContent ( ) [inline]

Definition at line 783 of file ParallaxViewTests.cs.

        {
            ChangePropertyAfterParallaxViewDisposal(PropertyId.ScrollViewerContentHeight);
        }

static ScrollViewer FindInnerScrollViewer ( ItemsControl ic ) [inline, static, private]

Definition at line 2008 of file ParallaxViewTests.cs.

        {
            Panel p = ic.ItemsPanelRoot;

            UIElement parent = VisualTreeHelper.GetParent(p) as UIElement;
            while (parent != null && !(parent is ScrollViewer))
                parent = VisualTreeHelper.GetParent(parent) as UIElement;

            return parent as ScrollViewer;
        }

static string GetVisualHorizontalTargetedPropertyName ( ) [inline, static, private]

Definition at line 1977 of file ParallaxViewTests.cs.

        {
            return "Translation.X";
        }

static string GetVisualVerticalTargetedPropertyName ( ) [inline, static, private]

Definition at line 1982 of file ParallaxViewTests.cs.

        {
            return "Translation.Y";
        }

static void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, static, private]

Definition at line 1987 of file ParallaxViewTests.cs.

        {
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;
            ScrollPresenter scr = sender as ScrollPresenter;

            if (scr != null)
            {
                senderName = "s:" + scr.Name + ", ";
            }

            if (args.IsVerboseLevel)
            {
                Log.Comment("  Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                Log.Comment("  Info:    " + senderName + "m:" + msg);
            }
        }

void SetupDefaultUIWithListView | ( | ParallaxView | parallaxView,
 |  | Rectangle | rectanglePVChild,
 |  | ListView | listView,
 |  | AutoResetEvent | parallaxViewLoadedEvent,
 |  | AutoResetEvent | listViewLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 1272 of file ParallaxViewTests.cs.

        {
            Log.Comment("Setting up default UI with ParallaxView and ListView");

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            Verify.IsNotNull(listView);
            if (string.IsNullOrEmpty(listView.Name))
            {
                listView.Name = "listView";
            }
            listView.Width = c_defaultUIScrollViewerWidth;
            listView.Height = c_defaultUIScrollViewerHeight;

            for (int listViewItemIndex = 0; listViewItemIndex < 32; listViewItemIndex++)
            {
                listView.Items.Add("Item #" + listViewItemIndex);
            }

            Verify.IsNotNull(rectanglePVChild);
            rectanglePVChild.Width = c_defaultUIScrollViewerWidth + c_defaultHorizontalShift;
            rectanglePVChild.Height = c_defaultUIScrollViewerHeight + c_defaultVerticalShift;
            rectanglePVChild.Fill = twoColorLGB;

            Verify.IsNotNull(parallaxView);
            parallaxView.Width = c_defaultUIScrollViewerWidth;
            parallaxView.Height = c_defaultUIScrollViewerHeight;
            parallaxView.Child = rectanglePVChild;
            parallaxView.VerticalShift = c_defaultUIVerticalShift;

            StackPanel stackPanel = new StackPanel();
            Verify.IsNotNull(stackPanel);
            stackPanel.Children.Add(parallaxView);
            stackPanel.Children.Add(listView);

            if (parallaxViewLoadedEvent != null)
            {
                parallaxView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ParallaxView.Loaded event handler");
                    parallaxViewLoadedEvent.Set();
                };
            }

            if (listViewLoadedEvent != null)
            {
                listView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ListView.Loaded event handler");
                    parallaxView.Source = listView;
                    listViewLoadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = stackPanel;
        }

void SetupDefaultUIWithScrollPresenter | ( | ParallaxView | parallaxView,
 |  | Rectangle | rectanglePVChild,
 |  | ScrollPresenter | scrollPresenter,
 |  | Rectangle | rectangleScrollPresenterContent,
 |  | AutoResetEvent | parallaxViewLoadedEvent,
 |  | AutoResetEvent | scrollPresenterLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 1416 of file ParallaxViewTests.cs.

        {
            Log.Comment("Setting up default UI with ParallaxView, ScrollPresenter and Rectangles");

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            Verify.IsNotNull(rectangleScrollPresenterContent);
            rectangleScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth;
            rectangleScrollPresenterContent.Height = c_defaultUIScrollPresenterContentHeight;
            rectangleScrollPresenterContent.Fill = twoColorLGB;

            Verify.IsNotNull(scrollPresenter);
            if (string.IsNullOrEmpty(scrollPresenter.Name))
            {
                scrollPresenter.Name = "scrollPresenter";
            }
            scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
            scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
            scrollPresenter.ZoomMode = ScrollingZoomMode.Disabled;
            scrollPresenter.Content = rectangleScrollPresenterContent;

            Verify.IsNotNull(rectanglePVChild);
            rectanglePVChild.Width = c_defaultUIScrollPresenterWidth + c_defaultHorizontalShift;
            rectanglePVChild.Height = c_defaultUIScrollPresenterHeight + c_defaultVerticalShift;
            rectanglePVChild.Fill = twoColorLGB;

            Verify.IsNotNull(parallaxView);
            parallaxView.Width = c_defaultUIScrollPresenterWidth;
            parallaxView.Height = c_defaultUIScrollPresenterHeight;
            parallaxView.Child = rectanglePVChild;
            parallaxView.HorizontalShift = c_defaultUIHorizontalShift;
            parallaxView.VerticalShift = c_defaultUIVerticalShift;

            StackPanel stackPanel = new StackPanel();
            Verify.IsNotNull(stackPanel);
            stackPanel.Children.Add(parallaxView);
            stackPanel.Children.Add(scrollPresenter);

            if (parallaxViewLoadedEvent != null)
            {
                parallaxView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ParallaxView.Loaded event handler");
                    parallaxViewLoadedEvent.Set();
                };
            }

            if (scrollPresenterLoadedEvent != null)
            {
                scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.Loaded event handler");
                    parallaxView.Source = scrollPresenter;
                    scrollPresenterLoadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = stackPanel;
        }

void SetupDefaultUIWithScrollViewer | ( | ParallaxView | parallaxView,
 |  | Rectangle | rectanglePVChild,
 |  | ScrollViewer | scrollViewer,
 |  | Rectangle | rectangleSVContent,
 |  | AutoResetEvent | parallaxViewLoadedEvent,
 |  | AutoResetEvent | scrollViewerLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 1341 of file ParallaxViewTests.cs.

        {
            Log.Comment("Setting up default UI with ParallaxView, ScrollViewer and Rectangles");

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            Verify.IsNotNull(rectangleSVContent);
            rectangleSVContent.Width = c_defaultUIScrollViewerContentWidth;
            rectangleSVContent.Height = c_defaultUIScrollViewerContentHeight;
            rectangleSVContent.Fill = twoColorLGB;

            Verify.IsNotNull(scrollViewer);
            if (string.IsNullOrEmpty(scrollViewer.Name))
            {
                scrollViewer.Name = "scrollViewer";
            }
            scrollViewer.Width = c_defaultUIScrollViewerWidth;
            scrollViewer.Height = c_defaultUIScrollViewerHeight;
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
            scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            scrollViewer.ZoomMode = Microsoft.UI.Xaml.Controls.ZoomMode.Disabled;
            scrollViewer.Content = rectangleSVContent;

            Verify.IsNotNull(rectanglePVChild);
            rectanglePVChild.Width = c_defaultUIScrollViewerWidth + c_defaultHorizontalShift;
            rectanglePVChild.Height = c_defaultUIScrollViewerHeight + c_defaultVerticalShift;
            rectanglePVChild.Fill = twoColorLGB;

            Verify.IsNotNull(parallaxView);
            parallaxView.Width = c_defaultUIScrollViewerWidth;
            parallaxView.Height = c_defaultUIScrollViewerHeight;
            parallaxView.Child = rectanglePVChild;
            parallaxView.HorizontalShift = c_defaultUIHorizontalShift;
            parallaxView.VerticalShift = c_defaultUIVerticalShift;

            StackPanel stackPanel = new StackPanel();
            Verify.IsNotNull(stackPanel);
            stackPanel.Children.Add(parallaxView);
            stackPanel.Children.Add(scrollViewer);

            if (parallaxViewLoadedEvent != null)
            {
                parallaxView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ParallaxView.Loaded event handler");
                    parallaxViewLoadedEvent.Set();
                };
            }

            if (scrollViewerLoadedEvent != null)
            {
                scrollViewer.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollViewer.Loaded event handler");
                    parallaxView.Source = scrollViewer;
                    scrollViewerLoadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = stackPanel;
        }

void SetupUIWithParallaxViewInsideScrollPresenter | ( | ParallaxView | parallaxView,
 |  | Rectangle | rectanglePVChild,
 |  | ScrollPresenter | scrollPresenter,
 |  | AutoResetEvent | parallaxViewLoadedEvent,
 |  | AutoResetEvent | scrollPresenterLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 1489 of file ParallaxViewTests.cs.

        {
            Log.Comment("Setting up UI with ParallaxView inside ScrollPresenter");

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            Verify.IsNotNull(scrollPresenter);
            if (string.IsNullOrEmpty(scrollPresenter.Name))
            {
                scrollPresenter.Name = "scrollPresenter";
            }
            scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
            scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
            scrollPresenter.ZoomMode = ScrollingZoomMode.Disabled;

            Grid gridScrollPresenterContent = new Grid();
            scrollPresenter.Content = gridScrollPresenterContent;

            Verify.IsNotNull(rectanglePVChild);
            rectanglePVChild.Width = c_defaultUIScrollPresenterContentWidth + c_defaultUIHorizontalShift;
            rectanglePVChild.Height = c_defaultUIScrollPresenterContentHeight + c_defaultUIVerticalShift;
            rectanglePVChild.Fill = twoColorLGB;

            Verify.IsNotNull(parallaxView);
            parallaxView.Width = c_defaultUIScrollPresenterContentWidth;
            parallaxView.Height = c_defaultUIScrollPresenterContentHeight;
            parallaxView.Child = rectanglePVChild;
            parallaxView.HorizontalShift = c_defaultUIHorizontalShift;
            parallaxView.VerticalShift = c_defaultUIVerticalShift;

            gridScrollPresenterContent.Children.Add(parallaxView);

            if (parallaxViewLoadedEvent != null)
            {
                parallaxView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ParallaxView.Loaded event handler");
                    parallaxViewLoadedEvent.Set();
                };
            }

            if (scrollPresenterLoadedEvent != null)
            {
                scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.Loaded event handler");
                    parallaxView.Source = scrollPresenter;
                    scrollPresenterLoadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = scrollPresenter;
        }

void SetupUIWithParallaxViewInsideScrollViewer | ( | double | verticalParallaxViewOffset,
 |  | ParallaxView | parallaxView,
 |  | Rectangle | rectanglePVChild,
 |  | ScrollViewer | scrollViewer,
 |  | StackPanel | stackPanelSVContent,
 |  | AutoResetEvent | parallaxViewLoadedEvent,
 |  | AutoResetEvent | scrollViewerLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 1555 of file ParallaxViewTests.cs.

        {
            Log.Comment("Setting up UI with ParallaxView inside ScrollViewer");

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            Verify.IsNotNull(stackPanelSVContent);
            stackPanelSVContent.Width = c_defaultUIScrollViewerWidth;

            if (verticalParallaxViewOffset > 0.0)
            {
                Rectangle rectangleChild = new Rectangle() { Width = c_defaultUIScrollViewerWidth, Height = verticalParallaxViewOffset, Fill = twoColorLGB };
                stackPanelSVContent.Children.Add(rectangleChild);
            }

            Verify.IsNotNull(rectanglePVChild);
            rectanglePVChild.Width = c_defaultUIScrollViewerWidth;
            rectanglePVChild.Height = c_defaultUIScrollViewerHeight / 2.0 + c_defaultUIVerticalShift;
            rectanglePVChild.Fill = twoColorLGB;

            Verify.IsNotNull(parallaxView);
            parallaxView.Width = c_defaultUIScrollViewerWidth;
            parallaxView.Height = c_defaultUIScrollViewerHeight / 2.0;
            parallaxView.Child = rectanglePVChild;
            parallaxView.VerticalShift = c_defaultUIVerticalShift;
            parallaxView.MaxVerticalShiftRatio = c_defaultMaxVerticalShiftRatio;

            stackPanelSVContent.Children.Add(parallaxView);

            for (int childRect = 0; childRect < 3; childRect++)
            {
                Rectangle rectangleChild = new Rectangle() { Width = c_defaultUIScrollViewerWidth, Height = c_defaultUIScrollViewerHeight, Fill = twoColorLGB };
                stackPanelSVContent.Children.Add(rectangleChild);
            }

            Verify.IsNotNull(scrollViewer);
            scrollViewer.Width = c_defaultUIScrollViewerWidth;
            scrollViewer.Height = c_defaultUIScrollViewerHeight;
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
            scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            scrollViewer.ZoomMode = Microsoft.UI.Xaml.Controls.ZoomMode.Disabled;
            scrollViewer.Content = stackPanelSVContent;

            if (parallaxViewLoadedEvent != null)
            {
                parallaxView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ParallaxView.Loaded event handler");
                    parallaxViewLoadedEvent.Set();
                };
            }

            if (scrollViewerLoadedEvent != null)
            {
                scrollViewer.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollViewer.Loaded event handler");
                    parallaxView.Source = scrollViewer;
                    scrollViewerLoadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = scrollViewer;
        }

void VerifyBasicParallaxingInsideScroller ( ) [inline]

Definition at line 828 of file ParallaxViewTests.cs.

        {
            VerifyParallaxingWithParallaxViewInsideScrollPresenter(
                scrollPresenterHorizontalOffset: 0.0,
                scrollPresenterVerticalOffset: 0.0,
                expectedHorizontalShift: c_defaultUIHorizontalShift / 4.5,
                expectedVerticalShift: c_defaultUIVerticalShift / 4.5);

            VerifyParallaxingWithParallaxViewInsideScrollPresenter(
                scrollPresenterHorizontalOffset: c_defaultUIFinalScrollPresenterHorizontalOffset,
                scrollPresenterVerticalOffset: c_defaultUIFinalScrollPresenterVerticalOffset,
                expectedHorizontalShift: (c_defaultUIHorizontalShift + c_defaultUIFinalScrollPresenterHorizontalOffset / 4.0) / 4.5,
                expectedVerticalShift: (c_defaultUIVerticalShift + c_defaultUIFinalScrollPresenterVerticalOffset / 4.0) / 4.5);
        }

void VerifyBasicParallaxingInsideScrollViewer ( ) [inline]

Definition at line 798 of file ParallaxViewTests.cs.

        {
            double expectedVerticalShift =
                c_defaultUIVerticalShift * (1.0 - (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio / ((2.0 * c_scrollViewerMaxOverpanRatio + 1.5) * c_defaultUIScrollViewerHeight)));

            VerifyParallaxingWithParallaxViewInsideScrollViewer(
                verticalSourceOffsetKind: ParallaxSourceOffsetKind.Relative,
                verticalSourceStartOffset: 0.0,
                verticalSourceEndOffset: 0.0,
                maxVerticalShiftRatio: 1.0,
                verticalParallaxViewOffset: 0.0,
                isVerticalShiftClamped: true,
                expectedVerticalShift: expectedVerticalShift);

            const double verticalParallaxViewOffset = 75.0;
            expectedVerticalShift =
                c_defaultUIVerticalShift * (1.0 - ((c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio + verticalParallaxViewOffset) / ((2.0 * c_scrollViewerMaxOverpanRatio + 1.5) * c_defaultUIScrollViewerHeight)));

            VerifyParallaxingWithParallaxViewInsideScrollViewer(
                verticalSourceOffsetKind: ParallaxSourceOffsetKind.Relative,
                verticalSourceStartOffset: 0.0,
                verticalSourceEndOffset: 0.0,
                maxVerticalShiftRatio: 1.0,
                verticalParallaxViewOffset: verticalParallaxViewOffset,
                isVerticalShiftClamped: true,
                expectedVerticalShift: expectedVerticalShift);
        }

void VerifyBasicParallaxingWithListView ( ) [inline]

Definition at line 165 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ListView listView = null;
            ScrollViewer scrollViewer = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent sourceLoadedEvent = null;
            float? finalHorizontalShift = 0f;
            float? finalVerticalShift = 0f;
            double expectedVerticalShift = 0.0;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                sourceLoadedEvent = new AutoResetEvent(false);
                listView = new ListView();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                SetupDefaultUIWithListView(
                    parallaxView, rectanglePVChild, listView,
                    parallaxViewLoadedEvent, sourceLoadedEvent);

                parallaxView.VerticalSourceOffsetKind = c_defaultVerticalSourceOffsetKind;
                parallaxView.VerticalSourceStartOffset = c_defaultVerticalSourceStartOffset;
                parallaxView.VerticalSourceEndOffset = c_defaultVerticalSourceEndOffset;
                parallaxView.MaxVerticalShiftRatio = c_defaultMaxVerticalShiftRatio;
                parallaxView.IsVerticalShiftClamped = c_defaultIsVerticalShiftClamped;
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            sourceLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                // Locate ListView's inner ScrollViewer
                scrollViewer = FindInnerScrollViewer(listView);

                expectedVerticalShift =
                    (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerVerticalOffset) * c_defaultUIVerticalShift /
                    (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio * 2.0 + ((scrollViewer.Content as FrameworkElement).ActualHeight - c_defaultUIScrollViewerHeight));

                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            ChangeScrollViewerView(
                scrollViewer: scrollViewer,
                horizontalOffset: 0.0,
                verticalOffset: c_defaultUIFinalScrollViewerVerticalOffset,
                zoomFactor: 1.0f,
                disableAnimation: false,
                visualPPChild: visualPPChild,
                finalHorizontalShift: ref finalHorizontalShift,
                finalVerticalShift: ref finalVerticalShift);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Validating the final parallax amount of the target Rectangle.");
                Log.Comment("expectedHorizontalShift=0, finalHorizontalShift={0}", finalHorizontalShift);
                Log.Comment("expectedVerticalShift={0}, finalVerticalShift={1}", -expectedVerticalShift, finalVerticalShift);
                Verify.AreEqual(finalHorizontalShift, 0);
                Verify.IsTrue(Math.Abs((double)finalVerticalShift + expectedVerticalShift) < 0.00001);
            });
        }

void VerifyBasicParallaxingWithScroller ( ) [inline]

Definition at line 267 of file ParallaxViewTests.cs.

        {
            const double expectedHorizontalShift =
                (c_defaultUIScrollPresenterWidth * c_scrollPresenterMaxOverpanRatio + c_defaultUIFinalScrollPresenterHorizontalOffset) * c_defaultUIHorizontalShift /
                (c_defaultUIScrollPresenterWidth * c_scrollPresenterMaxOverpanRatio * 2.0 + (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth));
            const double expectedVerticalShift =
                (c_defaultUIScrollPresenterHeight * c_scrollPresenterMaxOverpanRatio + c_defaultUIFinalScrollPresenterVerticalOffset) * c_defaultUIVerticalShift /
                (c_defaultUIScrollPresenterHeight * c_scrollPresenterMaxOverpanRatio * 2.0 + (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight));

            VerifyParallaxingWithDefaultSourceUI(
                sourceType: SourceType.ScrollPresenter,
                horizontalSourceOffsetKind: c_defaultHorizontalSourceOffsetKind,
                horizontalSourceStartOffset: c_defaultHorizontalSourceStartOffset,
                horizontalSourceEndOffset: c_defaultHorizontalSourceEndOffset,
                maxHorizontalShiftRatio: c_defaultMaxHorizontalShiftRatio,
                isHorizontalShiftClamped: c_defaultIsHorizontalShiftClamped,
                expectedHorizontalShift: expectedHorizontalShift,
                verticalSourceOffsetKind: c_defaultVerticalSourceOffsetKind,
                verticalSourceStartOffset: c_defaultVerticalSourceStartOffset,
                verticalSourceEndOffset: c_defaultVerticalSourceEndOffset,
                maxVerticalShiftRatio: c_defaultMaxVerticalShiftRatio,
                isVerticalShiftClamped: c_defaultIsVerticalShiftClamped,
                expectedVerticalShift: expectedVerticalShift);
        }

void VerifyBasicParallaxingWithScrollViewer ( ) [inline]

Definition at line 240 of file ParallaxViewTests.cs.

        {
            const double expectedHorizontalShift =
                (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerHorizontalOffset) * c_defaultUIHorizontalShift /
                (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatio * 2.0 + (c_defaultUIScrollViewerContentWidth - c_defaultUIScrollViewerWidth));
            const double expectedVerticalShift =
                (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerVerticalOffset) * c_defaultUIVerticalShift /
                (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio * 2.0 + (c_defaultUIScrollViewerContentHeight - c_defaultUIScrollViewerHeight));

            VerifyParallaxingWithDefaultSourceUI(
                sourceType: SourceType.ScrollViewer,
                horizontalSourceOffsetKind: c_defaultHorizontalSourceOffsetKind,
                horizontalSourceStartOffset: c_defaultHorizontalSourceStartOffset,
                horizontalSourceEndOffset: c_defaultHorizontalSourceEndOffset,
                maxHorizontalShiftRatio: c_defaultMaxHorizontalShiftRatio,
                isHorizontalShiftClamped: c_defaultIsHorizontalShiftClamped,
                expectedHorizontalShift: expectedHorizontalShift,
                verticalSourceOffsetKind: c_defaultVerticalSourceOffsetKind,
                verticalSourceStartOffset: c_defaultVerticalSourceStartOffset,
                verticalSourceEndOffset: c_defaultVerticalSourceEndOffset,
                maxVerticalShiftRatio: c_defaultMaxVerticalShiftRatio,
                isVerticalShiftClamped: c_defaultIsVerticalShiftClamped,
                expectedVerticalShift: expectedVerticalShift);
        }

void VerifyDefaultPropertyValues ( ) [inline]

Definition at line 80 of file ParallaxViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ParallaxView parallaxView = new ParallaxView();
                Verify.IsNotNull(parallaxView);

                Log.Comment("Verifying ParallaxView default property values");
                Verify.IsNull(parallaxView.Child);
                Verify.IsNull(parallaxView.Source);
                Verify.AreEqual(parallaxView.HorizontalSourceOffsetKind, c_defaultHorizontalSourceOffsetKind);
                Verify.AreEqual(parallaxView.HorizontalSourceStartOffset, c_defaultHorizontalSourceStartOffset);
                Verify.AreEqual(parallaxView.HorizontalSourceEndOffset, c_defaultHorizontalSourceEndOffset);
                Verify.AreEqual(parallaxView.MaxHorizontalShiftRatio, c_defaultMaxHorizontalShiftRatio);
                Verify.AreEqual(parallaxView.HorizontalShift, c_defaultHorizontalShift);
                Verify.AreEqual(parallaxView.IsHorizontalShiftClamped, c_defaultIsHorizontalShiftClamped);
                Verify.AreEqual(parallaxView.VerticalSourceOffsetKind, c_defaultVerticalSourceOffsetKind);
                Verify.AreEqual(parallaxView.VerticalSourceStartOffset, c_defaultVerticalSourceStartOffset);
                Verify.AreEqual(parallaxView.VerticalSourceEndOffset, c_defaultVerticalSourceEndOffset);
                Verify.AreEqual(parallaxView.MaxVerticalShiftRatio, c_defaultMaxVerticalShiftRatio);
                Verify.AreEqual(parallaxView.VerticalShift, c_defaultVerticalShift);
                Verify.AreEqual(parallaxView.IsVerticalShiftClamped, c_defaultIsVerticalShiftClamped);
            });
        }

void VerifyHeaderParallaxingInsideScrollViewer ( ) [inline]

Definition at line 845 of file ParallaxViewTests.cs.

        {
            VerifyParallaxingWithParallaxViewInsideScrollViewer(
                verticalSourceOffsetKind: ParallaxSourceOffsetKind.Absolute,
                verticalSourceStartOffset: 0.0,
                verticalSourceEndOffset: c_defaultUIScrollViewerHeight / 2.0,
                maxVerticalShiftRatio: 1.0,
                verticalParallaxViewOffset: 0.0,
                isVerticalShiftClamped: true,
                expectedVerticalShift: c_defaultUIVerticalShift);
        }

void VerifyParallaxingWithAbsoluteExtremes ( ) [inline]

Definition at line 294 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollViewer scrollViewer = null;
            Rectangle rectangleSVContent = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent scrollViewerLoadedEvent = null;
            float? finalHorizontalShift = null;
            float? finalVerticalShift = null;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                scrollViewerLoadedEvent = new AutoResetEvent(false);
                rectangleSVContent = new Rectangle();
                scrollViewer = new ScrollViewer();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                SetupDefaultUIWithScrollViewer(
                    parallaxView, rectanglePVChild, scrollViewer, rectangleSVContent,
                    parallaxViewLoadedEvent, scrollViewerLoadedEvent);

                parallaxView.HorizontalSourceOffsetKind = ParallaxSourceOffsetKind.Absolute;
                parallaxView.HorizontalSourceStartOffset = 40.0;
                parallaxView.HorizontalSourceEndOffset = 920.0;
                parallaxView.VerticalSourceOffsetKind = ParallaxSourceOffsetKind.Absolute;
                parallaxView.VerticalSourceStartOffset = -30.0;
                parallaxView.VerticalSourceEndOffset = 560.0;
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            scrollViewerLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            ChangeScrollViewerView(
                scrollViewer: scrollViewer,
                horizontalOffset: c_defaultUIFinalScrollViewerHorizontalOffset,
                verticalOffset: c_defaultUIFinalScrollViewerVerticalOffset,
                zoomFactor: 1.0f,
                disableAnimation: false,
                visualPPChild: null,
                finalHorizontalShift: ref finalHorizontalShift,
                finalVerticalShift: ref finalVerticalShift);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                // Validate the final parallax amount of the target Rectangle.
                double expectedHorizontalShift =
                    (scrollViewer.HorizontalOffset - parallaxView.HorizontalSourceStartOffset) * parallaxView.HorizontalShift / (parallaxView.HorizontalSourceEndOffset - parallaxView.HorizontalSourceStartOffset);
                double expectedVerticalShift =
                    (scrollViewer.VerticalOffset - parallaxView.VerticalSourceStartOffset) * parallaxView.VerticalShift / (parallaxView.VerticalSourceEndOffset - parallaxView.VerticalSourceStartOffset);

                float offset;
                CompositionGetValueStatus status;

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, offset);
                Log.Comment("expectedHorizontalShift={0}", -expectedHorizontalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedHorizontalShift, c_shiftTolerance));

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, offset);
                Log.Comment("expectedVerticalShift={0}", -expectedVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedVerticalShift, c_shiftTolerance));
            });
        }

void VerifyParallaxingWithClamping ( ) [inline]

Definition at line 582 of file ParallaxViewTests.cs.

        {
            VerifyParallaxingWithDefaultSourceUI(
                sourceType: SourceType.ScrollViewer,
                horizontalSourceOffsetKind: ParallaxSourceOffsetKind.Absolute,
                horizontalSourceStartOffset: 40.0,
                horizontalSourceEndOffset: 60.0,
                maxHorizontalShiftRatio: 5.0 ,
                isHorizontalShiftClamped: true,
                expectedHorizontalShift: c_defaultUIHorizontalShift,
                verticalSourceOffsetKind: ParallaxSourceOffsetKind.Absolute,
                verticalSourceStartOffset: 10.0,
                verticalSourceEndOffset: 30.0,
                maxVerticalShiftRatio: 2.5,
                isVerticalShiftClamped: true,
                expectedVerticalShift: c_defaultUIVerticalShift);
        }

void VerifyParallaxingWithDefaultSourceUI | ( | SourceType | sourceType,
 |  | ParallaxSourceOffsetKind | horizontalSourceOffsetKind,
 |  | double | horizontalSourceStartOffset,
 |  | double | horizontalSourceEndOffset,
 |  | double | maxHorizontalShiftRatio,
 |  | bool | isHorizontalShiftClamped,
 |  | double | expectedHorizontalShift,
 |  | ParallaxSourceOffsetKind | verticalSourceOffsetKind,
 |  | double | verticalSourceStartOffset,
 |  | double | verticalSourceEndOffset,
 |  | double | maxVerticalShiftRatio,
 |  | bool | isVerticalShiftClamped,
 |  | double | expectedVerticalShift |
 | ) |  |  | [inline, private]

Definition at line 967 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollViewer scrollViewer = null;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleSVContent = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent sourceLoadedEvent = null;
            float? finalHorizontalShift = 0f;
            float? finalVerticalShift = 0f;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                sourceLoadedEvent = new AutoResetEvent(false);
                rectangleSVContent = new Rectangle();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                if (sourceType == SourceType.ScrollViewer)
                {
                    scrollViewer = new ScrollViewer();
                    SetupDefaultUIWithScrollViewer(
                        parallaxView, rectanglePVChild, scrollViewer, rectangleSVContent,
                        parallaxViewLoadedEvent, sourceLoadedEvent);
                }
                else
                {
                    scrollPresenter = new ScrollPresenter();
                    SetupDefaultUIWithScrollPresenter(
                        parallaxView, rectanglePVChild, scrollPresenter, rectangleSVContent,
                        parallaxViewLoadedEvent, sourceLoadedEvent);
                }

                parallaxView.HorizontalSourceOffsetKind = horizontalSourceOffsetKind;
                parallaxView.HorizontalSourceStartOffset = horizontalSourceStartOffset;
                parallaxView.HorizontalSourceEndOffset = horizontalSourceEndOffset;
                parallaxView.MaxHorizontalShiftRatio = maxHorizontalShiftRatio;
                parallaxView.IsHorizontalShiftClamped = isHorizontalShiftClamped;
                parallaxView.VerticalSourceOffsetKind = verticalSourceOffsetKind;
                parallaxView.VerticalSourceStartOffset = verticalSourceStartOffset;
                parallaxView.VerticalSourceEndOffset = verticalSourceEndOffset;
                parallaxView.MaxVerticalShiftRatio = maxVerticalShiftRatio;
                parallaxView.IsVerticalShiftClamped = isVerticalShiftClamped;
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            sourceLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            if (sourceType == SourceType.ScrollViewer)
            {
                ChangeScrollViewerView(
                    scrollViewer: scrollViewer,
                    horizontalOffset: c_defaultUIFinalScrollViewerHorizontalOffset,
                    verticalOffset: c_defaultUIFinalScrollViewerVerticalOffset,
                    zoomFactor: 1.0f,
                    disableAnimation: false,
                    visualPPChild: visualPPChild,
                    finalHorizontalShift: ref finalHorizontalShift,
                    finalVerticalShift: ref finalVerticalShift);
            }
            else
            {
                ChangeScrollPresenterView(
                    scrollPresenter: scrollPresenter,
                    horizontalOffset: c_defaultUIFinalScrollPresenterHorizontalOffset,
                    verticalOffset: c_defaultUIFinalScrollPresenterVerticalOffset,
                    zoomFactor: 1.0f,
                    disableAnimation: false,
                    visualPPChild: visualPPChild,
                    finalHorizontalShift: ref finalHorizontalShift,
                    finalVerticalShift: ref finalVerticalShift);
            }

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Validating the final parallax amount of the target Rectangle.");
                Log.Comment("expectedHorizontalShift={0}, finalHorizontalShift={1}", -expectedHorizontalShift, finalHorizontalShift);
                Log.Comment("expectedVerticalShift={0}, finalVerticalShift={1}", -expectedVerticalShift, finalVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance((float)finalHorizontalShift, (float)-expectedHorizontalShift, c_shiftTolerance));
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance((float)finalVerticalShift, (float)-expectedVerticalShift, c_shiftTolerance));
            });
        }

void VerifyParallaxingWithMaxRatios ( ) [inline]

Definition at line 522 of file ParallaxViewTests.cs.

        {
            const double maxHorizontalShiftRatio = 0.01;
            const double maxVerticalShiftRatio = 0.02;

            const double expectedHorizontalShift =
                (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerHorizontalOffset) * maxHorizontalShiftRatio;
            const double expectedVerticalShift =
                (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerVerticalOffset) * maxVerticalShiftRatio;

            VerifyParallaxingWithDefaultSourceUI(
                sourceType: SourceType.ScrollViewer,
                horizontalSourceOffsetKind: c_defaultHorizontalSourceOffsetKind,
                horizontalSourceStartOffset: c_defaultHorizontalSourceStartOffset,
                horizontalSourceEndOffset: c_defaultHorizontalSourceEndOffset,
                maxHorizontalShiftRatio: maxHorizontalShiftRatio,
                isHorizontalShiftClamped: c_defaultIsHorizontalShiftClamped,
                expectedHorizontalShift: expectedHorizontalShift,
                verticalSourceOffsetKind: c_defaultVerticalSourceOffsetKind,
                verticalSourceStartOffset: c_defaultVerticalSourceStartOffset,
                verticalSourceEndOffset: c_defaultVerticalSourceEndOffset,
                maxVerticalShiftRatio: maxVerticalShiftRatio,
                isVerticalShiftClamped: c_defaultIsVerticalShiftClamped,
                expectedVerticalShift: expectedVerticalShift);
        }

void VerifyParallaxingWithoutClamping ( ) [inline]

Definition at line 550 of file ParallaxViewTests.cs.

        {
            const double horizontalSourceStartOffset = 40.0;
            const double horizontalSourceEndOffset = 60.0;
            const double maxHorizontalShiftRatio = 5.0;
            const double verticalSourceStartOffset = 10.0;
            const double verticalSourceEndOffset = 30.0;
            const double maxVerticalShiftRatio = 2.5;

            const double expectedHorizontalShift =
                (c_defaultUIFinalScrollViewerHorizontalOffset - horizontalSourceStartOffset) * c_defaultUIHorizontalShift / (horizontalSourceEndOffset - horizontalSourceStartOffset);
            const double expectedVerticalShift =
                (c_defaultUIFinalScrollViewerVerticalOffset - verticalSourceStartOffset) * c_defaultUIVerticalShift / (verticalSourceEndOffset - verticalSourceStartOffset);

            VerifyParallaxingWithDefaultSourceUI(
                sourceType: SourceType.ScrollViewer,
                horizontalSourceOffsetKind: ParallaxSourceOffsetKind.Absolute,
                horizontalSourceStartOffset: horizontalSourceStartOffset,
                horizontalSourceEndOffset: horizontalSourceEndOffset,
                maxHorizontalShiftRatio: maxHorizontalShiftRatio,
                isHorizontalShiftClamped: false,
                expectedHorizontalShift: expectedHorizontalShift,
                verticalSourceOffsetKind: ParallaxSourceOffsetKind.Absolute,
                verticalSourceStartOffset: verticalSourceStartOffset,
                verticalSourceEndOffset: verticalSourceEndOffset,
                maxVerticalShiftRatio: maxVerticalShiftRatio,
                isVerticalShiftClamped: false,
                expectedVerticalShift: expectedVerticalShift);
        }

void VerifyParallaxingWithParallaxViewInsideScrollPresenter | ( | double | scrollPresenterHorizontalOffset,
 |  | double | scrollPresenterVerticalOffset,
 |  | double | expectedHorizontalShift,
 |  | double | expectedVerticalShift |
 | ) |  |  | [inline, private]

Definition at line 1157 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollPresenter scrollPresenter = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent scrollPresenterLoadedEvent = null;
            float? finalHorizontalShift = 0f;
            float? finalVerticalShift = 0f;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                scrollPresenterLoadedEvent = new AutoResetEvent(false);
                scrollPresenter = new ScrollPresenter();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                SetupUIWithParallaxViewInsideScrollPresenter(
                    parallaxView,
                    rectanglePVChild,
                    scrollPresenter,
                    parallaxViewLoadedEvent,
                    scrollPresenterLoadedEvent);
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            scrollPresenterLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("scrollPresenter Actual Size={0}, {1}", scrollPresenter.ActualWidth, scrollPresenter.ActualHeight);
                Log.Comment("parallaxView Actual Size={0}, {1}", parallaxView.ActualWidth, parallaxView.ActualHeight);
                Log.Comment("rectanglePVChild Actual Size={0}, {1}", rectanglePVChild.ActualWidth, rectanglePVChild.ActualHeight);

                Verify.AreEqual(scrollPresenter.ActualWidth, c_defaultUIScrollPresenterWidth);
                Verify.AreEqual(scrollPresenter.ActualHeight, c_defaultUIScrollPresenterHeight);

                Verify.AreEqual(parallaxView.ActualWidth, c_defaultUIScrollPresenterContentWidth);
                Verify.AreEqual(parallaxView.ActualHeight, c_defaultUIScrollPresenterContentHeight);

                Verify.AreEqual(rectanglePVChild.ActualWidth, c_defaultUIScrollPresenterContentWidth + c_defaultUIHorizontalShift);
                Verify.AreEqual(rectanglePVChild.ActualHeight, c_defaultUIScrollPresenterContentHeight + c_defaultUIVerticalShift);

                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            if (scrollPresenterHorizontalOffset != 0.0 || scrollPresenterVerticalOffset != 0.0)
            {
                ChangeScrollPresenterView(
                    scrollPresenter: scrollPresenter,
                    horizontalOffset: scrollPresenterHorizontalOffset,
                    verticalOffset: scrollPresenterVerticalOffset,
                    zoomFactor: null,
                    disableAnimation: false,
                    visualPPChild: visualPPChild,
                    finalHorizontalShift: ref finalHorizontalShift,
                    finalVerticalShift: ref finalVerticalShift);
            }
            else
            {
                Log.Comment("Waiting for captured properties to be updated");
                CompositionPropertySpy.SynchronouslyTickUIThread(10);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Cancelling spying");
                    CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                    CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
                });

                Log.Comment("Waiting for captured properties to be updated");
                CompositionPropertySpy.SynchronouslyTickUIThread(10);

                float horizontalShift = 0f;
                float verticalShift = 0f;

                RunOnUIThread.Execute(() =>
                {
                    CompositionGetValueStatus status;

                    Log.Comment("Accessing final shift values");

                        status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out horizontalShift);
                        Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, horizontalShift);
                        status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out verticalShift);
                        Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, verticalShift);
                });

                finalHorizontalShift = horizontalShift;
                finalVerticalShift = verticalShift;
            }

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Validating the final parallax amount of the target Rectangle.");
                Log.Comment("expectedHorizontalShift={0}, finalHorizontalShift={1}", -expectedHorizontalShift, finalHorizontalShift);
                Log.Comment("expectedVerticalShift={0}, finalVerticalShift={1}", -expectedVerticalShift, finalVerticalShift);

                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance((float)finalHorizontalShift, (float)-expectedHorizontalShift, c_shiftTolerance));
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance((float)finalVerticalShift, (float)-expectedVerticalShift, c_shiftTolerance));
            });
        }

void VerifyParallaxingWithParallaxViewInsideScrollViewer | ( | ParallaxSourceOffsetKind | verticalSourceOffsetKind,
 |  | double | verticalSourceStartOffset,
 |  | double | verticalSourceEndOffset,
 |  | double | maxVerticalShiftRatio,
 |  | double | verticalParallaxViewOffset,
 |  | bool | isVerticalShiftClamped,
 |  | double | expectedVerticalShift |
 | ) |  |  | [inline, private]

Definition at line 1077 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollViewer scrollViewer = null;
            StackPanel stackPanelSVContent = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent scrollViewerLoadedEvent = null;
            float? finalHorizontalShift = null;
            float? finalVerticalShift = 0f;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                scrollViewerLoadedEvent = new AutoResetEvent(false);
                stackPanelSVContent = new StackPanel();
                scrollViewer = new ScrollViewer();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                SetupUIWithParallaxViewInsideScrollViewer(
                    verticalParallaxViewOffset,
                    parallaxView, rectanglePVChild, scrollViewer, stackPanelSVContent,
                    parallaxViewLoadedEvent, scrollViewerLoadedEvent);

                parallaxView.VerticalSourceOffsetKind = verticalSourceOffsetKind;
                parallaxView.VerticalSourceStartOffset = verticalSourceStartOffset;
                parallaxView.VerticalSourceEndOffset = verticalSourceEndOffset;
                parallaxView.MaxVerticalShiftRatio = maxVerticalShiftRatio;
                parallaxView.IsVerticalShiftClamped = isVerticalShiftClamped;
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            scrollViewerLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(scrollViewer.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(scrollViewer.ActualHeight, c_defaultUIScrollViewerHeight);
                Verify.AreEqual(stackPanelSVContent.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(stackPanelSVContent.ActualHeight, c_defaultUIScrollViewerHeight * 3.5 + verticalParallaxViewOffset);
                Verify.AreEqual(parallaxView.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(parallaxView.ActualHeight, c_defaultUIScrollViewerHeight / 2.0);
                Verify.AreEqual(rectanglePVChild.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(rectanglePVChild.ActualHeight, c_defaultUIScrollViewerHeight / 2.0 + c_defaultUIVerticalShift);

                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            ChangeScrollViewerView(
                scrollViewer: scrollViewer,
                horizontalOffset: null,
                verticalOffset: c_defaultUIFinalScrollViewerVerticalOffset,
                zoomFactor: null,
                disableAnimation: false,
                visualPPChild: visualPPChild,
                finalHorizontalShift: ref finalHorizontalShift,
                finalVerticalShift: ref finalVerticalShift);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Validating the final parallax amount of the target Rectangle.");
                Log.Comment("expectedVerticalShift={0}, finalVerticalShift={1}", -expectedVerticalShift, finalVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance((float)finalVerticalShift, (float)-expectedVerticalShift, c_shiftTolerance));
            });
        }

void VerifyParallaxingWithSizeChanges ( ) [inline]

Definition at line 602 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollViewer scrollViewer = null;
            Rectangle rectangleSVContent = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent scrollViewerLoadedEvent = null;
            float? finalHorizontalShift = null;
            float? finalVerticalShift = null;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                scrollViewerLoadedEvent = new AutoResetEvent(false);
                rectangleSVContent = new Rectangle();
                scrollViewer = new ScrollViewer();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                SetupDefaultUIWithScrollViewer(
                    parallaxView, rectanglePVChild, scrollViewer, rectangleSVContent,
                    parallaxViewLoadedEvent, scrollViewerLoadedEvent);
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            scrollViewerLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            ChangeScrollViewerView(
                scrollViewer: scrollViewer,
                horizontalOffset: c_defaultUIFinalScrollViewerHorizontalOffset,
                verticalOffset: c_defaultUIFinalScrollViewerVerticalOffset,
                zoomFactor: 1.0f,
                disableAnimation: false,
                visualPPChild: null,
                finalHorizontalShift: ref finalHorizontalShift,
                finalVerticalShift: ref finalVerticalShift);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                // Validate the parallax amount of the target Rectangle.
                const double expectedHorizontalShift =
                    (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerHorizontalOffset) * c_defaultUIHorizontalShift /
                    (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatio * 2.0 + (c_defaultUIScrollViewerContentWidth - c_defaultUIScrollViewerWidth));
                const double expectedVerticalShift =
                    (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerVerticalOffset) * c_defaultUIVerticalShift /
                    (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio * 2.0 + (c_defaultUIScrollViewerContentHeight - c_defaultUIScrollViewerHeight));

                float offset;
                CompositionGetValueStatus status;

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, offset);
                Log.Comment("expectedHorizontalShift={0}", -expectedHorizontalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedHorizontalShift, c_shiftTolerance));

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, offset);
                Log.Comment("expectedVerticalShift={0}", -expectedVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedVerticalShift, c_shiftTolerance));

                Log.Comment("Decreasing the ScrollViewer's Width and increasing its Height");
                scrollViewer.Width -= 20.0;
                scrollViewer.Height += 20.0;

                Log.Comment("Setting up spy property set");
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                const double expectedHorizontalShift =
                    ((c_defaultUIScrollViewerWidth - 20.0) * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerHorizontalOffset) * c_defaultUIHorizontalShift /
                    ((c_defaultUIScrollViewerWidth - 20.0) * c_scrollViewerMaxOverpanRatio * 2.0 + (c_defaultUIScrollViewerContentWidth - (c_defaultUIScrollViewerWidth - 20.0)));
                const double expectedVerticalShift =
                    ((c_defaultUIScrollViewerHeight + 20.0) * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerVerticalOffset) * c_defaultUIVerticalShift /
                    ((c_defaultUIScrollViewerHeight + 20.0) * c_scrollViewerMaxOverpanRatio * 2.0 + (c_defaultUIScrollViewerContentHeight - (c_defaultUIScrollViewerHeight + 20.0)));

                // Validate the parallax amount of the target Rectangle.
                float offset;
                CompositionGetValueStatus status;

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, offset);
                Log.Comment("expectedHorizontalShift={0}", -expectedHorizontalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedHorizontalShift, c_shiftTolerance));

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, offset);
                Log.Comment("expectedVerticalShift={0}", -expectedVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedVerticalShift, c_shiftTolerance));

                Log.Comment("Decreasing the ScrollViewer.Content's Width and increasing its Height");
                rectangleSVContent.Width -= 20.0;
                rectangleSVContent.Height += 20.0;

                Log.Comment("Setting up spy property set");
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                const double expectedHorizontalShift =
                    ((c_defaultUIScrollViewerWidth - 20.0) * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerHorizontalOffset) * c_defaultUIHorizontalShift /
                    ((c_defaultUIScrollViewerWidth - 20.0) * c_scrollViewerMaxOverpanRatio * 2.0 + ((c_defaultUIScrollViewerContentWidth - 20.0) - (c_defaultUIScrollViewerWidth - 20.0)));
                const double expectedVerticalShift =
                    ((c_defaultUIScrollViewerHeight + 20.0) * c_scrollViewerMaxOverpanRatio + c_defaultUIFinalScrollViewerVerticalOffset) * c_defaultUIVerticalShift /
                    ((c_defaultUIScrollViewerHeight + 20.0) * c_scrollViewerMaxOverpanRatio * 2.0 + ((c_defaultUIScrollViewerContentHeight + 20.0) - (c_defaultUIScrollViewerHeight + 20.0)));

                // Validate the parallax amount of the target Rectangle.
                float offset;
                CompositionGetValueStatus status;

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, offset);
                Log.Comment("expectedHorizontalShift={0}", -expectedHorizontalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedHorizontalShift, c_shiftTolerance));

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, offset);
                Log.Comment("expectedVerticalShift={0}", -expectedVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedVerticalShift, c_shiftTolerance));
            });
        }

void VerifyParallaxingWithZooming ( ) [inline]

Definition at line 389 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollViewer scrollViewer = null;
            Rectangle rectangleSVContent = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent scrollViewerLoadedEvent = null;
            float? finalHorizontalShift = null;
            float? finalVerticalShift = null;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                scrollViewerLoadedEvent = new AutoResetEvent(false);
                rectangleSVContent = new Rectangle();
                scrollViewer = new ScrollViewer();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                SetupDefaultUIWithScrollViewer(
                    parallaxView, rectanglePVChild, scrollViewer, rectangleSVContent,
                    parallaxViewLoadedEvent, scrollViewerLoadedEvent);

                scrollViewer.ZoomMode = Microsoft.UI.Xaml.Controls.ZoomMode.Enabled;
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            scrollViewerLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                // Validate the initial parallax amount of the target Rectangle.
                const double expectedHorizontalShift =
                    c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatioWithZoom * c_defaultUIHorizontalShift /
                    (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatioWithZoom * 2.0 + (c_defaultUIScrollViewerContentWidth - c_defaultUIScrollViewerWidth));
                const double expectedVerticalShift =
                    c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatioWithZoom * c_defaultUIVerticalShift /
                    (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatioWithZoom * 2.0 + (c_defaultUIScrollViewerContentHeight - c_defaultUIScrollViewerHeight));

                float offset;
                CompositionGetValueStatus status;

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out offset);
                Log.Comment("Target transform before view change: status={0}, horizontal offset={1}", status, offset);
                Log.Comment("expectedHorizontalShift={0}", -expectedHorizontalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedHorizontalShift, c_shiftTolerance));

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out offset);
                Log.Comment("Target transform before view change: status={0}, vertical offset={1}", status, offset);
                Log.Comment("expectedVerticalShift={0}", -expectedVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedVerticalShift, c_shiftTolerance));

                Log.Comment("Start spying again");
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            ChangeScrollViewerView(
                scrollViewer: scrollViewer,
                horizontalOffset: c_defaultUIFinalScrollViewerHorizontalOffset,
                verticalOffset: c_defaultUIFinalScrollViewerVerticalOffset,
                zoomFactor: 2.0f,
                disableAnimation: false,
                visualPPChild: null,
                finalHorizontalShift: ref finalHorizontalShift,
                finalVerticalShift: ref finalVerticalShift);

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualHorizontalTargetedPropertyName());
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                // Validate the final parallax amount of the target Rectangle.
                const double expectedHorizontalShift =
                    (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatioWithZoom + c_defaultUIFinalScrollViewerHorizontalOffset) * c_defaultUIHorizontalShift /
                    (c_defaultUIScrollViewerWidth * c_scrollViewerMaxOverpanRatioWithZoom * 2.0 + (c_defaultUIScrollViewerContentWidth * 2.0 - c_defaultUIScrollViewerWidth));
                const double expectedVerticalShift =
                    (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatioWithZoom + c_defaultUIFinalScrollViewerVerticalOffset) * c_defaultUIVerticalShift /
                    (c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatioWithZoom * 2.0 + (c_defaultUIScrollViewerContentHeight * 2.0 - c_defaultUIScrollViewerHeight));

                float offset;
                CompositionGetValueStatus status;

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualHorizontalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, horizontal offset={1}", status, offset);
                Log.Comment("expectedHorizontalShift={0}", -expectedHorizontalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedHorizontalShift, c_shiftTolerance));

                status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after view change: status={0}, vertical offset={1}", status, offset);
                Log.Comment("expectedVerticalShift={0}", -expectedVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedVerticalShift, c_shiftTolerance));
            });
        }

void VerifyParallaxViewOffsetChangeInsideScrollViewer ( ) [inline]

Definition at line 859 of file ParallaxViewTests.cs.

        {
            const double verticalParallaxViewOffset1 = 15.0;
            const double verticalParallaxViewOffset2 = 75.0;
            const double expectedVerticalShift1 =
                c_defaultUIVerticalShift * (1.0 - ((c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio + verticalParallaxViewOffset1) / ((2.0 * c_scrollViewerMaxOverpanRatio + 1.5) * c_defaultUIScrollViewerHeight)));
            const double expectedVerticalShift2 =
                c_defaultUIVerticalShift * (1.0 - ((c_defaultUIScrollViewerHeight * c_scrollViewerMaxOverpanRatio + verticalParallaxViewOffset2) / ((2.0 * c_scrollViewerMaxOverpanRatio + 1.5) * c_defaultUIScrollViewerHeight)));

            ParallaxView parallaxView = null;
            Rectangle rectanglePVChild = null;
            ScrollViewer scrollViewer = null;
            StackPanel stackPanelSVContent = null;
            Visual visualPPChild = null;
            AutoResetEvent parallaxViewLoadedEvent = null;
            AutoResetEvent scrollViewerLoadedEvent = null;
            float? finalHorizontalShift = null;
            float? finalVerticalShift = 0f;

            RunOnUIThread.Execute(() =>
            {
                parallaxViewLoadedEvent = new AutoResetEvent(false);
                scrollViewerLoadedEvent = new AutoResetEvent(false);
                stackPanelSVContent = new StackPanel();
                scrollViewer = new ScrollViewer();
                rectanglePVChild = new Rectangle();
                parallaxView = new ParallaxView();

                SetupUIWithParallaxViewInsideScrollViewer(
                    verticalParallaxViewOffset1,
                    parallaxView, rectanglePVChild, scrollViewer, stackPanelSVContent,
                    parallaxViewLoadedEvent, scrollViewerLoadedEvent);
            });

            Log.Comment("Waiting for Loaded events");
            parallaxViewLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            scrollViewerLoadedEvent.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration));
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(scrollViewer.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(scrollViewer.ActualHeight, c_defaultUIScrollViewerHeight);
                Verify.AreEqual(stackPanelSVContent.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(stackPanelSVContent.ActualHeight, c_defaultUIScrollViewerHeight * 3.5 + verticalParallaxViewOffset1);
                Verify.AreEqual(parallaxView.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(parallaxView.ActualHeight, c_defaultUIScrollViewerHeight / 2.0);
                Verify.AreEqual(rectanglePVChild.ActualWidth, c_defaultUIScrollViewerWidth);
                Verify.AreEqual(rectanglePVChild.ActualHeight, c_defaultUIScrollViewerHeight / 2.0 + c_defaultUIVerticalShift);

                Log.Comment("Setting up spy property set");
                visualPPChild = ElementCompositionPreview.GetElementVisual(rectanglePVChild);

                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            ChangeScrollViewerView(
                scrollViewer: scrollViewer,
                horizontalOffset: null,
                verticalOffset: c_defaultUIFinalScrollViewerVerticalOffset,
                zoomFactor: null,
                disableAnimation: false,
                visualPPChild: visualPPChild,
                finalHorizontalShift: ref finalHorizontalShift,
                finalVerticalShift: ref finalVerticalShift);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Validating the parallax amount of the target Rectangle.");
                Log.Comment("expectedVerticalShift1={0}, finalVerticalShift={1}", -expectedVerticalShift1, finalVerticalShift);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance((float)finalVerticalShift, (float)-expectedVerticalShift1, c_shiftTolerance));

                Log.Comment("Changing the vertical offset of the ParallaxView within the ScrollViewer.Content");
                Rectangle rectangle = stackPanelSVContent.Children[0] as Rectangle;
                rectangle.Height = verticalParallaxViewOffset2;

                Log.Comment("Invoking ParallaxView.RefreshAutomaticVerticalOffsets() to update the vertical shift.");
                parallaxView.RefreshAutomaticVerticalOffsets();

                Log.Comment("Start spying again");
                CompositionPropertySpy.StartSpyingScalarProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(stackPanelSVContent.ActualHeight, c_defaultUIScrollViewerHeight * 3.5 + verticalParallaxViewOffset2);

                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(visualPPChild, GetVisualVerticalTargetedPropertyName());
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                // Validate the final parallax amount of the target Rectangle.
                float offset;
                CompositionGetValueStatus status = CompositionPropertySpy.TryGetScalar(visualPPChild, GetVisualVerticalTargetedPropertyName(), out offset);
                Log.Comment("Target transform after offset change: status={0}, vertical offset={1}", status, offset);
                Log.Comment("expectedVerticalShift2={0}", -expectedVerticalShift2);
                Verify.IsTrue(CompositionPropertyLogger.AreFloatsEqualWithTolerance(offset, (float)-expectedVerticalShift2, c_shiftTolerance));
            });
        }

void VerifyPropertyGettersAndSetters ( ) [inline]

Definition at line 107 of file ParallaxViewTests.cs.

        {
            ParallaxView parallaxView = null;
            Rectangle rectangle = null;
            ScrollViewer scrollViewer = null;

            RunOnUIThread.Execute(() =>
            {
                parallaxView = new ParallaxView();
                Verify.IsNotNull(parallaxView);

                rectangle = new Rectangle();
                Verify.IsNotNull(rectangle);

                scrollViewer = new ScrollViewer();
                Verify.IsNotNull(scrollViewer);

                Log.Comment("Setting ParallaxView properties to non-default values");
                parallaxView.Child = rectangle;
                parallaxView.Source = scrollViewer;
                parallaxView.HorizontalSourceOffsetKind = ParallaxSourceOffsetKind.Absolute;
                parallaxView.HorizontalSourceStartOffset = 11.0;
                parallaxView.HorizontalSourceEndOffset = 22.0;
                parallaxView.MaxHorizontalShiftRatio = 0.123;
                parallaxView.HorizontalShift = 321.0;
                parallaxView.IsHorizontalShiftClamped = false;
                parallaxView.VerticalSourceOffsetKind = ParallaxSourceOffsetKind.Absolute;
                parallaxView.VerticalSourceStartOffset = 4.5;
                parallaxView.VerticalSourceEndOffset = 5.4;
                parallaxView.MaxVerticalShiftRatio = 0.321;
                parallaxView.VerticalShift = 45.6;
                parallaxView.IsVerticalShiftClamped = false;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Verifying ParallaxView non-default property values");
                Verify.AreEqual(parallaxView.Child, rectangle);
                Verify.AreEqual(parallaxView.Source, scrollViewer);
                Verify.AreEqual(parallaxView.HorizontalSourceOffsetKind, ParallaxSourceOffsetKind.Absolute);
                Verify.AreEqual(parallaxView.HorizontalSourceStartOffset, 11.0);
                Verify.AreEqual(parallaxView.HorizontalSourceEndOffset, 22.0);
                Verify.AreEqual(parallaxView.MaxHorizontalShiftRatio, 0.123);
                Verify.AreEqual(parallaxView.HorizontalShift, 321.0);
                Verify.IsFalse(parallaxView.IsHorizontalShiftClamped);
                Verify.AreEqual(parallaxView.VerticalSourceOffsetKind, ParallaxSourceOffsetKind.Absolute);
                Verify.AreEqual(parallaxView.VerticalSourceStartOffset, 4.5);
                Verify.AreEqual(parallaxView.VerticalSourceEndOffset, 5.4);
                Verify.AreEqual(parallaxView.MaxVerticalShiftRatio, 0.321);
                Verify.AreEqual(parallaxView.VerticalShift, 45.6);
                Verify.IsFalse(parallaxView.IsVerticalShiftClamped);
            });
        }

Member Data Documentation

const double c_defaultHorizontalShift = 0.0 [private]

Definition at line 38 of file ParallaxViewTests.cs.

const double c_defaultHorizontalSourceEndOffset = 0.0 [private]

Definition at line 36 of file ParallaxViewTests.cs.

const ParallaxSourceOffsetKind c_defaultHorizontalSourceOffsetKind = ParallaxSourceOffsetKind.Relative [private]

Definition at line 34 of file ParallaxViewTests.cs.

const double c_defaultHorizontalSourceStartOffset = 0.0 [private]

Definition at line 35 of file ParallaxViewTests.cs.

const bool c_defaultIsHorizontalShiftClamped = true [private]

Definition at line 39 of file ParallaxViewTests.cs.

const bool c_defaultIsVerticalShiftClamped = true [private]

Definition at line 45 of file ParallaxViewTests.cs.

const double c_defaultMaxHorizontalShiftRatio = 1.0 [private]

Definition at line 37 of file ParallaxViewTests.cs.

const double c_defaultMaxVerticalShiftRatio = 1.0 [private]

Definition at line 43 of file ParallaxViewTests.cs.

const double c_defaultUIFinalScrollPresenterHorizontalOffset = 100.0 [private]

Definition at line 54 of file ParallaxViewTests.cs.

const double c_defaultUIFinalScrollPresenterVerticalOffset = 50.0 [private]

Definition at line 55 of file ParallaxViewTests.cs.

const double c_defaultUIFinalScrollViewerHorizontalOffset = 100.0 [private]

Definition at line 60 of file ParallaxViewTests.cs.

const double c_defaultUIFinalScrollViewerVerticalOffset = 50.0 [private]

Definition at line 61 of file ParallaxViewTests.cs.

const double c_defaultUIHorizontalShift = 100.0 [private]

Definition at line 62 of file ParallaxViewTests.cs.

const double c_defaultUIScrollPresenterContentHeight = 600.0 [private]

Definition at line 53 of file ParallaxViewTests.cs.

const double c_defaultUIScrollPresenterContentWidth = 1200.0 [private]

Definition at line 52 of file ParallaxViewTests.cs.

const double c_defaultUIScrollPresenterHeight = 100.0 [private]

Definition at line 51 of file ParallaxViewTests.cs.

const double c_defaultUIScrollPresenterWidth = 200.0 [private]

Definition at line 50 of file ParallaxViewTests.cs.

const double c_defaultUIScrollViewerContentHeight = 600.0 [private]

Definition at line 59 of file ParallaxViewTests.cs.

const double c_defaultUIScrollViewerContentWidth = 1200.0 [private]

Definition at line 58 of file ParallaxViewTests.cs.

const double c_defaultUIScrollViewerHeight = 100.0 [private]

Definition at line 57 of file ParallaxViewTests.cs.

const double c_defaultUIScrollViewerWidth = 200.0 [private]

Definition at line 56 of file ParallaxViewTests.cs.

const double c_defaultUIVerticalShift = 50.0 [private]

Definition at line 63 of file ParallaxViewTests.cs.

const double c_defaultVerticalShift = 0.0 [private]

Definition at line 44 of file ParallaxViewTests.cs.

const double c_defaultVerticalSourceEndOffset = 0.0 [private]

Definition at line 42 of file ParallaxViewTests.cs.

const ParallaxSourceOffsetKind c_defaultVerticalSourceOffsetKind = ParallaxSourceOffsetKind.Relative [private]

Definition at line 40 of file ParallaxViewTests.cs.

const double c_defaultVerticalSourceStartOffset = 0.0 [private]

Definition at line 41 of file ParallaxViewTests.cs.

const int c_MaxWaitDuration = 5000 [private]

Definition at line 32 of file ParallaxViewTests.cs.

const double c_scrollPresenterMaxOverpanRatio = 1.0 [private]

Definition at line 49 of file ParallaxViewTests.cs.

const double c_scrollViewerMaxOverpanRatio = 0.1 [private]

Definition at line 47 of file ParallaxViewTests.cs.

const double c_scrollViewerMaxOverpanRatioWithZoom = 1.0 [private]

Definition at line 48 of file ParallaxViewTests.cs.

const float c_shiftTolerance = 0.0001f [private]

Definition at line 31 of file ParallaxViewTests.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/APITests/ParallaxViewTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • PersonPictureTests
Public Member Functions

PersonPictureTests Class Reference

List of all members.

Public Member Functions

void | VerifyAutomationName ()
void | VerifyContactPropertyMetadata ()
void | VerifyDefaultsAndBasicSetting ()
void | VerifyPersonPictureVisualTree ()
void | VerifySmallWidthAndHeightDoNotCrash ()
void | VerifyVSMStatesForPhotosAndInitials ()

Detailed Description

Definition at line 22 of file PersonPictureTests.cs.

Member Function Documentation

void VerifyAutomationName ( ) [inline]

Definition at line 68 of file PersonPictureTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                PersonPicture personPicture = new PersonPicture();
                Verify.IsNotNull(personPicture);

                // Set properties and ensure that the AutomationName updates accordingly
                personPicture.Initials = "AB";
                String automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "AB");

                personPicture.DisplayName = "Jane Smith";
                automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "Jane Smith");

                Contact contact = new Contact();
                contact.FirstName = "John";
                contact.LastName = "Doe";
                personPicture.Contact = contact;
                automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "John Doe");

                personPicture.IsGroup = true;
                automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "Group");
                personPicture.IsGroup = false;

                personPicture.BadgeGlyph = "\uE765";
                automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "John Doe, icon");

                personPicture.BadgeText = "Skype";
                automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "John Doe, Skype");
                personPicture.BadgeText = "";

                personPicture.BadgeNumber = 5;
                automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "John Doe, 5 items");

                personPicture.BadgeText = "direct reports";
                automationName = AutomationProperties.GetName(personPicture);
                Verify.AreEqual(automationName, "John Doe, 5 direct reports");
            });
        }

void VerifyContactPropertyMetadata ( ) [inline]

Definition at line 118 of file PersonPictureTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                Microsoft.UI.Xaml.XamlTypeInfo.XamlControlsXamlMetaDataProvider provider = new Microsoft.UI.Xaml.XamlTypeInfo.XamlControlsXamlMetaDataProvider();
                var picturePersonType = provider.GetXamlType(typeof(PersonPicture).FullName);
                var contactMember = picturePersonType.GetMember("Contact");
                var memberType = contactMember.Type;
                Verify.AreEqual(memberType.BaseType.FullName, "Object");
            });
        }

void VerifyDefaultsAndBasicSetting ( ) [inline]

Definition at line 25 of file PersonPictureTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                PersonPicture personPicture = new PersonPicture();
                Verify.IsNotNull(personPicture);

                // Confirm initial dependency property values
                Verify.AreEqual(personPicture.BadgeGlyph, "");
                Verify.AreEqual(personPicture.BadgeNumber, 0);
                Verify.AreEqual(personPicture.IsGroup, false);
                Verify.AreEqual(personPicture.PreferSmallImage, false);
                Verify.AreEqual(personPicture.ProfilePicture, null);
                Verify.AreEqual(personPicture.Contact, null);
                Verify.AreEqual(personPicture.DisplayName, "");
                Verify.AreEqual(personPicture.Initials, "");

                // Now verify setting/retrieving the parameters
                personPicture.BadgeGlyph = "\uE765";
                Verify.AreEqual(personPicture.BadgeGlyph, "\uE765");
                personPicture.BadgeNumber = 10;
                Verify.AreEqual(personPicture.BadgeNumber, 10);
                personPicture.IsGroup = true;
                Verify.AreEqual(personPicture.IsGroup, true);
                personPicture.PreferSmallImage = true;
                Verify.AreEqual(personPicture.PreferSmallImage, true);
                personPicture.DisplayName = "Some Name";
                Verify.AreEqual(personPicture.DisplayName, "Some Name");
                personPicture.Initials = "MS";
                Verify.AreEqual(personPicture.Initials, "MS");

                Contact contact = new Contact();
                contact.FirstName = "FirstName";
                personPicture.Contact = contact;
                Verify.AreEqual(personPicture.Contact.FirstName, "FirstName");

                ImageSource imageSrc = new BitmapImage(new Uri("ms-appx:/Assets/StoreLogo.png"));
                personPicture.ProfilePicture = imageSrc;
                Verify.IsNotNull(personPicture.ProfilePicture);
            });
        }

void VerifyPersonPictureVisualTree ( ) [inline]

Definition at line 188 of file PersonPictureTests.cs.

        {
            PersonPicture personPicture = null;
            RunOnUIThread.Execute(() =>
            {
                personPicture = new PersonPicture { Initials="LC", Width=100, Height=100 };
            });
            TestUtilities.SetAsVisualTreeRoot(personPicture);

            VisualTreeTestHelper.VerifyVisualTree(root: personPicture, verificationFileNamePrefix: "PersonPicture");
        }

void VerifySmallWidthAndHeightDoNotCrash ( ) [inline]

Definition at line 131 of file PersonPictureTests.cs.

        {
            ManualResetEvent sizeChangedEvent = new ManualResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                var personPicture = new PersonPicture();
                Content = personPicture;
                Content.UpdateLayout();
                personPicture.SizeChanged += (sender, args) => sizeChangedEvent.Set();
                personPicture.Width = 0.4;
                personPicture.Height = 0.4;
                Content.UpdateLayout();
            });
            sizeChangedEvent.WaitOne();
        }

void VerifyVSMStatesForPhotosAndInitials ( ) [inline]

Definition at line 148 of file PersonPictureTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var personPicture = new PersonPicture();
                Content = personPicture;
                Content.UpdateLayout();
                var initialsTextBlock = (TextBlock)VisualTreeUtils.FindVisualChildByName(personPicture, "InitialsTextBlock");
                personPicture.IsGroup = true;
                Content.UpdateLayout();
                Verify.AreEqual(initialsTextBlock.FontFamily.Source, "Segoe Fluent Icons,Segoe MDL2 Assets");
                Verify.AreEqual(initialsTextBlock.Text, "\xE716");

                personPicture.IsGroup = false;
                personPicture.Initials = "JS";
                Content.UpdateLayout();
                Verify.AreEqual(initialsTextBlock.FontFamily.Source, "Segoe UI Variable");
                Verify.AreEqual(initialsTextBlock.Text, "JS");

                personPicture.Initials = "";
                Content.UpdateLayout();
                Verify.AreEqual(initialsTextBlock.FontFamily.Source, "Segoe Fluent Icons,Segoe MDL2 Assets");
                Verify.AreEqual(initialsTextBlock.Text, "\xE77B");

                // Make sure that custom FontFamily takes effect after the control is created
                // and also goes back to the MDL2 font after setting IsGroup = true.
                personPicture.FontFamily = new FontFamily("Segoe UI Emoji");
                personPicture.Initials = "👍";
                Content.UpdateLayout();
                Verify.AreEqual(initialsTextBlock.FontFamily.Source, "Segoe UI Emoji");
                Verify.AreEqual(initialsTextBlock.Text, "👍");

                personPicture.IsGroup = true;
                Content.UpdateLayout();
                Verify.AreEqual(initialsTextBlock.FontFamily.Source, "Segoe Fluent Icons,Segoe MDL2 Assets");
                Verify.AreEqual(initialsTextBlock.Text, "\xE716");
            });
        }

The documentation for this class was generated from the following file:
  • PersonPicture/APITests/PersonPictureTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • PipsPagerTests
Public Member Functions

PipsPagerTests Class Reference

List of all members.

Public Member Functions

void | VerifyAutomationPeerBehavior ()
void | VerifyEmptyPagerDoesNotCrash ()
void | VerifyPipsPagerButtonUIABehavior ()
void | VerifySelectedIndexChangedEventArgs ()

Detailed Description

Definition at line 20 of file PipsPagerTests.cs.

Member Function Documentation

void VerifyAutomationPeerBehavior ( ) [inline]

Definition at line 23 of file PipsPagerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var pipsControl = new PipsPager();
                pipsControl.NumberOfPages = 5;
                Content = pipsControl;

                var peer = PipsPagerAutomationPeer.CreatePeerForElement(pipsControl);
                var selectionPeer = peer as ISelectionProvider;
                Verify.AreEqual(false, selectionPeer.CanSelectMultiple);
                Verify.AreEqual(true, selectionPeer.IsSelectionRequired);
            });
        }

void VerifyEmptyPagerDoesNotCrash ( ) [inline]

Definition at line 72 of file PipsPagerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                Content = new PipsPager();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsNotNull(Content);
            });
        }

void VerifyPipsPagerButtonUIABehavior ( ) [inline]

Definition at line 39 of file PipsPagerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var pipsPager = new PipsPager();
                pipsPager.NumberOfPages = 5;
                Content = pipsPager;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var rootPanel = VisualTreeHelper.GetChild(Content, 0) as StackPanel;
                var repeaterRootParent = VisualTreeHelper.GetChild(rootPanel, 1);
                ItemsRepeater repeater = null;
                while (repeater == null)
                {
                    var nextChild = VisualTreeHelper.GetChild(repeaterRootParent, 0);
                    repeater = nextChild as ItemsRepeater;
                    repeaterRootParent = nextChild;
                }
                for (int i = 0; i < 5; i++)
                {
                    var button = repeater.TryGetElement(i);
                    Verify.IsNotNull(button);
                    Verify.AreEqual(i + 1, button.GetValue(AutomationProperties.PositionInSetProperty));
                    Verify.AreEqual(5, button.GetValue(AutomationProperties.SizeOfSetProperty));
                }
            });
        }

void VerifySelectedIndexChangedEventArgs ( ) [inline]

Definition at line 88 of file PipsPagerTests.cs.

        {
            PipsPager pager = null;
            var newIndex = -2;
            RunOnUIThread.Execute(() =>
            {
                pager = new PipsPager();
                pager.SelectedIndexChanged += Pager_SelectedIndexChanged;
                Content = pager;

            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                VerifySelectionChanged(0);

                pager.NumberOfPages = 10;
                VerifySelectionChanged(0);

                pager.SelectedPageIndex = 9;
                VerifySelectionChanged(9);

                pager.SelectedPageIndex = 4;
                VerifySelectionChanged(4);
            });

            void Pager_SelectedIndexChanged(PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args)
            {
                newIndex = sender.SelectedPageIndex;
            }

            void VerifySelectionChanged(int expectedNewIndex)
            {
                Verify.AreEqual(expectedNewIndex, newIndex, "Expected PreviousPageIndex:" + expectedNewIndex + ", actual: " + newIndex);
            }
        }

The documentation for this class was generated from the following file:
  • PipsPager/APITests/PipsPagerTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ProgressBarTests
Public Member Functions

ProgressBarTests Class Reference

List of all members.

Public Member Functions

void ResourceOverridablity ()

Detailed Description

Definition at line 22 of file ProgressBarTests.cs.

Member Function Documentation

void ResourceOverridablity ( ) [inline]

Definition at line 25 of file ProgressBarTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var root = (StackPanel)XamlReader.Load(
    @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                             xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'
                             xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                             <Grid>
                                <Grid.Resources>
                                    <x:Double x:Key='ProgressBarTrackHeight'>3</x:Double>
                                </Grid.Resources>
                                <controls:ProgressBar/>
                            </Grid>
                            <controls:ProgressBar/>
                       </StackPanel>");

                Content = root;
                Content.UpdateLayout();

                var grid = VisualTreeHelper.GetChild(root, 0);
                var progressBar1 = VisualTreeHelper.GetChild(grid, 0);
                var templateRoot1 = VisualTreeHelper.GetChild(progressBar1, 0);
                var Border11 = VisualTreeHelper.GetChild(templateRoot1, 0);
                var Border12 = VisualTreeHelper.GetChild(Border11, 0);
                var grid1 = VisualTreeHelper.GetChild(Border12, 0);
                var rect1 = VisualTreeHelper.GetChild(grid1, 0) as Rectangle;
                Verify.AreEqual(3, rect1.Height);

                var progressBar2 = VisualTreeHelper.GetChild(root, 1);
                var templateRoot2 = VisualTreeHelper.GetChild(progressBar2, 0);
                var Border21 = VisualTreeHelper.GetChild(templateRoot2, 0);
                var Border22 = VisualTreeHelper.GetChild(Border21, 0);
                var grid2 = VisualTreeHelper.GetChild(Border22, 0);
                var rect2 = VisualTreeHelper.GetChild(grid2, 0) as Rectangle;
                Verify.AreEqual(1, rect2.Height);
            });
        }

The documentation for this class was generated from the following file:
  • ProgressBar/APITests/ProgressBarTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ProgressRingTests
Public Member Functions

ProgressRingTests Class Reference

List of all members.

Public Member Functions

void VerifyAccessibilityView ()

Detailed Description

Definition at line 19 of file ProgressRingTests.cs.

Member Function Documentation

void VerifyAccessibilityView ( ) [inline]

Definition at line 22 of file ProgressRingTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var progressRing = new ProgressRing();
                progressRing.IsActive = true;

                Verify.AreNotEqual(AccessibilityView.Raw, AutomationProperties.GetAccessibilityView(progressRing));

                progressRing.IsActive = false;
                Verify.AreEqual(AccessibilityView.Raw, AutomationProperties.GetAccessibilityView(progressRing));
            });
        }

The documentation for this class was generated from the following file:
  • ProgressRing/APITests/ProgressRingTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RadioButtonsTests
Public Member Functions

RadioButtonsTests Class Reference

List of all members.

Public Member Functions

void | VerifyCustomItemTemplate ()
void | VerifyIsEnabledChangeUpdatesVisualState ()

Detailed Description

Definition at line 21 of file RadioButtonsTests.cs.

Member Function Documentation

void VerifyCustomItemTemplate ( ) [inline]

Definition at line 24 of file RadioButtonsTests.cs.

        {
            RadioButtons radioButtons = null;
            RadioButtons radioButtons2 = null;
            RunOnUIThread.Execute(() =>
            {
                radioButtons = new RadioButtons();
                radioButtons.ItemsSource = new List<string>() { "Option 1", "Option 2" };

                // Set a custom ItemTemplate to be wrapped in a RadioButton.
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text = '{Binding}'/>
                        </DataTemplate>");

                radioButtons.ItemTemplate = itemTemplate;

                radioButtons2 = new RadioButtons();
                radioButtons2.ItemsSource = new List<string>() { "Option 1", "Option 2" };

                // Set a custom ItemTemplate which is already a RadioButton. No wrapping should be performed.
                var itemTemplate2 = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <RadioButton Foreground='Blue'>
                              <TextBlock Text = '{Binding}'/>
                            </RadioButton>
                        </DataTemplate>");

                radioButtons2.ItemTemplate = itemTemplate2;

                var stackPanel = new StackPanel();
                stackPanel.Children.Add(radioButtons);
                stackPanel.Children.Add(radioButtons2);

                Content = stackPanel;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var radioButton1 = radioButtons.ContainerFromIndex(0) as RadioButton;
                var radioButton2 = radioButtons2.ContainerFromIndex(0) as RadioButton;
                Verify.IsNotNull(radioButton1, "Our custom ItemTemplate should have been wrapped in a RadioButton.");
                Verify.IsNotNull(radioButton2, "Our custom ItemTemplate should have been wrapped in a RadioButton.");

                bool testCondition = !(radioButton1.Foreground is SolidColorBrush brush && brush.Color == Colors.Blue);
                Verify.IsTrue(testCondition, "Default foreground color of the RadioButton should not have been [blue].");

                testCondition = radioButton2.Foreground is SolidColorBrush brush2 && brush2.Color == Colors.Blue;
                Verify.IsTrue(testCondition, "The foreground color of the RadioButton should have been [blue].");
            });
        }

void VerifyIsEnabledChangeUpdatesVisualState ( ) [inline]

Definition at line 80 of file RadioButtonsTests.cs.

        {
            RadioButtons radioButtons = null; ;
            VisualStateGroup commonStatesGroup = null;
            RunOnUIThread.Execute(() =>
            {
                radioButtons = new RadioButtons();

                // Check 1: Set IsEnabled to true.
                radioButtons.IsEnabled = true;

                Content = radioButtons;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content.UpdateLayout();
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var radioButtonsLayoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(radioButtons, 0);
                commonStatesGroup = VisualStateManager.GetVisualStateGroups(radioButtonsLayoutRoot).First(vsg => vsg.Name.Equals("CommonStates"));

                Verify.AreEqual("Normal", commonStatesGroup.CurrentState.Name);

                // Check 2: Set IsEnabled to false.
                radioButtons.IsEnabled = false;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content.UpdateLayout();
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("Disabled", commonStatesGroup.CurrentState.Name);

                // Check 3: Set IsEnabled back to true.
                radioButtons.IsEnabled = true;
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content.UpdateLayout();
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("Normal", commonStatesGroup.CurrentState.Name);
            });
        }

The documentation for this class was generated from the following file:
  • RadioButtons/APITests/RadioButtonsTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RatingControlTests
Public Member Functions

RatingControlTests Class Reference

List of all members.

Public Member Functions

void | VerifyDefaultsAndBasicSetting ()
void | VerifyDontCrashWhenCollapsedAndValueSet ()
void | VerifySizeIsChangeableFromResource ()
void | VerifyValuesCoercion ()

Detailed Description

Definition at line 18 of file RatingControlTests.cs.

Member Function Documentation

void VerifyDefaultsAndBasicSetting ( ) [inline]

Definition at line 21 of file RatingControlTests.cs.

        {
            RatingControl ratingControl = null;
            RunOnUIThread.Execute(() =>
            {
                ratingControl = new RatingControl();
                Verify.IsNotNull(ratingControl);

                Verify.AreEqual(ratingControl.Caption, "");
                Verify.AreEqual(ratingControl.InitialSetValue, 1);
                Verify.AreEqual(ratingControl.IsClearEnabled, true);
                Verify.AreEqual(ratingControl.IsReadOnly, false);
                Verify.AreEqual(ratingControl.MaxRating, 5);
                Verify.AreEqual(ratingControl.PlaceholderValue, -1);
                Verify.AreEqual(ratingControl.Value, -1);

                // Disabled due to 12359255 reliability issue
                // Verify.IsTrue(ratingControl.ItemInfo is RatingItemFontInfo, "Verify default type of ItemInfo");
                // Verify.IsTrue((ratingControl.ItemInfo as RatingItemFontInfo).Glyph.Equals("\uE735"));

                // Now verify basic setting the value, and reaccessing it:

                ratingControl.Caption = "Rating API Test Caption";
                ratingControl.InitialSetValue = 2;
                ratingControl.IsClearEnabled = false;
                ratingControl.IsReadOnly = true;
                ratingControl.MaxRating = 10;
                ratingControl.PlaceholderValue = 3.0;
                ratingControl.Value = 2.0;

                var imageInfo = new RatingItemImageInfo();
                imageInfo.Image = new BitmapImage(new Uri("ms-appx:/Assets/rating_set.png"));
                ratingControl.ItemInfo = imageInfo;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(ratingControl.Caption, "Rating API Test Caption");
                Verify.AreEqual(ratingControl.InitialSetValue, 2);
                Verify.AreEqual(ratingControl.IsClearEnabled, false);
                Verify.AreEqual(ratingControl.IsReadOnly, true);
                Verify.AreEqual(ratingControl.MaxRating, 10);
                Verify.AreEqual(ratingControl.PlaceholderValue, 3.0);
                Verify.AreEqual(ratingControl.Value, 2.0);
                Verify.IsTrue(ratingControl.ItemInfo is RatingItemImageInfo, "Verify default type of ItemInfo [2]");
                Verify.IsTrue(((ratingControl.ItemInfo as RatingItemImageInfo).Image as BitmapImage).UriSource.Equals("ms-appx:/Assets/rating_set.png"));
            });
        }

void VerifyDontCrashWhenCollapsedAndValueSet ( ) [inline]

Definition at line 75 of file RatingControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RatingControl ratingControl = new RatingControl();
                ratingControl.Visibility = Visibility.Collapsed;
                ratingControl.Value = 3.3;
            });
        }

void VerifySizeIsChangeableFromResource ( ) [inline]

Definition at line 121 of file RatingControlTests.cs.

        {
            ManualResetEvent loadedEvent = new(false);
            ManualResetEvent unloadedEvent = new(false);
            double originalWidth = 0;
            double previousWidth = 0;

            RunOnUIThread.Execute(() =>
            {
                var ratingControl = new RatingControl();

                ratingControl.Loaded += (sender, e) =>
                {
                    originalWidth = ratingControl.ActualWidth;
                    previousWidth = originalWidth;
                    loadedEvent.Set();
                };

                ratingControl.Unloaded += (sender, e) => unloadedEvent.Set();

                Content = ratingControl;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content = null;
            });

            unloadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Application.Current.Resources["RatingControlFontSizeForRendering"] = 20.0;

                var ratingControl = new RatingControl();

                ratingControl.Loaded += (sender, e) =>
                {
                    Verify.IsLessThan(ratingControl.ActualWidth, previousWidth);
                    previousWidth = ratingControl.ActualWidth;
                    loadedEvent.Set();
                };

                ratingControl.Unloaded += (sender, e) => unloadedEvent.Set();

                Content = ratingControl;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content = null;
            });

            unloadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Application.Current.Resources["RatingControlItemSpacing"] = 20.0;

                var ratingControl = new RatingControl();

                ratingControl.Loaded += (sender, e) =>
                {
                    Verify.IsGreaterThan(ratingControl.ActualWidth, previousWidth);
                    previousWidth = ratingControl.ActualWidth;
                    loadedEvent.Set();
                };

                ratingControl.Unloaded += (sender, e) => unloadedEvent.Set();

                Content = ratingControl;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content = null;
            });

            unloadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Application.Current.Resources["RatingControlFontSizeForRendering"] = 48.0;
                Application.Current.Resources.Remove("RatingControlItemSpacing");

                var ratingControl = new RatingControl();

                ratingControl.Loaded += (sender, e) =>
                {
                    Verify.IsGreaterThan(ratingControl.ActualWidth, originalWidth);
                    Verify.IsGreaterThan(ratingControl.ActualWidth, previousWidth);
                    previousWidth = ratingControl.ActualWidth;
                    loadedEvent.Set();
                };

                ratingControl.Unloaded += (sender, e) => unloadedEvent.Set();

                Content = ratingControl;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content = null;
            });

            unloadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Application.Current.Resources["RatingControlItemSpacing"] = 2.0;

                var ratingControl = new RatingControl();

                ratingControl.Loaded += (sender, e) =>
                {
                    Verify.IsLessThan(ratingControl.ActualWidth, previousWidth);
                    loadedEvent.Set();
                };

                ratingControl.Unloaded += (sender, e) => unloadedEvent.Set();

                Content = ratingControl;
            });

            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Content = null;
            });

            unloadedEvent.WaitOne();
            IdleSynchronizer.Wait();
        }

void VerifyValuesCoercion ( ) [inline]

Definition at line 87 of file RatingControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RatingControl ratingControl = new RatingControl();
                Verify.IsNotNull(ratingControl);
                Verify.AreEqual(ratingControl.PlaceholderValue, -1);
                Verify.AreEqual(ratingControl.Value, -1);

                ratingControl.PlaceholderValue = 0.1;
                ratingControl.Value = 0.1;
                Verify.AreEqual(ratingControl.PlaceholderValue, 1.0, "Should coerce small PlaceholderValue values to 1.0");
                Verify.AreEqual(ratingControl.Value, 1.0, "Should coerce small Value values to 1.0");

                ratingControl.PlaceholderValue = 6.0;
                ratingControl.Value = 6.0;
                Verify.AreEqual(ratingControl.PlaceholderValue, 5.0, "Should coerce PlaceholderValue above MaxRating back to MaxRating");
                Verify.AreEqual(ratingControl.Value, 5.0, "Should coerce Value above MaxRating back to MaxRating");

                ratingControl.MaxRating = -2;
                Verify.AreEqual(ratingControl.MaxRating, 1, "Should coerce MaxRating below 1 back up to 1.");

                Verify.AreEqual(ratingControl.PlaceholderValue, 1.0, "Should auto-coerce now outdated PlaceholderValue above MaxRating back to MaxRating [2]");
                Verify.AreEqual(ratingControl.Value, 1.0, "Should auto-coerce now outdated Value above MaxRating back to MaxRating [2]");

                ratingControl.PlaceholderValue = 6.0;
                ratingControl.Value = 6.0;
                Verify.AreEqual(ratingControl.PlaceholderValue, 1.0, "Should coerce set PlaceholderValue above MaxRating back to MaxRating");
                Verify.AreEqual(ratingControl.Value, 1.0, "Should coerce set Value above MaxRating back to MaxRating");
            });
        }

The documentation for this class was generated from the following file:
  • RatingControl/APITests/RatingControlTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshInfoProviderImpl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RefreshInfoProviderImpl
Public Member Functions | Public Attributes | Properties | Events | Private Attributes

RefreshInfoProviderImpl Class Reference

List of all members.

Public Member Functions

RefreshInfoProviderImpl (Compositor compositor)
void | OnRefreshCompleted ()
void | OnRefreshStarted ()
void | RaiseInteractionRatioChangedEvent (float interactionRatio)
void | RaiseIsInteractionForRefreshChangedEvent ()
void | SetCustomInteractionRatio (float value)
void | SetCustomIsInteractingForRefresh (bool value)

Public Attributes

int | OnRefreshCompletedCalls
int | OnRefreshStartedCalls

Properties

CompositionPropertySet | CompositionProperties [get]
double | ExecutionRatio [get, set]
string | InteractionRatioCompositionProperty [get]
bool | IsInteractingForRefresh [get]

Events

TypedEventHandler
< IRefreshInfoProvider,
RefreshInteractionRatioChangedEventArgs > 		InteractionRatioChanged
TypedEventHandler
< IRefreshInfoProvider, object > 		IsInteractingForRefreshChanged
TypedEventHandler
< IRefreshInfoProvider, object > 		RefreshCompleted
TypedEventHandler
< IRefreshInfoProvider, object > 		RefreshStarted

Private Attributes

CompositionPropertySet | compositionProperties
double | executionRatio
bool | isInteractingForRefresh

Detailed Description

Definition at line 203 of file RefreshVisualizerTests.cs.

Constructor & Destructor Documentation

RefreshInfoProviderImpl ( Compositor compositor ) [inline]

Definition at line 212 of file RefreshVisualizerTests.cs.

        {
            executionRatio = 0.8f;
            compositionProperties = compositor.CreatePropertySet();
            compositionProperties.InsertScalar(InteractionRatioCompositionProperty, 0.0f);
            isInteractingForRefresh = false;
            OnRefreshCompletedCalls = 0;
            OnRefreshStartedCalls = 0;
        }

Member Function Documentation

void OnRefreshCompleted ( ) [inline]

Definition at line 290 of file RefreshVisualizerTests.cs.

        {
            OnRefreshCompletedCalls++;

            if (this.RefreshCompleted != null)
            {
                RefreshCompleted.Invoke(this, new EventArgs());
            }
        }

void OnRefreshStarted ( ) [inline]

Definition at line 300 of file RefreshVisualizerTests.cs.

        {
            OnRefreshStartedCalls++;
            if (this.RefreshStarted != null)
            {
                RefreshStarted.Invoke(this, new EventArgs());
            }
        }

void RaiseInteractionRatioChangedEvent ( float interactionRatio ) [inline]

Definition at line 232 of file RefreshVisualizerTests.cs.

        {
            if (this.InteractionRatioChanged != null)
            {
                this.InteractionRatioChanged.Invoke(this, PullToRefreshHelperTestApi.CreateRefreshInteractionRatioChangedEventArgsInstance(interactionRatio));
            }
        }

void RaiseIsInteractionForRefreshChangedEvent ( ) [inline]

Definition at line 240 of file RefreshVisualizerTests.cs.

        {
            if (this.IsInteractingForRefreshChanged != null)
            {
                this.IsInteractingForRefreshChanged.Invoke(this, new EventArgs());
            }
        }

void SetCustomInteractionRatio ( float value ) [inline]

Definition at line 222 of file RefreshVisualizerTests.cs.

        {
            compositionProperties.InsertScalar(InteractionRatioCompositionProperty, value);
        }

void SetCustomIsInteractingForRefresh ( bool value ) [inline]

Definition at line 227 of file RefreshVisualizerTests.cs.

        {
            isInteractingForRefresh = value;
        }

Member Data Documentation

CompositionPropertySet compositionProperties [private]

Definition at line 206 of file RefreshVisualizerTests.cs.

double executionRatio [private]

Definition at line 205 of file RefreshVisualizerTests.cs.

bool isInteractingForRefresh [private]

Definition at line 207 of file RefreshVisualizerTests.cs.

int OnRefreshCompletedCalls

Definition at line 209 of file RefreshVisualizerTests.cs.

int OnRefreshStartedCalls

Definition at line 210 of file RefreshVisualizerTests.cs.

Property Documentation

CompositionPropertySet CompositionProperties [get]

Definition at line 262 of file RefreshVisualizerTests.cs.

double ExecutionRatio [get, set]

Definition at line 249 of file RefreshVisualizerTests.cs.

string InteractionRatioCompositionProperty [get]

Definition at line 270 of file RefreshVisualizerTests.cs.

bool IsInteractingForRefresh [get]

Definition at line 278 of file RefreshVisualizerTests.cs.

Event Documentation

TypedEventHandler<IRefreshInfoProvider, RefreshInteractionRatioChangedEventArgs> InteractionRatioChanged

Definition at line 285 of file RefreshVisualizerTests.cs.

TypedEventHandler<IRefreshInfoProvider, object> IsInteractingForRefreshChanged

Definition at line 286 of file RefreshVisualizerTests.cs.

TypedEventHandler<IRefreshInfoProvider, object> RefreshCompleted

Definition at line 287 of file RefreshVisualizerTests.cs.

TypedEventHandler<IRefreshInfoProvider, object> RefreshStarted

Definition at line 288 of file RefreshVisualizerTests.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshVisualizer/APITests/RefreshVisualizerTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshVisualizerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RefreshVisualizerTests
Public Member Functions | Private Attributes

RefreshVisualizerTests Class Reference

List of all members.

Public Member Functions

void | CanInstantiate ()
void | ContentIsUpdatable ()
void | NullContentDoesNotCrash ()
void | NullInfoProviderDoesNotCrash ()
void | RefreshCompletedDeferralCompletedOffUIThread ()
void | RefreshPropagatesToInfoProvider ()
void | RefreshRequestedEventFires ()
void | RefreshStateChangedEventFires ()

Private Attributes

TimeSpan | c_MaxWaitDuration = TimeSpan.FromMilliseconds(5000)

Detailed Description

Definition at line 29 of file RefreshVisualizerTests.cs.

Member Function Documentation

void CanInstantiate ( ) [inline]

Definition at line 34 of file RefreshVisualizerTests.cs.

        {
            AutoResetEvent refreshVisualizerLoadedEvent = new AutoResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                refreshVisualizer.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("RefreshVisualizer.Loaded event handler");
                    refreshVisualizerLoadedEvent.Set();
                };
                Content = refreshVisualizer;
            });

            Log.Comment("Waiting for Loaded event");
            refreshVisualizerLoadedEvent.WaitOne(c_MaxWaitDuration);
            Log.Comment("Default UI set up");

            RunOnUIThread.Execute(() =>
            {
                Verify.IsNotNull(Content as RefreshVisualizer);
            });
        }

void ContentIsUpdatable ( ) [inline]

Definition at line 76 of file RefreshVisualizerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                //The default Progress Indicator is consturcted in the OnApplyTemplate method, since that is not called in this test
                //we expect the Content to be null.
                Verify.IsNull(refreshVisualizer.Content);
                Content = refreshVisualizer;
                Content.UpdateLayout();
                Verify.IsNotNull(refreshVisualizer.Content);
                Verify.AreEqual<Symbol>(Symbol.Refresh, ((SymbolIcon)(refreshVisualizer.Content)).Symbol);
                refreshVisualizer.Content = new SymbolIcon(Symbol.Cancel);
                Verify.AreEqual<Symbol>(Symbol.Cancel, ((SymbolIcon)(refreshVisualizer.Content)).Symbol);
            });
        }

void NullContentDoesNotCrash ( ) [inline]

Definition at line 94 of file RefreshVisualizerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                refreshVisualizer.Content = null;
                refreshVisualizer.RequestRefresh();
            });
        }

void NullInfoProviderDoesNotCrash ( ) [inline]

Definition at line 105 of file RefreshVisualizerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                Compositor compositor = ElementCompositionPreview.GetElementVisual(refreshVisualizer).Compositor;
                RefreshInfoProviderImpl refreshInfoProviderImpl = new RefreshInfoProviderImpl(compositor);
                ((IRefreshVisualizerPrivate)refreshVisualizer).InfoProvider = refreshInfoProviderImpl;
                refreshVisualizer.RequestRefresh();
                ((IRefreshVisualizerPrivate)refreshVisualizer).InfoProvider = null;
                refreshVisualizer.RequestRefresh();
            });
        }

void RefreshCompletedDeferralCompletedOffUIThread ( ) [inline]

Definition at line 140 of file RefreshVisualizerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                Compositor compositor = ElementCompositionPreview.GetElementVisual(refreshVisualizer).Compositor;
                RefreshInfoProviderImpl refreshInfoProviderImpl = new RefreshInfoProviderImpl(compositor);
                ((IRefreshVisualizerPrivate)refreshVisualizer).InfoProvider = refreshInfoProviderImpl;
                refreshVisualizer.RefreshRequested += (RefreshVisualizer sender, RefreshRequestedEventArgs args) =>
                {
                    Deferral def = args.GetDeferral();

                    global::Windows.System.Threading.ThreadPool.RunAsync(
                        (IAsyncAction action) =>
                        {
                            Log.Comment("RefreshVisualizer.RefreshRequested event handler");
                            def.Complete();
                        }).AsTask().Wait();
                };

                Verify.AreEqual<int>(0, refreshInfoProviderImpl.OnRefreshStartedCalls);
                Verify.AreEqual<int>(0, refreshInfoProviderImpl.OnRefreshCompletedCalls);

                Content = refreshVisualizer;

                refreshVisualizer.RequestRefresh();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = (RefreshVisualizer)Content;
                RefreshInfoProviderImpl refreshInfoProviderImpl = (RefreshInfoProviderImpl)((IRefreshVisualizerPrivate)refreshVisualizer).InfoProvider;

                Verify.AreEqual<int>(1, refreshInfoProviderImpl.OnRefreshStartedCalls);
                //Since we are completing the deferral off the UI thread the refresh never completed.
                Verify.AreEqual<int>(0, refreshInfoProviderImpl.OnRefreshCompletedCalls);
            });

        }

void RefreshPropagatesToInfoProvider ( ) [inline]

Definition at line 59 of file RefreshVisualizerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                Compositor compositor = ElementCompositionPreview.GetElementVisual(refreshVisualizer).Compositor;
                RefreshInfoProviderImpl refreshInfoProviderImpl = new RefreshInfoProviderImpl(compositor);
                ((IRefreshVisualizerPrivate)refreshVisualizer).InfoProvider = refreshInfoProviderImpl;
                Verify.AreEqual<int>(0, refreshInfoProviderImpl.OnRefreshStartedCalls);
                Verify.AreEqual<int>(0, refreshInfoProviderImpl.OnRefreshCompletedCalls);
                refreshVisualizer.RequestRefresh();
                Verify.AreEqual<int>(1, refreshInfoProviderImpl.OnRefreshStartedCalls);
                Verify.AreEqual<int>(1, refreshInfoProviderImpl.OnRefreshCompletedCalls);
            });
        }

void RefreshRequestedEventFires ( ) [inline]

Definition at line 120 of file RefreshVisualizerTests.cs.

        {
            int refreshRequestedCount = 0;

            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                refreshVisualizer.RefreshRequested += (RefreshVisualizer sender, RefreshRequestedEventArgs args) => { refreshRequestedCount++; };
                refreshVisualizer.RequestRefresh();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(1, refreshRequestedCount);
            });
        }

void RefreshStateChangedEventFires ( ) [inline]

Definition at line 183 of file RefreshVisualizerTests.cs.

        {
            int refreshStateChangedCount = 0;

            RunOnUIThread.Execute(() =>
            {
                RefreshVisualizer refreshVisualizer = new RefreshVisualizer();
                refreshVisualizer.RefreshStateChanged += (RefreshVisualizer sender, RefreshStateChangedEventArgs args) => { refreshStateChangedCount++; };
                refreshVisualizer.RequestRefresh();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(2, refreshStateChangedCount);
            });
        }

Member Data Documentation

TimeSpan c_MaxWaitDuration = TimeSpan.FromMilliseconds(5000) [private]

Definition at line 31 of file RefreshVisualizerTests.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshVisualizer/APITests/RefreshVisualizerTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AccessibilityTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • AccessibilityTests
Public Member Functions | Private Member Functions

AccessibilityTests Class Reference

List of all members.

Public Member Functions

void | ValidateChildrenPeers ()

Private Member Functions

VirtualizingLayout | CreateLayout (ItemsRepeater repeater)
ItemsRepeater | CreateRepeater (object dataSource, object elementFactory, VirtualizingLayout layout=null)

Detailed Description

Definition at line 25 of file AccessibilityTests.cs.

Member Function Documentation

VirtualizingLayout CreateLayout ( ItemsRepeater repeater ) [inline, private]

Definition at line 94 of file AccessibilityTests.cs.

        {
            var layout = new MockVirtualizingLayout();
            var children = new List<UIElement>();

            layout.MeasureLayoutFunc = (availableSize, context) =>
            {
                repeater.Tag = repeater.Tag ?? context;
                children.Clear();
                var itemCount = context.ItemCount;

                for (int i = 0; i < itemCount; ++i)
                {
                    var element = repeater.TryGetElement(i) ?? context.GetOrCreateElementAt(i);
                    element.Measure(availableSize);
                    children.Add(element);
                }

                return new Size(10, 10);
            };

            return layout;
        }

ItemsRepeater CreateRepeater | ( | object | dataSource,
 |  | object | elementFactory,
 |  | VirtualizingLayout | layout = null |
 | ) |  |  | [inline, private]

Definition at line 83 of file AccessibilityTests.cs.

        {
            var repeater = new ItemsRepeater
            {
                ItemsSource = dataSource,
                ItemTemplate = elementFactory,
            };
            repeater.Layout = layout ?? CreateLayout(repeater);
            return repeater;
        }

void ValidateChildrenPeers ( ) [inline]

Definition at line 28 of file AccessibilityTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableCollection<string>(Enumerable.Range(0, 3).Select(i => string.Format("Item #{0}", i)));
                var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);

                // StackPanel doesn't have an automation peer, but we still need
                // to report its children's peer.
                var group = new StackPanel();
                group.Children.Add(new ListViewItem());
                group.Children.Add(new ListViewItem());

                var mapping = new Dictionary<int, UIElement>
                {
                    { 0, new ListViewItem() },
                    { 1, new ListViewItem() },
                    { 2, group },
                };

                var elementFactory = MockElementFactory.CreateElementFactory(mapping);
                var layout = new MockVirtualizingLayout
                {
                    MeasureLayoutFunc = (availableSize, context) =>
                    {
                        var ctx = (VirtualizingLayoutContext)context;

                        // Realize elements 0, 1, 2 in a random order.
                        ctx.GetOrCreateElementAt(2);
                        ctx.GetOrCreateElementAt(0);
                        var element1 = ctx.GetOrCreateElementAt(1);

                        // Clear element 1 because we will be validating
                        // that we ignore unrealized elements.
                        ctx.RecycleElement(element1);

                        return default(Size);
                    }
                };

                var repeater = CreateRepeater(dataSource, elementFactory, layout);

                Content = repeater;
                repeater.UpdateLayout();

                var peer = FrameworkElementAutomationPeer.CreatePeerForElement(repeater);
                var children = peer.GetChildren().Select(p => ((FrameworkElementAutomationPeer)p).Owner).ToList();

                Verify.AreEqual(3, children.Count);
                Verify.AreEqual(mapping[0], children[0]);
                Verify.AreEqual(group.Children[0], children[1]);
                Verify.AreEqual(group.Children[1], children[2]);
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/AccessibilityTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomItemsSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • CustomItemsSource
Public Member Functions | Protected Member Functions | Properties | Private Attributes

CustomItemsSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceView.

Inherited by CustomItemsSourceWithUniqueId.

List of all members.

Public Member Functions

CustomItemsSource (List< int > source)
new void | Clear ()
object | GetAt (int index)
void | Insert (int index, int count, bool reset, int valueStart=1000)
void | Move (int oldIndex, int newIndex, int count, bool reset)
void | Remove (int index, int count, bool reset)
void | Replace (int index, int oldCount, int newCount, bool reset)
void | Reset ()

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()

Properties

int | GetAtCallCount [get, set]
List< int > | Inner [get]

Private Attributes

List< int > | _inner

Detailed Description

Definition at line 11 of file CustomItemsSource.cs.

Constructor & Destructor Documentation

CustomItemsSource ( List< int > source ) [inline]

Definition at line 16 of file CustomItemsSource.cs.

        {
            _inner = source;
        }

Member Function Documentation

new void Clear ( ) [inline]

Reimplemented from CustomItemsSourceView.

Definition at line 137 of file CustomItemsSource.cs.

        {
            Inner.Clear();
            // something changed, but i don't want to tell you the exact changes
            OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
        }

object GetAt ( int index ) [inline]

Definition at line 23 of file CustomItemsSource.cs.

        {
            return GetAtCore(index);
        }

override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 149 of file CustomItemsSource.cs.

        {
            GetAtCallCount++;
            return Inner[index];
        }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 144 of file CustomItemsSource.cs.

        {
            return Inner.Count;
        }

void Insert | ( | int | index,
 |  | int | count,
 |  | bool | reset,
 |  | int | valueStart = 1000 |
 | ) |  |  | [inline]

Definition at line 28 of file CustomItemsSource.cs.

        {
            for (int i = 0; i < count; i++)
            {
                Inner.Insert(index + i, valueStart + i);
            }

            if (reset)
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
            }
            else
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                    NotifyCollectionChangedAction.Add,
                    oldStartingIndex: -1,
                    oldItemsCount: -1,
                    newStartingIndex: index,
                    newItemsCount: count));
            }
        }

void Move | ( | int | oldIndex,
 |  | int | newIndex,
 |  | int | count,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 99 of file CustomItemsSource.cs.

        {
            var items = Inner.GetRange(oldIndex, count);
            Inner.RemoveRange(oldIndex, count);
            Inner.InsertRange(newIndex, items);

            if (reset)
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
            }
            else
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                    NotifyCollectionChangedAction.Move,
                    oldStartingIndex: oldIndex,
                    oldItemsCount: count,
                    newStartingIndex: newIndex,
                    newItemsCount: count));
            }
        }

void Remove | ( | int | index,
 |  | int | count,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 50 of file CustomItemsSource.cs.

        {
            for (int i = 0; i < count; i++)
            {
                Inner.RemoveAt(index);
            }

            if (reset)
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
            }
            else
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                    NotifyCollectionChangedAction.Remove,
                    oldStartingIndex: index,
                    oldItemsCount: count,
                    newStartingIndex: -1,
                    newItemsCount: -1));
            }
        }

void Replace | ( | int | index,
 |  | int | oldCount,
 |  | int | newCount,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 72 of file CustomItemsSource.cs.

        {
            for (int i = 0; i < oldCount; i++)
            {
                Inner.RemoveAt(index);
            }

            for (int i = 0; i < newCount; i++)
            {
                Inner.Insert(index, 10000 + i);
            }

            if (reset)
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
            }
            else
            {
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                    NotifyCollectionChangedAction.Replace,
                    oldStartingIndex: index,
                    oldItemsCount: oldCount,
                    newStartingIndex: index,
                    newItemsCount: newCount));
            }
        }

void Reset ( ) [inline]

Definition at line 120 of file CustomItemsSource.cs.

        {
            Random rand = new Random(123);
            for (int i = 0; i < 10; i++)
            {
                int from = rand.Next(0, Inner.Count - 1);
                var value = Inner[from];
                Inner.RemoveAt(from);
                int to = rand.Next(0, Inner.Count - 1);
                Inner.Insert(to, value);
            }

            // something changed, but i don't want to tell you the
            // exact changes
            OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
        }

Member Data Documentation

List<int> _inner [private]

Definition at line 13 of file CustomItemsSource.cs.

Property Documentation

int GetAtCallCount [get, set]

Definition at line 14 of file CustomItemsSource.cs.

List<int> Inner [get]

Definition at line 21 of file CustomItemsSource.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/CustomItemsSource.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomItemsSourceView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • CustomItemsSourceView
Public Member Functions | Protected Member Functions | Properties | Events

CustomItemsSourceView Class Reference

Inherited by CustomItemsSource, CustomItemsSourceViewWithUniqueIdMapping, and MockItemsSource.

List of all members.

Public Member Functions

int | Add (object value)
void | Clear ()
bool | Contains (object value)
void | CopyTo (Array array, int index)
IEnumerator | GetEnumerator ()
int | IndexOf (object value)
void | Insert (int index, object value)
void | Remove (object value)
void | RemoveAt (int index)

Protected Member Functions

virtual object | GetAtCore (int index)
virtual int | GetSizeCore ()
void | OnItemsSourceChanged (NotifyCollectionChangedEventArgs args)

Properties

int | Count [get]
bool | IsFixedSize [get]
bool | IsReadOnly [get]
bool | IsSynchronized [get]
object | SyncRoot [get]
object | this [int index] [get, set]

Events

NotifyCollectionChangedEventHandler | CollectionChanged

Detailed Description

Definition at line 12 of file CustomItemsSourceView.cs.

Member Function Documentation

int Add ( object value ) [inline]

Definition at line 51 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

void Clear ( ) [inline]

Reimplemented in CustomItemsSource.

Definition at line 56 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

bool Contains ( object value ) [inline]

Definition at line 61 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

void CopyTo | ( | Array | array,
 |  | int | index |
 | ) |  |  | [inline]

Definition at line 66 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

virtual object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented in CustomItemsSource, MockItemsSource, CollectionChangeDemo::MyDataSource, DelegatingItemsSource, PersonDataSource, ScrollPresenterTests::TestDataSource, ScrollPresenterBringIntoViewPage::SampleDataSource, and ScrollPresenterRepeaterAnchoringPage::SampleDataSource.

Definition at line 109 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

IEnumerator GetEnumerator ( ) [inline]

Definition at line 71 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

virtual int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented in CustomItemsSource, MockItemsSource, CollectionChangeDemo::MyDataSource, DelegatingItemsSource, PersonDataSource, ScrollPresenterTests::TestDataSource, ScrollPresenterBringIntoViewPage::SampleDataSource, and ScrollPresenterRepeaterAnchoringPage::SampleDataSource.

Definition at line 104 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

int IndexOf ( object value ) [inline]

Definition at line 76 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

void Insert | ( | int | index,
 |  | object | value |
 | ) |  |  | [inline]

Definition at line 81 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

void OnItemsSourceChanged ( NotifyCollectionChangedEventArgs args ) [inline, protected]

Reimplemented in MockItemsSource.

Definition at line 114 of file CustomItemsSourceView.cs.

        {
            CollectionChanged(this, args);
        }

void Remove ( object value ) [inline]

Definition at line 86 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

void RemoveAt ( int index ) [inline]

Definition at line 91 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

Property Documentation

int Count [get]

Definition at line 17 of file CustomItemsSourceView.cs.

bool IsFixedSize [get]

Definition at line 32 of file CustomItemsSourceView.cs.

bool IsReadOnly [get]

Definition at line 37 of file CustomItemsSourceView.cs.

bool IsSynchronized [get]

Definition at line 42 of file CustomItemsSourceView.cs.

object SyncRoot [get]

Definition at line 47 of file CustomItemsSourceView.cs.

object this[int index] [get, set]

Definition at line 25 of file CustomItemsSourceView.cs.

Event Documentation

NotifyCollectionChangedEventHandler CollectionChanged

Definition at line 100 of file CustomItemsSourceView.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/CustomItemsSourceView.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomItemsSourceViewWithUniqueIdMapping Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • CustomItemsSourceViewWithUniqueIdMapping
Public Member Functions | Protected Member Functions

CustomItemsSourceViewWithUniqueIdMapping Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceView.

Inherited by ScrollPresenterTests::TestDataSource, CollectionChangeDemo::MyDataSource, DelegatingItemsSource, PersonDataSource, ScrollPresenterBringIntoViewPage::SampleDataSource, and ScrollPresenterRepeaterAnchoringPage::SampleDataSource.

List of all members.

Public Member Functions

int | IndexFromKey (string id)
string | KeyFromIndex (int index)

Protected Member Functions

virtual int | IndexFromKeyCore (string id)
virtual string | KeyFromIndexCore (int index)

Detailed Description

Definition at line 120 of file CustomItemsSourceView.cs.

Member Function Documentation

int IndexFromKey ( string id ) [inline]

Definition at line 129 of file CustomItemsSourceView.cs.

        {
            return IndexFromKey(id);
        }

virtual int IndexFromKeyCore ( string id ) [inline, protected, virtual]

Definition at line 141 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

string KeyFromIndex ( int index ) [inline]

Definition at line 124 of file CustomItemsSourceView.cs.

        {
            return KeyFromIndexCore(index);
        }

virtual string KeyFromIndexCore ( int index ) [inline, protected, virtual]

Reimplemented in CollectionChangeDemo::MyDataSource, DelegatingItemsSource, PersonDataSource, ScrollPresenterTests::TestDataSource, ScrollPresenterBringIntoViewPage::SampleDataSource, and ScrollPresenterRepeaterAnchoringPage::SampleDataSource.

Definition at line 136 of file CustomItemsSourceView.cs.

        {
            throw new NotImplementedException();
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/CustomItemsSourceView.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomItemsSourceWithUniqueId Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • CustomItemsSourceWithUniqueId
Public Member Functions

CustomItemsSourceWithUniqueId Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSource.

List of all members.

Public Member Functions

CustomItemsSourceWithUniqueId (List< int > source)
int | IndexFromKey (string id)
string | KeyFromIndex (int index)

Detailed Description

Definition at line 156 of file CustomItemsSource.cs.

Constructor & Destructor Documentation

CustomItemsSourceWithUniqueId ( List< int > source ) [inline]

Definition at line 158 of file CustomItemsSource.cs.

                                                               : base(source)
        { }

Member Function Documentation

int IndexFromKey ( string id ) [inline]

Definition at line 166 of file CustomItemsSource.cs.

        {
            throw new NotImplementedException();
        }

string KeyFromIndex ( int index ) [inline]

Definition at line 161 of file CustomItemsSource.cs.

        {
            return Inner[index].ToString();
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/CustomItemsSource.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DataAsElementElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • DataAsElementElementFactory
Protected Member Functions

DataAsElementElementFactory Class Reference

Inherits ElementFactory.

List of all members.

Protected Member Functions

override UIElement | GetElementCore (Microsoft.UI.Xaml.ElementFactoryGetArgs args)
override void | RecycleElementCore (Microsoft.UI.Xaml.ElementFactoryRecycleArgs args)

Detailed Description

Definition at line 9 of file DataAsElementElementFactory.cs.

Member Function Documentation

override UIElement GetElementCore ( Microsoft.UI.Xaml.ElementFactoryGetArgs args ) [inline, protected]

Definition at line 11 of file DataAsElementElementFactory.cs.

        {
            return args.Data as UIElement;
        }

override void RecycleElementCore ( Microsoft.UI.Xaml.ElementFactoryRecycleArgs args ) [inline, protected]

Definition at line 16 of file DataAsElementElementFactory.cs.

        {
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/DataAsElementElementFactory.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ElementFromElementElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • ElementFromElementElementFactory
Protected Member Functions

ElementFromElementElementFactory Class Reference

Inherits ElementFactory.

List of all members.

Protected Member Functions

override UIElement | GetElementCore (Microsoft.UI.Xaml.ElementFactoryGetArgs args)
override void | RecycleElementCore (Microsoft.UI.Xaml.ElementFactoryRecycleArgs args)

Detailed Description

Definition at line 9 of file ElementFromElementElementFactory.cs.

Member Function Documentation

override UIElement GetElementCore ( Microsoft.UI.Xaml.ElementFactoryGetArgs args ) [inline, protected]

Definition at line 11 of file ElementFromElementElementFactory.cs.

        {
            var button = new Button();
            button.Content = args.Data;
            return button;
        }

override void RecycleElementCore ( Microsoft.UI.Xaml.ElementFactoryRecycleArgs args ) [inline, protected]

Definition at line 18 of file ElementFromElementElementFactory.cs.

        {
            var container = args.Element as Button;
            container.Content = null;
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/ElementFromElementElementFactory.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutDerived Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • FlowLayoutDerived
Protected Member Functions | Properties

FlowLayoutDerived Class Reference

Inherits FlowLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override FlowLayoutAnchorInfo | GetAnchorForRealizationRect (Size availableSize, VirtualizingLayoutContext context)
override FlowLayoutAnchorInfo | GetAnchorForTargetElement (int targetIndex, Size availableSize, VirtualizingLayoutContext context)
override Rect | GetExtent (Size availableSize, VirtualizingLayoutContext context, UIElement firstRealized, int firstRealizedItemIndex, Rect firstRealizedLayoutBounds, UIElement lastRealized, int lastRealizedItemIndex, Rect lastRealizedLayoutBounds)
override Size | GetMeasureSize (int index, Size availableSize)
override Size | GetProvisionalArrangeSize (int index, Size measureSize, Size desiredSize)
override void | InitializeForContextCore (VirtualizingLayoutContext context)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)
override void | OnElementMeasured (UIElement element, int index, Size availableSize, Size measureSize, Size desiredSize, Size provisionalArrangeSize, VirtualizingLayoutContext context)
override void | OnLineArranged (int startIndex, int countInLine, double lineSize, VirtualizingLayoutContext context)
override bool | ShouldBreakLine (int index, double remainingSpace)
override void | UninitializeForContextCore (VirtualizingLayoutContext context)

Properties

Func< Size,
VirtualizingLayoutContext,
Size, Size > 		ArrangeLayoutFunc [get, set]
Func< Size,
VirtualizingLayoutContext,
FlowLayoutAnchorInfo,
FlowLayoutAnchorInfo > 		GetAnchorForRealizationRectFunc [get, set]
Func< int, Size,
VirtualizingLayoutContext,
FlowLayoutAnchorInfo,
FlowLayoutAnchorInfo > 		GetAnchorForTargetElementFunc [get, set]
Func< Size,
VirtualizingLayoutContext,
UIElement, int, Rect,
UIElement, int, Rect, Rect,
Rect > 		GetExtentFunc [get, set]
Func< int, Size, Size, Size > | GetMeasureSizeFunc [get, set]
Func< int, Size, Size, Size, Size > | GetProvisionalArrangeSizeFunc [get, set]
Func< Size,
VirtualizingLayoutContext,
Size, Size > 		MeasureLayoutFunc [get, set]
Action< VirtualizingLayoutContext > | OnAttachedFunc [get, set]
Action< VirtualizingLayoutContext > | OnDetatchedFunc [get, set]
Action< UIElement, int, Size,
Size, Size, Size,
VirtualizingLayoutContext > 		OnElementMeasuredFunc [get, set]
Action< int, int, double,
VirtualizingLayoutContext > 		OnLineArrangedFunc [get, set]
Func< int, double, bool, bool > | ShouldBreakLineFunc [get, set]

Detailed Description

Definition at line 11 of file FlowLayoutDerived.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 32 of file FlowLayoutDerived.cs.

        {
            var extent = base.ArrangeOverride(context, finalSize);
            return ArrangeLayoutFunc != null ? ArrangeLayoutFunc(finalSize, context, extent) : extent;
        }

override FlowLayoutAnchorInfo GetAnchorForRealizationRect | ( | Size | availableSize,
 |  | VirtualizingLayoutContext | context |
 | ) |  |  | [inline, protected]

Definition at line 44 of file FlowLayoutDerived.cs.

        {
            var anchorInfo = base.GetAnchorForRealizationRect(availableSize, context);
            return GetAnchorForRealizationRectFunc != null ? GetAnchorForRealizationRectFunc(availableSize, context, anchorInfo) : anchorInfo;
        }

override FlowLayoutAnchorInfo GetAnchorForTargetElement | ( | int | targetIndex,
 |  | Size | availableSize,
 |  | VirtualizingLayoutContext | context |
 | ) |  |  | [inline, protected]

Definition at line 38 of file FlowLayoutDerived.cs.

        {
            var anchorInfo = base.GetAnchorForTargetElement(targetIndex, availableSize, context);
            return GetAnchorForTargetElementFunc != null ? GetAnchorForTargetElementFunc(targetIndex, availableSize, context, anchorInfo) : anchorInfo;
        }

override Rect GetExtent | ( | Size | availableSize,
 |  | VirtualizingLayoutContext | context,
 |  | UIElement | firstRealized,
 |  | int | firstRealizedItemIndex,
 |  | Rect | firstRealizedLayoutBounds,
 |  | UIElement | lastRealized,
 |  | int | lastRealizedItemIndex,
 |  | Rect | lastRealizedLayoutBounds |
 | ) |  |  | [inline, protected]

Definition at line 50 of file FlowLayoutDerived.cs.

        {
            var extent = base.GetExtent(
                availableSize,
                context,
                firstRealized,
                firstRealizedItemIndex,
                firstRealizedLayoutBounds,
                lastRealized,
                lastRealizedItemIndex,
                lastRealizedLayoutBounds);

            return GetExtentFunc != null ? GetExtentFunc(
                availableSize,
                context,
                firstRealized,
                firstRealizedItemIndex,
                firstRealizedLayoutBounds,
                lastRealized,
                lastRealizedItemIndex,
                lastRealizedLayoutBounds,
                extent) : extent;
        }

override Size GetMeasureSize | ( | int | index,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 82 of file FlowLayoutDerived.cs.

        {
            var measureSize = base.GetMeasureSize(index, availableSize);
            return GetMeasureSizeFunc != null ? GetMeasureSizeFunc(index, availableSize, measureSize) : measureSize;
        }

override Size GetProvisionalArrangeSize | ( | int | index,
 |  | Size | measureSize,
 |  | Size | desiredSize |
 | ) |  |  | [inline, protected]

Definition at line 88 of file FlowLayoutDerived.cs.

        {
            var arrangeSize = base.GetProvisionalArrangeSize(index, measureSize, desiredSize);
            return GetProvisionalArrangeSizeFunc != null ? GetProvisionalArrangeSizeFunc(index, measureSize, desiredSize, arrangeSize) : arrangeSize;
        }

override void InitializeForContextCore ( VirtualizingLayoutContext context ) [inline, protected]

Definition at line 95 of file FlowLayoutDerived.cs.

        {
            base.InitializeForContextCore(context);
            if (OnAttachedFunc != null) { OnAttachedFunc(context); }
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 26 of file FlowLayoutDerived.cs.

        {
            var extent = base.MeasureOverride(context, availableSize);
            return MeasureLayoutFunc != null ? MeasureLayoutFunc(availableSize, context, extent) : extent;
        }

override void OnElementMeasured | ( | UIElement | element,
 |  | int | index,
 |  | Size | availableSize,
 |  | Size | measureSize,
 |  | Size | desiredSize,
 |  | Size | provisionalArrangeSize,
 |  | VirtualizingLayoutContext | context |
 | ) |  |  | [inline, protected]

Definition at line 107 of file FlowLayoutDerived.cs.

        {
            base.OnElementMeasured(element, index, availableSize, measureSize, desiredSize, provisionalArrangeSize, context);
            if (OnElementMeasuredFunc != null) { OnElementMeasuredFunc(element, index, availableSize, measureSize, desiredSize, provisionalArrangeSize, context); }
        }

override void OnLineArranged | ( | int | startIndex,
 |  | int | countInLine,
 |  | double | lineSize,
 |  | VirtualizingLayoutContext | context |
 | ) |  |  | [inline, protected]

Definition at line 113 of file FlowLayoutDerived.cs.

        {
            base.OnLineArranged(startIndex, countInLine, lineSize, context);
            if (OnLineArrangedFunc != null) { OnLineArrangedFunc(startIndex, countInLine, lineSize, context); }
        }

override bool ShouldBreakLine | ( | int | index,
 |  | double | remainingSpace |
 | ) |  |  | [inline, protected]

Reimplemented from FlowLayout.

Definition at line 119 of file FlowLayoutDerived.cs.

        {
            var shouldBreak = base.ShouldBreakLine(index, remainingSpace);
            return ShouldBreakLineFunc != null ? ShouldBreakLineFunc(index, remainingSpace, shouldBreak) : shouldBreak;
        }

override void UninitializeForContextCore ( VirtualizingLayoutContext context ) [inline, protected]

Definition at line 101 of file FlowLayoutDerived.cs.

        {
            base.UninitializeForContextCore(context);
            if (OnDetatchedFunc != null) { OnDetatchedFunc(context); }
        }

Property Documentation

Func<Size, VirtualizingLayoutContext, Size, Size> ArrangeLayoutFunc [get, set]

Definition at line 14 of file FlowLayoutDerived.cs.

Func<Size, VirtualizingLayoutContext, FlowLayoutAnchorInfo, FlowLayoutAnchorInfo> GetAnchorForRealizationRectFunc [get, set]

Definition at line 16 of file FlowLayoutDerived.cs.

Func<int, Size, VirtualizingLayoutContext, FlowLayoutAnchorInfo, FlowLayoutAnchorInfo> GetAnchorForTargetElementFunc [get, set]

Definition at line 15 of file FlowLayoutDerived.cs.

Func<Size, VirtualizingLayoutContext, UIElement, int, Rect, UIElement, int, Rect, Rect, Rect> GetExtentFunc [get, set]

Definition at line 17 of file FlowLayoutDerived.cs.

Func<int, Size, Size, Size> GetMeasureSizeFunc [get, set]

Definition at line 18 of file FlowLayoutDerived.cs.

Func<int, Size, Size, Size, Size> GetProvisionalArrangeSizeFunc [get, set]

Definition at line 19 of file FlowLayoutDerived.cs.

Func<Size, VirtualizingLayoutContext, Size, Size> MeasureLayoutFunc [get, set]

Definition at line 13 of file FlowLayoutDerived.cs.

Action<VirtualizingLayoutContext> OnAttachedFunc [get, set]

Definition at line 20 of file FlowLayoutDerived.cs.

Action<VirtualizingLayoutContext> OnDetatchedFunc [get, set]

Definition at line 21 of file FlowLayoutDerived.cs.

Action<UIElement, int, Size, Size, Size, Size, VirtualizingLayoutContext> OnElementMeasuredFunc [get, set]

Definition at line 22 of file FlowLayoutDerived.cs.

Action<int, int, double, VirtualizingLayoutContext> OnLineArrangedFunc [get, set]

Definition at line 23 of file FlowLayoutDerived.cs.

Func<int, double, bool, bool> ShouldBreakLineFunc [get, set]

Definition at line 24 of file FlowLayoutDerived.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/FlowLayoutDerived.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProviderDerived Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • ItemCollectionTransitionProviderDerived
Protected Member Functions | Properties

ItemCollectionTransitionProviderDerived Class Reference

Inherits ItemCollectionTransitionProvider.

List of all members.

Protected Member Functions

override bool | ShouldAnimateCore (ItemCollectionTransition transition)
override void | StartTransitions (IList< ItemCollectionTransition > transitions)

Properties

Func< ItemCollectionTransition,
bool > 		ShouldAnimateFunc [get, set]
Action< IList
< ItemCollectionTransition > > 		StartTransitionsFunc [get, set]

Detailed Description

Definition at line 12 of file ItemCollectionTransitionProviderDerived.cs.

Member Function Documentation

override bool ShouldAnimateCore ( ItemCollectionTransition transition ) [inline, protected]

Definition at line 18 of file ItemCollectionTransitionProviderDerived.cs.

        {
            return ShouldAnimateFunc != null && ShouldAnimateFunc(transition);
        }

override void StartTransitions ( IList< ItemCollectionTransition > transitions ) [inline, protected]

Definition at line 23 of file ItemCollectionTransitionProviderDerived.cs.

        {
            StartTransitionsFunc?.Invoke(transitions);
        }

Property Documentation

Func<ItemCollectionTransition, bool> ShouldAnimateFunc [get, set]

Definition at line 14 of file ItemCollectionTransitionProviderDerived.cs.

Action<IList<ItemCollectionTransition> > StartTransitionsFunc [get, set]

Definition at line 16 of file ItemCollectionTransitionProviderDerived.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/ItemCollectionTransitionProviderDerived.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockElementFactory
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Private Attributes

MockElementFactory Class Reference

Inherits ElementFactory.

List of all members.

Classes

class | GetElementCallInfo
class | RecycleElementCallInfo

Public Member Functions

void | ValidateGetElementCalls (params GetElementCallInfo[] expected)
void | ValidateRecycleElementCalls (params RecycleElementCallInfo[] expected)

Static Public Member Functions

static MockElementFactory | CreateElementFactory< T > (List< T > mapping)
static MockElementFactory | CreateElementFactory< T > (Dictionary< int, T > mapping)

Protected Member Functions

override UIElement | GetElementCore (ElementFactoryGetArgs args)
override void | RecycleElementCore (ElementFactoryRecycleArgs args)

Properties

Action< UIElement, UIElement > | ClearElementFunc [get, set]
Func< int, UIElement, UIElement > | GetElementFunc [get, set]

Private Attributes

List< GetElementCallInfo > | _recordedGetElementCalls = new List<GetElementCallInfo>()
List< RecycleElementCallInfo > | _recordedRecycleElementCalls = new List<RecycleElementCallInfo>()

Detailed Description

Definition at line 19 of file MockViewGenerator.cs.

Member Function Documentation

static MockElementFactory CreateElementFactory< T > ( List< T > mapping ) [inline, static]
Type Constraints
T : UIElement
static MockElementFactory CreateElementFactory< T > ( Dictionary< int, T > mapping ) [inline, static]
Type Constraints
T : UIElement
override UIElement GetElementCore ( ElementFactoryGetArgs args ) [inline, protected]

Definition at line 70 of file MockViewGenerator.cs.

        {
            int index = RepeaterTestHooks.GetElementFactoryElementIndex();
            _recordedGetElementCalls.Add(new GetElementCallInfo(index, args.Parent));
            return GetElementFunc != null ? GetElementFunc(index, args.Parent) : null;
        }

override void RecycleElementCore ( ElementFactoryRecycleArgs args ) [inline, protected]

Definition at line 77 of file MockViewGenerator.cs.

        {
            _recordedRecycleElementCalls.Add(new RecycleElementCallInfo(args.Element, args.Parent));
            if (ClearElementFunc != null) { ClearElementFunc(args.Element, args.Parent); }
        }

void ValidateGetElementCalls ( params GetElementCallInfo[] expected ) [inline]

Definition at line 44 of file MockViewGenerator.cs.

        {
            Log.Comment("Validating GetElement calls");
            Verify.AreEqual(expected.Length, _recordedGetElementCalls.Count);
            for (int i = 0; i < expected.Length; ++i)
            {
                Verify.AreEqual(expected[i].Index, _recordedGetElementCalls[i].Index);
                Verify.AreEqual(expected[i].Owner, _recordedGetElementCalls[i].Owner);
            }

            _recordedGetElementCalls.Clear();
        }

void ValidateRecycleElementCalls ( params RecycleElementCallInfo[] expected ) [inline]

Definition at line 57 of file MockViewGenerator.cs.

        {
            Log.Comment("Validating RecycleElement calls");
            Verify.AreEqual(expected.Length, _recordedRecycleElementCalls.Count);
            for (int i = 0; i < expected.Length; ++i)
            {
                Verify.AreEqual(expected[i].Element, _recordedRecycleElementCalls[i].Element);
                Verify.AreEqual(expected[i].Owner, _recordedRecycleElementCalls[i].Owner);
            }

            _recordedRecycleElementCalls.Clear();
        }

Member Data Documentation

List<GetElementCallInfo> _recordedGetElementCalls = new List<GetElementCallInfo>() [private]

Definition at line 21 of file MockViewGenerator.cs.

List<RecycleElementCallInfo> _recordedRecycleElementCalls = new List<RecycleElementCallInfo>() [private]

Definition at line 22 of file MockViewGenerator.cs.

Property Documentation

Action<UIElement, UIElement> ClearElementFunc [get, set]

Definition at line 25 of file MockViewGenerator.cs.

Func<int, UIElement, UIElement> GetElementFunc [get, set]

Definition at line 24 of file MockViewGenerator.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockViewGenerator.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockElementFactory::GetElementCallInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockElementFactory
  • MockElementFactory::GetElementCallInfo
Public Member Functions | Properties

MockElementFactory::GetElementCallInfo Class Reference

List of all members.

Public Member Functions

GetElementCallInfo (int index, UIElement owner)

Properties

int | Index [get, set]
UIElement | Owner [get, set]

Detailed Description

Definition at line 83 of file MockViewGenerator.cs.

Constructor & Destructor Documentation

GetElementCallInfo | ( | int | index,
 |  | UIElement | owner |
 | ) |  |  | [inline]

Definition at line 88 of file MockViewGenerator.cs.

            {
                Index = index;
                Owner = owner;
            }

Property Documentation

int Index [get, set]

Definition at line 85 of file MockViewGenerator.cs.

UIElement Owner [get, set]

Definition at line 86 of file MockViewGenerator.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockViewGenerator.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockElementFactory::RecycleElementCallInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockElementFactory
  • MockElementFactory::RecycleElementCallInfo
Public Member Functions | Properties

MockElementFactory::RecycleElementCallInfo Class Reference

List of all members.

Public Member Functions

RecycleElementCallInfo (UIElement element, UIElement owner)

Properties

UIElement | Element [get, set]
UIElement | Owner [get, set]

Detailed Description

Definition at line 95 of file MockViewGenerator.cs.

Constructor & Destructor Documentation

RecycleElementCallInfo | ( | UIElement | element,
 |  | UIElement | owner |
 | ) |  |  | [inline]

Definition at line 100 of file MockViewGenerator.cs.

            {
                Element = element;
                Owner = owner;
            }

Property Documentation

UIElement Element [get, set]

Definition at line 97 of file MockViewGenerator.cs.

UIElement Owner [get, set]

Definition at line 98 of file MockViewGenerator.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockViewGenerator.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockItemsSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockItemsSource
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Properties | Private Attributes

MockItemsSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceView.

Inherited by MockItemsSourceWithUniqueIdMapping.

List of all members.

Classes

class | GetAtCallInfo
class | KeyFromIndexCallInfo

Public Member Functions

new void | OnItemsSourceChanged (NotifyCollectionChangedEventArgs args)
void | ValidateGetAtCalls (params GetAtCallInfo[] expected)
void | ValidateGetItemIdCalls (params KeyFromIndexCallInfo[] expected)
void | ValidateGetSizeCalls (int expectedCallCount)

Static Public Member Functions

static MockItemsSource | CreateDataSource (WinRTCollection data, bool supportsUniqueIds)
static MockItemsSource | CreateDataSource< T > (ObservableCollection< T > data, bool supportsUniqueIds)

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()

Protected Attributes

List< KeyFromIndexCallInfo > | _recordedKeyFromIndexCalls = new List<KeyFromIndexCallInfo>()

Properties

Func< int, object > | GetAtFunc [get, set]
Func< int, string > | GetItemIdFunc [get, set]
Func< int > | GetSizeFunc [get, set]
Func< bool > | HasKeyIndexMappingFunc [get, set]

Private Attributes

int | _getSizeCallsCount
List< GetAtCallInfo > | _recordedGetAtCalls = new List<GetAtCallInfo>()

Detailed Description

Definition at line 18 of file MockItemsSource.cs.

Member Function Documentation

static MockItemsSource CreateDataSource | ( | WinRTCollection | data,
 |  | bool | supportsUniqueIds |
 | ) |  |  | [inline, static]

Definition at line 54 of file MockItemsSource.cs.

        {
            MockItemsSource mock = null;
            if (supportsUniqueIds)
            {
                mock = new MockItemsSourceWithUniqueIdMapping
                {
                    GetSizeFunc = () => data.Count,
                    GetAtFunc = (index) => data[index],
                    GetItemIdFunc = (index) =>
                    {
                        if (supportsUniqueIds)
                        {
                            return data[index].ToString();
                        }
                        else
                        {
                            throw new InvalidOperationException();
                        }
                    }
                };
            }
            else
            {
                mock = new MockItemsSource
                {
                    GetSizeFunc = () => data.Count,
                    GetAtFunc = (index) => data[index],
                    GetItemIdFunc = (index) =>
                    {
                        if (supportsUniqueIds)
                        {
                            return data[index].ToString();
                        }
                        else
                        {
                            throw new InvalidOperationException();
                        }
                    }
                };

            }

            data.VectorChanged += (s, e) => mock.OnItemsSourceChanged(e.ConvertToDataSourceChangedEventArgs());

            return mock;
        }

static MockItemsSource CreateDataSource< T > | ( | ObservableCollection< T > | data,
 |  | bool | supportsUniqueIds |
 | ) |  |  | [inline, static]
override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 144 of file MockItemsSource.cs.

        {
            _recordedGetAtCalls.Add(new GetAtCallInfo(index));
            return GetAtFunc != null ? GetAtFunc(index) : null;
        }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 138 of file MockItemsSource.cs.

        {
            ++_getSizeCallsCount;
            return GetSizeFunc != null ? GetSizeFunc() : default(int);
        }

new void OnItemsSourceChanged ( NotifyCollectionChangedEventArgs args ) [inline]

Reimplemented from CustomItemsSourceView.

Definition at line 133 of file MockItemsSource.cs.

        {
            base.OnItemsSourceChanged(args);
        }

void ValidateGetAtCalls ( params GetAtCallInfo[] expected ) [inline]

Definition at line 109 of file MockItemsSource.cs.

        {
            Log.Comment("Validating GetAt calls");
            Verify.AreEqual(expected.Length, _recordedGetAtCalls.Count);
            for (int i = 0; i < expected.Length; ++i)
            {
                Verify.AreEqual(expected[i].Index, _recordedGetAtCalls[i].Index);
            }

            _recordedGetAtCalls.Clear();
        }

void ValidateGetItemIdCalls ( params KeyFromIndexCallInfo[] expected ) [inline]

Definition at line 121 of file MockItemsSource.cs.

        {
            Log.Comment("Validating GetItemId calls");
            Verify.AreEqual(expected.Length, _recordedKeyFromIndexCalls.Count);
            for (int i = 0; i < expected.Length; ++i)
            {
                Verify.AreEqual(expected[i].Index, _recordedKeyFromIndexCalls[i].Index);
            }

            _recordedKeyFromIndexCalls.Clear();
        }

void ValidateGetSizeCalls ( int expectedCallCount ) [inline]

Definition at line 102 of file MockItemsSource.cs.

        {
            Log.Comment("Validating GetSize calls");
            Verify.AreEqual(expectedCallCount, _getSizeCallsCount);
            _getSizeCallsCount = 0;
        }

Member Data Documentation

int _getSizeCallsCount [private]

Definition at line 22 of file MockItemsSource.cs.

List<GetAtCallInfo> _recordedGetAtCalls = new List<GetAtCallInfo>() [private]

Definition at line 20 of file MockItemsSource.cs.

List<KeyFromIndexCallInfo> _recordedKeyFromIndexCalls = new List<KeyFromIndexCallInfo>() [protected]

Definition at line 21 of file MockItemsSource.cs.

Property Documentation

Func<int, object> GetAtFunc [get, set]

Definition at line 25 of file MockItemsSource.cs.

Func<int, string> GetItemIdFunc [get, set]

Definition at line 27 of file MockItemsSource.cs.

Func<int> GetSizeFunc [get, set]

Definition at line 24 of file MockItemsSource.cs.

Func<bool> HasKeyIndexMappingFunc [get, set]

Definition at line 26 of file MockItemsSource.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockItemsSource.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockItemsSource::GetAtCallInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockItemsSource
  • MockItemsSource::GetAtCallInfo
Public Member Functions | Properties

MockItemsSource::GetAtCallInfo Class Reference

List of all members.

Public Member Functions

GetAtCallInfo (int index)

Properties

int Index [get, set]

Detailed Description

Definition at line 150 of file MockItemsSource.cs.

Constructor & Destructor Documentation

GetAtCallInfo ( int index ) [inline]

Definition at line 154 of file MockItemsSource.cs.

            {
                Index = index;
            }

Property Documentation

int Index [get, set]

Definition at line 152 of file MockItemsSource.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockItemsSource.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockItemsSource::KeyFromIndexCallInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockItemsSource
  • MockItemsSource::KeyFromIndexCallInfo
Public Member Functions | Properties

MockItemsSource::KeyFromIndexCallInfo Class Reference

List of all members.

Public Member Functions

KeyFromIndexCallInfo (int index)

Properties

int Index [get, set]

Detailed Description

Definition at line 160 of file MockItemsSource.cs.

Constructor & Destructor Documentation

KeyFromIndexCallInfo ( int index ) [inline]

Definition at line 164 of file MockItemsSource.cs.

            {
                Index = index;
            }

Property Documentation

int Index [get, set]

Definition at line 162 of file MockItemsSource.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockItemsSource.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockItemsSourceWithUniqueIdMapping Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockItemsSourceWithUniqueIdMapping
Public Member Functions

MockItemsSourceWithUniqueIdMapping Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks::MockItemsSource.

List of all members.

Public Member Functions

int | IndexFromKey (string id)
string | KeyFromIndex (int index)

Detailed Description

Definition at line 171 of file MockItemsSource.cs.

Member Function Documentation

int IndexFromKey ( string id ) [inline]

Definition at line 179 of file MockItemsSource.cs.

        {
            throw new NotImplementedException();
        }

string KeyFromIndex ( int index ) [inline]

Definition at line 173 of file MockItemsSource.cs.

        {
            _recordedKeyFromIndexCalls.Add(new KeyFromIndexCallInfo(index));
            return GetItemIdFunc != null ? GetItemIdFunc(index) : null;
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockItemsSource.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockNonVirtualizingLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockNonVirtualizingLayout
Public Member Functions | Protected Member Functions | Properties

MockNonVirtualizingLayout Class Reference

Inherits NonVirtualizingLayout.

List of all members.

Public Member Functions

new void | InvalidateMeasure ()

Protected Member Functions

override Size | ArrangeOverride (NonVirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (NonVirtualizingLayoutContext context, Size availableSize)

Properties

Func< Size,
NonVirtualizingLayoutContext,
Size > 		ArrangeLayoutFunc [get, set]
Func< Size,
NonVirtualizingLayoutContext,
Size > 		MeasureLayoutFunc [get, set]

Detailed Description

Definition at line 12 of file MockNonVirtualizingLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 27 of file MockNonVirtualizingLayout.cs.

        {
            return ArrangeLayoutFunc != null ? ArrangeLayoutFunc(finalSize, context) : default(Size);
        }

new void InvalidateMeasure ( ) [inline]

Definition at line 17 of file MockNonVirtualizingLayout.cs.

        {
            base.InvalidateMeasure();
        }

override Size MeasureOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 22 of file MockNonVirtualizingLayout.cs.

        {
            return MeasureLayoutFunc != null ? MeasureLayoutFunc(availableSize, context) : default(Size);
        }

Property Documentation

Func<Size, NonVirtualizingLayoutContext, Size> ArrangeLayoutFunc [get, set]

Definition at line 15 of file MockNonVirtualizingLayout.cs.

Func<Size, NonVirtualizingLayoutContext, Size> MeasureLayoutFunc [get, set]

Definition at line 14 of file MockNonVirtualizingLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockNonVirtualizingLayout.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockStackLayout
Public Member Functions | Protected Member Functions | Properties

MockStackLayout Class Reference

Inherits Microsoft::UI::Xaml::Controls::StackLayout.

List of all members.

Public Member Functions

new void | InvalidateMeasure ()

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

Func< Size,
VirtualizingLayoutContext,
Size > 		ArrangeLayoutFunc [get, set]
Func< Size,
VirtualizingLayoutContext,
Size > 		MeasureLayoutFunc [get, set]

Detailed Description

Definition at line 12 of file MockStackLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 27 of file MockStackLayout.cs.

        {
            return ArrangeLayoutFunc != null ? ArrangeLayoutFunc(finalSize, context) : default(Size);
        }

new void InvalidateMeasure ( ) [inline]

Definition at line 17 of file MockStackLayout.cs.

        {
            base.InvalidateMeasure();
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 22 of file MockStackLayout.cs.

        {
            return MeasureLayoutFunc != null ? MeasureLayoutFunc(availableSize, context) : default(Size);
        }

Property Documentation

Func<Size, VirtualizingLayoutContext, Size> ArrangeLayoutFunc [get, set]

Definition at line 15 of file MockStackLayout.cs.

Func<Size, VirtualizingLayoutContext, Size> MeasureLayoutFunc [get, set]

Definition at line 14 of file MockStackLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockStackLayout.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockVirtualizingLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
  • MockVirtualizingLayout
Public Member Functions | Protected Member Functions | Properties

MockVirtualizingLayout Class Reference

Inherits VirtualizingLayout.

List of all members.

Public Member Functions

new void | InvalidateMeasure ()

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

Func< Size,
VirtualizingLayoutContext,
Size > 		ArrangeLayoutFunc [get, set]
Func< Size,
VirtualizingLayoutContext,
Size > 		MeasureLayoutFunc [get, set]

Detailed Description

Definition at line 11 of file MockVirtualizingLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 26 of file MockVirtualizingLayout.cs.

        {
            return ArrangeLayoutFunc != null ? ArrangeLayoutFunc(finalSize, context) : default(Size);
        }

new void InvalidateMeasure ( ) [inline]

Definition at line 16 of file MockVirtualizingLayout.cs.

        {
            base.InvalidateMeasure();
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 21 of file MockVirtualizingLayout.cs.

        {
            return MeasureLayoutFunc != null ? MeasureLayoutFunc(availableSize, context) : default(Size);
        }

Property Documentation

Func<Size, VirtualizingLayoutContext, Size> ArrangeLayoutFunc [get, set]

Definition at line 14 of file MockVirtualizingLayout.cs.

Func<Size, VirtualizingLayoutContext, Size> MeasureLayoutFunc [get, set]

Definition at line 13 of file MockVirtualizingLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/Mocks/MockVirtualizingLayout.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NamedGroup-g< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • NamedGroup-g< T >
Public Member Functions | Properties

NamedGroup-g< T > Class Template Reference

List of all members.

Public Member Functions

NamedGroup (string name, IEnumerable< T > collection)

Properties

string Name [get, set]

Detailed Description

template<T>
class Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::NamedGroup-g< T >

Definition at line 10 of file NamedGroup.cs.

Member Function Documentation

NamedGroup | ( | string | name,
 |  | IEnumerable< T > | collection |
 | ) |  |  | [inline]

Definition at line 14 of file NamedGroup.cs.

            : base(collection)
        {
            Name = name;
        }

Property Documentation

string Name [get, set]

Definition at line 12 of file NamedGroup.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/NamedGroup.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NonVirtualStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • NonVirtualStackLayout
Protected Member Functions

NonVirtualStackLayout Class Reference

Inherits NonVirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (NonVirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (NonVirtualizingLayoutContext context, Size availableSize)

Detailed Description

Definition at line 11 of file NonVirtualStackLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 27 of file NonVirtualStackLayout.cs.

        {
            double offset = 0.0;
            foreach (var element in context.Children)
            {
                element.Arrange(new Rect(0, offset, element.DesiredSize.Width, element.DesiredSize.Height));
                offset += element.DesiredSize.Height;
            }

            return finalSize;
        }

override Size MeasureOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 13 of file NonVirtualStackLayout.cs.

        {
            double extentHeight = 0.0;
            double extentWidth = 0.0;
            foreach (var element in context.Children)
            {
                element.Measure(availableSize);
                extentHeight += element.DesiredSize.Height;
                extentWidth = Math.Max(extentWidth, element.DesiredSize.Width);
            }

            return new Size(extentWidth, extentHeight);
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/NonVirtualStackLayout.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: OrientationBasedMeasures Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • OrientationBasedMeasures
Public Member Functions | Properties | Private Member Functions | Private Attributes

OrientationBasedMeasures Class Reference

List of all members.

Public Member Functions

OrientationBasedMeasures (ScrollOrientation o, bool useLayoutRounding=true)
double | Major (Size size)
double | MajorEnd (Rect rect)
double | MajorSize (Rect rect)
double | MajorStart (Rect rect)
double | Minor (Size size)
Point | MinorMajorPoint (double minor, double major)
Rect | MinorMajorRect (double minor, double major, double minorSize, double majorSize)
Size | MinorMajorSize (double minor, double major)
double | MinorSize (Rect rect)
double | MinorStart (Rect rect)
void | SetMajorSize (ref Rect rect, double value)
void | SetMajorStart (ref Rect rect, double value)
void | SetMinorStart (ref Rect rect, double value)

Properties

bool | IsVertical [get]
ScrollOrientation | ScrollOrientation [get, set]

Private Member Functions

double | RoundForLayout (double value)

Private Attributes

double | m_rawPixelsPerViewPixel = 1.0
bool | m_useLayoutRounding

Detailed Description

Definition at line 13 of file OrientationBasedMeasures.cs.

Constructor & Destructor Documentation

OrientationBasedMeasures | ( | ScrollOrientation | o,
 |  | bool | useLayoutRounding = true |
 | ) |  |  | [inline]

Definition at line 24 of file OrientationBasedMeasures.cs.

        {
            ScrollOrientation = o;
            m_useLayoutRounding = useLayoutRounding;

            bool? hasThreadAccess = CoreWindow.GetForCurrentThread()?.Dispatcher?.HasThreadAccess;
            if (useLayoutRounding && hasThreadAccess.HasValue && hasThreadAccess.Value)
                m_rawPixelsPerViewPixel = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
        }

Member Function Documentation

double Major ( Size size ) [inline]

Definition at line 34 of file OrientationBasedMeasures.cs.

        {
            return RoundForLayout(IsVertical ? size.Height : size.Width);
        }

double MajorEnd ( Rect rect ) [inline]

Definition at line 59 of file OrientationBasedMeasures.cs.

        {
            return RoundForLayout(IsVertical ? rect.Bottom : rect.Right);
        }

double MajorSize ( Rect rect ) [inline]

Definition at line 44 of file OrientationBasedMeasures.cs.

        {
            return RoundForLayout(IsVertical ? rect.Height : rect.Width);
        }

double MajorStart ( Rect rect ) [inline]

Definition at line 54 of file OrientationBasedMeasures.cs.

        {
            return RoundForLayout(IsVertical ? rect.Top : rect.Left);
        }

double Minor ( Size size ) [inline]

Definition at line 39 of file OrientationBasedMeasures.cs.

        {
            return RoundForLayout(IsVertical ? size.Width : size.Height);
        }

Point MinorMajorPoint | ( | double | minor,
 |  | double | major |
 | ) |  |  | [inline]

Definition at line 117 of file OrientationBasedMeasures.cs.

        {
            var min = RoundForLayout(minor);
            var maj = RoundForLayout(major);
            return
                IsVertical ?
                new Point(min, maj) :
                new Point(maj, min);
        }

Rect MinorMajorRect | ( | double | minor,
 |  | double | major,
 |  | double | minorSize,
 |  | double | majorSize |
 | ) |  |  | [inline]

Definition at line 105 of file OrientationBasedMeasures.cs.

        {
            var min = RoundForLayout(minor);
            var maj = RoundForLayout(major);
            var minSize = RoundForLayout(minorSize);
            var majSize = RoundForLayout(majorSize);
            return
                IsVertical ?
                new Rect(min, maj, minSize, majSize) :
                new Rect(maj, min, majSize, minSize);
        }

Size MinorMajorSize | ( | double | minor,
 |  | double | major |
 | ) |  |  | [inline]

Definition at line 127 of file OrientationBasedMeasures.cs.

        {
            var min = RoundForLayout(minor);
            var maj = RoundForLayout(major);
            return
                IsVertical ?
                new Size(min, maj) :
                new Size(maj, min);
        }

double MinorSize ( Rect rect ) [inline]

Definition at line 49 of file OrientationBasedMeasures.cs.

        {
            return RoundForLayout(IsVertical ? rect.Width : rect.Height);
        }

double MinorStart ( Rect rect ) [inline]

Definition at line 64 of file OrientationBasedMeasures.cs.

        {
            return RoundForLayout(IsVertical ? rect.Left : rect.Top);
        }

double RoundForLayout ( double value ) [inline, private]

Definition at line 137 of file OrientationBasedMeasures.cs.

        {
            if (m_useLayoutRounding)
                return global::System.Math.Floor((m_rawPixelsPerViewPixel * value) + 0.5) / m_rawPixelsPerViewPixel;
            else
                return value;
        }

void SetMajorSize | ( | ref Rect | rect,
 |  | double | value |
 | ) |  |  | [inline]

Definition at line 69 of file OrientationBasedMeasures.cs.

        {
            if (IsVertical)
            {
                rect.Height = RoundForLayout(value);
            }
            else
            {
                rect.Width = RoundForLayout(value);
            }
        }

void SetMajorStart | ( | ref Rect | rect,
 |  | double | value |
 | ) |  |  | [inline]

Definition at line 81 of file OrientationBasedMeasures.cs.

        {
            if (IsVertical)
            {
                rect.Y = RoundForLayout(value);
            }
            else
            {
                rect.X = RoundForLayout(value);
            }
        }

void SetMinorStart | ( | ref Rect | rect,
 |  | double | value |
 | ) |  |  | [inline]

Definition at line 93 of file OrientationBasedMeasures.cs.

        {
            if (IsVertical)
            {
                rect.X = RoundForLayout(value);
            }
            else
            {
                rect.Y = RoundForLayout(value);
            }
        }

Member Data Documentation

double m_rawPixelsPerViewPixel = 1.0 [private]

Definition at line 16 of file OrientationBasedMeasures.cs.

bool m_useLayoutRounding [private]

Definition at line 17 of file OrientationBasedMeasures.cs.

Property Documentation

bool IsVertical [get]

Definition at line 20 of file OrientationBasedMeasures.cs.

ScrollOrientation ScrollOrientation [get, set]

Definition at line 15 of file OrientationBasedMeasures.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/OrientationBasedMeasures.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ReadOnlyNotifyPropertyChangedCollection-g< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • ReadOnlyNotifyPropertyChangedCollection-g< T >
Public Member Functions | Public Attributes | Protected Member Functions | Properties | Events | Private Member Functions | Private Attributes

ReadOnlyNotifyPropertyChangedCollection-g< T > Class Template Reference

List of all members.

Public Member Functions

IEnumerator< T > | GetEnumerator ()
int | IndexFromKey (string key)
string | KeyFromIndex (int index)
ReadOnlyNotifyPropertyChangedCollection ()
ReadOnlyNotifyPropertyChangedCollection (IEnumerable< T > data)

Public Attributes

int | Count = > Data.Count
T | this [int index] = > Data[index]

Protected Member Functions

virtual void | OnCollectionChanged (object sender, NotifyCollectionChangedEventArgs e)

Properties

ObservableCollection< T > | Data [get, set]

Events

NotifyCollectionChangedEventHandler | CollectionChanged

Private Member Functions

IEnumerator IEnumerable. | GetEnumerator ()

Private Attributes

ObservableCollection< T > | _data = null

Detailed Description

template<T>
class Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::ReadOnlyNotifyPropertyChangedCollection-g< T >

Definition at line 11 of file ReadOnlyNotifyPropertyChangedCollection.cs.

Member Function Documentation

IEnumerator<T> GetEnumerator ( ) [inline]

Definition at line 26 of file ReadOnlyNotifyPropertyChangedCollection.cs.

        {
            throw new NotImplementedException("This is not implemented and should not have be used");
        }

IEnumerator IEnumerable. GetEnumerator ( ) [inline, private]

Definition at line 31 of file ReadOnlyNotifyPropertyChangedCollection.cs.

        {
            throw new NotImplementedException("This is not implemented and should not have be used");
        }

int IndexFromKey ( string key ) [inline]

Definition at line 54 of file ReadOnlyNotifyPropertyChangedCollection.cs.

        {
            throw new Exception();
        }

string KeyFromIndex ( int index ) [inline]

Definition at line 49 of file ReadOnlyNotifyPropertyChangedCollection.cs.

        {
            return this[index].GetHashCode().ToString();
        }

virtual void OnCollectionChanged | ( | object | sender,
 |  | NotifyCollectionChangedEventArgs | e |
 | ) |  |  | [inline, protected, virtual]

Definition at line 42 of file ReadOnlyNotifyPropertyChangedCollection.cs.

        {
            this.CollectionChanged?.Invoke(this, e);
        }

ReadOnlyNotifyPropertyChangedCollection ( ) [inline]

Definition at line 13 of file ReadOnlyNotifyPropertyChangedCollection.cs.

{ }

ReadOnlyNotifyPropertyChangedCollection ( IEnumerable< T > data ) [inline]

Definition at line 15 of file ReadOnlyNotifyPropertyChangedCollection.cs.

        {
            Data = new ObservableCollection<T>(data);
        }

Member Data Documentation

ObservableCollection<T> _data = null [private]

Definition at line 92 of file ReadOnlyNotifyPropertyChangedCollection.cs.

int Count = > Data.Count

Definition at line 22 of file ReadOnlyNotifyPropertyChangedCollection.cs.

T this[int index] = > Data[index]

Definition at line 24 of file ReadOnlyNotifyPropertyChangedCollection.cs.

Property Documentation

ObservableCollection<T> Data [get, set]

Definition at line 60 of file ReadOnlyNotifyPropertyChangedCollection.cs.

Event Documentation

NotifyCollectionChangedEventHandler CollectionChanged

Definition at line 40 of file ReadOnlyNotifyPropertyChangedCollection.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/ReadOnlyNotifyPropertyChangedCollection.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclingElementFactoryDerived Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • RecyclingElementFactoryDerived
Public Member Functions | Protected Member Functions | Properties | Private Attributes

RecyclingElementFactoryDerived Class Reference

Inherits RecyclingElementFactory.

List of all members.

Public Member Functions

RecyclingElementFactoryDerived ()

Protected Member Functions

override UIElement | GetElementCore (ElementFactoryGetArgs context)
override string | OnSelectTemplateKeyCore (object data, UIElement owner)
override void | RecycleElementCore (ElementFactoryRecycleArgs context)

Properties

Action< UIElement, UIElement > | ClearElementFunc [get, set]
Func< int, UIElement,
UIElement, UIElement > 		GetElementFunc [get, set]
List< int > | RealizedElementIndices [get]
Func< object, UIElement, string > | SelectTemplateIdFunc [get, set]
bool | ValidateElementIndices [get, set]

Private Attributes

List< int > | _realizedElementIndices = new List<int>()
List< UIElement > | _realizedElements = new List<UIElement>()

Detailed Description

Definition at line 13 of file RecyclingViewGeneratorDerived.cs.

Constructor & Destructor Documentation

RecyclingElementFactoryDerived ( ) [inline]

Definition at line 28 of file RecyclingViewGeneratorDerived.cs.

        {
            ValidateElementIndices = true;
        }

Member Function Documentation

override UIElement GetElementCore ( ElementFactoryGetArgs context ) [inline, protected]

Definition at line 33 of file RecyclingViewGeneratorDerived.cs.

        {
            UIElement element = base.GetElementCore(context);
            int index = RepeaterTestHooks.GetElementFactoryElementIndex();
            if (GetElementFunc != null)
            {
                element = GetElementFunc(index, context.Parent, element);
            }

            if (!RealizedElementIndices.Contains(index))
            {
                _realizedElements.Add(element);
                _realizedElementIndices.Add(index);
            }
            else if (ValidateElementIndices)
            {
                throw new InvalidOperationException("Cannot request an element that has already been realized.");
            }

            return element;
        }

override string OnSelectTemplateKeyCore | ( | object | data,
 |  | UIElement | owner |
 | ) |  |  | [inline, protected]

Definition at line 72 of file RecyclingViewGeneratorDerived.cs.

        {
            if (SelectTemplateIdFunc != null)
            {
                return SelectTemplateIdFunc(data, owner);
            }
            else
            {
                return base.OnSelectTemplateKeyCore(data, owner);
            }
        }

override void RecycleElementCore ( ElementFactoryRecycleArgs context ) [inline, protected]

Definition at line 55 of file RecyclingViewGeneratorDerived.cs.

        {
            base.RecycleElementCore(context);
            if (ClearElementFunc != null) { ClearElementFunc(context.Element, context.Parent); }

            int elementIndex = _realizedElements.IndexOf(context.Element);
            if (elementIndex != -1)
            {
                _realizedElements.RemoveAt(elementIndex);
                _realizedElementIndices.RemoveAt(elementIndex);
            }
            else if (ValidateElementIndices)
            {
                throw new InvalidOperationException("Cannot clear an element that has not been created or already been cleared.");
            }
        }

Member Data Documentation

List<int> _realizedElementIndices = new List<int>() [private]

Definition at line 16 of file RecyclingViewGeneratorDerived.cs.

List<UIElement> _realizedElements = new List<UIElement>() [private]

Definition at line 15 of file RecyclingViewGeneratorDerived.cs.

Property Documentation

Action<UIElement, UIElement> ClearElementFunc [get, set]

Definition at line 20 of file RecyclingViewGeneratorDerived.cs.

Func<int, UIElement, UIElement, UIElement> GetElementFunc [get, set]

Definition at line 18 of file RecyclingViewGeneratorDerived.cs.

List<int> RealizedElementIndices [get]

Definition at line 24 of file RecyclingViewGeneratorDerived.cs.

Func<object, UIElement, string> SelectTemplateIdFunc [get, set]

Definition at line 22 of file RecyclingViewGeneratorDerived.cs.

bool ValidateElementIndices [get, set]

Definition at line 26 of file RecyclingViewGeneratorDerived.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/RecyclingViewGeneratorDerived.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WinRTCollection Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • WinRTCollection
Classes | Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

WinRTCollection Class Reference

List of all members.

Classes

class | VectorChangedEventArgs

Public Member Functions

WinRTCollection (IEnumerable< object > collection)
void | Add (object item)
void | Clear ()
bool | Contains (object item)
void | CopyTo (object[] array, int arrayIndex)
IEnumerator< object > | GetEnumerator ()
int | IndexOf (object item)
void | Insert (int index, object item)
bool | Remove (object item)
void | RemoveAt (int index)
void | Reset ()
void | ResetWith (IEnumerable< object > enumerable)

Properties

int | Count [get]
bool | IsReadOnly [get]
object | this [int index] [get, set]

Events

VectorChangedEventHandler< object > | VectorChanged

Private Member Functions

IEnumerator IEnumerable. | GetEnumerator ()

Private Attributes

IList< object > | m_data

Detailed Description

Definition at line 10 of file WinRTCollection.cs.

Constructor & Destructor Documentation

WinRTCollection ( IEnumerable< object > collection ) [inline]

Definition at line 14 of file WinRTCollection.cs.

        {
            m_data = new List<object>(collection);
        }

Member Function Documentation

void Add ( object item ) [inline]

Definition at line 34 of file WinRTCollection.cs.

        {
            m_data.Add(item);
            if (VectorChanged != null) { VectorChanged(this, new VectorChangedEventArgs(CollectionChange.ItemInserted, (uint)m_data.Count - 1u)); }
        }

void Clear ( ) [inline]

Definition at line 40 of file WinRTCollection.cs.

        {
            m_data.Clear();
            if (VectorChanged != null) { VectorChanged(this, new VectorChangedEventArgs(CollectionChange.Reset, 0u)); }
        }

bool Contains ( object item ) [inline]

Definition at line 46 of file WinRTCollection.cs.

        {
            return m_data.Contains(item);
        }

void CopyTo | ( | object[] | array,
 |  | int | arrayIndex |
 | ) |  |  | [inline]

Definition at line 51 of file WinRTCollection.cs.

        {
            m_data.CopyTo(array, arrayIndex);
        }

IEnumerator IEnumerable. GetEnumerator ( ) [inline, private]

Definition at line 90 of file WinRTCollection.cs.

        {
            return m_data.GetEnumerator();
        }

IEnumerator<object> GetEnumerator ( ) [inline]

Definition at line 56 of file WinRTCollection.cs.

        {
            return m_data.GetEnumerator();
        }

int IndexOf ( object item ) [inline]

Definition at line 61 of file WinRTCollection.cs.

        {
            return m_data.IndexOf(item);
        }

void Insert | ( | int | index,
 |  | object | item |
 | ) |  |  | [inline]

Definition at line 66 of file WinRTCollection.cs.

        {
            m_data.Insert(index, item);
            if (VectorChanged != null) { VectorChanged(this, new VectorChangedEventArgs(CollectionChange.ItemInserted, (uint)index)); }
        }

bool Remove ( object item ) [inline]

Definition at line 72 of file WinRTCollection.cs.

        {
            var index = (uint)m_data.IndexOf(item);
            if (m_data.Remove(item))
            {
                if (VectorChanged != null) { VectorChanged(this, new VectorChangedEventArgs(CollectionChange.ItemRemoved, index)); }
                return true;
            }

            return false;
        }

void RemoveAt ( int index ) [inline]

Definition at line 84 of file WinRTCollection.cs.

        {
            m_data.RemoveAt(index);
            if (VectorChanged != null) { VectorChanged(this, new VectorChangedEventArgs(CollectionChange.ItemRemoved, (uint)index)); }
        }

void Reset ( ) [inline]

Definition at line 95 of file WinRTCollection.cs.

        {
            if (VectorChanged != null) { VectorChanged(this, new VectorChangedEventArgs(CollectionChange.Reset, 0)); }
        }

void ResetWith ( IEnumerable< object > enumerable ) [inline]

Definition at line 100 of file WinRTCollection.cs.

        {
            m_data = new List<object>(enumerable);
            Reset();
        }

Member Data Documentation

IList<object> m_data [private]

Definition at line 12 of file WinRTCollection.cs.

Property Documentation

int Count [get]

Definition at line 29 of file WinRTCollection.cs.

bool IsReadOnly [get]

Definition at line 30 of file WinRTCollection.cs.

object this[int index] [get, set]

Definition at line 20 of file WinRTCollection.cs.

Event Documentation

VectorChangedEventHandler<object> VectorChanged

Definition at line 32 of file WinRTCollection.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/WinRTCollection.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WinRTCollection::VectorChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • WinRTCollection
  • WinRTCollection::VectorChangedEventArgs
Public Member Functions | Properties

WinRTCollection::VectorChangedEventArgs Class Reference

List of all members.

Public Member Functions

VectorChangedEventArgs (CollectionChange change, uint index)

Properties

CollectionChange | CollectionChange [get, set]
uint | Index [get, set]

Detailed Description

Definition at line 106 of file WinRTCollection.cs.

Constructor & Destructor Documentation

VectorChangedEventArgs | ( | CollectionChange | change,
 |  | uint | index |
 | ) |  |  | [inline]

Definition at line 111 of file WinRTCollection.cs.

            {
                CollectionChange = change;
                Index = index;
            }

Property Documentation

CollectionChange CollectionChange [get, set]

Definition at line 108 of file WinRTCollection.cs.

uint Index [get, set]

Definition at line 109 of file WinRTCollection.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/WinRTCollection.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomSelectionModel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • CustomSelectionModel
Properties | Private Attributes

CustomSelectionModel Class Reference

Inherits SelectionModel.

List of all members.

Properties

int | IntProperty [get, set]

Private Attributes

int | _intProperty

Detailed Description

Definition at line 1513 of file SelectionModelTests.cs.

Member Data Documentation

int _intProperty [private]

Definition at line 1525 of file SelectionModelTests.cs.

Property Documentation

int IntProperty [get, set]

Definition at line 1516 of file SelectionModelTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/SelectionModelTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EffectiveViewportScrollPresenterTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • EffectiveViewportScrollPresenterTests
Public Member Functions | Private Member Functions | Static Private Member Functions

EffectiveViewportScrollPresenterTests Class Reference

List of all members.

Public Member Functions

void | CanBringIntoViewElements ()
void | CanGrowCacheBuffer ()
void | ValidateOneScrollPresenterScenario ()
void | ValidateTwoScrollPresentersScenario ()

Private Member Functions

void | ValidateRealizedRange (ItemsRepeater itemsRepeater, int expectedFirstItemIndex, int expectedLastItemIndex)

Static Private Member Functions

static VirtualizingLayout | GetMonitoringLayout (Size desiredSize, List< Rect > realizationRects)

Detailed Description

Definition at line 30 of file EffectiveViewportScrollPresenterTests.cs.

Member Function Documentation

void CanBringIntoViewElements ( ) [inline]

Definition at line 268 of file EffectiveViewportScrollPresenterTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            ItemsRepeater itemsRepeater = null;
            var rootLoadedEvent = new AutoResetEvent(initialState: false);
            var viewChangedEvent = new AutoResetEvent(initialState: false);
            var waitingForIndex = -1;
            var indexRealized = new AutoResetEvent(initialState: false);
            var viewChangedOffsets = new List<double>();

            RunOnUIThread.Execute(() =>
            {
                var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
                var root = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
                     @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                             xmlns:controls='using:Microsoft.UI.Xaml.Controls'
                             xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'>
                         <Grid.Resources>
                           <controls:StackLayout x:Name='VerticalStackLayout'/>
                           <controls:RecyclingElementFactory x:Key='ElementFactory'>
                             <controls:RecyclingElementFactory.RecyclePool>
                               <controls:RecyclePool/>
                             </controls:RecyclingElementFactory.RecyclePool>
                             <DataTemplate x:Key='ItemTemplate'>
                               <Border Background='LightGray' Margin='5' Height='94'>
                                 <TextBlock Text='{Binding}' TextWrapping='WrapWholeWords'/>
                               </Border>
                             </DataTemplate>
                           </controls:RecyclingElementFactory>
                         </Grid.Resources>
                         <primitives:ScrollPresenter x:Name='ScrollPresenter' Width='400' Height='600' ContentOrientation='Vertical' Background='Gray'>
                           <controls:ItemsRepeater
                             x:Name='ItemsRepeater'
                             ItemTemplate='{StaticResource ElementFactory}'
                             Layout='{StaticResource VerticalStackLayout}'
                             HorizontalCacheLength='0'
                             VerticalCacheLength='0'/>
                         </primitives:ScrollPresenter>
                       </Grid>"));

                var elementFactory = (RecyclingElementFactory)root.Resources["ElementFactory"];
                scrollPresenter = (ScrollPresenter)root.FindName("ScrollPresenter");
                itemsRepeater = (ItemsRepeater)root.FindName("ItemsRepeater");

                itemsRepeater.ElementPrepared += (sender, args) =>
                {
                    Log.Comment($"ItemsRepeater.ElementPrepared - Realized index: {args.Index}. Waiting for index: {waitingForIndex}");
                    if (args.Index == waitingForIndex)
                    {
                        indexRealized.Set();
                    }
                };

                var items = Enumerable.Range(0, 400).Select(i => string.Format("{0}: {1}", i, lorem.Substring(0, 250)));

                itemsRepeater.ItemsSource = items;

                scrollPresenter.ViewChanged += (o, e) =>
                {
                    Log.Comment($"ScrollPresenter.ViewChanged - VerticalOffset: {scrollPresenter.VerticalOffset}");
                    viewChangedOffsets.Add(scrollPresenter.VerticalOffset);
                    viewChangedEvent.Set();
                };

                scrollPresenter.BringingIntoView += (o, e) =>
                {
                    Log.Comment("ScrollPresenter.BringingIntoView - ");
                    Log.Comment($"    TargetVerticalOffset: {e.TargetVerticalOffset}");
                    Log.Comment($"    RequestEventArgs.AnimationDesired: {e.RequestEventArgs.AnimationDesired}");
                    Log.Comment($"    RequestEventArgs.Handled: {e.RequestEventArgs.Handled}");
                    Log.Comment($"    RequestEventArgs.VerticalAlignmentRatio: {e.RequestEventArgs.VerticalAlignmentRatio}");
                    Log.Comment($"    RequestEventArgs.VerticalOffset: {e.RequestEventArgs.VerticalOffset}");
                    Log.Comment($"    RequestEventArgs.TargetRect: {e.RequestEventArgs.TargetRect}");
                };

                root.Loaded += delegate {
                    rootLoadedEvent.Set();
                };

                Content = root;
            });
            Verify.IsTrue(rootLoadedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("\r\nStartBringIntoView for item index 100, w/ 0.5 vertical alignment.");
                waitingForIndex = 96;
                viewChangedEvent.Reset();
                indexRealized.Reset();
                itemsRepeater.GetOrCreateElement(100).StartBringIntoView(new BringIntoViewOptions {
                    VerticalAlignmentRatio = 0.5
                });
                itemsRepeater.UpdateLayout();
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
            Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.AreEqual(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();

            ValidateRealizedRange(itemsRepeater, 96, 103);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("\r\nStartBringIntoView for item index 103 (already realized) w/ animation.");
                waitingForIndex = 107;
                viewChangedEvent.Reset();
                indexRealized.Reset();
                itemsRepeater.TryGetElement(103).StartBringIntoView(new BringIntoViewOptions
                {
                    VerticalAlignmentRatio = 0.5,
                    AnimationDesired = true
                });
                itemsRepeater.UpdateLayout();
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
            Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment("Waiting for animation to settle at final vertical offset.");
            CompositionPropertySpy.SynchronouslyTickUIThread(32);

            Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.IsLessThanOrEqual(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();

            ValidateRealizedRange(itemsRepeater, 99, 107);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("\r\nStartBringIntoView for disconnected item index 0, to the top w/ unfulfilled animation and 0.5 vertical alignment.");
                waitingForIndex = 6;
                viewChangedEvent.Reset();
                indexRealized.Reset();
                itemsRepeater.GetOrCreateElement(0).StartBringIntoView(new BringIntoViewOptions
                {
                    VerticalAlignmentRatio = 0.5,
                    AnimationDesired = true
                });
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
            Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.AreEqual(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();

            ValidateRealizedRange(itemsRepeater, 0, 6);

            RunOnUIThread.Execute(() =>
            {
                // You can't align the first item in the middle obviously.
                Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);

                Log.Comment("\r\nStartBringIntoView for item index 20.");
                waitingForIndex = 26;
                viewChangedEvent.Reset();
                indexRealized.Reset();
                itemsRepeater.GetOrCreateElement(20).StartBringIntoView(new BringIntoViewOptions
                {
                    VerticalAlignmentRatio = 0.0
                });
                itemsRepeater.UpdateLayout();
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
            Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.AreEqual(1, viewChangedOffsets.Count);

            ValidateRealizedRange(itemsRepeater, 19, 26);
        }

void CanGrowCacheBuffer ( ) [inline]

Definition at line 186 of file EffectiveViewportScrollPresenterTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            ItemsRepeater repeater = null;
            var measureRealizationRects = new List<Rect>();
            var arrangeRealizationRects = new List<Rect>();
            var fullCacheEvent = new ManualResetEvent(initialState: false);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Preparing the visual tree...");

                scrollPresenter = new ScrollPresenter
                {
                    Width = 400,
                    Height = 400
                };

                var layout = new MockVirtualizingLayout
                {
                    MeasureLayoutFunc = (availableSize, context) =>
                    {
                        var ctx = (VirtualizingLayoutContext)context;
                        measureRealizationRects.Add(ctx.RealizationRect);
                        return new Size(1000, 2000);
                    },

                    ArrangeLayoutFunc = (finalSize, context) =>
                    {
                        var ctx = (VirtualizingLayoutContext)context;
                        arrangeRealizationRects.Add(ctx.RealizationRect);

                        if (ctx.RealizationRect.Height == scrollPresenter.Height * (repeater.VerticalCacheLength + 1))
                        {
                            fullCacheEvent.Set();
                        }

                        return finalSize;
                    }
                };

                repeater = new ItemsRepeater()
                {
                    Layout = layout
                };

                scrollPresenter.Content = repeater;
                Content = scrollPresenter;
            });

            if (!fullCacheEvent.WaitOne(500000)) Verify.Fail("Cache full size never reached.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var cacheLength = repeater.VerticalCacheLength;
                var expectedRealizationWindow = new Rect(
                    -cacheLength / 2 * scrollPresenter.Width,
                    -cacheLength / 2 * scrollPresenter.Height,
                    (1 + cacheLength) * scrollPresenter.Width,
                    (1 + cacheLength) * scrollPresenter.Height);

                Log.Comment("Validate that the realization window reached full size.");
                Verify.AreEqual(expectedRealizationWindow, measureRealizationRects.Last());

                Log.Comment("Validate that the realization window grew by 40 pixels each time during the process.");
                for (int i = 2; i < measureRealizationRects.Count; ++i)
                {
                    Verify.AreEqual(-40, measureRealizationRects[i].X - measureRealizationRects[i - 1].X);
                    Verify.AreEqual(-40, measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y);
                    Verify.AreEqual(80, measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width);
                    Verify.AreEqual(80, measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height);

                    Verify.AreEqual(-40, arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X);
                    Verify.AreEqual(-40, arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y);
                    Verify.AreEqual(80, arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width);
                    Verify.AreEqual(80, arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height);
                }
            });
        }

static VirtualizingLayout GetMonitoringLayout | ( | Size | desiredSize,
 |  | List< Rect > | realizationRects |
 | ) |  |  | [inline, static, private]

Definition at line 490 of file EffectiveViewportScrollPresenterTests.cs.

        {
            return new MockVirtualizingLayout
            {
                MeasureLayoutFunc = (availableSize, context) =>
                {
                    var ctx = (VirtualizingLayoutContext)context;
                    realizationRects.Add(ctx.RealizationRect);
                    return desiredSize;
                },

                ArrangeLayoutFunc = (finalSize, context) => finalSize
            };
        }

void ValidateOneScrollPresenterScenario ( ) [inline]

Definition at line 33 of file EffectiveViewportScrollPresenterTests.cs.

        {
            var realizationRects = new List<Rect>();
            ScrollPresenter scrollPresenter = null;
            var scrollCompletedEvent = new AutoResetEvent(false);
            var zoomCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater()
                {
                    Layout = GetMonitoringLayout(new Size(500, 600), realizationRects),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                scrollPresenter = new ScrollPresenter
                {
                    Content = repeater,
                    Width = 200,
                    Height = 300
                };

                Content = scrollPresenter;
                Content.UpdateLayout();

                Verify.AreEqual(2, realizationRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
                realizationRects.Clear();

                scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    scrollCompletedEvent.Set();
                };

                scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
                {
                    zoomCompletedEvent.Set();
                };
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();

                scrollPresenter.ZoomTo(2.0f, Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(zoomCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(
                    new Rect(0, 100, 100, 150),
                    realizationRects.Last());
                realizationRects.Clear();
            });
        }

void ValidateRealizedRange | ( | ItemsRepeater | itemsRepeater,
 |  | int | expectedFirstItemIndex,
 |  | int | expectedLastItemIndex |
 | ) |  |  | [inline, private]

Definition at line 451 of file EffectiveViewportScrollPresenterTests.cs.

        {
            Log.Comment("Validating Realized Range...");
            int actualFirstItemIndex = -1;
            int actualLastItemIndex = -1;
            int itemIndex = 0;

            RunOnUIThread.Execute(() =>
            {
                var items = itemsRepeater.ItemsSource as IEnumerable<string>;

                foreach (var item in items)
                {
                    var itemElement = itemsRepeater.TryGetElement(itemIndex);

                    if (itemElement != null)
                    {
                        actualFirstItemIndex =
                            actualFirstItemIndex == -1 ?
                            itemIndex :
                            actualFirstItemIndex;
                        actualLastItemIndex = itemIndex;

                        Log.Comment($"Realized Index - {itemIndex}");
                    }

                    ++itemIndex;
                }
            });

            Log.Comment($"FirstItemIndex - {expectedFirstItemIndex}  {actualFirstItemIndex}");
            Log.Comment($"LastItemIndex  - {expectedLastItemIndex}  {actualLastItemIndex}");
            Verify.AreEqual(expectedFirstItemIndex, actualFirstItemIndex);
            Verify.AreEqual(expectedLastItemIndex, actualLastItemIndex);
        }

void ValidateTwoScrollPresentersScenario ( ) [inline]

Definition at line 103 of file EffectiveViewportScrollPresenterTests.cs.

        {
            var realizationRects = new List<Rect>();
            ScrollPresenter horizontalScrollPresenter = null;
            ScrollPresenter verticalScrollPresenter = null;
            var horizontalScrollCompletedEvent = new AutoResetEvent(false);
            var verticalScrollCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater()
                {
                    Layout = GetMonitoringLayout(new Size(500, 500), realizationRects),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                horizontalScrollPresenter = new ScrollPresenter
                {
                    Content = repeater,
                    ContentOrientation = ScrollingContentOrientation.Horizontal
                };

                // Placing a Grid in between two ScrollPresenter controls to avoid
                // unsupported combined use of facades and ElementCompositionPreview.
                var grid = new Grid();
                grid.Children.Add(horizontalScrollPresenter);

                verticalScrollPresenter = new ScrollPresenter
                {
                    Content = grid,
                    Width = 200,
                    Height = 200,
                    ContentOrientation = ScrollingContentOrientation.Vertical
                };

                Content = verticalScrollPresenter;
                Content.UpdateLayout();

                Verify.AreEqual(2, realizationRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 200), realizationRects[1]);
                realizationRects.Clear();

                horizontalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    horizontalScrollCompletedEvent.Set();
                };

                verticalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    verticalScrollCompletedEvent.Set();
                };
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                verticalScrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(verticalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 200), realizationRects.Last());
                realizationRects.Clear();

                // Max viewport offset is (300, 300). Horizontal viewport offset
                // is expected to get coerced from 400 to 300.
                horizontalScrollPresenter.ScrollTo(400.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(horizontalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(300, 100, 200, 200), realizationRects.Last());
                realizationRects.Clear();
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/EffectiveViewportScrollPresenterTests.cs
Generated on Sun Dec 1 2024 20:53:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EffectiveViewportTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • EffectiveViewportTests
Public Member Functions | Private Member Functions | Static Private Member Functions

EffectiveViewportTests Class Reference

List of all members.

Public Member Functions

void | CanBringIntoViewElements ()
void | CanGrowCacheBufferWithScrollViewer ()
void | ValidateBasicScrollViewerScenario ()
void | ValidateOneScrollViewerScenario ()
void | ValidateTwoScrollViewerScenario ()

Private Member Functions

void | ValidateRealizedRange (ItemsRepeater itemsRepeater, int expectedFirstItemIndex, int expectedLastItemIndex)

Static Private Member Functions

static VirtualizingLayout | GetMonitoringLayout (Size desiredSize, List< Rect > realizationRects, ManualResetEvent layoutMeasured=null)

Detailed Description

Definition at line 29 of file EffectiveViewportScrollViewerTests.cs.

Member Function Documentation

void CanBringIntoViewElements ( ) [inline]

Definition at line 371 of file EffectiveViewportScrollViewerTests.cs.

        {
            ScrollViewer scroller = null;
            ItemsRepeater itemsRepeater = null;
            var rootLoadedEvent = new AutoResetEvent(initialState: false);
            var viewChangeCompletedEvent = new AutoResetEvent(initialState: false);
            var viewChangedOffsets = new List<double>();

            RunOnUIThread.Execute(() =>
            {
                var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
                var root = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
                     @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                         <Grid.Resources>
                           <controls:StackLayout x:Name='VerticalStackLayout'/>
                           <controls:RecyclingElementFactory x:Key='ElementFactory'>
                             <controls:RecyclingElementFactory.RecyclePool>
                               <controls:RecyclePool/>
                             </controls:RecyclingElementFactory.RecyclePool>
                             <DataTemplate x:Key='ItemTemplate'>
                               <Border Background='LightGray' Margin='5' Height='94'>
                                 <TextBlock Text='{Binding}' TextWrapping='WrapWholeWords'/>
                               </Border>
                             </DataTemplate>
                           </controls:RecyclingElementFactory>
                         </Grid.Resources>
                         <ScrollViewer x:Name='Scroller' Width='400' Height='600' Background='Gray'>
                           <controls:ItemsRepeater
                             x:Name='ItemsRepeater'
                             ItemTemplate='{StaticResource ElementFactory}'
                             Layout='{StaticResource VerticalStackLayout}'
                             HorizontalCacheLength='0'
                             VerticalCacheLength='0'/>
                         </ScrollViewer>
                       </Grid>"));

                var elementFactory = (RecyclingElementFactory)root.Resources["ElementFactory"];
                scroller = (ScrollViewer)root.FindName("Scroller");
                itemsRepeater = (ItemsRepeater)root.FindName("ItemsRepeater");

                var items = Enumerable.Range(0, 400).Select(i => string.Format("{0}: {1}", i, lorem.Substring(0, 250)));

                itemsRepeater.ItemsSource = items;

                scroller.ViewChanged += (o, e) =>
                {
                    Log.Comment($"ScrollViewer.ViewChanged - VerticalOffset: {scroller.VerticalOffset}");
                    viewChangedOffsets.Add(scroller.VerticalOffset);
                    if (!e.IsIntermediate)
                    {
                        viewChangeCompletedEvent.Set();
                    }
                };

                Content = root;

                root.Loaded += delegate
                {
                    rootLoadedEvent.Set();
                };
            });
            Verify.IsTrue(rootLoadedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("\r\nStartBringIntoView for item index 100, w/ 0.5 vertical alignment.");
                viewChangeCompletedEvent.Reset();
                itemsRepeater.GetOrCreateElement(100).StartBringIntoView(new BringIntoViewOptions {
                    VerticalAlignmentRatio = 0.5
                });
                itemsRepeater.UpdateLayout();
            });

            Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.AreEqual(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();

            ValidateRealizedRange(itemsRepeater, 96, 103);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("\r\nStartBringIntoView for item index 103 (already realized) w/ animation.");
                viewChangeCompletedEvent.Reset();
                itemsRepeater.TryGetElement(103).StartBringIntoView(new BringIntoViewOptions
                {
                    VerticalAlignmentRatio = 0.5,
                    AnimationDesired = true
                });
                itemsRepeater.UpdateLayout();
            });

            Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.IsLessThanOrEqual(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();

            ValidateRealizedRange(itemsRepeater, 99, 107);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("\r\nStartBringIntoView for disconnected item index 0, to the top w/ unfulfilled animation and 0.5 vertical alignment.");
                viewChangeCompletedEvent.Reset();
                itemsRepeater.GetOrCreateElement(0).StartBringIntoView(new BringIntoViewOptions
                {
                    VerticalAlignmentRatio = 0.5,
                    AnimationDesired = true
                });
                itemsRepeater.UpdateLayout();
            });

            Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.AreEqual(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();

            ValidateRealizedRange(itemsRepeater, 0, 6);

            RunOnUIThread.Execute(() =>
            {
                // You can't align the first item in the middle obviously.
                Verify.AreEqual(0, scroller.VerticalOffset);

                Log.Comment("\r\nStartBringIntoView for item index 20.");
                viewChangeCompletedEvent.Reset();
                itemsRepeater.GetOrCreateElement(20).StartBringIntoView(new BringIntoViewOptions
                {
                    VerticalAlignmentRatio = 0.0
                });
                itemsRepeater.UpdateLayout();
            });

            Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
            Verify.AreEqual(1, viewChangedOffsets.Count);

            ValidateRealizedRange(itemsRepeater, 19, 26);
        }

void CanGrowCacheBufferWithScrollViewer ( ) [inline]

Definition at line 279 of file EffectiveViewportScrollViewerTests.cs.

        {
            ScrollViewer scroller = null;
            ItemsRepeater repeater = null;
            var measureRealizationRects = new List<Rect>();
            var arrangeRealizationRects = new List<Rect>();
            var fullCacheEvent = new ManualResetEvent(initialState: false);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Preparing the visual tree...");

                scroller = new ScrollViewer
                {
                    Width = 400,
                    Height = 400
                };

                var layout = new MockVirtualizingLayout
                {
                    MeasureLayoutFunc = (availableSize, context) =>
                    {
                        var ctx = (VirtualizingLayoutContext)context;
                        Log.Comment("MeasureLayout - Rect:" +  ctx.RealizationRect);
                        if(measureRealizationRects.Count == 0 || measureRealizationRects.Last() != ctx.RealizationRect)
                        {
                            measureRealizationRects.Add(ctx.RealizationRect);
                        }

                        return new Size(1000, 2000);
                    },

                    ArrangeLayoutFunc = (finalSize, context) =>
                    {
                        var ctx = (VirtualizingLayoutContext)context;
                        Log.Comment("ArrangeLayout - Rect:" +  ctx.RealizationRect);
                        if(arrangeRealizationRects.Count == 0 || arrangeRealizationRects.Last() != ctx.RealizationRect)
                        {
                            arrangeRealizationRects.Add(ctx.RealizationRect);
                        }

                        if (ctx.RealizationRect.Height == scroller.Height * (repeater.VerticalCacheLength + 1))
                        {
                            fullCacheEvent.Set();
                        }

                        return finalSize;
                    }
                };

                repeater = new ItemsRepeater()
                {
                    Layout = layout
                };

                scroller.Content = repeater;
                Content = scroller;
            });

            if (!fullCacheEvent.WaitOne(DefaultWaitTimeInMS)) Verify.Fail("Cache full size never reached.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var cacheLength = repeater.VerticalCacheLength;
                var expectedRealizationWindow = new Rect(
                    -cacheLength / 2 * scroller.Width,
                    -cacheLength / 2 * scroller.Height,
                    (1 + cacheLength) * scroller.Width,
                    (1 + cacheLength) * scroller.Height);

                Log.Comment("Validate that the realization window reached full size.");
                Verify.AreEqual(expectedRealizationWindow, measureRealizationRects.Last());
                Verify.AreEqual(expectedRealizationWindow, arrangeRealizationRects.Last());

                Log.Comment("Validate that the realization window grew by 40 pixels each time during the process.");
                for (int i = 2; i < measureRealizationRects.Count; ++i)
                {
                    Verify.AreEqual(-40, measureRealizationRects[i].X - measureRealizationRects[i - 1].X);
                    Verify.AreEqual(-40, measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y);
                    Verify.AreEqual(80, measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width);
                    Verify.AreEqual(80, measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height);

                    Verify.AreEqual(-40, arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X);
                    Verify.AreEqual(-40, arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y);
                    Verify.AreEqual(80, arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width);
                    Verify.AreEqual(80, arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height);
                }
            });
        }

static VirtualizingLayout GetMonitoringLayout | ( | Size | desiredSize,
 |  | List< Rect > | realizationRects,
 |  | ManualResetEvent | layoutMeasured = null |
 | ) |  |  | [inline, static, private]

Definition at line 558 of file EffectiveViewportScrollViewerTests.cs.

        {
            return new MockVirtualizingLayout
            {
                MeasureLayoutFunc = (availableSize, context) =>
                {
                    var ctx = (VirtualizingLayoutContext)context;
                    Log.Comment("MeasureLayout:" + ctx.RealizationRect);
                    realizationRects.Add(ctx.RealizationRect);
                    if (layoutMeasured != null)
                    {
                        layoutMeasured.Set();
                    }
                    return desiredSize;
                },

                ArrangeLayoutFunc = (finalSize, context) => finalSize
            };
        }

void ValidateBasicScrollViewerScenario ( ) [inline]

Definition at line 32 of file EffectiveViewportScrollViewerTests.cs.

        {
            var realizationRects = new List<Rect>();
            var viewChangeCompletedEvent = new AutoResetEvent(false);
            ScrollViewer scrollViewer = null;
            ManualResetEvent viewChanged = new ManualResetEvent(false);
            ManualResetEvent layoutMeasured = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater() {
                    Layout = GetMonitoringLayout(new Size(500, 600), realizationRects, layoutMeasured),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                scrollViewer = new ScrollViewer {
                    Content = repeater,
                    Width = 200,
                    Height = 300,
                    HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden,
                    VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
                };

                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        Log.Comment("ViewChanged " + scrollViewer.HorizontalOffset + ":" + scrollViewer.VerticalOffset);
                        viewChanged.Set();
                    }
                };

                Content = scrollViewer;
            });

            Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");

            RunOnUIThread.Execute(() =>
            {
                // First layout pass will invalidate measure during the first arrange
                // so that we can get a viewport during the second measure/arrange pass.
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
                realizationRects.Clear();

                viewChanged.Reset();
                layoutMeasured.Reset();
                scrollViewer.ChangeView(null, 100.0, 1.0f, disableAnimation: true);
            });

            IdleSynchronizer.Wait();
            Verify.IsTrue(viewChanged.WaitOne(), "Did not receive view changed event");
            Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");
            viewChanged.Reset();
            layoutMeasured.Reset();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();
                viewChangeCompletedEvent.Reset();

                // Max viewport offset is (300, 400). Horizontal viewport offset
                // is expected to get coerced from 400 to 300.
                scrollViewer.ChangeView(400, 100.0, 1.0f, disableAnimation: true);
            });

            IdleSynchronizer.Wait();
            Verify.IsTrue(viewChanged.WaitOne(), "Did not receive view changed event");
            Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");
            viewChanged.Reset();
            layoutMeasured.Reset();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(300, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();
                viewChangeCompletedEvent.Reset();

                scrollViewer.ChangeView(null, null, 2.0f, disableAnimation: true);
            });

            IdleSynchronizer.Wait();
            Verify.IsTrue(viewChanged.WaitOne(), "Did not receive view changed event");
            Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");
            viewChanged.Reset();
            layoutMeasured.Reset();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(150, 50, 100, 150), realizationRects.Last());
                realizationRects.Clear();
            });
        }

void ValidateOneScrollViewerScenario ( ) [inline]

Definition at line 129 of file EffectiveViewportScrollViewerTests.cs.

        {
            var realizationRects = new List<Rect>();
            ScrollViewer scrollViewer = null;
            var viewChangeCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater()
                {
                    Layout = GetMonitoringLayout(new Size(500, 600), realizationRects),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                scrollViewer = new ScrollViewer
                {
                    Content = repeater,
                    Width = 200,
                    Height = 300
                };

                Content = scrollViewer;
                Content.UpdateLayout();

                Verify.AreEqual(2, realizationRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
                realizationRects.Clear();

                scrollViewer.ViewChanged += (Object sender, ScrollViewerViewChangedEventArgs args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChangeCompletedEvent.Set();
                    }
                };
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                scrollViewer.ChangeView(0.0, 100.0, null, true);
            });
            Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();

                viewChangeCompletedEvent.Reset();
                scrollViewer.ChangeView(null, null, 2.0f, true);
            });
            Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(
                    new Rect(0, 50, 100, 150),
                    realizationRects.Last());
                realizationRects.Clear();
            });
        }

void ValidateRealizedRange | ( | ItemsRepeater | itemsRepeater,
 |  | int | expectedFirstItemIndex,
 |  | int | expectedLastItemIndex |
 | ) |  |  | [inline, private]

Definition at line 519 of file EffectiveViewportScrollViewerTests.cs.

        {
            Log.Comment("Validating Realized Range...");
            int actualFirstItemIndex = -1;
            int actualLastItemIndex = -1;
            int itemIndex = 0;

            RunOnUIThread.Execute(() =>
            {
                var items = itemsRepeater.ItemsSource as IEnumerable<string>;

                foreach (var item in items)
                {
                    var itemElement = itemsRepeater.TryGetElement(itemIndex);

                    if (itemElement != null)
                    {
                        actualFirstItemIndex =
                            actualFirstItemIndex == -1 ?
                            itemIndex :
                            actualFirstItemIndex;
                        actualLastItemIndex = itemIndex;

                        Log.Comment($"Realized Index - {itemIndex}");
                    }

                    ++itemIndex;
                }
            });

            Log.Comment($"FirstItemIndex - {expectedFirstItemIndex}  {actualFirstItemIndex}");
            Log.Comment($"LastItemIndex  - {expectedLastItemIndex}  {actualLastItemIndex}");
            Verify.AreEqual(expectedFirstItemIndex, actualFirstItemIndex);
            Verify.AreEqual(expectedLastItemIndex, actualLastItemIndex);
        }

void ValidateTwoScrollViewerScenario ( ) [inline]

Definition at line 195 of file EffectiveViewportScrollViewerTests.cs.

        {
            var realizationRects = new List<Rect>();
            ScrollViewer horizontalScroller = null;
            ScrollViewer verticalScroller = null;
            var horizontalViewChangeCompletedEvent = new AutoResetEvent(false);
            var verticalViewChangeCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater()
                {
                    Layout = GetMonitoringLayout(new Size(500, 500), realizationRects),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                horizontalScroller = new ScrollViewer
                {
                    Content = repeater,
                    HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,
                    VerticalScrollBarVisibility = ScrollBarVisibility.Disabled,
                    HorizontalScrollMode = ScrollMode.Enabled,
                    VerticalScrollMode = ScrollMode.Disabled
                };

                verticalScroller = new ScrollViewer
                {
                    Content = horizontalScroller,
                    Width = 200,
                    Height = 200
                };

                Content = verticalScroller;
                Content.UpdateLayout();

                Verify.AreEqual(2, realizationRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 200), realizationRects[1]);
                realizationRects.Clear();

                horizontalScroller.ViewChanged += (Object sender, ScrollViewerViewChangedEventArgs args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        horizontalViewChangeCompletedEvent.Set();
                    }
                };

                verticalScroller.ViewChanged += (Object sender, ScrollViewerViewChangedEventArgs args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        verticalViewChangeCompletedEvent.Set();
                    }
                };
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                verticalScroller.ChangeView(0.0, 100.0, null, true);
            });
            Verify.IsTrue(verticalViewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 200), realizationRects.Last());
                realizationRects.Clear();

                // Max viewport offset is (300, 300). Horizontal viewport offset
                // is expected to get coerced from 400 to 300.
                horizontalScroller.ChangeView(400.0, 100.0, null, true);
            });
            Verify.IsTrue(horizontalViewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(300, 100, 200, 200), realizationRects.Last());
                realizationRects.Clear();
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/EffectiveViewportScrollViewerTests.cs
Generated on Sun Dec 1 2024 20:53:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutCollectionChangeTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • FlowLayoutCollectionChangeTests
Public Member Functions | Private Member Functions | Private Attributes

FlowLayoutCollectionChangeTests Class Reference

List of all members.

Public Member Functions

void | CanMoveItem ()
void | CanRemoveAndInsertItemsInRealizedRange ()
void | CanRemoveItemsAfterRealizedRange ()
void | CanRemoveItemsStartingBeforeRealizedRange ()
void | CanRemoveItemsStartingInRealizedRange ()
void | CanReplaceSingleItem ()
void | EnsureReplaceOfAnchorDoesNotResetAllContainers ()
void | ReplaceMultipleItems ()
void | ValidateClear ()
void | ValidateInserts ()
void | ValidateRegularResets ()
void | ValidateSentinelsDuringInserts ()
void | ValidateStableResets ()
void | VerifyElement0OwnershipInUniformGridLayout ()

Private Member Functions

RecyclingElementFactory | GetElementFactory ()
ItemsRepeater | SetupRepeater (CustomItemsSource dataSource)
ItemsRepeater | SetupRepeater (CustomItemsSource dataSource, ElementFactory elementFactory, ref ScrollViewer scrollViewer, VirtualizingLayout layout)
ItemsRepeater | SetupRepeater (CustomItemsSource dataSource, VirtualizingLayout layout)
ItemsRepeater | SetupRepeater (CustomItemsSource dataSource, ref ScrollViewer scrollViewer)
ItemsRepeater | SetupRepeater (CustomItemsSource dataSource, ElementFactory elementFactory=null)
int | VerifyRealizedRange (ItemsRepeater repeater, CustomItemsSource dataSource)

Private Attributes

int | DefaultWaitTime = 2000

Detailed Description

Definition at line 24 of file FlowLayoutCollectionChangeTests.cs.

Member Function Documentation

void CanMoveItem ( ) [inline]

Definition at line 295 of file FlowLayoutCollectionChangeTests.cs.

        {
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList()));
            ScrollViewer scrollViewer = null;
            ItemsRepeater repeater = null;
            var viewChangedEvent = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                repeater = SetupRepeater(dataSource, ref scrollViewer);
                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChangedEvent.Set();
                    }
                };
                scrollViewer.ChangeView(null, 400, null, true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);

                Log.Comment("Move before realized range.");
                dataSource.Move(oldIndex: 0, newIndex: 1, count: 2, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);

                Log.Comment("Move in realized range.");
                dataSource.Move(oldIndex: 3, newIndex: 5, count: 2, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);

                Log.Comment("Move after realized range");
                dataSource.Move(oldIndex: 7, newIndex: 8, count: 2, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);
            });
        }

void CanRemoveAndInsertItemsInRealizedRange ( ) [inline]

Definition at line 185 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSource(Enumerable.Range(0, 3).ToList());
                var repeater = SetupRepeater(dataSource);

                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);

                Log.Comment("Remove index 1 in realized range");
                dataSource.Remove(index: 1, count: 1, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(2, realized);

                Log.Comment("Add 5 items at index 1");
                dataSource.Insert(index: 1, count: 5, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);
            });
        }

void CanRemoveItemsAfterRealizedRange ( ) [inline]

Definition at line 212 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
                var repeater = SetupRepeater(dataSource);

                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);

                Log.Comment("Remove after realized range: start:(8)afterView end:(9)afterView.");
                dataSource.Remove(index: 8, count: 2, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);
            });
        }

void CanRemoveItemsStartingBeforeRealizedRange ( ) [inline]

Definition at line 96 of file FlowLayoutCollectionChangeTests.cs.

        {
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 20).ToList()));
            ScrollViewer scrollViewer = null;
            ItemsRepeater repeater = null;
            var viewChangedEvent = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                repeater = SetupRepeater(dataSource, ref scrollViewer);
                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChangedEvent.Set();
                    }
                };

                scrollViewer.ChangeView(null, 600, null, true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Remove before realized range: start:(0)beforeView end:(1)beforeView.");
                dataSource.Remove(index: 0, count: 2, reset: false);
                repeater.UpdateLayout();

                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);

                Log.Comment("Remove before realized range: start:(0)beforeView end:(4)inview.");
                dataSource.Remove(index: 0, count: 5, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);

                Log.Comment("Insert before realized range: Inserting 10 items at index 0");
                dataSource.Insert(index: 0, count: 10, reset: false);
                repeater.UpdateLayout();
                VerifyRealizedRange(repeater, dataSource);

                Log.Comment("Insert after realized range: Inserting 10 items at index 19");
                dataSource.Insert(index: 19, count: 10, reset: false);
                repeater.UpdateLayout();
                VerifyRealizedRange(repeater, dataSource);

                Log.Comment("Remove before realized range: start:(5)beforeView end:(25)afterView.");
                dataSource.Remove(index: 5, count: 20, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.IsLessThanOrEqual(2, realized);
            });
        }

void CanRemoveItemsStartingInRealizedRange ( ) [inline]

Definition at line 157 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
                var repeater = SetupRepeater(dataSource);

                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);

                Log.Comment("Remove in realized range: start:(1)InView end:(3)InView.");
                dataSource.Remove(index: 1, count: 3, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);

                Log.Comment("Remove in realized range: start:(1)InView end:(6)InView.");
                dataSource.Remove(index: 1, count: 6, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(1, realized);
            });
        }

void CanReplaceSingleItem ( ) [inline]

Definition at line 232 of file FlowLayoutCollectionChangeTests.cs.

        {
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList()));
            ScrollViewer scrollViewer = null;
            ItemsRepeater repeater = null;
            var viewChangedEvent = new ManualResetEvent(false);
            int elementsCleared = 0;
            int elementsPrepared = 0;

            RunOnUIThread.Execute(() =>
            {
                repeater = SetupRepeater(dataSource, ref scrollViewer);
                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if(!args.IsIntermediate)
                    {
                        viewChangedEvent.Set();
                    }
                };

                repeater.ElementPrepared += (sender, args) => { elementsPrepared++; };
                repeater.ElementClearing += (sender, args) => { elementsCleared++; };

                scrollViewer.ChangeView(null, 200, null, true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);

                Log.Comment("Replace before realized range.");
                dataSource.Replace(index: 0, oldCount: 1, newCount: 1, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);

                Log.Comment("Replace in realized range.");
                elementsPrepared = 0;
                elementsCleared = 0;
                dataSource.Replace(index: 2, oldCount: 1, newCount: 1, reset: false);
                repeater.UpdateLayout();
                Verify.AreEqual(1, elementsPrepared);
                Verify.AreEqual(1, elementsCleared);

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);

                Log.Comment("Replace after realized range");
                dataSource.Replace(index: 8, oldCount: 1, newCount: 1, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(4, realized);
            });
        }

void EnsureReplaceOfAnchorDoesNotResetAllContainers ( ) [inline]

Definition at line 392 of file FlowLayoutCollectionChangeTests.cs.

        {
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList()));
            ScrollViewer scrollViewer = null;
            ItemsRepeater repeater = null;
            var viewChangedEvent = new ManualResetEvent(false);
            int elementsCleared = 0;
            int elementsPrepared = 0;

            RunOnUIThread.Execute(() =>
            {
                repeater = SetupRepeater(dataSource, ref scrollViewer);
                repeater.ElementPrepared += (sender, args) => { elementsPrepared++; };
                repeater.ElementClearing += (sender, args) => { elementsCleared++; };
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);

                Log.Comment("Replace anchor element 0");
                elementsPrepared = 0;
                elementsCleared = 0;
                dataSource.Replace(index: 0, oldCount: 1, newCount: 1, reset: false);
                repeater.UpdateLayout();
                Verify.AreEqual(1, elementsPrepared);
                Verify.AreEqual(1, elementsCleared);

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);
            });
        }

RecyclingElementFactory GetElementFactory ( ) [inline, private]

Definition at line 519 of file FlowLayoutCollectionChangeTests.cs.

        {
            var elementFactory = new RecyclingElementFactory();
            elementFactory.RecyclePool = new RecyclePool();
            elementFactory.Templates["Item"] = SharedHelpers.GetDataTemplate(@"<TextBlock Text='{Binding}' Height='100' />");
            return elementFactory;
        }

void ReplaceMultipleItems ( ) [inline]

Definition at line 431 of file FlowLayoutCollectionChangeTests.cs.

        {
            // TODO: Lower prioirty scenario. Tracked by work item: 9738020
            throw new NotImplementedException();
        }

ItemsRepeater SetupRepeater | ( | CustomItemsSource | dataSource,
 |  | VirtualizingLayout | layout |
 | ) |  |  | [inline, private]

Definition at line 501 of file FlowLayoutCollectionChangeTests.cs.

        {
            ScrollViewer sv = null;
            return SetupRepeater(dataSource, GetElementFactory(), ref sv, layout);
        }

ItemsRepeater SetupRepeater | ( | CustomItemsSource | dataSource,
 |  | ref ScrollViewer | scrollViewer |
 | ) |  |  | [inline, private]

Definition at line 514 of file FlowLayoutCollectionChangeTests.cs.

        {
            return SetupRepeater(dataSource, GetElementFactory(), ref scrollViewer, new StackLayout());
        }

ItemsRepeater SetupRepeater ( CustomItemsSource dataSource ) [inline, private]

Definition at line 495 of file FlowLayoutCollectionChangeTests.cs.

        {
            ScrollViewer sv = null;
            return SetupRepeater(dataSource, GetElementFactory(), ref sv, new StackLayout());
        }

ItemsRepeater SetupRepeater | ( | CustomItemsSource | dataSource,
 |  | ElementFactory | elementFactory = null |
 | ) |  |  | [inline, private]

Definition at line 507 of file FlowLayoutCollectionChangeTests.cs.

        {
            ScrollViewer sv = null;

            return SetupRepeater(dataSource, elementFactory, ref sv, new StackLayout());
        }

ItemsRepeater SetupRepeater | ( | CustomItemsSource | dataSource,
 |  | ElementFactory | elementFactory,
 |  | ref ScrollViewer | scrollViewer,
 |  | VirtualizingLayout | layout |
 | ) |  |  | [inline, private]

Definition at line 527 of file FlowLayoutCollectionChangeTests.cs.

        {
            var repeater = new ItemsRepeater()
            {
                ItemsSource = dataSource,
                ItemTemplate = elementFactory,
                Layout = layout,
                VerticalCacheLength = 0,
                HorizontalCacheLength = 0
            };

            scrollViewer = new ScrollViewer
            {
                Content = repeater
            };

            Content = new ItemsRepeaterScrollHost()
            {
                Width = 200,
                Height = 200,
                ScrollViewer = scrollViewer
            };

            Content.UpdateLayout();
            if (dataSource.Count > 0)
            {
                int realized = VerifyRealizedRange(repeater, dataSource);
                Verify.IsGreaterThan(realized, 0);
            }

            return repeater;
        }

void ValidateClear ( ) [inline]

Definition at line 479 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSource(Enumerable.Range(0, 3).ToList());
                var repeater = SetupRepeater(dataSource, new FlowLayout());

                Log.Comment("Clear the collection");
                dataSource.Clear();
                repeater.UpdateLayout();

                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(0, realized);
            });
        }

void ValidateInserts ( ) [inline]

Definition at line 27 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
                var repeater = SetupRepeater(dataSource);

                Log.Comment("Insert in realized range: Inserting 3 items at index 4");
                dataSource.Insert(index: 4, count: 3, reset: false);
                repeater.UpdateLayout();

                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.IsGreaterThan(realized, 0);

                Log.Comment("Insert before realized range: Inserting 3 items at index 0");
                dataSource.Insert(index: 0, count: 3, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.IsGreaterThan(realized, 0);

                Log.Comment("Insert after realized range: Inserting 3 items at index 10");
                dataSource.Insert(index: 10, count: 3, reset: false);
                repeater.UpdateLayout();

                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.IsGreaterThan(realized, 0);
            });
        }

void ValidateRegularResets ( ) [inline]

Definition at line 459 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSource(Enumerable.Range(0, 3).ToList());
                var repeater = SetupRepeater(dataSource);

                Log.Comment("Reset collection");
                dataSource.GetAtCallCount = 0;
                dataSource.Reset();
                repeater.UpdateLayout();

                // Make sure data was requested because during a normal reset elements (already bound with data) are not reused.
                Verify.AreEqual(3, dataSource.GetAtCallCount);
                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);
            });
        }

void ValidateSentinelsDuringInserts ( ) [inline]

Definition at line 58 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
                int getElementCallCount = 0;
                int recycleElementCallCount = 0;

                var elementFactory = new RecyclingElementFactoryDerived()
                {
                    Templates = { { "key", SharedHelpers.GetDataTemplate("<TextBlock Text='{Binding}' Height='100' />") } },
                    RecyclePool = new RecyclePool(),
                    GetElementFunc = (int index, UIElement owner, UIElement elementFromBase) =>
                    {
                        getElementCallCount++;
                        return elementFromBase;
                    },
                    ClearElementFunc = (UIElement element, UIElement owner) => recycleElementCallCount++,
                    ValidateElementIndices = false
                };

                var repeater = SetupRepeater(dataSource, elementFactory);

                getElementCallCount = 0;
                recycleElementCallCount = 0;
                Log.Comment("Insert in realized range: Inserting 100 items at index 1");
                dataSource.Insert(index: 1, count: 100, reset: false);
                repeater.UpdateLayout();

                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.IsGreaterThan(realized, 0);

                Verify.IsLessThan(getElementCallCount, 6);
                Verify.IsLessThan(recycleElementCallCount, 6);
            });
        }

void ValidateStableResets ( ) [inline]

Definition at line 438 of file FlowLayoutCollectionChangeTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new CustomItemsSourceWithUniqueId(Enumerable.Range(0, 3).ToList());
                var repeater = SetupRepeater(dataSource);

                Log.Comment("Reset collection");
                dataSource.GetAtCallCount = 0;
                dataSource.Reset();
                repeater.UpdateLayout();

                // Make sure data was not requested because during a stable reset
                // the elements and associated bound data are reused
                Verify.AreEqual(0, dataSource.GetAtCallCount);
                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(3, realized);
            });
        }

void VerifyElement0OwnershipInUniformGridLayout ( ) [inline]

Definition at line 348 of file FlowLayoutCollectionChangeTests.cs.

        {
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(new List<int>()));
            ItemsRepeater repeater = null;
            int elementsCleared = 0;
            int elementsPrepared = 0;

            RunOnUIThread.Execute(() =>
            {
                repeater = SetupRepeater(dataSource, new UniformGridLayout());
                repeater.ElementPrepared += (sender, args) => { elementsPrepared++; };
                repeater.ElementClearing += (sender, args) => { elementsCleared++; };
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Add two item");
                dataSource.Insert(index: 0, count: 1, reset: false);
                dataSource.Insert(index: 1, count: 1, reset: false);
                repeater.UpdateLayout();
                var realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(2, realized);

                Log.Comment("replace the first item");
                dataSource.Replace(index: 0, oldCount: 1, newCount: 1, reset: false);
                repeater.UpdateLayout();
                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(2, realized);

                Log.Comment("Remove two items");
                dataSource.Remove(index: 1, count: 1, reset: false);
                dataSource.Remove(index: 0, count: 1, reset:false);
                repeater.UpdateLayout();
                realized = VerifyRealizedRange(repeater, dataSource);
                Verify.AreEqual(0, realized);

                Verify.AreEqual(elementsPrepared, elementsCleared);
            });
        }

int VerifyRealizedRange | ( | ItemsRepeater | repeater,
 |  | CustomItemsSource | dataSource |
 | ) |  |  | [inline, private]

Definition at line 559 of file FlowLayoutCollectionChangeTests.cs.

        {
            int numRealized = 0;
            // trace
            Log.Comment("index:ItemsSourceView:Item");
            for (int i = 0; i < dataSource.Inner.Count; i++)
            {
                var element = repeater.TryGetElement(i);
                if (element != null)
                {
                    var data = ((TextBlock)element).Text;
                    Log.Comment("{0} {1}:[{2}]", i, dataSource.GetAt(i), data);
                    numRealized++;
                }
                else
                {
                    Log.Comment(i + ":[null]");
                }
            }

            // verify
            for (int i = 0; i < dataSource.Inner.Count; i++)
            {
                var element = repeater.TryGetElement(i);
                if (element != null)
                {
                    var data = ((TextBlock)element).Text;
                    Verify.AreEqual(dataSource.GetAt(i).ToString(), data);
                }
            }

            return numRealized;
        }

Member Data Documentation

int DefaultWaitTime = 2000 [private]

Definition at line 593 of file FlowLayoutCollectionChangeTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/FlowLayoutCollectionChangeTests.cs
Generated on Sun Dec 1 2024 20:53:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • FlowLayoutTests
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

FlowLayoutTests Class Reference

List of all members.

Public Member Functions

void | ValidateAdaptabilityWhenChangingFirstElementHeightForGridLayout ()
void | ValidateAdaptabilityWhenChangingFirstElementSizeForGridLayout ()
void | ValidateAdaptabilityWhenChangingFirstElementWidthForGridLayout ()
void | ValidateDefaultHeightForGridLayoutItemsIsBasedOnFirstItem ()
void | ValidateDefaultSizeForFirstItemDoesntOverridePresetOne ()
void | ValidateDefaultSizeForGridLayoutItemsIsBasedOnFirstItem ()
void | ValidateDefaultWidthForGridLayoutItemsIsBasedOnFirstItem ()
void | ValidateEstimations_Flow_Horizontal ()
void | ValidateEstimations_Flow_Vertical ()
void | ValidateEstimations_Grid_Horizontal ()
void | ValidateEstimations_Grid_Vertical ()
void | ValidateEstimations_Stack_Horizontal ()
void | ValidateEstimations_Stack_Vertical ()
void | ValidateFlowLayout ()
void | ValidateFlowLayoutLineAlignment ()
void | ValidateFlowLayoutVaryingHeights ()
void | ValidateFlowLayoutWithOneItemHasNonZeroExtent ()
void | ValidateGridLayout ()
void | ValidateGridLayoutDesiredSizingWithMaxRowsOrColumnsSet ()
void | ValidateGridLayoutJustificationAndStretch ()
void | ValidateGridLayoutMaximumRowsOrColumns ()
void | ValidateGridLayoutWithSameOrientationAsScrolling ()
void | ValidateIntersectionWithRealizationWindow ()
void | ValidateLayoutSharing ()
void | ValidateLayoutWithInfiniteMeasureSizeInNonVirtualizingDirection ()
void | ValidateMakeAnchor ()
void | ValidateResizingFirstItemResizesOtherItemsInGridLayout ()
void | ValidateStackLayout ()
void | ValidateStackLayoutArrangeWithInsertion ()
void | ValidateStackLayoutArrangeWithStretch ()
void | ValidateUniformGridWithItemsRelyingOnAspectRatio ()
void | ValidateUniformGridWithNoItems ()
void | VerifyFlowLayoutOnLineArranged ()
void | VerifyItemsGetFullSpaceInMajorDirectionWhenSmallerThanLineSize ()
void | VerifyUnconstrainedUniformGridLayout ()

Private Types

enum | DimensionChoice { Width, Height, Size }
enum | LayoutChoice { Stack, Grid, Flow }

Private Member Functions

ItemsRepeaterScrollHost | CreateAndInitializeRepeater (OrientationBasedMeasures om, object itemsSource, VirtualizingLayout layout, ElementFactory elementFactory, ref ItemsRepeater repeater, ref ScrollViewer scrollViewer)
DataTemplate | GetDataTemplate (string content)
void | PopulatePanelWithButtons (LayoutPanel panel, int numItems)
void | SetPanelMinorSize (LayoutPanel panel, OrientationBasedMeasures om, double value)
void | ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout (DimensionChoice dimension)
void | ValidateChildBounds (LayoutPanel panel, List< Rect > list)
void | ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem (DimensionChoice dimension)
void | ValidateFlowLayoutChildrenLayoutBounds (OrientationBasedMeasures om, Func< int, UIElement > elementAtIndexFunc, double minItemSpacing, double lineSpacing, int childCount, Size desiredSize, float?expectedItemWidth=null, float?expectedItemHeight=null)
void | ValidateGridLayoutChildrenLayoutBounds (OrientationBasedMeasures om, Func< int, UIElement > elementAtIndexFunc, double itemMinorSize, double itemMajorSize, double minRowSpacing, double minColumnSpacing, int childCount, Size desiredSize)
void | ValidateLayoutEstimations (ScrollOrientation scrollOrientation, LayoutChoice layoutChoice)
void | ValidateStackLayoutChildrenLayoutBounds (OrientationBasedMeasures om, Func< int, UIElement > elementAtIndexFunc, int panelMinorSize, int numItems, int itemMajorSize, int itemSpacing, Size desiredSize)

Static Private Member Functions

static void | ModifyElementSize (LayoutPanel panel, int index, double itemWidth, double itemHeight)
static void | SetUpScrollViewerOrientation (ScrollViewer scrollViewer, ScrollOrientation scrollOrientation)
static void | ValidateElementsSizeInGridLayout (LayoutPanel panel, double itemWidth, double itemHeight)
static void | VerifyRealizedRange (int expectedStartindex, int expectedCount, List< int > actualIndices)
static void | VerifyWithinTolerance (double expected, double actual, double tolerance)

Private Attributes

int | DefaultWaitTime = 2000

Detailed Description

Definition at line 25 of file FlowLayoutTests.cs.

Member Enumeration Documentation

enum DimensionChoice [private]
Enumerator:
Width
Height
Size

Definition at line 1531 of file FlowLayoutTests.cs.

        {
            Width,
            Height,
            Size
        }

enum LayoutChoice [private]
Enumerator:
Stack
Grid
Flow

Definition at line 1524 of file FlowLayoutTests.cs.

        {
            Stack,
            Grid,
            Flow
        }

Member Function Documentation

ItemsRepeaterScrollHost CreateAndInitializeRepeater | ( | OrientationBasedMeasures | om,
 |  | object | itemsSource,
 |  | VirtualizingLayout | layout,
 |  | ElementFactory | elementFactory,
 |  | ref ItemsRepeater | repeater,
 |  | ref ScrollViewer | scrollViewer |
 | ) |  |  | [inline, private]

Definition at line 1653 of file FlowLayoutTests.cs.

        {
            repeater = new ItemsRepeater()
            {
                ItemsSource = itemsSource,
                Layout = layout,
                ItemTemplate = elementFactory,
                HorizontalCacheLength = 0,
                VerticalCacheLength = 0,
            };

            scrollViewer = new ScrollViewer()
            {
                Content = repeater
            };

            SetUpScrollViewerOrientation(scrollViewer, om.ScrollOrientation);
            return new ItemsRepeaterScrollHost()
            {
                Width = 400,
                Height = 400,
                ScrollViewer = scrollViewer
            };
        }

DataTemplate GetDataTemplate ( string content ) [inline, private]

Definition at line 1643 of file FlowLayoutTests.cs.

        {
            return (DataTemplate)XamlReader.Load(
                       string.Format(@"<DataTemplate
                            xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                            xmlns:repeaterCommon='using:MUXControls.ApiTests.RepeaterTests.Common'>
                           {0}
                        </DataTemplate>", content));
        }

static void ModifyElementSize | ( | LayoutPanel | panel,
 |  | int | index,
 |  | double | itemWidth,
 |  | double | itemHeight |
 | ) |  |  | [inline, static, private]

Definition at line 2096 of file FlowLayoutTests.cs.

        {
            var item = (FrameworkElement)panel.Children.ElementAt(index);

            if (!Double.IsNaN(itemWidth))
            {
                item.Width = itemWidth;
            }
            if (!Double.IsNaN(itemHeight))
            {
                item.Height = itemHeight;
            }
        }

void PopulatePanelWithButtons | ( | LayoutPanel | panel,
 |  | int | numItems |
 | ) |  |  | [inline, private]

Definition at line 2076 of file FlowLayoutTests.cs.

        {
            for (int i = 0; i < numItems; i++)
            {
                panel.Children.Add(new Button() { Content = i.ToString() });
            }
        }

void SetPanelMinorSize | ( | LayoutPanel | panel,
 |  | OrientationBasedMeasures | om,
 |  | double | value |
 | ) |  |  | [inline, private]

Definition at line 2063 of file FlowLayoutTests.cs.

        {
            if (om.IsVertical)
            {
                panel.Width = value;
            }
            else
            {
                panel.Height = value;
            }

        }

static void SetUpScrollViewerOrientation | ( | ScrollViewer | scrollViewer,
 |  | ScrollOrientation | scrollOrientation |
 | ) |  |  | [inline, static, private]

Definition at line 2035 of file FlowLayoutTests.cs.

        {
            if (scrollOrientation == ScrollOrientation.Vertical)
            {
                scrollViewer.SetValue(ScrollViewer.HorizontalScrollModeProperty, ScrollMode.Disabled);
                scrollViewer.SetValue(ScrollViewer.VerticalScrollModeProperty, ScrollMode.Enabled);
                scrollViewer.SetValue(ScrollViewer.HorizontalScrollBarVisibilityProperty, ScrollBarVisibility.Disabled);
                scrollViewer.SetValue(ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Visible);
            }
            else
            {
                scrollViewer.SetValue(ScrollViewer.HorizontalScrollModeProperty, ScrollMode.Enabled);
                scrollViewer.SetValue(ScrollViewer.VerticalScrollModeProperty, ScrollMode.Disabled);
                scrollViewer.SetValue(ScrollViewer.HorizontalScrollBarVisibilityProperty, ScrollBarVisibility.Visible);
                scrollViewer.SetValue(ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Disabled);
            }
        }

void ValidateAdaptabilityWhenChangingFirstElementHeightForGridLayout ( ) [inline]

Definition at line 333 of file FlowLayoutTests.cs.

        {
            ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice.Height);
        }

void ValidateAdaptabilityWhenChangingFirstElementSizeForGridLayout ( ) [inline]

Definition at line 339 of file FlowLayoutTests.cs.

        {
            ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice.Size);
        }

void ValidateAdaptabilityWhenChangingFirstElementWidthForGridLayout ( ) [inline]

Definition at line 327 of file FlowLayoutTests.cs.

        {
            ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice.Width);
        }

void ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout ( DimensionChoice dimension ) [inline, private]

Definition at line 1952 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    LayoutPanel panel = new LayoutPanel()
                    {
                        Layout = new UniformGridLayout()
                        {
                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                        }
                    };

                    PopulatePanelWithButtons(panel, 10);
                    Content = panel;
                    Content.UpdateLayout();

                    double widthBeforeUpdate = double.NaN;
                    for (int i = 0; i < panel.Children.Count; i++)
                    {
                        var child = (FrameworkElement)panel.Children.ElementAt(i);
                        var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                        // Ensure bounds before updating.
                        Verify.AreNotEqual(100, layoutBounds.Width);
                        widthBeforeUpdate = layoutBounds.Width;
                        Verify.AreEqual(30 /* itemHeight */, layoutBounds.Height);
                    }

                    switch (dimension)
                    {
                        case DimensionChoice.Width:
                            ModifyElementSize(panel, 1 /*index*/, 100 /*itemWidth*/, Double.NaN /*itemHeight*/);
                            break;

                        case DimensionChoice.Height:

                            ModifyElementSize(panel, 1 /*index*/, Double.NaN /*itemWidth*/, 100 /*itemHeight*/);
                            break;

                        case DimensionChoice.Size:
                            ModifyElementSize(panel, 1 /*index*/, 100 /*itemWidth*/, 100 /*itemHeight*/);
                            break;

                        default:
                            throw new InvalidOperationException("Unhandled dimension choice.");
                    }

                    panel.Children.RemoveAt(0);
                    Content.UpdateLayout();

                    switch (dimension)
                    {
                        case DimensionChoice.Width:
                            ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 30 /*itemHeight*/);
                            break;

                        case DimensionChoice.Height:
                            ValidateElementsSizeInGridLayout(panel, widthBeforeUpdate /*itemWidth*/, 100 /*itemHeight*/);
                            break;

                        case DimensionChoice.Size:
                            ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 100 /*itemHeight*/);
                            break;

                        default:
                            throw new InvalidOperationException("Unhandled dimension choice.");
                    }

                }
            });
        }

void ValidateChildBounds | ( | LayoutPanel | panel,
 |  | List< Rect > | list |
 | ) |  |  | [inline, private]

Definition at line 1634 of file FlowLayoutTests.cs.

        {
            for (int i = 0; i < list.Count; i++)
            {
                var child = (FrameworkElement)panel.Children[i];
                Verify.AreEqual(list[i], LayoutInformation.GetLayoutSlot(child));
            }
        }

void ValidateDefaultHeightForGridLayoutItemsIsBasedOnFirstItem ( ) [inline]

Definition at line 283 of file FlowLayoutTests.cs.

        {
            ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice.Height);
        }

void ValidateDefaultSizeForFirstItemDoesntOverridePresetOne ( ) [inline]

Definition at line 295 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                const int itemWidth = 50;
                const int itemHeight = 50;

                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    LayoutPanel panel = new LayoutPanel()
                    {
                        Layout = new UniformGridLayout()
                        {
                            MinItemWidth = itemWidth,
                            MinItemHeight = itemHeight,
                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                        }
                    };

                    PopulatePanelWithButtons(panel, 10 /*numItems*/);
                    Content = panel;
                    Content.UpdateLayout();

                    ModifyElementSize(panel, 0 /*index*/, 100 /*itemWidth*/, 100 /*itemHeight*/);
                    Content = panel;
                    Content.UpdateLayout();
                    ValidateElementsSizeInGridLayout(panel, itemWidth, itemHeight);
                }
            });
        }

void ValidateDefaultSizeForGridLayoutItemsIsBasedOnFirstItem ( ) [inline]

Definition at line 289 of file FlowLayoutTests.cs.

        {
            ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice.Size);
        }

void ValidateDefaultWidthForGridLayoutItemsIsBasedOnFirstItem ( ) [inline]

Definition at line 277 of file FlowLayoutTests.cs.

        {
            ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice.Width);
        }

void ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem ( DimensionChoice dimension ) [inline, private]

Definition at line 1890 of file FlowLayoutTests.cs.

        {
            LayoutPanel panel = null;
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    panel = new LayoutPanel()
                    {
                        Layout = new UniformGridLayout()
                        {
                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                        }
                    };

                    PopulatePanelWithButtons(panel, 10 /*numItems*/);
                    Content = panel;
                    Content.UpdateLayout();

                    double widthBeforeUpdate = double.NaN;
                    for (int i = 0; i < panel.Children.Count; i++)
                    {
                        var child = (FrameworkElement)panel.Children.ElementAt(i);
                        var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                        // Ensure bounds before updating.
                        Verify.AreNotEqual(100, layoutBounds.Width);
                        widthBeforeUpdate = layoutBounds.Width;
                        Verify.AreEqual(30 /* itemHeight */, layoutBounds.Height);
                    }

                    switch (dimension)
                    {
                        case DimensionChoice.Width:
                            ModifyElementSize(panel, 0 /*index*/, 100 /*itemWidth*/, Double.NaN /*itemHeight*/);
                            Content.InvalidateMeasure(); // Bug 16644056
                            Content.UpdateLayout();
                            ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 30 /*itemHeight*/);
                            break;

                        case DimensionChoice.Height:

                            ModifyElementSize(panel, 0 /*index*/, Double.NaN /*itemWidth*/, 100 /*itemHeight*/);
                            Content.InvalidateMeasure(); // Bug 16644056
                            Content.UpdateLayout();
                            ValidateElementsSizeInGridLayout(panel, widthBeforeUpdate /*itemWidth*/, 100 /*itemHeight*/);
                            break;

                        case DimensionChoice.Size:
                            ModifyElementSize(panel, 0 /*index*/, 100 /*itemWidth*/, 100 /*itemHeight*/);
                            Content.InvalidateMeasure(); // Bug 16644056
                            Content.UpdateLayout();
                            ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 100 /*itemHeight*/);
                            break;

                        default:
                            throw new InvalidOperationException("Unhandled dimension choice.");
                    }
                }
            });
        }

static void ValidateElementsSizeInGridLayout | ( | LayoutPanel | panel,
 |  | double | itemWidth,
 |  | double | itemHeight |
 | ) |  |  | [inline, static, private]

Definition at line 2084 of file FlowLayoutTests.cs.

        {
            for (int i = 0; i < panel.Children.Count; i++)
            {
                var child = (FrameworkElement)panel.Children.ElementAt(i);
                var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                Verify.AreEqual(itemWidth, layoutBounds.Width);
                Verify.AreEqual(itemHeight, layoutBounds.Height);
            }
        }

void ValidateEstimations_Flow_Horizontal ( ) [inline]

Definition at line 921 of file FlowLayoutTests.cs.

        {
            ValidateLayoutEstimations(ScrollOrientation.Horizontal, LayoutChoice.Flow);
        }

void ValidateEstimations_Flow_Vertical ( ) [inline]

Definition at line 927 of file FlowLayoutTests.cs.

        {
            ValidateLayoutEstimations(ScrollOrientation.Vertical, LayoutChoice.Flow);
        }

void ValidateEstimations_Grid_Horizontal ( ) [inline]

Definition at line 908 of file FlowLayoutTests.cs.

        {
            ValidateLayoutEstimations(ScrollOrientation.Horizontal, LayoutChoice.Grid);
        }

void ValidateEstimations_Grid_Vertical ( ) [inline]

Definition at line 915 of file FlowLayoutTests.cs.

        {
            ValidateLayoutEstimations(ScrollOrientation.Vertical, LayoutChoice.Grid);
        }

void ValidateEstimations_Stack_Horizontal ( ) [inline]

Definition at line 896 of file FlowLayoutTests.cs.

        {
            ValidateLayoutEstimations(ScrollOrientation.Horizontal, LayoutChoice.Stack);
        }

void ValidateEstimations_Stack_Vertical ( ) [inline]

Definition at line 902 of file FlowLayoutTests.cs.

        {
            ValidateLayoutEstimations(ScrollOrientation.Vertical, LayoutChoice.Stack);
        }

void ValidateFlowLayout ( ) [inline]

Definition at line 624 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);
                    int[] panelMinorSizeChoices = new int[] { 10, 50 };
                    foreach (int panelMinorSize in panelMinorSizeChoices)
                    {
                        const int numItems = 10;
                        LayoutPanel panel = new LayoutPanel()
                        {
                            Layout = new FlowLayout()
                            {
                                Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                                LineAlignment = FlowLayoutLineAlignment.Start
                            }
                        };

                        SetPanelMinorSize(panel, om, panelMinorSize);
                        for (int i = 0; i < numItems; i++)
                        {
                            panel.Children.Add(new Button() { Content = i });
                        }

                        Content = panel;

                        Content.UpdateLayout();
                        int minItemSpacing = 0;
                        int lineSpacing = 0;
                        ValidateFlowLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], minItemSpacing, lineSpacing, panel.Children.Count, panel.DesiredSize);

                        minItemSpacing = 10;
                        lineSpacing = 10;
                        ((FlowLayout)panel.Layout).MinRowSpacing = minItemSpacing;
                        ((FlowLayout)panel.Layout).MinColumnSpacing = lineSpacing;
                        Content.UpdateLayout();
                        ValidateFlowLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], minItemSpacing, lineSpacing, panel.Children.Count, panel.DesiredSize);
                    }
                }
            });
        }

void ValidateFlowLayoutChildrenLayoutBounds | ( | OrientationBasedMeasures | om,
 |  | Func< int, UIElement > | elementAtIndexFunc,
 |  | double | minItemSpacing,
 |  | double | lineSpacing,
 |  | int | childCount,
 |  | Size | desiredSize,
 |  | float? | expectedItemWidth = null,
 |  | float? | expectedItemHeight = null |
 | ) |  |  | [inline, private]

Definition at line 1594 of file FlowLayoutTests.cs.

        {
            var expectedRect = om.MinorMajorRect(0, 0, 0, 0);
            double extentMajor = 0;
            double lineSize = 0;
            Log.Comment("ValidateFlowLayoutChildrenLayoutBounds");
            for (int i = 0; i < childCount; i++)
            {
                var child = (FrameworkElement)elementAtIndexFunc(i);

                var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                expectedRect.Width = expectedItemWidth.HasValue ? expectedItemWidth.Value : child.DesiredSize.Width;
                expectedRect.Height = expectedItemHeight.HasValue ? expectedItemHeight.Value : child.DesiredSize.Height;
                lineSize = Math.Max(lineSize, om.Major(child.DesiredSize));

                Log.Comment(string.Format(@"Index:{0}, Expected:{1} Actual:{2}", i, expectedRect, layoutBounds));
                Verify.AreEqual(expectedRect, layoutBounds);

                extentMajor = om.MajorStart(expectedRect) + lineSize;
                om.SetMinorStart(ref expectedRect, om.MinorStart(expectedRect) + om.Minor(child.DesiredSize) + minItemSpacing);
                if (om.MinorStart(expectedRect) + om.Minor(child.DesiredSize) + minItemSpacing > om.Minor(desiredSize))
                {
                    om.SetMinorStart(ref expectedRect, 0);
                    om.SetMajorStart(ref expectedRect, om.MajorStart(expectedRect) + lineSize + lineSpacing);
                }
            }

            Log.Comment(string.Format(@"Extent Expected:{0} Actual:{1}", om.Major(desiredSize), extentMajor));
            Verify.AreEqual(extentMajor, om.Major(desiredSize));
        }

void ValidateFlowLayoutLineAlignment ( ) [inline]

Definition at line 742 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);
                    const int panelMinorSize = 500;
                    const int itemMajorSize = 100;
                    LayoutPanel panel = new LayoutPanel()
                    {
                        Layout = new FlowLayout()
                        {
                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                            LineAlignment = FlowLayoutLineAlignment.Start
                        }
                    };

                    SetPanelMinorSize(panel, om, panelMinorSize);
                    panel.Children.Add(new Button()
                    {
                        Content = 0,
                        Width = om.IsVertical ? 100 : itemMajorSize,
                        Height = om.IsVertical ? itemMajorSize : 100,
                    });

                    panel.Children.Add(new Button()
                    {
                        Content = 1,
                        Width = om.IsVertical ? 200 : itemMajorSize,
                        Height = om.IsVertical ? itemMajorSize : 200,
                    });

                    Content = panel;
                    Content.UpdateLayout();
                    var layout = (FlowLayout)panel.Layout;
                    layout.LineAlignment = FlowLayoutLineAlignment.Center;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(100, 0, 100, itemMajorSize),
                            om.MinorMajorRect(200, 0, 200, itemMajorSize)
                        });

                    layout.LineAlignment = FlowLayoutLineAlignment.End;
                    Content.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(200, 0, 100, itemMajorSize),
                            om.MinorMajorRect(300, 0, 200, itemMajorSize)
                        });

                    layout.LineAlignment = FlowLayoutLineAlignment.SpaceBetween;
                    Content.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0, 0, 100, itemMajorSize),
                            om.MinorMajorRect(300, 0, 200, itemMajorSize)
                        });
                }
            });
        }

void ValidateFlowLayoutVaryingHeights ( ) [inline]

Definition at line 670 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);
                    const int numItems = 10;
                    LayoutPanel panel = new LayoutPanel()
                    {
                        Layout = new FlowLayout()
                        {
                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                            LineAlignment = FlowLayoutLineAlignment.Start
                        }
                    };

                    SetPanelMinorSize(panel, om, 180);
                    for (int i = 0; i < numItems; i++)
                    {
                        var child = new Button() { Content = i };
                        if (scrollOrientation == ScrollOrientation.Vertical)
                        {
                            child.Width = 50;
                            child.Height = 50 + i % 2 * 50;
                        }
                        else
                        {
                            child.Width = 50 + i % 2 * 50;
                            child.Height = 50;
                        }

                        panel.Children.Add(child);
                    }

                    Content = panel;

                    Content.UpdateLayout();
                    int minItemSpacing = 0;
                    int lineSpacing = 0;
                    Log.Comment("Validate with no spacing");
                    ValidateFlowLayoutChildrenLayoutBounds(
                        om,
                        (i) => panel.Children[i],
                        minItemSpacing,
                        lineSpacing,
                        panel.Children.Count,
                        panel.DesiredSize,
                        scrollOrientation == ScrollOrientation.Vertical ? 50 : 100,
                        scrollOrientation == ScrollOrientation.Vertical ? 100 : 50);

                    minItemSpacing = 10;
                    lineSpacing = 10;
                    ((FlowLayout)panel.Layout).MinRowSpacing = minItemSpacing;
                    ((FlowLayout)panel.Layout).MinColumnSpacing = lineSpacing;
                    Content.UpdateLayout();
                    Log.Comment("Validate with spacing");
                    ValidateFlowLayoutChildrenLayoutBounds(
                        om,
                        (i) => panel.Children[i],
                        minItemSpacing,
                        lineSpacing,
                        panel.Children.Count,
                        panel.DesiredSize,
                        scrollOrientation == ScrollOrientation.Vertical ? 50 : 100,
                        scrollOrientation == ScrollOrientation.Vertical ? 100 : 50);
                }
            });
        }

void ValidateFlowLayoutWithOneItemHasNonZeroExtent ( ) [inline]

Definition at line 1283 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    var repeater = new ItemsRepeater()
                    {
                        ItemsSource = new List<string>() { "single item" },
                        Layout = new FlowLayout() { Orientation = scrollOrientation.ToLayoutOrientation() },
                    };

                    Content = repeater;
                    Content.UpdateLayout();

                    Verify.IsTrue(repeater.ActualWidth > 10);
                    Verify.IsTrue(repeater.ActualHeight > 10);
                }
            });
        }

void ValidateGridLayout ( ) [inline]

Definition at line 77 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);
                    const int panelMinorSize = 400;
                    const int numItems = 10;
                    const int itemMajorSize = 50;
                    int[] itemMinorSizeChoices = new int[] { 100, 800 };

                    foreach (int itemMinorSize in itemMinorSizeChoices)
                    {
                        Log.Comment(string.Format("MinorSize: {0}", itemMinorSize));
                        LayoutPanel panel = new LayoutPanel()
                        {
                            Layout = new UniformGridLayout()
                            {
                                Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                                ItemsJustification = UniformGridLayoutItemsJustification.Start,
                                MinItemWidth = om.IsVertical ? itemMinorSize : itemMajorSize,
                                MinItemHeight = om.IsVertical ? itemMajorSize : itemMinorSize
                            },
                            VerticalAlignment = VerticalAlignment.Top,
                            HorizontalAlignment = HorizontalAlignment.Left
                        };

                        SetPanelMinorSize(panel, om, panelMinorSize);
                        for (int i = 0; i < numItems; i++)
                        {
                            panel.Children.Add(new Button() { Content = i });
                        }

                        // Put the panel inside a canvas to give it all the space it needs
                        // and avoid any clipping of desired size by the framework.
                        var canvas = new Canvas();
                        canvas.Children.Add(panel);
                        Content = canvas;
                        Content.UpdateLayout();
                        int minRowSpacing = 0;
                        int minColumnSpacing = 0;
                        ValidateGridLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], itemMinorSize, itemMajorSize, minRowSpacing, minColumnSpacing, panel.Children.Count, panel.DesiredSize);

                        var layout = (UniformGridLayout)panel.Layout;
                        minRowSpacing = 5;
                        minColumnSpacing = 10;
                        layout.MinRowSpacing = minRowSpacing;
                        layout.MinColumnSpacing = minColumnSpacing;
                        Content.UpdateLayout();
                        ValidateGridLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], itemMinorSize, itemMajorSize, minRowSpacing, minColumnSpacing, panel.Children.Count, panel.DesiredSize);

                        // Change the properties and validate that they are reflected in the
                        // layout bounds of children once layout has completed.
                        minRowSpacing = 5;
                        minColumnSpacing = 10;
                        layout.MinRowSpacing = minRowSpacing;
                        layout.MinColumnSpacing = minColumnSpacing;
                        layout.MinItemWidth *= 2;
                        layout.MinItemHeight *= 2;
                        Content.UpdateLayout();
                        ValidateGridLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], itemMinorSize*2, itemMajorSize*2, minRowSpacing, minColumnSpacing, panel.Children.Count, panel.DesiredSize);
                    }
                }
            });
        }

void ValidateGridLayoutChildrenLayoutBounds | ( | OrientationBasedMeasures | om,
 |  | Func< int, UIElement > | elementAtIndexFunc,
 |  | double | itemMinorSize,
 |  | double | itemMajorSize,
 |  | double | minRowSpacing,
 |  | double | minColumnSpacing,
 |  | int | childCount,
 |  | Size | desiredSize |
 | ) |  |  | [inline, private]

Definition at line 1560 of file FlowLayoutTests.cs.

        {
            var expectedRect = om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize);
            double extentMajor = 0;
            var minItemSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? minColumnSpacing : minRowSpacing;
            var lineSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? minRowSpacing : minColumnSpacing;

            for (int i = 0; i < childCount; i++)
            {
                var child = (FrameworkElement)elementAtIndexFunc(i);
                var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                Verify.AreEqual(expectedRect, layoutBounds);

                extentMajor = om.MajorStart(expectedRect) + itemMajorSize;
                om.SetMinorStart(ref expectedRect, om.MinorStart(expectedRect) + itemMinorSize + minItemSpacing);
                if (om.MinorStart(expectedRect) + itemMinorSize + minItemSpacing > om.Minor(desiredSize))
                {
                    om.SetMinorStart(ref expectedRect, 0);
                    om.SetMajorStart(ref expectedRect, om.MajorStart(expectedRect) + itemMajorSize + lineSpacing);
                }
            }

            Verify.AreEqual(extentMajor, om.Major(desiredSize));
        }

void ValidateGridLayoutDesiredSizingWithMaxRowsOrColumnsSet ( ) [inline]

Definition at line 565 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation, useLayoutRounding: true);
                    const int numItems = 4;

                    int itemSize = 100;

                    LayoutPanel panel = new LayoutPanel();
                    var layout = new UniformGridLayout() {
                        Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                        ItemsJustification = UniformGridLayoutItemsJustification.Start,
                        MinItemWidth = itemSize,
                        MinItemHeight = itemSize,
                        MinRowSpacing = 0,
                        MinColumnSpacing = 0
                    };

                    for (int i = 0; i < numItems; i++)
                    {
                        panel.Children.Add(new Button() { Content = i,Width = itemSize,Height = itemSize });
                    }

                    panel.Layout = layout;
                    Content = panel;

                    // Place in top left corner to prevent stretch of panel
                    panel.VerticalAlignment = VerticalAlignment.Top;
                    panel.HorizontalAlignment = HorizontalAlignment.Left;
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;

                    for(int i = 1; i < numItems; i++)
                    {
                        layout.MaximumRowsOrColumns = i;
                        panel.UpdateLayout();

                        if (om.IsVertical)
                        {
                            // Vertical so fill columns first
                            Verify.AreEqual(itemSize * i, panel.DesiredSize.Width);
                            Verify.AreEqual(Math.Ceiling((double)numItems / (double)i) * itemSize, panel.DesiredSize.Height);
                        }
                        else
                        {
                            // Horizontal, fill rows first
                            Verify.AreEqual(itemSize * i, panel.DesiredSize.Height);
                            Verify.AreEqual(Math.Ceiling((double)numItems / (double)i) * itemSize, panel.DesiredSize.Width);
                        }
                    }

                }
            });
        }

void ValidateGridLayoutJustificationAndStretch ( ) [inline]

Definition at line 345 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation, useLayoutRounding: true);
                    const int panelMinorSize = 500;
                    const int numItems = 2;
                    const int itemMinorSize = 200;
                    const int itemMajorSize = 100;
                    Log.Comment("UniformGridLayoutItemsJustification.Start");
                    LayoutPanel panel = new LayoutPanel()
                    {
                        Layout = new UniformGridLayout()
                        {
                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                            ItemsJustification = UniformGridLayoutItemsJustification.Start,
                            MinItemWidth = om.IsVertical ? itemMinorSize : itemMajorSize,
                            MinItemHeight = om.IsVertical ? itemMajorSize : itemMinorSize
                        }
                    };

                    SetPanelMinorSize(panel, om, panelMinorSize);
                    for (int i = 0; i < numItems; i++)
                    {
                        panel.Children.Add(new Button() { Content = i });
                    }

                    Content = panel;
                    Content.UpdateLayout();
                    var layout = (UniformGridLayout)panel.Layout;

                    Log.Comment("UniformGridLayoutItemsJustification.Center");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.Center;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(50, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(250, 0, itemMinorSize, itemMajorSize)
                        });

                    Log.Comment("UniformGridLayoutItemsJustification.End");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.End;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(100, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(300, 0, itemMinorSize, itemMajorSize)
                        });

                    Log.Comment("UniformGridLayoutItemsJustification.SpaceBetween");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.SpaceBetween;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(300, 0, itemMinorSize, itemMajorSize)
                        });

                    Log.Comment("UniformGridLayoutItemsJustification.SpaceAround");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.SpaceAround;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(25, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(275, 0, itemMinorSize, itemMajorSize)
                        });

                    Log.Comment("UniformGridLayoutItemsJustification.SpaceEvenly");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.SpaceEvenly;

                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(33.3333, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(266.6667, 0, itemMinorSize, itemMajorSize)
                        });

                    Log.Comment("UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Fill");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
                    layout.ItemsStretch = UniformGridLayoutItemsStretch.Fill;
                    layout.MinRowSpacing = 10;
                    layout.MinColumnSpacing = 10;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0, 0, itemMinorSize + 45, itemMajorSize),
                            om.MinorMajorRect(255, 0, itemMinorSize + 45, itemMajorSize)
                        });

                    Log.Comment("UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Uniform");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
                    layout.ItemsStretch = UniformGridLayoutItemsStretch.Uniform;
                    layout.MinRowSpacing = 10;
                    layout.MinColumnSpacing = 10;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0, 0, itemMinorSize + 45, itemMajorSize + 22.5),
                            om.MinorMajorRect(255, 0, itemMinorSize + 45, itemMajorSize + 22.5)
                        });
                }
            });
        }

void ValidateGridLayoutMaximumRowsOrColumns ( ) [inline]

Definition at line 467 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation, useLayoutRounding: true);
                    const int panelMinorSize = 500;
                    const int numItems = 4;
                    const int itemMinorSize = 150;
                    const int itemMajorSize = 100;
                    Log.Comment("UniformGridLayoutItemsJustification.Start + UniformGridLayoutItemsStretch.None");
                    LayoutPanel panel = new LayoutPanel();
                    var layout = new UniformGridLayout()
                    {
                        Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                        ItemsJustification = UniformGridLayoutItemsJustification.Start,
                        MinItemWidth = om.IsVertical ? itemMinorSize : itemMajorSize,
                        MinItemHeight = om.IsVertical ? itemMajorSize : itemMinorSize
                    };

                    SetPanelMinorSize(panel, om, panelMinorSize);
                    for (int i = 0; i < numItems; i++)
                    {
                        panel.Children.Add(new Button() { Content = i });
                    }

                    panel.Layout = layout;
                    Content = panel;
                    panel.UpdateLayout();

                    Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns}");
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(150, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(300, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(0, 100, itemMinorSize, itemMajorSize)
                        });

                    layout.MaximumRowsOrColumns = 0;
                    Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns}");
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(0, 100, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(0, 200, itemMinorSize, itemMajorSize),
                            om.MinorMajorRect(0, 300, itemMinorSize, itemMajorSize)
                        });

                    layout.MaximumRowsOrColumns = 1;
                    Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns} + UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Uniform");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
                    layout.ItemsStretch = UniformGridLayoutItemsStretch.Uniform;
                    layout.MinRowSpacing = 10;
                    layout.MinColumnSpacing = 10;
                    var aspectRatio = itemMinorSize / (double)itemMajorSize;
                    var extraMajorSize = (panelMinorSize - itemMinorSize) / aspectRatio;
                    var majorOffset = itemMajorSize + extraMajorSize + layout.MinRowSpacing;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0, 0,               panelMinorSize, itemMajorSize + extraMajorSize),
                            om.MinorMajorRect(0, majorOffset,     panelMinorSize, itemMajorSize + extraMajorSize),
                            om.MinorMajorRect(0, majorOffset * 2, panelMinorSize, itemMajorSize + extraMajorSize),
                            om.MinorMajorRect(0, majorOffset * 3, panelMinorSize, itemMajorSize + extraMajorSize),
                        });

                    layout.MaximumRowsOrColumns = 2;
                    Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns} + UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Fill");
                    layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
                    layout.ItemsStretch = UniformGridLayoutItemsStretch.Fill;
                    layout.MinRowSpacing = 10;
                    layout.MinColumnSpacing = 10;
                    panel.UpdateLayout();
                    ValidateChildBounds(
                        panel,
                        new List<Rect>()
                        {
                            om.MinorMajorRect(0,    0,                  itemMinorSize + 95, itemMajorSize),
                            om.MinorMajorRect(255,  0,                  itemMinorSize + 95, itemMajorSize),
                            om.MinorMajorRect(0,    itemMajorSize + 10, itemMinorSize + 95, itemMajorSize),
                            om.MinorMajorRect(255,  itemMajorSize + 10, itemMinorSize + 95, itemMajorSize),
                        });

                }
            });
        }

void ValidateGridLayoutWithSameOrientationAsScrolling ( ) [inline]

Definition at line 1308 of file FlowLayoutTests.cs.

        {
            ManualResetEvent viewChanged = new ManualResetEvent(false);
            ScrollViewer scrollViewer = null;
            var lastRealizedIndex = int.MinValue;
            var firstRealizedIndex = int.MaxValue;
            RunOnUIThread.Execute(() =>
            {

                var repeater = new ItemsRepeater()
                {
                    ItemsSource = Enumerable.Range(1, 1000),
                    ItemTemplate = GetDataTemplate(@"<Button Content='{Binding}' Width='100' Height='100'/>"),
                    Layout = new UniformGridLayout() { Orientation = Orientation.Vertical },
                    HorizontalCacheLength = 0,
                    VerticalCacheLength = 0,
                };

                repeater.ElementPrepared += (sender, args) =>
                {
                    firstRealizedIndex = Math.Min(firstRealizedIndex, args.Index);
                    lastRealizedIndex = Math.Max(lastRealizedIndex, args.Index);
                };

                scrollViewer = new ScrollViewer()
                {
                    Content = repeater,
                    Height = 200,
                };

                var anchorProvier = new ItemsRepeaterScrollHost()
                {
                    ScrollViewer = scrollViewer
                };

                Content = anchorProvier;
                Content.UpdateLayout();

                Verify.IsLessThan(lastRealizedIndex - firstRealizedIndex, 10);

                scrollViewer.ViewChanged += (sender, args) =>
                {
                    viewChanged.Set();
                };

            });

            for (int i = 0; i < 3; i++)
            {
                viewChanged.Reset();
                RunOnUIThread.Execute(() =>
                {
                    lastRealizedIndex = int.MinValue;
                    firstRealizedIndex = int.MaxValue;
                    scrollViewer.ChangeView(horizontalOffset: 0, verticalOffset: (i + 1) * 80, zoomFactor: null, disableAnimation: true);
                });

                IdleSynchronizer.Wait();
                Verify.IsTrue(viewChanged.WaitOne(DefaultWaitTime));

                RunOnUIThread.Execute(() =>
                {
                    // we used to crash due to a layout cycle before we get here.
                    Verify.IsLessThan(lastRealizedIndex - firstRealizedIndex, 10);
                });
            }
        }

void ValidateIntersectionWithRealizationWindow ( ) [inline]

Definition at line 1143 of file FlowLayoutTests.cs.

        {
            // In this test, we have a ScrollViewer with a viewport of 200x200.
            // The content is a stack panel with a 300x300 border followed by a ItemsRepeater.
            // At the beginning, the ItemsRepeater doesn't intersect the visible or realization window.
            // The test will wait for the realization window to expand and will validate that we
            // realize elements when it begins to intersect the repeater.

            var createLayouts = new Func<ScrollOrientation, VirtualizingLayout[]>((scrollOrientation) =>
            {
                VirtualizingLayout[] layouts = null;
                RunOnUIThread.Execute(() =>
                {
                    layouts = new VirtualizingLayout[]
                    {
                        new StackLayout { Spacing = 10, Orientation = scrollOrientation.ToLayoutOrientation() },
                        new UniformGridLayout { MinItemHeight = 40, MinItemWidth = 40, MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() },
                        new FlowLayout { MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() }
                    };
                });
                return layouts;
            });

            foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
            {
                foreach (var layout in createLayouts(scrollOrientation))
                {
                    Log.Comment(" Layout: " + layout.GetType().Name + " ScrollOrientation:" + scrollOrientation.ToString());
                    var repeater = (ItemsRepeater)null;
                    var rangeRealizedEvent = new AutoResetEvent(initialState: false);
                    var data = new ObservableCollection<string>(Enumerable.Range(0, 4).Select(i => "Item #" + i));
                    var mapping = (List<ContentControl>)null;

                    RunOnUIThread.Execute(() =>
                    {
                        mapping = Enumerable.Range(0, data.Count).Select(i => new ContentControl { Width = 40, Height = 40 }).ToList();

                        var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);
                        var elementFactory = MockElementFactory.CreateElementFactory(mapping);

                        repeater = new ItemsRepeater();
                        // Explicitly set a cache length so we dont depend on the defaults.
                        repeater.VerticalCacheLength = 3;
                        repeater.HorizontalCacheLength = 3;
                        repeater.ItemsSource = dataSource;
                        repeater.ItemTemplate = elementFactory;
                        repeater.Layout = layout;

                        var stack = new StackPanel();
                        stack.Orientation = scrollOrientation.ToLayoutOrientation();
                        stack.Children.Add(new Border { Width = 300, Height = 300 });
                        stack.Children.Add(repeater);

                        var scrollViewer = new ScrollViewer();
                        scrollViewer.Content = stack;
                        scrollViewer.Width = scrollViewer.Height = 200;
                        SetUpScrollViewerOrientation(scrollViewer, scrollOrientation);

                        var tracker = new ItemsRepeaterScrollHost();
                        tracker.ScrollViewer = scrollViewer;
                        Content = tracker;

                        repeater.ElementPrepared += (o, e) =>
                        {
                            if (e.Index == data.Count - 1)
                            {
                                for (int i = 0; i < data.Count; ++i)
                                {
                                    Verify.AreEqual(mapping[i], repeater.TryGetElement(i));
                                }

                                rangeRealizedEvent.Set();
                            }
                        };

                        Content.UpdateLayout();
                    });

                    Verify.IsTrue(rangeRealizedEvent.WaitOne(DefaultWaitTimeInMS), "Waiting for all items to be realized as the realization window expands.");
                }
            }
        }

void ValidateLayoutEstimations | ( | ScrollOrientation | scrollOrientation,
 |  | LayoutChoice | layoutChoice |
 | ) |  |  | [inline, private]

Definition at line 1684 of file FlowLayoutTests.cs.

        {
            Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
            var om = new OrientationBasedMeasures(scrollOrientation);
            List<VirtualizingLayout> layouts = new List<VirtualizingLayout>();
            const double itemSize = 90;
            const double lineSpacing = 10;
            double itemSizeWithLineSpacing = itemSize + lineSpacing;
            VirtualizingLayout layout = null;
            var viewChangedEvent = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                switch (layoutChoice)
                {
                    case LayoutChoice.Stack:
                        layout = new StackLayout() { Spacing = lineSpacing };
                        break;

                    case LayoutChoice.Grid:
                        {
                            var minRowSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? lineSpacing : 0;
                            var minColumnSpacing = om.ScrollOrientation == ScrollOrientation.Horizontal ? lineSpacing : 0;
                            layout = new UniformGridLayout() { MinItemWidth = itemSize, MinItemHeight = itemSize, MinRowSpacing = minRowSpacing, MinColumnSpacing = minColumnSpacing };
                        }
                        break;

                    case LayoutChoice.Flow:
                        {
                            var minRowSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? lineSpacing : 0;
                            var minColumnSpacing = om.ScrollOrientation == ScrollOrientation.Horizontal ? lineSpacing : 0;
                            layout = new FlowLayoutDerived()
                            {
                                MinRowSpacing = minRowSpacing,
                                MinColumnSpacing = minColumnSpacing,
                                OnLineArrangedFunc = (int startIndex, int countInLine, double lineSize, VirtualizingLayoutContext context) =>
                                {
                                    Verify.AreEqual(0, startIndex % 4);
                                    Verify.AreEqual(4, countInLine);
                                    Verify.AreEqual(lineSize, itemSize);
                                }
                            };
                        }
                        break;

                    default:
                        throw new InvalidOperationException("Unhandled layout choice.");
                }
            });

            ItemsRepeater repeater = null;
            RecyclingElementFactoryDerived elementFactory = null;
            ScrollViewer scrollViewer = null;
            const int numItems = 1000;
            var numColumns = (int)(400 / itemSize);
            var numRows = numItems / numColumns;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment(string.Format(" Layout: {0}", layout.GetType()));
                layout.SetOrientation(scrollOrientation);

                elementFactory = new RecyclingElementFactoryDerived()
                {
                    Templates = { { "key", GetDataTemplate(@"<Button Content='{Binding}' Width='90' Height='90'/>") } },
                    RecyclePool = new RecyclePool(),
                };

                Content = CreateAndInitializeRepeater
                (
                   om,
                   itemsSource: Enumerable.Range(0, numItems),
                   elementFactory: elementFactory,
                   layout: layout,
                   repeater: ref repeater,
                   scrollViewer: ref scrollViewer
                );

                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChangedEvent.Set();
                    }
                };

                Content.UpdateLayout();
                if (layout is StackLayout)
                {
                    Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
                else if (layout is UniformGridLayout || layout is FlowLayout)
                {
                    Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
            });

            // Move window - connected
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var success = om.IsVertical ?
                    scrollViewer.ChangeView(null, 200, null, true) :
                    scrollViewer.ChangeView(200, null, null, true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                if (layout is StackLayout)
                {
                    Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
                else if (layout is UniformGridLayout || layout is FlowLayout)
                {
                    Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
            });

            // Move window - disconnected
            RunOnUIThread.Execute(() =>
            {
                viewChangedEvent.Reset();
                var success = om.IsVertical ?
                   scrollViewer.ChangeView(null, 20000, null, true) :
                   scrollViewer.ChangeView(20000, null, null, true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                if (layout is StackLayout)
                {
                    VerifyRealizedRange(expectedStartindex: 199, expectedCount: 6, actualIndices: elementFactory.RealizedElementIndices);
                    Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
                else if (layout is UniformGridLayout)
                {
                    // We have to copy the list we're passing, as any modification in the realizedElementIndices will result in
                    // altering the behavior and preventing the recycling of the containers.
                    List<int> observedIndices = new List<int>(elementFactory.RealizedElementIndices);
                    observedIndices.Remove(0);
                    VerifyRealizedRange(expectedStartindex: 799, expectedCount: 18, actualIndices: observedIndices);
                    Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
                else if (layout is FlowLayout)
                {
                    VerifyRealizedRange(expectedStartindex: 799, expectedCount: 18, actualIndices: elementFactory.RealizedElementIndices);
                    Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }

            });

            // Validate Ability to override Extent using a disconnected move
            RunOnUIThread.Execute(() =>
            {
                if (layout is FlowLayoutDerived)
                {
                    var flowLayout = (FlowLayoutDerived)layout;
                    flowLayout.GetExtentFunc = (
                       Size availableSize,
                       VirtualizingLayoutContext context,
                       UIElement firstRealized,
                       int firstRealizedItemIndex,
                       Rect firstRealizedLayoutBounds,
                       UIElement lastRealized,
                       int lastRealizedItemIndex,
                       Rect lastRealizedLayoutBounds,
                       Rect fromBase) =>
                    {
                        return om.MinorMajorRect(0, 0, 400, numRows * itemSize);
                    };
                }

                viewChangedEvent.Reset();
                var success = om.IsVertical ?
                   scrollViewer.ChangeView(null, 10000, null, true) :
                   scrollViewer.ChangeView(10000, null, null, true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                if (layout is StackLayout)
                {
                    Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
                else if (layout is UniformGridLayout)
                {
                    Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
                }
                else if (layout is FlowLayout)
                {
                    // Extent overriden using GetExtent override.
                    Verify.AreEqual(numRows * itemSize, om.Major(repeater.DesiredSize));
                }
            });
        }

void ValidateLayoutSharing ( ) [inline]

Definition at line 978 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("Orientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);
                    const int itemSize = 20;
                    var layouts = new List<VirtualizingLayout>()
                    {
                        new StackLayout(),
                        new UniformGridLayout(){ MinItemWidth = itemSize, MinItemHeight = itemSize },
                        new FlowLayoutDerived()
                    };

                    for (int layoutIndex = 0; layoutIndex < layouts.Count; layoutIndex++)
                    {
                        var repeater1Layout = layouts[layoutIndex];
                        var repeater2Layout = layouts[(layoutIndex + 1) % layouts.Count];
                        Log.Comment(string.Format(" Layouts: {0} and {1}", repeater1Layout.GetType(), repeater2Layout.GetType()));
                        repeater1Layout.SetOrientation(scrollOrientation);
                        repeater2Layout.SetOrientation(scrollOrientation);

                        const int repeater1NumItems = 5;
                        const int repeater2NumItems = 10;
                        var elementFactory = new RecyclingElementFactoryDerived()
                        {
                            Templates = { { "key", GetDataTemplate(@"<Button Content='{Binding}' Width='20' Height='20'/>") } },
                            RecyclePool = new RecyclePool(),
                            ValidateElementIndices = false, // can get same indicies for different repeaters
                        };

                        var repeater1 = new ItemsRepeater()
                        {
                            ItemsSource = Enumerable.Range(0, repeater1NumItems),
                            Layout = repeater1Layout,
                            ItemTemplate = elementFactory,
                            HorizontalCacheLength = 0,
                            VerticalCacheLength = 0,
                        };

                        var repeater2 = new ItemsRepeater()
                        {
                            ItemsSource = Enumerable.Range(0, repeater2NumItems),
                            Layout = repeater2Layout,
                            ItemTemplate = elementFactory,
                            HorizontalCacheLength = 0,
                            VerticalCacheLength = 0,
                        };

                        var stack = new StackPanel() { Orientation = scrollOrientation.ToLayoutOrientation() };
                        stack.Children.Add(repeater1);
                        stack.Children.Add(repeater2);

                        var scrollViewer = new ScrollViewer()
                        {
                            Content = stack
                        };

                        SetUpScrollViewerOrientation(scrollViewer, scrollOrientation);
                        Content = new ItemsRepeaterScrollHost()
                        {
                            Width = 400,
                            Height = 400,
                            ScrollViewer = scrollViewer
                        };

                        Content.UpdateLayout();

                        if (repeater1Layout is StackLayout)
                        {
                            ValidateStackLayoutChildrenLayoutBounds(om, (i) => repeater1.TryGetElement(i), 400, repeater1NumItems, itemSize, 0, repeater1.DesiredSize);
                        }
                        else if (repeater1Layout is UniformGridLayout)
                        {
                            ValidateGridLayoutChildrenLayoutBounds(om, (i) => repeater1.TryGetElement(i), itemSize, itemSize, 0, 0, repeater1NumItems, repeater1.DesiredSize);
                        }
                        else
                        {
                            ValidateFlowLayoutChildrenLayoutBounds(om, (i) => repeater1.TryGetElement(i), 0, 0, repeater1NumItems, repeater1.DesiredSize);
                        }

                        if (repeater2Layout is StackLayout)
                        {
                            ValidateStackLayoutChildrenLayoutBounds(om, (i) => repeater2.TryGetElement(i), 400, repeater2NumItems, itemSize, 0, repeater2.DesiredSize);
                        }
                        else if (repeater2Layout is UniformGridLayout)
                        {
                            ValidateGridLayoutChildrenLayoutBounds(om, (i) => repeater2.TryGetElement(i), itemSize, itemSize, 0, 0, repeater2NumItems, repeater2.DesiredSize);
                        }
                        else
                        {
                            ValidateFlowLayoutChildrenLayoutBounds(om, (i) => repeater2.TryGetElement(i), 0, 0, repeater2NumItems, repeater2.DesiredSize);
                        }
                    }
                }
            });
        }

void ValidateLayoutWithInfiniteMeasureSizeInNonVirtualizingDirection ( ) [inline]

Definition at line 1080 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment("ScrollOrientation is " + scrollOrientation);

                    var data = new ObservableCollection<int>(Enumerable.Range(0, 4));
                    var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);
                    var elementFactory = MockElementFactory.CreateElementFactory(
                        Enumerable.Range(0, data.Count).Select(i => new ContentControl
                        {
                            Width = (i + 1) * 40,
                            Height = (i + 1) * 40,
                        }).ToList());

                    var repeater = new ItemsRepeater();
                    repeater.ItemsSource = dataSource;
                    repeater.ItemTemplate = elementFactory;

                    var scrollViewer = new ScrollViewer();
                    scrollViewer.HorizontalScrollMode = ScrollMode.Enabled;
                    scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
                    scrollViewer.Content = repeater;
                    scrollViewer.Width = scrollViewer.Height = 600;

                    var tracker = new ItemsRepeaterScrollHost();
                    tracker.ScrollViewer = scrollViewer;

                    Content = tracker;
                    Content.UpdateLayout();

                    var layouts = new VirtualizingLayout[]
                    {
                        new StackLayout { Spacing = 10, Orientation = scrollOrientation.ToLayoutOrientation() },
                        new UniformGridLayout { MinItemHeight = 40, MinItemWidth = 40, MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() },
                        new FlowLayout { MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() }
                    };

                    var verifyDesiredSize = new Action<Size, Size>((expected, actual) =>
                    {
                        Verify.AreEqual(expected.Width, scrollOrientation == ScrollOrientation.Vertical ? actual.Width : actual.Height);
                        Verify.AreEqual(expected.Height, scrollOrientation == ScrollOrientation.Vertical ? actual.Height : actual.Width);
                    });

                    foreach (var layout in layouts)
                    {
                        Log.Comment("Layout is " + layout.GetType().Name);
                        repeater.Layout = layout;
                        Content.UpdateLayout();

                        if (layout is StackLayout) verifyDesiredSize(new Size(160, 430), repeater.DesiredSize);
                        if (layout is UniformGridLayout) verifyDesiredSize(new Size(190, 40), repeater.DesiredSize);
                        if (layout is FlowLayout) verifyDesiredSize(new Size(430, 160), repeater.DesiredSize);
                    }
                }
            });
        }

void ValidateMakeAnchor ( ) [inline]

Definition at line 813 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("Orientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);

                    const int numItems = 1000;
                    int getElementCallCount = 0;
                    int recycleElementCallCount = 0;
                    var elementFactory = new RecyclingElementFactoryDerived()
                    {
                        Templates = { { "key", GetDataTemplate("<Button Content='{Binding}' />") } },
                        RecyclePool = new RecyclePool(),
                        GetElementFunc = (int index, UIElement owner, UIElement elementFromBase) =>
                        {
                            getElementCallCount++;
                            return elementFromBase;
                        },
                        ClearElementFunc = (UIElement element, UIElement owner) => recycleElementCallCount++,
                    };

                    ItemsRepeater repeater = null;
                    ScrollViewer scrollViewer = null;
                    Content = CreateAndInitializeRepeater
                    (
                       om,
                       itemsSource: Enumerable.Range(0, numItems),
                       elementFactory: elementFactory,
                       layout: new FlowLayoutDerived()
                       {
                           Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                       },
                       repeater: ref repeater,
                       scrollViewer: ref scrollViewer
                    );

                    Content.UpdateLayout();
                    // Validate that we are indeed virtualizing
                    Verify.IsGreaterThan(numItems, elementFactory.RealizedElementIndices.Count);

                    // GetAnchor on an element in view.
                    getElementCallCount = 0;
                    var anchor = repeater.GetOrCreateElement(1);
                    Verify.AreEqual(1, repeater.GetElementIndex(anchor));
                    Verify.AreEqual(0, getElementCallCount);

                    // GetAnchor on element outside the view.
                    recycleElementCallCount = 0;
                    int realizedElementsBeforeMakeAnchor = elementFactory.RealizedElementIndices.Count();
                    anchor = repeater.GetOrCreateElement(900);
                    Verify.AreEqual(900, repeater.GetElementIndex(anchor));
                    Verify.AreEqual(1, getElementCallCount);

                    Content.UpdateLayout();
                    Verify.AreEqual(realizedElementsBeforeMakeAnchor, recycleElementCallCount);
                    Verify.IsLessThan(1, elementFactory.RealizedElementIndices.Count());
                    Verify.IsGreaterThan(150, elementFactory.RealizedElementIndices.Count());

                    Verify.Throws<ArgumentException>(() => repeater.GetOrCreateElement(numItems + 10));
                }
            });
        }

void ValidateResizingFirstItemResizesOtherItemsInGridLayout ( ) [inline]

Definition at line 146 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                const int numItems = 10;
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    foreach (DimensionChoice dimension in Enum.GetValues(typeof(DimensionChoice)))
                    {
                        LayoutPanel panel = new LayoutPanel()
                        {
                            Layout = new UniformGridLayout() { }
                        };

                        for (int i = 0; i < numItems; i++)
                        {
                            panel.Children.Add(new Button() { Content = i, HorizontalAlignment = HorizontalAlignment.Stretch });
                        }

                        Content = panel;
                        Content.UpdateLayout();

                        // verify the defaults before our modification
                        for (int i = 0; i < panel.Children.Count; i++)
                        {
                            var child = (FrameworkElement)panel.Children.ElementAt(i);
                            var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                            // Ensure width is not 100 before updating.
                            Verify.AreNotEqual(100, layoutBounds.Width);
                            Verify.AreEqual(30, layoutBounds.Height);
                        }

                        // modify the first item's width, height, or both
                        var firstItem = panel.Children[0] as Button;

                        switch (dimension)
                        {
                            case DimensionChoice.Width:
                                firstItem.Width = 100;
                                break;
                            case DimensionChoice.Height:
                                firstItem.Height = 100;
                                break;
                            case DimensionChoice.Size:
                                firstItem.Width = 100;
                                firstItem.Height = 100;
                                break;
                            default:
                                throw new InvalidOperationException("Unhandled dimension choice.");
                        }

                        // Need to invalidate measure to kick in bigger size,
                        // If the new size is larger, then setting the value does not
                        // invalidate measure, because the desired size is going to be same.
                        panel.InvalidateMeasure();
                        Content.UpdateLayout();

                        // validate that our dimension's size has propagated to all other buttons
                        for (int i = 0; i < panel.Children.Count; i++)
                        {
                            var child = (FrameworkElement)panel.Children.ElementAt(i);
                            var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                            switch (dimension)
                            {
                                case DimensionChoice.Width:
                                    Verify.AreEqual(100, layoutBounds.Width);
                                    break;
                                case DimensionChoice.Height:
                                    Verify.AreEqual(100, layoutBounds.Height);
                                    break;
                                case DimensionChoice.Size:
                                    Verify.AreEqual(100, layoutBounds.Width);
                                    Verify.AreEqual(100, layoutBounds.Height);
                                    break;
                                default:
                                    throw new InvalidOperationException("Unhandled dimension choice.");

                            }
                        }

                        // Make the first item smaller
                        switch (dimension)
                        {
                            case DimensionChoice.Width:
                                firstItem.Width = 32;
                                break;
                            case DimensionChoice.Height:
                                firstItem.Height = 32;
                                break;
                            case DimensionChoice.Size:
                                firstItem.Width = 32;
                                firstItem.Height = 32;
                                break;
                            default:
                                throw new InvalidOperationException("Unhandled dimension choice.");
                        }

                        Content.UpdateLayout();

                        // validate that our dimension's size has propagated to all other buttons
                        for (int i = 0; i < panel.Children.Count; i++)
                        {
                            var child = (FrameworkElement)panel.Children.ElementAt(i);
                            var layoutBounds = LayoutInformation.GetLayoutSlot(child);

                            switch (dimension)
                            {
                                case DimensionChoice.Width:
                                    Verify.AreEqual(32, layoutBounds.Width);
                                    break;
                                case DimensionChoice.Height:
                                    Verify.AreEqual(32, layoutBounds.Height);
                                    break;
                                case DimensionChoice.Size:
                                    Verify.AreEqual(32, layoutBounds.Width);
                                    Verify.AreEqual(32, layoutBounds.Height);
                                    break;
                                default:
                                    throw new InvalidOperationException("Unhandled dimension choice.");

                            }
                        }
                    }
                }
            });
        }

void ValidateStackLayout ( ) [inline]

Definition at line 28 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);
                    const int panelMinorSize = 400;
                    const int numItems = 5;
                    const int itemMajorSize = 50;
                    // We test for when the item is smaller than the panel and when it's bigger than the panel:
                    int[] itemMinorSizeChoices = new int[] { 200, 800 };

                    foreach (int itemMinorSize in itemMinorSizeChoices)
                    {

                        LayoutPanel panel = new LayoutPanel()
                        {
                            Layout = new StackLayout() { Orientation = scrollOrientation.ToLayoutOrientation() }
                        };

                        SetPanelMinorSize(panel, om, panelMinorSize);
                        for (int i = 0; i < numItems; i++)
                        {
                            panel.Children.Add(
                                new Button()
                                {
                                    Content = i,
                                    Width = om.IsVertical ? itemMinorSize : itemMajorSize,
                                    Height = om.IsVertical ? itemMajorSize : itemMinorSize
                                });
                        }

                        Content = panel;
                        Content.UpdateLayout();
                        int itemSpacing = 0;
                        ValidateStackLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], panelMinorSize, numItems, itemMajorSize, itemSpacing, panel.DesiredSize);

                        itemSpacing = 10;
                        ((StackLayout)panel.Layout).Spacing = itemSpacing;
                        panel.UpdateLayout();
                        ValidateStackLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], panelMinorSize, numItems, itemMajorSize, itemSpacing, panel.DesiredSize);
                    }
                }
            });
        }

void ValidateStackLayoutArrangeWithInsertion ( ) [inline]

Definition at line 1467 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var itemsSource = new ObservableCollection<int>(Enumerable.Range(0, 3));
                var sp = new StackPanel();
                var sl = new StackLayout()
                {
                    Orientation = Orientation.Horizontal,
                    Spacing = 0
                };
                var repeater = new ItemsRepeater();
                repeater.Layout = sl;
                repeater.ItemsSource = itemsSource;
                repeater.ItemTemplate = GetDataTemplate(@"<TextBlock Width='64' Height='32' Text='{Binding}'/>");

                sp.Children.Add(repeater);

                Content = sp;
                Content.UpdateLayout();

                Log.Comment("Item bounds before insertion:");

                for (int index = 0; index < 3; index++)
                {
                    var item = repeater.TryGetElement(index) as FrameworkElement;
                    var actualBounds = LayoutInformation.GetLayoutSlot(item);
                    var expectedBounds = new Rect(64 * index, 0, 64, 32);

                    Log.Comment(string.Format(@"  Index:{0}, Expected:{1} Actual:{2}", index, expectedBounds, actualBounds));
                    Verify.AreEqual(expectedBounds, actualBounds);
                }

                for (int insertionIndex = 0; insertionIndex < 3; insertionIndex++)
                {
                    Log.Comment(string.Format(@"Item {0} insertion at index:{1}", itemsSource.Count, insertionIndex));
                    itemsSource.Insert(insertionIndex, itemsSource.Count);

                    Content.UpdateLayout();

                    Log.Comment("Item bounds after insertion:");

                    for (int index = 0; index < itemsSource.Count; index++)
                    {
                        var item = repeater.TryGetElement(index) as FrameworkElement;
                        var actualBounds = LayoutInformation.GetLayoutSlot(item);
                        var expectedBounds = new Rect(64 * index, 0, 64, 32);

                        Log.Comment(string.Format(@"  Index:{0}, Expected:{1} Actual:{2}", index, expectedBounds, actualBounds));
                        Verify.AreEqual(expectedBounds, actualBounds);
                    }
                }
            });
        }

void ValidateStackLayoutArrangeWithStretch ( ) [inline]

Definition at line 1440 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var svWidth = 1000.0;
                ScrollViewer sv = new ScrollViewer() {
                    Width = svWidth,
                    HorizontalScrollBarVisibility = ScrollBarVisibility.Auto
                };

                var repeater = new ItemsRepeater();
                repeater.ItemsSource = Enumerable.Range(0, 10);
                repeater.ItemTemplate = GetDataTemplate(@"<TextBlock HorizontalAlignment='Stretch' Text='{Binding}' />");

                sv.Content = repeater;

                Content = sv;
                Content.UpdateLayout();

                var firstItem = (FrameworkElement)repeater.TryGetElement(0);
                var bounds = LayoutInformation.GetLayoutSlot(firstItem);
                Verify.AreEqual(svWidth, bounds.Width);

            });
        }

void ValidateStackLayoutChildrenLayoutBounds | ( | OrientationBasedMeasures | om,
 |  | Func< int, UIElement > | elementAtIndexFunc,
 |  | int | panelMinorSize,
 |  | int | numItems,
 |  | int | itemMajorSize,
 |  | int | itemSpacing,
 |  | Size | desiredSize |
 | ) |  |  | [inline, private]

Definition at line 1538 of file FlowLayoutTests.cs.

        {
            Rect expectedRect = om.MinorMajorRect(0, 0, panelMinorSize, itemMajorSize);
            for (int i = 0; i < numItems; i++)
            {
                var child = (FrameworkElement)elementAtIndexFunc(i);
                var actualRect = LayoutInformation.GetLayoutSlot(child);
                Verify.AreEqual(expectedRect, actualRect);

                om.SetMajorStart(ref expectedRect, om.MajorStart(expectedRect) + itemMajorSize + itemSpacing);
            }

            Verify.AreEqual(numItems * itemMajorSize + (numItems - 1) * itemSpacing, om.Major(desiredSize));
        }

void ValidateUniformGridWithItemsRelyingOnAspectRatio ( ) [inline]

Definition at line 1246 of file FlowLayoutTests.cs.

        {
            ItemsRepeater repeater = null;
            ScrollViewer scroller = null;
            RunOnUIThread.Execute(() =>
            {
                repeater = new ItemsRepeater() {
                    ItemsSource = Enumerable.Range(0, 6), // no items
                    Layout = new UniformGridLayout() {
                        Orientation = Orientation.Vertical,
                        MaximumRowsOrColumns = 1,
                        MinItemWidth = 100
                    },
                    MaxWidth = 300,
                    ItemTemplate = GetDataTemplate("<repeaterCommon:AspectRatioRespectingControl/>")
                };

                scroller = new ScrollViewer() {
                    Content = repeater
                };

                Content = scroller;
                repeater.UpdateLayout();
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Assert not implemented yet
                Verify.IsTrue(Math.Abs(300 - repeater.DesiredSize.Width) < 1, "Repeater width should be 300");
                Verify.IsTrue(repeater.DesiredSize.Height > 1, "Repeater should have height");
            });
        }

void ValidateUniformGridWithNoItems ( ) [inline]

Definition at line 1227 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater() {
                    ItemsSource = new List<string>(), // no items
                    Layout = new UniformGridLayout() { Orientation = Orientation.Vertical },
                };

                Content = repeater;
                Content.UpdateLayout();

                // Ensure we do not crash and get zero size.
                Verify.AreEqual(0, repeater.DesiredSize.Width);
                Verify.AreEqual(0, repeater.DesiredSize.Height);
            });
        }

void VerifyFlowLayoutOnLineArranged ( ) [inline]

Definition at line 933 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
                {
                    Log.Comment(string.Format("Orientation: {0}", scrollOrientation));
                    var om = new OrientationBasedMeasures(scrollOrientation);
                    const int panelMinorSize = 100;
                    const double itemSize = 50;
                    const int numItems = 5;
                    int onLineArrangedCallCount = 0;
                    LayoutPanel panel = new LayoutPanel()
                    {
                        Layout = new FlowLayoutDerived()
                        {
                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
                            OnLineArrangedFunc = (int startIndex, int countInLine, double lineSize, VirtualizingLayoutContext context) =>
                            {
                                Verify.AreEqual(0, startIndex % 2);
                                Verify.AreEqual(lineSize, itemSize);
                                // Last line has only one item in it
                                Verify.AreEqual(startIndex == 4 ? 1 : 2, countInLine);
                                onLineArrangedCallCount++;
                            }
                        }
                    };

                    SetPanelMinorSize(panel, om, panelMinorSize);
                    for (int i = 0; i < numItems; i++)
                    {
                        panel.Children.Add(new Button() { Content = i, Width = itemSize, Height = itemSize });
                    }

                    Content = panel;

                    Content.UpdateLayout();

                    Verify.AreEqual(3, onLineArrangedCallCount);
                }
            });
        }

void VerifyItemsGetFullSpaceInMajorDirectionWhenSmallerThanLineSize ( ) [inline]

Definition at line 1401 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var layoutPanel = (LayoutPanel)XamlReader.Load(
                    @"<controls:LayoutPanel Width='800'
                        xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                        <controls:LayoutPanel.Layout>
                            <controls:FlowLayout  />
                        </controls:LayoutPanel.Layout>
                        <Border Width='300' Height='300' />
                        <Border Width='350' Height='150' />
                        <Border Width='300' Height='300' />
                        <Border Width='350' Height='250' />
                    </controls:LayoutPanel>");

                Content = layoutPanel;
                layoutPanel.UpdateLayout();

                var expected = new List<Rect>()
                {
                    new Rect(0, 0, 300, 300),
                    new Rect(300, 0, 350, 300),
                    new Rect(0, 300, 300, 300),
                    new Rect(300, 300, 350, 300),
                    new Rect(0, 600, 200, 250)
                };

                for (int i = 0; i < layoutPanel.Children.Count; i++)
                {
                    var child = (FrameworkElement)layoutPanel.Children[i];
                    var actualRect = LayoutInformation.GetLayoutSlot(child);
                    Verify.AreEqual(expected[i], actualRect);
                }
            });
        }

static void VerifyRealizedRange | ( | int | expectedStartindex,
 |  | int | expectedCount,
 |  | List< int > | actualIndices |
 | ) |  |  | [inline, static, private]

Definition at line 2053 of file FlowLayoutTests.cs.

        {
            Verify.AreEqual(expectedCount, actualIndices.Count);
            for (int i = expectedStartindex; i < expectedStartindex + expectedCount; i++)
            {
                Verify.IsTrue(actualIndices.Contains(i));
            }
        }

void VerifyUnconstrainedUniformGridLayout ( ) [inline]

Definition at line 1379 of file FlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var scrollViewer = XamlReader.Load(
                    @"<ScrollViewer xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        HorizontalScrollBarVisibility='Auto'>
                        <LayoutPanel>
                            <LayoutPanel.Layout>
                                <UniformGridLayout ItemsStretch='Fill' MinItemWidth='100' MinItemHeight='100'/>
                            </LayoutPanel.Layout>
                            <Border/>
                        </LayoutPanel>
                    </ScrollViewer>") as ScrollViewer;

                Content = scrollViewer;
                scrollViewer.UpdateLayout();
            });
            IdleSynchronizer.Wait();
        }

static void VerifyWithinTolerance | ( | double | expected,
 |  | double | actual,
 |  | double | tolerance |
 | ) |  |  | [inline, static, private]

Definition at line 2026 of file FlowLayoutTests.cs.

        {
            Log.Comment(string.Format("Verify: WithinTolerance({0}, {1}, {2})", expected, actual, tolerance));
            if (Math.Abs(expected - actual) > tolerance)
            {
                Verify.Fail(string.Format("AreEqual failed to be within tolerance: {0}:{1}:{2}", expected, actual, tolerance));
            }
        }

Member Data Documentation

int DefaultWaitTime = 2000 [private]

Definition at line 2110 of file FlowLayoutTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/FlowLayoutTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IndexPathTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • IndexPathTests
Public Member Functions

IndexPathTests Class Reference

List of all members.

Public Member Functions

void ValidateIndexPath ()

Detailed Description

Definition at line 15 of file IndexPathTests.cs.

Member Function Documentation

void ValidateIndexPath ( ) [inline]

Definition at line 18 of file IndexPathTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                IndexPath path = IndexPath.CreateFromIndices(null);
                Verify.AreEqual(0, path.GetSize());

                path = IndexPath.CreateFrom(5);
                Verify.AreEqual(1, path.GetSize());
                Verify.AreEqual(5, path.GetAt(0));

                path = IndexPath.CreateFrom(1, 2);
                Verify.AreEqual(2, path.GetSize());
                Verify.AreEqual(1, path.GetAt(0));
                Verify.AreEqual(2, path.GetAt(1));

                Verify.AreEqual(0, IndexPath.CreateFrom(0, 1).CompareTo(IndexPath.CreateFrom(0, 1)));
                Verify.AreEqual(-1, IndexPath.CreateFrom(0, 1).CompareTo(IndexPath.CreateFrom(1, 0)));
                Verify.AreEqual(1, IndexPath.CreateFrom(0, 1).CompareTo(IndexPath.CreateFrom(0, 0)));

                Verify.AreEqual(-1, IndexPath.CreateFrom(1, 0).CompareTo(IndexPath.CreateFrom(1, 1)));
                Verify.AreEqual(0, IndexPath.CreateFrom(1, 0).CompareTo(IndexPath.CreateFrom(1, 0)));
                Verify.AreEqual(1, IndexPath.CreateFrom(1, 1).CompareTo(IndexPath.CreateFrom(1, 0)));

                var emptyPath = IndexPath.CreateFromIndices(null);
                Verify.AreEqual(0, emptyPath.CompareTo(emptyPath));
                var path1 = IndexPath.CreateFrom(1);
                Verify.AreEqual(-1, emptyPath.CompareTo(path1));
                Verify.AreEqual(1, path1.CompareTo(emptyPath));
                var path12 = IndexPath.CreateFrom(1, 2);
                Verify.AreEqual(-1, path1.CompareTo(path12));
                Verify.AreEqual(1, path12.CompareTo(path1));
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/IndexPathTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InspectingDataSourceTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • InspectingDataSourceTests
Classes | Public Member Functions | Static Private Member Functions

InspectingDataSourceTests Class Reference

List of all members.

Classes

class | CollectionChangeRecorder
class | CustomEnumerable
class | ObservableVectorWithUniqueIds
class | WinRTObservableVector

Public Member Functions

void | CanCreateFromIBindableIterable ()
void | CanCreateFromInccIBindableVector ()
void | CanCreateFromIObservableVector ()
void | ValidateSwitchingItemsSourceRefreshesElements (bool isVirtualLayout)
void | ValidateSwitchingItemsSourceRefreshesElementsNonVirtualLayout ()
void | ValidateSwitchingItemsSourceRefreshesElementsVirtualLayout ()
void | VerifyCallingResetMultipleTimesOnUniqueIdItemsSource ()
void | VerifyIndexOfBehavior ()
void | VerifyNotifyCollectionChangeWithReadonlyListBehavior ()
void | VerifyReadOnlyListCompatibility ()
void | VerifyUniqueIdMappingInterface ()

Static Private Member Functions

static int | GetCount (IList vector)
static void | VerifyRecordedCollectionChanges (NotifyCollectionChangedEventArgs[] expected, List< NotifyCollectionChangedEventArgs > actual)

Detailed Description

Definition at line 25 of file InspectingDataSourceTests.cs.

Member Function Documentation

void CanCreateFromIBindableIterable ( ) [inline]

Definition at line 28 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataSource = new ItemsSourceView(Enumerable.Range(0, 100));
                Verify.AreEqual(100, dataSource.Count);
                Verify.AreEqual(4, dataSource.GetAt(4));
            });
        }

void CanCreateFromInccIBindableVector ( ) [inline]

Definition at line 39 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableCollection<string>(Enumerable.Range(0, 100).Select(i => string.Format("Item #{0}", i)));
                var dataSource = new ItemsSourceView(data);
                var recorder = new CollectionChangeRecorder(dataSource);
                Verify.AreEqual(100, dataSource.Count);
                Verify.AreEqual("Item #4", (string)dataSource.GetAt(4));

                data.Insert(4, "Inserted Item");
                data.RemoveAt(7);
                data[15] = "Replaced Item";
                data.Clear();

                VerifyRecordedCollectionChanges(
                    expected: new NotifyCollectionChangedEventArgs[]
                    {
                        CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Add, -1, 0, 4, 1),
                        CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Remove, 7, 1, -1, 0),
                        CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Replace, 15, 1, 15, 1),
                        CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, 0, -1, 0)
                    },
                    actual: recorder.RecordedArgs);
            });
        }

void CanCreateFromIObservableVector ( ) [inline]

Definition at line 68 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new WinRTObservableVector(Enumerable.Range(0, 100).Select(i => string.Format("Item #{0}", i)));
                var dataSource = new ItemsSourceView(data);
                var recorder = new CollectionChangeRecorder(dataSource);
                Verify.AreEqual(100, dataSource.Count);
                Verify.AreEqual("Item #4", (string)dataSource.GetAt(4));
                Verify.IsFalse(dataSource.HasKeyIndexMapping);

                data.Insert(4, "Inserted Item");
                data.RemoveAt(7);
                data[15] = "Replaced Item";
                data.Clear();

                VerifyRecordedCollectionChanges(
                    expected: new NotifyCollectionChangedEventArgs[]
                    {
                     CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Add, -1, 0, 4, 1),
                     CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Remove, 7, 1, -1, 0),
                     CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Replace, 15, 1, 15, 1),
                     CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, 0, -1, 0),
                    },
                    actual: recorder.RecordedArgs);
            });
        }

static int GetCount ( IList vector ) [inline, static, private]

Definition at line 305 of file InspectingDataSourceTests.cs.

        {
            return vector == null ? -1 : (int)vector.Count;
        }

void ValidateSwitchingItemsSourceRefreshesElements ( bool isVirtualLayout ) [inline]

Definition at line 248 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater repeater = null;
                const int numItems = 10;

                repeater = new ItemsRepeater() {
                    ItemsSource = Enumerable.Range(0, numItems),
                };

                // By default we use stack layout that is virtualizing.
                if (!isVirtualLayout)
                {
                    repeater.Layout = new NonVirtualStackLayout();
                }

                Content = new ItemsRepeaterScrollHost() {
                    Width = 400,
                    Height = 400,
                    ScrollViewer = new Microsoft.UI.Xaml.Controls.ScrollViewer() {
                        Content = repeater
                    }
                };

                Content.UpdateLayout();
                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    Verify.AreEqual(i.ToString(), element.Text);
                }

                repeater.ItemsSource = Enumerable.Range(20, numItems);
                Content.UpdateLayout();

                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    Verify.AreEqual((i + 20).ToString(), element.Text);
                }
            });
        }

void ValidateSwitchingItemsSourceRefreshesElementsNonVirtualLayout ( ) [inline]

Definition at line 186 of file InspectingDataSourceTests.cs.

        {
            ValidateSwitchingItemsSourceRefreshesElements(isVirtualLayout: false);
        }

void ValidateSwitchingItemsSourceRefreshesElementsVirtualLayout ( ) [inline]

Definition at line 192 of file InspectingDataSourceTests.cs.

        {
            ValidateSwitchingItemsSourceRefreshesElements(isVirtualLayout: true);
        }

void VerifyCallingResetMultipleTimesOnUniqueIdItemsSource ( ) [inline]

Definition at line 153 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new CustomItemsSourceWithUniqueId(Enumerable.Range(0, 5).ToList());
                var repeater = new ItemsRepeater()
                {
                    ItemsSource = data,
                    ItemTransitionProvider = new DefaultItemCollectionTransitionProvider()
                };

                Content = new Microsoft.UI.Xaml.Controls.ScrollViewer()
                {
                    Width=400,
                    Height=400,
                    Content = repeater
                };
                Content.UpdateLayout();

                data.Reset();
                data.Reset();

                Content.UpdateLayout();

                Verify.AreEqual(5, repeater.ItemsSourceView.Count);
                for(int i=0; i< 5; i++)
                {
                    Verify.IsNotNull(repeater.TryGetElement(i));
                }
            });
        }

void VerifyIndexOfBehavior ( ) [inline]

Definition at line 111 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var collections = new List<IEnumerable>();
                collections.Add(new ObservableVectorWithUniqueIds(Enumerable.Range(0, 10)));
                collections.Add(new ObservableCollection<int>(Enumerable.Range(0,10)));

                foreach(var collection in collections)
                {
                    var dataSource = new ItemsSourceView(collection);
                    foreach(int i in collection)
                    {
                        Verify.AreEqual(i, dataSource.IndexOf(i));
                    }

                    Verify.AreEqual(-1, dataSource.IndexOf(11));
                }

                // Enumerabl.Range returns IEnumerable which does not provide IndexOf
                var testingItemsSourceView = new ItemsSourceView(Enumerable.Range(0, 10));
                var index = -1;
                try
                {
                    index = testingItemsSourceView.IndexOf(0);
                }catch(Exception){ }
                Verify.AreEqual(-1, index);

                var nullContainingEnumerable = new CustomEnumerable();
                testingItemsSourceView = new ItemsSourceView(nullContainingEnumerable);

                Verify.AreEqual(1,testingItemsSourceView.IndexOf(null));

            });
        }

void VerifyNotifyCollectionChangeWithReadonlyListBehavior ( ) [inline]

Definition at line 225 of file InspectingDataSourceTests.cs.

        {
            int invocationCount = 0;

            RunOnUIThread.Execute(() =>
            {
                var collection = new ReadOnlyNotifyPropertyChangedCollection<object>();

                var itemsSourceView = new ItemsSourceView(collection);
                itemsSourceView.CollectionChanged += ItemsSourceView_CollectionChanged;

                var underlyingData = new ObservableCollection<object>();
                collection.Data = underlyingData;

                Verify.AreEqual(1, invocationCount);
            });

            void ItemsSourceView_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
            {
                invocationCount++;
            }
        }

void VerifyReadOnlyListCompatibility ( ) [inline]

Definition at line 199 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var collection = new ReadOnlyNotifyPropertyChangedCollection<object>();
                var firstItem = "something1";

                collection.Data = new ObservableCollection<object>();

                collection.Data.Add(firstItem);
                collection.Data.Add("something2");
                collection.Data.Add("something3");

                var itemsSourceView = new ItemsSourceView(collection);
                Verify.AreEqual(3, itemsSourceView.Count);

                collection.Data.Add("something4");
                Verify.AreEqual(4, itemsSourceView.Count);

                Verify.AreEqual(firstItem,itemsSourceView.GetAt(0));
                Verify.AreEqual(0, itemsSourceView.IndexOf(firstItem));
            });
        }

static void VerifyRecordedCollectionChanges | ( | NotifyCollectionChangedEventArgs[] | expected,
 |  | List< NotifyCollectionChangedEventArgs > | actual |
 | ) |  |  | [inline, static, private]

Definition at line 291 of file InspectingDataSourceTests.cs.

        {
            Verify.AreEqual(expected.Length, actual.Count);

            for (int i = 0; i < expected.Length; ++i)
            {
                Verify.AreEqual(expected[i].Action, actual[i].Action);
                Verify.AreEqual(expected[i].NewStartingIndex, actual[i].NewStartingIndex);
                Verify.AreEqual(expected[i].OldStartingIndex, actual[i].OldStartingIndex);
                Verify.AreEqual(GetCount(expected[i].NewItems), GetCount(actual[i].NewItems));
                Verify.AreEqual(GetCount(expected[i].OldItems), GetCount(actual[i].OldItems));
            }
        }

void VerifyUniqueIdMappingInterface ( ) [inline]

Definition at line 97 of file InspectingDataSourceTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableVectorWithUniqueIds(Enumerable.Range(0, 10));
                var dataSource = new ItemsSourceView(data);
                Verify.AreEqual(10, dataSource.Count);
                Verify.AreEqual(true, dataSource.HasKeyIndexMapping);
                Verify.AreEqual(5, dataSource.IndexFromKey("5"));
                Verify.AreEqual("5", dataSource.KeyFromIndex(5));
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/InspectingDataSourceTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InspectingDataSourceTests::CollectionChangeRecorder Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • InspectingDataSourceTests
  • InspectingDataSourceTests::CollectionChangeRecorder
Public Member Functions | Properties | Static Private Member Functions | Private Attributes

InspectingDataSourceTests::CollectionChangeRecorder Class Reference

List of all members.

Public Member Functions

CollectionChangeRecorder (ItemsSourceView source)

Properties

List
< NotifyCollectionChangedEventArgs > 		RecordedArgs [get]

Static Private Member Functions

static
NotifyCollectionChangedEventArgs 		Clone (NotifyCollectionChangedEventArgs args)

Private Attributes

List
< NotifyCollectionChangedEventArgs > 		_recordedArgs = new List<NotifyCollectionChangedEventArgs>()

Detailed Description

Definition at line 310 of file InspectingDataSourceTests.cs.

Constructor & Destructor Documentation

CollectionChangeRecorder ( ItemsSourceView source ) [inline]

Definition at line 316 of file InspectingDataSourceTests.cs.

            {
                source.CollectionChanged += (sender, args) => RecordedArgs.Add(Clone(args));
            }

Member Function Documentation

static NotifyCollectionChangedEventArgs Clone ( NotifyCollectionChangedEventArgs args ) [inline, static, private]

Definition at line 321 of file InspectingDataSourceTests.cs.

            {
                return CollectionChangeEventArgsConverters.CreateNotifyArgs(
                    args.Action,
                    args.OldStartingIndex,
                    args.OldItems == null ? -1 : (int)args.OldItems.Count,
                    args.NewStartingIndex,
                    args.NewItems == null ? -1 : (int)args.NewItems.Count);
            }

Member Data Documentation

List<NotifyCollectionChangedEventArgs> _recordedArgs = new List<NotifyCollectionChangedEventArgs>() [private]

Definition at line 312 of file InspectingDataSourceTests.cs.

Property Documentation

List<NotifyCollectionChangedEventArgs> RecordedArgs [get]

Definition at line 314 of file InspectingDataSourceTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/InspectingDataSourceTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InspectingDataSourceTests::CustomEnumerable Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • InspectingDataSourceTests
  • InspectingDataSourceTests::CustomEnumerable
Public Member Functions | Private Member Functions | Private Attributes

InspectingDataSourceTests::CustomEnumerable Class Reference

List of all members.

Public Member Functions

CustomEnumerable ()
IEnumerator< object > | GetEnumerator ()

Private Member Functions

IEnumerator IEnumerable. | GetEnumerator ()

Private Attributes

List< string > | myList = new List<string>()

Detailed Description

Definition at line 467 of file InspectingDataSourceTests.cs.

Constructor & Destructor Documentation

CustomEnumerable ( ) [inline]

Definition at line 471 of file InspectingDataSourceTests.cs.

            {
                myList.Add("text");
                myList.Add(null);
                myList.Add("foobar");
                myList.Add("WinUI is awesome");
            }

Member Function Documentation

IEnumerator<object> GetEnumerator ( ) [inline]

Definition at line 479 of file InspectingDataSourceTests.cs.

            {
                return myList.GetEnumerator();
            }

IEnumerator IEnumerable. GetEnumerator ( ) [inline, private]

Definition at line 484 of file InspectingDataSourceTests.cs.

            {
                return myList.GetEnumerator();
            }

Member Data Documentation

List<string> myList = new List<string>() [private]

Definition at line 469 of file InspectingDataSourceTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/InspectingDataSourceTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InspectingDataSourceTests::ObservableVectorWithUniqueIds Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • InspectingDataSourceTests
  • InspectingDataSourceTests::ObservableVectorWithUniqueIds
Public Member Functions

InspectingDataSourceTests::ObservableVectorWithUniqueIds Class Reference

List of all members.

Public Member Functions

ObservableVectorWithUniqueIds (IEnumerable< int > data)
int | IndexFromKey (string id)
string | KeyFromIndex (int index)

Detailed Description

Definition at line 450 of file InspectingDataSourceTests.cs.

Constructor & Destructor Documentation

ObservableVectorWithUniqueIds ( IEnumerable< int > data ) [inline]

Definition at line 452 of file InspectingDataSourceTests.cs.

: base(data) { }

Member Function Documentation

int IndexFromKey ( string id ) [inline]

Definition at line 461 of file InspectingDataSourceTests.cs.

            {
                return int.Parse(id);
            }

string KeyFromIndex ( int index ) [inline]

Definition at line 456 of file InspectingDataSourceTests.cs.

            {
                return index.ToString();
            }

The documentation for this class was generated from the following file:
  • Repeater/APITests/InspectingDataSourceTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InspectingDataSourceTests::WinRTObservableVector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • InspectingDataSourceTests
  • InspectingDataSourceTests::WinRTObservableVector
Classes | Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

InspectingDataSourceTests::WinRTObservableVector Class Reference

List of all members.

Classes

class | WinRTVectorChangedEventArgs

Public Member Functions

WinRTObservableVector ()
WinRTObservableVector (IEnumerable< object > items)
void | Add (object item)
void | Clear ()
bool | Contains (object item)
void | CopyTo (object[] array, int arrayIndex)
IEnumerator< object > | GetEnumerator ()
int | IndexOf (object item)
void | Insert (int index, object item)
bool | Remove (object item)
void | RemoveAt (int index)

Properties

int | Count [get]
bool | IsReadOnly [get]
object | this [int index] [get, set]

Events

VectorChangedEventHandler< object > | VectorChanged

Private Member Functions

IEnumerator IEnumerable. | GetEnumerator ()

Private Attributes

IList< object > | _items

Detailed Description

Definition at line 332 of file InspectingDataSourceTests.cs.

Constructor & Destructor Documentation

WinRTObservableVector ( ) [inline]

Definition at line 352 of file InspectingDataSourceTests.cs.

            {
                _items = new List<object>();
            }

WinRTObservableVector ( IEnumerable< object > items ) [inline]

Definition at line 357 of file InspectingDataSourceTests.cs.

            {
                _items = new List<object>(items);
            }

Member Function Documentation

void Add ( object item ) [inline]

Definition at line 362 of file InspectingDataSourceTests.cs.

            {
                _items.Add(item);
                if (VectorChanged != null) { VectorChanged(this, new WinRTVectorChangedEventArgs(CollectionChange.ItemInserted, _items.Count - 1)); }
            }

void Clear ( ) [inline]

Definition at line 368 of file InspectingDataSourceTests.cs.

            {
                _items.Clear();
                if (VectorChanged != null) { VectorChanged(this, new WinRTVectorChangedEventArgs(CollectionChange.Reset, 0)); }
            }

bool Contains ( object item ) [inline]

Definition at line 374 of file InspectingDataSourceTests.cs.

            {
                return _items.Contains(item);
            }

void CopyTo | ( | object[] | array,
 |  | int | arrayIndex |
 | ) |  |  | [inline]

Definition at line 379 of file InspectingDataSourceTests.cs.

            {
                _items.CopyTo(array, arrayIndex);
            }

IEnumerator IEnumerable. GetEnumerator ( ) [inline, private]

Definition at line 412 of file InspectingDataSourceTests.cs.

            {
                return _items.GetEnumerator();
            }

IEnumerator<object> GetEnumerator ( ) [inline]

Definition at line 384 of file InspectingDataSourceTests.cs.

            {
                return _items.GetEnumerator();
            }

int IndexOf ( object item ) [inline]

Definition at line 389 of file InspectingDataSourceTests.cs.

            {
                return _items.IndexOf(item);
            }

void Insert | ( | int | index,
 |  | object | item |
 | ) |  |  | [inline]

Definition at line 394 of file InspectingDataSourceTests.cs.

            {
                _items.Insert(index, item);
                if (VectorChanged != null) { VectorChanged(this, new WinRTVectorChangedEventArgs(CollectionChange.ItemInserted, index)); }
            }

bool Remove ( object item ) [inline]

Definition at line 400 of file InspectingDataSourceTests.cs.

            {
                RemoveAt(_items.IndexOf(item));
                return true;
            }

void RemoveAt ( int index ) [inline]

Definition at line 406 of file InspectingDataSourceTests.cs.

            {
                _items.RemoveAt(index);
                if (VectorChanged != null) { VectorChanged(this, new WinRTVectorChangedEventArgs(CollectionChange.ItemRemoved, index)); }
            }

Member Data Documentation

IList<object> _items [private]

Definition at line 334 of file InspectingDataSourceTests.cs.

Property Documentation

int Count [get]

Definition at line 346 of file InspectingDataSourceTests.cs.

bool IsReadOnly [get]

Definition at line 348 of file InspectingDataSourceTests.cs.

object this[int index] [get, set]

Definition at line 337 of file InspectingDataSourceTests.cs.

Event Documentation

VectorChangedEventHandler<object> VectorChanged

Definition at line 350 of file InspectingDataSourceTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/InspectingDataSourceTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • InspectingDataSourceTests
  • InspectingDataSourceTests::WinRTObservableVector
  • InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
Public Member Functions | Properties | Private Attributes

InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs Class Reference

List of all members.

Public Member Functions

WinRTVectorChangedEventArgs (CollectionChange change, int index)

Properties

CollectionChange | CollectionChange [get, set]
uint | Index [get, set]

Private Attributes

uint | _index

Detailed Description

Definition at line 417 of file InspectingDataSourceTests.cs.

Constructor & Destructor Documentation

WinRTVectorChangedEventArgs | ( | CollectionChange | change,
 |  | int | index |
 | ) |  |  | [inline]

Definition at line 442 of file InspectingDataSourceTests.cs.

                {
                    CollectionChange = change;
                    Index = (uint)index;
                }

Member Data Documentation

uint _index [private]

Definition at line 421 of file InspectingDataSourceTests.cs.

Property Documentation

CollectionChange CollectionChange [get, set]

Definition at line 419 of file InspectingDataSourceTests.cs.

uint Index [get, set]

Definition at line 423 of file InspectingDataSourceTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/InspectingDataSourceTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProviderTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ItemCollectionTransitionProviderTests
Classes | Public Member Functions

ItemCollectionTransitionProviderTests Class Reference

List of all members.

Classes

struct | CallInfo

Public Member Functions

void | ValidateItemCollectionTransitionProvider ()

Detailed Description

Definition at line 26 of file ItemCollectionTransitionProviderTests.cs.

Member Function Documentation

void ValidateItemCollectionTransitionProvider ( ) [inline]

Definition at line 31 of file ItemCollectionTransitionProviderTests.cs.

        {
            ItemsRepeater repeater = null;
            ItemCollectionTransitionProviderDerived transitionProvider = null;
            var data = new ObservableCollection<string>(Enumerable.Range(0, 10).Select(i => string.Format("Item #{0}", i)));
            var renderingEvent = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var elementFactory = new RecyclingElementFactory();
                elementFactory.RecyclePool = new RecyclePool();
                elementFactory.Templates["Item"] = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                          <TextBlock Text='{Binding}' Height='50' />
                      </DataTemplate>");

                CompositionTarget.Rendering += (sender, args) =>
                {
                    renderingEvent.Set();
                };

                repeater = new ItemsRepeater()
                {
                    ItemsSource = data,
                    ItemTemplate = elementFactory,
                };

                Content = new ItemsRepeaterScrollHost()
                {
                    Width = 400,
                    Height = 800,
                    ScrollViewer = new ScrollViewer
                    {
                        Content = repeater
                    }
                };
            });

            IdleSynchronizer.Wait();
            Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");

            List<CallInfo> addCalls = new();
            List<CallInfo> removeCalls = new();
            List<CallInfo> moveCalls = new();
            RunOnUIThread.Execute(() =>
            {
                transitionProvider = new ItemCollectionTransitionProviderDerived()
                {
                    ShouldAnimateFunc = (ItemCollectionTransition transition) => true,
                    StartTransitionsFunc = (IList<ItemCollectionTransition> transitions) =>
                    {
                        foreach (var transition in transitions)
                        {
                            var progress = transition.Start();

                            switch (transition.Operation)
                            {
                                case ItemCollectionTransitionOperation.Add:
                                    addCalls.Add(new CallInfo(repeater.GetElementIndex(progress.Element), transition));
                                    break;
                                case ItemCollectionTransitionOperation.Remove:
                                    removeCalls.Add(new CallInfo(repeater.GetElementIndex(progress.Element), transition));
                                    break;
                                case ItemCollectionTransitionOperation.Move:
                                    moveCalls.Add(new CallInfo(repeater.GetElementIndex(progress.Element), transition));
                                    break;
                            }

                            progress.Complete();
                        }
                    }
                };
                repeater.ItemTransitionProvider = transitionProvider;

                renderingEvent.Reset();
                data.Insert(0, "new item");
                data.RemoveAt(2);
            });

            Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
            IdleSynchronizer.Wait();

            Verify.AreEqual(1, addCalls.Count);
            var call = addCalls[0];
            Verify.AreEqual(0, call.Index);
            Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeAdd, call.Transition.Triggers);

            Verify.AreEqual(1, removeCalls.Count);
            call = removeCalls[0];
            Verify.AreEqual(-1, call.Index); // not in the repeater anymore
            Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeRemove, call.Transition.Triggers);

            Verify.AreEqual(1, moveCalls.Count);
            call = moveCalls[0];
            Verify.AreEqual(1, call.Index);
            Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeAdd | ItemCollectionTransitionTriggers.CollectionChangeRemove, call.Transition.Triggers);
            Verify.AreEqual(0, call.Transition.OldBounds.Y);
            Verify.AreEqual(50, call.Transition.NewBounds.Y);

            addCalls.Clear();
            removeCalls.Clear();
            moveCalls.Clear();

            // Hookup just for show animations and validate.
            RunOnUIThread.Execute(() =>
            {
                transitionProvider.ShouldAnimateFunc = (ItemCollectionTransition transition) => transition.Operation == ItemCollectionTransitionOperation.Add;

                renderingEvent.Reset();
                data.Insert(0, "new item");
                data.RemoveAt(2);
            });

            Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
            IdleSynchronizer.Wait();

            Verify.AreEqual(1, addCalls.Count);
            call = addCalls[0];
            Verify.AreEqual(0, call.Index);
            Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeAdd, call.Transition.Triggers);

            Verify.AreEqual(0, removeCalls.Count);
            Verify.AreEqual(0, moveCalls.Count);
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/ItemCollectionTransitionProviderTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProviderTests::CallInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ItemCollectionTransitionProviderTests
  • ItemCollectionTransitionProviderTests::CallInfo
Public Member Functions | Properties

ItemCollectionTransitionProviderTests::CallInfo Struct Reference

List of all members.

Public Member Functions

CallInfo (int index, ItemCollectionTransition transition)
override string | ToString ()

Properties

int | Index [get, set]
ItemCollectionTransition | Transition [get, set]

Detailed Description

Definition at line 156 of file ItemCollectionTransitionProviderTests.cs.

Constructor & Destructor Documentation

CallInfo | ( | int | index,
 |  | ItemCollectionTransition | transition |
 | ) |  |  | [inline]

Definition at line 158 of file ItemCollectionTransitionProviderTests.cs.

            {
                Index = index;
                Transition = transition;
            }

Member Function Documentation

override string ToString ( ) [inline]

Definition at line 167 of file ItemCollectionTransitionProviderTests.cs.

            {
                return $"Index: {Index} Operation: {Transition.Operation} Triggers: {Transition.Triggers} OldBounds: {Transition.OldBounds} NewBounds {Transition.NewBounds}";
            }

Property Documentation

int Index [get, set]

Definition at line 164 of file ItemCollectionTransitionProviderTests.cs.

ItemCollectionTransition Transition [get, set]

Definition at line 165 of file ItemCollectionTransitionProviderTests.cs.

The documentation for this struct was generated from the following file:
  • Repeater/APITests/ItemCollectionTransitionProviderTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemTemplateTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ItemTemplateTests
Public Member Functions | Private Member Functions

ItemTemplateTests Class Reference

List of all members.

Public Member Functions

void | ValidateBindingAndTemplateSelection ()
void | ValidateCorrectSizeWhenEmptyDataTemplateInSelector ()
void | ValidateCustomElementFactory ()
void | ValidateCustomRecyclingElementFactory ()
void | ValidateDataTemplateAsItemTemplate ()
void | ValidateDataTemplateSelectorAsItemTemplate ()
void | ValidateDataTemplateWithElementNameBinding ()
void | ValidateDataTemplateWithNestedElementNameBinding ()
void | ValidateNoSizeWhenEmptyDataTemplate ()
void | ValidateNullItemTemplateAndContainerInItems ()
void | ValidateRecycling ()
void | ValidateRecyclingElementFactoryWithSingleTemplate ()
void | ValidateReyclingElementFactoryWithNoTemplate ()
void | ValidateTemplateSwitchingRefreshesElements (Layout layout)
void | ValidateTemplateSwitchingRefreshesElementsNonVirtualizingLayout ()
void | ValidateTemplateSwitchingRefreshesElementsVirtualizingLayout ()
void | VerifyNullTemplateGivesMeaningfullError ()
void | VerifySelectTemplateLayoutFallback ()

Private Member Functions

ItemsRepeaterScrollHost | CreateAndInitializeRepeater (object itemsSource, Layout layout, object elementFactory, ref ItemsRepeater repeater)
List< UIElement > | GetAllElementsFromPool (RecyclePool pool, string key="")
void | ValidateDataTemplateWithElementNameBinding (bool useNestedElements)

Detailed Description

Definition at line 28 of file ItemTemplateTests.cs.

Member Function Documentation

ItemsRepeaterScrollHost CreateAndInitializeRepeater | ( | object | itemsSource,
 |  | Layout | layout,
 |  | object | elementFactory,
 |  | ref ItemsRepeater | repeater |
 | ) |  |  | [inline, private]

Definition at line 735 of file ItemTemplateTests.cs.

        {
            repeater = new ItemsRepeater()
            {
                ItemsSource = itemsSource,
                Layout = layout,
                ItemTemplate = elementFactory,
            };

            return new ItemsRepeaterScrollHost()
            {
                Width = 400,
                Height = 400,
                ScrollViewer = new Microsoft.UI.Xaml.Controls.ScrollViewer()
                {
                    Content = repeater
                }
            };
        }

List<UIElement> GetAllElementsFromPool | ( | RecyclePool | pool,
 |  | string | key = "" |
 | ) |  |  | [inline, private]

Definition at line 759 of file ItemTemplateTests.cs.

        {
            List<UIElement> elements = new List<UIElement>();
            bool poolEmpty = false;
            while(!poolEmpty)
            {
                var next = pool.TryGetElement(key);
                if(next != null)
                {
                    elements.Add(next);
                }

                poolEmpty = next == null;
            }

            return elements;
        }

void ValidateBindingAndTemplateSelection ( ) [inline]

Definition at line 99 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var staticTemplate = (DataTemplate)XamlReader.Load(
                   @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                        <TextBlock Text='static' />
                    </DataTemplate>");
                var bindTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                        <TextBlock Text='{Binding}' />
                    </DataTemplate>");
                var elementFactory = new RecyclingElementFactory()
                {
                    RecyclePool = new RecyclePool(),
                    Templates =
                    {
                        { "static", staticTemplate },
                        { "bind", bindTemplate }
                    }
                };

                elementFactory.SelectTemplateKey +=
                delegate (RecyclingElementFactory sender, SelectTemplateEventArgs args)
                {
                    args.TemplateKey = ((int)args.DataContext % 2 == 0) ? "bind" : "static";
                };

                const int numItems = 10;
                ItemsRepeater repeater = null;
                Content = CreateAndInitializeRepeater
                (
                    itemsSource: Enumerable.Range(0, numItems),
                    elementFactory: elementFactory,
                    layout: new StackLayout(),
                    repeater: ref repeater
                );

                Content.UpdateLayout();

                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    if (i % 2 == 0)
                    {
                        // Text is bound to the data for even indicies
                        Verify.AreEqual(i.ToString(), element.Text);
                        Verify.AreEqual(i, element.DataContext);
                    }
                    else
                    {
                        // Text explicitly set on the element only for odd indicies
                        Verify.AreEqual("static", element.Text);
                    }
                }
            });
        }

void ValidateCorrectSizeWhenEmptyDataTemplateInSelector ( ) [inline]

Definition at line 452 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataTemplateOdd = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}' Height='30' Width='50' />
                        </DataTemplate>");
                var dataTemplateEven = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' />");
                ItemsRepeater repeater = null;
                const int numItems = 10;
                var selector = new MySelector() {
                    TemplateOdd = dataTemplateOdd,
                    TemplateEven = dataTemplateEven
                };

                repeater = new ItemsRepeater() {
                    ItemTemplate = selector,
                    Layout = new StackLayout(),
                    ItemsSource = Enumerable.Range(0, numItems)
                };

                repeater.VerticalAlignment = VerticalAlignment.Top;
                repeater.HorizontalAlignment = HorizontalAlignment.Left;
                Content = repeater;

                Content.UpdateLayout();
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
                for (int i = 0; i < numItems; i++)
                {
                    var element = (FrameworkElement)repeater.TryGetElement(i);
                    if (i % 2 == 0)
                    {
                        Verify.AreEqual(element.Height, 0);
                    }
                    else
                    {
                        Verify.AreEqual(element.Height, 30);
                    }
                }

                Verify.AreEqual(5 * 30, repeater.ActualHeight);

                // ItemsRepeater stretches page, so actual width is width of page and not 50
                //Verify.AreEqual(50, repeater.ActualWidth);

                repeater.ItemsSource = null;
                Content.UpdateLayout();
            });
        }

void ValidateCustomElementFactory ( ) [inline]

Definition at line 529 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater repeater = null;
                const int numItems = 10;
                Content = CreateAndInitializeRepeater
                (
                   itemsSource: Enumerable.Range(0, numItems),
                   elementFactory: new MockElementFactory()
                   {
                       GetElementFunc = delegate (int index, UIElement owner)
                       {
                           return new Button() { Content = index.ToString() };
                       },
                       ClearElementFunc = delegate (UIElement element, UIElement owner)
                       {
                           Verify.AreEqual(typeof(Button), element.GetType());
                       }
                   },
                   layout: new StackLayout(),
                   repeater: ref repeater
                );

                Content.UpdateLayout();
                for (int i = 0; i < numItems; i++)
                {
                    var element = (Button)repeater.TryGetElement(i);
                    Verify.AreEqual(i.ToString(), element.Content.ToString());
                }
            });
        }

void ValidateCustomRecyclingElementFactory ( ) [inline]

Definition at line 159 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='uninitialized' />
                        </DataTemplate>");
                ItemsRepeater repeater = null;
                const int numItems = 10;
                Content = CreateAndInitializeRepeater
                (
                   itemsSource: Enumerable.Range(0, numItems).Select(i => string.Format("Item #{0}", i)),
                   elementFactory: new RecyclingElementFactoryDerived()
                   {
                       Templates = { { "key", itemTemplate } },
                       RecyclePool = new RecyclePool(),
                       GetElementFunc = delegate (int index, UIElement owner, UIElement elementFromBase)
                       {
                           ((TextBlock)elementFromBase).Text = index.ToString();
                           return elementFromBase;
                       },
                       ClearElementFunc = delegate (UIElement element, UIElement owner)
                       {
                           ((TextBlock)element).Text = "uninitialized";
                       },
                       SelectTemplateIdFunc = delegate (object data, UIElement owner)
                       {
                           return "key";
                       },
                   },
                   layout: new StackLayout(),
                   repeater: ref repeater
                );

                Content.UpdateLayout();
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    Verify.AreEqual(i.ToString(), element.Text);
                }
            });
        }

void ValidateDataTemplateAsItemTemplate ( ) [inline]

Definition at line 351 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}' />
                        </DataTemplate>");
                ItemsRepeater repeater = null;
                const int numItems = 10;

                Content = CreateAndInitializeRepeater
                (
                   itemsSource: Enumerable.Range(0, numItems).Select(i => i.ToString()),
                   elementFactory: dataTemplate,
                   layout: new StackLayout(),
                   repeater: ref repeater
                );

                Content.UpdateLayout();
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    Verify.AreEqual(i.ToString(), element.Text);
                }

                repeater.ItemsSource = null;
                Content.UpdateLayout();
            });
        }

void ValidateDataTemplateSelectorAsItemTemplate ( ) [inline]

Definition at line 384 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataTemplateOdd = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}' Height='30' />
                        </DataTemplate>");
                var dataTemplateEven = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}' Height='40' />
                        </DataTemplate>");
                ItemsRepeater repeater = null;
                const int numItems = 10;
                var selector = new MySelector()
                {
                    TemplateOdd = dataTemplateOdd,
                    TemplateEven = dataTemplateEven
                };

                Content = CreateAndInitializeRepeater
                (
                   itemsSource: Enumerable.Range(0, numItems),
                   elementFactory: selector,
                   layout: new StackLayout(),
                   repeater: ref repeater
                );

                Content.UpdateLayout();
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    Verify.AreEqual(i.ToString(), element.Text);
                    Verify.AreEqual(i % 2 == 0 ? 40 : 30, element.Height);
                }

                repeater.ItemsSource = null;
                Content.UpdateLayout();
            });
        }

void ValidateDataTemplateWithElementNameBinding ( ) [inline]

Definition at line 254 of file ItemTemplateTests.cs.

        {
            ValidateDataTemplateWithElementNameBinding(useNestedElements: false);
        }

void ValidateDataTemplateWithElementNameBinding ( bool useNestedElements ) [inline, private]

Definition at line 265 of file ItemTemplateTests.cs.

        {
            const int numItems = 5;
            ItemsRepeater itemsRepeater = null;

            RunOnUIThread.Execute(() =>
            {
                DataTemplate dataTemplate = null;

                if (useNestedElements)
                {
                    dataTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <Border BorderThickness='1'>
                                <TextBlock Text='{Binding}' Tag='{Binding ElementName=siblingTextBlock, Path=Text}'/>
                            </Border>
                        </DataTemplate>") as DataTemplate;
                }
                else
                {
                    dataTemplate = XamlReader.Load(
                        @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}' Tag='{Binding ElementName=siblingTextBlock, Path=Text}'/>
                        </DataTemplate>") as DataTemplate;
                }

                var stackPanel = new StackPanel()
                {
                    Name = "stackPanel",
                    Width = 200
                };

                var siblingTextBlock = new TextBlock()
                {
                    Name = "siblingTextBlock",
                    Text = "DataSource"
                };

                itemsRepeater = new ItemsRepeater()
                {
                    Name = "itemsRepeater",
                    ItemsSource = Enumerable.Range(0, numItems).Select(i => i.ToString()),
                    Layout = new StackLayout(),
                    ItemTemplate = dataTemplate
                };

                stackPanel.Children.Add(siblingTextBlock);
                stackPanel.Children.Add(itemsRepeater);

                Content = stackPanel;

                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(itemsRepeater));

                for (int i = 0; i < numItems; i++)
                {
                    TextBlock itemTextBlock = null;

                    if (useNestedElements)
                    {
                        Border itemBorder = itemsRepeater.TryGetElement(i) as Border;
                        itemTextBlock = itemBorder.Child as TextBlock;
                    }
                    else
                    {
                        itemTextBlock = itemsRepeater.TryGetElement(i) as TextBlock;
                    }

                    Verify.IsNotNull(itemTextBlock);
                    Verify.AreEqual(i.ToString(), itemTextBlock.Text);
                    Verify.AreEqual("DataSource", itemTextBlock.Tag);
                }

                itemsRepeater.ItemsSource = null;
                Content.UpdateLayout();
            });
        }

void ValidateDataTemplateWithNestedElementNameBinding ( ) [inline]

Definition at line 260 of file ItemTemplateTests.cs.

        {
            ValidateDataTemplateWithElementNameBinding(useNestedElements: true);
        }

void ValidateNoSizeWhenEmptyDataTemplate ( ) [inline]

Definition at line 427 of file ItemTemplateTests.cs.

        {
            ItemsRepeater repeater = null;
            RunOnUIThread.Execute(() =>
            {
                var elementFactory = new RecyclingElementFactory();
                elementFactory.RecyclePool = new RecyclePool();
                elementFactory.Templates["Item"] = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' />");

                repeater = new ItemsRepeater() {
                    ItemsSource = Enumerable.Range(0, 10).Select(i => string.Format("Item #{0}", i)),
                    ItemTemplate = elementFactory,
                    // Default is StackLayout, so do not have to explicitly set.
                    // Layout = new StackLayout(),
                };
                repeater.UpdateLayout();

                // Asserting render size is zero
                Verify.IsLessThan(repeater.RenderSize.Width, 0.0001);
                Verify.IsLessThan(repeater.RenderSize.Height, 0.0001);
            });
        }

void ValidateNullItemTemplateAndContainerInItems ( ) [inline]

Definition at line 622 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                const int numItems = 10;
                ItemsRepeater repeater = null;
                Content = CreateAndInitializeRepeater
                (
                    itemsSource: Enumerable.Range(0, numItems).Select(i => new Button() { Content = i }), // ItemsSource is UIElements
                    elementFactory: null, // No ItemTemplate
                    layout: new StackLayout(),
                    repeater: ref repeater
                );

                Content.UpdateLayout();

                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));

                for (int i = 0; i < numItems; i++)
                {
                    var element = (Button)repeater.TryGetElement(i);
                    Verify.AreEqual(i, element.Content);
                }

                Button button0 = (Button)repeater.TryGetElement(0);
                Verify.IsNotNull(button0.Parent);

                repeater.ItemsSource = null;
                Verify.IsNull(button0.Parent);
            });
        }

void ValidateRecycling ( ) [inline]

Definition at line 31 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var elementFactory = new RecyclingElementFactory()
                {
                    RecyclePool = new RecyclePool(),
                };
                elementFactory.Templates["even"] = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                        <TextBlock Text='even' />
                    </DataTemplate>");
                elementFactory.Templates["odd"] = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                        <TextBlock Text='odd' />
                    </DataTemplate>");

                elementFactory.SelectTemplateKey +=
                delegate (RecyclingElementFactory sender, SelectTemplateEventArgs args)
                {
                    args.TemplateKey = ((int)args.DataContext % 2 == 0) ? "even" : "odd";
                };

                const int numItems = 10;
                ItemsRepeater repeater = new ItemsRepeater()
                {
                    ItemsSource = Enumerable.Range(0, numItems),
                    ItemTemplate = elementFactory,
                };

                var context = new ElementFactoryGetArgs();
                context.Parent = repeater;
                var clearContext = new ElementFactoryRecycleArgs();
                clearContext.Parent = repeater;

                // Element0 is of type even, a new one should be created
                context.Data = 0;
                var element0 = elementFactory.GetElement(context);
                Verify.IsNotNull(element0);
                Verify.AreEqual("even", (element0 as TextBlock).Text);
                clearContext.Element = element0;
                elementFactory.RecycleElement(clearContext);

                // Element1 is of type odd, a new one should be created
                context.Data = 1;
                var element1 = elementFactory.GetElement(context);
                Verify.IsNotNull(element1);
                Verify.AreNotSame(element0, element1);
                Verify.AreEqual("odd", (element1 as TextBlock).Text);
                clearContext.Element = element1;
                elementFactory.RecycleElement(clearContext);

                // Element0 should be recycled for element2
                context.Data = 2;
                var element2 = elementFactory.GetElement(context);
                Verify.AreEqual("even", (element2 as TextBlock).Text);
                Verify.AreSame(element0, element2);

                // Element1 should be recycled for element3
                context.Data = 3;
                var element3 = elementFactory.GetElement(context);
                Verify.AreEqual("odd", (element3 as TextBlock).Text);
                Verify.AreSame(element1, element3);
            });
        }

void ValidateRecyclingElementFactoryWithSingleTemplate ( ) [inline]

Definition at line 205 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='uninitialized' />
                        </DataTemplate>");
                ItemsRepeater repeater = null;
                const int numItems = 10;
                var elementFactory = new RecyclingElementFactoryDerived()
                {
                    Templates = { { "key", itemTemplate } },
                    RecyclePool = new RecyclePool(),
                    GetElementFunc = delegate (int index, UIElement owner, UIElement elementFromBase)
                    {
                        ((TextBlock)elementFromBase).Text = index.ToString();
                        return elementFromBase;
                    },
                    ClearElementFunc = delegate (UIElement element, UIElement owner)
                    {
                        ((TextBlock)element).Text = "uninitialized";
                    },
                };

                elementFactory.SelectTemplateKey += delegate (RecyclingElementFactory sender, SelectTemplateEventArgs args)
                {
                    Verify.Fail("SelectTemplateKey event should not be raised when using a single template");
                };

                Content = CreateAndInitializeRepeater
                (
                   itemsSource: Enumerable.Range(0, numItems).Select(i => string.Format("Item #{0}", i)),
                   elementFactory: elementFactory,
                   layout: new StackLayout(),
                   repeater: ref repeater
                );

                Content.UpdateLayout();
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    Verify.AreEqual(i.ToString(), element.Text);
                }
            });
        }

void ValidateReyclingElementFactoryWithNoTemplate ( ) [inline]

Definition at line 506 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var elementFactory = new RecyclingElementFactoryDerived()
                {
                    RecyclePool = new RecyclePool()
                };

                Verify.Throws<COMException>(delegate
                {
                    var context = new ElementFactoryGetArgs();
                    context.Parent = null;
                    context.Data = 0;

                    elementFactory.GetElement(context);
                });
            });
        }

void ValidateTemplateSwitchingRefreshesElements ( Layout layout ) [inline]

Definition at line 580 of file ItemTemplateTests.cs.

        {
            var dataTemplate1 = (DataTemplate)XamlReader.Load(
                     @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}' />
                       </DataTemplate>");

            var dataTemplate2 = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <Button Content='{Binding}' />
                      </DataTemplate>");
            ItemsRepeater repeater = null;
            const int numItems = 10;
            Content = CreateAndInitializeRepeater
            (
               itemsSource: Enumerable.Range(0, numItems).Select(i => i.ToString()),
               elementFactory: dataTemplate1,
               layout: layout,
               repeater: ref repeater
            );

            Content.UpdateLayout();
            Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
            for (int i = 0; i < numItems; i++)
            {
                var element = (TextBlock)repeater.TryGetElement(i);
                Verify.AreEqual(i.ToString(), element.Text);
            }

            repeater.ItemTemplate = dataTemplate2;
            Content.UpdateLayout();

            // The old elements have been recycled but still parented under this repeater.
            Verify.AreEqual(numItems * 2, VisualTreeHelper.GetChildrenCount(repeater));
            for (int i = 0; i < numItems; i++)
            {
                var element = (Button)repeater.TryGetElement(i);
                Verify.AreEqual(i.ToString(), element.Content);
            }
        }

void ValidateTemplateSwitchingRefreshesElementsNonVirtualizingLayout ( ) [inline]

Definition at line 572 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ValidateTemplateSwitchingRefreshesElements(new NonVirtualStackLayout());
            });
        }

void ValidateTemplateSwitchingRefreshesElementsVirtualizingLayout ( ) [inline]

Definition at line 563 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ValidateTemplateSwitchingRefreshesElements(new StackLayout());
            });
        }

void VerifyNullTemplateGivesMeaningfullError ( ) [inline]

Definition at line 705 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater repeater = null;
                const int numItems = 10;

                Content = CreateAndInitializeRepeater
                (
                    itemsSource: Enumerable.Range(0, numItems),
                    // DataTemplateSelector always returns null, but throws hresult_invalid_argument when container is null
                    elementFactory: new DataTemplateSelector(),
                    layout: new StackLayout(),
                    repeater: ref repeater
                );
                bool threwException = false;
                try
                {
                    Content.UpdateLayout();
                } catch(Exception e)
                {
                    threwException = true;
                    Verify.IsTrue(e.Message.Contains("Null encountered as data template. That is not a valid value for a data template, and can not be used."));
                }
                Verify.IsTrue(threwException);
                // Set content to null so testapp does not try to update layout again
                Content = null;
            });
        }

void VerifySelectTemplateLayoutFallback ( ) [inline]

Definition at line 655 of file ItemTemplateTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var dataTemplateOdd = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='static' Height='30' />
                        </DataTemplate>");
                var dataTemplateEven = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <TextBlock Text='{Binding}' Height='30' />
                        </DataTemplate>");
                ItemsRepeater repeater = null;
                const int numItems = 10;
                var selector = new MyContainerSelector() {
                    TemplateOdd = dataTemplateOdd,
                    TemplateEven = dataTemplateEven
                };

                Content = CreateAndInitializeRepeater
                (
                   itemsSource: Enumerable.Range(0, numItems),
                   elementFactory: selector,
                   layout: new StackLayout(),
                   repeater: ref repeater
                );

                Content.UpdateLayout();

                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
                for (int i = 0; i < numItems; i++)
                {
                    var element = (TextBlock)repeater.TryGetElement(i);
                    if (i % 2 == 0)
                    {
                        // Text is bound to the data for even indices
                        Verify.AreEqual(i.ToString(), element.Text);
                        Verify.AreEqual(i, element.DataContext);
                    }
                    else
                    {
                        // Text explicitly set on the element only for odd indices
                        Verify.AreEqual("static", element.Text);
                    }
                }
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/ItemTemplateTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • LayoutTests
Public Member Functions | Private Member Functions

LayoutTests Class Reference

List of all members.

Public Member Functions

void | ValidateMappingAndAutoRecycling ()
void | ValidateNonVirtualLayoutDoesNotGetMeasuredForViewportChanges ()
void | ValidateNonVirtualLayoutWithItemsRepeater ()
void | ValidateStackLayoutDisabledVirtualizationWithItemsRepeater ()
void | ValidateStackLayoutDoesNotRetainIncorrectMinorWidth ()
void | VerifyItemsRepeaterNullLayoutIsTreatedAsStackLayout ()
void | VerifyStackLayoutCycleShortcut ()
void | VerifyUniformGridLayoutDoesntCrashWhenTryingToScrollToEnd ()

Private Member Functions

ItemsRepeaterScrollHost | CreateAndInitializeRepeater (object itemsSource, VirtualizingLayout layout, object elementFactory, ref ItemsRepeater repeater, ref ScrollViewer scrollViewer)
DataTemplate | GetDataTemplate (string content)

Detailed Description

Definition at line 27 of file LayoutTests.cs.

Member Function Documentation

ItemsRepeaterScrollHost CreateAndInitializeRepeater | ( | object | itemsSource,
 |  | VirtualizingLayout | layout,
 |  | object | elementFactory,
 |  | ref ItemsRepeater | repeater,
 |  | ref ScrollViewer | scrollViewer |
 | ) |  |  | [inline, private]

Definition at line 400 of file LayoutTests.cs.

        {
            repeater = new ItemsRepeater()
            {
                ItemsSource = itemsSource,
                Layout = layout,
                ItemTemplate = elementFactory,
                HorizontalCacheLength = 0,
                VerticalCacheLength = 0,
            };

            scrollViewer = new ScrollViewer()
            {
                Content = repeater
            };

            return new ItemsRepeaterScrollHost()
            {
                Width = 400,
                Height = 400,
                ScrollViewer = scrollViewer
            };
        }

DataTemplate GetDataTemplate ( string content ) [inline, private]

Definition at line 429 of file LayoutTests.cs.

        {
            return (DataTemplate)XamlReader.Load(
                       string.Format(@"<DataTemplate
                            xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                           {0}
                        </DataTemplate>", content));
        }

void ValidateMappingAndAutoRecycling ( ) [inline]

Definition at line 30 of file LayoutTests.cs.

        {
            ItemsRepeater repeater = null;
            ScrollViewer scrollViewer = null;
            RunOnUIThread.Execute(() =>
            {
                var layout = new MockVirtualizingLayout()
                {
                    MeasureLayoutFunc = (availableSize, context) =>
                    {
                        var element0 = context.GetOrCreateElementAt(index: 0);
                        // lookup - repeater will give back the same element and note that this element will not
                        // be pinned - i.e it will be auto recycled after a measure pass where GetElementAt(0) is not called.
                        var element0lookup = context.GetOrCreateElementAt(index: 0, options: ElementRealizationOptions.None);

                        var element1 = context.GetOrCreateElementAt(index: 1, options: ElementRealizationOptions.ForceCreate | ElementRealizationOptions.SuppressAutoRecycle);
                        // forcing a new element for index 1 that will be pinned (not auto recycled). This will be
                        // a completely new element. Repeater does not do the mapping/lookup when forceCreate is true.
                        var element1Clone = context.GetOrCreateElementAt(index: 1, options: ElementRealizationOptions.ForceCreate | ElementRealizationOptions.SuppressAutoRecycle);

                        Verify.AreSame(element0, element0lookup);
                        Verify.AreNotSame(element1, element1Clone);

                        element0.Measure(availableSize);
                        element1.Measure(availableSize);
                        element1Clone.Measure(availableSize);
                        return new Size(100, 100);
                    },
                };

                Content = CreateAndInitializeRepeater(
                    itemsSource: Enumerable.Range(0, 5),
                    layout: layout,
                    elementFactory: GetDataTemplate("<Button>Hello</Button>"),
                    repeater: ref repeater,
                    scrollViewer: ref scrollViewer);

                Content.UpdateLayout();

                Verify.IsNotNull(repeater.TryGetElement(0));
                Verify.IsNotNull(repeater.TryGetElement(1));

                layout.MeasureLayoutFunc = null;

                repeater.InvalidateMeasure();
                Content.UpdateLayout();

                Verify.IsNull(repeater.TryGetElement(0)); // not pinned, should be auto recycled.
                Verify.IsNotNull(repeater.TryGetElement(1)); // pinned, should stay alive
            });
        }

void ValidateNonVirtualLayoutDoesNotGetMeasuredForViewportChanges ( ) [inline]

Definition at line 197 of file LayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                int measureCount = 0;
                int arrangeCount = 0;
                var repeater = new ItemsRepeater();

                // with a non virtualizing layout, repeater will just
                // run layout once.
                repeater.Layout = new MockNonVirtualizingLayout()
                {
                    MeasureLayoutFunc = (size, context) =>
                    {
                        measureCount++;
                        return new Size(100, 800);
                    },
                    ArrangeLayoutFunc = (size, context) =>
                    {
                        arrangeCount++;
                        return new Size(100, 800);
                    }
                };

                repeater.ItemsSource = Enumerable.Range(0, 10);
                repeater.ItemTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                         <Button Content='{Binding}' Height='100' />
                    </DataTemplate>");

                Content = new ScrollViewer()
                {
                    Content = repeater
                };
                Content.UpdateLayout();

                Verify.AreEqual(1, measureCount);
                Verify.AreEqual(1, arrangeCount);

                measureCount = 0;
                arrangeCount = 0;

                // Once we switch to a virtualizing layout we should
                // get at least two passes to update the viewport.
                repeater.Layout = new MockVirtualizingLayout() {
                    MeasureLayoutFunc = (size, context) =>
                    {
                        measureCount++;
                        return new Size(100, 800);
                    },
                    ArrangeLayoutFunc = (size, context) =>
                    {
                        arrangeCount++;
                        return new Size(100, 800);
                    }
                };

                Content.UpdateLayout();

                Verify.IsGreaterThan(measureCount, 1);
                Verify.IsGreaterThan(arrangeCount, 1);
            });
        }

void ValidateNonVirtualLayoutWithItemsRepeater ( ) [inline]

Definition at line 83 of file LayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater();
                repeater.Layout = new NonVirtualStackLayout();
                repeater.ItemsSource = Enumerable.Range(0, 10);
                repeater.ItemTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                         <Button Content='{Binding}' Height='100' />
                    </DataTemplate>");

                Content = repeater;
                Content.UpdateLayout();

                double expectedYOffset = 0;
                for (int i = 0; i < repeater.ItemsSourceView.Count; i++)
                {
                    var child = repeater.TryGetElement(i) as Button;
                    Verify.IsNotNull(child);
                    var layoutBounds = LayoutInformation.GetLayoutSlot(child);
                    Verify.AreEqual(expectedYOffset, layoutBounds.Y);
                    Verify.AreEqual(i, child.Content);
                    expectedYOffset += 100;
                }
            });
        }

void ValidateStackLayoutDisabledVirtualizationWithItemsRepeater ( ) [inline]

Definition at line 293 of file LayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater();
                var stackLayout = new StackLayout();
                stackLayout.IsVirtualizationEnabled = false;
                repeater.Layout = stackLayout;
                repeater.ItemsSource = Enumerable.Range(0, 10);
                repeater.ItemTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                         <Button Content='{Binding}' Height='100' />
                    </DataTemplate>");

                var scrollViewer = new ScrollViewer() {
                    Content = repeater
                };
                scrollViewer.Height = 100;
                Content = scrollViewer;
                Content.UpdateLayout();

                for (int i = 0; i < repeater.ItemsSourceView.Count; i++)
                {
                    var child = repeater.TryGetElement(i) as Button;
                    Verify.IsNotNull(child);
                }
            });
        }

void ValidateStackLayoutDoesNotRetainIncorrectMinorWidth ( ) [inline]

Definition at line 262 of file LayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater()
                {
                    ItemsSource = Enumerable.Range(0, 1)
                };

                Content = new ScrollViewer()
                {
                    Content = repeater,
                    Width = 400,
                };

                Content.UpdateLayout();

                // Measure with large width.
                repeater.Measure(new Size(600, 100));
                Verify.AreEqual(600, repeater.DesiredSize.Width);
                // Measure with smaller width again before arrange.
                // StackLayout has to pick up the smaller width for its extent.
                repeater.Measure(new Size(300, 100));
                Verify.AreEqual(300, repeater.DesiredSize.Width);

                Content.UpdateLayout();
                Verify.AreEqual(400, repeater.ActualWidth);
            });
        }

void VerifyItemsRepeaterNullLayoutIsTreatedAsStackLayout ( ) [inline]

Definition at line 112 of file LayoutTests.cs.

        {
            // ItemsRepeater.Layout defaults to 'null'.
            // The null Layout is internally treated as a StackLayout.
            // Verify that it behaves correctly and that if we switch Layout away from null and back again it
            // continues to work correctly.
            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater();
                repeater.ItemsSource = Enumerable.Range(0, 10);
                repeater.ItemTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                         <Button Content='{Binding}' Height='10' Width='100' />
                    </DataTemplate>");

                Action validateStackLayout = () =>
                {
                    double expectedYOffset = 0;
                    for (int i = 0; i < repeater.ItemsSourceView.Count; i++)
                    {
                        var child = repeater.TryGetElement(i) as Button;
                        Verify.IsNotNull(child);
                        var layoutBounds = LayoutInformation.GetLayoutSlot(child);
                        Verify.AreEqual(expectedYOffset, layoutBounds.Y);
                        Verify.AreEqual(i, child.Content);
                        expectedYOffset += 10;
                    }
                };

                Action validateGridLayout = () =>
                {
                    int totalColumns = 5;
                    int currentCol = 0;
                    int currentRow = 0;
                    for (int i = 0; i < repeater.ItemsSourceView.Count; i++)
                    {
                        double expectedYOffset = currentRow * 10;
                        double expectedXOffset = currentCol * 100;
                        var child = repeater.TryGetElement(i) as Button;
                        Verify.IsNotNull(child);
                        var layoutBounds = LayoutInformation.GetLayoutSlot(child);
                        Verify.AreEqual(expectedYOffset, layoutBounds.Y);
                        Verify.AreEqual(expectedXOffset, layoutBounds.X);
                        Verify.AreEqual(i, child.Content);
                        currentCol++;
                        if(currentCol == totalColumns)
                        {
                            currentCol = 0;
                            currentRow++;
                        }
                    }
                };

                Grid grid = new Grid
                {
                    Width = 500,
                    Height = 500,
                };
                grid.Children.Add(repeater);
                Content = grid;

                Log.Comment("Validate repeater with default 'null' Layout");
                Verify.IsNull(repeater.Layout);
                Content.UpdateLayout();
                validateStackLayout();

                Log.Comment("Switch Layout to UniformGridLayout ");
                var uniformGridLayout = new UniformGridLayout
                {
                    MaximumRowsOrColumns = 5,
                    MinItemHeight = 10,
                    MinItemWidth = 100,
                };
                repeater.Layout = uniformGridLayout;
                Content.UpdateLayout();
                validateGridLayout();

                Log.Comment("Switch Layout back to 'null' Layout");
                repeater.Layout = null;
                Content.UpdateLayout();
                validateStackLayout();
            });
        }

void VerifyStackLayoutCycleShortcut ( ) [inline]

Definition at line 323 of file LayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                int measureCount = 0;
                int arrangeCount = 0;
                var repeater = new ItemsRepeater();
                var mockStackLayout = new MockStackLayout();

                mockStackLayout.MeasureLayoutFunc = (size, context) =>
                {
                    // Simulating variable sized children that cause
                    // the ItemsRepeater's layout to not settle.
                    // This would normally cause a layout cycle but the use
                    // of ItemsRepeater::m_stackLayoutMeasureCounter avoids it.
                    mockStackLayout.InvalidateMeasure();
                    measureCount++;
                    return new Size(100, 200 + measureCount);
                };
                mockStackLayout.ArrangeLayoutFunc = (size, context) =>
                {
                    arrangeCount++;
                    return new Size(100, 200 + arrangeCount);
                };

                repeater.Layout = mockStackLayout;
                repeater.ItemsSource = Enumerable.Range(0, 10);
                repeater.ItemTemplate = GetDataTemplate("<Button Content='{Binding}' Height='200'/>");

                Content = repeater;
                Content.UpdateLayout();
            });
        }

void VerifyUniformGridLayoutDoesntCrashWhenTryingToScrollToEnd ( ) [inline]

Definition at line 358 of file LayoutTests.cs.

        {
            ItemsRepeater repeater = null;
            ScrollViewer scrollViewer = null;
            RunOnUIThread.Execute(() =>
            {
                repeater = new ItemsRepeater {
                    ItemsSource = Enumerable.Range(0, 1000).Select(i => new Border {
                        Background = new SolidColorBrush(Colors.Blue),
                        Child = new TextBlock { Text = "#" + i }
                    }).ToArray(),
                    Layout = new UniformGridLayout {
                        MinItemWidth = 100,
                        MinItemHeight = 40,
                        MinRowSpacing = 10,
                        MinColumnSpacing = 10
                    }
                };
                scrollViewer = new ScrollViewer { Content = repeater };
                Content = scrollViewer;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                scrollViewer.ChangeView(0, repeater.ActualHeight, null);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                scrollViewer.ChangeView(0, 0, null);
            });

            IdleSynchronizer.Wait();

            // The test guards against an app crash, so this is enough to verify
            Verify.IsTrue(true);
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/LayoutTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • LinedFlowLayoutTests
Public Member Functions

LinedFlowLayoutTests Class Reference

List of all members.

Public Member Functions

void VerifyDefaultPropertyValues ()

Detailed Description

Definition at line 15 of file LinedFlowLayoutTests.cs.

Member Function Documentation

void VerifyDefaultPropertyValues ( ) [inline]

Definition at line 19 of file LinedFlowLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                LinedFlowLayout linedFlowLayout = new LinedFlowLayout();
                Verify.IsNotNull(linedFlowLayout);

                Log.Comment("Verifying LinedFlowLayout default property values");
                Verify.AreEqual(0.0, linedFlowLayout.ActualLineHeight);
                Verify.AreEqual(double.NaN, linedFlowLayout.LineHeight);
                Verify.AreEqual(0.0, linedFlowLayout.LineSpacing);
                Verify.AreEqual(0.0, linedFlowLayout.MinItemSpacing);
                Verify.AreEqual(LinedFlowLayoutItemsJustification.Start, linedFlowLayout.ItemsJustification);
                Verify.AreEqual(LinedFlowLayoutItemsStretch.None, linedFlowLayout.ItemsStretch);
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/LinedFlowLayoutTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyContainerSelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • MyContainerSelector
Protected Member Functions | Properties

MyContainerSelector Class Reference

List of all members.

Protected Member Functions

override DataTemplate | SelectTemplateCore (object item, DependencyObject container)

Properties

DataTemplate | TemplateEven [get, set]
DataTemplate | TemplateOdd [get, set]

Detailed Description

Definition at line 790 of file ItemTemplateTests.cs.

Member Function Documentation

override DataTemplate SelectTemplateCore | ( | object | item,
 |  | DependencyObject | container |
 | ) |  |  | [inline, protected]

Definition at line 796 of file ItemTemplateTests.cs.

        {
            return (((int)item) % 2 == 0) ? TemplateEven : TemplateOdd;
        }

Property Documentation

DataTemplate TemplateEven [get, set]

Definition at line 794 of file ItemTemplateTests.cs.

DataTemplate TemplateOdd [get, set]

Definition at line 792 of file ItemTemplateTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/ItemTemplateTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MySelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • MySelector
Protected Member Functions | Properties

MySelector Class Reference

List of all members.

Protected Member Functions

override DataTemplate | SelectTemplateCore (object item)

Properties

DataTemplate | TemplateEven [get, set]
DataTemplate | TemplateOdd [get, set]

Detailed Description

Definition at line 778 of file ItemTemplateTests.cs.

Member Function Documentation

override DataTemplate SelectTemplateCore ( object item ) [inline, protected]

Definition at line 784 of file ItemTemplateTests.cs.

        {
            return (((int)item) % 2 == 0) ? TemplateEven : TemplateOdd;
        }

Property Documentation

DataTemplate TemplateEven [get, set]

Definition at line 782 of file ItemTemplateTests.cs.

DataTemplate TemplateOdd [get, set]

Definition at line 780 of file ItemTemplateTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/ItemTemplateTests.cs
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PhasingTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • PhasingTests
Classes | Public Member Functions | Private Attributes

PhasingTests Class Reference

List of all members.

Classes

class | CustomElementFactory
class | ElementPhasingManager

Public Member Functions

void | ValidatePhaseInvokeAndOrdering ()
void | ValidateXBindWithoutPhasing ()

Private Attributes

const int | expectedLastRealizedIndex = 8

Detailed Description

Definition at line 25 of file PhasingTests.cs.

Member Function Documentation

void ValidatePhaseInvokeAndOrdering ( ) [inline]

Definition at line 30 of file PhasingTests.cs.

        {
            ItemsRepeater repeater = null;
            int numPhases = 6; // 0 to 5
            ManualResetEvent buildTreeCompleted = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var itemTemplate = (DataTemplate)XamlReader.Load(
                       @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <Button Width='100' Height='100'/>
                        </DataTemplate>");
                repeater = new ItemsRepeater()
                {
                    ItemsSource = Enumerable.Range(0, 10),
                    ItemTemplate = new CustomElementFactory(numPhases),
                    Layout = new StackLayout(),
                };

                repeater.ElementPrepared += (sender, args) =>
                {
                    if (args.Index == expectedLastRealizedIndex)
                    {
                        Log.Comment("Item 8 Created!" );
                        RepeaterTestHooks.BuildTreeCompleted += (sender1, args1) =>
                        {
                            buildTreeCompleted.Set();
                        };
                    }
                };

                Content = new ItemsRepeaterScrollHost()
                {
                    Width = 400,
                    Height = 400,
                    ScrollViewer = new ScrollViewer
                    {
                        Content = repeater
                    }
                };

                // CompositionTarget.Rendering += (sender, args) => { Log.Comment("Rendering"); }; // debugging aid
            });

            if(buildTreeCompleted.WaitOne(TimeSpan.FromMilliseconds(2000)))
            {
                RunOnUIThread.Execute(() =>
                {
                    var calls = ElementPhasingManager.ProcessedCalls;

                    Verify.AreEqual(9, calls.Count);
                    calls[0].RemoveAt(0); // Remove the create we did for first measure.
                    foreach (var index in calls.Keys)
                    {
                        var phases = calls[index];
                        Verify.AreEqual(6, phases.Count);
                        for (int i = 0; i < phases.Count; i++)
                        {
                            Verify.AreEqual(i, phases[i]);
                        }
                    }

                    ElementPhasingManager.ProcessedCalls.Clear();
                });
            }
            else
            {
                Verify.Fail("Failed on waiting on build tree.");
            }
        }

void ValidateXBindWithoutPhasing ( ) [inline]

Definition at line 102 of file PhasingTests.cs.

        {
            ItemsRepeater repeater = null;
            int numPhases = 1; // Just Phase 0 for x:Bind
            ManualResetEvent ElementLoadedCompleted = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var itemTemplate = (DataTemplate)XamlReader.Load(
                       @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <Button Width='100' Height='100'/>
                        </DataTemplate>");
                repeater = new ItemsRepeater()
                {
                    ItemsSource = Enumerable.Range(0, 10),
                    ItemTemplate = new CustomElementFactory(numPhases),
                    Layout = new StackLayout(),
                };

                repeater.ElementPrepared += (sender, args) =>
                {
                    if (args.Index == expectedLastRealizedIndex)
                    {
                        Log.Comment("Item 8 Created!");
                        ElementLoadedCompleted.Set();
                    }
                };

                Content = new ItemsRepeaterScrollHost()
                {
                    Width = 400,
                    Height = 400,
                    ScrollViewer = new ScrollViewer
                    {
                        Content = repeater
                    }
                };
            });

            if(ElementLoadedCompleted.WaitOne(TimeSpan.FromMilliseconds(2000)))
            {
                RunOnUIThread.Execute(() =>
                {
                    var calls = ElementPhasingManager.ProcessedCalls;

                    Verify.AreEqual(calls.Count, 9);
                    calls[0].RemoveAt(0); // Remove the create we did for first measure.
                    foreach (var index in calls.Keys)
                    {
                        var phases = calls[index];
                        Verify.AreEqual(1, phases.Count); // Just phase 0
                    }

                    ElementPhasingManager.ProcessedCalls.Clear();
                });
            }
            else
            {
                Verify.Fail("Failed on waiting on build tree.");
            }
        }

Member Data Documentation

const int expectedLastRealizedIndex = 8 [private]

Definition at line 27 of file PhasingTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/PhasingTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PhasingTests::CustomElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • PhasingTests
  • PhasingTests::CustomElementFactory
Public Member Functions | Protected Member Functions | Private Attributes

PhasingTests::CustomElementFactory Class Reference

Inherits ElementFactory.

List of all members.

Public Member Functions

CustomElementFactory (int numPhases)

Protected Member Functions

override UIElement | GetElementCore (ElementFactoryGetArgs args)
override void | RecycleElementCore (ElementFactoryRecycleArgs args)

Private Attributes

int | _numPhases
RecyclePool | _recyclePool = new RecyclePool()
string | key = "foobar"

Detailed Description

Definition at line 164 of file PhasingTests.cs.

Constructor & Destructor Documentation

CustomElementFactory ( int numPhases ) [inline]

Definition at line 170 of file PhasingTests.cs.

            {
                _numPhases = numPhases;
            }

Member Function Documentation

override UIElement GetElementCore ( ElementFactoryGetArgs args ) [inline, protected]

Definition at line 175 of file PhasingTests.cs.

            {
                var element = _recyclePool.TryGetElement(key, args.Parent);
                if (element == null)
                {
                    element = new Button() { Width = 100, Height = 100 };
                }

                var elementManager = new ElementPhasingManager(_numPhases);
                XamlBindingHelper.SetDataTemplateComponent(element, elementManager);
                return element;
            }

override void RecycleElementCore ( ElementFactoryRecycleArgs args ) [inline, protected]

Definition at line 188 of file PhasingTests.cs.

            {
                XamlBindingHelper.GetDataTemplateComponent(args.Element).Recycle();
                _recyclePool.PutElement(args.Element, key, args.Parent);
            }

Member Data Documentation

int _numPhases [private]

Definition at line 166 of file PhasingTests.cs.

RecyclePool _recyclePool = new RecyclePool() [private]

Definition at line 167 of file PhasingTests.cs.

string key = "foobar" [private]

Definition at line 168 of file PhasingTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/PhasingTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PhasingTests::ElementPhasingManager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • PhasingTests
  • PhasingTests::ElementPhasingManager
Public Member Functions | Properties | Private Attributes

PhasingTests::ElementPhasingManager Class Reference

List of all members.

Public Member Functions

ElementPhasingManager (int numPhases)
void | ProcessBindings (object item, int itemIndex, int phase, out int nextPhase)
void | Recycle ()

Properties

List< int > | Data [get, set]
bool | IsCleared [get, set]
static Dictionary< int, List
< int > > 		ProcessedCalls [get, set]

Private Attributes

int | _data = -1
int | _numPhases = 1

Detailed Description

Definition at line 195 of file PhasingTests.cs.

Constructor & Destructor Documentation

ElementPhasingManager ( int numPhases ) [inline]

Definition at line 206 of file PhasingTests.cs.

            {
                _numPhases = numPhases;
            }

Member Function Documentation

void ProcessBindings | ( | object | item,
 |  | int | itemIndex,
 |  | int | phase,
 |  | out int | nextPhase |
 | ) |  |  | [inline]

Definition at line 217 of file PhasingTests.cs.

            {
                if (Data == null)
                {
                    Data = new List<int>();
                }

                if (ProcessedCalls == null)
                {
                    ProcessedCalls = new Dictionary<int, List<int>>();
                }

                _data = (int)item;
                Data.Add(_data);
                if (!ProcessedCalls.ContainsKey(_data))
                {
                    ProcessedCalls.Add(_data, new List<int>());
                }

                ProcessedCalls[_data].Add(phase);

                nextPhase = phase >= _numPhases -1 ? -1 : phase + 1;
                Log.Comment(string.Format("Index:{0}  Phase:{1}  NextPhase:{2}", item.ToString(), phase, nextPhase));
            }

void Recycle ( ) [inline]

Definition at line 211 of file PhasingTests.cs.

            {
                IsCleared = true;
                Log.Comment(string.Format("Recycle Index:{0}", _data));
            }

Member Data Documentation

int _data = -1 [private]

Definition at line 198 of file PhasingTests.cs.

int _numPhases = 1 [private]

Definition at line 197 of file PhasingTests.cs.

Property Documentation

List<int> Data [get, set]

Definition at line 200 of file PhasingTests.cs.

bool IsCleared [get, set]

Definition at line 201 of file PhasingTests.cs.

Dictionary<int, List<int> > ProcessedCalls [static, get, set]

Definition at line 204 of file PhasingTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/PhasingTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclePoolTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • RecyclePoolTests
Public Member Functions

RecyclePoolTests Class Reference

List of all members.

Public Member Functions

void | ValidateChildRemovedFromParentWhenOwnerIsDifferent ()
void | ValidateElementsHaveCorrectKeys ()
void | ValidateOwnershipWithStackPanel ()
void | ValidateRecycledElementOwnerAffinity ()

Detailed Description

Definition at line 23 of file RecyclePoolTests.cs.

Member Function Documentation

void ValidateChildRemovedFromParentWhenOwnerIsDifferent ( ) [inline]

Definition at line 176 of file RecyclePoolTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var element = new Button();
                const string key1 = "Key1";
                const string key2 = "Key2";

                RecyclePool pool = new RecyclePool();
                var parent1 = new StackPanel();
                var child1 = new Button();
                var child2 = new Button();
                parent1.Children.Add(child1);
                parent1.Children.Add(child2);

                pool.PutElement(child1, key1);
                pool.PutElement(child2, key2);

                var parent2 = new StackPanel();
                // Recycle the second child for a different parent. It should be disconnected
                var recycled1 = (FrameworkElement)pool.TryGetElement(key2, parent2);
                Verify.IsNull(recycled1.Parent);
                var recycled2 = (FrameworkElement)pool.TryGetElement(key1, parent2);
                Verify.IsNull(recycled2.Parent);
            });
        }

void ValidateElementsHaveCorrectKeys ( ) [inline]

Definition at line 26 of file RecyclePoolTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var element = new Button();
                const string buttonKey = "ButtonKey";
                const string textBlockKey = "TextBlockKey";
                const string stackPanelKey = "StackPanelKey";

                RecyclePool pool = new RecyclePool();
                pool.PutElement(new Button(), buttonKey);
                pool.PutElement(new TextBlock(), textBlockKey);
                pool.PutElement(new StackPanel(), stackPanelKey);
                pool.PutElement(new Button(), buttonKey);
                pool.PutElement(new TextBlock(), textBlockKey);
                pool.PutElement(new StackPanel(), stackPanelKey);
                pool.PutElement(new Button(), buttonKey);
                pool.PutElement(new TextBlock(), textBlockKey);
                pool.PutElement(new StackPanel(), stackPanelKey);

                Verify.IsNotNull((Button)pool.TryGetElement(buttonKey));
                Verify.IsNotNull((Button)pool.TryGetElement(buttonKey));
                Verify.IsNotNull((Button)pool.TryGetElement(buttonKey));
                Verify.IsNull(pool.TryGetElement(buttonKey));

                Verify.IsNotNull((TextBlock)pool.TryGetElement(textBlockKey));
                Verify.IsNotNull((TextBlock)pool.TryGetElement(textBlockKey));
                Verify.IsNotNull((TextBlock)pool.TryGetElement(textBlockKey));
                Verify.IsNull(pool.TryGetElement(textBlockKey));

                Verify.IsNotNull((StackPanel)pool.TryGetElement(stackPanelKey));
                Verify.IsNotNull((StackPanel)pool.TryGetElement(stackPanelKey));
                Verify.IsNotNull((StackPanel)pool.TryGetElement(stackPanelKey));
                Verify.IsNull(pool.TryGetElement(stackPanelKey));

                Verify.Throws<COMException>(delegate
                {
                    pool.PutElement(new Button(), null, null);
                });

                Verify.Throws<COMException>(delegate
                {
                    pool.PutElement(new Button(), buttonKey, new Button() /* not a panel */);
                });

                Verify.Throws<COMException>(delegate
                {
                    pool.TryGetElement(null, null);
                });
            });
        }

void ValidateOwnershipWithStackPanel ( ) [inline]

Definition at line 80 of file RecyclePoolTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                RecyclePool pool = new RecyclePool();
                var owner = new StackPanel();
                var child = new Button();
                owner.Children.Add(child);
                pool.PutElement(child, "Key", owner);
                var recycled = pool.TryGetElement("Key", owner);
                Verify.AreSame(child, recycled);
                Verify.AreEqual(0, owner.Children.IndexOf(child));
            });
        }

void ValidateRecycledElementOwnerAffinity ( ) [inline]

Definition at line 98 of file RecyclePoolTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater repeater1 = null;
                ItemsRepeater repeater2 = null;
                const int numItems = 10;
                var dataCollection = new ObservableCollection<int>(Enumerable.Range(0, numItems));
                const string recycleKey = "key";

                var dataSource = MockItemsSource.CreateDataSource<int>(dataCollection, true);
                var layout = new StackLayout();
                var recyclePool = new RecyclePool();
                var itemTemplate = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                         <TextBlock Text='{Binding}' />
                    </DataTemplate>");

                repeater1 = new ItemsRepeater()
                {
                    ItemsSource = dataSource,
                    Layout = layout,
                    ItemTemplate = new RecyclingElementFactoryDerived()
                    {
                        Templates = { { "key", itemTemplate } },
                        RecyclePool = recyclePool,
                        SelectTemplateIdFunc = (object data, UIElement owner) => recycleKey
                    }
                };

                repeater2 = new ItemsRepeater()
                {
                    ItemsSource = dataSource,
                    Layout = layout,
                    ItemTemplate = new RecyclingElementFactoryDerived()
                    {
                        Templates = { { "key", itemTemplate } },
                        RecyclePool = recyclePool,
                        SelectTemplateIdFunc = (object data, UIElement owner) => recycleKey
                    }
                };

                var root = new StackPanel();
                root.Children.Add(repeater1);
                root.Children.Add(repeater2);

                Content = new ItemsRepeaterScrollHost()
                {
                    Width = 400,
                    Height = 400,
                    ScrollViewer = new ScrollViewer()
                    {
                        Content = root
                    }
                };

                Content.UpdateLayout();
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater1));
                Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater2));

                // Throw all the elements into the recycle pool
                dataCollection.Clear();
                Content.UpdateLayout();

                for (int i = 0; i < numItems; i++)
                {
                    var element1 = (FrameworkElement)recyclePool.TryGetElement(recycleKey, repeater1);
                    Verify.AreSame(repeater1, element1.Parent);

                    var element2 = (FrameworkElement)recyclePool.TryGetElement(recycleKey, repeater2);
                    Verify.AreSame(repeater2, element2.Parent);
                }
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/RecyclePoolTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterFocusTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • RepeaterFocusTests
Public Member Functions | Static Private Member Functions

RepeaterFocusTests Class Reference

List of all members.

Public Member Functions

void | ValidateTabNavigation ()

Static Private Member Functions

static ItemsRepeaterScrollHost | CreateAndInitializeRepeater (object itemsSource, VirtualizingLayout layout, ElementFactory elementFactory, ref ItemsRepeater repeater, ref ScrollViewer scrollViewer)
static Button[] | GetRealizedRange (ItemsRepeater repeater)
static void | ValidateTabNavigationOrder (ItemsRepeater repeater)

Detailed Description

Definition at line 24 of file RepeaterFocusTests.cs.

Member Function Documentation

static ItemsRepeaterScrollHost CreateAndInitializeRepeater | ( | object | itemsSource,
 |  | VirtualizingLayout | layout,
 |  | ElementFactory | elementFactory,
 |  | ref ItemsRepeater | repeater,
 |  | ref ScrollViewer | scrollViewer |
 | ) |  |  | [inline, static, private]

Definition at line 161 of file RepeaterFocusTests.cs.

        {
            repeater = new ItemsRepeater()
            {
                ItemsSource = itemsSource,
                Layout = layout,
                ItemTemplate = elementFactory,
                VerticalCacheLength = 0
            };

            scrollViewer = new ScrollViewer()
            {
                Content = repeater
            };

            return new ItemsRepeaterScrollHost()
            {
                Width = 400,
                Height = 400,
                ScrollViewer = scrollViewer
            };
        }

static Button [] GetRealizedRange ( ItemsRepeater repeater ) [inline, static, private]

Definition at line 152 of file RepeaterFocusTests.cs.

        {
            return Enumerable.Range(0, VisualTreeHelper.GetChildrenCount(repeater))
                .Select(i => (Button)VisualTreeHelper.GetChild(repeater, i))
                .Where(e => repeater.GetElementIndex(e) >= 0)
                .OrderBy(e => repeater.GetElementIndex(e))
                .ToArray();
        }

void ValidateTabNavigation ( ) [inline]

Definition at line 28 of file RepeaterFocusTests.cs.

        {
            ItemsRepeater repeater = null;
            ScrollViewer scrollViewer = null;
            var data = new ObservableCollection<string>(Enumerable.Range(0, 50).Select(i => "Item #" + i));
            var viewChangedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var itemTemplate = (DataTemplate)XamlReader.Load(
                        @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <Button Content='{Binding}' Height='100' />
                        </DataTemplate>");

                var elementFactory = new RecyclingElementFactory()
                {
                    RecyclePool = new RecyclePool(),
                    Templates =
                    {
                        { "itemTemplate", itemTemplate },
                    }
                };

                Content = CreateAndInitializeRepeater
                (
                   data,
                   new StackLayout(),
                   elementFactory,
                   ref repeater,
                   ref scrollViewer
                );

                scrollViewer.ViewChanged += (s, e) =>
                {
                    if (!e.IsIntermediate)
                    {
                        viewChangedEvent.Set();
                    }
                };

                repeater.TabFocusNavigation = KeyboardNavigationMode.Local;
                Content.UpdateLayout();
                ValidateTabNavigationOrder(repeater);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Move window - disconnected
                scrollViewer.ChangeView(null, 2000, null, true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS), "Waiting for final ViewChanged event.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                ValidateTabNavigationOrder(repeater);

                // Delete a couple of elements and validate we
                // ignore unrealized elements.
                // First visible element is expected to be index 20.
                while (data.Count > 21) { data.RemoveAt(21); }

                repeater.UpdateLayout();
                ValidateTabNavigationOrder(repeater);
            });
        }

static void ValidateTabNavigationOrder ( ItemsRepeater repeater ) [inline, static, private]

Definition at line 98 of file RepeaterFocusTests.cs.

        {
            var expectedSequence = GetRealizedRange(repeater);

            expectedSequence.Last().Focus(FocusState.Keyboard);
            Log.Comment("\n\nStart point: " + expectedSequence.Last().Content);

            Log.Comment("Validating forward tab navigation...");

            FindNextElementOptions options = new FindNextElementOptions {
                SearchRoot = repeater.XamlRoot.Content
            };

            foreach(var expectedElement in expectedSequence)
            {
                var actualElement = FocusManager.FindNextElement(FocusNavigationDirection.Next, options);
                var actualElementAsbutton = FocusManager.FindNextElement(FocusNavigationDirection.Next, options) as Button;
                var actualElementAsToggleButton = FocusManager.FindNextElement(FocusNavigationDirection.Next, options) as ToggleButton;

                string content = actualElementAsbutton != null ? (string)actualElementAsbutton.Content : (string)actualElementAsToggleButton.Content;
                // We need to ignore the toggle theme button, so lets set its tabstop to false and get next element.
                if (content == "Toggle theme")
                {
                    actualElementAsbutton.IsTabStop = false;
                    actualElement = FocusManager.FindNextElement(FocusNavigationDirection.Next, options);
                }
                actualElementAsbutton = FocusManager.FindNextElement(FocusNavigationDirection.Next, options) as Button;
                actualElementAsToggleButton = FocusManager.FindNextElement(FocusNavigationDirection.Next, options) as ToggleButton;

                content = actualElementAsbutton != null ? (string)actualElementAsbutton.Content : (string)actualElementAsToggleButton.Content;
                // We need to ignore the lab dimensions button, so lets set its tabstop to false and get next element.
                if (content== "Render innerframe in lab dimensions")
                {
                    actualElementAsToggleButton.IsTabStop = false;
                    actualElement = FocusManager.FindNextElement(FocusNavigationDirection.Next, options);
                }
                Log.Comment("Expected: " + expectedElement.Content);
                Log.Comment("Actual: " + content);
                Verify.AreEqual(expectedElement, actualElement);
                expectedElement.Focus(FocusState.Keyboard);
            }

            Log.Comment("Validating backward tab navigation...");

            foreach (var expectedElement in expectedSequence.Reverse().Skip(1))
            {
                var actualElement = (Button)FocusManager.FindNextElement(FocusNavigationDirection.Previous, options);
                Log.Comment("Expected: " + expectedElement.Content);
                Log.Comment("Actual: " + actualElement.Content);
                Verify.AreEqual(expectedElement, actualElement);
                expectedElement.Focus(FocusState.Keyboard);
            }
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/RepeaterFocusTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • RepeaterTests
Public Member Functions | Private Member Functions

RepeaterTests Class Reference

List of all members.

Public Member Functions

void | BringIntoViewOfExistingItemsDoesNotChangeScrollOffset ()
void | CanSetItemsSource ()
void | NestedRepeaterWithDataTemplateScenario ()
void | ValidateElementToIndexMapping ()
void | ValidateGetSetBackground ()
void | ValidateGetSetItemsSource ()
void | ValidateNullItemsSource ()
void | ValidateRepeaterDefaults ()
void | VerifyClearingItemsSourceClearsElements ()
void | VerifyCorrectionsInNonScrollableDirection ()
void | VerifyCurrentAnchor ()
void | VerifyFocusedItemIsRecycledOnCollectionReset ()
void | VerifyRepeaterDoesNotLeakItemContainers ()
void | VerifyStoreScenarioCache ()
void | VerifyUIElementsInItemsSource ()

Private Member Functions

DataTemplate | CreateDataTemplateWithContent (string content)
void | NestedRepeaterWithDataTemplateScenario (bool disableAnimation)

Detailed Description

Definition at line 28 of file RepeaterTests.cs.

Member Function Documentation

void BringIntoViewOfExistingItemsDoesNotChangeScrollOffset ( ) [inline]

Definition at line 680 of file RepeaterTests.cs.

        {
            ScrollViewer scrollViewer = null;
            ItemsRepeater repeater = null;
            AutoResetEvent scrollViewerScrolledEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                repeater = new ItemsRepeater();
                repeater.ItemsSource = Enumerable.Range(0, 100).Select(x => x.ToString()).ToList();

                scrollViewer = new ScrollViewer() {
                    Content = repeater,
                    MaxHeight = 400,
                    MaxWidth = 200
                };

                Content = scrollViewer;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Scroll to end");
                scrollViewer.ViewChanged += (object sender, ScrollViewerViewChangedEventArgs e) =>
                {
                    if (!e.IsIntermediate)
                    {
                        Log.Comment("ScrollViewer scrolling finished");
                        scrollViewerScrolledEvent.Set();
                    }
                };
                scrollViewer.ChangeView(null, repeater.ActualHeight, null);
                scrollViewer.UpdateLayout();
            });

            Log.Comment("Wait for scrolling");
            if (Debugger.IsAttached)
            {
                scrollViewerScrolledEvent.WaitOne();
            }
            else
            {
                if (!scrollViewerScrolledEvent.WaitOne(TimeSpan.FromMilliseconds(5000)))
                {
                    throw new Exception("Timeout expiration in WaitForEvent.");
                }
            }

            IdleSynchronizer.Wait();

            double endOfScrollOffset = 0;
            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Determine scrolled offset");
                endOfScrollOffset = scrollViewer.VerticalOffset;
                // Idea: we might not have scrolled to the end, however we should at least have moved so much that the end is not too far away
                Verify.IsTrue(Math.Abs(endOfScrollOffset - repeater.ActualHeight) < 500, $"We should at least have scrolled some amount. " +
                    $"ScrollOffset:{endOfScrollOffset} Repeater height: {repeater.ActualHeight}");

                var lastItem = repeater.GetOrCreateElement(99);
                lastItem.UpdateLayout();
                Log.Comment("Bring last element into view");
                lastItem.StartBringIntoView();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Verify position did not change");
                Verify.IsTrue(Math.Abs(endOfScrollOffset - scrollViewer.VerticalOffset) < 1);
            });
        }

void CanSetItemsSource ( ) [inline]

Definition at line 104 of file RepeaterTests.cs.

        {
            // In bug 12042052, we crash when we set ItemsSource to null because we try to subscribe to
            // the DataSourceChanged event on a null instance.
            RunOnUIThread.Execute(() =>
            {
                {
                    var repeater = new ItemsRepeater();
                    repeater.ItemsSource = null;
                    repeater.ItemsSource = Enumerable.Range(0, 5).Select(i => string.Format("Item #{0}", i));
                }

                {
                    var repeater = new ItemsRepeater();
                    repeater.ItemsSource = Enumerable.Range(0, 5).Select(i => string.Format("Item #{0}", i));
                    repeater.ItemsSource = Enumerable.Range(5, 5).Select(i => string.Format("Item #{0}", i));
                    repeater.ItemsSource = null;
                    repeater.ItemsSource = Enumerable.Range(10, 5).Select(i => string.Format("Item #{0}", i));
                    repeater.ItemsSource = null;
                }
            });
        }

DataTemplate CreateDataTemplateWithContent ( string content ) [inline, private]

Definition at line 352 of file RepeaterTests.cs.

        {
            return (DataTemplate)XamlReader.Load(@"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>" + content + @"</DataTemplate>");
        }

void NestedRepeaterWithDataTemplateScenario ( ) [inline]

Definition at line 284 of file RepeaterTests.cs.

        {
            NestedRepeaterWithDataTemplateScenario(disableAnimation: true);
            NestedRepeaterWithDataTemplateScenario(disableAnimation: false);
        }

void NestedRepeaterWithDataTemplateScenario ( bool disableAnimation ) [inline, private]

Definition at line 357 of file RepeaterTests.cs.

        {
            if (!disableAnimation)
            {
                Log.Warning("This test is showing consistent issues with not scrolling enough, tracked by microsoft-ui-xaml#779");
                return;
            }

            // Example of how to include debug tracing in an ApiTests.ItemsRepeater test's output.
            // using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ItemsRepeater"))
            // {
            ItemsRepeater rootRepeater = null;
            ScrollViewer scrollViewer = null;
            ManualResetEvent viewChanged = new ManualResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                var anchorProvider = (ItemsRepeaterScrollHost)XamlReader.Load(
                    @"<controls:ItemsRepeaterScrollHost Width='400' Height='600'
                        xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                        xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                    <controls:ItemsRepeaterScrollHost.Resources>
                        <DataTemplate x:Key='ItemTemplate' >
                            <TextBlock Text='{Binding}' />
                        </DataTemplate>
                        <DataTemplate x:Key='GroupTemplate'>
                            <StackPanel>
                                <TextBlock Text='{Binding}' />
                                <controls:ItemsRepeater ItemTemplate='{StaticResource ItemTemplate}' ItemsSource='{Binding}' VerticalCacheLength='0'/>
                            </StackPanel>
                        </DataTemplate>
                    </controls:ItemsRepeaterScrollHost.Resources>
                    <ScrollViewer x:Name='scrollviewer'>
                        <controls:ItemsRepeater x:Name='rootRepeater' ItemTemplate='{StaticResource GroupTemplate}' VerticalCacheLength='0' />
                    </ScrollViewer>
                </controls:ItemsRepeaterScrollHost>");

                rootRepeater = (ItemsRepeater)anchorProvider.FindName("rootRepeater");
                rootRepeater.SizeChanged += (sender, args) =>
                {
                    Log.Comment($"SizeChanged: Size=({rootRepeater.ActualWidth} x {rootRepeater.ActualHeight})");
                };

                scrollViewer = (ScrollViewer)anchorProvider.FindName("scrollviewer");
                scrollViewer.ViewChanging += (sender, args) =>
                {
                    Log.Comment($"ViewChanging: Next VerticalOffset={args.NextView.VerticalOffset}, Final VerticalOffset={args.FinalView.VerticalOffset}");
                };
                scrollViewer.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged: VerticalOffset={scrollViewer.VerticalOffset}, IsIntermediate={args.IsIntermediate}");

                    if (!args.IsIntermediate)
                    {
                        viewChanged.Set();
                    }
                };

                var itemsSource = new ObservableCollection<ObservableCollection<int>>();
                for (int i = 0; i < 100; i++)
                {
                    itemsSource.Add(new ObservableCollection<int>(Enumerable.Range(0, 5)));
                };

                rootRepeater.ItemsSource = itemsSource;
                Content = anchorProvider;
            });

            // scroll down several times to cause recycling of elements
            for (int i = 1; i < 10; i++)
            {
                IdleSynchronizer.Wait();
                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"Size=({rootRepeater.ActualWidth} x {rootRepeater.ActualHeight})");
                    Log.Comment($"ChangeView(VerticalOffset={i * 200})");
                    scrollViewer.ChangeView(null, i * 200, null, disableAnimation);
                });

                Log.Comment("Waiting for view change completion...");
                Verify.IsTrue(viewChanged.WaitOne(DefaultWaitTimeInMS));
                viewChanged.Reset();
                Log.Comment("View change completed");

                RunOnUIThread.Execute(() =>
                {
                    Verify.AreEqual(i * 200, scrollViewer.VerticalOffset);
                });
            }
            // }
        }

void ValidateElementToIndexMapping ( ) [inline]

Definition at line 31 of file RepeaterTests.cs.

        {
            ItemsRepeater repeater = null;
            RunOnUIThread.Execute(() =>
            {
                var elementFactory = new RecyclingElementFactory();
                elementFactory.RecyclePool = new RecyclePool();
                elementFactory.Templates["Item"] = (DataTemplate)XamlReader.Load(
                    @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                          <TextBlock Text='{Binding}' Height='50' />
                      </DataTemplate>");

                repeater = new ItemsRepeater() {
                    ItemsSource = Enumerable.Range(0, 10).Select(i => string.Format("Item #{0}", i)),
                    ItemTemplate = elementFactory,
                    // Default is StackLayout, so do not have to explicitly set.
                    // Layout = new StackLayout(),
                };

                Content = new ItemsRepeaterScrollHost() {
                    Width = 400,
                    Height = 800,
                    ScrollViewer = new ScrollViewer {
                        Content = repeater
                    }
                };

                Content.UpdateLayout();

                for (int i = 0; i < 10; i++)
                {
                    var element = repeater.TryGetElement(i);
                    Verify.IsNotNull(element);
                    Verify.AreEqual(string.Format("Item #{0}", i), ((TextBlock)element).Text);
                    Verify.AreEqual(i, repeater.GetElementIndex(element));
                }

                Verify.IsNull(repeater.TryGetElement(20));
            });
        }

void ValidateGetSetBackground ( ) [inline]

Definition at line 195 of file RepeaterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater repeater = new ItemsRepeater();
                var redBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
                repeater.SetValue(ItemsRepeater.BackgroundProperty, redBrush);
                Verify.AreSame(redBrush, repeater.GetValue(ItemsRepeater.BackgroundProperty) as Brush);
                Verify.AreSame(redBrush, repeater.Background);

                var blueBrush = new SolidColorBrush(Microsoft.UI.Colors.Blue);
                repeater.Background = blueBrush;
                Verify.AreSame(blueBrush, repeater.Background);
            });
        }

void ValidateGetSetItemsSource ( ) [inline]

Definition at line 128 of file RepeaterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ItemsRepeater repeater = new ItemsRepeater();
                var dataSource = new ItemsSourceView(Enumerable.Range(0, 10).Select(i => string.Format("Item #{0}", i)));
                repeater.SetValue(ItemsRepeater.ItemsSourceProperty, dataSource);
                Verify.AreSame(dataSource, repeater.GetValue(ItemsRepeater.ItemsSourceProperty) as ItemsSourceView);
                Verify.AreSame(dataSource, repeater.ItemsSourceView);
            });
        }

void ValidateNullItemsSource ( ) [inline]

Definition at line 142 of file RepeaterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                string errorMessage = string.Empty;
                ItemsRepeater repeater = new ItemsRepeater();
                try
                {
                    repeater.GetOrCreateElement(0);
                }
                catch (COMException e)
                {
                    errorMessage = e.Message;
                }
                //Make sure that we threw E_FAIL
                string expectedErrorMessage = "ItemSource doesn't have a value";
                Log.Comment($"Expected error message: '{expectedErrorMessage}'");
                Log.Comment($"Actual error message: '{errorMessage}'");
                Verify.IsTrue(errorMessage.Contains(expectedErrorMessage));
            });
        }

void ValidateRepeaterDefaults ( ) [inline]

Definition at line 73 of file RepeaterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater() {
                    ItemsSource = Enumerable.Range(0, 10).Select(i => string.Format("Item #{0}", i)),
                };

                Content = new ItemsRepeaterScrollHost() {
                    Width = 400,
                    Height = 800,
                    ScrollViewer = new ScrollViewer {
                        Content = repeater
                    }
                };

                Content.UpdateLayout();

                for (int i = 0; i < 10; i++)
                {
                    var element = repeater.TryGetElement(i);
                    Verify.IsNotNull(element);
                    Verify.AreEqual(string.Format("Item #{0}", i), ((TextBlock)element).Text);
                    Verify.AreEqual(i, repeater.GetElementIndex(element));
                }

                Verify.IsNull(repeater.TryGetElement(20));
            });
        }

void VerifyClearingItemsSourceClearsElements ( ) [inline]

Definition at line 166 of file RepeaterTests.cs.

        {
            var data = new ObservableCollection<string>(Enumerable.Range(0, 4).Select(i => "Item #" + i));
            var mapping = (List<ContentControl>)null;

            RunOnUIThread.Execute(() =>
            {
                mapping = Enumerable.Range(0, data.Count).Select(i => new ContentControl { Width = 40, Height = 40 }).ToList();

                var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);
                var elementFactory = MockElementFactory.CreateElementFactory(mapping);
                ItemsRepeater repeater = new ItemsRepeater();
                repeater.ItemsSource = dataSource;
                repeater.ItemTemplate = elementFactory;
                // This was an issue only for NonVirtualizing layouts
                repeater.Layout = new MyCustomNonVirtualizingStackLayout();
                Content = repeater;
                Content.UpdateLayout();

                repeater.ItemsSource = null;
            });

            foreach (var item in mapping)
            {
                Verify.IsNull(item.Parent);
            }
        }

void VerifyCorrectionsInNonScrollableDirection ( ) [inline]

Definition at line 452 of file RepeaterTests.cs.

        {
            ItemsRepeater rootRepeater = null;
            ScrollViewer scrollViewer = null;
            ItemsRepeaterScrollHost scrollhost = null;
            ManualResetEvent viewChanged = new ManualResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                scrollhost = (ItemsRepeaterScrollHost)XamlReader.Load(
                  @"<controls:ItemsRepeaterScrollHost Width='400' Height='600'
                     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                     xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                     xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                    <ScrollViewer Width='400' Height='400' x:Name='scrollviewer'>
                        <controls:ItemsRepeater x:Name='repeater'>
                            <DataTemplate>
                                <StackPanel>
                                    <controls:ItemsRepeater ItemsSource='{Binding}'>
                                        <controls:ItemsRepeater.Layout>
                                            <controls:StackLayout Orientation='Horizontal' />
                                        </controls:ItemsRepeater.Layout>
                                    </controls:ItemsRepeater>
                                </StackPanel>
                            </DataTemplate>
                        </controls:ItemsRepeater>
                    </ScrollViewer>
                </controls:ItemsRepeaterScrollHost>");

                rootRepeater = (ItemsRepeater)scrollhost.FindName("repeater");
                scrollViewer = (ScrollViewer)scrollhost.FindName("scrollviewer");
                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChanged.Set();
                    }
                };

                List<List<int>> items = new List<List<int>>();
                for (int i = 0; i < 100; i++)
                {
                    items.Add(Enumerable.Range(0, 4).ToList());
                }
                rootRepeater.ItemsSource = items;
                Content = scrollhost;
            });

            // scroll down several times and validate no crash
            for (int i = 1; i < 5; i++)
            {
                IdleSynchronizer.Wait();
                RunOnUIThread.Execute(() =>
                {
                    scrollViewer.ChangeView(null, i * 200, null);
                });

                Verify.IsTrue(viewChanged.WaitOne(DefaultWaitTimeInMS));
                viewChanged.Reset();
            }
        }

void VerifyCurrentAnchor ( ) [inline]

Definition at line 212 of file RepeaterTests.cs.

        {
            if (PlatformConfiguration.IsDebugBuildConfiguration())
            {
                // Test is failing in chk configuration due to:
                // Bug #1726 Test Failure: RepeaterTests.VerifyCurrentAnchor
                Log.Warning("Skipping test for Debug builds.");
                return;
            }

            ItemsRepeater rootRepeater = null;
            ScrollViewer scrollViewer = null;
            ItemsRepeaterScrollHost scrollhost = null;
            ManualResetEvent viewChanged = new ManualResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                scrollhost = (ItemsRepeaterScrollHost)XamlReader.Load(
                  @"<controls:ItemsRepeaterScrollHost Width='400' Height='600'
                     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                     xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                     xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                    <controls:ItemsRepeaterScrollHost.Resources>
                        <DataTemplate x:Key='ItemTemplate' >
                            <TextBlock Text='{Binding}' Height='50'/>
                        </DataTemplate>
                    </controls:ItemsRepeaterScrollHost.Resources>
                    <ScrollViewer x:Name='scrollviewer'>
                        <controls:ItemsRepeater x:Name='rootRepeater' ItemTemplate='{StaticResource ItemTemplate}' VerticalCacheLength='0' />
                    </ScrollViewer>
                </controls:ItemsRepeaterScrollHost>");

                rootRepeater = (ItemsRepeater)scrollhost.FindName("rootRepeater");
                scrollViewer = (ScrollViewer)scrollhost.FindName("scrollviewer");
                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChanged.Set();
                    }
                };

                rootRepeater.ItemsSource = Enumerable.Range(0, 500);
                Content = scrollhost;
            });

            // scroll down several times and validate current anchor
            for (int i = 1; i < 10; i++)
            {
                IdleSynchronizer.Wait();
                RunOnUIThread.Execute(() =>
                {
                    scrollViewer.ChangeView(null, i * 200, null);
                });

                Verify.IsTrue(viewChanged.WaitOne(DefaultWaitTimeInMS));
                viewChanged.Reset();
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Verify.AreEqual(i * 200, scrollViewer.VerticalOffset);
                    var anchor = scrollViewer.CurrentAnchor;
                    var anchorIndex = rootRepeater.GetElementIndex(anchor);
                    Log.Comment("CurrentAnchor: " + anchorIndex);
                    Verify.AreEqual(i * 4, anchorIndex);
                });
            }
        }

void VerifyFocusedItemIsRecycledOnCollectionReset ( ) [inline]

Definition at line 291 of file RepeaterTests.cs.

        {
            List<Layout> layouts = new List<Layout>();
            RunOnUIThread.Execute(() =>
            {
                layouts.Add(new MyCustomNonVirtualizingStackLayout());
                layouts.Add(new StackLayout());
            });

            foreach (var layout in layouts)
            {
                List<string> items = new List<string> { "item0", "item1", "item2", "item3", "item4", "item5", "item6", "item7", "item8", "item9" };
                const int targetIndex = 4;
                string targetItem = items[targetIndex];
                ItemsRepeater repeater = null;

                RunOnUIThread.Execute(() =>
                {
                    repeater = new ItemsRepeater() {
                        ItemsSource = items,
                        ItemTemplate = CreateDataTemplateWithContent(@"<Button Content='{Binding}'/>"),
                        Layout = layout
                    };
                    Content = repeater;
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting Focus on item " + targetIndex);
                    Button toFocus = (Button)repeater.TryGetElement(targetIndex);
                    Verify.AreEqual(targetItem, toFocus.Content as string);
                    toFocus.Focus(FocusState.Keyboard);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Removing focused element from collection");
                    items.Remove(targetItem);

                    Log.Comment("Reset the collection with an empty list");
                    repeater.ItemsSource = new List<string>();
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Verify new elements");
                    for (int i = 0; i < items.Count; i++)
                    {
                        Button currentButton = (Button)repeater.TryGetElement(i);
                        Verify.IsNull(currentButton);
                    }
                });
            }
        }

void VerifyRepeaterDoesNotLeakItemContainers ( ) [inline]

Definition at line 628 of file RepeaterTests.cs.

        {
            ObservableCollection<int> items = new ObservableCollection<int>();
            for (int i = 0; i < 10; i++)
            {
                items.Add(i);
            }

            ItemsRepeater repeater = null;

            RunOnUIThread.Execute(() =>
            {
                var template = (DataTemplate)XamlReader.Load("<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' "
                    + "xmlns:local='using:MUXControlsTestApp.Samples'>"
                    + "<local:DisposableUserControl Number='{Binding}'/>"
                    + "</DataTemplate>");
                Verify.IsNotNull(template);
                Verify.AreEqual(0, MUXControlsTestApp.Samples.DisposableUserControl.OpenItems, "Verify we start with 0 DisposableUserControl");

                repeater = new ItemsRepeater() {
                    ItemsSource = items,
                    ItemTemplate = template,
                    VerticalAlignment = VerticalAlignment.Top,
                    HorizontalAlignment = HorizontalAlignment.Left
                };

                Content = repeater;

            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {

                Verify.IsGreaterThanOrEqual(MUXControlsTestApp.Samples.DisposableUserControl.OpenItems, 10, "Verify we created at least 10 DisposableUserControl");

                // Clear out the repeater and make sure everything gets cleaned up.
                Content = null;
                repeater = null;
            });

            IdleSynchronizer.Wait();

            GC.Collect();
            GC.WaitForPendingFinalizers();
            GC.Collect();

            Verify.AreEqual(0, MUXControlsTestApp.Samples.DisposableUserControl.OpenItems, "Verify we cleaned up all the DisposableUserControl that were created");
        }

void VerifyStoreScenarioCache ( ) [inline]

Definition at line 515 of file RepeaterTests.cs.

        {
            ItemsRepeater rootRepeater = null;
            RunOnUIThread.Execute(() =>
            {
                var scrollhost = (ItemsRepeaterScrollHost)XamlReader.Load(
                  @" <controls:ItemsRepeaterScrollHost Width='400' Height='200'
                        xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                        xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                        <controls:ItemsRepeaterScrollHost.Resources>
                            <DataTemplate x:Key='ItemTemplate' >
                                <TextBlock Text='{Binding}' Height='100' Width='100'/>
                            </DataTemplate>
                            <DataTemplate x:Key='GroupTemplate'>
                                <StackPanel>
                                    <TextBlock Text='{Binding}' />
                                    <controls:ItemsRepeaterScrollHost>
                                        <ScrollViewer HorizontalScrollMode='Enabled' VerticalScrollMode='Disabled' HorizontalScrollBarVisibility='Auto' VerticalScrollBarVisibility='Hidden'>
                                            <controls:ItemsRepeater ItemTemplate='{StaticResource ItemTemplate}' ItemsSource='{Binding}'>
                                                <controls:ItemsRepeater.Layout>
                                                    <controls:StackLayout Orientation='Horizontal' />
                                                </controls:ItemsRepeater.Layout>
                                            </controls:ItemsRepeater>
                                        </ScrollViewer>
                                    </controls:ItemsRepeaterScrollHost>
                                </StackPanel>
                            </DataTemplate>
                        </controls:ItemsRepeaterScrollHost.Resources>
                        <ScrollViewer x:Name='scrollviewer'>
                            <controls:ItemsRepeater x:Name='rootRepeater' ItemTemplate='{StaticResource GroupTemplate}'/>
                        </ScrollViewer>
                    </controls:ItemsRepeaterScrollHost>");

                rootRepeater = (ItemsRepeater)scrollhost.FindName("rootRepeater");

                List<List<int>> items = new List<List<int>>();
                for (int i = 0; i < 100; i++)
                {
                    items.Add(Enumerable.Range(0, 4).ToList());
                }
                rootRepeater.ItemsSource = items;
                Content = scrollhost;
            });

            IdleSynchronizer.Wait();

            // Verify that first items outside the visible range but in the realized range
            // for the inner of the nested repeaters are realized.
            RunOnUIThread.Execute(() =>
            {
                // Group2 will be outside the visible range but within the realized range.
                var group2 = rootRepeater.TryGetElement(2) as StackPanel;
                Verify.IsNotNull(group2);

                var group2Repeater = ((ItemsRepeaterScrollHost)group2.Children[1]).ScrollViewer.Content as ItemsRepeater;
                Verify.IsNotNull(group2Repeater);

                Verify.IsNotNull(group2Repeater.TryGetElement(0));
            });
        }

void VerifyUIElementsInItemsSource ( ) [inline]

Definition at line 579 of file RepeaterTests.cs.

        {
            ItemsRepeater repeater = null;
            RunOnUIThread.Execute(() =>
            {
                var scrollhost = (ItemsRepeaterScrollHost)XamlReader.Load(
                  @"<controls:ItemsRepeaterScrollHost
                     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                     xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                     xmlns:local='using:MUXControlsTestApp.Samples'
                     xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                        <ScrollViewer>
                            <controls:ItemsRepeater x:Name='repeater'>
                                <controls:ItemsRepeater.ItemsSource>
                                    <local:UICollection>
                                        <Button>0</Button>
                                        <Button>1</Button>
                                        <Button>2</Button>
                                        <Button>3</Button>
                                        <Button>4</Button>
                                        <Button>5</Button>
                                        <Button>6</Button>
                                        <Button>7</Button>
                                        <Button>8</Button>
                                        <Button>9</Button>
                                    </local:UICollection>
                                </controls:ItemsRepeater.ItemsSource>
                            </controls:ItemsRepeater>
                        </ScrollViewer>
                    </controls:ItemsRepeaterScrollHost>");

                repeater = (ItemsRepeater)scrollhost.FindName("repeater");
                Content = scrollhost;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                for (int i = 0; i < 10; i++)
                {
                    var element = repeater.TryGetElement(i) as Button;
                    Verify.AreEqual(i.ToString(), element.Content);
                }
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/RepeaterTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModelTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • SelectionModelTests
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes

SelectionModelTests Class Reference

List of all members.

Classes

struct | TreeWalkNodeInfo

Public Member Functions

void | AlreadyDeselectedDoesNotRaiseEvent ()
void | AlreadySelectedDoesNotRaiseEvent ()
void | CanExtendSelectionModelINPC ()
void | CanReadSelectedItemViaICustomPropertyProvider ()
void | CanReplaceItem ()
void | SelectRangeRegressionTest ()
void | ValidateCanSetSelectedIndex ()
void | ValidateClear ()
void | ValidateEventWhenInnerNodeChangesSelectionState ()
void | ValidateGroupClear ()
void | ValidateGroupInserts ()
void | ValidateGroupRemoves ()
void | ValidateGroupReplaceLosesSelection ()
void | ValidateInserts ()
void | ValidateNestedMultipleSelection ()
void | ValidateNestedSingleSelection ()
void | ValidateOneLevelMultipleSelection ()
void | ValidateOneLevelSingleSelection ()
void | ValidateOneLevelSingleSelectionNoSource ()
void | ValidatePropertyChangedEventIsRaised ()
void | ValidateRemoves ()
void | ValidateSelectionChangedEventMultipleSelection ()
void | ValidateSelectionChangedEventSingleSelection ()
void | ValidateSelectionModeChangeFromMultipleToSingle ()
void | ValidateSelectionModeChangeFromMultipleToSingleSelectionChangedEvent ()
void | ValidateTwoLevelMultipleSelection ()
void | ValidateTwoLevelSingleSelection ()

Static Public Member Functions

static ObservableCollection
< object > 		CreateNestedData (int levels=3, int groupsAtLevel=5, int countAtLeaf=10)
static IndexPath | Path (params int[] path)

Private Member Functions

bool | AreEqual (IndexPath a, IndexPath b)
void | ClearSelection (SelectionModel manager)
bool | Contains (List< IndexPath > list, IndexPath index)
object | GetData (SelectionModel selectionModel, IndexPath indexPath)
List< IndexPath > | GetIndexPathsInSource (object source)
void | Select (SelectionModel manager, int index, bool select)
void | Select (SelectionModel manager, IndexPath index, bool select)
void | Select (SelectionModel manager, int groupIndex, int itemIndex, bool select)
void | SelectRangeFromAnchor (SelectionModel manager, int index, bool select)
void | SelectRangeFromAnchor (SelectionModel manager, int groupIndex, int itemIndex, bool select)
void | SelectRangeFromAnchor (SelectionModel manager, IndexPath index, bool select)
void | SetAnchorIndex (SelectionModel manager, int index)
void | SetAnchorIndex (SelectionModel manager, IndexPath index)
void | SetAnchorIndex (SelectionModel manager, int groupIndex, int itemIndex)
void | ValidateNestedMultipleSelection (bool handleChildrenRequested)
void | ValidateSelection (SelectionModel selectionModel, List< IndexPath > expectedSelected, List< IndexPath > expectedPartialSelected=null, int selectedInnerNodes=0)

Static Private Member Functions

static void | Traverse (object root, Action< TreeWalkNodeInfo > nodeAction)

Static Private Attributes

static int | _nextData = 0

Detailed Description

Definition at line 22 of file SelectionModelTests.cs.

Member Function Documentation

void AlreadyDeselectedDoesNotRaiseEvent ( ) [inline]

Definition at line 1076 of file SelectionModelTests.cs.

        {
            var testName = "Deselect(int32 index), single select";

            RunOnUIThread.Execute(() =>
            {
                var list = Enumerable.Range(0, 10).ToList();

                var selectionModel = new SelectionModel() {
                    Source = list,
                    SingleSelect = true
                };

                // Single select index
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.Deselect(0);

                selectionModel = new SelectionModel() {
                    Source = list,
                    SingleSelect = true
                };
                // Single select indexpath
                testName = "DeselectAt(IndexPath index), single select";
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.DeselectAt(IndexPath.CreateFrom(1));

                // multi select index
                selectionModel = new SelectionModel() {
                    Source = list
                };
                testName = "Deselect(int32 index), multiselect";
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.Deselect(1);
                selectionModel.Deselect(2);

                selectionModel = new SelectionModel() {
                    Source = list
                };

                // multi select indexpath
                testName = "DeselectAt(IndexPath index), multiselect";
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.DeselectAt(IndexPath.CreateFrom(1));
                selectionModel.DeselectAt(IndexPath.CreateFrom(2));
            });

            void ThrowIfRaisedSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
            {
                throw new Exception("SelectionChangedEvent was raised, but shouldn't have been raised as selection did not change. Tested method: " + testName);
            }
        }

void AlreadySelectedDoesNotRaiseEvent ( ) [inline]

Definition at line 1017 of file SelectionModelTests.cs.

        {
            var testName = "Select(int32 index), single select";

            RunOnUIThread.Execute(() =>
            {
                var list = Enumerable.Range(0, 10).ToList();

                var selectionModel = new SelectionModel() {
                    Source = list,
                    SingleSelect = true
                };

                // Single select index
                selectionModel.Select(0);
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.Select(0);

                selectionModel = new SelectionModel() {
                    Source = list,
                    SingleSelect = true
                };
                // Single select indexpath
                testName = "SelectAt(IndexPath index), single select";
                selectionModel.SelectAt(IndexPath.CreateFrom(1));
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.SelectAt(IndexPath.CreateFrom(1));

                // multi select index
                selectionModel = new SelectionModel() {
                    Source = list
                };
                selectionModel.Select(1);
                selectionModel.Select(2);
                testName = "Select(int32 index), multiselect";
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.Select(1);
                selectionModel.Select(2);

                selectionModel = new SelectionModel() {
                    Source = list
                };

                // multi select indexpath
                selectionModel.SelectAt(IndexPath.CreateFrom(1));
                selectionModel.SelectAt(IndexPath.CreateFrom(2));
                testName = "SelectAt(IndexPath index), multiselect";
                selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
                selectionModel.SelectAt(IndexPath.CreateFrom(1));
                selectionModel.SelectAt(IndexPath.CreateFrom(2));
            });

            void ThrowIfRaisedSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
            {
                throw new Exception("SelectionChangedEvent was raised, but shouldn't have been raised as selection did not change. Tested method: " + testName);
            }
        }

bool AreEqual | ( | IndexPath | a,
 |  | IndexPath | b |
 | ) |  |  | [inline, private]

Definition at line 1389 of file SelectionModelTests.cs.

        {
            if (a.GetSize() != b.GetSize())
            {
                return false;
            }

            for (int i = 0; i < a.GetSize(); i++)
            {
                if (a.GetAt(i) != b.GetAt(i))
                {
                    return false;
                }
            }

            return true;
        }

void CanExtendSelectionModelINPC ( ) [inline]

Definition at line 925 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var selectionModel = new CustomSelectionModel();
                bool intPropertyChanged = false;
                selectionModel.PropertyChanged += (sender, args) =>
                {
                    if (args.PropertyName == "IntProperty")
                    {
                        intPropertyChanged = true;
                    }
                };

                selectionModel.IntProperty = 5;
                Verify.IsTrue(intPropertyChanged);
            });
        }

void CanReadSelectedItemViaICustomPropertyProvider ( ) [inline]

Definition at line 946 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var selectionModel = new SelectionModel();
                Log.Comment("Set the source to 10 items");
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                selectionModel.Select(3);

                var icpp = (ICustomPropertyProvider)selectionModel;
                var selectedItemProperty = icpp.GetCustomProperty("SelectedItem");
                Verify.IsTrue(selectedItemProperty.CanRead);
                Verify.AreEqual(3, selectedItemProperty.GetValue(selectionModel));
            });
        }

void CanReplaceItem ( ) [inline]

Definition at line 687 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(3);
                selectionModel.Select(4);
                selectionModel.Select(5);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(4),
                        Path(5),
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });

                data[3] = 300;
                data[4] = 400;
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(5),
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });
            });
        }

void ClearSelection ( SelectionModel manager ) [inline, private]

Definition at line 1280 of file SelectionModelTests.cs.

        {
            Log.Comment("ClearSelection");
            manager.ClearSelection();
        }

bool Contains | ( | List< IndexPath > | list,
 |  | IndexPath | index |
 | ) |  |  | [inline, private]

Definition at line 1463 of file SelectionModelTests.cs.

        {
            bool contains = false;
            foreach (var item in list)
            {
                if (item.CompareTo(index) == 0)
                {
                    contains = true;
                    break;
                }
            }

            return contains;
        }

static ObservableCollection<object> CreateNestedData | ( | int | levels = 3,
 |  | int | groupsAtLevel = 5,
 |  | int | countAtLeaf = 10 |
 | ) |  |  | [inline, static]

Definition at line 1478 of file SelectionModelTests.cs.

        {
            var data = new ObservableCollection<object>();
            if (levels != 0)
            {
                for (int i = 0; i < groupsAtLevel; i++)
                {
                    data.Add(CreateNestedData(levels - 1, groupsAtLevel, countAtLeaf));
                }
            }
            else
            {
                for (int i = 0; i < countAtLeaf; i++)
                {
                    data.Add(_nextData++);
                }
            }

            return data;
        }

object GetData | ( | SelectionModel | selectionModel,
 |  | IndexPath | indexPath |
 | ) |  |  | [inline, private]

Definition at line 1377 of file SelectionModelTests.cs.

        {
            var data = selectionModel.Source;
            for (int i = 0; i < indexPath.GetSize(); i++)
            {
                var listData = data as IList;
                data = listData[indexPath.GetAt(i)];
            }

            return data;
        }

List<IndexPath> GetIndexPathsInSource ( object source ) [inline, private]

Definition at line 1407 of file SelectionModelTests.cs.

        {
            List<IndexPath> paths = new List<IndexPath>();
            Traverse(source, (TreeWalkNodeInfo node) =>
            {
                if (!paths.Contains(node.Path))
                {
                    paths.Add(node.Path);
                }
            });

            Log.Comment("All Paths in source..");
            foreach (var path in paths)
            {
                Log.Comment(path.ToString());
            }
            Log.Comment("done.");

            return paths;
        }

static IndexPath Path ( params int[] path ) [inline, static]

Definition at line 1499 of file SelectionModelTests.cs.

        {
            return IndexPath.CreateFromIndices(path);
        }

void Select | ( | SelectionModel | manager,
 |  | int | index,
 |  | bool | select |
 | ) |  |  | [inline, private]

Definition at line 1202 of file SelectionModelTests.cs.

        {
            Log.Comment((select ? "Selecting " : "DeSelecting ") + index);
            if (select)
            {
                manager.Select(index);
            }
            else
            {
                manager.Deselect(index);
            }
        }

void Select | ( | SelectionModel | manager,
 |  | int | groupIndex,
 |  | int | itemIndex,
 |  | bool | select |
 | ) |  |  | [inline, private]

Definition at line 1215 of file SelectionModelTests.cs.

        {
            Log.Comment((select ? "Selecting " : "DeSelecting ") + groupIndex + "." + itemIndex);
            if (select)
            {
                manager.Select(groupIndex, itemIndex);
            }
            else
            {
                manager.Deselect(groupIndex, itemIndex);
            }
        }

void Select | ( | SelectionModel | manager,
 |  | IndexPath | index,
 |  | bool | select |
 | ) |  |  | [inline, private]

Definition at line 1228 of file SelectionModelTests.cs.

        {
            Log.Comment((select ? "Selecting " : "DeSelecting ") + index);
            if (select)
            {
                manager.SelectAt(index);
            }
            else
            {
                manager.DeselectAt(index);
            }
        }

void SelectRangeFromAnchor | ( | SelectionModel | manager,
 |  | int | index,
 |  | bool | select |
 | ) |  |  | [inline, private]

Definition at line 1241 of file SelectionModelTests.cs.

        {
            Log.Comment("SelectRangeFromAnchor " + index + " select: " + select.ToString());
            if (select)
            {
                manager.SelectRangeFromAnchor(index);
            }
            else
            {
                manager.DeselectRangeFromAnchor(index);
            }
        }

void SelectRangeFromAnchor | ( | SelectionModel | manager,
 |  | int | groupIndex,
 |  | int | itemIndex,
 |  | bool | select |
 | ) |  |  | [inline, private]

Definition at line 1254 of file SelectionModelTests.cs.

        {
            Log.Comment("SelectRangeFromAnchor " + groupIndex + "." + itemIndex + " select:" + select.ToString());
            if (select)
            {
                manager.SelectRangeFromAnchor(groupIndex, itemIndex);
            }
            else
            {
                manager.DeselectRangeFromAnchor(groupIndex, itemIndex);
            }
        }

void SelectRangeFromAnchor | ( | SelectionModel | manager,
 |  | IndexPath | index,
 |  | bool | select |
 | ) |  |  | [inline, private]

Definition at line 1267 of file SelectionModelTests.cs.

        {
            Log.Comment("SelectRangeFromAnchor " + index + " select: " + select.ToString());
            if (select)
            {
                manager.SelectRangeFromAnchorTo(index);
            }
            else
            {
                manager.DeselectRangeFromAnchorTo(index);
            }
        }

void SelectRangeRegressionTest ( ) [inline]

Definition at line 964 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var selectionModel = new SelectionModel() {
                    Source = CreateNestedData(1, 2, 3)
                };

                // length of start smaller than end used to cause an out of range error.
                selectionModel.SelectRange(IndexPath.CreateFrom(0), IndexPath.CreateFrom(1, 1));

                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(0, 0),
                        Path(0, 1),
                        Path(0, 2),
                        Path(0),
                        Path(1, 0),
                        Path(1, 1)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1)
                    },
                    1 /* selectedInnerNodes */);

                selectionModel = new SelectionModel() { Source = CreateNestedData(2, 2, 1) };

                selectionModel.SelectRange(
                    Path(1), Path(2));

                ValidateSelection(
                    selectionModel,
                    new List<IndexPath> {
                        Path(1,0,0),
                        Path(1), Path(2),
                        Path(1,0),Path(1,1),
                        Path(2,0),Path(2,1),
                        Path(1,0,1),
                        Path(1,1,0),Path(1,1,1),
                        Path(2,0,0),Path(2,0,1),
                        Path(2,1,0),Path(2,1,1),

                    },
                    new List<IndexPath> { IndexPath.CreateFromIndices(new List<int> { }) },
                    12);

            });
        }

void SetAnchorIndex | ( | SelectionModel | manager,
 |  | int | index |
 | ) |  |  | [inline, private]

Definition at line 1286 of file SelectionModelTests.cs.

        {
            Log.Comment("SetAnchorIndex " + index);
            manager.SetAnchorIndex(index);
        }

void SetAnchorIndex | ( | SelectionModel | manager,
 |  | int | groupIndex,
 |  | int | itemIndex |
 | ) |  |  | [inline, private]

Definition at line 1292 of file SelectionModelTests.cs.

        {
            Log.Comment("SetAnchor " + groupIndex + "." + itemIndex);
            manager.SetAnchorIndex(groupIndex, itemIndex);
        }

void SetAnchorIndex | ( | SelectionModel | manager,
 |  | IndexPath | index |
 | ) |  |  | [inline, private]

Definition at line 1298 of file SelectionModelTests.cs.

        {
            Log.Comment("SetAnchor " + index);
            manager.AnchorIndex = index;
        }

static void Traverse | ( | object | root,
 |  | Action< TreeWalkNodeInfo > | nodeAction |
 | ) |  |  | [inline, static, private]

Definition at line 1428 of file SelectionModelTests.cs.

        {
            var pendingNodes = new Stack<TreeWalkNodeInfo>();
            IndexPath current = Path(null);
            pendingNodes.Push(new TreeWalkNodeInfo() { Current = root, Path = current });

            while (pendingNodes.Count > 0)
            {
                var currentNode = pendingNodes.Pop();
                var currentObject = currentNode.Current as IList;

                if (currentObject != null)
                {
                    for (int i = currentObject.Count - 1; i >= 0; i--)
                    {
                        var child = currentObject[i];
                        List<int> path = new List<int>();
                        for (int idx = 0; idx < currentNode.Path.GetSize(); idx++)
                        {
                            path.Add(currentNode.Path.GetAt(idx));
                        }

                        path.Add(i);
                        var childPath = IndexPath.CreateFromIndices(path);
                        if (child != null)
                        {
                            pendingNodes.Push(new TreeWalkNodeInfo() { Current = child, Path = childPath });
                        }
                    }
                }

                nodeAction(currentNode);
            }
        }

void ValidateCanSetSelectedIndex ( ) [inline]

Definition at line 117 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var model = new SelectionModel();
                var ip = IndexPath.CreateFrom(34);
                model.SelectedIndex = ip;
                Verify.AreEqual(0, ip.CompareTo(model.SelectedIndex));
            });
        }

void ValidateClear ( ) [inline]

Definition at line 751 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(3);
                selectionModel.Select(4);
                selectionModel.Select(5);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(4),
                        Path(5),
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });

                data.Clear();
                ValidateSelection(selectionModel, new List<IndexPath>());
            });
        }

void ValidateEventWhenInnerNodeChangesSelectionState ( ) [inline]

Definition at line 811 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                bool selectionChangedRaised = false;
                var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;
                selectionModel.SelectionChanged += (sender, args) => { selectionChangedRaised = true; };

                selectionModel.Select(1, 0);
                selectionModel.Select(1, 1);
                selectionModel.Select(1, 2);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(1, 0),
                        Path(1, 1),
                        Path(1, 2),
                        Path(1)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                    },
                    1 /* selectedInnerNodes */);

                Log.Comment("Inserting 1.0");
                selectionChangedRaised = false;
                (data[1] as ObservableCollection<object>).Insert(0, 100);
                Verify.IsTrue(selectionChangedRaised, "SelectionChanged event was not raised");
                ValidateSelection(selectionModel,
                   new List<IndexPath>()
                   {
                        Path(1, 1),
                        Path(1, 2),
                        Path(1, 3),
                   },
                   new List<IndexPath>()
                   {
                       Path(),
                       Path(1),
                   });

                Log.Comment("Removing 1.0");
                selectionChangedRaised = false;
                (data[1] as ObservableCollection<object>).RemoveAt(0);
                Verify.IsTrue(selectionChangedRaised, "SelectionChanged event was not raised");
                ValidateSelection(selectionModel,
                   new List<IndexPath>()
                   {
                       Path(1, 0),
                       Path(1, 1),
                       Path(1, 2),
                       Path(1)
                   },
                   new List<IndexPath>()
                   {
                        Path(),
                   },
                   1 /* selectedInnerNodes */);
            });
        }

void ValidateGroupClear ( ) [inline]

Definition at line 780 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(1, 1);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(1, 1)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1)
                    });

                (data[1] as IList).Clear();
                ValidateSelection(selectionModel, new List<IndexPath>());
            });
        }

void ValidateGroupInserts ( ) [inline]

Definition at line 513 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(1, 1);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(1, 1),
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1),
                    });

                Log.Comment("Insert before selected range: Inserting item at group index 0");
                data.Insert(0, 100);
                ValidateSelection(selectionModel,
                   new List<IndexPath>()
                   {
                        Path(2, 1)
                   },
                   new List<IndexPath>()
                   {
                       Path(),
                       Path(2),
                   });

                Log.Comment("Insert after selected range: Inserting item at group index 3");
                data.Insert(3, 1000);
                ValidateSelection(selectionModel,
                  new List<IndexPath>()
                  {
                      Path(2, 1)
                  },
                  new List<IndexPath>()
                  {
                      Path(),
                      Path(2),
                  });
            });
        }

void ValidateGroupRemoves ( ) [inline]

Definition at line 630 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(1, 1);
                selectionModel.Select(1, 2);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(1, 1),
                        Path(1, 2)
                    },
                    new List<IndexPath>()
                    {
                       Path(),
                       Path(1),
                    });

                Log.Comment("Remove before selected range: Removing item at group index 0");
                data.RemoveAt(0);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(0, 1),
                        Path(0, 2)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(0),
                    });

                Log.Comment("Remove after selected range: Removing item at group index 1");
                data.RemoveAt(1);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(0, 1),
                        Path(0, 2)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(0),
                    });

                Log.Comment("Remove group containing selected items");
                data.RemoveAt(0);
                ValidateSelection(selectionModel, new List<IndexPath>());
            });
        }

void ValidateGroupReplaceLosesSelection ( ) [inline]

Definition at line 725 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(1, 1);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(1, 1)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1)
                    });

                data[1] = new ObservableCollection<int>(Enumerable.Range(0, 5));
                ValidateSelection(selectionModel, new List<IndexPath>());
            });
        }

void ValidateInserts ( ) [inline]

Definition at line 439 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(3);
                selectionModel.Select(4);
                selectionModel.Select(5);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(4),
                        Path(5),
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });

                Log.Comment("Insert in selected range: Inserting 3 items at index 4");
                data.Insert(4, 41);
                data.Insert(4, 42);
                data.Insert(4, 43);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(7),
                        Path(8),
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });

                Log.Comment("Insert before selected range: Inserting 3 items at index 0");
                data.Insert(0, 100);
                data.Insert(0, 101);
                data.Insert(0, 102);
                ValidateSelection(selectionModel,
                   new List<IndexPath>()
                   {
                        Path(6),
                        Path(10),
                        Path(11),
                   },
                   new List<IndexPath>()
                   {
                       Path()
                   });

                Log.Comment("Insert after selected range: Inserting 3 items at index 12");
                data.Insert(12, 1000);
                data.Insert(12, 1001);
                data.Insert(12, 1002);
                ValidateSelection(selectionModel,
                  new List<IndexPath>()
                  {
                        Path(6),
                        Path(10),
                        Path(11),
                  },
                    new List<IndexPath>()
                    {
                        Path()
                    });
            });
        }

void ValidateNestedMultipleSelection ( bool handleChildrenRequested ) [inline, private]

Definition at line 310 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel();
                List<IndexPath> sourcePaths = new List<IndexPath>();

                Log.Comment("Setting the source");
                selectionModel.Source = CreateNestedData(3 /* levels */ , 2 /* groupsAtLevel */, 4 /* countAtLeaf */);
                if (handleChildrenRequested)
                {
                    selectionModel.ChildrenRequested += (SelectionModel sender, SelectionModelChildrenRequestedEventArgs args) =>
                    {
                        Log.Comment("ChildrenRequestedIndexPath:" + args.SourceIndex);
                        sourcePaths.Add(args.SourceIndex);
                        args.Children = args.Source is IEnumerable ? args.Source : null;
                    };
                }

                var startPath = Path(1, 0, 1, 0);
                Select(selectionModel, startPath, true);
                ValidateSelection(selectionModel,
                    new List<IndexPath>() { startPath },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1),
                        Path(1, 0),
                        Path(1, 0, 1)
                    });

                var endPath = Path(1, 1, 1, 0);
                SelectRangeFromAnchor(selectionModel, endPath, true /* select */);

                if (handleChildrenRequested)
                {
                    // Validate SourceIndices.
                    var expectedSourceIndices = new List<IndexPath>()
                    {
                        Path(1),
                        Path(1, 0),
                        Path(1, 0, 1),
                        Path(1, 1),
                        Path(1, 0, 1, 3),
                        Path(1, 0, 1, 2),
                        Path(1, 0, 1, 1),
                        Path(1, 0, 1, 0),
                        Path(1, 1, 1),
                        Path(1, 1, 0),
                        Path(1, 1, 0, 3),
                        Path(1, 1, 0, 2),
                        Path(1, 1, 0, 1),
                        Path(1, 1, 0, 0),
                        Path(1, 1, 1, 0)
                    };

                    Verify.AreEqual(expectedSourceIndices.Count, sourcePaths.Count);
                    for (int i = 0; i < expectedSourceIndices.Count; i++)
                    {
                        Verify.IsTrue(AreEqual(expectedSourceIndices[i], sourcePaths[i]));
                    }
                }

                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(1, 0, 1, 0),
                        Path(1, 0, 1, 1),
                        Path(1, 0, 1, 2),
                        Path(1, 0, 1, 3),
                        Path(1, 0, 1),
                        Path(1, 1, 0, 0),
                        Path(1, 1, 0, 1),
                        Path(1, 1, 0, 2),
                        Path(1, 1, 0, 3),
                        Path(1, 1, 0),
                        Path(1, 1, 1, 0),
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1),
                        Path(1, 0),
                        Path(1, 1),
                        Path(1, 1, 1),
                    },
                    2 /* selectedInnerNodes */);

                ClearSelection(selectionModel);
                ValidateSelection(selectionModel, new List<IndexPath>() { });

                startPath = Path(0, 1, 0, 2);
                SetAnchorIndex(selectionModel, startPath);
                endPath = Path(0, 0, 0, 2);
                SelectRangeFromAnchor(selectionModel, endPath, true /* select */);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                         Path(0, 0, 0, 2),
                         Path(0, 0, 0, 3),
                         Path(0, 0, 1, 0),
                         Path(0, 0, 1, 1),
                         Path(0, 0, 1, 2),
                         Path(0, 0, 1, 3),
                         Path(0, 0, 1),
                         Path(0, 1, 0, 0),
                         Path(0, 1, 0, 1),
                         Path(0, 1, 0, 2),
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(0),
                        Path(0, 0),
                        Path(0, 0, 0),
                        Path(0, 1),
                        Path(0, 1, 0),
                    },
                    1 /* selectedInnerNodes */);

                startPath = Path(0, 1, 0, 2);
                SetAnchorIndex(selectionModel, startPath);
                endPath = Path(0, 0, 0, 2);
                SelectRangeFromAnchor(selectionModel, endPath, false /* select */);
                ValidateSelection(selectionModel, new List<IndexPath>() { });
            });
        }

void ValidateNestedMultipleSelection ( ) [inline]

Definition at line 304 of file SelectionModelTests.cs.

        {
            ValidateNestedMultipleSelection(true /* handleChildrenRequested */);
            ValidateNestedMultipleSelection(false /* handleChildrenRequested */);
        }

void ValidateNestedSingleSelection ( ) [inline]

Definition at line 267 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
                Log.Comment("Setting the source");
                selectionModel.Source = CreateNestedData(3 /* levels */ , 2 /* groupsAtLevel */, 2 /* countAtLeaf */);
                var path = Path(1, 0, 1, 1);
                Select(selectionModel, path, true);
                ValidateSelection(selectionModel,
                    new List<IndexPath>() { path },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1),
                        Path(1, 0),
                        Path(1, 0, 1),
                    });
                Select(selectionModel, Path(0, 0, 1, 0), true);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(0, 0, 1, 0)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(0),
                        Path(0, 0),
                        Path(0, 0, 1)
                    });
                Select(selectionModel, Path(0, 0, 1, 0), false);
                ValidateSelection(selectionModel, new List<IndexPath>() { });
            });
        }

void ValidateOneLevelMultipleSelection ( ) [inline]

Definition at line 129 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel();
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                Select(selectionModel, 4, true);
                ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
                SelectRangeFromAnchor(selectionModel, 8, true /* select */);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(4),
                        Path(5),
                        Path(6),
                        Path(7),
                        Path(8)
                    },
                    new List<IndexPath>() { Path() });

                ClearSelection(selectionModel);
                SetAnchorIndex(selectionModel, 6);
                SelectRangeFromAnchor(selectionModel, 3, true /* select */);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(4),
                        Path(5),
                        Path(6)
                    },
                    new List<IndexPath>() { Path() });

                SetAnchorIndex(selectionModel, 4);
                SelectRangeFromAnchor(selectionModel, 5, false /* select */);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(6)
                    },
                    new List<IndexPath>() { Path() });
            });
        }

void ValidateOneLevelSingleSelection ( ) [inline]

Definition at line 39 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
                Log.Comment("Set the source to 10 items");
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                // Check index selection
                Select(selectionModel, 3, true);
                ValidateSelection(selectionModel, new List<IndexPath>() { Path(3) }, new List<IndexPath>() { Path() });
                Select(selectionModel, 3, false);
                ValidateSelection(selectionModel, new List<IndexPath>() { });

                // Check index path selection
                Select(selectionModel, Path(4), true);
                ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
                Select(selectionModel, Path(4), false);
                ValidateSelection(selectionModel, new List<IndexPath>() { });
            });
        }

void ValidateOneLevelSingleSelectionNoSource ( ) [inline]

Definition at line 25 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
                Log.Comment("No source set.");
                Select(selectionModel, 4, true);
                ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) });
                Select(selectionModel, 4, false);
                ValidateSelection(selectionModel, new List<IndexPath>() { });
            });
        }

void ValidatePropertyChangedEventIsRaised ( ) [inline]

Definition at line 876 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var selectionModel = new SelectionModel();
                Log.Comment("Set the source to 10 items");
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                bool selectedIndexChanged = false;
                bool selectedIndicesChanged = false;
                bool SelectedItemChanged = false;
                bool SelectedItemsChanged = false;
                bool AnchorIndexChanged = false;
                selectionModel.PropertyChanged += (sender, args) =>
                {
                    switch (args.PropertyName)
                    {
                        case "SelectedIndex":
                            selectedIndexChanged = true;
                            break;
                        case "SelectedIndices":
                            selectedIndicesChanged = true;
                            break;
                        case "SelectedItem":
                            SelectedItemChanged = true;
                            break;
                        case "SelectedItems":
                            SelectedItemsChanged = true;
                            break;
                        case "AnchorIndex":
                            AnchorIndexChanged = true;
                            break;

                        default:
                            throw new InvalidOperationException();
                    }
                };

                Select(selectionModel, 3, true);

                Verify.IsTrue(selectedIndexChanged);
                Verify.IsTrue(selectedIndicesChanged);
                Verify.IsTrue(SelectedItemChanged);
                Verify.IsTrue(SelectedItemsChanged);
                Verify.IsTrue(AnchorIndexChanged);
            });
        }

void ValidateRemoves ( ) [inline]

Definition at line 562 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
                var selectionModel = new SelectionModel();
                selectionModel.Source = data;

                selectionModel.Select(6);
                selectionModel.Select(7);
                selectionModel.Select(8);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(6),
                        Path(7),
                        Path(8)
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });

                Log.Comment("Remove before selected range: Removing item at index 0");
                data.RemoveAt(0);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(5),
                        Path(6),
                        Path(7)
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });

                Log.Comment("Remove from before to middle of selected range: Removing items at index 3, 4, 5");
                data.RemoveAt(3);
                data.RemoveAt(3);
                data.RemoveAt(3);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(4)
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });

                Log.Comment("Remove after selected range: Removing item at index 5");
                data.RemoveAt(5);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(3),
                        Path(4)
                    },
                    new List<IndexPath>()
                    {
                        Path()
                    });
            });
        }

void ValidateSelection | ( | SelectionModel | selectionModel,
 |  | List< IndexPath > | expectedSelected,
 |  | List< IndexPath > | expectedPartialSelected = null,
 |  | int | selectedInnerNodes = 0 |
 | ) |  |  | [inline, private]

Definition at line 1304 of file SelectionModelTests.cs.

        {
            Log.Comment("Validating Selection...");

            Log.Comment("Selection contains indices:");
            foreach (var index in selectionModel.SelectedIndices)
            {
                Log.Comment(" " + index.ToString());
            }

            Log.Comment("Selection contains items:");
            foreach (var item in selectionModel.SelectedItems)
            {
                Log.Comment(" " + item.ToString());
            }

            if (selectionModel.Source != null)
            {
                List<IndexPath> allIndices = GetIndexPathsInSource(selectionModel.Source);
                foreach (var index in allIndices)
                {
                    bool? isSelected = selectionModel.IsSelectedAt(index);
                    if (Contains(expectedSelected, index))
                    {
                        Verify.IsTrue(isSelected.Value, index + " is Selected");
                    }
                    else if (expectedPartialSelected != null && Contains(expectedPartialSelected, index))
                    {
                        Verify.IsNull(isSelected, index + " is partially Selected");
                    }
                    else
                    {
                        if (isSelected == null)
                        {
                            Log.Comment("*************" + index + " is null");
                            Verify.Fail("Expected false but got null");
                        }
                        else
                        {
                            Verify.IsFalse(isSelected.Value, index + " is not Selected");
                        }
                    }
                }
            }
            else
            {
                foreach (var index in expectedSelected)
                {
                    Verify.IsTrue(selectionModel.IsSelectedAt(index).Value, index + " is Selected");
                }
            }
            if (expectedSelected.Count > 0)
            {
                Log.Comment("SelectedIndex is " + selectionModel.SelectedIndex);
                Verify.AreEqual(0, selectionModel.SelectedIndex.CompareTo(expectedSelected[0]));
                if (selectionModel.Source != null)
                {
                    Verify.AreEqual(selectionModel.SelectedItem, GetData(selectionModel, expectedSelected[0]));
                }

                int itemsCount = selectionModel.SelectedItems.Count();
                Verify.AreEqual(selectionModel.Source != null ? expectedSelected.Count - selectedInnerNodes : 0, itemsCount);
                int indicesCount = selectionModel.SelectedIndices.Count();
                Verify.AreEqual(expectedSelected.Count - selectedInnerNodes, indicesCount);
            }

            Log.Comment("Validating Selection... done");
        }

void ValidateSelectionChangedEventMultipleSelection ( ) [inline]

Definition at line 95 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel();
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                int selectionChangedFiredCount = 0;
                selectionModel.SelectionChanged += delegate (SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
                {
                    selectionChangedFiredCount++;

                    // Verify SelectionChanged was raised after selection state was changed in the SelectionModel
                    ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
                };

                Select(selectionModel, 4, true);
                Verify.AreEqual(1, selectionChangedFiredCount);
            });
        }

void ValidateSelectionChangedEventSingleSelection ( ) [inline]

Definition at line 62 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                bool select = true;
                int selectionChangedFiredCount = 0;
                selectionModel.SelectionChanged += delegate (SelectionModel sender, SelectionModelSelectionChangedEventArgs args) {
                    selectionChangedFiredCount++;

                    // Verify SelectionChanged was raised after selection state was changed in the SelectionModel
                    if (select)
                    {
                        ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
                    }
                    else
                    {
                        ValidateSelection(selectionModel, new List<IndexPath>() { });
                    }
                };

                Select(selectionModel, Path(4), select);
                Verify.AreEqual(1, selectionChangedFiredCount);

                select = false;
                Select(selectionModel, Path(4), select);
                Verify.AreEqual(2, selectionChangedFiredCount);
            });
        }

void ValidateSelectionModeChangeFromMultipleToSingle ( ) [inline]

Definition at line 1129 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel();
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                // First test: switching from multiple to single selection mode with just one selected item
                selectionModel.Select(4);

                selectionModel.SingleSelect = true;

                // Verify that the item at index 4 is still selected
                Verify.IsTrue(selectionModel.SelectedIndex.CompareTo(Path(4)) == 0, "Item at index 4 should have still been selected");

                // Second test: this time switching from multiple to single selection mode with more than one selected item
                selectionModel.SingleSelect = false;
                selectionModel.Select(5);
                selectionModel.Select(6);

                // Now switch to single selection mode
                selectionModel.SingleSelect = true;

                // Verify that
                // - only one item is currently selected
                // - the currently selected item is the item with the lowest index in the Multiple selection list
                Verify.AreEqual(1, selectionModel.SelectedIndices.Count,
                    "Exactly one item should have been selected now after we switched from Multiple to Single selection mode");
                Verify.IsTrue(selectionModel.SelectedIndices[0].CompareTo(selectionModel.SelectedIndex) == 0,
                    "SelectedIndex and SelectedIndices should have been identical");
                Verify.IsTrue(selectionModel.SelectedIndex.CompareTo(Path(4)) == 0, "The currently selected item should have been the first item in the Multiple selection list");
            });
        }

void ValidateSelectionModeChangeFromMultipleToSingleSelectionChangedEvent ( ) [inline]

Definition at line 1164 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel();
                selectionModel.Source = Enumerable.Range(0, 10).ToList();

                // First test: switching from multiple to single selection mode with just one selected item
                selectionModel.Select(4);

                int selectionChangedFiredCount = 0;
                selectionModel.SelectionChanged += IncreaseCountIfRaisedSelectionChanged;

                // Now switch to single selection mode
                selectionModel.SingleSelect = true;

                // Verify that no SelectionChanged event was raised
                Verify.AreEqual(0, selectionChangedFiredCount, "SelectionChanged event should have not been raised as only one item was selected");

                // Second test: this time switching from multiple to single selection mode with more than one selected item
                selectionModel.SelectionChanged -= IncreaseCountIfRaisedSelectionChanged;
                selectionModel.SingleSelect = false;
                selectionModel.Select(5);
                selectionModel.SelectionChanged += IncreaseCountIfRaisedSelectionChanged;

                // Now switch to single selection mode
                selectionModel.SingleSelect = true;

                // Verify that the SelectionChanged event was raised
                Verify.AreEqual(1, selectionChangedFiredCount, "SelectionChanged event should have been raised as the selection changed");

                void IncreaseCountIfRaisedSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
                {
                    selectionChangedFiredCount++;
                }
            });
        }

void ValidateTwoLevelMultipleSelection ( ) [inline]

Definition at line 192 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel();
                Log.Comment("Setting the source");
                selectionModel.Source = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);

                Select(selectionModel, 1, 2, true);
                ValidateSelection(selectionModel, new List<IndexPath>() { Path(1, 2) }, new List<IndexPath>() { Path(), Path(1) });
                SelectRangeFromAnchor(selectionModel, 2, 2, true /* select */);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(1, 2),
                        Path(2), // Inner node should be selected since everything 2.* is selected
                        Path(2, 0),
                        Path(2, 1),
                        Path(2, 2)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1)
                    },
                    1 /* selectedInnerNodes */);

                ClearSelection(selectionModel);
                SetAnchorIndex(selectionModel, 2, 1);
                SelectRangeFromAnchor(selectionModel, 0, 1, true /* select */);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(0, 1),
                        Path(0, 2),
                        Path(1, 0),
                        Path(1, 1),
                        Path(1, 2),
                        Path(1),
                        Path(2, 0),
                        Path(2, 1)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(0),
                        Path(2),
                    },
                    1 /* selectedInnerNodes */);

                SetAnchorIndex(selectionModel, 1, 1);
                SelectRangeFromAnchor(selectionModel, 2, 0, false /* select */);
                ValidateSelection(selectionModel,
                    new List<IndexPath>()
                    {
                        Path(0, 1),
                        Path(0, 2),
                        Path(1, 0),
                        Path(2, 1)
                    },
                    new List<IndexPath>()
                    {
                        Path(),
                        Path(1),
                        Path(0),
                        Path(2),
                    },
                    0 /* selectedInnerNodes */);

                ClearSelection(selectionModel);
                ValidateSelection(selectionModel, new List<IndexPath>() { });
            });
        }

void ValidateTwoLevelSingleSelection ( ) [inline]

Definition at line 176 of file SelectionModelTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectionModel selectionModel = new SelectionModel();
                Log.Comment("Setting the source");
                selectionModel.Source = CreateNestedData(1 /* levels */ , 2 /* groupsAtLevel */, 2 /* countAtLeaf */);
                Select(selectionModel, 1, 1, true);
                ValidateSelection(selectionModel,
                    new List<IndexPath>() { Path(1, 1) }, new List<IndexPath>() { Path(), Path(1) });
                Select(selectionModel, 1, 1, false);
                ValidateSelection(selectionModel, new List<IndexPath>() { });
            });
        }

Member Data Documentation

int _nextData = 0 [static, private]

Definition at line 1504 of file SelectionModelTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/SelectionModelTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModelTests::TreeWalkNodeInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • SelectionModelTests
  • SelectionModelTests::TreeWalkNodeInfo
Properties

SelectionModelTests::TreeWalkNodeInfo Struct Reference

List of all members.

Properties

object | Current [get, set]
IndexPath | Path [get, set]

Detailed Description

Definition at line 1505 of file SelectionModelTests.cs.

Property Documentation

object Current [get, set]

Definition at line 1507 of file SelectionModelTests.cs.

IndexPath Path [get, set]

Definition at line 1509 of file SelectionModelTests.cs.

The documentation for this struct was generated from the following file:
  • Repeater/APITests/SelectionModelTests.cs
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewManagerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ViewManagerTests
Public Member Functions | Private Member Functions | Private Attributes

ViewManagerTests Class Reference

List of all members.

Public Member Functions

void | CanChangeFocusAfterUniqueIdReset ()
void | CanPinFocusedElements ()
void | CanQueryElementFactory ()
void | CanReuseElementsDuringUniqueIdReset ()
void | ValidateBringIntoViewOperations ()
void | ValidateDataContextDoesNotGetOverwritten ()
void | ValidateDataContextGetsPropagated ()
void | ValidateElementClearingClearsDataContext ()
void | ValidateElementClearingOrderFromFlowLayout ()
void | ValidateElementEvents ()
void | ValidateElementIndexChangedEventOnStableReset ()
void | ValidateFocusMoveOnElementCleared ()
void | ValidateFocusMoveOnElementClearedWithUniqueIds ()
void | ValidateGetElementAtCachingForLayout ()

Private Member Functions

VirtualizingLayout | CreateLayout (ItemsRepeater repeater)
ItemsRepeater | CreateRepeater (object dataSource, object elementFactory)
string | LogRealizedIndices (List< int > realizedItemsIndices, int ticks)
void | MoveFocusToIndex (ItemsRepeater repeater, int index)
ItemsRepeater | SetupRepeater (object dataSource=null, string itemContent=@"<Button Content='{Binding}' Height='100'/>")
ItemsRepeater | SetupRepeater (object dataSource, VirtualizingLayout layout, string itemContent, out ScrollViewer scrollViewer)
ItemsRepeater | SetupRepeater (object dataSource, VirtualizingLayout layout, out ScrollViewer scrollViewer)
void | StartBringIndexIntoView (ItemsRepeater itemsRepeater, int index)
void | ValidateBringIntoViewOperations (double cacheLengths)
void | ValidateCurrentFocus (ItemsRepeater repeater, int expectedIndex, string expectedContent)

Private Attributes

int | DefaultWaitTime = <DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>"</DataTemplate>" 2000

Detailed Description

Definition at line 27 of file ViewManagerTests.cs.

Member Function Documentation

void CanChangeFocusAfterUniqueIdReset ( ) [inline]

Definition at line 245 of file ViewManagerTests.cs.

        {
            var data = new WinRTCollection(Enumerable.Range(0, 2).Select(i => string.Format("Item #{0}", i)));
            object dataSource = null;
            RunOnUIThread.Execute(() => dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: true));
            ItemsRepeater repeater = SetupRepeater(dataSource);
            Control focusedElement = null;

            RunOnUIThread.Execute(() =>
            {
                focusedElement = (Control)repeater.TryGetElement(0);
                focusedElement.Focus(FocusState.Keyboard);
            });

            IdleSynchronizer.Wait();
            RunOnUIThread.Execute(() =>
            {
                data.Reset();
            });

            IdleSynchronizer.Wait();
            RunOnUIThread.Execute(() =>
            {
                // Still focused.
                Verify.AreEqual(focusedElement, FocusManager.GetFocusedElement(repeater.XamlRoot));

                // Change focused element.
                focusedElement = (Control)repeater.TryGetElement(1);
                focusedElement.Focus(FocusState.Keyboard);
            });

            IdleSynchronizer.Wait();
            RunOnUIThread.Execute(() =>
            {
                // Focus is on the new element.
                Verify.AreEqual(focusedElement, FocusManager.GetFocusedElement(repeater.XamlRoot));
            });
        }

void CanPinFocusedElements ( ) [inline]

Definition at line 75 of file ViewManagerTests.cs.

        {
            // Setup a grouped repeater scenario with two groups each containing two items.
            var data = new ObservableCollection<ObservableCollection<string>>(Enumerable
                .Range(0, 2)
                .Select(i => new ObservableCollection<string>(Enumerable
                    .Range(0, 2)
                    .Select(j => string.Format("Item #{0}.{1}", i, j)))));
            List<ContentControl>[] itemElements = null;
            ItemsRepeater[] innerRepeaters = null;
            List<StackPanel> groupElements = null;
            ItemsRepeater rootRepeater = null;
            var gotFocus = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                itemElements = new[] {
                    Enumerable.Range(0, 2).Select(i => new ContentControl()).ToList(),
                    Enumerable.Range(0, 2).Select(i => new ContentControl()).ToList()
                };

                itemElements[0][0].GotFocus += delegate { gotFocus.Set(); };

                innerRepeaters = Enumerable.Range(0, 2).Select(i => CreateRepeater(
                    MockItemsSource.CreateDataSource(data[i], supportsUniqueIds: false),
                    MockElementFactory.CreateElementFactory(itemElements[i]))).ToArray();

                groupElements = Enumerable.Range(0, 2).Select(i =>
                {
                    var panel = new StackPanel();
                    panel.Children.Add(new ContentControl());
                    panel.Children.Add(innerRepeaters[i]);
                    return panel;
                }).ToList();

                rootRepeater = CreateRepeater(
                   MockItemsSource.CreateDataSource(data, supportsUniqueIds: false),
                   MockElementFactory.CreateElementFactory(groupElements));
                Content = rootRepeater;
                rootRepeater.UpdateLayout();

                itemElements[0][0].Focus(FocusState.Keyboard);
            });

            Verify.IsTrue(gotFocus.WaitOne(DefaultWaitTimeInMS), "Waiting for focus event on the first element of the first group.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Recycle focused element 0.0 and validate it's still realized because it is pinned.");
                {
                    var ctx = (VirtualizingLayoutContext)innerRepeaters[0].Tag;
                    ctx.RecycleElement(itemElements[0][0]);
                    Verify.AreEqual(0, innerRepeaters[0].GetElementIndex(itemElements[0][0]));
                }

                Log.Comment("Recycle element 0.1 and validate it's no longer realized because it is not pinned.");
                {
                    var ctx = (VirtualizingLayoutContext)innerRepeaters[0].Tag;
                    ctx.RecycleElement(itemElements[0][1]);
                    Verify.AreEqual(-1, innerRepeaters[0].GetElementIndex(itemElements[0][1]));
                }

                Log.Comment("Recycle group 0 and validate it's still realized because one of its items is pinned.");
                {
                    var ctx = (VirtualizingLayoutContext)rootRepeater.Tag;
                    ctx.RecycleElement(groupElements[0]);
                    Verify.AreEqual(0, rootRepeater.GetElementIndex(groupElements[0]));
                }

                itemElements[1][1].GotFocus += delegate { gotFocus.Set(); };
                itemElements[1][1].Focus(FocusState.Keyboard);
            });

            Verify.IsTrue(gotFocus.WaitOne(DefaultWaitTimeInMS), "Waiting for focus event on the second element of the second group.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment(@"Move focus to item 1.1 and validate item 0.0 and group 0 are recycled because
                 the only thing keeping them around is the fact that item 0.0 was focus pinned");
                {
                    ((VirtualizingLayoutContext)rootRepeater.Tag).RecycleElement(groupElements[0]);
                    ((VirtualizingLayoutContext)innerRepeaters[0].Tag).RecycleElement(itemElements[0][0]);

                    Verify.AreEqual(-1, rootRepeater.GetElementIndex(groupElements[0]));
                    Verify.AreEqual(-1, innerRepeaters[0].GetElementIndex(itemElements[0][0]));
                    Verify.AreEqual(1, innerRepeaters[0].GetElementIndex(itemElements[1][1]));
                }

                Log.Comment(@"Delete item 1.1 from the data. This will force the element to get recycled even if it's pinned.");
                {
                    data[1].RemoveAt(1);
                    rootRepeater.UpdateLayout();

                    Verify.AreEqual(-1, innerRepeaters[1].GetElementIndex(itemElements[1][1]));
                }
            });
        }

void CanQueryElementFactory ( ) [inline]

Definition at line 30 of file ViewManagerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var data = new ObservableCollection<string>();
                var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);
                var elementFactory = MockElementFactory.CreateElementFactory(new List<UIElement> { new ContentControl() });
                var repeater = CreateRepeater(dataSource, elementFactory);

                Content = repeater;
                repeater.UpdateLayout();

                // Our layout will query the size though once for every layout pass.
                // The first layout pass is a bit special because we don't have a viewport and
                // we will invalidate measure when we get one after the first arrange pass.
                dataSource.ValidateGetSizeCalls(1); // GetSize calls are cached by ItemsSourceView.
                elementFactory.ValidateRecycleElementCalls();

                data.Add("Item #1");
                repeater.UpdateLayout();

                var item1 = (UIElement)VisualTreeHelper.GetChild(repeater, 0);

                // One GetSize invocation from the layout, another one from the view manager.
                dataSource.ValidateGetSizeCalls(2); // GetSize calls are cached by ItemsSourceView
                dataSource.ValidateGetAtCalls(new MockItemsSource.GetAtCallInfo(0));
                elementFactory.ValidateGetElementCalls(new MockElementFactory.GetElementCallInfo(0, repeater));
                elementFactory.ValidateRecycleElementCalls();
                Verify.AreEqual(item1, repeater.TryGetElement(0));

                data.RemoveAt(0);
                repeater.UpdateLayout();

                dataSource.ValidateGetAtCalls();
                dataSource.ValidateGetSizeCalls(1); // GetSize calls are cached by ItemsSourceView
                // Whenever we get an element from the view generator, we call HasKeyIndexMapping to see if we should
                // store its unique id or not.
                dataSource.ValidateGetItemIdCalls();
                elementFactory.ValidateGetElementCalls();
                elementFactory.ValidateRecycleElementCalls(new MockElementFactory.RecycleElementCallInfo(item1, repeater));
            });
        }

void CanReuseElementsDuringUniqueIdReset ( ) [inline]

Definition at line 177 of file ViewManagerTests.cs.

        {
            var data = new WinRTCollection(Enumerable.Range(0, 2).Select(i => string.Format("Item #{0}", i)));
            List<UIElement> mapping = null;
            ItemsRepeater repeater = null;
            MockElementFactory elementFactory = null;
            ContentControl focusedElement = null;

            RunOnUIThread.Execute(() =>
            {
                mapping = new List<UIElement> { new ContentControl(), new ContentControl() };
                repeater = CreateRepeater(
                    MockItemsSource.CreateDataSource(data, supportsUniqueIds: true),
                    MockElementFactory.CreateElementFactory(mapping));
                elementFactory = (MockElementFactory)repeater.ItemTemplate;

                Content = repeater;
                repeater.UpdateLayout();

                focusedElement = (ContentControl)repeater.TryGetElement(1);
                focusedElement.Focus(FocusState.Keyboard);
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                elementFactory.ValidateGetElementCalls(
                new MockElementFactory.GetElementCallInfo(0, repeater),
                new MockElementFactory.GetElementCallInfo(1, repeater));
                elementFactory.ValidateRecycleElementCalls();

                data.ResetWith(new[] { data[0], "New item" });

                Verify.AreEqual(0, repeater.GetElementIndex(mapping[0]));
                Verify.AreEqual(1, repeater.GetElementIndex(mapping[1]));
                Verify.IsNull(repeater.TryGetElement(0));
                Verify.IsNull(repeater.TryGetElement(1));

                elementFactory.ValidateGetElementCalls(/* GetElement should not be called */);
                elementFactory.ValidateRecycleElementCalls(/* RecycleElement should not be called */);

                mapping[1] = new ContentControl(); // For "New Item"

                repeater.UpdateLayout();

                Verify.AreEqual(0, repeater.GetElementIndex(mapping[0]));
                Verify.AreEqual(1, repeater.GetElementIndex(mapping[1]));
                Verify.AreEqual(mapping[0], repeater.TryGetElement(0));
                Verify.AreEqual(mapping[1], repeater.TryGetElement(1));

                elementFactory.ValidateGetElementCalls(
                    new MockElementFactory.GetElementCallInfo(1, repeater));
                elementFactory.ValidateRecycleElementCalls(
                    new MockElementFactory.RecycleElementCallInfo(focusedElement, repeater));

                // If the focused element survived the reset, we will keep focus on it. If not, we
                // try to find one based on the index. In this case, the focused element (index 1)
                // got recycled, and we still have index 1 after the stable reset, so the new index 1
                // will get focused. Note that recycling the elements to view generator in the case of
                // stable reset happens during the arrange, so by that time we will have pulled elements
                // from the stable reset pool and maybe created some new elements as well.
                int index = repeater.GetElementIndex(focusedElement);
                Log.Comment("focused index " + index);
                Verify.AreEqual(mapping[1], FocusManager.GetFocusedElement(repeater.XamlRoot));
            });
        }

VirtualizingLayout CreateLayout ( ItemsRepeater repeater ) [inline, private]

Definition at line 892 of file ViewManagerTests.cs.

        {
            var layout = new MockVirtualizingLayout();
            var children = new List<UIElement>();

            layout.MeasureLayoutFunc = (availableSize, context) =>
            {
                repeater.Tag = repeater.Tag ?? context;
                children.Clear();
                var itemCount = context.ItemCount;

                for (int i = 0; i < itemCount; ++i)
                {
                    var element = context.GetOrCreateElementAt(i);
                    element.Measure(availableSize);
                    children.Add(element);
                }

                return new Size(10, 10);
            };

            return layout;
        }

ItemsRepeater CreateRepeater | ( | object | dataSource,
 |  | object | elementFactory |
 | ) |  |  | [inline, private]

Definition at line 881 of file ViewManagerTests.cs.

        {
            var repeater = new ItemsRepeater
            {
                ItemsSource = dataSource,
                ItemTemplate = elementFactory
            };
            repeater.Layout = CreateLayout(repeater);
            return repeater;
        }

string LogRealizedIndices | ( | List< int > | realizedItemsIndices,
 |  | int | ticks |
 | ) |  |  | [inline, private]

Definition at line 381 of file ViewManagerTests.cs.

        {
            string strRealizedItemsIndices = null;

            do
            {
                RunOnUIThread.Execute(() =>
                {
                    strRealizedItemsIndices = string.Empty;

                    foreach (int i in realizedItemsIndices)
                    {
                        strRealizedItemsIndices += " " + i;
                    }

                    Log.Comment("Realized indices:" + strRealizedItemsIndices);
                });

                ticks--;
                CompositionPropertySpy.SynchronouslyTickUIThread(1);
            }
            while (ticks >= 0);

            return strRealizedItemsIndices;
        }

void MoveFocusToIndex | ( | ItemsRepeater | repeater,
 |  | int | index |
 | ) |  |  | [inline, private]

Definition at line 865 of file ViewManagerTests.cs.

        {
            var element = repeater.TryGetElement(index) as Control;
            element.Focus(FocusState.Programmatic);
        }

ItemsRepeater SetupRepeater | ( | object | dataSource,
 |  | VirtualizingLayout | layout,
 |  | out ScrollViewer | scrollViewer |
 | ) |  |  | [inline, private]

Definition at line 924 of file ViewManagerTests.cs.

        {
            return SetupRepeater( dataSource, layout, @"<Button Content='{Binding}' Height='100'/>", out scrollViewer);
        }

ItemsRepeater SetupRepeater | ( | object | dataSource = null,
 |  | string | itemContent = @"<Button Content='{Binding}' Height='100'/>" |
 | ) |  |  | [inline, private]

Definition at line 916 of file ViewManagerTests.cs.

                                                                                {Binding}' Height='100'/>")
        {
            VirtualizingLayout layout = null;
            RunOnUIThread.Execute(() => layout = new StackLayout());
            ScrollViewer scrollViewer = null;
            return SetupRepeater(dataSource, layout, itemContent, out scrollViewer);
        }

ItemsRepeater SetupRepeater | ( | object | dataSource,
 |  | VirtualizingLayout | layout,
 |  | string | itemContent,
 |  | out ScrollViewer | scrollViewer |
 | ) |  |  | [inline, private]

Definition at line 929 of file ViewManagerTests.cs.

        {
            ItemsRepeater itemsRepeater = null;
            ScrollViewer sv = null;
            RunOnUIThread.Execute(() =>
            {
                var elementFactory = new RecyclingElementFactory();
                elementFactory.RecyclePool = new RecyclePool();
                elementFactory.Templates["Item"] = XamlReader.Load(@"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>" + itemContent + @"</DataTemplate>") as DataTemplate;

                itemsRepeater = new ItemsRepeater()
                {
                    ItemsSource = dataSource,
                    ItemTemplate = elementFactory,
                    Layout = layout,
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                sv = new ScrollViewer
                {
                    Content = itemsRepeater
                };

                Content = new ItemsRepeaterScrollHost()
                {
                    Width = 200,
                    Height = 200,
                    ScrollViewer = sv
                };
            });

            IdleSynchronizer.Wait();
            scrollViewer = sv;
            return itemsRepeater;
        }

void StartBringIndexIntoView | ( | ItemsRepeater | itemsRepeater,
 |  | int | index |
 | ) |  |  | [inline, private]

Definition at line 362 of file ViewManagerTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                Log.Comment("\r\nItemsRepeater.GetOrCreateElement(" + index + ")");
                var item = itemsRepeater.GetOrCreateElement(index);

                // Make sure the newly created item is measured so that its size is
                // identified and can be used to bring it entirely into view.
                Log.Comment("UIElement.UpdateLayout()");
                item.UpdateLayout();

                Log.Comment("UIElement.StartBringIntoView()");
                item.StartBringIntoView();
            });

            IdleSynchronizer.Wait();
        }

void ValidateBringIntoViewOperations ( ) [inline]

Definition at line 286 of file ViewManagerTests.cs.

        {
            ValidateBringIntoViewOperations(0.0 /*cacheLengths*/);
            ValidateBringIntoViewOperations(2.0 /*cacheLengths*/);
        }

void ValidateBringIntoViewOperations ( double cacheLengths ) [inline, private]

Definition at line 292 of file ViewManagerTests.cs.

        {
            Log.Comment("\r\nValidateBringIntoViewOperations cacheLengths: " + cacheLengths);

            string strRealizedItemsIndices = null;
            List<int> realizedItemsIndices = null;
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 200).ToList()));

            ItemsRepeater itemsRepeater = SetupRepeater(dataSource: null, itemContent: @"<TextBlock Text='{Binding}' Height='24'/>");

            RunOnUIThread.Execute(() =>
            {
                realizedItemsIndices = new List<int>();

                itemsRepeater.ElementPrepared += (sender, args) =>
                {
                    realizedItemsIndices.Add(args.Index);
                };

                itemsRepeater.ElementClearing += (sender, args) =>
                {
                    int index = sender.GetElementIndex(args.Element);
                    realizedItemsIndices.Remove(index);
                };

                itemsRepeater.HorizontalCacheLength = cacheLengths;
                itemsRepeater.VerticalCacheLength = cacheLengths;
                itemsRepeater.ItemsSource = dataSource;
            });

            // The viewport size being 200px and realization window increase being 40px per measure pass,
            // make sure there are 2.5 x cacheLengths passes to land on the final realized items.
            // cacheLengths: number of viewports constituting the pre-fetch buffer, once completely built.
            //               Half of it is before the current viewport, and half after.
            // viewport: 200px
            // cacheIncrement: 40px (buffer increment per measure pass on each side)
            // Measure passes needed to fill the pre-fetch buffer: viewport / cacheIncrement / 2 x cacheLengths = 2.5 x cacheLengths

            IdleSynchronizer.Wait();
            strRealizedItemsIndices = LogRealizedIndices(realizedItemsIndices, (int)(2.5 * cacheLengths + 1));
            Verify.AreEqual(
                cacheLengths == 0 ? " 0 1 2 3 4 5 6 7 8 9" : " 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17",
                strRealizedItemsIndices);

            StartBringIndexIntoView(itemsRepeater, index: 99);
            strRealizedItemsIndices = LogRealizedIndices(realizedItemsIndices, (int)(2.5 * cacheLengths + 1));
            Verify.AreEqual(
                cacheLengths == 0 ? " 99 100 98 97 96 95 94 93 92 91 90" : " 99 100 101 102 103 104 105 106 107 108 109 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82",
                strRealizedItemsIndices);

            StartBringIndexIntoView(itemsRepeater, index: 199);
            strRealizedItemsIndices = LogRealizedIndices(realizedItemsIndices, (int)(2.5 * cacheLengths + 1));
            Verify.AreEqual(
                cacheLengths == 0 ? " 199 198 197 196 195 194 193 192 191 190" : " 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182",
                strRealizedItemsIndices);

            StartBringIndexIntoView(itemsRepeater, index: 49);
            strRealizedItemsIndices = LogRealizedIndices(realizedItemsIndices, (int)(2.5 * cacheLengths + 1));
            Verify.AreEqual(
                cacheLengths == 0 ? " 49 50 51 52 53 54 55 56 57 58 48" : " 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 48 47 46 45 44 43 42 41 40 39",
                strRealizedItemsIndices);

            StartBringIndexIntoView(itemsRepeater, index: 0);
            strRealizedItemsIndices = LogRealizedIndices(realizedItemsIndices, (int)(2.5 * cacheLengths + 1));
            Verify.AreEqual(
                cacheLengths == 0 ? " 0 1 2 3 4 5 6 7 8 9" : " 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17",
                strRealizedItemsIndices);
        }

void ValidateCurrentFocus | ( | ItemsRepeater | repeater,
 |  | int | expectedIndex,
 |  | string | expectedContent |
 | ) |  |  | [inline, private]

Definition at line 871 of file ViewManagerTests.cs.

        {
            var currentFocus = FocusManager.GetFocusedElement(repeater.XamlRoot) as ContentControl;
            var currentFocusedIndex = repeater.GetElementIndex(currentFocus);
            Log.Comment("expectedIndex: " + expectedIndex + " actual : " + currentFocusedIndex);
            Verify.AreEqual(expectedIndex, currentFocusedIndex);
            Log.Comment("expectedContent: " + expectedContent + " actual : " + currentFocus.Content.ToString());
            Verify.AreEqual(expectedContent, currentFocus.Content.ToString());
        }

void ValidateDataContextDoesNotGetOverwritten ( ) [inline]

Definition at line 649 of file ViewManagerTests.cs.

        {
            const string c_element1DataContext = "Element1_DataContext";

            RunOnUIThread.Execute(() =>
            {
                var data = new List<Button>()
                {
                    new Button()
                    {
                            Content = "Element1_Content",
                            DataContext = c_element1DataContext
                    }
                };

                var elementFactory = new DataAsElementElementFactory();

                var repeater = new ItemsRepeater() {
                    ItemsSource = data,
                    ItemTemplate = elementFactory
                };

                Content = repeater;

                Content.UpdateLayout();

                // Verify that DataContext is still the same
                var firstElement = repeater.TryGetElement(0) as Button;
                var retrievedDataContextItem1 = firstElement.DataContext as string;
                Verify.IsTrue(retrievedDataContextItem1 == c_element1DataContext);

            });
        }

void ValidateDataContextGetsPropagated ( ) [inline]

Definition at line 684 of file ViewManagerTests.cs.

        {
            const string c_element1DataContext = "Element1_DataContext";

            RunOnUIThread.Execute(() =>
            {
                var data = new List<Button>()
                {
                    new Button()
                    {
                            Content = "Element1_Content",
                            DataContext = c_element1DataContext
                    }
                };

                var elementFactory = new ElementFromElementElementFactory();

                var repeater = new ItemsRepeater()
                {
                    ItemsSource = data,
                    ItemTemplate = elementFactory
                };

                Content = repeater;

                Content.UpdateLayout();

                // Verify that DataContext of data has propagated to the container
                var firstElement = repeater.TryGetElement(0) as Button;
                var retrievedDataContextItem1 = firstElement.DataContext as string;
                Verify.IsTrue(data[0] == firstElement.Content);
                Verify.IsTrue(retrievedDataContextItem1 == c_element1DataContext);

            });
        }

void ValidateElementClearingClearsDataContext ( ) [inline]

Definition at line 830 of file ViewManagerTests.cs.

        {
            ItemsRepeater repeater = null;
            MockElementFactory elementFactory = null;
            int elementClearingRaisedCount = 0;
            Log.Comment("Initialize ItemsRepeater");
            RunOnUIThread.Execute(() =>
            {
                elementFactory = new MockElementFactory() {
                    GetElementFunc = delegate (int index, UIElement owner) {
                        return new Button() { Content = index };
                           },

                    ClearElementFunc = delegate (UIElement element, UIElement owner) {
                        elementClearingRaisedCount++;
                        Verify.IsNull((element as FrameworkElement).DataContext);
                    }
                };

                repeater = CreateRepeater(Enumerable.Range(0, 100),
                    elementFactory);

                repeater.Layout = new StackLayout();

                Content = repeater;
                repeater.UpdateLayout();

                repeater.ItemsSource = null;

                Log.Comment("Verify ItemsRepeater cleared data contexts correctly");
                Verify.IsTrue(elementClearingRaisedCount > 0, "ItemsRepeater should have cleared some elements");
            });
        }

void ValidateElementClearingOrderFromFlowLayout ( ) [inline]

Definition at line 583 of file ViewManagerTests.cs.

        {
            ItemsSourceView dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new ItemsSourceView(Enumerable.Range(0, 15).ToList()));
            ScrollViewer scrollViewer = null;
            var repeater = SetupRepeater(dataSource, null /*layout*/, out scrollViewer);
            List<int> clearedIndices = new List<int>();
            var viewChangedEvent = new ManualResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChangedEvent.Set();
                    }
                };

                repeater.Layout = new StackLayout();
                repeater.ElementPrepared += (sender, args) =>
                {
                    ((FrameworkElement)args.Element).Height = 20;
                };
                repeater.UpdateLayout();

                repeater.ElementClearing += (sender, args) =>
                {
                    int index = repeater.GetElementIndex(args.Element);
                    Log.Comment("Clearing.." + index);
                    clearedIndices.Add(index);
                };

                scrollViewer.ChangeView(null, 100.0, null, disableAnimation: true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Validate order is 0, 1, 2, 3
                for (int i = 0; i < 4; i++)
                {
                    Verify.AreEqual(i, clearedIndices[i]);
                }

                clearedIndices.Clear();
                viewChangedEvent.Reset();
                scrollViewer.ChangeView(null, 0.0, null, disableAnimation: true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Validate order is backwards 14, 13, 12, 11
                for (int i = 0; i < 4; i++)
                {
                    Verify.AreEqual(14 - i, clearedIndices[i]);
                }
            });
        }

void ValidateElementEvents ( ) [inline]

Definition at line 408 of file ViewManagerTests.cs.

        {
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList()));

            var repeater = SetupRepeater(dataSource);

            RunOnUIThread.Execute(() =>
            {
                List<int> preparedIndices = new List<int>();
                List<int> clearedIndices = new List<int>();
                List<KeyValuePair<int, int>> changedIndices = new List<KeyValuePair<int, int>>();

                repeater.ElementPrepared += (sender, args) =>
                {
                    preparedIndices.Add(args.Index);
                };

                repeater.ElementClearing += (sender, args) =>
                {
                    clearedIndices.Add(sender.GetElementIndex(args.Element));
                };

                repeater.ElementIndexChanged += (sender, args) =>
                {
                    changedIndices.Add(new KeyValuePair<int, int>(args.OldIndex, args.NewIndex));
                };

                Log.Comment("Insert in realized range: Inserting 1 item at index 1");
                dataSource.Insert(index: 1, count: 1, reset: false);
                repeater.UpdateLayout();

                Verify.AreEqual(1, preparedIndices.Count);
                Verify.AreEqual(1, preparedIndices[0]);
                Verify.AreEqual(2, changedIndices.Count);
                Verify.IsTrue(changedIndices.Contains(new KeyValuePair<int, int>(1, 2)));
                Verify.IsTrue(changedIndices.Contains(new KeyValuePair<int, int>(2, 3)));
                Verify.AreEqual(1, clearedIndices.Count);
                Verify.AreEqual(3, clearedIndices[0]);

                preparedIndices.Clear();
                clearedIndices.Clear();
                changedIndices.Clear();

                Log.Comment("Remove in realized range: Removing 1 item at index 0");
                dataSource.Remove(index: 0, count: 1, reset: false);
                repeater.UpdateLayout();
                Verify.AreEqual(1, clearedIndices.Count);
                Verify.AreEqual(0, clearedIndices[0]);
                Verify.AreEqual(0, preparedIndices.Count);
                Verify.AreEqual(2, changedIndices.Count);
                Verify.IsTrue(changedIndices.Contains(new KeyValuePair<int, int>(1, 0)));
                Verify.IsTrue(changedIndices.Contains(new KeyValuePair<int, int>(2, 1)));
            });
        }

void ValidateElementIndexChangedEventOnStableReset ( ) [inline]

Definition at line 465 of file ViewManagerTests.cs.

        {
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new CustomItemsSourceWithUniqueId(Enumerable.Range(0, 10).ToList()));

            var repeater = SetupRepeater(dataSource);

            RunOnUIThread.Execute(() =>
            {
                List<int> preparedIndices = new List<int>();
                List<int> clearedIndices = new List<int>();
                List<KeyValuePair<int, int>> changedIndices = new List<KeyValuePair<int, int>>();

                repeater.ElementPrepared += (sender, args) =>
                {
                    preparedIndices.Add(args.Index);
                };

                repeater.ElementClearing += (sender, args) =>
                {
                    clearedIndices.Add(sender.GetElementIndex(args.Element));
                };

                repeater.ElementIndexChanged += (sender, args) =>
                {
                    changedIndices.Add(new KeyValuePair<int, int>(args.OldIndex, args.NewIndex));
                };

                Log.Comment("(UniqueId Reset) Insert in realized range: Inserting 1 item at index 1");
                dataSource.Insert(index: 1, count: 1, reset: true, valueStart: 2000);
                repeater.UpdateLayout();

                Verify.AreEqual(1, preparedIndices.Count);
                Verify.AreEqual(1, preparedIndices[0]);
                Verify.AreEqual(1, changedIndices.Count);
                Verify.IsTrue(changedIndices.Contains(new KeyValuePair<int, int>(1, 2)));
                foreach (var ch in changedIndices)
                {
                    Log.Comment("Changed " + ch.Key + " " + ch.Value);
                }
                Verify.AreEqual(1, clearedIndices.Count);
                Verify.AreEqual(2, clearedIndices[0]);

                preparedIndices.Clear();
                clearedIndices.Clear();
                changedIndices.Clear();

                Log.Comment("(UniqueId Reset) Remove in realized range: Removing 1 item at index 0");
                dataSource.Remove(index: 0, count: 1, reset: true);
                repeater.UpdateLayout();
                Verify.AreEqual(1, clearedIndices.Count);
                Verify.AreEqual(0, clearedIndices[0]);
                foreach (var ch in changedIndices)
                {
                    Log.Comment("Changed " + ch.Key + " " + ch.Value);
                }
                Verify.AreEqual(1, preparedIndices.Count);
                Verify.AreEqual(2, preparedIndices[0]);
                Verify.AreEqual(2, changedIndices.Count);
                Verify.IsTrue(changedIndices.Contains(new KeyValuePair<int, int>(1, 0)));
                Verify.IsTrue(changedIndices.Contains(new KeyValuePair<int, int>(2, 1)));
            });
        }

void ValidateFocusMoveOnElementCleared ( ) [inline]

Definition at line 722 of file ViewManagerTests.cs.

        {
            ItemsRepeater repeater = null;
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() =>
            {
                dataSource = new CustomItemsSource(Enumerable.Range(0, 5).ToList());
            });

            repeater = SetupRepeater(dataSource, "<Button Content='{Binding}' Height='10'/>");

            // dataSource: 0 1 2 3 4
            // Index 0 deleted, focus should be on the new element which has index 0
            SharedHelpers.RunActionsWithWait(
                new Action[]
                {
                    () => { MoveFocusToIndex(repeater, 0); },
                    () => { dataSource.Remove(0 /* index */, 1 /* count */, false /* reset*/); },
                    () => { ValidateCurrentFocus(repeater, 0 /*expectedIndex */, "1" /* expectedContent */); }
                });

            // dataSource: 1 2 3 4
            // Last element deleted, focus should move to the previous element
            int lastIndex = dataSource.Inner.Count - 1;
            SharedHelpers.RunActionsWithWait(
                new Action[]
                {
                    () => { MoveFocusToIndex(repeater, lastIndex); },
                    () => { dataSource.Remove(lastIndex /* index */, 1 /* count */, false /* reset*/); },
                    () => { ValidateCurrentFocus(repeater, 2 /*expectedIndex */, "3" /* expectedContent */); }
                });

            // dataSource: 1 2 3
            // Remove multiple elements
            SharedHelpers.RunActionsWithWait(
                new Action[]
                {
                    () => { MoveFocusToIndex(repeater, 0); },
                    () => { dataSource.Remove(0 /* index */, 2 /* count */, false /* reset*/); },
                    () => { ValidateCurrentFocus(repeater, 0 /*expectedIndex */, "3" /* expectedContent */); }
                });
        }

void ValidateFocusMoveOnElementClearedWithUniqueIds ( ) [inline]

Definition at line 767 of file ViewManagerTests.cs.

        {
            ItemsRepeater repeater = null;
            CustomItemsSource dataSource = null;
            RunOnUIThread.Execute(() =>
            {
                dataSource = new CustomItemsSourceWithUniqueId(Enumerable.Range(0, 5).ToList());
            });

            repeater = SetupRepeater(dataSource, "<Button Content='{Binding}' Height='10'/>");

            // dataSource: 0 1 2 3 4
            // Index 0 deleted, focus should be on the new element which has index 0
            SharedHelpers.RunActionsWithWait(
                new Action[]
                {
                    () => { MoveFocusToIndex(repeater, 0); },
                    () => { dataSource.Remove(0 /* index */, 1 /* count */, true /* reset*/); },
                    () => { ValidateCurrentFocus(repeater, 0 /*expectedIndex */, "1" /* expectedContent */); }
                });

            // dataSource: 1 2 3 4
            // Last element deleted, focus should move to the previous element
            int lastIndex = dataSource.Inner.Count - 1;
            SharedHelpers.RunActionsWithWait(
                new Action[]
                {
                    () => { MoveFocusToIndex(repeater, lastIndex); },
                    () => { dataSource.Remove(lastIndex /* index */, 1 /* count */, true /* reset*/); },
                    () => { ValidateCurrentFocus(repeater, 2 /*expectedIndex */, "3" /* expectedContent */); }
                });

            // dataSource: 1 2 3
            // Reset should keep the focused element as long as the unique id matches.
            SharedHelpers.RunActionsWithWait(
                new Action[]
                {
                    () => { MoveFocusToIndex(repeater, 0); },
                    () => { dataSource.Reset(); },
                    () =>
                    {
                        int newIndex = dataSource.Inner.IndexOf(1);
                        ValidateCurrentFocus(repeater, newIndex /*expectedIndex */, "1" /* expectedContent */);
                    }
                });

            // dataSource: 1 2 3
            // Remove multiple elements
            SharedHelpers.RunActionsWithWait(
                new Action[]
                {
                    () => { MoveFocusToIndex(repeater, 0); },
                    () => { dataSource.Remove(0 /* index */, 2 /* count */, true /* reset*/); },
                    () => { ValidateCurrentFocus(repeater, 0 /*expectedIndex */, "3" /* expectedContent */); }
                });
        }

void ValidateGetElementAtCachingForLayout ( ) [inline]

Definition at line 530 of file ViewManagerTests.cs.

        {
            List<int> data = Enumerable.Range(0, 15).ToList();
            ItemsSourceView dataSource = null;
            RunOnUIThread.Execute(() => dataSource = new ItemsSourceView(data));
            ScrollViewer scrollViewer = null;
            var repeater = SetupRepeater(dataSource, null /*layout*/, out scrollViewer);
            bool layoutRan = false;

            RunOnUIThread.Execute(() =>
            {
                var layout = new MockVirtualizingLayout();
                layout.MeasureLayoutFunc = (availableSize, context) =>
                {
                    Verify.AreEqual(15, context.ItemCount);
                    var element0 = context.GetOrCreateElementAt(0);
                    Verify.IsNotNull(element0);
                    var element1 = context.GetOrCreateElementAt(1);
                    Verify.IsNotNull(element1);
                    Verify.AreNotSame(element0, element1);

                    var element1again = context.GetOrCreateElementAt(1);
                    Verify.AreSame(element1, element1again);

                    var element10 = context.GetOrCreateElementAt(10);
                    Verify.IsNotNull(element10);
                    Verify.AreNotSame(element0, element10);
                    Verify.AreNotSame(element1, element10);

                    context.RecycleElement(element1);

                    var element0New = context.GetOrCreateElementAt(0);
                    Verify.AreSame(element0, element0New);

                    context.RecycleElement(element10);
                    context.RecycleElement(element0);

                    layoutRan = true;
                    return new Size(10, 10);
                };

                repeater.Layout = layout;
                repeater.UpdateLayout();
                Verify.IsTrue(layoutRan);
            });

            IdleSynchronizer.Wait();
        }

Member Data Documentation

int DefaultWaitTime = <DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>"</DataTemplate>" 2000 [private]

Definition at line 966 of file ViewManagerTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/ViewManagerTests.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ViewportTests
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions

ViewportTests Class Reference

List of all members.

Classes

class | TestGridLayout
class | TestScrollingSurface
class | TestStackLayout

Public Member Functions

void | CanBringIntoViewElements ()
void | CanGrowCacheBuffer ()
void | ValidateItemsRepeaterScrollHostScenario ()
void | ValidateLoadUnload ()
void | ValidateNoScrollingSurfaceInPopupScenario ()
void | ValidateNoScrollingSurfaceScenario ()
void | ValidateOneScrollPresenterScenario ()
void | ValidateTwoScrollPresentersScenario ()

Private Member Functions

void | RunElementTrackingTestRoutine (Action< ObservableCollection< ObservableCollection< string >>, TestScrollingSurface[], ItemsRepeater > testRoutine)
void | ValidateNoScrollingSurfaceScenario (bool hostItemsRepeaterInPopup)
void | ValidateRealizedRange (ItemsRepeater repeater, int expectedFirstGroupIndex, int expectedLastGroupIndex, int expectedFirstItemGroupIndex, int expectedFirstItemIndex, int expectedLastItemGroupIndex, int expectedLastItemIndex)

Static Private Member Functions

static VirtualizingLayout | GetMonitoringLayout (Size desiredSize, List< Rect > realizationRects, List< Rect > visibleRects)

Detailed Description

Definition at line 33 of file ViewportTests.cs.

Member Function Documentation

void CanBringIntoViewElements ( ) [inline]

Definition at line 675 of file ViewportTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            ItemsRepeater repeater = null;
            var rootLoadedEvent = new AutoResetEvent(initialState: false);
            var scrollCompletedEvent = new AutoResetEvent(initialState: false);
            var viewChangedOffsets = new List<double>();

            RunOnUIThread.Execute(() =>
            {
                var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
                var root = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
                     @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
                         <Grid.Resources>
                           <controls:StackLayout x:Name='VerticalStackLayout' />
                           <controls:RecyclingElementFactory x:Key='ElementFactory'>
                             <controls:RecyclingElementFactory.RecyclePool>
                               <controls:RecyclePool />
                             </controls:RecyclingElementFactory.RecyclePool>
                             <DataTemplate x:Key='ItemTemplate'>
                               <Border Background='LightGray' Margin ='5'>
                                 <TextBlock Text='{Binding}' TextWrapping='WrapWholeWords' />
                               </Border>
                             </DataTemplate>
                             <DataTemplate x:Key='GroupTemplate'>
                               <StackPanel>
                                 <TextBlock Text='{Binding Name}' FontSize='24' Foreground='White' />
                                 <controls:ItemsRepeater
                                   x:Name='InnerRepeater'
                                   ItemsSource='{Binding}'
                                   ElementFactory='{StaticResource ElementFactory}'
                                   Layout='{StaticResource VerticalStackLayout}'
                                   HorizontalCacheLength='0'
                                   VerticalCacheLength='0' />
                               </StackPanel>
                             </DataTemplate>
                           </controls:RecyclingElementFactory>
                         </Grid.Resources>
                         <controls:ScrollPresenter x:Name='ScrollPresenter' Width='400' Height='600' IsChildAvailableWidthConstrained='True' Background='Gray'>
                           <controls:ItemsRepeater
                             x:Name='ItemsRepeater'
                             ElementFactory='{StaticResource ElementFactory}'
                             Layout='{StaticResource VerticalStackLayout}'
                             HorizontalCacheLength='0'
                             VerticalCacheLength='0' />
                         </controls:ScrollPresenter>
                       </Grid>"));

                var elementFactory = (RecyclingElementFactory)root.Resources["ElementFactory"];
                scrollPresenter = (ScrollPresenter)root.FindName("ScrollPresenter");
                repeater = (ItemsRepeater)root.FindName("ItemsRepeater");

                var groups = Enumerable.Range(0, 10).Select(i => new NamedGroup<string>(
                    "Group #" + i,
                    Enumerable.Range(0, 15).Select(j => string.Format("{0}.{1}: {2}", i, j, lorem.Substring(0, 250))))).ToList();

                repeater.ItemsSource = groups;

                elementFactory.SelectTemplateKey += (s, e) =>
                {
                    e.TemplateKey =
                        (e.DataContext is NamedGroup<string>) ?
                        "GroupTemplate" :
                        "ItemTemplate";
                };

                scrollPresenter.ViewChanged += (o, e) =>
                {
                    Log.Comment("ViewChanged: " + scrollPresenter.VerticalOffset);
                    viewChangedOffsets.Add(scrollPresenter.VerticalOffset);
                };

                ((IRepeaterScrollingSurface)scrollPresenter).ViewportChanged += (o, isFinal) =>
                {
                    if (isFinal)
                    {
                        scrollCompletedEvent.Set();
                    }
                };

                Content = root;

                root.Loaded += delegate {
                    rootLoadedEvent.Set();
                };
            });
            Verify.IsTrue(rootLoadedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Scroll into view item the last item.");
                var group = (FrameworkElement)repeater.GetOrCreateElement(9);
                var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
                innerRepeater.GetOrCreateElement(14).StartBringIntoView();
            });
            Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();
            Verify.AreEqual(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();
            ValidateRealizedRange(repeater, 8, 9, 9, 8, 9, 14);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Scroll into view item 9.10 (already realized) w/ animation.");
                var group = (FrameworkElement)repeater.TryGetElement(9);
                var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
                innerRepeater.TryGetElement(10).StartBringIntoView(new BringIntoViewOptions {
                    VerticalAlignmentRatio = 0.5,
                    AnimationDesired = true
                });
            });
            Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();
            Verify.IsLessThan(1, viewChangedOffsets.Count);
            viewChangedOffsets.Clear();
            ValidateRealizedRange(repeater, 8, 9, 9, 6, 9, 14);

            Log.Comment("Validate no-op StartBringIntoView operations.");
            {
                var expectedVerticalOffsetAt9_10 = double.NaN;

                RunOnUIThread.Execute(() =>
                {
                    expectedVerticalOffsetAt9_10 = scrollPresenter.VerticalOffset;
                    var group = (FrameworkElement)repeater.GetOrCreateElement(9);
                    var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
                    innerRepeater.GetOrCreateElement(10).StartBringIntoView(new BringIntoViewOptions {
                        VerticalAlignmentRatio = 0.5,
                        AnimationDesired = true
                    });
                });
                Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Verify.AreEqual(expectedVerticalOffsetAt9_10, scrollPresenter.VerticalOffset);
                });
            }

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Scroll to item 3.4.");
                var group = (FrameworkElement)repeater.GetOrCreateElement(3);
                var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
                innerRepeater.GetOrCreateElement(4).StartBringIntoView(new BringIntoViewOptions {
                    VerticalAlignmentRatio = 0.0
                });
            });

            Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            IdleSynchronizer.Wait();
            ValidateRealizedRange(repeater, 2, 4, 3, 3, 3, 10);

            // Code defect bug 17711793
            //RunOnUIThread.Execute(() =>
            //{
            //    Log.Comment("Scroll 0.0 to the top");
            //    var group = (FrameworkElement)repeater.MakeAnchor(0);
            //    var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
            //    innerRepeater.MakeAnchor(0).StartBringIntoView(new BringIntoViewOptions
            //    {
            //        VerticalAlignmentRatio = 0.0,
            //        AnimationDesired = true
            //    });
            //});

            //Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            //IdleSynchronizer.Wait();
            //Verify.AreEqual(1, viewChangedOffsets.Count);   // Animations are always disabled for anchors outside the realized range.
            //viewChangedOffsets.Clear();
            //ValidateRealizedRange(repeater, 0, 1, 0, 0, 0, 6);
        }

void CanGrowCacheBuffer ( ) [inline]

Definition at line 400 of file ViewportTests.cs.

        {
            var scrollPresenter = (ScrollPresenter)null;
            var repeater = (ItemsRepeater)null;
            var measureVisibleRects = new List<Rect>();
            var measureRealizationRects = new List<Rect>();
            var arrangeVisibleRects = new List<Rect>();
            var arrangeRealizationRects = new List<Rect>();
            var fullCacheEvent = new ManualResetEvent(initialState: false);
            bool fullCacheReached = false;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Preparing the visual tree...");

                scrollPresenter = new ScrollPresenter {
                    Width = 400,
                    Height = 400
                };

                var layout = new MockVirtualizingLayout {
                    MeasureLayoutFunc = (availableSize, context) =>
                    {
                        if (fullCacheReached)
                        {
                            Log.Comment("Measure pass - full cache already reached.");
                        }
                        else
                        {
                            Log.Comment("Measure pass - adding VisibleRect: {0}, RealizationRect: {1}", context.VisibleRect, context.RealizationRect);

                            measureVisibleRects.Add(context.VisibleRect);
                            measureRealizationRects.Add(context.RealizationRect);
                        }

                        return new Size(1000, 2000);
                    },

                    ArrangeLayoutFunc = (finalSize, context) =>
                    {
                        if (fullCacheReached)
                        {
                            Log.Comment("Arrange pass - full cache already reached.");
                        }
                        else
                        {
                            Log.Comment("Arrange pass - adding VisibleRect: {0}, RealizationRect: {1}", context.VisibleRect, context.RealizationRect);

                            arrangeVisibleRects.Add(context.VisibleRect);
                            arrangeRealizationRects.Add(context.RealizationRect);

                            if (context.RealizationRect.Height == scrollPresenter.Height * (repeater.VerticalCacheLength + 1))
                            {
                                fullCacheReached = true;
                                fullCacheEvent.Set();
                            }
                        }

                        return finalSize;
                    }
                };

                repeater = new ItemsRepeater() {
                    Layout = layout
                };

                scrollPresenter.Content = repeater;
                Content = scrollPresenter;
            });

            if (!fullCacheEvent.WaitOne(500000)) Verify.Fail("Cache full size never reached.");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var cacheLength = repeater.VerticalCacheLength;
                var expectedVisibleWindow = new Rect(0, 0, scrollPresenter.Width, scrollPresenter.Height);
                var expectedRealizationWindow = new Rect(
                    -cacheLength / 2 * scrollPresenter.Width,
                    -cacheLength / 2 * scrollPresenter.Height,
                    (1 + cacheLength) * scrollPresenter.Width,
                    (1 + cacheLength) * scrollPresenter.Height);

                Log.Comment("Validate that the realization window reached full size. Measure passes: {0}, Arrange passes: {1}", measureRealizationRects.Count, arrangeRealizationRects.Count);
                Log.Comment("expectedRealizationWindow: {0}, measureRealizationRects.Last(): {1}", expectedRealizationWindow, measureRealizationRects.Last());
                Log.Comment("expectedRealizationWindow: {0}, arrangeRealizationRects.Last(): {1}", expectedRealizationWindow, arrangeRealizationRects.Last());
                Verify.AreEqual(expectedRealizationWindow, measureRealizationRects.Last());
                Verify.AreEqual(expectedRealizationWindow, arrangeRealizationRects.Last());

                Log.Comment("Validate that the realization window grew by 40 pixels each time during the process.");
                for (int i = 2; i < measureRealizationRects.Count; ++i)
                {
                    Log.Comment("measureRealizationRects.X delta: expected: -40, actual: {0}", measureRealizationRects[i].X - measureRealizationRects[i - 1].X);
                    Log.Comment("measureRealizationRects.Y delta: expected: -40, actual: {0}", measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y);
                    Log.Comment("measureRealizationRects.Width delta: expected: 80, actual: {0}", measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width);
                    Log.Comment("measureRealizationRects.Height delta: expected: 80, actual: {0}", measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height);

                    Verify.IsLessThan(Math.Abs(measureRealizationRects[i].X - measureRealizationRects[i - 1].X + 40), 0.001);
                    Verify.IsLessThan(Math.Abs(measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y + 40), 0.001);
                    Verify.IsLessThan(Math.Abs(measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width - 80), 0.001);
                    Verify.IsLessThan(Math.Abs(measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height - 80), 0.001);

                    Log.Comment("arrangeRealizationRects.X delta: expected: -40, actual: {0}", arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X);
                    Log.Comment("arrangeRealizationRects.Y delta: expected: -40, actual: {0}", arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y);
                    Log.Comment("arrangeRealizationRects.Width delta: expected: 80, actual: {0}", arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width);
                    Log.Comment("arrangeRealizationRects.Height delta: expected: 80, actual: {0}", arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height);

                    Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X + 40), 0.001);
                    Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y + 40), 0.001);
                    Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width - 80), 0.001);
                    Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height - 80), 0.001);
                }

                // Skipping first recording measureVisibleRects[0] since both the realization and visible rects are still empty at that point.
                Log.Comment("Validate expected measure visible rects");
                for (int i = 1; i < measureVisibleRects.Count; ++i)
                {
                    Log.Comment("expectedVisibleWindow: {0}, visibleRect: {1}", expectedVisibleWindow, measureVisibleRects[i]);
                    Verify.AreEqual(expectedVisibleWindow, measureVisibleRects[i]);
                }

                // Skipping first recording arrangeVisibleRects[0] since both the realization and visible rects are still empty at that point.
                Log.Comment("Validate expected arrange visible rects");
                for (int i = 1; i < arrangeVisibleRects.Count; ++i)
                {
                    Log.Comment("expectedVisibleWindow: {0}, visibleRect: {1}", expectedVisibleWindow, arrangeVisibleRects[i]);
                    Verify.AreEqual(expectedVisibleWindow, arrangeVisibleRects[i]);
                }
            });
        }

static VirtualizingLayout GetMonitoringLayout | ( | Size | desiredSize,
 |  | List< Rect > | realizationRects,
 |  | List< Rect > | visibleRects |
 | ) |  |  | [inline, static, private]

Definition at line 1001 of file ViewportTests.cs.

        {
            return new MockVirtualizingLayout {
                MeasureLayoutFunc = (availableSize, context) =>
                {
                    realizationRects.Add(context.RealizationRect);
                    if (visibleRects != null)
                    {
                        visibleRects.Add(context.VisibleRect);
                    }
                    return desiredSize;
                },

                ArrangeLayoutFunc = (finalSize, context) => finalSize
            };
        }

void RunElementTrackingTestRoutine ( Action< ObservableCollection< ObservableCollection< string >>, TestScrollingSurface[], ItemsRepeater > testRoutine ) [inline, private]

Definition at line 925 of file ViewportTests.cs.

        {
            // Base setup for our element tracking tests.
            // We have 4 fake scrollers in series, initially in a non scrollable configuration.
            // Under them we have a group repeater tree (2 groups with 3 items each).
            // The group UI is a StackPanel with a TextBlock "header" and an inner ItemsRepeater.
            RunOnUIThread.Execute(() =>
            {
                int groupCount = 2;
                int itemsPerGroup = 3;

                var data = new ObservableCollection<ObservableCollection<string>>(
                    Enumerable.Range(0, groupCount).Select(i => new ObservableCollection<string>(
                        Enumerable.Range(0, itemsPerGroup).Select(j => string.Format("Item #{0}.{1}", i, j)))));

                var itemElements = Enumerable.Range(0, groupCount).Select(i =>
                    Enumerable.Range(0, itemsPerGroup).Select(j => new Border { Name = data[i][j], Width = 50, Height = 50, Background = new SolidColorBrush(Microsoft.UI.Colors.Red) }).ToList()).ToArray();

                var headerElements = Enumerable.Range(0, groupCount).Select(i => new TextBlock { Text = "Header #" + i }).ToList();
                var groupRepeaters = Enumerable.Range(0, groupCount).Select(i => new ItemsRepeater {
                    Name = "ItemsRepeater #" + i,
                    ItemsSource = data[i],
                    ItemTemplate = MockElementFactory.CreateElementFactory(itemElements[i]),
                    Layout = new TestGridLayout { Orientation = Orientation.Horizontal, MinItemWidth = 50, MinItemHeight = 50, MinRowSpacing = 10, MinColumnSpacing = 10 }
                }).ToList();
                var groupElement = Enumerable.Range(0, groupCount).Select(i =>
                {
                    var panel = new StackPanel();
                    panel.Name = "Group #" + i;
                    panel.Children.Add(headerElements[i]);
                    panel.Children.Add(groupRepeaters[i]);
                    return panel;
                }).ToList();

                var rootRepeater = new ItemsRepeater {
                    Name = "Root ItemsRepeater",
                    ItemsSource = data,
                    ItemTemplate = MockElementFactory.CreateElementFactory(groupElement),
                    Layout = new TestStackLayout { Orientation = Orientation.Vertical }
                };

                var scrollers = new TestScrollingSurface[4];
                for (int i = 0; i < scrollers.Length; ++i)
                {
                    scrollers[i] = new TestScrollingSurface() {
                        Name = "S" + i,
                        Content = i > 0 ? (UIElement)scrollers[i - 1] : rootRepeater
                    };
                }

                var resetScrollers = (Action)(() =>
                {
                    foreach (var scroller in scrollers)
                    {
                        scroller.IsHorizontallyScrollable = false;
                        scroller.IsVerticallyScrollable = false;
                        scroller.RegisterAnchorCandidateFunc = null;
                        scroller.UnregisterAnchorCandidateFunc = null;
                        scroller.GetRelativeViewportFunc = null;
                    }
                });

                var outerScroller = scrollers.Last();
                outerScroller.Width = 200.0;
                outerScroller.Height = 2000.0;

                Content = outerScroller;
                Content.UpdateLayout();

                testRoutine(data, scrollers, rootRepeater);
            });
        }

void ValidateItemsRepeaterScrollHostScenario ( ) [inline]

Definition at line 117 of file ViewportTests.cs.

        {
            var realizationRects = new List<Rect>();
            var scrollViewer = (ScrollViewer)null;
            var viewChangedEvent = new ManualResetEvent(false);
            int waitTime = 2000; // 2 seconds

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater() {
                    Layout = GetMonitoringLayout(new Size(500, 600), realizationRects, null /* visibleRects */),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                scrollViewer = new ScrollViewer {
                    Content = repeater,
                    HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden,
                    VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
                };

                scrollViewer.ViewChanged += (sender, args) =>
                {
                    if (!args.IsIntermediate)
                    {
                        viewChangedEvent.Set();
                    }
                };

                var tracker = new ItemsRepeaterScrollHost() {
                    Width = 200,
                    Height = 300,
                    ScrollViewer = scrollViewer
                };

                Content = tracker;
                Content.UpdateLayout();

                // First layout pass will invalidate measure during the first arrange
                // so that we can get a viewport during the second measure/arrange pass.
                // That's why Measure gets invoked twice.
                // After that, ScrollViewer.SizeChanged is raised and it also invalidates
                // layout (third pass).
                Verify.AreEqual(3, realizationRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
                Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[2]);
                realizationRects.Clear();

                viewChangedEvent.Reset();
                scrollViewer.ChangeView(null, 100.0, 1.0f, disableAnimation: true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(waitTime), "Waiting for view changed");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();

                viewChangedEvent.Reset();
                // Max viewport offset is (300, 400). Horizontal viewport offset
                // is expected to get coerced from 400 to 300.
                scrollViewer.ChangeView(400, 100.0, 1.0f, disableAnimation: true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(waitTime), "Waiting for view changed");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(300, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();

                viewChangedEvent.Reset();
                scrollViewer.ChangeView(null, null, 2.0f, disableAnimation: true);
            });

            Verify.IsTrue(viewChangedEvent.WaitOne(waitTime), "Waiting for view changed");
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(300, 100, 100, 150), realizationRects.Last());
                realizationRects.Clear();
            });
        }

void ValidateLoadUnload ( ) [inline]

Definition at line 533 of file ViewportTests.cs.

        {
            // In this test, we will repeatedly put a repeater in and out
            // of the visual tree, under the same or a different parent.
            // And we will validate that the subscriptions and unsubscriptions to
            // the IRepeaterScrollingSurface events is done in sync.

            TestScrollingSurface scroller1 = null;
            TestScrollingSurface scroller2 = null;
            ItemsRepeater repeater = null;
            WeakReference repeaterWeakRef = null;
            var renderingEvent = new ManualResetEvent(false);

            var unorderedLoadEvent = false;
            var loadCounter = 0;
            var unloadCounter = 0;

            int scroller1SubscriberCount = 0;
            int scroller2SubscriberCount = 0;

            RunOnUIThread.Execute(() =>
            {
                CompositionTarget.Rendering += (sender, args) =>
                {
                    renderingEvent.Set();
                };

                var host = new Grid();
                scroller1 = new TestScrollingSurface() { Name = "Scroller 1" };
                scroller2 = new TestScrollingSurface() { Name = "Scroller 2" };
                repeater = new ItemsRepeater();
                repeaterWeakRef = new WeakReference(repeater);

                repeater.Loaded += delegate {
                    Log.Comment("ItemsRepeater Loaded in " + ((FrameworkElement)repeater.Parent).Name);
                    unorderedLoadEvent |= (++loadCounter > unloadCounter + 1);
                };
                repeater.Unloaded += delegate {
                    Log.Comment("ItemsRepeater Unloaded");
                    unorderedLoadEvent |= (++unloadCounter > loadCounter);
                };

                // Subscribers count should never go above 1 or under 0.
                var validateSubscriberCount = new Action(() =>
                {
                    Verify.IsLessThanOrEqual(scroller1SubscriberCount, 1);
                    Verify.IsGreaterThanOrEqual(scroller1SubscriberCount, 0);

                    Verify.IsLessThanOrEqual(scroller2SubscriberCount, 1);
                    Verify.IsGreaterThanOrEqual(scroller2SubscriberCount, 0);
                });

                scroller1.ConfigurationChangedAddFunc = () => { ++scroller1SubscriberCount; validateSubscriberCount(); };
                scroller2.ConfigurationChangedAddFunc = () => { ++scroller2SubscriberCount; validateSubscriberCount(); };
                scroller1.ConfigurationChangedRemoveFunc = () => { --scroller1SubscriberCount; validateSubscriberCount(); };
                scroller2.ConfigurationChangedRemoveFunc = () => { --scroller2SubscriberCount; validateSubscriberCount(); };

                scroller1.Content = repeater;
                host.Children.Add(scroller1);
                host.Children.Add(scroller2);

                Content = host;
            });

            IdleSynchronizer.Wait();
            Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");

            renderingEvent.Reset();
            Log.Comment("Putting repeater in and out of scroller 1 until we observe two out-of-sync loaded/unloaded events.");
            for (int i = 0; i < 2; ++i)
            {
                while (!unorderedLoadEvent)
                {
                    RunOnUIThread.Execute(() =>
                    {
                        // Validate subscription count for events + reset.
                        scroller1.Content = null;
                        scroller1.Content = repeater;
                    });
                    // For this issue to repro, we need to wait in such a way
                    // that we don't tick the UI thread. We can't use IdleSynchronizer here.
                    Task.Delay(16 * 3).Wait();
                }
                unorderedLoadEvent = false;
                Log.Comment("Detected an unordered load/unload event.");
            }

            IdleSynchronizer.Wait();
            Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");

            renderingEvent.Reset();
            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(1, scroller1SubscriberCount);
                Verify.AreEqual(0, scroller2SubscriberCount);

                Log.Comment("Moving repeater from scroller 1 to scroller 2.");
                scroller1.Content = null;
                scroller2.Content = repeater;
            });

            IdleSynchronizer.Wait();
            Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(0, scroller1SubscriberCount);
                Verify.AreEqual(1, scroller2SubscriberCount);

                Log.Comment("Moving repeater out of scroller 2.");
                scroller2.Content = null;
                repeater = null;
            });

            Log.Comment("Waiting for repeater to get GCed.");
            for (int i = 0; i < 5 && repeaterWeakRef.IsAlive; ++i)
            {
                GC.Collect();
                GC.WaitForPendingFinalizers();
                IdleSynchronizer.Wait();
            }
            Verify.IsFalse(repeaterWeakRef.IsAlive);

            renderingEvent.Reset();
            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(0, scroller1SubscriberCount);
                Verify.AreEqual(0, scroller2SubscriberCount);

                Log.Comment("Scroller raise IRepeaterScrollSurface.PostArrange. Make sure no one is subscribing to it.");
                scroller1.InvalidateArrange();
                scroller2.InvalidateArrange();
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();
            Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
        }

void ValidateNoScrollingSurfaceInPopupScenario ( ) [inline]

Definition at line 42 of file ViewportTests.cs.

        {
            ValidateNoScrollingSurfaceScenario(hostItemsRepeaterInPopup: true);
        }

void ValidateNoScrollingSurfaceScenario ( ) [inline]

Definition at line 36 of file ViewportTests.cs.

        {
            ValidateNoScrollingSurfaceScenario(hostItemsRepeaterInPopup: false);
        }

void ValidateNoScrollingSurfaceScenario ( bool hostItemsRepeaterInPopup ) [inline, private]

Definition at line 47 of file ViewportTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var realizationRects = new List<Rect>();
                var visibleRects = new List<Rect>();

                var repeater = new ItemsRepeater()
                {
                    Layout = GetMonitoringLayout(new Size(500, 500), realizationRects, visibleRects),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                if (hostItemsRepeaterInPopup)
                {
                    var popup = new Popup()
                    {
                        Child = repeater
                    };

                    Content = popup;
                    Content.UpdateLayout();

                    popup.IsOpen = true;
                    Content.UpdateLayout();

                    popup.IsOpen = false;
                }
                else
                {
                    Content = repeater;
                }

                Content.UpdateLayout();

                foreach (Rect rect in realizationRects)
                {
                    Log.Comment("RealizationRect: {0}", rect);
                }

                foreach (Rect rect in visibleRects)
                {
                    Log.Comment("VisibleRects: {0}", rect);
                }

                Verify.AreEqual(2, realizationRects.Count);
                Verify.AreEqual(2, visibleRects.Count);

                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(realizationRects[0], visibleRects[0]);

                // Using Effective Viewport
                Verify.AreEqual(0, realizationRects[1].X);
                // 32 pixel title bar and some tolerance for borders
                Verify.IsLessThan(Math.Abs(realizationRects[1].Y + 32), 6.0);
                // Width/Height depends on the window size, so just
                // validating something reasonable here to avoid flakiness.
                Verify.IsLessThan(500.0, realizationRects[1].Width);
                Verify.IsLessThan(500.0, realizationRects[1].Height);

                Verify.AreEqual(realizationRects[1], visibleRects[1]);

                realizationRects.Clear();
                visibleRects.Clear();
            });
        }

void ValidateOneScrollPresenterScenario ( ) [inline]

Definition at line 207 of file ViewportTests.cs.

        {
            var visibleRects = new List<Rect>();
            var realizationRects = new List<Rect>();
            var scrollPresenter = (ScrollPresenter)null;
            var scrollCompletedEvent = new AutoResetEvent(false);
            var zoomCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater() {
                    Layout = GetMonitoringLayout(new Size(500, 600), realizationRects, visibleRects),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                scrollPresenter = new ScrollPresenter {
                    Content = repeater,
                    Width = 200,
                    Height = 300
                };

                Content = scrollPresenter;
                Content.UpdateLayout();

                Verify.AreEqual(2, visibleRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), visibleRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 300), visibleRects[1]);
                visibleRects.Clear();

                Verify.AreEqual(2, realizationRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
                realizationRects.Clear();

                scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    scrollCompletedEvent.Set();
                };

                scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
                {
                    zoomCompletedEvent.Set();
                };
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 300), visibleRects.Last());
                visibleRects.Clear();
                Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();

                scrollCompletedEvent.Reset();
                // Max viewport offset is (300, 400). Horizontal viewport offset
                // is expected to get coerced from 400 to 300.
                scrollPresenter.ScrollTo(400.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(300, 100, 200, 300), visibleRects.Last());
                visibleRects.Clear();

                Verify.AreEqual(new Rect(300, 100, 200, 300), realizationRects.Last());
                realizationRects.Clear();

                scrollPresenter.ZoomTo(
                    2.0f,
                    Vector2.Zero,
                    new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(zoomCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(
                    new Rect(300, 100, 100, 150),
                    realizationRects.Last());
                realizationRects.Clear();

                // There are some known differences in InteractionTracker zoom between RS1 and RS2.
                Verify.AreEqual(
                    PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone2) ?
                    new Rect(300, 100, 100, 150) :
                    new Rect(150, 100, 100, 150),
                    visibleRects.Last());
                visibleRects.Clear();
            });
        }

void ValidateRealizedRange | ( | ItemsRepeater | repeater,
 |  | int | expectedFirstGroupIndex,
 |  | int | expectedLastGroupIndex,
 |  | int | expectedFirstItemGroupIndex,
 |  | int | expectedFirstItemIndex,
 |  | int | expectedLastItemGroupIndex,
 |  | int | expectedLastItemIndex |
 | ) |  |  | [inline, private]

Definition at line 850 of file ViewportTests.cs.

        {
            int actualFirstGroupIndex = -1;
            int actualLastGroupIndex = -1;
            int actualFirstItemGroupIndex = -1;
            int actualFirstItemIndex = -1;
            int actualLastItemGroupIndex = -1;
            int actualLastItemIndex = -1;

            RunOnUIThread.Execute(() =>
            {
                int groupIndex = 0;
                int itemIndex = 0;

                var groups = (IEnumerable<NamedGroup<string>>)repeater.ItemsSource;

                foreach (var group in groups)
                {
                    var groupElement = repeater.TryGetElement(groupIndex);

                    if (groupElement != null)
                    {
                        actualFirstGroupIndex =
                            actualFirstGroupIndex == -1 ?
                            groupIndex :
                            actualFirstGroupIndex;

                        actualLastGroupIndex = groupIndex;

                        var innerRepeater = (ItemsRepeater)((FrameworkElement)groupElement).FindName("InnerRepeater");

                        foreach (var item in group)
                        {
                            var itemElement = innerRepeater.TryGetElement(itemIndex);

                            if (itemElement != null)
                            {
                                actualFirstItemGroupIndex =
                                    actualFirstItemGroupIndex == -1 ?
                                    groupIndex :
                                    actualFirstItemGroupIndex;

                                actualFirstItemIndex =
                                    actualFirstItemIndex == -1 ?
                                    itemIndex :
                                    actualFirstItemIndex;

                                actualLastItemGroupIndex = groupIndex;
                                actualLastItemIndex = itemIndex;
                            }

                            ++itemIndex;
                        }
                    }

                    itemIndex = 0;
                    ++groupIndex;
                }
            });

            Verify.AreEqual(expectedFirstGroupIndex, actualFirstGroupIndex);
            Verify.AreEqual(expectedLastGroupIndex, actualLastGroupIndex);
            Verify.AreEqual(expectedFirstItemGroupIndex, actualFirstItemGroupIndex);
            Verify.AreEqual(expectedFirstItemIndex, actualFirstItemIndex);
            Verify.AreEqual(expectedLastItemGroupIndex, actualLastItemGroupIndex);
            Verify.AreEqual(expectedLastItemIndex, actualLastItemIndex);
        }

void ValidateTwoScrollPresentersScenario ( ) [inline]

Definition at line 310 of file ViewportTests.cs.

        {
            var visibleRects = new List<Rect>();
            var realizationRects = new List<Rect>();
            var horizontalScrollPresenter = (ScrollPresenter)null;
            var verticalScrollPresenter = (ScrollPresenter)null;
            var horizontalScrollCompletedEvent = new AutoResetEvent(false);
            var verticalScrollCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                var repeater = new ItemsRepeater() {
                    Layout = GetMonitoringLayout(new Size(500, 500), realizationRects, visibleRects),
                    HorizontalCacheLength = 0.0,
                    VerticalCacheLength = 0.0
                };

                horizontalScrollPresenter = new ScrollPresenter {
                    Content = repeater,
                    ContentOrientation = ScrollingContentOrientation.Horizontal
                };

                var grid = new Grid();
                grid.Children.Add(horizontalScrollPresenter);

                verticalScrollPresenter = new ScrollPresenter {
                    Content = grid,
                    Width = 200,
                    Height = 200,
                    ContentOrientation = ScrollingContentOrientation.Vertical
                };

                Content = verticalScrollPresenter;
                Content.UpdateLayout();

                Verify.AreEqual(2, visibleRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), visibleRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 200), visibleRects[1]);
                visibleRects.Clear();

                Verify.AreEqual(2, realizationRects.Count);
                Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
                Verify.AreEqual(new Rect(0, 0, 200, 200), realizationRects[1]);
                realizationRects.Clear();

                horizontalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    horizontalScrollCompletedEvent.Set();
                };

                verticalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    verticalScrollCompletedEvent.Set();
                };
            });
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                verticalScrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(verticalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(0, 100, 200, 200), visibleRects.Last());
                visibleRects.Clear();

                Verify.AreEqual(new Rect(0, 100, 200, 200), realizationRects.Last());
                realizationRects.Clear();

                // Max viewport offset is (300, 300). Horizontal viewport offset
                // is expected to get coerced from 400 to 300.
                horizontalScrollPresenter.ScrollTo(400.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            });
            Verify.IsTrue(horizontalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
            CompositionPropertySpy.SynchronouslyTickUIThread(1);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(new Rect(300, 100, 200, 200), visibleRects.Last());
                visibleRects.Clear();

                Verify.AreEqual(new Rect(300, 100, 200, 200), realizationRects.Last());
                realizationRects.Clear();
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/ViewportTests.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportTests::TestGridLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ViewportTests
  • ViewportTests::TestGridLayout
Protected Member Functions | Properties

ViewportTests::TestGridLayout Class Reference

Inherits Microsoft::UI::Xaml::Controls::UniformGridLayout.

List of all members.

Protected Member Functions

override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

UIElement | SuggestedAnchor [get, set]

Detailed Description

Definition at line 1150 of file ViewportTests.cs.

Member Function Documentation

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 1154 of file ViewportTests.cs.

            {
                var anchorIndex = context.RecommendedAnchorIndex;
                SuggestedAnchor = anchorIndex < 0 ? null : context.GetOrCreateElementAt(anchorIndex);
                return base.MeasureOverride(context, availableSize);
            }

Property Documentation

UIElement SuggestedAnchor [get, set]

Definition at line 1152 of file ViewportTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/ViewportTests.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportTests::TestScrollingSurface Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ViewportTests
  • ViewportTests::TestScrollingSurface
Public Member Functions | Protected Member Functions | Properties | Events | Private Member Functions | Private Attributes

ViewportTests::TestScrollingSurface Class Reference

List of all members.

Public Member Functions

Rect | GetRelativeViewport (UIElement child)
void | RegisterAnchorCandidate (UIElement element)
void | UnregisterAnchorCandidate (UIElement element)

Protected Member Functions

override Size | ArrangeOverride (Size finalSize)
override Size | MeasureOverride (Size availableSize)

Properties

UIElement | AnchorElement [get, set]
ConfigurationChangedEventHandler | ConfigurationChanged
Action | ConfigurationChangedAddFunc [get, set]
Action | ConfigurationChangedRemoveFunc [get, set]
Func< UIElement, Rect > | GetRelativeViewportFunc [get, set]
bool | InArrange [get, set]
bool | InMeasure [get, set]
bool | InPostArrange [get, set]
bool | IsHorizontallyScrollable [get, set]
bool | IsVerticallyScrollable [get, set]
Action< UIElement > | RegisterAnchorCandidateFunc [get, set]
Action< UIElement > | UnregisterAnchorCandidateFunc [get, set]

Events

ConfigurationChangedEventHandler | _configurationChanged
PostArrangeEventHandler | PostArrange
ViewportChangedEventHandler | ViewportChanged

Private Member Functions

void | RaiseConfigurationChanged ()

Private Attributes

bool | _isHorizontallyScrollable
bool | _isVerticallyScrollable

Detailed Description

Definition at line 1018 of file ViewportTests.cs.

Member Function Documentation

override Size ArrangeOverride ( Size finalSize ) [inline, protected]

Definition at line 1110 of file ViewportTests.cs.

            {
                InArrange = true;

                var result = base.ArrangeOverride(finalSize);

                InArrange = false;
                InPostArrange = true;

                if (PostArrange != null)
                {
                    PostArrange(this);
                }

                InPostArrange = false;

                return result;
            }

Rect GetRelativeViewport ( UIElement child ) [inline]

Definition at line 1097 of file ViewportTests.cs.

            {
                return GetRelativeViewportFunc(child);
            }

override Size MeasureOverride ( Size availableSize ) [inline, protected]

Definition at line 1102 of file ViewportTests.cs.

            {
                InMeasure = true;
                var result = base.MeasureOverride(availableSize);
                InMeasure = false;
                return result;
            }

void RaiseConfigurationChanged ( ) [inline, private]

Definition at line 1129 of file ViewportTests.cs.

            {
                if (_configurationChanged != null)
                {
                    _configurationChanged(this);
                }
            }

void RegisterAnchorCandidate ( UIElement element ) [inline]

Definition at line 1087 of file ViewportTests.cs.

            {
                RegisterAnchorCandidateFunc(element);
            }

void UnregisterAnchorCandidate ( UIElement element ) [inline]

Definition at line 1092 of file ViewportTests.cs.

            {
                UnregisterAnchorCandidateFunc(element);
            }

Member Data Documentation

bool _isHorizontallyScrollable [private]

Definition at line 1020 of file ViewportTests.cs.

bool _isVerticallyScrollable [private]

Definition at line 1021 of file ViewportTests.cs.

Property Documentation

UIElement AnchorElement [get, set]

Definition at line 1034 of file ViewportTests.cs.

ConfigurationChangedEventHandler ConfigurationChanged [add, remove]

Definition at line 1061 of file ViewportTests.cs.

Action ConfigurationChangedAddFunc [get, set]

Definition at line 1027 of file ViewportTests.cs.

Action ConfigurationChangedRemoveFunc [get, set]

Definition at line 1028 of file ViewportTests.cs.

Func<UIElement, Rect> GetRelativeViewportFunc [get, set]

Definition at line 1032 of file ViewportTests.cs.

bool InArrange [get, set]

Definition at line 1024 of file ViewportTests.cs.

bool InMeasure [get, set]

Definition at line 1023 of file ViewportTests.cs.

bool InPostArrange [get, set]

Definition at line 1025 of file ViewportTests.cs.

bool IsHorizontallyScrollable [get, set]

Definition at line 1037 of file ViewportTests.cs.

bool IsVerticallyScrollable [get, set]

Definition at line 1048 of file ViewportTests.cs.

Action<UIElement> RegisterAnchorCandidateFunc [get, set]

Definition at line 1030 of file ViewportTests.cs.

Action<UIElement> UnregisterAnchorCandidateFunc [get, set]

Definition at line 1031 of file ViewportTests.cs.

Event Documentation

ConfigurationChangedEventHandler _configurationChanged [private]

Definition at line 1058 of file ViewportTests.cs.

PostArrangeEventHandler PostArrange

Definition at line 1081 of file ViewportTests.cs.

ViewportChangedEventHandler ViewportChanged

Definition at line 1084 of file ViewportTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/ViewportTests.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportTests::TestStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • ViewportTests
  • ViewportTests::TestStackLayout
Protected Member Functions | Properties

ViewportTests::TestStackLayout Class Reference

Inherits Microsoft::UI::Xaml::Controls::StackLayout.

List of all members.

Protected Member Functions

override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

UIElement | SuggestedAnchor [get, set]

Detailed Description

Definition at line 1138 of file ViewportTests.cs.

Member Function Documentation

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 1142 of file ViewportTests.cs.

            {
                var anchorIndex = context.RecommendedAnchorIndex;
                SuggestedAnchor = anchorIndex < 0 ? null : context.GetOrCreateElementAt(anchorIndex);
                return base.MeasureOverride(context, availableSize);
            }

Property Documentation

UIElement SuggestedAnchor [get, set]

Definition at line 1140 of file ViewportTests.cs.

The documentation for this class was generated from the following file:
  • Repeater/APITests/ViewportTests.cs
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RevealTests
Public Member Functions

RevealTests Class Reference

List of all members.

Public Member Functions

void ValidateAppBarButtonRevealStyles ()

Detailed Description

Definition at line 20 of file RevealTests.cs.

Member Function Documentation

void ValidateAppBarButtonRevealStyles ( ) [inline]

Definition at line 24 of file RevealTests.cs.

        {
            AppBarButton buttonLabelsOnRight = null;
            AppBarButton buttonOverflow = null;

            AppBarToggleButton toggleButtonLabelsOnRight = null;
            AppBarToggleButton toggleButtonOverflow = null;

            RunOnUIThread.Execute(() =>
            {
                var cmdBar = (CommandBar)XamlReader.Load(@"
                        <CommandBar xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                            DefaultLabelPosition='Right'
                            IsOpen='True'>
                            <AppBarButton Label='button' Icon='Accept'/>
                            <AppBarToggleButton Label='button' Icon='Accept'/>
                            <CommandBar.SecondaryCommands>
                                <AppBarButton Label='Supercalifragilisticexpialidocious' Style='{StaticResource AppBarButtonRevealOverflowStyle}'/>
                                <AppBarToggleButton Label='Supercalifragilisticexpialidocious' Style='{StaticResource AppBarToggleButtonRevealOverflowStyle}'/>
                            </CommandBar.SecondaryCommands>
                        </CommandBar>");

                buttonLabelsOnRight = (AppBarButton)cmdBar.PrimaryCommands[0];
                buttonOverflow = (AppBarButton)cmdBar.SecondaryCommands[0];

                toggleButtonLabelsOnRight = (AppBarToggleButton)cmdBar.PrimaryCommands[1];
                toggleButtonOverflow = (AppBarToggleButton)cmdBar.SecondaryCommands[1];

                Content = cmdBar;
                Content.UpdateLayout();

                const double expectedLabelsOnRightWidth = 84;
                const double expectedOverflowWidth = 264;

                Verify.AreEqual(expectedLabelsOnRightWidth, buttonLabelsOnRight.ActualWidth);
                Verify.AreEqual(expectedOverflowWidth, buttonOverflow.ActualWidth);

                Verify.AreEqual(expectedLabelsOnRightWidth, toggleButtonLabelsOnRight.ActualWidth);
                Verify.AreEqual(expectedOverflowWidth, toggleButtonOverflow.ActualWidth);
            });
        }

The documentation for this class was generated from the following file:
  • Materials/Reveal/APITests/RevealTests.cs
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ScrollPresenterTests
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes

ScrollPresenterTests Class Reference

List of all members.

Classes

class | ScrollPresenterOperation
class | TestDataSource

Public Member Functions

void | AnchoringAtAlmostBottomEdge ()
void | AnchoringAtAlmostLeftEdge ()
void | AnchoringAtAlmostRightEdge ()
void | AnchoringAtAlmostTopEdge ()
void | AnchoringAtBottomEdgeWhileDecreasingViewportHeight ()
void | AnchoringAtBottomEdgeWhileIncreasingContentAndDecreasingViewportHeight ()
void | AnchoringAtBottomEdgeWhileIncreasingContentAndViewportHeight ()
void | AnchoringAtBottomEdgeWhileIncreasingContentHeight ()
void | AnchoringAtLeftEdge ()
void | AnchoringAtRepeaterMiddle ()
void | AnchoringAtRightEdgeWhileDecreasingViewportWidth ()
void | AnchoringAtRightEdgeWhileIncreasingContentAndDecreasingViewportWidth ()
void | AnchoringAtRightEdgeWhileIncreasingContentAndViewportWidth ()
void | AnchoringAtRightEdgeWhileIncreasingContentWidth ()
void | AnchoringAtTopEdge ()
void | AnchoringElementWithGrowningViewport ()
void | AnchoringElementWithShrinkingViewport ()
void | AnchoringWithReducedExtent ()
void | AnchoringWithReducedExtentAndAnchorOffset ()
void | AnimateOffsetsBeforeLoading ()
void | AnimateZoomFactorBeforeLoading ()
void | BasicAlignment ()
void | BasicImageWithConstrainedHeight ()
void | BasicImageWithConstrainedWidth ()
void | BasicMargin ()
void | BasicMarginAndAlignment ()
void | BasicOffsetChanges ()
void | BasicOffsetsChangeCancelation ()
void | BasicPadding ()
void | BasicZoomFactorChangeCancelation ()
void | BasicZoomFactorChanges ()
void | BringContentWithMarginIntoView ()
void | BringElementIntoHorizontalScrollPresenterViewFromFarEdge ()
void | BringElementIntoHorizontalScrollPresenterViewFromNearEdge ()
void | BringElementIntoHorizontalScrollPresenterViewWithFarAlignment ()
void | BringElementIntoHorizontalScrollPresenterViewWithMiddleAlignment ()
void | BringElementIntoHorizontalScrollPresenterViewWithNearAlignment ()
void | BringElementIntoHorizontalScrollPresenterViewWithOffset ()
void | BringElementIntoHorizontalScrollPresenterViewWithOffsetFromFarEdge ()
void | BringElementIntoHorizontalScrollPresenterViewWithSnapPoints ()
void | BringElementIntoVerticalScrollPresenterViewFromFarEdge ()
void | BringElementIntoVerticalScrollPresenterViewFromNearEdge ()
void | BringElementIntoVerticalScrollPresenterViewWithFarAlignment ()
void | BringElementIntoVerticalScrollPresenterViewWithMiddleAlignment ()
void | BringElementIntoVerticalScrollPresenterViewWithNearAlignment ()
void | BringElementIntoVerticalScrollPresenterViewWithOffset ()
void | BringElementIntoVerticalScrollPresenterViewWithOffsetFromFarEdge ()
void | BringElementIntoVerticalScrollPresenterViewWithSnapPoints ()
void | BringElementIntoViewWithAdjustmentInBringingIntoViewHandler ()
void | BringElementIntoViewWithTargetRect ()
void | BringNestedElementIntoHorizontalScrollPresenterView ()
void | BringNestedElementIntoHorizontalScrollPresenterViewFromFarEdge ()
void | BringNestedElementIntoHorizontalScrollPresenterViewWithNearAlignment ()
void | BringNestedElementIntoHorizontalScrollPresenterViewWithOffset ()
void | BringNestedElementIntoHorizontalScrollPresenterViewWithSnapPoints ()
void | BringNestedElementIntoHorizontalScrollViewerView ()
void | BringNestedElementIntoHorizontalScrollViewerViewWithNearAlignment ()
void | BringNestedElementIntoHorizontalScrollViewerViewWithOffset ()
void | BringNestedElementIntoVerticalScrollPresenterView ()
void | BringNestedElementIntoVerticalScrollPresenterViewFromFarEdge ()
void | BringNestedElementIntoVerticalScrollPresenterViewWithMiddleAlignment ()
void | BringNestedElementIntoVerticalScrollPresenterViewWithOffset ()
void | BringNestedElementIntoVerticalScrollViewerView ()
void | BringNestedElementIntoVerticalScrollViewerViewWithMiddleAlignment ()
void | BringNestedElementIntoVerticalScrollViewerViewWithOffset ()
void | CanAddAndRemoveSnapPointsFromAScrollPresenter ()
void | CanAddScrollSnapPointsWithMixedAlignments ()
void | CanShareSnapPointsInMultipleCollections ()
void | ChangeOffsetsWhileBiDirectionalScrollControllerIsAttached ()
void | ChangeOffsetsWhileScrollControllersAreAttached ()
void | ChangeOffsetsWithAdditionalVelocityAndAttachedBiDirectionalScrollController ()
void | ChangeOffsetsWithAdditionalVelocityAndAttachedScrollControllers ()
void | ChangeOffsetsWithAttachedBiDirectionalScrollController ()
void | ChangeOffsetsWithAttachedScrollControllers ()
void | ConsecutiveOffsetJumps ()
void | ConsecutiveScrollAndZoomJumps ()
void | ConsecutiveZoomAndScrollJumps ()
void | ConsecutiveZoomFactorJumps ()
void | ImageWithConstrainedHeight ()
void | ImageWithConstrainedSize ()
void | ImageWithConstrainedWidth ()
void | ImageWithUnnaturalSize ()
void | InterruptOffsetsChangeWithOffsetsChange ()
void | InterruptOffsetsChangeWithZoomFactorChange ()
void | InterruptViewChangeWithUnloading ()
void | InterruptZoomFactorChangeWithOffsetsChange ()
void | InterruptZoomFactorChangeWithZoomFactorChange ()
void | ListenToContentEffectiveViewportChanged ()
void | OffsetJumpAfterContentResizing ()
void | OffsetsChangeWithCustomDuration ()
void | OffsetsChangeWithNoContent ()
void | OverlappingRepeatedSnapPointsThrow ()
void | PinchContentThroughMaxZoomFactor ()
void | ReadExpressionAnimationSources ()
void | RightToLeftFlowDirection ()
void | SetInvalidMaxZoomFactorValues ()
void | SetInvalidMinZoomFactorValues ()
void | SetOffsetsBeforeLoading ()
void | SettingScrollControllerProperties ()
void | SetZoomFactorBeforeLoading ()
void | SnapPointsWithInvalidArgsThrow ()
void | SnapToFirstRepeatedScrollSnapPoint ()
void | SnapToFirstRepeatedZoomSnapPoint ()
void | StretchAlignment ()
void | StretchContentThroughMinZoomFactor ()
void | StretchedImage ()
void | SuccessiveAdditionalScrollVelocities ()
void | SuccessiveAdditionalZoomVelocities ()
void | ValidateScrollAnimationStartingAndZoomFactorEventArgsHaveValidStartAndEndPositions ()
void | ValidateXYFocusNavigation ()
void | VerifyDefaultPropertyValues ()
void | VerifyExtentAndViewportProperties ()
void | VerifyInteractionSourceSettings ()
void | VerifyPropertyGettersAndSetters ()
void | ViewportHeight ()
void | ZoomFactorChangeWithCustomDuration ()
void | ZoomFactorChangeWithNoContent ()

Private Types

enum | BiDirectionalAlignment { Near, Center, Stretch, Far }
enum | ViewChangeInterruptionKind { OffsetsChangeByOffsetsChange, OffsetsChangeByZoomFactorChange, ZoomFactorChangeByOffsetsChange, ZoomFactorChangeByZoomFactorChange }

Private Member Functions

void | AddScrollVelocity (ScrollPresenter scrollPresenter, float horizontalVelocity, float verticalVelocity, float?horizontalInertiaDecayRate, float?verticalInertiaDecayRate, bool waitForViewChangeCompletion=true, bool hookViewChangingAndChanged=true)
void | AddSnapPoints (ScrollPresenter scrollPresenter, StackPanel stackPanel)
void | AddZoomVelocity (ScrollPresenter scrollPresenter, float zoomFactorVelocity, float?inertiaDecayRate, float centerPointX, float centerPointY, bool waitForViewChangeCompletion=true, bool hookViewChangingAndChanged=true)
void | AnchoringAtAlmostFarEdge (Orientation orientation)
void | AnchoringAtAlmostNearEdge (Orientation orientation)
void | AnchoringAtFarEdgeWhileDecreasingViewport (Orientation orientation)
void | AnchoringAtFarEdgeWhileIncreasingContent (Orientation orientation, double viewportSizeChange, double expectedFinalOffset)
void | AnchoringAtNearEdge (Orientation orientation)
void | AnchoringElementWithResizedViewport (Orientation orientation, double viewportSizeChange)
void | AnchoringWithOffsetCoercion (bool reduceAnchorOffset)
BiDirectionalAlignment | BiDirectionalAlignmentFromHorizontalAlignment (HorizontalAlignment horizontalAlignment)
BiDirectionalAlignment | BiDirectionalAlignmentFromVerticalAlignment (VerticalAlignment verticalAlignment)
void | BringElementInNestedScrollPresentersIntoView (Orientation orientation, double expectedOuterHorizontalOffset, double expectedOuterVerticalOffset, double expectedInnerHorizontalOffset, double expectedInnerVerticalOffset, BringIntoViewOptions options=null, double originalOuterHorizontalOffset=0.0, double originalOuterVerticalOffset=0.0, float originalOuterZoomFactor=1.0f, double originalInnerHorizontalOffset=0.0, double originalInnerVerticalOffset=0.0, float originalInnerZoomFactor=1.0f, bool applySnapPointsInBringingIntoViewHandler=false)
void | BringElementInNestedScrollViewersIntoView (Orientation orientation, double expectedOuterHorizontalOffset, double expectedOuterVerticalOffset, double expectedInnerHorizontalOffset, double expectedInnerVerticalOffset, BringIntoViewOptions options=null)
void | BringElementIntoView (Orientation orientation, double expectedHorizontalOffset, double expectedVerticalOffset, BringIntoViewOptions options=null, double originalHorizontalOffset=0.0, double originalVerticalOffset=0.0, float originalZoomFactor=1.0f, bool applyOptionsInBringingIntoViewHandler=false, bool applySnapPointsInBringingIntoViewHandler=false)
void | BringElementIntoViewWithAlignment (Orientation orientation, double alignmentRatio, double expectedHorizontalOffset, double expectedVerticalOffset)
void | BringElementIntoViewWithOffset (Orientation orientation, double offset, double expectedHorizontalOffset, double expectedVerticalOffset, double originalHorizontalOffset=0.0, double originalVerticalOffset=0.0, float originalZoomFactor=1.0f)
void | CanAddAndRemoveSnapPointsFromAScrollPresenter (ScrollSnapPointsAlignment alignment)
void | ChangeOffsetsBeforeLoading (bool animate)
void | ChangeZoomFactorBeforeLoading (bool animate)
void | ConsecutiveOffsetJumps (bool waitForFirstCompletion)
void | ConsecutiveScrollAndZoomJumps (bool isScrollRelative, bool isZoomRelative, bool waitForFirstCompletion)
void | ConsecutiveZoomAndScrollJumps (bool isZoomRelative, bool isScrollRelative, bool waitForFirstCompletion)
void | ConsecutiveZoomFactorJumps (bool isFirstZoomRelative, bool isSecondZoomRelative, bool waitForFirstCompletion)
double | GetArrangeRenderSizesDelta (BiDirectionalAlignment alignment, double extentSize, double renderSize, double nearMargin, double farMargin)
bool | GetEffectiveIsAnimationEnabled (ScrollingAnimationMode animationMode, bool?isAnimationsEnabledOverride)
void | InsertStackPanelChild (StackPanel stackPanel, int operationCount, int newIndex, int newCount, string namePrefix="")
void | InterruptViewChange (ViewChangeInterruptionKind viewChangeInterruptionKind)
void | ScrollBy (ScrollPresenter scrollPresenter, double horizontalOffsetDelta, double verticalOffsetDelta, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null, double?expectedFinalHorizontalOffset=null, double?expectedFinalVerticalOffset=null)
void | ScrollTo (ScrollPresenter scrollPresenter, double horizontalOffset, double verticalOffset, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null, double?expectedFinalHorizontalOffset=null, double?expectedFinalVerticalOffset=null)
void | SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter (Orientation orientation, ScrollPresenter outerScrollPresenter, ScrollPresenter innerScrollPresenter, AutoResetEvent outerScrollPresenterLoadedEvent, AutoResetEvent innerScrollPresenterLoadedEvent)
void | SetupBringIntoViewUIWithScrollViewerInsideScrollViewer (Orientation orientation, ScrollViewer outerScrollViewer, ScrollViewer innerScrollViewer, AutoResetEvent outerScrollViewerLoadedEvent, AutoResetEvent innerScrollViewerLoadedEvent)
void | SetupDefaultAnchoringUI (Orientation orientation, ScrollPresenter scrollPresenter, AutoResetEvent scrollPresenterLoadedEvent)
void | SetupDefaultBringIntoViewUI (Orientation orientation, ScrollPresenter scrollPresenter, AutoResetEvent scrollPresenterLoadedEvent, bool setAsContentRoot=true)
void | SetupDefaultBringIntoViewUIWithScrollViewer (Orientation orientation, ScrollViewer scrollViewer, AutoResetEvent scrollViewerLoadedEvent, bool setAsContentRoot=true)
void | SetupDefaultUI (ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, AutoResetEvent scrollPresenterLoadedEvent, bool setAsContentRoot=true)
void | SetupRepeaterAnchoringUI (ScrollPresenter scrollPresenter, AutoResetEvent scrollPresenterLoadedEvent)
void | SetupUIWithBiDirectionalScrollController (ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, BiDirectionalScrollController biDirectionalScrollController, AutoResetEvent loadedEvent)
void | SetupUIWithScrollControllers (ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, CompositionScrollController horizontalScrollController, CompositionScrollController verticalScrollController, AutoResetEvent loadedEvent)
void | SpyTranslationAndScale (ScrollPresenter scrollPresenter, Compositor compositor, out float horizontalOffset, out float verticalOffset, out float zoomFactor)
ScrollPresenterOperation | StartAddScrollVelocity (ScrollPresenter scrollPresenter, float horizontalVelocity, float verticalVelocity, float?horizontalInertiaDecayRate, float?verticalInertiaDecayRate, AutoResetEvent scrollPresenterViewChangeOperationEvent)
ScrollPresenterOperation | StartAddZoomVelocity (ScrollPresenter scrollPresenter, float zoomFactorVelocity, float?inertiaDecayRate, float centerPointX, float centerPointY, AutoResetEvent scrollPresenterViewChangeOperationEvent)
ScrollPresenterOperation | StartScrollBy (ScrollPresenter scrollPresenter, double horizontalOffsetDelta, double verticalOffsetDelta, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent)
ScrollPresenterOperation | StartScrollTo (ScrollPresenter scrollPresenter, double horizontalOffset, double verticalOffset, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent)
ScrollPresenterOperation | StartZoomBy (ScrollPresenter scrollPresenter, float zoomFactorDelta, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent)
ScrollPresenterOperation | StartZoomTo (ScrollPresenter scrollPresenter, float zoomFactor, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent)
void | ValidateContentWithConstrainedHeight (Compositor compositor, ScrollPresenter scrollPresenter, FrameworkElement content, VerticalAlignment verticalAlignment, double topMargin, double bottomMargin, float expectedMinPosition, float expectedZoomFactor)
void | ValidateContentWithConstrainedSize (Compositor compositor, ScrollPresenter scrollPresenter, FrameworkElement content, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, float expectedMinPositionX, float expectedMinPositionY, float expectedZoomFactor)
void | ValidateContentWithConstrainedWidth (Compositor compositor, ScrollPresenter scrollPresenter, FrameworkElement content, HorizontalAlignment horizontalAlignment, double leftMargin, double rightMargin, float expectedMinPosition, float expectedZoomFactor)
void | ValidateStretchedImageSize (ScrollPresenter scrollPresenter, Image imageScrollPresenterContent, double desiredSize, double actualSize, double extentSize)
void | VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension (List< ExpressionAnimationStatusChange > expressionAnimationStatusChanges)
void | ViewportHeight (bool isScrollPresenterParentSizeSet, bool isScrollPresenterParentMaxSizeSet, VerticalAlignment scrollPresenterVerticalAlignment, double scrollPresenterContentHeight)
void | WaitForEvent (string logComment, EventWaitHandle eventWaitHandle)
void | ZoomBy (ScrollPresenter scrollPresenter, float zoomFactorDelta, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null)
void | ZoomTo (ScrollPresenter scrollPresenter, float zoomFactor, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null)

Private Attributes

const int | c_defaultAnchoringUIRepeaterChildrenCount = 16
const double | c_defaultAnchoringUIScrollPresenterConstrainedSize = 300.0
const double | c_defaultAnchoringUIScrollPresenterNonConstrainedSize = 600.0
const int | c_defaultAnchoringUIStackPanelChildrenCount = 16
const double | c_defaultAnchorRatio = 0.0
const double | c_defaultBringIntoViewUIScrollPresenterConstrainedSize = 300.0
const double | c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize = 600.0
const int | c_defaultBringIntoViewUIStackPanelChildrenCount = 16
const ScrollingContentOrientation | c_defaultContentOrientation = ScrollingContentOrientation.Both
const double | c_defaultHorizontalOffset = 0.0
const ScrollingChainMode | c_defaultHorizontalScrollChainMode = ScrollingChainMode.Auto
const ScrollingScrollMode | c_defaultHorizontalScrollMode = ScrollingScrollMode.Auto
const ScrollingRailMode | c_defaultHorizontalScrollRailMode = ScrollingRailMode.Enabled
const ScrollingInputKinds | c_defaultIgnoredInputKinds = ScrollingInputKinds.None
const double | c_defaultMaxZoomFactor = 10.0
const double | c_defaultMinZoomFactor = 0.1
const float | c_defaultOffsetResultTolerance = 0.0001f
const ScrollingInteractionState | c_defaultState = ScrollingInteractionState.Idle
const double | c_defaultUIScrollControllerThickness = 44.0
const double | c_defaultUIScrollPresenterContentHeight = 600.0
const double | c_defaultUIScrollPresenterContentWidth = 1200.0
const double | c_defaultUIScrollPresenterHeight = 200.0
const double | c_defaultUIScrollPresenterWidth = 300.0
const double | c_defaultVerticalOffset = 0.0
const ScrollingChainMode | c_defaultVerticalScrollChainMode = ScrollingChainMode.Auto
const ScrollingScrollMode | c_defaultVerticalScrollMode = ScrollingScrollMode.Auto
const ScrollingRailMode | c_defaultVerticalScrollRailMode = ScrollingRailMode.Enabled
const ScrollingChainMode | c_defaultZoomChainMode = ScrollingChainMode.Auto
const double | c_defaultZoomFactor = 1.0
const ScrollingZoomMode | c_defaultZoomMode = ScrollingZoomMode.Disabled
const string | c_expressionAnimationSourcesExtentPropertyName = "Extent"
const string | c_expressionAnimationSourcesMaxPositionPropertyName = "MaxPosition"
const string | c_expressionAnimationSourcesMinPositionPropertyName = "MinPosition"
const string | c_expressionAnimationSourcesOffsetPropertyName = "Offset"
const string | c_expressionAnimationSourcesPositionPropertyName = "Position"
const string | c_expressionAnimationSourcesViewportPropertyName = "Viewport"
const string | c_expressionAnimationSourcesZoomFactorPropertyName = "ZoomFactor"
const int | c_MaxStockOffsetsChangeDuration = 1000
const int | c_MaxStockZoomFactorChangeDuration = 1000
const int | c_MaxWaitDuration = 5000
const string | c_visualHorizontalOffsetTargetedPropertyName = "Translation.X"
const string | c_visualScaleTargetedPropertyName = "Scale.X"
const string | c_visualVerticalOffsetTargetedPropertyName = "Translation.Y"
uint | scrollStartingCount = 0u
uint | viewChangedCount = 0u
uint | zoomStartingCount = 0u

Detailed Description

Definition at line 23 of file ScrollControllerTests.cs.

Member Enumeration Documentation

enum BiDirectionalAlignment [private]
Enumerator:
Near
Center
Stretch
Far

Definition at line 26 of file ScrollPresenterLayoutTests.cs.

        {
            Near,
            Center,
            Stretch,
            Far
        }

enum ViewChangeInterruptionKind [private]
Enumerator:
OffsetsChangeByOffsetsChange
OffsetsChangeByZoomFactorChange
ZoomFactorChangeByOffsetsChange
ZoomFactorChangeByZoomFactorChange

Definition at line 29 of file ScrollPresenterViewChangeTests.cs.

        {
            OffsetsChangeByOffsetsChange,
            OffsetsChangeByZoomFactorChange,
            ZoomFactorChangeByOffsetsChange,
            ZoomFactorChangeByZoomFactorChange,
        }

Member Function Documentation

void AddScrollVelocity | ( | ScrollPresenter | scrollPresenter,
 |  | float | horizontalVelocity,
 |  | float | verticalVelocity,
 |  | float? | horizontalInertiaDecayRate,
 |  | float? | verticalInertiaDecayRate,
 |  | bool | waitForViewChangeCompletion = true,
 |  | bool | hookViewChangingAndChanged = true |
 | ) |  |  | [inline, private]

Definition at line 1810 of file ScrollPresenterViewChangeTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: false,
                enableInteractionSourcesNotifications: false,
                enableExpressionAnimationStatusNotifications: true))
            {
                Log.Comment("Waiting for any pending ExpressionAnimation start/stop notifications to occur");
                CompositionPropertySpy.SynchronouslyTickUIThread(6);

                double originalHorizontalOffset = 0.0;
                double originalVerticalOffset = 0.0;
                float originalZoomFactor = 1.0f;
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenterTestHooksHelper.ResetExpressionAnimationStatusChanges(scrollPresenter);

                    if (hookViewChangingAndChanged)
                    {
                        scrollPresenter.ScrollStarting += (sender, args) =>
                        {
                            Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                        };

                        scrollPresenter.ZoomStarting += (sender, args) =>
                        {
                            Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                        };

                        scrollPresenter.ViewChanged += (sender, args) =>
                        {
                            Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                        };
                    }

                    originalHorizontalOffset = scrollPresenter.HorizontalOffset;
                    originalVerticalOffset = scrollPresenter.VerticalOffset;
                    originalZoomFactor = scrollPresenter.ZoomFactor;

                    Log.Comment($"Original HorizontalOffset={originalHorizontalOffset}, VerticalOffset={originalVerticalOffset}, ZoomFactor={originalZoomFactor}");

                    operation = StartAddScrollVelocity(
                        scrollPresenter,
                        horizontalVelocity,
                        verticalVelocity,
                        horizontalInertiaDecayRate,
                        verticalInertiaDecayRate,
                        scrollPresenterViewChangeOperationEvent);
                });

                if (waitForViewChangeCompletion)
                {
                    WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                    RunOnUIThread.Execute(() =>
                    {
                        Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                        if (horizontalVelocity > 0)
                            Verify.IsTrue(originalHorizontalOffset < scrollPresenter.HorizontalOffset);
                        else if (horizontalVelocity < 0)
                            Verify.IsTrue(originalHorizontalOffset > scrollPresenter.HorizontalOffset);
                        else
                            Verify.IsTrue(originalHorizontalOffset == scrollPresenter.HorizontalOffset);
                        if (verticalVelocity > 0)
                            Verify.IsTrue(originalVerticalOffset < scrollPresenter.VerticalOffset);
                        else if (verticalVelocity < 0)
                            Verify.IsTrue(originalVerticalOffset > scrollPresenter.VerticalOffset);
                        else
                            Verify.IsTrue(originalVerticalOffset == scrollPresenter.VerticalOffset);
                        Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
                        Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                    });

                    Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
                    CompositionPropertySpy.SynchronouslyTickUIThread(6);

                    RunOnUIThread.Execute(() =>
                    {
                        List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
                        ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
                        Verify.IsNull(expressionAnimationStatusChanges);
                    });
                }
            }
        }

void AddSnapPoints | ( | ScrollPresenter | scrollPresenter,
 |  | StackPanel | stackPanel |
 | ) |  |  | [inline, private]

Definition at line 1253 of file ScrollPresenterBringIntoViewTests.cs.

        {
            Verify.IsNotNull(scrollPresenter);

            if (stackPanel == null || stackPanel.Children.Count == 0)
            {
                return;
            }

            Log.Comment("Populating snap points for " + scrollPresenter.Name + ":");

            ScrollSnapPoint scrollSnapPoint;
            GeneralTransform gt = stackPanel.TransformToVisual(scrollPresenter.Content);
            Point stackPanelOriginPoint = new Point();
            stackPanelOriginPoint = gt.TransformPoint(stackPanelOriginPoint);

            if (stackPanel.Orientation == Orientation.Horizontal)
            {
                scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.X, ScrollSnapPointsAlignment.Near);
                Log.Comment("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.X);
                scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
            }
            else
            {
                scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.Y, ScrollSnapPointsAlignment.Near);
                Log.Comment("Adding vertical snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.Y);
                scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
            }

            foreach (UIElement child in stackPanel.Children)
            {
                FrameworkElement childAsFE = child as FrameworkElement;

                if (childAsFE != null)
                {
                    gt = childAsFE.TransformToVisual(stackPanel);
                    Point childOriginPoint = new Point();
                    childOriginPoint = gt.TransformPoint(childOriginPoint);

                    double snapPointValue = 0.0;
                    Thickness margin = childAsFE.Margin;

                    if (stackPanel.Orientation == Orientation.Horizontal)
                    {
                        snapPointValue = margin.Right + childAsFE.ActualWidth + childOriginPoint.X;
                        if (snapPointValue <= scrollPresenter.ScrollableWidth)
                        {
                            scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
                            Log.Comment("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
                            scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
                        }
                        else
                        {
                            break;
                        }
                    }
                    else
                    {
                        snapPointValue = margin.Bottom + childAsFE.ActualHeight + childOriginPoint.Y;
                        if (snapPointValue <= scrollPresenter.ScrollableHeight)
                        {
                            scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
                            Log.Comment("Adding vertical snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
                            scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
                        }
                        else
                        {
                            break;
                        }
                    }
                }

                AddSnapPoints(scrollPresenter, child as StackPanel);
            }
        }

void AddZoomVelocity | ( | ScrollPresenter | scrollPresenter,
 |  | float | zoomFactorVelocity,
 |  | float? | inertiaDecayRate,
 |  | float | centerPointX,
 |  | float | centerPointY,
 |  | bool | waitForViewChangeCompletion = true,
 |  | bool | hookViewChangingAndChanged = true |
 | ) |  |  | [inline, private]

Definition at line 2256 of file ScrollPresenterViewChangeTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: false,
                enableInteractionSourcesNotifications: false,
                enableExpressionAnimationStatusNotifications: true))
            {
                float originalZoomFactor = 1.0f;
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    if (hookViewChangingAndChanged)
                    {
                        scrollPresenter.ScrollStarting += (sender, args) =>
                        {
                            Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                        };

                        scrollPresenter.ZoomStarting += (sender, args) =>
                        {
                            Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                        };

                        scrollPresenter.ViewChanged += (sender, args) =>
                        {
                            Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                        };
                    }

                    originalZoomFactor = scrollPresenter.ZoomFactor;

                    Log.Comment($"Original HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={originalZoomFactor}");

                    operation = StartAddZoomVelocity(
                        scrollPresenter,
                        zoomFactorVelocity,
                        inertiaDecayRate,
                        centerPointX,
                        centerPointY,
                        scrollPresenterViewChangeOperationEvent);
                });

                if (waitForViewChangeCompletion)
                {
                    WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                    RunOnUIThread.Execute(() =>
                    {
                        Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                        if (zoomFactorVelocity > 0)
                            Verify.IsTrue(originalZoomFactor < scrollPresenter.ZoomFactor);
                        else if (zoomFactorVelocity < 0)
                            Verify.IsTrue(originalZoomFactor > scrollPresenter.ZoomFactor);
                        else
                            Verify.IsTrue(originalZoomFactor == scrollPresenter.ZoomFactor);
                        Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                    });

                    Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
                    CompositionPropertySpy.SynchronouslyTickUIThread(6);

                    RunOnUIThread.Execute(() =>
                    {
                        List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
                        ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
                        VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(expressionAnimationStatusChanges);
                    });
                }
            }
        }

void AnchoringAtAlmostBottomEdge ( ) [inline]

Definition at line 421 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtAlmostFarEdge(Orientation.Vertical);
        }

void AnchoringAtAlmostFarEdge ( Orientation orientation ) [inline, private]

Definition at line 426 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                ScrollPresenter scrollPresenter = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultAnchoringUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                ZoomTo(scrollPresenter, 2.0f, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                double horizontalOffset = 0.0;
                double verticalOffset = 0.0;

                RunOnUIThread.Execute(() =>
                {
                    if (orientation == Orientation.Vertical)
                    {
                        verticalOffset = scrollPresenter.ExtentHeight * 2.0 - scrollPresenter.Height - 1.0;
                        scrollPresenter.VerticalAnchorRatio = 1.0;
                    }
                    else
                    {
                        horizontalOffset = scrollPresenter.ExtentWidth * 2.0 - scrollPresenter.Width - 1.0;
                        scrollPresenter.HorizontalAnchorRatio = 1.0;
                    }
                });

                ScrollTo(scrollPresenter, horizontalOffset, verticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, false /*hookViewChangingAndChanged*/);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Inserting child at far edge");
                    InsertStackPanelChild((scrollPresenter.Content as Border).Child as StackPanel, 1 /*operationCount*/, c_defaultAnchoringUIStackPanelChildrenCount /*newIndex*/, 1 /*newCount*/);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("No ScrollPresenter offset change expected");
                    if (orientation == Orientation.Vertical)
                    {
                        Verify.AreEqual(scrollPresenter.VerticalOffset, verticalOffset);
                    }
                    else
                    {
                        Verify.AreEqual(scrollPresenter.HorizontalOffset, horizontalOffset);
                    }

                    Log.Comment("ScrollPresenter CurrentAnchor is " + (scrollPresenter.CurrentAnchor == null ? "null" : "non-null"));
                    Verify.IsNotNull(scrollPresenter.CurrentAnchor);
                });
            }
        }

void AnchoringAtAlmostLeftEdge ( ) [inline]

Definition at line 340 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtAlmostNearEdge(Orientation.Horizontal);
        }

void AnchoringAtAlmostNearEdge ( Orientation orientation ) [inline, private]

Definition at line 352 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                ScrollPresenter scrollPresenter = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultAnchoringUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                double horizontalOffset = orientation == Orientation.Vertical ? 0.0 : 1.0;
                double verticalOffset = orientation == Orientation.Vertical ? 1.0 : 0.0;

                ScrollTo(scrollPresenter, horizontalOffset, verticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                    {
                        Log.Comment("ViewChanged - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                        Log.Comment("ViewChanged - CurrentAnchor is " + (sender.CurrentAnchor == null ? "null" : "non-null"));
                        scrollPresenterViewChangedEvent.Set();
                    };

                    Log.Comment("Inserting child at near edge");
                    InsertStackPanelChild((scrollPresenter.Content as Border).Child as StackPanel, 1 /*operationCount*/, 0 /*newIndex*/, 1 /*newCount*/);
                });

                WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("ScrollPresenter offset change expected");
                    if (orientation == Orientation.Vertical)
                    {
                        Verify.AreEqual(127.0, scrollPresenter.VerticalOffset);
                    }
                    else
                    {
                        Verify.AreEqual(127.0, scrollPresenter.HorizontalOffset);
                    }

                    Log.Comment("ScrollPresenter CurrentAnchor is " + (scrollPresenter.CurrentAnchor == null ? "null" : "non-null"));
                    Verify.IsNotNull(scrollPresenter.CurrentAnchor);
                });
            }
        }

void AnchoringAtAlmostRightEdge ( ) [inline]

Definition at line 414 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtAlmostFarEdge(Orientation.Horizontal);
        }

void AnchoringAtAlmostTopEdge ( ) [inline]

Definition at line 347 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtAlmostNearEdge(Orientation.Vertical);
        }

void AnchoringAtBottomEdgeWhileDecreasingViewportHeight ( ) [inline]

Definition at line 241 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileDecreasingViewport(Orientation.Vertical);
        }

void AnchoringAtBottomEdgeWhileIncreasingContentAndDecreasingViewportHeight ( ) [inline]

Definition at line 125 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileIncreasingContent(Orientation.Vertical, -10 /*viewportSizeChange*/, 3886 /*expectedFinalOffset*/);
        }

void AnchoringAtBottomEdgeWhileIncreasingContentAndViewportHeight ( ) [inline]

Definition at line 111 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileIncreasingContent(Orientation.Vertical, 10 /*viewportSizeChange*/, 3866 /*expectedFinalOffset*/);
        }

void AnchoringAtBottomEdgeWhileIncreasingContentHeight ( ) [inline]

Definition at line 97 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileIncreasingContent(Orientation.Vertical, 0 /*viewportSizeChange*/, 3876 /*expectedFinalOffset*/);
        }

void AnchoringAtFarEdgeWhileDecreasingViewport ( Orientation orientation ) [inline, private]

Definition at line 246 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                ScrollPresenter scrollPresenter = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultAnchoringUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                ZoomTo(scrollPresenter, 2.0f, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                double horizontalOffset = 0.0;
                double verticalOffset = 0.0;

                RunOnUIThread.Execute(() =>
                {
                    if (orientation == Orientation.Vertical)
                    {
                        verticalOffset = scrollPresenter.ExtentHeight * 2.0 - scrollPresenter.Height;
                        scrollPresenter.VerticalAnchorRatio = 1.0;
                    }
                    else
                    {
                        horizontalOffset = scrollPresenter.ExtentWidth * 2.0 - scrollPresenter.Width;
                        scrollPresenter.HorizontalAnchorRatio = 1.0;
                    }
                });

                ScrollTo(scrollPresenter, horizontalOffset, verticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, false /*hookViewChangingAndChanged*/);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                    {
                        Log.Comment("ViewChanged - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                        Log.Comment("ViewChanged - CurrentAnchor is " + (sender.CurrentAnchor == null ? "null" : "non-null"));
                        scrollPresenterViewChangedEvent.Set();
                    };

                    scrollPresenter.AnchorRequested += delegate (ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args)
                    {
                        Log.Comment("AnchorRequested - AnchorCandidates.Count={0}", args.AnchorCandidates.Count);
                    };

                    if (orientation == Orientation.Vertical)
                    {
                        Log.Comment("Decreasing viewport height");
                        scrollPresenter.Height -= 100;
                    }
                    else
                    {
                        Log.Comment("Decreasing viewport width");
                        scrollPresenter.Width -= 100;
                    }
                });

                WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    if (orientation == Orientation.Vertical)
                    {
                        verticalOffset = scrollPresenter.ExtentHeight * 2.0 - scrollPresenter.Height;
                    }
                    else
                    {
                        horizontalOffset = scrollPresenter.ExtentWidth * 2.0 - scrollPresenter.Width;
                    }

                    Log.Comment("ScrollPresenter offset change expected");
                    Verify.AreEqual(scrollPresenter.HorizontalOffset, horizontalOffset);
                    Verify.AreEqual(scrollPresenter.VerticalOffset, verticalOffset);

                    Log.Comment("ScrollPresenter CurrentAnchor is " + (scrollPresenter.CurrentAnchor == null ? "null" : "non-null"));
                    Verify.IsNull(scrollPresenter.CurrentAnchor);
                });
            }
        }

void AnchoringAtFarEdgeWhileIncreasingContent | ( | Orientation | orientation,
 |  | double | viewportSizeChange,
 |  | double | expectedFinalOffset |
 | ) |  |  | [inline, private]

Definition at line 130 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                ScrollPresenter scrollPresenter = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultAnchoringUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                ZoomTo(scrollPresenter, 2.0f, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                double horizontalOffset = 0.0;
                double verticalOffset = 0.0;

                RunOnUIThread.Execute(() =>
                {
                    if (orientation == Orientation.Vertical)
                    {
                        verticalOffset = scrollPresenter.ExtentHeight * 2.0 - scrollPresenter.Height;
                        scrollPresenter.VerticalAnchorRatio = 1.0;
                    }
                    else
                    {
                        horizontalOffset = scrollPresenter.ExtentWidth * 2.0 - scrollPresenter.Width;
                        scrollPresenter.HorizontalAnchorRatio = 1.0;
                    }
                });

                ScrollTo(scrollPresenter, horizontalOffset, verticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, false /*hookViewChangingAndChanged*/);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                    {
                        Log.Comment("ViewChanged - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                        Log.Comment("ViewChanged - CurrentAnchor is " + (sender.CurrentAnchor == null ? "null" : "non-null"));
                        if ((orientation == Orientation.Vertical && expectedFinalOffset == sender.VerticalOffset) ||
                            (orientation == Orientation.Horizontal && expectedFinalOffset == sender.HorizontalOffset))
                        {
                            scrollPresenterViewChangedEvent.Set();
                        }
                    };

                    scrollPresenter.AnchorRequested += delegate (ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args)
                    {
                        Log.Comment("AnchorRequested - AnchorCandidates.Count={0}", args.AnchorCandidates.Count);
                    };

                    Log.Comment("Inserting child at far edge");
                    InsertStackPanelChild((scrollPresenter.Content as Border).Child as StackPanel, 1 /*operationCount*/, c_defaultAnchoringUIStackPanelChildrenCount /*newIndex*/, 1 /*newCount*/);

                    if (viewportSizeChange != 0)
                    {
                        if (orientation == Orientation.Vertical)
                        {
                            Log.Comment("Changing viewport height");
                            scrollPresenter.Height += viewportSizeChange;
                        }
                        else
                        {
                            Log.Comment("Changing viewport width");
                            scrollPresenter.Width += viewportSizeChange;
                        }
                    }
                });

                WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    if (orientation == Orientation.Vertical)
                    {
                        verticalOffset = scrollPresenter.ExtentHeight * 2.0 - scrollPresenter.Height;
                    }
                    else
                    {
                        horizontalOffset = scrollPresenter.ExtentWidth * 2.0 - scrollPresenter.Width;
                    }

                    Log.Comment("ScrollPresenter offset change expected");
                    Verify.AreEqual(scrollPresenter.HorizontalOffset, horizontalOffset);
                    Verify.AreEqual(scrollPresenter.VerticalOffset, verticalOffset);

                    Log.Comment("ScrollPresenter CurrentAnchor is " + (scrollPresenter.CurrentAnchor == null ? "null" : "non-null"));
                    Verify.IsNull(scrollPresenter.CurrentAnchor);
                });
            }
        }

void AnchoringAtLeftEdge ( ) [inline]

Definition at line 34 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtNearEdge(Orientation.Horizontal);
        }

void AnchoringAtNearEdge ( Orientation orientation ) [inline, private]

Definition at line 46 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                ScrollPresenter scrollPresenter = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultAnchoringUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Inserting child at near edge");
                    InsertStackPanelChild((scrollPresenter.Content as Border).Child as StackPanel, 1 /*operationCount*/, 0 /*newIndex*/, 1 /*newCount*/);
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("No ScrollPresenter offset change expected");
                    if (orientation == Orientation.Vertical)
                    {
                        Verify.AreEqual(0, scrollPresenter.VerticalOffset);
                    }
                    else
                    {
                        Verify.AreEqual(0, scrollPresenter.HorizontalOffset);
                    }
                });
            }
        }

void AnchoringAtRepeaterMiddle ( ) [inline]

Definition at line 811 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
                {
                    ScrollPresenter scrollPresenter = null;
                    AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                    AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);

                    RunOnUIThread.Execute(() =>
                    {
                        scrollPresenter = new ScrollPresenter();

                        SetupRepeaterAnchoringUI(scrollPresenter, scrollPresenterLoadedEvent);

                        scrollPresenter.HorizontalAnchorRatio = double.NaN;
                        scrollPresenter.VerticalAnchorRatio = 0.5;
                    });

                    WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                    ZoomTo(scrollPresenter, 2.0f, 0.0f, 0.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);
                    ScrollTo(scrollPresenter, 0.0, 250.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, false /*hookViewChangingAndChanged*/);

                    ItemsRepeater repeater = null;
                    TestDataSource dataSource = null;

                    RunOnUIThread.Execute(() =>
                    {
                        repeater = (scrollPresenter.Content as Border).Child as ItemsRepeater;
                        dataSource = repeater.ItemsSource as TestDataSource;

                        scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args) {
                            scrollPresenterViewChangedEvent.Set();
                        };

                        Log.Comment("Inserting items at the beginning");
                        dataSource.Insert(0 /*index*/, 2 /*count*/);
                    });

                    WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);

                    RunOnUIThread.Execute(() =>
                    {
                        Log.Comment("ScrollPresenter offset change expected");
                        Verify.AreEqual(520.0, scrollPresenter.VerticalOffset);
                    });

                    RunOnUIThread.Execute(() =>
                    {
                        scrollPresenterViewChangedEvent.Reset();

                        Log.Comment("Removing items from the beginning");
                        dataSource.Remove(0 /*index*/, 2 /*count*/);
                    });

                    WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);

                    RunOnUIThread.Execute(() =>
                    {
                        Log.Comment("ScrollPresenter offset change expected");
                        Verify.AreEqual(250.0, scrollPresenter.VerticalOffset);

                        Log.Comment("ScrollPresenter CurrentAnchor is " + (scrollPresenter.CurrentAnchor == null ? "null" : "non-null"));
                        Verify.IsNotNull(scrollPresenter.CurrentAnchor);
                    });
                }
            }
        }

void AnchoringAtRightEdgeWhileDecreasingViewportWidth ( ) [inline]

Definition at line 234 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileDecreasingViewport(Orientation.Horizontal);
        }

void AnchoringAtRightEdgeWhileIncreasingContentAndDecreasingViewportWidth ( ) [inline]

Definition at line 118 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileIncreasingContent(Orientation.Horizontal, -10 /*viewportSizeChange*/, 3886 /*expectedFinalOffset*/);
        }

void AnchoringAtRightEdgeWhileIncreasingContentAndViewportWidth ( ) [inline]

Definition at line 104 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileIncreasingContent(Orientation.Horizontal, 10 /*viewportSizeChange*/, 3866 /*expectedFinalOffset*/);
        }

void AnchoringAtRightEdgeWhileIncreasingContentWidth ( ) [inline]

Definition at line 90 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtFarEdgeWhileIncreasingContent(Orientation.Horizontal, 0 /*viewportSizeChange*/, 3876 /*expectedFinalOffset*/);
        }

void AnchoringAtTopEdge ( ) [inline]

Definition at line 41 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringAtNearEdge(Orientation.Vertical);
        }

void AnchoringElementWithGrowningViewport ( ) [inline]

Definition at line 501 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringElementWithResizedViewport(Orientation.Vertical, 100.0);
        }

void AnchoringElementWithResizedViewport | ( | Orientation | orientation,
 |  | double | viewportSizeChange |
 | ) |  |  | [inline, private]

Definition at line 506 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                ScrollPresenter scrollPresenter = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultAnchoringUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                ZoomTo(scrollPresenter, 2.0f, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                double horizontalOffset = 0.0;
                double verticalOffset = 0.0;

                RunOnUIThread.Execute(() =>
                {
                    if (orientation == Orientation.Vertical)
                    {
                        verticalOffset = (scrollPresenter.ExtentHeight * 2.0 - scrollPresenter.Height) / 2.0;
                        scrollPresenter.VerticalAnchorRatio = 0.5;
                    }
                    else
                    {
                        horizontalOffset = (scrollPresenter.ExtentWidth * 2.0 - scrollPresenter.Width) / 2.0;
                        scrollPresenter.HorizontalAnchorRatio = 0.5;
                    }
                });

                ScrollTo(scrollPresenter, horizontalOffset, verticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, false /*hookViewChangingAndChanged*/);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("ScrollPresenter view prior to viewport size change: HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                    scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                    {
                        Log.Comment("ViewChanged - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                        Log.Comment("ViewChanged - CurrentAnchor is " + (sender.CurrentAnchor == null ? "null" : "non-null"));
                        scrollPresenterViewChangedEvent.Set();
                    };

                    if (orientation == Orientation.Vertical)
                    {
                        Log.Comment("Changing viewport height");
                        scrollPresenter.Height += viewportSizeChange;
                    }
                    else
                    {
                        Log.Comment("Changing viewport width");
                        scrollPresenter.Width += viewportSizeChange;
                    }
                });

                WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("ScrollPresenter view after viewport size change: HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
                    Log.Comment("Expecting offset change equal to half the viewport size change");
                    if (orientation == Orientation.Vertical)
                    {
                        Verify.AreEqual(scrollPresenter.VerticalOffset, verticalOffset - viewportSizeChange / 2.0);
                    }
                    else
                    {
                        Verify.AreEqual(scrollPresenter.HorizontalOffset, horizontalOffset - viewportSizeChange / 2.0);
                    }

                    Log.Comment("ScrollPresenter CurrentAnchor is " + (scrollPresenter.CurrentAnchor == null ? "null" : "non-null"));
                    Verify.IsNotNull(scrollPresenter.CurrentAnchor);
                });
            }
        }

void AnchoringElementWithShrinkingViewport ( ) [inline]

Definition at line 494 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringElementWithResizedViewport(Orientation.Horizontal, -100.0);
        }

void AnchoringWithOffsetCoercion ( bool reduceAnchorOffset ) [inline, private]

Definition at line 706 of file ScrollPresenterAnchoringTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: true,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications: false))
            {
                ScrollPresenter scrollPresenter = null;
                Border anchorElement = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterAnchorRequestedEvent = new AutoResetEvent(false);

                // This test validates that the ScrollPresenter accounts for maximum vertical offset (based on viewport and content extent)
                // when calculating the vertical offset shift for anchoring. The vertical offset cannot exceed content extent - viewport.

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Visual tree setup");
                    anchorElement = new Border
                    {
                        Width = 100,
                        Height = 100,
                        Background = new SolidColorBrush(Microsoft.UI.Colors.Red),
                        Margin = new Thickness(0, 600, 0, 0),
                        VerticalAlignment = VerticalAlignment.Top
                    };

                    Grid grid = new Grid();
                    grid.Children.Add(anchorElement);
                    grid.Width = 200;
                    grid.Height = 1000;
                    grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Gray);

                    scrollPresenter = new ScrollPresenter
                    {
                        Content = grid,
                        Width = 200,
                        Height = 200
                    };

                    scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                    {
                        Log.Comment("ScrollPresenter.Loaded event handler");
                        scrollPresenterLoadedEvent.Set();
                    };

                    scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                    {
                        Log.Comment("ViewChanged - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                            sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                        Log.Comment("ViewChanged - CurrentAnchor is " + (sender.CurrentAnchor == null ? "null" : "non-null"));
                        if ((reduceAnchorOffset && sender.VerticalOffset == 400) ||
                            (!reduceAnchorOffset && sender.VerticalOffset == 500))
                        {
                            scrollPresenterViewChangedEvent.Set();
                        }
                    };

                    scrollPresenter.AnchorRequested += delegate (ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args)
                    {
                        Log.Comment("AnchorRequested - Forcing the red Border to be the ScrollPresenter anchor.");
                        args.AnchorElement = anchorElement;
                        scrollPresenterAnchorRequestedEvent.Set();
                    };

                    Log.Comment("Setting window content");
                    Content = scrollPresenter;
                });

                WaitForEvent("Waiting for ScrollPresenter.Loaded event", scrollPresenterLoadedEvent);
                IdleSynchronizer.Wait();

                ScrollTo(scrollPresenter, 0.0, 600.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                RunOnUIThread.Execute(() =>
                {
                    Verify.AreEqual(600, scrollPresenter.VerticalOffset);

                    Log.Comment("ScrollPresenter.Content height is reduced by 300px. ScrollPresenter.VerticalOffset is expected to be reduced by 100px (600 -> 500).");
                    (scrollPresenter.Content as Grid).Height = 700;
                    if (reduceAnchorOffset)
                    {
                        Log.Comment("Tracked element is shifted up by 200px within the ScrollPresenter.Content (600 -> 400). Anchoring is expected to reduce the VerticalOffset by half of that (500 -> 400).");
                        anchorElement.Margin = new Thickness(0, 400, 0, 0);
                    }
                    scrollPresenterViewChangedEvent.Reset();
                });

                WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);
                WaitForEvent("Waiting for ScrollPresenter.AnchorRequested event", scrollPresenterAnchorRequestedEvent);
                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    Verify.AreEqual(reduceAnchorOffset ? 400 : 500, scrollPresenter.VerticalOffset);

                    Log.Comment("ScrollPresenter CurrentAnchor is " + (scrollPresenter.CurrentAnchor == null ? "null" : "non-null"));
                    Verify.IsNotNull(scrollPresenter.CurrentAnchor);
                });
            }
        }

void AnchoringWithReducedExtent ( ) [inline]

Definition at line 694 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringWithOffsetCoercion(false /*reduceAnchorOffset*/);
        }

void AnchoringWithReducedExtentAndAnchorOffset ( ) [inline]

Definition at line 701 of file ScrollPresenterAnchoringTests.cs.

        {
            AnchoringWithOffsetCoercion(true /*reduceAnchorOffset*/);
        }

void AnimateOffsetsBeforeLoading ( ) [inline]

Definition at line 1394 of file ScrollPresenterViewChangeTests.cs.

        {
            ChangeOffsetsBeforeLoading(true /*animate*/);
        }

void AnimateZoomFactorBeforeLoading ( ) [inline]

Definition at line 1408 of file ScrollPresenterViewChangeTests.cs.

        {
            ChangeZoomFactorBeforeLoading(true /*animate*/);
        }

void BasicAlignment ( ) [inline]

Definition at line 139 of file ScrollPresenterLayoutTests.cs.

        {
            const float c_smallZoomFactor = 0.15f;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            float horizontalOffset = 0.0f;
            float verticalOffset = 0.0f;
            float zoomFactor = 1.0f;
            Compositor compositor = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
                compositor = CompositionTarget.GetCompositorForCurrentThread();
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
            IdleSynchronizer.Wait();

            // Jump to absolute small zoomFactor to make the content smaller than the viewport.
            ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Stretch/Strech alignments");
                Verify.AreEqual(HorizontalAlignment.Stretch, rectangleScrollPresenterContent.HorizontalAlignment);
                Verify.AreEqual(VerticalAlignment.Stretch, rectangleScrollPresenterContent.VerticalAlignment);
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.IsTrue(Math.Abs(horizontalOffset - (float)(c_defaultUIScrollPresenterWidth - c_defaultUIScrollPresenterContentWidth * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
            Verify.IsTrue(Math.Abs(verticalOffset - (float)(c_defaultUIScrollPresenterHeight - c_defaultUIScrollPresenterContentHeight * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Left/Top alignments");
                rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Left;
                rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Top;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.AreEqual(0.0f, horizontalOffset);
            Verify.AreEqual(0.0f, verticalOffset);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Right/Bottom alignments");
                rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Right;
                rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Bottom;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.IsTrue(Math.Abs(horizontalOffset - (float)(c_defaultUIScrollPresenterWidth - c_defaultUIScrollPresenterContentWidth * c_smallZoomFactor)) < c_defaultOffsetResultTolerance);
            Verify.IsTrue(Math.Abs(verticalOffset - (float)(c_defaultUIScrollPresenterHeight - c_defaultUIScrollPresenterContentHeight * c_smallZoomFactor)) < c_defaultOffsetResultTolerance);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Center/Center alignments");
                rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Center;
                rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Center;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.IsTrue(Math.Abs(horizontalOffset - (float)(c_defaultUIScrollPresenterWidth - c_defaultUIScrollPresenterContentWidth * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
            Verify.IsTrue(Math.Abs(verticalOffset - (float)(c_defaultUIScrollPresenterHeight - c_defaultUIScrollPresenterContentHeight * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);
        }

void BasicImageWithConstrainedHeight ( ) [inline]

Definition at line 788 of file ScrollPresenterLayoutTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                const float c_smallZoomFactor = 0.5f;
                const double c_imageWidth = 250.0;
                ScrollPresenter scrollPresenter = null;
                Image imageScrollPresenterContent = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                Compositor compositor = null;

                RunOnUIThread.Execute(() =>
                {
                    imageScrollPresenterContent = new Image();
                    scrollPresenter = new ScrollPresenter();

                    Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
                    Verify.IsNotNull(uri);
                    imageScrollPresenterContent.Source = new BitmapImage(uri);
                    scrollPresenter.Content = imageScrollPresenterContent;
                    scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);

                    SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);

                // Constraining the Image height and making the ScrollPresenter smaller than the Image
                imageScrollPresenterContent.Width = c_imageWidth;
                    scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
                    compositor = CompositionTarget.GetCompositorForCurrentThread();
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                ValidateContentWithConstrainedHeight(
                    compositor,
                    scrollPresenter,
                    content: imageScrollPresenterContent,
                    verticalAlignment: VerticalAlignment.Stretch,
                    topMargin: 0.0,
                    bottomMargin: 0.0,
                    expectedMinPosition: 0f,
                    expectedZoomFactor: 1.0f);

                // Jump to absolute small zoomFactor to make the content smaller than the viewport.
                ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                ValidateContentWithConstrainedHeight(
                    compositor,
                    scrollPresenter,
                    content: imageScrollPresenterContent,
                    verticalAlignment: VerticalAlignment.Stretch,
                    topMargin: 0.0,
                    bottomMargin: 0.0,
                    expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor / 2.0), // -50
                    expectedZoomFactor: c_smallZoomFactor);
            }
        }

void BasicImageWithConstrainedWidth ( ) [inline]

Definition at line 604 of file ScrollPresenterLayoutTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                const double c_imageHeight = 300.0;
                const double c_scrollPresenterWidth = 200.0;
                ScrollPresenter scrollPresenter = null;
                Image imageScrollPresenterContent = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                Compositor compositor = null;

                RunOnUIThread.Execute(() =>
                {
                    imageScrollPresenterContent = new Image();
                    scrollPresenter = new ScrollPresenter();

                    Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
                    Verify.IsNotNull(uri);
                    imageScrollPresenterContent.Source = new BitmapImage(uri);
                    scrollPresenter.Content = imageScrollPresenterContent;
                    scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);

                    SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);

                // Constraining the Image width and making the ScrollPresenter smaller than the Image
                imageScrollPresenterContent.Height = c_imageHeight;
                    scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
                    scrollPresenter.Width = c_scrollPresenterWidth;
                    compositor = CompositionTarget.GetCompositorForCurrentThread();
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                ValidateContentWithConstrainedWidth(
                    compositor,
                    scrollPresenter,
                    content: imageScrollPresenterContent,
                    horizontalAlignment: HorizontalAlignment.Stretch,
                    leftMargin: 0.0,
                    rightMargin: 0.0,
                    expectedMinPosition: 0.0f,
                    expectedZoomFactor: 1.0f);
            }
        }

void BasicMargin ( ) [inline]

Definition at line 36 of file ScrollPresenterLayoutTests.cs.

        {
            const double c_Margin = 50.0;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Adding positive Margin to ScrollPresenter.Content");
                rectangleScrollPresenterContent.Margin = new Thickness(c_Margin);
            });

            // Try to jump beyond maximum offsets
            ScrollTo(
                scrollPresenter,
                c_defaultUIScrollPresenterContentWidth + 2 * c_Margin - c_defaultUIScrollPresenterWidth + 10.0,
                c_defaultUIScrollPresenterContentHeight + 2 * c_Margin - c_defaultUIScrollPresenterHeight + 10.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: true,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: c_defaultUIScrollPresenterContentWidth + 2 * c_Margin - c_defaultUIScrollPresenterWidth,
                expectedFinalVerticalOffset: c_defaultUIScrollPresenterContentHeight + 2 * c_Margin - c_defaultUIScrollPresenterHeight);

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Adding negative Margin to ScrollPresenter.Content");
                rectangleScrollPresenterContent.Margin = new Thickness(-c_Margin);
            });

            // Try to jump beyond maximum offsets
            ScrollTo(
                scrollPresenter,
                c_defaultUIScrollPresenterContentWidth - 2 * c_Margin - c_defaultUIScrollPresenterWidth + 10.0,
                c_defaultUIScrollPresenterContentHeight - 2 * c_Margin - c_defaultUIScrollPresenterHeight + 10.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: c_defaultUIScrollPresenterContentWidth - 2 * c_Margin - c_defaultUIScrollPresenterWidth,
                expectedFinalVerticalOffset: c_defaultUIScrollPresenterContentHeight - 2 * c_Margin - c_defaultUIScrollPresenterHeight);
        }

void BasicMarginAndAlignment ( ) [inline]

Definition at line 380 of file ScrollPresenterLayoutTests.cs.

        {
            const float c_smallZoomFactor = 0.15f;
            const double c_Margin = 40.0;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            float horizontalOffset = 0.0f;
            float verticalOffset = 0.0f;
            float zoomFactor = 1.0f;
            Compositor compositor = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);

                Log.Comment("Adding positive Margin to ScrollPresenter.Content");
                rectangleScrollPresenterContent.Margin = new Thickness(c_Margin);
                compositor = CompositionTarget.GetCompositorForCurrentThread();
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
            IdleSynchronizer.Wait();

            // Jump to absolute small zoomFactor to make the content smaller than the viewport.
            ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Stretch/Strech alignments");
                Verify.AreEqual(HorizontalAlignment.Stretch, rectangleScrollPresenterContent.HorizontalAlignment);
                Verify.AreEqual(VerticalAlignment.Stretch, rectangleScrollPresenterContent.VerticalAlignment);

            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.IsTrue(Math.Abs(horizontalOffset - 20.0f) < c_defaultOffsetResultTolerance);
            Verify.IsTrue(Math.Abs(verticalOffset - 15.0f) < c_defaultOffsetResultTolerance);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Left/Top alignments");
                rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Left;
                rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Top;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.IsTrue(Math.Abs(horizontalOffset + 34.0f) < c_defaultOffsetResultTolerance);
            Verify.IsTrue(Math.Abs(verticalOffset + 34.0f) < c_defaultOffsetResultTolerance);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Right/Bottom alignments");
                rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Right;
                rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Bottom;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.IsTrue(Math.Abs(horizontalOffset - 74.0f) < c_defaultOffsetResultTolerance);
            Verify.IsTrue(Math.Abs(verticalOffset - 64.0f) < c_defaultOffsetResultTolerance);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Covering Center/Center alignments");
                rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Center;
                rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Center;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            Verify.IsTrue(Math.Abs(horizontalOffset - 20.0f) < c_defaultOffsetResultTolerance);
            Verify.IsTrue(Math.Abs(verticalOffset - 15.0f) < c_defaultOffsetResultTolerance);
            Verify.AreEqual(c_smallZoomFactor, zoomFactor);
        }

void BasicOffsetChanges ( ) [inline]

Definition at line 47 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Jump to absolute offsets
            ScrollTo(scrollPresenter, 11.0, 22.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
            ScrollTo(scrollPresenter, 22.0, 11.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);

            // Jump to relative offsets
            ScrollBy(scrollPresenter, -4.0, 15.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
            ScrollBy(scrollPresenter, 15.0, 4.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);

            // Animate to absolute offsets
            ScrollTo(scrollPresenter, 55.0, 25.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
            ScrollTo(scrollPresenter, 5.0, 75.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);

            // Jump or animate to absolute offsets based on UISettings.AnimationsEnabled
            ScrollTo(scrollPresenter, 55.0, 25.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);

            // Animate to relative offsets
            ScrollBy(scrollPresenter, 700.0, -8.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
            ScrollBy(scrollPresenter, -80.0, 200.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);

            // Jump or animate to relative offsets based on UISettings.AnimationsEnabled
            ScrollBy(scrollPresenter, 80.0, -200.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);

            // Flick with additional offsets velocity
            AddScrollVelocity(scrollPresenter, horizontalVelocity: -65.0f, verticalVelocity: 80.0f, horizontalInertiaDecayRate: null, verticalInertiaDecayRate: null, hookViewChangingAndChanged: false);

            // Flick with additional offsets velocity and custom scroll inertia decay rate
            AddScrollVelocity(scrollPresenter, horizontalVelocity: 65.0f, verticalVelocity: -80.0f, horizontalInertiaDecayRate: 0.7f, verticalInertiaDecayRate: 0.8f, hookViewChangingAndChanged: false);

            // Do it all again while respecting snap points
            ScrollTo(scrollPresenter, 11.0, 22.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
            ScrollBy(scrollPresenter, -4.0, 15.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
            ScrollTo(scrollPresenter, 55.0, 25.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
            ScrollBy(scrollPresenter, 700.0, -8.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
        }

void BasicOffsetsChangeCancelation ( ) [inline]

Definition at line 303 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
            ScrollPresenterOperation operation = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                operation = StartScrollTo(
                    scrollPresenter,
                    600.0,
                    400.0,
                    ScrollingAnimationMode.Enabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvent);

                bool operationCanceled = false;

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");

                    if ((sender.HorizontalOffset >= 150.0 || sender.VerticalOffset >= 100.0) && !operationCanceled)
                    {
                        Log.Comment("Canceling view change");
                        operationCanceled = true;
                        sender.ScrollBy(0, 0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                    }
                };
            });

            WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.IsTrue(scrollPresenter.HorizontalOffset < 600.0);
                Verify.IsTrue(scrollPresenter.VerticalOffset < 400.0);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operation.Result);
            });
        }

void BasicPadding ( ) [inline]

Definition at line 94 of file ScrollPresenterLayoutTests.cs.

        {
            const double c_Padding = 50.0;
            ScrollPresenter scrollPresenter = null;
            Border borderScrollPresenterContent = null;
            Rectangle rectangle = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                borderScrollPresenterContent = new Border();
                rectangle = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                borderScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth;
                borderScrollPresenterContent.Height = c_defaultUIScrollPresenterContentHeight;
                borderScrollPresenterContent.Child = rectangle;
                scrollPresenter.Content = borderScrollPresenterContent;

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Adding Padding to ScrollPresenter.Content");
                borderScrollPresenterContent.Padding = new Thickness(c_Padding);
            });

            // Try to jump beyond maximum offsets
            ScrollTo(
                scrollPresenter,
                c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth + 10.0,
                c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight + 10.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: true,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth,
                expectedFinalVerticalOffset: c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight);
        }

void BasicZoomFactorChangeCancelation ( ) [inline]

Definition at line 362 of file ScrollPresenterViewChangeTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                ScrollPresenter scrollPresenter = null;
                Rectangle rectangleScrollPresenterContent = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollPresenterContent = new Rectangle();
                    scrollPresenter = new ScrollPresenter();
                    scrollPresenter.Name = "scr";

                    SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    operation = StartZoomTo(
                        scrollPresenter,
                        8.0f,
                        100.0f,
                        150.0f,
                        ScrollingAnimationMode.Enabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvent);

                    bool operationCanceled = false;

                    scrollPresenter.ViewChanged += (sender, args) =>
                    {
                        Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");

                        if (sender.ZoomFactor >= 2.0 && !operationCanceled)
                        {
                            Log.Comment("Canceling view change");
                            operationCanceled = true;
                            sender.ZoomBy(0, Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                        }
                    };
                });

                WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                        scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                    Verify.IsTrue(scrollPresenter.ZoomFactor < 8.0f);
                    Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operation.Result);
                });
            }
        }

void BasicZoomFactorChanges ( ) [inline]

Definition at line 100 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Jump to absolute zoomFactor
            ZoomTo(scrollPresenter, 2.0f, 22.0f, 33.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
            ZoomTo(scrollPresenter, 5.0f, 33.0f, 22.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);

            // Jump to relative zoomFactor
            ZoomBy(scrollPresenter, 1.0f, 55.0f, 66.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
            ZoomBy(scrollPresenter, 1.0f, 66.0f, 55.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);

            // Animate to absolute zoomFactor
            ZoomTo(scrollPresenter, 4.0f, -40.0f, -25.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
            ZoomTo(scrollPresenter, 6.0f, 25.0f, 40.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);

            // Jump or animate to absolute zoomFactor based on UISettings.AnimationsEnabled
            ZoomTo(scrollPresenter, 3.0f, 10.0f, 20.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);

            // Animate to relative zoomFactor
            ZoomBy(scrollPresenter, -2.0f, 100.0f, 200.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
            ZoomBy(scrollPresenter, 1.0f, 100.0f, 200.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);

            // Jump or animate to relative zoomFactor based on UISettings.AnimationsEnabled
            ZoomBy(scrollPresenter, 2.0f, 200.0f, 100.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);

            // Flick with additional zoomFactor velocity
            AddZoomVelocity(scrollPresenter, zoomFactorVelocity: 2.0f, inertiaDecayRate: null, centerPointX: -50.0f, centerPointY: 800.0f, waitForViewChangeCompletion: true, hookViewChangingAndChanged: false);

            // Flick with additional zoomFactor velocity and custom zoomFactor inertia decay rate
            AddZoomVelocity(scrollPresenter, zoomFactorVelocity: -2.0f, inertiaDecayRate: 0.75f, centerPointX: -50.0f, centerPointY: 800.0f, waitForViewChangeCompletion: true, hookViewChangingAndChanged: false);
        }

BiDirectionalAlignment BiDirectionalAlignmentFromHorizontalAlignment ( HorizontalAlignment horizontalAlignment ) [inline, private]

Definition at line 1405 of file ScrollPresenterLayoutTests.cs.

        {
            switch (horizontalAlignment)
            {
                case HorizontalAlignment.Stretch:
                    return BiDirectionalAlignment.Stretch;
                case HorizontalAlignment.Left:
                    return BiDirectionalAlignment.Near;
                case HorizontalAlignment.Right:
                    return BiDirectionalAlignment.Far;
                default:
                    return BiDirectionalAlignment.Center;
            }
        }

BiDirectionalAlignment BiDirectionalAlignmentFromVerticalAlignment ( VerticalAlignment verticalAlignment ) [inline, private]

Definition at line 1420 of file ScrollPresenterLayoutTests.cs.

        {
            switch (verticalAlignment)
            {
                case VerticalAlignment.Stretch:
                    return BiDirectionalAlignment.Stretch;
                case VerticalAlignment.Top:
                    return BiDirectionalAlignment.Near;
                case VerticalAlignment.Bottom:
                    return BiDirectionalAlignment.Far;
                default:
                    return BiDirectionalAlignment.Center;
            }
        }

void BringContentWithMarginIntoView ( ) [inline]

Definition at line 536 of file ScrollPresenterBringIntoViewTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle() { Margin = new Thickness(0, 500, 0, 0) };
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter.ViewChanged += (s, e) =>
                {
                    scrollPresenterViewChangedEvent.Set();
                };

                rectangleScrollPresenterContent.StartBringIntoView(new BringIntoViewOptions() { AnimationDesired = false });
            });

            WaitForEvent("Waiting for ViewChanged event", scrollPresenterViewChangedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(500.0, scrollPresenter.VerticalOffset);
            });
        }

void BringElementInNestedScrollPresentersIntoView | ( | Orientation | orientation,
 |  | double | expectedOuterHorizontalOffset,
 |  | double | expectedOuterVerticalOffset,
 |  | double | expectedInnerHorizontalOffset,
 |  | double | expectedInnerVerticalOffset,
 |  | BringIntoViewOptions | options = null,
 |  | double | originalOuterHorizontalOffset = 0.0,
 |  | double | originalOuterVerticalOffset = 0.0,
 |  | float | originalOuterZoomFactor = 1.0f,
 |  | double | originalInnerHorizontalOffset = 0.0,
 |  | double | originalInnerVerticalOffset = 0.0,
 |  | float | originalInnerZoomFactor = 1.0f,
 |  | bool | applySnapPointsInBringingIntoViewHandler = false |
 | ) |  |  | [inline, private]

Definition at line 741 of file ScrollPresenterBringIntoViewTests.cs.

        {
            ScrollPresenter outerScrollPresenter = null;
            ScrollPresenter innerScrollPresenter = null;
            AutoResetEvent outerScrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent innerScrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent outerScrollPresenterViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent innerScrollPresenterViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent outerBringIntoViewCompletedEvent = new AutoResetEvent(false);
            AutoResetEvent innerBringIntoViewCompletedEvent = new AutoResetEvent(false);
            int outerBringIntoViewChangeCorrelationId = -1;
            int innerBringIntoViewChangeCorrelationId = -1;

            RunOnUIThread.Execute(() =>
            {
                outerScrollPresenter = new ScrollPresenter();
                innerScrollPresenter = new ScrollPresenter();

                SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter(orientation, outerScrollPresenter, innerScrollPresenter, outerScrollPresenterLoadedEvent, innerScrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Inner Loaded event", innerScrollPresenterLoadedEvent);
            WaitForEvent("Waiting for Outer Loaded event", outerScrollPresenterLoadedEvent);

            if (originalOuterZoomFactor != 1.0f)
            {
                ZoomTo(outerScrollPresenter, originalOuterZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
            }

            if (originalOuterHorizontalOffset != 0 || originalOuterVerticalOffset != 0)
            {
                ScrollTo(outerScrollPresenter, originalOuterHorizontalOffset, originalOuterVerticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, originalOuterZoomFactor == 1.0f /*hookViewChangingAndChanged*/);
            }

            if (originalInnerZoomFactor != 1.0f)
            {
                ZoomTo(innerScrollPresenter, originalInnerZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
            }

            if (originalInnerHorizontalOffset != 0 || originalInnerVerticalOffset != 0)
            {
                ScrollTo(innerScrollPresenter, originalInnerHorizontalOffset, originalInnerVerticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, originalInnerZoomFactor == 1.0f /*hookViewChangingAndChanged*/);
            }

            RunOnUIThread.Execute(() =>
            {
                innerScrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                {
                    Log.Comment("Inner ViewChanged ScrollPresenter={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
                        sender.Name, sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                    innerScrollPresenterViewChangedEvent.Set();
                };

                innerScrollPresenter.ScrollCompleted += delegate (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
                {
                    ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

                    Log.Comment("Inner ScrollPresenter bring-into-view OffsetsChangeCorrelationId={0} completed with Result={1}", args.CorrelationId, result);
                    if (innerBringIntoViewChangeCorrelationId == args.CorrelationId)
                        innerBringIntoViewCompletedEvent.Set();
                };

                innerScrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
                {
                    Log.Comment("Inner ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
                        sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
                    innerBringIntoViewChangeCorrelationId = args.CorrelationId;

                    if (applySnapPointsInBringingIntoViewHandler)
                    {
                        Log.Comment("ScrollPresenter.BringingIntoView - Applying mandatory snap points");
                        AddSnapPoints(scrollPresenter: sender, stackPanel: (sender.Content as Border).Child as StackPanel);
                        args.SnapPointsMode = ScrollingSnapPointsMode.Default;
                    }
                };

                outerScrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                {
                    Log.Comment("Outer ViewChanged ScrollPresenter={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
                        sender.Name, sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                    outerScrollPresenterViewChangedEvent.Set();
                };

                outerScrollPresenter.ScrollCompleted += delegate (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
                {
                    ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
                    Log.Comment("Outer ScrollPresenter bring-into-view OffsetsChangeCorrelationId={0} completed with Result={1}", args.CorrelationId, result);
                    if (outerBringIntoViewChangeCorrelationId == args.CorrelationId)
                        outerBringIntoViewCompletedEvent.Set();
                };

                outerScrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
                {
                    Log.Comment("Outer ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
                        sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
                    outerBringIntoViewChangeCorrelationId = args.CorrelationId;

                    if (applySnapPointsInBringingIntoViewHandler)
                    {
                        Log.Comment("ScrollPresenter.BringingIntoView - Applying mandatory snap points");
                        AddSnapPoints(scrollPresenter: sender, stackPanel: (sender.Content as Border).Child as StackPanel);
                        args.SnapPointsMode = ScrollingSnapPointsMode.Default;
                    }
                };

                UIElement targetElement = ((innerScrollPresenter.Content as Border).Child as StackPanel).Children[12];

                if (options == null)
                {
                    targetElement.StartBringIntoView();
                }
                else
                {
                    targetElement.StartBringIntoView(options);
                }
            });

            WaitForEvent("Waiting for inner ScrollPresenter.ViewChanged event", innerScrollPresenterViewChangedEvent);
            WaitForEvent("Waiting for outer ScrollPresenter.ViewChanged event", outerScrollPresenterViewChangedEvent);
            WaitForEvent("Waiting for inner bring-into-view operation completion event", innerBringIntoViewCompletedEvent);
            WaitForEvent("Waiting for outer bring-into-view operation completion event", outerBringIntoViewCompletedEvent);
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final inner view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    innerScrollPresenter.HorizontalOffset, innerScrollPresenter.VerticalOffset, innerScrollPresenter.ZoomFactor);
                Log.Comment("Final outer view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    outerScrollPresenter.HorizontalOffset, outerScrollPresenter.VerticalOffset, outerScrollPresenter.ZoomFactor);

                Verify.AreEqual(expectedInnerHorizontalOffset, innerScrollPresenter.HorizontalOffset);
                Verify.AreEqual(expectedInnerVerticalOffset, innerScrollPresenter.VerticalOffset);
                Verify.AreEqual(originalInnerZoomFactor, innerScrollPresenter.ZoomFactor);

                Verify.AreEqual(expectedOuterHorizontalOffset, outerScrollPresenter.HorizontalOffset);
                Verify.AreEqual(expectedOuterVerticalOffset, outerScrollPresenter.VerticalOffset);
                Verify.AreEqual(originalOuterZoomFactor, outerScrollPresenter.ZoomFactor);
            });
        }

void BringElementInNestedScrollViewersIntoView | ( | Orientation | orientation,
 |  | double | expectedOuterHorizontalOffset,
 |  | double | expectedOuterVerticalOffset,
 |  | double | expectedInnerHorizontalOffset,
 |  | double | expectedInnerVerticalOffset,
 |  | BringIntoViewOptions | options = null |
 | ) |  |  | [inline, private]

Definition at line 894 of file ScrollPresenterBringIntoViewTests.cs.

        {
            ScrollViewer outerScrollViewer = null;
            ScrollViewer innerScrollViewer = null;
            AutoResetEvent outerScrollViewerLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent innerScrollViewerLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent outerScrollViewerViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent innerScrollViewerViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent outerBringIntoViewCompletedEvent = new AutoResetEvent(false);
            AutoResetEvent innerBringIntoViewCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                outerScrollViewer = new ScrollViewer();
                innerScrollViewer = new ScrollViewer();

                SetupBringIntoViewUIWithScrollViewerInsideScrollViewer(orientation, outerScrollViewer, innerScrollViewer, outerScrollViewerLoadedEvent, innerScrollViewerLoadedEvent);
            });

            WaitForEvent("Waiting for Inner Loaded event", innerScrollViewerLoadedEvent);
            WaitForEvent("Waiting for Outer Loaded event", outerScrollViewerLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                innerScrollViewer.ViewChanged += delegate (object sender, ScrollViewerViewChangedEventArgs args)
                {
                    ScrollViewer sv = sender as ScrollViewer;
                    Log.Comment("Inner ViewChanged ScrollViewer={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
                        sv.Name, sv.HorizontalOffset, sv.VerticalOffset, sv.ZoomFactor);
                    if (!args.IsIntermediate)
                        innerScrollViewerViewChangedEvent.Set();
                };

                outerScrollViewer.ViewChanged += delegate (object sender, ScrollViewerViewChangedEventArgs args)
                {
                    ScrollViewer sv = sender as ScrollViewer;
                    Log.Comment("Outer ViewChanged ScrollViewer={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
                        sv.Name, sv.HorizontalOffset, sv.VerticalOffset, sv.ZoomFactor);
                    if (!args.IsIntermediate)
                        outerScrollViewerViewChangedEvent.Set();
                };

                UIElement targetElement = ((innerScrollViewer.Content as Border).Child as StackPanel).Children[12];

                if (options == null)
                {
                    targetElement.StartBringIntoView();
                }
                else
                {
                    targetElement.StartBringIntoView(options);
                }
            });

            WaitForEvent("Waiting for inner ScrollViewer.ViewChanged event", innerScrollViewerViewChangedEvent);
            WaitForEvent("Waiting for outer ScrollViewer.ViewChanged event", outerScrollViewerViewChangedEvent);
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final inner view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    innerScrollViewer.HorizontalOffset, innerScrollViewer.VerticalOffset, innerScrollViewer.ZoomFactor);
                Log.Comment("Final outer view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    outerScrollViewer.HorizontalOffset, outerScrollViewer.VerticalOffset, outerScrollViewer.ZoomFactor);

                Verify.AreEqual(expectedInnerHorizontalOffset, innerScrollViewer.HorizontalOffset);
                Verify.AreEqual(expectedInnerVerticalOffset, innerScrollViewer.VerticalOffset);

                Verify.AreEqual(expectedOuterHorizontalOffset, outerScrollViewer.HorizontalOffset);
                Verify.AreEqual(expectedOuterVerticalOffset, outerScrollViewer.VerticalOffset);
            });
        }

void BringElementIntoHorizontalScrollPresenterViewFromFarEdge ( ) [inline]

Definition at line 76 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoView(
                Orientation.Horizontal,
                3126.0 /*expectedHorizontalOffset*/,
                130.0 /*expectedVerticalOffset*/,
                null /*options*/,
                3624.0 /*originalHorizontalOffset*/,
                0.0 /*originalVerticalOffset*/,
                2.0f /*originalZoomFactor*/);
        }

void BringElementIntoHorizontalScrollPresenterViewFromNearEdge ( ) [inline]

Definition at line 30 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoView(Orientation.Horizontal, 1083.0 /*expectedHorizontalOffset*/, 0.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoHorizontalScrollPresenterViewWithFarAlignment ( ) [inline]

Definition at line 126 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithAlignment(
                Orientation.Horizontal,
                1.0 /*alignmentRatio*/,
                1083.0 /*expectedHorizontalOffset*/,
                0.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoHorizontalScrollPresenterViewWithMiddleAlignment ( ) [inline]

Definition at line 115 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithAlignment(
                Orientation.Horizontal,
                0.5 /*alignmentRatio*/,
                1323.0 /*expectedHorizontalOffset*/,
                0.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoHorizontalScrollPresenterViewWithNearAlignment ( ) [inline]

Definition at line 104 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithAlignment(
                Orientation.Horizontal,
                0.0 /*alignmentRatio*/,
                1512.0 /*expectedHorizontalOffset*/,
                0.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoHorizontalScrollPresenterViewWithOffset ( ) [inline]

Definition at line 170 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithOffset(
                Orientation.Horizontal,
                10.0 /*offset*/,
                1073.0 /*expectedHorizontalOffset*/,
                0.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoHorizontalScrollPresenterViewWithOffsetFromFarEdge ( ) [inline]

Definition at line 192 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithOffset(
                Orientation.Horizontal,
                10.0 /*offset*/,
                3116.0 /*expectedHorizontalOffset*/,
                130.0 /*expectedVerticalOffset*/,
                3624.0 /*originalHorizontalOffset*/,
                0.0 /*originalVerticalOffset*/,
                2.0f /*originalZoomFactor*/);
        }

void BringElementIntoHorizontalScrollPresenterViewWithSnapPoints ( ) [inline]

Definition at line 37 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoView(
                orientation: Orientation.Horizontal,
                expectedHorizontalOffset: 1134.0,
                expectedVerticalOffset: 0.0,
                options: null,
                originalHorizontalOffset: 0.0,
                originalVerticalOffset: 0.0,
                originalZoomFactor: 1.0f,
                applyOptionsInBringingIntoViewHandler: false,
                applySnapPointsInBringingIntoViewHandler: true);
        }

void BringElementIntoVerticalScrollPresenterViewFromFarEdge ( ) [inline]

Definition at line 90 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoView(
                Orientation.Vertical,
                130.0 /*expectedHorizontalOffset*/,
                3126.0 /*expectedVerticalOffset*/,
                null /*options*/,
                0.0 /*originalHorizontalOffset*/,
                3624.0 /*originalVerticalOffset*/,
                2.0f /*originalZoomFactor*/);
        }

void BringElementIntoVerticalScrollPresenterViewFromNearEdge ( ) [inline]

Definition at line 53 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoView(Orientation.Vertical, 0.0 /*expectedHorizontalOffset*/, 1083.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoVerticalScrollPresenterViewWithFarAlignment ( ) [inline]

Definition at line 159 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithAlignment(
                Orientation.Vertical,
                1.0 /*alignmentRatio*/,
                0.0 /*expectedHorizontalOffset*/,
                1083.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoVerticalScrollPresenterViewWithMiddleAlignment ( ) [inline]

Definition at line 148 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithAlignment(
                Orientation.Vertical,
                0.5 /*alignmentRatio*/,
                0.0 /*expectedHorizontalOffset*/,
                1323.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoVerticalScrollPresenterViewWithNearAlignment ( ) [inline]

Definition at line 137 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithAlignment(
                Orientation.Vertical,
                0.0 /*alignmentRatio*/,
                0.0 /*expectedHorizontalOffset*/,
                1512.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoVerticalScrollPresenterViewWithOffset ( ) [inline]

Definition at line 181 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithOffset(
                Orientation.Vertical,
                -10.0 /*offset*/,
                0.0 /*expectedHorizontalOffset*/,
                1093.0 /*expectedVerticalOffset*/);
        }

void BringElementIntoVerticalScrollPresenterViewWithOffsetFromFarEdge ( ) [inline]

Definition at line 206 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoViewWithOffset(
                Orientation.Vertical,
                -10.0 /*offset*/,
                130.0 /*expectedHorizontalOffset*/,
                3136.0 /*expectedVerticalOffset*/,
                0.0 /*originalHorizontalOffset*/,
                3624.0 /*originalVerticalOffset*/,
                2.0f /*originalZoomFactor*/);
        }

void BringElementIntoVerticalScrollPresenterViewWithSnapPoints ( ) [inline]

Definition at line 60 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementIntoView(
                orientation: Orientation.Vertical,
                expectedHorizontalOffset: 0.0,
                expectedVerticalOffset: 1134.0,
                options: null,
                originalHorizontalOffset: 0.0,
                originalVerticalOffset: 0.0,
                originalZoomFactor: 1.0f,
                applyOptionsInBringingIntoViewHandler: false,
                applySnapPointsInBringingIntoViewHandler: true);
        }

void BringElementIntoView | ( | Orientation | orientation,
 |  | double | expectedHorizontalOffset,
 |  | double | expectedVerticalOffset,
 |  | BringIntoViewOptions | options = null,
 |  | double | originalHorizontalOffset = 0.0,
 |  | double | originalVerticalOffset = 0.0,
 |  | float | originalZoomFactor = 1.0f,
 |  | bool | applyOptionsInBringingIntoViewHandler = false,
 |  | bool | applySnapPointsInBringingIntoViewHandler = false |
 | ) |  |  | [inline, private]

Definition at line 625 of file ScrollPresenterBringIntoViewTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent bringIntoViewCompletedEvent = new AutoResetEvent(false);
            int bringIntoViewChangeCorrelationId = -1;

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter = new ScrollPresenter();

                SetupDefaultBringIntoViewUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            if (originalZoomFactor != 1.0f)
            {
                ZoomTo(scrollPresenter, originalZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
            }

            if (originalHorizontalOffset != 0 || originalVerticalOffset != 0)
            {
                ScrollTo(scrollPresenter, originalHorizontalOffset, originalVerticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, originalZoomFactor == 1.0f /*hookViewChangingAndChanged*/);
            }

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
                {
                    Log.Comment("ViewChanged - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                        sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
                    scrollPresenterViewChangedEvent.Set();
                };

                scrollPresenter.ScrollCompleted += delegate (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
                {
                    ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
                    Log.Comment("ScrollPresenter bring-into-view OffsetsChangeCorrelationId={0} completed with Result={1}", args.CorrelationId, result);
                    if (bringIntoViewChangeCorrelationId == args.CorrelationId)
                        bringIntoViewCompletedEvent.Set();
                };

                scrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
                {
                    Log.Comment("ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
                        sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
                    bringIntoViewChangeCorrelationId = args.CorrelationId;

                    if (applyOptionsInBringingIntoViewHandler && options != null)
                    {
                        Log.Comment("ScrollPresenter.BringingIntoView - Applying custom options");
                        args.RequestEventArgs.AnimationDesired = options.AnimationDesired;
                        args.RequestEventArgs.HorizontalOffset = options.HorizontalOffset;
                        args.RequestEventArgs.VerticalOffset = options.VerticalOffset;
                        if (options.TargetRect != null)
                        {
                            args.RequestEventArgs.TargetRect = (Rect)options.TargetRect;
                        }
                    }

                    if (applySnapPointsInBringingIntoViewHandler)
                    {
                        Log.Comment("ScrollPresenter.BringingIntoView - Applying mandatory snap points");
                        AddSnapPoints(scrollPresenter: sender, stackPanel: (sender.Content as Border).Child as StackPanel);
                        args.SnapPointsMode = ScrollingSnapPointsMode.Default;
                    }
                };

                UIElement targetElement = ((scrollPresenter.Content as Border).Child as StackPanel).Children[12];
                BringIntoViewOptions startingOptions = null;

                if (options == null)
                {
                    targetElement.StartBringIntoView();
                }
                else
                {
                    if (applyOptionsInBringingIntoViewHandler)
                    {
                        startingOptions = new BringIntoViewOptions();
                        startingOptions.HorizontalAlignmentRatio = options.HorizontalAlignmentRatio;
                        startingOptions.VerticalAlignmentRatio = options.VerticalAlignmentRatio;
                    }
                    else
                    {
                        startingOptions = options;
                    }
                    targetElement.StartBringIntoView(startingOptions);
                }
            });

            WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);
            WaitForEvent("Waiting for bring-into-view operation completion event", bringIntoViewCompletedEvent);
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
                Verify.AreEqual(expectedHorizontalOffset, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(expectedVerticalOffset, scrollPresenter.VerticalOffset);
                Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
            });
        }

void BringElementIntoViewWithAdjustmentInBringingIntoViewHandler ( ) [inline]

Definition at line 239 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions();
                options.TargetRect = new Rect(0, -15, 100, 50);
                options.AnimationDesired = false;
                options.VerticalOffset = -10.0;
            });

            BringElementIntoView(
                Orientation.Vertical,
                0.0 /*expectedHorizontalOffset*/,
                1008.0 /*expectedVerticalOffset*/,
                options,
                0.0 /*originalHorizontalOffset*/,
                0.0 /*originalVerticalOffset*/,
                1.0f /*originalZoomFactor*/,
                true /*applyOptionsInBringingIntoViewHandler*/);
        }

void BringElementIntoViewWithAlignment | ( | Orientation | orientation,
 |  | double | alignmentRatio,
 |  | double | expectedHorizontalOffset,
 |  | double | expectedVerticalOffset |
 | ) |  |  | [inline, private]

Definition at line 571 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions();
                if (orientation == Orientation.Horizontal)
                    options.HorizontalAlignmentRatio = alignmentRatio;
                else
                    options.VerticalAlignmentRatio = alignmentRatio;
            });

            BringElementIntoView(
                orientation,
                expectedHorizontalOffset,
                expectedVerticalOffset,
                options);
        }

void BringElementIntoViewWithOffset | ( | Orientation | orientation,
 |  | double | offset,
 |  | double | expectedHorizontalOffset,
 |  | double | expectedVerticalOffset,
 |  | double | originalHorizontalOffset = 0.0,
 |  | double | originalVerticalOffset = 0.0,
 |  | float | originalZoomFactor = 1.0f |
 | ) |  |  | [inline, private]

Definition at line 595 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions();
                if (orientation == Orientation.Horizontal)
                    options.HorizontalOffset = offset;
                else
                    options.VerticalOffset = offset;
            });

            BringElementIntoView(
                orientation,
                expectedHorizontalOffset,
                expectedVerticalOffset,
                options,
                originalHorizontalOffset,
                originalVerticalOffset,
                originalZoomFactor);
        }

void BringElementIntoViewWithTargetRect ( ) [inline]

Definition at line 220 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions();
                options.TargetRect = new Rect(15, 0, 50, 100);
            });

            BringElementIntoView(
                Orientation.Horizontal,
                1028.0 /*expectedHorizontalOffset*/,
                0.0 /*expectedVerticalOffset*/,
                options);
        }

void BringNestedElementIntoHorizontalScrollPresenterView ( ) [inline]

Definition at line 264 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementInNestedScrollPresentersIntoView(
                Orientation.Horizontal,
                1056.0 /*expectedOuterHorizontalOffset*/,
                0.0 /*expectedOuterVerticalOffset*/,
                1083.0 /*expectedInnerHorizontalOffset*/,
                0.0 /*expectedInnerVerticalOffset*/);
        }

void BringNestedElementIntoHorizontalScrollPresenterViewFromFarEdge ( ) [inline]

Definition at line 312 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementInNestedScrollPresentersIntoView(
                Orientation.Horizontal,
                528.0 /*expectedOuterHorizontalOffset*/,
                0.0 /*expectedOuterVerticalOffset*/,
                2344.5 /*expectedInnerHorizontalOffset*/,
                52.5 /*expectedInnerVerticalOffset*/,
                null /*options*/,
                756.0 /*originalOuterHorizontalOffset*/,
                0.0 /*originalOuterVerticalOffset*/,
                0.5f /*originalOuterZoomFactor*/,
                2568.0 /*originalInnerHorizontalOffset*/,
                0.0 /*originalInnerVerticalOffset*/,
                1.5f /*originalInnerZoomFactor*/);
        }

void BringNestedElementIntoHorizontalScrollPresenterViewWithNearAlignment ( ) [inline]

Definition at line 350 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions() { HorizontalAlignmentRatio = 0.0 };
            });

            BringElementInNestedScrollPresentersIntoView(
                Orientation.Horizontal,
                1107.0 /*expectedOuterHorizontalOffset*/,
                0.0 /*expectedOuterVerticalOffset*/,
                1512.0 /*expectedInnerHorizontalOffset*/,
                0.0 /*expectedInnerVerticalOffset*/,
                options);
        }

void BringNestedElementIntoHorizontalScrollPresenterViewWithOffset ( ) [inline]

Definition at line 450 of file ScrollPresenterBringIntoViewTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                BringIntoViewOptions options = null;

                RunOnUIThread.Execute(() =>
                {
                    options = new BringIntoViewOptions() { HorizontalOffset = -20.0 };
                });

                BringElementInNestedScrollPresentersIntoView(
                    Orientation.Horizontal,
                    1056.0 /*expectedOuterHorizontalOffset*/,
                    0.0 /*expectedOuterVerticalOffset*/,
                    1103.0 /*expectedInnerHorizontalOffset*/,
                    0.0 /*expectedInnerVerticalOffset*/,
                    options);
            }
        }

void BringNestedElementIntoHorizontalScrollPresenterViewWithSnapPoints ( ) [inline]

Definition at line 370 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementInNestedScrollPresentersIntoView(
                orientation: Orientation.Horizontal,
                expectedOuterHorizontalOffset: 1008.0,
                expectedOuterVerticalOffset: 0.0,
                expectedInnerHorizontalOffset: 1134.0,
                expectedInnerVerticalOffset: 0.0,
                options: null,
                originalOuterHorizontalOffset: 0.0,
                originalOuterVerticalOffset: 0.0,
                originalOuterZoomFactor: 1.0f,
                originalInnerHorizontalOffset: 0.0,
                originalInnerVerticalOffset: 0.0,
                originalInnerZoomFactor: 1.0f,
                applySnapPointsInBringingIntoViewHandler: true);
        }

void BringNestedElementIntoHorizontalScrollViewerView ( ) [inline]

Definition at line 288 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementInNestedScrollViewersIntoView(
                Orientation.Horizontal,
                1056.0 /*expectedOuterHorizontalOffset*/,
                0.0 /*expectedOuterVerticalOffset*/,
                1083.0 /*expectedInnerHorizontalOffset*/,
                0.0 /*expectedInnerVerticalOffset*/);
        }

void BringNestedElementIntoHorizontalScrollViewerViewWithNearAlignment ( ) [inline]

Definition at line 410 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions() { HorizontalAlignmentRatio = 0.0 };
            });

            BringElementInNestedScrollViewersIntoView(
                Orientation.Horizontal,
                1107.0 /*expectedOuterHorizontalOffset*/,
                0.0 /*expectedOuterVerticalOffset*/,
                1512.0 /*expectedInnerHorizontalOffset*/,
                0.0 /*expectedInnerVerticalOffset*/,
                options);
        }

void BringNestedElementIntoHorizontalScrollViewerViewWithOffset ( ) [inline]

Definition at line 496 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions() { HorizontalOffset = -20.0 };
            });

            BringElementInNestedScrollViewersIntoView(
                Orientation.Horizontal,
                1056.0 /*expectedOuterHorizontalOffset*/,
                0.0 /*expectedOuterVerticalOffset*/,
                1103.0 /*expectedInnerHorizontalOffset*/,
                0.0 /*expectedInnerVerticalOffset*/,
                options);
        }

void BringNestedElementIntoVerticalScrollPresenterView ( ) [inline]

Definition at line 276 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementInNestedScrollPresentersIntoView(
                Orientation.Vertical,
                0.0 /*expectedOuterHorizontalOffset*/,
                1056.0 /*expectedOuterVerticalOffset*/,
                0.0 /*expectedInnerHorizontalOffset*/,
                1083.0 /*expectedInnerVerticalOffset*/);
        }

void BringNestedElementIntoVerticalScrollPresenterViewFromFarEdge ( ) [inline]

Definition at line 331 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementInNestedScrollPresentersIntoView(
                Orientation.Vertical,
                0.0 /*expectedOuterHorizontalOffset*/,
                528.0 /*expectedOuterVerticalOffset*/,
                52.5 /*expectedInnerHorizontalOffset*/,
                2344.5 /*expectedInnerVerticalOffset*/,
                null /*options*/,
                0.0 /*originalOuterHorizontalOffset*/,
                756.0 /*originalOuterVerticalOffset*/,
                0.5f /*originalOuterZoomFactor*/,
                0.0 /*originalInnerHorizontalOffset*/,
                2568.0 /*originalInnerVerticalOffset*/,
                1.5f /*originalInnerZoomFactor*/);
        }

void BringNestedElementIntoVerticalScrollPresenterViewWithMiddleAlignment ( ) [inline]

Definition at line 390 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions() { VerticalAlignmentRatio = 0.5 };
            });

            BringElementInNestedScrollPresentersIntoView(
                Orientation.Vertical,
                0.0 /*expectedOuterHorizontalOffset*/,
                1056.0 /*expectedOuterVerticalOffset*/,
                0.0 /*expectedInnerHorizontalOffset*/,
                1323.0 /*expectedInnerVerticalOffset*/,
                options);
        }

void BringNestedElementIntoVerticalScrollPresenterViewWithOffset ( ) [inline]

Definition at line 473 of file ScrollPresenterBringIntoViewTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                BringIntoViewOptions options = null;

                RunOnUIThread.Execute(() =>
                {
                    options = new BringIntoViewOptions() { VerticalOffset = -20.0 };
                });

                BringElementInNestedScrollPresentersIntoView(
                    Orientation.Vertical,
                    0.0 /*expectedOuterHorizontalOffset*/,
                    1056.0 /*expectedOuterVerticalOffset*/,
                    0.0 /*expectedInnerHorizontalOffset*/,
                    1103.0 /*expectedInnerVerticalOffset*/,
                    options);
            }
        }

void BringNestedElementIntoVerticalScrollViewerView ( ) [inline]

Definition at line 300 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringElementInNestedScrollViewersIntoView(
                Orientation.Vertical,
                0.0 /*expectedOuterHorizontalOffset*/,
                1056.0 /*expectedOuterVerticalOffset*/,
                0.0 /*expectedInnerHorizontalOffset*/,
                1083.0 /*expectedInnerVerticalOffset*/);
        }

void BringNestedElementIntoVerticalScrollViewerViewWithMiddleAlignment ( ) [inline]

Definition at line 430 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions() { VerticalAlignmentRatio = 0.5 };
            });

            BringElementInNestedScrollViewersIntoView(
                Orientation.Vertical,
                0.0 /*expectedOuterHorizontalOffset*/,
                1056.0 /*expectedOuterVerticalOffset*/,
                0.0 /*expectedInnerHorizontalOffset*/,
                1323.0 /*expectedInnerVerticalOffset*/,
                options);
        }

void BringNestedElementIntoVerticalScrollViewerViewWithOffset ( ) [inline]

Definition at line 516 of file ScrollPresenterBringIntoViewTests.cs.

        {
            BringIntoViewOptions options = null;

            RunOnUIThread.Execute(() =>
            {
                options = new BringIntoViewOptions() { VerticalOffset = -20.0 };
            });

            BringElementInNestedScrollViewersIntoView(
                Orientation.Vertical,
                0.0 /*expectedOuterHorizontalOffset*/,
                1056.0 /*expectedOuterVerticalOffset*/,
                0.0 /*expectedInnerHorizontalOffset*/,
                1103.0 /*expectedInnerVerticalOffset*/,
                options);
        }

void CanAddAndRemoveSnapPointsFromAScrollPresenter ( ) [inline]

Definition at line 66 of file ScrollPresenterSnapPointTests.cs.

        {
            CanAddAndRemoveSnapPointsFromAScrollPresenter(ScrollSnapPointsAlignment.Near);
            CanAddAndRemoveSnapPointsFromAScrollPresenter(ScrollSnapPointsAlignment.Center);
            CanAddAndRemoveSnapPointsFromAScrollPresenter(ScrollSnapPointsAlignment.Far);
        }

void CanAddAndRemoveSnapPointsFromAScrollPresenter ( ScrollSnapPointsAlignment alignment ) [inline, private]

Definition at line 73 of file ScrollPresenterSnapPointTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            ScrollSnapPoint snapPoint2 = null;
            RepeatedScrollSnapPoint snapPoint3 = null;
            RepeatedScrollSnapPoint snapPoint4 = null;

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter = new ScrollPresenter();
                ScrollSnapPoint snapPoint1 = new ScrollSnapPoint(snapPointValue: 10, alignment: alignment);
                snapPoint2 = new ScrollSnapPoint(snapPointValue: 10, alignment: alignment);
                snapPoint3 = new RepeatedScrollSnapPoint(offset:  10, interval: 10, start:  10, end: 100, alignment: alignment);
                snapPoint4 = new RepeatedScrollSnapPoint(offset: 100, interval: 10, start: 100, end: 200, alignment: alignment);
                ZoomSnapPoint snapPoint5 = new ZoomSnapPoint(snapPointValue: 10);
                scrollPresenter.HorizontalSnapPoints.Add(snapPoint1);
                scrollPresenter.VerticalSnapPoints.Add(snapPoint1);
                scrollPresenter.ZoomSnapPoints.Add(snapPoint5);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(1, scrollPresenter.HorizontalSnapPoints.Count);
                Verify.AreEqual<int>(1, scrollPresenter.VerticalSnapPoints.Count);
                Verify.AreEqual<int>(1, scrollPresenter.ZoomSnapPoints.Count);
                scrollPresenter.HorizontalSnapPoints.Add(snapPoint2);
                scrollPresenter.HorizontalSnapPoints.Add(snapPoint3);
                scrollPresenter.HorizontalSnapPoints.Add(snapPoint4);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(4, scrollPresenter.HorizontalSnapPoints.Count);
                scrollPresenter.HorizontalSnapPoints.Remove(snapPoint2);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(3, scrollPresenter.HorizontalSnapPoints.Count);
                scrollPresenter.HorizontalSnapPoints.Remove(snapPoint2);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(3, scrollPresenter.HorizontalSnapPoints.Count);
                scrollPresenter.HorizontalSnapPoints.Clear();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(0, scrollPresenter.HorizontalSnapPoints.Count);
                Verify.AreEqual<int>(1, scrollPresenter.VerticalSnapPoints.Count);
                Verify.AreEqual<int>(1, scrollPresenter.ZoomSnapPoints.Count);
            });
        }

void CanAddScrollSnapPointsWithMixedAlignments ( ) [inline]

Definition at line 141 of file ScrollPresenterSnapPointTests.cs.

        {
            ScrollPresenter scrollPresenter = null;

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter = new ScrollPresenter();
                ScrollSnapPoint nearSnapPoint = new ScrollSnapPoint(snapPointValue: 10, alignment: ScrollSnapPointsAlignment.Near);
                ScrollSnapPoint centerSnapPoint = new ScrollSnapPoint(snapPointValue: 20, alignment: ScrollSnapPointsAlignment.Center);
                ScrollSnapPoint farSnapPoint = new ScrollSnapPoint(snapPointValue: 30, alignment: ScrollSnapPointsAlignment.Far);
                RepeatedScrollSnapPoint nearRepeatedScrollSnapPoint = new RepeatedScrollSnapPoint(offset: 50, interval: 10, start: 50, end: 100, alignment: ScrollSnapPointsAlignment.Near);
                RepeatedScrollSnapPoint centerRepeatedScrollSnapPoint = new RepeatedScrollSnapPoint(offset: 180, interval: 10, start: 175, end: 225, alignment: ScrollSnapPointsAlignment.Center);
                RepeatedScrollSnapPoint farRepeatedScrollSnapPoint = new RepeatedScrollSnapPoint(offset: 280, interval: 5, start: 280, end: 300, alignment: ScrollSnapPointsAlignment.Far);
                scrollPresenter.HorizontalSnapPoints.Add(nearSnapPoint);
                scrollPresenter.HorizontalSnapPoints.Add(centerSnapPoint);
                scrollPresenter.HorizontalSnapPoints.Add(farSnapPoint);
                scrollPresenter.VerticalSnapPoints.Add(nearSnapPoint);
                scrollPresenter.VerticalSnapPoints.Add(centerSnapPoint);
                scrollPresenter.VerticalSnapPoints.Add(farSnapPoint);
                scrollPresenter.HorizontalSnapPoints.Add(nearRepeatedScrollSnapPoint);
                scrollPresenter.HorizontalSnapPoints.Add(centerRepeatedScrollSnapPoint);
                scrollPresenter.HorizontalSnapPoints.Add(farRepeatedScrollSnapPoint);
                scrollPresenter.VerticalSnapPoints.Add(nearRepeatedScrollSnapPoint);
                scrollPresenter.VerticalSnapPoints.Add(centerRepeatedScrollSnapPoint);
                scrollPresenter.VerticalSnapPoints.Add(farRepeatedScrollSnapPoint);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual<int>(6, scrollPresenter.HorizontalSnapPoints.Count);
                Verify.AreEqual<int>(6, scrollPresenter.VerticalSnapPoints.Count);
            });
        }

void CanShareSnapPointsInMultipleCollections ( ) [inline]

Definition at line 179 of file ScrollPresenterSnapPointTests.cs.

        {
            ScrollPresenter scrollPresenter1 = null;
            ScrollPresenter scrollPresenter2 = null;
            ScrollPresenter scrollPresenter3 = null;

            ScrollSnapPoint scrollSnapPoint1 = null;
            ScrollSnapPoint scrollSnapPoint2 = null;
            ScrollSnapPoint scrollSnapPoint3 = null;

            RepeatedScrollSnapPoint repeatedScrollSnapPoint1 = null;
            RepeatedScrollSnapPoint repeatedScrollSnapPoint2 = null;
            RepeatedScrollSnapPoint repeatedScrollSnapPoint3 = null;

            ZoomSnapPoint zoomSnapPoint1 = null;
            ZoomSnapPoint zoomSnapPoint2 = null;
            ZoomSnapPoint zoomSnapPoint3 = null;

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter1 = new ScrollPresenter();
                scrollPresenter2 = new ScrollPresenter();
                scrollPresenter3 = new ScrollPresenter();

                scrollSnapPoint1 = new ScrollSnapPoint(snapPointValue: 10, alignment: ScrollSnapPointsAlignment.Near);
                scrollSnapPoint2 = new ScrollSnapPoint(snapPointValue: 20, alignment: ScrollSnapPointsAlignment.Near);
                scrollSnapPoint3 = new ScrollSnapPoint(snapPointValue: 30, alignment: ScrollSnapPointsAlignment.Near);

                repeatedScrollSnapPoint1 = new RepeatedScrollSnapPoint(offset:  10, interval: 10, start:  10, end: 100, alignment: ScrollSnapPointsAlignment.Near);
                repeatedScrollSnapPoint2 = new RepeatedScrollSnapPoint(offset: 200, interval: 10, start: 110, end: 200, alignment: ScrollSnapPointsAlignment.Near);
                repeatedScrollSnapPoint3 = new RepeatedScrollSnapPoint(offset: 300, interval: 10, start: 210, end: 300, alignment: ScrollSnapPointsAlignment.Near);

                zoomSnapPoint1 = new ZoomSnapPoint(snapPointValue: 1);
                zoomSnapPoint2 = new ZoomSnapPoint(snapPointValue: 2);
                zoomSnapPoint3 = new ZoomSnapPoint(snapPointValue: 3);

                scrollPresenter1.HorizontalSnapPoints.Add(scrollSnapPoint1);
                scrollPresenter1.HorizontalSnapPoints.Add(scrollSnapPoint2);
                scrollPresenter1.VerticalSnapPoints.Add(scrollSnapPoint1);
                scrollPresenter1.VerticalSnapPoints.Add(scrollSnapPoint3);

                scrollPresenter2.HorizontalSnapPoints.Add(repeatedScrollSnapPoint1);
                scrollPresenter2.HorizontalSnapPoints.Add(repeatedScrollSnapPoint2);
                scrollPresenter2.VerticalSnapPoints.Add(repeatedScrollSnapPoint1);
                scrollPresenter2.VerticalSnapPoints.Add(repeatedScrollSnapPoint3);

                scrollPresenter1.ZoomSnapPoints.Add(zoomSnapPoint1);
                scrollPresenter1.ZoomSnapPoints.Add(zoomSnapPoint2);
                scrollPresenter2.ZoomSnapPoints.Add(zoomSnapPoint1);
                scrollPresenter2.ZoomSnapPoints.Add(zoomSnapPoint3);

                scrollPresenter3.HorizontalSnapPoints.Add(scrollSnapPoint1);
                scrollPresenter3.HorizontalSnapPoints.Add(scrollSnapPoint1);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Vector2 horizontalScrollSnapPoint11ApplicableZone = ScrollPresenterTestHooks.GetHorizontalSnapPointActualApplicableZone(scrollPresenter1, scrollSnapPoint1);
                Vector2 verticalScrollSnapPoint11ApplicableZone = ScrollPresenterTestHooks.GetVerticalSnapPointActualApplicableZone(scrollPresenter1, scrollSnapPoint1);
                Log.Comment("horizontalScrollSnapPoint11ApplicableZone=" + horizontalScrollSnapPoint11ApplicableZone.ToString());
                Log.Comment("verticalScrollSnapPoint11ApplicableZone=" + verticalScrollSnapPoint11ApplicableZone.ToString());

                Vector2 horizontalScrollSnapPoint21ApplicableZone = ScrollPresenterTestHooks.GetHorizontalSnapPointActualApplicableZone(scrollPresenter2, repeatedScrollSnapPoint1);
                Vector2 verticalScrollSnapPoint21ApplicableZone = ScrollPresenterTestHooks.GetVerticalSnapPointActualApplicableZone(scrollPresenter2, repeatedScrollSnapPoint1);
                Log.Comment("horizontalScrollSnapPoint21ApplicableZone=" + horizontalScrollSnapPoint21ApplicableZone.ToString());
                Log.Comment("verticalScrollSnapPoint21ApplicableZone=" + verticalScrollSnapPoint21ApplicableZone.ToString());

                Vector2 zoomSnapPoint11ApplicableZone = ScrollPresenterTestHooks.GetZoomSnapPointActualApplicableZone(scrollPresenter1, zoomSnapPoint1);
                Vector2 zoomSnapPoint21ApplicableZone = ScrollPresenterTestHooks.GetZoomSnapPointActualApplicableZone(scrollPresenter2, zoomSnapPoint1);
                Log.Comment("zoomSnapPoint11ApplicableZone=" + zoomSnapPoint11ApplicableZone.ToString());
                Log.Comment("zoomSnapPoint21ApplicableZone=" + zoomSnapPoint21ApplicableZone.ToString());

                int combinationCount11 = ScrollPresenterTestHooks.GetHorizontalSnapPointCombinationCount(scrollPresenter1, scrollSnapPoint1);
                int combinationCount31 = ScrollPresenterTestHooks.GetHorizontalSnapPointCombinationCount(scrollPresenter3, scrollSnapPoint1);
                Log.Comment("combinationCount11=" + combinationCount11);
                Log.Comment("combinationCount31=" + combinationCount31);

                Log.Comment("Expecting different applicable zones for ScrollSnapPoint in horizontal and vertical collections");
                Verify.AreEqual<float>(15.0f, horizontalScrollSnapPoint11ApplicableZone.Y);
                Verify.AreEqual<float>(20.0f, verticalScrollSnapPoint11ApplicableZone.Y);

                Log.Comment("Expecting identical applicable zones for RepeatedScrollSnapPoint in horizontal and vertical collections");
                Verify.AreEqual<float>(10.0f, horizontalScrollSnapPoint21ApplicableZone.X);
                Verify.AreEqual<float>(10.0f, verticalScrollSnapPoint21ApplicableZone.X);
                Verify.AreEqual<float>(100.0f, horizontalScrollSnapPoint21ApplicableZone.Y);
                Verify.AreEqual<float>(100.0f, verticalScrollSnapPoint21ApplicableZone.Y);

                Log.Comment("Expecting different applicable zones for ZoomSnapPoint in two zoom collections");
                Verify.AreEqual<float>(1.5f, zoomSnapPoint11ApplicableZone.Y);
                Verify.AreEqual<float>(2.0f, zoomSnapPoint21ApplicableZone.Y);

                Log.Comment("Expecting different combination counts for ScrollSnapPoint in two horizontal collections");
                Verify.AreEqual<int>(0, combinationCount11);
                Verify.AreEqual<int>(1, combinationCount31);
            });
        }

void ChangeOffsetsBeforeLoading ( bool animate ) [inline, private]

Definition at line 1445 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
            ScrollPresenterOperation operation = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, false /*setAsContentRoot*/);

                scrollPresenter.ScrollStarting += (sender, args) =>
                {
                    Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ZoomStarting += (sender, args) =>
                {
                    Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                };

                operation = StartScrollTo(
                    scrollPresenter,
                    600.0,
                    400.0,
                    animate ? ScrollingAnimationMode.Enabled : ScrollingAnimationMode.Disabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvent);

                Log.Comment("Setting window content");
                Content = scrollPresenter;
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(600.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(400.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
            });
        }

void ChangeOffsetsWhileBiDirectionalScrollControllerIsAttached ( ) [inline]

Definition at line 433 of file ScrollControllerTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            BiDirectionalScrollController biDirectionalScrollController = null;
            AutoResetEvent loadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                // We need the styles of the CompositionScrollController, so let's load them
                App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();
                biDirectionalScrollController = new BiDirectionalScrollController();

                biDirectionalScrollController.LogMessage += (BiDirectionalScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                scrollPresenter.HorizontalScrollController = biDirectionalScrollController.HorizontalScrollController;
                scrollPresenter.VerticalScrollController = biDirectionalScrollController.VerticalScrollController;

                SetupUIWithBiDirectionalScrollController(
                    scrollPresenter,
                    rectangleScrollPresenterContent,
                    biDirectionalScrollController,
                    loadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", loadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("BiDirectionalScrollController size={0}, {1}", biDirectionalScrollController.ActualWidth, biDirectionalScrollController.ActualHeight);
            });

            IdleSynchronizer.Wait();

            Log.Comment("Jump to offsets");
            ScrollTo(
                scrollPresenter,
                (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 2.0,
                (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 2.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: true,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 2.0,
                expectedFinalVerticalOffset: (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 2.0);

            Log.Comment("Animate to offsets");
            ScrollTo(
                scrollPresenter,
                (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 4.0,
                (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 4.0,
                ScrollingAnimationMode.Enabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 4.0,
                expectedFinalVerticalOffset: (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 4.0);

            Log.Comment("Jump to zoomFactor 2.0");
            ZoomTo(
                scrollPresenter,
                2.0f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false);

            Log.Comment("Animate to zoomFactor 1.5");
            ZoomTo(
                scrollPresenter,
                1.5f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Enabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false);
        }

void ChangeOffsetsWhileScrollControllersAreAttached ( ) [inline]

Definition at line 71 of file ScrollControllerTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            CompositionScrollController horizontalScrollController = null;
            CompositionScrollController verticalScrollController = null;
            AutoResetEvent loadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                // We need the styles of the CompositionScrollController, so let's load them
                App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();
                horizontalScrollController = new CompositionScrollController();
                verticalScrollController = new CompositionScrollController();

                horizontalScrollController.Orientation = Orientation.Horizontal;

                horizontalScrollController.LogMessage += (CompositionScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                verticalScrollController.LogMessage += (CompositionScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                scrollPresenter.HorizontalScrollController = horizontalScrollController;
                scrollPresenter.VerticalScrollController = verticalScrollController;

                SetupUIWithScrollControllers(
                    scrollPresenter,
                    rectangleScrollPresenterContent,
                    horizontalScrollController,
                    verticalScrollController,
                    loadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", loadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("HorizontalScrollController size={0}, {1}", horizontalScrollController.ActualWidth, horizontalScrollController.ActualHeight);
                Log.Comment("VerticalScrollController size={0}, {1}", verticalScrollController.ActualWidth, verticalScrollController.ActualHeight);
            });

            IdleSynchronizer.Wait();

            Log.Comment("Jump to offsets");
            ScrollTo(
                scrollPresenter,
                (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 2.0,
                (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 2.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: true,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 2.0,
                expectedFinalVerticalOffset: (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 2.0);

            Log.Comment("Animate to offsets");
            ScrollTo(
                scrollPresenter,
                (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 4.0,
                (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 4.0,
                ScrollingAnimationMode.Enabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: (c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth) / 4.0,
                expectedFinalVerticalOffset: (c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight) / 4.0);

            Log.Comment("Jump to zoomFactor 2.0");
            ZoomTo(
                scrollPresenter,
                2.0f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false);

            Log.Comment("Animate to zoomFactor 1.5");
            ZoomTo(
                scrollPresenter,
                1.5f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Enabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false);
        }

void ChangeOffsetsWithAdditionalVelocityAndAttachedBiDirectionalScrollController ( ) [inline]

Definition at line 612 of file ScrollControllerTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            BiDirectionalScrollController biDirectionalScrollController = null;
            AutoResetEvent loadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                // We need the styles of the CompositionScrollController, so let's load them
                App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();
                biDirectionalScrollController = new BiDirectionalScrollController();

                biDirectionalScrollController.LogMessage += (BiDirectionalScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                scrollPresenter.HorizontalScrollController = biDirectionalScrollController.HorizontalScrollController;
                scrollPresenter.VerticalScrollController = biDirectionalScrollController.VerticalScrollController;

                SetupUIWithBiDirectionalScrollController(
                    scrollPresenter,
                    rectangleScrollPresenterContent,
                    biDirectionalScrollController,
                    loadedEvent);

                biDirectionalScrollController.ScrollCompleted += (BiDirectionalScrollController sender, BiDirectionalScrollControllerScrollingScrollCompletedEventArgs args) =>
                {
                    Log.Comment("AddScrollVelocity completed. OffsetsChangeCorrelationId=" + args);

                    Log.Comment("Setting completion event");
                    scrollCompletedEvent.Set();
                };
            });

            WaitForEvent("Waiting for Loaded event", loadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("BiDirectionalScrollController size={0}, {1}", biDirectionalScrollController.ActualWidth, biDirectionalScrollController.ActualHeight);
            });

            Log.Comment("Jump to zoomFactor 0.75");
            ZoomTo(
                scrollPresenter,
                0.75f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Adding velocity to offsets, with default inertia decay rates");
                biDirectionalScrollController.AddScrollVelocity(
                    new Vector2(100.0f) /*offsetsVelocity*/, null /*inertiaDecayRate*/);
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("scrollPresenter.HorizontalOffset={0}", scrollPresenter.HorizontalOffset);
                Log.Comment("scrollPresenter.VerticalOffset={0}", scrollPresenter.VerticalOffset);

                Verify.IsTrue(scrollPresenter.HorizontalOffset > 20.0);
                Verify.IsTrue(scrollPresenter.VerticalOffset > 20.0);

                Log.Comment("Adding negative velocity to offsets, with custom inertia decay rates");
                biDirectionalScrollController.AddScrollVelocity(
                    new Vector2(-50.0f) /*offsetsVelocity*/, new Vector2(0.9f) /*inertiaDecayRate*/);

                scrollCompletedEvent.Reset();
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("scrollPresenter.HorizontalOffset={0}", scrollPresenter.HorizontalOffset);
                Log.Comment("scrollPresenter.VerticalOffset={0}", scrollPresenter.VerticalOffset);

                Verify.IsTrue(scrollPresenter.HorizontalOffset < 20.0);
                Verify.IsTrue(scrollPresenter.VerticalOffset < 20.0);

                Log.Comment("Adding velocity to offsets, with no inertia decay rates");
                biDirectionalScrollController.AddScrollVelocity(
                    new Vector2(200.0f) /*offsetsVelocity*/, new Vector2(0.0f) /*inertiaDecayRate*/);

                scrollCompletedEvent.Reset();
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("scrollPresenter.HorizontalOffset={0}", scrollPresenter.HorizontalOffset);
                Log.Comment("scrollPresenter.VerticalOffset={0}", scrollPresenter.VerticalOffset);

                Verify.AreEqual(600.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(250.0, scrollPresenter.VerticalOffset);
            });
        }

void ChangeOffsetsWithAdditionalVelocityAndAttachedScrollControllers ( ) [inline]

Definition at line 291 of file ScrollControllerTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            CompositionScrollController horizontalScrollController = null;
            CompositionScrollController verticalScrollController = null;
            AutoResetEvent loadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollCompletedEvent = new AutoResetEvent(false);
            int hOffsetChangeCorrelationId = -1;
            int vOffsetChangeCorrelationId = -1;

            RunOnUIThread.Execute(() =>
            {
                // We need the styles of the CompositionScrollController, so let's load them
                App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();
                horizontalScrollController = new CompositionScrollController();
                verticalScrollController = new CompositionScrollController();

                horizontalScrollController.Orientation = Orientation.Horizontal;

                horizontalScrollController.LogMessage += (CompositionScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                verticalScrollController.LogMessage += (CompositionScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                scrollPresenter.HorizontalScrollController = horizontalScrollController;
                scrollPresenter.VerticalScrollController = verticalScrollController;

                SetupUIWithScrollControllers(
                    scrollPresenter,
                    rectangleScrollPresenterContent,
                    horizontalScrollController,
                    verticalScrollController,
                    loadedEvent);

                horizontalScrollController.OffsetChangeCompleted += (CompositionScrollController sender, CompositionScrollControllerOffsetChangeCompletedEventArgs args) =>
                {
                    Log.Comment("ChangeOffset completed. OffsetChangeCorrelationId=" + args.OffsetChangeCorrelationId);

                    Log.Comment("Setting completion event");
                    scrollCompletedEvent.Set();
                };
            });

            WaitForEvent("Waiting for Loaded event", loadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("HorizontalScrollController size={0}, {1}", horizontalScrollController.ActualWidth, horizontalScrollController.ActualHeight);
                Log.Comment("VerticalScrollController size={0}, {1}", verticalScrollController.ActualWidth, verticalScrollController.ActualHeight);
            });

            Log.Comment("Jump to zoomFactor 0.75");
            ZoomTo(
                scrollPresenter,
                0.75f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Adding velocity to horizontal offset, with default inertia decay rate");
                hOffsetChangeCorrelationId = horizontalScrollController.AddScrollVelocity(
                    100.0f /*offsetVelocity*/, null /*inertiaDecayRate*/);

                Log.Comment("Adding velocity to vertical offset, with default inertia decay rate");
                vOffsetChangeCorrelationId = verticalScrollController.AddScrollVelocity(
                    100.0f /*offsetVelocity*/, null /*inertiaDecayRate*/);

                Verify.AreEqual(hOffsetChangeCorrelationId, vOffsetChangeCorrelationId);
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("scrollPresenter.HorizontalOffset={0}", scrollPresenter.HorizontalOffset);
                Log.Comment("scrollPresenter.VerticalOffset={0}", scrollPresenter.VerticalOffset);

                Verify.IsTrue(scrollPresenter.HorizontalOffset > 20.0);
                Verify.IsTrue(scrollPresenter.VerticalOffset > 20.0);

                Log.Comment("Adding negative velocity to horizontal offset, with custom inertia decay rate");
                hOffsetChangeCorrelationId = horizontalScrollController.AddScrollVelocity(
                    -50.0f /*offsetVelocity*/, 0.9f /*inertiaDecayRate*/);

                Log.Comment("Adding negative velocity to vertical offset, with custom inertia decay rate");
                vOffsetChangeCorrelationId = verticalScrollController.AddScrollVelocity(
                    -50.0f /*offsetVelocity*/, 0.9f /*inertiaDecayRate*/);

                Verify.AreEqual(hOffsetChangeCorrelationId, vOffsetChangeCorrelationId);

                scrollCompletedEvent.Reset();
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("scrollPresenter.HorizontalOffset={0}", scrollPresenter.HorizontalOffset);
                Log.Comment("scrollPresenter.VerticalOffset={0}", scrollPresenter.VerticalOffset);

                Verify.IsTrue(scrollPresenter.HorizontalOffset < 20.0);
                Verify.IsTrue(scrollPresenter.VerticalOffset < 20.0);

                Log.Comment("Adding velocity to horizontal offset, with no inertia decay rate");
                hOffsetChangeCorrelationId = horizontalScrollController.AddScrollVelocity(
                    200.0f /*offsetVelocity*/, 0.0f /*inertiaDecayRate*/);

                Log.Comment("Adding velocity to vertical offset, with no inertia decay rate");
                vOffsetChangeCorrelationId = verticalScrollController.AddScrollVelocity(
                    200.0f /*offsetVelocity*/, 0.0f /*inertiaDecayRate*/);

                Verify.AreEqual(hOffsetChangeCorrelationId, vOffsetChangeCorrelationId);

                scrollCompletedEvent.Reset();
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("scrollPresenter.HorizontalOffset={0}", scrollPresenter.HorizontalOffset);
                Log.Comment("scrollPresenter.VerticalOffset={0}", scrollPresenter.VerticalOffset);

                Verify.AreEqual(600.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(250.0, scrollPresenter.VerticalOffset);
            });
        }

void ChangeOffsetsWithAttachedBiDirectionalScrollController ( ) [inline]

Definition at line 520 of file ScrollControllerTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            BiDirectionalScrollController biDirectionalScrollController = null;
            AutoResetEvent loadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollCompletedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                // We need the styles of the CompositionScrollController, so let's load them
                App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();
                biDirectionalScrollController = new BiDirectionalScrollController();

                biDirectionalScrollController.LogMessage += (BiDirectionalScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                scrollPresenter.HorizontalScrollController = biDirectionalScrollController.HorizontalScrollController;
                scrollPresenter.VerticalScrollController = biDirectionalScrollController.VerticalScrollController;

                SetupUIWithBiDirectionalScrollController(
                    scrollPresenter,
                    rectangleScrollPresenterContent,
                    biDirectionalScrollController,
                    loadedEvent);

                biDirectionalScrollController.ScrollCompleted += (BiDirectionalScrollController sender, BiDirectionalScrollControllerScrollingScrollCompletedEventArgs args) =>
                {
                    Log.Comment("ChangeOffset completed. OffsetsChangeCorrelationId=" + args);

                    Log.Comment("Setting completion event");
                    scrollCompletedEvent.Set();
                };
            });

            WaitForEvent("Waiting for Loaded event", loadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("BiDirectionalScrollController size={0}, {1}", biDirectionalScrollController.ActualWidth, biDirectionalScrollController.ActualHeight);
            });

            Log.Comment("Jump to zoomFactor 0.75");
            ZoomTo(
                scrollPresenter,
                0.75f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Jumping to offsets");
                biDirectionalScrollController.ScrollTo(
                    (c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 4.0,
                    (c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 4.0,
                    ScrollingAnimationMode.Disabled);
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual((c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 4.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual((c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 4.0, scrollPresenter.VerticalOffset);

                Log.Comment("Animating to offsets");
                biDirectionalScrollController.ScrollTo(
                    (c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 2.0,
                    (c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 2.0,
                    ScrollingAnimationMode.Enabled);

                scrollCompletedEvent.Reset();
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual((c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 2.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual((c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 2.0, scrollPresenter.VerticalOffset);
            });
        }

void ChangeOffsetsWithAttachedScrollControllers ( ) [inline]

Definition at line 169 of file ScrollControllerTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            CompositionScrollController horizontalScrollController = null;
            CompositionScrollController verticalScrollController = null;
            AutoResetEvent loadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollCompletedEvent = new AutoResetEvent(false);
            int hOffsetChangeCorrelationId = -1;
            int vOffsetChangeCorrelationId = -1;

            RunOnUIThread.Execute(() =>
            {
                // We need the styles of the CompositionScrollController, so let's load them
                App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();
                horizontalScrollController = new CompositionScrollController();
                verticalScrollController = new CompositionScrollController();

                horizontalScrollController.Orientation = Orientation.Horizontal;

                horizontalScrollController.LogMessage += (CompositionScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                verticalScrollController.LogMessage += (CompositionScrollController sender, string args) =>
                {
                    Log.Comment(args);
                };

                scrollPresenter.HorizontalScrollController = horizontalScrollController;
                scrollPresenter.VerticalScrollController = verticalScrollController;

                SetupUIWithScrollControllers(
                    scrollPresenter,
                    rectangleScrollPresenterContent,
                    horizontalScrollController,
                    verticalScrollController,
                    loadedEvent);

                horizontalScrollController.OffsetChangeCompleted += (CompositionScrollController sender, CompositionScrollControllerOffsetChangeCompletedEventArgs args) =>
                {
                    Log.Comment("ChangeOffset completed (horizontal). OffsetChangeCorrelationId=" + args.OffsetChangeCorrelationId);

                    Log.Comment("Setting completion event");
                    scrollCompletedEvent.Set();
                };

                verticalScrollController.OffsetChangeCompleted += (CompositionScrollController sender, CompositionScrollControllerOffsetChangeCompletedEventArgs args) =>
                {
                    Log.Comment("ChangeOffset completed (vertical). OffsetChangeCorrelationId=" + args.OffsetChangeCorrelationId);
                };
            });

            WaitForEvent("Waiting for Loaded event", loadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("HorizontalScrollController size={0}, {1}", horizontalScrollController.ActualWidth, horizontalScrollController.ActualHeight);
                Log.Comment("VerticalScrollController size={0}, {1}", verticalScrollController.ActualWidth, verticalScrollController.ActualHeight);
            });

            Log.Comment("Jump to zoomFactor 0.75");
            ZoomTo(
                scrollPresenter,
                0.75f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Jumping to horizontal offset");
                hOffsetChangeCorrelationId = horizontalScrollController.ScrollTo(
                    (c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 4.0,
                    ScrollingAnimationMode.Disabled);

                Log.Comment("Jumping to vertical offset");
                vOffsetChangeCorrelationId = verticalScrollController.ScrollTo(
                    (c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 4.0,
                    ScrollingAnimationMode.Disabled);

                Verify.AreEqual(hOffsetChangeCorrelationId, vOffsetChangeCorrelationId);
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual((c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 4.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual((c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 4.0, scrollPresenter.VerticalOffset);

                Log.Comment("Animating to horizontal offset");
                hOffsetChangeCorrelationId = horizontalScrollController.ScrollTo(
                    (c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 2.0,
                    ScrollingAnimationMode.Enabled);

                Log.Comment("Animating to vertical offset");
                vOffsetChangeCorrelationId = verticalScrollController.ScrollTo(
                    (c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 2.0,
                    ScrollingAnimationMode.Enabled);

                Verify.AreEqual(hOffsetChangeCorrelationId, vOffsetChangeCorrelationId);

                scrollCompletedEvent.Reset();
            });

            WaitForEvent("Waiting for operation completion", scrollCompletedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual((c_defaultUIScrollPresenterContentWidth * 0.75 - c_defaultUIScrollPresenterWidth) / 2.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual((c_defaultUIScrollPresenterContentHeight * 0.75 - c_defaultUIScrollPresenterHeight) / 2.0, scrollPresenter.VerticalOffset);
            });
        }

void ChangeZoomFactorBeforeLoading ( bool animate ) [inline, private]

Definition at line 1503 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
            ScrollPresenterOperation operation = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, false /*setAsContentRoot*/);

                scrollPresenter.ScrollStarting += (sender, args) =>
                {
                    Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ZoomStarting += (sender, args) =>
                {
                    Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                };

                operation = StartZoomTo(
                    scrollPresenter,
                    8.0f,
                    100.0f,
                    150.0f,
                    animate ? ScrollingAnimationMode.Enabled : ScrollingAnimationMode.Disabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvent);

                Log.Comment("Setting window content");
                Content = scrollPresenter;
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.IsLessThan(Math.Abs(scrollPresenter.HorizontalOffset - 700.0), 0.01);
                Verify.IsLessThan(Math.Abs(scrollPresenter.VerticalOffset - 1050.0), 0.01);
                Verify.AreEqual(8.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
            });
        }

void ConsecutiveOffsetJumps ( ) [inline]

Definition at line 849 of file ScrollPresenterViewChangeTests.cs.

        {
            ConsecutiveOffsetJumps(waitForFirstCompletion: true);
            ConsecutiveOffsetJumps(waitForFirstCompletion: false);
        }

void ConsecutiveOffsetJumps ( bool waitForFirstCompletion ) [inline, private]

Definition at line 855 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
            ScrollPresenterOperation[] operations = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                scrollPresenterViewChangeOperationEvents = new AutoResetEvent[3];
                scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
                scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);
                scrollPresenterViewChangeOperationEvents[2] = new AutoResetEvent(false);

                operations = new ScrollPresenterOperation[3];

                scrollPresenter.ScrollStarting += (sender, args) =>
                {
                    Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ZoomStarting += (sender, args) =>
                {
                    Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                };

                operations[0] = StartScrollTo(
                    scrollPresenter,
                    600.0,
                    400.0,
                    ScrollingAnimationMode.Disabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvents[0]);

                if (!waitForFirstCompletion)
                {
                    operations[1] = StartScrollTo(
                        scrollPresenter,
                        500.0,
                        300.0,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                }
            });

            WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);

            if (waitForFirstCompletion)
            {
                RunOnUIThread.Execute(() =>
                {
                    operations[1] = StartScrollTo(
                        scrollPresenter,
                        500.0,
                        300.0,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                });
            }

            WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(500.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(300.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);

                // Jump to the same offsets.
                operations[2] = StartScrollTo(
                    scrollPresenter,
                    500.0,
                    300.0,
                    ScrollingAnimationMode.Disabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvents[2]);
            });

            WaitForEvent("Waiting for third view change completion", scrollPresenterViewChangeOperationEvents[2]);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(500.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(300.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[2].Result);
            });
        }

void ConsecutiveScrollAndZoomJumps | ( | bool | isScrollRelative,
 |  | bool | isZoomRelative,
 |  | bool | waitForFirstCompletion |
 | ) |  |  | [inline, private]

Definition at line 1137 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
            ScrollPresenterOperation[] operations = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                scrollPresenterViewChangeOperationEvents = new AutoResetEvent[2];
                scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
                scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);

                operations = new ScrollPresenterOperation[2];

                scrollPresenter.ScrollStarting += (sender, args) =>
                {
                    Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ZoomStarting += (sender, args) =>
                {
                    Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                };

                if (isScrollRelative)
                {
                    operations[0] = StartScrollBy(
                        scrollPresenter,
                        80.0,
                        35.0,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
                else
                {
                    operations[0] = StartScrollTo(
                        scrollPresenter,
                        80.0,
                        35.0,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
            });

            if (waitForFirstCompletion)
            {
                WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
            }

            RunOnUIThread.Execute(() =>
            {
                if (isZoomRelative)
                {
                    operations[1] = StartZoomBy(
                        scrollPresenter,
                        2.0f,
                        10.0f,
                        90.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                }
                else
                {
                    operations[1] = StartZoomTo(
                        scrollPresenter,
                        3.0f,
                        10.0f,
                        90.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                }
            });

            if (!waitForFirstCompletion)
            {
                WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
            }
            WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(260.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(285.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(3.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
            });
        }

void ConsecutiveScrollAndZoomJumps ( ) [inline]

Definition at line 1125 of file ScrollPresenterViewChangeTests.cs.

        {
            ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: false, waitForFirstCompletion: true);
            ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: true, waitForFirstCompletion: true);
            ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: false, waitForFirstCompletion: true);
            ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: true, waitForFirstCompletion: true);
            ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: false, waitForFirstCompletion: false);
            ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: true, waitForFirstCompletion: false);
            ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: false, waitForFirstCompletion: false);
            ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: true, waitForFirstCompletion: false);
        }

void ConsecutiveZoomAndScrollJumps ( ) [inline]

Definition at line 1252 of file ScrollPresenterViewChangeTests.cs.

        {
            ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: false, waitForFirstCompletion: true);
            ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: true, waitForFirstCompletion: true);
            ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: false, waitForFirstCompletion: true);
            ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: true, waitForFirstCompletion: true);
            ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: false, waitForFirstCompletion: false);
            ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: true, waitForFirstCompletion: false);
            ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: false, waitForFirstCompletion: false);
            ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: true, waitForFirstCompletion: false);
        }

void ConsecutiveZoomAndScrollJumps | ( | bool | isZoomRelative,
 |  | bool | isScrollRelative,
 |  | bool | waitForFirstCompletion |
 | ) |  |  | [inline, private]

Definition at line 1264 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
            ScrollPresenterOperation[] operations = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                scrollPresenterViewChangeOperationEvents = new AutoResetEvent[2];
                scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
                scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);

                operations = new ScrollPresenterOperation[2];

                scrollPresenter.ScrollStarting += (sender, args) =>
                {
                    Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ZoomStarting += (sender, args) =>
                {
                    Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                };

                if (isZoomRelative)
                {
                    operations[0] = StartZoomBy(
                        scrollPresenter,
                        2.0f,
                        10.0f,
                        90.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
                else
                {
                    operations[0] = StartZoomTo(
                        scrollPresenter,
                        3.0f,
                        10.0f,
                        90.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
            });

            if (waitForFirstCompletion)
            {
                WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
            }

            RunOnUIThread.Execute(() =>
            {
                if (isScrollRelative)
                {
                    operations[1] = StartScrollBy(
                        scrollPresenter,
                        80.0,
                        35.0,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                }
                else
                {
                    operations[1] = StartScrollTo(
                        scrollPresenter,
                        80.0,
                        35.0,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                }
            });

            if (!waitForFirstCompletion)
            {
                WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
            }
            WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                if (isScrollRelative)
                {
                    Verify.AreEqual(100.0, scrollPresenter.HorizontalOffset);
                    Verify.AreEqual(215.0, scrollPresenter.VerticalOffset);
                }
                else
                {
                    Verify.AreEqual(80.0, scrollPresenter.HorizontalOffset);
                    Verify.AreEqual(35.0, scrollPresenter.VerticalOffset);
                }
                Verify.AreEqual(3.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
            });
        }

void ConsecutiveZoomFactorJumps ( ) [inline]

Definition at line 972 of file ScrollPresenterViewChangeTests.cs.

        {
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: false, waitForFirstCompletion: true);
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: true, waitForFirstCompletion: true);
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: false, waitForFirstCompletion: true);
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: true, waitForFirstCompletion: true);
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: false, waitForFirstCompletion: false);
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: true, waitForFirstCompletion: false);
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: false, waitForFirstCompletion: false);
            ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: true, waitForFirstCompletion: false);
        }

void ConsecutiveZoomFactorJumps | ( | bool | isFirstZoomRelative,
 |  | bool | isSecondZoomRelative,
 |  | bool | waitForFirstCompletion |
 | ) |  |  | [inline, private]

Definition at line 984 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
            ScrollPresenterOperation[] operations = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                scrollPresenterViewChangeOperationEvents = new AutoResetEvent[3];
                scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
                scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);
                scrollPresenterViewChangeOperationEvents[2] = new AutoResetEvent(false);

                operations = new ScrollPresenterOperation[3];

                scrollPresenter.ScrollStarting += (sender, args) =>
                {
                    Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ZoomStarting += (sender, args) =>
                {
                    Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                };

                if (isFirstZoomRelative)
                {
                    operations[0] = StartZoomBy(
                        scrollPresenter,
                        7.0f,
                        150.0f,
                        120.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
                else
                {
                    operations[0] = StartZoomTo(
                        scrollPresenter,
                        8.0f,
                        150.0f,
                        120.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
            });

            if (waitForFirstCompletion)
            {
                WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
            }

            RunOnUIThread.Execute(() =>
            {
                if (isFirstZoomRelative)
                {
                    operations[1] = StartZoomBy(
                        scrollPresenter,
                        -1.0f,
                        10.0f,
                        90.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                }
                else
                {
                    operations[1] = StartZoomTo(
                        scrollPresenter,
                        7.0f,
                        10.0f,
                        90.0f,
                        ScrollingAnimationMode.Disabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[1]);
                }
            });

            if (!waitForFirstCompletion)
            {
                WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
            }
            WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(917.5, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(723.75, scrollPresenter.VerticalOffset);
                Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);

                // Jump to the same zoomFactor
                operations[2] = StartZoomTo(
                    scrollPresenter,
                    7.0f,
                    10.0f,
                    90.0f,
                    ScrollingAnimationMode.Disabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvents[2]);
            });

            WaitForEvent("Waiting for third view change completion", scrollPresenterViewChangeOperationEvents[2]);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(917.5, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(723.75, scrollPresenter.VerticalOffset);
                Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[2].Result);
            });
        }

double GetArrangeRenderSizesDelta | ( | BiDirectionalAlignment | alignment,
 |  | double | extentSize,
 |  | double | renderSize,
 |  | double | nearMargin,
 |  | double | farMargin |
 | ) |  |  | [inline, private]

Definition at line 1375 of file ScrollPresenterLayoutTests.cs.

        {
            double delta = extentSize - renderSize;

            if (alignment == BiDirectionalAlignment.Near)
            {
                delta = 0.0;
            }
            else
            {
                delta -= nearMargin + farMargin;
            }

            if (alignment == BiDirectionalAlignment.Center ||
                alignment == BiDirectionalAlignment.Stretch)
            {
                delta /= 2.0;
            }

            delta += nearMargin;

            Log.Comment($"GetArrangeRenderSizesDelta returns {delta}.");
            return delta;
        }

bool GetEffectiveIsAnimationEnabled | ( | ScrollingAnimationMode | animationMode,
 |  | bool? | isAnimationsEnabledOverride |
 | ) |  |  | [inline, private]

Definition at line 2630 of file ScrollPresenterViewChangeTests.cs.

        {
            switch (animationMode)
            {
                case ScrollingAnimationMode.Auto:
                    switch (isAnimationsEnabledOverride)
                    {
                        case null:
                            return new UISettings().AnimationsEnabled;
                        default:
                            return isAnimationsEnabledOverride.Value;
                    }
                case ScrollingAnimationMode.Enabled:
                    return true;
            }

            return false;
        }

void ImageWithConstrainedHeight ( ) [inline]

Definition at line 848 of file ScrollPresenterLayoutTests.cs.

        {
            const float c_smallZoomFactor = 0.5f;
            const float c_largeZoomFactor = 2.0f;
            const double c_imageWidth = 250.0;
            const double c_topMargin = 40.0;
            const double c_bottomMargin = 10.0;
            ScrollPresenter scrollPresenter = null;
            Image imageScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            Compositor compositor = null;

            RunOnUIThread.Execute(() =>
            {
                imageScrollPresenterContent = new Image();
                scrollPresenter = new ScrollPresenter();

                Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
                Verify.IsNotNull(uri);
                imageScrollPresenterContent.Source = new BitmapImage(uri);
                imageScrollPresenterContent.Margin = new Thickness(0, c_topMargin, 0, c_bottomMargin);
                scrollPresenter.Content = imageScrollPresenterContent;
                scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);

                // Constraining the Image height and making the ScrollPresenter smaller than the Image
                imageScrollPresenterContent.Width = c_imageWidth;
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
                compositor = CompositionTarget.GetCompositorForCurrentThread();
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Stretch,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: 0f,
                expectedZoomFactor: 1.0f);

            // Jump to absolute small zoomFactor to make the content smaller than the viewport.
            ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Stretch,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor / 2.0), // -50
                expectedZoomFactor: c_smallZoomFactor);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Top,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_smallZoomFactor);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Bottom,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor), // -100
                expectedZoomFactor: c_smallZoomFactor);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Center,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor / 2.0), // -50
                expectedZoomFactor: c_smallZoomFactor);

            // Jump to absolute large zoomFactor to make the content larger than the viewport.
            ZoomTo(scrollPresenter, c_largeZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Stretch,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Top,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Bottom,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);

            ValidateContentWithConstrainedHeight(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                verticalAlignment: VerticalAlignment.Center,
                topMargin: c_topMargin,
                bottomMargin: c_bottomMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);
        }

void ImageWithConstrainedSize ( ) [inline]

Definition at line 982 of file ScrollPresenterLayoutTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                const float c_smallZoomFactor = 0.5f;
                const float c_largeZoomFactor = 2.0f;
                const double c_imageWidth = 2400;
                const double c_imageHeight = 1400.0;
                const double c_scrollPresenterWidth = 314.0;
                const double c_scrollPresenterHeight = 210.0;
                const double c_leftMargin = 20.0;
                const double c_rightMargin = 30.0;
                const double c_topMargin = 40.0;
                const double c_bottomMargin = 10.0;
                ScrollPresenter scrollPresenter = null;
                Image imageScrollPresenterContent = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                Compositor compositor = null;

                RunOnUIThread.Execute(() =>
                {
                    imageScrollPresenterContent = new Image();
                    scrollPresenter = new ScrollPresenter();

                    Uri uri = new Uri("ms-appx:/Assets/LargeWisteria.jpg");
                    Verify.IsNotNull(uri);
                    imageScrollPresenterContent.Source = new BitmapImage(uri);
                    imageScrollPresenterContent.Margin = new Thickness(c_leftMargin, c_topMargin, c_rightMargin, c_bottomMargin);
                    scrollPresenter.Content = imageScrollPresenterContent;
                    scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);

                    SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);

                // Constraining the Image width and height, and making the ScrollPresenter smaller than the Image
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.None;
                    scrollPresenter.Width = c_scrollPresenterWidth;
                    scrollPresenter.Height = c_scrollPresenterHeight;
                    compositor = CompositionTarget.GetCompositorForCurrentThread();
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                ValidateContentWithConstrainedSize(
                    compositor,
                    scrollPresenter,
                    content: imageScrollPresenterContent,
                    horizontalAlignment: HorizontalAlignment.Stretch,
                    verticalAlignment: VerticalAlignment.Stretch,
                    expectedMinPositionX: 0.0f,
                    expectedMinPositionY: (float)-(c_scrollPresenterHeight - (c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth - c_topMargin - c_bottomMargin) / 2.0f, //-3
                    expectedZoomFactor: 1.0f);

                // Jump to absolute small zoomFactor to make the content smaller than the viewport.
                ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

                ValidateContentWithConstrainedSize(
                    compositor,
                    scrollPresenter,
                    content: imageScrollPresenterContent,
                    horizontalAlignment: HorizontalAlignment.Stretch,
                    verticalAlignment: VerticalAlignment.Stretch,
                    expectedMinPositionX: (float)-c_scrollPresenterWidth / 4.0f, // -78.5
                    expectedMinPositionY: (float)-(c_scrollPresenterHeight - ((c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth + c_topMargin + c_bottomMargin) * c_smallZoomFactor) / 2.0f, //-54
                    expectedZoomFactor: c_smallZoomFactor);

                // Jump to absolute large zoomFactor to make the content larger than the viewport.
                ZoomTo(scrollPresenter, c_largeZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);

                ValidateContentWithConstrainedSize(
                    compositor,
                    scrollPresenter,
                    content: imageScrollPresenterContent,
                    horizontalAlignment: HorizontalAlignment.Stretch,
                    verticalAlignment: VerticalAlignment.Stretch,
                    expectedMinPositionX: 0.0f,
                    expectedMinPositionY: 0.0f,
                    expectedZoomFactor: c_largeZoomFactor);
            }
        }

void ImageWithConstrainedWidth ( ) [inline]

Definition at line 652 of file ScrollPresenterLayoutTests.cs.

        {
            const float c_smallZoomFactor = 0.5f;
            const float c_largeZoomFactor = 2.0f;
            const double c_imageHeight = 300.0;
            const double c_scrollPresenterWidth = 200.0;
            const double c_leftMargin = 20.0;
            const double c_rightMargin = 30.0;
            ScrollPresenter scrollPresenter = null;
            Image imageScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            Compositor compositor = null;

            RunOnUIThread.Execute(() =>
            {
                imageScrollPresenterContent = new Image();
                scrollPresenter = new ScrollPresenter();

                Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
                Verify.IsNotNull(uri);
                imageScrollPresenterContent.Source = new BitmapImage(uri);
                imageScrollPresenterContent.Margin = new Thickness(c_leftMargin, 0, c_rightMargin, 0);
                scrollPresenter.Content = imageScrollPresenterContent;
                scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);

                // Constraining the Image width and making the ScrollPresenter smaller than the Image
                imageScrollPresenterContent.Height = c_imageHeight;
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
                scrollPresenter.Width = c_scrollPresenterWidth;
                compositor = CompositionTarget.GetCompositorForCurrentThread();
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Stretch,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: 1.0f);

            // Jump to absolute small zoomFactor to make the content smaller than the viewport.
            ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Stretch,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: (float)(-c_scrollPresenterWidth * c_smallZoomFactor / 2.0), // -50
                expectedZoomFactor: c_smallZoomFactor);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Left,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_smallZoomFactor);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Right,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: (float)(-c_scrollPresenterWidth * c_smallZoomFactor), // -100
                expectedZoomFactor: c_smallZoomFactor);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Center,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: (float)(-c_scrollPresenterWidth * c_smallZoomFactor / 2.0), // -50
                expectedZoomFactor: c_smallZoomFactor);

            // Jump to absolute large zoomFactor to make the content larger than the viewport.
            ZoomTo(scrollPresenter, c_largeZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Stretch,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Left,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Right,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);

            ValidateContentWithConstrainedWidth(
                compositor,
                scrollPresenter,
                content: imageScrollPresenterContent,
                horizontalAlignment: HorizontalAlignment.Center,
                leftMargin: c_leftMargin,
                rightMargin: c_rightMargin,
                expectedMinPosition: 0.0f,
                expectedZoomFactor: c_largeZoomFactor);
        }

void ImageWithUnnaturalSize ( ) [inline]

Definition at line 563 of file ScrollPresenterLayoutTests.cs.

        {
            const double c_UnnaturalImageWidth = 1200.0;
            const double c_UnnaturalImageHeight = 1000.0;
            ScrollPresenter scrollPresenter = null;
            Image imageScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                imageScrollPresenterContent = new Image();
                scrollPresenter = new ScrollPresenter();

                Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
                Verify.IsNotNull(uri);
                imageScrollPresenterContent.Source = new BitmapImage(uri);
                imageScrollPresenterContent.Width = c_UnnaturalImageWidth;
                imageScrollPresenterContent.Height = c_UnnaturalImageHeight;
                scrollPresenter.Content = imageScrollPresenterContent;

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Try to jump beyond maximum offsets
            ScrollTo(
                scrollPresenter,
                c_UnnaturalImageWidth - c_defaultUIScrollPresenterWidth + 10.0,
                c_UnnaturalImageHeight - c_defaultUIScrollPresenterHeight + 10.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: true,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: c_UnnaturalImageWidth - c_defaultUIScrollPresenterWidth,
                expectedFinalVerticalOffset: c_UnnaturalImageHeight - c_defaultUIScrollPresenterHeight);
        }

void InsertStackPanelChild | ( | StackPanel | stackPanel,
 |  | int | operationCount,
 |  | int | newIndex,
 |  | int | newCount,
 |  | string | namePrefix = "" |
 | ) |  |  | [inline, private]

Definition at line 661 of file ScrollPresenterAnchoringTests.cs.

        {
            if (newIndex < 0 || newIndex > stackPanel.Children.Count || newCount <= 0)
            {
                throw new ArgumentException();
            }

            SolidColorBrush chartreuseBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            SolidColorBrush blanchedAlmondBrush = new SolidColorBrush(Microsoft.UI.Colors.BlanchedAlmond);

            for (int i = 0; i < newCount; i++)
            {
                TextBlock textBlock = new TextBlock();
                textBlock.Text = "TB#" + stackPanel.Children.Count + "_" + operationCount;
                textBlock.Name = namePrefix + "textBlock" + stackPanel.Children.Count + "_" + operationCount;
                textBlock.HorizontalAlignment = HorizontalAlignment.Center;
                textBlock.VerticalAlignment = VerticalAlignment.Center;

                Border border = new Border();
                border.Name = namePrefix + "border" + stackPanel.Children.Count + "_" + operationCount;
                border.BorderThickness = border.Margin = new Thickness(3);
                border.BorderBrush = chartreuseBrush;
                border.Background = blanchedAlmondBrush;
                border.Width = stackPanel.Orientation == Orientation.Vertical ? 170 : 120;
                border.Height = stackPanel.Orientation == Orientation.Vertical ? 120 : 170;
                border.Child = textBlock;

                stackPanel.Children.Insert(newIndex + i, border);
            }
        }

void InterruptOffsetsChangeWithOffsetsChange ( ) [inline]

Definition at line 734 of file ScrollPresenterViewChangeTests.cs.

        {
            InterruptViewChange(ViewChangeInterruptionKind.OffsetsChangeByOffsetsChange);
        }

void InterruptOffsetsChangeWithZoomFactorChange ( ) [inline]

Definition at line 741 of file ScrollPresenterViewChangeTests.cs.

        {
            InterruptViewChange(ViewChangeInterruptionKind.OffsetsChangeByZoomFactorChange);
        }

void InterruptViewChange ( ViewChangeInterruptionKind viewChangeInterruptionKind ) [inline, private]

Definition at line 2472 of file ScrollPresenterViewChangeTests.cs.

        {
            bool viewChangeInterruptionDone = false;
            bool changeOffsetsFirst =
                viewChangeInterruptionKind == ViewChangeInterruptionKind.OffsetsChangeByOffsetsChange || viewChangeInterruptionKind == ViewChangeInterruptionKind.OffsetsChangeByZoomFactorChange;
            bool changeOffsetsSecond =
                viewChangeInterruptionKind == ViewChangeInterruptionKind.OffsetsChangeByOffsetsChange || viewChangeInterruptionKind == ViewChangeInterruptionKind.ZoomFactorChangeByOffsetsChange;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
            ScrollPresenterOperation[] operations = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                scrollPresenterViewChangeOperationEvents = new AutoResetEvent[2];
                scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
                scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);

                operations = new ScrollPresenterOperation[2];
                operations[0] = null;
                operations[1] = null;

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");

                    if (viewChangedCount == 3u && !viewChangeInterruptionDone)
                    {
                        viewChangeInterruptionDone = true;
                        if (changeOffsetsSecond)
                        {
                            operations[1] = StartScrollTo(
                                scrollPresenter,
                                500.0,
                                300.0,
                                ScrollingAnimationMode.Enabled,
                                ScrollingSnapPointsMode.Ignore,
                                scrollPresenterViewChangeOperationEvents[1]);
                        }
                        else
                        {
                            operations[1] = StartZoomTo(
                                scrollPresenter,
                                7.0f,
                                70.0f,
                                50.0f,
                                ScrollingAnimationMode.Enabled,
                                ScrollingSnapPointsMode.Ignore,
                                scrollPresenterViewChangeOperationEvents[1]);
                        }
                    }
                };

                if (changeOffsetsFirst)
                {
                    operations[0] = StartScrollTo(
                        scrollPresenter,
                        600.0,
                        400.0,
                        ScrollingAnimationMode.Enabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
                else
                {
                    operations[0] = StartZoomTo(
                        scrollPresenter,
                        8.0f,
                        100.0f,
                        150.0f,
                        ScrollingAnimationMode.Enabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvents[0]);
                }
            });

            WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);

            WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                if (changeOffsetsFirst && changeOffsetsSecond)
                {
                    Verify.AreEqual(500.0, scrollPresenter.HorizontalOffset);
                    Verify.AreEqual(300.0, scrollPresenter.VerticalOffset);
                    Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                }
                if (changeOffsetsFirst && !changeOffsetsSecond)
                {
                    Verify.IsGreaterThanOrEqual(scrollPresenter.HorizontalOffset, 600.0);
                    Verify.IsGreaterThanOrEqual(scrollPresenter.VerticalOffset, 400.0);
                    Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
                }
                if (!changeOffsetsFirst && changeOffsetsSecond)
                {
                    Verify.IsGreaterThanOrEqual(scrollPresenter.HorizontalOffset, 500.0);
                    Verify.IsGreaterThanOrEqual(scrollPresenter.VerticalOffset, 300.0);
                    Verify.AreEqual(8.0f, scrollPresenter.ZoomFactor);
                }
                if (!changeOffsetsFirst && !changeOffsetsSecond)
                {
                    Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
                }

                Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operations[0].Result);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
            });
        }

void InterruptViewChangeWithUnloading ( ) [inline]

Definition at line 671 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
            ScrollPresenterOperation operation = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, setAsContentRoot: true);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter.ScrollStarting += (sender, args) =>
                {
                    Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ZoomStarting += (sender, args) =>
                {
                    Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                };

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                };

                operation = StartScrollTo(
                    scrollPresenter,
                    600.0,
                    400.0,
                    ScrollingAnimationMode.Disabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvent);

                Log.Comment("Resetting window content to unparent ScrollPresenter");
                Content = null;
            });

            WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operation.Result);
            });
        }

void InterruptZoomFactorChangeWithOffsetsChange ( ) [inline]

Definition at line 748 of file ScrollPresenterViewChangeTests.cs.

        {
            InterruptViewChange(ViewChangeInterruptionKind.ZoomFactorChangeByOffsetsChange);
        }

void InterruptZoomFactorChangeWithZoomFactorChange ( ) [inline]

Definition at line 755 of file ScrollPresenterViewChangeTests.cs.

        {
            InterruptViewChange(ViewChangeInterruptionKind.ZoomFactorChangeByZoomFactorChange);
        }

void ListenToContentEffectiveViewportChanged ( ) [inline]

Definition at line 679 of file ScrollPresenterTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            int effectiveViewportChangedCount = 0;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);

                rectangleScrollPresenterContent.EffectiveViewportChanged += (FrameworkElement sender, EffectiveViewportChangedEventArgs args) =>
                {
                    Log.Comment("ScrollPresenter.Content.EffectiveViewportChanged: BringIntoViewDistance=" +
                        args.BringIntoViewDistanceX + "," + args.BringIntoViewDistanceY + ", EffectiveViewport=" +
                        args.EffectiveViewport.ToString() + ", MaxViewport=" + args.MaxViewport.ToString());
                    effectiveViewportChangedCount++;
                };
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            ScrollTo(
                scrollPresenter,
                horizontalOffset: 250,
                verticalOffset: 150,
                animationMode: ScrollingAnimationMode.Enabled,
                snapPointsMode: ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Expect multiple EffectiveViewportChanged occurrences during the animated offsets change.");
                Verify.IsGreaterThanOrEqual(effectiveViewportChangedCount, 1);
            });
        }

void OffsetJumpAfterContentResizing ( ) [inline]

Definition at line 1415 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth + 200.0;
            });

            // Jump to absolute offsets
            ScrollTo(
                scrollPresenter,
                c_defaultUIScrollPresenterContentWidth + 200.0 - c_defaultUIScrollPresenterWidth,
                c_defaultVerticalOffset,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore);
        }

void OffsetsChangeWithCustomDuration ( ) [inline]

Definition at line 508 of file ScrollPresenterViewChangeTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                ScrollPresenter scrollPresenter = null;
                Rectangle rectangleScrollPresenterContent = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollPresenterContent = new Rectangle();
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter.ScrollStarting += (sender, args) =>
                    {
                        Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                    };

                    scrollPresenter.ZoomStarting += (sender, args) =>
                    {
                        Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                    };

                    scrollPresenter.ViewChanged += (sender, args) =>
                    {
                        Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                    };

                    scrollPresenter.ScrollAnimationStarting += (sender, args) =>
                    {
                        Log.Comment("ScrollAnimationStarting - OffsetsChangeCorrelationId={0}", args.CorrelationId);
                        Verify.IsNotNull(args.Animation);
                        Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;
                        Verify.IsNotNull(stockKeyFrameAnimation);
                        Log.Comment("Stock duration={0} msec.", stockKeyFrameAnimation.Duration.TotalMilliseconds);
                        Verify.AreEqual(c_MaxStockOffsetsChangeDuration, stockKeyFrameAnimation.Duration.TotalMilliseconds);
                        stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(10);
                    };

                    operation = StartScrollTo(
                        scrollPresenter,
                        600.0,
                        400.0,
                        ScrollingAnimationMode.Enabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvent);
                });

                WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                    Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
                    Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
                    Log.Comment($"Final viewChangedCount={viewChangedCount}");

                    Verify.AreEqual(600.0, scrollPresenter.HorizontalOffset);
                    Verify.AreEqual(400.0, scrollPresenter.VerticalOffset);
                    Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);

                    Verify.AreEqual(0u, scrollStartingCount);
                    Verify.AreEqual(0u, zoomStartingCount);
                    Verify.IsLessThanOrEqual(viewChangedCount, 2u);

                    Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                });
            }
        }

void OffsetsChangeWithNoContent ( ) [inline]

Definition at line 762 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
            ScrollPresenterOperation operation = null;

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, null /*rectangleScrollPresenterContent*/, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                operation = StartScrollTo(
                    scrollPresenter,
                    600.0,
                    400.0,
                    ScrollingAnimationMode.Enabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvent);
            });

            WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Ignored, operation.Result);
            });
        }

void OverlappingRepeatedSnapPointsThrow ( ) [inline]

Definition at line 45 of file ScrollPresenterSnapPointTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollPresenter scrollPresenter = new ScrollPresenter();
                RepeatedScrollSnapPoint snapPoint1 = new RepeatedScrollSnapPoint(offset:  10, interval: 10, start:  10, end: 100, alignment: ScrollSnapPointsAlignment.Near);
                RepeatedScrollSnapPoint snapPoint2 = new RepeatedScrollSnapPoint(offset:  10, interval: 10, start:  10, end: 100, alignment: ScrollSnapPointsAlignment.Near);
                RepeatedScrollSnapPoint snapPoint3 = new RepeatedScrollSnapPoint(offset:   0, interval:  2, start:   0, end:  12, alignment: ScrollSnapPointsAlignment.Near);
                RepeatedScrollSnapPoint snapPoint4 = new RepeatedScrollSnapPoint(offset:   0, interval:  2, start:   0, end:  10, alignment: ScrollSnapPointsAlignment.Near);
                RepeatedScrollSnapPoint snapPoint5 = new RepeatedScrollSnapPoint(offset: 100, interval:  2, start: 100, end: 200, alignment: ScrollSnapPointsAlignment.Near);

                scrollPresenter.VerticalSnapPoints.Add(snapPoint1);
                Verify.Throws<ArgumentException>(() => { scrollPresenter.VerticalSnapPoints.Add(snapPoint2); });
                Verify.Throws<ArgumentException>(() => { scrollPresenter.VerticalSnapPoints.Add(snapPoint3); });
                scrollPresenter.HorizontalSnapPoints.Add(snapPoint4);
                scrollPresenter.HorizontalSnapPoints.Add(snapPoint5);
            });
        }

void PinchContentThroughMaxZoomFactor ( ) [inline]

Definition at line 373 of file ScrollPresenterTests.cs.

        {
            const double newMaxZoomFactor = 0.5;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            Compositor compositor = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(
                    scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
                compositor = CompositionTarget.GetCompositorForCurrentThread();
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.IsTrue(newMaxZoomFactor < c_defaultZoomFactor);
                Verify.IsTrue(newMaxZoomFactor < c_defaultMaxZoomFactor);
                Verify.IsTrue(newMaxZoomFactor > c_defaultMinZoomFactor);
                scrollPresenter.MaxZoomFactor = newMaxZoomFactor;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Setting up spy on translation and scale facades");

                CompositionPropertySpy.StartSpyingTranslationFacade(rectangleScrollPresenterContent, compositor, Vector3.Zero);
                CompositionPropertySpy.StartSpyingScaleFacade(rectangleScrollPresenterContent, compositor, Vector3.One);
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                CompositionPropertySpy.StopSpyingTranslationFacade(rectangleScrollPresenterContent);
                CompositionPropertySpy.StopSpyingScaleFacade(rectangleScrollPresenterContent);
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
                Verify.AreEqual(newMaxZoomFactor, scrollPresenter.ZoomFactor);
                Verify.AreEqual(newMaxZoomFactor, scrollPresenter.MaxZoomFactor);
            });

            Log.Comment("Validating final transform of ScrollPresenter.Content's Visual after MaxZoomFactor change");
            CompositionGetValueStatus status;

            RunOnUIThread.Execute(() =>
            {
                Vector3 translation;
                status = CompositionPropertySpy.TryGetTranslationFacade(rectangleScrollPresenterContent, out translation);
                Log.Comment("status={0}, horizontal offset={1}", status, translation.X);
                Log.Comment("status={0}, vertical offset={1}", status, translation.Y);
                Verify.AreEqual(c_defaultHorizontalOffset, translation.X);
                Verify.AreEqual(c_defaultVerticalOffset, translation.Y);

                Vector3 scale;
                status = CompositionPropertySpy.TryGetScaleFacade(rectangleScrollPresenterContent, out scale);
                Log.Comment("status={0}, vertical offset={1}", status, scale.X);
                Verify.AreEqual(newMaxZoomFactor, scale.X);
            });
        }

void ReadExpressionAnimationSources ( ) [inline]

Definition at line 530 of file ScrollPresenterTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(
                    scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Setting up spy property set");
                CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesOffsetPropertyName, Vector2.Zero);
                CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesPositionPropertyName, Vector2.Zero);
                CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMinPositionPropertyName, Vector2.Zero);
                CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMaxPositionPropertyName, Vector2.Zero);
                CompositionPropertySpy.StartSpyingScalarProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesZoomFactorPropertyName, 1.0f);
            });

            Log.Comment("Jumping to absolute zoomFactor");
            ZoomTo(scrollPresenter, 2.0f, 100.0f, 200.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Cancelling spying");
                CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesOffsetPropertyName);
                CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesPositionPropertyName);
                CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMinPositionPropertyName);
                CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMaxPositionPropertyName);
                CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesZoomFactorPropertyName);
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Validating final property values of ScrollPresenter.ExpressionAnimationSources");
                CompositionGetValueStatus status;
                float zoomFactor;
                Vector2 offset;
                Vector2 position;
                Vector2 minPosition;
                Vector2 maxPosition;
                Vector2 extent;
                Vector2 viewport;

                Log.Comment("Validating final zoomFactor");
                status = CompositionPropertySpy.TryGetScalar(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesZoomFactorPropertyName, out zoomFactor);
                Log.Comment("status={0}, zoomFactor={1}", status, zoomFactor);
                Verify.AreEqual(2.0f, zoomFactor);

                Log.Comment("Validating final offset");
                status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesOffsetPropertyName, out offset);
                Log.Comment("status={0}, offset={1}", status, offset);
                Verify.AreEqual(0.0f, offset.X);
                Verify.AreEqual(0.0f, offset.Y);

                Log.Comment("Validating final position");
                status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesPositionPropertyName, out position);
                Log.Comment("status={0}, position={1}", status, position);
                Verify.AreEqual(100.0f, position.X);
                Verify.AreEqual(200.0f, position.Y);

                Log.Comment("Validating final minPosition");
                status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMinPositionPropertyName, out minPosition);
                Log.Comment("status={0}, minPosition={1}", status, minPosition);
                Verify.AreEqual(0.0f, minPosition.X);
                Verify.AreEqual(0.0f, minPosition.Y);

                Log.Comment("Validating final maxPosition");
                status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMaxPositionPropertyName, out maxPosition);
                Log.Comment("status={0}, maxPosition={1}", status, maxPosition);
                Verify.AreEqual(2100.0f, maxPosition.X);
                Verify.AreEqual(1000.0f, maxPosition.Y);

                Log.Comment("Validating final extent");
                status = scrollPresenter.ExpressionAnimationSources.TryGetVector2(c_expressionAnimationSourcesExtentPropertyName, out extent);
                Log.Comment("status={0}, extent={1}", status, extent);
                Verify.AreEqual(c_defaultUIScrollPresenterContentWidth, extent.X);
                Verify.AreEqual(c_defaultUIScrollPresenterContentHeight, extent.Y);

                Log.Comment("Validating final viewport");
                status = scrollPresenter.ExpressionAnimationSources.TryGetVector2(c_expressionAnimationSourcesViewportPropertyName, out viewport);
                Log.Comment("status={0}, viewport={1}", status, viewport);
                Verify.AreEqual(c_defaultUIScrollPresenterWidth, viewport.X);
                Verify.AreEqual(c_defaultUIScrollPresenterHeight, viewport.Y);
            });
        }

void RightToLeftFlowDirection ( ) [inline]

Definition at line 1064 of file ScrollPresenterLayoutTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle() {
                    Margin = new Thickness(25.0)
                };
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Jump to absolute offsets
            ScrollTo(
                scrollPresenter,
                11.0,
                17.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: true,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: 11.0,
                expectedFinalVerticalOffset: 17.0);

            // Jump to absolute zoom factor
            ZoomTo(
                scrollPresenter,
                2.0f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false);

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"After view changes: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                Verify.AreEqual(22.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(34.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(2.0f, scrollPresenter.ZoomFactor);
            });

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter.FlowDirection = FlowDirection.RightToLeft;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"After FlowDirection change: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                Verify.AreEqual(22.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(34.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(2.0f, scrollPresenter.ZoomFactor);
            });

            // Jump to absolute offsets in RightToLeft flow direction
            ScrollTo(
                scrollPresenter,
                7.0,
                13.0,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false,
                isAnimationsEnabledOverride: null,
                expectedFinalHorizontalOffset: 7.0,
                expectedFinalVerticalOffset: 13.0);

            // Jump to absolute zoom factor in RightToLeft flow direction
            ZoomTo(
                scrollPresenter,
                4.0f,
                0.0f,
                0.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Ignore,
                hookViewChangingAndChanged: false);

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"After view changes in RightToLeft flow direction: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                Verify.AreEqual(14.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(26.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(4.0f, scrollPresenter.ZoomFactor);
            });
        }

void ScrollBy | ( | ScrollPresenter | scrollPresenter,
 |  | double | horizontalOffsetDelta,
 |  | double | verticalOffsetDelta,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | bool | hookViewChangingAndChanged = true,
 |  | bool? | isAnimationsEnabledOverride = null,
 |  | double? | expectedFinalHorizontalOffset = null,
 |  | double? | expectedFinalVerticalOffset = null |
 | ) |  |  | [inline, private]

Definition at line 1683 of file ScrollPresenterViewChangeTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: false,
                enableInteractionSourcesNotifications: false,
                enableExpressionAnimationStatusNotifications: true,
                isAnimationsEnabledOverride: isAnimationsEnabledOverride))
            {
                Log.Comment("Waiting for any pending ExpressionAnimation start/stop notifications to occur");
                CompositionPropertySpy.SynchronouslyTickUIThread(6);

                double? anticipatedHorizontalOffset = null;
                double? anticipatedVerticalOffset = null;
                float? anticipatedZoomFactor = null;
                double originalHorizontalOffset = 0.0;
                double originalVerticalOffset = 0.0;
                float originalZoomFactor = 1.0f;
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenterTestHooksHelper.ResetExpressionAnimationStatusChanges(scrollPresenter);

                    if (hookViewChangingAndChanged)
                    {
                        scrollPresenter.ScrollStarting += (sender, args) =>
                        {
                            Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ZoomStarting += (sender, args) =>
                        {
                            Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ViewChanged += (sender, args) =>
                        {
                            Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                        };
                    }

                    originalHorizontalOffset = scrollPresenter.HorizontalOffset;
                    originalVerticalOffset = scrollPresenter.VerticalOffset;
                    originalZoomFactor = scrollPresenter.ZoomFactor;

                    Log.Comment($"Original HorizontalOffset={originalHorizontalOffset}, VerticalOffset={originalVerticalOffset}, ZoomFactor={originalZoomFactor}");

                    if (expectedFinalHorizontalOffset == null)
                    {
                        expectedFinalHorizontalOffset = horizontalOffsetDelta + originalHorizontalOffset;
                    }

                    if (expectedFinalVerticalOffset == null)
                    {
                        expectedFinalVerticalOffset = verticalOffsetDelta + originalVerticalOffset;
                    }

                    operation = StartScrollBy(
                        scrollPresenter,
                        horizontalOffsetDelta,
                        verticalOffsetDelta,
                        animationMode,
                        snapPointsMode,
                        scrollPresenterViewChangeOperationEvent);
                });

                WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                    Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
                    Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
                    Log.Comment($"Final viewChangedCount={viewChangedCount}");

                    Verify.AreEqual(expectedFinalHorizontalOffset, scrollPresenter.HorizontalOffset);
                    Verify.AreEqual(expectedFinalVerticalOffset, scrollPresenter.VerticalOffset);
                    Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
                    Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                    Verify.AreEqual(0u, zoomStartingCount);

                    if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
                    {
                        Verify.AreEqual(0u, scrollStartingCount);
                        Verify.IsGreaterThan(viewChangedCount, 1u);
                    }
                    else
                    {
                        Verify.AreEqual(1u, scrollStartingCount);
                        Verify.AreEqual(1u, viewChangedCount);
                        if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
                        {
                            Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - (double)expectedFinalHorizontalOffset), 0.01);
                            Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - (double)expectedFinalVerticalOffset), 0.01);
                            Verify.AreEqual((float)anticipatedZoomFactor, originalZoomFactor);
                        }
                    }
                });

                Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
                CompositionPropertySpy.SynchronouslyTickUIThread(6);

                RunOnUIThread.Execute(() =>
                {
                    List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
                    ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
                    Verify.IsNull(expressionAnimationStatusChanges);
                });
            }
        }

void ScrollTo | ( | ScrollPresenter | scrollPresenter,
 |  | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | bool | hookViewChangingAndChanged = true,
 |  | bool? | isAnimationsEnabledOverride = null,
 |  | double? | expectedFinalHorizontalOffset = null,
 |  | double? | expectedFinalVerticalOffset = null |
 | ) |  |  | [inline, private]

Definition at line 1562 of file ScrollPresenterViewChangeTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: false,
                enableInteractionSourcesNotifications: false,
                enableExpressionAnimationStatusNotifications: true,
                isAnimationsEnabledOverride: isAnimationsEnabledOverride))
            {
                Log.Comment("Waiting for any pending ExpressionAnimation start/stop notifications to occur");
                CompositionPropertySpy.SynchronouslyTickUIThread(6);

                double? anticipatedHorizontalOffset = null;
                double? anticipatedVerticalOffset = null;
                float? anticipatedZoomFactor = null;
                float originalZoomFactor = 1.0f;
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenterTestHooksHelper.ResetExpressionAnimationStatusChanges(scrollPresenter);

                    if (hookViewChangingAndChanged)
                    {
                        scrollPresenter.ScrollStarting += (sender, args) =>
                        {
                            Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ZoomStarting += (sender, args) =>
                        {
                            Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ViewChanged += (sender, args) =>
                        {
                            Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                        };
                    }

                    originalZoomFactor = scrollPresenter.ZoomFactor;

                    if (expectedFinalHorizontalOffset == null)
                    {
                        expectedFinalHorizontalOffset = horizontalOffset;
                    }

                    if (expectedFinalVerticalOffset == null)
                    {
                        expectedFinalVerticalOffset = verticalOffset;
                    }

                    operation = StartScrollTo(
                        scrollPresenter,
                        horizontalOffset,
                        verticalOffset,
                        animationMode,
                        snapPointsMode,
                        scrollPresenterViewChangeOperationEvent);
                });

                WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                    Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
                    Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
                    Log.Comment($"Final viewChangedCount={viewChangedCount}");

                    Verify.AreEqual(expectedFinalHorizontalOffset, scrollPresenter.HorizontalOffset);
                    Verify.AreEqual(expectedFinalVerticalOffset, scrollPresenter.VerticalOffset);
                    Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
                    Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                    Verify.AreEqual(0u, zoomStartingCount);

                    if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
                    {
                        Verify.AreEqual(0u, scrollStartingCount);
                        Verify.IsFalse(viewChangedCount == 1u);
                    }
                    else
                    {
                        Verify.IsLessThanOrEqual(scrollStartingCount, 1u);
                        Verify.IsLessThanOrEqual(viewChangedCount, 1u);
                        if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
                        {
                            Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - (double)expectedFinalHorizontalOffset), 0.01);
                            Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - (double)expectedFinalVerticalOffset), 0.01);
                            Verify.AreEqual((float)anticipatedZoomFactor, originalZoomFactor);
                        }
                    }
                });

                Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
                CompositionPropertySpy.SynchronouslyTickUIThread(6);

                RunOnUIThread.Execute(() =>
                {
                    List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
                    ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
                    Verify.IsNull(expressionAnimationStatusChanges);
                });
            }
        }

void SetInvalidMaxZoomFactorValues ( ) [inline]

Definition at line 242 of file ScrollPresenterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollPresenter scrollPresenter = new ScrollPresenter();

                Log.Comment("Attempting to set ScrollPresenter.MaxZoomFactor to double.NaN");
                try
                {
                    scrollPresenter.MaxZoomFactor = double.NaN;
                }
                catch (Exception e)
                {
                    Log.Comment("Exception thrown: {0}", e.ToString());
                }
                Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);

                Log.Comment("Attempting to set ScrollPresenter.MaxZoomFactor to double.NegativeInfinity");
                try
                {
                    scrollPresenter.MaxZoomFactor = double.NegativeInfinity;
                }
                catch (Exception e)
                {
                    Log.Comment("Exception thrown: {0}", e.ToString());
                }
                Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);

                Log.Comment("Attempting to set ScrollPresenter.MaxZoomFactor to double.PositiveInfinity");
                try
                {
                    scrollPresenter.MaxZoomFactor = double.PositiveInfinity;
                }
                catch (Exception e)
                {
                    Log.Comment("Exception thrown: {0}", e.ToString());
                }
                Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
            });
        }

void SetInvalidMinZoomFactorValues ( ) [inline]

Definition at line 199 of file ScrollPresenterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollPresenter scrollPresenter = new ScrollPresenter();

                Log.Comment("Attempting to set ScrollPresenter.MinZoomFactor to double.NaN");
                try
                {
                    scrollPresenter.MinZoomFactor = double.NaN;
                }
                catch (Exception e)
                {
                    Log.Comment("Exception thrown: {0}", e.ToString());
                }
                Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);

                Log.Comment("Attempting to set ScrollPresenter.MinZoomFactor to double.NegativeInfinity");
                try
                {
                    scrollPresenter.MinZoomFactor = double.NegativeInfinity;
                }
                catch (Exception e)
                {
                    Log.Comment("Exception thrown: {0}", e.ToString());
                }
                Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);

                Log.Comment("Attempting to set ScrollPresenter.MinZoomFactor to double.PositiveInfinity");
                try
                {
                    scrollPresenter.MinZoomFactor = double.PositiveInfinity;
                }
                catch (Exception e)
                {
                    Log.Comment("Exception thrown: {0}", e.ToString());
                }
                Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
            });
        }

void SetOffsetsBeforeLoading ( ) [inline]

Definition at line 1387 of file ScrollPresenterViewChangeTests.cs.

        {
            ChangeOffsetsBeforeLoading(false /*animate*/);
        }

void SettingScrollControllerProperties ( ) [inline]

Definition at line 27 of file ScrollControllerTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            CompositionScrollController horizontalScrollController = null;
            CompositionScrollController verticalScrollController = null;

            RunOnUIThread.Execute(() =>
            {
                // We need the styles of the CompositionScrollController, so let's load them
                App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

                scrollPresenter = new ScrollPresenter();
                Verify.IsNotNull(scrollPresenter);

                horizontalScrollController = new CompositionScrollController();
                Verify.IsNotNull(horizontalScrollController);

                verticalScrollController = new CompositionScrollController();
                Verify.IsNotNull(verticalScrollController);

                Log.Comment("Setting ScrollPresenter.HorizontalScrollController and ScrollPresenter.VerticalScrollController properties.");
                scrollPresenter.HorizontalScrollController = horizontalScrollController;
                scrollPresenter.VerticalScrollController = verticalScrollController;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Verifying ScrollPresenter properties.");
                Verify.AreEqual(scrollPresenter.HorizontalScrollController, horizontalScrollController);
                Verify.AreEqual(scrollPresenter.VerticalScrollController, verticalScrollController);

                Verify.IsFalse(horizontalScrollController.CanScroll); // horizontalScrollController.isScrollable is False
                Verify.IsFalse(horizontalScrollController.IsScrollingWithMouse);
                Verify.IsNull(horizontalScrollController.PanningInfo.PanningElementAncestor);
                Verify.IsFalse(verticalScrollController.CanScroll); // verticalScrollController.isScrollable is False
                Verify.IsFalse(verticalScrollController.IsScrollingWithMouse);
                Verify.IsNull(verticalScrollController.PanningInfo.PanningElementAncestor);
            });
        }

void SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter | ( | Orientation | orientation,
 |  | ScrollPresenter | outerScrollPresenter,
 |  | ScrollPresenter | innerScrollPresenter,
 |  | AutoResetEvent | outerScrollPresenterLoadedEvent,
 |  | AutoResetEvent | innerScrollPresenterLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 1103 of file ScrollPresenterBringIntoViewTests.cs.

        {
            Log.Comment("Setting up bring-into-view UI with ScrollPresenter inside ScrollPresenter");

            Log.Comment("Setting up inner ScrollPresenter");
            SetupDefaultBringIntoViewUI(
                orientation,
                innerScrollPresenter,
                innerScrollPresenterLoadedEvent,
                false /*setAsContentRoot*/);

            Log.Comment("Setting up outer ScrollPresenter");
            StackPanel stackPanel = new StackPanel();
            stackPanel.Name = "outerStackPanel";
            stackPanel.Orientation = orientation;
            stackPanel.Margin = new Thickness(30);

            Border border = new Border();
            border.Name = "outerBorder";
            border.BorderThickness = new Thickness(3);
            border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            border.Margin = new Thickness(15);
            border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
            border.Child = stackPanel;

            Verify.IsNotNull(outerScrollPresenter);
            outerScrollPresenter.Name = "outerScrollPresenter";
            if (orientation == Orientation.Vertical)
            {
                outerScrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
                outerScrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
                outerScrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
            }
            else
            {
                outerScrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
                outerScrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
                outerScrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
            }
            outerScrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
            outerScrollPresenter.Content = border;

            InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);

            stackPanel.Children.Add(innerScrollPresenter);

            InsertStackPanelChild(stackPanel, 0 /*operationCount*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 + 1 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);

            if (outerScrollPresenterLoadedEvent != null)
            {
                outerScrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("Outer ScrollPresenter.Loaded event handler");
                    outerScrollPresenterLoadedEvent.Set();
                };
            }

            outerScrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
            {
                Log.Comment("Outer ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
                    sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
                Log.Comment("RequestEventArgs - AnimationDesired={0}, Handled={1}, HorizontalAlignmentRatio={2}, VerticalAlignmentRatio={3}",
                    args.RequestEventArgs.AnimationDesired,
                    args.RequestEventArgs.Handled,
                    args.RequestEventArgs.HorizontalAlignmentRatio,
                    args.RequestEventArgs.VerticalAlignmentRatio);
                Log.Comment("RequestEventArgs - HorizontalOffset={0}, VerticalOffset={1}, TargetElement={2}, TargetRect={3}",
                    args.RequestEventArgs.HorizontalOffset,
                    args.RequestEventArgs.VerticalOffset,
                    (args.RequestEventArgs.TargetElement as FrameworkElement).Name,
                    args.RequestEventArgs.TargetRect.ToString());
            };

            Log.Comment("Setting window content");
            Content = outerScrollPresenter;
        }

void SetupBringIntoViewUIWithScrollViewerInsideScrollViewer | ( | Orientation | orientation,
 |  | ScrollViewer | outerScrollViewer,
 |  | ScrollViewer | innerScrollViewer,
 |  | AutoResetEvent | outerScrollViewerLoadedEvent,
 |  | AutoResetEvent | innerScrollViewerLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 1185 of file ScrollPresenterBringIntoViewTests.cs.

        {
            Log.Comment("Setting up bring-into-view UI with ScrollViewer inside ScrollViewer");

            Log.Comment("Setting up inner ScrollViewer");
            SetupDefaultBringIntoViewUIWithScrollViewer(
                orientation,
                innerScrollViewer,
                innerScrollViewerLoadedEvent,
                false /*setAsContentRoot*/);

            Log.Comment("Setting up outer ScrollViewer");
            StackPanel stackPanel = new StackPanel();
            stackPanel.Name = "outerStackPanel";
            stackPanel.Orientation = orientation;
            stackPanel.Margin = new Thickness(30);

            Border border = new Border();
            border.Name = "outerBorder";
            border.BorderThickness = new Thickness(3);
            border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            border.Margin = new Thickness(15);
            border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
            border.Child = stackPanel;

            Verify.IsNotNull(outerScrollViewer);
            outerScrollViewer.Name = "outerScrollViewer";
            if (orientation == Orientation.Vertical)
            {
                outerScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
                outerScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
                outerScrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
                outerScrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
            }
            else
            {
                outerScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
                outerScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
                outerScrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
                outerScrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
            }
            outerScrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
            outerScrollViewer.Content = border;

            InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);

            stackPanel.Children.Add(innerScrollViewer);

            InsertStackPanelChild(stackPanel, 0 /*operationCount*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 + 1 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);

            if (outerScrollViewerLoadedEvent != null)
            {
                outerScrollViewer.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("Outer ScrollViewer.Loaded event handler");
                    outerScrollViewerLoadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = outerScrollViewer;
        }

void SetupDefaultAnchoringUI | ( | Orientation | orientation,
 |  | ScrollPresenter | scrollPresenter,
 |  | AutoResetEvent | scrollPresenterLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 595 of file ScrollPresenterAnchoringTests.cs.

        {
            Log.Comment("Setting up default anchoring UI with ScrollPresenter");

            StackPanel stackPanel = new StackPanel();
            stackPanel.Name = "stackPanel";
            stackPanel.Orientation = orientation;
            stackPanel.Margin = new Thickness(30);

            Border border = new Border();
            border.Name = "border";
            border.BorderThickness = new Thickness(3);
            border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            border.Margin = new Thickness(15);
            border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
            border.Child = stackPanel;

            Verify.IsNotNull(scrollPresenter);
            scrollPresenter.Name = "scrollPresenter";
            if (orientation == Orientation.Vertical)
            {
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
                scrollPresenter.Width = c_defaultAnchoringUIScrollPresenterConstrainedSize;
                scrollPresenter.Height = c_defaultAnchoringUIScrollPresenterNonConstrainedSize;
            }
            else
            {
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
                scrollPresenter.Width = c_defaultAnchoringUIScrollPresenterNonConstrainedSize;
                scrollPresenter.Height = c_defaultAnchoringUIScrollPresenterConstrainedSize;
            }
            scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
            scrollPresenter.Content = border;

            InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultAnchoringUIStackPanelChildrenCount /*newCount*/);

            if (scrollPresenterLoadedEvent != null)
            {
                scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.Loaded event handler");
                    scrollPresenterLoadedEvent.Set();
                };
            }

            scrollPresenter.AnchorRequested += (ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args) =>
            {
                Log.Comment("ScrollPresenter.AnchorRequested event handler");

                Verify.IsNull(args.AnchorElement);
                Verify.AreEqual(0, args.AnchorCandidates.Count);

                StackPanel sp = (sender.Content as Border).Child as StackPanel;
                foreach (Border b in sp.Children)
                {
                    args.AnchorCandidates.Add(b);
                }
            };

            Log.Comment("Setting window content");
            Content = scrollPresenter;
        }

void SetupDefaultBringIntoViewUI | ( | Orientation | orientation,
 |  | ScrollPresenter | scrollPresenter,
 |  | AutoResetEvent | scrollPresenterLoadedEvent,
 |  | bool | setAsContentRoot = true |
 | ) |  |  | [inline, private]

Definition at line 973 of file ScrollPresenterBringIntoViewTests.cs.

        {
            Log.Comment("Setting up default bring-into-view UI with ScrollPresenter");

            StackPanel stackPanel = new StackPanel();
            stackPanel.Name = "stackPanel";
            stackPanel.Orientation = orientation;
            stackPanel.Margin = new Thickness(30);

            Border border = new Border();
            border.Name = "border";
            border.BorderThickness = new Thickness(3);
            border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            border.Margin = new Thickness(15);
            border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
            border.Child = stackPanel;

            Verify.IsNotNull(scrollPresenter);
            scrollPresenter.Name = "scrollPresenter";
            if (orientation == Orientation.Vertical)
            {
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
                scrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
                scrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
            }
            else
            {
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
                scrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
                scrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
            }
            scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
            scrollPresenter.Content = border;

            InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount /*newCount*/);

            if (scrollPresenterLoadedEvent != null)
            {
                scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.Loaded event handler");
                    scrollPresenterLoadedEvent.Set();
                };
            }

            scrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
            {
                Log.Comment("ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}",
                    sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId);
                Log.Comment("RequestEventArgs - AnimationDesired={0}, Handled={1}, HorizontalAlignmentRatio={2}, VerticalAlignmentRatio={3}",
                    args.RequestEventArgs.AnimationDesired,
                    args.RequestEventArgs.Handled,
                    args.RequestEventArgs.HorizontalAlignmentRatio,
                    args.RequestEventArgs.VerticalAlignmentRatio);
                Log.Comment("RequestEventArgs - HorizontalOffset={0}, VerticalOffset={1}, TargetElement={2}, TargetRect={3}",
                    args.RequestEventArgs.HorizontalOffset,
                    args.RequestEventArgs.VerticalOffset,
                    (args.RequestEventArgs.TargetElement as FrameworkElement).Name,
                    args.RequestEventArgs.TargetRect.ToString());
            };

            if (setAsContentRoot)
            {
                Log.Comment("Setting window content");
                Content = scrollPresenter;
            }
        }

void SetupDefaultBringIntoViewUIWithScrollViewer | ( | Orientation | orientation,
 |  | ScrollViewer | scrollViewer,
 |  | AutoResetEvent | scrollViewerLoadedEvent,
 |  | bool | setAsContentRoot = true |
 | ) |  |  | [inline, private]

Definition at line 1045 of file ScrollPresenterBringIntoViewTests.cs.

        {
            Log.Comment("Setting up default bring-into-view UI with ScrollViewer");

            StackPanel stackPanel = new StackPanel();
            stackPanel.Name = "stackPanel";
            stackPanel.Orientation = orientation;
            stackPanel.Margin = new Thickness(30);

            Border border = new Border();
            border.Name = "border";
            border.BorderThickness = new Thickness(3);
            border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            border.Margin = new Thickness(15);
            border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
            border.Child = stackPanel;

            Verify.IsNotNull(scrollViewer);
            scrollViewer.Name = "scrollViewer";
            if (orientation == Orientation.Vertical)
            {
                scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
                scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
                scrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
                scrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
            }
            else
            {
                scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
                scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
                scrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
                scrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
            }
            scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
            scrollViewer.Content = border;

            InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount /*newCount*/);

            if (scrollViewerLoadedEvent != null)
            {
                scrollViewer.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollViewer.Loaded event handler");
                    scrollViewerLoadedEvent.Set();
                };
            }

            if (setAsContentRoot)
            {
                Log.Comment("Setting window content");
                Content = scrollViewer;
            }
        }

void SetupDefaultUI | ( | ScrollPresenter | scrollPresenter,
 |  | Rectangle | rectangleScrollPresenterContent,
 |  | AutoResetEvent | scrollPresenterLoadedEvent,
 |  | bool | setAsContentRoot = true |
 | ) |  |  | [inline, private]

Definition at line 719 of file ScrollPresenterTests.cs.

        {
            Log.Comment("Setting up default UI with ScrollPresenter" + (rectangleScrollPresenterContent == null ? "" : " and Rectangle"));

            if (rectangleScrollPresenterContent != null)
            {
                LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

                GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
                twoColorLGB.GradientStops.Add(brownGS);

                GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
                twoColorLGB.GradientStops.Add(orangeGS);

                rectangleScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth;
                rectangleScrollPresenterContent.Height = c_defaultUIScrollPresenterContentHeight;
                rectangleScrollPresenterContent.Fill = twoColorLGB;
            }

            Verify.IsNotNull(scrollPresenter);
            scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
            scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
            if (rectangleScrollPresenterContent != null)
            {
                scrollPresenter.Content = rectangleScrollPresenterContent;
            }

            if (scrollPresenterLoadedEvent != null)
            {
                scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.Loaded event handler");
                    scrollPresenterLoadedEvent.Set();
                };
            }

            if (setAsContentRoot)
            {
                Log.Comment("Setting window content");
                Content = scrollPresenter;
            }
        }

void SetupRepeaterAnchoringUI | ( | ScrollPresenter | scrollPresenter,
 |  | AutoResetEvent | scrollPresenterLoadedEvent |
 | ) |  |  | [inline, private]

Definition at line 885 of file ScrollPresenterAnchoringTests.cs.

        {
            Log.Comment("Setting up ItemsRepeater anchoring UI with ScrollPresenter and ItemsRepeater");

            TestDataSource dataSource = new TestDataSource(
                Enumerable.Range(0, c_defaultAnchoringUIRepeaterChildrenCount).Select(i => string.Format("Item #{0}", i)).ToList());

            RecyclingElementFactory elementFactory = new RecyclingElementFactory();
            elementFactory.RecyclePool = new RecyclePool();
            elementFactory.Templates["Item"] = XamlReader.Load(
                    @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                        <Border BorderThickness='3' BorderBrush='Chartreuse' Width='100' Height='100' Margin='3' Background='BlanchedAlmond'>
                          <TextBlock Text='{Binding}' HorizontalAlignment='Center' VerticalAlignment='Center'/>
                        </Border>
                      </DataTemplate>") as DataTemplate;

            ItemsRepeater repeater = new ItemsRepeater()
            {
                Name = "repeater",
                ItemsSource = dataSource,
                ItemTemplate = elementFactory,
                Layout = new UniformGridLayout()
                {
                    MinItemWidth = 125,
                    MinItemHeight = 125,
                    MinRowSpacing = 10,
                    MinColumnSpacing = 10
                },
                Margin = new Thickness(30)
            };

            Border border = new Border()
            {
                Name = "border",
                BorderThickness = new Thickness(3),
                BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse),
                Margin = new Thickness(15),
                Background = new SolidColorBrush(Microsoft.UI.Colors.Beige),
                Child = repeater
            };

            Verify.IsNotNull(scrollPresenter);
            scrollPresenter.Name = "scrollPresenter";
            scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
            scrollPresenter.Width = 400;
            scrollPresenter.Height = 600;
            scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
            scrollPresenter.Content = border;

            if (scrollPresenterLoadedEvent != null)
            {
                scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.Loaded event handler");
                    scrollPresenterLoadedEvent.Set();
                };
            }

            scrollPresenter.AnchorRequested += (ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args) =>
            {
                Log.Comment("ScrollPresenter.AnchorRequested event handler");

                Verify.IsNull(args.AnchorElement);
                Verify.IsGreaterThan(args.AnchorCandidates.Count, 0);
            };

            Log.Comment("Setting window content");
            Content = scrollPresenter;
        }

void SetupUIWithBiDirectionalScrollController | ( | ScrollPresenter | scrollPresenter,
 |  | Rectangle | rectangleScrollPresenterContent,
 |  | BiDirectionalScrollController | biDirectionalScrollController,
 |  | AutoResetEvent | loadedEvent |
 | ) |  |  | [inline, private]

Definition at line 779 of file ScrollControllerTests.cs.

        {
            Log.Comment("Setting up UI with ScrollPresenter and bi-directional scroll controller" + (rectangleScrollPresenterContent == null ? "" : " and Rectangle"));

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            if (rectangleScrollPresenterContent != null)
            {
                rectangleScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth;
                rectangleScrollPresenterContent.Height = c_defaultUIScrollPresenterContentHeight;
                rectangleScrollPresenterContent.Fill = twoColorLGB;
            }

            Verify.IsNotNull(scrollPresenter);
            scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
            scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
            if (rectangleScrollPresenterContent != null)
            {
                scrollPresenter.Content = rectangleScrollPresenterContent;
            }

            biDirectionalScrollController.Width = c_defaultUIScrollPresenterHeight;
            biDirectionalScrollController.Height = c_defaultUIScrollPresenterHeight;

            StackPanel horizontalStackPanel = new StackPanel();
            horizontalStackPanel.Orientation = Orientation.Horizontal;
            horizontalStackPanel.Children.Add(scrollPresenter);
            horizontalStackPanel.Children.Add(biDirectionalScrollController);

            if (loadedEvent != null)
            {
                horizontalStackPanel.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("Loaded event handler");
                    loadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = horizontalStackPanel;
        }

void SetupUIWithScrollControllers | ( | ScrollPresenter | scrollPresenter,
 |  | Rectangle | rectangleScrollPresenterContent,
 |  | CompositionScrollController | horizontalScrollController,
 |  | CompositionScrollController | verticalScrollController,
 |  | AutoResetEvent | loadedEvent |
 | ) |  |  | [inline, private]

Definition at line 721 of file ScrollControllerTests.cs.

        {
            Log.Comment("Setting up UI with ScrollPresenter and scroll controlllers" + (rectangleScrollPresenterContent == null ? "" : " and Rectangle"));

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            if (rectangleScrollPresenterContent != null)
            {
                rectangleScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth;
                rectangleScrollPresenterContent.Height = c_defaultUIScrollPresenterContentHeight;
                rectangleScrollPresenterContent.Fill = twoColorLGB;
            }

            Verify.IsNotNull(scrollPresenter);
            scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
            scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
            if (rectangleScrollPresenterContent != null)
            {
                scrollPresenter.Content = rectangleScrollPresenterContent;
            }

            horizontalScrollController.Width = c_defaultUIScrollPresenterWidth;
            horizontalScrollController.HorizontalAlignment = HorizontalAlignment.Left;

            StackPanel horizontalStackPanel = new StackPanel();
            horizontalStackPanel.Orientation = Orientation.Horizontal;
            horizontalStackPanel.Children.Add(scrollPresenter);
            horizontalStackPanel.Children.Add(verticalScrollController);

            StackPanel verticalStackPanel = new StackPanel();
            verticalStackPanel.Children.Add(horizontalStackPanel);
            verticalStackPanel.Children.Add(horizontalScrollController);
            verticalStackPanel.Width = c_defaultUIScrollPresenterWidth + c_defaultUIScrollControllerThickness;

            if (loadedEvent != null)
            {
                verticalStackPanel.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("Loaded event handler");
                    loadedEvent.Set();
                };
            }

            Log.Comment("Setting window content");
            Content = verticalStackPanel;
        }

void SetZoomFactorBeforeLoading ( ) [inline]

Definition at line 1401 of file ScrollPresenterViewChangeTests.cs.

        {
            ChangeZoomFactorBeforeLoading(false /*animate*/);
        }

void SnapPointsWithInvalidArgsThrow ( ) [inline]

Definition at line 24 of file ScrollPresenterSnapPointTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset:  10, interval:  0, start:  10, end: 100, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset:  10, interval: -1, start:  10, end: 100, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset:  10, interval: 10, start:  10, end:   1, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset:  10, interval: 10, start:  10, end:  10, alignment: ScrollSnapPointsAlignment.Near); });
#if ApplicableRangeType
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset:   1, interval: 10, start:   1, end:  10, applicableRange: -10, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset:   1, interval: 10, start:   1, end:  10, applicableRange:   0, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset:  50, interval: 10, start: 100, end: 200, applicableRange:   2, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new RepeatedScrollSnapPoint(offset: 250, interval: 10, start: 100, end: 200, applicableRange:   2, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new ScrollSnapPoint(snapPointValue: 0, applicableRange:  0, alignment: ScrollSnapPointsAlignment.Near); });
                Verify.Throws<ArgumentException>(() => { new ScrollSnapPoint(snapPointValue: 0, applicableRange: -1, alignment: ScrollSnapPointsAlignment.Near); });
#endif
            });
        }

void SnapToFirstRepeatedScrollSnapPoint ( ) [inline]

Definition at line 280 of file ScrollPresenterSnapPointTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Jump to absolute offsets
            ScrollTo(scrollPresenter, 60.0, 0.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Default);

            // Add scroll repeated snap point with different offset and start.
            RunOnUIThread.Execute(() =>
            {
                RepeatedScrollSnapPoint snapPoint = new RepeatedScrollSnapPoint(
                    offset: 50,
                    interval: 60,
                    start: 10,
                    end: 1190,
                    alignment: ScrollSnapPointsAlignment.Near);

                scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
            });

            // Flick with horizontal offset velocity to naturally land around offset 15.
            AddScrollVelocity(scrollPresenter, horizontalVelocity: -165.0f, verticalVelocity: 0.0f, horizontalInertiaDecayRate: null, verticalInertiaDecayRate: null, hookViewChangingAndChanged: false);

            RunOnUIThread.Execute(() =>
            {
                // HorizontalOffset expected to have snapped to first instance of repeated snap point: 50.
                Verify.AreEqual(50.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
            });
        }

void SnapToFirstRepeatedZoomSnapPoint ( ) [inline]

Definition at line 326 of file ScrollPresenterSnapPointTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Jump to absolute zoom factor, and center the content in the viewport.
            ZoomTo(scrollPresenter,
                zoomFactor: 6.0f,
                centerPointX: 690.0f,
                centerPointY: 340.0f,
                ScrollingAnimationMode.Disabled,
                ScrollingSnapPointsMode.Default);

            // Add zoom repeated snap point with different offset and start.
            RunOnUIThread.Execute(() =>
            {
                RepeatedZoomSnapPoint snapPoint = new RepeatedZoomSnapPoint(
                    offset: 5,
                    interval: 6,
                    start: 1,
                    end: 9);

                scrollPresenter.ZoomSnapPoints.Add(snapPoint);
            });

            // Flick with zoom factor velocity to naturally land around factor 1.5.
            AddZoomVelocity(scrollPresenter,
                zoomFactorVelocity: -5.0f,
                inertiaDecayRate: 0.6675f,
                centerPointX: 150.0f,
                centerPointY: 100.0f,
                hookViewChangingAndChanged: false);

            RunOnUIThread.Execute(() =>
            {
                // ZoomFactor expected to have snapped to first instance of repeated snap point: 5.
                // Scroll offsets do not snap and end close to 2850, 1400 for a centered content.
                Verify.IsTrue(Math.Abs(scrollPresenter.HorizontalOffset - 2850.0) < 1.0);
                Verify.IsTrue(Math.Abs(scrollPresenter.VerticalOffset - 1400.0) < 1.0);
                Verify.AreEqual(5.0f, scrollPresenter.ZoomFactor);
            });
        }

void SpyTranslationAndScale | ( | ScrollPresenter | scrollPresenter,
 |  | Compositor | compositor,
 |  | out float | horizontalOffset,
 |  | out float | verticalOffset,
 |  | out float | zoomFactor |
 | ) |  |  | [inline, private]

Definition at line 766 of file ScrollPresenterTests.cs.

        {
            float horizontalOffsetTmp = 0.0f;
            float verticalOffsetTmp = 0.0f;
            float zoomFactorTmp = 1.0f;

            horizontalOffset = verticalOffset = 0.0f;
            zoomFactor = 0.0f;

            RunOnUIThread.Execute(() =>
            {
                Verify.IsNotNull(scrollPresenter);
                Verify.IsNotNull(scrollPresenter.Content);

                Log.Comment("Setting up spying on facades");

                CompositionPropertySpy.StartSpyingTranslationFacade(scrollPresenter.Content, compositor, Vector3.Zero);
                CompositionPropertySpy.StartSpyingScaleFacade(scrollPresenter.Content, compositor, Vector3.One);
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            Log.Comment("Cancelling spying");

            RunOnUIThread.Execute(() =>
            {
                CompositionPropertySpy.StopSpyingTranslationFacade(scrollPresenter.Content);
                CompositionPropertySpy.StopSpyingScaleFacade(scrollPresenter.Content);
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            Log.Comment("Reading ScrollPresenter.Content's Visual Transform");
            CompositionGetValueStatus status;

            RunOnUIThread.Execute(() =>
            {
                Vector3 translation = Vector3.Zero;
                status = CompositionPropertySpy.TryGetTranslationFacade(scrollPresenter.Content, out translation);
                Log.Comment("status={0}, horizontal offset={1}", status, translation.X);
                Log.Comment("status={0}, vertical offset={1}", status, translation.Y);
                horizontalOffsetTmp = translation.X;
                verticalOffsetTmp = translation.Y;

                Vector3 scale = Vector3.One;
                status = CompositionPropertySpy.TryGetScaleFacade(scrollPresenter.Content, out scale);
                Log.Comment("status={0}, zoomFactor={1}", status, zoomFactorTmp);
                zoomFactorTmp = scale.X;
            });

            horizontalOffset = horizontalOffsetTmp;
            verticalOffset = verticalOffsetTmp;
            zoomFactor = zoomFactorTmp;
        }

ScrollPresenterOperation StartAddScrollVelocity | ( | ScrollPresenter | scrollPresenter,
 |  | float | horizontalVelocity,
 |  | float | verticalVelocity,
 |  | float? | horizontalInertiaDecayRate,
 |  | float? | verticalInertiaDecayRate,
 |  | AutoResetEvent | scrollPresenterViewChangeOperationEvent |
 | ) |  |  | [inline, private]

Definition at line 1998 of file ScrollPresenterViewChangeTests.cs.

        {
            Log.Comment("AddScrollVelocity - horizontalVelocity={0}, verticalVelocity={1}, horizontalInertiaDecayRate={2}, verticalInertiaDecayRate={3}",
                horizontalVelocity, verticalVelocity, horizontalInertiaDecayRate, verticalInertiaDecayRate);

            Vector2? inertiaDecayRate = null;

            if (horizontalInertiaDecayRate != null && verticalInertiaDecayRate != null)
            {
                inertiaDecayRate = new Vector2((float)horizontalInertiaDecayRate, (float)verticalInertiaDecayRate);
            }

            scrollStartingCount = 0u;
            zoomStartingCount = 0u;
            viewChangedCount = 0u;
            ScrollPresenterOperation operation = new ScrollPresenterOperation();

            operation.CorrelationId = scrollPresenter.AddScrollVelocity(
                    new Vector2(horizontalVelocity, verticalVelocity),
                    inertiaDecayRate);

            if (operation.CorrelationId == -1)
            {
                scrollPresenterViewChangeOperationEvent.Set();
            }
            else
            {
                scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    if (args.CorrelationId == operation.CorrelationId)
                    {
                        ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

                        Log.Comment("ScrollCompleted: AddScrollVelocity OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
                        operation.Result = result;

                        Log.Comment("Setting completion event");
                        scrollPresenterViewChangeOperationEvent.Set();
                    }
                };
            }

            return operation;
        }

ScrollPresenterOperation StartAddZoomVelocity | ( | ScrollPresenter | scrollPresenter,
 |  | float | zoomFactorVelocity,
 |  | float? | inertiaDecayRate,
 |  | float | centerPointX,
 |  | float | centerPointY,
 |  | AutoResetEvent | scrollPresenterViewChangeOperationEvent |
 | ) |  |  | [inline, private]

Definition at line 2430 of file ScrollPresenterViewChangeTests.cs.

        {
            Log.Comment("AddZoomVelocity - zoomFactorVelocity={0}, inertiaDecayRate={1}, centerPoint=({2},{3})",
                zoomFactorVelocity, inertiaDecayRate, centerPointX, centerPointY);

            scrollStartingCount = 0u;
            zoomStartingCount = 0u;
            viewChangedCount = 0u;
            ScrollPresenterOperation operation = new ScrollPresenterOperation();

            operation.CorrelationId = scrollPresenter.AddZoomVelocity(
                zoomFactorVelocity, new Vector2(centerPointX, centerPointY), inertiaDecayRate);

            if (operation.CorrelationId == -1)
            {
                scrollPresenterViewChangeOperationEvent.Set();
            }
            else
            {
                scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
                {
                    if (args.CorrelationId == operation.CorrelationId)
                    {
                        ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

                        Log.Comment("ZoomCompleted: AddZoomVelocity ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
                        operation.Result = result;

                        Log.Comment("Setting completion event");
                        scrollPresenterViewChangeOperationEvent.Set();
                    }
                };
            }
            return operation;
        }

ScrollPresenterOperation StartScrollBy | ( | ScrollPresenter | scrollPresenter,
 |  | double | horizontalOffsetDelta,
 |  | double | verticalOffsetDelta,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | AutoResetEvent | scrollPresenterViewChangeOperationEvent |
 | ) |  |  | [inline, private]

Definition at line 1953 of file ScrollPresenterViewChangeTests.cs.

        {
            Log.Comment("ScrollBy - horizontalOffsetDelta={0}, verticalOffsetDelta={1}, animationMode={2}, snapPointsMode={3}",
                horizontalOffsetDelta, verticalOffsetDelta, animationMode, snapPointsMode);

            scrollStartingCount = 0u;
            zoomStartingCount = 0u;
            viewChangedCount = 0u;
            ScrollPresenterOperation operation = new ScrollPresenterOperation();

            operation.CorrelationId = scrollPresenter.ScrollBy(
                horizontalOffsetDelta,
                verticalOffsetDelta,
                new ScrollingScrollOptions(animationMode, snapPointsMode));

            if (operation.CorrelationId == -1)
            {
                scrollPresenterViewChangeOperationEvent.Set();
            }
            else
            {
                scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    if (args.CorrelationId == operation.CorrelationId)
                    {
                        ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

                        Log.Comment("ScrollCompleted: ScrollBy OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
                        operation.Result = result;

                        Log.Comment("Setting completion event");
                        scrollPresenterViewChangeOperationEvent.Set();
                    }
                };
            }

            return operation;
        }

ScrollPresenterOperation StartScrollTo | ( | ScrollPresenter | scrollPresenter,
 |  | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | AutoResetEvent | scrollPresenterViewChangeOperationEvent |
 | ) |  |  | [inline, private]

Definition at line 1908 of file ScrollPresenterViewChangeTests.cs.

        {
            Log.Comment("ScrollTo - horizontalOffset={0}, verticalOffset={1}, animationMode={2}, snapPointsMode={3}",
                horizontalOffset, verticalOffset, animationMode, snapPointsMode);

            scrollStartingCount = 0u;
            zoomStartingCount = 0u;
            viewChangedCount = 0u;
            ScrollPresenterOperation operation = new ScrollPresenterOperation();

            operation.CorrelationId = scrollPresenter.ScrollTo(
                horizontalOffset,
                verticalOffset,
                new ScrollingScrollOptions(animationMode, snapPointsMode));

            if (operation.CorrelationId == -1)
            {
                scrollPresenterViewChangeOperationEvent.Set();
            }
            else
            {
                scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    if (args.CorrelationId == operation.CorrelationId)
                    {
                        ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

                        Log.Comment("ScrollCompleted: ScrollTo OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
                        operation.Result = result;

                        Log.Comment("Setting completion event");
                        scrollPresenterViewChangeOperationEvent.Set();
                    }
                };
            }

            return operation;
        }

ScrollPresenterOperation StartZoomBy | ( | ScrollPresenter | scrollPresenter,
 |  | float | zoomFactorDelta,
 |  | float | centerPointX,
 |  | float | centerPointY,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | AutoResetEvent | scrollPresenterViewChangeOperationEvent |
 | ) |  |  | [inline, private]

Definition at line 2384 of file ScrollPresenterViewChangeTests.cs.

        {
            Log.Comment("ZoomBy - zoomFactorDelta={0}, centerPoint=({1},{2}), animationMode={3}, snapPointsMode={4}",
                zoomFactorDelta, centerPointX, centerPointY, animationMode, snapPointsMode);

            scrollStartingCount = 0u;
            zoomStartingCount = 0u;
            viewChangedCount = 0u;
            ScrollPresenterOperation operation = new ScrollPresenterOperation();

            operation.CorrelationId = scrollPresenter.ZoomBy(
                zoomFactorDelta,
                new Vector2(centerPointX, centerPointY),
                new ScrollingZoomOptions(animationMode, snapPointsMode));

            if (operation.CorrelationId == -1)
            {
                scrollPresenterViewChangeOperationEvent.Set();
            }
            else
            {
                scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
                {
                    if (args.CorrelationId == operation.CorrelationId)
                    {
                        ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

                        Log.Comment("ZoomCompleted: ZoomBy ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
                        operation.Result = result;

                        Log.Comment("Setting completion event");
                        scrollPresenterViewChangeOperationEvent.Set();
                    }
                };
            }

            return operation;
        }

ScrollPresenterOperation StartZoomTo | ( | ScrollPresenter | scrollPresenter,
 |  | float | zoomFactor,
 |  | float | centerPointX,
 |  | float | centerPointY,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | AutoResetEvent | scrollPresenterViewChangeOperationEvent |
 | ) |  |  | [inline, private]

Definition at line 2338 of file ScrollPresenterViewChangeTests.cs.

        {
            Log.Comment("ZoomTo - zoomFactor={0}, centerPoint=({1},{2}), animationMode={3}, snapPointsMode={4}",
                zoomFactor, centerPointX, centerPointY, animationMode, snapPointsMode);

            scrollStartingCount = 0u;
            zoomStartingCount = 0u;
            viewChangedCount = 0u;
            ScrollPresenterOperation operation = new ScrollPresenterOperation();

            operation.CorrelationId = scrollPresenter.ZoomTo(
                zoomFactor,
                new Vector2(centerPointX, centerPointY),
                new ScrollingZoomOptions(animationMode, snapPointsMode));

            if (operation.CorrelationId == -1)
            {
                scrollPresenterViewChangeOperationEvent.Set();
            }
            else
            {
                scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
                {
                    if (args.CorrelationId == operation.CorrelationId)
                    {
                        ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

                        Log.Comment("ZoomCompleted: ZoomTo ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
                        operation.Result = result;

                        Log.Comment("Setting completion event");
                        scrollPresenterViewChangeOperationEvent.Set();
                    }
                };
            }

            return operation;
        }

void StretchAlignment ( ) [inline]

Definition at line 350 of file ScrollPresenterLayoutTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var rectangle = new Rectangle();
                rectangle.Height = c_defaultUIScrollPresenterContentHeight;
                var stackPanel = new StackPanel();
                stackPanel.Children.Add(rectangle);
                var scrollPresenter = new ScrollPresenter();
                scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
                scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
                scrollPresenter.Content = stackPanel;

                Log.Comment("Setting window content");
                Content = scrollPresenter;
                Content.UpdateLayout();

                Log.Comment("Checking Stretch/Strech alignments");
                Verify.AreEqual(HorizontalAlignment.Stretch, stackPanel.HorizontalAlignment);
                Verify.AreEqual(VerticalAlignment.Stretch, stackPanel.VerticalAlignment);

                Log.Comment("Checking StackPanel size");
                Verify.AreEqual(c_defaultUIScrollPresenterWidth, stackPanel.ActualWidth);
                Verify.AreEqual(c_defaultUIScrollPresenterContentHeight, stackPanel.ActualHeight);
            });
        }

void StretchContentThroughMinZoomFactor ( ) [inline]

Definition at line 451 of file ScrollPresenterTests.cs.

        {
            const double newMinZoomFactor = 2.0;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            Compositor compositor = null;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(
                    scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
                compositor = CompositionTarget.GetCompositorForCurrentThread();
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.IsTrue(newMinZoomFactor > c_defaultZoomFactor);
                Verify.IsTrue(newMinZoomFactor > c_defaultMinZoomFactor);
                Verify.IsTrue(newMinZoomFactor < c_defaultMaxZoomFactor);
                scrollPresenter.MinZoomFactor = newMinZoomFactor;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Setting up spy on translation and scale facades");

                CompositionPropertySpy.StartSpyingTranslationFacade(rectangleScrollPresenterContent, compositor, Vector3.Zero);
                CompositionPropertySpy.StartSpyingScaleFacade(rectangleScrollPresenterContent, compositor, Vector3.One);
            });

            Log.Comment("Waiting for spied properties to be captured");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);
            Log.Comment("Cancelling spying");

            RunOnUIThread.Execute(() =>
            {
                CompositionPropertySpy.StopSpyingTranslationFacade(rectangleScrollPresenterContent);
                CompositionPropertySpy.StopSpyingScaleFacade(rectangleScrollPresenterContent);
            });

            Log.Comment("Waiting for captured properties to be updated");
            CompositionPropertySpy.SynchronouslyTickUIThread(10);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(newMinZoomFactor, scrollPresenter.MinZoomFactor);
                Verify.AreEqual(newMinZoomFactor, scrollPresenter.ZoomFactor);
                Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
            });

            Log.Comment("Validating final transform of ScrollPresenter.Content's Visual after MinZoomFactor change");
            CompositionGetValueStatus status;

            RunOnUIThread.Execute(() =>
            {
                Vector3 translation;
                status = CompositionPropertySpy.TryGetTranslationFacade(rectangleScrollPresenterContent, out translation);
                Log.Comment("status={0}, horizontal offset={1}", status, translation.X);
                Log.Comment("status={0}, vertical offset={1}", status, translation.Y);
                Verify.AreEqual(c_defaultHorizontalOffset, translation.X);
                Verify.AreEqual(c_defaultVerticalOffset, translation.Y);

                Vector3 scale;
                status = CompositionPropertySpy.TryGetScaleFacade(rectangleScrollPresenterContent, out scale);
                Log.Comment("status={0}, vertical offset={1}", status, scale.X);
                Verify.AreEqual(newMinZoomFactor, scale.X);
            });
        }

void StretchedImage ( ) [inline]

Definition at line 466 of file ScrollPresenterLayoutTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Image imageScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            const double margin = 10.0;

            RunOnUIThread.Execute(() =>
            {
                Uri uri = new Uri("ms-appx:/Assets/ingredient8.png");
                Verify.IsNotNull(uri);
                imageScrollPresenterContent = new Image();
                imageScrollPresenterContent.Source = new BitmapImage(uri);
                imageScrollPresenterContent.Margin = new Thickness(margin);

                scrollPresenter = new ScrollPresenter();
                scrollPresenter.Content = imageScrollPresenterContent;

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(scrollPresenter.ContentOrientation, ScrollingContentOrientation.Both);
                // Image is unconstrained and stretches to largest square contained in the 300 x 200 viewport: 200 x 200.
                ValidateStretchedImageSize(
                    scrollPresenter,
                    imageScrollPresenterContent,
                    desiredSize: 80.0 + 2.0 * margin /*natural size + margins*/,
                    actualSize: c_defaultUIScrollPresenterHeight - 2.0 * margin,
                    extentSize: c_defaultUIScrollPresenterHeight);

                Log.Comment("Changing ScrollPresenter.ContentOrientation to Vertical.");
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(scrollPresenter.ContentOrientation, ScrollingContentOrientation.Vertical);
                // Image is constrained horizontally to 300 and stretches to the 300 x 300 square.
                ValidateStretchedImageSize(
                    scrollPresenter,
                    imageScrollPresenterContent,
                    desiredSize: c_defaultUIScrollPresenterWidth,
                    actualSize: c_defaultUIScrollPresenterWidth - 2.0 * margin,
                    extentSize: c_defaultUIScrollPresenterWidth);

                Log.Comment("Changing ScrollPresenter.ContentOrientation to Horizontal.");
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(scrollPresenter.ContentOrientation, ScrollingContentOrientation.Horizontal);
                // Image is constrained vertically to 200 and stretches to the 200 x 200 square.
                ValidateStretchedImageSize(
                    scrollPresenter,
                    imageScrollPresenterContent,
                    desiredSize: c_defaultUIScrollPresenterHeight,
                    actualSize: c_defaultUIScrollPresenterHeight - 2.0 * margin,
                    extentSize: c_defaultUIScrollPresenterHeight);
            });
        }

void SuccessiveAdditionalScrollVelocities ( ) [inline]

Definition at line 147 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent1 = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent2 = new AutoResetEvent(false);
            bool viewChanged = false;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");

                    if (!viewChanged)
                    {
                        viewChanged = true;

                        Log.Comment("Setting view changed event");
                        scrollPresenterViewChangedEvent.Set();
                    }
                };

                scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
                {
                    ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

                    Log.Comment("ScrollCompleted: AddScrollVelocity ScrollChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);

                    if (args.CorrelationId == 1)
                    {
                        Log.Comment("Setting first view change completion event");
                        scrollPresenterViewChangeOperationEvent1.Set();
                    }
                    else if (args.CorrelationId == 2)
                    {
                        Log.Comment("Setting second view change completion event");
                        scrollPresenterViewChangeOperationEvent2.Set();
                    }
                };
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Add scroll velocity with very small inertia decay rate
            AddScrollVelocity(scrollPresenter, horizontalVelocity: 50.0f, verticalVelocity: 60.0f, horizontalInertiaDecayRate: 0.0007f, verticalInertiaDecayRate: 0.0008f, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);

            // Waiting for first view changed event
            WaitForEvent("Waiting for first ViewChanged event", scrollPresenterViewChangedEvent);

            // Add scroll velocity with default inertia decay rate
            AddScrollVelocity(scrollPresenter, horizontalVelocity: 170.0f, verticalVelocity: 180.0f, horizontalInertiaDecayRate: null, verticalInertiaDecayRate: null, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);

            // Waiting for first view change completion
            WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvent1);

            // Waiting for second view change completion
            WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvent2);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");

                Verify.IsLessThan(Math.Abs(scrollPresenter.HorizontalOffset - 72.0), 10.0);
                Verify.IsLessThan(Math.Abs(scrollPresenter.VerticalOffset - 80.0), 10.0);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
            });
        }

void SuccessiveAdditionalZoomVelocities ( ) [inline]

Definition at line 225 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent1 = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent2 = new AutoResetEvent(false);
            bool viewChanged = false;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);

                scrollPresenter.ViewChanged += (sender, args) =>
                {
                    Log.Comment($"ViewChanged - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");

                    if (!viewChanged)
                    {
                        viewChanged = true;

                        Log.Comment("Setting view changed event");
                        scrollPresenterViewChangedEvent.Set();
                    }
                };

                scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
                {
                    ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

                    Log.Comment("ZoomCompleted: AddZoomVelocity ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);

                    if (args.CorrelationId == 1)
                    {
                        Log.Comment("Setting first view change completion event");
                        scrollPresenterViewChangeOperationEvent1.Set();
                    }
                    else if (args.CorrelationId == 2)
                    {
                        Log.Comment("Setting second view change completion event");
                        scrollPresenterViewChangeOperationEvent2.Set();
                    }
                };
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            // Add zoomFactor velocity with very small inertia decay rate
            AddZoomVelocity(scrollPresenter, zoomFactorVelocity: 0.4f, inertiaDecayRate: 0.0001f, centerPointX: 0.0f, centerPointY: 0.0f, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);

            // Waiting for first view changed event
            WaitForEvent("Waiting for first ViewChanged event", scrollPresenterViewChangedEvent);

            // Add zoomFactor velocity with default inertia decay rate
            AddZoomVelocity(scrollPresenter, zoomFactorVelocity: 0.6f, inertiaDecayRate: null, centerPointX: 0.0f, centerPointY: 0.0f, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);

            // Waiting for first view change completion
            WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvent1);

            // Waiting for second view change completion
            WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvent2);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");

                Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
                Verify.IsLessThan(Math.Abs(scrollPresenter.ZoomFactor - 1.26f), 0.1f);
            });
        }

void ValidateContentWithConstrainedHeight | ( | Compositor | compositor,
 |  | ScrollPresenter | scrollPresenter,
 |  | FrameworkElement | content,
 |  | VerticalAlignment | verticalAlignment,
 |  | double | topMargin,
 |  | double | bottomMargin,
 |  | float | expectedMinPosition,
 |  | float | expectedZoomFactor |
 | ) |  |  | [inline, private]

Definition at line 1224 of file ScrollPresenterLayoutTests.cs.

        {
            float horizontalOffset = 0.0f;
            float verticalOffset = 0.0f;
            float zoomFactor = 1.0f;
            float expectedHorizontalOffset = 0.0f;
            float expectedVerticalOffset = 0.0f;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"Covering alignment {verticalAlignment.ToString()}");
                content.VerticalAlignment = verticalAlignment;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
                Vector2 arrangeRenderSizesDelta = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter);
                Log.Comment($"MinPosition {minPosition.ToString()}");
                Log.Comment($"ArrangeRenderSizesDelta {arrangeRenderSizesDelta.ToString()}");
                Log.Comment($"Content.DesiredSize {content.DesiredSize.ToString()}");
                Log.Comment($"Content.RenderSize {content.RenderSize.ToString()}");

                Verify.AreEqual(expectedMinPosition, minPosition.Y);
                Verify.AreEqual(verticalAlignment, content.VerticalAlignment);
                Verify.AreEqual(c_defaultUIScrollPresenterHeight, content.DesiredSize.Height);
                Verify.AreEqual(c_defaultUIScrollPresenterHeight - topMargin - bottomMargin, content.RenderSize.Height);
                double arrangeRenderSizesDeltaY = GetArrangeRenderSizesDelta(
                    BiDirectionalAlignmentFromVerticalAlignment(verticalAlignment),
                    extentSize: c_defaultUIScrollPresenterHeight,
                    renderSize: c_defaultUIScrollPresenterHeight - topMargin - bottomMargin,
                    nearMargin: topMargin,
                    farMargin: bottomMargin);
                Verify.AreEqual(topMargin, arrangeRenderSizesDeltaY);
                Verify.AreEqual(arrangeRenderSizesDeltaY, arrangeRenderSizesDelta.Y);
                expectedVerticalOffset = -minPosition.Y + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.Y;
                expectedHorizontalOffset = -minPosition.X + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.X;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"horizontalOffset={horizontalOffset}, verticalOffset={verticalOffset}, zoomFactor={zoomFactor}");
                Log.Comment($"expectedHorizontalOffset={expectedHorizontalOffset}, expectedVerticalOffset={expectedVerticalOffset}, expectedZoomFactor={expectedZoomFactor}");
                Verify.AreEqual(expectedHorizontalOffset, horizontalOffset);
                Verify.AreEqual(expectedVerticalOffset, verticalOffset);
                Verify.AreEqual(expectedZoomFactor, zoomFactor);
            });
        }

void ValidateContentWithConstrainedSize | ( | Compositor | compositor,
 |  | ScrollPresenter | scrollPresenter,
 |  | FrameworkElement | content,
 |  | HorizontalAlignment | horizontalAlignment,
 |  | VerticalAlignment | verticalAlignment,
 |  | float | expectedMinPositionX,
 |  | float | expectedMinPositionY,
 |  | float | expectedZoomFactor |
 | ) |  |  | [inline, private]

Definition at line 1285 of file ScrollPresenterLayoutTests.cs.

        {
            const double c_leftMargin = 20.0;
            const double c_rightMargin = 30.0;
            const double c_topMargin = 40.0;
            const double c_bottomMargin = 10.0;
            const double c_scrollPresenterWidth = 314.0;
            const double c_scrollPresenterHeight = 210.0;
            const double c_imageWidth = 2400;
            const double c_imageHeight = 1400.0;

            float horizontalOffset = 0.0f;
            float verticalOffset = 0.0f;
            float zoomFactor = 1.0f;
            double horizontalArrangeRenderSizesDelta = 0.0;
            double verticalArrangeRenderSizesDelta = 0.0;
            double expectedHorizontalOffset = 0.0;
            double expectedVerticalOffset = 0.0;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"Covering alignments {horizontalAlignment.ToString()} and {verticalAlignment.ToString()}");
                content.HorizontalAlignment = horizontalAlignment;
                content.VerticalAlignment = verticalAlignment;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(horizontalAlignment, content.HorizontalAlignment);
                Verify.AreEqual(verticalAlignment, content.VerticalAlignment);

                Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
                Vector2 arrangeRenderSizesDelta = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter);
                Log.Comment($"MinPosition {minPosition.ToString()}");
                Log.Comment($"ArrangeRenderSizesDelta {arrangeRenderSizesDelta.ToString()}");
                Log.Comment($"Content.DesiredSize {content.DesiredSize.ToString()}");
                Log.Comment($"Content.RenderSize {content.RenderSize.ToString()}");

                Verify.AreEqual(expectedMinPositionX, minPosition.X);
                Verify.AreEqual(expectedMinPositionY, minPosition.Y);
                Verify.AreEqual(c_scrollPresenterWidth, content.DesiredSize.Width); // 314
                Verify.AreEqual((c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth + c_topMargin + c_bottomMargin, content.DesiredSize.Height); // 204
                Verify.AreEqual(c_scrollPresenterWidth - c_leftMargin - c_rightMargin, content.RenderSize.Width); // 264
                Verify.AreEqual((c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth, content.RenderSize.Height); // 154

                horizontalArrangeRenderSizesDelta = GetArrangeRenderSizesDelta(
                    BiDirectionalAlignmentFromHorizontalAlignment(horizontalAlignment),
                    extentSize: c_scrollPresenterWidth,
                    renderSize: c_scrollPresenterWidth - c_leftMargin - c_rightMargin,
                    nearMargin: c_leftMargin,
                    farMargin: c_rightMargin);
                Log.Comment($"horizontalArrangeRenderSizesDelta {horizontalArrangeRenderSizesDelta}");
                Verify.AreEqual(c_leftMargin, horizontalArrangeRenderSizesDelta);
                Verify.AreEqual(arrangeRenderSizesDelta.X, horizontalArrangeRenderSizesDelta);
                expectedHorizontalOffset = -minPosition.X + (expectedZoomFactor - 1.0f) * horizontalArrangeRenderSizesDelta;

                verticalArrangeRenderSizesDelta = GetArrangeRenderSizesDelta(
                    BiDirectionalAlignmentFromVerticalAlignment(verticalAlignment),
                    extentSize: c_scrollPresenterHeight,
                    renderSize: c_scrollPresenterHeight - c_topMargin - c_bottomMargin,
                    nearMargin: c_topMargin,
                    farMargin: c_bottomMargin);
                Log.Comment($"verticalArrangeRenderSizesDelta {verticalArrangeRenderSizesDelta}");
                Verify.AreEqual(c_topMargin, verticalArrangeRenderSizesDelta);
                Verify.AreEqual(arrangeRenderSizesDelta.Y, verticalArrangeRenderSizesDelta);
                expectedVerticalOffset = -minPosition.Y + (expectedZoomFactor - 1.0f) * verticalArrangeRenderSizesDelta;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"horizontalOffset={horizontalOffset}, verticalOffset={verticalOffset}, zoomFactor={zoomFactor}");
                Log.Comment($"expectedHorizontalOffset={expectedHorizontalOffset}, expectedVerticalOffset={expectedVerticalOffset}, expectedZoomFactor={expectedZoomFactor}");
                Verify.AreEqual(expectedHorizontalOffset, horizontalOffset);
                Verify.AreEqual(expectedVerticalOffset, verticalOffset);
                Verify.AreEqual(expectedZoomFactor, zoomFactor);
            });
        }

void ValidateContentWithConstrainedWidth | ( | Compositor | compositor,
 |  | ScrollPresenter | scrollPresenter,
 |  | FrameworkElement | content,
 |  | HorizontalAlignment | horizontalAlignment,
 |  | double | leftMargin,
 |  | double | rightMargin,
 |  | float | expectedMinPosition,
 |  | float | expectedZoomFactor |
 | ) |  |  | [inline, private]

Definition at line 1162 of file ScrollPresenterLayoutTests.cs.

        {
            const double c_scrollPresenterWidth = 200.0;
            float horizontalOffset = 0.0f;
            float verticalOffset = 0.0f;
            float zoomFactor = 1.0f;
            float expectedHorizontalOffset = 0.0f;
            float expectedVerticalOffset = 0.0f;

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"Covering alignment {horizontalAlignment.ToString()}");
                content.HorizontalAlignment = horizontalAlignment;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
                Vector2 arrangeRenderSizesDelta = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter);
                Log.Comment($"MinPosition {minPosition.ToString()}");
                Log.Comment($"ArrangeRenderSizesDelta {arrangeRenderSizesDelta.ToString()}");
                Log.Comment($"Content.DesiredSize {content.DesiredSize.ToString()}");
                Log.Comment($"Content.RenderSize {content.RenderSize.ToString()}");

                Verify.AreEqual(expectedMinPosition, minPosition.X);
                Verify.AreEqual(horizontalAlignment, content.HorizontalAlignment);
                Verify.AreEqual(c_scrollPresenterWidth, content.DesiredSize.Width); // 200
                Verify.AreEqual(c_scrollPresenterWidth - leftMargin - rightMargin, content.RenderSize.Width);
                double arrangeRenderSizesDeltaX = GetArrangeRenderSizesDelta(
                    BiDirectionalAlignmentFromHorizontalAlignment(horizontalAlignment),
                    extentSize: c_scrollPresenterWidth,
                    renderSize: c_scrollPresenterWidth - leftMargin - rightMargin,
                    nearMargin: leftMargin,
                    farMargin: rightMargin);
                Verify.AreEqual(leftMargin, arrangeRenderSizesDeltaX);
                Verify.AreEqual(arrangeRenderSizesDeltaX, arrangeRenderSizesDelta.X);
                expectedHorizontalOffset = -minPosition.X + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.X;
                expectedVerticalOffset = -minPosition.Y + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.Y;
            });

            SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment($"horizontalOffset={horizontalOffset}, verticalOffset={verticalOffset}, zoomFactor={zoomFactor}");
                Log.Comment($"expectedHorizontalOffset={expectedHorizontalOffset}, expectedVerticalOffset={expectedVerticalOffset}, expectedZoomFactor={expectedZoomFactor}");
                Verify.AreEqual(expectedHorizontalOffset, horizontalOffset);
                Verify.AreEqual(expectedVerticalOffset, verticalOffset);
                Verify.AreEqual(expectedZoomFactor, zoomFactor);
            });
        }

void ValidateScrollAnimationStartingAndZoomFactorEventArgsHaveValidStartAndEndPositions ( ) [inline]

Definition at line 425 of file ScrollPresenterViewChangeTests.cs.

        {
            int numOffsetChanges = 0;
            int numZoomFactorChanges = 0;
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            Point newPosition1 = new Point(100, 150);
            Point newPosition2 = new Point(50, 100);
            float newZoomFactor1 = 2.0f;
            float newZoomFactor2 = 0.5f;

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(
                    scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Attach to ScrollAnimationStarting");

                scrollPresenter.ZoomAnimationStarting += (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.ZoomAnimationStarting event handler");
                    if (numZoomFactorChanges == 0)
                    {
                        Verify.AreEqual(2.0f, e.EndZoomFactor);
                        Verify.AreEqual(1.0f, e.StartZoomFactor);
                        numZoomFactorChanges++;
                    }
                    else
                    {
                        Verify.AreEqual(0.5f, e.EndZoomFactor);
                        Verify.AreEqual(2.0f, e.StartZoomFactor);
                    }
                };

                scrollPresenter.ScrollAnimationStarting += (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs e) =>
                {
                    Log.Comment("ScrollPresenter.ScrollAnimationStarting event handler");
                    if (numOffsetChanges == 0)
                    {
                        Verify.AreEqual(100.0f, e.EndPosition.X);
                        Verify.AreEqual(150.0f, e.EndPosition.Y);
                        Verify.AreEqual(0.0f, e.StartPosition.X);
                        Verify.AreEqual(0.0f, e.StartPosition.Y);

                        numOffsetChanges++;
                    }
                    else
                    {
                        Verify.AreEqual(50.0f, e.EndPosition.X);
                        Verify.AreEqual(100.0f, e.EndPosition.Y);
                        Verify.AreEqual(100.0f, e.StartPosition.X);
                        Verify.AreEqual(150.0f, e.StartPosition.Y);

                        numOffsetChanges++;
                    }
                };
            });

            Log.Comment("Animating to absolute Offset");
            ScrollTo(scrollPresenter, newPosition1.X, newPosition1.Y, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);

            Log.Comment("Animating to absolute Offset");
            ScrollTo(scrollPresenter, newPosition2.X, newPosition2.Y, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);

            Log.Comment("Animating to absolute zoomFactor");
            ZoomTo(scrollPresenter, newZoomFactor1, 100.0f, 200.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);

            Log.Comment("Animating to absolute zoomFactor");
            ZoomTo(scrollPresenter, newZoomFactor2, 100.0f, 200.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);

        }

void ValidateStretchedImageSize | ( | ScrollPresenter | scrollPresenter,
 |  | Image | imageScrollPresenterContent,
 |  | double | desiredSize,
 |  | double | actualSize,
 |  | double | extentSize |
 | ) |  |  | [inline, private]

Definition at line 538 of file ScrollPresenterLayoutTests.cs.

        {
            Log.Comment($"Sizes with ScrollPresenter.ContentOrientation={scrollPresenter.ContentOrientation}");
            Log.Comment($"Image DesiredSize=({imageScrollPresenterContent.DesiredSize.Width} x {imageScrollPresenterContent.DesiredSize.Height})");
            Log.Comment($"Image RenderSize=({imageScrollPresenterContent.RenderSize.Width} x {imageScrollPresenterContent.RenderSize.Height})");
            Log.Comment($"Image ActualSize=({imageScrollPresenterContent.ActualWidth} x {imageScrollPresenterContent.ActualHeight})");
            Log.Comment($"ScrollPresenter ExtentSize=({scrollPresenter.ExtentWidth} x {scrollPresenter.ExtentHeight})");

            Verify.AreEqual(imageScrollPresenterContent.DesiredSize.Width, desiredSize);
            Verify.AreEqual(imageScrollPresenterContent.DesiredSize.Height, desiredSize);
            Verify.AreEqual(imageScrollPresenterContent.RenderSize.Width, actualSize);
            Verify.AreEqual(imageScrollPresenterContent.RenderSize.Height, actualSize);
            Verify.AreEqual(imageScrollPresenterContent.ActualWidth, actualSize);
            Verify.AreEqual(imageScrollPresenterContent.ActualHeight, actualSize);
            Verify.AreEqual(scrollPresenter.ExtentWidth, extentSize);
            Verify.AreEqual(scrollPresenter.ExtentHeight, extentSize);
        }

void ValidateXYFocusNavigation ( ) [inline]

Definition at line 634 of file ScrollPresenterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var rootPanel = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
                    @"<Grid Width='600' Height='600'
                        xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                        xmlns:controlsPrimitives='using:Microsoft.UI.Xaml.Controls.Primitives'>
                        <Button Content='Outer Left Button' HorizontalAlignment='Left' VerticalAlignment='Center' />
                        <Button Content='Outer Top Button' HorizontalAlignment='Center' VerticalAlignment='Top' />
                        <Button Content='Outer Right Button' HorizontalAlignment='Right' VerticalAlignment='Center' />
                        <Button Content='Outer Bottom Button' HorizontalAlignment='Center' VerticalAlignment='Bottom' />

                        <controlsPrimitives:ScrollPresenter x:Name='scrollPresenter' Width='200' Height='200' HorizontalAlignment='Center' VerticalAlignment='Center'>
                            <Grid Width='600' Height='600' Background='Gray'>

                                <!-- Inner buttons are larger than the outer so that they get ranked better by the XY focus algorithm. -->
                                <Button Content='Inner Left Button' HorizontalAlignment='Left' VerticalAlignment='Center'  Width='180' Height='180' />
                                <Button Content='Inner Top Button' HorizontalAlignment='Center' VerticalAlignment='Top' Width='180' Height='180' />
                                <Button Content='Inner Right Button' HorizontalAlignment='Right' VerticalAlignment='Center' Width='180' Height='180' />
                                <Button Content='Inner Bottom Button' HorizontalAlignment='Center' VerticalAlignment='Bottom' Width='180' Height='180' />

                                <Button x:Name='innerCenterButton' Content='Inner Center Button' HorizontalAlignment='Center' VerticalAlignment='Center' />
                            </Grid>
                        </controlsPrimitives:ScrollPresenter>
                    </Grid>"));

                var innerCenterButton = (Button)rootPanel.FindName("innerCenterButton");
                Content = rootPanel;
                Content.UpdateLayout();

                Log.Comment("Ensure inner center button has keyboard focus.");
                innerCenterButton.Focus(FocusState.Keyboard);
                Verify.AreEqual(innerCenterButton, FocusManager.GetFocusedElement(rootPanel.XamlRoot));

                Verify.AreEqual("Inner Right Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Right)).Content);
                Verify.AreEqual("Inner Left Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Left)).Content);
                Verify.AreEqual("Inner Top Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Up)).Content);
                Verify.AreEqual("Inner Bottom Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Down)).Content);
            });
        }

void VerifyDefaultPropertyValues ( ) [inline]

Definition at line 72 of file ScrollPresenterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollPresenter scrollPresenter = new ScrollPresenter();
                Verify.IsNotNull(scrollPresenter);

                Log.Comment("Verifying ScrollPresenter default property values");
                Verify.IsNull(scrollPresenter.HorizontalScrollController);
                Verify.IsNull(scrollPresenter.VerticalScrollController);
                Verify.IsNull(scrollPresenter.Content);
                Verify.IsNotNull(scrollPresenter.ExpressionAnimationSources);
                Verify.AreEqual(c_defaultState, scrollPresenter.State);
                Verify.AreEqual(c_defaultHorizontalScrollChainMode, scrollPresenter.HorizontalScrollChainMode);
                Verify.AreEqual(c_defaultVerticalScrollChainMode, scrollPresenter.VerticalScrollChainMode);
                Verify.AreEqual(c_defaultHorizontalScrollRailMode, scrollPresenter.HorizontalScrollRailMode);
                Verify.AreEqual(c_defaultVerticalScrollRailMode, scrollPresenter.VerticalScrollRailMode);
                Verify.AreEqual(c_defaultHorizontalScrollMode, scrollPresenter.HorizontalScrollMode);
                Verify.AreEqual(c_defaultVerticalScrollMode, scrollPresenter.VerticalScrollMode);
                Verify.AreEqual(c_defaultZoomChainMode, scrollPresenter.ZoomChainMode);
                Verify.AreEqual(c_defaultContentOrientation, scrollPresenter.ContentOrientation);
                Verify.AreEqual(c_defaultZoomMode, scrollPresenter.ZoomMode);
                Verify.AreEqual(c_defaultIgnoredInputKinds, scrollPresenter.IgnoredInputKinds);
                Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
                Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
                Verify.AreEqual(c_defaultZoomFactor, scrollPresenter.ZoomFactor);
                Verify.AreEqual(c_defaultHorizontalOffset, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(c_defaultVerticalOffset, scrollPresenter.VerticalOffset);
                Verify.AreEqual(c_defaultAnchorRatio, scrollPresenter.HorizontalAnchorRatio);
                Verify.AreEqual(c_defaultAnchorRatio, scrollPresenter.VerticalAnchorRatio);
                Verify.AreEqual(0.0, scrollPresenter.ExtentWidth);
                Verify.AreEqual(0.0, scrollPresenter.ExtentHeight);
                Verify.AreEqual(0.0, scrollPresenter.ViewportWidth);
                Verify.AreEqual(0.0, scrollPresenter.ViewportHeight);
                Verify.AreEqual(0.0, scrollPresenter.ScrollableWidth);
                Verify.AreEqual(0.0, scrollPresenter.ScrollableHeight);
            });
        }

void VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension ( List< ExpressionAnimationStatusChange > expressionAnimationStatusChanges ) [inline, private]

Definition at line 2613 of file ScrollPresenterViewChangeTests.cs.

        {
            // Facades are enabled. The translation and zoom factor animations are expected to be interrupted momentarily.
            Verify.IsNotNull(expressionAnimationStatusChanges);
            Verify.AreEqual(4, expressionAnimationStatusChanges.Count);

            Verify.IsFalse(expressionAnimationStatusChanges[0].IsExpressionAnimationStarted);
            Verify.IsFalse(expressionAnimationStatusChanges[1].IsExpressionAnimationStarted);
            Verify.IsTrue(expressionAnimationStatusChanges[2].IsExpressionAnimationStarted);
            Verify.IsTrue(expressionAnimationStatusChanges[3].IsExpressionAnimationStarted);

            Verify.AreEqual("Translation", expressionAnimationStatusChanges[0].PropertyName);
            Verify.AreEqual("Scale", expressionAnimationStatusChanges[1].PropertyName);
            Verify.AreEqual("Translation", expressionAnimationStatusChanges[2].PropertyName);
            Verify.AreEqual("Scale", expressionAnimationStatusChanges[3].PropertyName);
        }

void VerifyExtentAndViewportProperties ( ) [inline]

Definition at line 170 of file ScrollPresenterTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangleScrollPresenterContent = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

            RunOnUIThread.Execute(() =>
            {
                rectangleScrollPresenterContent = new Rectangle();
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, setAsContentRoot: true);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(c_defaultUIScrollPresenterContentWidth, scrollPresenter.ExtentWidth);
                Verify.AreEqual(c_defaultUIScrollPresenterContentHeight, scrollPresenter.ExtentHeight);
                Verify.AreEqual(c_defaultUIScrollPresenterWidth, scrollPresenter.ViewportWidth);
                Verify.AreEqual(c_defaultUIScrollPresenterHeight, scrollPresenter.ViewportHeight);
                Verify.AreEqual(c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth, scrollPresenter.ScrollableWidth);
                Verify.AreEqual(c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight, scrollPresenter.ScrollableHeight);
            });
        }

void VerifyInteractionSourceSettings ( ) [inline]

Definition at line 285 of file ScrollPresenterTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: false,
                enableInteractionSourcesNotifications: true,
                enableExpressionAnimationStatusNotifications : false))
            {
                ScrollPresenter scrollPresenter = null;
                Rectangle rectangleScrollPresenterContent = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollPresenterContent = new Rectangle();
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    CompositionInteractionSourceCollection interactionSources = scrollPresenterTestHooksHelper.GetInteractionSources(scrollPresenter);
                    Verify.IsNotNull(interactionSources);
                    ScrollPresenterTestHooksHelper.LogInteractionSources(interactionSources);
                    Verify.AreEqual(1, interactionSources.Count);
                    IEnumerator<ICompositionInteractionSource> sourcesEnumerator = (interactionSources as IEnumerable<ICompositionInteractionSource>).GetEnumerator();
                    sourcesEnumerator.MoveNext();
                    VisualInteractionSource visualInteractionSource = sourcesEnumerator.Current as VisualInteractionSource;
                    Verify.IsNotNull(visualInteractionSource);

                    Verify.AreEqual(VisualInteractionSourceRedirectionMode.CapableTouchpadAndPointerWheel, visualInteractionSource.ManipulationRedirectionMode);
                    Verify.IsTrue(visualInteractionSource.IsPositionXRailsEnabled);
                    Verify.IsTrue(visualInteractionSource.IsPositionYRailsEnabled);
                    Verify.AreEqual(InteractionChainingMode.Auto, visualInteractionSource.PositionXChainingMode);
                    Verify.AreEqual(InteractionChainingMode.Auto, visualInteractionSource.PositionYChainingMode);
                    Verify.AreEqual(InteractionChainingMode.Auto, visualInteractionSource.ScaleChainingMode);
                    Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.PositionXSourceMode);
                    Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.PositionYSourceMode);
                    Verify.AreEqual(InteractionSourceMode.Disabled, visualInteractionSource.ScaleSourceMode);
                    Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionXSourceMode);
                    Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionYSourceMode);
                    Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.ScaleSourceMode);

                    Log.Comment("Changing ScrollPresenter properties that affect the primary VisualInteractionSource");
                    scrollPresenter.HorizontalScrollChainMode = ScrollingChainMode.Always;
                    scrollPresenter.VerticalScrollChainMode = ScrollingChainMode.Never;
                    scrollPresenter.HorizontalScrollRailMode = ScrollingRailMode.Disabled;
                    scrollPresenter.VerticalScrollRailMode = ScrollingRailMode.Disabled;
                    scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Enabled;
                    scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Disabled;
                    scrollPresenter.ZoomChainMode = ScrollingChainMode.Never;
                    scrollPresenter.ZoomMode = ScrollingZoomMode.Enabled;
                    scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.All & ~ScrollingInputKinds.Touch;
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    CompositionInteractionSourceCollection interactionSources = scrollPresenterTestHooksHelper.GetInteractionSources(scrollPresenter);
                    Verify.IsNotNull(interactionSources);
                    ScrollPresenterTestHooksHelper.LogInteractionSources(interactionSources);
                    Verify.AreEqual(1, interactionSources.Count);
                    IEnumerator<ICompositionInteractionSource> sourcesEnumerator = (interactionSources as IEnumerable<ICompositionInteractionSource>).GetEnumerator();
                    sourcesEnumerator.MoveNext();
                    VisualInteractionSource visualInteractionSource = sourcesEnumerator.Current as VisualInteractionSource;
                    Verify.IsNotNull(visualInteractionSource);

                    Verify.AreEqual(VisualInteractionSourceRedirectionMode.CapableTouchpadOnly, visualInteractionSource.ManipulationRedirectionMode);
                    Verify.IsFalse(visualInteractionSource.IsPositionXRailsEnabled);
                    Verify.IsFalse(visualInteractionSource.IsPositionYRailsEnabled);
                    Verify.AreEqual(InteractionChainingMode.Always, visualInteractionSource.PositionXChainingMode);
                    Verify.AreEqual(InteractionChainingMode.Never, visualInteractionSource.PositionYChainingMode);
                    Verify.AreEqual(InteractionChainingMode.Never, visualInteractionSource.ScaleChainingMode);
                    Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.PositionXSourceMode);
                    Verify.AreEqual(InteractionSourceMode.Disabled, visualInteractionSource.PositionYSourceMode);
                    Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.ScaleSourceMode);
                    Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionXSourceMode);
                    Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionYSourceMode);
                    Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.ScaleSourceMode);
                });
            }
        }

void VerifyPropertyGettersAndSetters ( ) [inline]

Definition at line 113 of file ScrollPresenterTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            Rectangle rectangle = null;

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter = new ScrollPresenter();
                Verify.IsNotNull(scrollPresenter);

                rectangle = new Rectangle();
                Verify.IsNotNull(rectangle);

                Log.Comment("Setting ScrollPresenter properties to non-default values");
                scrollPresenter.Content = rectangle;
                scrollPresenter.HorizontalScrollChainMode = ScrollingChainMode.Always;
                scrollPresenter.VerticalScrollChainMode = ScrollingChainMode.Never;
                scrollPresenter.HorizontalScrollRailMode = ScrollingRailMode.Disabled;
                scrollPresenter.VerticalScrollRailMode = ScrollingRailMode.Disabled;
                scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Disabled;
                scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Disabled;
                scrollPresenter.ZoomChainMode = ScrollingChainMode.Never;
                scrollPresenter.ZoomMode = ScrollingZoomMode.Enabled;
                scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.MouseWheel;
                scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
                scrollPresenter.MinZoomFactor = 0.5f;
                scrollPresenter.MaxZoomFactor = 2.0f;
                scrollPresenter.HorizontalAnchorRatio = 0.25f;
                scrollPresenter.VerticalAnchorRatio = 0.75f;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Verifying ScrollPresenter non-default property values");
                Verify.AreEqual(rectangle, scrollPresenter.Content);
                Verify.AreEqual(c_defaultState, scrollPresenter.State);
                Verify.AreEqual(ScrollingChainMode.Always, scrollPresenter.HorizontalScrollChainMode);
                Verify.AreEqual(ScrollingChainMode.Never, scrollPresenter.VerticalScrollChainMode);
                Verify.AreEqual(ScrollingRailMode.Disabled, scrollPresenter.HorizontalScrollRailMode);
                Verify.AreEqual(ScrollingRailMode.Disabled, scrollPresenter.VerticalScrollRailMode);
                Verify.AreEqual(ScrollingScrollMode.Disabled, scrollPresenter.HorizontalScrollMode);
                Verify.AreEqual(ScrollingScrollMode.Disabled, scrollPresenter.VerticalScrollMode);
                Verify.AreEqual(ScrollingChainMode.Never, scrollPresenter.ZoomChainMode);
                Verify.AreEqual(ScrollingZoomMode.Enabled, scrollPresenter.ZoomMode);
                Verify.AreEqual(ScrollingInputKinds.MouseWheel, scrollPresenter.IgnoredInputKinds);
                Verify.AreEqual(ScrollingContentOrientation.Horizontal, scrollPresenter.ContentOrientation);
                Verify.AreEqual(0.5f, scrollPresenter.MinZoomFactor);
                Verify.AreEqual(2.0f, scrollPresenter.MaxZoomFactor);
                Verify.AreEqual(0.25f, scrollPresenter.HorizontalAnchorRatio);
                Verify.AreEqual(0.75f, scrollPresenter.VerticalAnchorRatio);
            });
        }

void ViewportHeight | ( | bool | isScrollPresenterParentSizeSet,
 |  | bool | isScrollPresenterParentMaxSizeSet,
 |  | VerticalAlignment | scrollPresenterVerticalAlignment,
 |  | double | scrollPresenterContentHeight |
 | ) |  |  | [inline, private]

Definition at line 274 of file ScrollPresenterLayoutTests.cs.

        {
            Log.Comment($"ViewportHeight test case - isScrollPresenterParentSizeSet: {isScrollPresenterParentSizeSet}, isScrollPresenterParentMaxSizeSet: {isScrollPresenterParentMaxSizeSet}, scrollPresenterVerticalAlignment: {scrollPresenterVerticalAlignment}, scrollPresenterContentHeight: {scrollPresenterContentHeight}");

            RunOnUIThread.Execute(() =>
            {
                var rectangle = new Rectangle()
                {
                    Width = 30,
                    Height = scrollPresenterContentHeight
                };

                var stackPanel = new StackPanel()
                {
                    BorderThickness = new Thickness(5),
                    Margin = new Thickness(7),
                    VerticalAlignment = VerticalAlignment.Top
                };
                stackPanel.Children.Add(rectangle);

                var scrollPresenter = new ScrollPresenter()
                {
                    Content = stackPanel,
                    ContentOrientation = ScrollingContentOrientation.Vertical,
                    VerticalAlignment = scrollPresenterVerticalAlignment
                };

                var border = new Border()
                {
                    BorderThickness = new Thickness(2),
                    Margin = new Thickness(3),
                    VerticalAlignment = VerticalAlignment.Center,
                    Child = scrollPresenter
                };
                if (isScrollPresenterParentSizeSet)
                {
                    border.Width = 300.0;
                    border.Height = 200.0;
                }
                if (isScrollPresenterParentMaxSizeSet)
                {
                    border.MaxWidth = 300.0;
                    border.MaxHeight = 200.0;
                }

                Log.Comment("Setting window content");
                Content = border;
                Content.UpdateLayout();

                double expectedViewportHeight =
                    rectangle.Height + stackPanel.BorderThickness.Top + stackPanel.BorderThickness.Bottom +
                    stackPanel.Margin.Top + stackPanel.Margin.Bottom;

                double borderChildAvailableHeight = border.ActualHeight - border.BorderThickness.Top - border.BorderThickness.Bottom;

                if (expectedViewportHeight > borderChildAvailableHeight || scrollPresenterVerticalAlignment == VerticalAlignment.Stretch)
                {
                    expectedViewportHeight = borderChildAvailableHeight;
                }

                Log.Comment($"border.ActualWidth: {border.ActualWidth}, border.ActualHeight: {border.ActualHeight}");
                Log.Comment($"Checking ViewportWidth - scrollPresenter.ViewportWidth: {scrollPresenter.ViewportWidth}, scrollPresenter.ActualWidth: {scrollPresenter.ActualWidth}");
                Verify.AreEqual(scrollPresenter.ViewportWidth, scrollPresenter.ActualWidth);

                Log.Comment($"Checking ViewportHeight - expectedViewportHeight: {expectedViewportHeight}, scrollPresenter.ViewportHeight: {scrollPresenter.ViewportHeight}, scrollPresenter.ActualHeight: {scrollPresenter.ActualHeight}");
                Verify.AreEqual(expectedViewportHeight, scrollPresenter.ViewportHeight);
                Verify.AreEqual(scrollPresenter.ViewportHeight, scrollPresenter.ActualHeight);
            });
        }

void ViewportHeight ( ) [inline]

Definition at line 220 of file ScrollPresenterLayoutTests.cs.

        {
            for (double scrollPresenterContentHeight = 50.0; scrollPresenterContentHeight <= 350.0; scrollPresenterContentHeight += 300.0)
            {
                ViewportHeight(
                    isScrollPresenterParentSizeSet: false,
                    isScrollPresenterParentMaxSizeSet: false,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Top,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);
                ViewportHeight(
                    isScrollPresenterParentSizeSet: true,
                    isScrollPresenterParentMaxSizeSet: false,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Top,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);
                ViewportHeight(
                    isScrollPresenterParentSizeSet: false,
                    isScrollPresenterParentMaxSizeSet: true,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Top,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);

                ViewportHeight(
                    isScrollPresenterParentSizeSet: false,
                    isScrollPresenterParentMaxSizeSet: false,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Center,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);
                ViewportHeight(
                    isScrollPresenterParentSizeSet: true,
                    isScrollPresenterParentMaxSizeSet: false,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Center,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);
                ViewportHeight(
                    isScrollPresenterParentSizeSet: false,
                    isScrollPresenterParentMaxSizeSet: true,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Center,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);

                ViewportHeight(
                    isScrollPresenterParentSizeSet: false,
                    isScrollPresenterParentMaxSizeSet: false,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Stretch,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);
                ViewportHeight(
                    isScrollPresenterParentSizeSet: true,
                    isScrollPresenterParentMaxSizeSet: false,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Stretch,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);
                ViewportHeight(
                    isScrollPresenterParentSizeSet: false,
                    isScrollPresenterParentMaxSizeSet: true,
                    scrollPresenterVerticalAlignment: VerticalAlignment.Stretch,
                    scrollPresenterContentHeight: scrollPresenterContentHeight);
            }
        }

void WaitForEvent | ( | string | logComment,
 |  | EventWaitHandle | eventWaitHandle |
 | ) |  |  | [inline, private]

Definition at line 2597 of file ScrollPresenterViewChangeTests.cs.

        {
            Log.Comment(logComment);
            if (Debugger.IsAttached)
            {
                eventWaitHandle.WaitOne();
            }
            else
            {
                if (!eventWaitHandle.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration)))
                {
                    throw new Exception("Timeout expiration in WaitForEvent.");
                }
            }
        }

void ZoomBy | ( | ScrollPresenter | scrollPresenter,
 |  | float | zoomFactorDelta,
 |  | float | centerPointX,
 |  | float | centerPointY,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | bool | hookViewChangingAndChanged = true,
 |  | bool? | isAnimationsEnabledOverride = null |
 | ) |  |  | [inline, private]

Definition at line 2150 of file ScrollPresenterViewChangeTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: false,
                enableInteractionSourcesNotifications: false,
                enableExpressionAnimationStatusNotifications: true,
                isAnimationsEnabledOverride: isAnimationsEnabledOverride))
            {
                double? anticipatedHorizontalOffset = null;
                double? anticipatedVerticalOffset = null;
                float? anticipatedZoomFactor = null;
                float originalZoomFactor = 1.0f;
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    if (hookViewChangingAndChanged)
                    {
                        scrollPresenter.ScrollStarting += (sender, args) =>
                        {
                            Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ZoomStarting += (sender, args) =>
                        {
                            Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ViewChanged += (sender, args) =>
                        {
                            Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                        };
                    }

                    originalZoomFactor = scrollPresenter.ZoomFactor;

                    Log.Comment($"Original HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={originalZoomFactor}");

                    operation = StartZoomBy(
                        scrollPresenter,
                        zoomFactorDelta,
                        centerPointX,
                        centerPointY,
                        animationMode,
                        snapPointsMode,
                        scrollPresenterViewChangeOperationEvent);
                });

                WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                    Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
                    Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
                    Log.Comment($"Final viewChangedCount={viewChangedCount}");

                    Verify.AreEqual(zoomFactorDelta + originalZoomFactor, scrollPresenter.ZoomFactor);
                    Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                    Verify.AreEqual(0u, scrollStartingCount);

                    if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
                    {
                        Verify.AreEqual(0u, zoomStartingCount);
                        Verify.IsGreaterThan(viewChangedCount, 1u);
                    }
                    else
                    {
                        Verify.AreEqual(1u, zoomStartingCount);
                        Verify.AreEqual(1u, viewChangedCount);
                        if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
                        {
                            Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - scrollPresenter.HorizontalOffset), 0.01);
                            Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - scrollPresenter.VerticalOffset), 0.01);
                            Verify.IsLessThan(Math.Abs((float)anticipatedZoomFactor - scrollPresenter.ZoomFactor), 0.001f);
                        }
                    }
                });

                Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
                CompositionPropertySpy.SynchronouslyTickUIThread(6);

                RunOnUIThread.Execute(() =>
                {
                    List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
                    ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
                    VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(expressionAnimationStatusChanges);
                });
            }
        }

void ZoomFactorChangeWithCustomDuration ( ) [inline]

Definition at line 589 of file ScrollPresenterViewChangeTests.cs.

        {
            using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
            {
                ScrollPresenter scrollPresenter = null;
                Rectangle rectangleScrollPresenterContent = null;
                AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollPresenterContent = new Rectangle();
                    scrollPresenter = new ScrollPresenter();

                    SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    scrollPresenter.ScrollStarting += (sender, args) =>
                    {
                        Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                    };

                    scrollPresenter.ZoomStarting += (sender, args) =>
                    {
                        Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                    };

                    scrollPresenter.ViewChanged += (sender, args) =>
                    {
                        Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                    };

                    scrollPresenter.ZoomAnimationStarting += (sender, args) =>
                    {
                        Log.Comment("ZoomAnimationStarting - ZoomFactorChangeCorrelationId={0}", args.CorrelationId);
                        Verify.IsNotNull(args.Animation);
                        ScalarKeyFrameAnimation stockKeyFrameAnimation = args.Animation as ScalarKeyFrameAnimation;
                        Verify.IsNotNull(stockKeyFrameAnimation);
                        Log.Comment("Stock duration={0} msec.", stockKeyFrameAnimation.Duration.TotalMilliseconds);
                        Verify.AreEqual(c_MaxStockZoomFactorChangeDuration, stockKeyFrameAnimation.Duration.TotalMilliseconds);
                        stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(10);
                    };

                    operation = StartZoomTo(
                        scrollPresenter,
                        8.0f,
                        100.0f,
                        150.0f,
                        ScrollingAnimationMode.Enabled,
                        ScrollingSnapPointsMode.Ignore,
                        scrollPresenterViewChangeOperationEvent);
                });

                WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                    Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
                    Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
                    Log.Comment($"Final viewChangedCount={viewChangedCount}");

                    Verify.IsLessThan(Math.Abs(scrollPresenter.HorizontalOffset - 700.0), 0.01);
                    Verify.IsLessThan(Math.Abs(scrollPresenter.VerticalOffset - 1050.0), 0.01);
                    Verify.AreEqual(8.0f, scrollPresenter.ZoomFactor);

                    Verify.AreEqual(0u, scrollStartingCount);
                    Verify.AreEqual(0u, zoomStartingCount);
                    Verify.IsLessThanOrEqual(viewChangedCount, 2u);

                    Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                });
            }
        }

void ZoomFactorChangeWithNoContent ( ) [inline]

Definition at line 805 of file ScrollPresenterViewChangeTests.cs.

        {
            ScrollPresenter scrollPresenter = null;
            AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
            AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
            ScrollPresenterOperation operation = null;

            RunOnUIThread.Execute(() =>
            {
                scrollPresenter = new ScrollPresenter();

                SetupDefaultUI(scrollPresenter, null /*rectangleScrollPresenterContent*/, scrollPresenterLoadedEvent);
            });

            WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);

            RunOnUIThread.Execute(() =>
            {
                operation = StartZoomTo(
                    scrollPresenter,
                    8.0f,
                    100.0f,
                    150.0f,
                    ScrollingAnimationMode.Enabled,
                    ScrollingSnapPointsMode.Ignore,
                    scrollPresenterViewChangeOperationEvent);
            });

            WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
                    scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);

                Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
                Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
                Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
                Verify.AreEqual(ScrollPresenterViewChangeResult.Ignored, operation.Result);
            });
        }

void ZoomTo | ( | ScrollPresenter | scrollPresenter,
 |  | float | zoomFactor,
 |  | float | centerPointX,
 |  | float | centerPointY,
 |  | ScrollingAnimationMode | animationMode,
 |  | ScrollingSnapPointsMode | snapPointsMode,
 |  | bool | hookViewChangingAndChanged = true,
 |  | bool? | isAnimationsEnabledOverride = null |
 | ) |  |  | [inline, private]

Definition at line 2049 of file ScrollPresenterViewChangeTests.cs.

        {
            using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
                enableAnchorNotifications: false,
                enableInteractionSourcesNotifications: false,
                enableExpressionAnimationStatusNotifications: true,
                isAnimationsEnabledOverride: isAnimationsEnabledOverride))
            {
                double? anticipatedHorizontalOffset = null;
                double? anticipatedVerticalOffset = null;
                float? anticipatedZoomFactor = null;
                AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
                ScrollPresenterOperation operation = null;

                RunOnUIThread.Execute(() =>
                {
                    if (hookViewChangingAndChanged)
                    {
                        scrollPresenter.ScrollStarting += (sender, args) =>
                        {
                            Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ZoomStarting += (sender, args) =>
                        {
                            Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
                            anticipatedHorizontalOffset = args.HorizontalOffset;
                            anticipatedVerticalOffset = args.VerticalOffset;
                            anticipatedZoomFactor = args.ZoomFactor;
                        };

                        scrollPresenter.ViewChanged += (sender, args) =>
                        {
                            Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
                        };
                    }

                    operation = StartZoomTo(
                        scrollPresenter,
                        zoomFactor,
                        centerPointX,
                        centerPointY,
                        animationMode,
                        snapPointsMode,
                        scrollPresenterViewChangeOperationEvent);
                });

                WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
                    Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
                    Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
                    Log.Comment($"Final viewChangedCount={viewChangedCount}");

                    Verify.AreEqual(zoomFactor, scrollPresenter.ZoomFactor);
                    Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
                    Verify.AreEqual(0u, scrollStartingCount);

                    if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
                    {
                        Verify.AreEqual(0u, zoomStartingCount);
                        Verify.IsGreaterThan(viewChangedCount, 1u);
                    }
                    else
                    {
                        Verify.AreEqual(1u, zoomStartingCount);
                        Verify.AreEqual(1u, viewChangedCount);
                        if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
                        {
                            Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - scrollPresenter.HorizontalOffset), 0.01);
                            Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - scrollPresenter.VerticalOffset), 0.01);
                            Verify.IsLessThan(Math.Abs((float)anticipatedZoomFactor - scrollPresenter.ZoomFactor), 0.001f);
                        }
                    }
                });

                Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
                CompositionPropertySpy.SynchronouslyTickUIThread(6);

                RunOnUIThread.Execute(() =>
                {
                    List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
                    ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
                    VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(expressionAnimationStatusChanges);
                });
            }
        }

Member Data Documentation

const int c_defaultAnchoringUIRepeaterChildrenCount = 16 [private]

Definition at line 30 of file ScrollPresenterAnchoringTests.cs.

const double c_defaultAnchoringUIScrollPresenterConstrainedSize = 300.0 [private]

Definition at line 28 of file ScrollPresenterAnchoringTests.cs.

const double c_defaultAnchoringUIScrollPresenterNonConstrainedSize = 600.0 [private]

Definition at line 27 of file ScrollPresenterAnchoringTests.cs.

const int c_defaultAnchoringUIStackPanelChildrenCount = 16 [private]

Definition at line 29 of file ScrollPresenterAnchoringTests.cs.

const double c_defaultAnchorRatio = 0.0 [private]

Definition at line 48 of file ScrollPresenterTests.cs.

const double c_defaultBringIntoViewUIScrollPresenterConstrainedSize = 300.0 [private]

Definition at line 25 of file ScrollPresenterBringIntoViewTests.cs.

const double c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize = 600.0 [private]

Definition at line 24 of file ScrollPresenterBringIntoViewTests.cs.

const int c_defaultBringIntoViewUIStackPanelChildrenCount = 16 [private]

Definition at line 26 of file ScrollPresenterBringIntoViewTests.cs.

const ScrollingContentOrientation c_defaultContentOrientation = ScrollingContentOrientation.Both [private]

Definition at line 42 of file ScrollPresenterTests.cs.

const double c_defaultHorizontalOffset = 0.0 [private]

Definition at line 46 of file ScrollPresenterTests.cs.

const ScrollingChainMode c_defaultHorizontalScrollChainMode = ScrollingChainMode.Auto [private]

Definition at line 33 of file ScrollPresenterTests.cs.

const ScrollingScrollMode c_defaultHorizontalScrollMode = ScrollingScrollMode.Auto [private]

Definition at line 37 of file ScrollPresenterTests.cs.

const ScrollingRailMode c_defaultHorizontalScrollRailMode = ScrollingRailMode.Enabled [private]

Definition at line 35 of file ScrollPresenterTests.cs.

const ScrollingInputKinds c_defaultIgnoredInputKinds = ScrollingInputKinds.None [private]

Definition at line 41 of file ScrollPresenterTests.cs.

const double c_defaultMaxZoomFactor = 10.0 [private]

Definition at line 45 of file ScrollPresenterTests.cs.

const double c_defaultMinZoomFactor = 0.1 [private]

Definition at line 43 of file ScrollPresenterTests.cs.

const float c_defaultOffsetResultTolerance = 0.0001f [private]

Definition at line 56 of file ScrollPresenterTests.cs.

const ScrollingInteractionState c_defaultState = ScrollingInteractionState.Idle [private]

Definition at line 32 of file ScrollPresenterTests.cs.

const double c_defaultUIScrollControllerThickness = 44.0 [private]

Definition at line 54 of file ScrollPresenterTests.cs.

const double c_defaultUIScrollPresenterContentHeight = 600.0 [private]

Definition at line 51 of file ScrollPresenterTests.cs.

const double c_defaultUIScrollPresenterContentWidth = 1200.0 [private]

Definition at line 50 of file ScrollPresenterTests.cs.

const double c_defaultUIScrollPresenterHeight = 200.0 [private]

Definition at line 53 of file ScrollPresenterTests.cs.

const double c_defaultUIScrollPresenterWidth = 300.0 [private]

Definition at line 52 of file ScrollPresenterTests.cs.

const double c_defaultVerticalOffset = 0.0 [private]

Definition at line 47 of file ScrollPresenterTests.cs.

const ScrollingChainMode c_defaultVerticalScrollChainMode = ScrollingChainMode.Auto [private]

Definition at line 34 of file ScrollPresenterTests.cs.

const ScrollingScrollMode c_defaultVerticalScrollMode = ScrollingScrollMode.Auto [private]

Definition at line 38 of file ScrollPresenterTests.cs.

const ScrollingRailMode c_defaultVerticalScrollRailMode = ScrollingRailMode.Enabled [private]

Definition at line 36 of file ScrollPresenterTests.cs.

const ScrollingChainMode c_defaultZoomChainMode = ScrollingChainMode.Auto [private]

Definition at line 39 of file ScrollPresenterTests.cs.

const double c_defaultZoomFactor = 1.0 [private]

Definition at line 44 of file ScrollPresenterTests.cs.

const ScrollingZoomMode c_defaultZoomMode = ScrollingZoomMode.Disabled [private]

Definition at line 40 of file ScrollPresenterTests.cs.

const string c_expressionAnimationSourcesExtentPropertyName = "Extent" [private]

Definition at line 62 of file ScrollPresenterTests.cs.

const string c_expressionAnimationSourcesMaxPositionPropertyName = "MaxPosition" [private]

Definition at line 67 of file ScrollPresenterTests.cs.

const string c_expressionAnimationSourcesMinPositionPropertyName = "MinPosition" [private]

Definition at line 66 of file ScrollPresenterTests.cs.

const string c_expressionAnimationSourcesOffsetPropertyName = "Offset" [private]

Definition at line 64 of file ScrollPresenterTests.cs.

const string c_expressionAnimationSourcesPositionPropertyName = "Position" [private]

Definition at line 65 of file ScrollPresenterTests.cs.

const string c_expressionAnimationSourcesViewportPropertyName = "Viewport" [private]

Definition at line 63 of file ScrollPresenterTests.cs.

const string c_expressionAnimationSourcesZoomFactorPropertyName = "ZoomFactor" [private]

Definition at line 68 of file ScrollPresenterTests.cs.

const int c_MaxStockOffsetsChangeDuration = 1000 [private]

Definition at line 38 of file ScrollPresenterViewChangeTests.cs.

const int c_MaxStockZoomFactorChangeDuration = 1000 [private]

Definition at line 39 of file ScrollPresenterViewChangeTests.cs.

const int c_MaxWaitDuration = 5000 [private]

Definition at line 37 of file ScrollPresenterViewChangeTests.cs.

const string c_visualHorizontalOffsetTargetedPropertyName = "Translation.X" [private]

Definition at line 58 of file ScrollPresenterTests.cs.

const string c_visualScaleTargetedPropertyName = "Scale.X" [private]

Definition at line 60 of file ScrollPresenterTests.cs.

const string c_visualVerticalOffsetTargetedPropertyName = "Translation.Y" [private]

Definition at line 59 of file ScrollPresenterTests.cs.

uint scrollStartingCount = 0u [private]

Definition at line 41 of file ScrollPresenterViewChangeTests.cs.

uint viewChangedCount = 0u [private]

Definition at line 43 of file ScrollPresenterViewChangeTests.cs.

uint zoomStartingCount = 0u [private]

Definition at line 42 of file ScrollPresenterViewChangeTests.cs.

The documentation for this class was generated from the following files:
  • ScrollPresenter/APITests/ScrollControllerTests.cs
  • ScrollPresenter/APITests/ScrollPresenterLayoutTests.cs
  • ScrollPresenter/APITests/ScrollPresenterViewChangeTests.cs
  • ScrollPresenter/APITests/ScrollPresenterAnchoringTests.cs
  • ScrollPresenter/APITests/ScrollPresenterBringIntoViewTests.cs
  • ScrollPresenter/APITests/ScrollPresenterTests.cs
  • ScrollPresenter/APITests/ScrollPresenterSnapPointTests.cs
Generated on Sun Dec 1 2024 20:53:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTests::ScrollPresenterOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ScrollPresenterTests
  • ScrollPresenterTests::ScrollPresenterOperation
Public Member Functions | Properties

ScrollPresenterTests::ScrollPresenterOperation Class Reference

List of all members.

Public Member Functions

ScrollPresenterOperation ()

Properties

int | CorrelationId [get, set]
ScrollPresenterViewChangeResult | Result [get, set]

Detailed Description

Definition at line 2649 of file ScrollPresenterViewChangeTests.cs.

Constructor & Destructor Documentation

ScrollPresenterOperation ( ) [inline]

Definition at line 2651 of file ScrollPresenterViewChangeTests.cs.

            {
                Result = ScrollPresenterViewChangeResult.Ignored;
                CorrelationId = -1;
            }

Property Documentation

int CorrelationId [get, set]

Definition at line 2664 of file ScrollPresenterViewChangeTests.cs.

ScrollPresenterViewChangeResult Result [get, set]

Definition at line 2658 of file ScrollPresenterViewChangeTests.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/APITests/ScrollPresenterViewChangeTests.cs
Generated on Sun Dec 1 2024 20:53:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTests::TestDataSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ScrollPresenterTests
  • ScrollPresenterTests::TestDataSource
Public Member Functions | Protected Member Functions | Properties

ScrollPresenterTests::TestDataSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping.

List of all members.

Public Member Functions

TestDataSource (List< string > source)
void | Insert (int index, int count)
void | Remove (int index, int count)

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()
override string | KeyFromIndexCore (int index)

Properties

List< string > | Inner [get, set]

Detailed Description

Definition at line 957 of file ScrollPresenterAnchoringTests.cs.

Constructor & Destructor Documentation

TestDataSource ( List< string > source ) [inline]

Definition at line 959 of file ScrollPresenterAnchoringTests.cs.

            {
                Inner = source;
            }

Member Function Documentation

override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 975 of file ScrollPresenterAnchoringTests.cs.

            {
                return Inner[index];
            }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 970 of file ScrollPresenterAnchoringTests.cs.

            {
                return Inner.Count;
            }

void Insert | ( | int | index,
 |  | int | count |
 | ) |  |  | [inline]

Definition at line 985 of file ScrollPresenterAnchoringTests.cs.

            {
                for (int i = 0; i < count; i++)
                {
                    Inner.Insert(index + i, string.Format("ItemI #{0}", Inner.Count));
                }

                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                    NotifyCollectionChangedAction.Add,
                    oldStartingIndex: -1,
                    oldItemsCount: 0,
                    newStartingIndex: index,
                    newItemsCount: count));
            }

override string KeyFromIndexCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceViewWithUniqueIdMapping.

Definition at line 980 of file ScrollPresenterAnchoringTests.cs.

            {
                return Inner[index].ToString();
            }

void Remove | ( | int | index,
 |  | int | count |
 | ) |  |  | [inline]

Definition at line 1000 of file ScrollPresenterAnchoringTests.cs.

            {
                for (int i = 0; i < count; i++)
                {
                    Inner.RemoveAt(index);
                }

                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                    NotifyCollectionChangedAction.Remove,
                    oldStartingIndex: index,
                    oldItemsCount: count,
                    newStartingIndex: -1,
                    newItemsCount: 0));
            }

Property Documentation

List<string> Inner [get, set]

Definition at line 965 of file ScrollPresenterAnchoringTests.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/APITests/ScrollPresenterAnchoringTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewerAdapterTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ScrollViewerAdapterTests
Public Member Functions | Private Member Functions

ScrollViewerAdapterTests Class Reference

List of all members.

Public Member Functions

void | AdaptOnNullThrows ()
void | AdaptOnSV ()
void | AdaptOnSVWithNonUIElementContentThrows ()
void | AdaptOnSVWithoutContentThrows ()
void | AdaptOnSVWithoutWaitingForLoaded ()
void | CanInstantiate ()

Private Member Functions

void | CheckLeaks (Dictionary< string, WeakReference > objects)

Detailed Description

Definition at line 21 of file ScrollViewerAdapterTests.cs.

Member Function Documentation

void AdaptOnNullThrows ( ) [inline]

Definition at line 33 of file ScrollViewerAdapterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
                Verify.IsNotNull(adapter);
                Verify.Throws<ArgumentException>(() => { adapter.Adapt(null, new Size(1.0, 1.0)); });
            });
        }

void AdaptOnSV ( ) [inline]

Definition at line 76 of file ScrollViewerAdapterTests.cs.

        {
            var resetEvent = new AutoResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                ScrollViewer sv = new ScrollViewer();
                sv.Content = new Button();
                sv.Loaded += (object sender, RoutedEventArgs e) => { resetEvent.Set(); };

                Content = sv;
                Content.UpdateLayout();
                ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
                adapter.Adapt(sv, new Size(1.0, 1.0));
            });
        }

void AdaptOnSVWithNonUIElementContentThrows ( ) [inline]

Definition at line 44 of file ScrollViewerAdapterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollViewer sv = new ScrollViewer();
                sv.Content = 1;
                Content = sv;
                Content.UpdateLayout();
                ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
                Verify.IsNotNull(adapter);
                Verify.Throws<ArgumentException>(() => { adapter.Adapt(sv, new Size(1.0, 1.0)); });
            });
        }

void AdaptOnSVWithoutContentThrows ( ) [inline]

Definition at line 59 of file ScrollViewerAdapterTests.cs.

        {
            var resetEvent = new AutoResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                ScrollViewer sv = new ScrollViewer();
                sv.Loaded += (object sender, RoutedEventArgs e) => { resetEvent.Set(); };
                Content = sv;
                Content.UpdateLayout();
                Verify.IsNull(sv.Content);
                ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
                Verify.IsNotNull(adapter);
                Verify.Throws<ArgumentException>(() => { adapter.Adapt(sv, new Size(1.0, 1.0)); });
            });
        }

void AdaptOnSVWithoutWaitingForLoaded ( ) [inline]

Definition at line 93 of file ScrollViewerAdapterTests.cs.

        {
            var objects = new Dictionary<string, WeakReference>();
            RunOnUIThread.Execute(() =>
            {
                ScrollViewer sv = new ScrollViewer();
                objects["sv"] = new WeakReference(sv);
                sv.Content = new Button();
                var adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
                objects["adapter"] = new WeakReference(adapter);
                adapter.Adapt(sv, new Size(1.0, 1.0));
                Content = sv;
                Content.UpdateLayout();

                adapter = null;
                Content = null;
            });

            IdleSynchronizer.Wait();
            GC.Collect();
            GC.WaitForPendingFinalizers();
            GC.Collect();

            RunOnUIThread.Execute(() => CheckLeaks(objects));
        }

void CanInstantiate ( ) [inline]

Definition at line 24 of file ScrollViewerAdapterTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
            });
        }

void CheckLeaks ( Dictionary< string, WeakReference > objects ) [inline, private]

Definition at line 119 of file ScrollViewerAdapterTests.cs.

        {
            foreach (var pair in objects)
            {
                Log.Comment("Checking if object {0} has been collected", pair.Key);
                object target = pair.Value.Target;
                if (target != null)
                {
                    Verify.DisableVerifyFailureExceptions = true; // throwing exceptions makes running this in TDP harder
                    Verify.Fail(String.Format("Object {0} is still alive when it should not be.", target));
                    Verify.DisableVerifyFailureExceptions = false;
                }
            }
            objects.Clear();
        }

The documentation for this class was generated from the following file:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/APITests/ScrollViewerAdapterTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ScrollViewTests
Public Member Functions | Private Member Functions | Private Attributes

ScrollViewTests Class Reference

List of all members.

Public Member Functions

void | VerifyAnchorCandidateRegistration ()
void | VerifyDefaultPropertyValues ()
void | VerifyPropertyValuesAfterTemplateApplication ()
void | VerifyScrollPresenterAttachedProperties ()
void | VerifyVisualStates ()

Private Member Functions

static bool | IsDebuggerPresent ()
void | MUXControlsTestHooks_LoggingMessageForVisualStateChange (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | SetupDefaultUI (ScrollView scrollView, Rectangle rectangleScrollViewContent=null, AutoResetEvent scrollViewLoadedEvent=null, AutoResetEvent scrollViewUnloadedEvent=null, bool setAsContentRoot=true, bool useParentGrid=false)
void | VerifyVisualStates (ScrollBarVisibility scrollBarVisibility, bool autoHideScrollControllers)
void | VerifyVisualStates (uint expectedMouseIndicatorStateCount, uint expectedTouchIndicatorStateCount, uint expectedNoIndicatorStateCount, uint expectedScrollBarsSeparatorCollapsedStateCount, uint expectedScrollBarsSeparatorCollapsedDisabledStateCount, uint expectedScrollBarsSeparatorExpandedStateCount, uint expectedScrollBarsSeparatorDisplayedWithoutAnimationStateCount, uint expectedScrollBarsSeparatorExpandedWithoutAnimationStateCount, uint expectedScrollBarsSeparatorCollapsedWithoutAnimationStateCount)
void | WaitForEvent (string logComment, EventWaitHandle eventWaitHandle)

Private Attributes

const double | c_defaultAnchorRatio = 0.0
const ScrollingScrollMode | c_defaultComputedHorizontalScrollMode = ScrollingScrollMode.Disabled
const ScrollingScrollMode | c_defaultComputedVerticalScrollMode = ScrollingScrollMode.Disabled
const ScrollingContentOrientation | c_defaultContentOrientation = ScrollingContentOrientation.Vertical
const ScrollingChainMode | c_defaultHorizontalScrollChainMode = ScrollingChainMode.Auto
const ScrollingScrollMode | c_defaultHorizontalScrollMode = ScrollingScrollMode.Auto
const ScrollingRailMode | c_defaultHorizontalScrollRailMode = ScrollingRailMode.Enabled
const ScrollingInputKinds | c_defaultIgnoredInputKinds = ScrollingInputKinds.None
const double | c_defaultMaxZoomFactor = 10.0
const double | c_defaultMinZoomFactor = 0.1
const double | c_defaultUIScrollViewContentHeight = 600.0
const double | c_defaultUIScrollViewContentWidth = 1200.0
const double | c_defaultUIScrollViewHeight = 200.0
const double | c_defaultUIScrollViewWidth = 300.0
const ScrollingChainMode | c_defaultVerticalScrollChainMode = ScrollingChainMode.Auto
const ScrollingScrollMode | c_defaultVerticalScrollMode = ScrollingScrollMode.Auto
const ScrollingRailMode | c_defaultVerticalScrollRailMode = ScrollingRailMode.Enabled
const ScrollingChainMode | c_defaultZoomChainMode = ScrollingChainMode.Auto
const ScrollingZoomMode | c_defaultZoomMode = ScrollingZoomMode.Disabled
const double | c_epsilon = 0.0000001
const int | c_MaxWaitDuration = 5000
ScrollViewVisualStateCounts m_scrollViewVisualStateCounts
bool | m_trackScrollViewStateChanges = false

Detailed Description

Definition at line 38 of file ScrollViewTests.cs.

Member Function Documentation

static bool IsDebuggerPresent ( ) [private]
void MUXControlsTestHooks_LoggingMessageForVisualStateChange | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 364 of file ScrollViewTests.cs.

        {
            if(m_trackScrollViewStateChanges)
            {
                if (args.IsVerboseLevel)
                {
                    if (args.Message.Contains("ScrollView::GoToState"))
                    {
                        if (args.Message.Contains("NoIndicator"))
                        {
                            m_scrollViewVisualStateCounts.NoIndicatorStateCount++;
                        }
                        else if (args.Message.Contains("TouchIndicator"))
                        {
                            m_scrollViewVisualStateCounts.TouchIndicatorStateCount++;
                        }
                        else if (args.Message.Contains("MouseIndicator"))
                        {
                            m_scrollViewVisualStateCounts.MouseIndicatorStateCount++;
                        }
                        else if (args.Message.Contains("ScrollBarsSeparatorCollapsedDisabled"))
                        {
                            m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedDisabledStateCount++;
                        }
                        else if (args.Message.Contains("ScrollBarsSeparatorCollapsedWithoutAnimation"))
                        {
                            m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedWithoutAnimationStateCount++;
                        }
                        else if (args.Message.Contains("ScrollBarsSeparatorDisplayedWithoutAnimation"))
                        {
                            m_scrollViewVisualStateCounts.ScrollBarsSeparatorDisplayedWithoutAnimationStateCount++;
                        }
                        else if (args.Message.Contains("ScrollBarsSeparatorExpandedWithoutAnimation"))
                        {
                            m_scrollViewVisualStateCounts.ScrollBarsSeparatorExpandedWithoutAnimationStateCount++;
                        }
                        else if (args.Message.Contains("ScrollBarsSeparatorCollapsed"))
                        {
                            m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedStateCount++;
                        }
                        else if (args.Message.Contains("ScrollBarsSeparatorExpanded"))
                        {
                            m_scrollViewVisualStateCounts.ScrollBarsSeparatorExpandedStateCount++;
                        }
                    }
                }
            }
        }

void SetupDefaultUI | ( | ScrollView | scrollView,
 |  | Rectangle | rectangleScrollViewContent = null,
 |  | AutoResetEvent | scrollViewLoadedEvent = null,
 |  | AutoResetEvent | scrollViewUnloadedEvent = null,
 |  | bool | setAsContentRoot = true,
 |  | bool | useParentGrid = false |
 | ) |  |  | [inline, private]

Definition at line 510 of file ScrollViewTests.cs.

        {
            Log.Comment("Setting up default UI with ScrollView" + (rectangleScrollViewContent == null ? "" : " and Rectangle"));

            LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop brownGS = new GradientStop() { Color = Colors.Brown, Offset = 0.0 };
            twoColorLGB.GradientStops.Add(brownGS);

            GradientStop orangeGS = new GradientStop() { Color = Colors.Orange, Offset = 1.0 };
            twoColorLGB.GradientStops.Add(orangeGS);

            if (rectangleScrollViewContent != null)
            {
                rectangleScrollViewContent.Width = c_defaultUIScrollViewContentWidth;
                rectangleScrollViewContent.Height = c_defaultUIScrollViewContentHeight;
                rectangleScrollViewContent.Fill = twoColorLGB;
            }

            Verify.IsNotNull(scrollView);
            scrollView.Name = "scrollView";
            scrollView.Width = c_defaultUIScrollViewWidth;
            scrollView.Height = c_defaultUIScrollViewHeight;
            if (rectangleScrollViewContent != null)
            {
                scrollView.Content = rectangleScrollViewContent;
            }

            if (scrollViewLoadedEvent != null)
            {
                scrollView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollView.Loaded event handler");
                    scrollViewLoadedEvent.Set();
                };
            }

            if (scrollViewUnloadedEvent != null)
            {
                scrollView.Unloaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("ScrollView.Unloaded event handler");
                    scrollViewUnloadedEvent.Set();
                };
            }

            Grid parentGrid = null;

            if (useParentGrid)
            {
                parentGrid = new Grid();
                parentGrid.Width = c_defaultUIScrollViewWidth * 3;
                parentGrid.Height = c_defaultUIScrollViewHeight * 3;

                scrollView.HorizontalAlignment = HorizontalAlignment.Left;
                scrollView.VerticalAlignment = VerticalAlignment.Top;

                parentGrid.Children.Add(scrollView);
            }

            if (setAsContentRoot)
            {
                Log.Comment("Setting window content");
                if (useParentGrid)
                {
                    Content = parentGrid;
                }
                else
                {
                    Content = scrollView;
                }
            }
        }

void VerifyAnchorCandidateRegistration ( ) [inline]

Definition at line 443 of file ScrollViewTests.cs.

        {
            using (PrivateLoggingHelper privateSVLoggingHelper = new PrivateLoggingHelper("ScrollView", "ScrollPresenter"))
            {
                int expectedAnchorCandidatesCount = 0;
                ScrollPresenter scrollPresenter = null;
                ScrollView scrollView = null;
                Rectangle rectangleScrollViewContent = null;
                AutoResetEvent scrollViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewAnchorRequestedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollViewContent = new Rectangle();
                    scrollView = new ScrollView();
                    scrollView.HorizontalAnchorRatio = 0.1;

                    SetupDefaultUI(scrollView, rectangleScrollViewContent, scrollViewLoadedEvent);

                    scrollView.AnchorRequested += (ScrollView sender, ScrollingAnchorRequestedEventArgs args) =>
                    {
                        Log.Comment("ScrollView.AnchorRequested event handler. args.AnchorCandidates.Count: " + args.AnchorCandidates.Count);
                        Verify.IsNull(args.AnchorElement);
                        Verify.IsNull(sender.CurrentAnchor);
                        Verify.AreEqual(expectedAnchorCandidatesCount, args.AnchorCandidates.Count);
                        scrollViewAnchorRequestedEvent.Set();
                    };
                });

                WaitForEvent("Waiting for Loaded event", scrollViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Accessing inner ScrollPresenter control");
                    scrollPresenter = scrollView.ScrollPresenter;

                    Log.Comment("Registering Rectangle as anchor candidate");
                    scrollView.RegisterAnchorCandidate(rectangleScrollViewContent);
                    expectedAnchorCandidatesCount = 1;

                    Log.Comment("Forcing ScrollPresenter layout");
                    scrollPresenter.InvalidateArrange();
                });

                WaitForEvent("Waiting for AnchorRequested event", scrollViewAnchorRequestedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Unregistering Rectangle as anchor candidate");
                    scrollView.UnregisterAnchorCandidate(rectangleScrollViewContent);
                    expectedAnchorCandidatesCount = 0;

                    Log.Comment("Forcing ScrollPresenter layout");
                    scrollPresenter.InvalidateArrange();
                });

                WaitForEvent("Waiting for AnchorRequested event", scrollViewAnchorRequestedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("ScrollView CurrentAnchor is " + (scrollView.CurrentAnchor == null ? "null" : "non-null"));
                    Verify.IsNull(scrollView.CurrentAnchor);
                    Verify.AreEqual(scrollView.CurrentAnchor, scrollPresenter.CurrentAnchor);
                });
            }
        }

void VerifyDefaultPropertyValues ( ) [inline]

Definition at line 69 of file ScrollViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ScrollView scrollView = new ScrollView();
                Verify.IsNotNull(scrollView);

                Log.Comment("Verifying ScrollView default property values");
                Verify.IsNull(scrollView.Content);
                Verify.IsNull(scrollView.CurrentAnchor);
                Verify.IsNull(scrollView.ScrollPresenter);
                Verify.AreEqual(c_defaultComputedHorizontalScrollMode, scrollView.ComputedHorizontalScrollMode);
                Verify.AreEqual(c_defaultComputedVerticalScrollMode, scrollView.ComputedVerticalScrollMode);
                Verify.AreEqual(c_defaultIgnoredInputKinds, scrollView.IgnoredInputKinds);
                Verify.AreEqual(c_defaultContentOrientation, scrollView.ContentOrientation);
                Verify.AreEqual(c_defaultHorizontalScrollChainMode, scrollView.HorizontalScrollChainMode);
                Verify.AreEqual(c_defaultVerticalScrollChainMode, scrollView.VerticalScrollChainMode);
                Verify.AreEqual(c_defaultHorizontalScrollRailMode, scrollView.HorizontalScrollRailMode);
                Verify.AreEqual(c_defaultVerticalScrollRailMode, scrollView.VerticalScrollRailMode);
                Verify.AreEqual(c_defaultHorizontalScrollMode, scrollView.HorizontalScrollMode);
                Verify.AreEqual(c_defaultVerticalScrollMode, scrollView.VerticalScrollMode);
                Verify.AreEqual(c_defaultZoomMode, scrollView.ZoomMode);
                Verify.AreEqual(c_defaultZoomChainMode, scrollView.ZoomChainMode);
                Verify.IsGreaterThan(scrollView.MinZoomFactor, c_defaultMinZoomFactor - c_epsilon);
                Verify.IsLessThan(scrollView.MinZoomFactor, c_defaultMinZoomFactor + c_epsilon);
                Verify.IsGreaterThan(scrollView.MaxZoomFactor, c_defaultMaxZoomFactor - c_epsilon);
                Verify.IsLessThan(scrollView.MaxZoomFactor, c_defaultMaxZoomFactor + c_epsilon);
                Verify.AreEqual(c_defaultAnchorRatio, scrollView.HorizontalAnchorRatio);
                Verify.AreEqual(c_defaultAnchorRatio, scrollView.VerticalAnchorRatio);
                Verify.AreEqual(0.0, scrollView.ExtentWidth);
                Verify.AreEqual(0.0, scrollView.ExtentHeight);
                Verify.AreEqual(0.0, scrollView.ViewportWidth);
                Verify.AreEqual(0.0, scrollView.ViewportHeight);
                Verify.AreEqual(0.0, scrollView.ScrollableWidth);
                Verify.AreEqual(0.0, scrollView.ScrollableHeight);
            });
        }

void VerifyPropertyValuesAfterTemplateApplication ( ) [inline]

Definition at line 180 of file ScrollViewTests.cs.

        {
            using (PrivateLoggingHelper privateSVLoggingHelper = new PrivateLoggingHelper("ScrollView", "ScrollPresenter"))
            {
                ScrollView scrollView = null;
                Rectangle rectangleScrollViewContent = null;
                AutoResetEvent scrollViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollViewContent = new Rectangle();
                    scrollView = new ScrollView();

                    SetupDefaultUI(scrollView, rectangleScrollViewContent, scrollViewLoadedEvent, scrollViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Verifying ScrollView property values after Loaded event");
                    Verify.AreEqual(rectangleScrollViewContent, scrollView.Content);
                    Verify.IsNull(scrollView.CurrentAnchor);
                    Verify.IsNotNull(scrollView.ScrollPresenter);
                    Verify.AreEqual(rectangleScrollViewContent, scrollView.ScrollPresenter.Content);
                    Verify.AreEqual(c_defaultUIScrollViewContentWidth, scrollView.ExtentWidth);
                    Verify.AreEqual(c_defaultUIScrollViewContentHeight, scrollView.ExtentHeight);
                    Verify.AreEqual(c_defaultUIScrollViewWidth, scrollView.ViewportWidth);
                    Verify.AreEqual(c_defaultUIScrollViewHeight, scrollView.ViewportHeight);
                    Verify.AreEqual(c_defaultUIScrollViewContentWidth - c_defaultUIScrollViewWidth, scrollView.ScrollableWidth);
                    Verify.AreEqual(c_defaultUIScrollViewContentHeight - c_defaultUIScrollViewHeight, scrollView.ScrollableHeight);

                    Log.Comment("Resetting window content and ScrollView");
                    Content = null;
                    scrollView = null;
                });

                WaitForEvent("Waiting for Unloaded event", scrollViewUnloadedEvent);

                IdleSynchronizer.Wait();
                Log.Comment("Garbage collecting...");
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                Log.Comment("Done");
            }
        }

void VerifyScrollPresenterAttachedProperties ( ) [inline]

Definition at line 109 of file ScrollViewTests.cs.

        {
            using (PrivateLoggingHelper privateSVLoggingHelper = new PrivateLoggingHelper("ScrollView", "ScrollPresenter"))
            {
                ScrollView scrollView = null;
                Rectangle rectangleScrollViewContent = null;
                AutoResetEvent scrollViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollViewContent = new Rectangle();
                    scrollView = new ScrollView();

                    SetupDefaultUI(scrollView, rectangleScrollViewContent, scrollViewLoadedEvent, scrollViewUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", scrollViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Setting ScrollPresenter-cloned properties to non-default values");
                    scrollView.IgnoredInputKinds = ScrollingInputKinds.MouseWheel | ScrollingInputKinds.Pen;
                    scrollView.ContentOrientation = ScrollingContentOrientation.Horizontal;
                    scrollView.HorizontalScrollChainMode = ScrollingChainMode.Always;
                    scrollView.VerticalScrollChainMode = ScrollingChainMode.Never;
                    scrollView.HorizontalScrollRailMode = ScrollingRailMode.Disabled;
                    scrollView.VerticalScrollRailMode = ScrollingRailMode.Disabled;
                    scrollView.HorizontalScrollMode = ScrollingScrollMode.Enabled;
                    scrollView.VerticalScrollMode = ScrollingScrollMode.Disabled;
                    scrollView.ZoomMode = ScrollingZoomMode.Enabled;
                    scrollView.ZoomChainMode = ScrollingChainMode.Never;
                    scrollView.MinZoomFactor = 2.0;
                    scrollView.MaxZoomFactor = 8.0;

                    Log.Comment("Verifying ScrollPresenter-cloned non-default properties");
                    Verify.AreEqual(ScrollingInputKinds.MouseWheel | ScrollingInputKinds.Pen, scrollView.IgnoredInputKinds);
                    Verify.AreEqual(ScrollingContentOrientation.Horizontal, scrollView.ContentOrientation);
                    Verify.AreEqual(ScrollingChainMode.Always, scrollView.HorizontalScrollChainMode);
                    Verify.AreEqual(ScrollingChainMode.Never, scrollView.VerticalScrollChainMode);
                    Verify.AreEqual(ScrollingRailMode.Disabled, scrollView.HorizontalScrollRailMode);
                    Verify.AreEqual(ScrollingRailMode.Disabled, scrollView.VerticalScrollRailMode);
                    Verify.AreEqual(ScrollingScrollMode.Enabled, scrollView.HorizontalScrollMode);
                    Verify.AreEqual(ScrollingScrollMode.Disabled, scrollView.VerticalScrollMode);
                    Verify.AreEqual(ScrollingScrollMode.Enabled, scrollView.ComputedHorizontalScrollMode);
                    Verify.AreEqual(ScrollingScrollMode.Disabled, scrollView.ComputedVerticalScrollMode);
                    Verify.AreEqual(ScrollingZoomMode.Enabled, scrollView.ZoomMode);
                    Verify.AreEqual(ScrollingChainMode.Never, scrollView.ZoomChainMode);
                    Verify.IsGreaterThan(scrollView.MinZoomFactor, 2.0 - c_epsilon);
                    Verify.IsLessThan(scrollView.MinZoomFactor, 2.0 + c_epsilon);
                    Verify.IsGreaterThan(scrollView.MaxZoomFactor, 8.0 - c_epsilon);
                    Verify.IsLessThan(scrollView.MaxZoomFactor, 8.0 + c_epsilon);

                    Log.Comment("Resetting window content and ScrollView");
                    Content = null;
                    scrollView = null;
                });

                WaitForEvent("Waiting for Unloaded event", scrollViewUnloadedEvent);

                IdleSynchronizer.Wait();
                Log.Comment("Garbage collecting...");
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                Log.Comment("Done");
            }
        }

void VerifyVisualStates | ( | ScrollBarVisibility | scrollBarVisibility,
 |  | bool | autoHideScrollControllers |
 | ) |  |  | [inline, private]

Definition at line 255 of file ScrollViewTests.cs.

        {
            ScrollView scrollView = null;

            RunOnUIThread.Execute(() =>
            {
                m_trackScrollViewStateChanges = true;
                m_scrollViewVisualStateCounts = new ScrollViewVisualStateCounts();
                scrollView = new ScrollView();
            });

            using (ScrollViewTestHooksHelper scrollViewTestHooksHelper = new ScrollViewTestHooksHelper(scrollView, autoHideScrollControllers))
            {
                Rectangle rectangleScrollViewContent = null;
                AutoResetEvent scrollViewLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent scrollViewUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    rectangleScrollViewContent = new Rectangle();
                    scrollView.HorizontalScrollBarVisibility = scrollBarVisibility;
                    scrollView.VerticalScrollBarVisibility = scrollBarVisibility;

                    SetupDefaultUI(
                        scrollView: scrollView,
                        rectangleScrollViewContent: rectangleScrollViewContent,
                        scrollViewLoadedEvent: scrollViewLoadedEvent,
                        scrollViewUnloadedEvent: scrollViewUnloadedEvent,
                        setAsContentRoot: true,
                        useParentGrid: true);
                });

                WaitForEvent("Waiting for Loaded event", scrollViewLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    m_trackScrollViewStateChanges = false;
                    Log.Comment($"VerifyVisualStates: isEnabled:True, scrollBarVisibility:{scrollBarVisibility}, autoHideScrollControllers:{autoHideScrollControllers}");

                    VerifyVisualStates(
                        expectedMouseIndicatorStateCount: autoHideScrollControllers ? 0u : (scrollBarVisibility == ScrollBarVisibility.Auto ? 2u : 3u),
                        expectedTouchIndicatorStateCount: 0,
                        expectedNoIndicatorStateCount: autoHideScrollControllers ? (scrollBarVisibility == ScrollBarVisibility.Auto ? 2u : 3u) : 0u,
                        expectedScrollBarsSeparatorCollapsedStateCount: autoHideScrollControllers ? (scrollBarVisibility == ScrollBarVisibility.Auto ? 1u : 3u) : 0u,
                        expectedScrollBarsSeparatorCollapsedDisabledStateCount: 0,
                        expectedScrollBarsSeparatorExpandedStateCount: autoHideScrollControllers ? 0u : (scrollBarVisibility == ScrollBarVisibility.Auto ? 1u : 3u),
                        expectedScrollBarsSeparatorDisplayedWithoutAnimationStateCount: 0,
                        expectedScrollBarsSeparatorExpandedWithoutAnimationStateCount: 0,
                        expectedScrollBarsSeparatorCollapsedWithoutAnimationStateCount: 0);

                    m_scrollViewVisualStateCounts.ResetStateCounts();
                    m_trackScrollViewStateChanges = true;

                    Log.Comment("Disabling ScrollView");
                    scrollView.IsEnabled = false;
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    m_trackScrollViewStateChanges = false;
                    Log.Comment($"VerifyVisualStates: isEnabled:False, scrollBarVisibility:{scrollBarVisibility}, autoHideScrollControllers:{autoHideScrollControllers}");

                    VerifyVisualStates(
                        expectedMouseIndicatorStateCount: autoHideScrollControllers ? 0u : (scrollBarVisibility == ScrollBarVisibility.Auto ? 1u : 3u),
                        expectedTouchIndicatorStateCount: 0,
                        expectedNoIndicatorStateCount: autoHideScrollControllers ? (scrollBarVisibility == ScrollBarVisibility.Auto ? 1u : 3u) : 0u,
                        expectedScrollBarsSeparatorCollapsedStateCount: 0,
                        expectedScrollBarsSeparatorCollapsedDisabledStateCount: scrollBarVisibility == ScrollBarVisibility.Auto ? 0u : 3u,
                        expectedScrollBarsSeparatorExpandedStateCount: 0,
                        expectedScrollBarsSeparatorDisplayedWithoutAnimationStateCount: 0,
                        expectedScrollBarsSeparatorExpandedWithoutAnimationStateCount: 0,
                        expectedScrollBarsSeparatorCollapsedWithoutAnimationStateCount: 0);

                    m_scrollViewVisualStateCounts.ResetStateCounts();
                    m_trackScrollViewStateChanges = true;

                    Log.Comment("Enabling ScrollView");
                    scrollView.IsEnabled = true;
                });

                IdleSynchronizer.Wait();

                RunOnUIThread.Execute(() =>
                {
                    m_trackScrollViewStateChanges = false;
                    Log.Comment($"VerifyVisualStates: isEnabled:True, scrollBarVisibility:{scrollBarVisibility}, autoHideScrollControllers:{autoHideScrollControllers}");

                    VerifyVisualStates(
                        expectedMouseIndicatorStateCount: autoHideScrollControllers ? 0u : 3u,
                        expectedTouchIndicatorStateCount: 0,
                        expectedNoIndicatorStateCount: autoHideScrollControllers ? 3u : 0u,
                        expectedScrollBarsSeparatorCollapsedStateCount: autoHideScrollControllers ? (scrollBarVisibility == ScrollBarVisibility.Auto ? 2u : 3u) : 0u,
                        expectedScrollBarsSeparatorCollapsedDisabledStateCount: 0,
                        expectedScrollBarsSeparatorExpandedStateCount: autoHideScrollControllers ? 0u : (scrollBarVisibility == ScrollBarVisibility.Auto ? 2u : 3u),
                        expectedScrollBarsSeparatorDisplayedWithoutAnimationStateCount: 0,
                        expectedScrollBarsSeparatorExpandedWithoutAnimationStateCount: 0,
                        expectedScrollBarsSeparatorCollapsedWithoutAnimationStateCount: 0);

                    Log.Comment("Resetting window content");
                    Content = null;
                    m_scrollViewVisualStateCounts = null;
                });

                WaitForEvent("Waiting for Unloaded event", scrollViewUnloadedEvent);
            }
        }

void VerifyVisualStates ( ) [inline]

Definition at line 232 of file ScrollViewTests.cs.

        {
            UISettings settings = new UISettings();
            if (!settings.AnimationsEnabled)
            {
                Log.Warning("Test is disabled when animations are turned off.");
                return;
            }

            using (PrivateLoggingHelper privateSVLoggingHelper = new PrivateLoggingHelper("ScrollView"))
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessageForVisualStateChange;

                VerifyVisualStates(ScrollBarVisibility.Auto, autoHideScrollControllers: true);
                VerifyVisualStates(ScrollBarVisibility.Visible, autoHideScrollControllers: true);

                VerifyVisualStates(ScrollBarVisibility.Auto, autoHideScrollControllers: false);
                VerifyVisualStates(ScrollBarVisibility.Visible, autoHideScrollControllers: false);

                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessageForVisualStateChange;
            }
        }

void VerifyVisualStates | ( | uint | expectedMouseIndicatorStateCount,
 |  | uint | expectedTouchIndicatorStateCount,
 |  | uint | expectedNoIndicatorStateCount,
 |  | uint | expectedScrollBarsSeparatorCollapsedStateCount,
 |  | uint | expectedScrollBarsSeparatorCollapsedDisabledStateCount,
 |  | uint | expectedScrollBarsSeparatorExpandedStateCount,
 |  | uint | expectedScrollBarsSeparatorDisplayedWithoutAnimationStateCount,
 |  | uint | expectedScrollBarsSeparatorExpandedWithoutAnimationStateCount,
 |  | uint | expectedScrollBarsSeparatorCollapsedWithoutAnimationStateCount |
 | ) |  |  | [inline, private]

Definition at line 413 of file ScrollViewTests.cs.

        {
            Log.Comment($"expectedMouseIndicatorStateCount:{expectedMouseIndicatorStateCount}, mouseIndicatorStateCount:{m_scrollViewVisualStateCounts.MouseIndicatorStateCount}");
            Log.Comment($"expectedNoIndicatorStateCount:{expectedNoIndicatorStateCount}, noIndicatorStateCount:{m_scrollViewVisualStateCounts.NoIndicatorStateCount}");
            Log.Comment($"expectedScrollBarsSeparatorCollapsedStateCount:{expectedScrollBarsSeparatorCollapsedStateCount}, scrollBarsSeparatorCollapsedStateCount:{m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedStateCount}");
            Log.Comment($"expectedScrollBarsSeparatorCollapsedDisabledStateCount:{expectedScrollBarsSeparatorCollapsedDisabledStateCount}, scrollBarsSeparatorCollapsedDisabledStateCount:{m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedDisabledStateCount}");
            Log.Comment($"expectedScrollBarsSeparatorExpandedStateCount:{expectedScrollBarsSeparatorExpandedStateCount}, scrollBarsSeparatorExpandedStateCount:{m_scrollViewVisualStateCounts.ScrollBarsSeparatorExpandedStateCount}");

            Verify.AreEqual(expectedMouseIndicatorStateCount, m_scrollViewVisualStateCounts.MouseIndicatorStateCount, "MouseIndicatorStateCount");
            Verify.AreEqual(expectedTouchIndicatorStateCount, m_scrollViewVisualStateCounts.TouchIndicatorStateCount, "TouchIndicatorStateCount");
            Verify.AreEqual(expectedNoIndicatorStateCount, m_scrollViewVisualStateCounts.NoIndicatorStateCount, "NoIndicatorStateCount");
            Verify.AreEqual(expectedScrollBarsSeparatorCollapsedStateCount, m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedStateCount, "ScrollBarsSeparatorCollapsedStateCount");
            Verify.AreEqual(expectedScrollBarsSeparatorCollapsedDisabledStateCount, m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedDisabledStateCount, "ScrollBarsSeparatorCollapsedDisabledStateCount");
            Verify.AreEqual(expectedScrollBarsSeparatorExpandedStateCount, m_scrollViewVisualStateCounts.ScrollBarsSeparatorExpandedStateCount, "ScrollBarsSeparatorExpandedStateCount");
            Verify.AreEqual(expectedScrollBarsSeparatorDisplayedWithoutAnimationStateCount, m_scrollViewVisualStateCounts.ScrollBarsSeparatorDisplayedWithoutAnimationStateCount, "ScrollBarsSeparatorDisplayedWithoutAnimationStateCount");
            Verify.AreEqual(expectedScrollBarsSeparatorExpandedWithoutAnimationStateCount, m_scrollViewVisualStateCounts.ScrollBarsSeparatorExpandedWithoutAnimationStateCount, "ScrollBarsSeparatorExpandedWithoutAnimationStateCount");
            Verify.AreEqual(expectedScrollBarsSeparatorCollapsedWithoutAnimationStateCount, m_scrollViewVisualStateCounts.ScrollBarsSeparatorCollapsedWithoutAnimationStateCount, "ScrollBarsSeparatorCollapsedWithoutAnimationStateCount");
        }

void WaitForEvent | ( | string | logComment,
 |  | EventWaitHandle | eventWaitHandle |
 | ) |  |  | [inline, private]

Definition at line 590 of file ScrollViewTests.cs.

        {
            Log.Comment(logComment);
            if (!IsDebuggerPresent())
            {
                if (!eventWaitHandle.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration)))
                {
                    throw new Exception("Timeout expiration in WaitForEvent.");
                }
            }
            else
            {
                eventWaitHandle.WaitOne();
            }
        }

Member Data Documentation

const double c_defaultAnchorRatio = 0.0 [private]

Definition at line 57 of file ScrollViewTests.cs.

const ScrollingScrollMode c_defaultComputedHorizontalScrollMode = ScrollingScrollMode.Disabled [private]

Definition at line 48 of file ScrollViewTests.cs.

const ScrollingScrollMode c_defaultComputedVerticalScrollMode = ScrollingScrollMode.Disabled [private]

Definition at line 49 of file ScrollViewTests.cs.

const ScrollingContentOrientation c_defaultContentOrientation = ScrollingContentOrientation.Vertical [private]

Definition at line 54 of file ScrollViewTests.cs.

const ScrollingChainMode c_defaultHorizontalScrollChainMode = ScrollingChainMode.Auto [private]

Definition at line 44 of file ScrollViewTests.cs.

const ScrollingScrollMode c_defaultHorizontalScrollMode = ScrollingScrollMode.Auto [private]

Definition at line 50 of file ScrollViewTests.cs.

const ScrollingRailMode c_defaultHorizontalScrollRailMode = ScrollingRailMode.Enabled [private]

Definition at line 46 of file ScrollViewTests.cs.

const ScrollingInputKinds c_defaultIgnoredInputKinds = ScrollingInputKinds.None [private]

Definition at line 43 of file ScrollViewTests.cs.

const double c_defaultMaxZoomFactor = 10.0 [private]

Definition at line 56 of file ScrollViewTests.cs.

const double c_defaultMinZoomFactor = 0.1 [private]

Definition at line 55 of file ScrollViewTests.cs.

const double c_defaultUIScrollViewContentHeight = 600.0 [private]

Definition at line 60 of file ScrollViewTests.cs.

const double c_defaultUIScrollViewContentWidth = 1200.0 [private]

Definition at line 59 of file ScrollViewTests.cs.

const double c_defaultUIScrollViewHeight = 200.0 [private]

Definition at line 62 of file ScrollViewTests.cs.

const double c_defaultUIScrollViewWidth = 300.0 [private]

Definition at line 61 of file ScrollViewTests.cs.

const ScrollingChainMode c_defaultVerticalScrollChainMode = ScrollingChainMode.Auto [private]

Definition at line 45 of file ScrollViewTests.cs.

const ScrollingScrollMode c_defaultVerticalScrollMode = ScrollingScrollMode.Auto [private]

Definition at line 51 of file ScrollViewTests.cs.

const ScrollingRailMode c_defaultVerticalScrollRailMode = ScrollingRailMode.Enabled [private]

Definition at line 47 of file ScrollViewTests.cs.

const ScrollingChainMode c_defaultZoomChainMode = ScrollingChainMode.Auto [private]

Definition at line 52 of file ScrollViewTests.cs.

const ScrollingZoomMode c_defaultZoomMode = ScrollingZoomMode.Disabled [private]

Definition at line 53 of file ScrollViewTests.cs.

const double c_epsilon = 0.0000001 [private]

Definition at line 41 of file ScrollViewTests.cs.

const int c_MaxWaitDuration = 5000 [private]

Definition at line 40 of file ScrollViewTests.cs.

ScrollViewVisualStateCounts m_scrollViewVisualStateCounts [private]

Definition at line 65 of file ScrollViewTests.cs.

bool m_trackScrollViewStateChanges = false [private]

Definition at line 64 of file ScrollViewTests.cs.

The documentation for this class was generated from the following file:
  • ScrollView/APITests/ScrollViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewVisualStateCounts Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • ScrollViewVisualStateCounts
Public Member Functions | Properties

ScrollViewVisualStateCounts Class Reference

List of all members.

Public Member Functions

void | ResetStateCounts ()

Properties

uint | MouseIndicatorStateCount [get, set]
uint | NoIndicatorStateCount [get, set]
uint | ScrollBarsSeparatorCollapsedDisabledStateCount [get, set]
uint | ScrollBarsSeparatorCollapsedStateCount [get, set]
uint | ScrollBarsSeparatorCollapsedWithoutAnimationStateCount [get, set]
uint | ScrollBarsSeparatorDisplayedWithoutAnimationStateCount [get, set]
uint | ScrollBarsSeparatorExpandedStateCount [get, set]
uint | ScrollBarsSeparatorExpandedWithoutAnimationStateCount [get, set]
uint | TouchIndicatorStateCount [get, set]

Detailed Description

Definition at line 611 of file ScrollViewTests.cs.

Member Function Documentation

void ResetStateCounts ( ) [inline]

Definition at line 667 of file ScrollViewTests.cs.

        {
            NoIndicatorStateCount = 0;
            TouchIndicatorStateCount = 0;
            MouseIndicatorStateCount = 0;
            ScrollBarsSeparatorExpandedStateCount = 0;
            ScrollBarsSeparatorCollapsedStateCount = 0;
            ScrollBarsSeparatorCollapsedDisabledStateCount = 0;
            ScrollBarsSeparatorCollapsedWithoutAnimationStateCount = 0;
            ScrollBarsSeparatorDisplayedWithoutAnimationStateCount = 0;
            ScrollBarsSeparatorExpandedWithoutAnimationStateCount = 0;
        }

Property Documentation

uint MouseIndicatorStateCount [get, set]

Definition at line 626 of file ScrollViewTests.cs.

uint NoIndicatorStateCount [get, set]

Definition at line 614 of file ScrollViewTests.cs.

uint ScrollBarsSeparatorCollapsedDisabledStateCount [get, set]

Definition at line 644 of file ScrollViewTests.cs.

uint ScrollBarsSeparatorCollapsedStateCount [get, set]

Definition at line 638 of file ScrollViewTests.cs.

uint ScrollBarsSeparatorCollapsedWithoutAnimationStateCount [get, set]

Definition at line 650 of file ScrollViewTests.cs.

uint ScrollBarsSeparatorDisplayedWithoutAnimationStateCount [get, set]

Definition at line 656 of file ScrollViewTests.cs.

uint ScrollBarsSeparatorExpandedStateCount [get, set]

Definition at line 632 of file ScrollViewTests.cs.

uint ScrollBarsSeparatorExpandedWithoutAnimationStateCount [get, set]

Definition at line 662 of file ScrollViewTests.cs.

uint TouchIndicatorStateCount [get, set]

Definition at line 620 of file ScrollViewTests.cs.

The documentation for this class was generated from the following file:
  • ScrollView/APITests/ScrollViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SecondaryWindowLightConfiguration Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SecondaryWindowLightConfiguration
Public Member Functions | Public Attributes

SecondaryWindowLightConfiguration Class Reference

List of all members.

Public Member Functions

SecondaryWindowLightConfiguration ()
void | Dispose ()

Public Attributes

CoreApplicationView | View = null

Detailed Description

Definition at line 41 of file LightConfigurationTests.cs.

Constructor & Destructor Documentation

SecondaryWindowLightConfiguration ( ) [inline]

Definition at line 44 of file LightConfigurationTests.cs.

        {
            View = ViewHelper.MakeSecondaryView(() =>
            {
                App.CurrentWindow.Content = new Frame();
            });
        }

Member Function Documentation

void Dispose ( ) [inline]

Definition at line 52 of file LightConfigurationTests.cs.

        {
            ViewHelper.CloseSecondaryView(View);
        }

Member Data Documentation

CoreApplicationView View = null

Definition at line 43 of file LightConfigurationTests.cs.

The documentation for this class was generated from the following file:
  • Lights/ApiTests/Lights_ApiTests/LightConfigurationTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SelectorBarTests
Public Member Functions | Private Member Functions | Private Attributes

SelectorBarTests Class Reference

List of all members.

Public Member Functions

void | VerifyDefaultSelectorBarItemPropertyValues ()
void | VerifyDefaultSelectorBarPropertyValues ()
void | VerifySelectorBarItems ()

Private Member Functions

string | GetStringFromSelectorBarItem (SelectorBarItem selectorBarItem)
void | LogItemsViewProperties (ItemsView itemsView)
void | LogSelectorBarProperties (SelectorBar selectorBar)
void | SetupDefaultUI (SelectorBar selectorBar, AutoResetEvent selectorBarLoadedEvent=null, AutoResetEvent selectorBarUnloadedEvent=null, bool setAsContentRoot=true, bool useParentGrid=false)
void | WaitForEvent (string logComment, EventWaitHandle eventWaitHandle)

Private Attributes

const double | c_defaultUISelectorBarParentHeight = 200.0
const double | c_defaultUISelectorBarParentWidth = 400.0
const int | c_MaxWaitDuration = 5000

Detailed Description

Definition at line 20 of file SelectorBarTests.cs.

Member Function Documentation

string GetStringFromSelectorBarItem ( SelectorBarItem selectorBarItem ) [inline, private]

Definition at line 213 of file SelectorBarTests.cs.

        {
            return "Icon:" + (selectorBarItem.Icon == null ? "null" : selectorBarItem.Icon.ToString()) + ", Text:" + selectorBarItem.Text + ", Child:" + (selectorBarItem.Child == null ? "null" : selectorBarItem.Child.ToString());
        }

void LogItemsViewProperties ( ItemsView itemsView ) [inline, private]

Definition at line 231 of file SelectorBarTests.cs.

        {
            Log.Comment(" - itemsView.ItemTemplate: " + (itemsView.ItemTemplate == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.ItemsSource: " + (itemsView.ItemsSource == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.SelectedItem: " + (itemsView.SelectedItem == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.CurrentItemIndex: " + itemsView.CurrentItemIndex);
            Log.Comment(" - itemsView.Layout: " + (itemsView.Layout == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.Layout as StackLayout: " + ((itemsView.Layout as StackLayout) == null ? "null" : "non-null"));
            Log.Comment(" - itemsView.IsEnabled: " + itemsView.IsEnabled);
            Log.Comment(" - itemsView.IsTabStop: " + itemsView.IsTabStop);
            Log.Comment(" - itemsView.XYFocusKeyboardNavigation: " + itemsView.XYFocusKeyboardNavigation);
            Log.Comment(" - itemsView.TabNavigation: " + itemsView.TabNavigation);
            Log.Comment(" - itemsView.SelectionMode: " + itemsView.SelectionMode);
        }

void LogSelectorBarProperties ( SelectorBar selectorBar ) [inline, private]

Definition at line 218 of file SelectorBarTests.cs.

        {
            Log.Comment(" - selectorBar.SelectedItem: " + (selectorBar.SelectedItem == null ? "null" : GetStringFromSelectorBarItem(selectorBar.SelectedItem)));
            foreach (var selectorBarItem in selectorBar.Items)
            {
                Log.Comment(" - selectorBar.Item: " + GetStringFromSelectorBarItem(selectorBarItem));
            }
            Log.Comment(" - selectorBar.IsEnabled: " + selectorBar.IsEnabled);
            Log.Comment(" - selectorBar.IsTabStop: " + selectorBar.IsTabStop);
            Log.Comment(" - selectorBar.XYFocusKeyboardNavigation: " + selectorBar.XYFocusKeyboardNavigation);
            Log.Comment(" - selectorBar.TabNavigation: " + selectorBar.TabNavigation);
        }

void SetupDefaultUI | ( | SelectorBar | selectorBar,
 |  | AutoResetEvent | selectorBarLoadedEvent = null,
 |  | AutoResetEvent | selectorBarUnloadedEvent = null,
 |  | bool | setAsContentRoot = true,
 |  | bool | useParentGrid = false |
 | ) |  |  | [inline, private]

Definition at line 155 of file SelectorBarTests.cs.

        {
            Log.Comment("Setting up default UI with SelectorBar");

            Verify.IsNotNull(selectorBar);
            selectorBar.Name = "selectorBar";

            if (selectorBarLoadedEvent != null)
            {
                selectorBar.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("SelectorBar.Loaded event handler");
                    selectorBarLoadedEvent.Set();
                };
            }

            if (selectorBarUnloadedEvent != null)
            {
                selectorBar.Unloaded += (object sender, RoutedEventArgs e) =>
                {
                    Log.Comment("SelectorBar.Unloaded event handler");
                    selectorBarUnloadedEvent.Set();
                };
            }

            Grid parentGrid = null;

            if (useParentGrid)
            {
                parentGrid = new Grid();
                parentGrid.Width = c_defaultUISelectorBarParentWidth;
                parentGrid.Height = c_defaultUISelectorBarParentHeight;

                selectorBar.HorizontalAlignment = HorizontalAlignment.Left;
                selectorBar.VerticalAlignment = VerticalAlignment.Top;

                parentGrid.Children.Add(selectorBar);
            }

            if (setAsContentRoot)
            {
                Log.Comment("Setting window content");
                if (useParentGrid)
                {
                    Content = parentGrid;
                }
                else
                {
                    Content = selectorBar;
                }
            }
        }

void VerifyDefaultSelectorBarItemPropertyValues ( ) [inline]

Definition at line 28 of file SelectorBarTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectorBarItem selectorBarItem = new SelectorBarItem();
                Verify.IsNotNull(selectorBarItem);
                Verify.AreEqual("", selectorBarItem.Text);
                Verify.IsNull(selectorBarItem.Icon);
                Verify.IsNull(selectorBarItem.Child);
                Verify.IsFalse(selectorBarItem.IsSelected);
            });
        }

void VerifyDefaultSelectorBarPropertyValues ( ) [inline]

Definition at line 42 of file SelectorBarTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SelectorBar selectorBar = new SelectorBar();
                Verify.IsNotNull(selectorBar);
                Verify.IsNotNull(selectorBar.Items);
                Verify.IsNull(selectorBar.SelectedItem);
            });
        }

void VerifySelectorBarItems ( ) [inline]

Definition at line 54 of file SelectorBarTests.cs.

        {
            using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
            {
                SelectorBar selectorBar = null;
                AutoResetEvent selectorBarLoadedEvent = new AutoResetEvent(false);
                AutoResetEvent selectorBarUnloadedEvent = new AutoResetEvent(false);

                RunOnUIThread.Execute(() =>
                {
                    selectorBar = new SelectorBar();
                    Verify.IsNotNull(selectorBar);
                    Verify.IsNotNull(selectorBar.Items);

                    SelectorBarItem selectorBarItemDeleted = new SelectorBarItem()
                    {
                        Text = "Deleted",
                        Icon = new SymbolIcon(Symbol.Delete),
                        IsEnabled = false
                    };

                    selectorBar.Items.Add(selectorBarItemDeleted);

                    SelectorBarItem selectorBarItemRemote = new SelectorBarItem()
                    {
                        Text = "Remote",
                        Icon = new SymbolIcon(Symbol.Remote),
                        IsSelected = true
                    };

                    selectorBar.Items.Add(selectorBarItemRemote);

                    SelectorBarItem selectorBarItemShared = new SelectorBarItem()
                    {
                        Text = "Shared",
                        Icon = new SymbolIcon(Symbol.Share)
                    };

                    selectorBar.Items.Add(selectorBarItemShared);

                    SelectorBarItem selectorBarItemFavorites = new SelectorBarItem()
                    {
                        Text = "Favorites",
                        Icon = new SymbolIcon(Symbol.Favorite)
                    };

                    selectorBar.Items.Add(selectorBarItemFavorites);

                    Verify.AreEqual(4, selectorBar.Items.Count);

                    SetupDefaultUI(selectorBar, selectorBarLoadedEvent, selectorBarUnloadedEvent);
                });

                WaitForEvent("Waiting for Loaded event", selectorBarLoadedEvent);

                RunOnUIThread.Execute(() =>
                {
                    Log.Comment("Logging SelectorBar property values after Loaded event");
                    LogSelectorBarProperties(selectorBar);

                    Log.Comment("Verifying SelectorBar property values after Loaded event");
                    Verify.AreEqual(selectorBar.Items[1], selectorBar.SelectedItem);
                    Verify.IsTrue(selectorBar.IsEnabled);
                    Verify.IsFalse(selectorBar.IsTabStop);
                    Verify.AreEqual(XYFocusKeyboardNavigationMode.Auto, selectorBar.XYFocusKeyboardNavigation);
                    Verify.AreEqual(KeyboardNavigationMode.Once, selectorBar.TabNavigation);

                    ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);

                    Log.Comment("Logging ItemsView property values after Loaded event");
                    LogItemsViewProperties(itemsView);

                    Log.Comment("Verifying ItemsView property values after Loaded event");
                    Verify.IsNotNull(itemsView);
                    Verify.AreEqual(XYFocusKeyboardNavigationMode.Disabled, itemsView.XYFocusKeyboardNavigation);
                    Verify.AreEqual(KeyboardNavigationMode.Once, itemsView.TabNavigation);
                    Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
                    Verify.AreEqual(1, itemsView.SelectedItems.Count);
                    Verify.AreEqual(-1, itemsView.CurrentItemIndex);
                    Verify.AreEqual(selectorBar.Items[1], itemsView.SelectedItem);

                    Log.Comment("Removing 2nd SelectorBarItem.");
                    selectorBar.Items.RemoveAt(1);
                    Verify.AreEqual(3, selectorBar.Items.Count);
                    Verify.IsNull(selectorBar.SelectedItem);

                    Log.Comment("Clearing all SelectorBarItems.");
                    selectorBar.Items.Clear();
                    Verify.AreEqual(0, selectorBar.Items.Count);

                    Log.Comment("Resetting window content and SelectorBar");
                    Content = null;
                    selectorBar = null;
                });

                WaitForEvent("Waiting for Unloaded event", selectorBarUnloadedEvent);
                IdleSynchronizer.Wait();
                Log.Comment("Done");
            }
        }

void WaitForEvent | ( | string | logComment,
 |  | EventWaitHandle | eventWaitHandle |
 | ) |  |  | [inline, private]

Definition at line 246 of file SelectorBarTests.cs.

        {
            Log.Comment(logComment);
            if (!eventWaitHandle.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration)))
            {
                throw new Exception("Timeout expiration in WaitForEvent.");
            }
        }

Member Data Documentation

const double c_defaultUISelectorBarParentHeight = 200.0 [private]

Definition at line 25 of file SelectorBarTests.cs.

const double c_defaultUISelectorBarParentWidth = 400.0 [private]

Definition at line 24 of file SelectorBarTests.cs.

const int c_MaxWaitDuration = 5000 [private]

Definition at line 22 of file SelectorBarTests.cs.

The documentation for this class was generated from the following file:
  • SelectorBar/APITests/SelectorBarTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderInteractionTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SliderInteractionTests
Public Member Functions

SliderInteractionTests Class Reference

List of all members.

Public Member Functions

void | DoesAdvertiseSupportedEvents ()
void | ValidateDefaultValues ()

Detailed Description

Definition at line 23 of file SliderInteractionTests.cs.

Member Function Documentation

void DoesAdvertiseSupportedEvents ( ) [inline]

Definition at line 48 of file SliderInteractionTests.cs.

        {
            if (!ApiInformation.IsPropertyPresent("Microsoft.UI.Xaml.UIElement", "Interactions"))
            {
                Log.Warning("UIElement.Interactions not supported on this build.");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                var interaction = new SliderInteraction();
                var supportedEvents = interaction.GetSupportedEvents();

                Verify.IsGreaterThan(supportedEvents.Count, 0);
            });
        }

void ValidateDefaultValues ( ) [inline]

Definition at line 26 of file SliderInteractionTests.cs.

        {
            if (!ApiInformation.IsPropertyPresent("Microsoft.UI.Xaml.UIElement", "Interactions"))
            {
                Log.Warning("UIElement.Interactions not supported on this build.");
                return;
            }

            RunOnUIThread.Execute(() =>
            {
                var interaction = new SliderInteraction();

                Verify.AreEqual(Orientation.Horizontal, interaction.Orientation);
                Verify.AreEqual(0.0, interaction.Minimum);
                Verify.AreEqual(100.0, interaction.Maximum);
                Verify.AreEqual(0.0, interaction.Position);
                Verify.AreEqual(1.0, interaction.SmallChange);
                Verify.AreEqual(10.0, interaction.LargeChange);
            });
        }

The documentation for this class was generated from the following file:
  • Interactions/SliderInteraction/APITests/SliderInteractionTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpecialTreeView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SpecialTreeView

SpecialTreeView Class Reference

Inherits TreeView.

List of all members.

Detailed Description

Definition at line 26 of file TreeViewTests.cs.

The documentation for this class was generated from the following file:
  • TreeView/APITests/TreeViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpecialTreeViewItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SpecialTreeViewItem

SpecialTreeViewItem Class Reference

Inherits TreeViewItem.

List of all members.

Detailed Description

Definition at line 27 of file TreeViewTests.cs.

The documentation for this class was generated from the following file:
  • TreeView/APITests/TreeViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpecialTreeViewList Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SpecialTreeViewList
Protected Member Functions

SpecialTreeViewList Class Reference

Inherits TreeViewList.

List of all members.

Protected Member Functions

override DependencyObject GetContainerForItemOverride ()

Detailed Description

Definition at line 28 of file TreeViewTests.cs.

Member Function Documentation

override DependencyObject GetContainerForItemOverride ( ) [inline, protected]

Reimplemented from TreeViewList.

Definition at line 30 of file TreeViewTests.cs.

        {
            return new SpecialTreeViewItem();
        }

The documentation for this class was generated from the following file:
  • TreeView/APITests/TreeViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpecialTreeViewNode Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SpecialTreeViewNode

SpecialTreeViewNode Class Reference

Inherits TreeViewNode.

List of all members.

Detailed Description

Definition at line 35 of file TreeViewTests.cs.

The documentation for this class was generated from the following file:
  • TreeView/APITests/TreeViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SplitButtonTests
Public Member Functions

SplitButtonTests Class Reference

List of all members.

Public Member Functions

void | VerifyDefaultsAndBasicSetting ()
void | VerifyIsCheckedProperty ()

Detailed Description

Definition at line 19 of file SplitButtonTests.cs.

Member Function Documentation

void VerifyDefaultsAndBasicSetting ( ) [inline]

Definition at line 23 of file SplitButtonTests.cs.

        {
            SplitButton splitButton = null;
            Flyout flyout = null;
            TestCommand command = null;
            int parameter = 0;

            RunOnUIThread.Execute(() =>
            {
                flyout = new Flyout();
                command = new TestCommand();

                splitButton = new SplitButton();
                Verify.IsNotNull(splitButton);

                // Verify Defaults
                Verify.IsNull(splitButton.Flyout);
                Verify.IsNull(splitButton.Command);
                Verify.IsNull(splitButton.CommandParameter);

                // Verify basic setters
                splitButton.Flyout = flyout;
                splitButton.Command = command;
                splitButton.CommandParameter = parameter;
            });

            IdleSynchronizer.Wait();
            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(splitButton.Flyout, flyout);
                Verify.AreEqual(splitButton.Command, command);
                Verify.AreEqual(splitButton.CommandParameter, parameter);
            });
        }

void VerifyIsCheckedProperty ( ) [inline]

Definition at line 60 of file SplitButtonTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                ToggleSplitButton toggleSplitButton = new ToggleSplitButton();

                Verify.IsFalse(toggleSplitButton.IsChecked, "ToggleSplitButton is not unchecked");

                toggleSplitButton.SetValue(ToggleSplitButton.IsCheckedProperty, true);

                bool isChecked = (bool)toggleSplitButton.GetValue(ToggleSplitButton.IsCheckedProperty);
                Verify.IsTrue(isChecked, "ToggleSplitButton is not checked");
            });
        }

The documentation for this class was generated from the following file:
  • SplitButton/APITests/SplitButtonTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • SwipeControlTests
Public Member Functions

SwipeControlTests Class Reference

List of all members.

Public Member Functions

void | MarkupDefinedSwipeItemDoesNotCrash ()
void | SwipeControlCanOnlyBeHorizontalOrVertical ()
void | SwipeControlCanOnlyBeHorizontalOrVerticalAfterRendering ()
void | SwipeControlTest ()
void | SwipeItemsExecuteThrowsExceptionWhenMoreThanOneItemAreAdded ()
void | SwipeItemsTest ()
void | SwipeItemTest ()

Detailed Description

Definition at line 20 of file SwipeControlTests.cs.

Member Function Documentation

void MarkupDefinedSwipeItemDoesNotCrash ( ) [inline]

Definition at line 138 of file SwipeControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var rootGrid = (Microsoft.UI.Xaml.Controls.Grid)XamlReader.LoadWithInitialTemplateValidation(
                "<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> " +
                    "<GridView> " +
                        "<GridViewItem> " +
                            "<SwipeControl> " +
                                "<SwipeControl.RightItems> " +
                                    "<SwipeItems> " +
                                        "<SwipeItem " +
                                            "Background='#E81123' " +
                                            "Foreground='White' " +
                                            "Text='Remove'/> " +
                                    "</SwipeItems> " +
                                "</SwipeControl.RightItems> " +
                                "<Grid Width='200' Height='200' Background='green'/> " +
                            "</SwipeControl> " +
                        "</GridViewItem> " +
                    "</GridView> " +
                "</Grid>");

                Content = rootGrid;
                Content.UpdateLayout();
            });
        }

void SwipeControlCanOnlyBeHorizontalOrVertical ( ) [inline]

Definition at line 107 of file SwipeControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SwipeControl swipeControl = new SwipeControl();
                swipeControl.LeftItems = new SwipeItems();
                var topItems = new SwipeItems();
                topItems.Add(new SwipeItem());
                swipeControl.TopItems = topItems;
                Verify.Throws<ArgumentException>(() => { swipeControl.LeftItems.Add(new SwipeItem()); });
            });
        }

void SwipeControlCanOnlyBeHorizontalOrVerticalAfterRendering ( ) [inline]

Definition at line 121 of file SwipeControlTests.cs.

        {
            var resetEvent = new AutoResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                SwipeControl swipeControl = new SwipeControl();
                swipeControl.Loaded += (object sender, RoutedEventArgs args) => { resetEvent.Set(); };
                Content = swipeControl;
                Content.UpdateLayout();
                swipeControl.TopItems = new SwipeItems();
                swipeControl.LeftItems = new SwipeItems();
                swipeControl.LeftItems.Add(new SwipeItem());
                Verify.Throws<ArgumentException>(() => { swipeControl.TopItems.Add(new SwipeItem()); });
            });
        }

void SwipeControlTest ( ) [inline]

Definition at line 85 of file SwipeControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                SwipeControl swipeControl = new SwipeControl();
                Verify.AreEqual(swipeControl.ActualHeight, 0);
                Verify.AreEqual(swipeControl.ActualWidth, 0);
                Verify.IsNull(swipeControl.LeftItems);
                Verify.IsNull(swipeControl.RightItems);
                Verify.IsNull(swipeControl.TopItems);
                Verify.IsNull(swipeControl.BottomItems);
                swipeControl.LeftItems = new SwipeItems();
                swipeControl.RightItems = new SwipeItems();
                Content = swipeControl;
                Content.UpdateLayout();
                Verify.IsFalse(swipeControl.IsTabStop);
                Verify.IsNotNull(swipeControl.LeftItems);
                Verify.IsNotNull(swipeControl.RightItems);
            });
        }

void SwipeItemsExecuteThrowsExceptionWhenMoreThanOneItemAreAdded ( ) [inline]

Definition at line 73 of file SwipeControlTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var swipeItems = new SwipeItems();
                swipeItems.Mode = SwipeMode.Execute;
                swipeItems.Add(new SwipeItem());
                Verify.Throws<ArgumentException>(() => { swipeItems.Add(new SwipeItem()); });
            });
        }

void SwipeItemsTest ( ) [inline]

Definition at line 48 of file SwipeControlTests.cs.

        {
            SwipeItems swipeItems = null;

            RunOnUIThread.Execute(() =>
            {
                swipeItems = new SwipeItems();

                // verify the default value
                Verify.AreEqual(swipeItems.Mode, SwipeMode.Reveal);
                Verify.AreEqual(swipeItems.Count, 0);

                swipeItems.Add(new SwipeItem());
                swipeItems.Add(new SwipeItem());
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(swipeItems.Count, 2);
            });
        }

void SwipeItemTest ( ) [inline]

Definition at line 23 of file SwipeControlTests.cs.

        {
            SwipeItem swipeItem = null;
            RunOnUIThread.Execute(() =>
            {
                swipeItem = new SwipeItem();
                swipeItem.Text = "Selfie";
                swipeItem.IconSource = new FontIconSource() { Glyph = "&#xE114;" };
                swipeItem.Background = new SolidColorBrush(Microsoft.UI.Colors.Red);
                swipeItem.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Blue);
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(swipeItem.Text, "Selfie");
                Verify.IsTrue(swipeItem.IconSource is FontIconSource);
                Verify.AreEqual((swipeItem.IconSource as FontIconSource).Glyph, "&#xE114;");
                Verify.AreEqual(((SolidColorBrush)swipeItem.Background).Color, Microsoft.UI.Colors.Red);
                Verify.AreEqual(((SolidColorBrush)swipeItem.Foreground).Color, Microsoft.UI.Colors.Blue);
            });
        }

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControl_APITests/SwipeControlTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • TabViewTests
Public Member Functions | Private Member Functions | Static Private Member Functions

TabViewTests Class Reference

List of all members.

Public Member Functions

void | TabViewItemBackgroundTest ()
void | TabViewItemForegroundTest ()
void | TabViewItemHeaderTest ()
void | VerifyCompactTabWidthVisualStates_ItemsMode ()
void | VerifyCompactTabWidthVisualStates_ItemsSourceMode ()
void | VerifyTabViewItemUIABehavior ()
void | VerifyTabViewUIABehavior ()
void | VerifyTabViewWithoutTabsDoesNotCrash ()

Private Member Functions

void | VerifyCompactTabWidthVisualStates (bool isItemsSourceMode=false)

Static Private Member Functions

static TabViewItem | CreateTabViewItem (string name, Symbol icon, bool closable=true, bool enabled=true)
static TabViewItem | CreateTabViewItem (string name, bool closable=true, bool enabled=true)
static TabViewItem | CreateTabViewItem (string name, object content, bool closable=true, bool enabled=true)
static void | VerifyTabWidthVisualStates (TabView tabView, IList< object > items, bool isCompact)

Detailed Description

Definition at line 30 of file TabViewTests.cs.

Member Function Documentation

static TabViewItem CreateTabViewItem | ( | string | name,
 |  | Symbol | icon,
 |  | bool | closable = true,
 |  | bool | enabled = true |
 | ) |  |  | [inline, static, private]

Definition at line 411 of file TabViewTests.cs.

        {
            var tabViewItem = new TabViewItem();

            tabViewItem.Header = name;
            tabViewItem.IconSource = new Microsoft.UI.Xaml.Controls.SymbolIconSource() { Symbol = icon };
            tabViewItem.IsClosable = closable;
            tabViewItem.IsEnabled = enabled;

            return tabViewItem;
        }

static TabViewItem CreateTabViewItem | ( | string | name,
 |  | object | content,
 |  | bool | closable = true,
 |  | bool | enabled = true |
 | ) |  |  | [inline, static, private]

Definition at line 423 of file TabViewTests.cs.

        {
            var tabViewItem = new TabViewItem();

            tabViewItem.Header = name;
            tabViewItem.Content = content;
            tabViewItem.IsClosable = closable;
            tabViewItem.IsEnabled = enabled;

            return tabViewItem;
        }

static TabViewItem CreateTabViewItem | ( | string | name,
 |  | bool | closable = true,
 |  | bool | enabled = true |
 | ) |  |  | [inline, static, private]

Definition at line 435 of file TabViewTests.cs.

        {
            var tabViewItem = new TabViewItem();

            tabViewItem.Header = name;
            tabViewItem.IsClosable = closable;
            tabViewItem.IsEnabled = enabled;

            return tabViewItem;
        }

void TabViewItemBackgroundTest ( ) [inline]

Definition at line 228 of file TabViewTests.cs.

        {
            TabView tabView = null;
            TabViewItem tvi1 = null;
            TabViewItem tvi2 = null;
            RunOnUIThread.Execute(() =>
            {
                tabView = new TabView();

                tvi1 = CreateTabViewItem("Tab1", Symbol.Home);
                tvi2 = CreateTabViewItem("Tab2", Symbol.Document);
                tabView.TabItems.Add(tvi1);
                tabView.TabItems.Add(tvi2);

                Content = tabView;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var headerBackground = Application.Current.Resources["TabViewItemHeaderBackground"] as Brush;
                var tabContainer = tvi2.FindVisualChildByName("TabContainer") as Grid;

                // Verify that the TabViewItem we use for Background API testing is unselected.
                Verify.IsFalse(tvi2.IsSelected, "TabViewItem should have been unselected");

                Log.Comment("Verify that the default background brush is set by the [TabViewItemHeaderBackground] theme resource.");
                Verify.IsTrue(ReferenceEquals(tvi2.Background, headerBackground), "TabViewItem's default header background brush should have been [TabViewItemHeaderBackground]");
                Verify.IsTrue(ReferenceEquals(tabContainer.Background, headerBackground), "TabViewItem's [TabContainer] background brush should have been [TabViewItemHeaderBackground]");

                var testBrush = new SolidColorBrush(Colors.Blue);
                Verify.IsFalse(ReferenceEquals(testBrush, headerBackground), "Our test brush should have not been [TabViewItemHeaderBackground]");

                Log.Comment("Set the TabViewItem's background using the Background API.");
                tvi2.Background = testBrush;

                // Verify that the background brushes have been updated correctly.
                Verify.IsTrue(ReferenceEquals(tvi2.Background, testBrush), "TabViewItem's Background brush should have been [testBrush]");
                Verify.IsTrue(ReferenceEquals(tabContainer.Background, testBrush), "TabViewItem's [TabContainer] background brush should have been [testBrush]");
            });
        }

void TabViewItemForegroundTest ( ) [inline]

Definition at line 325 of file TabViewTests.cs.

        {
            TabView tabView = null;
            TabViewItem tvi1 = null;
            TabViewItem tvi2 = null;
            RunOnUIThread.Execute(() =>
            {
                tabView = new TabView();

                tvi1 = CreateTabViewItem("Tab1", Symbol.Home);
                tvi2 = CreateTabViewItem("Tab2", Symbol.Document);

                tabView.TabItems.Add(tvi1);
                tabView.TabItems.Add(tvi2);

                Content = tabView;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var iconForeground = Application.Current.Resources["TabViewItemIconForeground"] as Brush;
                var headerForeground = Application.Current.Resources["TabViewItemHeaderForeground"] as Brush;

                var iconControl = tvi2.FindVisualChildByName("IconControl") as ContentControl;
                var headerPresenter = tvi2.FindVisualChildByName("ContentPresenter") as ContentPresenter;

                // Verify that the TabViewItem we use for Foreground API testing is unselected.
                Verify.IsFalse(tvi2.IsSelected, "TabViewItem should have been unselected");

                Log.Comment("Verify that theme resource brushes are used when no foreground was set using the Foreground API.");
                Verify.IsTrue(ReferenceEquals(iconControl.Foreground, iconForeground), "TabViewItem's icon foreground brush should have been [TabViewItemIconForeground]");
                Verify.IsTrue(ReferenceEquals(headerPresenter.Foreground, headerForeground), "TabViewItem's header foreground brush should have been [TabViewItemHeaderForeground]");

                var testBrush = new SolidColorBrush(Colors.Blue);
                Verify.IsFalse(ReferenceEquals(testBrush, iconForeground), "Our test brush should have not been [TabViewItemIconForeground]");
                Verify.IsFalse(ReferenceEquals(testBrush, headerForeground), "Our test brush should have not been [TabViewItemHeaderForeground]");

                Log.Comment("Set the TabViewItem's foreground (icon + header) using the Foreground API.");
                tvi2.Foreground = testBrush;

                Verify.IsTrue(ReferenceEquals(tvi2.Foreground, testBrush), "TabViewItem's Foreground brush should have been [testBrush]");

                // Verify that the icon and header foreground brushes have been updated correctly.
                Verify.IsTrue(ReferenceEquals(iconControl.Foreground, testBrush), "TabViewItem's icon foreground brush should have been [testBrush]");
                Verify.IsTrue(ReferenceEquals(headerPresenter.Foreground, testBrush), "TabViewItem's header foreground brush should have been [testBrush]");

                Log.Comment("Unset TabViewItem.Foreground to apply the theme resource brushes again.");
                tvi2.ClearValue(Control.ForegroundProperty);

                Verify.IsTrue(ReferenceEquals(iconControl.Foreground, iconForeground), "TabViewItem's icon foreground brush should have been [TabViewItemIconForeground]");
                Verify.IsTrue(ReferenceEquals(headerPresenter.Foreground, headerForeground), "TabViewItem's header foreground brush should have been [TabViewItemHeaderForeground]");
            });
        }

void TabViewItemHeaderTest ( ) [inline]

Definition at line 274 of file TabViewTests.cs.

        {
            TabViewItem tvi0 = null;
            TabViewItem tvi1 = null;
            TabViewItem tvi2 = null;
            RunOnUIThread.Execute(() =>
            {
                var tabView = new TabView();

                tvi0 = CreateTabViewItem(null, "tab0Content");
                tvi1 = CreateTabViewItem("", "tab1Content");
                tvi2 = CreateTabViewItem("tab2", "tab2Content");

                tabView.TabItems.Add(tvi0);
                tabView.TabItems.Add(tvi1);
                tabView.TabItems.Add(tvi2);

                Content = tabView;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                // Verify headers
                var headerContentPresenter1 = VisualTreeUtils.FindVisualChildByName(tvi0, "ContentPresenter") as ContentPresenter;
                var headerContentPresenter2 = VisualTreeUtils.FindVisualChildByName(tvi1, "ContentPresenter") as ContentPresenter;
                var headerContentPresenter3 = VisualTreeUtils.FindVisualChildByName(tvi2, "ContentPresenter") as ContentPresenter;

                Verify.AreEqual(null, headerContentPresenter1.Content, "tvi0's header should have been [null]");
                Verify.AreEqual("", headerContentPresenter2.Content, "tvi1's header should have been the empty string");
                Verify.AreEqual("tab2", headerContentPresenter3.Content, "tvi2's header should have been \"tab2\"");

                // Verify ToolTips
                var toolTip0 = ToolTipService.GetToolTip(tvi0) as ToolTip;
                var toolTip1 = ToolTipService.GetToolTip(tvi1) as ToolTip;
                var toolTip2 = ToolTipService.GetToolTip(tvi2) as ToolTip;

                bool testCondition = toolTip0.IsEnabled == false && toolTip0.Content == null;
                Verify.IsTrue(testCondition, "tvi0's ToolTip should have been disabled with [null] as content");

                testCondition = toolTip1.IsEnabled == false && toolTip1.Content == null;
                Verify.IsTrue(testCondition, "tvi1's ToolTip should have been disabled with [null] as content");

                testCondition = toolTip2.IsEnabled == true && toolTip2.Content is string s && s == "tab2";
                Verify.IsTrue(testCondition, "tvi2's ToolTip should have been enabled with \"tab2\" as content");
            });
        }

void VerifyCompactTabWidthVisualStates ( bool isItemsSourceMode = false ) [inline, private]

Definition at line 44 of file TabViewTests.cs.

        {
            TabView tabView = null;
            RunOnUIThread.Execute(() =>
            {
                tabView = new TabView();
                SetupTabViewItems();

                Log.Comment("Set TabWidthMode to compact");
                tabView.TabWidthMode = TabViewWidthMode.Compact;

                Log.Comment("Select a tab. In TabWidthMode compact, a selected tab will not be in compact state. We verify that behavior in this test");
                tabView.SelectedIndex = 0;

                Content = tabView;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Verify a selected tab exists");
                VerifySelectedItem("Tab 0");

                Log.Comment("Verify the created TabView displays every tab in compact mode");
                VerifyTabWidthVisualStates(tabView, tabView.TabItems, true);

                Log.Comment("Verify that adding a new item creates a tab in compact mode");
                AddItem("Tab 3");
                Content.UpdateLayout();

                VerifyTabWidthVisualStates(tabView, new List<object>() { tabView.TabItems[tabView.TabItems.Count - 1] }, true);

                Log.Comment("Change the TabWidthMode to non compact and verify that every tab is no longer in compact mode");
                tabView.TabWidthMode = TabViewWidthMode.Equal;
                Content.UpdateLayout();

                VerifyTabWidthVisualStates(tabView, tabView.TabItems, false);

                Log.Comment("Change the TabWidthMode to compact and verify that every tab is now in compact mode");
                tabView.TabWidthMode = TabViewWidthMode.Compact;
                Content.UpdateLayout();

                VerifyTabWidthVisualStates(tabView, tabView.TabItems, true);
            });

            void SetupTabViewItems()
            {
                if (isItemsSourceMode)
                {
                    var tabItemsSource = new ObservableCollection<string>() { "Tab 0", "Tab 1", "Tab 2" };
                    tabView.TabItemsSource = tabItemsSource;
                }
                else
                {
                    tabView.TabItems.Add(CreateTabViewItem("Tab 0", Symbol.Add));
                    tabView.TabItems.Add(CreateTabViewItem("Tab 1", Symbol.AddFriend));
                    tabView.TabItems.Add(CreateTabViewItem("Tab 2"));
                }
            }

            void VerifySelectedItem(string expectedHeader)
            {
                object selectedItemHeader = isItemsSourceMode
                    ? tabView.SelectedItem
                    : (tabView.SelectedItem as TabViewItem).Header;

                Verify.AreEqual(expectedHeader, selectedItemHeader);
            }

            void AddItem(string header)
            {
                if (isItemsSourceMode)
                {
                    ((ObservableCollection<string>)tabView.TabItemsSource).Add(header);
                }
                else
                {
                    tabView.TabItems.Add(CreateTabViewItem(header));
                }
            }
        }

void VerifyCompactTabWidthVisualStates_ItemsMode ( ) [inline]

Definition at line 33 of file TabViewTests.cs.

        {
            VerifyCompactTabWidthVisualStates();
        }

void VerifyCompactTabWidthVisualStates_ItemsSourceMode ( ) [inline]

Definition at line 39 of file TabViewTests.cs.

        {
            VerifyCompactTabWidthVisualStates(isItemsSourceMode: true);
        }

void VerifyTabViewItemUIABehavior ( ) [inline]

Definition at line 152 of file TabViewTests.cs.

        {
            TabView tabView = null;

            TabViewItem tvi0 = null;
            TabViewItem tvi1 = null;
            TabViewItem tvi2 = null;
            RunOnUIThread.Execute(() =>
            {
                tabView = new TabView();
                Content = tabView;

                tvi0 = CreateTabViewItem("Item 0", Symbol.Add);
                tvi1 = CreateTabViewItem("Item 1", Symbol.AddFriend);
                tvi2 = CreateTabViewItem("Item 2");

                tabView.TabItems.Add(tvi0);
                tabView.TabItems.Add(tvi1);
                tabView.TabItems.Add(tvi2);

                tabView.SelectedIndex = 0;
                tabView.SelectedItem = tvi0;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var selectionItemProvider = GetProviderFromTVI(tvi0);
                Verify.IsTrue(selectionItemProvider.IsSelected, "Item should be selected");

                selectionItemProvider = GetProviderFromTVI(tvi1);
                Verify.IsFalse(selectionItemProvider.IsSelected, "Item should not be selected");

                Log.Comment("Change selection through automationpeer");
                selectionItemProvider.Select();
                Verify.IsTrue(selectionItemProvider.IsSelected, "Item should have been selected");

                selectionItemProvider = GetProviderFromTVI(tvi0);
                Verify.IsFalse(selectionItemProvider.IsSelected, "Item should not be selected anymore");

                Verify.IsNotNull(selectionItemProvider.SelectionContainer);
            });

            static ISelectionItemProvider GetProviderFromTVI(TabViewItem item)
            {
                var peer = FrameworkElementAutomationPeer.CreatePeerForElement(item);
                var provider = peer.GetPattern(PatternInterface.SelectionItem)
                                as ISelectionItemProvider;
                Verify.IsNotNull(provider);
                return provider;
            }
        }

void VerifyTabViewUIABehavior ( ) [inline]

Definition at line 128 of file TabViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TabView tabView = new TabView();
                Content = tabView;

                tabView.TabItems.Add(CreateTabViewItem("Item 0", Symbol.Add));
                tabView.TabItems.Add(CreateTabViewItem("Item 1", Symbol.AddFriend));
                tabView.TabItems.Add(CreateTabViewItem("Item 2"));

                Content.UpdateLayout();

                var tabViewPeer = FrameworkElementAutomationPeer.CreatePeerForElement(tabView);
                Verify.IsNotNull(tabViewPeer);
                var tabViewSelectionPattern = tabViewPeer.GetPattern(PatternInterface.Selection);
                Verify.IsNotNull(tabViewSelectionPattern);
                var selectionProvider = tabViewSelectionPattern as ISelectionProvider;
                // Tab controls must require selection
                Verify.IsTrue(selectionProvider.IsSelectionRequired);
            });
        }

void VerifyTabViewWithoutTabsDoesNotCrash ( ) [inline]

Definition at line 208 of file TabViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TabView tabView = new TabView();
                Content = tabView;

                // Creating a TabView without tabs should not crash the app.
                Content.UpdateLayout();

                var tabItemsSource = new ObservableCollection<string>() { "Tab 1", "Tab 2" };
                tabView.TabItemsSource = tabItemsSource;

                // Clearing the ItemsSource should not crash the app.
                Log.Comment("Clear the specified tab items source");
                tabItemsSource.Clear();
            });
        }

static void VerifyTabWidthVisualStates | ( | TabView | tabView,
 |  | IList< object > | items,
 |  | bool | isCompact |
 | ) |  |  | [inline, static, private]

Definition at line 382 of file TabViewTests.cs.

        {
            var listView = VisualTreeUtils.FindVisualChildByName(tabView, "TabListView") as TabViewListView;

            foreach (var item in items)
            {
                var tabItem = item is TabViewItem
                    ? (TabViewItem)item
                    : listView.ContainerFromItem(item) as TabViewItem;

                var rootGrid = VisualTreeHelper.GetChild(tabItem, 0) as FrameworkElement;

                foreach (var group in VisualStateManager.GetVisualStateGroups(rootGrid))
                {
                    if (group.Name == "TabWidthModes")
                    {
                        if (tabItem.IsSelected || !isCompact)
                        {
                            Verify.AreEqual("StandardWidth", group.CurrentState.Name, "Verify that this tab item is rendering in standard width");
                        }
                        else
                        {
                            Verify.AreEqual("Compact", group.CurrentState.Name, "Verify that this tab item is rendering in compact width");
                        }
                    }
                }
            }
        }

The documentation for this class was generated from the following file:
  • TabView/APITests/TabViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • TeachingTipTests
Public Member Functions

TeachingTipTests Class Reference

List of all members.

Public Member Functions

void | PropagatePropertiesDown ()
void | TeachingTipBackgroundTest ()
void | TeachingTipHeroContentPlacementTest ()
void | TeachingTipWithContentAndWithoutHeroContentDoesNotCrash ()
void | TeachingTipWithContentAndWithoutIconSourceDoesNotCrash ()
void | VerifySubTitleBlockVisibilityOnInitialUnset ()

Detailed Description

Definition at line 30 of file TeachingTipTests.cs.

Member Function Documentation

void PropagatePropertiesDown ( ) [inline]

Definition at line 195 of file TeachingTipTests.cs.

        {
            TextBlock content = null;
            TeachingTip tip = null;
            RunOnUIThread.Execute(() =>
            {
                content = new TextBlock() {
                    Text = "Some text"
                };

                tip = new TeachingTip() {
                    Content = content,
                    FontSize = 22,
                    Foreground = new SolidColorBrush() {
                        Color = Colors.Red
                    }
                };

                Content = tip;
                Content.UpdateLayout();
                tip.IsOpen = true;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsTrue(Math.Abs(22 - content.FontSize) < 1);
                var foregroundBrush = content.Foreground as SolidColorBrush;
                Verify.AreEqual(Colors.Red, foregroundBrush.Color);
            });
        }

void TeachingTipBackgroundTest ( ) [inline]

Definition at line 34 of file TeachingTipTests.cs.

        {
            TeachingTip teachingTip = null, teachingTipLightDismiss = null;
            SolidColorBrush blueBrush = null;
            Brush lightDismissBackgroundBrush = null;
            var loadedEvent = new AutoResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                Grid root = new Grid();
                teachingTip = new TeachingTip();
                teachingTip.Loaded += (object sender, RoutedEventArgs args) => { loadedEvent.Set(); };

                teachingTipLightDismiss = new TeachingTip();
                teachingTipLightDismiss.IsLightDismissEnabled = true;

                // Set LightDismiss background before show... it shouldn't take effect in the tree
                blueBrush = new SolidColorBrush(Microsoft.UI.Colors.Blue);
                teachingTipLightDismiss.Background = blueBrush;

                root.Resources.Add("TeachingTip", teachingTip);
                root.Resources.Add("TeachingTipLightDismiss", teachingTipLightDismiss);

                lightDismissBackgroundBrush = MUXControlsTestApp.App.Current.Resources["TeachingTipTransientBackground"] as Brush;
                Verify.IsNotNull(lightDismissBackgroundBrush, "lightDismissBackgroundBrush");

                teachingTip.IsOpen = true;
                teachingTipLightDismiss.IsOpen = true;

                MUXControlsTestApp.App.TestContentRoot = root;
            });

            IdleSynchronizer.Wait();
            loadedEvent.WaitOne();
            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                var redBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
                teachingTip.SetValue(TeachingTip.BackgroundProperty, redBrush);
                Verify.AreSame(redBrush, teachingTip.GetValue(TeachingTip.BackgroundProperty) as Brush);
                Verify.AreSame(redBrush, teachingTip.Background);

                teachingTip.Background = blueBrush;
                Verify.AreSame(blueBrush, teachingTip.Background);

                {
                    var popup = TeachingTipTestHooks.GetPopup(teachingTip);
                    var rootGrid = popup.Child;
                    var tailOcclusionGrid = VisualTreeHelper.GetChild(rootGrid, 0);
                    var contentRootGrid = VisualTreeHelper.GetChild(tailOcclusionGrid, 0);
                    Verify.AreSame(blueBrush, ((Grid)contentRootGrid).Background, "Checking TeachingTip.Background TemplateBinding works");
                }

                {
                    var popup = TeachingTipTestHooks.GetPopup(teachingTipLightDismiss);
                    var child = popup.Child as Grid;

                    Log.Comment("Checking LightDismiss TeachingTip Background is using resource for first invocation");

                    Polygon tailPolygon = VisualTreeUtils.FindVisualChildByName(child, "TailPolygon") as Polygon;
                    Grid contentRootGrid = VisualTreeUtils.FindVisualChildByName(child, "ContentRootGrid") as Grid;
                    ContentPresenter mainContentPresenter = VisualTreeUtils.FindVisualChildByName(child, "MainContentPresenter") as ContentPresenter;
                    Border heroContentBorder = VisualTreeUtils.FindVisualChildByName(child, "HeroContentBorder") as Border;

                    VerifyLightDismissTipBackground(tailPolygon.Fill, "TailPolygon");
                    VerifyLightDismissTipBackground(contentRootGrid.Background, "ContentRootGrid");
                    VerifyLightDismissTipBackground(mainContentPresenter.Background, "MainContentPresenter");
                    VerifyLightDismissTipBackground(heroContentBorder.Background, "HeroContentBorder");

                    void VerifyLightDismissTipBackground(Brush brush, string uiPart)
                    {
                        if (lightDismissBackgroundBrush != brush)
                        {
                            if (brush is SolidColorBrush actualSolidBrush)
                            {
                                string teachingTipMessage = $"LightDismiss TeachingTip's {uiPart} Background is SolidColorBrush with color {actualSolidBrush.Color}";
                                Log.Comment(teachingTipMessage);
                                Verify.Fail(teachingTipMessage);
                            }
                            else
                            {
                                Verify.AreSame(lightDismissBackgroundBrush, brush, $"Checking LightDismiss TeachingTip's {uiPart} Background is using resource for first invocation");
                            }
                        }
                    }
                }

                teachingTip.IsLightDismissEnabled = true;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(blueBrush.Color, ((SolidColorBrush)teachingTip.Background).Color);

                var popup = TeachingTipTestHooks.GetPopup(teachingTip);
                var child = popup.Child as Grid;

                Polygon tailPolygon = VisualTreeUtils.FindVisualChildByName(child, "TailPolygon") as Polygon;
                Grid contentRootGrid = VisualTreeUtils.FindVisualChildByName(child, "ContentRootGrid") as Grid;
                ContentPresenter mainContentPresenter = VisualTreeUtils.FindVisualChildByName(child, "MainContentPresenter") as ContentPresenter;
                Border heroContentBorder = VisualTreeUtils.FindVisualChildByName(child, "HeroContentBorder") as Border;

                VerifyBackgroundChanged(tailPolygon.Fill, "TailPolygon");
                VerifyBackgroundChanged(contentRootGrid.Background, "ContentRootGrid");
                VerifyBackgroundChanged(mainContentPresenter.Background, "MainContentPresenter");
                VerifyBackgroundChanged(heroContentBorder.Background, "HeroContentBorder");

                void VerifyBackgroundChanged(Brush brush, string uiPart)
                {
                    // If we can no longer cast the background brush to a solid color brush then changing the
                    // IsLightDismissEnabled has changed the background as we expected it to.
                    if (brush is SolidColorBrush solidColorBrush)
                    {
                        Verify.AreNotEqual(blueBrush.Color, solidColorBrush.Color, $"TeachingTip's {uiPart} Background should have changed");
                    }
                }
            });
        }

void TeachingTipHeroContentPlacementTest ( ) [inline]

Definition at line 254 of file TeachingTipTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                foreach (var iPlacementMode in Enum.GetValues(typeof(TeachingTipHeroContentPlacementMode)))
                {
                    var placementMode = (TeachingTipHeroContentPlacementMode)iPlacementMode;

                    Log.Comment($"Verifying TeachingTipHeroContentPlacementMode [{placementMode}]");

                    TeachingTip teachingTip = new TeachingTip();
                    teachingTip.HeroContentPlacement = placementMode;

                    // Open the teaching tip to enter the correct visual state for the HeroContentPlacement.
                    teachingTip.IsOpen = true;

                    Content = teachingTip;
                    Content.UpdateLayout();

                    Verify.IsTrue(teachingTip.HeroContentPlacement == placementMode, $"HeroContentPlacement should have been [{placementMode}]");

                    var root = VisualTreeUtils.FindVisualChildByName(teachingTip, "Container") as FrameworkElement;

                    switch (placementMode)
                    {
                        case TeachingTipHeroContentPlacementMode.Auto:
                            Verify.IsTrue(IsVisualStateActive(root, "HeroContentPlacementStates", "HeroContentTop"),
                                "The [HeroContentTop] visual state should have been active");
                            break;
                        case TeachingTipHeroContentPlacementMode.Top:
                            Verify.IsTrue(IsVisualStateActive(root, "HeroContentPlacementStates", "HeroContentTop"),
                                "The [HeroContentTop] visual state should have been active");
                            break;
                        case TeachingTipHeroContentPlacementMode.Bottom:
                            Verify.IsTrue(IsVisualStateActive(root, "HeroContentPlacementStates", "HeroContentBottom"),
                                "The [HeroContentBottom] visual state should have been active");
                            break;
                    }
                }
            });

            bool IsVisualStateActive(FrameworkElement root, string groupName, string stateName)
            {
                foreach (var group in VisualStateManager.GetVisualStateGroups(root))
                {
                    if (group.Name == groupName)
                    {
                        return group.CurrentState != null && group.CurrentState.Name == stateName;
                    }
                }

                return false;
            }
        }

void TeachingTipWithContentAndWithoutHeroContentDoesNotCrash ( ) [inline]

Definition at line 156 of file TeachingTipTests.cs.

        {
            var loadedEvent = new AutoResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                Grid contentGrid = new Grid();
                SymbolIconSource iconSource = new SymbolIconSource();
                iconSource.Symbol = Symbol.People;
                TeachingTip teachingTip = new TeachingTip();
                teachingTip.Content = contentGrid;
                teachingTip.IconSource = (IconSource)iconSource;
                teachingTip.Loaded += (object sender, RoutedEventArgs args) => { loadedEvent.Set(); };
                Content = teachingTip;
            });

            IdleSynchronizer.Wait();
            loadedEvent.WaitOne();
        }

void TeachingTipWithContentAndWithoutIconSourceDoesNotCrash ( ) [inline]

Definition at line 176 of file TeachingTipTests.cs.

        {
            var loadedEvent = new AutoResetEvent(false);
            RunOnUIThread.Execute(() =>
            {
                Grid contentGrid = new Grid();
                Grid heroGrid = new Grid();
                TeachingTip teachingTip = new TeachingTip();
                teachingTip.Content = contentGrid;
                teachingTip.HeroContent = heroGrid;
                teachingTip.Loaded += (object sender, RoutedEventArgs args) => { loadedEvent.Set(); };
                Content = teachingTip;
            });

            IdleSynchronizer.Wait();
            loadedEvent.WaitOne();
        }

void VerifySubTitleBlockVisibilityOnInitialUnset ( ) [inline]

Definition at line 230 of file TeachingTipTests.cs.

        {
            TeachingTip teachingTip = null;
            RunOnUIThread.Execute(() =>
            {
                teachingTip = new TeachingTip();
                teachingTip.IsOpen = true;
                Content = teachingTip;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual("", teachingTip.Title);
                Verify.AreEqual(Visibility.Collapsed,
                    TeachingTipTestHooks.GetTitleVisibility(teachingTip));
                Verify.AreEqual("", teachingTip.Subtitle);
                Verify.AreEqual(Visibility.Collapsed,
                    TeachingTipTestHooks.GetSubtitleVisibility(teachingTip));
            });
        }

The documentation for this class was generated from the following file:
  • TeachingTip/APITests/TeachingTipTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestCommand Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • TestCommand
Public Member Functions | Events

TestCommand Class Reference

List of all members.

Public Member Functions

TestCommand ()
bool | CanExecute (object o)
void | Execute (object o)

Events

EventHandler | CanExecuteChanged

Detailed Description

Definition at line 79 of file SplitButtonTests.cs.

Constructor & Destructor Documentation

TestCommand ( ) [inline]

Definition at line 83 of file SplitButtonTests.cs.

        {
        }

Member Function Documentation

bool CanExecute ( object o ) [inline]

Definition at line 87 of file SplitButtonTests.cs.

        {
            return true;
        }

void Execute ( object o ) [inline]

Definition at line 92 of file SplitButtonTests.cs.

{}

Event Documentation

EventHandler CanExecuteChanged

Definition at line 81 of file SplitButtonTests.cs.

The documentation for this class was generated from the following file:
  • SplitButton/APITests/SplitButtonTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • TreeViewTests
Public Member Functions | Private Member Functions

TreeViewTests Class Reference

List of all members.

Public Member Functions

ObservableCollection
< TreeViewItemSource > 		CreateTreeViewItemsSource ()
void | RemovingLastChildrenSetsIsExpandedToFalse ()
void | SelectedItemsTest ()
void | TreeViewBackgroundTest ()
void | TreeViewClearAndSetAtTest ()
void | TreeViewInheritanceTest ()
void | TreeViewItemContainerStyleTest ()
void | TreeViewItemContainerTransitionTest ()
void | TreeViewItemSourceResetRecreateItems ()
void | TreeViewItemsSourceTest ()
void | TreeViewItemsSourceUpdateTest ()
void | TreeViewItemTemplateTest ()
void | TreeViewNodeDPTest ()
void | TreeViewNodeStringableTest ()
void | TreeViewNodeTest ()
void | TreeViewPendingSelectedNodesTest ()
void | TreeViewSelectionChangedMultipleMode ()
void | TreeViewSelectionChangedSingleMode ()
void | TreeViewUpdateTest ()
void | ValidateTreeViewItemSourceChangeUpdatesChevronOpacity ()
void | VerifyClearingNodeWithNoChildren ()
void | VerifySettingSelectionDoesNotCrash ()
void | VerifyTreeViewIsNotTabStop ()
void | VerifyVisualTree ()

Private Member Functions

ObservableCollection
< TreeViewItemSource > 		CreateItems (int itemsPerLevel=3, int depth=3)
IEnumerable< TreeViewItemSource > | CreateItemsImpl (int numItems, int depth, string prefix="")
bool | IsMultiSelectCheckBoxChecked (TreeView tree, TreeViewNode node)
void | VerifySelectedNodesAndSelectedItems (TreeView treeView, string[] expected)

Detailed Description

Definition at line 38 of file TreeViewTests.cs.

Member Function Documentation

ObservableCollection<TreeViewItemSource> CreateItems | ( | int | itemsPerLevel = 3,
 |  | int | depth = 3 |
 | ) |  |  | [inline, private]

Definition at line 839 of file TreeViewTests.cs.

        {
            ObservableCollection<TreeViewItemSource> items = new ObservableCollection<TreeViewItemSource>();
            foreach (var item in CreateItemsImpl(itemsPerLevel, depth))
            {
                items.Add(item);
            }
            return items;
        }

IEnumerable<TreeViewItemSource> CreateItemsImpl | ( | int | numItems,
 |  | int | depth,
 |  | string | prefix = "" |
 | ) |  |  | [inline, private]

Definition at line 849 of file TreeViewTests.cs.

        {
            List<TreeViewItemSource> items = new List<TreeViewItemSource>();
            for (int i = 0; i < numItems; i++)
            {
                string name;
                if (string.IsNullOrEmpty(prefix))
                {
                    name = $"{i}";
                }
                else
                {
                    name = $"{prefix}.{i}";
                }
                TreeViewItemSource item = new TreeViewItemSource();
                item.Content = name;
                if (depth > 1)
                {
                    var children = CreateItemsImpl(numItems, depth - 1, name);
                    foreach (var child in children)
                    {
                        item.Children.Add(child);
                    }
                }
                items.Add(item);
            }
            return items;
        }

ObservableCollection<TreeViewItemSource> CreateTreeViewItemsSource ( ) [inline]

Definition at line 885 of file TreeViewTests.cs.

        {
            var items = new ObservableCollection<TreeViewItemSource>();
            var item1 = new TreeViewItemSource() { Content = "1" };
            var item1_1 = new TreeViewItemSource() { Content = "1.1" };
            var item2 = new TreeViewItemSource() { Content = "2" };

            item1.Children.Add(item1_1);
            items.Add(item1);
            items.Add(item2);

            return items;
        }

bool IsMultiSelectCheckBoxChecked | ( | TreeView | tree,
 |  | TreeViewNode | node |
 | ) |  |  | [inline, private]

Definition at line 878 of file TreeViewTests.cs.

        {
            var treeViewItem = tree.ContainerFromNode(node) as TreeViewItem;
            var checkBox = VisualTreeUtils.FindVisualChildByName(treeViewItem, "MultiSelectCheckBox") as CheckBox;
            return checkBox.IsChecked == true;
        }

void RemovingLastChildrenSetsIsExpandedToFalse ( ) [inline]

Definition at line 665 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeViewRoot = new TreeViewNode();
                var treeViewNode1 = new TreeViewNode();
                var treeViewNode2 = new TreeViewNode();
                var treeViewNode3 = new TreeViewNode();
                var treeViewNode4 = new TreeViewNode();
                var treeViewNode5 = new TreeViewNode();

                // Need root since in TreeView we otherwise
                // could collapse whole tree and hide it forever
                treeViewRoot.Children.Add(treeViewNode1);

                treeViewNode1.Children.Add(treeViewNode2);
                treeViewNode1.Children.Add(treeViewNode3);
                treeViewNode1.Children.Add(treeViewNode4);
                treeViewNode1.Children.Add(treeViewNode5);

                treeViewNode1.IsExpanded = true;
                Verify.IsTrue(treeViewNode1.IsExpanded);

                treeViewNode1.Children.Clear();
                Verify.IsFalse(treeViewNode1.IsExpanded);

                treeViewNode1.Children.Add(treeViewNode2);
                treeViewNode1.IsExpanded = true;
                Verify.IsTrue(treeViewNode1.IsExpanded);

                treeViewNode1.Children.Remove(treeViewNode2);
                Verify.IsFalse(treeViewNode1.IsExpanded);

                treeViewNode1.Children.Add(treeViewNode2);
                treeViewNode1.IsExpanded = true;
                Verify.IsTrue(treeViewNode1.IsExpanded);

                treeViewNode1.Children.RemoveAt(0);
                Verify.IsFalse(treeViewNode1.IsExpanded);
            });
        }

void SelectedItemsTest ( ) [inline]

Definition at line 753 of file TreeViewTests.cs.

        {
            ObservableCollection<TreeViewItemSource> data = null;
            TreeView treeview = null;

            RunOnUIThread.Execute(() =>
            {
                data = CreateItems();

                string treeViewXamlStr = @"
                <TreeView
                        xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
                        xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""
                        Name=""DessertTree""
                        SelectionMode=""Multiple""
                        ItemsSource=""{Binding}"">
                    <TreeView.ItemTemplate>
                        <DataTemplate>
                            <TreeViewItem
                                IsExpanded=""True""
                                ItemsSource=""{Binding Children}""
                                Content=""{Binding Content}""/>
                        </DataTemplate>
                    </TreeView.ItemTemplate>
                </TreeView>";

                treeview = XamlReader.Load(treeViewXamlStr) as TreeView;
                treeview.DataContext = data;

                Content = treeview;
                Content.UpdateLayout();
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Log.Comment("Add 1.1 to SelectedItems");
                treeview.SelectedItems.Add(data[1].Children[1]);
                VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2" });

                Log.Comment("Add 1.2.1 to SelectedItems");
                treeview.SelectedItems.Add(data[1].Children[2].Children[1]);
                VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2", "1.2.1" });

                Log.Comment("Add 0.2 to SelectedNodes");
                treeview.SelectedNodes.Add(treeview.RootNodes[0].Children[2]);
                VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2", "1.2.1", "0.2", "0.2.0", "0.2.1", "0.2.2" });

                Log.Comment("Remove 0.2.1 from SelectedItems");
                treeview.SelectedItems.Remove(data[0].Children[2].Children[1]);
                VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2", "1.2.1", "0.2.0", "0.2.2" });

                Log.Comment("Remove 1.1 from SelectedNodes");
                treeview.SelectedNodes.Remove(treeview.RootNodes[1].Children[1]);
                VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.2.1", "0.2.0", "0.2.2" });
            });
        }

void TreeViewBackgroundTest ( ) [inline]

Definition at line 708 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeView = new TreeView();

                Content = treeView;
                Content.UpdateLayout();

                var treeViewList = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;

                // Make sure the TreeViewList does not already have the background color we are using for this test.
                bool testCondition = treeViewList.Background is SolidColorBrush brush && brush.Color == Colors.Green;
                Verify.IsFalse(testCondition, "The default TreeView background color should not match the test color used.");

                // Check if the Background API affects the TreeView control.
                treeView.Background = new SolidColorBrush(Colors.Green);
                Content.UpdateLayout();

                testCondition = treeViewList.Background is SolidColorBrush brush2 && brush2.Color == Colors.Green;
                Verify.IsTrue(testCondition, "The TreeView background UI should have matched the specified test color.");
            });
        }

void TreeViewClearAndSetAtTest ( ) [inline]

Definition at line 99 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeView = new TreeView();

                Content = treeView;
                Content.UpdateLayout();
                var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
                // Verify TreeViewNode::SetAt
                TreeViewNode setAtChildCheckNode = new TreeViewNode() { Content = "Set At Child" };
                TreeViewNode setAtRootCheckNode = new TreeViewNode() { Content = "Set At Root" };

                TreeViewNode child1 = new TreeViewNode() { Content = "Child 1" };
                child1.Children.Add(new TreeViewNode() { Content = "Child 1:1" });

                TreeViewNode child2 = new TreeViewNode() { Content = "Child 2" };
                child2.Children.Add(new TreeViewNode() { Content = "Child 2:1" });
                child2.Children.Add(new TreeViewNode() { Content = "Child 2:2" });

                treeView.RootNodes.Add(child1);
                child1.IsExpanded = true;
                treeView.RootNodes.Add(child2);
                Verify.AreEqual(listControl.Items.Count, 3);

                // SetAt node under child node which is not expanded
                child2.Children[1] = setAtChildCheckNode;
                Verify.AreEqual(listControl.Items.Count, 3);

                // SetAt node under root node and child2 is expanded
                treeView.RootNodes[0] = setAtRootCheckNode;
                child2.IsExpanded = true;
                Verify.AreEqual(listControl.Items.Count, 4);

                // Verify RootNode.Clear
                treeView.RootNodes.Clear();
                Verify.AreEqual(listControl.Items.Count, 0);

                // test clear without any child node
                treeView.RootNodes.Clear();
                Verify.AreEqual(listControl.Items.Count, 0);
            });
        }

void TreeViewInheritanceTest ( ) [inline]

Definition at line 229 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                StackPanel stackPanel = new StackPanel();
                SpecialTreeView inheritedTreeView = new SpecialTreeView();
                SpecialTreeViewList inheritedTreeViewList = new SpecialTreeViewList();
                SpecialTreeViewItem inheritedTreeViewItem = new SpecialTreeViewItem();
                SpecialTreeViewNode inheritedTreeViewNode = new SpecialTreeViewNode();
                IList<string> data = Enumerable.Range(0, 5).Select(x => "Item " + x).ToList();

                Verify.IsNotNull(stackPanel);
                stackPanel.Children.Add(inheritedTreeView);
                stackPanel.Children.Add(inheritedTreeViewList);
                inheritedTreeViewList.ItemsSource = data;
                Content = stackPanel;
                Content.UpdateLayout();
            });
        }

void TreeViewItemContainerStyleTest ( ) [inline]

Definition at line 355 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TreeView treeView = new TreeView();
                treeView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    var style = (Style)XamlReader.Load(
                   @"<Style xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                          <Setter Property='Background' Value='Green'/>
                      </Style>");
                    treeView.ItemContainerStyle = style;
                    var node = new TreeViewNode();
                    treeView.RootNodes.Add(node);
                    var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
                    var treeViewItem = listControl.ContainerFromItem(node) as TreeViewItem;
                    Verify.AreEqual(treeViewItem.Style, style);
                };
            });
        }

void TreeViewItemContainerTransitionTest ( ) [inline]

Definition at line 377 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TreeView treeView = new TreeView();
                treeView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    var transition = (TransitionCollection)XamlReader.Load(
                   @"<TransitionCollection xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                            <ContentThemeTransition />
                      </TransitionCollection>");
                    treeView.ItemContainerTransitions = transition;
                    var node = new TreeViewNode();
                    treeView.RootNodes.Add(node);
                    var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
                    var treeViewItem = listControl.ContainerFromItem(node) as TreeViewItem;
                    Verify.AreEqual(treeViewItem.ContentTransitions, transition);
                };
            });
        }

void TreeViewItemSourceResetRecreateItems ( ) [inline]

Definition at line 144 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {

                ExtendedObservableCollection<TreeViewItemSource> items
                    = new ExtendedObservableCollection<TreeViewItemSource>();
                TreeViewItemSource item1 = new TreeViewItemSource() { Content = "item1" };
                TreeViewItemSource item2 = new TreeViewItemSource() { Content = "item2" };
                TreeViewItemSource item3 = new TreeViewItemSource() { Content = "item3" };
                items.Add(item1);
                items.Add(item2);
                items.Add(item3);

                var treeView = new TreeView();
                treeView.ItemsSource = items;

                Verify.AreEqual(treeView.RootNodes.Count, 3);
                Verify.AreEqual(treeView.RootNodes[0].Content as TreeViewItemSource, items[0]);

                List<TreeViewItemSource> newItems = new List<TreeViewItemSource>();
                TreeViewItemSource item4 = new TreeViewItemSource() { Content = "item4" };
                TreeViewItemSource item5 = new TreeViewItemSource() { Content = "item5" };

                newItems.Add(item4);
                newItems.Add(item5);

                items.ReplaceAll(newItems);

                Verify.AreEqual(treeView.RootNodes.Count, 2);
                Verify.AreEqual(treeView.RootNodes[0].Content as TreeViewItemSource, items[0]);

            });
        }

void TreeViewItemsSourceTest ( ) [inline]

Definition at line 399 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeView = new TreeView();
                var items = CreateTreeViewItemsSource();
                treeView.ItemsSource = items;

                Verify.AreEqual(treeView.RootNodes.Count, 2);
                Verify.AreEqual(treeView.RootNodes[0].Content as TreeViewItemSource, items[0]);
            });
        }

void TreeViewItemsSourceUpdateTest ( ) [inline]

Definition at line 413 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeView = new TreeView();
                var items = CreateTreeViewItemsSource();
                treeView.ItemsSource = items;

                // Insert
                var newItem = new TreeViewItemSource() { Content = "newItem" };
                items.Add(newItem);
                Verify.AreEqual(treeView.RootNodes.Count, 3);
                var itemFromNode = treeView.RootNodes[2].Content as TreeViewItemSource;
                Verify.AreEqual(newItem.Content, itemFromNode.Content);

                // Remove
                items.Remove(newItem);
                Verify.AreEqual(treeView.RootNodes.Count, 2);

                // Replace
                var item3 = new TreeViewItemSource() { Content = "3" };
                items[1] = item3;
                itemFromNode = treeView.RootNodes[1].Content as TreeViewItemSource;
                Verify.AreEqual(item3.Content, itemFromNode.Content);

                // Clear
                items.Clear();
                Verify.AreEqual(treeView.RootNodes.Count, 0);

            });
        }

void TreeViewItemTemplateTest ( ) [inline]

Definition at line 314 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TreeView treeView = new TreeView();
                treeView.Loaded += (object sender, RoutedEventArgs e) =>
                {
                    var dataTemplate = (DataTemplate)XamlReader.Load(
                   @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                          <TextBlock Text='TreeViewItemTemplate'/>
                      </DataTemplate>");
                    treeView.ItemTemplate = dataTemplate;
                    var node = new TreeViewNode();
                    treeView.RootNodes.Add(node);
                    var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
                    var treeViewItem = listControl.ContainerFromItem(node) as TreeViewItem;
                    Verify.AreEqual(treeViewItem.ContentTemplate, dataTemplate);
                };
            });
        }

void TreeViewNodeDPTest ( ) [inline]

Definition at line 290 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TreeViewNode rootNode = new TreeViewNode() { Content = "Root" };
                TreeViewNode childNode = new TreeViewNode() { Content = "Child" };
                rootNode.Children.Add(childNode);
                rootNode.IsExpanded = true;

                Verify.AreEqual((string)rootNode.GetValue(TreeViewNode.ContentProperty), "Root");
                Verify.AreEqual((string)childNode.GetValue(TreeViewNode.ContentProperty), "Child");

                Verify.AreEqual((int)rootNode.GetValue(TreeViewNode.DepthProperty), -1);
                Verify.AreEqual((int)childNode.GetValue(TreeViewNode.DepthProperty), 0);

                Verify.AreEqual((bool)rootNode.GetValue(TreeViewNode.IsExpandedProperty), true);
                Verify.AreEqual((bool)childNode.GetValue(TreeViewNode.IsExpandedProperty), false);

                Verify.AreEqual((bool)rootNode.GetValue(TreeViewNode.HasChildrenProperty), true);
                Verify.AreEqual((bool)childNode.GetValue(TreeViewNode.HasChildrenProperty), false);
            });
        }

void TreeViewNodeStringableTest ( ) [inline]

Definition at line 447 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var node = new TreeViewNode() { Content = "Node" };
                Verify.AreEqual(node.Content, node.ToString());

                // Test inherited type
                var node2 = new TreeViewNode2() { Content = "Inherited from TreeViewNode" };
                Verify.AreEqual(node2.Content, node2.ToString());
            });
        }

void TreeViewNodeTest ( ) [inline]

Definition at line 41 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TreeViewNode treeViewNode1 = new TreeViewNode();
                TreeViewNode treeViewNode2 = new TreeViewNode();
                TreeViewNode treeViewNode3 = new TreeViewNode();

                Verify.AreEqual(false, treeViewNode1.HasChildren);
                Verify.AreEqual(false, (bool)treeViewNode1.GetValue(TreeViewNode.HasChildrenProperty));

                //Test adding a single TreeViewNode
                treeViewNode1.Children.Add(treeViewNode2);

                Verify.AreEqual(treeViewNode2.Parent, treeViewNode1);
                Verify.AreEqual(treeViewNode1.Children.Count, 1);
                Verify.AreEqual(treeViewNode1.Children[0], treeViewNode2);
                Verify.AreEqual(treeViewNode1.IsExpanded, false);
                Verify.AreEqual(treeViewNode2.Depth, 0);

                //Test removing a single TreeViweNode
                treeViewNode1.Children.RemoveAt(0);

                Verify.IsNull(treeViewNode2.Parent);
                Verify.AreEqual(treeViewNode1.Children.Count, 0);
                Verify.AreEqual(treeViewNode2.Depth, -1);

                //Test insert multiple TreeViewNodes
                treeViewNode1.Children.Insert(0, treeViewNode2);
                treeViewNode1.Children.Insert(0, treeViewNode3);

                Verify.AreEqual(treeViewNode1.Children.Count, 2);

                Verify.AreEqual(treeViewNode1.Children[0], treeViewNode3);
                Verify.AreEqual(treeViewNode3.Depth, 0);
                Verify.AreEqual(treeViewNode3.Parent, treeViewNode1);

                Verify.AreEqual(treeViewNode1.Children[1], treeViewNode2);
                Verify.AreEqual(treeViewNode2.Depth, 0);
                Verify.AreEqual(treeViewNode2.Parent, treeViewNode1);

                //Test remove multiple TreeViewNodes
                treeViewNode1.Children.RemoveAt(0);

                Verify.AreEqual(treeViewNode1.Children[0], treeViewNode2);
                Verify.AreEqual(treeViewNode1.Children.Count, 1);
                Verify.IsNull(treeViewNode3.Parent);
                Verify.AreEqual(treeViewNode3.Depth, -1);

                treeViewNode1.Children.RemoveAt(0);

                Verify.AreEqual(treeViewNode1.Children.Count, 0);
                Verify.IsNull(treeViewNode2.Parent);
                Verify.AreEqual(treeViewNode2.Depth, -1);
            });
        }

void TreeViewPendingSelectedNodesTest ( ) [inline]

Definition at line 461 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeView = new TreeView();
                treeView.SelectionMode = TreeViewSelectionMode.Multiple;

                var node1 = new TreeViewNode() { Content = "Node1" };
                var node2 = new TreeViewNode() { Content = "Node2" };
                treeView.RootNodes.Add(node1);
                treeView.RootNodes.Add(node2);
                treeView.SelectedNodes.Add(node1);

                Content = treeView;
                Content.UpdateLayout();
                Verify.AreEqual(true, IsMultiSelectCheckBoxChecked(treeView, node1));
                Verify.AreEqual(false, IsMultiSelectCheckBoxChecked(treeView, node2));
            });
        }

void TreeViewSelectionChangedMultipleMode ( ) [inline]

Definition at line 560 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                // input data:
                // - 1
                //   - 11
                //   - 12
                //   - 13
                // - 2
                //   - 21
                // - 3
                TreeViewSelectionChangedEventArgs selectionChangedEventArgs = null;

                var treeView = new TreeView { SelectionMode = TreeViewSelectionMode.Multiple };
                treeView.SelectionChanged += (s, e) =>
                {
                    selectionChangedEventArgs = e;
                };

                var node1 = new TreeViewNode { Content = "1", IsExpanded = true };
                var node11 = new TreeViewNode { Content = "11" };
                var node12 = new TreeViewNode { Content = "12" };
                var node13 = new TreeViewNode { Content = "13" };
                node1.Children.Add(node11);
                node1.Children.Add(node12);
                node1.Children.Add(node13);

                var node2 = new TreeViewNode { Content = "2", IsExpanded = true };
                var node21 = new TreeViewNode { Content = "21" };
                node2.Children.Add(node21);

                var node3 = new TreeViewNode { Content = "3" };

                treeView.RootNodes.Add(node1);
                treeView.RootNodes.Add(node2);
                treeView.RootNodes.Add(node3);
                Content = treeView;
                Content.UpdateLayout();

                var tvi1 = (TreeViewItem)treeView.ContainerFromItem(node1);
                var tvi11 = (TreeViewItem)treeView.ContainerFromItem(node11);
                var tvi12 = (TreeViewItem)treeView.ContainerFromItem(node12);
                var tvi13 = (TreeViewItem)treeView.ContainerFromItem(node13);
                var tvi2 = (TreeViewItem)treeView.ContainerFromItem(node2);
                var tvi21 = (TreeViewItem)treeView.ContainerFromItem(node21);
                var tvi3 = (TreeViewItem)treeView.ContainerFromItem(node3);

                // - 1         selected
                //   - 11      selected
                //   - 12      selected
                //   - 13      selected
                // - 2
                //   - 21
                // - 3
                tvi1.IsSelected = true;

                Verify.IsNotNull(selectionChangedEventArgs);
                Verify.AreEqual(4, selectionChangedEventArgs.AddedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node1));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node11));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node12));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node13));
                Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
                selectionChangedEventArgs = null;

                // - 1         selected
                //   - 11
                //   - 12      selected
                //   - 13      selected
                // - 2
                //   - 21
                // - 3
                tvi11.IsSelected = true;
                tvi11.IsSelected = false;

                Verify.IsNotNull(selectionChangedEventArgs);
                Verify.AreEqual(0, selectionChangedEventArgs.AddedItems.Count);
                Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(node11));
                selectionChangedEventArgs = null;

                // - 1         selected
                //   - 11      selected
                //   - 12      selected
                //   - 13      selected
                // - 2         selected
                //   - 21      selected
                // - 3         selected
                treeView.SelectAll();
                Verify.IsNotNull(selectionChangedEventArgs);
                var items = selectionChangedEventArgs.AddedItems.ToList();
                Verify.AreEqual(7, selectionChangedEventArgs.AddedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node1));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node11));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node12));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node13));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node2));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node21));
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node3));
                Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
            });
        }

void TreeViewSelectionChangedSingleMode ( ) [inline]

Definition at line 497 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                // input data:
                // - 1
                // - 2
                // - 3
                TreeViewSelectionChangedEventArgs selectionChangedEventArgs = null;

                var treeView = new TreeView { SelectionMode = TreeViewSelectionMode.Single };
                treeView.SelectionChanged += (s, e1) => selectionChangedEventArgs = e1;

                var collection = new ObservableCollection<int> { 1, 2, 3 };
                treeView.ItemsSource = collection;
                Content = treeView;
                Content.UpdateLayout();
                var tvi1 = (TreeViewItem)treeView.ContainerFromItem(1);
                var tvi2 = (TreeViewItem)treeView.ContainerFromItem(2);

                tvi1.IsSelected = true;

                Verify.IsNotNull(selectionChangedEventArgs);
                Verify.AreEqual(1, selectionChangedEventArgs.AddedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(1));
                Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
                selectionChangedEventArgs = null;

                tvi2.IsSelected = true;

                Verify.IsNotNull(selectionChangedEventArgs);
                Verify.AreEqual(1, selectionChangedEventArgs.AddedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(2));
                Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(1));
                selectionChangedEventArgs = null;

                tvi2.IsSelected = false;

                Verify.IsNotNull(selectionChangedEventArgs);
                Verify.AreEqual(0, selectionChangedEventArgs.AddedItems.Count);
                Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(2));
                selectionChangedEventArgs = null;

                tvi1.IsSelected = true;

                Verify.IsNotNull(selectionChangedEventArgs);
                Verify.AreEqual(1, selectionChangedEventArgs.AddedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(1));
                Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
                selectionChangedEventArgs = null;

                treeView.ItemsSource = null;

                Verify.IsNotNull(selectionChangedEventArgs);
                Verify.AreEqual(0, selectionChangedEventArgs.AddedItems.Count);
                Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
                Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(1));
            });
        }

void TreeViewUpdateTest ( ) [inline]

Definition at line 181 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeViewNode1 = new TreeViewNode();
                var treeViewNode2 = new TreeViewNode();
                var treeViewNode3 = new TreeViewNode();
                var treeViewNode4 = new TreeViewNode();
                var treeViewNode5 = new TreeViewNode();

                treeViewNode1.Children.Add(treeViewNode2);
                treeViewNode1.Children.Add(treeViewNode3);
                treeViewNode1.Children.Add(treeViewNode4);
                treeViewNode1.Children.Add(treeViewNode5);

                var treeView = new TreeView();
                Content = treeView;
                Content.UpdateLayout();
                var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
                treeView.RootNodes.Add(treeViewNode1);
                Verify.AreEqual(listControl.Items.Count, 1);

                treeView.Expand(treeViewNode1);
                Verify.AreEqual(listControl.Items.Count, 5);

                treeViewNode1.Children.RemoveAt(2);
                Verify.AreEqual(listControl.Items.Count, 4);
                Verify.AreEqual(listControl.Items[0], treeViewNode1);
                Verify.AreEqual(listControl.Items[1], treeViewNode2);
                Verify.AreEqual(listControl.Items[2], treeViewNode3);
                Verify.AreEqual(listControl.Items[3], treeViewNode5);

                treeViewNode1.Children.Insert(1, treeViewNode4);
                Verify.AreEqual(listControl.Items.Count, 5);
                Verify.AreEqual(listControl.Items[0], treeViewNode1);
                Verify.AreEqual(listControl.Items[1], treeViewNode2);
                Verify.AreEqual(listControl.Items[2], treeViewNode4);
                Verify.AreEqual(listControl.Items[3], treeViewNode3);
                Verify.AreEqual(listControl.Items[4], treeViewNode5);

                treeViewNode1.Children.Clear();
                Verify.AreEqual(listControl.Items.Count, 1);
                Verify.AreEqual(listControl.Items[0], treeViewNode1);
            });
        }

void ValidateTreeViewItemSourceChangeUpdatesChevronOpacity ( ) [inline]

Definition at line 336 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeView = new TreeView();
                var collection = new ObservableCollection<int>();
                collection.Add(5);
                treeView.ItemsSource = collection;
                Content = treeView;
                Content.UpdateLayout();
                var tvi = (TreeViewItem)treeView.ContainerFromItem(5);
                Verify.AreEqual(tvi.GlyphOpacity, 0.0);
                tvi.ItemsSource = collection;
                Content.UpdateLayout();
                Verify.AreEqual(tvi.GlyphOpacity, 1.0);
            });
        }

void VerifyClearingNodeWithNoChildren ( ) [inline]

Definition at line 262 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeViewNode1 = new TreeViewNode();
                var treeView = new TreeView();

                Content = treeView;
                Content.UpdateLayout();
                var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
                treeView.RootNodes.Add(treeViewNode1);
                var children = (treeViewNode1.Children as IObservableVector<TreeViewNode>);
                children.VectorChanged += (vector, args) =>
                {
                    if (((IVectorChangedEventArgs)args).CollectionChange == CollectionChange.Reset)
                    {
                        // should not reset if there are not children items
                        throw new InvalidOperationException();
                    }
                };
                Verify.AreEqual(listControl.Items.Count, 1);

                // this should no-op and not crash
                treeViewNode1.Children.Clear();
            });
        }

void VerifySelectedNodesAndSelectedItems | ( | TreeView | treeView,
 |  | string[] | expected |
 | ) |  |  | [inline, private]

Definition at line 812 of file TreeViewTests.cs.

        {
            var expectedStr = String.Join(", ", expected);
            var actualNodesStr = String.Join(", ", treeView.SelectedNodes.Select(node => (node.Content as TreeViewItemSource)?.Content));
            var actualItemsStr = String.Join(", ", treeView.SelectedItems.Select(item => (item as TreeViewItemSource)?.Content));

            Log.Comment($"Verify SelectedItems and SelectedNodes of TreeView. Expected: [{expectedStr}], Actual Nodes: [{actualNodesStr}], ActualItems: [{actualItemsStr}]");

            Log.Comment($"Verify TreeView.SelectedNodes");
            Verify.AreEqual(expected.Length, treeView.SelectedNodes.Count, "Verify TreeView SelectedNodes count");
            for(int i=0; i<expected.Length; i++)
            {
                var nodeContent = treeView.SelectedNodes[i].Content as TreeViewItemSource;
                Verify.IsNotNull(nodeContent);
                Verify.AreEqual(expected[i], nodeContent.Content, $"Verify TreeView SelectedNodes[{i}]");
            }

            Log.Comment($"Verify TreeView.SelectedItems");
            Verify.AreEqual(expected.Length, treeView.SelectedItems.Count, "Verify TreeView SelectedItems count");
            for (int i = 0; i < expected.Length; i++)
            {
                var selectedItem = treeView.SelectedItems[i] as TreeViewItemSource;
                Verify.IsNotNull(selectedItem);
                Verify.AreEqual(expected[i], selectedItem.Content, $"Verify TreeView SelectedItems[{i}]");
            }
        }

void VerifySettingSelectionDoesNotCrash ( ) [inline]

Definition at line 733 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeview = new TreeView();

                var items = new ObservableCollection<string>() {
                    "Item0", "Item1", "Item2"
                };

                treeview.SelectedItem = items[0];
                Verify.AreEqual(treeview.SelectedItem, items[0]);

                treeview.ItemsSource = items;
                treeview.SelectedItem = items[1];
                Verify.AreEqual(treeview.SelectedItem, items[1]);
            });
        }

void VerifyTreeViewIsNotTabStop ( ) [inline]

Definition at line 250 of file TreeViewTests.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                var treeView = new TreeView();
                Content = treeView;
                Content.UpdateLayout();
                Verify.IsFalse(treeView.IsTabStop);
            });
        }

void VerifyVisualTree ( ) [inline]

Definition at line 482 of file TreeViewTests.cs.

        {
            TreeView treeView = null;
            RunOnUIThread.Execute(() =>
            {
                treeView = new TreeView() { Width = 400, Height = 400 };
                var node1 = new TreeViewNode() { Content = "Node1" };
                treeView.RootNodes.Add(node1);
            });
            TestUtilities.SetAsVisualTreeRoot(treeView);

            VisualTreeTestHelper.VerifyVisualTree(root: treeView, verificationFileNamePrefix: "TreeView");
        }

The documentation for this class was generated from the following file:
  • TreeView/APITests/TreeViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • TwoPaneViewTests
Public Member Functions | Private Attributes

TwoPaneViewTests Class Reference

List of all members.

Public Member Functions

void | VerifyDefaultsAndBasicSetting ()

Private Attributes

const double | c_defaultMinTallModeHeight = 641.0
const double | c_defaultMinWideModeWidth = 641.0

Detailed Description

Definition at line 27 of file TwoPaneViewTests.cs.

Member Function Documentation

void VerifyDefaultsAndBasicSetting ( ) [inline]

Definition at line 34 of file TwoPaneViewTests.cs.

        {
            TwoPaneView twoPaneView = null;
            UIElement pane1 = null;
            UIElement pane2 = null;

            RunOnUIThread.Execute(() =>
            {
                pane1 = new Grid();
                pane2 = new Grid();

                twoPaneView = new TwoPaneView();
                Verify.IsNotNull(twoPaneView);

                // Verify Defaults
                Verify.IsNull(twoPaneView.Pane1);
                Verify.IsNull(twoPaneView.Pane2);
                Verify.AreEqual(TwoPaneViewPriority.Pane1, twoPaneView.PanePriority);
                Verify.AreEqual(TwoPaneViewMode.SinglePane, twoPaneView.Mode);
                Verify.AreEqual(TwoPaneViewWideModeConfiguration.LeftRight, twoPaneView.WideModeConfiguration);
                Verify.AreEqual(TwoPaneViewTallModeConfiguration.TopBottom, twoPaneView.TallModeConfiguration);
                Verify.AreEqual(c_defaultMinWideModeWidth, twoPaneView.MinWideModeWidth);
                Verify.AreEqual(c_defaultMinTallModeHeight, twoPaneView.MinTallModeHeight);

                // Verify basic setters
                twoPaneView.Pane1 = pane1;
                twoPaneView.Pane2 = pane2;
                twoPaneView.PanePriority = TwoPaneViewPriority.Pane2;
                twoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.RightLeft;
                twoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.BottomTop;
                twoPaneView.MinWideModeWidth = 500;
                twoPaneView.MinTallModeHeight = 700;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.AreEqual(pane1, twoPaneView.Pane1);
                Verify.AreEqual(pane2, twoPaneView.Pane2);
                Verify.AreEqual(TwoPaneViewPriority.Pane2, twoPaneView.PanePriority);
                Verify.AreEqual(TwoPaneViewWideModeConfiguration.RightLeft, twoPaneView.WideModeConfiguration);
                Verify.AreEqual(TwoPaneViewTallModeConfiguration.BottomTop, twoPaneView.TallModeConfiguration);
                Verify.AreEqual(500, twoPaneView.MinWideModeWidth);
                Verify.AreEqual(700, twoPaneView.MinTallModeHeight);

                // Verify nullable values
                twoPaneView.Pane1 = null;
                twoPaneView.Pane2 = null;
            });

            IdleSynchronizer.Wait();

            RunOnUIThread.Execute(() =>
            {
                Verify.IsNull(twoPaneView.Pane1);
                Verify.IsNull(twoPaneView.Pane2);
            });
        }

Member Data Documentation

const double c_defaultMinTallModeHeight = 641.0 [private]

Definition at line 30 of file TwoPaneViewTests.cs.

const double c_defaultMinWideModeWidth = 641.0 [private]

Definition at line 29 of file TwoPaneViewTests.cs.

The documentation for this class was generated from the following file:
  • TwoPaneView/APITests/TwoPaneViewTests.cs
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • AcrylicBrushTests
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

AcrylicBrushTests Class Reference

List of all members.

Public Member Functions

void | AcrylicAlwaysUseFallback ()
void | AcrylicCreatedInFallbackMode ()
void | AcrylicFromMarkup ()
void | AcrylicNoiseCache ()
void | AcrylicPropertyChanges ()
void | AcrylicRendering ()
void | AcrylicRendering_AcrylicOnComplexTransparentBG ()
void | AcrylicRendering_LuminosityBlend ()
void | BasicAcrylicOnRectangle ()
void | TestCleanup ()
void | TintTransitionDuration ()
void | VerifyAcrylicBrushEffect ()
void | VerifyDisconnectedState ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ChooseFromComboBox (string textBoxName, string text)
bool | IsUsingAcrylicBrush ()
void | LogBrushSate ()
void | LogResult (Edit result, string stateName)

Private Attributes

const string | AcrylicRectangleName = "Rectangle1"
const string | SizeSliderName = "SizeSlider"
const string | TintOpacitySliderName = "TintOpacity"

Detailed Description

Definition at line 26 of file AcrylicBrushTests.cs.

Member Function Documentation

void AcrylicAlwaysUseFallback ( ) [inline]

Definition at line 107 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "AcrylicAlwaysUseFallback");

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();

                    waiter.Wait();
                }

                if (result.Value.Equals("AcrylicAlwaysUseFallback: Skipped"))
                {
                    Log.Error("Error: FallbackBrush in use - expecting effect brush");
                    return;
                }

                Verify.AreEqual(result.Value, "AcrylicAlwaysUseFallback: Passed");
            }
        }

void AcrylicCreatedInFallbackMode ( ) [inline]

Definition at line 134 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "AcrylicCreatedInFallbackMode");

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();
                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "AcrylicCreatedInFallbackMode: Passed");
            }
        }

void AcrylicFromMarkup ( ) [inline]

Definition at line 181 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToMarkupAcrylic" }))
            {
                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();

                    if (result.Value.Equals("AcrylicFromMarkup: Skipped"))
                    {
                        Log.Error("Error: FallbackBrush in use - expecting effect brush");
                        return;
                    }

                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "AcrylicFromMarkup: Passed");
            }
        }

void AcrylicNoiseCache ( ) [inline]

Definition at line 250 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "AcrylicNoiseCache");

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();
                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "AcrylicNoiseCache: Passed");
            }
        }

void AcrylicPropertyChanges ( ) [inline]

Definition at line 86 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "AcrylicPropertyChanges");

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();
                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "AcrylicPropertyChanges: Passed");
            }
        }

void AcrylicRendering ( ) [inline]

Definition at line 206 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToRenderingAcrylic" }))
            {
                CheckBox cbComplexBackground = new CheckBox(FindElement.ById("cbComplexBackground"));
                cbComplexBackground.Uncheck();

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();

                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "AcrylicRendering: Passed");
            }
        }

void AcrylicRendering_AcrylicOnComplexTransparentBG ( ) [inline]

Definition at line 320 of file AcrylicBrushTests.cs.

        {
            // Bug 39932644: Verify that Acrylic renders properly even if its background includes transparency.
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToRenderingAcrylic" }))
            {
                CheckBox cbComplexBackground = new CheckBox(FindElement.ById("cbComplexBackground"));
                cbComplexBackground.Check();

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();

                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "AcrylicOnComplexTransparentBG: Passed");
            }
        }

void AcrylicRendering_LuminosityBlend ( ) [inline]

Definition at line 290 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToRenderingAcrylic" }))
            {
                CheckBox cbComplexBackground = new CheckBox(FindElement.ById("cbComplexBackground"));
                cbComplexBackground.Uncheck();

                var result = new Edit(FindElement.ById("TestResult"));

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button setLuminosityBlendButton = new Button(FindElement.ById("SetLuminosityButton"));
                    setLuminosityBlendButton.Invoke();

                    waiter.Wait();
                }
                LogResult(result, "SetLuminosityBlend");

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button unsetLuminosityBlendButton = new Button(FindElement.ById("UnsetLuminosityButton"));
                    unsetLuminosityBlendButton.Invoke();

                    waiter.Wait();
                }
                LogResult(result, "ClearLuminosityBlend");
            }
        }

void BasicAcrylicOnRectangle ( ) [inline]

Definition at line 66 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "BasicAcrylicOnRectangle");

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();
                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "BasicAcrylicOnRectangle: Passed");
            }
        }

void ChooseFromComboBox | ( | string | textBoxName,
 |  | string | text |
 | ) |  |  | [inline, private]

Definition at line 356 of file AcrylicBrushTests.cs.

        {
            Log.Comment("Retrieve text box with name '{0}'.", textBoxName);
            ComboBox comboBox = new ComboBox(FindElement.ById(textBoxName));
            comboBox.SelectItemByName(text);
            Wait.ForIdle();
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 36 of file AcrylicBrushTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

bool IsUsingAcrylicBrush ( ) [inline, private]

Definition at line 47 of file AcrylicBrushTests.cs.

        {
            TextBlock IsUsingAcrylicBrush_TextBlock = new TextBlock(FindElement.ById("IsUsingAcrylicBrush"));
            return IsUsingAcrylicBrush_TextBlock.DocumentText.Equals("True");
        }

void LogBrushSate ( ) [inline, private]

Definition at line 53 of file AcrylicBrushTests.cs.

        {
            Log.Comment("Using " + (IsUsingAcrylicBrush() ? "AcrylicBrush" : "FallbackBrush"));

            TextBlock CompositionBrushPointer_TextBlock = new TextBlock(FindElement.ById("CompositionBrushPointer"));
            Log.Comment("CompositionBrushPointer: " + CompositionBrushPointer_TextBlock.DocumentText);

            TextBlock NoiseBrushPointer_TextBlock = new TextBlock(FindElement.ById("NoiseBrushPointer"));
            Log.Comment("NoiseBrushPointer: " + NoiseBrushPointer_TextBlock.DocumentText);
        }

void LogResult | ( | Edit | result,
 |  | string | stateName |
 | ) |  |  | [inline, private]

Definition at line 341 of file AcrylicBrushTests.cs.

        {
            string expectedResult = stateName + ": Passed";
            bool testPassed = (0 == String.Compare(expectedResult, 0, result.Value, 0, expectedResult.Length));

            if (testPassed)
            {
                Log.Comment(result.Value);
            }
            else
            {
                Log.Error(result.Value);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 42 of file AcrylicBrushTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void TintTransitionDuration ( ) [inline]

Definition at line 227 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "TintTransitionDuration");

                Button runTestButton = new Button(FindElement.ById("RunTestButton"));

                // Iteration 0 : TintTransitionDuration = 0
                runTestButton.Invoke();
                Wait.ForSeconds(1);

                // Iteration 1 : TintTransitionDuration = 500ms
                runTestButton.Invoke();
                Wait.ForSeconds(1);

                // Iteration 2 : TintTransitionDuration = 999ms
                runTestButton.Invoke();
                Wait.ForSeconds(2);
            }
        }

void VerifyAcrylicBrushEffect ( ) [inline]

Definition at line 270 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "VerifyAcrylicBrushEffect");

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();
                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "VerifyAcrylicBrushEffect: Passed");
            }
        }

void VerifyDisconnectedState ( ) [inline]

Definition at line 154 of file AcrylicBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
            {
                ChooseFromComboBox("TestNameComboBox", "VerifyDisconnectedState");

                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    LogBrushSate();

                    if (result.Value.Equals("VerifyDisconnectedState: Skipped"))
                    {
                        Log.Error("Error: FallbackBrush in use - expecting effect brush");
                        return;
                    }

                    waiter.Wait();
                }

                Verify.AreEqual(result.Value, "VerifyDisconnectedState: Passed");
            }
        }

Member Data Documentation

const string AcrylicRectangleName = "Rectangle1" [private]

Definition at line 28 of file AcrylicBrushTests.cs.

const string SizeSliderName = "SizeSlider" [private]

Definition at line 30 of file AcrylicBrushTests.cs.

const string TintOpacitySliderName = "TintOpacity" [private]

Definition at line 29 of file AcrylicBrushTests.cs.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/InteractionTests/AcrylicBrushTests.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • AnimatedVisualPlayerTests
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

AnimatedVisualPlayerTests Class Reference

List of all members.

Public Member Functions

void | AccessibilityTest ()
void | SettingAnimationOptimizationDoesNotCrash ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | AroundTheEndAnimationTest ()
void | ClickWaitAndVerifyText (Button clickTarget, Edit edit, string expectedValue,[global::System.Runtime.CompilerServices.CallerMemberName] string testName="")
void | FallenBackTest ()
void | FromOneKeyframeAnimationTest ()
void | HittestingTest ()
void | ReverseNegativePlaybackRateAnimationTest ()
void | ReversePositivePlaybackRateAnimationTest ()
void | ToZeroKeyframeAnimationTest ()

Static Private Member Functions

static Button | Button (string name)
static Edit | Edit (string name)

Detailed Description

Definition at line 23 of file AnimatedVisualPlayerTests.cs.

Member Function Documentation

void AccessibilityTest ( ) [inline]

Definition at line 53 of file AnimatedVisualPlayerTests.cs.

        {
            using (var setup = new TestSetupHelper("AnimatedVisualPlayer Tests"))
            {
                var isPlayingTextBoxBeforePlaying = Edit("IsPlayingTextBoxBeforePlaying");
                var isPlayingTextBoxBeingPlaying = Edit("IsPlayingTextBoxBeingPlaying");

                if (isPlayingTextBoxBeforePlaying is null ||
                    isPlayingTextBoxBeingPlaying is null)
                {
                    Verify.Fail("UIElement not found.");
                    return;
                }

                ClickWaitAndVerifyText(
                    clickTarget: Button("PlayButton"),
                    edit: Edit("ProgressTextBox"),
                    expectedValue: Constants.PlayingEndedText);

                Log.Comment("Value of isPlayingTextBoxBeforePlaying: \"{0}\".", isPlayingTextBoxBeforePlaying.Value);
                Verify.AreEqual(Constants.FalseText, isPlayingTextBoxBeforePlaying.Value);

                //
                // isPlayingTextBoxBeingPlaying value is supposed to be updated
                // inside the event handler function of Click for playButton in
                // the UI test.
                //
                Log.Comment("Value of isPlayingTextBoxBeingPlaying: \"{0}\".", isPlayingTextBoxBeingPlaying.Value);
                Verify.AreEqual(Constants.TrueText, isPlayingTextBoxBeingPlaying.Value);

                ToZeroKeyframeAnimationTest();
                AroundTheEndAnimationTest();
                FromOneKeyframeAnimationTest();
                ReverseNegativePlaybackRateAnimationTest();
                ReversePositivePlaybackRateAnimationTest();
                HittestingTest();
                //Task 24429465: DCPP: Multiple MUXControls interaction tests failing after IXP integration.
                //FallenBackTest();
            }
        }

void AroundTheEndAnimationTest ( ) [inline, private]

Definition at line 103 of file AnimatedVisualPlayerTests.cs.

        {
            ClickWaitAndVerifyText(
                clickTarget: Button("AroundTheEndAnimationPlayButton"),
                edit: Edit("AroundTheEndAnimationProgressTextBox"),
                expectedValue: Constants.PlayingEndedText);
        }

static Button Button ( string name ) [static, private]
static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 29 of file AnimatedVisualPlayerTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClickWaitAndVerifyText | ( | Button | clickTarget,
 |  | Edit | edit,
 |  | string | expectedValue,
 |  | [global::System.Runtime.CompilerServices.CallerMemberName] string | testName = "" |
 | ) |  |  | [inline, private]

Definition at line 178 of file AnimatedVisualPlayerTests.cs.

        {
            if (clickTarget is null)
            {
                Verify.Fail($"{testName}: {nameof(clickTarget)} UIElement not found.");
                return;
            }

            if (edit is null)
            {
                Verify.Fail($"{testName}: {nameof(edit)} UIElement not found.");
                return;
            }

            // Clear out the text box so it starts in a known state.
            edit.SetValueAndWait(string.Empty);

            using (var waiter = new ValueChangedEventWaiter(edit))
            {
                clickTarget.Invoke();
                Log.Comment($"{testName}: Waiting for text to change.");
                waiter.Wait();
            }

            Log.Comment($"{testName}: Value of text: \"{edit.Value}\".");
            Verify.AreEqual(expectedValue, edit.Value);
        }

static Edit Edit ( string name ) [static, private]
void FallenBackTest ( ) [inline, private]

Definition at line 168 of file AnimatedVisualPlayerTests.cs.

        {
            ClickWaitAndVerifyText(
                clickTarget: Button("FallenBackButton"),
                edit: Edit("FallenBackTextBox"),
                expectedValue: Constants.TrueText);
        }

void FromOneKeyframeAnimationTest ( ) [inline, private]

Definition at line 112 of file AnimatedVisualPlayerTests.cs.

        {
            ClickWaitAndVerifyText(
                clickTarget: Button("FromOneKeyframeAnimationPlayButton"),
                edit: Edit("FromOneKeyframeAnimationProgressTextBox"),
                expectedValue: Constants.PlayingEndedText);
        }

void HittestingTest ( ) [inline, private]

Definition at line 140 of file AnimatedVisualPlayerTests.cs.

        {
            const string testName = nameof(HittestingTest);

            var textBox = Edit("HittestingTextBox");

            // Move the mouse away from the AnimatedVisualPlayer.
            InputHelper.MoveMouse(textBox, 0, 0);

            // Clear the value of the Edit.
            textBox.SetValueAndWait(string.Empty);

            using (var waiter = new ValueChangedEventWaiter(textBox))
            {
                // Move the mouse over the AnimatedVisualPlayer.
                var player = FindElement.ByName("Player");
                InputHelper.MoveMouse(player, 20, 20);

                Log.Comment($"{testName}: Waiting until OnPointerMoved handler in UI test returns.");
                waiter.Wait();
            }

            Log.Comment($"{testName}: Value of textBox: \"{textBox.Value}\".");
            Verify.AreEqual(Constants.PointerMovedText, textBox.Value);
        }

void ReverseNegativePlaybackRateAnimationTest ( ) [inline, private]

Definition at line 121 of file AnimatedVisualPlayerTests.cs.

        {
            ClickWaitAndVerifyText(
                clickTarget: Button("ReverseNegativePlaybackRateAnimationPlayButton"),
                edit: Edit("ReverseNegativePlaybackRateAnimationTextBox"),
                expectedValue: Constants.OneText);
        }

void ReversePositivePlaybackRateAnimationTest ( ) [inline, private]

Definition at line 130 of file AnimatedVisualPlayerTests.cs.

        {
            ClickWaitAndVerifyText(
                clickTarget: Button("ReversePositivePlaybackRateAnimationPlayButton"),
                edit: Edit("ReversePositivePlaybackRateAnimationTextBox"),
                expectedValue: Constants.ZeroText);
        }

void SettingAnimationOptimizationDoesNotCrash ( ) [inline]

Definition at line 41 of file AnimatedVisualPlayerTests.cs.

        {
            using (var setup = new TestSetupHelper("AnimatedVisualPlayer Tests"))
            {
                var button = Button("SwitchCacheModeButton");
                button.Click();
                Wait.ForIdle();
                button.Click();
            }
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file AnimatedVisualPlayerTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ToZeroKeyframeAnimationTest ( ) [inline, private]

Definition at line 95 of file AnimatedVisualPlayerTests.cs.

        {
            ClickWaitAndVerifyText(
                clickTarget: Button("ToZeroKeyframeAnimationPlayButton"),
                edit: Edit("ToZeroKeyframeAnimationProgressTextBox"),
                expectedValue: Constants.PlayingEndedText);
        }

The documentation for this class was generated from the following file:
  • AnimatedVisualPlayer/InteractionTests/AnimatedVisualPlayerTests.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarInteractionTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • AnnotatedScrollBarInteractionTests
Public Member Functions | Static Public Member Functions

AnnotatedScrollBarInteractionTests Class Reference

List of all members.

Public Member Functions

void | CollidingLabelsAreRemoved ()
void | DetailLabelDoesNotShowWhenDataFieldIsEmpty ()
void | DetailLabelRequestedOffsetDoesNotExceedMaxPossibleValue ()
void | LabelsGrowToAccomodateLongText ()
void | ScrollUsingArrowButtons ()
void | ScrollUsingClick ()
void | ScrollUsingTouchAndDrag ()
void | TestCleanup ()
void | VerifyCanCancelScrolling ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 23 of file AnnotatedScrollBarInteractionTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file AnnotatedScrollBarInteractionTests.cs.

        {
            TestEnvironment.Initialize(testContext);
            Context.RawContext.Activate();
        }

void CollidingLabelsAreRemoved ( ) [inline]

Definition at line 308 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar CollidingLabelsAreRemoved Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving btnPrePopulateLabels");
                Button btnPrePopulateLabels = new Button(FindElement.ById("btnPrePopulateLabels"));
                Verify.IsNotNull(btnPrePopulateLabels, "Verifying that btnPrePopulateLabels was found");

                Log.Comment("Clicking btnPrePopulateLabels.");
                btnPrePopulateLabels.Click();

                Log.Comment("First item should be visible.");
                var label0 = ElementCache.TryGetObjectByName("Num 0", false);
                Verify.IsNotNull(label0);

                Log.Comment("Last item should be visible.");
                var label19 = ElementCache.TryGetObjectByName("Num 19", false);
                Verify.IsNotNull(label19);

                Log.Comment("Some intermediate items not removed by collision logic should be visible.");
                var label3 = ElementCache.TryGetObjectByName("Num 3", false);
                Verify.IsNotNull(label3);

                var label15 = ElementCache.TryGetObjectByName("Num 15", false);
                Verify.IsNotNull(label15);

                Log.Comment("Some intermediate items removed by collision logic should not be visible.");
                var label1 = ElementCache.TryGetObjectByName("Num 1", false);
                Verify.IsNull(label1);
            }
        }

void DetailLabelDoesNotShowWhenDataFieldIsEmpty ( ) [inline]

Definition at line 251 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar DetailLabelDoesNotShowWhenDataFieldIsEmpty Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving isDetailLabelEnabled checkbox");
                CheckBox isDetailLabelEnabled = new CheckBox(FindElement.ById("isDetailLabelEnabled"));
                Verify.IsNotNull(isDetailLabelEnabled, "Verifying that isDetailLabelEnabled checkbox was found");

                Log.Comment("Retrieving VerticalIncrementRepeatButton");
                Button VerticalIncrementRepeatButton = new Button(FindElement.ById("PART_VerticalIncrementRepeatButton"));
                Verify.IsNotNull(VerticalIncrementRepeatButton, "Verifying that VerticalIncrementRepeatButton was found");

                Log.Comment("Check isDetailLabelEnabled");
                isDetailLabelEnabled.Toggle();
                Wait.ForIdle();

                Log.Comment("Move mouse over AnnotatedScrollBar.");
                InputHelper.MoveMouse(VerticalIncrementRepeatButton, 0, 200);
                Wait.ForIdle();

                var toolTip = FindElement.ById("PART_DetailLabelToolTip");
                Verify.IsNull(toolTip);
            }

        }

void DetailLabelRequestedOffsetDoesNotExceedMaxPossibleValue ( ) [inline]

Definition at line 169 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar DetailLabelRequestedOffset Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving isDetailLabelEnabled checkbox");
                CheckBox isDetailLabelEnabled = new CheckBox(FindElement.ById("isDetailLabelEnabled"));
                Verify.IsNotNull(isDetailLabelEnabled, "Verifying that isDetailLabelEnabled checkbox was found");

                Log.Comment("Retrieving btnGetMaximum");
                Button btnGetMaximum = new Button(FindElement.ById("btnGetMaximum"));
                Verify.IsNotNull(btnGetMaximum, "Verifying that btnGetMaximum was found");

                Log.Comment("Retrieving txtMaximum");
                TextBlock txtMaximum = new TextBlock(FindElement.ById("txtMaximum"));
                Verify.IsNotNull(txtMaximum, "Verifying that txtMaximum was found");

                Log.Comment("Retrieving btnGetViewportSize");
                Button btnGetViewportSize = new Button(FindElement.ById("btnGetViewportSize"));
                Verify.IsNotNull(btnGetViewportSize, "Verifying that btnGetViewportSize was found");

                Log.Comment("Retrieving txtViewportSize");
                TextBlock txtViewportSize = new TextBlock(FindElement.ById("txtViewportSize"));
                Verify.IsNotNull(txtViewportSize, "Verifying that txtViewportSize was found");

                Log.Comment("Retrieving btnGetLastRequestedDetailLabelOffset");
                Button btnGetLastRequestedDetailLabelOffset = new Button(FindElement.ById("btnGetLastRequestedDetailLabelOffset"));
                Verify.IsNotNull(btnGetLastRequestedDetailLabelOffset, "Verifying that btnGetLastRequestedDetailLabelOffset was found");

                Log.Comment("Retrieving txtLastRequestedDetailLabelOffset");
                TextBlock txtLastRequestedDetailLabelOffset = new TextBlock(FindElement.ById("txtLastRequestedDetailLabelOffset"));
                Verify.IsNotNull(txtLastRequestedDetailLabelOffset, "Verifying that txtLastRequestedDetailLabelOffset was found");

                Log.Comment("Retrieving VerticalIncrementRepeatButton");
                Button VerticalIncrementRepeatButton = new Button(FindElement.ById("PART_VerticalIncrementRepeatButton"));
                Verify.IsNotNull(VerticalIncrementRepeatButton, "Verifying that VerticalIncrementRepeatButton was found");

                Log.Comment("Retrieving VerticalDecrementRepeatButton");
                Button VerticalDecrementRepeatButton = new Button(FindElement.ById("PART_VerticalDecrementRepeatButton"));
                Verify.IsNotNull(VerticalDecrementRepeatButton, "Verifying that VerticalDecrementRepeatButton was found");

                Log.Comment("Check isDetailLabelEnabled");
                isDetailLabelEnabled.Toggle();
                Wait.ForIdle();

                Log.Comment("Get ScrollView.Maximum value.");
                btnGetMaximum.Click();
                var maximum = Convert.ToDouble(txtMaximum.GetText());

                Log.Comment("Get ScrollView.ViewportSize value.");
                btnGetViewportSize.Click();
                var viewportSize = Convert.ToDouble(txtViewportSize.GetText());

                var maxAllowableOffset = maximum + viewportSize;

                Log.Comment("Move mouse over AnnotatedScrollBar.");
                InputHelper.MoveMouse(VerticalIncrementRepeatButton, 0, VerticalIncrementRepeatButton.BoundingRectangle.Height / 2);
                Wait.ForIdle();

                Log.Comment("Move mouse to the end of the tooltip rail.");
                InputHelper.MoveMouse(VerticalDecrementRepeatButton, 0, -1*VerticalDecrementRepeatButton.BoundingRectangle.Height / 2 - 1);
                Wait.ForIdle();

                Log.Comment("Move mouse just past the end of tooltip rail.");
                InputHelper.MoveMouse(VerticalDecrementRepeatButton, 0, -1*VerticalDecrementRepeatButton.BoundingRectangle.Height / 2);
                Wait.ForIdle();

                Log.Comment("Get lastRequestedDetailLabelOffset.");
                btnGetLastRequestedDetailLabelOffset.Click();
                var lastRequestedDetailLabelOffset = Convert.ToDouble(txtLastRequestedDetailLabelOffset.GetText());

                Log.Comment("Verify lastRequestedDetailLabelOffset is more than 0.");
                Verify.IsTrue(lastRequestedDetailLabelOffset > 0);

                Log.Comment("Verify lastRequestedDetailLabelOffset did not exceed Maximum + ViewportSize.");
                Verify.IsTrue(lastRequestedDetailLabelOffset <= maxAllowableOffset);
            }

        }

void LabelsGrowToAccomodateLongText ( ) [inline]

Definition at line 280 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar ScrollUsingTouchAndDrag Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving PART_ScrollPresenter");
                Button scrollPresenter = new Button(FindElement.ById("PART_ScrollPresenter"));
                Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");

                Log.Comment("Retrieving useLongLabelContent checkbox");
                CheckBox useLongLabelContent = new CheckBox(FindElement.ById("useLongLabelContent"));
                Verify.IsNotNull(useLongLabelContent, "Verifying that useLongLabelContent checkbox was found");

                Log.Comment("Verify scrollPresenter starting width.");
                Verify.AreEqual(376, scrollPresenter.BoundingRectangle.Width);

                Log.Comment("Check useLongLabelContent");
                useLongLabelContent.Toggle();
                Wait.ForMilliseconds(500);

                Log.Comment("Verify scrollPresenter ending width.");
                Verify.AreEqual(150, scrollPresenter.BoundingRectangle.Width);
            }

        }

void ScrollUsingArrowButtons ( ) [inline]

Definition at line 42 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar ScrollUsingDecrementArrowButton Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving txtValue");
                TextBlock txtValue = new TextBlock(FindElement.ById("txtValue"));
                Verify.IsNotNull(txtValue, "Verifying that txtValue was found");

                Log.Comment("Retrieving btnGetValue");
                Button btnGetValue = new Button(FindElement.ById("btnGetValue"));
                Verify.IsNotNull(btnGetValue, "Verifying that btnGetValue was found");

                Log.Comment("Retrieving VerticalDecrementRepeatButton");
                Button VerticalDecrementRepeatButton = new Button(FindElement.ById("PART_VerticalDecrementRepeatButton"));
                Verify.IsNotNull(VerticalDecrementRepeatButton, "Verifying that VerticalDecrementRepeatButton was found");

                Log.Comment("Retrieving VerticalIncrementRepeatButton");
                Button VerticalIncrementRepeatButton = new Button(FindElement.ById("PART_VerticalIncrementRepeatButton"));
                Verify.IsNotNull(VerticalIncrementRepeatButton, "Verifying that VerticalIncrementRepeatButton was found");

                Log.Comment("Verify Value is set to 0.");
                btnGetValue.Click();
                Verify.AreEqual(0.0, Convert.ToDouble(txtValue.DocumentText));

                Log.Comment("Click VerticalDecrementRepeatButton.");
                VerticalDecrementRepeatButton.Click();

                Log.Comment("Verify Value is more than 0.");
                btnGetValue.Click();
                var newOffsetValue = Convert.ToDouble(txtValue.DocumentText);
                Verify.IsTrue(newOffsetValue > 0.0);

                Log.Comment("Click VerticalIncrementRepeatButton.");
                VerticalIncrementRepeatButton.Click();

                Log.Comment("Verify Value is back at 0.");
                btnGetValue.Click();
                Verify.AreEqual(0.0, Convert.ToDouble(txtValue.DocumentText));
            }

        }

void ScrollUsingClick ( ) [inline]

Definition at line 87 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar ScrollUsingClick Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving txtValue");
                TextBlock txtValue = new TextBlock(FindElement.ById("txtValue"));
                Verify.IsNotNull(txtValue, "Verifying that txtValue was found");

                Log.Comment("Retrieving btnGetValue");
                Button btnGetValue = new Button(FindElement.ById("btnGetValue"));
                Verify.IsNotNull(btnGetValue, "Verifying that btnGetValue was found");

                Log.Comment("Retrieving VerticalIncrementRepeatButton");
                Button VerticalIncrementRepeatButton = new Button(FindElement.ById("PART_VerticalIncrementRepeatButton"));
                Verify.IsNotNull(VerticalIncrementRepeatButton, "Verifying that VerticalIncrementRepeatButton was found");

                Log.Comment("Verify Value is set to 0.");
                btnGetValue.Click();
                Verify.AreEqual(0.0, Convert.ToDouble(txtValue.DocumentText));

                Log.Comment("Click on the AnnotatedScrollBar");
                InputHelper.LeftClick(VerticalIncrementRepeatButton, 0, 100);
                Wait.ForIdle();

                Log.Comment("Verify Value is more than 0.");
                btnGetValue.Click();
                var newOffsetValue = Convert.ToDouble(txtValue.DocumentText);
                Verify.IsTrue(newOffsetValue > 0.0);
            }

        }

void ScrollUsingTouchAndDrag ( ) [inline]

Definition at line 123 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar ScrollUsingTouchAndDrag Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving txtValue");
                TextBlock txtValue = new TextBlock(FindElement.ById("txtValue"));
                Verify.IsNotNull(txtValue, "Verifying that txtValue was found");

                Log.Comment("Retrieving btnGetValue");
                Button btnGetValue = new Button(FindElement.ById("btnGetValue"));
                Verify.IsNotNull(btnGetValue, "Verifying that btnGetValue was found");

                Log.Comment("Retrieving VerticalIncrementRepeatButton");
                Button VerticalIncrementRepeatButton = new Button(FindElement.ById("PART_VerticalIncrementRepeatButton"));
                Verify.IsNotNull(VerticalIncrementRepeatButton, "Verifying that VerticalIncrementRepeatButton was found");

                Log.Comment("Verify Value is set to 0.");
                btnGetValue.Click();
                Verify.AreEqual(0.0, Convert.ToDouble(txtValue.DocumentText));

                Log.Comment("Tap on the AnnotatedScrollBar");
                InputHelper.Tap(VerticalIncrementRepeatButton, 0, 100);
                Wait.ForIdle();

                Log.Comment("Verify Value is more than 0.");
                btnGetValue.Click();
                var firstOffsetValue = Convert.ToDouble(txtValue.DocumentText);
                Verify.IsTrue(firstOffsetValue > 0.0);

                Log.Comment("TapAndDrag on the AnnotatedScrollBar");
                var incrementButtonPoint = VerticalIncrementRepeatButton.GetClickablePoint();
                incrementButtonPoint.Y = incrementButtonPoint.Y + 100;
                InputHelper.Pan(VerticalIncrementRepeatButton, incrementButtonPoint, 200, Direction.South, 2000);
                Wait.ForIdle();

                Log.Comment("Verify Value is more than firstOffsetValue.");
                btnGetValue.Click();
                var secondOffsetValue = Convert.ToDouble(txtValue.DocumentText);
                Verify.IsTrue(secondOffsetValue > firstOffsetValue);
            }

        }

void TestCleanup ( ) [inline]

Definition at line 36 of file AnnotatedScrollBarInteractionTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyCanCancelScrolling ( ) [inline]

Definition at line 343 of file AnnotatedScrollBarInteractionTests.cs.

        {
            Log.Comment("AnnotatedScrollBar Cancel Scrolling via AnnotatedScrollBarScrollingEventArgs Test");

            using (var setup = new TestSetupHelper(new[] { "AnnotatedScrollBar Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving txtValue");
                TextBlock txtValue = new TextBlock(FindElement.ById("txtValue"));
                Verify.IsNotNull(txtValue, "Verifying that txtValue was found");

                Log.Comment("Retrieving btnGetValue");
                Button btnGetValue = new Button(FindElement.ById("btnGetValue"));
                Verify.IsNotNull(btnGetValue, "Verifying that btnGetValue was found");

                Log.Comment("Retrieving VerticalDecrementRepeatButton");
                Button VerticalDecrementRepeatButton = new Button(FindElement.ById("PART_VerticalDecrementRepeatButton"));
                Verify.IsNotNull(VerticalDecrementRepeatButton, "Verifying that VerticalDecrementRepeatButton was found");

                Log.Comment("Retrieving CancelScrollingEvent checkbox");
                CheckBox cancelScrollingEvent = new CheckBox(FindElement.ById("cancelScrollingEvent"));
                Verify.IsNotNull(cancelScrollingEvent, "Verifying that cancelScrollingEvent checkbox was found");

                Log.Comment("Verify Value is set to 0.");
                btnGetValue.Click();
                Verify.AreEqual(0.0, Convert.ToDouble(txtValue.DocumentText));

                Log.Comment("Check cancelScrollingEvent.");
                cancelScrollingEvent.Toggle();
                Wait.ForIdle();

                Log.Comment("Click VerticalDecrementRepeatButton.");
                VerticalDecrementRepeatButton.Click();

                Log.Comment("Uncheck cancelScrollingEvent.");
                cancelScrollingEvent.Toggle();
                Wait.ForIdle();

                Log.Comment("Click VerticalDecrementRepeatButton.");
                VerticalDecrementRepeatButton.Click();

                Log.Comment("Verify Value is more than 0.");
                btnGetValue.Click();
                var newOffsetValue = Convert.ToDouble(txtValue.DocumentText);
                Verify.AreEqual(83, newOffsetValue);
            }

        }

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/InteractionTests/AnnotatedScrollBarInteractionTests.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • AutoSuggestBox
Public Member Functions | Static Public Member Functions

AutoSuggestBox Class Reference

List of all members.

Public Member Functions

void | CanSelectSuggestion ()
void | TestCleanup ()
void | VerifyAxeScanPasses ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 21 of file AutoSuggestBoxTests.cs.

Member Function Documentation

void CanSelectSuggestion ( ) [inline]

Definition at line 39 of file AutoSuggestBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("AutoSuggestBox Tests"))
            {
                Edit autoSuggestBoxTextBox = new Edit(FindElement.ByNameAndClassName("AutoSuggestBox with suggestions", "TextBox"));
                FocusHelper.SetFocus(autoSuggestBoxTextBox);
                KeyboardHelper.EnterText(autoSuggestBoxTextBox, "test");
                KeyboardHelper.PressKey(Key.Enter);
                InvokeImplementation dolorItem = new InvokeImplementation(FindElement.ByNameAndClassName("dolor", "ListViewItem"));

                using (ValueChangedEventWaiter waiter = new ValueChangedEventWaiter(autoSuggestBoxTextBox, "dolor"))
                {
                    dolorItem.Invoke();
                }

                Verify.AreEqual("dolor", autoSuggestBoxTextBox.Value);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 27 of file AutoSuggestBoxTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void TestCleanup ( ) [inline]

Definition at line 33 of file AutoSuggestBoxTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 59 of file AutoSuggestBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("AutoSuggestBox-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

The documentation for this class was generated from the following file:
  • AutoSuggestBox/InteractionTests/AutoSuggestBoxTests.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • BreadcrumbBarItem
Classes | Public Member Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes

BreadcrumbBarItem Class Reference

List of all members.

Classes

class | BreadcrumbBarItemFactory

Public Member Functions

BreadcrumbBarItem (UIObject uiObject)
UIEventWaiter | GetInvokedWaiter ()
void | Invoke ()
void | InvokeAndWait (TimeSpan?timeout=null)

Properties

new static IFactory
< BreadcrumbBarItem > 		Factory [get]

Private Member Functions

void | Initialize ()

Private Attributes

IInvoke | _invokePattern

Static Private Attributes

static IFactory
< BreadcrumbBarItem > 		_factory = null

Detailed Description

Definition at line 29 of file BreadcrumbBarTests.cs.

Constructor & Destructor Documentation

BreadcrumbBarItem ( UIObject uiObject ) [inline]

Definition at line 31 of file BreadcrumbBarTests.cs.

            : base(uiObject)
        {
            this.Initialize();
        }

Member Function Documentation

UIEventWaiter GetInvokedWaiter ( ) [inline]

Definition at line 47 of file BreadcrumbBarTests.cs.

        {
            return _invokePattern.GetInvokedWaiter();
        }

void Initialize ( ) [inline, private]

Definition at line 37 of file BreadcrumbBarTests.cs.

        {
            _invokePattern = new InvokeImplementation(this);
        }

void Invoke ( ) [inline]

Definition at line 42 of file BreadcrumbBarTests.cs.

        {
            _invokePattern.Invoke();
        }

void InvokeAndWait ( TimeSpan? timeout = null ) [inline]

Definition at line 52 of file BreadcrumbBarTests.cs.

        {
            using (var waiter = GetInvokedWaiter())
            {
                Invoke();
                if (timeout == null)
                {
                    waiter.Wait();
                }
                else
                {
                    waiter.Wait(timeout.Value);
                }
            }

            Wait.ForIdle();
        }

Member Data Documentation

IFactory<BreadcrumbBarItem> _factory = null [static, private]

Definition at line 83 of file BreadcrumbBarTests.cs.

IInvoke _invokePattern [private]

Definition at line 82 of file BreadcrumbBarTests.cs.

Property Documentation

new static IFactory<BreadcrumbBarItem> Factory [static, get]

Definition at line 71 of file BreadcrumbBarTests.cs.

The documentation for this class was generated from the following file:
  • Breadcrumb/InteractionTests/BreadcrumbBarTests.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarItem::BreadcrumbBarItemFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • BreadcrumbBarItem
  • BreadcrumbBarItem::BreadcrumbBarItemFactory
Public Member Functions

BreadcrumbBarItem::BreadcrumbBarItemFactory Class Reference

List of all members.

Public Member Functions

BreadcrumbBarItem Create (UIObject element)

Detailed Description

Definition at line 85 of file BreadcrumbBarTests.cs.

Member Function Documentation

BreadcrumbBarItem Create ( UIObject element ) [inline]

Definition at line 87 of file BreadcrumbBarTests.cs.

            {
                return new BreadcrumbBarItem(element);
            }

The documentation for this class was generated from the following file:
  • Breadcrumb/InteractionTests/BreadcrumbBarTests.cs
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • BreadcrumbTests
Public Member Functions | Static Public Member Functions | Private Member Functions

BreadcrumbTests Class Reference

List of all members.

Public Member Functions

void | AddItemsAndCompressBreadcrumbTest ()
void | AddItemsAndInvokeBreadcrumbBarItemTest ()
void | CheckCurrentItemDoesNotRaiseInvokeEvent ()
void | InvokeDropDownItemTest ()
void | InvokeEllipsisItemTest ()
void | KeyboardNavigationDropDownItemInvokationTest ()
void | KeyboardNavigationFlyoutItemsTest ()
void | KeyboardNavigationForCrumbledLeftToRightTest ()
void | KeyboardNavigationForCrumbledRightToLeftTest ()
void | KeyboardNavigationItemInvokationTest ()
void | KeyboardNavigationLeftToRightTest ()
void | KeyboardNavigationRightToLeftTest ()
void | NoInteractionTest ()
void | TestCleanup ()
void | VerifyAxeScanPasses ()
void | VerifyFlyoutRecycleCrash ()
void | VerifyMulticlickCrash ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ClickOnElements (string[] elementNames)
T | ConvertTo< T > (UIObject uiObject)
string | GetCurrentItemText (BreadcrumbBarItem currentItem)
Button | GetDropDownItemByName (string dropDownItemName)
string | GetLastClickedItem ()
int | GetLastClickedItemIndex ()
void | InvokeEllipsisItem (UIObject breadcrumb)
UIObject | RetrieveBreadcrumbControl ()
UIObject | RetrieveRTLCheckBox (bool mustClickCheckBox=false)
UIObject | RetrieveWidthSlider ()
void | SetFocusToFirstBreadcrumbBarItem (UIObject breadcrumb, bool isEllipsisVisible=false, bool isRightToLeft=false)
UIObject | SetUpCrumbledTest ()
UIObject | SetUpTest ()
bool | TryGetFocusByPressingTab (UIObject breadcrumb, int indexToFocus)
bool | TryGetFocusForRs2 (UIObject breadcrumb, int indexToFocus, bool isEllipsisVisible)
bool | TryGetFocusForRs3 (UIObject breadcrumb, int indexToFocus, bool isEllipsisVisible, bool isRightToLeft)
void | VerifyBreadcrumbBarItemsContain (UICollection< UIObject > breadcrumbItems, string[] expectedItemValues, bool firstItemIsCurrentItem=false, bool isEllipsisVisible=false)
Button | VerifyDropDownItemContainsText (string expectedText)
void | VerifyDropDownItemContainsText (Button dropDownItem, string expectedEllipsisItemText)
void | VerifyLastClickedItemIndexIs (int expected)
void | VerifyLastClickedItemIs (string expected)

Detailed Description

Definition at line 95 of file BreadcrumbBarTests.cs.

Member Function Documentation

void AddItemsAndCompressBreadcrumbTest ( ) [inline]

Definition at line 162 of file BreadcrumbBarTests.cs.

        {
            // In this test we add the nodes 'Node A', 'Node A_2', 'Node A_2_3', once the nodes have been added
            // we click on each item verify that the BreadcrumbBar contained the specified nodes. At the end, only the
            // ellipsis item and the 'Root' item should exist however ellipsis item is hidden from the UIA tree.
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpTest();

                VerifyBreadcrumbBarItemsContain(breadcrumb.Children, new string[] { "Root", "Node A", "Node A_2", "Node A_2_3", "Node A_2_3_1" }, true);

                Verify.AreEqual(1, breadcrumb.Children.Count, "The breadcrumb should contain 1 item");
            }
        }

void AddItemsAndInvokeBreadcrumbBarItemTest ( ) [inline]

Definition at line 179 of file BreadcrumbBarTests.cs.

        {
            // In this test we add the breadcrumb Items 'Node A', 'Node A_2', 'Node A_2_3' & 'Node A_2_3_1'
            // Once those items have been added, we click on the 'Node A_2' item and verify that only the
            // ellipsis item, 'Root', 'Node A' and 'Node A_2' exist on the breadcrumb however ellipsis item is hidden from the UIA tree.
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpTest();

                // Click on the Node A_2 BreadcrumbBarItem
                var NodeA_2BreadcrumbBarItem = breadcrumb.Children[2];
                NodeA_2BreadcrumbBarItem.Click();

                VerifyLastClickedItemIndexIs(2);
                VerifyLastClickedItemIs("Node A_2");

                Verify.AreEqual(3, breadcrumb.Children.Count, "The breadcrumb should contain 3 items");

                VerifyBreadcrumbBarItemsContain(breadcrumb.Children, new string[] { "Root", "Node A", "Node A_2" });
            }
        }

void CheckCurrentItemDoesNotRaiseInvokeEvent ( ) [inline]

Definition at line 138 of file BreadcrumbBarTests.cs.

        {
            // This is a sanity test that verifies that the BreadcrumbBar control exists and the basic setup for a test is correct
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                UIObject breadcrumb = RetrieveBreadcrumbControl();
                var breadcrumbItems = breadcrumb.Children;

                Verify.AreEqual(1, breadcrumbItems.Count, "The breadcrumb should contain 1 item.");

                var currentItem = breadcrumbItems[0];

                var currentBreadcrumbBarItem = ConvertTo<BreadcrumbBarItem>(currentItem);
                Verify.IsNotNull(currentBreadcrumbBarItem, "UIElement should be a BreadcrumbBarItem");

                currentBreadcrumbBarItem.Click();

                VerifyLastClickedItemIs("");
                Verify.AreEqual("Root", GetCurrentItemText(currentBreadcrumbBarItem));
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 101 of file BreadcrumbBarTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClickOnElements ( string[] elementNames ) [inline, private]

Definition at line 731 of file BreadcrumbBarTests.cs.

        {
            foreach (var elementName in elementNames)
            {
                UIObject itemToAddButton = FindElement.ByName(elementName);
                Verify.IsNotNull(itemToAddButton, "Verifying that we found a button with " + elementName + " text");
                itemToAddButton.Click();
            }
        }

T ConvertTo< T > ( UIObject uiObject ) [inline, private]
string GetCurrentItemText ( BreadcrumbBarItem currentItem ) [inline, private]

Definition at line 871 of file BreadcrumbBarTests.cs.

        {
            return currentItem.Children[0].GetText();
        }

Button GetDropDownItemByName ( string dropDownItemName ) [inline, private]

Definition at line 820 of file BreadcrumbBarTests.cs.

        {
            var ellipsisFlyout = FindElement.ByName("EllipsisFlyout");

            foreach (var child in ellipsisFlyout.Children)
            {
                if (child.Name == dropDownItemName)
                {
                    return ConvertTo<Button>(child);
                }
            }

            Verify.Fail(dropDownItemName + " not found");
            return null;
        }

string GetLastClickedItem ( ) [inline, private]

Definition at line 859 of file BreadcrumbBarTests.cs.

        {
            var lastItemTextBlock = FindElement.ByName<TextBlock>("LastClickedItem");
            return lastItemTextBlock.DocumentText;
        }

int GetLastClickedItemIndex ( ) [inline, private]

Definition at line 865 of file BreadcrumbBarTests.cs.

        {
            var lastItemTextBlock = FindElement.ByName<TextBlock>("LastClickedItemIndex");
            return Int32.Parse(lastItemTextBlock.DocumentText);
        }

void InvokeDropDownItemTest ( ) [inline]

Definition at line 229 of file BreadcrumbBarTests.cs.

        {
            // All the steps performed in InvokeEllipsisItemTest are done, once that happens,
            // we invoke the 'Node A' item and we verify that only 'Root' and 'Node A' exist in the list
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpCrumbledTest();

                // Click on the Ellipsis BreadcrumbBarItem
                InvokeEllipsisItem(breadcrumb);

                var ellipsisItemNodeA = GetDropDownItemByName("Node A");
                ellipsisItemNodeA.Invoke();
                Thread.Sleep(500);

                VerifyBreadcrumbBarItemsContain(breadcrumb.Children, new string[] { "Root", "Node A" });
            }
        }

void InvokeEllipsisItem ( UIObject breadcrumb ) [inline, private]

Definition at line 588 of file BreadcrumbBarTests.cs.

        {
            var ellipsisItem = ConvertTo<BreadcrumbBarItem>(breadcrumb.Children[0]);
            ellipsisItem.Invoke();

            Thread.Sleep(1000);
        }

void InvokeEllipsisItemTest ( ) [inline]

Definition at line 203 of file BreadcrumbBarTests.cs.

        {
            // In this test we add some items to the BreadcrumbBar, once all items have been added
            // the slider is clicked so nodes 'Node A_2', 'Node A' and 'Root' are crumbled.
            // Finally, we invoke the Ellipsis item to verify the crumbled nodes exist inside the flyout
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpCrumbledTest();

                // Click on the Ellipsis BreadcrumbBarItem
                InvokeEllipsisItem(breadcrumb);

                VerifyDropDownItemContainsText("Node A_2");
                VerifyDropDownItemContainsText("Node A");
                VerifyDropDownItemContainsText("Root");

                Log.Comment("Verify only 3 ellipsis items exist");
                var ellipsisItem4 = FindElement.ByName("EllipsisItem4");
                Verify.IsNull(ellipsisItem4, "EllipsisItem4 was found");

                Verify.AreEqual(6, breadcrumb.Children.Count, "The breadcrumb should contain 6 items: 5 items and ellipsis");
            }
        }

void KeyboardNavigationDropDownItemInvokationTest ( ) [inline]

Definition at line 476 of file BreadcrumbBarTests.cs.

        {
            using(var setup = new TestSetupHelper("BreadcrumbBar Tests", new TestSetupHelper.TestSetupHelperOptions { AutomaticCleanup = false }))
            {
                var breadcrumb = SetUpCrumbledTest();
                var breadcrumbItems = breadcrumb.Children;

                var rtlCheckbox = RetrieveRTLCheckBox();

                SetFocusToFirstBreadcrumbBarItem(breadcrumb, true);

                KeyboardHelper.PressKey(Key.Enter);
                Thread.Sleep(1000);

                // Here we should verify that the first element in the flyout has focus and we can move up/down
                // The flyout items should contain: "Node A_2", "Node A" and "Root"
                var dropDownItem = GetDropDownItemByName("Node A_2");
                Verify.IsTrue(dropDownItem.HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Down);

                dropDownItem = GetDropDownItemByName("Node A");
                Verify.IsTrue(dropDownItem.HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Enter);

                VerifyLastClickedItemIndexIs(1);
                VerifyLastClickedItemIs("Node A");

                // Possible bug to solve here
                // Verify.IsTrue(breadcrumbItems[2].HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should keep focus");

                Verify.AreEqual(2, breadcrumb.Children.Count, "The breadcrumb should contain 2 items.");

                VerifyBreadcrumbBarItemsContain(breadcrumb.Children, new string[] { "Root", "Node A" });

                setup.AllowCleanup();
            }
        }

void KeyboardNavigationFlyoutItemsTest ( ) [inline]

Definition at line 400 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpCrumbledTest();
                var breadcrumbItems = breadcrumb.Children;

                var rtlCheckbox = RetrieveRTLCheckBox();

                SetFocusToFirstBreadcrumbBarItem(breadcrumb, true);

                KeyboardHelper.PressKey(Key.Enter);
                Thread.Sleep(1000);

                // Here we should verify that the first element in the flyout has focus and we can move up/down

                var dropDownItem = GetDropDownItemByName("Node A_2");
                Verify.IsTrue(dropDownItem.HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Down);

                dropDownItem = GetDropDownItemByName("Node A");
                Verify.IsTrue(dropDownItem.HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Down);

                dropDownItem = GetDropDownItemByName("Root");
                Verify.IsTrue(dropDownItem.HasKeyboardFocus, "'Root' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Up);

                dropDownItem = GetDropDownItemByName("Node A");
                Verify.IsTrue(dropDownItem.HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Up);

                dropDownItem = GetDropDownItemByName("Node A_2");
                Verify.IsTrue(dropDownItem.HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");
            }
        }

void KeyboardNavigationForCrumbledLeftToRightTest ( ) [inline]

Definition at line 346 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpCrumbledTest();
                var breadcrumbItems = breadcrumb.Children;

                var rtlCheckbox = RetrieveRTLCheckBox();

                SetFocusToFirstBreadcrumbBarItem(breadcrumb, true);

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[5].HasKeyboardFocus, "'Node A_2_3_1' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus back");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[0].HasKeyboardFocus, "Ellipsis BreadcrumbBarItem should have focus back");
            }
        }

void KeyboardNavigationForCrumbledRightToLeftTest ( ) [inline]

Definition at line 373 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpCrumbledTest();
                var breadcrumbItems = breadcrumb.Children;

                var rtlCheckbox = RetrieveRTLCheckBox(true);

                SetFocusToFirstBreadcrumbBarItem(breadcrumb, true);

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[5].HasKeyboardFocus, "'Node A_2_3_1' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[0].HasKeyboardFocus, "Ellipsis BreadcrumbBarItem should have focus");
            }
        }

void KeyboardNavigationItemInvokationTest ( ) [inline]

Definition at line 443 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                var breadcrumb = SetUpTest();
                var breadcrumbItems = breadcrumb.Children;

                var rtlCheckbox = RetrieveRTLCheckBox();

                SetFocusToFirstBreadcrumbBarItem(breadcrumb, false);

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[1].HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[2].HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Enter);

                VerifyLastClickedItemIndexIs(2);
                VerifyLastClickedItemIs("Node A_2");

                // Possible bug to solve here
                // Verify.IsTrue(breadcrumbItems[3].HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should keep focus");

                Verify.AreEqual(3, breadcrumb.Children.Count, "The breadcrumb should contain 3 items.");

                VerifyBreadcrumbBarItemsContain(breadcrumb.Children, new string[] { "Root", "Node A", "Node A_2" });
            }
        }

void KeyboardNavigationLeftToRightTest ( ) [inline]

Definition at line 250 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests", new TestSetupHelper.TestSetupHelperOptions { AutomaticCleanup = false }))
            {
                var breadcrumb = SetUpTest();
                var breadcrumbItems = breadcrumb.Children;

                var rtlCheckbox = RetrieveRTLCheckBox();

                SetFocusToFirstBreadcrumbBarItem(breadcrumb, false);

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[1].HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[2].HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[3].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3_1' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3_1' BreadcrumbBarItem should keep the focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[3].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[2].HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[1].HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[0].HasKeyboardFocus, "'Root' BreadcrumbBarItem should have focus");

                // Bug to solve here
                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[0].HasKeyboardFocus, "'Root' BreadcrumbBarItem should keep the focus");

                setup.AllowCleanup();
            }
        }

void KeyboardNavigationRightToLeftTest ( ) [inline]

Definition at line 298 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests", new TestSetupHelper.TestSetupHelperOptions { AutomaticCleanup = false }))
            {
                var breadcrumb = SetUpTest();
                var breadcrumbItems = breadcrumb.Children;

                var rtlCheckbox = RetrieveRTLCheckBox(true);

                SetFocusToFirstBreadcrumbBarItem(breadcrumb, false, true);

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[1].HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[2].HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[3].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3_1' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(breadcrumbItems[4].HasKeyboardFocus, "'Node A_2_3_1' BreadcrumbBarItem should keep the focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[3].HasKeyboardFocus, "'Node A_2_3' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[2].HasKeyboardFocus, "'Node A_2' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[1].HasKeyboardFocus, "'Node A' BreadcrumbBarItem should have focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[0].HasKeyboardFocus, "'Root' BreadcrumbBarItem should have focus");

                // Bug to solve here
                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(breadcrumbItems[0].HasKeyboardFocus, "'Root' BreadcrumbBarItem should keep the focus");

                setup.AllowCleanup();
            }
        }

void NoInteractionTest ( ) [inline]

Definition at line 124 of file BreadcrumbBarTests.cs.

        {
            // This is a sanity test that verifies that the BreadcrumbBar control exists and the basic setup for a test is correct
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                UIObject breadcrumb = RetrieveBreadcrumbControl();
                var breadcrumbItems = breadcrumb.Children;

                Verify.AreEqual(1, breadcrumbItems.Count, "The breadcrumb should contain 1 item.");
            }
        }

UIObject RetrieveBreadcrumbControl ( ) [inline, private]

Definition at line 741 of file BreadcrumbBarTests.cs.

        {
            Log.Comment("Retrieve breadcrumb control as generic UIElement");
            UIObject breadcrumb = FindElement.ByName("BreadcrumbControl");
            Verify.IsNotNull(breadcrumb, "Verifying that we found a UIElement called BreadcrumbControl");

            return breadcrumb;
        }

UIObject RetrieveRTLCheckBox ( bool mustClickCheckBox = false ) [inline, private]

Definition at line 758 of file BreadcrumbBarTests.cs.

        {
            var rtlCheckbox = FindElement.ByName<CheckBox>("RightToLeftCheckbox");
            Verify.IsNotNull(rtlCheckbox, "Verifying that we found a UIElement called RightToLeftCheckbox");

            if (mustClickCheckBox)
            {
                rtlCheckbox.Click();
            }

            return rtlCheckbox;
        }

UIObject RetrieveWidthSlider ( ) [inline, private]

Definition at line 750 of file BreadcrumbBarTests.cs.

        {
            UIObject slider = FindElement.ByName("WidthSlider");
            Verify.IsNotNull(slider, "WidthSlider not found");

            return slider;
        }

void SetFocusToFirstBreadcrumbBarItem | ( | UIObject | breadcrumb,
 |  | bool | isEllipsisVisible = false,
 |  | bool | isRightToLeft = false |
 | ) |  |  | [inline, private]

Definition at line 691 of file BreadcrumbBarTests.cs.

        {
            UIObject anchor = RetrieveRTLCheckBox();
            FocusHelper.SetFocus(anchor);

            int indexToFocus = 0;

            // The RS3 and RS2 behaviours seem a little odd on how many tabs need to be pressed
            bool gotFocus = TryGetFocusForRs2(breadcrumb, indexToFocus, isEllipsisVisible);
            if (!gotFocus)
            {
                gotFocus = TryGetFocusForRs3(breadcrumb, indexToFocus, isEllipsisVisible, isRightToLeft);
                if (!gotFocus)
                {
                    gotFocus = TryGetFocusByPressingTab(breadcrumb, indexToFocus);
                }
            }

            if (isEllipsisVisible)
            {
                Verify.IsTrue(gotFocus, "Ellipsis BreadcrumbBarItem should have focus");
            }
            else
            {
                Verify.IsTrue(gotFocus, "'Root' BreadcrumbBarItem should have focus");
            }
        }

UIObject SetUpCrumbledTest ( ) [inline, private]

Definition at line 576 of file BreadcrumbBarTests.cs.

        {
            var breadcrumb = SetUpTest();

            UIObject slider = RetrieveWidthSlider();
            slider.Click(PointerButtons.Primary, (slider.BoundingRectangle.Width / 3) - 10, slider.BoundingRectangle.Height / 2);

            Verify.AreEqual(6, breadcrumb.Children.Count, "The breadcrumb should contain 6 items: 5 items and ellipsis");

            return breadcrumb;
        }

UIObject SetUpTest ( ) [inline, private]

Definition at line 565 of file BreadcrumbBarTests.cs.

        {
            UIObject breadcrumb = RetrieveBreadcrumbControl();
            ClickOnElements(new string[] { "Node A", "Node A_2", "Node A_2_3", "Node A_2_3_1" });

            var breadcrumbItems = breadcrumb.Children;
            Verify.AreEqual(5, breadcrumbItems.Count, "The breadcrumb should contain 5 items");

            return breadcrumb;
        }

void TestCleanup ( ) [inline]

Definition at line 107 of file BreadcrumbBarTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

bool TryGetFocusByPressingTab | ( | UIObject | breadcrumb,
 |  | int | indexToFocus |
 | ) |  |  | [inline, private]

Definition at line 661 of file BreadcrumbBarTests.cs.

        {
            Log.Comment("Try Set focus by just pressing tab a bunch of times");

            UIObject anchor = RetrieveRTLCheckBox();
            FocusHelper.SetFocus(anchor);

            int tabCount = 0;
            while ((!breadcrumb.Children[indexToFocus].HasKeyboardFocus) && tabCount < 10)
            {
                KeyboardHelper.PressKey(Key.Tab);
                ++tabCount;
            }

            Log.Comment(tabCount + " times was pressed the <TAB> key before the control gained focus");

            bool elementGotFocus = breadcrumb.Children[indexToFocus].HasKeyboardFocus;

            if (elementGotFocus)
            {
                Log.Comment("Got focus pressing <TAB> key");
            }
            else
            {
                Log.Comment("Didn't got focus pressing <TAB> key");
            }

            return elementGotFocus;
        }

bool TryGetFocusForRs2 | ( | UIObject | breadcrumb,
 |  | int | indexToFocus,
 |  | bool | isEllipsisVisible |
 | ) |  |  | [inline, private]

Definition at line 596 of file BreadcrumbBarTests.cs.

        {
            Log.Comment("Try Set focus for RS2 build");

            UIObject anchor = RetrieveRTLCheckBox();
            FocusHelper.SetFocus(anchor);

            // For RS2 we need only one Tab key stroke if the ellipsis is onscreen and 2 if it's not
            KeyboardHelper.PressKey(Key.Tab);

            if (!isEllipsisVisible)
            {
                KeyboardHelper.PressKey(Key.Tab);
            }

            bool elementGotFocus = breadcrumb.Children[indexToFocus].HasKeyboardFocus;

            if (elementGotFocus)
            {
                Log.Comment("Got focus with RS2 way");
            }
            else
            {
                Log.Comment("Didn't got focus with RS2 way");
            }

            return elementGotFocus;
        }

bool TryGetFocusForRs3 | ( | UIObject | breadcrumb,
 |  | int | indexToFocus,
 |  | bool | isEllipsisVisible,
 |  | bool | isRightToLeft |
 | ) |  |  | [inline, private]

Definition at line 625 of file BreadcrumbBarTests.cs.

        {
            Log.Comment("Try Set focus for RS3 build");

            UIObject anchor = RetrieveRTLCheckBox();
            FocusHelper.SetFocus(anchor);

            // For RS3 we need only one Tab key stroke
            KeyboardHelper.PressKey(Key.Tab);

            if (!isEllipsisVisible)
            {
                if (isRightToLeft)
                {
                    KeyboardHelper.PressKey(Key.Left);
                }
                else
                {
                    KeyboardHelper.PressKey(Key.Right);
                }
            }

            bool elementGotFocus = breadcrumb.Children[indexToFocus].HasKeyboardFocus;

            if (elementGotFocus)
            {
                Log.Comment("Got focus with RS3 way");
            }
            else
            {
                Log.Comment("Didn't got focus with RS3 way");
            }

            return elementGotFocus;
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 114 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

void VerifyBreadcrumbBarItemsContain | ( | UICollection< UIObject > | breadcrumbItems,
 |  | string[] | expectedItemValues,
 |  | bool | firstItemIsCurrentItem = false,
 |  | bool | isEllipsisVisible = false |
 | ) |  |  | [inline, private]

Definition at line 771 of file BreadcrumbBarTests.cs.

        {
            // WARNING: this method clicks on each breadcrumb so once the verification has finished,
            // only the ellipsis item and 'Root' should exist

            // As recycled breadcrumbs are not deleted, then we compare that the breadcrumb count is always bigger
            // than the expected values count
            var ellipsisPresentCount = isEllipsisVisible ? 1 : 0;

            Verify.IsTrue(breadcrumbItems.Count - ellipsisPresentCount >= expectedItemValues.Length,
                "The expected values count should at least be one less than the BreadcrumbBarItems count");

            bool mustVerifyItemAsLastItem = firstItemIsCurrentItem;

            // To verify the existence of the expected nodes we click on each of them and verify agains the strings
            // in LastClickedItemIndex and LastClickedItem textboxes.
            for (int i = expectedItemValues.Length - 1; i >= 0; --i)
            {
                var currentItem = breadcrumbItems[i + ellipsisPresentCount];
                Verify.IsNotNull(currentItem, "Current BreadcrumbBarItem should not be null");

                var currentBreadcrumbBarItem = ConvertTo<BreadcrumbBarItem>(currentItem);
                Verify.IsNotNull(currentBreadcrumbBarItem, "UIElement should be a BreadcrumbBarItem");

                currentBreadcrumbBarItem.Click();

                if (mustVerifyItemAsLastItem)
                {
                    Verify.AreEqual(expectedItemValues[i], GetCurrentItemText(currentBreadcrumbBarItem));
                    mustVerifyItemAsLastItem = false;
                }
                else
                {
                    VerifyLastClickedItemIndexIs(i);
                    VerifyLastClickedItemIs(expectedItemValues[i]);
                }
            }
        }

Button VerifyDropDownItemContainsText ( string expectedText ) [inline, private]

Definition at line 810 of file BreadcrumbBarTests.cs.

        {
            Log.Comment("Retrieve the ellipsis item: " + expectedText);

            var dropDownItem = GetDropDownItemByName(expectedText);
            VerifyDropDownItemContainsText(dropDownItem, expectedText);

            return dropDownItem;
        }

void VerifyDropDownItemContainsText | ( | Button | dropDownItem,
 |  | string | expectedEllipsisItemText |
 | ) |  |  | [inline, private]

Definition at line 836 of file BreadcrumbBarTests.cs.

        {
            var ellipsisItemTextBlock = ConvertTo<TextBlock>(dropDownItem.FirstChild);
            Verify.IsNotNull(ellipsisItemTextBlock, "The ellipsis Item should contain a Textblock as first item");

            Verify.AreEqual(expectedEllipsisItemText, ellipsisItemTextBlock.GetText(),
                "The ellipsis item doesn't match " + expectedEllipsisItemText);
        }

void VerifyFlyoutRecycleCrash ( ) [inline]

Definition at line 546 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                UIObject breadcrumb = SetUpCrumbledTest();

                UIObject slider = RetrieveWidthSlider();
                slider.Click(PointerButtons.Primary, 1, slider.BoundingRectangle.Height / 2);

                InvokeEllipsisItem(breadcrumb);

                var ellipsisItemNodeA_2_3 = GetDropDownItemByName("Node A_2_3");
                ellipsisItemNodeA_2_3.Invoke();
                Thread.Sleep(500);

                InvokeEllipsisItem(breadcrumb);
            }
        }

void VerifyLastClickedItemIndexIs ( int expected ) [inline, private]

Definition at line 852 of file BreadcrumbBarTests.cs.

        {
            var lastClickedItemIndex = GetLastClickedItemIndex();
            Verify.AreEqual(expected, lastClickedItemIndex,
                    "The last clicked item index " + lastClickedItemIndex + "doesn't match the expected " + expected);
        }

void VerifyLastClickedItemIs ( string expected ) [inline, private]

Definition at line 845 of file BreadcrumbBarTests.cs.

        {
            var lastClickedItem = GetLastClickedItem();
            Verify.AreEqual(expected, lastClickedItem,
                    "The text in the button " + lastClickedItem + "doesn't match the expected '" + expected + "'");
        }

void VerifyMulticlickCrash ( ) [inline]

Definition at line 518 of file BreadcrumbBarTests.cs.

        {
            using (var setup = new TestSetupHelper("BreadcrumbBar Tests"))
            {
                UIObject breadcrumb = RetrieveBreadcrumbControl();
                ClickOnElements(new string[] { "Node A", "Node A_1" });

                UIObject slider = RetrieveWidthSlider();
                slider.Click(PointerButtons.Primary, 1, slider.BoundingRectangle.Height / 2);

                InvokeEllipsisItem(breadcrumb);

                var ellipsisItemNodeA = VerifyDropDownItemContainsText("Root");
                ellipsisItemNodeA.Invoke();
                Thread.Sleep(500);

                for (int i = 0; i < 5; ++i)
                {
                    breadcrumb.Children[0].Click();

                    VerifyLastClickedItemIndexIs(0);
                    VerifyLastClickedItemIs("Root");
                }
            }
        }

The documentation for this class was generated from the following file:
  • Breadcrumb/InteractionTests/BreadcrumbBarTests.cs
Generated on Sun Dec 1 2024 20:53:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteractionTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ButtonInteractionTests
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions

ButtonInteractionTests Class Reference

List of all members.

Public Types

enum | TestOptions { None = 0, ReleaseInvokeMode = 1, PressInvokeMode = 2, HoverInvokeMode = 3 }

Public Member Functions

void | DoesInvokeWithKeyboard ()
void | DoesNotInvokeWhenClickIsDraggedOffBeforeRelease ()
void | TestCleanup ()
void | ValidateInvokeWithHoverMode ()
void | ValidateInvokeWithPressMode ()
void | ValidateInvokeWithReleaseMode ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Public Attributes

const string | DummyControlAutomationId = "DummyControl"
const string | HoverModeAutomationId = "HoverMode"
const string | InvokeCountTextBlockAutomationId = "InvokeCountTextBlock"
const string | InvokeModeComboBoxAutomationId = "InvokeModeComboBox"
const string | IsHoveringTextBlockAutomationId = "IsHoveringTextBlock"
const string | IsPressingTextBlockAutomationId = "IsPressingTextBlock"
const string | PressModeAutomationId = "PressMode"
const string | ReleaseModeAutomationId = "ReleaseMode"
const string | TargetElementAutomationId = "TargetElement"

Private Member Functions

TestSetupHelper | ButtonInteractionTestSetup (TestOptions options=TestOptions.None)

Detailed Description

Definition at line 26 of file ButtonInteractionTests.cs.

Member Enumeration Documentation

enum TestOptions
Enumerator:
None
ReleaseInvokeMode
PressInvokeMode
HoverInvokeMode

Definition at line 39 of file ButtonInteractionTests.cs.

        {
            None = 0,
            ReleaseInvokeMode = 1,
            PressInvokeMode = 2,
            HoverInvokeMode = 3,
        }

Member Function Documentation

TestSetupHelper ButtonInteractionTestSetup ( TestOptions options = TestOptions.None ) [inline, private]

Definition at line 47 of file ButtonInteractionTests.cs.

        {
            var setupHelper = new TestSetupHelper("ButtonInteraction Tests");

            switch (options)
            {
                case TestOptions.ReleaseInvokeMode:
                    {
                        ComboBox invokeModeComboBox = new ComboBox(FindElement.ById(InvokeModeComboBoxAutomationId));
                        invokeModeComboBox.SelectItemById(ReleaseModeAutomationId);
                    }
                    break;

                case TestOptions.PressInvokeMode:
                    {
                        ComboBox invokeModeComboBox = new ComboBox(FindElement.ById(InvokeModeComboBoxAutomationId));
                        invokeModeComboBox.SelectItemById(PressModeAutomationId);
                    }
                    break;

                case TestOptions.HoverInvokeMode:
                    {
                        ComboBox invokeModeComboBox = new ComboBox(FindElement.ById(InvokeModeComboBoxAutomationId));
                        invokeModeComboBox.SelectItemById(HoverModeAutomationId);
                    }
                    break;
            }

            return setupHelper;
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 82 of file ButtonInteractionTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void DoesInvokeWithKeyboard ( ) [inline]

Definition at line 218 of file ButtonInteractionTests.cs.

        {
            using (var setup = ButtonInteractionTestSetup())
            {
                var targetElement = FindElement.ById(TargetElementAutomationId);
                var invokeCountTextBlock = new TextBlock(FindElement.ById(InvokeCountTextBlockAutomationId));

                Log.Comment("Focus the element.");
                targetElement.SetFocus();
                Wait.ForIdle();

                Log.Comment("Press the SPACE key to invoke the element.");
                targetElement.SendKeys("{SPACE}");
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);

                Log.Comment("Press the ENTER key to invoke the element.");
                targetElement.SendKeys("{ENTER}");
                Verify.AreEqual("2", invokeCountTextBlock.DocumentText);
            }
        }

void DoesNotInvokeWhenClickIsDraggedOffBeforeRelease ( ) [inline]

Definition at line 196 of file ButtonInteractionTests.cs.

        {
            using (var setup = ButtonInteractionTestSetup(TestOptions.ReleaseInvokeMode))
            {
                var targetElement = FindElement.ById(TargetElementAutomationId);
                var invokeCountTextBlock = new TextBlock(FindElement.ById(InvokeCountTextBlockAutomationId));

                Log.Comment("Press the left mouse button on the element.");
                InputHelper.LeftMouseButtonDown(targetElement);
                Verify.AreEqual("0", invokeCountTextBlock.DocumentText);

                Log.Comment("Move the mouse off the element.");
                InputHelper.MoveMouse(targetElement, targetElement.BoundingRectangle.Width + 10, 0);
                Verify.AreEqual("0", invokeCountTextBlock.DocumentText);

                Log.Comment("Release the left mouse button off the element.");
                InputHelper.LeftMouseButtonUp(targetElement);
                Verify.AreEqual("0", invokeCountTextBlock.DocumentText);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 88 of file ButtonInteractionTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ValidateInvokeWithHoverMode ( ) [inline]

Definition at line 166 of file ButtonInteractionTests.cs.

        {
            using (var setup = ButtonInteractionTestSetup(TestOptions.HoverInvokeMode))
            {
                var targetElement = FindElement.ById(TargetElementAutomationId);
                var invokeCountTextBlock = new TextBlock(FindElement.ById(InvokeCountTextBlockAutomationId));
                var isPressingTextBlock = new TextBlock(FindElement.ById(IsPressingTextBlockAutomationId));
                var isHoveringTextBlock = new TextBlock(FindElement.ById(IsHoveringTextBlockAutomationId));

                Log.Comment("Start with mouse not over the element.");
                InputHelper.MoveMouse(targetElement, targetElement.BoundingRectangle.Width - 10, 0);
                Verify.AreEqual("0", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("False", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);

                Log.Comment("Move the mouse onto the element.");
                InputHelper.MoveMouse(targetElement, 0, 0);
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("True", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("True", isPressingTextBlock.DocumentText);

                Log.Comment("Move the mouse off the element.");
                InputHelper.MoveMouse(targetElement, targetElement.BoundingRectangle.Width + 10, 0);
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("False", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);
            }
        }

void ValidateInvokeWithPressMode ( ) [inline]

Definition at line 130 of file ButtonInteractionTests.cs.

        {
            using (var setup = ButtonInteractionTestSetup(TestOptions.PressInvokeMode))
            {
                var targetElement = FindElement.ById(TargetElementAutomationId);
                var invokeCountTextBlock = new TextBlock(FindElement.ById(InvokeCountTextBlockAutomationId));
                var isPressingTextBlock = new TextBlock(FindElement.ById(IsPressingTextBlockAutomationId));
                var isHoveringTextBlock = new TextBlock(FindElement.ById(IsHoveringTextBlockAutomationId));

                Log.Comment("Start with mouse not over the element.");
                InputHelper.MoveMouse(targetElement, targetElement.BoundingRectangle.Width - 10, 0);
                Verify.AreEqual("0", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("False", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);

                Log.Comment("Press the left mouse button on the element.");
                InputHelper.LeftMouseButtonDown(targetElement);
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("True", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("True", isPressingTextBlock.DocumentText);

                Log.Comment("Release the left mouse button on the element.");
                InputHelper.LeftMouseButtonUp(targetElement);
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("True", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);

                Log.Comment("Move the mouse off the element.");
                InputHelper.MoveMouse(targetElement, targetElement.BoundingRectangle.Width + 10, 0);
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("False", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);
            }
        }

void ValidateInvokeWithReleaseMode ( ) [inline]

Definition at line 94 of file ButtonInteractionTests.cs.

        {
            using (var setup = ButtonInteractionTestSetup(TestOptions.ReleaseInvokeMode))
            {
                var targetElement = FindElement.ById(TargetElementAutomationId);
                var invokeCountTextBlock = new TextBlock(FindElement.ById(InvokeCountTextBlockAutomationId));
                var isPressingTextBlock = new TextBlock(FindElement.ById(IsPressingTextBlockAutomationId));
                var isHoveringTextBlock = new TextBlock(FindElement.ById(IsHoveringTextBlockAutomationId));

                Log.Comment("Start with mouse not over the element.");
                InputHelper.MoveMouse(targetElement, targetElement.BoundingRectangle.Width - 10, 0);
                Verify.AreEqual("0", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("False", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);

                Log.Comment("Press the left mouse button on the element.");
                InputHelper.LeftMouseButtonDown(targetElement);
                Verify.AreEqual("0", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("True", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("True", isPressingTextBlock.DocumentText);

                Log.Comment("Release the left mouse button on the element.");
                InputHelper.LeftMouseButtonUp(targetElement);
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("True", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);

                Log.Comment("Move the mouse off the element.");
                InputHelper.MoveMouse(targetElement, targetElement.BoundingRectangle.Width + 10, 0);
                Verify.AreEqual("1", invokeCountTextBlock.DocumentText);
                Verify.AreEqual("False", isHoveringTextBlock.DocumentText);
                Verify.AreEqual("False", isPressingTextBlock.DocumentText);
            }
        }

Member Data Documentation

const string DummyControlAutomationId = "DummyControl"

Definition at line 29 of file ButtonInteractionTests.cs.

const string HoverModeAutomationId = "HoverMode"

Definition at line 36 of file ButtonInteractionTests.cs.

const string InvokeCountTextBlockAutomationId = "InvokeCountTextBlock"

Definition at line 30 of file ButtonInteractionTests.cs.

const string InvokeModeComboBoxAutomationId = "InvokeModeComboBox"

Definition at line 31 of file ButtonInteractionTests.cs.

const string IsHoveringTextBlockAutomationId = "IsHoveringTextBlock"

Definition at line 32 of file ButtonInteractionTests.cs.

const string IsPressingTextBlockAutomationId = "IsPressingTextBlock"

Definition at line 33 of file ButtonInteractionTests.cs.

const string PressModeAutomationId = "PressMode"

Definition at line 35 of file ButtonInteractionTests.cs.

const string ReleaseModeAutomationId = "ReleaseMode"

Definition at line 34 of file ButtonInteractionTests.cs.

const string TargetElementAutomationId = "TargetElement"

Definition at line 28 of file ButtonInteractionTests.cs.

The documentation for this class was generated from the following file:
  • Interactions/ButtonInteraction/InteractionTests/ButtonInteractionTests.cs
Generated on Sun Dec 1 2024 20:53:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorChangedEventWaiter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorChangedEventWaiter
Public Member Functions | Private Attributes

ColorChangedEventWaiter Class Reference

List of all members.

Public Member Functions

ColorChangedEventWaiter ()
override void | Dispose ()
override bool | TryWait (TimeSpan timeout)

Private Attributes

ValueChangedEventWaiter | blueOrValueChangedWaiter
ValueChangedEventWaiter | greenOrSaturationChangedWaiter
ValueChangedEventWaiter | redOrHueChangedWaiter

Detailed Description

Definition at line 158 of file ColorPickerTests.cs.

Constructor & Destructor Documentation

ColorChangedEventWaiter ( ) [inline]

Definition at line 164 of file ColorPickerTests.cs.

        {
            string redOrHueTextBoxAutomationId = null;
            string greenOrSaturationTextBoxAutomationId = null;
            string blueOrValueTextBoxAutomationId = null;

            ColorChannels currentSelectedChannels = ColorPickerTests.GetCurrentlySelectedChannels();

            if (currentSelectedChannels == ColorChannels.RGB)
            {
                redOrHueTextBoxAutomationId = ColorPickerTests.RedTextBoxAutomationId;
                greenOrSaturationTextBoxAutomationId = ColorPickerTests.GreenTextBoxAutomationId;
                blueOrValueTextBoxAutomationId = ColorPickerTests.BlueTextBoxAutomationId;
            }
            else
            {
                redOrHueTextBoxAutomationId = ColorPickerTests.HueTextBoxAutomationId;
                greenOrSaturationTextBoxAutomationId = ColorPickerTests.SaturationTextBoxAutomationId;
                blueOrValueTextBoxAutomationId = ColorPickerTests.ValueTextBoxAutomationId;
            }

            redOrHueChangedWaiter = new ValueChangedEventWaiter(new Edit(FindElement.ById(redOrHueTextBoxAutomationId)));
            greenOrSaturationChangedWaiter = new ValueChangedEventWaiter(new Edit(FindElement.ById(greenOrSaturationTextBoxAutomationId)));
            blueOrValueChangedWaiter = new ValueChangedEventWaiter(new Edit(FindElement.ById(blueOrValueTextBoxAutomationId)));
        }

Member Function Documentation

override void Dispose ( ) [inline]

Definition at line 190 of file ColorPickerTests.cs.

        {
            redOrHueChangedWaiter.Dispose();
            greenOrSaturationChangedWaiter.Dispose();
            blueOrValueChangedWaiter.Dispose();
        }

override bool TryWait ( TimeSpan timeout ) [inline]

Definition at line 197 of file ColorPickerTests.cs.

        {
            return CompositableWaiter.TryWaitAny(timeout, redOrHueChangedWaiter, greenOrSaturationChangedWaiter, blueOrValueChangedWaiter) != null;
        }

Member Data Documentation

ValueChangedEventWaiter blueOrValueChangedWaiter [private]

Definition at line 162 of file ColorPickerTests.cs.

ValueChangedEventWaiter greenOrSaturationChangedWaiter [private]

Definition at line 161 of file ColorPickerTests.cs.

ValueChangedEventWaiter redOrHueChangedWaiter [private]

Definition at line 160 of file ColorPickerTests.cs.

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerSlider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorPickerSlider
Classes | Public Member Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes

ColorPickerSlider Class Reference

List of all members.

Classes

class | ColorPickerSliderFactory

Public Member Functions

ColorPickerSlider (UIObject uiObject)
ColorChangedEventWaiter GetColorChangedWaiter ()
virtual void | SetValue (string value)

Properties

new static IFactory
< ColorPickerSlider > 		Factory [get]
virtual bool | IsReadOnly [get]
virtual string | Value [get]

Private Member Functions

void | Initialize ()

Private Attributes

IValue | _valuePattern

Static Private Attributes

static IFactory
< ColorPickerSlider > 		_factory = null

Detailed Description

Definition at line 92 of file ColorPickerTests.cs.

Constructor & Destructor Documentation

ColorPickerSlider ( UIObject uiObject ) [inline]

Definition at line 94 of file ColorPickerTests.cs.

            : base(uiObject)
        {
            this.Initialize();
        }

Member Function Documentation

ColorChangedEventWaiter GetColorChangedWaiter ( ) [inline]

Definition at line 105 of file ColorPickerTests.cs.

        {
            return new ColorChangedEventWaiter();
        }

void Initialize ( ) [inline, private]

Definition at line 100 of file ColorPickerTests.cs.

        {
            _valuePattern = new ValueImplementation(this);
        }

virtual void SetValue ( string value ) [inline, virtual]

Definition at line 110 of file ColorPickerTests.cs.

        {
            _valuePattern.SetValue(value);
        }

Member Data Documentation

IFactory<ColorPickerSlider> _factory = null [static, private]

Definition at line 144 of file ColorPickerTests.cs.

IValue _valuePattern [private]

Definition at line 143 of file ColorPickerTests.cs.

Property Documentation

new static IFactory<ColorPickerSlider> Factory [static, get]

Definition at line 132 of file ColorPickerTests.cs.

virtual bool IsReadOnly [get]

Definition at line 124 of file ColorPickerTests.cs.

virtual string Value [get]

Definition at line 116 of file ColorPickerTests.cs.

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerSlider::ColorPickerSliderFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorPickerSlider
  • ColorPickerSlider::ColorPickerSliderFactory
Public Member Functions

ColorPickerSlider::ColorPickerSliderFactory Class Reference

List of all members.

Public Member Functions

ColorPickerSlider Create (UIObject element)

Detailed Description

Definition at line 146 of file ColorPickerTests.cs.

Member Function Documentation

ColorPickerSlider Create ( UIObject element ) [inline]

Definition at line 148 of file ColorPickerTests.cs.

            {
                return new ColorPickerSlider(element);
            }

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorPickerTests
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions

ColorPickerTests Class Reference

List of all members.

Classes

class | Color
class | ColorPickerTestSetupHelper

Public Types

enum TestOptions {
None = 0, EnableAlpha = 1, EnableMoreButton = 2, EnableNonEnglishLanguage = 4,
DisableColorSpectrumLoadWait = 8
}

Public Member Functions

void | CanChangeColorThroughHexTextEntry ()
void | CanChangeColorThroughHsvTextEntry ()
void | CanChangeColorThroughOpacityTextEntry ()
void | CanChangeColorThroughRgbTextEntry ()
void | CanSelectColorFromSpectrumLTR ()
void | CanSelectColorFromSpectrumRTL ()
void | CanSelectPreviousColor ()
void | CanUseKeyboardToInteractColorSpectrumRTL ()
void | CanUseKeyboardToInteractSlidersRTL ()
void | CanUseKeyboardToInteractWithColorSpectrum (bool isRTL)
void | CanUseKeyboardToInteractWithColorSpectrumLTR ()
void | CanUseKeyboardToInteractWithSliders (bool isRTL, bool shouldTryUpAndDown=false, bool shouldOrientationBeHorizontal=false)
void | CanUseKeyboardToInteractWithSlidersLTR ()
void | CanUseKeyboardToInteractWithSlidersLTRHorizontalOrientation ()
void | CanUseKeyboardToInteractWithSlidersRTLHorizontalOrientation ()
void | CanUseKeyboardToInteractWithTextBoxesForAlpha (bool isRTL)
void | CanUseKeyboardToInteractWithTextBoxesForAlphaLTR ()
void | CanUseKeyboardToInteractWithTextBoxesForAlphaRTL ()
void | CanUseKeyboardToInteractWithTextBoxesForHex (bool isRTL)
void | CanUseKeyboardToInteractWithTextBoxesForHexLTR ()
void | CanUseKeyboardToInteractWithTextBoxesForHexRTL ()
void | CanUseKeyboardToInteractWithTextBoxesForHSV (bool isRTL)
void | CanUseKeyboardToInteractWithTextBoxesForHSVLTR ()
void | CanUseKeyboardToInteractWithTextBoxesForHSVRTL ()
void | CanUseKeyboardToInteractWithTextBoxesForRGB (bool isRTL)
void | CanUseKeyboardToInteractWithTextBoxesForRGBLTR ()
void | CanUseKeyboardToInteractWithTextBoxesForRGBRTL ()
void | SelectionEllipseChangesColorAccordingToSelectedColor ()
void | TestCleanup ()
void | ValidateNoCrashWhenWhenColorSpectrumInvisibleAndColorChanged ()
void | VerifyAutomationNamesAreCorrect ()
void | VerifyCanChangeColorWithTouchWithoutPanning ()
void | VerifyColorSpectrumAutomationValuesAreCorrect ()
void | VerifyEllipsePositionIsClampedToSpectrumBounds ()
void | VerifyHexStringAndColorAreInSync ()
void | VerifyHsvUpdatesOnSpectrumSelection ()
void | VerifyInvalidTextEntryIsReverted ()
void | VerifyMoreButtonRespondsToThemeChanges ()
void | VerifyMoreButtonShowsAndHidesTextInputFields ()
void | VerifySpectrumTakesFocusOnPointerPress ()
void | VerifyStringsAreLocalizedCorrectly ()
void | VerifyTabFocusOrder ()
void | VerifyThirdDimensionSliderAutomationValuesAreCorrect ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)
static ColorChannels | GetCurrentlySelectedChannels ()

Public Attributes

const string | AlphaLabelAutomationId = "AlphaLabel"
const string | AlphaSliderAutomationId = "AlphaSlider"
const string | AlphaTextBoxAutomationId = "AlphaTextBox"
const string | BlueLabelAutomationId = "BlueLabel"
const string | BlueTextBoxAutomationId = "BlueTextBox"
const string | ColorRepresentationComboBoxAutomationId = "ColorRepresentationComboBox"
const string | ColorSpectrumAutomationId = "ColorSpectrum"
const string | GreenLabelAutomationId = "GreenLabel"
const string | GreenTextBoxAutomationId = "GreenTextBox"
const string | HexTextBoxAutomationId = "HexTextBox"
const string | HSVComboBoxItemAutomationId = "HSVComboBoxItem"
const string | HueLabelAutomationId = "HueLabel"
const string | HueTextBoxAutomationId = "HueTextBox"
const string | MoreButtonAutomationId = "MoreButton"
const string | MoreButtonLabelAutomationId = "MoreButtonLabel"
const string | RedLabelAutomationId = "RedLabel"
const string | RedTextBoxAutomationId = "RedTextBox"
const string | RGBComboBoxItemAutomationId = "RGBComboBoxItem"
const string | SaturationLabelAutomationId = "SaturationLabel"
const string | SaturationTextBoxAutomationId = "SaturationTextBox"
const string | ThirdDimensionAutomationId = "ThirdDimensionSlider"
const string | ValueLabelAutomationId = "ValueLabel"
const string | ValueTextBoxAutomationId = "ValueTextBox"

Private Member Functions

void | CanSelectColorFromSpectrum (ColorPickerTestSetupHelper setup, bool isRTL)
bool | GetIsRTL ()
void | GetLocalizedText (IList< string > stringList)
void | PressKeyAndWaitForColorChange (Key key, ModifierKey modifierKey=ModifierKey.None, uint numPresses=1)
void | SelectTextBoxes (ColorChannels channels)
void | SetColorSpectrumColor (int red, int green, int blue, int alpha=255)
void | SetIsAlphaEnabled (bool isAlphaEnabled)
void | SetIsHorizontalOrientation (bool shouldBeHorizontal)
void | SetIsMoreButtonEnabled (bool isMoreButtonEnabled)
void | SetIsRTL (bool isRTL)
void | SetMaxSaturation (double maxSaturation)
void | SetMaxValue (double maxValue)
void | SetMinSaturation (double minSaturation)
void | SetMinValue (double minValue)
void | SetSaturation (RangeValueSlider saturationSlider, double saturation)
ColorPickerTestSetupHelper | SetupColorPickerTest (TestOptions options=TestOptions.None)
void | SetValue (RangeValueSlider valueSlider, double value)
void | TapOnColorSpectrum (double xPercent, double yPercent)
void | TapOnColorSpectrumAndWaitForColorChange (double xPercent, double yPercent)
void | VerifyColorIsSelected (int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255)
void | VerifyColorIsSelectedCore (int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha, int allowedMargin)
void | VerifyColorNameIsSelected (string expectedName)
void | VerifyElementIsFocused (string expectedFocusedElement)
void | VerifyPreviousColorIsEqualTo (int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255)
void | VerifyPreviousColorIsNull ()
void | VerifySelectedColorIsNear (int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255)
void | VerifySelectionEllipseColorIsEqualTo (int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255)
void | VerifySelectionEllipseIsNear (double expectedX, double expectedY)
void | VerifySelectionEllipsePosition (double expectedX, double expectedY)
void | VerifySelectionEllipsePositionCore (double expectedX, double expectedY, double allowedMargin)
void | WriteInTextBox (string textBoxName, string s)

Detailed Description

Definition at line 210 of file ColorPickerTests.cs.

Member Enumeration Documentation

enum TestOptions
Enumerator:
None
EnableAlpha
EnableMoreButton
EnableNonEnglishLanguage
DisableColorSpectrumLoadWait

Definition at line 237 of file ColorPickerTests.cs.

        {
            None = 0,
            EnableAlpha = 1,
            EnableMoreButton = 2,
            EnableNonEnglishLanguage = 4,
            DisableColorSpectrumLoadWait = 8
        }

Member Function Documentation

void CanChangeColorThroughHexTextEntry ( ) [inline]

Definition at line 601 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                WriteInTextBox(HexTextBoxAutomationId, "#7F7F7F7F");
                VerifyColorIsSelected(127, 127, 127, 127);
            }
        }

void CanChangeColorThroughHsvTextEntry ( ) [inline]

Definition at line 574 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.DisableColorSpectrumLoadWait))
            {
                WriteInTextBox(HueTextBoxAutomationId, "120");
                VerifyColorIsSelected(0, 255, 0);
                WriteInTextBox(HueTextBoxAutomationId, "240");
                VerifyColorIsSelected(0, 0, 255);
                WriteInTextBox(SaturationTextBoxAutomationId, "50");
                VerifyColorIsSelected(128, 128, 255);
                WriteInTextBox(SaturationTextBoxAutomationId, "100");
                WriteInTextBox(ValueTextBoxAutomationId, "50");
                VerifyColorIsSelected(0, 0, 128);
            }
        }

void CanChangeColorThroughOpacityTextEntry ( ) [inline]

Definition at line 591 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                WriteInTextBox(AlphaTextBoxAutomationId, "50%");
                VerifyColorIsSelected(255, 0, 0, 128);
            }
        }

void CanChangeColorThroughRgbTextEntry ( ) [inline]

Definition at line 560 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.DisableColorSpectrumLoadWait))
            {
                WriteInTextBox(RedTextBoxAutomationId, "128");
                VerifyColorIsSelected(128, 0, 0);
                WriteInTextBox(GreenTextBoxAutomationId, "128");
                VerifyColorIsSelected(128, 128, 0);
                WriteInTextBox(BlueTextBoxAutomationId, "128");
                VerifyColorIsSelected(128, 128, 128);
            }
        }

void CanSelectColorFromSpectrum | ( | ColorPickerTestSetupHelper | setup,
 |  | bool | isRTL |
 | ) |  |  | [inline, private]

Definition at line 480 of file ColorPickerTests.cs.

        {
            SetIsRTL(isRTL);

            // We snap to the nearest HSV value and then derive the RGB value and ellipse position from that,
            // so we're bound to run into rounding errors along the way, which is what accounts for the slightly
            // different values we get in RTL where our x-axis is flipped.
            setup.ExecuteAndWaitForColorChange(() => TapOnColorSpectrumAndWaitForColorChange(0.5, 0.5));
            VerifySelectedColorIsNear(127, 255, 252);
            VerifySelectionEllipseIsNear(127, 127);
            setup.ExecuteAndWaitForColorChange(() => TapOnColorSpectrumAndWaitForColorChange(0.25, 0.25));
            VerifySelectedColorIsNear(163, isRTL ? 63 : 255, isRTL ? 255 : 63);
            VerifySelectionEllipseIsNear(isRTL ? 194 : 63, 63);
            setup.ExecuteAndWaitForColorChange(() => TapOnColorSpectrumAndWaitForColorChange(0.75, 0.25));
            VerifySelectedColorIsNear(151, isRTL ? 255 : 63, isRTL ? 63 : 255);
            VerifySelectionEllipseIsNear(isRTL ? 66 : 191, 63);
            setup.ExecuteAndWaitForColorChange(() => TapOnColorSpectrumAndWaitForColorChange(0.25, 0.75));
            VerifySelectedColorIsNear(224, isRTL ? 191 : 255, isRTL ? 255 : 191);
            VerifySelectionEllipseIsNear(isRTL ? 194 : 63, 192);
            setup.ExecuteAndWaitForColorChange(() => TapOnColorSpectrumAndWaitForColorChange(0.75, 0.75));
            VerifySelectedColorIsNear(220, isRTL ? 255 : 191, isRTL ? 191 : 255);
            VerifySelectionEllipseIsNear(isRTL ? 66 : 191, 192);
        }

void CanSelectColorFromSpectrumLTR ( ) [inline]

Definition at line 463 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                CanSelectColorFromSpectrum(setup, false /* isRTL */);
            }
        }

void CanSelectColorFromSpectrumRTL ( ) [inline]

Definition at line 472 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                CanSelectColorFromSpectrum(setup, true /* isRTL */);
            }
        }

void CanSelectPreviousColor ( ) [inline]

Definition at line 542 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.DisableColorSpectrumLoadWait))
            {
                VerifyPreviousColorIsNull();

                Button previousColorRedButton = new Button(FindElement.ById("PreviousColorRedButton"));
                previousColorRedButton.Invoke();
                VerifyPreviousColorIsEqualTo(255, 0, 0);

                SetColorSpectrumColor(128, 255, 255);
                Button previousColorCurrentColorButton = new Button(FindElement.ById("PreviousColorCurrentColorButton"));
                previousColorCurrentColorButton.Invoke();
                VerifyPreviousColorIsEqualTo(128, 255, 255);
            }
        }

void CanUseKeyboardToInteractColorSpectrumRTL ( ) [inline]

Definition at line 637 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithColorSpectrum(isRTL: true);
        }

void CanUseKeyboardToInteractSlidersRTL ( ) [inline]

Definition at line 657 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithSliders(isRTL: true);
            CanUseKeyboardToInteractWithSliders(isRTL: false, shouldTryUpAndDown: true);
        }

void CanUseKeyboardToInteractWithColorSpectrum ( bool isRTL ) [inline]

Definition at line 718 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha))
            {
                SetIsRTL(isRTL);

                Log.Comment("Give initial keyboard focus to the color spectrum.");
                FindElement.ById(ColorSpectrumAutomationId).SetFocus();
                Wait.ForIdle();

                VerifyElementIsFocused(ColorSpectrumAutomationId);
                VerifySelectionEllipsePosition(0, 0);

                Log.Comment("Keyboard to the right and left first.  We expect this to change the hue by 1 each time (+/- 4 to one RGB channel), applying wrapping.");
                PressKeyAndWaitForColorChange(isRTL ? Key.Left : Key.Right);
                VerifyColorIsSelected(255, 4, 0);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(1, 0);
                PressKeyAndWaitForColorChange(isRTL ? Key.Right : Key.Left);
                VerifyColorIsSelected(255, 0, 0);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(0, 0);
                PressKeyAndWaitForColorChange(isRTL ? Key.Right : Key.Left);
                VerifyColorIsSelected(255, 0, 4);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(256, 0);
                PressKeyAndWaitForColorChange(isRTL ? Key.Left : Key.Right);
                VerifyColorIsSelected(255, 0, 0);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(0, 0);

                Log.Comment("Now hold control and keyboard to the right and left again.  We expect this to jump to the next named color each time, applying wrapping.");
                PressKeyAndWaitForColorChange(isRTL ? Key.Left : Key.Right, ModifierKey.Control);
                VerifyColorIsSelected(255, 119, 0);
                VerifyColorNameIsSelected("Orange");
                VerifySelectionEllipsePosition(20, 0);
                PressKeyAndWaitForColorChange(isRTL ? Key.Right : Key.Left, ModifierKey.Control);
                VerifyColorIsSelected(255, 0, 13);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 0);
                PressKeyAndWaitForColorChange(isRTL ? Key.Right : Key.Left, ModifierKey.Control);
                VerifyColorIsSelected(255, 0, 170);
                VerifyColorNameIsSelected("Pink");
                VerifySelectionEllipsePosition(228, 0);
                PressKeyAndWaitForColorChange(isRTL ? Key.Left : Key.Right, ModifierKey.Control);
                VerifyColorIsSelected(255, 0, 13);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 0);

                Log.Comment("Next, keyboard up and down.  We expect this to change the saturation by 1 each time (+/- 2.5 to both non-max RGB channels), applying wrapping.");
                PressKeyAndWaitForColorChange(Key.Down);
                VerifyColorIsSelected(255, 3, 15);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 3);
                PressKeyAndWaitForColorChange(Key.Up);
                VerifyColorIsSelected(255, 0, 13);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 0);
                PressKeyAndWaitForColorChange(Key.Up);
                VerifyColorIsSelected(255, 255, 255);
                VerifyColorNameIsSelected("White");
                VerifySelectionEllipsePosition(255, 256);
                PressKeyAndWaitForColorChange(Key.Down);
                VerifyColorIsSelected(255, 0, 13);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 0);

                Log.Comment("Now hold control keyboard up and down again.  We expect this to jump to the next named color each time, applying wrapping.");
                PressKeyAndWaitForColorChange(Key.Down, ModifierKey.Control);
                VerifyColorIsSelected(255, 153, 158);
                VerifyColorNameIsSelected("Rose");
                VerifySelectionEllipsePosition(255, 154);
                PressKeyAndWaitForColorChange(Key.Up, ModifierKey.Control);
                VerifyColorIsSelected(255, 38, 49);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 38);
                PressKeyAndWaitForColorChange(Key.Up, ModifierKey.Control);
                VerifyColorIsSelected(255, 242, 243);
                VerifyColorNameIsSelected("White");
                VerifySelectionEllipsePosition(255, 243);
                PressKeyAndWaitForColorChange(Key.Down, ModifierKey.Control);
                VerifyColorIsSelected(255, 41, 52);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 41);
                PressKeyAndWaitForColorChange(Key.Down, ModifierKey.Control);
                VerifyColorIsSelected(255, 153, 158);
                VerifyColorNameIsSelected("Rose");
                VerifySelectionEllipsePosition(255, 154);
                PressKeyAndWaitForColorChange(Key.Up, ModifierKey.Control);
                VerifyColorIsSelected(255, 38, 49);
                VerifyColorNameIsSelected("Red");
                VerifySelectionEllipsePosition(255, 38);
            }
        }

void CanUseKeyboardToInteractWithColorSpectrumLTR ( ) [inline]

Definition at line 631 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithColorSpectrum(isRTL: false);
        }

void CanUseKeyboardToInteractWithSliders | ( | bool | isRTL,
 |  | bool | shouldTryUpAndDown = false,
 |  | bool | shouldOrientationBeHorizontal = false |
 | ) |  |  | [inline]

Definition at line 813 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                SetIsRTL(isRTL);
                SetIsHorizontalOrientation(shouldOrientationBeHorizontal);
                Key increaseKey = shouldTryUpAndDown ? Key.Up : isRTL ? Key.Left : Key.Right;
                Key decreaseKey = shouldTryUpAndDown ? Key.Down : isRTL ? Key.Right : Key.Left;

                Log.Comment("Initialize the color to what it was at the end of CanUseKeyboardToInteractWithColorSpectrum.");
                SetColorSpectrumColor(255, 38, 49);

                Log.Comment("Give initial keyboard focus to the color spectrum.");
                FindElement.ById(ColorSpectrumAutomationId).SetFocus();
                Wait.ForIdle();

                Log.Comment("Give keyboard focus to the value slider using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(ThirdDimensionAutomationId);

                Log.Comment("Keyboard to the right and left first.  We expect this to change the value by 1 each time (+/- 2.5 to the max RGB channel), but not wrap.");
                KeyboardHelper.PressKey(decreaseKey);
                VerifyColorIsSelected(252, 38, 49);
                VerifyColorNameIsSelected("Red");
                KeyboardHelper.PressKey(increaseKey);
                VerifyColorIsSelected(255, 38, 49);
                VerifyColorNameIsSelected("Red");
                KeyboardHelper.PressKey(increaseKey);
                VerifyColorIsSelected(255, 38, 49);
                VerifyColorNameIsSelected("Red");

                Log.Comment("Now hold control and keyboard to the right and left again.  We expect this to jump to the next named color each time, but not wrap.");
                KeyboardHelper.PressKey(decreaseKey, ModifierKey.Control);
                VerifyColorIsSelected(102, 15, 20);
                VerifyColorNameIsSelected("Dark red");
                KeyboardHelper.PressKey(decreaseKey, ModifierKey.Control);
                VerifyColorIsSelected(15, 2, 3);
                VerifyColorNameIsSelected("Black");
                KeyboardHelper.PressKey(decreaseKey, ModifierKey.Control);
                VerifyColorIsSelected(0, 0, 0);
                VerifyColorNameIsSelected("Black");
                KeyboardHelper.PressKey(increaseKey, ModifierKey.Control);
                VerifyColorIsSelected(105, 16, 20);
                VerifyColorNameIsSelected("Dark red");
                KeyboardHelper.PressKey(increaseKey, ModifierKey.Control);
                VerifyColorIsSelected(214, 32, 41);
                VerifyColorNameIsSelected("Red");
                KeyboardHelper.PressKey(increaseKey, ModifierKey.Control);
                VerifyColorIsSelected(255, 38, 49);
                VerifyColorNameIsSelected("Red");

                Log.Comment("Give keyboard focus to the alpha slider using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(AlphaSliderAutomationId);

                Log.Comment("Keyboard to the right and left first.  We expect this to change the alpha by 2.5 each time, but not wrap.");
                KeyboardHelper.PressKey(decreaseKey);
                VerifyColorIsSelected(255, 38, 49, 252);
                KeyboardHelper.PressKey(increaseKey);
                VerifyColorIsSelected(255, 38, 49, 255);
                KeyboardHelper.PressKey(increaseKey);
                VerifyColorIsSelected(255, 38, 49, 255);

                Log.Comment("Now hold control and keyboard to the right and left again.  We expect this to change the alpha by 25 each time, but not wrap.  We also expect us to snap to multiples of 10 if we're between them.");
                KeyboardHelper.PressKey(decreaseKey, ModifierKey.Control);
                VerifyColorIsSelected(255, 38, 49, 230);
                KeyboardHelper.PressKey(increaseKey);
                VerifyColorIsSelected(255, 38, 49, 232);
                KeyboardHelper.PressKey(decreaseKey, ModifierKey.Control);
                VerifyColorIsSelected(255, 38, 49, 230);
                KeyboardHelper.PressKey(increaseKey, ModifierKey.Control);
                VerifyColorIsSelected(255, 38, 49, 255);
            }
        }

void CanUseKeyboardToInteractWithSlidersLTR ( ) [inline]

Definition at line 643 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithSliders(isRTL: false);
            CanUseKeyboardToInteractWithSliders(isRTL: false, shouldTryUpAndDown: true);
        }

void CanUseKeyboardToInteractWithSlidersLTRHorizontalOrientation ( ) [inline]

Definition at line 650 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithSliders(isRTL: false, shouldOrientationBeHorizontal: true);
            CanUseKeyboardToInteractWithSliders(isRTL: false, shouldTryUpAndDown: true, shouldOrientationBeHorizontal: true);
        }

void CanUseKeyboardToInteractWithSlidersRTLHorizontalOrientation ( ) [inline]

Definition at line 664 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithSliders(isRTL: true, shouldOrientationBeHorizontal: true);
            CanUseKeyboardToInteractWithSliders(isRTL: true, shouldTryUpAndDown: true, shouldOrientationBeHorizontal: true);
        }

void CanUseKeyboardToInteractWithTextBoxesForAlpha ( bool isRTL ) [inline]

Definition at line 929 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                SetIsRTL(isRTL);

                Log.Comment("Initialize the color to a known value.");
                SetColorSpectrumColor(255, 0, 0);

                Log.Comment("Give initial keyboard focus to alpha text box.");
                FindElement.ById(AlphaTextBoxAutomationId).SetFocus();
                Wait.ForIdle();

                Log.Comment("Select the current text, and then type in a new number.");
                Edit alphaTextBox = new Edit(FindElement.ById(AlphaTextBoxAutomationId));
                alphaTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(alphaTextBox, "50%");
                VerifyColorIsSelected(255, 0, 0, 128);
            }
        }

void CanUseKeyboardToInteractWithTextBoxesForAlphaLTR ( ) [inline]

Definition at line 683 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForAlpha(isRTL: false);
        }

void CanUseKeyboardToInteractWithTextBoxesForAlphaRTL ( ) [inline]

Definition at line 689 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForAlpha(isRTL: true);
        }

void CanUseKeyboardToInteractWithTextBoxesForHex ( bool isRTL ) [inline]

Definition at line 994 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                SetIsRTL(isRTL);

                Log.Comment("Give keyboard focus to the hex text box.");
                FindElement.ById(HexTextBoxAutomationId).SetFocus();
                Wait.ForIdle();

                Log.Comment("Select the current text, and then type in a new number.");
                Edit hexTextBox = new Edit(FindElement.ById(HexTextBoxAutomationId));
                hexTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(hexTextBox, "#FFFF0000");
                VerifyColorIsSelected(255, 0, 0);
            }
        }

void CanUseKeyboardToInteractWithTextBoxesForHexLTR ( ) [inline]

Definition at line 707 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForHex(isRTL: false);
        }

void CanUseKeyboardToInteractWithTextBoxesForHexRTL ( ) [inline]

Definition at line 713 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForHex(isRTL: true);
        }

void CanUseKeyboardToInteractWithTextBoxesForHSV ( bool isRTL ) [inline]

Definition at line 950 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                SetIsRTL(isRTL);

                Log.Comment("Give initial keyboard focus to the color representation combobox.");
                FindElement.ById(ColorRepresentationComboBoxAutomationId).SetFocus();

                Log.Comment("Switch to HSV by pressing down.");
                KeyboardHelper.PressKey(Key.Down);

                Log.Comment("Give keyboard focus to the hue text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(HueTextBoxAutomationId);

                Log.Comment("Select the current text, and then type in a new number.");
                Edit hueTextBox = new Edit(FindElement.ById(HueTextBoxAutomationId));
                hueTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(hueTextBox, "120");
                VerifyColorIsSelected(0, 255, 0);

                Log.Comment("Give keyboard focus to the saturation text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(SaturationTextBoxAutomationId);

                Log.Comment("Select the current text, and then type in a new number.");
                Edit saturationTextBox = new Edit(FindElement.ById(SaturationTextBoxAutomationId));
                saturationTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(saturationTextBox, "50");
                VerifyColorIsSelected(128, 255, 128);

                Log.Comment("Give keyboard focus to the value text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(ValueTextBoxAutomationId);

                Log.Comment("Select the current text, and then type in a new number.");
                Edit valueTextBox = new Edit(FindElement.ById(ValueTextBoxAutomationId));
                valueTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(valueTextBox, "50");
                VerifyColorIsSelected(64, 128, 64);
            }
        }

void CanUseKeyboardToInteractWithTextBoxesForHSVLTR ( ) [inline]

Definition at line 695 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForHSV(isRTL: false);
        }

void CanUseKeyboardToInteractWithTextBoxesForHSVRTL ( ) [inline]

Definition at line 701 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForHSV(isRTL: true);
        }

void CanUseKeyboardToInteractWithTextBoxesForRGB ( bool isRTL ) [inline]

Definition at line 888 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.DisableColorSpectrumLoadWait))
            {
                SetIsRTL(isRTL);

                Log.Comment("Initialize the color to a known value.");
                SetColorSpectrumColor(255, 0, 0);

                Log.Comment("Give initial keyboard focus to red text box.");
                FindElement.ById(RedTextBoxAutomationId).SetFocus();
                Wait.ForIdle();

                Log.Comment("Select the current text, and then type in a new number.");
                Edit redTextBox = new Edit(FindElement.ById(RedTextBoxAutomationId));
                redTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(redTextBox, "128");
                VerifyColorIsSelected(128, 0, 0);

                Log.Comment("Give keyboard focus to the green text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(GreenTextBoxAutomationId);

                Log.Comment("Select the current text, and then type in a new number.");
                Edit greenTextBox = new Edit(FindElement.ById(GreenTextBoxAutomationId));
                greenTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(greenTextBox, "128");
                VerifyColorIsSelected(128, 128, 0);

                Log.Comment("Give keyboard focus to the blue text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(BlueTextBoxAutomationId);

                Log.Comment("Select the current text, and then type in a new number.");
                Edit blueTextBox = new Edit(FindElement.ById(BlueTextBoxAutomationId));
                blueTextBox.DocumentRange.Select();
                KeyboardHelper.EnterText(blueTextBox, "128");
                VerifyColorIsSelected(128, 128, 128);
            }
        }

void CanUseKeyboardToInteractWithTextBoxesForRGBLTR ( ) [inline]

Definition at line 671 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForRGB(isRTL: false);
        }

void CanUseKeyboardToInteractWithTextBoxesForRGBRTL ( ) [inline]

Definition at line 677 of file ColorPickerTests.cs.

        {
            CanUseKeyboardToInteractWithTextBoxesForRGB(isRTL: true);
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 451 of file ColorPickerTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

static ColorChannels GetCurrentlySelectedChannels ( ) [inline, static]

Definition at line 424 of file ColorPickerTests.cs.

        {
            ColorChannels currentlySelectedChannels = ColorChannels.RGB;

            ComboBox colorRepresentationComboBox = new ComboBox(FindElement.ById(ColorRepresentationComboBoxAutomationId));
            ComboBoxItem selectedComboBoxItem = colorRepresentationComboBox.Selection[0];

            if (selectedComboBoxItem.AutomationId == RGBComboBoxItemAutomationId)
            {
                currentlySelectedChannels = ColorChannels.RGB;
            }
            else if (selectedComboBoxItem.AutomationId == HSVComboBoxItemAutomationId)
            {
                currentlySelectedChannels = ColorChannels.HSV;
            }
            else
            {
                Verify.Fail("We should never have a combo box item that isn't either RGB or HSV.");
            }

            return currentlySelectedChannels;
        }

bool GetIsRTL ( ) [inline, private]

Definition at line 1564 of file ColorPickerTests.cs.

        {
            CheckBox isRTLCheckBox = new CheckBox(FindElement.ById("IsRtlCheckBox"));
            return isRTLCheckBox.ToggleState == ToggleState.On;
        }

void GetLocalizedText ( IList< string > stringList ) [inline, private]

Definition at line 1364 of file ColorPickerTests.cs.

        {
            ColorSpectrum colorSpectrum = new ColorSpectrum(FindElement.ById(ColorSpectrumAutomationId));
            stringList.Add(colorSpectrum.Value);
            stringList.Add(colorSpectrum.LocalizedControlType);
            stringList.Add(colorSpectrum.HelpText);

            ColorPickerSlider thirdDimensionSlider = new ColorPickerSlider(FindElement.ById(ThirdDimensionAutomationId));
            stringList.Add(thirdDimensionSlider.Name);
            stringList.Add(thirdDimensionSlider.Value);

            ColorPickerSlider alphaSlider = new ColorPickerSlider(FindElement.ById(AlphaSliderAutomationId));
            stringList.Add(alphaSlider.Name);

            ToggleButton moreButton = new ToggleButton(FindElement.ById(MoreButtonAutomationId));
            stringList.Add(moreButton.Name);
            stringList.Add(FindElement.ById(MoreButtonLabelAutomationId).Name);

            moreButton.Toggle();
            Wait.ForIdle();

            stringList.Add(moreButton.Name);
            stringList.Add(FindElement.ById(MoreButtonLabelAutomationId).Name);

            ComboBox colorRepresentationComboBox = new ComboBox(FindElement.ById(ColorRepresentationComboBoxAutomationId));
            stringList.Add(colorRepresentationComboBox.Name);

            stringList.Add(FindElement.ById(RedLabelAutomationId).Name);
            stringList.Add(FindElement.ById(GreenLabelAutomationId).Name);
            stringList.Add(FindElement.ById(BlueLabelAutomationId).Name);

            SelectTextBoxes(ColorChannels.HSV);

            stringList.Add(FindElement.ById(HueLabelAutomationId).Name);
            stringList.Add(FindElement.ById(SaturationLabelAutomationId).Name);
            stringList.Add(FindElement.ById(ValueLabelAutomationId).Name);

            stringList.Add(FindElement.ById(AlphaLabelAutomationId).Name);
        }

void PressKeyAndWaitForColorChange | ( | Key | key,
 |  | ModifierKey | modifierKey = ModifierKey.None,
 |  | uint | numPresses = 1 |
 | ) |  |  | [inline, private]

Definition at line 1491 of file ColorPickerTests.cs.

        {
            ColorPickerTestSetupHelper.Current.ExecuteAndWaitForColorChange(() => KeyboardHelper.PressKey(key, modifierKey, numPresses));
        }

void SelectionEllipseChangesColorAccordingToSelectedColor ( ) [inline]

Definition at line 611 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha))
            {
                ComboBox colorSpectrumComponentsComboBox = new ComboBox(FindElement.ById("ColorSpectrumComponentsComboBox"));
                colorSpectrumComponentsComboBox.SelectItemById("ColorSpectrumComponentsHueValue");

                VerifySelectionEllipseColorIsEqualTo(255, 255, 255);
                WriteInTextBox(AlphaTextBoxAutomationId, "0%");
                VerifySelectionEllipseColorIsEqualTo(255, 255, 255);
                WriteInTextBox(HueTextBoxAutomationId, "120");
                VerifySelectionEllipseColorIsEqualTo(0, 0, 0);
                WriteInTextBox(ValueTextBoxAutomationId, "85");
                VerifySelectionEllipseColorIsEqualTo(255, 255, 255);
                WriteInTextBox(SaturationTextBoxAutomationId, "50");
                VerifySelectionEllipseColorIsEqualTo(0, 0, 0);
            }
        }

void SelectTextBoxes ( ColorChannels channels ) [inline, private]

Definition at line 1520 of file ColorPickerTests.cs.

        {
            ColorChannels currentlySelectedChannels = GetCurrentlySelectedChannels();
            ComboBox colorRepresentationComboBox = new ComboBox(FindElement.ById(ColorRepresentationComboBoxAutomationId));

            Log.Comment("{0} text boxes requested, {1} text boxes currently selected.", channels == ColorChannels.RGB ? "RGB" : "HSV", currentlySelectedChannels == ColorChannels.RGB ? "RGB" : "HSV");

            if (currentlySelectedChannels != channels)
            {
                currentlySelectedChannels = channels;

                Log.Comment("Change the combo box to select {0} text boxes.", channels == ColorChannels.RGB ? "RGB" : "HSV");
                colorRepresentationComboBox.SelectItemById(channels == ColorChannels.RGB ? RGBComboBoxItemAutomationId : HSVComboBoxItemAutomationId);
            }
            else
            {
                Log.Comment("No need to change the combo box - we already have the right text box set selected.");
            }
        }

void SetColorSpectrumColor | ( | int | red,
 |  | int | green,
 |  | int | blue,
 |  | int | alpha = 255 |
 | ) |  |  | [inline, private]

Definition at line 1442 of file ColorPickerTests.cs.

        {
            ColorSpectrum colorSpectrum = new ColorSpectrum(FindElement.ById(ColorSpectrumAutomationId));

            string colorString = "#";

            // "X2" means "output as hex and pad with zeroes if needed to make the string two characters long".
            colorString += alpha.ToString("X2");
            colorString += red.ToString("X2");
            colorString += green.ToString("X2");
            colorString += blue.ToString("X2");

            using (var waiter = colorSpectrum.GetColorChangedWaiter())
            {
                Log.Comment("Setting ColorSpectrum color to {0}.", colorString);
                colorSpectrum.SetValue(colorString);
            }

            Wait.ForIdle();
        }

void SetIsAlphaEnabled ( bool isAlphaEnabled ) [inline, private]

Definition at line 1540 of file ColorPickerTests.cs.

        {
            CheckBox isAlphaEnabledCheckBox = new CheckBox(FindElement.ById("AlphaEnabledCheckBox"));

            if (isAlphaEnabled && isAlphaEnabledCheckBox.ToggleState != ToggleState.On ||
                !isAlphaEnabled && isAlphaEnabledCheckBox.ToggleState != ToggleState.Off)
            {
                isAlphaEnabledCheckBox.Toggle();
                Wait.ForIdle();
            }
        }

void SetIsHorizontalOrientation ( bool shouldBeHorizontal ) [inline, private]

Definition at line 1582 of file ColorPickerTests.cs.

        {
            ComboBox isRTLCheckBox = new ComboBox(FindElement.ById("OrientationComboBox"));
            isRTLCheckBox.SelectItemById(shouldBeHorizontal ? "OrientationHorizontal" : "OrientationVertical");
            Wait.ForIdle();
        }

void SetIsMoreButtonEnabled ( bool isMoreButtonEnabled ) [inline, private]

Definition at line 1552 of file ColorPickerTests.cs.

        {
            CheckBox isMoreButtonVisibleCheckBox = new CheckBox(FindElement.ById("MoreButtonVisibleCheckBox"));

            if (isMoreButtonEnabled && isMoreButtonVisibleCheckBox.ToggleState != ToggleState.On ||
                !isMoreButtonEnabled && isMoreButtonVisibleCheckBox.ToggleState != ToggleState.Off)
            {
                isMoreButtonVisibleCheckBox.Toggle();
                Wait.ForIdle();
            }
        }

void SetIsRTL ( bool isRTL ) [inline, private]

Definition at line 1570 of file ColorPickerTests.cs.

        {
            CheckBox isRTLCheckBox = new CheckBox(FindElement.ById("IsRtlCheckBox"));

            if (isRTL && isRTLCheckBox.ToggleState != ToggleState.On ||
                !isRTL && isRTLCheckBox.ToggleState != ToggleState.Off)
            {
                isRTLCheckBox.Toggle();
                Wait.ForIdle();
            }
        }

void SetMaxSaturation ( double maxSaturation ) [inline, private]

Definition at line 1596 of file ColorPickerTests.cs.

        {
            Log.Comment("Setting MaxSaturation to {0}.", maxSaturation);
            RangeValueSlider maxSaturationSlider = new RangeValueSlider(FindElement.ById("MaximumSaturationSlider"));
            SetSaturation(maxSaturationSlider, maxSaturation);
        }

void SetMaxValue ( double maxValue ) [inline, private]

Definition at line 1633 of file ColorPickerTests.cs.

        {
            Log.Comment("Setting MaxValue to {0}.", maxValue);
            RangeValueSlider maxValueSlider = new RangeValueSlider(FindElement.ById("MaximumValueSlider"));
            SetValue(maxValueSlider, maxValue);
        }

void SetMinSaturation ( double minSaturation ) [inline, private]

Definition at line 1589 of file ColorPickerTests.cs.

        {
            Log.Comment("Setting MinSaturation to {0}.", minSaturation);
            RangeValueSlider minSaturationSlider = new RangeValueSlider(FindElement.ById("MinimumSaturationSlider"));
            SetSaturation(minSaturationSlider, minSaturation);
        }

void SetMinValue ( double minValue ) [inline, private]

Definition at line 1626 of file ColorPickerTests.cs.

        {
            Log.Comment("Setting MinValue to {0}.", minValue);
            RangeValueSlider minValueSlider = new RangeValueSlider(FindElement.ById("MinimumValueSlider"));
            SetValue(minValueSlider, minValue);
        }

void SetSaturation | ( | RangeValueSlider | saturationSlider,
 |  | double | saturation |
 | ) |  |  | [inline, private]

Definition at line 1603 of file ColorPickerTests.cs.

        {
            if (saturationSlider.Value != saturation)
            {
                CheckBox cb = new CheckBox(FindElement.ById("ColorSpectrumLoadedCheckBox"));

                using (var waiter = cb.GetToggledWaiter())
                {
                    if (cb.ToggleState != ToggleState.Off)
                    {
                        cb.Toggle();
                        Wait.ForIdle();
                    }

                    saturationSlider.SetValue(saturation);
                    Log.Comment("Waiting for the color spectrum image to be reloaded...");
                    waiter.Wait();
                }

                Log.Comment("Color spectrum image loaded.");
            }
        }

ColorPickerTestSetupHelper SetupColorPickerTest ( TestOptions options = TestOptions.None ) [inline, private]

Definition at line 1404 of file ColorPickerTests.cs.

        {
            var setup = new ColorPickerTestSetupHelper(
                "ColorPicker Tests",
                languageOverride : (options & TestOptions.EnableNonEnglishLanguage) == TestOptions.EnableNonEnglishLanguage ? "ja-JP" : "");

            // On CHK builds, waiting for the color spectrum to load can take a while, which contributes
            // several seconds towards CatGates' 30-second timeout. As a result, we should only wait
            // for it to load in tests where we're actually going to be interacting with it.
            if ((options & TestOptions.DisableColorSpectrumLoadWait) != TestOptions.DisableColorSpectrumLoadWait)
            {
                // This is a bit of a hack - the ColorSpectrum can't be interacted with until it loads asynchronously,
                // so we need to wait until that has occurred.  There's no publicly accessible event saying that it's loaded,
                // so to get around that, we toggle the value of a check box in the test app to indicate that loading has completed.
                Log.Comment("Wait until the color spectrum image has loaded.");
                CheckBox cb = new CheckBox(FindElement.ById("ColorSpectrumLoadedCheckBox"));

                using (var waiter = cb.GetToggledWaiter())
                {
                    if (cb.ToggleState != ToggleState.On)
                    {
                        waiter.Wait();
                    }
                }

                Log.Comment("Color spectrum image loaded.");
            }

            SetIsAlphaEnabled((options & TestOptions.EnableAlpha) == TestOptions.EnableAlpha);
            SetIsMoreButtonEnabled((options & TestOptions.EnableMoreButton) == TestOptions.EnableMoreButton);

            setup.StartTrackingColorChanges();

            Wait.ForIdle();

            return setup;
        }

void SetValue | ( | RangeValueSlider | valueSlider,
 |  | double | value |
 | ) |  |  | [inline, private]

Definition at line 1640 of file ColorPickerTests.cs.

        {
            RangeValueSlider minValueSlider = new RangeValueSlider(FindElement.ById("MinimumValueSlider"));

            if (minValueSlider.Value != value)
            {
                minValueSlider.SetValue(value);
                // The value is tracked by the slider, meaning that we don't have to wait for
                // the color spectrum image to be reloaded in this circumstance.
            }
        }

void TapOnColorSpectrum | ( | double | xPercent,
 |  | double | yPercent |
 | ) |  |  | [inline, private]

Definition at line 1463 of file ColorPickerTests.cs.

        {
            ColorSpectrum colorSpectrum = new ColorSpectrum(FindElement.ById(ColorSpectrumAutomationId));

            int colorSpectrumWidth = colorSpectrum.BoundingRectangle.Width;
            int colorSpectrumHeight = colorSpectrum.BoundingRectangle.Height;

            double xPosition = xPercent * (colorSpectrumWidth - 1);
            double yPosition = yPercent * (colorSpectrumHeight - 1);

            InputHelper.Tap(colorSpectrum, xPosition, yPosition);
        }

void TapOnColorSpectrumAndWaitForColorChange | ( | double | xPercent,
 |  | double | yPercent |
 | ) |  |  | [inline, private]

Definition at line 1476 of file ColorPickerTests.cs.

        {
            ColorSpectrum colorSpectrum = new ColorSpectrum(FindElement.ById(ColorSpectrumAutomationId));

            int colorSpectrumWidth = colorSpectrum.BoundingRectangle.Width;
            int colorSpectrumHeight = colorSpectrum.BoundingRectangle.Height;

            double xPosition = xPercent * (colorSpectrumWidth - 1);
            double yPosition = yPercent * (colorSpectrumHeight - 1);

            ColorPickerTestSetupHelper.Current.ExecuteAndWaitForColorChange(
                () => InputHelper.Tap(colorSpectrum, xPosition, yPosition)
            );
        }

void TestCleanup ( ) [inline]

Definition at line 457 of file ColorPickerTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ValidateNoCrashWhenWhenColorSpectrumInvisibleAndColorChanged ( ) [inline]

Definition at line 1197 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                Log.Comment("Hide ColorSpectrum");
                CheckBox isColorSpectrumVisible = new CheckBox(FindElement.ById("ColorSpectrumVisibleCheckBox"));
                isColorSpectrumVisible.Toggle();
                Wait.ForIdle();

                Log.Comment("Change Color");
                InputHelper.Tap(FindElement.ById("ColorWhiteButton"));
            }
        }

void VerifyAutomationNamesAreCorrect ( ) [inline]

Definition at line 1174 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                Verify.AreEqual("Color picker", FindElement.ById(ColorSpectrumAutomationId).Name);
                Verify.AreEqual("Value (Brightness)", FindElement.ById(ThirdDimensionAutomationId).Name);
                Verify.AreEqual("Opacity", FindElement.ById(AlphaSliderAutomationId).Name);
                Verify.AreEqual("Color model", FindElement.ById(ColorRepresentationComboBoxAutomationId).Name);
                Verify.AreEqual("Red", FindElement.ById(RedTextBoxAutomationId).Name);
                Verify.AreEqual("Green", FindElement.ById(GreenTextBoxAutomationId).Name);
                Verify.AreEqual("Blue", FindElement.ById(BlueTextBoxAutomationId).Name);
                Verify.AreEqual("RGB hex", FindElement.ById(HexTextBoxAutomationId).Name);
                SelectTextBoxes(ColorChannels.HSV);
                Verify.AreEqual("Hue", FindElement.ById(HueTextBoxAutomationId).Name);
                Verify.AreEqual("Saturation", FindElement.ById(SaturationTextBoxAutomationId).Name);
                Verify.AreEqual("Value (Brightness)", FindElement.ById(ValueTextBoxAutomationId).Name);
                Verify.AreEqual("HSV hex", FindElement.ById(HexTextBoxAutomationId).Name);
            }
        }

void VerifyCanChangeColorWithTouchWithoutPanning ( ) [inline]

Definition at line 1131 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                ScrollImplementation scrollViewer = new ScrollImplementation(FindElement.ById("ColorPickerScrollViewer"));
                double initialVerticalScroll = scrollViewer.VerticalScrollPercent;

                ColorSpectrum colorSpectrum = new ColorSpectrum(FindElement.ById(ColorSpectrumAutomationId));
                InputHelper.DragDistance(colorSpectrum, 50, Direction.North);

                Verify.AreEqual(initialVerticalScroll, scrollViewer.VerticalScrollPercent);
            }
        }

void VerifyColorIsSelected | ( | int | expectedRed,
 |  | int | expectedGreen,
 |  | int | expectedBlue,
 |  | int | expectedAlpha = 255 |
 | ) |  |  | [inline, private]

Definition at line 1652 of file ColorPickerTests.cs.

        {
            VerifyColorIsSelectedCore(expectedRed, expectedGreen, expectedBlue, expectedAlpha, 1 /* allowedMargin */);
        }

void VerifyColorIsSelectedCore | ( | int | expectedRed,
 |  | int | expectedGreen,
 |  | int | expectedBlue,
 |  | int | expectedAlpha,
 |  | int | allowedMargin |
 | ) |  |  | [inline, private]

Definition at line 1662 of file ColorPickerTests.cs.

        {
            Color currentColor = ColorPickerTestSetupHelper.Current.Color;

            int actualRed = currentColor.R;
            int actualGreen = currentColor.G;
            int actualBlue = currentColor.B;
            int actualAlpha = currentColor.A;

            Log.Comment("Expecting the ColorPicker's selected color to be {8}RGBA = ({0}, {1}, {2}, {3}). Actual color is RGBA = ({4}, {5}, {6}, {7}).",
                expectedRed, expectedGreen, expectedBlue, expectedAlpha,
                actualRed, actualGreen, actualBlue, actualAlpha,
                allowedMargin > 0 ? string.Format("within {0} unit{1} of ", allowedMargin, allowedMargin != 1 ? "s" : "") : "");

            Verify.IsLessThanOrEqual(expectedRed - allowedMargin, actualRed);
            Verify.IsGreaterThanOrEqual(expectedRed + allowedMargin, actualRed);
            Verify.IsLessThanOrEqual(expectedGreen - allowedMargin, actualGreen);
            Verify.IsGreaterThanOrEqual(expectedGreen + allowedMargin, actualGreen);
            Verify.IsLessThanOrEqual(expectedBlue - allowedMargin, actualBlue);
            Verify.IsGreaterThanOrEqual(expectedBlue + allowedMargin, actualBlue);
            Verify.IsLessThanOrEqual(expectedAlpha - allowedMargin, actualAlpha);
            Verify.IsGreaterThanOrEqual(expectedAlpha + allowedMargin, actualAlpha);
        }

void VerifyColorNameIsSelected ( string expectedName ) [inline, private]

Definition at line 1686 of file ColorPickerTests.cs.

        {
            TextBlock selectedColorNameTextBlock = new TextBlock(FindElement.ById("SelectedColorNameTextBlock"));

            string actualName = selectedColorNameTextBlock.DocumentText;

            Log.Comment("Expecting the ColorPicker's selected color name to be '{0}'. Actual color name is '{1}'.",
                expectedName, actualName);

            Verify.AreEqual(expectedName, actualName);
        }

void VerifyColorSpectrumAutomationValuesAreCorrect ( ) [inline]

Definition at line 1212 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                ColorSpectrum colorSpectrum = new ColorSpectrum(FindElement.ById(ColorSpectrumAutomationId));
                colorSpectrum.SetFocus();

                Verify.AreEqual("2D slider", colorSpectrum.LocalizedControlType);
                Verify.AreEqual("2D navigation with arrow keys", colorSpectrum.HelpText);

                Verify.AreEqual("Red, Hue 0, Saturation 100, Value 100", colorSpectrum.Value);
                KeyboardHelper.PressKey(Key.Right);
                Verify.AreEqual("Red, Hue 1, Saturation 100, Value 100", colorSpectrum.Value);
                KeyboardHelper.PressKey(Key.Right, ModifierKey.Control);
                Verify.AreEqual("Orange, Hue 28, Saturation 100, Value 100", colorSpectrum.Value);
            }
        }

void VerifyElementIsFocused ( string expectedFocusedElement ) [inline, private]

Definition at line 1784 of file ColorPickerTests.cs.

        {
            TextBlock currentlyFocusedElementTextBlock = new TextBlock(FindElement.ById("CurrentlyFocusedElementTextBlock"));

            Log.Comment("Expecting the focused element to be '{0}'. Actual focused element is '{1}'.", expectedFocusedElement, currentlyFocusedElementTextBlock.DocumentText);
            Verify.AreEqual(expectedFocusedElement, currentlyFocusedElementTextBlock.DocumentText);
        }

void VerifyEllipsePositionIsClampedToSpectrumBounds ( ) [inline]

Definition at line 1119 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                SetMinSaturation(50);
                InputHelper.Tap(FindElement.ById("ColorWhiteButton"));

                VerifySelectionEllipsePosition(0, 256);
            }
        }

void VerifyHexStringAndColorAreInSync ( ) [inline]

Definition at line 1109 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.DisableColorSpectrumLoadWait))
            {
                SetColorSpectrumColor(128, 255, 255);
                Verify.AreEqual("#80FFFF", (new Edit(FindElement.ById(HexTextBoxAutomationId))).Value);
            }
        }

void VerifyHsvUpdatesOnSpectrumSelection ( ) [inline]

Definition at line 505 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                TapOnColorSpectrumAndWaitForColorChange(0.5, 0.5);
                VerifySelectedColorIsNear(127, 255, 252);
                VerifySelectionEllipseIsNear(127, 127);

                WriteInTextBox(ValueTextBoxAutomationId, "0");
                VerifySelectedColorIsNear(0, 0, 0);

                // Since Value is 0, the RGB value stays black and does not trigger the colorChangedEvent,
                // so this helper function is used instead.
                TapOnColorSpectrum(0.25, 0.25);
                Wait.ForIdle();

                VerifySelectedColorIsNear(0, 0, 0);

                // Allowing +/-1 devation
                const double errorMargin = 1;

                Verify.IsLessThanOrEqual(Math.Abs(90 - Double.Parse((new Edit(FindElement.ById(HueTextBoxAutomationId))).Value)), errorMargin);
                Verify.IsLessThanOrEqual(Math.Abs(75 - Double.Parse((new Edit(FindElement.ById(SaturationTextBoxAutomationId))).Value)), errorMargin);
                Verify.IsLessThanOrEqual(Math.Abs(0 - Double.Parse((new Edit(FindElement.ById(ValueTextBoxAutomationId))).Value)), errorMargin);

                TapOnColorSpectrum(0.75, 0.75);
                Wait.ForIdle();

                VerifySelectedColorIsNear(0, 0, 0);

                Verify.IsLessThanOrEqual(270 - Double.Parse((new Edit(FindElement.ById(HueTextBoxAutomationId))).Value), errorMargin);
                Verify.IsLessThanOrEqual(25 - Double.Parse((new Edit(FindElement.ById(SaturationTextBoxAutomationId))).Value), errorMargin);
                Verify.IsLessThanOrEqual(0 - Double.Parse((new Edit(FindElement.ById(ValueTextBoxAutomationId))).Value), errorMargin);
            }
        }

void VerifyInvalidTextEntryIsReverted ( ) [inline]

Definition at line 1055 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.DisableColorSpectrumLoadWait))
            {
                SetMinSaturation(50);
                SetMinValue(50);

                Verify.AreEqual("255", (new Edit(FindElement.ById(RedTextBoxAutomationId))).Value);

                Log.Comment("First, write a completely invalid string, and make sure that it's reverted after focus is lost.");
                WriteInTextBox(RedTextBoxAutomationId, "foo");
                KeyboardHelper.PressKey(Key.Tab);

                Verify.AreEqual("255", (new Edit(FindElement.ById(RedTextBoxAutomationId))).Value);

                Log.Comment("Next, write a string that represents a valid color, but one that is out of range, and then tab away.  We should snap to the closest color in range in this case.");
                WriteInTextBox(RedTextBoxAutomationId, "0");
                KeyboardHelper.PressKey(Key.Tab);

                Verify.AreEqual("128", (new Edit(FindElement.ById(RedTextBoxAutomationId))).Value);
                Verify.AreEqual("64", (new Edit(FindElement.ById(GreenTextBoxAutomationId))).Value);
                Verify.AreEqual("64", (new Edit(FindElement.ById(BlueTextBoxAutomationId))).Value);

                Log.Comment("Now we'll do the same with the HSV text boxes.");
                WriteInTextBox(HueTextBoxAutomationId, "foo");
                KeyboardHelper.PressKey(Key.Tab);

                Verify.AreEqual("0", (new Edit(FindElement.ById(HueTextBoxAutomationId))).Value);

                WriteInTextBox(SaturationTextBoxAutomationId, "0");
                KeyboardHelper.PressKey(Key.Tab);

                Verify.AreEqual("50", (new Edit(FindElement.ById(SaturationTextBoxAutomationId))).Value);

                WriteInTextBox(ValueTextBoxAutomationId, "0");
                KeyboardHelper.PressKey(Key.Tab);

                Verify.AreEqual("50", (new Edit(FindElement.ById(ValueTextBoxAutomationId))).Value);

                Log.Comment("And similarly for the hex text box.");

                WriteInTextBox(HexTextBoxAutomationId, "#foo");
                KeyboardHelper.PressKey(Key.Tab);

                Verify.AreEqual("#804040", (new Edit(FindElement.ById(HexTextBoxAutomationId))).Value);

                WriteInTextBox(HexTextBoxAutomationId, "#000000");
                KeyboardHelper.PressKey(Key.Tab);

                Verify.AreEqual("#804040", (new Edit(FindElement.ById(HexTextBoxAutomationId))).Value);
            }
        }

void VerifyMoreButtonRespondsToThemeChanges ( ) [inline]

Definition at line 1146 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableMoreButton | TestOptions.DisableColorSpectrumLoadWait))
            {
                Button themeLightButton = new Button(FindElement.ById("ThemeLightButton"));
                Button themeDarkButton = new Button(FindElement.ById("ThemeDarkButton"));

                TextBlock moreButtonForegroundTextBlock = new TextBlock(FindElement.ById("MoreButtonForegroundTextBlock"));
                TextBlock moreButtonBackgroundTextBlock = new TextBlock(FindElement.ById("MoreButtonBackgroundTextBlock"));
                TextBlock moreButtonBorderBrushTextBlock = new TextBlock(FindElement.ById("MoreButtonBorderBrushTextBlock"));

                themeLightButton.Invoke();
                Wait.ForIdle();

                Verify.AreEqual<string>("#FF000000", moreButtonForegroundTextBlock.DocumentText);
                Verify.AreEqual<string>("#00FFFFFF", moreButtonBackgroundTextBlock.DocumentText);
                Verify.AreEqual<string>("#00FFFFFF", moreButtonBorderBrushTextBlock.DocumentText);

                themeDarkButton.Invoke();
                Wait.ForIdle();

                Verify.AreEqual<string>("#FFFFFFFF", moreButtonForegroundTextBlock.DocumentText);
                Verify.AreEqual<string>("#00FFFFFF", moreButtonBackgroundTextBlock.DocumentText);
                Verify.AreEqual<string>("#00FFFFFF", moreButtonBorderBrushTextBlock.DocumentText);
            }
        }

void VerifyMoreButtonShowsAndHidesTextInputFields ( ) [inline]

Definition at line 1023 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.EnableMoreButton | TestOptions.DisableColorSpectrumLoadWait))
            {
                ToggleButton moreButton = new ToggleButton(FindElement.ById(MoreButtonAutomationId));

                Verify.IsNotNull(TryFindElement.ById(ColorSpectrumAutomationId));
                Verify.IsNotNull(TryFindElement.ById(ThirdDimensionAutomationId));
                Verify.IsNotNull(TryFindElement.ById(AlphaSliderAutomationId));
                Verify.IsNull(TryFindElement.ById(ColorRepresentationComboBoxAutomationId));
                Verify.IsNull(TryFindElement.ById(RedTextBoxAutomationId));
                Verify.IsNull(TryFindElement.ById(GreenTextBoxAutomationId));
                Verify.IsNull(TryFindElement.ById(BlueTextBoxAutomationId));
                Verify.IsNull(TryFindElement.ById(AlphaTextBoxAutomationId));
                Verify.IsNull(TryFindElement.ById(HexTextBoxAutomationId));

                moreButton.Toggle();
                Wait.ForIdle();

                Verify.IsNotNull(TryFindElement.ById(ColorSpectrumAutomationId));
                Verify.IsNotNull(TryFindElement.ById(ThirdDimensionAutomationId));
                Verify.IsNotNull(TryFindElement.ById(AlphaSliderAutomationId));
                Verify.IsNotNull(TryFindElement.ById(ColorRepresentationComboBoxAutomationId));
                Verify.IsNotNull(TryFindElement.ById(RedTextBoxAutomationId));
                Verify.IsNotNull(TryFindElement.ById(GreenTextBoxAutomationId));
                Verify.IsNotNull(TryFindElement.ById(BlueTextBoxAutomationId));
                Verify.IsNotNull(TryFindElement.ById(AlphaTextBoxAutomationId));
                Verify.IsNotNull(TryFindElement.ById(HexTextBoxAutomationId));
            }
        }

void VerifyPreviousColorIsEqualTo | ( | int | expectedRed,
 |  | int | expectedGreen,
 |  | int | expectedBlue,
 |  | int | expectedAlpha = 255 |
 | ) |  |  | [inline, private]

Definition at line 1698 of file ColorPickerTests.cs.

        {
            TextBlock previousRedTextBlock = new TextBlock(FindElement.ById("PreviousRedTextBlock"));
            TextBlock previousGreenTextBlock = new TextBlock(FindElement.ById("PreviousGreenTextBlock"));
            TextBlock previousBlueTextBlock = new TextBlock(FindElement.ById("PreviousBlueTextBlock"));
            TextBlock previousAlphaTextBlock = new TextBlock(FindElement.ById("PreviousAlphaTextBlock"));

            int actualRed = int.Parse(previousRedTextBlock.DocumentText);
            int actualGreen = int.Parse(previousGreenTextBlock.DocumentText);
            int actualBlue = int.Parse(previousBlueTextBlock.DocumentText);
            int actualAlpha = int.Parse(previousAlphaTextBlock.DocumentText);

            Log.Comment("Expecting the ColorPicker's previous color to be RGBA = ({0}, {1}, {2}, {3}). Actual color is RGBA = ({4}, {5}, {6}, {7}).",
                expectedRed, expectedGreen, expectedBlue, expectedAlpha,
                actualRed, actualGreen, actualBlue, actualAlpha);

            Verify.AreEqual<int>(expectedRed, actualRed);
            Verify.AreEqual<int>(expectedGreen, actualGreen);
            Verify.AreEqual<int>(expectedBlue, actualBlue);
            Verify.AreEqual<int>(expectedAlpha, actualAlpha);
        }

void VerifyPreviousColorIsNull ( ) [inline, private]

Definition at line 1720 of file ColorPickerTests.cs.

        {
            TextBlock previousRedTextBlock = new TextBlock(FindElement.ById("PreviousRedTextBlock"));
            TextBlock previousGreenTextBlock = new TextBlock(FindElement.ById("PreviousGreenTextBlock"));
            TextBlock previousBlueTextBlock = new TextBlock(FindElement.ById("PreviousBlueTextBlock"));
            TextBlock previousAlphaTextBlock = new TextBlock(FindElement.ById("PreviousAlphaTextBlock"));

            Verify.AreEqual<string>("", previousRedTextBlock.DocumentText);
            Verify.AreEqual<string>("", previousGreenTextBlock.DocumentText);
            Verify.AreEqual<string>("", previousBlueTextBlock.DocumentText);
            Verify.AreEqual<string>("", previousAlphaTextBlock.DocumentText);
        }

void VerifySelectedColorIsNear | ( | int | expectedRed,
 |  | int | expectedGreen,
 |  | int | expectedBlue,
 |  | int | expectedAlpha = 255 |
 | ) |  |  | [inline, private]

Definition at line 1657 of file ColorPickerTests.cs.

        {
            VerifyColorIsSelectedCore(expectedRed, expectedGreen, expectedBlue, expectedAlpha, 10 /* allowedMargin */);
        }

void VerifySelectionEllipseColorIsEqualTo | ( | int | expectedRed,
 |  | int | expectedGreen,
 |  | int | expectedBlue,
 |  | int | expectedAlpha = 255 |
 | ) |  |  | [inline, private]

Definition at line 1762 of file ColorPickerTests.cs.

        {
            TextBlock ellipseRedTextBlock = new TextBlock(FindElement.ById("EllipseRedTextBlock"));
            TextBlock ellipseGreenTextBlock = new TextBlock(FindElement.ById("EllipseGreenTextBlock"));
            TextBlock ellipseBlueTextBlock = new TextBlock(FindElement.ById("EllipseBlueTextBlock"));
            TextBlock ellipseAlphaTextBlock = new TextBlock(FindElement.ById("EllipseAlphaTextBlock"));

            int actualRed = int.Parse(ellipseRedTextBlock.DocumentText);
            int actualGreen = int.Parse(ellipseGreenTextBlock.DocumentText);
            int actualBlue = int.Parse(ellipseBlueTextBlock.DocumentText);
            int actualAlpha = int.Parse(ellipseAlphaTextBlock.DocumentText);

            Log.Comment("Expecting the selection ellipse's color to be RGBA = ({0}, {1}, {2}, {3}). Actual color is RGBA = ({4}, {5}, {6}, {7}).",
                expectedRed, expectedGreen, expectedBlue, expectedAlpha,
                actualRed, actualGreen, actualBlue, actualAlpha);

            Verify.AreEqual<int>(expectedRed, actualRed);
            Verify.AreEqual<int>(expectedGreen, actualGreen);
            Verify.AreEqual<int>(expectedBlue, actualBlue);
            Verify.AreEqual<int>(expectedAlpha, actualAlpha);
        }

void VerifySelectionEllipseIsNear | ( | double | expectedX,
 |  | double | expectedY |
 | ) |  |  | [inline, private]

Definition at line 1738 of file ColorPickerTests.cs.

        {
            VerifySelectionEllipsePositionCore(expectedX, expectedY, 10 /* allowedMargin */);
        }

void VerifySelectionEllipsePosition | ( | double | expectedX,
 |  | double | expectedY |
 | ) |  |  | [inline, private]

Definition at line 1733 of file ColorPickerTests.cs.

        {
            VerifySelectionEllipsePositionCore(expectedX, expectedY, 0 /* allowedMargin */);
        }

void VerifySelectionEllipsePositionCore | ( | double | expectedX,
 |  | double | expectedY,
 |  | double | allowedMargin |
 | ) |  |  | [inline, private]

Definition at line 1743 of file ColorPickerTests.cs.

        {
            TextBlock ellipseXTextBlock = new TextBlock(FindElement.ById("EllipseXTextBlock"));
            TextBlock ellipseYTextBlock = new TextBlock(FindElement.ById("EllipseYTextBlock"));

            double actualX = double.Parse(ellipseXTextBlock.DocumentText);
            double actualY = double.Parse(ellipseYTextBlock.DocumentText);

            Log.Comment("Expecting the selection ellipse's position to be {4}({0}, {1}). Actual position is ({2}, {3}).",
                expectedX, expectedY,
                actualX, actualY,
                allowedMargin > 0 ? string.Format("within {0} units of ", allowedMargin) : "");

            Verify.IsLessThanOrEqual(expectedX - allowedMargin, actualX);
            Verify.IsGreaterThanOrEqual(expectedX + allowedMargin, actualX);
            Verify.IsLessThanOrEqual(expectedY - allowedMargin, actualY);
            Verify.IsGreaterThanOrEqual(expectedY + allowedMargin, actualY);
        }

void VerifySpectrumTakesFocusOnPointerPress ( ) [inline]

Definition at line 1013 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest())
            {
                TapOnColorSpectrumAndWaitForColorChange(0.5, 0.5);
                VerifyElementIsFocused(ColorSpectrumAutomationId);
            }
        }

void VerifyStringsAreLocalizedCorrectly ( ) [inline]

Definition at line 1251 of file ColorPickerTests.cs.

        {
            // First gather all of the text from the English version of the test page.
            List<string> englishStrings = new List<string>();

            Log.Comment("Collecting en-US strings...");

            using (var setup = SetupColorPickerTest(
                TestOptions.EnableAlpha |
                TestOptions.EnableMoreButton |
                TestOptions.DisableColorSpectrumLoadWait))
            {
                GetLocalizedText(englishStrings);
            }

            // Now switch to Japanese and gather all of the new text from the test page.
            List<string> otherLanguageStrings = new List<string>();

            Log.Comment("Collecting ja-JP strings...");

            using (var setup = SetupColorPickerTest(
                TestOptions.EnableAlpha |
                TestOptions.EnableMoreButton |
                TestOptions.EnableNonEnglishLanguage |
                TestOptions.DisableColorSpectrumLoadWait))
            {
                GetLocalizedText(otherLanguageStrings);
            }

            LocalizationHelper.CompareStringSets(englishStrings, otherLanguageStrings);
        }

void VerifyTabFocusOrder ( ) [inline]

Definition at line 1284 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.EnableAlpha | TestOptions.DisableColorSpectrumLoadWait))
            {
                Log.Comment("Give initial keyboard focus to the color spectrum.");
                FindElement.ById(ColorSpectrumAutomationId).SetFocus();
                Wait.ForIdle();

                Log.Comment("Give keyboard focus to the value slider using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(ThirdDimensionAutomationId);

                Log.Comment("Give keyboard focus to the alpha slider using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(AlphaSliderAutomationId);

                Log.Comment("Give keyboard focus to the Color Representation ComboBox using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(ColorRepresentationComboBoxAutomationId);

                Log.Comment("Give keyboard focus to the red text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(RedTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the green text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(GreenTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the blue text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(BlueTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the alpha text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(AlphaTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the hex text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(HexTextBoxAutomationId);

                SetIsHorizontalOrientation(true);

                Log.Comment("Give initial keyboard focus to the color spectrum.");
                FindElement.ById(ColorSpectrumAutomationId).SetFocus();
                Wait.ForIdle();

                Log.Comment("Give keyboard focus to the value slider using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(ThirdDimensionAutomationId);

                Log.Comment("Give keyboard focus to the alpha slider using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(AlphaSliderAutomationId);

                Log.Comment("Give keyboard focus to the hex text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(HexTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the Color Representation ComboBox using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(ColorRepresentationComboBoxAutomationId);

                Log.Comment("Give keyboard focus to the red text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(RedTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the green text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(GreenTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the blue text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(BlueTextBoxAutomationId);

                Log.Comment("Give keyboard focus to the alpha text box using tab.");
                KeyboardHelper.PressKey(Key.Tab);
                VerifyElementIsFocused(AlphaTextBoxAutomationId);
            }
        }

void VerifyThirdDimensionSliderAutomationValuesAreCorrect ( ) [inline]

Definition at line 1231 of file ColorPickerTests.cs.

        {
            using (var setup = SetupColorPickerTest(TestOptions.DisableColorSpectrumLoadWait))
            {
                ColorPickerSlider thirdDimensionSlider = new ColorPickerSlider(FindElement.ById(ThirdDimensionAutomationId));
                thirdDimensionSlider.SetFocus();

                Verify.AreEqual("100, Red", thirdDimensionSlider.Value);
                KeyboardHelper.PressKey(Key.Left);
                Verify.AreEqual("99, Red", thirdDimensionSlider.Value);
                KeyboardHelper.PressKey(Key.Left, ModifierKey.Control);
                Verify.AreEqual("46, Dark red", thirdDimensionSlider.Value);
            }
        }

void WriteInTextBox | ( | string | textBoxName,
 |  | string | s |
 | ) |  |  | [inline, private]

Definition at line 1496 of file ColorPickerTests.cs.

        {
            Log.Comment("Retrieve text box with name '{0}'.", textBoxName);

            if (textBoxName == RedTextBoxAutomationId ||
                textBoxName == GreenTextBoxAutomationId ||
                textBoxName == BlueTextBoxAutomationId)
            {
                SelectTextBoxes(ColorChannels.RGB);
            }
            else if (textBoxName == HueTextBoxAutomationId ||
                textBoxName == SaturationTextBoxAutomationId ||
                textBoxName == ValueTextBoxAutomationId)
            {
                SelectTextBoxes(ColorChannels.HSV);
            }
            else if (textBoxName == AlphaTextBoxAutomationId)
            {
                SetIsAlphaEnabled(true);
            }

            KeyboardHelper.EnterText(new Edit(FindElement.ById(textBoxName)), s);
        }

Member Data Documentation

const string AlphaLabelAutomationId = "AlphaLabel"

Definition at line 233 of file ColorPickerTests.cs.

const string AlphaSliderAutomationId = "AlphaSlider"

Definition at line 214 of file ColorPickerTests.cs.

const string AlphaTextBoxAutomationId = "AlphaTextBox"

Definition at line 232 of file ColorPickerTests.cs.

const string BlueLabelAutomationId = "BlueLabel"

Definition at line 225 of file ColorPickerTests.cs.

const string BlueTextBoxAutomationId = "BlueTextBox"

Definition at line 224 of file ColorPickerTests.cs.

const string ColorRepresentationComboBoxAutomationId = "ColorRepresentationComboBox"

Definition at line 217 of file ColorPickerTests.cs.

const string ColorSpectrumAutomationId = "ColorSpectrum"

Definition at line 212 of file ColorPickerTests.cs.

const string GreenLabelAutomationId = "GreenLabel"

Definition at line 223 of file ColorPickerTests.cs.

const string GreenTextBoxAutomationId = "GreenTextBox"

Definition at line 222 of file ColorPickerTests.cs.

const string HexTextBoxAutomationId = "HexTextBox"

Definition at line 234 of file ColorPickerTests.cs.

const string HSVComboBoxItemAutomationId = "HSVComboBoxItem"

Definition at line 219 of file ColorPickerTests.cs.

const string HueLabelAutomationId = "HueLabel"

Definition at line 227 of file ColorPickerTests.cs.

const string HueTextBoxAutomationId = "HueTextBox"

Definition at line 226 of file ColorPickerTests.cs.

const string MoreButtonAutomationId = "MoreButton"

Definition at line 215 of file ColorPickerTests.cs.

const string MoreButtonLabelAutomationId = "MoreButtonLabel"

Definition at line 216 of file ColorPickerTests.cs.

const string RedLabelAutomationId = "RedLabel"

Definition at line 221 of file ColorPickerTests.cs.

const string RedTextBoxAutomationId = "RedTextBox"

Definition at line 220 of file ColorPickerTests.cs.

const string RGBComboBoxItemAutomationId = "RGBComboBoxItem"

Definition at line 218 of file ColorPickerTests.cs.

const string SaturationLabelAutomationId = "SaturationLabel"

Definition at line 229 of file ColorPickerTests.cs.

const string SaturationTextBoxAutomationId = "SaturationTextBox"

Definition at line 228 of file ColorPickerTests.cs.

const string ThirdDimensionAutomationId = "ThirdDimensionSlider"

Definition at line 213 of file ColorPickerTests.cs.

const string ValueLabelAutomationId = "ValueLabel"

Definition at line 231 of file ColorPickerTests.cs.

const string ValueTextBoxAutomationId = "ValueTextBox"

Definition at line 230 of file ColorPickerTests.cs.

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerTests::Color Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorPickerTests
  • ColorPickerTests::Color
Static Public Member Functions | Properties

ColorPickerTests::Color Class Reference

List of all members.

Static Public Member Functions

static Color | FromArgb (byte a, byte r, byte g, byte b)

Properties

byte | A [get, set]
byte | B [get, set]
byte | G [get, set]
byte | R [get, set]

Detailed Description

Definition at line 246 of file ColorPickerTests.cs.

Member Function Documentation

static Color FromArgb | ( | byte | a,
 |  | byte | r,
 |  | byte | g,
 |  | byte | b |
 | ) |  |  | [inline, static]

Definition at line 253 of file ColorPickerTests.cs.

            {
                return new Color() { A = a, R = r, G = g, B = b };
            }

Property Documentation

byte A [get, set]

Definition at line 248 of file ColorPickerTests.cs.

byte B [get, set]

Definition at line 251 of file ColorPickerTests.cs.

byte G [get, set]

Definition at line 250 of file ColorPickerTests.cs.

byte R [get, set]

Definition at line 249 of file ColorPickerTests.cs.

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerTests::ColorPickerTestSetupHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorPickerTests
  • ColorPickerTests::ColorPickerTestSetupHelper
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

ColorPickerTests::ColorPickerTestSetupHelper Class Reference

List of all members.

Public Member Functions

ColorPickerTestSetupHelper (string testName, string languageOverride="")
void | ExecuteAndWaitForColorChange (Action action)
void | SinkEvent (WaiterEventArgs eventArgs)
void | StartTrackingColorChanges ()

Protected Member Functions

override void | Dispose (bool isDisposing)

Properties

Color | Color [get, set]
static ColorPickerTestSetupHelper | Current [get, set]

Private Member Functions

[instance initializer]
byte | ParseAlphaTextBoxValue (object value)

Private Attributes

PropertyChangedEventSource | alphaEventSource
PropertyChangedEventSource | blueEventSource
ManualResetEvent | colorChangedEvent
PropertyChangedEventSource | greenEventSource
object | lockObject
PropertyChangedEventSource | redEventSource
bool | waitingForColorChanged

Detailed Description

Definition at line 259 of file ColorPickerTests.cs.

Constructor & Destructor Documentation

ColorPickerTestSetupHelper | ( | string | testName,
 |  | string | languageOverride = "" |
 | ) |  |  | [inline]

Definition at line 282 of file ColorPickerTests.cs.

                : base(testName, new TestSetupHelperOptions{ LanguageOverride = languageOverride})

Member Function Documentation

[instance initializer] ( ) [inline, private]
override void Dispose ( bool isDisposing ) [inline, protected]

Definition at line 332 of file ColorPickerTests.cs.

            {
                base.Dispose(isDisposing);

                lock (lockObject)
                {
                    if (redEventSource == null || greenEventSource == null || blueEventSource == null || alphaEventSource == null)
                    {
                        throw new Exception("Color change tracking was never started. Make sure to call StartTrackingColorChanges() on ColorPickerTestSetupHelper.");
                    }

                    redEventSource.Stop();
                    redEventSource.Dispose();
                    redEventSource = null;

                    greenEventSource.Stop();
                    greenEventSource.Dispose();
                    greenEventSource = null;

                    blueEventSource.Stop();
                    blueEventSource.Dispose();
                    blueEventSource = null;

                    alphaEventSource.Stop();
                    alphaEventSource.Dispose();
                    alphaEventSource = null;

                    colorChangedEvent.Dispose();
                    colorChangedEvent = null;
                }

                Current = null;
            }

void ExecuteAndWaitForColorChange ( Action action ) [inline]

Definition at line 319 of file ColorPickerTests.cs.

            {
                waitingForColorChanged = true;
                colorChangedEvent.Reset();
                action();

                Log.Comment("Waiting for color to change...");
                colorChangedEvent.WaitOne();
                Log.Comment("Color changed.");

                waitingForColorChanged = false;
            }

byte ParseAlphaTextBoxValue ( object value ) [inline, private]

Definition at line 418 of file ColorPickerTests.cs.

            {
                return (byte)(byte.Parse((value.ToString()).TrimEnd('%')) * 255 / 100);
            }

void SinkEvent ( WaiterEventArgs eventArgs ) [inline]

Definition at line 366 of file ColorPickerTests.cs.

            {
                lock (lockObject)
                {
                    AutomationPropertyChangedEventArgs args = eventArgs.EventArgs as AutomationPropertyChangedEventArgs;
                    string channelChanged = string.Empty;
                    byte oldValue = 0;
                    byte newValue = 0;

                    string senderAutomationId = eventArgs.Sender.AutomationId;

                    switch (senderAutomationId)
                    {
                        case RedTextBoxAutomationId:
                            channelChanged = "Red";
                            oldValue = Color.R;
                            Color = Color.FromArgb(Color.A, byte.Parse(args.NewValue as string), Color.G, Color.B);
                            newValue = Color.R;
                            break;
                        case GreenTextBoxAutomationId:
                            channelChanged = "Green";
                            oldValue = Color.G;
                            Color = Color.FromArgb(Color.A, Color.R, byte.Parse(args.NewValue as string), Color.B);
                            newValue = Color.G;
                            break;
                        case BlueTextBoxAutomationId:
                            channelChanged = "Blue";
                            oldValue = Color.B;
                            Color = Color.FromArgb(Color.A, Color.R, Color.G, byte.Parse(args.NewValue as string));
                            newValue = Color.B;
                            break;
                        case AlphaTextBoxAutomationId:
                            channelChanged = "Alpha";
                            oldValue = Color.A;
                            // The alpha text box contains a percentage rather than a number between 0 and 255,
                            // so we need to convert it to that before giving its value to ColorHelper.FromArgb().
                            Color = Color.FromArgb(ParseAlphaTextBoxValue(args.NewValue), Color.R, Color.G, Color.B);
                            newValue = Color.A;
                            break;
                        default:
                            throw new Exception(string.Format("Unknown sender '{0}'.", senderAutomationId));
                    }

                    Log.Comment("{0} changed from {1} to {2}. Color is now RGBA = ({3}, {4}, {5}, {6}).", channelChanged, oldValue, newValue, Color.R, Color.G, Color.B, Color.A);

                    if (waitingForColorChanged && colorChangedEvent != null)
                    {
                        colorChangedEvent.Set();
                    }
                }
            }

void StartTrackingColorChanges ( ) [inline]

Definition at line 297 of file ColorPickerTests.cs.

            {
                Edit redTextBox = new Edit(FindElement.ById(RedTextBoxAutomationId));
                Edit greenTextBox = new Edit(FindElement.ById(GreenTextBoxAutomationId));
                Edit blueTextBox = new Edit(FindElement.ById(BlueTextBoxAutomationId));
                Edit alphaTextBox = new Edit(FindElement.ById(AlphaTextBoxAutomationId));

                Color = Color.FromArgb(ParseAlphaTextBoxValue(alphaTextBox.Value), byte.Parse(redTextBox.Value), byte.Parse(greenTextBox.Value), byte.Parse(blueTextBox.Value));

                redEventSource = new PropertyChangedEventSource(redTextBox, Scope.Element, UIProperty.Get("Value.Value"));
                greenEventSource = new PropertyChangedEventSource(greenTextBox, Scope.Element, UIProperty.Get("Value.Value"));
                blueEventSource = new PropertyChangedEventSource(blueTextBox, Scope.Element, UIProperty.Get("Value.Value"));
                alphaEventSource = new PropertyChangedEventSource(alphaTextBox, Scope.Element, UIProperty.Get("Value.Value"));

                redEventSource.Start(this);
                greenEventSource.Start(this);
                blueEventSource.Start(this);
                alphaEventSource.Start(this);

                Log.Comment("Color-change tracking started. Initial color is RGBA = ({0}, {1}, {2}, {3}).", Color.R, Color.G, Color.B, Color.A);
            }

Member Data Documentation

PropertyChangedEventSource alphaEventSource [private]

Definition at line 264 of file ColorPickerTests.cs.

PropertyChangedEventSource blueEventSource [private]

Definition at line 263 of file ColorPickerTests.cs.

ManualResetEvent colorChangedEvent [private]

Definition at line 267 of file ColorPickerTests.cs.

PropertyChangedEventSource greenEventSource [private]

Definition at line 262 of file ColorPickerTests.cs.

object lockObject [private]

Definition at line 266 of file ColorPickerTests.cs.

PropertyChangedEventSource redEventSource [private]

Definition at line 261 of file ColorPickerTests.cs.

bool waitingForColorChanged [private]

Definition at line 268 of file ColorPickerTests.cs.

Property Documentation

Color Color [get, set]

Definition at line 277 of file ColorPickerTests.cs.

ColorPickerTestSetupHelper Current [static, get, set]

Definition at line 271 of file ColorPickerTests.cs.

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSpectrum Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorSpectrum
Classes | Public Member Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes

ColorSpectrum Class Reference

List of all members.

Classes

class | ColorSpectrumFactory

Public Member Functions

ColorSpectrum (UIObject uiObject)
ColorChangedEventWaiter GetColorChangedWaiter ()
virtual void | SetValue (string value)

Properties

new static IFactory
< ColorSpectrum > 		Factory [get]
virtual bool | IsReadOnly [get]
virtual string | Value [get]

Private Member Functions

void | Initialize ()

Private Attributes

IValue | _valuePattern

Static Private Attributes

static IFactory< ColorSpectrum > | _factory = null

Detailed Description

Definition at line 27 of file ColorPickerTests.cs.

Constructor & Destructor Documentation

ColorSpectrum ( UIObject uiObject ) [inline]

Definition at line 29 of file ColorPickerTests.cs.

            : base(uiObject)
        {
            this.Initialize();
        }

Member Function Documentation

ColorChangedEventWaiter GetColorChangedWaiter ( ) [inline]

Definition at line 40 of file ColorPickerTests.cs.

        {
            return new ColorChangedEventWaiter();
        }

void Initialize ( ) [inline, private]

Definition at line 35 of file ColorPickerTests.cs.

        {
            _valuePattern = new ValueImplementation(this);
        }

virtual void SetValue ( string value ) [inline, virtual]

Definition at line 45 of file ColorPickerTests.cs.

        {
            _valuePattern.SetValue(value);
        }

Member Data Documentation

IFactory<ColorSpectrum> _factory = null [static, private]

Definition at line 79 of file ColorPickerTests.cs.

IValue _valuePattern [private]

Definition at line 78 of file ColorPickerTests.cs.

Property Documentation

new static IFactory<ColorSpectrum> Factory [static, get]

Definition at line 67 of file ColorPickerTests.cs.

virtual bool IsReadOnly [get]

Definition at line 59 of file ColorPickerTests.cs.

virtual string Value [get]

Definition at line 51 of file ColorPickerTests.cs.

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSpectrum::ColorSpectrumFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ColorSpectrum
  • ColorSpectrum::ColorSpectrumFactory
Public Member Functions

ColorSpectrum::ColorSpectrumFactory Class Reference

List of all members.

Public Member Functions

ColorSpectrum Create (UIObject element)

Detailed Description

Definition at line 81 of file ColorPickerTests.cs.

Member Function Documentation

ColorSpectrum Create ( UIObject element ) [inline]

Definition at line 83 of file ColorPickerTests.cs.

            {
                return new ColorSpectrum(element);
            }

The documentation for this class was generated from the following file:
  • ColorPicker/InteractionTests/ColorPickerTests.cs
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • CommandBarFlyoutTests
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

CommandBarFlyoutTests Class Reference

List of all members.

Classes

class | CommandBarFlyoutTestSetupHelper

Public Member Functions

void | CanHideCommandBarFlyoutInFlyoutClosedHandler ()
void | CanTapOnPrimaryItems ()
void | CanTapOnSecondaryItems ()
void | CanTapOnSecondaryItemWithFlyoutWithoutClosing ()
void | CommandBarFlyoutCommandBecomingVisibleHasCorrectVisuals ()
void | TestCleanup ()
void | VerifyAddPrimaryCommandsDynamically ()
void | VerifyAlwaysExpandedBehavior ()
void | VerifyDynamicOverflowContentRootWidth ()
void | VerifyDynamicSecondaryCommandLabel ()
void | VerifyDynamicSecondaryCommandVisibility ()
void | VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommands ()
void | VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommandsWithAlwaysExpanded ()
void | VerifyFlowsToAndFromIsNotSetWithoutPrimaryCommands ()
void | VerifyFlyoutCloseKeyboardBehavior ()
void | VerifyFlyoutClosingBehavior ()
void | VerifyFlyoutOpenKeyboardBehavior ()
void | VerifyIsFlyoutKeyboardAccessibleWithNoPrimaryCommands ()
void | VerifyLeftAndRightNavigationBetweenPrimaryCommands ()
void | VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTL ()
void | VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTLUpAndDown ()
void | VerifyLeftAndRightNavigationBetweenPrimaryCommandsUpAndDown ()
void | VerifyPrimaryCommandsAutomationSet ()
void | VerifyPrimaryCommandsAutomationSetWithAlwaysExpanded ()
void | VerifyTabNavigationBetweenPrimaryAndSecondaryCommands ()
void | VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommands ()
void | VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommandsWithAlwaysExpanded ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | CanHideCommandBarFlyoutInFlyoutClosedHandler (bool useAnimations)
void | VerifyLeftAndRightNavigationBetweenPrimaryCommands (bool inRTL, bool useUpDownKeys)

Static Private Member Functions

static partial Regex | BoundsRegex ()

Private Attributes

const int | UIA_FlowsFromPropertyId = 30148
const int | UIA_FlowsToPropertyId = 30106
const int | UIA_PositionInSetPropertyId = 30152
const int | UIA_SizeOfSetPropertyId = 30153

Detailed Description

Definition at line 25 of file CommandBarFlyoutTests.cs.

Member Function Documentation

static partial Regex BoundsRegex ( ) [static, private]
void CanHideCommandBarFlyoutInFlyoutClosedHandler ( ) [inline]

Definition at line 1200 of file CommandBarFlyoutTests.cs.

        {
            CanHideCommandBarFlyoutInFlyoutClosedHandler(useAnimations: false);
            CanHideCommandBarFlyoutInFlyoutClosedHandler(useAnimations: true);
        }

void CanHideCommandBarFlyoutInFlyoutClosedHandler ( bool useAnimations ) [inline, private]

Definition at line 1206 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                ToggleButton useAnimatedCommandBarFlyoutCommandBarStyleCheckBox = FindElement.ById<ToggleButton>("UseAnimatedCommandBarFlyoutCommandBarStyleCheckBox");
                Verify.IsNotNull(useAnimatedCommandBarFlyoutCommandBarStyleCheckBox);

                if (useAnimations && useAnimatedCommandBarFlyoutCommandBarStyleCheckBox.ToggleState == ToggleState.Off)
                {
                    Log.Comment("Using DefaultCommandBarFlyoutCommandBarStyle with animations.");
                    useAnimatedCommandBarFlyoutCommandBarStyleCheckBox.Toggle();
                    Wait.ForIdle();
                }

                ToggleButton hideFlyoutOnFlyoutClosedCheckBox = FindElement.ById<ToggleButton>("HideFlyoutOnFlyoutClosedCheckBox");
                Verify.IsNotNull(hideFlyoutOnFlyoutClosedCheckBox);

                if (hideFlyoutOnFlyoutClosedCheckBox.ToggleState == ToggleState.Off)
                {
                    Log.Comment("Hiding CommandBarFlyout in FlyoutClosed handler.");
                    hideFlyoutOnFlyoutClosedCheckBox.Toggle();
                    Wait.ForIdle();
                }

                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");
                ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

                Log.Comment("Invoking button 'Show CommandBarFlyout with AlwaysExpanded' to show the Flyout9 command bar.");
                showCommandBarFlyoutButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Checking command bar opened successfully.");
                Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);

                using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
                {
                    Log.Comment("Invoking the first secondary command to close the CommandBarFlyout.");
                    setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("UndoButton9").Invoke(), new List<string>() { "UndoButton9 clicked" });
                    waiter.Wait();
                }
                Wait.ForIdle();

                Log.Comment("Checking command bar closed successfully.");
                Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
            }
        }

void CanTapOnPrimaryItems ( ) [inline]

Definition at line 87 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");

                Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                Log.Comment("Tapping on the buttons in the primary commands list.");
                setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("CutButton1")), new List<string>() { "CutButton1 clicked" });
                setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("CopyButton1")), new List<string>() { "CopyButton1 clicked" });
                setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("PasteButton1")), new List<string>() { "PasteButton1 clicked" });
                setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("BoldButton1")), new List<string>() { "BoldButton1 clicked" });
                setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("ItalicButton1")), new List<string>() { "ItalicButton1 clicked" });
                setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("UnderlineButton1")), new List<string>() { "UnderlineButton1 clicked" });

                Log.Comment("Tapping on the button to hide the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);
            }
        }

void CanTapOnSecondaryItems ( ) [inline]

Definition at line 111 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
                ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

                Action openCommandBarAction = () =>
                {
                    Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                    InputHelper.Tap(showCommandBarFlyoutButton);

                    Log.Comment("Expanding the CommandBar by invoking the more button.");
                    FindElement.ById<Button>("MoreButton").InvokeAndWait();
                };

                Log.Comment("Opening the CommandBar and invoking the first button in the secondary commands list.");
                openCommandBarAction();

                using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
                {
                    setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("UndoButton1").Invoke(), new List<string>() { "UndoButton1 clicked" });
                    waiter.Wait();
                }

                Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);

                Log.Comment("Opening the CommandBar and invoking the second button in the secondary commands list.");
                openCommandBarAction();

                using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
                {
                    setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("RedoButton1").Invoke(), new List<string>() { "RedoButton1 clicked" });
                    waiter.Wait();
                }

                Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);

                Log.Comment("Opening the CommandBar and invoking the third button in the secondary commands list.");
                openCommandBarAction();

                using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
                {
                    setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("SelectAllButton1").Invoke(), new List<string>() { "SelectAllButton1 clicked" });
                    waiter.Wait();
                }

                Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);

                Log.Comment("Opening the CommandBar and invoking the toggle button in the secondary commands list.");
                openCommandBarAction();

                using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
                {
                    setup.ExecuteAndWaitForEvents(() => FindElement.ById<ToggleButton>("FavoriteToggleButton1").Toggle(), new List<string>() { "FavoriteToggleButton1 checked" });
                    waiter.Wait();
                }

                Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);
            }
        }

void CanTapOnSecondaryItemWithFlyoutWithoutClosing ( ) [inline]

Definition at line 176 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");
                ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

                Action openCommandBarAction = () =>
                {
                    Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                    InputHelper.Tap(showCommandBarFlyoutButton);

                    Log.Comment("Expanding the CommandBar by invoking the more button.");
                    FindElement.ById<Button>("MoreButton").InvokeAndWait();
                };

                Log.Comment("Opening the CommandBar and invoking the first button in the secondary commands list.");
                openCommandBarAction();

                setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("ProofingButton").Invoke(), new List<string>() { "ProofingButton clicked" });

                Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.On);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 37 of file CommandBarFlyoutTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void CommandBarFlyoutCommandBecomingVisibleHasCorrectVisuals ( ) [inline]

Definition at line 1255 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                var showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with a delayed AppBarButton flyout");
                showCommandBarFlyoutButton.SetFocus();

                Rectangle originalBoundingRectangle = new();
                var isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

                setup.ExecuteAndWaitForEvent(() =>
                {
                    using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
                    {
                        showCommandBarFlyoutButton.Invoke();
                        waiter.Wait();
                    }

                    var undoButton16 = FindElement.ById<Button>("UndoButton16");
                    originalBoundingRectangle = undoButton16.BoundingRectangle;
                }, "Undo with overflow visible");

                Wait.ForIdle();

                Log.Comment("The Undo button without an overflow should be less wide than the Undo button with an overflow.");
                var undoButtonOverflow16 = FindElement.ById<Button>("UndoButtonOverflow16");
                Verify.IsLessThan(originalBoundingRectangle.Width, undoButtonOverflow16.BoundingRectangle.Width);

                var extraInformationTextBox = FindElement.ById<Edit>("ExtraInformationTextBox");
                var boundsText = extraInformationTextBox.GetText();
                Rectangle undoButtonOverflow16IconBounds;
                Rectangle undoButtonOverflow16OverflowTextLabelBounds;
                Rectangle redoButton16IconBounds;

                var boundsPatternMatch = BoundsRegex().Match(boundsText);
                undoButtonOverflow16IconBounds = new Rectangle(int.Parse(boundsPatternMatch.Groups[1].Value), int.Parse(boundsPatternMatch.Groups[2].Value), int.Parse(boundsPatternMatch.Groups[3].Value), int.Parse(boundsPatternMatch.Groups[4].Value));
                undoButtonOverflow16OverflowTextLabelBounds = new Rectangle(int.Parse(boundsPatternMatch.Groups[5].Value), int.Parse(boundsPatternMatch.Groups[6].Value), int.Parse(boundsPatternMatch.Groups[7].Value), int.Parse(boundsPatternMatch.Groups[8].Value));
                redoButton16IconBounds = new Rectangle(int.Parse(boundsPatternMatch.Groups[9].Value), int.Parse(boundsPatternMatch.Groups[10].Value), int.Parse(boundsPatternMatch.Groups[11].Value), int.Parse(boundsPatternMatch.Groups[12].Value));

                Verify.IsLessThan(undoButtonOverflow16IconBounds.X, undoButtonOverflow16OverflowTextLabelBounds.X);
                Verify.AreEqual(undoButtonOverflow16IconBounds.X, redoButton16IconBounds.X);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 43 of file CommandBarFlyoutTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyAddPrimaryCommandsDynamically ( ) [inline]

Definition at line 1152 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");
                ToggleButton addPrimaryCommandDynamicallyCheckBox = FindElement.ById<ToggleButton>("AddPrimaryCommandDynamicallyCheckBox");
                ToggleButton clearPrimaryCommandsCheckBox = FindElement.ById<ToggleButton>("ClearPrimaryCommandsCheckBox");
                ToggleButton primaryCommandDynamicallyAddedCheckBox = FindElement.ById<ToggleButton>("PrimaryCommandDynamicallyAddedCheckBox");
                Edit dynamicLabelTimerIntervalTextBox = new Edit(FindElement.ById("DynamicLabelTimerIntervalTextBox"));
                Edit dynamicLabelChangeCountTextBox = new Edit(FindElement.ById("DynamicLabelChangeCountTextBox"));

                Log.Comment("Setting DynamicLabelTimerIntervalTextBox to 2s");
                dynamicLabelTimerIntervalTextBox.SetValue("2000");

                Log.Comment("Setting DynamicLabelChangeCountTextBox to 1 single change");
                dynamicLabelChangeCountTextBox.SetValue("1");
                Wait.ForIdle();

                Log.Comment("Set Flyout6 to add Primary Commands dynamically");
                addPrimaryCommandDynamicallyCheckBox.Check();
                Wait.ForIdle();

                Log.Comment("Invoke FlyoutTarget 6 to Show CommandBarFlyout with no primary commands");
                showCommandBarFlyoutButton.InvokeAndWait();

                Log.Comment("Waiting for SecondaryCommandDynamicLabelChangedCheckBox becoming checked indicating the asynchronous Label property change occurred");
                primaryCommandDynamicallyAddedCheckBox.GetToggledWaiter().Wait();
                Wait.ForIdle();

                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();

                KeyboardHelper.PressKey(Key.Right);
                Wait.ForIdle();

                Log.Comment("Verifying Primary Commands is added and MoreButton is actionable");

                Button moreButton = FindElement.ById<Button>("MoreButton");
                var moreButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);

                Log.Comment("Dismissing flyout");
                KeyboardHelper.PressKey(Key.Escape);
            }
        }

void VerifyAlwaysExpandedBehavior ( ) [inline]

Definition at line 678 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");

                Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                showCommandBarFlyoutButton.InvokeAndWait();

                Log.Comment("Verifying that the secondary commands are visible.");
                Button undoButton = FindElement.ById<Button>("UndoButton9");
                Verify.IsNotNull(undoButton);

                Log.Comment("Verifying that the ... button is not visible.");
                UIObject moreButton = TryFindElement.ById("MoreButton");
                Verify.IsNull(moreButton);

                Log.Comment("Tapping on one of the primary commands");
                FindElement.ById<Button>("CutButton9").InvokeAndWait();
                ElementCache.Clear();

                Log.Comment("Verifying that the secondary commands are still visible.");
                undoButton = FindElement.ById<Button>("UndoButton9");
                Verify.IsNotNull(undoButton);

                Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);
            }
        }

void VerifyDynamicOverflowContentRootWidth ( ) [inline]

Definition at line 1051 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Log.Comment("Retrieving FlyoutTarget6");
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");

                Log.Comment("Retrieving IsFlyoutOpenCheckBox");
                ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

                Log.Comment("Retrieving UseOverflowContentRootDynamicWidthCheckBox");
                ToggleButton useOverflowContentRootDynamicWidthCheckBox = FindElement.ById<ToggleButton>("UseOverflowContentRootDynamicWidthCheckBox");

                Log.Comment("OverflowContentRootDynamicWidthChangedCheckBox");
                ToggleButton overflowContentRootDynamicWidthChangedCheckBox = FindElement.ById<ToggleButton>("OverflowContentRootDynamicWidthChangedCheckBox");

                Log.Comment("Retrieving DynamicWidthTimerIntervalTextBox");
                Edit dynamicWidthTimerIntervalTextBox = new Edit(FindElement.ById("DynamicWidthTimerIntervalTextBox"));

                Log.Comment("Retrieving DynamicWidthChangeCountTextBox");
                Edit dynamicWidthChangeCountTextBox = new Edit(FindElement.ById("DynamicWidthChangeCountTextBox"));

                Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);

                Log.Comment("Change the fifth command bar element's Visibility property asynchronously after the command bar is opened");
                useOverflowContentRootDynamicWidthCheckBox.CheckAndWait();

                Log.Comment("Setting DynamicWidthTimerIntervalTextBox to 1s");
                dynamicWidthTimerIntervalTextBox.SetValueAndWait("1000");

                Log.Comment("Setting DynamicWidthChangeCountTextBox to 1 single change");
                dynamicWidthChangeCountTextBox.SetValueAndWait("1");

                Verify.AreEqual(ToggleState.Off, overflowContentRootDynamicWidthChangedCheckBox.ToggleState);

                Log.Comment("Invoking button 'Show CommandBarFlyout with no primary commands' to show the Flyout6 command bar.");
                showCommandBarFlyoutButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);

                Button undoButton6 = FindElement.ById<Button>("UndoButton6");
                Verify.IsNotNull(undoButton6);

                Button redoButton6 = FindElement.ById<Button>("RedoButton6");
                Verify.IsNotNull(redoButton6);

                Rectangle initialBoundingRectangle = redoButton6.BoundingRectangle;

                Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Width=" + initialBoundingRectangle.Width);
                Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Height=" + initialBoundingRectangle.Height);

                Verify.AreEqual(ToggleState.Off, overflowContentRootDynamicWidthChangedCheckBox.ToggleState);

                Log.Comment("Waiting for OverflowContentRootDynamicWidthChangedCheckBox becoming checked indicating the asynchronous Visibility property change occurred");
                overflowContentRootDynamicWidthChangedCheckBox.GetToggledWaiter().Wait();
                Wait.ForIdle();

                Rectangle finalBoundingRectangle = redoButton6.BoundingRectangle;

                Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Width=" + finalBoundingRectangle.Width);
                Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Height=" + finalBoundingRectangle.Height);

                Log.Comment("Hitting Escape key to close the command bar.");
                KeyboardHelper.PressKey(Key.Escape);
                Wait.ForIdle();

                Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);

                Log.Comment("Verifying the command bar flyout width was increased to accommodate the OverflowContentRoot's larger Width.");
                Verify.IsGreaterThan(finalBoundingRectangle.Width, initialBoundingRectangle.Width);
                Verify.AreEqual(finalBoundingRectangle.Height, initialBoundingRectangle.Height);
            }
        }

void VerifyDynamicSecondaryCommandLabel ( ) [inline]

Definition at line 895 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Log.Comment("Retrieving FlyoutTarget6");
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");

                Log.Comment("Retrieving IsFlyoutOpenCheckBox");
                ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

                Log.Comment("Retrieving UseSecondaryCommandDynamicLabelCheckBox");
                ToggleButton useSecondaryCommandDynamicLabelCheckBox = FindElement.ById<ToggleButton>("UseSecondaryCommandDynamicLabelCheckBox");

                Log.Comment("SecondaryCommandDynamicLabelChangedCheckBox");
                ToggleButton secondaryCommandDynamicLabelChangedCheckBox = FindElement.ById<ToggleButton>("SecondaryCommandDynamicLabelChangedCheckBox");

                Log.Comment("Retrieving DynamicLabelTimerIntervalTextBox");
                Edit dynamicLabelTimerIntervalTextBox = new Edit(FindElement.ById("DynamicLabelTimerIntervalTextBox"));

                Log.Comment("Retrieving DynamicLabelChangeCountTextBox");
                Edit dynamicLabelChangeCountTextBox = new Edit(FindElement.ById("DynamicLabelChangeCountTextBox"));

                Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);

                Log.Comment("Change the first command bar element's Label property asynchronously after the command bar is opened");
                useSecondaryCommandDynamicLabelCheckBox.CheckAndWait();

                Log.Comment("Setting DynamicLabelTimerIntervalTextBox to 2s");
                dynamicLabelTimerIntervalTextBox.SetValueAndWait("2000");

                Log.Comment("Setting DynamicLabelChangeCountTextBox to 1 single change");
                dynamicLabelChangeCountTextBox.SetValueAndWait("1");

                Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicLabelChangedCheckBox.ToggleState);

                Log.Comment("Invoking button 'Show CommandBarFlyout with no primary commands' to show the Flyout6 command bar.");
                showCommandBarFlyoutButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);

                Button undoButton6 = FindElement.ById<Button>("UndoButton6");
                Verify.IsNotNull(undoButton6);

                UIObject commandBarElementsContainer = undoButton6.Parent;
                Verify.IsNotNull(commandBarElementsContainer);

                Button redoButton6 = FindElement.ById<Button>("RedoButton6");
                Verify.IsNotNull(redoButton6);

                Rectangle initialBoundingRectangle = redoButton6.BoundingRectangle;

                Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Width=" + initialBoundingRectangle.Width);
                Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Height=" + initialBoundingRectangle.Height);

                Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicLabelChangedCheckBox.ToggleState);

                Log.Comment("Waiting for SecondaryCommandDynamicLabelChangedCheckBox becoming checked indicating the asynchronous Label property change occurred");
                secondaryCommandDynamicLabelChangedCheckBox.GetToggledWaiter().Wait();
                Wait.ForIdle();

                Rectangle finalBoundingRectangle = redoButton6.BoundingRectangle;

                Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Width=" + finalBoundingRectangle.Width);
                Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Height=" + finalBoundingRectangle.Height);

                Log.Comment("Hitting Escape key to close the command bar.");
                KeyboardHelper.PressKey(Key.Escape);
                Wait.ForIdle();

                Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);

                Log.Comment("Verifying the command bar flyout width was increased to accommodate the longer label.");
                Verify.IsGreaterThan(finalBoundingRectangle.Width, initialBoundingRectangle.Width);
                Verify.AreEqual(finalBoundingRectangle.Height, initialBoundingRectangle.Height);
            }
        }

void VerifyDynamicSecondaryCommandVisibility ( ) [inline]

Definition at line 975 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Log.Comment("Retrieving FlyoutTarget6");
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");

                Log.Comment("Retrieving IsFlyoutOpenCheckBox");
                ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

                Log.Comment("Retrieving UseSecondaryCommandDynamicVisibilityCheckBox");
                ToggleButton useSecondaryCommandDynamicVisibilityCheckBox = FindElement.ById<ToggleButton>("UseSecondaryCommandDynamicVisibilityCheckBox");

                Log.Comment("SecondaryCommandDynamicVisibilityChangedCheckBox");
                ToggleButton secondaryCommandDynamicVisibilityChangedCheckBox = FindElement.ById<ToggleButton>("SecondaryCommandDynamicVisibilityChangedCheckBox");

                Log.Comment("Retrieving DynamicVisibilityTimerIntervalTextBox");
                Edit dynamicVisibilityTimerIntervalTextBox = new Edit(FindElement.ById("DynamicVisibilityTimerIntervalTextBox"));

                Log.Comment("Retrieving DynamicVisibilityChangeCountTextBox");
                Edit dynamicVisibilityChangeCountTextBox = new Edit(FindElement.ById("DynamicVisibilityChangeCountTextBox"));

                Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);

                Log.Comment("Change the fifth command bar element's Visibility property asynchronously after the command bar is opened");
                useSecondaryCommandDynamicVisibilityCheckBox.CheckAndWait();

                Log.Comment("Setting DynamicVisibilityTimerIntervalTextBox to 2s");
                dynamicVisibilityTimerIntervalTextBox.SetValueAndWait("2000");

                Log.Comment("Setting DynamicVisibilityChangeCountTextBox to 1 single change");
                dynamicVisibilityChangeCountTextBox.SetValueAndWait("1");

                Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicVisibilityChangedCheckBox.ToggleState);

                Log.Comment("Invoking button 'Show CommandBarFlyout with no primary commands' to show the Flyout6 command bar.");
                showCommandBarFlyoutButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);

                Button undoButton6 = FindElement.ById<Button>("UndoButton6");
                Verify.IsNotNull(undoButton6);

                Button redoButton6 = FindElement.ById<Button>("RedoButton6");
                Verify.IsNotNull(redoButton6);

                Rectangle initialBoundingRectangle = redoButton6.BoundingRectangle;

                Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Width=" + initialBoundingRectangle.Width);
                Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Height=" + initialBoundingRectangle.Height);

                Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicVisibilityChangedCheckBox.ToggleState);

                Log.Comment("Waiting for SecondaryCommandDynamicVisibilityChangedCheckBox becoming checked indicating the asynchronous Visibility property change occurred");
                secondaryCommandDynamicVisibilityChangedCheckBox.GetToggledWaiter().Wait();
                Wait.ForIdle();

                Rectangle finalBoundingRectangle = redoButton6.BoundingRectangle;

                Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Width=" + finalBoundingRectangle.Width);
                Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Height=" + finalBoundingRectangle.Height);

                Log.Comment("Hitting Escape key to close the command bar.");
                KeyboardHelper.PressKey(Key.Escape);
                Wait.ForIdle();

                Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);

                Log.Comment("Verifying the command bar flyout width and height were increased to accommodate the new AppBarButton.");
                Verify.IsGreaterThan(finalBoundingRectangle.Width, initialBoundingRectangle.Width);
                Verify.IsGreaterThan(finalBoundingRectangle.Height, initialBoundingRectangle.Height);
            }
        }

void VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommands ( ) [inline]

Definition at line 510 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");

                Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                showCommandBarFlyoutButton.InvokeAndWait();

                Log.Comment("Expanding the CommandBar by invoking the more button.");
                FindElement.ById<Button>("MoreButton").InvokeAndWait();

                FocusHelper.SetFocus(FindElement.ById("CutButton1"));

                Log.Comment("Retrieving the more button and undo button's automation element objects.");

                // Moving to the MoreButton to retrieve it
                for (int i = 0; i <= 6; i++)
                {
                    KeyboardHelper.PressKey(Key.Right);
                    Wait.ForIdle();
                }
                Button moreButton = FindElement.ById<Button>("MoreButton");
                var moreButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);

                // Moving to the Undo button to retrieve it
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                Button undoButton1 = FindElement.ById<Button>("UndoButton1");
                var undoButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton1.AutomationId);

                Log.Comment("Verifying that the two elements point at each other using FlowsTo and FlowsFrom.");
                var flowsToCollection = (AutomationElementCollection)moreButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsToPropertyId));

                Verify.AreEqual(1, flowsToCollection.Count);
                Verify.AreEqual(undoButtonElement, flowsToCollection[0]);

                var flowsFromCollection = (AutomationElementCollection)undoButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsFromPropertyId));

                Verify.AreEqual(1, flowsFromCollection.Count);
                Verify.AreEqual(moreButtonElement, flowsFromCollection[0]);

                Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);
            }
        }

void VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommandsWithAlwaysExpanded ( ) [inline]

Definition at line 849 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");

                Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                showCommandBarFlyoutButton.InvokeAndWait();

                Log.Comment("Press Right key to move focus to last primary command: Underline.");
                for (int i = 0; i < 5; i++)
                {
                    KeyboardHelper.PressKey(Key.Right);
                    Wait.ForIdle();
                }

                Button underlineButton9 = FindElement.ById<Button>("UnderlineButton9");
                var underlineButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(underlineButtonElement.Current.AutomationId, underlineButton9.AutomationId);

                // Moving to the Undo button to retrieve it
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();

                Button undoButton9 = FindElement.ById<Button>("UndoButton9");
                var undoButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton9.AutomationId);

                Log.Comment("Verifying that the two elements point at each other using FlowsTo and FlowsFrom.");
                var flowsToCollection = (AutomationElementCollection)underlineButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsToPropertyId));

                Verify.AreEqual(1, flowsToCollection.Count);
                Verify.AreEqual(undoButtonElement, flowsToCollection[0]);

                var flowsFromCollection = (AutomationElementCollection)undoButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsFromPropertyId));

                Verify.AreEqual(1, flowsFromCollection.Count);
                Verify.AreEqual(underlineButtonElement, flowsFromCollection[0]);

                Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);
            }
        }

void VerifyFlowsToAndFromIsNotSetWithoutPrimaryCommands ( ) [inline]

Definition at line 561 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");

                Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                Log.Comment("Retrieving the undo button's automation element object.");
                FindElement.ById("UndoButton6").SetFocus();
                Wait.ForIdle();
                var undoButtonElement = AutomationElement.FocusedElement;

                Log.Comment("Verifying that the undo button does not point at the more button using FlowsFrom.");
                var flowsFromCollection = (AutomationElementCollection)undoButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsFromPropertyId));
                Verify.AreEqual(0, flowsFromCollection.Count);

                Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);
            }
        }

void VerifyFlyoutCloseKeyboardBehavior ( ) [inline]

Definition at line 643 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");

                Log.Comment("Show the CommandBarFlyout.");
                InputHelper.RightClick(showCommandBarFlyoutButton, 10, 10);

                Log.Comment("Press Down key to move focus to first secondary command: Proofing.");
                for (int i = 0; i < 7; i++)
                {
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                }

                // Press right key to open flyout
                KeyboardHelper.PressKey(Key.Right);
                Wait.ForIdle();

                // Press left key to close flyout
                KeyboardHelper.PressKey(Key.Left);
                Wait.ForIdle();

                // Navigate down
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();

                // Click AppBarButton item
                setup.ExecuteAndWaitForEvents(() => KeyboardHelper.PressKey(Key.Enter), new List<string>() { "UndoButton5 clicked" });
            }
        }

void VerifyFlyoutClosingBehavior ( ) [inline]

Definition at line 586 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");

                Log.Comment("Tapping on a button to show the CommandBarFlyout.");
                showCommandBarFlyoutButton.Click();

                Log.Comment("Expanding the CommandBar by invoking the more button.");
                FindElement.ById<Button>("MoreButton").InvokeAndWait();

                // Click item to open flyout
                FindElement.ById<Button>("ProofingButton").Click();

                // Move around over the first item to keep flyout open safely
                // This also verifies that the flyout is open as it would crash otherwise
                PointerInput.Move(FindElement.ByName("FirstFlyoutItem"), 5, 5);
                PointerInput.Move(FindElement.ByName("FirstFlyoutItem"), 6, 5);
                PointerInput.Move(FindElement.ByName("FirstFlyoutItem"), 5, 6);

                // Click outside of the flyout to close it
                InputHelper.Tap(FindElement.ByName<Button>("Show CommandBarFlyout"));

                // Check that the flyout item is not present anymore
                VerifyElement.NotFound("FirstFlyoutItem",FindBy.Name);
            }
        }

void VerifyFlyoutOpenKeyboardBehavior ( ) [inline]

Definition at line 617 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");

                Log.Comment("Show the CommandBarFlyout.");
                InputHelper.RightClick(showCommandBarFlyoutButton, 10, 10);

                Log.Comment("Press Down key to move focus to first secondary command: Proofing.");
                for (int i = 0; i < 7; i++)
                {
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                }

                // Press right key to open flyout
                KeyboardHelper.PressKey(Key.Right);

                // Click first item on flyout
                setup.ExecuteAndWaitForEvents(() => KeyboardHelper.PressKey(Key.Enter), new List<string>() { "FirstFlyoutItem clicked" });
            }
        }

void VerifyIsFlyoutKeyboardAccessibleWithNoPrimaryCommands ( ) [inline]

Definition at line 1127 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButtonWithNoPrimaryCommands = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");

                Log.Comment("Tap on a button to show the CommandBarFlyout.");
                showCommandBarFlyoutButtonWithNoPrimaryCommands.InvokeAndWait();

                Button undoButton6 = FindElement.ById<Button>("UndoButton6");
                var undoButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton6.AutomationId);

                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();

                Log.Comment("Press Up key to make sure commands loops focus to last secondary command: Favorite.");
                Button favoriteToggleButton6 = FindElement.ById<Button>("FavoriteToggleButton6");
                var favoriteToggleElement = AutomationElement.FocusedElement;
                Verify.AreEqual(favoriteToggleElement.Current.AutomationId, favoriteToggleButton6.AutomationId);
            }
        }

void VerifyLeftAndRightNavigationBetweenPrimaryCommands | ( | bool | inRTL,
 |  | bool | useUpDownKeys |
 | ) |  |  | [inline, private]

Definition at line 262 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");

                if (inRTL)
                {
                    ToggleButton isRTLCheckBox = FindElement.ById<ToggleButton>("IsRTLCheckBox");

                    Log.Comment("Switch to RightToLeft FlowDirection.");
                    isRTLCheckBox.Toggle();
                    Wait.ForIdle();
                }

                string rightStr;
                string leftStr;
                Key rightKey;
                Key leftKey;

                if (useUpDownKeys)
                {
                    // Down and Up keys are used to move logically within the primary commands: Up to move to the previous command and Down to move to the next command.
                    rightStr = "Down";
                    leftStr = "Up";
                    rightKey = Key.Down;
                    leftKey = Key.Up;
                }
                else
                {
                    // Left and Right keys are used to move physically within the primary commands: Left to move to the left command and Right to move to the right command.
                    rightStr = inRTL ? "Left" : "Right";
                    leftStr = inRTL ? "Right" : "Left";
                    rightKey = inRTL ? Key.Left : Key.Right;
                    leftKey = inRTL ? Key.Right : Key.Left;
                }

                Log.Comment("Tap on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                FocusHelper.SetFocus(FindElement.ById("CutButton1"));

                Log.Comment($"Press {rightStr} key to move focus to second primary command: Copy.");
                KeyboardHelper.PressKey(rightKey);
                Wait.ForIdle();

                Button copyButton1 = FindElement.ById<Button>("CopyButton1");
                var copyButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(copyButtonElement.Current.AutomationId, copyButton1.AutomationId);

                Log.Comment($"Press {leftStr} key to move focus back to first primary command: Cut.");
                KeyboardHelper.PressKey(leftKey);
                Wait.ForIdle();

                Button cutButton1 = FindElement.ById<Button>("CutButton1");
                var cutButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);

                if (!useUpDownKeys)
                {
                    Log.Comment($"Press {leftStr} key and remain on first primary command: Cut.");
                    KeyboardHelper.PressKey(leftKey);
                    Wait.ForIdle();

                    cutButtonElement = AutomationElement.FocusedElement;
                    Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
                }

                Log.Comment($"Press {rightStr} key to move focus to MoreButton.");
                for (int i = 0; i <= 5; i++)
                {
                    KeyboardHelper.PressKey(rightKey);
                    Wait.ForIdle();
                }

                Button moreButton = FindElement.ById<Button>("MoreButton");
                var moreButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);

                if (!useUpDownKeys)
                {
                    Log.Comment($"Press {rightStr} key and remain on MoreButton.");
                    KeyboardHelper.PressKey(rightKey);
                    Wait.ForIdle();

                    moreButtonElement = AutomationElement.FocusedElement;
                    Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
                }
            }
        }

void VerifyLeftAndRightNavigationBetweenPrimaryCommands ( ) [inline]

Definition at line 234 of file CommandBarFlyoutTests.cs.

        {
            VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: false, useUpDownKeys: false);
        }

void VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTL ( ) [inline]

Definition at line 241 of file CommandBarFlyoutTests.cs.

        {
            VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: true,  useUpDownKeys: false);

        }

void VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTLUpAndDown ( ) [inline]

Definition at line 257 of file CommandBarFlyoutTests.cs.

        {
            VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: true,  useUpDownKeys: true);
        }

void VerifyLeftAndRightNavigationBetweenPrimaryCommandsUpAndDown ( ) [inline]

Definition at line 249 of file CommandBarFlyoutTests.cs.

        {
            VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: false, useUpDownKeys: true);

        }

void VerifyPrimaryCommandsAutomationSet ( ) [inline]

Definition at line 451 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");

                Log.Comment("Tap on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                FocusHelper.SetFocus(FindElement.ById("CutButton1"));

                Button cutButton1 = FindElement.ById<Button>("CutButton1");
                var cutButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);

                int sizeOfSet = (int)cutButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
                int positionInSet = (int)cutButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));

                Log.Comment("Verify first primary command's SizeOfSet and PositionInSet automation properties.");
                Verify.AreEqual(sizeOfSet, 7);
                Verify.IsTrue(positionInSet == -1 || positionInSet == 1);

                Log.Comment("Press Right key to move focus to last primary command: Underline.");
                for (int i = 0; i <= 4; i++)
                {
                    KeyboardHelper.PressKey(Key.Right);
                    Wait.ForIdle();
                }

                Button underlineButton1 = FindElement.ById<Button>("UnderlineButton1");
                var underlineButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(underlineButtonElement.Current.AutomationId, underlineButton1.AutomationId);

                sizeOfSet = (int)underlineButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
                positionInSet = (int)underlineButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));

                Log.Comment("Verify last primary command's SizeOfSet and PositionInSet automation properties.");
                Verify.AreEqual(sizeOfSet, 7);
                Verify.IsTrue(positionInSet == -1 || positionInSet == 6);

                Log.Comment("Press Right key to move focus to MoreButton.");
                KeyboardHelper.PressKey(Key.Right);
                Wait.ForIdle();

                Button moreButton = FindElement.ById<Button>("MoreButton");
                var moreButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);

                sizeOfSet = (int)moreButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
                positionInSet = (int)moreButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));

                Log.Comment("Verify MoreButton's SizeOfSet and PositionInSet automation properties.");
                Verify.AreEqual(sizeOfSet, 7);
                Verify.AreEqual(positionInSet, 7);
            }
        }

void VerifyPrimaryCommandsAutomationSetWithAlwaysExpanded ( ) [inline]

Definition at line 797 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");

                Log.Comment("Tap on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                Button cutButton9 = FindElement.ById<Button>("CutButton9");
                var focusedElement = AutomationElement.FocusedElement;
                Verify.AreEqual(focusedElement.Current.AutomationId, cutButton9.AutomationId);

                int sizeOfSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
                int positionInSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));

                Log.Comment("Verify first primary command's SizeOfSet and PositionInSet automation properties.");
                Verify.AreEqual(sizeOfSet, 6);
                Verify.IsTrue(positionInSet == -1 || positionInSet == 1);

                Log.Comment("Press Right key to move focus to last primary command: Underline.");
                for (int i = 0; i < 5; i++)
                {
                    KeyboardHelper.PressKey(Key.Right);
                    Wait.ForIdle();
                }

                Button underlineButton9 = FindElement.ById<Button>("UnderlineButton9");
                focusedElement = AutomationElement.FocusedElement;
                Verify.AreEqual(focusedElement.Current.AutomationId, underlineButton9.AutomationId);

                sizeOfSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
                positionInSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));

                Log.Comment("Verify last primary command's SizeOfSet and PositionInSet automation properties.");
                Verify.AreEqual(sizeOfSet, 6);
                Verify.IsTrue(positionInSet == -1 || positionInSet == 6);

                Log.Comment("Press Right key. Focus should not move.");
                KeyboardHelper.PressKey(Key.Right);
                Wait.ForIdle();

                focusedElement = AutomationElement.FocusedElement;
                Verify.AreEqual(focusedElement.Current.AutomationId, underlineButton9.AutomationId);

                Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);
            }
        }

void VerifyTabNavigationBetweenPrimaryAndSecondaryCommands ( ) [inline]

Definition at line 203 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");

                Log.Comment("Tap on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                FocusHelper.SetFocus(FindElement.ById("CutButton1"));

                Log.Comment("Press Tab key to move focus to first secondary command: Undo.");
                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();

                Button undoButton1 = FindElement.ById<Button>("UndoButton1");
                var undoButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton1.AutomationId);

                Log.Comment("Press Tab key to move focus to first primary command: Cut.");
                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();

                Button cutButton1 = FindElement.ById<Button>("CutButton1");
                var cutButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
            }
        }

void VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommands ( ) [inline]

Definition at line 355 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");

                Log.Comment("Tap on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                FocusHelper.SetFocus(FindElement.ById("CutButton1"));

                Log.Comment("Press Down key to move focus to second primary command: Copy.");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();

                Button copyButton1 = FindElement.ById<Button>("CopyButton1");
                var copyButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(copyButtonElement.Current.AutomationId, copyButton1.AutomationId);

                Log.Comment("Press Up key to move focus back to first primary command: Cut.");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();

                Button cutButton1 = FindElement.ById<Button>("CutButton1");
                var cutButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);

                Log.Comment("Press Down key to move focus to last primary command: Underline.");
                for (int i = 0; i <= 4; i++)
                {
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                }

                Button underlineButton1 = FindElement.ById<Button>("UnderlineButton1");
                var underlineButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(underlineButtonElement.Current.AutomationId, underlineButton1.AutomationId);

                Log.Comment("Press Down key to move focus to MoreButton.");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();

                Button moreButton = FindElement.ById<Button>("MoreButton");
                var moreButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);

                Log.Comment("Press Up key to move focus to first primary command: Cut.");
                for (int i = 0; i <= 5; i++)
                {
                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                }

                cutButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);

                Log.Comment("Press Up key to move focus to last secondary command: Favorite.");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();

                Button favoriteToggleButton1 = FindElement.ById<Button>("FavoriteToggleButton1");
                var favoriteToggleButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(favoriteToggleButtonElement.Current.AutomationId, favoriteToggleButton1.AutomationId);

                Log.Comment("Press Up key to move focus to first secondary command: Undo.");
                for (int i = 0; i <= 2; i++)
                {
                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                }

                Button undoButton1 = FindElement.ById<Button>("UndoButton1");
                var undoButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton1.AutomationId);

                Log.Comment("Press Up key to move focus to MoreButton.");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();

                moreButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);

                Log.Comment("Press Down key to move focus to first primary command through all secondary commands: Cut.");
                for (int i = 0; i <= 4; i++)
                {
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                }

                cutButtonElement = AutomationElement.FocusedElement;
                Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
            }
        }

void VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommandsWithAlwaysExpanded ( ) [inline]

Definition at line 710 of file CommandBarFlyoutTests.cs.

        {
            using (var setup = new CommandBarFlyoutTestSetupHelper())
            {
                Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");

                Log.Comment("Tap on a button to show the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);

                Log.Comment("Press Down key to move focus to last primary command: Underline.");
                for (int i = 0; i < 5; i++)
                {
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                }

                Button underlineButton9 = FindElement.ById<Button>("UnderlineButton9");
                Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, underlineButton9.AutomationId);

                Button undoButton9 = FindElement.ById<Button>("UndoButton9");

                if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone3))
                {
                    Log.Comment("Press Down key to move focus to first secondary command: Undo.");
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();

                    Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, undoButton9.AutomationId);

                    Log.Comment("Press Up key to move focus to first primary command: Cut.");
                    for (int i = 0; i < 6; i++)
                    {
                        KeyboardHelper.PressKey(Key.Up);
                        Wait.ForIdle();
                    }
                }
                else
                {
                    Log.Comment("Press Up key to move focus to first primary command: Cut.");
                    for (int i = 0; i < 5; i++)
                    {
                        KeyboardHelper.PressKey(Key.Up);
                        Wait.ForIdle();
                    }
                }

                Button cutButton9 = FindElement.ById<Button>("CutButton9");
                Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, cutButton9.AutomationId);

                Log.Comment("Press Up key to move focus to last secondary command: Favorite.");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();

                Button favoriteToggleButton9 = FindElement.ById<Button>("FavoriteToggleButton9");
                Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, favoriteToggleButton9.AutomationId);

                Log.Comment("Press Up key to move focus to first secondary command: Undo.");
                for (int i = 0; i < 3; i++)
                {
                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                }

                Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, undoButton9.AutomationId);

                Log.Comment("Press Up key to move focus to last primary command: Underline.");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();

                Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, underlineButton9.AutomationId);

                Log.Comment("Press Down key to move focus to first primary command through all secondary commands: Cut.");
                for (int i = 0; i < 5; i++)
                {
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                }

                Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, cutButton9.AutomationId);

                Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
                InputHelper.Tap(showCommandBarFlyoutButton);
            }
        }

Member Data Documentation

const int UIA_FlowsFromPropertyId = 30148 [private]

Definition at line 28 of file CommandBarFlyoutTests.cs.

const int UIA_FlowsToPropertyId = 30106 [private]

Definition at line 29 of file CommandBarFlyoutTests.cs.

const int UIA_PositionInSetPropertyId = 30152 [private]

Definition at line 30 of file CommandBarFlyoutTests.cs.

const int UIA_SizeOfSetPropertyId = 30153 [private]

Definition at line 31 of file CommandBarFlyoutTests.cs.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/InteractionTests/CommandBarFlyoutTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • CommandBarFlyoutTests
  • CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
Public Member Functions | Properties | Private Member Functions | Private Attributes

CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper Class Reference

List of all members.

Public Member Functions

CommandBarFlyoutTestSetupHelper (string languageOverride="")
void | ExecuteAndWaitForEvent (Action action, string eventText)
void | ExecuteAndWaitForEvents (Action action, IList< string > eventTexts)

Properties

new | TestSetupHelperOptions

Private Member Functions

[instance initializer]

Private Attributes

Edit | statusReportingTextBox

Detailed Description

Definition at line 48 of file CommandBarFlyoutTests.cs.

Constructor & Destructor Documentation

CommandBarFlyoutTestSetupHelper ( string languageOverride = "" ) [inline]

Definition at line 50 of file CommandBarFlyoutTests.cs.

                : base(new[] { "CommandBarFlyout Tests", "Base CommandBarFlyout Tests" }, new TestSetupHelperOptions{ LanguageOverride = languageOverride})

Member Function Documentation

[instance initializer] ( ) [inline, private]
void ExecuteAndWaitForEvent | ( | Action | action,
 |  | string | eventText |
 | ) |  |  | [inline]

Definition at line 56 of file CommandBarFlyoutTests.cs.

            {
                ExecuteAndWaitForEvents(action, new List<string>() { eventText });
            }

void ExecuteAndWaitForEvents | ( | Action | action,
 |  | IList< string > | eventTexts |
 | ) |  |  | [inline]

Definition at line 61 of file CommandBarFlyoutTests.cs.

            {
                IList<ValueChangedEventWaiter> waiters = new List<ValueChangedEventWaiter>();

                foreach (string eventText in eventTexts)
                {
                    waiters.Add(new ValueChangedEventWaiter(statusReportingTextBox, eventText));
                }

                action.Invoke();

                for (int i = 0; i < waiters.Count; i++)
                {
                    Log.Comment(string.Format("Waiting for the event \"{0}\"...", eventTexts[i]));
                    waiters[i].Wait();
                    Log.Comment("Event occurred.");

                    waiters[i].Dispose();
                }
            }

Member Data Documentation

Edit statusReportingTextBox [private]

Definition at line 82 of file CommandBarFlyoutTests.cs.

Property Documentation

new TestSetupHelperOptions [private]

Definition at line 51 of file CommandBarFlyoutTests.cs.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/InteractionTests/CommandBarFlyoutTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStylesTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • CommonStylesTests
Public Member Functions | Static Public Member Functions | Private Member Functions

CommonStylesTests Class Reference

List of all members.

Public Member Functions

void | AppBarButtonDensityTest ()
void | AppBarToggleButtonDensityTest ()
void | AutoSuggestBoxDensityTest ()
void | ComboBoxDensityTest ()
void | CornerRadiusTest ()
void | DatePickerDensityTest ()
void | HyperlinkIsOffscreenTest ()
void | InkToolbarTest ()
void | ListViewBaseItemPageNavigationTest ()
void | ListViewItemDensityTest ()
void | MenuFlyoutItemSizeTest ()
void | PasswordBoxDensityTest ()
void | RichEditBoxDensityTest ()
void | RunCompactTests ()
void | ScrollGroupedGridViewWithMandatorySnapPointsTest ()
void | SliderDensityTest ()
void | TestCleanup ()
void | TextBoxDensityTest ()
void | TimePickerDensityTest ()
void | ToggleSwitchDensityTest ()
void | TopBottomAppBarTest ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | RunDensityTests (string buttonName)
bool | TryWaitForEditValues (string editName, string editValue)

Detailed Description

Definition at line 22 of file CommonStylesTests.cs.

Member Function Documentation

void AppBarButtonDensityTest ( ) [inline]

Definition at line 106 of file CommonStylesTests.cs.

        {
            RunDensityTests("AppBarButtonDensityTest");
        }

void AppBarToggleButtonDensityTest ( ) [inline]

Definition at line 100 of file CommonStylesTests.cs.

        {
            RunDensityTests("AppBarToggleButtonDensityTest");
        }

void AutoSuggestBoxDensityTest ( ) [inline]

Definition at line 64 of file CommonStylesTests.cs.

        {
            RunDensityTests("AutoSuggestBoxDensityTest");
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 28 of file CommonStylesTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ComboBoxDensityTest ( ) [inline]

Definition at line 88 of file CommonStylesTests.cs.

        {
            RunDensityTests("ComboBoxDensityTest");
        }

void CornerRadiusTest ( ) [inline]

Definition at line 142 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper("CornerRadius Tests"))
            {
                var textBlock = FindElement.ByName("CornerRadius");
                Verify.IsNotNull(textBlock, "Verify corner radius page doesn't crash");
            }
        }

void DatePickerDensityTest ( ) [inline]

Definition at line 52 of file CommonStylesTests.cs.

        {
            RunDensityTests("DatePickerDensityTest");
        }

void HyperlinkIsOffscreenTest ( ) [inline]

Definition at line 252 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper("TextControls Tests"))
            {
                var hyperlink = FindElement.ByName("hyperlinkText");
                Verify.IsNotNull(hyperlink);
                var hyperlinkStartingBounds = hyperlink.BoundingRectangle;
                Verify.IsTrue(hyperlinkStartingBounds.X > 0 && hyperlinkStartingBounds.Y > 0,
                        string.Format("Hyperlink corner is at ({0}, {1})", hyperlinkStartingBounds.X, hyperlinkStartingBounds.Y));

                Verify.IsTrue(hyperlink.IsOffscreen == false, "IsOffscreen == false");

                var resizeButton = new Button(FindElement.ByName("resizeWindowButton"));
                resizeButton.Invoke();
                Wait.ForIdle();

                var hyperlinkEndingBounds = hyperlink.BoundingRectangle;
                Verify.IsTrue(hyperlinkEndingBounds.X <= 0 && hyperlinkEndingBounds.Y <= 0,
                        string.Format("Hyperlink corner is at ({0}, {1})", hyperlinkEndingBounds.X, hyperlinkEndingBounds.Y));

                Verify.IsTrue(hyperlink.IsOffscreen == true, "IsOffscreen == true");

                resizeButton.Invoke();
                Wait.ForIdle();
            }
        }

void InkToolbarTest ( ) [inline]

Definition at line 153 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper("InkToolbar Tests"))
            {
                var textBlock = FindElement.ByName("InkToolbar");
                Verify.IsNotNull(textBlock, "Verify InkToolbar page doesn't crash");

                var verticalInkToolbar = FindElement.ById("VerticalInkToolbar");
                Verify.IsNotNull(textBlock, "Verify verticalInkToolbar doesn't crash");

                Log.Comment("Click on " + "InkToolbarBallpointPenButton");
                var radioButton = new RadioButton(FindElement.ById("InkToolbarBallpointPenButton"));
                radioButton.Select();
                Wait.ForIdle();
            }
        }

void ListViewBaseItemPageNavigationTest ( ) [inline]

Definition at line 348 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper("CommonStyles Tests"))
            {
                Log.Comment("Click on NavigateToNewPageButton");
                var button = new Button(FindElement.ByName("NavigateToNewPageButton"));

                InputHelper.ScrollToElement(button);
                Wait.ForIdle();

                // LeftClick is required in order for PointerCapture to happen
                InputHelper.LeftClick(button);
                Wait.ForIdle();

                Log.Comment("Verify successful page navigation");
                var buttonNavigateToGridView = FindElement.ById("navigateToGridView");
                Verify.IsNotNull(buttonNavigateToGridView, "GridViewPage is expected to be loaded.");
            }
        }

void ListViewItemDensityTest ( ) [inline]

Definition at line 70 of file CommonStylesTests.cs.

        {
            RunDensityTests("ListViewItemDensityTest");
        }

void MenuFlyoutItemSizeTest ( ) [inline]

Definition at line 171 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper("MenuFlyout Tests"))
            {
                Log.Comment("Mouse click on Button to verify MenuFlyoutItem size.");

                var testMenuFlyoutButton = FindElement.ByName("TestMenuFlyoutButton");
                Verify.IsNotNull(testMenuFlyoutButton, "Verifying that we found a UIElement called TestMenuFlyoutButton");

                InputHelper.LeftClick(testMenuFlyoutButton);
                Wait.ForIdle();

                var testMenuFlyoutItem = FindElement.ByName("TestMenuFlyoutItem");
                Verify.IsNotNull(testMenuFlyoutItem, "Verifying that we found a UIElement called TestMenuFlyoutItem");

                InputHelper.LeftClick(testMenuFlyoutItem);
                Wait.ForIdle();

                var testMenuFlyoutItemHeightTextBlock = FindElement.ByName<TextBlock>("TestMenuFlyoutItemHeightTextBlock");
                var testMenuFlyoutItemWidthTextBlock = FindElement.ByName<TextBlock>("TestMenuFlyoutItemWidthTextBlock");

                Verify.IsNotNull(testMenuFlyoutItemHeightTextBlock, "Verifying that we found a UIElement called TestMenuFlyoutItemHeightTextBlock");
                Verify.IsNotNull(testMenuFlyoutItemWidthTextBlock, "Verifying that we found a UIElement called TestMenuFlyoutItemWidthTextBlock");

                var width = Convert.ToDouble(testMenuFlyoutItemWidthTextBlock.GetText());

                Verify.AreEqual("30", testMenuFlyoutItemHeightTextBlock.GetText(), "Comparing height of MenuFlyoutItem after Flyout was opened with mouse");
                Verify.IsGreaterThan(width, 0.0, "Comparing height of MenuFlyoutItem after Flyout was opened with mouse");
                Verify.IsLessThan(width, 200.0, "Comparing height of MenuFlyoutItem after Flyout was opened with mouse");

                InputHelper.LeftClick(testMenuFlyoutItemHeightTextBlock);
                Wait.ForIdle();
                InputHelper.Tap(testMenuFlyoutButton);
                Wait.ForIdle();
                InputHelper.Tap(testMenuFlyoutItem);
                Wait.ForIdle();

                width = Convert.ToDouble(testMenuFlyoutItemWidthTextBlock.GetText());
                Verify.AreEqual("38", testMenuFlyoutItemHeightTextBlock.GetText(), "Comparing height of MenuFlyoutItem after Flyout was opened with touch");
                Verify.IsGreaterThan(width, 200.0, "Comparing width of MenuFlyoutItem after Flyout was opened with touch");
            }
        }

void PasswordBoxDensityTest ( ) [inline]

Definition at line 82 of file CommonStylesTests.cs.

        {
            RunDensityTests("PasswordBoxDensityTest");
        }

void RichEditBoxDensityTest ( ) [inline]

Definition at line 94 of file CommonStylesTests.cs.

        {
            RunDensityTests("RichEditBoxDensityTest");
        }

void RunCompactTests ( ) [inline]

Definition at line 126 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper("Compact Tests"))
            {
                Log.Comment("Click on RunTest");
                var button = new Button(FindElement.ByName("RunTest"));
                button.Invoke();
                Wait.ForIdle();

                var testResult = new TextBlock(FindElement.ById("CompactTestResult")).GetText();
                Verify.AreEqual(testResult, "Pass", "We expect compact test result is Pass"); // "Pass" string matches value used by MUXControlsTestApp.SimpleVerify
            }
        }

void RunDensityTests ( string buttonName ) [inline, private]

Definition at line 111 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper("CommonStyles Tests"))
            {
                Log.Comment("Click on " + buttonName);
                var button = new Button(FindElement.ByName(buttonName));
                button.Invoke();
                Wait.ForIdle();

                var densityTestResult = new TextBlock(FindElement.ByName("DensityTestResult")).GetText();
                Verify.AreEqual(densityTestResult, "Pass", "We expect density test result is Pass");
            }
        }

void ScrollGroupedGridViewWithMandatorySnapPointsTest ( ) [inline]

Definition at line 281 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "GridView Tests", "navigateToGroupedGridView" }))
            {
                Log.Comment("Retrieving cmbScrollViewerVerticalSnapPointsType");
                UIObject scrollViewerVerticalSnapPointsType = FindElement.ById("cmbScrollViewerVerticalSnapPointsType");
                Verify.IsNotNull(scrollViewerVerticalSnapPointsType, "Verifying that cmbScrollViewerVerticalSnapPointsType was found");
                ComboBox cmbScrollViewerVerticalSnapPointsType = new ComboBox(scrollViewerVerticalSnapPointsType);

                Log.Comment("Changing cmbScrollViewerVerticalSnapPointsType selection to 'Mandatory'");
                cmbScrollViewerVerticalSnapPointsType.SelectItemByName("Mandatory");
                Log.Comment("Selection is now {0}", cmbScrollViewerVerticalSnapPointsType.Selection[0].Name);

                Log.Comment("Retrieving cmbItemsPanelGroupHeaderPlacement");
                UIObject itemsPanelGroupHeaderPlacement = FindElement.ById("cmbItemsPanelGroupHeaderPlacement");
                Verify.IsNotNull(itemsPanelGroupHeaderPlacement, "Verifying that cmbItemsPanelGroupHeaderPlacement was found");
                ComboBox cmbItemsPanelGroupHeaderPlacement = new ComboBox(itemsPanelGroupHeaderPlacement);

                Log.Comment("Changing cmbItemsPanelGroupHeaderPlacement selection to 'Left'");
                cmbItemsPanelGroupHeaderPlacement.SelectItemByName("Left");
                Log.Comment("Selection is now {0}", cmbItemsPanelGroupHeaderPlacement.Selection[0].Name);

                Log.Comment("Retrieving btnSetItemsPanelGroupHeaderPlacement");
                UIObject setItemsPanelGroupHeaderPlacement = FindElement.ById("btnSetItemsPanelGroupHeaderPlacement");
                Verify.IsNotNull(setItemsPanelGroupHeaderPlacement, "Verifying that btnSetItemsPanelGroupHeaderPlacement was found");
                Button btnSetItemsPanelGroupHeaderPlacement = new Button(setItemsPanelGroupHeaderPlacement);

                Log.Comment("Invoking btnSetItemsPanelGroupHeaderPlacement");
                btnSetItemsPanelGroupHeaderPlacement.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving btnGetItemsWrapGridItemHeight");
                UIObject getItemsWrapGridItemHeight = FindElement.ById("btnGetItemsWrapGridItemHeight");
                Verify.IsNotNull(getItemsWrapGridItemHeight, "Verifying that btnGetItemsWrapGridItemHeight was found");
                Button btnGetItemsWrapGridItemHeight = new Button(getItemsWrapGridItemHeight);

                Log.Comment("Invoking btnGetItemsWrapGridItemHeight");
                btnGetItemsWrapGridItemHeight.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving txtItemsWrapGridItemHeight");
                UIObject itemsWrapGridItemHeight = FindElement.ById("txtItemsWrapGridItemHeight");
                Verify.IsNotNull(itemsWrapGridItemHeight);
                Edit txtItemsWrapGridItemHeight = new Edit(itemsWrapGridItemHeight);

                Log.Comment("txtItemsWrapGridItemHeight.Value: " + txtItemsWrapGridItemHeight.Value);
                Verify.AreEqual("150", txtItemsWrapGridItemHeight.Value);

                Log.Comment("Retrieving gridView");
                UIObject gridViewUIObject = FindElement.ById("gridView");
                Verify.IsNotNull(gridViewUIObject, "Verifying that gridView was found");
                Wait.ForIdle();

                Log.Comment("Scrolling gridView with mouse wheel");
                InputHelper.RotateWheel(gridViewUIObject, -120);
                Wait.ForIdle();

                Log.Comment("Verifying gridView scrolled to mandatory snap point, i.e. a small multiple of 150");
                bool scrolledToMandatorySnapPoint =
                    TryWaitForEditValues(editName: "txtScrollViewerVerticalOffset", editValue: "150") ||
                    TryWaitForEditValues(editName: "txtScrollViewerVerticalOffset", editValue: "300");
                Log.Comment("scrolledToMandatorySnapPoint:" + scrolledToMandatorySnapPoint);
                Verify.IsTrue(scrolledToMandatorySnapPoint);
            }
        }

void SliderDensityTest ( ) [inline]

Definition at line 40 of file CommonStylesTests.cs.

        {
            RunDensityTests("SliderDensityTest");
        }

void TestCleanup ( ) [inline]

Definition at line 34 of file CommonStylesTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void TextBoxDensityTest ( ) [inline]

Definition at line 76 of file CommonStylesTests.cs.

        {
            RunDensityTests("TextBoxDensityTest");
        }

void TimePickerDensityTest ( ) [inline]

Definition at line 58 of file CommonStylesTests.cs.

        {
            RunDensityTests("TimePickerDensityTest");
        }

void ToggleSwitchDensityTest ( ) [inline]

Definition at line 46 of file CommonStylesTests.cs.

        {
            RunDensityTests("ToggleSwitchDensityTest");
        }

void TopBottomAppBarTest ( ) [inline]

Definition at line 215 of file CommonStylesTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "CommandBar Tests", "navigateToCommandBar" }))
            {
                var topAppBar = FindElement.ByName("TopCmdBar");
                Verify.IsNotNull(topAppBar);
                var topBounds = topAppBar.BoundingRectangle;
                Verify.IsTrue(topBounds.Width > 0 && topBounds.Height > 0,
                        string.Format("Top CommandBar bounds are ({0}, {1})", topBounds.Width, topBounds.Height));

                var bottomAppBar = FindElement.ByName("BottomCmdBar");
                Verify.IsNotNull(bottomAppBar);
                var bottomBounds = bottomAppBar.BoundingRectangle;
                Verify.IsTrue(bottomBounds.Width > 0 && bottomBounds.Height > 0,
                        string.Format("Bottom CommandBar bounds are ({0}, {1})", bottomBounds.Width, bottomBounds.Height));

                Log.Comment("Find Restore/Maximize button");
                ElementCache.Clear();
                var maxRestoreButton = new Button(FindElement.ByNameOrId("Restore"));

                maxRestoreButton.Invoke();
                Wait.ForMilliseconds(1000);

                var newTopBounds = topAppBar.BoundingRectangle;
                Verify.IsTrue(newTopBounds.Width != topBounds.Width,
                        string.Format("New top CommandBar bounds are ({0}, {1})", newTopBounds.Width, newTopBounds.Height));

                var newBottomBounds = topAppBar.BoundingRectangle;
                Verify.IsTrue(newBottomBounds.Width != bottomBounds.Width,
                        string.Format("New bottom CommandBar bounds are ({0}, {1})", newBottomBounds.Width, newBottomBounds.Height));

                maxRestoreButton.Invoke();
                Wait.ForMilliseconds(1000);
            }
        }

bool TryWaitForEditValues | ( | string | editName,
 |  | string | editValue |
 | ) |  |  | [inline, private]

Definition at line 369 of file CommonStylesTests.cs.

        {
            UIObject editUIObject = FindElement.ById(editName);
            Verify.IsNotNull(editUIObject);
            Edit edit = new Edit(editUIObject);

            Log.Comment("Current value for " + editName + ": " + edit.Value);
            if (edit.Value != editValue)
            {
                using (var waiter = new ValueChangedEventWaiter(edit, editValue))
                {
                    Log.Comment("Waiting for " + editName + " to be set to " + editValue);

                    bool success = waiter.TryWait(TimeSpan.FromSeconds(2.0));
                    Log.Comment("Current value for " + editName + ": " + edit.Value + ", (success:" + success + ")");
                    return success;
                }
            }
            return true;
        }

The documentation for this class was generated from the following file:
  • CommonStyles/InteractionTests/CommonStylesTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • DropDownButton
Classes | Public Member Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes

DropDownButton Class Reference

List of all members.

Classes

class | DropDownButtonFactory

Public Member Functions

DropDownButton (UIObject uiObject)
void | Collapse ()
void | CollapseAndWait ()
void | Expand ()
void | ExpandAndWait ()
UIEventWaiter | GetCollapsedWaiter ()
UIEventWaiter | GetExpandedWaiter ()

Properties

ExpandCollapseState | ExpandCollapseState [get]
new static IFactory
< DropDownButton > 		Factory [get]

Private Member Functions

void | Initialize ()

Private Attributes

IExpandCollapse | _expandCollapsePattern

Static Private Attributes

static IFactory< DropDownButton > | _factory = null

Detailed Description

Definition at line 22 of file DropDownButtonTests.cs.

Constructor & Destructor Documentation

DropDownButton ( UIObject uiObject ) [inline]

Definition at line 24 of file DropDownButtonTests.cs.

            : base(uiObject)
        {
            this.Initialize();
        }

Member Function Documentation

void Collapse ( ) [inline]

Definition at line 62 of file DropDownButtonTests.cs.

        {
            _expandCollapsePattern.Collapse();
        }

void CollapseAndWait ( ) [inline]

Definition at line 46 of file DropDownButtonTests.cs.

        {
            using (var waiter = GetCollapsedWaiter())
            {
                Collapse();
                waiter.Wait();
            }

            Wait.ForIdle();
        }

void Expand ( ) [inline]

Definition at line 57 of file DropDownButtonTests.cs.

        {
            _expandCollapsePattern.Expand();
        }

void ExpandAndWait ( ) [inline]

Definition at line 35 of file DropDownButtonTests.cs.

        {
            using (var waiter = GetExpandedWaiter())
            {
                Expand();
                waiter.Wait();
            }

            Wait.ForIdle();
        }

UIEventWaiter GetCollapsedWaiter ( ) [inline]

Definition at line 72 of file DropDownButtonTests.cs.

        {
            return _expandCollapsePattern.GetCollapsedWaiter();
        }

UIEventWaiter GetExpandedWaiter ( ) [inline]

Definition at line 67 of file DropDownButtonTests.cs.

        {
            return _expandCollapsePattern.GetExpandedWaiter();
        }

void Initialize ( ) [inline, private]

Definition at line 30 of file DropDownButtonTests.cs.

        {
            _expandCollapsePattern = new ExpandCollapseImplementation(this);
        }

Member Data Documentation

IExpandCollapse _expandCollapsePattern [private]

Definition at line 94 of file DropDownButtonTests.cs.

IFactory<DropDownButton> _factory = null [static, private]

Definition at line 95 of file DropDownButtonTests.cs.

Property Documentation

ExpandCollapseState ExpandCollapseState [get]

Definition at line 78 of file DropDownButtonTests.cs.

new static IFactory<DropDownButton> Factory [static, get]

Definition at line 83 of file DropDownButtonTests.cs.

The documentation for this class was generated from the following file:
  • DropDownButton/InteractionTests/DropDownButtonTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton::DropDownButtonFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • DropDownButton
  • DropDownButton::DropDownButtonFactory
Public Member Functions

DropDownButton::DropDownButtonFactory Class Reference

List of all members.

Public Member Functions

DropDownButton Create (UIObject element)

Detailed Description

Definition at line 97 of file DropDownButtonTests.cs.

Member Function Documentation

DropDownButton Create ( UIObject element ) [inline]

Definition at line 99 of file DropDownButtonTests.cs.

            {
                return new DropDownButton(element);
            }

The documentation for this class was generated from the following file:
  • DropDownButton/InteractionTests/DropDownButtonTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButtonTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • DropDownButtonTests
Public Member Functions | Static Public Member Functions

DropDownButtonTests Class Reference

List of all members.

Public Member Functions

void | AccessibilityTest ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 107 of file DropDownButtonTests.cs.

Member Function Documentation

void AccessibilityTest ( ) [inline]

Definition at line 124 of file DropDownButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("DropDownButton Tests"))
            {
                DropDownButton dropDownButton = FindElement.ByName<DropDownButton>("TestDropDownButton");

                TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
                TextBlock flyoutClosedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutClosedCountTextBlock");

                Log.Comment("Verify that DropDownButton implements IExpandCollapseProvider");
                Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
                Log.Comment("IExpandCollapseProvider.Expand");
                dropDownButton.ExpandAndWait();
                Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
                VerifyElement.Found("TestFlyout", FindBy.Name);
                Verify.AreEqual(dropDownButton.ExpandCollapseState, ExpandCollapseState.Expanded);

                Verify.AreEqual("0", flyoutClosedCountTextBlock.DocumentText);
                Log.Comment("IExpandCollapseProvider.Collapse");
                dropDownButton.CollapseAndWait();
                Wait.ForIdle();
                Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);
                Verify.AreEqual(dropDownButton.ExpandCollapseState, ExpandCollapseState.Collapsed);

                Log.Comment("Change to a different flyout");
                CheckBox setFlyoutCheckBox = FindElement.ByName<CheckBox>("SetFlyoutCheckbox");
                setFlyoutCheckBox.Check();
                Wait.ForIdle();

                Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
                Log.Comment("IExpandCollapseProvider.Expand");
                dropDownButton.ExpandAndWait();
                Wait.ForIdle();
                Verify.AreEqual("2", flyoutOpenedCountTextBlock.DocumentText);
                Verify.AreEqual(dropDownButton.ExpandCollapseState, ExpandCollapseState.Expanded);

                Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);
                Log.Comment("IExpandCollapseProvider.Collapse");
                dropDownButton.CollapseAndWait();
                Wait.ForIdle();
                Verify.AreEqual("2", flyoutClosedCountTextBlock.DocumentText);
                Verify.AreEqual(dropDownButton.ExpandCollapseState, ExpandCollapseState.Collapsed);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 113 of file DropDownButtonTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void TestCleanup ( ) [inline]

Definition at line 118 of file DropDownButtonTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

The documentation for this class was generated from the following file:
  • DropDownButton/InteractionTests/DropDownButtonTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • Expander
Classes | Public Member Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes

Expander Class Reference

List of all members.

Classes

class | ExpanderFactory

Public Member Functions

Expander (UIObject uiObject)
void | Collapse ()
void | CollapseAndWait ()
void | Expand ()
void | ExpandAndWait ()
UIEventWaiter | GetCollapsedWaiter ()
UIEventWaiter | GetExpandedWaiter ()

Properties

ExpandCollapseState | ExpandCollapseState [get]
new static IFactory< Expander > | Factory [get]

Private Member Functions

void | Initialize ()

Private Attributes

IExpandCollapse | _expandCollapsePattern

Static Private Attributes

static IFactory< Expander > | _factory = null

Detailed Description

Definition at line 24 of file ExpanderTests.cs.

Constructor & Destructor Documentation

Expander ( UIObject uiObject ) [inline]

Definition at line 26 of file ExpanderTests.cs.

            : base(uiObject)
        {
            this.Initialize();
        }

Member Function Documentation

void Collapse ( ) [inline]

Definition at line 64 of file ExpanderTests.cs.

        {
            _expandCollapsePattern.Collapse();
        }

void CollapseAndWait ( ) [inline]

Definition at line 48 of file ExpanderTests.cs.

        {
            using (var waiter = GetCollapsedWaiter())
            {
                Collapse();
                waiter.Wait();
            }

            Wait.ForIdle();
        }

void Expand ( ) [inline]

Definition at line 59 of file ExpanderTests.cs.

        {
            _expandCollapsePattern.Expand();
        }

void ExpandAndWait ( ) [inline]

Definition at line 37 of file ExpanderTests.cs.

        {
            using (var waiter = GetExpandedWaiter())
            {
                Expand();
                waiter.Wait();
            }

            Wait.ForIdle();
        }

UIEventWaiter GetCollapsedWaiter ( ) [inline]

Definition at line 74 of file ExpanderTests.cs.

        {
            return _expandCollapsePattern.GetCollapsedWaiter();
        }

UIEventWaiter GetExpandedWaiter ( ) [inline]

Definition at line 69 of file ExpanderTests.cs.

        {
            return _expandCollapsePattern.GetExpandedWaiter();
        }

void Initialize ( ) [inline, private]

Definition at line 32 of file ExpanderTests.cs.

        {
            _expandCollapsePattern = new ExpandCollapseImplementation(this);
        }

Member Data Documentation

IExpandCollapse _expandCollapsePattern [private]

Definition at line 96 of file ExpanderTests.cs.

IFactory<Expander> _factory = null [static, private]

Definition at line 97 of file ExpanderTests.cs.

Property Documentation

ExpandCollapseState ExpandCollapseState [get]

Definition at line 80 of file ExpanderTests.cs.

new static IFactory<Expander> Factory [static, get]

Definition at line 85 of file ExpanderTests.cs.

The documentation for this class was generated from the following file:
  • Expander/InteractionTests/ExpanderTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander::ExpanderFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • Expander
  • Expander::ExpanderFactory
Public Member Functions

Expander::ExpanderFactory Class Reference

List of all members.

Public Member Functions

Expander Create (UIObject element)

Detailed Description

Definition at line 98 of file ExpanderTests.cs.

Member Function Documentation

Expander Create ( UIObject element ) [inline]

Definition at line 100 of file ExpanderTests.cs.

            {
                return new Expander(element);
            }

The documentation for this class was generated from the following file:
  • Expander/InteractionTests/ExpanderTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ExpanderTests
Public Member Functions | Static Public Member Functions

ExpanderTests Class Reference

List of all members.

Public Member Functions

void | AutomationPeerTest ()
void | ExpandCollapseAutomationTests ()
void | TestCleanup ()
void | VerifyAxeScanPasses ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 108 of file ExpanderTests.cs.

Member Function Documentation

void AutomationPeerTest ( ) [inline]

Definition at line 170 of file ExpanderTests.cs.

        {
            using (var setup = new TestSetupHelper("Expander Tests"))
            {
                // An control to take initial focus:
                Button dummyButton = FindElement.ByName<Button>("DummyButton");
                dummyButton.SetFocus();
                Wait.ForIdle();

                Expander expander = FindElement.ByName<Expander>("ExpanderWithToggleSwitch");
                Verify.IsTrue(expander.IsKeyboardFocusable, "Expander should be Keyboard Focusable");
                Verify.IsFalse(expander.HasKeyboardFocus, "Expander should initially be unfocused");

                expander.SetFocus();
                Wait.ForIdle();

                Verify.IsTrue(expander.HasKeyboardFocus, "Expander should be focused");

                // Verify ExpandedExpander header content AutomationProperties.Name properties are set
                VerifyElement.Found("This expander with ToggleSwitch is expanded by default.", FindBy.Name);
                VerifyElement.Found("This is the second line of text.", FindBy.Name);
                VerifyElement.Found("SettingsToggleSwitch", FindBy.Name);

                // Verify ExpandedExpander content AutomationProperties.Name property is set
                VerifyElement.Found("ExpanderWithToggleSwitch Content", FindBy.Name);

                Log.Comment("Collapse using keyboard space key.");
                KeyboardHelper.PressKey(Key.Space);
                Verify.AreEqual(expander.ExpandCollapseState, ExpandCollapseState.Collapsed);

                // Verify ExpandedExpander content AutomationProperties.Name property is not visible once collapsed
                VerifyElement.NotFound("ExpanderWithToggleSwitch Content", FindBy.Name);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 115 of file ExpanderTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ExpandCollapseAutomationTests ( ) [inline]

Definition at line 135 of file ExpanderTests.cs.

        {
            using (var setup = new TestSetupHelper("Expander Tests"))
            {
                Expander expander = FindElement.ByName<Expander>("ExpandedExpander");
                expander.SetFocus();
                Wait.ForIdle();

                Log.Comment("Collapse using keyboard space key.");
                KeyboardHelper.PressKey(Key.Space);
                Verify.AreEqual(expander.ExpandCollapseState, ExpandCollapseState.Collapsed);

                Log.Comment("Expand using keyboard space key.");
                KeyboardHelper.PressKey(Key.Space);
                Verify.AreEqual(expander.ExpandCollapseState, ExpandCollapseState.Expanded);

                Log.Comment("Collapse by clicking.");
                expander.Click();
                Verify.AreEqual(expander.ExpandCollapseState, ExpandCollapseState.Collapsed);

                Log.Comment("Expand by clicking.");
                expander.Click();
                Verify.AreEqual(expander.ExpandCollapseState, ExpandCollapseState.Expanded);

                Log.Comment("Collapse using UIA ExpandCollapse pattern");
                expander.CollapseAndWait();
                Verify.AreEqual(expander.ExpandCollapseState, ExpandCollapseState.Collapsed);

                Log.Comment("Expand using UIA ExpandCollapse pattern");
                expander.ExpandAndWait();
                Verify.AreEqual(expander.ExpandCollapseState, ExpandCollapseState.Expanded);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 120 of file ExpanderTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 126 of file ExpanderTests.cs.

        {
            using (var setup = new TestSetupHelper("Expander-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

The documentation for this class was generated from the following file:
  • Expander/InteractionTests/ExpanderTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIconTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ImageIconTests
Public Member Functions | Static Public Member Functions

ImageIconTests Class Reference

List of all members.

Public Member Functions

void | BasicTest ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 23 of file ImageIconTests.cs.

Member Function Documentation

void BasicTest ( ) [inline]

Definition at line 41 of file ImageIconTests.cs.

        {
            Log.Comment("ImageIcon Basic Test");
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file ImageIconTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file ImageIconTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

The documentation for this class was generated from the following file:
  • ImageIcon/InteractionTests/ImageIconTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • InfoBarTests
Public Member Functions | Static Public Member Functions | Private Member Functions

InfoBarTests Class Reference

List of all members.

Public Member Functions

void | AccessibilityViewTest ()
void | CloseTest ()
void | IsClosableTest ()
void | LayoutTest ()
void | TestCleanup ()
void | VerifyAxeScanPasses ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | Check (string checkboxName)
Button | FindCloseButton (UIObject parent)
void | Uncheck (string checkboxName)
void | VerifyIsPrettyClose (int a, int b, string message)

Detailed Description

Definition at line 24 of file InfoBarTests.cs.

Member Function Documentation

void AccessibilityViewTest ( ) [inline]

Definition at line 121 of file InfoBarTests.cs.

        {
            using (var setup = new TestSetupHelper("InfoBar Tests"))
            {
                StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
                Verify.IsNotNull(infoBar, "TestInfoBar should be visible by default");

                Log.Comment("Close InfoBar and make sure it can't be found.");
                Uncheck("IsOpenCheckBox");
                ElementCache.Clear();

                infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
                Verify.IsNull(infoBar, "TestInfoBar should not be in the accessible tree");

                infoBar = FindElement.ByName<StatusBar>("DefaultInfoBar");
                Verify.IsNull(infoBar, "By default, Infobar should not be visible");
            }
        }

void Check ( string checkboxName ) [inline, private]

Definition at line 198 of file InfoBarTests.cs.

        {
            CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
            checkBox.Check();
            Log.Comment("Checked " + checkboxName + " checkbox");
            Wait.ForIdle();
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 31 of file InfoBarTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void CloseTest ( ) [inline]

Definition at line 73 of file InfoBarTests.cs.

        {
            using (var setup = new TestSetupHelper("InfoBar Tests"))
            {
                StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");

                Log.Comment("Clicking the close button");
                Button closeButton = FindCloseButton(infoBar);
                closeButton.InvokeAndWait();

                ListBox events = FindElement.ByName<ListBox>("EventListBox");
                Verify.AreEqual(3, events.Items.Count);
                Verify.AreEqual("CloseButtonClick", events.Items[0].Name, "First event should be the CloseButtonClick event");
                Verify.AreEqual("Closing: CloseButton", events.Items[1].Name, "Second event should be the Closing event, reason=CloseButton");
                Verify.AreEqual("Closed: CloseButton", events.Items[2].Name, "Third event should be the Closed event, reason=CloseButton");

                CheckBox isOpenCheckBox = FindElement.ByName<CheckBox>("IsOpenCheckBox");
                Verify.AreEqual(ToggleState.Off, isOpenCheckBox.ToggleState);

                // reopen
                isOpenCheckBox.Check();
                Check("CancelCheckBox");
                Button listBoxClearButton = FindElement.ByName<Button>("ClearButton");
                listBoxClearButton.InvokeAndWait();

                Log.Comment("Clicking the close button but cancel the closing event");
                closeButton.InvokeAndWait();

                Verify.AreEqual(2, events.Items.Count);
                Verify.AreEqual("CloseButtonClick", events.Items[0].Name, "First event should be the CloseButtonClick event");
                Verify.AreEqual("Closing: CloseButton", events.Items[1].Name, "Second event should be the Closing event, reason=CloseButton");
                Verify.AreEqual(ToggleState.On, isOpenCheckBox.ToggleState);

                Uncheck("CancelCheckBox");

                Log.Comment("Close programmatically");
                listBoxClearButton.InvokeAndWait();
                isOpenCheckBox.Uncheck();
                Wait.ForIdle();

                Verify.AreEqual(2, events.Items.Count);
                Verify.AreEqual("Closing: Programmatic", events.Items[0].Name, "Second event should be the Closing event, reason=Programmatic");
                Verify.AreEqual("Closed: Programmatic", events.Items[1].Name, "Third event should be the Closed event, reason=Programmatic");
                Verify.AreEqual(ToggleState.Off, isOpenCheckBox.ToggleState);
            }
        }

Button FindCloseButton ( UIObject parent ) [inline, private]

Definition at line 185 of file InfoBarTests.cs.

        {
            foreach (UIObject elem in parent.Children)
            {
                if (elem.Name.Equals("Close"))
                {
                    return new Button(elem);
                }
            }
            Log.Comment("Did not find Close button for object " + parent.Name);
            return null;
        }

void IsClosableTest ( ) [inline]

Definition at line 51 of file InfoBarTests.cs.

        {
            using (var setup = new TestSetupHelper("InfoBar Tests"))
            {
                StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");

                Button closeButton = FindCloseButton(infoBar);
                Verify.IsNotNull(closeButton, "Close button should be visible by default");

                Uncheck("IsClosableCheckBox");
                ElementCache.Clear();
                closeButton = FindCloseButton(infoBar);
                Verify.IsNull(closeButton, "Close button should not be visible when IsClosable=false");

                Check("IsClosableCheckBox");
                ElementCache.Clear();
                closeButton = FindCloseButton(infoBar);
                Verify.IsNotNull(closeButton, "Close button should be visible when IsClosable=true");
            }
        }

void LayoutTest ( ) [inline]

Definition at line 141 of file InfoBarTests.cs.

        {
            using (var setup = new TestSetupHelper("InfoBar Tests"))
            {
                ComboBox actionComboBox = FindElement.ByName<ComboBox>("ActionButtonComboBox");
                actionComboBox.SelectItemByName("Button");
                Check("HasCustomContentCheckBox");
                ElementCache.Clear();

                StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
                CheckBox customContent = FindElement.ByName<CheckBox>("CustomContentCheckBox");

                // 0: icon; 1: title; 2: message; 3: action button
                Log.Comment("Verify that title, message, and action button layout is left-to-right");
                Verify.IsGreaterThan(infoBar.Children[2].BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect Message to be on the right of Title");
                Verify.IsGreaterThan(infoBar.Children[3].BoundingRectangle.X, infoBar.Children[2].BoundingRectangle.X, "Expect action button to be on the right of Message");
                VerifyIsPrettyClose(infoBar.Children[2].BoundingRectangle.Y, infoBar.Children[1].BoundingRectangle.Y, "Expect Message to be top-aligned with Title");

                Verify.IsGreaterThan(customContent.BoundingRectangle.Y, infoBar.Children[1].BoundingRectangle.Y, "Expect custom content to be on under all other things");
                VerifyIsPrettyClose(customContent.BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect custom content to be left-aligned with title");

                Log.Comment("Change title and message to long strings");
                Edit editTitle = FindElement.ByName<Edit>("TitleTextBox");
                Edit editMessage = FindElement.ByName<Edit>("MessageTextBox");
                editTitle.SetValueAndWait("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vel orci eros. Sed ut lectus ultrices quam hendrerit sagittis. Cras gravida eleifend eros, eu pulvinar lectus molestie dictum. Vivamus et tellus euismod, dapibus odio vel, volutpat risus.");
                editMessage.SetValueAndWait("Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent vehicula mauris eu libero pretium ullamcorper.");

                Log.Comment("Verify that title, message, and action button layout is top-to-bottom");
                Verify.IsGreaterThan(infoBar.Children[2].BoundingRectangle.Y, infoBar.Children[1].BoundingRectangle.Y, "Expect Message to be below Title");
                Verify.IsGreaterThan(infoBar.Children[3].BoundingRectangle.Y, infoBar.Children[2].BoundingRectangle.Y, "Expect action button to be below Message");
                VerifyIsPrettyClose(infoBar.Children[2].BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect Message to be left-aligned with Title");
                VerifyIsPrettyClose(infoBar.Children[3].BoundingRectangle.X, infoBar.Children[2].BoundingRectangle.X, "Expect action button to be left-aligned Message");

                Verify.IsGreaterThan(customContent.BoundingRectangle.Y, infoBar.Children[3].BoundingRectangle.Y, "Expect custom content to be on under all other things");
                VerifyIsPrettyClose(customContent.BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect custom content to be left-aligned with everyone else");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 36 of file InfoBarTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void Uncheck ( string checkboxName ) [inline, private]

Definition at line 206 of file InfoBarTests.cs.

        {
            CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
            checkBox.Uncheck();
            Log.Comment("Unchecked " + checkboxName + " checkbox");
            Wait.ForIdle();
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 42 of file InfoBarTests.cs.

        {
            using (var setup = new TestSetupHelper("Infobar-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

void VerifyIsPrettyClose | ( | int | a,
 |  | int | b,
 |  | string | message |
 | ) |  |  | [inline, private]

Definition at line 179 of file InfoBarTests.cs.

        {
            // Due to rounding between float and int, just make sure the values are pretty close
            Verify.IsTrue(a <= b + 1 && a >= b - 1, message + ": expected " + a + ", actual " + b);
        }

The documentation for this class was generated from the following file:
  • InfoBar/InteractionTests/InfoBarTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ItemContainerTests
Public Member Functions | Static Public Member Functions | Private Member Functions

ItemContainerTests Class Reference

List of all members.

Public Member Functions

void | ItemContainerCanUserSelect ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

string | IsItemContainerSelected ()

Detailed Description

Definition at line 24 of file ItemContainerTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 31 of file ItemContainerTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

string IsItemContainerSelected ( ) [inline, private]

Definition at line 139 of file ItemContainerTests.cs.

        {
            Log.Comment("Retrieving btnGetIsSelected");
            Button btnGetIsSelected = new Button(FindElement.ById("btnGetIsSelected"));
            Verify.IsNotNull(btnGetIsSelected, "Verifying that btnGetIsSelected was found");

            Log.Comment("Retrieving IsSelectedTextBlock");
            Edit isSelectedTextBlock = new Edit(FindElement.ById("IsSelectedTextBlock"));
            Verify.IsNotNull(isSelectedTextBlock, "Verifying that IsSelectedTextBlock was found");

            btnGetIsSelected.Invoke();
            Wait.ForIdle();

            return isSelectedTextBlock.GetText();
        }

void ItemContainerCanUserSelect ( ) [inline]

Definition at line 117 of file ItemContainerTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ItemContainer Tests", "navigateToSummary" }))
            {
                Log.Comment("Retrieving RoutedEventsItemContainer");
                var routedEventsItemContainer = FindElement.ById("RoutedEventsItemContainer");
                Verify.IsNotNull(routedEventsItemContainer, "Verifying that RoutedEventsItemContainer was found");

                Log.Comment("Retrieving CanUserSelectComboBox");
                ComboBox canUserSelectComboBox = new ComboBox(FindElement.ById("CanUserSelectComboBox"));
                Verify.IsNotNull(canUserSelectComboBox, "Verifying that CanUserSelectComboBox was found");

                Log.Comment("Changing CanUserSelectComboBox selection to 'UserCannotSelect'");
                canUserSelectComboBox.SelectItemByName("UserCannotSelect");
                Log.Comment("Selection is now {0}", canUserSelectComboBox.Selection[0].Name);

                InputHelper.LeftClick(routedEventsItemContainer);

                Verify.AreEqual(IsItemContainerSelected(), "False");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 36 of file ItemContainerTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

The documentation for this class was generated from the following file:
  • ItemContainer/InteractionTests/ItemContainerTests.cs
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewTestsWithInputHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ItemsViewTestsWithInputHelper
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions

ItemsViewTestsWithInputHelper Class Reference

List of all members.

Classes

class | ItemsViewTestSetupHelper
class | LoggingHelper

Public Member Functions

void | BringFocusedItemIntoView ()
void | CanDragItemContainerAfterPan ()
void | ClickedItemBroughtIntoView ()
void | InsertAndRemoveItems ()
void | ItemsViewExtendedSelectionMode ()
void | ItemsViewItemsContainerDragStartingEventRaised ()
void | ItemsViewMultipleSelectionMode ()
void | KeyboardNavigationInItemsViewWithLinedFlowLayout ()
void | KeyboardNavigationInItemsViewWithLinedFlowLayoutAndInnerFocusableControl ()
void | KeyboardNavigationInItemsViewWithStackLayout ()
void | KeyboardNavigationInItemsViewWithUniformGridLayout ()
void | KeyDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes ()
void | KeyDownInItemsViewAndStackLayoutWithFastKeystrokes ()
void | KeyPageDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes ()
void | KeyPageDownInItemsViewAndStackLayoutWithFastKeystrokes ()
void | KeyPageUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes ()
void | KeyPageUpInItemsViewAndStackLayoutWithFastKeystrokes ()
void | KeyUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes ()
void | KeyUpInItemsViewAndStackLayoutWithFastKeystrokes ()
void | PanAnnotatedScrollBarWithItemsInfo ()
void | PanAnnotatedScrollBarWithoutItemsInfo ()
void | PanItemsView ()
void | ShiftTabIntoItemsViewWithoutCurrentItem ()
void | StartBringItemIntoView ()
void | TabIntoItemsViewWithoutCurrentItem ()
void | TabNavigationThroughItemsViewWithContentControlsAndSingleSelectionMode ()
void | TabNavigationThroughItemsViewWithItemContainersAndMultipleSelectionMode ()
void | TabNavigationThroughItemsViewWithItemContainersAndSingleSelectionMode ()
void | TestCleanup ()
void | UseLinedFlowLayoutWithoutLineHeight ()
void | UseLinedFlowLayoutWithoutMinWidth ()
void | VerifyItemCollectionTransitionProviderAnimations ()
void | VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndMultipleSelection ()
void | VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndNoSelection ()
void | VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndSingleSelection ()
void | VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndMultipleSelection ()
void | VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndNoSelection ()
void | VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndSingleSelection ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ClearTraces ()
int | GetCurrentItemIndex ()
void | GetScrollViewView (out double horizontalOffset, out double verticalOffset, out float zoomFactor)
string | GetSelectedItems ()
void | InvokeScrollViewScrollToButton ()
void | InvokeScrollViewZoomToButton ()
int | ItemInvokedCount ()
void | KeyboardNavigationWithFastKeystrokes (string layout, Key key)
void | KeyboardNavigationWithLayout (string layout, bool useLateralMoves, bool useFocusableControlInItemContainer=false)
void | LogAndClearTraces ()
void | LogEditValue (string editName)
void | LogEditValue (string editName, Edit edit)
void | LogScrollViewInfo (UIObject itemsViewUIObject, double?expectedVerticalOffset=null, bool?getScrollViewView=true)
void | LogTraces ()
void | PanAnnotatedScrollBar (bool handleItemsInfoRequested)
void | PrepareForScrollViewManipulationStart (string stateTextBoxName="txtScrollViewState")
void | ResetItemsView (ComboBox cmbItemsSource, ComboBox cmbLayout)
void | SetCheckBoxValue (string checkBoxName, bool checkBoxValue)
void | SetUpItemsViewForSelectionTests (string selectionMode, bool provideExtraDesiredAspectRatioItemsInfo=false)
void | StartBringItemIntoView (bool clearItemAspectRatios)
void | TabIntoItemsViewWithoutCurrentItem (bool useShiftTab)
void | TabNavigationThroughItemsView (bool useItemContainer, string selectionMode)
void | TapResetScrollViewButton ()
void | UpdateTraces ()
void | VerifyItemsViewItemInvokedEvent (bool useItemContainer, bool isItemInvokedEnabled, string selectionMode)
void | WaitForBoxChecked (string checkBoxName)
bool | WaitForEditValue (string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true)
bool | WaitForManipulationEnd (string elementName, string stateTextBoxName, bool throwOnError=true)
void | WaitForScrollViewManipulationEnd (string scrollViewName, string stateTextBoxName="txtScrollViewState")

Detailed Description

Definition at line 24 of file ItemsViewTestsWithInputHelper.cs.

Member Function Documentation

void BringFocusedItemIntoView ( ) [inline]

Definition at line 645 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView summary page");

            ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };

            using (var setup = new ItemsViewTestSetupHelper(
                testNames: new[] { "ItemsView Tests", "navigateToSummary" },
                options: null,
                shouldRestrictInnerFrameSize: false,
                outputDebugStringLevel: "Info",
                outputDebugStringComponentTypes: outputDebugStringComponentTypes))
            {
                using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
                {
                    Log.Comment("Retrieving cmbLayout");
                    UIObject cmbLayoutUIObject = FindElement.ById("cmbLayout");
                    Verify.IsNotNull(cmbLayoutUIObject, "Verifying that cmbLayout was found");
                    ComboBox layoutComboBox = new ComboBox(cmbLayoutUIObject);

                    Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
                    layoutComboBox.SelectItemByName("LinedFlowLayout");
                    Log.Comment("Selection is now {0}", layoutComboBox.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemTemplate");
                    UIObject cmbItemTemplateUIObject = FindElement.ById("cmbItemTemplate");
                    Verify.IsNotNull(cmbItemTemplateUIObject, "Verifying that cmbItemTemplate was found");
                    ComboBox itemTemplateComboBox = new ComboBox(cmbItemTemplateUIObject);

                    Log.Comment("Changing cmbItemTemplate selection to 'Fixed-Height ItemContainer (Image + TextBlock)'");
                    itemTemplateComboBox.SelectItemByName("Fixed-Height ItemContainer (Image + TextBlock)");
                    Log.Comment("Selection is now {0}", itemTemplateComboBox.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemsSource");
                    UIObject cmbItemsSourceUIObject = FindElement.ById("cmbItemsSource");
                    Verify.IsNotNull(cmbItemsSourceUIObject, "Verifying that cmbItemsSource was found");
                    ComboBox itemsSourceComboBox = new ComboBox(cmbItemsSourceUIObject);

                    Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
                    itemsSourceComboBox.SelectItemByName("ObservableCollection<Entity>");
                    Log.Comment("Selection is now {0}", itemsSourceComboBox.Selection[0].Name);

                    Log.Comment("Retrieving & filling txtItemsViewMethodIndex");
                    UIObject txtItemsViewMethodIndexUIObject = FindElement.ById("txtItemsViewMethodIndex");
                    Verify.IsNotNull(txtItemsViewMethodIndexUIObject, "Verifying that itemsViewMethodIndexTextBox was found");
                    Edit itemsViewMethodIndexTextBox = new Edit(txtItemsViewMethodIndexUIObject);

                    itemsViewMethodIndexTextBox.SetValueAndWait("5");
                    Wait.ForIdle();

                    Log.Comment("Retrieving & filling txtBringIntoViewOptionsVerticalAlignmentRatio");
                    UIObject txtBringIntoViewOptionsVerticalAlignmentRatioUIObject = FindElement.ById("txtBringIntoViewOptionsVerticalAlignmentRatio");
                    Verify.IsNotNull(txtBringIntoViewOptionsVerticalAlignmentRatioUIObject, "Verifying that txtBringIntoViewOptionsVerticalAlignmentRatio was found");
                    Edit bringIntoViewOptionsVerticalAlignmentRatioTextBox = new Edit(txtBringIntoViewOptionsVerticalAlignmentRatioUIObject);

                    bringIntoViewOptionsVerticalAlignmentRatioTextBox.SetValueAndWait("0");
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnItemsViewStartBringItemIntoView");
                    UIObject btnItemsViewStartBringItemIntoViewUIObject = FindElement.ById("btnItemsViewStartBringItemIntoView");
                    Verify.IsNotNull(btnItemsViewStartBringItemIntoViewUIObject, "Verifying that btnItemsViewStartBringItemIntoView was found");
                    Button itemsViewStartBringItemIntoViewButton = new Button(btnItemsViewStartBringItemIntoViewUIObject);

                    Log.Comment("Invoking btnItemsViewStartBringItemIntoView");
                    itemsViewStartBringItemIntoViewButton.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnGetVerticalOffset");
                    UIObject btnGetVerticalOffsetUIObject = FindElement.ById("btnGetVerticalOffset");
                    Verify.IsNotNull(btnGetVerticalOffsetUIObject, "Verifying that btnGetVerticalOffset was found");
                    Button getVerticalOffsetButton = new Button(btnGetVerticalOffsetUIObject);

                    Log.Comment("Invoking btnGetVerticalOffset");
                    getVerticalOffsetButton.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Retrieving txtVerticalOffset");
                    UIObject txtVerticalOffsetUIObject = FindElement.ById("txtVerticalOffset");
                    Verify.IsNotNull(txtVerticalOffsetUIObject, "Verifying that txtVerticalOffset was found");
                    Edit verticalOffsetTextBox = new Edit(txtVerticalOffsetUIObject);

                    Log.Comment($"ScrollView.VerticalOffset={verticalOffsetTextBox.Value}");
                    Verify.AreEqual("96", verticalOffsetTextBox.Value, "Verifying that one line was scrolled off");

                    Log.Comment("Retrieving btnItemsViewStartBringItemIntoViewAsync");
                    Button btnItemsViewStartBringItemIntoViewAsync = new Button(FindElement.ById("btnItemsViewStartBringItemIntoViewAsync"));
                    Verify.IsNotNull(btnItemsViewStartBringItemIntoViewAsync, "Verifying that btnItemsViewStartBringItemIntoViewAsync was found");

                    Log.Comment("Invoking btnItemsViewStartBringItemIntoViewAsync");
                    btnItemsViewStartBringItemIntoViewAsync.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Retrieving markupItemsView");
                    UIObject markupItemsViewUIObject = FindElement.ById("markupItemsView");
                    Verify.IsNotNull(markupItemsViewUIObject, "Verifying that markupItemsView was found");

                    Log.Comment("Clicking on ItemsView to focus first item.");
                    markupItemsViewUIObject.Click(PointerButtons.Primary, 20.0, 20.0);
                    Wait.ForIdle();

                    for (int mouseWheelIncrement = 0; mouseWheelIncrement < 4; mouseWheelIncrement++)
                    {
                        Log.Comment("Scrolling ItemsView with mouse wheel so focused first item gets put into the pinned pool");
                        InputHelper.RotateWheel(markupItemsViewUIObject, -2400);
                        Wait.ForIdle();
                    }

                    Log.Comment("Waiting for asynchronous StartBringItemIntoView gets launched and completes.");

                    Log.Comment("Invoking btnGetVerticalOffset until VerticalOffset is back to 96.");
                    for (int waitCount = 0; waitCount < 100; waitCount++)
                    {
                        Wait.ForMilliseconds(125);
                        getVerticalOffsetButton.Invoke();
                        Wait.ForIdle();
                        if (verticalOffsetTextBox.Value == "96")
                        {
                            Log.Comment($"VerticalOffset back to 96 when waitCount={waitCount}");
                            break;
                        }
                    }

                    Verify.AreEqual("96", verticalOffsetTextBox.Value, "Verifying that one line is scrolled off again");

                    Log.Comment("Retrieving btnClearLogs");
                    Button btnClearLogs = new Button(FindElement.ById("btnClearLogs"));
                    Verify.IsNotNull(btnClearLogs, "Verifying that btnClearLogs was found");

                    Log.Comment("Invoke btnClearLogs.");
                    btnClearLogs.Invoke();
                    Wait.ForIdle();

                    LogAndClearTraces();
                    Wait.ForIdle();

                    ResetItemsView(itemsSourceComboBox, layoutComboBox);
                }
            }
        }

void CanDragItemContainerAfterPan ( ) [inline]

Definition at line 841 of file ItemsViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToSummary" }))
            {
                Log.Comment("Turning on item drag option.");

                Log.Comment("Retrieving chkSetItemsRepeaterElementCanDrag");
                CheckBox chkSetItemsRepeaterElementCanDrag = new CheckBox(FindElement.ById("chkSetItemsRepeaterElementCanDrag"));
                Verify.IsNotNull(chkSetItemsRepeaterElementCanDrag, "Verifying that chkSetItemsRepeaterElementCanDrag was found");

                if (ToggleState.Off == chkSetItemsRepeaterElementCanDrag.ToggleState)
                {
                    Log.Comment("Toggling chkSetItemsRepeaterElementCanDrag.IsChecked to ToggleState.On");
                    chkSetItemsRepeaterElementCanDrag.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, chkSetItemsRepeaterElementCanDrag.ToggleState);
                }

                Log.Comment("Retrieving chkItemsRepeaterElementCanDrag");
                CheckBox chkItemsRepeaterElementCanDrag = new CheckBox(FindElement.ById("chkItemsRepeaterElementCanDrag"));
                Verify.IsNotNull(chkItemsRepeaterElementCanDrag, "Verifying that chkItemsRepeaterElementCanDrag was found");

                if (ToggleState.Off == chkItemsRepeaterElementCanDrag.ToggleState)
                {
                    Log.Comment("Toggling chkItemsRepeaterElementCanDrag.IsChecked to ToggleState.On");
                    chkItemsRepeaterElementCanDrag.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, chkItemsRepeaterElementCanDrag.ToggleState);
                }

                Log.Comment("Setting up ItemsView.");

                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Changing cmbItemTemplate selection to 'ItemContainer (Image)'");
                cmbItemTemplate.SelectItemByName("ItemContainer (Image)");
                Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
                cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                Log.Comment("Retrieving and selecting first ItemContainer.");

                Log.Comment("Retrieving PART_ScrollPresenter");
                var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
                Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");

                UIObject itemContainer = scrollPresenter.Children[0];
                Verify.IsNotNull(itemContainer, "Verifying that itemContainer is set");

                Log.Comment("itemContainer.Name=" + itemContainer.Name);
                Verify.AreEqual("ItemContainer", itemContainer.Name);

                Log.Comment("Select single item via LeftClick.");
                InputHelper.LeftClick(itemContainer);

                Rectangle itemContainerBounds = itemContainer.BoundingRectangle;
                Log.Comment("itemContainerBounds Bounds= X:{0}, Y:{1}, Width:{2}, Height:{3}",
                    itemContainerBounds.X, itemContainerBounds.Y, itemContainerBounds.Width, itemContainerBounds.Height);

                Point itemContainerCenter = new Point(
                    itemContainerBounds.X + itemContainerBounds.Width / 2,
                    itemContainerBounds.Y + itemContainerBounds.Height / 2);

                Point itemContainerBoundsOffsetCenterForPan = new Point(
                    itemContainerCenter.X,
                    itemContainerCenter.Y - 50);

                Log.Comment("Panning down with touch.");
                InputHelper.Pan(
                    obj: itemContainer,
                    start: itemContainerCenter,
                    end: itemContainerBoundsOffsetCenterForPan,
                    holdDuration: 20,
                    panAcceleration: 0.0f,
                    dragDuration: 500,
                    waitForIdle: false);
                Wait.ForIdle();

                Point itemContainerBoundsOffsetCenterForDrag = new Point(
                    itemContainerCenter.X + 200,
                    itemContainerCenter.Y);

                Log.Comment("Dragging ItemContainer from its center, 200px to the right");
                InputHelper.Pan(
                    obj: itemContainer,
                    start: itemContainerCenter,
                    end: itemContainerBoundsOffsetCenterForDrag,
                    holdDuration: 1500,
                    panAcceleration: 0.0f,
                    dragDuration: 1000,
                    waitForIdle: false);
                Wait.ForIdle();

                Log.Comment("Retrieving lstLogs");
                ListBox lstLogs = new ListBox(FindElement.ById("lstLogs"));
                Verify.IsNotNull(lstLogs, "Verifying that lstLogs was found");

                bool foundDragStartingEvent = false;

                foreach (var item in lstLogs.AllItems)
                {
                    ListBoxItem lbItem = item as ListBoxItem;
                    string log = lbItem.Name;

                    Log.Comment("Log:" + log);

                    if (!foundDragStartingEvent)
                    {
                        foundDragStartingEvent = log == "UIElement_DragStarting AllowedOperations=Copy, Move, Link";
                    }
                }

                Verify.IsTrue(foundDragStartingEvent, "Verifying that UIElement.DragStarting was raised.");

                ResetItemsView(cmbItemsSource, cmbLayout: null);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 31 of file ItemsViewTestsWithInputHelper.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClearTraces ( ) [inline, private]

Definition at line 2977 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Clearing full log.");
            LogEditValue("txtStatus");

            TextInput.SendText("c");
            WaitForBoxChecked("chkLogCleared");
        }

void ClickedItemBroughtIntoView ( ) [inline]

Definition at line 788 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
            {
                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
                cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
                Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
                cmbItemsSource.SelectItemByName("List<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                Log.Comment("Retrieving itemsView");
                UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                int currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(-1, currentItemIndex, "Verifying CurrentItemIndex is initially -1");

                Log.Comment("Clicking on ItemsView to select last partially visible item.");
                itemsViewUIObject.Click(PointerButtons.Primary, 40.0, itemsViewUIObject.BoundingRectangle.Height - 4.0);
                Wait.ForIdle();

                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 76);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(5, currentItemIndex, "Verifying CurrentItemIndex is 5");

                Log.Comment("Clicking on ItemsView to select first partially visible item.");
                itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 4.0);
                Wait.ForIdle();

                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 0);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                ResetItemsView(cmbItemsSource, cmbLayout: null);
            }
        }

int GetCurrentItemIndex ( ) [inline, private]

Definition at line 2643 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving btnGetCurrentItemIndex");
            UIObject getCurrentItemIndexUIObject = FindElement.ById("btnGetCurrentItemIndex");
            Button getCurrentItemIndexButton = new Button(getCurrentItemIndexUIObject);
            Verify.IsNotNull(getCurrentItemIndexButton, "Verifying that btnGetCurrentItemIndex Button was found");

            getCurrentItemIndexButton.Invoke();
            Wait.ForIdle();

            Log.Comment("Retrieving txtCurrentItemIndex");
            UIObject currentItemIndexUIObject = FindElement.ById("txtCurrentItemIndex");
            Edit currentItemIndexTextBox = new Edit(currentItemIndexUIObject);
            Verify.IsNotNull(currentItemIndexTextBox, "Verifying that txtCurrentItemIndex TextBox was found");

            Log.Comment($"CurrentItemIndex={currentItemIndexTextBox.Value}");

            return int.Parse(currentItemIndexTextBox.Value);
        }

void GetScrollViewView | ( | out double | horizontalOffset,
 |  | out double | verticalOffset,
 |  | out float | zoomFactor |
 | ) |  |  | [inline, private]

Definition at line 2663 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving ScrollView view.");
            horizontalOffset = -1.0;
            verticalOffset = -1.0;
            zoomFactor = -1.0f;

            Log.Comment("Retrieving txtScrollViewHorizontalOffset.");
            UIObject viewUIObject = FindElement.ById("txtScrollViewHorizontalOffset");
            if (viewUIObject == null)
            {
                Log.Comment("txtScrollViewHorizontalOffset not found.");
            }
            else
            {
                Log.Comment("txtScrollViewHorizontalOffset found.");
                Edit viewTextBox = new Edit(viewUIObject);
                Log.Comment("Current HorizontalOffset: " + viewTextBox.Value);
                horizontalOffset = string.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);
            }

            Log.Comment("Retrieving txtScrollViewVerticalOffset.");
            viewUIObject = FindElement.ById("txtScrollViewVerticalOffset");
            if (viewUIObject == null)
            {
                Log.Comment("txtScrollViewVerticalOffset not found.");
            }
            else
            {
                Log.Comment("txtScrollViewVerticalOffset found.");
                Edit viewTextBox = new Edit(viewUIObject);
                Log.Comment("Current VerticalOffset: " + viewTextBox.Value);
                verticalOffset = string.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);
            }

            Log.Comment("Retrieving txtScrollViewZoomFactor.");
            viewUIObject = FindElement.ById("txtScrollViewZoomFactor");
            if (viewUIObject == null)
            {
                Log.Comment("txtScrollViewZoomFactor not found.");
            }
            else
            {
                Log.Comment("txtScrollViewZoomFactor found.");
                Edit viewTextBox = new Edit(viewUIObject);
                Log.Comment("Current ZoomFactor: " + viewTextBox.Value);
                zoomFactor = string.IsNullOrWhiteSpace(viewTextBox.Value) ? float.NaN : Convert.ToSingle(viewTextBox.Value);
            }
        }

string GetSelectedItems ( ) [inline, private]

Definition at line 2034 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving GetSelectedItems");

            Log.Comment("Retrieving txtSelectedItems");
            Edit txtSelectedItems = new Edit(FindElement.ById("txtSelectedItems"));
            Verify.IsNotNull(txtSelectedItems, "Verifying that txSelectedItems was found");

            Log.Comment("Retrieving btnGetSelectedItems");
            Button btnGetSelectedItems = new Button(FindElement.ById("btnGetSelectedItems"));
            Verify.IsNotNull(btnGetSelectedItems, "Verifying that btnGetSelectedItems was found");

            btnGetSelectedItems.Invoke();
            Wait.ForIdle();

            return txtSelectedItems.Value;
        }

void InsertAndRemoveItems ( ) [inline]

Definition at line 1286 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
            {
                Log.Comment("Retrieving cmbLayout");
                ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
                Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Retrieving txtItemsSourceIndexes");
                Edit itemsSourceIndexesTextBox = new Edit(FindElement.ById("txtItemsSourceIndexes"));
                Verify.IsNotNull(itemsSourceIndexesTextBox, "Verifying that itemsSourceIndexesTextBox was found");

                Log.Comment("Retrieving btnInsertItems");
                Button btnInsertItems = new Button(FindElement.ById("btnInsertItems"));
                Verify.IsNotNull(btnInsertItems, "Verifying that btnInsertItems was found");

                Log.Comment("Retrieving btnRemoveItems");
                Button btnRemoveItems = new Button(FindElement.ById("btnRemoveItems"));
                Verify.IsNotNull(btnRemoveItems, "Verifying that btnRemoveItems was found");

                Log.Comment("Retrieving itemsView");
                UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
                cmbLayout.SelectItemByName("LinedFlowLayout");
                Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
                cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
                Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                Log.Comment("Changing ItemsSource selection to 'ObservableCollection<Entity>'");
                cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                Log.Comment("Changing txtItemsSourceIndexes text to '0, 0, 0'");
                itemsSourceIndexesTextBox.SetValueAndWait("0, 0, 0");
                Wait.ForIdle();

                Log.Comment("Removing the first 3 items");
                btnRemoveItems.Invoke();
                Wait.ForIdle();

                Log.Comment("Inserting the first 3 items");
                btnInsertItems.Invoke();
                Wait.ForIdle();

                for (int index = 0; index < 4; index++)
                {
                    Log.Comment("Clicking on ItemsView item {0} to select it.", index);
                    itemsViewUIObject.Click(PointerButtons.Primary, 40.0 + (100 * index), 40.0);
                    Wait.ForIdle();
                    int currentItemIndex = GetCurrentItemIndex();
                    Verify.AreEqual(index, currentItemIndex, "Verifying CurrentItemIndex is " + index);
                }

                ResetItemsView(cmbItemsSource, cmbLayout);

                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
            }
        }

void InvokeScrollViewScrollToButton ( ) [inline, private]

Definition at line 2571 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving btnScrollViewScrollTo");
            UIObject scrollViewScrollToUIObject = FindElement.ById("btnScrollViewScrollTo");
            Verify.IsNotNull(scrollViewScrollToUIObject, "Verifying that btnScrollViewScrollTo Button was found");

            Button scrollViewScrollToButton = new Button(scrollViewScrollToUIObject);

            Log.Comment("Invoking scrollViewScrollToButton");
            scrollViewScrollToButton.Invoke();
            WaitForEditValue("txtStatus" /*editName*/, "ScrollView scrolled" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
        }

void InvokeScrollViewZoomToButton ( ) [inline, private]

Definition at line 2584 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving btnScrollViewZoomTo");
            UIObject scrollViewZoomToUIObject = FindElement.ById("btnScrollViewZoomTo");
            Verify.IsNotNull(scrollViewZoomToUIObject, "Verifying that btnScrollViewZoomTo Button was found");

            Button scrollViewZoomToButton = new Button(scrollViewZoomToUIObject);

            Log.Comment("Invoking scrollViewZoomToButton");
            scrollViewZoomToButton.Invoke();
            WaitForEditValue("txtStatus" /*editName*/, "ScrollView zoomed" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
        }

int ItemInvokedCount ( ) [inline, private]

Definition at line 2922 of file ItemsViewTestsWithInputHelper.cs.

        {
            int itemInvokedCount = 0;

            Log.Comment("Counting ItemsView.ItemInvoked events in full log:");

            UpdateTraces();

            UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
            Verify.IsNotNull(fullLogUIObject);
            ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
            Verify.IsNotNull(cmbFullLog);

            foreach (ComboBoxItem item in cmbFullLog.AllItems)
            {
                if (item.Name.Contains("ItemsView.ItemInvoked"))
                {
                    itemInvokedCount++;
                }
            }

            Log.Comment($"Log Entries Count={cmbFullLog.AllItems.Count}.");
            Log.Comment($"ViewChanged Count={itemInvokedCount}.");

            ClearTraces();

            return itemInvokedCount;
        }

void ItemsViewExtendedSelectionMode ( ) [inline]

Definition at line 203 of file ItemsViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToSummary" }))
            {
                SetUpItemsViewForSelectionTests("Extended");

                Log.Comment("Retrieving PART_ScrollPresenter");
                var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
                Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");

                // PRIMARY INPUT
                Log.Comment("scrollPresenter.Children[0].Name=" + scrollPresenter.Children[0].Name);
                Verify.AreEqual("ItemContainer", scrollPresenter.Children[0].Name);

                Log.Comment("Select single item via LeftClick.");
                InputHelper.LeftClick(scrollPresenter.Children[8]);

                var strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (1): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "8 - Lorem, ");

                Log.Comment("Select a different single item via LeftClick.");
                InputHelper.LeftClick(scrollPresenter.Children[10]);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (2): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "10 - Lore, ");

                Log.Comment("Select two items via Ctrl + LeftClick.");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
                InputHelper.LeftClick(scrollPresenter.Children[12]);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (3): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "10 - Lore, 12 - Lore, ");

                Log.Comment("Verify Ctrl + LeftClick on a selected item deselects it.");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
                InputHelper.LeftClick(scrollPresenter.Children[10]);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (4): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "12 - Lore, ");

                Log.Comment("Use Shift + LeftClick to select a range of items.");

                InputHelper.LeftClick(scrollPresenter.Children[13]);

                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
                InputHelper.LeftClick(scrollPresenter.Children[18]);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (5): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "13 - Lore, 14 - Lore, 15 - Lore, 16 - Lore, 17 - Lore, 18 - Lore, ");

                Log.Comment("Verify selecting a new range of items deselects the previous range.");

                KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
                InputHelper.LeftClick(scrollPresenter.Children[2]);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);

                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
                InputHelper.LeftClick(scrollPresenter.Children[7]);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (6): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "2 - Lorem, 3 - Lorem, 4 - Lorem, 5 - Lorem, 6 - Lorem, 7 - Lorem, ");

                // FOCUS INPUT

                Log.Comment("Verify focus changes selection when navigating using arrow keys.");

                InputHelper.LeftClick(scrollPresenter.Children[9]);
                KeyboardHelper.PressKey(Key.Down);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (7): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "14 - Lore, ");

                Log.Comment("Verify focus does not change selection when navigating using ctrl + arrow keys.");

                KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (8): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "14 - Lore, ");

                Log.Comment("Verify Shift + Arrow Key selects a range.");

                scrollPresenter.Children[16].SetFocus();
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (9): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "14 - Lore, 15 - Lore, 16 - Lore, 17 - Lore, 18 - Lore, 19 - Lore, ");

                Log.Comment("Verify Shift + Ctrl + Arrow Key selects a range while preserving previously selected range.");

                KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
                InputHelper.LeftClick(scrollPresenter.Children[2]);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);

                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
                KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (10): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "2 - Lorem, 3 - Lorem, 4 - Lorem, 5 - Lorem, 6 - Lorem, 7 - Lorem, 14 - Lore, 15 - Lore, 16 - Lore, 17 - Lore, 18 - Lore, 19 - Lore, ");

                ResetItemsView(cmbItemsSource: null, cmbLayout: null);
            }
        }

void ItemsViewItemsContainerDragStartingEventRaised ( ) [inline]

Definition at line 46 of file ItemsViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToIntegration" }))
            {
                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving lstLogs");
                ListBox lstLogs = new ListBox(FindElement.ById("lstLogs"));
                Verify.IsNotNull(lstLogs, "Verifying that lstLogs was found");

                Log.Comment("Retrieving PART_ScrollPresenter");
                var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
                Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");

                Log.Comment("Changing ItemTemplate selection to 'Small Image'");
                cmbItemTemplate.SelectItemByName("Small Image");
                Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                // Retrieve ItemContainer to drag
                Log.Comment("scrollPresenter.Children[0].Name=" + scrollPresenter.Children[0].Name);
                Verify.AreEqual("ItemContainer", scrollPresenter.Children[0].Name);

                Rectangle itemContainerBounds = scrollPresenter.Children[0].BoundingRectangle;
                Log.Comment("itemContainerBounds Bounds= X:{0}, Y:{1}, Width:{2}, Height:{3}",
                    itemContainerBounds.X, itemContainerBounds.Y, itemContainerBounds.Width, itemContainerBounds.Height);

                Point itemContainerCenter = new Point(
                    itemContainerBounds.X + itemContainerBounds.Width / 2,
                    itemContainerBounds.Y + itemContainerBounds.Height / 2);

                Point itemContainerBoundsOffsetCenter = new Point(
                    itemContainerCenter.X,
                    itemContainerCenter.Y + 400);

                Log.Comment("Dragging ItemContainer from its center down 400px");
                InputHelper.Pan(
                    obj: scrollPresenter.Children[0],
                    start: itemContainerCenter,
                    end: itemContainerBoundsOffsetCenter,
                    holdDuration: 1000,
                    panAcceleration: 0.0f,
                    dragDuration: 1000,
                    waitForIdle: false);
                Wait.ForIdle();

                bool foundDragStartingEvent = false;
                foreach (var item in lstLogs.AllItems)
                {
                    ListBoxItem lbItem = item as ListBoxItem;
                    string name = lbItem.Name;
                    foundDragStartingEvent = name == "ItemContainer.DragStarting";
                    if(foundDragStartingEvent) { break; }
                }

                Verify.IsTrue(foundDragStartingEvent, "Verifying that DragStarted was raised.");
            }
        }

void ItemsViewMultipleSelectionMode ( ) [inline]

Definition at line 109 of file ItemsViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToSummary" }))
            {
                SetUpItemsViewForSelectionTests("Multiple");

                Log.Comment("Retrieving PART_ScrollPresenter");
                var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
                Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");

                // PRIMARY INPUT
                Log.Comment("scrollPresenter.Children[0].Name=" + scrollPresenter.Children[0].Name);
                Verify.AreEqual("ItemContainer", scrollPresenter.Children[0].Name);

                Log.Comment("Select two items via left click.");
                InputHelper.LeftClick(scrollPresenter.Children[9]);
                InputHelper.LeftClick(scrollPresenter.Children[10]);

                var strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (1): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, ");

                Log.Comment("Deselect item via left click.");
                InputHelper.LeftClick(scrollPresenter.Children[10]);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (2): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "9 - Lorem, ");

                Log.Comment("Select multiple items using shift + left click.");

                Log.Comment("Set an anchor item.");
                InputHelper.LeftClick(scrollPresenter.Children[9]);
                InputHelper.LeftClick(scrollPresenter.Children[9]);

                Log.Comment("Shift + left click a second item.");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
                InputHelper.LeftClick(scrollPresenter.Children[14]);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (3): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, 11 - Lore, 12 - Lore, 13 - Lore, 14 - Lore, ");

                // FOCUS INPUT

                Log.Comment("Deselect last selected item using LeftClick");
                InputHelper.LeftClick(scrollPresenter.Children[14]);

                Log.Comment("Deselect items using shift + arrow");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
                KeyboardHelper.PressKey(Key.Up);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (4): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "");

                Log.Comment("Select item to make it a selected anchor using LeftClick.");
                InputHelper.LeftClick(scrollPresenter.Children[9]);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (5): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "9 - Lorem, ");

                scrollPresenter.Children[10].SetFocus();

                Log.Comment("Select items using shift + arrow");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (6): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, 11 - Lore, 12 - Lore, 13 - Lore, 14 - Lore, ");

                Log.Comment("Verify navigating using the arrow keys does not change selection.");

                scrollPresenter.Children[16].SetFocus();

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Right);

                strSelectedItems = GetSelectedItems();
                Log.Comment($"SelectedItems (7): {strSelectedItems}");
                Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, 11 - Lore, 12 - Lore, 13 - Lore, 14 - Lore, ");

                ResetItemsView(cmbItemsSource: null, cmbLayout: null);
            }
        }

void KeyboardNavigationInItemsViewWithLinedFlowLayout ( ) [inline]

Definition at line 478 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithLayout(layout: "LinedFlowLayout", useLateralMoves: true);
        }

void KeyboardNavigationInItemsViewWithLinedFlowLayoutAndInnerFocusableControl ( ) [inline]

Definition at line 486 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithLayout(layout: "LinedFlowLayout", useLateralMoves: true, useFocusableControlInItemContainer: true);
        }

void KeyboardNavigationInItemsViewWithStackLayout ( ) [inline]

Definition at line 494 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithLayout(layout: "StackLayout", useLateralMoves: false);
        }

void KeyboardNavigationInItemsViewWithUniformGridLayout ( ) [inline]

Definition at line 503 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithLayout(layout: "UniformGridLayout", useLateralMoves: true);
        }

void KeyboardNavigationWithFastKeystrokes | ( | string | layout,
 |  | Key | key |
 | ) |  |  | [inline, private]

Definition at line 2190 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "ItemsView" };

            using (var setup = new ItemsViewTestSetupHelper(
                testNames: new[] { "ItemsView Tests", "navigateToInteractiveTests" },
                options: null,
                shouldRestrictInnerFrameSize: false,
                outputDebugStringLevel: "Verbose",
                outputDebugStringComponentTypes: outputDebugStringComponentTypes))
            {
                using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
                {
                    Log.Comment("Retrieving cmbItemTemplate");
                    ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                    Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                    Log.Comment("Retrieving cmbItemsSource");
                    ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                    Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                    Log.Comment("Retrieving cmbLayout");
                    ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
                    Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

                    Log.Comment($"Changing Layout selection to '{layout}'");
                    cmbLayout.SelectItemByName(layout);
                    Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                    if (layout == "LinedFlowLayout")
                    {
                        Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Square ItemContainer)'");
                        cmbItemTemplate.SelectItemByName("Entity DataTemplate (Square ItemContainer)");
                    }
                    else
                    {
                        Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
                        cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
                    }
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                    Log.Comment("Changing ItemsSource selection to 'Large List<Entity>'");
                    cmbItemsSource.SelectItemByName("Large List<Entity>");
                    Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                    if (layout == "LinedFlowLayout")
                    {
                        Log.Comment("Retrieving chkHandleItemsInfoRequested");
                        CheckBox chkHandleItemsInfoRequested = new CheckBox(FindElement.ById("chkHandleItemsInfoRequested"));
                        Verify.IsNotNull(chkHandleItemsInfoRequested, "Verifying that chkHandleItemsInfoRequested was found");

                        if (ToggleState.Off == chkHandleItemsInfoRequested.ToggleState)
                        {
                            Log.Comment("Toggling chkHandleItemsInfoRequested.IsChecked to ToggleState.On");
                            chkHandleItemsInfoRequested.Toggle();
                            Wait.ForIdle();
                            Verify.AreEqual(ToggleState.On, chkHandleItemsInfoRequested.ToggleState);
                        }

                        Log.Comment("Retrieving chkUseFastPath");
                        CheckBox chkUseFastPath = new CheckBox(FindElement.ById("chkUseFastPath"));
                        Verify.IsNotNull(chkUseFastPath, "Verifying that chkUseFastPath was found");

                        if (ToggleState.Off == chkUseFastPath.ToggleState)
                        {
                            Log.Comment("Toggling chkUseFastPath.IsChecked to ToggleState.On");
                            chkUseFastPath.Toggle();
                            Wait.ForIdle();
                            Verify.AreEqual(ToggleState.On, chkUseFastPath.ToggleState);
                        }
                    }

                    Log.Comment("Retrieving itemsView");
                    UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                    Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                    Log.Comment("Clicking on ItemsView to select first item.");
                    itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
                    Wait.ForIdle();
                    LogScrollViewInfo(itemsViewUIObject);
                    int currentItemIndex = GetCurrentItemIndex();
                    Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                    if (key == Key.Up || key == Key.PageUp)
                    {
                        Log.Comment("Pressing End key");
                        KeyboardHelper.PressKey(Key.End);
                        Wait.ForIdle();
                        LogScrollViewInfo(itemsViewUIObject);
                        currentItemIndex = GetCurrentItemIndex();
                        Verify.AreEqual(999, currentItemIndex, "Verifying CurrentItemIndex is 999");
                    }

                    uint numPresses = (key == Key.Up || key == Key.Down) ? 8u : 4u;

                    Log.Comment("Pressing repeated key " + numPresses + " times");
                    KeyboardHelper.PressKey(key, ModifierKey.None, numPresses);

                    Wait.ForIdle();
                    currentItemIndex = GetCurrentItemIndex();

                    int expectedCurrentItemIndex = 0;

                    if (layout == "LinedFlowLayout")
                    {
                        switch (key)
                        {
                            case Key.Down:
                                expectedCurrentItemIndex = 48;
                                break;
                            case Key.Up:
                                expectedCurrentItemIndex = 951;
                                break;
                            case Key.PageDown:
                                expectedCurrentItemIndex = 138;
                                break;
                            case Key.PageUp:
                                expectedCurrentItemIndex = 861;
                                break;
                        }
                    }
                    else
                    {
                        // layout == "StackLayout"
                        switch (key)
                        {
                            case Key.Down:
                                expectedCurrentItemIndex = 8;
                                break;
                            case Key.Up:
                                expectedCurrentItemIndex = 991;
                                break;
                            case Key.PageDown:
                                expectedCurrentItemIndex = 19;
                                break;
                            case Key.PageUp:
                                expectedCurrentItemIndex = 980;
                                break;
                        }
                    }

                    if (currentItemIndex != expectedCurrentItemIndex)
                    {
                        Log.Warning($"Unexpected current element index {currentItemIndex} instead of {expectedCurrentItemIndex}");
                        LogAndClearTraces();
                        Wait.ForIdle();
                    }

                    if (layout == "LinedFlowLayout")
                    {
                        switch (key)
                        {
                            case Key.Down:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 272.0);
                                break;
                            case Key.Up:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 13252.0);
                                break;
                            case Key.PageDown:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 1532.0);
                                break;
                            case Key.PageUp:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 11992.0);
                                break;
                        }
                    }
                    else
                    {
                        // layout == "StackLayout"
                        switch (key)
                        {
                            case Key.Down:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 384.0);
                                break;
                            case Key.Up:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 95116.0);
                                break;
                            case Key.PageDown:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 1440.0);
                                break;
                            case Key.PageUp:
                                LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 94060.0);
                                break;
                        }
                    }

                    Verify.AreEqual(expectedCurrentItemIndex, currentItemIndex, "Verifying CurrentItemIndex.");

                    ResetItemsView(cmbItemsSource, cmbLayout);
                }
            }
        }

void KeyboardNavigationWithLayout | ( | string | layout,
 |  | bool | useLateralMoves,
 |  | bool | useFocusableControlInItemContainer = false |
 | ) |  |  | [inline, private]

Definition at line 2052 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
            {
                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Retrieving cmbLayout");
                ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
                Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

                Log.Comment($"Changing Layout selection to '{layout}'");
                cmbLayout.SelectItemByName(layout);
                Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                if (useFocusableControlInItemContainer)
                {
                    Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (ItemContainer with ToggleButton)'");
                    cmbItemTemplate.SelectItemByName("Entity DataTemplate (ItemContainer with ToggleButton)");
                }
                else
                {
                    Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
                    cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
                }
                Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
                cmbItemsSource.SelectItemByName("List<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                Log.Comment("Retrieving itemsView");
                UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                Log.Comment("Clicking on ItemsView to select first item.");
                itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                int currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                Log.Comment("Pressing End key");
                KeyboardHelper.PressKey(Key.End);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(49, currentItemIndex, "Verifying CurrentItemIndex is 49");

                Log.Comment("Pressing Right key");
                KeyboardHelper.PressKey(Key.Right);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(49, currentItemIndex, "Verifying CurrentItemIndex is still 49");

                Log.Comment("Pressing Home key");
                KeyboardHelper.PressKey(Key.Home);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                if (useLateralMoves)
                {
                    Log.Comment("Pressing Right key");
                    KeyboardHelper.PressKey(Key.Right);
                    Wait.ForIdle();
                    LogScrollViewInfo(itemsViewUIObject);
                    currentItemIndex = GetCurrentItemIndex();
                    Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is 1");
                }

                Log.Comment("Pressing Down key");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");

                if (useLateralMoves)
                {
                    Log.Comment("Pressing Left key");
                    KeyboardHelper.PressKey(Key.Left);
                    Wait.ForIdle();
                    LogScrollViewInfo(itemsViewUIObject);
                    currentItemIndex = GetCurrentItemIndex();
                    Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");
                    Verify.AreNotEqual(1, currentItemIndex, "Verifying CurrentItemIndex is not 1");
                }

                Log.Comment("Pressing Up key");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                Log.Comment("Pressing PageDown key");
                KeyboardHelper.PressKey(Key.PageDown);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");

                Log.Comment("Pressing PageDown key");
                KeyboardHelper.PressKey(Key.PageDown);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");

                Log.Comment("Pressing PageUp key");
                KeyboardHelper.PressKey(Key.PageUp);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");

                Log.Comment("Pressing PageUp key");
                KeyboardHelper.PressKey(Key.PageUp);
                Wait.ForIdle();
                LogScrollViewInfo(itemsViewUIObject);
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                ResetItemsView(cmbItemsSource, cmbLayout);
                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
            }
        }

void KeyDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes ( ) [inline]

Definition at line 511 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.Down);
        }

void KeyDownInItemsViewAndStackLayoutWithFastKeystrokes ( ) [inline]

Definition at line 543 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.Down);
        }

void KeyPageDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes ( ) [inline]

Definition at line 519 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.PageDown);
        }

void KeyPageDownInItemsViewAndStackLayoutWithFastKeystrokes ( ) [inline]

Definition at line 551 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.PageDown);
        }

void KeyPageUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes ( ) [inline]

Definition at line 535 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.PageUp);
        }

void KeyPageUpInItemsViewAndStackLayoutWithFastKeystrokes ( ) [inline]

Definition at line 567 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.PageUp);
        }

void KeyUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes ( ) [inline]

Definition at line 527 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.Up);
        }

void KeyUpInItemsViewAndStackLayoutWithFastKeystrokes ( ) [inline]

Definition at line 559 of file ItemsViewTestsWithInputHelper.cs.

        {
            KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.Up);
        }

void LogAndClearTraces ( ) [inline, private]

Definition at line 2986 of file ItemsViewTestsWithInputHelper.cs.

        {
            LogTraces();
            ClearTraces();
        }

void LogEditValue ( string editName ) [inline, private]

Definition at line 2775 of file ItemsViewTestsWithInputHelper.cs.

        {
            Edit edit = new Edit(FindElement.ById(editName));
            Verify.IsNotNull(edit);
            LogEditValue(editName, edit);
        }

void LogEditValue | ( | string | editName,
 |  | Edit | edit |
 | ) |  |  | [inline, private]

Definition at line 2782 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Current value for " + editName + ": " + edit.Value);
        }

void LogScrollViewInfo | ( | UIObject | itemsViewUIObject,
 |  | double? | expectedVerticalOffset = null,
 |  | bool? | getScrollViewView = true |
 | ) |  |  | [inline, private]

Definition at line 2721 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving PART_ScrollView");
            UIObject scrollViewUIObject = itemsViewUIObject.FirstChild;
            Verify.IsNotNull(scrollViewUIObject, "Verifying that PART_ScrollView was found");

            Log.Comment("Retrieving PART_ScrollPresenter as a UIObject");
            UIObject scrollPresenterUIObject = FindElement.ById("PART_ScrollPresenter");
            Verify.IsNotNull(scrollPresenterUIObject, "Verifying that PART_ScrollView.PART_Root.PART_ScrollPresenter was found");

            Log.Comment("Retrieving PART_ScrollPresenter as a ScrollPresenter");
            ScrollPresenter scrollPresenter = new ScrollPresenter(scrollPresenterUIObject);
            Verify.IsNotNull(scrollPresenter, "Verifying that scrollPresenter was found");

            Log.Comment("scrollPresenter.HorizontalScrollPercent={0}", scrollPresenter.HorizontalScrollPercent);
            Log.Comment("scrollPresenter.VerticalScrollPercent={0}", scrollPresenter.VerticalScrollPercent);
            Log.Comment("scrollPresenter.VerticalViewSize={0}", scrollPresenter.VerticalViewSize);
            Log.Comment("scrollPresenter.BoundingRectangle.Height={0}", scrollPresenter.BoundingRectangle.Height);

            if (getScrollViewView == true)
            {
                int attempts = 0;
                double verticalOffsetDelta = 0.0;
                bool verticalOffsetDeltaTooLarge = false;

                do
                {
                    Wait.ForIdle();

                    double horizontalOffset;
                    double verticalOffset;
                    float zoomFactor;

                    GetScrollViewView(out horizontalOffset, out verticalOffset, out zoomFactor);
                    Log.Comment("horizontalOffset={0}", horizontalOffset);
                    Log.Comment("verticalOffset={0}", verticalOffset);
                    Log.Comment("zoomFactor={0}", zoomFactor);

                    if (expectedVerticalOffset != null)
                    {
                        attempts++;
                        verticalOffsetDelta = Math.Abs((double)expectedVerticalOffset - verticalOffset);
                        verticalOffsetDeltaTooLarge = verticalOffsetDelta > 0.5;
                    }
                }
                while (verticalOffsetDeltaTooLarge && attempts <= 3);

                if (expectedVerticalOffset != null)
                {
                    Verify.IsLessThanOrEqual(verticalOffsetDelta, 0.5, "Verifying verticalOffset is close to " + expectedVerticalOffset);
                }
            }
        }

void LogTraces ( ) [inline, private]

Definition at line 2960 of file ItemsViewTestsWithInputHelper.cs.

        {
            UpdateTraces();

            Log.Comment("Reading full log:");

            UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
            Verify.IsNotNull(fullLogUIObject);
            ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
            Verify.IsNotNull(cmbFullLog);

            foreach (ComboBoxItem item in cmbFullLog.AllItems)
            {
                Log.Comment(item.Name);
            }
        }

void PanAnnotatedScrollBar ( bool handleItemsInfoRequested ) [inline, private]

Definition at line 1615 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving RasterizationScaleTextBox");
            Edit rasterizationScaleTextBox = new Edit(FindElement.ById("RasterizationScaleTextBox"));
            if (rasterizationScaleTextBox == null)
            {
                Log.Warning("rasterizationScaleTextBox not found.");
            }
            else
            {
                string rasterizationScale = rasterizationScaleTextBox.Value;
                Log.Comment("RasterizationScale:" + rasterizationScale);
                if (rasterizationScale != "1")
                {
                    Log.Warning("Skipping test as panning is only supported for RasterizationScale == 1.");
                    return;
                }
            }

            Log.Comment("Selecting ItemsView/ItemContainer/AnnotatedScrollBar integration page");

            ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "ScrollPresenter", "LinedFlowLayout", "AnnotatedScrollBar", /*"ItemsRepeater",*/ "ItemsView" };

            using (var setup = new ItemsViewTestSetupHelper(
                testNames: new[] { "ItemsView Tests", "navigateToIntegration" },
                options: null,
                shouldRestrictInnerFrameSize: false,
                outputDebugStringLevel: "Info",
                outputDebugStringComponentTypes: outputDebugStringComponentTypes))
            {
                using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
                {
                    Log.Comment("Retrieving chkHandleItemsInfoRequested");
                    CheckBox chkHandleItemsInfoRequested = new CheckBox(FindElement.ById("chkHandleItemsInfoRequested"));
                    Verify.IsNotNull(chkHandleItemsInfoRequested, "Verifying that chkHandleItemsInfoRequested was found");

                    Log.Comment("Retrieving chkGeneralInfoLogs");
                    CheckBox chkGeneralInfoLogs = new CheckBox(FindElement.ById("chkGeneralInfoLogs"));
                    Verify.IsNotNull(chkGeneralInfoLogs, "Verifying that chkGeneralInfoLogs was found");

                    Log.Comment("Retrieving chkGeneralVerboseLogs");
                    CheckBox chkGeneralVerboseLogs = new CheckBox(FindElement.ById("chkGeneralVerboseLogs"));
                    Verify.IsNotNull(chkGeneralVerboseLogs, "Verifying that chkGeneralVerboseLogs was found");

                    Log.Comment("Retrieving btnClearLogs");
                    Button btnClearLogs = new Button(FindElement.ById("btnClearLogs"));
                    Verify.IsNotNull(btnClearLogs, "Verifying that btnClearLogs was found");

                    Log.Comment("Retrieving logging checkboxes");
                    CheckBox chkLogItemsViewEvents = new CheckBox(FindElement.ById("chkLogItemsViewEvents"));
                    CheckBox chkLogLinedFlowLayoutEvents = new CheckBox(FindElement.ById("chkLogLinedFlowLayoutEvents"));
                    CheckBox chkLogAnnotatedScrollBarEvents = new CheckBox(FindElement.ById("chkLogAnnotatedScrollBarEvents"));
                    CheckBox chkLogItemsRepeaterEvents = new CheckBox(FindElement.ById("chkLogItemsRepeaterEvents"));
                    CheckBox chkLogScrollViewEvents = new CheckBox(FindElement.ById("chkLogScrollViewEvents"));
                    CheckBox chkLogScrollPresenterEvents = new CheckBox(FindElement.ById("chkLogScrollPresenterEvents"));

                    Log.Comment("Retrieving txtYearCount");
                    Edit yearCountTextBox = new Edit(FindElement.ById("txtYearCount"));
                    Verify.IsNotNull(yearCountTextBox, "Verifying that yearCountTextBox was found");

                    Log.Comment("Retrieving txtAverageMonthCount");
                    Edit averageMonthCountTextBox = new Edit(FindElement.ById("txtAverageMonthCount"));
                    Verify.IsNotNull(averageMonthCountTextBox, "Verifying that averageMonthCountTextBox was found");

                    Log.Comment("Retrieving btnSetYearCount");
                    Button btnSetYearCount = new Button(FindElement.ById("btnSetYearCount"));
                    Verify.IsNotNull(btnSetYearCount, "Verifying that btnSetYearCount was found");

                    Log.Comment("Retrieving btnSetAverageMonthCount");
                    Button btnSetAverageMonthCount = new Button(FindElement.ById("btnSetAverageMonthCount"));
                    Verify.IsNotNull(btnSetAverageMonthCount, "Verifying that btnSetAverageMonthCount was found");

                    Log.Comment("Retrieving btnApplyAverageMonthCount");
                    Button btnApplyAverageMonthCount = new Button(FindElement.ById("btnApplyAverageMonthCount"));
                    Verify.IsNotNull(btnApplyAverageMonthCount, "Verifying that btnApplyAverageMonthCount was found");

                    Log.Comment("Retrieving btnGetScrollViewVerticalOffset");
                    Button btnGetScrollViewVerticalOffset = new Button(FindElement.ById("btnGetScrollViewVerticalOffset"));
                    Verify.IsNotNull(btnGetScrollViewVerticalOffset, "Verifying that btnGetScrollViewVerticalOffset was found");

                    Log.Comment("Retrieving txtScrollViewVerticalOffset.");
                    Edit scrollViewVerticalOffsetTextBox = new Edit(FindElement.ById("txtScrollViewVerticalOffset"));
                    Verify.IsNotNull(scrollViewVerticalOffsetTextBox, "Verifying that scrollViewVerticalOffsetTextBox was found");

                    Log.Comment("Retrieving txtStatus");
                    UIObject statusUIObject = FindElement.ById("txtStatus");
                    Verify.IsNotNull(statusUIObject, "Verifying that txtStatus was found");

                    Log.Comment("Retrieving cmbItemTemplate");
                    ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                    Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                    Log.Comment("Retrieving annotatedScrollBar");
                    UIObject annotatedScrollBar = FindElement.ById("annotatedScrollBar");
                    Verify.IsNotNull(annotatedScrollBar, "Verifying that annotatedScrollBar was found");

                    if (ToggleState.Off == chkHandleItemsInfoRequested.ToggleState && handleItemsInfoRequested)
                    {
                        Log.Comment("Toggling chkHandleItemsInfoRequested.IsChecked to ToggleState.On");
                        chkHandleItemsInfoRequested.Toggle();
                        Wait.ForIdle();
                    }
                    else if (ToggleState.On == chkHandleItemsInfoRequested.ToggleState && !handleItemsInfoRequested)
                    {
                        Log.Comment("Toggling chkHandleItemsInfoRequested.IsChecked to ToggleState.Off");
                        chkHandleItemsInfoRequested.Toggle();
                        Wait.ForIdle();
                    }

                    Log.Comment("Changing ItemTemplate selection to 'Extra Large Image with caption'");
                    cmbItemTemplate.SelectItemByName("Extra Large Image with caption");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                    Log.Comment("Setting YearCount to 30.");
                    yearCountTextBox.SetValueAndWait("30");
                    btnSetYearCount.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Setting AverageMonthCount to 6.");
                    averageMonthCountTextBox.SetValueAndWait("6");
                    btnSetAverageMonthCount.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Applying new YearCount & AverageMonthCount.");
                    btnApplyAverageMonthCount.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Toggling logging checkboxes");

                    if (ToggleState.Off == chkGeneralInfoLogs.ToggleState)
                    {
                        Log.Comment("Toggling chkGeneralInfoLogs.IsChecked to ToggleState.On");
                        chkGeneralInfoLogs.Toggle();
                        Wait.ForIdle();
                    }

                    if (ToggleState.On == chkGeneralVerboseLogs.ToggleState)
                    {
                        Log.Comment("Toggling chkGeneralVerboseLogs.IsChecked to ToggleState.Off");
                        chkGeneralVerboseLogs.Toggle();
                        Wait.ForIdle();
                    }

                    if (ToggleState.Off == chkLogItemsViewEvents.ToggleState)
                    {
                        Log.Comment("Toggling chkLogItemsViewEvents.IsChecked to ToggleState.On");
                        chkLogItemsViewEvents.Toggle();
                        Wait.ForIdle();
                    }

                    if (ToggleState.Off == chkLogLinedFlowLayoutEvents.ToggleState)
                    {
                        Log.Comment("Toggling chkLogLinedFlowLayoutEvents.IsChecked to ToggleState.On");
                        chkLogLinedFlowLayoutEvents.Toggle();
                        Wait.ForIdle();
                    }

                    if (ToggleState.Off == chkLogAnnotatedScrollBarEvents.ToggleState)
                    {
                        Log.Comment("Toggling chkLogAnnotatedScrollBarEvents.IsChecked to ToggleState.On");
                        chkLogAnnotatedScrollBarEvents.Toggle();
                        Wait.ForIdle();
                    }

                    if (ToggleState.Off == chkLogItemsRepeaterEvents.ToggleState)
                    {
                        Log.Comment("Toggling chkLogItemsRepeaterEvents.IsChecked to ToggleState.On");
                        chkLogItemsRepeaterEvents.Toggle();
                        Wait.ForIdle();
                    }

                    if (ToggleState.Off == chkLogScrollViewEvents.ToggleState)
                    {
                        Log.Comment("Toggling chkLogScrollViewEvents.IsChecked to ToggleState.On");
                        chkLogScrollViewEvents.Toggle();
                        Wait.ForIdle();
                    }

                    if (ToggleState.Off == chkLogScrollPresenterEvents.ToggleState)
                    {
                        Log.Comment("Toggling chkLogScrollPresenterEvents.IsChecked to ToggleState.On");
                        chkLogScrollPresenterEvents.Toggle();
                        Wait.ForIdle();
                    }

                    Log.Comment("Clearing log list.");
                    btnClearLogs.Invoke();
                    ClearTraces();
                    Wait.ForIdle();

                    Rectangle annotatedScrollBarBounds = annotatedScrollBar.BoundingRectangle;
                    Log.Comment("AnnotatedScrollBar Bounds= X:{0}, Y:{1}, Width:{2}, Height:{3}",
                        annotatedScrollBarBounds.X, annotatedScrollBarBounds.Y, annotatedScrollBarBounds.Width, annotatedScrollBarBounds.Height);

                    Point annotatedScrollBarCenter = new Point(
                        annotatedScrollBarBounds.X + annotatedScrollBarBounds.Width / 2,
                        annotatedScrollBarBounds.Y + annotatedScrollBarBounds.Height / 2);

                    Point annotatedScrollBarOffsetCenter = new Point(
                        annotatedScrollBarCenter.X,
                        annotatedScrollBarCenter.Y + 400);

                    Log.Comment("Dragging touch pointer over AnnotatedScrollBar from its center down 400px");
                    InputHelper.Pan(
                        obj: annotatedScrollBar,
                        start: annotatedScrollBarCenter,
                        end: annotatedScrollBarOffsetCenter,
                        holdDuration: InputHelper.DefaultPanHoldDuration,
                        panAcceleration: 0.0f,
                        dragDuration: 5000,
                        waitForIdle: false);
                    Wait.ForIdle();

                    Log.Comment("Clicking center of btnClearLogs.");
                    btnClearLogs.Click();
                    Wait.ForIdle();

                    LogAndClearTraces();
                    Wait.ForIdle();

                    Log.Comment("Invoking btnGetScrollViewVerticalOffset.");
                    btnGetScrollViewVerticalOffset.Invoke();
                    Wait.ForIdle();

                    double verticalOffset = string.IsNullOrWhiteSpace(scrollViewVerticalOffsetTextBox.Value) ? -1.0 : Convert.ToDouble(scrollViewVerticalOffsetTextBox.Value);
                    Log.Comment("verticalOffset={0}", verticalOffset);
                    Verify.IsGreaterThan(verticalOffset, 100000.0);
                }
            }
        }

void PanAnnotatedScrollBarWithItemsInfo ( ) [inline]

Definition at line 617 of file ItemsViewTestsWithInputHelper.cs.

        {
            PanAnnotatedScrollBar(handleItemsInfoRequested: true);
        }

void PanAnnotatedScrollBarWithoutItemsInfo ( ) [inline]

Definition at line 626 of file ItemsViewTestsWithInputHelper.cs.

        {
            PanAnnotatedScrollBar(handleItemsInfoRequested: false);
        }

void PanItemsView ( ) [inline]

Definition at line 390 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
            {
                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium StackPanel)'");
                cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium StackPanel)");
                Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
                cmbItemsSource.SelectItemByName("List<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetScrollViewButton();

                Log.Comment("Panning ScrollView in diagonal");
                PrepareForScrollViewManipulationStart();

                Log.Comment("Retrieving itemsView");
                UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                Log.Comment("Retrieving PART_ScrollView");
                UIObject scrollViewUIObject = itemsViewUIObject.FirstChild;
                Verify.IsNotNull(scrollViewUIObject, "Verifying that PART_ScrollView was found");

                Log.Comment("Retrieving PART_ScrollPresenter as a UIObject");
                UIObject scrollPresenterUIObject = FindElement.ById("PART_ScrollPresenter");
                Verify.IsNotNull(scrollPresenterUIObject, "Verifying that PART_ScrollView.PART_Root.PART_ScrollPresenter was found");

                Log.Comment("Retrieving PART_ScrollPresenter as a ScrollPresenter");
                ScrollPresenter scrollPresenter = new ScrollPresenter(scrollPresenterUIObject);
                Verify.IsNotNull(scrollPresenter, "Verifying that scrollPresenter was found");

                InputHelper.Pan(
                    scrollPresenter,
                    new Point(scrollPresenter.BoundingRectangle.Left + 25, scrollPresenter.BoundingRectangle.Top + 25),
                    new Point(scrollPresenter.BoundingRectangle.Left - 25, scrollPresenter.BoundingRectangle.Top - 25));

                Log.Comment("Waiting for PART_ScrollView pan completion");
                WaitForScrollViewManipulationEnd("PART_ScrollView");

                Log.Comment("scrollPresenter.HorizontalScrollPercent={0}", scrollPresenter.HorizontalScrollPercent);
                Log.Comment("scrollPresenter.VerticalScrollPercent={0}", scrollPresenter.VerticalScrollPercent);
                Log.Comment("scrollPresenter.VerticalViewSize={0}", scrollPresenter.VerticalViewSize);
                Log.Comment("scrollPresenter.BoundingRectangle.Height={0}", scrollPresenter.BoundingRectangle.Height);

                if (scrollPresenter.HorizontalScrollPercent > 0.0 || scrollPresenter.VerticalScrollPercent <= 1.0)
                {
                    LogAndClearTraces();
                }

                Verify.AreEqual(-1.0, scrollPresenter.HorizontalScrollPercent, "Verifying scrollPresenter HorizontalScrollPercent is -1.");
                Verify.IsLessThan(1.0, scrollPresenter.VerticalScrollPercent, "Verifying scrollPresenter VerticalScrollPercent is greater than 1%");

                double horizontalOffset;
                double verticalOffset;
                double verticalExtent = 100.0 * scrollPresenter.BoundingRectangle.Height / scrollPresenter.VerticalViewSize;
                double minVerticalOffset = verticalExtent / 100.0;
                float zoomFactor;

                GetScrollViewView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);
                Verify.AreEqual(0.0, horizontalOffset, "Verifying horizontalOffset is 0.0");
                Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
                Verify.AreEqual(1.0f, zoomFactor, "Verifying zoomFactor is 1.0f");

                ResetItemsView(cmbItemsSource, cmbLayout: null);

                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
            }
        }

void PrepareForScrollViewManipulationStart ( string stateTextBoxName = "txtScrollViewState" ) [inline, private]

Definition at line 2713 of file ItemsViewTestsWithInputHelper.cs.

        {
            UIObject scrollViewStateUIObject = FindElement.ById(stateTextBoxName);
            Edit scrollViewStateTextBox = new Edit(scrollViewStateUIObject);
            Log.Comment("Pre-manipulation ScrollViewState: " + scrollViewStateTextBox.Value);
            Wait.ForIdle();
        }

void ResetItemsView | ( | ComboBox | cmbItemsSource,
 |  | ComboBox | cmbLayout |
 | ) |  |  | [inline, private]

Definition at line 2612 of file ItemsViewTestsWithInputHelper.cs.

        {
            if (cmbItemsSource == null)
            {
                Log.Comment("Retrieving cmbItemsSource");
                cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
            }

            Verify.IsNotNull(cmbItemsSource);

            Log.Comment("Resetting ItemsSource");
            cmbItemsSource.SelectItemByName("null");
            Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

            Wait.ForIdle();

            if (cmbLayout == null)
            {
                Log.Comment("Retrieving cmbLayout");
                cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
            }

            Verify.IsNotNull(cmbLayout);

            Log.Comment("Resetting Layout");
            cmbLayout.SelectItemByName("null");
            Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

            Wait.ForIdle();
        }

void SetCheckBoxValue | ( | string | checkBoxName,
 |  | bool | checkBoxValue |
 | ) |  |  | [inline, private]

Definition at line 2992 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving " + checkBoxName);
            CheckBox checkBox = new CheckBox(FindElement.ById(checkBoxName));
            if (checkBox == null)
            {
                Log.Warning(checkBoxName + " was not found");
            }
            else if (checkBoxValue && checkBox.ToggleState != ToggleState.On ||
                    !checkBoxValue && checkBox.ToggleState != ToggleState.Off)
            {
                Log.Comment(checkBoxName + " was found. Toggling its IsChecked to " + checkBoxValue);
                checkBox.Toggle();
                Wait.ForIdle();
            }
        }

void SetUpItemsViewForSelectionTests | ( | string | selectionMode,
 |  | bool | provideExtraDesiredAspectRatioItemsInfo = false |
 | ) |  |  | [inline, private]

Definition at line 1976 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("SetUpItemsViewForSelectionTests");

            if (!provideExtraDesiredAspectRatioItemsInfo)
            {
                Log.Comment("Retrieving chkPageMethods");
                CheckBox chkPageMethods = new CheckBox(FindElement.ById("chkPageMethods"));
                Verify.IsNotNull(chkPageMethods, "Verifying that chkPageMethods was found");
                Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);

                Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.On");
                chkPageMethods.Toggle();
                Wait.ForIdle();

                Log.Comment("Retrieving chkProvideExtraDesiredAspectRatioItemsInfo");
                CheckBox chkProvideExtraDesiredAspectRatioItemsInfo = new CheckBox(FindElement.ById("chkProvideExtraDesiredAspectRatioItemsInfo"));
                Verify.IsNotNull(chkProvideExtraDesiredAspectRatioItemsInfo, "Verifying that chkProvideExtraDesiredAspectRatioItemsInfo was found");
                Verify.AreEqual(ToggleState.On, chkProvideExtraDesiredAspectRatioItemsInfo.ToggleState);

                Log.Comment("Toggling chkProvideExtraDesiredAspectRatioItemsInfo.IsChecked to ToggleState.Off");
                chkProvideExtraDesiredAspectRatioItemsInfo.Toggle();
                Wait.ForIdle();
            }

            Log.Comment("Retrieving cmbSelectionMode");
            ComboBox cmbSelectionMode = new ComboBox(FindElement.ById("cmbSelectionMode"));
            Verify.IsNotNull(cmbSelectionMode, "Verifying that cmbSelectionMode was found");

            Log.Comment("Changing cmbSelectionMode selection to " + selectionMode);
            cmbSelectionMode.SelectItemByName(selectionMode);
            Log.Comment("Selection is now {0}", cmbSelectionMode.Selection[0].Name);

            Log.Comment("Retrieving cmbLayout");
            ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
            Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

            Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
            cmbLayout.SelectItemByName("LinedFlowLayout");
            Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

            Log.Comment("Retrieving cmbItemTemplate");
            ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
            Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

            Log.Comment("Changing cmbItemTemplate selection to 'Lightweight Square ItemContainer (Rectangle + TextBlock)'");
            cmbItemTemplate.SelectItemByName("Lightweight Square ItemContainer (Rectangle + TextBlock)");
            Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

            Log.Comment("Retrieving cmbItemsSource");
            ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
            Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

            Log.Comment("Changing cmbItemsSource selection to 'List<Entity>'");
            cmbItemsSource.SelectItemByName("List<Entity>");
            Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
        }

void ShiftTabIntoItemsViewWithoutCurrentItem ( ) [inline]

Definition at line 608 of file ItemsViewTestsWithInputHelper.cs.

        {
            TabIntoItemsViewWithoutCurrentItem(useShiftTab: true);
        }

void StartBringItemIntoView ( ) [inline]

Definition at line 635 of file ItemsViewTestsWithInputHelper.cs.

        {
            StartBringItemIntoView(false /*clearItemAspectRatios*/);
            StartBringItemIntoView(true /*clearItemAspectRatios*/);
        }

void StartBringItemIntoView ( bool clearItemAspectRatios ) [inline, private]

Definition at line 1361 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView summary page");

            ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };

            using (var setup = new ItemsViewTestSetupHelper(
                testNames: new[] { "ItemsView Tests", "navigateToSummary" },
                options: null,
                shouldRestrictInnerFrameSize: false,
                outputDebugStringLevel: "Verbose",
                outputDebugStringComponentTypes: outputDebugStringComponentTypes))
            {
                using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
                {
                    Log.Comment("Disabling fast path.");

                    Log.Comment("Retrieving chkPageMethods");
                    CheckBox chkPageMethods = new CheckBox(FindElement.ById("chkPageMethods"));
                    Verify.IsNotNull(chkPageMethods, "Verifying that chkPageMethods was found");
                    Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);

                    Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.On");
                    chkPageMethods.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, chkPageMethods.ToggleState);

                    Log.Comment("Retrieving chkProvideExtraDesiredAspectRatioItemsInfo");
                    CheckBox chkProvideExtraDesiredAspectRatioItemsInfo = new CheckBox(FindElement.ById("chkProvideExtraDesiredAspectRatioItemsInfo"));
                    Verify.IsNotNull(chkProvideExtraDesiredAspectRatioItemsInfo, "Verifying that chkProvideExtraDesiredAspectRatioItemsInfo was found");
                    Verify.AreEqual(ToggleState.On, chkProvideExtraDesiredAspectRatioItemsInfo.ToggleState);

                    Log.Comment("Toggling chkProvideExtraDesiredAspectRatioItemsInfo.IsChecked to ToggleState.Off");
                    chkProvideExtraDesiredAspectRatioItemsInfo.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, chkProvideExtraDesiredAspectRatioItemsInfo.ToggleState);

                    Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.Off");
                    chkPageMethods.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);

                    Log.Comment("Setting up ItemsView.");

                    Log.Comment("Retrieving cmbLayout");
                    ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
                    Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

                    Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
                    cmbLayout.SelectItemByName("LinedFlowLayout");
                    Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemTemplate");
                    ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                    Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                    Log.Comment("Changing cmbItemTemplate selection to 'Fixed-Height ItemContainer (Image + TextBlock)'");
                    cmbItemTemplate.SelectItemByName("Fixed-Height ItemContainer (Image + TextBlock)");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemsSource");
                    ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                    Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                    Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
                    cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
                    Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                    Log.Comment("Setting up ItemsView.StartBringItemIntoView parameters.");

                    Log.Comment("Retrieving & filling txtItemsViewMethodIndex");
                    Edit itemsViewMethodIndexTextBox = new Edit(FindElement.ById("txtItemsViewMethodIndex"));
                    Verify.IsNotNull(itemsViewMethodIndexTextBox, "Verifying that itemsViewMethodIndexTextBox was found");

                    itemsViewMethodIndexTextBox.SetValueAndWait("222");
                    Wait.ForIdle();

                    Log.Comment("Retrieving & filling txtBringIntoViewOptionsVerticalAlignmentRatio");
                    Edit bringIntoViewOptionsVerticalAlignmentRatioTextBox = new Edit(FindElement.ById("txtBringIntoViewOptionsVerticalAlignmentRatio"));
                    Verify.IsNotNull(bringIntoViewOptionsVerticalAlignmentRatioTextBox, "Verifying that bringIntoViewOptionsVerticalAlignmentRatioTextBox was found");

                    bringIntoViewOptionsVerticalAlignmentRatioTextBox.SetValueAndWait("0");
                    Wait.ForIdle();

                    Button btnLinedFlowLayoutClearItemAspectRatios = null;

                    if (clearItemAspectRatios)
                    {
                        Log.Comment("Retrieving btnLinedFlowLayoutClearItemAspectRatios");
                        btnLinedFlowLayoutClearItemAspectRatios = new Button(FindElement.ById("btnLinedFlowLayoutClearItemAspectRatios"));
                        Verify.IsNotNull(btnLinedFlowLayoutClearItemAspectRatios, "Verifying that btnLinedFlowLayoutClearItemAspectRatios was found");

                        Log.Comment("Invoking btnLinedFlowLayoutClearItemAspectRatios");
                        btnLinedFlowLayoutClearItemAspectRatios.Invoke();
                        Wait.ForIdle();
                    }

                    Log.Comment("Retrieving btnItemsViewStartBringItemIntoView");
                    Button btnItemsViewStartBringItemIntoView = new Button(FindElement.ById("btnItemsViewStartBringItemIntoView"));
                    Verify.IsNotNull(btnItemsViewStartBringItemIntoView, "Verifying that btnItemsViewStartBringItemIntoView was found");

                    Log.Comment("Invoking btnItemsViewStartBringItemIntoView");
                    btnItemsViewStartBringItemIntoView.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnGetVerticalOffset");
                    Button btnGetVerticalOffset = new Button(FindElement.ById("btnGetVerticalOffset"));
                    Verify.IsNotNull(btnGetVerticalOffset, "Verifying that btnGetVerticalOffset was found");

                    Log.Comment("Invoking btnGetVerticalOffset");
                    btnGetVerticalOffset.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Retrieving & reading txtVerticalOffset");
                    Edit verticalOffsetTextBox = new Edit(FindElement.ById("txtVerticalOffset"));
                    Verify.IsNotNull(verticalOffsetTextBox, "Verifying that verticalOffsetTextBox was found");
                    Wait.ForIdle();

                    Log.Comment($"ScrollView.VerticalOffset={verticalOffsetTextBox.Value}");

                    Log.Comment("Retrieving & filling txtLinedFlowLayoutMethodIndex");
                    Edit linedFlowLayoutMethodIndexTextBox = new Edit(FindElement.ById("txtLinedFlowLayoutMethodIndex"));
                    Verify.IsNotNull(linedFlowLayoutMethodIndexTextBox, "Verifying that linedFlowLayoutMethodIndexTextBox was found");

                    linedFlowLayoutMethodIndexTextBox.SetValueAndWait("222");
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnLinedFlowLayoutGetLineIndex");
                    Button btnLinedFlowLayoutGetLineIndex = new Button(FindElement.ById("btnLinedFlowLayoutGetLineIndex"));
                    Verify.IsNotNull(btnLinedFlowLayoutGetLineIndex, "Verifying that btnLinedFlowLayoutGetLineIndex was found");

                    Log.Comment("Invoking btnLinedFlowLayoutGetLineIndex");
                    btnLinedFlowLayoutGetLineIndex.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Retrieving & reading txtLinedFlowLayoutLineIndex");
                    Edit linedFlowLayoutLineIndexTextBox = new Edit(FindElement.ById("txtLinedFlowLayoutLineIndex"));
                    Verify.IsNotNull(linedFlowLayoutLineIndexTextBox, "Verifying that linedFlowLayoutLineIndexTextBox was found");
                    Wait.ForIdle();

                    Log.Comment($"LinedFlowLayout's GetLineIndex(222)={linedFlowLayoutLineIndexTextBox.Value}");
                    Verify.IsLessThan(Math.Abs(double.Parse(linedFlowLayoutLineIndexTextBox.Value) * 96.0 - double.Parse(verticalOffsetTextBox.Value)), 0.01, "Verifying vertical offset is line index x LineHeight");

                    Log.Comment("Retrieving & filling txtTryGetItemIndexHorizontalViewportRatio");
                    Edit tryGetItemIndexHorizontalViewportRatioTextBox = new Edit(FindElement.ById("txtTryGetItemIndexHorizontalViewportRatio"));
                    Verify.IsNotNull(tryGetItemIndexHorizontalViewportRatioTextBox, "Verifying that tryGetItemIndexHorizontalViewportRatioTextBox was found");

                    tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("0.0");
                    Wait.ForIdle();

                    Log.Comment("Retrieving & filling txtTryGetItemIndexVerticalViewportRatio");
                    Edit tryGetItemIndexVerticalViewportRatioTextBox = new Edit(FindElement.ById("txtTryGetItemIndexVerticalViewportRatio"));
                    Verify.IsNotNull(tryGetItemIndexVerticalViewportRatioTextBox, "Verifying that tryGetItemIndexVerticalViewportRatioTextBox was found");

                    tryGetItemIndexVerticalViewportRatioTextBox.SetValueAndWait("0.0");
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnItemsViewTryGetItemIndex");
                    Button btnItemsViewTryGetItemIndex = new Button(FindElement.ById("btnItemsViewTryGetItemIndex"));
                    Verify.IsNotNull(btnItemsViewTryGetItemIndex, "Verifying that btnItemsViewTryGetItemIndex was found");

                    Log.Comment("Invoking btnItemsViewTryGetItemIndex");
                    btnItemsViewTryGetItemIndex.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Retrieving & reading txtItemsViewTryGetItemIndex");
                    Edit itemsViewTryGetItemIndexTextBox = new Edit(FindElement.ById("txtItemsViewTryGetItemIndex"));
                    Verify.IsNotNull(itemsViewTryGetItemIndexTextBox, "Verifying that itemsViewTryGetItemIndexTextBox was found");
                    Wait.ForIdle();

                    Log.Comment($"ItemsView.TryGetItemIndex(0.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
                    Verify.IsGreaterThanOrEqual(222, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is greater than or equal to first displayed item index on top line");

                    Log.Comment("Filling txtTryGetItemIndexHorizontalViewportRatio");
                    tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("1.0");
                    Wait.ForIdle();

                    Log.Comment("Invoking btnItemsViewTryGetItemIndex");
                    btnItemsViewTryGetItemIndex.Invoke();
                    Wait.ForIdle();

                    Log.Comment($"ItemsView.TryGetItemIndex(1.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
                    Verify.IsLessThanOrEqual(222, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is less than or equal to last displayed item index on top line");

                    Log.Comment("Filling txtItemsViewMethodIndex");
                    itemsViewMethodIndexTextBox.SetValueAndWait("22");
                    Wait.ForIdle();

                    if (clearItemAspectRatios)
                    {
                        Log.Comment("Invoking btnLinedFlowLayoutClearItemAspectRatios");
                        btnLinedFlowLayoutClearItemAspectRatios.Invoke();
                        Wait.ForIdle();
                    }

                    Log.Comment("Invoking btnItemsViewStartBringItemIntoView");
                    btnItemsViewStartBringItemIntoView.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Invoking btnGetVerticalOffset");
                    btnGetVerticalOffset.Invoke();
                    Wait.ForIdle();

                    Log.Comment($"ScrollView.VerticalOffset={verticalOffsetTextBox.Value}");

                    Log.Comment("Filling txtLinedFlowLayoutMethodIndex");
                    linedFlowLayoutMethodIndexTextBox.SetValueAndWait("22");
                    Wait.ForIdle();

                    Log.Comment("Invoking btnLinedFlowLayoutGetLineIndex");
                    btnLinedFlowLayoutGetLineIndex.Invoke();
                    Wait.ForIdle();

                    Log.Comment($"LinedFlowLayout's GetLineIndex(22)={linedFlowLayoutLineIndexTextBox.Value}");
                    Verify.IsLessThan(Math.Abs(double.Parse(linedFlowLayoutLineIndexTextBox.Value) * 96.0 - double.Parse(verticalOffsetTextBox.Value)), 0.01, "Verifying vertical offset is line index x LineHeight");

                    Log.Comment("Filling txtTryGetItemIndexHorizontalViewportRatio");
                    tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("0.0");
                    Wait.ForIdle();

                    Log.Comment("Invoking btnItemsViewTryGetItemIndex");
                    btnItemsViewTryGetItemIndex.Invoke();
                    Wait.ForIdle();

                    Log.Comment($"ItemsView.TryGetItemIndex(0.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
                    Verify.IsGreaterThanOrEqual(22, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is greater than or equal to first displayed item index on top line");

                    Log.Comment("Filling txtTryGetItemIndexHorizontalViewportRatio");
                    tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("1.0");
                    Wait.ForIdle();

                    Log.Comment("Invoking btnItemsViewTryGetItemIndex");
                    btnItemsViewTryGetItemIndex.Invoke();
                    Wait.ForIdle();

                    Log.Comment($"ItemsView.TryGetItemIndex(1.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
                    Verify.IsLessThanOrEqual(22, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is less than or equal to last displayed item index on top line");

                    Log.Comment("Retrieving btnClearLogs");
                    Button btnClearLogs = new Button(FindElement.ById("btnClearLogs"));
                    Verify.IsNotNull(btnClearLogs, "Verifying that btnClearLogs was found");

                    Log.Comment("Invoking btnClearLogs.");
                    btnClearLogs.Invoke();
                    Wait.ForIdle();

                    LogAndClearTraces();
                    Wait.ForIdle();

                    ResetItemsView(cmbItemsSource, cmbLayout);
                }
            }
        }

void TabIntoItemsViewWithoutCurrentItem ( bool useShiftTab ) [inline, private]

Definition at line 1846 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
            {
                Log.Comment("Retrieving btnBefore");
                Button btnBefore = new Button(FindElement.ById("btnBefore"));
                Verify.IsNotNull(btnBefore, "Verifying that btnBefore was found");

                Log.Comment("Retrieving btnAfter");
                Button btnAfter = new Button(FindElement.ById("btnAfter"));
                Verify.IsNotNull(btnAfter, "Verifying that btnAfter was found");

                Log.Comment("Retrieving cmbLayout");
                ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
                Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Retrieving txtScrollViewHorizontalOffset");
                Edit scrollViewHorizontalOffsetTextBox = new Edit(FindElement.ById("txtScrollViewHorizontalOffset"));
                Verify.IsNotNull(scrollViewHorizontalOffsetTextBox, "Verifying that scrollViewHorizontalOffsetTextBox was found");

                Log.Comment("Retrieving txtScrollViewVerticalOffset");
                Edit scrollViewVerticalOffsetTextBox = new Edit(FindElement.ById("txtScrollViewVerticalOffset"));
                Verify.IsNotNull(scrollViewVerticalOffsetTextBox, "Verifying that scrollViewVerticalOffsetTextBox was found");

                Log.Comment("Retrieving txtScrollViewZoomFactor");
                Edit scrollViewZoomFactorTextBox = new Edit(FindElement.ById("txtScrollViewZoomFactor"));
                Verify.IsNotNull(scrollViewZoomFactorTextBox, "Verifying that scrollViewZoomFactorTextBox was found");

                Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
                cmbLayout.SelectItemByName("LinedFlowLayout");
                Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
                cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
                Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
                cmbItemsSource.SelectItemByName("List<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                Log.Comment("Changing txtScrollViewHorizontalOffset text to '0'");
                scrollViewHorizontalOffsetTextBox.SetValueAndWait("0");

                Log.Comment("Changing txtScrollViewVerticalOffset text to '250'");
                scrollViewVerticalOffsetTextBox.SetValueAndWait("250");

                InvokeScrollViewScrollToButton();

                Log.Comment("Changing txtScrollViewZoomFactor text to '2'");
                scrollViewZoomFactorTextBox.SetValueAndWait("2");

                InvokeScrollViewZoomToButton();

                Log.Comment("Retrieving itemsView");
                UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                Log.Comment("Retrieving PART_ScrollView");
                UIObject scrollViewUIObject = itemsViewUIObject.FirstChild;
                Verify.IsNotNull(scrollViewUIObject, "Verifying that PART_ScrollView was found");

                Log.Comment("Retrieving PART_ScrollPresenter as a UIObject");
                UIObject scrollPresenterUIObject = FindElement.ById("PART_ScrollPresenter");
                Verify.IsNotNull(scrollPresenterUIObject, "Verifying that PART_ScrollView.PART_Root.PART_ScrollPresenter was found");

                Log.Comment("Retrieving PART_ScrollPresenter as a ScrollPresenter");
                ScrollPresenter scrollPresenter = new ScrollPresenter(scrollPresenterUIObject);
                Verify.IsNotNull(scrollPresenter, "Verifying that scrollPresenter was found");

                Log.Comment("scrollPresenter.HorizontalScrollPercent={0}", scrollPresenter.HorizontalScrollPercent);
                Log.Comment("scrollPresenter.VerticalScrollPercent={0}", scrollPresenter.VerticalScrollPercent);
                Log.Comment("scrollPresenter.VerticalViewSize={0}", scrollPresenter.VerticalViewSize);

                double horizontalOffset;
                double verticalOffset;
                float zoomFactor;

                GetScrollViewView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                if (useShiftTab)
                {
                    Log.Comment("Clicking on ButtonAfter.");
                    btnAfter.Click(PointerButtons.Primary);
                    Wait.ForIdle();

                    Log.Comment("Pressing Shift-Tab keys");
                    KeyboardHelper.PressKey(btnAfter, Key.Tab, modifierKey: ModifierKey.Shift, numPresses: 1, useDebugMode: true);
                    Wait.ForIdle();

                    int currentItemIndex = GetCurrentItemIndex();

                    Verify.AreEqual(21, currentItemIndex, "Verifying CurrentItemIndex is 21");
                }
                else
                {
                    Log.Comment("Clicking on ButtonBefore.");
                    btnBefore.Click(PointerButtons.Primary);
                    Wait.ForIdle();

                    Log.Comment("Pressing Tab key");
                    KeyboardHelper.PressKey(btnBefore, Key.Tab, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                    Wait.ForIdle();

                    int currentItemIndex = GetCurrentItemIndex();

                    Verify.AreEqual(15, currentItemIndex, "Verifying CurrentItemIndex is 15");
                }

                ResetItemsView(cmbItemsSource, cmbLayout);

                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
            }
        }

void TabIntoItemsViewWithoutCurrentItem ( ) [inline]

Definition at line 600 of file ItemsViewTestsWithInputHelper.cs.

        {
            TabIntoItemsViewWithoutCurrentItem(useShiftTab: false);
        }

void TabNavigationThroughItemsView | ( | bool | useItemContainer,
 |  | string | selectionMode |
 | ) |  |  | [inline, private]

Definition at line 2466 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
            {
                Log.Comment("Retrieving cmbSelectionMode");
                ComboBox cmbSelectionMode = new ComboBox(FindElement.ById("cmbSelectionMode"));
                Verify.IsNotNull(cmbSelectionMode, "Verifying that cmbSelectionMode was found");

                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Retrieving cmbLayout");
                ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
                Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

                Log.Comment("Retrieving btnBefore");
                Button btnBefore = new Button(FindElement.ById("btnBefore"));
                Verify.IsNotNull(btnBefore, "Verifying that btnBefore was found");

                Log.Comment("Retrieving btnAfter");
                Button btnAfter = new Button(FindElement.ById("btnAfter"));
                Verify.IsNotNull(btnAfter, "Verifying that btnAfter was found");

                Log.Comment("Changing SelectionMode selection to " + selectionMode);
                cmbSelectionMode.SelectItemByName(selectionMode);
                Log.Comment("Selection is now {0}", cmbSelectionMode.Selection[0].Name);

                Log.Comment("Changing Layout selection to 'UniformGridLayout'");
                cmbLayout.SelectItemByName("UniformGridLayout");
                Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                if (useItemContainer)
                {
                    Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
                    cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
                }
                else
                {
                    Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Small ContentControl)'");
                    cmbItemTemplate.SelectItemByName("Entity DataTemplate (Small ContentControl)");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
                }

                Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
                cmbItemsSource.SelectItemByName("List<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                Log.Comment("Retrieving itemsView");
                UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                Log.Comment("Clicking on ButtonBefore.");
                btnBefore.Click(PointerButtons.Primary);
                Wait.ForIdle();

                Log.Comment("Pressing Tab key");
                KeyboardHelper.PressKey(btnBefore, Key.Tab, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                Wait.ForIdle();

                int currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                Log.Comment("Pressing Right key");
                KeyboardHelper.PressKey(itemsViewUIObject, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                Wait.ForIdle();
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is 1");

                Log.Comment("Pressing Tab key");
                KeyboardHelper.PressKey(itemsViewUIObject, Key.Tab, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                Wait.ForIdle();

                Verify.IsTrue(btnAfter.HasKeyboardFocus, "Verifying AfterButton has keyboard focus");
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is still 1");

                Log.Comment("Pressing Shift-Tab key");
                KeyboardHelper.PressKey(btnAfter, Key.Tab, modifierKey: ModifierKey.Shift, numPresses: 1, useDebugMode: true);
                Wait.ForIdle();

                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is still 1");

                Log.Comment("Pressing Shift-Tab key");
                KeyboardHelper.PressKey(itemsViewUIObject, Key.Tab, modifierKey: ModifierKey.Shift, numPresses: 1, useDebugMode: true);
                Wait.ForIdle();

                Verify.IsTrue(btnBefore.HasKeyboardFocus, "Verifying BeforeButton has keyboard focus");
                currentItemIndex = GetCurrentItemIndex();
                Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is still 1");

                ResetItemsView(cmbItemsSource, cmbLayout);

                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
            }
        }

void TabNavigationThroughItemsViewWithContentControlsAndSingleSelectionMode ( ) [inline]

Definition at line 592 of file ItemsViewTestsWithInputHelper.cs.

        {
            TabNavigationThroughItemsView(useItemContainer: false, selectionMode: "Single");
        }

void TabNavigationThroughItemsViewWithItemContainersAndMultipleSelectionMode ( ) [inline]

Definition at line 583 of file ItemsViewTestsWithInputHelper.cs.

        {
            TabNavigationThroughItemsView(useItemContainer: true, selectionMode: "Multiple");
        }

void TabNavigationThroughItemsViewWithItemContainersAndSingleSelectionMode ( ) [inline]

Definition at line 575 of file ItemsViewTestsWithInputHelper.cs.

        {
            TabNavigationThroughItemsView(useItemContainer: true, selectionMode: "Single");
        }

void TapResetScrollViewButton ( ) [inline, private]

Definition at line 2597 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving btnResetScrollView");
            UIObject resetScrollViewUIObject = FindElement.ById("btnResetScrollView");
            Verify.IsNotNull(resetScrollViewUIObject, "Verifying that btnResetScrollView Button was found");

            Button resetScrollViewButton = new Button(resetScrollViewUIObject);
            InputHelper.Tap(resetScrollViewButton);
            if (!WaitForEditValue("txtStatus" /*editName*/, "ScrollView reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/))
            {
                InputHelper.Tap(resetScrollViewButton);
                WaitForEditValue("txtStatus" /*editName*/, "ScrollView reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 37 of file ItemsViewTestsWithInputHelper.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void UpdateTraces ( ) [inline, private]

Definition at line 2951 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Updating full log:");
            LogEditValue("txtStatus");

            TextInput.SendText("g");
            WaitForBoxChecked("chkLogUpdated");
        }

void UseLinedFlowLayoutWithoutLineHeight ( ) [inline]

Definition at line 1198 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView summary page");

            ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };

            using (var setup = new ItemsViewTestSetupHelper(
                testNames: new[] { "ItemsView Tests", "navigateToSummary" },
                options: null,
                shouldRestrictInnerFrameSize: false,
                outputDebugStringLevel: "Info",
                outputDebugStringComponentTypes: outputDebugStringComponentTypes))
            {
                using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
                {
                    Log.Comment("Setting up ItemsView.");

                    Log.Comment("Retrieving cmbLayout");
                    UIObject cmbLayoutUIObject = FindElement.ById("cmbLayout");
                    Verify.IsNotNull(cmbLayoutUIObject, "Verifying that cmbLayout was found");
                    ComboBox cmbLayout = new ComboBox(cmbLayoutUIObject);

                    Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
                    cmbLayout.SelectItemByName("LinedFlowLayout");
                    Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemTemplate");
                    UIObject cmbItemTemplateUIObject = FindElement.ById("cmbItemTemplate");
                    Verify.IsNotNull(cmbItemTemplateUIObject, "Verifying that cmbItemTemplate was found");
                    ComboBox cmbItemTemplate = new ComboBox(cmbItemTemplateUIObject);

                    Log.Comment("Changing cmbItemTemplate selection to 'ItemContainer without MinWidth (Image)'");
                    cmbItemTemplate.SelectItemByName("ItemContainer without MinWidth (Image)");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemsSource");
                    UIObject cmbItemsSourceUIObject = FindElement.ById("cmbItemsSource");
                    Verify.IsNotNull(cmbItemsSourceUIObject, "Verifying that cmbItemsSource was found");
                    ComboBox cmbItemsSource = new ComboBox(cmbItemsSourceUIObject);

                    Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
                    cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
                    Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
                    Wait.ForIdle();

                    Log.Comment("Retrieving txtExtentWidth");
                    UIObject txtExtentWidthUIObject = FindElement.ById("txtExtentWidth");
                    Verify.IsNotNull(txtExtentWidthUIObject, "Verifying that txtExtentWidth was found");
                    Edit txtExtentWidth = new Edit(txtExtentWidthUIObject);

                    Log.Comment("Retrieving txtExtentHeight");
                    UIObject txtExtentHeightUIObject = FindElement.ById("txtExtentHeight");
                    Verify.IsNotNull(txtExtentHeightUIObject, "Verifying that txtExtentHeight was found");
                    Edit txtExtentHeight = new Edit(txtExtentHeightUIObject);

                    Log.Comment("Retrieving btnGetExtentHeight");
                    UIObject btnGetExtentHeightUIObject = FindElement.ById("btnGetExtentHeight");
                    Verify.IsNotNull(btnGetExtentHeightUIObject, "Verifying that btnGetExtentHeight was found");
                    Button btnGetExtentHeight = new Button(btnGetExtentHeightUIObject);

                    Log.Comment("Retrieving btnGetExtentWidth");
                    UIObject btnGetExtentWidthUIObject = FindElement.ById("btnGetExtentWidth");
                    Verify.IsNotNull(btnGetExtentWidthUIObject, "Verifying that btnGetExtentWidth was found");
                    Button btnGetExtentWidth = new Button(btnGetExtentWidthUIObject);

                    Log.Comment("Invoking btnGetExtentWidth");
                    btnGetExtentWidth.InvokeAndWait();

                    Log.Comment("Invoking btnGetExtentHeight");
                    btnGetExtentHeight.InvokeAndWait();

                    Log.Comment($"ScrollView.ExtentWidth={txtExtentWidth.Value}");
                    Log.Comment($"ScrollView.ExtentHeight={txtExtentHeight.Value}");

                    double extentWidth = double.Parse(txtExtentWidth.Value);
                    double extentHeight = double.Parse(txtExtentHeight.Value);

                    Verify.AreEqual(extentWidth, 500.0);
                    Verify.IsGreaterThan(extentHeight, 50000.0);

                    ResetItemsView(cmbItemsSource, cmbLayout);
                }
            }
        }

void UseLinedFlowLayoutWithoutMinWidth ( ) [inline]

Definition at line 1029 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView summary page");

            ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };

            using (var setup = new ItemsViewTestSetupHelper(
                testNames: new[] { "ItemsView Tests", "navigateToSummary" },
                options: null,
                shouldRestrictInnerFrameSize: false,
                outputDebugStringLevel: "Verbose",
                outputDebugStringComponentTypes: outputDebugStringComponentTypes))
            {
                using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
                {
                    Log.Comment("Disabling ItemsInfoRequested event handler.");

                    Log.Comment("Retrieving chkPageMethods");
                    UIObject chkPageMethodsUIObject = FindElement.ById("chkPageMethods");
                    Verify.IsNotNull(chkPageMethodsUIObject, "Verifying that chkPageMethods was found");
                    CheckBox chkPageMethods = new CheckBox(chkPageMethodsUIObject);
                    Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);

                    Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.On");
                    chkPageMethods.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, chkPageMethods.ToggleState);

                    Log.Comment("Retrieving chkProvideDesiredAspectRatioItemsInfo");
                    UIObject chkProvideDesiredAspectRatioItemsInfoUIObject = FindElement.ById("chkProvideDesiredAspectRatioItemsInfo");
                    Verify.IsNotNull(chkProvideDesiredAspectRatioItemsInfoUIObject, "Verifying that chkProvideDesiredAspectRatioItemsInfo was found");
                    CheckBox chkProvideDesiredAspectRatioItemsInfo = new CheckBox(chkProvideDesiredAspectRatioItemsInfoUIObject);
                    if (ToggleState.On == chkProvideDesiredAspectRatioItemsInfo.ToggleState)
                    {
                        Log.Comment("Toggling chkProvideDesiredAspectRatioItemsInfo.IsChecked to ToggleState.Off");
                        chkProvideDesiredAspectRatioItemsInfo.Toggle();
                        Wait.ForIdle();
                    }
                    Verify.AreEqual(ToggleState.Off, chkProvideDesiredAspectRatioItemsInfo.ToggleState);

                    Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.Off");
                    chkPageMethods.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);

                    Log.Comment("Setting up LinedFlowLayout.");

                    Log.Comment("Retrieving & filling txtLinedFlowLayoutLineHeight");
                    UIObject linedFlowLayoutLineHeightTextBoxUIObject = FindElement.ById("txtLinedFlowLayoutLineHeight");
                    Verify.IsNotNull(linedFlowLayoutLineHeightTextBoxUIObject, "Verifying that linedFlowLayoutLineHeightTextBox was found");
                    Edit linedFlowLayoutLineHeightTextBox = new Edit(linedFlowLayoutLineHeightTextBoxUIObject);

                    linedFlowLayoutLineHeightTextBox.SetValueAndWait("196");
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnSetLinedFlowLayoutLineHeight");
                    UIObject btnSetLinedFlowLayoutLineHeightUIObject = FindElement.ById("btnSetLinedFlowLayoutLineHeight");
                    Verify.IsNotNull(btnSetLinedFlowLayoutLineHeightUIObject, "Verifying that btnSetLinedFlowLayoutLineHeight was found");
                    Button btnSetLinedFlowLayoutLineHeight = new Button(btnSetLinedFlowLayoutLineHeightUIObject);

                    Log.Comment("Invoking btnSetLinedFlowLayoutLineHeight");
                    btnSetLinedFlowLayoutLineHeight.InvokeAndWait();

                    Log.Comment("Retrieving & filling txtLinedFlowLayoutLineSpacing");
                    UIObject txtLinedFlowLayoutLineSpacingUIObject = FindElement.ById("txtLinedFlowLayoutLineSpacing");
                    Verify.IsNotNull(txtLinedFlowLayoutLineSpacingUIObject, "Verifying that txtLinedFlowLayoutLineSpacing was found");
                    Edit txtLinedFlowLayoutLineSpacing = new Edit(txtLinedFlowLayoutLineSpacingUIObject);

                    txtLinedFlowLayoutLineSpacing.SetValueAndWait("4");
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnSetLinedFlowLayoutLineSpacing");
                    UIObject btnSetLinedFlowLayoutLineSpacingUIObject = FindElement.ById("btnSetLinedFlowLayoutLineSpacing");
                    Verify.IsNotNull(btnSetLinedFlowLayoutLineSpacingUIObject, "Verifying that btnSetLinedFlowLayoutLineSpacing was found");
                    Button btnSetLinedFlowLayoutLineSpacing = new Button(btnSetLinedFlowLayoutLineSpacingUIObject);

                    Log.Comment("Invoking btnSetLinedFlowLayoutLineSpacing");
                    btnSetLinedFlowLayoutLineSpacing.InvokeAndWait();

                    Log.Comment("Retrieving & filling txtLinedFlowLayoutMinItemSpacing");
                    UIObject txtLinedFlowLayoutMinItemSpacingUIObject = FindElement.ById("txtLinedFlowLayoutMinItemSpacing");
                    Verify.IsNotNull(txtLinedFlowLayoutMinItemSpacingUIObject, "Verifying that txtLinedFlowLayoutMinItemSpacing was found");
                    Edit txtLinedFlowLayoutMinItemSpacing = new Edit(txtLinedFlowLayoutMinItemSpacingUIObject);

                    txtLinedFlowLayoutMinItemSpacing.SetValueAndWait("4");
                    Wait.ForIdle();

                    Log.Comment("Retrieving btnSetLinedFlowLayoutMinItemSpacing");
                    UIObject btnSetLinedFlowLayoutMinItemSpacingUIObject = FindElement.ById("btnSetLinedFlowLayoutMinItemSpacing");
                    Verify.IsNotNull(btnSetLinedFlowLayoutMinItemSpacingUIObject, "Verifying that btnSetLinedFlowLayoutMinItemSpacing was found");
                    Button btnSetLinedFlowLayoutMinItemSpacing = new Button(btnSetLinedFlowLayoutMinItemSpacingUIObject);

                    Log.Comment("Invoking btnSetLinedFlowLayoutMinItemSpacing");
                    btnSetLinedFlowLayoutMinItemSpacing.InvokeAndWait();

                    Log.Comment("Retrieving cmbLinedFlowLayoutItemsStretch");
                    UIObject cmbLinedFlowLayoutItemsStretchUIObject = FindElement.ById("cmbLinedFlowLayoutItemsStretch");
                    Verify.IsNotNull(cmbLinedFlowLayoutItemsStretchUIObject, "Verifying that cmbLinedFlowLayoutItemsStretch was found");
                    ComboBox cmbLinedFlowLayoutItemsStretch = new ComboBox(cmbLinedFlowLayoutItemsStretchUIObject);

                    Log.Comment("Changing cmbLinedFlowLayoutItemsStretch selection to 'Fill'");
                    cmbLinedFlowLayoutItemsStretch.SelectItemByName("Fill");
                    Log.Comment("Selection is now {0}", cmbLinedFlowLayoutItemsStretch.Selection[0].Name);

                    Log.Comment("Setting up ItemsView.");

                    Log.Comment("Retrieving cmbLayout");
                    UIObject cmbLayoutUIObject = FindElement.ById("cmbLayout");
                    Verify.IsNotNull(cmbLayoutUIObject, "Verifying that cmbLayout was found");
                    ComboBox cmbLayout = new ComboBox(cmbLayoutUIObject);

                    Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
                    cmbLayout.SelectItemByName("LinedFlowLayout");
                    Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemTemplate");
                    UIObject cmbItemTemplateUIObject = FindElement.ById("cmbItemTemplate");
                    Verify.IsNotNull(cmbItemTemplateUIObject, "Verifying that cmbItemTemplate was found");
                    ComboBox cmbItemTemplate = new ComboBox(cmbItemTemplateUIObject);

                    Log.Comment("Changing cmbItemTemplate selection to 'ItemContainer without MinWidth (Image)'");
                    cmbItemTemplate.SelectItemByName("ItemContainer without MinWidth (Image)");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);

                    Log.Comment("Retrieving cmbItemsSource");
                    UIObject cmbItemsSourceUIObject = FindElement.ById("cmbItemsSource");
                    Verify.IsNotNull(cmbItemsSourceUIObject, "Verifying that cmbItemsSource was found");
                    ComboBox cmbItemsSource = new ComboBox(cmbItemsSourceUIObject);

                    Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
                    cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
                    Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
                    Wait.ForIdle();

                    Log.Comment("Retrieving markupItemsView");
                    UIObject itemsViewUIObject = FindElement.ById("markupItemsView");
                    Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                    int currentItemIndex = GetCurrentItemIndex();
                    Verify.AreEqual(-1, currentItemIndex, "Verifying CurrentItemIndex is initially -1");

                    Log.Comment("Clicking on ItemsView to select first item.");
                    itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
                    Wait.ForIdle();

                    LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: null, getScrollViewView: false);
                    currentItemIndex = GetCurrentItemIndex();
                    Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");

                    Log.Comment("Clicking on ItemsView to focus item again.");
                    itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
                    Wait.ForIdle();

                    Log.Comment("Pressing End key");
                    KeyboardHelper.PressKey(Key.End);
                    Wait.ForIdle();

                    LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: null, getScrollViewView: false);
                    currentItemIndex = GetCurrentItemIndex();
                    Verify.AreEqual(299, currentItemIndex, "Verifying CurrentItemIndex is last item 299");

                    ResetItemsView(cmbItemsSource, cmbLayout);
                }
            }
        }

void VerifyItemCollectionTransitionProviderAnimations ( ) [inline]

Definition at line 970 of file ItemsViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToTransitionProvider" }))
            {
                var addButton = FindElement.ById<Button>("AddButton");
                var deleteButton = FindElement.ById<Button>("DeleteButton");
                var moveButton = FindElement.ById<Button>("MoveButton");
                var refreshButton = FindElement.ById<Button>("RefreshButton");
                var clearHistoryButton = FindElement.ById<Button>("ClearHistoryButton");
                var historyTextBox = FindElement.ById<Edit>("TransitionCompletedHistoryTextBox");

                Log.Comment("Refreshing the item list...");
                string expectedHistoryAfterRefresh = "Operation = Add, Triggers = CollectionChangeReset, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)\r\nOperation = Move, Triggers = LayoutTransition, OldBounds = (0, 0, 1, 96), NewBounds = (0, 0, 160, 96)";

                using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterRefresh))
                {
                    refreshButton.InvokeAndWait();
                }

                clearHistoryButton.InvokeAndWait();
                Log.Comment("Adding a new item to the start...");
                string expectedHistoryAfterAdd = "Operation = Add, Triggers = CollectionChangeAdd, OldBounds = 0,0,0,0, NewBounds = 0,0,0,0\r\nOperation = Move, Triggers = CollectionChangeAdd, OldBounds = (0, 0, 160, 96), NewBounds = (281, 0, 160, 96)";

                using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterAdd))
                {
                    addButton.InvokeAndWait();
                }

                clearHistoryButton.InvokeAndWait();
                Log.Comment("Selecting the second item...");
                ListViewItem secondItem = FindElement.ById<ListViewItem>("ms-appx:///Images/vette1.jpg");
                secondItem.Select();
                Wait.ForIdle();
                Log.Comment("Moving the second item to be first...");
                string expectedHistoryAfterMove = "Operation = Add, Triggers = CollectionChangeAdd, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)\r\nOperation = Move, Triggers = CollectionChangeAdd, CollectionChangeRemove, OldBounds = (0, 0, 277, 96), NewBounds = (164, 0, 277, 96)\r\nOperation = Remove, Triggers = CollectionChangeRemove, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)";

                using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterMove))
                {
                    moveButton.InvokeAndWait();
                }

                clearHistoryButton.InvokeAndWait();
                Log.Comment("Selecting the first item...");
                ListViewItem firstItem = FindElement.ById<ListViewItem>("ms-appx:///Images/vette1.jpg");
                firstItem.Select();
                Wait.ForIdle();
                Log.Comment("Deleting the first item...");
                string expectedHistoryAfterDelete = "Operation = Move, Triggers = CollectionChangeRemove, OldBounds = (164, 0, 277, 96), NewBounds = (0, 0, 277, 96)\r\nOperation = Remove, Triggers = CollectionChangeRemove, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)";

                using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterDelete))
                {
                    deleteButton.InvokeAndWait();
                }
            }
        }

void VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndMultipleSelection ( ) [inline]

Definition at line 350 of file ItemsViewTestsWithInputHelper.cs.

        {
            VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: true, selectionMode: "Multiple");
            VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: false, selectionMode: "Multiple");
        }

void VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndNoSelection ( ) [inline]

Definition at line 332 of file ItemsViewTestsWithInputHelper.cs.

        {
            VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: true, selectionMode: "None");
            VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: false, selectionMode: "None");
        }

void VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndSingleSelection ( ) [inline]

Definition at line 341 of file ItemsViewTestsWithInputHelper.cs.

        {
            VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: true, selectionMode: "Single");
            VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: false, selectionMode: "Single");
        }

void VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndMultipleSelection ( ) [inline]

Definition at line 380 of file ItemsViewTestsWithInputHelper.cs.

        {
            VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: true, selectionMode: "Multiple");
            VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: false, selectionMode: "Multiple");
        }

void VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndNoSelection ( ) [inline]

Definition at line 360 of file ItemsViewTestsWithInputHelper.cs.

        {
            VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: true, selectionMode: "None");
            VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: false, selectionMode: "None");
        }

void VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndSingleSelection ( ) [inline]

Definition at line 370 of file ItemsViewTestsWithInputHelper.cs.

        {
            VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: true, selectionMode: "Single");
            VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: false, selectionMode: "Single");
        }

void VerifyItemsViewItemInvokedEvent | ( | bool | useItemContainer,
 |  | bool | isItemInvokedEnabled,
 |  | string | selectionMode |
 | ) |  |  | [inline, private]

Definition at line 2385 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ItemsView interactive tests");

            using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
            {
                Log.Comment("Retrieving chkIsItemInvokedEnabled");
                CheckBox chkIsItemInvokedEnabled = new CheckBox(FindElement.ById("chkIsItemInvokedEnabled"));
                Verify.IsNotNull(chkIsItemInvokedEnabled, "Verifying that chkIsItemInvokedEnabled was found");

                Log.Comment("Retrieving cmbSelectionMode");
                ComboBox cmbSelectionMode = new ComboBox(FindElement.ById("cmbSelectionMode"));
                Verify.IsNotNull(cmbSelectionMode, "Verifying that cmbSelectionMode was found");

                Log.Comment("Retrieving cmbItemTemplate");
                ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
                Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");

                Log.Comment("Retrieving cmbItemsSource");
                ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
                Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");

                Log.Comment("Retrieving cmbLayout");
                ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
                Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");

                Log.Comment("Changing chkIsItemInvokedEnabled to " + isItemInvokedEnabled);
                if (isItemInvokedEnabled == true) { chkIsItemInvokedEnabled.Check(); } else { chkIsItemInvokedEnabled.Uncheck();  };
                Log.Comment("IsChecked ToggleState is now {0}", chkIsItemInvokedEnabled.ToggleState);

                Log.Comment("Changing SelectionMode selection to " + selectionMode);
                cmbSelectionMode.SelectItemByName(selectionMode);
                Log.Comment("Selection is now {0}", cmbSelectionMode.Selection[0].Name);

                Log.Comment("Changing Layout selection to 'UniformGridLayout'");
                cmbLayout.SelectItemByName("UniformGridLayout");
                Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);

                if (useItemContainer)
                {
                    Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
                    cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
                }
                else
                {
                    Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Small ContentControl)'");
                    cmbItemTemplate.SelectItemByName("Entity DataTemplate (Small ContentControl)");
                    Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
                }

                Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
                cmbItemsSource.SelectItemByName("List<Entity>");
                Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);

                Log.Comment("Retrieving itemsView");
                UIObject itemsViewUIObject = FindElement.ByName("itemsView");
                Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");

                Log.Comment("Clicking on ItemsView to attempt to invoke first item.");
                itemsViewUIObject.Click(PointerButtons.Primary, useItemContainer ? 40.0 : 20.0, useItemContainer ? 40.0 : 20.0);
                Wait.ForIdle();

                int itemInvokedCount = ItemInvokedCount();

                Verify.AreEqual((isItemInvokedEnabled == true && selectionMode == "None") ? 1 : 0, itemInvokedCount, "Verifying itemInvoked occurrences");

                Log.Comment("Double-clicking on ItemsView to attempt to invoke first item.");
                itemsViewUIObject.DoubleClick(PointerButtons.Primary, useItemContainer ? 40.0 : 20.0, useItemContainer ? 40.0 : 20.0);
                Wait.ForIdle();

                itemInvokedCount = ItemInvokedCount();

                Verify.AreEqual((isItemInvokedEnabled == true && selectionMode != "None") ? 1 : 0, itemInvokedCount, "Verifying itemInvoked occurrences");

                ResetItemsView(cmbItemsSource, cmbLayout);

                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
            }
        }

void WaitForBoxChecked ( string checkBoxName ) [inline, private]

Definition at line 2896 of file ItemsViewTestsWithInputHelper.cs.

        {
            Log.Comment($"Waiting for checkbox {checkBoxName} checked...");
            LogEditValue("txtStatus");

            UIObject checkBoxUIObject = FindElement.ById(checkBoxName);
            Verify.IsNotNull(checkBoxUIObject);
            CheckBox checkBox = new CheckBox(checkBoxUIObject);
            Verify.IsNotNull(checkBox);

            if (checkBox.ToggleState == ToggleState.On)
            {
                Log.Comment("CheckBox already checked.");
            }
            else
            {
                checkBox.GetToggledWaiter().TryWait();
                if (checkBox.ToggleState != ToggleState.On)
                {
                    Log.Warning($"{checkBoxName} was not checked.");
                    throw new WaiterException();
                }
                Log.Comment("CheckBox checked.");
            }
        }

bool WaitForEditValue | ( | string | editName,
 |  | string | editValue,
 |  | double | secondsTimeout = 2.0,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, private]

Definition at line 2850 of file ItemsViewTestsWithInputHelper.cs.

        {
            Edit edit = new Edit(FindElement.ById(editName));
            Verify.IsNotNull(edit);
            LogEditValue(editName, edit);
            if (edit.Value != editValue)
            {
                using (var waiter = new ValueChangedEventWaiter(edit, editValue))
                {
                    Log.Comment("Waiting for " + editName + " to be set to " + editValue);

                    bool success = waiter.TryWait(TimeSpan.FromSeconds(secondsTimeout));
                    Log.Comment("Current value for " + editName + ": " + edit.Value);

                    if (success)
                    {
                        Log.Comment("Wait succeeded");
                    }
                    else
                    {
                        if (edit.Value == editValue)
                        {
                            Log.Warning("Wait failed but TextBox contains expected Text");
                            LogAndClearTraces();
                        }
                        else
                        {
                            if (throwOnError)
                            {
                                Log.Error("Wait for edit value failed");
                                LogAndClearTraces();
                                throw new WaiterException();
                            }
                            else
                            {
                                Log.Warning("Wait for edit value failed");
                                LogAndClearTraces();
                                return false;
                            }
                        }
                    }
                }
            }
            return true;
        }

bool WaitForManipulationEnd | ( | string | elementName,
 |  | string | stateTextBoxName,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, private]

Definition at line 2792 of file ItemsViewTestsWithInputHelper.cs.

        {
            UIObject elementStateUIObject = FindElement.ById(stateTextBoxName);
            Edit elementStateTextBox = new Edit(elementStateUIObject);
            Log.Comment("Current State: " + elementStateTextBox.Value);
            if (elementStateTextBox.Value != "Idle")
            {
                using (var waiter = new ValueChangedEventWaiter(elementStateTextBox, "Idle"))
                {
                    int loops = 0;

                    Log.Comment("Waiting for " + elementName + "'s manipulation end.");
                    while (true)
                    {
                        bool success = waiter.TryWait(TimeSpan.FromMilliseconds(250));

                        Log.Comment("Current State: " + elementStateTextBox.Value);

                        if (success)
                        {
                            Log.Comment("Wait succeeded");
                            break;
                        }
                        else
                        {
                            if (elementStateTextBox.Value == "Idle")
                            {
                                Log.Warning("Wait failed but TextBox contains expected text");
                                LogAndClearTraces();
                                break;
                            }
                            else if (loops < 20)
                            {
                                loops++;
                                waiter.Reset();
                            }
                            else
                            {
                                if (throwOnError)
                                {
                                    Log.Error("Wait for manipulation end failed");
                                    LogAndClearTraces();
                                    throw new WaiterException();
                                }
                                else
                                {
                                    Log.Warning("Wait for manipulation end failed");
                                    LogAndClearTraces();
                                    return false;
                                }
                            }
                        }
                    }
                }
            }
            return true;
        }

void WaitForScrollViewManipulationEnd | ( | string | scrollViewName,
 |  | string | stateTextBoxName = "txtScrollViewState" |
 | ) |  |  | [inline, private]

Definition at line 2787 of file ItemsViewTestsWithInputHelper.cs.

        {
            WaitForManipulationEnd(scrollViewName, stateTextBoxName);
        }

The documentation for this class was generated from the following file:
  • ItemsView/InteractionTests/ItemsViewTestsWithInputHelper.cs
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ItemsViewTestsWithInputHelper
  • ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
Public Member Functions | Protected Member Functions | Private Member Functions

ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper Class Reference

List of all members.

Public Member Functions

ItemsViewTestSetupHelper (ICollection< string > testNames, TestSetupHelperOptions options, bool shouldRestrictInnerFrameSize, string outputDebugStringLevel, ICollection< string > outputDebugStringComponentTypes)

Protected Member Functions

override void | TestPageLoaded (string testName)

Private Member Functions

void | SetCheckBoxValue (string checkBoxName, bool checkBoxValue)
void | SetOutputDebugStringLevel (string outputDebugStringLevel)

Detailed Description

Definition at line 3009 of file ItemsViewTestsWithInputHelper.cs.

Constructor & Destructor Documentation

ItemsViewTestSetupHelper | ( | ICollection< string > | testNames,
 |  | TestSetupHelperOptions | options,
 |  | bool | shouldRestrictInnerFrameSize,
 |  | string | outputDebugStringLevel,
 |  | ICollection< string > | outputDebugStringComponentTypes |
 | ) |  |  | [inline]

Definition at line 3011 of file ItemsViewTestsWithInputHelper.cs.

                : base(testNames, options, shouldRestrictInnerFrameSize, outputDebugStringLevel, outputDebugStringComponentTypes)
            {
            }

Member Function Documentation

void SetCheckBoxValue | ( | string | checkBoxName,
 |  | bool | checkBoxValue |
 | ) |  |  | [inline, private]

Definition at line 3060 of file ItemsViewTestsWithInputHelper.cs.

            {
                Log.Comment("Retrieving " + checkBoxName);
                CheckBox checkBox = new CheckBox(FindElement.ById(checkBoxName));
                if (checkBox == null)
                {
                    Log.Warning(checkBoxName + " was not found");
                }
                else if (checkBoxValue && checkBox.ToggleState != ToggleState.On ||
                        !checkBoxValue && checkBox.ToggleState != ToggleState.Off)
                {
                    Log.Comment(checkBoxName + " was found. Toggling its IsChecked to " + checkBoxValue);
                    checkBox.Toggle();
                    Wait.ForIdle();
                }
            }

void SetOutputDebugStringLevel ( string outputDebugStringLevel ) [inline, private]

Definition at line 3049 of file ItemsViewTestsWithInputHelper.cs.

            {
                Log.Comment("Retrieving cmbItemsViewOutputDebugStringLevel");
                ComboBox cmbItemsViewOutputDebugStringLevel = new ComboBox(FindElement.ById("cmbItemsViewOutputDebugStringLevel"));
                Verify.IsNotNull(cmbItemsViewOutputDebugStringLevel, "Verifying that cmbItemsViewOutputDebugStringLevel was found");

                Log.Comment("Changing output-debug-string-level selection to " + outputDebugStringLevel);
                cmbItemsViewOutputDebugStringLevel.SelectItemByName(outputDebugStringLevel);
                Log.Comment("Selection is now {0}", cmbItemsViewOutputDebugStringLevel.Selection[0].Name);
            }

override void TestPageLoaded ( string testName ) [inline, protected]

Definition at line 3021 of file ItemsViewTestsWithInputHelper.cs.

            {
                Log.Comment("ItemsViewTestSetupHelper - " + testName + " loaded.");

                if (testName == "ItemsView Tests")
                {
                    SetCheckBoxValue(checkBoxName: "chkItemContainer", checkBoxValue: false);
                    SetCheckBoxValue(checkBoxName: "chkItemsView", checkBoxValue: false);
                    SetCheckBoxValue(checkBoxName: "chkItemsRepeater", checkBoxValue: false);
                    SetCheckBoxValue(checkBoxName: "chkItemContainer", checkBoxValue: false);
                    SetCheckBoxValue(checkBoxName: "chkLinedFlowLayout", checkBoxValue: false);
                    SetCheckBoxValue(checkBoxName: "chkScrollView", checkBoxValue: false);
                    SetCheckBoxValue(checkBoxName: "chkScrollPresenter", checkBoxValue: false);
                    SetCheckBoxValue(checkBoxName: "chkAnnotatedScrollBar", checkBoxValue: false);

                    if (OutputDebugStringComponentTypes != null)
                    {
                        foreach (string componentType in OutputDebugStringComponentTypes)
                        {
                            SetCheckBoxValue(checkBoxName: "chk" + componentType, checkBoxValue: true);
                        }
                    }

                    SetOutputDebugStringLevel(OutputDebugStringLevel);
                }
            }

The documentation for this class was generated from the following file:
  • ItemsView/InteractionTests/ItemsViewTestsWithInputHelper.cs
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewTestsWithInputHelper::LoggingHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ItemsViewTestsWithInputHelper
  • ItemsViewTestsWithInputHelper::LoggingHelper
Public Member Functions | Private Member Functions | Private Attributes

ItemsViewTestsWithInputHelper::LoggingHelper Class Reference

List of all members.

Public Member Functions

LoggingHelper (ItemsViewTestsWithInputHelper owner, ICollection< string > componentTypes)
void | Dispose ()

Private Member Functions

void | SetLoggingLevel (bool set, ICollection< string > componentTypes)

Private Attributes

ICollection< string > | m_componentTypes
ItemsViewTestsWithInputHelper m_owner

Detailed Description

Definition at line 3078 of file ItemsViewTestsWithInputHelper.cs.

Constructor & Destructor Documentation

LoggingHelper | ( | ItemsViewTestsWithInputHelper | owner,
 |  | ICollection< string > | componentTypes |
 | ) |  |  | [inline]

Definition at line 3083 of file ItemsViewTestsWithInputHelper.cs.

            {
                m_owner = owner;
                m_componentTypes = componentTypes;

                SetLoggingLevel(true, m_componentTypes);
            }

Member Function Documentation

void Dispose ( ) [inline]

Definition at line 3091 of file ItemsViewTestsWithInputHelper.cs.

            {
                SetLoggingLevel(false, m_componentTypes);
            }

void SetLoggingLevel | ( | bool | set,
 |  | ICollection< string > | componentTypes |
 | ) |  |  | [inline, private]

Definition at line 3096 of file ItemsViewTestsWithInputHelper.cs.

            {
                if (componentTypes != null)
                {
                    foreach (string componentName in componentTypes)
                    {
                        switch (componentName)
                        {
                            case "ScrollView":
                                m_owner.SetCheckBoxValue(checkBoxName: "chkLogScrollViewMessages", checkBoxValue: set);
                                break;
                            case "ScrollPresenter":
                                m_owner.SetCheckBoxValue(checkBoxName: "chkLogScrollPresenterMessages", checkBoxValue: set);
                                break;
                            case "ItemsRepeater":
                                m_owner.SetCheckBoxValue(checkBoxName: "chkLogItemsRepeaterMessages", checkBoxValue: set);
                                break;
                            case "ItemsView":
                                m_owner.SetCheckBoxValue(checkBoxName: "chkLogItemsViewMessages", checkBoxValue: set);
                                break;
                            case "AnnotatedScrollBar":
                                m_owner.SetCheckBoxValue(checkBoxName: "chkLogAnnotatedScrollBarMessages", checkBoxValue: set);
                                break;
                            case "LinedFlowLayout":
                                m_owner.SetCheckBoxValue(checkBoxName: "chkLogLinedFlowLayoutMessages", checkBoxValue: set);
                                break;
                            default:
                                Log.Error("SetLoggingLevel - " + componentName + " unexpected.");
                                break;
                        }
                    }
                }
            }

Member Data Documentation

ICollection<string> m_componentTypes [private]

Definition at line 3081 of file ItemsViewTestsWithInputHelper.cs.

ItemsViewTestsWithInputHelper m_owner [private]

Definition at line 3080 of file ItemsViewTestsWithInputHelper.cs.

The documentation for this class was generated from the following file:
  • ItemsView/InteractionTests/ItemsViewTestsWithInputHelper.cs
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • MapControlTests
Public Member Functions | Static Public Member Functions

MapControlTests Class Reference

List of all members.

Public Member Functions

void | AddMultipleElementsOnMap ()
void | TestCleanup ()
void | ValidadePinClickEvent ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 23 of file MapControlTests.cs.

Member Function Documentation

void AddMultipleElementsOnMap ( ) [inline]

Definition at line 42 of file MapControlTests.cs.

        {
            using (var setup = new TestSetupHelper("MapControl Tests"))
            {
                //Wait for map to load
                var map = FindElement.ByName("Map Application");
                Wait.RetryUntilEvalFuncSuccessOrTimeout(
                    () => { return (map = FindElement.ByName("Map Application")) != null; },
                    retryTimoutByMilliseconds: 3000
                );

                // Get map contents
                var elements = map.Descendants[0].Descendants;

                //Verify that the interactive map is the only element
                Verify.AreEqual(1, elements.Count);

                // Add a layer
                var addLayerButton = FindElement.ByName<Button>("Add Layer");
                addLayerButton.Invoke();
                Wait.ForIdle();

                // Add a pins
                var addPinButton = FindElement.ByName<Button>("Add Pin");
                var latitudeTextBox = FindElement.ById<Edit>("latitudePinText");
                var longitudeTextBox = FindElement.ById<Edit>("longitudePinText");

                KeyboardHelper.EnterText(latitudeTextBox, "0");
                KeyboardHelper.EnterText(longitudeTextBox, "0");
                Wait.ForIdle();
                addPinButton.Invoke();
                Wait.ForIdle();

                KeyboardHelper.EnterText(latitudeTextBox, "10");
                KeyboardHelper.EnterText(longitudeTextBox, "10");
                Wait.ForIdle();
                addPinButton.Invoke();

                //Verify that the two pins were added
                Wait.RetryUntilEvalFuncSuccessOrTimeout(
                    () => { return (elements.Count) == 5; },
                    retryTimoutByMilliseconds: 3000
                );
                Verify.AreEqual(5, elements.Count);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file MapControlTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file MapControlTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ValidadePinClickEvent ( ) [inline]

Definition at line 91 of file MapControlTests.cs.

        {
            using (var setup = new TestSetupHelper("MapControl Tests"))
            {
                //Wait for map to load
                var map = FindElement.ByName("Map Application");
                Wait.RetryUntilEvalFuncSuccessOrTimeout(
                    () => { return (map = FindElement.ByName("Map Application")) != null; },
                    retryTimoutByMilliseconds: 3000
                );

                // Get map contents
                var elements = map.Descendants[0].Descendants;

                // Add a layer
                var addLayerButton = FindElement.ByName<Button>("Add Layer");
                addLayerButton.Invoke();
                Wait.ForIdle();

                // Add a pin
                var addPinButton = FindElement.ByName<Button>("Add Pin");
                var latitudeTextBox = FindElement.ById<Edit>("latitudePinText");
                var longitudeTextBox = FindElement.ById<Edit>("longitudePinText");

                KeyboardHelper.EnterText(latitudeTextBox, "0");
                KeyboardHelper.EnterText(longitudeTextBox, "0");
                Wait.ForIdle();
                addPinButton.Invoke();

                //Check pin was created
                Wait.RetryUntilEvalFuncSuccessOrTimeout(
                    () => { return (elements.Count) == 3; },
                    retryTimoutByMilliseconds: 3000
                );
                Verify.AreEqual(3, elements.Count);

                // Click on the pin
                var pin = elements[1];
                InputHelper.LeftClick(pin);
                Wait.ForIdle();

                //Check pin was deleted
                Wait.RetryUntilEvalFuncSuccessOrTimeout(
                    () => { return (elements.Count) == 1; },
                    retryTimoutByMilliseconds: 3000
                );
                Verify.AreEqual(1, elements.Count);

                //Check if both click events were raised
                var logBox = new Edit(FindElement.ById("output"));
                Verify.IsTrue(logBox.GetText().Contains("Layer Clicked"));
                Verify.IsTrue(logBox.GetText().Contains("Map Clicked"));

            }
        }

The documentation for this class was generated from the following file:
  • MapControl/InteractionTests/MapControlTests.cs
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • MenuBarTests
Public Member Functions | Static Public Member Functions | Private Member Functions

MenuBarTests Class Reference

List of all members.

Public Member Functions

void | AddRemoveMenuBarItemTest ()
void | AddRemoveMenuFlyoutItemTest ()
void | AutomationPeerTest ()
void | BasicMouseInteractionTest ()
void | EmptyMenuBarItemNoPopupTest ()
void | HoveringBehaviorTest ()
void | KeyboardAcceleratorsTest ()
void | KeyboardNavigationWithAccessKeysTest ()
void | KeyboardNavigationWithArrowKeysTest ()
void | KeyboardNavigationWithArrowKeysWithDisabledItemTest ()
void | KeyboardNavigationWithArrowKeysWithOnlyOneItemWorks ()
void | MenuBarHeightTest ()
void | TabTest ()
void | TestCleanup ()
void | VerifyAxeScanPasses ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

T | GetElement< T > (ref T element, string elementName)

Detailed Description

Definition at line 24 of file MenuBarTests.cs.

Member Function Documentation

void AddRemoveMenuBarItemTest ( ) [inline]

Definition at line 257 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var addButton = FindElement.ById<Button>("AddMenuBarItemButton");
                var removeButton = FindElement.ById<Button>("RemoveMenuBarItemButton");

                Log.Comment("Verify that menu bar items can be added");
                addButton.Invoke();
                VerifyElement.Found("New Menu Bar Item", FindBy.Name);

                Log.Comment("Verify that menu bar items can be removed");
                removeButton.Invoke();
                VerifyElement.NotFound("New Menu Bar Item", FindBy.Name);

                Log.Comment("Verify that menu bar pre-existing items can be removed");
                VerifyElement.Found("Format", FindBy.Name);
                removeButton.Invoke();
                VerifyElement.NotFound("Format", FindBy.Name);
            }
        }

void AddRemoveMenuFlyoutItemTest ( ) [inline]

Definition at line 285 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var addButton = FindElement.ById<Button>("AddFlyoutItemButton");
                var removeButton = FindElement.ById<Button>("RemoveFlyoutItemButton");
                var fileButton = FindElement.ById<Button>("FileItem");

                Log.Comment("Verify that menu flyout items can be added");
                addButton.Invoke();
                Wait.ForIdle();

                // open flyout
                fileButton.Invoke();
                Wait.ForIdle();

                VerifyElement.Found("New Flyout Item", FindBy.Name);

                // close flyout
                fileButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify that menu flyout items can be removed");
                removeButton.Invoke();
                Wait.ForIdle();

                // open flyout
                fileButton.Invoke();
                Wait.ForIdle();

                VerifyElement.NotFound("New Flyout Item", FindBy.Name);

                // close flyout
                fileButton.Invoke();
                Wait.ForIdle();
            }
        }

void AutomationPeerTest ( ) [inline]

Definition at line 87 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var fileButton = FindElement.ById<Button>("FileItem");
                var fileButtonEC = new ExpandCollapseImplementation(fileButton);

                // Invoke
                fileButton.Invoke();
                Wait.ForIdle();
                VerifyElement.Found("New", FindBy.Name);
                fileButton.Invoke();
                Wait.ForIdle();
                VerifyElement.NotFound("New", FindBy.Name);

                // Expand collapse
                fileButtonEC.Expand();
                Wait.ForIdle();
                VerifyElement.Found("New", FindBy.Name);
                fileButtonEC.Collapse();
                Wait.ForIdle();
                VerifyElement.NotFound("New", FindBy.Name);

                // Verify GetNameCore() is working if AutomationProperties.Name isn't set
                VerifyElement.Found("Format", FindBy.Name);
            }
        }

void BasicMouseInteractionTest ( ) [inline]

Definition at line 51 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                CheckBox testFrameCheckbox = new CheckBox(FindElement.ByName("TestFrameCheckbox"));

                var fileButton = FindElement.ById<Button>("FileItem");
                var editButton = FindElement.ById<Button>("EditItem");

                // click and click
                // From bug 17343407: this test is sometimes unreliable, use retries and see if that helps.
                InputHelper.LeftClick(fileButton);
                TestEnvironment.VerifyAreEqualWithRetry(20,
                    () => true,
                    () => FindCore.ByName("NewItem", shouldWait: false) != null); // The item should be in the tree

                InputHelper.LeftClick(fileButton);
                VerifyElement.NotFound("NewItem", FindBy.Id);

                // click and hover
                InputHelper.LeftClick(fileButton);
                VerifyElement.NotFound("Undo", FindBy.Name);
                InputHelper.MoveMouse(editButton, 0, 0);
                InputHelper.MoveMouse(editButton, 1, 1);
                VerifyElement.Found("Undo", FindBy.Name);

                testFrameCheckbox.Check();
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file MenuBarTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void EmptyMenuBarItemNoPopupTest ( ) [inline]

Definition at line 412 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                FindElement.ByName<Button>("NoChildrenFlyout").Click();
                VerifyElement.NotFound("Popup",FindBy.Name);

                FindElement.ByName<Button>("OneChildrenFlyout").Click();
                VerifyElement.Found("Popup", FindBy.Name);

                // Click twice to close flyout
                FindElement.ByName<Button>("RemoveItemsFromOneChildrenItem").Click();
                FindElement.ByName<Button>("RemoveItemsFromOneChildrenItem").Click();

                FindElement.ByName<Button>("OneChildrenFlyout").Click();
                VerifyElement.NotFound("Popup", FindBy.Name);
            }
        }

T GetElement< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
void HoveringBehaviorTest ( ) [inline]

Definition at line 349 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var menuBar = FindElement.ById("SizedMenuBar");
                var addButton = FindElement.ByName("AddItemsToEmptyMenuBar");

                addButton.Click();
                addButton.Click();
                addButton.Click();

                var help0 = FindElement.ByName<Button>("Help0");
                var help1 = FindElement.ByName<Button>("Help1");

                // This behavior seems to a bit unreliable, so repeat
                InputHelper.LeftClick(help0);
                TestEnvironment.VerifyAreEqualWithRetry(20,
                    () => true,
                    () => FindCore.ByName("Add0", shouldWait: false) != null); // The item should be in the tree

                // Check if hovering over the next button actually will show the correct item
                VerifyElement.NotFound("Add1", FindBy.Name);
                InputHelper.MoveMouse(help1, 0, 0);
                InputHelper.MoveMouse(help1, 1, 1);
                InputHelper.MoveMouse(help1, 5, 5);

                UIObject add1Element = null;
                ElementCache.Clear();
                var element = GetElement(ref add1Element, "Add1");
                Verify.IsNotNull(add1Element);
            }
        }

void KeyboardAcceleratorsTest ( ) [inline]

Definition at line 234 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                VerifyElement.NotFound("Undo Clicked", FindBy.Name);

                KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                Log.Comment("Send text z.");
                TextInput.SendText("z");
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);

                Wait.ForIdle();

                VerifyElement.Found("Undo Clicked", FindBy.Name);
            }
        }

void KeyboardNavigationWithAccessKeysTest ( ) [inline]

Definition at line 211 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                KeyboardHelper.PressDownModifierKey(ModifierKey.Alt);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Alt);
                Wait.ForIdle();

                TextInput.SendText("A"); // this clicks File menu bar item
                Wait.ForIdle();
                TextInput.SendText("B"); // this clicks New flyout item
                Wait.ForIdle();

                VerifyElement.Found("New Clicked", FindBy.Name);
            }
        }

void KeyboardNavigationWithArrowKeysTest ( ) [inline]

Definition at line 121 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var editButton = FindElement.ById<Button>("EditItem");
                editButton.Invoke();
                VerifyElement.Found("Undo", FindBy.Name);

                KeyboardHelper.PressKey(Key.Left);
                VerifyElement.Found("New", FindBy.Name);

                KeyboardHelper.PressKey(Key.Escape);
                VerifyElement.NotFound("New", FindBy.Name);

                KeyboardHelper.PressKey(Key.Left);
                VerifyElement.NotFound("Word Wrap", FindBy.Name);

                KeyboardHelper.PressKey(Key.Enter);
                VerifyElement.Found("Word Wrap", FindBy.Name);

                KeyboardHelper.PressKey(Key.Escape);
                KeyboardHelper.PressKey(Key.Right);

                KeyboardHelper.PressKey(Key.Right);
                VerifyElement.NotFound("Undo", FindBy.Name);

                KeyboardHelper.PressKey(Key.Enter);
                VerifyElement.Found("Undo", FindBy.Name);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                VerifyElement.NotFound("Item 1", FindBy.Name);

                KeyboardHelper.PressKey(Key.Right);
                VerifyElement.Found("Item 1", FindBy.Name);
            }
        }

void KeyboardNavigationWithArrowKeysWithDisabledItemTest ( ) [inline]

Definition at line 168 of file MenuBarTests.cs.

        {
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var editButton = FindElement.ById<Button>("MenuBarPartiallyEnabledOne");
                editButton.Invoke();
                VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);

                KeyboardHelper.PressKey(Key.Right);
                VerifyElement.Found("PartiallyEnabledFlyoutThree", FindBy.Name);

                KeyboardHelper.PressKey(Key.Left);
                VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);

                KeyboardHelper.PressKey(Key.Left);
                VerifyElement.Found("PartiallyEnabledFlyoutThree", FindBy.Name);

                KeyboardHelper.PressKey(Key.Left);
                VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);

                KeyboardHelper.PressKey(Key.Right);
                VerifyElement.Found("PartiallyEnabledFlyoutThree", FindBy.Name);

                KeyboardHelper.PressKey(Key.Right);
                VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);
            }
        }

void KeyboardNavigationWithArrowKeysWithOnlyOneItemWorks ( ) [inline]

Definition at line 197 of file MenuBarTests.cs.

        {
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var editButton = FindElement.ById<Button>("LoopTestBarOne");
                editButton.Invoke();
                VerifyElement.Found("LoopTestItemOne", FindBy.Name);

                KeyboardHelper.PressKey(Key.Right);
                VerifyElement.NotFound("LoopTestItemOne", FindBy.Name);
            }
        }

void MenuBarHeightTest ( ) [inline]

Definition at line 329 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var menuBar = FindElement.ById("SizedMenuBar");
                var menuBarItem = FindElement.ById<Button>("SizedMenuBarItem");

                Log.Comment("Verify that the size of the MenuBar can be set.");

                Verify.AreEqual(menuBar.BoundingRectangle.Height, 24);
                Verify.AreEqual(menuBarItem.BoundingRectangle.Height, 16);
            }
        }

void TabTest ( ) [inline]

Definition at line 388 of file MenuBarTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var firstButton = FindElement.ByName<Button>("FirstButton");
                var fileButton = FindElement.ById<Button>("FileItem");

                firstButton.SetFocus();
                Wait.ForIdle();

                Log.Comment("Verify that pressing tab from previous control goes to the File item");
                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();

                Verify.AreEqual(true, fileButton.HasKeyboardFocus);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 45 of file MenuBarTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 36 of file MenuBarTests.cs.

        {
            using (var setup = new TestSetupHelper("MenuBar-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

The documentation for this class was generated from the following file:
  • MenuBar/MenuBar_InteractionTests/MenuBarTests.cs
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • CommonTests
Public Member Functions | Static Public Member Functions

CommonTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests::NavigationViewTestsBase.

List of all members.

Public Member Functions

void | AccTypeTest ()
void | AddRemoveFooterItemTest ()
void | AddRemoveItemTest ()
void | AddRemoveOriginalItemTest ()
void | AlwaysShowHeaderTest ()
void | AutoSuggestBoxOnTopNavTest ()
void | AutoSuggestBoxTest ()
void | BackButtonPlaceHolderOnTopNavTest ()
void | BackToolTipTest ()
void | CloseToolTipTest ()
void | ContentOverlayTest ()
void | DisabledItemTest ()
void | DisplayModeTest ()
void | EnsureClearingListIsSafe ()
void | EnsureDisplayModeGroupUpdatesOnPaneClosedToMinimalWithBackButton ()
void | EnsureDisplayModeGroupUpdatesWhenBackButtonVisibilityChanged ()
void | EnsurePaneHeaderCanBeModifiedForLeftNav ()
void | EnsurePaneHeaderCanBeModifiedForTopNav ()
void | HierarchyItemsAccessibilitySetAndLevelTest ()
void | IsPaneToggleButtonVisibleTest ()
void | IsSettingsVisibleTest ()
void | ItemsAccessibilitySetTest ()
void | ItemSourceTest ()
void | ItemsSourceAccessibilitySetTest ()
void | KeyboardFocusToolTipTest ()
void | LeftNavigationFocusKindRevealTest ()
void | LeftNavigationWithAccessKeysTest ()
void | MenuItemKeyboardInvokeTest ()
void | NavigationViewDensityChange ()
void | ScrollToMenuItemTest ()
void | SettingsAccessibilitySetTest ()
void | SettingsItemGamepadTest ()
void | SystemBackTest ()
void | TitleBarTest ()
void | ToolTipCustomContentTest ()
void | ToolTipTest ()
void | VerifyAddingChildItemsToNavigationViewItem ()
void | VerifyAddingNewItemsFromIndexZero ()
void | VerifyAxeScanPasses ()
void | VerifyBackButtonHidesWhenInMinimalOpenState ()
void | VerifyCanCancelClosing ()
void | VerifyClickingNavigationViewItemInPaneFooterDoesNotCrash ()
void | VerifyCustomHeaderContentTest ()
void | VerifyExpandCollapseFunctionality ()
void | VerifyExpandCollapseFunctionalityUsingChevron ()
void | VerifyNavigationViewItemChildrenFlyoutMenuCornerRadius ()
void | VerifyNavigationViewItemContentPresenterMargin ()
void | VerifyNavigationViewItemInPaneFooterHasTemplateSettingBindings ()
void | VerifyNoCrashWhenNavViewInContentDialog ()
void | VerifyNoCrashWhenSwitchingPaneDisplayModeWithAutoWrappedElements ()
void | VerifyNotShouldPreserveNavigationViewRS3Behavior ()
void | VerifyShouldPreserveNavigationViewRS3Behavior ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 25 of file CommonTests.cs.

Member Function Documentation

void AccTypeTest ( ) [inline]

Definition at line 1074 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    UIObject menuItem = FindElement.ByName("Games");
                    Verify.AreEqual(ControlType.ListItem, menuItem.ControlType);
                }
            }
        }

void AddRemoveFooterItemTest ( ) [inline]

Definition at line 276 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    var addButton = FindElement.ById<Button>("AddFooterItemButton");
                    var removeButton = FindElement.ById<Button>("RemoveFooterItemButton");

                    Log.Comment("Verify that footer menu items can be added");
                    addButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.Found("New Footer Menu Item 0", FindBy.Name);

                    Log.Comment("Verify that more footer menu items can be added");
                    addButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.Found("New Footer Menu Item 1", FindBy.Name);

                    Log.Comment("Verify that footer menu items can be removed");
                    removeButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.NotFound("New Footer Menu Item 1", FindBy.Name);
                    VerifyElement.Found("New Footer Menu Item 0", FindBy.Name);

                    Log.Comment("Verify that more Footer menu items can be removed");
                    removeButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.NotFound("New Menu Item 0", FindBy.Name);
                }
            }
        }

void AddRemoveItemTest ( ) [inline]

Definition at line 215 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    var addButton = FindElement.ById<Button>("AddItemButton");
                    var removeButton = FindElement.ById<Button>("RemoveItemButton");

                    Log.Comment("Verify that menu items can be added");
                    addButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.Found("New Menu Item 0", FindBy.Name);

                    Log.Comment("Verify that more menu items can be added");
                    addButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.Found("New Menu Item 1", FindBy.Name);

                    Log.Comment("Verify that menu items can be removed");
                    removeButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.NotFound("New Menu Item 1", FindBy.Name);
                    VerifyElement.Found("New Menu Item 0", FindBy.Name);

                    Log.Comment("Verify that more menu items can be removed");
                    removeButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.NotFound("New Menu Item 0", FindBy.Name);
                }
            }
        }

void AddRemoveOriginalItemTest ( ) [inline]

Definition at line 251 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    var addButton = FindElement.ById<Button>("AddItemButton");
                    var removeButton = FindElement.ById<Button>("RemoveItemButton");

                    Log.Comment("Verify that original menu items can be removed");
                    removeButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.NotFound("HasChildItem", FindBy.Name);

                    Log.Comment("Verify that menu items can be added after removing");
                    addButton.Invoke();
                    Wait.ForIdle();
                    VerifyElement.Found("New Menu Item 0", FindBy.Name);
                }
            }
        }

void AlwaysShowHeaderTest ( ) [inline]

Definition at line 161 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Verify that header is visible by default");
                    VerifyElement.Found("Home as header", FindBy.Name);

                    CheckBox headerVisibilityCheckbox = new CheckBox(FindElement.ByName("HeaderVisiblityCheckbox"));

                    Log.Comment("Verify that header is not visible in display mode expanded when AlwaysShowHeader == false");
                    headerVisibilityCheckbox.Uncheck();
                    Wait.ForIdle();
                    VerifyElement.NotFound("Home as header", FindBy.Name);

                    Log.Comment("Verify that header is visible in display mode minimal when AlwaysShowHeader == false");
                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    VerifyElement.Found("Home as header", FindBy.Name);

                    Log.Comment("Verify that header is not visible in display mode compact when AlwaysShowHeader == false");
                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();
                    VerifyElement.NotFound("Home as header", FindBy.Name);

                    Log.Comment("Verify that header is visible in display mode compact when AlwaysShowHeader == true");
                    headerVisibilityCheckbox.Check();
                    Wait.ForIdle();
                    VerifyElement.Found("Home as header", FindBy.Name);

                    // PaneDisplayMode and Top option were added on RS5, so just run the next tests if we are not using RS4 Style
                    if (!testScenario.IsUsingRS4Style)
                    {
                        var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                        Log.Comment("Set PaneDisplayMode to Top");
                        panelDisplayModeComboBox.SelectItemByName("Top");
                        Wait.ForIdle();

                        Log.Comment("Verify that header is visible in Top display mode when AlwaysShowHeader == true");
                        VerifyElement.Found("Home as header", FindBy.Name);

                        Log.Comment("Verify that header is not visible in Top display mode when AlwaysShowHeader == false");
                        headerVisibilityCheckbox.Uncheck();
                        Wait.ForIdle();
                        VerifyElement.NotFound("Home as header", FindBy.Name);
                    }
                }
            }
        }

void AutoSuggestBoxOnTopNavTest ( ) [inline]

Definition at line 439 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView TopNav Test" }))
            {
                ElementCache.Refresh();
                ElementCache.Dump();
                Log.Comment("Verify that the AutoSuggestBox is visible by default");
                VerifyElement.Found("PaneAutoSuggestBox", FindBy.Name);

                Log.Comment("Verify that setting AutoSuggestBox to null removes it and the search button");
                CheckBox autoSuggestCheckBox = new CheckBox(FindElement.ByName("AutoSuggestCheckbox"));
                autoSuggestCheckBox.Uncheck();
                Wait.ForIdle();

                VerifyElement.NotFound("PaneAutoSuggestBox", FindBy.Name);

                Log.Comment("Verify that setting AutoSuggestBox puts it back");
                autoSuggestCheckBox.Check();
                Wait.ForIdle();

                VerifyElement.Found("PaneAutoSuggestBox", FindBy.Name);
            }
        }

void AutoSuggestBoxTest ( ) [inline]

Definition at line 384 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    SetNavViewWidth(ControlWidth.Wide);
                    Wait.ForIdle();

                    Log.Comment("Verify that the AutoSuggestBox is visible and the search button is not in Expanded mode");
                    VerifyElement.Found("PaneAutoSuggestBox", FindBy.Name);
                    VerifyElement.NotFound("Click to search", FindBy.Name);

                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();

                    Log.Comment("Verify that the AutoSuggestBox is not visible and the search button is in Compact mode with the pane closed");
                    VerifyElement.NotFound("PaneAutoSuggestBox", FindBy.Name);
                    Button searchButton = new Button(FindElement.ByName("Click to search"));
                    Verify.IsNotNull(searchButton);

                    Log.Comment("Verify that invoking the search button opens the pane and put focus in the AutoSuggestBox");
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");

                    searchButton.Invoke();
                    Wait.ForIdle();

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    // AutoSuggestBox never gets keyboard focus itself; focus goes to the edit box inside it
                    UIObject autoSuggestEditBox = FindElement.ByNameAndClassName("PaneAutoSuggestBox", "TextBox");
                    Verify.IsNotNull(autoSuggestEditBox);
                    Verify.IsTrue(autoSuggestEditBox.HasKeyboardFocus);

                    Log.Comment("Verify that setting AutoSuggestBox to null removes it and the search button");
                    CheckBox autoSuggestCheckBox = new CheckBox(FindElement.ByName("AutoSuggestCheckbox"));
                    autoSuggestCheckBox.Uncheck();
                    Wait.ForIdle();

                    VerifyElement.NotFound("PaneAutoSuggestBox", FindBy.Name);
                    VerifyElement.NotFound("Click to search", FindBy.Name);

                    Log.Comment("Verify that setting AutoSuggestBox puts it back");
                    autoSuggestCheckBox.Check();
                    Wait.ForIdle();

                    VerifyElement.Found("PaneAutoSuggestBox", FindBy.Name);
                }
            }
        }

void BackButtonPlaceHolderOnTopNavTest ( ) [inline]

Definition at line 465 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                var getActiveVisualStateButton = new Button(FindElement.ByName("GetActiveVisualState"));
                var invokeResult = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }

                Verify.IsTrue(invokeResult.Value.Contains("BackButtonVisible"));

                Log.Comment("Hide backbutton");
                var backButtonCheckBox = new CheckBox(FindElement.ByName("BackButtonVisibilityCheckbox"));

                backButtonCheckBox.Uncheck();
                Wait.ForIdle();

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }

                Verify.IsTrue(invokeResult.Value.Contains("BackButtonCollapsed"));

                Log.Comment("Show backbutton");
                backButtonCheckBox.Check();
                Wait.ForIdle();

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }
                Verify.IsTrue(invokeResult.Value.Contains("BackButtonVisible"));
            }
        }

void BackToolTipTest ( ) [inline]

Definition at line 1263 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                Button button = new Button(FindElement.ByName("NavigationViewBackButton"));
                CheckBox checkBox = new CheckBox(FindElement.ByName("BackButtonEnabledCheckbox"));

                checkBox.Check();
                Wait.ForIdle();

                using (var waiter = new ToolTipOpenedWaiter())
                {
                    Log.Comment("Moving pointer around, over back button");
                    button.MovePointer();
                    Wait.ForIdle();
                    button.MovePointer(offsetX: 1, offsetY: 1);
                    Wait.ForIdle();
                    button.MovePointer(offsetX: -1, offsetY: -1);
                    Wait.ForIdle();

                    Log.Comment("Waiting for tooltip to open");
                    waiter.Wait(TimeSpan.FromSeconds(5));
                }
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 33 of file CommonTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void CloseToolTipTest ( ) [inline]

Definition at line 1291 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));

                Log.Comment("Set PaneDisplayMode to LeftMinimal");
                panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
                Wait.ForIdle();

                var isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                Log.Comment("Open the pane");
                isPaneOpenCheckBox.Check();
                Wait.ForIdle();

                Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                Button closeButton = new Button(FindElement.ById("NavigationViewCloseButton"));
                Verify.IsNotNull(closeButton);

                using (var waiter = new ToolTipOpenedWaiter())
                {
                    Log.Comment("Moving pointer around, over close button");
                    closeButton.MovePointer();
                    Wait.ForIdle();
                    closeButton.MovePointer(offsetX: 1, offsetY: 1);
                    Wait.ForIdle();
                    closeButton.MovePointer(offsetX: -1, offsetY: -1);
                    Wait.ForIdle();

                    Log.Comment("Waiting for tooltip to open");
                    waiter.Wait(TimeSpan.FromSeconds(5));
                }
            }
        }

void ContentOverlayTest ( ) [inline]

Definition at line 683 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                var topNavAutomationId = "TopNavMenuItemsHost";
                var contentOverlayName = "CONTENT OVERLAY";
                var addRemoveContentOverlayButton = new Button(FindElement.ById("AddRemoveContentOverlay"));
                var changeTopNavVisibilityButton = new Button(FindElement.ById("ChangeTopNavVisibility"));

                Log.Comment("Verify that after NavView loads, the top nav is visible and that there is no content overlay");
                VerifyElement.Found(topNavAutomationId, FindBy.Id);
                VerifyElement.NotFound(contentOverlayName, FindBy.Name);

                addRemoveContentOverlayButton.Click();
                Wait.ForIdle();

                Log.Comment("Verify that after content overlay is added, the top nav is visible and the content overlay too");
                VerifyElement.Found(topNavAutomationId, FindBy.Id);
                VerifyElement.Found(contentOverlayName, FindBy.Name);

                changeTopNavVisibilityButton.Click();
                Wait.ForIdle();

                Log.Comment("Verify that after setting IsPaneVisible to false, the top nav is hidden and the content overlay is still visible");
                VerifyElement.NotFound(topNavAutomationId, FindBy.Id);
                VerifyElement.Found(contentOverlayName, FindBy.Name);

                changeTopNavVisibilityButton.Click();
                Wait.ForIdle();

                Log.Comment("Verify that after setting IsPaneVisible to true, the top nav is visible and the content overlay remains visible");
                VerifyElement.Found(topNavAutomationId, FindBy.Id);
                VerifyElement.Found(contentOverlayName, FindBy.Name);
            }
        }

void DisabledItemTest ( ) [inline]

Definition at line 352 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    UIObject moviesItem = FindElement.ByName("Movies");
                    CheckBox moviesEnabledCheckbox = new CheckBox(FindElement.ByName("MoviesEnabledCheckbox"));

                    Log.Comment("Verify that Movies item is enabled");
                    Verify.IsTrue(moviesItem.IsEnabled);

                    Log.Comment("Uncheck checkbox to disable Movies item");
                    moviesEnabledCheckbox.Uncheck();
                    Wait.ForIdle();

                    Log.Comment("Verify that Movies item is disabled");
                    Verify.IsFalse(moviesItem.IsEnabled);

                    Log.Comment("Check checkbox to enable Movies item");
                    moviesEnabledCheckbox.Check();
                    Wait.ForIdle();

                    Log.Comment("Verify that Movies item is enabled");
                    Verify.IsTrue(moviesItem.IsEnabled);
                }
            }
        }

void DisplayModeTest ( ) [inline]

Definition at line 49 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));

                    // Tests with PaneDisplayMode='Auto', which enables adaptive layout.

                    Log.Comment("Test the adaptive layout with the default Compact and Expanded mode Thresholds");
                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();
                    Verify.AreEqual(compact, displayModeTextBox.DocumentText);

                    SetNavViewWidth(ControlWidth.Wide);
                    Wait.ForIdle();
                    Verify.AreEqual(expanded, displayModeTextBox.DocumentText);

                    Log.Comment("Test adaptive layout when the compact mode threshold is larger than the expanded mode threshold");
                    SetThreshold(Threshold.High, ComboBoxName.CompactModeComboBox);
                    SetThreshold(Threshold.Low, ComboBoxName.ExpandedModeComboBox);

                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();
                    Verify.AreEqual(expanded, displayModeTextBox.DocumentText);

                    SetNavViewWidth(ControlWidth.Wide);
                    Wait.ForIdle();
                    Verify.AreEqual(expanded, displayModeTextBox.DocumentText);

                    Log.Comment("Test adaptive layout when the compact mode threshold is equal to the expanded mode threshold");
                    SetThreshold(Threshold.Low, ComboBoxName.CompactModeComboBox);
                    SetThreshold(Threshold.Low, ComboBoxName.ExpandedModeComboBox);

                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();
                    Verify.AreEqual(expanded, displayModeTextBox.DocumentText);
                }
            }
        }

void EnsureClearingListIsSafe ( ) [inline]

Definition at line 1378 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Button clearButton = new Button(FindElement.ByName("ClearMenuButton"));
                    Log.Comment("About to invoke list clear button");
                    clearButton.Invoke();
                    Log.Comment("About to wait for idle");
                    Wait.ForIdle();

                    // that's it, it's a stability test
                }
            }
        }

void EnsureDisplayModeGroupUpdatesOnPaneClosedToMinimalWithBackButton ( ) [inline]

Definition at line 1537 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Navigation Minimal Test" }))
            {
                Log.Comment("Click on ToggleButton");
                FindElement.ById<Button>("TogglePaneButton").InvokeAndWait();

                Log.Comment("Get NavView Active VisualStates");
                FindElement.ByName<Button>("GetNavViewActiveVisualStates").InvokeAndWait();

                const string visualStateName = "MinimalWithBackButton";
                var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
                Verify.IsTrue(result.GetText().Contains(visualStateName), "Active VisualStates should include " + visualStateName);
            }
        }

void EnsureDisplayModeGroupUpdatesWhenBackButtonVisibilityChanged ( ) [inline]

Definition at line 1497 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                Log.Comment("Setup test page to be in the minimal display mode with the backbutton hidden...");
                Log.Comment("Hide backbutton");
                var backButtonCheckBox = new CheckBox(FindElement.ByName("BackButtonVisibilityCheckbox"));
                backButtonCheckBox.Uncheck();
                Wait.ForIdle();

                Log.Comment("Change display mode to left minimal");
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
                Wait.ForIdle();

                TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
                Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                Log.Comment("Get NavView Active VisualStates");
                var getNavViewActiveVisualStatesButton = new Button(FindElement.ByName("GetNavViewActiveVisualStates"));
                getNavViewActiveVisualStatesButton.Invoke();
                Wait.ForIdle();

                const string visualStateName = "MinimalWithBackButton";
                var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
                Verify.IsFalse(result.GetText().Contains(visualStateName), "Active VisualStates should not include " + visualStateName);

                Log.Comment("Show backbutton");
                backButtonCheckBox.Check();
                Wait.ForIdle();

                Log.Comment("Get NavView Active VisualStates");
                getNavViewActiveVisualStatesButton.Invoke();
                Wait.ForIdle();
                Verify.IsTrue(result.GetText().Contains(visualStateName), "Active VisualStates should include " + visualStateName);
            }
        }

void EnsurePaneHeaderCanBeModifiedForLeftNav ( ) [inline]

Definition at line 1477 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                EnsurePaneHeaderCanBeModifiedHelper(RegressionTestType.LeftNav);
            }
        }

void EnsurePaneHeaderCanBeModifiedForTopNav ( ) [inline]

Definition at line 1487 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                EnsurePaneHeaderCanBeModifiedHelper(RegressionTestType.TopNav);
            }
        }

void HierarchyItemsAccessibilitySetAndLevelTest ( ) [inline]

Definition at line 873 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                Log.Comment("Setting focus to Menu Item 15");
                UIObject menuItem15 = FindElement.ByName("Menu Item 15");
                menuItem15.SetFocus();
                Wait.ForIdle();

                AutomationElement ae = AutomationElement.FocusedElement;
                int positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                int sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
                int itemLevel = (int)ae.GetCurrentPropertyValue(AutomationElement.LevelProperty);

                Verify.AreEqual(4, positionInSet, "Position in set");
                Verify.AreEqual(15, sizeOfSet, "Size of set");
                Verify.AreEqual(1, itemLevel, "Level of item");

                Log.Comment("Expanding Menu Item 15.");
                InputHelper.LeftClick(menuItem15);
                Wait.ForIdle();

                Log.Comment("Setting focus to Menu Item 17");
                UIObject menuItem17 = FindElement.ByName("Menu Item 17");
                menuItem17.SetFocus();
                Wait.ForIdle();

                ae = AutomationElement.FocusedElement;
                positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
                itemLevel = (int)ae.GetCurrentPropertyValue(AutomationElement.LevelProperty);

                Verify.AreEqual(2, positionInSet, "Position in set, not including separator/header");
                Verify.AreEqual(3, sizeOfSet, "Size of set");
                Verify.AreEqual(2, itemLevel, "Level of item");
            }
        }

void IsPaneToggleButtonVisibleTest ( ) [inline]

Definition at line 134 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Verify that toggle button item is enabled by default");
                    VerifyElement.Found("TogglePaneButton", FindBy.Id);

                    CheckBox toggleCheckbox = new CheckBox(FindElement.ByName("PaneToggleButtonVisiblityCheckbox"));

                    Log.Comment("Verify that toggle button is not visible when IsPaneToggleButtonVisible == false");
                    toggleCheckbox.Uncheck();
                    Wait.ForIdle();
                    VerifyElement.NotFound("TogglePaneButton", FindBy.Id);

                    Log.Comment("Verify that settings item is visible when IsSettingsVisible == true");
                    toggleCheckbox.Check();
                    Wait.ForIdle();
                    VerifyElement.Found("SettingsItem", FindBy.Id);
                }
            }
        }

void IsSettingsVisibleTest ( ) [inline]

Definition at line 106 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildAllRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Verify that settings item is enabled by default");
                    VerifyElement.Found("Settings", FindBy.Name);

                    CheckBox settingsCheckbox = new CheckBox(FindElement.ByName("SettingsItemVisibilityCheckbox"));

                    Log.Comment("Verify that settings item is not visible when IsSettingsVisible == false");
                    settingsCheckbox.Uncheck();
                    ElementCache.Clear();
                    Wait.ForIdle();
                    VerifyElement.NotFound("Settings", FindBy.Name);

                    Log.Comment("Verify that settings item is visible when IsSettingsVisible == true");
                    settingsCheckbox.Check();
                    Wait.ForIdle();
                    VerifyElement.Found("Settings", FindBy.Name);
                }
            }
        }

void ItemsAccessibilitySetTest ( ) [inline]

Definition at line 825 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Setting focus to Games");
                    UIObject gamesItem = FindElement.ByName("Games");
                    gamesItem.SetFocus();
                    Wait.ForIdle();

                    AutomationElement ae = AutomationElement.FocusedElement;
                    int positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                    int sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                    Verify.AreEqual(3, positionInSet, "Position in set");
                    Verify.AreEqual(3, sizeOfSet, "Size of set");

                    Log.Comment("Setting focus to Movies");
                    UIObject moviesItem = FindElement.ByName("Movies");
                    moviesItem.SetFocus();
                    Wait.ForIdle();

                    ae = AutomationElement.FocusedElement;
                    positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                    sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                    Verify.AreEqual(2, positionInSet, "Position in set, not including separator/header");
                    Verify.AreEqual(2, sizeOfSet, "Size of set");

                    Log.Comment("Setting focus to HasChildItem");
                    UIObject hasChildItem = FindElement.ByName("HasChildItem");
                    hasChildItem.SetFocus();
                    Wait.ForIdle();

                    ae = AutomationElement.FocusedElement;
                    positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                    sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                    Verify.AreEqual(5, positionInSet, "Position in set, not including separator/header");
                    Verify.AreEqual(5, sizeOfSet, "Size of set");
                }
            }
        }

void ItemSourceTest ( ) [inline]

Definition at line 312 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
            {
                var addButton = FindElement.ByName<Button>("AddItemButton");
                var removeButton = FindElement.ByName<Button>("RemoveItemButton");

                var addFooterButton = FindElement.ByName<Button>("AddFooterItemButton");
                var removeFooterButton = FindElement.ByName<Button>("RemoveFooterItemButton");

                Log.Comment("Verify that the MenuItemsSource was loaded and is selected");
                UIObject item1 = FindElement.ByName("Menu Item 1");
                Verify.IsNotNull(item1);
                Verify.IsTrue(Convert.ToBoolean(item1.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                Log.Comment("Verify that menu items added to MenuItemsSource appear in the list");
                addButton.Invoke();
                Wait.ForIdle();
                VerifyElement.Found("New Menu Item", FindBy.Name);

                Log.Comment("Verify that menu items removed from MenuItemsSource disappear from the list");
                removeButton.Invoke();
                Wait.ForIdle();
                VerifyElement.NotFound("New Menu Item", FindBy.Name);

                Log.Comment("Verify that footer menu items added to FooterMenuItemsSource appear in the list");
                addFooterButton.Invoke();
                Wait.ForIdle();
                VerifyElement.Found("New Footer Item", FindBy.Name);

                Log.Comment("Verify that footer menu items removed from FooterMenuItemsSource disappear from the list");
                removeFooterButton.Invoke();
                Wait.ForIdle();
                VerifyElement.NotFound("New Footer Item", FindBy.Name);
            }
        }

void ItemsSourceAccessibilitySetTest ( ) [inline]

Definition at line 913 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
            {
                Log.Comment("Set focus to second menu item");
                UIObject item = FindElement.ByName("Menu Item 2");
                item.SetFocus();
                Wait.ForIdle();

                AutomationElement ae = AutomationElement.FocusedElement;
                int positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                int sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                // choose 2nd item so if it accidentally succeeds
                // on firstor last item, we don't get false positives
                Verify.AreEqual(2, positionInSet, "Position in set");
                Verify.AreEqual(4, sizeOfSet, "Size of set");

                // Perform the test again with an IIterable (IEnumerable in C# projection)
                Button changeButton = new Button(FindElement.ByName("ChangeToIEnumerableButton"));
                changeButton.Invoke();
                Wait.ForIdle();
                ElementCache.Clear();

                Log.Comment("Set focus to second menu item [2]");
                item = FindElement.ByName("IIterator/Enumerable/LinkedList Item 2");
                item.SetFocus();
                Wait.ForIdle();

                ae = AutomationElement.FocusedElement;
                positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                // choose 2nd item so if it accidentally succeeds
                // on firstor last item, we don't get false positives
                Verify.AreEqual(2, positionInSet, "Position in set [2]");
                Verify.AreEqual(3, sizeOfSet, "Size of set [2]");
            }
        }

void KeyboardFocusToolTipTest ( ) [inline]

Definition at line 1156 of file CommonTests.cs.

        {
            using (IDisposable page1 = new TestSetupHelper("NavigationView Tests"),
                page2 = new TestSetupHelper("NavigationView Test"))
            {
                SetNavViewWidth(ControlWidth.Medium);
                Wait.ForIdle();

                // ToolTip is not reliable on RS2, try many times
                bool foundToolTip = false;
                for (int i = 0; i < 5; i++)
                {
                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                    togglePaneButton.SetFocus();
                    Wait.ForIdle();

                    UIObject home = FindElement.ByName("Home");
                    Button copyTextButton = new Button(FindElement.ById("CopyGamesLabelButton"));
                    TextBlock toolTipStatusTextBlock = new TextBlock(FindElement.ByName("ToolTipStatusTextBlock"));

                    Log.Comment("tab from the TogglePaneButton goes to the search box");
                    KeyboardHelper.PressKey(Key.Tab);
                    Wait.ForIdle();

                    Log.Comment("Down key from search box goes to the first item");
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();

                    Verify.IsTrue(home.HasKeyboardFocus);
                    using (var waiter = new ToolTipOpenedWaiter())
                    {
                        KeyboardHelper.PressKey(Key.Down);

                        Log.Comment("Waiting for tooltip open event");
                        waiter.Wait(TimeSpan.FromSeconds(5));
                    }

                    copyTextButton.Invoke();
                    Wait.ForIdle();
                    if (toolTipStatusTextBlock.DocumentText != null && !toolTipStatusTextBlock.DocumentText.Contains("popups"))
                    {
                        Log.Comment("Found ToolTip on Iteration " + i);
                        Verify.AreEqual("Apps", toolTipStatusTextBlock.DocumentText);
                        foundToolTip = true;
                        break;
                    }
                    else
                    {
                        Log.Comment("ToolTip Window may be closed, and didn't find ToolTip on Iteration " + i);
                    }

                }
                Verify.IsTrue(foundToolTip, "Found ToolTip");
            }
        }

void LeftNavigationFocusKindRevealTest ( ) [inline]

Definition at line 641 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                Log.Comment("Invoke button GetHomeItemRevealVisualState");
                Button getHomeItemRevealVisualState = new Button(FindElement.ByName("GetHomeItemRevealVisualState"));
                getHomeItemRevealVisualState.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify No OnLeftNavigationReveal visualstate");
                var state = TryFindElement.ById("OnLeftNavigationRevealVisualState");
                Verify.AreEqual("False", state.GetText());

                Log.Comment("Change FocusVisualKind to Reveal");
                Button changeFocusVisualKind = new Button(FindElement.ByName("ChangeFocusVisualKind"));
                changeFocusVisualKind.Invoke();
                Wait.ForIdle();

                Log.Comment("Invoke button GetHomeItemRevealVisualState");
                getHomeItemRevealVisualState.Invoke();
                Wait.ForIdle();
                // changing FocusVisualKind impacts others test cases, and we need to change it back immediately.
                // So recover it to default before verify state1 visualstate
                var state1 = state.GetText();

                Log.Comment("Change FocusVisualKind to default");
                changeFocusVisualKind.Invoke();
                Wait.ForIdle();

                Log.Comment("Invoke button GetHomeItemRevealVisualState");
                getHomeItemRevealVisualState.Invoke();
                Wait.ForIdle();
                var state2 = state.GetText();

                Verify.AreEqual("True", state1, "There is OnLeftNavigationReveal visualstate");
                Verify.AreEqual("False", state2, "No OnLeftNavigationReveal visualstate");
            }
        }

void LeftNavigationWithAccessKeysTest ( ) [inline]

Definition at line 721 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Set control to compact");
                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();

                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    Log.Comment("Verify that the pane is closed");
                    TestEnvironment.VerifyAreEqualWithRetry(20,
                        () => ToggleState.Off,
                        () => isPaneOpenCheckBox.ToggleState,
                        () =>
                        {
                            Task.Delay(TimeSpan.FromMilliseconds(100)).Wait(); // UIA's state isn't updating immediately. Wait a sec.
                            ElementCache.Clear(); /* Test is flaky sometimes -- perhaps element cache is stale? Clear it and try again. */
                        });

                    InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement("TogglePaneButton");

                    Log.Comment("Verify that the pane is open");
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
                }
            }
        }

void MenuItemKeyboardInvokeTest ( ) [inline]

Definition at line 754 of file CommonTests.cs.

        {
            // On RS2 scrollviewer handles arrow keys and this causes an issue with the current setup of the "NavigationView Test" test page
            // used for the left NavigationView test. So instead we now execute this test on the "NavigationView Regression Test" test page for
            // left navigation.
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Regression Test" }))
            {
                Log.Comment("Verify the first menu item has focus and is selected");
                UIObject firstItem = FindElement.ByName("Home");
                firstItem.SetFocus();
                Verify.IsTrue(firstItem.HasKeyboardFocus);
                Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                Log.Comment("Move focus to the second menu item by pressing down arrow");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();

                Log.Comment("Verify second menu item has focus but is not selected");
                UIObject secondItem = FindElement.ByName("Apps");
                Verify.IsTrue(secondItem.HasKeyboardFocus);
                Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                Log.Comment("Select the second item by pressing enter");
                KeyboardHelper.PressKey(Key.Enter);
                Wait.ForIdle();
                Verify.IsTrue(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
            }
        }

void NavigationViewDensityChange ( ) [inline]

Definition at line 508 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                int height = FindElement.ById("AppsItem").BoundingRectangle.Height;
                Verify.AreEqual(height, 36);
            }
        }

void ScrollToMenuItemTest ( ) [inline]

Definition at line 980 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    SetNavViewHeight(ControlHeight.Small);

                    UIObject lastItem = FindElement.ByName("TV");
                    UIObject firstItem = FindElement.ByName("Home");

                    Log.Comment("Verify last item is offscreen");
                    Verify.AreEqual(true, lastItem.IsOffscreen);

                    Log.Comment("Move focus to the last item by giving focus to the toggle pane button then tab twice then down arrow 5 times");
                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));

                    togglePaneButton.SetFocus();
                    Wait.ForIdle();

                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 2);
                    Wait.ForIdle();

                    Verify.IsTrue(firstItem.HasKeyboardFocus);
                    AutomationElement firstItemAE = AutomationElement.FocusedElement;
                    KeyboardHelper.PressKey(Key.Down, ModifierKey.None, 5);
                    Wait.ForIdle();

                    Verify.IsTrue(lastItem.HasKeyboardFocus, "Verify last item has keyboard focus");

                    Log.Comment("Verify the last item is now onscreen");
                    Verify.AreEqual(false, lastItem.IsOffscreen);
                    Log.Comment("Verify the first item is now offscreen");
                    Verify.AreEqual(true, firstItem.IsOffscreen);

                    Log.Comment("Scroll to the first item using the automation ScrollItemPattern");
                    ScrollItemPattern firstItemSIP = firstItemAE.GetCurrentPattern(ScrollItemPattern.Pattern) as ScrollItemPattern;
                    firstItemSIP.ScrollIntoView();
                    Wait.ForIdle();

                    Log.Comment("Verify the first item is onscreen again");
                    Verify.AreEqual(false, firstItem.IsOffscreen);
                }
            }
        }

void SettingsAccessibilitySetTest ( ) [inline]

Definition at line 785 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildAllRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Setting focus to Settings");
                    UIObject settingsItem = FindElement.ByName("Settings");
                    settingsItem.SetFocus();
                    Wait.ForIdle();

                    AutomationElement ae = AutomationElement.FocusedElement;
                    int positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                    int sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                    Verify.AreEqual(1, positionInSet, "Position in set");
                    Verify.AreEqual(1, sizeOfSet, "Size of set");

                    var addButton = FindElement.ById<Button>("AddFooterItemButton");
                    var removeButton = FindElement.ById<Button>("RemoveFooterItemButton");

                    addButton.Invoke();
                    addButton.Invoke();
                    Wait.ForIdle();

                    positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                    sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                    Verify.AreEqual(3, positionInSet, "Position in set");
                    Verify.AreEqual(3, sizeOfSet, "Size of set");

                    removeButton.Invoke();
                    removeButton.Invoke();
                }
            }
        }

void SettingsItemGamepadTest ( ) [inline]

Definition at line 955 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildAllRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    UIObject settingsItem = FindElement.ByName("Settings");

                    settingsItem.SetFocus();
                    Wait.ForIdle();

                    Log.Comment("Invoking settings through the gamepad");
                    GamepadHelper.PressButton(settingsItem, GamepadButton.A);
                    Wait.ForIdle();

                    Log.Comment("Verify settings is selected");
                    TextBlock header = new TextBlock(FindElement.ByName("Settings as header"));
                    Verify.AreEqual("Settings as header", header.DocumentText);
                }
            }
        }

void SystemBackTest ( ) [inline]

Definition at line 1029 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Set control to compact");
                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();

                    Log.Comment("Open pane");
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                    isPaneOpenCheckBox.Check();
                    Wait.ForIdle();

                    Log.Comment("Click back button (invoking does not work)");
                    Button backButton = new Button(FindElement.ById("__BackButton"));
                    backButton.Click(); // NOTE: Must be Click because this is verifying that the mouse light dismiss behavior closes the nav view
                    Wait.ForIdle();

                    Log.Comment("Verify that the pane is closed");

                    TestEnvironment.VerifyAreEqualWithRetry(20,
                        () => ToggleState.Off,
                        () => isPaneOpenCheckBox.ToggleState,
                        () =>
                        {
                            Task.Delay(TimeSpan.FromMilliseconds(100)).Wait(); // UIA's state isn't updating immediately. Wait a sec.
                            ElementCache.Clear(); /* Test is flaky sometimes -- perhaps element cache is stale? Clear it and try again. */
                        });

                    Log.Comment("Click pane toggle button");
                    Button navButton = new Button(FindElement.ById("TogglePaneButton"));
                    navButton.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Verify that the pane is open");
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
                }
            }
        }

void TitleBarTest ( ) [inline]

Definition at line 520 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (IDisposable page1 = new TestSetupHelper("NavigationView Tests"),
                    page2 = new TestSetupHelper(testScenario.TestPageName))
                {
                    CheckBox titleBarCheckbox = new CheckBox(FindElement.ByName("TitleBarCheckbox"));
                    CheckBox testFrameCheckbox = new CheckBox(FindElement.ByName("TestFrameCheckbox"));
                    Button navButton = new Button(FindElement.ById("TogglePaneButton"));
                    Button backButton = new Button(FindElement.ByName("NavigationViewBackButton"));
                    Button fullScreenButton = new Button(FindElement.ById("FullScreenInvokerButton"));

                    int testFrameBarHeight = FindElement.ById("__BackButton").BoundingRectangle.Height;

                    // The title bar is a peer of the CoreWindow, so we have to search one level up.
                    UIObject titleBar;
                    TestEnvironment.Application.CoreWindow.Parent.Descendants.TryFind(UICondition.CreateFromClassName("ApplicationFrameTitleBarWindow"), out titleBar);
                    int titleBarHeight = titleBar.BoundingRectangle.Height;

                    double backButtonSpace = backButton.BoundingRectangle.Height;

                    int tabbedShellAffordance = 0;

                    if (TestHelpers.SystemTabbedShellIsEnabled)
                    {
                        titleBarHeight = 0;
                        tabbedShellAffordance = testFrameBarHeight;
                        Log.Comment("Tabbed shell is enabled, adjusting expectations...");
                    }

                    Log.Comment("Test scenario: Standard NavView control.");
                    Log.Comment("Verify that the toggle button y = height of title bar + height of test frame bar + spacing of back button");
                    Verify.AreEqual(testFrameBarHeight + titleBarHeight + backButtonSpace + tabbedShellAffordance, navButton.BoundingRectangle.Y);

                    Log.Comment("Test scenario: ExtendViewIntoTitleBar:");
                    titleBarCheckbox.Uncheck();
                    Wait.ForIdle();

                    Log.Comment("Verify that the toggle button y = height of test frame bar + back button spacing");

                    TestEnvironment.VerifyAreEqualWithRetry(20,
                        () => (int)(testFrameBarHeight + backButtonSpace + tabbedShellAffordance),
                        () => (int)(navButton.BoundingRectangle.Y));

                    Log.Comment("Test scenario: Hide TestFrame:");
                    titleBarCheckbox.Check();
                    testFrameCheckbox.Uncheck();
                    Wait.ForIdle();

                    Log.Comment("Verify that the toggle button y = height of title bar + back button spacing");
                    Verify.AreEqual(titleBarHeight + backButtonSpace + tabbedShellAffordance, navButton.BoundingRectangle.Y);

                    Log.Comment("Test scenario: Hide TestFrame and ExtendViewIntoTitleBar:");
                    titleBarCheckbox.Uncheck();
                    Wait.ForIdle();

                    if (!testScenario.IsUsingRS4Style)
                    {
                        // If we extend the backbutton to titlebar area, the button is not clickable. so the new implementation keeps backbutton not in titlebar area.
                        Log.Comment("Verify that the toggle button y = height of title bar + back button spacing");
                        Verify.AreEqual(titleBarHeight + backButtonSpace + tabbedShellAffordance, navButton.BoundingRectangle.Y);
                    }
                    else
                    {
                        // To maintain back compat we maintain RS4 behavior when using the RS4 style:
                        Log.Comment("Verify that the toggle button y = back button spacing");
                        Verify.AreEqual(backButtonSpace + tabbedShellAffordance, navButton.BoundingRectangle.Y);
                    }

                    Log.Comment("Test scenario: Fullscreen mode:");
                    Log.Comment("Invoking fullscreen button:");
                    fullScreenButton.Invoke();
                    Wait.ForIdle();

                    TestEnvironment.VerifyAreEqualWithRetry(20,
                        () => 0,
                        () => backButton.BoundingRectangle.Y);
                    Log.Comment("Verify that the toggle button y = back button spacing");
                    Verify.AreEqual(backButtonSpace + tabbedShellAffordance, navButton.BoundingRectangle.Y);

                    fullScreenButton.Invoke();
                    Wait.ForIdle();
                    titleBarCheckbox.Check();
                    testFrameCheckbox.Check();
                }
            }
        }

void ToolTipCustomContentTest ( ) [inline]

Definition at line 1215 of file CommonTests.cs.

        {
            // Since RS5, ToolTip is removed from ControlTemplate. and this test case can't be run on "NavigationView Tests" page
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Regression Test" }))
            {
                // Close the pane
                Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                Verify.IsNotNull(togglePaneButton, "Finding TogglePaneButton");
                togglePaneButton.Invoke();
                Wait.ForIdle();

                Button volumeToolTipCopyButton = new Button(FindElement.ByName("CopyVolumeToolTipButton"));
                Verify.IsNotNull(togglePaneButton, "Finding CopyVolumeToolTipButton");

                TextBlock toolTipStatusTextBlock = new TextBlock(FindElement.ByName("ToolTipStatusTextBlock"));
                Verify.IsNotNull(togglePaneButton, "Finding ToolTipStatusTextBlock");

                volumeToolTipCopyButton.Invoke();
                Wait.ForIdle();

                Verify.AreEqual("The volume navigation view item tooltip content is null", toolTipStatusTextBlock.DocumentText);
            }
        }

void ToolTipTest ( ) [inline]

Definition at line 1090 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (IDisposable page1 = new TestSetupHelper("NavigationView Tests"),
                    page2 = new TestSetupHelper(testScenario.TestPageName))
                {
                    // Close the pane
                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                    togglePaneButton.Invoke();
                    Wait.ForIdle();

                    UIObject menuItem = FindElement.ByName("Games");
                    Verify.AreEqual(ControlType.ListItem, menuItem.ControlType);

                    Button reverseButton = new Button(FindElement.ById("ReverseButton"));

                    Button copyTextButton = new Button(FindElement.ById("CopyGamesLabelButton"));
                    copyTextButton.Invoke();
                    Wait.ForIdle();

                    TextBlock toolTipStatusTextBlock = new TextBlock(FindElement.ByName("ToolTipStatusTextBlock"));
                    Verify.AreEqual("There are no popups", toolTipStatusTextBlock.DocumentText);

                    using (var waiter = new ToolTipOpenedWaiter())
                    {
                        menuItem.Click(); // I think the underlying SinglePointGesture doesn't do what you expect sometimes unless you click first
                        menuItem.MovePointer();
                        Log.Comment("Waiting for tooltip open event");
                        if (waiter != null)
                        {
                            waiter.Wait();
                        }

                        copyTextButton.Invoke();

                        Verify.AreEqual("Games", toolTipStatusTextBlock.DocumentText); // Verify default case
                    }

                    reverseButton.MovePointer(); // dismissssss the tooltip
                    reverseButton.Invoke();
                    Wait.ForIdle();

                    using (var waiter = new ToolTipOpenedWaiter())
                    {
                        menuItem.Click(); // I think the underlying SinglePointGesture doesn't do what you expect sometimes unless you click first
                        menuItem.MovePointer();
                        Log.Comment("Waiting for tooltip open event [2]");
                        if (waiter != null)
                        {
                            waiter.Wait();
                        }

                        copyTextButton.Invoke();

                        Verify.AreEqual("semaG", toolTipStatusTextBlock.DocumentText); // Verify tooltips change when content changes
                    }
                }
            }
        }

void VerifyAddingChildItemsToNavigationViewItem ( ) [inline]

Definition at line 1835 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                Log.Comment("Verify MI19 does not have the child item we are going to look for.");

                Log.Comment("Click on MI19.");
                var menuItem19 = FindElement.ByName("Menu Item 19");
                InputHelper.LeftClick(menuItem19);
                Wait.ForIdle();

                var childItem = FindElement.ByName("Child of MI19");
                Verify.IsNull(childItem, "MI19 should not have this child item.");

                Log.Comment("Programmatically add a child item to MI19.");
                FindElement.ByName<Button>("Add Child Item to MenuItem19").Invoke();

                Log.Comment("Expand MI19.");
                InputHelper.LeftClick(menuItem19);
                Wait.ForIdle();

                Log.Comment("Verify MI19 has the child item we just added.");
                var newChildItem = FindElement.ByName("Child of MI19");
                Verify.IsNotNull(newChildItem, "MI19 should have a new child item.");
            }
        }

void VerifyAddingNewItemsFromIndexZero ( ) [inline]

Definition at line 1908 of file CommonTests.cs.

        {
            // Regression test for #46242746
            // Before fix, adding new items in this manner would result in
            // two NavigationViewItems to show up both named Item 0.
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationViewMenuItemsSourcePage" }))
            {
                // Verify that "Item 0" does not exist
                var item0 = FindElement.ByName("Item 0");
                Verify.IsNull(item0, "Item 0 should not exist");

                // Verify that "Item 1" does not exist
                var item1 = FindElement.ByName("Item 1");
                Verify.IsNull(item1, "Item 1 should not exist");

                // Find and click the button "BtnInsertItemsFromBeginning"
                var btnInsertItemsFromBeginning = FindElement.ByName<Button>("BtnInsertItemsFromBeginning");
                Verify.IsNotNull(btnInsertItemsFromBeginning, "BtnInsertItemsFromBeginning should be non-null!");
                btnInsertItemsFromBeginning.InvokeAndWait();

                // Verify that "Item 0" exists
                item0 = FindElement.ByName("Item 0");
                Verify.IsNotNull(item0, "Item 0 should exist");

                // Verify that "Item 1" exists
                item1 = FindElement.ByName("Item 1");
                Verify.IsNotNull(item1, "Item 1 should exist");
            }
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 39 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper("NavigationView-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

void VerifyBackButtonHidesWhenInMinimalOpenState ( ) [inline]

Definition at line 615 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));

                    Log.Comment("Test the adaptive layout with the default Compact and Expanded mode Thresholds");
                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                    isPaneOpenCheckBox.Check();
                    Wait.ForIdle();

                    VerifyElement.NotFound("NavigationViewBackButton", FindBy.Name);
                }
            }
        }

void VerifyCanCancelClosing ( ) [inline]

Definition at line 1330 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    SetNavViewWidth(ControlWidth.Medium);

                    var cancelClosingCheckbox = new CheckBox(FindElement.ById("CancelClosingEvents"));
                    cancelClosingCheckbox.Toggle();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, cancelClosingCheckbox.ToggleState);

                    var isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");

                    Log.Comment("Reset the event count");
                    new Button(FindElement.ById("ClosingEventCountResetButton")).Invoke();
                    Wait.ForIdle();

                    Log.Comment("Open the Pane");
                    using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                    {
                        isPaneOpenCheckBox.Toggle();
                        waiter.Wait();
                    }
                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    var closingCounts = new Edit(FindElement.ByName("ClosingEventCountTextBlock"));
                    var expectedString = "1-0";

                    //  trigger a light dismiss
                    KeyboardHelper.PressKey(Key.Left, ModifierKey.Alt);
                    Wait.ForIdle();

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState,
                        "Verify Alt+Left light dismiss doesn't dismiss the pane when closing events are being canceled");

                    Verify.AreEqual(expectedString, closingCounts.GetText());
                }
            }
        }

void VerifyClickingNavigationViewItemInPaneFooterDoesNotCrash ( ) [inline]

Definition at line 1896 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                Log.Comment("Click on PaneFooterNavigationViewItem.");
                var paneFooterNavigationViewItem = FindElement.ByName("PaneFooterNavigationViewItem");
                InputHelper.LeftClick(paneFooterNavigationViewItem);
                Wait.ForIdle();
            }
        }

void VerifyCustomHeaderContentTest ( ) [inline]

Definition at line 1241 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    TextBlock tb = new TextBlock(FindElement.ByName("Home as header"));
                    Verify.AreEqual("Home as header", tb.DocumentText, "Verify initial Header text");

                    Button button = new Button(FindElement.ByName("SetHeaderButton"));
                    button.Invoke();
                    Wait.ForIdle();

                    tb = new TextBlock(FindElement.ByName("Bananas"));
                    Verify.AreEqual("Bananas", tb.DocumentText, "Verify new TextBlock child was set as the Header");
                }
            }
        }

void VerifyExpandCollapseFunctionality ( ) [inline]

Definition at line 1555 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildHierarchicalNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {

                    TextBlock textblockExpandingItemAndContainerMatch = new TextBlock(FindElement.ByName("TextblockExpandingItemAndContainerMatch"));
                    TextBlock textblockCollapsedItemAndContainerMatch = new TextBlock(FindElement.ByName("TextblockCollapsedItemAndContainerMatch"));
                    TextBlock textBlockExpandingItem = new TextBlock(FindElement.ByName("TextBlockExpandingItem"));
                    TextBlock textBlockCollapsedItem = new TextBlock(FindElement.ByName("TextBlockCollapsedItem"));

                    Log.Comment("Verify that first menu item is not expanded.");
                    // Verify through test page elements
                    Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "N/A");
                    Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "N/A");
                    Verify.AreEqual(textBlockExpandingItem.DocumentText, "N/A");
                    Verify.AreEqual(textBlockCollapsedItem.DocumentText, "N/A");
                    // Verify that second menu item is not in tree
                    var firstItem = FindElement.ByName("Menu Item 1");
                    var childItem = FindElement.ByName("Menu Item 2");
                    Verify.IsNull(childItem);

                    Log.Comment("Expand first menu item.");
                    InputHelper.LeftClick(firstItem);
                    Wait.ForIdle();

                    Log.Comment("Verify that first menu item was expanded correctly.");
                    // Verify through test page elements
                    Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "true");
                    Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "N/A");
                    Verify.AreEqual(textBlockExpandingItem.DocumentText, "Menu Item 1");
                    Verify.AreEqual(textBlockCollapsedItem.DocumentText, "N/A");
                    // Verify that second menu item is in tree
                    childItem = FindElement.ByName("Menu Item 2");
                    Verify.IsNotNull(childItem, "Child item should be visible after expanding parent item.");

                    Log.Comment("Expand child of first menu item.");
                    InputHelper.LeftClick(childItem);
                    Wait.ForIdle();

                    Log.Comment("Verify that child of first menu item was expanded correctly.");
                    // Verify through test page elements
                    Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "true");
                    Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "N/A");
                    Verify.AreEqual(textBlockExpandingItem.DocumentText, "Menu Item 2");
                    Verify.AreEqual(textBlockCollapsedItem.DocumentText, "N/A");
                    // Verify that third child menu item is in tree
                    var secondChildItem = FindElement.ByName("Menu Item 4");
                    Verify.IsNotNull(secondChildItem, "Child item should be visible after expanding parent item.");

                    Log.Comment("Collapse child of first menu item.");
                    InputHelper.LeftClick(childItem, 5, 5);
                    Wait.ForIdle();

                    Log.Comment("Verify that child of first menu item was collapsed correctly.");
                    // Verify through test page elements
                    Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "true");
                    Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "true");
                    Verify.AreEqual(textBlockExpandingItem.DocumentText, "Menu Item 2");
                    Verify.AreEqual(textBlockCollapsedItem.DocumentText, "Menu Item 2");

                    Log.Comment("Collapse first menu item.");
                    InputHelper.LeftClick(firstItem, 5, 5);
                    Wait.ForIdle();

                    Log.Comment("Verify that first menu item was collapsed correctly.");
                    // Verify through test page elements
                    Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "true");
                    Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "true");
                    Verify.AreEqual(textBlockExpandingItem.DocumentText, "Menu Item 2");
                    Verify.AreEqual(textBlockCollapsedItem.DocumentText, "Menu Item 1");
                }
            }
        }

void VerifyExpandCollapseFunctionalityUsingChevron ( ) [inline]

Definition at line 1635 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {

                TextBlock textblockExpandingItemAndContainerMatch = new TextBlock(FindElement.ByName("TextblockExpandingItemAndContainerMatch"));
                TextBlock textblockCollapsedItemAndContainerMatch = new TextBlock(FindElement.ByName("TextblockCollapsedItemAndContainerMatch"));
                TextBlock textBlockExpandingItem = new TextBlock(FindElement.ByName("TextBlockExpandingItem"));
                TextBlock textBlockCollapsedItem = new TextBlock(FindElement.ByName("TextBlockCollapsedItem"));

                Log.Comment("Verify that Menu Item 6 is not expanded.");
                // Verify through test page elements
                Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "N/A");
                Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "N/A");
                Verify.AreEqual(textBlockExpandingItem.DocumentText, "N/A");
                Verify.AreEqual(textBlockCollapsedItem.DocumentText, "N/A");
                // Verify that child menu item is not in tree
                UIObject parentItem = FindElement.ByName("Menu Item 6 (Selectable)");
                UIObject childItem = FindElement.ByName("Menu Item 7 (Selectable)");
                Verify.IsNull(childItem);

                Log.Comment("Expand Menu Item 6.");
                InputHelper.LeftClick(parentItem, parentItem.BoundingRectangle.Width - 20 , parentItem.BoundingRectangle.Height / 2 + 10);
                Wait.ForIdle();

                Log.Comment("Verify that Menu Item 6 was expanded correctly.");
                // Verify through test page elements
                Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "true");
                Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "N/A");
                Verify.AreEqual(textBlockExpandingItem.DocumentText, "Menu Item 6 (Selectable)");
                Verify.AreEqual(textBlockCollapsedItem.DocumentText, "N/A");
                // Verify that child menu item is in tree
                childItem = FindElement.ByName("Menu Item 7 (Selectable)");
                Verify.IsNotNull(childItem, "Child item should be visible after expanding parent item.");

                Log.Comment("Try collapse Menu Item 6 using an invalid right click.");
                InputHelper.RightClick(parentItem, parentItem.BoundingRectangle.Width - 25, 25);
                Wait.ForIdle();

                Log.Comment("Verify that Menu Item 6 was not collapsed.");
                // Verify through test page elements
                Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "true");
                Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "N/A");
                Verify.AreEqual(textBlockExpandingItem.DocumentText, "Menu Item 6 (Selectable)");
                Verify.AreEqual(textBlockCollapsedItem.DocumentText, "N/A");

                Log.Comment("Collapse Menu Item 6 using left click.");
                InputHelper.LeftClick(parentItem, parentItem.BoundingRectangle.Width - 25, 25);
                Wait.ForIdle();

                Log.Comment("Verify that Menu Item 6 was collapsed correctly.");
                // Verify through test page elements
                Verify.AreEqual(textblockExpandingItemAndContainerMatch.DocumentText, "true");
                Verify.AreEqual(textblockCollapsedItemAndContainerMatch.DocumentText, "true");
                Verify.AreEqual(textBlockExpandingItem.DocumentText, "Menu Item 6 (Selectable)");
                Verify.AreEqual(textBlockCollapsedItem.DocumentText, "Menu Item 6 (Selectable)");
            }
        }

void VerifyNavigationViewItemChildrenFlyoutMenuCornerRadius ( ) [inline]

Definition at line 1785 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                Log.Comment("Set PaneDisplayMode to LeftCompact.");
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("LeftCompact");
                Wait.ForIdle();

                VerifyChildrenFlyoutMenuCornerRadius();

                // Refresh the cache to make sure that the flyout object we are going to be searching for
                // does not return as a false positive due to the caching mechanism.
                ElementCache.Clear();

                Log.Comment("Set PaneDisplayMode to Top.");
                panelDisplayModeComboBox.SelectItemByName("Top");
                Wait.ForIdle();

                VerifyChildrenFlyoutMenuCornerRadius();

                void VerifyChildrenFlyoutMenuCornerRadius()
                {
                    Log.Comment("Verify that the children menu flyout used in this test is closed.");
                    var childItem = FindElement.ByName("Menu Item 2");
                    Verify.IsNull(childItem, "Menu Item 1's children menu flyout should have been closed.");

                    Log.Comment("Select Menu Item 1 which should open children flyout.");
                    var item = FindElement.ByName("Menu Item 1");
                    InputHelper.LeftClick(item);
                    Wait.ForIdle();

                    childItem = FindElement.ByName("Menu Item 2");
                    Verify.IsNotNull(childItem, "Menu Item 1's children menu flyout should have been open.");

                    Log.Comment("Get CornerRadius of Menu Item 1's children menu flyout.");
                    FindElement.ByName<Button>("GetMenuItem1ChildrenFlyoutCornerRadiusButton").Invoke();

                    // A CornerRadius of (8,8,8,8) is the current default value for flyouts.
                    TextBlock menuItem1ChildrenFlyoutCornerRadiusTextBlock = new TextBlock(FindElement.ByName("MenuItem1ChildrenFlyoutCornerRadiusTextBlock"));
                    Verify.AreEqual("8,8,8,8", menuItem1ChildrenFlyoutCornerRadiusTextBlock.DocumentText);

                    // Close flyout
                    InputHelper.LeftClick(item);
                    Wait.ForIdle();
                }
            }
        }

void VerifyNavigationViewItemContentPresenterMargin ( ) [inline]

Definition at line 1728 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var getTopLevelContentPresenterMarginButton = FindElement.ById<Button>("GetTopLevelNavViewItemContentPresenterMarginButton");
                var getChildContentPresenterMarginButton = FindElement.ById<Button>("GetChildNavViewItemContentPresenterMarginButton");
                var contentPresenterMarginTextBlock = new TextBlock(FindElement.ByName("NavViewItemContentPresenterMarginTextBlock"));

                var scrollItemIntoViewComboBox = new ComboBox(FindElement.ByName("ScrollItemIntoViewComboBox"));
                var scrollItemIntoViewButton = FindElement.ById<Button>("ScrollItemIntoViewButton");

                // Switch the NavigationView to closed compact mode
                Log.Comment("Switch NavigationView to closed compact mode");
                SetNavViewWidth(ControlWidth.Medium);
                Wait.ForIdle();

                Log.Comment("Ensure test menu item is in view");
                scrollItemIntoViewComboBox.SelectItemByName("HasChildItem");
                Wait.ForIdle();
                scrollItemIntoViewButton.InvokeAndWait();

                // Verify that top-level items use the correct content margin
                getTopLevelContentPresenterMarginButton.InvokeAndWait();
                Verify.AreEqual("0,0,0,0", contentPresenterMarginTextBlock.DocumentText);

                // Child items in closed compact mode are shown in a flyout. Verify that they are using the correct margin
                Log.Comment("Expand item with children");
                UIObject hasChildItem = FindElement.ByName("HasChildItem");
                InputHelper.LeftClick(hasChildItem);
                Wait.ForMilliseconds(100); // Give a little bit of time for the flyout to open, then wait for idle.
                Wait.ForIdle();

                getChildContentPresenterMarginButton.InvokeAndWait();
                Verify.AreEqual("4,0,20,0", contentPresenterMarginTextBlock.DocumentText);

                // Close opened flyout
                InputHelper.LeftClick(hasChildItem);
                Wait.ForIdle();

                // Switch the NavigationView to expanded mode
                Log.Comment("Switch NavigationView to expanded mode");
                SetNavViewWidth(ControlWidth.Wide);
                Wait.ForIdle();

                Log.Comment("Ensure test menu item is in view");
                scrollItemIntoViewComboBox.SelectItemByName("HasChildItem");
                Wait.ForIdle();
                scrollItemIntoViewButton.InvokeAndWait();

                // Verify that top-level items use the correct content margin
                getTopLevelContentPresenterMarginButton.InvokeAndWait();
                Verify.AreEqual("4,0,20,0", contentPresenterMarginTextBlock.DocumentText);
            }
        }

void VerifyNavigationViewItemInPaneFooterHasTemplateSettingBindings ( ) [inline]

Definition at line 1863 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneFooterTestPage" }))
            {
                TextBlock paneFooterNavViewItemWidthTextBlock = new TextBlock(FindElement.ByName("PaneFooterNavViewItemWidth"));
                ComboBox compactPaneLengthComboBox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
                UIObject getIconColumnWidth = FindElement.ByName("GetIconColumnWidth");

                getIconColumnWidth.Click();

                Log.Comment("Verify IconColumnWidth is binded correctly to SmallerIconWidthProperty");
                Verify.AreEqual("40", paneFooterNavViewItemWidthTextBlock.DocumentText);

                Log.Comment("Change CompactPaneLength to 40px");
                compactPaneLengthComboBox.SelectItemByName("40");
                Wait.ForIdle();

                getIconColumnWidth.Click();
                Wait.ForIdle();

                Verify.AreEqual("32", paneFooterNavViewItemWidthTextBlock.DocumentText);

                Log.Comment("Change CompactPaneLength to 96px");
                compactPaneLengthComboBox.SelectItemByName("96");
                Wait.ForIdle();
                getIconColumnWidth.Click();
                Wait.ForIdle();

                Verify.AreEqual("88", paneFooterNavViewItemWidthTextBlock.DocumentText);
            }
        }

void VerifyNoCrashWhenNavViewInContentDialog ( ) [inline]

Definition at line 1709 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                Log.Comment("Open a ContentDialog with a NavView inside.");
                Button openContentDialogButton = new Button(FindElement.ById("ContentDialogNavViewButton"));
                openContentDialogButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Close the ContentDialog with a NavView inside.");
                Button closeContentDialogButton = new Button(FindElement.ByName("Button1ContentDialog"));
                closeContentDialogButton.Invoke();
                Wait.ForIdle();
            }
        }

void VerifyNoCrashWhenSwitchingPaneDisplayModeWithAutoWrappedElements ( ) [inline]

Definition at line 1696 of file CommonTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView ItemTemplate Test" }))
            {
                Log.Comment("Verify that switching pane mode to auto does not crash.");
                var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
                flipOrientationButton.Invoke();
                Wait.ForIdle();
            }
        }

void VerifyNotShouldPreserveNavigationViewRS3Behavior ( ) [inline]

Definition at line 1399 of file CommonTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    // On phone, the pane will initially be in the closed compact state, so open it before
                    // proceeding with the test.
                    if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
                    {
                        using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                        {
                            isPaneOpenCheckBox.Toggle();
                            waiter.Wait();
                        }
                    }

                    Button navButton = new Button(FindElement.ById("TogglePaneButton"));
                    Verify.AreEqual(312, navButton.BoundingRectangle.Width);
                }
            }
        }

void VerifyShouldPreserveNavigationViewRS3Behavior ( ) [inline]

Definition at line 1428 of file CommonTests.cs.

        {
            // This test exercises how the navigation view intereacts with the titlebar, thus setting shouldRestrictInnerFrameSize to true (the default) doesn't allow us
            // to exercise the scenario, thus requiring us to disable this.
            using (var setup = new TestSetupHelper(testNames: new[] { "NavigationView Tests", "NavigationView PreserveRS3 Test" }, shouldRestrictInnerFrameSize: false))
            {
                CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                // On phone, the pane will initially be in the closed compact state, so open it before
                // proceeding with the test.
                if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
                {
                    using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                    {
                        isPaneOpenCheckBox.Toggle();
                        waiter.Wait();
                    }
                }

                // In RS4 or late application, togglePaneTopPadding is 0 when ExtendViewIntoTitleBar=true,
                // but for RS3 application, we expected it be not 0 because apps like Wallpaper make use of it
                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button button = new Button(FindElement.ById("GetTopPaddingHeight"));
                    button.Invoke();
                    waiter.Wait();
                }
                var togglePaneTopPadding = Convert.ToInt32(result.Value);

                if (TestEnvironment.Application.SupportsExtendViewIntoTitleBar)
                {
                    Verify.AreNotEqual(0, togglePaneTopPadding);
                }
                else
                {
                    Log.Comment("ExtendViewIntoTitleBar is not supported in Win32/Desktop mode, so we expect to top padding");
                    Verify.AreEqual(0, togglePaneTopPadding);
                }

                // TestFrame is disabled before the testcase. we should enable it and prepare for next test case
                var testFrame = new CheckBox(FindElement.ById("TestFrameCheckbox"));
                testFrame.Check();
                Wait.ForIdle();
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/CommonTests.cs
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EventTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • EventTests
Public Member Functions | Static Public Member Functions

EventTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests::NavigationViewTestsBase.

List of all members.

Public Member Functions

void | BackRequestedTest ()
void | MenuItemInvokedTest ()
void | SettingsItemClickTest ()
void | VerifyCorrectNumberOfEventsRaised ()
void | VerifyEventsReturnExpectedDataTypesItemTemplate ()
void | VerifyEventsReturnExpectedDataTypesMenuItems ()
void | VerifyEventsReturnExpectedDataTypesMenuItemsSource ()
void | VerifyHoldingKeyOnlyInvokesOnce ()
void | VerifyLightDismissDoesntSendDuplicateEvents ()
void | VerifyNavigationViewItemResponseToClickAfterBeingMovedBetweenFrames ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 24 of file EventTests.cs.

Member Function Documentation

void BackRequestedTest ( ) [inline]

Definition at line 228 of file EventTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    TextBlock textBlock = new TextBlock(FindElement.ByName("BackRequestedStateTextBlock"));
                    Button button = new Button(FindElement.ByName("NavigationViewBackButton"));
                    CheckBox checkBox = new CheckBox(FindElement.ByName("BackButtonEnabledCheckbox"));

                    Verify.AreEqual("Test Not Started [2]", textBlock.DocumentText);

                    checkBox.Check();
                    Wait.ForIdle();

                    button.Invoke();
                    Wait.ForIdle();

                    Verify.AreEqual("Back was requested", textBlock.DocumentText);
                }
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 31 of file EventTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void MenuItemInvokedTest ( ) [inline]

Definition at line 253 of file EventTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildTopNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Click games item");
                    UIObject menuItem = FindElement.ByName("Games");
                    InputHelper.LeftClick(menuItem);
                    Wait.ForIdle();
                    TextBlock header = new TextBlock(FindElement.ByName("Games as header"));
                    Verify.AreEqual("Games as header", header.DocumentText);

                    menuItem = FindElement.ByName("Music");

                    Log.Comment("Verify XButton1 mouse button click does not change selection");
                    InputHelper.Click(menuItem, PointerButtons.XButton1);
                    Wait.ForIdle();
                    Verify.AreEqual("Games as header", header.DocumentText);

                    Log.Comment("Verify XButton2 mouse button click does not change selection");
                    InputHelper.Click(menuItem, PointerButtons.XButton2);
                    Wait.ForIdle();
                    Verify.AreEqual("Games as header", header.DocumentText);

                    Log.Comment("Verify Secondary mouse button click does not change selection");
                    InputHelper.Click(menuItem, PointerButtons.Secondary);
                    Wait.ForIdle();
                    Verify.AreEqual("Games as header", header.DocumentText);

                    Log.Comment("Left Click music item");
                    InputHelper.LeftClick(menuItem);
                    Wait.ForIdle();
                    Verify.AreEqual("Music as header", header.DocumentText);

                    if (testScenario.IsLeftNavTest)
                    {
                        Log.Comment("Bring Settings into view.");
                        FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
                        Wait.ForIdle();
                    }

                    Log.Comment("Click settings item");
                    menuItem = FindElement.ByName("Settings");
                    InputHelper.LeftClick(menuItem);
                    Wait.ForIdle();
                    header = new TextBlock(FindElement.ByName("Settings as header"));
                    Verify.AreEqual("Settings as header", header.DocumentText);

                    Log.Comment("Move mouse to upper left to ensure that tooltip on settings closes.");
                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();
                }
            }
        }

void SettingsItemClickTest ( ) [inline]

Definition at line 311 of file EventTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildAllRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    if (testScenario.IsLeftNavTest)
                    {
                        Log.Comment("Bring Settings into view.");
                        FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
                        Wait.ForIdle();
                    }

                    UIObject settingsItem = FindElement.ByName("Settings");

                    settingsItem.SetFocus();
                    Wait.ForIdle();

                    Log.Comment("Click settings");
                    settingsItem.Click();
                    Wait.ForIdle();

                    Log.Comment("Verify settings is selected");
                    TextBlock header = new TextBlock(FindElement.ByName("Settings as header"));
                    Verify.AreEqual("Settings as header", header.DocumentText);
                }
            }
        }

void VerifyCorrectNumberOfEventsRaised ( ) [inline]

Definition at line 37 of file EventTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                TextBlock itemInvokedCountTextBlock = new TextBlock(FindElement.ByName("NumberOfItemInvokedEventsRaisedTextBlock"));
                TextBlock selectionChangedCountTextBlock = new TextBlock(FindElement.ByName("NumberOfSelectionChangedEventsRaisedTextBlock"));

                Log.Comment("Verify that only one SelectionChanged event was raised.");
                Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
                Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "1");

                Log.Comment("Invoke MusicItem.");
                UIObject item1 = FindElement.ByName("Music");
                item1.Click();
                Wait.ForIdle();

                Log.Comment("Verify event counts.");
                Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "1");
                Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "2");

                Log.Comment("Invoke selected item (MusicItem).");
                item1.Click();
                Wait.ForIdle();
                Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "2");
                Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "2");

                Log.Comment("Clear event counters.");
                Button resetEventCounters = new Button(FindElement.ByName("ResetEventCounters"));
                resetEventCounters.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
                Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "0");

                Log.Comment("Verify that switching pane mode to top does not raise any events.");
                var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
                flipOrientationButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
                Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "0");

                Log.Comment("Verify that switching pane mode to auto does not raise any events.");
                flipOrientationButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
                Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "0");
            }
        }

void VerifyEventsReturnExpectedDataTypesItemTemplate ( ) [inline]

Definition at line 142 of file EventTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView ItemTemplate Test" }))
            {
                const string navigationViewItemType = "Microsoft.UI.Xaml.Controls.NavigationViewItem";
                const string itemType = "MUXControlsTestApp.Customer";

                var itemInvokedItemType = new Edit(FindElement.ById("ItemInvokedItemType"));
                var itemInvokedItemContainerType = new Edit(FindElement.ById("ItemInvokedItemContainerType"));
                var selectionChangedItemtype = new Edit(FindElement.ById("SelectionChangedItemType"));
                var selectionChangedItemContainerType = new Edit(FindElement.ById("SelectionChangedItemContainerType"));

                Log.Comment("Click Michael item");
                var menuItem = FindElement.ByName("Michael");
                InputHelper.LeftClick(menuItem);
                Wait.ForIdle();

                Log.Comment("Verify that item invoked returns expected parameters.");
                Verify.IsTrue(itemInvokedItemType.Value == itemType);
                Verify.IsTrue(itemInvokedItemContainerType.Value == navigationViewItemType);

                Log.Comment("Verify that selection changed event returns expected parameters");
                Verify.IsTrue(selectionChangedItemtype.Value == itemType);
                Verify.IsTrue(selectionChangedItemContainerType.Value == navigationViewItemType);
            }
        }

void VerifyEventsReturnExpectedDataTypesMenuItems ( ) [inline]

Definition at line 86 of file EventTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                const string navigationViewItemType = "Microsoft.UI.Xaml.Controls.NavigationViewItem";
                const string stringType = "System.String";

                var itemInvokedItemType = new Edit(FindElement.ById("ItemInvokedItemType"));
                var itemInvokedItemContainerType = new Edit(FindElement.ById("ItemInvokedItemContainerType"));
                var selectionChangedItemtype = new Edit(FindElement.ById("SelectionChangedItemType"));
                var selectionChangedItemContainerType = new Edit(FindElement.ById("SelectionChangedItemContainerType"));

                Log.Comment("Click music item");
                var menuItem = FindElement.ByName("Music");
                InputHelper.LeftClick(menuItem);
                Wait.ForIdle();

                Log.Comment("Verify that item invoked returns expected parameters.");
                Verify.IsTrue(itemInvokedItemType.Value == stringType);
                Verify.IsTrue(itemInvokedItemContainerType.Value == navigationViewItemType);

                Log.Comment("Verify that selection changed event returns expected parameters");
                Verify.IsTrue(selectionChangedItemtype.Value == navigationViewItemType);
                Verify.IsTrue(selectionChangedItemContainerType.Value == navigationViewItemType);
            }
        }

void VerifyEventsReturnExpectedDataTypesMenuItemsSource ( ) [inline]

Definition at line 114 of file EventTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
            {
                const string navigationViewItemType = "Microsoft.UI.Xaml.Controls.NavigationViewItem";
                const string itemType = "System.String";

                var itemInvokedItemType = new Edit(FindElement.ById("ItemInvokedItemType"));
                var itemInvokedItemContainerType = new Edit(FindElement.ById("ItemInvokedItemContainerType"));
                var selectionChangedItemtype = new Edit(FindElement.ById("SelectionChangedItemType"));
                var selectionChangedItemContainerType = new Edit(FindElement.ById("SelectionChangedItemContainerType"));

                Log.Comment("Click music item");
                var menuItem = FindElement.ByName("Music");
                InputHelper.LeftClick(menuItem);
                Wait.ForIdle();

                Log.Comment("Verify that item invoked returns expected parameters.");
                Verify.IsTrue(itemInvokedItemType.Value == itemType);
                Verify.IsTrue(itemInvokedItemContainerType.Value == navigationViewItemType);

                Log.Comment("Verify that selection changed event returns expected parameters");
                Verify.IsTrue(selectionChangedItemtype.Value == itemType);
                Verify.IsTrue(selectionChangedItemContainerType.Value == navigationViewItemType);
            }
        }

void VerifyHoldingKeyOnlyInvokesOnce ( ) [inline]

Definition at line 371 of file EventTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView compact pane length test" }))
            {
                Verify.AreEqual("0", GetInvokeCount());
                var homeItem = FindElement.ByName("NavViewInvokeItem");
                FocusHelper.SetFocus(homeItem);

                KeyboardHelper.PressKey(Key.Enter);

                Verify.AreEqual("1", GetInvokeCount());

                KeyboardHelper.HoldKeyMilliSeconds(Key.Enter, 2000);
                Wait.ForIdle();
                // Should have invoked once, not multiple times
                Verify.AreEqual("2", GetInvokeCount());
            }

            string GetInvokeCount()
            {
                var textBlock = new TextBlock(FindElement.ByName("HomeItemInvokedCount"));
                return textBlock.GetText();
            }
        }

void VerifyLightDismissDoesntSendDuplicateEvents ( ) [inline]

Definition at line 170 of file EventTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    SetNavViewWidth(ControlWidth.Medium);
                    WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                    PaneOpenCloseTestCaseRetry(3, () =>
                    {
                        // recover from the exception if needed
                        if (isPaneOpenCheckBox.ToggleState != ToggleState.Off)
                        {
                            using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                            {
                                isPaneOpenCheckBox.Toggle();
                                waiter.Wait();
                            }
                            WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
                        }

                        Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");

                        Log.Comment("Reset the event count");
                        new Button(FindElement.ById("ClosingEventCountResetButton")).Invoke();
                        Wait.ForIdle();

                        Log.Comment("Open the pane");
                        using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                        {
                            isPaneOpenCheckBox.Toggle();
                            waiter.Wait();
                        }
                        WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                        Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                        var closingCounts = new Edit(FindElement.ByName("ClosingEventCountTextBlock"));
                        var expectedString = "1-1";

                        //  trigger a light dismiss
                        KeyboardHelper.PressKey(Key.Left, ModifierKey.Alt);
                        Wait.ForIdle();

                        WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
                        Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
                        Verify.AreEqual(expectedString, closingCounts.GetText());
                    });
                }
            }
        }

void VerifyNavigationViewItemResponseToClickAfterBeingMovedBetweenFrames ( ) [inline]

Definition at line 342 of file EventTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
            {
                var myLocationButton = FindElement.ByName<Button>("MyLocation");
                var switchFrameButton = FindElement.ByName<Button>("SwitchFrame");
                var result = new TextBlock(FindElement.ByName("MyLocationResult"));

                Log.Comment("Click on MyLocation Item and verify it's on Frame1");
                myLocationButton.Click();
                Wait.ForIdle();
                Verify.AreEqual(result.GetText(), "Frame1");

                Log.Comment("Click on SwitchFrame");
                switchFrameButton.Click();
                Wait.ForIdle();

                // tree structure changed and rebuild the cache.
                ElementCache.Clear();

                Log.Comment("Click on MyLocation Item and verify it's on Frame2");
                myLocationButton = FindElement.ByName<Button>("MyLocation");
                myLocationButton.Click();
                Wait.ForIdle();
                Verify.AreEqual(result.GetText(), "Frame2");
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/EventTests.cs
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FocusBehaviorTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • FocusBehaviorTests
Public Member Functions | Static Public Member Functions

FocusBehaviorTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests::NavigationViewTestsBase.

List of all members.

Public Member Functions

void | ArrowKeyHierarchicalNavigationTest ()
void | ArrowKeyNavigationTest ()
void | CanDoSelectionChangedOfItemTemplate ()
void | EnsureLeftSettingsRetainsFocusAfterOrientationChanges ()
void | EnsureTopSettingsRetainsFocusAfterOrientationChanges ()
void | HomeEndNavigationTest ()
void | TabNavigationHierarchicalTest ()
void | TabNavigationTest ()
void | VerifyFocusNotLostWhenTabbingWithBackButtonEnabled ()
void | VerifyShoulderNavigationEnabledAlwaysIsConsistent ()
void | VerifyShoulderNavigationEnabledOnlySelectionFollowsFocusIsCorrect ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 24 of file FocusBehaviorTests.cs.

Member Function Documentation

void ArrowKeyHierarchicalNavigationTest ( ) [inline]

Definition at line 628 of file FocusBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                // Set up tree and get references to all required elements
                UIObject item1 = FindElement.ByName("Menu Item 1");

                Log.Comment("Expand Menu Item 1");
                InputHelper.LeftClick(item1);
                Wait.ForIdle();

                UIObject item2 = FindElement.ByName("Menu Item 2");
                UIObject item3 = FindElement.ByName("Menu Item 3");

                Log.Comment("Expand Menu Item 2");
                InputHelper.LeftClick(item2);
                Wait.ForIdle();

                UIObject item4 = FindElement.ByName("Menu Item 4");
                UIObject item5 = FindElement.ByName("Menu Item 5");

                // Set up initial focus
                Log.Comment("Set focus on the pane toggle button");
                Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                togglePaneButton.SetFocus();
                Wait.ForIdle();

                // Start down arrow key navigation test

                Log.Comment("Verify that down arrow navigates to Menu Item 1");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                Verify.IsTrue(item1.HasKeyboardFocus);

                Log.Comment("Verify that down arrow navigates to Menu Item 2");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                Verify.IsTrue(item2.HasKeyboardFocus);

                Log.Comment("Verify that down arrow navigates to Menu Item 4");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                Verify.IsTrue(item4.HasKeyboardFocus);

                Log.Comment("Verify that down arrow navigates to Menu Item 5");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                Verify.IsTrue(item5.HasKeyboardFocus);

                Log.Comment("Verify that down arrow navigates to Menu Item 3");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                Verify.IsTrue(item3.HasKeyboardFocus);

                // Start up arrow key navigation test

                Log.Comment("Verify that up arrow navigates to Menu Item 5");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();
                Verify.IsTrue(item5.HasKeyboardFocus);

                Log.Comment("Verify that up arrow navigates to Menu Item 4");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();
                Verify.IsTrue(item4.HasKeyboardFocus);

                Log.Comment("Verify that up arrow navigates to Menu Item 2");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();
                Verify.IsTrue(item2.HasKeyboardFocus);

                Log.Comment("Verify that up arrow navigates to Menu Item 1");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();
                Verify.IsTrue(item1.HasKeyboardFocus);

                Log.Comment("Verify that up arrow navigates to the pane toggle button");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();
                Verify.IsTrue(togglePaneButton.HasKeyboardFocus);

            }
        }

void ArrowKeyNavigationTest ( ) [inline]

Definition at line 481 of file FocusBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    SetNavViewWidth(ControlWidth.Wide);

                    // Clear any item selection
                    var clearSelectedItemButton = new Button(FindElement.ByName("ClearSelectedItemButton"));
                    clearSelectedItemButton.Click();
                    Wait.ForIdle();

                    Verify.AreEqual("null", GetSelectedItem());

                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                    togglePaneButton.SetFocus();
                    Wait.ForIdle();

                    // Grab references to all the menu items in the test UI
                    UIObject searchBox = FindElement.ByNameAndClassName("PaneAutoSuggestBox", "TextBox");
                    UIObject item1 = FindElement.ByName("Home");
                    UIObject item2 = FindElement.ByName("Apps");
                    UIObject item3 = FindElement.ByName("Games");
                    UIObject item4 = FindElement.ByName("Music");
                    UIObject item5 = FindElement.ByName("Movies");
                    UIObject item6 = FindElement.ByName("TV");
                    UIObject item7 = FindElement.ByName("Volume");
                    UIObject item8 = FindElement.ByName("Integer");
                    UIObject item9 = FindElement.ByName("AcceptItem");
                    UIObject item10 = FindElement.ByName("HasChildItem");
                    UIObject settingsItem = FindElement.ByName("Settings");

                    Log.Comment("Verify that tab from the TogglePaneButton goes to the search box");
                    KeyboardHelper.PressKey(Key.Tab);
                    Wait.ForIdle();
                    Verify.IsTrue(searchBox.HasKeyboardFocus);

                    Log.Comment("Verify that tab from search box goes to the first item");
                    KeyboardHelper.PressKey(Key.Tab);
                    Wait.ForIdle();
                    Verify.IsTrue(item1.HasKeyboardFocus);

                    Log.Comment("Verify that down arrow can navigate through all items");
                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item2.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item3.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item4.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item5.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item6.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item7.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item8.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item9.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Down);
                    Wait.ForIdle();
                    Verify.IsTrue(item10.HasKeyboardFocus);

                    Log.Comment("Verify that tab thrice from the last menu item goes to the settings item");
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 3);
                    Wait.ForIdle();
                    Verify.IsTrue(settingsItem.HasKeyboardFocus);

                    Log.Comment("Verify that shift+tab thrice from the settings item goes to the last menu item");
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 3);
                    Wait.ForIdle();
                    Verify.IsTrue(item10.HasKeyboardFocus);

                    Log.Comment("Verify that up arrow can navigate through all items");
                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item9.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item8.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item7.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item6.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item5.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item4.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item3.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item2.HasKeyboardFocus);

                    KeyboardHelper.PressKey(Key.Up);
                    Wait.ForIdle();
                    Verify.IsTrue(item1.HasKeyboardFocus);

                    Log.Comment("Verify that shift+tab from the first menu item goes to the search box");
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);
                    Wait.ForIdle();
                    Verify.IsTrue(searchBox.HasKeyboardFocus);

                    Log.Comment("Verify that shift+tab from the search box goes to the TogglePaneButton");
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);
                    Wait.ForIdle();
                    Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
                }

                string GetSelectedItem()
                {
                    return FindElement.ByName("SelectionChangedItemType").GetText();
                }
            }
        }

void CanDoSelectionChangedOfItemTemplate ( ) [inline]

Definition at line 455 of file FocusBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView ItemTemplate Test" }))
            {
                // Set focus inside page
                var focusButton = FindElement.ByName("FocusAnchorButton");
                focusButton.SetFocus();

                // Navigate to NavView
                KeyboardHelper.PressKey(Key.Tab);
                // Select the first item.
                KeyboardHelper.PressKey(Key.Space);

                Log.Comment("Verify correct items have been passed to selection event");
                var selectedItem = FindElement.ByName("SelectionEventResult");
                Verify.AreEqual("Passed", selectedItem.GetText());
                // Go to the second item.
                KeyboardHelper.PressKey(Key.Right);
                // Select the second item.
                KeyboardHelper.PressKey(Key.Space);
                Log.Comment("Verify correct items have been passed to selection event");
                Verify.AreEqual("Passed", selectedItem.GetText());
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 31 of file FocusBehaviorTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void EnsureLeftSettingsRetainsFocusAfterOrientationChanges ( ) [inline]

Definition at line 105 of file FocusBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var readSettingsSelectedButton = new Button(FindElement.ByName("ReadSettingsSelected"));
                var SettingsSelectionStateTextBlock = new TextBlock(FindElement.ByName("SettingsSelectedState"));

                Log.Comment("Flipping orientation: Left -> Top.");
                var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
                flipOrientationButton.Invoke();
                Wait.ForIdle();

                var topSettingsItem = new Button(FindElement.ByName("Settings"));
                topSettingsItem.Click();

                Log.Comment("Verify the top settings item is selected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");

                Log.Comment("Flipping orientation: Top -> Left.");
                flipOrientationButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify the left settings item is selected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");

                Log.Comment("Flipping orientation: Left -> Top.");
                flipOrientationButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify the left top item is still selected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
            }
        }

void EnsureTopSettingsRetainsFocusAfterOrientationChanges ( ) [inline]

Definition at line 37 of file FocusBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var readSettingsSelectedButton = new Button(FindElement.ByName("ReadSettingsSelected"));
                var SettingsSelectionStateTextBlock = new TextBlock(FindElement.ByName("SettingsSelectedState"));

                Log.Comment("Bring Settings into view.");
                FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
                Wait.ForIdle();

                var leftSettingsItem = new Button(FindElement.ByName("Settings"));
                leftSettingsItem.Click();

                Log.Comment("Verify the left settings item is selected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");

                Log.Comment("Flipping orientation: Left -> Top.");
                var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
                flipOrientationButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify the top settings item is selected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");

                Log.Comment("Flipping orientation: Top -> Left.");
                flipOrientationButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify the left settings item is still selected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
            }
        }

void HomeEndNavigationTest ( ) [inline]

Definition at line 143 of file FocusBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    UIObject firstItem = FindElement.ByName("Home");
                    UIObject appsItem = FindElement.ByName("Apps");
                    UIObject lastItem = FindElement.ByName("HasChildItem");

                    Log.Comment("Make sure something inside the ListView other than the first item has input focus");
                    appsItem.SetFocus();
                    Wait.ForIdle();
                    Verify.IsFalse(firstItem.HasKeyboardFocus);

                    Log.Comment("Verify the Home key puts focus on the first menu item");
                    KeyboardHelper.PressKey(Key.Home);
                    Wait.ForIdle();
                    Verify.IsTrue(firstItem.HasKeyboardFocus);

                    Log.Comment("Verify the End key puts focus on the last menu item");
                    KeyboardHelper.PressKey(Key.End);
                    Wait.ForIdle();
                    Verify.IsTrue(lastItem.HasKeyboardFocus);
                }
            }
        }

void TabNavigationHierarchicalTest ( ) [inline]

Definition at line 295 of file FocusBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
                {
                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                    Button getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));

                    Log.Comment("Deselect Menu Item 1");
                    UIObject menuItem1 = FindElement.ByName("Menu Item 1");
                    menuItem1.SetFocus();
                    AutomationElement menuItem1AE = AutomationElement.FocusedElement;
                    SelectionItemPattern menuItem1SIP = menuItem1AE.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;
                    menuItem1SIP.RemoveFromSelection();

                    VerifyTabNavigationWithoutMenuItemSelected();
                    VerifyTabNavigationWithMenuItemSelected();
                    VerifyTabNavigationWithSettingsItemVisible();

                    void VerifyTabNavigationWithoutMenuItemSelected()
                    {
                        Log.Comment("Verify Tab navigation without a selected menu item");

                        getSelectItemButton.Invoke();
                        Wait.ForIdle();

                        Verify.AreEqual("No Item Selected", GetSelectedItem());

                        UIObject menuItem29 = FindElement.ByName("Menu Item 29 (Selectable)");

                        // Set focus on the pane's toggle button.
                        togglePaneButton.SetFocus();
                        Wait.ForIdle();

                        Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to Menu Item 1.");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(menuItem1.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab while Menu Item 1 has focus moves to 'Get Selected Item Label' Button item");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(getSelectItemButton.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to Menu Item 29");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(menuItem29.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
                    }

                    void VerifyTabNavigationWithMenuItemSelected()
                    {
                        Log.Comment("Verify Tab navigation with a selected menu item");

                        Log.Comment("Expand Menu Item 15.");
                        UIObject menuItem15 = FindElement.ByName("Menu Item 15");
                        InputHelper.LeftClick(menuItem15);

                        Log.Comment("Select Menu Item 16.");
                        UIObject menuItem16 = FindElement.ByName("Menu Item 16");
                        InputHelper.LeftClick(menuItem16);

                        getSelectItemButton.Invoke();
                        Wait.ForIdle();

                        Verify.AreEqual("Menu Item 16", GetSelectedItem());

                        // Set focus on the pane's toggle button.
                        togglePaneButton.SetFocus();
                        Wait.ForIdle();

                        Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to Menu Item 16.");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(menuItem16.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab while Menu Item 16 has focus moves to 'Get Selected Item Label' Button item");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(getSelectItemButton.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to Menu Item 16");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(menuItem16.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(togglePaneButton.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab from parent of item will move focus to 'Get Selected Item Label' Button item");
                        KeyboardHelper.PressKey(Key.Down, ModifierKey.None, 3);
                        Wait.ForIdle();
                        Verify.IsTrue(menuItem15.HasKeyboardFocus);

                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(getSelectItemButton.HasKeyboardFocus);
                    }

                    void VerifyTabNavigationWithSettingsItemVisible()
                    {
                        Log.Comment("Verify tab navigation with settings item visible.");

                        Log.Comment("Check IsSettingsVisible");
                        CheckBox checkBoxIsSettingsVisible = FindElement.ByName<CheckBox>("Settings Item Visibility");
                        checkBoxIsSettingsVisible.Check();
                        Wait.ForIdle();

                        UIObject settingsItem = FindElement.ByName("Settings");

                        getSelectItemButton.Invoke();
                        Wait.ForIdle();

                        Verify.AreEqual("Menu Item 16", GetSelectedItem());

                        UIObject menuItem16 = FindElement.ByName("Menu Item 16");

                        // Set focus on the pane's toggle button.
                        togglePaneButton.SetFocus();
                        Wait.ForIdle();

                        Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to Menu Item 16.");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(menuItem16.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab while Menu Item 16 has focus moves to Settings item");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(settingsItem.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to Menu Item 16");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(menuItem16.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
                    }
                }

                string GetSelectedItem()
                {
                    return new TextBlock(FindElement.ByName("SelectedItemLabel")).DocumentText;
                }
            }
        }

void TabNavigationTest ( ) [inline]

Definition at line 173 of file FocusBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    SetNavViewWidth(ControlWidth.Wide);

                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                    UIObject searchBox = FindElement.ByNameAndClassName("PaneAutoSuggestBox", "TextBox");
                    UIObject settingsItem = FindElement.ByName("Settings");

                    VerifyTabNavigationWithoutMenuItemSelected();
                    VerifyTabNavigationWithMenuItemSelected();

                    void VerifyTabNavigationWithoutMenuItemSelected()
                    {
                        Log.Comment("Verify Tab navigation without a selected menu item");

                        // Clear any item selection
                        var clearSelectedItemButton = new Button(FindElement.ByName("ClearSelectedItemButton"));
                        clearSelectedItemButton.Click();
                        Wait.ForIdle();

                        Verify.AreEqual("null", GetSelectedItem());

                        UIObject firstMenuItem = FindElement.ByName("Home");
                        UIObject lastMenuItem = FindElement.ByName("HasChildItem");

                        // Set focus on the pane's toggle button.
                        togglePaneButton.SetFocus();
                        Wait.ForIdle();

                        Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to the search box");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(searchBox.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab while the search box has focus moves to the first menu item");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(firstMenuItem.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab thrice more will move focus to the settings item");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 3);
                        Wait.ForIdle();
                        Verify.IsTrue(settingsItem.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab thrice will move focus to the last menu item");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 3);
                        Wait.ForIdle();
                        Verify.IsTrue(lastMenuItem.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to the search box");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(searchBox.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
                    }

                    void VerifyTabNavigationWithMenuItemSelected()
                    {
                        Log.Comment("Verify Tab navigation with a selected menu item");

                        // Select a menu item (preferably not the first or last menu item)
                        UIObject thirdMenuItem = FindElement.ByName("Games");

                        var selectedItemComboBox = new ComboBox(FindElement.ById("SelectedItemCombobox"));
                        selectedItemComboBox.SelectItemByName("Games");
                        Wait.ForIdle();

                        Verify.IsTrue(Convert.ToBoolean(thirdMenuItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                        // Set focus on the pane's toggle button.
                        togglePaneButton.SetFocus();
                        Wait.ForIdle();

                        Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to the search box");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(searchBox.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab while the search box has focus moves to the selected menu item");
                        KeyboardHelper.PressKey(Key.Tab);
                        Wait.ForIdle();
                        Verify.IsTrue(thirdMenuItem.HasKeyboardFocus);

                        Log.Comment("Verify that pressing tab thrice more will move focus to the settings item");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 3);
                        Wait.ForIdle();
                        Verify.IsTrue(settingsItem.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab thrice will move focus to the selected menu item");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 3);
                        Wait.ForIdle();
                        Verify.IsTrue(thirdMenuItem.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to the search box");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(searchBox.HasKeyboardFocus);

                        Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
                        KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                        Wait.ForIdle();
                        Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
                    }
                }

                string GetSelectedItem()
                {
                    return FindElement.ByName("SelectionChangedItemType").GetText();
                }
            }
        }

void VerifyFocusNotLostWhenTabbingWithBackButtonEnabled ( ) [inline]

Definition at line 75 of file FocusBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView TopNav Test" }))
            {
                CheckBox checkBox = new CheckBox(FindElement.ByName("BackButtonEnabledCheckbox"));
                Log.Comment("Checking Back Enabled");

                checkBox.Check();
                Wait.ForIdle();

                // Pick an item close to the end of the content and set focus on it.
                CheckBox cancelClosingCheckbox = new CheckBox(FindElement.ById("CancelClosingEvents"));
                cancelClosingCheckbox.SetFocus();
                Wait.ForIdle();

                // Tab a number of times so that we get past the last item
                // in the content.
                for (int i = 0; i < 10; i++)
                {
                    KeyboardHelper.PressKey(Key.Tab);
                    Wait.ForIdle();
                }

                // Verify that we do not lose focus.
                AutomationElement focusedElement = AutomationElement.FocusedElement;
                Verify.IsNotNull(focusedElement);
            }
        }

void VerifyShoulderNavigationEnabledAlwaysIsConsistent ( ) [inline]

Definition at line 713 of file FocusBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                var navView = FindElement.ByName("NavView");
                var shoulderNavigationEnabled = new ComboBox(FindElement.ByName("ShoulderNavigationEnabledSetter"));
                var selectionFollowsFocusComboBox = new ComboBox(FindElement.ByName("SelectionFollowsFocusSetter"));

                Log.Comment("Set ShoulderNavigation to always");
                shoulderNavigationEnabled.SelectItemByName("ShoulderNavigationEnabledAlways");

                Log.Comment("Set SelectionFollowsFocus to enabled");
                selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusEnabled");

                Log.Comment("Select first item");
                FindElement.ByName("Home").Click();
                Wait.ForIdle();
                Verify.AreEqual("Home", GetSelectedItem());

                GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);
                Wait.ForIdle();
                Verify.AreEqual("Apps", GetSelectedItem());

                Log.Comment("Set SelectionFollowsFocus to disabled");
                selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusDisabled");
                Wait.ForIdle();

                GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);

                Wait.ForIdle();
                Verify.AreEqual("Games", GetSelectedItem());
            }

            string GetSelectedItem()
            {
                return FindElement.ByName("SelectionChangedResult").GetText();
            }
        }

void VerifyShoulderNavigationEnabledOnlySelectionFollowsFocusIsCorrect ( ) [inline]

Definition at line 753 of file FocusBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                var navView = FindElement.ByName("NavView");
                var shoulderNavigationEnabled = new ComboBox(FindElement.ByName("ShoulderNavigationEnabledSetter"));
                var selectionFollowsFocusComboBox = new ComboBox(FindElement.ByName("SelectionFollowsFocusSetter"));

                Log.Comment("Set ShoulderNavigation to always");
                shoulderNavigationEnabled.SelectItemByName("ShoulderNavigationEnabledWhenSelectionFollowsFocus");

                Log.Comment("Set SelectionFollowsFocus to enabled");
                selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusEnabled");

                Log.Comment("Select first item");
                FindElement.ByName("Home").Click();
                Wait.ForIdle();
                Verify.AreEqual("Home", GetSelectedItem());

                GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);
                Wait.ForIdle();
                Verify.AreEqual("Apps", GetSelectedItem());

                Log.Comment("Set SelectionFollowsFocus to disabled");
                selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusDisabled");
                Wait.ForIdle();

                GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);

                Wait.ForIdle();
                Verify.AreEqual("Apps", GetSelectedItem());
            }

            string GetSelectedItem()
            {
                return FindElement.ByName("SelectionChangedResult").GetText();
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/FocusBehaviorTests.cs
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTestsBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • NavigationViewTestsBase
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

NavigationViewTestsBase Class Reference

Inherited by CommonTests, EventTests, FocusBehaviorTests, PaneBehaviorTests, SelectionTests, and TopModeTests.

List of all members.

Public Member Functions

void | TestCleanup ()

Protected Types

enum | ComboBoxName { CompactModeComboBox, ExpandedModeComboBox }
enum | ControlHeight { Default, Small }
enum | ControlWidth { Narrow, Medium, Wide }
enum | PaneOpenStatus { Opened, Closed }
enum | Threshold { Low, High }
enum | TopNavPosition { Primary, Overflow }

Protected Member Functions

void | ClickClearSelectionButton ()
void | EnsureNavViewClosed ()
void | EnsurePaneHeaderCanBeModifiedHelper (RegressionTestType navviewMode)
List< UIObject > | GetTopNavigationItems (TopNavPosition position)
void | InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement (string expectedKeyTipTargetElementId)
void | InvokeOverflowButton ()
bool | IsItemInTopNavPrimaryList (string text)
void | OpenOverflowMenuAndInvokeItem (string itemName)
void | PaneOpenCloseTestCaseRetry (int retryNumber, Action action)
void | SetNavViewHeight (ControlHeight height)
void | SetNavViewWidth (ControlWidth width)
void | SetThreshold (Threshold threshold, ComboBoxName name)
bool | UIObjectContains (UIObject uIObject, string itemName)
string | UIObjectToString (UIObject uIObject)
void | VerifyBackAndCloseButtonsVisibility (bool inLeftMinimalPanelDisplayMode)
void | WaitAndAssertPaneStatus (PaneOpenStatus status)

Protected Attributes

const string | compact = "Compact"
const string | expanded = "Expanded"
const string | minimal = "Minimal"

Detailed Description

Definition at line 22 of file NavigationViewTestsBase.cs.

Member Enumeration Documentation

enum ComboBoxName [protected]
Enumerator:
CompactModeComboBox
ExpandedModeComboBox

Definition at line 31 of file NavigationViewTestsBase.cs.

{ CompactModeComboBox, ExpandedModeComboBox }

enum ControlHeight [protected]
Enumerator:
Default
Small

Definition at line 29 of file NavigationViewTestsBase.cs.

{ Default, Small }

enum ControlWidth [protected]
Enumerator:
Narrow
Medium
Wide

Definition at line 28 of file NavigationViewTestsBase.cs.

{ Narrow, Medium, Wide }

enum PaneOpenStatus [protected]
Enumerator:
Opened
Closed

Definition at line 33 of file NavigationViewTestsBase.cs.

{ Opened, Closed }

enum Threshold [protected]
Enumerator:
Low
High

Definition at line 30 of file NavigationViewTestsBase.cs.

{ Low, High }

enum TopNavPosition [protected]
Enumerator:
Primary
Overflow

Definition at line 32 of file NavigationViewTestsBase.cs.

{ Primary, Overflow }

Member Function Documentation

void ClickClearSelectionButton ( ) [inline, protected]

Definition at line 98 of file NavigationViewTestsBase.cs.

        {
            Log.Comment("Clear the selection by set NavView.SelectedItem to null");
            var ClearSelectedItemButton = new Button(FindElement.ByName("ClearSelectedItemButton"));
            ClearSelectedItemButton.Invoke();
            Wait.ForIdle();
        }

void EnsureNavViewClosed ( ) [inline, protected]

Definition at line 159 of file NavigationViewTestsBase.cs.

        {
            CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
            if (isPaneOpenCheckBox.ToggleState == ToggleState.On)
            {
                using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                {
                    isPaneOpenCheckBox.Uncheck();
                    waiter.Wait();
                }
            }
            Wait.ForIdle();
        }

void EnsurePaneHeaderCanBeModifiedHelper ( RegressionTestType navviewMode ) [inline, protected]

Definition at line 117 of file NavigationViewTestsBase.cs.

        {
            if (navviewMode == RegressionTestType.TopNav)
            {
                var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
                flipOrientationButton.Invoke();
                Wait.ForIdle();
            }

            var changePaneHeaderbutton = new Button(FindElement.ByName("ChangePaneHeader"));
            changePaneHeaderbutton.Invoke();
            Wait.ForIdle();

            UIObject paneHeaderContent = null;

            if (navviewMode == RegressionTestType.TopNav)
            {
                paneHeaderContent = FindElement.ById("PaneHeaderOnTopPane");
            }
            else
            {
                paneHeaderContent = FindElement.ById("PaneHeaderContentBorder");
            }

            TextBlock text = new TextBlock(paneHeaderContent.FirstChild);
            Verify.AreEqual("Modified Pane Header", text.DocumentText);

            if (navviewMode == RegressionTestType.LeftNav)
            {
                // In Closed Compact mode, the PaneHeader should not be visible:

                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("LeftCompact");
                Wait.ForIdle();

                EnsureNavViewClosed();

                ElementCache.Clear();
                VerifyElement.NotFound("PaneHeaderContentBorder", FindBy.Name);
            }
        }

List<UIObject> GetTopNavigationItems ( TopNavPosition position ) [inline, protected]

Definition at line 173 of file NavigationViewTestsBase.cs.

        {
            string hostId = position == TopNavPosition.Overflow ? "TopNavMenuItemsOverflowHost" : "TopNavMenuItemsHost";
            List<UIObject> collection = new List<UIObject>();

            var host = TryFindElement.ById(hostId);
            if (host != null)
            {
                collection.AddRange(host.Children);
            }
            else
            {
                Log.Warning("Can't find container " + hostId);
            }
            return collection;
        }

void InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement ( string expectedKeyTipTargetElementId ) [inline, protected]

Definition at line 293 of file NavigationViewTestsBase.cs.

        {
            string keyTipText = "H";
            Log.Comment("Send AccessKey to invoke toggle button for left nav or more button for top nav");
            KeyboardHelper.PressDownModifierKey(ModifierKey.Alt);
            KeyboardHelper.ReleaseModifierKey(ModifierKey.Alt);
            Wait.ForIdle();

            // Verify that KeyTip appears near the target element.
            var keytip = TryFindElement.ByName(keyTipText);
            Verify.IsNotNull(keytip, "keytip");
            var keyTipPopup = keytip.Parent;
            Verify.IsNotNull(keyTipPopup, "keyTipPopup");
            var keyTipBounds = keyTipPopup.BoundingRectangle;
            Log.Comment("KeyTip bounds are: " + keyTipBounds);

            var target = FindElement.ById(expectedKeyTipTargetElementId);
            var targetBounds = target.BoundingRectangle;
            Log.Comment("Target bounds are: " + targetBounds);
            targetBounds.Inflate(20, 20);

            Verify.IsTrue(keyTipBounds.IntersectsWith(targetBounds), "KeyTip bounds should be close to target bounds.");

            // Invoke the AccessKey:
            TextInput.SendText(keyTipText);
            Wait.ForIdle();
        }

void InvokeOverflowButton ( ) [inline, protected]

Definition at line 190 of file NavigationViewTestsBase.cs.

        {
            Log.Comment("Invoke More button to open/close Overflow menu");
            var moreButton = TryFindElement.ById("TopNavOverflowButton");
            Verify.IsNotNull(moreButton, "Overflow button should exist");
            new Button(moreButton).InvokeAndWait();
        }

bool IsItemInTopNavPrimaryList ( string text ) [inline, protected]

Definition at line 197 of file NavigationViewTestsBase.cs.

        {
            var list = TryFindElement.ById("TopNavMenuItemsHost");
            Verify.IsTrue(list != null, "TopNavMenuItemsHost exists");
            foreach (var item in list.Children)
            {
                if (item != null)
                {
                    foreach (var v in new List<string> { item.AutomationId, item.ClassName, item.Name })
                    {
                        if (v != null && v.Contains(text))
                        {
                            return true;
                        }
                    }
                }
            }
            return false;
        }

void OpenOverflowMenuAndInvokeItem ( string itemName ) [inline, protected]

Definition at line 261 of file NavigationViewTestsBase.cs.

        {
            InvokeOverflowButton();

            var host = TryFindElement.ById("TopNavMenuItemsOverflowHost");
            Verify.IsNotNull(host, "Overflow menu should be opened");

            var overflowItems = GetTopNavigationItems(TopNavPosition.Overflow);
            var items = overflowItems.
                Where(item => UIObjectContains(item, itemName));

            var count = items.Count();
            if (count == 0)
            {
                Log.Comment("Items in overflow: ", String.Join("@", overflowItems.Select(item => UIObjectToString(item))));
            }
            Verify.IsTrue(count > 0, "There should be at least one item match with " + itemName);

            if (count > 1)
            {
                Log.Warning("There is more than one item match with" + itemName + " and first item is invoked");
            }

            var itemToBeClicked = items.ElementAt(0);
            Log.Comment("Invoke the item " + UIObjectToString(itemToBeClicked));
            new Button(itemToBeClicked).Click();
            Wait.ForIdle();
            //When a overflow item is clicked, NavView depends on another UI ticket to update the layout.
            Wait.ForSeconds(1);
            Wait.ForIdle();
        }

void PaneOpenCloseTestCaseRetry | ( | int | retryNumber,
 |  | Action | action |
 | ) |  |  | [inline, protected]

Definition at line 217 of file NavigationViewTestsBase.cs.

        {
            for (int i = 0; i < retryNumber; i++)
            {
                try
                {
                    if (i > 0)
                    {
                        Log.Comment("Retry on " + i);
                    }
                    action();
                    return;
                }
                catch (Exception e)
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                    Log.Comment("IsPaneOpenCheckBox toggle status: " + isPaneOpenCheckBox.ToggleState);

                    Edit closingCounts = new Edit(FindElement.ByName("ClosingEventCountTextBlock"));
                    Log.Comment("ClosingEventCountTextBlock text: " + closingCounts.GetText());

                    TextBlock eventTextBlock = new TextBlock(FindElement.ByName("PaneOpenedOrClosedEvent"));
                    Log.Comment("PaneOpenedOrClosedEvent text: " + eventTextBlock.GetText());

                    Log.Comment(e.Message);
                }
            }

            throw new Exception("Reach max number of retry " + retryNumber);
        }

void SetNavViewHeight ( ControlHeight height ) [inline, protected]

Definition at line 62 of file NavigationViewTestsBase.cs.

        {
            ComboBox heightComboBox = new ComboBox(FindElement.ByName("HeightCombobox"));
            string currentHeight = "Default";

            if (heightComboBox.Selection.Count > 0)
            {
                ComboBoxItem selectedComboBoxItem = heightComboBox.Selection[0];
                currentHeight = selectedComboBoxItem.Name;
                Log.Comment("Current height " + currentHeight);
            }

            Log.Comment("Changing height to " + height.ToString());
            heightComboBox.SelectItemByName(height.ToString());
        }

void SetNavViewWidth ( ControlWidth width ) [inline, protected]

Definition at line 41 of file NavigationViewTestsBase.cs.

        {
            ComboBox widthComboBox = new ComboBox(FindElement.ByName("WidthComboBox"));
            string currentWidth = "unset";

            if (widthComboBox.Selection.Count > 0)
            {
                ComboBoxItem selectedComboBoxItem = widthComboBox.Selection[0];
                currentWidth = selectedComboBoxItem.Name;
                Log.Comment("Current width " + currentWidth);
            }
            string widthString = width.ToString();

            if (currentWidth != widthString)
            {
                Wait.ForIdle();
                Log.Comment("Changing to width " + widthString);
                widthComboBox.SelectItemByName(widthString);
            }
        }

void SetThreshold | ( | Threshold | threshold,
 |  | ComboBoxName | name |
 | ) |  |  | [inline, protected]

Definition at line 78 of file NavigationViewTestsBase.cs.

        {
            ComboBox thresholdComboBox = new ComboBox(FindElement.ByName(name.ToString()));
            string currentThreshold = "unset";

            if (thresholdComboBox.Selection.Count > 0)
            {
                ComboBoxItem selectedComboBoxItem = thresholdComboBox.Selection[0];
                currentThreshold = selectedComboBoxItem.Name;
                Log.Comment("Current threshold " + currentThreshold);
            }
            string thresholdString = threshold.ToString();

            if (currentThreshold != thresholdString)
            {
                Log.Comment("Changing to width " + thresholdString);
                thresholdComboBox.SelectItemByName(thresholdString);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 36 of file NavigationViewTestsBase.cs.

        {
            TestCleanupHelper.Cleanup();
        }

bool UIObjectContains | ( | UIObject | uIObject,
 |  | string | itemName |
 | ) |  |  | [inline, protected]

Definition at line 256 of file NavigationViewTestsBase.cs.

        {
            return UIObjectToString(uIObject).Contains(itemName);
        }

string UIObjectToString ( UIObject uIObject ) [inline, protected]

Definition at line 248 of file NavigationViewTestsBase.cs.

        {
            return (uIObject == null) ? "" :
                string.Join("/",
                    new[] { uIObject.Name, uIObject.ClassName, uIObject.AutomationId }.
                        Where(s => s != null));
        }

void VerifyBackAndCloseButtonsVisibility ( bool inLeftMinimalPanelDisplayMode ) [inline, protected]

Definition at line 320 of file NavigationViewTestsBase.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                var isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                Verify.AreEqual(expanded, displayModeTextBox.DocumentText, "Original DisplayMode expected to be Expanded");

                if (inLeftMinimalPanelDisplayMode)
                {
                    Log.Comment("Set PaneDisplayMode to LeftMinimal");
                    panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
                    Wait.ForIdle();

                    Log.Comment("Verify Pane is closed automatically when PaneDisplayMode becomes LeftMinimal");
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False when PaneDisplayMode becomes LeftMinimal");
                }
                else
                {
                    Log.Comment("Set PaneDisplayMode to Auto");
                    panelDisplayModeComboBox.SelectItemByName("Auto");
                    Wait.ForIdle();

                    Log.Comment("Verify Pane remains open when PaneDisplayMode becomes Auto");
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to remain True when PaneDisplayMode becomes Auto");

                    Log.Comment("Verify back button is visible when pane is open in Expanded DisplayMode");
                    VerifyElement.Found("NavigationViewBackButton", FindBy.Id);

                    Log.Comment("Verify close button is not visible when pane is open in Expanded DisplayMode");
                    VerifyElement.NotFound("NavigationViewCloseButton", FindBy.Id);

                    Log.Comment("Decrease the width of the control from Wide to Narrow and force pane closure");
                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing width");
                    Verify.AreEqual(minimal, displayModeTextBox.DocumentText);
                }

                Log.Comment("Verify toggle-pane button is visible when pane is closed");
                VerifyElement.Found("TogglePaneButton", FindBy.Id);

                Log.Comment("Verify back button is visible when pane is closed");
                VerifyElement.Found("NavigationViewBackButton", FindBy.Id);

                Log.Comment("Verify close button is not visible when pane is closed");
                VerifyElement.NotFound("NavigationViewCloseButton", FindBy.Id);

                Log.Comment("Open the pane");
                isPaneOpenCheckBox.Check();
                Wait.ForIdle();

                Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                Log.Comment("Verify toggle-pane button is visible when pane is open");
                VerifyElement.Found("TogglePaneButton", FindBy.Id);

                Log.Comment("Verify back button is not visible when pane is open");
                VerifyElement.NotFound("NavigationViewBackButton", FindBy.Id);

                Log.Comment("Verify close button is visible when pane is open");
                VerifyElement.Found("NavigationViewCloseButton", FindBy.Id);

                Button closeButton = new Button(FindElement.ById("NavigationViewCloseButton"));
                Verify.IsNotNull(closeButton);
                Verify.IsTrue(closeButton.IsEnabled, "Close button is expected to be enabled");

                CheckBox backButtonVisibilityCheckbox = new CheckBox(FindElement.ByName("BackButtonVisibilityCheckbox"));

                backButtonVisibilityCheckbox.Uncheck();
                Wait.ForIdle();

                Log.Comment("Verify back button is not visible when pane is open");
                VerifyElement.NotFound("NavigationViewBackButton", FindBy.Id);

                Log.Comment("Verify close button is no longer visible when pane is open");
                VerifyElement.NotFound("NavigationViewCloseButton", FindBy.Id);
            }
        }

void WaitAndAssertPaneStatus ( PaneOpenStatus status ) [inline, protected]

Definition at line 106 of file NavigationViewTestsBase.cs.

        {
            string expectString = status == PaneOpenStatus.Opened ? "Opened" : "Closed";
            var eventTextBlock = new TextBlock(FindElement.ByName("PaneOpenedOrClosedEvent"));

            Log.Comment("PaneOpenedOrClosedEvent before wait: " + eventTextBlock.GetText());
            TestEnvironment.VerifyAreEqualWithRetry(100, // wait max to 5s
                () => expectString,
                () => eventTextBlock.GetText());
        }

Member Data Documentation

const string compact = "Compact" [protected]

Definition at line 25 of file NavigationViewTestsBase.cs.

const string expanded = "Expanded" [protected]

Definition at line 26 of file NavigationViewTestsBase.cs.

const string minimal = "Minimal" [protected]

Definition at line 24 of file NavigationViewTestsBase.cs.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/NavigationViewTestsBase.cs
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PaneBehaviorTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • PaneBehaviorTests
Public Member Functions | Static Public Member Functions

PaneBehaviorTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests::NavigationViewTestsBase.

List of all members.

Public Member Functions

void | CompactModeAutoPaneClosingTest ()
void | EnsureDynamicSizeForPaneHeaderFooterAndCustomContent ()
void | EnsurePaneCanBeHidden ()
void | EnsurePaneCanBeHiddenWithFixedWindowSize ()
void | ForceIsPaneOpenToFalseOnLeftNavTest ()
void | LightDismissTest ()
void | PaneClosedUponLaunch ()
void | PaneDisplayModeLeftLeftCompactLeftMinimalTest ()
void | PaneFooterContentTest ()
void | PaneNotOpeningTopMode ()
void | PaneOpenCloseEventsTest ()
void | PaneOpenCloseTest ()
void | PaneOpenCloseTestPartTwo ()
void | PaneOpenForceCloseTest ()
void | PaneTabNavigationTest ()
void | SelectingAnItemInLeftCompactOrLeftMinimalClosesPane ()
void | VerifyBackAndCloseButtonsVisibilityInAutoPaneDisplayMode ()
void | VerifyBackAndCloseButtonsVisibilityInLeftMinimalPaneDisplayMode ()
void | VerifyChangingFooterMenuItemVisibilityAdjustsPaneLayout ()
void | VerifyCorrectVisualStateWhenChangingPaneDisplayMode ()
void | VerifyCorrectVisualStateWhenClosingPaneInLeftDisplayMode ()
void | VerifyExpandedItemsSaveStateWhenClosingAndOpeningPane ()
void | VerifyIconsRespectCompactPaneLength ()
void | VerifyPaneIsClosedAfterSelectingItem ()
void | VerifyPaneIsClosedWhenClickingOnSelectedItem ()
void | VerifyPaneLayoutDynamicallyUpdatingCollections ()
void | VerifyPaneLayoutDynamicallyUpdatingCollectionsFooterPrecedence ()
void | VerifyPaneLayoutSettingsDisabledNoGapFooterItems ()
void | VerifyPaneLayoutSettingsDisabledNoGapMenuItems ()
void | VerifyPaneLayoutSwappingCollections ()
void | VerifyPaneTitlePresentAndUpdates ()
void | VerifyPaneVisibleOnInit ()
void | VerifySettingsWidthOnLeftNavMediumMode ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 24 of file PaneBehaviorTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 31 of file PaneBehaviorTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void CompactModeAutoPaneClosingTest ( ) [inline]

Definition at line 149 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                // Unmaximize the window
                KeyboardHelper.PressKey(Key.Down, ModifierKey.Windows, 1);

                // Resize window quickly
                KeyboardHelper.PressDownModifierKey(ModifierKey.Windows);
                KeyboardHelper.PressKeySequence(new[] { Key.Left, Key.Right, Key.Left, Key.Right, Key.Left });
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Windows);

                Wait.ForIdle();

                CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");

                var getVisualStateButton = new Button(FindElement.ByName("GetNavViewActiveVisualStates"));
                getVisualStateButton.Invoke();
                Wait.ForIdle();
                var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
                Verify.IsTrue(result.GetText().Contains("ListSizeCompact"), "Verify pane list is in ListSizeCompact state");

                // Maximize the window
                KeyboardHelper.PressKey(Key.Right, ModifierKey.Windows, 1);
                KeyboardHelper.PressKey(Key.Up, ModifierKey.Windows, 1);
            }
        }

void EnsureDynamicSizeForPaneHeaderFooterAndCustomContent ( ) [inline]

Definition at line 906 of file PaneBehaviorTests.cs.

        {
            if (PlatformConfiguration.IsDebugBuildConfiguration())
            {
                // Test is failing in chk configuration due to:
                // Bug #1734 NavigationViewTests.EnsureDynamicSizeForPaneHeaderFooterAndCustomContent fails in CHK configuration
                Log.Warning("Skipping test for Debug builds.");
                return;
            }

            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Stretch Test" }))
            {
                Button navButton = new Button(FindElement.ById("TogglePaneButton"));

                // NavigationViewCompactPaneLength is 40 or 48 in different release. This test case doesn't need an exactly number of width, so just choose 48 as the boundary
                // PaneHeader share the same row with ToggleButton, so it's width is not the same with other buttons
                var widthCompactBoundary = 48;
                var widthOpenPaneLength = 320;

                Button paneHeaderButton = new Button(FindElement.ById("PaneHeader"));
                Log.Comment("PaneHeader size actual width is " + paneHeaderButton.BoundingRectangle.Width);
                Verify.IsTrue(paneHeaderButton.BoundingRectangle.Width > widthCompactBoundary && paneHeaderButton.BoundingRectangle.Width < widthOpenPaneLength);

                Button paneFooterButton = new Button(FindElement.ById("PaneFooter"));
                Log.Comment("PaneFooter size actual width is " + paneFooterButton.BoundingRectangle.Width);
                Verify.IsTrue(paneFooterButton.BoundingRectangle.Width == widthOpenPaneLength);

                Button paneCustomContentButton = new Button(FindElement.ById("PaneCustomContent"));
                Log.Comment("paneCustomContentButton size actual width is " + paneCustomContentButton.BoundingRectangle.Width);
                Verify.IsTrue(paneCustomContentButton.BoundingRectangle.Width == widthOpenPaneLength);

                Log.Comment("Verify that clicking the navigation button closes the nav pane");
                navButton.Invoke();
                Wait.ForIdle();

                paneHeaderButton = new Button(FindElement.ById("PaneHeader"));
                Log.Comment("PaneHeader is collapsed");
                Verify.IsTrue(paneHeaderButton.BoundingRectangle.Width == 0);

                Log.Comment("PaneFooter size actual width is " + paneFooterButton.BoundingRectangle.Width);
                Verify.IsTrue(paneFooterButton.BoundingRectangle.Width <= widthCompactBoundary && paneFooterButton.BoundingRectangle.Width > 0);

                Log.Comment("paneCustomContentButton size actual width is " + paneCustomContentButton.BoundingRectangle.Width);
                Verify.IsTrue(paneCustomContentButton.BoundingRectangle.Width <= widthCompactBoundary && paneCustomContentButton.BoundingRectangle.Width > 0);
            }
        }

void EnsurePaneCanBeHidden ( ) [inline]

Definition at line 568 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var paneRoot = FindElement.ById("PaneRoot");
                Verify.IsFalse(paneRoot.IsOffscreen);

                var paneVisibleCheckBox = new CheckBox(FindElement.ByName("IsPaneVisibleCheckBox"));
                paneVisibleCheckBox.Uncheck();
                Wait.ForIdle();

                Verify.IsTrue(paneRoot.IsOffscreen);
            }
        }

void EnsurePaneCanBeHiddenWithFixedWindowSize ( ) [inline]

Definition at line 586 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var paneRoot = FindElement.ById("PaneRoot");
                Verify.IsFalse(paneRoot.IsOffscreen);

                SetNavViewWidth(ControlWidth.Wide);

                var paneVisibleCheckBox = new CheckBox(FindElement.ByName("IsPaneVisibleCheckBox"));

                paneVisibleCheckBox.Uncheck();
                Wait.ForIdle();
                Verify.IsTrue(paneRoot.IsOffscreen);

                paneVisibleCheckBox.Check();
                Wait.ForIdle();
                Verify.IsFalse(paneRoot.IsOffscreen);
            }
        }

void ForceIsPaneOpenToFalseOnLeftNavTest ( ) [inline]

Definition at line 245 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Navigation IsPaneOpen Test" }))
            {
                Log.Comment("Verify IsPaneOpen=False would not open the pane by default");
                CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");

                Button navButton = new Button(FindElement.ById("TogglePaneButton"));

                Log.Comment("Verify that clicking the navigation button opens the nav pane");
                navButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after clicking the navigation button");
            }
        }

void LightDismissTest ( ) [inline]

Definition at line 843 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    SetNavViewWidth(ControlWidth.Medium);
                    WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                    using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                    {
                        isPaneOpenCheckBox.Toggle();
                        waiter.Wait();
                    }
                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    if (TestEnvironment.Application.SupportsBackButton)
                    {
                        PaneOpenCloseTestCaseRetry(3, () =>
                        {
                            KeyboardHelper.PressKey(Key.Backspace, ModifierKey.Windows);
                            Wait.ForIdle();
                            WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
                            Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "Verify Windows+Back light dismisses the pane");
                        });

                        isPaneOpenCheckBox.Toggle();
                    }
                    else
                    {
                        // The Windows+Back key combination relies on the system BackButton, which isn't present in win32.
                        Log.Comment("Skipping Windows+Back test because it's not supported in Win32/Desktop mode");
                    }

                    Wait.ForIdle();
                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    PaneOpenCloseTestCaseRetry(3, () =>
                    {
                        KeyboardHelper.PressKey(Key.Left, ModifierKey.Alt);
                        Wait.ForIdle();
                        WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
                        Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "Verify Alt+Left light dismisses the pane");
                    });

                    isPaneOpenCheckBox.Toggle();
                    Wait.ForIdle();
                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
                }
            }
        }

void PaneClosedUponLaunch ( ) [inline]

Definition at line 38 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Navigation Minimal Test" }))
                {
                    Log.Comment("Verify that NavigationView with DisplayMode set to 'Auto' and a narrow width does not display pane on load.");
                    CheckBox isAutoPaneOpenCheckBox = new CheckBox(FindElement.ById("IsAutoPaneOpenCheckBox"));
                    Wait.ForIdle();
                    Verify.IsTrue(isAutoPaneOpenCheckBox.ToggleState == ToggleState.Off);

                    Log.Comment("Verify that NavigationView with DisplayMode set to 'LeftMinimal' does not display pane on load.");
                    CheckBox isLeftMinimalPaneOpenCheckBox = new CheckBox(FindElement.ById("IsLeftMinimalPaneOpenCheckBox"));
                    Verify.IsTrue(isLeftMinimalPaneOpenCheckBox.ToggleState == ToggleState.Off);

                    Log.Comment("Verify that NavigationView with DisplayMode set to 'LeftCompact' does not display pane on load.");
                    CheckBox isLeftCompactPaneOpenCheckBox = new CheckBox(FindElement.ById("IsLeftCompactPaneOpenCheckBox"));
                    Verify.IsTrue(isLeftCompactPaneOpenCheckBox.ToggleState == ToggleState.Off);
                }

            }
        }

void PaneDisplayModeLeftLeftCompactLeftMinimalTest ( ) [inline]

Definition at line 501 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));

                // Tests with PaneDisplayMode=Left/LeftCompact/LeftMinimal.
                // This disables all adaptive layout behavior.

                Log.Comment("Test PaneDisplayMode=Left");
                panelDisplayModeComboBox.SelectItemByName("Left");
                Wait.ForIdle();

                Log.Comment("DisplayMode should be 'Expanded' regardless of size");
                SetNavViewWidth(ControlWidth.Narrow);
                Wait.ForIdle();
                Verify.AreEqual(expanded, displayModeTextBox.DocumentText);

                SetNavViewWidth(ControlWidth.Medium);
                Wait.ForIdle();
                Verify.AreEqual(expanded, displayModeTextBox.DocumentText);

                SetNavViewWidth(ControlWidth.Wide);
                Wait.ForIdle();
                Verify.AreEqual(expanded, displayModeTextBox.DocumentText);

                Log.Comment("Test PaneDisplayMode=LeftCompact");
                panelDisplayModeComboBox.SelectItemByName("LeftCompact");
                Wait.ForIdle();

                Log.Comment("DisplayMode should be 'Compact' regardless of size");
                SetNavViewWidth(ControlWidth.Narrow);
                Wait.ForIdle();
                Verify.AreEqual(compact, displayModeTextBox.DocumentText);

                SetNavViewWidth(ControlWidth.Medium);
                Wait.ForIdle();
                Verify.AreEqual(compact, displayModeTextBox.DocumentText);

                SetNavViewWidth(ControlWidth.Wide);
                Wait.ForIdle();
                Verify.AreEqual(compact, displayModeTextBox.DocumentText);

                Log.Comment("Test PaneDisplayMode=LeftMinimal");
                panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
                Wait.ForIdle();

                Log.Comment("DisplayMode should be 'Minimal' regardless of size");
                SetNavViewWidth(ControlWidth.Narrow);
                Wait.ForIdle();
                Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                SetNavViewWidth(ControlWidth.Medium);
                Wait.ForIdle();
                Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                SetNavViewWidth(ControlWidth.Wide);
                Wait.ForIdle();
                Verify.AreEqual(minimal, displayModeTextBox.DocumentText);
            }
        }

void PaneFooterContentTest ( ) [inline]

Definition at line 415 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                Log.Comment("Verify that button in PaneFooterContent exists");
                VerifyElement.Found("PaneFooterButton", FindBy.Id);
            }
        }

void PaneNotOpeningTopMode ( ) [inline]

Definition at line 313 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView TopNav Test" }))
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be false");

                    GamepadHelper.PressButton(FindElement.ById("NavView"), GamepadButton.View);

                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after increasing the width of the control from compact to expanded");
                }
            }
        }

void PaneOpenCloseEventsTest ( ) [inline]

Definition at line 118 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    TextBlock lastIngEventTextblock = new TextBlock(FindElement.ByName("LastIngEventText"));
                    TextBlock lastEdEventTextblock = new TextBlock(FindElement.ByName("LastEdEventText"));

                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                    togglePaneButton.Invoke();
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
                    Verify.AreEqual("PaneClosed event fired", lastEdEventTextblock.DocumentText);
                    Verify.AreEqual("PaneClosing event fired", lastIngEventTextblock.DocumentText);

                    togglePaneButton.Invoke();
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
                    Verify.AreEqual("PaneOpened event fired", lastEdEventTextblock.DocumentText);
                    Verify.AreEqual("PaneOpening event fired", lastIngEventTextblock.DocumentText);
                }
            }
        }

void PaneOpenCloseTest ( ) [inline]

Definition at line 264 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    // On phone, the pane will initially be in the closed compact state, so open it before
                    // proceeding with the test.
                    if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
                    {
                        using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                        {
                            isPaneOpenCheckBox.Toggle();
                            waiter.Wait();
                        }
                    }

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    Button navButton = new Button(FindElement.ById("TogglePaneButton"));

                    Log.Comment("Verify that clicking the navigation button closes the nav pane");
                    navButton.Invoke();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after clicking the navigation button");

                    Log.Comment("Verify that clicking the navigation button opens the nav pane");
                    navButton.Invoke();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after clicking the navigation button");

                    Log.Comment("Verify that decreasing the width of the control from expanded to compact closes the pane");
                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing the width of the control from expanded to compact");

                    Log.Comment("Verify that increasing the width of the control from compact to expanded opens the pane");
                    SetNavViewWidth(ControlWidth.Wide);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after increasing the width of the control from compact to expanded");
                }
            }
        }

void PaneOpenCloseTestPartTwo ( ) [inline]

Definition at line 64 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    // On phone, the pane will initially be in the closed compact state, so open it before
                    // proceeding with the test.
                    if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
                    {
                        using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                        {
                            isPaneOpenCheckBox.Toggle();
                            waiter.Wait();
                        }
                    }

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    Button navButton = new Button(FindElement.ById("TogglePaneButton"));

                    Log.Comment("Verify that after explicitly closing the nav pane, changing display mode doesn't reopen it");
                    navButton.Invoke();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after explicitly closing the nav pane & changing display mode");
                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
                    SetNavViewWidth(ControlWidth.Wide);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");

                    Log.Comment("Verify that selecting a menu item in minimal display mode opens the pane");
                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    navButton.Invoke();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after selecting a menu item in minimal display mode");

                    Log.Comment("Invoke Music item to close the pane");
                    var music = new Button(FindElement.ByName("Music"));
                    music.Click();
                    Wait.ForIdle();

                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after invoking Music item");
                }
            }
        }

void PaneOpenForceCloseTest ( ) [inline]

Definition at line 334 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");

                    Button navButton = new Button(FindElement.ById("TogglePaneButton"));

                    Log.Comment("Verify that clicking the navigation button closes the nav pane");
                    navButton.Invoke();
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after clicking the navigation button");

                    TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));

                    Log.Comment("Verify that decreasing the width of the control from expanded to Narrow and force closed pane");
                    SetNavViewWidth(ControlWidth.Narrow);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing the width of the control from expanded to Narrow");
                    Verify.AreEqual(minimal, displayModeTextBox.DocumentText);

                    Log.Comment("Verify that decreasing the width of the control from Narrow to compact and force closed pane");
                    SetNavViewWidth(ControlWidth.Medium);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing the width of the control from Narrow to compact");
                    Verify.AreEqual(compact, displayModeTextBox.DocumentText);

                    Log.Comment("Verify that increasing the width of the control from compact to expanded and force closed pane");
                    SetNavViewWidth(ControlWidth.Wide);
                    Wait.ForIdle();
                    Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after increasing the width of the control from compact to expanded");
                    Verify.AreEqual(expanded, displayModeTextBox.DocumentText);
                }
            }
        }

void PaneTabNavigationTest ( ) [inline]

Definition at line 180 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    SetNavViewWidth(ControlWidth.Wide);

                    Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
                    UIObject firstItem = FindElement.ByName("Home");
                    UIObject settingsItem = FindElement.ByName("Settings");
                    UIObject nextTabTarget = FindElement.ByName("WidthComboBox");

                    CheckBox autoSuggestCheckBox = new CheckBox(FindElement.ByName("AutoSuggestCheckbox"));
                    autoSuggestCheckBox.Uncheck();
                    Wait.ForIdle();

                    Log.Comment("Verify that in Expanded mode, tab navigation can leave the pane");
                    firstItem.SetFocus();
                    Wait.ForIdle();
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                    Wait.ForIdle();

                    Wait.RetryUntilEvalFuncSuccessOrTimeout(
                        () => { return togglePaneButton.HasKeyboardFocus; },
                        retryTimoutByMilliseconds: 3000
                    );

                    Log.Comment("Verify pressing shift-tab from the first menu item goes to the toggle button");
                    Verify.IsTrue(togglePaneButton.HasKeyboardFocus);

                    settingsItem.SetFocus();
                    Wait.ForIdle();
                    KeyboardHelper.PressKey(Key.Tab);
                    Wait.ForIdle();
                    Log.Comment("Verify pressing tab from settings goes to the first tab stop in the content area");
                    Verify.IsTrue(nextTabTarget.HasKeyboardFocus);

                    SetNavViewWidth(ControlWidth.Medium);

                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
                    isPaneOpenCheckBox.Check();
                    Wait.ForIdle();

                    Log.Comment("Verify that in an overlay mode, tab navigation cannot leave the pane while the pane is open");
                    firstItem.SetFocus();
                    Wait.ForIdle();
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
                    Wait.ForIdle();
                    Log.Comment("Verify pressing shift-tab from the first menu item goes to settings");
                    Verify.IsTrue(settingsItem.HasKeyboardFocus);

                    settingsItem.SetFocus();
                    Wait.ForIdle();
                    KeyboardHelper.PressKey(Key.Tab);
                    Wait.ForIdle();
                    Log.Comment("Verify pressing tab from settings goes to the first menu item");
                    Verify.IsTrue(firstItem.HasKeyboardFocus);
                }
            }
        }

void SelectingAnItemInLeftCompactOrLeftMinimalClosesPane ( ) [inline]

Definition at line 956 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var configs = new ControlWidth[] { ControlWidth.Narrow, ControlWidth.Medium };

                foreach(var width in configs)
                {
                    SetNavViewWidth(width);

                    CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                    // Ensure pane is open.
                    if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
                    {
                        using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
                        {
                            isPaneOpenCheckBox.Toggle();
                            waiter.Wait();
                        }
                    }

                    var querySubmittedCheckbox = new CheckBox(FindElement.ByName("SuggestionChosenCheckbox"));
                    querySubmittedCheckbox.Uncheck();

                    Wait.ForIdle();

                    var autoSuggestBox = FindElement.ByName("PaneAutoSuggestBox");
                    Verify.IsNotNull(autoSuggestBox);
                    autoSuggestBox.SetFocus();

                    var autoSuggestBoxEdit = new Edit(autoSuggestBox);
                    Verify.IsNotNull(autoSuggestBoxEdit);
                    // Search for something

                    autoSuggestBoxEdit.SendKeys("Text");
                    Wait.ForIdle();

                    // Select item by clicking a bit lower
                    KeyboardHelper.PressKey(Key.Down);
                    KeyboardHelper.PressKey(Key.Enter);

                    Wait.ForIdle();

                    Verify.AreEqual(ToggleState.On, querySubmittedCheckbox.ToggleState,
                        "Should've submitted a query");

                    Verify.AreEqual(ToggleState.Off, new CheckBox(FindElement.ByName("IsPaneOpenCheckBox")).ToggleState,
                        "Pane should be closed");
                }
            }
        }

void VerifyBackAndCloseButtonsVisibilityInAutoPaneDisplayMode ( ) [inline]

Definition at line 809 of file PaneBehaviorTests.cs.

        {
            VerifyBackAndCloseButtonsVisibility(inLeftMinimalPanelDisplayMode: false);
        }

void VerifyBackAndCloseButtonsVisibilityInLeftMinimalPaneDisplayMode ( ) [inline]

Definition at line 801 of file PaneBehaviorTests.cs.

        {
            VerifyBackAndCloseButtonsVisibility(inLeftMinimalPanelDisplayMode: true);
        }

void VerifyChangingFooterMenuItemVisibilityAdjustsPaneLayout ( ) [inline]

Definition at line 1330 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    Log.Comment("Verify that FooterItem is hidden.");
                    UIObject footerItem = FindElement.ByName("FooterItem");
                    Verify.IsNull(footerItem);

                    Log.Comment("Change FooterItem Visibility to Visible");
                    var showFooterItemButton = new Button(FindElement.ByName("ShowFooterItemButton"));
                    showFooterItemButton.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Verify that FooterItem is visible.");
                    footerItem = FindElement.ByName("FooterItem");
                    Verify.IsNotNull(footerItem);
                }
            }
        }

void VerifyCorrectVisualStateWhenChangingPaneDisplayMode ( ) [inline]

Definition at line 723 of file PaneBehaviorTests.cs.

        {
            // We expect this mapping:
            //  Top, and LeftMinimal -> VisualState Minimal
            //  LeftCompact -> VisualState Compact
            //  Left -> VisualState Expanded

            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                var getActiveVisualStateButton = new Button(FindElement.ByName("GetActiveVisualState"));
                var invokeResult = new Edit(FindElement.ById("TestResult"));
                var isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));

                Log.Comment("Set PaneDisplayMode to Top");
                panelDisplayModeComboBox.SelectItemByName("Top");
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }
                Verify.IsTrue(invokeResult.Value.Contains("Minimal"));

                Log.Comment("Set PaneDisplayMode to Left");
                panelDisplayModeComboBox.SelectItemByName("Left");
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }
                Verify.IsTrue(invokeResult.Value.Contains("Expanded"));

                Log.Comment("Set PaneDisplayMode to Top");
                panelDisplayModeComboBox.SelectItemByName("Top");
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }
                Verify.IsTrue(invokeResult.Value.Contains("Minimal"));

                Log.Comment("Set PaneDisplayMode to LeftCompact");
                panelDisplayModeComboBox.SelectItemByName("LeftCompact");
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }
                Verify.IsTrue(invokeResult.Value.Contains("Compact"));

                Log.Comment("Set PaneDisplayMode to LeftMinimal");
                panelDisplayModeComboBox.SelectItemByName("LeftMinimal");

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }
                Verify.IsTrue(invokeResult.Value.Contains("Minimal"));
                Log.Comment("Verify Pane is closed automatically when PaneDisplayMode is Minimal");
                Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False when PaneDisplayMode is Minimal");

                Log.Comment("Set DisplayMode to Left");
                panelDisplayModeComboBox.SelectItemByName("Left");
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }
                Verify.IsTrue(invokeResult.Value.Contains("Expanded"));
                Log.Comment("Verify Pane is opened automatically when PaneDisplayMode is changed from Minimal to Left");
                Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True when PaneDisplayMode is changed from Minimal to Left");
            }
        }

void VerifyCorrectVisualStateWhenClosingPaneInLeftDisplayMode ( ) [inline]

Definition at line 651 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                // Test for explicit pane close

                // make sure the NavigationView is in left mode with pane expanded
                Log.Comment("Change display mode to left expanded");
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("Left");
                Wait.ForIdle();

                TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
                Verify.AreEqual(expanded, displayModeTextBox.DocumentText);

                Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));

                // manually close pane
                Log.Comment("Close NavView pane explicitly");
                togglePaneButton.Invoke();
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                Log.Comment("Get NavView Active VisualStates");
                var getNavViewActiveVisualStatesButton = new Button(FindElement.ByName("GetNavViewActiveVisualStates"));
                getNavViewActiveVisualStatesButton.Invoke();
                Wait.ForIdle();

                // check visual state
                var visualStateName = "ListSizeCompact";
                var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));

                Verify.IsTrue(result.GetText().Contains(visualStateName), "active VisualStates doesn't include " + visualStateName);

                // Test for light dismiss pane close

                Log.Comment("Change display mode to left compact");
                panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("LeftCompact");
                Wait.ForIdle();

                displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
                Verify.AreEqual(compact, displayModeTextBox.DocumentText);

                // expand pane
                Log.Comment("Expand NavView pane");
                togglePaneButton.Invoke();
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                // light dismiss pane
                Log.Comment("Light dismiss NavView pane");
                getNavViewActiveVisualStatesButton.Click(); // NOTE: Must be Click because this is verifying that the mouse light dismiss behavior closes the nav view
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                Log.Comment("Get NavView Active VisualStates");
                getNavViewActiveVisualStatesButton.Invoke();
                Wait.ForIdle();

                // check visual state
                result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
                Verify.IsTrue(result.GetText().Contains(visualStateName), "active VisualStates doesn't include " + visualStateName);
            }
        }

void VerifyExpandedItemsSaveStateWhenClosingAndOpeningPane ( ) [inline]

Definition at line 1237 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildHierarchicalNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                    Button toggleButton = new Button(FindElement.ById("TogglePaneButton"));

                    Log.Comment("Test PaneDisplayMode=Auto");
                    panelDisplayModeComboBox.SelectItemByName("Auto");
                    Wait.ForIdle();

                    // Select Menu Item 1 in the tree
                    Log.Comment("Select Menu Item 1 in the tree");
                    UIObject menuItem1 = FindElement.ByName("Menu Item 1");
                    menuItem1.Click();
                    Wait.ForIdle();

                    // Verify that the item is expanded
                    Log.Comment("Verify that the item is expanded by looking for Menu Item 2.");
                    UIObject menuItem2 = FindElement.ByName("Menu Item 2");
                    Verify.IsNotNull(menuItem2);

                    // Close the pane
                    Log.Comment("Close the pane by clicking on the ToggleButton");
                    toggleButton.Invoke();
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                    // Open the pane
                    Log.Comment("Open the pane by clicking on the ToggleButton");
                    toggleButton.Invoke();
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                    ElementCache.Clear();

                    // Verify that the item is still expanded
                    Log.Comment("Verify that the item is still expanded by looking for Menu Item 2.");
                    menuItem2 = FindElement.ByName("Menu Item 2");
                    Verify.IsNotNull(menuItem2);

                    // Change the pane display mode to LeftCompact
                    Log.Comment("Change the pane display mode to LeftCompact");
                    panelDisplayModeComboBox.SelectItemByName("LeftCompact");
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                    // Open the pane
                    Log.Comment("Open the pane by clicking on the ToggleButton");
                    toggleButton.Invoke();
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                    ElementCache.Clear();

                    // Verify that the item is still expanded
                    Log.Comment("Verify that the item is still expanded by looking for Menu Item 2.");
                    menuItem2 = FindElement.ByName("Menu Item 2");
                    Verify.IsNotNull(menuItem2);

                    // Change the pane display mode to LeftMinimal
                    Log.Comment("Change the pane display mode to LeftMinimal");
                    panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                    // Open the pane
                    Log.Comment("Open the pane by clicking on the ToggleButton");
                    toggleButton.Invoke();
                    Wait.ForIdle();

                    WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                    ElementCache.Clear();

                    // Verify that the item is still expanded
                    Log.Comment("Verify that the item is still expanded by looking for Menu Item 2.");
                    menuItem2 = FindElement.ByName("Menu Item 2");
                    Verify.IsNotNull(menuItem2);
                }
            }
        }

void VerifyIconsRespectCompactPaneLength ( ) [inline]

Definition at line 609 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView compact pane length test" }))
            {
                var checkMenuItemsButton = FindElement.ByName("CheckMenuItemsOffset");
                var compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
                var displayModeToggle = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                var currentStatus = new CheckBox(FindElement.ByName("MenuItemsCorrectOffset"));

                checkMenuItemsButton.Click();
                Log.Comment("Verifying compact pane length set before loading working");
                Wait.ForIdle();
                compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
                Verify.IsTrue(currentStatus.ToggleState == ToggleState.On);

                Log.Comment("Verifying changing compact pane length in left mode working");
                compactpaneCheckbox.SelectItemByName("96");
                Wait.ForIdle();

                checkMenuItemsButton.Click();
                Wait.ForIdle();
                compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
                Verify.IsTrue(currentStatus.ToggleState == ToggleState.On);

                // Check if changing displaymode to top and then changing length gets used correctly
                Log.Comment("Verifying changing compact pane length during top mode working");
                displayModeToggle.SelectItemByName("Top");
                compactpaneCheckbox.SelectItemByName("48");
                Wait.ForIdle();

                displayModeToggle.SelectItemByName("Left");
                Wait.ForIdle();

                checkMenuItemsButton.Click();
                Wait.ForIdle();
                compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
                Verify.IsTrue(currentStatus.ToggleState == ToggleState.On);
            }
        }

void VerifyPaneIsClosedAfterSelectingItem ( ) [inline]

Definition at line 467 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));

                Log.Comment("Test PaneDisplayMode=LeftMinimal");
                panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                Log.Comment("Click on ToggleButton");
                Button navButton = new Button(FindElement.ById("TogglePaneButton"));
                navButton.Invoke();
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                TextBlock selectionRaisedIndicator = new TextBlock(FindElement.ById("SelectionChangedRaised"));

                Log.Comment("Select Apps");
                ComboBox selectedItem = new ComboBox(FindElement.ById("SelectedItemCombobox"));
                selectedItem.SelectItemByName("Apps");
                Verify.AreEqual("True", selectionRaisedIndicator.GetText());
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
            }
        }

void VerifyPaneIsClosedWhenClickingOnSelectedItem ( ) [inline]

Definition at line 426 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));

                Log.Comment("Test PaneDisplayMode=LeftMinimal");
                panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                Log.Comment("Click on ToggleButton");
                Button navButton = new Button(FindElement.ById("TogglePaneButton"));
                navButton.Invoke();
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Opened);

                Log.Comment("Select Apps");
                UIObject appsItem = FindElement.ByName("Apps");
                appsItem.Click();
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Closed);

                Log.Comment("Click on ToggleButton");
                navButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Click on SelectedItem Apps");
                appsItem.Click();
                Wait.ForIdle();

                WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
            }
        }

void VerifyPaneLayoutDynamicallyUpdatingCollections ( ) [inline]

Definition at line 1046 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
            {
                var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
                var resultTextBlock = FindElement.ByName("LayoutHeightsReport");

                var addMenuItemButton = new Button(FindElement.ByName("AddMenuItemButton"));
                var addFooterItemButton = new Button(FindElement.ByName("AddFooterItemButton"));
                var resetCollectionsButton = new Button(FindElement.ByName("ResetCollectionsButton"));

                // Fill menu items
                AddMenuItem(248, 160);
                AddMenuItem(248, 160);
                AddMenuItem(248, 160);

                // Fill footer items
                AddFooterItem(198, 200);
                AddFooterItem(190, 204);

                // Check that we reached equilibrium.
                AddFooterItem(190, 204);
                AddMenuItem(190, 204);

                resetCollectionsButton.Click();
                Wait.ForIdle();
                VerifyHeights(248, 160);

                void VerifyHeights(double menuItemsHeight, double footerItemsHeight)
                {
                    readResults.Click();
                    var result = resultTextBlock.GetText().Split(";");

                    Verify.IsTrue(Math.Abs(menuItemsHeight - double.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
                    Verify.IsTrue(Math.Abs(footerItemsHeight - double.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
                }

                void AddMenuItem(double menuItemsHeight, double footerItemsHeight)
                {
                    addMenuItemButton.Click();
                    Wait.ForIdle();
                    VerifyHeights(menuItemsHeight, footerItemsHeight);
                }

                void AddFooterItem(double menuItemsHeight, double footerItemsHeight)
                {
                    addFooterItemButton.Click();
                    Wait.ForIdle();
                    VerifyHeights(menuItemsHeight, footerItemsHeight);
                }
            }
        }

void VerifyPaneLayoutDynamicallyUpdatingCollectionsFooterPrecedence ( ) [inline]

Definition at line 1101 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
            {
                var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
                var resultTextBlock = FindElement.ByName("LayoutHeightsReport");

                var addMenuItemButton = new Button(FindElement.ByName("AddMenuItemButton"));
                var addFooterItemButton = new Button(FindElement.ByName("AddFooterItemButton"));
                var resetCollectionsButton = new Button(FindElement.ByName("ResetCollectionsButton"));

                // Fill footer items
                AddFooterItem(208, 200);
                AddFooterItem(168, 240);
                AddFooterItem(128, 280);
                AddFooterItem(114, 284);

                AddMenuItem(104, 290);
                AddMenuItem(144, 250);
                AddMenuItem(185, 210);

                void VerifyHeights(double menuItemsHeight, double footerItemsHeight)
                {
                    readResults.Click();
                    var result = resultTextBlock.GetText().Split(";");

                    Verify.IsTrue(Math.Abs(menuItemsHeight - double.Parse(result[0])) < 5, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
                    Verify.IsTrue(Math.Abs(footerItemsHeight - double.Parse(result[1])) < 5, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
                }

                void AddMenuItem(double menuItemsHeight, double footerItemsHeight)
                {
                    addMenuItemButton.Click();
                    Wait.ForIdle();
                    VerifyHeights(menuItemsHeight, footerItemsHeight);
                }

                void AddFooterItem(double menuItemsHeight, double footerItemsHeight)
                {
                    addFooterItemButton.Click();
                    Wait.ForIdle();
                    VerifyHeights(menuItemsHeight, footerItemsHeight);
                }
            }
        }

void VerifyPaneLayoutSettingsDisabledNoGapFooterItems ( ) [inline]

Definition at line 1193 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
            {
                var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
                var resultTextBlock = FindElement.ByName("LayoutHeightsReport");

                var addFooterItemButton = new Button(FindElement.ByName("AddFooterItemButton"));
                new Button(FindElement.ByName("ClearCollectionsButton")).Click();
                new CheckBox(FindElement.ByName("IsSettingsEnabledCheckbox")).Uncheck();

                AddFooterItem(0, 40);
                AddFooterItem(0, 80);
                AddFooterItem(0,120);
                AddFooterItem(0,160);
                AddFooterItem(0,200);
                AddFooterItem(0,240);
                AddFooterItem(0,280);
                AddFooterItem(0,320);
                AddFooterItem(0,360);
                AddFooterItem(0,400);
                AddFooterItem(0,412);
                AddFooterItem(0,412);

                void VerifyHeights(int menuItemsHeight, int footerItemsHeight)
                {
                    readResults.Click();
                    var result = resultTextBlock.GetText().Split(";");

                    Verify.IsTrue(Math.Abs(menuItemsHeight - int.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
                    Verify.IsTrue(Math.Abs(footerItemsHeight - int.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
                }

                void AddFooterItem(int menuItemsHeight, int footerItemsHeight)
                {
                    addFooterItemButton.Click();
                    Wait.ForIdle();
                    VerifyHeights(menuItemsHeight, footerItemsHeight);
                }
            }
        }

void VerifyPaneLayoutSettingsDisabledNoGapMenuItems ( ) [inline]

Definition at line 1149 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
            {
                var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
                var resultTextBlock = FindElement.ByName("LayoutHeightsReport");

                var addMenuItemButton = new Button(FindElement.ByName("AddMenuItemButton"));
                new Button(FindElement.ByName("ClearCollectionsButton")).Click();
                new CheckBox(FindElement.ByName("IsSettingsEnabledCheckbox")).Uncheck();

                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);
                AddMenuItem(408, 0);

                void VerifyHeights(int menuItemsHeight, int footerItemsHeight)
                {
                    readResults.Click();
                    var result = resultTextBlock.GetText().Split(";");

                    Verify.IsTrue(Math.Abs(menuItemsHeight - int.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
                    Verify.IsTrue(Math.Abs(footerItemsHeight - int.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
                }

                void AddMenuItem(int menuItemsHeight, int footerItemsHeight)
                {
                    addMenuItemButton.Click();
                    Wait.ForIdle();
                    VerifyHeights(menuItemsHeight, footerItemsHeight);
                }
            }
        }

void VerifyPaneLayoutSwappingCollections ( ) [inline]

Definition at line 1012 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
            {
                var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
                var resultTextBlock = FindElement.ByName("LayoutHeightsReport");

                FindElement.ByName("NoItems").Click();
                Wait.ForIdle();
                // No menu items, so zero height
                VerifyHeights(0, 160);

                FindElement.ByName("NoFooter").Click();
                Wait.ForIdle();
                // No footer items, but a settings item => 40px height
                VerifyHeights(368, 40);

                FindElement.ByName("Both").Click();
                Wait.ForIdle();
                VerifyHeights(248, 160);

                void VerifyHeights(int menuItemsHeight, int footerItemsHeight)
                {
                    readResults.Click();
                    var result = resultTextBlock.GetText().Split(";");

                    Verify.IsTrue(Math.Abs(menuItemsHeight - int.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
                    Verify.IsTrue(Math.Abs(footerItemsHeight - int.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
                }
            }
        }

void VerifyPaneTitlePresentAndUpdates ( ) [inline]

Definition at line 377 of file PaneBehaviorTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    TextBlock paneTitleTextBlock = new TextBlock(FindElement.ByName("NavView Test"));

                    Button changePaneTitleButton = new Button(FindElement.ByName("ChangePaneTitleButton"));
                    changePaneTitleButton.Invoke();
                    Wait.ForIdle();

                    Verify.AreEqual("", paneTitleTextBlock.DocumentText, "Verify that the pane title is empty");
                }
            }
        }

void VerifyPaneVisibleOnInit ( ) [inline]

Definition at line 397 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
            {
                Log.Comment("Verify PaneIsVisibleItem is invisible");
                VerifyElement.NotFound("PaneIsVisibleItem", FindBy.Name);

                FindElement.ByName<Button>("ChangePaneVisible").Invoke();
                Wait.ForIdle();

                Log.Comment("Verify PaneIsVisibleItem is visible");
                VerifyElement.Found("PaneIsVisibleItem", FindBy.Name);

            }
        }

void VerifySettingsWidthOnLeftNavMediumMode ( ) [inline]

Definition at line 816 of file PaneBehaviorTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                SetNavViewWidth(ControlWidth.Wide);
                Wait.ForIdle();

                Log.Comment("Bring Settings into view.");
                FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
                Wait.ForIdle();

                Button navButton = new Button(FindElement.ById("SettingsItem"));
                Log.Comment("Verify that the SettingsItem size in Expanded mode and actual width is " + navButton.BoundingRectangle.Width);

                // NavigationViewCompactPaneLength is 40 or 48 in different release. This test case doesn't need an exactly number of width, so just choose 48 as the boundary
                Verify.IsTrue(navButton.BoundingRectangle.Width > 48);

                SetNavViewWidth(ControlWidth.Medium);
                Wait.ForIdle();

                Log.Comment("Verify that the SettingsItem size in Medium mode and actual width is " + navButton.BoundingRectangle.Width);
                Verify.IsTrue(navButton.BoundingRectangle.Width <= 48);
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/PaneBehaviorTests.cs
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RegressionTestScenario Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • RegressionTestScenario
Static Public Member Functions | Properties | Private Member Functions | Static Private Member Functions

RegressionTestScenario Class Reference

List of all members.

Static Public Member Functions

static List
< RegressionTestScenario > 		BuildAllRegressionTestScenarios ()
static List
< RegressionTestScenario > 		BuildHierarchicalNavRegressionTestScenarios ()
static List
< RegressionTestScenario > 		BuildLeftNavRegressionTestScenarios ()
static List
< RegressionTestScenario > 		BuildTopNavRegressionTestScenarios ()

Properties

bool | IsLeftNavTest [get, set]
bool | IsUsingRS4Style [get, set]
string | TestPageName [get, set]

Private Member Functions

RegressionTestScenario (string testPagename, bool isLeftnavTest, bool isUsingRS4Style)

Static Private Member Functions

static List
< RegressionTestScenario > 		BuildTestScenarios (RegressionTestType types)

Detailed Description

Definition at line 414 of file NavigationViewTestsBase.cs.

Constructor & Destructor Documentation

RegressionTestScenario | ( | string | testPagename,
 |  | bool | isLeftnavTest,
 |  | bool | isUsingRS4Style |
 | ) |  |  | [inline, private]

Definition at line 416 of file NavigationViewTestsBase.cs.

        {
            TestPageName = testPagename;
            IsLeftNavTest = isLeftnavTest;
            IsUsingRS4Style = isUsingRS4Style;
        }

Member Function Documentation

static List<RegressionTestScenario> BuildAllRegressionTestScenarios ( ) [inline, static]

Definition at line 429 of file NavigationViewTestsBase.cs.

        {
            return BuildTestScenarios(RegressionTestType.LeftNav | RegressionTestType.TopNav);
        }

static List<RegressionTestScenario> BuildHierarchicalNavRegressionTestScenarios ( ) [inline, static]

Definition at line 437 of file NavigationViewTestsBase.cs.

        {
            return BuildTestScenarios(RegressionTestType.HierarchyMarkup | RegressionTestType.HierarchyDatabinding);
        }

static List<RegressionTestScenario> BuildLeftNavRegressionTestScenarios ( ) [inline, static]

Definition at line 425 of file NavigationViewTestsBase.cs.

        {
            return BuildTestScenarios(RegressionTestType.LeftNav);
        }

static List<RegressionTestScenario> BuildTestScenarios ( RegressionTestType types ) [inline, static, private]

Definition at line 441 of file NavigationViewTestsBase.cs.

        {
            Dictionary<RegressionTestType, RegressionTestScenario> map =
                new Dictionary<RegressionTestType, RegressionTestScenario>
            {
                    { RegressionTestType.LeftNav, new RegressionTestScenario("NavigationView Test", isLeftnavTest: true, isUsingRS4Style: false)},
                    { RegressionTestType.TopNav, new RegressionTestScenario("NavigationView TopNav Test", isLeftnavTest: false, isUsingRS4Style: false)},
                    { RegressionTestType.HierarchyMarkup, new RegressionTestScenario("HierarchicalNavigationView Markup Test", isLeftnavTest: false, isUsingRS4Style: false)},
                    { RegressionTestType.HierarchyDatabinding, new RegressionTestScenario("HierarchicalNavigationView DataBinding Test", isLeftnavTest: false, isUsingRS4Style: false)},
            };

            List<RegressionTestScenario> scenarios = new List<RegressionTestScenario>();
            foreach (RegressionTestType type in Enum.GetValues(typeof(RegressionTestType)))
            {
                if (types.HasFlag(type))
                {
                    scenarios.Add(map[type]);
                }
            }
            return scenarios;
        }

static List<RegressionTestScenario> BuildTopNavRegressionTestScenarios ( ) [inline, static]

Definition at line 433 of file NavigationViewTestsBase.cs.

        {
            return BuildTestScenarios(RegressionTestType.LeftNav | RegressionTestType.TopNav);
        }

Property Documentation

bool IsLeftNavTest [get, set]

Definition at line 423 of file NavigationViewTestsBase.cs.

bool IsUsingRS4Style [get, set]

Definition at line 424 of file NavigationViewTestsBase.cs.

string TestPageName [get, set]

Definition at line 422 of file NavigationViewTestsBase.cs.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/NavigationViewTestsBase.cs
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • SelectionTests
Public Member Functions | Static Public Member Functions

SelectionTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests::NavigationViewTestsBase.

List of all members.

Public Member Functions

void | CanSelectItemInFlyoutAndNVIGetsCollapsedOnFlyoutClose ()
void | CanSelectNavigationViewItemWithChildren ()
void | CheckSelectedItemEdgeCase ()
void | DisplayModeChangeSelectionEventTest ()
void | MenuItemAutomationSelectionTest ()
void | ModifyCollectionOnItemInvokeTest ()
void | SelectingNonTopLevelItemInOverflow ()
void | SelectionFollowFocusTest ()
void | SettingsCanBeUnselected ()
void | SuppressSelectionItemInvokeTest ()
void | VerifyDataContextCanBeUsedForNavigation ()
void | VerifyDeselectionDisabled ()
void | VerifyNavigationViewItemIsSelectedWorks ()
void | VerifyNoCrashWhenSelectedItemIsInvalidItem ()
void | VerifyNVIItemsRepeaterIsLoadedAfterSelectionSetInMarkup ()
void | VerifySelectedItemInInvokedItem ()
void | VerifySelectionItemPatternDoesInvoke ()
void | VerifySettingCustomSelectedItemInConstructorWorks ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 24 of file SelectionTests.cs.

Member Function Documentation

void CanSelectItemInFlyoutAndNVIGetsCollapsedOnFlyoutClose ( ) [inline]

Definition at line 426 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                Log.Comment("Put NavigationView into Left Compact Mode.");
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("LeftCompact");
                Wait.ForIdle();

                TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("SelectedItemLabel"));
                Verify.AreEqual(displayModeTextBox.DocumentText, "uninitialized");

                Log.Comment("Select Menu Item 11 which should open flyout.");
                var item = FindElement.ByName("Menu Item 11");
                InputHelper.LeftClick(item);
                Wait.ForIdle();

                Log.Comment("Select Menu Item 12 which should keep flyout open.");
                item = FindElement.ByName("Menu Item 12");
                InputHelper.LeftClick(item);
                Wait.ForIdle();

                Verify.IsNotNull(FindElement.ById("ChildrenFlyout"), "Flyout should still be open.");

                Log.Comment("Select Menu Item 14.");
                item = FindElement.ByName("Menu Item 14");
                InputHelper.LeftClick(item);
                Wait.ForIdle();

                // Refresh the cache to make sure that the flyout object we are going to be searching for
                // does not return as a false positive due to the caching mechanism.
                ElementCache.Refresh();
                Verify.IsNull(FindElement.ById("ChildrenFlyout"), "Flyout should be closed.");

                Log.Comment("Verify that the correct item has been selected");
                var getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));
                getSelectItemButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(displayModeTextBox.DocumentText, "Menu Item 14");

                Log.Comment("Verify that parent has been collapsed");
                TextBlock textBlockCollapsedItem = new TextBlock(FindElement.ByName("TextBlockCollapsedItem"));
                Verify.AreEqual(textBlockCollapsedItem.DocumentText, "Menu Item 11");
            }
        }

void CanSelectNavigationViewItemWithChildren ( ) [inline]

Definition at line 252 of file SelectionTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildHierarchicalNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("SelectedItemLabel"));

                    Log.Comment("Verify that first menu item is not expanded.");
                    var firstItem = FindElement.ByName("Menu Item 6 (Selectable)");
                    var childItem = FindElement.ByName("Menu Item 7 (Selectable)");
                    Verify.IsNull(childItem);
                    Verify.AreEqual(displayModeTextBox.DocumentText, "uninitialized");

                    InputHelper.LeftClick(firstItem);
                    Wait.ForIdle();

                    var getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));
                    getSelectItemButton.Invoke();
                    Wait.ForIdle();

                    childItem = FindElement.ByName("Menu Item 7 (Selectable)");
                    Verify.IsNotNull(childItem, "Child item should be visible after expanding parent item.");
                    Verify.AreEqual(displayModeTextBox.DocumentText, "Menu Item 6 (Selectable)");

                }
            }
        }

void CheckSelectedItemEdgeCase ( ) [inline]

Definition at line 412 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "SelectedItem edge case test" }))
            {
                Button button = new Button(FindElement.ByName("CopyStatusButton"));
                TextBlock textBlock = new TextBlock(FindElement.ByName("StatusTextBlock"));

                button.Invoke();
                Wait.ForIdle();
                Verify.AreEqual("False True", textBlock.DocumentText);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 32 of file SelectionTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void DisplayModeChangeSelectionEventTest ( ) [inline]

Definition at line 490 of file SelectionTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
                {
                    Button clearSelectedItem = new Button(FindElement.ById("ClearSelectionChangeIndicatorButton"));
                    TextBlock selectionRaisedIndicator = new TextBlock(FindElement.ById("SelectionChangedRaised"));

                    ComboBox selectedItem = new ComboBox(FindElement.ById("SelectedItemCombobox"));
                    selectedItem.SelectItemByName("Settings");
                    Verify.AreEqual("True", selectionRaisedIndicator.GetText());

                    ComboBox displayMode = new ComboBox(FindElement.ById("PaneDisplayModeCombobox"));
                    clearSelectedItem.InvokeAndWait();
                    displayMode.SelectItemByName("Top");
                    Verify.AreEqual("False", selectionRaisedIndicator.GetText());
                    Wait.ForIdle();

                    displayMode.SelectItemByName("Left");
                    Wait.ForIdle();
                    Verify.AreEqual("False", selectionRaisedIndicator.GetText());
                }
            }
        }

void MenuItemAutomationSelectionTest ( ) [inline]

Definition at line 143 of file SelectionTests.cs.

        {
            // On RS2 scrollviewer handles arrow keys and this causes an issue with the current setup of the "NavigationView Test" test page
            // used for the left NavigationView test. So instead we now execute this test on the "NavigationView Regression Test" test page for
            // left navigation.
            (string testPageName, bool isLeftNavTest)[] testScenarios = new (string, bool)[]
                { ("NavigationView Regression Test", true), ("NavigationView TopNav Test", false) };

            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.testPageName }))
                {
                    UIObject firstItem = FindElement.ByName("Home");
                    UIObject secondItem = FindElement.ByName("Apps");
                    UIObject thirdItem = FindElement.ByName("Games");

                    Log.Comment("Verify the second item is not already selected");
                    Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    firstItem.SetFocus();
                    AutomationElement firstItemAE = AutomationElement.FocusedElement;
                    SelectionItemPattern firstItemSIP = firstItemAE.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;

                    Log.Comment("Move focus to the second item by pressing down(left nav)/right(right nav) arrow once");
                    var key = Key.Right;
                    if (testScenario.isLeftNavTest)
                    {
                        key = Key.Down;
                    }
                    KeyboardHelper.PressKey(key);
                    Wait.ForIdle();
                    Verify.IsTrue(secondItem.HasKeyboardFocus);

                    AutomationElement secondItemAE = AutomationElement.FocusedElement;
                    SelectionItemPattern secondItemSIP = secondItemAE.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;

                    Log.Comment("Select the second item using SelectionItemPattern.Select and verify");
                    secondItemSIP.Select();
                    Wait.ForIdle();
                    Verify.IsTrue(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    Log.Comment("Deselect the second item");
                    firstItemSIP.Select();
                    Wait.ForIdle();
                    Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    Log.Comment("Select the second item using SelectionItemPattern.AddToSelection and verify");
                    secondItemSIP.AddToSelection();
                    Wait.ForIdle();
                    Verify.IsTrue(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    ClickClearSelectionButton();
                    Log.Comment("second item is unselected");
                    Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
                }
            }
        }

void ModifyCollectionOnItemInvokeTest ( ) [inline]

Definition at line 519 of file SelectionTests.cs.

        {

            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationViewMenuItemsSourcePage" }))
            {
                Log.Comment("Verifying adding and then removing an item on invoke does not crash.");
                var menuItem = FindElement.ByName("Fifth Item");
                InputHelper.LeftClick(menuItem);
                Wait.ForIdle();

                var newMenuItem = FindElement.ByName("Menu Item NEW");
                Verify.IsNotNull(newMenuItem, "A new menu item should have been added to the list.");
            }
        }

void SelectingNonTopLevelItemInOverflow ( ) [inline]

Definition at line 283 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("SelectedItemLabel"));

                Log.Comment("Put NavigationView into Top Mode.");
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("Top");
                Wait.ForIdle();

                InvokeOverflowButton();

                Log.Comment("Invoke 'Menu Item 29 (Selectable)'.");
                var item = FindElement.ByName("Menu Item 29 (Selectable)");
                InputHelper.LeftClick(item);
                Wait.ForIdle();

                Log.Comment("Invoke 'Menu Item 30 (Selectable)'.");
                item = FindElement.ByName("Menu Item 30 (Selectable)");
                InputHelper.LeftClick(item);
                Wait.ForIdle();

                Log.Comment("Invoke 'Menu Item 31");
                item = FindElement.ByName("Menu Item 31");
                InputHelper.LeftClick(item);
                Wait.ForIdle();

                Log.Comment("Invoke GetSelectedItemLabelButton and verify selected item is correct.");
                var getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));
                getSelectItemButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual(displayModeTextBox.DocumentText, "Menu Item 31");
            }
        }

void SelectionFollowFocusTest ( ) [inline]

Definition at line 98 of file SelectionTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildTopNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {

                    Log.Comment("Check SelectionFollowFocus");
                    CheckBox selectionFollowFocusCheckbox = new CheckBox(FindElement.ById("SelectionFollowFocusCheckbox"));
                    selectionFollowFocusCheckbox.Check();
                    Wait.ForIdle();

                    UIObject firstItem = FindElement.ByName("Apps");
                    UIObject secondItem = FindElement.ByName("Games");

                    Log.Comment("Verify the second item is not already selected");
                    Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    firstItem.Click();
                    Wait.ForIdle();

                    Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    Log.Comment("Move focus to the second item by pressing down(left nav)/right(right nav) arrow once");
                    var key = Key.Right;
                    if (testScenario.IsLeftNavTest)
                    {
                        key = Key.Down;
                    }
                    KeyboardHelper.PressKey(key);
                    Wait.ForIdle();

                    Log.Comment("Verify second item is selected and has focus because of SelectionFollowFocus");
                    Verify.IsTrue(secondItem.HasKeyboardFocus);
                    Verify.IsTrue(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    ClickClearSelectionButton();
                    Log.Comment("second item is unselected");
                    Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
                }
            }
        }

void SettingsCanBeUnselected ( ) [inline]

Definition at line 203 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var readSettingsSelectedButton = new Button(FindElement.ByName("ReadSettingsSelected"));
                var SettingsSelectionStateTextBlock = new TextBlock(FindElement.ByName("SettingsSelectedState"));

                Log.Comment("Bring Settings into view.");
                FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
                Wait.ForIdle();

                var settings = new Button(FindElement.ByName("Settings"));
                settings.Click();
                Wait.ForIdle();

                Log.Comment("Verify the top settings item is selected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");

                ClickClearSelectionButton();

                Log.Comment("Verify the top settings item is unselected.");
                readSettingsSelectedButton.Invoke();
                Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "False");
            }
        }

void SuppressSelectionItemInvokeTest ( ) [inline]

Definition at line 40 of file SelectionTests.cs.

        {
            using (IDisposable page1 = new TestSetupHelper("NavigationView Tests"),
                 page2 = new TestSetupHelper("Top NavigationView Store Test"))
            {
                var removeItemButton = new Button(FindElement.ById("RemoveItemButton"));
                var addItemSuppressSelectionButton = new Button(FindElement.ById("AddItemSuppressSelectionButton"));
                var clearItemInvokedTextButton = new Button(FindElement.ById("ClearItemInvokedTextButton"));

                removeItemButton.Click();
                Wait.ForIdle();
                removeItemButton.Click();
                Wait.ForIdle();
                removeItemButton.Click();
                Wait.ForIdle();
                addItemSuppressSelectionButton.Click();
                Wait.ForIdle();

                VerifyElement.Found("sup-selection-nav-item-0", FindBy.Id);
                var supSelectItem0 = TryFindElement.ById("sup-selection-nav-item-0");
                supSelectItem0.Click();
                Wait.ForIdle();

                var itemInvokedText = TryFindElement.ById("ItemInvokedText");
                Verify.AreEqual("New Menu Item S.S", itemInvokedText.GetText());

                clearItemInvokedTextButton.Click();
                Wait.ForIdle();
                Verify.AreEqual(string.Empty, itemInvokedText.GetText());

                UIObject moreButton = null;
                Log.Comment("Adding items until the More button shows up.");

                while (moreButton == null)
                {
                    moreButton = TryFindElement.ById("TopNavOverflowButton");

                    if (moreButton == null)
                    {
                        addItemSuppressSelectionButton.Click();
                        Log.Comment("Item added.");
                        Wait.ForIdle();
                    }
                }

                moreButton.Click();
                Wait.ForIdle();

                var firstChildOverflow = GetTopNavigationItems(TopNavPosition.Overflow)[0];
                firstChildOverflow.Click();
                Wait.ForIdle();

                itemInvokedText = TryFindElement.ById("ItemInvokedText");
                Verify.AreEqual("New Menu Item S.S", itemInvokedText.GetText());
            }
        }

void VerifyDataContextCanBeUsedForNavigation ( ) [inline]

Definition at line 473 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationViewPageDataContext" }))
            {
                TextBlock navViewSelectedDataContext = new TextBlock(FindElement.ByName("NavViewSelectedDataContext"));
                Verify.IsTrue(navViewSelectedDataContext.GetText() == "Item #0_DataContext");

                Log.Comment("Click Item #3");
                var menuItem = FindElement.ByName("Item #3");
                InputHelper.LeftClick(menuItem);
                Wait.ForIdle();

                Verify.IsTrue(navViewSelectedDataContext.GetText() == "Item #3_DataContext");
            }
        }

void VerifyDeselectionDisabled ( ) [inline]

Definition at line 231 of file SelectionTests.cs.

        {
            var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
            foreach (var testScenario in testScenarios)
            {
                using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
                {
                    UIObject homeItem = FindElement.ByName("Home");
                    Verify.IsNotNull(homeItem);
                    Verify.IsTrue(Convert.ToBoolean(homeItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                    KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                    homeItem.Click(); // Explicitly testing ctrl+click here
                    Wait.ForIdle();
                    Verify.IsTrue(Convert.ToBoolean(homeItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
                    KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
                }
            }
        }

void VerifyNavigationViewItemIsSelectedWorks ( ) [inline]

Definition at line 367 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
            {
                Log.Comment("Verify the 1st NavItem.IsSelected=true works");
                UIObject item1 = FindElement.ByName("Albums");
                Verify.IsNotNull(item1);
                Verify.IsTrue(Convert.ToBoolean(item1.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                Log.Comment("Verify the 2nd NavItem.IsSelected=true is ignored");
                UIObject item2 = FindElement.ByName("People");
                Verify.IsNotNull(item2);
                Verify.IsFalse(Convert.ToBoolean(item2.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
            }
        }

void VerifyNoCrashWhenSelectedItemIsInvalidItem ( ) [inline]

Definition at line 384 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {

                Button setInvalidSelectedItemButton = new Button(FindElement.ById("SetInvalidSelectedItem"));
                var apps = new Button(FindElement.ById("AppsItem"));

                var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
                var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));

                // Select apps
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    apps.Click();
                    waiter.Wait();
                }

                Verify.AreEqual(selectResult.Value, "Apps");

                setInvalidSelectedItemButton.Click();
                Wait.ForIdle();

                Verify.AreEqual(selectResult.Value, "Null");
            }
        }

void VerifyNVIItemsRepeaterIsLoadedAfterSelectionSetInMarkup ( ) [inline]

Definition at line 552 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                Log.Comment("Verifying first item is selected.");
                var firstItem = FindElement.ById("MI1");
                Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                Log.Comment("Clicking on first item to expand it.");
                InputHelper.LeftClick(firstItem);
                Wait.ForIdle();

                Log.Comment("Verifying children are shown.");
                var secondItem = FindElement.ById("MI2");
                Verify.IsNotNull(secondItem, "Second item should be visible after expanding parent item.");
            }
        }

void VerifySelectedItemInInvokedItem ( ) [inline]

Definition at line 320 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var invokedItem = FindElement.ByName("Music");

                invokedItem.Click();

                Wait.ForIdle();

                var result = new TextBlock(FindElement.ByName("InvokedItemState"));
                Log.Comment("Verify item is selected when Invoked event got raised");
                Verify.AreEqual("ItemWasSelectedInItemInvoked", result.GetText());

                invokedItem.Click();

                Wait.ForIdle();

                Log.Comment("Verify item invoked was raised despite item already selected");
                result = new TextBlock(FindElement.ByName("InvokedItemState"));
                Verify.AreEqual("ItemWasInvokedSecomdTimeWithCorrectSelection", result.GetText());
            }
        }

void VerifySelectionItemPatternDoesInvoke ( ) [inline]

Definition at line 345 of file SelectionTests.cs.

        {
            // When using UIA SelectionItem pattern to select a navview item, this should also trigger an
            // invoke on the item.
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                var musicItem = FindElement.ByName("Music");
                var lvi = new ListViewItem(musicItem);

                lvi.Select();
                Wait.ForIdle();

                Log.Comment("Verify item was invoked");
                var result = new TextBlock(FindElement.ByName("InvokedItemState"));
                Verify.AreEqual("ItemWasSelectedInItemInvoked", result.GetText());

                Log.Comment("Verify item got selected");
                Verify.IsTrue(Convert.ToBoolean(musicItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
            }
        }

void VerifySettingCustomSelectedItemInConstructorWorks ( ) [inline]

Definition at line 535 of file SelectionTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationViewCustomMenuItemPage" }))
            {
                Log.Comment("Verifying first item is selected.");
                var firstItem = FindElement.ById("nvi1");
                Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                var secondItem = FindElement.ById("nvi2");
                Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));

                var thirdItem = FindElement.ById("nvi3");
                Verify.IsFalse(Convert.ToBoolean(thirdItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/SelectionTests.cs
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TopModeTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
  • TopModeTests
Public Member Functions | Static Public Member Functions | Private Member Functions

TopModeTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests::NavigationViewTestsBase.

List of all members.

Public Member Functions

void | TopNavigationChevronClickTest ()
void | TopNavigationHaveCorrectSelectionWhenChangingMenuItems ()
void | TopNavigationItemsAccessibilitySetTest ()
void | TopNavigationMenuItemTemplateBindingTest ()
void | TopNavigationOverflowButtonClickTest ()
void | TopNavigationOverflowButtonTest ()
void | TopNavigationOverflowWidthLongNavItemTest ()
void | TopNavigationSecondClickOnSuppressSelectionItemTest ()
void | TopNavigationSelectionTest ()
void | TopNavigationSetSelectedItemToNullInItemInvoke ()
void | TopNavigationWithAccessKeysTest ()
void | TopNavigationWithHierarchyOverflowButtonClickTest ()
void | TopPaddingTest ()
void | VerifyMoreButtonIsOnlyReadOnce ()
void | VerifyNavigationViewContentChangeOnTopNavImpactsLayout ()
void | VerifyOverflowButtonIsCollapsedWhenOverflowMenuIsEmpty ()
void | VerifyOverflowMenuCornerRadius ()
void | VerifyTopNavigationItemFocusVisualKindRevealTest ()
void | VerifyTopNavigationMinimalVisualStateOnTopNav ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ClickOnNavigationViewItemChevron (UIObject nvi)

Detailed Description

Definition at line 24 of file TopModeTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 32 of file TopModeTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClickOnNavigationViewItemChevron ( UIObject nvi ) [inline, private]

Definition at line 786 of file TopModeTests.cs.

        {
            Log.Comment("Click On NavigationViewItem Chevron");
            InputHelper.LeftClick(nvi, nvi.BoundingRectangle.Width - 20, nvi.BoundingRectangle.Height / 2 + 10);
            Wait.ForIdle();
        }

void TopNavigationChevronClickTest ( ) [inline]

Definition at line 757 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                Log.Comment("Set PaneDisplayMode to Top");
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("Top");
                Wait.ForIdle();

                UIObject menuItem1 = FindElement.ByName("Menu Item 1");
                Verify.IsNotNull(menuItem1);

                UIObject menuItem2 = FindElement.ByName("Menu Item 2");
                Verify.IsNull(menuItem2, "Menu Item 2 should not be visible.");

                ClickOnNavigationViewItemChevron(menuItem1);

                menuItem2 = FindElement.ByName("Menu Item 2");
                Verify.IsNotNull(menuItem2, "Menu Item 2 should be visible.");

                ClickOnNavigationViewItemChevron(menuItem1);

                ElementCache.Refresh();

                menuItem2 = FindElement.ByName("Menu Item 2");
                Verify.IsNull(menuItem2, "Menu Item 2 should not be visible.");
            }
        }

void TopNavigationHaveCorrectSelectionWhenChangingMenuItems ( ) [inline]

Definition at line 471 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                for (int i = 0; i < 3; i++)
                {
                    Log.Comment("Iteration: " + i);
                    Log.Comment("Invoke ChangeDataSource");
                    var button = new Button(FindElement.ById("ChangeDataSource"));
                    button.Invoke();
                    Wait.ForIdle();

                    Log.Comment("Reset TestResult");
                    var resetButton = new Button(FindElement.ById("ResetResult"));
                    resetButton.Invoke();
                    Wait.ForIdle();

                    ElementCache.Refresh();
                    UIObject selectedItem = FindElement.ByName("Happy new year Item");

                    Log.Comment("Verify the item is selected");
                    Verify.IsTrue(Convert.ToBoolean(selectedItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
                }
            }
        }

void TopNavigationItemsAccessibilitySetTest ( ) [inline]

Definition at line 416 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Log.Comment("Setting focus to Home");
                UIObject home = FindElement.ByName("Home");
                home.SetFocus();
                Wait.ForIdle();

                AutomationElement ae = AutomationElement.FocusedElement;
                int positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                int sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                Verify.AreEqual(1, positionInSet, "Position in set");
                Verify.AreEqual(4, sizeOfSet, "Size of set");

                Log.Comment("Add ten items to make overflow happen");
                Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
                addTenItems.Invoke();
                Wait.ForIdle();

                InvokeOverflowButton();

                UIObject overflowItem = FindElement.ByName("Added Item 5");
                overflowItem.SetFocus();
                Wait.ForIdle();

                ae = AutomationElement.FocusedElement;
                positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);

                Verify.AreEqual(8, positionInSet, "Position in overflow.");
                Verify.AreEqual(13, sizeOfSet, "Size of set.");
            }
        }

void TopNavigationMenuItemTemplateBindingTest ( ) [inline]

Definition at line 454 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView ItemTemplate Test" }))
            {
                ElementCache.Refresh();

                // If binding has problem, we will not see the button and text.
                var lastName = new Button(FindElement.ByName("Anderberg"));
                Verify.IsNotNull(lastName);

                var firstName = new Button(FindElement.ByName("Michael"));
                Verify.IsNotNull(firstName);
            }
        }

void TopNavigationOverflowButtonClickTest ( ) [inline]

Definition at line 362 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Log.Comment("Setting focus to Home");
                UIObject home = FindElement.ByName("Home");
                home.SetFocus();
                Wait.ForIdle();

                Log.Comment("Add ten items to make overflow happen");
                Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
                addTenItems.Invoke();
                Wait.ForIdle();

                InvokeOverflowButton();

                UIObject overflowItem = FindElement.ByName("Added Item 5");
                var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
                var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
                var invokeRecommendedTransition = new Edit(FindElement.ById("InvokeRecommendedTransition"));
                var selectionChangeRecommendedTransition = new Edit(FindElement.ById("SelectionChangeRecommendedTransition"));
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    overflowItem.Click();
                    waiter.Wait();
                }

                // First time selection raise ItemInvoke and SelectionChange events
                Verify.AreEqual(invokeResult.Value, "Added Item 5");
                Verify.AreEqual(selectResult.Value, "Added Item 5");

                Verify.AreEqual(invokeRecommendedTransition.Value, "FromRight");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "FromRight");
            }
        }

void TopNavigationOverflowButtonTest ( ) [inline]

Definition at line 133 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Log.Comment("Add ten items to make overflow happen");
                Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
                addTenItems.Invoke();
                Wait.ForIdle();

                Log.Comment("Get and Check that active visualstate contains OverflowButtonWithLabel");
                var getActiveVisualStateButton = new Button(FindElement.ByName("GetActiveVisualState"));
                var invokeResult = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }

                Verify.IsTrue(invokeResult.Value.Contains("OverflowButtonWithLabel"));

                Log.Comment("Hide the overflow button label");
                var changeOverflowLabelVisibility = new CheckBox(FindElement.ByName("ChangeOverflowLabelVisibility"));
                changeOverflowLabelVisibility.Uncheck();
                Wait.ForIdle();

                Log.Comment("Get and Check that active visualstate contains OverflowButtonNoLabel");
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    getActiveVisualStateButton.Click();
                    waiter.Wait();
                }

                Verify.IsTrue(invokeResult.Value.Contains("OverflowButtonNoLabel"));
            }
        }

void TopNavigationOverflowWidthLongNavItemTest ( ) [inline]

Definition at line 97 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                var longNavItemPartialContent = "Gates";
                var primaryCount = GetTopNavigationItems(TopNavPosition.Primary).Count;

                Log.Comment("Add a long navigationview item which text includes " + longNavItemPartialContent);
                Button button = new Button(FindElement.ByName("AddLongNavItem"));
                button.Click();
                Wait.ForIdle();

                var count = GetTopNavigationItems(TopNavPosition.Primary).Count;
                Verify.AreEqual(primaryCount, count, "The appended nav item goes to overflow");

                // Select the longest nav item
                OpenOverflowMenuAndInvokeItem(longNavItemPartialContent);

                count = GetTopNavigationItems(TopNavPosition.Primary).Count;
                Verify.IsTrue(primaryCount - count >= 2, "Longest nav item make more than 1 items to overflow " + primaryCount + " vs " + count);

                // Select the shortest IntegerItem which content is 7
                OpenOverflowMenuAndInvokeItem("IntegerItem");
                Verify.IsTrue(
                    GetTopNavigationItems(TopNavPosition.Primary).
                        Where(item => UIObjectContains(item, longNavItemPartialContent)).
                        Count() == 0,
                    "Longest nav item is pushed to overflow");

                count = GetTopNavigationItems(TopNavPosition.Primary).Count;
                Verify.IsTrue(primaryCount <= count,
                    "Select the shortest item make more item to primary " + primaryCount + " vs " + count);
            }
        }

void TopNavigationSecondClickOnSuppressSelectionItemTest ( ) [inline]

Definition at line 38 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Button resetResultButton = new Button(FindElement.ById("ResetResult"));
                UIObject suppressSelection = FindElement.ByName("SuppressSelection");

                var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
                var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    suppressSelection.Click();
                    waiter.Wait();
                }

                // First time selection only raise ItemInvoke
                Verify.AreEqual(invokeResult.Value, "SuppressSelection");
                Verify.AreEqual(selectResult.Value, "");

                resetResultButton.Click();
                Wait.ForIdle();

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    suppressSelection.Click();
                    waiter.Wait();
                }

                // Click it again, only raise ItemInvoke event
                Verify.AreEqual(invokeResult.Value, "SuppressSelection");
                Verify.AreEqual(selectResult.Value, "");
            }
        }

void TopNavigationSelectionTest ( ) [inline]

Definition at line 228 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Button resetResultButton = new Button(FindElement.ById("ResetResult"));
                UIObject home = FindElement.ByName("Home");
                UIObject apps = FindElement.ById("AppsItem");
                UIObject suppressSelection = FindElement.ByName("SuppressSelection");

                var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
                var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
                var invokeRecommendedTransition = new Edit(FindElement.ById("InvokeRecommendedTransition"));
                var selectionChangeRecommendedTransition = new Edit(FindElement.ById("SelectionChangeRecommendedTransition"));
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    apps.Click();
                    waiter.Wait();
                }

                // First time selection raise ItemInvoke and SelectionChange events
                Verify.AreEqual(invokeResult.Value, "Apps");
                Verify.AreEqual(selectResult.Value, "Apps");
                Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "Default");

                resetResultButton.Click();
                Wait.ForIdle();

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    apps.Click();
                    waiter.Wait();
                }

                // Click it again, only raise ItemInvoke event
                Verify.AreEqual(invokeResult.Value, "Apps");
                Verify.AreEqual(selectResult.Value, "");
                Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "");

                resetResultButton.Click();
                Wait.ForIdle();

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    suppressSelection.Click();
                    waiter.Wait();
                }

                // Only click for suppress items
                Verify.AreEqual(invokeResult.Value, "SuppressSelection");
                Verify.AreEqual(selectResult.Value, "");
                Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "");

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    home.Click();
                    waiter.Wait();
                }

                // Click home again, it raise two events. transition from right to left
                Verify.AreEqual(invokeResult.Value, "Home");
                Verify.AreEqual(selectResult.Value, "Home");

                Verify.AreEqual(invokeRecommendedTransition.Value, "FromLeft");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "FromLeft");

                resetResultButton.Click();
                Wait.ForIdle();

                // click apps again. transition from left to right
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    apps.Click();
                    waiter.Wait();
                }

                Verify.AreEqual(invokeResult.Value, "Apps");
                Verify.AreEqual(selectResult.Value, "Apps");

                Verify.AreEqual(invokeRecommendedTransition.Value, "FromRight");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "FromRight");
            }
        }

void TopNavigationSetSelectedItemToNullInItemInvoke ( ) [inline]

Definition at line 315 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Button resetResultButton = new Button(FindElement.ById("ResetResult"));
                UIObject home = FindElement.ByName("Home");
                UIObject apps = FindElement.ById("AppsItem");

                var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
                var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
                var invokeRecommendedTransition = new Edit(FindElement.ById("InvokeRecommendedTransition"));
                var selectionChangeRecommendedTransition = new Edit(FindElement.ById("SelectionChangeRecommendedTransition"));
                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    apps.Click();
                    waiter.Wait();
                }

                // First time selection raise ItemInvoke and SelectionChange events
                Verify.AreEqual(invokeResult.Value, "Apps");
                Verify.AreEqual(selectResult.Value, "Apps");
                Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "Default");

                resetResultButton.Click();
                Wait.ForIdle();

                Button expectNullSelectedItemInItemInvoke = new Button(FindElement.ById("ExpectNullSelectedItemInItemInvoke"));
                expectNullSelectedItemInItemInvoke.Click();
                Wait.ForIdle();

                using (var waiter = new ValueChangedEventWaiter(invokeResult))
                {
                    home.Click();
                    waiter.Wait();
                }

                // Click home, expect Null in select change event
                Verify.AreEqual(invokeResult.Value, "Home");
                Verify.AreEqual(selectResult.Value, "Null");

                Verify.AreEqual(invokeRecommendedTransition.Value, "FromLeft");
                Verify.AreEqual(selectionChangeRecommendedTransition.Value, "Default");
            }
        }

void TopNavigationWithAccessKeysTest ( ) [inline]

Definition at line 73 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Log.Comment("Add ten items to make overflow happen");
                Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
                addTenItems.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify overflow menu is not opened");
                Verify.IsTrue(GetTopNavigationItems(TopNavPosition.Overflow).Count == 0);

                InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement("TopNavOverflowButton");

                Log.Comment("Verify overflow menu is opened");
                // Flyout doesn't seem raise any UIA WindowOpened/MenuOpened events so just check a few times for the menu to
                // have opened.
                TestEnvironment.VerifyAreEqualWithRetry(5,
                    () => true,
                    () => GetTopNavigationItems(TopNavPosition.Overflow).Count > 0);
            }
        }

void TopNavigationWithHierarchyOverflowButtonClickTest ( ) [inline]

Definition at line 399 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
            {
                Log.Comment("Set PaneDisplayMode to Top");
                var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
                panelDisplayModeComboBox.SelectItemByName("Top");
                Wait.ForIdle();

                InvokeOverflowButton();

                UIObject overflowItem = FindElement.ByName("Menu Item 15");
                Verify.IsNotNull(overflowItem, "Menu Item 15 should be in overflow");
            }
        }

void TopPaddingTest ( ) [inline]

Definition at line 499 of file TopModeTests.cs.

        {
            // We cannot restrict the inner framesize for this test because it interacts with the titlebar area.
            using (var setup = new TestSetupHelper(testNames: new[] { "NavigationView Tests", "Top NavigationView Store Test" }, shouldRestrictInnerFrameSize: false))
            {
                var moveContentUnderTitleBarButton = new Button(FindElement.ById("MoveContentUnderTopnavTitleBar"));
                var flipIsTitleBarAutoPaddingEnabledButton = new Button(FindElement.ById("FlipIsTitleBarAutoPaddingEnabledButton"));
                var getTopPaddingHeightButton = new Button(FindElement.ById("GetTopPaddingHeightButton"));
                var fullScreenButton = new Button(FindElement.ById("FullScreenInvokerButton"));
                var navViewIsTitleBarAutoPaddingEnabledId = "NavViewIsTitleBarAutoPaddingEnabled";
                var topPaddingRenderedValueId = "TopPaddingRenderedValue";
                UIObject navViewIsTitleBarAutoPaddingEnabled = null;
                UIObject topNavTopPadding = null;

                // Checking top padding is added for regular Desktop
                Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to True");
                moveContentUnderTitleBarButton.Click();
                Wait.ForIdle();

                Log.Comment("Accessing TopPadding Height");
                getTopPaddingHeightButton.Click();
                Wait.ForIdle();

                navViewIsTitleBarAutoPaddingEnabled = TryFindElement.ById(navViewIsTitleBarAutoPaddingEnabledId);
                Verify.IsNotNull(navViewIsTitleBarAutoPaddingEnabled);
                Log.Comment($"NavView.IsTitleBarAutoPaddingEnabled: {navViewIsTitleBarAutoPaddingEnabled.GetText()}");
                Verify.AreEqual("True", navViewIsTitleBarAutoPaddingEnabled.GetText());

                topNavTopPadding = TryFindElement.ById(topPaddingRenderedValueId);
                Verify.IsNotNull(topNavTopPadding);
                Log.Comment($"TopPadding Height: {topNavTopPadding.GetText()}");

                // To detect if it's in tabbed sets, CoreApplicationViewTitleBar.IsVisible can be used to check in MUXControlsTestApp
                // Not all branches enabled tabbed shell, also not all default setting with tabbed shell enabled
                // We skip the test if tabbedshell is disabled.
                if (TryFindElement.ById("TitleBarIsVisible").GetText().Equals("True"))
                {
                    Log.Comment("Tabbed Shell is disabled or not enabled for this application, skip Verify");
                }
                else
                {
                    Verify.AreEqual("0", topNavTopPadding.GetText());
                }

                Log.Comment("Setting IsTitleBarAutoPaddingEnabled to False");
                flipIsTitleBarAutoPaddingEnabledButton.Click();
                Wait.ForIdle();

                Log.Comment($"NavView.IsTitleBarAutoPaddingEnabled: {navViewIsTitleBarAutoPaddingEnabled.GetText()}");
                Verify.AreEqual("False", navViewIsTitleBarAutoPaddingEnabled.GetText());

                Log.Comment("Accessing TopPadding Height");
                getTopPaddingHeightButton.Click();
                Wait.ForIdle();
                Log.Comment($"TopPadding Height: {topNavTopPadding.GetText()}");
                Verify.AreEqual("0", topNavTopPadding.GetText());

                Log.Comment("Setting IsTitleBarAutoPaddingEnabled to True");
                flipIsTitleBarAutoPaddingEnabledButton.Click();
                Wait.ForIdle();

                Log.Comment($"NavView.IsTitleBarAutoPaddingEnabled: {navViewIsTitleBarAutoPaddingEnabled.GetText()}");
                Verify.AreEqual("True", navViewIsTitleBarAutoPaddingEnabled.GetText());

                // Checking top padding is NOT added for fullscreen Desktop
                Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to False");
                moveContentUnderTitleBarButton.Click();
                Wait.ForIdle();
                fullScreenButton.Click();
                Wait.ForIdle();

                Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to True");
                moveContentUnderTitleBarButton.Click();
                Wait.ForIdle();

                Log.Comment("Accessing TopPadding Height");
                getTopPaddingHeightButton.Click();
                Wait.ForIdle();
                Log.Comment($"TopPadding Height: {topNavTopPadding.GetText()}");
                Verify.AreEqual("0", topNavTopPadding.GetText());

                // Reverting changes to leave app in original state
                Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to False");
                moveContentUnderTitleBarButton.Click();
                Wait.ForIdle();
                fullScreenButton.Click();
                Wait.ForIdle();
            }
        }

void VerifyMoreButtonIsOnlyReadOnce ( ) [inline]

Definition at line 170 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                UIObject moreButton = FindElement.ById("TopNavOverflowButton");
                moreButton.SetFocus();
                Wait.ForIdle();

                AutomationElement ae = AutomationElement.FocusedElement;
                Verify.AreEqual("More", ae.GetCurrentPropertyValue(AutomationElement.NameProperty).ToString());
            }
        }

void VerifyNavigationViewContentChangeOnTopNavImpactsLayout ( ) [inline]

Definition at line 657 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
            {
                Log.Comment("Verify there is overflow button");
                VerifyElement.Found("TopNavOverflowButton", FindBy.Id);

                Verify.IsTrue(IsItemInTopNavPrimaryList("Games"), "Games not in overflow");

                Log.Comment("Change Games Content to a long string");
                Button changeGamesContent = new Button(FindElement.ByName("ChangeGamesContent"));
                changeGamesContent.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify Content change in primary may push Games item to overflow");
                Verify.IsFalse(IsItemInTopNavPrimaryList("Games"), "Games is moved to overflow");

                Log.Comment("Clear Content of all NavigationViewItems");
                Button clearNavItemContent = new Button(FindElement.ByName("ClearNavItemContent"));
                clearNavItemContent.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify all items are moved out of overflow menu");
                VerifyElement.NotFound("TopNavOverflowButton", FindBy.Id);

                Log.Comment("Change Games Content to a long string");
                changeGamesContent.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify change content of Game makes it to overflow");
                Verify.IsFalse(IsItemInTopNavPrimaryList("Games"), "Games is moved to overflow");

                Log.Comment("Clear Content of Games which is in overflow");
                clearNavItemContent.Invoke();
                Wait.ForIdle();

                // If NavigationViewItem is in overflow and the popup is not opened, we can't get NavigationView by the visualtree from NavigationViewItem itself
                // Change the content of NavigationViewItem in overflow will not Invalidate Layout, and request user to invalid measure.
                Log.Comment("Invalid Measure");
                Button invalidateMeasure = new Button(FindElement.ByName("NavInvalidateMeasure"));
                invalidateMeasure.Invoke();
                Wait.ForIdle();

                Log.Comment("Verify cached width is invalidated and InvalidateMeasure will move all items out of overflow");
                VerifyElement.NotFound("TopNavOverflowButton", FindBy.Id);
            }
        }

void VerifyOverflowButtonIsCollapsedWhenOverflowMenuIsEmpty ( ) [inline]

Definition at line 706 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Overflow Button Test" }))
            {
                VerifyOverflowButtonIsVisibleAndOverflowMenuHasSingleItem();

                Log.Comment("Verify that removing the final overflow menu item collapses the overflow button");
                FindElement.ByName<Button>("RemoveLastItemButton").InvokeAndWait();

                // Refresh the cache to make sure that the overflow button we are going to be searching for
                // does not return as a false positive due to the caching mechanism.
                ElementCache.Clear();

                VerifyOverflowButtonIsCollapsed();

                Log.Comment("Add menu item to show the overflow button again with the overflow menu item containing a single item");
                FindElement.ByName<Button>("AddItem4Button").InvokeAndWait();

                VerifyOverflowButtonIsVisibleAndOverflowMenuHasSingleItem();

                Log.Comment("Verify that removing a primary menu item which creates enough room for the single overflow menu item to be moved into collapses the overflow button");
                FindElement.ByName<Button>("RemoveFirstItemButton").InvokeAndWait();

                // Refresh the cache to make sure that the overflow button we are going to be searching for
                // does not return as a false positive due to the caching mechanism.
                ElementCache.Clear();

                VerifyOverflowButtonIsCollapsed();

                void VerifyOverflowButtonIsVisibleAndOverflowMenuHasSingleItem()
                {
                    UIObject overflowButton = FindElement.ById("TopNavOverflowButton");
                    Verify.IsNotNull(overflowButton, "The overflow button is required to be visible for this test");

                    Log.Comment("Verify that the overflow menu contains a single item");
                    overflowButton.Click();
                    Wait.ForIdle();

                    int numOverflowMenuItems = GetTopNavigationItems(TopNavPosition.Overflow).Count;
                    Verify.IsTrue(numOverflowMenuItems == 1, "The overflow menu should only contain a single item");
                }

                void VerifyOverflowButtonIsCollapsed()
                {
                    UIObject overflowButton = FindElement.ById("TopNavOverflowButton");
                    Verify.IsNull(overflowButton, "The overflow button should have been collapsed");
                }
            }
        }

void VerifyOverflowMenuCornerRadius ( ) [inline]

Definition at line 184 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView TopNav Test" }))
            {
                Log.Comment("Verify that the overflow menu is closed.");
                var overflowItemsHost = TryFindElement.ById("TopNavMenuItemsOverflowHost");
                Verify.IsNull(overflowItemsHost, "Overflow menu should have been closed.");

                Log.Comment("Open the overflow menu.");
                GetOverflowButton().Click();
                Wait.ForIdle();

                Log.Comment("Verify that the overflow menu is open.");
                overflowItemsHost = TryFindElement.ById("TopNavMenuItemsOverflowHost");
                Verify.IsNotNull(overflowItemsHost, "Overflow menu should have been open.");

                Log.Comment("Get CornerRadius of the overflow menu.");
                FindElement.ByName<Button>("GetOverflowMenuCornerRadiusButton").Invoke();

                // A CornerRadius of (8,8,8,8) is the current default value for flyouts.
                TextBlock overflowMenuCornerRadiusTextBlock = new TextBlock(FindElement.ByName("OverflowMenuCornerRadiusTextBlock"));
                Verify.AreEqual("8,8,8,8", overflowMenuCornerRadiusTextBlock.DocumentText);

                UIObject GetOverflowButton()
                {
                    Log.Comment("Add items until the overflow button shows up.");
                    var addItemButton = new Button(FindElement.ById("AddItemButton"));

                    UIObject overflowButton1 = TryFindElement.ById("TopNavOverflowButton");
                    while (overflowButton1 == null)
                    {
                        addItemButton.Click();
                        Log.Comment("Item added.");
                        Wait.ForIdle();

                        overflowButton1 = TryFindElement.ById("TopNavOverflowButton");
                    }

                    return overflowButton1;
                }
            }
        }

void VerifyTopNavigationItemFocusVisualKindRevealTest ( ) [inline]

Definition at line 624 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Store Test" }))
            {
                Log.Comment("Getting navitem active visual states");
                var getActiveVisualStateButton = new Button(FindElement.ByName("GetNavItemActiveVisualState"));

                var activeVisualStates = new Edit(FindElement.ById("NavItemActiveVisualStates"));

                // didn't figure out why, retry helps the stability.
                Wait.RetryUntilEvalFuncSuccessOrTimeout(
                    () =>
                    {
                        getActiveVisualStateButton.Click();
                        Wait.ForIdle();
                        return activeVisualStates.GetText().Contains("OnTopNavigationPrimaryReveal");
                    },
                    retryTimoutByMilliseconds: 3000
                );

                Log.Comment("Visual states: " + activeVisualStates.GetText());
                Verify.IsTrue(activeVisualStates.GetText().Contains("OnTopNavigationPrimaryReveal"));
            }
        }

void VerifyTopNavigationMinimalVisualStateOnTopNav ( ) [inline]

Definition at line 590 of file TopModeTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
            {
                Log.Comment("To Minimal mode");
                SetNavViewWidth(ControlWidth.Narrow);

                Log.Comment("Get NavView Active VisualStates");
                var getNavViewActiveVisualStatesButton = new Button(FindElement.ByName("GetNavViewActiveVisualStates"));
                getNavViewActiveVisualStatesButton.Invoke();
                Wait.ForIdle();

                var visualStateName = "TopNavigationMinimal";
                var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
                Verify.IsFalse(result.GetText().Contains(visualStateName), "active VisualStates doesn't include " + visualStateName);

                Log.Comment("To Wide mode");
                SetNavViewWidth(ControlWidth.Wide);

                Log.Comment("Flipping orientation: Left -> Top.");
                var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
                flipOrientationButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Get NavView Active VisualStates");
                getNavViewActiveVisualStatesButton.Invoke();
                Wait.ForIdle();

                Verify.IsTrue(result.GetText().Contains(visualStateName), "active VisualStates includes " + visualStateName);
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationView_InteractionTests/TopModeTests.cs
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NumberBoxTests
Public Member Functions | Static Public Member Functions | Private Member Functions

NumberBoxTests Class Reference

List of all members.

Public Member Functions

void | BasicExpressionTest ()
void | BasicKeyboardTest ()
void | CustomFormatterTest ()
void | GamepadTest ()
void | MinMaxTest ()
void | ScrollTest ()
void | TestCleanup ()
void | UpDownEnabledTest ()
void | UpDownTest ()
void | ValidationDisabledTest ()
void | ValueChangedTest ()
void | ValueTextTest ()
void | VerifyAxeScanPasses ()
void | VerifyNumberBoxHeaderBehavior ()
void | VerifyRightClickForContextMenuDoesNotDeselectText ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | Check (string checkboxName)
void | EnterText (RangeValueSpinner numBox, string text, bool pressEnter=true)
Button | FindButton (UIObject parent, string buttonName)
Edit | FindTextBox (UIObject parent)
void | Uncheck (string checkboxName)

Detailed Description

Definition at line 23 of file NumberBoxTests.cs.

Member Function Documentation

void BasicExpressionTest ( ) [inline]

Definition at line 494 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                numBox.SetValue(0);

                Log.Comment("Verify that expressions don't work if AcceptsExpression is false");
                EnterText(numBox, "5 + 3");
                Verify.AreEqual(0, numBox.Value);

                Check("ExpressionCheckBox");

                int numErrors = 0;
                const double resetValue = 1234;

                Dictionary<string, double> expressions = new Dictionary<string, double>
                {
                    // Valid expressions. None of these should evaluate to the reset value.
                    { "5", 5 },
                    { "-358", -358 },
                    { "12.34", 12.34 },
                    { "5 + 3", 8 },
                    { "12345 + 67 + 890", 13302 },
                    { "000 + 0011", 11 },
                    { "5 - 3 + 2", 4 },
                    { "3 + 2 - 5", 0 },
                    { "9 - 2 * 6 / 4", 6 },
                    { "9 - -7",  16 },
                    { "9-3*2", 3 },         // no spaces
                    { " 10  *   6  ", 60 }, // extra spaces
                    { "10 /( 2 + 3 )", 2 },
                    { "5 * -40", -200 },
                    { "(1 - 4) / (2 + 1)", -1 },
                    { "3 * ((4 + 8) / 2)", 18 },
                    { "23 * ((0 - 48) / 8)", -138 },
                    { "((74-71)*2)^3", 216 },
                    { "2 - 2 ^ 3", -6 },
                    { "2 ^ 2 ^ 2 / 2 + 9", 17 },
                    { "5 ^ -2", 0.04 },
                    { "5.09 + 14.333", 19.423 },
                    { "2.5 * 0.35", 0.875 },
                    { "-2 - 5", -7 },       // begins with negative number
                    { "(10)", 10 },         // number in parens
                    { "(-9)", -9 },         // negative number in parens
                    { "0^0", 1 },           // who knew?

                    // These should not parse, which means they will reset back to the previous value.
                    { "5x + 3y", resetValue },        // invalid chars
                    { "5 + (3", resetValue },         // mismatched parens
                    { "9 + (2 + 3))", resetValue },
                    { "(2 + 3)(1 + 5)", resetValue }, // missing operator
                    { "9 + + 7", resetValue },        // extra operators
                    { "9 - * 7",  resetValue },
                    { "9 - - 7",  resetValue },
                    { "+9", resetValue },
                    { "1 / 0", resetValue },          // divide by zero

                    // These don't currently work, but maybe should.
                    { "-(3 + 5)", resetValue }, // negative sign in front of parens -- should be -8
                };
                foreach (KeyValuePair<string, double> pair in expressions)
                {
                    numBox.SetValue(resetValue);
                    Wait.ForIdle();

                    EnterText(numBox, pair.Key);
                    string output = "Expression '" + pair.Key + "' - expected: " + pair.Value + ", actual: " + numBox.Value;
                    if (Math.Abs(pair.Value - numBox.Value) > 0.00001)
                    {
                        numErrors++;
                        Log.Warning(output);
                    }
                    else
                    {
                        Log.Comment(output);
                    }
                }

                Verify.AreEqual(0, numErrors);
            }
        }

void BasicKeyboardTest ( ) [inline]

Definition at line 280 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");

                Log.Comment("Verify that loss of focus validates textbox contents");
                EnterText(numBox, "8", false);
                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();
                Verify.AreEqual(8, numBox.Value);

                Log.Comment("Verify that whitespace around a number still evaluates to the number");
                EnterText(numBox, "  75 ", true);
                Wait.ForIdle();
                Verify.AreEqual(75, numBox.Value);

                Log.Comment("Verify that pressing escape cancels entered text");
                EnterText(numBox, "3", false);
                KeyboardHelper.PressKey(Key.Escape);
                Wait.ForIdle();
                Verify.AreEqual(75, numBox.Value);

                Log.Comment("Verify that pressing up arrow increases the value");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();
                Verify.AreEqual(76, numBox.Value);

                Log.Comment("Verify that pressing down arrow decreases the value");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();
                Verify.AreEqual(75, numBox.Value);

                Log.Comment("Verify that pressing PageUp key increases value by 10");
                KeyboardHelper.PressKey(Key.PageUp);
                Wait.ForIdle();
                Verify.AreEqual(85, numBox.Value);
            }
        }

void Check ( string checkboxName ) [inline, private]

Definition at line 683 of file NumberBoxTests.cs.

        {
            CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
            checkBox.Check();
            Wait.ForIdle();
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file NumberBoxTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void CustomFormatterTest ( ) [inline]

Definition at line 388 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                numBox.SetValue(8);
                Wait.ForIdle();
                Edit edit = FindTextBox(numBox);
                Verify.AreEqual("8", edit.GetText());

                Button button = FindElement.ByName<Button>("CustomFormatterButton");
                button.InvokeAndWait();

                Verify.AreEqual("8,00", edit.GetText());

                Log.Comment("Verify that using a formatter with a different decimal symbol works as expected.");
                EnterText(numBox, "7,45");
                Verify.AreEqual(7.45, numBox.Value);
            }
        }

void EnterText | ( | RangeValueSpinner | numBox,
 |  | string | text,
 |  | bool | pressEnter = true |
 | ) |  |  | [inline, private]

Definition at line 697 of file NumberBoxTests.cs.

        {
            Edit edit = FindTextBox(numBox);
            if (edit != null)
            {
                KeyboardHelper.EnterText(edit, text);
                if (pressEnter)
                {
                    KeyboardHelper.PressKey(Key.Enter);
                }
                Wait.ForIdle();
            }
        }

Button FindButton | ( | UIObject | parent,
 |  | string | buttonName |
 | ) |  |  | [inline, private]

Definition at line 657 of file NumberBoxTests.cs.

        {
            foreach (UIObject elem in parent.Children)
            {
                if (elem.Name.Equals(buttonName))
                {
                    return new Button(elem);
                }
            }
            Log.Comment("Did not find " + buttonName + " button for object " + parent.Name);
            return null;
        }

Edit FindTextBox ( UIObject parent ) [inline, private]

Definition at line 670 of file NumberBoxTests.cs.

        {
            foreach (UIObject elem in parent.Children)
            {
                if (elem.ClassName.Equals("TextBox"))
                {
                    return new Edit(elem);
                }
            }
            Log.Comment("Did not find TextBox for object " + parent.Name);
            return null;
        }

void GamepadTest ( ) [inline]

Definition at line 321 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");

                Log.Comment("Verify that pressing A validates textbox contents");
                EnterText(numBox, "8", false);
                GamepadHelper.PressButton(numBox, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual(8, numBox.Value);

                Log.Comment("Verify that pressing B cancels entered text");
                EnterText(numBox, "3", false);
                GamepadHelper.PressButton(numBox, GamepadButton.B);
                Wait.ForIdle();
                Verify.AreEqual(8, numBox.Value);
            }
        }

void MinMaxTest ( ) [inline]

Definition at line 236 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                Check("MinCheckBox");
                Check("MaxCheckBox");

                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                Verify.AreEqual(0, numBox.Minimum);
                Verify.AreEqual(100, numBox.Maximum);

                numBox.SetValue(10);
                Wait.ForIdle();

                Log.Comment("Verify that setting the value to -1 changes the value to 0");
                numBox.SetValue(-1);
                Wait.ForIdle();
                Verify.AreEqual(0, numBox.Value);

                Log.Comment("Verify that typing '123' in the NumberBox changes the value to 100");
                EnterText(numBox, "123");
                Verify.AreEqual(100, numBox.Value);

                Log.Comment("Changing Max to 90; verify value also changes to 90");
                RangeValueSpinner maxBox = FindElement.ByName<RangeValueSpinner>("MaxNumberBox");
                EnterText(maxBox, "90");
                Verify.AreEqual(90, numBox.Value);

                Log.Comment("Verify that setting the minimum above the maximum changes the maximum");
                RangeValueSpinner minBox = FindElement.ByName<RangeValueSpinner>("MinNumberBox");
                EnterText(minBox, "200");
                Verify.AreEqual(200, numBox.Minimum);
                Verify.AreEqual(200, numBox.Maximum);
                Verify.AreEqual(200, numBox.Value);

                Log.Comment("Verify that setting the maximum below the minimum changes the minimum");
                EnterText(maxBox, "150");
                Verify.AreEqual(150, numBox.Minimum);
                Verify.AreEqual(150, numBox.Maximum);
                Verify.AreEqual(150, numBox.Value);
            }
        }

void ScrollTest ( ) [inline]

Definition at line 342 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                numBox.SetValue(0);
                Wait.ForIdle();

                Log.Comment("Verify that scroll doesn't work when the control doesn't have focus.");
                FindElement.ByName("MaxCheckBox").SetFocus();
                Wait.ForIdle();
                InputHelper.RotateWheel(numBox, 1);
                Wait.ForIdle();
                Verify.AreEqual(0, numBox.Value);

                FindTextBox(numBox).SetFocus();
                Wait.ForIdle();

                InputHelper.RotateWheel(FindTextBox(numBox), 1);
                InputHelper.RotateWheel(FindTextBox(numBox), 1);
                Wait.ForIdle();
                Verify.AreEqual(2, numBox.Value);

                InputHelper.RotateWheel(FindTextBox(numBox), -1);
                InputHelper.RotateWheel(FindTextBox(numBox), -1);
                InputHelper.RotateWheel(FindTextBox(numBox), -1);
                Wait.ForIdle();
                Verify.AreEqual(-1, numBox.Value);

                // Testing for 1705
                RangeValueSpinner numBoxInScrollViewer = FindElement.ByName<RangeValueSpinner>("NumberBoxInScroller");
                numBoxInScrollViewer.SetValue(0);
                Wait.ForIdle();
                FindTextBox(numBoxInScrollViewer).SetFocus();
                InputHelper.RotateWheel(numBoxInScrollViewer, 1);
                InputHelper.RotateWheel(numBoxInScrollViewer, 1);
                Wait.ForIdle();
                Verify.AreEqual(2, numBoxInScrollViewer.Value);

                TextBlock vertOffset = FindElement.ByName<TextBlock>("VerticalOffsetDisplayBlock");
                Verify.AreEqual("0", vertOffset.GetText());

            }
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file NumberBoxTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void Uncheck ( string checkboxName ) [inline, private]

Definition at line 690 of file NumberBoxTests.cs.

        {
            CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
            checkBox.Uncheck();
            Wait.ForIdle();
        }

void UpDownEnabledTest ( ) [inline]

Definition at line 111 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");

                ComboBox spinModeComboBox = FindElement.ByName<ComboBox>("SpinModeComboBox");
                spinModeComboBox.SelectItemByName("Inline");
                Wait.ForIdle();

                Button upButton = FindButton(numBox, "Increase");
                Button downButton = FindButton(numBox, "Decrease");

                Check("MinCheckBox");
                Check("MaxCheckBox");

                Log.Comment("Verify that spin buttons are disabled if value is NaN.");
                Wait.ForIdle();
                Verify.IsFalse(upButton.IsEnabled);
                Verify.IsFalse(downButton.IsEnabled);

                Log.Comment("Verify that when Value is at Minimum, the down spin button is disabled.");
                numBox.SetValue(0);
                Wait.ForIdle();
                Verify.IsTrue(upButton.IsEnabled);
                Verify.IsFalse(downButton.IsEnabled);

                Log.Comment("Verify that when Value is at Maximum, the up spin button is disabled.");
                numBox.SetValue(100);
                Wait.ForIdle();
                Verify.IsFalse(upButton.IsEnabled);
                Verify.IsTrue(downButton.IsEnabled);

                Log.Comment("Verify that when wrapping is enabled, spin buttons are enabled.");
                Check("WrapCheckBox");
                Verify.IsTrue(upButton.IsEnabled);
                Verify.IsTrue(downButton.IsEnabled);
                Uncheck("WrapCheckBox");

                Log.Comment("Verify that when Maximum is updated the up button is updated also.");
                RangeValueSpinner maxBox = FindElement.ByName<RangeValueSpinner>("MaxNumberBox");
                maxBox.SetValue(200);
                Wait.ForIdle();
                Verify.IsTrue(upButton.IsEnabled);
                Verify.IsTrue(downButton.IsEnabled);

                ComboBox validationComboBox = FindElement.ByName<ComboBox>("ValidationComboBox");
                validationComboBox.SelectItemByName("Disabled");
                Wait.ForIdle();

                Log.Comment("Verify that when validation is off, spin buttons are enabled");
                numBox.SetValue(0);
                Wait.ForIdle();
                Verify.IsTrue(upButton.IsEnabled);
                Verify.IsTrue(downButton.IsEnabled);

                Log.Comment("...except in the NaN case");
                numBox.SetValue(double.NaN);
                Wait.ForIdle();
                Verify.IsFalse(upButton.IsEnabled);
                Verify.IsFalse(downButton.IsEnabled);
            }
        }

void UpDownTest ( ) [inline]

Definition at line 41 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                numBox.SetValue(1);

                ComboBox spinModeComboBox = FindElement.ByName<ComboBox>("SpinModeComboBox");
                spinModeComboBox.SelectItemByName("Inline");
                Wait.ForIdle();

                Button upButton = FindButton(numBox, "Increase");
                Button downButton = FindButton(numBox, "Decrease");

                Log.Comment("Change SmallChange value to 0.01");
                RangeValueSpinner smallChangeNumBox = FindElement.ByName<RangeValueSpinner>("SmallChangeNumberBox");
                EnterText(smallChangeNumBox, "0.01");
                Wait.ForIdle();

                Log.Comment("Verify that up button increases value by 0.01");
                upButton.InvokeAndWait();
                Edit edit = FindTextBox(numBox);
                Verify.AreEqual("1.01", edit.GetText());

                Log.Comment("Change Value to 0");
                numBox.SetValue(0);

                Log.Comment("Change SmallChange value to 1");
                EnterText(smallChangeNumBox, "1");
                Wait.ForIdle();

                Log.Comment("Verify that up button increases value by 1");
                upButton.InvokeAndWait();
                Verify.AreEqual(1, numBox.Value);

                Log.Comment("Verify that down button decreases value by 1");
                downButton.InvokeAndWait();
                Verify.AreEqual(0, numBox.Value);

                Log.Comment("Change SmallChange value to 5");
                smallChangeNumBox.SetValue(5);
                Wait.ForIdle();

                Log.Comment("Verify that up button increases value by 5");
                upButton.InvokeAndWait();
                Verify.AreEqual(5, numBox.Value);

                Check("MinCheckBox");
                Check("MaxCheckBox");

                numBox.SetValue(100);
                Check("WrapCheckBox");

                Log.Comment("Verify that when wrapping is on, and value is at max, clicking the up button wraps to the min value.");
                upButton.InvokeAndWait();
                Verify.AreEqual(0, numBox.Value);

                Log.Comment("Verify that when wrapping is on, clicking the down button wraps to the max value.");
                downButton.InvokeAndWait();
                Verify.AreEqual(100, numBox.Value);

                Log.Comment("Verify that incrementing after typing in a value validates the text first.");
                EnterText(numBox, "50", false);
                upButton.InvokeAndWait();
                Verify.AreEqual(55, numBox.Value);
            }
        }

void ValidationDisabledTest ( ) [inline]

Definition at line 410 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                ComboBox validationComboBox = FindElement.ByName<ComboBox>("ValidationComboBox");
                validationComboBox.SelectItemByName("Disabled");
                Wait.ForIdle();

                Check("MinCheckBox");
                Check("MaxCheckBox");

                Log.Comment("Verify that numbers outside the range can be set if validation is disabled.");
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                numBox.SetValue(-10);
                Wait.ForIdle();
                Verify.AreEqual(-10, numBox.Value);

                numBox.SetValue(150);
                Wait.ForIdle();
                Verify.AreEqual(150, numBox.Value);
            }
        }

void ValueChangedTest ( ) [inline]

Definition at line 434 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");

                TextBlock newValueTextBlock = FindElement.ByName<TextBlock>("NewValueTextBox");
                TextBlock oldValueTextBlock = FindElement.ByName<TextBlock>("OldValueTextBox");
                TextBlock textTextBlock = FindElement.ByName<TextBlock>("TextTextBox");

                Check("MinCheckBox");
                Check("MaxCheckBox");

                Log.Comment("Verify that entering a new number fires ValueChanged event.");
                EnterText(numBox, "12");
                Verify.AreEqual("12", textTextBlock.GetText());
                Verify.AreEqual("12", newValueTextBlock.GetText());
                Verify.AreEqual("NaN",  oldValueTextBlock.GetText());

                Log.Comment("Verify that setting value through UIA fires ValueChanged event.");
                Button button = FindElement.ByName<Button>("SetValueButton");
                button.InvokeAndWait();
                Verify.AreEqual("42", textTextBlock.GetText());
                Verify.AreEqual("42", newValueTextBlock.GetText());
                Verify.AreEqual("12", oldValueTextBlock.GetText());

                Log.Comment("Verify that setting value below min gives proper values.");
                EnterText(numBox, "-5");
                Verify.AreEqual("0", textTextBlock.GetText());
                Verify.AreEqual("0", newValueTextBlock.GetText());
                Verify.AreEqual("42", oldValueTextBlock.GetText());

                Log.Comment("Verify that setting value above max gives proper values.");
                EnterText(numBox, "150");
                Verify.AreEqual("100", textTextBlock.GetText());
                Verify.AreEqual("100", newValueTextBlock.GetText());
                Verify.AreEqual("0", oldValueTextBlock.GetText());

                Log.Comment("Verify that setting text to an empty string sets value to NaN.");
                EnterText(numBox, "");
                Verify.AreEqual("", textTextBlock.GetText());
                Verify.AreEqual("NaN", newValueTextBlock.GetText());
                Verify.AreEqual("100", oldValueTextBlock.GetText());

                Log.Comment("Verify that setting two way bound value to NaN doesn't cause a crash");
                Button twoWayBindNanbutton = FindElement.ByName<Button>("SetTwoWayBoundValueNaNButton");
                twoWayBindNanbutton.InvokeAndWait();
                TextBlock twoWayBoundNumberBoxValue = FindElement.ByName<TextBlock>("TwoWayBoundNumberBoxValue");
                Verify.AreEqual("NaN", twoWayBoundNumberBoxValue.GetText());

                Log.Comment("Verify that setting value to NaN doesn't have any effect");
                Button nanbutton = FindElement.ByName<Button>("SetValueNaNButton");
                nanbutton.InvokeAndWait();
                Verify.AreEqual("", textTextBlock.GetText());
                Verify.AreEqual("NaN", newValueTextBlock.GetText());
                Verify.AreEqual("100", oldValueTextBlock.GetText());
            }
        }

void ValueTextTest ( ) [inline]

Definition at line 176 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                EnterText(numBox, "0");
                Wait.ForIdle();

                Log.Comment("Give something else focus first to ensure that we'll have a focus-changed event");
                FocusHelper.SetFocus(FindElement.ByName("ValidationComboBox"));

                Log.Comment("Verify that focusing the NumberBox selects the text");
                numBox.SetFocus();
                Wait.ForIdle();
                Wait.ForSeconds(3);
                Edit edit = FindTextBox(numBox);
                Verify.AreEqual("0", edit.GetTextSelection());

                Log.Comment("Verify that setting the value through UIA changes the textbox text");
                numBox.SetValue(10);
                Wait.ForIdle();
                Verify.AreEqual("10", edit.GetText());

                Log.Comment("Verify that setting the text programmatically changes the value and textbox text");
                Button button = FindElement.ByName<Button>("SetTextButton");
                button.InvokeAndWait();
                Verify.AreEqual(15, numBox.Value);
                Verify.AreEqual("15", edit.GetText());

                Log.Comment("Verify that even if the value doesn't change, the textbox text is updated");
                EnterText(numBox, " 15 ");
                Verify.AreEqual("15", edit.GetText());

                Log.Comment("Verify that there is no rounding error for value 25.8");
                EnterText(numBox, "25.8");
                Verify.AreEqual("25.8", edit.GetText());

                Log.Comment("Verify that there is no rounding error for value 0.0001");
                EnterText(numBox, "0.0001");
                Verify.AreEqual("0.0001", edit.GetText());

                Log.Comment("Verify that there is no rounding error for value 294.1");
                EnterText(numBox, "294.1");
                Verify.AreEqual("294.1", edit.GetText());

                Log.Comment("Verify that there is no rounding error for value 2924.8");
                EnterText(numBox, "2924.8");
                Verify.AreEqual("2924.8", edit.GetText());

                Log.Comment("Verify that there is no rounding error for value 1.01");
                EnterText(numBox, "1.01");
                Verify.AreEqual("1.01", edit.GetText());

                Log.Comment("Verify that there is no rounding error for value 0.03");
                EnterText(numBox, "0.03");
                Verify.AreEqual("0.03", edit.GetText());
            }
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 649 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

void VerifyNumberBoxHeaderBehavior ( ) [inline]

Definition at line 578 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                var headerBeforeApplyTemplate = FindElement.ByName<TextBlock>("HeaderBeforeApplyTemplateTest");
                Verify.IsNotNull(headerBeforeApplyTemplate);

                var headerTemplateBeforeApplyTemplate = FindElement.ByName<TextBlock>("HeaderTemplateBeforeApplayTemplateTest");
                Verify.IsNotNull(headerBeforeApplyTemplate);

                var toggleHeaderButton = FindElement.ByName<Button>("ToggleHeaderValueButton");
                var header = FindElement.ByName<TextBlock>("NumberBoxHeaderClippingDemoHeader");

                Log.Comment("Check header is null");
                Verify.IsNull(header);

                Log.Comment("Set header");
                toggleHeaderButton.Invoke();
                Wait.ForIdle();

                header = FindElement.ByName<TextBlock>("NumberBoxHeaderClippingDemoHeader");
                Log.Comment("Check if header is present");
                Verify.IsNotNull(header);
                Log.Comment("Remove header");
                toggleHeaderButton.Invoke();
                Wait.ForIdle();
                ElementCache.Clear();

                Log.Comment("Check that header is null again");
                header = FindElement.ByName<TextBlock>("NumberBoxHeaderClippingDemoHeader");
                Verify.IsNull(header);

                var toggleHeaderTemplateButton = FindElement.ByName<Button>("ToggleHeaderTemplateValueButton");
                var headerTemplate = FindElement.ByName<TextBlock>("HeaderTemplateTestingBlock");

                Verify.IsNull(headerTemplate);

                toggleHeaderTemplateButton.Invoke();
                Wait.ForIdle();

                headerTemplate = FindElement.ByName<TextBlock>("HeaderTemplateTestingBlock");
                Verify.IsNotNull(headerTemplate);
            }
        }

void VerifyRightClickForContextMenuDoesNotDeselectText ( ) [inline]

Definition at line 625 of file NumberBoxTests.cs.

        {
            using (var setup = new TestSetupHelper("NumberBox Tests"))
            {
                RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
                numBox.SetValue(0);

                Log.Comment("Verify that focusing the NumberBox selects the text");
                numBox.SetFocus();
                Wait.ForIdle();
                Wait.ForSeconds(3);
                Edit edit = FindTextBox(numBox);
                Verify.AreEqual("0", edit.GetTextSelection());

                Log.Comment("Verify that right-clicking on the NumberBox's input field (to bring up the context menu) does not clear the selection");
                // (15, 15): Just some offset large enough to make sure the right-click below will actually bring up the context menu
                InputHelper.RightClick(edit, 15, 15);
                Wait.ForIdle();

                Verify.AreEqual("0", edit.GetTextSelection());
            }
        }

The documentation for this class was generated from the following file:
  • NumberBox/InteractionTests/NumberBoxTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlTestBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • PagerControlTestBase
Public Types | Protected Member Functions | Protected Attributes

PagerControlTestBase Class Reference

Inherited by PagerControlTests.

List of all members.

Public Types

enum | ButtonVisibilityModes { AlwaysVisible, HiddenOnEdge, None }
enum | DisplayModes { Auto, NumberBox, ComboBox, NumberPanel }

Protected Member Functions

void | ButtonVisibilityOptionsTest (string buttonNamePrefix)
void | ChangeNumberOfPages ()
Edit | FindTextBox (UIObject parent)
string | GetCurrentPage ()
int | GetCurrentPageAsInt ()
string | GetLastPage ()
int | GetLastPageAsInt ()
string | GetPreviousPage ()
int | GetPreviousPageAsInt ()
void | IncrementNumberOfPages (int numberOfPagesToAdd)
void | SelectPageInNumberPanel (int index)
void | SelectValueInPagerComboBox (int index)
void | SendValueToNumberBox (string value)
void | SetAutoDisplayMode ()
delegate void | SetButtonVisibilityModeFunction (ButtonVisibilityModes mode)
void | SetComboBoxDisplayMode ()
void | SetDisplayMode (string mode)
void | SetFirstPageButtonVisibilityMode (ButtonVisibilityModes mode)
void | SetLastPageButtonVisibilityMode (ButtonVisibilityModes mode)
void | SetNextPageButtonVisibilityMode (ButtonVisibilityModes mode)
void | SetNumberBoxDisplayMode ()
void | SetNumberPanelDisplayMode ()
void | SetPreviousPageButtonVisibilityMode (ButtonVisibilityModes mode)
void | VerifyAutoDisplayMode ()
void | VerifyButton (UIObject button, Visibility expectedVisibility, bool shouldBeEnabled)
void | VerifyComboBoxDisabled ()
void | VerifyComboBoxDisplayMode ()
void | VerifyComboBoxEnabled ()
void | VerifyComboBoxIsEnabled (bool expected)
void | VerifyComboBoxVisibility (Visibility expected)
void | VerifyDisplayMode (DisplayModes mode)
void | VerifyFirstPageButtonIsEnabled (bool expected)
void | VerifyFirstPageButtonVisibility (Visibility expected)
void | VerifyLastPageButtonIsEnabled (bool expected)
void | VerifyLastPageButtonVisibility (Visibility expected)
void | VerifyNextPageButtonIsEnabled (bool expected)
void | VerifyNextPageButtonVisibility (Visibility expected)
void | VerifyNumberBoxDisabled ()
void | VerifyNumberBoxDisplayMode ()
void | VerifyNumberBoxEnabled ()
void | VerifyNumberBoxIsEnabled (bool expected)
void | VerifyNumberBoxVisibility (Visibility expected)
void | VerifyNumberOfPages (string expectedPages)
void | VerifyNumberPanelContent (string expectedContent)
void | VerifyNumberPanelDisabled ()
void | VerifyNumberPanelDisplayMode ()
void | VerifyNumberPanelEnabled ()
void | VerifyNumberPanelVisibility (Visibility expected)
void | VerifyPageChanged (int expectedPage)
void | VerifyPreviousPageButtonIsEnabled (bool expected)
void | VerifyPreviousPageButtonVisibility (Visibility expected)

Protected Attributes

int | AutoDisplayModeThresholdValue = 10
PagerControlTestPageElements elements

Detailed Description

Definition at line 25 of file PagerControlTestBase.cs.

Member Enumeration Documentation

enum ButtonVisibilityModes
Enumerator:
AlwaysVisible
HiddenOnEdge
None

Definition at line 480 of file PagerControlTestBase.cs.

        {
            AlwaysVisible,
            HiddenOnEdge,
            None
        }

enum DisplayModes
Enumerator:
Auto
NumberBox
ComboBox
NumberPanel

Definition at line 472 of file PagerControlTestBase.cs.

        {
            Auto,
            NumberBox,
            ComboBox,
            NumberPanel
        };

Member Function Documentation

void ButtonVisibilityOptionsTest ( string buttonNamePrefix ) [inline, protected]

Definition at line 397 of file PagerControlTestBase.cs.

        {
            SetButtonVisibilityModeFunction SetButtonVisibilityMode;
            UIObject buttonBeingTested;

            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {

                elements = new PagerControlTestPageElements();
                switch (buttonNamePrefix)
                {
                    case "First":
                        SetButtonVisibilityMode = SetFirstPageButtonVisibilityMode;
                        buttonBeingTested = elements.GetFirstPageButton();
                        break;
                    case "Previous":
                        SetButtonVisibilityMode = SetPreviousPageButtonVisibilityMode;
                        buttonBeingTested = elements.GetPreviousPageButton();
                        break;
                    case "Next":
                        SetButtonVisibilityMode = SetNextPageButtonVisibilityMode;
                        buttonBeingTested = elements.GetNextPageButton();
                        break;
                    case "Last":
                        SetButtonVisibilityMode = SetLastPageButtonVisibilityMode;
                        buttonBeingTested = elements.GetLastPageButton();
                        break;
                    default:
                        Log.Warning("This test is being skipped because the button string was not one of these four strings: [First, Previous, Next, Last]");
                        return;
                }

                VerifyPageChanged(0);

                foreach (ButtonVisibilityModes visMode in Enum.GetValues(typeof(ButtonVisibilityModes)))
                {
                    SetButtonVisibilityMode(visMode);
                    GetLastPage();
                    // If we're not on the first page then navigate to the first page.
                    if (GetCurrentPageAsInt() != 0)
                    {
                        SelectValueInPagerComboBox(0);
                        VerifyPageChanged(0);
                    }

                    var expectedVisibility = ((visMode == ButtonVisibilityModes.None) ||
                        (visMode == ButtonVisibilityModes.HiddenOnEdge &&
                        (buttonNamePrefix == "First" || buttonNamePrefix == "Previous"))) ? Visibility.Collapsed : Visibility.Visible;

                    var expectedIsEnableValue = (buttonNamePrefix == "First" || buttonNamePrefix == "Previous") ? false : true;

                    VerifyButton(buttonBeingTested, expectedVisibility, expectedIsEnableValue);

                    SelectValueInPagerComboBox(1);
                    VerifyPageChanged(1);

                    expectedVisibility = (visMode == ButtonVisibilityModes.None) ? Visibility.Collapsed : Visibility.Visible;
                    expectedIsEnableValue = true;

                    VerifyButton(buttonBeingTested, expectedVisibility, expectedIsEnableValue);

                    SelectValueInPagerComboBox(GetLastPageAsInt() - 1);
                    VerifyPageChanged(GetLastPageAsInt() - 1);

                    expectedVisibility = ((visMode == ButtonVisibilityModes.None) ||
                        (visMode == ButtonVisibilityModes.HiddenOnEdge &&
                        (buttonNamePrefix == "Next" || buttonNamePrefix == "Last"))) ? Visibility.Collapsed : Visibility.Visible;

                    expectedIsEnableValue = (buttonNamePrefix == "Next" || buttonNamePrefix == "Last") ? false : true;

                    VerifyButton(buttonBeingTested, expectedVisibility, expectedIsEnableValue);
                }
            }
        }

void ChangeNumberOfPages ( ) [inline, protected]

Definition at line 98 of file PagerControlTestBase.cs.

        {
            InputHelper.LeftClick(elements.GetNumberOfPagesSetterButton());
        }

Edit FindTextBox ( UIObject parent ) [inline, protected]

Definition at line 58 of file PagerControlTestBase.cs.

        {
            foreach (UIObject elem in parent.Children)
            {
                if (elem.ClassName.Equals("TextBox"))
                {
                    return new Edit(elem);
                }
            }
            Log.Comment("Did not find TextBox for object " + parent.Name);
            return null;
        }

string GetCurrentPage ( ) [inline, protected]

Definition at line 93 of file PagerControlTestBase.cs.

        {
            return elements.GetCurrentPageTextBlock().GetText();
        }

int GetCurrentPageAsInt ( ) [inline, protected]

Definition at line 89 of file PagerControlTestBase.cs.

        {
            return Convert.ToInt32(GetCurrentPage());
        }

string GetLastPage ( ) [inline, protected]

Definition at line 75 of file PagerControlTestBase.cs.

        {
            return elements.GetNumberOfPagesTextBlock().GetText();
        }

int GetLastPageAsInt ( ) [inline, protected]

Definition at line 71 of file PagerControlTestBase.cs.

        {
            return Convert.ToInt32(GetLastPage());
        }

string GetPreviousPage ( ) [inline, protected]

Definition at line 84 of file PagerControlTestBase.cs.

        {
            return elements.GetPreviousPageTextBlock().GetText();
        }

int GetPreviousPageAsInt ( ) [inline, protected]

Definition at line 80 of file PagerControlTestBase.cs.

        {
            return Convert.ToInt32(GetPreviousPage());
        }

void IncrementNumberOfPages ( int numberOfPagesToAdd ) [inline, protected]

Definition at line 103 of file PagerControlTestBase.cs.

        {
            for (int i = 0; i < numberOfPagesToAdd; i++)
            {
                InputHelper.LeftClick(elements.GetIncreaseNumberOfPagesButton());
            }
        }

void SelectPageInNumberPanel ( int index ) [inline, protected]

Definition at line 52 of file PagerControlTestBase.cs.

        {
            InputHelper.LeftClick(elements.GetNumberPanelButton("Page " + index.ToString()));
            Wait.ForIdle();
        }

void SelectValueInPagerComboBox ( int index ) [inline, protected]

Definition at line 31 of file PagerControlTestBase.cs.

        {
            // Open ComboBox.
            InputHelper.LeftClick(elements.GetPagerComboBox());
            Wait.ForIdle();
            // Index is the actual PagerControl SelectedIndex, so we need to add 1 here
            // to result in the user friendly name being displayed in the ComboBox.
            elements.GetPagerComboBox().SelectItemByName((index + 1).ToString());
        }

void SendValueToNumberBox ( string value ) [inline, protected]

Definition at line 41 of file PagerControlTestBase.cs.

        {
            Edit textbox = FindTextBox(elements.GetPagerNumberBox());

            Verify.IsNotNull(textbox);

            KeyboardHelper.EnterText(textbox, value);
            KeyboardHelper.PressKey(Key.Enter);
            Wait.ForIdle();
        }

void SetAutoDisplayMode ( ) [inline, protected]

Definition at line 256 of file PagerControlTestBase.cs.

        {
            SetDisplayMode("AutoDisplayModeItem");
        }

delegate void SetButtonVisibilityModeFunction ( ButtonVisibilityModes mode ) [protected]
void SetComboBoxDisplayMode ( ) [inline, protected]

Definition at line 266 of file PagerControlTestBase.cs.

        {
            SetDisplayMode("ComboBoxDisplayModeItem");
        }

void SetDisplayMode ( string mode ) [inline, protected]

Definition at line 276 of file PagerControlTestBase.cs.

        {
            elements.GetDisplayModeComboBox().SelectItemByName(mode);
            Wait.ForIdle();
        }

void SetFirstPageButtonVisibilityMode ( ButtonVisibilityModes mode ) [inline, protected]

Definition at line 192 of file PagerControlTestBase.cs.

        {
            if (mode == ButtonVisibilityModes.AlwaysVisible)
            {
                elements.GetFirstPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisibleFirstPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.HiddenOnEdge)
            {
                elements.GetFirstPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgeFirstPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.None)
            {
                elements.GetFirstPageButtonVisibilityComboBox().SelectItemByName("NoneFirstPageButtonVisibilityItem");
            }
        }

void SetLastPageButtonVisibilityMode ( ButtonVisibilityModes mode ) [inline, protected]

Definition at line 240 of file PagerControlTestBase.cs.

        {
            if (mode == ButtonVisibilityModes.AlwaysVisible)
            {
                elements.GetLastPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisibleLastPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.HiddenOnEdge)
            {
                elements.GetLastPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgeLastPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.None)
            {
                elements.GetLastPageButtonVisibilityComboBox().SelectItemByName("NoneLastPageButtonVisibilityItem");
            }
        }

void SetNextPageButtonVisibilityMode ( ButtonVisibilityModes mode ) [inline, protected]

Definition at line 224 of file PagerControlTestBase.cs.

        {
            if (mode == ButtonVisibilityModes.AlwaysVisible)
            {
                elements.GetNextPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisibleNextPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.HiddenOnEdge)
            {
                elements.GetNextPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgeNextPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.None)
            {
                elements.GetNextPageButtonVisibilityComboBox().SelectItemByName("NoneNextPageButtonVisibilityItem");
            }
        }

void SetNumberBoxDisplayMode ( ) [inline, protected]

Definition at line 261 of file PagerControlTestBase.cs.

        {
            SetDisplayMode("NumberBoxDisplayModeItem");
        }

void SetNumberPanelDisplayMode ( ) [inline, protected]

Definition at line 271 of file PagerControlTestBase.cs.

        {
            SetDisplayMode("NumberPanelDisplayModeItem");
        }

void SetPreviousPageButtonVisibilityMode ( ButtonVisibilityModes mode ) [inline, protected]

Definition at line 208 of file PagerControlTestBase.cs.

        {
            if (mode == ButtonVisibilityModes.AlwaysVisible)
            {
                elements.GetPreviousPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisiblePreviousPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.HiddenOnEdge)
            {
                elements.GetPreviousPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgePreviousPageButtonVisibilityItem");
            }
            else if (mode == ButtonVisibilityModes.None)
            {
                elements.GetPreviousPageButtonVisibilityComboBox().SelectItemByName("NonePreviousPageButtonVisibilityItem");
            }
        }

void VerifyAutoDisplayMode ( ) [inline, protected]

Definition at line 282 of file PagerControlTestBase.cs.

        {
            VerifyDisplayMode(DisplayModes.Auto);
        }

void VerifyButton | ( | UIObject | button,
 |  | Visibility | expectedVisibility,
 |  | bool | shouldBeEnabled |
 | ) |  |  | [inline, protected]

Definition at line 127 of file PagerControlTestBase.cs.

        {

            if (button == elements.GetFirstPageButton())
            {
                VerifyFirstPageButtonVisibility(expectedVisibility);
                VerifyFirstPageButtonIsEnabled(shouldBeEnabled);
            }
            else if (button == elements.GetPreviousPageButton())
            {
                VerifyPreviousPageButtonVisibility(expectedVisibility);
                VerifyPreviousPageButtonIsEnabled(shouldBeEnabled);
            }
            else if (button == elements.GetNextPageButton())
            {
                VerifyNextPageButtonVisibility(expectedVisibility);
                VerifyNextPageButtonIsEnabled(shouldBeEnabled);
            }
            else if (button == elements.GetLastPageButton())
            {
                VerifyLastPageButtonVisibility(expectedVisibility);
                VerifyLastPageButtonIsEnabled(shouldBeEnabled);
            }
        }

void VerifyComboBoxDisabled ( ) [inline, protected]

Definition at line 357 of file PagerControlTestBase.cs.

        {
            VerifyComboBoxVisibility(Visibility.Collapsed);
        }

void VerifyComboBoxDisplayMode ( ) [inline, protected]

Definition at line 292 of file PagerControlTestBase.cs.

        {
            VerifyDisplayMode(DisplayModes.ComboBox);
        }

void VerifyComboBoxEnabled ( ) [inline, protected]

Definition at line 340 of file PagerControlTestBase.cs.

        {
            VerifyComboBoxVisibility(Visibility.Visible);
            VerifyComboBoxIsEnabled(true);
        }

void VerifyComboBoxIsEnabled ( bool expected ) [inline, protected]

Definition at line 377 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected, elements.GetComboBoxIsEnabledCheckBox().ToggleState == ToggleState.On);
        }

void VerifyComboBoxVisibility ( Visibility expected ) [inline, protected]

Definition at line 372 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetComboBoxVisibilityCheckBox().ToggleState == ToggleState.On);
        }

void VerifyDisplayMode ( DisplayModes mode ) [inline, protected]

Definition at line 302 of file PagerControlTestBase.cs.

        {
            switch (mode)
            {
                case DisplayModes.Auto:
                    if (Convert.ToInt32(elements.GetNumberOfPagesTextBlock().GetText()) < AutoDisplayModeThresholdValue)
                    {
                        VerifyComboBoxEnabled();
                        VerifyNumberBoxDisabled();
                        VerifyNumberPanelDisabled();
                    }
                    else
                    {
                        VerifyNumberBoxEnabled();
                        VerifyComboBoxDisabled();
                        VerifyNumberPanelDisabled();
                    }
                    break;
                case DisplayModes.ComboBox:
                    VerifyComboBoxEnabled();
                    VerifyNumberBoxDisabled();
                    VerifyNumberPanelDisabled();
                    break;
                case DisplayModes.NumberBox:
                    VerifyComboBoxDisabled();
                    VerifyNumberBoxEnabled();
                    VerifyNumberPanelDisabled();
                    break;
                case DisplayModes.NumberPanel:
                    VerifyComboBoxDisabled();
                    VerifyNumberBoxDisabled();
                    VerifyNumberPanelEnabled();
                    break;
                default:
                    break;
            }
        }

void VerifyFirstPageButtonIsEnabled ( bool expected ) [inline, protected]

Definition at line 157 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected, elements.GetFirstPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
        }

void VerifyFirstPageButtonVisibility ( Visibility expected ) [inline, protected]

Definition at line 152 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetFirstPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
        }

void VerifyLastPageButtonIsEnabled ( bool expected ) [inline, protected]

Definition at line 187 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected, elements.GetLastPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
        }

void VerifyLastPageButtonVisibility ( Visibility expected ) [inline, protected]

Definition at line 182 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetLastPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
        }

void VerifyNextPageButtonIsEnabled ( bool expected ) [inline, protected]

Definition at line 177 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected, elements.GetNextPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
        }

void VerifyNextPageButtonVisibility ( Visibility expected ) [inline, protected]

Definition at line 172 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetNextPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
        }

void VerifyNumberBoxDisabled ( ) [inline, protected]

Definition at line 362 of file PagerControlTestBase.cs.

        {
            VerifyNumberBoxVisibility(Visibility.Collapsed);
        }

void VerifyNumberBoxDisplayMode ( ) [inline, protected]

Definition at line 287 of file PagerControlTestBase.cs.

        {
            VerifyDisplayMode(DisplayModes.NumberBox);
        }

void VerifyNumberBoxEnabled ( ) [inline, protected]

Definition at line 346 of file PagerControlTestBase.cs.

        {
            VerifyNumberBoxVisibility(Visibility.Visible);
            VerifyNumberBoxIsEnabled(true);
        }

void VerifyNumberBoxIsEnabled ( bool expected ) [inline, protected]

Definition at line 387 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected, elements.GetNumberBoxIsEnabledCheckBox().ToggleState == ToggleState.On);
        }

void VerifyNumberBoxVisibility ( Visibility expected ) [inline, protected]

Definition at line 382 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetNumberBoxVisibilityCheckBox().ToggleState == ToggleState.On);
        }

void VerifyNumberOfPages ( string expectedPages ) [inline, protected]

Definition at line 111 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expectedPages, elements.GetNumberOfPagesTextBlock().GetText());
        }

void VerifyNumberPanelContent ( string expectedContent ) [inline, protected]

Definition at line 116 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expectedContent, elements.GetNumberPanelContentTextBlock().GetText());
        }

void VerifyNumberPanelDisabled ( ) [inline, protected]

Definition at line 367 of file PagerControlTestBase.cs.

        {
            VerifyNumberPanelVisibility(Visibility.Collapsed);
        }

void VerifyNumberPanelDisplayMode ( ) [inline, protected]

Definition at line 297 of file PagerControlTestBase.cs.

        {
            VerifyDisplayMode(DisplayModes.NumberPanel);
        }

void VerifyNumberPanelEnabled ( ) [inline, protected]

Definition at line 352 of file PagerControlTestBase.cs.

        {
            VerifyNumberPanelVisibility(Visibility.Visible);
        }

void VerifyNumberPanelVisibility ( Visibility expected ) [inline, protected]

Definition at line 392 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetNumberPanelVisibilityCheckBox().ToggleState == ToggleState.On);
        }

void VerifyPageChanged ( int expectedPage ) [inline, protected]

Definition at line 121 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expectedPage, GetCurrentPageAsInt());
            Log.Comment($"Changing to page {expectedPage}");
        }

void VerifyPreviousPageButtonIsEnabled ( bool expected ) [inline, protected]

Definition at line 167 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected, elements.GetPreviousPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
        }

void VerifyPreviousPageButtonVisibility ( Visibility expected ) [inline, protected]

Definition at line 162 of file PagerControlTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetPreviousPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
        }

Member Data Documentation

int AutoDisplayModeThresholdValue = 10 [protected]

Definition at line 28 of file PagerControlTestBase.cs.

PagerControlTestPageElements elements [protected]

Definition at line 27 of file PagerControlTestBase.cs.

The documentation for this class was generated from the following file:
  • PagerControl/InteractionTests/PagerControlTestBase.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlTestPageElements Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • PagerControlTestPageElements
Public Member Functions | Private Member Functions | Private Attributes

PagerControlTestPageElements Class Reference

List of all members.

Public Member Functions

Button | GetCheckIfButtonsHiddenButton ()
TextBlock | GetCheckIfButtonsHiddenLabel ()
CheckBox | GetComboBoxIsEnabledCheckBox ()
CheckBox | GetComboBoxVisibilityCheckBox ()
TextBlock | GetCurrentPageIdentifierLeftMarginTextBlock ()
TextBlock | GetCurrentPageTextBlock ()
ComboBox | GetDisplayModeComboBox ()
Button | GetEnterInfinityModeButton ()
UIObject | GetFirstPageButton ()
CheckBox | GetFirstPageButtonIsEnabledCheckBox ()
CheckBox | GetFirstPageButtonVisibilityCheckBox ()
ComboBox | GetFirstPageButtonVisibilityComboBox ()
Button | GetIncreaseNumberOfPagesButton ()
UIObject | GetLastPageButton ()
CheckBox | GetLastPageButtonIsEnabledCheckBox ()
CheckBox | GetLastPageButtonVisibilityCheckBox ()
ComboBox | GetLastPageButtonVisibilityComboBox ()
UIObject | GetNextPageButton ()
CheckBox | GetNextPageButtonIsEnabledCheckBox ()
CheckBox | GetNextPageButtonVisibilityCheckBox ()
ComboBox | GetNextPageButtonVisibilityComboBox ()
CheckBox | GetNumberBoxIsEnabledCheckBox ()
CheckBox | GetNumberBoxVisibilityCheckBox ()
Button | GetNumberOfPagesSetterButton ()
TextBlock | GetNumberOfPagesTextBlock ()
UIObject | GetNumberPanelButton (string elementName)
TextBlock | GetNumberPanelContentTextBlock ()
CheckBox | GetNumberPanelVisibilityCheckBox ()
ComboBox | GetPagerComboBox ()
UIObject | GetPagerControl ()
UIObject | GetPagerNumberBox ()
UIObject | GetPreviousPageButton ()
CheckBox | GetPreviousPageButtonIsEnabledCheckBox ()
CheckBox | GetPreviousPageButtonVisibilityCheckBox ()
ComboBox | GetPreviousPageButtonVisibilityComboBox ()
TextBlock | GetPreviousPageTextBlock ()
Button | GetUpdateMarginTextBlockButton ()

Private Member Functions

T | GetElement< T > (ref T element, string elementName)
T | GetElementWithinPager< T > (ref T element, string elementName)

Private Attributes

Button | CheckIfButtonsHiddenButton
TextBlock | CheckIfButtonsHiddenLabel
CheckBox | ComboBoxIsEnabledCheckBox
CheckBox | ComboBoxVisibilityCheckBox
TextBlock | CurrentPageIdentifierLeftMarginTextBlock
TextBlock | CurrentPageTextBlock
ComboBox | DisplayModeComboBox
Button | EnterInfinityModeButton
UIObject | FirstPageButton
CheckBox | FirstPageButtonIsEnabledCheckBox
CheckBox | FirstPageButtonVisibilityCheckBox
ComboBox | FirstPageButtonVisibilityComboBox
Button | IncreaseNumberOfPagesButton
UIObject | LastPageButton
CheckBox | LastPageButtonIsEnabledCheckBox
CheckBox | LastPageButtonVisibilityCheckBox
ComboBox | LastPageButtonVisibilityComboBox
UIObject | NextPageButton
CheckBox | NextPageButtonIsEnabledCheckBox
CheckBox | NextPageButtonVisibilityCheckBox
ComboBox | NextPageButtonVisibilityComboBox
CheckBox | NumberBoxIsEnabledCheckBox
CheckBox | NumberBoxVisibilityCheckBox
Button | NumberOfPagesSetterButton
TextBlock | NumberOfPagesTextBlock
TextBlock | NumberPanelContentTextBlock
CheckBox | NumberPanelVisibilityCheckBox
ComboBox | PagerComboBox
UIObject | PagerControl
UIObject | PagerNumberBox
UIObject | PreviousPageButton
CheckBox | PreviousPageButtonIsEnabledCheckBox
CheckBox | PreviousPageButtonVisibilityCheckBox
ComboBox | PreviousPageButtonVisibilityComboBox
TextBlock | PreviousPageTextBlock
Button | UpdateMarginTextBlockButton

Detailed Description

Definition at line 16 of file PagerControlTestPageElements.cs.

Member Function Documentation

Button GetCheckIfButtonsHiddenButton ( ) [inline]

Definition at line 234 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref CheckIfButtonsHiddenButton, "CheckIfButtonsHiddenButton");
        }

TextBlock GetCheckIfButtonsHiddenLabel ( ) [inline]

Definition at line 239 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref CheckIfButtonsHiddenLabel, "CheckIfButtonsHiddenLabel");
        }

CheckBox GetComboBoxIsEnabledCheckBox ( ) [inline]

Definition at line 174 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref ComboBoxIsEnabledCheckBox, "ComboBoxIsEnabledCheckBox");
        }

CheckBox GetComboBoxVisibilityCheckBox ( ) [inline]

Definition at line 168 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref ComboBoxVisibilityCheckBox, "ComboBoxVisibilityCheckBox");
        }

TextBlock GetCurrentPageIdentifierLeftMarginTextBlock ( ) [inline]

Definition at line 198 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref CurrentPageIdentifierLeftMarginTextBlock, "CurrentPageIdentifierLeftMarginTextBlock");
        }

TextBlock GetCurrentPageTextBlock ( ) [inline]

Definition at line 216 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref CurrentPageTextBlock, "CurrentPageTextBlock");
        }

ComboBox GetDisplayModeComboBox ( ) [inline]

Definition at line 102 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref DisplayModeComboBox, "PagerDisplayModeComboBox");
        }

T GetElement< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
T GetElementWithinPager< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
Button GetEnterInfinityModeButton ( ) [inline]

Definition at line 245 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref EnterInfinityModeButton, "NumberOfPagesInfinityButton");
        }

UIObject GetFirstPageButton ( ) [inline]

Definition at line 54 of file PagerControlTestPageElements.cs.

        {
            return GetElementWithinPager(ref FirstPageButton, "FirstPageButton");
        }

CheckBox GetFirstPageButtonIsEnabledCheckBox ( ) [inline]

Definition at line 132 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref FirstPageButtonIsEnabledCheckBox, "FirstPageButtonIsEnabledCheckBox");
        }

CheckBox GetFirstPageButtonVisibilityCheckBox ( ) [inline]

Definition at line 108 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref FirstPageButtonVisibilityCheckBox, "FirstPageButtonVisibilityCheckBox");
        }

ComboBox GetFirstPageButtonVisibilityComboBox ( ) [inline]

Definition at line 78 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref FirstPageButtonVisibilityComboBox, "FirstPageButtonVisibilityComboBox");
        }

Button GetIncreaseNumberOfPagesButton ( ) [inline]

Definition at line 228 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref IncreaseNumberOfPagesButton, "IncreaseNumberOfPagesButton");
        }

UIObject GetLastPageButton ( ) [inline]

Definition at line 72 of file PagerControlTestPageElements.cs.

        {
            return GetElementWithinPager(ref LastPageButton, "LastPageButton");
        }

CheckBox GetLastPageButtonIsEnabledCheckBox ( ) [inline]

Definition at line 150 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref LastPageButtonIsEnabledCheckBox, "LastPageButtonIsEnabledCheckBox");
        }

CheckBox GetLastPageButtonVisibilityCheckBox ( ) [inline]

Definition at line 126 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref LastPageButtonVisibilityCheckBox, "LastPageButtonVisibilityCheckBox");
        }

ComboBox GetLastPageButtonVisibilityComboBox ( ) [inline]

Definition at line 96 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref LastPageButtonVisibilityComboBox, "LastPageButtonVisibilityComboBox");
        }

UIObject GetNextPageButton ( ) [inline]

Definition at line 66 of file PagerControlTestPageElements.cs.

        {
            return GetElementWithinPager(ref NextPageButton, "NextPageButton");
        }

CheckBox GetNextPageButtonIsEnabledCheckBox ( ) [inline]

Definition at line 144 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NextPageButtonIsEnabledCheckBox, "NextPageButtonIsEnabledCheckBox");
        }

CheckBox GetNextPageButtonVisibilityCheckBox ( ) [inline]

Definition at line 120 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NextPageButtonVisibilityCheckBox, "NextPageButtonVisibilityCheckBox");
        }

ComboBox GetNextPageButtonVisibilityComboBox ( ) [inline]

Definition at line 90 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NextPageButtonVisibilityComboBox, "NextPageButtonVisibilityComboBox");
        }

CheckBox GetNumberBoxIsEnabledCheckBox ( ) [inline]

Definition at line 162 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NumberBoxIsEnabledCheckBox, "NumberBoxIsEnabledCheckBox");
        }

CheckBox GetNumberBoxVisibilityCheckBox ( ) [inline]

Definition at line 156 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NumberBoxVisibilityCheckBox, "NumberBoxVisibilityCheckBox");
        }

Button GetNumberOfPagesSetterButton ( ) [inline]

Definition at line 210 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NumberOfPagesSetterButton, "NumberOfPagesSetterButton");
        }

TextBlock GetNumberOfPagesTextBlock ( ) [inline]

Definition at line 204 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NumberOfPagesTextBlock, "NumberOfPagesTextBlock");
        }

UIObject GetNumberPanelButton ( string elementName ) [inline]

Definition at line 42 of file PagerControlTestPageElements.cs.

        {
            foreach (var element in GetPagerControl().Children)
            {
                if (element.Name == elementName)
                {
                    return element;
                }
            }
            return null;
        }

TextBlock GetNumberPanelContentTextBlock ( ) [inline]

Definition at line 186 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NumberPanelContentTextBlock, "NumberPanelContentTextBlock");
        }

CheckBox GetNumberPanelVisibilityCheckBox ( ) [inline]

Definition at line 180 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref NumberPanelVisibilityCheckBox, "NumberPanelVisibilityCheckBox");
        }

ComboBox GetPagerComboBox ( ) [inline]

Definition at line 30 of file PagerControlTestPageElements.cs.

        {
            if (PagerComboBox == null)
            {
                UIObject uiObject = null;
                GetElementWithinPager(ref uiObject, "ComboBoxDisplay");
                PagerComboBox = new ComboBox(uiObject);
            }
            return PagerComboBox;
        }

UIObject GetPagerControl ( ) [inline]

Definition at line 18 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref PagerControl, "TestPager");
        }

UIObject GetPagerNumberBox ( ) [inline]

Definition at line 24 of file PagerControlTestPageElements.cs.

        {
            return GetElementWithinPager(ref PagerNumberBox, "NumberBoxDisplay");
        }

UIObject GetPreviousPageButton ( ) [inline]

Definition at line 60 of file PagerControlTestPageElements.cs.

        {
            return GetElementWithinPager(ref PreviousPageButton, "PreviousPageButton");
        }

CheckBox GetPreviousPageButtonIsEnabledCheckBox ( ) [inline]

Definition at line 138 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref PreviousPageButtonIsEnabledCheckBox, "PreviousPageButtonIsEnabledCheckBox");
        }

CheckBox GetPreviousPageButtonVisibilityCheckBox ( ) [inline]

Definition at line 114 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref PreviousPageButtonVisibilityCheckBox, "PreviousPageButtonVisibilityCheckBox");
        }

ComboBox GetPreviousPageButtonVisibilityComboBox ( ) [inline]

Definition at line 84 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref PreviousPageButtonVisibilityComboBox, "PreviousPageButtonVisibilityComboBox");
        }

TextBlock GetPreviousPageTextBlock ( ) [inline]

Definition at line 222 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref PreviousPageTextBlock, "PreviousPageTextBlock");
        }

Button GetUpdateMarginTextBlockButton ( ) [inline]

Definition at line 192 of file PagerControlTestPageElements.cs.

        {
            return GetElement(ref UpdateMarginTextBlockButton, "UpdateMarginTextBlockButton");
        }

Member Data Documentation

Button CheckIfButtonsHiddenButton [private]

Definition at line 238 of file PagerControlTestPageElements.cs.

TextBlock CheckIfButtonsHiddenLabel [private]

Definition at line 243 of file PagerControlTestPageElements.cs.

CheckBox ComboBoxIsEnabledCheckBox [private]

Definition at line 178 of file PagerControlTestPageElements.cs.

CheckBox ComboBoxVisibilityCheckBox [private]

Definition at line 172 of file PagerControlTestPageElements.cs.

TextBlock CurrentPageIdentifierLeftMarginTextBlock [private]

Definition at line 202 of file PagerControlTestPageElements.cs.

TextBlock CurrentPageTextBlock [private]

Definition at line 220 of file PagerControlTestPageElements.cs.

ComboBox DisplayModeComboBox [private]

Definition at line 106 of file PagerControlTestPageElements.cs.

Button EnterInfinityModeButton [private]

Definition at line 249 of file PagerControlTestPageElements.cs.

UIObject FirstPageButton [private]

Definition at line 58 of file PagerControlTestPageElements.cs.

CheckBox FirstPageButtonIsEnabledCheckBox [private]

Definition at line 136 of file PagerControlTestPageElements.cs.

CheckBox FirstPageButtonVisibilityCheckBox [private]

Definition at line 112 of file PagerControlTestPageElements.cs.

ComboBox FirstPageButtonVisibilityComboBox [private]

Definition at line 82 of file PagerControlTestPageElements.cs.

Button IncreaseNumberOfPagesButton [private]

Definition at line 232 of file PagerControlTestPageElements.cs.

UIObject LastPageButton [private]

Definition at line 76 of file PagerControlTestPageElements.cs.

CheckBox LastPageButtonIsEnabledCheckBox [private]

Definition at line 154 of file PagerControlTestPageElements.cs.

CheckBox LastPageButtonVisibilityCheckBox [private]

Definition at line 130 of file PagerControlTestPageElements.cs.

ComboBox LastPageButtonVisibilityComboBox [private]

Definition at line 100 of file PagerControlTestPageElements.cs.

UIObject NextPageButton [private]

Definition at line 70 of file PagerControlTestPageElements.cs.

CheckBox NextPageButtonIsEnabledCheckBox [private]

Definition at line 148 of file PagerControlTestPageElements.cs.

CheckBox NextPageButtonVisibilityCheckBox [private]

Definition at line 124 of file PagerControlTestPageElements.cs.

ComboBox NextPageButtonVisibilityComboBox [private]

Definition at line 94 of file PagerControlTestPageElements.cs.

CheckBox NumberBoxIsEnabledCheckBox [private]

Definition at line 166 of file PagerControlTestPageElements.cs.

CheckBox NumberBoxVisibilityCheckBox [private]

Definition at line 160 of file PagerControlTestPageElements.cs.

Button NumberOfPagesSetterButton [private]

Definition at line 214 of file PagerControlTestPageElements.cs.

TextBlock NumberOfPagesTextBlock [private]

Definition at line 208 of file PagerControlTestPageElements.cs.

TextBlock NumberPanelContentTextBlock [private]

Definition at line 190 of file PagerControlTestPageElements.cs.

CheckBox NumberPanelVisibilityCheckBox [private]

Definition at line 184 of file PagerControlTestPageElements.cs.

ComboBox PagerComboBox [private]

Definition at line 40 of file PagerControlTestPageElements.cs.

UIObject PagerControl [private]

Definition at line 22 of file PagerControlTestPageElements.cs.

UIObject PagerNumberBox [private]

Definition at line 28 of file PagerControlTestPageElements.cs.

UIObject PreviousPageButton [private]

Definition at line 64 of file PagerControlTestPageElements.cs.

CheckBox PreviousPageButtonIsEnabledCheckBox [private]

Definition at line 142 of file PagerControlTestPageElements.cs.

CheckBox PreviousPageButtonVisibilityCheckBox [private]

Definition at line 118 of file PagerControlTestPageElements.cs.

ComboBox PreviousPageButtonVisibilityComboBox [private]

Definition at line 88 of file PagerControlTestPageElements.cs.

TextBlock PreviousPageTextBlock [private]

Definition at line 226 of file PagerControlTestPageElements.cs.

Button UpdateMarginTextBlockButton [private]

Definition at line 196 of file PagerControlTestPageElements.cs.

The documentation for this class was generated from the following file:
  • PagerControl/InteractionTests/PagerControlTestPageElements.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • PagerControlTests
Public Member Functions | Static Public Member Functions

PagerControlTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::PagerControlTestBase.

List of all members.

Public Member Functions

void | AutoDisplayChangingPageTest ()
void | ChangingDisplayModeTest ()
void | ComboBoxDisplayChangingPageTest ()
void | FirstPageButtonChangingPageTest ()
void | FirstPageButtonVisibilityOptionsTest ()
void | LastPageButtonChangingPageTest ()
void | LastPageButtonVisibilityOptionsTest ()
void | NextPageButtonChangingPageTest ()
void | NextPageButtonVisibilityOptionsTest ()
void | NumberBoxDisplayChangingPageTest ()
void | NumberBoxInfinityModeTest ()
void | NumberPanelChangingPageTest ()
void | NumberPanelChangingPageTest2 ()
void | NumberPanelInfiniteItemsTest ()
void | PreviousPageButtonChangingPageTest ()
void | PreviousPageButtonVisibilityOptionsTest ()
void | TestCleanup ()
void | VerifyAxeScanPasses ()
void | VerifyButtonVisibilitySetInXAMLApplied ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 16 of file PagerControlTests.cs.

Member Function Documentation

void AutoDisplayChangingPageTest ( ) [inline]

Definition at line 144 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();
                VerifyPageChanged(0);

                SetAutoDisplayMode();
                VerifyAutoDisplayMode();

                SelectValueInPagerComboBox(2);
                VerifyPageChanged(2);

                SelectValueInPagerComboBox(4);
                VerifyPageChanged(4);

                SelectValueInPagerComboBox(0);
                VerifyPageChanged(0);
            }
        }

void ChangingDisplayModeTest ( ) [inline]

Definition at line 503 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();
                SetAutoDisplayMode();
                VerifyAutoDisplayMode();

                SetComboBoxDisplayMode();
                VerifyComboBoxDisplayMode();

                SetNumberBoxDisplayMode();
                VerifyNumberBoxDisplayMode();

                SetNumberPanelDisplayMode();
                VerifyNumberPanelDisplayMode();

                SetAutoDisplayMode();
                VerifyAutoDisplayMode();

                SetNumberBoxDisplayMode();
                VerifyNumberBoxDisplayMode();

                SetNumberPanelDisplayMode();
                VerifyNumberPanelDisplayMode();

                SetComboBoxDisplayMode();
                VerifyComboBoxDisplayMode();

                SetAutoDisplayMode();
                VerifyAutoDisplayMode();

                SetNumberPanelDisplayMode();
                VerifyNumberPanelDisplayMode();

                ChangeNumberOfPages();
                VerifyNumberOfPages("100");

                SetAutoDisplayMode();
                VerifyAutoDisplayMode();

                ChangeNumberOfPages();
                VerifyNumberOfPages("5");

                VerifyAutoDisplayMode();

                IncrementNumberOfPages(4);
                VerifyNumberOfPages("9");

                VerifyAutoDisplayMode();

                IncrementNumberOfPages(1);
                VerifyNumberOfPages("10");

                VerifyAutoDisplayMode();

                IncrementNumberOfPages(1);
                VerifyNumberOfPages("11");

                VerifyAutoDisplayMode();
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 24 of file PagerControlTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ComboBoxDisplayChangingPageTest ( ) [inline]

Definition at line 121 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();
                VerifyPageChanged(0);

                SetComboBoxDisplayMode();
                VerifyComboBoxDisplayMode();

                SelectValueInPagerComboBox(2);
                VerifyPageChanged(2);

                SelectValueInPagerComboBox(4);
                VerifyPageChanged(4);

                SelectValueInPagerComboBox(0);
                VerifyPageChanged(0);
            }
        }

void FirstPageButtonChangingPageTest ( ) [inline]

Definition at line 384 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();
                VerifyPageChanged(0);
                InputHelper.LeftClick(elements.GetLastPageButton());

                InputHelper.LeftClick(elements.GetFirstPageButton());
                VerifyPageChanged(0);

                InputHelper.LeftClick(elements.GetNextPageButton());

                InputHelper.LeftClick(elements.GetFirstPageButton());
                VerifyPageChanged(0);
            }
        }

void FirstPageButtonVisibilityOptionsTest ( ) [inline]

Definition at line 475 of file PagerControlTests.cs.

        {
            ButtonVisibilityOptionsTest(buttonNamePrefix: "First");
        }

void LastPageButtonChangingPageTest ( ) [inline]

Definition at line 456 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();
                VerifyPageChanged(0);
                InputHelper.LeftClick(elements.GetLastPageButton());
                VerifyPageChanged(4);

                InputHelper.LeftClick(elements.GetFirstPageButton());
                InputHelper.LeftClick(elements.GetNextPageButton());

                InputHelper.LeftClick(elements.GetLastPageButton());
                VerifyPageChanged(4);
            }
        }

void LastPageButtonVisibilityOptionsTest ( ) [inline]

Definition at line 496 of file PagerControlTests.cs.

        {
            ButtonVisibilityOptionsTest(buttonNamePrefix: "Last");
        }

void NextPageButtonChangingPageTest ( ) [inline]

Definition at line 434 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();
                VerifyPageChanged(0);
                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(1);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(2);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(3);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(4);
            }
        }

void NextPageButtonVisibilityOptionsTest ( ) [inline]

Definition at line 489 of file PagerControlTests.cs.

        {
            ButtonVisibilityOptionsTest(buttonNamePrefix: "Next");
        }

void NumberBoxDisplayChangingPageTest ( ) [inline]

Definition at line 47 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();

                SetNumberBoxDisplayMode();
                VerifyNumberBoxDisplayMode();
                VerifyPageChanged(0);

                SendValueToNumberBox("3"); // Note: PagerControl displays numbers starting at 1 but the page changed event sends 0-based numbers
                VerifyPageChanged(2);

                SendValueToNumberBox("1");
                VerifyPageChanged(0);

                SendValueToNumberBox("5");
                VerifyPageChanged(4);

                SendValueToNumberBox("2");
                VerifyPageChanged(1);

                SendValueToNumberBox("100");
                Verify.AreEqual("5", FindTextBox(elements.GetPagerNumberBox()).GetText()); // If over max, value should be clamped down to the max.
                VerifyPageChanged(4);

                SendValueToNumberBox("-100");
                Verify.AreEqual("1", FindTextBox(elements.GetPagerNumberBox()).GetText()); // If under min, value should be clamped up to the min.
                VerifyPageChanged(0);

            }
        }

void NumberBoxInfinityModeTest ( ) [inline]

Definition at line 82 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();

                SetNumberBoxDisplayMode();
                VerifyNumberBoxDisplayMode();
                VerifyPageChanged(0);
                elements.GetEnterInfinityModeButton().Click();

                SendValueToNumberBox("3"); // Note: PagerControl displays numbers starting at 1 but the page changed event sends 0-based numbers
                VerifyPageChanged(2);

                SendValueToNumberBox("1");
                VerifyPageChanged(0);

                SendValueToNumberBox("5");
                VerifyPageChanged(4);

                SendValueToNumberBox("2");
                VerifyPageChanged(1);

                SendValueToNumberBox("100");
                Verify.AreEqual("100", FindTextBox(elements.GetPagerNumberBox()).GetText());
                VerifyPageChanged(99);

                SendValueToNumberBox("10000");
                Verify.AreEqual("10000", FindTextBox(elements.GetPagerNumberBox()).GetText());
                VerifyPageChanged(9999);

                SendValueToNumberBox("-100");
                Verify.AreEqual("1", FindTextBox(elements.GetPagerNumberBox()).GetText());
                VerifyPageChanged(0);
            }
        }

void NumberPanelChangingPageTest ( ) [inline]

Definition at line 167 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();

                VerifyPageChanged(0);

                SetNumberPanelDisplayMode();
                VerifyNumberPanelDisplayMode();

                SelectPageInNumberPanel(2);
                VerifyPageChanged(1);
                VerifyNumberPanelContent("12345");

                SelectPageInNumberPanel(5);
                VerifyPageChanged(4);
                VerifyNumberPanelContent("12345");

                SelectPageInNumberPanel(4);
                VerifyPageChanged(3);
                VerifyNumberPanelContent("12345");

                SelectPageInNumberPanel(3);
                VerifyPageChanged(2);
                VerifyNumberPanelContent("12345");

                ChangeNumberOfPages();
                VerifyNumberOfPages("100");

                SelectPageInNumberPanel(1);
                VerifyPageChanged(0);
                VerifyNumberPanelContent("12345More100");

                SelectPageInNumberPanel(2);
                VerifyPageChanged(1);
                VerifyNumberPanelContent("12345More100");

                SelectPageInNumberPanel(3);
                VerifyPageChanged(2);
                VerifyNumberPanelContent("12345More100");

                SelectPageInNumberPanel(4);
                VerifyPageChanged(3);
                VerifyNumberPanelContent("12345More100");

                SelectPageInNumberPanel(5);
                VerifyPageChanged(4);
                VerifyNumberPanelContent("1More456More100");

                SelectPageInNumberPanel(6);
                VerifyPageChanged(5);
                VerifyNumberPanelContent("1More567More100");

                SelectPageInNumberPanel(100);
                VerifyPageChanged(99);

                VerifyNumberPanelContent("1More96979899100");

                SelectPageInNumberPanel(99);
                VerifyPageChanged(98);
                VerifyNumberPanelContent("1More96979899100");

                SelectPageInNumberPanel(98);
                VerifyPageChanged(97);
                VerifyNumberPanelContent("1More96979899100");

                SelectPageInNumberPanel(97);
                VerifyPageChanged(96);
                VerifyNumberPanelContent("1More96979899100");

                SelectPageInNumberPanel(96);
                VerifyPageChanged(95);
                VerifyNumberPanelContent("1More959697More100");
            }
        }

void NumberPanelChangingPageTest2 ( ) [inline]

Definition at line 247 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();

                VerifyPageChanged(0);

                SetNumberPanelDisplayMode();
                VerifyNumberPanelDisplayMode();

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(1);
                VerifyNumberPanelContent("12345");

                InputHelper.LeftClick(elements.GetLastPageButton());
                VerifyPageChanged(4);
                VerifyNumberPanelContent("12345");

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(3);
                VerifyNumberPanelContent("12345");

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(2);
                VerifyNumberPanelContent("12345");

                ChangeNumberOfPages();
                VerifyNumberOfPages("100");

                InputHelper.LeftClick(elements.GetFirstPageButton());
                VerifyPageChanged(0);
                VerifyNumberPanelContent("12345More100");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(1);
                VerifyNumberPanelContent("12345More100");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(2);
                VerifyNumberPanelContent("12345More100");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(3);
                VerifyNumberPanelContent("12345More100");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(4);
                VerifyNumberPanelContent("1More456More100");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(5);
                VerifyNumberPanelContent("1More567More100");

                InputHelper.LeftClick(elements.GetLastPageButton());
                VerifyPageChanged(99);

                VerifyNumberPanelContent("1More96979899100");

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(98);
                VerifyNumberPanelContent("1More96979899100");

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(97);
                VerifyNumberPanelContent("1More96979899100");

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(96);
                VerifyNumberPanelContent("1More96979899100");

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(95);
                VerifyNumberPanelContent("1More959697More100");
            }
        }

void NumberPanelInfiniteItemsTest ( ) [inline]

Definition at line 326 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();

                VerifyPageChanged(0);

                SetNumberPanelDisplayMode();
                VerifyNumberPanelDisplayMode();

                elements.GetEnterInfinityModeButton().Click();

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(1);
                VerifyNumberPanelContent("12345");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(2);
                VerifyNumberPanelContent("12345");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(3);
                VerifyNumberPanelContent("1More345");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(4);
                VerifyNumberPanelContent("1More456");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(5);
                VerifyNumberPanelContent("1More567");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(6);
                VerifyNumberPanelContent("1More678");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(7);
                VerifyNumberPanelContent("1More789");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(8);
                VerifyNumberPanelContent("1More8910");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(9);
                VerifyNumberPanelContent("1More91011");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageChanged(10);
                VerifyNumberPanelContent("1More101112");

            }
        }

void PreviousPageButtonChangingPageTest ( ) [inline]

Definition at line 404 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();
                VerifyPageChanged(0);
                InputHelper.LeftClick(elements.GetNextPageButton());

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(0);

                InputHelper.LeftClick(elements.GetLastPageButton());

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(3);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(2);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(1);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageChanged(0);

            }
        }

void PreviousPageButtonVisibilityOptionsTest ( ) [inline]

Definition at line 482 of file PagerControlTests.cs.

        {
            ButtonVisibilityOptionsTest(buttonNamePrefix: "Previous");
        }

void TestCleanup ( ) [inline]

Definition at line 29 of file PagerControlTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 37 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

void VerifyButtonVisibilitySetInXAMLApplied ( ) [inline]

Definition at line 568 of file PagerControlTests.cs.

        {
            using (var setup = new TestSetupHelper("PagerControl Tests"))
            {
                elements = new PagerControlTestPageElements();

                // Invoke button
                elements.GetCheckIfButtonsHiddenButton().Click();

                Wait.ForIdle();

                // Check result
                Verify.AreEqual("Passed", elements.GetCheckIfButtonsHiddenLabel().GetText(), "Not all buttons where hidden and as such, the test result was not 'Passed'");
            }
        }

The documentation for this class was generated from the following file:
  • PagerControl/InteractionTests/PagerControlTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ParallaxViewTests
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions

ParallaxViewTests Class Reference

List of all members.

Public Member Functions

void | ChangeSourceAndTargetPropertiesUsingScrollPresenter ()
void | ChangeSourceAndTargetPropertiesUsingScrollViewer ()
void | TargetListViewBackground ()
void | TargetListViewHeader ()
void | TargetListViewItem ()
void | TestCleanup ()
void | UseTextControlSource ()
void | UseVirtualizingStackPanelSource ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Types

enum | SourceType { ScrollViewer, ScrollPresenter }

Private Member Functions

void | ChangeSourceAndTargetProperties (SourceType sourceType)
void | SelectSource (string sourceName)
void | SelectTarget (string targetName)
void | WriteInTextBox (string textBoxName, string text)

Detailed Description

Definition at line 21 of file ParallaxViewTests.cs.

Member Enumeration Documentation

enum SourceType [private]
Enumerator:
ScrollViewer
ScrollPresenter

Definition at line 23 of file ParallaxViewTests.cs.

        {
            ScrollViewer,
            ScrollPresenter,
        }

Member Function Documentation

void ChangeSourceAndTargetProperties ( SourceType sourceType ) [inline, private]

Definition at line 228 of file ParallaxViewTests.cs.

        {
            Log.Comment("Selecting ParallaxView tests");

            using (var setup = new TestSetupHelper("ParallaxView Tests"))
            {
                Log.Comment("Navigating to DynamicPage");
                UIObject navigateToDynamicUIObject = FindElement.ByName("navigateToDynamic");
                Verify.IsNotNull(navigateToDynamicUIObject, "Verifying that navigateToDynamic Button was found");

                Button navigateToDynamicButton = new Button(navigateToDynamicUIObject);
                navigateToDynamicButton.Invoke();
                Wait.ForIdle();

                string sourceName = sourceType == SourceType.ScrollViewer ? "scrollViewer" : "scrollPresenter";

                SelectSource(sourceName);
                Wait.ForIdle();

                SelectTarget("img");
                Wait.ForIdle();

                WriteInTextBox("txtVerticalShift", "100.0");

                Log.Comment("Retrieving SetVerticalShift Button");
                Button setVerticalShiftButton = new Button(FindElement.ByName("btnSetVerticalShift"));

                Log.Comment("Invoke SetVerticalShift Button");
                setVerticalShiftButton.Invoke();

                Log.Comment("Retrieving " + sourceName);
                UIObject sourceUIObject = FindElement.ByName(sourceName);
                Verify.IsNotNull(sourceUIObject, "Verifying that " + sourceName + " was found");

                Log.Comment("Tapping " + sourceName);
                InputHelper.Tap(sourceUIObject);

                Log.Comment("Panning " + sourceName);
                InputHelper.Pan(sourceUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Returning to the main ParallaxView test page");
                TestSetupHelper.GoBack();
            }
        }

void ChangeSourceAndTargetPropertiesUsingScrollPresenter ( ) [inline]

Definition at line 223 of file ParallaxViewTests.cs.

        {
            ChangeSourceAndTargetProperties(SourceType.ScrollPresenter);
        }

void ChangeSourceAndTargetPropertiesUsingScrollViewer ( ) [inline]

Definition at line 216 of file ParallaxViewTests.cs.

        {
            ChangeSourceAndTargetProperties(SourceType.ScrollViewer);
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 34 of file ParallaxViewTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void SelectSource ( string sourceName ) [inline, private]

Definition at line 274 of file ParallaxViewTests.cs.

        {
            Log.Comment("Retrieving Source ComboBox");
            ComboBox cmbSource = new ComboBox(FindElement.ByName("cmbSource"));

            Log.Comment("Changing the Source ComboBox selection to {0}", sourceName);
            cmbSource.SelectItemByName(sourceName);

            ComboBoxItem selectedComboBoxItem = cmbSource.Selection[0];
            Log.Comment("Source ComboBox selection is now {0}", selectedComboBoxItem.Name);
        }

void SelectTarget ( string targetName ) [inline, private]

Definition at line 286 of file ParallaxViewTests.cs.

        {
            Log.Comment("Retrieving Target ComboBox");
            ComboBox cmbTargetElement = new ComboBox(FindElement.ByName("cmbTargetElement"));

            Log.Comment("Changing the Target ComboBox selection to {0}", targetName);
            cmbTargetElement.SelectItemByName(targetName);

            ComboBoxItem selectedComboBoxItem = cmbTargetElement.Selection[0];
            Log.Comment("Target ComboBox selection is now {0}", selectedComboBoxItem.Name);
        }

void TargetListViewBackground ( ) [inline]

Definition at line 47 of file ParallaxViewTests.cs.

        {
            Log.Comment("Selecting ParallaxView tests");

            using (var setup = new TestSetupHelper("ParallaxView Tests"))
            {
                Log.Comment("Navigating to ListViewBackgroundPage");
                UIObject navigateToListViewBackgroundUIObject = FindElement.ByName("navigateToListViewBackground");
                Verify.IsNotNull(navigateToListViewBackgroundUIObject, "Verifying that navigateToListViewBackground Button was found");

                Button navigateToListViewBackgroundButton = new Button(navigateToListViewBackgroundUIObject);
                navigateToListViewBackgroundButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving ListView");
                UIObject ingredientListUIObject = FindElement.ByName("IngredientList");
                Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView was found");

                Log.Comment("Panning ListView");
                InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Returning to the main ParallaxView test page");
                TestSetupHelper.GoBack();
            }
        }

void TargetListViewHeader ( ) [inline]

Definition at line 105 of file ParallaxViewTests.cs.

        {
            Log.Comment("Selecting ParallaxView tests");

            using (var setup = new TestSetupHelper("ParallaxView Tests"))
            {
                Log.Comment("Navigating to ListViewHeaderPage");
                UIObject navigateToListViewHeaderUIObject = FindElement.ByName("navigateToListViewHeader");
                Verify.IsNotNull(navigateToListViewHeaderUIObject, "Verifying that navigateToListViewHeader Button was found");

                Button navigateToListViewHeaderButton = new Button(navigateToListViewHeaderUIObject);
                navigateToListViewHeaderButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving ListView #1");
                UIObject ingredientListUIObject = FindElement.ByName("IngredientList1");
                Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView #1 was found");

                Log.Comment("Panning ListView #1");
                InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Retrieving ListView #2");
                ingredientListUIObject = FindElement.ByName("IngredientList2");
                Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView #2 was found");

                Log.Comment("Panning ListView #2");
                InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Retrieving ListView #3");
                ingredientListUIObject = FindElement.ByName("IngredientList3");
                Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView #3 was found");

                Log.Comment("Panning ListView #3");
                InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Returning to the main ParallaxView test page");
                TestSetupHelper.GoBack();
            }
        }

void TargetListViewItem ( ) [inline]

Definition at line 76 of file ParallaxViewTests.cs.

        {
            Log.Comment("Selecting ParallaxView tests");

            using (var setup = new TestSetupHelper("ParallaxView Tests"))
            {
                Log.Comment("Navigating to ListViewItemPage");
                UIObject navigateToListViewItemUIObject = FindElement.ByName("navigateToListViewItem");
                Verify.IsNotNull(navigateToListViewItemUIObject, "Verifying that navigateToListViewItem Button was found");

                Button navigateToListViewItemButton = new Button(navigateToListViewItemUIObject);
                navigateToListViewItemButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving ListView");
                UIObject ingredientListUIObject = FindElement.ByName("IngredientList");
                Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView was found");

                Log.Comment("Panning ListView");
                InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Returning to the main ParallaxView test page");
                TestSetupHelper.GoBack();
            }
        }

void TestCleanup ( ) [inline]

Definition at line 40 of file ParallaxViewTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void UseTextControlSource ( ) [inline]

Definition at line 180 of file ParallaxViewTests.cs.

        {
            Log.Comment("Selecting ParallaxView tests");

            using (var setup = new TestSetupHelper("ParallaxView Tests"))
            {
                Log.Comment("Navigating to TextPage");
                UIObject navigateToTextUIObject = FindElement.ByName("navigateToText");
                Verify.IsNotNull(navigateToTextUIObject, "Verifying that navigateToText Button was found");

                Button navigateToTextButton = new Button(navigateToTextUIObject);
                navigateToTextButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving TextBox");
                UIObject textBoxUIObject = FindElement.ByName("textBox");
                Verify.IsNotNull(textBoxUIObject, "Verifying that textBox was found");

                Log.Comment("Retrieving RichEditBox");
                UIObject richEditBoxUIObject = FindElement.ByName("richEditBox");
                Verify.IsNotNull(richEditBoxUIObject, "Verifying that RichEditBox was found");

                Log.Comment("Tapping RichEditBox");
                InputHelper.Tap(richEditBoxUIObject);

                Log.Comment("Panning TextBox");
                InputHelper.Pan(textBoxUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Returning to the main ParallaxView test page");
                TestSetupHelper.GoBack();
            }
        }

void UseVirtualizingStackPanelSource ( ) [inline]

Definition at line 150 of file ParallaxViewTests.cs.

        {
            Log.Comment("Selecting ParallaxView tests");

            using (var setup = new TestSetupHelper("ParallaxView Tests"))
            {
                Log.Comment("Navigating to VirtualizingStackPanelPage");
                UIObject navigateToVSPUIObject = FindElement.ByName("navigateToVSP");
                Verify.IsNotNull(navigateToVSPUIObject, "Verifying that navigateToVSP Button was found");

                Button navigateToVSPButton = new Button(navigateToVSPUIObject);
                navigateToVSPButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving ListView");
                UIObject ingredientListUIObject = FindElement.ByName("IngredientList");
                Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView was found");

                Log.Comment("Panning ListView");
                InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
                Wait.ForIdle();

                Log.Comment("Returning to the main ParallaxView test page");
                TestSetupHelper.GoBack();
            }
        }

void WriteInTextBox | ( | string | textBoxName,
 |  | string | text |
 | ) |  |  | [inline, private]

Definition at line 298 of file ParallaxViewTests.cs.

        {
            Log.Comment("Retrieve text box with name '{0}'.", textBoxName);
            Edit textBox = new Edit(FindElement.ById(textBoxName));

            KeyboardHelper.EnterText(textBox, text);
        }

The documentation for this class was generated from the following file:
  • ParallaxView/InteractionTests/ParallaxViewTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • PersonPictureTests
Public Member Functions | Static Public Member Functions | Private Member Functions

PersonPictureTests Class Reference

List of all members.

Public Member Functions

void | BasicInteractionTest ()
void | ControlSizing ()
void | DependencyPropertyOrdering ()
void | ImageLoading ()
void | ScrollPeopleGroupedList ()
void | ScrollPeopleList ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ScrollPeopleListPrivate (string listViewId)
void | WriteInTextBox (string textBoxName, string s)

Detailed Description

Definition at line 23 of file PersonPictureTests.cs.

Member Function Documentation

void BasicInteractionTest ( ) [inline]

Definition at line 42 of file PersonPictureTests.cs.

        {
            using (var setup = new TestSetupHelper("PersonPicture Tests"))
            {
                TextBlock PersonPictureInitialBlock = new TextBlock(FindElement.ByName("InitialsTextBlock"));

                // Ensure the person glyph is shown
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "\uE77B");

                // Ensure the group glyph is shown
                CheckBox cb = new CheckBox(FindElement.ByName("GroupCheckBox"));
                cb.Check();
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "\uE716");
                cb.Uncheck();

                // Ensure the initals are shown
                TextBlock tb = new TextBlock(FindElement.ByName("InitialTextBox"));
                WriteInTextBox("InitialTextBox", "AS");
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "AS");
                WriteInTextBox("InitialTextBox", "");

                // Ensure display name is converted to initials as expected.
                TextBlock tb1 = new TextBlock(FindElement.ByName("DisplayNameTextBox"));
                WriteInTextBox("DisplayNameTextBox", "Some Name");
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "SN");

                WriteInTextBox("DisplayNameTextBox", "Another Name (OSG)");
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "AN");

                // Ensure the badge number is shown
                TextBlock tb2 = new TextBlock(FindElement.ByName("BadgeNumberTextBox"));
                WriteInTextBox("BadgeNumberTextBox", "1");
                TextBlock PersonPictureBadgeNumberBlock = new TextBlock(FindElement.ByName("BadgeNumberTextBlock"));
                Verify.AreEqual(PersonPictureBadgeNumberBlock.DocumentText, "1");

                // Ensure the badge number is shown 99+
                WriteInTextBox("BadgeNumberTextBox", "125");
                Verify.AreEqual(PersonPictureBadgeNumberBlock.DocumentText, "99+");
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file PersonPictureTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ControlSizing ( ) [inline]

Definition at line 84 of file PersonPictureTests.cs.

        {
            using (var setup = new TestSetupHelper("PersonPicture Tests"))
            {
                RangeValueSlider heightSlider = new RangeValueSlider(FindElement.ByName("HeightSlider"));
                RangeValueSlider widthSlider = new RangeValueSlider(FindElement.ByName("WidthSlider"));
                CheckBox cb = new CheckBox(FindElement.ByName("DimensionsMatch"));

                using (var waiter = cb.GetToggledWaiter())
                {
                    // Confirm expected initial state
                    cb.Toggle();
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.Off);
                    waiter.Reset();

                    // Update height and verify the width changes to match
                    heightSlider.SetValue(85);
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.On);
                    waiter.Reset();

                    // Reset to unchecked state
                    cb.Toggle();
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.Off);
                    waiter.Reset();

                    // Update width and verify the height changes to match
                    widthSlider.SetValue(115);
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.On);
                    waiter.Reset();
                }
            }
        }

void DependencyPropertyOrdering ( ) [inline]

Definition at line 122 of file PersonPictureTests.cs.

        {
            using (var setup = new TestSetupHelper("PersonPicture Tests"))
            {
                TextBlock PersonPictureInitialBlock = new TextBlock(FindElement.ByName("InitialsTextBlock"));
                Button SetContactBtn = new Button(FindElement.ByName("ContactBtn"));
                Button ClearContactBtn = new Button(FindElement.ByName("ClearContactBtn"));

                // Set all properties that can generate initials.
                WriteInTextBox("InitialTextBox", "AL");
                WriteInTextBox("DisplayNameTextBox", "Some Name");
                SetContactBtn.Invoke(); // Contact.DisplayName = "Test Contact"

                // Clear them in priority order and verify displayed initials.
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "AL");
                WriteInTextBox("InitialTextBox", "");
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "SN");
                WriteInTextBox("DisplayNameTextBox", "");
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "TC");
                ClearContactBtn.Invoke();
                Verify.AreEqual(PersonPictureInitialBlock.DocumentText, "\uE77B");
            }
        }

void ImageLoading ( ) [inline]

Definition at line 147 of file PersonPictureTests.cs.

        {
            using (var setup = new TestSetupHelper("PersonPicture Tests"))
            {
                Button SetContactImageBtn = new Button(FindElement.ByName("ContactImageBtn"));
                Button ClearContactBtn = new Button(FindElement.ByName("ClearContactBtn"));
                Button SetImageBtn = new Button(FindElement.ByName("ImageBtn"));
                Button ClearImageBtn = new Button(FindElement.ByName("ClearImageBtn"));
                CheckBox cb = new CheckBox(FindElement.ByName("BgEllipseFilled"));

                Verify.AreEqual(cb.ToggleState, ToggleState.Off);

                using (var waiter = cb.GetToggledWaiter())
                {
                    // Set/Clear contact and ensure contact image is shown/cleared.
                    SetContactImageBtn.Invoke();
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.On);
                    waiter.Reset();
                    ClearContactBtn.Invoke();
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.Off);
                    waiter.Reset();

                    // Set/Clear image and ensure image is shown/cleared.
                    SetImageBtn.Invoke();
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.On);
                    waiter.Reset();
                    ClearImageBtn.Invoke();
                    waiter.Wait();
                    Verify.AreEqual(cb.ToggleState, ToggleState.Off);
                    waiter.Reset();
                }
            }
        }

void ScrollPeopleGroupedList ( ) [inline]

Definition at line 194 of file PersonPictureTests.cs.

        {
            ScrollPeopleListPrivate("PeopleGLV");
        }

void ScrollPeopleList ( ) [inline]

Definition at line 186 of file PersonPictureTests.cs.

        {
            ScrollPeopleListPrivate("PeopleLV");
        }

void ScrollPeopleListPrivate ( string listViewId ) [inline, private]

Definition at line 199 of file PersonPictureTests.cs.

        {
            using (var setup = new TestSetupHelper("PersonPicture Tests"))
            {
                Log.Comment("Finding ListView");
                ListView peopleListView = new ListView(FindElement.ById(listViewId));
                Verify.IsNotNull(peopleListView, "ListView found");

                Log.Comment("Retrieving first ListView");
                ListViewItem firstLVI = peopleListView.AllItems[0];
                Verify.IsNotNull(firstLVI, "First ListViewItem retrieved");

                Log.Comment("Retrieving fifth ListView at index 4");
                ListViewItem fifthLVI = peopleListView.AllItems[4];
                Verify.IsNotNull(fifthLVI, "Fifth ListViewItem retrieved");

                Verify.IsFalse(firstLVI.IsOffscreen, "First item is on screen");
                Verify.IsTrue(fifthLVI.IsOffscreen, "Fifth item is off screen");

                firstLVI.SetFocus();
                Wait.ForIdle();

                AutomationElement firstItemAE = AutomationElement.FocusedElement;

                fifthLVI.SetFocus();
                Wait.ForIdle();

                AutomationElement fifthItemAE = AutomationElement.FocusedElement;

                Log.Comment("Scroll to the fifth item using the automation ScrollItemPattern");
                ScrollItemPattern fifthItemSIP = fifthItemAE.GetCurrentPattern(ScrollItemPattern.Pattern) as ScrollItemPattern;
                fifthItemSIP.ScrollIntoView();
                Wait.ForIdle();

                Verify.IsTrue(firstLVI.IsOffscreen, "First item is off screen");
                Verify.IsFalse(fifthLVI.IsOffscreen, "Fifth item is on screen");

                Log.Comment("Scroll back to the first item using the automation ScrollItemPattern");
                ScrollItemPattern firstItemSIP = firstItemAE.GetCurrentPattern(ScrollItemPattern.Pattern) as ScrollItemPattern;
                firstItemSIP.ScrollIntoView();
                Wait.ForIdle();

                Verify.IsFalse(firstLVI.IsOffscreen, "First item is on screen");
                Verify.IsTrue(fifthLVI.IsOffscreen, "Fifth item is off screen");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 36 of file PersonPictureTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void WriteInTextBox | ( | string | textBoxName,
 |  | string | s |
 | ) |  |  | [inline, private]

Definition at line 246 of file PersonPictureTests.cs.

        {
            Log.Comment("Retrieve text box with name '{0}'.", textBoxName);
            Edit textBox = new Edit(FindElement.ByName(textBoxName));

            if (string.IsNullOrEmpty(s))
            {
                s = "{BACKSPACE}";

                Log.Comment("Give it keyboard focus.");
                textBox.SetFocus();
                Wait.ForIdle();
                Log.Comment("Select its current text.");
                textBox.DocumentRange.Select();
                Wait.ForIdle();
                Log.Comment("Type '{0}'.", s);
                textBox.SendKeys(s);
                Wait.ForIdle();
            }
            else
            {
                KeyboardHelper.EnterText(textBox, s);
            }
        }

The documentation for this class was generated from the following file:
  • PersonPicture/InteractionTests/PersonPictureTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerElements Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • PipsPagerElements
Public Member Functions | Private Member Functions | Private Attributes

PipsPagerElements Class Reference

List of all members.

Public Member Functions

TextBlock | GetCurrentMaxVisualIndicatorsTextBlock ()
TextBlock | GetCurrentNumberOfPagesTextBlock ()
TextBlock | GetCurrentOrientationTextBlock ()
TextBlock | GetCurrentPageTextBlock ()
TextBlock | GetFocusedPageIndexTextBlock ()
TextBlock | GetHorizontalOrientationPipsPagerButtonHeightTextBlock ()
TextBlock | GetHorizontalOrientationPipsPagerButtonWidthTextBlock ()
ComboBox | GetMaxVisualIndicatorsComboBox ()
UIObject | GetNextPageButton ()
CheckBox | GetNextPageButtonIsEnabledCheckBox ()
CheckBox | GetNextPageButtonIsVisibleCheckBox ()
ComboBox | GetNextPageButtonVisibilityComboBox ()
ComboBox | GetNumberOfPagesComboBox ()
ComboBox | GetOrientationComboBox ()
UIObject | GetPipsPager ()
Button | GetPipsPagerButtonSizesButton ()
UIObject | GetPipWithPageNumber (string elementName)
UIObject | GetPreviousPageButton ()
CheckBox | GetPreviousPageButtonIsEnabledCheckBox ()
CheckBox | GetPreviousPageButtonIsVisibleCheckBox ()
ComboBox | GetPreviousPageButtonVisibilityComboBox ()
TextBlock | GetVerticalOrientationPipsPagerButtonHeightTextBlock ()
TextBlock | GetVerticalOrientationPipsPagerButtonWidthTextBlock ()
ComboBox | GetWrapModeComboBox ()

Private Member Functions

T | GetElement< T > (ref T element, string elementName)
T | GetElementWithinPager< T > (ref T element, string elementName)

Private Attributes

TextBlock | CurrentMaxVisualIndicatorsTextBlock
TextBlock | CurrentNumberOfPagesTextBlock
TextBlock | CurrentOrientationTextBlock
TextBlock | CurrentPageTextBlock
TextBlock | FocusedPageIndexTextBlock
TextBlock | HorizontalOrientationPipsPagerButtonHeightTextBlock
TextBlock | HorizontalOrientationPipsPagerButtonWidthTextBlock
ComboBox | MaxVisualIndicatorsComboBox
UIObject | NextPageButton
CheckBox | NextPageButtonIsEnabledCheckBox
CheckBox | NextPageButtonIsVisibleCheckBox
ComboBox | NextPageButtonVisibilityComboBox
ComboBox | NumberOfPagesComboBox
ComboBox | OrientationComboBox
UIObject | PipsPager
UIObject | PreviousPageButton
CheckBox | PreviousPageButtonIsEnabledCheckBox
CheckBox | PreviousPageButtonIsVisibleCheckBox
ComboBox | PreviousPageButtonVisibilityComboBox
Button | RetrievePipsPagerButtonSizesButton
TextBlock | VerticalOrientationPipsPagerButtonHeightTextBlock
TextBlock | VerticalOrientationPipsPagerButtonWidthTextBlock
ComboBox | WrapModeComboBox

Detailed Description

Definition at line 12 of file PipsPagerElements.cs.

Member Function Documentation

TextBlock GetCurrentMaxVisualIndicatorsTextBlock ( ) [inline]

Definition at line 105 of file PipsPagerElements.cs.

        {
            return GetElement(ref CurrentMaxVisualIndicatorsTextBlock, "CurrentMaxVisualIndicatorsTextBlock");
        }

TextBlock GetCurrentNumberOfPagesTextBlock ( ) [inline]

Definition at line 110 of file PipsPagerElements.cs.

        {
            return GetElement(ref CurrentNumberOfPagesTextBlock, "CurrentNumberOfPagesTextBlock");
        }

TextBlock GetCurrentOrientationTextBlock ( ) [inline]

Definition at line 115 of file PipsPagerElements.cs.

        {
            return GetElement(ref CurrentOrientationTextBlock, "CurrentOrientationTextBlock");
        }

TextBlock GetCurrentPageTextBlock ( ) [inline]

Definition at line 95 of file PipsPagerElements.cs.

        {
            return GetElement(ref CurrentPageTextBlock, "CurrentPageIndexTextBlock");
        }

T GetElement< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
T GetElementWithinPager< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
TextBlock GetFocusedPageIndexTextBlock ( ) [inline]

Definition at line 100 of file PipsPagerElements.cs.

        {
            return GetElement(ref FocusedPageIndexTextBlock, "FocusedPageIndexTextBlock");
        }

TextBlock GetHorizontalOrientationPipsPagerButtonHeightTextBlock ( ) [inline]

Definition at line 124 of file PipsPagerElements.cs.

        {
            return GetElement(ref HorizontalOrientationPipsPagerButtonHeightTextBlock, "HorizontalOrientationPipsPagerButtonHeightTextBlock");
        }

TextBlock GetHorizontalOrientationPipsPagerButtonWidthTextBlock ( ) [inline]

Definition at line 120 of file PipsPagerElements.cs.

        {
            return GetElement(ref HorizontalOrientationPipsPagerButtonWidthTextBlock, "HorizontalOrientationPipsPagerButtonWidthTextBlock");
        }

ComboBox GetMaxVisualIndicatorsComboBox ( ) [inline]

Definition at line 83 of file PipsPagerElements.cs.

        {
            return GetElement(ref MaxVisualIndicatorsComboBox, "TestPipsPagerMaxVisualIndicatorsComboBox");
        }

UIObject GetNextPageButton ( ) [inline]

Definition at line 46 of file PipsPagerElements.cs.

        {
            return GetElementWithinPager(ref NextPageButton, "NextPageButton");
        }

CheckBox GetNextPageButtonIsEnabledCheckBox ( ) [inline]

Definition at line 73 of file PipsPagerElements.cs.

        {
            return GetElement(ref NextPageButtonIsEnabledCheckBox, "NextPageButtonIsEnabledCheckBox");
        }

CheckBox GetNextPageButtonIsVisibleCheckBox ( ) [inline]

Definition at line 69 of file PipsPagerElements.cs.

        {
            return GetElement(ref NextPageButtonIsVisibleCheckBox, "NextPageButtonIsVisibleCheckBox");
        }

ComboBox GetNextPageButtonVisibilityComboBox ( ) [inline]

Definition at line 56 of file PipsPagerElements.cs.

        {
            return GetElement(ref NextPageButtonVisibilityComboBox, "NextPageButtonVisibilityComboBox");
        }

ComboBox GetNumberOfPagesComboBox ( ) [inline]

Definition at line 78 of file PipsPagerElements.cs.

        {
            return GetElement(ref NumberOfPagesComboBox, "TestPipsPagerNumberOfPagesComboBox");
        }

ComboBox GetOrientationComboBox ( ) [inline]

Definition at line 87 of file PipsPagerElements.cs.

        {
            return GetElement(ref OrientationComboBox, "TestPipsPagerOrientationComboBox");
        }

UIObject GetPipsPager ( ) [inline]

Definition at line 37 of file PipsPagerElements.cs.

        {
            return GetElement(ref PipsPager, "TestPipsPager");
        }

Button GetPipsPagerButtonSizesButton ( ) [inline]

Definition at line 137 of file PipsPagerElements.cs.

        {
            return GetElement(ref RetrievePipsPagerButtonSizesButton, "GetPipsPagersButtonSizesButton");
        }

UIObject GetPipWithPageNumber ( string elementName ) [inline]

Definition at line 142 of file PipsPagerElements.cs.

        {
            foreach (var element in GetPipsPager().Children)
            {
                if (element.Name == elementName)
                {
                    return element;
                }
            }
            return null;
        }

UIObject GetPreviousPageButton ( ) [inline]

Definition at line 41 of file PipsPagerElements.cs.

        {
            return GetElementWithinPager(ref PreviousPageButton, "PreviousPageButton");
        }

CheckBox GetPreviousPageButtonIsEnabledCheckBox ( ) [inline]

Definition at line 65 of file PipsPagerElements.cs.

        {
            return GetElement(ref PreviousPageButtonIsEnabledCheckBox, "PreviousPageButtonIsEnabledCheckBox");
        }

CheckBox GetPreviousPageButtonIsVisibleCheckBox ( ) [inline]

Definition at line 61 of file PipsPagerElements.cs.

        {
            return GetElement(ref PreviousPageButtonIsVisibleCheckBox, "PreviousPageButtonIsVisibleCheckBox");
        }

ComboBox GetPreviousPageButtonVisibilityComboBox ( ) [inline]

Definition at line 51 of file PipsPagerElements.cs.

        {
            return GetElement(ref PreviousPageButtonVisibilityComboBox, "PreviousPageButtonVisibilityComboBox");
        }

TextBlock GetVerticalOrientationPipsPagerButtonHeightTextBlock ( ) [inline]

Definition at line 132 of file PipsPagerElements.cs.

        {
            return GetElement(ref VerticalOrientationPipsPagerButtonHeightTextBlock, "VerticalOrientationPipsPagerButtonHeightTextBlock");
        }

TextBlock GetVerticalOrientationPipsPagerButtonWidthTextBlock ( ) [inline]

Definition at line 128 of file PipsPagerElements.cs.

        {
            return GetElement(ref VerticalOrientationPipsPagerButtonWidthTextBlock, "VerticalOrientationPipsPagerButtonWidthTextBlock");
        }

ComboBox GetWrapModeComboBox ( ) [inline]

Definition at line 91 of file PipsPagerElements.cs.

        {
            return GetElement(ref WrapModeComboBox, "TestPipsPagerWrapModeComboBox");
        }

Member Data Documentation

TextBlock CurrentMaxVisualIndicatorsTextBlock [private]

Definition at line 31 of file PipsPagerElements.cs.

TextBlock CurrentNumberOfPagesTextBlock [private]

Definition at line 30 of file PipsPagerElements.cs.

TextBlock CurrentOrientationTextBlock [private]

Definition at line 32 of file PipsPagerElements.cs.

TextBlock CurrentPageTextBlock [private]

Definition at line 28 of file PipsPagerElements.cs.

TextBlock FocusedPageIndexTextBlock [private]

Definition at line 29 of file PipsPagerElements.cs.

TextBlock HorizontalOrientationPipsPagerButtonHeightTextBlock [private]

Definition at line 34 of file PipsPagerElements.cs.

TextBlock HorizontalOrientationPipsPagerButtonWidthTextBlock [private]

Definition at line 33 of file PipsPagerElements.cs.

ComboBox MaxVisualIndicatorsComboBox [private]

Definition at line 21 of file PipsPagerElements.cs.

UIObject NextPageButton [private]

Definition at line 15 of file PipsPagerElements.cs.

CheckBox NextPageButtonIsEnabledCheckBox [private]

Definition at line 27 of file PipsPagerElements.cs.

CheckBox NextPageButtonIsVisibleCheckBox [private]

Definition at line 26 of file PipsPagerElements.cs.

ComboBox NextPageButtonVisibilityComboBox [private]

Definition at line 19 of file PipsPagerElements.cs.

ComboBox NumberOfPagesComboBox [private]

Definition at line 20 of file PipsPagerElements.cs.

ComboBox OrientationComboBox [private]

Definition at line 22 of file PipsPagerElements.cs.

UIObject PipsPager [private]

Definition at line 14 of file PipsPagerElements.cs.

UIObject PreviousPageButton [private]

Definition at line 16 of file PipsPagerElements.cs.

CheckBox PreviousPageButtonIsEnabledCheckBox [private]

Definition at line 25 of file PipsPagerElements.cs.

CheckBox PreviousPageButtonIsVisibleCheckBox [private]

Definition at line 24 of file PipsPagerElements.cs.

ComboBox PreviousPageButtonVisibilityComboBox [private]

Definition at line 18 of file PipsPagerElements.cs.

Button RetrievePipsPagerButtonSizesButton [private]

Definition at line 17 of file PipsPagerElements.cs.

TextBlock VerticalOrientationPipsPagerButtonHeightTextBlock [private]

Definition at line 36 of file PipsPagerElements.cs.

TextBlock VerticalOrientationPipsPagerButtonWidthTextBlock [private]

Definition at line 35 of file PipsPagerElements.cs.

ComboBox WrapModeComboBox [private]

Definition at line 23 of file PipsPagerElements.cs.

The documentation for this class was generated from the following file:
  • PipsPager/InteractionTests/PipsPagerElements.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerTestBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • PipsPagerTestBase
Public Types | Protected Member Functions | Protected Attributes | Private Member Functions

PipsPagerTestBase Class Reference

Inherited by PipsPagerTests.

List of all members.

Public Types

enum | ButtonType { Previous, Next }
enum | ButtonVisibilityMode { Visible, VisibleOnPointerOver, Collapsed }
enum NumberOfPagesOptions {
Zero, One, Five, Ten,
Twenty, Infinite
}
enum | WrapMode { None, Wrap }

Protected Member Functions

void | ChangeNumberOfPages (NumberOfPagesOptions numberOfPages)
delegate bool | GetButtonIsHiddenOnEdgeFunction ()
string | GetCurrentOrientation ()
string | GetCurrentPage ()
int | GetCurrentPageAsInt32 ()
string | GetFocusedPage ()
int | GetFocusedPageAsInt32 ()
string | GetSelectedNumberOfPages ()
int | GetSelectedNumberOfPagesAsInt32 ()
void | SelectPageInPager (int index)
delegate void | SetButtonVisibilityModeFunction (ButtonVisibilityMode mode)
void | SetNextPageButtonVisibilityMode (ButtonVisibilityMode mode)
void | SetOrientation (OrientationType orientation)
void | SetPreviousPageButtonVisibilityMode (ButtonVisibilityMode mode)
void | SetWrapMode (WrapMode wrapMode)
void | VerifyFocusedPageIndex (int index)
void | VerifyNextPageButtonVisibility (Visibility expected)
void | VerifyNumberOfPages (string numberOfPages)
void | VerifyOrientationChanged (OrientationType orientation)
void | VerifyPageButtonWithVisibilityModeSet (ButtonType btnType, ButtonVisibilityMode modeSet, bool isPagerInFocus=false)
void | VerifySelectedFocusedIndex (int index)
void | VerifySelectedPageIndex (int expectedPage)

Protected Attributes

PipsPagerElements elements

Private Member Functions

string | ExtractNumberFromString (string text)

Detailed Description

Definition at line 13 of file PipsPagerTestBase.cs.

Member Enumeration Documentation

enum ButtonType
Enumerator:
Previous
Next

Definition at line 193 of file PipsPagerTestBase.cs.

        {
            Previous,
            Next
        }

enum ButtonVisibilityMode
Enumerator:
Visible
VisibleOnPointerOver
Collapsed

Definition at line 199 of file PipsPagerTestBase.cs.

        {
            Visible,
            VisibleOnPointerOver,
            Collapsed
        }

enum NumberOfPagesOptions
Enumerator:
Zero
One
Five
Ten
Twenty
Infinite

Definition at line 206 of file PipsPagerTestBase.cs.

        {
            Zero,
            One,
            Five,
            Ten,
            Twenty,
            Infinite
        }

enum WrapMode
Enumerator:
None
Wrap

Definition at line 216 of file PipsPagerTestBase.cs.

        {
            None,
            Wrap
        }

Member Function Documentation

void ChangeNumberOfPages ( NumberOfPagesOptions numberOfPages ) [inline, protected]

Definition at line 158 of file PipsPagerTestBase.cs.

        {
            elements.GetNumberOfPagesComboBox().SelectItemByName($"{numberOfPages}NumberOfPages");
        }

string ExtractNumberFromString ( string text ) [inline, private]

Definition at line 188 of file PipsPagerTestBase.cs.

        {
            return new string(text.Where(char.IsDigit).ToArray());
        }

delegate bool GetButtonIsHiddenOnEdgeFunction ( ) [protected]
string GetCurrentOrientation ( ) [inline, protected]

Definition at line 131 of file PipsPagerTestBase.cs.

        {
            return elements.GetCurrentOrientationTextBlock().GetText().Split(' ').Last();
        }

string GetCurrentPage ( ) [inline, protected]

Definition at line 152 of file PipsPagerTestBase.cs.

        {
            string currentPageTextBlockContent = elements.GetCurrentPageTextBlock().GetText();
            return new string(currentPageTextBlockContent.Where(char.IsDigit).ToArray());
        }

int GetCurrentPageAsInt32 ( ) [inline, protected]

Definition at line 141 of file PipsPagerTestBase.cs.

        {
            return Convert.ToInt32(GetCurrentPage());
        }

string GetFocusedPage ( ) [inline, protected]

Definition at line 146 of file PipsPagerTestBase.cs.

        {
            string focusedPageTextBlockContent = elements.GetFocusedPageIndexTextBlock().GetText();
            return new string(focusedPageTextBlockContent.Where(char.IsDigit).ToArray());
        }

int GetFocusedPageAsInt32 ( ) [inline, protected]

Definition at line 136 of file PipsPagerTestBase.cs.

        {
            return Convert.ToInt32(GetFocusedPage());
        }

string GetSelectedNumberOfPages ( ) [inline, protected]

Definition at line 163 of file PipsPagerTestBase.cs.

        {
            string selectedNumberOfPages = ExtractNumberFromString(elements.GetCurrentNumberOfPagesTextBlock().GetText());
            if (string.IsNullOrEmpty(selectedNumberOfPages))
            {
                selectedNumberOfPages = "Infinite";
            }
            return selectedNumberOfPages;
        }

int GetSelectedNumberOfPagesAsInt32 ( ) [inline, protected]

Definition at line 173 of file PipsPagerTestBase.cs.

        {
            var selectedNumberOfPages = GetSelectedNumberOfPages();
            if (selectedNumberOfPages == "Infinite")
            {
                return -1;
            }
            return Convert.ToInt32(GetSelectedNumberOfPages());
        }

void SelectPageInPager ( int index ) [inline, protected]

Definition at line 19 of file PipsPagerTestBase.cs.

        {
            InputHelper.LeftClick(elements.GetPipWithPageNumber("Page " + index.ToString()));
            Wait.ForIdle();
        }

delegate void SetButtonVisibilityModeFunction ( ButtonVisibilityMode mode ) [protected]
void SetNextPageButtonVisibilityMode ( ButtonVisibilityMode mode ) [inline, protected]

Definition at line 90 of file PipsPagerTestBase.cs.

        {
            elements.GetNextPageButtonVisibilityComboBox().SelectItemByName($"{mode}NextButton");
        }

void SetOrientation ( OrientationType orientation ) [inline, protected]

Definition at line 100 of file PipsPagerTestBase.cs.

        {
            elements.GetOrientationComboBox().SelectItemByName($"{orientation}Orientation");
        }

void SetPreviousPageButtonVisibilityMode ( ButtonVisibilityMode mode ) [inline, protected]

Definition at line 95 of file PipsPagerTestBase.cs.

        {
            elements.GetPreviousPageButtonVisibilityComboBox().SelectItemByName($"{mode}PreviousButton");
        }

void SetWrapMode ( WrapMode wrapMode ) [inline, protected]

Definition at line 105 of file PipsPagerTestBase.cs.

        {
            elements.GetWrapModeComboBox().SelectItemByName($"{wrapMode}");
        }

void VerifyFocusedPageIndex ( int index ) [inline, protected]

Definition at line 120 of file PipsPagerTestBase.cs.

        {
            Verify.AreEqual(index, GetFocusedPageAsInt32());
        }

void VerifyNextPageButtonVisibility ( Visibility expected ) [inline, protected]

Definition at line 85 of file PipsPagerTestBase.cs.

        {
            Verify.AreEqual(expected == Visibility.Visible, elements.GetNextPageButtonIsVisibleCheckBox().ToggleState == ToggleState.On);
        }

void VerifyNumberOfPages ( string numberOfPages ) [inline, protected]

Definition at line 182 of file PipsPagerTestBase.cs.

        {
            Verify.AreEqual(numberOfPages, GetSelectedNumberOfPages());

        }

void VerifyOrientationChanged ( OrientationType orientation ) [inline, protected]

Definition at line 110 of file PipsPagerTestBase.cs.

        {
            Verify.AreEqual($"{orientation}", GetCurrentOrientation());
        }

void VerifyPageButtonWithVisibilityModeSet | ( | ButtonType | btnType,
 |  | ButtonVisibilityMode | modeSet,
 |  | bool | isPagerInFocus = false |
 | ) |  |  | [inline, protected]

Definition at line 25 of file PipsPagerTestBase.cs.

        {
            ToggleState isVisibleState;
            ToggleState isEnabledState;
            bool isHiddenOnEdge;

            if (btnType == ButtonType.Previous)
            {
                isVisibleState = elements.GetPreviousPageButtonIsVisibleCheckBox().ToggleState;
                isEnabledState = elements.GetPreviousPageButtonIsEnabledCheckBox().ToggleState;
                isHiddenOnEdge = GetCurrentPageAsInt32() == 0;
            }
            else
            {
                isVisibleState = elements.GetNextPageButtonIsVisibleCheckBox().ToggleState;
                isEnabledState = elements.GetNextPageButtonIsEnabledCheckBox().ToggleState;
                isHiddenOnEdge = !(GetCurrentPage() == "Infinite") && GetCurrentPageAsInt32() == GetSelectedNumberOfPagesAsInt32() - 1;
            }
            switch (modeSet)
            {
                case ButtonVisibilityMode.Collapsed:
                    Verify.AreEqual(isVisibleState, ToggleState.Off);
                    Verify.AreEqual(isEnabledState, ToggleState.Off);
                    break;

                case ButtonVisibilityMode.Visible:
                    if (isHiddenOnEdge)
                    {
                        Verify.AreEqual(isVisibleState, ToggleState.Off);
                        Verify.AreEqual(isEnabledState, ToggleState.Off);
                    }
                    else
                    {
                        Verify.AreEqual(isVisibleState, ToggleState.On);
                        Verify.AreEqual(isEnabledState, ToggleState.On);
                    }
                    break;

                case ButtonVisibilityMode.VisibleOnPointerOver:
                    if (isHiddenOnEdge)
                    {
                        Verify.AreEqual(isVisibleState, ToggleState.Off);
                        Verify.AreEqual(isEnabledState, ToggleState.Off);
                    }
                    else
                    {
                        if (isPagerInFocus)
                        {
                            Verify.AreEqual(isVisibleState, ToggleState.On);
                        }
                        else
                        {
                            Verify.AreEqual(isVisibleState, ToggleState.Off);
                        }
                        Verify.AreEqual(isEnabledState, ToggleState.On);
                    }
                    break;
            }
        }

void VerifySelectedFocusedIndex ( int index ) [inline, protected]

Definition at line 125 of file PipsPagerTestBase.cs.

        {
            VerifySelectedPageIndex(index);
            VerifyFocusedPageIndex(index);
        }

void VerifySelectedPageIndex ( int expectedPage ) [inline, protected]

Definition at line 115 of file PipsPagerTestBase.cs.

        {
            Verify.AreEqual(expectedPage, GetCurrentPageAsInt32());
        }

Member Data Documentation

PipsPagerElements elements [protected]

Definition at line 15 of file PipsPagerTestBase.cs.

The documentation for this class was generated from the following file:
  • PipsPager/InteractionTests/PipsPagerTestBase.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • PipsPagerTests
Public Member Functions | Static Public Member Functions

PipsPagerTests Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::PipsPagerTestBase.

List of all members.

Public Member Functions

void | FirstFocusedPageTest ()
void | KeyboardPageSelectTest ()
void | NextPageButtonChangingPageTest ()
void | NextPageButtonVisibilityOptionsTest ()
void | OrientationChangeTest ()
void | PipSizeAfterOrientationChangeTest ()
void | PipSizeWithDifferentOrientationsTest ()
void | PipsPagerChangingPageTest ()
void | PipsPagerInfinitePagesTest ()
void | PipsPagerRTLDoesNotCrash ()
void | PipsPagerWrapModeNavigation ()
void | PipsPagerWrapModeNavigationButtonsHiddenInOnePageScenario ()
void | PipsPagerWrapModeNavigationInfinitePages ()
void | PreviousPageButtonChangingPageTest ()
void | PreviousPageButtonVisibilityOptionsTest ()
void | TestCleanup ()
void | VerifyAxeScanPasses ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 17 of file PipsPagerTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 24 of file PipsPagerTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void FirstFocusedPageTest ( ) [inline]

Definition at line 261 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                if (!PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone4))
                {
                    Log.Warning("This test is only designed to run on RS4 + machines due to difference in focus behaviour.");
                    return;
                }

                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                InputHelper.LeftClick(elements.GetNextPageButton());
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift);
                KeyboardHelper.PressKey(Key.Tab);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift);
                VerifySelectedFocusedIndex(1);

                InputHelper.LeftClick(elements.GetNextPageButton());
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift);
                KeyboardHelper.PressKey(Key.Tab);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift);
                VerifySelectedFocusedIndex(2);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                KeyboardHelper.PressKey(Key.Tab);
                VerifySelectedFocusedIndex(1);
            }
        }

void KeyboardPageSelectTest ( ) [inline]

Definition at line 295 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                if (!PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone4))
                {
                    Log.Warning("This test is only designed to run on RS4+ machines due to difference in focus behaviour.");
                    return;
                }

                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                InputHelper.LeftClick(elements.GetNextPageButton());
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift);
                KeyboardHelper.PressKey(Key.Tab);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift);

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Space);
                VerifySelectedPageIndex(2);

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Space);
                VerifySelectedPageIndex(3);

                KeyboardHelper.PressKey(Key.Left);
                KeyboardHelper.PressKey(Key.Space);
                VerifySelectedPageIndex(2);
            }
        }

void NextPageButtonChangingPageTest ( ) [inline]

Definition at line 111 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                VerifySelectedPageIndex(0);
                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(1);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(2);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(3);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(4);
            }
        }

void NextPageButtonVisibilityOptionsTest ( ) [inline]

Definition at line 207 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.VisibleOnPointerOver);

                ChangeNumberOfPages(NumberOfPagesOptions.Five);
                VerifyNumberOfPages("5");

                /* Test for Collapsed */
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Collapsed);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.Collapsed);

                /* Test for Visible */
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.Visible);
                /* We step until the end of the list (4 times, since we have 5 pages) */
                InputHelper.LeftClick(elements.GetNextPageButton());
                InputHelper.LeftClick(elements.GetNextPageButton());
                InputHelper.LeftClick(elements.GetNextPageButton());
                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.Collapsed);

                /* Test for VisibleOnPointerOver */
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.VisibleOnPointerOver);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.Collapsed);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.VisibleOnPointerOver, true);

                InputHelper.LeftClick(elements.GetCurrentNumberOfPagesTextBlock());
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.VisibleOnPointerOver);
            }
        }

void OrientationChangeTest ( ) [inline]

Definition at line 245 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetOrientation(Microsoft.Windows.Apps.Test.Automation.OrientationType.Horizontal);
                VerifyOrientationChanged(Microsoft.Windows.Apps.Test.Automation.OrientationType.Horizontal);

                SetOrientation(Microsoft.Windows.Apps.Test.Automation.OrientationType.Vertical);
                VerifyOrientationChanged(Microsoft.Windows.Apps.Test.Automation.OrientationType.Vertical);

            }
        }

void PipSizeAfterOrientationChangeTest ( ) [inline]

Definition at line 352 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                Button getButtonSizesButton = elements.GetPipsPagerButtonSizesButton();
                getButtonSizesButton.InvokeAndWait();

                TextBlock horizontalOrientationPipsPagerButtonWidth = elements.GetHorizontalOrientationPipsPagerButtonWidthTextBlock();
                TextBlock horizontalOrientationPipsPagerButtonHeight = elements.GetHorizontalOrientationPipsPagerButtonHeightTextBlock();
                Verify.AreEqual("12", horizontalOrientationPipsPagerButtonWidth.DocumentText);
                Verify.AreEqual("20", horizontalOrientationPipsPagerButtonHeight.DocumentText);

                SetOrientation(Microsoft.Windows.Apps.Test.Automation.OrientationType.Vertical);
                VerifyOrientationChanged(Microsoft.Windows.Apps.Test.Automation.OrientationType.Vertical);

                getButtonSizesButton.InvokeAndWait();

                Verify.AreEqual("20", horizontalOrientationPipsPagerButtonWidth.DocumentText);
                Verify.AreEqual("12", horizontalOrientationPipsPagerButtonHeight.DocumentText);
            }
        }

void PipSizeWithDifferentOrientationsTest ( ) [inline]

Definition at line 329 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                Button getButtonSizesButton = elements.GetPipsPagerButtonSizesButton();
                getButtonSizesButton.InvokeAndWait();

                TextBlock horizontalOrientationPipsPagerButtonWidth = elements.GetHorizontalOrientationPipsPagerButtonWidthTextBlock();
                TextBlock horizontalOrientationPipsPagerButtonHeight = elements.GetHorizontalOrientationPipsPagerButtonHeightTextBlock();

                TextBlock verticalOrientationPipsPagerButtonWidth = elements.GetVerticalOrientationPipsPagerButtonWidthTextBlock();
                TextBlock verticalOrientationPipsPagerButtonHeight = elements.GetVerticalOrientationPipsPagerButtonHeightTextBlock();

                Verify.AreEqual("12", horizontalOrientationPipsPagerButtonWidth.DocumentText);
                Verify.AreEqual("20", horizontalOrientationPipsPagerButtonHeight.DocumentText);
                Verify.AreEqual("20", verticalOrientationPipsPagerButtonWidth.DocumentText);
                Verify.AreEqual("12", verticalOrientationPipsPagerButtonHeight.DocumentText);
            }
        }

void PipsPagerChangingPageTest ( ) [inline]

Definition at line 46 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                VerifySelectedPageIndex(0);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(1);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(2);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifySelectedPageIndex(1);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifySelectedPageIndex(0);

                ChangeNumberOfPages(NumberOfPagesOptions.Five);
                VerifyNumberOfPages("5");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(1);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(2);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(3);

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifySelectedPageIndex(2);
            }
        }

void PipsPagerInfinitePagesTest ( ) [inline]

Definition at line 136 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                VerifySelectedPageIndex(0);

                ChangeNumberOfPages(NumberOfPagesOptions.Infinite);
                VerifyNumberOfPages("Infinite");

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(1);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(2);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(3);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(4);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(5);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(6);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifySelectedPageIndex(7);
            }
        }

void PipsPagerRTLDoesNotCrash ( ) [inline]

Definition at line 378 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                TestSetupHelper.SetInnerFrameFlowDirection(FlowDirection.RightToLeft);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                InputHelper.LeftClick(elements.GetNextPageButton());
            }
        }

void PipsPagerWrapModeNavigation ( ) [inline]

Definition at line 391 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                ChangeNumberOfPages(NumberOfPagesOptions.Twenty);
                VerifyNumberOfPages("20");

                SetWrapMode(WrapMode.Wrap);

                VerifySelectedPageIndex(0);

                InputHelper.LeftClick(elements.GetPreviousPageButton());

                VerifySelectedPageIndex(19);

                InputHelper.LeftClick(elements.GetNextPageButton());

                VerifySelectedPageIndex(0);
            }
        }

void PipsPagerWrapModeNavigationButtonsHiddenInOnePageScenario ( ) [inline]

Definition at line 443 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();

                SetWrapMode(WrapMode.Wrap);

                ChangeNumberOfPages(NumberOfPagesOptions.One);
                VerifyNumberOfPages("1");

                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                VerifySelectedPageIndex(0);

                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.Collapsed);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.Collapsed);
            }
        }

void PipsPagerWrapModeNavigationInfinitePages ( ) [inline]

Definition at line 418 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                SetWrapMode(WrapMode.Wrap);

                ChangeNumberOfPages(NumberOfPagesOptions.Infinite);
                VerifyNumberOfPages("Infinite");

                InputHelper.LeftClick(elements.GetNextPageButton());
                InputHelper.LeftClick(elements.GetPreviousPageButton());

                VerifySelectedPageIndex(0);

                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.Collapsed);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Next, ButtonVisibilityMode.Visible);
            }
        }

void PreviousPageButtonChangingPageTest ( ) [inline]

Definition at line 87 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                VerifySelectedPageIndex(0);
                InputHelper.LeftClick(elements.GetNextPageButton());

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifySelectedPageIndex(0);

                InputHelper.LeftClick(elements.GetNextPageButton());
                InputHelper.LeftClick(elements.GetNextPageButton());

                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifySelectedPageIndex(1);
            }
        }

void PreviousPageButtonVisibilityOptionsTest ( ) [inline]

Definition at line 174 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager Tests"))
            {
                elements = new PipsPagerElements();
                SetNextPageButtonVisibilityMode(ButtonVisibilityMode.Visible);

                /* Test for Collapsed */
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Collapsed);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.Collapsed);
                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.Collapsed);

                /* Test for Visible */
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.Visible);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.Visible);
                InputHelper.LeftClick(elements.GetPreviousPageButton());
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.Collapsed);

                /* Test for VisibleOnPointerOver */
                SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode.VisibleOnPointerOver);
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.Collapsed);

                InputHelper.LeftClick(elements.GetNextPageButton());
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.VisibleOnPointerOver, true);

                InputHelper.LeftClick(elements.GetCurrentNumberOfPagesTextBlock());
                VerifyPageButtonWithVisibilityModeSet(ButtonType.Previous, ButtonVisibilityMode.VisibleOnPointerOver);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 29 of file PipsPagerTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 36 of file PipsPagerTests.cs.

        {
            using (var setup = new TestSetupHelper("PipsPager-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

The documentation for this class was generated from the following file:
  • PipsPager/InteractionTests/PipsPagerTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ProgressBarTests
Public Member Functions | Static Public Member Functions

ProgressBarTests Class Reference

List of all members.

Public Member Functions

void | ChangeStateTest ()
void | ChangeValueTest ()
void | PaddingOffsetTest ()
void | ReTemplateChangeStateTest ()
void | RetemplateUpdateIndicatorWidthTest ()
void | TestCleanup ()
void | UpdateIndicatorWidthTest ()
void | UpdateMinMaxTest ()
void | VerifyAxeScanPasses ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 24 of file ProgressBarTests.cs.

Member Function Documentation

void ChangeStateTest ( ) [inline]

Definition at line 207 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar Tests"))
            {
                Log.Comment("Verify all properties are set to false by default for testing");

                ToggleButton showPausedCheckBox = FindElement.ByName<ToggleButton>("ShowPausedCheckBox");
                ToggleButton showErrorCheckBox = FindElement.ByName<ToggleButton>("ShowErrorCheckBox");
                ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox");
                TextBlock showPausedText = FindElement.ByName<TextBlock>("ShowPausedText");
                TextBlock showErrorText = FindElement.ByName<TextBlock>("ShowErrorText");
                TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
                TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");

                Verify.IsFalse(Convert.ToBoolean(showPausedText.DocumentText));
                Verify.IsFalse(Convert.ToBoolean(showErrorText.DocumentText));
                Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));

                Log.Comment("All properties to false updates ProgressBar to Determinate");

                Verify.AreEqual(visualStateText.DocumentText, "Determinate");

                Log.Comment("ShowPaused = true updates ProgressBar to Paused visual state");

                showPausedCheckBox.ToggleAndWait();

                Verify.IsTrue(Convert.ToBoolean(showPausedText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "Paused");

                Log.Comment("ShowPaused = true && IsIndeterminate = true updates ProgressBar to IndeterminatePaused visual state");

                isIndeterminateCheckBox.ToggleAndWait();

                Verify.IsTrue(Convert.ToBoolean(showPausedText.DocumentText));
                Verify.IsTrue(Convert.ToBoolean(isIndeterminateText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "IndeterminatePaused");

                Log.Comment("IsIndeterminate = true updates ProgressBar to Indeterminate visual state");

                showPausedCheckBox.ToggleAndWait();

                Verify.IsTrue(Convert.ToBoolean(isIndeterminateText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "Indeterminate");

                Log.Comment("ShowError = true && IsIndeterminate = true updates ProgressBar to IndeterminateError visual state");

                showErrorCheckBox.ToggleAndWait();

                Verify.IsTrue(Convert.ToBoolean(showErrorText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "IndeterminateError");

                Log.Comment("ShowError = true updates ProgressBar to Error visual state for Determinate");

                isIndeterminateCheckBox.ToggleAndWait();

                Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));
                Verify.IsTrue(Convert.ToBoolean(showErrorText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "Error");
            }
        }

void ChangeValueTest ( ) [inline]

Definition at line 52 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar Tests"))
            {
                Log.Comment("Changing Value of ProgressBar");

                RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");
                Verify.AreEqual(0, progressBar.Value);

                double oldValue = progressBar.Value;

                // NOTE: Interaction tests can only access what accessibility tools see. In this case, we can find the button because we
                // set AutomationProperties.Name on the button in ProgressBarPage.xaml
                Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
                changeValueButton.InvokeAndWait();

                double newValue = progressBar.Value;
                double diff = Math.Abs(oldValue - newValue);

                Log.Comment("ProgressBar value changed");
                Verify.IsGreaterThan(diff, 0.0);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file ProgressBarTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void PaddingOffsetTest ( ) [inline]

Definition at line 270 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar Tests"))
            {
                Log.Comment("Set ProgressBar Padding settings to default for testing");

                RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");

                Edit paddingLeftInput = FindElement.ByName<Edit>("PaddingLeftInput");
                Edit paddingRightInput = FindElement.ByName<Edit>("PaddingRightInput");

                TextBlock paddingLeftText = FindElement.ByName<TextBlock>("PaddingLeftText");
                TextBlock paddingRightText = FindElement.ByName<TextBlock>("PaddingRightText");
                TextBlock indicatorWidthText = FindElement.ByName<TextBlock>("IndicatorWidthText");
                TextBlock widthInputText = FindElement.ByName<TextBlock>("WidthInputText");

                paddingLeftInput.SetValue("0");
                paddingRightInput.SetValue("0");

                Button updatePaddingButton = FindElement.ByName<Button>("UpdatePaddingButton");
                updatePaddingButton.InvokeAndWait();

                Verify.AreEqual(Convert.ToDouble(paddingLeftText.DocumentText), 0);
                Verify.AreEqual(Convert.ToDouble(paddingRightText.DocumentText), 0);

                Log.Comment("IndicatorWidth offsets where ProgressBar has Padding");

                paddingLeftInput.SetValue("10");
                paddingRightInput.SetValue("10");

                updatePaddingButton.InvokeAndWait();

                Edit valueInput = FindElement.ByName<Edit>("ValueInput");
                valueInput.SetValue("100");

                Button updateValueButton = FindElement.ByName<Button>("UpdateValueButton");
                updateValueButton.InvokeAndWait();

                double maxIndicatorWidth = Convert.ToDouble(widthInputText.DocumentText) - Convert.ToDouble(paddingLeftText.DocumentText) - Convert.ToDouble(paddingRightText.DocumentText);

                Verify.AreEqual(maxIndicatorWidth, Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator at max width is reduced by Padding");
            }
        }

void ReTemplateChangeStateTest ( ) [inline]

Definition at line 385 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar Tests"))
            {
                //Log.Comment("Navigate to Progress Bar Re-template Page");
                //Button navigateToReTemplatePage = FindElement.ByName<Button>("NavigateToReTemplatePage");

                Log.Comment("Verify all properties are set to false by default for testing");

                ToggleButton showPausedCheckBox = FindElement.ByName<ToggleButton>("ShowPausedCheckBox");
                ToggleButton showErrorCheckBox = FindElement.ByName<ToggleButton>("ShowErrorCheckBox");
                ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox");
                TextBlock showPausedText = FindElement.ByName<TextBlock>("ShowPausedText");
                TextBlock showErrorText = FindElement.ByName<TextBlock>("ShowErrorText");
                TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
                TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");

                Verify.IsFalse(Convert.ToBoolean(showPausedText.DocumentText));
                Verify.IsFalse(Convert.ToBoolean(showErrorText.DocumentText));
                Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));

                Log.Comment("All properties to false updates Re-template ProgressBar to Determinate");

                Verify.AreEqual(visualStateText.DocumentText, "Determinate");

                Log.Comment("ShowPaused = true updates Re-template ProgressBar to Paused visual state");

                showPausedCheckBox.ToggleAndWait();

                Verify.IsTrue(Convert.ToBoolean(showPausedText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "Paused");

                Log.Comment("IsIndeterminate = true updates Re-template ProgressBar to Indeterminate visual state");

                showPausedCheckBox.ToggleAndWait();
                isIndeterminateCheckBox.ToggleAndWait();

                Verify.IsTrue(Convert.ToBoolean(isIndeterminateText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "Indeterminate");

                Log.Comment("ShowError = true updates Re-template ProgressBar to Error visual state for Determinate");

                isIndeterminateCheckBox.ToggleAndWait();
                showErrorCheckBox.ToggleAndWait();

                Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));
                Verify.IsTrue(Convert.ToBoolean(showErrorText.DocumentText));
                Verify.AreEqual(visualStateText.DocumentText, "Error");
            }
        }

void RetemplateUpdateIndicatorWidthTest ( ) [inline]

Definition at line 316 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar Tests"))
            {
                //Log.Comment("Navigate to ProgressBar Re-template Page");
                //Button navigateToReTemplatePage = FindElement.ByName<Button>("NavigateToReTemplatePage");
                //Log.Comment("Set Re-template ProgressBar settings to default for testing");

                RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");

                Edit minimumInput = FindElement.ByName<Edit>("MinimumInput");
                Edit maximumInput = FindElement.ByName<Edit>("MaximumInput");
                Edit widthInput = FindElement.ByName<Edit>("WidthInput");

                TextBlock widthInputText = FindElement.ByName<TextBlock>("WidthInputText");
                TextBlock indicatorWidthText = FindElement.ByName<TextBlock>("IndicatorWidthText");

                Button updateMinMaxButton = FindElement.ByName<Button>("UpdateMinMaxButton");
                Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
                Button updateWidthButton = FindElement.ByName<Button>("UpdateWidthButton");

                minimumInput.SetValue("0");
                maximumInput.SetValue("100");
                updateMinMaxButton.InvokeAndWait();

                widthInput.SetValue("100");
                updateWidthButton.InvokeAndWait();

                Verify.AreEqual(progressBar.Minimum, 0);
                Verify.AreEqual(progressBar.Maximum, 100);
                Verify.AreEqual(Convert.ToDouble(widthInputText.DocumentText), 100);

                Log.Comment("Changing value of Re-template ProgressBar updates Indicator Width");

                changeValueButton.Invoke();

                Verify.AreEqual(progressBar.Value, Convert.ToDouble(indicatorWidthText.DocumentText));

                Log.Comment("Updating width of Re-template ProgressBar also updates Indicator Width");

                widthInput.SetValue("200");
                updateWidthButton.InvokeAndWait();

                Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to Re-template ProgressBar width");

                Log.Comment("Changing value of ProgressBar of different width updates Indicator width");

                changeValueButton.InvokeAndWait();

                Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to ProgressBar width");

                Log.Comment("Updating Maximum and Minimum also updates Indicator Width");

                minimumInput.SetValue("10");
                maximumInput.SetValue("16");
                updateMinMaxButton.InvokeAndWait();

                changeValueButton.InvokeAndWait();

                double range = progressBar.Maximum - progressBar.Minimum;
                double adjustedValueFromRange = progressBar.Value - progressBar.Minimum;
                double calculatedValue = (adjustedValueFromRange / range) * Convert.ToDouble(widthInputText.DocumentText);

                Verify.IsLessThan(Math.Abs(calculatedValue - Convert.ToDouble(indicatorWidthText.DocumentText)), 0.5, "Indicator Width is adjusted based on range and Re-template ProgressBar width");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file ProgressBarTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void UpdateIndicatorWidthTest ( ) [inline]

Definition at line 78 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar Tests"))
            {
                Log.Comment("Set ProgressBar settings to default for testing");

                RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");

                Edit minimumInput = FindElement.ByName<Edit>("MinimumInput");
                Edit maximumInput = FindElement.ByName<Edit>("MaximumInput");
                Edit widthInput = FindElement.ByName<Edit>("WidthInput");

                TextBlock widthInputText = FindElement.ByName<TextBlock>("WidthInputText");
                TextBlock indicatorWidthText = FindElement.ByName<TextBlock>("IndicatorWidthText");

                Button updateMinMaxButton = FindElement.ByName<Button>("UpdateMinMaxButton");
                Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
                Button updateWidthButton = FindElement.ByName<Button>("UpdateWidthButton");

                minimumInput.SetValue("0");
                maximumInput.SetValue("100");
                updateMinMaxButton.InvokeAndWait();

                widthInput.SetValue("100");
                updateWidthButton.InvokeAndWait();

                Verify.AreEqual(progressBar.Minimum, 0);
                Verify.AreEqual(progressBar.Maximum, 100);
                Verify.AreEqual(Convert.ToDouble(widthInputText.DocumentText), 100);

                Log.Comment("Changing value of ProgressBar updates Indicator Width");

                changeValueButton.Invoke();

                Verify.AreEqual(progressBar.Value, Convert.ToDouble(indicatorWidthText.DocumentText));

                Log.Comment("Updating width of ProgressBar also updates Indicator Width");

                widthInput.SetValue("200");
                updateWidthButton.InvokeAndWait();

                Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to ProgressBar width");

                Log.Comment("Changing value of ProgressBar of different width updates Indicator width");

                changeValueButton.InvokeAndWait();

                Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to ProgressBar width");

                Log.Comment("Updating Maximum and Minimum also updates Indicator Width");

                minimumInput.SetValue("10");
                maximumInput.SetValue("16");
                updateMinMaxButton.InvokeAndWait();

                changeValueButton.InvokeAndWait();

                double range = progressBar.Maximum - progressBar.Minimum;
                double adjustedValueFromRange = progressBar.Value - progressBar.Minimum;
                double calculatedValue = (adjustedValueFromRange / range) * Convert.ToDouble(widthInputText.DocumentText);

                Verify.IsLessThan(Math.Abs(calculatedValue - Convert.ToDouble(indicatorWidthText.DocumentText)), 0.5, "Indicator Width is adjusted based on range and ProgressBar width");
            }
        }

void UpdateMinMaxTest ( ) [inline]

Definition at line 145 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar Tests"))
            {
                Log.Comment("Updating Minimum and Maximum value of ProgressBar");

                RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");

                double oldMinimumInputText = progressBar.Minimum;
                double oldMaximumInputText = progressBar.Maximum;

                Button updateMinMaxButton = FindElement.ByName<Button>("UpdateMinMaxButton");
                Edit minimumInput = FindElement.ByName<Edit>("MinimumInput");
                Edit maximumInput = FindElement.ByName<Edit>("MaximumInput");

                minimumInput.SetValue("10");
                maximumInput.SetValue("15");
                updateMinMaxButton.InvokeAndWait();

                double newMinimumInputText = progressBar.Minimum;
                double newMaximumInputText = progressBar.Maximum;

                Verify.AreNotSame(oldMinimumInputText, newMinimumInputText, "Minimum updated");
                Verify.AreNotSame(oldMaximumInputText, newMaximumInputText, "Maximum updated");

                // Below edge cases are handled by Rangebase

                Log.Comment("Updating Minimum and Maximum when Maximum < Minimum");

                maximumInput.SetValue("5");
                updateMinMaxButton.InvokeAndWait();

                Verify.AreEqual(progressBar.Minimum, progressBar.Maximum, "Maximum updates to equal Minimum");

                Log.Comment("Updating Minimum and Maximum when Minimum > Value");

                minimumInput.SetValue("15");
                updateMinMaxButton.InvokeAndWait();

                Verify.AreEqual(progressBar.Value, progressBar.Minimum, "Value updates to equal Minimum");
                Verify.AreEqual(progressBar.Maximum, progressBar.Minimum, "Maximum also updates to equal Minimum");

                Log.Comment("Updating Minimum and Maximum to be a decimal number");

                minimumInput.SetValue("0.1");
                maximumInput.SetValue("1.1");
                updateMinMaxButton.InvokeAndWait();

                double oldValue = progressBar.Value;

                Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
                changeValueButton.InvokeAndWait();

                double newValue = progressBar.Value;
                double diff = Math.Abs(oldValue - newValue);

                Verify.IsGreaterThan(diff, Convert.ToDouble(0), "Value of ProgressBar increments properly within range with decimal Minimum and Maximum");
            }
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 42 of file ProgressBarTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressBar-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

The documentation for this class was generated from the following file:
  • ProgressBar/InteractionTests/ProgressBarTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ProgressRingTests
Public Member Functions | Static Public Member Functions

ProgressRingTests Class Reference

List of all members.

Public Member Functions

void | ChangeStateTest ()
void | ChangeValueTest ()
void | LottieCustomSourceTest ()
void | StoryboardAnimationRetemplateTest ()
void | TestCleanup ()
void | UpdateMinMaxTest ()
void | VerifyAxeScanPasses ()
void | VerifyIndeterminateProgressRingDoesNotImplementRangeValuePattern ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 25 of file ProgressRingTests.cs.

Member Function Documentation

void ChangeStateTest ( ) [inline]

Definition at line 52 of file ProgressRingTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressRing Tests"))
            {
                Log.Comment("Verify IsActive and IsIndeterminate property is set to true by default for testing");

                ToggleButton isActiveCheckBox = FindElement.ByName<ToggleButton>("ShowIsActiveCheckBox");
                ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox");

                TextBlock isActiveText = FindElement.ByName<TextBlock>("ShowIsActiveText");
                TextBlock isIsIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
                TextBlock isPlayingText = FindElement.ByName<TextBlock>("IsPlayingText");
                TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");
                TextBlock opacityText = FindElement.ByName<TextBlock>("OpacityText");

                Verify.IsTrue(Convert.ToBoolean(isActiveText.DocumentText));
                Verify.IsTrue(Convert.ToBoolean(isIsIndeterminateText.DocumentText));

                Log.Comment("IsActive and IsIndeterminate set to true updates ProgressRing to Active state");

                Verify.AreEqual("Active", visualStateText.DocumentText);

                Log.Comment("Verity that opacity is 1 when Active");
                Verify.AreEqual("1", opacityText.DocumentText);

                Log.Comment("Verify Lottie animation is playing when in Active state");

                Verify.IsTrue(Convert.ToBoolean(isPlayingText.DocumentText));

                Log.Comment("IsActive set to True and IsIndeterminate set to false updates ProgressRing to DeterminateActive state");

                isIndeterminateCheckBox.ToggleAndWait();

                Verify.IsFalse(Convert.ToBoolean(isIsIndeterminateText.DocumentText));

                Verify.AreEqual("DeterminateActive", visualStateText.DocumentText);

                Log.Comment("Verify Lottie animation for Indeterminate player is not playing when in DeterminateActive state");
                Verify.IsFalse(Convert.ToBoolean(isPlayingText.DocumentText));

                Log.Comment("IsActive set to false updates ProgressRing to Inactive state");

                isActiveCheckBox.ToggleAndWait();

                Verify.AreEqual("Inactive", visualStateText.DocumentText);

                Log.Comment("Verify Lottie animation is not playing when in Inactive state");
                Verify.IsFalse(Convert.ToBoolean(isPlayingText.DocumentText));

                Wait.ForIdle();

                Log.Comment("Verity that opacity is 0 when Inactive");
                Verify.AreEqual("0", opacityText.DocumentText);

            }
        }

void ChangeValueTest ( ) [inline]

Definition at line 204 of file ProgressRingTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressRing Tests"))
            {
                Log.Comment("Changing Value of ProgressRing");

                CheckBox indeterminateCheckBox = FindElement.ByName<CheckBox>("ShowIsIndeterminateCheckBox");
                indeterminateCheckBox.Uncheck();

                RangeValueSpinner progressRing = FindElement.ByName<RangeValueSpinner>("TestProgressRing");
                Verify.AreEqual(0, progressRing.Value);

                double oldValue = progressRing.Value;

                // NOTE: Interaction tests can only access what accessibility tools see. In this case, we can find the button because we
                // set AutomationProperties.Name on the button in ProgressRingPage.xaml
                Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
                changeValueButton.InvokeAndWait();

                double newValue = progressRing.Value;
                double diff = Math.Abs(oldValue - newValue);

                Log.Comment("ProgressRing value changed");
                Verify.IsGreaterThan(diff, 0.0);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 32 of file ProgressRingTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void LottieCustomSourceTest ( ) [inline]

Definition at line 110 of file ProgressRingTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressRing Tests"))
            {
                Log.Comment("Navigate to Progress Ring Custom Lottie Source Page");

                Button navigateToCustomLottieSourcePage = FindElement.ByName<Button>("NavigateToCustomLottieSourcePage");

                navigateToCustomLottieSourcePage.InvokeAndWait();

                Log.Comment("Verify IsActive and IsIndeterminate property is set to true by default for testing");

                ToggleButton isActiveCheckBox = FindElement.ByName<ToggleButton>("ShowIsActiveCheckBox_CLS");
                ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox_CLS");

                TextBlock isActiveText = FindElement.ByName<TextBlock>("ShowIsActiveText");
                TextBlock isIsIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
                TextBlock isPlayingText = FindElement.ByName<TextBlock>("IsPlayingText");
                TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");
                TextBlock opacityText = FindElement.ByName<TextBlock>("OpacityText");

                Verify.IsTrue(Convert.ToBoolean(isActiveText.DocumentText));
                Verify.IsTrue(Convert.ToBoolean(isIsIndeterminateText.DocumentText));

                Log.Comment("IsActive and IsIndeterminate set to true updates ProgressRing to Active state");

                Verify.AreEqual("Active", visualStateText.DocumentText);

                Log.Comment("Verity that opacity is 1 when Active");
                Verify.AreEqual("1", opacityText.DocumentText);

                Log.Comment("Verify Lottie animation is playing when in Active state");

                Verify.IsTrue(Convert.ToBoolean(isPlayingText.DocumentText));

                Log.Comment("IsActive set to True and IsIndeterminate set to false updates ProgressRing to DeterminateActive state");

                isIndeterminateCheckBox.ToggleAndWait();

                Verify.IsFalse(Convert.ToBoolean(isIsIndeterminateText.DocumentText));

                Verify.AreEqual("DeterminateActive", visualStateText.DocumentText);

                Log.Comment("Verify Lottie animation for Indeterminate player is not playing when in DeterminateActive state");
                Verify.IsFalse(Convert.ToBoolean(isPlayingText.DocumentText));

                Log.Comment("IsActive set to false updates ProgressRing to Inactive state");

                isActiveCheckBox.ToggleAndWait();

                Verify.AreEqual("Inactive", visualStateText.DocumentText);

                Log.Comment("Verify Lottie animation is not playing when in Inactive state");
                Verify.IsFalse(Convert.ToBoolean(isPlayingText.DocumentText));

                Wait.ForIdle();

                Log.Comment("Verity that opacity is 0 when Inactive");
                Verify.AreEqual("0", opacityText.DocumentText);
            }
        }

void StoryboardAnimationRetemplateTest ( ) [inline]

Definition at line 173 of file ProgressRingTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressRing Tests"))
            {
                Log.Comment("Navigate to Progress Ring Storyboard Animation Page");

                Button navigateToStoryBoardAnimationPage = FindElement.ByName<Button>("NavigateToStoryBoardAnimationPage");

                navigateToStoryBoardAnimationPage.InvokeAndWait();

                Log.Comment("Verify IsActive property is set to true by default for testing");

                ToggleButton storyboardAnimationIsActiveCheckBox = FindElement.ByName<ToggleButton>("StoryboardAnimationIsActiveCheckBox");

                TextBlock isActiveText = FindElement.ByName<TextBlock>("ShowIsActiveText");
                TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");

                Verify.IsTrue(Convert.ToBoolean(isActiveText.DocumentText));

                Log.Comment("IsActive set to true updates ProgressRing to Active state");

                Verify.AreEqual("Active", visualStateText.DocumentText);

                storyboardAnimationIsActiveCheckBox.ToggleAndWait();

                Log.Comment("IsActive set to false updates ProgressRing to Inactive state");
                Verify.AreEqual("Inactive", visualStateText.DocumentText);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 37 of file ProgressRingTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void UpdateMinMaxTest ( ) [inline]

Definition at line 232 of file ProgressRingTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressRing Tests"))
            {
                Log.Comment("Updating Minimum and Maximum value of ProgressBar");

                CheckBox indeterminateCheckBox = FindElement.ByName<CheckBox>("ShowIsIndeterminateCheckBox");
                indeterminateCheckBox.Uncheck();

                RangeValueSpinner progressRing = FindElement.ByName<RangeValueSpinner>("TestProgressRing");

                double oldMinimumInputText = progressRing.Minimum;
                double oldMaximumInputText = progressRing.Maximum;

                Edit minimumInput = FindElement.ByName<Edit>("MinimumInput");
                Edit maximumInput = FindElement.ByName<Edit>("MaximumInput");

                minimumInput.SetValue("10");
                maximumInput.SetValue("15");

                Button updateMinMaxButton = FindElement.ByName<Button>("UpdateMinMaxButton");
                updateMinMaxButton.InvokeAndWait();

                double newMinimumInputText = progressRing.Minimum;
                double newMaximumInputText = progressRing.Maximum;

                Verify.AreNotSame(oldMinimumInputText, newMinimumInputText, "Minimum updated");
                Verify.AreNotSame(oldMaximumInputText, newMaximumInputText, "Maximum updated");

                // Below edge cases are handled by Rangebase

                Log.Comment("Updating Minimum and Maximum when Maximum < Minimum");

                maximumInput.SetValue("5");
                updateMinMaxButton.InvokeAndWait();

                Verify.AreEqual(progressRing.Minimum, progressRing.Maximum, "Maximum updates to equal Minimum");

                Log.Comment("Updating Minimum and Maximum when Minimum > Value");

                minimumInput.SetValue("15");
                updateMinMaxButton.InvokeAndWait();

                Verify.AreEqual(progressRing.Value, progressRing.Minimum, "Value updates to equal Minimum");
                Verify.AreEqual(progressRing.Maximum, progressRing.Minimum, "Maximum also updates to equal Minimum");

                Log.Comment("Updating Minimum and Maximum to be a decimal number");

                minimumInput.SetValue("0.1");
                maximumInput.SetValue("1.1");

                updateMinMaxButton.InvokeAndWait();

                double oldValue = progressRing.Value;

                Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
                changeValueButton.InvokeAndWait();

                double newValue = progressRing.Value;
                double diff = Math.Abs(oldValue - newValue);

                Verify.IsGreaterThan(diff, Convert.ToDouble(0), "Value of ProgressBar increments properly within range with decimal Minimum and Maximum");
            }
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 43 of file ProgressRingTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressRing-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

void VerifyIndeterminateProgressRingDoesNotImplementRangeValuePattern ( ) [inline]

Definition at line 298 of file ProgressRingTests.cs.

        {
            using (var setup = new TestSetupHelper("ProgressRing Tests"))
            {
                UIObject progressRing = FindElement.ByName("Busy TestProgressRing");

                Verify.IsNotNull(progressRing);

                RangeValueImplementation rangeValueImplementation = new RangeValueImplementation(progressRing);

                Verify.IsFalse(rangeValueImplementation.IsAvailable);
            }
        }

The documentation for this class was generated from the following file:
  • ProgressRing/InteractionTests/ProgressRingTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrushTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RadialGradientBrushTests
Public Member Functions | Static Public Member Functions

RadialGradientBrushTests Class Reference

List of all members.

Public Member Functions

void | AddGradientStopTest ()
void | GradientRenderingTest ()
void | RemoveGradientStopTest ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 23 of file RadialGradientBrushTests.cs.

Member Function Documentation

void AddGradientStopTest ( ) [inline]

Definition at line 41 of file RadialGradientBrushTests.cs.

        {
            using (var setup = new TestSetupHelper("RadialGradientBrush Tests"))
            {
                Log.Comment("Adding GradientStop to RadialGradientBrush");

                Button replaceGradientButton = FindElement.ByName<Button>("ReplaceGradientButton");
                replaceGradientButton.Invoke();

                TextBlock gradientCountTextBlock = FindElement.ByName<TextBlock>("GradientStopCountText");

                int oldStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);

                Button addGradientStopButton = FindElement.ByName<Button>("AddGradientStopButton");
                addGradientStopButton.Invoke();

                int newStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);

                Verify.IsTrue((newStopCount - oldStopCount) == 1);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file RadialGradientBrushTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void GradientRenderingTest ( ) [inline]

Definition at line 94 of file RadialGradientBrushTests.cs.

        {
            using (var setup = new TestSetupHelper("RadialGradientBrush Tests"))
            {
                Log.Comment("Testing gradient rendering");

                var resultTextBox = new Edit(FindElement.ByName("ColorMatchTestResult"));

                using (var waiter = new ValueChangedEventWaiter(resultTextBox))
                {
                    Button generateRenderTargetBitmapButton = FindElement.ByName<Button>("GenerateRenderTargetBitmapButton");
                    generateRenderTargetBitmapButton.Invoke();

                    waiter.Wait();
                }

                Verify.AreEqual("Passed", resultTextBox.Value);
            }
        }

void RemoveGradientStopTest ( ) [inline]

Definition at line 64 of file RadialGradientBrushTests.cs.

        {
            using (var setup = new TestSetupHelper("RadialGradientBrush Tests"))
            {
                Log.Comment("Removing GradientStop from RadialGradientBrush");

                Button replaceGradientButton = FindElement.ByName<Button>("ReplaceGradientButton");
                replaceGradientButton.Invoke();

                TextBlock gradientCountTextBlock = FindElement.ByName<TextBlock>("GradientStopCountText");

                int oldStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);

                Button addGradientStopButton = FindElement.ByName<Button>("RemoveGradientStopButton");
                addGradientStopButton.Invoke();

                int newStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);

                if (oldStopCount == 0)
                {
                    Verify.IsTrue(newStopCount == 0);
                }
                else
                {
                    Verify.IsTrue((oldStopCount - newStopCount) == 1);
                }
            }
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file RadialGradientBrushTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

The documentation for this class was generated from the following file:
  • RadialGradientBrush/InteractionTests/RadialGradientBrushTests.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsFocusTestPageElements Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RadioButtonsFocusTestPageElements
Public Member Functions | Private Member Functions | Private Attributes

RadioButtonsFocusTestPageElements Class Reference

List of all members.

Public Member Functions

TextBlock | GetFocusedIndexTextBlock1 ()
TextBlock | GetFocusedIndexTextBlock2 ()
Edit | GetIndexToSelectTextBox1 ()
Edit | GetIndexToSelectTextBox2 ()
CheckBox | GetRadioButtons1HasFocusCheckBox ()
CheckBox | GetRadioButtons2HasFocusCheckBox ()
Button | GetSelectByIndexButton1 ()
Button | GetSelectByIndexButton2 ()
TextBlock | GetSelectedIndexTextBlock1 ()
TextBlock | GetSelectedIndexTextBlock2 ()
UIObject | GetTestRadioButtons1 ()
UIObject | GetTestRadioButtons2 ()

Private Member Functions

T | GetElement< T > (ref T element, string elementName)

Private Attributes

TextBlock | FocusedIndexTextBlock1
TextBlock | FocusedIndexTextBlock2
Edit | IndexToSelectTextBox1
Edit | IndexToSelectTextBox2
CheckBox | RadioButtons1HasFocusCheckBox
CheckBox | RadioButtons2HasFocusCheckBox
Button | SelectByIndexButton
Button | SelectByIndexButton2
TextBlock | SelectedIndexTextBlock1
TextBlock | SelectedIndexTextBlock2
UIObject | TestRadioButtons1
UIObject | TestRadioButtons2

Detailed Description

Definition at line 21 of file RadioButtonsFocusTestPageElements.cs.

Member Function Documentation

T GetElement< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
TextBlock GetFocusedIndexTextBlock1 ( ) [inline]

Definition at line 47 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref FocusedIndexTextBlock1, "FocusedIndexTextBlock1");
        }

TextBlock GetFocusedIndexTextBlock2 ( ) [inline]

Definition at line 53 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref FocusedIndexTextBlock2, "FocusedIndexTextBlock2");
        }

Edit GetIndexToSelectTextBox1 ( ) [inline]

Definition at line 71 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref IndexToSelectTextBox1, "IndexToSelectTextBox1");
        }

Edit GetIndexToSelectTextBox2 ( ) [inline]

Definition at line 77 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref IndexToSelectTextBox2, "IndexToSelectTextBox2");
        }

CheckBox GetRadioButtons1HasFocusCheckBox ( ) [inline]

Definition at line 59 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref RadioButtons1HasFocusCheckBox, "TestRadioButtons1HasFocusCheckBox");
        }

CheckBox GetRadioButtons2HasFocusCheckBox ( ) [inline]

Definition at line 65 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref RadioButtons2HasFocusCheckBox, "TestRadioButtons2HasFocusCheckBox");
        }

Button GetSelectByIndexButton1 ( ) [inline]

Definition at line 83 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref SelectByIndexButton, "SelectByIndexButton1");
        }

Button GetSelectByIndexButton2 ( ) [inline]

Definition at line 89 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref SelectByIndexButton2, "SelectByIndexButton2");
        }

TextBlock GetSelectedIndexTextBlock1 ( ) [inline]

Definition at line 35 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref SelectedIndexTextBlock1, "SelectedIndexTextBlock1");
        }

TextBlock GetSelectedIndexTextBlock2 ( ) [inline]

Definition at line 41 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref SelectedIndexTextBlock2, "SelectedIndexTextBlock2");
        }

UIObject GetTestRadioButtons1 ( ) [inline]

Definition at line 23 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref TestRadioButtons1, "TestRadioButtons1");
        }

UIObject GetTestRadioButtons2 ( ) [inline]

Definition at line 29 of file RadioButtonsFocusTestPageElements.cs.

        {
            return GetElement(ref TestRadioButtons2, "TestRadioButtons2");
        }

Member Data Documentation

TextBlock FocusedIndexTextBlock1 [private]

Definition at line 51 of file RadioButtonsFocusTestPageElements.cs.

TextBlock FocusedIndexTextBlock2 [private]

Definition at line 57 of file RadioButtonsFocusTestPageElements.cs.

Edit IndexToSelectTextBox1 [private]

Definition at line 75 of file RadioButtonsFocusTestPageElements.cs.

Edit IndexToSelectTextBox2 [private]

Definition at line 81 of file RadioButtonsFocusTestPageElements.cs.

CheckBox RadioButtons1HasFocusCheckBox [private]

Definition at line 63 of file RadioButtonsFocusTestPageElements.cs.

CheckBox RadioButtons2HasFocusCheckBox [private]

Definition at line 69 of file RadioButtonsFocusTestPageElements.cs.

Button SelectByIndexButton [private]

Definition at line 87 of file RadioButtonsFocusTestPageElements.cs.

Button SelectByIndexButton2 [private]

Definition at line 93 of file RadioButtonsFocusTestPageElements.cs.

TextBlock SelectedIndexTextBlock1 [private]

Definition at line 39 of file RadioButtonsFocusTestPageElements.cs.

TextBlock SelectedIndexTextBlock2 [private]

Definition at line 45 of file RadioButtonsFocusTestPageElements.cs.

UIObject TestRadioButtons1 [private]

Definition at line 27 of file RadioButtonsFocusTestPageElements.cs.

UIObject TestRadioButtons2 [private]

Definition at line 33 of file RadioButtonsFocusTestPageElements.cs.

The documentation for this class was generated from the following file:
  • RadioButtons/InteractionTests/RadioButtonsFocusTestPageElements.cs
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsTestPageElements Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RadioButtonsTestPageElements
Public Types | Public Member Functions | Private Member Functions | Private Attributes

RadioButtonsTestPageElements Class Reference

List of all members.

Public Types

enum | RadioButtonsSourceLocation { Items, ItemSource }
enum | RadioButtonsSourceType { String, RadioButton }

Public Member Functions

Edit | GetBorderWidthTextBox ()
Button | GetClearRadioButtonsEventsButton ()
CheckBox | GetCustomCheckedCheckBox ()
Edit | GetCustomContentTextBox ()
CheckBox | GetCustomDisabledCheckBox ()
Edit | GetCustomIndexTextBox ()
TextBlock | GetFocusedIndexTextBlock ()
TextBlock | GetFocusedItemTextBlock ()
Button | GetFocusSelectedItemButton ()
Edit | GetIndexToSelectTextBlock ()
Button | GetInsertDisplayRadioButtonButton ()
ComboBox | GetItemTypeComboBox ()
TextBlock | GetLayoutNumberOfColumnsTextBlock ()
TextBlock | GetLayoutNumberOfLargerColumnsTextBlock ()
TextBlock | GetLayoutNumberOfRowsTextBlock ()
Edit | GetMaxColumnsTextBlock ()
Edit | GetNumberOfItemsTextBlock ()
ListBox | GetRadioButtonsEventsList ()
CheckBox | GetRadioButtonsHasFocusCheckBox ()
TextBlock | GetReproTextBlock ()
Button | GetSelectByIndexButton ()
Button | GetSelectByItemButton ()
TextBlock | GetSelectedIndexTextBlock ()
TextBlock | GetSelectedItemTextBlock ()
TextBlock | GetSelectedPositionInSetTextBlock ()
TextBlock | GetSelectedSizeOfSetTextBlock ()
Button | GetSetBorderWidthButton ()
Button | GetSetMaxColumnsButton ()
Button | GetSetNumberOfItemsButton ()
ComboBox | GetSourceComboBox ()
UIObject | GetTestRadioButtons ()

Private Member Functions

T | GetElement< T > (ref T element, string elementName)

Private Attributes

Edit | BorderWidthTextBox
Button | ClearRadioButtonsEventsButton
CheckBox | CustomCheckedCheckBox
Edit | CustomContentTextBox
CheckBox | CustomDisabledCheckBox
Edit | CustomIndexTextBox
TextBlock | FocusedIndexTextBlock
TextBlock | FocusedItemTextBlock
Button | FocusSelectedItemButton
Edit | IndexToSelectTextBlock
Button | InsertDisplayRadioButtonButton
ComboBox | ItemTypeComboBox
TextBlock | LayoutNumberOfColumnsTextBlock
TextBlock | LayoutNumberOfLargerColumnsTextBlock
TextBlock | LayoutNumberOfRowsTextBlock
Edit | MaxColumnsTextBlock
Edit | NumberOfItemsTextBlock
ListBox | RadioButtonsEventsList
CheckBox | RadioButtonsHasFocusCheckBox
TextBlock | ReproTextBlock
Button | SelectByIndexButton
Button | SelectByItemButton
TextBlock | SelectedIndexTextBlock
TextBlock | SelectedItemTextBlock
TextBlock | SelectedPositionInSetTextBlock
TextBlock | SelectedSizeOfSetTextBlock
Button | SetBorderWidthButton
Button | SetMaxColumnsButton
Button | SetNumberOfItemsButton
ComboBox | SourceComboBox
UIObject | TestRadioButtons

Detailed Description

Definition at line 21 of file RadioButtonsTestPageElements.cs.

Member Enumeration Documentation

enum RadioButtonsSourceLocation
Enumerator:
Items
ItemSource

Definition at line 226 of file RadioButtonsTestPageElements.cs.

        {
            Items,
            ItemSource
        }

enum RadioButtonsSourceType
Enumerator:
String
RadioButton

Definition at line 220 of file RadioButtonsTestPageElements.cs.

        {
            String,
            RadioButton
        }

Member Function Documentation

Edit GetBorderWidthTextBox ( ) [inline]

Definition at line 185 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref BorderWidthTextBox, "BorderWidthTextBox");
        }

Button GetClearRadioButtonsEventsButton ( ) [inline]

Definition at line 167 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref ClearRadioButtonsEventsButton, "ClearRadioButtonsEventsButton");
        }

CheckBox GetCustomCheckedCheckBox ( ) [inline]

Definition at line 95 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref CustomCheckedCheckBox, "CustomCheckedCheckBox");
        }

Edit GetCustomContentTextBox ( ) [inline]

Definition at line 83 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref CustomContentTextBox, "CustomContentTextBox");
        }

CheckBox GetCustomDisabledCheckBox ( ) [inline]

Definition at line 89 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref CustomDisabledCheckBox, "CustomDisabledCheckBox");
        }

Edit GetCustomIndexTextBox ( ) [inline]

Definition at line 77 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref CustomIndexTextBox, "CustomIndexTextBox");
        }

T GetElement< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
TextBlock GetFocusedIndexTextBlock ( ) [inline]

Definition at line 137 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref FocusedIndexTextBlock, "FocusedIndexTextBlock");
        }

TextBlock GetFocusedItemTextBlock ( ) [inline]

Definition at line 143 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref FocusedItemTextBlock, "FocusedItemTextBlock");
        }

Button GetFocusSelectedItemButton ( ) [inline]

Definition at line 197 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref FocusSelectedItemButton, "FocusSelectedItemButton");
        }

Edit GetIndexToSelectTextBlock ( ) [inline]

Definition at line 53 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref IndexToSelectTextBlock, "IndexToSelectTextBlock");
        }

Button GetInsertDisplayRadioButtonButton ( ) [inline]

Definition at line 71 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref InsertDisplayRadioButtonButton, "InsertDisplayRadioButtonButton");
        }

ComboBox GetItemTypeComboBox ( ) [inline]

Definition at line 173 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref ItemTypeComboBox, "ItemTypeComboBox");
        }

TextBlock GetLayoutNumberOfColumnsTextBlock ( ) [inline]

Definition at line 155 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref LayoutNumberOfColumnsTextBlock, "LayoutNumberOfColumnsTextBlock");
        }

TextBlock GetLayoutNumberOfLargerColumnsTextBlock ( ) [inline]

Definition at line 161 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref LayoutNumberOfLargerColumnsTextBlock, "LayoutNumberOfLargerColumnsTextBlock");
        }

TextBlock GetLayoutNumberOfRowsTextBlock ( ) [inline]

Definition at line 149 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref LayoutNumberOfRowsTextBlock, "LayoutNumberOfRowsTextBlock");
        }

Edit GetMaxColumnsTextBlock ( ) [inline]

Definition at line 29 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref MaxColumnsTextBlock, "MaxColumnsTextBlock");
        }

Edit GetNumberOfItemsTextBlock ( ) [inline]

Definition at line 41 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref NumberOfItemsTextBlock, "NumberOfItemsTextBlock");
        }

ListBox GetRadioButtonsEventsList ( ) [inline]

Definition at line 203 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref RadioButtonsEventsList, "RadioButtonsEventsList");
        }

CheckBox GetRadioButtonsHasFocusCheckBox ( ) [inline]

Definition at line 131 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref RadioButtonsHasFocusCheckBox, "RadioButtonsHasFocusCheckBox");
        }

TextBlock GetReproTextBlock ( ) [inline]

Definition at line 107 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref ReproTextBlock, "ReproTextBlock");
        }

Button GetSelectByIndexButton ( ) [inline]

Definition at line 59 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SelectByIndexButton, "SelectByIndexButton");
        }

Button GetSelectByItemButton ( ) [inline]

Definition at line 65 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SelectByItemButton, "SelectByItemButton");
        }

TextBlock GetSelectedIndexTextBlock ( ) [inline]

Definition at line 101 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SelectedIndexTextBlock, "SelectedIndexTextBlock");
        }

TextBlock GetSelectedItemTextBlock ( ) [inline]

Definition at line 113 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SelectedItemTextBlock, "SelectedItemTextBlock");
        }

TextBlock GetSelectedPositionInSetTextBlock ( ) [inline]

Definition at line 119 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SelectedPositionInSetTextBlock, "SelectedPositionInSetTextBlock");
        }

TextBlock GetSelectedSizeOfSetTextBlock ( ) [inline]

Definition at line 125 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SelectedSizeOfSetTextBlock, "SelectedSizeOfSetTextBlock");
        }

Button GetSetBorderWidthButton ( ) [inline]

Definition at line 191 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SetBorderWidthButton, "SetBorderWidthButton");
        }

Button GetSetMaxColumnsButton ( ) [inline]

Definition at line 35 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SetMaxColumnsButton, "SetMaxColumnsButton");
        }

Button GetSetNumberOfItemsButton ( ) [inline]

Definition at line 47 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SetNumberOfItemsButton, "SetNumberOfItemsButton");
        }

ComboBox GetSourceComboBox ( ) [inline]

Definition at line 179 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref SourceComboBox, "SourceComboBox");
        }

UIObject GetTestRadioButtons ( ) [inline]

Definition at line 23 of file RadioButtonsTestPageElements.cs.

        {
            return GetElement(ref TestRadioButtons, "TestRadioButtons");
        }

Member Data Documentation

Edit BorderWidthTextBox [private]

Definition at line 189 of file RadioButtonsTestPageElements.cs.

Button ClearRadioButtonsEventsButton [private]

Definition at line 171 of file RadioButtonsTestPageElements.cs.

CheckBox CustomCheckedCheckBox [private]

Definition at line 99 of file RadioButtonsTestPageElements.cs.

Edit CustomContentTextBox [private]

Definition at line 87 of file RadioButtonsTestPageElements.cs.

CheckBox CustomDisabledCheckBox [private]

Definition at line 93 of file RadioButtonsTestPageElements.cs.

Edit CustomIndexTextBox [private]

Definition at line 81 of file RadioButtonsTestPageElements.cs.

TextBlock FocusedIndexTextBlock [private]

Definition at line 141 of file RadioButtonsTestPageElements.cs.

TextBlock FocusedItemTextBlock [private]

Definition at line 147 of file RadioButtonsTestPageElements.cs.

Button FocusSelectedItemButton [private]

Definition at line 201 of file RadioButtonsTestPageElements.cs.

Edit IndexToSelectTextBlock [private]

Definition at line 57 of file RadioButtonsTestPageElements.cs.

Button InsertDisplayRadioButtonButton [private]

Definition at line 75 of file RadioButtonsTestPageElements.cs.

ComboBox ItemTypeComboBox [private]

Definition at line 177 of file RadioButtonsTestPageElements.cs.

TextBlock LayoutNumberOfColumnsTextBlock [private]

Definition at line 159 of file RadioButtonsTestPageElements.cs.

TextBlock LayoutNumberOfLargerColumnsTextBlock [private]

Definition at line 165 of file RadioButtonsTestPageElements.cs.

TextBlock LayoutNumberOfRowsTextBlock [private]

Definition at line 153 of file RadioButtonsTestPageElements.cs.

Edit MaxColumnsTextBlock [private]

Definition at line 33 of file RadioButtonsTestPageElements.cs.

Edit NumberOfItemsTextBlock [private]

Definition at line 45 of file RadioButtonsTestPageElements.cs.

ListBox RadioButtonsEventsList [private]

Definition at line 207 of file RadioButtonsTestPageElements.cs.

CheckBox RadioButtonsHasFocusCheckBox [private]

Definition at line 135 of file RadioButtonsTestPageElements.cs.

TextBlock ReproTextBlock [private]

Definition at line 111 of file RadioButtonsTestPageElements.cs.

Button SelectByIndexButton [private]

Definition at line 63 of file RadioButtonsTestPageElements.cs.

Button SelectByItemButton [private]

Definition at line 69 of file RadioButtonsTestPageElements.cs.

TextBlock SelectedIndexTextBlock [private]

Definition at line 105 of file RadioButtonsTestPageElements.cs.

TextBlock SelectedItemTextBlock [private]

Definition at line 117 of file RadioButtonsTestPageElements.cs.

TextBlock SelectedPositionInSetTextBlock [private]

Definition at line 123 of file RadioButtonsTestPageElements.cs.

TextBlock SelectedSizeOfSetTextBlock [private]

Definition at line 129 of file RadioButtonsTestPageElements.cs.

Button SetBorderWidthButton [private]

Definition at line 195 of file RadioButtonsTestPageElements.cs.

Button SetMaxColumnsButton [private]

Definition at line 39 of file RadioButtonsTestPageElements.cs.

Button SetNumberOfItemsButton [private]

Definition at line 51 of file RadioButtonsTestPageElements.cs.

ComboBox SourceComboBox [private]

Definition at line 183 of file RadioButtonsTestPageElements.cs.

UIObject TestRadioButtons [private]

Definition at line 27 of file RadioButtonsTestPageElements.cs.

The documentation for this class was generated from the following file:
  • RadioButtons/InteractionTests/RadioButtonsTestPageElements.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RadioButtonsTests
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

RadioButtonsTests Class Reference

List of all members.

Public Member Functions

void | AccessKeys ()
void | BasicKeyboardTest ()
void | ColumnsTest ()
void | ControlKeyKeyboardTest ()
void | DisabledItemsAtTopOfColumnKeyboardTest ()
void | DisabledItemsKeyboardTest ()
void | FocusComingFromAnotherRepeaterTest ()
void | GamepadCanEscapeAndDoesNotSelectWithFocus ()
void | InsertedCheckedRadioButtonGetsSelection ()
void | MultiColumnKeyboardTest ()
void | RS2MultiColumnKeyboardTest ()
void | ScrollViewerSettingSelectionDoesNotMoveFocus ()
void | SelectByItem ()
void | SelectionTest ()
void | SingleRowKeyboardTest ()
void | TestCleanup ()
void | UIAProperties ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | BackupTap (int index)
void | ClickOnItem (int index)
int | GetFocusedIndex ()
string | GetFocusedItem ()
Tuple< int, int, int > | GetLayoutData ()
int | GetSelectedIndex ()
string | GetSelectedItem ()
void | InsertDisabledRadioButton (int index, bool isChecked=false, string content="Custom")
void | InsertEnabledRadioButton (int index, bool isChecked=false, string content="Custom")
void | InsertRadioButton (int index, bool disabled, bool isChecked=false, string content="Custom")
void | SelectByIndex (int index)
void | SelectByItem (int index)
void | SetBorderWidth (float width)
void | SetBorderWidthToInf ()
void | SetIndexToSelect (int index)
void | SetItemType (RadioButtonsSourceType type)
void | SetNumberOfColumns (int columns)
void | SetNumberOfItems (int items)
void | SetSource (RadioButtonsSourceLocation location)
void | TapOnItem (int index, bool useBackup=false)
void | UseAccessKey ()
void | VerifyFocusedIndex (int index)
void | VerifyLayoutData (int rows, int columns, int largerColumns)
void | VerifyRadioButtonsHasFocus (bool hasFocus)
void | VerifySelectedFocusedIndex (int index)
void | VerifySelectedIndex (int index)
void | VerifySelectedPositionInSet (int index)
void | VerifySelectedSizeOfSet (int index)

Private Attributes

RadioButtonsTestPageElements elements

Detailed Description

Definition at line 26 of file RadioButtonsTests.cs.

Member Function Documentation

void AccessKeys ( ) [inline]

Definition at line 720 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        SetNumberOfItems(10);

                        VerifyRadioButtonsHasFocus(false);
                        UseAccessKey();
                        VerifyFocusedIndex(0);
                        VerifySelectedIndex(-1);

                        SelectByIndex(3);
                        VerifySelectedIndex(3);
                        VerifyFocusedIndex(-1);

                        KeyboardHelper.PressKey(Key.Tab);
                        VerifyRadioButtonsHasFocus(false);
                        UseAccessKey();
                        VerifySelectedFocusedIndex(3);
                        UseAccessKey();
                        VerifySelectedFocusedIndex(3);
                    }
                }
            }
        }

void BackupTap ( int index ) [inline, private]

Definition at line 903 of file RadioButtonsTests.cs.

        {
            SelectByIndex(index);
            elements.GetFocusSelectedItemButton().Click();
        }

void BasicKeyboardTest ( ) [inline]

Definition at line 197 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        bool useBackup = type == RadioButtonsSourceType.String;
                        SetItemType(type);
                        TapOnItem(3, useBackup);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Down);
                        VerifySelectedFocusedIndex(4);
                        KeyboardHelper.PressKey(Key.Up);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(3);

                        TapOnItem(0, useBackup);
                        VerifySelectedFocusedIndex(0);
                        KeyboardHelper.PressKey(Key.Up);
                        VerifySelectedFocusedIndex(0);

                        TapOnItem(9, useBackup);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Down);
                        VerifySelectedFocusedIndex(9);
                    }
                }
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 35 of file RadioButtonsTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClickOnItem ( int index ) [inline, private]

Definition at line 875 of file RadioButtonsTests.cs.

        {
            Log.Comment("Clicking on item 'Radio Button " + index + "'");
            RadioButton item = FindElement.ByName<RadioButton>("Radio Button " + index);
            item.Click();
        }

void ColumnsTest ( ) [inline]

Definition at line 580 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        SetNumberOfColumns(1);
                        SetNumberOfItems(10);
                        SetBorderWidthToInf();

                        VerifyLayoutData(10, 1, 0);
                        SetNumberOfColumns(3);
                        VerifyLayoutData(3, 3, 1);
                        SetNumberOfColumns(5);
                        VerifyLayoutData(2, 5, 0);
                        SetNumberOfColumns(7);
                        VerifyLayoutData(1, 7, 3);
                        SetNumberOfColumns(10);
                        VerifyLayoutData(1, 10, 0);
                        SetNumberOfColumns(20);
                        VerifyLayoutData(1, 10, 0);

                        SetNumberOfItems(77);
                        VerifyLayoutData(3, 20, 17);

                        SetBorderWidth(100);
                        VerifyLayoutData(77, 1, 0);
                        SetBorderWidth(200);
                        VerifyLayoutData(77, 1, 0);
                        SetBorderWidth(300);
                        VerifyLayoutData(38, 2, 1);
                        SetBorderWidth(500);
                        VerifyLayoutData(25, 3, 2);
                        SetBorderWidth(550);
                        VerifyLayoutData(19, 4, 1);
                    }
                }
            }
        }

void ControlKeyKeyboardTest ( ) [inline]

Definition at line 554 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        bool useBackup = type == RadioButtonsSourceType.String;
                        TapOnItem(3, useBackup);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                        KeyboardHelper.PressKey(Key.Down);
                        KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
                        VerifySelectedIndex(3);
                        VerifyFocusedIndex(4);
                    }
                }
            }
        }

void DisabledItemsAtTopOfColumnKeyboardTest ( ) [inline]

Definition at line 400 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                SetItemType(RadioButtonsSourceType.RadioButton);
                SetNumberOfColumns(3);
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);

                    SetNumberOfItems(10);
                    InsertDisabledRadioButton(5);
                    InsertDisabledRadioButton(5);
                    InsertDisabledRadioButton(5);

                    TapOnItem(0);
                    VerifySelectedFocusedIndex(0);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(9);
                    TapOnItem(1);
                    VerifySelectedFocusedIndex(1);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(10);
                    TapOnItem(2);
                    VerifySelectedFocusedIndex(2);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(11);
                    TapOnItem(3);
                    VerifySelectedFocusedIndex(3);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(8);
                    TapOnItem(4);
                    VerifySelectedFocusedIndex(4);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(8);
                    TapOnItem(6);
                    VerifySelectedFocusedIndex(9);
                    KeyboardHelper.PressKey(Key.Left);
                    VerifySelectedFocusedIndex(0);
                    TapOnItem(7);
                    VerifySelectedFocusedIndex(10);
                    KeyboardHelper.PressKey(Key.Left);
                    VerifySelectedFocusedIndex(1);
                    TapOnItem(8);
                    VerifySelectedFocusedIndex(11);
                    KeyboardHelper.PressKey(Key.Left);
                    VerifySelectedFocusedIndex(2);
                    TapOnItem(9);
                    VerifySelectedFocusedIndex(12);
                    KeyboardHelper.PressKey(Key.Left);
                    VerifySelectedFocusedIndex(8);

                    ElementCache.Clear();
                }
            }
        }

void DisabledItemsKeyboardTest ( ) [inline]

Definition at line 333 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                SetItemType(RadioButtonsSourceType.RadioButton);
                SetNumberOfColumns(3);
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);

                    SetNumberOfItems(10);
                    InsertDisabledRadioButton(10);
                    TapOnItem(7);
                    VerifySelectedFocusedIndex(7);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(9);
                    KeyboardHelper.PressKey(Key.Left);
                    VerifySelectedFocusedIndex(5);
                    KeyboardHelper.PressKey(Key.Down);
                    VerifySelectedFocusedIndex(6);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(9);
                    //There is a known bug here where pressing down or right will put focus
                    //On the first item because RadioButton handles the event.
                    //RadioButtons doesn't catch this because it only catches when the
                    //Last item is focused, but that item is disabled here...
                    //Bug #1654
                    //KeyboardHelper.PressKey(Key.Down);
                    //VerifySelectedFocusedIndex(9);
                    //KeyboardHelper.PressKey(Key.Right);
                    //VerifySelectedFocusedIndex(9);

                    InsertDisabledRadioButton(6);
                    InsertDisabledRadioButton(6);

                    TapOnItem(1);
                    VerifySelectedFocusedIndex(1);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(10);
                    TapOnItem(2);
                    VerifySelectedFocusedIndex(2);
                    KeyboardHelper.PressKey(Key.Right);
                    VerifySelectedFocusedIndex(11);
                    TapOnItem(5);
                    KeyboardHelper.PressKey(Key.Up);
                    VerifySelectedFocusedIndex(4);
                    KeyboardHelper.PressKey(Key.Down);
                    VerifySelectedFocusedIndex(5);
                    KeyboardHelper.PressKey(Key.Down);
                    VerifySelectedFocusedIndex(8);
                    TapOnItem(8);
                    VerifySelectedFocusedIndex(10);
                    KeyboardHelper.PressKey(Key.Left);
                    VerifySelectedFocusedIndex(1);
                    TapOnItem(9);
                    VerifySelectedFocusedIndex(11);
                    KeyboardHelper.PressKey(Key.Left);
                    VerifySelectedFocusedIndex(2);

                    ElementCache.Clear();
                }
            }
        }

void FocusComingFromAnotherRepeaterTest ( ) [inline]

Definition at line 105 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtonsFocus Test" }))
            {
                var elements = new RadioButtonsFocusTestPageElements();

                // Select items
                SelectByIndex(1, false);
                SelectByIndex(2, true);

                // Verify selection
                VerifySelectedIndex(1, false);
                VerifySelectedIndex(2, true);

                VerifyRadioButtonsHasFocus(true, false);

                // Move focus to second RadioButtons control by pressing TAB
                KeyboardHelper.PressKey(Key.Tab);

                // Verify that
                // - the first RadioButtons control no longer has focus and
                // - the third radio button of the second RadioButtons control now has focus
                VerifyRadioButtonsHasFocus(false, false);
                VerifySelectedFocusedIndex(2, true);

                // Move focus to the first RadioButtons control by pressing TAB again
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);

                // Verify that the second radio button is still selected and now has focus
                VerifySelectedFocusedIndex(1, false);

                void SelectByIndex(int index, bool checkRadioButtons2)
                {
                    if (checkRadioButtons2)
                    {
                        elements.GetIndexToSelectTextBox2().SetValue(index.ToString());
                        elements.GetSelectByIndexButton2().Click();
                    }
                    else
                    {
                        elements.GetIndexToSelectTextBox1().SetValue(index.ToString());
                        elements.GetSelectByIndexButton1().Click();
                    }
                }

                void VerifySelectedIndex(int index, bool checkRadioButtons2)
                {
                    if (checkRadioButtons2)
                    {
                        Verify.AreEqual(index, Int32.Parse(elements.GetSelectedIndexTextBlock2().DocumentText), $"RadioButton with index {index} should have been selected.");
                    }
                    else
                    {
                        Verify.AreEqual(index, Int32.Parse(elements.GetSelectedIndexTextBlock1().DocumentText), $"RadioButton with index {index} should have been selected.");
                    }
                }

                void VerifyRadioButtonsHasFocus(bool hasFocus, bool checkRadioButtons2)
                {
                    if (checkRadioButtons2)
                    {
                        Verify.AreEqual(hasFocus, elements.GetRadioButtons2HasFocusCheckBox().ToggleState == ToggleState.On);
                    }
                    else
                    {
                        Verify.AreEqual(hasFocus, elements.GetRadioButtons1HasFocusCheckBox().ToggleState == ToggleState.On);
                    }
                }

                void VerifyFocusedIndex(int index, bool checkRadioButtons2)
                {
                    if (checkRadioButtons2)
                    {
                        Verify.AreEqual(index, Int32.Parse(elements.GetFocusedIndexTextBlock2().DocumentText), $"RadioButton with index {index} should have focus.");
                    }
                    else
                    {
                        Verify.AreEqual(index, Int32.Parse(elements.GetFocusedIndexTextBlock1().DocumentText), $"RadioButton with index {index} should have focus.");
                    }

                }

                void VerifySelectedFocusedIndex(int index, bool checkRadioButtons2)
                {
                    VerifySelectedIndex(index, checkRadioButtons2);
                    VerifyFocusedIndex(index, checkRadioButtons2);
                }
            }
        }

void GamepadCanEscapeAndDoesNotSelectWithFocus ( ) [inline]

Definition at line 509 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        bool useBackup = type == RadioButtonsSourceType.String;
                        SetNumberOfColumns(3);

                        TapOnItem(9, useBackup);
                        VerifySelectedFocusedIndex(9);
                        GamepadHelper.PressButton(null, GamepadButton.DPadDown);
                        VerifyRadioButtonsHasFocus(false);

                        TapOnItem(0, useBackup);
                        VerifySelectedFocusedIndex(0);
                        GamepadHelper.PressButton(null, GamepadButton.DPadUp);
                        VerifyRadioButtonsHasFocus(false);

                        TapOnItem(7, useBackup);
                        VerifySelectedFocusedIndex(7);
                        GamepadHelper.PressButton(null, GamepadButton.DPadRight);
                        VerifyRadioButtonsHasFocus(false);

                        TapOnItem(7, useBackup);
                        VerifySelectedFocusedIndex(7);
                        GamepadHelper.PressButton(null, GamepadButton.DPadDown);
                        VerifySelectedIndex(7);
                        VerifyFocusedIndex(8);

                        GamepadHelper.PressButton(null, GamepadButton.DPadLeft);
                        VerifySelectedIndex(7);
                        VerifyFocusedIndex(5);
                    }
                }
            }
        }

int GetFocusedIndex ( ) [inline, private]

Definition at line 848 of file RadioButtonsTests.cs.

        {
            return Int32.Parse(elements.GetFocusedIndexTextBlock().DocumentText);
        }

string GetFocusedItem ( ) [inline, private]

Definition at line 853 of file RadioButtonsTests.cs.

        {
            return elements.GetFocusedItemTextBlock().DocumentText;
        }

Tuple<int, int, int> GetLayoutData ( ) [inline, private]

Definition at line 858 of file RadioButtonsTests.cs.

        {
            return new Tuple<int, int, int>(
                Int32.Parse(elements.GetLayoutNumberOfRowsTextBlock().DocumentText),
                Int32.Parse(elements.GetLayoutNumberOfColumnsTextBlock().DocumentText),
                Int32.Parse(elements.GetLayoutNumberOfLargerColumnsTextBlock().DocumentText)
            );
        }

int GetSelectedIndex ( ) [inline, private]

Definition at line 838 of file RadioButtonsTests.cs.

        {
            return Int32.Parse(elements.GetSelectedIndexTextBlock().DocumentText);
        }

string GetSelectedItem ( ) [inline, private]

Definition at line 843 of file RadioButtonsTests.cs.

        {
            return elements.GetSelectedItemTextBlock().DocumentText;
        }

void InsertDisabledRadioButton | ( | int | index,
 |  | bool | isChecked = false,
 |  | string | content = "Custom" |
 | ) |  |  | [inline, private]

Definition at line 803 of file RadioButtonsTests.cs.

        {
            InsertRadioButton(index, true, isChecked, content);
        }

void InsertedCheckedRadioButtonGetsSelection ( ) [inline]

Definition at line 674 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                SetItemType(RadioButtonsSourceType.RadioButton);
                SetSource(RadioButtonsSourceLocation.ItemSource);

                SelectByIndex(3);
                VerifySelectedIndex(3);

                InsertEnabledRadioButton(6, /*isChecked*/true);
                VerifySelectedIndex(6);
            }
        }

void InsertEnabledRadioButton | ( | int | index,
 |  | bool | isChecked = false,
 |  | string | content = "Custom" |
 | ) |  |  | [inline, private]

Definition at line 808 of file RadioButtonsTests.cs.

        {
            InsertRadioButton(index, false, isChecked, content);
        }

void InsertRadioButton | ( | int | index,
 |  | bool | disabled,
 |  | bool | isChecked = false,
 |  | string | content = "Custom" |
 | ) |  |  | [inline, private]

Definition at line 813 of file RadioButtonsTests.cs.

        {
            if (disabled)
            {
                elements.GetCustomDisabledCheckBox().Check();
            }
            else
            {
                elements.GetCustomDisabledCheckBox().Uncheck();
            }

            if(isChecked)
            {
                elements.GetCustomCheckedCheckBox().Check();
            }
            else
            {
                elements.GetCustomCheckedCheckBox().Uncheck();
            }

            elements.GetCustomIndexTextBox().SetValue(index.ToString());
            elements.GetCustomContentTextBox().SetValue(content);
            elements.GetInsertDisplayRadioButtonButton().Click();
        }

void MultiColumnKeyboardTest ( ) [inline]

Definition at line 236 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        bool useBackup = type == RadioButtonsSourceType.String;
                        SetNumberOfColumns(3);
                        TapOnItem(3, useBackup);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Down);
                        VerifySelectedFocusedIndex(4);
                        KeyboardHelper.PressKey(Key.Up);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(6);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(6);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(2);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(2);

                        TapOnItem(0, useBackup);
                        VerifySelectedFocusedIndex(0);
                        KeyboardHelper.PressKey(Key.Up);
                        VerifySelectedFocusedIndex(0);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(0);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(4);

                        TapOnItem(9, useBackup);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Down);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(6);
                    }
                }
            }
        }

void RS2MultiColumnKeyboardTest ( ) [inline]

Definition at line 458 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        bool useBackup = type == RadioButtonsSourceType.String;
                        SetNumberOfColumns(3);
                        TapOnItem(3, useBackup);
                        VerifySelectedFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Down);
                        VerifyFocusedIndex(4);
                        KeyboardHelper.PressKey(Key.Up);
                        VerifyFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifyFocusedIndex(2);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifyFocusedIndex(3);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifyFocusedIndex(4);
                        VerifySelectedIndex(3);

                        TapOnItem(9, useBackup);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifyFocusedIndex(8);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifyFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifyFocusedIndex(0);
                        KeyboardHelper.PressKey(Key.Tab);
                        VerifyFocusedIndex(1);
                        VerifySelectedIndex(9);

                        TapOnItem(9, useBackup);
                        VerifySelectedFocusedIndex(9);
                        KeyboardHelper.PressKey(Key.Tab);
                        VerifyRadioButtonsHasFocus(false);
                    }
                }
            }
        }

void ScrollViewerSettingSelectionDoesNotMoveFocus ( ) [inline]

Definition at line 692 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        SelectByIndex(3);
                        VerifySelectedIndex(3);
                        VerifyRadioButtonsHasFocus(false);

                        elements.GetReproTextBlock().Click();
                        VerifySelectedIndex(3);
                        // This behavior is probably wrong, it is probably more correct for focus to be on the selected item...
                        VerifyFocusedIndex(0);

                        KeyboardHelper.PressKey(Key.Down);
                        VerifySelectedFocusedIndex(1);
                    }
                }
            }
        }

void SelectByIndex ( int index ) [inline, private]

Definition at line 909 of file RadioButtonsTests.cs.

        {
            SetIndexToSelect(index);
            elements.GetSelectByIndexButton().Click();
        }

void SelectByItem ( int index ) [inline, private]

Definition at line 915 of file RadioButtonsTests.cs.

        {
            SetIndexToSelect(index);
            elements.GetSelectByItemButton().Click();
        }

void SelectByItem ( ) [inline]

Definition at line 73 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                SetItemType(RadioButtonsSourceType.RadioButton);
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        if (location == RadioButtonsSourceLocation.Items && type == RadioButtonsSourceType.String)
                        {
                            // This is broken due to issue #1674. The items collection does not have a way to compare
                            // boxed strings for equality.
                            continue;
                        }

                        SetItemType(type);

                        SelectByItem(1);
                        VerifySelectedIndex(1);

                        SelectByItem(3);
                        VerifySelectedIndex(3);
                    }
                }
            }
        }

void SelectionTest ( ) [inline]

Definition at line 47 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                SetItemType(RadioButtonsSourceType.RadioButton);
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);

                    SelectByIndex(1);
                    VerifySelectedIndex(1);
                    RadioButton item1 = FindElement.ByName<RadioButton>("Radio Button 1");
                    Verify.IsTrue(item1.IsSelected);

                    SelectByItem(3);
                    VerifySelectedIndex(3);
                    RadioButton item3 = FindElement.ByName<RadioButton>("Radio Button 3");
                    Verify.IsTrue(item3.IsSelected);
                    Verify.IsFalse(item1.IsSelected);
                }
            }
        }

void SetBorderWidth ( float width ) [inline, private]

Definition at line 765 of file RadioButtonsTests.cs.

        {
            elements.GetBorderWidthTextBox().SetValue(width.ToString());
            elements.GetSetBorderWidthButton().Click();
        }

void SetBorderWidthToInf ( ) [inline, private]

Definition at line 771 of file RadioButtonsTests.cs.

        {
            elements.GetBorderWidthTextBox().SetValue("inf");
            elements.GetSetBorderWidthButton().Click();
        }

void SetIndexToSelect ( int index ) [inline, private]

Definition at line 921 of file RadioButtonsTests.cs.

        {
            elements.GetIndexToSelectTextBlock().SetValue(index.ToString());
        }

void SetItemType ( RadioButtonsSourceType type ) [inline, private]

Definition at line 790 of file RadioButtonsTests.cs.

        {
            switch(type)
            {
                case RadioButtonsSourceType.String:
                    elements.GetItemTypeComboBox().SelectItemByName("StringsComboBoxItem");
                    break;
                case RadioButtonsSourceType.RadioButton:
                    elements.GetItemTypeComboBox().SelectItemByName("RadioButtonElementsComboBoxItem");
                    break;
            }
        }

void SetNumberOfColumns ( int columns ) [inline, private]

Definition at line 753 of file RadioButtonsTests.cs.

        {
            elements.GetMaxColumnsTextBlock().SetValue(columns.ToString());
            elements.GetSetMaxColumnsButton().Click();
        }

void SetNumberOfItems ( int items ) [inline, private]

Definition at line 759 of file RadioButtonsTests.cs.

        {
            elements.GetNumberOfItemsTextBlock().SetValue(items.ToString());
            elements.GetSetNumberOfItemsButton().Click();
        }

void SetSource ( RadioButtonsSourceLocation location ) [inline, private]

Definition at line 777 of file RadioButtonsTests.cs.

        {
            switch(location)
            {
                case RadioButtonsSourceLocation.Items:
                    elements.GetSourceComboBox().SelectItemByName("ItemsComboBoxItem");
                    break;
                case RadioButtonsSourceLocation.ItemSource:
                    elements.GetSourceComboBox().SelectItemByName("ItemsSourceComboBoxItem");
                    break;
            }
        }

void SingleRowKeyboardTest ( ) [inline]

Definition at line 294 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                foreach (RadioButtonsSourceLocation location in Enum.GetValues(typeof(RadioButtonsSourceLocation)))
                {
                    SetSource(location);
                    foreach (RadioButtonsSourceType type in Enum.GetValues(typeof(RadioButtonsSourceType)))
                    {
                        SetItemType(type);
                        bool useBackup = type == RadioButtonsSourceType.String;
                        SetNumberOfColumns(3);
                        SetNumberOfItems(3);
                        TapOnItem(0, useBackup);
                        VerifySelectedFocusedIndex(0);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(1);
                        KeyboardHelper.PressKey(Key.Right);
                        VerifySelectedFocusedIndex(2);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(1);
                        KeyboardHelper.PressKey(Key.Left);
                        VerifySelectedFocusedIndex(0);
                        KeyboardHelper.PressKey(Key.Down);
                        VerifySelectedFocusedIndex(1);
                        KeyboardHelper.PressKey(Key.Down);
                        VerifySelectedFocusedIndex(2);
                        KeyboardHelper.PressKey(Key.Up);
                        VerifySelectedFocusedIndex(1);
                        KeyboardHelper.PressKey(Key.Up);
                        VerifySelectedFocusedIndex(0);
                    }
                }
            }
        }

void TapOnItem | ( | int | index,
 |  | bool | useBackup = false |
 | ) |  |  | [inline, private]

Definition at line 889 of file RadioButtonsTests.cs.

        {
            if (useBackup)
            {
                BackupTap(index);
            }
            else
            {
                Log.Comment("Clicking on item 'Radio Button " + index + "'");
                RadioButton item = FindElement.ByName<RadioButton>("Radio Button " + index);
                item.Click();
            }
        }

void TestCleanup ( ) [inline]

Definition at line 40 of file RadioButtonsTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void UIAProperties ( ) [inline]

Definition at line 627 of file RadioButtonsTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "RadioButtons Tests", "RadioButtons Test" }))
            {
                elements = new RadioButtonsTestPageElements();
                SetItemType(RadioButtonsSourceType.RadioButton);
                SetSource(RadioButtonsSourceLocation.ItemSource);

                Log.Comment("Verify the header is set as the name for the RadioButtons control.");
                UIObject groupElement = TryFindElement.ByName("More Radio Buttons");
                Verify.IsTrue(groupElement.ControlType == ControlType.Group);

                SelectByIndex(1);
                VerifySelectedIndex(1);
                VerifySelectedPositionInSet(2);
                VerifySelectedSizeOfSet(10);

                SetNumberOfColumns(3);
                VerifySelectedIndex(1);
                VerifySelectedPositionInSet(2);
                VerifySelectedSizeOfSet(10);

                InsertEnabledRadioButton(0);
                VerifySelectedIndex(2);
                VerifySelectedPositionInSet(3);
                VerifySelectedSizeOfSet(11);

                InsertEnabledRadioButton(10);
                VerifySelectedIndex(2);
                VerifySelectedPositionInSet(3);
                VerifySelectedSizeOfSet(12);

                SelectByIndex(10);
                VerifySelectedIndex(10);
                VerifySelectedPositionInSet(11);
                VerifySelectedSizeOfSet(12);

                SetNumberOfItems(17);
                SelectByIndex(16);
                VerifySelectedIndex(16);
                VerifySelectedPositionInSet(17);
                VerifySelectedSizeOfSet(17);
            }
        }

void UseAccessKey ( ) [inline, private]

Definition at line 882 of file RadioButtonsTests.cs.

        {
            KeyboardHelper.PressDownModifierKey(ModifierKey.Alt);
            KeyboardHelper.PressKey(Key.R);
            KeyboardHelper.ReleaseModifierKey(ModifierKey.Alt);
        }

void VerifyFocusedIndex ( int index ) [inline, private]

Definition at line 951 of file RadioButtonsTests.cs.

        {
            Verify.AreEqual(index, Int32.Parse(elements.GetFocusedIndexTextBlock().DocumentText));
        }

void VerifyLayoutData | ( | int | rows,
 |  | int | columns,
 |  | int | largerColumns |
 | ) |  |  | [inline, private]

Definition at line 867 of file RadioButtonsTests.cs.

        {
            var data = GetLayoutData();
            Verify.AreEqual(rows, data.Item1);
            Verify.AreEqual(columns, data.Item2);
            Verify.AreEqual(largerColumns, data.Item3);
        }

void VerifyRadioButtonsHasFocus ( bool hasFocus ) [inline, private]

Definition at line 941 of file RadioButtonsTests.cs.

        {
            Verify.AreEqual(hasFocus, elements.GetRadioButtonsHasFocusCheckBox().ToggleState == ToggleState.On);
        }

void VerifySelectedFocusedIndex ( int index ) [inline, private]

Definition at line 935 of file RadioButtonsTests.cs.

        {
            VerifySelectedIndex(index);
            VerifyFocusedIndex(index);
        }

void VerifySelectedIndex ( int index ) [inline, private]

Definition at line 946 of file RadioButtonsTests.cs.

        {
            Verify.AreEqual(index, Int32.Parse(elements.GetSelectedIndexTextBlock().DocumentText));
        }

void VerifySelectedPositionInSet ( int index ) [inline, private]

Definition at line 926 of file RadioButtonsTests.cs.

        {
            Verify.AreEqual(index, Int32.Parse(elements.GetSelectedPositionInSetTextBlock().DocumentText));
        }

void VerifySelectedSizeOfSet ( int index ) [inline, private]

Definition at line 930 of file RadioButtonsTests.cs.

        {
            Verify.AreEqual(index, Int32.Parse(elements.GetSelectedSizeOfSetTextBlock().DocumentText));
        }

Member Data Documentation

RadioButtonsTestPageElements elements [private]

Definition at line 28 of file RadioButtonsTests.cs.

The documentation for this class was generated from the following file:
  • RadioButtons/InteractionTests/RadioButtonsTests.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItemTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RadioMenuFlyoutItemTests
Public Member Functions | Static Public Member Functions | Private Attributes

RadioMenuFlyoutItemTests Class Reference

List of all members.

Public Member Functions

void | BasicTest ()
void | InvokeItem (string flyoutButtonName, string itemName)
void | InvokeSubItem (string flyoutButtonName, string menuName, string itemName)
void | SubMenuTest ()
void | TestCleanup ()
void | VerifySelectedItems (string item1, string item2, string item3)

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Attributes

List< string > | Items

Detailed Description

Definition at line 23 of file RadioMenuFlyoutItemTests.cs.

Member Function Documentation

void BasicTest ( ) [inline]

Definition at line 54 of file RadioMenuFlyoutItemTests.cs.

        {
            using (var setup = new TestSetupHelper("RadioMenuFlyoutItem Tests"))
            {
                Log.Comment("Verify initial states");
                VerifySelectedItems("Orange", "Compact", "Name");

                InvokeItem("FlyoutButton", "YellowItem");
                VerifySelectedItems("Yellow", "Compact", "Name");

                InvokeItem("FlyoutButton", "ExpandedItem");
                VerifySelectedItems("Yellow", "Expanded", "Name");

                Log.Comment("Verify you can't uncheck an item");
                InvokeItem("FlyoutButton", "YellowItem");
                VerifySelectedItems("Yellow", "Expanded", "Name");
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 29 of file RadioMenuFlyoutItemTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void InvokeItem | ( | string | flyoutButtonName,
 |  | string | itemName |
 | ) |  |  | [inline]

Definition at line 87 of file RadioMenuFlyoutItemTests.cs.

        {
            Log.Comment("Open flyout by clicking " + flyoutButtonName);
            Button flyoutButton = FindElement.ByName<Button>(flyoutButtonName);
            flyoutButton.InvokeAndWait();

            Log.Comment("Toggle item: " + itemName);
            ToggleButton toggleMenuItem = FindElement.ByName<ToggleButton>(itemName);
            toggleMenuItem.ToggleAndWait();
        }

void InvokeSubItem | ( | string | flyoutButtonName,
 |  | string | menuName,
 |  | string | itemName |
 | ) |  |  | [inline]

Definition at line 98 of file RadioMenuFlyoutItemTests.cs.

        {
            Log.Comment("Open flyout by clicking " + flyoutButtonName);
            Button flyoutButton = FindElement.ByName<Button>(flyoutButtonName);
            flyoutButton.InvokeAndWait();

            Log.Comment("Open Menu: " + menuName);
            Button menuItem = FindElement.ByName<Button>(menuName);
            menuItem.InvokeAndWait();

            Log.Comment("Toggle item: " + itemName);
            ToggleButton toggleMenuItem = FindElement.ByName<ToggleButton>(itemName);
            toggleMenuItem.ToggleAndWait();
        }

void SubMenuTest ( ) [inline]

Definition at line 75 of file RadioMenuFlyoutItemTests.cs.

        {
            using (var setup = new TestSetupHelper("RadioMenuFlyoutItem Tests"))
            {
                InvokeSubItem("SubMenuFlyoutButton", "RadioSubMenu", "ArtistNameItem");
                VerifySelectedItems("Orange", "Compact", "ArtistName");

                InvokeItem("SubMenuFlyoutButton", "DateItem");
                VerifySelectedItems("Orange", "Compact", "Date");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 34 of file RadioMenuFlyoutItemTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifySelectedItems | ( | string | item1,
 |  | string | item2,
 |  | string | item3 |
 | ) |  |  | [inline]

Definition at line 113 of file RadioMenuFlyoutItemTests.cs.

        {
            foreach (string item in Items)
            {
                TextBlock itemState = FindElement.ByName<TextBlock>(item + "State");

                if (item == item1 || item == item2 || item == item3)
                {
                    Verify.AreEqual(itemState.DocumentText, "Checked", "Verify " + item + " is checked");
                }
                else
                {
                    Verify.AreEqual(itemState.DocumentText, "Unchecked", "Verify " + item + " is unchecked");
                }
            }
        }

Member Data Documentation

List<string> Items [private]
Initial value:
 new List<string>
        {
            "Red",
            "Orange",
            "Yellow",
            "Green",
            "Blue",
            "Indigo",
            "Violet",
            "Compact",
            "Normal",
            "Expanded"
        }

Definition at line 39 of file RadioMenuFlyoutItemTests.cs.

The documentation for this class was generated from the following file:
  • RadioMenuFlyoutItem/InteractionTests/RadioMenuFlyoutItemTests.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RatingControlTests
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

RatingControlTests Class Reference

List of all members.

Public Member Functions

void | BasicInteractionTest ()
void | CanClearEveryValueTest ()
void | DontCrashWhenRecyclingTest ()
void | EnsureScaleMaintainedOnTap ()
void | GamepadTest ()
void | ImageInfoValidation ()
void | MaxRatingTest ()
void | TestCleanup ()
void | UIAValuePatternTest ()
void | UnclearableIsUnclearableTest ()
void | ValidateSwitchingItemInfo ()
void | VerifyDependencyPropertyBinding ()
void | VerifyDontCrashWhenCollapsedAndValueSet ()
void | VerifyRatingItemFallback ()
void | VerifyReadOnlyIsntInteractive ()
void | VerifyTabKeyWorks ()
void | VerifyThatProgrammaticallyRemovingEngagementResetsValue ()
void | VerifyUIAProperties ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | VerifyValue_ValueEqualsOnAutomationElement (AutomationElement ae, String expected, String reason="")
void | VerifyValueIsApproximately (float expected, float actual)
void | WaitForCheckbox (string checkboxName)

Private Attributes

const float | APPROXIMATE_MARGIN = 0.025f
const int | RATING_ITEM_HEIGHT = 32
const int | RATING_ITEM_WIDTH = 24

Detailed Description

Definition at line 25 of file RatingControlTests.cs.

Member Function Documentation

void BasicInteractionTest ( ) [inline]

Definition at line 48 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                Log.Comment("Retrieve rating control as generic UIElement");
                UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");

                Log.Comment("Retrieve the text block as a TextBlock");
                TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));

                Log.Comment("Verify a tap on the third star sets Rating to 3");
                InputHelper.Tap(ratingUIObject, 60, RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("3", textBlock.DocumentText);

                Log.Comment("Verify a tap on the third star sets Rating to 2.5 (placeholder value)");
                InputHelper.Tap(ratingUIObject, 60, RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("!2.5", textBlock.DocumentText);

                Button phButton = new Button(FindElement.ByName("PHButton"));
                InputHelper.Tap(phButton);

                Log.Comment("Verify a tap on the first star sets Rating to 1");
                InputHelper.Tap(ratingUIObject, 12, RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("1", textBlock.DocumentText);

                Log.Comment("Verify a swipe off the left sets Rating to NOTHING");
                InputHelper.Pan(ratingUIObject, 200, Direction.West);
                Verify.AreEqual("!", textBlock.DocumentText);

                Log.Comment("Verify a right key on an unset Rating, sets rating to 1");
                KeyboardHelper.PressKey(ratingUIObject, Key.Right);

                Verify.AreEqual("1", textBlock.DocumentText);

                Log.Comment("Verify a left key on an RTL rating increases the rating.");
                TestSetupHelper.SetInnerFrameFlowDirection(FlowDirection.RightToLeft);
                Wait.ForIdle();

                KeyboardHelper.PressKey(ratingUIObject, Key.Left);
                Verify.AreEqual("2", textBlock.DocumentText);

                Log.Comment("Verify home/end keys in RTL");
                KeyboardHelper.PressKey(ratingUIObject, Key.Home);
                Verify.AreEqual("!", textBlock.DocumentText);

                KeyboardHelper.PressKey(ratingUIObject, Key.End);
                Verify.AreEqual("5", textBlock.DocumentText);

                Log.Comment("Verify up down keys in RTL");
                KeyboardHelper.PressKey(ratingUIObject, Key.Down);
                Verify.AreEqual("4", textBlock.DocumentText);

                KeyboardHelper.PressKey(ratingUIObject, Key.Up);
                Verify.AreEqual("5", textBlock.DocumentText);

                TestSetupHelper.SetInnerFrameFlowDirection(FlowDirection.LeftToRight);
                Wait.ForIdle();

                Log.Comment("Verify home/end keys in LTR");
                KeyboardHelper.PressKey(ratingUIObject, Key.Home);
                Verify.AreEqual("!", textBlock.DocumentText);

                KeyboardHelper.PressKey(ratingUIObject, Key.End);
                Verify.AreEqual("5", textBlock.DocumentText);

                Log.Comment("Verify up down keys in LTR");
                KeyboardHelper.PressKey(ratingUIObject, Key.Down);
                Verify.AreEqual("4", textBlock.DocumentText);

                KeyboardHelper.PressKey(ratingUIObject, Key.Up);
                Verify.AreEqual("5", textBlock.DocumentText);
            }
        }

void CanClearEveryValueTest ( ) [inline]

Definition at line 190 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                TextBlock tb = new TextBlock(FindElement.ById("FrameDetails"));
                Log.Comment("FrameDetails: " + tb.DocumentText);

                Log.Comment("Retrieve rating control as generic UIElement");
                UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");

                Log.Comment("Retrieve the text block as a TextBlock");
                TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));

                Wait.ForIdle();

                Log.Comment("Verify a tap on the first star sets Rating to 1");
                InputHelper.Tap(ratingUIObject, (0 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("1", textBlock.DocumentText);

                Log.Comment("Verify a tap on the first star sets Rating to 2.5 (placeholder value)");
                InputHelper.Tap(ratingUIObject, (0 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("!2.5", textBlock.DocumentText);

                Log.Comment("Verify a tap on the second star sets Rating to 2");
                InputHelper.Tap(ratingUIObject, (1 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("2", textBlock.DocumentText);

                Log.Comment("Verify a tap on the second star sets Rating to 2.5 (placeholder value)");
                InputHelper.Tap(ratingUIObject, (1 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("!2.5", textBlock.DocumentText);

                Log.Comment("Verify a tap on the third star sets Rating to 3");
                InputHelper.Tap(ratingUIObject, (2 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("3", textBlock.DocumentText);

                Log.Comment("Verify a tap on the third star sets Rating to 2.5 (placeholder value)");
                InputHelper.Tap(ratingUIObject, (2 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("!2.5", textBlock.DocumentText);

                Log.Comment("Verify a tap on the fourth star sets Rating to 4");
                InputHelper.Tap(ratingUIObject, (3 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("4", textBlock.DocumentText);

                Log.Comment("Verify a tap on the fourth star sets Rating to 2.5 (placeholder value)");
                InputHelper.Tap(ratingUIObject, (3 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("!2.5", textBlock.DocumentText);

                Log.Comment("Verify a tap on the fifth star sets Rating to 5");
                InputHelper.Tap(ratingUIObject, (4 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("5", textBlock.DocumentText);

                Log.Comment("Verify a tap on the second star sets Rating to 2.5 (placeholder value)");
                InputHelper.Tap(ratingUIObject, (4 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                Verify.AreEqual("!2.5", textBlock.DocumentText);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 35 of file RatingControlTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void DontCrashWhenRecyclingTest ( ) [inline]

Definition at line 555 of file RatingControlTests.cs.

        {
            using (var temp = new TestSetupHelper("RatingControl Tests"))
            {
            }
            Wait.ForIdle();
            using (var setup = new TestSetupHelper("RatingControl Tests"))
            {
            }
        }

void EnsureScaleMaintainedOnTap ( ) [inline]

Definition at line 630 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                Log.Comment("Retrieve rating control as generic UIElement");
                UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");

                Log.Comment("Retrieve the three text blocks");
                TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));
                TextBlock textBlockX = new TextBlock(FindElement.ById("ScaleTextXBlock"));
                TextBlock textBlockY = new TextBlock(FindElement.ById("ScaleTextYBlock"));

                VerifyValueIsApproximately(0.5f, float.Parse(textBlockX.DocumentText));
                VerifyValueIsApproximately(0.5f, float.Parse(textBlockY.DocumentText));

                Log.Comment("Click to set the rating to 2");
                Point secondStar = new Point((1 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
                InputHelper.Pan(ratingUIObject, secondStar, 1, Direction.East); // Do it twice, using different methods to ensure test reliability
                InputHelper.LeftClick(ratingUIObject, secondStar.X, secondStar.Y); // (Across server/local runs)
                Verify.AreEqual("2", textBlock.DocumentText);
                Wait.ForMilliseconds(200); // composition property spy takes time!

                VerifyValueIsApproximately(0.8f, float.Parse(textBlockX.DocumentText));
                VerifyValueIsApproximately(0.8f, float.Parse(textBlockY.DocumentText));
            }
        }

void GamepadTest ( ) [inline]

Definition at line 249 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
                TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));

                Log.Comment("Verify gamepad engagement");
                ratingUIObject.SetFocus();
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual("1", textBlock.DocumentText);

                Log.Comment("Verify gamepad one change and cancel");
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.B);
                Wait.ForIdle();
                Verify.AreEqual("1", textBlock.DocumentText);

                Log.Comment("Verify gamepad one change and accept");
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual("2", textBlock.DocumentText);

                Log.Comment("Verify gamepad multiple changes");
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual("3", textBlock.DocumentText);

                Log.Comment("Verify gamepad left stick and dpad work");
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.LeftThumbstickRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.LeftThumbstickRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual("4", textBlock.DocumentText);

                Log.Comment("Verify gamepad dpad up down do nothing");
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadUp);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual("4", textBlock.DocumentText);

                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadDown);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual("4", textBlock.DocumentText);
            }
        }

void ImageInfoValidation ( ) [inline]

Definition at line 567 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                UIObject customImagesTwo = FindElement.ById("CustomImages");
                InputHelper.ScrollToElement(customImagesTwo);

                WaitForCheckbox("CustomImagesLoadedCheckBox");

                // Verify it has an <Image> child

                // Future: This RawContext doesn't seem to work to make us search the Raw UIA tree,
                // in future, if we can figure out a way to do that, we can stop
                // the "move the image into the content tree" in the test app hack
                // Context.RawContext.Activate();

                Log.Comment("Trying to find the named Image: CustomImages_FirstImageItem");
                UIObject image = FindElement.ById("CustomImages_FirstImageItem");
                Image imageAsImage = image as Image;

                // Can't really verify anything else
            }
        }

void MaxRatingTest ( ) [inline]

Definition at line 124 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This clicks the button corresponding to the test page, and navs there
            {
                TextBlock tb = new TextBlock(FindElement.ById("FrameDetails"));
                Log.Comment("FrameDetails: " + tb.DocumentText);

                Log.Comment("Retrieve rating control as generic UIElement");
                UIObject ratingUIObject = FindElement.ByName("MaxRating9Unset");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MaxRating9Unset");
                ratingUIObject.SetFocus();
                AutomationElement maxRatingAutomationElement = AutomationElement.FocusedElement;

                Log.Comment("Retrieve the accompanying text block as a TextBlock");
                TextBlock textBlock = new TextBlock(FindElement.ByName("MaxRating9UnsetTextBlock"));
                InputHelper.ScrollToElement(textBlock);

                Verify.AreEqual(false, ratingUIObject.IsOffscreen, "Verify the rating control is onscreen");
                Verify.AreEqual(false, textBlock.IsOffscreen, "Verify the results textblock is onscreen");

                for (int i = 0; i < 9; i++)
                {
                    Log.Comment("Verify value " + (i + 1));
                    InputHelper.Tap(ratingUIObject, (i * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);

                    String expected = (i + 1) + "";
                    String actual = textBlock.DocumentText;

                    Verify.IsTrue(expected.Equals(actual), "Verifying that tapping on the " + (i + 1) + "th [sic] star works, actual: " + textBlock.DocumentText);
                    VerifyValue_ValueEqualsOnAutomationElement(maxRatingAutomationElement, "Rating, " + (i + 1) + " of 9"); // make sure the UIA interface shows the right max value
                }
            }
        }

void TestCleanup ( ) [inline]

Definition at line 41 of file RatingControlTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void UIAValuePatternTest ( ) [inline]

Definition at line 338 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                Log.Comment("Retrieve rating control as generic UIElement");
                UIObject ratingUIObject = FindElement.ByName("TestRatingControl");

                TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");

                Log.Comment("Verify the UIA Value before user clicks the control.");
                ratingUIObject.SetFocus(); // Setting focus just so we can use AE.FE below
                Wait.ForIdle();
                AutomationElement ratingPeer = AutomationElement.FocusedElement;

                VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Community Rating, 2.5 of 5");

                Log.Comment("Verify moving right 2 times with the gamepad sets the control to 3");
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                Wait.ForIdle();
                Verify.AreEqual("3", textBlock.DocumentText);

                Log.Comment("Verify rating of 3 sets UIA text to 3");

                VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Rating, 3 of 5");

                // revert:
                Log.Comment("Resetting control to community rating");
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
                GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);

                VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Community Rating, 2.5 of 5");

                Log.Comment("Verify more complex navigation");
                KeyboardHelper.PressKey(ratingUIObject, Key.Right);
                KeyboardHelper.PressKey(ratingUIObject, Key.Right);
                KeyboardHelper.PressKey(ratingUIObject, Key.Right);
                KeyboardHelper.PressKey(ratingUIObject, Key.Left);
                VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Rating, 2 of 5");

                // Verify read an unset rating
                ratingUIObject = FindElement.ByName("RatingBindingSample");
                Log.Comment("Verify the UIA Value of an unset Rating without a placeholder value");
                ratingUIObject.SetFocus();
                InputHelper.ScrollToElement(ratingUIObject);
                ratingPeer = AutomationElement.FocusedElement;

                VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Rating Unset");

                // Verify rounding:
                Log.Comment("Verifying Value_Value rounding");
                UIObject round1 = FindElement.ById("ValuePatternRoundTest1");
                round1.SetFocus();
                AutomationElement roundAE1 = AutomationElement.FocusedElement;
                UIObject round2 = FindElement.ById("ValuePatternRoundTest2");
                round2.SetFocus();
                AutomationElement roundAE2 = AutomationElement.FocusedElement;
                UIObject round3 = FindElement.ById("ValuePatternRoundTest3");
                round3.SetFocus();
                AutomationElement roundAE3 = AutomationElement.FocusedElement;

                VerifyValue_ValueEqualsOnAutomationElement(roundAE1, "Rating, 1.5 of 5");
                VerifyValue_ValueEqualsOnAutomationElement(roundAE2, "Rating, 1.55 of 5");
                VerifyValue_ValueEqualsOnAutomationElement(roundAE3, "Rating, 1.5 of 5");
            }
        }

void UnclearableIsUnclearableTest ( ) [inline]

Definition at line 159 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                Log.Comment("Retrieve MyRatingIsClearEnabled rating control as generic UIElement");
                UIObject ratingUIObject = FindElement.ByName("MyRatingIsClearEnabled");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MyRatingIsClearEnabled");

                Log.Comment("Retrieve the text block as TextBlock");
                TextBlock textBlock = new TextBlock(FindElement.ByName("MyRatingIsClearEnabledText"));
                InputHelper.ScrollToElement(textBlock);

                Log.Comment("Verify a right key on an unset Rating, sets rating to 1 [2]");
                KeyboardHelper.PressKey(ratingUIObject, Key.Right);
                Verify.AreEqual("1", textBlock.DocumentText);

                Log.Comment("Verify a left key on a RatingControl with Value=1 AND IsClearEnabled=false leaves rating at 1");
                KeyboardHelper.PressKey(ratingUIObject, Key.Left);
                Verify.AreEqual("1", textBlock.DocumentText);

                KeyboardHelper.PressKey(ratingUIObject, Key.Right);
                Verify.AreEqual("2", textBlock.DocumentText);

                Log.Comment("Verify the home key for a IsClearEnabled=false RatingControl sets rating to 1");
                KeyboardHelper.PressKey(ratingUIObject, Key.Home);
                Verify.AreEqual("1", textBlock.DocumentText);
            }
        }

void ValidateSwitchingItemInfo ( ) [inline]

Definition at line 593 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                UIObject customImagesTwo = FindElement.ById("StageThreeCheckbox");
                InputHelper.ScrollToElement(customImagesTwo);

                WaitForCheckbox("StageOneCheckbox");

                Log.Comment("Trying to find the named Image: CustomImagesTwo_FirstImageItem");
                UIObject image = FindElement.ById("CustomImagesTwo_FirstImageItem");
                Image imageAsImage = image as Image;

                Button changeTypeButton = new Button(FindElement.ById("ChangeCustomImagesTwoType"));
                changeTypeButton.Invoke();
                Wait.ForIdle();

                WaitForCheckbox("StageTwoCheckbox");

                Log.Comment("Trying to find the named Image: CustomImagesTwo_FirstTextItem");
                UIObject textBlock = FindElement.ById("CustomImagesTwo_FirstTextItem");
                TextBlock textBlockAsTextBlock = textBlock as TextBlock;

                changeTypeButton.Invoke();
                Wait.ForIdle();

                WaitForCheckbox("StageThreeCheckbox");

                Log.Comment("Trying to find the named Image: CustomImagesTwo_FirstImageItem_Again");
                UIObject image2 = FindElement.ById("CustomImagesTwo_FirstImageItem_Again");
                Image imageAsImage2 = image2 as Image;
            }
        }

void VerifyDependencyPropertyBinding ( ) [inline]

Definition at line 464 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                UIObject ratingBinding = FindElement.ByName("RatingBindingSample");
                Button ratingBindingButton = new Button(FindElement.ByName("RatingBindingSampleButton"));
                InputHelper.ScrollToElement(ratingBindingButton);
                TextBlock ratingBindingText = new TextBlock(FindElement.ById("RatingBindingSampleText"));
                ratingBindingButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual("Binding successful", ratingBindingText.DocumentText);

                UIObject ratingXBind = FindElement.ByName("RatingXBindSample");
                Button ratingXBindButton = new Button(FindElement.ByName("RatingXBindSampleButton"));
                InputHelper.ScrollToElement(ratingXBindButton);
                TextBlock ratingXBindText = new TextBlock(FindElement.ByName("RatingXBindSampleText"));
                ratingXBindButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual("Binding successful", ratingXBindText.DocumentText);
            }
        }

void VerifyDontCrashWhenCollapsedAndValueSet ( ) [inline]

Definition at line 414 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                Button button = new Button(FindElement.ByName("CollapsedRatingControlButton"));
                button.Invoke();
                Wait.ForIdle();
            }
        }

void VerifyRatingItemFallback ( ) [inline]

Definition at line 660 of file RatingControlTests.cs.

        {
            // This test is actually performed in the test app itself, so go look at RatingControlPage.xaml.cs for the meat of it.

            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                Log.Comment("Retrieve PointerOverPlaceholderFallbackRating rating control as generic UIElement");
                UIObject popRating = FindElement.ById("PointerOverPlaceholderFallbackRating");
                Verify.IsNotNull(popRating, "Verifying that we found a UIElement called PointerOverPlaceholderFallbackRating");

                InputHelper.ScrollToElement(popRating);

                popRating.Tap(); // Since on phone it's touch, I do a tap to trigger that.
                popRating.Click();
                Wait.ForIdle();

                Log.Comment("Retrieve PointerOverFallbackRating rating control as generic UIElement");
                UIObject pointerOver = FindElement.ById("PointerOverFallbackRating");
                Verify.IsNotNull(pointerOver, "Verifying that we found a UIElement called PointerOverFallbackRating");
                InputHelper.ScrollToElement(pointerOver);
                pointerOver.Click();
                pointerOver.Tap();
                Wait.ForIdle();

                TextBlock textBlock = new TextBlock(FindElement.ById("UnsetFallbackTextBlock"));
                Verify.AreEqual("+", textBlock.DocumentText, "Verify Unset glyph falls back onto Glyph");
                TextBlock textBlock2 = new TextBlock(FindElement.ById("PlaceholderFallbackTextBlock"));
                Verify.AreEqual("+", textBlock2.DocumentText, "Verify Placeholder glyph falls back onto Glyph");
                TextBlock textBlock3 = new TextBlock(FindElement.ById("DisabledFallbackTextBlock"));
                Verify.AreEqual("+", textBlock3.DocumentText, "Verify Disabled glyph falls back onto Glyph");

                ElementCache.Clear();

                TextBlock textBlock4 = new TextBlock(FindElement.ById("PointerOverPlaceholderFallbackTextBlock"));
                Verify.AreEqual("+", textBlock4.DocumentText, "Verify PointerOverPlaceholder glyph falls back onto Placeholder");
                TextBlock textBlock5 = new TextBlock(FindElement.ById("PointerOverFallbackTextBlock"));
                Verify.AreEqual("+", textBlock5.DocumentText, "Verify PointerOver glyph falls back onto Glyph");
                TextBlock textBlock6 = new TextBlock(FindElement.ById("NoFallbackTextBlock"));
                Verify.AreEqual("+", textBlock6.DocumentText, "Verify a glyph didn't fall back if it wasn't meant to");

                // Image:
                Log.Comment("Retrieve PointerOverPlaceholderImageFallbackRating rating control as generic UIElement");
                popRating = FindElement.ById("PointerOverPlaceholderImageFallbackRating");
                Verify.IsNotNull(popRating, "Verifying that we found a UIElement called PointerOverPlaceholderImageFallbackRating");

                InputHelper.ScrollToElement(popRating);
                Wait.ForIdle();

                popRating.Tap(); // Since on phone it's touch, I do a tap to trigger that.
                popRating.Click();
                Wait.ForIdle();

                Log.Comment("Retrieve PointerOverImageFallbackRating rating control as generic UIElement");
                pointerOver = FindElement.ById("PointerOverImageFallbackRating");
                Verify.IsNotNull(pointerOver, "Verifying that we found a UIElement called PointerOverImageFallbackRating");
                pointerOver.Tap();
                pointerOver.Click();
                Wait.ForIdle();

                textBlock = new TextBlock(FindElement.ById("UnsetImageFallbackTextBlock"));
                Verify.AreEqual("+", textBlock.DocumentText, "Verify Unset image falls back onto Image");
                textBlock2 = new TextBlock(FindElement.ById("PlaceholderImageFallbackTextBlock"));
                Verify.AreEqual("+", textBlock2.DocumentText, "Verify Placeholder image falls back onto Image");
                textBlock3 = new TextBlock(FindElement.ById("DisabledImageFallbackTextBlock"));
                Verify.AreEqual("+", textBlock3.DocumentText, "Verify Disabled image falls back onto Image");

                ElementCache.Clear();
                textBlock4 = new TextBlock(FindElement.ById("PointerOverPlaceholderImageFallbackTextBlock"));
                Verify.AreEqual("+", textBlock4.DocumentText, "Verify PointerOverPlaceholder image falls back onto PlaceholderImage");
                textBlock5 = new TextBlock(FindElement.ById("PointerOverImageFallbackTextBlock"));
                Verify.AreEqual("+", textBlock5.DocumentText, "Verify PointerOver image falls back onto Image");
            }
        }

void VerifyReadOnlyIsntInteractive ( ) [inline]

Definition at line 530 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {

                UIObject ratingReadOnly = FindElement.ByName("MyRatingReadOnlyWithValue");
                TextBlock tb = new TextBlock(FindElement.ByName("MyRatingReadOnlyTextBlock"));
                InputHelper.ScrollToElement(tb);

                Verify.AreEqual(tb.DocumentText, "2.2");

                ratingReadOnly.SetFocus();

                KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
                KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
                KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
                KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
                KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
                KeyboardHelper.PressKey(ratingReadOnly, Key.Right);

                Verify.AreEqual(tb.DocumentText, "2.2");
            }
        }

void VerifyTabKeyWorks ( ) [inline]

Definition at line 426 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
                Button button = new Button(FindElement.ByName("PHButton"));
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a Button called PHButton");
                UIObject ratingReadOnly = FindElement.ByName("MyRatingReadOnly");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MyRatingReadOnly");
                UIObject ratingIsClearEnabled = FindElement.ByName("MyRatingReadOnlyWithValue");
                Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MyRatingReadOnlyWithValue");
                InputHelper.ScrollToElement(ratingIsClearEnabled);

                Log.Comment("Verify we aren't breaking tab behaviour");
                ratingUIObject.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(ratingUIObject.HasKeyboardFocus, "Focus is on first RatingControl");
                KeyboardHelper.PressKey(Key.Tab);
                Verify.IsTrue(button.HasKeyboardFocus, "Focus is on the button");
                KeyboardHelper.PressKey(Key.Tab);
                Verify.IsTrue(ratingReadOnly.HasKeyboardFocus, "Focus is on the ReadOnly RatingControl");
                KeyboardHelper.PressKey(Key.Tab);
                Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus, "Focus is on the ReadOnlyWithValue RatingControl");

                Log.Comment("Verify left/right/up/down keeps us within the control (w/ keyboard)");
                KeyboardHelper.PressKey(Key.Up);
                Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.Down);
                Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
            }
        }

void VerifyThatProgrammaticallyRemovingEngagementResetsValue ( ) [inline]

Definition at line 312 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests"))  // This literally clicks the button corresponding to the test page.
            {
                TextBlock magicDisengagerTextBlock = new TextBlock(FindElement.ById("MagicDisengagerTextBlock"));
                magicDisengagerTextBlock.SetFocus();
                InputHelper.ScrollToElement(magicDisengagerTextBlock);

                UIObject magicDisengager = FindElement.ById("MagicDisengager");
                Verify.IsNotNull(magicDisengager, "Verifying that we found a UIElement called MagicDisengager");
                magicDisengager.SetFocus();

                Wait.ForIdle();

                GamepadHelper.PressButton(magicDisengager, GamepadButton.A);
                GamepadHelper.PressButton(magicDisengager, GamepadButton.DPadRight);
                Verify.AreEqual("2", magicDisengagerTextBlock.DocumentText);

                // This control is rigged to programmatically disengage at 3
                GamepadHelper.PressButton(magicDisengager, GamepadButton.DPadRight);
                Verify.AreEqual("null", magicDisengagerTextBlock.DocumentText);
            }
        }

void VerifyUIAProperties ( ) [inline]

Definition at line 487 of file RatingControlTests.cs.

        {
            using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
            {
                UIObject ratingReadOnly = FindElement.ByName("MyRatingReadOnly");
                ratingReadOnly.SetFocus();
                InputHelper.ScrollToElement(ratingReadOnly);
                AutomationElement ratingPeer = AutomationElement.FocusedElement;

                object valuePatternAsObject;
                ratingPeer.TryGetCurrentPattern(ValuePattern.Pattern, out valuePatternAsObject);
                Verify.IsNotNull(valuePatternAsObject); // ValuePattern should exist
                ValuePattern valuePattern = valuePatternAsObject as ValuePattern;

                object valueProperty = ratingPeer.GetCurrentPropertyValue(ValuePattern.IsReadOnlyProperty);
                bool isReadOnly = (bool)valueProperty;
                Verify.IsTrue(isReadOnly);

                // Verify the negative
                UIObject ratingReadable = FindElement.ByName("TestRatingControl");
                ratingReadable.SetFocus();
                Wait.ForIdle();
                ratingPeer = AutomationElement.FocusedElement;
                valueProperty = ratingPeer.GetCurrentPropertyValue(ValuePattern.IsReadOnlyProperty);
                isReadOnly = (bool)valueProperty;
                Verify.IsFalse(isReadOnly);

                ratingPeer.TryGetCurrentPattern(RangeValuePattern.Pattern, out valuePatternAsObject);
                Verify.IsNotNull(valuePatternAsObject); // RangeValuePattern should exist

                ratingPeer.TryGetCurrentPattern(ExpandCollapsePattern.Pattern, out valuePatternAsObject);
                Verify.IsNull(valuePatternAsObject); // ExpandCollapsePattern shouldn't exist

                String lctp = ratingPeer.GetCurrentPropertyValue(AutomationElementIdentifiers.LocalizedControlTypeProperty) as String;
                Verify.AreEqual("Rating Slider", lctp);

                object maximumProperty = ratingPeer.GetCurrentPropertyValue(RangeValuePattern.MaximumProperty);
                double maximumPropertyAsNumber = (double)maximumProperty;
                Verify.AreEqual(5, maximumPropertyAsNumber, "Verify the RangeValue_Max UIA property");
            }
        }

void VerifyValue_ValueEqualsOnAutomationElement | ( | AutomationElement | ae,
 |  | String | expected,
 |  | String | reason = "" |
 | ) |  |  | [inline, private]

Definition at line 750 of file RatingControlTests.cs.

        {
            object valuePatternAsObject;
            ae.TryGetCurrentPattern(ValuePattern.Pattern, out valuePatternAsObject);
            if (valuePatternAsObject != null)
            {
                ValuePattern vp = valuePatternAsObject as ValuePattern;
                object valueProperty = ae.GetCurrentPropertyValue(ValuePattern.ValueProperty);
                String valuePropertyString = valueProperty as String;
                Verify.AreEqual(expected, valuePropertyString, reason.Length > 0 ? reason : "Expected value of " + expected);
            }
        }

void VerifyValueIsApproximately | ( | float | expected,
 |  | float | actual |
 | ) |  |  | [inline, private]

Definition at line 764 of file RatingControlTests.cs.

        {
            Verify.IsTrue(actual >= expected - APPROXIMATE_MARGIN && actual <= expected + APPROXIMATE_MARGIN, "Verify " + actual + " is within -/+0.025 of " + expected);
        }

void WaitForCheckbox ( string checkboxName ) [inline, private]

Definition at line 735 of file RatingControlTests.cs.

        {
            Log.Comment("Waiting until " + checkboxName + " to be checked by test app.");
            CheckBox cb = new CheckBox(FindElement.ById(checkboxName));

            if (cb.ToggleState != ToggleState.On)
            {
                cb.GetToggledWaiter().Wait();
            }

            Wait.ForIdle();

            Log.Comment(checkboxName + " checkbox checked.");
        }

Member Data Documentation

const float APPROXIMATE_MARGIN = 0.025f [private]

Definition at line 763 of file RatingControlTests.cs.

const int RATING_ITEM_HEIGHT = 32 [private]

Definition at line 29 of file RatingControlTests.cs.

const int RATING_ITEM_WIDTH = 24 [private]

Definition at line 28 of file RatingControlTests.cs.

The documentation for this class was generated from the following file:
  • RatingControl/InteractionTests/RatingControlTests.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshContainerTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RefreshContainerTests
Public Member Functions | Static Public Member Functions | Private Member Functions

RefreshContainerTests Class Reference

List of all members.

Public Member Functions

void | BasicInteractionTest ()
void | InteractionOnImageTest ()
void | InteractionOnImageTestPrivate (bool withInfoProvider)
void | InteractionOnImageWithInfoProviderTest ()
void | RefreshRequestedHandlersWorkOnEitherContainerOrVisualizerOrBoth ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | LogInteractionRatios ()
void | LogRefreshVisualizerStates ()
void | WaitForEditValue (string editName, string editValue, bool logInteractionRatios=false)

Detailed Description

Definition at line 22 of file RefreshContainerTests.cs.

Member Function Documentation

void BasicInteractionTest ( ) [inline]

Definition at line 42 of file RefreshContainerTests.cs.

        {
            using (var setup = new TestSetupHelper("PTR Tests")) // This literally clicks the button corresponding to the test page.
            {
                Wait.ForIdle();
                Log.Comment("Retrieve the refresh container page button as generic UIElement");
                UIObject refreshContainerButtonUIObject = FindElement.ByName("RefreshContainerPageButton");
                Verify.IsNotNull(refreshContainerButtonUIObject, "Verifying that we found a UIElement called RefreshContainerPageButton");
                Wait.ForIdle();

                //Navigate to the right page
                InputHelper.Tap(refreshContainerButtonUIObject);
                Wait.ForIdle();

                Log.Comment("Retrieve adapted list view as generic UIElement");
                UIObject lvUIObject = FindElement.ByName("listView");
                Verify.IsNotNull(lvUIObject, "Verifying that we found a UIElement called listView");

                Wait.ForIdle();

                Log.Comment("Retrieve list view item one as generic UIElement");
                UIObject listViewItem1 = FindElement.ByName("listViewItem1");
                Verify.IsNotNull(listViewItem1, "Verifying that we found a UIElement called listViewItem1");

                Wait.ForIdle();

                Log.Comment("Retrieve list view item two as generic UIElement");
                UIObject listViewItem2 = FindElement.ByName("listViewItem2");
                Verify.IsNotNull(listViewItem1, "Verifying that we found a UIElement called listViewItem2");

                Wait.ForIdle();

                Log.Comment("Retrieve list view item ten as generic UIElement");
                UIObject listViewItem10 = FindElement.ByName("listViewItem10");
                Verify.IsNotNull(listViewItem1, "Verifying that we found a UIElement called listViewItem10");

                Wait.ForIdle();

                Log.Comment("Retrieve list view item nine as generic UIElement");
                UIObject listViewItem9 = FindElement.ByName("listViewItem9");
                Verify.IsNotNull(listViewItem1, "Verifying that we found a UIElement called listViewItem9");

                Wait.ForIdle();

                Log.Comment("Retrieve refresh on container button as generic UIElement");
                UIObject refreshOnContainerButtonUIObject = FindElement.ByName("RefreshOnContainerButton");
                Verify.IsNotNull(refreshOnContainerButtonUIObject, "Verifying that we found a UIElement called RefreshOnContainerButton");

                Wait.ForIdle();

                Log.Comment("Retrieve refresh on visualizer button as generic UIElement");
                UIObject refreshOnVisualizerButtonUIObject = FindElement.ByName("RefreshOnVisualizerButton");
                Verify.IsNotNull(refreshOnVisualizerButtonUIObject, "Verifying that we found a UIElement called RefreshOnVisualizerButton");

                Wait.ForIdle();

                Log.Comment("Retrieve rotate refresh visualizer button as generic UIElement");
                UIObject rotateButtonUIObject = FindElement.ByName("RotateButton");
                Verify.IsNotNull(rotateButtonUIObject, "Verifying that we found a UIElement called RotateButton");

                Wait.ForIdle();

                Log.Comment("Retrieve the change alignment button as generic UIElement");
                UIObject changeAlignmentUIObject = FindElement.ByName("ChangeAlignment");
                Verify.IsNotNull(changeAlignmentUIObject, "Verifying that we found a UIElement called ChangeAlignment");

                Wait.ForIdle();

                Log.Comment("Retrieve refresh count text block as generic UIElement");
                UIObject textboxUIObject = FindElement.ByName("RefreshCount");
                Verify.IsNotNull(textboxUIObject, "Verifying that we found a UIElement called RefreshCount");
                Edit textBox = new Edit(textboxUIObject);

                Wait.ForIdle();

                Log.Comment("Retrieve AddOrRemoveRefreshDelay button as generic UIElement");
                UIObject AddOrRemoveRefreshDelayButtonUIObject = FindElement.ByName("AddOrRemoveRefreshDelay");
                Verify.IsNotNull(AddOrRemoveRefreshDelayButtonUIObject, "Verifying that we found a UIElement called AddOrRemoveRefreshDelay");

                Wait.ForIdle();

                InputHelper.Tap(AddOrRemoveRefreshDelayButtonUIObject);
                InputHelper.Tap(refreshOnContainerButtonUIObject);
                WaitForEditValue("RefreshCount", "1");

                InputHelper.Tap(refreshOnVisualizerButtonUIObject);
                WaitForEditValue("RefreshCount", "2");

                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                InputHelper.DragDistance(listViewItem1, 450, Direction.South, 800);
                WaitForEditValue("RefreshCount", "3");

                InputHelper.Tap(rotateButtonUIObject);
                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                InputHelper.DragDistance(listViewItem2, 450, Direction.East, 800);
                WaitForEditValue("RefreshCount", "4");

                //The SV won't be at the bottom of its content to start so we will enter the peeking
                //state and not perform a refresh
                InputHelper.Tap(rotateButtonUIObject);
                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                InputHelper.DragDistance(lvUIObject, 750, Direction.North);
                Wait.ForIdle();
                LogRefreshVisualizerStates();
                Verify.AreEqual("4", textBox.Value);

                InputHelper.DragDistance(listViewItem10, 450, Direction.North, 800);
                WaitForEditValue("RefreshCount", "5");

                InputHelper.Tap(rotateButtonUIObject);
                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                InputHelper.DragDistance(listViewItem9, 450, Direction.West, 800);
                WaitForEditValue("RefreshCount", "6");

                Log.Comment("Returning to the main PTR test page");
                TestSetupHelper.GoBack();
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 28 of file RefreshContainerTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void InteractionOnImageTest ( ) [inline]

Definition at line 260 of file RefreshContainerTests.cs.

        {
            InteractionOnImageTestPrivate(withInfoProvider: false);
        }

void InteractionOnImageTestPrivate ( bool withInfoProvider ) [inline]

Definition at line 274 of file RefreshContainerTests.cs.

        {
            using (var setup = new TestSetupHelper("PTR Tests")) // This literally clicks the button corresponding to the test page.
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("MSFT: 12949886 - Test is disabled on phone due to reliability issues");
                    return;
                }

                Wait.ForIdle();

                Log.Comment("Retrieve the refresh container on image page button as generic UIElement");
                UIObject refreshContainerOnImageButtonUIObject = FindElement.ByName("RefreshContainerOnImagePageButton");
                Verify.IsNotNull(refreshContainerOnImageButtonUIObject, "Verifying that we found a UIElement called RefreshContainerOnImagePageButton");
                Wait.ForIdle();

                //Navigate to the right page
                InputHelper.Tap(refreshContainerOnImageButtonUIObject);
                Wait.ForIdle();

                UIObject adaptButtonUIObject = null;

                if (withInfoProvider)
                {
                    Log.Comment("Retrieve the adapt button as generic UIElement");
                    adaptButtonUIObject = FindElement.ByName("AdaptButton");
                    Verify.IsNotNull(adaptButtonUIObject, "Verifying that we found a UIElement called AdaptButton");
                    Wait.ForIdle();
                }

                Log.Comment("Retrieve adapted image as generic UIElement");
                UIObject imageUIObject = FindElement.ByName("Image");
                Verify.IsNotNull(imageUIObject, "Verifying that we found a UIElement called Image");

                Wait.ForIdle();

                Log.Comment("Retrieve refresh on container button as generic UIElement");
                UIObject refreshOnContainerButtonUIObject = FindElement.ByName("RefreshOnContainerButton");
                Verify.IsNotNull(refreshOnContainerButtonUIObject, "Verifying that we found a UIElement called RefreshOnContainerButton");

                Wait.ForIdle();

                Log.Comment("Retrieve refresh on visualizer button as generic UIElement");
                UIObject refreshOnVisualizerButtonUIObject = FindElement.ByName("RefreshOnVisualizerButton");
                Verify.IsNotNull(refreshOnVisualizerButtonUIObject, "Verifying that we found a UIElement called RefreshOnVisualizerButton");

                Wait.ForIdle();

                Log.Comment("Retrieve rotate refresh visualizer button as generic UIElement");
                UIObject rotateButtonUIObject = FindElement.ByName("RotateButton");
                Verify.IsNotNull(rotateButtonUIObject, "Verifying that we found a UIElement called RotateButton");

                Wait.ForIdle();

                Log.Comment("Retrieve the change alignment button as generic UIElement");
                UIObject changeAlignmentUIObject = FindElement.ByName("ChangeAlignment");
                Verify.IsNotNull(changeAlignmentUIObject, "Verifying that we found a UIElement called ChangeAlignment");

                Wait.ForIdle();

                Log.Comment("Retrieve AddOrRemoveRefreshDelay button as generic UIElement");
                UIObject AddOrRemoveRefreshDelayButtonUIObject = FindElement.ByName("AddOrRemoveRefreshDelay");
                Verify.IsNotNull(AddOrRemoveRefreshDelayButtonUIObject, "Verifying that we found a UIElement called AddOrRemoveRefreshDelay");

                Wait.ForIdle();

                Log.Comment("Retrieve ChangeRefreshRequested button as generic UIElement");
                UIObject ChangeRefreshRequestedUIObject = FindElement.ByName("ChangeRefreshRequested");
                Verify.IsNotNull(ChangeRefreshRequestedUIObject, "Verifying that we found a UIElement called ChangeRefreshRequested");

                Wait.ForIdle();

                if (withInfoProvider)
                {
                    InputHelper.Tap(adaptButtonUIObject);
                    Wait.ForIdle();
                }

                InputHelper.Tap(AddOrRemoveRefreshDelayButtonUIObject);
                InputHelper.Tap(refreshOnContainerButtonUIObject);
                WaitForEditValue("RefreshCount", "1", logInteractionRatios: withInfoProvider);

                InputHelper.Tap(ChangeRefreshRequestedUIObject);
                InputHelper.Tap(refreshOnVisualizerButtonUIObject);
                WaitForEditValue("RefreshCount", "2", logInteractionRatios: withInfoProvider);
                InputHelper.Tap(ChangeRefreshRequestedUIObject);

                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                InputHelper.DragDistance(imageUIObject, 450, Direction.South, 600);
                WaitForEditValue("RefreshCount", "3", logInteractionRatios: withInfoProvider);

                InputHelper.Tap(rotateButtonUIObject);
                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                if (withInfoProvider)
                {
                    InputHelper.Tap(adaptButtonUIObject);
                    Wait.ForIdle();
                }
                InputHelper.DragDistance(imageUIObject, 450, Direction.East, 600);
                WaitForEditValue("RefreshCount", "4", logInteractionRatios: withInfoProvider);

                InputHelper.Tap(rotateButtonUIObject);
                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                if (withInfoProvider)
                {
                    InputHelper.Tap(adaptButtonUIObject);
                    Wait.ForIdle();
                }
                InputHelper.DragDistance(imageUIObject, 450, Direction.North, 600);
                WaitForEditValue("RefreshCount", "5", logInteractionRatios: withInfoProvider);

                InputHelper.Tap(rotateButtonUIObject);
                InputHelper.Tap(changeAlignmentUIObject);
                Wait.ForIdle();
                if (withInfoProvider)
                {
                    InputHelper.Tap(adaptButtonUIObject);
                    Wait.ForIdle();
                }
                InputHelper.DragDistance(imageUIObject, 450, Direction.West, 600);
                WaitForEditValue("RefreshCount", "6", logInteractionRatios: withInfoProvider);

                Log.Comment("Returning to the main PTR test page");
                TestSetupHelper.GoBack();
            }
        }

void InteractionOnImageWithInfoProviderTest ( ) [inline]

Definition at line 269 of file RefreshContainerTests.cs.

        {
            InteractionOnImageTestPrivate(withInfoProvider: true);
        }

void LogInteractionRatios ( ) [inline, private]

Definition at line 427 of file RefreshContainerTests.cs.

        {
            Log.Comment("Logging successive interaction ratios");
            UIObject interactionRatioUIObject = FindElement.ById("InteractionRatios");
            Verify.IsNotNull(interactionRatioUIObject);
            ComboBox cmbInteractionRatioUIObject = new ComboBox(interactionRatioUIObject);
            foreach (ComboBoxItem item in cmbInteractionRatioUIObject.AllItems)
            {
                Log.Comment(item.Name);
            }

            Log.Comment("Resetting interaction ratios log");
            UIObject resetInteractionRatiosUIObject = FindElement.ById("ResetInteractionRatios");
            Verify.IsNotNull(resetInteractionRatiosUIObject);
            Button resetInteractionRatiosButton = new Button(resetInteractionRatiosUIObject);
            resetInteractionRatiosButton.Invoke();
            Wait.ForIdle();
        }

void LogRefreshVisualizerStates ( ) [inline, private]

Definition at line 405 of file RefreshContainerTests.cs.

        {
            Log.Comment("Logging successive refresh visualizer states");
            UIObject stateUIObject = FindElement.ById("States");
            Verify.IsNotNull(stateUIObject);
            ComboBox cmbStateUIObject = new ComboBox(stateUIObject);
            foreach (ComboBoxItem item in cmbStateUIObject.AllItems)
            {
                Log.Comment(item.Name);
            }

            Log.Comment("Resetting refresh visualizer states log");
            UIObject resetStatesUIObject = FindElement.ById("ResetStates");
            Verify.IsNotNull(resetStatesUIObject);
            Button resetStatesButton = new Button(resetStatesUIObject);
            resetStatesButton.Invoke();
            Wait.ForIdle();
        }

void RefreshRequestedHandlersWorkOnEitherContainerOrVisualizerOrBoth ( ) [inline]

Definition at line 167 of file RefreshContainerTests.cs.

        {
            using (var setup = new TestSetupHelper("PTR Tests")) // This literally clicks the button corresponding to the test page.
            {
                Log.Comment("Retrieve the refresh container page button as generic UIElement");
                UIObject refreshContainerButtonUIObject = FindElement.ByName("RefreshContainerPageButton");
                Verify.IsNotNull(refreshContainerButtonUIObject, "Verifying that we found a UIElement called RefreshContainerPageButton");
                Wait.ForIdle();

                //Navigate to the right page
                InputHelper.Tap(refreshContainerButtonUIObject);
                Wait.ForIdle();

                Log.Comment("Retrieve refresh on container button as generic UIElement");
                UIObject refreshOnContainerButtonUIObject = FindElement.ByName("RefreshOnContainerButton");
                Verify.IsNotNull(refreshOnContainerButtonUIObject, "Verifying that we found a UIElement called RefreshOnContainerButton");

                Wait.ForIdle();

                Log.Comment("Retrieve refresh on visualizer button as generic UIElement");
                UIObject refreshOnVisualizerButtonUIObject = FindElement.ByName("RefreshOnVisualizerButton");
                Verify.IsNotNull(refreshOnVisualizerButtonUIObject, "Verifying that we found a UIElement called RefreshOnVisualizerButton");

                Wait.ForIdle();

                Log.Comment("Retrieve refresh count text block as generic UIElement");
                UIObject textboxUIObject = FindElement.ByName("RefreshCount");
                Verify.IsNotNull(textboxUIObject, "Verifying that we found a UIElement called RefreshCount");
                Edit textBox = new Edit(textboxUIObject);

                Wait.ForIdle();

                Log.Comment("Retrieve AddOrRemoveRefreshDelay button as generic UIElement");
                UIObject AddOrRemoveRefreshDelayButtonUIObject = FindElement.ByName("AddOrRemoveRefreshDelay");
                Verify.IsNotNull(AddOrRemoveRefreshDelayButtonUIObject, "Verifying that we found a UIElement called AddOrRemoveRefreshDelay");

                Wait.ForIdle();

                Log.Comment("Retrieve RCRefreshRequestedComboBoxSwitcher button as generic UIElement");
                UIObject RCRefreshRequestedComboBoxSwitcherUIObject = FindElement.ByName("RCRefreshRequestedComboBoxSwitcher");
                Verify.IsNotNull(RCRefreshRequestedComboBoxSwitcherUIObject, "Verifying that we found a UIElement called RCRefreshRequestedComboBoxSwitcher");

                Wait.ForIdle();

                Log.Comment("Retrieve RVRefreshRequestedComboBoxSwitcher button as generic UIElement");
                UIObject RVRefreshRequestedComboBoxSwitcherUIObject = FindElement.ByName("RVRefreshRequestedComboBoxSwitcher");
                Verify.IsNotNull(RVRefreshRequestedComboBoxSwitcherUIObject, "Verifying that we found a UIElement called RVRefreshRequestedComboBoxSwitcher");

                Wait.ForIdle();

                InputHelper.Tap(AddOrRemoveRefreshDelayButtonUIObject);

                InputHelper.Tap(refreshOnContainerButtonUIObject);
                WaitForEditValue("RefreshCount", "1");
                InputHelper.Tap(refreshOnVisualizerButtonUIObject);
                WaitForEditValue("RefreshCount", "2");

                InputHelper.Tap(RVRefreshRequestedComboBoxSwitcherUIObject);

                //Now that both are on, the refresh count will go up twice as fast
                InputHelper.Tap(refreshOnContainerButtonUIObject);
                WaitForEditValue("RefreshCount", "4");
                InputHelper.Tap(refreshOnVisualizerButtonUIObject);
                WaitForEditValue("RefreshCount", "6");

                InputHelper.Tap(RCRefreshRequestedComboBoxSwitcherUIObject);

                InputHelper.Tap(refreshOnContainerButtonUIObject);
                WaitForEditValue("RefreshCount", "7");
                InputHelper.Tap(refreshOnVisualizerButtonUIObject);
                WaitForEditValue("RefreshCount", "8");

                InputHelper.Tap(RVRefreshRequestedComboBoxSwitcherUIObject);

                //Now that neither are on the refresh count won't increase
                InputHelper.Tap(refreshOnContainerButtonUIObject);
                Wait.ForIdle();
                LogRefreshVisualizerStates();
                Verify.AreEqual("8", textBox.Value);
                InputHelper.Tap(refreshOnVisualizerButtonUIObject);
                Wait.ForIdle();
                LogRefreshVisualizerStates();
                Verify.AreEqual("8", textBox.Value);

                Log.Comment("Returning to the main PTR test page");
                TestSetupHelper.GoBack();
            }
        }

void TestCleanup ( ) [inline]

Definition at line 34 of file RefreshContainerTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void WaitForEditValue | ( | string | editName,
 |  | string | editValue,
 |  | bool | logInteractionRatios = false |
 | ) |  |  | [inline, private]

Definition at line 446 of file RefreshContainerTests.cs.

        {
            Wait.ForIdle();
            Edit edit = new Edit(FindElement.ById(editName));
            Verify.IsNotNull(edit);
            Log.Comment("Current value for " + editName + ": " + edit.Value);
            if (edit.Value != editValue)
            {
                using (var waiter = new ValueChangedEventWaiter(edit, editValue))
                {
                    Log.Comment("Waiting for " + editName + " to be set to " + editValue);

                    bool success = waiter.TryWait(TimeSpan.FromSeconds(3));
                    Log.Comment("Current value for " + editName + ": " + edit.Value);

                    if (success)
                    {
                        Log.Comment("Wait succeeded");
                    }
                    else
                    {
                        if (edit.Value == editValue)
                        {
                            Log.Warning("Wait failed but TextBox contains expected Text");
                        }
                        else
                        {
                            Log.Error("Wait for edit value failed");
                            LogRefreshVisualizerStates();
                            if (logInteractionRatios)
                            {
                                LogInteractionRatios();
                            }
                            throw new WaiterException();
                        }
                    }
                }
            }

            LogRefreshVisualizerStates();
            if (logInteractionRatios)
            {
                LogInteractionRatios();
            }
        }

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshContainer/InteractionTests/RefreshContainerTests.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RepeaterTests
Public Member Functions | Static Public Member Functions

RepeaterTests Class Reference

List of all members.

Public Member Functions

void | InsertAtStartBehavior ()
void | TestCleanup ()
void | VerifyUniformGridLayoutDoesNotCreateHoles ()
void | VerifyUniformGridLayoutScrolling ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 23 of file RepeaterTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 29 of file RepeaterTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void InsertAtStartBehavior ( ) [inline]

Definition at line 165 of file RepeaterTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ItemsRepeater Tests" }))
            {
                FindElement.ByName("Basic Demo").Click();
                var addItemButton = FindElement.ByName("InsertAtStartButton");
                var itemCountLabel = FindElement.ByName("InsertAtStartChildCountLabel");

                for (int i = 0; i < 10; i++)
                {
                    // For performance reasons, invoking the button also reevaluates the children count.
                    // Technically there are i+1 children, but the button is one item behind.
                    // Since i starts at 0, everything lines up correctly in here and we don't have to invoke two buttons.
                    addItemButton.Click();
                    Wait.ForIdle();
                    Verify.AreEqual(i.ToString(), itemCountLabel.GetText());
                }
            }
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file RepeaterTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void VerifyUniformGridLayoutDoesNotCreateHoles ( ) [inline]

Definition at line 41 of file RepeaterTests.cs.

        {
            using (var setup = new TestSetupHelper("ItemsRepeater Tests"))
            {
                // Open page
                FindElement.ByName("UniformGridLayoutDemo").Click();

                // Scroll down
                var scrollviewer = FindElement.ByName("RepeaterScrollViewer");
                var repeaterHeightButton = FindElement.ByName("GetRepeaterActualHeightButton");
                repeaterHeightButton.Click();
                // Get actual repeater height
                var oldActualRepeaterHeight = double.Parse(FindElement.ByName("RepeaterActualHeightLabel").GetText());

                InputHelper.RotateWheel(scrollviewer, -2000);
                Wait.ForIdle();

                // Scroll back up again, users don't scroll large offsets at once but rather small chunks in succession.
                for(int i=0;i<5;i++)
                {
                    InputHelper.RotateWheel(scrollviewer, 50);
                    Wait.ForIdle();
                }

                repeaterHeightButton.Click();
                Verify.IsTrue(Math.Abs(oldActualRepeaterHeight -
                    double.Parse(FindElement.ByName("RepeaterActualHeightLabel").GetText())) < 1,
                    "Repeater heights did not match. This indicates that there are holes in layout as the repeater now needed more/less space.");
            }
        }

void VerifyUniformGridLayoutScrolling ( ) [inline]

Definition at line 73 of file RepeaterTests.cs.

        {
            using (var setup = new TestSetupHelper("ItemsRepeater Tests"))
            {
                // Open page
                FindElement.ByName("UniformGridLayoutDemo").Click();

                // Set ScrollViewer HorizontalScrollBarVisibility to Disabled.
                Log.Comment("Retrieving CmbScrollViewerHorizontalScrollBarVisibility");
                UIObject CmbScrollViewerHorizontalScrollBarVisibilityUIObject = FindElement.ByName("CmbScrollViewerHorizontalScrollBarVisibility");
                ComboBox CmbScrollViewerHorizontalScrollBarVisibility = new ComboBox(CmbScrollViewerHorizontalScrollBarVisibilityUIObject);
                Verify.IsNotNull(CmbScrollViewerHorizontalScrollBarVisibility, "Verifying that CmbScrollViewerHorizontalScrollBarVisibility ComboBox was found");

                Log.Comment("Changing ScrollViewer HorizontalScrollBarVisibility to Disabled");
                CmbScrollViewerHorizontalScrollBarVisibility.SelectItemByName("Disabled");
                Log.Comment("Selection is now {0}", CmbScrollViewerHorizontalScrollBarVisibility.Selection[0].Name);

                // Set ScrollViewer MaxWidth to 500.
                Log.Comment("Retrieving ScrollViewerMaxWidth");
                UIObject ScrollViewerMaxWidthUIObject = FindElement.ByName("ScrollViewerMaxWidth");
                Edit ScrollViewerMaxWidthTextBox = new Edit(ScrollViewerMaxWidthUIObject);
                Verify.IsNotNull(ScrollViewerMaxWidthTextBox, "Verifying that ScrollViewerMaxWidth Edit was found");
                ScrollViewerMaxWidthTextBox.SetValue("500");
                Wait.ForIdle();
                Log.Comment("ScrollViewerMaxWidth: " + ScrollViewerMaxWidthTextBox.Value);

                Log.Comment("Retrieving SetScrollViewerMaxWidth");
                UIObject SetScrollViewerMaxWidthUIObject = FindElement.ByName("SetScrollViewerMaxWidth");
                Button SetScrollViewerMaxWidthButton = new Button(SetScrollViewerMaxWidthUIObject);
                Verify.IsNotNull(SetScrollViewerMaxWidthUIObject, "Verifying that SetScrollViewerMaxWidth Button was found");
                Log.Comment("Updating ScrollViewerMaxWidth");
                SetScrollViewerMaxWidthButton.Invoke();
                Wait.ForIdle();

                // Set UniformGridLayout ItemsStretch to Fill.
                Log.Comment("Retrieving CmbUniformGridLayoutItemsStretch");
                UIObject CmbUniformGridLayoutItemsStretchUIObject = FindElement.ByName("CmbUniformGridLayoutItemsStretch");
                ComboBox CmbUniformGridLayoutItemsStretch = new ComboBox(CmbUniformGridLayoutItemsStretchUIObject);
                Verify.IsNotNull(CmbUniformGridLayoutItemsStretch, "Verifying that CmbUniformGridLayoutItemsStretch ComboBox was found");

                Log.Comment("Changing UniformGridLayout ItemsStretch to Fill");
                CmbUniformGridLayoutItemsStretch.SelectItemByName("Fill");
                Log.Comment("Selection is now {0}", CmbUniformGridLayoutItemsStretch.Selection[0].Name);

                // Set UniformGridLayout MinColumnSpacing to 50.
                Log.Comment("Retrieving UniformGridLayoutMinColumnSpacing");
                UIObject UniformGridLayoutMinColumnSpacingUIObject = FindElement.ByName("UniformGridLayoutMinColumnSpacing");
                Edit UniformGridLayoutMinColumnSpacingTextBox = new Edit(UniformGridLayoutMinColumnSpacingUIObject);
                Verify.IsNotNull(UniformGridLayoutMinColumnSpacingTextBox, "Verifying that UniformGridLayoutMinColumnSpacing Edit was found");
                UniformGridLayoutMinColumnSpacingTextBox.SetValue("50");
                Wait.ForIdle();
                Log.Comment("UniformGridLayoutMinColumnSpacing: " + UniformGridLayoutMinColumnSpacingTextBox.Value);

                Log.Comment("Retrieving SetUniformGridLayoutMinColumnSpacing");
                UIObject SetUniformGridLayoutMinColumnSpacingUIObject = FindElement.ByName("SetUniformGridLayoutMinColumnSpacing");
                Button SetUniformGridLayoutMinColumnSpacingButton = new Button(SetUniformGridLayoutMinColumnSpacingUIObject);
                Verify.IsNotNull(SetUniformGridLayoutMinColumnSpacingUIObject, "Verifying that SetUniformGridLayoutMinColumnSpacing Button was found");
                Log.Comment("Updating UniformGridLayoutMinColumnSpacing");
                SetUniformGridLayoutMinColumnSpacingButton.Invoke();
                Wait.ForIdle();

                // Set ScrollViewer VerticalOffset to 1000.
                Log.Comment("Retrieving ScrollViewerVerticalOffset");
                UIObject ScrollViewerVerticalOffsetUIObject = FindElement.ByName("ScrollViewerVerticalOffset");
                Edit ScrollViewerVerticalOffsetTextBox = new Edit(ScrollViewerVerticalOffsetUIObject);
                Verify.IsNotNull(ScrollViewerVerticalOffsetTextBox, "Verifying that ScrollViewerVerticalOffset Edit was found");
                ScrollViewerVerticalOffsetTextBox.SetValue("1000");
                Wait.ForIdle();
                Log.Comment("ScrollViewerVerticalOffset: " + ScrollViewerVerticalOffsetTextBox.Value);

                Log.Comment("Retrieving SetScrollViewerVerticalOffset");
                UIObject SetScrollViewerVerticalOffsetUIObject = FindElement.ByName("SetScrollViewerVerticalOffset");
                Button SetScrollViewerVerticalOffsetButton = new Button(SetScrollViewerVerticalOffsetUIObject);
                Verify.IsNotNull(SetScrollViewerVerticalOffsetUIObject, "Verifying that SetScrollViewerVerticalOffset Button was found");
                Log.Comment("Scrolling to ScrollViewer VerticalOffset 1000 by invoking SetScrollViewerVerticalOffset Button");
                SetScrollViewerVerticalOffsetButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving GetScrollViewerVerticalOffset");
                UIObject GetScrollViewerVerticalOffsetUIObject = FindElement.ByName("GetScrollViewerVerticalOffset");
                Button GetScrollViewerVerticalOffsetButton = new Button(GetScrollViewerVerticalOffsetUIObject);
                Verify.IsNotNull(GetScrollViewerVerticalOffsetUIObject, "Verifying that GetScrollViewerVerticalOffset Button was found");
                Log.Comment("Retrieving ScrollViewer VerticalOffset by invoking GetScrollViewerVerticalOffset Button");
                GetScrollViewerVerticalOffsetButton.Invoke();
                Wait.ForIdle();
                Log.Comment("ScrollViewerVerticalOffset: " + ScrollViewerVerticalOffsetTextBox.Value);

                Verify.AreEqual("1000", ScrollViewerVerticalOffsetTextBox.Value, "Verifying that final ScrollViewer VerticalOffset is requested 1000.");
            }
        }

The documentation for this class was generated from the following file:
  • Repeater/InteractionTests/RepeaterTests.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBrushTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • RevealBrushTests
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

RevealBrushTests Class Reference

List of all members.

Public Member Functions

void | CoreWindowEventsTests ()
void | RevealAlwaysUseFallback ()
void | RevealBorderLightTouchTests ()
void | RevealBrushAudit ()
void | RevealBrushFromMarkup ()
void | RevealButtonStates ()
void | RevealButtonStates_FastRelease_Values ()
void | RevealButtonStates_SlowRelease_Values ()
void | RevealButtonStates_Values ()
void | RevealCreateThenEnableEffects ()
void | RevealHoverLightPosition_Values ()
void | RevealHoverLightPositionTests ()
void | RevealListViewItemStates ()
void | RevealSetStateNoCrashWhenParentIsNotControl ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ChooseFromComboBox (string textBoxName, string text)
void | LogResult (Edit result, string stateName)
void | RevealStatesHelper (UIObject target)

Private Attributes

const string | AcrylicRectangleName = "Rectangle1"
const string | SizeSliderName = "SizeSlider"
const string | TintOpacitySliderName = "TintOpacity"

Detailed Description

Definition at line 23 of file RevealBrushTests.cs.

Member Function Documentation

void ChooseFromComboBox | ( | string | textBoxName,
 |  | string | text |
 | ) |  |  | [inline, private]

Definition at line 584 of file RevealBrushTests.cs.

        {
            Log.Comment("Retrieve text box with name '{0}'.", textBoxName);
            ComboBox comboBox = new ComboBox(FindElement.ById(textBoxName));
            comboBox.SelectItemByName(text);
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 36 of file RevealBrushTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void CoreWindowEventsTests ( ) [inline]

Definition at line 524 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToCoreWindowEventsTests" }))
            {
                var addReveal = FindElement.ById("AddReveal");
                var result = new Edit(FindElement.ById("TestResult"));

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Log.Comment("Click Add Reveal Button to enterin RevealBorderLights");
                    addReveal.Click();
                    Wait.ForIdle();

                    Log.Comment("Move Mouse to (-1,-1) to cause PointerExited event, the app's handler will remove Reveal. Ensure there is no crash.");
                    TestEnvironment.Application.CoreWindow.MovePointer(-1, -1);
                    Wait.ForIdle();

                    Log.Comment("Add back Reveal, make sure things are still good");
                    addReveal.Click();
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "CoreWindowEventsTests");
            }
        }

void LogResult | ( | Edit | result,
 |  | string | stateName |
 | ) |  |  | [inline, private]

Definition at line 569 of file RevealBrushTests.cs.

        {
            string expectedResult = stateName + ": Passed";
            bool testPassed = (0 == String.Compare(expectedResult, 0, result.Value, 0, expectedResult.Length));

            if (testPassed)
            {
                Log.Comment(result.Value);
            }
            else
            {
                Log.Error(result.Value);
            }
        }

void RevealAlwaysUseFallback ( ) [inline]

Definition at line 70 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealFallback" }))
            {
                ChooseFromComboBox("TestNameComboBox", "RevealAlwaysUseFallback");

                var result = new Edit(FindElement.ById("TestResult"));

                FindElement.ByName<Button>("RunTestButton").InvokeAndWait();

                if (result.Value.Equals("RevealAlwaysUseFallback: Skipped"))
                {
                    Log.Error("Error: FallbackBrush in use - expecting effect brush");
                    return;
                }

                string errors = result.Value;
                if (errors != "")
                {
                    Log.Error("RevealAlwaysUseFallback result = {0}", errors);
                }
            }
        }

void RevealBorderLightTouchTests ( ) [inline]

Definition at line 191 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                Log.Comment("Testing RevealBorderLight for ListViewItem... ");

                var target = FindElement.ById("AnotherListViewItem");

                var result = new Edit(FindElement.ById("TestResult"));

                // Regression coverage for Bug 11713432: [Neon][Reveal] Reveal borders remain after swiping in Groove and Movies & TV left-nav pane on mobile and desktop
                Log.Comment("Tap ListViewItem, then pan away from it. After panning, validate RevealBorderLight is off.");
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    // Move mouse pointer away so it does not create BorderLight on the item
                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    InputHelper.Pan(target, 300, Direction.North);
                    Wait.ForIdle();

                    ChooseFromComboBox("ValidationActionsComboBox", "BorderLight_ValidateBorderLightPanAway");
                    Wait.ForIdle();
                    waiter.Wait();
                }
                LogResult(result, "BorderLight_PanAway");

                Log.Comment("Tap and hold ListViewItem. While holding, validate RevealBorderLight is on.");
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    // Move mouse pointer away so it does not create BorderLight on the item
                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    // Validation will be triggered on ListViewItem's Holding event (this way we are still in the holding state while validating).
                    InputHelper.TapAndHold(target, 1000);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "BorderLight_TapAndHold");

            }
        }

void RevealBrushAudit ( ) [inline]

Definition at line 53 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToColorReveal" }))
            {
                var result = new Edit(FindElement.ByName("CheckBrushesResult"));

                FindElement.ByName<Button>("CheckBrushes").InvokeAndWait();

                string errors = result.Value;
                if (errors != "")
                {
                    Log.Error("Brush check result = {0}", errors);
                }
            }
        }

void RevealBrushFromMarkup ( ) [inline]

Definition at line 553 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealMarkup" }))
            {
                var result = new Edit(FindElement.ById("TestResult"));
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Button runTestButton = new Button(FindElement.ById("RunTestButton"));
                    runTestButton.Invoke();
                    waiter.Wait();
                }

                LogResult(result, "RevealBrushFromMarkup");
            }
        }

void RevealButtonStates ( ) [inline]

Definition at line 96 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                Log.Comment("Testing light states for Button... ");

                var target = FindElement.ById("LargeButton");
                ChooseFromComboBox("TargetComboBox", "LargeButton");
                RevealStatesHelper(target);
            }
        }

void RevealButtonStates_FastRelease_Values ( ) [inline]

Definition at line 341 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                var result = new Edit(FindElement.ById("TestResult"));
                var target = FindElement.ById("LargeButton2");

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Log.Comment("Tap and hold button (which will attach reveal backgorund lights).");
                    InputHelper.TapAndHold(target, 3000);
                    Wait.ForIdle();

                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidateFastRelease_Values");
                    FindElement.ByName<Button>("StartLoggingValues").InvokeAndWait();

                    Log.Comment("Click button. Wait for light to first reach Pressed, then FastRelease values.");
                    InputHelper.LeftClick(target);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "FastRelease_Values");
            }
        }

void RevealButtonStates_SlowRelease_Values ( ) [inline]

Definition at line 373 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                var result = new Edit(FindElement.ById("TestResult"));
                var target = FindElement.ById("LargeButton2");

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Log.Comment("Tap and hold button (which will attach RevealHoverLight).");
                    InputHelper.TapAndHold(target, 3000);
                    Wait.ForIdle();

                    ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidateSlowRelease_Values");
                    FindElement.ByName<Button>("StartLoggingValues").InvokeAndWait();

                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    Log.Comment("Tap and hold button. Wait for light to first reach Pressed, then SlowRelease values.");
                    InputHelper.TapAndHold(target, 5000);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "SlowRelease_Values");
            }
        }

void RevealButtonStates_Values ( ) [inline]

Definition at line 296 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                var result = new Edit(FindElement.ById("TestResult"));
                var target = FindElement.ById("LargeButton2");

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Log.Comment("Tap and hold button (which will attach reveal backgorund lights).");
                    InputHelper.TapAndHold(target, 3000);
                    Wait.ForIdle();

                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidatePointerOverState_Values");
                    FindElement.ByName<Button>("StartLoggingValues").InvokeAndWait();

                    Log.Comment("Move mouse over the target. Wait for light to reach Default state values.");
                    target.MovePointer(30, 30);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "PointerOver_Values");

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidatePressedState_Values");
                    FindElement.ByName<Button>("StartLoggingValues").InvokeAndWait();

                    Log.Comment("Click button. Wait for light to reach Pressed state values.");
                    target.Click();
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "Pressed_Values");
            }
        }

void RevealCreateThenEnableEffects ( ) [inline]

Definition at line 475 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealRegressionTests" }))
            {
                ToggleButton simulateDisabledByPolicyToggleButton = new ToggleButton(FindElement.ById("SimluateDisabledByPolicyToggleButton"));
                var addRevealButton = FindElement.ById("AddRevealButton");
                var removeRevealButton = FindElement.ById("RemoveRevealButton");
                var addBackRevealButton = FindElement.ById("AddBackRevealButton");

                var result = new Edit(FindElement.ById("TestResult"));

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Log.Comment("Disable Composition Effects.");
                    simulateDisabledByPolicyToggleButton.Toggle();      // Default is false, so this will disable effect

                    Log.Comment("Click Add Reveal Button, to add button while effects disabled");
                    addRevealButton.Click();
                    Wait.ForIdle();

                    var revealButton = FindElement.ById("Test1_RevealButton");

                    Log.Comment("Tap and hold button (which would attach reveal backgorund lights).");
                    InputHelper.TapAndHold(revealButton, 1000);
                    Wait.ForIdle();

                    Log.Comment("Click Remove Reveal Button.");
                    removeRevealButton.Click();
                    Wait.ForIdle();

                    Log.Comment("Enable Composition Effects.");
                    simulateDisabledByPolicyToggleButton.Toggle();
                    Wait.ForIdle();

                    Log.Comment("Add Back Reveal Button, which should now have reveal. Make sure there is no crash. ");
                    addBackRevealButton.Click();
                    Wait.ForIdle();

                    Log.Comment("Tap and hold button. Make sure there is no crash and 2 hover lights are present.");
                    revealButton.Click();
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "RevealCreateThenEnableEffects");
            }
        }

void RevealHoverLightPosition_Values ( ) [inline]

Definition at line 405 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                var result = new Edit(FindElement.ById("TestResult"));
                var target = FindElement.ById("LargeButton2");

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    // Note for this test case we specifically attach the hover light via hover, not press.
                    // This provides regression coverage for Bug 14079741: Reveal hover light doesn't follow pointer until first interaction/click
                    Log.Comment("Move pointer over LargeButton2 (which will attach RevealHoverLight).");
                    target.MovePointer(50, 50);
                    Wait.ForIdle();

                    ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidatePosition_Offset1_Values");
                    FindElement.ByName<Button>("StartLoggingValues").InvokeAndWait();

                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    Log.Comment("Move pointer to Offset1 [10, 90] on LargeButton2. Wait for light to position to reach expected values.");
                    target.MovePointer(10, 90);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "Offset1_Values");

                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidatePosition_Offset2_Values");
                    FindElement.ByName<Button>("StartLoggingValues").InvokeAndWait();

                    // Move mouse pointer away so it does not create BorderLight on the item
                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    Log.Comment("Move pointer to Offset2 [50, 50]. Wait for light to position to reach expected values.");
                    target.MovePointer(50, 50);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "Offset2_Values");

                target = FindElement.ById("NarrowButton2");
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    Log.Comment("Tap and hold NarrowButton2 (which will attach RevealHoverLight).");
                    InputHelper.TapAndHold(target, 3000);
                    Wait.ForIdle();

                    ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidatePosition_Offset3_Values");
                    FindElement.ByName<Button>("StartLoggingValues").InvokeAndWait();

                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    Log.Comment("Tap on NarrowButton2 at [10, 40]. Wait for light position to reach expected values.");
                    InputHelper.Tap(target, 10, 40);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "Offset3_Values");
            }
        }

void RevealHoverLightPositionTests ( ) [inline]

Definition at line 238 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                var result = new Edit(FindElement.ById("TestResult"));

                Log.Comment("Tap and hold Button at an offset. Verfiy RevealHoverLight uses pointer expression to position itself at the pointer.");
                var target = FindElement.ById("NarrowButton");
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    // Move mouse pointer away so it does not create HoverLight on the item
                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    InputHelper.TapAndHold(target, 10, 35, 1000);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "HoverLightExpression_Button_Touch");

                Log.Comment("Activate Button with Keyboard. Validate RevealHoverLight uses keyboard expression to position itself at center of the control.");
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    // Move mouse pointer away so it does not create BorderLight on the item
                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    // Tab to next button and activate it with keyboard
                    KeyboardHelper.PressKey(Key.Tab);
                    KeyboardHelper.PressKey(Key.Space);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "HoverLightExpression_Button_Keyboard");

                Log.Comment("Tap and hold ListViewItem at an offset. Verfiy RevealHoverLight uses pointer expression to position itself at the pointer.");
                target = FindElement.ById("OneMoreListViewItem");
                ChooseFromComboBox("TargetComboBox", "OneMoreListViewItem");
                using (var waiter = new ValueChangedEventWaiter(result))
                {
                    // Move mouse pointer away so it does not create HoverLight on the item
                    TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                    Wait.ForIdle();

                    InputHelper.TapAndHold(target, 150, 35, 1000);
                    Wait.ForIdle();

                    waiter.Wait();
                }
                LogResult(result, "HoverLightExpression_ListViewItem_Touch");
            }
        }

void RevealListViewItemStates ( ) [inline]

Definition at line 109 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                Log.Comment("Testing RevealHoverLight states for ListViewItem... ");

                var target = FindElement.ById("NormalListViewItem");
                ChooseFromComboBox("TargetComboBox", "NormalListViewItem");
                RevealStatesHelper(target);
            }
        }

void RevealSetStateNoCrashWhenParentIsNotControl ( ) [inline]

Definition at line 122 of file RevealBrushTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "Reveal Tests", "navigateToRevealStates" }))
            {
                var button = new Button(FindElement.ByName("SetStatePressed"));
                button.Invoke();
                Wait.ForIdle();

                var result = new Edit(FindElement.ById("TestResult"));
                Verify.AreEqual("SetState_Click: Clicked", result.Value);
            }
        }

void RevealStatesHelper ( UIObject target ) [inline, private]

Definition at line 135 of file RevealBrushTests.cs.

        {
            var result = new Edit(FindElement.ById("TestResult"));

            Log.Comment("Move Mouse to (0,0). Validate target is initially in Normal state.");
            using (var waiter = new ValueChangedEventWaiter(result))
            {
                TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                Wait.ForIdle();
                ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidateNormalState");
                waiter.Wait();
            }
            LogResult(result, "Normal");

            Log.Comment("Move mouse over the target (which will attach RevealHoverLight). Validate PointerOver light state.");
            using (var waiter = new ValueChangedEventWaiter(result))
            {
                target.MovePointer(30, 30);
                Wait.ForIdle();
                ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidatePointerOverState");
                waiter.Wait();
            }
            LogResult(result, "PointerOver");

            Log.Comment("Click the Target. Verify Pressed light state.");
            using (var waiter = new ValueChangedEventWaiter(result))
            {
                target.MovePointer(30, 30);
                Wait.ForIdle();

                if (target is ListViewItem)
                {
                    ListView testListView = new ListView(FindElement.ById("TestListView"));
                    testListView.Click();
                }
                else
                {
                    target.Click();
                }
                waiter.Wait();
            }
            LogResult(result, "Pressed");

            Log.Comment("Move Mouse to (0, 0). Validate target button is again in Normal state.");
            using (var waiter = new ValueChangedEventWaiter(result))
            {
                TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
                Wait.ForIdle();
                ChooseFromComboBox("ValidationActionsComboBox", "HoverLight_ValidateNormalState");
                waiter.Wait();
            }
            LogResult(result, "Normal");
        }

void TestCleanup ( ) [inline]

Definition at line 42 of file RevealBrushTests.cs.

        {
            if (TestEnvironment.TestContext.CurrentTestOutcome != UnitTestOutcome.Passed)
            {
                Log.Comment("Test failed. Queueing an app restart, since we may now be in an unknown state.");
                TestEnvironment.ShouldRestartApplication = true;
            }
        }

Member Data Documentation

const string AcrylicRectangleName = "Rectangle1" [private]

Definition at line 25 of file RevealBrushTests.cs.

const string SizeSliderName = "SizeSlider" [private]

Definition at line 27 of file RevealBrushTests.cs.

const string TintOpacitySliderName = "TintOpacity" [private]

Definition at line 26 of file RevealBrushTests.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/InteractionTests/Reveal_InteractionTests/RevealBrushTests.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestsBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ScrollPresenterTestsBase
Protected Member Functions

ScrollPresenterTestsBase Class Reference

Inherited by ScrollPresenterTestsWithAutomationPeer, and ScrollPresenterTestsWithInputHelper.

List of all members.

Protected Member Functions

void | ClearTraces ()
void | LogAndClearTraces ()
void | LogAndClearTraces (bool recordWarning)
void | LogTraces ()
void | LogTraces (bool recordWarning)
void | SetLoggingLevel (bool isPrivateLoggingEnabled)
void | SetOutputDebugStringLevel (string outputDebugStringLevel)
bool | WaitForEditValue (string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true)

Detailed Description

Definition at line 22 of file ScrollPresenterTestsBase.cs.

Member Function Documentation

void ClearTraces ( ) [inline, protected]

Definition at line 95 of file ScrollPresenterTestsBase.cs.

        {
            Log.Comment("Clearing full log.");

            UIObject clearFullLogUIObject = FindElement.ById("btnClearFullLog");
            Verify.IsNotNull(clearFullLogUIObject);
            Button clearFullLogButton = new Button(clearFullLogUIObject);
            Verify.IsNotNull(clearFullLogButton);

            clearFullLogButton.Invoke();
            Wait.ForIdle();
        }

void LogAndClearTraces ( ) [inline, protected]

Definition at line 108 of file ScrollPresenterTestsBase.cs.

        {
            LogAndClearTraces(false /*recordTraces*/);
        }

void LogAndClearTraces ( bool recordWarning ) [inline, protected]

Definition at line 113 of file ScrollPresenterTestsBase.cs.

        {
            LogTraces(recordWarning);
            ClearTraces();
        }

void LogTraces ( ) [inline, protected]

Definition at line 51 of file ScrollPresenterTestsBase.cs.

        {
            LogTraces(false /*recordWarning*/);
        }

void LogTraces ( bool recordWarning ) [inline, protected]

Definition at line 56 of file ScrollPresenterTestsBase.cs.

        {
            List<string> traces = recordWarning ? new List<string>() : null;

            Log.Comment("Reading full log:");

            UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
            Verify.IsNotNull(fullLogUIObject);
            ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
            Verify.IsNotNull(cmbFullLog);

            UIObject getFullLogUIObject = FindElement.ById("btnGetFullLog");
            Verify.IsNotNull(getFullLogUIObject);
            Button getFullLogButton = new Button(getFullLogUIObject);
            Verify.IsNotNull(getFullLogButton);

            getFullLogButton.Invoke();
            Wait.ForIdle();

            foreach (ComboBoxItem item in cmbFullLog.AllItems)
            {
                string trace = item.Name;

                if (recordWarning)
                {
                    traces.Add(trace);
                }
                Log.Comment(trace);
            }

            if (recordWarning)
            {
                string warning = "Non-final test pass failed.";
                Log.Warning(warning);

                WarningReportHelper.Record(warning, traces);
            }
        }

void SetLoggingLevel ( bool isPrivateLoggingEnabled ) [inline, protected]

Definition at line 36 of file ScrollPresenterTestsBase.cs.

        {
            Log.Comment("Retrieving chkLogScrollPresenterMessages");
            CheckBox chkLogScrollPresenterMessages = new CheckBox(FindElement.ById("chkLogScrollPresenterMessages"));
            Verify.IsNotNull(chkLogScrollPresenterMessages, "Verifying that chkLogScrollPresenterMessages was found");

            if (isPrivateLoggingEnabled && chkLogScrollPresenterMessages.ToggleState != ToggleState.On ||
                !isPrivateLoggingEnabled && chkLogScrollPresenterMessages.ToggleState != ToggleState.Off)
            {
                Log.Comment("Toggling chkLogScrollPresenterMessages.IsChecked to " + isPrivateLoggingEnabled);
                chkLogScrollPresenterMessages.Toggle();
                Wait.ForIdle();
            }
        }

void SetOutputDebugStringLevel ( string outputDebugStringLevel ) [inline, protected]

Definition at line 25 of file ScrollPresenterTestsBase.cs.

        {
            Log.Comment("Retrieving cmbScrollPresenterOutputDebugStringLevel");
            ComboBox cmbScrollPresenterOutputDebugStringLevel = new ComboBox(FindElement.ByName("cmbScrollPresenterOutputDebugStringLevel"));
            Verify.IsNotNull(cmbScrollPresenterOutputDebugStringLevel, "Verifying that cmbScrollPresenterOutputDebugStringLevel was found");

            Log.Comment("Changing output-debug-string-level selection to " + outputDebugStringLevel);
            cmbScrollPresenterOutputDebugStringLevel.SelectItemByName(outputDebugStringLevel);
            Log.Comment("Selection is now {0}", cmbScrollPresenterOutputDebugStringLevel.Selection[0].Name);
        }

bool WaitForEditValue | ( | string | editName,
 |  | string | editValue,
 |  | double | secondsTimeout = 2.0,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, protected]

Definition at line 119 of file ScrollPresenterTestsBase.cs.

        {
            Edit edit = new Edit(FindElement.ById(editName));
            Verify.IsNotNull(edit);
            Log.Comment("Current value for " + editName + ": " + edit.Value);
            if (edit.Value != editValue)
            {
                using (var waiter = new ValueChangedEventWaiter(edit, editValue))
                {
                    Log.Comment("Waiting for " + editName + " to be set to " + editValue);

                    bool success = waiter.TryWait(TimeSpan.FromSeconds(secondsTimeout));
                    Log.Comment("Current value for " + editName + ": " + edit.Value);

                    if (success)
                    {
                        Log.Comment("Wait succeeded");
                    }
                    else
                    {
                        if (edit.Value == editValue)
                        {
                            Log.Warning("Wait failed but TextBox contains expected Text");
                            LogAndClearTraces();
                        }
                        else
                        {
                            if (throwOnError)
                            {
                                Log.Error("Wait for edit value failed");
                                LogAndClearTraces();
                                throw new WaiterException();
                            }
                            else
                            {
                                Log.Warning("Wait for edit value failed");
                                LogAndClearTraces();
                                return false;
                            }
                        }
                    }
                }
            }
            return true;
        }

The documentation for this class was generated from the following file:
  • ScrollPresenter/InteractionTests/ScrollPresenterTestsBase.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestsWithAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ScrollPresenterTestsWithAutomationPeer
Public Member Functions | Static Public Member Functions

ScrollPresenterTestsWithAutomationPeer Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::ScrollPresenterTestsBase.

List of all members.

Public Member Functions

void | ScrollHorizontally ()
void | ScrollVertically ()
void | ScrollWhileUsingExpressionAnimationSources ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 22 of file ScrollPresenterTestsWithAutomationPeer.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 28 of file ScrollPresenterTestsWithAutomationPeer.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ScrollHorizontally ( ) [inline]

Definition at line 82 of file ScrollPresenterTestsWithAutomationPeer.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                Log.Comment("Navigating to ScrollPresentersWithSimpleContentsPage");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving ScrollPresenter");
                ScrollPresenter scrollPresenter31UIObject = new ScrollPresenter(FindElement.ByName("ScrollPresenter31"));
                Verify.IsNotNull(scrollPresenter31UIObject, "Verifying that ScrollPresenter was found");

                Verify.IsTrue(scrollPresenter31UIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
                Verify.IsTrue(scrollPresenter31UIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
                Verify.AreEqual(scrollPresenter31UIObject.HorizontalScrollPercent, 0.0, "Verifying HorizontalScrollPercent is zero");

                Log.Comment("Scrolling ScrollPresenter horizontally");
                scrollPresenter31UIObject.ScrollHorizontal(ScrollAmount.LargeIncrement);

                Log.Comment("Waiting for HorizontalScrollPercent={0} to change", scrollPresenter31UIObject.HorizontalScrollPercent);
                Wait.ForScrollChanged(scrollPresenter31UIObject, ScrollProperty.HorizontalScrollPercent);

                Log.Comment("Final HorizontalScrollPercent={0}", scrollPresenter31UIObject.HorizontalScrollPercent);

                Verify.IsTrue(scrollPresenter31UIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
                Verify.IsTrue(scrollPresenter31UIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
                Verify.IsTrue(scrollPresenter31UIObject.HorizontalScrollPercent > 0.0, "Verifying HorizontalScrollPercent is positive");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void ScrollVertically ( ) [inline]

Definition at line 41 of file ScrollPresenterTestsWithAutomationPeer.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                Log.Comment("Navigating to ScrollPresentersWithSimpleContentsPage");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Retrieving ScrollPresenter");
                ScrollPresenter scrollPresenter11UIObject = new ScrollPresenter(FindElement.ByName("ScrollPresenter11"));
                Verify.IsNotNull(scrollPresenter11UIObject, "Verifying that ScrollPresenter was found");

                Verify.IsTrue(scrollPresenter11UIObject.VerticallyScrollable, "Verifying VerticallyScrollable is true");
                Verify.IsTrue(scrollPresenter11UIObject.VerticalViewSize > 0.0, "Verifying VerticalViewSize is positive");
                Verify.AreEqual(scrollPresenter11UIObject.VerticalScrollPercent, 0.0, "Verifying VerticalScrollPercent is zero");

                Log.Comment("Scrolling ScrollPresenter vertically");
                scrollPresenter11UIObject.ScrollVertical(ScrollAmount.LargeIncrement);

                Log.Comment("Waiting for VerticalScrollPercent={0} to change", scrollPresenter11UIObject.VerticalScrollPercent);
                Wait.ForScrollChanged(scrollPresenter11UIObject, ScrollProperty.VerticalScrollPercent);

                Log.Comment("Final VerticalScrollPercent={0}", scrollPresenter11UIObject.VerticalScrollPercent);

                Verify.IsTrue(scrollPresenter11UIObject.VerticallyScrollable, "Verifying VerticallyScrollable is true");
                Verify.IsTrue(scrollPresenter11UIObject.VerticalViewSize > 0.0, "Verifying VerticalViewSize is positive");
                Verify.IsTrue(scrollPresenter11UIObject.VerticalScrollPercent > 0.0, "Verifying VerticalScrollPercent is positive");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void ScrollWhileUsingExpressionAnimationSources ( ) [inline]

Definition at line 123 of file ScrollPresenterTestsWithAutomationPeer.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                Log.Comment("Navigating to ScrollPresenterExpressionAnimationSourcesPage");
                UIObject navigateToExpressionAnimationSourcesUIObject = FindElement.ByName("navigateToExpressionAnimationSources");
                Verify.IsNotNull(navigateToExpressionAnimationSourcesUIObject, "Verifying that navigateToExpressionAnimationSources Button was found");

                Button navigateToExpressionAnimationSourcesButton = new Button(navigateToExpressionAnimationSourcesUIObject);
                navigateToExpressionAnimationSourcesButton.Invoke();
                Wait.ForIdle();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving ScrollPresenter");
                ScrollPresenter scrollPresenterUIObject = new ScrollPresenter(FindElement.ByName("scrollPresenter"));
                Verify.IsNotNull(scrollPresenterUIObject, "Verifying that ScrollPresenter was found");

                Verify.IsTrue(scrollPresenterUIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
                Verify.IsTrue(scrollPresenterUIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
                Verify.AreEqual(scrollPresenterUIObject.HorizontalScrollPercent, 0.0, "Verifying HorizontalScrollPercent is zero");

                Log.Comment("Waiting for final layout");
                WaitForEditValue(editName: "txtLayoutCompleted", editValue: "Yes");

                Edit textBox = new Edit(FindElement.ById("txtViewport"));
                Log.Comment("Viewport: " + textBox.Value);
                textBox = new Edit(FindElement.ById("txtExtent"));
                Log.Comment("Extent: " + textBox.Value);
                textBox = new Edit(FindElement.ById("txtBarVisualWidth"));

                Log.Comment("Scrolling ScrollPresenter horizontally and vertically");
                scrollPresenterUIObject.SetScrollPercent(10.0, 20.0);

                Log.Comment("Waiting for HorizontalScrollPercent={0} to change", scrollPresenterUIObject.HorizontalScrollPercent);
                Wait.ForScrollChanged(scrollPresenterUIObject, ScrollProperty.HorizontalScrollPercent);

                Log.Comment("Final HorizontalScrollPercent={0}", scrollPresenterUIObject.HorizontalScrollPercent);
                Log.Comment("Final VerticalScrollPercent={0}", scrollPresenterUIObject.VerticalScrollPercent);

                if (Math.Abs(scrollPresenterUIObject.HorizontalScrollPercent - 10.0) >= 0.0001 ||
                    Math.Abs(scrollPresenterUIObject.VerticalScrollPercent - 20.0) >= 0.0001)
                {
                    LogAndClearTraces();
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.IsTrue(scrollPresenterUIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
                Verify.IsTrue(scrollPresenterUIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
                Verify.IsLessThan(Math.Abs(scrollPresenterUIObject.HorizontalScrollPercent - 10.0), 0.0001, "Verifying HorizontalScrollPercent is close to 10.0");

                Verify.IsTrue(scrollPresenterUIObject.VerticallyScrollable, "Verifying VerticallyScrollable is true");
                Verify.IsTrue(scrollPresenterUIObject.VerticalViewSize > 0.0, "Verifying VerticalViewSize is positive");
                Verify.IsLessThan(Math.Abs(scrollPresenterUIObject.VerticalScrollPercent - 20.0), 0.0001, "Verifying VerticalScrollPercent is close to 20.0");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollPresenter test page.
            }
        }

void TestCleanup ( ) [inline]

Definition at line 34 of file ScrollPresenterTestsWithAutomationPeer.cs.

        {
            TestCleanupHelper.Cleanup();
        }

The documentation for this class was generated from the following file:
  • ScrollPresenter/InteractionTests/ScrollPresenterTestsWithAutomationPeer.cs
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestsWithInputHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ScrollPresenterTestsWithInputHelper
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes

ScrollPresenterTestsWithInputHelper Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::ScrollPresenterTestsBase.

List of all members.

Classes

struct | ScrollSnapPointsTestPageElements

Public Member Functions

void | OverpanWithAnchoredSkrinkingContent ()
void | OverpanWithAnchoredSkrinkingContentVert ()
void | PanTowardsTwoManditoryIrregularSnapPoint_Center ()
void | PanTowardsTwoManditoryIrregularSnapPoint_Far ()
void | PanTowardsTwoManditoryIrregularSnapPoint_Near ()
void | PanWithChainingFromScrollPresenterToScrollViewer ()
void | PanWithChainingFromScrollPresenterToScrollViewer_Auto ()
void | PanWithChainingFromScrollPresenterToScrollViewerWithChainingMode (bool useChainingModeAlways)
void | PanWithChainingFromScrollViewerToScrollPresenter ()
void | PanWithinARepeatedMandatorySnapPoint_Center ()
void | PanWithinARepeatedMandatorySnapPoint_Far ()
void | PanWithinARepeatedMandatorySnapPoint_Near ()
void | PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Center ()
void | PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Far ()
void | PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Near ()
void | PanWithoutRailing ()
void | PanWithRailing ()
void | PinchRectangle ()
void | PinchRectangleWithMouseWheel ()
void | ScrollTowardsTwoManditoryIrregularSnapPoint_Center ()
void | ScrollTowardsTwoManditoryIrregularSnapPoint_Far ()
void | ScrollTowardsTwoManditoryIrregularSnapPoint_Near ()
void | ScrollWithinARepeatedMandatorySnapPoint_Center ()
void | ScrollWithinARepeatedMandatorySnapPoint_Far ()
void | ScrollWithinARepeatedMandatorySnapPoint_Near ()
void | ScrollWithMouseWheel ()
void | ScrollWithNonSystemManipulationMode ()
void | StretchImage ()
void | StretchImageWithMouseWheel ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Types

enum | ScrollSnapPointsAlignment { Near = 0, Center = 1, Far = 2 }

Private Member Functions

ScrollSnapPointsTestPageElements GatherScrollSnapPointsTestPageElements ()
void | GetScrollPresenterContentLayoutOffset (out double contentLayoutOffsetX, out double contentLayoutOffsetY)
void | GetScrollPresenterView (out double horizontalOffset, out double verticalOffset, out float zoomFactor)
void | GoToChainingAndRailingPage ()
void | GoToManipulationModePage ()
ScrollSnapPointsTestPageElements GoToScrollSnapPointsPage ()
void | GoToSimpleContentsPage ()
void | MoveTowardsTwoManditoryIrregularSnapPoint (ScrollSnapPointsAlignment alignment, bool withTouch)
void | MoveWithinARepeatedMandatorySnapPoint (bool withOffsetEqualToStart, ScrollSnapPointsAlignment alignment, bool withTouch)
void | OverpanWithAnchoredSkrinkingContent (bool isForHorizontalDirection)
void | PanToZero (UIObject scrollPresenterUIObject, Edit text, int maxTries=10)
bool | PanUntilInputWorks (Edit text, UIObject scrollPresenterUIObject)
void | PrepareForScrollPresenterManipulationStart (string scrollPresenterName, string stateTextBoxName="txtScrollPresenterState")
void | PrepareForScrollViewerManipulationStart (string stateTextBoxName="txtScrollViewerState")
void | SnapPointsPageChangeOffset (ScrollSnapPointsTestPageElements elements, String amount, double value)
void | TapResetViewsButton ()
bool | TryWaitForScrollPresenterManipulationEnd (string scrollPresenterName, string stateTextBoxName="txtScrollPresenterState")
bool | WaitForManipulationEnd (string elementName, string stateTextBoxName, bool failOnError=true, bool logTraces=true)
bool | WaitForOffsetToSettle (Edit text, double millisecondsTimeout, bool failOnError)
int | WaitForOffsetUpdated (double expectedMin, double expectedMax, Edit text, double alternateMin=double.PositiveInfinity, double alternateMax=double.PositiveInfinity, double modulo=double.PositiveInfinity, double millisecondsTimeout=defaultAnimatedViewChangeTimeout, bool failOnError=true)
int | WaitForOffsetUpdated (Edit text, double expected, double modulo=double.PositiveInfinity, double alternateMin=double.PositiveInfinity, double alternateMax=double.PositiveInfinity, double millisecondsTimeout=defaultAnimatedViewChangeTimeout, bool failOnError=true)
void | WaitForScrollPresenterFinalSize (UIObject scrollPresenterUIObject, double expectedWidth, double expectedHeight)
void | WaitForScrollPresenterManipulationEnd (string scrollPresenterName, string stateTextBoxName="txtScrollPresenterState")
void | WaitForScrollViewerManipulationEnd (string scrollViewerName, string stateTextBoxName="txtScrollViewerState")

Private Attributes

const double | defaultAnimatedViewChangeTimeout = 9000
const int | mouseWheelDeltaForVelocityUnit = 120

Detailed Description

Definition at line 21 of file ScrollPresenterTestsWithInputHelper.cs.

Member Enumeration Documentation

enum ScrollSnapPointsAlignment [private]
Enumerator:
Near
Center
Far

Definition at line 23 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Near = 0,
            Center = 1,
            Far = 2
        }

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 42 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

ScrollSnapPointsTestPageElements GatherScrollSnapPointsTestPageElements ( ) [inline, private]

Definition at line 2942 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("GatherScrollSnapPointsTestPageElements - entry");
            var elements = new ScrollSnapPointsTestPageElements();

            elements.btnAddMISnapPointUIObject = new Button(FindElement.ByName("btnMIAddSnapPoint"));
            elements.txtMISnapPointValueUIObject = new Edit(FindElement.ByName("txtMISnapPointValue"));
            elements.cmbMISnapPointAlignment = new ComboBox(FindElement.ByName("cmbMISnapPointAlignment"));

#if ApplicableRangeType
            elements.btnAddOISnapPointUIObject = new Button(FindElement.ByName("btnOIAddSnapPoint"));
            elements.txtOISnapPointValueUIObject = new Edit(FindElement.ByName("txtOISnapPointValue"));
            elements.txtOISnapPointRangeUIObject = new Edit(FindElement.ByName("txtOIApplicableRange"));
#endif

            elements.btnAddMRSnapPointUIObject = new Button(FindElement.ByName("btnMRAddSnapPoint"));
            elements.txtMRSnapPointOffsetUIObject = new Edit(FindElement.ByName("txtMRSnapPointOffset"));
            elements.txtMRSnapPointIntervalUIObject = new Edit(FindElement.ByName("txtMRSnapPointInterval"));
            elements.txtMRSnapPointStartUIObject = new Edit(FindElement.ByName("txtMRSnapPointStart"));
            elements.txtMRSnapPointEndUIObject = new Edit(FindElement.ByName("txtMRSnapPointEnd"));
            elements.cmbMRSnapPointAlignment = new ComboBox(FindElement.ByName("cmbMRSnapPointAlignment"));

#if ApplicableRangeType
            elements.btnAddORSnapPointUIObject = new Button(FindElement.ByName("btnORAddSnapPoint"));
            elements.txtORSnapPointOffsetUIObject = new Edit(FindElement.ByName("txtORSnapPointOffset"));
            elements.txtORSnapPointIntervalUIObject = new Edit(FindElement.ByName("txtORSnapPointInterval"));
            elements.txtORSnapPointStartUIObject = new Edit(FindElement.ByName("txtORSnapPointStart"));
            elements.txtORSnapPointEndUIObject = new Edit(FindElement.ByName("txtORSnapPointEnd"));
            elements.txtORSnapPointRangeUIObject = new Edit(FindElement.ByName("txtORApplicableRange"));
#endif

            elements.scrollPresenterUIObject = FindElement.ByName("markupScrollPresenter");
            Verify.IsNotNull(elements.scrollPresenterUIObject, "Verifying that markupScrollPresenter was found");

            elements.scrollPresenterOffset = new Edit(FindElement.ById("txtScrollPresenterOffset"));
            elements.scrollPresenterOffsetChangeAmount = new Edit(FindElement.ById("txtScrollPresenterOffsetChange"));
            elements.changeScrollPresenterOffset = new Button(FindElement.ById("btnScrollPresenterOffsetChange"));

            elements.scrollPresenterOffset.SetValue("0");

            Log.Comment("GatherScrollSnapPointsTestPageElements - exit");
            return elements;
        }

void GetScrollPresenterContentLayoutOffset | ( | out double | contentLayoutOffsetX,
 |  | out double | contentLayoutOffsetY |
 | ) |  |  | [inline, private]

Definition at line 2775 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            contentLayoutOffsetX = 0.0;
            contentLayoutOffsetY = 0.0;

            UIObject viewUIObject = FindElement.ById("txtScrollPresenterContentLayoutOffsetX");
            Edit viewTextBox = new Edit(viewUIObject);
            Log.Comment($"Current ContentLayoutOffsetX: {viewTextBox.Value}");
            contentLayoutOffsetX = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);

            viewUIObject = FindElement.ById("txtScrollPresenterContentLayoutOffsetY");
            viewTextBox = new Edit(viewUIObject);
            Log.Comment($"Current ContentLayoutOffsetY: {viewTextBox.Value}");
            contentLayoutOffsetY = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);
        }

void GetScrollPresenterView | ( | out double | horizontalOffset,
 |  | out double | verticalOffset,
 |  | out float | zoomFactor |
 | ) |  |  | [inline, private]

Definition at line 2791 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            horizontalOffset = 0.0;
            verticalOffset = 0.0;
            zoomFactor = 1.0f;

            UIObject viewUIObject = FindElement.ById("txtScrollPresenterHorizontalOffset");
            Edit viewTextBox = new Edit(viewUIObject);
            Log.Comment("Current HorizontalOffset: " + viewTextBox.Value);
            horizontalOffset = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);

            viewUIObject = FindElement.ById("txtScrollPresenterVerticalOffset");
            viewTextBox = new Edit(viewUIObject);
            Log.Comment("Current VerticalOffset: " + viewTextBox.Value);
            verticalOffset = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);

            viewUIObject = FindElement.ById("txtScrollPresenterZoomFactor");
            viewTextBox = new Edit(viewUIObject);
            Log.Comment("Current ZoomFactor: " + viewTextBox.Value);
            zoomFactor = String.IsNullOrWhiteSpace(viewTextBox.Value) ? float.NaN : Convert.ToSingle(viewTextBox.Value);
        }

void GoToChainingAndRailingPage ( ) [inline, private]

Definition at line 2574 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Navigating to ScrollPresenterChainingAndRailingPage");
            UIObject navigateToChainingAndRailingUIObject = FindElement.ByName("navigateToChainingAndRailing");
            Verify.IsNotNull(navigateToChainingAndRailingUIObject, "Verifying that navigateToChainingAndRailing Button was found");

            Button navigateToChainingAndRailingButton = new Button(navigateToChainingAndRailingUIObject);
            navigateToChainingAndRailingButton.Invoke();
            Wait.ForIdle();
        }

void GoToManipulationModePage ( ) [inline, private]

Definition at line 2585 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Navigating to ScrollPresenterManipulationModePage");
            UIObject navigateToManipulationModeUIObject = FindElement.ByName("navigateToManipulationMode");
            Verify.IsNotNull(navigateToManipulationModeUIObject, "Verifying that navigateToManipulationMode Button was found");

            Button navigateToManipulationModeButton = new Button(navigateToManipulationModeUIObject);
            navigateToManipulationModeButton.Invoke();
            Wait.ForIdle();
        }

ScrollSnapPointsTestPageElements GoToScrollSnapPointsPage ( ) [inline, private]

Definition at line 2596 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Navigating to ScrollSnapPointsPage");
            UIObject navigateToScrollSnapPointsUIObject = FindElement.ByName("navigateToScrollSnapPoints");
            Verify.IsNotNull(navigateToScrollSnapPointsUIObject, "Verifying that navigateToScrollSnapPoints Button was found");

            Button navigateToScrollSnapPointsButton = new Button(navigateToScrollSnapPointsUIObject);
            navigateToScrollSnapPointsButton.Invoke();
            Wait.ForIdle();

            return GatherScrollSnapPointsTestPageElements();
        }

void GoToSimpleContentsPage ( ) [inline, private]

Definition at line 2563 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Navigating to ScrollPresentersWithSimpleContentsPage");
            UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
            Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

            Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
            navigateToSimpleContentsButton.Invoke();
            Wait.ForIdle();
        }

void MoveTowardsTwoManditoryIrregularSnapPoint | ( | ScrollSnapPointsAlignment | alignment,
 |  | bool | withTouch |
 | ) |  |  | [inline, private]

Definition at line 1101 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                var elements = GoToScrollSnapPointsPage();

                int warningCount = 0;
                const double viewportHeight = 500.0;
                const double firstSnapPointOffset = 0.0;
                double secondSnapPointOffset = withTouch ? 600.0 : 150.0;
                double thirdSnapPointOffset = withTouch ? 1200.0 : 300.0;
                double firstSnapPointValue = firstSnapPointOffset;
                double secondSnapPointValue = secondSnapPointOffset;
                double thirdSnapPointValue = thirdSnapPointOffset;

                if (withTouch)
                {
                    Verify.IsTrue(PanUntilInputWorks(elements.scrollPresenterOffset, elements.scrollPresenterUIObject), "Pan inputs are moving the scrollPresenter!");
                }

                if (alignment == ScrollSnapPointsAlignment.Center)
                {
                    // Center alignment
                    firstSnapPointValue += viewportHeight / 2.0;
                    secondSnapPointValue += viewportHeight / 2.0;
                    thirdSnapPointValue += viewportHeight / 2.0;

                    Log.Comment("Changing alignment to Center");
                    elements.cmbMISnapPointAlignment.SelectItemByName("Center");
                    Log.Comment("Selection is now {0}", elements.cmbMISnapPointAlignment.Selection[0].Name);
                }
                else if (alignment == ScrollSnapPointsAlignment.Far)
                {
                    // Far alignment
                    firstSnapPointValue += viewportHeight;
                    secondSnapPointValue += viewportHeight;
                    thirdSnapPointValue += viewportHeight;

                    Log.Comment("Changing alignment to Far");
                    elements.cmbMISnapPointAlignment.SelectItemByName("Far");
                    Log.Comment("Selection is now {0}", elements.cmbMISnapPointAlignment.Selection[0].Name);
                }

                Log.Comment("Adding irregular snap point at value " + firstSnapPointValue.ToString());
                elements.txtMISnapPointValueUIObject.SetValue(firstSnapPointValue.ToString());
                elements.btnAddMISnapPointUIObject.Invoke();

                Log.Comment("Adding irregular snap point at value " + secondSnapPointValue.ToString());
                elements.txtMISnapPointValueUIObject.SetValue(secondSnapPointValue.ToString());
                elements.btnAddMISnapPointUIObject.Invoke();

                Log.Comment("Adding irregular snap point at value " + thirdSnapPointValue.ToString());
                elements.txtMISnapPointValueUIObject.SetValue(thirdSnapPointValue.ToString());
                elements.btnAddMISnapPointUIObject.Invoke();

                if (withTouch)
                {
                    InputHelper.Tap(elements.scrollPresenterUIObject);

                    InputHelper.Pan(elements.scrollPresenterUIObject, 75, Direction.North);
                    warningCount += WaitForOffsetUpdated(elements.scrollPresenterOffset, secondSnapPointOffset, double.PositiveInfinity, thirdSnapPointOffset, thirdSnapPointOffset);
                    PanToZero(elements.scrollPresenterUIObject, elements.scrollPresenterOffset);
                    InputHelper.Pan(elements.scrollPresenterUIObject, 95, Direction.North);
                    warningCount += WaitForOffsetUpdated(elements.scrollPresenterOffset, secondSnapPointOffset, double.PositiveInfinity, thirdSnapPointOffset, thirdSnapPointOffset);
                    PanToZero(elements.scrollPresenterUIObject, elements.scrollPresenterOffset);

                    InputHelper.Pan(elements.scrollPresenterUIObject, 150, Direction.North);
                    warningCount += WaitForOffsetUpdated(elements.scrollPresenterOffset, thirdSnapPointOffset, double.PositiveInfinity, secondSnapPointOffset, secondSnapPointOffset);
                    PanToZero(elements.scrollPresenterUIObject, elements.scrollPresenterOffset);
                    InputHelper.Pan(elements.scrollPresenterUIObject, 200, Direction.North);
                    warningCount += WaitForOffsetUpdated(elements.scrollPresenterOffset, thirdSnapPointOffset, double.PositiveInfinity, secondSnapPointOffset, secondSnapPointOffset);
                }
                else
                {
                    InputHelper.RotateWheel(elements.scrollPresenterUIObject, -mouseWheelDeltaForVelocityUnit);
                    warningCount += WaitForOffsetUpdated(elements.scrollPresenterOffset, secondSnapPointOffset);
                    SnapPointsPageChangeOffset(elements, "-" + secondSnapPointOffset, 0);

                    InputHelper.RotateWheel(elements.scrollPresenterUIObject, -15 * mouseWheelDeltaForVelocityUnit);
                    warningCount += WaitForOffsetUpdated(elements.scrollPresenterOffset, thirdSnapPointOffset);
                }

                Verify.IsLessThan(warningCount, 4);

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void MoveWithinARepeatedMandatorySnapPoint | ( | bool | withOffsetEqualToStart,
 |  | ScrollSnapPointsAlignment | alignment,
 |  | bool | withTouch |
 | ) |  |  | [inline, private]

Definition at line 1265 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                var elements = GoToScrollSnapPointsPage();

                if (withTouch)
                {
                    Verify.IsTrue(PanUntilInputWorks(elements.scrollPresenterOffset, elements.scrollPresenterUIObject), "Pan inputs aren't moving the scrollPresenter...");
                }

                const double viewportHeight = 500.0;
                const double start = 0.0;
                const double end = 9000.0;
                double interval = withTouch ? 50.0 : 400.0;
                double offset = withOffsetEqualToStart ? 0.0 : (withTouch ? 25.0 : 100.0);
                double adjustedStart = start;
                double adjustedEnd = end;
                double adjustedOffset = offset;

                if (alignment == ScrollSnapPointsAlignment.Center)
                {
                    // Center alignment
                    adjustedStart += viewportHeight / 2.0;
                    adjustedEnd += viewportHeight / 2.0;
                    adjustedOffset += viewportHeight / 2.0;

                    Log.Comment("Changing alignment to Center");
                    elements.cmbMRSnapPointAlignment.SelectItemByName("Center");
                    Log.Comment("Selection is now {0}", elements.cmbMRSnapPointAlignment.Selection[0].Name);
                }
                else if (alignment == ScrollSnapPointsAlignment.Far)
                {
                    // Far alignment
                    adjustedStart += viewportHeight;
                    adjustedEnd += viewportHeight;
                    adjustedOffset += viewportHeight;

                    Log.Comment("Changing alignment to Far");
                    elements.cmbMRSnapPointAlignment.SelectItemByName("Far");
                    Log.Comment("Selection is now {0}", elements.cmbMRSnapPointAlignment.Selection[0].Name);
                }

                Log.Comment($"Adding repeated snap point with start={adjustedStart.ToString()}, end={adjustedEnd.ToString()}, offset={adjustedOffset.ToString()}, interval={interval.ToString()}.");
                elements.txtMRSnapPointOffsetUIObject.SetValue(adjustedOffset.ToString());
                elements.txtMRSnapPointIntervalUIObject.SetValue(interval.ToString());
                elements.txtMRSnapPointStartUIObject.SetValue(adjustedStart.ToString());
                elements.txtMRSnapPointEndUIObject.SetValue(adjustedEnd.ToString());
                elements.btnAddMRSnapPointUIObject.Invoke();

                if (withTouch)
                {
                    InputHelper.Tap(elements.scrollPresenterUIObject);

                    InputHelper.Pan(elements.scrollPresenterUIObject, withOffsetEqualToStart ? 25 : 60, Direction.North);
                    WaitForOffsetUpdated(elements.scrollPresenterOffset, offset, 50.0);
                    PanToZero(elements.scrollPresenterUIObject, elements.scrollPresenterOffset);

                    InputHelper.Pan(elements.scrollPresenterUIObject, 50, Direction.North);
                    WaitForOffsetUpdated(elements.scrollPresenterOffset, offset, 50.0);
                    PanToZero(elements.scrollPresenterUIObject, elements.scrollPresenterOffset);

                    InputHelper.Pan(elements.scrollPresenterUIObject, 150, Direction.North);
                    WaitForOffsetUpdated(elements.scrollPresenterOffset, offset, 50.0);
                    PanToZero(elements.scrollPresenterUIObject, elements.scrollPresenterOffset);

                    InputHelper.Pan(elements.scrollPresenterUIObject, 200, Direction.North);
                    WaitForOffsetUpdated(elements.scrollPresenterOffset, offset, 50.0);
                }
                else
                {
                    InputHelper.RotateWheel(elements.scrollPresenterUIObject, -mouseWheelDeltaForVelocityUnit);
                    WaitForOffsetUpdated(elements.scrollPresenterOffset, offset);

                    InputHelper.RotateWheel(elements.scrollPresenterUIObject, -mouseWheelDeltaForVelocityUnit);
                    WaitForOffsetUpdated(elements.scrollPresenterOffset, offset + interval);

                    InputHelper.RotateWheel(elements.scrollPresenterUIObject, mouseWheelDeltaForVelocityUnit);
                    WaitForOffsetUpdated(elements.scrollPresenterOffset, offset);
                }

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void OverpanWithAnchoredSkrinkingContent ( ) [inline]

Definition at line 589 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            OverpanWithAnchoredSkrinkingContent(isForHorizontalDirection: true);
        }

void OverpanWithAnchoredSkrinkingContent ( bool isForHorizontalDirection ) [inline, private]

Definition at line 602 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter51");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter51");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter51UIObject = FindElement.ByName("ScrollPresenter51");
                Verify.IsNotNull(scrollPresenter51UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter51UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetViewsButton();

                Log.Comment("Panning ScrollPresenter close to the Content's end");
                PrepareForScrollPresenterManipulationStart("scrollPresenter51");

                Point startPoint = isForHorizontalDirection ?
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 105, scrollPresenter51UIObject.BoundingRectangle.Top + 100) :
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 100, scrollPresenter51UIObject.BoundingRectangle.Top + 100);
                Point endPoint = isForHorizontalDirection ?
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 50, scrollPresenter51UIObject.BoundingRectangle.Top + 100) :
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 100, scrollPresenter51UIObject.BoundingRectangle.Top + 50);

                InputHelper.Pan(obj: scrollPresenter51UIObject, start: startPoint, end: endPoint);

                Log.Comment("Waiting for scrollPresenter51 pan completion");
                bool success = WaitForManipulationEnd("scrollPresenter51", "txtScrollPresenterState");

                ScrollPresenter scrollPresenter51 = new ScrollPresenter(scrollPresenter51UIObject);

                Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
                Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);

                // No layout offset is expected
                double contentLayoutOffsetX = 0.0;
                double contentLayoutOffsetY = 0.0;

                GetScrollPresenterContentLayoutOffset(out contentLayoutOffsetX, out contentLayoutOffsetY);

                if (!success ||
                    (isForHorizontalDirection && (scrollPresenter51.HorizontalScrollPercent == 0.0 || scrollPresenter51.HorizontalScrollPercent == 100.0)) ||
                    (isForHorizontalDirection && scrollPresenter51.VerticalScrollPercent != 0.0) ||
                    (!isForHorizontalDirection && scrollPresenter51.HorizontalScrollPercent != 0.0) ||
                    (!isForHorizontalDirection && (scrollPresenter51.VerticalScrollPercent == 0.0 || scrollPresenter51.VerticalScrollPercent == 100.0)) ||
                    contentLayoutOffsetX != 0.0 ||
                    contentLayoutOffsetY != 0.0)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                Log.Comment("Overpan ScrollPresenter to trigger content shrinkage");
                PrepareForScrollPresenterManipulationStart("scrollPresenter51");

                startPoint = isForHorizontalDirection ?
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 240, scrollPresenter51UIObject.BoundingRectangle.Top + 100) :
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 100, scrollPresenter51UIObject.BoundingRectangle.Top + 240);
                endPoint = isForHorizontalDirection ?
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 10, scrollPresenter51UIObject.BoundingRectangle.Top + 100) :
                        new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 100, scrollPresenter51UIObject.BoundingRectangle.Top + 10);

                InputHelper.Pan(obj: scrollPresenter51UIObject, start: startPoint, end: endPoint);

                Log.Comment("Waiting for scrollPresenter51 pan completion");
                success = WaitForManipulationEnd("scrollPresenter51", "txtScrollPresenterState");

                Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
                Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);

                // Layout offset is expected
                GetScrollPresenterContentLayoutOffset(out contentLayoutOffsetX, out contentLayoutOffsetY);

                if (!success ||
                    (isForHorizontalDirection && scrollPresenter51.HorizontalScrollPercent != 100.0) ||
                    (isForHorizontalDirection && scrollPresenter51.VerticalScrollPercent != 0.0) ||
                    (!isForHorizontalDirection && scrollPresenter51.HorizontalScrollPercent != 0.0) ||
                    (!isForHorizontalDirection && scrollPresenter51.VerticalScrollPercent != 100.0) ||
                    (isForHorizontalDirection && contentLayoutOffsetX != 30.0) ||
                    (isForHorizontalDirection && contentLayoutOffsetY != 0.0) ||
                    (!isForHorizontalDirection && contentLayoutOffsetX != 0.0) ||
                    (!isForHorizontalDirection && contentLayoutOffsetY != 40.0))
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.AreEqual(scrollPresenter51.HorizontalScrollPercent, isForHorizontalDirection ? 100.0 : 0.0, "Verifying scrollPresenter51 HorizontalScrollPercent");
                Verify.AreEqual(scrollPresenter51.VerticalScrollPercent, isForHorizontalDirection ? 0.0 : 100.0, "Verifying scrollPresenter51 VerticalScrollPercent");

                double horizontalOffset;
                double verticalOffset;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                if (isForHorizontalDirection)
                {
                    Verify.AreEqual(contentLayoutOffsetX, 30.0, "Verifying contentLayoutOffsetX is 30.0");
                    Verify.AreEqual(contentLayoutOffsetY, 0.0, "Verifying contentLayoutOffsetY is 0.0");
                    Verify.AreEqual(horizontalOffset, 470.0, "Verifying horizontalOffset is 470.0");
                    Verify.AreEqual(verticalOffset, 0.0, "Verifying verticalOffset is 0.0");
                }
                else
                {
                    Verify.AreEqual(contentLayoutOffsetX, 0.0, "Verifying contentLayoutOffsetX is 0.0");
                    Verify.AreEqual(contentLayoutOffsetY, 40.0, "Verifying contentLayoutOffsetY is 40.0");
                    Verify.AreEqual(horizontalOffset, 0.0, "Verifying horizontalOffset is 0.0");
                    Verify.AreEqual(verticalOffset, 360.0, "Verifying verticalOffset is 360.0");
                }

                Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollPresenter test page.
            }
        }

void OverpanWithAnchoredSkrinkingContentVert ( ) [inline]

Definition at line 597 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            OverpanWithAnchoredSkrinkingContent(isForHorizontalDirection: false);
        }

void PanTowardsTwoManditoryIrregularSnapPoint_Center ( ) [inline]

Definition at line 1067 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveTowardsTwoManditoryIrregularSnapPoint(alignment: ScrollSnapPointsAlignment.Center, withTouch: true);
        }

void PanTowardsTwoManditoryIrregularSnapPoint_Far ( ) [inline]

Definition at line 1074 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveTowardsTwoManditoryIrregularSnapPoint(alignment: ScrollSnapPointsAlignment.Far, withTouch: true);
        }

void PanTowardsTwoManditoryIrregularSnapPoint_Near ( ) [inline]

Definition at line 1060 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveTowardsTwoManditoryIrregularSnapPoint(alignment: ScrollSnapPointsAlignment.Near, withTouch: true);
        }

void PanToZero | ( | UIObject | scrollPresenterUIObject,
 |  | Edit | text,
 |  | int | maxTries = 10 |
 | ) |  |  | [inline, private]

Definition at line 2928 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Panning ScrollPresenter to reset its offset.");
            int tries = 0;
            do
            {
                InputHelper.Pan(scrollPresenterUIObject, Math.Max((int) Convert.ToDouble(text.Value) / 2, 25), Direction.South);
                WaitForOffsetToSettle(text, millisecondsTimeout: defaultAnimatedViewChangeTimeout, failOnError: false);
                tries++;
            }
            while (Convert.ToDouble(text.Value) != 0.0 && tries < maxTries);
            Verify.AreEqual(0.0, Convert.ToDouble(text.Value));
        }

bool PanUntilInputWorks | ( | Edit | text,
 |  | UIObject | scrollPresenterUIObject |
 | ) |  |  | [inline, private]

Definition at line 2741 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            int tries = 0;
            do
            {
                InputHelper.Pan(scrollPresenterUIObject, 25, Direction.North);
                WaitForOffsetToSettle(text, millisecondsTimeout: 6000, failOnError: true);
                double value = Convert.ToDouble(text.Value);
                if (value != 0)
                {
                    PanToZero(scrollPresenterUIObject, text);
                    return true;
                }
                tries++;
            }
            while (tries < 10);
            return false;
        }

void PanWithChainingFromScrollPresenterToScrollViewer ( ) [inline]

Definition at line 814 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            // Inner ScrollPresenter uses ChainingMode.Always
            PanWithChainingFromScrollPresenterToScrollViewerWithChainingMode(useChainingModeAlways: true);
        }

void PanWithChainingFromScrollPresenterToScrollViewer_Auto ( ) [inline]

Definition at line 824 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            // Inner ScrollPresenter uses ChainingMode.Auto
            PanWithChainingFromScrollPresenterToScrollViewerWithChainingMode(useChainingModeAlways: false);
        }

void PanWithChainingFromScrollPresenterToScrollViewerWithChainingMode ( bool useChainingModeAlways ) [inline]

Definition at line 830 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToChainingAndRailingPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving scrollPresenter3");
                ScrollPresenter scrollPresenter3UIObject = new ScrollPresenter(FindElement.ByName("scrollPresenter3"));

                Log.Comment("Retrieving scrollViewer2");
                ScrollPresenter scrollViewer2UIObject = new ScrollPresenter(FindElement.ByName("scrollViewer2"));

                Log.Comment("Retrieving scrollPresenter1");
                ScrollPresenter scrollPresenter1UIObject = new ScrollPresenter(FindElement.ByName("scrollPresenter1"));

                Log.Comment("Retrieving cmbHorizontalScrollChainingMode1");
                ComboBox cmbHorizontalScrollChainingMode1 = new ComboBox(FindElement.ByName("cmbHorizontalScrollChainingMode1"));

                Log.Comment("Retrieving cmbVerticalScrollChainingMode1");
                ComboBox cmbVerticalScrollChainingMode1 = new ComboBox(FindElement.ByName("cmbVerticalScrollChainingMode1"));

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetViewsButton();

                Log.Comment("Scrolling scrollPresenter3 horizontally");
                ScrollHelper.SetHorizontalScrollPercent(scrollPresenter3UIObject, 60.0);
                Log.Comment("Final scrollPresenter3 HorizontalScrollPercent={0}", scrollPresenter3UIObject.HorizontalScrollPercent);

                Log.Comment("Scrolling scrollViewer2 horizontally");
                ScrollHelper.SetHorizontalScrollPercent(scrollViewer2UIObject, 50.0);
                Log.Comment("Final scrollViewer2 HorizontalScrollPercent={0}", scrollViewer2UIObject.HorizontalScrollPercent);

                Log.Comment("Scrolling scrollPresenter1 horizontally");
                ScrollHelper.SetHorizontalScrollPercent(scrollPresenter1UIObject, 10.0);
                Log.Comment("Final scrollPresenter1 HorizontalScrollPercent={0}", scrollPresenter1UIObject.HorizontalScrollPercent);

                Wait.ForIdle();

                if (useChainingModeAlways)
                {
                    Log.Comment("Changing horizontal chaining to Always");
                    cmbHorizontalScrollChainingMode1.SelectItemByName("Always");
                    Log.Comment("Selection is now {0}", cmbHorizontalScrollChainingMode1.Selection[0].Name);

                    Log.Comment("Changing vertical chaining to Always");
                    cmbVerticalScrollChainingMode1.SelectItemByName("Always");
                    Log.Comment("Selection is now {0}", cmbVerticalScrollChainingMode1.Selection[0].Name);
                }

                Log.Comment("Panning scrollPresenter1 horizontally");
                PrepareForScrollPresenterManipulationStart("scrollPresenter1", "txtScrollPresenter1State");

                InputHelper.Pan(
                    scrollPresenter1UIObject,
                    new Point(scrollPresenter1UIObject.BoundingRectangle.Left + 20, scrollPresenter1UIObject.BoundingRectangle.Top + 10),
                    new Point(scrollPresenter1UIObject.BoundingRectangle.Left + 300, scrollPresenter1UIObject.BoundingRectangle.Top + 10),
                    InputHelper.DefaultPanHoldDuration,
                    0.0025f);

                Log.Comment("Waiting for scrollPresenter1 pan completion");
                bool success = WaitForManipulationEnd("scrollPresenter1", "txtScrollPresenter1State", failOnError: true, logTraces: true);

                Log.Comment("Final scrollPresenter1 HorizontalScrollPercent={0}", scrollPresenter1UIObject.HorizontalScrollPercent);
                Log.Comment("Final scrollViewer2 HorizontalScrollPercent={0}", scrollViewer2UIObject.HorizontalScrollPercent);

                if (!success ||
                     scrollPresenter1UIObject.HorizontalScrollPercent >= 2.0 ||
                     scrollViewer2UIObject.HorizontalScrollPercent >= 2.0)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.IsLessThan(scrollPresenter1UIObject.HorizontalScrollPercent, 2.0, "Verifying scrollPresenter1 HorizontalScrollPercent is less than 2.0%");
                Verify.IsLessThan(scrollViewer2UIObject.HorizontalScrollPercent, 2.0, "Verifying scrollViewer2 HorizontalScrollPercent is less than 2.0%");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void PanWithChainingFromScrollViewerToScrollPresenter ( ) [inline]

Definition at line 742 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToChainingAndRailingPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving scrollPresenter3");
                ScrollPresenter scrollPresenter3UIObject = new ScrollPresenter(FindElement.ByName("scrollPresenter3"));

                Log.Comment("Retrieving scrollViewer2");
                ScrollPresenter scrollViewer2UIObject = new ScrollPresenter(FindElement.ByName("scrollViewer2"));

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetViewsButton();

                Log.Comment("Scrolling scrollPresenter3 horizontally");
                ScrollHelper.SetHorizontalScrollPercent(scrollPresenter3UIObject, 50.0);
                Log.Comment("Final scrollPresenter3 HorizontalScrollPercent={0}", scrollPresenter3UIObject.HorizontalScrollPercent);

                Log.Comment("Scrolling scrollPresenter3 vertically");
                ScrollHelper.ScrollVertically(scrollPresenter3UIObject, ScrollAmount.SmallIncrement);
                ScrollHelper.ScrollVertically(scrollPresenter3UIObject, ScrollAmount.SmallIncrement);
                Log.Comment("Final scrollPresenter3 VerticalScrollPercent={0}", scrollPresenter3UIObject.VerticalScrollPercent);

                Log.Comment("Scrolling scrollViewer2 vertically");
                ScrollHelper.ScrollVertically(scrollViewer2UIObject, ScrollAmount.SmallIncrement);
                ScrollHelper.ScrollVertically(scrollViewer2UIObject, ScrollAmount.SmallIncrement);
                Log.Comment("Final scrollViewer2 VerticalScrollPercent={0}", scrollViewer2UIObject.VerticalScrollPercent);

                Log.Comment("Panning scrollViewer2 vertically");
                PrepareForScrollViewerManipulationStart("txtScrollViewer2State");

                InputHelper.Pan(
                    scrollViewer2UIObject,
                    new Point(scrollViewer2UIObject.BoundingRectangle.Left + 10, scrollViewer2UIObject.BoundingRectangle.Top + 10),
                    new Point(scrollViewer2UIObject.BoundingRectangle.Left + 10, scrollViewer2UIObject.BoundingRectangle.Top + 150),
                    InputHelper.DefaultPanHoldDuration,
                    0.0025f);

                Log.Comment("Waiting for scrollViewer2 pan completion");
                bool success = WaitForManipulationEnd("scrollViewer2", "txtScrollViewer2State", failOnError: true, logTraces: true);

                Log.Comment("Final scrollViewer2 VerticalScrollPercent={0}", scrollViewer2UIObject.VerticalScrollPercent);
                Log.Comment("Final scrollPresenter3 VerticalScrollPercent={0}", scrollPresenter3UIObject.VerticalScrollPercent);

                if (!success ||
                    scrollViewer2UIObject.VerticalScrollPercent >= 2.0 ||
                    scrollPresenter3UIObject.VerticalScrollPercent >= 2.0)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.IsLessThan(scrollViewer2UIObject.VerticalScrollPercent, 2.0, "Verifying scrollViewer2 VerticalScrollPercent is less than 2.0%");
                Verify.IsLessThan(scrollPresenter3UIObject.VerticalScrollPercent, 2.0, "Verifying scrollPresenter3 VerticalScrollPercent is less than 2.0%");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void PanWithinARepeatedMandatorySnapPoint_Center ( ) [inline]

Definition at line 1205 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: true, alignment: ScrollSnapPointsAlignment.Center, withTouch: true);
        }

void PanWithinARepeatedMandatorySnapPoint_Far ( ) [inline]

Definition at line 1213 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: true, alignment: ScrollSnapPointsAlignment.Far, withTouch: true);
        }

void PanWithinARepeatedMandatorySnapPoint_Near ( ) [inline]

Definition at line 1197 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: true, alignment: ScrollSnapPointsAlignment.Near, withTouch: true);
        }

void PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Center ( ) [inline]

Definition at line 1229 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: false, alignment: ScrollSnapPointsAlignment.Center, withTouch: true);
        }

void PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Far ( ) [inline]

Definition at line 1237 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: false, alignment: ScrollSnapPointsAlignment.Far, withTouch: true);
        }

void PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Near ( ) [inline]

Definition at line 1221 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: false, alignment: ScrollSnapPointsAlignment.Near, withTouch: true);
        }

void PanWithoutRailing ( ) [inline]

Definition at line 137 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            const double minHorizontalScrollPercent = 35.0;
            const double minVerticalScrollPercent = 35.0;

            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter51");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter51");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter51UIObject = FindElement.ByName("ScrollPresenter51");
                Verify.IsNotNull(scrollPresenter51UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter51UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetViewsButton();

                Log.Comment("Panning ScrollPresenter in diagonal");
                PrepareForScrollPresenterManipulationStart("scrollPresenter51");

                InputHelper.Pan(
                    scrollPresenter51UIObject,
                    new Point(scrollPresenter51UIObject.BoundingRectangle.Left + 25, scrollPresenter51UIObject.BoundingRectangle.Top + 25),
                    new Point(scrollPresenter51UIObject.BoundingRectangle.Left - 25, scrollPresenter51UIObject.BoundingRectangle.Top - 25));

                Log.Comment("Waiting for scrollPresenter51 pan completion");
                bool success = WaitForManipulationEnd("scrollPresenter51", "txtScrollPresenterState", failOnError: true, logTraces: true);

                ScrollPresenter scrollPresenter51 = new ScrollPresenter(scrollPresenter51UIObject);

                Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
                Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);

                if (!success ||
                    scrollPresenter51.HorizontalScrollPercent <= minHorizontalScrollPercent ||
                    scrollPresenter51.VerticalScrollPercent <= minVerticalScrollPercent)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.IsTrue(scrollPresenter51.HorizontalScrollPercent > minHorizontalScrollPercent, "Verifying scrollPresenter51 HorizontalScrollPercent is greater than " + minHorizontalScrollPercent + "%");
                Verify.IsTrue(scrollPresenter51.VerticalScrollPercent > minVerticalScrollPercent, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + minVerticalScrollPercent + "%");

                // scrollPresenter51's Content size is 800x800px.
                double horizontalOffset;
                double verticalOffset;
                double minHorizontalOffset = 800.0 * (1.0 - scrollPresenter51.HorizontalViewSize / 100.0) * minHorizontalScrollPercent / 100.0;
                double minVerticalOffset = 800.0 * (1.0 - scrollPresenter51.VerticalViewSize / 100.0) * minVerticalScrollPercent / 100.0;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                Verify.IsTrue(horizontalOffset > minHorizontalOffset, "Verifying horizontalOffset is greater than " + minHorizontalOffset);
                Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
                Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollPresenter test page.
            }
        }

void PanWithRailing ( ) [inline]

Definition at line 56 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            const double minVerticalScrollPercent = 50.0;

            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter11");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter11");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter11UIObject = FindElement.ByName("ScrollPresenter11");
                Verify.IsNotNull(scrollPresenter11UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter11UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetViewsButton();
                Log.Comment("Panning ScrollPresenter almost vertically");
                PrepareForScrollPresenterManipulationStart("scrollPresenter11");

                InputHelper.Pan(
                    scrollPresenter11UIObject,
                    new Point(scrollPresenter11UIObject.BoundingRectangle.Left + 100, scrollPresenter11UIObject.BoundingRectangle.Top + 150),
                    new Point(scrollPresenter11UIObject.BoundingRectangle.Left + 95, scrollPresenter11UIObject.BoundingRectangle.Top + 50));

                Log.Comment("Waiting for scrollPresenter11 pan completion");
                bool success = WaitForManipulationEnd("scrollPresenter11", "txtScrollPresenterState", failOnError: true, logTraces: true);

                ScrollPresenter scrollPresenter11 = new ScrollPresenter(scrollPresenter11UIObject);

                Log.Comment("scrollPresenter11.HorizontalScrollPercent={0}", scrollPresenter11.HorizontalScrollPercent);
                Log.Comment("scrollPresenter11.VerticalScrollPercent={0}", scrollPresenter11.VerticalScrollPercent);

                if (!success ||
                    scrollPresenter11.HorizontalScrollPercent != 0.0 ||
                    scrollPresenter11.VerticalScrollPercent <= minVerticalScrollPercent)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.AreEqual(scrollPresenter11.HorizontalScrollPercent, 0.0, "Verifying scrollPresenter11 HorizontalScrollPercent is 0%");
                Verify.IsTrue(scrollPresenter11.VerticalScrollPercent > minVerticalScrollPercent, "Verifying scrollPresenter11 VerticalScrollPercent is greater than " + minVerticalScrollPercent + "%");

                // scrollPresenter11's Content height is 1000px.
                double horizontalOffset;
                double verticalOffset;
                double minVerticalOffset = 1000.0 * (1.0 - scrollPresenter11.VerticalViewSize / 100.0) * minVerticalScrollPercent / 100.0;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                Verify.AreEqual(horizontalOffset, 0.0, "Verifying horizontalOffset is 0.0");
                Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
                Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollPresenter test page.
            }
        }

void PinchRectangle ( ) [inline]

Definition at line 294 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter12");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter12");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter12UIObject = FindElement.ByName("ScrollPresenter12");
                Verify.IsNotNull(scrollPresenter12UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter12UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                Log.Comment("Zooming out the ScrollPresenter");
                PrepareForScrollPresenterManipulationStart("scrollPresenter12");

                InputHelper.Pinch(scrollPresenter12UIObject);

                Log.Comment("Waiting for scrollPresenter12 pinch completion");
                bool success = WaitForManipulationEnd("scrollPresenter12", "txtScrollPresenterState", failOnError: true, logTraces: true);

                WaitForEditValue(editName: "txtScrollPresenterHorizontalOffset", editValue: "0");
                WaitForEditValue(editName: "txtScrollPresenterVerticalOffset", editValue: "0");

                ScrollPresenter scrollPresenter12 = new ScrollPresenter(scrollPresenter12UIObject);
                // scrollPresenter12's MinZoomFactor is 0.5.
                double horizontalOffset;
                double verticalOffset;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);

                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                // New automation offsets are expected to be -1 because the content is now smaller than the viewport.
                Log.Comment("scrollPresenter12.HorizontalScrollPercent={0}", scrollPresenter12.HorizontalScrollPercent);
                Log.Comment("scrollPresenter12.VerticalScrollPercent={0}", scrollPresenter12.VerticalScrollPercent);

                if (!success ||
                    scrollPresenter12.HorizontalScrollPercent != -1 ||
                    scrollPresenter12.VerticalScrollPercent != -1 ||
                    zoomFactor == 1.0f)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.AreEqual(scrollPresenter12.HorizontalScrollPercent, -1, "Verifying scrollPresenter12 HorizontalScrollPercent is -1");
                Verify.AreEqual(scrollPresenter12.VerticalScrollPercent, -1, "Verifying scrollPresenter12 VerticalScrollPercent is -1");
                Verify.AreEqual(horizontalOffset, 0.0, "Verifying horizontalOffset is 0.0");
                Verify.AreEqual(verticalOffset, 0.0, "Verifying verticalOffset is 0.0");
                Verify.AreEqual(zoomFactor, 0.5f, "Verifying zoomFactor is 0.5f");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollPresenter test page.
            }
        }

void PinchRectangleWithMouseWheel ( ) [inline]

Definition at line 442 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter12");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter12");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter12UIObject = FindElement.ByName("ScrollPresenter12");
                Verify.IsNotNull(scrollPresenter12UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter12UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                Log.Comment("Zooming out the ScrollPresenter");
                PrepareForScrollPresenterManipulationStart("scrollPresenter12");

                KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                // The InteractionTracker changes the scale by a factor of 1.1 for each 60 mouse wheel delta.
                InputHelper.RotateWheel(scrollPresenter12UIObject, (int) (-mouseWheelDeltaForVelocityUnit / 2));
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);

                Log.Comment("Waiting for scrollPresenter12 pinch completion");
                WaitForScrollPresenterManipulationEnd("scrollPresenter12");

                WaitForEditValue(editName: "txtScrollPresenterHorizontalOffset", editValue: "0");
                WaitForEditValue(editName: "txtScrollPresenterVerticalOffset", editValue: "0");

                ScrollPresenter scrollPresenter12 = new ScrollPresenter(scrollPresenter12UIObject);
                // scrollPresenter12's MinZoomFactor is 0.5.
                double horizontalOffset;
                double verticalOffset;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);

                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                Log.Comment("scrollPresenter12.HorizontalScrollPercent={0}", scrollPresenter12.HorizontalScrollPercent);
                Log.Comment("scrollPresenter12.VerticalScrollPercent={0}", scrollPresenter12.VerticalScrollPercent);

                if (scrollPresenter12.HorizontalScrollPercent != 0.0 || scrollPresenter12.VerticalScrollPercent != 0.0 || zoomFactor == 1.0f)
                {
                    LogAndClearTraces();
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.AreEqual(scrollPresenter12.HorizontalScrollPercent, 0.0, "Verifying scrollPresenter12 HorizontalScrollPercent is 0");
                Verify.AreEqual(scrollPresenter12.VerticalScrollPercent, 0.0, "Verifying scrollPresenter12 VerticalScrollPercent is 0");
                Verify.AreEqual(horizontalOffset, 0.0, "Verifying horizontalOffset is 0.0");
                Verify.AreEqual(verticalOffset, 0.0, "Verifying verticalOffset is 0.0");
                Verify.IsGreaterThan(zoomFactor, 0.89f, "Verifying zoomFactor is about 0.1 smaller than the original 1.0");
                Verify.IsLessThan(zoomFactor, 0.91f, "Verifying zoomFactor is about 0.1 smaller than the original 1.0");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void PrepareForScrollPresenterManipulationStart | ( | string | scrollPresenterName,
 |  | string | stateTextBoxName = "txtScrollPresenterState" |
 | ) |  |  | [inline, private]

Definition at line 2813 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            UIObject scrollPresenterStateUIObject = FindElement.ById(stateTextBoxName);
            Edit scrollPresenterStateTextBox = new Edit(scrollPresenterStateUIObject);
            Log.Comment("Pre-manipulation ScrollPresenterState: " + scrollPresenterStateTextBox.Value);
            Wait.ForIdle();
        }

void PrepareForScrollViewerManipulationStart ( string stateTextBoxName = "txtScrollViewerState" ) [inline, private]

Definition at line 2831 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            UIObject scrollViewerStateUIObject = FindElement.ById(stateTextBoxName);
            Edit scrollViewerStateTextBox = new Edit(scrollViewerStateUIObject);
            Log.Comment("Pre-manipulation ScrollViewerState: " + scrollViewerStateTextBox.Value);
            Wait.ForIdle();
        }

void ScrollTowardsTwoManditoryIrregularSnapPoint_Center ( ) [inline]

Definition at line 1087 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveTowardsTwoManditoryIrregularSnapPoint(alignment: ScrollSnapPointsAlignment.Center, withTouch: false);
        }

void ScrollTowardsTwoManditoryIrregularSnapPoint_Far ( ) [inline]

Definition at line 1094 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveTowardsTwoManditoryIrregularSnapPoint(alignment: ScrollSnapPointsAlignment.Far, withTouch: false);
        }

void ScrollTowardsTwoManditoryIrregularSnapPoint_Near ( ) [inline]

Definition at line 1081 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveTowardsTwoManditoryIrregularSnapPoint(alignment: ScrollSnapPointsAlignment.Near, withTouch: false);
        }

void ScrollWithinARepeatedMandatorySnapPoint_Center ( ) [inline]

Definition at line 1251 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: false, alignment: ScrollSnapPointsAlignment.Center, withTouch: false);
        }

void ScrollWithinARepeatedMandatorySnapPoint_Far ( ) [inline]

Definition at line 1258 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: false, alignment: ScrollSnapPointsAlignment.Far, withTouch: false);
        }

void ScrollWithinARepeatedMandatorySnapPoint_Near ( ) [inline]

Definition at line 1244 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            MoveWithinARepeatedMandatorySnapPoint(withOffsetEqualToStart: false, alignment: ScrollSnapPointsAlignment.Near, withTouch: false);
        }

void ScrollWithMouseWheel ( ) [inline]

Definition at line 220 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            double minVerticalScrollPercent = 5.0;

            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter11");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter11");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter11UIObject = FindElement.ByName("ScrollPresenter11");
                Verify.IsNotNull(scrollPresenter11UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter11UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                Log.Comment("Scrolling ScrollPresenter with mouse wheel");
                PrepareForScrollPresenterManipulationStart("scrollPresenter11");

                InputHelper.RotateWheel(scrollPresenter11UIObject, -mouseWheelDeltaForVelocityUnit);

                Log.Comment("Waiting for scrollPresenter11 scroll completion");
                WaitForScrollPresenterManipulationEnd("scrollPresenter11");

                ScrollPresenter scrollPresenter11 = new ScrollPresenter(scrollPresenter11UIObject);

                Log.Comment("scrollPresenter11.HorizontalScrollPercent={0}", scrollPresenter11.HorizontalScrollPercent);
                Log.Comment("scrollPresenter11.VerticalScrollPercent={0}", scrollPresenter11.VerticalScrollPercent);

                if (scrollPresenter11.HorizontalScrollPercent != 0.0 || scrollPresenter11.VerticalScrollPercent <= minVerticalScrollPercent)
                {
                    LogAndClearTraces();
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.AreEqual(scrollPresenter11.HorizontalScrollPercent, 0.0, "Verifying scrollPresenter11 HorizontalScrollPercent is 0%");
                Verify.IsTrue(scrollPresenter11.VerticalScrollPercent > minVerticalScrollPercent, "Verifying scrollPresenter11 VerticalScrollPercent is greater than " + minVerticalScrollPercent + "%");

                // scrollPresenter11's Content height is 1000px.
                double horizontalOffset;
                double verticalOffset;
                double minVerticalOffset = 1000.0 * (1.0 - scrollPresenter11.VerticalViewSize / 100.0) * minVerticalScrollPercent / 100.0;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);
                Verify.AreEqual(horizontalOffset, 0.0, "Verifying horizontalOffset is 0.0");
                Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
                Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollPresenter test page.
            }
        }

void ScrollWithNonSystemManipulationMode ( ) [inline]

Definition at line 922 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToManipulationModePage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving scrollPresenter0");
                ScrollPresenter scrollPresenter0UIObject = new ScrollPresenter(FindElement.ByName("scrollPresenter0"));

                Log.Comment("Retrieving scrollPresenter1");
                ScrollPresenter scrollPresenter1UIObject = new ScrollPresenter(FindElement.ByName("scrollPresenter1"));

                Log.Comment("Retrieving stackPanel0");
                UIObject stackPanel0UIObject = FindElement.ByName("stackPanel0");
                Verify.IsNotNull(stackPanel0UIObject, "Verifying that stackPanel0 StackPanel was found");

                Log.Comment("Retrieving cmbManipulationModeS0");
                ComboBox cmbManipulationModeS0 = new ComboBox(FindElement.ByName("cmbManipulationModeS0"));

                Log.Comment("Retrieving cmbManipulationModeSP0");
                ComboBox cmbManipulationModeSP0 = new ComboBox(FindElement.ByName("cmbManipulationModeSP0"));

                Log.Comment("Retrieving txtScrollPresenter0State");
                Edit scrollPresenter0StateTextBox = new Edit(FindElement.ById("txtScrollPresenter0State"));

                Log.Comment("Retrieving txtScrollPresenter1State");
                Edit scrollPresenter1StateTextBox = new Edit(FindElement.ById("txtScrollPresenter1State"));

                Wait.ForIdle();

                Log.Comment("Changing stackPanel0.ManipulationMode to None");
                cmbManipulationModeSP0.SelectItemByName("None");
                Log.Comment("Selection is now {0}", cmbManipulationModeSP0.Selection[0].Name);

                Log.Comment("Attempt to pan scrollPresenter0 vertically");
                InputHelper.Pan(
                    stackPanel0UIObject,
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 70),
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 30));

                Wait.ForIdle();

                Log.Comment("Current scrollPresenter0.State: " + scrollPresenter0StateTextBox.Value);
                Verify.AreEqual(scrollPresenter0StateTextBox.Value, string.Empty);

                Log.Comment("Current scrollPresenter1.State: " + scrollPresenter1StateTextBox.Value);
                Verify.AreEqual(scrollPresenter1StateTextBox.Value, string.Empty);

                Log.Comment("Changing stackPanel0.ManipulationMode back to System");
                cmbManipulationModeSP0.SelectItemByName("System");
                Log.Comment("Selection is now {0}", cmbManipulationModeSP0.Selection[0].Name);

                Log.Comment("Pan scrollPresenter0 vertically");
                PrepareForScrollPresenterManipulationStart("scrollPresenter0", "txtScrollPresenter0State");

                InputHelper.Pan(
                    stackPanel0UIObject,
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 70),
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 30));

                Log.Comment("Waiting for scrollPresenter0 pan completion");
                bool success = WaitForManipulationEnd("scrollPresenter0", "txtScrollPresenter0State", failOnError: true, logTraces: true);

                Log.Comment("Pan scrollPresenter0 vertically to restore original offset");
                PrepareForScrollPresenterManipulationStart("scrollPresenter0", "txtScrollPresenter0State");

                InputHelper.Pan(
                    stackPanel0UIObject,
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 30),
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 70));

                Log.Comment("Waiting for scrollPresenter0 pan completion");
                success &= WaitForManipulationEnd("scrollPresenter0", "txtScrollPresenter0State", failOnError: true, logTraces: true);

                Log.Comment("Resetting scrollPresenter0StateTextBox/scrollPresenter1StateTextBox values");
                scrollPresenter0StateTextBox.SetValueAndWait(string.Empty);
                scrollPresenter1StateTextBox.SetValueAndWait(string.Empty);

                Log.Comment("Changing scrollPresenter0.ManipulationMode to None");
                cmbManipulationModeS0.SelectItemByName("None");
                Log.Comment("Selection is now {0}", cmbManipulationModeS0.Selection[0].Name);

                Log.Comment("Attempt to pan scrollPresenter0 vertically");
                InputHelper.Pan(
                    stackPanel0UIObject,
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 70),
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 30));

                Wait.ForIdle();

                Log.Comment("Current scrollPresenter0.State: " + scrollPresenter0StateTextBox.Value);
                if (success)
                {
                    Verify.AreEqual(scrollPresenter0StateTextBox.Value, string.Empty);
                }

                Log.Comment("Current scrollPresenter1.State: " + scrollPresenter1StateTextBox.Value);
                if (success)
                {
                    Verify.AreEqual(scrollPresenter1StateTextBox.Value, string.Empty);
                }

                Log.Comment("Changing scrollPresenter0.ManipulationMode back to System");
                cmbManipulationModeS0.SelectItemByName("System");
                Log.Comment("Selection is now {0}", cmbManipulationModeS0.Selection[0].Name);

                Log.Comment("Pan scrollPresenter0 vertically");
                PrepareForScrollPresenterManipulationStart("scrollPresenter0", "txtScrollPresenter0State");

                InputHelper.Pan(
                    stackPanel0UIObject,
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 70),
                    new Point(stackPanel0UIObject.BoundingRectangle.Left + 30, stackPanel0UIObject.BoundingRectangle.Top + 30));

                Log.Comment("Waiting for scrollPresenter0 pan completion");
                success &= WaitForManipulationEnd("scrollPresenter0", "txtScrollPresenter0State", failOnError: true, logTraces: true);

                if (!success)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void SnapPointsPageChangeOffset | ( | ScrollSnapPointsTestPageElements | elements,
 |  | String | amount,
 |  | double | value |
 | ) |  |  | [inline, private]

Definition at line 2554 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("SnapPointsPageChangeOffset with amount: " + amount + ", value: " + value);

            elements.scrollPresenterOffsetChangeAmount.SetValue(amount);
            elements.changeScrollPresenterOffset.Invoke();
            WaitForOffsetUpdated(elements.scrollPresenterOffset, value);
        }

void StretchImage ( ) [inline]

Definition at line 372 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter52");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter52");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter52UIObject = FindElement.ByName("ScrollPresenter52");
                Verify.IsNotNull(scrollPresenter52UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter52UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                Log.Comment("Zooming in the ScrollPresenter");
                PrepareForScrollPresenterManipulationStart("scrollPresenter52");

                InputHelper.Stretch(scrollPresenter52UIObject);

                Log.Comment("Waiting for scrollPresenter52 stretch completion");
                bool success = WaitForManipulationEnd("scrollPresenter52", "txtScrollPresenterState", failOnError: true, logTraces: true);

                ScrollPresenter scrollPresenter52 = new ScrollPresenter(scrollPresenter52UIObject);
                double horizontalOffset;
                double verticalOffset;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);

                Log.Comment("scrollPresenter52.HorizontalScrollPercent={0}", scrollPresenter52.HorizontalScrollPercent);
                Log.Comment("scrollPresenter52.VerticalScrollPercent={0}", scrollPresenter52.VerticalScrollPercent);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                if (!success ||
                    scrollPresenter52.HorizontalScrollPercent <= 0.0 ||
                    scrollPresenter52.VerticalScrollPercent <= 0.0 ||
                    zoomFactor <= 1.0f)
                {
                    LogAndClearTraces(recordWarning: false);
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.IsTrue(scrollPresenter52.HorizontalScrollPercent > 0.0, "Verifying scrollPresenter52 HorizontalScrollPercent is greater than 0%");
                Verify.IsTrue(scrollPresenter52.VerticalScrollPercent > 0.0, "Verifying scrollPresenter52 VerticalScrollPercent is greater than 0%");
                Verify.IsTrue(horizontalOffset > 0.0, "Verifying horizontalOffset is greater than 0.0");
                Verify.IsTrue(verticalOffset > 0.0, "Verifying verticalOffset is greater than 0.0");
                Verify.IsTrue(zoomFactor > 1.0f, "Verifying zoomFactor is greater than 1.0f");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void StretchImageWithMouseWheel ( ) [inline]

Definition at line 518 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollPresenter tests");

            using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
            {
                SetOutputDebugStringLevel("Verbose");

                GoToSimpleContentsPage();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Retrieving cmbShowScrollPresenter");
                ComboBox cmbShowScrollPresenter = new ComboBox(FindElement.ByName("cmbShowScrollPresenter"));

                Log.Comment("Changing ScrollPresenter selection to scrollPresenter52");
                cmbShowScrollPresenter.SelectItemByName("scrollPresenter52");
                Log.Comment("Selection is now {0}", cmbShowScrollPresenter.Selection[0].Name);

                Log.Comment("Retrieving ScrollPresenter");
                UIObject scrollPresenter52UIObject = FindElement.ByName("ScrollPresenter52");
                Verify.IsNotNull(scrollPresenter52UIObject, "Verifying that ScrollPresenter was found");

                WaitForScrollPresenterFinalSize(scrollPresenter52UIObject, expectedWidth: 300.0, expectedHeight: 400.0);

                Log.Comment("Zooming in the ScrollPresenter");
                PrepareForScrollPresenterManipulationStart("scrollPresenter52");

                KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                // The InteractionTracker changes the scale by a factor of 1.1 for each 60 mouse wheel delta.
                InputHelper.RotateWheel(scrollPresenter52UIObject, mouseWheelDeltaForVelocityUnit / 2);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);

                Log.Comment("Waiting for scrollPresenter52 stretch completion");
                WaitForScrollPresenterManipulationEnd("scrollPresenter52");

                ScrollPresenter scrollPresenter52 = new ScrollPresenter(scrollPresenter52UIObject);
                double horizontalOffset;
                double verticalOffset;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);

                Log.Comment("scrollPresenter52.HorizontalScrollPercent={0}", scrollPresenter52.HorizontalScrollPercent);
                Log.Comment("scrollPresenter52.VerticalScrollPercent={0}", scrollPresenter52.VerticalScrollPercent);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);

                if (scrollPresenter52.HorizontalScrollPercent <= 0.0 || scrollPresenter52.VerticalScrollPercent <= 0.0 || zoomFactor <= 1.0f)
                {
                    LogAndClearTraces();
                }

                SetLoggingLevel(isPrivateLoggingEnabled: false);

                Verify.IsTrue(scrollPresenter52.HorizontalScrollPercent > 0.0, "Verifying scrollPresenter52 HorizontalScrollPercent is greater than 0%");
                Verify.IsTrue(scrollPresenter52.VerticalScrollPercent > 0.0, "Verifying scrollPresenter52 VerticalScrollPercent is greater than 0%");
                Verify.IsTrue(horizontalOffset > 0.0, "Verifying horizontalOffset is greater than 0.0");
                Verify.IsTrue(verticalOffset > 0.0, "Verifying verticalOffset is greater than 0.0");
                Verify.IsGreaterThan(zoomFactor, 1.09f, "Verifying zoomFactor is about 0.1 greater than the original 1.0");
                Verify.IsLessThan(zoomFactor, 1.11f, "Verifying zoomFactor is about 0.1 greater than the original 1.0");

                Log.Comment("Returning to the main ScrollPresenter test page");
                TestSetupHelper.GoBack();
            }
        }

void TapResetViewsButton ( ) [inline, private]

Definition at line 2760 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving btnResetViews");
            UIObject resetViewsUIObject = FindElement.ByName("btnResetViews");
            Verify.IsNotNull(resetViewsUIObject, "Verifying that btnResetViews Button was found");

            Button resetViewsButton = new Button(resetViewsUIObject);
            InputHelper.Tap(resetViewsButton);
            if (!WaitForEditValue(editName: "txtResetStatus", editValue: "Views reset", secondsTimeout: 2.0, throwOnError: false))
            {
                InputHelper.Tap(resetViewsButton);
                WaitForEditValue(editName: "txtResetStatus", editValue: "Views reset");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 48 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            TestCleanupHelper.Cleanup();
        }

bool TryWaitForScrollPresenterManipulationEnd | ( | string | scrollPresenterName,
 |  | string | stateTextBoxName = "txtScrollPresenterState" |
 | ) |  |  | [inline, private]

Definition at line 2826 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            return WaitForManipulationEnd(scrollPresenterName, stateTextBoxName, failOnError: false);
        }

bool WaitForManipulationEnd | ( | string | elementName,
 |  | string | stateTextBoxName,
 |  | bool | failOnError = true,
 |  | bool | logTraces = true |
 | ) |  |  | [inline, private]

Definition at line 2844 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            UIObject elementStateUIObject = FindElement.ById(stateTextBoxName);
            Edit elementStateTextBox = new Edit(elementStateUIObject);
            Log.Comment("Current State: " + elementStateTextBox.Value);
            if (elementStateTextBox.Value != elementName + " Idle")
            {
                using (var waiter = new ValueChangedEventWaiter(elementStateTextBox, elementName + " Idle"))
                {
                    int loops = 0;

                    Log.Comment("Waiting for " + elementName + "'s manipulation end.");
                    while (true)
                    {
                        bool success = waiter.TryWait(TimeSpan.FromMilliseconds(250));

                        Log.Comment("Current State: " + elementStateTextBox.Value);

                        if (success)
                        {
                            Log.Comment("Wait succeeded");
                            break;
                        }
                        else
                        {
                            if (elementStateTextBox.Value == elementName + " Idle")
                            {
                                Log.Warning("Wait failed but TextBox contains expected text");
                                if (logTraces)
                                {
                                    LogAndClearTraces();
                                }
                                break;
                            }
                            else if (loops < 20)
                            {
                                loops++;
                                waiter.Reset();
                            }
                            else
                            {
                                if (logTraces)
                                {
                                    LogAndClearTraces();
                                }
                                string message = "Wait for manipulation end failed";
                                if (failOnError)
                                {
                                    Log.Error(message);
                                }
                                else
                                {
                                    Log.Warning(message);
                                }
                                return false;
                            }
                        }
                    }
                }
            }
            return true;
        }

bool WaitForOffsetToSettle | ( | Edit | text,
 |  | double | millisecondsTimeout,
 |  | bool | failOnError |
 | ) |  |  | [inline, private]

Definition at line 2675 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Wait.ForIdle();

            const double millisecondsNormalStepTimeout = 100;
            const double millisecondsIdleStepTimeout = 600;
            Edit elementStateTextBox = new Edit(FindElement.ById("txtScrollPresenterState"));
            ValueChangedEventWaiter waiter = new ValueChangedEventWaiter(text);
            int unsuccessfulWaits = 0;
            int maxUnsuccessfulWaits = (int)(millisecondsIdleStepTimeout / millisecondsNormalStepTimeout);

            Log.Comment("Original State: " + elementStateTextBox.Value);
            Log.Comment("Original Offset: " + text.Value);

            // When the initial State is still Idle, use a longer timeout to allow it to transition out of Idle.
            double millisecondsWait = (elementStateTextBox.Value == "Idle") ? millisecondsIdleStepTimeout : millisecondsNormalStepTimeout;
            double millisecondsCumulatedWait = 0;

            do
            {
                Log.Comment("Waiting for Offset change.");
                waiter.Reset();
                if (waiter.TryWait(TimeSpan.FromMilliseconds(millisecondsWait)))
                {
                    unsuccessfulWaits = 0;
                }
                else
                {
                    unsuccessfulWaits++;
                }
                millisecondsCumulatedWait += millisecondsWait;
                millisecondsWait = millisecondsNormalStepTimeout;

                Log.Comment("Current State: " + elementStateTextBox.Value);
                Log.Comment("Current Offset: " + text.Value);

                Wait.ForIdle();
            }
            while (elementStateTextBox.Value != "Idle" &&
                   millisecondsCumulatedWait < millisecondsTimeout &&
                   unsuccessfulWaits <= maxUnsuccessfulWaits);

            if (elementStateTextBox.Value == "Idle")
            {
                Log.Comment("Idle State reached after " + millisecondsCumulatedWait + " out of " + millisecondsTimeout + " milliseconds. Final Offset: " + text.Value);
                return true;
            }
            else
            {
                LogAndClearTraces();
                string message = unsuccessfulWaits > maxUnsuccessfulWaits ?
                    "Offset has not changed within " + millisecondsIdleStepTimeout + " milliseconds outside of Idle State." :
                    "Idle State was not reached within " + millisecondsTimeout + " milliseconds.";
                if (failOnError)
                {
                    Log.Error(message);
                }
                else
                {
                    Log.Warning(message);
                }

                return false;
            }
        }

int WaitForOffsetUpdated | ( | Edit | text,
 |  | double | expected,
 |  | double | modulo = double.PositiveInfinity,
 |  | double | alternateMin = double.PositiveInfinity,
 |  | double | alternateMax = double.PositiveInfinity,
 |  | double | millisecondsTimeout = defaultAnimatedViewChangeTimeout,
 |  | bool | failOnError = true |
 | ) |  |  | [inline, private]

Definition at line 2609 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            return WaitForOffsetUpdated(
                expected,
                expected,
                text,
                alternateMin,
                alternateMax,
                modulo,
                millisecondsTimeout,
                failOnError);
        }

int WaitForOffsetUpdated | ( | double | expectedMin,
 |  | double | expectedMax,
 |  | Edit | text,
 |  | double | alternateMin = double.PositiveInfinity,
 |  | double | alternateMax = double.PositiveInfinity,
 |  | double | modulo = double.PositiveInfinity,
 |  | double | millisecondsTimeout = defaultAnimatedViewChangeTimeout,
 |  | bool | failOnError = true |
 | ) |  |  | [inline, private]

Definition at line 2629 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            Log.Comment("WaitForOffsetUpdated with expectedMin: " + expectedMin + ", expectedMax: " + expectedMax);

            int warningCount = 0;
            bool success = WaitForOffsetToSettle(text, millisecondsTimeout, failOnError);
            double value = Convert.ToDouble(text.Value) % modulo;
            bool goodValue = false;
            if (value >= expectedMin && value <= expectedMax)
            {
                goodValue = true;
            }
            else if (value >= alternateMin && value <= alternateMax)
            {
                Log.Warning("Passing based on alternate value, this should be relatively rare.");
                warningCount++;
                goodValue = true;
            }
            Verify.IsTrue(goodValue);
            return warningCount;
        }

void WaitForScrollPresenterFinalSize | ( | UIObject | scrollPresenterUIObject,
 |  | double | expectedWidth,
 |  | double | expectedHeight |
 | ) |  |  | [inline, private]

Definition at line 2907 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            int pauses = 0;
            int widthDelta = Math.Abs(scrollPresenterUIObject.BoundingRectangle.Width - (int)expectedWidth);
            int heightDelta = Math.Abs(scrollPresenterUIObject.BoundingRectangle.Height - (int)expectedHeight);

            Log.Comment("scrollPresenterUIObject.BoundingRectangle={0}", scrollPresenterUIObject.BoundingRectangle);

            while ((widthDelta > 1 || heightDelta > 1) && pauses < 5)
            {
                Wait.ForMilliseconds(60);
                pauses++;
                Log.Comment("scrollPresenterUIObject.BoundingRectangle={0}", scrollPresenterUIObject.BoundingRectangle);
                widthDelta = Math.Abs(scrollPresenterUIObject.BoundingRectangle.Width - (int)expectedWidth);
                heightDelta = Math.Abs(scrollPresenterUIObject.BoundingRectangle.Height - (int)expectedHeight);
            };

            Verify.IsLessThanOrEqual(widthDelta, 1);
            Verify.IsLessThanOrEqual(heightDelta, 1);
        }

void WaitForScrollPresenterManipulationEnd | ( | string | scrollPresenterName,
 |  | string | stateTextBoxName = "txtScrollPresenterState" |
 | ) |  |  | [inline, private]

Definition at line 2821 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            WaitForManipulationEnd(scrollPresenterName, stateTextBoxName);
        }

void WaitForScrollViewerManipulationEnd | ( | string | scrollViewerName,
 |  | string | stateTextBoxName = "txtScrollViewerState" |
 | ) |  |  | [inline, private]

Definition at line 2839 of file ScrollPresenterTestsWithInputHelper.cs.

        {
            WaitForManipulationEnd(scrollViewerName, stateTextBoxName);
        }

Member Data Documentation

const double defaultAnimatedViewChangeTimeout = 9000 [private]

Definition at line 36 of file ScrollPresenterTestsWithInputHelper.cs.

const int mouseWheelDeltaForVelocityUnit = 120 [private]

Definition at line 32 of file ScrollPresenterTestsWithInputHelper.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/InteractionTests/ScrollPresenterTestsWithInputHelper.cs
Generated on Sun Dec 1 2024 20:53:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ScrollPresenterTestsWithInputHelper
  • ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
Public Attributes

ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements Struct Reference

List of all members.

Public Attributes

Button | btnAddMISnapPointUIObject
Button | btnAddMRSnapPointUIObject
Button | changeScrollPresenterOffset
ComboBox | cmbMISnapPointAlignment
ComboBox | cmbMRSnapPointAlignment
Edit | scrollPresenterOffset
Edit | scrollPresenterOffsetChangeAmount
UIObject | scrollPresenterUIObject
Edit | txtMISnapPointValueUIObject
Edit | txtMRSnapPointEndUIObject
Edit | txtMRSnapPointIntervalUIObject
Edit | txtMRSnapPointOffsetUIObject
Edit | txtMRSnapPointStartUIObject

Detailed Description

Definition at line 2986 of file ScrollPresenterTestsWithInputHelper.cs.

Member Data Documentation

Button btnAddMISnapPointUIObject

Definition at line 2988 of file ScrollPresenterTestsWithInputHelper.cs.

Button btnAddMRSnapPointUIObject

Definition at line 2998 of file ScrollPresenterTestsWithInputHelper.cs.

Button changeScrollPresenterOffset

Definition at line 3018 of file ScrollPresenterTestsWithInputHelper.cs.

ComboBox cmbMISnapPointAlignment

Definition at line 2990 of file ScrollPresenterTestsWithInputHelper.cs.

ComboBox cmbMRSnapPointAlignment

Definition at line 3003 of file ScrollPresenterTestsWithInputHelper.cs.

Edit scrollPresenterOffset

Definition at line 3016 of file ScrollPresenterTestsWithInputHelper.cs.

Edit scrollPresenterOffsetChangeAmount

Definition at line 3017 of file ScrollPresenterTestsWithInputHelper.cs.

UIObject scrollPresenterUIObject

Definition at line 3014 of file ScrollPresenterTestsWithInputHelper.cs.

Edit txtMISnapPointValueUIObject

Definition at line 2989 of file ScrollPresenterTestsWithInputHelper.cs.

Edit txtMRSnapPointEndUIObject

Definition at line 3002 of file ScrollPresenterTestsWithInputHelper.cs.

Edit txtMRSnapPointIntervalUIObject

Definition at line 3000 of file ScrollPresenterTestsWithInputHelper.cs.

Edit txtMRSnapPointOffsetUIObject

Definition at line 2999 of file ScrollPresenterTestsWithInputHelper.cs.

Edit txtMRSnapPointStartUIObject

Definition at line 3001 of file ScrollPresenterTestsWithInputHelper.cs.

The documentation for this struct was generated from the following file:
  • ScrollPresenter/InteractionTests/ScrollPresenterTestsWithInputHelper.cs
Generated on Sun Dec 1 2024 20:53:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewerAdapterTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ScrollViewerAdapterTests
Public Member Functions | Static Public Member Functions

ScrollViewerAdapterTests Class Reference

List of all members.

Public Member Functions

void | DeconstructionHandlesCorrectlyTest ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 21 of file ScrollViewerAdapterTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 27 of file ScrollViewerAdapterTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void DeconstructionHandlesCorrectlyTest ( ) [inline]

Definition at line 39 of file ScrollViewerAdapterTests.cs.

        {
            using (var setup = new TestSetupHelper("ScrollViewerAdapter Tests")) // This literally clicks the button corresponding to the test page.
            {
                Log.Comment("Retrieve AdaptOnSVWithoutWaitingForLoadedButton button.");
                UIObject AdaptOnSVWithoutWaitingForLoadedButtonUIObject = FindElement.ByName("AdaptOnSVWithoutWaitingForLoadedButton");
                Verify.IsNotNull(AdaptOnSVWithoutWaitingForLoadedButtonUIObject, "Verifying that we found a UIElement called AdaptOnSVWithoutWaitingForLoadedButton");

                Log.Comment("Retrieve RemoveButton button.");
                UIObject RemoveButtonUIObject = FindElement.ByName("RemoveButton");
                Verify.IsNotNull(RemoveButtonUIObject, "Verifying that we found a UIElement called RemoveButton");

                Log.Comment("Retrieve GCButton button.");
                UIObject GCButtonUIObject = FindElement.ByName("GCButton");
                Verify.IsNotNull(GCButtonUIObject, "Verifying that we found a UIElement called GCButton");

                Log.Comment("Retrieve CheckLeaksButton button.");
                UIObject CheckLeaksButtonUIObject = FindElement.ByName("CheckLeaksButton");
                Verify.IsNotNull(CheckLeaksButtonUIObject, "Verifying that we found a UIElement called CheckLeaksButton");

                InputHelper.Tap(AdaptOnSVWithoutWaitingForLoadedButtonUIObject);
                InputHelper.Tap(RemoveButtonUIObject);
                InputHelper.Tap(GCButtonUIObject);
                InputHelper.Tap(CheckLeaksButtonUIObject);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 33 of file ScrollViewerAdapterTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

The documentation for this class was generated from the following file:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/InteractionTests/ScrollViewerAdapterTests.cs
Generated on Sun Dec 1 2024 20:53:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewTestsWithInputHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ScrollViewTestsWithInputHelper
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions

ScrollViewTestsWithInputHelper Class Reference

List of all members.

Classes

class | LoggingHelper

Public Member Functions

void | PanScrollViewer ()
void | ScrollHorizontallyWithEndHomeKeys ()
void | ScrollHorizontallyWithEndHomeKeysInRTL ()
void | ScrollThenPanScrollView ()
void | TestCleanup ()
void | VerifyScrollViewGamePadBumperInteraction ()
void | VerifyScrollViewGamePadHorizontalInteraction ()
void | VerifyScrollViewGamePadInteraction ()
void | VerifyScrollViewGamePadTriggerInteraction ()
void | VerifyScrollViewIgnoresGamepadInput ()
void | VerifyScrollViewIgnoresKeyboardInput ()
void | VerifyScrollViewKeyboardInteraction ()
void | VerifyScrollViewKeyboardInteractionWithXYFocusEnabled ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

bool | AreClose (double expected, double actual, double delta=0.1)
void | ClearTraces ()
void | GetScrollPresenterView (out double horizontalOffset, out double verticalOffset, out float zoomFactor)
void | LogAndClearTraces ()
void | LogEditValue (string editName)
void | LogEditValue (string editName, Edit edit)
void | LogTraces ()
void | PrepareForScrollViewManipulationStart (string stateTextBoxName="txtScrollPresenterState")
void | PressGamepadButtonAndVerifyOffsetAndFocus (GamepadButton gamepadButton, string expectedFocusedItemName, double expectedHorizontalOffset, double expectedVerticalOffset, int?expectedViewChangeCount=null)
void | SetScrollPresenterLoggingLevel (bool isPrivateLoggingEnabled)
void | SetScrollViewLoggingLevel (bool isPrivateLoggingEnabled)
void | SetupScrollViewTestWithImage (string suffix, out UIObject imageInScrollView, out ScrollPresenter scrollPresenter)
void | SetupSimpleSingleScrollViewTest (out UIObject buttonInScrollView11, out ScrollPresenter scrollPresenter11)
void | TapResetViewsButton ()
bool | TryWaitForScrollViewManipulationEnd (string scrollViewName, string stateTextBoxName="txtScrollPresenterState")
void | UpdateTraces ()
void | VerifyAreClose (double expected, double actual, double delta, string message)
void | VerifyScrollViewRemainsAtView (double expectedHorizontalOffset, double expectedVerticalOffset, float expectedZoomFactor)
int | ViewChangeCount ()
void | WaitForBoxChecked (string checkBoxName)
bool | WaitForEditValue (string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true)
bool | WaitForManipulationEnd (string elementName, string stateTextBoxName, bool throwOnError=true)
void | WaitForScrollViewFinalSize (UIObject scrollViewUIObject, double expectedWidth, double expectedHeight)
void | WaitForScrollViewManipulationEnd (string scrollViewName, string stateTextBoxName="txtScrollPresenterState")
void | WaitForScrollViewOffsets (double expectedHorizontalOffset, double expectedVerticalOffset)

Detailed Description

Definition at line 25 of file ScrollViewTestsWithInputHelper.cs.

Member Function Documentation

bool AreClose | ( | double | expected,
 |  | double | actual,
 |  | double | delta = 0.1 |
 | ) |  |  | [inline, private]

Definition at line 786 of file ScrollViewTestsWithInputHelper.cs.

        {
            return Math.Abs(expected - actual) <= delta;
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 31 of file ScrollViewTestsWithInputHelper.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClearTraces ( ) [inline, private]

Definition at line 1044 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Clearing full log.");
            LogEditValue("txtResetStatus");

            // Triggering ScrollViewsWithSimpleContentsPage.ClearFullLog() call.
            TextInput.SendText("c");
            WaitForBoxChecked("chkLogCleared");
        }

void GetScrollPresenterView | ( | out double | horizontalOffset,
 |  | out double | verticalOffset,
 |  | out float | zoomFactor |
 | ) |  |  | [inline, private]

Definition at line 811 of file ScrollViewTestsWithInputHelper.cs.

        {
            horizontalOffset = 0.0;
            verticalOffset = 0.0;
            zoomFactor = 1.0f;

            UIObject viewUIObject = FindElement.ById("txtScrollPresenterHorizontalOffset");
            Edit viewTextBox = new Edit(viewUIObject);
            Log.Comment("Current HorizontalOffset: " + viewTextBox.Value);
            horizontalOffset = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);

            viewUIObject = FindElement.ById("txtScrollPresenterVerticalOffset");
            viewTextBox = new Edit(viewUIObject);
            Log.Comment("Current VerticalOffset: " + viewTextBox.Value);
            verticalOffset = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);

            viewUIObject = FindElement.ById("txtScrollPresenterZoomFactor");
            viewTextBox = new Edit(viewUIObject);
            Log.Comment("Current ZoomFactor: " + viewTextBox.Value);
            zoomFactor = String.IsNullOrWhiteSpace(viewTextBox.Value) ? float.NaN : Convert.ToSingle(viewTextBox.Value);
        }

void LogAndClearTraces ( ) [inline, private]

Definition at line 1054 of file ScrollViewTestsWithInputHelper.cs.

        {
            LogTraces();
            ClearTraces();
        }

void LogEditValue ( string editName ) [inline, private]

Definition at line 841 of file ScrollViewTestsWithInputHelper.cs.

        {
            Edit edit = new Edit(FindElement.ById(editName));
            Verify.IsNotNull(edit);
            LogEditValue(editName, edit);
        }

void LogEditValue | ( | string | editName,
 |  | Edit | edit |
 | ) |  |  | [inline, private]

Definition at line 848 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Current value for " + editName + ": " + edit.Value);
        }

void LogTraces ( ) [inline, private]

Definition at line 1027 of file ScrollViewTestsWithInputHelper.cs.

        {
            UpdateTraces();

            Log.Comment("Reading full log:");

            UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
            Verify.IsNotNull(fullLogUIObject);
            ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
            Verify.IsNotNull(cmbFullLog);

            foreach (ComboBoxItem item in cmbFullLog.AllItems)
            {
                Log.Comment(item.Name);
            }
        }

void PanScrollViewer ( ) [inline]

Definition at line 45 of file ScrollViewTestsWithInputHelper.cs.

        {
            const double minHorizontalScrollPercent = 35.0;
            const double minVerticalScrollPercent = 35.0;

            Log.Comment("Selecting ScrollView tests");

            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                Log.Comment("Retrieving cmbShowScrollView");
                ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
                Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");

                Log.Comment("Changing ScrollView selection to scrollView51");
                cmbShowScrollView.SelectItemByName("scrollView_51");
                Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);

                Log.Comment("Retrieving img51");
                UIObject img51UIObject = FindElement.ByName("img51");
                Verify.IsNotNull(img51UIObject, "Verifying that img51 was found");

                Log.Comment("Retrieving scrollPresenter51");
                ScrollPresenter scrollPresenter51 = new ScrollPresenter(img51UIObject.Parent);
                Verify.IsNotNull(scrollPresenter51, "Verifying that scrollPresenter51 was found");

                WaitForScrollViewFinalSize(scrollPresenter51, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetViewsButton();

                Log.Comment("Panning ScrollView in diagonal");
                PrepareForScrollViewManipulationStart();

                InputHelper.Pan(
                    scrollPresenter51,
                    new Point(scrollPresenter51.BoundingRectangle.Left + 25, scrollPresenter51.BoundingRectangle.Top + 25),
                    new Point(scrollPresenter51.BoundingRectangle.Left - 25, scrollPresenter51.BoundingRectangle.Top - 25));

                Log.Comment("Waiting for scrollView51 pan completion");
                WaitForScrollViewManipulationEnd("scrollView51");

                Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
                Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);

                if (scrollPresenter51.HorizontalScrollPercent <= minHorizontalScrollPercent || scrollPresenter51.VerticalScrollPercent <= minVerticalScrollPercent)
                {
                    LogAndClearTraces();
                }

                Verify.IsTrue(scrollPresenter51.HorizontalScrollPercent > minHorizontalScrollPercent, "Verifying scrollPresenter51 HorizontalScrollPercent is greater than " + minHorizontalScrollPercent + "%");
                Verify.IsTrue(scrollPresenter51.VerticalScrollPercent > minVerticalScrollPercent, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + minVerticalScrollPercent + "%");

                // scrollPresenter51's Content size is 800x800px.
                double horizontalOffset;
                double verticalOffset;
                double minHorizontalOffset = 800.0 * (1.0 - scrollPresenter51.HorizontalViewSize / 100.0) * minHorizontalScrollPercent / 100.0;
                double minVerticalOffset = 800.0 * (1.0 - scrollPresenter51.VerticalViewSize / 100.0) * minVerticalScrollPercent / 100.0;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);
                Verify.IsTrue(horizontalOffset > minHorizontalOffset, "Verifying horizontalOffset is greater than " + minHorizontalOffset);
                Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
                Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");

                // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
            }
        }

void PrepareForScrollViewManipulationStart ( string stateTextBoxName = "txtScrollPresenterState" ) [inline, private]

Definition at line 833 of file ScrollViewTestsWithInputHelper.cs.

        {
            UIObject scrollPresenterStateUIObject = FindElement.ById(stateTextBoxName);
            Edit scrollPresenterStateTextBox = new Edit(scrollPresenterStateUIObject);
            Log.Comment("Pre-manipulation ScrollPresenterState: " + scrollPresenterStateTextBox.Value);
            Wait.ForIdle();
        }

void PressGamepadButtonAndVerifyOffsetAndFocus | ( | GamepadButton | gamepadButton,
 |  | string | expectedFocusedItemName,
 |  | double | expectedHorizontalOffset,
 |  | double | expectedVerticalOffset,
 |  | int? | expectedViewChangeCount = null |
 | ) |  |  | [inline, private]

Definition at line 687 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment($"PressGamepadButtonAndVerifyOffsetAndFocus. gamepadButton={gamepadButton}, expectedFocusedItemName={expectedFocusedItemName}, expectedViewChangeCount={expectedViewChangeCount}.");

            bool waitForFocusChange = UIObject.Focused.Name != expectedFocusedItemName;

            GamepadHelper.PressButton(null, gamepadButton);

            if (waitForFocusChange)
            {
                var focusChangedWaiter = new FocusAcquiredWaiter();

                focusChangedWaiter.Wait(TimeSpan.FromSeconds(2));
            }

            WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

            Log.Comment($"Focused element. Expected={expectedFocusedItemName}, Actual={UIObject.Focused.Name}.");
            Verify.AreEqual(expectedFocusedItemName, UIObject.Focused.Name, "Verify focused element");

            int viewChangeCount = ViewChangeCount();
            if (expectedViewChangeCount == null)
            {
                Verify.IsGreaterThan(viewChangeCount, 1);
            }
            else
            {
                Verify.AreEqual(viewChangeCount, expectedViewChangeCount);
            }
        }

void ScrollHorizontallyWithEndHomeKeys ( ) [inline]

Definition at line 362 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                UIObject img31;
                ScrollPresenter scrollPresenter31;

                SetupScrollViewTestWithImage("31", out img31, out scrollPresenter31);

                Log.Comment("Pressing End key");
                KeyboardHelper.PressKey(scrollPresenter31, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(900 - scrollPresenter31.BoundingRectangle.Width, 0);

                Log.Comment("Pressing Home key");
                KeyboardHelper.PressKey(scrollPresenter31, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, 0);
            }
        }

void ScrollHorizontallyWithEndHomeKeysInRTL ( ) [inline]

Definition at line 383 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                UIObject img32;
                ScrollPresenter scrollPresenter32;

                SetupScrollViewTestWithImage("32", out img32, out scrollPresenter32);

                Log.Comment("Pressing Home key");
                KeyboardHelper.PressKey(scrollPresenter32, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(900 - scrollPresenter32.BoundingRectangle.Width, 0);

                Log.Comment("Pressing End key");
                KeyboardHelper.PressKey(scrollPresenter32, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, 0);
            }
        }

void ScrollThenPanScrollView ( ) [inline]

Definition at line 119 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Selecting ScrollView tests");

            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                const double minVerticalScrollPercentAfterScroll = 15.0;
                const double minHorizontalScrollPercentAfterPan = 35.0;
                const double minVerticalScrollPercentAfterPan = 50.0;

                double verticalScrollPercentAfterScroll = 0.0;

                Log.Comment("Retrieving cmbShowScrollView");
                ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
                Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");

                Log.Comment("Changing ScrollView selection to scrollView51");
                cmbShowScrollView.SelectItemByName("scrollView_51");
                Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);

                Log.Comment("Retrieving img51");
                UIObject img51UIObject = FindElement.ByName("img51");
                Verify.IsNotNull(img51UIObject, "Verifying that img51 was found");

                Log.Comment("Retrieving scrollPresenter51");
                ScrollPresenter scrollPresenter51 = new ScrollPresenter(img51UIObject.Parent);
                Verify.IsNotNull(scrollPresenter51, "Verifying that scrollPresenter51 was found");

                WaitForScrollViewFinalSize(scrollPresenter51, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);

                // Tapping button before attempting pan operation to guarantee effective touch input
                TapResetViewsButton();

                Log.Comment("Left mouse buttom down over ScrollBar thumb");
                InputHelper.LeftMouseButtonDown(scrollPresenter51, 140 /*offsetX*/, -100 /*offsetY*/);

                Log.Comment("Mouse drag and left mouse buttom up over ScrollBar thumb");
                InputHelper.LeftMouseButtonUp(scrollPresenter51, 140 /*offsetX*/, -50 /*offsetY*/);

                Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
                Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);

                verticalScrollPercentAfterScroll = scrollPresenter51.VerticalScrollPercent;

                if (scrollPresenter51.HorizontalScrollPercent != 0.0 || scrollPresenter51.VerticalScrollPercent <= minVerticalScrollPercentAfterScroll)
                {
                    LogAndClearTraces();
                }

                Verify.AreEqual(scrollPresenter51.HorizontalScrollPercent, 0.0, "Verifying scrollPresenter51 HorizontalScrollPercent is still 0%");
                Verify.IsTrue(verticalScrollPercentAfterScroll > minVerticalScrollPercentAfterScroll, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + minVerticalScrollPercentAfterScroll + "%");

                Log.Comment("Panning ScrollView in diagonal");
                PrepareForScrollViewManipulationStart();

                // Using a large enough span and duration for this diagonal pan so that it is not erroneously recognized as a horizontal pan.
                InputHelper.Pan(
                    scrollPresenter51,
                    new Point(scrollPresenter51.BoundingRectangle.Left + 30, scrollPresenter51.BoundingRectangle.Top + 30),
                    new Point(scrollPresenter51.BoundingRectangle.Left - 30, scrollPresenter51.BoundingRectangle.Top - 30),
                    InputHelper.DefaultPanHoldDuration,
                    InputHelper.DefaultPanAcceleration / 2.4f);

                Log.Comment("Waiting for scrollView51 pan completion");
                WaitForScrollViewManipulationEnd("scrollView51");

                Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
                Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);

                if (scrollPresenter51.HorizontalScrollPercent <= minHorizontalScrollPercentAfterPan ||
                    scrollPresenter51.VerticalScrollPercent <= minVerticalScrollPercentAfterPan ||
                    scrollPresenter51.VerticalScrollPercent <= verticalScrollPercentAfterScroll)
                {
                    LogAndClearTraces();
                }

                Verify.IsTrue(scrollPresenter51.HorizontalScrollPercent > minHorizontalScrollPercentAfterPan, "Verifying scrollPresenter51 HorizontalScrollPercent is greater than " + minHorizontalScrollPercentAfterPan + "%");
                Verify.IsTrue(scrollPresenter51.VerticalScrollPercent > minVerticalScrollPercentAfterPan, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + minVerticalScrollPercentAfterPan + "%");
                Verify.IsTrue(scrollPresenter51.VerticalScrollPercent > verticalScrollPercentAfterScroll, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + verticalScrollPercentAfterScroll + "%");

                // scrollPresenter51's Content size is 800x800px.
                double horizontalOffset;
                double verticalOffset;
                double minHorizontalOffset = 800.0 * (1.0 - scrollPresenter51.HorizontalViewSize / 100.0) * minHorizontalScrollPercentAfterPan / 100.0;
                double minVerticalOffset = 800.0 * (1.0 - scrollPresenter51.VerticalViewSize / 100.0) * minVerticalScrollPercentAfterPan / 100.0;
                float zoomFactor;

                GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
                Log.Comment("horizontalOffset={0}", horizontalOffset);
                Log.Comment("verticalOffset={0}", verticalOffset);
                Log.Comment("zoomFactor={0}", zoomFactor);
                Verify.IsTrue(horizontalOffset > minHorizontalOffset, "Verifying horizontalOffset is greater than " + minHorizontalOffset);
                Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
                Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");
            }
        }

void SetScrollPresenterLoggingLevel ( bool isPrivateLoggingEnabled ) [inline, private]

Definition at line 1089 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving chkLogScrollPresenterMessages");
            CheckBox chkLogScrollPresenterMessages = new CheckBox(FindElement.ById("chkLogScrollPresenterMessages"));
            Verify.IsNotNull(chkLogScrollPresenterMessages, "Verifying that chkLogScrollPresenterMessages was found");

            if (isPrivateLoggingEnabled && chkLogScrollPresenterMessages.ToggleState != ToggleState.On ||
                !isPrivateLoggingEnabled && chkLogScrollPresenterMessages.ToggleState != ToggleState.Off)
            {
                Log.Comment("Toggling chkLogScrollPresenterMessages.IsChecked to " + isPrivateLoggingEnabled);
                chkLogScrollPresenterMessages.Toggle();
                Wait.ForIdle();
            }
        }

void SetScrollViewLoggingLevel ( bool isPrivateLoggingEnabled ) [inline, private]

Definition at line 1104 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving chkLogScrollViewMessages");
            CheckBox chkLogScrollViewMessages = new CheckBox(FindElement.ById("chkLogScrollViewMessages"));
            Verify.IsNotNull(chkLogScrollViewMessages, "Verifying that chkLogScrollViewMessages was found");

            if (isPrivateLoggingEnabled && chkLogScrollViewMessages.ToggleState != ToggleState.On ||
                !isPrivateLoggingEnabled && chkLogScrollViewMessages.ToggleState != ToggleState.Off)
            {
                Log.Comment("Toggling chkLogScrollViewMessages.IsChecked to " + isPrivateLoggingEnabled);
                chkLogScrollViewMessages.Toggle();
                Wait.ForIdle();
            }
        }

void SetupScrollViewTestWithImage | ( | string | suffix,
 |  | out UIObject | imageInScrollView,
 |  | out ScrollPresenter | scrollPresenter |
 | ) |  |  | [inline, private]

Definition at line 663 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving cmbShowScrollView");
            ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
            Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");

            Log.Comment("Changing ScrollView selection to scrollView" + suffix);
            cmbShowScrollView.SelectItemByName("scrollView_" + suffix);
            Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);

            Log.Comment("Retrieving img" + suffix);
            imageInScrollView = FindElement.ById("img" + suffix);
            Verify.IsNotNull(imageInScrollView, "Verifying that img" + suffix + " was found");

            Log.Comment("Retrieving ScrollPresenter");
            scrollPresenter = new ScrollPresenter(imageInScrollView.Parent);
            Verify.IsNotNull(scrollPresenter, "Verifying that ScrollPresenter was found");

            WaitForScrollViewFinalSize(scrollPresenter, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);

            imageInScrollView.Click();
            Wait.ForIdle();
        }

void SetupSimpleSingleScrollViewTest | ( | out UIObject | buttonInScrollView11,
 |  | out ScrollPresenter | scrollPresenter11 |
 | ) |  |  | [inline, private]

Definition at line 639 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving cmbShowScrollView");
            ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
            Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");

            Log.Comment("Changing ScrollView selection to scrollView11");
            cmbShowScrollView.SelectItemByName("scrollView_11");
            Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);

            Log.Comment("Retrieving buttonInScrollView11");
            buttonInScrollView11 = FindElement.ById("buttonInScrollView11");
            Verify.IsNotNull(buttonInScrollView11, "Verifying that buttonInScrollView11 was found");

            Log.Comment("Retrieving scrollPresenter11");
            scrollPresenter11 = new ScrollPresenter(buttonInScrollView11.Parent);
            Verify.IsNotNull(scrollPresenter11, "Verifying that scrollPresenter11 was found");

            WaitForScrollViewFinalSize(scrollPresenter11, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);

            buttonInScrollView11.Click();
            Wait.ForIdle();
        }

void TapResetViewsButton ( ) [inline, private]

Definition at line 796 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Retrieving btnResetViews");
            UIObject resetViewsUIObject = FindElement.ByName("btnResetViews");
            Verify.IsNotNull(resetViewsUIObject, "Verifying that btnResetViews Button was found");

            Button resetViewsButton = new Button(resetViewsUIObject);
            InputHelper.Tap(resetViewsButton);
            if (!WaitForEditValue("txtResetStatus" /*editName*/, "Views reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/))
            {
                InputHelper.Tap(resetViewsButton);
                WaitForEditValue("txtResetStatus" /*editName*/, "Views reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 37 of file ScrollViewTestsWithInputHelper.cs.

        {
            TestCleanupHelper.Cleanup();
        }

bool TryWaitForScrollViewManipulationEnd | ( | string | scrollViewName,
 |  | string | stateTextBoxName = "txtScrollPresenterState" |
 | ) |  |  | [inline, private]

Definition at line 904 of file ScrollViewTestsWithInputHelper.cs.

        {
            return WaitForManipulationEnd(scrollViewName, stateTextBoxName, false /*throwOnError*/);
        }

void UpdateTraces ( ) [inline, private]

Definition at line 1017 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Updating full log:");
            LogEditValue("txtResetStatus");

            // Triggering ScrollViewsWithSimpleContentsPage.GetFullLog() call.
            TextInput.SendText("g");
            WaitForBoxChecked("chkLogUpdated");
        }

void VerifyAreClose | ( | double | expected,
 |  | double | actual,
 |  | double | delta,
 |  | string | message |
 | ) |  |  | [inline, private]

Definition at line 791 of file ScrollViewTestsWithInputHelper.cs.

        {
            Verify.IsTrue(AreClose(expected, actual, delta), String.Format("{0}, expected={1}, actual={2}, delta={3}", message, expected, actual, delta));
        }

void VerifyScrollViewGamePadBumperInteraction ( ) [inline]

Definition at line 596 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                using (var loggingHelper = new LoggingHelper(this))
                {
                    UISettings settings = new UISettings();
                    bool areAnimationsEnabled = settings.AnimationsEnabled;

                    UIObject buttonInScrollView11;
                    ScrollPresenter scrollPresenter11;
                    SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);

                    var scrollAmountForBumper = scrollPresenter11.BoundingRectangle.Width;

                    double expectedVerticalOffset = 0;
                    double expectedHorizontalOffset = 0;
                    int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;

                    //Right. Change focus. Scroll.
                    expectedHorizontalOffset = areAnimationsEnabled ? scrollAmountForBumper : 320.0;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightShoulder, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Right. Don't change focus. Scroll.
                    expectedHorizontalOffset += scrollAmountForBumper;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightShoulder, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Left. Don't change focus. Scroll.
                    expectedHorizontalOffset -= scrollAmountForBumper;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftShoulder, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    double actualHorizontalOffset;
                    double actualVerticalOffset;
                    float actualZoomFactor;
                    GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);

                    //Left. Change focus. Scroll.
                    expectedHorizontalOffset = areAnimationsEnabled ? 0 : 80.0;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftShoulder, actualHorizontalOffset > scrollAmountForBumper ? "Button 1B" : "Button 1", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
                }
            }
        }

void VerifyScrollViewGamePadHorizontalInteraction ( ) [inline]

Definition at line 498 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                using (var loggingHelper = new LoggingHelper(this))
                {
                    UISettings settings = new UISettings();
                    bool areAnimationsEnabled = settings.AnimationsEnabled;

                    UIObject buttonInScrollView11;
                    ScrollPresenter scrollPresenter11;
                    SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);

                    var scrollAmountForGamepadLeftRight = scrollPresenter11.BoundingRectangle.Width * 0.5;

                    double expectedVerticalOffset = 0;
                    double expectedHorizontalOffset = 0;
                    int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;

                    //Right. Change focus. Don't scroll.
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1B", expectedHorizontalOffset, expectedVerticalOffset, 0);

                    //Left. Change focus. Don't scroll.
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickLeft, "Button 1", expectedHorizontalOffset, expectedVerticalOffset, 0);

                    //Right. Change focus. Don't scroll.
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1B", expectedHorizontalOffset, expectedVerticalOffset, 0);

                    //Right. Change focus. Scroll.
                    expectedHorizontalOffset = 320;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Right. Don't Change focus. Scroll.
                    expectedHorizontalOffset += scrollAmountForGamepadLeftRight;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Right. Don't Change focus. Scroll.
                    expectedHorizontalOffset += scrollAmountForGamepadLeftRight;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Left. Don't Change focus. Scroll.
                    expectedHorizontalOffset -= scrollAmountForGamepadLeftRight;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickLeft, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Left. Change focus. Scroll.
                    expectedHorizontalOffset = 80;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickLeft, "Button 1B", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
                }
            }
        }

void VerifyScrollViewGamePadInteraction ( ) [inline]

Definition at line 404 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                using (var loggingHelper = new LoggingHelper(this))
                {
                    UISettings settings = new UISettings();
                    bool areAnimationsEnabled = settings.AnimationsEnabled;

                    UIObject buttonInScrollView11;
                    ScrollPresenter scrollPresenter11;
                    SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);

                    Log.Comment("Tapping Button 1");
                    InputHelper.Tap(buttonInScrollView11);

                    Log.Comment($"Focused element. Expected=Button 1, Actual={UIObject.Focused.Name}.");
                    Verify.AreEqual("Button 1", UIObject.Focused.Name, "Verify focused element");

                    var scrollAmountForGamepadUpDown = scrollPresenter11.BoundingRectangle.Height * 0.5;
                    Log.Comment($"scrollAmountForGamepadUpDown={scrollAmountForGamepadUpDown}.");

                    double expectedVerticalOffset = 0;
                    double expectedHorizontalOffset = 0;
                    int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;

                    //Down. Change focus. Don't scroll.
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 2", expectedHorizontalOffset, expectedVerticalOffset, 0);

                    //Down. Change focus. Scroll.
                    expectedVerticalOffset = 220;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Down. Don't change focus. Scroll.
                    expectedVerticalOffset += scrollAmountForGamepadUpDown;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Down. Change focus. Scroll.
                    expectedVerticalOffset = 920;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 4", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Down. Change focus. Scroll.
                    expectedVerticalOffset = 1020;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 5", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Up. Change focus. Don't scroll.
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickUp, "Button 4", expectedHorizontalOffset, expectedVerticalOffset, 0);

                    //Up. Don't change focus. Scroll.
                    expectedVerticalOffset -= scrollAmountForGamepadUpDown;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickUp, "Button 4", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Up. Change focus. Scroll.
                    expectedVerticalOffset = 480;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickUp, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
                }
            }
        }

void VerifyScrollViewGamePadTriggerInteraction ( ) [inline]

Definition at line 551 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                using (var loggingHelper = new LoggingHelper(this))
                {
                    UISettings settings = new UISettings();
                    bool areAnimationsEnabled = settings.AnimationsEnabled;

                    UIObject buttonInScrollView11;
                    ScrollPresenter scrollPresenter11;
                    SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);

                    var scrollAmountForGamepadTrigger = scrollPresenter11.BoundingRectangle.Height;

                    double expectedVerticalOffset = 0;
                    double expectedHorizontalOffset = 0;
                    int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;

                    //Down. Change focus. Scroll.
                    expectedVerticalOffset = areAnimationsEnabled ? scrollAmountForGamepadTrigger : 220.0;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightTrigger, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Down. Don't change focus. Scroll.
                    expectedVerticalOffset += scrollAmountForGamepadTrigger;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightTrigger, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    //Up. Don't change focus. Scroll.
                    expectedVerticalOffset -= scrollAmountForGamepadTrigger;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftTrigger, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);

                    double actualHorizontalOffset;
                    double actualVerticalOffset;
                    float actualZoomFactor;
                    GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);

                    //Up. Change focus. Scroll.
                    expectedVerticalOffset = 0;
                    PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftTrigger, actualVerticalOffset < scrollAmountForGamepadTrigger ? "Button 1" : "Button 2", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
                }
            }
        }

void VerifyScrollViewIgnoresGamepadInput ( ) [inline]

Definition at line 465 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                UIObject img51;
                ScrollPresenter scrollPresenter51;

                SetupScrollViewTestWithImage("51", out img51, out scrollPresenter51);

                Log.Comment("Retrieving cmbIgnoredInputKinds");
                ComboBox cmbIgnoredInputKinds = new ComboBox(FindElement.ByName("cmbIgnoredInputKinds"));
                Verify.IsNotNull(cmbIgnoredInputKinds, "Verifying that cmbIgnoredInputKinds was found");

                Log.Comment("Changing ScrollView.IgnoredInputKinds to Gamepad");
                cmbIgnoredInputKinds.SelectItemByName("Gamepad");
                Log.Comment("Selection is now {0}", cmbIgnoredInputKinds.Selection[0].Name);

                Log.Comment("Pressing LeftThumbstick Down");
                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickDown);

                Log.Comment("Pressing LeftThumbstick Down");
                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickDown);
                VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);

                Log.Comment("Pressing LeftThumbstick Right");
                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickRight);
                VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);
            }
        }

void VerifyScrollViewIgnoresKeyboardInput ( ) [inline]

Definition at line 283 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                UIObject img51;
                ScrollPresenter scrollPresenter51;

                SetupScrollViewTestWithImage("51", out img51, out scrollPresenter51);

                Log.Comment("Retrieving cmbIgnoredInputKinds");
                ComboBox cmbIgnoredInputKinds = new ComboBox(FindElement.ByName("cmbIgnoredInputKinds"));
                Verify.IsNotNull(cmbIgnoredInputKinds, "Verifying that cmbIgnoredInputKinds was found");

                Log.Comment("Changing ScrollView.IgnoredInputKinds to Keyboard");
                cmbIgnoredInputKinds.SelectItemByName("Keyboard");
                Log.Comment("Selection is now {0}", cmbIgnoredInputKinds.Selection[0].Name);

                Log.Comment("Pressing Down key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.Down, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);

                Log.Comment("Pressing Right key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);
            }
        }

void VerifyScrollViewKeyboardInteraction ( ) [inline]

Definition at line 218 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                UIObject buttonInScrollView11;
                ScrollPresenter scrollPresenter11;
                SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);

                var scrollAmountForDownOrUpKey = scrollPresenter11.BoundingRectangle.Height * 0.15;
                var scrollAmountForPageUpOrPageDownKey = scrollPresenter11.BoundingRectangle.Height;
                var scrollAmountForRightOrLeftKey = scrollPresenter11.BoundingRectangle.Width * 0.15;
                var maxScrollOffset = 2000 - scrollPresenter11.BoundingRectangle.Height;

                double expectedVerticalOffset = 0;
                double expectedHorizontalOffset = 0;

                Log.Comment("Pressing Down key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.Down, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedVerticalOffset += scrollAmountForDownOrUpKey;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing PageDown key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.PageDown, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedVerticalOffset += scrollAmountForPageUpOrPageDownKey;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing Home key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedVerticalOffset = 0;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing End key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedVerticalOffset = maxScrollOffset;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing Up key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.Up, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedVerticalOffset -= scrollAmountForDownOrUpKey;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing PageUp key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.PageUp, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedVerticalOffset -= scrollAmountForPageUpOrPageDownKey;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing Right key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedHorizontalOffset += scrollAmountForRightOrLeftKey;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing Left key");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.Left, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                expectedHorizontalOffset -= scrollAmountForRightOrLeftKey;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);

                Log.Comment("Pressing Down key three times");
                KeyboardHelper.PressKey(buttonInScrollView11, Key.Down, modifierKey: ModifierKey.None, numPresses: 3, useDebugMode: true);
                expectedVerticalOffset += 3 * scrollAmountForDownOrUpKey;
                WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
            }
        }

void VerifyScrollViewKeyboardInteractionWithXYFocusEnabled ( ) [inline]

Definition at line 312 of file ScrollViewTestsWithInputHelper.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
            {
                UIObject img51;
                ScrollPresenter scrollPresenter51;

                SetupScrollViewTestWithImage("51", out img51, out scrollPresenter51);

                var scrollAmountForDownOrUpKey = scrollPresenter51.BoundingRectangle.Height * 0.5;
                var scrollAmountForPageUpOrPageDownKey = scrollPresenter51.BoundingRectangle.Height;
                var scrollAmountForRightOrLeftKey = scrollPresenter51.BoundingRectangle.Width * 0.5;
                var maxScrollOffset = 800 - scrollPresenter51.BoundingRectangle.Height;

                Log.Comment("Pressing Down key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.Down, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, scrollAmountForDownOrUpKey);

                Log.Comment("Pressing Up key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.Up, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, 0);

                Log.Comment("Pressing PageDown key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.PageDown, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, scrollAmountForPageUpOrPageDownKey);

                Log.Comment("Pressing PageUp key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.PageUp, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, 0);

                Log.Comment("Pressing End key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, maxScrollOffset);

                Log.Comment("Pressing Home key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, 0);

                Log.Comment("Pressing Right key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(scrollAmountForRightOrLeftKey, 0);

                Log.Comment("Pressing Left key");
                KeyboardHelper.PressKey(scrollPresenter51, Key.Left, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
                WaitForScrollViewOffsets(0, 0);
            }
        }

void VerifyScrollViewRemainsAtView | ( | double | expectedHorizontalOffset,
 |  | double | expectedVerticalOffset,
 |  | float | expectedZoomFactor |
 | ) |  |  | [inline, private]

Definition at line 757 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Verifying ScrollView view remains at: {0}, {1}, {2}",
                expectedHorizontalOffset, expectedVerticalOffset, expectedZoomFactor);

            double actualHorizontalOffset;
            double actualVerticalOffset;
            float actualZoomFactor;

            GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);

            Func<bool> isViewCorrect = () =>
                AreClose(expectedHorizontalOffset, actualHorizontalOffset) &&
                AreClose(expectedVerticalOffset, actualVerticalOffset) &&
                AreClose(expectedZoomFactor, actualZoomFactor);

            Verify.IsTrue(isViewCorrect(), String.Format("Verify ScrollView initial view. Expected={0},{1},{2}, Actual={3},{4},{5}.",
                    expectedHorizontalOffset, expectedVerticalOffset, expectedZoomFactor,
                    actualHorizontalOffset, actualVerticalOffset, actualZoomFactor));

            Thread.Sleep(750);

            GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);

            Verify.IsTrue(isViewCorrect(), String.Format("Verify ScrollView final view. Expected={0},{1},{2}, Actual={3},{4},{5}.",
                    expectedHorizontalOffset, expectedVerticalOffset, expectedZoomFactor,
                    actualHorizontalOffset, actualVerticalOffset, actualZoomFactor));
        }

int ViewChangeCount ( ) [inline, private]

Definition at line 1060 of file ScrollViewTestsWithInputHelper.cs.

        {
            int viewChangeCount = 0;

            Log.Comment("Counting ViewChanged events in full log:");

            UpdateTraces();

            UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
            Verify.IsNotNull(fullLogUIObject);
            ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
            Verify.IsNotNull(cmbFullLog);

            foreach (ComboBoxItem item in cmbFullLog.AllItems)
            {
                if (item.Name.Contains("PART_Root.PART_ScrollPresenter ViewChanged"))
                {
                    viewChangeCount++;
                }
            }

            Log.Comment($"Log Entries Count={cmbFullLog.AllItems.Count}.");
            Log.Comment($"ViewChanged Count={viewChangeCount}.");

            ClearTraces();

            return viewChangeCount;
        }

void WaitForBoxChecked ( string checkBoxName ) [inline, private]

Definition at line 988 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment($"Waiting for checkbox {checkBoxName} checked...");
            LogEditValue("txtResetStatus");

            UIObject checkBoxUIObject = FindElement.ById(checkBoxName);
            Verify.IsNotNull(checkBoxUIObject);
            CheckBox checkBox = new CheckBox(checkBoxUIObject);
            Verify.IsNotNull(checkBox);

            using (var waiter = checkBox.GetToggledWaiter())
            {
                if (checkBox.ToggleState == ToggleState.On)
                {
                    Log.Comment("CheckBox already checked.");
                }
                else
                {
                    waiter.TryWait();
                    if (checkBox.ToggleState != ToggleState.On)
                    {
                        Log.Warning($"{checkBoxName} was not checked.");
                        throw new WaiterException();
                    }
                    Log.Comment("CheckBox checked.");
                }
            }
        }

bool WaitForEditValue | ( | string | editName,
 |  | string | editValue,
 |  | double | secondsTimeout = 2.0,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, private]

Definition at line 853 of file ScrollViewTestsWithInputHelper.cs.

        {
            Edit edit = new Edit(FindElement.ById(editName));
            Verify.IsNotNull(edit);
            LogEditValue(editName, edit);
            if (edit.Value != editValue)
            {
                using (var waiter = new ValueChangedEventWaiter(edit, editValue))
                {
                    Log.Comment("Waiting for " + editName + " to be set to " + editValue);

                    bool success = waiter.TryWait(TimeSpan.FromSeconds(secondsTimeout));
                    Log.Comment("Current value for " + editName + ": " + edit.Value);

                    if (success)
                    {
                        Log.Comment("Wait succeeded");
                    }
                    else
                    {
                        if (edit.Value == editValue)
                        {
                            Log.Warning("Wait failed but TextBox contains expected Text");
                            LogAndClearTraces();
                        }
                        else
                        {
                            if (throwOnError)
                            {
                                Log.Error("Wait for edit value failed");
                                LogAndClearTraces();
                                throw new WaiterException();
                            }
                            else
                            {
                                Log.Warning("Wait for edit value failed");
                                LogAndClearTraces();
                                return false;
                            }
                        }
                    }
                }
            }
            return true;
        }

bool WaitForManipulationEnd | ( | string | elementName,
 |  | string | stateTextBoxName,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, private]

Definition at line 909 of file ScrollViewTestsWithInputHelper.cs.

        {
            UIObject elementStateUIObject = FindElement.ById(stateTextBoxName);
            Edit elementStateTextBox = new Edit(elementStateUIObject);
            Log.Comment("Current State: " + elementStateTextBox.Value);
            if (elementStateTextBox.Value != elementName + ".PART_Root.PART_ScrollPresenter Idle")
            {
                using (var waiter = new ValueChangedEventWaiter(elementStateTextBox, elementName + ".PART_Root.PART_ScrollPresenter Idle"))
                {
                    int loops = 0;

                    Log.Comment("Waiting for " + elementName + "'s manipulation end.");
                    while (true)
                    {
                        bool success = waiter.TryWait(TimeSpan.FromMilliseconds(250));

                        Log.Comment("Current State: " + elementStateTextBox.Value);

                        if (success)
                        {
                            Log.Comment("Wait succeeded");
                            break;
                        }
                        else
                        {
                            if (elementStateTextBox.Value == elementName + ".PART_Root.PART_ScrollPresenter Idle")
                            {
                                Log.Warning("Wait failed but TextBox contains expected text");
                                LogAndClearTraces();
                                break;
                            }
                            else if (loops < 20)
                            {
                                loops++;
                                waiter.Reset();
                            }
                            else
                            {
                                if (throwOnError)
                                {
                                    Log.Error("Wait for manipulation end failed");
                                    LogAndClearTraces();
                                    throw new WaiterException();
                                }
                                else
                                {
                                    Log.Warning("Wait for manipulation end failed");
                                    LogAndClearTraces();
                                    return false;
                                }
                            }
                        }
                    }
                }
            }
            return true;
        }

void WaitForScrollViewFinalSize | ( | UIObject | scrollViewUIObject,
 |  | double | expectedWidth,
 |  | double | expectedHeight |
 | ) |  |  | [inline, private]

Definition at line 967 of file ScrollViewTestsWithInputHelper.cs.

        {
            int pauses = 0;
            int widthDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Width - (int)expectedWidth);
            int heightDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Height - (int)expectedHeight);

            Log.Comment("scrollViewUIObject.BoundingRectangle={0}", scrollViewUIObject.BoundingRectangle);

            while (widthDelta > 1 || heightDelta > 1 && pauses < 5)
            {
                Wait.ForMilliseconds(60);
                pauses++;
                Log.Comment("scrollViewUIObject.BoundingRectangle={0}", scrollViewUIObject.BoundingRectangle);
                widthDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Width - (int)expectedWidth);
                heightDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Height - (int)expectedHeight);
            };

            Verify.IsLessThanOrEqual(widthDelta, 1);
            Verify.IsLessThanOrEqual(heightDelta, 1);
        }

void WaitForScrollViewManipulationEnd | ( | string | scrollViewName,
 |  | string | stateTextBoxName = "txtScrollPresenterState" |
 | ) |  |  | [inline, private]

Definition at line 899 of file ScrollViewTestsWithInputHelper.cs.

        {
            WaitForManipulationEnd(scrollViewName, stateTextBoxName);
        }

void WaitForScrollViewOffsets | ( | double | expectedHorizontalOffset,
 |  | double | expectedVerticalOffset |
 | ) |  |  | [inline, private]

Definition at line 723 of file ScrollViewTestsWithInputHelper.cs.

        {
            Log.Comment("Waiting for ScrollView offsets: {0}, {1}", expectedHorizontalOffset, expectedVerticalOffset);

            double actualHorizontalOffset;
            double actualVerticalOffset;
            float actualZoomFactor;
            GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);

            Func<bool> areOffsetsCorrect = () => AreClose(expectedHorizontalOffset, actualHorizontalOffset) && AreClose(expectedVerticalOffset, actualVerticalOffset);

            int triesRemaining = 10;
            while (!areOffsetsCorrect() && triesRemaining-- > 0)
            {
                Thread.Sleep(500);
                GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
            }

            if (triesRemaining >= 0)
            {
                // Allow the view to settle and the STateChanged, ScrollCompleted or ZoomCompleted events to be raised.
                Thread.Sleep(250);
                GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
            }

            Log.Comment($"Final ScrollView offsets. Expected={expectedHorizontalOffset},{expectedVerticalOffset}, Actual={actualHorizontalOffset},{actualVerticalOffset}.");
            if (!areOffsetsCorrect())
            {
                LogAndClearTraces();
            }
            Verify.IsTrue(areOffsetsCorrect(), String.Format("Verify ScrollView offsets. Expected={0},{1}, Actual={2},{3}.",
                expectedHorizontalOffset, expectedVerticalOffset, actualHorizontalOffset, actualVerticalOffset));
        }

The documentation for this class was generated from the following file:
  • ScrollView/InteractionTests/ScrollViewTestsWithInputHelper.cs
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewTestsWithInputHelper::LoggingHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • ScrollViewTestsWithInputHelper
  • ScrollViewTestsWithInputHelper::LoggingHelper
Public Member Functions | Private Attributes

ScrollViewTestsWithInputHelper::LoggingHelper Class Reference

List of all members.

Public Member Functions

LoggingHelper (ScrollViewTestsWithInputHelper owner)
void Dispose ()

Private Attributes

ScrollViewTestsWithInputHelper m_owner

Detailed Description

Definition at line 1119 of file ScrollViewTestsWithInputHelper.cs.

Constructor & Destructor Documentation

LoggingHelper ( ScrollViewTestsWithInputHelper owner ) [inline]

Definition at line 1123 of file ScrollViewTestsWithInputHelper.cs.

            {
                m_owner = owner;

                m_owner.SetScrollPresenterLoggingLevel(isPrivateLoggingEnabled: true);
                m_owner.SetScrollViewLoggingLevel(isPrivateLoggingEnabled: true);
            }

Member Function Documentation

void Dispose ( ) [inline]

Definition at line 1131 of file ScrollViewTestsWithInputHelper.cs.

            {
                m_owner.SetScrollPresenterLoggingLevel(isPrivateLoggingEnabled: false);
                m_owner.SetScrollViewLoggingLevel(isPrivateLoggingEnabled: false);
            }

Member Data Documentation

ScrollViewTestsWithInputHelper m_owner [private]

Definition at line 1121 of file ScrollViewTestsWithInputHelper.cs.

The documentation for this class was generated from the following file:
  • ScrollView/InteractionTests/ScrollViewTestsWithInputHelper.cs
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • SelectorBarTests
Public Member Functions | Static Public Member Functions | Private Member Functions

SelectorBarTests Class Reference

List of all members.

Public Member Functions

void | SelectorBarItemSelection ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

string | SelectorBarSelectedItem ()

Detailed Description

Definition at line 23 of file SelectorBarTests.cs.

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file SelectorBarTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void SelectorBarItemSelection ( ) [inline]

Definition at line 42 of file SelectorBarTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "SelectorBar Tests", "navigateToSample" }))
            {
                Wait.ForIdle();
                Log.Comment("Expecting SelectorBar.SelectedItem: selectorBarItemFavorites");
                Verify.AreEqual("selectorBarItemFavorites", SelectorBarSelectedItem());

                Log.Comment("Retrieving selectorBarItemShared");
                var selectorBarItemShared = FindElement.ById("selectorBarItemShared");
                Verify.IsNotNull(selectorBarItemShared, "Verifying that SelectorBarItem selectorBarItemShared was found");

                InputHelper.LeftClick(selectorBarItemShared);
                Wait.ForIdle();
                Log.Comment("Expecting SelectorBar.SelectedItem: selectorBarItemShared");
                Verify.AreEqual("selectorBarItemShared", SelectorBarSelectedItem());

                Log.Comment("Retrieving selectorBarItemRemote");
                var selectorBarItemRemote = FindElement.ById("selectorBarItemRemote");
                Verify.IsNotNull(selectorBarItemRemote, "Verifying that SelectorBarItem selectorBarItemRemote was found");

                KeyboardHelper.PressKey(Key.Left);
                Wait.ForIdle();
                Log.Comment("Expecting SelectorBar.SelectedItem: selectorBarItemRemote");
                Verify.AreEqual("selectorBarItemRemote", SelectorBarSelectedItem());
            }
        }

string SelectorBarSelectedItem ( ) [inline, private]

Definition at line 70 of file SelectorBarTests.cs.

        {
            Log.Comment("Retrieving tblSelectedSelectorBarItem");
            Edit tblSelectedSelectorBarItem = new Edit(FindElement.ById("tblSelectedSelectorBarItem"));
            Verify.IsNotNull(tblSelectedSelectorBarItem, "Verifying that IsSelectedTextBlock was found");

            string selectedItem = tblSelectedSelectorBarItem.GetText();
            Log.Comment("SelectedItem: " + selectedItem);
            return selectedItem;
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file SelectorBarTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

The documentation for this class was generated from the following file:
  • SelectorBar/InteractionTests/SelectorBarTests.cs
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderInteractionTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • SliderInteractionTests
Public Member Functions | Static Public Member Functions | Public Attributes

SliderInteractionTests Class Reference

List of all members.

Public Member Functions

void | CanSlideHorizontally ()
void | CanSlideHorizontallyWithKeyboard ()
void | CanSlideVertically ()
void | CanSlideVerticallyWithKeyboard ()
void | DoesNotSlidePastMaximum ()
void | DoesNotSlidePastMinimum ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Public Attributes

const string | HorizontalElementAutomationId = "HorizontalElement"
const string | HorizontalLargeChangeTextBlockAutomationId = "HorizontalElementLargeChangeTextBlock"
const string | HorizontalMaximumTextBlockAutomationId = "HorizontalElementMaximumTextBlock"
const string | HorizontalMinimumTextBlockAutomationId = "HorizontalElementMinimumTextBlock"
const string | HorizontalPositionTextBlockAutomationId = "HorizontalElementPositionTextBlock"
const string | HorizontalSmallChangeTextBlockAutomationId = "HorizontalElementSmallChangeTextBlock"
const string | VerticalElementAutomationId = "VerticalElement"
const string | VerticalLargeChangeTextBlockAutomationId = "VerticalElementLargeChangeTextBlock"
const string | VerticalMaximumTextBlockAutomationId = "VerticalElementMaximumTextBlock"
const string | VerticalMinimumTextBlockAutomationId = "VerticalElementMinimumTextBlock"
const string | VerticalPositionTextBlockAutomationId = "VerticalElementPositionTextBlock"
const string | VerticalSmallChangeTextBlockAutomationId = "VerticalElementSmallChangeTextBlock"

Detailed Description

Definition at line 26 of file SliderInteractionTests.cs.

Member Function Documentation

void CanSlideHorizontally ( ) [inline]

Definition at line 57 of file SliderInteractionTests.cs.

        {
            using (var setup = new TestSetupHelper("SliderInteraction Tests"))
            {
                var targetElement = FindElement.ById(HorizontalElementAutomationId);
                var positionTextBlock = new TextBlock(FindElement.ById(HorizontalPositionTextBlockAutomationId));

                const int dragDistance = 200;
                var startPosition = targetElement.BoundingRectangle;

                Log.Comment("Drag the target element diagonally.");
                InputHelper.Pan(targetElement, dragDistance, Direction.SouthEast);

                var endPosition = targetElement.BoundingRectangle;

                Log.Comment("Validate that the target element only moved horizontally.");
                Verify.IsGreaterThan(endPosition.X, startPosition.X);
                Verify.AreEqual((int)(double.Parse(positionTextBlock.DocumentText)), endPosition.X - startPosition.X);

                Log.Comment("Validate that the target element didn't move vertically.");
                Verify.AreEqual(startPosition.Y, endPosition.Y);
            }
        }

void CanSlideHorizontallyWithKeyboard ( ) [inline]

Definition at line 154 of file SliderInteractionTests.cs.

        {
            using (var setup = new TestSetupHelper("SliderInteraction Tests"))
            {
                var targetElement = FindElement.ById(HorizontalElementAutomationId);
                var positionTextBlock = new TextBlock(FindElement.ById(HorizontalPositionTextBlockAutomationId));
                var smallIncrTextBlock = new TextBlock(FindElement.ById(HorizontalSmallChangeTextBlockAutomationId));
                var largeChangeTextBlock = new TextBlock(FindElement.ById(HorizontalLargeChangeTextBlockAutomationId));
                var minimumTextBlock = new TextBlock(FindElement.ById(HorizontalMinimumTextBlockAutomationId));
                var maximumTextBlock = new TextBlock(FindElement.ById(HorizontalMaximumTextBlockAutomationId));

                var minimum = (int)(double.Parse(minimumTextBlock.DocumentText));
                var maximum = (int)(double.Parse(maximumTextBlock.DocumentText));
                var smallIncr = (int)(double.Parse(smallIncrTextBlock.DocumentText));
                var largeIncr = (int)(double.Parse(largeChangeTextBlock.DocumentText));

                Log.Comment("Focus the target element.");
                targetElement.SetFocus();
                Wait.ForIdle();

                var startPosition = targetElement.BoundingRectangle;

                Log.Comment("Inject RIGHT to move the element right.");
                targetElement.SendKeys("{RIGHT}");
                Wait.ForIdle();

                var endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(smallIncr, endPosition.X - startPosition.X);
                Verify.AreEqual(smallIncr, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject PAGE DOWN to move the element right.");
                targetElement.SendKeys("{PGDN}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(largeIncr, endPosition.X - startPosition.X);
                Verify.AreEqual(smallIncr + largeIncr, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject LEFT to move the element left.");
                targetElement.SendKeys("{LEFT}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(-smallIncr, endPosition.X - startPosition.X);
                Verify.AreEqual(largeIncr, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject PAGE UP to move the element left.");
                targetElement.SendKeys("{PGUP}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(-largeIncr, endPosition.X - startPosition.X);
                Verify.AreEqual(0, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject END to move the element to the maximum position.");
                targetElement.SendKeys("{END}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(maximum - minimum, endPosition.X - startPosition.X);
                Verify.AreEqual(maximum, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject HOME to move the element to the minimum position.");
                targetElement.SendKeys("{HOME}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(minimum - maximum, endPosition.X - startPosition.X);
                Verify.AreEqual(minimum, (int)(double.Parse(positionTextBlock.DocumentText)));
            }
        }

void CanSlideVertically ( ) [inline]

Definition at line 82 of file SliderInteractionTests.cs.

        {
            using (var setup = new TestSetupHelper("SliderInteraction Tests"))
            {
                var targetElement = FindElement.ById(VerticalElementAutomationId);
                var positionTextBlock = new TextBlock(FindElement.ById(VerticalPositionTextBlockAutomationId));

                const int dragDistance = 200;
                var startPosition = targetElement.BoundingRectangle;

                Log.Comment("Drag the target element diagonally.");
                InputHelper.Pan(targetElement, dragDistance, Direction.SouthEast);

                var endPosition = targetElement.BoundingRectangle;

                Log.Comment("Validate that the target element only moved vertically.");
                Verify.IsGreaterThan(endPosition.Y, startPosition.Y);
                Verify.AreEqual((int)(double.Parse(positionTextBlock.DocumentText)), endPosition.Y - startPosition.Y);

                Log.Comment("Validate that the target element didn't move horizontally.");
                Verify.AreEqual(startPosition.X, endPosition.X);
            }
        }

void CanSlideVerticallyWithKeyboard ( ) [inline]

Definition at line 243 of file SliderInteractionTests.cs.

        {
            using (var setup = new TestSetupHelper("SliderInteraction Tests"))
            {
                var targetElement = FindElement.ById(VerticalElementAutomationId);
                var positionTextBlock = new TextBlock(FindElement.ById(VerticalPositionTextBlockAutomationId));
                var smallIncrTextBlock = new TextBlock(FindElement.ById(VerticalSmallChangeTextBlockAutomationId));
                var largeChangeTextBlock = new TextBlock(FindElement.ById(VerticalLargeChangeTextBlockAutomationId));
                var minimumTextBlock = new TextBlock(FindElement.ById(VerticalMinimumTextBlockAutomationId));
                var maximumTextBlock = new TextBlock(FindElement.ById(VerticalMaximumTextBlockAutomationId));

                var minimum = (int)(double.Parse(minimumTextBlock.DocumentText));
                var maximum = (int)(double.Parse(maximumTextBlock.DocumentText));
                var smallIncr = (int)(double.Parse(smallIncrTextBlock.DocumentText));
                var largeIncr = (int)(double.Parse(largeChangeTextBlock.DocumentText));

                Log.Comment("Focus the target element.");
                targetElement.SetFocus();
                Wait.ForIdle();

                var startPosition = targetElement.BoundingRectangle;

                Log.Comment("Inject DOWN to move the element right.");
                targetElement.SendKeys("{DOWN}");
                Wait.ForIdle();

                var endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(smallIncr, endPosition.Y - startPosition.Y);
                Verify.AreEqual(smallIncr, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject PAGE DOWN to move the element right.");
                targetElement.SendKeys("{PGDN}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(largeIncr, endPosition.Y - startPosition.Y);
                Verify.AreEqual(smallIncr + largeIncr, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject UP to move the element left.");
                targetElement.SendKeys("{UP}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(-smallIncr, endPosition.Y - startPosition.Y);
                Verify.AreEqual(largeIncr, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject PAGE UP to move the element left.");
                targetElement.SendKeys("{PGUP}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(-largeIncr, endPosition.Y - startPosition.Y);
                Verify.AreEqual(0, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject END to move the element to the maximum position.");
                targetElement.SendKeys("{END}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(maximum - minimum, endPosition.Y - startPosition.Y);
                Verify.AreEqual(maximum, (int)(double.Parse(positionTextBlock.DocumentText)));

                startPosition = endPosition;

                Log.Comment("Inject HOME to move the element to the minimum position.");
                targetElement.SendKeys("{HOME}");
                Wait.ForIdle();

                endPosition = targetElement.BoundingRectangle;

                Verify.AreEqual(minimum - maximum, endPosition.Y - startPosition.Y);
                Verify.AreEqual(minimum, (int)(double.Parse(positionTextBlock.DocumentText)));
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 45 of file SliderInteractionTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void DoesNotSlidePastMaximum ( ) [inline]

Definition at line 130 of file SliderInteractionTests.cs.

        {
            using (var setup = new TestSetupHelper("SliderInteraction Tests"))
            {
                var targetElement = FindElement.ById(HorizontalElementAutomationId);
                var positionTextBlock = new TextBlock(FindElement.ById(HorizontalPositionTextBlockAutomationId));
                var maximumTextBlock = new TextBlock(FindElement.ById(HorizontalMaximumTextBlockAutomationId));

                const int dragDistance = 300;

                Log.Comment("Drag the target element far to the right.");
                InputHelper.Pan(targetElement, dragDistance, Direction.East);

                Verify.AreEqual(maximumTextBlock.DocumentText, positionTextBlock.DocumentText);

                Log.Comment("Drag the target element to the right again.");
                InputHelper.Pan(targetElement, dragDistance, Direction.East);

                Log.Comment("Validate that the target element didn't move after the second drag.");
                Verify.AreEqual(maximumTextBlock.DocumentText, positionTextBlock.DocumentText);
            }
        }

void DoesNotSlidePastMinimum ( ) [inline]

Definition at line 107 of file SliderInteractionTests.cs.

        {
            using (var setup = new TestSetupHelper("SliderInteraction Tests"))
            {
                var targetElement = FindElement.ById(HorizontalElementAutomationId);
                var positionTextBlock = new TextBlock(FindElement.ById(HorizontalPositionTextBlockAutomationId));
                var minimumTextBlock = new TextBlock(FindElement.ById(HorizontalMinimumTextBlockAutomationId));

                const int dragDistance = 300;

                Verify.AreEqual(minimumTextBlock.DocumentText, positionTextBlock.DocumentText);

                Log.Comment("Drag the target element far to the left.");
                InputHelper.Pan(targetElement, dragDistance, Direction.West);

                var endPosition = targetElement.BoundingRectangle;

                Log.Comment("Validate that the target element didn't move after the second drag.");
                Verify.AreEqual(minimumTextBlock.DocumentText, positionTextBlock.DocumentText);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 51 of file SliderInteractionTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

Member Data Documentation

const string HorizontalElementAutomationId = "HorizontalElement"

Definition at line 28 of file SliderInteractionTests.cs.

const string HorizontalLargeChangeTextBlockAutomationId = "HorizontalElementLargeChangeTextBlock"

Definition at line 34 of file SliderInteractionTests.cs.

const string HorizontalMaximumTextBlockAutomationId = "HorizontalElementMaximumTextBlock"

Definition at line 32 of file SliderInteractionTests.cs.

const string HorizontalMinimumTextBlockAutomationId = "HorizontalElementMinimumTextBlock"

Definition at line 31 of file SliderInteractionTests.cs.

const string HorizontalPositionTextBlockAutomationId = "HorizontalElementPositionTextBlock"

Definition at line 30 of file SliderInteractionTests.cs.

const string HorizontalSmallChangeTextBlockAutomationId = "HorizontalElementSmallChangeTextBlock"

Definition at line 33 of file SliderInteractionTests.cs.

const string VerticalElementAutomationId = "VerticalElement"

Definition at line 29 of file SliderInteractionTests.cs.

const string VerticalLargeChangeTextBlockAutomationId = "VerticalElementLargeChangeTextBlock"

Definition at line 39 of file SliderInteractionTests.cs.

const string VerticalMaximumTextBlockAutomationId = "VerticalElementMaximumTextBlock"

Definition at line 37 of file SliderInteractionTests.cs.

const string VerticalMinimumTextBlockAutomationId = "VerticalElementMinimumTextBlock"

Definition at line 36 of file SliderInteractionTests.cs.

const string VerticalPositionTextBlockAutomationId = "VerticalElementPositionTextBlock"

Definition at line 35 of file SliderInteractionTests.cs.

const string VerticalSmallChangeTextBlockAutomationId = "VerticalElementSmallChangeTextBlock"

Definition at line 38 of file SliderInteractionTests.cs.

The documentation for this class was generated from the following file:
  • Interactions/SliderInteraction/InteractionTests/SliderInteractionTests.cs
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • SplitButtonTests
Public Member Functions | Static Public Member Functions

SplitButtonTests Class Reference

List of all members.

Public Member Functions

void | AccessibilityTest ()
void | BasicInteractionTest ()
void | ClickPrimaryButton (SplitButton splitButton)
void | ClickPrimaryButtonWithKey (SplitButton splitButton, string key)
void | ClickSecondaryButton (SplitButton splitButton)
void | CommandTest ()
void | KeyboardTest ()
void | TestCleanup ()
void | ToggleAccessibilityTest ()
void | ToggleTest ()
void | TouchTest ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 23 of file SplitButtonTests.cs.

Member Function Documentation

void AccessibilityTest ( ) [inline]

Definition at line 141 of file SplitButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("SplitButton Tests"))
            {
                SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");

                TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
                TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
                TextBlock flyoutClosedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutClosedCountTextBlock");

                Log.Comment("Verify that SplitButton has no accessible children");
                Verify.AreEqual(0, splitButton.Children.Count);

                Verify.AreEqual("0", clickCountTextBlock.DocumentText);
                Log.Comment("Verify that invoking the SplitButton causes a click");
                splitButton.InvokeAndWait();
                Verify.AreEqual("1", clickCountTextBlock.DocumentText);

                Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
                Log.Comment("Verify that expanding the SplitButton opens the flyout");
                splitButton.ExpandAndWait();
                Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
                Verify.AreEqual(ExpandCollapseState.Expanded, splitButton.ExpandCollapseState);

                Verify.AreEqual("0", flyoutClosedCountTextBlock.DocumentText);
                Log.Comment("Verify that collapsing the SplitButton closes the flyout");
                splitButton.CollapseAndWait();
                Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);
                Verify.AreEqual(ExpandCollapseState.Collapsed, splitButton.ExpandCollapseState);
            }
        }

void BasicInteractionTest ( ) [inline]

Definition at line 40 of file SplitButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("SplitButton Tests"))
            {
                SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");

                TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
                TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
                TextBlock flyoutClosedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutClosedCountTextBlock");

                Verify.AreEqual("0", clickCountTextBlock.DocumentText);
                ClickPrimaryButton(splitButton);
                Verify.AreEqual("1", clickCountTextBlock.DocumentText);
                VerifyElement.NotFound("TestFlyout", FindBy.Name);

                Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
                ClickSecondaryButton(splitButton);
                Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
                VerifyElement.Found("TestFlyout", FindBy.Name);

                Verify.AreEqual("0", flyoutClosedCountTextBlock.DocumentText);
                Log.Comment("Close flyout by clicking over the button");
                splitButton.Click();
                Wait.ForIdle();
                Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 29 of file SplitButtonTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClickPrimaryButton ( SplitButton splitButton ) [inline]

Definition at line 273 of file SplitButtonTests.cs.

        {
            Log.Comment("Click primary button area");
            splitButton.Click(PointerButtons.Primary, 5, splitButton.BoundingRectangle.Height / 2);
            Wait.ForIdle();
        }

void ClickPrimaryButtonWithKey | ( | SplitButton | splitButton,
 |  | string | key |
 | ) |  |  | [inline]

Definition at line 280 of file SplitButtonTests.cs.

        {
            Log.Comment("Click primary button area with %s key", key);
            splitButton.SendKeys("{" + key + "}");
            Wait.ForIdle();
        }

void ClickSecondaryButton ( SplitButton splitButton ) [inline]

Definition at line 287 of file SplitButtonTests.cs.

        {
            Log.Comment("Click secondary button area");
            splitButton.Click(PointerButtons.Primary, splitButton.BoundingRectangle.Width - 5, splitButton.BoundingRectangle.Height / 2);
            Wait.ForIdle();
        }

void CommandTest ( ) [inline]

Definition at line 69 of file SplitButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("SplitButton Tests"))
            {
                SplitButton splitButton = FindElement.ByName<SplitButton>("CommandSplitButton");

                CheckBox canExecuteCheckBox = FindElement.ByName<CheckBox>("CanExecuteCheckBox");
                TextBlock executeCountTextBlock = FindElement.ByName<TextBlock>("ExecuteCountTextBlock");

                Log.Comment("Verify that the control starts out enabled");
                Verify.AreEqual(ToggleState.On, canExecuteCheckBox.ToggleState);
                Verify.AreEqual(true, splitButton.IsEnabled);
                Verify.AreEqual("0", executeCountTextBlock.DocumentText);

                Log.Comment("Click primary button to execute command");
                ClickPrimaryButton(splitButton);
                Verify.AreEqual("1", executeCountTextBlock.DocumentText);

                Log.Comment("Click primary button with SPACE key to execute command");
                ClickPrimaryButtonWithKey(splitButton, "SPACE");
                Verify.AreEqual("2", executeCountTextBlock.DocumentText);

                Log.Comment("Click primary button with ENTER key to execute command");
                ClickPrimaryButtonWithKey(splitButton, "ENTER");
                Verify.AreEqual("3", executeCountTextBlock.DocumentText);

                Log.Comment("Use invoke pattern to execute command");
                splitButton.InvokeAndWait();
                Verify.AreEqual("4", executeCountTextBlock.DocumentText);

                Log.Comment("Verify that setting CanExecute to false disables the primary button");
                canExecuteCheckBox.Uncheck();
                Wait.ForIdle();
                ClickPrimaryButton(splitButton);
                Verify.AreEqual("4", executeCountTextBlock.DocumentText);
            }
        }

void KeyboardTest ( ) [inline]

Definition at line 174 of file SplitButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("SplitButton Tests"))
            {
                SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");

                TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
                TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
                TextBlock flyoutClosedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutClosedCountTextBlock");

                Verify.AreEqual("0", clickCountTextBlock.DocumentText);
                Log.Comment("Verify that pressing Space on SplitButton causes a click");
                splitButton.SetFocus();
                Wait.ForIdle();
                KeyboardHelper.PressKey(Key.Space);
                Wait.ForIdle();
                Verify.AreEqual("1", clickCountTextBlock.DocumentText);

                Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
                Log.Comment("Verify that pressing alt-down on SplitButton opens the flyout");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Alt);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Alt);
                Wait.ForIdle();
                Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);

                Verify.AreEqual("0", flyoutClosedCountTextBlock.DocumentText);
                Log.Comment("Verify that pressing escape closes the flyout");
                KeyboardHelper.PressKey(Key.Escape);
                Wait.ForIdle();
                Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);

                Log.Comment("Verify that F4 opens the flyout");
                splitButton.SetFocus();
                Wait.ForIdle();
                TextInput.SendText("{F4}");
                Wait.ForIdle();
                Verify.AreEqual("2", flyoutOpenedCountTextBlock.DocumentText);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 34 of file SplitButtonTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ToggleAccessibilityTest ( ) [inline]

Definition at line 253 of file SplitButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("SplitButton Tests"))
            {
                ToggleButton toggleButton = FindElement.ByName<ToggleButton>("ToggleSplitButton");

                TextBlock toggleStateTextBlock = FindElement.ByName<TextBlock>("ToggleStateTextBlock");

                Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
                Verify.AreEqual(ToggleState.Off, toggleButton.ToggleState);

                Log.Comment("Verify that toggling the SplitButton works");
                toggleButton.Toggle();
                Wait.ForIdle();

                Verify.AreEqual("Checked", toggleStateTextBlock.DocumentText);
                Verify.AreEqual(ToggleState.On, toggleButton.ToggleState);
            }
        }

void ToggleTest ( ) [inline]

Definition at line 216 of file SplitButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("SplitButton Tests"))
            {
                SplitButton splitButton = FindElement.ByName<SplitButton>("ToggleSplitButton");

                TextBlock toggleStateTextBlock = FindElement.ByName<TextBlock>("ToggleStateTextBlock");
                TextBlock toggleStateOnClickTextBlock = FindElement.ByName<TextBlock>("ToggleStateOnClickTextBlock");

                Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
                Verify.AreEqual("Unchecked", toggleStateOnClickTextBlock.DocumentText);

                Log.Comment("Click primary button to check button");
                using (var toggleStateWaiter = new PropertyChangedEventWaiter(splitButton, Scope.Element, UIProperty.Get("Toggle.ToggleState")))
                {
                    ClickPrimaryButton(splitButton);
                    Verify.IsTrue(toggleStateWaiter.TryWait(TimeSpan.FromSeconds(1)), "Waiting for the Toggle.ToggleState event should succeed");
                }

                Verify.AreEqual("Checked", toggleStateTextBlock.DocumentText);
                Verify.AreEqual("Checked", toggleStateOnClickTextBlock.DocumentText);

                Log.Comment("Click primary button to uncheck button");
                ClickPrimaryButton(splitButton);

                Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
                Verify.AreEqual("Unchecked", toggleStateOnClickTextBlock.DocumentText);

                Log.Comment("Clicking secondary button should not change toggle state");
                ClickSecondaryButton(splitButton);

                Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
                Verify.AreEqual("Unchecked", toggleStateOnClickTextBlock.DocumentText);
            }
        }

void TouchTest ( ) [inline]

Definition at line 109 of file SplitButtonTests.cs.

        {
            using (var setup = new TestSetupHelper("SplitButton Tests"))
            {
                SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");

                CheckBox simulateTouchCheckBox = FindElement.ByName<CheckBox>("SimulateTouchCheckBox");

                TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
                TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");

                Log.Comment("Check simulate touch mode checkbox");
                simulateTouchCheckBox.Click(); // This conveniently moves the mouse over the checkbox so that it isn't over the split button yet
                Wait.ForIdle();

                Verify.AreEqual("0", clickCountTextBlock.DocumentText);
                Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);

                Log.Comment("Click primary button to open flyout in touch mode");
                ClickPrimaryButton(splitButton);

                Verify.AreEqual("0", clickCountTextBlock.DocumentText);
                Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);

                Log.Comment("Close flyout by clicking over the button");
                splitButton.Click();
                Wait.ForIdle();
            }
        }

The documentation for this class was generated from the following file:
  • SplitButton/InteractionTests/SplitButtonTests.cs
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • SwipeControlTests
Public Member Functions | Static Public Member Functions | Private Member Functions

SwipeControlTests Class Reference

List of all members.

Public Member Functions

void | AdditionalGridDoesntOverExtendHorizontal ()
void | CanAddSameSwipeItemsInBothSidesHorizontal ()
void | CanClearItemsWithoutCrashing ()
void | CanSwipeAndTapBothItemsHorizontal ()
void | CanSwipeAndTapFirstRevealedItemHorizontal ()
void | CanSwipeAndTapFirstRevealedItemVertical ()
void | CanSwipeAndTapSecondRevealedItemVertical ()
void | CanSwipeAndTapSecondtRevealedItemHorizontal ()
void | CanSwipeBackFromAnOpenedSwipe ()
void | CanSwipeMultipleItemsWithSameSwipeService ()
void | CanSwipeOtherDirectionAfterClosingAnOpenedSwipe ()
void | CanSwipeToExecuteHorizontal ()
void | CanSwipeToExecuteVertical ()
void | CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedHorizontal ()
void | CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedVertical ()
void | ClickingOutsideARevealedSwipeDismissesIt ()
void | CloseOnOpenedAndClosedSwipeItemsWorks ()
void | ContentGridDoesntOverExtendHorizontal ()
void | OnlyProgramaticCloseWillCloseRemainOpenExecuteItems ()
void | PressingAnyKeyDismissesSwipe ()
void | SwipeContentBackgroundResetsOnClose ()
void | SwipeDismissThenSwipe ()
void | SwipeDoesntJumpWhenItReverts ()
void | SwipeIsNotTabStop ()
void | SwipeItemInheritsICommand2Properties ()
void | SwipeItemsAreNullifiedWhenTheAnimationIsDone ()
void | SwipingDoesntChangeTheBoundsOfSwipeControl ()
void | SwipingDoesntModifyTheSizeOfSwipeControl ()
void | TappingOutsideARevealedSwipeDismissesIt ()
void | TestCleanup ()
void | TogglingTheWindowStateDismissesSwipe ()
void | ValidateItemsLessThanThresholdDontRevertHorizontal ()
void | ValidateSwipeCanHaveNoItemsOnASideHorizontal ()
void | ValidateSwipeDoesntCrashOnAddingMoreItemsThanItsSizeHorizontal ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ClearTraces ()
void | DismissRevealedSwipe (bool withOutsideTap)
void | LogAndClearTraces ()
void | LogAndClearTraces (bool recordWarning)
void | LogTraces ()
void | LogTraces (bool recordWarning)
void | PerformSwipe (UIObject element, Direction direction)
void | SetLoggingLevel (bool isPrivateLoggingEnabled)
void | SetOutputDebugStringLevel (string outputDebugStringLevel)
void | TapItem (String item)
bool | WaitForCheckBoxUpdated (CheckBox checkBox, ToggleState state, double millisecondsTimeout=4000, bool throwOnError=true)
bool | WaitForChecked (CheckBox checkBox)
bool | WaitForUnchecked (CheckBox checkBox)

Detailed Description

Definition at line 30 of file SwipeControlTests.cs.

Member Function Documentation

void AdditionalGridDoesntOverExtendHorizontal ( ) [inline]

Definition at line 860 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                var textbox = new TextBlock(FindElement.ByName("TextBox"));
                Verify.IsNotNull(textbox);

                PerformSwipe(FindElement.ByName("SwipeControl3"), Direction.West);

                Verify.AreEqual("372, 284", textbox.DocumentText);
                TapItem("Scale Up");
                Verify.AreEqual("672, 284", textbox.DocumentText);
                TapItem("Scale Down");
                Verify.AreEqual("372, 284", textbox.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanAddSameSwipeItemsInBothSidesHorizontal ( ) [inline]

Definition at line 520 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem2");
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                Verify.AreEqual("RevealItem2", textblock.DocumentText);

                PerformSwipe(SwipeControl4, Direction.West);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanClearItemsWithoutCrashing ( ) [inline]

Definition at line 134 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to clear items test page");
                UIObject navigateToClearPageObject = FindElement.ByName("navigateToClear");
                Verify.IsNotNull(navigateToClearPageObject, "Verifying that navigateToClear Button was found");

                Button navigateToClearPageButton = new Button(navigateToClearPageObject);
                navigateToClearPageButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find FindItemsSum textblock");
                TextBlock sumOfSwipeItemsCount = new TextBlock(FindElement.ByName("SwipeItemsChildSum"));
                Verify.IsNotNull(sumOfSwipeItemsCount);
                Verify.AreEqual("2", sumOfSwipeItemsCount.GetText());

                Log.Comment("Find clear SwipeItems button");
                Button clearItemsButton = new Button(FindElement.ByName("ClearItemsButton"));
                Verify.IsNotNull(clearItemsButton);
                clearItemsButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual("0", sumOfSwipeItemsCount.GetText());

                Log.Comment("Find add SwipeItem button");
                Button addItemsButton = new Button(FindElement.ByName("AddItemsButton"));
                Verify.IsNotNull(addItemsButton);
                addItemsButton.Invoke();
                Wait.ForIdle();
                // Only adds horizontal items, see test app for explanation
                Verify.AreEqual("1", sumOfSwipeItemsCount.GetText());

                Log.Comment("clearing items again");
                clearItemsButton.Invoke();
                Wait.ForIdle();
                Verify.AreEqual("0", sumOfSwipeItemsCount.GetText());

            }
        }

void CanSwipeAndTapBothItemsHorizontal ( ) [inline]

Definition at line 406 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);
                TapItem("RevealItem2");
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                Verify.AreEqual("RevealItem2", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeAndTapFirstRevealedItemHorizontal ( ) [inline]

Definition at line 179 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeAndTapFirstRevealedItemVertical ( ) [inline]

Definition at line 271 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl8");
                var SwipeControl8 = FindElement.ByName("SwipeControl8");
                Verify.IsNotNull(SwipeControl8);
                Log.Comment("Find the SwipeItem8IdleCheckBox");
                CheckBox SwipeItem8IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem8IdleCheckBox"));
                Verify.IsNotNull(SwipeItem8IdleCheckBox, "Verifying that SwipeItem8IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem8OpenCheckBox");
                CheckBox SwipeItem8OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem8OpenCheckBox"));
                Verify.IsNotNull(SwipeItem8OpenCheckBox, "Verifying that SwipeItem8OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl8, Direction.South);
                WaitForChecked(SwipeItem8OpenCheckBox);
                WaitForChecked(SwipeItem8IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem8OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem8IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeAndTapSecondRevealedItemVertical ( ) [inline]

Definition at line 311 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl8");
                var SwipeControl8 = FindElement.ByName("SwipeControl8");
                Verify.IsNotNull(SwipeControl8);
                Log.Comment("Find the SwipeItem8IdleCheckBox");
                CheckBox SwipeItem8IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem8IdleCheckBox"));
                Verify.IsNotNull(SwipeItem8IdleCheckBox, "Verifying that SwipeItem8IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem8OpenCheckBox");
                CheckBox SwipeItem8OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem8OpenCheckBox"));
                Verify.IsNotNull(SwipeItem8OpenCheckBox, "Verifying that SwipeItem8OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl8, Direction.South);
                WaitForChecked(SwipeItem8OpenCheckBox);
                WaitForChecked(SwipeItem8IdleCheckBox);
                TapItem("RevealItem2");
                WaitForUnchecked(SwipeItem8OpenCheckBox);
                WaitForChecked(SwipeItem8IdleCheckBox);
                Verify.AreEqual("RevealItem2", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeAndTapSecondtRevealedItemHorizontal ( ) [inline]

Definition at line 225 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem2");
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                Verify.AreEqual("RevealItem2", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeBackFromAnOpenedSwipe ( ) [inline]

Definition at line 1104 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);
                PerformSwipe(SwipeControl4, Direction.West);
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeMultipleItemsWithSameSwipeService ( ) [inline]

Definition at line 456 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl2");
                var SwipeControl2 = FindElement.ByName("SwipeControl2");
                Verify.IsNotNull(SwipeControl2);
                Log.Comment("Find the SwipeItem2IdleCheckBox");
                CheckBox SwipeItem2IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem2IdleCheckBox"));
                Verify.IsNotNull(SwipeItem2IdleCheckBox, "Verifying that SwipeItem2IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem2OpenCheckBox");
                CheckBox SwipeItem2OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem2OpenCheckBox"));
                Verify.IsNotNull(SwipeItem2OpenCheckBox, "Verifying that SwipeItem2OpenCheckBox Button was found");
                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);
                PerformSwipe(SwipeControl2, Direction.East);
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                WaitForChecked(SwipeItem2OpenCheckBox);
                WaitForChecked(SwipeItem2IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem2OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem2IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeOtherDirectionAfterClosingAnOpenedSwipe ( ) [inline]

Definition at line 1153 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                TapItem("ResetButton");
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);

                PerformSwipe(SwipeControl4, Direction.West);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem2");
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                Verify.AreEqual("RevealItem2", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeToExecuteHorizontal ( ) [inline]

Definition at line 50 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl1");
                var SwipeControl1 = FindElement.ByName("SwipeControl1");
                Verify.IsNotNull(SwipeControl1);
                Log.Comment("Find the SwipeItem1IdleCheckBox");
                CheckBox SwipeItem1IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem1IdleCheckBox"));
                Verify.IsNotNull(SwipeItem1IdleCheckBox, "Verifying that SwipeItem1IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem1OpenCheckBox");
                CheckBox SwipeItem1OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem1OpenCheckBox"));
                Verify.IsNotNull(SwipeItem1OpenCheckBox, "Verifying that SwipeItem1OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl1, Direction.West);
                WaitForChecked(SwipeItem1OpenCheckBox);
                WaitForChecked(SwipeItem1IdleCheckBox);
                WaitForUnchecked(SwipeItem1OpenCheckBox);
                WaitForChecked(SwipeItem1IdleCheckBox);
                Verify.AreEqual("command's text", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CanSwipeToExecuteVertical ( ) [inline]

Definition at line 95 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl8");
                var SwipeControl8 = FindElement.ByName("SwipeControl8");
                Verify.IsNotNull(SwipeControl8);
                Log.Comment("Find the SwipeItem8IdleCheckBox");
                CheckBox SwipeItem8IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem8IdleCheckBox"));
                Verify.IsNotNull(SwipeItem8IdleCheckBox, "Verifying that SwipeItem8IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem8OpenCheckBox");
                CheckBox SwipeItem8OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem8OpenCheckBox"));
                Verify.IsNotNull(SwipeItem8OpenCheckBox, "Verifying that SwipeItem8OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl8, Direction.North);
                WaitForChecked(SwipeItem8OpenCheckBox);
                WaitForChecked(SwipeItem8IdleCheckBox);
                WaitForUnchecked(SwipeItem8OpenCheckBox);
                WaitForChecked(SwipeItem8IdleCheckBox);
                Verify.AreEqual("ExecuteItem", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedHorizontal ( ) [inline]

Definition at line 946 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl2");
                var SwipeControl2 = FindElement.ByName("SwipeControl2");
                Verify.IsNotNull(SwipeControl2);
                Log.Comment("Find the SwipeItem2IdleCheckBox");
                CheckBox SwipeItem2IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem2IdleCheckBox"));
                Verify.IsNotNull(SwipeItem2IdleCheckBox, "Verifying that SwipeItem2IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem2OpenCheckBox");
                CheckBox SwipeItem2OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem2OpenCheckBox"));
                Verify.IsNotNull(SwipeItem2OpenCheckBox, "Verifying that SwipeItem2OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl2, Direction.East);
                WaitForChecked(SwipeItem2OpenCheckBox);
                WaitForChecked(SwipeItem2IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem2OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem2IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);
                PerformSwipe(SwipeControl2, Direction.West);
                WaitForUnchecked(SwipeItem2OpenCheckBox);
                WaitForChecked(SwipeItem2IdleCheckBox);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedVertical ( ) [inline]

Definition at line 996 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl8");
                var SwipeControl8 = FindElement.ByName("SwipeControl8");
                Verify.IsNotNull(SwipeControl8);
                Log.Comment("Find the SwipeItem8IdleCheckBox");
                CheckBox SwipeItem8IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem8IdleCheckBox"));
                Verify.IsNotNull(SwipeItem8IdleCheckBox, "Verifying that SwipeItem8IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem8OpenCheckBox");
                CheckBox SwipeItem8OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem8OpenCheckBox"));
                Verify.IsNotNull(SwipeItem8OpenCheckBox, "Verifying that SwipeItem8OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl8, Direction.South);
                WaitForChecked(SwipeItem8OpenCheckBox);
                WaitForChecked(SwipeItem8IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem8OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem8IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);
                PerformSwipe(SwipeControl8, Direction.North);
                WaitForUnchecked(SwipeItem8OpenCheckBox);
                WaitForChecked(SwipeItem8IdleCheckBox);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 37 of file SwipeControlTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClearTraces ( ) [inline, private]

Definition at line 1843 of file SwipeControlTests.cs.

        {
            Log.Comment("Clearing full log.");

            UIObject clearFullLogUIObject = FindElement.ById("btnClearFullLog");
            Verify.IsNotNull(clearFullLogUIObject);
            Button clearFullLogButton = new Button(clearFullLogUIObject);
            Verify.IsNotNull(clearFullLogButton);

            clearFullLogButton.Invoke();
            Wait.ForIdle();
        }

void ClickingOutsideARevealedSwipeDismissesIt ( ) [inline]

Definition at line 1414 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                DismissRevealedSwipe(false);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void CloseOnOpenedAndClosedSwipeItemsWorks ( ) [inline]

Definition at line 1475 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl3");
                var SwipeControl3 = FindElement.ByName("SwipeControl3");
                Verify.IsNotNull(SwipeControl3);
                Log.Comment("Find the SwipeItem3IdleCheckBox");
                CheckBox SwipeItem3IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem3IdleCheckBox"));
                Verify.IsNotNull(SwipeItem3IdleCheckBox, "Verifying that SwipeItem3IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem3OpenCheckBox");
                CheckBox SwipeItem3OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem3OpenCheckBox"));
                Verify.IsNotNull(SwipeItem3OpenCheckBox, "Verifying that SwipeItem3OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl3, Direction.East);
                WaitForChecked(SwipeItem3OpenCheckBox);
                WaitForChecked(SwipeItem3IdleCheckBox);
                TapItem("RevealItem5");
                Verify.AreEqual(ToggleState.On, SwipeItem3OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem3IdleCheckBox.ToggleState);
                Verify.AreEqual("sc11.Close()", textblock.DocumentText);
                TapItem("RevealItem4");
                WaitForUnchecked(SwipeItem3OpenCheckBox);
                WaitForChecked(SwipeItem3IdleCheckBox);
                Verify.AreEqual("sc3.Close()", textblock.DocumentText);

                Log.Comment("Find the SwipeControl9");
                var SwipeControl9 = FindElement.ByName("SwipeControl9");
                Verify.IsNotNull(SwipeControl9);
                Log.Comment("Find the SwipeItem9IdleCheckBox");
                CheckBox SwipeItem9IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem9IdleCheckBox"));
                Verify.IsNotNull(SwipeItem9IdleCheckBox, "Verifying that SwipeItem9IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem9OpenCheckBox");
                CheckBox SwipeItem9OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem9OpenCheckBox"));
                Verify.IsNotNull(SwipeItem9OpenCheckBox, "Verifying that SwipeItem9OpenCheckBox Button was found");

                PerformSwipe(SwipeControl9, Direction.South);
                WaitForChecked(SwipeItem9OpenCheckBox);
                WaitForChecked(SwipeItem9IdleCheckBox);
                WaitForUnchecked(SwipeItem9OpenCheckBox);
                WaitForChecked(SwipeItem9IdleCheckBox);
                Verify.AreEqual("sc9.Close()", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void ContentGridDoesntOverExtendHorizontal ( ) [inline]

Definition at line 896 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl1");
                var SwipeControl1 = FindElement.ByName("SwipeControl1");
                Verify.IsNotNull(SwipeControl1);
                Log.Comment("Find the SwipeItem1IdleCheckBox");
                CheckBox SwipeItem1IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem1IdleCheckBox"));
                Verify.IsNotNull(SwipeItem1IdleCheckBox, "Verifying that SwipeItem1IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem1OpenCheckBox");
                CheckBox SwipeItem1OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem1OpenCheckBox"));
                Verify.IsNotNull(SwipeItem1OpenCheckBox, "Verifying that SwipeItem1OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl1, Direction.East);
                WaitForChecked(SwipeItem1OpenCheckBox);
                WaitForChecked(SwipeItem1IdleCheckBox);
                WaitForUnchecked(SwipeItem1OpenCheckBox);
                WaitForChecked(SwipeItem1IdleCheckBox);
                Verify.AreEqual("Scale Up", textblock.DocumentText);

                var textbox = new TextBlock(FindElement.ByName("TextBox"));
                Verify.IsNotNull(textbox);

                Verify.AreEqual("672, 672", textbox.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void DismissRevealedSwipe ( bool withOutsideTap ) [inline, private]

Definition at line 1660 of file SwipeControlTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Warning("Test is disabled on phone.");
                return;
            }

            Log.Comment("Find the SwipeControl4");
            var SwipeControl4 = FindElement.ByName("SwipeControl4");
            Verify.IsNotNull(SwipeControl4);
            Log.Comment("Find the SwipeItem4IdleCheckBox");
            CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
            Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
            Log.Comment("Find the SwipeItem4OpenCheckBox");
            CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
            Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
            Log.Comment("Getting the textblock");
            var textblock = new TextBlock(FindElement.ByName("TextBlock"));
            Verify.IsNotNull(textblock);

            PerformSwipe(SwipeControl4, Direction.East);
            WaitForChecked(SwipeItem4OpenCheckBox);
            WaitForChecked(SwipeItem4IdleCheckBox);
            TapItem("RevealItem1");
            Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
            Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
            Verify.AreEqual("RevealItem1", textblock.DocumentText);

            var swipePage = FindElement.ByName("SwipePage");

            if (withOutsideTap)
            {
                InputHelper.Tap(swipePage, 20, 20);
            }
            else
            {
                InputHelper.LeftClick(swipePage, 20, 20);
            }

            WaitForUnchecked(SwipeItem4OpenCheckBox);
            WaitForChecked(SwipeItem4IdleCheckBox);
        }

void LogAndClearTraces ( bool recordWarning ) [inline, private]

Definition at line 1861 of file SwipeControlTests.cs.

        {
            LogTraces(recordWarning);
            ClearTraces();
        }

void LogAndClearTraces ( ) [inline, private]

Definition at line 1856 of file SwipeControlTests.cs.

        {
            LogAndClearTraces(recordWarning: false);
        }

void LogTraces ( ) [inline, private]

Definition at line 1799 of file SwipeControlTests.cs.

        {
            LogTraces(recordWarning: false);
        }

void LogTraces ( bool recordWarning ) [inline, private]

Definition at line 1804 of file SwipeControlTests.cs.

        {
            List<string> traces = recordWarning ? new List<string>() : null;

            Log.Comment("Reading full log:");

            UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
            Verify.IsNotNull(fullLogUIObject);
            ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
            Verify.IsNotNull(cmbFullLog);

            UIObject getFullLogUIObject = FindElement.ById("btnGetFullLog");
            Verify.IsNotNull(getFullLogUIObject);
            Button getFullLogButton = new Button(getFullLogUIObject);
            Verify.IsNotNull(getFullLogButton);

            getFullLogButton.Invoke();
            Wait.ForIdle();

            foreach (ComboBoxItem item in cmbFullLog.AllItems)
            {
                string trace = item.Name;

                if (recordWarning)
                {
                    traces.Add(trace);
                }
                Log.Comment(trace);
            }

            if (recordWarning)
            {
                string warning = "Non-final test pass failed.";
                Log.Warning(warning);

                WarningReportHelper.Record(warning, traces);
            }
        }

void OnlyProgramaticCloseWillCloseRemainOpenExecuteItems ( ) [inline]

Definition at line 1536 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl11");
                var SwipeControl11 = FindElement.ByName("SwipeControl11");
                Verify.IsNotNull(SwipeControl11);
                Log.Comment("Find the SwipeItem11IdleCheckBox");
                CheckBox SwipeItem11IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem11IdleCheckBox"));
                Verify.IsNotNull(SwipeItem11IdleCheckBox, "Verifying that SwipeItem11IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem11OpenCheckBox");
                CheckBox SwipeItem11OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem11OpenCheckBox"));
                Verify.IsNotNull(SwipeItem11OpenCheckBox, "Verifying that SwipeItem11OpenCheckBox Button was found");

                Log.Comment("Find the SwipeControl3");
                var SwipeControl3 = FindElement.ByName("SwipeControl3");
                Verify.IsNotNull(SwipeControl3);
                Log.Comment("Find the SwipeItem3IdleCheckBox");
                CheckBox SwipeItem3IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem3IdleCheckBox"));
                Verify.IsNotNull(SwipeItem3IdleCheckBox, "Verifying that SwipeItem3IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem3OpenCheckBox");
                CheckBox SwipeItem3OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem3OpenCheckBox"));
                Verify.IsNotNull(SwipeItem3OpenCheckBox, "Verifying that SwipeItem3OpenCheckBox Button was found");

                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                Window window = new Window(TestEnvironment.Application.ApplicationFrameWindow);

                PerformSwipe(SwipeControl11, Direction.East);
                WaitForChecked(SwipeItem11OpenCheckBox);
                WaitForChecked(SwipeItem11IdleCheckBox);
                Verify.AreEqual("ExecuteRemainOpen", textblock.DocumentText);
                PerformSwipe(SwipeControl11, Direction.West);
                Verify.AreEqual(ToggleState.On, SwipeItem11OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem11IdleCheckBox.ToggleState);
                Verify.AreEqual("ExecuteRemainOpen", textblock.DocumentText);
                window.SetWindowVisualState(WindowVisualState.Normal);
                window.SetWindowVisualState(WindowVisualState.Maximized);
                Verify.AreEqual(ToggleState.On, SwipeItem11OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem11IdleCheckBox.ToggleState);
                Verify.AreEqual("ExecuteRemainOpen", textblock.DocumentText);
                TapItem("ExecuteRemainOpen");
                Verify.AreEqual(ToggleState.On, SwipeItem11OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem11IdleCheckBox.ToggleState);
                Verify.AreEqual("ExecuteRemainOpen", textblock.DocumentText);
                PerformSwipe(SwipeControl3, Direction.East);
                WaitForChecked(SwipeItem3OpenCheckBox);
                WaitForChecked(SwipeItem3IdleCheckBox);
                Verify.AreEqual(ToggleState.On, SwipeItem11OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem11IdleCheckBox.ToggleState);
                Verify.AreEqual("ExecuteRemainOpen", textblock.DocumentText);
                TapItem("RevealItem5");
                WaitForUnchecked(SwipeItem11OpenCheckBox);
                WaitForChecked(SwipeItem11IdleCheckBox);
                Verify.AreEqual(ToggleState.On, SwipeItem3OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem3IdleCheckBox.ToggleState);
                Verify.AreEqual("sc11.Close()", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void PerformSwipe | ( | UIObject | element,
 |  | Direction | direction |
 | ) |  |  | [inline, private]

Definition at line 1704 of file SwipeControlTests.cs.

        {
            int distance = 150;
            InputHelper.Pan(element, distance, direction, 1500, 0.001f, 100, false);
            Log.Comment("PerformSwipe completed.");
        }

void PressingAnyKeyDismissesSwipe ( ) [inline]

Definition at line 708 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);
                KeyboardHelper.PressKey(Key.PageDown);
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SetLoggingLevel ( bool isPrivateLoggingEnabled ) [inline, private]

Definition at line 1784 of file SwipeControlTests.cs.

        {
            Log.Comment("Retrieving chkLogSwipeControlMessages");
            CheckBox chkLogSwipeControlMessages = new CheckBox(FindElement.ById("chkLogSwipeControlMessages"));
            Verify.IsNotNull(chkLogSwipeControlMessages, "Verifying that chkLogSwipeControlMessages was found");

            if (isPrivateLoggingEnabled && chkLogSwipeControlMessages.ToggleState != ToggleState.On ||
                !isPrivateLoggingEnabled && chkLogSwipeControlMessages.ToggleState != ToggleState.Off)
            {
                Log.Comment("Toggling chkLogSwipeControlMessages.IsChecked to " + isPrivateLoggingEnabled);
                chkLogSwipeControlMessages.Toggle();
                Wait.ForIdle();
            }
        }

void SetOutputDebugStringLevel ( string outputDebugStringLevel ) [inline, private]

Definition at line 1773 of file SwipeControlTests.cs.

        {
            Log.Comment("Retrieving cmbSwipeControlOutputDebugStringLevel");
            ComboBox cmbSwipeControlOutputDebugStringLevel = new ComboBox(FindElement.ByName("cmbSwipeControlOutputDebugStringLevel"));
            Verify.IsNotNull(cmbSwipeControlOutputDebugStringLevel, "Verifying that cmbSwipeControlOutputDebugStringLevel was found");

            Log.Comment("Changing output-debug-string-level selection to " + outputDebugStringLevel);
            cmbSwipeControlOutputDebugStringLevel.SelectItemByName(outputDebugStringLevel);
            Log.Comment("Selection is now {0}", cmbSwipeControlOutputDebugStringLevel.Selection[0].Name);
        }

void SwipeContentBackgroundResetsOnClose ( ) [inline]

Definition at line 1611 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                SetOutputDebugStringLevel("Info");

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                SetLoggingLevel(isPrivateLoggingEnabled: true);

                Log.Comment("Find the SwipeControl3");
                var SwipeControl3 = FindElement.ByName("SwipeControl3");
                Verify.IsNotNull(SwipeControl3);
                Log.Comment("Find the SwipeItem3IdleCheckBox");
                CheckBox SwipeItem3IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem3IdleCheckBox"));
                Log.Comment("Find the SwipeItem3OpenCheckBox");
                CheckBox SwipeItem3OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem3OpenCheckBox"));

                Log.Comment("Getting the Swipe3BackgroundColorTextBlock");
                var textblock = new TextBlock(FindElement.ByName("Swipe3BackgroundColorTextBlock"));

                PerformSwipe(SwipeControl3, Direction.East);
                WaitForChecked(SwipeItem3OpenCheckBox);
                WaitForChecked(SwipeItem3IdleCheckBox);
                Verify.AreEqual(ToggleState.On, SwipeItem3OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem3IdleCheckBox.ToggleState);
                Verify.AreEqual("#FF008000", textblock.DocumentText);

                TapItem("RevealItem2");
                WaitForUnchecked(SwipeItem3OpenCheckBox);
                WaitForChecked(SwipeItem3IdleCheckBox);
                Verify.AreEqual(ToggleState.Off, SwipeItem3OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem3IdleCheckBox.ToggleState);
                Verify.AreEqual("null", textblock.DocumentText);

                SetLoggingLevel(isPrivateLoggingEnabled: false);
                LogTraces();

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SwipeDismissThenSwipe ( ) [inline]

Definition at line 1046 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                TapItem("ResetButton");
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem2");
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                Verify.AreEqual("RevealItem2", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SwipeDoesntJumpWhenItReverts ( ) [inline]

Definition at line 358 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                var XPosition = new TextBlock(FindElement.ByName("PositionX"));
                Verify.IsNotNull(XPosition);
                //SwipeTapAndVerify("SwipeControl4", Direction.East, "RevealItem1", "RevealItem1");
                Verify.AreEqual("146", XPosition.DocumentText);
                KeyboardHelper.PressKey(Key.PageDown);

                bool pass = false;
                while (XPosition.DocumentText != 0.ToString())
                {
                    double xPoistion = 0;
                    Double.TryParse(XPosition.DocumentText.ToString(), out xPoistion);

                    // ensures that we get an intermediate value at least once.
                    if (xPoistion < 146 && xPoistion > 0)
                    {
                        pass = true;
                    }
                }

                Verify.AreEqual(true, pass);
                //EnsureAllSwipesAreDismissed();

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SwipeIsNotTabStop ( ) [inline]

Definition at line 824 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Getting swipe controls.");
                var swipeControl1 = FindElement.ByName("SwipeControl1");
                var swipeControl2 = FindElement.ByName("SwipeControl2");
                Verify.IsNotNull(swipeControl1);
                Verify.IsNotNull(swipeControl2);

                FocusHelper.SetFocus(swipeControl1);
                Verify.IsTrue(swipeControl1.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.Tab);
                Verify.IsTrue(swipeControl2.HasKeyboardFocus);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SwipeItemInheritsICommand2Properties ( ) [inline]

Definition at line 1435 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl10");
                var SwipeControl10 = FindElement.ByName("SwipeControl10");
                Verify.IsNotNull(SwipeControl10);
                Log.Comment("Find the SwipeItem10IdleCheckBox");
                CheckBox SwipeItem10IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem10IdleCheckBox"));
                Verify.IsNotNull(SwipeItem10IdleCheckBox, "Verifying that SwipeItem10IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem10OpenCheckBox");
                CheckBox SwipeItem10OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem10OpenCheckBox"));
                Verify.IsNotNull(SwipeItem10OpenCheckBox, "Verifying that SwipeItem10OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl10, Direction.East);
                WaitForChecked(SwipeItem10OpenCheckBox);
                WaitForChecked(SwipeItem10IdleCheckBox);
                TapItem("UICommand Label");
                Verify.AreEqual(ToggleState.On, SwipeItem10OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem10IdleCheckBox.ToggleState);
                Verify.AreEqual("UICommand Label", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SwipeItemsAreNullifiedWhenTheAnimationIsDone ( ) [inline]

Definition at line 1274 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                // Bug: 12734833
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);

                using (Context.RawContext.Activate())
                {
                    var item1 = FindElement.ByName("RevealItem1");
                    var firstChild = SwipeControl4.FirstChild;

                    Verify.IsNotNull(item1);
                    Verify.IsNotNull(firstChild);
                    Verify.AreEqual(item1, firstChild);

                    PerformSwipe(SwipeControl4, Direction.West);
                    WaitForUnchecked(SwipeItem4OpenCheckBox);
                    WaitForChecked(SwipeItem4IdleCheckBox);

                    firstChild = SwipeControl4.FirstChild;
                    // The first child becomes the text block
                    Verify.AreNotEqual(item1, firstChild);
                }

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SwipingDoesntChangeTheBoundsOfSwipeControl ( ) [inline]

Definition at line 1335 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                var SwipeControl6 = FindElement.ByName("SwipeControl6");

                // Save off the original bounding rectangle so that we can validate that the
                // swipe container did not offset on the next interaction.
                var originalBounds = SwipeControl6.BoundingRectangle;

                Log.Comment("Initiate the first interaction (a swipe).");

                Verify.IsNotNull(SwipeControl6);
                PerformSwipe(SwipeControl6, Direction.West);

                AutoResetEvent autoEvent = new AutoResetEvent(false);

                // Execute the TapAndHold call on an off thread so that we can validate
                // the bounds hasn't changed during the hold.
                var op = global::System.Threading.ThreadPool.QueueUserWorkItem(new WaitCallback((object state) =>
                {
                    Log.Comment("Initiate a long tap and validate that the bounding rectangle doesn't change.");
                    Verify.IsNotNull(SwipeControl6);
                    InputHelper.TapAndHold(SwipeControl6, 5000);
                    autoEvent.Set();
                }));

                Log.Comment("Main thread start to validate the bounds");

                while (!autoEvent.WaitOne(250))
                {
                    Verify.AreEqual(originalBounds.X, SwipeControl6.BoundingRectangle.X);
                    Verify.AreEqual(originalBounds.Y, SwipeControl6.BoundingRectangle.Y);
                }

                Log.Comment("Main thread stop the validation");

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void SwipingDoesntModifyTheSizeOfSwipeControl ( ) [inline]

Definition at line 1211 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                var resetButton = new Button(FindElement.ByName("ResetButton"));
                Verify.IsNotNull(resetButton);

                // Horizontal, and Vertical
                var swipes = new[] { FindElement.ByName("SwipeControl2"), FindElement.ByName("SwipeControl8") };
                var directions = new[] { Direction.West, Direction.North };
                var idleCheckBoxes = new[] { new CheckBox(FindElement.ByName("SwipeItem2IdleCheckBox")), new CheckBox(FindElement.ByName("SwipeItem8IdleCheckBox")) };
                var openCheckBoxes = new[] { new CheckBox(FindElement.ByName("SwipeItem2OpenCheckBox")), new CheckBox(FindElement.ByName("SwipeItem8OpenCheckBox")) };
                for (int i = 0; i < swipes.Length; i++)
                {
                    var swipe = swipes[i];
                    var direction = directions[i];
                    var idleCheckBox = idleCheckBoxes[i];
                    var openCheckBox = openCheckBoxes[i];
                    Verify.IsNotNull(swipe);
                    int widthBefore = swipe.BoundingRectangle.Width;
                    int heightBefore = swipe.BoundingRectangle.Height;
                    PerformSwipe(swipe, direction);
                    int widthDuring = swipe.BoundingRectangle.Width;
                    int heightDuring = swipe.BoundingRectangle.Height;
                    WaitForChecked(openCheckBox);
                    WaitForChecked(idleCheckBox);
                    WaitForUnchecked(openCheckBox);
                    WaitForChecked(idleCheckBox);

                    int widthAfter = swipe.BoundingRectangle.Width;
                    int heightAfter = swipe.BoundingRectangle.Height;
                    Verify.AreEqual("ExecuteItem", textblock.DocumentText);
                    Verify.AreEqual(widthBefore, widthDuring);
                    Verify.AreEqual(heightBefore, heightDuring);
                    Verify.AreEqual(widthBefore, widthAfter);
                    Verify.AreEqual(heightBefore, heightAfter);
                    resetButton.Invoke();
                }

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void TapItem ( String item ) [inline, private]

Definition at line 1754 of file SwipeControlTests.cs.

        {
            ElementCache.Clear();
            using (Context.RawContext.Activate())
            {
                Log.Comment("Tapping on " + item);
                var uiItem = FindElement.ByName(item);
                Verify.IsNotNull(uiItem);

                if (String.IsNullOrEmpty(uiItem.Name) || String.IsNullOrEmpty(uiItem.AutomationId))
                {
                    Log.Warning("Item {0} isn't null but doesn't exist anymore.", item);
                }

                InputHelper.Tap(uiItem);
            }
        }

void TappingOutsideARevealedSwipeDismissesIt ( ) [inline]

Definition at line 1393 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                DismissRevealedSwipe(true);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void TestCleanup ( ) [inline]

Definition at line 43 of file SwipeControlTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void TogglingTheWindowStateDismissesSwipe ( ) [inline]

Definition at line 758 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl4");
                var SwipeControl4 = FindElement.ByName("SwipeControl4");
                Verify.IsNotNull(SwipeControl4);
                Log.Comment("Find the SwipeItem4IdleCheckBox");
                CheckBox SwipeItem4IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem4IdleCheckBox"));
                Verify.IsNotNull(SwipeItem4IdleCheckBox, "Verifying that SwipeItem4IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem4OpenCheckBox");
                CheckBox SwipeItem4OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem4OpenCheckBox"));
                Verify.IsNotNull(SwipeItem4OpenCheckBox, "Verifying that SwipeItem4OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                Window window = new Window(TestEnvironment.Application.ApplicationFrameWindow);
                WindowVisualState initialVisualState = window.WindowVisualState;
                WindowVisualState desiredVisualState;

                if(initialVisualState == WindowVisualState.Normal)
                {
                    desiredVisualState = WindowVisualState.Maximized;
                }
                else
                {
                    desiredVisualState = WindowVisualState.Normal;
                }

                PerformSwipe(SwipeControl4, Direction.East);
                WaitForChecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem4OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem4IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);
                // Maximize the app, which will also trigger it to supsend. Wait for Suspending event from app.
                Log.Comment("Toggling the window's state...");
                window.SetWindowVisualState(desiredVisualState);
                WaitForUnchecked(SwipeItem4OpenCheckBox);
                WaitForChecked(SwipeItem4IdleCheckBox);

                window.SetWindowVisualState(WindowVisualState.Maximized);
                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void ValidateItemsLessThanThresholdDontRevertHorizontal ( ) [inline]

Definition at line 574 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl2");
                var SwipeControl2 = FindElement.ByName("SwipeControl2");
                Verify.IsNotNull(SwipeControl2);
                Log.Comment("Find the SwipeItem2IdleCheckBox");
                CheckBox SwipeItem2IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem2IdleCheckBox"));
                Verify.IsNotNull(SwipeItem2IdleCheckBox, "Verifying that SwipeItem2IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem2OpenCheckBox");
                CheckBox SwipeItem2OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem2OpenCheckBox"));
                Verify.IsNotNull(SwipeItem2OpenCheckBox, "Verifying that SwipeItem2OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl2, Direction.East);
                WaitForChecked(SwipeItem2OpenCheckBox);
                WaitForChecked(SwipeItem2IdleCheckBox);
                TapItem("RevealItem1");
                Verify.AreEqual(ToggleState.On, SwipeItem2OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem2IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem1", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void ValidateSwipeCanHaveNoItemsOnASideHorizontal ( ) [inline]

Definition at line 667 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Get the two swipe controls.");
                var swipeControl8 = FindElement.ByName("SwipeControl8");

                Verify.IsNotNull(swipeControl8);

                Log.Comment("Get the two swipe controls.");
                var swipeControl9 = FindElement.ByName("SwipeControl9");

                Verify.IsNotNull(swipeControl8);
                Verify.IsNotNull(swipeControl9);

                // Verifying it doesn't crash
                // same note as before, it might not open, and we still pass the test.
                PerformSwipe(swipeControl8, Direction.East);
                PerformSwipe(swipeControl9, Direction.West);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

void ValidateSwipeDoesntCrashOnAddingMoreItemsThanItsSizeHorizontal ( ) [inline]

Definition at line 620 of file SwipeControlTests.cs.

        {
            using (var setup = new TestSetupHelper("SwipeControl Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone.");
                    return;
                }

                Log.Comment("Navigating to List Items with simple swipe items");
                UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
                Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");

                Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
                navigateToSimpleContentsButton.Invoke();
                Wait.ForIdle();

                Log.Comment("Find the SwipeControl3");
                var SwipeControl3 = FindElement.ByName("SwipeControl3");
                Verify.IsNotNull(SwipeControl3);
                Log.Comment("Find the SwipeItem3IdleCheckBox");
                CheckBox SwipeItem3IdleCheckBox = new CheckBox(FindElement.ByName("SwipeItem3IdleCheckBox"));
                Verify.IsNotNull(SwipeItem3IdleCheckBox, "Verifying that SwipeItem3IdleCheckBox Button was found");
                Log.Comment("Find the SwipeItem3OpenCheckBox");
                CheckBox SwipeItem3OpenCheckBox = new CheckBox(FindElement.ByName("SwipeItem3OpenCheckBox"));
                Verify.IsNotNull(SwipeItem3OpenCheckBox, "Verifying that SwipeItem3OpenCheckBox Button was found");
                Log.Comment("Getting the textblock");
                var textblock = new TextBlock(FindElement.ByName("TextBlock"));
                Verify.IsNotNull(textblock);

                PerformSwipe(SwipeControl3, Direction.East);
                WaitForChecked(SwipeItem3OpenCheckBox);
                WaitForChecked(SwipeItem3IdleCheckBox);
                TapItem("RevealItem3");
                Verify.AreEqual(ToggleState.On, SwipeItem3OpenCheckBox.ToggleState);
                Verify.AreEqual(ToggleState.On, SwipeItem3IdleCheckBox.ToggleState);
                Verify.AreEqual("RevealItem3", textblock.DocumentText);

                Log.Comment("Returning to the main Swipe test page");
                TestSetupHelper.GoBack();
            }
        }

bool WaitForCheckBoxUpdated | ( | CheckBox | checkBox,
 |  | ToggleState | state,
 |  | double | millisecondsTimeout = 4000,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, private]

Definition at line 1724 of file SwipeControlTests.cs.

        {
            using (var waiter = checkBox.GetToggledWaiter())
            {
                Log.Comment(checkBox.Name + " Checked: " + checkBox.ToggleState);
                if (checkBox.ToggleState == state)
                {
                    return true;
                }
                else
                {
                    Log.Comment("Waiting for toggle state to change to {0} for {1}ms", state, millisecondsTimeout);
                    waiter.TryWait(TimeSpan.FromMilliseconds(millisecondsTimeout));
                }
                if (checkBox.ToggleState != state)
                {
                    Log.Warning(checkBox.Name + " value never changed");
                    if (throwOnError)
                    {
                        throw new WaiterException();
                    }
                    else
                    {
                        return false;
                    }
                }
                return true;
            }
        }

bool WaitForChecked ( CheckBox checkBox ) [inline, private]

Definition at line 1711 of file SwipeControlTests.cs.

        {
            return WaitForCheckBoxUpdated(checkBox, ToggleState.On);
        }

bool WaitForUnchecked ( CheckBox checkBox ) [inline, private]

Definition at line 1716 of file SwipeControlTests.cs.

        {
            return WaitForCheckBoxUpdated(checkBox, ToggleState.Off);
        }

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControl_InteractionTests/SwipeControlTests.cs
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTearOutTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TabViewTearOutTests
Public Member Functions | Static Public Member Functions | Properties | Static Private Member Functions | Static Private Attributes

TabViewTearOutTests Class Reference

List of all members.

Public Member Functions

void | CanReorderTabs ()
void | CanSelectTabs ()
void | CanTearOutAndRejoinTabs ()

Static Public Member Functions

static void | ClassCleanup ()
static void | ClassInitialize (TestContext testContext)
static void | TestCleanup ()

Properties

static TestApplicationInfo | TabViewTearOutApp [get]

Static Private Member Functions

static List< TabItem > | GetTabsFromTabView (Tab tabView)
static Tab | GetTabViewFromWindow (Window window)
static List< Window > | GetTabViewTearOutAppWindows ()

Static Private Attributes

static readonly UICondition | _tabCondition
static readonly UICondition | _tabViewCondition
static TestApplicationInfo | _tabViewTearOutApp
static readonly UICondition | _windowCondition

Detailed Description

Definition at line 25 of file TabViewTearOutTests.cs.

Member Function Documentation

void CanReorderTabs ( ) [inline]

Definition at line 84 of file TabViewTearOutTests.cs.

        {
            TabViewTearOutTestHelpers.CanReorderTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
        }

void CanSelectTabs ( ) [inline]

Definition at line 91 of file TabViewTearOutTests.cs.

        {
            TabViewTearOutTestHelpers.CanSelectTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
        }

void CanTearOutAndRejoinTabs ( ) [inline]

Definition at line 77 of file TabViewTearOutTests.cs.

        {
            TabViewTearOutTestHelpers.CanTearOutAndRejoinTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
        }

static void ClassCleanup ( ) [inline, static]

Definition at line 59 of file TabViewTearOutTests.cs.

        {
            TestEnvironment.AssemblyCleanupWorker(TabViewTearOutApp);
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 50 of file TabViewTearOutTests.cs.

        {
            // These tests involve multiple windows, so don't bother maximizing the window at the start of tests.
            testContext.Properties.Add("MaximizeWindowAtStart", false);

            TestEnvironment.Initialize(testContext, TabViewTearOutApp);
        }

static List<TabItem> GetTabsFromTabView ( Tab tabView ) [inline, static, private]

Definition at line 116 of file TabViewTearOutTests.cs.

        {
            return tabView.Descendants.FindMultiple(_tabCondition).Select(o => new TabItem(o)).ToList();
        }

static Tab GetTabViewFromWindow ( Window window ) [inline, static, private]

Definition at line 111 of file TabViewTearOutTests.cs.

        {
            return new Tab(window.Descendants.Find(_tabViewCondition));
        }

static List<Window> GetTabViewTearOutAppWindows ( ) [inline, static, private]

Definition at line 106 of file TabViewTearOutTests.cs.

        {
            return UIObject.Root.Children.FindMultiple(_windowCondition).Select(o => new Window(o)).ToList();
        }

static void TestCleanup ( ) [inline, static]

Definition at line 65 of file TabViewTearOutTests.cs.

        {
            var testAppProcess = TestEnvironment.Application.Process;

            if (testAppProcess != null && !testAppProcess.HasExited)
            {
                testAppProcess.Kill();
            }
        }

Member Data Documentation

readonly UICondition _tabCondition [static, private]
Initial value:
            UICondition.CreateFromClassName("ListViewItem")

Definition at line 103 of file TabViewTearOutTests.cs.

readonly UICondition _tabViewCondition [static, private]
Initial value:
            UICondition.CreateFromName("TearOutTabsTabView")

Definition at line 100 of file TabViewTearOutTests.cs.

TestApplicationInfo _tabViewTearOutApp [static, private]

Definition at line 27 of file TabViewTearOutTests.cs.

readonly UICondition _windowCondition [static, private]
Initial value:
            UICondition.CreateFromClassName("WinUIDesktopWin32WindowClass")
            .AndWith(UICondition.CreateFromName(TabViewTearOutApp.TestAppMainWindowTitle))

Definition at line 96 of file TabViewTearOutTests.cs.

Property Documentation

TestApplicationInfo TabViewTearOutApp [static, get]

Definition at line 30 of file TabViewTearOutTests.cs.

The documentation for this class was generated from the following file:
  • TabView/InteractionTests/TabViewTearOutTests.cs
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TabViewTests
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes

TabViewTests Class Reference

List of all members.

Public Member Functions

void | AddButtonTest ()
void | AddRemoveTest ()
void | CanReorderTabsWithTabTearOutWithDataItems ()
void | CanReorderTabsWithTabTearOutWithoutDataItems ()
void | CanSelectTabsWithTabTearOutWithDataItems ()
void | CanSelectTabsWithTabTearOutWithoutDataItems ()
void | CanTearOutAndRejoinTabsWithDataItems ()
void | CanTearOutAndRejoinTabsWithoutDataItems ()
void | CloseButtonDoesNotShowWhenVisibilityIsToggled ()
void | CloseButtonOverlayModeTests ()
void | CloseSelectionTest ()
void | DragBetweenTabViewsTest ()
void | DragOutsideTest ()
void | GamePadTest ()
void | HandleItemCloseRequestedTest ()
void | IsClosableTest ()
void | ItemChangedEventOnDragTest ()
void | KeyboardTest ()
void | ReorderItemsTest ()
void | ScrollButtonToolTipTest ()
void | SelectionTest ()
void | SizingTest ()
void | TabSizeAndScrollButtonsTest ()
void | TestCleanup ()
void | ToolTipDefaultTest ()
void | ToolTipUpdateTest ()
void | TouchSelectionTest ()
void | VerifyAxeScanPasses ()
void | VerifyDragStartedCalledOnItemDrag ()
void | VerifyHeaderSizeWhenClosingLastTab ()
void | VerifyRightClickDoesNotSelectTab ()
void | VerifyScrollRepeatButtons ()
void | VerifySizingBehaviorModifyingCollectionRemovingLastItem ()
void | VerifySizingBehaviorModifyingCollectionRemovingSecondItem ()
void | VerifySizingBehaviorOnTabCloseComingFromCtrlF4 ()
void | VerifySizingBehaviorOnTabCloseComingFromNonScroll ()
void | VerifySizingBehaviorOnTabCloseComingFromScroll ()
void | VerifySpaceAllocatedWhenDraggingFromOutsideTabView ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

bool | AreScrollButtonsVisible ()
void | EnumerateChildren (UIObject root)
Button | FindCloseButton (UIObject tabItem)
bool | IsScrollDecreaseButtonEnabled ()
bool | IsScrollIncreaseButtonEnabled ()
void | PressButtonAndVerifyText (String buttonName, String textBlockName, String expectedText)

Static Private Member Functions

static void | ClosePrimaryWindow (TestSetupHelper setup)
static Window | GetPrimaryWindow ()
static List< TabItem > | GetTabsFromTabView (Tab tabView)
static Tab | GetTabViewFromWindow (Window window)
static List< Window > | GetTabViewTearOutAppWindows ()

Static Private Attributes

static readonly UICondition | _primaryWindowCondition
static readonly UICondition | _secondaryWindowCondition
static readonly UICondition | _tabCondition
static readonly UICondition | _tabViewCondition

Detailed Description

Definition at line 27 of file TabViewTests.cs.

Member Function Documentation

void AddButtonTest ( ) [inline]

Definition at line 458 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("Add new tab button should be visible.");
                var addButton = FindElement.ByName("Add New Tab");
                Verify.IsNotNull(addButton);

                CheckBox isAddButtonVisibleCheckBox = FindElement.ByName<CheckBox>("IsAddButtonVisibleCheckBox");
                isAddButtonVisibleCheckBox.Uncheck();
                Wait.ForIdle();

                ElementCache.Refresh();
                Log.Comment("Add new tab button should not be visible.");
                addButton = TryFindElement.ByName("Add New Tab");
                Verify.IsNull(addButton);
            }
        }

void AddRemoveTest ( ) [inline]

Definition at line 136 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("Adding tab.");
                Button addTabButton = FindElement.ByName<Button>("Add New Tab");
                addTabButton.InvokeAndWait();

                ElementCache.Refresh();
                UIObject newTab = FindElement.ByName("New Tab 1");
                Verify.IsNotNull(newTab);

                Log.Comment("Removing tab.");
                Button removeTabButton = FindElement.ByName<Button>("RemoveTabButton");
                removeTabButton.InvokeAndWait();

                VerifyElement.NotFound("New Tab 1", FindBy.Name);
            }
        }

bool AreScrollButtonsVisible ( ) [inline, private]

Definition at line 232 of file TabViewTests.cs.

        {
            FindElement.ByName<Button>("GetScrollButtonsVisible").InvokeAndWait();
            var scrollButtonsVisible = FindElement.ByName<TextBlock>("ScrollButtonsVisible").DocumentText;
            if(scrollButtonsVisible == "True")
            {
                return true;
            }
            else if(scrollButtonsVisible == "False")
            {
                return false;
            }
            else
            {
                Verify.Fail(string.Format("Unexpected value for ScrollButtonsVisible: '{0}'", scrollButtonsVisible));
                return false;
            }
        }

void CanReorderTabsWithTabTearOutWithDataItems ( ) [inline]

Definition at line 1168 of file TabViewTests.cs.

        {
            using (var windowOpenedWaiter = new WindowOpenedWaiter(_secondaryWindowCondition))
            {
                using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTearOutWindowWithDataItemsButton" }))
                {
                    windowOpenedWaiter.Wait();
                    ClosePrimaryWindow(setup);
                    TabViewTearOutTestHelpers.CanReorderTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
                }
            }
        }

void CanReorderTabsWithTabTearOutWithoutDataItems ( ) [inline]

Definition at line 1216 of file TabViewTests.cs.

        {
            using (var windowOpenedWaiter = new WindowOpenedWaiter(_secondaryWindowCondition))
            {
                using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTearOutWindowWithoutDataItemsButton" }))
                {
                    windowOpenedWaiter.Wait();
                    ClosePrimaryWindow(setup);
                    TabViewTearOutTestHelpers.CanReorderTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
                }
            }
        }

void CanSelectTabsWithTabTearOutWithDataItems ( ) [inline]

Definition at line 1184 of file TabViewTests.cs.

        {
            using (var windowOpenedWaiter = new WindowOpenedWaiter(_secondaryWindowCondition))
            {
                using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTearOutWindowWithDataItemsButton" }))
                {
                    windowOpenedWaiter.Wait();
                    ClosePrimaryWindow(setup);
                    TabViewTearOutTestHelpers.CanSelectTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
                }
            }
        }

void CanSelectTabsWithTabTearOutWithoutDataItems ( ) [inline]

Definition at line 1232 of file TabViewTests.cs.

        {
            using (var windowOpenedWaiter = new WindowOpenedWaiter(_secondaryWindowCondition))
            {
                using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTearOutWindowWithoutDataItemsButton" }))
                {
                    windowOpenedWaiter.Wait();
                    ClosePrimaryWindow(setup);
                    TabViewTearOutTestHelpers.CanSelectTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
                }
            }
        }

void CanTearOutAndRejoinTabsWithDataItems ( ) [inline]

Definition at line 1151 of file TabViewTests.cs.

        {
            using (var windowOpenedWaiter = new WindowOpenedWaiter(_secondaryWindowCondition))
            {
                using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTearOutWindowWithDataItemsButton" }))
                {
                    windowOpenedWaiter.Wait();
                    ClosePrimaryWindow(setup);
                    TabViewTearOutTestHelpers.CanTearOutAndRejoinTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
                }
            }
        }

void CanTearOutAndRejoinTabsWithoutDataItems ( ) [inline]

Definition at line 1200 of file TabViewTests.cs.

        {
            using (var windowOpenedWaiter = new WindowOpenedWaiter(_secondaryWindowCondition))
            {
                using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTearOutWindowWithoutDataItemsButton" }))
                {
                    windowOpenedWaiter.Wait();
                    ClosePrimaryWindow(setup);
                    TabViewTearOutTestHelpers.CanTearOutAndRejoinTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
                }
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 33 of file TabViewTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void CloseButtonDoesNotShowWhenVisibilityIsToggled ( ) [inline]

Definition at line 726 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                // Wait for the test page's timer to set visibility to the close button to visible
                Wait.ForMilliseconds(2);
                Wait.ForIdle();

                UIObject notCloseableTab = FindElement.ByName("NotCloseableTab");
                var closeButton = FindCloseButton(notCloseableTab);
                Verify.IsNull(closeButton);
            }
        }

void CloseButtonOverlayModeTests ( ) [inline]

Definition at line 589 of file TabViewTests.cs.

        {
            using(var setup = new TestSetupHelper("TabView Tests"))
            {
                ComboBox closeButtonOverlayModeComboBox = FindElement.ByName<ComboBox>("CloseButtonOverlayModeCombobox");
                closeButtonOverlayModeComboBox.SelectItemByName("OnPointerOver");
                Wait.ForIdle();

                Button closeUnselectedButton = FindCloseButton(FindElement.ByName("LongHeaderTab"));
                Button closeSelectedButton = FindCloseButton(FindElement.ByName("FirstTab"));
                Verify.IsNull(closeUnselectedButton);
                Verify.IsNotNull(closeSelectedButton);

                closeButtonOverlayModeComboBox.SelectItemByName("Always");
                Wait.ForIdle();

                // Verifiying "Always" works correctly
                closeSelectedButton = FindCloseButton(FindElement.ByName("FirstTab"));
                closeUnselectedButton = FindCloseButton(FindElement.ByName("LongHeaderTab"));
                Verify.IsNotNull(closeUnselectedButton);
                Verify.IsNotNull(closeSelectedButton);

                // Verifiying "OnPointerOver" works correctly
                closeButtonOverlayModeComboBox.SelectItemByName("OnPointerOver");
                Wait.ForIdle();

                closeSelectedButton = FindCloseButton(FindElement.ByName("FirstTab"));
                closeUnselectedButton = FindCloseButton(FindElement.ByName("LongHeaderTab"));
                Verify.IsNull(closeUnselectedButton);
                Verify.IsNotNull(closeSelectedButton);

                // Verifiying "Auto" works correctly
                closeButtonOverlayModeComboBox.SelectItemByName("Auto");
                Wait.ForIdle();

                closeSelectedButton = FindCloseButton(FindElement.ByName("FirstTab"));
                closeUnselectedButton = FindCloseButton(FindElement.ByName("LongHeaderTab"));
                Verify.IsNotNull(closeUnselectedButton);
                Verify.IsNotNull(closeSelectedButton);
            }
        }

static void ClosePrimaryWindow ( TestSetupHelper setup ) [inline, static, private]

Definition at line 1311 of file TabViewTests.cs.

        {
            Log.Comment("We won't be needing the primary window, so we'll close it now in order to avoid it stealing focus.");

            var primaryWindow = GetPrimaryWindow();
            Window tabTearOutWindow = GetTabViewTearOutAppWindows().Single();
            TestEnvironment.Application.SetNewApplicationFrameWindow(tabTearOutWindow);

            using (var waiter = new WindowClosedWaiter(primaryWindow))
            {
                primaryWindow.Close();
                waiter.Wait();
            }

            setup.ClearOpenedPages();
            Wait.ForIdle();
        }

void CloseSelectionTest ( ) [inline]

Definition at line 266 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("Hiding the disabled tab");
                var disabledTabCheckBox = FindElement.ByName<CheckBox>("IsDisabledTabVisibleCheckBox");
                Verify.IsNotNull(disabledTabCheckBox);
                disabledTabCheckBox.Uncheck();

                Log.Comment("Finding the first tab");
                UIObject firstTab = FindElement.ByName("FirstTab");
                Button closeButton = FindCloseButton(firstTab);
                Verify.IsNotNull(closeButton);

                TextBlock selectedIndexTextBlock = FindElement.ByName<TextBlock>("SelectedIndexTextBlock");
                Verify.AreEqual("0", selectedIndexTextBlock.DocumentText);

                Log.Comment("When the selected tab is closed, selection should move to the next one.");
                // Use Tab's close button:
                closeButton.InvokeAndWait();
                VerifyElement.NotFound("FirstTab", FindBy.Name);
                Verify.AreEqual("0", selectedIndexTextBlock.DocumentText);

                Log.Comment("Select last tab.");
                UIObject lastTab = FindElement.ByName("LastTab");
                lastTab.Click();
                Wait.ForIdle();
                Verify.AreEqual("3", selectedIndexTextBlock.DocumentText);

                Log.Comment("When the selected tab is last and is closed, selection should move to the previous item.");

                // Use Middle Click to close the tab:
                lastTab.Click(PointerButtons.Middle);
                Wait.ForIdle();
                VerifyElement.NotFound("LastTab", FindBy.Name);
                Verify.AreEqual("2", selectedIndexTextBlock.DocumentText);
            }
        }

void DragBetweenTabViewsTest ( ) [inline]

Definition at line 359 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                UIObject firstTab = FindElement.ByName("FirstTab");
                Verify.IsNotNull(firstTab);

                UIObject dropTarget = FindElement.ByName("TabInSecondTabView");
                Verify.IsNotNull(dropTarget);

                Log.Comment("Home tab should be in the first tab view.");
                PressButtonAndVerifyText("GetFirstTabLocationButton", "FirstTabLocationTextBlock", "FirstTabView");

                InputHelper.DragToTarget(firstTab, dropTarget);
                Wait.ForIdle();
                ElementCache.Refresh();

                Log.Comment("Home tab should now be in the second tab view.");
                PressButtonAndVerifyText("GetFirstTabLocationButton", "FirstTabLocationTextBlock", "SecondTabView");

                Log.Comment("Home tab content should be visible.");
                UIObject tabContent = FindElement.ByName("FirstTabContent");
                Verify.IsNotNull(tabContent);
            }
        }

void DragOutsideTest ( ) [inline]

Definition at line 670 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                TextBlock dragOutsideTextBlock = FindElement.ByName<TextBlock>("TabDroppedOutsideTextBlock");
                Verify.AreEqual("", dragOutsideTextBlock.DocumentText);

                Log.Comment("Drag tab out");
                UIObject firstTab = TryFindElement.ByName("FirstTab");
                InputHelper.DragDistance(firstTab, 50, Direction.South);
                Wait.ForIdle();

                Log.Comment("Verify event fired");
                Verify.AreEqual("Home", dragOutsideTextBlock.DocumentText);
            }
        }

void EnumerateChildren ( UIObject root ) [inline, private]

Definition at line 1290 of file TabViewTests.cs.

        {
            foreach (UIObject child in root.Children)
            {
                Log.Comment("Children Enumeration: Name=" + child.Name + ", ClassName=" + child.ClassName);
                EnumerateChildren(child);
            }
        }

Button FindCloseButton ( UIObject tabItem ) [inline, private]

Definition at line 1276 of file TabViewTests.cs.

        {
            foreach (UIObject elem in tabItem.Children)
            {
                if (elem.ClassName.Equals("Button"))
                {
                    Log.Comment("Found close button for object " + tabItem.Name);
                    return new Button(elem);
                }
            }
            Log.Comment("Did not find close button for object " + tabItem.Name);
            return null;
        }

void GamePadTest ( ) [inline]

Definition at line 633 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Button tabContent = FindElement.ByName<Button>("FirstTabButton");
                ToggleButton toggleInnerFrameDimensions = FindElement.ById<ToggleButton>("__InnerFrameInLabDimensions");
                TabItem firstTab = FindElement.ByName<TabItem>("FirstTab");
                TabItem secondTab = FindElement.ByName<TabItem>("SecondTab");
                TabItem lastTab = FindElement.ByName<TabItem>("LastTab");
                Button addButton = FindElement.ById<Button>("AddButton");

                firstTab.SetFocus();

                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickRight);
                Wait.ForIdle();
                Verify.IsTrue(secondTab.HasKeyboardFocus, "GamePad Right should move focus to second tab");

                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickLeft);
                Wait.ForIdle();
                Verify.IsTrue(firstTab.HasKeyboardFocus, "GamePad Left should move focus to first tab");

                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickDown);
                Wait.ForIdle();
                Verify.IsTrue(tabContent.HasKeyboardFocus, "GamePad Down should move focus to tab content");

                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickUp);
                Wait.ForIdle();
                Verify.IsTrue(firstTab.HasKeyboardFocus, "GamePad Up should move focus to tabs");

                GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickUp);
                Wait.ForIdle();
                Verify.IsTrue(toggleInnerFrameDimensions.HasKeyboardFocus, "GamePad Up should move to toggle inner frame dimensions button");
            }
        }

static Window GetPrimaryWindow ( ) [inline, static, private]

Definition at line 1329 of file TabViewTests.cs.

        {
            return new Window(UIObject.Root.Children.Find(_primaryWindowCondition));
        }

static List<TabItem> GetTabsFromTabView ( Tab tabView ) [inline, static, private]

Definition at line 1344 of file TabViewTests.cs.

        {
            return tabView.Descendants.FindMultiple(_tabCondition).Select(o => new TabItem(o)).ToList();
        }

static Tab GetTabViewFromWindow ( Window window ) [inline, static, private]

Definition at line 1339 of file TabViewTests.cs.

        {
            return new Tab(window.Descendants.Find(_tabViewCondition));
        }

static List<Window> GetTabViewTearOutAppWindows ( ) [inline, static, private]

Definition at line 1334 of file TabViewTests.cs.

        {
            return UIObject.Root.Children.FindMultiple(_secondaryWindowCondition).Select(o => new Window(o)).ToList();
        }

void HandleItemCloseRequestedTest ( ) [inline]

Definition at line 334 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                UIObject firstTab = FindElement.ByName("FirstTab");
                Button closeButton = FindCloseButton(firstTab);
                Verify.IsNotNull(closeButton);

                CheckBox tabCloseRequestedCheckBox = FindElement.ByName<CheckBox>("HandleTabCloseRequestedCheckBox");
                tabCloseRequestedCheckBox.Uncheck();
                CheckBox tabItemCloseRequestedCheckBox = FindElement.ByName<CheckBox>("HandleTabItemCloseRequestedCheckBox");
                tabItemCloseRequestedCheckBox.Check();
                Wait.ForIdle();

                Log.Comment("TabViewItem.CloseRequested should be raised when the close button is pressed.");
                closeButton.InvokeAndWait();

                ElementCache.Refresh();
                firstTab = TryFindElement.ByName("FirstTab");
                Verify.IsNull(firstTab);
            }
        }

void IsClosableTest ( ) [inline]

Definition at line 306 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                UIObject firstTab = FindElement.ByName("FirstTab");
                Button closeButton = FindCloseButton(firstTab);
                Verify.IsNotNull(closeButton);

                Log.Comment("Setting IsClosable=false on the first tab.");
                CheckBox isClosableCheckBox = FindElement.ByName<CheckBox>("IsClosableCheckBox");
                isClosableCheckBox.Uncheck();
                Wait.ForIdle();

                ElementCache.Refresh();
                closeButton = FindCloseButton(firstTab);
                Verify.IsNull(closeButton);

                Log.Comment("Setting IsClosable=true on the first tab.");
                isClosableCheckBox.Check();
                Wait.ForIdle();

                ElementCache.Refresh();
                closeButton = FindCloseButton(firstTab);
                Verify.IsNotNull(closeButton);
            }
        }

bool IsScrollDecreaseButtonEnabled ( ) [inline, private]

Definition at line 258 of file TabViewTests.cs.

        {
            FindElement.ByName<Button>("GetScrollDecreaseButtonEnabled").InvokeAndWait();
            var scrollDecreaseButtonEnabled = FindElement.ByName<TextBlock>("ScrollDecreaseButtonEnabled").DocumentText;
            return scrollDecreaseButtonEnabled == "True";
        }

bool IsScrollIncreaseButtonEnabled ( ) [inline, private]

Definition at line 251 of file TabViewTests.cs.

        {
            FindElement.ByName<Button>("GetScrollIncreaseButtonEnabled").InvokeAndWait();
            var scrollIncreaseButtonEnabled = FindElement.ByName<TextBlock>("ScrollIncreaseButtonEnabled").DocumentText;
            return scrollIncreaseButtonEnabled == "True";
        }

void ItemChangedEventOnDragTest ( ) [inline]

Definition at line 426 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Button addButton = FindElement.ByName<Button>("Add New Tab");
                Verify.IsNotNull(addButton);

                Log.Comment("Add tab so scroll buttons appear.");
                addButton.InvokeAndWait();

                Verify.IsTrue(AreScrollButtonsVisible(), "Scroll buttons should appear");

                UIObject sourceTab = FindElement.ByName("FirstTab");

                Verify.IsNotNull(sourceTab);

                UIObject dropTab = FindElement.ByName("LastTab");
                Verify.IsNotNull(dropTab);

                Log.Comment("Dragging tab to the last overflow tab...");
                InputHelper.DragToTarget(sourceTab, dropTab, 40);
                Wait.ForIdle();
                ElementCache.Refresh();

                Log.Comment("...reordering done. Expecting a TabView.TabItemsChanged event to be raised with CollectionChange=ItemInserted.");

                TextBlock tabsItemChangedEventArgsTextBlock = FindElement.ByName<TextBlock>("TabsItemChangedEventArgsTextBlock");
                Verify.AreEqual("ItemInserted", tabsItemChangedEventArgsTextBlock.DocumentText);
            }
        }

void KeyboardTest ( ) [inline]

Definition at line 479 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("Set focus inside the TabView");
                UIObject tabContent = FindElement.ByName("FirstTabContent");
                tabContent.SetFocus();

                TabItem firstTab = FindElement.ByName<TabItem>("FirstTab");
                Button firstTabCloseButton = new Button(firstTab.Descendants.Find(UICondition.CreateFromName("Close Tab")));
                TabItem secondTab = FindElement.ByName<TabItem>("SecondTab");
                Button secondTabCloseButton = new Button(secondTab.Descendants.Find(UICondition.CreateFromName("Close Tab")));
                TabItem lastTab = FindElement.ByName<TabItem>("LastTab");
                Button lastTabCloseButton = new Button(lastTab.Descendants.Find(UICondition.CreateFromName("Close Tab")));
                TabItem notCloseableTab = FindElement.ByName<TabItem>("NotCloseableTab");

                Button addButton = FindElement.ById<Button>("AddButton");

                Verify.IsTrue(firstTab.IsSelected, "First Tab should be selected initially");
                Button firstTabButton = FindElement.ByName<Button>("FirstTabButton");
                Verify.IsTrue(firstTabButton.HasKeyboardFocus, "Focus should start in the First Tab");

                // Ctrl+Tab to the second tab:
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Control);
                Verify.IsTrue(secondTab.IsSelected, "Ctrl+Tab should move selection to Second Tab");
                Button secondTabButton = FindElement.ByName<Button>("SecondTabButton");
                Verify.IsTrue(secondTabButton.HasKeyboardFocus, "Focus should move to the content of the Second Tab");

                // Ctrl+Shift+Tab to the first tab:
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Control | ModifierKey.Shift);
                Verify.IsTrue(firstTab.IsSelected, "Ctrl+Shift+Tab should move selection to First Tab");
                Verify.IsTrue(firstTabButton.HasKeyboardFocus, "Focus should move to the content of the First Tab");

                // Ctrl+Shift+Tab to the last tab:
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Control | ModifierKey.Shift);
                Verify.IsTrue(lastTab.IsSelected, "Ctrl+Shift+Tab should move selection to Last Tab");
                Verify.IsTrue(lastTab.HasKeyboardFocus, "Focus should move to the last tab (since it has no focusable content)");

                // Ctrl+Shift+Tab to the not-closable tab:
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Control | ModifierKey.Shift);
                Verify.IsTrue(notCloseableTab.IsSelected, "Ctrl+Shift+Tab should move selection to the not-closable tab, past the disabled tab");
                Verify.IsTrue(notCloseableTab.HasKeyboardFocus, "Focus should move to the not-closable tab (since it has no focusable content)");

                // Ctrl+Tab to the first tab:
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Control);
                Verify.IsTrue(lastTab.IsSelected, "Ctrl+Tab should move selection to the last tab");
                Verify.IsTrue(lastTab.HasKeyboardFocus, "Focus should move to the last tab");

                // Ctrl+Tab to the first tab:
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Control);
                Verify.IsTrue(firstTab.IsSelected, "Ctrl+Tab should move selection to first tab");
                Verify.IsTrue(firstTab.HasKeyboardFocus, "Focus should move to the first tab");

                KeyboardHelper.PressKey(Key.Up);
                Verify.IsTrue(firstTab.HasKeyboardFocus, "Up key should not move focus");

                KeyboardHelper.PressKey(Key.Down);
                Verify.IsTrue(firstTab.HasKeyboardFocus, "Down key should not move focus");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(firstTabCloseButton.HasKeyboardFocus, "Right Key should move focus to the first tab close button");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(secondTab.HasKeyboardFocus, "Right Key should move focus to the second tab");

                KeyboardHelper.PressKey(Key.Space);
                Verify.IsTrue(secondTab.IsSelected, "Space should select the second tab");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(firstTabCloseButton.HasKeyboardFocus, "Left Key should move focus to the first tab close button");

                KeyboardHelper.PressKey(Key.Space);
                Verify.IsTrue(secondTab.IsSelected, "Space should close the first tab and focus the next tab");
                VerifyElement.NotFound("FirstTab", FindBy.Name);

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(addButton.HasKeyboardFocus, "Left Key should move focus to the add button");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(lastTabCloseButton.HasKeyboardFocus, "Left Key from AddButton should move focus to last tab close button");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(lastTab.HasKeyboardFocus, "Left Key from last tab close button should move focus to last tab");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(lastTabCloseButton.HasKeyboardFocus, "Right Key from last tab should move focus to the last tab close button");

                KeyboardHelper.PressKey(Key.Right);
                Verify.IsTrue(addButton.HasKeyboardFocus, "Right Key from last tab close button should move focus to the add button");

                KeyboardHelper.PressKey(Key.Left);
                Verify.IsTrue(lastTabCloseButton.HasKeyboardFocus, "Left Key from AddButton should move focus to last tab close button");

                KeyboardHelper.PressKey(Key.Space);
                Verify.IsTrue(notCloseableTab.HasKeyboardFocus, "Space should close the last tab and focus the previous focusable tab");
                VerifyElement.NotFound("LastTab", FindBy.Name);

                secondTab.SetFocus();

                // Ctrl+f4 to close the tab:
                Log.Comment("Verify that pressing ctrl-f4 closes the tab");
                KeyboardHelper.PressKey(Key.F4, ModifierKey.Control);
                Wait.ForIdle();

                VerifyElement.NotFound("SecondTab", FindBy.Name);
                Wait.ForIdle();
            }
        }

void PressButtonAndVerifyText | ( | String | buttonName,
 |  | String | textBlockName,
 |  | String | expectedText |
 | ) |  |  | [inline, private]

Definition at line 1267 of file TabViewTests.cs.

        {
            Button button = FindElement.ByName<Button>(buttonName);
            button.InvokeAndWait();

            TextBlock textBlock = FindElement.ByName<TextBlock>(textBlockName);
            Verify.AreEqual(expectedText, textBlock.DocumentText);
        }

void ReorderItemsTest ( ) [inline]

Definition at line 386 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Button tabItemsSourcePageButton = FindElement.ByName<Button>("TabViewTabItemsSourcePageButton");
                tabItemsSourcePageButton.InvokeAndWait();

                UIObject sourceTab = null;
                int attempts = 0;

                do
                {
                    Wait.ForMilliseconds(100);
                    ElementCache.Refresh();

                    sourceTab = FindElement.ByName("tabViewItem0");
                    attempts++;
                }
                while (sourceTab == null && attempts < 4);

                Verify.IsNotNull(sourceTab);

                UIObject dropTab = FindElement.ByName("tabViewItem2");
                Verify.IsNotNull(dropTab);

                Log.Comment("Reordering tabs with drag-drop operation...");
                InputHelper.DragToTarget(sourceTab, dropTab, -5);
                Wait.ForIdle();
                ElementCache.Refresh();
                Log.Comment("...reordering done. Expecting a TabView.TabItemsChanged event was raised with CollectionChange=ItemInserted and Index=1.");

                TextBlock tblIVectorChangedEventArgsCollectionChange = FindElement.ByName<TextBlock>("tblIVectorChangedEventArgsCollectionChange");
                Verify.AreEqual("ItemInserted", tblIVectorChangedEventArgsCollectionChange.DocumentText);

                TextBlock tblIVectorChangedEventArgsIndex = FindElement.ByName<TextBlock>("tblIVectorChangedEventArgsIndex");
                Verify.AreEqual("1", tblIVectorChangedEventArgsIndex.DocumentText);
            }
        }

void ScrollButtonToolTipTest ( ) [inline]

Definition at line 783 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                PressButtonAndVerifyText("GetScrollDecreaseButtonToolTipButton", "ScrollDecreaseButtonToolTipTextBlock", "Scroll tab list backward");
                PressButtonAndVerifyText("GetScrollIncreaseButtonToolTipButton", "ScrollIncreaseButtonToolTipTextBlock", "Scroll tab list forward");
            }
        }

void SelectionTest ( ) [inline]

Definition at line 53 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("Verify content is displayed for initially selected tab.");
                UIObject tabContent = FindElement.ByName("FirstTabContent");
                Verify.IsNotNull(tabContent);

                Log.Comment("Changing selection.");
                UIObject lastTab = FindElement.ByName("LastTab");
                lastTab.Click();
                Wait.ForIdle();

                Log.Comment("Verify content is displayed for newly selected tab.");
                tabContent = FindElement.ByName("LastTabContent");
                Verify.IsNotNull(tabContent);

                Log.Comment("Verify that setting SelectedItem changes selection.");
                Button selectItemButton = FindElement.ByName<Button>("SelectItemButton");
                selectItemButton.InvokeAndWait();

                TextBlock selectedIndexTextBlock = FindElement.ByName<TextBlock>("SelectedIndexTextBlock");
                Verify.AreEqual("1", selectedIndexTextBlock.DocumentText);

                Log.Comment("Verify that setting SelectedIndex changes selection.");
                Button selectIndexButton = FindElement.ByName<Button>("SelectIndexButton");
                selectIndexButton.InvokeAndWait();
                Verify.AreEqual("2", selectedIndexTextBlock.DocumentText);

                Log.Comment("Verify that ctrl-click on tab selects it.");
                UIObject firstTab = FindElement.ByName("FirstTab");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                firstTab.Click();
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
                Wait.ForIdle();
                Verify.AreEqual("0", selectedIndexTextBlock.DocumentText);

                Log.Comment("Verify that ctrl-click on tab does not deselect.");
                KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                firstTab.Click();
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
                Wait.ForIdle();
                Verify.AreEqual("0", selectedIndexTextBlock.DocumentText);
            }
        }

void SizingTest ( ) [inline]

Definition at line 741 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Button sizingPageButton = FindElement.ByName<Button>("TabViewSizingPageButton");
                sizingPageButton.InvokeAndWait();
                Wait.ForMilliseconds(200);
                ElementCache.Refresh();

                Button setSmallWidthButton = FindElement.ByName<Button>("SetSmallWidth");
                setSmallWidthButton.InvokeAndWait();

                Button getWidthsButton = FindElement.ByName<Button>("GetWidthsButton");
                getWidthsButton.InvokeAndWait();

                TextBlock widthEqualText = FindElement.ByName<TextBlock>("WidthEqualText");
                TextBlock widthSizeToContentText = FindElement.ByName<TextBlock>("WidthSizeToContentText");

                Verify.AreEqual("400", widthEqualText.DocumentText);
                Verify.AreEqual("400", widthSizeToContentText.DocumentText);

                Button setLargeWidthButton = FindElement.ByName<Button>("SetLargeWidth");
                setLargeWidthButton.InvokeAndWait();

                getWidthsButton.InvokeAndWait();

                Verify.AreEqual("700", widthEqualText.DocumentText);
                Verify.AreEqual("700", widthSizeToContentText.DocumentText);
            }
        }

void TabSizeAndScrollButtonsTest ( ) [inline]

Definition at line 157 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                UIObject smallerTab = FindElement.ByName("SecondTab");
                UIObject largerTab = FindElement.ByName("LongHeaderTab");

                FindElement.ByName<Button>("SetTabViewWidth").InvokeAndWait();

                Verify.IsFalse(AreScrollButtonsVisible(), "Scroll buttons should not be visible");

                Log.Comment("Equal size tabs should all be the same size.");
                int diff = Math.Abs(largerTab.BoundingRectangle.Width - smallerTab.BoundingRectangle.Width);
                Verify.IsLessThanOrEqual(diff, 1);

                Log.Comment("Changing tab width mode to SizeToContent.");
                ComboBox tabWidthComboBox = FindElement.ByName<ComboBox>("TabWidthComboBox");
                tabWidthComboBox.SelectItemByName("SizeToContent");
                Wait.ForIdle();

                Log.Comment("Tab with larger content should be wider.");
                Verify.IsGreaterThan(largerTab.BoundingRectangle.Width, smallerTab.BoundingRectangle.Width);

                // With largerTab now rendering wider, the scroll buttons should appear:
                Verify.IsTrue(AreScrollButtonsVisible(), "Scroll buttons should appear");

                // Scroll all the way to the left and verify decrease/increase button visual state
                FindElement.ByName<Button>("ScrollTabViewToTheLeft").InvokeAndWait();
                Wait.ForIdle();
                Verify.IsFalse(IsScrollDecreaseButtonEnabled(), "Scroll decrease button should be disabled");
                Verify.IsTrue(IsScrollIncreaseButtonEnabled(), "Scroll increase button should be enabled");

                // Scroll to the middle position and verify decrease/increase button visual state
                FindElement.ByName<Button>("ScrollTabViewToTheMiddle").InvokeAndWait();
                Wait.ForIdle();
                Verify.IsTrue(IsScrollDecreaseButtonEnabled(), "Scroll decrease button should be enabled");
                Verify.IsTrue(IsScrollIncreaseButtonEnabled(), "Scroll increase button should be enabled");

                // Scroll all the way to the right and verify decrease/increase button visual state
                FindElement.ByName<Button>("ScrollTabViewToTheRight").InvokeAndWait();
                Wait.ForIdle();
                Verify.IsTrue(IsScrollDecreaseButtonEnabled(), "Scroll decrease button should be enabled");
                Verify.IsFalse(IsScrollIncreaseButtonEnabled(), "Scroll increase button should be disabled");

                // Close a tab to make room. The scroll buttons should disappear:
                Log.Comment("Closing a tab:");
                Button closeButton = FindCloseButton(FindElement.ByName("LongHeaderTab"));
                closeButton.MovePointer(0, 0);
                closeButton.InvokeAndWait();
                VerifyElement.NotFound("LongHeaderTab", FindBy.Name);

                Log.Comment("Scroll buttons should disappear");
                // Leaving tabstrip with this so the tabs update their width
                FindElement.ByName<Button>("IsClosableCheckBox").MovePointer(0,0);
                Wait.ForIdle();
                Verify.IsFalse(AreScrollButtonsVisible(), "Scroll buttons should disappear");

                // Make sure the scroll buttons can show up in 'Equal' sizing mode.
                Log.Comment("Changing tab width mode to Equal");
                tabWidthComboBox.SelectItemByName("Equal");
                Wait.ForIdle();
                Verify.IsFalse(AreScrollButtonsVisible(), "Scroll buttons should not be visible");

                var addButton = FindElement.ByName<Button>("Add New Tab");
                Verify.IsNotNull(addButton, "addButton should be available");
                Log.Comment("Adding a tab");
                addButton.InvokeAndWait();
                Verify.IsFalse(AreScrollButtonsVisible(), "Scroll buttons should not be visible");
                Log.Comment("Adding another tab");
                addButton.InvokeAndWait();

                Verify.IsTrue(AreScrollButtonsVisible(), "Scroll buttons should appear");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 38 of file TabViewTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ToolTipDefaultTest ( ) [inline]

Definition at line 688 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("If the app sets custom tooltip text, it should be preserved.");
                PressButtonAndVerifyText("GetTab0ToolTipButton", "Tab0ToolTipTextBlock", "Custom Tooltip");

                Log.Comment("If the app does not set a custom tooltip, it should be the same as the header text.");
                PressButtonAndVerifyText("GetTab1ToolTipButton", "Tab1ToolTipTextBlock", "SecondTab");

                Button changeShopTextButton = FindElement.ByName<Button>("ChangeShopTextButton");
                changeShopTextButton.InvokeAndWait();

                Log.Comment("If the tab's header changes, the tooltip should update.");
                PressButtonAndVerifyText("GetTab1ToolTipButton", "Tab1ToolTipTextBlock", "Changed");
            }
        }

void ToolTipUpdateTest ( ) [inline]

Definition at line 707 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Button customTooltipButton = FindElement.ByName<Button>("CustomTooltipButton");
                customTooltipButton.InvokeAndWait();

                Log.Comment("If the app updates the tooltip, it should change to their custom one.");
                PressButtonAndVerifyText("GetTab1ToolTipButton", "Tab1ToolTipTextBlock", "Custom");

                Button changeShopTextButton = FindElement.ByName<Button>("ChangeShopTextButton");
                changeShopTextButton.InvokeAndWait();

                Log.Comment("The tooltip should not update if the header changes.");
                PressButtonAndVerifyText("GetTab1ToolTipButton", "Tab1ToolTipTextBlock", "Custom");
            }
        }

void TouchSelectionTest ( ) [inline]

Definition at line 102 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("Verify content is displayed for initially selected tab.");
                UIObject tabContent = FindElement.ByName("FirstTabContent");
                Verify.IsNotNull(tabContent);

                Log.Comment("Changing selection to Last Tab.");
                UIObject lastTab = FindElement.ByName("LastTab");
                lastTab.Tap();
                Wait.ForIdle();

                Log.Comment("Verify content is displayed for newly selected tab.");
                tabContent = FindElement.ByName("LastTabContent");
                Verify.IsNotNull(tabContent);

                // Toggle between tabs to reproduce crash before merged commit 0028e6b9
                Log.Comment("Changing selection to SecondTab.");
                UIObject SecondTab = FindElement.ByName("SecondTab");
                SecondTab.Tap();
                Wait.ForIdle();

                Log.Comment("Changing selection to LastTab.");
                lastTab.Tap();
                Wait.ForIdle();

                Log.Comment("Changing selection to SecondTab again.");
                SecondTab.Tap();
                lastTab.Tap();
            }
        }

void VerifyAxeScanPasses ( ) [inline]

Definition at line 44 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView-Axe"))
            {
                AxeTestHelper.TestForAxeIssues();
            }
        }

void VerifyDragStartedCalledOnItemDrag ( ) [inline]

Definition at line 773 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                InputHelper.MouseDragDistance(FindElement.ByName("SecondTab"), 200, Direction.East, 4000);
                Verify.AreEqual("SecondTab dragged", FindElement.ByName<TextBlock>("TabDraggedResultsTextBlock").DocumentText);
            }
        }

void VerifyHeaderSizeWhenClosingLastTab ( ) [inline]

Definition at line 1021 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTabClosingBehaviorButton" }))
            {
                var increaseScrollButton = FindElement.ByName<Button>("IncreaseScrollButton");
                increaseScrollButton.Click();
                Wait.ForIdle();
                increaseScrollButton.Click();
                Wait.ForIdle();
                var readTabViewWidthButton = new Button(FindElement.ByName("GetActualWidthButton"));
                readTabViewWidthButton.Click();
                Wait.ForIdle();

                var initialWidth = GetTabViewHeaderWidth();
                Verify.AreEqual(100, initialWidth);

                var lastTab = FindElement.ByName("Tab 5");
                FindCloseButton(lastTab).Click();
                Wait.ForIdle();

                var widthAfterClose = GetTabViewHeaderWidth();
                Verify.AreEqual(100, widthAfterClose);
                Verify.AreEqual("False;True;", FindElement.ByName("ScrollButtonStatus").GetText());

                var newLastTab = FindElement.ByName("Tab 4");
                FindCloseButton(newLastTab).Click();
                Wait.ForIdle();

                var widthAfterSecondClose = GetTabViewHeaderWidth();
                Verify.AreEqual(100, widthAfterSecondClose);

                double GetTabViewHeaderWidth()
                {
                    var tabViewHeaderWidth = new TextBlock(FindElement.ByName("TabViewHeaderWidth"));
                    return double.Parse(tabViewHeaderWidth.GetText());
                }
            }
        }

void VerifyRightClickDoesNotSelectTab ( ) [inline]

Definition at line 1248 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("We should begin on the first tab.");
                UIObject tabContent = FindElement.ByName("FirstTabContent");
                Verify.IsNotNull(tabContent);

                Log.Comment("Now we'll right-click on the last tab.");
                UIObject lastTab = FindElement.ByName("LastTab");
                InputHelper.RightClick(lastTab);

                Log.Comment("We should still be on the first tab.");
                ElementCache.Clear();
                tabContent = FindElement.ByName("FirstTabContent");
                Verify.IsNotNull(tabContent);
            }
        }

void VerifyScrollRepeatButtons ( ) [inline]

Definition at line 1102 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TabView Tests"))
            {
                Log.Comment("Enumerating TabView's children:");
                UIObject tabView = FindElement.ByName("Tabs");
                Verify.IsNotNull(tabView);

                EnumerateChildren(tabView);

                Verify.IsFalse(AreScrollButtonsVisible(), "Scroll repeat buttons should not be visible");

                Log.Comment("Adding 10 new tabs to show the scroll repeat buttons.");
                Button addTabButton = FindElement.ByName<Button>("Add New Tab");

                for (int i = 0; i < 10; i++)
                {
                    addTabButton.InvokeAndWait();
                }

                ElementCache.Refresh();

                Log.Comment("Enumerating TabView's children again:");
                EnumerateChildren(tabView);

                Verify.IsTrue(AreScrollButtonsVisible(), "Scroll repeat buttons should be visible now");
                Verify.IsFalse(IsScrollDecreaseButtonEnabled(), "Scroll decrease repeat button should be disabled");
                Verify.IsTrue(IsScrollIncreaseButtonEnabled(), "Scroll increase repeat button should be enabled");

                Log.Comment("Add Button Bounding Rect: X=" + addTabButton.BoundingRectangle.X + ", Y=" + addTabButton.BoundingRectangle.Y + ", W=" + addTabButton.BoundingRectangle.Width + ", H=" + addTabButton.BoundingRectangle.Height);

                // Since the scroll repeat buttons have no accessibility visibility, the neighboring Add Tab button is used, with a negative horizontal offset to reach the scroll increase repeat button.
                addTabButton.Tap(-addTabButton.BoundingRectangle.Width, addTabButton.BoundingRectangle.Height * 0.5);
                Wait.ForIdle();

                bool newIsScrollDecreaseButtonEnabled = IsScrollDecreaseButtonEnabled();
                bool newIsScrollIncreaseButtonEnabled = IsScrollIncreaseButtonEnabled();

                Log.Comment("New scroll decrease repeat button status: " + newIsScrollDecreaseButtonEnabled);
                Log.Comment("New scroll increase repeat button status: " + newIsScrollIncreaseButtonEnabled);

                Verify.IsTrue(newIsScrollDecreaseButtonEnabled, "Scroll decrease repeat button should be enabled");
                Verify.IsTrue(newIsScrollIncreaseButtonEnabled, "Scroll increase repeat button should be enabled");
            }
        }

void VerifySizingBehaviorModifyingCollectionRemovingLastItem ( ) [inline]

Definition at line 898 of file TabViewTests.cs.

        {
            int pixelTolerance = 5;

            using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTabClosingBehaviorButton" }))
            {

                Log.Comment("Verifying sizing behavior when removing the last tab from tab collection");
                CloseTabAndVerifyWidth("Tab 5", 500, 100);

                CloseTabAndVerifyWidth("Tab 4", 500, 100);

                CloseTabAndVerifyWidth("Tab 3", 500, 140);

                CloseTabAndVerifyWidth("Tab 2", 500, 225);
            }

            void CloseTabAndVerifyWidth(string tabName, int expectedWidth, int expectedItemWidth)
            {
                Log.Comment("Closing tab:" + tabName);
                new Button(FindElement.ByName("RemoveLastItemButton")).Click();
                Wait.ForIdle();
                new Button(FindElement.ByName("GetActualWidthButton")).Click();
                Log.Comment("Verifying TabView width");
                Verify.IsTrue(Math.Abs(GetActualTabViewWidth() - expectedWidth) < pixelTolerance);
                var firstTabItemWidth = GetFirstTabItemWidth();
                Verify.IsTrue(Math.Abs(firstTabItemWidth - expectedItemWidth) < pixelTolerance);
            }

            double GetActualTabViewWidth()
            {
                var tabviewWidth = new TextBlock(FindElement.ByName("TabViewWidth"));

                return double.Parse(tabviewWidth.GetText());
            }

            double GetFirstTabItemWidth()
            {
                var tabviewWidth = new TextBlock(FindElement.ByName("TabViewHeaderWidth"));

                return double.Parse(tabviewWidth.GetText().Split(".")[0]);
            }
        }

void VerifySizingBehaviorModifyingCollectionRemovingSecondItem ( ) [inline]

Definition at line 943 of file TabViewTests.cs.

        {
            int pixelTolerance = 5;

            using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTabClosingBehaviorButton" }))
            {

                Log.Comment("Verifying sizing behavior when removing the second tab from tab collection");
                CloseTabAndVerifyWidth("Tab 5", 500, 100);

                CloseTabAndVerifyWidth("Tab 4", 500, 100);

                CloseTabAndVerifyWidth("Tab 3", 500, 140);

                CloseTabAndVerifyWidth("Tab 2", 500, 225);
            }

            void CloseTabAndVerifyWidth(string tabName, int expectedWidth, int expectedItemWidth)
            {
                Log.Comment("Closing tab:" + tabName);
                new Button(FindElement.ByName("RemoveMiddleItemButton")).Click();
                Wait.ForIdle();
                new Button(FindElement.ByName("GetActualWidthButton")).Click();
                Log.Comment("Verifying TabView width");
                Verify.IsTrue(Math.Abs(GetActualTabViewWidth() - expectedWidth) < pixelTolerance);
                Verify.IsTrue(Math.Abs(GetFirstTabItemWidth() - expectedItemWidth) < pixelTolerance);
            }

            double GetActualTabViewWidth()
            {
                var tabviewWidth = new TextBlock(FindElement.ByName("TabViewWidth"));

                return double.Parse(tabviewWidth.GetText());
            }

            double GetFirstTabItemWidth()
            {
                var tabviewWidth = new TextBlock(FindElement.ByName("TabViewHeaderWidth"));

                return double.Parse(tabviewWidth.GetText().Split(".")[0]);
            }
        }

void VerifySizingBehaviorOnTabCloseComingFromCtrlF4 ( ) [inline]

Definition at line 987 of file TabViewTests.cs.

        {
            int pixelTolerance = 10;

            using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTabClosingBehaviorButton" }))
            {

                Log.Comment("Verifying sizing behavior when closing a tab using Ctrl+F4");
                CloseTabAndVerifyWidth("Tab 1", 500, "True;False;");

                CloseTabAndVerifyWidth("Tab 2", 500, "True;False;");
            }

            void CloseTabAndVerifyWidth(string tabName, int expectedValue, string expectedScrollbuttonStates)
            {
                Log.Comment("Closing tab:" + tabName);
                FindElement.ByName(tabName).Click();
                KeyboardHelper.PressKey(Key.F4,ModifierKey.Control);
                Wait.ForIdle();
                Log.Comment("Verifying TabView width");
                Verify.IsTrue(Math.Abs(GetActualTabViewWidth() - expectedValue) < pixelTolerance);
                Verify.AreEqual(expectedScrollbuttonStates, FindElement.ByName("ScrollButtonStatus").GetText());

            }

            double GetActualTabViewWidth()
            {
                var tabviewWidth = new TextBlock(FindElement.ByName("TabViewWidth"));

                return Double.Parse(tabviewWidth.GetText());
            }
        }

void VerifySizingBehaviorOnTabCloseComingFromNonScroll ( ) [inline]

Definition at line 844 of file TabViewTests.cs.

        {
            int pixelTolerance = 10;

            using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTabClosingBehaviorButton" }))
            {

                Log.Comment("Verifying sizing behavior when closing a tab");
                CloseTabAndVerifyWidth("Tab 1", 500, "True;False;");

                CloseTabAndVerifyWidth("Tab 2", 500, "True;False;");

                CloseTabAndVerifyWidth("Tab 3", 500, "False;False;");

                var readTabViewWidthButton = new Button(FindElement.ByName("GetActualWidthButton"));
                readTabViewWidthButton.Click();
                Wait.ForIdle();

                CloseTabAndVerifyWidth("Tab 5", 500, "False;False;");

                readTabViewWidthButton.Click();
                Wait.ForIdle();

                CloseTabAndVerifyWidth("Tab 4", 500, "False;False;");

                Log.Comment("Leaving the pointer exited area");

                readTabViewWidthButton.Click();
                Wait.ForIdle();

                Log.Comment("Verify correct TabView width");
                Verify.IsTrue(Math.Abs(GetActualTabViewWidth() - 283) < pixelTolerance);
            }

            void CloseTabAndVerifyWidth(string tabName, int expectedValue, string expectedScrollbuttonStates)
            {
                Log.Comment("Closing tab:" + tabName);
                FindCloseButton(FindElement.ByName(tabName)).Click();
                Wait.ForIdle();
                Log.Comment("Verifying TabView width");
                Verify.IsTrue(Math.Abs(GetActualTabViewWidth() - expectedValue) < pixelTolerance);
                Verify.AreEqual(expectedScrollbuttonStates, FindElement.ByName("ScrollButtonStatus").GetText());

            }

            double GetActualTabViewWidth()
            {
                var tabviewWidth = new TextBlock(FindElement.ByName("TabViewWidth"));

                return Double.Parse(tabviewWidth.GetText());
            }
        }

void VerifySizingBehaviorOnTabCloseComingFromScroll ( ) [inline]

Definition at line 793 of file TabViewTests.cs.

        {
            int pixelTolerance = 10;

            using (var setup = new TestSetupHelper(new[] { "TabView Tests", "TabViewTabClosingBehaviorButton" }))
            {

                Log.Comment("Verifying sizing behavior when closing a tab");
                CloseTabAndVerifyWidth("Tab 1", 500, "True;False;");

                CloseTabAndVerifyWidth("Tab 2", 500, "True;False;");

                CloseTabAndVerifyWidth("Tab 3", 500, "False;False;");

                CloseTabAndVerifyWidth("Tab 5", 430, "False;False;");

                CloseTabAndVerifyWidth("Tab 4", 450, "False;False;");

                Log.Comment("Leaving the pointer exited area");
                var readTabViewWidthButton = new Button(FindElement.ByName("GetActualWidthButton"));
                readTabViewWidthButton.Click();
                Wait.ForIdle();

                readTabViewWidthButton.Click();
                Wait.ForIdle();

                Log.Comment("Verify correct TabView width");
                Verify.IsTrue(Math.Abs(GetActualTabViewWidth() - 283) < pixelTolerance);
            }

            void CloseTabAndVerifyWidth(string tabName, int expectedValue, string expectedScrollbuttonStates)
            {
                Log.Comment("Closing tab:" + tabName);
                FindCloseButton(FindElement.ByName(tabName)).Click();
                Wait.ForIdle();
                Log.Comment("Verifying TabView width -- expected " + expectedValue + ", actual " + GetActualTabViewWidth());
                Verify.IsTrue(Math.Abs(GetActualTabViewWidth() - expectedValue) < pixelTolerance);
                Verify.AreEqual(expectedScrollbuttonStates, FindElement.ByName("ScrollButtonStatus").GetText());

            }

            double GetActualTabViewWidth()
            {
                var tabviewWidth = new TextBlock(FindElement.ByName("TabViewWidth"));

                Log.Comment("TabView width:" + tabviewWidth.GetText());
                return Double.Parse(tabviewWidth.GetText());
            }
        }

void VerifySpaceAllocatedWhenDraggingFromOutsideTabView ( ) [inline]

Definition at line 1062 of file TabViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TabView Tests", "MultipleTabViewPageButton" }))
            {
                static void VerifyAddButtonMoves(UIObject tabToDrag, UIObject tabToDragTo, UIObject addButton)
                {
                    Log.Comment($"Drag {tabToDrag.Name} over {tabToDragTo.Name} and confirm that the add button moves to make room.");
                    var initialPoint = addButton.GetClickablePoint();

                    InputHelper.LeftMouseButtonDown(tabToDrag);
                    InputHelper.MoveMouse(tabToDragTo.GetClickablePoint());

                    Verify.IsGreaterThan(addButton.GetClickablePoint().X, initialPoint.X);

                    InputHelper.LeftMouseButtonUp();
                }

                var firstTabView = FindElement.ByName("FirstTabView");
                var firstTabViewFirstTab = FindElement.ByName("Item0");
                var firstTabViewSecondTab = FindElement.ByName("Item1");
                var firstTabViewThirdTab = FindElement.ByName("Item2");
                var secondTabView = FindElement.ByName("SecondTabView");
                var secondTabViewTab = FindElement.ByName("Item4");
                var secondTabViewAddButton = secondTabView.Descendants.Find("AddButton");
                var compactTabView = FindElement.ByName("CompactTabView");
                var compactTabViewTab = FindElement.ByName("Item5");
                var compactTabViewAddButton = compactTabView.Descendants.Find("AddButton");
                var sizeToContentTabView = FindElement.ByName("SizeToContentTabView");
                var sizeToContentTabViewTab = FindElement.ByName("Item6");
                var sizeToContentTabViewAddButton = sizeToContentTabView.Descendants.Find("AddButton");

                VerifyAddButtonMoves(firstTabViewFirstTab, secondTabViewTab, secondTabViewAddButton);
                VerifyAddButtonMoves(firstTabViewSecondTab, compactTabViewTab, compactTabViewAddButton);
                VerifyAddButtonMoves(firstTabViewThirdTab, sizeToContentTabViewTab, sizeToContentTabViewAddButton);
            }
        }

Member Data Documentation

readonly UICondition _primaryWindowCondition [static, private]
Initial value:
            UICondition.CreateFromName("MUXControlsTestApp.Desktop")

Definition at line 1299 of file TabViewTests.cs.

readonly UICondition _secondaryWindowCondition [static, private]
Initial value:
            UICondition.CreateFromName("MUXControlsTestApp.Desktop - Secondary TabViewTearOutWindow")

Definition at line 1302 of file TabViewTests.cs.

readonly UICondition _tabCondition [static, private]
Initial value:
            UICondition.CreateFromClassName("ListViewItem")

Definition at line 1308 of file TabViewTests.cs.

readonly UICondition _tabViewCondition [static, private]
Initial value:
            UICondition.CreateFromName("TearOutTabsTabView")

Definition at line 1305 of file TabViewTests.cs.

The documentation for this class was generated from the following file:
  • TabView/InteractionTests/TabViewTests.cs
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipFocusTestPageElements Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TeachingTipFocusTestPageElements
Public Member Functions | Private Member Functions | Private Attributes

TeachingTipFocusTestPageElements Class Reference

List of all members.

Public Member Functions

Button | GetCloseButton ()
CheckBox | GetIsIdleCheckBox ()
CheckBox | GetIsLightDismissEnabledCheckBox ()
CheckBox | GetIsOpenCheckBox ()
Button | GetOpenButton ()
UIObject | GetTeachingTipCloseButton ()

Private Member Functions

T | GetElement< T > (ref T element, string elementName)

Private Attributes

Button | closeButton
CheckBox | isIdleCheckBox
CheckBox | isLightDismissEnabledCheckBox
CheckBox | isOpenCheckBox
Button | openButton
UIObject | teachingTipCloseButton

Detailed Description

Definition at line 18 of file TeachingTipFocusTestPageElements.cs.

Member Function Documentation

Button GetCloseButton ( ) [inline]

Definition at line 26 of file TeachingTipFocusTestPageElements.cs.

        {
            return GetElement(ref closeButton, "CloseButton");
        }

T GetElement< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
CheckBox GetIsIdleCheckBox ( ) [inline]

Definition at line 38 of file TeachingTipFocusTestPageElements.cs.

        {
            return GetElement(ref isIdleCheckBox, "IsIdleCheckBox");
        }

CheckBox GetIsLightDismissEnabledCheckBox ( ) [inline]

Definition at line 44 of file TeachingTipFocusTestPageElements.cs.

        {
            return GetElement(ref isLightDismissEnabledCheckBox, "IsLightDismissEnabledCheckBox");
        }

CheckBox GetIsOpenCheckBox ( ) [inline]

Definition at line 32 of file TeachingTipFocusTestPageElements.cs.

        {
            return GetElement(ref isOpenCheckBox, "IsOpenCheckBox");
        }

Button GetOpenButton ( ) [inline]

Definition at line 20 of file TeachingTipFocusTestPageElements.cs.

        {
            return GetElement(ref openButton, "OpenButton");
        }

UIObject GetTeachingTipCloseButton ( ) [inline]

Definition at line 50 of file TeachingTipFocusTestPageElements.cs.

        {
            ElementCache.Clear();
            var element = GetElement(ref teachingTipCloseButton, "Close TeachingTip");
            teachingTipCloseButton = null;
            return element;
        }

Member Data Documentation

Button closeButton [private]

Definition at line 30 of file TeachingTipFocusTestPageElements.cs.

CheckBox isIdleCheckBox [private]

Definition at line 42 of file TeachingTipFocusTestPageElements.cs.

CheckBox isLightDismissEnabledCheckBox [private]

Definition at line 48 of file TeachingTipFocusTestPageElements.cs.

CheckBox isOpenCheckBox [private]

Definition at line 36 of file TeachingTipFocusTestPageElements.cs.

Button openButton [private]

Definition at line 24 of file TeachingTipFocusTestPageElements.cs.

UIObject teachingTipCloseButton [private]

Definition at line 57 of file TeachingTipFocusTestPageElements.cs.

The documentation for this class was generated from the following file:
  • TeachingTip/InteractionTests/TeachingTipFocusTestPageElements.cs
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipTestPageElements Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TeachingTipTestPageElements
Public Types | Public Member Functions | Private Member Functions | Private Attributes

TeachingTipTestPageElements Class Reference

List of all members.

Public Types

enum | AutomationNameOptions { VisualTree, Resources, None }
enum | CloseButtonContentOptions { NoText, ShortText, LongText }
enum | HeroContentOptions { RedSquare, BlueSquare, Image, NoContent }
enum | IconOptions { People, NoIcon }
enum PlacementOptions {
Top, Bottom, Left, Right,
TopRight, TopLeft, BottomRight, BottomLeft,
LeftTop, LeftBottom, RightTop, RightBottom,
Center, Auto
}
enum | SubtitleContentOptions { No, Small, Long }
enum | TipLocationOptions { ResourceDictionary, VisualTree }
enum | TitleContentOptions { No, Small, Long }

Public Member Functions

ComboBox | GetActionButtonContentComboBox ()
ComboBox | GetAutomationNameComboBox ()
Button | GetBringTargetIntoViewButton ()
Button | GetBtnClearTeachingTipEvents ()
Button | GetCloseButton ()
ComboBox | GetCloseButtonContentComboBox ()
TextBlock | GetEffectiveForegroundOfTeachingTipButtonTextBlock ()
TextBlock | GetEffectiveForegroundOfTeachingTipContentTextBlock ()
TextBlock | GetEffectivePlacementTextBlock ()
ComboBox | GetHeroContentComboBox ()
ComboBox | GetIconComboBox ()
CheckBox | GetIsIdleCheckBox ()
Button | GetIsLightDismissEnabledButton ()
ComboBox | GetIsLightDismissEnabledComboBox ()
CheckBox | GetIsOpenCheckBox ()
ListBox | GetLstTeachingTipEvents ()
Button | GetOpenTeachingTipOnEdgeButton ()
CheckBox | GetPageRTLCheckbox ()
TextBlock | GetPopupVerticalOffsetTextBlock ()
ComboBox | GetPreferredPlacementComboBox ()
Button | GetRemoveOpenButtonFromVisualTreeButton ()
Button | GetRemoveTargetButton ()
Button | GetRemoveTeachingTipButton ()
CheckBox | GetReturnTopForOutOfWindowPlacementCheckBox ()
Button | GetScrollViewerOffsetButton ()
Edit | GetScrollViewerOffsetTextBox ()
TextBlock | GetScrollViewerStateTextBox ()
Button | GetSetActionButtonContentButton ()
Button | GetSetAutomationNameButton ()
Button | GetSetCloseButtonContentButton ()
Button | GetSetHeroContentButton ()
Button | GetSetIconButton ()
Button | GetSetPreferredPlacementButton ()
Button | GetSetSubtitleButton ()
Button | GetSetTargetButton ()
Button | GetSetTipLocationButton ()
Button | GetSetTitleButton ()
Button | GetShouldConstrainToRootBoundsButton ()
ComboBox | GetShouldConstrainToRootBoundsComboBox ()
Button | GetShowButton ()
ComboBox | GetSubtitleComboBox ()
UIObject | GetSubtitleVisibilityTextBlock ()
Button | GetSwitchTargetButton ()
Button | GetTargetBoundsButton ()
TextBlock | GetTargetHeightTextBlock ()
TextBlock | GetTargetWidthTextBlock ()
TextBlock | GetTargetXOffsetTextBlock ()
TextBlock | GetTargetYOffsetTextBlock ()
UIObject | GetTeachingTipAlternateCloseButton ()
UIObject | GetTeachingTipCloseButton ()
TextBlock | GetTeachingTipContent ()
CheckBox | GetTeachingTipContentUnloadedCheck ()
double | GetTeachingTipOnEdgeHorizontalOffset ()
Button | GetTeachingTipOnEdgeOffsetButton ()
TextBlock | GetTeachingTipOnEdgeOffsetTextblock ()
double | GetTeachingTipOnEdgeVerticalOffset ()
Edit | GetTestScreenBoundsHeightTextBox ()
Edit | GetTestScreenBoundsWidthTextBox ()
Edit | GetTestScreenBoundsXTextBox ()
Edit | GetTestScreenBoundsYTextBox ()
Edit | GetTestWindowBoundsHeightTextBox ()
Edit | GetTestWindowBoundsWidthTextBox ()
Edit | GetTestWindowBoundsXTextBox ()
Edit | GetTestWindowBoundsYTextBox ()
ComboBox | GetThemingComboBox ()
CheckBox | GetTipFollowsTargetCheckBox ()
ComboBox | GetTipLocationComboBox ()
TextBlock | GetTipWidthTextBlock ()
ComboBox | GetTitleComboBox ()
UIObject | GetTitleVisibilityTextBlock ()
CheckBox | GetUseTestScreenBoundsCheckbox ()
CheckBox | GetUseTestWindowBoundsCheckbox ()

Private Member Functions

T | GetElement< T > (ref T element, string elementName)

Private Attributes

ComboBox | actionButtonContentComboBox
ComboBox | automationNameComboBox
Button | bringTargetIntoViewButton
Button | btnClearTeachingTipEvents
Button | closeButton
ComboBox | closeButtonContentComboBox
TextBlock | effectiveForegroundOfTeachingTipButtonTextBlock
TextBlock | effectiveForegroundOfTeachingTipContentTextBlock
Button | effectiveOpenTeachingTipOnEdgeButton
CheckBox | effectivePageRTLCheckbox
TextBlock | effectivePlacementTextBlock
Button | effectiveRemoveOpenButton
Button | effectiveRemoveTeachingTipButton
TextBlock | effectiveTeachingTipContent
CheckBox | effectiveTeachingTipContentUnloadedCheckbox
Button | effectiveTeachingTipOnEdgeOffsetButton
TextBlock | effectiveTeachingTipOnEdgeOffsetTextblock
ComboBox | heroContentComboBox
ComboBox | iconComboBox
CheckBox | isIdleCheckBox
Button | isLightDismissEnabledButton
ComboBox | isLightDismissEnabledComboBox
CheckBox | isOpenCheckBox
ListBox | lstTeachingTipEvents
TextBlock | popupVerticalOffsetTextBlock
ComboBox | preferredPlacementComboBox
Button | removeTargetButton
CheckBox | returnTopForOutOfWindowPlacementCheckBox
Button | scrollViewerOffsetButton
Edit | scrollViewerOffsetTextBox
TextBlock | scrollViewerStateTextBox
Button | setActionContentButton
Button | setAutomationNameButton
Button | setCloseButtonContentButton
Button | setHeroContentButton
Button | setIconButton
Button | setPreferredPlacementButton
Button | setSubtitleButton
Button | setTargetButton
Button | setTipLocationButton
Button | setTitleButton
Button | shouldConstrainToRootBoundsButton
ComboBox | shouldConstrainToRootBoundsComboBox
Button | showButton
ComboBox | subtitleComboBox
UIObject | subtitleVisibilityTextBlock
Button | SwitchTargetButton
Button | targetBoundsButton
TextBlock | targetHeightTextBlock
TextBlock | targetWidthTextBlock
TextBlock | targetXOffsetTextBlock
TextBlock | targetYOffsetTextBlock
UIObject | teachingTipAlternateCloseButton
UIObject | teachingTipCloseButton
Edit | testScreenBoundsHeightTextBox
Edit | testScreenBoundsWidthTextBox
Edit | testScreenBoundsXTextBox
Edit | testScreenBoundsYTextBox
Edit | testWindowBoundsHeightTextBox
Edit | testWindowBoundsWidthTextBox
Edit | testWindowBoundsXTextBox
Edit | testWindowBoundsYTextBox
ComboBox | themingComboBox
CheckBox | tipFollowsTargetCheckBox
ComboBox | tipLocationComboBox
TextBlock | tipWidthTextBlock
ComboBox | titleComboBox
UIObject | titleVisibilityTextBlock
CheckBox | useTestScreenBoundsCheckbox
CheckBox | useTestWindowBoundsCheckbox

Detailed Description

Definition at line 21 of file TeachingTipTestPageElements.cs.

Member Enumeration Documentation

enum AutomationNameOptions
Enumerator:
VisualTree
Resources
None

Definition at line 528 of file TeachingTipTestPageElements.cs.

        {
            VisualTree,
            Resources,
            None
        }

enum CloseButtonContentOptions
Enumerator:
NoText
ShortText
LongText

Definition at line 521 of file TeachingTipTestPageElements.cs.

        {
            NoText,
            ShortText,
            LongText
        }

enum HeroContentOptions
Enumerator:
RedSquare
BlueSquare
Image
NoContent

Definition at line 487 of file TeachingTipTestPageElements.cs.

        {
            RedSquare,
            BlueSquare,
            Image,
            NoContent
        }

enum IconOptions
Enumerator:
People
NoIcon

Definition at line 509 of file TeachingTipTestPageElements.cs.

        {
            People,
            NoIcon
        }

enum PlacementOptions
Enumerator:
Top
Bottom
Left
Right
TopRight
TopLeft
BottomRight
BottomLeft
LeftTop
LeftBottom
RightTop
RightBottom
Center
Auto

Definition at line 469 of file TeachingTipTestPageElements.cs.

        {
            Top,
            Bottom,
            Left,
            Right,
            TopRight,
            TopLeft,
            BottomRight,
            BottomLeft,
            LeftTop,
            LeftBottom,
            RightTop,
            RightBottom,
            Center,
            Auto
        }

enum SubtitleContentOptions
Enumerator:
No
Small
Long

Definition at line 502 of file TeachingTipTestPageElements.cs.

        {
            No,
            Small,
            Long
        }

enum TipLocationOptions
Enumerator:
ResourceDictionary
VisualTree

Definition at line 515 of file TeachingTipTestPageElements.cs.

        {
            ResourceDictionary,
            VisualTree
        }

enum TitleContentOptions
Enumerator:
No
Small
Long

Definition at line 495 of file TeachingTipTestPageElements.cs.

        {
            No,
            Small,
            Long
        }

Member Function Documentation

ComboBox GetActionButtonContentComboBox ( ) [inline]

Definition at line 329 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref actionButtonContentComboBox, "ActionButtonContentComboBox");
        }

ComboBox GetAutomationNameComboBox ( ) [inline]

Definition at line 377 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref automationNameComboBox, "AutomationNameComboBox");
        }

Button GetBringTargetIntoViewButton ( ) [inline]

Definition at line 275 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref bringTargetIntoViewButton, "BringTargetIntoViewButton");
        }

Button GetBtnClearTeachingTipEvents ( ) [inline]

Definition at line 29 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref btnClearTeachingTipEvents, "btnClearTeachingTipEvents");
        }

Button GetCloseButton ( ) [inline]

Definition at line 257 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref closeButton, "CloseButton");
        }

ComboBox GetCloseButtonContentComboBox ( ) [inline]

Definition at line 221 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref closeButtonContentComboBox, "CloseButtonContentComboBox");
        }

TextBlock GetEffectiveForegroundOfTeachingTipButtonTextBlock ( ) [inline]

Definition at line 389 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveForegroundOfTeachingTipButtonTextBlock, "EffectiveForegroundOfTeachingTipButton");
        }

TextBlock GetEffectiveForegroundOfTeachingTipContentTextBlock ( ) [inline]

Definition at line 395 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveForegroundOfTeachingTipContentTextBlock, "EffectiveForegroundOfTeachingTipContent");
        }

TextBlock GetEffectivePlacementTextBlock ( ) [inline]

Definition at line 47 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectivePlacementTextBlock, "EffectivePlacementTextBlock");
        }

T GetElement< T > | ( | ref T | element,
 |  | string | elementName |
 | ) |  |  | [inline, private]
Type Constraints
T : UIObject
ComboBox GetHeroContentComboBox ( ) [inline]

Definition at line 173 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref heroContentComboBox, "HeroContentComboBox");
        }

ComboBox GetIconComboBox ( ) [inline]

Definition at line 317 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref iconComboBox, "IconComboBox");
        }

CheckBox GetIsIdleCheckBox ( ) [inline]

Definition at line 269 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref isIdleCheckBox, "IsIdleCheckBox");
        }

Button GetIsLightDismissEnabledButton ( ) [inline]

Definition at line 233 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref isLightDismissEnabledButton, "IsLightDismissEnabledButton");
        }

ComboBox GetIsLightDismissEnabledComboBox ( ) [inline]

Definition at line 215 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref isLightDismissEnabledComboBox, "IsLightDismissEnabledComboBox");
        }

CheckBox GetIsOpenCheckBox ( ) [inline]

Definition at line 263 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref isOpenCheckBox, "IsOpenCheckBox");
        }

ListBox GetLstTeachingTipEvents ( ) [inline]

Definition at line 23 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref lstTeachingTipEvents, "lstTeachingTipEvents");
        }

Button GetOpenTeachingTipOnEdgeButton ( ) [inline]

Definition at line 431 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveOpenTeachingTipOnEdgeButton, "TargetButtonRightEdge");
        }

CheckBox GetPageRTLCheckbox ( ) [inline]

Definition at line 419 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectivePageRTLCheckbox, "PageRTLCheckbox");
        }

TextBlock GetPopupVerticalOffsetTextBlock ( ) [inline]

Definition at line 167 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref popupVerticalOffsetTextBlock, "PopupVerticalOffsetTextBlock");
        }

ComboBox GetPreferredPlacementComboBox ( ) [inline]

Definition at line 185 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref preferredPlacementComboBox, "PreferredPlacementComboBox");
        }

Button GetRemoveOpenButtonFromVisualTreeButton ( ) [inline]

Definition at line 425 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveRemoveOpenButton, "RemoveButtonFromVisualTreeButton");
        }

Button GetRemoveTargetButton ( ) [inline]

Definition at line 203 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref removeTargetButton, "RemoveTargetButton");
        }

Button GetRemoveTeachingTipButton ( ) [inline]

Definition at line 401 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveRemoveTeachingTipButton, "RemoveTeachingTipButton");
        }

CheckBox GetReturnTopForOutOfWindowPlacementCheckBox ( ) [inline]

Definition at line 287 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref returnTopForOutOfWindowPlacementCheckBox, "ReturnTopForOutOfWindowPlacementCheckBox");
        }

Button GetScrollViewerOffsetButton ( ) [inline]

Definition at line 161 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref scrollViewerOffsetButton, "ScrollViewerOffsetButton");
        }

Edit GetScrollViewerOffsetTextBox ( ) [inline]

Definition at line 155 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref scrollViewerOffsetTextBox, "ScrollViewerOffsetTextBox");
        }

TextBlock GetScrollViewerStateTextBox ( ) [inline]

Definition at line 149 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref scrollViewerStateTextBox, "ScrollViewerStateTextBox");
        }

Button GetSetActionButtonContentButton ( ) [inline]

Definition at line 335 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setActionContentButton, "SetActionContentButton");
        }

Button GetSetAutomationNameButton ( ) [inline]

Definition at line 383 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setAutomationNameButton, "SetAutomationNameButton");
        }

Button GetSetCloseButtonContentButton ( ) [inline]

Definition at line 227 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setCloseButtonContentButton, "SetCloseButtonContentButton");
        }

Button GetSetHeroContentButton ( ) [inline]

Definition at line 179 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setHeroContentButton, "SetHeroContentButton");
        }

Button GetSetIconButton ( ) [inline]

Definition at line 323 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setIconButton, "SetIconButton");
        }

Button GetSetPreferredPlacementButton ( ) [inline]

Definition at line 191 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setPreferredPlacementButton, "SetPreferredPlacementButton");
        }

Button GetSetSubtitleButton ( ) [inline]

Definition at line 311 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setSubtitleButton, "SetSubtitleButton");
        }

Button GetSetTargetButton ( ) [inline]

Definition at line 197 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setTargetButton, "SetTargetButton");
        }

Button GetSetTipLocationButton ( ) [inline]

Definition at line 41 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setTipLocationButton, "SetTipLocationButton");
        }

Button GetSetTitleButton ( ) [inline]

Definition at line 299 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref setTitleButton, "SetTitleButton");
        }

Button GetShouldConstrainToRootBoundsButton ( ) [inline]

Definition at line 245 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref shouldConstrainToRootBoundsButton, "ShouldConstrainToRootBoundsButton");
        }

ComboBox GetShouldConstrainToRootBoundsComboBox ( ) [inline]

Definition at line 239 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref shouldConstrainToRootBoundsComboBox, "ShouldConstrainToRootBoundsComboBox");
        }

Button GetShowButton ( ) [inline]

Definition at line 251 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref showButton, "ShowButton");
        }

ComboBox GetSubtitleComboBox ( ) [inline]

Definition at line 305 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref subtitleComboBox, "SubtitleComboBox");
        }

UIObject GetSubtitleVisibilityTextBlock ( ) [inline]

Definition at line 371 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref subtitleVisibilityTextBlock, "SubtitleVisibilityTextBlock");
        }

Button GetSwitchTargetButton ( ) [inline]

Definition at line 209 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref SwitchTargetButton, "SwitchTargetButton");
        }

Button GetTargetBoundsButton ( ) [inline]

Definition at line 53 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref targetBoundsButton, "GetTargetBoundsButton");
        }

TextBlock GetTargetHeightTextBlock ( ) [inline]

Definition at line 77 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref targetHeightTextBlock, "TargetHeightTextBlock");
        }

TextBlock GetTargetWidthTextBlock ( ) [inline]

Definition at line 71 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref targetWidthTextBlock, "TargetWidthTextBlock");
        }

TextBlock GetTargetXOffsetTextBlock ( ) [inline]

Definition at line 59 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref targetXOffsetTextBlock, "TargetXOffsetTextBlock");
        }

TextBlock GetTargetYOffsetTextBlock ( ) [inline]

Definition at line 65 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref targetYOffsetTextBlock, "TargetYOffsetTextBlock");
        }

UIObject GetTeachingTipAlternateCloseButton ( ) [inline]

Definition at line 347 of file TeachingTipTestPageElements.cs.

        {
            ElementCache.Clear();
            var element = GetElement(ref teachingTipAlternateCloseButton, "Close");
            teachingTipAlternateCloseButton = null;
            return element;
        }

UIObject GetTeachingTipCloseButton ( ) [inline]

Definition at line 356 of file TeachingTipTestPageElements.cs.

        {
            ElementCache.Clear();
            var element = GetElement(ref teachingTipCloseButton, "C:Short Text.");
            teachingTipCloseButton = null;
            return element;
        }

TextBlock GetTeachingTipContent ( ) [inline]

Definition at line 407 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveTeachingTipContent, "TeachingTipContentTextBlock");
        }

CheckBox GetTeachingTipContentUnloadedCheck ( ) [inline]

Definition at line 413 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveTeachingTipContentUnloadedCheckbox, "VisualTreeTeachingTipContentTextBlockUnloaded");
        }

double GetTeachingTipOnEdgeHorizontalOffset ( ) [inline]

Definition at line 449 of file TeachingTipTestPageElements.cs.

        {
            return double.Parse(GetTeachingTipOnEdgeOffsetTextblock().GetText().Split(";")[0]);
        }

Button GetTeachingTipOnEdgeOffsetButton ( ) [inline]

Definition at line 437 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveTeachingTipOnEdgeOffsetButton, "GetEdgeTeachingTipOffset");
        }

TextBlock GetTeachingTipOnEdgeOffsetTextblock ( ) [inline]

Definition at line 443 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref effectiveTeachingTipOnEdgeOffsetTextblock, "EdgeTeachingTipOffset");
        }

double GetTeachingTipOnEdgeVerticalOffset ( ) [inline]

Definition at line 453 of file TeachingTipTestPageElements.cs.

        {
            return double.Parse(GetTeachingTipOnEdgeOffsetTextblock().GetText().Split(";")[1]);
        }

Edit GetTestScreenBoundsHeightTextBox ( ) [inline]

Definition at line 137 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testScreenBoundsHeightTextBox, "TestScreenBoundsHeightTextBox");
        }

Edit GetTestScreenBoundsWidthTextBox ( ) [inline]

Definition at line 131 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testScreenBoundsWidthTextBox, "TestScreenBoundsWidthTextBox");
        }

Edit GetTestScreenBoundsXTextBox ( ) [inline]

Definition at line 119 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testScreenBoundsXTextBox, "TestScreenBoundsXTextBox");
        }

Edit GetTestScreenBoundsYTextBox ( ) [inline]

Definition at line 125 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testScreenBoundsYTextBox, "TestScreenBoundsYTextBox");
        }

Edit GetTestWindowBoundsHeightTextBox ( ) [inline]

Definition at line 107 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testWindowBoundsHeightTextBox, "TestWindowBoundsHeightTextBox");
        }

Edit GetTestWindowBoundsWidthTextBox ( ) [inline]

Definition at line 101 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testWindowBoundsWidthTextBox, "TestWindowBoundsWidthTextBox");
        }

Edit GetTestWindowBoundsXTextBox ( ) [inline]

Definition at line 89 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testWindowBoundsXTextBox, "TestWindowBoundsXTextBox");
        }

Edit GetTestWindowBoundsYTextBox ( ) [inline]

Definition at line 95 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref testWindowBoundsYTextBox, "TestWindowBoundsYTextBox");
        }

ComboBox GetThemingComboBox ( ) [inline]

Definition at line 341 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref themingComboBox, "PageThemeComboBox");
        }

CheckBox GetTipFollowsTargetCheckBox ( ) [inline]

Definition at line 281 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref tipFollowsTargetCheckBox, "TipFollowsTargetCheckBox");
        }

ComboBox GetTipLocationComboBox ( ) [inline]

Definition at line 35 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref tipLocationComboBox, "TipLocationComboBox");
        }

TextBlock GetTipWidthTextBlock ( ) [inline]

Definition at line 143 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref tipWidthTextBlock, "TipWidthTextBlock");
        }

ComboBox GetTitleComboBox ( ) [inline]

Definition at line 293 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref titleComboBox, "TitleComboBox");
        }

UIObject GetTitleVisibilityTextBlock ( ) [inline]

Definition at line 365 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref titleVisibilityTextBlock, "TitleVisibilityTextBlock");
        }

CheckBox GetUseTestScreenBoundsCheckbox ( ) [inline]

Definition at line 113 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref useTestScreenBoundsCheckbox, "UseTestScreenBoundsCheckbox");
        }

CheckBox GetUseTestWindowBoundsCheckbox ( ) [inline]

Definition at line 83 of file TeachingTipTestPageElements.cs.

        {
            return GetElement(ref useTestWindowBoundsCheckbox, "UseTestWindowBoundsCheckbox");
        }

Member Data Documentation

ComboBox actionButtonContentComboBox [private]

Definition at line 333 of file TeachingTipTestPageElements.cs.

ComboBox automationNameComboBox [private]

Definition at line 381 of file TeachingTipTestPageElements.cs.

Button bringTargetIntoViewButton [private]

Definition at line 279 of file TeachingTipTestPageElements.cs.

Button btnClearTeachingTipEvents [private]

Definition at line 33 of file TeachingTipTestPageElements.cs.

Button closeButton [private]

Definition at line 261 of file TeachingTipTestPageElements.cs.

ComboBox closeButtonContentComboBox [private]

Definition at line 225 of file TeachingTipTestPageElements.cs.

TextBlock effectiveForegroundOfTeachingTipButtonTextBlock [private]

Definition at line 393 of file TeachingTipTestPageElements.cs.

TextBlock effectiveForegroundOfTeachingTipContentTextBlock [private]

Definition at line 399 of file TeachingTipTestPageElements.cs.

Button effectiveOpenTeachingTipOnEdgeButton [private]

Definition at line 435 of file TeachingTipTestPageElements.cs.

CheckBox effectivePageRTLCheckbox [private]

Definition at line 423 of file TeachingTipTestPageElements.cs.

TextBlock effectivePlacementTextBlock [private]

Definition at line 51 of file TeachingTipTestPageElements.cs.

Button effectiveRemoveOpenButton [private]

Definition at line 429 of file TeachingTipTestPageElements.cs.

Button effectiveRemoveTeachingTipButton [private]

Definition at line 405 of file TeachingTipTestPageElements.cs.

TextBlock effectiveTeachingTipContent [private]

Definition at line 411 of file TeachingTipTestPageElements.cs.

CheckBox effectiveTeachingTipContentUnloadedCheckbox [private]

Definition at line 417 of file TeachingTipTestPageElements.cs.

Button effectiveTeachingTipOnEdgeOffsetButton [private]

Definition at line 441 of file TeachingTipTestPageElements.cs.

TextBlock effectiveTeachingTipOnEdgeOffsetTextblock [private]

Definition at line 447 of file TeachingTipTestPageElements.cs.

ComboBox heroContentComboBox [private]

Definition at line 177 of file TeachingTipTestPageElements.cs.

ComboBox iconComboBox [private]

Definition at line 321 of file TeachingTipTestPageElements.cs.

CheckBox isIdleCheckBox [private]

Definition at line 273 of file TeachingTipTestPageElements.cs.

Button isLightDismissEnabledButton [private]

Definition at line 237 of file TeachingTipTestPageElements.cs.

ComboBox isLightDismissEnabledComboBox [private]

Definition at line 219 of file TeachingTipTestPageElements.cs.

CheckBox isOpenCheckBox [private]

Definition at line 267 of file TeachingTipTestPageElements.cs.

ListBox lstTeachingTipEvents [private]

Definition at line 27 of file TeachingTipTestPageElements.cs.

TextBlock popupVerticalOffsetTextBlock [private]

Definition at line 171 of file TeachingTipTestPageElements.cs.

ComboBox preferredPlacementComboBox [private]

Definition at line 189 of file TeachingTipTestPageElements.cs.

Button removeTargetButton [private]

Definition at line 207 of file TeachingTipTestPageElements.cs.

CheckBox returnTopForOutOfWindowPlacementCheckBox [private]

Definition at line 291 of file TeachingTipTestPageElements.cs.

Button scrollViewerOffsetButton [private]

Definition at line 165 of file TeachingTipTestPageElements.cs.

Edit scrollViewerOffsetTextBox [private]

Definition at line 159 of file TeachingTipTestPageElements.cs.

TextBlock scrollViewerStateTextBox [private]

Definition at line 153 of file TeachingTipTestPageElements.cs.

Button setActionContentButton [private]

Definition at line 339 of file TeachingTipTestPageElements.cs.

Button setAutomationNameButton [private]

Definition at line 387 of file TeachingTipTestPageElements.cs.

Button setCloseButtonContentButton [private]

Definition at line 231 of file TeachingTipTestPageElements.cs.

Button setHeroContentButton [private]

Definition at line 183 of file TeachingTipTestPageElements.cs.

Button setIconButton [private]

Definition at line 327 of file TeachingTipTestPageElements.cs.

Button setPreferredPlacementButton [private]

Definition at line 195 of file TeachingTipTestPageElements.cs.

Button setSubtitleButton [private]

Definition at line 315 of file TeachingTipTestPageElements.cs.

Button setTargetButton [private]

Definition at line 201 of file TeachingTipTestPageElements.cs.

Button setTipLocationButton [private]

Definition at line 45 of file TeachingTipTestPageElements.cs.

Button setTitleButton [private]

Definition at line 303 of file TeachingTipTestPageElements.cs.

Button shouldConstrainToRootBoundsButton [private]

Definition at line 249 of file TeachingTipTestPageElements.cs.

ComboBox shouldConstrainToRootBoundsComboBox [private]

Definition at line 243 of file TeachingTipTestPageElements.cs.

Button showButton [private]

Definition at line 255 of file TeachingTipTestPageElements.cs.

ComboBox subtitleComboBox [private]

Definition at line 309 of file TeachingTipTestPageElements.cs.

UIObject subtitleVisibilityTextBlock [private]

Definition at line 375 of file TeachingTipTestPageElements.cs.

Button SwitchTargetButton [private]

Definition at line 213 of file TeachingTipTestPageElements.cs.

Button targetBoundsButton [private]

Definition at line 57 of file TeachingTipTestPageElements.cs.

TextBlock targetHeightTextBlock [private]

Definition at line 81 of file TeachingTipTestPageElements.cs.

TextBlock targetWidthTextBlock [private]

Definition at line 75 of file TeachingTipTestPageElements.cs.

TextBlock targetXOffsetTextBlock [private]

Definition at line 63 of file TeachingTipTestPageElements.cs.

TextBlock targetYOffsetTextBlock [private]

Definition at line 69 of file TeachingTipTestPageElements.cs.

UIObject teachingTipAlternateCloseButton [private]

Definition at line 354 of file TeachingTipTestPageElements.cs.

UIObject teachingTipCloseButton [private]

Definition at line 363 of file TeachingTipTestPageElements.cs.

Edit testScreenBoundsHeightTextBox [private]

Definition at line 141 of file TeachingTipTestPageElements.cs.

Edit testScreenBoundsWidthTextBox [private]

Definition at line 135 of file TeachingTipTestPageElements.cs.

Edit testScreenBoundsXTextBox [private]

Definition at line 123 of file TeachingTipTestPageElements.cs.

Edit testScreenBoundsYTextBox [private]

Definition at line 129 of file TeachingTipTestPageElements.cs.

Edit testWindowBoundsHeightTextBox [private]

Definition at line 111 of file TeachingTipTestPageElements.cs.

Edit testWindowBoundsWidthTextBox [private]

Definition at line 105 of file TeachingTipTestPageElements.cs.

Edit testWindowBoundsXTextBox [private]

Definition at line 93 of file TeachingTipTestPageElements.cs.

Edit testWindowBoundsYTextBox [private]

Definition at line 99 of file TeachingTipTestPageElements.cs.

ComboBox themingComboBox [private]

Definition at line 345 of file TeachingTipTestPageElements.cs.

CheckBox tipFollowsTargetCheckBox [private]

Definition at line 285 of file TeachingTipTestPageElements.cs.

ComboBox tipLocationComboBox [private]

Definition at line 39 of file TeachingTipTestPageElements.cs.

TextBlock tipWidthTextBlock [private]

Definition at line 147 of file TeachingTipTestPageElements.cs.

ComboBox titleComboBox [private]

Definition at line 297 of file TeachingTipTestPageElements.cs.

UIObject titleVisibilityTextBlock [private]

Definition at line 369 of file TeachingTipTestPageElements.cs.

CheckBox useTestScreenBoundsCheckbox [private]

Definition at line 117 of file TeachingTipTestPageElements.cs.

CheckBox useTestWindowBoundsCheckbox [private]

Definition at line 87 of file TeachingTipTestPageElements.cs.

The documentation for this class was generated from the following file:
  • TeachingTip/InteractionTests/TeachingTipTestPageElements.cs
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TeachingTipTests
Public Member Functions | Static Public Member Functions | Properties | Private Member Functions | Private Attributes

TeachingTipTests Class Reference

List of all members.

Public Member Functions

void | AutomationNameIsForwardedToPopup ()
void | AutoPlacement ()
void | CanSwitchShouldConstrainToRootBounds ()
void | CloseReasonIsAccurate ()
void | F6PutsFocusOnCloseButton ()
void | NoIconDoesNotCrash ()
void | PreviousTargetUnloadingLeavesTeachingTipOpen ()
void | SettingTitleOrSubtitleToEmptyStringCollapsesTextBox ()
void | SpecifiedPlacement ()
void | SpecifiedPlacementRTL ()
void | TargetUnloadingClosesTeachingTip ()
void | TeachingTipRemovalClosesPopup ()
void | TestCleanup ()
void | TestTeachingTipInXamlPage ()
void | TipCanFollowTarget ()
void | TipFollowsTargetOnWindowResize ()
void | TipsWhichDoNotFitDoNotOpen ()
void | VerifyTeachingTipButtonsNameAutomationProperty ()
void | VerifyTeachingTipGetsFocus ()
void | VerifyTeachingTipNotIncludedInTabOrder ()
void | VerifyTeachingTipTargetChange ()
void | VerifyTheming ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Properties

TestContext | TestContext [get, set]

Private Member Functions

void | ClearTeachingTipDebugMessages ()
void | CloseOpenAndCloseWithJustKeyboardViaF6 ()
void | CloseTeachingTipByLightDismiss (bool useEscKey)
void | CloseTeachingTipProgrammatically ()
void | EnableLightDismiss (bool enable)
string | GetEffectivePlacement ()
double | GetScrollViewerVerticalOffset ()
Vector4 | GetTargetBounds ()
ListBoxItem | GetTeachingTipDebugMessage (int index)
double | GetTipVerticalOffset ()
void | OpenTeachingTip ()
void | PressTipCloseButton ()
void | PressXCloseButton ()
void | ScrollBy (double ammount)
void | ScrollTargetIntoView ()
void | SetActionButtonContentTo (string option)
void | SetAutomationName (AutomationNameOptions automationName)
void | SetCloseButtonContent (CloseButtonContentOptions closeButtonContent)
void | SetHeroContent (HeroContentOptions heroContent)
void | SetIcon (IconOptions icon)
void | SetPreferredPlacement (PlacementOptions placement)
void | SetReturnTopForOutOfWindowPlacement (bool returnTopForOutOfWindowPlacement)
void | SetShouldConstrainToRootBounds (bool constrain)
void | SetSubtitle (SubtitleContentOptions subtitle)
void | SetTeachingTipLocation (TipLocationOptions location)
void | SetTipFollowsTarget (bool tipFollowsTarget)
void | SetTipIsTargeted (bool targeted)
void | SetTitle (TitleContentOptions title)
void | TestAutoPlacementForWindowOrScreenBounds (Vector4 targetRect, bool forWindowBounds)
void | TestAutoPlacementForWindowOrScreenBounds (Vector4 targetRect, bool forWindowBounds, string valueOverride)
void | UseF6ToReturnToTestPageToCloseTip ()
void | UseTestBounds (double x, double y, double width, double height, Vector4 targetRect, bool forWindowBounds)
void | UseTestScreenBounds (double x, double y, double width, double height)
void | UseTestWindowBounds (double x, double y, double width, double height)
void | VerifyPlacement (String placement)
bool | WaitForCheckBoxUpdated (CheckBox checkBox, ToggleState state, double millisecondsTimeout, bool throwOnError)
bool | WaitForChecked (CheckBox checkBox, double millisecondsTimeout=2000, bool throwOnError=true)
bool | WaitForOffsetToSettle (Edit text, double millisecondsTimeout, bool failOnError)
int | WaitForOffsetUpdated (double expectedValue, double millisecondsTimeout=defaultAnimatedViewChangeTimeout, bool failOnError=true)
void | WaitForTipClosed ()
void | WaitForTipOpened ()
bool | WaitForUnchecked (CheckBox checkBox, double millisecondsTimeout=2000, bool throwOnError=true)

Private Attributes

const double | defaultAnimatedViewChangeTimeout = 9000
TeachingTipTestPageElements elements

Detailed Description

Definition at line 28 of file TeachingTipTests.cs.

Member Function Documentation

void AutomationNameIsForwardedToPopup ( ) [inline]

Definition at line 996 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                foreach(TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    ScrollBy(10);
                    OpenTeachingTip();
                    Verify.IsNotNull(FindElement.ByNameAndClassName(location == TipLocationOptions.VisualTree ? "TeachingTipInVisualTree" : "TeachingTipInResources", "Popup"));
                    SetAutomationName(AutomationNameOptions.None);
                    Verify.IsNotNull(FindElement.ByNameAndClassName("We've Added Auto Saving!", "Popup"));
                    SetAutomationName(location == TipLocationOptions.VisualTree ? AutomationNameOptions.VisualTree : AutomationNameOptions.Resources);
                    CloseTeachingTipProgrammatically();
                }
            }
        }

void AutoPlacement ( ) [inline]

Definition at line 322 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    ScrollBy(10);
                    var targetRect = GetTargetBounds();
                    TestAutoPlacementForWindowOrScreenBounds(targetRect, true);

                    SetShouldConstrainToRootBounds(false);
                    TestAutoPlacementForWindowOrScreenBounds(targetRect, false, "Top");

                    SetReturnTopForOutOfWindowPlacement(false);
                    TestAutoPlacementForWindowOrScreenBounds(targetRect, false);

                    SetReturnTopForOutOfWindowPlacement(true);
                }
            }
        }

void CanSwitchShouldConstrainToRootBounds ( ) [inline]

Definition at line 788 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();

                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    ScrollBy(10);
                    OpenTeachingTip();
                    CloseTeachingTipProgrammatically();
                    SetShouldConstrainToRootBounds(false);
                    OpenTeachingTip();
                    CloseTeachingTipProgrammatically();
                    SetShouldConstrainToRootBounds(true);
                    OpenTeachingTip();
                    CloseTeachingTipProgrammatically();
                    OpenTeachingTip();
                    SetShouldConstrainToRootBounds(false);
                    CloseTeachingTipProgrammatically();
                    OpenTeachingTip();
                    SetShouldConstrainToRootBounds(true);
                    CloseTeachingTipProgrammatically();
                    OpenTeachingTip();
                    CloseTeachingTipProgrammatically();
                }
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 41 of file TeachingTipTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClearTeachingTipDebugMessages ( ) [inline, private]

Definition at line 1646 of file TeachingTipTests.cs.

        {
            elements.GetBtnClearTeachingTipEvents().InvokeAndWait();
        }

void CloseOpenAndCloseWithJustKeyboardViaF6 ( ) [inline, private]

Definition at line 1217 of file TeachingTipTests.cs.

        {
            KeyboardHelper.PressKey(Key.F6);
            KeyboardHelper.PressKey(Key.Enter);
            WaitForTipClosed();
            KeyboardHelper.PressKey(Key.Enter);
            WaitForTipOpened();
            KeyboardHelper.PressKey(Key.F6);
            KeyboardHelper.PressKey(Key.Enter);
            WaitForTipClosed();
        }

void CloseReasonIsAccurate ( ) [inline]

Definition at line 56 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    OpenTeachingTip();
                    CloseTeachingTipProgrammatically();
                    var message0 = GetTeachingTipDebugMessage(0);
                    var message1 = GetTeachingTipDebugMessage(1);
                    Verify.IsTrue(message0.ToString().Contains("Closing"));
                    Verify.IsTrue(message0.ToString().Contains("Programmatic"));
                    Verify.IsTrue(message1.ToString().Contains("Closed"));
                    Verify.IsTrue(message1.ToString().Contains("Programmatic"));

                    SetHeroContent(HeroContentOptions.NoContent);
                    OpenTeachingTip();
                    PressXCloseButton();
                    var message2 = GetTeachingTipDebugMessage(2);
                    var message3 = GetTeachingTipDebugMessage(3);
                    var message4 = GetTeachingTipDebugMessage(4);
                    Verify.IsTrue(message2.ToString().Contains("Close Button Clicked"));
                    Verify.IsTrue(message3.ToString().Contains("Closing"));
                    Verify.IsTrue(message3.ToString().Contains("CloseButton"));
                    Verify.IsTrue(message4.ToString().Contains("Closed"));
                    Verify.IsTrue(message4.ToString().Contains("CloseButton"));

                    EnableLightDismiss(true);
                    OpenTeachingTip();
                    CloseTeachingTipProgrammatically();
                    var message5 = GetTeachingTipDebugMessage(5);
                    var message6 = GetTeachingTipDebugMessage(6);
                    Verify.IsTrue(message5.ToString().Contains("Closing"));
                    Verify.IsTrue(message5.ToString().Contains("Programmatic"));
                    Verify.IsTrue(message6.ToString().Contains("Closed"));
                    Verify.IsTrue(message6.ToString().Contains("Programmatic"));

                    OpenTeachingTip();
                    CloseTeachingTipByLightDismiss(useEscKey: false);
                    var message7 = GetTeachingTipDebugMessage(7);
                    var message8 = GetTeachingTipDebugMessage(8);
                    Verify.IsTrue(message7.ToString().Contains("Closing"));
                    Verify.IsTrue(message7.ToString().Contains("LightDismiss"));
                    Verify.IsTrue(message8.ToString().Contains("Closed"));
                    Verify.IsTrue(message8.ToString().Contains("LightDismiss"));

                    OpenTeachingTip();
                    CloseTeachingTipByLightDismiss(useEscKey: true);
                    var message9 = GetTeachingTipDebugMessage(9);
                    var message10 = GetTeachingTipDebugMessage(10);
                    Verify.IsTrue(message9.ToString().Contains("Closing"));
                    Verify.IsTrue(message9.ToString().Contains("LightDismiss"));
                    Verify.IsTrue(message10.ToString().Contains("Closed"));
                    Verify.IsTrue(message10.ToString().Contains("LightDismiss"));

                    SetCloseButtonContent(CloseButtonContentOptions.ShortText);
                    OpenTeachingTip();
                    PressTipCloseButton();
                    var message11 = GetTeachingTipDebugMessage(11);
                    var message12 = GetTeachingTipDebugMessage(12);
                    var message13 = GetTeachingTipDebugMessage(13);
                    Verify.IsTrue(message11.ToString().Contains("Close Button Clicked"));
                    Verify.IsTrue(message12.ToString().Contains("Closing"));
                    Verify.IsTrue(message12.ToString().Contains("CloseButton"));
                    Verify.IsTrue(message13.ToString().Contains("Closed"));
                    Verify.IsTrue(message13.ToString().Contains("CloseButton"));

                    ClearTeachingTipDebugMessages();
                }
            }
        }

void CloseTeachingTipByLightDismiss ( bool useEscKey ) [inline, private]

Definition at line 1263 of file TeachingTipTests.cs.

        {
            if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.Off)
            {
                if (useEscKey)
                {
                    KeyboardHelper.PressKey(Key.Escape);
                }
                else
                {
                    InputHelper.LeftClick(elements.GetActionButtonContentComboBox());
                }

                WaitForTipClosed();
            }
        }

void CloseTeachingTipProgrammatically ( ) [inline, private]

Definition at line 1254 of file TeachingTipTests.cs.

        {
            if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.Off)
            {
                elements.GetCloseButton().InvokeAndWait();
                WaitForTipClosed();
            }
        }

void EnableLightDismiss ( bool enable ) [inline, private]

Definition at line 1329 of file TeachingTipTests.cs.

        {
            if(enable)
            {
                elements.GetIsLightDismissEnabledComboBox().SelectItemByName("True");
            }
            else
            {
                elements.GetIsLightDismissEnabledComboBox().SelectItemByName("False");
            }
            elements.GetIsLightDismissEnabledButton().InvokeAndWait();
        }

void F6PutsFocusOnCloseButton ( ) [inline]

Definition at line 1020 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                ScrollTargetIntoView();
                ScrollBy(10);
                OpenTeachingTip();
                CloseOpenAndCloseWithJustKeyboardViaF6();
                SetCloseButtonContent(CloseButtonContentOptions.ShortText);
                OpenTeachingTip();
                CloseOpenAndCloseWithJustKeyboardViaF6();
                OpenTeachingTip();
                UseF6ToReturnToTestPageToCloseTip();
                SetCloseButtonContent(CloseButtonContentOptions.NoText);
            }
        }

string GetEffectivePlacement ( ) [inline, private]

Definition at line 1593 of file TeachingTipTests.cs.

        {
            try
            {
                // The first call to this can sometimes return a stale value or throw an exception (E_UNEXPECTED)
                // on older OSes like RS3 and earlier. Call it once and ignore the value, then call it again seems
                // to be all that's needed to work around. Presumably this is happening because the app is changing
                // the TextBlock's value in quick succession and there's either a UIA caching bug or a XAML framework
                // issue that has since been fixed.
                elements.GetEffectivePlacementTextBlock().GetText();
            }
            catch { }
            return elements.GetEffectivePlacementTextBlock().GetText();
        }

double GetScrollViewerVerticalOffset ( ) [inline, private]

Definition at line 1507 of file TeachingTipTests.cs.

        {
            return double.Parse(elements.GetScrollViewerOffsetTextBox().GetText());
        }

Vector4 GetTargetBounds ( ) [inline, private]

Definition at line 1581 of file TeachingTipTests.cs.

        {
            elements.GetTargetBoundsButton().InvokeAndWait();

            var retVal = new Vector4();
            retVal.W = (int)Math.Floor(double.Parse(elements.GetTargetXOffsetTextBlock().GetText()));
            retVal.X = (int)Math.Floor(double.Parse(elements.GetTargetYOffsetTextBlock().GetText()));
            retVal.Y = (int)Math.Floor(double.Parse(elements.GetTargetWidthTextBlock().GetText()));
            retVal.Z = (int)Math.Floor(double.Parse(elements.GetTargetHeightTextBlock().GetText()));
            return retVal;
        }

ListBoxItem GetTeachingTipDebugMessage ( int index ) [inline, private]

Definition at line 1635 of file TeachingTipTests.cs.

        {
            var count = elements.GetLstTeachingTipEvents().Items.Count;
            if (count <= index)
            {
                Log.Comment($"TeachingTipEvents list only has {count} items, waiting a little bit longer to see if they show up");
                Task.Delay(TimeSpan.FromMilliseconds(250)).Wait();
            }
            return elements.GetLstTeachingTipEvents().Items[index];
        }

double GetTipVerticalOffset ( ) [inline, private]

Definition at line 1502 of file TeachingTipTests.cs.

        {
            return double.Parse(elements.GetPopupVerticalOffsetTextBlock().GetText());
        }

void NoIconDoesNotCrash ( ) [inline]

Definition at line 762 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();

                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    ScrollBy(10);

                    SetIcon(IconOptions.NoIcon);
                    OpenTeachingTip();
                    CloseTeachingTipProgrammatically();
                    SetIcon(IconOptions.People);
                    OpenTeachingTip();
                    SetIcon(IconOptions.NoIcon);
                }
            }
        }

void OpenTeachingTip ( ) [inline, private]

Definition at line 1244 of file TeachingTipTests.cs.

        {
            if(elements.GetIsOpenCheckBox().ToggleState != ToggleState.On)
            {
                elements.GetShowButton().InvokeAndWait();
                WaitForChecked(elements.GetIsOpenCheckBox());
                WaitForChecked(elements.GetIsIdleCheckBox());
            }
        }

void PressTipCloseButton ( ) [inline, private]

Definition at line 1289 of file TeachingTipTests.cs.

        {
            if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.Off)
            {
                InputHelper.LeftClick(elements.GetTeachingTipCloseButton());
                WaitForTipClosed();
            }
        }

void PressXCloseButton ( ) [inline, private]

Definition at line 1280 of file TeachingTipTests.cs.

        {
            if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.Off)
            {
                InputHelper.LeftClick(elements.GetTeachingTipAlternateCloseButton());
                WaitForTipClosed();
            }
        }

void PreviousTargetUnloadingLeavesTeachingTipOpen ( ) [inline]

Definition at line 156 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                elements.GetSetTargetButton().InvokeAndWait();
                elements.GetRemoveTargetButton().InvokeAndWait();
                OpenTeachingTip();

                CheckBox unloadedCheckbox = elements.GetTeachingTipContentUnloadedCheck();
                Verify.IsTrue(unloadedCheckbox.ToggleState == ToggleState.Off);

                // Removing target button from visual tree
                Button remove = elements.GetRemoveOpenButtonFromVisualTreeButton();
                remove.InvokeAndWait();

                // We expect the teaching tip to still be upon since it has no target
                Verify.IsTrue(unloadedCheckbox.ToggleState == ToggleState.Off);
            }
        }

void ScrollBy ( double ammount ) [inline, private]

Definition at line 1512 of file TeachingTipTests.cs.

        {
            double initialOffset = double.Parse(elements.GetScrollViewerOffsetTextBox().GetText());
            elements.GetScrollViewerOffsetTextBox().SetValue((initialOffset + ammount).ToString());
            elements.GetScrollViewerOffsetButton().InvokeAndWait();
        }

void ScrollTargetIntoView ( ) [inline, private]

Definition at line 1238 of file TeachingTipTests.cs.

        {
            elements.GetBringTargetIntoViewButton().Invoke();
            Wait.ForIdle();
        }

void SetActionButtonContentTo ( string option ) [inline, private]

Definition at line 1625 of file TeachingTipTests.cs.

        {
            var actionButtonComboBox = elements.GetActionButtonContentComboBox();
            actionButtonComboBox.SelectItemByName(option);
            elements.GetSetActionButtonContentButton().InvokeAndWait();
        }

void SetAutomationName ( AutomationNameOptions automationName ) [inline, private]

Definition at line 1608 of file TeachingTipTests.cs.

        {
            switch(automationName)
            {
                case AutomationNameOptions.VisualTree:
                    elements.GetAutomationNameComboBox().SelectItemByName("TeachingTipInVisualTree");
                    break;
                case AutomationNameOptions.Resources:
                    elements.GetAutomationNameComboBox().SelectItemByName("TeachingTipInResources");
                    break;
                default:
                    elements.GetAutomationNameComboBox().SelectItemByName("None");
                    break;
            }
            elements.GetSetAutomationNameButton().InvokeAndWait();
        }

void SetCloseButtonContent ( CloseButtonContentOptions closeButtonContent ) [inline, private]

Definition at line 1355 of file TeachingTipTests.cs.

        {
            switch(closeButtonContent)
            {
                case CloseButtonContentOptions.NoText:
                    elements.GetCloseButtonContentComboBox().SelectItemByName("No text");
                    break;
                case CloseButtonContentOptions.ShortText:
                    elements.GetCloseButtonContentComboBox().SelectItemByName("Small text");
                    break;
                case CloseButtonContentOptions.LongText:
                    elements.GetCloseButtonContentComboBox().SelectItemByName("Long text");
                    break;
            }
            elements.GetSetCloseButtonContentButton().InvokeAndWait();
        }

void SetHeroContent ( HeroContentOptions heroContent ) [inline, private]

Definition at line 1422 of file TeachingTipTests.cs.

        {
            switch (heroContent)
            {
                case HeroContentOptions.RedSquare:
                    elements.GetHeroContentComboBox().SelectItemByName("Red Square");
                    break;
                case HeroContentOptions.BlueSquare:
                    elements.GetHeroContentComboBox().SelectItemByName("Blue Square");
                    break;
                case HeroContentOptions.Image:
                    elements.GetHeroContentComboBox().SelectItemByName("Image");
                    break;
                default:
                    elements.GetHeroContentComboBox().SelectItemByName("No Content");
                    break;
            }
            elements.GetSetHeroContentButton().InvokeAndWait();
        }

void SetIcon ( IconOptions icon ) [inline, private]

Definition at line 1488 of file TeachingTipTests.cs.

        {
            switch(icon)
            {
                case IconOptions.People:
                    elements.GetIconComboBox().SelectItemByName("People Icon");
                    break;
                default:
                    elements.GetIconComboBox().SelectItemByName("No Icon");
                    break;
            }
            elements.GetSetIconButton().InvokeAndWait();
        }

void SetPreferredPlacement ( PlacementOptions placement ) [inline, private]

Definition at line 1372 of file TeachingTipTests.cs.

        {
            switch (placement)
            {
                case PlacementOptions.Top:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("Top");
                    break;
                case PlacementOptions.Bottom:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("Bottom");
                    break;
                case PlacementOptions.Left:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("Left");
                    break;
                case PlacementOptions.Right:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("Right");
                    break;
                case PlacementOptions.TopRight:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("TopRight");
                    break;
                case PlacementOptions.TopLeft:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("TopLeft");
                    break;
                case PlacementOptions.BottomRight:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("BottomRight");
                    break;
                case PlacementOptions.BottomLeft:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("BottomLeft");
                    break;
                case PlacementOptions.LeftTop:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("LeftTop");
                    break;
                case PlacementOptions.LeftBottom:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("LeftBottom");
                    break;
                case PlacementOptions.RightTop:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("RightTop");
                    break;
                case PlacementOptions.RightBottom:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("RightBottom");
                    break;
                case PlacementOptions.Center:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("Center");
                    break;
                default:
                    elements.GetPreferredPlacementComboBox().SelectItemByName("Auto");
                    break;
            }
            elements.GetSetPreferredPlacementButton().InvokeAndWait();
        }

void SetReturnTopForOutOfWindowPlacement ( bool returnTopForOutOfWindowPlacement ) [inline, private]

Definition at line 1569 of file TeachingTipTests.cs.

        {
            if (returnTopForOutOfWindowPlacement)
            {
                elements.GetReturnTopForOutOfWindowPlacementCheckBox().Check();
            }
            else
            {
                elements.GetReturnTopForOutOfWindowPlacementCheckBox().Uncheck();
            }
        }

void SetShouldConstrainToRootBounds ( bool constrain ) [inline, private]

Definition at line 1342 of file TeachingTipTests.cs.

        {
            if(constrain)
            {
                elements.GetShouldConstrainToRootBoundsComboBox().SelectItemByName("True");
            }
            else
            {
                elements.GetShouldConstrainToRootBoundsComboBox().SelectItemByName("False");
            }
            elements.GetShouldConstrainToRootBoundsButton().InvokeAndWait();
        }

void SetSubtitle ( SubtitleContentOptions subtitle ) [inline, private]

Definition at line 1459 of file TeachingTipTests.cs.

        {
            switch (subtitle)
            {
                case SubtitleContentOptions.Long:
                    elements.GetSubtitleComboBox().SelectItemByName("Long text");
                    break;
                case SubtitleContentOptions.Small:
                    elements.GetSubtitleComboBox().SelectItemByName("Small text");
                    break;
                case SubtitleContentOptions.No:
                    elements.GetSubtitleComboBox().SelectItemByName("No subtitle");
                    break;
            }
            elements.GetSetSubtitleButton().InvokeAndWait();
        }

void SetTeachingTipLocation ( TipLocationOptions location ) [inline, private]

Definition at line 1310 of file TeachingTipTests.cs.

        {
            switch(location)
            {
                case TipLocationOptions.ResourceDictionary:
                    elements.GetTipLocationComboBox().SelectItemByName("Resources");
                    break;
                default:
                    elements.GetTipLocationComboBox().SelectItemByName("VisualTree");
                    break;
            }
            elements.GetSetTipLocationButton().Invoke();
            //If a tip was open this action would cause that tip to close, so wait until that happens
            WaitForUnchecked(elements.GetIsOpenCheckBox());
            WaitForChecked(elements.GetIsIdleCheckBox());

            SetTipIsTargeted(true);
        }

void SettingTitleOrSubtitleToEmptyStringCollapsesTextBox ( ) [inline]

Definition at line 898 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);
                    ScrollTargetIntoView();
                    OpenTeachingTip();
                    Verify.AreEqual("Visible", elements.GetTitleVisibilityTextBlock().GetText());
                    Verify.AreEqual("Visible", elements.GetSubtitleVisibilityTextBlock().GetText());
                    SetTitle(TitleContentOptions.No);
                    Verify.AreEqual("Collapsed", elements.GetTitleVisibilityTextBlock().GetText());
                    Verify.AreEqual("Visible", elements.GetSubtitleVisibilityTextBlock().GetText());
                    SetSubtitle(SubtitleContentOptions.No);
                    Verify.AreEqual("Collapsed", elements.GetTitleVisibilityTextBlock().GetText());
                    Verify.AreEqual("Collapsed", elements.GetSubtitleVisibilityTextBlock().GetText());
                }
            }
        }

void SetTipFollowsTarget ( bool tipFollowsTarget ) [inline, private]

Definition at line 1557 of file TeachingTipTests.cs.

        {
            if(tipFollowsTarget)
            {
                elements.GetTipFollowsTargetCheckBox().Check();
            }
            else
            {
                elements.GetTipFollowsTargetCheckBox().Uncheck();
            }
        }

void SetTipIsTargeted ( bool targeted ) [inline, private]

Definition at line 1476 of file TeachingTipTests.cs.

        {
            if(targeted)
            {
                elements.GetSetTargetButton().InvokeAndWait();
            }
            else
            {
                elements.GetRemoveTargetButton().InvokeAndWait();
            }
        }

void SetTitle ( TitleContentOptions title ) [inline, private]

Definition at line 1442 of file TeachingTipTests.cs.

        {
            switch(title)
            {
                case TitleContentOptions.Long:
                    elements.GetTitleComboBox().SelectItemByName("Long text");
                    break;
                case TitleContentOptions.Small:
                    elements.GetTitleComboBox().SelectItemByName("Samell text");
                    break;
                case TitleContentOptions.No:
                    elements.GetTitleComboBox().SelectItemByName("No title");
                    break;
            }
            elements.GetSetTitleButton().InvokeAndWait();
        }

void SpecifiedPlacement ( ) [inline]

Definition at line 352 of file TeachingTipTests.cs.

        {
            var tipLocationOptionsStr = this.TestContext.DataRow["TipLocationOptions"] as string;
            TipLocationOptions location = Enum.Parse<TipLocationOptions>(tipLocationOptionsStr);

            var testCaseStr = this.TestContext.DataRow["TestCase"] as string;

            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();

                SetTeachingTipLocation(location);

                ScrollTargetIntoView();
                ScrollBy(10);

                SetHeroContent(HeroContentOptions.NoContent);

                var targetRect = GetTargetBounds();

                // The following might not always work, so repeat.
                UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                switch(testCaseStr)
                {
                    case "1":
                        {
                            // All positions are valid
                            UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("TopRight");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("TopLeft");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("BottomRight");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("BottomLeft");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    case "2":
                        {
                            // Eliminate left of the target
                            UseTestBounds(targetRect.W - 120, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("TopRight");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("BottomRight");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    case "3":
                        {
                            // Eliminate top of the target
                            UseTestBounds(targetRect.W - 500, targetRect.X - 1, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("BottomRight");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("BottomLeft");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    case "4":
                        {
                            // Eliminate right of the target
                            UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 500, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("TopLeft");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("BottomLeft");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Left");
                        }
                        break;
                    case "5":
                        {
                            // Eliminate bottom of target
                            UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 501, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("TopRight");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("TopLeft");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    default:
                        {
                            Verify.Fail($"Unknown TestCase {testCaseStr}");
                        }
                        break;
                }
            }
        }

void SpecifiedPlacementRTL ( ) [inline]

Definition at line 556 of file TeachingTipTests.cs.

        {
            var tipLocationOptionsStr = this.TestContext.DataRow["TipLocationOptions"] as string;
            TipLocationOptions location = Enum.Parse<TipLocationOptions>(tipLocationOptionsStr);

            var testCaseStr = this.TestContext.DataRow["TestCase"] as string;

            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();

                SetTeachingTipLocation(location);

                ScrollTargetIntoView();
                ScrollBy(10);

                elements.GetPageRTLCheckbox().Check();

                SetHeroContent(HeroContentOptions.NoContent);

                var targetRect = GetTargetBounds();

                // The following might not always work, so repeat.
                UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                switch (testCaseStr)
                {
                    case "1":
                        {
                            // All positions are valid
                            UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("TopLeft");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("TopRight");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("BottomLeft");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("BottomRight");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    case "2":
                        {
                            // Eliminate left of the target
                            UseTestBounds(targetRect.W - 120, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("TopRight");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("BottomRight");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    case "3":
                        {
                            // Eliminate top of the target
                            UseTestBounds(targetRect.W - 500, targetRect.X - 1, targetRect.Y + 1000, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("Bottom");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("BottomLeft");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("BottomRight");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    case "4":
                        {
                            // Eliminate right of the target
                            UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 500, targetRect.Z + 1000, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("TopLeft");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("BottomLeft");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Left");
                        }
                        break;
                    case "5":
                        {
                            // Eliminate bottom of target
                            UseTestBounds(targetRect.W - 500, targetRect.X - 500, targetRect.Y + 1000, targetRect.Z + 501, targetRect, true);

                            SetPreferredPlacement(PlacementOptions.Top);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Bottom);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.Left);
                            VerifyPlacement("Right");
                            SetPreferredPlacement(PlacementOptions.Right);
                            VerifyPlacement("Left");
                            SetPreferredPlacement(PlacementOptions.TopRight);
                            VerifyPlacement("TopLeft");
                            SetPreferredPlacement(PlacementOptions.TopLeft);
                            VerifyPlacement("TopRight");
                            SetPreferredPlacement(PlacementOptions.BottomRight);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.BottomLeft);
                            VerifyPlacement("Top");
                            SetPreferredPlacement(PlacementOptions.LeftTop);
                            VerifyPlacement("RightTop");
                            SetPreferredPlacement(PlacementOptions.LeftBottom);
                            VerifyPlacement("RightBottom");
                            SetPreferredPlacement(PlacementOptions.RightTop);
                            VerifyPlacement("LeftTop");
                            SetPreferredPlacement(PlacementOptions.RightBottom);
                            VerifyPlacement("LeftBottom");
                            SetPreferredPlacement(PlacementOptions.Center);
                            VerifyPlacement("Center");
                        }
                        break;
                    default:
                        {
                            Verify.Fail($"Unknown TestCase {testCaseStr}");
                        }
                        break;
                }

                elements.GetPageRTLCheckbox().Uncheck();
            }
        }

void TargetUnloadingClosesTeachingTip ( ) [inline]

Definition at line 134 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                elements.GetSetTargetButton().InvokeAndWait();
                OpenTeachingTip();

                CheckBox unloadedCheckbox = elements.GetTeachingTipContentUnloadedCheck();
                Verify.IsTrue(unloadedCheckbox.ToggleState == ToggleState.Off);

                // Removing target button from visual tree
                Button remove = elements.GetRemoveOpenButtonFromVisualTreeButton();
                remove.InvokeAndWait();

                // Target unloaded, TeachingTip must do the same
                Verify.IsTrue(unloadedCheckbox.ToggleState == ToggleState.On);
            }
        }

void TeachingTipRemovalClosesPopup ( ) [inline]

Definition at line 180 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                ScrollTargetIntoView();
                OpenTeachingTip();

                CheckBox unloadedCheckbox = elements.GetTeachingTipContentUnloadedCheck();
                Verify.IsTrue(unloadedCheckbox.ToggleState == ToggleState.Off);

                // Finding the button to remove the teaching tip
                Button removeButton = elements.GetRemoveTeachingTipButton();

                // Removing teaching tip

                removeButton.InvokeAndWait();
                Verify.IsTrue(unloadedCheckbox.ToggleState == ToggleState.On);
                Verify.IsTrue(elements.GetIsOpenCheckBox().ToggleState == ToggleState.Off);
            }
        }

void TestAutoPlacementForWindowOrScreenBounds | ( | Vector4 | targetRect,
 |  | bool | forWindowBounds |
 | ) |  |  | [inline, private]

Definition at line 945 of file TeachingTipTests.cs.

        {
            TestAutoPlacementForWindowOrScreenBounds(targetRect, forWindowBounds, null);
        }

void TestAutoPlacementForWindowOrScreenBounds | ( | Vector4 | targetRect,
 |  | bool | forWindowBounds,
 |  | string | valueOverride |
 | ) |  |  | [inline, private]

Definition at line 950 of file TeachingTipTests.cs.

        {
            Log.Comment($"TestAutoPlacementForWindowOrScreenBounds {targetRect}, {forWindowBounds}, {valueOverride}");
            UseTestBounds(targetRect.W - 329, targetRect.X - 340, targetRect.Y + 656, targetRect.Z + 680, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "Top");
            UseTestBounds(targetRect.W - 329, targetRect.X - 336, targetRect.Y + 656, targetRect.Z + 680, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "Bottom");
            UseTestBounds(targetRect.W - 329, targetRect.X - 318, targetRect.Y + 659, targetRect.Z + 640, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "LeftTop");
            UseTestBounds(targetRect.W - 329, targetRect.X - 100, targetRect.Y + 659, targetRect.Z + 403, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "LeftBottom");
            UseTestBounds(targetRect.W - 327, targetRect.X - 100, targetRect.Y + 659, targetRect.Z + 403, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "RightBottom");
            UseTestBounds(targetRect.W - 327, targetRect.X - 300, targetRect.Y + 659, targetRect.Z + 603, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "RightTop");
            UseTestBounds(targetRect.W - 327, targetRect.X - 340, targetRect.Y + 349, targetRect.Z + 608, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "TopLeft");
            UseTestBounds(targetRect.W - 20, targetRect.X - 340, targetRect.Y + 348, targetRect.Z + 608, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "TopRight");
            UseTestBounds(targetRect.W - 327, targetRect.X - 100, targetRect.Y + 349, targetRect.Z + 444, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "BottomLeft");
            UseTestBounds(targetRect.W - 20, targetRect.X - 100, targetRect.Y + 349, targetRect.Z + 444, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "BottomRight");
            UseTestBounds(targetRect.W - 327, targetRect.X - 318, targetRect.Y + 650, targetRect.Z + 444, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "Center");

            // Remove the hero content;
            SetHeroContent(HeroContentOptions.NoContent);

            UseTestBounds(targetRect.W - 329, targetRect.X - 100, targetRect.Y + 349, targetRect.Z + 20, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "Left");
            UseTestBounds(targetRect.W - 19, targetRect.X - 100, targetRect.Y + 349, targetRect.Z + 20, targetRect, forWindowBounds);
            VerifyPlacement(valueOverride ?? "Right");

            SetHeroContent(HeroContentOptions.RedSquare);
        }

void TestCleanup ( ) [inline]

Definition at line 47 of file TeachingTipTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void TestTeachingTipInXamlPage ( ) [inline]

Definition at line 922 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTipInXamlPage Test" }))
            {
                var elements = new TeachingTipTestPageElements();
                Wait.ForIdle();

                Verify.AreEqual(ToggleState.On, elements.GetIsOpenCheckBox().ToggleState, "isOpenCheckBox.ToggleState");

                var teachingTipContent = FindElement.ByName<TextBlock>("TeachingTipContent");
                Verify.IsNotNull(teachingTipContent, "teachingTipContent");

                var teachingTipCloseButton = FindElement.ByName<Button>("TeachingTipCloseButton");
                Verify.IsNotNull(teachingTipCloseButton, "teachingTipCloseButton");

                teachingTipCloseButton.Invoke();

                WaitForUnchecked(elements.GetIsOpenCheckBox());
                WaitForChecked(elements.GetIsIdleCheckBox());
                Wait.ForIdle();
            }
        }

void TipCanFollowTarget ( ) [inline]

Definition at line 204 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    Wait.ForIdle();
                    OpenTeachingTip();
                    double initialTipVerticalOffset = GetTipVerticalOffset();
                    double initialScrollViewerVerticalOffset = GetScrollViewerVerticalOffset();

                    ScrollBy(10);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset + 10);
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);
                    ScrollBy(-20);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset - 10);
                    Wait.ForIdle();
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);
                    ScrollBy(10);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset);
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);

                    SetTipFollowsTarget(true);

                    ScrollBy(10);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset + 10);
                    Verify.IsLessThan(GetTipVerticalOffset(), initialTipVerticalOffset);
                    ScrollBy(-20);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset - 10);
                    Wait.ForIdle();
                    Verify.IsGreaterThan(GetTipVerticalOffset(), initialTipVerticalOffset);
                    ScrollBy(10);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset);
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);

                    SetTipFollowsTarget(false);

                    ScrollBy(10);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset + 10);
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);
                    ScrollBy(-20);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset - 10);
                    Wait.ForIdle();
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);
                    ScrollBy(10);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset);
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);
                }
            }
        }

void TipFollowsTargetOnWindowResize ( ) [inline]

Definition at line 262 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    Wait.ForIdle();
                    OpenTeachingTip();
                    double initialTipVerticalOffset = GetTipVerticalOffset();
                    double initialScrollViewerVerticalOffset = GetScrollViewerVerticalOffset();

                    ScrollBy(10);
                    WaitForOffsetUpdated(initialScrollViewerVerticalOffset + 10);
                    Equals(GetTipVerticalOffset(), initialTipVerticalOffset);

                    //Unmaximize then maximize the window, to force a window size changed event.
                    KeyboardHelper.PressKey(Key.Down, ModifierKey.Windows);
                    Wait.ForIdle();
                    KeyboardHelper.PressKey(Key.Up, ModifierKey.Windows);
                    Wait.ForIdle();

                    Verify.IsLessThan(GetTipVerticalOffset(), initialTipVerticalOffset);
                }

                // Test for bug #1547
                // Maximize window first.
                var getOnEdgeOffsetButton = elements.GetTeachingTipOnEdgeOffsetButton();
                KeyboardHelper.PressKey(Key.Up, ModifierKey.Windows);
                Wait.ForIdle();

                // Open TeachingTip
                elements.GetOpenTeachingTipOnEdgeButton().InvokeAndWait();

                // Get offset values
                getOnEdgeOffsetButton.InvokeAndWait();
                double oldXOffset = elements.GetTeachingTipOnEdgeHorizontalOffset();

                // "Restore" window width (aka unminimize)
                KeyboardHelper.PressKey(Key.Down, ModifierKey.Windows);
                getOnEdgeOffsetButton.InvokeAndWait();
                Verify.IsLessThan(elements.GetTeachingTipOnEdgeHorizontalOffset(), oldXOffset);

                // Update values
                getOnEdgeOffsetButton.InvokeAndWait();
                oldXOffset = elements.GetTeachingTipOnEdgeHorizontalOffset();

                // Maximize again
                KeyboardHelper.PressKey(Key.Up, ModifierKey.Windows);
                getOnEdgeOffsetButton.InvokeAndWait();
                Verify.IsGreaterThan(elements.GetTeachingTipOnEdgeHorizontalOffset(), oldXOffset);
            }
        }

void TipsWhichDoNotFitDoNotOpen ( ) [inline]

Definition at line 823 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();

                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    ScrollTargetIntoView();
                    ScrollBy(10);
                    UseTestWindowBounds(10, 10, 10, 10);

                    elements.GetShowButton().InvokeAndWait();

                    var message1 = GetTeachingTipDebugMessage(1);
                    Verify.IsTrue(message1.ToString().Contains("Closed"));
                    Verify.IsTrue(message1.ToString().Contains("Programmatic"));

                    UseTestScreenBounds(10, 10, 10, 10);
                    SetShouldConstrainToRootBounds(false);

                    OpenTeachingTip();

                    VerifyPlacement("Top");

                    ClearTeachingTipDebugMessages();
                }
            }
        }

void UseF6ToReturnToTestPageToCloseTip ( ) [inline, private]

Definition at line 1228 of file TeachingTipTests.cs.

        {
            KeyboardHelper.PressKey(Key.F6);
            KeyboardHelper.PressKey(Key.Tab);
            KeyboardHelper.PressKey(Key.F6);
            KeyboardHelper.PressKey(Key.Tab);
            KeyboardHelper.PressKey(Key.Enter);
            WaitForTipClosed();
        }

void UseTestBounds | ( | double | x,
 |  | double | y,
 |  | double | width,
 |  | double | height,
 |  | Vector4 | targetRect,
 |  | bool | forWindowBounds |
 | ) |  |  | [inline, private]

Definition at line 1519 of file TeachingTipTests.cs.

        {
            if (forWindowBounds)
            {
                UseTestWindowBounds(x, y, width, height);
            }
            else
            {
                UseTestWindowBounds(targetRect.W - 1, targetRect.X - 1, targetRect.Y + 1, targetRect.Z + 1);
                UseTestScreenBounds(x, y, width, height);
            }
        }

void UseTestScreenBounds | ( | double | x,
 |  | double | y,
 |  | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 1544 of file TeachingTipTests.cs.

        {
            elements.GetTestScreenBoundsXTextBox().SetValue(x.ToString());
            elements.GetTestScreenBoundsYTextBox().SetValue(y.ToString());
            elements.GetTestScreenBoundsWidthTextBox().SetValue(width.ToString());
            elements.GetTestScreenBoundsHeightTextBox().SetValue(height.ToString());

            elements.GetUseTestWindowBoundsCheckbox().Uncheck();
            elements.GetUseTestScreenBoundsCheckbox().Uncheck();
            elements.GetUseTestScreenBoundsCheckbox().Check();
            elements.GetUseTestWindowBoundsCheckbox().Check();
        }

void UseTestWindowBounds | ( | double | x,
 |  | double | y,
 |  | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 1532 of file TeachingTipTests.cs.

        {
            elements.GetTestWindowBoundsXTextBox().SetValue(x.ToString());
            elements.GetTestWindowBoundsYTextBox().SetValue(y.ToString());
            elements.GetTestWindowBoundsWidthTextBox().SetValue(width.ToString());
            elements.GetTestWindowBoundsHeightTextBox().SetValue(height.ToString());

            elements.GetUseTestWindowBoundsCheckbox().Uncheck();

            elements.GetUseTestWindowBoundsCheckbox().Check();
        }

void VerifyPlacement ( String placement ) [inline, private]

Definition at line 987 of file TeachingTipTests.cs.

        {
            OpenTeachingTip();
            Verify.AreEqual(placement, GetEffectivePlacement(), "VerifyPlacement");
            CloseTeachingTipProgrammatically();
        }

void VerifyTeachingTipButtonsNameAutomationProperty ( ) [inline]

Definition at line 1109 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();

                SetActionButtonContentTo("Small text");
                SetCloseButtonContent(CloseButtonContentOptions.ShortText);

                OpenTeachingTip();

                var actionButton = FindElement.ById("ActionButton");
                var closeButton = FindElement.ById("CloseButton");

                Log.Comment("Verify that action and close buttons content presenter text will update the buttons name automation property");
                Verify.AreEqual(actionButton.Name, "A:Short Text.");
                Verify.AreEqual(closeButton.Name, "C:Short Text.");
            }
        }

void VerifyTeachingTipGetsFocus ( ) [inline]

Definition at line 1131 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTipFocus Test" }))
            {
                var elements = new TeachingTipFocusTestPageElements();
                var openTeachingTipButton = elements.GetOpenButton();

                FocusHelper.SetFocus(openTeachingTipButton);
                OpenTeachingTip();

                Log.Comment("Verify that an opened teaching tip get focus on F6");
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.F6);
                Wait.ForIdle();
                var closeButton = elements.GetTeachingTipCloseButton();
                Verify.IsTrue(closeButton.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.F6);
                Wait.ForIdle();
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);

                Log.Comment("Switch to light-dismissable teaching tip.");
                CloseTeachingTipProgrammatically();
                EnableLightDismiss();

                Log.Comment("Verify that a light-dismissable teaching tip gets focus on opening");
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);
                OpenTeachingTip();
                Wait.ForIdle();
                closeButton = elements.GetTeachingTipCloseButton();
                Verify.IsTrue(closeButton.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.Escape);
                Wait.ForIdle();
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);

                void OpenTeachingTip()
                {
                    if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.On)
                    {
                        openTeachingTipButton.InvokeAndWait();
                        WaitForChecked(elements.GetIsOpenCheckBox());
                        WaitForChecked(elements.GetIsIdleCheckBox());
                    }
                }

                void CloseTeachingTipProgrammatically()
                {
                    if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.Off)
                    {
                        elements.GetCloseButton().InvokeAndWait();
                        WaitForUnchecked(elements.GetIsOpenCheckBox());
                        WaitForChecked(elements.GetIsIdleCheckBox());
                    }
                }

                void EnableLightDismiss()
                {
                    var isLightDismissEnabledCheckBox = elements.GetIsLightDismissEnabledCheckBox();
                    if (isLightDismissEnabledCheckBox.ToggleState != ToggleState.On)
                    {
                        isLightDismissEnabledCheckBox.Check();
                        WaitForChecked(isLightDismissEnabledCheckBox);
                    }
                }
            }
        }

void VerifyTeachingTipNotIncludedInTabOrder ( ) [inline]

Definition at line 1040 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTipFocus Test" }))
            {
                var elements = new TeachingTipFocusTestPageElements();
                var openTeachingTipButton = elements.GetOpenButton();

                FocusHelper.SetFocus(openTeachingTipButton);

                Log.Comment("Verify open button has keyboard focus.");
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);

                Log.Comment("Verify that a closed teaching tip does not appear in tab order.");
                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);

                Log.Comment("Verify that an opened teaching tip does not appear in tab order.");
                OpenTeachingTip();
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);

                Log.Comment("Switch to light-dismissable teaching tip.");
                CloseTeachingTipProgrammatically();
                EnableLightDismiss();

                Log.Comment("Verify that a closed light-dismissable teaching tip does not appear in tab order.");

                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);
                KeyboardHelper.PressKey(Key.Tab);
                Wait.ForIdle();
                Verify.IsTrue(openTeachingTipButton.HasKeyboardFocus);

                void OpenTeachingTip()
                {
                    if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.On)
                    {
                        openTeachingTipButton.InvokeAndWait();
                        WaitForChecked(elements.GetIsOpenCheckBox());
                        WaitForChecked(elements.GetIsIdleCheckBox());
                    }
                }

                void CloseTeachingTipProgrammatically()
                {
                    if (elements.GetIsOpenCheckBox().ToggleState != ToggleState.Off)
                    {
                        elements.GetCloseButton().InvokeAndWait();
                        WaitForUnchecked(elements.GetIsOpenCheckBox());
                        WaitForChecked(elements.GetIsIdleCheckBox());
                    }
                }

                void EnableLightDismiss()
                {
                    var isLightDismissEnabledCheckBox = elements.GetIsLightDismissEnabledCheckBox();
                    if (isLightDismissEnabledCheckBox.ToggleState != ToggleState.On)
                    {
                        isLightDismissEnabledCheckBox.Check();
                        WaitForChecked(isLightDismissEnabledCheckBox);
                    }
                }
            }
        }

void VerifyTeachingTipTargetChange ( ) [inline]

Definition at line 1199 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();

                OpenTeachingTip();

                double oldYOffset = GetTipVerticalOffset();

                elements.GetSwitchTargetButton().InvokeAndWait();

                double newYOffset = GetTipVerticalOffset();

                Verify.IsFalse(oldYOffset == newYOffset);
            }
        }

void VerifyTheming ( ) [inline]

Definition at line 859 of file TeachingTipTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TeachingTip Tests", "TeachingTip Test" }))
            {
                elements = new TeachingTipTestPageElements();
                foreach (TipLocationOptions location in Enum.GetValues(typeof(TipLocationOptions)))
                {
                    SetTeachingTipLocation(location);

                    SetActionButtonContentTo("Small text");

                    ScrollTargetIntoView();
                    OpenTeachingTip();

                    var themingComboBox = elements.GetThemingComboBox();
                    themingComboBox.SelectItemByName("Light");

                    // Substring removes the opacity of the color, as that may vary
                    Verify.AreEqual("000000", elements.GetEffectiveForegroundOfTeachingTipButtonTextBlock().GetText().Substring(3), "Default button foreground should be black");
                    Verify.AreEqual("000000", elements.GetEffectiveForegroundOfTeachingTipContentTextBlock().GetText().Substring(3), "Default content foreground should be black");

                    // Change to Dark, make sure the font switches to light
                    themingComboBox.SelectItemByName("Dark");

                    Verify.AreEqual("FFFFFF", elements.GetEffectiveForegroundOfTeachingTipButtonTextBlock().GetText().Substring(3), "Default button foreground should be white");
                    Verify.AreEqual("FFFFFF", elements.GetEffectiveForegroundOfTeachingTipContentTextBlock().GetText().Substring(3), "Default content foreground should be white");

                    // Change to Light, make sure the font switches to dark
                    themingComboBox.SelectItemByName("Light");

                    Verify.AreEqual("000000", elements.GetEffectiveForegroundOfTeachingTipButtonTextBlock().GetText().Substring(3), "Default button foreground should be black");
                    Verify.AreEqual("000000", elements.GetEffectiveForegroundOfTeachingTipContentTextBlock().GetText().Substring(3), "Default content foreground should be black");
                }
            }
        }

bool WaitForCheckBoxUpdated | ( | CheckBox | checkBox,
 |  | ToggleState | state,
 |  | double | millisecondsTimeout,
 |  | bool | throwOnError |
 | ) |  |  | [inline, private]

Definition at line 1661 of file TeachingTipTests.cs.

        {
            using (UIEventWaiter waiter = checkBox.GetToggledWaiter())
            {
                Log.Comment(checkBox.Name + " Checked: " + checkBox.ToggleState);
                if (checkBox.ToggleState == state)
                {
                    return true;
                }
                else
                {
                    Log.Comment("Waiting for toggle state to change to {0} for {1}ms", state, millisecondsTimeout);
                    waiter.TryWait(TimeSpan.FromMilliseconds(millisecondsTimeout));
                }
                if (checkBox.ToggleState != state)
                {
                    Log.Warning(checkBox.Name + " value never changed");
                    if (throwOnError)
                    {
                        throw new WaiterException();
                    }
                    else
                    {
                        return false;
                    }
                }
                return true;
            }
        }

bool WaitForChecked | ( | CheckBox | checkBox,
 |  | double | millisecondsTimeout = 2000,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, private]

Definition at line 1651 of file TeachingTipTests.cs.

        {
            return WaitForCheckBoxUpdated(checkBox, ToggleState.On, millisecondsTimeout, throwOnError);
        }

bool WaitForOffsetToSettle | ( | Edit | text,
 |  | double | millisecondsTimeout,
 |  | bool | failOnError |
 | ) |  |  | [inline, private]

Definition at line 1706 of file TeachingTipTests.cs.

        {
            Wait.ForIdle();

            const double millisecondsNormalStepTimeout = 100;
            const double millisecondsIdleStepTimeout = 600;
            ValueChangedEventWaiter waiter = new ValueChangedEventWaiter(text);
            int unsuccessfulWaits = 0;
            int maxUnsuccessfulWaits = (int)(millisecondsIdleStepTimeout / millisecondsNormalStepTimeout);

            Log.Comment("Original State: " + elements.GetScrollViewerStateTextBox().GetText());
            Log.Comment("Original Offset: " + text.Value);

            // When the initial State is still Idle, use a longer timeout to allow it to transition out of Idle.
            double millisecondsWait = (elements.GetScrollViewerStateTextBox().GetText() == "Idle") ? millisecondsIdleStepTimeout : millisecondsNormalStepTimeout;
            double millisecondsCumulatedWait = 0;

            do
            {
                Log.Comment("Waiting for Offset change.");
                waiter.Reset();
                if (waiter.TryWait(TimeSpan.FromMilliseconds(millisecondsWait)))
                {
                    unsuccessfulWaits = 0;
                }
                else
                {
                    unsuccessfulWaits++;
                }
                millisecondsCumulatedWait += millisecondsWait;
                millisecondsWait = millisecondsNormalStepTimeout;

                Log.Comment("Current State: " + elements.GetScrollViewerStateTextBox().GetText());
                Log.Comment("Current Offset: " + text.Value);

                Wait.ForIdle();
            }
            while (elements.GetScrollViewerStateTextBox().GetText() != "Idle" &&
                   millisecondsCumulatedWait < millisecondsTimeout &&
                   unsuccessfulWaits <= maxUnsuccessfulWaits);

            if (elements.GetScrollViewerStateTextBox().GetText() == "Idle")
            {
                Log.Comment("Idle State reached after " + millisecondsCumulatedWait + " out of " + millisecondsTimeout + " milliseconds. Final Offset: " + text.Value);
                return true;
            }
            else
            {
                string message = unsuccessfulWaits > maxUnsuccessfulWaits ?
                    "Offset has not changed within " + millisecondsIdleStepTimeout + " milliseconds outside of Idle State." :
                    "Idle State was not reached within " + millisecondsTimeout + " milliseconds.";
                if (failOnError)
                {
                    Log.Error(message);
                }
                else
                {
                    Log.Warning(message);
                }

                return false;
            }
        }

int WaitForOffsetUpdated | ( | double | expectedValue,
 |  | double | millisecondsTimeout = defaultAnimatedViewChangeTimeout,
 |  | bool | failOnError = true |
 | ) |  |  | [inline, private]

Definition at line 1691 of file TeachingTipTests.cs.

        {
            Log.Comment("WaitForOffsetUpdated with expectedValue: " + expectedValue);

            int warningCount = 0;
            bool success = WaitForOffsetToSettle(elements.GetScrollViewerOffsetTextBox(), millisecondsTimeout, failOnError);
            double value = Convert.ToDouble(elements.GetScrollViewerOffsetTextBox().GetText());
            bool goodValue = value == expectedValue;
            Verify.IsTrue(goodValue);
            return warningCount;
        }

void WaitForTipClosed ( ) [inline, private]

Definition at line 1304 of file TeachingTipTests.cs.

        {
            WaitForUnchecked(elements.GetIsOpenCheckBox());
            WaitForChecked(elements.GetIsIdleCheckBox());
        }

void WaitForTipOpened ( ) [inline, private]

Definition at line 1298 of file TeachingTipTests.cs.

        {
            WaitForChecked(elements.GetIsOpenCheckBox());
            WaitForChecked(elements.GetIsIdleCheckBox());
        }

bool WaitForUnchecked | ( | CheckBox | checkBox,
 |  | double | millisecondsTimeout = 2000,
 |  | bool | throwOnError = true |
 | ) |  |  | [inline, private]

Definition at line 1656 of file TeachingTipTests.cs.

        {
            return WaitForCheckBoxUpdated(checkBox, ToggleState.Off, millisecondsTimeout, throwOnError);
        }

Member Data Documentation

const double defaultAnimatedViewChangeTimeout = 9000 [private]

Definition at line 32 of file TeachingTipTests.cs.

TeachingTipTestPageElements elements [private]

Definition at line 34 of file TeachingTipTests.cs.

Property Documentation

TestContext TestContext [get, set]

Definition at line 52 of file TeachingTipTests.cs.

The documentation for this class was generated from the following file:
  • TeachingTip/InteractionTests/TeachingTipTests.cs
Generated on Sun Dec 1 2024 20:53:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TextCommandBarFlyoutTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TextCommandBarFlyoutTests
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions

TextCommandBarFlyoutTests Class Reference

List of all members.

Classes

class | TextCommandBarFlyoutTestSetupHelper

Public Member Functions

void | CanBoldTextInARichEditBox ()
void | CanCopyTextFromRichEditBox ()
void | CanCopyTextFromRichTextBlock ()
void | CanCopyTextFromTextBlock ()
void | CanCopyTextFromTextBox ()
void | CanCutTextFromRichEditBox ()
void | CanCutTextFromTextBox ()
void | CanItalicizeTextInARichEditBox ()
void | CanPasteTextToPasswordBox ()
void | CanPasteTextToRichEditBox ()
void | CanPasteTextToTextBox ()
void | CanSelectAllInPasswordBox ()
void | CanSelectAllInRichEditBox ()
void | CanSelectAllInRichTextBlock ()
void | CanSelectAllInTextBlock ()
void | CanSelectAllInTextBox ()
void | CanUnderlineTextInARichEditBox ()
void | CanUndoAndRedoInRichEditBox ()
void | CanUndoAndRedoInTextBox ()
void | TestCleanup ()
void | ValidateKeyboarding ()
void | ValidateProofingMenu ()
void | ValidateRichTextBlockOverflowUsesSourceFlyouts ()
void | ValidateRightClickOnEmptyTextBoxDoesNotShowFlyout ()
void | ValidateSelectionFlyoutDoesNotTakeFocus ()
void | ValidateUnhandledKeysOnNonTransientFlyoutDoNotCloseFlyout ()
void | VerifyTextCommandBarRemainsOpenWithItems ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | CanCutCopyTextFrom (string textControlName, bool cutText)
void | CanPasteTextTo (string textControlName)
void | CanSelectAllIn (string textControlName)
void | CanStyleTextInARichEditBox (string styleName, string styleStart, string styleEnd)
void | CanUndoAndRedoIn (string textControlName)
void | FocusAndSelectText (Edit editControl, string textToSelect)
void | OpenFlyoutOn (string textControlName, bool asTransient)

Static Private Member Functions

static void | DismissFlyout ()
static void | VerifyRichEditBoxHasContent (string expectedContent)

Detailed Description

Definition at line 23 of file TextCommandBarFlyoutTests.cs.

Member Function Documentation

void CanBoldTextInARichEditBox ( ) [inline]

Definition at line 190 of file TextCommandBarFlyoutTests.cs.

        {
            CanStyleTextInARichEditBox("Bold", "\\b ", "\\b0 ");
        }

void CanCopyTextFromRichEditBox ( ) [inline]

Definition at line 79 of file TextCommandBarFlyoutTests.cs.

        {
            CanCutCopyTextFrom("RichEditBox", cutText: false);
        }

void CanCopyTextFromRichTextBlock ( ) [inline]

Definition at line 86 of file TextCommandBarFlyoutTests.cs.

        {
            CanCutCopyTextFrom("RichTextBlock", cutText: false);
        }

void CanCopyTextFromTextBlock ( ) [inline]

Definition at line 72 of file TextCommandBarFlyoutTests.cs.

        {
            CanCutCopyTextFrom("TextBlock", cutText: false);
        }

void CanCopyTextFromTextBox ( ) [inline]

Definition at line 65 of file TextCommandBarFlyoutTests.cs.

        {
            CanCutCopyTextFrom("TextBox", cutText: false);
        }

void CanCutCopyTextFrom | ( | string | textControlName,
 |  | bool | cutText |
 | ) |  |  | [inline, private]

Definition at line 91 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                string initialTextControlContents = FindElement.ById(textControlName).GetText();

                Log.Comment("Selecting all text in the {0}.", textControlName);
                FindElement.ById<Button>(string.Format("{0}SelectAllButton", textControlName)).InvokeAndWait();

                OpenFlyoutOn(textControlName, asTransient: false);

                Log.Comment("{0} selected text.", cutText ? "Cutting" : "Copying");
                FindElement.ByName<Button>(cutText ? "Cut" : "Copy").InvokeAndWait();

                string textControlContents = FindElement.ById(textControlName).GetText();

                Log.Comment("{0} contents are now {1}", textControlName, textControlContents);
                Verify.IsNotNull(textControlContents);

                if (cutText)
                {
                    Verify.AreEqual(string.Empty, textControlContents);
                }
                else
                {
                    Verify.AreEqual(initialTextControlContents, textControlContents);
                }
            }
        }

void CanCutTextFromRichEditBox ( ) [inline]

Definition at line 58 of file TextCommandBarFlyoutTests.cs.

        {
            CanCutCopyTextFrom("RichEditBox", cutText: true);
        }

void CanCutTextFromTextBox ( ) [inline]

Definition at line 51 of file TextCommandBarFlyoutTests.cs.

        {
            CanCutCopyTextFrom("TextBox", cutText: true);
        }

void CanItalicizeTextInARichEditBox ( ) [inline]

Definition at line 197 of file TextCommandBarFlyoutTests.cs.

        {
            CanStyleTextInARichEditBox("Italic", "\\i ", "\\i0 ");
        }

void CanPasteTextTo ( string textControlName ) [inline, private]

Definition at line 142 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                Log.Comment("Loading the clipboard with text.", textControlName);
                FindElement.ById<Button>("SetClipboardContentsButton").InvokeAndWait();

                if (textControlName != "PasswordBox")
                {
                    Log.Comment("Selecting all text in the {0}.", textControlName);
                    FindElement.ById<Button>(string.Format("{0}SelectAllButton", textControlName)).InvokeAndWait();
                }
                else
                {
                    Log.Comment("Deleting all text in the {0}.", textControlName);

                    // PasswordBox does not raise the ValueChanged UIA event, so we can't use SetValueAndWait in that case.
                    FindElement.ById<Edit>(textControlName).SetValue(string.Empty);
                    Wait.ForIdle();
                }

                OpenFlyoutOn(textControlName, asTransient: false);

                Log.Comment("Pasting selected text.");
                FindElement.ByName<Button>("Paste").InvokeAndWait();

                string textControlContents = FindElement.ById(textControlName).GetText();
                string expectedString = "Automatically set clipboard text";

                if (textControlName == "PasswordBox")
                {
                    string obfuscatedString = string.Empty;

                    for (int i = 0; i < expectedString.Length; i++)
                    {
                        obfuscatedString += "\u25CF";
                    }

                    expectedString = obfuscatedString;
                }

                Log.Comment("{0} contents are now {1}", textControlName, textControlContents);
                Verify.AreEqual(expectedString, textControlContents);
            }
        }

void CanPasteTextToPasswordBox ( ) [inline]

Definition at line 137 of file TextCommandBarFlyoutTests.cs.

        {
            CanPasteTextTo("PasswordBox");
        }

void CanPasteTextToRichEditBox ( ) [inline]

Definition at line 130 of file TextCommandBarFlyoutTests.cs.

        {
            CanPasteTextTo("RichEditBox");
        }

void CanPasteTextToTextBox ( ) [inline]

Definition at line 123 of file TextCommandBarFlyoutTests.cs.

        {
            CanPasteTextTo("TextBox");
        }

void CanSelectAllIn ( string textControlName ) [inline, private]

Definition at line 399 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                OpenFlyoutOn(textControlName, asTransient: false);

                Log.Comment("Selecting all text in the {0}.", textControlName);
                FindElement.ByName<Button>("Select All").InvokeAndWait();

                string textControlSelectionContents = FindElement.ById(textControlName).GetTextSelection();

                Log.Comment("{0} selection contents are now {1}", textControlName, textControlSelectionContents);

                string expectedString = "Lorem ipsum ergo sum";

                if (textControlName == "PasswordBox")
                {
                    string obfuscatedString = string.Empty;

                    for (int i = 0; i < expectedString.Length; i++)
                    {
                        obfuscatedString += "\u25CF";
                    }

                    expectedString = obfuscatedString;
                }

                Verify.AreEqual(expectedString, textControlSelectionContents);
            }
        }

void CanSelectAllInPasswordBox ( ) [inline]

Definition at line 394 of file TextCommandBarFlyoutTests.cs.

        {
            CanSelectAllIn("PasswordBox");
        }

void CanSelectAllInRichEditBox ( ) [inline]

Definition at line 380 of file TextCommandBarFlyoutTests.cs.

        {
            CanSelectAllIn("RichEditBox");
        }

void CanSelectAllInRichTextBlock ( ) [inline]

Definition at line 387 of file TextCommandBarFlyoutTests.cs.

        {
            CanSelectAllIn("RichTextBlock");
        }

void CanSelectAllInTextBlock ( ) [inline]

Definition at line 373 of file TextCommandBarFlyoutTests.cs.

        {
            CanSelectAllIn("TextBlock");
        }

void CanSelectAllInTextBox ( ) [inline]

Definition at line 366 of file TextCommandBarFlyoutTests.cs.

        {
            CanSelectAllIn("TextBox");
        }

void CanStyleTextInARichEditBox | ( | string | styleName,
 |  | string | styleStart,
 |  | string | styleEnd |
 | ) |  |  | [inline, private]

Definition at line 209 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                Log.Comment("Getting initial RichEditBox RTF content.");
                FindElement.ById<Button>(string.Format("GetRichEditBoxRtfContentButton")).InvokeAndWait();
                string textControlContents = FindElement.ById("StatusReportingTextBox").GetText();
                Log.Comment("Content is '{0}'", textControlContents.Replace(Environment.NewLine, " "));

                Log.Comment("Ensuring RichEditBox initially has no {0} content.", styleName.ToLower());
                Verify.IsFalse(textControlContents.Contains(styleStart));
                Verify.IsFalse(textControlContents.Contains(styleEnd));

                var richedit = FindElement.ById<Edit>("RichEditBox");

                FocusAndSelectText(richedit, "ergo");
                OpenFlyoutOn("RichEditBox", asTransient: true);

                var toggleFormatButton = FindElement.ByName<ToggleButton>(styleName);
                Verify.AreEqual(ToggleState.Off, toggleFormatButton.ToggleState);

                Log.Comment("Making text {0}.", styleName.ToLower());
                toggleFormatButton.ToggleAndWait();
                VerifyRichEditBoxHasContent(string.Format("Lorem ipsum {0}ergo{1} sum", styleStart, styleEnd));

                DismissFlyout();

                Log.Comment("Select mixed format text");
                // Note, in this case the selection starts in unstyled text ("sum") and includes styled text ("ergo"). The next case covers
                // starting in styled text and including unstyled text
                FocusAndSelectText(richedit, "sum ergo");

                Log.Comment("Showing flyout should not change bold status");
                OpenFlyoutOn("RichEditBox", asTransient: true);
                Verify.AreEqual(ToggleState.Off, toggleFormatButton.ToggleState);
                VerifyRichEditBoxHasContent(string.Format("Lorem ipsum {0}ergo{1} sum", styleStart, styleEnd));

                Log.Comment("Apply formatting to new selection");
                toggleFormatButton.ToggleAndWait();
                VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo{1} sum", styleStart, styleEnd));

                DismissFlyout();

                Log.Comment("Select mixed format text");
                FocusAndSelectText(richedit, "ergo su");
                OpenFlyoutOn("RichEditBox", asTransient: true);
                Verify.AreEqual(ToggleState.Off, toggleFormatButton.ToggleState);
                VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo{1} sum", styleStart, styleEnd));

                toggleFormatButton.ToggleAndWait();
                VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo su{1}m", styleStart, styleEnd));

                DismissFlyout();
                FocusAndSelectText(richedit, "ergo");
                OpenFlyoutOn("RichEditBox", asTransient: true);
                Verify.AreEqual(ToggleState.On, toggleFormatButton.ToggleState);
                VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo su{1}m", styleStart, styleEnd));

                toggleFormatButton.ToggleAndWait();
                VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum {1}ergo{0} su{1}m", styleStart, styleEnd));
            }
        }

void CanUnderlineTextInARichEditBox ( ) [inline]

Definition at line 204 of file TextCommandBarFlyoutTests.cs.

        {
            CanStyleTextInARichEditBox("Underline", "\\ul ", "\\ulnone ");
        }

void CanUndoAndRedoIn ( string textControlName ) [inline, private]

Definition at line 315 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                UIObject textControl = FindElement.ById(textControlName);
                ValueImplementation textControlAsValue = new ValueImplementation(textControl);

                string initialString = textControl.GetText();
                Log.Comment("Initial contents of {0} are '{1}'", textControlName, initialString);

                Log.Comment("Selecting all text in the {0}.", textControlName);
                FindElement.ById<Button>(string.Format("{0}SelectAllButton", textControlName)).InvokeAndWait();

                Log.Comment("Giving the {0} focus.", textControlName);
                FocusHelper.SetFocus(textControl);

                Log.Comment("Typing 'hello' into the {0}.", textControlName);
                TextInput.SendText("hello");
                Wait.ForIdle();

                string finalString = textControl.GetText();
                Log.Comment("Contents of {0} are now '{1}'", textControlName, finalString);

                Log.Comment("Opening TextCommandBarFlyout.");
                OpenFlyoutOn(textControlName, asTransient: false);

                using (ValueChangedEventWaiter waiter = textControlAsValue.IsAvailable ? new ValueChangedEventWaiter(new Edit(textControl), initialString) : null)
                {
                    Log.Comment("Undoing text entry.");
                    FindElement.ByName<Button>("Undo").InvokeAndWait();
                }

                Log.Comment("Contents of {0} are now '{1}'", textControlName, textControl.GetText());
                Verify.AreEqual(initialString, textControl.GetText());

                Log.Comment("Reopening TextCommandBarFlyout.");
                OpenFlyoutOn(textControlName, asTransient: false);

                using (ValueChangedEventWaiter waiter = textControlAsValue.IsAvailable ? new ValueChangedEventWaiter(new Edit(textControl), finalString) : null)
                {
                    Log.Comment("Redoing text entry.");
                    FindElement.ByName<Button>("Redo").InvokeAndWait();
                }

                Log.Comment("Contents of {0} are now '{1}'", textControlName, textControl.GetText());
                Verify.AreEqual(finalString, textControl.GetText());
            }
        }

void CanUndoAndRedoInRichEditBox ( ) [inline]

Definition at line 310 of file TextCommandBarFlyoutTests.cs.

        {
            CanUndoAndRedoIn("RichEditBox");
        }

void CanUndoAndRedoInTextBox ( ) [inline]

Definition at line 303 of file TextCommandBarFlyoutTests.cs.

        {
            CanUndoAndRedoIn("TextBox");
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 29 of file TextCommandBarFlyoutTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

static void DismissFlyout ( ) [inline, static, private]

Definition at line 294 of file TextCommandBarFlyoutTests.cs.

        {
            var statusReportingTextBox = FindElement.ById("StatusReportingTextBox");
            InputHelper.LeftClick(statusReportingTextBox);
            Wait.ForIdle();
        }

void FocusAndSelectText | ( | Edit | editControl,
 |  | string | textToSelect |
 | ) |  |  | [inline, private]

Definition at line 272 of file TextCommandBarFlyoutTests.cs.

        {
            Log.Comment("Selecting text '{0}' in editControl '{1}'", textToSelect, editControl.Name);

            FocusHelper.SetFocus(editControl);
            Wait.ForIdle();
            editControl.DocumentRange.FindText(textToSelect, false /*backwards*/, false /*ignorecase*/).Select();
            Wait.ForIdle();
        }

void OpenFlyoutOn | ( | string | textControlName,
 |  | bool | asTransient |
 | ) |  |  | [inline, private]

Definition at line 665 of file TextCommandBarFlyoutTests.cs.

        {
            Log.Comment("Opening text control flyout on the {0} in {1} mode.", textControlName, asTransient ? "transient" : "standard");
            FindElement.ById<Button>(string.Format("Show{1}TextControlFlyoutOn{0}Button", textControlName, asTransient ? string.Empty : "Standard")).InvokeAndWait();
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file TextCommandBarFlyoutTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ValidateKeyboarding ( ) [inline]

Definition at line 433 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                Log.Comment("Give focus to the TextBox.");
                var textBox = FindElement.ById("TextBox");
                FocusHelper.SetFocus(textBox);

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Select All")))
                {
                    Log.Comment("Use Shift+F10 to bring up the context menu. The Select All button should get focus.");
                    KeyboardHelper.PressKey(Key.F10, ModifierKey.Shift);
                    waiter.Wait();
                }

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromId("TextBox")))
                {
                    Log.Comment("Use Escape to close the context menu.");
                    KeyboardHelper.PressKey(Key.Escape);
                    textBox.SetFocus();

                    waiter.Wait();
                }

                Log.Comment("Give focus to the RichEditBox.");
                var richEditBox = FindElement.ById("RichEditBox");
                FocusHelper.SetFocus(richEditBox);

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Bold")))
                {
                    Log.Comment("Use Shift+F10 to bring up the context menu. The Bold button should get focus.");
                    KeyboardHelper.PressKey(Key.F10, ModifierKey.Shift);
                    waiter.Wait();
                }

                Log.Comment("Press the spacebar to invoke the bold button. Focus should stay in the flyout.");
                KeyboardHelper.PressKey(Key.Space);
                Wait.ForIdle();

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("More app bar")))
                {
                    Log.Comment("Press the right arrow key three times.  The '...' button should get focus.");
                    KeyboardHelper.PressKey(Key.Right, ModifierKey.None, numPresses: 3);
                    waiter.Wait();
                }

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Select All")))
                {
                    Log.Comment("Press the down arrow key twice.  The Select All button should get focus.");
                    KeyboardHelper.PressKey(Key.Down, ModifierKey.None, numPresses: 2);
                    waiter.Wait();
                }

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromId("RichEditBox")))
                {
                    Log.Comment("Use Escape to close the context menu.");
                    KeyboardHelper.PressKey(Key.Escape);
                    richEditBox.SetFocus();

                    waiter.Wait();
                }
            }
        }

void ValidateProofingMenu ( ) [inline]

Definition at line 499 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
            {
                Edit textBox = FindElement.ById<Edit>("TextBox");

                Log.Comment("Type \"asdf\" plus a space to create a misspelled word.");
                KeyboardHelper.EnterText(textBox, "asdf ", useKeyboard: true);

                // We know that the word appears at the start of the text box's content,
                // so we'll use a point 10 pixels from the text box's left edge as a point
                // known to be within the word's bounding box.
                Log.Comment("Right-click on the word's location in the text box to get the proofing menu.");
                InputHelper.RightClick(textBox, 10, textBox.BoundingRectangle.Height / 2);

                Log.Comment("Find the first element in the proofing menu to fix the spelling error.");
                var proofingItem = new MenuItem(FindElement.ByClassName("MenuFlyoutItem"));
                Log.Comment($"Invoke {proofingItem}");
                proofingItem.InvokeAndWait();

                Verify.AreEqual($"{proofingItem.Name} ", textBox.Value);
            }
        }

void ValidateRichTextBlockOverflowUsesSourceFlyouts ( ) [inline]

Definition at line 544 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
            {
                Log.Comment("Right-click on the rich text block.");
                InputHelper.RightClick(FindElement.ById("RichTextBlock"), 10, 10);

                Log.Comment("Select all the text.");
                FindElement.ByName<Button>("Select All").InvokeAndWait();

                Log.Comment("Now right-click on the rich text block overflow.");
                InputHelper.RightClick(FindElement.ById("RichTextBlockOverflow"), 10, 10);

                Log.Comment("The copy option should be available now, because the rich text block's overflow element delegates to the rich text block.");
                FindElement.ByName<Button>("Copy").InvokeAndWait();
            }
        }

void ValidateRightClickOnEmptyTextBoxDoesNotShowFlyout ( ) [inline]

Definition at line 525 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
            {
                Log.Comment("Clear the clipboard.");
                FindElement.ById<Button>("ClearClipboardContentsButton").InvokeAndWait();

                Log.Comment("Right-click on the text box.");
                InputHelper.RightClick(FindElement.ById("TextBox"));

                Log.Comment("Count the number of open popups.");
                FindElement.ById<Button>("CountPopupsButton").InvokeAndWait();

                Verify.AreEqual("0", FindElement.ById<Edit>("PopupCountTextBox").Value);
            }
        }

void ValidateSelectionFlyoutDoesNotTakeFocus ( ) [inline]

Definition at line 618 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                // RichEditBox only implements the Text pattern, which the "TextBlock" MITA type exposes.
                var richEditBox = new TextBlock(FindElement.ById("RichEditBox"));
                var fillWithTextButton = new Button(FindElement.ById("RichEditBoxFillWithTextButton"));

                Log.Comment("Give focus to the RichEditBox.");
                FocusHelper.SetFocus(richEditBox);

                Log.Comment("Enter enough text to guarantee that double-tapping the RichEditBox will select text.");
                fillWithTextButton.InvokeAndWait();

                Log.Comment("Double-click to select the text and bring up the selection menu. The CommandBarFlyout should appear, but should not take focus.");
                InputHelper.LeftDoubleClick(richEditBox);
                Wait.ForIdle();

                var boldButton = FindElement.ByName("Bold");
                Verify.IsNotNull(boldButton);
                Verify.IsFalse(boldButton.HasKeyboardFocus);

                Log.Comment("Press backspace to delete the selected text. This should work because the RichEditBox should still have focus.");
                KeyboardHelper.PressKey(Key.Backspace);
                Wait.ForIdle();

                Verify.AreEqual(string.Empty, richEditBox.DocumentText);

                Log.Comment("Enter text again.");
                fillWithTextButton.InvokeAndWait();

                Log.Comment("Double-click to select the text and bring up the selection menu. The CommandBarFlyout should appear, but should not take focus.");
                InputHelper.LeftDoubleClick(richEditBox);
                Wait.ForIdle();

                boldButton = FindElement.ByName("Bold");
                Verify.IsNotNull(boldButton);
                Verify.IsFalse(boldButton.HasKeyboardFocus);

                Log.Comment("Press the A key to overwrite the selected text.");
                richEditBox.SendKeys("a");
                Wait.ForIdle();

                Verify.AreEqual("a", richEditBox.DocumentText);
            }
        }

void ValidateUnhandledKeysOnNonTransientFlyoutDoNotCloseFlyout ( ) [inline]

Definition at line 564 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TextCommandBarFlyoutTestSetupHelper())
            {
                Log.Comment("Give focus to the RichEditBox.");
                FocusHelper.SetFocus(FindElement.ById("RichEditBox"));

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Bold")))
                {
                    Log.Comment("Double-tap to select a word and bring up the context menu. The Bold button should get focus.");
                    KeyboardHelper.PressKey(Key.F10, ModifierKey.Shift);
                    waiter.Wait();
                }

                Log.Comment("Press the down arrow key. Focus should stay in the flyout.");
                KeyboardHelper.PressKey(Key.Down);
                Wait.ForIdle();

                Log.Comment("Press the up arrow key. Focus should stay in the flyout.");
                KeyboardHelper.PressKey(Key.Up);
                Wait.ForIdle();

                using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromId("RichEditBox")))
                {
                    Log.Comment("Use Escape to close the context menu. The RichEditBox should now have focus.");
                    KeyboardHelper.PressKey(Key.Escape);
                    waiter.Wait();
                }
            }
        }

static void VerifyRichEditBoxHasContent ( string expectedContent ) [inline, static, private]

Definition at line 282 of file TextCommandBarFlyoutTests.cs.

        {
            Log.Comment("Ensuring RichEditBox contains string '{0}'.", expectedContent);

            Log.Comment("Getting RichEditBox RTF content.");
            FindElement.ById<Button>(string.Format("GetRichEditBoxRtfContentButton")).InvokeAndWait();
            var textControlContents = FindElement.ById("StatusReportingTextBox").GetText();
            Log.Comment("Content is '{0}'", textControlContents.Replace(Environment.NewLine, " "));

            Verify.IsTrue(textControlContents.Contains(expectedContent));
        }

void VerifyTextCommandBarRemainsOpenWithItems ( ) [inline]

Definition at line 597 of file TextCommandBarFlyoutTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
            {
                Log.Comment("Clear the clipboard.");
                FindElement.ById<Button>("ClearClipboardContentsButton").InvokeAndWait();

                Log.Comment("Right-click on the text box with additional items.");
                FindElement.ByName("TextBoxWithAdditionalItems").Click(PointerButtons.Secondary, 20, 20);

                Wait.ForIdle();

                Log.Comment("Count the number of open popups.");
                FindElement.ById<Button>("CountPopupsButton").InvokeAndWait();

                Verify.AreEqual("1", FindElement.ById<Edit>("CustomButtonsOpenCount").Value);
            }
        }

The documentation for this class was generated from the following file:
  • CommandBarFlyout/InteractionTests/TextCommandBarFlyoutTests.cs
Generated on Sun Dec 1 2024 20:53:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TextCommandBarFlyoutTests
  • TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
Public Member Functions | Properties | Private Member Functions

TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper Class Reference

List of all members.

Public Member Functions

TextCommandBarFlyoutTestSetupHelper (string languageOverride="")

Properties

new TestSetupHelperOptions

Private Member Functions

[instance initializer]

Detailed Description

Definition at line 40 of file TextCommandBarFlyoutTests.cs.

Constructor & Destructor Documentation

TextCommandBarFlyoutTestSetupHelper ( string languageOverride = "" ) [inline]

Definition at line 42 of file TextCommandBarFlyoutTests.cs.

                : base(new[] { "CommandBarFlyout Tests", "TextCommandBarFlyout Tests" }, new TestSetupHelperOptions{ LanguageOverride = languageOverride})

Member Function Documentation

[instance initializer] ( ) [inline, private]

Property Documentation

new TestSetupHelperOptions [private]

Definition at line 43 of file TextCommandBarFlyoutTests.cs.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/InteractionTests/TextCommandBarFlyoutTests.cs
Generated on Sun Dec 1 2024 20:53:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TitleBarTests
Public Member Functions | Static Public Member Functions

TitleBarTests Class Reference

List of all members.

Public Member Functions

void | BasicTest ()
void | TestCleanup ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Detailed Description

Definition at line 23 of file TitleBarTests.cs.

Member Function Documentation

void BasicTest ( ) [inline]

Definition at line 41 of file TitleBarTests.cs.

        {
            Log.Comment("TitleBar Basic Test");
            using (var setup = new TestSetupHelper("TitleBar Tests"))
            {
                Log.Comment("Sample test");
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 29 of file TitleBarTests.cs.

        {
            TestEnvironment.Initialize(testContext, TestApplicationInfo.MUXExperimentalTestApp);
        }

void TestCleanup ( ) [inline]

Definition at line 35 of file TitleBarTests.cs.

        {
            TestEnvironment.AssemblyCleanupWorker(TestApplicationInfo.MUXExperimentalTestApp);
        }

The documentation for this class was generated from the following file:
  • TitleBar/InteractionTests/TitleBarTests.cs
Generated on Sun Dec 1 2024 20:53:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TreeViewTests
Public Member Functions | Static Public Member Functions | Private Member Functions

TreeViewTests Class Reference

List of all members.

Public Member Functions

void | CanExpandTreeViewItemWithItemSourceSet ()
void | DragItemOntoTreeView_ContentMode ()
void | DragItemOntoTreeView_NodeMode ()
void | DragItemOutOfTreeView_ContentMode ()
void | DragItemOutOfTreeView_NodeMode ()
void | ExpandCollapseTest_ContentMode ()
void | ExpandCollapseTest_NodeMode ()
void | ExpandCollapseViaAutomationTest_ContentMode ()
void | ExpandCollapseViaAutomationTest_NodeMode ()
void | FlyoutTreeViewItemClickTest ()
void | FlyoutTreeViewItemTabTest ()
void | FlyoutTreeViewSelectionChangedCrash ()
void | IsExpandedIsProperlyPreservedDuringItemRecycling ()
void | ItemsSourceResyncTest ()
void | ItemsSourceSwitchForthAndBackTest ()
void | SelectedItemBindingsWork ()
void | SingleSelectWithUnrealizedChildrenDoesNotMoveSelection ()
void | TestCleanup ()
void | TreeViewCollectionChangesEffectSelectedNodesTest_ContentMode ()
void | TreeViewCollectionChangesEffectSelectedNodesTest_NodeMode ()
void | TreeViewDataLateInitTest ()
void | TreeViewDensityChange ()
void | TreeViewDisableItemDragTest_ContentMode ()
void | TreeViewDisableItemDragTest_NodeMode ()
void | TreeViewDisableItemReorderKeyboardTest ()
void | TreeViewDisableItemReorderTest_ContentMode ()
void | TreeViewDisableItemReorderTest_NodeMode ()
void | TreeViewDragAndDropBetweenNodes_ContentMode ()
void | TreeViewDragAndDropBetweenNodes_NodeMode ()
void | TreeViewDragAndDropOnNode_ContentMode ()
void | TreeViewDragAndDropOnNode_NodeMode ()
void | TreeViewDragCrash_ContentMode ()
void | TreeViewDragCrash_NodeMode ()
void | TreeViewDragEnterOverDropTest_ContentMode ()
void | TreeViewDragEnterOverDropTest_NodeMode ()
void | TreeViewDragEnterOverLeaveTest_ContentMode ()
void | TreeViewDragEnterOverLeaveTest_NodeMode ()
void | TreeViewDragItemTest_ContentMode ()
void | TreeViewDragItemTest_NodeMode ()
void | TreeViewDragMultipleItemsTest_ContentMode ()
void | TreeViewDragMultipleItemsTest_NodeMode ()
void | TreeViewExpandingEventTest_ContentMode ()
void | TreeViewExpandingEventTest_NodeMode ()
void | TreeViewExpandNodeWithUnrealizedChildrenCrash ()
void | TreeViewFastReorderTest ()
void | TreeViewItemAutomationPeerSelectionItemPatternTest ()
void | TreeViewItemClickTest_ContentMode ()
void | TreeViewItemClickTest_NodeMode ()
void | TreeViewItemTemplateSelectorTest ()
void | TreeViewItemUIATest_ContentMode ()
void | TreeViewItemUIATest_NodeMode ()
void | TreeViewKeyboardReorderTest_ContentMode ()
void | TreeViewKeyboardReorderTest_NodeMode ()
void | TreeViewKeyDownLeftToRightTest_ContentMode ()
void | TreeViewKeyDownLeftToRightTest_NodeMode ()
void | TreeViewKeyDownRightToLeftTest_ContentMode ()
void | TreeViewKeyDownRightToLeftTest_NodeMode ()
void | TreeViewListMultipleSelectionUIATest ()
void | TreeViewMultiSelectDragAndDropBetweenNodes_ContentMode ()
void | TreeViewMultiSelectDragAndDropBetweenNodes_NodeMode ()
void | TreeViewMultiSelectDragAndDropOnNode_ContentMode ()
void | TreeViewMultiSelectDragAndDropOnNode_NodeMode ()
void | TreeViewMultiSelectGamepadTest_ContentMode ()
void | TreeViewMultiSelectGamepadTest_NodeMode ()
void | TreeViewMultiSelectItemTest_ContentMode ()
void | TreeViewMultiSelectItemTest_NodeMode ()
void | TreeViewMultiSelectKeyboardingTest_ContentMode ()
void | TreeViewMultiSelectKeyboardingTest_NodeMode ()
void | TreeViewNodeInheritenceTest ()
void | TreeViewNodeInMarkupTest ()
void | TreeViewNonexistNodeAutomationPeerTest ()
void | TreeViewNoReorderIntoChildren_ContentMode ()
void | TreeViewNoReorderIntoChildren_NodeMode ()
void | TreeViewPartialSelectionTest_ContentMode ()
void | TreeViewPartialSelectionTest_NodeMode ()
void | TreeViewRootNodeBindingTest ()
void | TreeViewSelectedItemsTest ()
void | TreeViewSelectedItemTest ()
void | TreeViewSelectedNodesTest ()
void | TreeViewSelectedNodeTest ()
void | TreeViewSelectionChangeUIAEventsTest ()
void | TreeViewSelectRegressionTest ()
void | TreeViewSwappingNodesTest_ContentMode ()
void | TreeViewSwappingNodesTest_NodeMode ()
void | TreeViewWithMultiLevelChildrenExpandCollapseTest ()
void | ValidateCannotDragWithinSelectedSubtree_ContentMode ()
void | ValidateCannotDragWithinSelectedSubtree_NodeMode ()
void | ValidateExpandingRaisedOnItemHavingUnrealizedChildren_ContentMode ()
void | ValidateExpandingRaisedOnItemHavingUnrealizedChildren_NodeMode ()
void | ValidateMultiSelectDragDropRootsAndNonRoots_ContentMode ()
void | ValidateMultiSelectDragDropRootsAndNonRoots_NodeMode ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Member Functions

void | ClickButton (string buttonName)
void | DragItemOntoTreeView (bool isContentMode=false)
void | DragItemOutOfTreeView (bool isContentMode=false)
void | ExpandCollapseTest (bool isContentMode=false)
void | ExpandCollapseViaAutomationTest (bool isContentMode=false)
bool | IsPhoneDevice ()
UIObject | LabelFirstItem ()
string | ReadResult ()
void | SetContentMode (bool isContentMode)
void | TapOnFlyoutTreeViewRootItemChevron ()
void | TapOnTreeViewAt (double x, double y, string buttonName)
void | ToggleTreeViewItemCheckBox (UIObject item, int level)
void | TreeViewCollectionChangesEffectSelectedNodesTest (bool isContentMode=false)
void | TreeViewDisableItemDragTest (bool isContentMode=false)
void | TreeViewDisableItemReorderTest (bool isContentMode=false)
void | TreeViewDragAndDropBetweenNodes (bool isContentMode=false)
void | TreeViewDragAndDropOnNode (bool isContentMode=false)
void | TreeViewDragCrash (bool isContentMode=false)
void | TreeViewDragEnterOverDropTest (bool isContentMode=false)
void | TreeViewDragEnterOverLeaveTest (bool isContentMode=false)
void | TreeViewDragItemTest (bool isContentMode=false)
void | TreeViewDragMultipleItemsTest (bool isContentMode=false)
void | TreeViewExpandingEventTest (bool isContentMode=false)
void | TreeViewItemClickTest (bool isContentMode=false)
void | TreeViewItemUIATest (bool isContentMode=false)
void | TreeViewKeyboardReorderTest (bool isContentMode=false)
void | TreeViewKeyDownLeftToRightTest (bool isContentMode=false)
void | TreeViewKeyDownRightToLeftTest (bool isContentMode=false)
void | TreeViewMultiSelectDragAndDropBetweenNodes (bool isContentMode=false)
void | TreeViewMultiSelectDragAndDropOnNode (bool isContentMode=false)
void | TreeViewMultiSelectGamepadTest (bool isContentMode=false)
void | TreeViewMultiSelectItemTest (bool isContentMode=false)
void | TreeViewMultiSelectKeyboardingTest (bool isContentMode=false)
void | TreeViewNoReorderIntoChildren (bool isContentMode=false)
void | TreeViewPartialSelectionTest (bool isContentMode=false)
void | TreeViewSwappingNodesTest (bool isContentMode=false)
void | ValidateCannotDragWithinSelectedSubtree (bool isContentMode=false)
void | ValidateExpandingRaisedOnItemHavingUnrealizedChildren (bool isContentMode=false)
void | ValidateMultiSelectDragDropRootsAndNonRoots (bool isContentMode=false)
void | VerifyGamepadAPress (UIObject node, string expectedItemCount, string expectedSelection)

Detailed Description

Definition at line 22 of file TreeViewTests.cs.

Member Function Documentation

void CanExpandTreeViewItemWithItemSourceSet ( ) [inline]

Definition at line 2737 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewItemsSourceTestPage" }))
            {
                UIObject item1 = FindElement.ByName("Item 1");
                UIObject item2 = FindElement.ByName("Item 2");

                item1.SetFocus();
                AutomationElement item1Peer = AutomationElement.FocusedElement;
                var item1SelectionItemPeer = (SelectionItemPattern)item1Peer.GetCurrentPattern(SelectionItemPattern.Pattern);

                item2.SetFocus();
                AutomationElement item2Peer = AutomationElement.FocusedElement;
                var item2SelectionItemPeer = (SelectionItemPattern)item2Peer.GetCurrentPattern(SelectionItemPattern.Pattern);
                var item2ExpandCollapseItemPeer = (ExpandCollapsePattern)item2Peer.GetCurrentPattern(ExpandCollapsePattern.Pattern);

                item1SelectionItemPeer.AddToSelection();
                item2SelectionItemPeer.AddToSelection();

                Wait.ForIdle();

                item2ExpandCollapseItemPeer.Expand();

                Wait.ForIdle();

                item2ExpandCollapseItemPeer.Collapse();

                Wait.ForIdle();

                // If the bug repros, the app will crash here and the test will fail. If we get no crash, we can say the test passes.
                item2ExpandCollapseItemPeer.Expand();

                Wait.ForIdle();
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 30 of file TreeViewTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

void ClickButton ( string buttonName ) [inline, private]

Definition at line 2812 of file TreeViewTests.cs.

        {
            var button = new Button(FindElement.ByName(buttonName));
            button.InvokeAndWait();
            Wait.ForIdle();
        }

void DragItemOntoTreeView ( bool isContentMode = false ) [inline, private]

Definition at line 1268 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("SetupDragToDropTarget");
                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                UIObject dragUIObject = FindElement.ByName("DraggableElement");
                Verify.IsNotNull(dragUIObject);

                UIObject dropTarget = isContentMode ? FindElement.ByName("ContentModeTestTreeView") : FindElement.ByName("TestTreeView");

                Verify.IsNotNull(dropTarget);

                InputHelper.DragToTarget(dragUIObject, dropTarget);

                Verify.AreEqual("Dropped: Test Item", ReadResult());
            }
        }

void DragItemOntoTreeView_ContentMode ( ) [inline]

Definition at line 1316 of file TreeViewTests.cs.

        {
            DragItemOntoTreeView(isContentMode:true);
        }

void DragItemOntoTreeView_NodeMode ( ) [inline]

Definition at line 1308 of file TreeViewTests.cs.

        {
            DragItemOntoTreeView();
        }

void DragItemOutOfTreeView ( bool isContentMode = false ) [inline, private]

Definition at line 1209 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("SetupDragToDropTarget");
                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.2");
                Verify.IsNotNull(dragUIObject);

                UIObject dropTarget = FindElement.ByName("DropTarget");
                Verify.IsNotNull(dropTarget);

                Log.Comment($"Dragging from {dragUIObject} to {dropTarget}");
                InputHelper.DragToTarget(dragUIObject, dropTarget);

                TestEnvironment.VerifyAreEqualWithRetry(
                    5,
                    () => "Root.2",
                    () => new TextBlock(FindElement.ByName("DropTargetTextBlock")).DocumentText,
                    () => {
                        // The drag&drop operation may not have worked because the input is unreliable, just try again.
                        InputHelper.DragToTarget(dragUIObject, dropTarget);
                    });
            }
        }

void DragItemOutOfTreeView_ContentMode ( ) [inline]

Definition at line 1263 of file TreeViewTests.cs.

        {
            DragItemOutOfTreeView(isContentMode:true);
        }

void DragItemOutOfTreeView_NodeMode ( ) [inline]

Definition at line 1256 of file TreeViewTests.cs.

        {
            DragItemOutOfTreeView();
        }

void ExpandCollapseTest ( bool isContentMode = false ) [inline, private]

Definition at line 60 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                UIObject itemRoot = LabelFirstItem();

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                InputHelper.Tap(itemRoot);

                // Should be expanded now
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("AddSecondLevelOfNodes");
                ClickButton("LabelItems");

                var root0 = FindElement.ById("Root.0");
                InputHelper.Tap(root0);
                ClickButton("GetItemCount");
                Verify.AreEqual("5", ReadResult());

                InputHelper.Tap(itemRoot);
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                InputHelper.Tap(itemRoot);
                ClickButton("GetItemCount");
                Verify.AreEqual("5", ReadResult());

                var root1 = FindElement.ById("Root.1");
                InputHelper.Tap(root1);
                ClickButton("GetItemCount");
                Verify.AreEqual("8", ReadResult());

                // Collapse and expand
                InputHelper.Tap(itemRoot);
                InputHelper.Tap(itemRoot);
                ClickButton("GetItemCount");
                Verify.AreEqual("8", ReadResult());
            }
        }

void ExpandCollapseTest_ContentMode ( ) [inline]

Definition at line 122 of file TreeViewTests.cs.

        {
           ExpandCollapseTest(isContentMode:true);
        }

void ExpandCollapseTest_NodeMode ( ) [inline]

Definition at line 114 of file TreeViewTests.cs.

        {
           ExpandCollapseTest();
        }

void ExpandCollapseViaAutomationTest ( bool isContentMode = false ) [inline, private]

Definition at line 127 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                UIObject itemRoot = LabelFirstItem();

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                Log.Comment("Expand using UIA ExpandCollapse pattern");
                var expandCollapseImplementation = new ExpandCollapseImplementation(itemRoot);
                var expandWaiter = expandCollapseImplementation.GetExpandedWaiter();
                expandCollapseImplementation.Expand();
                expandWaiter.Wait(2000);

                // Should be expanded now
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                Log.Comment("Collapse using UIA ExpandCollapse pattern");
                var collapseWaiter = expandCollapseImplementation.GetCollapsedWaiter();
                expandCollapseImplementation.Collapse();
                collapseWaiter.Wait(2000);

                // Should be collapsed now
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                Log.Comment("Expand using UIA Invoke Pattern");
                var invokeImplementation = new InvokeImplementation(itemRoot);
                expandWaiter.Reset();
                invokeImplementation.Invoke();
                expandWaiter.Wait(2000);

                // Should be expanded now
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                Log.Comment("Collapse using UIA Invoke Pattern");
                collapseWaiter.Reset();
                invokeImplementation.Invoke();
                collapseWaiter.Wait(2000);

                // Should be collapsed now
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());
            }
        }

void ExpandCollapseViaAutomationTest_ContentMode ( ) [inline]

Definition at line 194 of file TreeViewTests.cs.

        {
            ExpandCollapseViaAutomationTest(isContentMode:true);
        }

void ExpandCollapseViaAutomationTest_NodeMode ( ) [inline]

Definition at line 186 of file TreeViewTests.cs.

        {
            ExpandCollapseViaAutomationTest();
        }

void FlyoutTreeViewItemClickTest ( ) [inline]

Definition at line 241 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone (bug #11244792).");
                    return;
                }

                // click button to popup flyout treeview
                ClickButton("TreeViewInFlyout");

                // expand tree
                TapOnFlyoutTreeViewRootItemChevron();

                ClickButton("GetFlyoutItemCount");
                Verify.AreEqual("4", ReadResult());

                // click button to hide flyout treeview
                ClickButton("TreeViewInFlyout");

                // click button to popup flyout treeview again
                ClickButton("TreeViewInFlyout");

                //Expand once more
                TapOnFlyoutTreeViewRootItemChevron();
                ClickButton("GetFlyoutItemCount");
                Verify.AreEqual("4", ReadResult());
            }
        }

void FlyoutTreeViewItemTabTest ( ) [inline]

Definition at line 277 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone (bug #11244792).");
                    return;
                }

                // click button to popup flyout treeview
                ClickButton("TreeViewInFlyout");

                // Give a little bit of time for the
                // flyout to show up.
                Wait.ForIdle();

                // expand tree
                TapOnFlyoutTreeViewRootItemChevron();

                // collapse and dismiss
                KeyboardHelper.PressKey(Key.Left);
                KeyboardHelper.PressKey(Key.Escape);

                // click button to popup flyout treeview
                ClickButton("TreeViewInFlyout");

                // Give a little bit of time for the
                // flyout to show up.
                Wait.ForIdle();

                // expand tree
                TapOnFlyoutTreeViewRootItemChevron();

                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);

                // Verify that app did not crash.
                ClickButton("GetFlyoutItemCount");
                Verify.AreEqual("4", ReadResult());
            }
        }

void FlyoutTreeViewSelectionChangedCrash ( ) [inline]

Definition at line 1377 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                if (PlatformConfiguration.IsDevice(DeviceType.Phone))
                {
                    Log.Warning("Test is disabled on phone (bug #11244792).");
                    return;
                }
                // click button to popup flyout treeview
                ClickButton("TreeViewInFlyout");

                // expand tree
                TapOnFlyoutTreeViewRootItemChevron();

                ClickButton("GetFlyoutItemCount");
                Verify.AreEqual("4", ReadResult());

                // tap button to hide flyout treeview
                UIObject flyoutButton = FindElement.ByName("TreeViewInFlyout");
                Verify.IsNotNull(flyoutButton, "Verifying that we found the button");
                InputHelper.Tap(flyoutButton);
                Wait.ForIdle();

                //Click Button to test for crash
                ClickButton("ChangeSelectionAfterFlyout");

                Log.Comment("Congratulations, no crash!");
            }
        }

void IsExpandedIsProperlyPreservedDuringItemRecycling ( ) [inline]

Definition at line 2776 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewItemsSourceTestPage" }))
            {
                ClickButton("SetUpContainerReuseTest1");
                ClickButton("ExpandSecondItem");

                UIObject root1 = FindElement.ByName("Root1");
                Verify.IsNotNull(root1, "Verifying that we found a UIElement called Root1");

                root1.SetFocus();
                AutomationElement root1Peer = AutomationElement.FocusedElement;

                // Verify that root1 is expanded
                var root1ExpandCollapseItemPeer = (ExpandCollapsePattern)root1Peer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
                Verify.AreEqual(ExpandCollapseState.Expanded, root1ExpandCollapseItemPeer.Current.ExpandCollapseState);

                ClickButton("ScrollToEndOfContentTreeView");
                Wait.ForIdle();
                Wait.ForSeconds(5);
                ClickButton("ScrollToTopOfContentTreeView");
                Wait.ForIdle();

                // Verify tree view item is still expanded
                ElementCache.Refresh();
                root1 = FindElement.ByName("Root1");
                Verify.IsNotNull(root1, "Verifying that we found a UIElement called Root1");

                root1.SetFocus();
                root1Peer = AutomationElement.FocusedElement;

                root1ExpandCollapseItemPeer = (ExpandCollapsePattern)root1Peer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
                Verify.AreEqual(ExpandCollapseState.Expanded, root1ExpandCollapseItemPeer.Current.ExpandCollapseState);
            }
        }

bool IsPhoneDevice ( ) [inline, private]

Definition at line 41 of file TreeViewTests.cs.

        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Warning("Test is disabled on phone (bug #11244792/11318650).");
                return true;
            }

            return false;
        }

void ItemsSourceResyncTest ( ) [inline]

Definition at line 2637 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(true);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("ResetItemsSource");
                Wait.ForIdle();
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("ResetItemsSourceAsync");
                Wait.ForIdle();
                ClickButton("GetItemCount");
                Verify.AreEqual("6", ReadResult());
            }
        }

void ItemsSourceSwitchForthAndBackTest ( ) [inline]

Definition at line 2660 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(true);

                ClickButton("SwapItemsSource");
                Wait.ForIdle();
                ClickButton("GetItemCount");
                Verify.AreEqual("2", ReadResult());

                ClickButton("SwapItemsSource");
                Wait.ForIdle();
                ClickButton("ExpandRootNode");
                Wait.ForIdle();
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());
            }
        }

UIObject LabelFirstItem ( ) [inline, private]

Definition at line 2843 of file TreeViewTests.cs.

        {
            ClickButton("LabelItems");
            Log.Comment("Retrieve first item as generic UIElement");
            UIObject ItemRoot = FindElement.ById("Root");
            Verify.IsNotNull(ItemRoot, "Verifying that we found a UIElement called Root");
            return ItemRoot;
        }

string ReadResult ( ) [inline, private]

Definition at line 2819 of file TreeViewTests.cs.

        {
            var results = new TextBlock(FindElement.ByName("Results"));
            return results.DocumentText;
        }

void SelectedItemBindingsWork ( ) [inline]

Definition at line 2682 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                var setContentButton = new Button(FindElement.ByName("TwoWayBoundButton"));
                var setSelectedItemButton = new Button(FindElement.ByName("SelectRoot2Item"));
                var readResultButton = new Button(FindElement.ByName("ReadBindingResult"));

                setContentButton.Click();
                Wait.ForIdle();

                readResultButton.Click();
                Wait.ForIdle();
                Verify.AreEqual("Root.1;Root.1",ReadResult());

                setSelectedItemButton.Click();
                Wait.ForIdle();
                readResultButton.Click();
                Wait.ForIdle();
                Verify.AreEqual("Root.2;Root.2", ReadResult());
            }
        }

void SetContentMode ( bool isContentMode ) [inline, private]

Definition at line 52 of file TreeViewTests.cs.

        {
            if(isContentMode)
            {
                ClickButton("SetContentMode");
            }
        }

void SingleSelectWithUnrealizedChildrenDoesNotMoveSelection ( ) [inline]

Definition at line 2707 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewUnrealizedChildrenTestPage" }))
            {
                TapOnTreeViewAt(50, 12, "GetSelectedItemName");

                Log.Comment("Selecting item");
                ClickButton("GetSelectedItemName");
                Wait.ForIdle();

                Log.Comment("Verifying current selection");
                var textBlock = new TextBlock(FindElement.ByName("SelectedItemName"));
                Verify.AreEqual("Item: 0; layer: 3", textBlock.GetText());

                Log.Comment("Expanding selected item");
                TapOnTreeViewAt(12, 12, "GetSelectedItemName");
                Wait.ForIdle();

                Log.Comment("Verifying selection again");
                ClickButton("GetSelectedItemName");
                Wait.ForIdle();
                textBlock = new TextBlock(FindElement.ByName("SelectedItemName"));
                Verify.AreEqual("Item: 0; layer: 3", textBlock.GetText());
            }
        }

void TapOnFlyoutTreeViewRootItemChevron ( ) [inline, private]

Definition at line 2836 of file TreeViewTests.cs.

        {
            // Chevron has 12px left padding, and it's 12px wide.
            // 18 is the center point of chevron.
            TapOnTreeViewAt(18, 20, "GetFlyoutItemCount");
        }

void TapOnTreeViewAt | ( | double | x,
 |  | double | y,
 |  | string | buttonName |
 | ) |  |  | [inline, private]

Definition at line 2825 of file TreeViewTests.cs.

        {
            // Note: Unable to get the treeview UIObject. Using the button above and accounting
            // for its height as a workaround.
            UIObject buttonAboveTreeView = FindElement.ByName(buttonName);
            Verify.IsNotNull(buttonAboveTreeView, "Verifying that we found a UIElement called" + buttonName);

            InputHelper.Tap(buttonAboveTreeView, x, buttonAboveTreeView.BoundingRectangle.Height + y);
            Wait.ForIdle();
        }

void TestCleanup ( ) [inline]

Definition at line 36 of file TreeViewTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ToggleTreeViewItemCheckBox | ( | UIObject | item,
 |  | int | level |
 | ) |  |  | [inline, private]

Definition at line 2863 of file TreeViewTests.cs.

        {
            InputHelper.Tap(item, item.BoundingRectangle.Width * 0.05 * level, item.BoundingRectangle.Height * .5);
        }

void TreeViewCollectionChangesEffectSelectedNodesTest ( bool isContentMode = false ) [inline, private]

Definition at line 825 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("ToggleSelectionMode");

                UIObject ItemRoot = LabelFirstItem();
                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Nothing selected", ReadResult());

                InputHelper.Tap(ItemRoot);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());

                ClickButton("AddSecondLevelOfNodes");

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.0.0, Root.1, Root.1.0, Root.1.1, Root.1.2", ReadResult());

                ClickButton("ModifySecondLevelOfNode");
                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.1, Root.1.0, Root.1.1, Root.1.2, THIS IS NEW", ReadResult());

                ClickButton("RemoveSecondLevelOfNode");
                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.1, Root.1.0, Root.1.1, Root.1.2", ReadResult());
            }
        }

void TreeViewCollectionChangesEffectSelectedNodesTest_ContentMode ( ) [inline]

Definition at line 883 of file TreeViewTests.cs.

        {
            TreeViewCollectionChangesEffectSelectedNodesTest(isContentMode:true);
        }

void TreeViewCollectionChangesEffectSelectedNodesTest_NodeMode ( ) [inline]

Definition at line 875 of file TreeViewTests.cs.

        {
            TreeViewCollectionChangesEffectSelectedNodesTest();
        }

void TreeViewDataLateInitTest ( ) [inline]

Definition at line 2529 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewLateDataInitTestPage" }))
            {
                ClickButton("InitializeItemsSource");
                Wait.ForIdle();
                UIObject node1 = FindElement.ByName("Root");
                Verify.IsNotNull(node1, "Verify data binding");
            }
        }

void TreeViewDensityChange ( ) [inline]

Definition at line 807 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                UIObject root = LabelFirstItem();
                int height = root.BoundingRectangle.Height;
                Verify.AreEqual(height, 28);
            }
        }

void TreeViewDisableItemDragTest ( bool isContentMode = false ) [inline, private]

Definition at line 1965 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("SetupDragDropHandlersForApiTest");
                ClickButton("DisableItemDrag");

                var root = new TreeItem(LabelFirstItem());
                root.Expand();
                Wait.ForIdle();

                ClickButton("LabelItems");
                UIObject dragUIObject = FindElement.ById("Root.1");
                Verify.IsNotNull(dragUIObject, "Verifying that we found UIElement root1");

                UIObject dropUIObject = FindElement.ById("Root.2");
                Verify.IsNotNull(dropUIObject, "Verifying that we found UIElement root2");

                InputHelper.DragToTarget(dragUIObject, dropUIObject);

                // Verify drag item events (DragItemsStarting, DragItemsCompleted) didn't get called
                Verify.AreEqual("", ReadResult());
            }
        }

void TreeViewDisableItemDragTest_ContentMode ( ) [inline]

Definition at line 2006 of file TreeViewTests.cs.

        {
            TreeViewDisableItemDragTest(isContentMode:true);
        }

void TreeViewDisableItemDragTest_NodeMode ( ) [inline]

Definition at line 1999 of file TreeViewTests.cs.

        {
            TreeViewDisableItemDragTest();
        }

void TreeViewDisableItemReorderKeyboardTest ( ) [inline]

Definition at line 2078 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                var ItemRoot = LabelFirstItem();
                InputHelper.Tap(ItemRoot);

                ClickButton("LabelItems");
                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());

                ClickButton("DisableClickToExpand");

                var root0 = FindElement.ById("Root.0");
                Verify.IsNotNull(root0, "Verifying Root.0 is found");

                // Verify we can reorder items using keyboard by default
                InputHelper.Tap(root0);
                KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.0 | Root.2", ReadResult());

                ClickButton("DisableItemReorder");

                // Verify reorder is disabled
                InputHelper.Tap(root0);
                KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.0 | Root.2", ReadResult());
            }
        }

void TreeViewDisableItemReorderTest ( bool isContentMode = false ) [inline, private]

Definition at line 2011 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("LabelItems");
                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());

                ClickButton("DisableItemReorder");

                UIObject dragUIObject = FindElement.ById("Root.0");
                Verify.IsNotNull(dragUIObject, "Verifying Root.0 is found");

                var height = dragUIObject.BoundingRectangle.Height;

                Log.Comment("Verify cannot drag between nodes");
                // Drag Root.0 to the middle of Root.1 and Root.2
                var distance = (int)(height * 1.5);

                Log.Comment("Starting Drag...distance:" + distance);
                InputHelper.DragDistance(dragUIObject, distance, Direction.South);

                ClickButton("GetChildrenOrder");
                // Verify nodes are still in the same order
                Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());

                Log.Comment("Verify cannot drag onto a node");
                // Drag Root.0 onto Root.1
                var root1 = FindElement.ById("Root.1");
                InputHelper.DragToTarget(dragUIObject, root1);

                ClickButton("GetChildrenOrder");
                // Verify nodes are still in the same order
                Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());
            }
        }

void TreeViewDisableItemReorderTest_ContentMode ( ) [inline]

Definition at line 2071 of file TreeViewTests.cs.

        {
            TreeViewDisableItemReorderTest(isContentMode:true);
        }

void TreeViewDisableItemReorderTest_NodeMode ( ) [inline]

Definition at line 2064 of file TreeViewTests.cs.

        {
            TreeViewDisableItemReorderTest();
        }

void TreeViewDragAndDropBetweenNodes ( bool isContentMode = false ) [inline, private]

Definition at line 746 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.0");

                var height = dragUIObject.BoundingRectangle.Height;
                // Drag distance is 1.75 times the height of a TreeViewItem
                var distance = (int)(height * 1.75);

                Log.Comment("Click on the item to help make the drag more reliable");
                dragUIObject.Click();

                Log.Comment("Starting Drag...distance:" + distance);
                InputHelper.DragDistance(dragUIObject, distance, Direction.South);

                TestEnvironment.VerifyAreEqualWithRetry(
                    5,
                    () => "Root | Root.1 | Root.0 | Root.2",
                    () => {
                        ClickButton("GetChildrenOrder");
                        return ReadResult();
                    });

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("GetItemCommonStates");
                Verify.AreEqual("Normal Normal Normal Normal", ReadResult().Trim());
            }
        }

void TreeViewDragAndDropBetweenNodes_ContentMode ( ) [inline]

Definition at line 820 of file TreeViewTests.cs.

        {
            TreeViewDragAndDropBetweenNodes(isContentMode:true);
        }

void TreeViewDragAndDropBetweenNodes_NodeMode ( ) [inline]

Definition at line 800 of file TreeViewTests.cs.

        {
            TreeViewDragAndDropBetweenNodes();
        }

void TreeViewDragAndDropOnNode ( bool isContentMode = false ) [inline, private]

Definition at line 691 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.0");
                Verify.IsNotNull(dragUIObject, "Verifying that we found a UIElement called Root.0");

                UIObject dropUIObject = FindElement.ById("Root.1");
                Verify.IsNotNull(dropUIObject, "Verifying that we found a UIElement called Root.1");

                InputHelper.DragToTarget(dragUIObject, dropUIObject);

                ClickButton("GetItemCount");
                Verify.AreEqual("3", ReadResult());

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.0 | Root.2", ReadResult());
            }
        }

void TreeViewDragAndDropOnNode_ContentMode ( ) [inline]

Definition at line 741 of file TreeViewTests.cs.

        {
            TreeViewDragAndDropOnNode(isContentMode:true);
        }

void TreeViewDragAndDropOnNode_NodeMode ( ) [inline]

Definition at line 733 of file TreeViewTests.cs.

        {
            TreeViewDragAndDropOnNode();
        }

void TreeViewDragCrash ( bool isContentMode = false ) [inline, private]

Definition at line 1160 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("SizeTreeViewsForDrags");
                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.2");
                Verify.IsNotNull(dragUIObject);

                //Drag along the entire TreeView, to cover all possible DragOver scenarios
                var distance = 90;

                Log.Comment("Starting Drag...distance:" + distance);
                InputHelper.DragDistance(dragUIObject, distance, Direction.South);

                Log.Comment("Congratulations, No Crash!");

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());
            }
        }

void TreeViewDragCrash_ContentMode ( ) [inline]

Definition at line 1204 of file TreeViewTests.cs.

        {
            TreeViewDragCrash(isContentMode:true);
        }

void TreeViewDragCrash_NodeMode ( ) [inline]

Definition at line 1197 of file TreeViewTests.cs.

        {
            TreeViewDragCrash();
        }

void TreeViewDragEnterOverDropTest ( bool isContentMode = false ) [inline, private]

Definition at line 1924 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("SetupDragDropHandlersForApiTest");

                UIObject dragUIObject = isContentMode ? FindElement.ByName("DraggableElement2") : FindElement.ByName("DraggableElement");
                Verify.IsNotNull(dragUIObject, "Verifying draggable element is found");

                UIObject dropUIObject = isContentMode ? FindElement.ByName("ContentModeTestTreeView2") : FindElement.ByName("TestTreeView2");
                Verify.IsNotNull(dropUIObject, "Verifying TestTreeView2 is found");

                InputHelper.DragToTarget(dragUIObject, dropUIObject);

                Verify.AreEqual("DragEnter->DragOver->Drop", ReadResult());
            }
        }

void TreeViewDragEnterOverDropTest_ContentMode ( ) [inline]

Definition at line 1960 of file TreeViewTests.cs.

        {
            TreeViewDragEnterOverDropTest(isContentMode:true);
        }

void TreeViewDragEnterOverDropTest_NodeMode ( ) [inline]

Definition at line 1952 of file TreeViewTests.cs.

        {
            TreeViewDragEnterOverDropTest();
        }

void TreeViewDragEnterOverLeaveTest ( bool isContentMode = false ) [inline, private]

Definition at line 1882 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("SetupDragDropHandlersForApiTest");

                UIObject dragUIObject = isContentMode ? FindElement.ByName("DraggableElement2") : FindElement.ByName("DraggableElement");
                Verify.IsNotNull(dragUIObject, "Verifying draggable element is found");

                UIObject dropUIObject = isContentMode ? FindElement.ByName("ContentModeTestTreeView") : FindElement.ByName("TestTreeView");
                Verify.IsNotNull(dropUIObject, "Verifying TreeView is found");

                // drag draggable into TestTreeView to test TestTreeView2's DragLeave event
                InputHelper.DragToTarget(dragUIObject, dropUIObject);

                Verify.AreEqual("DragEnter->DragOver->DragLeave", ReadResult());
            }
        }

void TreeViewDragEnterOverLeaveTest_ContentMode ( ) [inline]

Definition at line 1919 of file TreeViewTests.cs.

        {
            TreeViewDragEnterOverLeaveTest(isContentMode:true);
        }

void TreeViewDragEnterOverLeaveTest_NodeMode ( ) [inline]

Definition at line 1911 of file TreeViewTests.cs.

        {
            TreeViewDragEnterOverLeaveTest();
        }

void TreeViewDragItemTest ( bool isContentMode = false ) [inline, private]

Definition at line 1798 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("SetupDragDropHandlersForApiTest");
                UIObject dragUIObject = LabelFirstItem();
                InputHelper.DragDistance(dragUIObject, dragUIObject.BoundingRectangle.Height, Direction.South);
                Verify.AreEqual("DragItemsStarting:Root\nDragItemsCompleted:Root", ReadResult());
            }
        }

void TreeViewDragItemTest_ContentMode ( ) [inline]

Definition at line 1825 of file TreeViewTests.cs.

        {
            TreeViewDragItemTest(isContentMode:true);
        }

void TreeViewDragItemTest_NodeMode ( ) [inline]

Definition at line 1818 of file TreeViewTests.cs.

        {
            TreeViewDragItemTest();
        }

void TreeViewDragMultipleItemsTest ( bool isContentMode = false ) [inline, private]

Definition at line 1830 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("ToggleSelectionMode");
                ClickButton("SetupDragDropHandlersForApiTest");

                UIObject ItemRoot = LabelFirstItem();
                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());

                UIObject dragUIObject = FindElement.ByName("Root.0");
                Verify.IsNotNull(dragUIObject, "Verifying Root.0 is found");
                UIObject dropUIObject = FindElement.ByName("Root.2");
                Verify.IsNotNull(dropUIObject, "Verifying Root.2 is found");
                InputHelper.DragToTarget(dragUIObject, dropUIObject);
                Verify.AreEqual("DragItemsStarting:Root.0|Root.1\nDragItemsCompleted:Root.0|Root.1\nNewParent: Root.2", ReadResult());
            }
        }

void TreeViewDragMultipleItemsTest_ContentMode ( ) [inline]

Definition at line 1877 of file TreeViewTests.cs.

        {
            TreeViewDragMultipleItemsTest(isContentMode:true);
        }

void TreeViewDragMultipleItemsTest_NodeMode ( ) [inline]

Definition at line 1869 of file TreeViewTests.cs.

        {
            TreeViewDragMultipleItemsTest();
        }

void TreeViewExpandingEventTest ( bool isContentMode = false ) [inline, private]

Definition at line 549 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("SetUpExpandingNodeEvent");

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                // Should be expanded now
                Verify.AreEqual("ItemClicked:Root", ReadResult());

                ClickButton("GetItemCount");
                Verify.AreEqual("5", ReadResult());

                ClickButton("DisableClickToExpand");

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Right);

                Verify.AreEqual("Loaded", ReadResult());
                ClickButton("GetItemCount");
                Verify.AreEqual("8", ReadResult());
            }
        }

void TreeViewExpandingEventTest_ContentMode ( ) [inline]

Definition at line 599 of file TreeViewTests.cs.

        {
            TreeViewExpandingEventTest(isContentMode:true);
        }

void TreeViewExpandingEventTest_NodeMode ( ) [inline]

Definition at line 591 of file TreeViewTests.cs.

        {
            TreeViewExpandingEventTest();
        }

void TreeViewExpandNodeWithUnrealizedChildrenCrash ( ) [inline]

Definition at line 2133 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                ClickButton("AddNodeWithEmpyUnrealizedChildren");
                ClickButton("DisableClickToExpand");
                UIObject root = LabelFirstItem();
                InputHelper.Tap(root);

                // Expand root
                KeyboardHelper.PressKey(Key.Right);
                // Move down to root.3
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                // Expand root.3
                KeyboardHelper.PressKey(Key.Right);

                ClickButton("GetItemCount");
                Verify.AreEqual("5", ReadResult());
            }
        }

void TreeViewFastReorderTest ( ) [inline]

Definition at line 2505 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                ClickButton("AddExtraNodes");
                ClickButton("LabelItems");
                var node = FindElement.ById("Node 1");
                Verify.IsNotNull(node);
                node.SetFocus();
                Log.Comment("Move down node 1");
                var originalDelay = Keyboard.SendKeysDelay;
                Keyboard.SendKeysDelay = 10;

                KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift, 50);
                Log.Comment("Move up node 1");
                KeyboardHelper.PressKey(Key.Up, ModifierKey.Alt | ModifierKey.Shift, 50);
                Log.Comment("App didn't crash");

                Keyboard.SendKeysDelay = originalDelay;
            }
        }

void TreeViewItemAutomationPeerSelectionItemPatternTest ( ) [inline]

Definition at line 2424 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                ClickButton("AddSecondLevelOfNodes");
                var root = LabelFirstItem();
                root.SetFocus();
                AutomationElement rootPeer = AutomationElement.FocusedElement;

                // single selection mode by default
                int index = Array.IndexOf(rootPeer.GetSupportedPatterns(), SelectionItemPatternIdentifiers.Pattern);
                Verify.IsGreaterThanOrEqual(index, 0);

                // click twice to switch to none selection mode
                ClickButton("ToggleSelectionMode");
                ClickButton("ToggleSelectionMode");

                index = Array.IndexOf(rootPeer.GetSupportedPatterns(), SelectionItemPatternIdentifiers.Pattern);
                Verify.IsLessThan(index, 0);
            }
        }

void TreeViewItemClickTest ( bool isContentMode = false ) [inline, private]

Definition at line 199 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                UIObject ItemRoot = LabelFirstItem();

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                InputHelper.Tap(ItemRoot);

                // Should be expanded now
                Verify.AreEqual("ItemClicked:Root", ReadResult());
            }
        }

void TreeViewItemClickTest_ContentMode ( ) [inline]

Definition at line 233 of file TreeViewTests.cs.

        {
            TreeViewItemClickTest(isContentMode:true);
        }

void TreeViewItemClickTest_NodeMode ( ) [inline]

Definition at line 225 of file TreeViewTests.cs.

        {
            TreeViewItemClickTest();
        }

void TreeViewItemTemplateSelectorTest ( ) [inline]

Definition at line 2112 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "ItemTemplateSelectorTestPage" }))
            {
                Log.Comment("ItemTemplateSelector test page is ready");
                UIObject node1 = FindElement.ByName("Template1");
                Verify.IsNotNull(node1, "Verifying template 1 is set");
                UIObject node2 = FindElement.ByName("Template2");
                Verify.IsNotNull(node2, "Verifying template 2 is set");

                var topBottomMargin = 4; // To account for the 2px top and 2px bottom margins for TreeViewItem

                // Verify item container styles are set correctly by checking heights
                Verify.AreEqual(node1.BoundingRectangle.Height, 50 - topBottomMargin);
                Verify.AreEqual(node2.BoundingRectangle.Height, 60 - topBottomMargin);
            }
        }

void TreeViewItemUIATest ( bool isContentMode = false ) [inline, private]

Definition at line 1610 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("LabelItems");

                Log.Comment("Retrieve first item as generic UIElement");
                UIObject Item1 = FindElement.ById("Root.1");
                Verify.IsNotNull(Item1, "Verifying that we found a UIElement called Root.1");

                Item1.SetFocus();
                AutomationElement itemPeer = AutomationElement.FocusedElement;

                // object valuePatternAsObject;
                int positionInSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                int sizeOfSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
                int level = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.LevelProperty);

                Verify.AreEqual(2, positionInSet, "Position in set.");
                Verify.AreEqual(3, sizeOfSet, "Size of set.");
                Verify.AreEqual(2, level, "Level in tree.");

                var expandCollapsePattern = (ExpandCollapsePattern)itemPeer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
                Verify.AreEqual(ExpandCollapseState.LeafNode, expandCollapsePattern.Current.ExpandCollapseState);

                ItemRoot.SetFocus();
                AutomationElement rootPeer = AutomationElement.FocusedElement;
                expandCollapsePattern = (ExpandCollapsePattern)rootPeer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
                Verify.AreEqual(ExpandCollapseState.Expanded, expandCollapsePattern.Current.ExpandCollapseState);

                // Select root and check selection pattern.
                InputHelper.Tap(ItemRoot);
                var rootSelectionItemPattern = (SelectionItemPattern)rootPeer.GetCurrentPattern(SelectionItemPattern.Pattern);
                Verify.AreEqual(true, rootSelectionItemPattern.Current.IsSelected);

                // Expand and look at IsSelected for root and first child. Root should still be selected and first child should not.
                InputHelper.Tap(ItemRoot);
                ClickButton("LabelItems");
                UIObject item1 = FindElement.ById("Root.1");
                Verify.IsNotNull(item1, "Verifying that we found a UIElement called Root.1");

                item1.SetFocus();
                AutomationElement item1Peer = AutomationElement.FocusedElement;
                var item1SelectionItemPattern = (SelectionItemPattern)item1Peer.GetCurrentPattern(SelectionItemPattern.Pattern);
                Verify.AreEqual(false, item1SelectionItemPattern.Current.IsSelected);
                Verify.AreEqual(true, rootSelectionItemPattern.Current.IsSelected);

                // Select item1
                item1SelectionItemPattern.AddToSelection();
                Verify.AreEqual(true, item1SelectionItemPattern.Current.IsSelected);

                // Go to multi select mode
                ClickButton("ToggleSelectionMode");

                ClickButton("LabelItems");
                item1 = FindElement.ById("Root.1");
                Verify.IsNotNull(item1, "Verifying that we found a UIElement called Root.1");

                item1.SetFocus();
                KeyboardHelper.PressKey(Key.Space);
                item1Peer = AutomationElement.FocusedElement;
                item1SelectionItemPattern = (SelectionItemPattern)item1Peer.GetCurrentPattern(SelectionItemPattern.Pattern);
                Verify.AreEqual(true, item1SelectionItemPattern.Current.IsSelected);
                Verify.AreEqual(false, rootSelectionItemPattern.Current.IsSelected);

                // Deselect item1
                item1SelectionItemPattern.RemoveFromSelection();
                Verify.AreEqual(false, item1SelectionItemPattern.Current.IsSelected);

                // Select Root, which should select all its children as well.
                rootSelectionItemPattern.AddToSelection();
                Verify.AreEqual(true, rootSelectionItemPattern.Current.IsSelected);
                Verify.AreEqual(true, item1SelectionItemPattern.Current.IsSelected);
            }
        }

void TreeViewItemUIATest_ContentMode ( ) [inline]

Definition at line 1743 of file TreeViewTests.cs.

        {
            TreeViewItemUIATest(isContentMode:true);
        }

void TreeViewItemUIATest_NodeMode ( ) [inline]

Definition at line 1735 of file TreeViewTests.cs.

        {
            TreeViewItemUIATest();
        }

void TreeViewKeyboardReorderTest ( bool isContentMode = false ) [inline, private]

Definition at line 604 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("DisableClickToExpand");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                Verify.AreEqual("ItemClicked:Root", ReadResult());

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Enter);

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
                KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Up, ModifierKey.Alt | ModifierKey.Shift);

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());
            }
        }

void TreeViewKeyboardReorderTest_ContentMode ( ) [inline]

Definition at line 686 of file TreeViewTests.cs.

        {
            TreeViewKeyboardReorderTest(isContentMode:true);
        }

void TreeViewKeyboardReorderTest_NodeMode ( ) [inline]

Definition at line 678 of file TreeViewTests.cs.

        {
            TreeViewKeyboardReorderTest();
        }

void TreeViewKeyDownLeftToRightTest ( bool isContentMode = false ) [inline, private]

Definition at line 319 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                UIObject ItemRoot = LabelFirstItem();

                ClickButton("DisableClickToExpand");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                InputHelper.Tap(ItemRoot);

                Verify.AreEqual("ItemClicked:Root", ReadResult());

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Right);

                ClickButton("GetItemCount");
                Log.Comment("Verify that ItemRoot has expanded.");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Enter);
                Log.Comment("Verify that we are on first child.");
                Verify.AreEqual("ItemClicked:Root.0", ReadResult());

                KeyboardHelper.PressKey(Key.Left);
                KeyboardHelper.PressKey(Key.Enter);
                Log.Comment("Verify that we are on Root.");
                Verify.AreEqual("ItemClicked:Root", ReadResult());

                KeyboardHelper.PressKey(Key.Left);

                Log.Comment("Verify that ItemRoot has collapsed.");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                // Validate Gamepad left/right dpad
                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadRight);
                Log.Comment("Verify that ItemRoot has expanded.");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadLeft);
                Log.Comment("Verify that ItemRoot has collapsed.");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                // Validate Gamepad left/right on left thumbstick
                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickRight);
                Log.Comment("Verify that ItemRoot has expanded.");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickLeft);
                Log.Comment("Verify that ItemRoot has collapsed.");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());
            }
        }

void TreeViewKeyDownLeftToRightTest_ContentMode ( ) [inline]

Definition at line 408 of file TreeViewTests.cs.

        {
            TreeViewKeyDownLeftToRightTest(isContentMode: true);
        }

void TreeViewKeyDownLeftToRightTest_NodeMode ( ) [inline]

Definition at line 400 of file TreeViewTests.cs.

        {
            TreeViewKeyDownLeftToRightTest();
        }

void TreeViewKeyDownRightToLeftTest ( bool isContentMode = false ) [inline, private]

Definition at line 413 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("ChangeFlowDirection");
                ClickButton("DisableClickToExpand");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                Verify.AreEqual("ItemClicked:Root", ReadResult());
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Left);
                ClickButton("GetItemCount");
                Log.Comment("Verify that ItemRoot has expanded.");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);

                KeyboardHelper.PressKey(Key.Left);
                KeyboardHelper.PressKey(Key.Enter);
                Log.Comment("Verify that we are on first child.");
                Verify.AreEqual("ItemClicked:Root.0", ReadResult());

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Enter);
                Log.Comment("Verify that we are on Root.");
                Verify.AreEqual("ItemClicked:Root", ReadResult());

                KeyboardHelper.PressKey(Key.Right);

                Log.Comment("Verify that ItemRoot has collapsed.");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                // Validate Gamepad left/right
                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadLeft);
                Log.Comment("Verify that ItemRoot has expanded.");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadRight);
                Log.Comment("Verify that ItemRoot has collapsed.");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                // Validate Gamepad left/right on left thumbstick
                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickLeft);
                Log.Comment("Verify that ItemRoot has expanded.");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ItemRoot.SetFocus();
                GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickRight);
                Log.Comment("Verify that ItemRoot has collapsed.");
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());
            }
        }

void TreeViewKeyDownRightToLeftTest_ContentMode ( ) [inline]

Definition at line 499 of file TreeViewTests.cs.

        {
            TreeViewKeyDownRightToLeftTest(isContentMode:true);
        }

void TreeViewKeyDownRightToLeftTest_NodeMode ( ) [inline]

Definition at line 492 of file TreeViewTests.cs.

        {
            TreeViewKeyDownRightToLeftTest();
        }

void TreeViewListMultipleSelectionUIATest ( ) [inline]

Definition at line 1699 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(false);

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("LabelItems");
                ClickButton("ToggleSelectionMode");

                Log.Comment("Retrieve first item as generic UIElement");
                UIObject Item1 = FindElement.ById("Root.1");
                Verify.IsNotNull(Item1, "Verifying that we found a UIElement called Root.1");

                Item1.SetFocus();
                AutomationElement itemPeer = AutomationElement.FocusedElement;

                var selectionItemPeer = (SelectionItemPattern)itemPeer.GetCurrentPattern(SelectionItemPattern.Pattern);
                var treeViewListPeer = selectionItemPeer.Current.SelectionContainer;

                var multipleSelectionPattern = (SelectionPattern)treeViewListPeer.GetCurrentPattern(SelectionPattern.Pattern);
                Verify.IsNotNull(multipleSelectionPattern);
                Verify.IsTrue(multipleSelectionPattern.Current.CanSelectMultiple);
                Verify.IsFalse(multipleSelectionPattern.Current.IsSelectionRequired);
                var elements = multipleSelectionPattern.Current.GetSelection();
                Verify.IsNotNull(elements);
                Verify.AreEqual(0, elements.Length);
            }
        }

void TreeViewMultiSelectDragAndDropBetweenNodes ( bool isContentMode = false ) [inline, private]

Definition at line 950 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("ToggleSelectionMode");

                UIObject ItemRoot = LabelFirstItem();
                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.1");

                var height = dragUIObject.BoundingRectangle.Height;
                // Drag distance is 1.75 times the height of a TreeViewItem
                var distance = (int)(height * 1.75);

                Log.Comment("Starting Drag...distance:" + distance);
                InputHelper.DragDistance(dragUIObject, distance, Direction.South);

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.2 | Root.0 | Root.1", ReadResult());

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());
            }
        }

void TreeViewMultiSelectDragAndDropBetweenNodes_ContentMode ( ) [inline]

Definition at line 1014 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectDragAndDropBetweenNodes(isContentMode:true);
        }

void TreeViewMultiSelectDragAndDropBetweenNodes_NodeMode ( ) [inline]

Definition at line 1006 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectDragAndDropBetweenNodes();
        }

void TreeViewMultiSelectDragAndDropOnNode ( bool isContentMode = false ) [inline, private]

Definition at line 888 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("ToggleSelectionMode");

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.0");
                Verify.IsNotNull(dragUIObject, "Verifying that we found a UIElement called Root.0");

                UIObject dropUIObject = FindElement.ById("Root.2");
                Verify.IsNotNull(dropUIObject, "Verifying that we found a UIElement called Root.2");

                InputHelper.DragToTarget(dragUIObject, dropUIObject);

                ClickButton("GetItemCount");
                Verify.AreEqual("2", ReadResult());

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.2 | Root.0 | Root.1", ReadResult());
            }
        }

void TreeViewMultiSelectDragAndDropOnNode_ContentMode ( ) [inline]

Definition at line 945 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectDragAndDropOnNode(isContentMode:true);
        }

void TreeViewMultiSelectDragAndDropOnNode_NodeMode ( ) [inline]

Definition at line 937 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectDragAndDropOnNode();
        }

void TreeViewMultiSelectGamepadTest ( bool isContentMode = false ) [inline, private]

Definition at line 1555 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("ToggleSelectionMode");
                UIObject treeRoot = LabelFirstItem();

                // Tree is collapsed, and nothing is selected
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                // First A expands the tree
                VerifyGamepadAPress(treeRoot, "4", "Nothing selected");

                // Second A selects root and all children
                VerifyGamepadAPress(treeRoot, "4", "Selected: Root, Root.0, Root.1, Root.2");

                // Third A unselects
                VerifyGamepadAPress(treeRoot, "4", "Nothing selected");

                // Fourth A collapses
                VerifyGamepadAPress(treeRoot, "1", "Nothing selected");

                // Fifth A selects
                VerifyGamepadAPress(treeRoot, "1", "Selected: Root, Root.0, Root.1, Root.2");

                // Sixth A unselects
                VerifyGamepadAPress(treeRoot, "1", "Nothing selected");

                // Seventh A expands again
                VerifyGamepadAPress(treeRoot, "4", "Nothing selected");
            }
        }

void TreeViewMultiSelectGamepadTest_ContentMode ( ) [inline]

Definition at line 1605 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectGamepadTest(isContentMode:true);
        }

void TreeViewMultiSelectGamepadTest_NodeMode ( ) [inline]

Definition at line 1598 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectGamepadTest();
        }

void TreeViewMultiSelectItemTest ( bool isContentMode = false ) [inline, private]

Definition at line 1491 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("ToggleSelectionMode");
                ClickButton("LabelItems");

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());
                ClickButton("LabelItems");

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .05, ItemRoot.BoundingRectangle.Height * .5);
                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());

                Log.Comment("Retrieve first item as generic UIElement");
                UIObject Item0 = FindElement.ById("Root.0");
                Verify.IsNotNull(ItemRoot, "Verifying that we found a UIElement called Root.0");

                InputHelper.Tap(Item0, Item0.BoundingRectangle.Width * .1, Item0.BoundingRectangle.Height * .5);
                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.1, Root.2", ReadResult());

                // tap on partial selected node will set it to unselected state
                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .05, ItemRoot.BoundingRectangle.Height * .5);
                ClickButton("GetSelected");
                Verify.AreEqual("Nothing selected", ReadResult());

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .05, ItemRoot.BoundingRectangle.Height * .5);
                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
            }
        }

void TreeViewMultiSelectItemTest_ContentMode ( ) [inline]

Definition at line 1550 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectItemTest(isContentMode:true);
        }

void TreeViewMultiSelectItemTest_NodeMode ( ) [inline]

Definition at line 1542 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectItemTest();
        }

void TreeViewMultiSelectKeyboardingTest ( bool isContentMode = false ) [inline, private]

Definition at line 1408 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("ToggleSelectionMode");
                ClickButton("DisableClickToExpand");

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);

                KeyboardHelper.PressKey(Key.Space);
                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.1, Root.2", ReadResult());

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.1", ReadResult());

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
                KeyboardHelper.PressKey(Key.Left);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.1", ReadResult());

                InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
            }
        }

void TreeViewMultiSelectKeyboardingTest_ContentMode ( ) [inline]

Definition at line 1486 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectKeyboardingTest(isContentMode:true);
        }

void TreeViewMultiSelectKeyboardingTest_NodeMode ( ) [inline]

Definition at line 1478 of file TreeViewTests.cs.

        {
            TreeViewMultiSelectKeyboardingTest();
        }

void TreeViewNodeInheritenceTest ( ) [inline]

Definition at line 2488 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                var itemRoot = new TreeItem(LabelFirstItem());
                itemRoot.Expand();
                Wait.ForIdle();

                ClickButton("AddInheritedTreeViewNode");
                ClickButton("LabelItems");
                var node = FindElement.ById("Inherited from TreeViewNode");
                Verify.IsNotNull(node, "Verify TreeViewNode content is correct");
            }
        }

void TreeViewNodeInMarkupTest ( ) [inline]

Definition at line 2543 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewNodeInMarkupTestPage" }))
            {
                UIObject root = FindElement.ByName("Root");
                Verify.IsNotNull(root, "Verify root node content");
            }
        }

void TreeViewNonexistNodeAutomationPeerTest ( ) [inline]

Definition at line 2387 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                ClickButton("AddSecondLevelOfNodes");
                var root = LabelFirstItem();
                InputHelper.Tap(root);

                ClickButton("LabelItems");
                var root0 = FindElement.ById("Root.0");
                InputHelper.Tap(root0);

                ClickButton("LabelItems");
                UIObject root00 = FindElement.ById("Root.0.0");
                root00.SetFocus();

                AutomationElement itemPeer = AutomationElement.FocusedElement;
                int positionInSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                int sizeOfSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
                int level = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.LevelProperty);
                Verify.AreEqual(1, positionInSet, "Position in set.");
                Verify.AreEqual(1, sizeOfSet, "Size of set.");
                Verify.AreEqual(3, level, "Level in tree.");

                ClickButton("RemoveSecondLevelOfNode");
                positionInSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
                sizeOfSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
                level = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.LevelProperty);
                Verify.AreEqual(-1, positionInSet, "Position in set.");
                Verify.AreEqual(-1, sizeOfSet, "Size of set.");
                Verify.AreEqual(-1, level, "Level in tree.");
            }
        }

void TreeViewNoReorderIntoChildren ( bool isContentMode = false ) [inline, private]

Definition at line 1321 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());
                ClickButton("SetupNoReorderNodes");

                UIObject lockedItem = FindElement.ById("Root.0");
                InputHelper.Tap(lockedItem);
                ClickButton("DisableClickToExpand");
                ClickButton("GetItemCount");
                Verify.AreEqual("7", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.1");
                Verify.IsNotNull(dragUIObject);

                var topBottomMargin = 4; // To account for the 2px top and 2px bottom margin for TreeViewItem
                var height = dragUIObject.BoundingRectangle.Height + topBottomMargin;
                // 5% from the edge of the next item
                var distance = (int)(height * 1.45);

                Log.Comment("Starting Drag...distance:" + distance);
                InputHelper.DragDistance(dragUIObject, distance, Direction.North);

                ClickButton("GetItemCount");
                Verify.AreEqual("7", ReadResult());
            }
        }

void TreeViewNoReorderIntoChildren_ContentMode ( ) [inline]

Definition at line 1370 of file TreeViewTests.cs.

        {
            TreeViewNoReorderIntoChildren(isContentMode:true);
        }

void TreeViewNoReorderIntoChildren_NodeMode ( ) [inline]

Definition at line 1363 of file TreeViewTests.cs.

        {
            TreeViewNoReorderIntoChildren();
        }

void TreeViewPartialSelectionTest ( bool isContentMode = false ) [inline, private]

Definition at line 2157 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                UIObject ItemRoot = LabelFirstItem();
                InputHelper.Tap(ItemRoot);

                ClickButton("AddSecondLevelOfNodes");
                // expand all nodes
                ClickButton("LabelItems");
                UIObject root0 = FindElement.ById("Root.0");
                Verify.IsNotNull(root0, "Verifying Root.0 is found");
                UIObject root1 = FindElement.ById("Root.1");
                Verify.IsNotNull(root1, "Verifying Root.1 is found");
                InputHelper.Tap(root0);
                InputHelper.Tap(root1);
                ClickButton("GetItemCount");
                Verify.AreEqual("8", ReadResult());
                ClickButton("LabelItems");

                ClickButton("DisableClickToExpand");
                ClickButton("ToggleSelectionMode");

                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("u|u|u|u|u|u|u|u|", ReadResult());

                UIObject root00 = FindElement.ById("Root.0.0");
                Verify.IsNotNull(root00, "Verifying Root.0.0 is found");
                ToggleTreeViewItemCheckBox(root00, 3);
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("p|s|s|u|u|u|u|u|", ReadResult());

                UIObject root10 = FindElement.ById("Root.1.0");
                Verify.IsNotNull(root10, "Verifying Root.1.0 is found");
                ToggleTreeViewItemCheckBox(root10, 3);
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("p|s|s|p|s|u|u|u|", ReadResult());

                ToggleTreeViewItemCheckBox(root1, 2);
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("p|s|s|u|u|u|u|u|", ReadResult());

                ToggleTreeViewItemCheckBox(root1, 2);
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("p|s|s|s|s|s|s|u|", ReadResult());

                UIObject root2 = FindElement.ById("Root.2");
                Verify.IsNotNull(root2, "Verifying Root.2 is found");
                ToggleTreeViewItemCheckBox(root2, 2);
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("s|s|s|s|s|s|s|s|", ReadResult());
            }
        }

void TreeViewPartialSelectionTest_ContentMode ( ) [inline]

Definition at line 2222 of file TreeViewTests.cs.

        {
            TreeViewPartialSelectionTest(isContentMode:true);
        }

void TreeViewPartialSelectionTest_NodeMode ( ) [inline]

Definition at line 2215 of file TreeViewTests.cs.

        {
            TreeViewPartialSelectionTest();
        }

void TreeViewRootNodeBindingTest ( ) [inline]

Definition at line 2555 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(true);

                ClickButton("ClearNodes");
                ClickButton("AddRootNode");
                ClickButton("AddRootNode");
                ClickButton("GetItemCount");
                Verify.AreEqual("2", ReadResult());

                ClickButton("LabelItems");
                var root0 = FindElement.ById("Root0");
                var root1 = FindElement.ById("Root1");

                Log.Comment("Drag Root1 onto Root0...");
                InputHelper.DragToTarget(root1, root0);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                var rootTreeItem = new TreeItem(root0);
                rootTreeItem.Expand();
                Wait.ForIdle();
                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root0 | Root1", ReadResult());
            }
        }

void TreeViewSelectedItemsTest ( ) [inline]

Definition at line 2320 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(true);

                var root = new TreeItem(LabelFirstItem());
                root.Expand();
                Wait.ForIdle();

                //SelectedItems vector changes should be reflected on UI
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("u|u|u|u|", ReadResult());

                ClickButton("ToggleSelectedNodes");
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("p|s|u|s|", ReadResult());

                ClickButton("ToggleSelectedNodes");
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("u|u|u|u|", ReadResult());

                // UI changes should update SelectedItems vector
                ClickButton("GetSelected");
                Verify.AreEqual("Nothing selected", ReadResult());

                ClickButton("LabelItems");
                UIObject root0 = FindElement.ById("Root.0");
                Verify.IsNotNull(root0, "Verifying Root.0 is found");
                InputHelper.Tap(root0);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0", ReadResult());
            }
        }

void TreeViewSelectedItemTest ( ) [inline]

Definition at line 2292 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(true);

                var root = new TreeItem(LabelFirstItem());
                root.Expand();
                Wait.ForIdle();

                ClickButton("LabelItems");
                UIObject root0 = FindElement.ById("Root.0");
                Verify.IsNotNull(root0, "Verifying Root.0 is found");

                InputHelper.Tap(root0);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0", ReadResult());

                ClickButton("ToggleRoot0Selection");

                ClickButton("GetSelected");
                Verify.AreEqual("Nothing selected", ReadResult());
            }
        }

void TreeViewSelectedNodesTest ( ) [inline]

Definition at line 2255 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                var root = new TreeItem(LabelFirstItem());
                root.Expand();
                Wait.ForIdle();

                //SelectedNodes vector changes should be reflected on UI
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("u|u|u|u|", ReadResult());

                ClickButton("ToggleSelectedNodes");
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("p|s|u|s|", ReadResult());

                ClickButton("ToggleSelectedNodes");
                ClickButton("GetMultiSelectCheckBoxStates");
                Verify.AreEqual("u|u|u|u|", ReadResult());

                // UI changes should update SelectedNodes vector
                ClickButton("GetSelected");
                Verify.AreEqual("Nothing selected", ReadResult());

                ClickButton("LabelItems");
                UIObject root0 = FindElement.ById("Root.0");
                Verify.IsNotNull(root0, "Verifying Root.0 is found");
                InputHelper.Tap(root0);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0", ReadResult());
            }
        }

void TreeViewSelectedNodeTest ( ) [inline]

Definition at line 2229 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                var root = new TreeItem(LabelFirstItem());
                root.Expand();
                Wait.ForIdle();

                ClickButton("LabelItems");
                UIObject root0 = FindElement.ById("Root.0");
                Verify.IsNotNull(root0, "Verifying Root.0 is found");

                InputHelper.Tap(root0);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0", ReadResult());

                ClickButton("ToggleRoot0Selection");

                ClickButton("GetSelected");
                Verify.AreEqual("Nothing selected", ReadResult());
            }
        }

void TreeViewSelectionChangeUIAEventsTest ( ) [inline]

Definition at line 2448 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                ClickButton("ToggleSelectionMode");
                var root = LabelFirstItem();
                root.SetFocus();
                AutomationElement rootPeer = AutomationElement.FocusedElement;

                var selectionItemPattern = rootPeer.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;
                Verify.AreEqual(false, selectionItemPattern.Current.IsSelected);

                using (var propertyChangedEventWaiter = new PropertyChangedEventWaiter(root, UIProperty.Get("SelectionItem.IsSelected")))
                {
                    KeyboardHelper.PressKey(Key.Space);
                    propertyChangedEventWaiter.Wait();
                    Log.Comment("SelectionItem.IsSelected property change event fired");
                    Verify.AreEqual(true, selectionItemPattern.Current.IsSelected);
                }

                using (var automationEventWaiter = new AutomationEventWaiter(SelectionItemPattern.ElementRemovedFromSelectionEvent, root, Scope.Element))
                {
                    KeyboardHelper.PressKey(Key.Space);
                    automationEventWaiter.Wait();
                    Log.Comment("SelectionItemPattern.ElementRemovedFromSelectionEvent fired");
                    Verify.AreEqual(false, selectionItemPattern.Current.IsSelected);
                }

                using (var automationEventWaiter = new AutomationEventWaiter(SelectionItemPattern.ElementAddedToSelectionEvent, root, Scope.Element))
                {
                    KeyboardHelper.PressKey(Key.Space);
                    automationEventWaiter.Wait();
                    Log.Comment("SelectionItemPattern.ElementAddedToSelectionEvent fired");
                    Verify.AreEqual(true, selectionItemPattern.Current.IsSelected);
                }
            }
        }

void TreeViewSelectRegressionTest ( ) [inline]

Definition at line 2360 of file TreeViewTests.cs.

        {
            // Running 5 times since the the bug doesn't repro consistently.
            for(int i = 0; i < 5; i++)
            {
                using (var setup = new TestSetupHelper("TreeView Tests"))
                {
                    ClickButton("AddExtraNodes");
                    ClickButton("LabelItems");

                    ClickButton("SelectLastRootNode");
                    ClickButton("GetSelected");
                    Verify.AreEqual("Selected: Node 50", ReadResult());

                    UIObject node1 = FindElement.ByName("Node 1");
                    Verify.IsNotNull(node1, "Verifying Node 1 is found");
                    InputHelper.Tap(node1);

                    ClickButton("GetSelected");
                    Verify.AreEqual("Selected: Node 1", ReadResult());
                }
            }
        }

void TreeViewSwappingNodesTest ( bool isContentMode = false ) [inline, private]

Definition at line 504 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                UIObject ItemRoot = LabelFirstItem();

                InputHelper.Tap(ItemRoot);

                // Should be expanded now
                Verify.AreEqual("ItemClicked:Root", ReadResult());

                ClickButton("MoveNodesToNewTreeView");

                Wait.ForIdle();
                ClickButton("GetTree2ItemCount");
                Verify.AreEqual("6", ReadResult());
            }
        }

void TreeViewSwappingNodesTest_ContentMode ( ) [inline]

Definition at line 544 of file TreeViewTests.cs.

        {
            TreeViewSwappingNodesTest(isContentMode:true);
        }

void TreeViewSwappingNodesTest_NodeMode ( ) [inline]

Definition at line 536 of file TreeViewTests.cs.

        {
            TreeViewSwappingNodesTest();
        }

void TreeViewWithMultiLevelChildrenExpandCollapseTest ( ) [inline]

Definition at line 2588 of file TreeViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(true);

                var root = new TreeItem(LabelFirstItem());
                root.Expand();
                Wait.ForIdle();

                ClickButton("AddSecondLevelOfNodes");
                ClickButton("LabelItems");

                var root1 = new TreeItem(FindElement.ByName("Root.1"));
                root1.Expand();
                Wait.ForIdle();

                Log.Comment("Drag Root.1.2 into Root.1.1");
                var root11 = new TreeItem(FindElement.ByName("Root.1.1"));
                var root12 = new TreeItem(FindElement.ByName("Root.1.2"));
                InputHelper.DragToTarget(root12, root11);

                var root0 = new TreeItem(FindElement.ByName("Root.0"));
                Log.Comment("Drag Root.1 into Root.0");
                InputHelper.DragToTarget(root1, root0);

                root0.Expand();
                Wait.ForIdle();
                root1.Expand();
                Wait.ForIdle();
                root11.Expand();
                Wait.ForIdle();

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.0 | Root.0.0 | Root.1 | Root.1.0 | Root.1.1 | Root.1.2 | Root.2", ReadResult());

                root0.Collapse();
                Wait.ForIdle();
                root0.Expand();
                Wait.ForIdle();

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.0 | Root.0.0 | Root.1 | Root.1.0 | Root.1.1 | Root.1.2 | Root.2", ReadResult());
            }
        }

void ValidateCannotDragWithinSelectedSubtree ( bool isContentMode = false ) [inline, private]

Definition at line 1019 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("ToggleSelectionMode");

                UIObject ItemRoot = LabelFirstItem();
                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("LabelItems");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());

                UIObject dragUIObject = FindElement.ById("Root.1");

                var height = dragUIObject.BoundingRectangle.Height;
                // 5% from the edge of the next item
                var distance = (int)(height * 1.45);

                Log.Comment("Starting Drag...distance:" + distance);
                InputHelper.DragDistance(dragUIObject, distance, Direction.South);

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());

                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
            }
        }

void ValidateCannotDragWithinSelectedSubtree_ContentMode ( ) [inline]

Definition at line 1078 of file TreeViewTests.cs.

        {
            ValidateCannotDragWithinSelectedSubtree(isContentMode:true);
        }

void ValidateCannotDragWithinSelectedSubtree_NodeMode ( ) [inline]

Definition at line 1071 of file TreeViewTests.cs.

        {
            ValidateCannotDragWithinSelectedSubtree();
        }

void ValidateExpandingRaisedOnItemHavingUnrealizedChildren ( bool isContentMode = false ) [inline, private]

Definition at line 1748 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                var itemRoot = new TreeItem(LabelFirstItem());
                itemRoot.Expand();
                Wait.ForIdle();

                ClickButton("DisableClickToExpand");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                ClickButton("SetRoot1HasUnrealizedChildren");

                ClickButton("LabelItems");
                var root1 = new TreeItem(FindElement.ById("Root.1"));
                Verify.IsNotNull(root1, "Verifying root.1 is found");
                root1.Expand();
                Wait.ForIdle();

                Verify.AreEqual("Expanding Raised", ReadResult());
            }
        }

void ValidateExpandingRaisedOnItemHavingUnrealizedChildren_ContentMode ( ) [inline]

Definition at line 1793 of file TreeViewTests.cs.

        {
            ValidateExpandingRaisedOnItemHavingUnrealizedChildren(isContentMode:true);
        }

void ValidateExpandingRaisedOnItemHavingUnrealizedChildren_NodeMode ( ) [inline]

Definition at line 1785 of file TreeViewTests.cs.

        {
            ValidateExpandingRaisedOnItemHavingUnrealizedChildren();
        }

void ValidateMultiSelectDragDropRootsAndNonRoots ( bool isContentMode = false ) [inline, private]

Definition at line 1083 of file TreeViewTests.cs.

        {
            if (IsPhoneDevice())
            {
                return;
            }

            using (var setup = new TestSetupHelper("TreeView Tests"))
            {
                SetContentMode(isContentMode);

                ClickButton("GetItemCount");
                Verify.AreEqual("1", ReadResult());

                ClickButton("ToggleSelectionMode");
                ClickButton("AddSecondLevelOfNodes");

                UIObject ItemRoot = LabelFirstItem();
                InputHelper.Tap(ItemRoot);

                ClickButton("DisableClickToExpand");
                ClickButton("GetItemCount");
                Verify.AreEqual("4", ReadResult());

                InputHelper.Tap(ItemRoot);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Space);

                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Down);

                KeyboardHelper.PressKey(Key.Right);
                KeyboardHelper.PressKey(Key.Down);
                KeyboardHelper.PressKey(Key.Space);

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.0.0, Root.1.0", ReadResult());

                ClickButton("LabelItems");
                UIObject dragUIObject = FindElement.ById("Root.1.0");

                var height = dragUIObject.BoundingRectangle.Height;
                // Drag distance is 1.75 times the height of a TreeViewItem
                var distance = (int)(height * 1.75);

                Log.Comment("Starting Drag...distance:" + distance);
                InputHelper.DragDistance(dragUIObject, distance, Direction.South);

                ClickButton("GetChildrenOrder");
                Verify.AreEqual("Root | Root.1 | Root.1.1 | Root.0 | Root.0.0 | Root.1.0 | Root.1.2 | Root.2", ReadResult());
                Wait.ForIdle();

                ClickButton("GetItemCount");
                Verify.AreEqual("8", ReadResult());

                ClickButton("GetSelected");
                Verify.AreEqual("Selected: Root.0, Root.0.0, Root.1.0", ReadResult());
            }
        }

void ValidateMultiSelectDragDropRootsAndNonRoots_ContentMode ( ) [inline]

Definition at line 1155 of file TreeViewTests.cs.

        {
            ValidateMultiSelectDragDropRootsAndNonRoots(isContentMode:true);
        }

void ValidateMultiSelectDragDropRootsAndNonRoots_NodeMode ( ) [inline]

Definition at line 1147 of file TreeViewTests.cs.

        {
            ValidateMultiSelectDragDropRootsAndNonRoots();
        }

void VerifyGamepadAPress | ( | UIObject | node,
 |  | string | expectedItemCount,
 |  | string | expectedSelection |
 | ) |  |  | [inline, private]

Definition at line 2852 of file TreeViewTests.cs.

        {
            node.SetFocus();
            GamepadHelper.PressButton(node, GamepadButton.A);
            Wait.ForIdle();
            ClickButton("GetItemCount");
            Verify.AreEqual(expectedItemCount, ReadResult());
            ClickButton("GetSelected");
            Verify.AreEqual(expectedSelection, ReadResult());
        }

The documentation for this class was generated from the following file:
  • TreeView/InteractionTests/TreeViewTests.cs
Generated on Sun Dec 1 2024 20:53:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneViewTests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • TwoPaneViewTests
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes

TwoPaneViewTests Class Reference

List of all members.

Public Member Functions

void | InitialPanePriorityTest ()
void | PaneLengthTest ()
void | RegionOffsetTest ()
void | RegionTest ()
void | SingleRegionTest ()
void | TestCleanup ()
void | ThresholdTest ()
void | VerifyTabKeyWorks ()
void | ViewModeTest ()

Static Public Member Functions

static void | ClassInitialize (TestContext testContext)

Private Types

enum | ControlHeight { Default, Tall, Short }
enum | ControlWidth { Default, Wide, Narrow }
enum | PanePriority { Pane1, Pane2 }
enum | TallModeConfiguration { TopBottom, BottomTop, SinglePane }
enum | TwoPaneViewMode { SinglePane, Wide, Tall }
enum ViewMode {
Pane1Only, Pane2Only, LeftRight, RightLeft,
TopBottom, BottomTop
}
enum | WideModeConfiguration { LeftRight, RightLeft, SinglePane }

Private Member Functions

int | GetInt (string textBlockName)
void | SetComboBox (string comboBoxName, string item)
void | SetControlHeight (ControlHeight height)
void | SetControlWidth (ControlWidth width)
void | SetLength (int pane, double value, string type)
void | SetMinTallModeHeight (double height)
void | SetMinWideModeWidth (double width)
void | SetPanePriority (PanePriority priority)
void | SetTallModeConfiguration (TallModeConfiguration behavior)
void | SetWideModeConfiguration (WideModeConfiguration behavior)
void | VerifyIsPrettyClose (int a, int b, string info)
void | VerifyPaneSize (int paneIndex, double width, double height)
void | VerifyPaneSpacing (double spacing)
void | VerifyViewMode (ViewMode mode)

Private Attributes

const double | c_controlMargin_bottom = 20.0
const double | c_controlMargin_left = 40.0
const double | c_controlMargin_right = 30.0
const double | c_controlMargin_top = 10.0
const double | c_defaultMinTallModeHeight = 641.0
const double | c_defaultMinWideModeWidth = 641.0
const double | c_simulatedMiddle = 12.0
const double | c_simulatedPaneHeight = 400.0
const double | c_simulatedPaneWidth = 300.0

Detailed Description

Definition at line 24 of file TwoPaneViewTests.cs.

Member Enumeration Documentation

enum ControlHeight [private]
Enumerator:
Default
Tall
Short

Definition at line 42 of file TwoPaneViewTests.cs.

{ Default, Tall, Short }

enum ControlWidth [private]
Enumerator:
Default
Wide
Narrow

Definition at line 41 of file TwoPaneViewTests.cs.

{ Default, Wide, Narrow }

enum PanePriority [private]
Enumerator:
Pane1
Pane2

Definition at line 45 of file TwoPaneViewTests.cs.

{ Pane1, Pane2 }

enum TallModeConfiguration [private]
Enumerator:
TopBottom
BottomTop
SinglePane

Definition at line 44 of file TwoPaneViewTests.cs.

{ TopBottom, BottomTop, SinglePane }

enum TwoPaneViewMode [private]
Enumerator:
SinglePane
Wide
Tall

Definition at line 46 of file TwoPaneViewTests.cs.

{ SinglePane, Wide, Tall }

enum ViewMode [private]
Enumerator:
Pane1Only
Pane2Only
LeftRight
RightLeft
TopBottom
BottomTop

Definition at line 48 of file TwoPaneViewTests.cs.

{ Pane1Only, Pane2Only, LeftRight, RightLeft, TopBottom, BottomTop }

enum WideModeConfiguration [private]
Enumerator:
LeftRight
RightLeft
SinglePane

Definition at line 43 of file TwoPaneViewTests.cs.

{ LeftRight, RightLeft, SinglePane }

Member Function Documentation

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 54 of file TwoPaneViewTests.cs.

        {
            TestEnvironment.Initialize(testContext);
        }

int GetInt ( string textBlockName ) [inline, private]

Definition at line 373 of file TwoPaneViewTests.cs.

        {
            TextBlock tb = new TextBlock(FindElement.ByName(textBlockName));
            Log.Comment("Parsing string '" + tb.DocumentText + "' into an int");
            return int.Parse(tb.DocumentText);
        }

void InitialPanePriorityTest ( ) [inline]

Definition at line 214 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                Log.Comment("Verify when pane priority is set to pane 2 on the small split panel, it only loads pane 2 (bug 14486142)");

                UIObject paneContent1 = TryFindElement.ByName("SmallContent1");
                UIObject paneContent2 = TryFindElement.ByName("SmallContent2");

                Verify.IsNull(paneContent1, "Expected not to find small pane 1");
                Verify.IsNotNull(paneContent2, "Expected to find small pane2");
            }
        }

void PaneLengthTest ( ) [inline]

Definition at line 229 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                SetControlWidth(ControlWidth.Wide);
                SetControlHeight(ControlHeight.Tall);

                int controlWidth = GetInt("ControlWidthText");
                int controlHeight = GetInt("ControlHeightText");
                Log.Comment("TwoPaneView size is " + controlWidth + ", " + controlHeight);

                Log.Comment("Verify changing pane 1 length to star sizing");
                SetLength(1, 1, "Star");

                VerifyPaneSize(1, controlWidth / 2.0, 0);
                VerifyPaneSize(2, controlWidth / 2.0, 0);

                Log.Comment("Verify changing pane 2 length to pixel sizing");
                SetLength(2, 199, "Pixel");

                VerifyPaneSize(1, controlWidth - 199, 0);
                VerifyPaneSize(2, 199, 0);

                Log.Comment("Verify column sizes stay the same when switching pane order");
                SetWideModeConfiguration(WideModeConfiguration.RightLeft);

                VerifyPaneSize(1, controlWidth - 199, 0);
                VerifyPaneSize(2, 199, 0);

                Log.Comment("Verify lengths apply to top/bottom configuration");
                SetControlWidth(ControlWidth.Narrow);

                VerifyPaneSize(1, 0, controlHeight - 199);
                VerifyPaneSize(2, 0, 199);
            }
        }

void RegionOffsetTest ( ) [inline]

Definition at line 163 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                Log.Comment("Verify horizontal split regions with control offset from simulated window");
                SetComboBox("SimulateComboBox", "LeftRight");

                CheckBox marginCheckbox = new CheckBox(FindElement.ByName("AddMarginCheckBox"));
                marginCheckbox.Check();
                Wait.ForIdle();

                VerifyViewMode(ViewMode.LeftRight);
                VerifyPaneSize(1, c_simulatedPaneWidth - c_controlMargin_left,  c_simulatedPaneHeight - (c_controlMargin_top + c_controlMargin_bottom));
                VerifyPaneSize(2, c_simulatedPaneWidth - c_controlMargin_right, c_simulatedPaneHeight - (c_controlMargin_top + c_controlMargin_bottom));
                VerifyPaneSpacing(c_simulatedMiddle);

                Log.Comment("Verify vertical split regions with control offset from simulated window");
                SetComboBox("SimulateComboBox", "TopBottom");

                VerifyViewMode(ViewMode.TopBottom);
                VerifyPaneSize(1, c_simulatedPaneHeight - (c_controlMargin_left + c_controlMargin_right), c_simulatedPaneWidth - c_controlMargin_top);
                VerifyPaneSize(2, c_simulatedPaneHeight - (c_controlMargin_left + c_controlMargin_right), c_simulatedPaneWidth - c_controlMargin_bottom);
                VerifyPaneSpacing(c_simulatedMiddle);
            }
        }

void RegionTest ( ) [inline]

Definition at line 139 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                Log.Comment("Verify horizontal split regions");
                SetComboBox("SimulateComboBox", "LeftRight");

                VerifyViewMode(ViewMode.LeftRight);
                VerifyPaneSize(1, c_simulatedPaneWidth, c_simulatedPaneHeight);
                VerifyPaneSize(2, c_simulatedPaneWidth, c_simulatedPaneHeight);
                VerifyPaneSpacing(c_simulatedMiddle);

                Log.Comment("Verify vertical split regions");
                SetComboBox("SimulateComboBox", "TopBottom");

                VerifyViewMode(ViewMode.TopBottom);
                VerifyPaneSize(1, c_simulatedPaneHeight, c_simulatedPaneWidth);
                VerifyPaneSize(2, c_simulatedPaneHeight, c_simulatedPaneWidth);
                VerifyPaneSpacing(c_simulatedMiddle);
            }
        }

void SetComboBox | ( | string | comboBoxName,
 |  | string | item |
 | ) |  |  | [inline, private]

Definition at line 421 of file TwoPaneViewTests.cs.

        {
            Log.Comment("Setting '" + comboBoxName + "' to '" + item + "'");
            ComboBox comboBox = new ComboBox(FindElement.ByName(comboBoxName));
            comboBox.SelectItemByName(item);
            Wait.ForIdle();
        }

void SetControlHeight ( ControlHeight height ) [inline, private]

Definition at line 385 of file TwoPaneViewTests.cs.

        {
            SetComboBox("HeightComboBox", height.ToString());
        }

void SetControlWidth ( ControlWidth width ) [inline, private]

Definition at line 380 of file TwoPaneViewTests.cs.

        {
            SetComboBox("WidthComboBox", width.ToString());
        }

void SetLength | ( | int | pane,
 |  | double | value,
 |  | string | type |
 | ) |  |  | [inline, private]

Definition at line 429 of file TwoPaneViewTests.cs.

        {
            Log.Comment("Setting pane " + pane + " length to " + value + ", " + type.ToString());

            Edit valueTextBox = new Edit(FindElement.ByName("Pane" + pane + "LengthTextBox"));
            valueTextBox.SetValue(value.ToString());

            SetComboBox("Pane" + pane + "LengthComboBox", type);

            Wait.ForIdle();
        }

void SetMinTallModeHeight ( double height ) [inline, private]

Definition at line 413 of file TwoPaneViewTests.cs.

        {
            Log.Comment("Setting min tall height to " + height);
            Edit heightTextBox = new Edit(FindElement.ByName("MinTallModeHeightTextBox"));
            heightTextBox.SetValue(height.ToString());
            Wait.ForIdle();
        }

void SetMinWideModeWidth ( double width ) [inline, private]

Definition at line 405 of file TwoPaneViewTests.cs.

        {
            Log.Comment("Setting min wide width to " + width);
            Edit widthTextBox = new Edit(FindElement.ByName("MinWideModeWidthTextBox"));
            widthTextBox.SetValue(width.ToString());
            Wait.ForIdle();
        }

void SetPanePriority ( PanePriority priority ) [inline, private]

Definition at line 400 of file TwoPaneViewTests.cs.

        {
            SetComboBox("PanePriorityComboBox", priority.ToString());
        }

void SetTallModeConfiguration ( TallModeConfiguration behavior ) [inline, private]

Definition at line 395 of file TwoPaneViewTests.cs.

        {
            SetComboBox("TallModeConfigurationComboBox", behavior.ToString());
        }

void SetWideModeConfiguration ( WideModeConfiguration behavior ) [inline, private]

Definition at line 390 of file TwoPaneViewTests.cs.

        {
            SetComboBox("WideModeConfigurationComboBox", behavior.ToString());
        }

void SingleRegionTest ( ) [inline]

Definition at line 190 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                Log.Comment("Verify control acts appropriately when there are multiple regions but the control is only in one of them");

                SetComboBox("SimulateComboBox", "LeftRight");

                CheckBox marginCheckbox = new CheckBox(FindElement.ByName("OneSideCheckBox"));
                marginCheckbox.Check();
                Wait.ForIdle();

                VerifyViewMode(ViewMode.Pane1Only);
                VerifyPaneSize(1, c_simulatedPaneWidth, c_simulatedPaneHeight);

                Log.Comment("Verify vertical split when control is in a single region");
                SetMinTallModeHeight(c_simulatedPaneHeight - 10);

                VerifyViewMode(ViewMode.TopBottom);
                VerifyPaneSpacing(0);
            }
        }

void TestCleanup ( ) [inline]

Definition at line 60 of file TwoPaneViewTests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

void ThresholdTest ( ) [inline]

Definition at line 116 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                SetControlWidth(ControlWidth.Wide);
                SetControlHeight(ControlHeight.Tall);

                Log.Comment("Verify changing min wide width updates view mode");
                SetMinWideModeWidth(c_defaultMinWideModeWidth + 100);
                VerifyViewMode(ViewMode.TopBottom);

                Log.Comment("Verify changing min tall height updates view mode");
                SetMinTallModeHeight(c_defaultMinTallModeHeight + 100);
                VerifyViewMode(ViewMode.Pane1Only);

                Log.Comment("Verify changing min wide width updates view mode");
                SetMinWideModeWidth(c_defaultMinWideModeWidth - 100);
                VerifyViewMode(ViewMode.LeftRight);
            }
        }

void VerifyIsPrettyClose | ( | int | a,
 |  | int | b,
 |  | string | info |
 | ) |  |  | [inline, private]

Definition at line 367 of file TwoPaneViewTests.cs.

        {
            // Due to MITA only reporting whole numbers, and some rounding on phone builds, just make sure widths/heights are pretty close.
            Verify.IsTrue(a <= b + 1 && a >= b - 1, info + ": expected " + a + ", actual " + b);
        }

void VerifyPaneSize | ( | int | paneIndex,
 |  | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 350 of file TwoPaneViewTests.cs.

        {
            if (width > 0)
            {
                VerifyIsPrettyClose((int)width, GetInt("WidthText" + paneIndex), "Verify pane" + paneIndex + " width");
            }
            if (height > 0)
            {
                VerifyIsPrettyClose((int)height, GetInt("HeightText" + paneIndex), "Verify pane" + paneIndex + " height");
            }
        }

void VerifyPaneSpacing ( double spacing ) [inline, private]

Definition at line 362 of file TwoPaneViewTests.cs.

        {
            VerifyIsPrettyClose((int)spacing, GetInt("SpacingTextBox" ), "Verify spacing");
        }

void VerifyTabKeyWorks ( ) [inline]

Definition at line 269 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                UIObject twoPaneView = TryFindElement.ByName("TwoPaneViewLarge");
                Verify.IsNotNull(twoPaneView, "TwoPaneView is present");
                twoPaneView.SetFocus();
                Wait.ForIdle();
                Verify.AreNotEqual(UIObject.Focused, twoPaneView, "TwoPaneView should not be focused");
                KeyboardHelper.PressKey(Key.Tab);
                Verify.AreNotEqual(UIObject.Focused, twoPaneView, "TwoPaneView should not be focused");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);
                Verify.AreNotEqual(UIObject.Focused, twoPaneView, "TwoPaneView should not be focused");
            }
        }

void VerifyViewMode ( ViewMode mode ) [inline, private]

Definition at line 285 of file TwoPaneViewTests.cs.

        {
            // Verify configuration is correct for mode
            TwoPaneViewMode expectedConfiguration = TwoPaneViewMode.SinglePane;
            switch (mode)
            {
                case ViewMode.LeftRight:
                case ViewMode.RightLeft:
                    expectedConfiguration = TwoPaneViewMode.Wide;
                    break;

                case ViewMode.TopBottom:
                case ViewMode.BottomTop:
                    expectedConfiguration = TwoPaneViewMode.Tall;
                    break;
            }

            TextBlock configurationTextBlock = new TextBlock(FindElement.ByName("ConfigurationTextBlock"));
            Verify.AreEqual(expectedConfiguration.ToString(), configurationTextBlock.DocumentText);

            // Verify panes are actually being shown correctly
            ElementCache.Clear();
            UIObject paneContent1 = TryFindElement.ByName("Content1");
            UIObject paneContent2 = TryFindElement.ByName("Content2");

            if (mode != ViewMode.Pane2Only)
            {
                Verify.IsNotNull(paneContent1, "Expected to find pane1");
                Log.Comment("Content 1 dimensions: " + paneContent1.BoundingRectangle.ToString());
            }

            if (mode != ViewMode.Pane1Only)
            {
                Verify.IsNotNull(paneContent2, "Expected to find pane2");
                Log.Comment("Content 2 dimensions: " + paneContent2.BoundingRectangle.ToString());
            }

            if (mode == ViewMode.Pane2Only)
            {
                Verify.IsNull(paneContent1, "Expected not to find pane1");
            }

            if (mode == ViewMode.Pane1Only)
            {
                Verify.IsNull(paneContent2, "Expected not to find pane2");
            }

            switch (mode)
            {
                case ViewMode.LeftRight:
                case ViewMode.RightLeft:
                    Verify.AreEqual(paneContent1.BoundingRectangle.Top, paneContent2.BoundingRectangle.Top, "Verify panes are horizontally aligned");
                    if (mode == ViewMode.LeftRight) Verify.IsGreaterThanOrEqual(paneContent2.BoundingRectangle.Left, paneContent1.BoundingRectangle.Right, "Verify left/right pane placement");
                    else Verify.IsGreaterThanOrEqual(paneContent1.BoundingRectangle.Left, paneContent2.BoundingRectangle.Right, "Verify right/left pane placement");
                    break;

                case ViewMode.TopBottom:
                case ViewMode.BottomTop:
                    Verify.AreEqual(paneContent1.BoundingRectangle.Left, paneContent2.BoundingRectangle.Left, "Verify panes are vertically aligned");
                    if (mode == ViewMode.TopBottom) Verify.IsGreaterThanOrEqual(paneContent2.BoundingRectangle.Top, paneContent1.BoundingRectangle.Bottom, "Verify top/bottom pane placement");
                    else Verify.IsGreaterThanOrEqual(paneContent1.BoundingRectangle.Top, paneContent2.BoundingRectangle.Bottom, "Verify bottom/top pane placement");
                    break;
            }
        }

void ViewModeTest ( ) [inline]

Definition at line 66 of file TwoPaneViewTests.cs.

        {
            using (var setup = new TestSetupHelper("TwoPaneView Tests")) // This clicks the button corresponding to the test page.
            {
                SetControlWidth(ControlWidth.Wide);
                SetControlHeight(ControlHeight.Tall);

                Wait.ForSeconds(5);

                VerifyViewMode(ViewMode.LeftRight);

                Log.Comment("Verify changing wide behavior splits right/left");
                SetWideModeConfiguration(WideModeConfiguration.RightLeft);
                VerifyViewMode(ViewMode.RightLeft);

                Log.Comment("Verify narrow width splits top/bottom");
                SetControlWidth(ControlWidth.Narrow);
                VerifyViewMode(ViewMode.TopBottom);

                Log.Comment("Verify changing tall behavior splits bottom/top");
                SetTallModeConfiguration(TallModeConfiguration.BottomTop);
                VerifyViewMode(ViewMode.BottomTop);

                Log.Comment("Verify short height shows only priority pane");
                SetControlHeight(ControlHeight.Short);
                VerifyViewMode(ViewMode.Pane1Only);

                Log.Comment("Verify changing priority switches panes");
                SetPanePriority(PanePriority.Pane2);
                VerifyViewMode(ViewMode.Pane2Only);

                Log.Comment("Verify tall height with span shows only priority pane");
                SetControlHeight(ControlHeight.Tall);
                VerifyViewMode(ViewMode.BottomTop);
                SetTallModeConfiguration(TallModeConfiguration.SinglePane);
                VerifyViewMode(ViewMode.Pane2Only);

                Log.Comment("Verify wide width with span shows only priority pane");
                SetControlWidth(ControlWidth.Wide);
                VerifyViewMode(ViewMode.RightLeft);
                SetWideModeConfiguration(WideModeConfiguration.SinglePane);
                VerifyViewMode(ViewMode.Pane2Only);

                Log.Comment("Verify changing priority switches panes");
                SetPanePriority(PanePriority.Pane1);
                VerifyViewMode(ViewMode.Pane1Only);
            }
        }

Member Data Documentation

const double c_controlMargin_bottom = 20.0 [private]

Definition at line 39 of file TwoPaneViewTests.cs.

const double c_controlMargin_left = 40.0 [private]

Definition at line 36 of file TwoPaneViewTests.cs.

const double c_controlMargin_right = 30.0 [private]

Definition at line 38 of file TwoPaneViewTests.cs.

const double c_controlMargin_top = 10.0 [private]

Definition at line 37 of file TwoPaneViewTests.cs.

const double c_defaultMinTallModeHeight = 641.0 [private]

Definition at line 28 of file TwoPaneViewTests.cs.

const double c_defaultMinWideModeWidth = 641.0 [private]

Definition at line 27 of file TwoPaneViewTests.cs.

const double c_simulatedMiddle = 12.0 [private]

Definition at line 33 of file TwoPaneViewTests.cs.

const double c_simulatedPaneHeight = 400.0 [private]

Definition at line 32 of file TwoPaneViewTests.cs.

const double c_simulatedPaneWidth = 300.0 [private]

Definition at line 31 of file TwoPaneViewTests.cs.

The documentation for this class was generated from the following file:
  • TwoPaneView/InteractionTests/TwoPaneViewTests.cs
Generated on Sun Dec 1 2024 20:53:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2Tests Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • WebView2Tests
Classes | Public Member Functions | Static Public Member Functions | Static Private Member Functions

WebView2Tests Class Reference

List of all members.

Classes

class | NativeMethods
class | WebView2TestSetupHelper

Public Member Functions

void | AddHostObjectToScriptTest ()
void | BasicCoreObjectCreationAndDestructionTest ()
void | BasicFlingTouchTest ()
void | BasicKeyboardTest ()
void | BasicLongPressTouchTest ()
void | BasicPanTouchTest ()
void | BasicRenderingTest ()
void | BasicStretchTouchTest ()
void | BasicTapTouchTest ()
void | CloseThenDPIChangeTest ()
void | ConcurrentCreationRequestsTest ()
void | CopyPasteTest ()
void | CoreWebView2Initialized_FailedTest ()
void | CoreWebView2InitializedTest ()
void | CursorClickUpdateTest ()
void | CursorUpdateTest ()
void | CustomConfiguration_BasicTest ()
void | CustomConfiguration_EnsureAgainAfterCustomTest ()
void | CustomConfiguration_EnsureAgainAfterDefaultTest ()
void | DragDropIntoWebView2Test ()
void | EdgeProcessFailedTest ()
void | ExecuteScriptTest ()
void | Focus_BackAndForthTabTest ()
void | Focus_BasicTabTest ()
void | Focus_MouseActivateTest ()
void | Focus_ReverseTabTest ()
void | GoBackAndForwardTest ()
void | HiddenThenVisibleTest ()
void | HostNameToFolderMappingTest ()
void | HtmlDropdownTest ()
void | KeyboardAcceleratorTest ()
void | LifetimeTabTest ()
void | MouseCaptureTest ()
void | MouseLeftClickTest ()
void | MouseMiddleClickTest ()
void | MouseRightClickTest ()
void | MouseWheelScrollTest ()
void | MouseXButton1ClickTest ()
void | MouseXButton2ClickTest ()
void | MoveTest ()
void | MultipleWebviews_BasicRenderingTest ()
void | MultipleWebviews_FocusTest ()
void | MultipleWebviews_LanguageTest ()
void | NavigateToLocalImageTest ()
void | NavigateToStringTest ()
void | NavigateToVideoTest ()
void | NavigationErrorTest ()
void | NavigationStartingInvalidTest ()
void | NavigationStartingTest ()
void | NonAsciiUriTest ()
void | OffTreeWebViewInputTest ()
void | ParentHiddenThenVisibleTest ()
void | ParentVisibilityHiddenTest ()
void | ParentVisibilityTurnedOnTest ()
void | PointerReleaseWithoutPressTest ()
void | QueryCoreWebView2BasicTest ()
void | ReloadTest ()
void | ReparentElementTest ()
void | ResizeTest ()
void | ScaledTouchTest ()
void | SourceBeforeLoadTest ()
void | SourceBindingTest ()
void | SpecificTouchTest ()
void | TestCleanup ()
void | UserAgentTest ()
void | VisibilityHiddenTest ()
void | VisibilityTurnedOnTest ()
void | WebMessageReceivedTest ()
void | WebView2CleanedUpTest ()
void | WindowHiddenTest ()
void | WindowlessPopupTest ()

Static Public Member Functions

static void | AccessKeyTest ()
static void | ClassInitialize (TestContext testContext)
static void | EnsureBrowser ()
static void | ValidateEventCounts (int coreWebView2InitializedCountExpected, int ensureCoreWebView2CompletionCountExpected, int navigationStartingCountExpected, int navigationCompletedCountExpected, int loadedCountExpected, int unloadedCountExpected, int coreProcessFailedCountExpected, string caption=null)
static void | ValidateExceptionCounts (int closedExceptionCountExpected, string caption=null)

Static Private Member Functions

static void | BeginSubTest (string testName, string testDescription)
static void | ChooseTest (string testName, bool waitForLoadCompleted=true)
static void | CompleteTestAndWaitForResult (string selectedTest, bool shouldDumpMessageLog=false)
static void | CompleteTestAndWaitForWebMessageResult (string selectedTest)
static void | CopySelected ()
static void | DoSelectAllByKeyboard ()
static void | EndSubTest (string testName)
static Win32.RegistryKey | GetBrowserExecutableFolderKey ()
static bool | GetHasCompatibleRuntimeInstalled (int browserBuildVersion, int sdkBuildVersion)
static int | GetInstalledBrowserVersion ()
static int | GetSdkBuildVersion ()
static bool | IsEdgeAlreadyInstalling ()
static void | MouseClickTestCommon (PointerButtons mouseButton)
static void | PasteClipboard ()
static void | RemoveFakeBrowserExecutableFolderKey ()
static void | SetWebViewElementFocus (string target, uint tabs)
static void | TabTwicePastWebView2 ()
static bool | TryInstallingBrowser (int attemptsLeft)
static void | ValidateEventDetail (string eventDetail)
static void | ValidateLoadedSource (string loadedSource)
static void | WaitForCopyCompleted ()
static bool | WaitForEdgeIfAlreadyInstalling ()
static void | WaitForEnsureCompleted ()
static void | WaitForFocus (string target)
static void | WaitForLoadCompleted ()
static void | WaitForTextBoxValue (Edit textbox, string expectedValue, bool match=true)
static void | WaitForWebMessageResult (string selectedTest)

Detailed Description

Definition at line 29 of file WebView2Tests.cs.

Member Function Documentation

static void AccessKeyTest ( ) [inline, static]

Definition at line 1887 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("AccessKeyTest");

                // Set focus somewhere besides the webview
                Button x2 = new Button(FindElement.ById("TabStopButton2"));
                x2.SetFocus();
                Wait.ForIdle();

                // Bring up access keys
                Keyboard keyboard = Keyboard.Instance;
                keyboard.SendText("%"); // ALT
                Wait.ForIdle();

                string keyTipText = "W";
                var keytip = TryFindElement.ByName(keyTipText);
                Verify.IsNotNull(keytip, "keytip");

                using (var xamlFocusWaiter = new FocusAcquiredWaiter("MyWebView2"))
                {
                    // Invoke the AccessKey
                    keyboard.SendText(keyTipText);
                    xamlFocusWaiter.Wait();
                    Log.Comment("Focus is on " + UIObject.Focused);
                }

                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to text box
                WaitForFocus("w1");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to input button
                WaitForFocus("b1");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to dropdown
                WaitForFocus("s1");
                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
                {
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to tabStopButton2
                    xamlFocusWaiter.Wait();
                    Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
                }

                CompleteTestAndWaitForResult("AccessKeyTest");
            }
        }

void AddHostObjectToScriptTest ( ) [inline]

Definition at line 1851 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("AddHostObjectToScriptTest");
                CompleteTestAndWaitForWebMessageResult("AddHostObjectToScriptTest");
            }
        }

void BasicCoreObjectCreationAndDestructionTest ( ) [inline]

Definition at line 2254 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToCoreObjectsWebView2" }))
            {
                ChooseTest("BasicCoreObjectCreationAndDestructionTest", false /* waitForLoadCompleted */);

                Button resetCounts_Button = new Button(FindElement.ById("ResetCounts_Button"));
                resetCounts_Button.Invoke();
                Wait.ForIdle();

                var coreWebView2InitializedCount = new Edit(FindElement.ById("CoreWebView2InitializedCount"));
                var ensureCoreWebView2CompletionCount = new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"));
                var navigationCompletedCount = new Edit(FindElement.ById("NavigationCompletedCount"));
                var loadedCount = new Edit(FindElement.ById("LoadedCount"));
                var unloadedCount = new Edit(FindElement.ById("UnloadedCount"));

                BeginSubTest("Preload Test #1", "CreateOffline -> SetSource -> Wait(NavCompleted) -> EnterTree -> Wait(Loaded)");
                Button create_OfflineElement_Button = new Button(FindElement.ById("Create_OfflineElement_Button"));
                Button setSource_OfflineElement_Button = new Button(FindElement.ById("SetSource_OfflineElement_Button"));
                Button add_OfflineElement_Button = new Button(FindElement.ById("Add_OfflineElement_Button"));

                // Create offline element and set source
                Log.Comment("Create offline element and set source...");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    create_OfflineElement_Button.Invoke();
                    setSource_OfflineElement_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    0,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Created offline w/ source (not live yet)"
                );

                Log.Comment("Add to tree...");
                using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                {
                    add_OfflineElement_Button.Invoke();
                    loadedWaiter.Wait();
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Added to tree"
                );
                EndSubTest("Preload Test #1");

                BeginSubTest("Preload Test #2", "CreateOffline -> EnsureCWV2() -> Wait(EnsureCWV2_Completion) -> EnterTree -> Wait(Loaded) -> SetSource");
                Button ensureCoreWebView2_OfflineElement_Button = new Button(FindElement.ById("EnsureCoreWebView2_OfflineElement_Button"));

                Log.Comment("Create offline element and EnsureCWV2()...");
                using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "1"))
                {
                    create_OfflineElement_Button.Invoke();
                    ensureCoreWebView2_OfflineElement_Button.Invoke();
                    ensureCoreWebView2CompletionWaiter.Wait();
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    0,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Created offline without source (not live yet)"
                );

                Log.Comment("Add to tree...");
                using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                {
                    add_OfflineElement_Button.Invoke();
                    loadedWaiter.Wait();
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Added to tree"
                );

                Log.Comment("Set source...");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    setSource_OfflineElement_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Set source"
                );
                EndSubTest("Preload Test #2");

                BeginSubTest("Live Element Test #1", "CreateLive -> Set Source -> Wait(NavCompleted/Loaded)");
                Button create_LiveElement_Button = new Button(FindElement.ById("Create_LiveElement_Button"));
                Button setSource_LiveElement_Button = new Button(FindElement.ById("SetSource_LiveElement_Button"));

                // Notice logic in the waiters here to handle race between NavCompleted and Loaded
                Log.Comment("Create live element and set source...");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    create_LiveElement_Button.Invoke();
                    setSource_LiveElement_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Create live with source"
                );
                EndSubTest("Live Element Test #1");

                BeginSubTest("Live Element Test #2", "CreateLive -> EnsureCWV2() -> Wait(EnsureCWV2_Completion/Loaded) -> SetSource");
                Button ensureCoreWebView2_LiveElement_Button = new Button(FindElement.ById("EnsureCoreWebView2_LiveElement_Button"));

                Log.Comment("Create live element and EnsureCWV2()...");
                using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "1"))
                {
                    create_LiveElement_Button.Invoke();
                    ensureCoreWebView2_LiveElement_Button.Invoke();
                    ensureCoreWebView2CompletionWaiter.Wait();
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }
                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Create live without source"
                );

                Log.Comment("Set source...");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    setSource_LiveElement_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Source set"
                );
                EndSubTest("Live Element Test #2");

                BeginSubTest("Markup Test #1", "Create_XamlReaderLoad -> EnterTree-> EnsureCWV2() -> Wait(EnsureCWV2_Completion/Loaded) -> SetSource");
                Button create_MarkupElement_Blank_Button = new Button(FindElement.ById("Create_MarkupElement_Blank_Button"));
                Button ensureCoreWebView2_MarkupElement_Button = new Button(FindElement.ById("EnsureCoreWebView2_MarkupElement_Button"));
                Button setSource_MarkupElement_Button = new Button(FindElement.ById("SetSource_MarkupElement_Button"));

                Log.Comment("Load from Markup and add to tree");
                using (var loadedWwaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                {
                    create_MarkupElement_Blank_Button.Invoke();
                    loadedWwaiter.Wait();
                }
                ValidateEventCounts(
                    0,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Loaded from markup and added to tree"
                );

                Log.Comment("Call EnsureCWV2()");
                using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "1"))
                {
                    ensureCoreWebView2_MarkupElement_Button.Invoke();
                    ensureCoreWebView2CompletionWaiter.Wait();
                }
                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Loaded from markup and added to tree"
                );

                Log.Comment("Set Source");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    setSource_MarkupElement_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Source set"
                );
                EndSubTest("Markup Test #1");

                // MarkupTest #2: XamlReader.Load() WV2 with Source Set
                BeginSubTest("Markup Test #2", "Create_XamlReaderLoad (with Source set)");
                Button create_MarkupElement_Source_Button = new Button(FindElement.ById("Create_MarkupElement_Source_Button"));

                Log.Comment("Create Live element w/ Source");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    create_MarkupElement_Source_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Loaded from markup w/ Source"
                );
                EndSubTest("Markup Test #2");

                Log.Comment("Close() API Tests: Force close the 3 WV2s we created above");
                // Close() API Test: Force close the 3 WV2' we created above
                //   Part A: Close WV2 element used earlier for "Offline (pre-load) Creation" test
                BeginSubTest("Close Test #1", "Close WV2 element used earlier for 'Offline (pre-load) Creation' test");
                Button releaseReference_OfflineElement_Button = new Button(FindElement.ById("ReleaseReference_OfflineElement_Button"));
                Button close_OfflineElement_Button = new Button(FindElement.ById("Close_OfflineElement_Button"));
                Button remove_OfflineElement_Button = new Button(FindElement.ById("Remove_OfflineElement_Button"));

                Log.Comment("Remove from tree, then Close");
                using (var unloadedWaiter = new ValueChangedEventWaiter(unloadedCount, "1"))
                {
                    remove_OfflineElement_Button.Invoke();
                    close_OfflineElement_Button.Invoke();
                    unloadedWaiter.Wait();
                }
                ValidateEventCounts(
                    0,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    0,      // loadedCountExpected
                    1,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Remove, Close"
                );

                Log.Comment("Try to set Source -> expect RO_E_CLOSED");
                setSource_OfflineElement_Button.Invoke();
                ValidateExceptionCounts(
                    1       // closedExceptionCountExpected
                );
                EndSubTest("Close Test #1");

                BeginSubTest("Close Test #2", "Close WV2 element used earlier for 'Live (in-tree) Creation' test");
                Button remove_LiveElement_Button = new Button(FindElement.ById("Remove_LiveElement_Button"));
                Button close_LiveElement_Button = new Button(FindElement.ById("Close_LiveElement_Button"));

                // Test just Close(). No events to wait on here.
                Log.Comment("Close");
                close_LiveElement_Button.Invoke();

                ValidateEventCounts(
                    0,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    0,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Close"
                );

                Log.Comment("Try EnsureCWV2 -> expect RO_E_CLOSED");
                ensureCoreWebView2_LiveElement_Button.Invoke();
                ValidateExceptionCounts(
                    1       // closedExceptionCountExpected
                );
                EndSubTest("Close Test #2");

                BeginSubTest("Close Test #3", "Close WV2 element used earlier for 'Markup-based Creation' test");
                Button remove_MarkupElement_Button = new Button(FindElement.ById("Remove_MarkupElement_Button"));
                Button close_MarkupElement_Button = new Button(FindElement.ById("Close_MarkupElement_Button"));

                Log.Comment("Close, then Remove from tree");
                using (var unloadedWaiter = new ValueChangedEventWaiter(unloadedCount, "1"))
                {
                    close_MarkupElement_Button.Invoke();
                    remove_MarkupElement_Button.Invoke();
                    unloadedWaiter.Wait();
                }

                ValidateEventCounts(
                    0,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    0,      // loadedCountExpected
                    1,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Close, Remove"
                );

                Log.Comment("Try EnsureCWV2 -> expect RO_E_CLOSED");
                ensureCoreWebView2_MarkupElement_Button.Invoke();
                ValidateExceptionCounts(
                    1       // closedExceptionCountExpected
                );
                EndSubTest("Close Test #3");
            }
        }

void BasicFlingTouchTest ( ) [inline]

Definition at line 1343 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("BasicFlingTouchTest");

                var webview = FindElement.ById("MyWebView2");

                // Use tap to initialize status text box so that subsequent waiter isn't triggered by flick's initial tap.
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                InputHelper.Tap(webview);
                */
                Rectangle bounds = webview.BoundingRectangle;
                webview.Tap(bounds.Width / 2, bounds.Height / 2);

                // Basic Flick Injection to the West (causing scroll to the East) to the end of the page.
                /*
                InputHelper.Flick(webview, 250, Direction.West);
                */
                Point center = new Point(bounds.Width / 2, bounds.Height / 2);
                InputHelper.Flick(webview, center, 300, Direction.West);
                WaitForWebMessageResult("BasicFlingTouchTest");
            }
        }

void BasicKeyboardTest ( ) [inline]

Definition at line 1070 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("BasicKeyboardTest");

                var CopyPasteTextBox2 = new Edit(FindElement.ById("CopyPasteTextBox2"));
                // Result should be "Hello 123 World" via:
                // Write Hello Wor after navigating to textbox in webview.
                Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
                x1.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");

                Log.Comment("Tab to w1...");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w1");

                Log.Comment("Inject 'Hello Wor'...");
                TextInput.SendText("Hello Wor");

                Log.Comment("Inject left arrow three times...");
                KeyboardHelper.PressKey(Key.Left, ModifierKey.None, 1, true);
                KeyboardHelper.PressKey(Key.Left, ModifierKey.None, 1, true);
                KeyboardHelper.PressKey(Key.Left, ModifierKey.None, 1, true);

                Log.Comment("Inject '123 '...");
                TextInput.SendText("123 ");

                Log.Comment("Inject right arrow three times...");
                KeyboardHelper.PressKey(Key.Right, ModifierKey.None, 1, true);
                KeyboardHelper.PressKey(Key.Right, ModifierKey.None, 1, true);
                KeyboardHelper.PressKey(Key.Right, ModifierKey.None, 1, true);

                Log.Comment("Inject 'ld'...");
                TextInput.SendText("ld");

                Log.Comment("Test simultaneous keyboard inputs by injecting shift+left twice...");
                KeyboardHelper.PressKey(Key.Left, ModifierKey.Shift, 1, true);
                KeyboardHelper.PressKey(Key.Left, ModifierKey.Shift, 1, true);
                TextInput.SendText("m");

                // Copy out to PasteBox1 for verification.
                DoSelectAllByKeyboard();
                CopySelected();
                CopyPasteTextBox2.SetFocus();
                PasteClipboard();

                // On app side, validate pasted text

                CompleteTestAndWaitForResult("BasicKeyboardTest");
            }
        }

void BasicLongPressTouchTest ( ) [inline]

Definition at line 1418 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("BasicLongPressTouchTest");

                var webview = FindElement.ById("MyWebView2");
                // Long Press for 2 seconds, triggering commandView.
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                InputHelper.TapAndHold(webview, 2000);
                */
                Rectangle bounds = webview.BoundingRectangle;
                InputHelper.TapAndHold(webview, bounds.Width/2, bounds.Height/2, 2000);

                WaitForWebMessageResult("BasicLongPressTouchTest");
            }
        }

void BasicPanTouchTest ( ) [inline]

Definition at line 1394 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("BasicPanTouchTest");

                var webview = FindElement.ById("MyWebView2");
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                InputHelper.Pan(webview, 250, Direction.West);
                */
                Rectangle bounds = webview.BoundingRectangle;
                Point center = new Point(bounds.Width / 2 + bounds.X, bounds.Height / 2 + bounds.Y);
                InputHelper.Pan(webview, center, 250, Direction.West);

                WaitForWebMessageResult("BasicPanTouchTest");
            }
        }

void BasicRenderingTest ( ) [inline]

Definition at line 478 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("BasicRenderingTest");
                Wait.ForMilliseconds(100); // rendering a webpage takes some time after navigation completed

                // To verify, check for the appropriate pixel(s) using User32 and GDI32 calls here in the test runner.
                WebView2Temporary.WebView2RenderingVerifier.VerifyInstances("BasicRenderingTest");
                CompleteTestAndWaitForResult("BasicRenderingTest");
            }
        }

void BasicStretchTouchTest ( ) [inline]

Definition at line 1374 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("BasicStretchTouchTest");

                var webview = FindElement.ById("MyWebView2");

                // Stretch webview by 200 pixels with one finger stationary.
                InputHelper.Stretch(webview, 200, Direction.East, true);
                Log.Comment("Waiting for webview stretch completion");
                InputHelper.Tap(webview);

                WaitForWebMessageResult("BasicStretchTouchTest");
            }
        }

void BasicTapTouchTest ( ) [inline]

Definition at line 1321 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("BasicTapTouchTest");

                var webview = FindElement.ById("MyWebView2");
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                InputHelper.Tap(webview);
                */
                Rectangle bounds = webview.BoundingRectangle;
                webview.Tap(bounds.Width / 2, bounds.Height / 2);
                WaitForWebMessageResult("BasicTapTouchTest");
            }
        }

static void BeginSubTest | ( | string | testName,
 |  | string | testDescription |
 | ) |  |  | [inline, static, private]

Definition at line 2183 of file WebView2Tests.cs.

        {
            Log.Comment(Environment.NewLine + testName + ": " + testDescription);

            Log.Comment("Resetting event and exception counts...");
            Button resetCounts_Button = new Button(FindElement.ById("ResetCounts_Button"));
            resetCounts_Button.Invoke();
            Wait.ForIdle();
        }

static void ChooseTest | ( | string | testName,
 |  | bool | waitForLoadCompleted = true |
 | ) |  |  | [inline, static, private]

Definition at line 435 of file WebView2Tests.cs.

        {
            WaitForCopyCompleted();

            string comboBoxName = "TestNameComboBox";
            Log.Comment("Retrieve ComboBox item with name '{0}'.", comboBoxName);
            ComboBox comboBox = new ComboBox(FindElement.ById(comboBoxName));
            comboBox.SelectItemByName(testName);
            Wait.ForIdle();

            if (waitForLoadCompleted)
            {
                WaitForLoadCompleted();
            }
        }

static void ClassInitialize ( TestContext testContext ) [inline, static]

Definition at line 36 of file WebView2Tests.cs.

        {
            if (!(new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator)))
            {
                Verify.Fail("WebView2 tests must be run elevated, as they required write access to the registry.");
            }

            TestEnvironment.Initialize(testContext);
            EnsureBrowser();
        }

void CloseThenDPIChangeTest ( ) [inline]

Definition at line 1835 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("CloseThenDPIChangeTest");
                // Close the webview
                CompleteTestAndWaitForResult("CloseThenDPIChangeTest");
                // TODO: somehow change the DPI and ensure there is no crash
                // This test can be run manually by choosing the test, clicking the "Complete Test" button,
                // and then moving the application window to a monitor with a different DPI
            }
        }

static void CompleteTestAndWaitForResult | ( | string | selectedTest,
 |  | bool | shouldDumpMessageLog = false |
 | ) |  |  | [inline, static, private]

Definition at line 338 of file WebView2Tests.cs.

        {
            var result = new Edit(FindElement.ById("TestResult"));
            Button CompleteTestButton = new Button(FindElement.ById("CompleteTest"));
            string expectedValue = selectedTest + ": Passed []";

            Log.Comment("Waiting for result...");
            using (var waiter = new ValueChangedEventWaiter(result, expectedValue))
            {
                CompleteTestButton.Invoke();
                waiter.TryWait();
            }

            if(shouldDumpMessageLog)
            {
                var logBox = new Edit(FindElement.ById("MessageLog"));
                if (logBox != null)
                {
                    Log.Comment("Dumping MessageLog:");
                    Log.Comment(logBox.GetText());
                }
            }

            Verify.AreEqual(expectedValue, result.Value);
        }

static void CompleteTestAndWaitForWebMessageResult ( string selectedTest ) [inline, static, private]

Definition at line 315 of file WebView2Tests.cs.

        {
            var result = new Edit(FindElement.ById("TestResult"));
            var check = new CheckBox(FindElement.ById("MessageReceived"));
            Button CompleteTestButton = new Button(FindElement.ById("CompleteTest"));
            string expectedValue = selectedTest + ": Passed []";

            Log.Comment("Waiting for result...");
            CompleteTestButton.Invoke();

            // If the web message hasn't been received, wait for it
            using (var waiter = check.GetToggledWaiter())
            {
                if (check.ToggleState != ToggleState.On && !waiter.TryWait())
                {
                    Log.Error("Expected web message was never received.");
                }
            }

            // By now, we'll have gotten a pass/fail result
            Verify.AreEqual(expectedValue, result.Value);
        }

void ConcurrentCreationRequestsTest ( ) [inline]

Definition at line 2651 of file WebView2Tests.cs.

        {
            // Use two sources to test that concurrent creations/navigations end up in the expected state
            string source1_filename = "SimplePage.html";
            string source2_filename = "SimplePageWithButton.html";

            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToCoreObjectsWebView2" }))
            {
                ChooseTest("ConcurrentCreationRequestsTest", false /* waitForLoadCompleted */);

                var coreWebView2InitializedCount = new Edit(FindElement.ById("CoreWebView2InitializedCount"));
                var ensureCoreWebView2CompletionCount = new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"));
                var navigationCompletedCount = new Edit(FindElement.ById("NavigationCompletedCount"));
                var loadedCount = new Edit(FindElement.ById("LoadedCount"));

                Button create_ConcurrentCreationElement_Button = new Button(FindElement.ById("Create_ConcurrentCreationElement_Button"));
                Button source_Source_Button = new Button(FindElement.ById("Source_Source_Button"));
                Button source_Ensure_Button = new Button(FindElement.ById("Source_Ensure_Button"));
                Button ensure_Source_Button = new Button(FindElement.ById("Ensure_Source_Button"));
                Button ensure_Ensure_Button = new Button(FindElement.ById("Ensure_Ensure_Button"));
                Button remove_ConcurrentCreationElement_Button = new Button(FindElement.ById("Remove_ConcurrentCreationElement_Button"));
                Button close_ConcurrentCreationElement_Button = new Button(FindElement.ById("Close_ConcurrentCreationElement_Button"));

                BeginSubTest("Concurrent Creation Test #1: Source, Source","Set Source #1, then Source #2. Expect creation to run once and navigate to Source #2 only.");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    create_ConcurrentCreationElement_Button.Invoke();
                    source_Source_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }

                ValidateLoadedSource(source2_filename);

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Source, Source"

                );
                EndSubTest("Concurrent Creation Test #1: Source, Source");

                BeginSubTest("Concurrent Creation Test #2: Source, EnsureCWV2", "Set Source, then call EnsureCoreWebView2(). Both calls should succeed.");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    create_ConcurrentCreationElement_Button.Invoke();
                    source_Ensure_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }

                ValidateLoadedSource(source1_filename);

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Source, EnsureCWV2"
                    );
                EndSubTest("Concurrent Creation Test #2: Source, EnsureCWV2");

                BeginSubTest("Concurrent Creation Test #3: EnsureCWV2, Source", "Call EnsureCWV(), then set Source. Both calls should succeed.");
                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    create_ConcurrentCreationElement_Button.Invoke();
                    ensure_Source_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }

                ValidateLoadedSource(source2_filename);

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    1,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "Source, EnsureCWV2"
                    );
                EndSubTest("Concurrent Creation Test #3: Source, EnsureCWV2");

                BeginSubTest("Concurrent Creation Test #4: EnsureCWV2, EnsureCWV2", "Call EnsureCWV(), then  EnsureCWV() again.");
                using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "2"))
                {
                    create_ConcurrentCreationElement_Button.Invoke();
                    ensure_Ensure_Button.Invoke();
                }

                if (coreWebView2InitializedCount.Value != "1")
                {
                    using (var coreWebView2InitializedWaiter = new ValueChangedEventWaiter(coreWebView2InitializedCount, "1"))
                    {
                        coreWebView2InitializedWaiter.Wait();
                    }
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }

                // No source specified, so skip ValidateLoadedSource()

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    2,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    0,      // coreProcessFailedCountExpected
                    "EnsureCWV2, EnsureCWV2"
                    );
                EndSubTest("Concurrent Creation Test #4: EnsureCWV2, EnsureCWV2");
            }
        }

void CopyPasteTest ( ) [inline]

Definition at line 960 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("CopyPasteTest");

                var CopyPasteTextBox1 = new Edit(FindElement.ById("CopyPasteTextBox1"));
                var CopyPasteTextBox2 = new Edit(FindElement.ById("CopyPasteTextBox2"));

                // Copy text to SimpleInputPage's text box page.
                Log.Comment("Copy and paste text to SimpleInputPage's text box page...");
                CopyPasteTextBox1.SetFocus();
                DoSelectAllByKeyboard();
                CopySelected();
                SetWebViewElementFocus("w2", 2);
                // Do ctrl+V to paste into html.
                PasteClipboard();

                using (var clearClipboardWaiter = new ValueChangedEventWaiter(CopyPasteTextBox2, "Clear"))
                {
                    // "Clear" clipboard by copying text between TextBoxes on Xaml page.
                    Log.Comment("Clear clipboard by copying text between TextBoxes on Xaml page...");
                    CopyPasteTextBox1.SetValue("Clear");
                    CopyPasteTextBox1.SetFocus();
                    Wait.ForIdle();
                    Verify.IsTrue(CopyPasteTextBox1.HasKeyboardFocus);
                    DoSelectAllByKeyboard();
                    CopySelected();
                    CopyPasteTextBox2.SetFocus();
                    Wait.ForIdle();
                    Verify.IsTrue(CopyPasteTextBox2.HasKeyboardFocus);
                    DoSelectAllByKeyboard();
                    PasteClipboard();
                    clearClipboardWaiter.Wait();
                }

                // Selecting html content from step 1 and copying out of webview for verification.
                SetWebViewElementFocus("w2", 2);
                using (var pasteTestWaiter = new ValueChangedEventWaiter(CopyPasteTextBox2, "PasteTest"))
                {
                    Log.Comment("Selecting html content from step 1 and copying out of webview for verification...");
                    DoSelectAllByKeyboard();
                    CopySelected();
                    CopyPasteTextBox2.SetFocus();
                    DoSelectAllByKeyboard();
                    PasteClipboard();
                    pasteTestWaiter.Wait();
                }

                // Inject new text into html textbox and copy out to verify copy from webview.
                SetWebViewElementFocus("w2", 2);
                using (var copyTestWaiter = new ValueChangedEventWaiter(CopyPasteTextBox1, "CopyTest"))
                {
                    Log.Comment("Inject new text into html textbox and copy out to verify copy from webview...");
                    TextInput.SendText("CopyTest");
                    DoSelectAllByKeyboard();
                    CopySelected();
                    CopyPasteTextBox1.SetFocus();
                    DoSelectAllByKeyboard();
                    PasteClipboard();
                    copyTestWaiter.Wait();
                }

                CompleteTestAndWaitForResult("CopyPasteTest");
            }
        }

static void CopySelected ( ) [inline, static, private]

Definition at line 399 of file WebView2Tests.cs.

        {
            Log.Comment("Do Copy");
            KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
            TextInput.SendText("c");
            KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
        }

void CoreWebView2Initialized_FailedTest ( ) [inline]

Definition at line 1617 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("CoreWebView2Initialized_FailedTest", false /* waitForLoadCompleted */);

                // Imitate Edge not being installed by setting a reg key to point Edge at a location where the WebView2 runtime does not exist
                // https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.865-prerelease#createcorewebview2environmentwithoptions
                var browserExecutableKey = GetBrowserExecutableFolderKey();
                Log.Comment("Setting key for {0}", TestApplicationInfo.MUXControlsTestApp.ProcessName);
                browserExecutableKey.SetValue(TestApplicationInfo.MUXControlsTestApp.ProcessName, "c:\\badpath");

                try
                {
                    CompleteTestAndWaitForResult("CoreWebView2Initialized_FailedTest");
                }
                finally
                {
                    browserExecutableKey.DeleteValue(TestApplicationInfo.MUXControlsTestApp.ProcessName);
                    Log.Comment("Removed key for {0}", TestApplicationInfo.MUXControlsTestApp.ProcessName);
                }
            }
        }

void CoreWebView2InitializedTest ( ) [inline]

Definition at line 1606 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("CoreWebView2InitializedTest", false /* waitForLoadCompleted */);
                CompleteTestAndWaitForResult("CoreWebView2InitializedTest");
            }
        }

void CursorClickUpdateTest ( ) [inline]

Definition at line 636 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // On ChooseTest, replace the default webview with one that exposes the ProtectedCursor member
                ChooseTest("CursorClickUpdateTest");

                // Clear the cache so we can find the new webview
                ElementCache.Clear();
                var webview = FindElement.ById("MyWebView2");
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);

                // Click somewhere in the webview that's not the button a few times
                var centerOfWebView = new Point(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2);
                PointerInput.Move(centerOfWebView);

                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);

                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);

                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);

                var insideButton = new Point(bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(insideButton);
                Wait.ForIdle();

                // Checks that the ProtectedCursor type has changed to the one we expect
                CompleteTestAndWaitForResult("CursorClickUpdateTest");
            }
        }

void CursorUpdateTest ( ) [inline]

Definition at line 605 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // On ChooseTest, replace the default webview with one that exposes the ProtectedCursor member
                ChooseTest("CursorUpdateTest");

                // Clear the cache so we can find the new webview
                ElementCache.Clear();
                var webview = FindElement.ById("MyWebView2");
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);

                // Top left coordinate (location of web button) relative from the center of webview
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                InputHelper.MoveMouse(webview, -bounds.Width / 2 + 20, -bounds.Height / 2 + 20);
                */
                var point = new Point(bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(point);
                Wait.ForIdle();

                // Checks that the ProtectedCursor type has changed to the one we expect
                CompleteTestAndWaitForResult("CursorUpdateTest");
            }
        }

void CustomConfiguration_BasicTest ( ) [inline]

Definition at line 2146 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // We have to load page in CompleteTest so that we can use a custom environment. Don't wait for the load here.
                ChooseTest("CustomConfiguration_BasicTest", false /* waitForLoadCompleted */);

                CompleteTestAndWaitForResult("CustomConfiguration_BasicTest");
            }
        }

void CustomConfiguration_EnsureAgainAfterCustomTest ( ) [inline]

Definition at line 2172 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // We have to load page in CompleteTest so that we can use a custom environment. Don't wait for the load here.
                ChooseTest("CustomConfiguration_EnsureAgainAfterCustomTest", false /* waitForLoadCompleted */);

                CompleteTestAndWaitForResult("CustomConfiguration_EnsureAgainAfterCustomTest", true /* shouldDumpMessageLog */ );
            }
        }

void CustomConfiguration_EnsureAgainAfterDefaultTest ( ) [inline]

Definition at line 2159 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // We have to load page in CompleteTest so that we can use a custom environment. Don't wait for the load here.
                ChooseTest("CustomConfiguration_EnsureAgainAfterDefaultTest");

                CompleteTestAndWaitForResult("CustomConfiguration_EnsureAgainAfterDefaultTest", true /* shouldDumpMessageLog */ );
            }
        }

static void DoSelectAllByKeyboard ( ) [inline, static, private]

Definition at line 391 of file WebView2Tests.cs.

        {
            Log.Comment("Do Select All");
            KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
            TextInput.SendText("a");
            KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
        }

void DragDropIntoWebView2Test ( ) [inline]

Definition at line 1029 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("DragDropIntoWebView2Test");

                var wv2 = FindElement.ById("MyWebView2");
                Rectangle wv2_bounds = wv2.BoundingRectangle;
                Log.Comment("[MyWebView2] Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", wv2_bounds.X, wv2_bounds.Y, wv2_bounds.Width, wv2_bounds.Height);

                // Drag & Drop Source - TextBlock with AllowDrop set
                var draggableTextTextBlock = new Edit(FindElement.ById("DraggableTextTextBlock"));
                var allowDropCheckBox = new CheckBox(FindElement.ById("AllowDropCheckbox"));
                allowDropCheckBox.Check();

                // Drag & Drop Target - HTML Input/Text control 'w2'
                var miscTextBox = new Edit(FindElement.ById("MiscTextBox"));
                WaitForTextBoxValue(miscTextBox, string.Empty, false /* match = false for not match */);
                string wv2CenterFullString = miscTextBox.Value;
                Verify.IsTrue(wv2CenterFullString.StartsWith("w2 CenterPoint:"), "w2 Center information is available");

                // Read center point of Input control reported by webpage (expected format: "w2 CenterPoint: (CenterX,CenterY)")
                string[] w2_xy = ((wv2CenterFullString.Split('(')[1]).Split(')')[0]).Split(',');
                int w2_centerX = int.Parse(w2_xy[0]);
                int w2_centerY = int.Parse(w2_xy[1]);
                Log.Comment("w2: CenterX=" + w2_centerX + ", CenterY=" + w2_centerY);

                // Final target offset computed by adjusting w2 CenterPoint from WV2 center to it's top/left corner
                int w2_effectiveOffsetX = w2_centerX - wv2_bounds.Width / 2;
                int w2_effectiveOffsetY = w2_centerY - wv2_bounds.Height / 2;

                Log.Comment("Drag and drop text from DraggableTextTextBlock (XAML) to w2 Input/text (Web)");
                InputHelper.DragToTarget(draggableTextTextBlock, wv2, w2_effectiveOffsetX, w2_effectiveOffsetY);
                Log.Comment("Done with drag and drop");

                CompleteTestAndWaitForWebMessageResult("DragDropIntoWebView2Test");
            }
        }

void EdgeProcessFailedTest ( ) [inline]

Definition at line 2806 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToCoreObjectsWebView2" }))
            {
                ChooseTest("EdgeProcessFailedTest", false /* waitForLoadCompleted */);

                var coreWebView2InitializedCount = new Edit(FindElement.ById("CoreWebView2InitializedCount"));
                var ensureCoreWebView2CompletionCount = new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"));
                var navigationCompletedCount = new Edit(FindElement.ById("NavigationCompletedCount"));
                var loadedCount = new Edit(FindElement.ById("LoadedCount"));
                var coreProcessFailedCount = new Edit(FindElement.ById("CoreProcessFailedCount"));

                Button Create_CoreProcessFailed_Button = new Button(FindElement.ById("Create_CoreProcessFailed_Button"));
                Button Bad_Source_Browser_Button = new Button(FindElement.ById("Bad_Source_Browser_Button"));
                Button Bad_Source_Render_Button = new Button(FindElement.ById("Bad_Source_Render_Button"));
                Button Good_Source_Button = new Button(FindElement.ById("Good_Source_Button"));
                Button Reload_Button = new Button(FindElement.ById("Reload_Button"));

                BeginSubTest("CoreProcessFailed Event Test", "Set bad source #1 (browser crash) -> Set good source -> Set bad source #2 (tab crash) -> Reload");
                using (var coreProcessFailedWaiter = new ValueChangedEventWaiter(coreProcessFailedCount, "1"))
                {
                    Create_CoreProcessFailed_Button.Invoke();
                    Bad_Source_Browser_Button.Invoke();
                    coreProcessFailedWaiter.Wait(TimeSpan.FromSeconds(60));
                }

                if (loadedCount.Value != "1")
                {
                    using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
                    {
                        loadedWaiter.Wait();
                    }
                }

                ValidateEventCounts(
                    1,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    0,      // navigationStartingCountExpected
                    0,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    1,      // coreProcessFailedCountExpected
                    "Bad Source #1 (browser crash)"
                );

                // Make sure we bad source #1 led to WebView2ProcessFailedKind.BrowserProcessExited
                ValidateEventDetail("BrowserProcessExited");

                using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
                {
                    Good_Source_Button.Invoke();
                    navigationCompletedWaiter.Wait();
                }

                ValidateEventCounts(
                    2,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    1,      // coreProcessFailedCountExpected
                    "Good source"
                );

                using (var coreProcessFailedWaiter2 = new ValueChangedEventWaiter(coreProcessFailedCount, "2"))
                {
                    Bad_Source_Render_Button.Invoke();
                    coreProcessFailedWaiter2.Wait(TimeSpan.FromSeconds(60));
                }

                ValidateEventCounts(
                    2,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    1,      // navigationStartingCountExpected
                    1,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    2,      // coreProcessFailedCountExpected
                    "Bad Source #2 (tab crash)"
                );

                // Make sure we bad source #2 led to WebView2ProcessFailedKind.RenderProcessExited
                ValidateEventDetail("RenderProcessExited");

                using (var navigationCompletedWaiter2 = new ValueChangedEventWaiter(navigationCompletedCount, "2"))
                {
                    Reload_Button.Invoke();
                    navigationCompletedWaiter2.Wait();
                }

                ValidateEventCounts(
                    2,      // coreWebView2InitializedCountExpected
                    0,      // ensureCoreWebView2CompletionCountExpected
                    2,      // navigationStartingCountExpected
                    2,      // navigationCompletedCountExpected
                    1,      // loadedCountExpected
                    0,      // unloadedCountExpected
                    2,      // coreProcessFailedCountExpected
                    "Reload() [should succeed after tab crash]]"
                );

                EndSubTest("ProcessFailed Test");
            }
        }

static void EndSubTest ( string testName ) [inline, static, private]

Definition at line 2193 of file WebView2Tests.cs.

        {
            Log.Comment(testName + " finished...");
        }

static void EnsureBrowser ( ) [inline, static]

Definition at line 48 of file WebView2Tests.cs.

        {
            // If a previous run of CoreWebView2Initialized_FailedTest failed to clean up the
            // fake browser executable folder key it set, remove it here.
            RemoveFakeBrowserExecutableFolderKey();

            // 1. Get installed Edge browser (or WebView2 Runtime) build version info.
            int browserBuildVersion = GetInstalledBrowserVersion();

            // 2. Get Microsoft.Web.WebView2.Core.dll build version info.
            int sdkBuildVersion = GetSdkBuildVersion();

            // 3. Check if a runtime is already installed, and if it's compatible.
            bool hasCompatibleRuntimeInstalled = GetHasCompatibleRuntimeInstalled(browserBuildVersion, sdkBuildVersion);

            // 4a. If we have a compatible runtime installed, continue on to the tests!
            if (hasCompatibleRuntimeInstalled)
            {
                return;
            }

            // 4b. If we don't have a compatible runtime, try to install one.

            // 5. Before installing, check if Edge is already installing/updating. We can't run the standalone installer if it is.
            bool didWait = WaitForEdgeIfAlreadyInstalling();

            if (didWait && IsEdgeAlreadyInstalling())
            {
                Log.Error("WebView2Tests Init: Edge took more than 3 minutes to install, give up.");
            }
            else if (didWait)
            {
                // If we waited for Edge to finish installing/updating and it finished, check the versions again
                browserBuildVersion = GetInstalledBrowserVersion();
                hasCompatibleRuntimeInstalled = GetHasCompatibleRuntimeInstalled(browserBuildVersion, sdkBuildVersion);
                if (hasCompatibleRuntimeInstalled)
                {
                    return;
                }
            }

            // 6. If Edge wasn't already installing/updating, or it was but installed something old (unlikely),
            // run the standalone installer to install it.
            // This installation can sometimes fail, so we'll try a number of times before failing out.
            int attemptsLeft = 5;
            bool successfullyInstalled = false;
            while (attemptsLeft > 0)
            {
                attemptsLeft--;
                successfullyInstalled = TryInstallingBrowser(attemptsLeft);
                if (successfullyInstalled) break;
            }
            if (attemptsLeft == 0 && !successfullyInstalled)
            {
                Log.Error("WebView2Tests Init: Browser installation failed, out of retries.");
            }
        }

void ExecuteScriptTest ( ) [inline]

Definition at line 866 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ExecuteScriptTest");
                CompleteTestAndWaitForResult("ExecuteScriptTest");
            }
        }

void Focus_BackAndForthTabTest ( ) [inline]

Definition at line 768 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("Focus_BackAndForthTabTest");

                Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1

                Log.Comment("Description: x1 -> w1 shift-> x1 -> w1 -> x1");
                Log.Comment("Focus on x1");
                x1.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");

                Log.Comment("Tab x1 -> w1");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w1");

                Log.Comment("Shift+Tab w1 -> x1");
                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
                {
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
                    xamlFocusWaiter.Wait();
                    Log.Comment("Focus is on " + UIObject.Focused);
                    Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
                }

                Log.Comment("Tab x1 -> w1");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w1");

                Log.Comment("Shift+Tab w1 -> x1");
                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
                {
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
                    xamlFocusWaiter.Wait();
                    Log.Comment("Focus is on " + UIObject.Focused);
                    Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
                }

                CompleteTestAndWaitForResult("Focus_BackAndForthTabTest");
            }
        }

void Focus_BasicTabTest ( ) [inline]

Definition at line 689 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("Focus_BasicTabTest");

                Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
                Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2

                Log.Comment("Description: x1 -> w1 -> w2 -> x2 ");
                Log.Comment("Focus on x1");
                x1.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");

                Log.Comment("Tab x1 -> w1");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w1");

                Log.Comment("Tab w1 -> w2");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w2");

                Log.Comment("Tab w2 -> x2");
                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
                {
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                    xamlFocusWaiter.Wait();
                    Log.Comment("Focus is on " + UIObject.Focused);
                    Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
                }

                CompleteTestAndWaitForResult("Focus_BasicTabTest");
            }
        }

void Focus_MouseActivateTest ( ) [inline]

Definition at line 815 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("Focus_MouseActivateTest");

                Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1

                Log.Comment("Test1: Focus on x1, Click on w1, Shift+Tab w2 -> w1, Click on x2");
                Log.Comment("Focus on x1");
                x1.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");

                Log.Comment("Click on w2");

                Rectangle bounds = FindElement.ById("MyWebView2").BoundingRectangle;
                const int w2_offsetX = 100;
                const int w2_offsetY = 200;

                // top left coordinate (location of web button) relative from the center of webview

                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                var clickPoint = new Point(bounds.X + w2_offsetX, bounds.Y + w2_offsetY);
                PointerInput.Move(clickPoint);
                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);

                WaitForFocus("w2");

                Log.Comment("Shift+Tab w2 -> w1");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
                WaitForFocus("w1");

                Log.Comment("Click on x1");
                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
                {
                    InputHelper.MoveMouse(x1, 10, 10);
                    PointerInput.Press(PointerButtons.Primary);
                    PointerInput.Release(PointerButtons.Primary);
                    xamlFocusWaiter.Wait();
                    Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
                }

                CompleteTestAndWaitForResult("Focus_MouseActivateTest");
            }
        }

void Focus_ReverseTabTest ( ) [inline]

Definition at line 728 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("Focus_ReverseTabTest");

                Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
                Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2

                Log.Comment("Description: x2 shift-> w2 shift-> w1 shift-> x1");
                Log.Comment("Focus on x2");
                x2.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");

                Log.Comment("Shift+Tab x2 -> w2");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
                WaitForFocus("w2");

                Log.Comment("Shift+Tab w2 -> w1");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
                WaitForFocus("w1");

                Log.Comment("Shift+Tab w1 -> x1");
                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
                {

                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
                    xamlFocusWaiter.Wait();
                    Log.Comment("Focus is on " + UIObject.Focused);
                    Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
                }

                CompleteTestAndWaitForResult("Focus_ReverseTabTest");
            }
        }

static Win32.RegistryKey GetBrowserExecutableFolderKey ( ) [inline, static, private]

Definition at line 1641 of file WebView2Tests.cs.

        {
            return Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@"Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", true);
        }

static bool GetHasCompatibleRuntimeInstalled | ( | int | browserBuildVersion,
 |  | int | sdkBuildVersion |
 | ) |  |  | [inline, static, private]

Definition at line 176 of file WebView2Tests.cs.

        {
            bool hasCompatibleRuntime = false;
            // The full versions of browser/runtime and WebView2 SDK are not directly comparable:
            // Browser/Runtime version ex: 80.0.361.48
            // WebView2 SDK version ex: 0.8.355
            // Webview2Loader compares the build versions (361 and 355 in above example), we do so here as well
            if (browserBuildVersion >= sdkBuildVersion)
            {
                Log.Comment("WebView2Tests Init: Installed Edge build will be used for testing... ");
                hasCompatibleRuntime = true;
            }
            return hasCompatibleRuntime;
        }

static int GetInstalledBrowserVersion ( ) [inline, static, private]

Definition at line 117 of file WebView2Tests.cs.

        {
            string browserVersionString = string.Empty;
            IntPtr browserVersionPtr;
            int retval = NativeMethods.GetAvailableCoreWebView2BrowserVersionString(string.Empty, out browserVersionPtr);
            if (retval != (int)NativeMethods.HResults.S_OK)
            {
                Log.Warning("WebView2Tests Init: Error: got hresult {0:x8} retrieving GetAvailableCoreWebView2BrowserVersionString", retval);
            }
            else if (browserVersionPtr == IntPtr.Zero)
            {
                Log.Warning("WebView2Tests Init: GetAvailableCoreWebView2BrowserVersionString returned version of 0");
            }
            else
            {
                // eg "80.0.361.48 beta", 361 is the build version
                browserVersionString = Marshal.PtrToStringUni(browserVersionPtr);
                Marshal.FreeCoTaskMem(browserVersionPtr);
            }

            int browserBuildVersion = 0;
            string installedBrowser;

            if (string.IsNullOrEmpty(browserVersionString))
            {
                installedBrowser = "none";
            }
            else
            {
                browserBuildVersion = int.Parse(browserVersionString.Split('.')[2]);
                installedBrowser = string.Format("version {0} [build version: {1}]", browserVersionString, browserBuildVersion);
            }
            Log.Comment("WebView2Tests Init: Found Edge browser/WV2Runtime: {0}", installedBrowser);
            return browserBuildVersion;
        }

static int GetSdkBuildVersion ( ) [inline, static, private]

Definition at line 153 of file WebView2Tests.cs.

        {
            int sdkBuildVersion = 0;
            string dllName = "Microsoft.Web.WebView2.Core.dll";
            string dllPath = Path.Combine(Environment.CurrentDirectory , "test", dllName);

            try
            {
                FileVersionInfo sdkVersionInfo = FileVersionInfo.GetVersionInfo(dllPath);
                sdkBuildVersion = sdkVersionInfo.ProductBuildPart;
                Log.Comment("WebView2Tests Init: Found {0}: version {1} [build version: {2}] (file: {3})",
                            dllName,
                            sdkVersionInfo.ProductVersion,
                            sdkBuildVersion,
                            sdkVersionInfo.FileName);
            }
            catch (Exception e)
            {
                Log.Error("WebView2Tests Init: could not find loader at {0} [exception: {1}]", dllPath, e.ToString());
            }
            return sdkBuildVersion;
        }

void GoBackAndForwardTest ( ) [inline]

Definition at line 1275 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("GoBackAndForwardTest");
                CompleteTestAndWaitForResult("GoBackAndForwardTest");
            }
        }

void HiddenThenVisibleTest ( ) [inline]

Definition at line 2036 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("HiddenThenVisibleTest");
                CompleteTestAndWaitForResult("HiddenThenVisibleTest");

                // Clear the cache so we can find the new webview
                ElementCache.Clear();
                var webview = FindElement.ById("MyWebView2");
                Verify.IsTrue(webview.IsOffscreen == false);

                // Click in the webview to ensure we can interact with it
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
                var point = new Point(bounds.X + 20, bounds.Y + 20);
                Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(point);

                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);
                Wait.ForIdle();

                WaitForWebMessageResult("HiddenThenVisibleTest");
            }
        }

void HostNameToFolderMappingTest ( ) [inline]

Definition at line 1786 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("HostNameToFolderMappingTest");

                CompleteTestAndWaitForResult("HostNameToFolderMappingTest");

                var webview = FindElement.ById("MyWebView2");
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);

                var point = new Point(bounds.X + 20, bounds.Y + 20);
                Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(point);

                PointerButtons mouseButton = PointerButtons.Primary;
                PointerInput.Press(mouseButton);
                PointerInput.Release(mouseButton);

                WaitForWebMessageResult("HostNameToFolderMappingTest");
            }
        }

void HtmlDropdownTest ( ) [inline]

Definition at line 2003 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("HtmlDropdownTest");

                // Click on the select (dropdown) element, which covers the center of the WebView2
                var webview = FindElement.ById("MyWebView2");
                Rectangle bounds = webview.BoundingRectangle;
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                var point = new Point(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2);
                Log.Comment("Move mouse to ({0}, {1})", bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2);
                PointerInput.Move(point);
                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);

                var newPoint = new Point(point.X, bounds.Y + bounds.Height - 10);
                Log.Comment("Move mouse to another dropdown option");
                PointerInput.Move(newPoint);
                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);

                Verify.AreEqual(webview, UIObject.Focused);
                Verify.IsTrue(webview.HasKeyboardFocus);

                CompleteTestAndWaitForResult("HtmlDropdownTest");
            }
        }

static bool IsEdgeAlreadyInstalling ( ) [inline, static, private]

Definition at line 206 of file WebView2Tests.cs.

        {
            bool edgeUpdateIsRunning = false;
            // Print if there are any Edge processes running that might interfere with installation
            // (specifically, MicrosoftEdge<Version> or MicrosoftEdgeUpdate).
            foreach (var process in Process.GetProcesses())
            {
                if (process.ProcessName.ToLower().ToString().Contains("edge"))
                {
                    Log.Comment("Note: process '{0}' ({1}) is running", process.ProcessName, process.Id);
                    if (process.ProcessName.ToString().Equals("MicrosoftEdgeUpdate"))
                    {
                        edgeUpdateIsRunning = true;
                    }
                }
            }
            return edgeUpdateIsRunning;
        }

void KeyboardAcceleratorTest ( ) [inline]

Definition at line 1873 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("KeyboardAcceleratorTest");
                // Type "t" in the textbox in the webview. This should NOT invoke the F5 accelerator key handler in the app.
                SetWebViewElementFocus("w1", 1);
                KeyboardHelper.PressKey(Key.t);
                CompleteTestAndWaitForResult("KeyboardAcceleratorTest");
            }
        }

void LifetimeTabTest ( ) [inline]

Definition at line 2095 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // Part 1: Tab with no core webview

                Log.Comment("Part 1: Tab with no core webview");
                TabTwicePastWebView2();

                // Part 2: Tab with core webview, ensured but not navigated

                /*  TODO investigate why this needs three tabs sometimes
                Log.Comment("Part 2: Tab with core webview, not navigated");
                Button ensureButton = new Button(FindElement.ById("EnsureCWV2Button"));
                ensureButton.Invoke();
                WaitForEnsureCompleted();
                TabTwicePastWebView2();
                */

                // Part 3: Tab with closed core webview

                Log.Comment("Part 3: Tab with closed core webview");
                ChooseTest("LifetimeTabTest" /* waitForLoadCompleted */);
                CompleteTestAndWaitForResult("LifetimeTabTest");  // Closes the CoreWebView2
                TabTwicePastWebView2();
            }
        }

void MouseCaptureTest ( ) [inline]

Definition at line 1150 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("MouseCaptureTest");

                var CopyPasteTextBox2 = new Edit(FindElement.ById("CopyPasteTextBox2"));
                Rectangle bounds = FindElement.ById("MyWebView2").BoundingRectangle;
                // Offsets map pointer to the start of the textbox
                const int w2_offsetX = 30;
                const int w2_offsetY = 60;

                // Inject text into text box.
                Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
                x1.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w1");

                TextInput.SendText("MouseCaptureResult");

                // Select text with mouse left-click, drag to outside of wv2, then release
                var startPoint = new Point(bounds.X + w2_offsetX, bounds.Y + w2_offsetY);
                var outsidePoint = new Point(bounds.X + w2_offsetX + bounds.Width, bounds.Y + w2_offsetY);

                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                PointerInput.Move(startPoint);

                // Click once in edit box - this helps selection work in MITA, but is not necessary in manual testing
                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);

                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Move(outsidePoint);
                PointerInput.Release(PointerButtons.Primary);

                // Move mouse back across text
                // If the WebView did not correctly handle captured mouse input then the text will be deselected
                // due to the WebView still thinking that the mouse's left-button is pressed.
                PointerInput.Move(startPoint);

                using (var pasteTestWaiter = new ValueChangedEventWaiter(CopyPasteTextBox2, "MouseCaptureResult"))
                {
                    CopySelected();
                    CopyPasteTextBox2.SetFocus();
                    DoSelectAllByKeyboard();
                    PasteClipboard();
                    pasteTestWaiter.Wait();
                }

                CompleteTestAndWaitForResult("MouseCaptureTest");
            }
        }

static void MouseClickTestCommon ( PointerButtons mouseButton ) [inline, static, private]

Definition at line 491 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                string selectedTest = "Invalid";
                if (mouseButton == PointerButtons.Primary)
                {
                    selectedTest = "MouseLeftClickTest";
                }
                else if (mouseButton == PointerButtons.Middle)
                {
                    selectedTest = "MouseMiddleClickTest";
                }
                else if (mouseButton == PointerButtons.Secondary)
                {
                    selectedTest = "MouseRightClickTest";
                }
                else if (mouseButton == PointerButtons.XButton1)
                {
                    selectedTest = "MouseXButton1ClickTest";
                }
                else if (mouseButton == PointerButtons.XButton2)
                {
                    selectedTest = "MouseXButton2ClickTest";
                }
                ChooseTest(selectedTest);

                var webview = FindElement.ById("MyWebView2");
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                var point = webview.GetClickablePoint();
                Log.Comment("ClickablePoint = X:{0}, Y:{1}", point.X, point.Y);
                // Move mouse to top left coordinate (location of web button) relative from the center of webview
                InputHelper.MoveMouse(webview,
                    -bounds.Width/2 + 20, -bounds.Height/2 + 20);
                */
                var point = new Point(bounds.X + 20, bounds.Y + 20);
                Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(point);

                PointerInput.Press(mouseButton);
                PointerInput.Release(mouseButton);
                Wait.ForIdle();

                WaitForWebMessageResult(selectedTest);
            }
        }

void MouseLeftClickTest ( ) [inline]

Definition at line 544 of file WebView2Tests.cs.

        {
            MouseClickTestCommon(PointerButtons.Primary);
        }

void MouseMiddleClickTest ( ) [inline]

Definition at line 551 of file WebView2Tests.cs.

        {
            MouseClickTestCommon(PointerButtons.Middle);
        }

void MouseRightClickTest ( ) [inline]

Definition at line 558 of file WebView2Tests.cs.

        {
            MouseClickTestCommon(PointerButtons.Secondary);
        }

void MouseWheelScrollTest ( ) [inline]

Definition at line 579 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("MouseWheelScrollTest");

                var webview = FindElement.ById("MyWebView2");
                // Mouse wheel delta amount required per initial velocity unit
                const int mouseWheelDeltaForVelocityUnit = -4000;  // scroll downwards
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                InputHelper.RotateWheel(webview, mouseWheelDeltaForVelocityUnit);
                */
                Rectangle bounds = webview.BoundingRectangle;
                var point = new Point(bounds.X + bounds.Width/2, bounds.Y + bounds.Height/2);
                PointerInput.Move(point);
                MouseWheelInput.RotateWheel(mouseWheelDeltaForVelocityUnit);

                WaitForWebMessageResult("MouseWheelScrollTest");
            }
        }

void MouseXButton1ClickTest ( ) [inline]

Definition at line 565 of file WebView2Tests.cs.

        {
            MouseClickTestCommon(PointerButtons.XButton1);
        }

void MouseXButton2ClickTest ( ) [inline]

Definition at line 572 of file WebView2Tests.cs.

        {
            MouseClickTestCommon(PointerButtons.XButton2);
        }

void MoveTest ( ) [inline]

Definition at line 1469 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("MoveTest");
                CompleteTestAndWaitForResult("MoveTest");
            }
        }

void MultipleWebviews_BasicRenderingTest ( ) [inline]

Definition at line 928 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("MultipleWebviews_BasicRenderingTest");
                CompleteTestAndWaitForResult("MultipleWebviews_BasicRenderingTest");
                Wait.ForIdle();
                ElementCache.Clear();
                WebView2Temporary.WebView2RenderingVerifier.VerifyInstances("MultipleWebviews_BasicRenderingTest");
            }
        }

void MultipleWebviews_FocusTest ( ) [inline]

Definition at line 878 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("MultipleWebviews_FocusTest");

                Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
                Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2
                UIObject webviewControl = new UIObject(FindElement.ById("MyWebView2"));
                UIObject webviewControlB = new UIObject(FindElement.ById("MyWebView2B"));

                Log.Comment("Description: first tabstop1 -> webview1 -> second tabstop2 -> WebView2");
                Log.Comment("Focus on tabstop1");
                x1.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");

                Log.Comment("Tab tabstop1 -> MyWebView2");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w1");

                Log.Comment("Tab to move to next element within first webview page");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);

                Log.Comment("Tab MyWebView2 -> tabstop2");
                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
                {
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                    xamlFocusWaiter.Wait();
                    Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
                }

                Log.Comment("Tab tabstop2 -> MyWebView2B");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("w1B");

                using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
                {
                    KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
                    xamlFocusWaiter.Wait();
                    Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
                }

                CompleteTestAndWaitForResult("MultipleWebviews_FocusTest");
            }
        }

void MultipleWebviews_LanguageTest ( ) [inline]

Definition at line 943 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("MultipleWebviews_LanguageTest");
                CompleteTestAndWaitForResult("MultipleWebviews_LanguageTest");
            }
        }

void NavigateToLocalImageTest ( ) [inline]

Definition at line 1823 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("NavigateToLocalImageTest");
                CompleteTestAndWaitForWebMessageResult("NavigateToLocalImageTest");
            }
        }

void NavigateToStringTest ( ) [inline]

Definition at line 1219 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("NavigateToStringTest");
                CompleteTestAndWaitForResult("NavigateToStringTest");
            }
        }

void NavigateToVideoTest ( ) [inline]

Definition at line 1812 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("NavigateToVideoTest");
                CompleteTestAndWaitForResult("NavigateToVideoTest");
            }
        }

void NavigationErrorTest ( ) [inline]

Definition at line 673 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("NavigationErrorTest");
                CompleteTestAndWaitForResult("NavigationErrorTest");
            }
        }

void NavigationStartingInvalidTest ( ) [inline]

Definition at line 1297 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("NavigationStartingInvalidTest");
                CompleteTestAndWaitForResult("NavigationStartingInvalidTest");
            }
        }

void NavigationStartingTest ( ) [inline]

Definition at line 1286 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("NavigationStartingTest");
                CompleteTestAndWaitForResult("NavigationStartingTest");
            }
        }

void NonAsciiUriTest ( ) [inline]

Definition at line 1934 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // Navigate to a uri with a non-ascii characters
                ChooseTest("NonAsciiUriTest");
                CompleteTestAndWaitForResult("NonAsciiUriTest");

                // At the end of the test, we should only have gotten one NavigationStarting message.
                // All messages would have been printed to the MessageLog, so count the NavigationStarting
                // messages there.
                int count = 0;
                var logBox = new Edit(FindElement.ById("MessageLog"));
                var messageWords = logBox.GetText().Split(' ');
                foreach (string word in messageWords)
                {
                    if (word.Equals("NavigationStarting")) count++;
                }

                Verify.AreEqual(count, 1);
            }
        }

void OffTreeWebViewInputTest ( ) [inline]

Definition at line 1960 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // Remove the existing webview that was already added to the xaml tree
                ChooseTest("OffTreeWebViewInputTest", false /* waitForLoadCompleted */);

                // Create a new webview, and call EnsureCoreWebView2Async() on it without adding it to the tree.
                // Then, add it to the tree so we can see it, and navigate
                CompleteTestAndWaitForResult("OffTreeWebViewInputTest");
                WaitForLoadCompleted();

                // Clear the cache so we can find the new webview
                ElementCache.Clear();
                var webview = FindElement.ById("MyWebView2");

                // Click in the webview, to ensure we can interact with it, and its HWNDs are parented correctly
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                var point = webview.GetClickablePoint();
                Log.Comment("ClickablePoint = X:{0}, Y:{1}", point.X, point.Y);
                // Move mouse to top left coordinate (location of web button) relative from the center of webview
                InputHelper.MoveMouse(webview,
                    -bounds.Width/2 + 20, -bounds.Height/2 + 20);
                */
                var point = new Point(bounds.X + 20, bounds.Y + 20);
                Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(point);

                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);
                Wait.ForIdle();

                WaitForWebMessageResult("OffTreeWebViewInputTest");
            }
        }

void ParentHiddenThenVisibleTest ( ) [inline]

Definition at line 2066 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ParentHiddenThenVisibleTest");
                CompleteTestAndWaitForResult("ParentHiddenThenVisibleTest");

                // Clear the cache so we can find the new webview
                ElementCache.Clear();
                var webview = FindElement.ById("MyWebView2");
                Verify.IsTrue(webview.IsOffscreen == false);

                // Click in the webview to ensure we can interact with it
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
                var point = new Point(bounds.X + 20, bounds.Y + 20);
                Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(point);

                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);
                Wait.ForIdle();

                WaitForWebMessageResult("ParentHiddenThenVisibleTest");
            }
        }

void ParentVisibilityHiddenTest ( ) [inline]

Definition at line 1536 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ParentVisibilityHiddenTest");
                CompleteTestAndWaitForWebMessageResult("ParentVisibilityHiddenTest");
            }
        }

void ParentVisibilityTurnedOnTest ( ) [inline]

Definition at line 1547 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ParentVisibilityTurnedOnTest");

                // If we got a visibility message when the web view first appeared, make sure we get it again
                var check = new CheckBox(FindElement.ById("MessageReceived"));
                check.Uncheck();

                CompleteTestAndWaitForWebMessageResult("ParentVisibilityTurnedOnTest");
            }
        }

static void PasteClipboard ( ) [inline, static, private]

Definition at line 407 of file WebView2Tests.cs.

        {
            Log.Comment("Do Paste");
            KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
            TextInput.SendText("v");
            KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
        }

void PointerReleaseWithoutPressTest ( ) [inline]

Definition at line 1760 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("PointerReleaseWithoutPressTest");

                var webview = FindElement.ById("MyWebView2");
                Rectangle bounds = webview.BoundingRectangle;

                // First, click outside the webview. Then with the mouse button still pressed,
                // drag into the webview and release the mouse button. This should neither
                // send a message to CoreWebView2, nor should it crash the app.

                var point = new Point(bounds.X + bounds.Width + 20, bounds.Y + 20);
                PointerInput.Move(point);
                PointerInput.Press(PointerButtons.Primary);
                point = new Point(bounds.X + bounds.Width - 20, bounds.Y + 20);
                PointerInput.Move(point);
                PointerInput.Release(PointerButtons.Primary);

                CompleteTestAndWaitForResult("PointerReleaseWithoutPressTest");
            }
        }

void QueryCoreWebView2BasicTest ( ) [inline]

Definition at line 1595 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("QueryCoreWebView2BasicTest", false /* waitForLoadCompleted */);
                CompleteTestAndWaitForResult("QueryCoreWebView2BasicTest");
            }
        }

void ReloadTest ( ) [inline]

Definition at line 1208 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ReloadTest");
                CompleteTestAndWaitForResult("ReloadTest");
            }
        }

static void RemoveFakeBrowserExecutableFolderKey ( ) [inline, static, private]

Definition at line 106 of file WebView2Tests.cs.

        {
            var browserExecutableKey = GetBrowserExecutableFolderKey();
            var browserExecutableFolder = browserExecutableKey.GetValue(TestApplicationInfo.MUXControlsTestApp.ProcessName);
            if (browserExecutableFolder != null)
            {
                browserExecutableKey.DeleteValue(TestApplicationInfo.MUXControlsTestApp.ProcessName);
                Log.Comment("Removed key for {0}", TestApplicationInfo.MUXControlsTestApp.ProcessName);
            }
        }

void ReparentElementTest ( ) [inline]

Definition at line 1480 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ReparentElementTest");
                Wait.ForMilliseconds(100); // The rendering verifier needs extra time for the webview to finish rendering

                // TODO_WebView2: Check that the webview is not visible when it is out of the tree.

                CompleteTestAndWaitForResult("ReparentElementTest");

                // Ensure that the moved WebView is still visible
                WebView2Temporary.WebView2RenderingVerifier.VerifyInstances("ReparentElementTest");
            }
        }

void ResizeTest ( ) [inline]

Definition at line 1308 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ResizeTest");
                CompleteTestAndWaitForWebMessageResult("ResizeTest");
            }
        }

void ScaledTouchTest ( ) [inline]

Definition at line 1440 of file WebView2Tests.cs.

        {
            using (IDisposable page1 = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("ScaledTouchTest");

                var webview = FindElement.ById("MyWebView2");
                // Get the bounds of the webview without any scaling
                Rectangle preScaleBounds = webview.BoundingRectangle;

                // Scale the webview up by 1.2 in both directions and get the new bounds
                CompleteTestAndWaitForResult("ScaledTouchTest");
                Rectangle postScaleBounds = webview.BoundingRectangle;
                int halfDelta = (postScaleBounds.Width - preScaleBounds.Width) / 2;

                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                // Test tap injection outside of bounds of unscaled button.
                InputHelper.Tap(webview, preScaleBounds.Width + halfDelta, preScaleBounds.Height / 2);
                */
                webview.Tap(preScaleBounds.Width + halfDelta, preScaleBounds.Height / 2);

                WaitForWebMessageResult("ScaledTouchTest");
            }
        }

static void SetWebViewElementFocus | ( | string | target,
 |  | uint | tabs |
 | ) |  |  | [inline, static, private]

Definition at line 462 of file WebView2Tests.cs.

        {
            Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
            x1.SetFocus();
            Wait.ForIdle();
            Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");

            // As of the change in PR 6834432, calling Wait.ForIdle() when a WebView2 has focus causes the WebView2
            // to lose focus. The regular version of KeyboardHelper.PressKey() calls Wait.ForIdle(), so in tests where
            // the WebView2 has focus, PressKey() should be called with the skipWait parameter set to true.
            KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, tabs, true);
            WaitForFocus(target);
        }

void SourceBeforeLoadTest ( ) [inline]

Definition at line 1498 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("SourceBeforeLoadTest");
                CompleteTestAndWaitForResult("SourceBeforeLoadTest");
            }
        }

void SourceBindingTest ( ) [inline]

Definition at line 1239 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("SourceBindingTest");

                var uriTextBox = new Edit(FindElement.ById("UriTextBox"));
                var actualUriTextBlock = new Edit(FindElement.ById("ActualUriTextBlock"));

                actualUriTextBlock.SetFocus();
                DoSelectAllByKeyboard();
                CopySelected();
                uriTextBox.SetFocus();
                DoSelectAllByKeyboard();
                PasteClipboard();

                // Modify local resource Uri to load SimplePage.html
                KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
                KeyboardHelper.PressDownModifierKey(ModifierKey.Shift);
                for (int tab = 0; tab < 3; tab++)
                {
                    KeyboardHelper.PressKey(Key.Left);
                }
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift);
                KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
                TextInput.SendText("SimplePage.html");

                KeyboardHelper.PressKey(Key.Enter);

                CompleteTestAndWaitForResult("SourceBindingTest");
            }
        }

void SpecificTouchTest ( ) [inline]

Definition at line 1564 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("SpecificTouchTest");

                var webview = FindElement.ById("MyWebView2");
                var status2 = new Edit(FindElement.ById("Status2"));

                // Click the button in the middle of the webview. It should be square 35.
                InputHelper.MoveMouse(webview, 0, 0);
                Log.Comment("Do left click...");
                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);
                Log.Comment("Done clicking");
                WaitForWebMessageResult("SpecificTouchTest");
                var clickResult = status2.GetText();

                // Tap that same button
                Log.Comment("Do tap...");
                InputHelper.Tap(webview);
                Log.Comment("Done tapping");
                WaitForWebMessageResult("SpecificTouchTest");
                var tapResult = status2.GetText();

                Verify.AreEqual(clickResult, tapResult);
            }
        }

static void TabTwicePastWebView2 ( ) [inline, static, private]

Definition at line 2123 of file WebView2Tests.cs.

        {
            Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
            Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2

            Log.Comment("Focus on x1");
            x1.SetFocus();
            Wait.ForIdle();
            Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");

            Log.Comment("Tab x1 -> webview -> x2");
            using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
            {
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                xamlFocusWaiter.Wait();
                Log.Comment("Focus is on " + UIObject.Focused);
                Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
            }
        }

void TestCleanup ( ) [inline]

Definition at line 263 of file WebView2Tests.cs.

        {
            TestCleanupHelper.Cleanup();
        }

static bool TryInstallingBrowser ( int attemptsLeft ) [inline, static, private]

Definition at line 225 of file WebView2Tests.cs.

        {
            bool successfullyInstalled = false;
            string installer = "mini_installer.exe";
            // Note: Starting with SDK 0.9.488 / Edge version 83, evergreen WebView2 no longer targets the Stable
            //       browser channel. Instead, it targets another set of binaries, branded Evergreen WebView2 Runtime.
            //       (See https://docs.microsoft.com/en-us/microsoft-edge/webview2/releasenotes).
            //
            //       Accordingly, Update mini_installer args to install WV2Runtime instead of full browser.
            string installerArgs_WV2Runtime = "--msedgewebview --system-level";
            Log.Comment(@"WebView2Tests Init: Installing WebView2 runtime: '{0} {1}'", installer, installerArgs_WV2Runtime);
            ProcessStartInfo installerStartInfo = new ProcessStartInfo(installer, installerArgs_WV2Runtime);

            Process installerProcess = Process.Start(installerStartInfo);
            installerProcess.WaitForExit();

            if (installerProcess.ExitCode == 0)
            {
                Log.Comment("WebView2Tests Init: {0} exited successfully", installer);
                successfullyInstalled = true;
            }
            else
            {
                Log.Warning("WebView2Tests Init: {0} failed with exit code {1}! Attempts left: {2}", installer, installerProcess.ExitCode, attemptsLeft);
                // Print information about some of the error codes we sometimes hit
                if (installerProcess.ExitCode == 4)
                {
                    Log.Comment("Exit code 4 = HIGHER_VERSION_EXISTS, Higher version already exists");
                }
                else if (installerProcess.ExitCode == 60)
                {
                    Log.Comment("Exit code 60 = SETUP_SINGLETON_ACQUISITION_FAILED, The setup process could not acquire the exclusive right to modify the installation.");
                }
            }
            return successfullyInstalled;
        }

void UserAgentTest ( ) [inline]

Definition at line 1862 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("UserAgentTest");
                CompleteTestAndWaitForResult("UserAgentTest");
            }
        }

static void ValidateEventCounts | ( | int | coreWebView2InitializedCountExpected,
 |  | int | ensureCoreWebView2CompletionCountExpected,
 |  | int | navigationStartingCountExpected,
 |  | int | navigationCompletedCountExpected,
 |  | int | loadedCountExpected,
 |  | int | unloadedCountExpected,
 |  | int | coreProcessFailedCountExpected,
 |  | string | caption = null |
 | ) |  |  | [inline, static]

Definition at line 2210 of file WebView2Tests.cs.

        {
            Log.Comment("ValidateEventCounts: " + caption);

            Verify.AreEqual(coreWebView2InitializedCountExpected.ToString(),
                            (new Edit(FindElement.ById("CoreWebView2InitializedCount"))).Value,
                            "CoreWebView2InitializedCount should be " + coreWebView2InitializedCountExpected);

            Verify.AreEqual(ensureCoreWebView2CompletionCountExpected.ToString(),
                            (new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"))).Value,
                            "EnsureCoreWebView2CompletionCount should be " + ensureCoreWebView2CompletionCountExpected);

            Verify.AreEqual(navigationStartingCountExpected.ToString(),
                            (new Edit(FindElement.ById("NavigationStartingCount"))).Value,
                            "NavigationStartingCount should be " + navigationStartingCountExpected);

            Verify.AreEqual(navigationCompletedCountExpected.ToString(),
                            (new Edit(FindElement.ById("NavigationCompletedCount"))).Value,
                            "NavigationCompletedCount should be " + navigationCompletedCountExpected);

            Verify.AreEqual(loadedCountExpected.ToString(),
                            (new Edit(FindElement.ById("LoadedCount"))).Value,
                            "LoadedCount should be " + loadedCountExpected);

            Verify.AreEqual(unloadedCountExpected.ToString(),
                            (new Edit(FindElement.ById("UnloadedCount"))).Value,
                            "UnloadedCount should be " + unloadedCountExpected);

            Verify.AreEqual(coreProcessFailedCountExpected.ToString(),
                            (new Edit(FindElement.ById("CoreProcessFailedCount"))).Value,
                            "CoreProcessFailedCount should be " + coreProcessFailedCountExpected);
        }

static void ValidateEventDetail ( string eventDetail ) [inline, static, private]

Definition at line 2641 of file WebView2Tests.cs.

        {
            string eventDetailText = (new Edit(FindElement.ById("EventDetail"))).Value;
            Verify.IsTrue(eventDetailText.Contains(eventDetail), "EventDetail should contain (" + eventDetail + ")");
        }

static void ValidateExceptionCounts | ( | int | closedExceptionCountExpected,
 |  | string | caption = null |
 | ) |  |  | [inline, static]

Definition at line 2198 of file WebView2Tests.cs.

        {
            Log.Comment("ValidateExceptionCounts: " + caption);

            Verify.AreEqual(closedExceptionCountExpected.ToString(),
                            (new Edit(FindElement.ById("ClosedExceptionCount"))).Value,
                            "ClosedExceptionCount should be " + closedExceptionCountExpected);
        }

static void ValidateLoadedSource ( string loadedSource ) [inline, static, private]

Definition at line 2635 of file WebView2Tests.cs.

        {
            string status3Text = (new Edit(FindElement.ById("Status3"))).Value;
            Verify.IsTrue(status3Text.Contains(loadedSource), "NavigationStarting path should contain the source (" + loadedSource + ")");
        }

void VisibilityHiddenTest ( ) [inline]

Definition at line 1509 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("VisibilityHiddenTest");
                CompleteTestAndWaitForWebMessageResult("VisibilityHiddenTest");
            }
        }

void VisibilityTurnedOnTest ( ) [inline]

Definition at line 1520 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("VisibilityTurnedOnTest");

                // If we got a visibility message when the web view first appeared, make sure we get it again
                var check = new CheckBox(FindElement.ById("MessageReceived"));
                check.Uncheck();

                CompleteTestAndWaitForWebMessageResult("VisibilityTurnedOnTest");
            }
        }

static void WaitForCopyCompleted ( ) [inline, static, private]

Definition at line 415 of file WebView2Tests.cs.

        {
            string expectedValue = "HTML files ready";
            var status1 = new Edit(FindElement.ById("Status1"));
            WaitForTextBoxValue(status1, expectedValue);
        }

static bool WaitForEdgeIfAlreadyInstalling ( ) [inline, static, private]

Definition at line 191 of file WebView2Tests.cs.

        {
            bool didWait = false;
            int curWait = 0;
            int maxWait = 180; // wait for 3 minutes, should finish in 1-2
            while (IsEdgeAlreadyInstalling() && curWait < maxWait)
            {
                Log.Comment("Note: Edge is updating, wait up to 180 seconds for it to finish. Waited {0} seconds so far, wait another 10...", curWait);
                Wait.ForSeconds(10);
                curWait += 10;
                didWait = true;
            }
            return didWait;
        }

static void WaitForEnsureCompleted ( ) [inline, static, private]

Definition at line 429 of file WebView2Tests.cs.

        {
            var status1 = new Edit(FindElement.ById("Status1"));
            WaitForTextBoxValue(status1, "EnsureCoreWebView2Async() completed", true);
        }

static void WaitForFocus ( string target ) [inline, static, private]

Definition at line 452 of file WebView2Tests.cs.

        {
            var anaheimFocusTextBox = new Edit(FindElement.ById("AnaheimFocusTextBox"));
            var expectedFocusMessage = "Focus on: " + target;
            WaitForTextBoxValue(anaheimFocusTextBox, expectedFocusMessage);
            Log.Comment("Focus is on " + UIObject.Focused);
            Verify.AreEqual(anaheimFocusTextBox.Value, expectedFocusMessage);
        }

static void WaitForLoadCompleted ( ) [inline, static, private]

Definition at line 422 of file WebView2Tests.cs.

        {
            // if load completed then status2 will have name of the webview
            var status2 = new Edit(FindElement.ById("Status2"));
            WaitForTextBoxValue(status2, string.Empty, false /* match = false for not match */);
        }

static void WaitForTextBoxValue | ( | Edit | textbox,
 |  | string | expectedValue,
 |  | bool | match = true |
 | ) |  |  | [inline, static, private]

Definition at line 364 of file WebView2Tests.cs.

        {
            // if value is empty, wait for it
            if (textbox.Value == string.Empty)
            {
                using (var waiter = new ValueChangedEventWaiter(textbox, expectedValue))
                {
                    waiter.Wait();
                }
            }

            if (match == false)
            {
                if (textbox.Value == expectedValue)
                {
                    return;
                }
            }
            else
            {
                if (textbox.Value != expectedValue)
                {
                    return;
                }
            }
        }

static void WaitForWebMessageResult ( string selectedTest ) [inline, static, private]

Definition at line 295 of file WebView2Tests.cs.

        {
            var result = new Edit(FindElement.ById("TestResult"));
            var check = new CheckBox(FindElement.ById("MessageReceived"));
            string expectedValue = selectedTest + ": Passed []";

            Log.Comment("Waiting for result...");
            using (var waiter = check.GetToggledWaiter())
            {
                // If the web message hasn't been received, wait for it
                if (check.ToggleState != ToggleState.On && !waiter.TryWait())
                {
                    Log.Error("Expected web message was never received.");
                }
            }

            // By now, we'll have gotten a pass/fail result
            Verify.AreEqual(expectedValue, result.Value);
        }

void WebMessageReceivedTest ( ) [inline]

Definition at line 1126 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("WebMessageReceivedTest");

                // Tab to button
                Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
                x1.SetFocus();
                Wait.ForIdle();
                Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
                WaitForFocus("b1");

                // Trigger WebMessage from button press.
                KeyboardHelper.PressKey(Key.Enter);

                WaitForWebMessageResult("WebMessageReceivedTest");
            }
        }

void WebView2CleanedUpTest ( ) [inline]

Definition at line 1649 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // Go back a page (WebView2 should be cleaned up)
                Log.Comment("Go back a page");
                Button backButton = new Button(FindElement.ByNameOrId("__BackButton"));
                backButton.Invoke();
                Wait.ForMilliseconds(1000);

                // Go forward again to the test page
                // Clear element cache so we build a new one for the current page
                Log.Comment("Return to WebView2 test page");
                ElementCache.Clear();
                Button forwardButton = new Button(FindElement.ByNameOrId("navigateToBasicWebView2"));
                forwardButton.Invoke();
                Wait.ForMilliseconds(1000);

                Log.Comment("Find Minimize and Maximize buttons");
                ElementCache.Clear();
                var minimizeButton = new Button(FindElement.ByNameOrId("Minimize"));
                var maximizeButton = new Button(FindElement.ByNameOrId("Restore"));

                // Choose test without any extra waiting. We want to minimize and maximize the app
                // while the page is loading
                string comboBoxName = "TestNameComboBox";
                Log.Comment("Retrieve ComboBox item with name '{0}'.", comboBoxName);
                ComboBox comboBox = new ComboBox(FindElement.ById(comboBoxName));
                comboBox.SelectItemByName("WebView2CleanedUpTest");

                // Minimize and restore the app to trigger the XamlRootChanged event. We are ensuring
                // that we only handle the event when the WebView2 (and its XamlRoot) are valid.
                // Otherwise, a bad pointer to an invalid WebView2 will crash the app
                minimizeButton.Invoke();
                Log.Comment("Invoked minimize button");
                Wait.ForMilliseconds(1000);
                maximizeButton.Invoke();
                Log.Comment("Invoked maximize button");
                Wait.ForMilliseconds(1000);
            }
        }

void WindowHiddenTest ( ) [inline]

Definition at line 1693 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                ChooseTest("WindowHiddenTest");

                var minimizeButton = new Button(FindElement.ByNameOrId("Minimize"));
                var maximizeButton = new Button(FindElement.ByNameOrId("Restore"));
                // If we got a visibility message when the web view first appeared, make sure we get it again
                var check = new CheckBox(FindElement.ById("MessageReceived"));
                check.Uncheck();

                // Minimize and restore the app to trigger the XamlRootChanged event. The CoreWebView2
                // should be hidden and unhidden as well, each of which will send a web message. We
                // then listen for the second message.
                Log.Comment("Invoke minimize button");
                minimizeButton.Invoke();
                Wait.ForMilliseconds(1000);

                Log.Comment("Invoke maximize button");
                maximizeButton.Invoke();
                Wait.ForMilliseconds(1000);

                WaitForWebMessageResult("WindowHiddenTest");
            }
        }

void WindowlessPopupTest ( ) [inline]

Definition at line 1723 of file WebView2Tests.cs.

        {
            using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
            {
                // Insert popup with empty webview
                ChooseTest("WindowlessPopupTest", false /* waitForLoadCompleted */);

                // Navigates popup to a page
                CompleteTestAndWaitForResult("WindowlessPopupTest");

                // Click button in webview to verify interaction works
                var webview = FindElement.ById("popWebView2");
                Rectangle bounds = webview.BoundingRectangle;
                Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
                // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
                //                      Workaround to avoid any calls to WebView2.GetClickablePoint
                /*
                var point = webview.GetClickablePoint();
                Log.Comment("ClickablePoint = X:{0}, Y:{1}", point.X, point.Y);
                // Move mouse to top left coordinate (location of web button) relative from the center of webview
                Log.Comment("MoveMouse to offset = X:{0}, Y:{1}", -bounds.Width / 2 + 20, -bounds.Height / 2 + 20);
                InputHelper.MoveMouse(webview,
                    -bounds.Width / 2 + 20, -bounds.Height / 2 + 20);
                */
                var point = new Point(bounds.X + 20, bounds.Y + 20);
                Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
                PointerInput.Move(point);
                PointerInput.Press(PointerButtons.Primary);
                PointerInput.Release(PointerButtons.Primary);
                Wait.ForIdle();

                WaitForWebMessageResult("WindowlessPopupTest");
            }
        }

The documentation for this class was generated from the following file:
  • WebView2/InteractionTests/WebView2Tests.cs
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2Tests::WebView2TestSetupHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • WebView2Tests
  • WebView2Tests::WebView2TestSetupHelper
Public Member Functions | Protected Member Functions

WebView2Tests::WebView2TestSetupHelper Class Reference

List of all members.

Public Member Functions

WebView2TestSetupHelper (global::System.Collections.Generic.ICollection< string > testNames)

Protected Member Functions

override void Dispose (bool isDisposing)

Detailed Description

Definition at line 268 of file WebView2Tests.cs.

Constructor & Destructor Documentation

WebView2TestSetupHelper ( global::System.Collections.Generic.ICollection< string > testNames ) [inline]

Definition at line 270 of file WebView2Tests.cs.

                : base(testNames)
            {
            }

Member Function Documentation

override void Dispose ( bool isDisposing ) [inline, protected]

Definition at line 275 of file WebView2Tests.cs.

            {
                var result = new Edit(FindElement.ById("CleanupResultTextBox"));
                Button CleanupTestButton = new Button(FindElement.ById("CleanupTest"));
                string expectedValue = "Cleanup completed.";

                Log.Comment("Waiting for cleanup...");
                using (var waiter = new ValueChangedEventWaiter(result, expectedValue))
                {
                    CleanupTestButton.Invoke();
                    if (!waiter.TryWait())
                    {
                        Log.Warning("Cleanup may have failed.");
                    }
                }

                base.Dispose(isDisposing);
            }

The documentation for this class was generated from the following file:
  • WebView2/InteractionTests/WebView2Tests.cs
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

MonochromaticOverlayPresenter Class Reference

#include "MonochromaticOverlayPresenter.h"

Inherits ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT >, and MonochromaticOverlayPresenterProperties.

List of all members.

Public Member Functions

MonochromaticOverlayPresenter ()
~MonochromaticOverlayPresenter ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | InvalidateBrush ()
void | UpdateBrush ()

Detailed Description

Definition at line 17 of file MonochromaticOverlayPresenter.h.

Constructor & Destructor Documentation

MonochromaticOverlayPresenter ( )
~MonochromaticOverlayPresenter ( ) [inline]

Definition at line 24 of file MonochromaticOverlayPresenter.h.

{}

Member Function Documentation

void InvalidateBrush ( ) [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void UpdateBrush ( ) [private]
The documentation for this class was generated from the following file:
  • MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenterProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

MonochromaticOverlayPresenterProperties Class Reference

#include "MonochromaticOverlayPresenter.properties.h"

Inherited by MonochromaticOverlayPresenter.

List of all members.

Public Member Functions

MonochromaticOverlayPresenterProperties ()
void | ReplacementColor (winrt::Color const &value)
winrt::Color | ReplacementColor ()
void | SourceElement (winrt::UIElement const &value)
winrt::UIElement | SourceElement ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static void | OnReplacementColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSourceElementPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | ReplacementColorProperty ()
static winrt::DependencyProperty | SourceElementProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ReplacementColorProperty
static GlobalDependencyProperty | s_SourceElementProperty

Detailed Description

Definition at line 7 of file MonochromaticOverlayPresenter.properties.h.

Constructor & Destructor Documentation

MonochromaticOverlayPresenterProperties ( )

Definition at line 19 of file MonochromaticOverlayPresenter.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file MonochromaticOverlayPresenter.properties.cpp.

{
    s_ReplacementColorProperty = nullptr;
    s_SourceElementProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file MonochromaticOverlayPresenter.properties.cpp.

{
    if (!s_ReplacementColorProperty)
    {
        s_ReplacementColorProperty =
            InitializeDependencyProperty(
                L"ReplacementColor",
                winrt::name_of<winrt::Color>(),
                winrt::name_of<winrt::MonochromaticOverlayPresenter>(),
                false /* isAttached */,
                ValueHelper<winrt::Color>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnReplacementColorPropertyChanged));
    }
    if (!s_SourceElementProperty)
    {
        s_SourceElementProperty =
            InitializeDependencyProperty(
                L"SourceElement",
                winrt::name_of<winrt::UIElement>(),
                winrt::name_of<winrt::MonochromaticOverlayPresenter>(),
                false /* isAttached */,
                ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnSourceElementPropertyChanged));
    }
}

void OnReplacementColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 56 of file MonochromaticOverlayPresenter.properties.cpp.

{
    auto owner = sender.as<winrt::MonochromaticOverlayPresenter>();
    winrt::get_self<MonochromaticOverlayPresenter>(owner)->OnPropertyChanged(args);
}

void OnSourceElementPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 64 of file MonochromaticOverlayPresenter.properties.cpp.

{
    auto owner = sender.as<winrt::MonochromaticOverlayPresenter>();
    winrt::get_self<MonochromaticOverlayPresenter>(owner)->OnPropertyChanged(args);
}

winrt::Color ReplacementColor ( )

Definition at line 80 of file MonochromaticOverlayPresenter.properties.cpp.

{
    return ValueHelper<winrt::Color>::CastOrUnbox(static_cast<MonochromaticOverlayPresenter*>(this)->GetValue(s_ReplacementColorProperty));
}

void ReplacementColor ( winrt::Color const & value )

Definition at line 72 of file MonochromaticOverlayPresenter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<MonochromaticOverlayPresenter*>(this)->SetValue(s_ReplacementColorProperty, ValueHelper<winrt::Color>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ReplacementColorProperty ( ) [inline, static]

Definition at line 18 of file MonochromaticOverlayPresenter.properties.h.

{ return s_ReplacementColorProperty; }

winrt::UIElement SourceElement ( )

Definition at line 93 of file MonochromaticOverlayPresenter.properties.cpp.

{
    return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<MonochromaticOverlayPresenter*>(this)->GetValue(s_SourceElementProperty));
}

void SourceElement ( winrt::UIElement const & value )

Definition at line 85 of file MonochromaticOverlayPresenter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<MonochromaticOverlayPresenter*>(this)->SetValue(s_SourceElementProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SourceElementProperty ( ) [inline, static]

Definition at line 19 of file MonochromaticOverlayPresenter.properties.h.

{ return s_SourceElementProperty; }

Member Data Documentation

GlobalDependencyProperty s_ReplacementColorProperty [static]

Definition at line 21 of file MonochromaticOverlayPresenter.properties.h.

GlobalDependencyProperty s_SourceElementProperty [static]

Definition at line 22 of file MonochromaticOverlayPresenter.properties.h.

The documentation for this class was generated from the following files:
  • Generated/MonochromaticOverlayPresenter.properties.h
  • Generated/MonochromaticOverlayPresenter.properties.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IAdapterAnimationHandler Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_PRIVATE_CONTROLS_NAMESPACE
  • IAdapterAnimationHandler
Public Member Functions

IAdapterAnimationHandler Interface Reference

import "ScrollViewerIRefreshInfoProviderAdapter.idl";

List of all members.

Public Member Functions

void | InteractionTrackerAnimation (Microsoft.UI.Xaml.UIElement refreshVisualizer, Microsoft.UI.Xaml.UIElement infoProvider, Microsoft.UI.Composition.Interactions.InteractionTracker interactionTracker)
void | RefreshCompletedAnimation (Microsoft.UI.Xaml.UIElement refreshVisualizer, Microsoft.UI.Xaml.UIElement infoProvider)
void | RefreshRequestedAnimation (Microsoft.UI.Xaml.UIElement refreshVisualizer, Microsoft.UI.Xaml.UIElement infoProvider, Double executionRatio)

Detailed Description

Definition at line 14 of file ScrollViewerIRefreshInfoProviderAdapter.idl.

Member Function Documentation

void InteractionTrackerAnimation | ( | Microsoft.UI.Xaml.UIElement | refreshVisualizer,
 |  | Microsoft.UI.Xaml.UIElement | infoProvider,
 |  | Microsoft.UI.Composition.Interactions.InteractionTracker | interactionTracker
 | ) |  |
void RefreshCompletedAnimation | ( | Microsoft.UI.Xaml.UIElement | refreshVisualizer,
 |  | Microsoft.UI.Xaml.UIElement | infoProvider
 | ) |  |
void RefreshRequestedAnimation | ( | Microsoft.UI.Xaml.UIElement | refreshVisualizer,
 |  | Microsoft.UI.Xaml.UIElement | infoProvider,
 |  | Double | executionRatio
 | ) |  |
The documentation for this interface was generated from the following file:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IRefreshContainerPrivate Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_PRIVATE_CONTROLS_NAMESPACE
  • IRefreshContainerPrivate

IRefreshContainerPrivate Interface Reference

import "RefreshContainerPrivate.idl";

Detailed Description

Definition at line 7 of file RefreshContainerPrivate.idl.

The documentation for this interface was generated from the following file:
  • PullToRefresh/RefreshContainer/RefreshContainerPrivate.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IRefreshInfoProvider Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_PRIVATE_CONTROLS_NAMESPACE
  • IRefreshInfoProvider
Public Member Functions | Public Attributes

IRefreshInfoProvider Interface Reference

import "RefreshVisualizerPrivate.idl";

List of all members.

Public Member Functions

void | OnRefreshCompleted ()
void | OnRefreshStarted ()

Public Attributes

event Windows Foundation
TypedEventHandler
< IRefreshInfoProvider,
MU_XC_NAMESPACE.RefreshInteractionRatioChangedEventArgs > 		InteractionRatioChanged
event Windows Foundation
TypedEventHandler
< IRefreshInfoProvider, Object > 		IsInteractingForRefreshChanged
event Windows Foundation
TypedEventHandler
< IRefreshInfoProvider, Object > 		RefreshCompleted
event Windows Foundation
TypedEventHandler
< IRefreshInfoProvider, Object > 		RefreshStarted

Detailed Description

Definition at line 6 of file RefreshVisualizerPrivate.idl.

Member Function Documentation

void OnRefreshCompleted ( )
void OnRefreshStarted ( )

Member Data Documentation

event Windows Foundation TypedEventHandler<IRefreshInfoProvider, MU_XC_NAMESPACE.RefreshInteractionRatioChangedEventArgs> InteractionRatioChanged

Definition at line 15 of file RefreshVisualizerPrivate.idl.

event Windows Foundation TypedEventHandler<IRefreshInfoProvider, Object> IsInteractingForRefreshChanged

Definition at line 10 of file RefreshVisualizerPrivate.idl.

event Windows Foundation TypedEventHandler<IRefreshInfoProvider, Object> RefreshCompleted

Definition at line 17 of file RefreshVisualizerPrivate.idl.

event Windows Foundation TypedEventHandler<IRefreshInfoProvider, Object> RefreshStarted

Definition at line 16 of file RefreshVisualizerPrivate.idl.

The documentation for this interface was generated from the following file:
  • PullToRefresh/RefreshVisualizer/RefreshVisualizerPrivate.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IRefreshInfoProviderAdapter Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_PRIVATE_CONTROLS_NAMESPACE
  • IRefreshInfoProviderAdapter
Public Member Functions

IRefreshInfoProviderAdapter Interface Reference

import "ScrollViewerIRefreshInfoProviderAdapter.idl";

List of all members.

Public Member Functions

IRefreshInfoProvider | AdaptFromTree (Microsoft.UI.Xaml.UIElement root, Windows.Foundation.Size visualizerSize)
void | SetAnimations (Microsoft.UI.Xaml.UIElement refreshVisualizerAnimatableContainer)

Detailed Description

Definition at line 6 of file ScrollViewerIRefreshInfoProviderAdapter.idl.

Member Function Documentation

IRefreshInfoProvider AdaptFromTree | ( | Microsoft.UI.Xaml.UIElement | root,
 |  | Windows.Foundation.Size | visualizerSize
 | ) |  |
void SetAnimations ( Microsoft.UI.Xaml.UIElement refreshVisualizerAnimatableContainer )
The documentation for this interface was generated from the following file:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IRefreshVisualizerPrivate Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_PRIVATE_CONTROLS_NAMESPACE
  • IRefreshVisualizerPrivate
Public Member Functions

IRefreshVisualizerPrivate Interface Reference

import "RefreshVisualizerPrivate.idl";

List of all members.

Public Member Functions

void SetInternalPullDirection (MU_XC_NAMESPACE.RefreshPullDirection value)

Detailed Description

Definition at line 22 of file RefreshVisualizerPrivate.idl.

Member Function Documentation

void SetInternalPullDirection ( MU_XC_NAMESPACE.RefreshPullDirection value )
The documentation for this interface was generated from the following file:
  • PullToRefresh/RefreshVisualizer/RefreshVisualizerPrivate.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IRepeaterScrollingSurface Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_PRIVATE_CONTROLS_NAMESPACE
  • IRepeaterScrollingSurface
Public Member Functions | Public Attributes

IRepeaterScrollingSurface Interface Reference

import "RepeaterPrivate.idl";

List of all members.

Public Member Functions

Windows Foundation Rect | GetRelativeViewport (Microsoft.UI.Xaml.UIElement child)
void | RegisterAnchorCandidate (Microsoft.UI.Xaml.UIElement element)
void | UnregisterAnchorCandidate (Microsoft.UI.Xaml.UIElement element)

Public Attributes

event
ConfigurationChangedEventHandler 		ConfigurationChanged
event PostArrangeEventHandler | PostArrange
event ViewportChangedEventHandler | ViewportChanged

Detailed Description

Definition at line 20 of file RepeaterPrivate.idl.

Member Function Documentation

Windows Foundation Rect GetRelativeViewport ( Microsoft.UI.Xaml.UIElement child )
void RegisterAnchorCandidate ( Microsoft.UI.Xaml.UIElement element )
void UnregisterAnchorCandidate ( Microsoft.UI.Xaml.UIElement element )

Member Data Documentation

event ConfigurationChangedEventHandler ConfigurationChanged

Definition at line 22 of file RepeaterPrivate.idl.

event PostArrangeEventHandler PostArrange

Definition at line 26 of file RepeaterPrivate.idl.

event ViewportChangedEventHandler ViewportChanged

Definition at line 27 of file RepeaterPrivate.idl.

The documentation for this interface was generated from the following file:
  • Repeater/RepeaterPrivate.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IAcrylicBrushStaticsPrivate Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_PRIVATE_MEDIA_NAMESPACE
  • IAcrylicBrushStaticsPrivate
Public Member Functions

IAcrylicBrushStaticsPrivate Interface Reference

import "AcrylicTestApi.idl";

List of all members.

Public Member Functions

Microsoft UI Composition
CompositionEffectBrush 		CreateBackdropAcrylicEffectBrush (Microsoft.UI.Composition.Compositor compositor, Windows.UI.Color initialTintColor, Windows.UI.Color initialFallbackColor, Boolean willTintColorAlwaysBeOpaque)
Microsoft UI Composition
CompositionEffectBrush 		CreateBackdropAcrylicEffectBrushWithLuminosity (Microsoft.UI.Composition.Compositor compositor, Windows.UI.Color initialTintColor, Windows.Foundation.IReference< double > luminosityOpacity, Windows.UI.Color initialFallbackColor, Boolean willTintColorAlwaysBeOpaque)

Detailed Description

Definition at line 20 of file AcrylicTestApi.idl.

Member Function Documentation

Microsoft UI Composition CompositionEffectBrush CreateBackdropAcrylicEffectBrush | ( | Microsoft.UI.Composition.Compositor | compositor,
 |  | Windows.UI.Color | initialTintColor,
 |  | Windows.UI.Color | initialFallbackColor,
 |  | Boolean | willTintColorAlwaysBeOpaque
 | ) |  |
Microsoft UI Composition CompositionEffectBrush CreateBackdropAcrylicEffectBrushWithLuminosity | ( | Microsoft.UI.Composition.Compositor | compositor,
 |  | Windows.UI.Color | initialTintColor,
 |  | Windows.Foundation.IReference< double > | luminosityOpacity,
 |  | Windows.UI.Color | initialFallbackColor,
 |  | Boolean | willTintColorAlwaysBeOpaque
 | ) |  |
The documentation for this interface was generated from the following file:
  • Materials/Acrylic/AcrylicTestApi.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IAnimatedVisual Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_XC_NAMESPACE
  • IAnimatedVisual
Public Member Functions

IAnimatedVisual Interface Reference

import "AnimatedVisualPlayer.idl";

List of all members.

Public Member Functions

void | CreateAnimations ()
void | DestroyAnimations ()
void | Pause ()
Windows Foundation IAsyncAction | PlayAsync (Double fromProgress, Double toProgress, Boolean looped)
void | Resume ()
void | SetPlaybackRate (Double playbackRate)
void | SetProgress (Double progress)
void | SetProgressObject (Microsoft.UI.Composition.CompositionPropertySet compositionPropertySet)
void | SetSize (Windows.Foundation.Size size)
void | Stop ()

Detailed Description

Definition at line 16 of file AnimatedVisualPlayer.idl.

Member Function Documentation

void CreateAnimations ( )
void DestroyAnimations ( )
void Pause ( )
Windows Foundation IAsyncAction PlayAsync | ( | Double | fromProgress,
 |  | Double | toProgress,
 |  | Boolean | looped
 | ) |  |
void Resume ( )
void SetPlaybackRate ( Double playbackRate )
void SetProgress ( Double progress )
void SetProgressObject ( Microsoft.UI.Composition.CompositionPropertySet compositionPropertySet )
void SetSize ( Windows.Foundation.Size size )
void Stop ( )
The documentation for this interface was generated from the following file:
  • AnimatedVisualPlayer/AnimatedVisualPlayer.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IAnimatedVisualSource Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_XC_NAMESPACE
  • IAnimatedVisualSource
Public Member Functions | Public Attributes

IAnimatedVisualSource Interface Reference

import "AnimatedIcon.idl";

List of all members.

Public Member Functions

void | SetColorProperty (String propertyName, Windows.UI.Color value)
IAnimatedVisual | TryCreateAnimatedVisual (Microsoft.UI.Composition.Compositor compositor, out Object diagnostics)

Public Attributes

event Windows Foundation
TypedEventHandler
< IDynamicAnimatedVisualSource,
Object > 		AnimatedVisualInvalidated

Detailed Description

Definition at line 6 of file AnimatedIcon.idl.

Member Function Documentation

void SetColorProperty | ( | String | propertyName,
 |  | Windows.UI.Color | value
 | ) |  |
IAnimatedVisual TryCreateAnimatedVisual | ( | Microsoft.UI.Composition.Compositor | compositor,
 |  | out Object | diagnostics
 | ) |  |

Member Data Documentation

event Windows Foundation TypedEventHandler<IDynamicAnimatedVisualSource, Object> AnimatedVisualInvalidated

Definition at line 36 of file AnimatedVisualPlayer.idl.

The documentation for this interface was generated from the following files:
  • AnimatedIcon/AnimatedIcon.idl
  • AnimatedVisualPlayer/AnimatedVisualPlayer.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IAnimatedVisualSource3 Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_XC_NAMESPACE
  • IAnimatedVisualSource3
Public Member Functions

IAnimatedVisualSource3 Interface Reference

import "AnimatedVisualPlayer.idl";

List of all members.

Public Member Functions

IAnimatedVisual2 TryCreateAnimatedVisual (Microsoft.UI.Composition.Compositor compositor, out Object diagnostics, Boolean createAnimations)

Detailed Description

Definition at line 41 of file AnimatedVisualPlayer.idl.

Member Function Documentation

IAnimatedVisual2 TryCreateAnimatedVisual | ( | Microsoft.UI.Composition.Compositor | compositor,
 |  | out Object | diagnostics,
 |  | Boolean | createAnimations
 | ) |  |
The documentation for this interface was generated from the following file:
  • AnimatedVisualPlayer/AnimatedVisualPlayer.idl
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IApplicationViewSpanningRects Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_XC_NAMESPACE
  • IApplicationViewSpanningRects
Public Member Functions

IApplicationViewSpanningRects Interface Reference

import "TwoPaneView.idl";

Inherits winrt::IInspectable.

List of all members.

Public Member Functions

Windows Foundation Collections
IVectorView
< Windows.Foundation.Rect > 		GetSpanningRects ()

Detailed Description

Definition at line 84 of file TwoPaneView.idl.

Member Function Documentation

Windows Foundation Collections IVectorView<Windows.Foundation.Rect> GetSpanningRects ( )
The documentation for this interface was generated from the following file:
  • TwoPaneView/TwoPaneView.idl
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IClosable Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_XC_NAMESPACE
  • IClosable

IClosable Interface Reference

import "AnimatedVisualPlayer.idl";

Detailed Description

Definition at line 6 of file AnimatedVisualPlayer.idl.

The documentation for this interface was generated from the following file:
  • AnimatedVisualPlayer/AnimatedVisualPlayer.idl
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IKeyIndexMapping Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MU_XC_NAMESPACE
  • IKeyIndexMapping
Public Member Functions

IKeyIndexMapping Interface Reference

import "ItemsRepeater.idl";

List of all members.

Public Member Functions

Int32 | IndexFromKey (String key)
String | KeyFromIndex (Int32 index)

Detailed Description

Definition at line 129 of file ItemsRepeater.idl.

Member Function Documentation

Int32 IndexFromKey ( String key )
String KeyFromIndex ( Int32 index )
The documentation for this interface was generated from the following file:
  • Repeater/ItemsRepeater.idl
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MultipleSelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

MultipleSelector Class Reference

#include "MultipleSelector.h"

Inherits SelectorBase.

List of all members.

Public Member Functions

MultipleSelector ()
~MultipleSelector ()
void | OnFocusedAction (winrt::IndexPath const &index, bool ctrl, bool shift) override
void | OnInteractedAction (winrt::IndexPath const &index, bool ctrl, bool shift) override

Detailed Description

Definition at line 8 of file MultipleSelector.h.

Constructor & Destructor Documentation

MultipleSelector ( )

Definition at line 8 of file MultipleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~MultipleSelector ( )

Definition at line 13 of file MultipleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

void OnFocusedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [override, virtual]

Reimplemented from SelectorBase.

Definition at line 65 of file MultipleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, ctrl, shift);

    if (shift)
    {
        auto selectionModel = GetSelectionModel();
        auto anchorIndex = selectionModel.AnchorIndex();
        if (anchorIndex)
        {
            winrt::IReference<bool> isAnchorSelectedNullable = selectionModel.IsSelectedAt(anchorIndex);
            bool isAnchorSelected = false;
            if (isAnchorSelectedNullable != nullptr)
            {
                isAnchorSelected = isAnchorSelectedNullable.Value();
            }

            if (isAnchorSelected)
            {
                selectionModel.SelectRangeFromAnchorTo(index);
            }
            else
            {
                selectionModel.DeselectRangeFromAnchorTo(index);
            }
        }
    }
}

void OnInteractedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [override, virtual]

Reimplemented from SelectorBase.

Definition at line 18 of file MultipleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, ctrl, shift);

    auto selectionModel = GetSelectionModel();
    if (shift)
    {
        auto anchorIndex = selectionModel.AnchorIndex();
        if (anchorIndex)
        {
            winrt::IReference<bool> isAnchorSelectedNullable = selectionModel.IsSelectedAt(anchorIndex);
            bool isAnchorSelected = false;
            if (isAnchorSelectedNullable != nullptr)
            {
                isAnchorSelected = isAnchorSelectedNullable.Value();
            }

            winrt::IReference<bool> isIndexSelectedNullable = selectionModel.IsSelectedAt(index);
            bool isIndexSelected = false;
            if (isIndexSelectedNullable != nullptr)
            {
                isIndexSelected = isIndexSelectedNullable.Value();
            }

            if (isAnchorSelected != isIndexSelected)
            {
                if (isAnchorSelected)
                {
                    selectionModel.SelectRangeFromAnchorTo(index);
                }
                else
                {
                    selectionModel.DeselectRangeFromAnchorTo(index);
                }
            }
        }
    }
    else if (IsSelected(index))
    {
        selectionModel.DeselectAt(index);
    }
    else
    {
        selectionModel.SelectAt(index);
    }
}

The documentation for this class was generated from the following files:
  • ItemsView/MultipleSelector.h
  • ItemsView/MultipleSelector.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MutexLockedResource< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

MutexLockedResource< T > Class Template Reference

#include "TabView.h"

List of all members.

Public Member Functions

MutexLockedResource (HANDLE mutex, T *resource)
~MutexLockedResource ()
T & | operator* ()
T * | operator-> ()

Private Attributes

HANDLE | m_mutex
T * | m_resource

Detailed Description

template<class T>
class MutexLockedResource< T >

Definition at line 171 of file TabView.h.

Constructor & Destructor Documentation

MutexLockedResource | ( | HANDLE | mutex,
 |  | T * | resource |
 | ) |  |  | [inline]

Definition at line 174 of file TabView.h.

    {
        m_mutex = mutex;
        m_resource = resource;

        ::WaitForSingleObject(m_mutex, INFINITE);
    }

~MutexLockedResource ( ) [inline]

Definition at line 182 of file TabView.h.

    {
        ::ReleaseMutex(m_mutex);
    }

Member Function Documentation

T& operator* ( ) [inline]

Definition at line 187 of file TabView.h.

    {
        return *m_resource;
    }

T* operator-> ( ) [inline]

Definition at line 192 of file TabView.h.

    {
        return m_resource;
    }

Member Data Documentation

HANDLE m_mutex [private]

Definition at line 198 of file TabView.h.

T* m_resource [private]

Definition at line 199 of file TabView.h.

The documentation for this class was generated from the following file:
  • TabView/TabView.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AspectRatioRespectingControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • AspectRatioRespectingControl
Protected Member Functions | Private Member Functions

AspectRatioRespectingControl Class Reference

List of all members.

Protected Member Functions

override Size | ArrangeOverride (Size finalSize)
override Size | MeasureOverride (Size availableSize)

Private Member Functions

Size | TwoByOneifySize (Size initialSize)

Detailed Description

Definition at line 11 of file AspectRatioRespectingControl.cs.

Member Function Documentation

override Size ArrangeOverride ( Size finalSize ) [inline, protected]

<inheritdoc>

Definition at line 19 of file AspectRatioRespectingControl.cs.

        {
            return TwoByOneifySize(finalSize);
        }

override Size MeasureOverride ( Size availableSize ) [inline, protected]

Definition at line 13 of file AspectRatioRespectingControl.cs.

        {
            return TwoByOneifySize(availableSize);
        }

Size TwoByOneifySize ( Size initialSize ) [inline, private]

Definition at line 24 of file AspectRatioRespectingControl.cs.

        {
            if (Double.IsNaN(initialSize.Height) || Double.IsInfinity(initialSize.Height))
            {
                return new Size(initialSize.Width/ 2, initialSize.Width);
            }
            if (Double.IsNaN(initialSize.Width) || Double.IsInfinity(initialSize.Width))
            {
                return new Size(initialSize.Height / 2, initialSize.Height);
            }
            return new Size(Math.Min(100,initialSize.Height / 2), Math.Min(100,initialSize.Height));
        }

The documentation for this class was generated from the following file:
  • Repeater/APITests/Common/AspectRatioRespectingControl.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoHandle< THandlePolicy > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControls
  • Common
  • AutoHandle< THandlePolicy >
Public Member Functions | Private Member Functions | Private Attributes

AutoHandle< THandlePolicy > Class Template Reference

#include "AutoHandle.h"

List of all members.

Public Member Functions

AutoHandle ()
AutoHandle (THandleType handle)
AutoHandle (THandleType handle)
AutoHandle (AutoHandle &&other)
AutoHandle (AutoHandle &&other)
AutoHandle ()
~AutoHandle ()
~AutoHandle ()
void | Attach (THandleType handle)
void | Attach (THandleType handle)
THandleType | Detach ()
THandleType | Detach ()
bool | IsValid () const
bool | IsValid () const
operator THandleType () const
operator THandleType () const
bool | operator!= (THandleType handle) const
bool | operator!= (THandleType handle) const
THandleType * | operator& ()
THandleType * | operator& ()
AutoHandle & | operator= (AutoHandle &&other)
AutoHandle & | operator= (const THandleType &other)
AutoHandle & | operator= (AutoHandle &&other)
AutoHandle & | operator= (const THandleType &other)
bool | operator== (THandleType handle) const
bool | operator== (THandleType handle) const
void | Release ()
void | Release ()

Private Member Functions

AutoHandle (const AutoHandle &)
AutoHandle (const AutoHandle &)
AutoHandle & | operator= (const AutoHandle &)
AutoHandle & | operator= (const AutoHandle &)

Private Attributes

THandleType | m_handle

Detailed Description

template<typename THandlePolicy>
class MUXControls::Common::AutoHandle< THandlePolicy >

Definition at line 13 of file AutoHandle.h.

Constructor & Destructor Documentation

AutoHandle ( )

Definition at line 57 of file AutoHandle.h.

        : m_handle(THandlePolicy::Invalidate(m_handle))
    {
    }

AutoHandle ( THandleType handle ) [explicit]

Definition at line 63 of file AutoHandle.h.

        : m_handle(handle)
    {
    }

AutoHandle ( AutoHandle< THandlePolicy > && other )

Definition at line 69 of file AutoHandle.h.

        : m_handle(other.Detach())
    {
    }

~AutoHandle ( )

Definition at line 75 of file AutoHandle.h.

    {
        Release();
    }

AutoHandle ( const AutoHandle< THandlePolicy > & ) [private]
AutoHandle ( )
AutoHandle ( THandleType handle ) [explicit]
AutoHandle ( AutoHandle< THandlePolicy > && other )
~AutoHandle ( )
AutoHandle ( const AutoHandle< THandlePolicy > & ) [private]

Member Function Documentation

void Attach ( THandleType handle )

Definition at line 113 of file AutoHandle.h.

    {
        if (m_handle != handle)
        {
            Release();
        }

        m_handle = handle;
    }

void Attach ( THandleType handle )
THandleType Detach ( ) [inline]

Definition at line 38 of file AutoHandle.h.

        {
            THandleType handle = m_handle;
            THandlePolicy::Invalidate(m_handle);
            return handle;
        }

THandleType Detach ( ) [inline]

Definition at line 38 of file AutoHandle.h.

        {
            THandleType handle = m_handle;
            THandlePolicy::Invalidate(m_handle);
            return handle;
        }

bool IsValid ( ) const

Definition at line 135 of file AutoHandle.h.

    {
        return THandlePolicy::IsValid(m_handle);
    }

bool IsValid ( ) const
operator THandleType ( ) const
operator THandleType ( ) const

Definition at line 107 of file AutoHandle.h.

    {
        return m_handle;
    }

bool operator!= ( THandleType handle ) const

Definition at line 101 of file AutoHandle.h.

    {
        return (m_handle != handle);
    }

bool operator!= ( THandleType handle ) const
THandleType* operator& ( ) [inline]

Definition at line 29 of file AutoHandle.h.

        {
            return &m_handle;
        }

THandleType* operator& ( ) [inline]

Definition at line 29 of file AutoHandle.h.

        {
            return &m_handle;
        }

AutoHandle& operator= ( const AutoHandle< THandlePolicy > & ) [private]
AutoHandle< THandlePolicy > & operator= ( const THandleType & other )

Definition at line 81 of file AutoHandle.h.

    {
        Attach(other);
        return *this;
    }

AutoHandle< THandlePolicy > & operator= ( AutoHandle< THandlePolicy > && other )

Definition at line 88 of file AutoHandle.h.

    {
        Attach(other.Detach());
        return *this;
    }

AutoHandle& operator= ( const AutoHandle< THandlePolicy > & ) [private]
AutoHandle& operator= ( AutoHandle< THandlePolicy > && other )
AutoHandle& operator= ( const THandleType & other )
bool operator== ( THandleType handle ) const

Definition at line 95 of file AutoHandle.h.

    {
        return (m_handle == handle);
    }

bool operator== ( THandleType handle ) const
void Release ( )

Definition at line 124 of file AutoHandle.h.

    {
        if (THandlePolicy::IsValid(m_handle))
        {
            THandlePolicy::Close(m_handle);
        }

        THandlePolicy::Invalidate(m_handle);
    }

void Release ( )

Member Data Documentation

THandleType m_handle [private]

Definition at line 53 of file AutoHandle.h.

The documentation for this class was generated from the following files:
  • Common/AutoHandle.h
  • inc/AutoHandle.h
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: HandlePolicy Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControls
  • Common
  • HandlePolicy
Static Public Member Functions

HandlePolicy Class Reference

#include "AutoHandle.h"

List of all members.

Static Public Member Functions

static void | Close (HANDLE &handle)
static void | Close (HANDLE &handle)
static HANDLE | Invalidate (HANDLE &handle)
static HANDLE | Invalidate (HANDLE &handle)
static bool | IsValid (const HANDLE &handle)
static bool | IsValid (const HANDLE &handle)

Detailed Description

Definition at line 140 of file AutoHandle.h.

Member Function Documentation

static void Close ( HANDLE & handle ) [inline, static]

Definition at line 145 of file AutoHandle.h.

        {
            ::CloseHandle(handle);
        }

static void Close ( HANDLE & handle ) [inline, static]

Definition at line 145 of file AutoHandle.h.

        {
            ::CloseHandle(handle);
        }

static HANDLE Invalidate ( HANDLE & handle ) [inline, static]

Definition at line 155 of file AutoHandle.h.

        {
            handle = INVALID_HANDLE_VALUE;
            return handle;
        }

static HANDLE Invalidate ( HANDLE & handle ) [inline, static]

Definition at line 155 of file AutoHandle.h.

        {
            handle = INVALID_HANDLE_VALUE;
            return handle;
        }

static bool IsValid ( const HANDLE & handle ) [inline, static]

Definition at line 150 of file AutoHandle.h.

        {
            return (INVALID_HANDLE_VALUE != handle) && handle;
        }

static bool IsValid ( const HANDLE & handle ) [inline, static]

Definition at line 150 of file AutoHandle.h.

        {
            return (INVALID_HANDLE_VALUE != handle) && handle;
        }

The documentation for this class was generated from the following files:
  • Common/AutoHandle.h
  • inc/AutoHandle.h
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Private Attributes

MUXControlsFactory Class Reference

#include "MUXControlsFactory.h"

List of all members.

Static Public Member Functions

static void | Deinitialize ()
static void | EnsureInitialized ()
static bool | IsInitialized ()
static void | VerifyInitialized ()

Static Private Attributes

static bool | s_initialized

Detailed Description

Definition at line 9 of file MUXControlsFactory.h.

Member Function Documentation

static void Deinitialize ( ) [inline, static]

Definition at line 23 of file MUXControlsFactory.h.

    {
        s_initialized = false;
    }

void EnsureInitialized ( ) [static]

Definition at line 19 of file MUXControlsFactory.cpp.

{
    if (!s_initialized)
    {
        // Need to register here the DPs of types which are not referenced in our XAML but whose attached properties are.
#ifdef MATERIALS_INCLUDED
#ifdef MUX_PRERELEASE
        RevealBrush::EnsureProperties();
#endif
#endif
        s_initialized = true;
    }
}

static bool IsInitialized ( ) [inline, static]

Definition at line 18 of file MUXControlsFactory.h.

    {
        return s_initialized;
    }

void VerifyInitialized ( ) [static]

Definition at line 33 of file MUXControlsFactory.cpp.

{
    if (!s_initialized)
    {
        throw winrt::hresult_error(E_FAIL, L"ERROR: You must put an instance of " MUXCONTROLSROOT_NAMESPACE_STR ".XamlControlsResources in your Application.Resources.MergedDictionaries.");
    }
}

Member Data Documentation

bool s_initialized [static, private]

Definition at line 29 of file MUXControlsFactory.h.

The documentation for this class was generated from the following files:
  • dll/MUXControlsFactory.h
  • dll/MUXControlsFactory.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushBasicPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicBrushBasicPage
Public Member Functions | Private Member Functions | Private Attributes

AcrylicBrushBasicPage Class Reference

List of all members.

Public Member Functions

AcrylicBrushBasicPage ()

Private Member Functions

void | AnimateBackgroundButton_Checked (object sender, RoutedEventArgs e)
void | AnimateBackgroundButton_Unchecked (object sender, RoutedEventArgs e)
void | ColorPicker_ColorChanged (ColorPicker sender, ColorChangedEventArgs args)
void | FallbackColorButton_Checked (object sender, RoutedEventArgs e)
void | FallbackColorButton_Unchecked (object sender, RoutedEventArgs e)
void | TestPage_Loaded (object sender, RoutedEventArgs e)
void | TintColorButton_Checked (object sender, RoutedEventArgs e)
void | TintColorButton_Unchecked (object sender, RoutedEventArgs e)
void | TintOpacity_ValueChanged (object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)

Private Attributes

AcrylicBrush | myAcrylicBrush

Detailed Description

Definition at line 14 of file AcrylicBrushBasicPage.xaml.cs.

Constructor & Destructor Documentation

AcrylicBrushBasicPage ( ) [inline]

Definition at line 19 of file AcrylicBrushBasicPage.xaml.cs.

        {
            this.InitializeComponent();

            myAcrylicBrush = new AcrylicBrush
            {
                FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xFF, 0xFF, 0xFF),
                TintOpacity = TintOpacity.Value
            };

        }

Member Function Documentation

void AnimateBackgroundButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 67 of file AcrylicBrushBasicPage.xaml.cs.

        {
            var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);

            var animation = visual.Compositor.CreateScalarKeyFrameAnimation();
            animation.InsertExpressionKeyFrame(0.25f, "this.StartingValue - 200", visual.Compositor.CreateLinearEasingFunction());
            animation.InsertExpressionKeyFrame(0.75f, "this.StartingValue + 200", visual.Compositor.CreateLinearEasingFunction());
            animation.InsertExpressionKeyFrame(1.0f, "this.StartingValue", visual.Compositor.CreateLinearEasingFunction());
            animation.Duration = TimeSpan.FromSeconds(10);
            animation.IterationBehavior = Microsoft.UI.Composition.AnimationIterationBehavior.Forever;
            visual.StartAnimation("Offset.X", animation);
        }

void AnimateBackgroundButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 80 of file AcrylicBrushBasicPage.xaml.cs.

        {
            var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);
            visual.Offset = new System.Numerics.Vector3(0, 0, 0);
        }

void ColorPicker_ColorChanged | ( | ColorPicker | sender,
 |  | ColorChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 86 of file AcrylicBrushBasicPage.xaml.cs.

        {
            myAcrylicBrush.TintColor = args.NewColor;
        }

void FallbackColorButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file AcrylicBrushBasicPage.xaml.cs.

        {
            myAcrylicBrush.FallbackColor = ColorHelper.FromArgb(255, 255, 100, 0);
        }

void FallbackColorButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 54 of file AcrylicBrushBasicPage.xaml.cs.

        {
            myAcrylicBrush.FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xE6, 0xE6, 0xE6); // Default
        }

void TestPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 31 of file AcrylicBrushBasicPage.xaml.cs.

        {
            Rectangle1.Fill = myAcrylicBrush;
        }

void TintColorButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 36 of file AcrylicBrushBasicPage.xaml.cs.

        {
            var colorPicker = new ColorPicker();
            colorPicker.ColorChanged += ColorPicker_ColorChanged;
            colorPicker.Color = myAcrylicBrush.TintColor;
            Viewbox.Child = colorPicker;
        }

void TintColorButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file AcrylicBrushBasicPage.xaml.cs.

        {
            Viewbox.Child = null;
        }

void TintOpacity_ValueChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file AcrylicBrushBasicPage.xaml.cs.

        {
            if (myAcrylicBrush != null)
            {
                myAcrylicBrush.TintOpacity = TintOpacity.Value;
            }
        }

Member Data Documentation

AcrylicBrush myAcrylicBrush [private]

Definition at line 16 of file AcrylicBrushBasicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicBrushBasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushLuminosityTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicBrushLuminosityTestPage
Public Member Functions

AcrylicBrushLuminosityTestPage Class Reference

An empty page that can be used on its own or navigated to within a Frame.

List of all members.

Public Member Functions

AcrylicBrushLuminosityTestPage ()

Detailed Description

Definition at line 11 of file AcrylicBrushLuminosityTestPage.xaml.cs.

Constructor & Destructor Documentation

AcrylicBrushLuminosityTestPage ( ) [inline]

Definition at line 13 of file AcrylicBrushLuminosityTestPage.xaml.cs.

        {
            this.InitializeComponent();

            ((AcrylicBrush)Resources["AcrylicBlackWithLuminosityOpacity"]).TintLuminosityOpacity = 0.2;
            ((AcrylicBrush)Resources["AcrylicDarkGreyWithLuminosityOpacity"]).TintLuminosityOpacity = 0.2;
        }

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicBrushLuminosityTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicBrushPage
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

AcrylicBrushPage Class Reference

List of all members.

Classes

class | WrapperEffectBrush

Public Member Functions

AcrylicBrushPage ()

Protected Member Functions

override AutomationPeer | OnCreateAutomationPeer ()
override void | OnNavigatedFrom (NavigationEventArgs e)
override void | OnNavigatedTo (NavigationEventArgs e)

Private Member Functions

void | AlwaysUseFallbackButton_Checked (object sender, RoutedEventArgs e)
void | AlwaysUseFallbackButton_Unchecked (object sender, RoutedEventArgs e)
void | AnimateBackgroundButton_Checked (object sender, RoutedEventArgs e)
void | AnimateBackgroundButton_Unchecked (object sender, RoutedEventArgs e)
void | AutoTintLuminosityOpacity_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ColorPicker_ColorChanged (ColorPicker sender, ColorChangedEventArgs args)
void | FallbackColorButton_Checked (object sender, RoutedEventArgs e)
void | FallbackColorButton_Unchecked (object sender, RoutedEventArgs e)
void | Overlay_PointerPressed (object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
async Task | PollForEffectBrush ()
async Task | PollForFallbackBrush ()
void | RunAcrylicAlwaysUseFallback ()
void | RunAcrylicCreatedInFallbackMode ()
void | RunAcrylicNoiseCache ()
void | RunAcrylicPropertyChanges ()
void | RunBasicAcrylicOnRectangle ()
void | RunTestButton_Clicked (object sender, RoutedEventArgs e)
void | RunTintTransitionDuration ()
void | RunVerifyAcrylicBrushEffect ()
void | RunVerifyDisconnectedState ()
void | RunVerifyDisconnectedState_AnimationCompleted (object sender, object e)
void | RunVerifyOpaqueTintOptimization ()
void | SetAcrylicBrush ()
void | SetAcrylicBrushButton_Click (object sender, RoutedEventArgs e)
void | TintColorButton_Checked (object sender, RoutedEventArgs e)
void | TintColorButton_Unchecked (object sender, RoutedEventArgs e)
void | TintLuminosityOpacity_ValueChanged (object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
void | TintOpacity_ValueChanged (object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
CompositionBrush | UpdateCompositionBrush ()
bool | UpdateIsUsingAcrylicBrush ()
CompositionBrush | UpdateNoiseBrush ()
void | UpdateSharedState ()
void | UpdateStateButton_Click (object sender, RoutedEventArgs e)
bool | VerifyAcrylic ()
async Task< bool > | VerifyAcrylicWithPolling ()
bool | VerifyDisconnected ()
bool | VerifyFallbackColor ()
async Task< bool > | VerifyFallbackColorWithPolling ()
void | XamlWindow_VisibilityChanged (object sender, Microsoft.UI.Xaml.WindowVisibilityChangedEventArgs e)

Private Attributes

AcrylicBrush | _acrylicBrush
AcrylicTestApi _acrylicTestApi
int | _iteration_TintTransitionDuration

Detailed Description

Definition at line 24 of file AcrylicBrushPage.xaml.cs.

Constructor & Destructor Documentation

AcrylicBrushPage ( ) [inline]

Definition at line 30 of file AcrylicBrushPage.xaml.cs.

        {
            this.InitializeComponent();

            AutomationProperties.SetName(this, "AcrylicBrushPage");
            AutomationProperties.SetAutomationId(this, "AcrylicBrushPage");

            _acrylicBrush = new AcrylicBrush {
                FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0x0, 0xFF),
                TintOpacity = TintOpacity.Value
            };

            _acrylicTestApi = new AcrylicTestApi();

            _iteration_TintTransitionDuration = 0;
        }

Member Function Documentation

void AlwaysUseFallbackButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file AcrylicBrushPage.xaml.cs.

        {
            _acrylicBrush.AlwaysUseFallback = true;
        }

void AlwaysUseFallbackButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file AcrylicBrushPage.xaml.cs.

        {
            _acrylicBrush.AlwaysUseFallback = false;
        }

void AnimateBackgroundButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 127 of file AcrylicBrushPage.xaml.cs.

        {
            var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);

            var animation = visual.Compositor.CreateScalarKeyFrameAnimation();
            animation.InsertExpressionKeyFrame(0.25f, "this.StartingValue - 200", visual.Compositor.CreateLinearEasingFunction());
            animation.InsertExpressionKeyFrame(0.75f, "this.StartingValue + 200", visual.Compositor.CreateLinearEasingFunction());
            animation.InsertExpressionKeyFrame(1.0f, "this.StartingValue", visual.Compositor.CreateLinearEasingFunction());
            animation.Duration = TimeSpan.FromSeconds(10);
            animation.IterationBehavior = Microsoft.UI.Composition.AnimationIterationBehavior.Forever;
            visual.StartAnimation("Offset.X", animation);
        }

void AnimateBackgroundButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file AcrylicBrushPage.xaml.cs.

        {
            var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);
            visual.Offset = new System.Numerics.Vector3(0, 0, 0);
        }

void AutoTintLuminosityOpacity_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file AcrylicBrushPage.xaml.cs.

        {
            TintLuminosityOpacity.IsEnabled = AutoTintLuminosityOpacity.IsChecked != true;

            if (_acrylicBrush != null)
            {
                _acrylicBrush.TintLuminosityOpacity = TintLuminosityOpacity.IsEnabled ? TintLuminosityOpacity.Value : (double?)null;
            }
        }

void ColorPicker_ColorChanged | ( | ColorPicker | sender,
 |  | ColorChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 146 of file AcrylicBrushPage.xaml.cs.

        {
            _acrylicBrush.TintColor = args.NewColor;
        }

void FallbackColorButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file AcrylicBrushPage.xaml.cs.

        {
            _acrylicBrush.FallbackColor = Microsoft.UI.ColorHelper.FromArgb(255, 255, 100, 0);
        }

void FallbackColorButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 86 of file AcrylicBrushPage.xaml.cs.

        {
            _acrylicBrush.FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xE6, 0xE6, 0xE6); // Default
        }

override AutomationPeer OnCreateAutomationPeer ( ) [inline, protected]

Definition at line 63 of file AcrylicBrushPage.xaml.cs.

        {
            return new FrameworkElementAutomationPeer(this);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 56 of file AcrylicBrushPage.xaml.cs.

        {
            base.OnNavigatedFrom(e);

            App.CurrentWindow.VisibilityChanged -= XamlWindow_VisibilityChanged;
        }

override void OnNavigatedTo ( NavigationEventArgs e ) [inline, protected]

Definition at line 47 of file AcrylicBrushPage.xaml.cs.

        {
            base.OnNavigatedTo(e);

            // The app will notify the InteractionTest (AcrylicBrushTests.HideAndShowWindow) when
            // Xaml window visibility changes since these events are not available through UIA / Mita.
            App.CurrentWindow.VisibilityChanged += XamlWindow_VisibilityChanged;
        }

void Overlay_PointerPressed | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 750 of file AcrylicBrushPage.xaml.cs.

        {
            Overlay.Background = null;
        }

async Task PollForEffectBrush ( ) [inline, private]

Definition at line 633 of file AcrylicBrushPage.xaml.cs.

        {
            await Task.Run(async () =>
            {
                for (int i = 0; i < 5; i++)
                {
                    bool hasEffectBrush = false;
                    RunOnUIThread.Execute(() =>
                    {
                        CompositionEffectBrush polledBrushsAEffectBrush = _acrylicTestApi.CompositionBrush as CompositionEffectBrush;
                        hasEffectBrush = polledBrushsAEffectBrush != null;
                    });
                    if (hasEffectBrush) { break; }

                    await Task.Delay(200);
                }
            });
        }

async Task PollForFallbackBrush ( ) [inline, private]

Definition at line 611 of file AcrylicBrushPage.xaml.cs.

        {
            await Task.Run(async () =>
            {
                for (int i = 0; i < 5; i++)
                {
                    bool hasFallbackBrush = false;
                    RunOnUIThread.Execute(() =>
                    {
                        CompositionColorBrush polledBrushAsColorBrush = _acrylicTestApi.CompositionBrush as CompositionColorBrush;
                        hasFallbackBrush = polledBrushAsColorBrush != null && polledBrushAsColorBrush.Color.Equals(_acrylicBrush.FallbackColor);
                    });
                    if (hasFallbackBrush) { break; }

                    await Task.Delay(200);
                }
            });
        }

void RunAcrylicAlwaysUseFallback ( ) [inline, private]

Definition at line 261 of file AcrylicBrushPage.xaml.cs.

        {
            // Need to set override flags here manually since we don't want to
            // unset them until worker thread actions are complete
            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            SetAcrylicBrush();

            // Run these tests off-thread as they need to poll for brush status changes that are deferred by transition animations.
            Task.Run(async () =>
            {
                // If we are in fallback mode already due to policy, skip the test
                if (await VerifyAcrylicWithPolling())
                {
                    bool[] results = { false, false, false, false };

                    RunOnUIThread.Execute(() =>
                    {
                        // Set AlwaysUseFallback, verify we are using the expected fallback color
                        _acrylicBrush.AlwaysUseFallback = true;
                    });
                    results[0] = await VerifyFallbackColorWithPolling();

                    RunOnUIThread.Execute(() =>
                    {
                        // Change fallback color while in fallback, veryify fallback brush is updated
                        _acrylicBrush.FallbackColor = Microsoft.UI.Colors.Purple;
                    });
                    results[1] = await VerifyFallbackColorWithPolling();

                    RunOnUIThread.Execute(() =>
                    {
                        // Unset AlwaysUseFallback, verify we are using acrylic again
                        _acrylicBrush.AlwaysUseFallback = false;
                    });
                    results[2] = await VerifyAcrylicWithPolling();

                    RunOnUIThread.Execute(() =>
                    {
                        // Change fallback color while not in fallback, then force fallback and verify color
                        _acrylicBrush.FallbackColor = Microsoft.UI.Colors.Orange;
                        _acrylicBrush.AlwaysUseFallback = true;
                    });
                    results[3] = await VerifyFallbackColorWithPolling();

                    bool result = results[0] && results[1] && results[2] && results[3];
                    string resultString = System.String.Format("({0},{1},{2},{3})", results[0], results[1], results[2], results[3]);

                    RunOnUIThread.Execute(() =>
                    {
                        // Unset all override flags to avoid impacting subsequent tests
                        MaterialHelperTestApi.IgnoreAreEffectsFast = false;
                        MaterialHelperTestApi.SimulateDisabledByPolicy = false;

                        TestResult.Text = "AcrylicAlwaysUseFallback: " + (result ? "Passed" : ("Failed " + resultString));
                    });
                }
                else
                {
                    RunOnUIThread.Execute(() =>
                    {
                        // Unset all override flags to avoid impacting subsequent tests
                        MaterialHelperTestApi.IgnoreAreEffectsFast = false;
                        MaterialHelperTestApi.SimulateDisabledByPolicy = false;

                        TestResult.Text = "AcrylicAlwaysUseFallback: Skipped";
                    });
                }
            });
        }

void RunAcrylicCreatedInFallbackMode ( ) [inline, private]

Definition at line 385 of file AcrylicBrushPage.xaml.cs.

        {
            using (var setup = new MaterialSetupHelper(true /* ignoreAreEffectsFast*/, true /* simulateDisabledByPolicy */ ))
            {
                // Test app acrylic
                _acrylicBrush = new AcrylicBrush {
                    FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0x0, 0xFF),
                    TintOpacity = TintOpacity.Value
                };

                _acrylicTestApi.AcrylicBrush = _acrylicBrush;

                Rectangle1.Fill = _acrylicBrush;
                bool result1 = VerifyFallbackColor();

                // Test window acrylic
                _acrylicBrush = new AcrylicBrush {
                    FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0xFF, 0xFF),
                    TintOpacity = TintOpacity.Value
                };
                _acrylicTestApi.AcrylicBrush = _acrylicBrush;

                Rectangle1.Fill = _acrylicBrush;
                bool result2 = VerifyFallbackColor();

                TestResult.Text = "AcrylicCreatedInFallbackMode: " + (result1 && result2 ? "Passed" : "Failed ");
            }
        }

void RunAcrylicNoiseCache ( ) [inline, private]

Definition at line 520 of file AcrylicBrushPage.xaml.cs.

        {
            AcrylicBrush acrylicBrush1 = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.Green,
                TintOpacity = 0.1
            };

            AcrylicBrush acrylicBrush2 = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.Bisque,
                TintOpacity = 1
            };

            Rectangle1.Fill = acrylicBrush1;
            _acrylicTestApi.AcrylicBrush = acrylicBrush1;
            CompositionBrush noiseBrush1 = UpdateNoiseBrush();

            if (_acrylicTestApi.IsUsingAcrylicBrush == false)
            {
                TestResult.Text = "AcrylicNoiseCache: Skipped";
                return;
            }

            Rectangle1.Stroke = acrylicBrush2;
            _acrylicTestApi.AcrylicBrush = acrylicBrush2;
            CompositionBrush noiseBrush2 = UpdateNoiseBrush();

            // Make sure two brushes conccurrently in tree use the same noise
            bool result1 = Object.ReferenceEquals(noiseBrush1, noiseBrush2);

            // Destroy existing brushes
            Rectangle1.Fill = new SolidColorBrush(Microsoft.UI.Colors.PaleGoldenrod);
            Rectangle1.Stroke = new SolidColorBrush(Microsoft.UI.Colors.PaleGoldenrod);
            acrylicBrush1 = null;
            acrylicBrush2 = null;
            _acrylicTestApi.AcrylicBrush = null;
            GC.Collect();

            AcrylicBrush acrylicBrush3 = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.DarkOliveGreen,
                TintOpacity = 0.25
            };

            Rectangle1.Fill = acrylicBrush3;
            _acrylicTestApi.AcrylicBrush = acrylicBrush3;
            CompositionBrush noiseBrush3 = UpdateNoiseBrush();

            // Make sure new brush still uses the same noise
            bool result2 = Object.ReferenceEquals(noiseBrush2, noiseBrush3);

            bool result = result1 && result2;
            string resultString = System.String.Format("({0},{1})", result1, result2);

            TestResult.Text = "AcrylicNoiseCache: " + (result ? "Passed" : ("Failed " + resultString));
        }

void RunAcrylicPropertyChanges ( ) [inline, private]

Definition at line 208 of file AcrylicBrushPage.xaml.cs.

        {
            AcrylicBrush acrylicBrush1 = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.Green,
                TintOpacity = 0.1
            };

            AcrylicBrush acrylicBrush2 = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.Bisque,
                TintOpacity = 0.8
            };

            // Add Ellipse with Acrylic Fill and Stroke
            Ellipse1.Visibility = Visibility.Visible;
            Ellipse1.Fill = acrylicBrush1;
            Ellipse1.Stroke = acrylicBrush2;

            // Reuse Ellipse's brush in Rectangle
            Rectangle1.Fill = acrylicBrush2;

            _acrylicTestApi.AcrylicBrush = acrylicBrush1;
            if (_acrylicTestApi.IsUsingAcrylicBrush == false)
            {
                TestResult.Text = "VerifyOpaqueTintOptimization: Skipped";
                return;
            }

            bool[] results = { false, false, false};

            _acrylicTestApi.AcrylicBrush = acrylicBrush1;
            results[0] = VerifyAcrylic();

            // Update Tint - should not recreate brush
            _acrylicTestApi.AcrylicBrush = acrylicBrush1;
            CompositionBrush originalAcrylicBrush = UpdateCompositionBrush();
            acrylicBrush1.TintColor = Microsoft.UI.Colors.DeepSkyBlue;
            CompositionBrush updatedAcrylicBrush1 = UpdateCompositionBrush();
            results[1] = VerifyAcrylic() && Object.ReferenceEquals(originalAcrylicBrush, updatedAcrylicBrush1);

            // Update TintOpacity - should not recreate brush
            acrylicBrush1.TintOpacity = 0.123456789;
            CompositionBrush updatedAcrylicBrush2 = UpdateCompositionBrush();
            results[2] = VerifyAcrylic() && Object.ReferenceEquals(originalAcrylicBrush, updatedAcrylicBrush2);

            bool result = results[0] && results[1] && results[2];
            string resultString = System.String.Format("({0},{1},{2})", results[0], results[1], results[2]);

            TestResult.Text = "AcrylicPropertyChanges: " + (result ? "Passed" : ("Failed " + resultString));
        }

void RunBasicAcrylicOnRectangle ( ) [inline, private]

Definition at line 177 of file AcrylicBrushPage.xaml.cs.

        {
            // Now that AB has entered the live tree, we can validate that it's backed by an EffectBrush
            // Unfortunately at this point we lack COMP API's to walk + validate the effect graph.
            SetAcrylicBrush();
            bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
            var compositionBrush = UpdateCompositionBrush();
            var noiseBrush = UpdateNoiseBrush();

            bool result = false;
            if (isUsingAcrylicBrush)
            {
                // For AcrylicBrush, validate we're using a WUC effect brush and noise is present
                result = ((compositionBrush != null && compositionBrush is CompositionEffectBrush) &&
                          (noiseBrush != null && noiseBrush is CompositionSurfaceBrush));
            }
            else
            {
                // For Fallback case, validate we have a WUC color brush with the right color
                //TestResult.Text = "FallbackCase: Start";
                CompositionColorBrush myColorBrush = compositionBrush as CompositionColorBrush;
                result = myColorBrush.Color.Equals(_acrylicBrush.FallbackColor);
                //TestResult.Text = "FallbackCase: (" + myColorBrush.Color.A.ToString() + ", " + myColorBrush.Color.R + ", " + myColorBrush.Color.G + ", " + myColorBrush.Color.B + ")";
            }

            TestResult.Text = "BasicAcrylicOnRectangle: " + (result ? "Passed" : "Failed");
        }

void RunTestButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 151 of file AcrylicBrushPage.xaml.cs.

        {
            var selectedText = TestNameComboBox.GetSelectedText();

            // This group of tests is separate as it requires manual control of MaterialSetupHelper flags
            switch (selectedText)
            {
                case "AcrylicAlwaysUseFallback": RunAcrylicAlwaysUseFallback(); return;
            }

            using (var setup = new MaterialSetupHelper())
            {
                switch (selectedText)
                {
                    case "BasicAcrylicOnRectangle": RunBasicAcrylicOnRectangle(); break;
                    case "AcrylicPropertyChanges": RunAcrylicPropertyChanges(); break;
                    case "VerifyDisconnectedState": RunVerifyDisconnectedState(); break;
                    case "AcrylicCreatedInFallbackMode": RunAcrylicCreatedInFallbackMode(); break;
                    case "VerifyOpaqueTintOptimization": RunVerifyOpaqueTintOptimization(); break;
                    case "TintTransitionDuration": RunTintTransitionDuration(); break;
                    case "AcrylicNoiseCache": RunAcrylicNoiseCache(); break;
                    case "VerifyAcrylicBrushEffect": RunVerifyAcrylicBrushEffect(); break;
                }
            }
        }

void RunTintTransitionDuration ( ) [inline, private]

Definition at line 495 of file AcrylicBrushPage.xaml.cs.

        {
            int durationMS = 0;

            if (_iteration_TintTransitionDuration == 0) { durationMS = 0; }
            else if (_iteration_TintTransitionDuration == 1) { durationMS = 500; }
            else if (_iteration_TintTransitionDuration == 2) { durationMS = 999; }

            _iteration_TintTransitionDuration++;

            _acrylicBrush = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.Green,
                TintOpacity = 0.8
            };
            _acrylicTestApi.AcrylicBrush = _acrylicBrush;
            Rectangle1.Fill = _acrylicBrush;

            _acrylicBrush.TintTransitionDuration = new TimeSpan(0, 0, 0, 0, durationMS);
            _acrylicBrush.TintColor = Microsoft.UI.Colors.DarkOrange;
        }

void RunVerifyAcrylicBrushEffect ( ) [inline, private]

Definition at line 335 of file AcrylicBrushPage.xaml.cs.

        {
            bool[] results = { false, false };

            AcrylicBrush acrylicBrush1 = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.Green,
                TintOpacity = 0.1
            };

            // Add Ellipse with Acrylic Fill and Stroke
            Ellipse1.Visibility = Visibility.Visible;
            Ellipse1.Fill = acrylicBrush1;

            _acrylicTestApi.AcrylicBrush = acrylicBrush1;

            // Force to create a AcrylicBrush which is used for animation. So it's a CrosssFading effect brush
            _acrylicTestApi.ForceCreateAcrylicBrush(true /*useCrossFadeEffect*/);

            var fallbackColor = Microsoft.UI.Colors.Black;
            var tintColor = Microsoft.UI.Colors.Black;

            // Get FallbackColor and TintColor. Only CrossFading effect brush provides animation properties for both and TryGetColor success.
            CompositionGetValueStatus fallbackColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("FallbackColor.Color", out fallbackColor);
            CompositionGetValueStatus tintColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("TintColor.Color", out tintColor);

            // Luminosity impacts the effective tint value, so don't validate it here.
            results[0] = tintColorValueStatus != CompositionGetValueStatus.NotFound &&
                         fallbackColorValueStatus != CompositionGetValueStatus.NotFound &&
                         fallbackColor == acrylicBrush1.FallbackColor;

            // Force to create a non crosssFading effect brush
            _acrylicTestApi.ForceCreateAcrylicBrush(false /*useCrossFadeEffect*/);

            fallbackColor = Microsoft.UI.Colors.Black;
            tintColor = Microsoft.UI.Colors.Black;

            // Get FallbackColor and TintColor. Non CrossFading effect brush doesn't provide FallbackColor.Color.
            fallbackColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("FallbackColor.Color", out fallbackColor);
            tintColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("TintColor.Color", out tintColor);

            // Luminosity impacts the effective tint value, so don't validate it here.
            results[1] = fallbackColorValueStatus == CompositionGetValueStatus.NotFound;

            bool result = results[0] && results[1];
            string resultString = System.String.Format("({0},{1})", results[0], results[1]);
            TestResult.Text = "VerifyAcrylicBrushEffect: " + (result ? "Passed" : ("Failed " + resultString));
        }

void RunVerifyDisconnectedState ( ) [inline, private]

Definition at line 415 of file AcrylicBrushPage.xaml.cs.

        {
            _acrylicBrush = new AcrylicBrush {
                FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0x0, 0xFF),
                TintOpacity = TintOpacity.Value
            };
            _acrylicTestApi.AcrylicBrush = _acrylicBrush;
            Rectangle1.Fill = _acrylicBrush;

            if (_acrylicTestApi.IsUsingAcrylicBrush == false)
            {
                TestResult.Text = "VerifyDisconnectedState: Skipped";
                return;
            }

            DoubleAnimation positionAnimation = new DoubleAnimation();
            positionAnimation.By = 100;
            positionAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 200));
            Storyboard.SetTarget(positionAnimation, MyTranslateTransform);
            Storyboard.SetTargetProperty(positionAnimation, "X");
            Storyboard sb = new Storyboard();
            sb.Children.Add(positionAnimation);
            sb.Completed += RunVerifyDisconnectedState_AnimationCompleted;
            sb.Begin();
        }

void RunVerifyDisconnectedState_AnimationCompleted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 441 of file AcrylicBrushPage.xaml.cs.

        {
            Rectangle1.Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple);
            bool result = VerifyDisconnected();

            TestResult.Text = "VerifyDisconnectedState: " + (result ? "Passed" : "Failed ");
        }

void RunVerifyOpaqueTintOptimization ( ) [inline, private]

Definition at line 451 of file AcrylicBrushPage.xaml.cs.

        {
            // Start out with transparent tint
            _acrylicBrush = new AcrylicBrush {
                FallbackColor = Microsoft.UI.Colors.Blue,
                TintColor = Microsoft.UI.Colors.Green,
                TintOpacity = 0.1
            };
            _acrylicTestApi.AcrylicBrush = _acrylicBrush;
            Rectangle1.Fill = _acrylicBrush;

            if (_acrylicTestApi.IsUsingAcrylicBrush == false)
            {
                TestResult.Text = "VerifyOpaqueTintOptimization: Skipped";
                return;
            }

            bool[] results = { false, false, false, false };

            CompositionBrush originalTransparentBrush = UpdateCompositionBrush();
            results[0] = VerifyAcrylic();

            // Switch to opaque tint
            _acrylicBrush.TintOpacity = 1.0;
            CompositionBrush updatedOpaqueBrush = UpdateCompositionBrush();
            results[1] = VerifyAcrylic();

            // Switch back to transparent tint
            _acrylicBrush.TintOpacity = 0.1;
            CompositionBrush updatedTransapentBrush = UpdateCompositionBrush();
            results[2] = VerifyAcrylic();

            // Make a new brush got created in each case
            results[3] =
                !Object.ReferenceEquals(originalTransparentBrush, updatedOpaqueBrush) &&
                !Object.ReferenceEquals(originalTransparentBrush, updatedTransapentBrush) &&
                !Object.ReferenceEquals(updatedOpaqueBrush, updatedTransapentBrush);

            bool result = results[0] && results[1] && results[2] && results[3];
            string resultString = System.String.Format("({0},{1},{2},{3})", results[0], results[1], results[2], results[3]);

            TestResult.Text = "VerifyOpaqueTintOptimization: " + (result ? "Passed" : ("Failed " + resultString));
        }

void SetAcrylicBrush ( ) [inline, private]

Definition at line 688 of file AcrylicBrushPage.xaml.cs.

        {
            Rectangle1.Fill = _acrylicBrush;
            _acrylicTestApi.AcrylicBrush = _acrylicBrush;
        }

void SetAcrylicBrushButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 745 of file AcrylicBrushPage.xaml.cs.

        {
            SetAcrylicBrush();
        }

void TintColorButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file AcrylicBrushPage.xaml.cs.

        {
            var colorPicker = new ColorPicker();
            colorPicker.ColorChanged += ColorPicker_ColorChanged;
            colorPicker.Color = _acrylicBrush.TintColor;
            Viewbox.Child = colorPicker;
        }

void TintColorButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 76 of file AcrylicBrushPage.xaml.cs.

        {
            Viewbox.Child = null;
        }

void TintLuminosityOpacity_ValueChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 109 of file AcrylicBrushPage.xaml.cs.

        {
            if (_acrylicBrush != null)
            {
                _acrylicBrush.TintLuminosityOpacity = TintLuminosityOpacity.Value;
            }
        }

void TintOpacity_ValueChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file AcrylicBrushPage.xaml.cs.

        {
            if (_acrylicBrush != null)
            {
                _acrylicBrush.TintOpacity = TintOpacity.Value;
            }
        }

CompositionBrush UpdateCompositionBrush ( ) [inline, private]

Definition at line 701 of file AcrylicBrushPage.xaml.cs.

        {
            CompositionBrush result = null;
            if (_acrylicTestApi.AcrylicBrush != null)
            {
                result = _acrylicTestApi.CompositionBrush;

                // ToString() here will log the type of the brush - useful to check whether we are in fallback mode
                CompositionBrushPointer.Text = (result == null) ? "null" : result.ToString();
            }
            return result;
        }

bool UpdateIsUsingAcrylicBrush ( ) [inline, private]

Definition at line 725 of file AcrylicBrushPage.xaml.cs.

        {
            bool result = _acrylicTestApi.IsUsingAcrylicBrush;
            IsUsingAcrylicBrush.Text = result.ToString();
            return result;
        }

CompositionBrush UpdateNoiseBrush ( ) [inline, private]

Definition at line 714 of file AcrylicBrushPage.xaml.cs.

        {
            CompositionBrush result = null;
            if (_acrylicTestApi.AcrylicBrush != null)
            {
                result = _acrylicTestApi.NoiseBrush;
                NoiseBrushPointer.Text = (result == null) ? "null" : result.ToString();
            }
            return result;
        }

void UpdateSharedState ( ) [inline, private]

Definition at line 694 of file AcrylicBrushPage.xaml.cs.

        {
            UpdateIsUsingAcrylicBrush();
            UpdateCompositionBrush();
            UpdateNoiseBrush();
        }

void UpdateStateButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 732 of file AcrylicBrushPage.xaml.cs.

        {
            UpdateSharedState();
        }

bool VerifyAcrylic ( ) [inline, private]

Definition at line 588 of file AcrylicBrushPage.xaml.cs.

        {
            bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
            var compositionBrush = UpdateCompositionBrush();
            var noiseBrush = UpdateNoiseBrush();
            return isUsingAcrylicBrush &&
                   (compositionBrush != null && compositionBrush is CompositionEffectBrush) &&
                   (noiseBrush != null && noiseBrush is CompositionSurfaceBrush);
        }

async Task<bool> VerifyAcrylicWithPolling ( ) [inline, private]

Definition at line 651 of file AcrylicBrushPage.xaml.cs.

        {
            await PollForEffectBrush();

            bool result = false;
            RunOnUIThread.Execute(() =>
            {
                result = VerifyAcrylic();
            });

            return result;
        }

bool VerifyDisconnected ( ) [inline, private]

Definition at line 578 of file AcrylicBrushPage.xaml.cs.

        {
            bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
            var compositionBrush = UpdateCompositionBrush();
            var noiseBrush = UpdateNoiseBrush();
            return !isUsingAcrylicBrush &&
                    compositionBrush == null &&
                    noiseBrush == null;     // Noise is cached in MaterialHelper but not in individual brushes
        }

bool VerifyFallbackColor ( ) [inline, private]

Definition at line 598 of file AcrylicBrushPage.xaml.cs.

        {
            bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
            var compositionBrush = UpdateCompositionBrush();
            return !isUsingAcrylicBrush &&
                   (compositionBrush != null && compositionBrush is CompositionColorBrush) &&
                   (compositionBrush as CompositionColorBrush).Color.Equals(_acrylicBrush.FallbackColor);
        }

async Task<bool> VerifyFallbackColorWithPolling ( ) [inline, private]

Definition at line 664 of file AcrylicBrushPage.xaml.cs.

        {
            await PollForFallbackBrush();

            bool result = false;
            RunOnUIThread.Execute(() =>
            {
                result = VerifyFallbackColor();
            });

            return result;
        }

void XamlWindow_VisibilityChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.WindowVisibilityChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 682 of file AcrylicBrushPage.xaml.cs.

        {
            var automationPeer = FrameworkElementAutomationPeer.FromElement(this);
            automationPeer.RaiseAutomationEvent(AutomationEvents.AsyncContentLoaded);
        }

Member Data Documentation

AcrylicBrush _acrylicBrush [private]

Definition at line 26 of file AcrylicBrushPage.xaml.cs.

AcrylicTestApi _acrylicTestApi [private]

Definition at line 27 of file AcrylicBrushPage.xaml.cs.

int _iteration_TintTransitionDuration [private]

Definition at line 28 of file AcrylicBrushPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicBrushPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushPage::WrapperEffectBrush Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicBrushPage
  • AcrylicBrushPage::WrapperEffectBrush
Public Member Functions

AcrylicBrushPage::WrapperEffectBrush Class Reference

List of all members.

Public Member Functions

WrapperEffectBrush (CompositionEffectBrush brush)

Detailed Description

Definition at line 737 of file AcrylicBrushPage.xaml.cs.

Constructor & Destructor Documentation

WrapperEffectBrush ( CompositionEffectBrush brush ) [inline]

Definition at line 739 of file AcrylicBrushPage.xaml.cs.

            {
                this.CompositionBrush = brush;
            }

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicBrushPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicColorPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicColorPage
Public Member Functions | Static Public Member Functions | Properties

AcrylicColorPage Class Reference

List of all members.

Public Member Functions

AcrylicColorPage ()

Static Public Member Functions

static string | GetBrushName (string fullName)

Properties

static IEnumerable< string > | AcrylicBrushNames [get]

Detailed Description

Definition at line 14 of file AcrylicColorPage.xaml.cs.

Constructor & Destructor Documentation

AcrylicColorPage ( ) [inline]

Definition at line 16 of file AcrylicColorPage.xaml.cs.

        {
            this.InitializeComponent();

            foreach (string brushName in AcrylicBrushNames)
            {
                var item =
                    XamlReader.Load(
                        "<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Margin='5' Background='{ThemeResource " + brushName + "}'>" +
                            "<TextBlock Margin='3' FontSize='12' MinWidth='200' MinHeight='36' MaxHeight='330' TextWrapping='Wrap' Text='" + brushName + "'/>" +
                        "</Grid>");

                BackgroundList.Items.Add(item);
            }
        }

Member Function Documentation

static string GetBrushName ( string fullName ) [inline, static]

Definition at line 75 of file AcrylicColorPage.xaml.cs.

        {
            if (fullName == null || fullName.Length <= 25)
                return string.Empty;

            return fullName.Substring(20, fullName.Length - 25);
        }

Property Documentation

IEnumerable<string> AcrylicBrushNames [static, get]

Definition at line 33 of file AcrylicColorPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicColorPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicMarkupPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicMarkupPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

AcrylicMarkupPage Class Reference

List of all members.

Public Member Functions

AcrylicMarkupPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | RunTestButton_Clicked (object sender, RoutedEventArgs e)
CompositionBrush | UpdateCompositionBrush ()
bool | UpdateIsUsingAcrylicBrush ()
CompositionBrush | UpdateNoiseBrush ()
bool | VerifyAcrylic ()
bool | VerifyFallbackColor ()

Private Attributes

AcrylicBrush | _acrylicBrush
AcrylicTestApi _acrylicTestApi

Detailed Description

Definition at line 13 of file AcrylicMarkupPage.xaml.cs.

Constructor & Destructor Documentation

AcrylicMarkupPage ( ) [inline]

Definition at line 18 of file AcrylicMarkupPage.xaml.cs.

        {
            this.InitializeComponent();

            _acrylicTestApi = new AcrylicTestApi();

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

Member Function Documentation

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 28 of file AcrylicMarkupPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

void RunTestButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 36 of file AcrylicMarkupPage.xaml.cs.

        {
            bool[] results = { false, false};

            _acrylicTestApi.AcrylicBrush = AcrylicBrush1;
            results[0] = VerifyAcrylic();

            _acrylicTestApi.AcrylicBrush = AcrylicBrush3;
            _acrylicBrush = AcrylicBrush3;
            results[1] = VerifyFallbackColor(); // forced fallback

            bool result = results[0] && results[1];
            string resultString = System.String.Format("({0},{1})", results[0], results[1]);

            TestResult.Text = "AcrylicFromMarkup: " + (result ? "Passed" : ("Failed " + resultString));
        }

CompositionBrush UpdateCompositionBrush ( ) [inline, private]

Definition at line 72 of file AcrylicMarkupPage.xaml.cs.

        {
            CompositionBrush result = null;
            if (_acrylicTestApi.AcrylicBrush != null)
            {
                result = _acrylicTestApi.CompositionBrush;

                // ToString() here will log the type of the brush - useful to check whether we are in fallback mode
                CompositionBrushPointer.Text = (result == null) ? "null" : result.ToString();
            }
            return result;
        }

bool UpdateIsUsingAcrylicBrush ( ) [inline, private]

Definition at line 96 of file AcrylicMarkupPage.xaml.cs.

        {
            bool result = _acrylicTestApi.IsUsingAcrylicBrush;
            IsUsingAcrylicBrush.Text = result.ToString();
            return result;
        }

CompositionBrush UpdateNoiseBrush ( ) [inline, private]

Definition at line 85 of file AcrylicMarkupPage.xaml.cs.

        {
            CompositionBrush result = null;
            if (_acrylicTestApi.AcrylicBrush != null)
            {
                result = _acrylicTestApi.NoiseBrush;
                NoiseBrushPointer.Text = (result == null) ? "null" : result.ToString();
            }
            return result;
        }

bool VerifyAcrylic ( ) [inline, private]

Definition at line 62 of file AcrylicMarkupPage.xaml.cs.

        {
            bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
            var compositionBrush = UpdateCompositionBrush();
            var noiseBrush = UpdateNoiseBrush();
            return isUsingAcrylicBrush &&
                   (compositionBrush != null && compositionBrush is CompositionEffectBrush) &&
                   (noiseBrush != null && noiseBrush is CompositionSurfaceBrush);
        }

bool VerifyFallbackColor ( ) [inline, private]

Definition at line 53 of file AcrylicMarkupPage.xaml.cs.

        {
            bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
            var compositionBrush = UpdateCompositionBrush();
            return !isUsingAcrylicBrush &&
                   (compositionBrush != null && compositionBrush is CompositionColorBrush) &&
                   (compositionBrush as CompositionColorBrush).Color.Equals(_acrylicBrush.FallbackColor);
        }

Member Data Documentation

AcrylicBrush _acrylicBrush [private]

Definition at line 16 of file AcrylicMarkupPage.xaml.cs.

AcrylicTestApi _acrylicTestApi [private]

Definition at line 15 of file AcrylicMarkupPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicMarkupPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicPage
Public Member Functions

AcrylicPage Class Reference

List of all members.

Public Member Functions

AcrylicPage ()

Detailed Description

Definition at line 23 of file AcrylicPage.xaml.cs.

Constructor & Destructor Documentation

AcrylicPage ( ) [inline]

Definition at line 25 of file AcrylicPage.xaml.cs.

        {
            this.InitializeComponent();

            navigateToBasicAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicBrushPage), 0); };
            navigateToColorAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicColorPage), 0); };
            navigateToMarkupAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicMarkupPage), 0); };
            navigateToRenderingAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicRenderingPage), 0); };
            navigateToLuminosityAcrylicTest.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicBrushLuminosityTestPage), 0); };
        }

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicRenderingPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicRenderingPage
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

AcrylicRenderingPage Class Reference

List of all members.

Classes

struct | SampledColors

Public Member Functions

AcrylicRenderingPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

bool | AreClose (Color color1, Color color2)
void | cbComplexBackground_Toggled (object sender, RoutedEventArgs e)
void | cbToggleFallbackColor_Toggled (object sender, RoutedEventArgs e)
Color | GetPixelAtPoint (Point p, RenderTargetBitmap rtb, byte[] pixelArray)
void | LogAcrylicRecipeVersion (ResultsLogger logger)
void | RunTestButton_Clicked (object sender, RoutedEventArgs e)
async void | RunTestWithComplexBackground ()
async void | RunTestWithRedBlueBackground ()
async Task< SampledColors > | SamplePointColors (Image showRtb)
async void | SetLuminosityButton_Clicked (object sender, RoutedEventArgs e)
async void | UnsetLuminosityButton_Clicked (object sender, RoutedEventArgs e)

Private Attributes

bool[] | _luminosityBlendResults = { false, false }

Detailed Description

Definition at line 19 of file AcrylicRenderingPage.xaml.cs.

Constructor & Destructor Documentation

AcrylicRenderingPage ( ) [inline]

Definition at line 31 of file AcrylicRenderingPage.xaml.cs.

        {
            this.InitializeComponent();

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

Member Function Documentation

bool AreClose | ( | Color | color1,
 |  | Color | color2 |
 | ) |  |  | [inline, private]

Definition at line 258 of file AcrylicRenderingPage.xaml.cs.

        {
            // Note: "<= 2" was arbitrarily chosen to be considered close and is currently sufficient.
            //       This needs to be enough to account for both acrylic blur and acrylic noise.
            bool aClose = Math.Abs((int)color1.A - (int)color2.A) <= 2;
            bool rClose = Math.Abs((int)color1.R - (int)color2.R) <= 2;
            bool gClose = Math.Abs((int)color1.G - (int)color2.G) <= 2;
            bool bClose = Math.Abs((int)color1.B - (int)color2.B) <= 2;
            return aClose && rClose && gClose && bClose;
        }

void cbComplexBackground_Toggled | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 269 of file AcrylicRenderingPage.xaml.cs.

        {
            if (cbComplexBackground.IsChecked == true)
            {
                blueRedBGSP.Visibility = Visibility.Collapsed;
                complexBGGrid.Visibility = Visibility.Visible;
            }
            else
            {
                blueRedBGSP.Visibility = Visibility.Visible;
                complexBGGrid.Visibility = Visibility.Collapsed;
            }
        }

void cbToggleFallbackColor_Toggled | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 283 of file AcrylicRenderingPage.xaml.cs.

        {
            if (cbToggleFallbackColor.IsChecked == true)
            {
                myAcrylicBrush.FallbackColor = Microsoft.UI.Colors.Blue;
            }
            else
            {
                myAcrylicBrush.FallbackColor = Microsoft.UI.Colors.Green;
            }
        }

Color GetPixelAtPoint | ( | Point | p,
 |  | RenderTargetBitmap | rtb,
 |  | byte[] | pixelArray |
 | ) |  |  | [inline, private]

Definition at line 240 of file AcrylicRenderingPage.xaml.cs.

        {
            // Test infra normally runs at 100% scale, but account for the scale so this
            // works if the developer is running this at a different display scale.
            double scale = ContainerGrid.XamlRoot.RasterizationScale;
            Color pixelColor = new Color();
            int x = (int)(p.X * scale);
            int y = (int)(p.Y * scale);
            int pointPosition = 4 * (rtb.PixelWidth * y + x);

            pixelColor.B = pixelArray[pointPosition];
            pixelColor.G = pixelArray[pointPosition + 1];
            pixelColor.R = pixelArray[pointPosition + 2];
            pixelColor.A = pixelArray[pointPosition + 3];

            return pixelColor;
        }

void LogAcrylicRecipeVersion ( ResultsLogger logger ) [inline, private]

Definition at line 234 of file AcrylicRenderingPage.xaml.cs.

        {
            // Color change expected
            logger.LogMessage("Using Luminosity-based recipe... ");
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 39 of file AcrylicRenderingPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

void RunTestButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file AcrylicRenderingPage.xaml.cs.

        {
            if (cbComplexBackground.IsChecked == true)
            {
                RunTestWithComplexBackground();
            }
            else
            {
                RunTestWithRedBlueBackground();
            }
        }

async void RunTestWithComplexBackground ( ) [inline, private]

Definition at line 108 of file AcrylicRenderingPage.xaml.cs.

        {
            System.Diagnostics.Debug.WriteLine("------------------------------");
            System.Diagnostics.Debug.WriteLine("RunTestWithComplexBackground results:");

            RenderTargetBitmap rtb = new RenderTargetBitmap();
            await rtb.RenderAsync(ContainerGrid);
            ShowRtb1.Source = rtb;

            bool[] results = { false, false, false, false, false };

            var pixelBuffer = await rtb.GetPixelsAsync();
            byte[] pixelArray = pixelBuffer.ToArray();       // In BGRA8 format

            // Test to see if the text is blurred
            var textSample1 = GetPixelAtPoint(new Point(143,10), rtb, pixelArray);
            var textSample2 = GetPixelAtPoint(new Point(144,10), rtb, pixelArray);
            var textSample3 = GetPixelAtPoint(new Point(145,10), rtb, pixelArray);
            results[0] = AreClose(textSample1, textSample2) && AreClose(textSample2, textSample3);
            System.Diagnostics.Debug.WriteLine(System.String.Format("textSamples: {0} {1} {2}", textSample1, textSample2, textSample3));

            // Test to see if all colors are fully opaque
            results[1] = textSample1.A == 0xFF && textSample2.A == 0xFF && textSample3.A == 0xFF;

            // Test the left edge red rectangle
            var redRectSample1 = GetPixelAtPoint(new Point(241,60), rtb, pixelArray);
            var redRectSample2 = GetPixelAtPoint(new Point(242,60), rtb, pixelArray);
            var redRectSample3 = GetPixelAtPoint(new Point(243,60), rtb, pixelArray);
            results[2] = AreClose(redRectSample1, redRectSample2) && AreClose(redRectSample2, redRectSample3);
            System.Diagnostics.Debug.WriteLine(System.String.Format("redRectSamples: {0} {1} {2}", redRectSample1, redRectSample2, redRectSample3));

            // Test to see if all colors are fully opaque
            results[3] = redRectSample1.A == 0xFF && redRectSample2.A == 0xFF && redRectSample3.A == 0xFF;

            // Test if the Green FallbackColor is noticeable
            var greenSample = GetPixelAtPoint(new Point(140,100), rtb, pixelArray);
            results[4] = AreClose(greenSample, new Color() { A = 0xFF, R = 0x4D, G = 0x87, B = 0x4D });
            System.Diagnostics.Debug.WriteLine(System.String.Format("greenSample: {0}", greenSample));

            bool result = results[0] && results[1] && results[2] && results[3] && results[4];
            string resultString = System.String.Format("({0},{1},{2},{3},{4})", results[0], results[1], results[2], results[3], results[4]);
            TestResult.Text = "AcrylicOnComplexTransparentBG: " + (result ? "Passed" : ("Failed " + resultString));
        }

async void RunTestWithRedBlueBackground ( ) [inline, private]

Definition at line 152 of file AcrylicRenderingPage.xaml.cs.

        {
            bool[] results = { false, false, false, false};

            ShowRtb1_Text.Text = "RenderTargetBitmap: In-app Acylic";
            SampledColors inAppAcrylicColors = await SamplePointColors(ShowRtb1);

            // Test 0: We are not rendering fallback color [for in-app acrylic]
            results[0] = !inAppAcrylicColors.c1.Equals(Microsoft.UI.Colors.Green);

            // Test 1: Transparency is present (acylic over red BG and blue BG comes out different) ...
            results[1] = !inAppAcrylicColors.c1.Equals(inAppAcrylicColors.c2);

            // Test 2: ... but not fully transparent (we don't just evaluate to BG color)
            results[2] = !inAppAcrylicColors.c1.Equals(Microsoft.UI.Colors.Red) && !inAppAcrylicColors.c2.Equals(Microsoft.UI.Colors.Blue);

            // Test 3: Gaussian blur is present  (point at center of one color BG different from point at edge of different color BG)
            results[3] = !inAppAcrylicColors.c1.Equals(inAppAcrylicColors.c3) && !inAppAcrylicColors.c2.Equals(inAppAcrylicColors.c4);

            bool result = results[0] && results[1] && results[2] && results[3];
            string resultString = System.String.Format("({0},{1},{2},{3})", results[0], results[1], results[2], results[3]);
            TestResult.Text = "AcrylicRendering: " + (result ? "Passed" : ("Failed " + resultString));
        }

async Task<SampledColors> SamplePointColors ( Image showRtb ) [inline, private]

Definition at line 72 of file AcrylicRenderingPage.xaml.cs.

        {
            Point p1 = new Point(100, 100);             // Point over middle of Rectangle1
            Point p2 = new Point(300, 100);             // Point over middle of Rectangle2
            Point p3 = new Point(197, 100);             // Point near right edge of Rectangle 1
            Point p4 = new Point(203, 100);             // Point near left eedge or Rectangle 2

            RenderTargetBitmap rtb = new RenderTargetBitmap();
            await rtb.RenderAsync(ContainerGrid);
            showRtb.Source = rtb;

            var pixelBuffer = await rtb.GetPixelsAsync();
            byte[] pixelArray = pixelBuffer.ToArray();       // In BGRA8 format

            SampledColors sampledColors = new SampledColors();

            sampledColors.c1 = GetPixelAtPoint(p1, rtb, pixelArray);
            sampledColors.c2 = GetPixelAtPoint(p2, rtb, pixelArray);
            sampledColors.c3 = GetPixelAtPoint(p3, rtb, pixelArray);
            sampledColors.c4 = GetPixelAtPoint(p4, rtb, pixelArray);

            return sampledColors;
        }

async void SetLuminosityButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 176 of file AcrylicRenderingPage.xaml.cs.

        {
            bool result = false;

            using (var logger = new ResultsLogger("SetLuminosityBlend", TestResult))
            {
                LogAcrylicRecipeVersion(logger);

                // Capture state when TintLuminosityOpacity is at default value of null
                // On 19H1+, this means auto configure the Luminosity for the given Tint
                // On RS5-, it has no effect (we use the legacy acrylic recipe)

                ShowRtb1_Text.Text = "SetLuminosityBlend: Luminosity = auto";
                SampledColors initialColors = await SamplePointColors(ShowRtb1);

                // Manually set TintLuminosityOpacity
                myAcrylicBrush.TintLuminosityOpacity = 1.0;
                await Task.Delay(2000);

                ShowRtb2_Text.Text = "SetLuminosityBlend: Luminosity = 1.0";
                SampledColors customLuminosityColors = await SamplePointColors(ShowRtb2);

                // Color change expected
                result = !initialColors.Equals(customLuminosityColors);

                logger.Verify(result, "Sampled acrylic pixels did not change as expected");
            }
        }

async void UnsetLuminosityButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 205 of file AcrylicRenderingPage.xaml.cs.

        {
            bool result = false;

            using (var logger = new ResultsLogger("ClearLuminosityBlend", TestResult))
            {
                LogAcrylicRecipeVersion(logger);

                // Manually set TintLuminosityOpacity
                myAcrylicBrush.TintLuminosityOpacity = 1.0;
                await Task.Delay(2000);

                ShowRtb1_Text.Text = "ClearLuminosityBlend: Luminosity = 1.0";
                SampledColors customLuminsotyColors = await SamplePointColors(ShowRtb1);

                // Restore TintLuminosityOpacity to default
                myAcrylicBrush.ClearValue(AcrylicBrush.TintLuminosityOpacityProperty);
                await Task.Delay(2000);

                ShowRtb2_Text.Text = "ClearLuminosityBlend: Luminosity = auto";
                SampledColors defaultLuminosityColors = await SamplePointColors(ShowRtb2);

                // Color change expected
                result = !defaultLuminosityColors.Equals(customLuminsotyColors);

                logger.Verify(result, "Sampled acrylic pixels did not change as expected");
            }
        }

Member Data Documentation

bool [] _luminosityBlendResults = { false, false } [private]

Definition at line 29 of file AcrylicRenderingPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicRenderingPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicRenderingPage::SampledColors Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AcrylicRenderingPage
  • AcrylicRenderingPage::SampledColors
Public Attributes

AcrylicRenderingPage::SampledColors Struct Reference

List of all members.

Public Attributes

Color | c1
Color | c2
Color | c3
Color | c4

Detailed Description

Definition at line 21 of file AcrylicRenderingPage.xaml.cs.

Member Data Documentation

Color c1

Definition at line 23 of file AcrylicRenderingPage.xaml.cs.

Color c2

Definition at line 24 of file AcrylicRenderingPage.xaml.cs.

Color c3

Definition at line 25 of file AcrylicRenderingPage.xaml.cs.

Color c4

Definition at line 26 of file AcrylicRenderingPage.xaml.cs.

The documentation for this struct was generated from the following file:
  • Materials/Acrylic/TestUI/AcrylicRenderingPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIconHost Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnimatedIconHost
Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions | Private Attributes

AnimatedIconHost Class Reference

Inherits Microsoft::Windows::Apps::Test::Foundation::Controls::Button.

List of all members.

Public Member Functions

AnimatedIconHost ()
AnimatedIcon | GetAnimatedIcon ()

Static Public Attributes

static readonly DependencyProperty | FallbackGlyphProperty
static readonly DependencyProperty | IconSourceProperty
static readonly DependencyProperty | TitleProperty

Protected Member Functions

override void | OnApplyTemplate ()

Properties

String | FallbackGlyph [get, set]
IconSource | IconSource [get, set]
String | Title [get, set]

Private Member Functions

void | AnimatedIconTestHooks_LastAnimationSegmentChanged (AnimatedIcon sender, object args)
void | IconSourceChanged ()

Static Private Member Functions

static void | OnIconSourceChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)

Private Attributes

Border | m_iconPresenter
TextBlock | m_transitionTextBlock

Detailed Description

Definition at line 19 of file AnimatedIconHost.cs.

Constructor & Destructor Documentation

AnimatedIconHost ( ) [inline]

Definition at line 68 of file AnimatedIconHost.cs.

        {
            this.DefaultStyleKey = typeof(AnimatedIconHost);
            AnimatedIconTestHooks.LastAnimationSegmentChanged += AnimatedIconTestHooks_LastAnimationSegmentChanged;
        }

Member Function Documentation

void AnimatedIconTestHooks_LastAnimationSegmentChanged | ( | AnimatedIcon | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 74 of file AnimatedIconHost.cs.

        {
            if(sender == GetAnimatedIcon())
            {
                m_transitionTextBlock.Text = AnimatedIconTestHooks.GetLastAnimationSegment(sender);
            }
        }

AnimatedIcon GetAnimatedIcon ( ) [inline]

Definition at line 82 of file AnimatedIconHost.cs.

        {
            return m_iconPresenter.Child as AnimatedIcon;
        }

void IconSourceChanged ( ) [inline, private]

Definition at line 95 of file AnimatedIconHost.cs.

        {
            if (m_iconPresenter != null)
            {
                m_iconPresenter.Child = IconSource.CreateIconElement();
            }
        }

override void OnApplyTemplate ( ) [inline, protected]

Definition at line 87 of file AnimatedIconHost.cs.

        {
            m_iconPresenter = (Border)GetTemplateChild("Icon");
            m_transitionTextBlock = (TextBlock)GetTemplateChild("TransitionTextBlock");

            IconSourceChanged();
        }

static void OnIconSourceChanged | ( | DependencyObject | d,
 |  | DependencyPropertyChangedEventArgs | e |
 | ) |  |  | [inline, static, private]

Definition at line 37 of file AnimatedIconHost.cs.

        {
            ((AnimatedIconHost)d).IconSourceChanged();
        }

Member Data Documentation

readonly DependencyProperty FallbackGlyphProperty [static]
Initial value:
 DependencyProperty.Register(
          "FallbackGlyph",
          typeof(String),
          typeof(AnimatedIconHost),
          null
        )

Definition at line 61 of file AnimatedIconHost.cs.

readonly DependencyProperty IconSourceProperty [static]
Initial value:
 DependencyProperty.Register(
          "IconSource",
          typeof(IconSource),
          typeof(AnimatedIconHost),
          new PropertyMetadata(null, new PropertyChangedCallback(OnIconSourceChanged))
        )

Definition at line 30 of file AnimatedIconHost.cs.

Border m_iconPresenter [private]

Definition at line 21 of file AnimatedIconHost.cs.

TextBlock m_transitionTextBlock [private]

Definition at line 22 of file AnimatedIconHost.cs.

readonly DependencyProperty TitleProperty [static]
Initial value:
 DependencyProperty.Register(
          "Title",
          typeof(String),
          typeof(AnimatedIconHost),
          null
        )

Definition at line 48 of file AnimatedIconHost.cs.

Property Documentation

String FallbackGlyph [get, set]

Definition at line 56 of file AnimatedIconHost.cs.

IconSource IconSource [get, set]

Definition at line 25 of file AnimatedIconHost.cs.

String Title [get, set]

Definition at line 43 of file AnimatedIconHost.cs.

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/AnimatedIconHost.cs
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIconPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnimatedIconPage
Public Member Functions | Private Member Functions

AnimatedIconPage Class Reference

List of all members.

Public Member Functions

AnimatedIconPage ()
void | IsLeftToRightChecked (object sender, RoutedEventArgs args)
void | IsLeftToRightUnchecked (object sender, RoutedEventArgs args)

Private Member Functions

void | AnimatedIconPage_Loaded (object sender, RoutedEventArgs e)
void | AnimatedIconTestHooks_LastAnimationSegmentChanged (AnimatedIcon sender, object args)
void | ChangeFallbackGlyphButton_Click (object sender, RoutedEventArgs e)
void | QueueLengthSlider_ValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | Slider_ValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | SpeedUpSlider_ValueChanged (object sender, RangeBaseValueChangedEventArgs e)

Detailed Description

Definition at line 19 of file AnimatedIconPage.xaml.cs.

Constructor & Destructor Documentation

AnimatedIconPage ( ) [inline]

Definition at line 21 of file AnimatedIconPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += AnimatedIconPage_Loaded;
            AnimatedIconTestHooks.LastAnimationSegmentChanged += AnimatedIconTestHooks_LastAnimationSegmentChanged;
        }

Member Function Documentation

void AnimatedIconPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 40 of file AnimatedIconPage.xaml.cs.

        {
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIconNavView_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIconNavView_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SideChevron_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SideChevron_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.HamburgerIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.HamburgerIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SettingsIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SettingsIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.BackIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.BackIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SearchIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SearchIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
            AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
        }

void AnimatedIconTestHooks_LastAnimationSegmentChanged | ( | AnimatedIcon | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 28 of file AnimatedIconPage.xaml.cs.

        {
            var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
            var grid = VisualTreeHelper.GetChild(rootGrid, 0);
            var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;

            if(sender == CheckIcon)
            {
                LastTransitionTextBlock.Text = AnimatedIconTestHooks.GetLastAnimationSegment(CheckIcon);
            }
        }

void ChangeFallbackGlyphButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 386 of file AnimatedIconPage.xaml.cs.

        {
            boundFallback.FallbackGlyph = "\uE9AE";
        }

void IsLeftToRightChecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 376 of file AnimatedIconPage.xaml.cs.

        {
            this.FlowDirection = FlowDirection.LeftToRight;
        }

void IsLeftToRightUnchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 381 of file AnimatedIconPage.xaml.cs.

        {
            this.FlowDirection = FlowDirection.RightToLeft;
        }

void QueueLengthSlider_ValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 273 of file AnimatedIconPage.xaml.cs.

        {
            if (this.DropDownIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.DropDownIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.DropDownIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.DropDownIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.DropDownIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.DropDownIconNavView_Cut != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.DropDownIconNavView_Cut.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.DropDownIconNavView_Queue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.DropDownIconNavView_Queue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.DropDownIconNavView_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SideChevron_Cut != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SideChevron_Cut.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SideChevron_Queue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SideChevron_Queue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SideChevron_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.HamburgerIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.HamburgerIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.HamburgerIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.HamburgerIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.HamburgerIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SettingsIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SettingsIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SettingsIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SettingsIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SettingsIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.BackIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.BackIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.BackIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.BackIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.BackIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SearchIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SearchIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SearchIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SearchIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.SearchIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetQueueLength(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
            }
            if (this.AnimatedCheckbox != null)
            {
                var rootGrid = VisualTreeHelper.GetChild(AnimatedCheckbox, 0);
                var grid = VisualTreeHelper.GetChild(rootGrid, 0);
                var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;

                AnimatedIconTestHooks.SetQueueLength(CheckIcon, (int)e.NewValue);
            }
            if (this.LargeAnimatedCheckbox != null)
            {
                var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
                var grid = VisualTreeHelper.GetChild(rootGrid, 0);
                var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;

                AnimatedIconTestHooks.SetQueueLength(CheckIcon, (int)e.NewValue);
            }
        }

void Slider_ValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 65 of file AnimatedIconPage.xaml.cs.

        {
            if (this.DropDownIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIconNavView_Cut != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIconNavView_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIconNavView_Queue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIconNavView_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIconNavView_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SideChevron_Cut != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SideChevron_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SideChevron_Queue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SideChevron_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SideChevron_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.HamburgerIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.HamburgerIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.HamburgerIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.HamburgerIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.HamburgerIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SettingsIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SettingsIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SettingsIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SettingsIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SettingsIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.BackIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.BackIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.BackIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.BackIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.BackIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SearchIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SearchIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SearchIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SearchIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SearchIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetDurationMultiplier(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.AnimatedCheckbox != null)
            {
                var rootGrid = VisualTreeHelper.GetChild(AnimatedCheckbox, 0);
                var grid = VisualTreeHelper.GetChild(rootGrid, 0);
                var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;

                AnimatedIconTestHooks.SetDurationMultiplier(CheckIcon, (float)e.NewValue);
            }
            if (this.LargeAnimatedCheckbox != null)
            {
                var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
                var grid = VisualTreeHelper.GetChild(rootGrid, 0);
                var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;

                AnimatedIconTestHooks.SetDurationMultiplier(CheckIcon, (float)e.NewValue);
            }
        }

void SpeedUpSlider_ValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 169 of file AnimatedIconPage.xaml.cs.

        {
            if (this.DropDownIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIconNavView_Cut != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIconNavView_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIconNavView_Queue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIconNavView_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.DropDownIconNavView_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SideChevron_Cut != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SideChevron_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SideChevron_Queue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SideChevron_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SideChevron_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.HamburgerIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.HamburgerIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.HamburgerIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.HamburgerIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.HamburgerIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SettingsIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SettingsIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SettingsIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SettingsIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SettingsIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.BackIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.BackIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.BackIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.BackIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.BackIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SearchIcon_Cut != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SearchIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SearchIcon_Queue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SearchIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.SearchIcon_SpeedUpQueue != null)
            {
                AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
            }
            if (this.AnimatedCheckbox != null)
            {
                var rootGrid = VisualTreeHelper.GetChild(AnimatedCheckbox, 0);
                var grid = VisualTreeHelper.GetChild(rootGrid, 0);
                var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;

                AnimatedIconTestHooks.SetSpeedUpMultiplier(CheckIcon, (float)e.NewValue);
            }
            if (this.LargeAnimatedCheckbox != null)
            {
                var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
                var grid = VisualTreeHelper.GetChild(rootGrid, 0);
                var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;

                AnimatedIconTestHooks.SetSpeedUpMultiplier(CheckIcon, (float)e.NewValue);
            }
        }

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/AnimatedIconPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnimatedVisualPlayerPage
Public Member Functions | Private Member Functions

AnimatedVisualPlayerPage Class Reference

List of all members.

Public Member Functions

AnimatedVisualPlayerPage ()

Private Member Functions

void | AroundTheEndAnimationPlayButton_Click (object sender, RoutedEventArgs e)
async Task | DelayForHalfAnimationDurationThenReverse ()
void | FallenBackButton_ClickAsync (Object sender, RoutedEventArgs e)
void | FromOneKeyframeAnimationPlayButton_Click (object sender, RoutedEventArgs e)
async Task | GetIsPlayingAsync ()
async void | Play (double from, double to, TextBox statusTextBox)
void | PlayButton_Click (object sender, RoutedEventArgs e)
void | Player_PointerMoved (object sender, RoutedEventArgs e)
void | PlayForward (double fromProgress, double toProgress, TextBox statusTextBox)
void | PlayHalfButton_Click (object sender, RoutedEventArgs e)
async void | ReverseNegativePlaybackRateAnimationPlayButton_Click (object sender, RoutedEventArgs e)
async void | ReversePositivePlaybackRateAnimationPlayButton_Click (object sender, RoutedEventArgs e)
void | SetAutomationPeerNames (Panel root)
void | SetProgressButton_Click (object sender, RoutedEventArgs e)
void | SetTextBoxTextToPlayerProgress (TextBox textBox)
void | StopButton_Click (object sender, RoutedEventArgs e)
void | SwitchCacheModeButton_Click (object sender, RoutedEventArgs e)
void | ToZeroKeyframeAnimationPlayButton_Click (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 43 of file AnimatedVisualPlayerPage.xaml.cs.

Constructor & Destructor Documentation

AnimatedVisualPlayerPage ( ) [inline]

Definition at line 45 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            this.InitializeComponent();
            SetAutomationPeerNames(PageGrid);
        }

Member Function Documentation

void AroundTheEndAnimationPlayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 116 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            PlayForward(0.35, 0.3, AroundTheEndAnimationProgressTextBox);
        }

async Task DelayForHalfAnimationDurationThenReverse ( ) [inline, private]

Definition at line 208 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            var delayTimeSpan = TimeSpan.FromTicks((long)(0.5 * Player.Duration.Ticks));
            await Task.Delay(delayTimeSpan);

            // Pause, change direction, resume in the new direction.
            Player.Pause();
            Player.PlaybackRate *= -1;
            Player.Resume();
        }

void FallenBackButton_ClickAsync | ( | Object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 219 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            // TODO 23778051: Bring this back when we have a GraphicsCaptureItem that accepts a
            // Microsoft.UI.Composition.Visual object instead of a Microsoft.UI.Composition.Visual object.
            /*if (IsRS5OrHigher())
            {
                // Nullsource is a source that always fails. We use it to trigger the fallback behavior.
                Player.Source = new AnimatedVisuals.Nullsource();

                // Scrape the pixels from the Player. There should be a red rectangle where the content would go.
                var playerVisual = ElementCompositionPreview.GetElementVisual(Player);
                CanvasBitmap canvasBitmap = await RenderVisualToBitmapAsync(playerVisual);

                var colors = canvasBitmap.GetPixelColors();
                var redPixelCount = colors.Where(c => c == FallbackGrid.RectangleColor).Count();

                // Check that the number of red pixels is at least half the number of pixels in the
                // FallbackGrid. We require only half to allow for any scaling or borders or anything
                // that is not important to determining whether or not we are showing the
                // FallbackGrid.
                FallenBackTextBox.Text = redPixelCount >= FallbackGrid.RectangleHeight * FallbackGrid.RectangleWidth * 0.5
                    ? Constants.TrueText
                    : Constants.FalseText;
            }
            else*/
            {
                var parent = FallbackGrid.Latest?.Parent;
                FallenBackTextBox.Text = parent == Player
                    ? Constants.TrueText
                    : Constants.FalseText;
            }
        }

void FromOneKeyframeAnimationPlayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 122 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            PlayForward(1, 0.35, FromOneKeyframeAnimationProgressTextBox);
        }

async Task GetIsPlayingAsync ( ) [inline, private]

Definition at line 194 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            //
            // This artificial delay of 200ms is to ensure that the player's PlayAsync
            // has enough time ready to set value of IsPlaying property to true.
            //
            await Task.Delay(200);

            Player.Pause();
            IsPlayingTextBoxBeingPlaying.Text = Player.IsPlaying.ToString();
            Player.Resume();
        }

async void Play | ( | double | from,
 |  | double | to,
 |  | TextBox | statusTextBox |
 | ) |  |  | [inline, private]

Definition at line 76 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            IsPlayingTextBoxBeforePlaying.Text = Player.IsPlaying.ToString();

            // Start playing and concurrently get the IsPlaying state.
            Task task1 = Player.PlayAsync(from, to, false).AsTask();
            Task task2 = GetIsPlayingAsync();

            // Wait for playing to finish.
            await Task.WhenAll(task1, task2);
            statusTextBox.Text = Constants.PlayingEndedText;
        }

void PlayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            IsPlayingTextBoxBeforePlaying.Text = Player.IsPlaying.ToString();
            PlayForward(0, 1, ProgressTextBox);
        }

void Player_PointerMoved | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 189 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            HittestingTextBox.Text = Constants.PointerMovedText;
        }

void PlayForward | ( | double | fromProgress,
 |  | double | toProgress,
 |  | TextBox | statusTextBox |
 | ) |  |  | [inline, private]

Definition at line 89 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            Player.PlaybackRate = 1;
            Play(fromProgress, toProgress, statusTextBox);
        }

void PlayHalfButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 103 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            IsPlayingTextBoxBeforePlaying.Text = Player.IsPlaying.ToString();
            PlayForward(0, 0.5, ProgressTextBox);
        }

async void ReverseNegativePlaybackRateAnimationPlayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 152 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            // Start playing backwards from 1 to 0.
            Player.PlaybackRate = -1;
            Task task1 = Player.PlayAsync(0.0, 1.0, false).AsTask();

            // Reverse direction after half of the animation duration.
            Task task2 = DelayForHalfAnimationDurationThenReverse();

            await Task.WhenAll(task1, task2);

            SetTextBoxTextToPlayerProgress(ReverseNegativePlaybackRateAnimationTextBox);
        }

async void ReversePositivePlaybackRateAnimationPlayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 167 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            // Start playing forward from 0 to 1.
            Player.PlaybackRate = 1;
            Task task1 = Player.PlayAsync(0, 1, false).AsTask();

            // Reverse direction after half of the animation duration.
            Task task2 = DelayForHalfAnimationDurationThenReverse();

            await Task.WhenAll(task1, task2);

            SetTextBoxTextToPlayerProgress(ReversePositivePlaybackRateAnimationTextBox);
        }

void SetAutomationPeerNames ( Panel root ) [inline, private]

Definition at line 54 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            foreach (var child in root.Children)
            {
                if (child is FrameworkElement element)
                {
                    // Copy the x:Name into the AutomationPeer name unless it already has an AutomationPeer name.
                    var name = element.Name;
                    if (!string.IsNullOrEmpty(name) && string.IsNullOrEmpty(AutomationProperties.GetName(element)))
                    {
                        AutomationProperties.SetName(element, name);
                    }

                    if (child is Panel panel)
                    {
                        // Recurse to get the rest of the tree.
                        SetAutomationPeerNames(panel);
                    }
                }
            }
        }

void SetProgressButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 127 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            Player.SetProgress(0.4);
        }

void SetTextBoxTextToPlayerProgress ( TextBox textBox ) [inline, private]

Definition at line 181 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            // Read the progress value from the player.
            var progressPropertySet = (CompositionPropertySet)Player.ProgressObject;
            progressPropertySet.TryGetScalar("progress", out var value);
            textBox.Text = value.ToString();
        }

void StopButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 146 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            Player.Stop();
        }

void SwitchCacheModeButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 132 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            if (Player.AnimationOptimization == Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Latency)
            {
                Player.AnimationOptimization = Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Resources;
                SwitchCacheModeButton.Content = "Switch Optimization (Current: Resources)";
            }
            else if (Player.AnimationOptimization == Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Resources)
            {
                Player.AnimationOptimization = Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Latency;
                SwitchCacheModeButton.Content = "Switch Optimization (Current: Latency)";
            }
        }

void ToZeroKeyframeAnimationPlayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 110 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            PlayForward(0.35, 0, ToZeroKeyframeAnimationProgressTextBox);
        }

The documentation for this class was generated from the following file:
  • AnimatedVisualPlayer/TestUI/AnimatedVisualPlayerPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimationHandler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnimationHandler
Public Member Functions | Private Member Functions | Private Attributes

AnimationHandler Class Reference

List of all members.

Public Member Functions

AnimationHandler (UIElement container, RefreshPullDirection pullDirection)
void | InteractionTrackerAnimation (UIElement refreshVisualizer, UIElement infoProvider, InteractionTracker interactionTracker)
void | RefreshCompletedAnimation (UIElement refreshVisualizer, UIElement infoProvider)
void | RefreshRequestedAnimation (UIElement refreshVisualizer, UIElement infoProvider, double executionRatio)

Private Member Functions

String | GetAnimatedPropertyName ()
bool | IsOrientationVertical ()
void | RefreshCompletedBatchCompleted (Object sender, CompositionBatchCompletedEventArgs args)
void | ValidateAndStoreParameters (UIElement refreshVisualizer, UIElement infoProvider, InteractionTracker interactionTracker)

Private Attributes

Compositor | compositor
UIElement | infoProvider
ExpressionAnimation | infoProviderOffsetAnimation
ScalarKeyFrameAnimation | infoProviderRefreshCompletedAnimation
ScalarKeyFrameAnimation | infoProviderRefreshRequestedAnimation
Visual | infoProviderVisual
bool | interactionAnimationNeedsUpdating = true
InteractionTracker | interactionTracker
bool | refreshCompletedAnimationNeedsUpdating = true
CompositionScopedBatch | refreshCompletedScopedBatch
RefreshPullDirection | refreshPullDirection
bool | refreshRequestedAnimationNeedsUpdating = true
UIElement | refreshVisualizer
ScalarKeyFrameAnimation | refreshVisualizerRefreshCompletedAnimation
ScalarKeyFrameAnimation | refreshVisualizerRefreshRequestedAnimation
Visual | refreshVisualizerVisual
ExpressionAnimation | refreshVisualizerVisualOffsetAnimation

Detailed Description

Definition at line 18 of file AnimationHandler.cs.

Constructor & Destructor Documentation

AnimationHandler | ( | UIElement | container,
 |  | RefreshPullDirection | pullDirection |
 | ) |  |  | [inline]

Definition at line 41 of file AnimationHandler.cs.

        {
            if (container != null)
            {
                var vis = ElementCompositionPreview.GetElementVisual(container);
                compositor = vis.Compositor;
            }
            refreshPullDirection = pullDirection;
        }

Member Function Documentation

String GetAnimatedPropertyName ( ) [inline, private]

Definition at line 263 of file AnimationHandler.cs.

        {
            String animatedProperty = "Translation";

            if (IsOrientationVertical())
            {
                animatedProperty += ".Y";
            }
            else
            {
                animatedProperty += ".X";
            }

            return animatedProperty;
        }

void InteractionTrackerAnimation | ( | UIElement | refreshVisualizer,
 |  | UIElement | infoProvider,
 |  | InteractionTracker | interactionTracker |
 | ) |  |  | [inline]

Definition at line 51 of file AnimationHandler.cs.

        {
            ValidateAndStoreParameters(refreshVisualizer, infoProvider, interactionTracker);

            if (interactionTracker == null)
            {
                this.interactionTracker = null;
                return;
            }

            if ((refreshVisualizerVisualOffsetAnimation == null || infoProviderOffsetAnimation == null || interactionAnimationNeedsUpdating) && compositor != null)
            {
                switch (refreshPullDirection)
                {
                    case RefreshPullDirection.TopToBottom:
                        refreshVisualizerVisualOffsetAnimation = compositor.CreateExpressionAnimation(
                            "-refreshVisualizerVisual.Size.Y + min(refreshVisualizerVisual.Size.Y, -interactionTracker.Position.Y)");

                        infoProviderOffsetAnimation = compositor.CreateExpressionAnimation(
                            "min(refreshVisualizerVisual.Size.Y, max(-interactionTracker.Position.Y, 0))");

                        break;
                    case RefreshPullDirection.BottomToTop:
                        refreshVisualizerVisualOffsetAnimation = compositor.CreateExpressionAnimation(
                            "refreshVisualizerVisual.Size.Y - min(refreshVisualizerVisual.Size.Y, interactionTracker.Position.Y)");

                        infoProviderOffsetAnimation = compositor.CreateExpressionAnimation(
                            "max(-refreshVisualizerVisual.Size.Y, min(-interactionTracker.Position.Y, 0))");

                        break;
                    case RefreshPullDirection.LeftToRight:
                        refreshVisualizerVisualOffsetAnimation = compositor.CreateExpressionAnimation(
                            "-refreshVisualizerVisual.Size.X + min(refreshVisualizerVisual.Size.X, -interactionTracker.Position.X)");

                        infoProviderOffsetAnimation = compositor.CreateExpressionAnimation(
                            "min(refreshVisualizerVisual.Size.X, max(-interactionTracker.Position.X, 0))");

                        break;
                    case RefreshPullDirection.RightToLeft:
                        refreshVisualizerVisualOffsetAnimation = compositor.CreateExpressionAnimation(
                            "refreshVisualizerVisual.Size.X - min(refreshVisualizerVisual.Size.X, interactionTracker.Position.X)");

                        infoProviderOffsetAnimation = compositor.CreateExpressionAnimation(
                            "max(-refreshVisualizerVisual.Size.X, min(-interactionTracker.Position.X, 0))");

                        break;
                }

                refreshVisualizerVisualOffsetAnimation.SetReferenceParameter("refreshVisualizerVisual", refreshVisualizerVisual);
                refreshVisualizerVisualOffsetAnimation.SetReferenceParameter("interactionTracker", this.interactionTracker);

                infoProviderOffsetAnimation.SetReferenceParameter("refreshVisualizerVisual", refreshVisualizerVisual);
                infoProviderOffsetAnimation.SetReferenceParameter("infoProviderVisual", infoProviderVisual);
                infoProviderOffsetAnimation.SetReferenceParameter("interactionTracker", this.interactionTracker);

                interactionAnimationNeedsUpdating = false;
            }

            if (refreshVisualizerVisualOffsetAnimation != null && infoProviderOffsetAnimation != null)
            {
                refreshVisualizerVisual.Properties.InsertVector3("Translation", new Vector3(0.0f, 0.0f, 0.0f));
                infoProviderVisual.Properties.InsertVector3("Translation", new Vector3(0.0f, 0.0f, 0.0f));

                string animatedProperty = GetAnimatedPropertyName();
                refreshVisualizerVisual.StartAnimation(animatedProperty, refreshVisualizerVisualOffsetAnimation);
                infoProviderVisual.StartAnimation(animatedProperty, infoProviderOffsetAnimation);
            }
        }

bool IsOrientationVertical ( ) [inline, private]

Definition at line 258 of file AnimationHandler.cs.

        {
            return (refreshPullDirection == RefreshPullDirection.TopToBottom || refreshPullDirection == RefreshPullDirection.BottomToTop);
        }

void RefreshCompletedAnimation | ( | UIElement | refreshVisualizer,
 |  | UIElement | infoProvider |
 | ) |  |  | [inline]

Definition at line 160 of file AnimationHandler.cs.

        {
            ValidateAndStoreParameters(refreshVisualizer, infoProvider, null);

            if ((refreshVisualizerRefreshCompletedAnimation == null || infoProviderRefreshCompletedAnimation == null || refreshCompletedAnimationNeedsUpdating) && compositor != null)
            {
                refreshVisualizerRefreshCompletedAnimation = compositor.CreateScalarKeyFrameAnimation();
                refreshVisualizerRefreshCompletedAnimation.Duration = TimeSpan.FromMilliseconds(100);
                infoProviderRefreshCompletedAnimation = compositor.CreateScalarKeyFrameAnimation();
                infoProviderRefreshCompletedAnimation.Duration = TimeSpan.FromMilliseconds(100);
                infoProviderRefreshCompletedAnimation.InsertKeyFrame(1.0f, 0.0f);

                switch (refreshPullDirection)
                {
                    case RefreshPullDirection.TopToBottom:
                        refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, -(refreshVisualizerVisual.Size.Y));
                        break;
                    case RefreshPullDirection.BottomToTop:
                        refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, refreshVisualizerVisual.Size.Y);
                        break;
                    case RefreshPullDirection.LeftToRight:
                        refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, -(refreshVisualizerVisual.Size.X));
                        break;
                    case RefreshPullDirection.RightToLeft:
                        refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, refreshVisualizerVisual.Size.X);
                        break;
                }
                refreshCompletedAnimationNeedsUpdating = false;
            }

            if (compositor != null)
            {
                refreshCompletedScopedBatch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
                refreshCompletedScopedBatch.Completed += RefreshCompletedBatchCompleted;
            }

            if (refreshVisualizerRefreshCompletedAnimation != null && infoProviderRefreshCompletedAnimation != null)
            {
                string animatedProperty = GetAnimatedPropertyName();
                refreshVisualizerVisual.StartAnimation(animatedProperty, refreshVisualizerRefreshCompletedAnimation);
                infoProviderVisual.StartAnimation(animatedProperty, infoProviderRefreshCompletedAnimation);
            }

            if (refreshCompletedScopedBatch != null)
            {
                refreshCompletedScopedBatch.End();
            }
        }

void RefreshCompletedBatchCompleted | ( | Object | sender,
 |  | CompositionBatchCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 253 of file AnimationHandler.cs.

        {
            InteractionTrackerAnimation(refreshVisualizer, infoProvider, interactionTracker);
        }

void RefreshRequestedAnimation | ( | UIElement | refreshVisualizer,
 |  | UIElement | infoProvider,
 |  | double | executionRatio |
 | ) |  |  | [inline]

Definition at line 120 of file AnimationHandler.cs.

        {
            ValidateAndStoreParameters(refreshVisualizer, infoProvider, null);

            if ((refreshVisualizerRefreshRequestedAnimation == null || infoProviderRefreshRequestedAnimation == null || refreshRequestedAnimationNeedsUpdating) && compositor != null)
            {
                refreshVisualizerRefreshRequestedAnimation = compositor.CreateScalarKeyFrameAnimation();
                refreshVisualizerRefreshRequestedAnimation.Duration = TimeSpan.FromMilliseconds(100);
                infoProviderRefreshRequestedAnimation = compositor.CreateScalarKeyFrameAnimation();
                infoProviderRefreshRequestedAnimation.Duration = TimeSpan.FromMilliseconds(100);
                switch (refreshPullDirection)
                {
                    case RefreshPullDirection.TopToBottom:
                        refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, -(refreshVisualizerVisual.Size.Y * (1 - (float)executionRatio)));
                        infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, refreshVisualizerVisual.Size.Y * (float)executionRatio);
                        break;
                    case RefreshPullDirection.BottomToTop:
                        refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, refreshVisualizerVisual.Size.Y * (1 - (float)executionRatio));
                        infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, -refreshVisualizerVisual.Size.Y * (float)executionRatio);
                        break;
                    case RefreshPullDirection.LeftToRight:
                        refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, -(refreshVisualizerVisual.Size.X * (1 - (float)executionRatio)));
                        infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, refreshVisualizerVisual.Size.X * (float)executionRatio);
                        break;
                    case RefreshPullDirection.RightToLeft:
                        refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, refreshVisualizerVisual.Size.X * (1 - (float)executionRatio));
                        infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, -refreshVisualizerVisual.Size.X * (float)executionRatio);
                        break;
                }
                refreshRequestedAnimationNeedsUpdating = false;
            }

            if (refreshVisualizerRefreshRequestedAnimation != null && infoProviderRefreshRequestedAnimation != null)
            {
                string animatedProperty = GetAnimatedPropertyName();
                refreshVisualizerVisual.StartAnimation(animatedProperty, refreshVisualizerRefreshRequestedAnimation);
                infoProviderVisual.StartAnimation(animatedProperty, infoProviderRefreshRequestedAnimation);
            }
        }

void ValidateAndStoreParameters | ( | UIElement | refreshVisualizer,
 |  | UIElement | infoProvider,
 |  | InteractionTracker | interactionTracker |
 | ) |  |  | [inline, private]

Definition at line 210 of file AnimationHandler.cs.

        {
            if (refreshVisualizer != null && this.refreshVisualizer != refreshVisualizer)
            {
                refreshVisualizerVisual = ElementCompositionPreview.GetElementVisual(refreshVisualizer);
                this.refreshVisualizer = refreshVisualizer;
                interactionAnimationNeedsUpdating = true;
                refreshRequestedAnimationNeedsUpdating = true;
                refreshCompletedAnimationNeedsUpdating = true;

                if (compositor == null)
                {
                    compositor = refreshVisualizerVisual.Compositor;
                }

                ElementCompositionPreview.SetIsTranslationEnabled(refreshVisualizer, true);
            }

            if (infoProvider != null && this.infoProvider != infoProvider)
            {
                infoProviderVisual = ElementCompositionPreview.GetElementVisual(infoProvider);
                this.infoProvider = infoProvider;
                interactionAnimationNeedsUpdating = true;
                refreshRequestedAnimationNeedsUpdating = true;
                refreshCompletedAnimationNeedsUpdating = true;

                if (compositor == null)
                {
                    compositor = infoProviderVisual.Compositor;
                }

                ElementCompositionPreview.SetIsTranslationEnabled(infoProvider, true);
            }

            if (interactionTracker != null && this.interactionTracker != interactionTracker)
            {
                this.interactionTracker = interactionTracker;
                interactionAnimationNeedsUpdating = true;
                refreshRequestedAnimationNeedsUpdating = true;
                refreshCompletedAnimationNeedsUpdating = true;
            }
        }

Member Data Documentation

Compositor compositor [private]

Definition at line 20 of file AnimationHandler.cs.

UIElement infoProvider [private]

Definition at line 24 of file AnimationHandler.cs.

ExpressionAnimation infoProviderOffsetAnimation [private]

Definition at line 33 of file AnimationHandler.cs.

ScalarKeyFrameAnimation infoProviderRefreshCompletedAnimation [private]

Definition at line 37 of file AnimationHandler.cs.

ScalarKeyFrameAnimation infoProviderRefreshRequestedAnimation [private]

Definition at line 35 of file AnimationHandler.cs.

Visual infoProviderVisual [private]

Definition at line 25 of file AnimationHandler.cs.

bool interactionAnimationNeedsUpdating = true [private]

Definition at line 28 of file AnimationHandler.cs.

InteractionTracker interactionTracker [private]

Definition at line 26 of file AnimationHandler.cs.

bool refreshCompletedAnimationNeedsUpdating = true [private]

Definition at line 30 of file AnimationHandler.cs.

CompositionScopedBatch refreshCompletedScopedBatch [private]

Definition at line 39 of file AnimationHandler.cs.

RefreshPullDirection refreshPullDirection [private]

Definition at line 21 of file AnimationHandler.cs.

bool refreshRequestedAnimationNeedsUpdating = true [private]

Definition at line 29 of file AnimationHandler.cs.

UIElement refreshVisualizer [private]

Definition at line 22 of file AnimationHandler.cs.

ScalarKeyFrameAnimation refreshVisualizerRefreshCompletedAnimation [private]

Definition at line 36 of file AnimationHandler.cs.

ScalarKeyFrameAnimation refreshVisualizerRefreshRequestedAnimation [private]

Definition at line 34 of file AnimationHandler.cs.

Visual refreshVisualizerVisual [private]

Definition at line 23 of file AnimationHandler.cs.

ExpressionAnimation refreshVisualizerVisualOffsetAnimation [private]

Definition at line 32 of file AnimationHandler.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshContainer/TestUI/AnimationHandler.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarIScrollControllerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnnotatedScrollBarIScrollControllerPage
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

AnnotatedScrollBarIScrollControllerPage Class Reference

List of all members.

Public Member Functions

AnnotatedScrollBarIScrollControllerPage ()
void | AnnotatedScrollBar_DetailLabelRequested (object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)

Public Attributes

ObservableCollection
< AnnotatedScrollBarLabel > 		LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>()
ObservableCollection< Square > | SquareCollection = new ObservableCollection<Square>()

Private Member Functions

~AnnotatedScrollBarIScrollControllerPage ()
void | AnnotatedScrollBarPage_Loaded (object sender, RoutedEventArgs e)
string | GetOffsetLabel (double offset)
double | GetOffsetOfItem (int itemNumber)
string | GetSquareColor (int squareNum)
double | MOCK_GetItemsPerRow ()
double | MOCK_GetStaticRowHeight ()
void | PageAnnotatedScrollbar_Scrolling (AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args)
void | PageContentRepeater_Loaded (object sender, object e)
void | PopulateLabels ()
void | PopulateSquares (int rows)

Private Attributes

const int | c_SquareWidth = 100

Detailed Description

Definition at line 17 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

Constructor & Destructor Documentation

AnnotatedScrollBarIScrollControllerPage ( ) [inline]

Definition at line 24 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            this.InitializeComponent();
            PopulateSquares(200);
        }

~AnnotatedScrollBarIScrollControllerPage ( ) [inline, private]

Definition at line 30 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
        }

Member Function Documentation

void AnnotatedScrollBar_DetailLabelRequested | ( | object | sender,
 |  | AnnotatedScrollBarDetailLabelRequestedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 137 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            args.Content = GetOffsetLabel(args.ScrollOffset);
        }

void AnnotatedScrollBarPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 39 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            pageContentRepeater.ItemsSource = SquareCollection;
            pageContentRepeater.Loaded  += PageContentRepeater_Loaded;

           ScrollPresenter scrollPresenter = pageScrollView.GetValue(ScrollView.ScrollPresenterProperty) as ScrollPresenter;
            scrollPresenter.VerticalScrollController = pageAnnotatedScrollbar as IScrollController;

            pageAnnotatedScrollbar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequested;
            pageAnnotatedScrollbar.Scrolling += PageAnnotatedScrollbar_Scrolling;
        }

string GetOffsetLabel ( double offset ) [inline, private]

Definition at line 86 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            if (offset <= GetOffsetOfItem(30))
            {
                return GetSquareColor(30);
            }
            else if (offset <= GetOffsetOfItem(80))
            {
                return GetSquareColor(80);
            }
            else if (offset <= GetOffsetOfItem(190))
            {
                return GetSquareColor(190);
            }
            else
            {
                return GetSquareColor(191);
            }
        }

double GetOffsetOfItem ( int itemNumber ) [inline, private]

Definition at line 122 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            return MOCK_GetStaticRowHeight() * itemNumber / MOCK_GetItemsPerRow();
        }

string GetSquareColor ( int squareNum ) [inline, private]

Definition at line 66 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            if (squareNum <= 30)
            {
                return "Violet";
            }
            else if (squareNum <= 80)
            {
                return "LightBlue";
            }
            else if (squareNum <= 190)
            {
                return "Green";
            }
            else
            {
                return "Red";
            }
        }

double MOCK_GetItemsPerRow ( ) [inline, private]

Definition at line 111 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            if(pageScrollView != null)
            {
                var totalItemWidth = c_SquareWidth + 20*2 /*margin*/;
                var itemsPerRow = pageScrollView.ActualWidth / totalItemWidth;
                return (int)itemsPerRow;
            }
            return 5;
        }

double MOCK_GetStaticRowHeight ( ) [inline, private]

Definition at line 106 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            return 140;
        }

void PageAnnotatedScrollbar_Scrolling | ( | AnnotatedScrollBar | sender,
 |  | AnnotatedScrollBarScrollingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 51 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            var test = args.ScrollOffset;
        }

void PageContentRepeater_Loaded | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            PopulateLabels();
        }

void PopulateLabels ( ) [inline, private]

Definition at line 127 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            pageAnnotatedScrollbar.Labels.Clear();

            pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Violet", GetOffsetOfItem(0)));
            pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Blue", GetOffsetOfItem(30)));
            pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Green", GetOffsetOfItem(80)));
            pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Red", GetOffsetOfItem(190)));
        }

void PopulateSquares ( int rows ) [inline, private]

Definition at line 56 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

        {
            for (int i = 0; i < rows; i++)
            {
                string squareName = "Item: " + i;
                // double itemWidth = (i % 2 == 0) ? c_SquareWidth : c_SquareWidth;
                SquareCollection.Add(new Square() { Name = squareName, Color = GetSquareColor(i), Width = c_SquareWidth });
            }
        }

Member Data Documentation

const int c_SquareWidth = 100 [private]

Definition at line 22 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

ObservableCollection<AnnotatedScrollBarLabel> LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>()

Definition at line 20 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

ObservableCollection<Square> SquareCollection = new ObservableCollection<Square>()

Definition at line 19 of file AnnotatedScrollBarIScrollControllerPage.xaml.cs.

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/TestUI/AnnotatedScrollBarIScrollControllerPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnnotatedScrollBarPage
Public Member Functions | Private Member Functions

AnnotatedScrollBarPage Class Reference

List of all members.

Public Member Functions

AnnotatedScrollBarPage ()

Private Member Functions

void CmbAnnotatedScrollBarOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 15 of file AnnotatedScrollBarPage.xaml.cs.

Constructor & Destructor Documentation

AnnotatedScrollBarPage ( ) [inline]

Definition at line 17 of file AnnotatedScrollBarPage.xaml.cs.

        {
            LogController.InitializeLogging();
            this.InitializeComponent();

            navigateToSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AnnotatedScrollBarSummaryPage), 0); };
            navigateToIScrollController.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AnnotatedScrollBarIScrollControllerPage), 0); };
            navigateToRangeBase.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AnnotatedScrollBarRangeBasePage), 0); };
        }

Member Function Documentation

void CmbAnnotatedScrollBarOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 27 of file AnnotatedScrollBarPage.xaml.cs.

        {
           MUXControlsTestHooks.SetOutputDebugStringLevelForType(
               "AnnotatedScrollBar",
               cmbAnnotatedScrollBarOutputDebugStringLevel.SelectedIndex == 1 || cmbAnnotatedScrollBarOutputDebugStringLevel.SelectedIndex == 2,
               cmbAnnotatedScrollBarOutputDebugStringLevel.SelectedIndex == 2);
        }

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/TestUI/AnnotatedScrollBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarRangeBasePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnnotatedScrollBarRangeBasePage
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

AnnotatedScrollBarRangeBasePage Class Reference

List of all members.

Public Member Functions

AnnotatedScrollBarRangeBasePage ()
void | AnnotatedScrollBar_DetailLabelRequested (object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)

Public Attributes

ObservableCollection
< AnnotatedScrollBarLabel > 		LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>()
ObservableCollection< Square > | SquareCollection = new ObservableCollection<Square>()

Private Member Functions

~AnnotatedScrollBarRangeBasePage ()
void | AnnotatedScrollBarRangeBasePage_Loaded (object sender, RoutedEventArgs e)
string | GetOffsetLabel (double offset)
double | GetOffsetOfItem (int itemNumber)
string | GetSquareColor (int squareNum)
double | MOCK_GetItemsPerRow ()
double | MOCK_GetStaticRowHeight ()
void | PopulateLabels ()
void | PopulateSquares (int rows)

Private Attributes

IScrollControllerAdapter | adapter = null

Detailed Description

Definition at line 78 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

Constructor & Destructor Documentation

AnnotatedScrollBarRangeBasePage ( ) [inline]

Definition at line 85 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            this.InitializeComponent();

            adapter = new IScrollControllerAdapter(pageScrollViewer, pageAnnotatedScrollBar.ScrollController);

            PopulateSquares(200);

            Loaded += AnnotatedScrollBarRangeBasePage_Loaded;
        }

~AnnotatedScrollBarRangeBasePage ( ) [inline, private]

Definition at line 96 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
        }

Member Function Documentation

void AnnotatedScrollBar_DetailLabelRequested | ( | object | sender,
 |  | AnnotatedScrollBarDetailLabelRequestedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 175 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            args.Content = GetOffsetLabel(args.ScrollOffset);
        }

void AnnotatedScrollBarRangeBasePage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 180 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            pageAnnotatedScrollBar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequested;
            PopulateLabels();
        }

string GetOffsetLabel ( double offset ) [inline, private]

Definition at line 130 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            if (offset <= GetOffsetOfItem(30))
            {
                return GetSquareColor(30);
            }
            else if (offset <= GetOffsetOfItem(80))
            {
                return GetSquareColor(80);
            }
            else if (offset <= GetOffsetOfItem(190))
            {
                return GetSquareColor(190);
            }
            else
            {
                return GetSquareColor(191);
            }
        }

double GetOffsetOfItem ( int itemNumber ) [inline, private]

Definition at line 160 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            return MOCK_GetStaticRowHeight() * itemNumber / MOCK_GetItemsPerRow();
        }

string GetSquareColor ( int squareNum ) [inline, private]

Definition at line 110 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            if(squareNum <= 30)
            {
                return "Violet";
            }
            else if (squareNum <= 80)
            {
                return "Blue";
            }
            else if (squareNum <= 190)
            {
                return "Green";
            }
            else
            {
                return "Red";
            }
        }

double MOCK_GetItemsPerRow ( ) [inline, private]

Definition at line 155 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            return 5;
        }

double MOCK_GetStaticRowHeight ( ) [inline, private]

Definition at line 150 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            return 140;
        }

void PopulateLabels ( ) [inline, private]

Definition at line 165 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            pageAnnotatedScrollBar.Labels.Clear();

            pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Violet", GetOffsetOfItem(0)));
            pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Blue", GetOffsetOfItem(30)));
            pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Green", GetOffsetOfItem(80)));
            pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Red", GetOffsetOfItem(190)));
        }

void PopulateSquares ( int rows ) [inline, private]

Definition at line 100 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            for (int i = 0; i < rows; i++)
            {
                string squareName = "Item: " + i;
                double itemWidth = (i % 2 == 0) ? 100 : 100;
                SquareCollection.Add(new Square() { Name = squareName, Color = GetSquareColor(i), Width = itemWidth });
            }
        }

Member Data Documentation

IScrollControllerAdapter adapter = null [private]

Definition at line 83 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

ObservableCollection<AnnotatedScrollBarLabel> LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>()

Definition at line 81 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

ObservableCollection<Square> SquareCollection = new ObservableCollection<Square>()

Definition at line 80 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/TestUI/AnnotatedScrollBarRangeBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarSummaryPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AnnotatedScrollBarSummaryPage
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

AnnotatedScrollBarSummaryPage Class Reference

List of all members.

Public Member Functions

AnnotatedScrollBarSummaryPage ()
void | AnnotatedScrollBar_DetailLabelRequested (object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)

Public Attributes

ObservableCollection
< AnnotatedScrollBarLabel > 		LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>()
ObservableCollection< Square > | SquareCollection = new ObservableCollection<Square>()

Private Member Functions

~AnnotatedScrollBarSummaryPage ()
void | AnnotatedScrollbar_Scrolling (AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args)
void | AnnotatedScrollBarPage_Loaded (object sender, RoutedEventArgs e)
void | BtnGetDetailLabelContent_Click (object sender, RoutedEventArgs e)
void | BtnGetLastRequestedDetailLabelOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetMaximum_Click (object sender, RoutedEventArgs e)
void | BtnGetMinimum_Click (object sender, RoutedEventArgs e)
void | BtnGetNumLabels_Click (object sender, RoutedEventArgs e)
void | BtnGetOffsetBetweenLabels_Click (object sender, RoutedEventArgs e)
void | BtnGetSmallChange_Click (object sender, RoutedEventArgs e)
void | BtnGetValue_Click (object sender, RoutedEventArgs e)
void | BtnGetViewportSize_Click (object sender, RoutedEventArgs e)
void | BtnPrePopulateLabels_Click (object sender, RoutedEventArgs e)
void | BtnSetDetailLabelContent_Click (object sender, RoutedEventArgs e)
void | BtnSetMaximum_Click (object sender, RoutedEventArgs e)
void | BtnSetMinimum_Click (object sender, RoutedEventArgs e)
void | BtnSetNumLabels_Click (object sender, RoutedEventArgs e)
void | BtnSetOffsetBetweenLabels_Click (object sender, RoutedEventArgs e)
void | BtnSetSmallChange_Click (object sender, RoutedEventArgs e)
void | BtnSetViewportSize_Click (object sender, RoutedEventArgs e)
void | cancelScrollingEvent_Checked (object sender, RoutedEventArgs e)
void | cancelScrollingEvent_Unchecked (object sender, RoutedEventArgs e)
void | CmbDetailLabelTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsSource_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLabelTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
string | GetSquareColor (int squareNum)
void | isDetailLabelEnabled_Checked (object sender, RoutedEventArgs e)
void | isDetailLabelEnabled_Unchecked (object sender, RoutedEventArgs e)
void | PopulateLabels (int numLabels, double offsetBetweenLabels)
void | PopulateSquares (int rows)
void | useLongLabelContent_Checked (object sender, RoutedEventArgs e)
void | useLongLabelContent_Unchecked (object sender, RoutedEventArgs e)

Private Attributes

bool | _cancelScrolling = false
string | _detailLabelContent = null
double | _lastRequestedDetailLabelOffset = 0
double | _lastScrollOffset = 0.0
int | _numLabels = 0
double | _offsetBetweenLabels = 100
bool | _useLongLabels = false

Detailed Description

Definition at line 24 of file AnnotatedScrollBarSummaryPage.xaml.cs.

Constructor & Destructor Documentation

AnnotatedScrollBarSummaryPage ( ) [inline]

Definition at line 37 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += AnnotatedScrollBarPage_Loaded;

            pageAnnotatedScrollbar.Scrolling += AnnotatedScrollbar_Scrolling;

            PopulateSquares(200);
        }

~AnnotatedScrollBarSummaryPage ( ) [inline, private]

Definition at line 48 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
        }

Member Function Documentation

void AnnotatedScrollBar_DetailLabelRequested | ( | object | sender,
 |  | AnnotatedScrollBarDetailLabelRequestedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 113 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            _lastRequestedDetailLabelOffset = args.ScrollOffset;
            args.Content = _detailLabelContent;
        }

void AnnotatedScrollbar_Scrolling | ( | AnnotatedScrollBar | sender,
 |  | AnnotatedScrollBarScrollingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 153 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            args.Cancel = _cancelScrolling;
            _lastScrollOffset = args.ScrollOffset;
        }

void AnnotatedScrollBarPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 52 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            pageScrollView.VerticalScrollBarVisibility = ScrollingScrollBarVisibility.Hidden;
            ScrollPresenter scrollPresenter = pageScrollView.GetValue(ScrollView.ScrollPresenterProperty) as ScrollPresenter;
            scrollPresenter.VerticalScrollController = pageAnnotatedScrollbar as IScrollController;
        }

void BtnGetDetailLabelContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 253 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if (pageAnnotatedScrollbar != null)
            {
                txtDetailLabelContent.Text = _detailLabelContent;
            }
        }

void BtnGetLastRequestedDetailLabelOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 307 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            txtLastRequestedDetailLabelOffset.Text = _lastRequestedDetailLabelOffset.ToString();
        }

void BtnGetMaximum_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 282 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            txtMaximum.Text = pageScrollView.ScrollableHeight.ToString();
        }

void BtnGetMinimum_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 274 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
        }

void BtnGetNumLabels_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 219 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(pageAnnotatedScrollbar != null)
            {
                txtNumLabels.Text = pageAnnotatedScrollbar.Labels.Count.ToString();
            }
        }

void BtnGetOffsetBetweenLabels_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 236 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(pageAnnotatedScrollbar != null)
            {
                txtOffsetBetweenLabels.Text = _offsetBetweenLabels.ToString();
            }
        }

void BtnGetSmallChange_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 291 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(pageAnnotatedScrollbar != null)
            {
                txtSmallChange.Text = pageAnnotatedScrollbar.SmallChange.ToString();
            }
        }

void BtnGetValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 269 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            txtValue.Text = _lastScrollOffset.ToString();
        }

void BtnGetViewportSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 202 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(txtViewportSize != null)
            {
                txtViewportSize.Text = pageScrollView.ViewportHeight.ToString();
            }
        }

void BtnPrePopulateLabels_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 104 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if (pageAnnotatedScrollbar != null)
            {
                pageAnnotatedScrollbar.Labels.Clear();
                PopulateLabels(20, 200);
            }
        }

void BtnSetDetailLabelContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 261 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if (pageAnnotatedScrollbar != null)
            {
                _detailLabelContent = txtDetailLabelContent.Text;
            }
        }

void BtnSetMaximum_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 287 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
        }

void BtnSetMinimum_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 278 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
        }

void BtnSetNumLabels_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 227 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(pageAnnotatedScrollbar != null)
            {
                _numLabels = Convert.ToInt16(txtNumLabels.Text);
                PopulateLabels(_numLabels, _offsetBetweenLabels);
            }
        }

void BtnSetOffsetBetweenLabels_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 244 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(pageAnnotatedScrollbar != null)
            {
                _offsetBetweenLabels = Convert.ToDouble(txtOffsetBetweenLabels.Text);
                PopulateLabels(_numLabels, _offsetBetweenLabels);
            }
        }

void BtnSetSmallChange_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 299 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(pageAnnotatedScrollbar != null)
            {
                pageAnnotatedScrollbar.SmallChange = Convert.ToDouble(txtSmallChange.Text);
            }
        }

void BtnSetViewportSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 210 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if(pageAnnotatedScrollbar != null)
            {
                // pageAnnotatedScrollbar.ViewportSize = Convert.ToDouble(txtViewportSize.Text);
                //pageScrollView.ViewportHeight = Convert.ToDouble(txtViewportSize.Text);
            }
        }

void cancelScrollingEvent_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 143 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            _cancelScrolling = true;
        }

void cancelScrollingEvent_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 148 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            _cancelScrolling = false;
        }

void CmbDetailLabelTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 169 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            switch (cmbDetailLabelTemplate.SelectedIndex)
            {
                case 0:
                    pageAnnotatedScrollbar.DetailLabelTemplate = Resources["DetailLabelTemplate_TextBlock"] as DataTemplate;
                    break;
            }
        }

void CmbItemsSource_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 189 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            switch (cmbItemsSource.SelectedIndex)
            {
                case 0:
                    pageContentRepeater.ItemsSource = null;
                    break;
                case 1:
                    pageContentRepeater.ItemsSource = SquareCollection;
                    break;
            }
        }

void CmbItemTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 179 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            switch (cmbItemTemplate.SelectedIndex)
            {
                case 0:
                    pageContentRepeater.ItemTemplate = Resources["SquareTemplate"] as DataTemplate;
                    break;
            }
        }

void CmbLabelTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 159 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            switch (cmbLabelTemplate.SelectedIndex)
            {
                case 0:
                    pageAnnotatedScrollbar.LabelTemplate = Resources["LabelTemplate_TextBlock"] as DataTemplate;
                    break;
            }
        }

string GetSquareColor ( int squareNum ) [inline, private]

Definition at line 69 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            if (squareNum <= 30)
            {
                return "Violet";
            }
            else if (squareNum <= 80)
            {
                return "Blue";
            }
            else if (squareNum <= 190)
            {
                return "Green";
            }
            else
            {
                return "Red";
            }
        }

void isDetailLabelEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 119 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            pageAnnotatedScrollbar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequested;
        }

void isDetailLabelEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 124 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            pageAnnotatedScrollbar.DetailLabelRequested -= AnnotatedScrollBar_DetailLabelRequested;
        }

void PopulateLabels | ( | int | numLabels,
 |  | double | offsetBetweenLabels |
 | ) |  |  | [inline, private]

Definition at line 89 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            pageAnnotatedScrollbar.Labels.Clear();

            var labelPrefix = _useLongLabels ? "ThisIsALongLabelWhichShouldExpandASB " : "Num ";

            double currentLabelOffset = 0;
            for(int i = 0; i < numLabels; i++)
            {
                var labelString = labelPrefix + i;
                pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel(labelString, currentLabelOffset));
                currentLabelOffset += offsetBetweenLabels;
            }
        }

void PopulateSquares ( int rows ) [inline, private]

Definition at line 59 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            for (int i = 0; i < rows; i++)
            {
                string squareName = "Item: " + i;
                double itemWidth = (i % 2 == 0) ? 100 : 100;
                SquareCollection.Add(new Square() { Name = squareName, Color = GetSquareColor(i), Width = itemWidth });
            }
        }

void useLongLabelContent_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 129 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            _useLongLabels = true;
            _numLabels = 1;
            PopulateLabels(_numLabels, _offsetBetweenLabels);
        }

void useLongLabelContent_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 136 of file AnnotatedScrollBarSummaryPage.xaml.cs.

        {
            _useLongLabels = false;
            _numLabels = 1;
            PopulateLabels(_numLabels, _offsetBetweenLabels);
        }

Member Data Documentation

bool _cancelScrolling = false [private]

Definition at line 34 of file AnnotatedScrollBarSummaryPage.xaml.cs.

string _detailLabelContent = null [private]

Definition at line 32 of file AnnotatedScrollBarSummaryPage.xaml.cs.

double _lastRequestedDetailLabelOffset = 0 [private]

Definition at line 31 of file AnnotatedScrollBarSummaryPage.xaml.cs.

double _lastScrollOffset = 0.0 [private]

Definition at line 35 of file AnnotatedScrollBarSummaryPage.xaml.cs.

int _numLabels = 0 [private]

Definition at line 30 of file AnnotatedScrollBarSummaryPage.xaml.cs.

double _offsetBetweenLabels = 100 [private]

Definition at line 29 of file AnnotatedScrollBarSummaryPage.xaml.cs.

bool _useLongLabels = false [private]

Definition at line 33 of file AnnotatedScrollBarSummaryPage.xaml.cs.

ObservableCollection<AnnotatedScrollBarLabel> LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>()

Definition at line 27 of file AnnotatedScrollBarSummaryPage.xaml.cs.

ObservableCollection<Square> SquareCollection = new ObservableCollection<Square>()

Definition at line 26 of file AnnotatedScrollBarSummaryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/TestUI/AnnotatedScrollBarSummaryPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AppBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AppBarPage
Public Member Functions | Private Member Functions

AppBarPage Class Reference

List of all members.

Public Member Functions

AppBarPage ()

Private Member Functions

void | CmbClosedDisplayMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbIsOpen_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLabelPosition_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 12 of file AppBarPage.xaml.cs.

Constructor & Destructor Documentation

AppBarPage ( ) [inline]

Definition at line 14 of file AppBarPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void CmbClosedDisplayMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file AppBarPage.xaml.cs.

        {
            if (cmbClosedDisplayMode == null) return;

            AppBarClosedDisplayMode closedDisplayMode = (AppBarClosedDisplayMode)cmbClosedDisplayMode.SelectedIndex;

            abA.ClosedDisplayMode =
            abB.ClosedDisplayMode = closedDisplayMode;
        }

void CmbIsOpen_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 43 of file AppBarPage.xaml.cs.

        {
            if (cmbIsOpen == null) return;

            bool isOpen = cmbIsOpen.SelectedIndex == 1;

            abA.IsOpen =
            abB.IsOpen = isOpen;
        }

void CmbLabelPosition_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file AppBarPage.xaml.cs.

        {
            if (cmbLabelPosition == null) return;

            CommandBarLabelPosition labelPosition = (CommandBarLabelPosition)cmbLabelPosition.SelectedIndex;

            abbA1.LabelPosition =
            abbA2.LabelPosition =
            abbA3.LabelPosition =
            abbB1.LabelPosition =
            abbB2.LabelPosition =
            abbB3.LabelPosition = labelPosition;
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/AppBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBoxPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • AutoSuggestBoxPage
Public Member Functions | Private Member Functions | Private Attributes

AutoSuggestBoxPage Class Reference

List of all members.

Public Member Functions

AutoSuggestBoxPage ()

Private Member Functions

void | AutoSuggestBox_QuerySubmitted (Microsoft.UI.Xaml.Controls.AutoSuggestBox sender, Microsoft.UI.Xaml.Controls.AutoSuggestBoxQuerySubmittedEventArgs args)

Private Attributes

string[] | suggestions

Detailed Description

Definition at line 8 of file AutoSuggestBoxPage.xaml.cs.

Constructor & Destructor Documentation

AutoSuggestBoxPage ( ) [inline]

Definition at line 19 of file AutoSuggestBoxPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void AutoSuggestBox_QuerySubmitted | ( | Microsoft.UI.Xaml.Controls.AutoSuggestBox | sender,
 |  | Microsoft.UI.Xaml.Controls.AutoSuggestBoxQuerySubmittedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 24 of file AutoSuggestBoxPage.xaml.cs.

        {
            sender.ItemsSource = string.IsNullOrWhiteSpace(args.QueryText) ? null : suggestions;
        }

Member Data Documentation

string [] suggestions [private]
Initial value:
        {
            "Lorem",
            "ipsum",
            "dolor",
            "sit",
            "amet"
        }

Definition at line 10 of file AutoSuggestBoxPage.xaml.cs.

The documentation for this class was generated from the following file:
  • AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BlankPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • BlankPage
Public Member Functions

BlankPage Class Reference

List of all members.

Public Member Functions

BlankPage ()

Detailed Description

Definition at line 17 of file BlankPage.xaml.cs.

Constructor & Destructor Documentation

BlankPage ( ) [inline]

Definition at line 19 of file BlankPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/BlankPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BorderThicknessPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • BorderThicknessPage
Public Member Functions

BorderThicknessPage Class Reference

List of all members.

Public Member Functions

BorderThicknessPage ()

Detailed Description

Definition at line 7 of file BorderThicknessPage.xaml.cs.

Constructor & Destructor Documentation

BorderThicknessPage ( ) [inline]

Definition at line 9 of file BorderThicknessPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/BorderThicknessPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • BreadcrumbBarAxeTestPage
Public Member Functions | Properties

BreadcrumbBarAxeTestPage Class Reference

List of all members.

Public Member Functions

BreadcrumbBarAxeTestPage ()

Properties

ObservableCollection< object > breadCrumbList [get]

Detailed Description

Definition at line 8 of file BreadcrumbBarAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

BreadcrumbBarAxeTestPage ( ) [inline]

Definition at line 12 of file BreadcrumbBarAxeTestPage.xaml.cs.

        {
            for(int i = 0; i < 10; i++)
            {
                breadCrumbList.Add("Item " + i);
            }
            this.InitializeComponent();
        }

Property Documentation

ObservableCollection<object> breadCrumbList [get]

Definition at line 10 of file BreadcrumbBarAxeTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Breadcrumb/TestUI/BreadcrumbBarAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarFolder Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • BreadcrumbBarFolder
Properties

BreadcrumbBarFolder Class Reference

List of all members.

Properties

SolidColorBrush | Background [get, set]
SolidColorBrush | Foreground [get, set]
string | Name [get, set]

Detailed Description

Definition at line 16 of file VisualPropertiesPage.xaml.cs.

Property Documentation

SolidColorBrush Background [get, set]

Definition at line 20 of file VisualPropertiesPage.xaml.cs.

SolidColorBrush Foreground [get, set]

Definition at line 19 of file VisualPropertiesPage.xaml.cs.

string Name [get, set]

Definition at line 18 of file VisualPropertiesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/VisualPropertiesPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • BreadcrumbBarPage
Public Member Functions | Properties | Private Member Functions | Private Attributes

BreadcrumbBarPage Class Reference

List of all members.

Public Member Functions

BreadcrumbBarPage ()

Properties

ObservableCollection< object > | breadCrumbList [get]
ObservableCollection< object > | currentNodeChildrenList = new ObservableCollection<object>() [get]

Private Member Functions

void | BreadcrumbControl_ItemClicked (BreadcrumbBar sender, Microsoft.UI.Xaml.Controls.BreadcrumbBarItemClickedEventArgs args)
void | Child_ElementPrepared (object sender, ItemsRepeaterElementPreparedEventArgs e)
void | CreateChildrenForNode (TreeNode node, int depth)
void | GenerateTree ()
void | GenerateTreeDynamic ()
void | InitializeBreadcrumbAndChildren ()
void | ItemsRepeater_ButtonClick (object sender, RoutedEventArgs e)
void | ReplaceList (ObservableCollection< object > oldItemsList, List< object > newItemsList)
void | RTL_Checked (object sender, RoutedEventArgs e)
void | RTL_Unchecked (object sender, RoutedEventArgs e)
void | UpdateChildrenList (TreeNode node)
void | WidthSlider_ValueChanged (object sender, RangeBaseValueChangedEventArgs e)

Private Attributes

const int | maxDepth = new ObservableCollection<object>() 7
TreeStructure | Tree = new TreeStructure()

Detailed Description

Definition at line 18 of file BreadcrumbBarPage.xaml.cs.

Constructor & Destructor Documentation

BreadcrumbBarPage ( ) [inline]

Definition at line 27 of file BreadcrumbBarPage.xaml.cs.

        {
            this.InitializeComponent();
            InitializeBreadcrumbAndChildren();
        }

Member Function Documentation

void BreadcrumbControl_ItemClicked | ( | BreadcrumbBar | sender,
 |  | Microsoft.UI.Xaml.Controls.BreadcrumbBarItemClickedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 190 of file BreadcrumbBarPage.xaml.cs.

        {
            LastClickedItem.Text = args.Item.ToString();
            LastClickedItemIndex.Text = args.Index.ToString();

            if (args.Item is TreeNode treeNode)
            {
                ReplaceList(breadCrumbList, treeNode.GetBreadCrumbPath());
                UpdateChildrenList(treeNode);
            }
        }

void Child_ElementPrepared | ( | object | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 202 of file BreadcrumbBarPage.xaml.cs.

        {
            Button button = e.Element as Button;
            TreeNode node = (currentNodeChildrenList.ToArray<object>().GetValue(e.Index) as TreeNode);

            button.Name = node.Name;
        }

void CreateChildrenForNode | ( | TreeNode | node,
 |  | int | depth |
 | ) |  |  | [inline, private]

Definition at line 119 of file BreadcrumbBarPage.xaml.cs.

        {
            if (depth > maxDepth)
            {
                return;
            }

            node.Children = new List<object>();

            for (int i = 0; i < 3; ++i)
            {
                string nodeName = "";
                if (depth == 1)
                {
                    // This will yield stuff as 'Node A' or 'Node B'
                    nodeName = "Node " + (char)('A' + i);
                }
                else
                {
                    nodeName = node.Name + "_" + (i + 1);
                }

                TreeNode child = new TreeNode() { Name = nodeName };
                node.Children.Add(child);
                CreateChildrenForNode(child, depth + 1);
            }
        }

void GenerateTree ( ) [inline, private]

Definition at line 42 of file BreadcrumbBarPage.xaml.cs.

        {
            Tree.Root = new TreeNode() {
                Name = "Root",
                Children = new List<object>()
                {
                    new TreeNode()
                    {
                        Name = "A1",
                        Children = new List<object>()
                        {
                            new TreeNode()
                            {
                                Name = "Nested A1"
                            },
                            new TreeNode()
                            {
                                Name = "Nested A2"
                            },
                            new TreeNode()
                            {
                                Name = "Nested A3"
                            },
                        }
                    },
                    new TreeNode()
                    {
                        Name = "B1",
                        Children = new List<object>()
                        {
                            new TreeNode()
                            {
                                Name = "Nested B1"
                            },
                            new TreeNode()
                            {
                                Name = "Nested B2"
                            },
                            new TreeNode()
                            {
                                Name = "Nested B3"
                            },
                        }
                    },
                    new TreeNode()
                    {
                        Name = "C1",
                        Children = new List<object>()
                        {
                            new TreeNode()
                            {
                                Name = "Nested C1"
                            },
                            new TreeNode()
                            {
                                Name = "Nested C2"
                            },
                            new TreeNode()
                            {
                                Name = "Nested C3"
                            },
                        }
                    }
                }
            };

            Tree.UpdateParents();
        }

void GenerateTreeDynamic ( ) [inline, private]

Definition at line 111 of file BreadcrumbBarPage.xaml.cs.

        {
            Tree.Root = new TreeNode() { Name = "Root" };
            CreateChildrenForNode(Tree.Root, 1);

            Tree.UpdateParents();
        }

void InitializeBreadcrumbAndChildren ( ) [inline, private]

Definition at line 33 of file BreadcrumbBarPage.xaml.cs.

        {
            // GenerateTree();
            GenerateTreeDynamic();

            breadCrumbList.Add(Tree.Root);
            UpdateChildrenList(Tree.Root);
        }

void ItemsRepeater_ButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 147 of file BreadcrumbBarPage.xaml.cs.

        {
            Button btn = sender as Button;
            TreeNode treeNode = btn.Content as TreeNode;
            ReplaceList(breadCrumbList, treeNode.GetBreadCrumbPath());
            UpdateChildrenList(treeNode);
        }

void ReplaceList | ( | ObservableCollection< object > | oldItemsList,
 |  | List< object > | newItemsList |
 | ) |  |  | [inline, private]

Definition at line 175 of file BreadcrumbBarPage.xaml.cs.

        {
            oldItemsList.Clear();

            foreach (object child in newItemsList)
            {
                oldItemsList.Add(child);
            }
        }

void RTL_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 165 of file BreadcrumbBarPage.xaml.cs.

        {
            BreadcrumbControl.FlowDirection = FlowDirection.RightToLeft;
        }

void RTL_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 170 of file BreadcrumbBarPage.xaml.cs.

        {
            BreadcrumbControl.FlowDirection = FlowDirection.LeftToRight;
        }

void UpdateChildrenList ( TreeNode node ) [inline, private]

Definition at line 185 of file BreadcrumbBarPage.xaml.cs.

        {
            ReplaceList(currentNodeChildrenList, node.Children);
        }

void WidthSlider_ValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 155 of file BreadcrumbBarPage.xaml.cs.

        {
            if (BreadcrumbContainerColumn == null)
            {
                return;
            }

            BreadcrumbContainerColumn.Width = new GridLength(e.NewValue, GridUnitType.Pixel);
        }

Member Data Documentation

const int maxDepth = new ObservableCollection<object>() 7 [private]

Definition at line 25 of file BreadcrumbBarPage.xaml.cs.

TreeStructure Tree = new TreeStructure() [private]

Definition at line 20 of file BreadcrumbBarPage.xaml.cs.

Property Documentation

ObservableCollection<object> breadCrumbList [get]

Definition at line 21 of file BreadcrumbBarPage.xaml.cs.

ObservableCollection<object> currentNodeChildrenList = new ObservableCollection<object>() [get]

Definition at line 23 of file BreadcrumbBarPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Breadcrumb/TestUI/BreadcrumbBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Bridge Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Bridge
Public Member Functions | Properties | Private Attributes

Bridge Class Reference

List of all members.

Public Member Functions

string | Func (string param)

Properties

BridgeAnotherClass | AnotherObject [get, set]
string | this [int index] = new BridgeAnotherClass() [get, set]

Private Attributes

Dictionary< int, string > | m_dictionary = new Dictionary<int, string>()

Detailed Description

Definition at line 2432 of file WebView2BasicPage.xaml.cs.

Member Function Documentation

string Func ( string param ) [inline]

Definition at line 2434 of file WebView2BasicPage.xaml.cs.

        {
            return "Example: " + param;
        }

Member Data Documentation

Dictionary<int, string> m_dictionary = new Dictionary<int, string>() [private]

Definition at line 2448 of file WebView2BasicPage.xaml.cs.

Property Documentation

BridgeAnotherClass AnotherObject [get, set]

Definition at line 2439 of file WebView2BasicPage.xaml.cs.

string this[int index] = new BridgeAnotherClass() [get, set]

Definition at line 2444 of file WebView2BasicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2BasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BridgeAnotherClass Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • BridgeAnotherClass
Properties

BridgeAnotherClass Class Reference

List of all members.

Properties

string Prop [get, set]

Detailed Description

Definition at line 2422 of file WebView2BasicPage.xaml.cs.

Property Documentation

string Prop [get, set]

Definition at line 2425 of file WebView2BasicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2BasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteractionPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ButtonInteractionPage
Public Member Functions | Properties | Private Member Functions | Private Attributes

ButtonInteractionPage Class Reference

List of all members.

Public Member Functions

ButtonInteractionPage ()

Properties

ButtonInteraction | Interaction [get, set]

Private Member Functions

void | OnInteractionPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
void | OnInvokeModeChanged (object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
void | OnResetInvokeCountClick (object sender, RoutedEventArgs e)
void | OnTargetElementInvoked (ButtonInteraction sender, ButtonInteractionInvokedEventArgs args)
void | UpdateRectVisualState ()

Private Attributes

uint | _invokeCount = 0

Detailed Description

Definition at line 16 of file ButtonInteractionPage.xaml.cs.

Constructor & Destructor Documentation

ButtonInteractionPage ( ) [inline]

Definition at line 20 of file ButtonInteractionPage.xaml.cs.

        {
            this.InitializeComponent();

            Interaction = new ButtonInteraction();
            Interaction.Invoked += OnTargetElementInvoked;
            Interaction.PropertyChanged += OnInteractionPropertyChanged;

            targetElement.Interactions.Add(Interaction);
        }

Member Function Documentation

void OnInteractionPropertyChanged | ( | object | sender,
 |  | System.ComponentModel.PropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file ButtonInteractionPage.xaml.cs.

        {
            if (e.PropertyName == "IsPressing")
            {
                UpdateRectVisualState();
                isPressingTB.Text = Interaction.IsPressing ? "True" : "False";
            }
            else if (e.PropertyName == "IsHovering")
            {
                UpdateRectVisualState();
                isHoveringTB.Text = Interaction.IsHovering ? "True" : "False";
            }
        }

void OnInvokeModeChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file ButtonInteractionPage.xaml.cs.

        {
            if (Interaction != null)
            {
                Interaction.InvokeMode = (ButtonInteractionInvokeMode)invokeModeCB.SelectedIndex;
            }
        }

void OnResetInvokeCountClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file ButtonInteractionPage.xaml.cs.

        {
            _invokeCount = 0;
            invokeCountTB.Text = "0";
        }

void OnTargetElementInvoked | ( | ButtonInteraction | sender,
 |  | ButtonInteractionInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 65 of file ButtonInteractionPage.xaml.cs.

        {
            invokeCountTB.Text = string.Format("{0}", ++_invokeCount);
        }

void UpdateRectVisualState ( ) [inline, private]

Definition at line 70 of file ButtonInteractionPage.xaml.cs.

        {
            if (Interaction.IsPressing)
            {
                rect.Fill = new SolidColorBrush(Microsoft.UI.Colors.YellowGreen);
            }
            else if (Interaction.IsHovering)
            {
                rect.Fill = new SolidColorBrush(Microsoft.UI.Colors.OrangeRed);
            }
            else
            {
                rect.Fill = new SolidColorBrush(Microsoft.UI.Colors.Orange);
            }
        }

Member Data Documentation

uint _invokeCount = 0 [private]

Definition at line 18 of file ButtonInteractionPage.xaml.cs.

Property Documentation

ButtonInteraction Interaction [get, set]

Definition at line 32 of file ButtonInteractionPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Interactions/ButtonInteraction/TestUI/ButtonInteractionPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CalendarDatePickerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CalendarDatePickerPage
Public Member Functions

CalendarDatePickerPage Class Reference

List of all members.

Public Member Functions

CalendarDatePickerPage ()

Detailed Description

Definition at line 7 of file CalendarDatePickerPage.xaml.cs.

Constructor & Destructor Documentation

CalendarDatePickerPage ( ) [inline]

Definition at line 9 of file CalendarDatePickerPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CalendarDatePickerPage.xaml.cs
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CalendarViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CalendarViewPage
Public Member Functions | Private Member Functions | Private Attributes

CalendarViewPage Class Reference

List of all members.

Public Member Functions

CalendarViewPage ()

Private Member Functions

void | CalendarView_CalendarViewDayItemChanging (CalendarView sender, CalendarViewDayItemChangingEventArgs args)
void | FirstDayOfWeek_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | GetBrushColor (Brush brush)
void | GetBrushColor_Click (object sender, RoutedEventArgs e)
string | GetBrushColorString (Brush brush)
Brush | GetBrushFromIndex ()
void | GetCalendarItemBorderThickness_Click (object sender, RoutedEventArgs e)
void | GetCalendarSize_Click (object sender, RoutedEventArgs e)
void | GetDayItemFontSize_Click (object sender, RoutedEventArgs e)
void | GetFirstOfMonthLabelFontSize_Click (object sender, RoutedEventArgs e)
void | GetFirstOfYearDecadeLabelFontSize_Click (object sender, RoutedEventArgs e)
void | GetMonthYearItemFontSize_Click (object sender, RoutedEventArgs e)
void | GetNumberOfWeeksInView_Click (object sender, RoutedEventArgs e)
SolidColorBrush | GetSolidColorBrush ()
void | HasDensityBars_Checked (object sender, RoutedEventArgs e)
void | HasDensityBars_Unchecked (object sender, RoutedEventArgs e)
void | IsSundayBlackedOut_Checked (object sender, RoutedEventArgs e)
void | IsSundayBlackedOut_Unchecked (object sender, RoutedEventArgs e)
void | IsTodayBlackedOut_Checked (object sender, RoutedEventArgs e)
void | IsTodayBlackedOut_Unchecked (object sender, RoutedEventArgs e)
void | Language_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ResetCalendarItemCornerRadius_Click (object sender, RoutedEventArgs e)
void | SelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | SetBackgrounds (CalendarView cv, Brush brush)
void | SetBlackout (CalendarViewDayItem dayItem)
void | SetBlackouts (CalendarView cv)
void | SetBrushColor_Click (object sender, RoutedEventArgs e)
void | SetCalendarItemBorderThickness_Click (object sender, RoutedEventArgs e)
void | SetCalendarItemCornerRadius_Click (object sender, RoutedEventArgs e)
void | SetCalendarSize_Click (object sender, RoutedEventArgs e)
void | SetDayItemFontSize_Click (object sender, RoutedEventArgs e)
void | SetDayItemMargin_Click (object sender, RoutedEventArgs e)
void | SetDensityColors (CalendarView cv)
void | SetDensityColors (CalendarViewDayItem dayItem)
void | SetFirstOfMonthLabelFontSize_Click (object sender, RoutedEventArgs e)
void | SetFirstOfMonthLabelMargin_Click (object sender, RoutedEventArgs e)
void | SetFirstOfYearDecadeLabelFontSize_Click (object sender, RoutedEventArgs e)
void | SetFirstOfYearDecadeLabelMargin_Click (object sender, RoutedEventArgs e)
void | SetMonthYearItemFontSize_Click (object sender, RoutedEventArgs e)
void | SetMonthYearItemMargin_Click (object sender, RoutedEventArgs e)
void | SetNumberOfWeeksInView_Click (object sender, RoutedEventArgs e)

Private Attributes

string[] | _defaultBrushColors = null

Detailed Description

Definition at line 16 of file CalendarViewPage.xaml.cs.

Constructor & Destructor Documentation

CalendarViewPage ( ) [inline]

Definition at line 20 of file CalendarViewPage.xaml.cs.

        {
            this.InitializeComponent();

            List<string> calendarIdentifiers = new List<string>()
            {
                CalendarIdentifiers.Gregorian,
                CalendarIdentifiers.Hebrew,
                CalendarIdentifiers.Hijri,
                CalendarIdentifiers.Japanese,
                CalendarIdentifiers.Julian,
                CalendarIdentifiers.Korean,
                CalendarIdentifiers.Persian,
                CalendarIdentifiers.Taiwan,
                CalendarIdentifiers.Thai,
                CalendarIdentifiers.UmAlQura,
            };

            calendarIdentifier.ItemsSource = calendarIdentifiers;
            calendarIdentifier.SelectedItem = CalendarIdentifiers.Gregorian;

            _defaultBrushColors = new string[brushPropertyName.Items.Count];

            PageCalendar.CalendarViewDayItemChanging += CalendarView_CalendarViewDayItemChanging;
            PageCalendar2.CalendarViewDayItemChanging += CalendarView_CalendarViewDayItemChanging;
        }

Member Function Documentation

void CalendarView_CalendarViewDayItemChanging | ( | CalendarView | sender,
 |  | CalendarViewDayItemChangingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 47 of file CalendarViewPage.xaml.cs.

        {
            // Render basic day items.
            if (args.Phase == 0)
            {
                if (isTodayBlackedOut.IsChecked.Value || isSundayBlackedOut.IsChecked.Value || hasDensityBars.IsChecked.Value)
                {
                    // Register callback for next phase.
                    args.RegisterUpdateCallback(CalendarView_CalendarViewDayItemChanging);
                }
            }
            // Set blackout dates.
            else if (args.Phase == 1)
            {
                // Blackout Sundays and/or Today.
                SetBlackout(args.Item);

                if (hasDensityBars.IsChecked.Value)
                {
                    // Register callback for next phase.
                    args.RegisterUpdateCallback(CalendarView_CalendarViewDayItemChanging);
                }
            }
            // Set density bars.
            else if (args.Phase == 2)
            {
                SetDensityColors(args.Item);
            }
        }

void FirstDayOfWeek_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 152 of file CalendarViewPage.xaml.cs.

        {
            Windows.Globalization.DayOfWeek weekDay = firstDayOfWeek.SelectedIndex == 0 ? Windows.Globalization.DayOfWeek.Sunday : Windows.Globalization.DayOfWeek.Monday;

            if (PageCalendar != null && PageCalendar.FirstDayOfWeek != weekDay)
            {
                PageCalendar.FirstDayOfWeek = weekDay;
            }
            if (PageCalendar2 != null && PageCalendar2.FirstDayOfWeek != weekDay)
            {
                PageCalendar2.FirstDayOfWeek = weekDay;
            }
        }

void GetBrushColor ( Brush brush ) [inline, private]

Definition at line 449 of file CalendarViewPage.xaml.cs.

        {
            brushColor.Text = GetBrushColorString(brush);
        }

void GetBrushColor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 444 of file CalendarViewPage.xaml.cs.

        {
            GetBrushColor(GetBrushFromIndex());
        }

string GetBrushColorString ( Brush brush ) [inline, private]

Definition at line 454 of file CalendarViewPage.xaml.cs.

        {
            SolidColorBrush solidColorBrush = brush as SolidColorBrush;

            if (solidColorBrush == null)
            {
                return "N/A";
            }
            else
            {
                return solidColorBrush.Color.ToString();
            }
        }

Brush GetBrushFromIndex ( ) [inline, private]

Definition at line 353 of file CalendarViewPage.xaml.cs.

        {
            switch (brushPropertyName.SelectedIndex)
            {
                case 0: // Background
                    return PageCalendar.Background;
                case 2: // BlackoutForeground
                    return PageCalendar.BlackoutForeground;
                case 4: // BorderBrush
                    return PageCalendar.BorderBrush;
                case 5: // CalendarItemBorderBrush
                    return PageCalendar.CalendarItemBorderBrush;
                case 6: // CalendarItemBackground
                    return PageCalendar.CalendarItemBackground;
                case 8: // CalendarItemForeground
                    return PageCalendar.CalendarItemForeground;
                case 12: // Foreground
                    return PageCalendar.Foreground;
                case 13: // HoverBorderBrush
                    return PageCalendar.HoverBorderBrush;
                case 14: // OutOfScopeBackground
                    return PageCalendar.OutOfScopeBackground;
                case 15: // OutOfScopeForeground
                    return PageCalendar.OutOfScopeForeground;
                case 18: // PressedBorderBrush
                    return PageCalendar.PressedBorderBrush;
                case 19: // PressedForeground
                    return PageCalendar.PressedForeground;
                case 20: // SelectedBorderBrush
                    return PageCalendar.SelectedBorderBrush;
                case 23: // SelectedForeground
                    return PageCalendar.SelectedForeground;
                case 24: // SelectedHoverBorderBrush
                    return PageCalendar.SelectedHoverBorderBrush;
                case 26: // SelectedPressedBorderBrush
                    return PageCalendar.SelectedPressedBorderBrush;
                case 32: // TodayForeground
                    return PageCalendar.TodayForeground;
                case 36: // CalendarViewDayItem.Background
                    return null;
                default:
                    if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
                    {
                        switch (brushPropertyName.SelectedIndex)
                        {
                            case 1: // BlackoutBackground
                                return PageCalendar.BlackoutBackground;
                            case 3: // BlackoutStrikethroughBrush
                                return PageCalendar.BlackoutStrikethroughBrush;
                            case 4: // CalendarItemDisabledBackground
                                return PageCalendar.CalendarItemDisabledBackground;
                            case 9: // CalendarItemHoverBackground
                                return PageCalendar.CalendarItemHoverBackground;
                            case 10: // CalendarItemPressedBackground
                                return PageCalendar.CalendarItemPressedBackground;
                            case 11: // DisabledForeground
                                return PageCalendar.DisabledForeground;
                            case 16: // OutOfScopeHoverForeground
                                return PageCalendar.OutOfScopeHoverForeground;
                            case 17: // OutOfScopePressedForeground
                                return PageCalendar.OutOfScopePressedForeground;
                            case 21: // SelectedDisabledBorderBrush
                                return PageCalendar.SelectedDisabledBorderBrush;
                            case 22: // SelectedDisabledForeground
                                return PageCalendar.SelectedDisabledForeground;
                            case 25: // SelectedHoverForeground
                                return PageCalendar.SelectedHoverForeground;
                            case 27: // SelectedPressedForeground
                                return PageCalendar.SelectedPressedForeground;
                            case 28: // TodayBackground
                                return PageCalendar.TodayBackground;
                            case 29: // TodayBlackoutBackground
                                return PageCalendar.TodayBlackoutBackground;
                            case 30: // TodayBlackoutForeground
                                return PageCalendar.TodayBlackoutForeground;
                            case 31: // TodayDisabledBackground
                                return PageCalendar.TodayDisabledBackground;
                            case 33: // TodayHoverBackground
                                return PageCalendar.TodayHoverBackground;
                            case 34: // TodayPressedBackground
                                return PageCalendar.TodayPressedBackground;
                            case 35: // TodaySelectedInnerBorderBrush
                                return PageCalendar.TodaySelectedInnerBorderBrush;
                            default:
                                return null;
                        }
                    }
                    return null;
            }
        }

void GetCalendarItemBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 342 of file CalendarViewPage.xaml.cs.

        {
            calendarItemBorderThickness.Text = PageCalendar.CalendarItemBorderThickness.ToString();
        }

void GetCalendarSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 180 of file CalendarViewPage.xaml.cs.

        {
            calendarWidth.Text = PageCalendar2.Width.ToString();
            calendarActualWidth.Text = PageCalendar2.ActualWidth.ToString();
            calendarHeight.Text = PageCalendar2.Height.ToString();
            calendarActualHeight.Text = PageCalendar2.ActualHeight.ToString();
        }

void GetDayItemFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 285 of file CalendarViewPage.xaml.cs.

        {
            dayItemFontSize.Text = PageCalendar.DayItemFontSize.ToString();
        }

void GetFirstOfMonthLabelFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 305 of file CalendarViewPage.xaml.cs.

        {
            firstOfMonthLabelFontSize.Text = PageCalendar.FirstOfMonthLabelFontSize.ToString();
        }

void GetFirstOfYearDecadeLabelFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 315 of file CalendarViewPage.xaml.cs.

        {
            firstOfYearDecadeLabelFontSize.Text = PageCalendar.FirstOfYearDecadeLabelFontSize.ToString();
        }

void GetMonthYearItemFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 295 of file CalendarViewPage.xaml.cs.

        {
            monthYearItemFontSize.Text = PageCalendar.MonthYearItemFontSize.ToString();
        }

void GetNumberOfWeeksInView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 194 of file CalendarViewPage.xaml.cs.

        {
            numberOfWeeksInView.Text = PageCalendar.NumberOfWeeksInView.ToString();
        }

SolidColorBrush GetSolidColorBrush ( ) [inline, private]

Definition at line 602 of file CalendarViewPage.xaml.cs.

        {
            string defaultBrushColor = _defaultBrushColors[brushPropertyName.SelectedIndex];

            if (string.IsNullOrEmpty(defaultBrushColor))
            {
                Brush brush = GetBrushFromIndex();

                if (brush != null)
                {
                    _defaultBrushColors[brushPropertyName.SelectedIndex] = GetBrushColorString(brush);
                }
            }

            SolidColorBrush solidColorBrush = null;

            switch (brushColor.SelectedIndex)
            {
                case -1:
                    string colorString = brushColor.SelectedValue as string;
                    if (colorString.Length == 9)
                    {
                        Color color = Color.FromArgb(
                            Byte.Parse(colorString.Substring(1, 2), System.Globalization.NumberStyles.HexNumber), // a
                            Byte.Parse(colorString.Substring(3, 2), System.Globalization.NumberStyles.HexNumber), // r
                            Byte.Parse(colorString.Substring(5, 2), System.Globalization.NumberStyles.HexNumber), // g
                            Byte.Parse(colorString.Substring(7, 2), System.Globalization.NumberStyles.HexNumber));// b
                        solidColorBrush = new SolidColorBrush(color);
                    }
                    break;

                case 0: // Default
                    if (defaultBrushColor != null && defaultBrushColor != "N/A")
                    {
                        Color defaultColor = Color.FromArgb(
                            Byte.Parse(defaultBrushColor.Substring(1, 2), System.Globalization.NumberStyles.HexNumber), // a
                            Byte.Parse(defaultBrushColor.Substring(3, 2), System.Globalization.NumberStyles.HexNumber), // r
                            Byte.Parse(defaultBrushColor.Substring(5, 2), System.Globalization.NumberStyles.HexNumber), // g
                            Byte.Parse(defaultBrushColor.Substring(7, 2), System.Globalization.NumberStyles.HexNumber));// b
                        solidColorBrush = new SolidColorBrush(defaultColor);
                    }
                    break;

                case 1: // Red
                    solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
                    break;

                case 2: // Orange
                    solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Orange);
                    break;

                case 3: // Yellow
                    solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Yellow);
                    break;

                case 4: // Green
                    solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Green);
                    break;
            }

            return solidColorBrush;
        }

void HasDensityBars_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 689 of file CalendarViewPage.xaml.cs.

        {
            SetDensityColors(PageCalendar);
            SetDensityColors(PageCalendar2);
        }

void HasDensityBars_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 695 of file CalendarViewPage.xaml.cs.

        {
            SetDensityColors(PageCalendar);
            SetDensityColors(PageCalendar2);
        }

void IsSundayBlackedOut_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 665 of file CalendarViewPage.xaml.cs.

        {
            SetBlackouts(PageCalendar);
            SetBlackouts(PageCalendar2);
        }

void IsSundayBlackedOut_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 671 of file CalendarViewPage.xaml.cs.

        {
            SetBlackouts(PageCalendar);
            SetBlackouts(PageCalendar2);
        }

void IsTodayBlackedOut_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 677 of file CalendarViewPage.xaml.cs.

        {
            SetBlackouts(PageCalendar);
            SetBlackouts(PageCalendar2);
        }

void IsTodayBlackedOut_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 683 of file CalendarViewPage.xaml.cs.

        {
            SetBlackouts(PageCalendar);
            SetBlackouts(PageCalendar2);
        }

void Language_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file CalendarViewPage.xaml.cs.

        {
            string newLanguage = language.SelectedValue as string;

            if (PageCalendar != null && newLanguage != PageCalendar.Language)
            {
                PageCalendar.Language = newLanguage;
            }
            if (PageCalendar2 != null && newLanguage != PageCalendar2.Language)
            {
                PageCalendar2.Language = newLanguage;
            }
        }

void ResetCalendarItemCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 333 of file CalendarViewPage.xaml.cs.

        {
            if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
            {
                PageCalendar.ClearValue(CalendarView.CalendarItemCornerRadiusProperty);
                PageCalendar2.ClearValue(CalendarView.CalendarItemCornerRadiusProperty);
            }
        }

void SelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 136 of file CalendarViewPage.xaml.cs.

        {
            CalendarViewSelectionMode selectionMode;
            if (Enum.TryParse<CalendarViewSelectionMode>((sender as ComboBox).SelectedItem.ToString(), out selectionMode))
            {
                if (PageCalendar != null && PageCalendar.SelectionMode != selectionMode)
                {
                    PageCalendar.SelectionMode = selectionMode;
                }
                if (PageCalendar2 != null && PageCalendar2.SelectionMode != selectionMode)
                {
                    PageCalendar2.SelectionMode = selectionMode;
                }
            }
        }

void SetBackgrounds | ( | CalendarView | cv,
 |  | Brush | brush |
 | ) |  |  | [inline, private]

Definition at line 713 of file CalendarViewPage.xaml.cs.

        {
            if (cv == null) return;

            var dayItems = Utilities.TestUtilities.FindDescendents<CalendarViewDayItem>(cv);

            foreach (var dayItem in dayItems)
            {
                dayItem.Background = brush;
            }
        }

void SetBlackout ( CalendarViewDayItem dayItem ) [inline, private]

Definition at line 118 of file CalendarViewPage.xaml.cs.

        {
            Calendar calendar = new Calendar();

            calendar.SetDateTime(dayItem.Date);

            bool isBlackout = isSundayBlackedOut.IsChecked.Value && calendar.DayOfWeek == Windows.Globalization.DayOfWeek.Sunday;

            if (!isBlackout && isTodayBlackedOut.IsChecked.Value)
            {
                Calendar calendarToday = new Calendar();
                calendarToday.SetToNow();
                isBlackout = calendar.Day == calendarToday.Day && calendar.Month == calendarToday.Month && calendar.Year == calendarToday.Year;
            }

            dayItem.IsBlackout = isBlackout;
        }

void SetBlackouts ( CalendarView cv ) [inline, private]

Definition at line 701 of file CalendarViewPage.xaml.cs.

        {
            if (cv == null) return;

            var dayItems = Utilities.TestUtilities.FindDescendents<CalendarViewDayItem>(cv);

            foreach (var dayItem in dayItems)
            {
                SetBlackout(dayItem);
            }
        }

void SetBrushColor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 468 of file CalendarViewPage.xaml.cs.

        {
            SolidColorBrush solidColorBrush = GetSolidColorBrush();

            if (solidColorBrush == null && brushPropertyName.SelectedIndex != 36)
            {
                return;
            }

            switch (brushPropertyName.SelectedIndex)
            {
                case 0: // Background
                    PageCalendar.Background = PageCalendar2.Background = solidColorBrush;
                    break;
                case 2: // BlackoutForeground
                    PageCalendar.BlackoutForeground = PageCalendar2.BlackoutForeground = solidColorBrush;
                    break;
                case 4: // BorderBrush
                    PageCalendar.BorderBrush = PageCalendar2.BorderBrush = solidColorBrush;
                    break;
                case 5: // CalendarItemBorderBrush
                    PageCalendar.CalendarItemBorderBrush = PageCalendar2.CalendarItemBorderBrush = solidColorBrush;
                    break;
                case 6: // CalendarItemBackground
                    PageCalendar.CalendarItemBackground = PageCalendar2.CalendarItemBackground = solidColorBrush;
                    break;
                case 8: // CalendarItemForeground
                    PageCalendar.CalendarItemForeground = PageCalendar2.CalendarItemForeground = solidColorBrush;
                    break;
                case 12: // Foreground
                    PageCalendar.Foreground = PageCalendar2.Foreground = solidColorBrush;
                    break;
                case 13: // HoverBorderBrush
                    PageCalendar.HoverBorderBrush = PageCalendar2.HoverBorderBrush = solidColorBrush;
                    break;
                case 14: // OutOfScopeBackground
                    PageCalendar.OutOfScopeBackground = PageCalendar2.OutOfScopeBackground = solidColorBrush;
                    break;
                case 15: // OutOfScopeForeground
                    PageCalendar.OutOfScopeForeground = PageCalendar2.OutOfScopeForeground = solidColorBrush;
                    break;
                case 18: // PressedBorderBrush
                    PageCalendar.PressedBorderBrush = PageCalendar2.PressedBorderBrush = solidColorBrush;
                    break;
                case 19: // PressedForeground
                    PageCalendar.PressedForeground = PageCalendar2.PressedForeground = solidColorBrush;
                    break;
                case 20: // SelectedBorderBrush
                    PageCalendar.SelectedBorderBrush = PageCalendar2.SelectedBorderBrush = solidColorBrush;
                    break;
                case 23: // SelectedForeground
                    PageCalendar.SelectedForeground = PageCalendar2.SelectedForeground = solidColorBrush;
                    break;
                case 24: // SelectedHoverBorderBrush
                    PageCalendar.SelectedHoverBorderBrush = PageCalendar2.SelectedHoverBorderBrush = solidColorBrush;
                    break;
                case 26: // SelectedPressedBorderBrush
                    PageCalendar.SelectedPressedBorderBrush = PageCalendar2.SelectedPressedBorderBrush = solidColorBrush;
                    break;
                case 32: // TodayForeground
                    PageCalendar.TodayForeground = PageCalendar2.TodayForeground = solidColorBrush;
                    break;
                case 36: // CalendarViewDayItem.Background
                    SetBackgrounds(PageCalendar, solidColorBrush);
                    SetBackgrounds(PageCalendar2, solidColorBrush);
                    break;
                default:
                    if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
                    {
                        switch (brushPropertyName.SelectedIndex)
                        {
                            case 1: // BlackoutBackground
                                PageCalendar.BlackoutBackground = PageCalendar2.BlackoutBackground = solidColorBrush;
                                break;
                            case 3: // BlackoutStrikethroughBrush
                                PageCalendar.BlackoutStrikethroughBrush = PageCalendar2.BlackoutStrikethroughBrush = solidColorBrush;
                                break;
                            case 7: // CalendarItemDisabledBackground
                                PageCalendar.CalendarItemDisabledBackground = PageCalendar2.CalendarItemDisabledBackground = solidColorBrush;
                                break;
                            case 9: // CalendarItemHoverBackground
                                PageCalendar.CalendarItemHoverBackground = PageCalendar2.CalendarItemHoverBackground = solidColorBrush;
                                break;
                            case 10: // CalendarItemPressedBackground
                                PageCalendar.CalendarItemPressedBackground = PageCalendar2.CalendarItemPressedBackground = solidColorBrush;
                                break;
                            case 11: // DisabledForeground
                                PageCalendar.DisabledForeground = PageCalendar2.DisabledForeground = solidColorBrush;
                                break;
                            case 16: // OutOfScopeHoverForeground
                                PageCalendar.OutOfScopeHoverForeground = PageCalendar2.OutOfScopeHoverForeground = solidColorBrush;
                                break;
                            case 17: // OutOfScopePressedForeground
                                PageCalendar.OutOfScopePressedForeground = PageCalendar2.OutOfScopePressedForeground = solidColorBrush;
                                break;
                            case 21: // SelectedDisabledBorderBrush
                                PageCalendar.SelectedDisabledBorderBrush = PageCalendar2.SelectedDisabledBorderBrush = solidColorBrush;
                                break;
                            case 22: // SelectedDisabledForeground
                                PageCalendar.SelectedDisabledForeground = PageCalendar2.SelectedDisabledForeground = solidColorBrush;
                                break;
                            case 25: // SelectedHoverForeground
                                PageCalendar.SelectedHoverForeground = PageCalendar2.SelectedHoverForeground = solidColorBrush;
                                break;
                            case 27: // SelectedPressedForeground
                                PageCalendar.SelectedPressedForeground = PageCalendar2.SelectedPressedForeground = solidColorBrush;
                                break;
                            case 28: // TodayBackground
                                PageCalendar.TodayBackground = PageCalendar2.TodayBackground = solidColorBrush;
                                break;
                            case 29: // TodayBlackoutBackground
                                PageCalendar.TodayBlackoutBackground = PageCalendar2.TodayBlackoutBackground = solidColorBrush;
                                break;
                            case 30: // TodayBlackoutForeground
                                PageCalendar.TodayBlackoutForeground = PageCalendar2.TodayBlackoutForeground = solidColorBrush;
                                break;
                            case 31: // TodayDisabledBackground
                                PageCalendar.TodayDisabledBackground = PageCalendar2.TodayDisabledBackground = solidColorBrush;
                                break;
                            case 33: // TodayHoverBackground
                                PageCalendar.TodayHoverBackground = PageCalendar2.TodayHoverBackground = solidColorBrush;
                                break;
                            case 34: // TodayPressedBackground
                                PageCalendar.TodayPressedBackground = PageCalendar2.TodayPressedBackground = solidColorBrush;
                                break;
                            case 35: // TodaySelectedInnerBorderBrush
                                PageCalendar.TodaySelectedInnerBorderBrush = PageCalendar2.TodaySelectedInnerBorderBrush = solidColorBrush;
                                break;
                        }
                    }
                    break;
            }
        }

void SetCalendarItemBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 347 of file CalendarViewPage.xaml.cs.

        {
            PageCalendar.CalendarItemBorderThickness = new Thickness(Single.Parse(calendarItemBorderThickness.Text));
            PageCalendar2.CalendarItemBorderThickness = new Thickness(Single.Parse(calendarItemBorderThickness.Text));
        }

void SetCalendarItemCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 325 of file CalendarViewPage.xaml.cs.

        {
            if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
            {
                PageCalendar2.CalendarItemCornerRadius = PageCalendar.CalendarItemCornerRadius = new CornerRadius(double.Parse(calendarItemCornerRadius.Text));
            }
        }

void SetCalendarSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 188 of file CalendarViewPage.xaml.cs.

        {
            PageCalendar2.Width = Double.Parse(calendarWidth.Text);
            PageCalendar2.Height = Double.Parse(calendarHeight.Text);
        }

void SetDayItemFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 290 of file CalendarViewPage.xaml.cs.

        {
            PageCalendar2.DayItemFontSize = PageCalendar.DayItemFontSize = double.Parse(dayItemFontSize.Text);
        }

void SetDayItemMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 205 of file CalendarViewPage.xaml.cs.

        {
            if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
            {
                string[] thicknessParts = dayItemMargin.Text.Split(',');

                PageCalendar.DayItemMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));

                PageCalendar2.DayItemMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));
            }
        }

void SetDensityColors ( CalendarView cv ) [inline, private]

Definition at line 725 of file CalendarViewPage.xaml.cs.

        {
            if (cv == null) return;

            var dayItems = Utilities.TestUtilities.FindDescendents<CalendarViewDayItem>(cv);

            foreach (var dayItem in dayItems)
            {
                SetDensityColors(dayItem);
            }
        }

void SetDensityColors ( CalendarViewDayItem dayItem ) [inline, private]

Definition at line 77 of file CalendarViewPage.xaml.cs.

        {
            if (hasDensityBars.IsChecked.Value)
            {
                Calendar calendar = new Calendar();
                calendar.SetDateTime(dayItem.Date);

                DateTime today = DateTime.Now.Date;
                bool isToday = calendar.Day == today.Day && calendar.Month == today.Month && calendar.Year == today.Year;

                if (calendar.Day % 6 == 0 || isToday)
                {
                    List<Color> densityColors = new List<Color>();

                    densityColors.Add(Microsoft.UI.Colors.Green);
                    densityColors.Add(Microsoft.UI.Colors.Green);

                    if (calendar.Day % 4 == 0 || isToday)
                    {
                        densityColors.Add(Microsoft.UI.Colors.Blue);
                        densityColors.Add(Microsoft.UI.Colors.Blue);
                    }
                    if (calendar.Day % 9 == 0 || isToday)
                    {
                        densityColors.Add(Microsoft.UI.Colors.Orange);
                    }
                    if (isToday)
                    {
                        densityColors.Add(Microsoft.UI.Colors.Red);
                        densityColors.Add(Microsoft.UI.Colors.Yellow);
                    }

                    dayItem.SetDensityColors(densityColors);
                }
            }
            else
            {
                dayItem.SetDensityColors(null);
            }
        }

void SetFirstOfMonthLabelFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 310 of file CalendarViewPage.xaml.cs.

        {
            PageCalendar2.FirstOfMonthLabelFontSize = PageCalendar.FirstOfMonthLabelFontSize = double.Parse(firstOfMonthLabelFontSize.Text);
        }

void SetFirstOfMonthLabelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 245 of file CalendarViewPage.xaml.cs.

        {
            if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
            {
                string[] thicknessParts = firstOfMonthLabelMargin.Text.Split(',');

                PageCalendar.FirstOfMonthLabelMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));

                PageCalendar2.FirstOfMonthLabelMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));
            }
        }

void SetFirstOfYearDecadeLabelFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 320 of file CalendarViewPage.xaml.cs.

        {
            PageCalendar2.FirstOfYearDecadeLabelFontSize = PageCalendar.FirstOfYearDecadeLabelFontSize = double.Parse(firstOfYearDecadeLabelFontSize.Text);
        }

void SetFirstOfYearDecadeLabelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 265 of file CalendarViewPage.xaml.cs.

        {
            if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
            {
                string[] thicknessParts = firstOfYearDecadeLabelMargin.Text.Split(',');

                PageCalendar.FirstOfYearDecadeLabelMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));

                PageCalendar2.FirstOfYearDecadeLabelMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));
            }
        }

void SetMonthYearItemFontSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 300 of file CalendarViewPage.xaml.cs.

        {
            PageCalendar2.MonthYearItemFontSize = PageCalendar.MonthYearItemFontSize = double.Parse(monthYearItemFontSize.Text);
        }

void SetMonthYearItemMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 225 of file CalendarViewPage.xaml.cs.

        {
            if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
            {
                string[] thicknessParts = monthYearItemMargin.Text.Split(',');

                PageCalendar.MonthYearItemMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));

                PageCalendar2.MonthYearItemMargin = new Thickness(
                    float.Parse(thicknessParts[0]),
                    float.Parse(thicknessParts[1]),
                    float.Parse(thicknessParts[2]),
                    float.Parse(thicknessParts[3]));
            }
        }

void SetNumberOfWeeksInView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 199 of file CalendarViewPage.xaml.cs.

        {
            PageCalendar.NumberOfWeeksInView = Int32.Parse(numberOfWeeksInView.Text);
            PageCalendar2.NumberOfWeeksInView = Int32.Parse(numberOfWeeksInView.Text);
        }

Member Data Documentation

string [] _defaultBrushColors = null [private]

Definition at line 18 of file CalendarViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CalendarViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CanvasScrollControllerConsumer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CanvasScrollControllerConsumer
Public Member Functions | Properties | Private Member Functions | Private Attributes

CanvasScrollControllerConsumer Class Reference

List of all members.

Public Member Functions

CanvasScrollControllerConsumer (ListBox lstLog, Canvas canvas, FrameworkElement scrolledElement, bool isLogging)

Properties

IScrollController | HorizontalScrollController [get, set]
bool | IsEnabled [get, set]
bool | IsLogging [get, set]
IScrollController | VerticalScrollController [get, set]

Private Member Functions

double | GetHorizontalMaxOffset ()
double | GetHorizontalOffset ()
double | GetHorizontalViewportLength ()
double | GetVerticalMaxOffset ()
double | GetVerticalOffset ()
double | GetVerticalViewportLength ()
void | LogMessage (string message)
void | OnAddScrollVelocityRequested (IScrollController sender, ScrollControllerAddScrollVelocityRequestedEventArgs e)
void | OnCanScrollChanged (IScrollController sender, object e)
void | OnIsScrollingWithMouseChanged (IScrollController sender, object e)
void | OnScrollByRequested (IScrollController sender, ScrollControllerScrollByRequestedEventArgs e)
void | OnScrollToRequested (IScrollController sender, ScrollControllerScrollToRequestedEventArgs e)
void | ScrolledElementManipulationCompleted (object sender, ManipulationCompletedRoutedEventArgs e)
void | ScrolledElementManipulationDelta (object sender, ManipulationDeltaRoutedEventArgs e)
void | ScrolledElementManipulationStarting (object sender, ManipulationStartingRoutedEventArgs e)
void | SetHorizontalInfo (double maxOffset, double viewportLength)
void | SetHorizontalOffset (double offset)
void | SetVerticalInfo (double maxOffset, double viewportLength)
void | SetVerticalOffset (double offset)
void | UpdateOffsets (Point cumulativeTranslation, bool clamp=false)

Private Attributes

Canvas | canvas = null
CompositionPropertySet | horizontalPS = null
IScrollController | horizontalScrollController = null
bool | isEnabled = true
ListBox | lstLog = null
double | preManipulationHorizontalOffset = 0.0
double | preManipulationVerticalOffset = 0.0
FrameworkElement | scrolledElement = null
CompositionPropertySet | verticalPS = null
IScrollController | verticalScrollController = null

Detailed Description

Definition at line 194 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

Constructor & Destructor Documentation

CanvasScrollControllerConsumer | ( | ListBox | lstLog,
 |  | Canvas | canvas,
 |  | FrameworkElement | scrolledElement,
 |  | bool | isLogging |
 | ) |  |  | [inline]

Definition at line 207 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            this.lstLog = lstLog;
            this.canvas = canvas;
            this.scrolledElement = scrolledElement;
            this.IsLogging = isLogging;

            scrolledElement.ManipulationStarting += ScrolledElementManipulationStarting;
            scrolledElement.ManipulationDelta += ScrolledElementManipulationDelta;
            scrolledElement.ManipulationCompleted += ScrolledElementManipulationCompleted;

            Visual visual = ElementCompositionPreview.GetElementVisual(lstLog);
            Compositor compositor = visual.Compositor;

            horizontalPS = compositor.CreatePropertySet();
            horizontalPS.InsertScalar("CustomMinOffset", 0.0f);
            horizontalPS.InsertScalar("CustomMaxOffset", 0.0f);
            horizontalPS.InsertScalar("CustomOffset", 0.0f);
            horizontalPS.InsertScalar("CustomViewportLength", 0.0f);

            verticalPS = compositor.CreatePropertySet();
            verticalPS.InsertScalar("CustomMinOffset", 0.0f);
            verticalPS.InsertScalar("CustomMaxOffset", 0.0f);
            verticalPS.InsertScalar("CustomOffset", 0.0f);
            verticalPS.InsertScalar("CustomViewportLength", 0.0f);

            SetHorizontalInfo(Math.Max(0.0, scrolledElement.ActualWidth - canvas.ActualWidth), canvas.ActualWidth);
            SetVerticalInfo(Math.Max(0.0, scrolledElement.ActualHeight - canvas.ActualHeight), canvas.ActualWidth);
        }

Member Function Documentation

double GetHorizontalMaxOffset ( ) [inline, private]

Definition at line 274 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            float maxOffset = 0.0f;
            horizontalPS.TryGetScalar("CustomMaxOffset", out maxOffset);
            return (double)maxOffset;
        }

double GetHorizontalOffset ( ) [inline, private]

Definition at line 286 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            float offset = 0.0f;
            horizontalPS.TryGetScalar("CustomOffset", out offset);
            return (double)offset;
        }

double GetHorizontalViewportLength ( ) [inline, private]

Definition at line 267 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            float viewportLength = 0.0f;
            horizontalPS.TryGetScalar("CustomViewportLength", out viewportLength);
            return (double)viewportLength;
        }

double GetVerticalMaxOffset ( ) [inline, private]

Definition at line 306 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            float maxOffset = 0.0f;
            verticalPS.TryGetScalar("CustomMaxOffset", out maxOffset);
            return (double)maxOffset;
        }

double GetVerticalOffset ( ) [inline, private]

Definition at line 318 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            float offset = 0.0f;
            verticalPS.TryGetScalar("CustomOffset", out offset);
            return (double)offset;
        }

double GetVerticalViewportLength ( ) [inline, private]

Definition at line 299 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            float viewportLength = 0.0f;
            verticalPS.TryGetScalar("CustomViewportLength", out viewportLength);
            return (double)viewportLength;
        }

void LogMessage ( string message ) [inline, private]

Definition at line 550 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (IsLogging)
            {
                lstLog.Items.Add(message);
            }
        }

void OnAddScrollVelocityRequested | ( | IScrollController | sender,
 |  | ScrollControllerAddScrollVelocityRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 480 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (sender == horizontalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnAddScrollVelocityRequested for HorizontalScrollController");
            }
            else if (sender == verticalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnAddScrollVelocityRequested for VerticalScrollController");
            }
            else
            {
                LogMessage("CanvasScrollControllerConsumer: OnAddScrollVelocityRequested for unknown sender");
            }
        }

void OnCanScrollChanged | ( | IScrollController | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 407 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (sender == horizontalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnCanScrollChanged for HorizontalScrollController");
            }
            else if (sender == verticalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnCanScrollChanged for VerticalScrollController");
            }
            else
            {
                LogMessage("CanvasScrollControllerConsumer: OnCanScrollChanged for unknown sender");
            }
        }

void OnIsScrollingWithMouseChanged | ( | IScrollController | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 423 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (sender == horizontalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnIsScrollingWithMouseChanged for HorizontalScrollController");
            }
            else if (sender == verticalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnIsScrollingWithMouseChanged for VerticalScrollController");
            }
            else
            {
                LogMessage("CanvasScrollControllerConsumer: OnIsScrollingWithMouseChanged for unknown sender");
            }
        }

void OnScrollByRequested | ( | IScrollController | sender,
 |  | ScrollControllerScrollByRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 467 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (sender == horizontalScrollController || sender == verticalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnScrollByRequested for " + (sender == horizontalScrollController ? "HorizontalScrollController" : "VerticalScrollController"));
                LogMessage("OffsetDelta=" + e.OffsetDelta + ", AnimationMode=" + e.Options.AnimationMode + ", SnapPointsMode=" + e.Options.SnapPointsMode);
            }
            else
            {
                LogMessage("CanvasScrollControllerConsumer: OnScrollByRequested for unknown sender");
            }
        }

void OnScrollToRequested | ( | IScrollController | sender,
 |  | ScrollControllerScrollToRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 439 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (sender == horizontalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnScrollToRequested for HorizontalScrollController");
                LogMessage("Offset=" + e.Offset + ", AnimationMode=" + e.Options.AnimationMode + ", SnapPointsMode=" + e.Options.SnapPointsMode);

                if (e.Options.AnimationMode == ScrollingAnimationMode.Disabled)
                {
                    Canvas.SetLeft(scrolledElement, -e.Offset);
                }
            }
            else if (sender == verticalScrollController)
            {
                LogMessage("CanvasScrollControllerConsumer: OnScrollToRequested for VerticalScrollController");
                LogMessage("Offset=" + e.Offset + ", AnimationMode=" + e.Options.AnimationMode + ", SnapPointsMode=" + e.Options.SnapPointsMode);

                if (e.Options.AnimationMode == ScrollingAnimationMode.Disabled)
                {
                    Canvas.SetTop(scrolledElement, -e.Offset);
                }
            }
            else
            {
                LogMessage("CanvasScrollControllerConsumer: OnScrollToRequested for unknown sender");
            }
        }

void ScrolledElementManipulationCompleted | ( | object | sender,
 |  | ManipulationCompletedRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 507 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            UpdateOffsets(e.Cumulative.Translation, true);

            preManipulationHorizontalOffset = 0.0;
            preManipulationVerticalOffset = 0.0;
        }

void ScrolledElementManipulationDelta | ( | object | sender,
 |  | ManipulationDeltaRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 502 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            UpdateOffsets(e.Cumulative.Translation);
        }

void ScrolledElementManipulationStarting | ( | object | sender,
 |  | ManipulationStartingRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 496 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            preManipulationHorizontalOffset = -Canvas.GetLeft(scrolledElement);
            preManipulationVerticalOffset = -Canvas.GetTop(scrolledElement);
        }

void SetHorizontalInfo | ( | double | maxOffset,
 |  | double | viewportLength |
 | ) |  |  | [inline, private]

Definition at line 261 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            horizontalPS.InsertScalar("CustomMaxOffset", (float)maxOffset);
            horizontalPS.InsertScalar("CustomViewportLength", (float)viewportLength);
        }

void SetHorizontalOffset ( double offset ) [inline, private]

Definition at line 281 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            horizontalPS.InsertScalar("CustomOffset", (float)offset);
        }

void SetVerticalInfo | ( | double | maxOffset,
 |  | double | viewportLength |
 | ) |  |  | [inline, private]

Definition at line 293 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            verticalPS.InsertScalar("CustomMaxOffset", (float)maxOffset);
            verticalPS.InsertScalar("CustomViewportLength", (float)viewportLength);
        }

void SetVerticalOffset ( double offset ) [inline, private]

Definition at line 313 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            verticalPS.InsertScalar("CustomOffset", (float)offset);
        }

void UpdateOffsets | ( | Point | cumulativeTranslation,
 |  | bool | clamp = false |
 | ) |  |  | [inline, private]

Definition at line 515 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            double newHorizontalOffset = preManipulationHorizontalOffset - cumulativeTranslation.X;
            double newVerticalOffset = preManipulationVerticalOffset - cumulativeTranslation.Y;

            if (clamp)
            {
                newHorizontalOffset = Math.Max(0.0, newHorizontalOffset);
                newVerticalOffset = Math.Max(0.0, newVerticalOffset);

                newHorizontalOffset = Math.Min(GetHorizontalMaxOffset(), newHorizontalOffset);
                newVerticalOffset = Math.Min(GetVerticalMaxOffset(), newVerticalOffset);
            }

            Canvas.SetLeft(scrolledElement, -newHorizontalOffset);
            Canvas.SetTop(scrolledElement, -newVerticalOffset);

            SetHorizontalOffset(newHorizontalOffset);
            SetVerticalOffset(newVerticalOffset);

            if (horizontalScrollController != null)
                horizontalScrollController.SetValues(
                    0.0                           /*minOffset*/,
                    GetHorizontalMaxOffset()      /*maxOffset*/,
                    GetHorizontalOffset()         /*offset*/,
                    GetHorizontalViewportLength() /*viewportLength*/);

            if (verticalScrollController != null)
                verticalScrollController.SetValues(
                    0.0                         /*minOffset*/,
                    GetVerticalMaxOffset()      /*maxOffset*/,
                    GetVerticalOffset()         /*offset*/,
                    GetVerticalViewportLength() /*viewportLength*/);
        }

Member Data Documentation

Canvas canvas = null [private]

Definition at line 201 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

CompositionPropertySet horizontalPS = null [private]

Definition at line 196 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

IScrollController horizontalScrollController = null [private]

Definition at line 198 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

bool isEnabled = true [private]

Definition at line 205 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

ListBox lstLog = null [private]

Definition at line 200 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

double preManipulationHorizontalOffset = 0.0 [private]

Definition at line 203 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

double preManipulationVerticalOffset = 0.0 [private]

Definition at line 204 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

FrameworkElement scrolledElement = null [private]

Definition at line 202 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

CompositionPropertySet verticalPS = null [private]

Definition at line 197 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

IScrollController verticalScrollController = null [private]

Definition at line 199 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

Property Documentation

IScrollController HorizontalScrollController [get, set]

Definition at line 326 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

bool IsEnabled [get, set]

Definition at line 244 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

bool IsLogging [get, set]

Definition at line 238 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

IScrollController VerticalScrollController [get, set]

Definition at line 367 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterWithSimpleScrollControllersPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Category Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Category
Public Member Functions | Properties

Category Class Reference

List of all members.

Public Member Functions

Category (String content, String name, String icon, ObservableCollection< Category > children, bool selectsOnInvoked)

Properties

ObservableCollection< Category > | Children [get, set]
String | Content [get, set]
String | Icon [get, set]
String | Name [get, set]
bool | SelectsOnInvoked [get, set]

Detailed Description

Definition at line 13 of file HierarchicalNavigationViewDataBinding.xaml.cs.

Constructor & Destructor Documentation

Category | ( | String | content,
 |  | String | name,
 |  | String | icon,
 |  | ObservableCollection< Category > | children,
 |  | bool | selectsOnInvoked |
 | ) |  |  | [inline]

Definition at line 21 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            this.Content = content;
            this.Name = name;
            this.Icon = icon;
            this.Children = children;
            this.SelectsOnInvoked = selectsOnInvoked;
        }

Property Documentation

ObservableCollection<Category> Children [get, set]

Definition at line 18 of file HierarchicalNavigationViewDataBinding.xaml.cs.

String Content [get, set]

Definition at line 15 of file HierarchicalNavigationViewDataBinding.xaml.cs.

String Icon [get, set]

Definition at line 17 of file HierarchicalNavigationViewDataBinding.xaml.cs.

String Name [get, set]

Definition at line 16 of file HierarchicalNavigationViewDataBinding.xaml.cs.

bool SelectsOnInvoked [get, set]

Definition at line 19 of file HierarchicalNavigationViewDataBinding.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewDataBinding.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CheckBoxPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CheckBoxPage
Public Member Functions

CheckBoxPage Class Reference

List of all members.

Public Member Functions

CheckBoxPage ()
void OnReverseButtonClicked (object sender, object args)

Detailed Description

Definition at line 7 of file CheckBoxPage.xaml.cs.

Constructor & Destructor Documentation

CheckBoxPage ( ) [inline]

Definition at line 9 of file CheckBoxPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void OnReverseButtonClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 13 of file CheckBoxPage.xaml.cs.

        {
            var isChecked = ThreeStateCheckbox.IsChecked;
            if (isChecked.HasValue && isChecked.Value)
            {
                ThreeStateCheckbox.IsChecked = false;
            }
            else if(isChecked.HasValue && !isChecked.Value)
            {
                ThreeStateCheckbox.IsChecked = null;
            }
            else if(!isChecked.HasValue)
            {
                ThreeStateCheckbox.IsChecked = true;
            }
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CheckBoxPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ColorItem
Properties | Private Attributes

ColorItem Class Reference

List of all members.

Properties

SolidColorBrush | ColorBrush [get, set]
string | Title [get, set]

Private Attributes

SolidColorBrush | colorBrush = new SolidColorBrush(Microsoft.UI.Colors.Red)
string | title

Detailed Description

Definition at line 22 of file RevealScenarioColors.xaml.cs.

Member Data Documentation

SolidColorBrush colorBrush = new SolidColorBrush(Microsoft.UI.Colors.Red) [private]

Definition at line 25 of file RevealScenarioColors.xaml.cs.

string title [private]

Definition at line 24 of file RevealScenarioColors.xaml.cs.

Property Documentation

SolidColorBrush ColorBrush [get, set]

Definition at line 28 of file RevealScenarioColors.xaml.cs.

string Title [get, set]

Definition at line 27 of file RevealScenarioColors.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioColors.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ColorPickerPage
Public Member Functions | Private Member Functions | Private Attributes

ColorPickerPage Class Reference

List of all members.

Public Member Functions

ColorPickerPage ()

Private Member Functions

void | ColorBlueButton_Click (object sender, RoutedEventArgs e)
void | ColorGreenButton_Click (object sender, RoutedEventArgs e)
void | ColorNameToolTipContentChanged (DependencyObject o, DependencyProperty p)
void | ColorPicker_ColorChanged (ColorPicker sender, ColorChangedEventArgs args)
void | ColorPicker_Loaded (object sender, RoutedEventArgs e)
void | ColorRedButton_Click (object sender, RoutedEventArgs e)
void | ColorSpectrumComponentsComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ColorSpectrumImage_SizeChanged (object sender, SizeChangedEventArgs e)
void | ColorSpectrumShapeComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ColorWhiteButton_Click (object sender, RoutedEventArgs e)
void | FindAndGiveAutomationIdToVisualChild (string childName)
void | OrientationComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PreviousColorBlueButton_Click (object sender, RoutedEventArgs e)
void | PreviousColorCurrentColorButton_Click (object sender, RoutedEventArgs e)
void | PreviousColorGreenButton_Click (object sender, RoutedEventArgs e)
void | PreviousColorNullButton_Click (object sender, RoutedEventArgs e)
void | PreviousColorRectangleFillChanged (DependencyObject o, DependencyProperty p)
void | PreviousColorRedButton_Click (object sender, RoutedEventArgs e)
void | RTLCheckBox_Checked (object sender, RoutedEventArgs e)
void | RTLCheckBox_Unchecked (object sender, RoutedEventArgs e)
void | SelectionEllipsePositionChanged (DependencyObject o, DependencyProperty p)
void | SelectionEllipseStrokeChanged (DependencyObject o, DependencyProperty p)
void | SpectrumRectangleFillChanged (DependencyObject o, DependencyProperty p)
void | TestPage_GotFocus (object sender, RoutedEventArgs e)
void | ThemeDarkButton_Click (object sender, RoutedEventArgs e)
void | ThemeLightButton_Click (object sender, RoutedEventArgs e)
void | UpdateHeightFromInputTarget ()
void | UpdateSelectedColorName ()
void | UpdateSelectionEllipseColor ()
void | UpdateSelectionEllipsePosition ()

Private Attributes

ToolTip | colorNameToolTip
FrameworkElement | colorSpectrumInputTarget
ButtonBase | moreButton
Rectangle | previousColorRectangle
Ellipse | selectionEllipse
Panel | selectionEllipsePanel
Rectangle | spectrumRectangle

Detailed Description

Definition at line 16 of file ColorPickerPage.xaml.cs.

Constructor & Destructor Documentation

ColorPickerPage ( ) [inline]

Definition at line 26 of file ColorPickerPage.xaml.cs.

        {
            this.InitializeComponent();

            // Initialize the ColorPicker to a known default color so we have a known starting point.
            this.ColorPicker.Color = Microsoft.UI.Colors.Red;

            this.ColorPicker.Loaded += ColorPicker_Loaded;

            spectrumRectangle = null;
            colorSpectrumInputTarget = null;
            previousColorRectangle = null;
            moreButton = null;

            this.RedTextBlock.Text = this.ColorPicker.Color.R.ToString();
            this.GreenTextBlock.Text = this.ColorPicker.Color.G.ToString();
            this.BlueTextBlock.Text = this.ColorPicker.Color.B.ToString();
            this.AlphaTextBlock.Text = this.ColorPicker.Color.A.ToString();

            var verifySubclass = new MyColorSpectrum();
        }

Member Function Documentation

void ColorBlueButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 332 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.Color = Microsoft.UI.Colors.Blue;
        }

void ColorGreenButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 327 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.Color = Microsoft.UI.Colors.Green;
        }

void ColorNameToolTipContentChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 210 of file ColorPickerPage.xaml.cs.

        {
            UpdateSelectedColorName();
        }

void ColorPicker_ColorChanged | ( | ColorPicker | sender,
 |  | ColorChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 276 of file ColorPickerPage.xaml.cs.

        {
            this.ColorFromEventRectangle.Fill = new SolidColorBrush(args.NewColor);

            this.RedTextBlock.Text = args.NewColor.R.ToString();
            this.GreenTextBlock.Text = args.NewColor.G.ToString();
            this.BlueTextBlock.Text = args.NewColor.B.ToString();
            this.AlphaTextBlock.Text = args.NewColor.A.ToString();

            this.OldRedTextBlock.Text = args.OldColor.R.ToString();
            this.OldGreenTextBlock.Text = args.OldColor.G.ToString();
            this.OldBlueTextBlock.Text = args.OldColor.B.ToString();
            this.OldAlphaTextBlock.Text = args.OldColor.A.ToString();
        }

void ColorPicker_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file ColorPickerPage.xaml.cs.

        {
            FindAndGiveAutomationIdToVisualChild("ColorSpectrum");

            spectrumRectangle = FindVisualChildByName(this.ColorPicker, "SpectrumRectangle") as Rectangle;

            if (spectrumRectangle != null)
            {
                spectrumRectangle.RegisterPropertyChangedCallback(Shape.FillProperty, new DependencyPropertyChangedCallback(SpectrumRectangleFillChanged));
            }

            colorSpectrumInputTarget = FindVisualChildByName(this.ColorPicker, "InputTarget") as FrameworkElement;

            if (colorSpectrumInputTarget != null)
            {
                UpdateHeightFromInputTarget();
                colorSpectrumInputTarget.SizeChanged += ColorSpectrumImage_SizeChanged;
            }

            ComboBox comboBox = FindVisualChildByName(this.ColorPicker, "ColorRepresentationComboBox") as ComboBox;

            if (comboBox != null)
            {
                AutomationProperties.SetAutomationId(comboBox.Items[0] as DependencyObject, "RGBComboBoxItem");
                AutomationProperties.SetAutomationId(comboBox.Items[1] as DependencyObject, "HSVComboBoxItem");
            }

            previousColorRectangle = FindVisualChildByName(this.ColorPicker, "PreviousColorRectangle") as Rectangle;

            if (previousColorRectangle != null)
            {
                previousColorRectangle.RegisterPropertyChangedCallback(Rectangle.FillProperty, new DependencyPropertyChangedCallback(PreviousColorRectangleFillChanged));
            }

            selectionEllipsePanel = FindVisualChildByName(this.ColorPicker, "SelectionEllipsePanel") as Panel;

            if (selectionEllipsePanel != null)
            {
                selectionEllipsePanel.RegisterPropertyChangedCallback(Canvas.LeftProperty, new DependencyPropertyChangedCallback(SelectionEllipsePositionChanged));
                selectionEllipsePanel.RegisterPropertyChangedCallback(Canvas.TopProperty, new DependencyPropertyChangedCallback(SelectionEllipsePositionChanged));

                UpdateSelectionEllipsePosition();
            }

            selectionEllipse = FindVisualChildByName(this.ColorPicker, "SelectionEllipse") as Ellipse;

            if (selectionEllipse != null)
            {
                selectionEllipse.RegisterPropertyChangedCallback(Ellipse.StrokeProperty, new DependencyPropertyChangedCallback(SelectionEllipseStrokeChanged));

                UpdateSelectionEllipseColor();

                colorNameToolTip = ToolTipService.GetToolTip(selectionEllipse) as ToolTip;

                if (colorNameToolTip != null)
                {
                    colorNameToolTip.RegisterPropertyChangedCallback(ToolTip.ContentProperty, new DependencyPropertyChangedCallback(ColorNameToolTipContentChanged));
                    UpdateSelectedColorName();
                }
            }

            moreButton = FindVisualChildByName(this.ColorPicker, "MoreButton") as ButtonBase;

            if (moreButton != null)
            {
                AutomationProperties.SetAutomationId(moreButton, "MoreButton");
            }

            FindAndGiveAutomationIdToVisualChild("ThirdDimensionSlider");
            FindAndGiveAutomationIdToVisualChild("AlphaSlider");
            FindAndGiveAutomationIdToVisualChild("MoreButtonLabel");
            FindAndGiveAutomationIdToVisualChild("ColorRepresentationComboBox");
            FindAndGiveAutomationIdToVisualChild("RedTextBox");
            FindAndGiveAutomationIdToVisualChild("RedLabel");
            FindAndGiveAutomationIdToVisualChild("GreenTextBox");
            FindAndGiveAutomationIdToVisualChild("GreenLabel");
            FindAndGiveAutomationIdToVisualChild("BlueTextBox");
            FindAndGiveAutomationIdToVisualChild("BlueLabel");
            FindAndGiveAutomationIdToVisualChild("HueTextBox");
            FindAndGiveAutomationIdToVisualChild("HueLabel");
            FindAndGiveAutomationIdToVisualChild("SaturationTextBox");
            FindAndGiveAutomationIdToVisualChild("SaturationLabel");
            FindAndGiveAutomationIdToVisualChild("ValueTextBox");
            FindAndGiveAutomationIdToVisualChild("ValueLabel");
            FindAndGiveAutomationIdToVisualChild("AlphaTextBox");
            FindAndGiveAutomationIdToVisualChild("AlphaLabel");
            FindAndGiveAutomationIdToVisualChild("HexTextBox");
        }

void ColorRedButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 322 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.Color = Microsoft.UI.Colors.Red;
        }

void ColorSpectrumComponentsComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 249 of file ColorPickerPage.xaml.cs.

        {
            ComboBox comboBox = (ComboBox)sender;

            switch (comboBox.SelectedIndex)
            {
                case 0:
                    this.ColorPicker.ColorSpectrumComponents = ColorSpectrumComponents.HueSaturation;
                    break;
                case 1:
                    this.ColorPicker.ColorSpectrumComponents = ColorSpectrumComponents.HueValue;
                    break;
                case 2:
                    this.ColorPicker.ColorSpectrumComponents = ColorSpectrumComponents.SaturationHue;
                    break;
                case 3:
                    this.ColorPicker.ColorSpectrumComponents = ColorSpectrumComponents.SaturationValue;
                    break;
                case 4:
                    this.ColorPicker.ColorSpectrumComponents = ColorSpectrumComponents.ValueHue;
                    break;
                case 5:
                    this.ColorPicker.ColorSpectrumComponents = ColorSpectrumComponents.ValueSaturation;
                    break;
            }
        }

void ColorSpectrumImage_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 220 of file ColorPickerPage.xaml.cs.

        {
            UpdateHeightFromInputTarget();
        }

void ColorSpectrumShapeComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 234 of file ColorPickerPage.xaml.cs.

        {
            ComboBox comboBox = (ComboBox)sender;

            switch (comboBox.SelectedIndex)
            {
                case 0:
                    this.ColorPicker.ColorSpectrumShape = ColorSpectrumShape.Box;
                    break;
                case 1:
                    this.ColorPicker.ColorSpectrumShape = ColorSpectrumShape.Ring;
                    break;
            }
        }

void ColorWhiteButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 317 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.Color = Microsoft.UI.Colors.White;
        }

void FindAndGiveAutomationIdToVisualChild ( string childName ) [inline, private]

Definition at line 291 of file ColorPickerPage.xaml.cs.

        {
            DependencyObject obj = FindVisualChildByName(this.ColorPicker, childName);

            if (obj != null)
            {
                AutomationProperties.SetAutomationId(obj, childName);
            }
        }

void OrientationComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 386 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.Orientation = ((e.AddedItems[0] as ComboBoxItem).Content as string) == "Horizontal" ? Orientation.Horizontal : Orientation.Vertical;
        }

void PreviousColorBlueButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 352 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.PreviousColor = Microsoft.UI.Colors.Blue;
        }

void PreviousColorCurrentColorButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 357 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.PreviousColor = this.ColorPicker.Color;
        }

void PreviousColorGreenButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 347 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.PreviousColor = Microsoft.UI.Colors.Green;
        }

void PreviousColorNullButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 337 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.PreviousColor = null;
        }

void PreviousColorRectangleFillChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 145 of file ColorPickerPage.xaml.cs.

        {
            if (previousColorRectangle != null)
            {
                SolidColorBrush previousColorBrush = previousColorRectangle.Fill as SolidColorBrush;

                if (previousColorBrush == null)
                {
                    this.PreviousRedTextBlock.Text = "";
                    this.PreviousGreenTextBlock.Text = "";
                    this.PreviousBlueTextBlock.Text = "";
                    this.PreviousAlphaTextBlock.Text = "";
                }
                else
                {
                    Color previousColor = previousColorBrush.Color;

                    this.PreviousRedTextBlock.Text = previousColor.R.ToString();
                    this.PreviousGreenTextBlock.Text = previousColor.G.ToString();
                    this.PreviousBlueTextBlock.Text = previousColor.B.ToString();
                    this.PreviousAlphaTextBlock.Text = previousColor.A.ToString();
                }
            }
        }

void PreviousColorRedButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 342 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.PreviousColor = Microsoft.UI.Colors.Red;
        }

void RTLCheckBox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 376 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.FlowDirection = FlowDirection.RightToLeft;
        }

void RTLCheckBox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 381 of file ColorPickerPage.xaml.cs.

        {
            this.ColorPicker.FlowDirection = FlowDirection.LeftToRight;
        }

void SelectionEllipsePositionChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 193 of file ColorPickerPage.xaml.cs.

        {
            UpdateSelectionEllipsePosition();
        }

void SelectionEllipseStrokeChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 170 of file ColorPickerPage.xaml.cs.

        {
            UpdateSelectionEllipseColor();
        }

void SpectrumRectangleFillChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 137 of file ColorPickerPage.xaml.cs.

        {
            if (spectrumRectangle != null && spectrumRectangle.Fill != null)
            {
                this.ColorSpectrumLoadedCheckBox.IsChecked = true;
            }
        }

void TestPage_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 362 of file ColorPickerPage.xaml.cs.

        {
            FrameworkElement focusedElement = e.OriginalSource as FrameworkElement;

            if (focusedElement != null)
            {
                this.CurrentlyFocusedElementTextBlock.Text = string.IsNullOrEmpty(focusedElement.Name) ? "(an unnamed element)" : focusedElement.Name;
            }
            else
            {
                this.CurrentlyFocusedElementTextBlock.Text = "(nothing)";
            }
        }

void ThemeDarkButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 309 of file ColorPickerPage.xaml.cs.

        {
            this.RequestedTheme = ElementTheme.Dark;
            this.MoreButtonBackgroundTextBlock.Text = (moreButton.Background as SolidColorBrush).Color.ToString();
            this.MoreButtonForegroundTextBlock.Text = (moreButton.Foreground as SolidColorBrush).Color.ToString();
            this.MoreButtonBorderBrushTextBlock.Text = (moreButton.BorderBrush as SolidColorBrush).Color.ToString();
        }

void ThemeLightButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 301 of file ColorPickerPage.xaml.cs.

        {
            this.RequestedTheme = ElementTheme.Light;
            this.MoreButtonBackgroundTextBlock.Text = (moreButton.Background as SolidColorBrush).Color.ToString();
            this.MoreButtonForegroundTextBlock.Text = (moreButton.Foreground as SolidColorBrush).Color.ToString();
            this.MoreButtonBorderBrushTextBlock.Text = (moreButton.BorderBrush as SolidColorBrush).Color.ToString();
        }

void UpdateHeightFromInputTarget ( ) [inline, private]

Definition at line 225 of file ColorPickerPage.xaml.cs.

        {
            if (colorSpectrumInputTarget != null)
            {
                this.WidthTextBlock.Text = colorSpectrumInputTarget.ActualWidth.ToString();
                this.HeightTextBlock.Text = colorSpectrumInputTarget.ActualHeight.ToString();
            }
        }

void UpdateSelectedColorName ( ) [inline, private]

Definition at line 215 of file ColorPickerPage.xaml.cs.

        {
            this.SelectedColorNameTextBlock.Text = colorNameToolTip.Content as string ?? "";
        }

void UpdateSelectionEllipseColor ( ) [inline, private]

Definition at line 175 of file ColorPickerPage.xaml.cs.

        {
            if (selectionEllipse != null)
            {
                SolidColorBrush selectionEllipseStrokeBrush = selectionEllipse.Stroke as SolidColorBrush;

                if (selectionEllipseStrokeBrush != null)
                {
                    Color selectionEllipseColor = selectionEllipseStrokeBrush.Color;

                    this.EllipseRedTextBlock.Text = selectionEllipseColor.R.ToString();
                    this.EllipseGreenTextBlock.Text = selectionEllipseColor.G.ToString();
                    this.EllipseBlueTextBlock.Text = selectionEllipseColor.B.ToString();
                    this.EllipseAlphaTextBlock.Text = selectionEllipseColor.A.ToString();
                }
            }
        }

void UpdateSelectionEllipsePosition ( ) [inline, private]

Definition at line 198 of file ColorPickerPage.xaml.cs.

        {
            if (selectionEllipse != null)
            {
                double ellipseX = Canvas.GetLeft(selectionEllipsePanel) + selectionEllipsePanel.Width / 2;
                double ellipseY = Canvas.GetTop(selectionEllipsePanel) + selectionEllipsePanel.Height / 2;

                this.EllipseXTextBlock.Text = Math.Round(ellipseX).ToString();
                this.EllipseYTextBlock.Text = Math.Round(ellipseY).ToString();
            }
        }

Member Data Documentation

ToolTip colorNameToolTip [private]

Definition at line 18 of file ColorPickerPage.xaml.cs.

FrameworkElement colorSpectrumInputTarget [private]

Definition at line 20 of file ColorPickerPage.xaml.cs.

ButtonBase moreButton [private]

Definition at line 24 of file ColorPickerPage.xaml.cs.

Rectangle previousColorRectangle [private]

Definition at line 21 of file ColorPickerPage.xaml.cs.

Ellipse selectionEllipse [private]

Definition at line 23 of file ColorPickerPage.xaml.cs.

Panel selectionEllipsePanel [private]

Definition at line 22 of file ColorPickerPage.xaml.cs.

Rectangle spectrumRectangle [private]

Definition at line 19 of file ColorPickerPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ColorPicker/TestUI/ColorPickerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorToSolidColorBrushConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ColorToSolidColorBrushConverter
Public Member Functions

ColorToSolidColorBrushConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 10 of file ColorToSolidColorBrushConverter.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 12 of file ColorToSolidColorBrushConverter.cs.

        {
            return new SolidColorBrush((Color)value);
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 17 of file ColorToSolidColorBrushConverter.cs.

        {
            return ((SolidColorBrush)value).Color;
        }

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/ColorToSolidColorBrushConverter.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBoxPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ComboBoxPage
Public Member Functions

ComboBoxPage Class Reference

List of all members.

Public Member Functions

ComboBoxPage ()

Detailed Description

Definition at line 7 of file ComboBoxPage.xaml.cs.

Constructor & Destructor Documentation

ComboBoxPage ( ) [inline]

Definition at line 9 of file ComboBoxPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • ComboBox/TestUI/ComboBoxPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarCenterPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CommandBarCenterPage
Public Member Functions

CommandBarCenterPage Class Reference

List of all members.

Public Member Functions

CommandBarCenterPage ()

Detailed Description

Definition at line 9 of file CommandBarCenterPage.xaml.cs.

Constructor & Destructor Documentation

CommandBarCenterPage ( ) [inline]

Definition at line 11 of file CommandBarCenterPage.xaml.cs.

        {
            this.InitializeComponent();

            navigateToCommandBarSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(CommandBarSummaryPage)); };
            navigateToCommandBar.Click += delegate { Frame.NavigateWithoutAnimation(typeof(CommandBarPage)); };
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CommandBarCenterPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutMainPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CommandBarFlyoutMainPage
Public Member Functions | Private Member Functions

CommandBarFlyoutMainPage Class Reference

List of all members.

Public Member Functions

CommandBarFlyoutMainPage ()
void | OnCommandBarFlyoutTestsClicked (object sender, object args)
void | OnExtraCommandBarFlyoutTestsClicked (object sender, object args)
void | OnTextCommandBarFlyoutTestsClicked (object sender, object args)

Private Member Functions

void | CmbCommandBarFlyoutOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 11 of file CommandBarFlyoutMainPage.xaml.cs.

Constructor & Destructor Documentation

CommandBarFlyoutMainPage ( ) [inline]

Definition at line 13 of file CommandBarFlyoutMainPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void CmbCommandBarFlyoutOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 35 of file CommandBarFlyoutMainPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                "CommandBarFlyout",
                cmbCommandBarFlyoutOutputDebugStringLevel.SelectedIndex == 1 || cmbCommandBarFlyoutOutputDebugStringLevel.SelectedIndex == 2,
                cmbCommandBarFlyoutOutputDebugStringLevel.SelectedIndex == 2);
        }

void OnCommandBarFlyoutTestsClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 18 of file CommandBarFlyoutMainPage.xaml.cs.

        {
            var rootFrame = XamlRoot.Content as Frame;
            rootFrame.NavigateWithoutAnimation(typeof(CommandBarFlyoutPage), "CommandBarFlyout Tests");
        }

void OnExtraCommandBarFlyoutTestsClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 30 of file CommandBarFlyoutMainPage.xaml.cs.

        {
            var rootFrame = XamlRoot.Content as Frame;
            rootFrame.NavigateWithoutAnimation(typeof(ExtraCommandBarFlyoutPage), "Extra CommandBarFlyout Tests");
        }

void OnTextCommandBarFlyoutTestsClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 24 of file CommandBarFlyoutMainPage.xaml.cs.

        {
            var rootFrame = XamlRoot.Content as Frame;
            rootFrame.NavigateWithoutAnimation(typeof(TextCommandBarFlyoutPage), "TextCommandBarFlyout Tests");
        }

The documentation for this class was generated from the following file:
  • CommandBarFlyout/TestUI/CommandBarFlyoutMainPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CommandBarFlyoutPage
Public Member Functions | Private Member Functions | Private Attributes

CommandBarFlyoutPage Class Reference

List of all members.

Public Member Functions

CommandBarFlyoutPage ()
void | OnElementChecked (object sender, object args)
void | OnElementClicked (object sender, object args)
void | OnElementUnchecked (object sender, object args)
void | OnFlyoutClosed (object sender, object args)
void | OnFlyoutOpened (object sender, object args)

Private Member Functions

void | AddFlyoutTimer_Tick (object sender, object e)
void | ClearPrimaryCommandsTimer_Tick (object sender, object e)
void | ClearSecondaryCommandsTimer_Tick (object sender, object e)
void | DynamicCommandTimer_Tick (object sender, object e)
void | DynamicLabelTimer_Tick (object sender, object e)
void | DynamicVisibilityTimer_Tick (object sender, object e)
void | DynamicWidthTimer_Tick (object sender, object e)
void | IsRTLCheckBox_Checked (object sender, RoutedEventArgs e)
void | IsRTLCheckBox_Unchecked (object sender, RoutedEventArgs e)
void | OnEditCommandCount6Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget10Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget11Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget12Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget13Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget14Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget15Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget16Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget1Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget2Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget3Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget4Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget5Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget6Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget7Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget8Click (object sender, RoutedEventArgs e)
void | OnFlyoutTarget9Click (object sender, RoutedEventArgs e)
void | OverflowContentRoot_SizeChanged (object sender, SizeChangedEventArgs e)
void | RecordEvent (string eventString)
void | RecordEvent (object sender, string eventString)
void | SecondaryCommandAsFE_Loaded (object sender, RoutedEventArgs e)
void | SetClearPrimaryCommandsFlyout (CommandBarFlyout commandBarFlyout)
void | SetClearSecondaryCommandsFlyout (CommandBarFlyout commandBarFlyout)
void | SetDynamicLabelSecondaryCommand (AppBarButton appBarButton)
void | SetDynamicOverflowContentRoot (FrameworkElement overflowContentRoot)
void | SetDynamicPrimaryCommand ()
void | SetDynamicVisibilitySecondaryCommand (AppBarButton appBarButton)
void | ShowFlyoutAt (FlyoutBase flyout, FrameworkElement targetElement, FlyoutShowMode showMode=FlyoutShowMode.Transient)
void | UndoButtonOverflow16_SizeChanged (object sender, SizeChangedEventArgs e)

Private Attributes

DispatcherTimer | addFlyoutTimer = new DispatcherTimer()
Style | animatedCommandBarFlyoutCommandBarStyle
CommandBarFlyout clearPrimaryCommandsFlyout
DispatcherTimer | clearPrimaryCommandsTimer = new DispatcherTimer()
CommandBarFlyout clearSecondaryCommandsFlyout
DispatcherTimer | clearSecondaryCommandsTimer = new DispatcherTimer()
CommandBarFlyout dynamicCommandBarFlyout
DispatcherTimer | dynamicCommandTimer = new DispatcherTimer()
int | dynamicLabelChangeCount
AppBarButton | dynamicLabelSecondaryCommand
DispatcherTimer | dynamicLabelTimer = new DispatcherTimer()
int | dynamicVisibilityChangeCount
AppBarButton | dynamicVisibilitySecondaryCommand
DispatcherTimer | dynamicVisibilityTimer = new DispatcherTimer()
int | dynamicWidthChangeCount
FrameworkElement | dynamicWidthOverflowContentRoot
DispatcherTimer | dynamicWidthTimer = new DispatcherTimer()
MenuFlyout | flyoutToAdd = new MenuFlyout()
string | originalLabelSecondaryCommand
Visibility | originalVisibilitySecondaryCommand
double | originalWidthOverflowContentRoot

Detailed Description

Definition at line 18 of file CommandBarFlyoutPage.xaml.cs.

Constructor & Destructor Documentation

CommandBarFlyoutPage ( ) [inline]

Definition at line 46 of file CommandBarFlyoutPage.xaml.cs.

        {
            this.InitializeComponent();

            animatedCommandBarFlyoutCommandBarStyle = this.Resources["animatedCommandBarFlyoutCommandBarStyle"] as Style;

            dynamicLabelTimer.Tick += DynamicLabelTimer_Tick;
            dynamicVisibilityTimer.Tick += DynamicVisibilityTimer_Tick;
            dynamicWidthTimer.Tick += DynamicWidthTimer_Tick;
            dynamicCommandTimer.Tick += DynamicCommandTimer_Tick;

            clearSecondaryCommandsTimer.Interval = new TimeSpan(0, 0, 3 /*sec*/);
            clearSecondaryCommandsTimer.Tick += ClearSecondaryCommandsTimer_Tick;

            clearSecondaryCommandsTimer.Interval = new TimeSpan(0, 0, 3 /*sec*/);
            clearPrimaryCommandsTimer.Tick += ClearPrimaryCommandsTimer_Tick;

            addFlyoutTimer.Interval = new TimeSpan(0, 0, 1 /*sec*/);
            addFlyoutTimer.Tick += AddFlyoutTimer_Tick;

            flyoutToAdd.Items.Add(new MenuFlyoutItem() { Text = "This" });
            flyoutToAdd.Items.Add(new MenuFlyoutItem() { Text = "That" });

            UndoButton1.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton2.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton3.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton4.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton5.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton6.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton7.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton11.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton12.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton13.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton14.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
            UndoButton15.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });

            RedoButton1.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton2.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton3.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton4.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton5.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton6.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton7.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton11.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton12.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton13.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton14.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton15.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
            RedoButton16.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });

            SelectAllButton1.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton2.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton3.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton4.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton5.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton6.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton7.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton11.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton12.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton13.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton14.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton15.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
            SelectAllButton16.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });

            FlyoutTarget1.ContextFlyout = Flyout1;
            FlyoutTarget2.ContextFlyout = Flyout2;
            FlyoutTarget3.ContextFlyout = Flyout3;
            FlyoutTarget4.ContextFlyout = Flyout4;
            FlyoutTarget5.ContextFlyout = Flyout5;
            FlyoutTarget6.ContextFlyout = Flyout6;
            FlyoutTarget7.ContextFlyout = Flyout7;
            FlyoutTarget11.ContextFlyout = Flyout11;
            FlyoutTarget12.ContextFlyout = Flyout12;
            FlyoutTarget13.ContextFlyout = Flyout13;
            FlyoutTarget14.ContextFlyout = Flyout14;
            FlyoutTarget15.ContextFlyout = Flyout15;
            FlyoutTarget16.ContextFlyout = Flyout16;

            Flyout1.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout2.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout3.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout4.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout5.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout6.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout7.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout11.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout12.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout13.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout14.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout15.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            Flyout16.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;

            Flyout16.Opening += (object sender, object args) =>
            {
                addFlyoutTimer.Start();
            };

            Flyout16.Closed += (object sender, object args) =>
            {
                UndoButton16.Visibility = Visibility.Visible;
                UndoButtonOverflow16.Visibility = Visibility.Collapsed;
                UndoButtonOverflow16.Flyout = null;

                StatusReportingTextBox.Text = string.Empty;
                ExtraInformationTextBox.Text = string.Empty;
            };
        }

Member Function Documentation

void AddFlyoutTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 537 of file CommandBarFlyoutPage.xaml.cs.

        {
            UndoButtonOverflow16.SizeChanged += UndoButtonOverflow16_SizeChanged;

            UndoButton16.Visibility = Visibility.Collapsed;
            UndoButtonOverflow16.Visibility = Visibility.Visible;
            UndoButtonOverflow16.Flyout = flyoutToAdd;
            addFlyoutTimer.Stop();
        }

void ClearPrimaryCommandsTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 529 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (clearPrimaryCommandsFlyout != null)
            {
                clearPrimaryCommandsFlyout.PrimaryCommands.Clear();
            }
        }

void ClearSecondaryCommandsTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 521 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (clearSecondaryCommandsFlyout != null)
            {
                clearSecondaryCommandsFlyout.SecondaryCommands.Clear();
            }
        }

void DynamicCommandTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 610 of file CommandBarFlyoutPage.xaml.cs.

        {
            dynamicCommandBarFlyout.PrimaryCommands.Add(new AppBarButton() {
                Content = new TextBlock() { Text = "Test" }
            });

            PrimaryCommandDynamicallyAddedCheckBox.IsChecked = true;

            if (--dynamicLabelChangeCount == 0)
            {
                dynamicCommandTimer.Stop();
            }
        }

void DynamicLabelTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 547 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (dynamicLabelSecondaryCommand != null)
            {
                if (dynamicLabelSecondaryCommand.Label == originalLabelSecondaryCommand)
                {
                    // Testing dynamic label expansion
                    dynamicLabelSecondaryCommand.Label += " with an expanded label";
                }
                else
                {
                    // Testing dynamic label shrinkage
                    dynamicLabelSecondaryCommand.Label = originalLabelSecondaryCommand;
                }

                SecondaryCommandDynamicLabelChangedCheckBox.IsChecked = true;

                if (--dynamicLabelChangeCount == 0)
                {
                    dynamicLabelTimer.Stop();
                }
            }
        }

void DynamicVisibilityTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 571 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (dynamicVisibilitySecondaryCommand != null)
            {
                dynamicVisibilitySecondaryCommand.Visibility = dynamicVisibilitySecondaryCommand.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;

                SecondaryCommandDynamicVisibilityChangedCheckBox.IsChecked = true;

                if (--dynamicVisibilityChangeCount == 0)
                {
                    dynamicVisibilityTimer.Stop();
                }
            }
        }

void DynamicWidthTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 586 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (dynamicWidthOverflowContentRoot != null)
            {
                if (dynamicWidthOverflowContentRoot.ActualWidth == originalWidthOverflowContentRoot)
                {
                    // Testing dynamic size expansion
                    dynamicWidthOverflowContentRoot.Width = dynamicWidthOverflowContentRoot.ActualWidth + 24.0;
                }
                else
                {
                    // Testing dynamic size shrinkage
                    dynamicWidthOverflowContentRoot.Width = originalWidthOverflowContentRoot;
                }

                OverflowContentRootDynamicWidthChangedCheckBox.IsChecked = true;

                if (--dynamicWidthChangeCount == 0)
                {
                    dynamicWidthTimer.Stop();
                }
            }
        }

void IsRTLCheckBox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 624 of file CommandBarFlyoutPage.xaml.cs.

        {
            FlowDirection = FlowDirection.RightToLeft;
        }

void IsRTLCheckBox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 629 of file CommandBarFlyoutPage.xaml.cs.

        {
            FlowDirection = FlowDirection.LeftToRight;
        }

void OnEditCommandCount6Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 634 of file CommandBarFlyoutPage.xaml.cs.

        {
            var flyout6 = Flyout6 as CommandBarFlyout;

            if (flyout6.PrimaryCommands.Count() == 0)
            {
                flyout6.PrimaryCommands.Add(new AppBarButton() {
                    Content = new TextBlock() { Text = "Test" }
                });
            }
            else
            {
                flyout6.PrimaryCommands.RemoveAt(0);
            }
        }

void OnElementChecked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 159 of file CommandBarFlyoutPage.xaml.cs.

        {
            RecordEvent(sender, "checked");
        }

void OnElementClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 154 of file CommandBarFlyoutPage.xaml.cs.

        {
            RecordEvent(sender, "clicked");
        }

void OnElementUnchecked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 164 of file CommandBarFlyoutPage.xaml.cs.

        {
            RecordEvent(sender, "unchecked");
        }

void OnFlyoutClosed | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 220 of file CommandBarFlyoutPage.xaml.cs.

        {
            IsFlyoutOpenCheckBox.IsChecked = false;
            SetDynamicLabelSecondaryCommand(null);
            SetDynamicVisibilitySecondaryCommand(null);
            SetDynamicOverflowContentRoot(null);
            SetClearSecondaryCommandsFlyout(null);

            if ((bool)HideFlyoutOnFlyoutClosedCheckBox.IsChecked)
            {
                var commandBarFlyout = sender as CommandBarFlyout;

                if (commandBarFlyout != null)
                {
                    commandBarFlyout.Hide();
                }
            }
        }

void OnFlyoutOpened | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 169 of file CommandBarFlyoutPage.xaml.cs.

        {
            IsFlyoutOpenCheckBox.IsChecked = true;

            CommandBarFlyout commandBarFlyout = sender as CommandBarFlyout;

            if (commandBarFlyout != null)
            {
                if ((bool)UseOverflowContentRootDynamicWidthCheckBox.IsChecked && commandBarFlyout.SecondaryCommands != null && commandBarFlyout.SecondaryCommands.Count > 0)
                {
                    FrameworkElement secondaryCommandAsFE = commandBarFlyout.SecondaryCommands[0] as FrameworkElement;
                    FrameworkElement overflowContentRoot = secondaryCommandAsFE.FindVisualParentByName("OverflowContentRoot");

                    if (overflowContentRoot == null)
                    {
                        secondaryCommandAsFE.Loaded += SecondaryCommandAsFE_Loaded;
                    }
                    else
                    {
                        SetDynamicOverflowContentRoot(overflowContentRoot);
                    }
                }

                if (animatedCommandBarFlyoutCommandBarStyle != null && (bool)UseAnimatedCommandBarFlyoutCommandBarStyleCheckBox.IsChecked && commandBarFlyout.PrimaryCommands != null && commandBarFlyout.PrimaryCommands.Count > 0)
                {
                    FrameworkElement primaryCommandAsFE = commandBarFlyout.PrimaryCommands[0] as FrameworkElement;

                    if (primaryCommandAsFE != null)
                    {
                        var commandBarFlyoutCommandBar = primaryCommandAsFE.FindVisualParentByType<CommandBarFlyoutCommandBar>();

                        if (commandBarFlyoutCommandBar != null)
                        {
                            commandBarFlyoutCommandBar.Style = animatedCommandBarFlyoutCommandBarStyle;
                        }
                    }
                }
            }
        }

void OnFlyoutTarget10Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 299 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout10, FlyoutTarget10);
        }

void OnFlyoutTarget11Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 304 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout11, FlyoutTarget11, FlyoutShowMode.Standard);
        }

void OnFlyoutTarget12Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 309 of file CommandBarFlyoutPage.xaml.cs.

        {
            DispatcherTimer showFlyoutTimer = new();
            showFlyoutTimer.Interval = TimeSpan.FromSeconds(5);
            showFlyoutTimer.Tick += (object sender, object args) =>
            {
                ShowFlyoutAt(Flyout12, FlyoutTarget12, FlyoutShowMode.Standard);
                showFlyoutTimer.Stop();
            };
            showFlyoutTimer.Start();
        }

void OnFlyoutTarget13Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 321 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout13, FlyoutTarget13);
        }

void OnFlyoutTarget14Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 326 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout14, FlyoutTarget14);
        }

void OnFlyoutTarget15Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 331 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout15, FlyoutTarget15);
        }

void OnFlyoutTarget16Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 336 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout16, FlyoutTarget16);
        }

void OnFlyoutTarget1Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 254 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout1, FlyoutTarget1);
        }

void OnFlyoutTarget2Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 259 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout2, FlyoutTarget2);
        }

void OnFlyoutTarget3Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 264 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout3, FlyoutTarget3);
        }

void OnFlyoutTarget4Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 269 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout4, FlyoutTarget4);
        }

void OnFlyoutTarget5Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 274 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout5, FlyoutTarget5);
        }

void OnFlyoutTarget6Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 279 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout6, FlyoutTarget6, FlyoutShowMode.Standard);
        }

void OnFlyoutTarget7Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 284 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout7, FlyoutTarget7);
        }

void OnFlyoutTarget8Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 289 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout8, FlyoutTarget8);
        }

void OnFlyoutTarget9Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 294 of file CommandBarFlyoutPage.xaml.cs.

        {
            ShowFlyoutAt(Flyout9, FlyoutTarget9);
        }

void OverflowContentRoot_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 505 of file CommandBarFlyoutPage.xaml.cs.

        {
            FrameworkElement overflowContentRoot = sender as FrameworkElement;

            overflowContentRoot.SizeChanged -= OverflowContentRoot_SizeChanged;

            SetDynamicOverflowContentRoot(overflowContentRoot);
        }

void RecordEvent | ( | object | sender,
 |  | string | eventString |
 | ) |  |  | [inline, private]

Definition at line 244 of file CommandBarFlyoutPage.xaml.cs.

        {
            DependencyObject senderAsDO = sender as DependencyObject;

            if (senderAsDO != null)
            {
                RecordEvent(AutomationProperties.GetAutomationId(senderAsDO) + " " + eventString);
            }
        }

void RecordEvent ( string eventString ) [inline, private]

Definition at line 239 of file CommandBarFlyoutPage.xaml.cs.

        {
            StatusReportingTextBox.Text = eventString;
        }

void SecondaryCommandAsFE_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 209 of file CommandBarFlyoutPage.xaml.cs.

        {
            FrameworkElement secondaryCommandAsFE = sender as FrameworkElement;

            secondaryCommandAsFE.Loaded -= SecondaryCommandAsFE_Loaded;

            FrameworkElement overflowContentRoot = secondaryCommandAsFE.FindVisualParentByName("OverflowContentRoot");

            SetDynamicOverflowContentRoot(overflowContentRoot);
        }

void SetClearPrimaryCommandsFlyout ( CommandBarFlyout commandBarFlyout ) [inline, private]

Definition at line 403 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (commandBarFlyout == null)
            {
                clearPrimaryCommandsFlyout = null;
                clearPrimaryCommandsTimer.Stop();
            }
            else
            {
                clearPrimaryCommandsFlyout = commandBarFlyout;
                clearPrimaryCommandsTimer.Start();
            }
        }

void SetClearSecondaryCommandsFlyout ( CommandBarFlyout commandBarFlyout ) [inline, private]

Definition at line 389 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (commandBarFlyout == null)
            {
                clearSecondaryCommandsFlyout = null;
                clearSecondaryCommandsTimer.Stop();
            }
            else
            {
                clearSecondaryCommandsFlyout = commandBarFlyout;
                clearSecondaryCommandsTimer.Start();
            }
        }

void SetDynamicLabelSecondaryCommand ( AppBarButton appBarButton ) [inline, private]

Definition at line 417 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (appBarButton == null)
            {
                if (dynamicLabelSecondaryCommand != null)
                {
                    if (dynamicLabelSecondaryCommand.Label != originalLabelSecondaryCommand)
                    {
                        dynamicLabelSecondaryCommand.Label = originalLabelSecondaryCommand;
                        SecondaryCommandDynamicLabelChangedCheckBox.IsChecked = true;
                    }
                    dynamicLabelSecondaryCommand = null;
                    dynamicLabelTimer.Stop();
                }
            }
            else
            {
                if (dynamicLabelSecondaryCommand == null)
                {
                    originalLabelSecondaryCommand = appBarButton.Label;
                    dynamicLabelSecondaryCommand = appBarButton;
                    dynamicLabelTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicLabelTimerIntervalTextBox.Text) /*msec*/);
                    dynamicLabelChangeCount = int.Parse(DynamicLabelChangeCountTextBox.Text);
                    dynamicLabelTimer.Start();
                }
            }
        }

void SetDynamicOverflowContentRoot ( FrameworkElement overflowContentRoot ) [inline, private]

Definition at line 473 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (overflowContentRoot == null)
            {
                if (dynamicWidthOverflowContentRoot != null)
                {
                    if (dynamicWidthOverflowContentRoot.ActualWidth != originalWidthOverflowContentRoot)
                    {
                        dynamicWidthOverflowContentRoot.Width = originalWidthOverflowContentRoot;
                        OverflowContentRootDynamicWidthChangedCheckBox.IsChecked = true;
                    }
                    dynamicWidthOverflowContentRoot = null;
                    dynamicWidthTimer.Stop();
                }
            }
            else if (dynamicWidthOverflowContentRoot == null)
            {
                if (overflowContentRoot.ActualWidth == 0.0)
                {
                    overflowContentRoot.SizeChanged += OverflowContentRoot_SizeChanged;
                }
                else
                {
                    originalWidthOverflowContentRoot = overflowContentRoot.ActualWidth;
                    dynamicWidthOverflowContentRoot = overflowContentRoot;
                    dynamicWidthTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicWidthTimerIntervalTextBox.Text) /*msec*/);
                    dynamicWidthChangeCount = int.Parse(DynamicWidthChangeCountTextBox.Text);
                    dynamicWidthTimer.Start();
                }
            }
        }

void SetDynamicPrimaryCommand ( ) [inline, private]

Definition at line 514 of file CommandBarFlyoutPage.xaml.cs.

        {
            dynamicCommandTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicLabelTimerIntervalTextBox.Text) /*msec*/);
            dynamicLabelChangeCount = int.Parse(DynamicLabelChangeCountTextBox.Text);
            dynamicCommandTimer.Start();
        }

void SetDynamicVisibilitySecondaryCommand ( AppBarButton appBarButton ) [inline, private]

Definition at line 445 of file CommandBarFlyoutPage.xaml.cs.

        {
            if (appBarButton == null)
            {
                if (dynamicVisibilitySecondaryCommand != null)
                {
                    if (dynamicVisibilitySecondaryCommand.Visibility != originalVisibilitySecondaryCommand)
                    {
                        dynamicVisibilitySecondaryCommand.Visibility = originalVisibilitySecondaryCommand;
                        SecondaryCommandDynamicVisibilityChangedCheckBox.IsChecked = true;
                    }
                    dynamicVisibilitySecondaryCommand = null;
                    dynamicVisibilityTimer.Stop();
                }
            }
            else
            {
                if (dynamicVisibilitySecondaryCommand == null)
                {
                    originalVisibilitySecondaryCommand = appBarButton.Visibility;
                    dynamicVisibilitySecondaryCommand = appBarButton;
                    dynamicVisibilityTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicVisibilityTimerIntervalTextBox.Text) /*msec*/);
                    dynamicVisibilityChangeCount = int.Parse(DynamicVisibilityChangeCountTextBox.Text);
                    dynamicVisibilityTimer.Start();
                }
            }
        }

void ShowFlyoutAt | ( | FlyoutBase | flyout,
 |  | FrameworkElement | targetElement,
 |  | FlyoutShowMode | showMode = FlyoutShowMode.Transient |
 | ) |  |  | [inline, private]

Definition at line 341 of file CommandBarFlyoutPage.xaml.cs.

        {
            bool useSecondaryCommandDynamicLabel = (bool)UseSecondaryCommandDynamicLabelCheckBox.IsChecked;
            bool useSecondaryCommandDynamicVisibility = (bool)UseSecondaryCommandDynamicVisibilityCheckBox.IsChecked;
            bool clearSecondaryCommands = (bool)ClearSecondaryCommandsCheckBox.IsChecked;
            bool addPrimaryCommandDynamicallyCheckBox = (bool)AddPrimaryCommandDynamicallyCheckBox.IsChecked;
            bool clearPrimaryCommands = (bool)ClearPrimaryCommandsCheckBox.IsChecked;

            if (useSecondaryCommandDynamicLabel || useSecondaryCommandDynamicVisibility || addPrimaryCommandDynamicallyCheckBox || clearSecondaryCommands || clearPrimaryCommands)
            {
                CommandBarFlyout commandBarFlyout = flyout as CommandBarFlyout;

                if (commandBarFlyout != null)
                {
                    if (commandBarFlyout.SecondaryCommands != null && commandBarFlyout.SecondaryCommands.Count > 0)
                    {
                        if (useSecondaryCommandDynamicLabel)
                        {
                            SetDynamicLabelSecondaryCommand(commandBarFlyout.SecondaryCommands[0] as AppBarButton);
                        }

                        if (useSecondaryCommandDynamicVisibility && commandBarFlyout.SecondaryCommands.Count > 4)
                        {
                            SetDynamicVisibilitySecondaryCommand(commandBarFlyout.SecondaryCommands[4] as AppBarButton);
                        }

                        if (clearSecondaryCommands)
                        {
                            SetClearSecondaryCommandsFlyout(commandBarFlyout);
                        }
                    }

                    if (addPrimaryCommandDynamicallyCheckBox)
                    {
                        dynamicCommandBarFlyout = commandBarFlyout;
                        SetDynamicPrimaryCommand();
                    }

                    if (clearPrimaryCommands && commandBarFlyout.PrimaryCommands != null && commandBarFlyout.PrimaryCommands.Count > 0)
                    {
                        SetClearPrimaryCommandsFlyout(commandBarFlyout);
                    }
                }
            }

            flyout.ShowAt(targetElement, new FlyoutShowOptions { Placement = FlyoutPlacementMode.TopEdgeAlignedLeft, ShowMode = showMode });
        }

void UndoButtonOverflow16_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 650 of file CommandBarFlyoutPage.xaml.cs.

        {
            UndoButtonOverflow16.SizeChanged -= UndoButtonOverflow16_SizeChanged;

            // These visual elements don't have automation peers we can access, so we need to expose their bounds to the test the hard way.
            var undoButtonOverflow16ContentViewbox = UndoButtonOverflow16.FindVisualChildByName("ContentViewbox");
            var undoButtonOverflow16OverflowTextLabel = UndoButtonOverflow16.FindVisualChildByName("OverflowTextLabel");
            var redoButton16ContentViewbox = RedoButton16.FindVisualChildByName("ContentViewbox");

            var undoButtonOverflow16ContentViewboxBounds = undoButtonOverflow16ContentViewbox.TransformToVisual(null).TransformBounds(new Windows.Foundation.Rect(0, 0, undoButtonOverflow16ContentViewbox.ActualWidth, undoButtonOverflow16ContentViewbox.ActualHeight));
            var undoButtonOverflow16OverflowTextLabelBounds = undoButtonOverflow16OverflowTextLabel.TransformToVisual(null).TransformBounds(new Windows.Foundation.Rect(0, 0, undoButtonOverflow16ContentViewbox.ActualWidth, undoButtonOverflow16ContentViewbox.ActualHeight));
            var redoButton16ContentViewboxBounds = redoButton16ContentViewbox.TransformToVisual(null).TransformBounds(new Windows.Foundation.Rect(0, 0, undoButtonOverflow16ContentViewbox.ActualWidth, undoButtonOverflow16ContentViewbox.ActualHeight));

            ExtraInformationTextBox.Text = $"({undoButtonOverflow16ContentViewboxBounds.X}, {undoButtonOverflow16ContentViewboxBounds.Y}, {undoButtonOverflow16ContentViewboxBounds.Width}, {undoButtonOverflow16ContentViewboxBounds.Height}), ({undoButtonOverflow16OverflowTextLabelBounds.X}, {undoButtonOverflow16OverflowTextLabelBounds.Y}, {undoButtonOverflow16OverflowTextLabelBounds.Width}, {undoButtonOverflow16OverflowTextLabelBounds.Height}), ({redoButton16ContentViewboxBounds.X}, {redoButton16ContentViewboxBounds.Y}, {redoButton16ContentViewboxBounds.Width}, {redoButton16ContentViewboxBounds.Height})";
            RecordEvent("Undo with overflow visible");
        }

Member Data Documentation

DispatcherTimer addFlyoutTimer = new DispatcherTimer() [private]

Definition at line 28 of file CommandBarFlyoutPage.xaml.cs.

Style animatedCommandBarFlyoutCommandBarStyle [private]

Definition at line 20 of file CommandBarFlyoutPage.xaml.cs.

CommandBarFlyout clearPrimaryCommandsFlyout [private]

Definition at line 26 of file CommandBarFlyoutPage.xaml.cs.

DispatcherTimer clearPrimaryCommandsTimer = new DispatcherTimer() [private]

Definition at line 25 of file CommandBarFlyoutPage.xaml.cs.

CommandBarFlyout clearSecondaryCommandsFlyout [private]

Definition at line 23 of file CommandBarFlyoutPage.xaml.cs.

DispatcherTimer clearSecondaryCommandsTimer = new DispatcherTimer() [private]

Definition at line 22 of file CommandBarFlyoutPage.xaml.cs.

CommandBarFlyout dynamicCommandBarFlyout [private]

Definition at line 38 of file CommandBarFlyoutPage.xaml.cs.

DispatcherTimer dynamicCommandTimer = new DispatcherTimer() [private]

Definition at line 34 of file CommandBarFlyoutPage.xaml.cs.

int dynamicLabelChangeCount [private]

Definition at line 42 of file CommandBarFlyoutPage.xaml.cs.

AppBarButton dynamicLabelSecondaryCommand [private]

Definition at line 35 of file CommandBarFlyoutPage.xaml.cs.

DispatcherTimer dynamicLabelTimer = new DispatcherTimer() [private]

Definition at line 31 of file CommandBarFlyoutPage.xaml.cs.

int dynamicVisibilityChangeCount [private]

Definition at line 43 of file CommandBarFlyoutPage.xaml.cs.

AppBarButton dynamicVisibilitySecondaryCommand [private]

Definition at line 36 of file CommandBarFlyoutPage.xaml.cs.

DispatcherTimer dynamicVisibilityTimer = new DispatcherTimer() [private]

Definition at line 32 of file CommandBarFlyoutPage.xaml.cs.

int dynamicWidthChangeCount [private]

Definition at line 44 of file CommandBarFlyoutPage.xaml.cs.

FrameworkElement dynamicWidthOverflowContentRoot [private]

Definition at line 37 of file CommandBarFlyoutPage.xaml.cs.

DispatcherTimer dynamicWidthTimer = new DispatcherTimer() [private]

Definition at line 33 of file CommandBarFlyoutPage.xaml.cs.

MenuFlyout flyoutToAdd = new MenuFlyout() [private]

Definition at line 29 of file CommandBarFlyoutPage.xaml.cs.

string originalLabelSecondaryCommand [private]

Definition at line 39 of file CommandBarFlyoutPage.xaml.cs.

Visibility originalVisibilitySecondaryCommand [private]

Definition at line 40 of file CommandBarFlyoutPage.xaml.cs.

double originalWidthOverflowContentRoot [private]

Definition at line 41 of file CommandBarFlyoutPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/TestUI/CommandBarFlyoutPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CommandBarPage
Public Member Functions

CommandBarPage Class Reference

List of all members.

Public Member Functions

CommandBarPage ()
void | BottomAppBarButton_Click (object sender, RoutedEventArgs args)
void | OpenCloseAppBarsButton_Click (object sender, RoutedEventArgs args)
void | StickyUnstickyAppBarsButton_Click (object sender, RoutedEventArgs args)
void | TopAppBarButton_Click (object sender, RoutedEventArgs args)

Detailed Description

Definition at line 9 of file CommandBarPage.xaml.cs.

Constructor & Destructor Documentation

CommandBarPage ( ) [inline]

Definition at line 11 of file CommandBarPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void BottomAppBarButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 21 of file CommandBarPage.xaml.cs.

        {
            if (this.BottomCmdBar.Visibility == Visibility.Visible)
            {
                this.BottomCmdBar.Visibility = Visibility.Collapsed;
            }
            else
            {
                this.BottomCmdBar.Visibility = Visibility.Visible;
            }
        }

void OpenCloseAppBarsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 33 of file CommandBarPage.xaml.cs.

        {
            TopAppBar.IsOpen = !TopAppBar.IsOpen;
            BottomAppBar.IsOpen = !BottomAppBar.IsOpen;

            if (TopAppBar.IsOpen)
            {
                OpenCloseAppBarsButton.Content = "Close App Bars";
            }
            else
            {
                OpenCloseAppBarsButton.Content = "Open App Bars";
            }
        }

void StickyUnstickyAppBarsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 48 of file CommandBarPage.xaml.cs.

        {
            TopAppBar.IsSticky = !TopAppBar.IsSticky;
            BottomAppBar.IsSticky = !BottomAppBar.IsSticky;

            if (TopAppBar.IsSticky)
            {
                StickyUnstickyAppBarsButton.Content = "Make App Bars Unsticky";
            }
            else
            {
                StickyUnstickyAppBarsButton.Content = "Make App Bars Sticky";
            }
        }

void TopAppBarButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 16 of file CommandBarPage.xaml.cs.

        {
            this.TopAppBar = null;
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CommandBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarSummaryPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CommandBarSummaryPage
Public Member Functions | Private Member Functions

CommandBarSummaryPage Class Reference

List of all members.

Public Member Functions

CommandBarSummaryPage ()

Private Member Functions

void | CB_Closed (object sender, object e)
void | CB_Opened (object sender, object e)
void | CmbClosedDisplayMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbDefaultLabelPosition_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbFontSize_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHasSecondaryCommand_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHasSplitButton_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHasToggleSplitButton_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbIsDynamicOverflowEnabled_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbIsOpen_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLabelLength_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 11 of file CommandBarSummaryPage.xaml.cs.

Constructor & Destructor Documentation

CommandBarSummaryPage ( ) [inline]

Definition at line 13 of file CommandBarSummaryPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void CB_Closed | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 23 of file CommandBarSummaryPage.xaml.cs.

        {
            cmbIsOpen.SelectedIndex = 0;
        }

void CB_Opened | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 18 of file CommandBarSummaryPage.xaml.cs.

        {
            cmbIsOpen.SelectedIndex = 1;
        }

void CmbClosedDisplayMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 53 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbClosedDisplayMode == null || cb == null) return;

            cb.ClosedDisplayMode = (AppBarClosedDisplayMode)cmbClosedDisplayMode.SelectedIndex;
        }

void CmbDefaultLabelPosition_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 46 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbDefaultLabelPosition == null || cb == null) return;

            cb.DefaultLabelPosition = (CommandBarDefaultLabelPosition)cmbDefaultLabelPosition.SelectedIndex;
        }

void CmbFontSize_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 60 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbFontSize == null) return;

            double fontSize = cmbFontSize.SelectedIndex == 0 ? 14 : 40;

            if (tb != null)
            {
                tb.FontSize = fontSize;
            }
            if (sb != null)
            {
                sb.FontSize = fontSize;
            }
            if (tsb != null)
            {
                tsb.FontSize = fontSize;
            }
        }

void CmbHasSecondaryCommand_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 94 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbHasSecondaryCommand == null || cb == null) return;

            if (cmbHasSecondaryCommand.SelectedIndex == 1 && cb.SecondaryCommands.Count == 0)
            {
                cb.SecondaryCommands.Add(sc);
            }
            else if (cmbHasSecondaryCommand.SelectedIndex == 0 && cb.SecondaryCommands.Count == 1)
            {
                cb.SecondaryCommands.Clear();
            }
        }

void CmbHasSplitButton_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 108 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbHasSplitButton == null || ecsb == null) return;

            if (cmbHasSplitButton.SelectedIndex == 1 && !ecsb.IsLoaded)
            {
                cb.PrimaryCommands.Add(ecsb);
            }
            else if (cmbHasSplitButton.SelectedIndex == 0 && ecsb.IsLoaded)
            {
                cb.PrimaryCommands.Remove(ecsb);
            }
        }

void CmbHasToggleSplitButton_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 122 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbHasToggleSplitButton == null || ectsb == null) return;

            if (cmbHasToggleSplitButton.SelectedIndex == 1 && !ectsb.IsLoaded)
            {
                cb.PrimaryCommands.Add(ectsb);
            }
            else if (cmbHasToggleSplitButton.SelectedIndex == 0 && ectsb.IsLoaded)
            {
                cb.PrimaryCommands.Remove(ectsb);
            }
        }

void CmbIsDynamicOverflowEnabled_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 87 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbIsDynamicOverflowEnabled == null || cb == null) return;

            cb.IsDynamicOverflowEnabled = cmbIsDynamicOverflowEnabled.SelectedIndex == 1;
        }

void CmbIsOpen_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 80 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbIsOpen == null || cb == null) return;

            cb.IsOpen = cmbIsOpen.SelectedIndex == 1;
        }

void CmbLabelLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 28 of file CommandBarSummaryPage.xaml.cs.

        {
            if (cmbLabelLength == null || tb == null) return;

            switch (cmbLabelLength.SelectedIndex)
            {
                case 0:
                    tb.Label = "Dog";
                    break;
                case 1:
                    tb.Label = "Golden Retriever";
                    break;
                default:
                    tb.Label = "Distinguished & Unique Old English Sheepdog";
                    break;
            }
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CommandBarSummaryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStylesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CommonStylesPage
Public Member Functions | Private Member Functions | Private Attributes

CommonStylesPage Class Reference

List of all members.

Public Member Functions

CommonStylesPage ()

Private Member Functions

void | AppBarButtonDensityTest_Click (object sender, RoutedEventArgs e)
void | AppBarToggleButtonDensityTest_Click (object sender, RoutedEventArgs e)
void | AutoSuggestBox_TextChanged (AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
void | AutoSuggestBoxDensityTest_Click (object sender, RoutedEventArgs e)
void | BlueBackground_Click (object sender, RoutedEventArgs e)
void | ChkGridViewIsEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkGridViewIsEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkListViewIsEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkListViewIsEnabled_Unchecked (object sender, RoutedEventArgs e)
void | CmbGridViewSelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbListViewSelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ComboBoxDensityTest_Click (object sender, RoutedEventArgs e)
void | DatePickerDensityTest_Click (object sender, RoutedEventArgs e)
void | HeaderContentPresenterMarginTest (DependencyObject control)
void | ListViewItemDensityTest_Click (object sender, RoutedEventArgs e)
void | NavigateToNewPageButton_Click (object sender, RoutedEventArgs e)
void | PasswordBoxDensityTest_Click (object sender, RoutedEventArgs e)
void | RichEditBoxDensityTest_Click (object sender, RoutedEventArgs e)
void | SliderDensityTest_Click (object sender, RoutedEventArgs e)
void | StandardBackground_Click (object sender, RoutedEventArgs e)
void | TextBoxDensityTest_Click (object sender, RoutedEventArgs e)
void | TimePickerDensityTest_Click (object sender, RoutedEventArgs e)
void | ToggleSwitchDensityTest_Click (object sender, RoutedEventArgs e)
void | VerifyHeight (FrameworkElement[] frameworkElements, SimpleVerify simpleVerify, int height)

Private Attributes

ObservableCollection< FontFamily > | fonts = new ObservableCollection<FontFamily>()
string[] | miscellaneousGridViewSource

Detailed Description

Definition at line 46 of file CommonStylesPage.xaml.cs.

Constructor & Destructor Documentation

CommonStylesPage ( ) [inline]

Definition at line 55 of file CommonStylesPage.xaml.cs.

        {
            this.InitializeComponent();
            fonts.Add(new FontFamily("Arial"));
            fonts.Add(new FontFamily("Courier New"));
            fonts.Add(new FontFamily("Times New Roman"));
        }

Member Function Documentation

void AppBarButtonDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 280 of file CommonStylesPage.xaml.cs.

        {
            SimpleVerify simpleVerify = new SimpleVerify();
            FrameworkElement[] iconCollapsedElements = { AppBarButton1, AppBarButton3 };
            VerifyHeight(iconCollapsedElements, simpleVerify, 48);

            DensityTestResult.Text = simpleVerify.ToString();
        }

void AppBarToggleButtonDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 289 of file CommonStylesPage.xaml.cs.

        {
            SimpleVerify simpleVerify = new SimpleVerify();
            FrameworkElement[] iconCollapsedElements = { AppBarToggleButton1, AppBarToggleButton3 };
            VerifyHeight(iconCollapsedElements, simpleVerify, 48);

            DensityTestResult.Text = simpleVerify.ToString();
        }

void AutoSuggestBox_TextChanged | ( | AutoSuggestBox | sender,
 |  | AutoSuggestBoxTextChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 158 of file CommonStylesPage.xaml.cs.

        {
            if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
            {
                var suggestList = new List<string>();
                suggestList.Add("001");
                suggestList.Add("002");
                suggestList.Add("003");
                suggestList.Add("004");
                suggestList.Add("005");
                sender.ItemsSource = suggestList.Select(text => sender.Text + text);
            }
        }

void AutoSuggestBoxDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 248 of file CommonStylesPage.xaml.cs.

        {
            // AutoSuggestBox Density is actually implemented in AutoSuggestBoxTextBoxStyle, so we need to get textbox first
            var root = (FrameworkElement)VisualTreeHelper.GetChild(AutoSuggestBox, 0);
            var textBox = (TextBox)root.FindName("TextBox");
            HeaderContentPresenterMarginTest(textBox);
        }

void BlueBackground_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 298 of file CommonStylesPage.xaml.cs.

        {
            RootSampleControlsPanel.Background = new SolidColorBrush(Color.FromArgb(255,0, 173, 239));
        }

void ChkGridViewIsEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 340 of file CommonStylesPage.xaml.cs.

        {
            if (gridView1 != null)
            {
                gridView1.IsEnabled = true;
            }
        }

void ChkGridViewIsEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 348 of file CommonStylesPage.xaml.cs.

        {
            if (gridView1 != null)
            {
                gridView1.IsEnabled = false;
            }
        }

void ChkListViewIsEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 324 of file CommonStylesPage.xaml.cs.

        {
            if (listView1 != null)
            {
                listView1.IsEnabled = true;
            }
        }

void ChkListViewIsEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 332 of file CommonStylesPage.xaml.cs.

        {
            if (listView1 != null)
            {
                listView1.IsEnabled = false;
            }
        }

void CmbGridViewSelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 316 of file CommonStylesPage.xaml.cs.

        {
            if (gridView1 != null)
            {
                gridView1.SelectionMode = (ListViewSelectionMode)(sender as ComboBox).SelectedIndex;
            }
        }

void CmbListViewSelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 308 of file CommonStylesPage.xaml.cs.

        {
            if (listView1 != null)
            {
                listView1.SelectionMode = (ListViewSelectionMode)(sender as ComboBox).SelectedIndex;
            }
        }

void ComboBoxDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 123 of file CommonStylesPage.xaml.cs.

        {
            HeaderContentPresenterMarginTest(ComboBox);
        }

void DatePickerDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 172 of file CommonStylesPage.xaml.cs.

        {
            SimpleVerify simpleVerify = new SimpleVerify();
            var root = (FrameworkElement)VisualTreeHelper.GetChild(DatePicker, 0);
            var contentPresenter = (ContentPresenter)root.FindName("HeaderContentPresenter");
            simpleVerify.IsTrue(contentPresenter != null, "HeaderContentPresenter can't be found");

            string expectedHeaderMargin = "0,0,0,4";
            string expectDatePickerFlyoutPresenterItemPadding = "0,3,0,6";
            string expectDatePickerFlyoutPresenterMonthPadding = "9,3,0,6";

            if (contentPresenter != null)
            {
                simpleVerify.IsEqual(contentPresenter.Margin.ToString(), expectedHeaderMargin, "HeaderContentPresenter.Margin");
            }

            // Down-level need to change code, so RS5 have different ItemPadding, see bug 19373347, but we will not fix it
            if (!PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone4))
            {
                var textBlock = (TextBlock)root.FindName("DayTextBlock");
                simpleVerify.IsEqual(textBlock.Padding.ToString(), expectDatePickerFlyoutPresenterItemPadding, "DayTextBlock.Padding");

                textBlock = (TextBlock)root.FindName("MonthTextBlock");
                simpleVerify.IsEqual(textBlock.Padding.ToString(), expectDatePickerFlyoutPresenterMonthPadding, "MonthTextBlock.Padding");

                textBlock = (TextBlock)root.FindName("YearTextBlock");
                simpleVerify.IsEqual(textBlock.Padding.ToString(), expectDatePickerFlyoutPresenterItemPadding, "YearTextBlock.Padding");
            }
            DensityTestResult.Text = simpleVerify.ToString();
        }

void HeaderContentPresenterMarginTest ( DependencyObject control ) [inline, private]

Definition at line 256 of file CommonStylesPage.xaml.cs.

        {
            SimpleVerify simpleVerify = new SimpleVerify();
            var root = (FrameworkElement)VisualTreeHelper.GetChild(control, 0);
            var contentPresenter = (ContentPresenter)root.FindName("HeaderContentPresenter");
            simpleVerify.IsTrue(contentPresenter != null, "HeaderContentPresenter can't be found");

            string expectedHeaderMargin = "0,0,0,8";
            if (contentPresenter != null)
            {
                simpleVerify.IsEqual(contentPresenter.Margin.ToString(), expectedHeaderMargin, "HeaderContentPresenter.Margin");
            }

            DensityTestResult.Text = simpleVerify.ToString();
        }

void ListViewItemDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 233 of file CommonStylesPage.xaml.cs.

        {
            var item = ListView1.FindVisualChildByType<ListViewItem>();
            SimpleVerify simpleVerify = new SimpleVerify();
            if (item != null)
            {
                simpleVerify.IsEqual(item.MinHeight.ToString(), "40", "ListViewItem minHeight is 40");
            }
            else
            {
                simpleVerify.IsTrue(false, "Can't find ListViewItem");
            }
            DensityTestResult.Text = simpleVerify.ToString();
        }

void NavigateToNewPageButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file CommonStylesPage.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(GridViewPage), 0);
        }

void PasswordBoxDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 118 of file CommonStylesPage.xaml.cs.

        {
            HeaderContentPresenterMarginTest(PasswordBox);
        }

void RichEditBoxDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 108 of file CommonStylesPage.xaml.cs.

        {
            HeaderContentPresenterMarginTest(RichEditBox);
        }

void SliderDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file CommonStylesPage.xaml.cs.

        {
            string expectSliderPreContentMargin = "14";
            string expectSliderPostContentMargin = "14";
            string expectSliderHorizontalHeight = "32";
            string expectSliderVerticalWidth = "32";

            SimpleVerify simpleVerify = new SimpleVerify();
            // Horizontal Slider
            var root = (FrameworkElement)VisualTreeHelper.GetChild(Slider1, 0);
            var grid = (Grid)root.FindName("HorizontalTemplate");
            simpleVerify.IsTrue(grid != null, "HorizontalTemplate can't be found");
            if (grid != null)
            {
                simpleVerify.IsEqual(grid.MinHeight.ToString(), expectSliderHorizontalHeight, "HorizontalTemplate|MinHeight=SliderHorizontalHeight");
                var rowDefinitions = grid.RowDefinitions;
                if (rowDefinitions.Count == 3)
                {
                    simpleVerify.IsEqual(rowDefinitions[0].Height.ToString(), expectSliderPreContentMargin, "HorizontalTemplate.RowDefinitions[0].Height=SliderPreContentMargin");
                    simpleVerify.IsEqual(rowDefinitions[2].Height.ToString(), expectSliderPostContentMargin, "HorizontalTemplate.RowDefinitions[2].Height=SliderPostContentMargin");
                }
            }

            // Vertical Slider
            root = (FrameworkElement)VisualTreeHelper.GetChild(Slider2, 0);
            grid = (Grid)root.FindName("VerticalTemplate");
            simpleVerify.IsTrue(grid != null, "VerticalTemplate can't be found");
            if (grid != null)
            {
                simpleVerify.IsEqual(grid.MinWidth.ToString(), expectSliderVerticalWidth, "VerticalTemplate|MinWidth=SliderVerticalWidth");
                var columnDefinitions = grid.ColumnDefinitions;
                if (columnDefinitions.Count == 3)
                {
                    simpleVerify.IsEqual(columnDefinitions[0].Width.ToString(), expectSliderPreContentMargin, "VerticalTemplate.columnDefinitions[0].Width=SliderPreContentMargin");
                    simpleVerify.IsEqual(columnDefinitions[2].Width.ToString(), expectSliderPostContentMargin, "VerticalTemplate.columnDefinitions[2].Width=SliderPostContentMargin");
                }
            }
            DensityTestResult.Text = simpleVerify.ToString();
        }

void StandardBackground_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 303 of file CommonStylesPage.xaml.cs.

        {
            RootSampleControlsPanel.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
        }

void TextBoxDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 113 of file CommonStylesPage.xaml.cs.

        {
            HeaderContentPresenterMarginTest(TextBox);
        }

void TimePickerDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 203 of file CommonStylesPage.xaml.cs.

        {
            SimpleVerify simpleVerify = new SimpleVerify();
            var root = (FrameworkElement)VisualTreeHelper.GetChild(TimePicker, 0);
            var contentPresenter = (ContentPresenter)root.FindName("HeaderContentPresenter");
            simpleVerify.IsTrue(contentPresenter != null, "HeaderContentPresenter can't be found");

            string expectedHeaderMargin = "0,0,0,4";
            string expectTimePickerFlyoutPresenterItemPadding = "0,3,0,6";

            if (contentPresenter != null)
            {
                simpleVerify.IsEqual(contentPresenter.Margin.ToString(), expectedHeaderMargin, "HeaderContentPresenter.Margin");
            }

            // Down-level need to change code, so RS5 have different ItemPadding, see bug 19373347, but we will not fix it
            if (!PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone4))
            {
                var textBlock = (TextBlock)root.FindName("HourTextBlock");
                simpleVerify.IsEqual(textBlock.Padding.ToString(), expectTimePickerFlyoutPresenterItemPadding, "HourTextBlock.Padding");

                textBlock = (TextBlock)root.FindName("MinuteTextBlock");
                simpleVerify.IsEqual(textBlock.Padding.ToString(), expectTimePickerFlyoutPresenterItemPadding, "MinuteTextBlock.Padding");

                textBlock = (TextBlock)root.FindName("PeriodTextBlock");
                simpleVerify.IsEqual(textBlock.Padding.ToString(), expectTimePickerFlyoutPresenterItemPadding, "PeriodTextBlock.Padding");
            }
            DensityTestResult.Text = simpleVerify.ToString();
        }

void ToggleSwitchDensityTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 128 of file CommonStylesPage.xaml.cs.

        {
            SimpleVerify simpleVerify = new SimpleVerify();
            var root = (FrameworkElement)VisualTreeHelper.GetChild(ToggleSwitch, 0);
            var contentPresenter = (ContentPresenter)root.FindName("HeaderContentPresenter");
            simpleVerify.IsTrue(contentPresenter != null, "HeaderContentPresenter can't be found");

            string expectedHeaderMargin = "0,0,0,4";
            string expectToggleSwitchPreContentMargin = "10";
            string expectToggleSwitchPostContentMargin = "10";

            if (contentPresenter != null)
            {
                simpleVerify.IsEqual(contentPresenter.Margin.ToString(), expectedHeaderMargin, "HeaderContentPresenter.Margin");
            }

            var grid = (Grid)root;
            if (grid != null)
            {
                var rowDefinitions = grid.RowDefinitions;

                // layout has been changed since RS5 and it's not 4 rows anymore. We expect RS5  will be covered by UIElement tree test case in os repo.
                if (rowDefinitions.Count == 4)
                {
                    simpleVerify.IsEqual(rowDefinitions[1].Height.ToString(), expectToggleSwitchPreContentMargin, "rowDefinitions[1].Height");
                    simpleVerify.IsEqual(rowDefinitions[3].Height.ToString(), expectToggleSwitchPostContentMargin, "rowDefinitions[3].Height");
                }
            }
            DensityTestResult.Text = simpleVerify.ToString();
        }

void VerifyHeight | ( | FrameworkElement[] | frameworkElements,
 |  | SimpleVerify | simpleVerify,
 |  | int | height |
 | ) |  |  | [inline, private]

Definition at line 271 of file CommonStylesPage.xaml.cs.

        {
            var expectedHeight = height.ToString();
            foreach (var element in frameworkElements)
            {
                simpleVerify.IsEqual(element.ActualHeight.ToString(), expectedHeight, element.Name.ToString() + ".ActualHeight");
            }
        }

Member Data Documentation

ObservableCollection<FontFamily> fonts = new ObservableCollection<FontFamily>() [private]

Definition at line 48 of file CommonStylesPage.xaml.cs.

string [] miscellaneousGridViewSource [private]
Initial value:
        {
            "GridView Item #1",
        }

Definition at line 50 of file CommonStylesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CommonStylesPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CompactPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CompactPage
Public Member Functions | Private Member Functions

CompactPage Class Reference

List of all members.

Public Member Functions

CompactPage ()

Private Member Functions

void | AutoSuggestBox_TextChanged (AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
FrameworkElement | GetChild (FrameworkElement item, string childXName)
void | RunTest_Click (object sender, RoutedEventArgs e)
void | ToggleCompactInAppLevel_Click (object sender, RoutedEventArgs e)
void | VerifyChildHeight (SimpleVerify simpleVerify, FrameworkElement item, string childXName, int expectHeight, string controlName)
void | VerifyHeight (SimpleVerify simpleVerify, FrameworkElement item, int expectHeight, string controlName)

Detailed Description

Definition at line 17 of file CompactPage.xaml.cs.

Constructor & Destructor Documentation

CompactPage ( ) [inline]

Definition at line 19 of file CompactPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void AutoSuggestBox_TextChanged | ( | AutoSuggestBox | sender,
 |  | AutoSuggestBoxTextChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 24 of file CompactPage.xaml.cs.

        {
            if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
            {
                var suggestList = new List<string>();
                suggestList.Add("001");
                suggestList.Add("002");
                suggestList.Add("003");
                suggestList.Add("004");
                suggestList.Add("005");

                sender.ItemsSource = suggestList.Select(text => sender.Text + text);
            }
        }

FrameworkElement GetChild | ( | FrameworkElement | item,
 |  | string | childXName |
 | ) |  |  | [inline, private]

Definition at line 61 of file CompactPage.xaml.cs.

        {
            FrameworkElement root = (item == null) ? null: (FrameworkElement)VisualTreeHelper.GetChild(item, 0);
            FrameworkElement child = (root == null) ? null: (FrameworkElement)root.FindName(childXName);
            return child;
        }

void RunTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 67 of file CompactPage.xaml.cs.

        {
            SimpleVerify simpleVerify = new SimpleVerify();
            FrameworkElement item = ListView.FindVisualChildByType<ListViewItem>();
            VerifyHeight(simpleVerify, item, 32, "ListViewItem");
            item = TreeView.FindVisualChildByType<TreeViewItem>();
            VerifyHeight(simpleVerify, item, 24, "TreeViewItem");

            VerifyHeight(simpleVerify, NavItem1, 36, "NavigationViewItem");

            VerifyChildHeight(simpleVerify, TextBox, "BorderElement", 24, "TextBox");
            VerifyChildHeight(simpleVerify, PasswordBox, "BorderElement", 24, "PasswordBox");

            // AutoSuggestBox used TextBox directly, so we check TextBox
            FrameworkElement child = GetChild(AutoSuggestBox, "TextBox");
            VerifyChildHeight(simpleVerify, child, "BorderElement", 24, "AutoSuggestBox.TextBox");

            VerifyChildHeight(simpleVerify, RichEditBox, "BorderElement", 24, "RichEditBox");
            VerifyChildHeight(simpleVerify, ComboBox, "Background", 24, "TextBox");

            VerifyChildHeight(simpleVerify, TimePicker, "FlyoutButton", 22, "TimePicker");
            VerifyChildHeight(simpleVerify, DatePicker, "FlyoutButton", 22, "DatePicker");

            CompactTestResult.Text = simpleVerify.ToString();
        }

void ToggleCompactInAppLevel_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 93 of file CompactPage.xaml.cs.

        {
            var dict = Application.Current.Resources.MergedDictionaries.First() as XamlControlsResources;
            dict.UseCompactResources = !dict.UseCompactResources;
        }

void VerifyChildHeight | ( | SimpleVerify | simpleVerify,
 |  | FrameworkElement | item,
 |  | string | childXName,
 |  | int | expectHeight,
 |  | string | controlName |
 | ) |  |  | [inline, private]

Definition at line 55 of file CompactPage.xaml.cs.

        {
            FrameworkElement child = GetChild(item, childXName);
            VerifyHeight(simpleVerify, child, expectHeight, controlName + "." + childXName);
        }

void VerifyHeight | ( | SimpleVerify | simpleVerify,
 |  | FrameworkElement | item,
 |  | int | expectHeight,
 |  | string | controlName |
 | ) |  |  | [inline, private]

Definition at line 39 of file CompactPage.xaml.cs.

        {
            if (item != null)
            {
                // Avoid Height because of CornerRadius
                if (Math.Abs(item.ActualHeight - expectHeight) > 0.5)
                {
                    simpleVerify.IsEqual(item.ActualHeight.ToString(), expectHeight, controlName + ".ActualHeight=" + expectHeight);
                }
            }
            else
            {
                simpleVerify.IsTrue(false, "Can't find " + controlName);
            }
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CompactPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ContentDialogPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ContentDialogPage
Public Member Functions | Private Member Functions | Static Private Member Functions

ContentDialogPage Class Reference

List of all members.

Public Member Functions

ContentDialogPage ()

Private Member Functions

void | ShowBorderThickness_Click (object sender, RoutedEventArgs e)
void | ShowDialog_Click (object sender, RoutedEventArgs e)
void | ShowInPlaceDialog_Click (object sender, RoutedEventArgs e)

Static Private Member Functions

static ContentDialog | CreateContentDialog ()

Detailed Description

Definition at line 12 of file ContentDialogPage.xaml.cs.

Constructor & Destructor Documentation

ContentDialogPage ( ) [inline]

Definition at line 14 of file ContentDialogPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

static ContentDialog CreateContentDialog ( ) [inline, static, private]

Definition at line 47 of file ContentDialogPage.xaml.cs.

        {
            return new ContentDialog
            {
                Title = "Title",
                Content = "Content",
                IsPrimaryButtonEnabled = true,
                PrimaryButtonText = "PrimaryButton",
                SecondaryButtonText = "SecondaryButton",
                CloseButtonText = "CloseButton"
            };
        }

void ShowBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file ContentDialogPage.xaml.cs.

        {
            var dialog = new ContentDialog {
                Title = "Title",
                Content = "I am testing border thickness",
                IsPrimaryButtonEnabled = true,
                BorderThickness = new Thickness(10, 20, 10, 20),
                CloseButtonText = "CloseButton",
                BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0)),
            };
            dialog.XamlRoot = this.XamlRoot;
            _ = CreateContentDialog().ShowAsync();
        }

void ShowDialog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file ContentDialogPage.xaml.cs.

        {
            var contentDialog = CreateContentDialog();
            contentDialog.XamlRoot = this.XamlRoot;
            _ = contentDialog.ShowAsync();
        }

void ShowInPlaceDialog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 40 of file ContentDialogPage.xaml.cs.

        {
            var contentDialog = CreateContentDialog();
            MainPanel.Children.Add(contentDialog);
            _ = contentDialog.ShowAsync();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ContentDialogPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CoreWindowEventsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CoreWindowEventsPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

CoreWindowEventsPage Class Reference

List of all members.

Public Member Functions

CoreWindowEventsPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)
override void | OnNavigatedTo (NavigationEventArgs e)

Private Member Functions

void | AddReveal_Click (object sender, RoutedEventArgs e)
void | CoreWindow_PointerExited (CoreWindow sender, PointerEventArgs args)

Private Attributes

ListViewItem | _listViewIem1 = null
UInt32 | _revealAddedCount = 0

Detailed Description

Definition at line 17 of file CoreWindowEventsPage.xaml.cs.

Constructor & Destructor Documentation

CoreWindowEventsPage ( ) [inline]

Definition at line 22 of file CoreWindowEventsPage.xaml.cs.

        {
            this.InitializeComponent();

            AutomationProperties.SetName(this, "CoreWindowEventsPage");
            AutomationProperties.SetAutomationId(this, "CoreWindowEventsPage");

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

Member Function Documentation

void AddReveal_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file CoreWindowEventsPage.xaml.cs.

        {
            _revealAddedCount++;

            if (_listViewIem1 == null)
            {
                _listViewIem1 = new ListViewItem();
                _listViewIem1.Height = 100;
                _listViewIem1.Width = 300;
                _listViewIem1.Content = "Test ListViewItem";
                RevealContainer.Children.Add(_listViewIem1);
            }

            if (_revealAddedCount == 2)
            {
                // Log success once we got this far.
                using (var logger = new ResultsLogger("CoreWindowEventsTests", TestResult)) { }
            }
        }

void CoreWindow_PointerExited | ( | CoreWindow | sender,
 |  | PointerEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 50 of file CoreWindowEventsPage.xaml.cs.

        {
            if (_listViewIem1 != null)
            {
                RevealContainer.Children.Remove(_listViewIem1);
                _listViewIem1 = null;
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 33 of file CoreWindowEventsPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

override void OnNavigatedTo ( NavigationEventArgs e ) [inline, protected]

Definition at line 41 of file CoreWindowEventsPage.xaml.cs.

        {
            base.OnNavigatedTo(e);

            // Make sure Page registers for PointerExited here, before the RevealBorderLight (via AddReveal_Click)
            CoreWindow coreWindow = CoreWindow.GetForCurrentThread();
            coreWindow.PointerExited += CoreWindow_PointerExited;
        }

Member Data Documentation

ListViewItem _listViewIem1 = null [private]

Definition at line 19 of file CoreWindowEventsPage.xaml.cs.

UInt32 _revealAddedCount = 0 [private]

Definition at line 20 of file CoreWindowEventsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/CoreWindowEventsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CornerRadiusPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CornerRadiusPage
Public Member Functions | Static Public Attributes | Properties | Private Member Functions | Private Attributes

CornerRadiusPage Class Reference

List of all members.

Public Member Functions

CornerRadiusPage ()

Static Public Attributes

static readonly DependencyProperty | ControlCornerRadiusProperty
static readonly DependencyProperty | OverlayCornerRadiusProperty

Properties

ObservableCollection< string > | AutoSuggestSource [get, set]
CornerRadius | ControlCornerRadius [get, set]
double | ControlCornerRadiusSize [get, set]
CornerRadius | OverlayCornerRadius [get, set]
double | OverlayCornerRadiusSize [get, set]

Private Member Functions

void | ShowDialog_Click (object sender, RoutedEventArgs e)
void | ShowRoundedDialog_Click (object sender, RoutedEventArgs e)

Private Attributes

double | _controlCornerRadius = 2
double | _overlayCornerRadius = 4

Detailed Description

Definition at line 11 of file CornerRadiusPage.xaml.cs.

Constructor & Destructor Documentation

CornerRadiusPage ( ) [inline]

Definition at line 64 of file CornerRadiusPage.xaml.cs.

        {
            AutoSuggestSource.Add("Item 1");
            AutoSuggestSource.Add("Item 2");
            AutoSuggestSource.Add("Item 3");

            ControlCornerRadius = new CornerRadius(ControlCornerRadiusSize);
            OverlayCornerRadius = new CornerRadius(OverlayCornerRadiusSize);

            this.InitializeComponent();
        }

Member Function Documentation

void ShowDialog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 76 of file CornerRadiusPage.xaml.cs.

        {
            var dialog = new ContentDialog { Title = "Title", Content = "Content", IsPrimaryButtonEnabled = true, PrimaryButtonText = "PrimaryButton" };
            var result = dialog.ShowAsync();
        }

void ShowRoundedDialog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 83 of file CornerRadiusPage.xaml.cs.

        {
            var dialog = new ContentDialog { Title = "Title", Content = "Content", IsPrimaryButtonEnabled = true, PrimaryButtonText = "PrimaryButton", CornerRadius = OverlayCornerRadius };
            var result = dialog.ShowAsync();
        }

Member Data Documentation

double _controlCornerRadius = 2 [private]

Definition at line 25 of file CornerRadiusPage.xaml.cs.

double _overlayCornerRadius = 4 [private]

Definition at line 39 of file CornerRadiusPage.xaml.cs.

readonly DependencyProperty ControlCornerRadiusProperty [static]
Initial value:
            DependencyProperty.Register("ControlCornerRadius", typeof(CornerRadius), typeof(CornerRadiusPage), new PropertyMetadata(new CornerRadius(4)))

Definition at line 47 of file CornerRadiusPage.xaml.cs.

readonly DependencyProperty OverlayCornerRadiusProperty [static]
Initial value:
            DependencyProperty.Register("OverlayCornerRadius", typeof(CornerRadius), typeof(CornerRadiusPage), new PropertyMetadata(new CornerRadius(4)))

Definition at line 57 of file CornerRadiusPage.xaml.cs.

Property Documentation

ObservableCollection<string> AutoSuggestSource [get, set]

Definition at line 62 of file CornerRadiusPage.xaml.cs.

CornerRadius ControlCornerRadius [get, set]

Definition at line 42 of file CornerRadiusPage.xaml.cs.

double ControlCornerRadiusSize [get, set]

Definition at line 14 of file CornerRadiusPage.xaml.cs.

CornerRadius OverlayCornerRadius [get, set]

Definition at line 52 of file CornerRadiusPage.xaml.cs.

double OverlayCornerRadiusSize [get, set]

Definition at line 28 of file CornerRadiusPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CornerRadiusPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomContent Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CustomContent
Public Member Functions | Public Attributes | Private Attributes

CustomContent Class Reference

List of all members.

Public Member Functions

CustomContent (int nestingLevel=3, int index=0)
TreeViewNode GetTreeViewNode ()
override string | ToString ()

Public Attributes

List< CustomContent > | Children = new List<CustomContent>()

Private Attributes

int | index
int | nestingLevel

Detailed Description

Definition at line 9 of file VirtualizingDataSource.cs.

Constructor & Destructor Documentation

CustomContent | ( | int | nestingLevel = 3,
 |  | int | index = 0 |
 | ) |  |  | [inline]

Definition at line 16 of file VirtualizingDataSource.cs.

        {
            this.nestingLevel = nestingLevel;
            this.index = index;
            if(nestingLevel <= 0)
            {
                return;
            }
            for (int i = 0; i < 4; i++)
            {
                Children.Add(new CustomContent(nestingLevel - 1,i));
            }
        }

Member Function Documentation

TreeViewNode GetTreeViewNode ( ) [inline]

Definition at line 35 of file VirtualizingDataSource.cs.

        {
            var node = new TreeViewNode();
            node.Content = this;
            node.HasUnrealizedChildren = this.Children.Count != 0;
            return node;
        }

override string ToString ( ) [inline]

Definition at line 30 of file VirtualizingDataSource.cs.

        {
            return $"Item: {this.index}; layer: {this.nestingLevel}";
        }

Member Data Documentation

List<CustomContent> Children = new List<CustomContent>()

Definition at line 11 of file VirtualizingDataSource.cs.

int index [private]

Definition at line 14 of file VirtualizingDataSource.cs.

int nestingLevel [private]

Definition at line 13 of file VirtualizingDataSource.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/VirtualizingDataSource.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Customer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Customer
Public Member Functions | Properties

Customer Class Reference

List of all members.

Public Member Functions

Customer (String firstName, String lastName, String address)

Properties

String | Address [get, set]
String | FirstName [get, set]
String | LastName [get, set]

Detailed Description

Definition at line 21 of file NavigationViewItemTemplatePage.xaml.cs.

Constructor & Destructor Documentation

Customer | ( | String | firstName,
 |  | String | lastName,
 |  | String | address |
 | ) |  |  | [inline]

Definition at line 27 of file NavigationViewItemTemplatePage.xaml.cs.

        {
            this.FirstName = firstName;
            this.LastName = lastName;
            this.Address = address;
        }

Property Documentation

String Address [get, set]

Definition at line 25 of file NavigationViewItemTemplatePage.xaml.cs.

String FirstName [get, set]

Definition at line 23 of file NavigationViewItemTemplatePage.xaml.cs.

String LastName [get, set]

Definition at line 24 of file NavigationViewItemTemplatePage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/CustomResources/NavigationViewItemTemplatePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Customers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Customers
Public Member Functions

Customers Class Reference

List of all members.

Public Member Functions

Customers ()

Detailed Description

Definition at line 35 of file NavigationViewItemTemplatePage.xaml.cs.

Constructor & Destructor Documentation

Customers ( ) [inline]

Definition at line 37 of file NavigationViewItemTemplatePage.xaml.cs.

        {
            Add(new Customer("Michael", "Anderberg",
                    "Apartment 45"));
            Add(new Customer("Chris", "Ashton",
                    "Apartment 67"));
            Add(new Customer("Seo-yun", "Jun",
                    "Apartment 89"));
            Add(new Customer("Guido", "Pica",
                    "Apartment 10"));
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/CustomResources/NavigationViewItemTemplatePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CustomNavigationViewItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • CustomNavigationViewItem
Public Member Functions | Properties

CustomNavigationViewItem Class Reference

Inherits Microsoft::UI::Xaml::Controls::NavigationViewItem.

List of all members.

Public Member Functions

CustomNavigationViewItem ()

Properties

string Text [get, set]

Detailed Description

Definition at line 10 of file CustomNavigationViewItem.xaml.cs.

Constructor & Destructor Documentation

CustomNavigationViewItem ( ) [inline]

Definition at line 13 of file CustomNavigationViewItem.xaml.cs.

        {
            this.InitializeComponent();
        }

Property Documentation

string Text [get, set]

Definition at line 12 of file CustomNavigationViewItem.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/CustomResources/CustomNavigationViewItem.xaml.cs
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DataItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • DataItem
Public Member Functions | Properties

DataItem Class Reference

List of all members.

Public Member Functions

DataItem (string text, int number)

Properties

int | Number [get, set]
string | Text [get, set]

Detailed Description

Definition at line 931 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

Constructor & Destructor Documentation

DataItem | ( | string | text,
 |  | int | number |
 | ) |  |  | [inline]

Definition at line 933 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            Text = text;
            Number = number;
        }

Property Documentation

int Number [get, set]

Definition at line 946 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

string Text [get, set]

Definition at line 940 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterRepeaterAnchoringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DataModelWithINPC Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • DataModelWithINPC
Protected Member Functions | Properties | Events | Private Attributes

DataModelWithINPC Class Reference

List of all members.

Protected Member Functions

virtual void | OnPropertyChanged (string propertyName)

Properties

double | Value [get, set]

Events

PropertyChangedEventHandler | PropertyChanged

Private Attributes

double | _value

Detailed Description

Definition at line 221 of file NumberBoxPage.xaml.cs.

Member Function Documentation

virtual void OnPropertyChanged ( string propertyName ) [inline, protected, virtual]

Definition at line 227 of file NumberBoxPage.xaml.cs.

        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

Member Data Documentation

double _value [private]

Definition at line 223 of file NumberBoxPage.xaml.cs.

Property Documentation

double Value [get, set]

Definition at line 233 of file NumberBoxPage.xaml.cs.

Event Documentation

PropertyChangedEventHandler PropertyChanged

Definition at line 225 of file NumberBoxPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NumberBox/TestUI/NumberBoxPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DatePickerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • DatePickerPage
Public Member Functions

DatePickerPage Class Reference

List of all members.

Public Member Functions

DatePickerPage ()

Detailed Description

Definition at line 7 of file DatePickerPage.xaml.cs.

Constructor & Destructor Documentation

DatePickerPage ( ) [inline]

Definition at line 9 of file DatePickerPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/DatePickerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DialogWithNavView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • DialogWithNavView
Public Member Functions | Private Member Functions

DialogWithNavView Class Reference

List of all members.

Public Member Functions

DialogWithNavView ()

Private Member Functions

void | ContentDialog_PrimaryButtonClick (ContentDialog sender, ContentDialogButtonClickEventArgs args)
void | ContentDialog_SecondaryButtonClick (ContentDialog sender, ContentDialogButtonClickEventArgs args)

Detailed Description

Definition at line 20 of file DialogWithNavView.xaml.cs.

Constructor & Destructor Documentation

DialogWithNavView ( ) [inline]

Definition at line 22 of file DialogWithNavView.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void ContentDialog_PrimaryButtonClick | ( | ContentDialog | sender,
 |  | ContentDialogButtonClickEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 27 of file DialogWithNavView.xaml.cs.

        {
            Hide();
        }

void ContentDialog_SecondaryButtonClick | ( | ContentDialog | sender,
 |  | ContentDialogButtonClickEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 32 of file DialogWithNavView.xaml.cs.

        {
            Hide();
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/DialogWithNavView.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DoubleToStringConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • DoubleToStringConverter
Public Member Functions

DoubleToStringConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 8 of file DoubleToStringConverter.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 10 of file DoubleToStringConverter.cs.

        {
            double parsedValue = 0.0;
            return Double.TryParse((string)value, out parsedValue) ? parsedValue * 100 : 0.0;
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 16 of file DoubleToStringConverter.cs.

        {
            return (((double)value)/100).ToString();
        }

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/DoubleToStringConverter.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButtonPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • DropDownButtonPage
Public Member Functions | Private Member Functions | Private Attributes

DropDownButtonPage Class Reference

List of all members.

Public Member Functions

DropDownButtonPage ()

Private Member Functions

void | SetFlyoutCheckbox_Checked (object sender, RoutedEventArgs e)
void | SetFlyoutCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | TestDropDownButton_Click (object sender, object e)
void | TestDropDownButtonFlyout_Closed (object sender, object e)
void | TestDropDownButtonFlyout_Opened (object sender, object e)

Private Attributes

int | _clickCount = 0
Flyout | _flyout
int | _flyoutClosedCount = 0
int | _flyoutOpenedCount = 0

Detailed Description

Definition at line 17 of file DropDownButtonPage.xaml.cs.

Constructor & Destructor Documentation

DropDownButtonPage ( ) [inline]

Definition at line 25 of file DropDownButtonPage.xaml.cs.

        {
            this.InitializeComponent();

            _flyout = new Flyout();
            _flyout.Placement = FlyoutPlacementMode.Bottom;
            TextBlock textBlock = new TextBlock();
            textBlock.Text = "New Flyout";
            _flyout.Content = textBlock;
            _flyout.Opened += TestDropDownButtonFlyout_Opened;
            _flyout.Closed += TestDropDownButtonFlyout_Closed;
        }

Member Function Documentation

void SetFlyoutCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 53 of file DropDownButtonPage.xaml.cs.

        {
            if (TestDropDownButton != null && _flyout != null)
            {
                TestDropDownButton.Flyout = _flyout;
            }
        }

void SetFlyoutCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 61 of file DropDownButtonPage.xaml.cs.

        {
            if (TestDropDownButton != null)
            {
                TestDropDownButton.Flyout = null;
            }
        }

void TestDropDownButton_Click | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file DropDownButtonPage.xaml.cs.

        {
            ClickCountTextBlock.Text = (++_clickCount).ToString();
        }

void TestDropDownButtonFlyout_Closed | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file DropDownButtonPage.xaml.cs.

        {
            FlyoutClosedCountTextBlock.Text = (++_flyoutClosedCount).ToString();
        }

void TestDropDownButtonFlyout_Opened | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 43 of file DropDownButtonPage.xaml.cs.

        {
            FlyoutOpenedCountTextBlock.Text = (++_flyoutOpenedCount).ToString();
        }

Member Data Documentation

int _clickCount = 0 [private]

Definition at line 19 of file DropDownButtonPage.xaml.cs.

Flyout _flyout [private]

Definition at line 23 of file DropDownButtonPage.xaml.cs.

int _flyoutClosedCount = 0 [private]

Definition at line 21 of file DropDownButtonPage.xaml.cs.

int _flyoutOpenedCount = 0 [private]

Definition at line 20 of file DropDownButtonPage.xaml.cs.

The documentation for this class was generated from the following file:
  • DropDownButton/TestUI/DropDownButtonPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DynamicPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • DynamicPage
Public Member Functions | Properties | Private Member Functions | Private Attributes

DynamicPage Class Reference

List of all members.

Public Member Functions

DynamicPage ()

Properties

CompositionPropertySet | AnimatedValuesSpy [get, set]
ParallaxView | DynamicParallaxView [get, set]
bool | HasDirectManipulation [get, set]
ExpressionAnimation | HorizontalOffsetAnimation [get, set]
bool | IsRenderingHooked [get, set]
ParallaxView | ParallaxView [get, set]
ScrollPresenter | ScrollPresenter [get, set]
ScrollViewer | ScrollViewer [get, set]
FrameworkElement | TargetElement [get, set]
uint | UIThreadTicksForValuesSpy [get, set]
ExpressionAnimation | VerticalOffsetAnimation [get, set]

Private Member Functions

void | btnCreateParallaxView_Click (object sender, RoutedEventArgs e)
void | btnGetHeight_Click (object sender, RoutedEventArgs e)
void | btnGetHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | btnGetHorizontalShift_Click (object sender, RoutedEventArgs e)
void | btnGetHorizontalSourceEndOffset_Click (object sender, RoutedEventArgs e)
void | btnGetHorizontalSourceStartOffset_Click (object sender, RoutedEventArgs e)
void | btnGetMaxHorizontalShiftRatio_Click (object sender, RoutedEventArgs e)
void | btnGetMaxVerticalShiftRatio_Click (object sender, RoutedEventArgs e)
void | btnGetSCHeight_Click (object sender, RoutedEventArgs e)
void | btnGetSCWidth_Click (object sender, RoutedEventArgs e)
void | btnGetTEActualHeight_Click (object sender, RoutedEventArgs e)
void | btnGetTEActualWidth_Click (object sender, RoutedEventArgs e)
void | btnGetTEHeight_Click (object sender, RoutedEventArgs e)
void | btnGetTEMargin_Click (object sender, RoutedEventArgs e)
void | btnGetTEMaxHeight_Click (object sender, RoutedEventArgs e)
void | btnGetTEMaxWidth_Click (object sender, RoutedEventArgs e)
void | btnGetTEWidth_Click (object sender, RoutedEventArgs e)
void | btnGetVerticalOffset_Click (object sender, RoutedEventArgs e)
void | btnGetVerticalShift_Click (object sender, RoutedEventArgs e)
void | btnGetVerticalSourceEndOffset_Click (object sender, RoutedEventArgs e)
void | btnGetVerticalSourceStartOffset_Click (object sender, RoutedEventArgs e)
void | btnGetWidth_Click (object sender, RoutedEventArgs e)
void | btnGetZoomFactor_Click (object sender, RoutedEventArgs e)
void | btnRefreshAutomaticHorizontalOffsets_Click (object sender, RoutedEventArgs e)
void | btnRefreshAutomaticVerticalOffsets_Click (object sender, RoutedEventArgs e)
void | btnReleaseParallaxView_Click (object sender, RoutedEventArgs e)
void | btnReparentSource_Click (object sender, RoutedEventArgs e)
void | btnSetHeight_Click (object sender, RoutedEventArgs e)
void | btnSetHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | btnSetHorizontalShift_Click (object sender, RoutedEventArgs e)
void | btnSetHorizontalSourceEndOffset_Click (object sender, RoutedEventArgs e)
void | btnSetHorizontalSourceStartOffset_Click (object sender, RoutedEventArgs e)
void | btnSetMaxHorizontalShiftRatio_Click (object sender, RoutedEventArgs e)
void | btnSetMaxVerticalShiftRatio_Click (object sender, RoutedEventArgs e)
void | btnSetSCHeight_Click (object sender, RoutedEventArgs e)
void | btnSetSCWidth_Click (object sender, RoutedEventArgs e)
void | btnSetTEHeight_Click (object sender, RoutedEventArgs e)
void | btnSetTEMargin_Click (object sender, RoutedEventArgs e)
void | btnSetTEMaxHeight_Click (object sender, RoutedEventArgs e)
void | btnSetTEMaxWidth_Click (object sender, RoutedEventArgs e)
void | btnSetTEWidth_Click (object sender, RoutedEventArgs e)
void | btnSetVerticalOffset_Click (object sender, RoutedEventArgs e)
void | btnSetVerticalShift_Click (object sender, RoutedEventArgs e)
void | btnSetVerticalSourceEndOffset_Click (object sender, RoutedEventArgs e)
void | btnSetVerticalSourceStartOffset_Click (object sender, RoutedEventArgs e)
void | btnSetWidth_Click (object sender, RoutedEventArgs e)
void | btnSetZoomFactor_Click (object sender, RoutedEventArgs e)
void | btnUnparentSource_Click (object sender, RoutedEventArgs e)
void | CheckSpyingTicksRequirement ()
void | chkAreHorizontalSourceOffsetsRelative_Checked (object sender, RoutedEventArgs e)
void | chkAreHorizontalSourceOffsetsRelative_Unchecked (object sender, RoutedEventArgs e)
void | chkAreVerticalSourceOffsetsRelative_Checked (object sender, RoutedEventArgs e)
void | chkAreVerticalSourceOffsetsRelative_Unchecked (object sender, RoutedEventArgs e)
void | chkIsHorizontalShiftClamped_Checked (object sender, RoutedEventArgs e)
void | chkIsHorizontalShiftClamped_Unchecked (object sender, RoutedEventArgs e)
void | chkIsRTL_Checked (object sender, RoutedEventArgs e)
void | chkIsRTL_Unchecked (object sender, RoutedEventArgs e)
void | chkIsVerticalShiftClamped_Checked (object sender, RoutedEventArgs e)
void | chkIsVerticalShiftClamped_Unchecked (object sender, RoutedEventArgs e)
void | cmbHorizontalContentAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbHorizontalScrollMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbParallaxView_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbSCHorizontalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbSCVerticalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbSource_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbSourceContent_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbTargetElement_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbTEHorizontalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbTEVerticalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbVerticalContentAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbVerticalScrollMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | cmbZoomMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CompositionTarget_Rendering (object sender, object e)
void | RefreshContentAlignments ()
void | RefreshHorizontalScrollMode ()
void | RefreshSourceContent ()
void | RefreshSourceContentSizes ()
void | RefreshSVCAlignments ()
void | RefreshTEAlignments ()
void | RefreshTESizes ()
void | RefreshVerticalScrollMode ()
void | RefreshZoomMode ()
void | ResetSpyOutput ()
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollViewer_DirectManipulationCompleted (object sender, object e)
void | ScrollViewer_DirectManipulationStarted (object sender, object e)
void | ScrollViewer_ViewChanged (object sender, ScrollViewerViewChangedEventArgs e)
void | SetupAnimatedValuesSpy ()
void | SetupScrollPresenter ()
void | SpyAnimatedValues ()
void | StartAnimatedValuesSpy ()
void | StopAnimatedValuesSpy ()
void | TickForValuesSpy ()

Private Attributes

Rectangle | rectSC = null
ScrollPresenter | scrollPresenter = null

Detailed Description

Definition at line 19 of file DynamicPage.xaml.cs.

Constructor & Destructor Documentation

DynamicPage ( ) [inline]

Definition at line 24 of file DynamicPage.xaml.cs.

        {
            this.InitializeComponent();

            this.ParallaxView = this.parallaxView;
            this.ScrollViewer = null;
            this.ScrollPresenter = null;
            SetupScrollPresenter();
            this.TargetElement = null;
            this.DynamicParallaxView = null;
            this.AnimatedValuesSpy = null;
            this.HorizontalOffsetAnimation = null;
            this.VerticalOffsetAnimation = null;
            this.HasDirectManipulation = false;
            this.UIThreadTicksForValuesSpy = 0;
            this.IsRenderingHooked = false;

            this.chkIsRTL.IsChecked = (this.spInner.FlowDirection == FlowDirection.RightToLeft);

            this.chkAreHorizontalSourceOffsetsRelative.IsChecked = this.parallaxView.HorizontalSourceOffsetKind == ParallaxSourceOffsetKind.Relative;
            this.chkAreVerticalSourceOffsetsRelative.IsChecked = this.parallaxView.VerticalSourceOffsetKind == ParallaxSourceOffsetKind.Relative;
            this.chkIsHorizontalShiftClamped.IsChecked = this.parallaxView.IsHorizontalShiftClamped;
            this.chkIsVerticalShiftClamped.IsChecked = this.parallaxView.IsVerticalShiftClamped;

            btnGetHorizontalShift_Click(null, null);
            btnGetMaxHorizontalShiftRatio_Click(null, null);
            btnGetHorizontalSourceStartOffset_Click(null, null);
            btnGetHorizontalSourceEndOffset_Click(null, null);

            btnGetVerticalShift_Click(null, null);
            btnGetMaxVerticalShiftRatio_Click(null, null);
            btnGetVerticalSourceStartOffset_Click(null, null);
            btnGetVerticalSourceEndOffset_Click(null, null);
        }

Member Function Documentation

void btnCreateParallaxView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1322 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.DynamicParallaxView == null)
                {
                    this.DynamicParallaxView = new ParallaxView();
                    this.spInner.Children.Add(this.DynamicParallaxView);
                }
            }
            catch
            {
            }
        }

void btnGetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1077 of file DynamicPage.xaml.cs.

        {
            this.txtHeight.Text = this.ParallaxView.Height.ToString();
        }

void btnGetHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1186 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.txtHorizontalOffset.Text = this.ScrollViewer.HorizontalOffset.ToString();
            }
            else if (this.ScrollPresenter != null)
            {
                this.txtHorizontalOffset.Text = this.ScrollPresenter.HorizontalOffset.ToString();
            }
        }

void btnGetHorizontalShift_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 954 of file DynamicPage.xaml.cs.

        {
            this.txtHorizontalShift.Text = this.ParallaxView.HorizontalShift.ToString();
        }

void btnGetHorizontalSourceEndOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1005 of file DynamicPage.xaml.cs.

        {
            this.txtHorizontalSourceEndOffset.Text = this.ParallaxView.HorizontalSourceEndOffset.ToString();
        }

void btnGetHorizontalSourceStartOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 988 of file DynamicPage.xaml.cs.

        {
            this.txtHorizontalSourceStartOffset.Text = this.ParallaxView.HorizontalSourceStartOffset.ToString();
        }

void btnGetMaxHorizontalShiftRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 971 of file DynamicPage.xaml.cs.

        {
            this.txtMaxHorizontalShiftRatio.Text = this.ParallaxView.MaxHorizontalShiftRatio.ToString();
        }

void btnGetMaxVerticalShiftRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1110 of file DynamicPage.xaml.cs.

        {
            this.txtMaxVerticalShiftRatio.Text = this.ParallaxView.MaxVerticalShiftRatio.ToString();
        }

void btnGetSCHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 399 of file DynamicPage.xaml.cs.

        {
            FrameworkElement feSourceContent = null;

            if (this.ScrollViewer != null && this.ScrollViewer.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollViewer.Content as FrameworkElement;
            }
            else if (this.ScrollPresenter != null && this.ScrollPresenter.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollPresenter.Content as FrameworkElement;
            }

            if (feSourceContent != null)
            {
                this.txtSCHeight.Text = feSourceContent.Height.ToString();
            }
        }

void btnGetSCWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 355 of file DynamicPage.xaml.cs.

        {
            FrameworkElement feSourceContent = null;

            if (this.ScrollViewer != null && this.ScrollViewer.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollViewer.Content as FrameworkElement;
            }
            else if (this.ScrollPresenter != null && this.ScrollPresenter.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollPresenter.Content as FrameworkElement;
            }

            if (feSourceContent != null)
            {
                this.txtSCWidth.Text = feSourceContent.Width.ToString();
            }
        }

void btnGetTEActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 584 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement is FrameworkElement)
            {
                this.txtTEActualHeight.Text = (this.TargetElement as FrameworkElement).ActualHeight.ToString();
            }
        }

void btnGetTEActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 576 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement is FrameworkElement)
            {
                this.txtTEActualWidth.Text = (this.TargetElement as FrameworkElement).ActualWidth.ToString();
            }
        }

void btnGetTEHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 504 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement is FrameworkElement)
            {
                this.txtTEHeight.Text = (this.TargetElement as FrameworkElement).Height.ToString();
            }
        }

void btnGetTEMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 592 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement != null)
            {
                this.txtTEMarginLeft.Text = this.TargetElement.Margin.Left.ToString();
                this.txtTEMarginTop.Text = this.TargetElement.Margin.Top.ToString();
                this.txtTEMarginRight.Text = this.TargetElement.Margin.Right.ToString();
                this.txtTEMarginBottom.Text = this.TargetElement.Margin.Bottom.ToString();
            }
        }

void btnGetTEMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 552 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement is FrameworkElement)
            {
                this.txtTEMaxHeight.Text = (this.TargetElement as FrameworkElement).MaxHeight.ToString();
            }
        }

void btnGetTEMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 528 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement is FrameworkElement)
            {
                this.txtTEMaxWidth.Text = (this.TargetElement as FrameworkElement).MaxWidth.ToString();
            }
        }

void btnGetTEWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 480 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement is FrameworkElement)
            {
                this.txtTEWidth.Text = (this.TargetElement as FrameworkElement).Width.ToString();
            }
        }

void btnGetVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1219 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.txtVerticalOffset.Text = this.ScrollViewer.VerticalOffset.ToString();
            }
            else if (this.ScrollPresenter != null)
            {
                this.txtVerticalOffset.Text = this.ScrollPresenter.VerticalOffset.ToString();
            }
        }

void btnGetVerticalShift_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1093 of file DynamicPage.xaml.cs.

        {
            this.txtVerticalShift.Text = this.ParallaxView.VerticalShift.ToString();
        }

void btnGetVerticalSourceEndOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1145 of file DynamicPage.xaml.cs.

        {
            this.txtVerticalSourceEndOffset.Text = this.ParallaxView.VerticalSourceEndOffset.ToString();
        }

void btnGetVerticalSourceStartOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1127 of file DynamicPage.xaml.cs.

        {
            this.txtVerticalSourceStartOffset.Text = this.ParallaxView.VerticalSourceStartOffset.ToString();
            TickForValuesSpy();
        }

void btnGetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 938 of file DynamicPage.xaml.cs.

        {
            this.txtWidth.Text = this.ParallaxView.Width.ToString();
        }

void btnGetZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1253 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.txtZoomFactor.Text = this.ScrollViewer.ZoomFactor.ToString();
            }
            else if (this.ScrollPresenter != null)
            {
                this.txtZoomFactor.Text = this.ScrollPresenter.ZoomFactor.ToString();
            }
        }

void btnRefreshAutomaticHorizontalOffsets_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1361 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.DynamicParallaxView != null)
                {
                    this.DynamicParallaxView.RefreshAutomaticHorizontalOffsets();
                }
            }
            catch
            {
            }
        }

void btnRefreshAutomaticVerticalOffsets_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1375 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.DynamicParallaxView != null)
                {
                    this.DynamicParallaxView.RefreshAutomaticVerticalOffsets();
                }
            }
            catch
            {
            }
        }

void btnReleaseParallaxView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1336 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.DynamicParallaxView != null)
                {
                    this.spInner.Children.Remove(this.DynamicParallaxView);
                    this.DynamicParallaxView = null;

                    this.ParallaxView = this.parallaxView;
                    this.cmbParallaxView.SelectedIndex = 0;
                    this.chkAreHorizontalSourceOffsetsRelative.IsChecked = this.ParallaxView.HorizontalSourceOffsetKind == ParallaxSourceOffsetKind.Relative;
                    this.chkAreVerticalSourceOffsetsRelative.IsChecked = this.ParallaxView.VerticalSourceOffsetKind == ParallaxSourceOffsetKind.Relative;
                    this.chkIsHorizontalShiftClamped.IsChecked = this.ParallaxView.IsHorizontalShiftClamped;
                    this.chkIsVerticalShiftClamped.IsChecked = this.ParallaxView.IsVerticalShiftClamped;

                    System.GC.Collect();
                    System.GC.WaitForPendingFinalizers();
                }
            }
            catch
            {
            }
        }

void btnReparentSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1304 of file DynamicPage.xaml.cs.

        {
            try
            {
                FrameworkElement source = this.ScrollViewer == null ?
                    this.ScrollPresenter as FrameworkElement :
                    this.ScrollViewer as FrameworkElement;

                if (source != null && source.Parent == null)
                {
                    this.spInner.Children.Add(source);
                }
            }
            catch
            {
            }
        }

void btnSetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1082 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.Height = Convert.ToDouble(this.txtHeight.Text);
            }
            catch (FormatException)
            {
            }
        }

void btnSetHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1198 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.ScrollViewer != null)
                {
                    this.ScrollViewer.ChangeView(Convert.ToSingle(this.txtHorizontalOffset.Text), null, null, true);
                }
                else if (this.ScrollPresenter != null)
                {
                    this.ScrollPresenter.ScrollTo(
                        Convert.ToSingle(this.txtHorizontalOffset.Text),
                        this.ScrollPresenter.VerticalOffset,
                        new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (FormatException)
            {
            }
        }

void btnSetHorizontalShift_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 959 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.HorizontalShift = Convert.ToDouble(this.txtHorizontalShift.Text);
                SetupAnimatedValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetHorizontalSourceEndOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1010 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.HorizontalSourceEndOffset = Convert.ToDouble(this.txtHorizontalSourceEndOffset.Text);
                TickForValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetHorizontalSourceStartOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 993 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.HorizontalSourceStartOffset = Convert.ToDouble(this.txtHorizontalSourceStartOffset.Text);
                TickForValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetMaxHorizontalShiftRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 976 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.MaxHorizontalShiftRatio = Convert.ToDouble(this.txtMaxHorizontalShiftRatio.Text);
                TickForValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetMaxVerticalShiftRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1115 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.MaxVerticalShiftRatio = Convert.ToDouble(this.txtMaxVerticalShiftRatio.Text);
                TickForValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetSCHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 418 of file DynamicPage.xaml.cs.

        {
            try
            {
                FrameworkElement feSourceContent = null;

                if (this.ScrollViewer != null && this.ScrollViewer.Content is FrameworkElement)
                {
                    feSourceContent = this.ScrollViewer.Content as FrameworkElement;
                }
                else if (this.ScrollPresenter != null && this.ScrollPresenter.Content is FrameworkElement)
                {
                    feSourceContent = this.ScrollPresenter.Content as FrameworkElement;
                }

                if (feSourceContent != null)
                {
                    feSourceContent.Height = Convert.ToDouble(this.txtSCHeight.Text);
                }
            }
            catch (FormatException)
            {
            }
        }

void btnSetSCWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 374 of file DynamicPage.xaml.cs.

        {
            try
            {
                FrameworkElement feSourceContent = null;

                if (this.ScrollViewer != null && this.ScrollViewer.Content is FrameworkElement)
                {
                    feSourceContent = this.ScrollViewer.Content as FrameworkElement;
                }
                else if (this.ScrollPresenter != null && this.ScrollPresenter.Content is FrameworkElement)
                {
                    feSourceContent = this.ScrollPresenter.Content as FrameworkElement;
                }

                if (feSourceContent != null)
                {
                    feSourceContent.Width = Convert.ToDouble(this.txtSCWidth.Text);
                }
            }
            catch (FormatException)
            {
            }
        }

void btnSetTEHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 512 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.TargetElement is FrameworkElement)
                {
                    (this.TargetElement as FrameworkElement).Height = Convert.ToDouble(this.txtTEHeight.Text);
                }

                this.refImg.Height = Convert.ToDouble(this.txtTEHeight.Text);
            }
            catch (FormatException)
            {
            }
        }

void btnSetTEMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 603 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement != null)
            {
                try
                {
                    this.TargetElement.Margin = new Thickness(
                        Convert.ToDouble(this.txtTEMarginLeft.Text),
                        Convert.ToDouble(this.txtTEMarginTop.Text),
                        Convert.ToDouble(this.txtTEMarginRight.Text),
                        Convert.ToDouble(this.txtTEMarginBottom.Text));
                }
                catch (FormatException)
                {
                }
            }
        }

void btnSetTEMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 560 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.TargetElement is FrameworkElement)
                {
                    (this.TargetElement as FrameworkElement).MaxHeight = Convert.ToDouble(this.txtTEMaxHeight.Text);
                }

                this.refImg.MaxHeight = Convert.ToDouble(this.txtTEMaxHeight.Text);
            }
            catch (FormatException)
            {
            }
        }

void btnSetTEMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 536 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.TargetElement is FrameworkElement)
                {
                    (this.TargetElement as FrameworkElement).MaxWidth = Convert.ToDouble(this.txtTEMaxWidth.Text);
                }

                this.refImg.MaxWidth = Convert.ToDouble(this.txtTEMaxWidth.Text);
            }
            catch (FormatException)
            {
            }
        }

void btnSetTEWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 488 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.TargetElement is FrameworkElement)
                {
                    (this.TargetElement as FrameworkElement).Width = Convert.ToDouble(this.txtTEWidth.Text);
                }

                this.refImg.Width = Convert.ToDouble(this.txtTEWidth.Text);
            }
            catch (FormatException)
            {
            }
        }

void btnSetVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1231 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.ScrollViewer != null)
                {
                    this.ScrollViewer.ChangeView(null, Convert.ToSingle(this.txtVerticalOffset.Text), null, true);
                }
                else if (this.ScrollPresenter != null)
                {
                    this.ScrollPresenter.ScrollTo(
                        this.ScrollPresenter.HorizontalOffset,
                        Convert.ToSingle(this.txtVerticalOffset.Text),
                        new ScrollingScrollOptions(
                            ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (FormatException)
            {
            }
        }

void btnSetVerticalShift_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1098 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.VerticalShift = Convert.ToDouble(this.txtVerticalShift.Text);
                SetupAnimatedValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetVerticalSourceEndOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1150 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.VerticalSourceEndOffset = Convert.ToDouble(this.txtVerticalSourceEndOffset.Text);
                TickForValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetVerticalSourceStartOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1133 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.VerticalSourceStartOffset = Convert.ToDouble(this.txtVerticalSourceStartOffset.Text);
                TickForValuesSpy();
            }
            catch (FormatException)
            {
            }
        }

void btnSetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 943 of file DynamicPage.xaml.cs.

        {
            try
            {
                this.ParallaxView.Width = Convert.ToDouble(this.txtWidth.Text);
            }
            catch (FormatException)
            {
            }
        }

void btnSetZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1265 of file DynamicPage.xaml.cs.

        {
            try
            {
                if (this.ScrollViewer != null)
                {
                    this.ScrollViewer.ChangeView(null, null, Convert.ToSingle(this.txtZoomFactor.Text), true);
                }
                else if (this.ScrollPresenter != null)
                {
                    this.ScrollPresenter.ZoomTo(
                        Convert.ToSingle(this.txtZoomFactor.Text),
                        System.Numerics.Vector2.Zero,
                        new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (FormatException)
            {
            }
        }

void btnUnparentSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1286 of file DynamicPage.xaml.cs.

        {
            try
            {
                FrameworkElement source = this.ScrollViewer == null ?
                    this.ScrollPresenter as FrameworkElement :
                    this.ScrollViewer as FrameworkElement;

                if (source != null && source.Parent != null)
                {
                    this.spInner.Children.Remove(source);
                }
            }
            catch
            {
            }
        }

void CheckSpyingTicksRequirement ( ) [inline, private]

Definition at line 868 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null &&
                (this.HasDirectManipulation || this.UIThreadTicksForValuesSpy > 0) &&
                this.AnimatedValuesSpy != null &&
                (this.ScrollViewer.HorizontalOffset == 0 || this.ScrollViewer.VerticalOffset == 0 ||
                 this.ScrollViewer.HorizontalOffset == this.ScrollViewer.ScrollableWidth || this.ScrollViewer.VerticalOffset == this.ScrollViewer.ScrollableHeight))
            {
                if (!this.IsRenderingHooked)
                {
                    this.IsRenderingHooked = true;
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering += CompositionTarget_Rendering;
                }
            }
            else
            {
                if (this.IsRenderingHooked)
                {
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering -= CompositionTarget_Rendering;
                    this.IsRenderingHooked = false;
                }
            }
        }

void chkAreHorizontalSourceOffsetsRelative_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1059 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.HorizontalSourceOffsetKind = ParallaxSourceOffsetKind.Relative;
            TickForValuesSpy();
        }

void chkAreHorizontalSourceOffsetsRelative_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1053 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.HorizontalSourceOffsetKind = ParallaxSourceOffsetKind.Absolute;
            TickForValuesSpy();
        }

void chkAreVerticalSourceOffsetsRelative_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1168 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.VerticalSourceOffsetKind = ParallaxSourceOffsetKind.Relative;
            TickForValuesSpy();
        }

void chkAreVerticalSourceOffsetsRelative_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1162 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.VerticalSourceOffsetKind = ParallaxSourceOffsetKind.Absolute;
            TickForValuesSpy();
        }

void chkIsHorizontalShiftClamped_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1071 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.IsHorizontalShiftClamped = true;
            TickForValuesSpy();
        }

void chkIsHorizontalShiftClamped_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1065 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.IsHorizontalShiftClamped = false;
            TickForValuesSpy();
        }

void chkIsRTL_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1027 of file DynamicPage.xaml.cs.

        {
            this.spInner.FlowDirection = FlowDirection.RightToLeft;
        }

void chkIsRTL_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1022 of file DynamicPage.xaml.cs.

        {
            this.spInner.FlowDirection = FlowDirection.LeftToRight;
        }

void chkIsVerticalShiftClamped_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1180 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.IsVerticalShiftClamped = true;
            TickForValuesSpy();
        }

void chkIsVerticalShiftClamped_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1174 of file DynamicPage.xaml.cs.

        {
            this.ParallaxView.IsVerticalShiftClamped = false;
            TickForValuesSpy();
        }

void cmbHorizontalContentAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 230 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.ScrollViewer.HorizontalContentAlignment = (HorizontalAlignment)this.cmbHorizontalContentAlignment.SelectedIndex;
            }
        }

void cmbHorizontalScrollMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 648 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.ScrollViewer.HorizontalScrollMode = (Microsoft.UI.Xaml.Controls.ScrollMode)this.cmbHorizontalScrollMode.SelectedIndex;
            }
            else if (this.ScrollPresenter != null)
            {
                switch (this.cmbHorizontalScrollMode.SelectedIndex)
                {
                    case 0:
                        this.ScrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Disabled;
                        break;
                    case 1:
                        this.ScrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Enabled;
                        break;
                    case 2:
                        this.ScrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Auto;
                        break;
                }
            }
        }

void cmbParallaxView_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1032 of file DynamicPage.xaml.cs.

        {
            switch (this.cmbParallaxView.SelectedIndex)
            {
                case 0:
                    this.ParallaxView = this.parallaxView;
                    break;
                case 1:
                    if (this.DynamicParallaxView != null)
                        this.ParallaxView = this.DynamicParallaxView;
                    else
                        this.cmbParallaxView.SelectedIndex = 0;
                    break;
            }

            this.chkAreHorizontalSourceOffsetsRelative.IsChecked = this.ParallaxView.HorizontalSourceOffsetKind == ParallaxSourceOffsetKind.Relative;
            this.chkAreVerticalSourceOffsetsRelative.IsChecked = this.ParallaxView.VerticalSourceOffsetKind == ParallaxSourceOffsetKind.Relative;
            this.chkIsHorizontalShiftClamped.IsChecked = this.ParallaxView.IsHorizontalShiftClamped;
            this.chkIsVerticalShiftClamped.IsChecked = this.ParallaxView.IsVerticalShiftClamped;
        }

void cmbSCHorizontalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 311 of file DynamicPage.xaml.cs.

        {
            FrameworkElement feSourceContent = null;

            if (this.ScrollViewer != null && this.ScrollViewer.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollViewer.Content as FrameworkElement;
            }
            else if (this.ScrollPresenter != null && this.ScrollPresenter.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollPresenter.Content as FrameworkElement;
            }

            if (feSourceContent != null)
            {
                feSourceContent.HorizontalAlignment = (HorizontalAlignment)this.cmbSCHorizontalAlignment.SelectedIndex;
            }
        }

void cmbSCVerticalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 330 of file DynamicPage.xaml.cs.

        {
            FrameworkElement feSourceContent = null;

            if (this.ScrollViewer != null && this.ScrollViewer.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollViewer.Content as FrameworkElement;
            }
            else if (this.ScrollPresenter != null && this.ScrollPresenter.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollPresenter.Content as FrameworkElement;
            }

            if (feSourceContent != null)
            {
                feSourceContent.VerticalAlignment = (VerticalAlignment)this.cmbSCVerticalAlignment.SelectedIndex;
            }
        }

void cmbSource_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 765 of file DynamicPage.xaml.cs.

        {
            if (this.ParallaxView != null)
            {
                if (this.ScrollViewer != null)
                {
                    this.ScrollViewer.ViewChanged -= ScrollViewer_ViewChanged;
                    this.ScrollViewer.DirectManipulationStarted -= ScrollViewer_DirectManipulationStarted;
                    this.ScrollViewer.DirectManipulationCompleted -= ScrollViewer_DirectManipulationCompleted;
                }
                else if (this.ScrollPresenter != null)
                {
                    this.ScrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
                }
                switch (this.cmbSource.SelectedIndex)
                {
                    case 0:
                        this.ParallaxView.Source = null;
                        this.ScrollViewer = null;
                        this.ScrollPresenter = null;
                        break;
                    case 1:
                        this.ParallaxView.Source = this.scrollViewer;
                        this.ScrollViewer = this.scrollViewer;
                        this.ScrollPresenter = null;
                        if (this.cmbSourceContent.Items.Count > 1)
                            this.cmbSourceContent.Items.RemoveAt(1);
                        this.cmbSourceContent.Items.Add("stackPanel");
                        RefreshSourceContent();
                        RefreshSourceContentSizes();
                        RefreshSVCAlignments();
                        RefreshContentAlignments();
                        RefreshHorizontalScrollMode();
                        RefreshVerticalScrollMode();
                        RefreshZoomMode();
                        btnGetHorizontalOffset_Click(null, null);
                        btnGetVerticalOffset_Click(null, null);
                        btnGetZoomFactor_Click(null, null);
                        break;
                    case 2:
                        this.ParallaxView.Source = this.scrollPresenter;
                        this.ScrollPresenter = this.scrollPresenter;
                        this.ScrollViewer = null;
                        if (this.cmbSourceContent.Items.Count > 1)
                            this.cmbSourceContent.Items.RemoveAt(1);
                        this.cmbSourceContent.Items.Add("rectangle");
                        RefreshSourceContent();
                        RefreshSourceContentSizes();
                        RefreshSVCAlignments();
                        RefreshContentAlignments();
                        RefreshHorizontalScrollMode();
                        RefreshVerticalScrollMode();
                        RefreshZoomMode();
                        btnGetHorizontalOffset_Click(null, null);
                        btnGetVerticalOffset_Click(null, null);
                        btnGetZoomFactor_Click(null, null);
                        break;
                }

                SetupAnimatedValuesSpy();

                if (this.ScrollViewer != null)
                {
                    this.ScrollViewer.ViewChanged += ScrollViewer_ViewChanged;
                    this.ScrollViewer.DirectManipulationStarted += ScrollViewer_DirectManipulationStarted;
                    this.ScrollViewer.DirectManipulationCompleted += ScrollViewer_DirectManipulationCompleted;
                }
                else if (this.ScrollPresenter != null)
                {
                    this.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                }
            }
        }

void cmbSourceContent_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 260 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                switch (this.cmbSourceContent.SelectedIndex)
                {
                    case 0:
                        this.ScrollViewer.Content = null;
                        break;
                    case 1:
                        if (this.ScrollViewer == this.scrollViewer)
                            this.ScrollViewer.Content = this.spSV;
                        break;
                }
            }

            if (this.ScrollPresenter != null)
            {
                switch (this.cmbSourceContent.SelectedIndex)
                {
                    case 0:
                        this.ScrollPresenter.Content = null;
                        break;
                    case 1:
                        if (this.ScrollPresenter == this.scrollPresenter)
                            this.ScrollPresenter.Content = this.rectSC;
                        break;
                }
            }
        }

void cmbTargetElement_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 902 of file DynamicPage.xaml.cs.

        {
            if (this.ParallaxView != null)
            {
                switch (this.cmbTargetElement.SelectedIndex)
                {
                    case 0:
                        this.ParallaxView.Child = null;
                        this.TargetElement = null;
                        break;
                    case 1:
                    case 2:
                    case 3:
                        FrameworkElement targetFE = null;

                        if (this.cmbTargetElement.SelectedIndex == 1)
                            targetFE = this.border;
                        else if (this.cmbTargetElement.SelectedIndex == 2)
                            targetFE = this.img;
                        else
                            targetFE = this.rect;

                        if (targetFE.Parent != null)
                            (targetFE.Parent as Panel).Children.Remove(targetFE);
                        targetFE.Visibility = Visibility.Visible;
                        this.ParallaxView.Child = targetFE;
                        this.TargetElement = targetFE;
                        RefreshTEAlignments();
                        RefreshTESizes();
                        break;
                }

                SetupAnimatedValuesSpy();
            }
        }

void cmbTEHorizontalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 460 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement != null)
            {
                this.TargetElement.HorizontalAlignment = (HorizontalAlignment)this.cmbTEHorizontalAlignment.SelectedIndex;
            }

            this.refImg.HorizontalAlignment = (HorizontalAlignment)this.cmbTEHorizontalAlignment.SelectedIndex;
        }

void cmbTEVerticalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 470 of file DynamicPage.xaml.cs.

        {
            if (this.TargetElement != null)
            {
                this.TargetElement.VerticalAlignment = (VerticalAlignment)this.cmbTEVerticalAlignment.SelectedIndex;
            }

            this.refImg.VerticalAlignment = (VerticalAlignment)this.cmbTEVerticalAlignment.SelectedIndex;
        }

void cmbVerticalContentAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 238 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.ScrollViewer.VerticalContentAlignment = (VerticalAlignment)this.cmbVerticalContentAlignment.SelectedIndex;
            }
        }

void cmbVerticalScrollMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 698 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.ScrollViewer.VerticalScrollMode = (Microsoft.UI.Xaml.Controls.ScrollMode)this.cmbVerticalScrollMode.SelectedIndex;
            }
            else if (this.ScrollPresenter != null)
            {
                switch (this.cmbVerticalScrollMode.SelectedIndex)
                {
                    case 0:
                        this.ScrollPresenter.VerticalScrollMode = ScrollingScrollMode.Disabled;
                        break;
                    case 1:
                        this.ScrollPresenter.VerticalScrollMode = ScrollingScrollMode.Enabled;
                        break;
                    case 2:
                        this.ScrollPresenter.VerticalScrollMode = ScrollingScrollMode.Auto;
                        break;
                }
            }
        }

void cmbZoomMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 745 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.ScrollViewer.ZoomMode = (Microsoft.UI.Xaml.Controls.ZoomMode)this.cmbZoomMode.SelectedIndex;
            }
            else if (this.ScrollPresenter != null)
            {
                switch (this.cmbZoomMode.SelectedIndex)
                {
                    case 0:
                        this.ScrollPresenter.ZoomMode = ScrollingZoomMode.Disabled;
                        break;
                    case 1:
                        this.ScrollPresenter.ZoomMode = ScrollingZoomMode.Enabled;
                        break;
                }
            }
        }

void CompositionTarget_Rendering | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 892 of file DynamicPage.xaml.cs.

        {
            if (this.UIThreadTicksForValuesSpy > 0)
            {
                this.UIThreadTicksForValuesSpy--;
            }
            CheckSpyingTicksRequirement();
            SpyAnimatedValues();
        }

void RefreshContentAlignments ( ) [inline, private]

Definition at line 221 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.cmbHorizontalContentAlignment.SelectedIndex = (int)this.ScrollViewer.HorizontalContentAlignment;
                this.cmbVerticalContentAlignment.SelectedIndex = (int)this.ScrollViewer.VerticalContentAlignment;
            }
        }

void RefreshHorizontalScrollMode ( ) [inline, private]

Definition at line 621 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.cmbHorizontalScrollMode.SelectedIndex = (int)this.ScrollViewer.HorizontalScrollMode;
            }
            else if (this.ScrollPresenter != null)
            {
                switch (this.ScrollPresenter.HorizontalScrollMode)
                {
                    case ScrollingScrollMode.Disabled:
                        this.cmbHorizontalScrollMode.SelectedIndex = 0;
                        break;
                    case ScrollingScrollMode.Enabled:
                        this.cmbHorizontalScrollMode.SelectedIndex = 1;
                        break;
                    case ScrollingScrollMode.Auto:
                        this.cmbHorizontalScrollMode.SelectedIndex = 2;
                        break;
                }
            }
            else
            {
                this.cmbHorizontalScrollMode.SelectedIndex = 0;
            }
        }

void RefreshSourceContent ( ) [inline, private]

Definition at line 246 of file DynamicPage.xaml.cs.

        {
            if (
                (this.ScrollPresenter != null && this.ScrollPresenter.Content != null) ||
                (this.ScrollViewer != null && this.ScrollViewer.Content != null))
            {
                this.cmbSourceContent.SelectedIndex = 1;
            }
            else
            {
                this.cmbSourceContent.SelectedIndex = 0;
            }
        }

void RefreshSourceContentSizes ( ) [inline, private]

Definition at line 349 of file DynamicPage.xaml.cs.

        {
            btnGetSCWidth_Click(null, null);
            btnGetSCHeight_Click(null, null);
        }

void RefreshSVCAlignments ( ) [inline, private]

Definition at line 291 of file DynamicPage.xaml.cs.

        {
            FrameworkElement feSourceContent = null;

            if (this.ScrollViewer != null && this.ScrollViewer.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollViewer.Content as FrameworkElement;
            }
            else if (this.ScrollPresenter != null && this.ScrollPresenter.Content is FrameworkElement)
            {
                feSourceContent = this.ScrollPresenter.Content as FrameworkElement;
            }

            if (feSourceContent != null)
            {
                this.cmbSCHorizontalAlignment.SelectedIndex = (int)feSourceContent.HorizontalAlignment;
                this.cmbSCVerticalAlignment.SelectedIndex = (int)feSourceContent.VerticalAlignment;
            }
        }

void RefreshTEAlignments ( ) [inline, private]

Definition at line 443 of file DynamicPage.xaml.cs.

        {
            this.cmbTEHorizontalAlignment.SelectedIndex = (int)this.TargetElement.HorizontalAlignment;
            this.cmbTEVerticalAlignment.SelectedIndex = (int)this.TargetElement.VerticalAlignment;
        }

void RefreshTESizes ( ) [inline, private]

Definition at line 449 of file DynamicPage.xaml.cs.

        {
            btnGetTEWidth_Click(null, null);
            btnGetTEHeight_Click(null, null);
            btnGetTEMaxWidth_Click(null, null);
            btnGetTEMaxHeight_Click(null, null);
            btnGetTEActualWidth_Click(null, null);
            btnGetTEActualHeight_Click(null, null);
            btnGetTEMargin_Click(null, null);
        }

void RefreshVerticalScrollMode ( ) [inline, private]

Definition at line 671 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.cmbVerticalScrollMode.SelectedIndex = (int)this.ScrollViewer.VerticalScrollMode;
            }
            else if (this.ScrollPresenter != null)
            {
                switch (this.ScrollPresenter.VerticalScrollMode)
                {
                    case ScrollingScrollMode.Disabled:
                        this.cmbVerticalScrollMode.SelectedIndex = 0;
                        break;
                    case ScrollingScrollMode.Enabled:
                        this.cmbVerticalScrollMode.SelectedIndex = 1;
                        break;
                    case ScrollingScrollMode.Auto:
                        this.cmbVerticalScrollMode.SelectedIndex = 2;
                        break;
                }
            }
            else
            {
                this.cmbVerticalScrollMode.SelectedIndex = 0;
            }
        }

void RefreshZoomMode ( ) [inline, private]

Definition at line 721 of file DynamicPage.xaml.cs.

        {
            if (this.ScrollViewer != null)
            {
                this.cmbZoomMode.SelectedIndex = (int)this.ScrollViewer.ZoomMode;
            }
            else if (this.ScrollPresenter != null)
            {
                switch (this.ScrollPresenter.ZoomMode)
                {
                    case ScrollingZoomMode.Disabled:
                        this.cmbZoomMode.SelectedIndex = 0;
                        break;
                    case ScrollingZoomMode.Enabled:
                        this.cmbZoomMode.SelectedIndex = 1;
                        break;
                }
            }
            else
            {
                this.cmbZoomMode.SelectedIndex = 0;
            }
        }

void ResetSpyOutput ( ) [inline, private]

Definition at line 215 of file DynamicPage.xaml.cs.

        {
            this.tbHorizontalOutput.Text = "0";
            this.tbVerticalOutput.Text = "0";
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 857 of file DynamicPage.xaml.cs.

        {
            SpyAnimatedValues();
        }

void ScrollViewer_DirectManipulationCompleted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 839 of file DynamicPage.xaml.cs.

        {
            TickForValuesSpy();
            this.HasDirectManipulation = false;
        }

void ScrollViewer_DirectManipulationStarted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 845 of file DynamicPage.xaml.cs.

        {
            this.HasDirectManipulation = true;
            CheckSpyingTicksRequirement();
        }

void ScrollViewer_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 851 of file DynamicPage.xaml.cs.

        {
            CheckSpyingTicksRequirement();
            SpyAnimatedValues();
        }

void SetupAnimatedValuesSpy ( ) [inline, private]

Definition at line 125 of file DynamicPage.xaml.cs.

        {
            StopAnimatedValuesSpy();

            this.AnimatedValuesSpy = null;
            this.HorizontalOffsetAnimation = null;
            this.VerticalOffsetAnimation = null;

            if (this.ParallaxView != null && this.ParallaxView.Child is UIElement &&
                (this.ParallaxView.HorizontalShift != 0 || this.ParallaxView.VerticalShift != 0))
            {
                string visualHorizontalTargetedPropertyName = "visual.Translation.X";
                string visualVerticalTargetedPropertyName = "visual.Translation.Y";

                UIElement ppChild = this.ParallaxView.Child as UIElement;
                Visual visualPPChild = ElementCompositionPreview.GetElementVisual(ppChild);

                Compositor compositor = visualPPChild.Compositor;

                this.AnimatedValuesSpy = compositor.CreatePropertySet();
                this.AnimatedValuesSpy.InsertScalar("HorizontalOffset", 0.0f);
                this.AnimatedValuesSpy.InsertScalar("VerticalOffset", 0.0f);

                this.HorizontalOffsetAnimation = compositor.CreateExpressionAnimation(visualHorizontalTargetedPropertyName);
                this.VerticalOffsetAnimation = compositor.CreateExpressionAnimation(visualVerticalTargetedPropertyName);

                this.HorizontalOffsetAnimation.SetReferenceParameter("visual", visualPPChild);
                this.VerticalOffsetAnimation.SetReferenceParameter("visual", visualPPChild);

                CheckSpyingTicksRequirement();

                TickForValuesSpy();
            }
            else
            {
                ResetSpyOutput();
            }
        }

void SetupScrollPresenter ( ) [inline, private]

Definition at line 1389 of file DynamicPage.xaml.cs.

        {
            LinearGradientBrush threeColorsLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop blueGS = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
            threeColorsLGB.GradientStops.Add(blueGS);

            GradientStop yellowGS = new GradientStop() { Color = Microsoft.UI.Colors.Yellow, Offset = 0.5 };
            threeColorsLGB.GradientStops.Add(yellowGS);

            GradientStop redGS = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
            threeColorsLGB.GradientStops.Add(redGS);

            this.rectSC = new Rectangle();
            this.rectSC.Width = 400;
            this.rectSC.Height = 900;
            this.rectSC.Fill = threeColorsLGB;

            this.scrollPresenter = new ScrollPresenter();
            this.scrollPresenter.Name = "scrollPresenter";
            this.scrollPresenter.Width = 400;
            this.scrollPresenter.Height = 300;
            this.scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Magenta);
            this.scrollPresenter.Margin = new Thickness(6);
            this.scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Disabled;
            this.scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Enabled;
            this.scrollPresenter.ZoomMode = ScrollingZoomMode.Enabled;
            this.scrollPresenter.Content = this.rectSC;
            this.scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter.SetValue(AutomationProperties.NameProperty, "scrollPresenter");

            this.spInner.Children.Add(this.scrollPresenter);

            ComboBoxItem cmbItem = new ComboBoxItem();
            cmbItem.Content = "scrollPresenter";
            cmbItem.SetValue(AutomationProperties.NameProperty, "scrollPresenter");
            cmbSource.Items.Add(cmbItem);
        }

void SpyAnimatedValues ( ) [inline, private]

Definition at line 182 of file DynamicPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                StopAnimatedValuesSpy();

                float offset = 0.0f;
                CompositionGetValueStatus status = this.AnimatedValuesSpy.TryGetScalar("HorizontalOffset", out offset);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    this.tbHorizontalOutput.Text = offset.ToString();
                }
                else
                {
                    this.tbHorizontalOutput.Text = "status=" + status.ToString();
                }

                status = this.AnimatedValuesSpy.TryGetScalar("VerticalOffset", out offset);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    this.tbVerticalOutput.Text = offset.ToString();
                }
                else
                {
                    this.tbVerticalOutput.Text = "status=" + status.ToString();
                }

                StartAnimatedValuesSpy();

                System.Diagnostics.Debug.WriteLine("Spied values: " + this.tbHorizontalOutput.Text + ", " + this.tbVerticalOutput.Text);
            }
        }

void StartAnimatedValuesSpy ( ) [inline, private]

Definition at line 164 of file DynamicPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StartAnimation("HorizontalOffset", this.HorizontalOffsetAnimation);
                this.AnimatedValuesSpy.StartAnimation("VerticalOffset", this.VerticalOffsetAnimation);
            }
        }

void StopAnimatedValuesSpy ( ) [inline, private]

Definition at line 173 of file DynamicPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StopAnimation("HorizontalOffset");
                this.AnimatedValuesSpy.StopAnimation("VerticalOffset");
            }
        }

void TickForValuesSpy ( ) [inline, private]

Definition at line 862 of file DynamicPage.xaml.cs.

        {
            this.UIThreadTicksForValuesSpy = 6;
            CheckSpyingTicksRequirement();
        }

Member Data Documentation

Rectangle rectSC = null [private]

Definition at line 22 of file DynamicPage.xaml.cs.

ScrollPresenter scrollPresenter = null [private]

Definition at line 21 of file DynamicPage.xaml.cs.

Property Documentation

CompositionPropertySet AnimatedValuesSpy [get, set, private]

Definition at line 90 of file DynamicPage.xaml.cs.

ParallaxView DynamicParallaxView [get, set, private]

Definition at line 66 of file DynamicPage.xaml.cs.

bool HasDirectManipulation [get, set, private]

Definition at line 108 of file DynamicPage.xaml.cs.

ExpressionAnimation HorizontalOffsetAnimation [get, set, private]

Definition at line 96 of file DynamicPage.xaml.cs.

bool IsRenderingHooked [get, set, private]

Definition at line 114 of file DynamicPage.xaml.cs.

ParallaxView ParallaxView [get, set, private]

Definition at line 60 of file DynamicPage.xaml.cs.

ScrollPresenter ScrollPresenter [get, set, private]

Definition at line 78 of file DynamicPage.xaml.cs.

ScrollViewer ScrollViewer [get, set, private]

Definition at line 72 of file DynamicPage.xaml.cs.

FrameworkElement TargetElement [get, set, private]

Definition at line 84 of file DynamicPage.xaml.cs.

uint UIThreadTicksForValuesSpy [get, set, private]

Definition at line 120 of file DynamicPage.xaml.cs.

ExpressionAnimation VerticalOffsetAnimation [get, set, private]

Definition at line 102 of file DynamicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/DynamicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: EnumToStringConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • EnumToStringConverter
Public Member Functions

EnumToStringConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 30 of file WebView2BasicPage.xaml.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 32 of file WebView2BasicPage.xaml.cs.

        {
            string EnumString;
            try
            {
                EnumString = Enum.GetName((value.GetType()), value);
                return EnumString;
            }
            catch
            {
                return string.Empty;
            }
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 47 of file WebView2BasicPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2BasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ExpanderPage
Public Member Functions

ExpanderPage Class Reference

List of all members.

Public Member Functions

ExpanderPage ()

Detailed Description

Definition at line 45 of file ExpanderPage.xaml.cs.

Constructor & Destructor Documentation

ExpanderPage ( ) [inline]

Definition at line 47 of file ExpanderPage.xaml.cs.

        {
            this.InitializeComponent();
            var customControlPeer = FrameworkElementAutomationPeer.FromElement(CustomControl);
            var expanderPeer = FrameworkElementAutomationPeer.FromElement(ExpanderWithCustomEventsSource);

            // Commenting because of MuxTestInfra bug:
            // https://github.com/microsoft/microsoft-ui-xaml/issues/3491
            //expanderPeer.EventsSource = customControlPeer;
        }

The documentation for this class was generated from the following file:
  • Expander/TestUI/ExpanderPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExtraCommandBarFlyoutPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ExtraCommandBarFlyoutPage
Public Member Functions | Private Member Functions | Private Attributes

ExtraCommandBarFlyoutPage Class Reference

List of all members.

Public Member Functions

ExtraCommandBarFlyoutPage ()

Private Member Functions

void | ContextFlyout_Closed (object sender, object e)
void | ContextFlyout_Opening (object sender, object e)
void | OnClearClipboardContentsClicked (object sender, object args)
void | OnCountPopupsClicked (object sender, object args)
void | tbloaded (object sender, RoutedEventArgs e)
void | tbunloaded (object sender, RoutedEventArgs e)

Private Attributes

int | customButtonsFlyoutOpenCount = 0

Detailed Description

Definition at line 23 of file ExtraCommandBarFlyoutPage.xaml.cs.

Constructor & Destructor Documentation

ExtraCommandBarFlyoutPage ( ) [inline]

Definition at line 27 of file ExtraCommandBarFlyoutPage.xaml.cs.

        {
            this.InitializeComponent();

            TextCommandBarContextFlyout.Placement = FlyoutPlacementMode.BottomEdgeAlignedLeft;
            TextCommandBarSelectionFlyout.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            TextBox1.ContextFlyout = TextCommandBarContextFlyout;
            RichTextBlock1.ContextFlyout = TextCommandBarContextFlyout;
            TextBox1.SelectionFlyout = TextCommandBarSelectionFlyout;
            RichTextBlock1.SelectionFlyout = TextCommandBarSelectionFlyout;
        }

Member Function Documentation

void ContextFlyout_Closed | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 71 of file ExtraCommandBarFlyoutPage.xaml.cs.

        {
            customButtonsFlyoutOpenCount--;
        }

void ContextFlyout_Opening | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 62 of file ExtraCommandBarFlyoutPage.xaml.cs.

        {
            customButtonsFlyoutOpenCount++;
            var flyout = (sender as Microsoft.UI.Xaml.Controls.TextCommandBarFlyout);
            flyout.PrimaryCommands.Add(new AppBarButton() {
                Content = new TextBlock() { Text = "Test" }
            });
        }

void OnClearClipboardContentsClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 39 of file ExtraCommandBarFlyoutPage.xaml.cs.

        {
            Clipboard.Clear();
        }

void OnCountPopupsClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 44 of file ExtraCommandBarFlyoutPage.xaml.cs.

        {
            PopupCountTextBox.Text = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot).Count.ToString();
            CustomButtonsOpenCount.Text = customButtonsFlyoutOpenCount.ToString();
        }

void tbloaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file ExtraCommandBarFlyoutPage.xaml.cs.

        {
            tb.ContextFlyout = new Microsoft.UI.Xaml.Controls.TextCommandBarFlyout();
            tb.ContextFlyout.Opening += ContextFlyout_Opening;
            tb.ContextFlyout.Closed += ContextFlyout_Closed;
        }

void tbunloaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 57 of file ExtraCommandBarFlyoutPage.xaml.cs.

        {
            tb.ContextFlyout.Opening -= ContextFlyout_Opening;
        }

Member Data Documentation

int customButtonsFlyoutOpenCount = 0 [private]

Definition at line 25 of file ExtraCommandBarFlyoutPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommandBarFlyout/TestUI/ExtraCommandBarFlyoutPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FallbackGrid Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • FallbackGrid
Public Member Functions | Private Attributes | Static Private Attributes

FallbackGrid Class Reference

List of all members.

Public Member Functions

FallbackGrid ()

Private Attributes

internal const int | RectangleHeight = 100
internal const int | RectangleWidth = 100

Static Private Attributes

static internal FallbackGrid | Latest
static internal readonly
Windows.UI.Color 		RectangleColor = Colors.Red

Detailed Description

Definition at line 23 of file AnimatedVisualPlayerPage.xaml.cs.

Constructor & Destructor Documentation

FallbackGrid ( ) [inline]

Definition at line 31 of file AnimatedVisualPlayerPage.xaml.cs.

        {
            Latest = this;
            Microsoft.UI.Xaml.Shapes.Rectangle rect = new Microsoft.UI.Xaml.Shapes.Rectangle();
            rect.MaxWidth = rect.MinWidth = RectangleWidth;
            rect.MaxHeight = rect.MinHeight = RectangleHeight;
            rect.Fill = new SolidColorBrush(RectangleColor);
            Children.Add(rect);
        }

Member Data Documentation

internal FallbackGrid Latest [static, private]

Definition at line 29 of file AnimatedVisualPlayerPage.xaml.cs.

internal readonly Windows.UI.Color RectangleColor = Colors.Red [static, private]

Definition at line 27 of file AnimatedVisualPlayerPage.xaml.cs.

internal const int RectangleHeight = 100 [private]

Definition at line 26 of file AnimatedVisualPlayerPage.xaml.cs.

internal const int RectangleWidth = 100 [private]

Definition at line 25 of file AnimatedVisualPlayerPage.xaml.cs.

The documentation for this class was generated from the following file:
  • AnimatedVisualPlayer/TestUI/AnimatedVisualPlayerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlatItemsControlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • FlatItemsControlPage
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

FlatItemsControlPage Class Reference

List of all members.

Public Member Functions

FlatItemsControlPage ()

Private Member Functions

void | AppendEventMessage (string eventMessage)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceAddItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceGetItemCount_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceInsertItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceRemoveAllItems_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceRemoveItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceReplaceItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceSetItemCount_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsControlTabNavigation_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsControlXYFocusKeyboardNavigation_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsControlTabNavigation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsControlXYFocusKeyboardNavigation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | ChkDataSource_Checked (object sender, RoutedEventArgs e)
void | ChkDataSource_Unchecked (object sender, RoutedEventArgs e)
void | ChkItemsControlIsTabStop_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkItemsControlProperties_Checked (object sender, RoutedEventArgs e)
void | ChkItemsControlProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | CmbItemsControlItemsPanelType_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsControlItemTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsPresenterFooter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsPresenterHeader_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | DataSourceAddItem ()
void | DataSourceInsertItem (int newItemIndex)
void | DataSourceRemoveAllItems ()
void | DataSourceRemoveItem (int oldItemIndex)
void | DataSourceReplaceItem (int itemIndex)
void | FlatItemsControlPage_Loaded (object sender, RoutedEventArgs e)
BitmapImage | GetBitmapImage (int index)
Thickness | GetThicknessFromString (string thickness)
void | NbItemsWrapGridMaximumRowsOrColumns_ValueChanged (object sender, object e)
void | UpdateDataSourceItemCount ()
void | UpdateItemsControlIsTabStop ()
void | UpdateItemsControlItemTemplate ()
void | UpdateItemsControlTabNavigation ()
void | UpdateItemsControlXYFocusKeyboardNavigation ()
void | UpdateItemsPanelMargin ()
void | UpdateItemsPanelOrientation ()
void | UpdateItemsPanelProperties ()
void | UpdateItemsPanelType ()
void | UpdateItemsWrapGridMaximumRowsOrColumns ()
void | UpdateModernPanelUIVisibility ()

Static Private Member Functions

static T | FindElementOfTypeInSubtree< T > (DependencyObject element)

Private Attributes

ObservableCollection< Entity > | _colEntities = null
DataTemplate[] | _itemTemplates = new DataTemplate[3]
ItemsPanelTemplate | _modernPanelTemplate = null

Detailed Description

Definition at line 19 of file FlatItemsControlPage.xaml.cs.

Constructor & Destructor Documentation

FlatItemsControlPage ( ) [inline]

Definition at line 25 of file FlatItemsControlPage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += FlatItemsControlPage_Loaded;
        }

Member Function Documentation

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 802 of file FlatItemsControlPage.xaml.cs.

        {
            lstLogs.Items.Add(eventMessage);
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 807 of file FlatItemsControlPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 812 of file FlatItemsControlPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnDataSourceAddItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 697 of file FlatItemsControlPage.xaml.cs.

        {
            AppendEventMessage("DataSourceAdd");
            DataSourceAddItem();
        }

void BtnDataSourceGetItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 649 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateDataSourceItemCount();
        }

void BtnDataSourceInsertItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 703 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("DataSourceInsert " + newItemIndex);
                    DataSourceInsertItem(newItemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceRemoveAllItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 722 of file FlatItemsControlPage.xaml.cs.

        {
            AppendEventMessage("DataSourceRemoveAll");
            DataSourceRemoveAllItems();
        }

void BtnDataSourceRemoveItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 728 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("DataSourceRemove " + oldItemIndex);
                    DataSourceRemoveItem(oldItemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceReplaceItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 747 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int itemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("DataSourceReplace " + itemIndex);
                    DataSourceReplaceItem(itemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceSetItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 654 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && itemsControl.ItemsSource != null && txtDataSourceItemCount != null)
                {
                    int newItemCount = int.Parse(txtDataSourceItemCount.Text);

                    if (itemsControl.ItemsSource == _colEntities)
                    {
                        if (_colEntities.Count < newItemCount)
                        {
                            var colEntitiesEnd = new List<Entity>();

                            for (int itemIndex = 0; itemIndex < newItemCount - _colEntities.Count; itemIndex++)
                            {
                                BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);

                                colEntitiesEnd.Add(new Entity()
                                {
                                    BitmapImage = bitmapImage,
                                    Id = itemIndex
                                });
                            }

                            _colEntities = new ObservableCollection<Entity>(_colEntities.Concat(colEntitiesEnd));
                        }
                        else if (_colEntities.Count > newItemCount)
                        {
                            _colEntities = new ObservableCollection<Entity>(_colEntities.Take(newItemCount));
                        }

                        itemsControl.ItemsSource = _colEntities;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetItemsControlTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 399 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateItemsControlTabNavigation();
        }

void BtnGetItemsControlXYFocusKeyboardNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 412 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateItemsControlXYFocusKeyboardNavigation();
        }

void BtnGetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 602 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelMargin();
        }

void BtnGetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 551 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
        }

void BtnSetItemsControlTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 404 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlTabNavigation != null)
            {
                itemsControl.TabNavigation = (KeyboardNavigationMode)cmbItemsControlTabNavigation.SelectedIndex;
            }
        }

void BtnSetItemsControlXYFocusKeyboardNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 417 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlXYFocusKeyboardNavigation != null)
            {
                itemsControl.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbItemsControlXYFocusKeyboardNavigation.SelectedIndex;
            }
        }

void BtnSetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 607 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = itemsControl.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        itemsPanel.Margin = GetThicknessFromString(txtItemsPanelMargin.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 556 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsPanelOrientation != null)
            {
                ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                if (itemsWrapGrid != null)
                {
                    itemsControl.ItemsSource = null;

                    itemsWrapGrid.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                }
                else
                {
                    ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                    if (itemsStackPanel != null)
                    {
                        itemsControl.ItemsSource = null;

                        itemsStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                    }
                    else
                    {
                        VirtualizingStackPanel virtualizingStackPanel = itemsControl.ItemsPanelRoot as VirtualizingStackPanel;

                        if (virtualizingStackPanel != null)
                        {
                            virtualizingStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                        }
                        else
                        {
                            StackPanel stackPanel = itemsControl.ItemsPanelRoot as StackPanel;

                            if (stackPanel != null)
                            {
                                stackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                            }
                        }
                    }
                }

                itemsControl.ItemsSource = _colEntities;
            }
        }

void ChkDataSource_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 778 of file FlatItemsControlPage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Visible;
        }

void ChkDataSource_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 784 of file FlatItemsControlPage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Collapsed;
        }

void ChkItemsControlIsTabStop_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 543 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && chkItemsControlIsTabStop != null)
            {
                itemsControl.IsTabStop = (bool)chkItemsControlIsTabStop.IsChecked;
            }
        }

void ChkItemsControlProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 766 of file FlatItemsControlPage.xaml.cs.

        {
            if (svItemsControlProperties != null)
                svItemsControlProperties.Visibility = Visibility.Visible;
        }

void ChkItemsControlProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 772 of file FlatItemsControlPage.xaml.cs.

        {
            if (svItemsControlProperties != null)
                svItemsControlProperties.Visibility = Visibility.Collapsed;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 790 of file FlatItemsControlPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 796 of file FlatItemsControlPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void CmbItemsControlItemsPanelType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 538 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelType();
        }

void CmbItemsControlItemTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 533 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateItemsControlItemTemplate();
        }

void CmbItemsPresenterFooter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 479 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPresenterFooter != null)
                {
                    ItemsPresenter itemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(itemsControl);

                    if (itemsPresenter != null)
                    {
                        switch (cmbItemsPresenterFooter.SelectedIndex)
                        {
                            case 0: /*None*/
                                itemsPresenter.Footer = null;
                                break;
                            case 1: /*No TabStop*/
                                itemsPresenter.Footer = new TextBlock()
                                {
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0),
                                    Text = "ItemsPresenter Footer"
                                };
                                break;
                            case 2: /*Single TabStop*/
                                itemsPresenter.Footer = new Button()
                                {
                                    Content = "ItemsPresenter Footer",
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                            case 3: /*Nested TabStops*/
                                itemsPresenter.Footer = new Button()
                                {
                                    Content = new Button()
                                    {
                                        Content = "ItemsPresenter Footer",
                                        Margin = new Thickness(10.0)
                                    },
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbItemsPresenterHeader_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 425 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPresenterHeader != null)
                {
                    ItemsPresenter itemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(itemsControl);

                    if (itemsPresenter != null)
                    {
                        switch (cmbItemsPresenterHeader.SelectedIndex)
                        {
                            case 0: /*None*/
                                itemsPresenter.Header = null;
                                break;
                            case 1: /*No TabStop*/
                                itemsPresenter.Header = new TextBlock()
                                {
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0),
                                    Text = "ItemsPresenter Header"
                                };
                                break;
                            case 2: /*Single TabStop*/
                                itemsPresenter.Header = new Button()
                                {
                                    Content = "ItemsPresenter Header",
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                            case 3: /*Nested TabStops*/
                                itemsPresenter.Header = new Button()
                                {
                                    Content = new Button()
                                    {
                                        Content = "ItemsPresenter Header",
                                        Margin = new Thickness(10.0)
                                    },
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceAddItem ( ) [inline, private]

Definition at line 280 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && itemsControl.ItemsSource != null)
                {
                    if (itemsControl.ItemsSource == _colEntities)
                    {
                        BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

                        var entity = new Entity()
                        {
                            BitmapImage = bitmapImage,
                            Id = _colEntities.Count
                        };

                        _colEntities.Add(entity);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceInsertItem ( int newItemIndex ) [inline, private]

Definition at line 307 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && itemsControl.ItemsSource != null)
                {
                    if (itemsControl.ItemsSource == _colEntities)
                    {
                        BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

                        var entity = new Entity()
                        {
                            BitmapImage = bitmapImage,
                            Id = _colEntities.Count
                        };

                        _colEntities.Insert(newItemIndex, entity);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceRemoveAllItems ( ) [inline, private]

Definition at line 334 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && itemsControl.ItemsSource != null)
                {
                    if (itemsControl.ItemsSource == _colEntities)
                    {
                        _colEntities.Clear();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceRemoveItem ( int oldItemIndex ) [inline, private]

Definition at line 353 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && itemsControl.ItemsSource != null)
                {
                    if (itemsControl.ItemsSource == _colEntities)
                    {
                        _colEntities.RemoveAt(oldItemIndex);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceReplaceItem ( int itemIndex ) [inline, private]

Definition at line 372 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && itemsControl.ItemsSource != null)
                {
                    if (itemsControl.ItemsSource == _colEntities)
                    {
                        BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

                        var entity = new Entity()
                        {
                            BitmapImage = bitmapImage,
                            Id = _colEntities.Count
                        };

                        _colEntities[itemIndex] = entity;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

static T FindElementOfTypeInSubtree< T > ( DependencyObject element ) [inline, static, private]
Type Constraints
T : DependencyObject
void FlatItemsControlPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 32 of file FlatItemsControlPage.xaml.cs.

        {
            _colEntities = new ObservableCollection<Entity>();

            for (int itemIndex = 0; itemIndex < 250; itemIndex++)
            {
                BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);

                _colEntities.Add(new Entity()
                {
                    BitmapImage = bitmapImage,
                    Id = itemIndex
                });
            }

            UpdateItemsControlIsTabStop();
            UpdateItemsControlItemTemplate();
            UpdateItemsControlTabNavigation();
            UpdateItemsControlXYFocusKeyboardNavigation();
            UpdateItemsPanelType();

            itemsControl.ItemsSource = _colEntities;
        }

BitmapImage GetBitmapImage ( int index ) [inline, private]

Definition at line 270 of file FlatItemsControlPage.xaml.cs.

        {
            Uri uri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", index));
            BitmapImage bitmapImage = new BitmapImage();
            bitmapImage.DecodePixelWidth = 120;
            bitmapImage.DecodePixelHeight = 120;
            bitmapImage.UriSource = uri;
            return bitmapImage;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 817 of file FlatItemsControlPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void NbItemsWrapGridMaximumRowsOrColumns_ValueChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 628 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && nbItemsWrapGridMaximumRowsOrColumns != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.MaximumRowsOrColumns = (int)nbItemsWrapGridMaximumRowsOrColumns.Value;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateDataSourceItemCount ( ) [inline, private]

Definition at line 255 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && txtDataSourceItemCount != null)
            {
                if (itemsControl.ItemsSource == null)
                {
                    txtDataSourceItemCount.Text = "0";
                }
                else if (itemsControl.ItemsSource == _colEntities)
                {
                    txtDataSourceItemCount.Text = _colEntities.Count.ToString();
                }
            }
        }

void UpdateItemsControlIsTabStop ( ) [inline, private]

Definition at line 105 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && chkItemsControlIsTabStop != null)
            {
                chkItemsControlIsTabStop.IsChecked = itemsControl.IsTabStop;
            }
        }

void UpdateItemsControlItemTemplate ( ) [inline, private]

Definition at line 113 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsControlItemTemplate != null)
                {
                    if (cmbItemsControlItemTemplate.SelectedIndex == 0)
                    {
                        itemsControl.ItemTemplate = null;
                    }
                    else
                    {
                        int templateIndex = cmbItemsControlItemTemplate.SelectedIndex - 1;

                        if (_itemTemplates[templateIndex] == null)
                        {
                            _itemTemplates[templateIndex] = Resources["itemTemplate" + cmbItemsControlItemTemplate.SelectedIndex.ToString()] as DataTemplate;
                        }

                        itemsControl.ItemTemplate = _itemTemplates[templateIndex];
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsControlTabNavigation ( ) [inline, private]

Definition at line 143 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlTabNavigation != null)
            {
                cmbItemsControlTabNavigation.SelectedIndex = (int)itemsControl.TabNavigation;
            }
        }

void UpdateItemsControlXYFocusKeyboardNavigation ( ) [inline, private]

Definition at line 151 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlXYFocusKeyboardNavigation != null)
            {
                cmbItemsControlXYFocusKeyboardNavigation.SelectedIndex = (int)itemsControl.XYFocusKeyboardNavigation;
            }
        }

void UpdateItemsPanelMargin ( ) [inline, private]

Definition at line 220 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = itemsControl.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        txtItemsPanelMargin.Text = itemsPanel.Margin.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelOrientation ( ) [inline, private]

Definition at line 159 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsPanelOrientation != null)
            {
                ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                if (itemsWrapGrid != null)
                {
                    cmbItemsPanelOrientation.SelectedIndex = (int)itemsWrapGrid.Orientation;
                }
                else
                {
                    ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                    if (itemsStackPanel != null)
                    {
                        cmbItemsPanelOrientation.SelectedIndex = (int)itemsStackPanel.Orientation;
                    }
                    else
                    {
                        VirtualizingStackPanel virtualizingStackPanel = itemsControl.ItemsPanelRoot as VirtualizingStackPanel;

                        if (virtualizingStackPanel != null)
                        {
                            cmbItemsPanelOrientation.SelectedIndex = (int)virtualizingStackPanel.Orientation;
                        }
                        else
                        {
                            StackPanel stackPanel = itemsControl.ItemsPanelRoot as StackPanel;

                            if (stackPanel != null)
                            {
                                cmbItemsPanelOrientation.SelectedIndex = (int)stackPanel.Orientation;
                            }
                        }
                    }
                }
            }
        }

void UpdateItemsPanelProperties ( ) [inline, private]

Definition at line 94 of file FlatItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
            UpdateItemsPanelMargin();

            if (itemsControl.ItemsPanelRoot is ItemsWrapGrid)
            {
                UpdateItemsWrapGridMaximumRowsOrColumns();
            }
        }

void UpdateItemsPanelType ( ) [inline, private]

Definition at line 56 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsControlItemsPanelType != null)
                {
                    switch (cmbItemsControlItemsPanelType.SelectedIndex)
                    {
                        case 0:
                            if (_modernPanelTemplate == null)
                            {
                                _modernPanelTemplate = itemsControl.ItemsPanel;
                            }
                            else
                            {
                                itemsControl.ItemsPanel = _modernPanelTemplate;
                            }
                            break;
                        case 1: // Use the virtualizingStackPanelItemsPanelTemplate resource
                            itemsControl.ItemsPanel = Resources["virtualizingStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            break;
                        case 2: // Use the stackPanelItemsPanelTemplate resource
                            itemsControl.ItemsPanel = Resources["stackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            break;
                    }

                    // itemsControl.ItemsPanelRoot is only updated asynchronously.
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateModernPanelUIVisibility);
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateItemsPanelProperties);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridMaximumRowsOrColumns ( ) [inline, private]

Definition at line 199 of file FlatItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && nbItemsWrapGridMaximumRowsOrColumns != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null && itemsWrapGrid.MaximumRowsOrColumns != -1)
                    {
                        nbItemsWrapGridMaximumRowsOrColumns.Value = itemsWrapGrid.MaximumRowsOrColumns;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateModernPanelUIVisibility ( ) [inline, private]

Definition at line 241 of file FlatItemsControlPage.xaml.cs.

        {
            if (itemsControl.ItemsPanelRoot is ItemsWrapGrid)
            {
                tblItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Visible;
                nbItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Visible;
            }
            else
            {
                tblItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Collapsed;
                nbItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Collapsed;
            }
        }

Member Data Documentation

ObservableCollection<Entity> _colEntities = null [private]

Definition at line 21 of file FlatItemsControlPage.xaml.cs.

DataTemplate [] _itemTemplates = new DataTemplate[3] [private]

Definition at line 23 of file FlatItemsControlPage.xaml.cs.

ItemsPanelTemplate _modernPanelTemplate = null [private]

Definition at line 22 of file FlatItemsControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/FlatItemsControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlipViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • FlipViewPage
Public Member Functions

FlipViewPage Class Reference

List of all members.

Public Member Functions

FlipViewPage ()

Detailed Description

Definition at line 7 of file FlipViewPage.xaml.cs.

Constructor & Destructor Documentation

FlipViewPage ( ) [inline]

Definition at line 9 of file FlipViewPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/FlipViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GridViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GridViewPage
Public Member Functions

GridViewPage Class Reference

List of all members.

Public Member Functions

GridViewPage ()

Detailed Description

Definition at line 9 of file GridViewPage.xaml.cs.

Constructor & Destructor Documentation

GridViewPage ( ) [inline]

Definition at line 11 of file GridViewPage.xaml.cs.

        {
            this.InitializeComponent();

            navigateToGridView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewBasePage), true /*use GridView*/); };
            navigateToGroupedGridView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(GroupedListViewBasePage), true /*use GridView*/); };
            navigateToNestedGridViews.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NestedGridViewsPage)); };
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GridViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedItemsControlGroupItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedItemsControlGroupItem
Public Member Functions | Properties

GroupedItemsControlGroupItem Class Reference

List of all members.

Public Member Functions

GroupedItemsControlGroupItem ()
GroupedItemsControlGroupItem (string name)

Properties

ObservableCollection
< GroupedItemsControlItem > 		Items [get, set]
string Name [get, set]

Detailed Description

Definition at line 990 of file GroupedItemsControlPage.xaml.cs.

Constructor & Destructor Documentation

GroupedItemsControlGroupItem ( ) [inline]

Definition at line 992 of file GroupedItemsControlPage.xaml.cs.

: this(">EmptyName<") { }

GroupedItemsControlGroupItem ( string name ) [inline]

Definition at line 994 of file GroupedItemsControlPage.xaml.cs.

        {
            Name = name;
            Items = new ObservableCollection<GroupedItemsControlItem>();
        }

Property Documentation

ObservableCollection<GroupedItemsControlItem> Items [get, set]

Definition at line 1007 of file GroupedItemsControlPage.xaml.cs.

string Name [get, set]

Definition at line 1001 of file GroupedItemsControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedItemsControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedItemsControlItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedItemsControlItem
Public Member Functions | Properties

GroupedItemsControlItem Class Reference

List of all members.

Public Member Functions

GroupedItemsControlItem ()
GroupedItemsControlItem (string id)

Properties

string Id [get, set]

Detailed Description

Definition at line 974 of file GroupedItemsControlPage.xaml.cs.

Constructor & Destructor Documentation

GroupedItemsControlItem ( ) [inline]

Definition at line 976 of file GroupedItemsControlPage.xaml.cs.

: this(">EmptyId<") { }

GroupedItemsControlItem ( string id ) [inline]

Definition at line 978 of file GroupedItemsControlPage.xaml.cs.

        {
            Id = id;
        }

Property Documentation

string Id [get, set]

Definition at line 984 of file GroupedItemsControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedItemsControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedItemsControlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedItemsControlPage
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

GroupedItemsControlPage Class Reference

List of all members.

Public Member Functions

GroupedItemsControlPage ()

Protected Member Functions

override void | OnNavigatedTo (NavigationEventArgs e)

Private Member Functions

void | AppendEventMessage (string eventMessage)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsControlTabNavigation_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsControlXYFocusKeyboardNavigation_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelGroupHeaderPlacement_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelGroupPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsWrapGridCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsWrapGridItemHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsWrapGridItemWidth_Click (object sender, RoutedEventArgs e)
void | BtnResetItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsControlTabNavigation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsControlXYFocusKeyboardNavigation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelGroupHeaderPlacement_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelGroupPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsWrapGridCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsWrapGridItemHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsWrapGridItemWidth_Click (object sender, RoutedEventArgs e)
void | ChkDataSource_Checked (object sender, RoutedEventArgs e)
void | ChkDataSource_Unchecked (object sender, RoutedEventArgs e)
void | ChkItemsControlIsTabStop_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkProperties_Checked (object sender, RoutedEventArgs e)
void | ChkProperties_Unchecked (object sender, RoutedEventArgs e)
void | CmbItemsControlHeaderTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsControlItemsPanelType_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsControlItemTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsPresenterFooter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsPresenterHeader_SelectionChanged (object sender, SelectionChangedEventArgs e)
Thickness | GetThicknessFromString (string thickness)
void | GroupedItemsControlPage_Loaded (object sender, RoutedEventArgs e)
void | NbItemsWrapGridMaximumRowsOrColumns_ValueChanged (object sender, object e)
void | UpdateItemsControlHeaderTemplate ()
void | UpdateItemsControlIsTabStop ()
void | UpdateItemsControlItemTemplate ()
void | UpdateItemsControlProperties ()
void | UpdateItemsControlTabNavigation ()
void | UpdateItemsControlXYFocusKeyboardNavigation ()
void | UpdateItemsPanelAreStickyGroupHeadersEnabled ()
void | UpdateItemsPanelGroupHeaderPlacement ()
void | UpdateItemsPanelGroupPadding ()
void | UpdateItemsPanelMargin ()
void | UpdateItemsPanelOrientation ()
void | UpdateItemsPanelProperties ()
void | UpdateItemsPanelType ()
void | UpdateItemsWrapGridCacheLength ()
void | UpdateItemsWrapGridItemHeight ()
void | UpdateItemsWrapGridItemWidth ()
void | UpdateItemsWrapGridUIVisibility (Visibility visibility)

Static Private Member Functions

static T | FindElementOfTypeInSubtree< T > (DependencyObject element)

Private Attributes

CollectionViewSource | _cvs = new CollectionViewSource()
GroupedItemsControlViewModel | _groupedItemsControlViewModel = new GroupedItemsControlViewModel()
DataTemplate[] | _headerTemplates = new DataTemplate[3]
DataTemplate[] | _itemTemplates = new DataTemplate[3]

Detailed Description

Definition at line 21 of file GroupedItemsControlPage.xaml.cs.

Constructor & Destructor Documentation

GroupedItemsControlPage ( ) [inline]

Definition at line 28 of file GroupedItemsControlPage.xaml.cs.

        {
            this.InitializeComponent();

            _cvs.Source = _groupedItemsControlViewModel.Items;
            _cvs.IsSourceGrouped = true;
            _cvs.ItemsPath = new PropertyPath("Items");

            Loaded += GroupedItemsControlPage_Loaded;
        }

Member Function Documentation

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 928 of file GroupedItemsControlPage.xaml.cs.

        {
            lstLogs.Items.Add(eventMessage);
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 933 of file GroupedItemsControlPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 938 of file GroupedItemsControlPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnGetItemsControlTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 431 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsControlTabNavigation();
        }

void BtnGetItemsControlXYFocusKeyboardNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 444 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsControlXYFocusKeyboardNavigation();
        }

void BtnGetItemsPanelGroupHeaderPlacement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 681 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelGroupHeaderPlacement();
        }

void BtnGetItemsPanelGroupPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 742 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelGroupPadding();
        }

void BtnGetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 716 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelMargin();
        }

void BtnGetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 620 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
        }

void BtnGetItemsWrapGridCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 777 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsWrapGridCacheLength();
        }

void BtnGetItemsWrapGridItemHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 829 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsWrapGridItemHeight();
        }

void BtnGetItemsWrapGridItemWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 803 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsWrapGridItemWidth();
        }

void BtnResetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 855 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && itemsControl.ItemsSource != null)
            {
                itemsControl.ItemsSource = null;
            }
        }

void BtnSetItemsControlTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 436 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlTabNavigation != null)
            {
                itemsControl.TabNavigation = (KeyboardNavigationMode)cmbItemsControlTabNavigation.SelectedIndex;
            }
        }

void BtnSetItemsControlXYFocusKeyboardNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 449 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlXYFocusKeyboardNavigation != null)
            {
                itemsControl.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbItemsControlXYFocusKeyboardNavigation.SelectedIndex;
            }
        }

void BtnSetItemsPanelGroupHeaderPlacement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 686 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPanelGroupHeaderPlacement != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.GroupHeaderPlacement = (GroupHeaderPlacement)cmbItemsPanelGroupHeaderPlacement.SelectedIndex;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            itemsStackPanel.GroupHeaderPlacement = (GroupHeaderPlacement)cmbItemsPanelGroupHeaderPlacement.SelectedIndex;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelGroupPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 747 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsPanelGroupPadding != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.GroupPadding = GetThicknessFromString(txtItemsPanelGroupPadding.Text);
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            itemsStackPanel.GroupPadding = GetThicknessFromString(txtItemsPanelGroupPadding.Text);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 721 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = itemsControl.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        itemsPanel.Margin = GetThicknessFromString(txtItemsPanelMargin.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 625 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPanelOrientation != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        if (itemsWrapGrid != null && itemsWrapGrid.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
                        {
                            itemsControl.ItemsSource = null;

                            itemsWrapGrid.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                        }
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            if (itemsStackPanel != null && itemsStackPanel.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
                            {
                                itemsControl.ItemsSource = null;

                                itemsStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                            }
                        }
                        else
                        {
                            VirtualizingStackPanel virtualizingStackPanel = itemsControl.ItemsPanelRoot as VirtualizingStackPanel;

                            if (virtualizingStackPanel != null && virtualizingStackPanel.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
                            {
                                itemsControl.ItemsSource = null;

                                virtualizingStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                            }
                        }
                    }

                    if (itemsControl.ItemsSource != _cvs.View)
                    {
                        itemsControl.ItemsSource = _cvs.View;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 863 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && itemsControl.ItemsSource != _cvs.View)
            {
                itemsControl.ItemsSource = _cvs.View;
            }
        }

void BtnSetItemsWrapGridCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 782 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsWrapGridCacheLength != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.CacheLength = double.Parse(txtItemsWrapGridCacheLength.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsWrapGridItemHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 834 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsWrapGridItemHeight != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.ItemHeight = double.Parse(txtItemsWrapGridItemHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsWrapGridItemWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 808 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsWrapGridItemWidth != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.ItemWidth = double.Parse(txtItemsWrapGridItemWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkDataSource_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 904 of file GroupedItemsControlPage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Visible;
        }

void ChkDataSource_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 910 of file GroupedItemsControlPage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Collapsed;
        }

void ChkItemsControlIsTabStop_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 472 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && chkItemsControlIsTabStop != null)
            {
                itemsControl.IsTabStop = (bool)chkItemsControlIsTabStop.IsChecked;
            }
        }

void ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 590 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.AreStickyGroupHeadersEnabled = (bool)chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            itemsStackPanel.AreStickyGroupHeadersEnabled = (bool)chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 916 of file GroupedItemsControlPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 922 of file GroupedItemsControlPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 892 of file GroupedItemsControlPage.xaml.cs.

        {
            if (svProperties != null)
                svProperties.Visibility = Visibility.Visible;
        }

void ChkProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 898 of file GroupedItemsControlPage.xaml.cs.

        {
            if (svProperties != null)
                svProperties.Visibility = Visibility.Collapsed;
        }

void CmbItemsControlHeaderTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 457 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsControlHeaderTemplate();
        }

void CmbItemsControlItemsPanelType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 467 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelType();
        }

void CmbItemsControlItemTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 462 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsControlItemTemplate();
        }

void CmbItemsPresenterFooter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 535 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPresenterFooter != null)
                {
                    ItemsPresenter itemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(itemsControl);

                    if (itemsPresenter != null)
                    {
                        switch (cmbItemsPresenterFooter.SelectedIndex)
                        {
                            case 0: /*None*/
                                itemsPresenter.Footer = null;
                                break;
                            case 1: /*No TabStop*/
                                itemsPresenter.Footer = new TextBlock()
                                {
                                    FontSize = 22.0,
                                    FontWeight = FontWeights.Bold,
                                    Margin = new Thickness(10.0),
                                    Text = "ItemsPresenter Footer"
                                };
                                break;
                            case 2: /*Single TabStop*/
                                itemsPresenter.Footer = new Button()
                                {
                                    Content = "ItemsPresenter Footer",
                                    FontSize = 22.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                            case 3: /*Nested TabStops*/
                                itemsPresenter.Footer = new Button()
                                {
                                    Content = new Button()
                                    {
                                        Content = "ItemsPresenter Footer",
                                        Margin = new Thickness(10.0)
                                    },
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbItemsPresenterHeader_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 480 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPresenterHeader != null)
                {
                    ItemsPresenter itemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(itemsControl);

                    if (itemsPresenter != null)
                    {
                        switch (cmbItemsPresenterHeader.SelectedIndex)
                        {
                            case 0: /*None*/
                                itemsPresenter.Header = null;
                                break;
                            case 1: /*No TabStop*/
                                itemsPresenter.Header = new TextBlock()
                                {
                                    FontSize = 22.0,
                                    FontWeight = FontWeights.Bold,
                                    Margin = new Thickness(10.0),
                                    Text = "ItemsPresenter Header"
                                };
                                break;
                            case 2: /*Single TabStop*/
                                itemsPresenter.Header = new Button()
                                {
                                    Content = "ItemsPresenter Header",
                                    FontSize = 22.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                            case 3: /*Nested TabStops*/
                                itemsPresenter.Header = new Button()
                                {
                                    Content = new Button()
                                    {
                                        Content = "ItemsPresenter Header",
                                        Margin = new Thickness(10.0)
                                    },
                                    FontSize = 18.0,
                                    Margin = new Thickness(10.0)
                                };
                                break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

static T FindElementOfTypeInSubtree< T > ( DependencyObject element ) [inline, static, private]
Type Constraints
T : DependencyObject
Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 943 of file GroupedItemsControlPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void GroupedItemsControlPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 51 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelType();
            UpdateItemsControlProperties();
        }

void NbItemsWrapGridMaximumRowsOrColumns_ValueChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 871 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && nbItemsWrapGridMaximumRowsOrColumns != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.MaximumRowsOrColumns = (int)nbItemsWrapGridMaximumRowsOrColumns.Value;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

override void OnNavigatedTo ( NavigationEventArgs e ) [inline, protected]

Definition at line 39 of file GroupedItemsControlPage.xaml.cs.

        {
            itemsControl.ItemsSource = _cvs.View;

            if (cmbItemsControlItemsPanelType != null)
            {
                cmbItemsControlItemsPanelType.SelectedIndex = 0;
            }

            base.OnNavigatedTo(e);
        }

void UpdateItemsControlHeaderTemplate ( ) [inline, private]

Definition at line 150 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsControlHeaderTemplate != null)
                {
                    if (cmbItemsControlHeaderTemplate.SelectedIndex == 0)
                    {
                        if (itemsControl.GroupStyle.Count > 0)
                        {
                            itemsControl.GroupStyle[0].HeaderTemplate = null;
                        }
                    }
                    else
                    {
                        int templateIndex = cmbItemsControlHeaderTemplate.SelectedIndex - 1;

                        if (_headerTemplates[templateIndex] == null)
                        {
                            _headerTemplates[templateIndex] = Resources["headerTemplate" + cmbItemsControlHeaderTemplate.SelectedIndex.ToString()] as DataTemplate;
                        }

                        if (itemsControl.GroupStyle.Count == 0)
                        {
                            itemsControl.GroupStyle.Add(new GroupStyle());
                        }

                        itemsControl.GroupStyle[0].HeaderTemplate = _headerTemplates[templateIndex];
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsControlIsTabStop ( ) [inline, private]

Definition at line 126 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && chkItemsControlIsTabStop != null)
            {
                chkItemsControlIsTabStop.IsChecked = itemsControl.IsTabStop;
            }
        }

void UpdateItemsControlItemTemplate ( ) [inline, private]

Definition at line 188 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsControlItemTemplate != null)
                {
                    if (cmbItemsControlItemTemplate.SelectedIndex == 0)
                    {
                        itemsControl.ItemTemplate = null;
                    }
                    else
                    {
                        int templateIndex = cmbItemsControlItemTemplate.SelectedIndex - 1;

                        if (_itemTemplates[templateIndex] == null)
                        {
                            _itemTemplates[templateIndex] = Resources["itemTemplate" + cmbItemsControlItemTemplate.SelectedIndex.ToString()] as DataTemplate;
                        }

                        itemsControl.ItemTemplate = _itemTemplates[templateIndex];
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsControlProperties ( ) [inline, private]

Definition at line 117 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsControlIsTabStop();
            UpdateItemsControlHeaderTemplate();
            UpdateItemsControlItemTemplate();
            UpdateItemsControlTabNavigation();
            UpdateItemsControlXYFocusKeyboardNavigation();
        }

void UpdateItemsControlTabNavigation ( ) [inline, private]

Definition at line 134 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlTabNavigation != null)
            {
                cmbItemsControlTabNavigation.SelectedIndex = (int)itemsControl.TabNavigation;
            }
        }

void UpdateItemsControlXYFocusKeyboardNavigation ( ) [inline, private]

Definition at line 142 of file GroupedItemsControlPage.xaml.cs.

        {
            if (itemsControl != null && cmbItemsControlXYFocusKeyboardNavigation != null)
            {
                cmbItemsControlXYFocusKeyboardNavigation.SelectedIndex = (int)itemsControl.XYFocusKeyboardNavigation;
            }
        }

void UpdateItemsPanelAreStickyGroupHeadersEnabled ( ) [inline, private]

Definition at line 338 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && chkItemsPanelAreStickyGroupHeadersEnabled != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked = itemsWrapGrid.AreStickyGroupHeadersEnabled;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked = itemsStackPanel.AreStickyGroupHeadersEnabled;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelGroupHeaderPlacement ( ) [inline, private]

Definition at line 257 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPanelGroupHeaderPlacement != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        cmbItemsPanelGroupHeaderPlacement.SelectedIndex = (int)itemsWrapGrid.GroupHeaderPlacement;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            cmbItemsPanelGroupHeaderPlacement.SelectedIndex = (int)itemsStackPanel.GroupHeaderPlacement;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelGroupPadding ( ) [inline, private]

Definition at line 308 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsPanelGroupPadding != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsPanelGroupPadding.Text = itemsWrapGrid.GroupPadding.ToString();
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            txtItemsPanelGroupPadding.Text = itemsStackPanel.GroupPadding.ToString();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelMargin ( ) [inline, private]

Definition at line 287 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = itemsControl.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        txtItemsPanelMargin.Text = itemsPanel.Margin.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelOrientation ( ) [inline, private]

Definition at line 218 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsPanelOrientation != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        cmbItemsPanelOrientation.SelectedIndex = (int)itemsWrapGrid.Orientation;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            cmbItemsPanelOrientation.SelectedIndex = (int)itemsStackPanel.Orientation;
                        }
                        else
                        {
                            VirtualizingStackPanel virtualizingStackPanel = itemsControl.ItemsPanelRoot as VirtualizingStackPanel;

                            if (virtualizingStackPanel != null)
                            {
                                cmbItemsPanelOrientation.SelectedIndex = (int)virtualizingStackPanel.Orientation;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelProperties ( ) [inline, private]

Definition at line 105 of file GroupedItemsControlPage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
            UpdateItemsPanelGroupHeaderPlacement();
            UpdateItemsPanelMargin();
            UpdateItemsPanelGroupPadding();
            UpdateItemsPanelAreStickyGroupHeadersEnabled();
            UpdateItemsWrapGridCacheLength();
            UpdateItemsWrapGridItemWidth();
            UpdateItemsWrapGridItemHeight();
        }

void UpdateItemsPanelType ( ) [inline, private]

Definition at line 72 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && cmbItemsControlItemsPanelType != null)
                {
                    switch (cmbItemsControlItemsPanelType.SelectedIndex)
                    {
                        case 0: // Use the wrapGridItemsPanelTemplate resource
                            itemsControl.ItemsPanel = Resources["itemsWrapGridItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateItemsWrapGridUIVisibility(Visibility.Visible);
                            break;
                        case 1: // Use the stackPanelItemsPanelTemplate resource
                            itemsControl.ItemsPanel = Resources["itemsStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateItemsWrapGridUIVisibility(Visibility.Collapsed);
                            break;
                        case 2: // Use the virtualizingStackPanelItemsPanelTemplate resource
                            itemsControl.ItemsPanel = Resources["virtualizingStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateItemsWrapGridUIVisibility(Visibility.Collapsed);
                            break;
                    }

                    // itemsControl.ItemsPanelRoot is only updated asynchronously.
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateItemsPanelProperties);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridCacheLength ( ) [inline, private]

Definition at line 368 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsWrapGridCacheLength != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsWrapGridCacheLength.Text = itemsWrapGrid.CacheLength.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridItemHeight ( ) [inline, private]

Definition at line 410 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsWrapGridItemHeight != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsWrapGridItemHeight.Text = itemsWrapGrid.ItemHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridItemWidth ( ) [inline, private]

Definition at line 389 of file GroupedItemsControlPage.xaml.cs.

        {
            try
            {
                if (itemsControl != null && txtItemsWrapGridItemWidth != null)
                {
                    ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsWrapGridItemWidth.Text = itemsWrapGrid.ItemWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridUIVisibility ( Visibility visibility ) [inline, private]

Definition at line 57 of file GroupedItemsControlPage.xaml.cs.

        {
            tblItemsWrapGridProperties.Visibility = visibility;
            tblItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
            nbItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
            tblItemsWrapGridItemWidth.Visibility = visibility;
            txtItemsWrapGridItemWidth.Visibility = visibility;
            btnGetItemsWrapGridItemWidth.Visibility = visibility;
            btnSetItemsWrapGridItemWidth.Visibility = visibility;
            tblItemsWrapGridItemHeight.Visibility = visibility;
            txtItemsWrapGridItemHeight.Visibility = visibility;
            btnGetItemsWrapGridItemHeight.Visibility = visibility;
            btnSetItemsWrapGridItemHeight.Visibility = visibility;
        }

Member Data Documentation

CollectionViewSource _cvs = new CollectionViewSource() [private]

Definition at line 24 of file GroupedItemsControlPage.xaml.cs.

GroupedItemsControlViewModel _groupedItemsControlViewModel = new GroupedItemsControlViewModel() [private]

Definition at line 23 of file GroupedItemsControlPage.xaml.cs.

DataTemplate [] _headerTemplates = new DataTemplate[3] [private]

Definition at line 25 of file GroupedItemsControlPage.xaml.cs.

DataTemplate [] _itemTemplates = new DataTemplate[3] [private]

Definition at line 26 of file GroupedItemsControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedItemsControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedItemsControlViewModel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedItemsControlViewModel
Public Member Functions | Properties

GroupedItemsControlViewModel Class Reference

List of all members.

Public Member Functions

GroupedItemsControlViewModel ()

Properties

ObservableCollection
< GroupedItemsControlGroupItem > 		Items [get, set]

Detailed Description

Definition at line 1013 of file GroupedItemsControlPage.xaml.cs.

Constructor & Destructor Documentation

GroupedItemsControlViewModel ( ) [inline]

Definition at line 1015 of file GroupedItemsControlPage.xaml.cs.

        {
            Items = new ObservableCollection<GroupedItemsControlGroupItem>();

            GroupedItemsControlGroupItem groupA = new GroupedItemsControlGroupItem("Group A");
            groupA.Items.Add(new GroupedItemsControlItem("idA1"));
            groupA.Items.Add(new GroupedItemsControlItem("idA2"));
            groupA.Items.Add(new GroupedItemsControlItem("idA3"));
            groupA.Items.Add(new GroupedItemsControlItem("idA4"));
            groupA.Items.Add(new GroupedItemsControlItem("idA5"));
            groupA.Items.Add(new GroupedItemsControlItem("idA6"));
            Items.Add(groupA);

            GroupedItemsControlGroupItem groupB = new GroupedItemsControlGroupItem("Group B");
            groupB.Items.Add(new GroupedItemsControlItem("idB1"));
            groupB.Items.Add(new GroupedItemsControlItem("idB2"));
            groupB.Items.Add(new GroupedItemsControlItem("idB3"));
            groupB.Items.Add(new GroupedItemsControlItem("idB4"));
            groupB.Items.Add(new GroupedItemsControlItem("idB5"));
            groupB.Items.Add(new GroupedItemsControlItem("idB6"));
            groupB.Items.Add(new GroupedItemsControlItem("idB7"));
            groupB.Items.Add(new GroupedItemsControlItem("idB8"));
            Items.Add(groupB);

            GroupedItemsControlGroupItem groupC = new GroupedItemsControlGroupItem("Group C");
            groupC.Items.Add(new GroupedItemsControlItem("idC1"));
            groupC.Items.Add(new GroupedItemsControlItem("idC2"));
            groupC.Items.Add(new GroupedItemsControlItem("idC3"));
            groupC.Items.Add(new GroupedItemsControlItem("idC4"));
            groupC.Items.Add(new GroupedItemsControlItem("idC5"));
            groupC.Items.Add(new GroupedItemsControlItem("idC6"));
            groupC.Items.Add(new GroupedItemsControlItem("idC7"));
            groupC.Items.Add(new GroupedItemsControlItem("idC8"));
            groupC.Items.Add(new GroupedItemsControlItem("idC9"));
            Items.Add(groupC);

            GroupedItemsControlGroupItem groupD = new GroupedItemsControlGroupItem("Group D");
            groupD.Items.Add(new GroupedItemsControlItem("idD1"));
            groupD.Items.Add(new GroupedItemsControlItem("idD2"));
            groupD.Items.Add(new GroupedItemsControlItem("idD3"));
            groupD.Items.Add(new GroupedItemsControlItem("idD4"));
            groupD.Items.Add(new GroupedItemsControlItem("idD5"));
            groupD.Items.Add(new GroupedItemsControlItem("idD6"));
            Items.Add(groupD);

            GroupedItemsControlGroupItem groupE = new GroupedItemsControlGroupItem("Group E");
            groupE.Items.Add(new GroupedItemsControlItem("idE1"));
            groupE.Items.Add(new GroupedItemsControlItem("idE2"));
            groupE.Items.Add(new GroupedItemsControlItem("idE3"));
            groupE.Items.Add(new GroupedItemsControlItem("idE4"));
            groupE.Items.Add(new GroupedItemsControlItem("idE5"));
            groupE.Items.Add(new GroupedItemsControlItem("idE6"));
            groupE.Items.Add(new GroupedItemsControlItem("idE7"));
            groupE.Items.Add(new GroupedItemsControlItem("idE8"));
            groupE.Items.Add(new GroupedItemsControlItem("idE9"));
            groupE.Items.Add(new GroupedItemsControlItem("idEA"));
            groupE.Items.Add(new GroupedItemsControlItem("idEB"));
            groupE.Items.Add(new GroupedItemsControlItem("idEC"));
            groupE.Items.Add(new GroupedItemsControlItem("idED"));
            groupE.Items.Add(new GroupedItemsControlItem("idEE"));
            groupE.Items.Add(new GroupedItemsControlItem("idEF"));
            Items.Add(groupE);

            GroupedItemsControlGroupItem groupF = new GroupedItemsControlGroupItem("Group F");
            groupF.Items.Add(new GroupedItemsControlItem("idF1"));
            groupF.Items.Add(new GroupedItemsControlItem("idF2"));
            groupF.Items.Add(new GroupedItemsControlItem("idF3"));
            Items.Add(groupF);

            GroupedItemsControlGroupItem groupG = new GroupedItemsControlGroupItem("Group G");
            groupG.Items.Add(new GroupedItemsControlItem("idG1"));
            groupG.Items.Add(new GroupedItemsControlItem("idG2"));
            groupG.Items.Add(new GroupedItemsControlItem("idG3"));
            groupG.Items.Add(new GroupedItemsControlItem("idG4"));
            groupG.Items.Add(new GroupedItemsControlItem("idG5"));
            groupG.Items.Add(new GroupedItemsControlItem("idG6"));
            groupG.Items.Add(new GroupedItemsControlItem("idG7"));
            groupG.Items.Add(new GroupedItemsControlItem("idG8"));
            groupG.Items.Add(new GroupedItemsControlItem("idG9"));
            groupG.Items.Add(new GroupedItemsControlItem("idGA"));
            groupG.Items.Add(new GroupedItemsControlItem("idGB"));
            groupG.Items.Add(new GroupedItemsControlItem("idGC"));
            groupG.Items.Add(new GroupedItemsControlItem("idGD"));
            groupG.Items.Add(new GroupedItemsControlItem("idGE"));
            groupG.Items.Add(new GroupedItemsControlItem("idGF"));
            groupG.Items.Add(new GroupedItemsControlItem("idGG"));
            groupG.Items.Add(new GroupedItemsControlItem("idGH"));
            groupG.Items.Add(new GroupedItemsControlItem("idGI"));
            groupG.Items.Add(new GroupedItemsControlItem("idGJ"));
            groupG.Items.Add(new GroupedItemsControlItem("idGK"));
            groupG.Items.Add(new GroupedItemsControlItem("idGL"));
            groupG.Items.Add(new GroupedItemsControlItem("idGM"));
            groupG.Items.Add(new GroupedItemsControlItem("idGN"));
            groupG.Items.Add(new GroupedItemsControlItem("idGO"));
            Items.Add(groupG);

            GroupedItemsControlGroupItem groupH = new GroupedItemsControlGroupItem("Group H");
            groupH.Items.Add(new GroupedItemsControlItem("idH1"));
            groupH.Items.Add(new GroupedItemsControlItem("idH2"));
            groupH.Items.Add(new GroupedItemsControlItem("idH3"));
            groupH.Items.Add(new GroupedItemsControlItem("idH4"));
            groupH.Items.Add(new GroupedItemsControlItem("idH5"));
            groupH.Items.Add(new GroupedItemsControlItem("idH6"));
            groupH.Items.Add(new GroupedItemsControlItem("idH7"));
            groupH.Items.Add(new GroupedItemsControlItem("idH8"));
            groupH.Items.Add(new GroupedItemsControlItem("idH9"));
            groupH.Items.Add(new GroupedItemsControlItem("idhA"));
            groupH.Items.Add(new GroupedItemsControlItem("idHB"));
            groupH.Items.Add(new GroupedItemsControlItem("idHC"));
            groupH.Items.Add(new GroupedItemsControlItem("idHD"));
            groupH.Items.Add(new GroupedItemsControlItem("idHE"));
            groupH.Items.Add(new GroupedItemsControlItem("idHF"));
            groupH.Items.Add(new GroupedItemsControlItem("idHG"));
            groupH.Items.Add(new GroupedItemsControlItem("idHH"));
            groupH.Items.Add(new GroupedItemsControlItem("idHI"));
            groupH.Items.Add(new GroupedItemsControlItem("idHJ"));
            groupH.Items.Add(new GroupedItemsControlItem("idHK"));
            groupH.Items.Add(new GroupedItemsControlItem("idHL"));
            groupH.Items.Add(new GroupedItemsControlItem("idHM"));
            groupH.Items.Add(new GroupedItemsControlItem("idHN"));
            groupH.Items.Add(new GroupedItemsControlItem("idHO"));
            groupH.Items.Add(new GroupedItemsControlItem("idhP"));
            groupH.Items.Add(new GroupedItemsControlItem("idHQ"));
            groupH.Items.Add(new GroupedItemsControlItem("idHR"));
            groupH.Items.Add(new GroupedItemsControlItem("idHS"));
            groupH.Items.Add(new GroupedItemsControlItem("idHT"));
            groupH.Items.Add(new GroupedItemsControlItem("idHU"));
            groupH.Items.Add(new GroupedItemsControlItem("idHV"));
            groupH.Items.Add(new GroupedItemsControlItem("idHW"));
            groupH.Items.Add(new GroupedItemsControlItem("idHX"));
            groupH.Items.Add(new GroupedItemsControlItem("idHY"));
            groupH.Items.Add(new GroupedItemsControlItem("idHZ"));
            Items.Add(groupH);

            GroupedItemsControlGroupItem groupI = new GroupedItemsControlGroupItem("Group I");
            groupI.Items.Add(new GroupedItemsControlItem("idI1"));
            groupI.Items.Add(new GroupedItemsControlItem("idI2"));
            groupI.Items.Add(new GroupedItemsControlItem("idI3"));
            Items.Add(groupI);
        }

Property Documentation

ObservableCollection<GroupedItemsControlGroupItem> Items [get, set]

Definition at line 1157 of file GroupedItemsControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedItemsControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedListViewBaseGroupItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedListViewBaseGroupItem
Public Member Functions | Properties

GroupedListViewBaseGroupItem Class Reference

List of all members.

Public Member Functions

GroupedListViewBaseGroupItem ()
GroupedListViewBaseGroupItem (string name)

Properties

ObservableCollection
< GroupedListViewBaseItem > 		Items [get, set]
string Name [get, set]

Detailed Description

Definition at line 1492 of file GroupedListViewBasePage.xaml.cs.

Constructor & Destructor Documentation

GroupedListViewBaseGroupItem ( ) [inline]

Definition at line 1494 of file GroupedListViewBasePage.xaml.cs.

: this(">EmptyName<") { }

GroupedListViewBaseGroupItem ( string name ) [inline]

Definition at line 1496 of file GroupedListViewBasePage.xaml.cs.

        {
            Name = name;
            Items = new ObservableCollection<GroupedListViewBaseItem>();
        }

Property Documentation

ObservableCollection<GroupedListViewBaseItem> Items [get, set]

Definition at line 1509 of file GroupedListViewBasePage.xaml.cs.

string Name [get, set]

Definition at line 1503 of file GroupedListViewBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedListViewBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedListViewBaseItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedListViewBaseItem
Public Member Functions | Properties

GroupedListViewBaseItem Class Reference

List of all members.

Public Member Functions

GroupedListViewBaseItem ()
GroupedListViewBaseItem (string id)

Properties

string Id [get, set]

Detailed Description

Definition at line 1476 of file GroupedListViewBasePage.xaml.cs.

Constructor & Destructor Documentation

GroupedListViewBaseItem ( ) [inline]

Definition at line 1478 of file GroupedListViewBasePage.xaml.cs.

: this(">EmptyId<") { }

GroupedListViewBaseItem ( string id ) [inline]

Definition at line 1480 of file GroupedListViewBasePage.xaml.cs.

        {
            Id = id;
        }

Property Documentation

string Id [get, set]

Definition at line 1486 of file GroupedListViewBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedListViewBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedListViewBasePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedListViewBasePage
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

GroupedListViewBasePage Class Reference

List of all members.

Public Member Functions

GroupedListViewBasePage ()

Protected Member Functions

override void | OnNavigatedTo (NavigationEventArgs e)

Private Member Functions

void | AppendEventMessage (string eventMessage)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnCollectionViewMoveCurrentToPosition_Click (object sender, RoutedEventArgs e)
async void | BtnFocusManagerCollectionViewCurrentItemProgrammaticFocus_Click (object sender, RoutedEventArgs e)
void | BtnGetCollectionViewCurrentItem_Click (object sender, RoutedEventArgs e)
void | BtnGetCollectionViewCurrentPosition_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelGroupHeaderPlacement_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelGroupPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsWrapGridItemHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsWrapGridItemWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewBaseSelectionMode_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewBaseTabNavigation_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerExtentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerViewportHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerViewportWidth_Click (object sender, RoutedEventArgs e)
void | BtnResetItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnScrollIntoView_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelGroupHeaderPlacement_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelGroupPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsWrapGridItemHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsWrapGridItemWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewBaseSelectionMode_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewBaseTabNavigation_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewerHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewerVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | ChkDataSource_Checked (object sender, RoutedEventArgs e)
void | ChkDataSource_Unchecked (object sender, RoutedEventArgs e)
void | ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkListViewBaseIsItemClickEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkMethods_Checked (object sender, RoutedEventArgs e)
void | ChkMethods_Unchecked (object sender, RoutedEventArgs e)
void | ChkProperties_Checked (object sender, RoutedEventArgs e)
void | ChkProperties_Unchecked (object sender, RoutedEventArgs e)
void | CmbListViewBaseFooter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbListViewBaseHeader_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbListViewBaseItemsPanelType_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerHorizontalSnapPointsType_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerVerticalSnapPointsType_SelectionChanged (object sender, SelectionChangedEventArgs e)
object | GetDataSourceItemFromIndex (int itemIndex)
Thickness | GetThicknessFromString (string thickness)
void | GroupedListViewBasePage_Loaded (object sender, RoutedEventArgs e)
void | ListViewBase_ItemClick (object sender, ItemClickEventArgs e)
void | NbItemsWrapGridMaximumRowsOrColumns_ValueChanged (object sender, object e)
void | RestoreScrollViewerWidth ()
void | ScrollViewer_ViewChanged (object sender, object e)
void | UpdateItemsPanelAreStickyGroupHeadersEnabled ()
void | UpdateItemsPanelCacheLength ()
void | UpdateItemsPanelGroupHeaderPlacement ()
void | UpdateItemsPanelGroupPadding ()
void | UpdateItemsPanelMargin ()
void | UpdateItemsPanelOrientation ()
void | UpdateItemsPanelProperties ()
void | UpdateItemsPanelType ()
void | UpdateItemsWrapGridItemHeight ()
void | UpdateItemsWrapGridItemWidth ()
void | UpdateItemsWrapGridUIVisibility (Visibility visibility)
void | UpdateListViewBaseProperties ()
void | UpdateListViewBaseSelectionMode ()
void | UpdateListViewBaseSingleSelectionFollowsFocus ()
void | UpdateListViewBaseTabNavigation ()
void | UpdateScrollViewerExtentHeight ()
void | UpdateScrollViewerExtentWidth ()
void | UpdateScrollViewerHorizontalOffset ()
void | UpdateScrollViewerHorizontalScrollMode ()
void | UpdateScrollViewerHorizontalSnapPointsType ()
void | UpdateScrollViewerProperties ()
void | UpdateScrollViewerScrollOrientation ()
void | UpdateScrollViewerSizeProperties ()
void | UpdateScrollViewerVerticalOffset ()
void | UpdateScrollViewerVerticalScrollMode ()
void | UpdateScrollViewerVerticalSnapPointsType ()
void | UpdateScrollViewerViewportHeight ()
void | UpdateScrollViewerViewportWidth ()

Static Private Member Functions

static T | FindElementOfTypeInSubtree< T > (DependencyObject element)

Private Attributes

CollectionViewSource | _cvs = new CollectionViewSource()
GroupedListViewBaseViewModel | _groupedListViewBaseViewModel = new GroupedListViewBaseViewModel()
ListViewBase | _listViewBase = null
ScrollViewer | _scrollViewer = null

Detailed Description

Definition at line 20 of file GroupedListViewBasePage.xaml.cs.

Constructor & Destructor Documentation

GroupedListViewBasePage ( ) [inline]

Definition at line 27 of file GroupedListViewBasePage.xaml.cs.

        {
            this.InitializeComponent();

            _cvs.Source = _groupedListViewBaseViewModel.Items;
            _cvs.IsSourceGrouped = true;
            _cvs.ItemsPath = new PropertyPath("Items");

            Loaded += GroupedListViewBasePage_Loaded;
        }

Member Function Documentation

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 1381 of file GroupedListViewBasePage.xaml.cs.

        {
            lstLogs.Items.Add(eventMessage);
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1386 of file GroupedListViewBasePage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1391 of file GroupedListViewBasePage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnCollectionViewMoveCurrentToPosition_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1153 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (txtCollectionViewMovePosition != null && _cvs != null && _cvs.View != null)
                {
                    bool result = _cvs.View.MoveCurrentToPosition(int.Parse(txtCollectionViewMovePosition.Text));
                    AppendEventMessage("ICollectionView.MoveCurrentToPosition result: " + result);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

async void BtnFocusManagerCollectionViewCurrentItemProgrammaticFocus_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1170 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _cvs != null && _cvs.View != null && _cvs.View.CurrentItem != null)
                {
                    DependencyObject container = _listViewBase.ContainerFromItem(_cvs.View.CurrentItem);

                    if (container != null)
                    {
                        FocusMovementResult result = await FocusManager.TryFocusAsync(container, FocusState.Programmatic);
                        AppendEventMessage("FocusManager.TryFocusAsync FocusMovementResult.Succeeded: " + result.Succeeded);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetCollectionViewCurrentItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1136 of file GroupedListViewBasePage.xaml.cs.

        {
            if (txtCollectionViewCurrentItem != null && _cvs != null && _cvs.View != null)
            {
                string currentItemAsStr = _cvs.View.CurrentItem == null ? "null" : _cvs.View.CurrentItem.ToString();
                txtCollectionViewCurrentItem.Text = currentItemAsStr.Length > 60 ? currentItemAsStr.Substring(0, 59) : currentItemAsStr;
            }
        }

void BtnGetCollectionViewCurrentPosition_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1145 of file GroupedListViewBasePage.xaml.cs.

        {
            if (txtCollectionViewCurrentPosition != null && _cvs != null && _cvs.View != null)
            {
                txtCollectionViewCurrentPosition.Text = _cvs.View.CurrentPosition.ToString();
            }
        }

void BtnGetItemsPanelCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1014 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelCacheLength();
        }

void BtnGetItemsPanelGroupHeaderPlacement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 918 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelGroupHeaderPlacement();
        }

void BtnGetItemsPanelGroupPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 979 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelGroupPadding();
        }

void BtnGetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 953 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelMargin();
        }

void BtnGetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 853 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
        }

void BtnGetItemsWrapGridItemHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1075 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsWrapGridItemHeight();
        }

void BtnGetItemsWrapGridItemWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1049 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsWrapGridItemWidth();
        }

void BtnGetListViewBaseSelectionMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 691 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateListViewBaseSelectionMode();
        }

void BtnGetListViewBaseTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 704 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateListViewBaseTabNavigation();
        }

void BtnGetScrollViewerExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1233 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerExtentHeight();
        }

void BtnGetScrollViewerExtentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1228 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerExtentWidth();
        }

void BtnGetScrollViewerHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1238 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerHorizontalOffset();
        }

void BtnGetScrollViewerHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1192 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerHorizontalScrollMode();
        }

void BtnGetScrollViewerVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1243 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerVerticalOffset();
        }

void BtnGetScrollViewerVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1205 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerVerticalScrollMode();
        }

void BtnGetScrollViewerViewportHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1223 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerViewportHeight();
        }

void BtnGetScrollViewerViewportWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1218 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerViewportWidth();
        }

void BtnResetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1120 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && _listViewBase.ItemsSource != null)
            {
                _listViewBase.ItemsSource = null;
            }
        }

void BtnScrollIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1101 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _listViewBase.ItemsSource != null &&
                    _groupedListViewBaseViewModel != null &&
                    txtMethodsItemIndex != null && cmbScrollIntoViewAlignment != null)
                {
                    object item = GetDataSourceItemFromIndex(int.Parse(txtMethodsItemIndex.Text));
                    _listViewBase.ScrollIntoView(item, (ScrollIntoViewAlignment)cmbScrollIntoViewAlignment.SelectedIndex); ;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1019 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelCacheLength != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.CacheLength = double.Parse(txtItemsPanelCacheLength.Text);
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            itemsStackPanel.CacheLength = double.Parse(txtItemsPanelCacheLength.Text);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelGroupHeaderPlacement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 923 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbItemsPanelGroupHeaderPlacement != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.GroupHeaderPlacement = (GroupHeaderPlacement)cmbItemsPanelGroupHeaderPlacement.SelectedIndex;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            itemsStackPanel.GroupHeaderPlacement = (GroupHeaderPlacement)cmbItemsPanelGroupHeaderPlacement.SelectedIndex;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelGroupPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 984 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelGroupPadding != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.GroupPadding = GetThicknessFromString(txtItemsPanelGroupPadding.Text);
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            itemsStackPanel.GroupPadding = GetThicknessFromString(txtItemsPanelGroupPadding.Text);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 958 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = _listViewBase.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        itemsPanel.Margin = GetThicknessFromString(txtItemsPanelMargin.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 858 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbItemsPanelOrientation != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        if (itemsWrapGrid != null && itemsWrapGrid.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
                        {
                            _listViewBase.ItemsSource = null;

                            itemsWrapGrid.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                        }
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            if (itemsStackPanel != null && itemsStackPanel.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
                            {
                                _listViewBase.ItemsSource = null;

                                itemsStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                            }
                        }
                        else
                        {
                            VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;

                            if (virtualizingStackPanel != null && virtualizingStackPanel.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
                            {
                                _listViewBase.ItemsSource = null;

                                virtualizingStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                            }
                        }
                    }

                    if (_listViewBase.ItemsSource != _cvs.View)
                    {
                        _listViewBase.ItemsSource = _cvs.View;
                    }

                    // _listViewBase.ItemsPanelRoot is only updated asynchronously.
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerScrollOrientation);
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerProperties);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1128 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && _listViewBase.ItemsSource != _cvs.View)
            {
                _listViewBase.ItemsSource = _cvs.View;
            }
        }

void BtnSetItemsWrapGridItemHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1080 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsWrapGridItemHeight != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.ItemHeight = double.Parse(txtItemsWrapGridItemHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsWrapGridItemWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1054 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsWrapGridItemWidth != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.ItemWidth = double.Parse(txtItemsWrapGridItemWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetListViewBaseSelectionMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 696 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseSelectionMode != null)
            {
                _listViewBase.SelectionMode = (ListViewSelectionMode) cmbListViewBaseSelectionMode.SelectedIndex;
            }
        }

void BtnSetListViewBaseTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 709 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseTabNavigation != null)
            {
                _listViewBase.TabNavigation = (KeyboardNavigationMode)cmbListViewBaseTabNavigation.SelectedIndex;
            }
        }

void BtnSetScrollViewerHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1197 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_scrollViewer != null && cmbScrollViewerHorizontalScrollMode != null)
            {
                _scrollViewer.HorizontalScrollMode = (ScrollMode)cmbScrollViewerHorizontalScrollMode.SelectedIndex;
            }
        }

void BtnSetScrollViewerVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1210 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_scrollViewer != null && cmbScrollViewerVerticalScrollMode != null)
            {
                _scrollViewer.VerticalScrollMode = (ScrollMode)cmbScrollViewerVerticalScrollMode.SelectedIndex;
            }
        }

void ChkDataSource_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1357 of file GroupedListViewBasePage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Visible;
        }

void ChkDataSource_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1363 of file GroupedListViewBasePage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Collapsed;
        }

void ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 823 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.AreStickyGroupHeadersEnabled = (bool)chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            itemsStackPanel.AreStickyGroupHeadersEnabled = (bool)chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkListViewBaseIsItemClickEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 717 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.IsItemClickEnabled = (bool)chkListViewBaseIsItemClickEnabled.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 733 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.SingleSelectionFollowsFocus = (bool)chkListViewBaseSingleSelectionFollowsFocus.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1369 of file GroupedListViewBasePage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1375 of file GroupedListViewBasePage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1345 of file GroupedListViewBasePage.xaml.cs.

        {
            if (svMethods != null)
                svMethods.Visibility = Visibility.Visible;
        }

void ChkMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1351 of file GroupedListViewBasePage.xaml.cs.

        {
            if (svMethods != null)
                svMethods.Visibility = Visibility.Collapsed;
        }

void ChkProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1333 of file GroupedListViewBasePage.xaml.cs.

        {
            if (svProperties != null)
                svProperties.Visibility = Visibility.Visible;
        }

void ChkProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1339 of file GroupedListViewBasePage.xaml.cs.

        {
            if (svProperties != null)
                svProperties.Visibility = Visibility.Collapsed;
        }

void CmbListViewBaseFooter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 786 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbListViewBaseFooter != null)
                {
                    switch (cmbListViewBaseFooter.SelectedIndex)
                    {
                        case 0: /*None*/
                            _listViewBase.Footer = null;
                            break;
                        case 1: /*Non-focusable*/
                            _listViewBase.Footer = new TextBlock()
                            {
                                FontSize = 18.0,
                                Margin = new Thickness(10.0),
                                Text = "Footer"
                            };
                            break;
                        case 2: /*Non-focusable*/
                            _listViewBase.Footer = new Button()
                            {
                                Content = "Footer",
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbListViewBaseHeader_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 749 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbListViewBaseHeader != null)
                {
                    switch (cmbListViewBaseHeader.SelectedIndex)
                    {
                        case 0: /*None*/
                            _listViewBase.Header = null;
                            break;
                        case 1: /*Non-focusable*/
                            _listViewBase.Header = new TextBlock()
                            {
                                FontSize = 18.0,
                                Margin = new Thickness(10.0),
                                Text = "Header"
                            };
                            break;
                        case 2: /*Non-focusable*/
                            _listViewBase.Header = new Button()
                            {
                                Content = "Header",
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbListViewBaseItemsPanelType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 686 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelType();
        }

void CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1280 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsAlignment != null)
                {
                    _scrollViewer.HorizontalSnapPointsAlignment = (SnapPointsAlignment)cmbScrollViewerHorizontalSnapPointsAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewerHorizontalSnapPointsType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1248 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsType != null)
                {
                    _scrollViewer.HorizontalSnapPointsType = (SnapPointsType)cmbScrollViewerHorizontalSnapPointsType.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1296 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsAlignment != null)
                {
                    _scrollViewer.VerticalSnapPointsAlignment = (SnapPointsAlignment)cmbScrollViewerVerticalSnapPointsAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewerVerticalSnapPointsType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1264 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsType != null)
                {
                    _scrollViewer.VerticalSnapPointsType = (SnapPointsType)cmbScrollViewerVerticalSnapPointsType.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

static T FindElementOfTypeInSubtree< T > ( DependencyObject element ) [inline, static, private]
Type Constraints
T : DependencyObject
object GetDataSourceItemFromIndex ( int itemIndex ) [inline, private]

Definition at line 1407 of file GroupedListViewBasePage.xaml.cs.

        {
            // itemIndex:0 means the first group GroupedListViewBaseGroupItem
            // itemIndex:1 means the first item GroupedListViewBaseItem in the first group GroupedListViewBaseGroupItem
            if (itemIndex < 0 || _groupedListViewBaseViewModel.Items.Count == 0) return null;

            int groupCount = _groupedListViewBaseViewModel.Items.Count;
            int groupIndex = 0;
            object item = null;

            while (itemIndex >= 0 && groupIndex < groupCount)
            {
                GroupedListViewBaseGroupItem groupedListViewBaseGroupItem = _groupedListViewBaseViewModel.Items[groupIndex];
                item = groupedListViewBaseGroupItem;

                if (itemIndex == 0)
                {
                    return item;
                }
                else
                {
                    itemIndex--;

                    int groupItemCount = groupedListViewBaseGroupItem.Items.Count;
                    int groupItemIndex = 0;

                    while (itemIndex >= 0 && groupItemIndex < groupItemCount)
                    {
                        GroupedListViewBaseItem groupedListViewBaseItem = groupedListViewBaseGroupItem.Items[groupItemIndex];
                        item = groupedListViewBaseItem;

                        if (itemIndex == 0)
                        {
                            return item;
                        }
                        else
                        {
                            itemIndex--;
                            groupItemIndex++;
                        }
                    }

                    groupIndex++;
                }
            }

            return null;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 1396 of file GroupedListViewBasePage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void GroupedListViewBasePage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file GroupedListViewBasePage.xaml.cs.

        {
            _scrollViewer = FindElementOfTypeInSubtree<ScrollViewer>(_listViewBase);

            if (_scrollViewer != null)
            {
                _scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
            }

            UpdateItemsPanelType();
            UpdateListViewBaseProperties();
        }

void ListViewBase_ItemClick | ( | object | sender,
 |  | ItemClickEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                AppendEventMessage($"ListViewBase_ItemClick ClickedItem={e.ClickedItem.ToString()}");
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void NbItemsWrapGridMaximumRowsOrColumns_ValueChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 1312 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && nbItemsWrapGridMaximumRowsOrColumns != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.MaximumRowsOrColumns = (int)nbItemsWrapGridMaximumRowsOrColumns.Value;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

override void OnNavigatedTo ( NavigationEventArgs e ) [inline, protected]

Definition at line 38 of file GroupedListViewBasePage.xaml.cs.

        {
            bool useGridView = (bool)e.Parameter;

            tblGroupedListViewBasePageTitle.Text = useGridView ? "Grouped GridView" : "Grouped ListView";
            _listViewBase = useGridView ? gridView : listView;
            _listViewBase.Visibility = Visibility.Visible;
            _listViewBase.ItemsSource = _cvs.View;

            if (cmbListViewBaseItemsPanelType != null)
            {
                cmbListViewBaseItemsPanelType.SelectedIndex = useGridView ? 0 : 1;
            }

            base.OnNavigatedTo(e);
        }

void RestoreScrollViewerWidth ( ) [inline, private]

Definition at line 99 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_scrollViewer != null)
            {
                _scrollViewer.Width = double.NaN;

                _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerSizeProperties);
            }
        }

void ScrollViewer_ViewChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerHorizontalOffset != null && txtScrollViewerVerticalOffset != null)
                {
                    txtScrollViewerHorizontalOffset.Text = _scrollViewer.HorizontalOffset.ToString();
                    txtScrollViewerVerticalOffset.Text = _scrollViewer.VerticalOffset.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelAreStickyGroupHeadersEnabled ( ) [inline, private]

Definition at line 352 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && chkItemsPanelAreStickyGroupHeadersEnabled != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked = itemsWrapGrid.AreStickyGroupHeadersEnabled;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked = itemsStackPanel.AreStickyGroupHeadersEnabled;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelCacheLength ( ) [inline, private]

Definition at line 382 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelCacheLength != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsPanelCacheLength.Text = itemsWrapGrid.CacheLength.ToString();
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            txtItemsPanelCacheLength.Text = itemsStackPanel.CacheLength.ToString();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelGroupHeaderPlacement ( ) [inline, private]

Definition at line 271 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbItemsPanelGroupHeaderPlacement != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        cmbItemsPanelGroupHeaderPlacement.SelectedIndex = (int)itemsWrapGrid.GroupHeaderPlacement;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            cmbItemsPanelGroupHeaderPlacement.SelectedIndex = (int)itemsStackPanel.GroupHeaderPlacement;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelGroupPadding ( ) [inline, private]

Definition at line 322 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelGroupPadding != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsPanelGroupPadding.Text = itemsWrapGrid.GroupPadding.ToString();
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            txtItemsPanelGroupPadding.Text = itemsStackPanel.GroupPadding.ToString();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelMargin ( ) [inline, private]

Definition at line 301 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = _listViewBase.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        txtItemsPanelMargin.Text = itemsPanel.Margin.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelOrientation ( ) [inline, private]

Definition at line 232 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbItemsPanelOrientation != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        cmbItemsPanelOrientation.SelectedIndex = (int)itemsWrapGrid.Orientation;
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            cmbItemsPanelOrientation.SelectedIndex = (int)itemsStackPanel.Orientation;
                        }
                        else
                        {
                            VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;

                            if (virtualizingStackPanel != null)
                            {
                                cmbItemsPanelOrientation.SelectedIndex = (int)virtualizingStackPanel.Orientation;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelProperties ( ) [inline, private]

Definition at line 157 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
            UpdateItemsPanelGroupHeaderPlacement();
            UpdateItemsPanelMargin();
            UpdateItemsPanelGroupPadding();
            UpdateItemsPanelAreStickyGroupHeadersEnabled();
            UpdateItemsPanelCacheLength();
            UpdateItemsWrapGridItemWidth();
            UpdateItemsWrapGridItemHeight();

            // _listViewBase.ItemsPanelRoot is only updated asynchronously.
            _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerScrollOrientation);
            _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerProperties);
        }

void UpdateItemsPanelType ( ) [inline, private]

Definition at line 124 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbListViewBaseItemsPanelType != null)
                {
                    switch (cmbListViewBaseItemsPanelType.SelectedIndex)
                    {
                        case 0: // Use the itemsWrapGridItemsPanelTemplate resource
                            _listViewBase.ItemsPanel = Resources["itemsWrapGridItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateItemsWrapGridUIVisibility(Visibility.Visible);
                            break;
                        case 1: // Use the itemsStackPanelItemsPanelTemplate resource
                            _listViewBase.ItemsPanel = Resources["itemsStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateItemsWrapGridUIVisibility(Visibility.Collapsed);
                            break;
                        case 2: // Use the virtualizingStackPanelItemsPanelTemplate resource
                            _listViewBase.ItemsPanel = Resources["virtualizingStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateItemsWrapGridUIVisibility(Visibility.Collapsed);
                            break;
                    }

                    // _listViewBase.ItemsPanelRoot is only updated asynchronously.
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateItemsPanelProperties);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridItemHeight ( ) [inline, private]

Definition at line 433 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsWrapGridItemHeight != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsWrapGridItemHeight.Text = itemsWrapGrid.ItemHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridItemWidth ( ) [inline, private]

Definition at line 412 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsWrapGridItemWidth != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        txtItemsWrapGridItemWidth.Text = itemsWrapGrid.ItemWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridUIVisibility ( Visibility visibility ) [inline, private]

Definition at line 109 of file GroupedListViewBasePage.xaml.cs.

        {
            tblItemsWrapGridProperties.Visibility = visibility;
            tblItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
            nbItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
            tblItemsWrapGridItemWidth.Visibility = visibility;
            txtItemsWrapGridItemWidth.Visibility = visibility;
            btnGetItemsWrapGridItemWidth.Visibility = visibility;
            btnSetItemsWrapGridItemWidth.Visibility = visibility;
            tblItemsWrapGridItemHeight.Visibility = visibility;
            txtItemsWrapGridItemHeight.Visibility = visibility;
            btnGetItemsWrapGridItemHeight.Visibility = visibility;
            btnSetItemsWrapGridItemHeight.Visibility = visibility;
        }

void UpdateListViewBaseProperties ( ) [inline, private]

Definition at line 173 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateListViewBaseSelectionMode();
            UpdateListViewBaseSingleSelectionFollowsFocus();
            UpdateListViewBaseTabNavigation();
        }

void UpdateListViewBaseSelectionMode ( ) [inline, private]

Definition at line 208 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseSelectionMode != null)
            {
                cmbListViewBaseSelectionMode.SelectedIndex = (int)_listViewBase.SelectionMode;
            }
        }

void UpdateListViewBaseSingleSelectionFollowsFocus ( ) [inline, private]

Definition at line 216 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && chkListViewBaseSingleSelectionFollowsFocus != null)
            {
                chkListViewBaseSingleSelectionFollowsFocus.IsChecked = _listViewBase.SingleSelectionFollowsFocus;
            }
        }

void UpdateListViewBaseTabNavigation ( ) [inline, private]

Definition at line 224 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseTabNavigation != null)
            {
                cmbListViewBaseTabNavigation.SelectedIndex = (int)_listViewBase.TabNavigation;
            }
        }

void UpdateScrollViewerExtentHeight ( ) [inline, private]

Definition at line 638 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerExtentHeight != null)
                {
                    txtScrollViewerExtentHeight.Text = _scrollViewer.ExtentHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerExtentWidth ( ) [inline, private]

Definition at line 622 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerExtentWidth != null)
                {
                    txtScrollViewerExtentWidth.Text = _scrollViewer.ExtentWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerHorizontalOffset ( ) [inline, private]

Definition at line 654 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerHorizontalOffset != null)
                {
                    txtScrollViewerHorizontalOffset.Text = _scrollViewer.HorizontalOffset.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerHorizontalScrollMode ( ) [inline, private]

Definition at line 526 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerHorizontalScrollMode != null)
                {
                    cmbScrollViewerHorizontalScrollMode.SelectedIndex = (int)_scrollViewer.HorizontalScrollMode;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerHorizontalSnapPointsType ( ) [inline, private]

Definition at line 558 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsType != null)
                {
                    cmbScrollViewerHorizontalSnapPointsType.SelectedIndex = (int)_scrollViewer.HorizontalSnapPointsType;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerProperties ( ) [inline, private]

Definition at line 190 of file GroupedListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && _scrollViewer != null && _listViewBase.ItemsPanelRoot is VirtualizingStackPanel)
            {
                // Workaround to avoid the ListViewBase not being scrollable after an ItemsPanel change to VirtualizingStackPanel.
                // Resizing the ScrollViewer temporarily fixes its manipulability.
                _scrollViewer.Width = _scrollViewer.ActualWidth + 1;

                _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, RestoreScrollViewerWidth);
            }

            UpdateScrollViewerSizeProperties();
            UpdateScrollViewerHorizontalScrollMode();
            UpdateScrollViewerVerticalScrollMode();
            UpdateScrollViewerHorizontalSnapPointsType();
            UpdateScrollViewerVerticalSnapPointsType();
        }

void UpdateScrollViewerScrollOrientation ( ) [inline, private]

Definition at line 454 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    Orientation scrollOrientation = Orientation.Horizontal;

                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        if (itemsWrapGrid.Orientation == Orientation.Horizontal)
                        {
                            scrollOrientation = Orientation.Vertical;
                        }
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            if (itemsStackPanel.Orientation == Orientation.Vertical)
                            {
                                scrollOrientation = Orientation.Vertical;
                            }
                        }
                        else
                        {
                            VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;

                            if (virtualizingStackPanel != null)
                            {
                                if (virtualizingStackPanel.Orientation == Orientation.Vertical)
                                {
                                    scrollOrientation = Orientation.Vertical;
                                }
                            }
                        }
                    }

                    if (scrollOrientation == Orientation.Vertical)
                    {
                        ScrollViewer.SetHorizontalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Disabled);
                        ScrollViewer.SetVerticalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Auto);
                        ScrollViewer.SetHorizontalScrollMode(_listViewBase, ScrollMode.Disabled);
                        ScrollViewer.SetVerticalScrollMode(_listViewBase, ScrollMode.Enabled);
                        ScrollViewer.SetIsHorizontalRailEnabled(_listViewBase, false);
                        ScrollViewer.SetIsVerticalRailEnabled(_listViewBase, true);
                    }
                    else
                    {
                        ScrollViewer.SetHorizontalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Auto);
                        ScrollViewer.SetVerticalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Disabled);
                        ScrollViewer.SetHorizontalScrollMode(_listViewBase, ScrollMode.Enabled);
                        ScrollViewer.SetVerticalScrollMode(_listViewBase, ScrollMode.Disabled);
                        ScrollViewer.SetIsHorizontalRailEnabled(_listViewBase, true);
                        ScrollViewer.SetIsVerticalRailEnabled(_listViewBase, false);
                    }

                    // Let the ScrollViewer layout itself before reading its updated properties.
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerProperties);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerSizeProperties ( ) [inline, private]

Definition at line 180 of file GroupedListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerViewportWidth();
            UpdateScrollViewerViewportHeight();
            UpdateScrollViewerExtentWidth();
            UpdateScrollViewerExtentHeight();
            UpdateScrollViewerHorizontalOffset();
            UpdateScrollViewerVerticalOffset();
        }

void UpdateScrollViewerVerticalOffset ( ) [inline, private]

Definition at line 670 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerVerticalOffset != null)
                {
                    txtScrollViewerVerticalOffset.Text = _scrollViewer.VerticalOffset.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerVerticalScrollMode ( ) [inline, private]

Definition at line 542 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerVerticalScrollMode != null)
                {
                    cmbScrollViewerVerticalScrollMode.SelectedIndex = (int)_scrollViewer.VerticalScrollMode;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerVerticalSnapPointsType ( ) [inline, private]

Definition at line 574 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsType != null)
                {
                    cmbScrollViewerVerticalSnapPointsType.SelectedIndex = (int)_scrollViewer.VerticalSnapPointsType;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerViewportHeight ( ) [inline, private]

Definition at line 606 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerViewportHeight != null)
                {
                    txtScrollViewerViewportHeight.Text = _scrollViewer.ViewportHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerViewportWidth ( ) [inline, private]

Definition at line 590 of file GroupedListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerViewportWidth != null)
                {
                    txtScrollViewerViewportWidth.Text = _scrollViewer.ViewportWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

Member Data Documentation

CollectionViewSource _cvs = new CollectionViewSource() [private]

Definition at line 23 of file GroupedListViewBasePage.xaml.cs.

GroupedListViewBaseViewModel _groupedListViewBaseViewModel = new GroupedListViewBaseViewModel() [private]

Definition at line 22 of file GroupedListViewBasePage.xaml.cs.

ListViewBase _listViewBase = null [private]

Definition at line 24 of file GroupedListViewBasePage.xaml.cs.

ScrollViewer _scrollViewer = null [private]

Definition at line 25 of file GroupedListViewBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedListViewBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedListViewBaseViewModel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • GroupedListViewBaseViewModel
Public Member Functions | Properties

GroupedListViewBaseViewModel Class Reference

List of all members.

Public Member Functions

GroupedListViewBaseViewModel ()

Properties

ObservableCollection
< GroupedListViewBaseGroupItem > 		Items [get, set]

Detailed Description

Definition at line 1515 of file GroupedListViewBasePage.xaml.cs.

Constructor & Destructor Documentation

GroupedListViewBaseViewModel ( ) [inline]

Definition at line 1517 of file GroupedListViewBasePage.xaml.cs.

        {
            Items = new ObservableCollection<GroupedListViewBaseGroupItem>();

            GroupedListViewBaseGroupItem groupA = new GroupedListViewBaseGroupItem("Group A");
            groupA.Items.Add(new GroupedListViewBaseItem("idA1"));
            groupA.Items.Add(new GroupedListViewBaseItem("idA2"));
            groupA.Items.Add(new GroupedListViewBaseItem("idA3"));
            groupA.Items.Add(new GroupedListViewBaseItem("idA4"));
            groupA.Items.Add(new GroupedListViewBaseItem("idA5"));
            groupA.Items.Add(new GroupedListViewBaseItem("idA6"));
            Items.Add(groupA);

            GroupedListViewBaseGroupItem groupB = new GroupedListViewBaseGroupItem("Group B");
            groupB.Items.Add(new GroupedListViewBaseItem("idB1"));
            groupB.Items.Add(new GroupedListViewBaseItem("idB2"));
            groupB.Items.Add(new GroupedListViewBaseItem("idB3"));
            groupB.Items.Add(new GroupedListViewBaseItem("idB4"));
            groupB.Items.Add(new GroupedListViewBaseItem("idB5"));
            groupB.Items.Add(new GroupedListViewBaseItem("idB6"));
            groupB.Items.Add(new GroupedListViewBaseItem("idB7"));
            groupB.Items.Add(new GroupedListViewBaseItem("idB8"));
            Items.Add(groupB);

            GroupedListViewBaseGroupItem groupC = new GroupedListViewBaseGroupItem("Group C");
            groupC.Items.Add(new GroupedListViewBaseItem("idC1"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC2"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC3"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC4"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC5"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC6"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC7"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC8"));
            groupC.Items.Add(new GroupedListViewBaseItem("idC9"));
            Items.Add(groupC);

            GroupedListViewBaseGroupItem groupD = new GroupedListViewBaseGroupItem("Group D");
            groupD.Items.Add(new GroupedListViewBaseItem("idD1"));
            groupD.Items.Add(new GroupedListViewBaseItem("idD2"));
            groupD.Items.Add(new GroupedListViewBaseItem("idD3"));
            groupD.Items.Add(new GroupedListViewBaseItem("idD4"));
            groupD.Items.Add(new GroupedListViewBaseItem("idD5"));
            groupD.Items.Add(new GroupedListViewBaseItem("idD6"));
            Items.Add(groupD);

            GroupedListViewBaseGroupItem groupE = new GroupedListViewBaseGroupItem("Group E");
            groupE.Items.Add(new GroupedListViewBaseItem("idE1"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE2"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE3"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE4"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE5"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE6"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE7"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE8"));
            groupE.Items.Add(new GroupedListViewBaseItem("idE9"));
            groupE.Items.Add(new GroupedListViewBaseItem("idEA"));
            groupE.Items.Add(new GroupedListViewBaseItem("idEB"));
            groupE.Items.Add(new GroupedListViewBaseItem("idEC"));
            groupE.Items.Add(new GroupedListViewBaseItem("idED"));
            groupE.Items.Add(new GroupedListViewBaseItem("idEE"));
            groupE.Items.Add(new GroupedListViewBaseItem("idEF"));
            Items.Add(groupE);

            GroupedListViewBaseGroupItem groupF = new GroupedListViewBaseGroupItem("Group F");
            groupF.Items.Add(new GroupedListViewBaseItem("idF1"));
            groupF.Items.Add(new GroupedListViewBaseItem("idF2"));
            groupF.Items.Add(new GroupedListViewBaseItem("idF3"));
            Items.Add(groupF);

            GroupedListViewBaseGroupItem groupG = new GroupedListViewBaseGroupItem("Group G");
            groupG.Items.Add(new GroupedListViewBaseItem("idG1"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG2"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG3"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG4"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG5"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG6"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG7"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG8"));
            groupG.Items.Add(new GroupedListViewBaseItem("idG9"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGA"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGB"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGC"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGD"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGE"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGF"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGG"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGH"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGI"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGJ"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGK"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGL"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGM"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGN"));
            groupG.Items.Add(new GroupedListViewBaseItem("idGO"));
            Items.Add(groupG);

            GroupedListViewBaseGroupItem groupH = new GroupedListViewBaseGroupItem("Group H");
            groupH.Items.Add(new GroupedListViewBaseItem("idH1"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH2"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH3"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH4"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH5"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH6"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH7"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH8"));
            groupH.Items.Add(new GroupedListViewBaseItem("idH9"));
            groupH.Items.Add(new GroupedListViewBaseItem("idhA"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHB"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHC"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHD"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHE"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHF"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHG"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHH"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHI"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHJ"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHK"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHL"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHM"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHN"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHO"));
            groupH.Items.Add(new GroupedListViewBaseItem("idhP"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHQ"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHR"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHS"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHT"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHU"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHV"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHW"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHX"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHY"));
            groupH.Items.Add(new GroupedListViewBaseItem("idHZ"));
            Items.Add(groupH);

            GroupedListViewBaseGroupItem groupI = new GroupedListViewBaseGroupItem("Group I");
            groupI.Items.Add(new GroupedListViewBaseItem("idI1"));
            groupI.Items.Add(new GroupedListViewBaseItem("idI2"));
            groupI.Items.Add(new GroupedListViewBaseItem("idI3"));
            Items.Add(groupI);
        }

Property Documentation

ObservableCollection<GroupedListViewBaseGroupItem> Items [get, set]

Definition at line 1659 of file GroupedListViewBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/GroupedListViewBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: HierarchicalNavigationViewDataBinding Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • HierarchicalNavigationViewDataBinding
Public Member Functions | Private Member Functions | Private Attributes

HierarchicalNavigationViewDataBinding Class Reference

List of all members.

Public Member Functions

HierarchicalNavigationViewDataBinding ()

Private Member Functions

void | AddAndSelectSubMenuItem (object sender, RoutedEventArgs e)
void | AddMenuItem (object sender, RoutedEventArgs e)
void | AddShowAndSelectSubMenuItem (object sender, RoutedEventArgs e)
void | ClickedItem (object sender, NavigationViewItemInvokedEventArgs e)
void | NavView_PaneClosed (NavigationView sender, object args)
void | NavView_PaneOpened (NavigationView sender, object args)
void | OnItemCollapsed (object sender, NavigationViewItemCollapsedEventArgs e)
void | OnItemExpanding (object sender, NavigationViewItemExpandingEventArgs e)
void | OnSelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs args)
void | PaneDisplayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PrintSelectedItem (object sender, RoutedEventArgs e)
void | RemoveSecondMenuItem (object sender, RoutedEventArgs e)
void | SelectItemUsingAPI (object sender, RoutedEventArgs e)
void | SelectSecondItem (object sender, RoutedEventArgs e)
void | SelectSubMenuItem (object sender, RoutedEventArgs e)

Private Attributes

ObservableCollection< Category > | categories = new ObservableCollection<Category>()
ObservableCollection< Category > | categories11 = new ObservableCollection<Category>()
int | nextIndex = 25

Detailed Description

Definition at line 31 of file HierarchicalNavigationViewDataBinding.xaml.cs.

Constructor & Destructor Documentation

HierarchicalNavigationViewDataBinding ( ) [inline]

Definition at line 37 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            this.InitializeComponent();

            var categories3 = new ObservableCollection<Category>();
            categories3.Add(new Category("Menu Item 4", "MI4", "Icon", null, true));
            categories3.Add(new Category("Menu Item 5", "MI5", "Icon", null, true));

            var categories2 = new ObservableCollection<Category>();
            categories2.Add(new Category("Menu Item 2", "MI2", "Icon", categories3, false));
            categories2.Add(new Category("Menu Item 3", "MI3", "Icon", null, true));

            var categories5 = new ObservableCollection<Category>();
            categories5.Add(new Category("Menu Item 8", "MI8", "Icon", null, true));
            categories5.Add(new Category("Menu Item 9", "MI9", "Icon", null, true));

            var categories4 = new ObservableCollection<Category>();
            categories4.Add(new Category("Menu Item 7 (Selectable)", "MI7", "Icon", categories5, true));

            var categories7 = new ObservableCollection<Category>();
            categories7.Add(new Category("Menu Item 13", "MI13", "Icon", null, true));
            categories7.Add(new Category("Menu Item 14", "MI14", "Icon", null, true));

            var categories6 = new ObservableCollection<Category>();
            categories6.Add(new Category("Menu Item 12", "MI12", "Icon", categories7, false));

            var categories9 = new ObservableCollection<Category>();
            categories9.Add(new Category("Menu Item 17", "MI17", "Icon", null, true));
            categories9.Add(new Category("Menu Item 18", "MI18", "Icon", null, true));

            var categories8 = new ObservableCollection<Category>();
            categories8.Add(new Category("Menu Item 16 (Selectable)", "MI16", "Icon", categories9, true));

            var categories10 = new ObservableCollection<Category>();

            var categories111 = new ObservableCollection<Category>();
            categories111.Add(new Category("Menu Item 21", "MI21", "Icon", null, true));
            categories111.Add(new Category("Menu Item 22", "MI22", "Icon", null, true));

            categories11.Add(new Category("Menu Item 20", "MI20", "Icon", null, true));
            categories11.Add(new Category("Menu Item 23", "MI23", "Icon", categories111, true));
            categories11.Add(new Category("Menu Item 24", "MI24", "Icon", null, true));

            categories.Add(new Category("Menu Item 1", "MI1", "Icon", categories2, false));
            categories.Add(new Category("Menu Item 6 (Selectable)", "MI6", "Icon", categories4, true));
            categories.Add(new Category("Menu Item 10", "MI10", "Icon", categories10, true));
            categories.Add(new Category("Menu Item 11", "MI11", "Icon", categories6, false));
            categories.Add(new Category("Menu Item 15", "MI15", "Icon", categories8, false));
            categories.Add(new Category("Menu Item 19", "MI19", "Icon", categories11, false));
        }

Member Function Documentation

void AddAndSelectSubMenuItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 115 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            Category newCategory = new Category($"Menu Item {nextIndex}", $"MI{nextIndex}", "Icon", null, true);
            categories11.Add(newCategory);
            navview.SelectedItem = newCategory;

            nextIndex++;
        }

void AddMenuItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 108 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            categories.Add(new Category("Menu Item G", "MIG", "Icon", null, true));
        }

void AddShowAndSelectSubMenuItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 124 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            Category newCategory = new Category($"Menu Item {nextIndex}", $"MI{nextIndex}", "Icon", null, true);
            categories11.Add(newCategory);
            navview.SelectedItem = newCategory;

            NavigationViewItem container = (NavigationViewItem)navview.ContainerFromMenuItem(categories.Last());

            if (!container.IsExpanded)
            {
                navview.Expand(container);
            }

            nextIndex++;
        }

void ClickedItem | ( | object | sender,
 |  | NavigationViewItemInvokedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            var clickedItem = e.InvokedItem;
            var clickedItemContainer = e.InvokedItemContainer;
        }

void NavView_PaneClosed | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 202 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            PaneOpenedOrClosedEvent.Text = "Closed";
        }

void NavView_PaneOpened | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 207 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            PaneOpenedOrClosedEvent.Text = "Opened";
        }

void OnItemCollapsed | ( | object | sender,
 |  | NavigationViewItemCollapsedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 172 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            var collapsedItemContainerContent = (string)(e.CollapsedItemContainer.Content);
            TextBlockCollapsedItem.Text = collapsedItemContainerContent;

            // Verify that returned item corresponds to the returned container
            var item = (Category)e.CollapsedItem;
            var areItemAndContainerTheSame = "false";
            if((string)(item.Content) == collapsedItemContainerContent)
            {
                areItemAndContainerTheSame = "true";
            }
            TextblockCollapsedItemAndContainerMatch.Text = areItemAndContainerTheSame;
        }

void OnItemExpanding | ( | object | sender,
 |  | NavigationViewItemExpandingEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 157 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            var expandingItemContainerContent = (string)(e.ExpandingItemContainer.Content);
            TextBlockExpandingItem.Text = expandingItemContainerContent;

            // Verify that returned item corresponds to the returned container
            var item = (Category)e.ExpandingItem;
            var areItemAndContainerTheSame = "false";
            if ((string)(item.Content) == expandingItemContainerContent)
            {
                areItemAndContainerTheSame = "true";
            }
            TextblockExpandingItemAndContainerMatch.Text = areItemAndContainerTheSame;
        }

void OnSelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 187 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            if (args.SelectedItemContainer != null)
            {
                args.SelectedItemContainer.StartBringIntoView();
            }
        }

void PaneDisplayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 195 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
            navview.PaneDisplayMode = mode;
        }

void PrintSelectedItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 94 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            var selectedItem = navview.SelectedItem;
            if(selectedItem != null)
            {
                var label = ((Category)selectedItem).Content;
                SelectedItemLabel.Text = label;
            }
            else
            {
                SelectedItemLabel.Text = "No Item Selected";
            }
        }

void RemoveSecondMenuItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 145 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            categories.RemoveAt(1);
        }

void SelectItemUsingAPI | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            navview.SelectedItem = categories[0].Children[0].Children[1];
        }

void SelectSecondItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 149 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            navview.SelectedItem = categories[1];
        }

void SelectSubMenuItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file HierarchicalNavigationViewDataBinding.xaml.cs.

        {
            navview.SelectedItem = categories11[0];
        }

Member Data Documentation

ObservableCollection<Category> categories = new ObservableCollection<Category>() [private]

Definition at line 34 of file HierarchicalNavigationViewDataBinding.xaml.cs.

ObservableCollection<Category> categories11 = new ObservableCollection<Category>() [private]

Definition at line 35 of file HierarchicalNavigationViewDataBinding.xaml.cs.

int nextIndex = 25 [private]

Definition at line 113 of file HierarchicalNavigationViewDataBinding.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewDataBinding.xaml.cs
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: HierarchicalNavigationViewMarkup Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • HierarchicalNavigationViewMarkup
Public Member Functions | Private Member Functions

HierarchicalNavigationViewMarkup Class Reference

List of all members.

Public Member Functions

HierarchicalNavigationViewMarkup ()

Private Member Functions

void | AddChildItemToMI19 (object sender, RoutedEventArgs e)
string | BuildIsChildSelectedString (IList< object > items, string itemstring)
void | ClickedItem (object sender, NavigationViewItemInvokedEventArgs e)
void | CollapseSelectedItem (object sender, RoutedEventArgs e)
NavigationViewItem | CreateMenuItem (string title)
void | GetMenuItem1ChildrenFlyoutCornerRadiusButton_Click (object sender, RoutedEventArgs e)
void | NavView_PaneClosed (NavigationView sender, object args)
void | NavView_PaneOpened (NavigationView sender, object args)
void | OnCheckedIsSettingsVisible (object sender, RoutedEventArgs e)
void | OnItemCollapsed (object sender, NavigationViewItemCollapsedEventArgs e)
void | OnItemExpanding (object sender, NavigationViewItemExpandingEventArgs e)
void | OnUncheckedIsSettingsVisible (object sender, RoutedEventArgs e)
void | PaneDisplayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PrintSelectedItem (object sender, RoutedEventArgs e)
void | PrintTopLevelIsChildSelectedItems (object sender, RoutedEventArgs e)
void | RemoveSecondMenuItem (object sender, RoutedEventArgs e)
void | SelectSecondItem (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 12 of file HierarchicalNavigationViewMarkup.xaml.cs.

Constructor & Destructor Documentation

HierarchicalNavigationViewMarkup ( ) [inline]

Definition at line 15 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void AddChildItemToMI19 | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            MI19.MenuItems.Add(CreateMenuItem("Child of MI19"));
        }

string BuildIsChildSelectedString | ( | IList< object > | items,
 |  | string | itemstring |
 | ) |  |  | [inline, private]

Definition at line 84 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            foreach (NavigationViewItem item in items)
            {
                if (item.IsChildSelected == true)
                {
                    itemstring += item.Name + " ";
                }
            }
            return itemstring;
        }

void ClickedItem | ( | object | sender,
 |  | NavigationViewItemInvokedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 30 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
        }

void CollapseSelectedItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            var selectedItem = navview.SelectedItem;
            if(selectedItem != null)
            {
                var container = (NavigationViewItem)navview.ContainerFromMenuItem(selectedItem);
                container.IsExpanded = false;
            }
        }

NavigationViewItem CreateMenuItem ( string title ) [inline, private]

Definition at line 68 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            return new NavigationViewItem{ Content = title };
        }

void GetMenuItem1ChildrenFlyoutCornerRadiusButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            var parent = MI2.FindVisualParentByType<FlyoutPresenter>();
            if (parent is FlyoutPresenter flyoutPresenter)
            {
                var contentPresenter = flyoutPresenter.FindVisualChildByName("ContentPresenter") as ContentPresenter;
                MenuItem1ChildrenFlyoutCornerRadiusTextBlock.Text = contentPresenter?.CornerRadius.ToString() ?? "Internal ContentPresenter not found";
            }
        }

void NavView_PaneClosed | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 150 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            PaneOpenedOrClosedEvent.Text = "Closed";
        }

void NavView_PaneOpened | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 155 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            PaneOpenedOrClosedEvent.Text = "Opened";
        }

void OnCheckedIsSettingsVisible | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 20 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            navview.IsSettingsVisible = true;
        }

void OnItemCollapsed | ( | object | sender,
 |  | NavigationViewItemCollapsedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 118 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            var collapsedItemContainerContent = (string)(e.CollapsedItemContainer.Content);
            TextBlockCollapsedItem.Text = collapsedItemContainerContent;

            // Verify that returned item corresponds to the returned container
            var item = (NavigationViewItem)e.CollapsedItem;
            var areItemAndContainerTheSame = "false";
            if ((string)(item.Content) == collapsedItemContainerContent)
            {
                areItemAndContainerTheSame = "true";
            }
            TextblockCollapsedItemAndContainerMatch.Text = areItemAndContainerTheSame;
        }

void OnItemExpanding | ( | object | sender,
 |  | NavigationViewItemExpandingEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 103 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            var expandingItemContainerContent = (string)(e.ExpandingItemContainer.Content);
            TextBlockExpandingItem.Text = expandingItemContainerContent;

            // Verify that returned item corresponds to the returned container
            var item = (NavigationViewItem)e.ExpandingItem;
            var areItemAndContainerTheSame = "false";
            if ((string)(item.Content) == expandingItemContainerContent)
            {
                areItemAndContainerTheSame = "true";
            }
            TextblockExpandingItemAndContainerMatch.Text = areItemAndContainerTheSame;
        }

void OnUncheckedIsSettingsVisible | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 25 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            navview.IsSettingsVisible = false;
        }

void PaneDisplayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
            navview.PaneDisplayMode = mode;
        }

void PrintSelectedItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            var selectedItem = navview.SelectedItem;
            if (selectedItem != null)
            {
                var label = (String)((NavigationViewItem)selectedItem).Content;
                SelectedItemLabel.Text = label;
            }
            else
            {
                SelectedItemLabel.Text = "No Item Selected";
            }
        }

void PrintTopLevelIsChildSelectedItems | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            string itemstring = "";
            itemstring = BuildIsChildSelectedString(navview.MenuItems, itemstring);
            if(itemstring == "")
            {
                itemstring = "None";
            }
            IsChildSelectedLabel.Text = itemstring;
        }

void RemoveSecondMenuItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 58 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            navview.MenuItems.RemoveAt(2);
        }

void SelectSecondItem | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file HierarchicalNavigationViewMarkup.xaml.cs.

        {
            IList<Object> menuItems = navview.MenuItems;
            navview.SelectedItem = menuItems[1];

        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewMarkup.xaml.cs
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ICoreWebView2Interop Interface Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ICoreWebView2Interop
Public Member Functions

ICoreWebView2Interop Interface Reference

List of all members.

Public Member Functions

void AddHostObjectToScript ([In] string name,[In] ref object obj)

Detailed Description

Definition at line 2407 of file WebView2BasicPage.xaml.cs.

Member Function Documentation

void AddHostObjectToScript | ( | [In] string | name,
 |  | [In] ref object | obj
 | ) |  |
The documentation for this interface was generated from the following file:
  • WebView2/TestUI/WebView2BasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIconPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ImageIconPage
Public Member Functions | Private Member Functions

ImageIconPage Class Reference

List of all members.

Public Member Functions

ImageIconPage ()

Private Member Functions

void | ToggleButton_Checked (object sender, RoutedEventArgs e)
void | ToggleButton_Unchecked (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 19 of file ImageIconPage.xaml.cs.

Constructor & Destructor Documentation

ImageIconPage ( ) [inline]

Definition at line 21 of file ImageIconPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void ToggleButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file ImageIconPage.xaml.cs.

        {
            this.ImageIcon.Source = new SvgImageSource(new Uri("ms-appx:///Assets/libre-camera-panorama.svg"));
        }

void ToggleButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 30 of file ImageIconPage.xaml.cs.

        {
            BitmapImage bitmapImage = new BitmapImage();
            Uri uri = new Uri("ms-appx:///Assets/ingredient2.png");
            bitmapImage.UriSource = uri;

            this.ImageIcon.Source = bitmapImage;
        }

The documentation for this class was generated from the following file:
  • ImageIcon/TestUI/ImageIconPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIRefreshInfoProviderAdapter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ImageIRefreshInfoProviderAdapter
Public Member Functions | Private Member Functions | Private Attributes

ImageIRefreshInfoProviderAdapter Class Reference

List of all members.

Public Member Functions

ImageIRefreshInfoProviderAdapter (RefreshPullDirection refreshPullDirection, IAdapterAnimationHandler animationHandler)
IRefreshInfoProvider | Adapt (Image image, Size visualizerSize)
IRefreshInfoProvider | AdaptFromTree (UIElement root, Size visualizerSize)
void | SetAnimations (UIElement refreshVisualizerAnimatableContainer)

Private Member Functions

Image | AdaptFromTreeRecursiveHelper (DependencyObject root, int depth)
void | InfoProvider_RefreshCompleted (object sender, object e)
void | InfoProvider_RefreshStarted (object sender, object e)
bool | IsOrientationVertical ()
void | OnImagePointerPressed (object sender, PointerRoutedEventArgs e)

Private Attributes

IAdapterAnimationHandler | animationHandler
Image | image
RefreshInfoProviderImplementation infoProvider
InteractionTracker | interactionTracker
RefreshPullDirection | refreshPullDirection
VisualInteractionSource | visualInteractionSource

Detailed Description

Definition at line 19 of file ImageIRefreshInfoProviderAdapter.cs.

Constructor & Destructor Documentation

ImageIRefreshInfoProviderAdapter | ( | RefreshPullDirection | refreshPullDirection,
 |  | IAdapterAnimationHandler | animationHandler |
 | ) |  |  | [inline]

Definition at line 28 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            this.refreshPullDirection = refreshPullDirection;

            if (animationHandler != null)
            {
                this.animationHandler = animationHandler;
            }
            else
            {
                this.animationHandler = new AnimationHandler(null, refreshPullDirection);
            }
        }

Member Function Documentation

IRefreshInfoProvider Adapt | ( | Image | image,
 |  | Size | visualizerSize |
 | ) |  |  | [inline]

Definition at line 69 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            this.image = image;
            UIElement parent = (UIElement)VisualTreeHelper.GetParent(image);

            Visual parentVisual = ElementCompositionPreview.GetElementVisual(parent);
            Compositor compositor = parentVisual.Compositor;
            infoProvider = new RefreshInfoProviderImplementation(refreshPullDirection, visualizerSize, compositor);

            interactionTracker = InteractionTracker.CreateWithOwner(compositor, infoProvider);
            interactionTracker.MaxPosition = new Vector3(0.0f);
            interactionTracker.MinPosition = new Vector3(0.0f);
            interactionTracker.MaxScale = 1.0f;
            interactionTracker.MinScale = 1.0f;

            visualInteractionSource = VisualInteractionSource.Create(parentVisual);
            visualInteractionSource.ManipulationRedirectionMode = VisualInteractionSourceRedirectionMode.CapableTouchpadOnly;
            visualInteractionSource.ScaleSourceMode = InteractionSourceMode.Disabled;
            visualInteractionSource.PositionXSourceMode = IsOrientationVertical() ? InteractionSourceMode.Disabled : InteractionSourceMode.EnabledWithInertia;
            visualInteractionSource.PositionXChainingMode = IsOrientationVertical() ? InteractionChainingMode.Auto : InteractionChainingMode.Never;
            visualInteractionSource.PositionYSourceMode = IsOrientationVertical() ? InteractionSourceMode.EnabledWithInertia : InteractionSourceMode.Disabled;
            visualInteractionSource.PositionYChainingMode = IsOrientationVertical() ? InteractionChainingMode.Never : InteractionChainingMode.Auto;

            interactionTracker.InteractionSources.Add(visualInteractionSource);

            this.image.PointerPressed += OnImagePointerPressed;
            infoProvider.RefreshStarted += InfoProvider_RefreshStarted;
            infoProvider.RefreshCompleted += InfoProvider_RefreshCompleted;

            return infoProvider;
        }

IRefreshInfoProvider AdaptFromTree | ( | UIElement | root,
 |  | Size | visualizerSize |
 | ) |  |  | [inline]

Definition at line 42 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            int depth = 0;
            if (root is Image)
            {
                return Adapt((Image)root, visualizerSize);
            }
            else
            {
                while (depth < 10)
                {
                    Image result = AdaptFromTreeRecursiveHelper(root, depth);
                    if (result != null)
                    {
                        return Adapt(result, visualizerSize);
                    }
                    depth++;
                }
            }
            return null;
        }

Image AdaptFromTreeRecursiveHelper | ( | DependencyObject | root,
 |  | int | depth |
 | ) |  |  | [inline, private]

Definition at line 128 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            int numChildren = VisualTreeHelper.GetChildrenCount(root);
            if (depth == 0)
            {
                for (int i = 0; i < numChildren; i++)
                {
                    DependencyObject childObject = VisualTreeHelper.GetChild(root, i);
                    if (childObject is Image)
                    {
                        return (Image)childObject;
                    }
                }
                return null;
            }
            else
            {
                for (int i = 0; i < numChildren; i++)
                {
                    DependencyObject childObject = VisualTreeHelper.GetChild(root, i);
                    Image recursiveResult = AdaptFromTreeRecursiveHelper(childObject, depth - 1);
                    if (recursiveResult != null)
                    {
                        return recursiveResult;
                    }
                }
                return null;
            }
        }

void InfoProvider_RefreshCompleted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            animationHandler.RefreshCompletedAnimation(null, image);
        }

void InfoProvider_RefreshStarted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 106 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            image.CancelDirectManipulations();

            double executionRatio = 0.8f;
            if (infoProvider != null)
            {
                executionRatio = infoProvider.ExecutionRatio;
            }

            animationHandler.RefreshRequestedAnimation(null, image, executionRatio);
        }

bool IsOrientationVertical ( ) [inline, private]

Definition at line 158 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            return (refreshPullDirection == RefreshPullDirection.TopToBottom || refreshPullDirection == RefreshPullDirection.BottomToTop);
        }

void OnImagePointerPressed | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 119 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            if(e.Pointer.PointerDeviceType == PointerDeviceType.Touch)
            {
                visualInteractionSource.TryRedirectForManipulation(e.GetCurrentPoint(null));
                infoProvider.UpdateIsInteractingForRefresh(true);
            }
        }

void SetAnimations ( UIElement refreshVisualizerAnimatableContainer ) [inline]

Definition at line 64 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            animationHandler.InteractionTrackerAnimation(refreshVisualizerAnimatableContainer, image, interactionTracker);
        }

Member Data Documentation

IAdapterAnimationHandler animationHandler [private]

Definition at line 24 of file ImageIRefreshInfoProviderAdapter.cs.

Image image [private]

Definition at line 25 of file ImageIRefreshInfoProviderAdapter.cs.

RefreshInfoProviderImplementation infoProvider [private]

Definition at line 26 of file ImageIRefreshInfoProviderAdapter.cs.

InteractionTracker interactionTracker [private]

Definition at line 22 of file ImageIRefreshInfoProviderAdapter.cs.

RefreshPullDirection refreshPullDirection [private]

Definition at line 21 of file ImageIRefreshInfoProviderAdapter.cs.

VisualInteractionSource visualInteractionSource [private]

Definition at line 23 of file ImageIRefreshInfoProviderAdapter.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshContainer/TestUI/ImageIRefreshInfoProviderAdapter.cs
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImagePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ImagePage
Public Member Functions | Private Member Functions | Private Attributes

ImagePage Class Reference

List of all members.

Public Member Functions

ImagePage ()

Private Member Functions

void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnGetBitmapImageDecodePixelHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetBitmapImageDecodePixelWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetBitmapImageUriSource_Click (object sender, RoutedEventArgs e)
void | BtnGetImageActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetImageActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetImageDesiredHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetImageDesiredWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetImageHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetImageHorizontalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnGetImageMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetImageMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetImageMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetImageMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetImageMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetImageParentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetImageParentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetImageRenderHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetImageRenderWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetImageStretch_Click (object sender, RoutedEventArgs e)
void | BtnGetImageVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnGetImageWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetBitmapImageDecodePixelHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetBitmapImageDecodePixelWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetBitmapImageUriSource_Click (object sender, RoutedEventArgs e)
void | BtnSetImageHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetImageHorizontalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSetImageMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetImageMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetImageMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetImageMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetImageMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetImageParentHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetImageParentWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetImageStretch_Click (object sender, RoutedEventArgs e)
void | BtnSetImageVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSetImageWidth_Click (object sender, RoutedEventArgs e)
void | ChkImageParentProperties_Checked (object sender, RoutedEventArgs e)
void | ChkImageParentProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkImageProperties_Checked (object sender, RoutedEventArgs e)
void | ChkImageProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
Thickness | GetThicknessFromString (string thickness)
void | Image_ImageFailed (object sender, ExceptionRoutedEventArgs e)
void | Image_ImageOpened (object sender, RoutedEventArgs e)
void | ImagePage_Loaded (object sender, RoutedEventArgs e)
void | UpdateImage ()

Private Attributes

object | asyncEventReportingLock = new object()
int | imageIndex = 0
List< string > | lstAsyncEventMessage = new List<string>()

Detailed Description

Definition at line 13 of file ImagePage.xaml.cs.

Constructor & Destructor Documentation

ImagePage ( ) [inline]

Definition at line 19 of file ImagePage.xaml.cs.

        {
            this.InitializeComponent();

            image.ImageFailed += Image_ImageFailed;
            image.ImageOpened += Image_ImageOpened;

            Loaded += ImagePage_Loaded;
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 678 of file ImagePage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }
                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 711 of file ImagePage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 723 of file ImagePage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 728 of file ImagePage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnGetBitmapImageDecodePixelHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtBitmapImageDecodePixelHeight != null && image != null)
                {
                    txtBitmapImageDecodePixelHeight.Text = (image.Source as BitmapImage).DecodePixelHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetBitmapImageDecodePixelWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 119 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtBitmapImageDecodePixelWidth != null && image != null)
                {
                    txtBitmapImageDecodePixelWidth.Text = (image.Source as BitmapImage).DecodePixelWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetBitmapImageUriSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtBitmapImageUriSource != null)
                {
                    txtBitmapImageUriSource.Text = imageIndex.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 385 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageActualHeight != null && image != null)
                {
                    txtImageActualHeight.Text = image.ActualHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 241 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageActualWidth != null && image != null)
                {
                    txtImageActualWidth.Text = image.ActualWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageDesiredHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 401 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageDesiredHeight != null && image != null)
                {
                    txtImageDesiredHeight.Text = image.DesiredSize.Height.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageDesiredWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 257 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageDesiredWidth != null && image != null)
                {
                    txtImageDesiredWidth.Text = image.DesiredSize.Width.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 369 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageHeight != null && image != null)
                {
                    txtImageHeight.Text = image.Height.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageHorizontalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 481 of file ImagePage.xaml.cs.

        {
            try
            {
                if (image != null && cmbImageHorizontalAlignment != null)
                {
                    cmbImageHorizontalAlignment.SelectedIndex = (int) image.HorizontalAlignment;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 545 of file ImagePage.xaml.cs.

        {
            try
            {
                if (image != null && txtImageMargin != null)
                {
                    txtImageMargin.Text = image.Margin.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 353 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMaxHeight != null && image != null)
                {
                    txtImageMaxHeight.Text = image.MaxHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 209 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMaxWidth != null && image != null)
                {
                    txtImageMaxWidth.Text = image.MaxWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 337 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMinHeight != null && image != null)
                {
                    txtImageMinHeight.Text = image.MinHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 193 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMinWidth != null && image != null)
                {
                    txtImageMinWidth.Text = image.MinWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageParentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 593 of file ImagePage.xaml.cs.

        {
            try
            {
                if (imagePanel != null && txtImageParentHeight != null)
                {
                    txtImageParentHeight.Text = imagePanel.Height.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageParentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 577 of file ImagePage.xaml.cs.

        {
            try
            {
                if (imagePanel != null && txtImageParentWidth != null)
                {
                    txtImageParentWidth.Text = imagePanel.Width.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageRenderHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 417 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageRenderHeight != null && image != null)
                {
                    txtImageRenderHeight.Text = image.RenderSize.Height.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageRenderWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 273 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageRenderWidth != null && image != null)
                {
                    txtImageRenderWidth.Text = image.RenderSize.Width.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageStretch_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 161 of file ImagePage.xaml.cs.

        {
            try
            {
                if (cmbImageStretch != null && image != null)
                {
                    cmbImageStretch.SelectedIndex = (int) image.Stretch;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 497 of file ImagePage.xaml.cs.

        {
            try
            {
                if (image != null && cmbImageVerticalAlignment != null)
                {
                    cmbImageVerticalAlignment.SelectedIndex = (int)image.VerticalAlignment;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetImageWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 225 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageWidth != null && image != null)
                {
                    txtImageWidth.Text = image.Width.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetBitmapImageDecodePixelHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 156 of file ImagePage.xaml.cs.

        {
            UpdateImage();
        }

void BtnSetBitmapImageDecodePixelWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 135 of file ImagePage.xaml.cs.

        {
            UpdateImage();
        }

void BtnSetBitmapImageUriSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 114 of file ImagePage.xaml.cs.

        {
            UpdateImage();
        }

void BtnSetImageHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 465 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageHeight != null && !string.IsNullOrWhiteSpace(txtImageHeight.Text) && image != null)
                {
                    image.Height = double.Parse(txtImageHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageHorizontalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 513 of file ImagePage.xaml.cs.

        {
            try
            {
                if (image != null && cmbImageHorizontalAlignment != null)
                {
                    image.HorizontalAlignment = (HorizontalAlignment) cmbImageHorizontalAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 561 of file ImagePage.xaml.cs.

        {
            try
            {
                if (image != null && txtImageMargin != null)
                {
                    image.Margin = GetThicknessFromString(txtImageMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 449 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMaxHeight != null && !string.IsNullOrWhiteSpace(txtImageMaxHeight.Text) && image != null)
                {
                    image.MaxHeight = double.Parse(txtImageMaxHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 305 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMaxWidth != null && !string.IsNullOrWhiteSpace(txtImageMaxWidth.Text) && image != null)
                {
                    image.MaxWidth = double.Parse(txtImageMaxWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 433 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMinHeight != null && !string.IsNullOrWhiteSpace(txtImageMinHeight.Text) && image != null)
                {
                    image.MinHeight = double.Parse(txtImageMinHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 289 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageMinWidth != null && !string.IsNullOrWhiteSpace(txtImageMinWidth.Text) && image != null)
                {
                    image.MinWidth = double.Parse(txtImageMinWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageParentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 625 of file ImagePage.xaml.cs.

        {
            try
            {
                if (imagePanel != null && txtImageParentHeight != null)
                {
                    imagePanel.Height = double.Parse(txtImageParentHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageParentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 609 of file ImagePage.xaml.cs.

        {
            try
            {
                if (imagePanel != null && txtImageParentWidth != null)
                {
                    imagePanel.Width = double.Parse(txtImageParentWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageStretch_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 177 of file ImagePage.xaml.cs.

        {
            try
            {
                if (cmbImageStretch != null && image != null)
                {
                    image.Stretch = (Stretch) cmbImageStretch.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 529 of file ImagePage.xaml.cs.

        {
            try
            {
                if (image != null && cmbImageVerticalAlignment != null)
                {
                    image.VerticalAlignment = (VerticalAlignment) cmbImageVerticalAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetImageWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 321 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtImageWidth != null && !string.IsNullOrWhiteSpace(txtImageWidth.Text) && image != null)
                {
                    image.Width = double.Parse(txtImageWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void ChkImageParentProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 74 of file ImagePage.xaml.cs.

        {
            if (svImageParentProperties != null)
                svImageParentProperties.Visibility = Visibility.Visible;
        }

void ChkImageParentProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 80 of file ImagePage.xaml.cs.

        {
            if (svImageParentProperties != null)
                svImageParentProperties.Visibility = Visibility.Collapsed;
        }

void ChkImageProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 62 of file ImagePage.xaml.cs.

        {
            if (svImageProperties != null)
                svImageProperties.Visibility = Visibility.Visible;
        }

void ChkImageProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file ImagePage.xaml.cs.

        {
            if (svImageProperties != null)
                svImageProperties.Visibility = Visibility.Collapsed;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 86 of file ImagePage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 92 of file ImagePage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 733 of file ImagePage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void Image_ImageFailed | ( | object | sender,
 |  | ExceptionRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 57 of file ImagePage.xaml.cs.

        {
            AppendAsyncEventMessage($"Image_ImageFailed ErrorMessage={e.ErrorMessage}");
        }

void Image_ImageOpened | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 52 of file ImagePage.xaml.cs.

        {
            AppendAsyncEventMessage("Image_ImageOpened");
        }

void ImagePage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 29 of file ImagePage.xaml.cs.

        {
            UpdateImage();

            BtnGetImageMinWidth_Click(null, null);
            BtnGetImageMaxWidth_Click(null, null);
            BtnGetImageWidth_Click(null, null);
            BtnGetImageActualWidth_Click(null, null);
            BtnGetImageDesiredWidth_Click(null, null);
            BtnGetImageMinHeight_Click(null, null);
            BtnGetImageMaxHeight_Click(null, null);
            BtnGetImageHeight_Click(null, null);
            BtnGetImageActualHeight_Click(null, null);
            BtnGetImageDesiredHeight_Click(null, null);
            BtnGetImageRenderWidth_Click(null, null);
            BtnGetImageRenderHeight_Click(null, null);
            BtnGetImageHorizontalAlignment_Click(null, null);
            BtnGetImageVerticalAlignment_Click(null, null);
            BtnGetImageMargin_Click(null, null);
            BtnGetImageParentWidth_Click(null, null);
            BtnGetImageParentHeight_Click(null, null);
        }

void UpdateImage ( ) [inline, private]

Definition at line 641 of file ImagePage.xaml.cs.

        {
            try
            {
                if (txtBitmapImageUriSource != null &&
                    txtBitmapImageDecodePixelWidth != null &&
                    txtBitmapImageDecodePixelHeight != null)
                {
                    int imageIndexTemp = int.Parse(txtBitmapImageUriSource.Text);

                    if (imageIndexTemp >= 1 && imageIndexTemp <= 126)
                    {
                        imageIndex = imageIndexTemp;

                        Uri uri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", imageIndex));

                        BitmapImage bitmapImage = new BitmapImage() {
                            DecodePixelWidth = int.Parse(txtBitmapImageDecodePixelWidth.Text),
                            DecodePixelHeight = int.Parse(txtBitmapImageDecodePixelHeight.Text),
                            UriSource = uri
                        };

                        image.Source = bitmapImage;
                    }
                    else
                    {
                        AppendAsyncEventMessage("Image number out of bounds. Pick a number between 1 and 126.");
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

Member Data Documentation

object asyncEventReportingLock = new object() [private]

Definition at line 15 of file ImagePage.xaml.cs.

int imageIndex = 0 [private]

Definition at line 17 of file ImagePage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 16 of file ImagePage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ImagePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadgePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • InfoBadgePage
Public Member Functions | Private Member Functions | Private Attributes

InfoBadgePage Class Reference

List of all members.

Public Member Functions

InfoBadgePage ()
void | IconComboBoxSelectionChanged (object sender, SelectionChangedEventArgs args)
void | OnClearForegroundButtonClicked (object sender, RoutedEventArgs args)
void | OnForegroundToNullButtonClicked (object sender, RoutedEventArgs args)
void | OnIconForegroundColorPickerColorChanged (object sender, ColorChangedEventArgs args)

Private Member Functions

AnimatedIconSource MakeAnimatedIcon ()
BitmapIconSource | MakeBitmapIcon ()
FontIconSource | MakeFontIcon ()
ImageIconSource MakeImageIcon ()
PathIconSource | MakePathIcon ()
SymbolIconSource | MakeSymbolIcon ()
void | UpdateIcon (IconSource iconSource)

Private Attributes

SolidColorBrush | iconForegroundBrush = new SolidColorBrush()
IconSource | pageIconSource = null

Detailed Description

Definition at line 27 of file InfoBadgePage.xaml.cs.

Constructor & Destructor Documentation

InfoBadgePage ( ) [inline]

Definition at line 32 of file InfoBadgePage.xaml.cs.

        {
            this.InitializeComponent();
            iconForegroundBrush.Color = IconForegroundColorPicker.Color;
        }

Member Function Documentation

void IconComboBoxSelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 38 of file InfoBadgePage.xaml.cs.

        {
            if (IconComboBox.SelectedItem == this.NullIcon)
            {
                UpdateIcon(null);
            }
            else if (IconComboBox.SelectedItem == this.FontIcon)
            {
                UpdateIcon(MakeFontIcon());
            }
            else if (IconComboBox.SelectedItem == this.BitmapIcon)
            {
                UpdateIcon(MakeBitmapIcon());
            }
            else if (IconComboBox.SelectedItem == this.ImageIcon)
            {
                UpdateIcon(MakeImageIcon());
            }
            else if (IconComboBox.SelectedItem == this.SymbolIcon)
            {
                UpdateIcon(MakeSymbolIcon());
            }
            else if (IconComboBox.SelectedItem == this.PathIcon)
            {
                UpdateIcon(MakePathIcon());
            }
            else if (IconComboBox.SelectedItem == this.AnimatedIcon)
            {
                UpdateIcon(MakeAnimatedIcon());
            }
        }

AnimatedIconSource MakeAnimatedIcon ( ) [inline, private]

Definition at line 147 of file InfoBadgePage.xaml.cs.

        {
            AnimatedIconSource iconSource = new AnimatedIconSource();
            iconSource.Source = new AnimatedSettingsVisualSource();
            iconSource.FallbackIconSource = new SymbolIconSource { Symbol = Symbol.Setting, Foreground = iconForegroundBrush };
            iconSource.Foreground = iconForegroundBrush;
            return iconSource;
        }

BitmapIconSource MakeBitmapIcon ( ) [inline, private]

Definition at line 110 of file InfoBadgePage.xaml.cs.

        {
            BitmapIconSource iconSource = new BitmapIconSource();
            iconSource.ShowAsMonochrome = false;
            Uri uri = new Uri("ms-appx:/Assets/ingredient1.png");
            iconSource.UriSource = uri;
            iconSource.Foreground = iconForegroundBrush;
            return iconSource;
        }

FontIconSource MakeFontIcon ( ) [inline, private]

Definition at line 101 of file InfoBadgePage.xaml.cs.

        {
            FontIconSource iconSource = new FontIconSource();
            iconSource.Glyph = "99+";
            iconSource.FontFamily = new FontFamily("XamlAutoFontFamily");
            iconSource.Foreground = iconForegroundBrush;
            return iconSource;
        }

ImageIconSource MakeImageIcon ( ) [inline, private]

Definition at line 120 of file InfoBadgePage.xaml.cs.

        {
            ImageIconSource iconSource = new ImageIconSource();
            var uri = new Uri("https://raw.githubusercontent.com/DiemenDesign/LibreICONS/master/svg-color/libre-camera-panorama.svg");
            iconSource.ImageSource = new SvgImageSource(uri);
            iconSource.Foreground = iconForegroundBrush;
            return iconSource;
        }

PathIconSource MakePathIcon ( ) [inline, private]

Definition at line 137 of file InfoBadgePage.xaml.cs.

        {
            PathIconSource iconSource = new PathIconSource();
            var geometry = new RectangleGeometry();
            geometry.Rect = new Windows.Foundation.Rect { Width=5, Height=2, X=0, Y=0 };
            iconSource.Data = geometry;
            iconSource.Foreground = iconForegroundBrush;
            return iconSource;
        }

SymbolIconSource MakeSymbolIcon ( ) [inline, private]

Definition at line 129 of file InfoBadgePage.xaml.cs.

        {
            SymbolIconSource iconSource = new SymbolIconSource();
            iconSource.Symbol = Symbol.Setting;
            iconSource.Foreground = iconForegroundBrush;
            return iconSource;
        }

void OnClearForegroundButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 87 of file InfoBadgePage.xaml.cs.

        {
            if (pageIconSource != null)
            {
                pageIconSource.ClearValue(IconSource.ForegroundProperty);
            }
        }

void OnForegroundToNullButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 79 of file InfoBadgePage.xaml.cs.

        {
            if (pageIconSource != null)
            {
                pageIconSource.Foreground = null;
            }
        }

void OnIconForegroundColorPickerColorChanged | ( | object | sender,
 |  | ColorChangedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 70 of file InfoBadgePage.xaml.cs.

        {
            iconForegroundBrush.Color = args.NewColor;
            if (pageIconSource != null)
            {
                pageIconSource.Foreground = iconForegroundBrush;
            }
        }

void UpdateIcon ( IconSource iconSource ) [inline, private]

Definition at line 95 of file InfoBadgePage.xaml.cs.

        {
            pageIconSource = iconSource;
            DynamicInfoBadge.IconSource = iconSource;
        }

Member Data Documentation

SolidColorBrush iconForegroundBrush = new SolidColorBrush() [private]

Definition at line 30 of file InfoBadgePage.xaml.cs.

IconSource pageIconSource = null [private]

Definition at line 29 of file InfoBadgePage.xaml.cs.

The documentation for this class was generated from the following file:
  • InfoBadge/TestUI/InfoBadgePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfobarAxeTestage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • InfobarAxeTestage
Public Member Functions

InfobarAxeTestage Class Reference

List of all members.

Public Member Functions

InfobarAxeTestage ()

Detailed Description

Definition at line 6 of file InfobarAxeTestage.xaml.cs.

Constructor & Destructor Documentation

InfobarAxeTestage ( ) [inline]

Definition at line 8 of file InfobarAxeTestage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • InfoBar/TestUI/InfobarAxeTestage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • InfoBarPage
Public Member Functions | Private Member Functions | Private Attributes

InfoBarPage Class Reference

List of all members.

Public Member Functions

InfoBarPage ()
void | ClearButtonClick (object sender, object args)
void | CloseStyleChanged (object sender, object args)
void | CustomBackgroundChanged (object sender, object args)
void | HasCustomContentChanged (object sender, object args)
void | OnCloseButtonClick (object sender, object args)
void | OnClosed (object sender, InfoBarClosedEventArgs args)
void | OnClosing (object sender, InfoBarClosingEventArgs args)
void | SetForegroundClick (object sender, object args)

Private Member Functions

void | ActionButton_Click (object sender, RoutedEventArgs e)
void | ActionButtonComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | AddInfoBarClick (object sender, object args)
void | CollapseActionButtonAsynchronouslyClick (object sender, object args)
void | CollapseActionButtonProperty ()
void | DisableActionButtonAsynchronouslyClick (object sender, object args)
void | DisableActionButtonProperty ()
void | DiscardActionButton ()
void | IconComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | RemoveInfoBarAsynchronouslyClick (object sender, object args)
void | ResetActionButtonAsynchronouslyClick (object sender, object args)
void | ResetActionButtonProperty ()
void | SeverityComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | StartAsynchronousAction (int timerAction)
void | Timer_Tick (object sender, object e)

Private Attributes

ButtonBase | _actionButton = null
DispatcherTimer | _timer = new DispatcherTimer()
int | _timerAction = 0

Detailed Description

Definition at line 18 of file InfoBarPage.xaml.cs.

Constructor & Destructor Documentation

InfoBarPage ( ) [inline]

Definition at line 24 of file InfoBarPage.xaml.cs.

        {
            this.InitializeComponent();

            _timer.Interval = new TimeSpan(0, 0, 8 /*sec*/);
            _timer.Tick += Timer_Tick;
        }

Member Function Documentation

void ActionButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 107 of file InfoBarPage.xaml.cs.

        {
            EventListBox.Items.Add("ActionButtonClick");

            if (RemoveActionButtonOnInvokeCheckBox.IsChecked.Value)
            {
                ResetActionButtonProperty();
            }
        }

void ActionButtonComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 57 of file InfoBarPage.xaml.cs.

        {
            if (TestInfoBar == null) return;

            DiscardActionButton();

            if (ActionButtonComboBox.SelectedIndex == 0)
            {
                TestInfoBar.ActionButton = null;
            }
            else if (ActionButtonComboBox.SelectedIndex == 1)
            {
                var button = new Button();
                button.Content = "Action";
                button.Click += ActionButton_Click;
                _actionButton = TestInfoBar.ActionButton = button;
            }
            else if (ActionButtonComboBox.SelectedIndex == 2)
            {
                var link = new HyperlinkButton();
                link.NavigateUri = new Uri("http://www.microsoft.com/");
                link.Content = "Informational link";
                link.Click += ActionButton_Click;
                _actionButton = TestInfoBar.ActionButton = link;
            }
            else if (ActionButtonComboBox.SelectedIndex == 3)
            {
                var button = new Button();
                button.Content = "Action";
                button.HorizontalAlignment = HorizontalAlignment.Right;
                button.Click += ActionButton_Click;
                _actionButton = TestInfoBar.ActionButton = button;
            }
            else if (ActionButtonComboBox.SelectedIndex == 4)
            {
                var link = new HyperlinkButton();
                link.NavigateUri = new Uri("http://www.microsoft.com/");
                link.Content = "Informational link";
                link.HorizontalAlignment = HorizontalAlignment.Right;
                link.Click += ActionButton_Click;
                _actionButton = TestInfoBar.ActionButton = link;
            }

            if (_actionButton != null)
            {
                // Workaround for GitHub Issue #4531.
                _actionButton.TabIndex = 1;
            }
        }

void AddInfoBarClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 244 of file InfoBarPage.xaml.cs.

        {
            InfoBarParent.Children.Insert(0, TestInfoBar);
            AddInfoBarButton.IsEnabled = false;
            CollpaseActionButtonAsynchronouslyButton.IsEnabled = true;
            DisableActionButtonAsynchronouslyButton.IsEnabled = true;
            ResetActionButtonAsynchronouslyButton.IsEnabled = true;
            RemoveInfoBarAsynchronouslyButton.IsEnabled = true;
        }

void ClearButtonClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 224 of file InfoBarPage.xaml.cs.

        {
            EventListBox.Items.Clear();
        }

void CloseStyleChanged | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 292 of file InfoBarPage.xaml.cs.

        {
            if (CloseButtonStyleCheckBox.IsChecked.Value)
            {
                TestInfoBar.CloseButtonStyle = this.Resources["CustomCloseButtonStyle"] as Style;
            }
            else
            {
                TestInfoBar.CloseButtonStyle = Application.Current.Resources["InfoBarCloseButtonStyle"] as Style;
            }
        }

void CollapseActionButtonAsynchronouslyClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 229 of file InfoBarPage.xaml.cs.

        {
            StartAsynchronousAction(0);
        }

void CollapseActionButtonProperty ( ) [inline, private]

Definition at line 117 of file InfoBarPage.xaml.cs.

        {
            if (_actionButton != null)
            {
                _actionButton.Visibility = Visibility.Collapsed;
            }
        }

void CustomBackgroundChanged | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 304 of file InfoBarPage.xaml.cs.

        {
            if (CustomBackgroundCheckBox.IsChecked.Value)
            {
                TestInfoBar.Background = new SolidColorBrush(Microsoft.UI.Colors.Purple);
            }
            else
            {
                TestInfoBar.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
            }
        }

void DisableActionButtonAsynchronouslyClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 234 of file InfoBarPage.xaml.cs.

        {
            StartAsynchronousAction(1);
        }

void DisableActionButtonProperty ( ) [inline, private]

Definition at line 125 of file InfoBarPage.xaml.cs.

        {
            if (_actionButton != null)
            {
                _actionButton.IsEnabled = false;
            }
        }

void DiscardActionButton ( ) [inline, private]

Definition at line 138 of file InfoBarPage.xaml.cs.

        {
            if (_actionButton != null)
            {
                _actionButton.Click -= ActionButton_Click;
                _actionButton = null;
            }
        }

void HasCustomContentChanged | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 276 of file InfoBarPage.xaml.cs.

        {
            if (HasCustomContentCheckBox.IsChecked.Value)
            {
                var content = new CheckBox();
                content.Content = "Custom Content";
                content.Margin = new Thickness(0, 0, 0, 6);
                AutomationProperties.SetName(content, "CustomContentCheckBox");
                TestInfoBar.Content = content;
            }
            else
            {
                TestInfoBar.Content = null;
            }
        }

void IconComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 185 of file InfoBarPage.xaml.cs.

        {
            if (TestInfoBar == null) return;

            switch (e.AddedItems[0].ToString())
            {
                case "Custom Icon":
                    SymbolIconSource symbolIcon = new SymbolIconSource();
                    symbolIcon.Symbol = Symbol.Pin;
                    TestInfoBar.IconSource = (IconSource)symbolIcon;
                    break;

                case "Default Icon":
                default:
                    TestInfoBar.IconSource = null;
                    break;
            }
        }

void OnCloseButtonClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 204 of file InfoBarPage.xaml.cs.

        {
            EventListBox.Items.Add("CloseButtonClick");
        }

void OnClosed | ( | object | sender,
 |  | InfoBarClosedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 219 of file InfoBarPage.xaml.cs.

        {
            EventListBox.Items.Add("Closed: " + args.Reason);
        }

void OnClosing | ( | object | sender,
 |  | InfoBarClosingEventArgs | args |
 | ) |  |  | [inline]

Definition at line 209 of file InfoBarPage.xaml.cs.

        {
            EventListBox.Items.Add("Closing: " + args.Reason);

            if (CancelCheckBox.IsChecked.Value)
            {
                args.Cancel = true;
            }
        }

void RemoveInfoBarAsynchronouslyClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 254 of file InfoBarPage.xaml.cs.

        {
            StartAsynchronousAction(3);
        }

void ResetActionButtonAsynchronouslyClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 239 of file InfoBarPage.xaml.cs.

        {
            StartAsynchronousAction(2);
        }

void ResetActionButtonProperty ( ) [inline, private]

Definition at line 133 of file InfoBarPage.xaml.cs.

        {
            ActionButtonComboBox.SelectedIndex = 0;
        }

void SetForegroundClick | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 271 of file InfoBarPage.xaml.cs.

        {
            TestInfoBar.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Red);
        }

void SeverityComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 32 of file InfoBarPage.xaml.cs.

        {
            string severityName = e.AddedItems[0].ToString();

            switch (severityName)
            {
                case "Error":
                    TestInfoBar.Severity = InfoBarSeverity.Error;
                    break;

                case "Warning":
                    TestInfoBar.Severity = InfoBarSeverity.Warning;
                    break;

                case "Success":
                    TestInfoBar.Severity = InfoBarSeverity.Success;
                    break;

                case "Informational":
                default:
                    TestInfoBar.Severity = InfoBarSeverity.Informational;
                    break;
            }
        }

void StartAsynchronousAction ( int timerAction ) [inline, private]

Definition at line 259 of file InfoBarPage.xaml.cs.

        {
            _timer.Start();
            _timerAction = timerAction;

            CollpaseActionButtonAsynchronouslyButton.IsEnabled = false;
            DisableActionButtonAsynchronouslyButton.IsEnabled = false;
            ResetActionButtonAsynchronouslyButton.IsEnabled = false;
            AddInfoBarButton.IsEnabled = false;
            RemoveInfoBarAsynchronouslyButton.IsEnabled = false;
        }

void Timer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 147 of file InfoBarPage.xaml.cs.

        {
            _timer.Stop();

            switch (_timerAction)
            {
                case 0:
                    CollapseActionButtonProperty();
                    break;
                case 1:
                    DisableActionButtonProperty();
                    break;
                case 2:
                    ResetActionButtonProperty();
                    break;
                case 3:
                    InfoBarParent.Children.Remove(TestInfoBar);
                    AddInfoBarButton.IsEnabled = true;
                    RemoveInfoBarAsynchronouslyButton.IsEnabled = false;
                    break;
            }

            switch (_timerAction)
            {
                case 0:
                case 1:
                case 2:
                    CollpaseActionButtonAsynchronouslyButton.IsEnabled = true;
                    DisableActionButtonAsynchronouslyButton.IsEnabled = true;
                    ResetActionButtonAsynchronouslyButton.IsEnabled = true;
                    RemoveInfoBarAsynchronouslyButton.IsEnabled = true;
                    break;
                case 3:
                    AddInfoBarButton.IsEnabled = true;
                    break;
            }
        }

Member Data Documentation

ButtonBase _actionButton = null [private]

Definition at line 20 of file InfoBarPage.xaml.cs.

DispatcherTimer _timer = new DispatcherTimer() [private]

Definition at line 21 of file InfoBarPage.xaml.cs.

int _timerAction = 0 [private]

Definition at line 22 of file InfoBarPage.xaml.cs.

The documentation for this class was generated from the following file:
  • InfoBar/TestUI/InfoBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Ingredient Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Ingredient
Public Member Functions | Properties

Ingredient Class Reference

List of all members.

Public Member Functions

Ingredient ()
Ingredient (string name, string amount, string photo)

Properties

string | Amount [get, set]
string | Name [get, set]
string | Photo [get, set]

Detailed Description

Definition at line 6 of file Ingredient.cs.

Constructor & Destructor Documentation

Ingredient ( ) [inline]

Definition at line 12 of file Ingredient.cs.

{ }

Ingredient | ( | string | name,
 |  | string | amount,
 |  | string | photo |
 | ) |  |  | [inline]

Definition at line 14 of file Ingredient.cs.

        {
            this.Name = name;
            this.Amount = amount;
            this.Photo = photo;
        }

Property Documentation

string Amount [get, set]

Definition at line 9 of file Ingredient.cs.

string Name [get, set]

Definition at line 8 of file Ingredient.cs.

string Photo [get, set]

Definition at line 10 of file Ingredient.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/Ingredient.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolbarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • InkToolbarPage
Public Member Functions | Private Attributes

InkToolbarPage Class Reference

List of all members.

Public Member Functions

InkToolbarPage ()

Private Attributes

InkPresenter _inkPresenter

Detailed Description

Definition at line 11 of file InkToolbarPage.xaml.cs.

Constructor & Destructor Documentation

InkToolbarPage ( ) [inline]

Definition at line 15 of file InkToolbarPage.xaml.cs.

        {
            this.InitializeComponent();
            _inkPresenter = inkCanvas.InkPresenter;
            _inkPresenter.InputDeviceTypes =
            CoreInputDeviceTypes.Mouse | CoreInputDeviceTypes.Pen | CoreInputDeviceTypes.Touch;
        }

Member Data Documentation

InkPresenter _inkPresenter [private]

Definition at line 13 of file InkToolbarPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/InkToolbarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IScrollControllerAdapter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • IScrollControllerAdapter
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

IScrollControllerAdapter Class Reference

List of all members.

Public Member Functions

IScrollControllerAdapter (ScrollViewer sv, IScrollController scrollController)

Private Member Functions

void | _scrollController_AddScrollVelocityRequested (IScrollController sender, ScrollControllerAddScrollVelocityRequestedEventArgs args)
void | _scrollController_ScrollByRequested (IScrollController sender, ScrollControllerScrollByRequestedEventArgs args)
void | _scrollController_ScrollToRequested (IScrollController sender, ScrollControllerScrollToRequestedEventArgs args)
void | pageScrollViewer_SizeChanged (object sender, object e)
void | pageScrollViewer_ViewChanged (object sender, object e)
void | SetUpBridge ()

Private Attributes

IScrollController | _scrollController
ScrollViewer | _scrollViewer

Static Private Attributes

static double | s_velocityNeededPerPixel = 3.688880455092886

Detailed Description

Definition at line 17 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

Constructor & Destructor Documentation

IScrollControllerAdapter | ( | ScrollViewer | sv,
 |  | IScrollController | scrollController |
 | ) |  |  | [inline]

Definition at line 27 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            _scrollViewer = sv;
            _scrollController = scrollController;
            SetUpBridge();
        }

Member Function Documentation

void _scrollController_AddScrollVelocityRequested | ( | IScrollController | sender,
 |  | ScrollControllerAddScrollVelocityRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 45 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            var offsetDelta = args.OffsetVelocity / s_velocityNeededPerPixel;
            var newOffset = _scrollViewer.VerticalOffset + offsetDelta;
            newOffset = Math.Max(0, newOffset);
            newOffset = Math.Min(_scrollViewer.ScrollableHeight, newOffset);
            _scrollViewer.ChangeView(null, newOffset, null, false /*disableAnimation*/);
        }

void _scrollController_ScrollByRequested | ( | IScrollController | sender,
 |  | ScrollControllerScrollByRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 54 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            var newOffset = _scrollViewer.VerticalOffset + args.OffsetDelta;
            newOffset = Math.Max(0, newOffset);
            newOffset = Math.Min(_scrollViewer.ScrollableHeight, newOffset);
            _scrollViewer.ChangeView(null, newOffset, null, false /*disableAnimation*/);
        }

void _scrollController_ScrollToRequested | ( | IScrollController | sender,
 |  | ScrollControllerScrollToRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 62 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            _scrollViewer.ChangeView(null, args.Offset, null, true /*disableAnimation*/);
        }

void pageScrollViewer_SizeChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 67 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            _scrollController.SetValues(0, _scrollViewer.ScrollableHeight, _scrollViewer.VerticalOffset, _scrollViewer.ViewportHeight);
        }

void pageScrollViewer_ViewChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 72 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            _scrollController.SetValues(0, _scrollViewer.ScrollableHeight, _scrollViewer.VerticalOffset, _scrollViewer.ViewportHeight);
        }

void SetUpBridge ( ) [inline, private]

Definition at line 34 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

        {
            _scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            _scrollViewer.ViewChanged += pageScrollViewer_ViewChanged;
            _scrollViewer.SizeChanged += pageScrollViewer_SizeChanged;

            _scrollController.ScrollToRequested += _scrollController_ScrollToRequested;
            _scrollController.ScrollByRequested += _scrollController_ScrollByRequested;
            _scrollController.AddScrollVelocityRequested += _scrollController_AddScrollVelocityRequested;
        }

Member Data Documentation

IScrollController _scrollController [private]

Definition at line 20 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

ScrollViewer _scrollViewer [private]

Definition at line 19 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

double s_velocityNeededPerPixel = 3.688880455092886 [static, private]

Definition at line 25 of file AnnotatedScrollBarRangeBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/TestUI/AnnotatedScrollBarRangeBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerLayoutPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemContainerLayoutPage
Public Member Functions | Private Member Functions

ItemContainerLayoutPage Class Reference

List of all members.

Public Member Functions

ItemContainerLayoutPage ()

Private Member Functions

void ItemContainerLayoutPage_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 17 of file ItemContainerLayoutPage.xaml.cs.

Constructor & Destructor Documentation

ItemContainerLayoutPage ( ) [inline]

Definition at line 19 of file ItemContainerLayoutPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += ItemContainerLayoutPage_Loaded;
        }

Member Function Documentation

void ItemContainerLayoutPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 25 of file ItemContainerLayoutPage.xaml.cs.

        {
            // Workaround for xaml parsing error crash: Bug 41701000
            itemContainer3.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
            itemContainer4.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
            itemContainer13.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
            itemContainer14.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
            itemContainer23.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
            itemContainer24.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
        }

The documentation for this class was generated from the following file:
  • ItemContainer/TestUI/ItemContainerLayoutPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemContainerPage
Public Member Functions | Private Member Functions

ItemContainerPage Class Reference

List of all members.

Public Member Functions

ItemContainerPage ()

Private Member Functions

void CmbItemContainerOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 14 of file ItemContainerPage.xaml.cs.

Constructor & Destructor Documentation

ItemContainerPage ( ) [inline]

Definition at line 16 of file ItemContainerPage.xaml.cs.

        {
            LogController.InitializeLogging();
            this.InitializeComponent();

            navigateToSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemContainerSummaryPage), 0); };
            navigateToLayout.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemContainerLayoutPage), 0); };
        }

Member Function Documentation

void CmbItemContainerOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 25 of file ItemContainerPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                "ItemContainer",
                cmbItemContainerOutputDebugStringLevel.SelectedIndex == 1 || cmbItemContainerOutputDebugStringLevel.SelectedIndex == 2,
                cmbItemContainerOutputDebugStringLevel.SelectedIndex == 2);
        }

The documentation for this class was generated from the following file:
  • ItemContainer/TestUI/ItemContainerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerSummaryPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemContainerSummaryPage
Public Member Functions | Private Member Functions

ItemContainerSummaryPage Class Reference

List of all members.

Public Member Functions

ItemContainerSummaryPage ()

Private Member Functions

void | BtnGetIsSelected_Click (object sender, RoutedEventArgs e)
void | CanUserInvokeComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CanUserSelectComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | HeartButton_Click (object sender, RoutedEventArgs e)
void | IsEnabledComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | IsMultiSelectComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | IsSelectedComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ItemContainerSummaryPage_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 17 of file ItemContainerSummaryPage.xaml.cs.

Constructor & Destructor Documentation

ItemContainerSummaryPage ( ) [inline]

Definition at line 23 of file ItemContainerSummaryPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += ItemContainerSummaryPage_Loaded;

#if MUX_PRERELEASE
            RoutedEventsItemContainer.ItemInvoked += ItemContainer_OnItemInvoked;
            ItemContainerWithButtons.ItemInvoked += ItemContainer_OnItemInvoked;
#endif
        }

Member Function Documentation

void BtnGetIsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file ItemContainerSummaryPage.xaml.cs.

        {
            IsSelectedTextBlock.Text = RoutedEventsItemContainer.IsSelected.ToString();
        }

void CanUserInvokeComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 168 of file ItemContainerSummaryPage.xaml.cs.

        {
#if MUX_PRERELEASE
            string CanUserInvokeName = e.AddedItems[0].ToString();
            ItemContainerUserInvokeMode canUserInvoke;

            switch (CanUserInvokeName)
            {
                case "Auto":
                    canUserInvoke = ItemContainerUserInvokeMode.Auto;
                    break;
                case "UserCanInvoke":
                    canUserInvoke = ItemContainerUserInvokeMode.UserCanInvoke;
                    break;
                case "UserCannotInvoke":
                    canUserInvoke = ItemContainerUserInvokeMode.UserCannotInvoke;
                    break;
                default:
                    throw new Exception($"Invalid argument: {CanUserInvokeName}");
            }

            RoutedEventsItemContainer.CanUserInvoke = canUserInvoke;
#endif
        }

void CanUserSelectComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 142 of file ItemContainerSummaryPage.xaml.cs.

        {
#if MUX_PRERELEASE
            ComboBoxItem selectedItem = CanUserSelectComboBox.SelectedItem as ComboBoxItem;
            string CanUserSelectName = selectedItem.Content.ToString();
            ItemContainerUserSelectMode canUserSelect;

            switch (CanUserSelectName)
            {
                case "Auto":
                    canUserSelect = ItemContainerUserSelectMode.Auto;
                    break;
                case "UserCanSelect":
                    canUserSelect = ItemContainerUserSelectMode.UserCanSelect;
                    break;
                case "UserCannotSelect":
                    canUserSelect = ItemContainerUserSelectMode.UserCannotSelect;
                    break;
                default:
                    throw new Exception($"Invalid argument: {CanUserSelectName}");
            }

            RoutedEventsItemContainer.CanUserSelect = canUserSelect;
#endif
        }

void HeartButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 137 of file ItemContainerSummaryPage.xaml.cs.

        {
            //HeartToggleButtonHandled = true;
        }

void IsEnabledComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file ItemContainerSummaryPage.xaml.cs.

        {
            string isEnabledName = e.AddedItems[0].ToString();
            bool isEnabled;

            switch (isEnabledName)
            {
                case "True":
                    isEnabled = true;
                    break;
                case "False":
                    isEnabled = false;
                    break;
                default:
                    throw new Exception($"Invalid argument: {isEnabledName}");
            }

            RoutedEventsItemContainer.IsEnabled = isEnabled;
        }

void IsMultiSelectComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 69 of file ItemContainerSummaryPage.xaml.cs.

        {
#if MUX_PRERELEASE
            string multiSelectName = e.AddedItems[0].ToString();
            ItemContainerMultiSelectMode multiSelectMode;

            switch (multiSelectName)
            {
                case "Auto":
                    multiSelectMode = ItemContainerMultiSelectMode.Auto;
                    break;
                case "Single":
                    multiSelectMode = ItemContainerMultiSelectMode.Single;
                    break;
                case "Extended":
                    multiSelectMode = ItemContainerMultiSelectMode.Extended;
                    break;
                case "Multiple":
                    multiSelectMode = ItemContainerMultiSelectMode.Multiple;
                    break;
                default:
                    throw new Exception($"Invalid argument: {multiSelectName}");
            }

            RoutedEventsItemContainer.MultiSelectMode = multiSelectMode;
#endif
        }

void IsSelectedComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 97 of file ItemContainerSummaryPage.xaml.cs.

        {
            string isSelectedName = e.AddedItems[0].ToString();
            bool isSelected;

            switch (isSelectedName)
            {
                case "True":
                    isSelected = true;
                    break;
                case "False":
                    isSelected = false;
                    break;
                default:
                    throw new Exception($"Invalid argument: {isSelectedName}");
            }

            RoutedEventsItemContainer.IsSelected = isSelected;
        }

void ItemContainerSummaryPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file ItemContainerSummaryPage.xaml.cs.

        {
            // Workaround for xaml parsing error crash: Bug 41701000
#if MUX_PRERELEASE
            ItemContainerWithButtons.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
#endif
        }

The documentation for this class was generated from the following file:
  • ItemContainer/TestUI/ItemContainerSummaryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsControlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsControlPage
Public Member Functions

ItemsControlPage Class Reference

List of all members.

Public Member Functions

ItemsControlPage ()

Detailed Description

Definition at line 9 of file ItemsControlPage.xaml.cs.

Constructor & Destructor Documentation

ItemsControlPage ( ) [inline]

Definition at line 11 of file ItemsControlPage.xaml.cs.

        {
            this.InitializeComponent();

            navigateToFlatItemsControl.Click += delegate { Frame.NavigateWithoutAnimation(typeof(FlatItemsControlPage)); };
            navigateToGroupedItemsControl.Click += delegate { Frame.NavigateWithoutAnimation(typeof(GroupedItemsControlPage)); };
            navigateToNestedItemsControls.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NestedItemsControlsPage)); };
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ItemsControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewBlankPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewBlankPage
Public Member Functions | Private Member Functions | Private Attributes

ItemsViewBlankPage Class Reference

List of all members.

Public Member Functions

ItemsViewBlankPage ()

Private Member Functions

void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | ChkCustomUI_Checked (object sender, RoutedEventArgs e)
void | ChkCustomUI_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ItemsRepeater_Loaded (object sender, RoutedEventArgs e)
void | ItemsRepeater_SizeChanged (object sender, SizeChangedEventArgs e)
void | ItemsView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ItemsView_GotFocus (object sender, RoutedEventArgs e)
void | ItemsView_Loaded (object sender, RoutedEventArgs e)
void | ItemsView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ItemsView_LostFocus (object sender, RoutedEventArgs e)
void | ItemsView_SizeChanged (object sender, SizeChangedEventArgs e)
void | LogItemsRepeaterInfo ()
void | LogItemsViewInfo ()
void | LogScrollViewInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_Loaded (object sender, RoutedEventArgs e)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompleted (ScrollView sender, ScrollingZoomCompletedEventArgs args)

Private Attributes

object | asyncEventReportingLock = new object()
List< string > | lstAsyncEventMessage = new List<string>()

Detailed Description

Definition at line 11 of file ItemsViewBlankPage.xaml.cs.

Constructor & Destructor Documentation

ItemsViewBlankPage ( ) [inline]

Definition at line 16 of file ItemsViewBlankPage.xaml.cs.

        {
            this.InitializeComponent();

            if (chkLogItemsViewMessages.IsChecked == true || chkLogScrollViewMessages.IsChecked == true || chkLogItemsRepeaterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogItemsRepeaterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogItemsViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 393 of file ItemsViewBlankPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }
                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 426 of file ItemsViewBlankPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 438 of file ItemsViewBlankPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 218 of file ItemsViewBlankPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void ChkCustomUI_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 39 of file ItemsViewBlankPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Visible;
        }

void ChkCustomUI_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file ItemsViewBlankPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Collapsed;
        }

void ChkLogItemsRepeaterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 223 of file ItemsViewBlankPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    itemsRepeater.Loaded += ItemsRepeater_Loaded;
                    itemsRepeater.SizeChanged += ItemsRepeater_SizeChanged;
                }
            }
        }

void ChkLogItemsRepeaterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 237 of file ItemsViewBlankPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    itemsRepeater.Loaded -= ItemsRepeater_Loaded;
                    itemsRepeater.SizeChanged -= ItemsRepeater_SizeChanged;
                }
            }
        }

void ChkLogItemsRepeaterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 319 of file ItemsViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 326 of file ItemsViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 293 of file ItemsViewBlankPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.GettingFocus += ItemsView_GettingFocus;
                itemsView.GotFocus += ItemsView_GotFocus;
                itemsView.LosingFocus += ItemsView_LosingFocus;
                itemsView.LostFocus += ItemsView_LostFocus;
                itemsView.Loaded += ItemsView_Loaded;
                itemsView.SizeChanged += ItemsView_SizeChanged;
            }
        }

void ChkLogItemsViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 306 of file ItemsViewBlankPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.GettingFocus -= ItemsView_GettingFocus;
                itemsView.GotFocus -= ItemsView_GotFocus;
                itemsView.LosingFocus -= ItemsView_LosingFocus;
                itemsView.LostFocus -= ItemsView_LostFocus;
                itemsView.Loaded -= ItemsView_Loaded;
                itemsView.SizeChanged -= ItemsView_SizeChanged;
            }
        }

void ChkLogItemsViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 347 of file ItemsViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 354 of file ItemsViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 51 of file ItemsViewBlankPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 57 of file ItemsViewBlankPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 251 of file ItemsViewBlankPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    scrollView.Loaded += ScrollView_Loaded;
                    scrollView.SizeChanged += ScrollView_SizeChanged;
                    scrollView.ExtentChanged += ScrollView_ExtentChanged;
                    scrollView.StateChanged += ScrollView_StateChanged;
                    scrollView.ViewChanged += ScrollView_ViewChanged;
                    scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                    scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                    scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                    scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
                }
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 272 of file ItemsViewBlankPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    scrollView.Loaded -= ScrollView_Loaded;
                    scrollView.SizeChanged -= ScrollView_SizeChanged;
                    scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                    scrollView.StateChanged -= ScrollView_StateChanged;
                    scrollView.ViewChanged -= ScrollView_ViewChanged;
                    scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                    scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                    scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                    scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
                }
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 333 of file ItemsViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 340 of file ItemsViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ItemsRepeater_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 121 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsRepeater.Loaded");
            LogItemsRepeaterInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ItemsRepeater_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 131 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsRepeater.SizeChanged Size={itemsView.ActualWidth}, {itemsView.ActualHeight}");
            LogItemsRepeaterInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ItemsView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 91 of file ItemsViewBlankPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 116 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsView.GotFocus");
        }

void ItemsView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsView.Loaded");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();
        }

void ItemsView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 106 of file ItemsViewBlankPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsView.LostFocus");
        }

void ItemsView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 77 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsView.SizeChanged Size={itemsView.ActualWidth}, {itemsView.ActualHeight}");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();
        }

void LogItemsRepeaterInfo ( ) [inline, private]

Definition at line 196 of file ItemsViewBlankPage.xaml.cs.

        {
            ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

            AppendAsyncEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}");
        }

void LogItemsViewInfo ( ) [inline, private]

Definition at line 213 of file ItemsViewBlankPage.xaml.cs.

        {
            //AppendAsyncEventMessage($"ItemsView Info: ItemsSource={itemsView.ItemsSource}, ItemTemplate={itemsView.ItemTemplate}, Layout={itemsView.Layout}");
        }

void LogScrollViewInfo ( ) [inline, private]

Definition at line 203 of file ItemsViewBlankPage.xaml.cs.

        {
            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

            AppendAsyncEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
            AppendAsyncEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 361 of file ItemsViewBlankPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 161 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
        }

void ScrollView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 141 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.Loaded");
            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 176 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 186 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 151 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.SizeChanged Size={itemsView.ActualWidth}, {itemsView.ActualHeight}");
            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 166 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 171 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 181 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollView_ZoomCompleted | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 191 of file ItemsViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

Member Data Documentation

object asyncEventReportingLock = new object() [private]

Definition at line 13 of file ItemsViewBlankPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 14 of file ItemsViewBlankPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewBlankPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewIntegrationPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewIntegrationPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ItemsViewIntegrationPage Class Reference

List of all members.

Public Member Functions

ItemsViewIntegrationPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ItemsViewIntegrationPage ()
void | AnnotatedScrollBar_DetailLabelRequested (AnnotatedScrollBar sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)
void | AnnotatedScrollBar_DetailLabelRequestedLog (AnnotatedScrollBar sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)
void | AnnotatedScrollBar_Scrolling (AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args)
void | AnnotatedScrollBar_ScrollingLog (AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args)
void | AnnotatedScrollBar_SizeChanged (object sender, object args)
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnAddItemsSourceItem_Click (object sender, RoutedEventArgs args)
void | BtnApplyAverageMonthCount_Click (object sender, RoutedEventArgs args)
void | BtnApplyYearCount_Click (object sender, RoutedEventArgs args)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs args)
void | BtnClearFullLog_Click (object sender, RoutedEventArgs e)
void | BtnClearItemsSource_Click (object sender, RoutedEventArgs args)
void | BtnClearLogs_Click (object sender, RoutedEventArgs args)
void | BtnForcePopulateHeader_Click (object sender, RoutedEventArgs args)
void | BtnGetAverageMonthCount_Click (object sender, RoutedEventArgs args)
void | BtnGetFullLog_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewState_Click (object sender, RoutedEventArgs args)
void | BtnGetScrollViewVerticalOffset_Click (object sender, RoutedEventArgs args)
void | BtnGetYearCount_Click (object sender, RoutedEventArgs args)
void | BtnParentItemsView_Click (object sender, RoutedEventArgs args)
void | BtnRemoveLastItemsSourceItem_Click (object sender, RoutedEventArgs args)
void | BtnResetItemsSource_Click (object sender, RoutedEventArgs args)
void | BtnSetAverageMonthCount_Click (object sender, RoutedEventArgs args)
void | BtnSetItemsSource_Click (object sender, RoutedEventArgs args)
void | BtnSetScrollViewVerticalOffset_Click (object sender, RoutedEventArgs args)
void | BtnSetYearCount_Click (object sender, RoutedEventArgs args)
void | BtnUnparentDiscardItemsView_Click (object sender, RoutedEventArgs args)
void | BtnUnparentItemsView_Click (object sender, RoutedEventArgs args)
void | BtnUnparentReparentItemsView_Click (object sender, RoutedEventArgs args)
void | ChkAnnotatedScrollBarIsEnabled_IsCheckedChanged (object sender, RoutedEventArgs args)
void | ChkCustomUI_Checked (object sender, RoutedEventArgs args)
void | ChkCustomUI_Unchecked (object sender, RoutedEventArgs args)
void | ChkHandleItemsInfoRequested_IsCheckedChanged (object sender, RoutedEventArgs args)
void | ChkLogAnnotatedScrollBarEvents_Checked (object sender, RoutedEventArgs args)
void | ChkLogAnnotatedScrollBarEvents_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogAnnotatedScrollBarMessages_Checked (object sender, RoutedEventArgs args)
void | ChkLogAnnotatedScrollBarMessages_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogItemsRepeaterEvents_Checked (object sender, RoutedEventArgs args)
void | ChkLogItemsRepeaterEvents_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogItemsRepeaterMessages_Checked (object sender, RoutedEventArgs args)
void | ChkLogItemsRepeaterMessages_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogItemsViewEvents_Checked (object sender, RoutedEventArgs args)
void | ChkLogItemsViewEvents_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogItemsViewMessages_Checked (object sender, RoutedEventArgs args)
void | ChkLogItemsViewMessages_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogLinedFlowLayoutEvents_Checked (object sender, RoutedEventArgs args)
void | ChkLogLinedFlowLayoutEvents_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogLinedFlowLayoutMessages_Checked (object sender, RoutedEventArgs args)
void | ChkLogLinedFlowLayoutMessages_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogs_Checked (object sender, RoutedEventArgs args)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs args)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs args)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs args)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs args)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs args)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs args)
void | ChkPageMethods_Checked (object sender, RoutedEventArgs e)
void | ChkPageMethods_Unchecked (object sender, RoutedEventArgs e)
void | ChkUseConstantMonthCount_IsCheckedChanged (object sender, RoutedEventArgs args)
void | ChkUseFastPath_IsCheckedChanged (object sender, RoutedEventArgs args)
void | ClearFullLog ()
void | CmbItemTemplate_SelectionChanged (object sender, SelectionChangedEventArgs args)
void | CmbSelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | GetFullLog ()
int | GetItemIndexFromLastDetailLabelRequest ()
string | GetMonthNameFromIndex (int monthIndex)
void | HookAnnotatedScrollBarEvents ()
void | HookLinedFlowLayoutEvents (bool justItemsInfoRequested, bool exceptItemsInfoRequested)
void | HookPhotosCollectionChanged ()
void | HookScrollViewEvents ()
void | Image_ImageFailed (object sender, ExceptionRoutedEventArgs e)
void | Image_ImageOpened (object sender, RoutedEventArgs e)
void | ItemContainer_DragStartingLog (UIElement sender, DragStartingEventArgs args)
void | ItemsRepeater_LayoutUpdatedLog (object sender, object args)
void | ItemsRepeater_LoadedLog (object sender, RoutedEventArgs args)
void | ItemsRepeater_SizeChangedLog (object sender, SizeChangedEventArgs args)
void | ItemsView_GettingFocusLog (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ItemsView_GotFocusLog (object sender, RoutedEventArgs args)
void | ItemsView_LoadedLog (object sender, RoutedEventArgs args)
void | ItemsView_LosingFocusLog (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ItemsView_LostFocusLog (object sender, RoutedEventArgs args)
void | ItemsView_SizeChangedLog (object sender, SizeChangedEventArgs args)
void | ItemsViewIntegrationPage_KeyDown (object sender, KeyRoutedEventArgs e)
void | ItemsViewIntegrationPage_Loaded (object sender, RoutedEventArgs args)
void | LinedFlowLayout_ArrangeInvalidatedLog (Layout sender, object args)
void | LinedFlowLayout_ItemsInfoRequested (LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
void | LinedFlowLayout_ItemsUnlocked (LinedFlowLayout sender, object args)
void | LinedFlowLayout_ItemsUnlockedLog (LinedFlowLayout sender, object args)
void | LinedFlowLayout_MeasureInvalidatedLog (Layout sender, object args)
void | LogItemsRepeaterInfo ()
void | LogItemsViewInfo ()
void | LogScrollViewInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | Photos_CollectionChanged (object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
void | PopulateAnnotatedScrollBar ()
void | PopulateHeader ()
void | PopulateHeaderAsync ()
void | PopulatePhotosCollection ()
void | RepopulateAndApplyPhotosCollection ()
void | ScrollController_AddScrollVelocityRequestedLog (IScrollController sender, ScrollControllerAddScrollVelocityRequestedEventArgs args)
void | ScrollController_ScrollByRequestedLog (IScrollController sender, ScrollControllerScrollByRequestedEventArgs args)
void | ScrollController_ScrollToRequestedLog (IScrollController sender, ScrollControllerScrollToRequestedEventArgs args)
void | ScrollPresenter_ExtentChangedLog (ScrollPresenter sender, object args)
void | ScrollPresenter_LoadedLog (object sender, RoutedEventArgs args)
void | ScrollPresenter_ScrollAnimationStartingLog (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_ScrollCompletedLog (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_SizeChangedLog (object sender, SizeChangedEventArgs args)
void | ScrollPresenter_StateChangedLog (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChangedLog (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomAnimationStartingLog (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollPresenter_ZoomCompletedLog (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_ExtentChangedLog (ScrollView sender, object args)
void | ScrollView_LoadedLog (object sender, RoutedEventArgs args)
void | ScrollView_ScrollAnimationStartingLog (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_ScrollCompletedLog (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_SizeChangedLog (object sender, SizeChangedEventArgs args)
void | ScrollView_StateChangedLog (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ViewChangedLog (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStartingLog (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompletedLog (ScrollView sender, ScrollingZoomCompletedEventArgs args)
void | UnhookAnnotatedScrollBarEvents ()
void | UnhookLinedFlowLayoutEvents (bool justItemsInfoRequested, bool exceptItemsInfoRequested)
void | UnhookPhotosCollectionChanged ()
void | UnhookScrollViewEvents ()
void | UpdateItemsInfoRequestedHandler ()

Private Attributes

object | _asyncEventReportingLock = new object()
int | _averageMonthCount = 2
BringIntoViewOptions | _bringIntoViewOptions = null
ObservableCollection< Entity > | _colPhotos = null
List< string > | _fullLogs = new List<string>()
List< string > | _lstAsyncEventMessage = new List<string>()
int[,] | _monthPhotoCounts = null
string[] | _months = new string[12] { "December", "November", "October", "September", "August", "July", "June", "May", "April", "March", "February", "January" }
DataTemplate[] | _photoTemplates = new DataTemplate[8]
bool | _populateAnnotatedScrollBar = true
int | _populateAnnotatedScrollBarPending = 0
int | _populateHeaderPending = 0
SolidColorBrush | _redBrush = new SolidColorBrush(Colors.Red)
int | _requestedDetailLabelPhotoInYearIndex = 0
int | _requestedDetailLabelYearIndex = 0
ScrollView | _scrollView = null
SolidColorBrush | _whiteBrush = new SolidColorBrush(Colors.White)
int | _yearCount = 2
int[] | _yearPhotoCounts = null

Detailed Description

Definition at line 32 of file ItemsViewIntegrationPage.xaml.cs.

Constructor & Destructor Documentation

ItemsViewIntegrationPage ( ) [inline]

Definition at line 54 of file ItemsViewIntegrationPage.xaml.cs.

        {
            this.InitializeComponent();

            if (chkLogAnnotatedScrollBarMessages.IsChecked == true ||
                chkLogLinedFlowLayoutMessages.IsChecked == true ||
                chkLogItemsViewMessages.IsChecked == true ||
                chkLogScrollPresenterMessages.IsChecked == true ||
                chkLogScrollViewMessages.IsChecked == true ||
                chkLogItemsRepeaterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogItemsRepeaterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollPresenterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogItemsViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogLinedFlowLayoutMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogAnnotatedScrollBarMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }

            this.Loaded += ItemsViewIntegrationPage_Loaded;
            this.KeyDown += ItemsViewIntegrationPage_KeyDown;
            PopulatePhotosCollection();
        }

~ItemsViewIntegrationPage ( ) [inline, private]

Definition at line 98 of file ItemsViewIntegrationPage.xaml.cs.

        {
        }

Member Function Documentation

void AnnotatedScrollBar_DetailLabelRequested | ( | AnnotatedScrollBar | sender,
 |  | AnnotatedScrollBarDetailLabelRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 513 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                if (itemsView == null || itemsView.ItemsSource == null)
                {
                    return;
                }

                Debug.Assert(_yearPhotoCounts != null);
                Debug.Assert(_monthPhotoCounts != null);

                double lineAndSpacingSize = linedFlowLayout.ActualLineHeight + linedFlowLayout.LineSpacing;
                double value = args.ScrollOffset;
                double previousLabelValue = 0.0;
                double labelValue = 0.0;
                int cumulatedPhotos = _yearPhotoCounts[0];
                int yearIndex;

                // Phase 1: Find the Label values before and after the provided args.Value.
                for (yearIndex = 1; yearIndex < _yearCount; yearIndex++)
                {
                    int lineIndex = linedFlowLayout.LockItemToLine(cumulatedPhotos);
                    labelValue = lineIndex * lineAndSpacingSize;

                    if (labelValue > value)
                    {
                        break;
                    }

                    previousLabelValue = labelValue;

                    Debug.Assert(yearIndex < _yearPhotoCounts.Length);
                    cumulatedPhotos += _yearPhotoCounts[yearIndex];
                }

                if (yearIndex == _yearCount)
                {
                    labelValue = _scrollView.ExtentHeight;
                }

                Debug.Assert(value >= previousLabelValue);
                Debug.Assert(value <= labelValue);

                // Phase 2: Find the approximate photo index in that resulting year.
                DateTime today = DateTime.Now.Date;
                int yearPhotoIndex = 0;
                int monthIndex;
                int year = today.Year - yearIndex + 1;

                Debug.Assert(yearIndex - 1 < _yearPhotoCounts.Length);
                int yearPhotoCount = _yearPhotoCounts[yearIndex - 1];

                double yearValueSpan = labelValue - previousLabelValue;
                int approximatePhotoInYear = (int)(yearPhotoCount * (value - previousLabelValue) / yearValueSpan);

                Debug.Assert(approximatePhotoInYear >= 0);

                // Phase3: Find the month index for the resulting approximate photo index.
                for (monthIndex = 0; monthIndex < 12; monthIndex++)
                {
                    yearPhotoIndex += _monthPhotoCounts[yearIndex - 1, monthIndex];

                    if (yearPhotoIndex > approximatePhotoInYear)
                    {
                        break;
                    }
                }

                // Phase 4: Get the month name from the resulting month index.
                string monthName = GetMonthNameFromIndex(monthIndex);

                // Phase 5: Provide a sub-label string.
                args.Content = monthName + " " + year.ToString();
                // Caching information for the case an AnnotatedScrollBar_Scrolling event is raised for this args.Value.
                _requestedDetailLabelYearIndex = yearIndex - 1;
                _requestedDetailLabelPhotoInYearIndex = approximatePhotoInYear;

                if (chkLogAnnotatedScrollBarEvents.IsChecked == true)
                {
                    AppendAsyncEventMessage($"AnnotatedScrollBar_DetailLabelRequested args.ScrollOffset={args.ScrollOffset}, _requestedDetailLabelYearIndex={_requestedDetailLabelYearIndex}, _requestedDetailLabelPhotoInYearIndex={_requestedDetailLabelPhotoInYearIndex}");
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void AnnotatedScrollBar_DetailLabelRequestedLog | ( | AnnotatedScrollBar | sender,
 |  | AnnotatedScrollBarDetailLabelRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 830 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"AnnotatedScrollBar.DetailLabelRequested ScrollOffset={args.ScrollOffset}");
        }

void AnnotatedScrollBar_Scrolling | ( | AnnotatedScrollBar | sender,
 |  | AnnotatedScrollBarScrollingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 480 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                if (itemsView != null && args.ScrollingEventKind == AnnotatedScrollBarScrollingEventKind.Click)
                {
                    // Tell AnnotatedScrollBar to not raise a scroll request
                    args.Cancel = true;

                    // The user clicked the labels area to scroll to a particular offset.
                    int targetItemIndex = GetItemIndexFromLastDetailLabelRequest();

                    // Launch a bring-into-view operation to the target item index.
                    if (_bringIntoViewOptions == null)
                    {
                        _bringIntoViewOptions = new BringIntoViewOptions()
                        {
                            AnimationDesired = false,
                            TargetRect = new Windows.Foundation.Rect(0, 0, 1, _scrollView.ViewportHeight)
                        };
                    }

                    itemsView.StartBringItemIntoView(targetItemIndex, _bringIntoViewOptions);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void AnnotatedScrollBar_ScrollingLog | ( | AnnotatedScrollBar | sender,
 |  | AnnotatedScrollBarScrollingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 825 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"AnnotatedScrollBar.Scrolling ScrollingEventKind={args.ScrollingEventKind}, ScrollOffset={args.ScrollOffset}");
        }

void AnnotatedScrollBar_SizeChanged | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 603 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                _populateAnnotatedScrollBarPending++;
                PopulateAnnotatedScrollBar();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 1979 of file ItemsViewIntegrationPage.xaml.cs.

        {
            lock (_asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    _lstAsyncEventMessage.Add(msgHead);
                }

                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 2012 of file ItemsViewIntegrationPage.xaml.cs.

        {
            lock (_asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in _lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                    _fullLogs.Add(asyncEventMessage);
                }
                _lstAsyncEventMessage.Clear();
            }
        }

void BtnAddItemsSourceItem_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1332 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                int monthIndex = 0;

                if (_colPhotos == null || _yearPhotoCounts == null || _monthPhotoCounts == null)
                {
                    // A collection with a single photo is instantiated.
                    _yearCount = 1;
                    _yearPhotoCounts = new int[_yearCount];
                    _monthPhotoCounts = new int[_yearCount, 12];
                    if (_colPhotos == null)
                    {
                        _colPhotos = new ObservableCollection<Entity>();

                        HookPhotosCollectionChanged();
                    }
                }
                else
                {
                    int lastYearIndex = _yearCount - 1;
                    int lastPopulatedMonthIndex = 11;
                    int lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];

                    while (lastPopulatedMonthCount == 0)
                    {
                        lastPopulatedMonthIndex--;
                        lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];
                    }

                    if (lastPopulatedMonthCount >= _averageMonthCount)
                    {
                        if (lastPopulatedMonthIndex == 11)
                        {
                            // Add a new year without photos.
                            int[] yearPhotoCounts = new int[_yearCount + 1];
                            int[,] monthPhotoCounts = new int[_yearCount + 1, 12];

                            for (int yearIndexTmp = 0; yearIndexTmp < _yearCount; yearIndexTmp++)
                            {
                                yearPhotoCounts[yearIndexTmp] = _yearPhotoCounts[yearIndexTmp];

                                for (int monthIndexTmp = 0; monthIndexTmp < 12; monthIndexTmp++)
                                {
                                    monthPhotoCounts[yearIndexTmp, monthIndexTmp] = _monthPhotoCounts[yearIndexTmp, monthIndexTmp];
                                }
                            }

                            _yearCount++;
                            _yearPhotoCounts = yearPhotoCounts;
                            _monthPhotoCounts = monthPhotoCounts;
                        }
                        else
                        {
                            monthIndex = lastPopulatedMonthIndex + 1;
                        }
                    }
                }

                // Adding one photo to December of the last year.
                DateTime today = DateTime.Now.Date;
                int yearIndex = _yearCount - 1;
                int year = today.Year - yearIndex;
                int photoIndex = _monthPhotoCounts[yearIndex, monthIndex];

                _yearPhotoCounts[yearIndex] = _yearPhotoCounts[yearIndex] + 1;
                _monthPhotoCounts[yearIndex, monthIndex] = photoIndex + 1;

                Random rnd = new Random();

                _colPhotos.Add(new Entity()
                {
                    ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", rnd.Next(1, 127))),
                    Description = GetMonthNameFromIndex(monthIndex) + " " + year + " - #" + photoIndex
                });
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnApplyAverageMonthCount_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1171 of file ItemsViewIntegrationPage.xaml.cs.

        {
            RepopulateAndApplyPhotosCollection();
        }

void BtnApplyYearCount_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1279 of file ItemsViewIntegrationPage.xaml.cs.

        {
            RepopulateAndApplyPhotosCollection();
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2025 of file ItemsViewIntegrationPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1210 of file ItemsViewIntegrationPage.xaml.cs.

        {
            ClearFullLog();
        }

void BtnClearItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1316 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                _yearCount = 0;
                _yearPhotoCounts = null;
                _monthPhotoCounts = null;
                _colPhotos.Clear();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1601 of file ItemsViewIntegrationPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnForcePopulateHeader_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1284 of file ItemsViewIntegrationPage.xaml.cs.

        {
            _populateHeaderPending++;
            PopulateHeader();
        }

void BtnGetAverageMonthCount_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1153 of file ItemsViewIntegrationPage.xaml.cs.

        {
            txtAverageMonthCount.Text = _averageMonthCount.ToString();
        }

void BtnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1205 of file ItemsViewIntegrationPage.xaml.cs.

        {
            GetFullLog();
        }

void BtnGetScrollViewState_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1215 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                txtScrollViewState.Text = _scrollView.State.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetScrollViewVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1229 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                txtScrollViewVerticalOffset.Text = _scrollView.VerticalOffset.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnGetYearCount_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1261 of file ItemsViewIntegrationPage.xaml.cs.

        {
            txtYearCount.Text = _yearCount.ToString();
        }

void BtnParentItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1485 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                gridParent.Children.Insert(0, itemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnRemoveLastItemsSourceItem_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1416 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                if (_colPhotos == null || _yearPhotoCounts == null || _monthPhotoCounts == null)
                {
                    return;
                }

                int lastYearIndex = _yearCount - 1;
                int lastPopulatedMonthIndex = 11;
                int lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];

                while (lastPopulatedMonthCount == 0)
                {
                    lastPopulatedMonthIndex--;
                    lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];
                }

                if (lastPopulatedMonthCount > 1)
                {
                    _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex] = lastPopulatedMonthCount - 1;
                }
                else
                {
                    if (lastPopulatedMonthIndex == 0)
                    {
                        // Remove last year as it is now empty.
                        _yearCount--;

                        if (_yearCount == 0)
                        {
                            _yearPhotoCounts = null;
                            _monthPhotoCounts = null;
                        }
                        else
                        {
                            int[] yearPhotoCounts = new int[_yearCount];
                            int[,] monthPhotoCounts = new int[_yearCount, 12];

                            for (int yearIndexTmp = 0; yearIndexTmp < _yearCount; yearIndexTmp++)
                            {
                                yearPhotoCounts[yearIndexTmp] = _yearPhotoCounts[yearIndexTmp];

                                for (int monthIndexTmp = 0; monthIndexTmp < 12; monthIndexTmp++)
                                {
                                    monthPhotoCounts[yearIndexTmp, monthIndexTmp] = _monthPhotoCounts[yearIndexTmp, monthIndexTmp];
                                }
                            }

                            _yearPhotoCounts = yearPhotoCounts;
                            _monthPhotoCounts = monthPhotoCounts;
                        }
                    }
                    else
                    {
                        _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex] = 0;
                    }
                }

                _colPhotos.RemoveAt(_colPhotos.Count - 1);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnResetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1303 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                itemsView.ItemsSource = null;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetAverageMonthCount_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1158 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                _averageMonthCount = Math.Max(1, Convert.ToInt32(txtAverageMonthCount.Text));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1290 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                itemsView.ItemsSource = _colPhotos;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1242 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                double verticalOffset = Convert.ToDouble(txtScrollViewVerticalOffset.Text);
                int correlationId = _scrollView.ScrollTo(_scrollView.HorizontalOffset, verticalOffset);

                if (chkGeneralInfoLogs.IsChecked == true)
                {
                    AppendAsyncEventMessage($"BtnSetScrollViewVerticalOffset_Click ScrollView.ScrollTo({verticalOffset}), CorrelationId={correlationId}");
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnSetYearCount_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1266 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                _yearCount = Math.Max(1, Convert.ToInt32(txtYearCount.Text));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnUnparentDiscardItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1525 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                gridParent.Children.Remove(itemsView);
                itemsView = null;

                GC.Collect();
                GC.WaitForPendingFinalizers();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnUnparentItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1498 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                gridParent.Children.Remove(itemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void BtnUnparentReparentItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1511 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                gridParent.Children.Remove(itemsView);
                gridParent.Children.Insert(0, itemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void ChkAnnotatedScrollBarIsEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1200 of file ItemsViewIntegrationPage.xaml.cs.

        {
            annotatedScrollBar.IsEnabled = (bool)chkAnnotatedScrollBarIsEnabled.IsChecked;
        }

void ChkCustomUI_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 789 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Visible;
        }

void ChkCustomUI_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 795 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Collapsed;
        }

void ChkHandleItemsInfoRequested_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1190 of file ItemsViewIntegrationPage.xaml.cs.

        {
            UpdateItemsInfoRequestedHandler();
        }

void ChkLogAnnotatedScrollBarEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1606 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (annotatedScrollBar != null)
            {
                annotatedScrollBar.Scrolling += AnnotatedScrollBar_ScrollingLog;
                annotatedScrollBar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequestedLog;

                IScrollController scrollController = annotatedScrollBar as IScrollController;

                scrollController.ScrollByRequested += ScrollController_ScrollByRequestedLog;
                scrollController.ScrollToRequested += ScrollController_ScrollToRequestedLog;
                scrollController.AddScrollVelocityRequested += ScrollController_AddScrollVelocityRequestedLog;
            }
        }

void ChkLogAnnotatedScrollBarEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1621 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (annotatedScrollBar != null)
            {
                annotatedScrollBar.Scrolling -= AnnotatedScrollBar_ScrollingLog;
                annotatedScrollBar.DetailLabelRequested -= AnnotatedScrollBar_DetailLabelRequestedLog;

                IScrollController scrollController = annotatedScrollBar as IScrollController;

                scrollController.ScrollByRequested -= ScrollController_ScrollByRequestedLog;
                scrollController.ScrollToRequested -= ScrollController_ScrollToRequestedLog;
                scrollController.AddScrollVelocityRequested -= ScrollController_AddScrollVelocityRequestedLog;
            }
        }

void ChkLogAnnotatedScrollBarMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1916 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogAnnotatedScrollBarMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1927 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1636 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    itemsRepeater.LayoutUpdated += ItemsRepeater_LayoutUpdatedLog;
                    itemsRepeater.Loaded += ItemsRepeater_LoadedLog;
                    itemsRepeater.SizeChanged += ItemsRepeater_SizeChangedLog;
                }
            }
        }

void ChkLogItemsRepeaterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1651 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    itemsRepeater.LayoutUpdated -= ItemsRepeater_LayoutUpdatedLog;
                    itemsRepeater.Loaded -= ItemsRepeater_LoadedLog;
                    itemsRepeater.SizeChanged -= ItemsRepeater_SizeChangedLog;
                }
            }
        }

void ChkLogItemsRepeaterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1806 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1817 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1780 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.GettingFocus += ItemsView_GettingFocusLog;
                itemsView.GotFocus += ItemsView_GotFocusLog;
                itemsView.LosingFocus += ItemsView_LosingFocusLog;
                itemsView.LostFocus += ItemsView_LostFocusLog;
                itemsView.Loaded += ItemsView_LoadedLog;
                itemsView.SizeChanged += ItemsView_SizeChangedLog;
            }
        }

void ChkLogItemsViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1793 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.GettingFocus -= ItemsView_GettingFocusLog;
                itemsView.GotFocus -= ItemsView_GotFocusLog;
                itemsView.LosingFocus -= ItemsView_LosingFocusLog;
                itemsView.LostFocus -= ItemsView_LostFocusLog;
                itemsView.Loaded -= ItemsView_LoadedLog;
                itemsView.SizeChanged -= ItemsView_SizeChangedLog;
            }
        }

void ChkLogItemsViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1872 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1883 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogLinedFlowLayoutEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1666 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (linedFlowLayout != null)
            {
                linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlockedLog;
                linedFlowLayout.ArrangeInvalidated += LinedFlowLayout_ArrangeInvalidatedLog;
                linedFlowLayout.MeasureInvalidated += LinedFlowLayout_MeasureInvalidatedLog;
            }
        }

void ChkLogLinedFlowLayoutEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1676 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (linedFlowLayout != null)
            {
                linedFlowLayout.ItemsUnlocked -= LinedFlowLayout_ItemsUnlockedLog;
                linedFlowLayout.ArrangeInvalidated -= LinedFlowLayout_ArrangeInvalidatedLog;
                linedFlowLayout.MeasureInvalidated -= LinedFlowLayout_MeasureInvalidatedLog;
            }
        }

void ChkLogLinedFlowLayoutMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1894 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogLinedFlowLayoutMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1905 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 813 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 819 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1686 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                    if (scrollPresenter != null)
                    {
                        scrollPresenter.Loaded += ScrollPresenter_LoadedLog;
                        scrollPresenter.SizeChanged += ScrollPresenter_SizeChangedLog;
                        scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChangedLog;
                        scrollPresenter.StateChanged += ScrollPresenter_StateChangedLog;
                        scrollPresenter.ViewChanged += ScrollPresenter_ViewChangedLog;
                        scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStartingLog;
                        scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStartingLog;
                        scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompletedLog;
                        scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompletedLog;
                    }
                }
            }
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1712 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                    if (scrollPresenter != null)
                    {
                        scrollPresenter.Loaded -= ScrollPresenter_LoadedLog;
                        scrollPresenter.SizeChanged -= ScrollPresenter_SizeChangedLog;
                        scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChangedLog;
                        scrollPresenter.StateChanged -= ScrollPresenter_StateChangedLog;
                        scrollPresenter.ViewChanged -= ScrollPresenter_ViewChangedLog;
                        scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStartingLog;
                        scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStartingLog;
                        scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompletedLog;
                        scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompletedLog;
                    }
                }
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1828 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1839 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1738 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    scrollView.Loaded += ScrollView_LoadedLog;
                    scrollView.SizeChanged += ScrollView_SizeChangedLog;
                    scrollView.ExtentChanged += ScrollView_ExtentChangedLog;
                    scrollView.StateChanged += ScrollView_StateChangedLog;
                    scrollView.ViewChanged += ScrollView_ViewChangedLog;
                    scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStartingLog;
                    scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStartingLog;
                    scrollView.ScrollCompleted += ScrollView_ScrollCompletedLog;
                    scrollView.ZoomCompleted += ScrollView_ZoomCompletedLog;
                }
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1759 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    scrollView.Loaded -= ScrollView_LoadedLog;
                    scrollView.SizeChanged -= ScrollView_SizeChangedLog;
                    scrollView.ExtentChanged -= ScrollView_ExtentChangedLog;
                    scrollView.StateChanged -= ScrollView_StateChangedLog;
                    scrollView.ViewChanged -= ScrollView_ViewChangedLog;
                    scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStartingLog;
                    scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStartingLog;
                    scrollView.ScrollCompleted -= ScrollView_ScrollCompletedLog;
                    scrollView.ZoomCompleted -= ScrollView_ZoomCompletedLog;
                }
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1850 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1861 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogScrollPresenterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogAnnotatedScrollBarMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkPageMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 801 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (grdPageMethods != null)
                grdPageMethods.Visibility = Visibility.Visible;
        }

void ChkPageMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 807 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (grdPageMethods != null)
                grdPageMethods.Visibility = Visibility.Collapsed;
        }

void ChkUseConstantMonthCount_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1176 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                PopulatePhotosCollection();
                itemsView.ItemsSource = _colPhotos;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void ChkUseFastPath_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1195 of file ItemsViewIntegrationPage.xaml.cs.

        {
            UpdateItemsInfoRequestedHandler();
        }

void ClearFullLog ( ) [inline, private]

Definition at line 2042 of file ItemsViewIntegrationPage.xaml.cs.

        {
            this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
            chkLogUpdated.IsChecked = false;
            _fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
            chkLogCleared.IsChecked = true;
            this.txtStatus.Text = "ClearFullLog. Done.";
        }

void CmbItemTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1542 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                if (itemsView != null)
                {
                    int templateIndex = cmbItemTemplate.SelectedIndex;

                    if (_photoTemplates[templateIndex] == null)
                    {
                        _photoTemplates[templateIndex] = Resources["photoTemplate" + (templateIndex + 1).ToString()] as DataTemplate;
                    }

                    switch (templateIndex)
                    {
                        case 0:
                        case 2:
                        case 5:
                        case 6:
                        case 7:
                            linedFlowLayout.LineHeight = 96.0;
                            break;

                        case 1:
                        case 3:
                            linedFlowLayout.LineHeight = 146.0;
                            break;

                        case 4:
                            linedFlowLayout.LineHeight = 296.0;
                            break;
                    }

                    itemsView.ItemTemplate = _photoTemplates[templateIndex];
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void CmbSelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1585 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                if (itemsView != null && cmbSelectionMode != null && itemsView.SelectionMode != (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex)
                {
                    itemsView.SelectionMode = (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void GetFullLog ( ) [inline, private]

Definition at line 2030 of file ItemsViewIntegrationPage.xaml.cs.

        {
            this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
            chkLogCleared.IsChecked = false;
            foreach (string log in _fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
            chkLogUpdated.IsChecked = true;
            this.txtStatus.Text = "GetFullLog. Done.";
        }

int GetItemIndexFromLastDetailLabelRequest ( ) [inline, private]

Definition at line 236 of file ItemsViewIntegrationPage.xaml.cs.

        {
            int cumulatedPhotos = 0;

            for (int yearIndex = 0; yearIndex < _requestedDetailLabelYearIndex; yearIndex++)
            {
                Debug.Assert(yearIndex < _yearPhotoCounts.Length);
                cumulatedPhotos += _yearPhotoCounts[yearIndex];
            }

            return cumulatedPhotos + _requestedDetailLabelPhotoInYearIndex;
        }

string GetMonthNameFromIndex ( int monthIndex ) [inline, private]

Definition at line 249 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (monthIndex == 12)
            {
                // Workaround for AnnotatedScrollBarDetailLabelRequestedEventArgs.Value exceeding AnnotatedScrollBar.Maximum + AnnotatedScrollBar.ViewportSize
                monthIndex = 11;
            }

            return _months[monthIndex];
        }

void HookAnnotatedScrollBarEvents ( ) [inline, private]

Definition at line 156 of file ItemsViewIntegrationPage.xaml.cs.

        {
            annotatedScrollBar.Scrolling += AnnotatedScrollBar_Scrolling;
            annotatedScrollBar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequested;
            annotatedScrollBar.SizeChanged += AnnotatedScrollBar_SizeChanged;
        }

void HookLinedFlowLayoutEvents | ( | bool | justItemsInfoRequested,
 |  | bool | exceptItemsInfoRequested |
 | ) |  |  | [inline, private]

Definition at line 170 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (!exceptItemsInfoRequested)
            {
                linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
            }
            if (justItemsInfoRequested)
            {
                return;
            }
            linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlocked;
        }

void HookPhotosCollectionChanged ( ) [inline, private]

Definition at line 218 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (_colPhotos != null)
            {
                _colPhotos.CollectionChanged += Photos_CollectionChanged;
            }
        }

void HookScrollViewEvents ( ) [inline, private]

Definition at line 183 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (_scrollView != null)
            {
                _scrollView.ExtentChanged += ScrollView_ExtentChanged;
                _scrollView.ViewChanged += ScrollView_ViewChanged;
                _scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                _scrollView.SizeChanged += ScrollView_SizeChanged;
            }
        }

void Image_ImageFailed | ( | object | sender,
 |  | ExceptionRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 863 of file ItemsViewIntegrationPage.xaml.cs.

        {
            // When the Image has a TextBlock sibling, set its Foreground to Red to indicate the image loading failure.
            TextBlock textBlock = null;
            Image image = sender as Image;

            if (image != null)
            {
                Panel itemPanel = image.Parent as Panel;

                if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
                {
                    textBlock = itemPanel.Children[1] as TextBlock;

                    if (textBlock != null)
                    {
                        textBlock.Foreground = _redBrush;
                    }
                }
            }

            if (chkLogImageEvents.IsChecked == true)
            {
                string uri = string.Empty;

                if (image != null)
                {
                    BitmapImage bitmapImage = image.Source as BitmapImage;

                    if (bitmapImage != null)
                    {
                        Uri uriSource = bitmapImage.UriSource;

                        if (uriSource != null)
                        {
                            uri = uriSource.ToString();
                        }
                    }
                }

                AppendAsyncEventMessage($"Image_ImageFailed ErrorMessage={e.ErrorMessage}, Item Id={textBlock?.Text}, Item Uri={uri}");
            }
        }

void Image_ImageOpened | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 835 of file ItemsViewIntegrationPage.xaml.cs.

        {
            // When the Image has a TextBlock sibling, set its Foreground to White to indicate the image loading success.
            TextBlock textBlock = null;
            Image image = sender as Image;

            if (image != null)
            {
                Panel itemPanel = image.Parent as Panel;

                if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
                {
                    textBlock = itemPanel.Children[1] as TextBlock;

                    if (textBlock != null)
                    {
                        textBlock.Foreground = _whiteBrush;
                    }
                }
            }

            // This event is too chatty so its reporting is turned off by default.
            //if (chkLogImageEvents.IsChecked == true)
            //{
            //    AppendAsyncEventMessage("Image_ImageOpened, Item Id={textBlock?.Text}");
            //}
        }

void ItemContainer_DragStartingLog | ( | UIElement | sender,
 |  | DragStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 907 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemContainer.DragStarting");
        }

void ItemsRepeater_LayoutUpdatedLog | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 971 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (chkGeneralVerboseLogs.IsChecked == true)
            {
                AppendAsyncEventMessage("ItemsRepeater.LayoutUpdated");
            }
        }

void ItemsRepeater_LoadedLog | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 979 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsRepeater.Loaded");
            LogItemsRepeaterInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ItemsRepeater_SizeChangedLog | ( | object | sender,
 |  | SizeChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 989 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsRepeater.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={(sender as FrameworkElement).ActualWidth} x {(sender as FrameworkElement).ActualHeight}");

            LogItemsRepeaterInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ItemsView_GettingFocusLog | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 941 of file ItemsViewIntegrationPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_GotFocusLog | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 966 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsView.GotFocus");
        }

void ItemsView_LoadedLog | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 912 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsView.Loaded");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();
        }

void ItemsView_LosingFocusLog | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 956 of file ItemsViewIntegrationPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_LostFocusLog | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 951 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsView.LostFocus");
        }

void ItemsView_SizeChangedLog | ( | object | sender,
 |  | SizeChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 926 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsView.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={itemsView.ActualWidth} x {itemsView.ActualHeight}");

            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();
        }

void ItemsViewIntegrationPage_KeyDown | ( | object | sender,
 |  | KeyRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 144 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (e.Key == Windows.System.VirtualKey.G)
            {
                GetFullLog();
            }
            else if (e.Key == Windows.System.VirtualKey.C)
            {
                ClearFullLog();
            }
        }

void ItemsViewIntegrationPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 128 of file ItemsViewIntegrationPage.xaml.cs.

        {
            _scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;

            HookScrollViewEvents();

            itemsView.ItemsSource = _colPhotos;

            UpdateItemsInfoRequestedHandler();
            HookLinedFlowLayoutEvents(justItemsInfoRequested: false, exceptItemsInfoRequested: true);
            HookAnnotatedScrollBarEvents();

            BtnGetAverageMonthCount_Click(null, null);
            BtnGetYearCount_Click(null, null);
        }

void LinedFlowLayout_ArrangeInvalidatedLog | ( | Layout | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1005 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout.ArrangeInvalidated");
        }

void LinedFlowLayout_ItemsInfoRequested | ( | LinedFlowLayout | sender,
 |  | LinedFlowLayoutItemsInfoRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 645 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (chkGeneralInfoLogs.IsChecked == true)
            {
                AppendAsyncEventMessage($"LinedFlowLayout_ItemsInfoRequested - args.ItemsRangeStartIndex={args.ItemsRangeStartIndex}, args.ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
            }

            double minWidth = 0.0;

            switch (cmbItemTemplate.SelectedIndex)
            {
                case 0:
                    minWidth = 48.0;
                    break;
                case 2:
                case 5:
                case 6:
                case 7:
                    minWidth = 72.0;
                    break;
                case 1:
                    minWidth = 76.0;
                    break;
                case 3:
                    minWidth = 96.0;
                    break;
                case 4:
                    minWidth = 146.0;
                    break;
            }

            args.MinWidth = minWidth;

            double[] desiredAspectRatios = new double[chkUseFastPath.IsChecked == true ? _colPhotos.Count : args.ItemsRangeRequestedLength];

            if (chkUseFastPath.IsChecked == true)
            {
                args.ItemsRangeStartIndex = 0;

                for (int index = 0; index < _colPhotos.Count; index++)
                {
                    desiredAspectRatios[index] = _colPhotos[index].AspectRatio;
                }
            }
            else
            {
                for (int index = 0; index < args.ItemsRangeRequestedLength; index++)
                {
                    desiredAspectRatios[index] = _colPhotos[args.ItemsRangeStartIndex + index].AspectRatio;
                }
            }

            args.SetDesiredAspectRatios(desiredAspectRatios);
        }

void LinedFlowLayout_ItemsUnlocked | ( | LinedFlowLayout | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 701 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (chkGeneralInfoLogs.IsChecked == true)
            {
                AppendAsyncEventMessage("LinedFlowLayout_ItemsUnlocked");
            }

            // Declare the re-population need for when the ScrollView extent was changed based on the new average-items-per-line value.
            // Note: Not expecting this to be the final way to re-populate the AnnotatedScrollBar. Looking into a more reliable/easy way
            // because average-items-per-line changes may not result in extent changes.
            // At the moment, LockItemToLine cannot be called within this handler.
            _populateAnnotatedScrollBar = true;
        }

void LinedFlowLayout_ItemsUnlockedLog | ( | LinedFlowLayout | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1000 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout.ItemsUnlocked");
        }

void LinedFlowLayout_MeasureInvalidatedLog | ( | Layout | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1010 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout.MeasureInvalidated");
        }

void LogItemsRepeaterInfo ( ) [inline, private]

Definition at line 1131 of file ItemsViewIntegrationPage.xaml.cs.

        {
            ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

            AppendAsyncEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}");
        }

void LogItemsViewInfo ( ) [inline, private]

Definition at line 1148 of file ItemsViewIntegrationPage.xaml.cs.

        {
            //AppendAsyncEventMessage($"ItemsView Info: ItemsSource={itemsView.ItemsSource}, ItemTemplate={itemsView.ItemTemplate}, Layout={itemsView.Layout}");
        }

void LogScrollViewInfo ( ) [inline, private]

Definition at line 1138 of file ItemsViewIntegrationPage.xaml.cs.

        {
            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

            AppendAsyncEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
            AppendAsyncEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1938 of file ItemsViewIntegrationPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage;
            string senderName = string.Empty;

            while (msg.Contains("0x"))
            {
                int index = msg.IndexOf("0x");

                string toReplace = msg.Substring(index, 10);

                msg = msg.Replace(toReplace, "PTR");
            }

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 102 of file ItemsViewIntegrationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            UnhookLinedFlowLayoutEvents(justItemsInfoRequested: false, exceptItemsInfoRequested: false);
            UnhookScrollViewEvents();
            UnhookAnnotatedScrollBarEvents();
            UnhookPhotosCollectionChanged();

            ChkLogLinedFlowLayoutEvents_Unchecked(null, null);
            ChkLogScrollPresenterEvents_Unchecked(null, null);
            ChkLogScrollViewEvents_Unchecked(null, null);
            ChkLogItemsViewEvents_Unchecked(null, null);
            ChkLogItemsRepeaterEvents_Unchecked(null, null);
            ChkLogAnnotatedScrollBarEvents_Unchecked(null, null);

            base.OnNavigatedFrom(e);
        }

void Photos_CollectionChanged | ( | object | sender,
 |  | System.Collections.Specialized.NotifyCollectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 472 of file ItemsViewIntegrationPage.xaml.cs.

        {
            _populateAnnotatedScrollBarPending++;
            var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, PopulateAnnotatedScrollBar);

            PopulateHeaderAsync();
        }

void PopulateAnnotatedScrollBar ( ) [inline, private]

Definition at line 261 of file ItemsViewIntegrationPage.xaml.cs.

        {
            Debug.Assert(_populateAnnotatedScrollBarPending > 0);
            _populateAnnotatedScrollBarPending--;

            if (_populateAnnotatedScrollBarPending > 0)
            {
                return;
            }

            if (chkGeneralInfoLogs.IsChecked == true)
            {
                AppendAsyncEventMessage($"PopulateAnnotatedScrollBar");
            }

            if (annotatedScrollBar.Labels.Count > 0)
            {
                AppendAsyncEventMessage($"PopulateAnnotatedScrollBar - Clearing AnnotatedScrollBar labels");
                annotatedScrollBar.Labels.Clear();
            }

            if (itemsView.ItemsSource == null || _yearPhotoCounts == null || _monthPhotoCounts == null)
            {
                return;
            }

            double lineAndSpacingSize = linedFlowLayout.ActualLineHeight + linedFlowLayout.LineSpacing;
            int cumulatedPhotos = _yearPhotoCounts[0];
            DateTime today = DateTime.Now.Date;

            AnnotatedScrollBarLabel annotatedScrollBarLabel = new AnnotatedScrollBarLabel(today.Year.ToString(), 0.0);
            annotatedScrollBar.Labels.Add(annotatedScrollBarLabel);
            AppendAsyncEventMessage($"PopulateAnnotatedScrollBar - Adding AnnotatedScrollBarLabel with Content={annotatedScrollBarLabel.Content}, ScrollOffset={annotatedScrollBarLabel.ScrollOffset}");

            for (int yearIndex = 1; yearIndex < _yearCount; yearIndex++)
            {
                int year = today.Year - yearIndex;
                int lineIndex = linedFlowLayout.LockItemToLine(cumulatedPhotos);
                double value = lineIndex * lineAndSpacingSize;

                annotatedScrollBarLabel = new AnnotatedScrollBarLabel(year.ToString(), value);
                annotatedScrollBar.Labels.Add(annotatedScrollBarLabel);
                AppendAsyncEventMessage($"PopulateAnnotatedScrollBar - Adding AnnotatedScrollBarLabel with Content={annotatedScrollBarLabel.Content}, ScrollOffset={annotatedScrollBarLabel.ScrollOffset}");

                cumulatedPhotos += _yearPhotoCounts[yearIndex];
            }
        }

void PopulateHeader ( ) [inline, private]

Definition at line 319 of file ItemsViewIntegrationPage.xaml.cs.

        {
            Debug.Assert(_populateHeaderPending > 0);
            _populateHeaderPending--;

            if (_populateHeaderPending > 0 || _scrollView == null)
            {
                return;
            }

            const double requiredDisplayedHeight = 16.0;
            int firstRelevantItemContainerIndex;
            int lastRelevantItemContainerIndex;

            itemsView.TryGetItemIndex(
                        horizontalViewportRatio: 0.0,
                        verticalViewportRatio: ((linedFlowLayout.LineSpacing - linedFlowLayout.LineHeight) / 2.0 + requiredDisplayedHeight) / _scrollView.ViewportHeight,
                        index: out firstRelevantItemContainerIndex);
            itemsView.TryGetItemIndex(
                        horizontalViewportRatio: 1.0,
                        verticalViewportRatio: 1.0 + ((linedFlowLayout.LineHeight + linedFlowLayout.LineSpacing) / 2.0 - requiredDisplayedHeight) / _scrollView.ViewportHeight,
                        index: out lastRelevantItemContainerIndex);

            string headerText = string.Empty;

            if (firstRelevantItemContainerIndex != -1 && lastRelevantItemContainerIndex != -1)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    if (chkGeneralInfoLogs.IsChecked == true)
                    {
                        Entity firstRelevantPhoto = _colPhotos[firstRelevantItemContainerIndex];
                        Entity lastRelevantPhoto = _colPhotos[lastRelevantItemContainerIndex];

                        AppendAsyncEventMessage($"PopulateHeader firstRelevantPhoto={firstRelevantPhoto.Description}, lastRelevantPhoto={lastRelevantPhoto.Description}");
                    }

                    int cumulatedPhotos = 0;
                    int firstYearIndex = -1, lastYearIndex = -1;
                    int firstMonthIndex = -1, lastMonthIndex = -1;

                    for (int yearIndex = 0; yearIndex < _yearCount; yearIndex++)
                    {
                        int monthIndex;

                        for (monthIndex = 0; monthIndex < 12; monthIndex++)
                        {
                            cumulatedPhotos += _monthPhotoCounts[yearIndex, monthIndex];

                            if (cumulatedPhotos > firstRelevantItemContainerIndex && firstYearIndex == -1)
                            {
                                firstYearIndex = yearIndex;
                                firstMonthIndex = monthIndex;
                            }

                            if (cumulatedPhotos > lastRelevantItemContainerIndex)
                            {
                                break;
                            }
                        }

                        if (cumulatedPhotos > lastRelevantItemContainerIndex)
                        {
                            lastYearIndex = yearIndex;
                            lastMonthIndex = monthIndex;
                            break;
                        }
                    }

                    DateTime today = DateTime.Now.Date;
                    int year = today.Year - firstYearIndex;
                    string monthName = GetMonthNameFromIndex(firstMonthIndex);
                    headerText = monthName + " " + year.ToString();

                    if (lastMonthIndex != firstMonthIndex || lastYearIndex != firstYearIndex)
                    {
                        year = today.Year - lastYearIndex;
                        monthName = GetMonthNameFromIndex(lastMonthIndex);
                        headerText += " - " + monthName + " " + year.ToString();
                    }
                }
            }
            else if (chkGeneralInfoLogs.IsChecked == true)
            {
                AppendAsyncEventMessage($"PopulateHeader firstRelevantItemContainerIndex={firstRelevantItemContainerIndex}, lastRelevantItemContainerIndex={lastRelevantItemContainerIndex}");
            }

            tblHeader.Text = headerText;
        }

void PopulateHeaderAsync ( ) [inline, private]

Definition at line 309 of file ItemsViewIntegrationPage.xaml.cs.

        {
            _populateHeaderPending++;
            var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, PopulateHeader);
        }

void PopulatePhotosCollection ( ) [inline, private]

Definition at line 412 of file ItemsViewIntegrationPage.xaml.cs.

        {
            _yearPhotoCounts = new int[_yearCount];
            _monthPhotoCounts = new int[_yearCount, 12];

            if (_colPhotos != null)
            {
                UnhookPhotosCollectionChanged();
            }

            _colPhotos = new ObservableCollection<Entity>();

            var rnd = chkUseConstantMonthCount.IsChecked == true ? null : new Random();
            DateTime today = DateTime.Now.Date;

            for (int yearIndex = 0; yearIndex < _yearCount; yearIndex++)
            {
                int year = today.Year - yearIndex;
                int yearCount = 0;

                for (int monthIndex = 0; monthIndex < 12; monthIndex++)
                {
                    int monthCount;

                    if (chkUseConstantMonthCount.IsChecked == true)
                    {
                        monthCount = Math.Max(1, _averageMonthCount);
                    }
                    else
                    {
                        monthCount = rnd.Next(_averageMonthCount / 10, (19 * _averageMonthCount) / 10 + 1);

                        if (monthIndex == 11 && yearCount == 0 && monthCount == 0)
                        {
                            monthCount = 1;
                        }
                    }

                    _monthPhotoCounts[yearIndex, monthIndex] = monthCount;
                    yearCount += monthCount;

                    for (int photoIndex = 0; photoIndex < monthCount; photoIndex++)
                    {
                        _colPhotos.Add(new Entity()
                        {
                            ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", chkUseConstantMonthCount.IsChecked == true ? (yearIndex * 50 + monthIndex * 5 + photoIndex) % 126 + 1 : rnd.Next(1, 127))),
                            Description = GetMonthNameFromIndex(monthIndex) + " " + year + " - #" + photoIndex
                        });
                    }
                }

                Debug.Assert(yearIndex < _yearPhotoCounts.Length);
                _yearPhotoCounts[yearIndex] = yearCount;
            }

            PopulateHeaderAsync();
            HookPhotosCollectionChanged();
        }

void RepopulateAndApplyPhotosCollection ( ) [inline, private]

Definition at line 759 of file ItemsViewIntegrationPage.xaml.cs.

        {
            try
            {
                bool isItemsSourceSet = itemsView.ItemsSource == _colPhotos;

                PopulatePhotosCollection();

                if (isItemsSourceSet)
                {
                    itemsView.ItemsSource = _colPhotos;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendAsyncEventMessage(ex.ToString());
            }
        }

void ScrollController_AddScrollVelocityRequestedLog | ( | IScrollController | sender,
 |  | ScrollControllerAddScrollVelocityRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1015 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollController.AddScrollVelocityRequested CorrelationId={args.CorrelationId}, OffsetVelocity={args.OffsetVelocity}");
        }

void ScrollController_ScrollByRequestedLog | ( | IScrollController | sender,
 |  | ScrollControllerScrollByRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1025 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollController.ScrollByRequested CorrelationId={args.CorrelationId}, Offset={args.OffsetDelta}, AnimationMode={args.Options.AnimationMode}");
        }

void ScrollController_ScrollToRequestedLog | ( | IScrollController | sender,
 |  | ScrollControllerScrollToRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1020 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollController.ScrollToRequested CorrelationId={args.CorrelationId}, Offset={args.Offset}, AnimationMode={args.Options.AnimationMode}");
        }

void ScrollPresenter_ExtentChangedLog | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1040 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
        }

void ScrollPresenter_LoadedLog | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1030 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.Loaded");
        }

void ScrollPresenter_ScrollAnimationStartingLog | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1055 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollAnimationStarting CorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
        }

void ScrollPresenter_ScrollCompletedLog | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1065 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollCompleted CorrelationId={args.CorrelationId}");
        }

void ScrollPresenter_SizeChangedLog | ( | object | sender,
 |  | SizeChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1035 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={(sender as FrameworkElement).ActualWidth} x {(sender as FrameworkElement).ActualHeight}");
        }

void ScrollPresenter_StateChangedLog | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1045 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.StateChanged {sender.State}");
        }

void ScrollPresenter_ViewChangedLog | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1050 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollPresenter_ZoomAnimationStartingLog | ( | ScrollPresenter | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1060 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomAnimationStarting CorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollPresenter_ZoomCompletedLog | ( | ScrollPresenter | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1070 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomCompleted CorrelationId={args.CorrelationId}");
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 717 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (chkGeneralInfoLogs.IsChecked == true)
            {
                AppendAsyncEventMessage($"ScrollView_ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
            }

            PopulateHeaderAsync();

            if (_populateAnnotatedScrollBar)
            {
                _populateAnnotatedScrollBar = false;
                _populateAnnotatedScrollBarPending++;
                PopulateAnnotatedScrollBar();
            }
        }

void ScrollView_ExtentChangedLog | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1096 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
        }

void ScrollView_LoadedLog | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1075 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.Loaded");
            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_ScrollAnimationStartingLog | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1111 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting CorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 749 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (chkGeneralInfoLogs.IsChecked == true)
            {
                AppendAsyncEventMessage($"ScrollView_ScrollCompleted CorrelationId={args.CorrelationId}");
            }

            PopulateHeaderAsync();
        }

void ScrollView_ScrollCompletedLog | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1121 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollCompleted CorrelationId={args.CorrelationId}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 734 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (_bringIntoViewOptions != null)
            {
                // Sizing the TargetRect in order to bring the target item to the top of the viewport.
                _bringIntoViewOptions.TargetRect = new Windows.Foundation.Rect(0, 0, 1, _scrollView.ViewportHeight);
            }
        }

void ScrollView_SizeChangedLog | ( | object | sender,
 |  | SizeChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1085 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={itemsView.ActualWidth} x {itemsView.ActualHeight}");

            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_StateChangedLog | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1101 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 743 of file ItemsViewIntegrationPage.xaml.cs.

        {
            PopulateHeaderAsync();
        }

void ScrollView_ViewChangedLog | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1106 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ZoomAnimationStartingLog | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1116 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting CorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollView_ZoomCompletedLog | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1126 of file ItemsViewIntegrationPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomCompleted CorrelationId={args.CorrelationId}");
        }

void UnhookAnnotatedScrollBarEvents ( ) [inline, private]

Definition at line 163 of file ItemsViewIntegrationPage.xaml.cs.

        {
            annotatedScrollBar.Scrolling -= AnnotatedScrollBar_Scrolling;
            annotatedScrollBar.DetailLabelRequested -= AnnotatedScrollBar_DetailLabelRequested;
            annotatedScrollBar.SizeChanged -= AnnotatedScrollBar_SizeChanged;
        }

void UnhookLinedFlowLayoutEvents | ( | bool | justItemsInfoRequested,
 |  | bool | exceptItemsInfoRequested |
 | ) |  |  | [inline, private]

Definition at line 205 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (!exceptItemsInfoRequested)
            {
                linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;
            }
            if (justItemsInfoRequested)
            {
                return;
            }
            linedFlowLayout.ItemsUnlocked -= LinedFlowLayout_ItemsUnlocked;
        }

void UnhookPhotosCollectionChanged ( ) [inline, private]

Definition at line 226 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (_colPhotos != null)
            {
                _colPhotos.CollectionChanged -= Photos_CollectionChanged;
            }
        }

void UnhookScrollViewEvents ( ) [inline, private]

Definition at line 194 of file ItemsViewIntegrationPage.xaml.cs.

        {
            if (_scrollView != null)
            {
                _scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                _scrollView.ViewChanged -= ScrollView_ViewChanged;
                _scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                _scrollView.SizeChanged -= ScrollView_SizeChanged;
            }
        }

void UpdateItemsInfoRequestedHandler ( ) [inline, private]

Definition at line 779 of file ItemsViewIntegrationPage.xaml.cs.

        {
            UnhookLinedFlowLayoutEvents(justItemsInfoRequested: true, exceptItemsInfoRequested: false);

            if (chkHandleItemsInfoRequested.IsChecked == true || chkUseFastPath.IsChecked == true)
            {
                HookLinedFlowLayoutEvents(justItemsInfoRequested: true, exceptItemsInfoRequested: false);
            }
        }

Member Data Documentation

object _asyncEventReportingLock = new object() [private]

Definition at line 34 of file ItemsViewIntegrationPage.xaml.cs.

int _averageMonthCount = 2 [private]

Definition at line 51 of file ItemsViewIntegrationPage.xaml.cs.

BringIntoViewOptions _bringIntoViewOptions = null [private]

Definition at line 42 of file ItemsViewIntegrationPage.xaml.cs.

ObservableCollection<Entity> _colPhotos = null [private]

Definition at line 37 of file ItemsViewIntegrationPage.xaml.cs.

List<string> _fullLogs = new List<string>() [private]

Definition at line 36 of file ItemsViewIntegrationPage.xaml.cs.

List<string> _lstAsyncEventMessage = new List<string>() [private]

Definition at line 35 of file ItemsViewIntegrationPage.xaml.cs.

int [,] _monthPhotoCounts = null [private]

Definition at line 44 of file ItemsViewIntegrationPage.xaml.cs.

string [] _months = new string[12] { "December", "November", "October", "September", "August", "July", "June", "May", "April", "March", "February", "January" } [private]

Definition at line 52 of file ItemsViewIntegrationPage.xaml.cs.

DataTemplate [] _photoTemplates = new DataTemplate[8] [private]

Definition at line 38 of file ItemsViewIntegrationPage.xaml.cs.

bool _populateAnnotatedScrollBar = true [private]

Definition at line 45 of file ItemsViewIntegrationPage.xaml.cs.

int _populateAnnotatedScrollBarPending = 0 [private]

Definition at line 48 of file ItemsViewIntegrationPage.xaml.cs.

int _populateHeaderPending = 0 [private]

Definition at line 49 of file ItemsViewIntegrationPage.xaml.cs.

SolidColorBrush _redBrush = new SolidColorBrush(Colors.Red) [private]

Definition at line 39 of file ItemsViewIntegrationPage.xaml.cs.

int _requestedDetailLabelPhotoInYearIndex = 0 [private]

Definition at line 47 of file ItemsViewIntegrationPage.xaml.cs.

int _requestedDetailLabelYearIndex = 0 [private]

Definition at line 46 of file ItemsViewIntegrationPage.xaml.cs.

ScrollView _scrollView = null [private]

Definition at line 41 of file ItemsViewIntegrationPage.xaml.cs.

SolidColorBrush _whiteBrush = new SolidColorBrush(Colors.White) [private]

Definition at line 40 of file ItemsViewIntegrationPage.xaml.cs.

int _yearCount = 2 [private]

Definition at line 50 of file ItemsViewIntegrationPage.xaml.cs.

int [] _yearPhotoCounts = null [private]

Definition at line 43 of file ItemsViewIntegrationPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewIntegrationPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewInteractiveTestsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewInteractiveTestsPage
Public Member Functions | Private Member Functions | Private Attributes

ItemsViewInteractiveTestsPage Class Reference

List of all members.

Public Member Functions

ItemsViewInteractiveTestsPage ()

Private Member Functions

void | BtnClearFullLog_Click (object sender, RoutedEventArgs e)
void | BtnGetCurrentItemIndex_Click (object sender, RoutedEventArgs e)
void | BtnGetCurrentItemIndex_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | BtnGetFullLog_Click (object sender, RoutedEventArgs e)
void | BtnInsertItems_Click (object sender, RoutedEventArgs e)
void | BtnRemoveItems_Click (object sender, RoutedEventArgs e)
void | BtnResetScrollView_Click (object sender, RoutedEventArgs e)
void | BtnScrollViewScrollTo_Click (object sender, RoutedEventArgs e)
void | BtnScrollViewZoomTo_Click (object sender, RoutedEventArgs e)
void | ChkHandleItemsInfoRequested_IsCheckedChanged (object sender, RoutedEventArgs args)
void | ChkIsItemInvokedEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkIsItemInvokedEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkUseAppAnimator_IsCheckedChanged (object sender, RoutedEventArgs args)
void | ChkUseFastPath_IsCheckedChanged (object sender, RoutedEventArgs args)
void | ClearFullLog ()
void | CmbItemsSource_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLayout_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbSelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | GetFullLog ()
void | InsertItem (int index)
void | ItemsView_ItemInvoked (ItemsView sender, ItemsViewItemInvokedEventArgs args)
void | ItemsViewInteractiveTestsPage_KeyDown (object sender, KeyRoutedEventArgs e)
void | ItemsViewInteractiveTestsPage_Loaded (object sender, RoutedEventArgs e)
void | LinedFlowLayout_ItemsInfoRequested (LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | RemoveItem (int index)
void | ScrollView_ScrollCompleted (ScrollView scrollView, ScrollingScrollCompletedEventArgs args)
void | ScrollView_StateChanged (ScrollView scrollView, object args)
void | ScrollView_ViewChanged (ScrollView scrollView, object args)
void | ScrollView_ZoomCompleted (ScrollView scrollView, ScrollingZoomCompletedEventArgs args)
void | UpdateAppAnimator ()
void | UpdateAppAnimatorCheckBox ()
void | UpdateItemsInfoRequestedCheckBoxes ()
void | UpdateItemsInfoRequestedHandler ()
void | UpdateItemsViewIsItemInvokedEnabled ()
void | UpdateItemsViewLayout ()
void | UpdateItemsViewSelectionMode ()
void | UpdateLinedFlowLayoutLineHeight ()

Private Attributes

ObservableCollection< Entity > | _colEntities = null
DataTemplate[] | _entityTemplates = new DataTemplate[6]
List< string > | _fullLogs = new List<string>()
LinedFlowLayout | _linedFlowLayout = null
LinedFlowLayoutItemCollectionTransitionProvider | _linedFlowLayoutItemCollectionTransitionProvider = null
string | _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus."
List< Entity > | _lstEntities = null
List< Entity > | _lstLargeEntities = null
UIElement | _oldFocusedElement = null
int | _scrollViewOffsetChangeCorrelationId = -1
int | _scrollViewResetCorrelationId = -1
int | _scrollViewZoomFactorChangeCorrelationId = -1
StackLayout | _stackLayout = null
UniformGridLayout | _uniformGridLayout = null

Detailed Description

Definition at line 18 of file ItemsViewInteractiveTestsPage.xaml.cs.

Constructor & Destructor Documentation

ItemsViewInteractiveTestsPage ( ) [inline]

Definition at line 35 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += ItemsViewInteractiveTestsPage_Loaded;
            KeyDown += ItemsViewInteractiveTestsPage_KeyDown;

            btnGetCurrentItemIndex.GettingFocus += BtnGetCurrentItemIndex_GettingFocus;
        }

Member Function Documentation

void BtnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 450 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            ClearFullLog();
        }

void BtnGetCurrentItemIndex_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 502 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtStatus.Text = "GetCurrentItemIndex ...";

            int currentItemIndex = itemsView.CurrentItemIndex;

            txtCurrentItemIndex.Text = currentItemIndex.ToString();

            this.txtStatus.Text = "GetCurrentItemIndex. Done.";

            if (_oldFocusedElement != null)
            {
                _oldFocusedElement.Focus(FocusState.Programmatic);
                _oldFocusedElement = null;
            }
        }

void BtnGetCurrentItemIndex_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 440 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            _oldFocusedElement = args.OldFocusedElement as UIElement;
        }

void BtnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 445 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            GetFullLog();
        }

void BtnInsertItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 519 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (txtItemsSourceIndexes != null && txtStatus != null)
                {
                    txtStatus.Text = "InsertItems ...";

                    string[] indexes = txtItemsSourceIndexes.Text.Split(',');

                    foreach (string index in indexes)
                    {
                        InsertItem(int.Parse(index));
                    }

                    txtStatus.Text = "InsertItems. Done.";

                    if (_oldFocusedElement != null)
                    {
                        _oldFocusedElement.Focus(FocusState.Programmatic);
                        _oldFocusedElement = null;
                    }
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void BtnRemoveItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 549 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (txtItemsSourceIndexes != null && txtStatus != null)
                {
                    txtStatus.Text = "RemoveItems ...";

                    string[] indexes = txtItemsSourceIndexes.Text.Split(',');

                    foreach (string index in indexes)
                    {
                        RemoveItem(int.Parse(index));
                    }

                    txtStatus.Text = "RemoveItems. Done.";
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void BtnResetScrollView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 486 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtStatus.Text = "Resetting ScrollView ...";

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

            int viewChangeCorrelationId = scrollView.ScrollTo(0.0, 0.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            _fullLogs.Add($"ScrollTo requested. Id={viewChangeCorrelationId}");

            viewChangeCorrelationId = scrollView.ZoomTo(1.0f, System.Numerics.Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            _fullLogs.Add($"ZoomTo requested. Id={viewChangeCorrelationId}");

            chkLogUpdated.IsChecked = false;
            _scrollViewResetCorrelationId = viewChangeCorrelationId;
        }

void BtnScrollViewScrollTo_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 455 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtStatus.Text = "Scrolling ScrollView ...";

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

            double horizontalOffset = double.Parse(txtScrollViewHorizontalOffset.Text);
            double verticalOffset = double.Parse(txtScrollViewVerticalOffset.Text);

            int viewChangeCorrelationId = scrollView.ScrollTo(horizontalOffset, verticalOffset, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            _fullLogs.Add($"ScrollTo requested. Id={viewChangeCorrelationId}");

            chkLogUpdated.IsChecked = false;
            _scrollViewOffsetChangeCorrelationId = viewChangeCorrelationId;
        }

void BtnScrollViewZoomTo_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 471 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtStatus.Text = "Zooming ScrollView ...";

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

            float zoomFactor = float.Parse(txtScrollViewZoomFactor.Text);

            int viewChangeCorrelationId = scrollView.ZoomTo(zoomFactor, System.Numerics.Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            _fullLogs.Add($"ZoomTo requested. Id={viewChangeCorrelationId}");

            chkLogUpdated.IsChecked = false;
            _scrollViewZoomFactorChangeCorrelationId = viewChangeCorrelationId;
        }

void ChkHandleItemsInfoRequested_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 86 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            UpdateItemsInfoRequestedHandler();
        }

void ChkIsItemInvokedEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 329 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.IsItemInvokedEnabled = true;
            }
        }

void ChkIsItemInvokedEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 337 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.IsItemInvokedEnabled = false;
            }
        }

void ChkLogItemsRepeaterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ItemsRepeater",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ItemsRepeater",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ItemsRepeater",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ItemsRepeater",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 165 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ItemsView",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ItemsView",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 181 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ItemsView",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ItemsView",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            if (chkLogItemsRepeaterMessages.IsChecked == false && chkLogItemsViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 149 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            if (chkLogItemsRepeaterMessages.IsChecked == false && chkLogItemsViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkUseAppAnimator_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 96 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            UpdateAppAnimator();
        }

void ChkUseFastPath_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 91 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            UpdateItemsInfoRequestedHandler();
        }

void ClearFullLog ( ) [inline, private]

Definition at line 807 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
            chkLogUpdated.IsChecked = false;
            _fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
            chkLogCleared.IsChecked = true;
            this.txtStatus.Text = "ClearFullLog. Done.";
        }

void CmbItemsSource_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 229 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (itemsView != null)
                {
                    switch (cmbItemsSource.SelectedIndex)
                    {
                        case 0:
                            itemsView.ItemsSource = null;
                            break;
                        case 1:
                            if (_lstEntities == null)
                            {
                                _lstEntities = new List<Entity>(
                                                Enumerable.Range(0, 50).Select(k =>
                                                    new Entity
                                                    {
                                                        ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                                        Description = k + " - " + _lorem.Substring(0, k)
                                                    }));
                            }
                            itemsView.ItemsSource = _lstEntities;
                            break;
                        case 2:
                            if (_lstLargeEntities == null)
                            {
                                _lstLargeEntities = new List<Entity>(
                                                Enumerable.Range(0, 1000).Select(k =>
                                                    new Entity
                                                    {
                                                        ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                                        Description = k + " - " + _lorem.Substring(0, k % 50 + 1)
                                                    }));
                            }
                            itemsView.ItemsSource = _lstLargeEntities;
                            break;
                        case 3:
                            if (_colEntities == null)
                            {
                                _colEntities = new ObservableCollection<Entity>(
                                                Enumerable.Range(0, 25).Select(k =>
                                                    new Entity
                                                    {
                                                        ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                                        Description = k + " - " + _lorem.Substring(0, 2 * k)
                                                    }));
                            }
                            itemsView.ItemsSource = _colEntities;
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void CmbItemTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 197 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (itemsView != null)
                {
                    if (cmbItemTemplate.SelectedIndex == 0)
                    {
                        itemsView.ItemTemplate = null;
                    }
                    else
                    {
                        int templateIndex = cmbItemTemplate.SelectedIndex - 1;

                        if (_entityTemplates[templateIndex] == null)
                        {
                            _entityTemplates[templateIndex] = Resources["entityTemplate" + cmbItemTemplate.SelectedIndex.ToString()] as DataTemplate;
                        }

                        itemsView.ItemTemplate = _entityTemplates[templateIndex];
                    }

                    UpdateLinedFlowLayoutLineHeight();
                    UpdateItemsInfoRequestedCheckBoxes();
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void CmbLayout_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 288 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (itemsView != null)
                {
                    switch (cmbLayout.SelectedIndex)
                    {
                        case 0:
                            itemsView.Layout = null;
                            break;
                        case 1:
                            if (_linedFlowLayout == null)
                            {
                                _linedFlowLayout = Resources["linedFlowLayout"] as LinedFlowLayout;
                            }
                            itemsView.Layout = _linedFlowLayout;
                            break;
                        case 2:
                            itemsView.Layout = _stackLayout;
                            break;
                        case 3:
                            if (_uniformGridLayout == null)
                            {
                                _uniformGridLayout = Resources["uniformGridLayout"] as UniformGridLayout;
                            }
                            itemsView.Layout = _uniformGridLayout;
                            break;
                    }

                    UpdateLinedFlowLayoutLineHeight();
                    UpdateItemsInfoRequestedCheckBoxes();
                    UpdateAppAnimatorCheckBox();
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void CmbSelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 345 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (itemsView != null && cmbSelectionMode != null && itemsView.SelectionMode != (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex)
                {
                    itemsView.SelectionMode = (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void GetFullLog ( ) [inline, private]

Definition at line 795 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
            chkLogCleared.IsChecked = false;
            foreach (string log in _fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
            chkLogUpdated.IsChecked = true;
            this.txtStatus.Text = "GetFullLog. Done.";
        }

void InsertItem ( int index ) [inline, private]

Definition at line 573 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (itemsView != null && cmbItemsSource != null)
                {
                    switch (cmbItemsSource.SelectedIndex)
                    {
                        case 1:
                            if (_lstEntities != null)
                            {
                                int rank = _lstEntities.Count;
                                Entity entity = new Entity
                                {
                                    ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", rank % 8 + 1)),
                                    Description = rank + " - " + _lorem.Substring(0, rank)
                                };

                                _lstEntities.Insert(index, entity);
                            }
                            break;
                        case 2:
                            if (_lstLargeEntities != null)
                            {
                                int rank = _lstLargeEntities.Count;
                                Entity entity = new Entity
                                {
                                    ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", rank % 8 + 1)),
                                    Description = rank + " - " + _lorem.Substring(0, rank % 50 + 1)
                                };

                                _lstLargeEntities.Insert(index, entity);
                            }
                            break;
                        case 3:
                            if (_colEntities != null)
                            {
                                int rank = _colEntities.Count;
                                Entity entity = new Entity
                                {
                                    ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", rank % 8 + 1)),
                                    Description = rank + " - " + _lorem.Substring(0, 2 * rank)
                                };

                                _colEntities.Insert(index, entity);
                            }
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void ItemsView_ItemInvoked | ( | ItemsView | sender,
 |  | ItemsViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 360 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            _fullLogs.Add($"ItemsView.ItemInvoked InvokedItem={args.InvokedItem}");
        }

void ItemsViewInteractiveTestsPage_KeyDown | ( | object | sender,
 |  | KeyRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 74 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (e.Key == Windows.System.VirtualKey.G)
            {
                GetFullLog();
            }
            else if (e.Key == Windows.System.VirtualKey.C)
            {
                ClearFullLog();
            }
        }

void ItemsViewInteractiveTestsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            itemsView.ItemInvoked += ItemsView_ItemInvoked;

            UpdateItemsViewLayout();
            UpdateItemsViewIsItemInvokedEnabled();
            UpdateItemsViewSelectionMode();
            UpdateItemsInfoRequestedCheckBoxes();
            UpdateAppAnimatorCheckBox();

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(this.itemsView);

            if (scrollView != null)
            {
                scrollView.StateChanged += ScrollView_StateChanged;
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted += ScrollView_ZoomCompleted;

                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    AutomationProperties.SetAutomationId(scrollPresenter, "PART_ScrollPresenter");
                    AutomationProperties.SetName(scrollPresenter, "PART_ScrollPresenter");
                }
            }
        }

void LinedFlowLayout_ItemsInfoRequested | ( | LinedFlowLayout | sender,
 |  | LinedFlowLayoutItemsInfoRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 365 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            _fullLogs.Add($"LinedFlowLayout.ItemsInfoRequested ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");

            if (cmbItemTemplate.SelectedIndex != 5 || itemsView.ItemsSource == null)
            {
                return;
            }

            args.MinWidth = 80.0;

            double[] desiredAspectRatios = new double[chkUseFastPath.IsChecked == true ? (itemsView.ItemsSource as IReadOnlyCollection<Entity>).Count : args.ItemsRangeRequestedLength];

            if (chkUseFastPath.IsChecked == true)
            {
                args.ItemsRangeStartIndex = 0;
            }

            for (int index = 0; index < desiredAspectRatios.Length; index++)
            {
                desiredAspectRatios[index] = 1.0;
            }

            args.SetDesiredAspectRatios(desiredAspectRatios);
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 817 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;
            FrameworkElement fe = sender as FrameworkElement;

            if (fe != null)
            {
                senderName = "s:" + fe.Name + ", ";
            }

            _fullLogs.Add((args.IsVerboseLevel ? "Verbose: " : "Info: ") + senderName + "m:" + msg);
        }

void RemoveItem ( int index ) [inline, private]

Definition at line 629 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            try
            {
                if (itemsView != null && cmbItemsSource != null)
                {
                    switch (cmbItemsSource.SelectedIndex)
                    {
                        case 1:
                            if (_lstEntities != null)
                            {
                                _lstEntities.RemoveAt(index);
                            }
                            break;
                        case 2:
                            if (_lstLargeEntities != null)
                            {
                                _lstLargeEntities.RemoveAt(index);
                            }
                            break;
                        case 3:
                            if (_colEntities != null)
                            {
                                _colEntities.RemoveAt(index);
                            }
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                _fullLogs.Add(ex.ToString());
            }
        }

void ScrollView_ScrollCompleted | ( | ScrollView | scrollView,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 407 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

            _fullLogs.Add($"ScrollCompleted. OffsetsChangeCorrelationId={args.CorrelationId}, Result={result}");
            chkLogUpdated.IsChecked = false;

            if (args.CorrelationId == _scrollViewOffsetChangeCorrelationId)
            {
                this.txtStatus.Text = "ScrollView scrolled";
                _scrollViewOffsetChangeCorrelationId = -1;
            }
        }

void ScrollView_StateChanged | ( | ScrollView | scrollView,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 391 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtScrollViewState.Text = scrollView.State.ToString();
            _fullLogs.Add($"StateChanged S={scrollView.State.ToString()}");
            chkLogUpdated.IsChecked = false;
        }

void ScrollView_ViewChanged | ( | ScrollView | scrollView,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 398 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            this.txtScrollViewHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
            this.txtScrollViewVerticalOffset.Text = scrollView.VerticalOffset.ToString();
            this.txtScrollViewZoomFactor.Text = scrollView.ZoomFactor.ToString();
            _fullLogs.Add($"ViewChanged H={this.txtScrollViewHorizontalOffset.Text}, V={this.txtScrollViewVerticalOffset.Text}, ZF={this.txtScrollViewZoomFactor.Text}");
            chkLogUpdated.IsChecked = false;
        }

void ScrollView_ZoomCompleted | ( | ScrollView | scrollView,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 421 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

            _fullLogs.Add($"ZoomCompleted. ZoomFactorChangeCorrelationId={args.CorrelationId}, Result={result}");
            chkLogUpdated.IsChecked = false;

            if (args.CorrelationId == _scrollViewZoomFactorChangeCorrelationId)
            {
                this.txtStatus.Text = "ScrollView zoomed";
                _scrollViewZoomFactorChangeCorrelationId = -1;
            }
            else if (args.CorrelationId == _scrollViewResetCorrelationId)
            {
                this.txtStatus.Text = "ScrollView reset";
                _scrollViewResetCorrelationId = -1;
            }
        }

void UpdateAppAnimator ( ) [inline, private]

Definition at line 705 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (itemsView != null && chkUseAppAnimator != null)
            {
                if (chkUseAppAnimator.IsChecked == true)
                {
                    if (itemsView.ItemTransitionProvider == null)
                    {
                        if (_linedFlowLayoutItemCollectionTransitionProvider == null)
                        {
                            _linedFlowLayoutItemCollectionTransitionProvider = new LinedFlowLayoutItemCollectionTransitionProvider();
                        }

                        itemsView.ItemTransitionProvider = _linedFlowLayoutItemCollectionTransitionProvider;
                    }
                }
                else
                {
                    if (itemsView.ItemTransitionProvider != null)
                    {
                        itemsView.ItemTransitionProvider = null;
                    }
                }
            }
        }

void UpdateAppAnimatorCheckBox ( ) [inline, private]

Definition at line 674 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (cmbLayout.SelectedIndex == 1)
            {
                chkUseAppAnimator.Visibility = Visibility.Visible;
                if (itemsView != null)
                {
                    chkUseAppAnimator.IsChecked = itemsView.ItemTransitionProvider != null;
                }
            }
            else
            {
                chkUseAppAnimator.Visibility = Visibility.Collapsed;
            }
        }

void UpdateItemsInfoRequestedCheckBoxes ( ) [inline, private]

Definition at line 664 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            chkHandleItemsInfoRequested.Visibility = chkUseFastPath.Visibility = cmbLayout.SelectedIndex == 1 ? Visibility.Visible : Visibility.Collapsed;
            chkHandleItemsInfoRequested.IsEnabled = chkUseFastPath.IsEnabled = cmbItemTemplate.SelectedIndex == 5;
            if (!chkHandleItemsInfoRequested.IsEnabled)
            {
                chkHandleItemsInfoRequested.IsChecked = chkUseFastPath.IsEnabled = false;
            }
        }

void UpdateItemsInfoRequestedHandler ( ) [inline, private]

Definition at line 690 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                _linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;

                if (chkHandleItemsInfoRequested.IsChecked == true || chkUseFastPath.IsChecked == true)
                {
                    _linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
                }

                _linedFlowLayout.InvalidateItemsInfo();
            }
        }

void UpdateItemsViewIsItemInvokedEnabled ( ) [inline, private]

Definition at line 731 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (itemsView != null)
            {
                chkIsItemInvokedEnabled.IsChecked = itemsView.IsItemInvokedEnabled;
            }
        }

void UpdateItemsViewLayout ( ) [inline, private]

Definition at line 739 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (itemsView != null)
            {
                if (itemsView.Layout is StackLayout stackLayout)
                {
                    _stackLayout = stackLayout;
                    if (cmbLayout != null)
                    {
                        cmbLayout.SelectedIndex = 2;
                    }
                }
                else
                {
                    _stackLayout = Resources["stackLayout"] as StackLayout;
                    if (itemsView.Layout == null && cmbLayout != null)
                    {
                        cmbLayout.SelectedIndex = 0;
                    }
                }
            }
        }

void UpdateItemsViewSelectionMode ( ) [inline, private]

Definition at line 762 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (itemsView != null && cmbSelectionMode != null)
            {
                cmbSelectionMode.SelectedIndex = (int)itemsView.SelectionMode;
            }
        }

void UpdateLinedFlowLayoutLineHeight ( ) [inline, private]

Definition at line 770 of file ItemsViewInteractiveTestsPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                switch (cmbItemTemplate.SelectedIndex)
                {
                    case 2:
                        _linedFlowLayout.LineHeight = 100.0;
                        break;
                    case 3:
                        _linedFlowLayout.LineHeight = 192.0;
                        break;
                    case 4:
                        _linedFlowLayout.LineHeight = 96.0;
                        break;
                    case 5:
                        _linedFlowLayout.LineHeight = 80.0;
                        break;
                    default:
                        _linedFlowLayout.LineHeight = double.NaN;
                        break;
                }
            }
        }

Member Data Documentation

ObservableCollection<Entity> _colEntities = null [private]

Definition at line 25 of file ItemsViewInteractiveTestsPage.xaml.cs.

DataTemplate [] _entityTemplates = new DataTemplate[6] [private]

Definition at line 28 of file ItemsViewInteractiveTestsPage.xaml.cs.

List<string> _fullLogs = new List<string>() [private]

Definition at line 21 of file ItemsViewInteractiveTestsPage.xaml.cs.

LinedFlowLayout _linedFlowLayout = null [private]

Definition at line 29 of file ItemsViewInteractiveTestsPage.xaml.cs.

LinedFlowLayoutItemCollectionTransitionProvider _linedFlowLayoutItemCollectionTransitionProvider = null [private]

Definition at line 33 of file ItemsViewInteractiveTestsPage.xaml.cs.

string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus." [private]

Definition at line 20 of file ItemsViewInteractiveTestsPage.xaml.cs.

List<Entity> _lstEntities = null [private]

Definition at line 26 of file ItemsViewInteractiveTestsPage.xaml.cs.

List<Entity> _lstLargeEntities = null [private]

Definition at line 27 of file ItemsViewInteractiveTestsPage.xaml.cs.

UIElement _oldFocusedElement = null [private]

Definition at line 32 of file ItemsViewInteractiveTestsPage.xaml.cs.

int _scrollViewOffsetChangeCorrelationId = -1 [private]

Definition at line 23 of file ItemsViewInteractiveTestsPage.xaml.cs.

int _scrollViewResetCorrelationId = -1 [private]

Definition at line 22 of file ItemsViewInteractiveTestsPage.xaml.cs.

int _scrollViewZoomFactorChangeCorrelationId = -1 [private]

Definition at line 24 of file ItemsViewInteractiveTestsPage.xaml.cs.

StackLayout _stackLayout = null [private]

Definition at line 30 of file ItemsViewInteractiveTestsPage.xaml.cs.

UniformGridLayout _uniformGridLayout = null [private]

Definition at line 31 of file ItemsViewInteractiveTestsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewInteractiveTestsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewPage
Public Member Functions | Private Member Functions

ItemsViewPage Class Reference

List of all members.

Public Member Functions

ItemsViewPage ()

Private Member Functions

void CmbItemsViewOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 16 of file ItemsViewPage.xaml.cs.

Constructor & Destructor Documentation

ItemsViewPage ( ) [inline]

Definition at line 18 of file ItemsViewPage.xaml.cs.

        {
            LogController.InitializeLogging();
            this.InitializeComponent();

            navigateToSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewSummaryPage), 0); };
            navigateToInteractiveTests.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewInteractiveTestsPage), 0); };
            navigateToIntegration.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewIntegrationPage), 0); };
            navigateToBlank.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewBlankPage), 0); };
            navigateToTransitionProvider.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewTransitionPage), 0); };
            navigateToPictureLibrary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewPictureLibraryPage), 0); };
        }

Member Function Documentation

void CmbItemsViewOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 31 of file ItemsViewPage.xaml.cs.

        {
            if (chkItemsView != null && chkItemsView.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ItemsView",
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkScrollView != null && chkScrollView.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ScrollView",
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkScrollPresenter != null && chkScrollPresenter.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ScrollPresenter",
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkItemContainer != null && chkItemContainer.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ItemContainer",
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkItemsRepeater != null && chkItemsRepeater.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ItemsRepeater",
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkLinedFlowLayout != null && chkLinedFlowLayout.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "LinedFlowLayout",
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkAnnotatedScrollBar != null && chkAnnotatedScrollBar.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "AnnotatedScrollBar",
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
                    cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
            }
        }

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewPictureLibraryPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewPictureLibraryPage
Public Member Functions | Private Member Functions | Private Attributes

ItemsViewPictureLibraryPage Class Reference

List of all members.

Public Member Functions

ItemsViewPictureLibraryPage ()

Private Member Functions

void | AppendEventMessage (string eventMessage)
void | AppendEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | ChkCustomUI_Checked (object sender, RoutedEventArgs e)
void | ChkCustomUI_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
double[] | GetAspectRatios (ref int itemsRangeStartIndex, int itemsRangeRequestedLength)
void | ItemsRepeater_Loaded (object sender, RoutedEventArgs e)
void | ItemsRepeater_SizeChanged (object sender, SizeChangedEventArgs e)
void | ItemsView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ItemsView_GotFocus (object sender, RoutedEventArgs e)
void | ItemsView_Loaded (object sender, RoutedEventArgs e)
void | ItemsView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ItemsView_LostFocus (object sender, RoutedEventArgs e)
void | ItemsView_SizeChanged (object sender, SizeChangedEventArgs e)
void | LinedFlowLayout_ItemsInfoRequested (LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
void | LogItemsRepeaterInfo ()
void | LogItemsViewInfo ()
void | LogScrollViewInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_Loaded (object sender, RoutedEventArgs e)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompleted (ScrollView sender, ScrollingZoomCompletedEventArgs args)

Private Attributes

double[] | aspectRatios = null
List< string > | lstEventMessage = new List<string>()
PictureLibrary | pictureLibrary = null

Detailed Description

Definition at line 13 of file ItemsViewPictureLibraryPage.xaml.cs.

Constructor & Destructor Documentation

ItemsViewPictureLibraryPage ( ) [inline]

Definition at line 19 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            this.InitializeComponent();

            if (chkLogItemsViewMessages.IsChecked == true || chkLogScrollViewMessages.IsChecked == true || chkLogItemsRepeaterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogItemsRepeaterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogItemsViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }

            pictureLibrary = PictureLibrary.CreateLarge();
        }

Member Function Documentation

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 441 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            while (eventMessage.Length > 0)
            {
                string msgHead = eventMessage;

                if (eventMessage.Length > 110)
                {
                    int commaIndex = eventMessage.IndexOf(',', 110);
                    if (commaIndex != -1)
                    {
                        msgHead = eventMessage.Substring(0, commaIndex);
                        eventMessage = eventMessage.Substring(commaIndex + 1);
                    }
                    else
                    {
                        eventMessage = string.Empty;
                    }
                }
                else
                {
                    eventMessage = string.Empty;
                }

                lstEventMessage.Add(msgHead);
            }
            AppendEventMessage();
        }

void AppendEventMessage ( ) [inline, private]

Definition at line 470 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            foreach (string eventMessage in lstEventMessage)
            {
                lstLogs.Items.Add(eventMessage);
            }
            lstEventMessage.Clear();
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 479 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 234 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void ChkCustomUI_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Visible;
        }

void ChkCustomUI_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Collapsed;
        }

void ChkLogItemsRepeaterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 239 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    itemsRepeater.Loaded += ItemsRepeater_Loaded;
                    itemsRepeater.SizeChanged += ItemsRepeater_SizeChanged;
                }
            }
        }

void ChkLogItemsRepeaterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 253 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    itemsRepeater.Loaded -= ItemsRepeater_Loaded;
                    itemsRepeater.SizeChanged -= ItemsRepeater_SizeChanged;
                }
            }
        }

void ChkLogItemsRepeaterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 335 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 342 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 309 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.GettingFocus += ItemsView_GettingFocus;
                itemsView.GotFocus += ItemsView_GotFocus;
                itemsView.LosingFocus += ItemsView_LosingFocus;
                itemsView.LostFocus += ItemsView_LostFocus;
                itemsView.Loaded += ItemsView_Loaded;
                itemsView.SizeChanged += ItemsView_SizeChanged;
            }
        }

void ChkLogItemsViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 322 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.GettingFocus -= ItemsView_GettingFocus;
                itemsView.GotFocus -= ItemsView_GotFocus;
                itemsView.LosingFocus -= ItemsView_LosingFocus;
                itemsView.LostFocus -= ItemsView_LostFocus;
                itemsView.Loaded -= ItemsView_Loaded;
                itemsView.SizeChanged -= ItemsView_SizeChanged;
            }
        }

void ChkLogItemsViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 363 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 370 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 62 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 267 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    scrollView.Loaded += ScrollView_Loaded;
                    scrollView.SizeChanged += ScrollView_SizeChanged;
                    scrollView.ExtentChanged += ScrollView_ExtentChanged;
                    scrollView.StateChanged += ScrollView_StateChanged;
                    scrollView.ViewChanged += ScrollView_ViewChanged;
                    scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                    scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                    scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                    scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
                }
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 288 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

                if (scrollView != null)
                {
                    scrollView.Loaded -= ScrollView_Loaded;
                    scrollView.SizeChanged -= ScrollView_SizeChanged;
                    scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                    scrollView.StateChanged -= ScrollView_StateChanged;
                    scrollView.ViewChanged -= ScrollView_ViewChanged;
                    scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                    scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                    scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                    scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
                }
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 349 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 356 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

double [] GetAspectRatios | ( | ref int | itemsRangeStartIndex,
 |  | int | itemsRangeRequestedLength |
 | ) |  |  | [inline, private]

Definition at line 409 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            const int bufferedAspectRatiosLength = 500;
            int cappedBufferedAspectRatiosLength = Math.Min(bufferedAspectRatiosLength, pictureLibrary.Count);

            cappedBufferedAspectRatiosLength = Math.Max(cappedBufferedAspectRatiosLength, itemsRangeRequestedLength);

            if (aspectRatios == null || aspectRatios.Length != cappedBufferedAspectRatiosLength)
            {
                aspectRatios = new double[cappedBufferedAspectRatiosLength];
            }

            if (itemsRangeStartIndex > 0 && itemsRangeRequestedLength < cappedBufferedAspectRatiosLength)
            {
                itemsRangeStartIndex -= (cappedBufferedAspectRatiosLength - itemsRangeRequestedLength) / 2;
            }

            if (itemsRangeStartIndex + cappedBufferedAspectRatiosLength - 1 >= pictureLibrary.Count)
            {
                cappedBufferedAspectRatiosLength -= itemsRangeStartIndex + cappedBufferedAspectRatiosLength - pictureLibrary.Count;
            }

            for (int i = 0; i < cappedBufferedAspectRatiosLength; i++)
            {
                aspectRatios[i] = pictureLibrary[itemsRangeStartIndex + i].AspectRatio;
            }

            AppendEventMessage($"GetAspectRatios: itemsRangeStartIndex={itemsRangeStartIndex}, cappedBufferedAspectRatiosLength={cappedBufferedAspectRatiosLength}");

            return aspectRatios;
        }

void ItemsRepeater_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 126 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ItemsRepeater.Loaded");
            LogItemsRepeaterInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ItemsRepeater_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 136 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ItemsRepeater.SizeChanged Size={itemsView.ActualWidth}, {itemsView.ActualHeight}");
            LogItemsRepeaterInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ItemsView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 96 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 121 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage("ItemsView.GotFocus");
        }

void ItemsView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ItemsView.Loaded");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();
        }

void ItemsView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 111 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 106 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage("ItemsView.LostFocus");
        }

void ItemsView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 82 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ItemsView.SizeChanged Size={itemsView.ActualWidth}, {itemsView.ActualHeight}");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();
        }

void LinedFlowLayout_ItemsInfoRequested | ( | LinedFlowLayout | sender,
 |  | LinedFlowLayoutItemsInfoRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 146 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"LinedFlowLayout.ItemsInfoRequested ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");

            int itemsRangeStartIndex = args.ItemsRangeStartIndex;

            args.SetDesiredAspectRatios(GetAspectRatios(ref itemsRangeStartIndex, args.ItemsRangeRequestedLength));
            args.ItemsRangeStartIndex = itemsRangeStartIndex;
            args.MinWidth = 86;
        }

void LogItemsRepeaterInfo ( ) [inline, private]

Definition at line 212 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

            AppendEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}");
        }

void LogItemsViewInfo ( ) [inline, private]

Definition at line 229 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            //AppendEventMessage($"ItemsView Info: ItemsSource={itemsView.ItemsSource}, ItemTemplate={itemsView.ItemTemplate}, Layout={itemsView.Layout}");
        }

void LogScrollViewInfo ( ) [inline, private]

Definition at line 219 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);

            AppendEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
            AppendEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
            AppendEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
            AppendEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 377 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string eventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                eventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                eventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendEventMessage(eventMessage);
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 177 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage("ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
        }

void ScrollView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 157 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.Loaded");
            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 192 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 202 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 167 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.SizeChanged Size={itemsView.ActualWidth}, {itemsView.ActualHeight}");
            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 182 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 187 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 197 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollView_ZoomCompleted | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 207 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

Member Data Documentation

double [] aspectRatios = null [private]

Definition at line 17 of file ItemsViewPictureLibraryPage.xaml.cs.

List<string> lstEventMessage = new List<string>() [private]

Definition at line 15 of file ItemsViewPictureLibraryPage.xaml.cs.

PictureLibrary pictureLibrary = null [private]

Definition at line 16 of file ItemsViewPictureLibraryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewPictureLibraryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewSummaryPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewSummaryPage
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes

ItemsViewSummaryPage Class Reference

List of all members.

Classes

class | QueuedOperation

Public Member Functions

ItemsViewSummaryPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Types

enum QueuedOperationType {
SetWidth, SetHeight, StartBringItemIntoView, DataSourceAdd,
DataSourceInsert, DataSourceRemove, DataSourceRemoveAll, DataSourceReplace
}

Private Member Functions

~ItemsViewSummaryPage ()
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | AppendEventMessage (string eventMessage)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearFullLog_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnCopyItemsViewEvents_Click (object sender, RoutedEventArgs e)
void | BtnCreateDynamicItemsView_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceAddItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceGetItemCount_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceInsertItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceRemoveAllItems_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceRemoveItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceReplaceItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceReplaceItemContent_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceSetItemCount_Click (object sender, RoutedEventArgs e)
void | BtnDeselect_Click (object sender, RoutedEventArgs e)
void | BtnDeselectAll_Click (object sender, RoutedEventArgs e)
void | BtnDiscardQueuedOperations_Click (object sender, RoutedEventArgs e)
void | BtnExecuteQueuedOperations_Click (object sender, RoutedEventArgs e)
void | BtnGetBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnGetContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnGetCurrentItemIndex_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetFullLog_Click (object sender, RoutedEventArgs e)
void | BtnGetHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterChildrenCount_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementDesiredSize_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementIsEnabled_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementRenderSize_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterElementWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterHorizontalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterHorizontalCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterItemContainerCanUserInvoke_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterItemContainerCanUserSelect_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterItemContainerIsSelected_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterLogItemIndexDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterVerticalCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutForcedIndexBasedLayoutOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutActualLineHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutLineHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutLineSpacing_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutLogItemIndexDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutMinItemSpacing_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutRequestedRangeLength_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutRequestedRangeStartIndex_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectedItem_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectedItems_Click (object sender, RoutedEventArgs e)
void | BtnGetStackLayoutOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetStackLayoutSpacing_Click (object sender, RoutedEventArgs e)
void | BtnGetUniformGridLayoutMaximumRowsOrColumns_Click (object sender, RoutedEventArgs e)
void | BtnGetUniformGridLayoutMinColumnSpacing_Click (object sender, RoutedEventArgs e)
void | BtnGetUniformGridLayoutMinRowSpacing_Click (object sender, RoutedEventArgs e)
void | BtnGetUniformGridLayoutOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomMode_Click (object sender, RoutedEventArgs e)
void | BtnInvertSelection_Click (object sender, RoutedEventArgs e)
void | BtnIsSelected_Click (object sender, RoutedEventArgs e)
void | BtnItemsRepeaterElementInvalidateArrange_Click (object sender, RoutedEventArgs e)
void | BtnItemsRepeaterElementInvalidateMeasure_Click (object sender, RoutedEventArgs e)
void | BtnItemsViewStartBringItemIntoView_Click (object sender, RoutedEventArgs e)
void | BtnItemsViewStartBringItemIntoViewAsync_Click (object sender, RoutedEventArgs e)
void | BtnItemsViewTryGetItemIndex_Click (object sender, RoutedEventArgs e)
void | BtnLayoutInvalidateMeasure_Click (object sender, RoutedEventArgs e)
void | BtnLinedFlowLayoutClearItemAspectRatios_Click (object sender, RoutedEventArgs e)
void | BtnLinedFlowLayoutGetLineIndex_Click (object sender, RoutedEventArgs e)
void | BtnLinedFlowLayoutInvalidateItemsInfo_Click (object sender, RoutedEventArgs e)
void | BtnLinedFlowLayoutLockItemToLine_Click (object sender, RoutedEventArgs e)
void | BtnLinedFlowLayoutUnlockItems_Click (object sender, RoutedEventArgs e)
void | BtnParentDynamicItemsView_Click (object sender, RoutedEventArgs e)
void | BtnParentMarkupItemsView_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceAddItem_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceInsertItem_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceRemoveAllItems_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceRemoveItem_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceReplaceItem_Click (object sender, RoutedEventArgs e)
void | BtnQueueHeight_Click (object sender, RoutedEventArgs e)
void | BtnQueueWidth_Click (object sender, RoutedEventArgs e)
void | BtnReleaseDynamicItemsView_Click (object sender, RoutedEventArgs e)
void | BtnResetLayoutForcedIndexBasedLayoutOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSelect_Click (object sender, RoutedEventArgs e)
void | BtnSelectAll_Click (object sender, RoutedEventArgs e)
void | BtnSetBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnSetContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnSetHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterElementHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterElementIsEnabled_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterElementMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterElementMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterElementMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterElementMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterElementWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterHorizontalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterHorizontalCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterItemContainerCanUserInvoke_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterItemContainerCanUserSelect_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterItemContainerIsSelected_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterLogItemIndexDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterVerticalCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutForcedIndexBasedLayoutOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutLineHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutLineSpacing_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutLogItemIndexDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutMinItemSpacing_Click (object sender, RoutedEventArgs e)
void | BtnSetMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetStackLayoutOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetStackLayoutSpacing_Click (object sender, RoutedEventArgs e)
void | BtnSetUniformGridLayoutMaximumRowsOrColumns_Click (object sender, RoutedEventArgs e)
void | BtnSetUniformGridLayoutMinColumnSpacing_Click (object sender, RoutedEventArgs e)
void | BtnSetUniformGridLayoutMinRowSpacing_Click (object sender, RoutedEventArgs e)
void | BtnSetUniformGridLayoutOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalConstantVelocity_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetZoomMode_Click (object sender, RoutedEventArgs e)
void | BtnShareLinedFlowLayout_Click (object sender, RoutedEventArgs e)
void | BtnUnparentDynamicItemsView_Click (object sender, RoutedEventArgs e)
void | BtnUnparentMarkupItemsView_Click (object sender, RoutedEventArgs e)
void | BtnUnparentReparentMarkupItemsView_Click (object sender, RoutedEventArgs e)
void | BtnUseDynamicItemsView_Click (object sender, RoutedEventArgs e)
void | BtnUseMarkupItemsView_Click (object sender, RoutedEventArgs e)
void | ChkChildrenProperties_Checked (object sender, RoutedEventArgs e)
void | ChkChildrenProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkIsEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsItemInvokedEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkIsItemInvokedEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsTabStop_Checked (object sender, RoutedEventArgs e)
void | ChkIsTabStop_Unchecked (object sender, RoutedEventArgs e)
void | ChkItemsViewDataSource_Checked (object sender, RoutedEventArgs e)
void | ChkItemsViewDataSource_Unchecked (object sender, RoutedEventArgs e)
void | ChkItemsViewMethods_Checked (object sender, RoutedEventArgs e)
void | ChkItemsViewMethods_Unchecked (object sender, RoutedEventArgs e)
void | ChkItemsViewProperties_Checked (object sender, RoutedEventArgs e)
void | ChkItemsViewProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayoutShowLockedItems_Checked (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayoutShowLockedItems_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemContainerMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemContainerMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogLinedFlowLayoutMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogLinedFlowLayoutMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkPageMethods_Checked (object sender, RoutedEventArgs e)
void | ChkPageMethods_Unchecked (object sender, RoutedEventArgs e)
void | ChkShowCurrentElement_Checked (object sender, RoutedEventArgs e)
void | ChkShowCurrentElement_Unchecked (object sender, RoutedEventArgs e)
void | ChkShowKeyboardNavigationReferenceOffset_Checked (object sender, RoutedEventArgs e)
void | ChkShowKeyboardNavigationReferenceOffset_Unchecked (object sender, RoutedEventArgs e)
void | ClearFullLog ()
void | CmbBackground_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbBorderBrush_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsSource_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLayout_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLinedFlowLayoutItemsJustification_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLinedFlowLayoutItemsStretch_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbSelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbTabNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbUniformGridLayoutItemsJustification_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbUniformGridLayoutItemsStretch_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbXYFocusKeyboardNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | DataSourceAddItem ()
void | DataSourceInsertItem (int newItemIndex)
void | DataSourceRemoveAllItems ()
void | DataSourceRemoveItem (int oldItemIndex)
void | DataSourceReplaceItem (int itemIndex)
void | DataSourceReplaceItemContent (int itemIndex)
void | ExecuteQueuedOperations ()
string | GetCaptionText (Image image)
CornerRadius | GetCornerRadiusFromString (string cornerRadius)
void | GetFullLog ()
Image | GetImageAsItemsSourceItem (int itemIndex)
ItemContainer | GetItemContainerAsItemsSourceItem (int itemIndex)
UIElement | GetItemsRepeaterElement (ItemsRepeater itemsRepeater, int index)
int | GetItemsRepeaterElementIndex (FrameworkElement element)
UIElement | GetItemsRepeaterMethodElement (ItemsRepeater itemsRepeater)
UIElement | GetItemsRepeaterPropertyElement (ItemsRepeater itemsRepeater)
UIElement | GetLinedFlowLayoutMethodElement (ItemsRepeater itemsRepeater)
Thickness | GetThicknessFromString (string thickness)
void | HookItemsRepeaterEvents (ItemsRepeater itemsRepeater)
void | HookItemsViewEvents ()
void | HookLinedFlowLayoutEvents (LinedFlowLayout linedFlowLayout)
void | HookScrollViewEvents (ScrollView scrollView)
void | Image_ImageFailed (object sender, ExceptionRoutedEventArgs e)
void | Image_ImageOpened (object sender, RoutedEventArgs e)
void | ItemsRepeater_ElementClearing (ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
void | ItemsRepeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | ItemsRepeater_LayoutUpdated (object sender, object e)
void | ItemsRepeater_Loaded (object sender, RoutedEventArgs e)
void | ItemsRepeater_SizeChanged (object sender, SizeChangedEventArgs e)
void | ItemsView_CurrentItemIndexChanged (DependencyObject o, DependencyProperty p)
void | ItemsView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ItemsView_GotFocus (object sender, RoutedEventArgs e)
void | ItemsView_ItemInvoked (ItemsView sender, ItemsViewItemInvokedEventArgs args)
void | ItemsView_Loaded (object sender, RoutedEventArgs e)
void | ItemsView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ItemsView_LostFocus (object sender, RoutedEventArgs e)
void | ItemsView_PointerWheelChanged (object sender, PointerRoutedEventArgs args)
void | ItemsView_SelectionChanged (ItemsView sender, ItemsViewSelectionChangedEventArgs args)
void | ItemsView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ItemsViewSetHeight (double value)
void | ItemsViewSetWidth (double value)
void | ItemsViewStartBringItemIntoView ()
void | ItemsViewSummaryPage_KeyDown (object sender, KeyRoutedEventArgs e)
void | ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged (ItemsView itemsView, object args)
void | LayoutsTestHooks_LinedFlowLayoutInvalidated (object sender, LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs args)
void | LayoutsTestHooks_LinedFlowLayoutItemLocked (object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
void | LayoutsTestHooks_LinedFlowLayoutItemLocked2 (object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
void | LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged (object sender, object args)
void | LinedFlowLayout_ItemsInfoRequested (LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
void | LinedFlowLayout_ItemsUnlocked (LinedFlowLayout sender, object args)
void | LogItemsRepeaterInfo ()
void | LogItemsViewInfo ()
void | LogScrollViewInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | QueuedOperationsTimer_Tick (object sender, object e)
void | ScrollView_BringingIntoView (ScrollView sender, ScrollingBringingIntoViewEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_Loaded (object sender, RoutedEventArgs e)
void | ScrollView_PointerWheelChanged (object sender, PointerRoutedEventArgs args)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ViewChangedForCurrentElementVisual (ScrollView sender, object args)
void | ScrollView_ViewChangedForLockedItemsVisuals (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompleted (ScrollView sender, ScrollingZoomCompletedEventArgs args)
string | SetCaptionColor (Image image, Brush brush)
void | UIElement_DragStarting (UIElement sender, DragStartingEventArgs args)
void | UnhookItemsRepeaterEvents (ItemsRepeater itemsRepeater)
void | UnhookItemsViewEvents ()
void | UnhookLinedFlowLayoutEvents (LinedFlowLayout linedFlowLayout)
void | UnhookScrollViewEvents (ScrollView scrollView)
void | UpdateBackground ()
void | UpdateBorderBrush ()
void | UpdateBorderThickness ()
void | UpdateContentOrientation ()
void | UpdateCornerRadius ()
void | UpdateCurrentItemIndex ()
void | UpdateDataSourceItemCount ()
void | UpdateExtentHeight ()
void | UpdateExtentWidth ()
void | UpdateHeight ()
void | UpdateHorizontalAnchorRatio ()
void | UpdateHorizontalOffset ()
void | UpdateHorizontalScrollBarVisibility ()
void | UpdateHorizontalScrollMode ()
void | UpdateIsEnabled ()
void | UpdateIsTabStop ()
void | UpdateItemsRepeaterChildrenCount ()
void | UpdateItemsRepeaterDefaultCacheLengths ()
void | UpdateItemsRepeaterElementActualHeight ()
void | UpdateItemsRepeaterElementActualWidth ()
void | UpdateItemsRepeaterElementDesiredSize ()
void | UpdateItemsRepeaterElementHeight ()
void | UpdateItemsRepeaterElementIsEnabled ()
void | UpdateItemsRepeaterElementMaxHeight ()
void | UpdateItemsRepeaterElementMaxWidth ()
void | UpdateItemsRepeaterElementMinHeight ()
void | UpdateItemsRepeaterElementMinWidth ()
void | UpdateItemsRepeaterElementRenderSize ()
void | UpdateItemsRepeaterElementWidth ()
void | UpdateItemsRepeaterFields ()
void | UpdateItemsRepeaterHorizontalAlignment ()
void | UpdateItemsRepeaterHorizontalCacheLength ()
void | UpdateItemsRepeaterItemContainerCanUserInvoke ()
void | UpdateItemsRepeaterItemContainerCanUserSelect ()
void | UpdateItemsRepeaterItemContainerIsSelected ()
void | UpdateItemsRepeaterLogItemIndexDbg ()
void | UpdateItemsRepeaterVerticalAlignment ()
void | UpdateItemsRepeaterVerticalCacheLength ()
void | UpdateItemsViewCurrentElementVisual (bool log)
void | UpdateItemsViewIsItemInvokedEnabled ()
void | UpdateItemsViewKeyboardNavigationReferenceOffsetVisual (bool log)
void | UpdateItemsViewLayout ()
void | UpdateItemsViewSelectionMode ()
void | UpdateLinedFlowLayoutActualLineHeight ()
void | UpdateLinedFlowLayoutAverageItemAspectRatioDbg ()
void | UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg ()
void | UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg ()
void | UpdateLinedFlowLayoutForcedWrapMultiplierDbg ()
void | UpdateLinedFlowLayoutFrozenItemIndexes ()
void | UpdateLinedFlowLayoutIsFastPathSupportedDbg ()
void | UpdateLinedFlowLayoutItemsJustification ()
void | UpdateLinedFlowLayoutItemsStretch ()
void | UpdateLinedFlowLayoutLineHeight ()
void | UpdateLinedFlowLayoutLineSpacing ()
void | UpdateLinedFlowLayoutLockedItemsVisuals ()
void | UpdateLinedFlowLayoutLogItemIndexDbg ()
void | UpdateLinedFlowLayoutMinItemSpacing ()
void | UpdateLinedFlowLayoutRealizedItemIndexes ()
void | UpdateLinedFlowLayoutRequestedRangeLength ()
void | UpdateLinedFlowLayoutRequestedRangeStartIndex ()
void | UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg ()
void | UpdateMargin ()
void | UpdateMaxHeight ()
void | UpdateMaxWidth ()
void | UpdatePadding ()
void | UpdateScrollViewDefaultAnchorRatios ()
void | UpdateScrollViewFields ()
void | UpdateSelectedItem ()
void | UpdateSelectedItems ()
void | UpdateStackLayoutOrientation ()
void | UpdateStackLayoutSpacing ()
void | UpdateTabNavigation ()
void | UpdateUniformGridLayoutMaximumRowsOrColumns ()
void | UpdateUniformGridLayoutMinColumnSpacing ()
void | UpdateUniformGridLayoutMinRowSpacing ()
void | UpdateUniformGridLayoutOrientation ()
void | UpdateVerticalAnchorRatio ()
void | UpdateVerticalOffset ()
void | UpdateVerticalScrollBarVisibility ()
void | UpdateVerticalScrollMode ()
void | UpdateWidth ()
void | UpdateXYFocusKeyboardNavigation ()
void | UpdateZoomFactor ()
void | UpdateZoomMode ()
void | UseItemsView (ItemsView iv)

Private Attributes

object | _asyncEventReportingLock = new object()
ObservableCollection< Entity > | _colEntities = null
ObservableCollection< Entity > | _colSmallEntities = null
ObservableCollection< Image > | _colSmallImages = null
ObservableCollection
< ItemContainer > 		_colSmallItemContainers = null
ObservableCollection< Entity > | _colSmallUniformEntities = null
long | _currentItemIndexChangedToken
ItemsView | _dynamicItemsView = null
DataTemplate[] | _entityTemplates = new DataTemplate[17]
FlowLayout | _flowLayout = null
List< string > | _fullLogs = new List<string>()
ItemsView | _itemsView = null
PointerEventHandler | _itemsViewPointerWheelChangedEventHandler = null
LinedFlowLayout | _linedFlowLayout = null
string | _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus."
List< string > | _lstAsyncEventMessage = new List<string>()
List< Entity > | _lstEntities = null
List< int > | _lstLinedFlowLayoutLockedItemIndexes = new List<int>()
List< QueuedOperation > | _lstQueuedOperations = new List<QueuedOperation>()
DispatcherTimer | _queuedOperationsTimer = new DispatcherTimer()
SolidColorBrush | _redBrush = new SolidColorBrush(Colors.Red)
PointerEventHandler | _scrollViewPointerWheelChangedEventHandler = null
StackLayout | _stackLayout = null
UniformGridLayout | _uniformGridLayout = null
SolidColorBrush | _whiteBrush = new SolidColorBrush(Colors.White)

Detailed Description

Definition at line 21 of file ItemsViewSummaryPage.xaml.cs.

Member Enumeration Documentation

enum QueuedOperationType [private]
Enumerator:
SetWidth
SetHeight
StartBringItemIntoView
DataSourceAdd
DataSourceInsert
DataSourceRemove
DataSourceRemoveAll
DataSourceReplace

Definition at line 23 of file ItemsViewSummaryPage.xaml.cs.

        {
            SetWidth,
            SetHeight,
            StartBringItemIntoView,
            DataSourceAdd,
            DataSourceInsert,
            DataSourceRemove,
            DataSourceRemoveAll,
            DataSourceReplace
        }

Constructor & Destructor Documentation

ItemsViewSummaryPage ( ) [inline]

Definition at line 92 of file ItemsViewSummaryPage.xaml.cs.

        {
            this.InitializeComponent();

            UseItemsView(markupItemsView);

            if (chkLogItemsViewMessages.IsChecked == false &&
                (chkLogScrollViewMessages.IsChecked == true || chkLogItemsRepeaterMessages.IsChecked == true || chkLogLinedFlowLayoutMessages.IsChecked == true))
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogLinedFlowLayoutMessages.IsChecked == true)
                {
                    LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
                    LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
                    LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;

                    MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogItemsRepeaterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }

            if (chkItemsViewMethods != null && svItemsViewMethods != null)
            {
                svItemsViewMethods.Visibility = chkItemsViewMethods.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
            }

            _queuedOperationsTimer.Interval = new TimeSpan(0, 0, 4 /*sec*/);
            _queuedOperationsTimer.Tick += QueuedOperationsTimer_Tick;

            LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked2;

            this.KeyDown += ItemsViewSummaryPage_KeyDown;
        }

~ItemsViewSummaryPage ( ) [inline, private]

Definition at line 134 of file ItemsViewSummaryPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 6152 of file ItemsViewSummaryPage.xaml.cs.

        {
            lock (_asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    _lstAsyncEventMessage.Add(msgHead);
                }
                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 6185 of file ItemsViewSummaryPage.xaml.cs.

        {
            lock (_asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in _lstAsyncEventMessage)
                {
                    AppendEventMessage(asyncEventMessage);
                }
                _lstAsyncEventMessage.Clear();
            }
        }

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 6197 of file ItemsViewSummaryPage.xaml.cs.

        {
            lstLogs.Items.Add(eventMessage);
            _fullLogs.Add(eventMessage);

            if ((bool)chkOutputDebugString.IsChecked)
            {
                System.Diagnostics.Debug.WriteLine(eventMessage);
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 6230 of file ItemsViewSummaryPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5743 of file ItemsViewSummaryPage.xaml.cs.

        {
            ClearFullLog();
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5748 of file ItemsViewSummaryPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnCopyItemsViewEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5753 of file ItemsViewSummaryPage.xaml.cs.

        {
            string logs = string.Empty;

            foreach (object log in lstLogs.Items)
            {
                logs += log.ToString() + "\n";
            }

            var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
            dataPackage.SetText(logs);
            Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
        }

void BtnCreateDynamicItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5647 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                _dynamicItemsView = new ItemsView();
                _dynamicItemsView.Name = "dynamicItemsView";
                _dynamicItemsView.Width = 300.0;
                _dynamicItemsView.Height = 400.0;
                _dynamicItemsView.Margin = new Thickness(1);
                _dynamicItemsView.Background = new SolidColorBrush(Colors.HotPink);
                _dynamicItemsView.VerticalAlignment = VerticalAlignment.Top;
                Grid.SetRow(_dynamicItemsView, 1);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceAddItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5429 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage("DataSourceAdd");
            DataSourceAddItem();
        }

void BtnDataSourceGetItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4846 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateDataSourceItemCount();
        }

void BtnDataSourceInsertItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5450 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendAsyncEventMessage("DataSourceInsert " + newItemIndex);
                    DataSourceInsertItem(newItemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceRemoveAllItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5489 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage("DataSourceRemoveAll");
            DataSourceRemoveAllItems();
        }

void BtnDataSourceRemoveItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5510 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendAsyncEventMessage("DataSourceRemove " + oldItemIndex);
                    DataSourceRemoveItem(oldItemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceReplaceItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5549 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int itemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendAsyncEventMessage("DataSourceReplace " + itemIndex);
                    DataSourceReplaceItem(itemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceReplaceItemContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5568 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int itemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendAsyncEventMessage("DataSourceReplace Content " + itemIndex);
                    DataSourceReplaceItemContent(itemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceSetItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4851 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtDataSourceItemCount != null)
                {
                    int newItemCount = int.Parse(txtDataSourceItemCount.Text);
                    var rnd = new Random();

                    if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _lstEntities)
                    {
                        bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _lstEntities;
                        int currentItemCount = _lstEntities == null ? 0 : _lstEntities.Count;

                        if (currentItemCount < newItemCount)
                        {
                            var lstEntitiesEnd = new List<Entity>();

                            for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
                            {
                                lstEntitiesEnd.Add(new Entity() {
                                    ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
                                    Id = itemIndex,
                                    Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(25, 125))
                                });
                            }

                            if (currentItemCount == 0)
                            {
                                _lstEntities = lstEntitiesEnd;
                            }
                            else
                            {
                                _lstEntities = new List<Entity>(_lstEntities.Concat(lstEntitiesEnd));
                            }
                        }
                        else if (currentItemCount > newItemCount)
                        {
                            _lstEntities = new List<Entity>(_lstEntities.Take(newItemCount));
                        }

                        if (setItemsSource)
                        {
                            _itemsView.ItemsSource = _lstEntities;
                        }
                    }

                    if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallEntities)
                    {
                        bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallEntities;
                        int currentItemCount = _colSmallEntities == null ? 0 : _colSmallEntities.Count;

                        if (currentItemCount < newItemCount)
                        {
                            var colEntitiesEnd = new ObservableCollection<Entity>();

                            for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
                            {
                                colEntitiesEnd.Add(new Entity() {
                                    ImageUri = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6)),
                                    Id = itemIndex,
                                    Description = itemIndex.ToString()
                                });
                            }

                            if (currentItemCount == 0)
                            {
                                _colSmallEntities = colEntitiesEnd;
                            }
                            else
                            {
                                _colSmallEntities = new ObservableCollection<Entity>(_colSmallEntities.Concat(colEntitiesEnd));
                            }
                        }
                        else if (currentItemCount > newItemCount)
                        {
                            _colSmallEntities = new ObservableCollection<Entity>(_colSmallEntities.Take(newItemCount));
                        }

                        if (setItemsSource)
                        {
                            _itemsView.ItemsSource = _colSmallEntities;
                        }
                    }

                    if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallUniformEntities)
                    {
                        bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallUniformEntities;
                        int currentItemCount = _colSmallUniformEntities == null ? 0 : _colSmallUniformEntities.Count;

                        if (currentItemCount < newItemCount)
                        {
                            var colEntitiesEnd = new ObservableCollection<Entity>();

                            for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
                            {
                                colEntitiesEnd.Add(new Entity() {
                                    ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
                                    Id = itemIndex,
                                    Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                                });
                            }

                            if (currentItemCount == 0)
                            {
                                _colSmallUniformEntities = colEntitiesEnd;
                            }
                            else
                            {
                                _colSmallUniformEntities = new ObservableCollection<Entity>(_colSmallUniformEntities.Concat(colEntitiesEnd));
                            }
                        }
                        else if (currentItemCount > newItemCount)
                        {
                            _colSmallUniformEntities = new ObservableCollection<Entity>(_colSmallUniformEntities.Take(newItemCount));
                        }

                        if (setItemsSource)
                        {
                            _itemsView.ItemsSource = _colSmallUniformEntities;
                        }
                    }

                    if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colEntities)
                    {
                        bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colEntities;
                        int currentItemCount = _colEntities == null ? 0 : _colEntities.Count;

                        if (currentItemCount < newItemCount)
                        {
                            var colEntitiesEnd = new ObservableCollection<Entity>();

                            for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
                            {
                                colEntitiesEnd.Add(new Entity() {
                                    ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
                                    Id = itemIndex,
                                    Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                                });
                            }

                            if (currentItemCount == 0)
                            {
                                _colEntities = colEntitiesEnd;
                            }
                            else
                            {
                                _colEntities = new ObservableCollection<Entity>(_colEntities.Concat(colEntitiesEnd));
                            }
                        }
                        else if (currentItemCount > newItemCount)
                        {
                            _colEntities = new ObservableCollection<Entity>(_colEntities.Take(newItemCount));
                        }

                        if (setItemsSource)
                        {
                            _itemsView.ItemsSource = _colEntities;
                        }
                    }

                    if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallItemContainers)
                    {
                        bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallItemContainers;
                        int currentItemCount = _colSmallItemContainers == null ? 0 : _colSmallItemContainers.Count;

                        if (currentItemCount < newItemCount)
                        {
                            var colItemContainersEnd = new ObservableCollection<ItemContainer>();

                            for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
                            {
                                ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(itemIndex);

                                colItemContainersEnd.Add(itemContainer);
                            }

                            if (currentItemCount == 0)
                            {
                                _colSmallItemContainers = colItemContainersEnd;
                            }
                            else
                            {
                                _colSmallItemContainers = new ObservableCollection<ItemContainer>(_colSmallItemContainers.Concat(colItemContainersEnd));
                            }
                        }
                        else if (currentItemCount > newItemCount)
                        {
                            _colSmallItemContainers = new ObservableCollection<ItemContainer>(_colSmallItemContainers.Take(newItemCount));
                        }

                        if (setItemsSource)
                        {
                            _itemsView.ItemsSource = _colSmallItemContainers;
                        }
                    }

                    if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallImages)
                    {
                        bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallImages;
                        int currentItemCount = _colSmallImages == null ? 0 : _colSmallImages.Count;

                        if (currentItemCount < newItemCount)
                        {
                            var colImagesEnd = new ObservableCollection<Image>();

                            for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
                            {
                                Image image = GetImageAsItemsSourceItem(itemIndex);

                                colImagesEnd.Add(image);
                            }

                            if (currentItemCount == 0)
                            {
                                _colSmallImages = colImagesEnd;
                            }
                            else
                            {
                                _colSmallImages = new ObservableCollection<Image>(_colSmallImages.Concat(colImagesEnd));
                            }
                        }
                        else if (currentItemCount > newItemCount)
                        {
                            _colSmallImages = new ObservableCollection<Image>(_colSmallImages.Take(newItemCount));
                        }

                        if (setItemsSource)
                        {
                            _itemsView.ItemsSource = _colSmallImages;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDeselect_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3170 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtSelectionIndex != null)
                {
                    int index = -1;

                    int.TryParse(txtSelectionIndex.Text, out index);

                    _itemsView.Deselect(index);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDeselectAll_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3098 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.DeselectAll();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDiscardQueuedOperations_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5732 of file ItemsViewSummaryPage.xaml.cs.

        {
            _lstQueuedOperations.Clear();
            AppendAsyncEventMessage("Queued operations cleared.");
        }

void BtnExecuteQueuedOperations_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5727 of file ItemsViewSummaryPage.xaml.cs.

        {
            ExecuteQueuedOperations();
        }

void BtnGetBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2469 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateBorderThickness();
        }

void BtnGetContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2474 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateContentOrientation();
        }

void BtnGetCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2479 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateCornerRadius();
        }

void BtnGetCurrentItemIndex_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2484 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateCurrentItemIndex();
        }

void BtnGetExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2489 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateExtentHeight();
        }

void BtnGetExtentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2494 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateExtentWidth();
        }

void BtnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5738 of file ItemsViewSummaryPage.xaml.cs.

        {
            GetFullLog();
        }

void BtnGetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2499 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateHeight();
        }

void BtnGetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2504 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateHorizontalAnchorRatio();
        }

void BtnGetHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2509 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateHorizontalOffset();
        }

void BtnGetHorizontalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2519 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateHorizontalScrollBarVisibility();
        }

void BtnGetHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2514 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateHorizontalScrollMode();
        }

void BtnGetItemsRepeaterChildrenCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2524 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterChildrenCount();
        }

void BtnGetItemsRepeaterElementActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2740 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementActualHeight();
        }

void BtnGetItemsRepeaterElementActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2745 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementActualWidth();
        }

void BtnGetItemsRepeaterElementDesiredSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2765 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementDesiredSize();
        }

void BtnGetItemsRepeaterElementHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2790 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementHeight();
        }

void BtnGetItemsRepeaterElementIsEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2750 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementIsEnabled();
        }

void BtnGetItemsRepeaterElementMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2785 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementMaxHeight();
        }

void BtnGetItemsRepeaterElementMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2760 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementMaxWidth();
        }

void BtnGetItemsRepeaterElementMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2780 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementMinHeight();
        }

void BtnGetItemsRepeaterElementMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2755 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementMinWidth();
        }

void BtnGetItemsRepeaterElementRenderSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2770 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementRenderSize();
        }

void BtnGetItemsRepeaterElementWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2775 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterElementWidth();
        }

void BtnGetItemsRepeaterHorizontalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2529 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterHorizontalAlignment();
        }

void BtnGetItemsRepeaterHorizontalCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2534 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterHorizontalCacheLength();
        }

void BtnGetItemsRepeaterItemContainerCanUserInvoke_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2837 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterItemContainerCanUserInvoke();
        }

void BtnGetItemsRepeaterItemContainerCanUserSelect_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2842 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterItemContainerCanUserSelect();
        }

void BtnGetItemsRepeaterItemContainerIsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2847 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterItemContainerIsSelected();
        }

void BtnGetItemsRepeaterLogItemIndexDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2539 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterLogItemIndexDbg();
        }

void BtnGetItemsRepeaterVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2544 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterVerticalAlignment();
        }

void BtnGetItemsRepeaterVerticalCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2549 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterVerticalCacheLength();
        }

void BtnGetLayoutForcedIndexBasedLayoutOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2554 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    Layout layout = _itemsView.Layout;

                    if (layout != null)
                    {
                        cmbLayoutForcedIndexBasedLayoutOrientation.SelectedIndex = (int)LayoutsTestHooks.GetLayoutForcedIndexBasedLayoutOrientation(layout);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetLinedFlowLayoutActualLineHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2615 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutActualLineHeight();
        }

void BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2625 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
        }

void BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2630 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
        }

void BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2635 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
        }

void BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2640 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
        }

void BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2645 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutFrozenItemIndexes();
        }

void BtnGetLinedFlowLayoutLineHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2650 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutLineHeight();
        }

void BtnGetLinedFlowLayoutLineSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2655 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutLineSpacing();
        }

void BtnGetLinedFlowLayoutLogItemIndexDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2660 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutLogItemIndexDbg();
        }

void BtnGetLinedFlowLayoutMinItemSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2665 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutMinItemSpacing();
        }

void BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2670 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutRealizedItemIndexes();
        }

void BtnGetLinedFlowLayoutRequestedRangeLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2675 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutRequestedRangeLength();
        }

void BtnGetLinedFlowLayoutRequestedRangeStartIndex_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2680 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutRequestedRangeStartIndex();
        }

void BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2620 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
        }

void BtnGetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2575 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateMargin();
        }

void BtnGetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2580 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateMaxHeight();
        }

void BtnGetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2585 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateMaxWidth();
        }

void BtnGetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2590 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdatePadding();
        }

void BtnGetSelectedItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2595 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateSelectedItem();
        }

void BtnGetSelectedItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2600 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateSelectedItems();
        }

void BtnGetStackLayoutOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2605 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateStackLayoutOrientation();
        }

void BtnGetStackLayoutSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2610 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateStackLayoutSpacing();
        }

void BtnGetUniformGridLayoutMaximumRowsOrColumns_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2685 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateUniformGridLayoutMaximumRowsOrColumns();
        }

void BtnGetUniformGridLayoutMinColumnSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2690 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateUniformGridLayoutMinColumnSpacing();
        }

void BtnGetUniformGridLayoutMinRowSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2695 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateUniformGridLayoutMinRowSpacing();
        }

void BtnGetUniformGridLayoutOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2700 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateUniformGridLayoutOrientation();
        }

void BtnGetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2705 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateVerticalAnchorRatio();
        }

void BtnGetVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2710 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateVerticalOffset();
        }

void BtnGetVerticalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2715 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateVerticalScrollBarVisibility();
        }

void BtnGetVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2720 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateVerticalScrollMode();
        }

void BtnGetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2725 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateWidth();
        }

void BtnGetZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2730 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateZoomFactor();
        }

void BtnGetZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2735 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateZoomMode();
        }

void BtnInvertSelection_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3114 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.InvertSelection();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnIsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3130 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtIsSelected != null && txtSelectionIndex != null)
                {
                    int index = -1;

                    int.TryParse(txtSelectionIndex.Text, out index);

                    txtIsSelected.Text = _itemsView.IsSelected(index).ToString();;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnItemsRepeaterElementInvalidateArrange_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2816 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterMethodElement(itemsRepeater);
                    if (element != null)
                    {
                        element.InvalidateArrange();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnItemsRepeaterElementInvalidateMeasure_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2795 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterMethodElement(itemsRepeater);
                    if (element != null)
                    {
                        element.InvalidateMeasure();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnItemsViewStartBringItemIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2873 of file ItemsViewSummaryPage.xaml.cs.

        {
            ItemsViewStartBringItemIntoView();
        }

void BtnItemsViewStartBringItemIntoViewAsync_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2950 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtItemsViewStartBringItemIntoViewAsyncCountdown != null)
                {
                    int startBringItemIntoViewAsyncCountdown = int.Parse(txtItemsViewStartBringItemIntoViewAsyncCountdown.Text);

                    _queuedOperationsTimer.Interval = new TimeSpan(0, 0, startBringItemIntoViewAsyncCountdown /*sec*/);
                }

                _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.StartBringItemIntoView));
                _queuedOperationsTimer.Start();
                AppendAsyncEventMessage("Queued StartBringItemIntoView");
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnItemsViewTryGetItemIndex_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2852 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    double horizontalViewportRatio = double.Parse(txtTryGetItemIndexHorizontalViewportRatio.Text);
                    double verticalViewportRatio = double.Parse(txtTryGetItemIndexVerticalViewportRatio.Text);
                    int index;
                    _itemsView.TryGetItemIndex(horizontalViewportRatio, verticalViewportRatio, out index);

                    txtItemsViewTryGetItemIndex.Text = index.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLayoutInvalidateMeasure_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2972 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                Layout layout = _itemsView == null ? null : _itemsView.Layout;

                if (layout != null)
                {
                    LayoutsTestHooks.LayoutInvalidateMeasure(layout, relayout: true);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLinedFlowLayoutClearItemAspectRatios_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3050 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    LayoutsTestHooks.ClearLinedFlowLayoutItemAspectRatios(_linedFlowLayout);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLinedFlowLayoutGetLineIndex_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3006 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    int itemIndex = -1;

                    int.TryParse(txtLinedFlowLayoutMethodIndex.Text, out itemIndex);

                    int lineIndex = LayoutsTestHooks.GetLinedFlowLayoutLineIndex(_linedFlowLayout, itemIndex);

                    txtLinedFlowLayoutLineIndex.Text = lineIndex.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLinedFlowLayoutInvalidateItemsInfo_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2990 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    _linedFlowLayout.InvalidateItemsInfo();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLinedFlowLayoutLockItemToLine_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3028 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    int itemIndex = -1;

                    int.TryParse(txtLinedFlowLayoutMethodIndex.Text, out itemIndex);

                    int lineIndex = _linedFlowLayout.LockItemToLine(itemIndex);

                    txtLinedFlowLayoutLockLine.Text = lineIndex.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLinedFlowLayoutUnlockItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3066 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    LayoutsTestHooks.UnlockLinedFlowLayoutItems(_linedFlowLayout);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnParentDynamicItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5667 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                root.Children.Add(_dynamicItemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnParentMarkupItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5607 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                root.Children.Add(markupItemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueDataSourceAddItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5435 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                AppendAsyncEventMessage("Queued DataSourceAdd");
                _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceAdd));
                _queuedOperationsTimer.Start();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueDataSourceInsertItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5469 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendAsyncEventMessage("Queued DataSourceInsert " + newItemIndex);
                    _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceInsert, newItemIndex));
                    _queuedOperationsTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueDataSourceRemoveAllItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5495 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                AppendAsyncEventMessage("Queued DataSourceRemoveAll");
                _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceRemoveAll));
                _queuedOperationsTimer.Start();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueDataSourceRemoveItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5529 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendAsyncEventMessage("Queued DataSourceRemove " + oldItemIndex);
                    _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceRemove, oldItemIndex));
                    _queuedOperationsTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueDataSourceReplaceItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5587 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int itemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendAsyncEventMessage("Queued DataSourceReplace " + itemIndex);
                    _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceReplace, itemIndex));
                    _queuedOperationsTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4363 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtHeight.Text);
                _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetHeight, value));
                AppendAsyncEventMessage("Queued SetHeight " + value);
                _queuedOperationsTimer.Start();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4347 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtWidth.Text);
                _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetWidth, value));
                AppendAsyncEventMessage("Queued SetWidth " + value);
                _queuedOperationsTimer.Start();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnReleaseDynamicItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5703 of file ItemsViewSummaryPage.xaml.cs.

        {
            _dynamicItemsView = null;

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }

void BtnResetLayoutForcedIndexBasedLayoutOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3598 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    Layout layout = _itemsView.Layout;

                    if (layout != null)
                    {
                        LayoutsTestHooks.ResetLayoutForcedIndexBasedLayoutOrientation(layout);
                        if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked)
                        {
                            UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSelect_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3150 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtSelectionIndex != null)
                {
                    int index = -1;

                    int.TryParse(txtSelectionIndex.Text, out index);

                    _itemsView.Select(index);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSelectAll_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3082 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.SelectAll();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3342 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.BorderThickness = GetThicknessFromString(txtBorderThickness.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3358 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;

                        scrollView.ContentOrientation = co;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3381 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                _itemsView.CornerRadius = GetCornerRadiusFromString(txtCornerRadius.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3394 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                ItemsViewSetHeight(Convert.ToDouble(txtHeight.Text));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3412 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        scrollView.HorizontalAnchorRatio = Convert.ToDouble(txtHorizontalAnchorRatio.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3433 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        scrollView.ScrollTo(Convert.ToDouble(txtHorizontalOffset.Text), scrollView.VerticalOffset);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetHorizontalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3454 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        scrollView.HorizontalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbHorizontalScrollBarVisibility.SelectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3475 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        ScrollingScrollMode ssm = (ScrollingScrollMode)cmbHorizontalScrollMode.SelectedIndex;

                        scrollView.HorizontalScrollMode = ssm;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterElementHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4229 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.Height = double.Parse(txtItemsRepeaterElementHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterElementIsEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4097 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is Control control)
                    {
                        control.IsEnabled = (bool)chkItemsRepeaterElementIsEnabled.IsChecked;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterElementMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4207 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MaxHeight = double.Parse(txtItemsRepeaterElementMaxHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterElementMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4141 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MaxWidth = double.Parse(txtItemsRepeaterElementMaxWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterElementMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4185 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MinHeight = double.Parse(txtItemsRepeaterElementMinHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterElementMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4119 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MinWidth = double.Parse(txtItemsRepeaterElementMinWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterElementWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4163 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.Width = double.Parse(txtItemsRepeaterElementWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterHorizontalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3498 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        itemsRepeater.HorizontalAlignment = (HorizontalAlignment)cmbItemsRepeaterHorizontalAlignment.SelectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterHorizontalCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3519 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        itemsRepeater.HorizontalCacheLength = Convert.ToDouble(txtItemsRepeaterHorizontalCacheLength.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterItemContainerCanUserInvoke_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4251 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is ItemContainer itemContainer)
                    {
#if MUX_PRERELEASE
                        if (chkItemsRepeaterItemContainerCanUserInvoke.IsChecked == null)
                        {
                            itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.Auto;
                        }
                        else if (chkItemsRepeaterItemContainerCanUserInvoke.IsChecked == true)
                        {
                            itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.Auto | ItemContainerUserInvokeMode.UserCanInvoke;
                        }
                        else
                        {
                            itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.Auto | ItemContainerUserInvokeMode.UserCannotInvoke;
                        }
#endif
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterItemContainerCanUserSelect_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4286 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is ItemContainer itemContainer)
                    {
#if MUX_PRERELEASE
                        if (chkItemsRepeaterItemContainerCanUserSelect.IsChecked == null)
                        {
                            itemContainer.CanUserSelect = ItemContainerUserSelectMode.Auto;
                        }
                        else if (chkItemsRepeaterItemContainerCanUserSelect.IsChecked == true)
                        {
                            itemContainer.CanUserSelect = ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect;
                        }
                        else
                        {
                            itemContainer.CanUserSelect = ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCannotSelect;
                        }
#endif
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterItemContainerIsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4321 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is ItemContainer itemContainer)
                    {
                        itemContainer.IsSelected = (bool)chkItemsRepeaterItemContainerIsSelected.IsChecked;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterLogItemIndexDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3540 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (txtItemsRepeaterLogItemIndexDbg != null)
                {
                    RepeaterTestHooks.SetLogItemIndex(Convert.ToInt32(txtItemsRepeaterLogItemIndexDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3556 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        itemsRepeater.VerticalAlignment = (VerticalAlignment)cmbItemsRepeaterVerticalAlignment.SelectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsRepeaterVerticalCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3577 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        itemsRepeater.VerticalCacheLength = Convert.ToDouble(txtItemsRepeaterVerticalCacheLength.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutForcedIndexBasedLayoutOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3623 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    Layout layout = _itemsView.Layout;

                    if (layout != null)
                    {
                        LayoutsTestHooks.SetLayoutForcedIndexBasedLayoutOrientation(layout, (IndexBasedLayoutOrientation)cmbLayoutForcedIndexBasedLayoutOrientation.SelectedIndex);
                        if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked)
                        {
                            UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3706 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemAspectRatio(_linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3722 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemsPerLineDivider(_linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3738 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutForcedWrapMultiplier(_linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedWrapMultiplierDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutLineHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3754 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    _linedFlowLayout.LineHeight = Convert.ToDouble(txtLinedFlowLayoutLineHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutLineSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3770 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    _linedFlowLayout.LineSpacing = Convert.ToDouble(txtLinedFlowLayoutLineSpacing.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutLogItemIndexDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3786 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutLogItemIndex(_linedFlowLayout, Convert.ToInt32(txtLinedFlowLayoutLogItemIndexDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutMinItemSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3802 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    _linedFlowLayout.MinItemSpacing = Convert.ToDouble(txtLinedFlowLayoutMinItemSpacing.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3648 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.Margin = GetThicknessFromString(txtMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3664 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                _itemsView.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3677 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                _itemsView.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3690 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.Padding = GetThicknessFromString(txtPadding.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetStackLayoutOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3818 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_stackLayout != null)
                {
                    _stackLayout.Orientation = cmbStackLayoutOrientation.SelectedIndex == 0 ? Orientation.Horizontal : Orientation.Vertical;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetStackLayoutSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3834 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_stackLayout != null)
                {
                    _stackLayout.Spacing = Convert.ToDouble(txtStackLayoutSpacing.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetUniformGridLayoutMaximumRowsOrColumns_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3850 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_uniformGridLayout != null)
                {
                    _uniformGridLayout.MaximumRowsOrColumns = Convert.ToInt32(txtUniformGridLayoutMaximumRowsOrColumns.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetUniformGridLayoutMinColumnSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3866 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_uniformGridLayout != null)
                {
                    _uniformGridLayout.MinColumnSpacing = Convert.ToDouble(txtUniformGridLayoutMinColumnSpacing.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetUniformGridLayoutMinRowSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3882 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_uniformGridLayout != null)
                {
                    _uniformGridLayout.MinRowSpacing = Convert.ToDouble(txtUniformGridLayoutMinRowSpacing.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetUniformGridLayoutOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3898 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_uniformGridLayout != null)
                {
                    _uniformGridLayout.Orientation = (Orientation)cmbUniformGridLayoutOrientation.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3914 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        scrollView.VerticalAnchorRatio = Convert.ToDouble(txtVerticalAnchorRatio.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetVerticalConstantVelocity_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3935 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        float verticalConstantVelocity = float.Parse(this.txtVerticalConstantVelocity.Text);

                        if (verticalConstantVelocity == 0.0f)
                        {
                            scrollView.ScrollBy(0, 0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                        }
                        else
                        {
                            scrollView.AddScrollVelocity(new System.Numerics.Vector2(0.0f, verticalConstantVelocity), new System.Numerics.Vector2(0.0f, 0.0f));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3965 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        scrollView.ScrollTo(scrollView.HorizontalOffset, Convert.ToDouble(txtVerticalOffset.Text));
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetVerticalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3986 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        scrollView.VerticalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbVerticalScrollBarVisibility.SelectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4007 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        ScrollingScrollMode ssm = (ScrollingScrollMode)cmbVerticalScrollMode.SelectedIndex;

                        scrollView.VerticalScrollMode = ssm;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4030 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                ItemsViewSetWidth(Convert.ToDouble(txtWidth.Text));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4053 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        scrollView.ZoomTo(float.Parse(txtZoomFactor.Text), null);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4074 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        ScrollingZoomMode szm = (ScrollingZoomMode)cmbZoomMode.SelectedIndex;

                        scrollView.ZoomMode = szm;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnShareLinedFlowLayout_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5711 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null && _dynamicItemsView != null)
                {
                    _dynamicItemsView.Layout = _linedFlowLayout;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnUnparentDynamicItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5680 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                root.Children.Remove(_dynamicItemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnUnparentMarkupItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5620 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                root.Children.Remove(markupItemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnUnparentReparentMarkupItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5633 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                root.Children.Remove(markupItemsView);
                root.Children.Add(markupItemsView);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnUseDynamicItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5698 of file ItemsViewSummaryPage.xaml.cs.

        {
            UseItemsView(_dynamicItemsView);
        }

void BtnUseMarkupItemsView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5693 of file ItemsViewSummaryPage.xaml.cs.

        {
            UseItemsView(markupItemsView);
        }

void ChkChildrenProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4786 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (svChildrenProperties != null)
                svChildrenProperties.Visibility = Visibility.Visible;
        }

void ChkChildrenProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4792 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (svChildrenProperties != null)
                svChildrenProperties.Visibility = Visibility.Collapsed;
        }

void ChkIsEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3194 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.IsEnabled = true;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkIsEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3210 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.IsEnabled = false;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkIsItemInvokedEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4381 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                _itemsView.IsItemInvokedEnabled = true;
            }
        }

void ChkIsItemInvokedEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4389 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                _itemsView.IsItemInvokedEnabled = false;
            }
        }

void ChkIsTabStop_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3226 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.IsTabStop = true;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkIsTabStop_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3242 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    _itemsView.IsTabStop = false;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkItemsViewDataSource_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4834 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (grdItemsViewDataSource != null)
                grdItemsViewDataSource.Visibility = Visibility.Visible;
        }

void ChkItemsViewDataSource_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4840 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (grdItemsViewDataSource != null)
                grdItemsViewDataSource.Visibility = Visibility.Collapsed;
        }

void ChkItemsViewMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4798 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (svItemsViewMethods != null)
                svItemsViewMethods.Visibility = Visibility.Visible;
        }

void ChkItemsViewMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4804 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (svItemsViewMethods != null)
                svItemsViewMethods.Visibility = Visibility.Collapsed;
        }

void ChkItemsViewProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4774 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (svItemsViewProperties != null)
                svItemsViewProperties.Visibility = Visibility.Visible;
        }

void ChkItemsViewProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4780 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (svItemsViewProperties != null)
                svItemsViewProperties.Visibility = Visibility.Collapsed;
        }

void ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3258 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutIsFastPathSupported(_linedFlowLayout, (bool)chkLinedFlowLayoutIsFastPathSupportedDbg.IsChecked);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkLinedFlowLayoutShowLockedItems_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3274 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutLockedItemsVisuals();

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

            if (scrollView != null)
            {
                scrollView.ViewChanged += ScrollView_ViewChangedForLockedItemsVisuals;
            }
        }

void ChkLinedFlowLayoutShowLockedItems_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3286 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutLockedItemsVisuals();

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

            if (scrollView != null)
            {
                scrollView.ViewChanged -= ScrollView_ViewChangedForLockedItemsVisuals;
            }
        }

void ChkLogItemContainerMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5913 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemContainerMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5923 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5873 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5883 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5835 of file ItemsViewSummaryPage.xaml.cs.

        {
            HookItemsViewEvents();
        }

void ChkLogItemsViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5840 of file ItemsViewSummaryPage.xaml.cs.

        {
            UnhookItemsViewEvents();
        }

void ChkLogItemsViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5933 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5943 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogLinedFlowLayoutMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5845 of file ItemsViewSummaryPage.xaml.cs.

        {
            LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
            LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
            LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;

            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogLinedFlowLayoutMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5859 of file ItemsViewSummaryPage.xaml.cs.

        {
            LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
            LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
            LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;

            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogScrollViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4810 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4816 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5819 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                HookScrollViewEvents(ItemsViewTestHooks.GetScrollViewPart(_itemsView));
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5827 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                UnhookScrollViewEvents(ItemsViewTestHooks.GetScrollViewPart(_itemsView));
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5893 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 5903 of file ItemsViewSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogLinedFlowLayoutMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkPageMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4822 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (grdPageMethods != null)
                grdPageMethods.Visibility = Visibility.Visible;
        }

void ChkPageMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4828 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (grdPageMethods != null)
                grdPageMethods.Visibility = Visibility.Collapsed;
        }

void ChkShowCurrentElement_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3298 of file ItemsViewSummaryPage.xaml.cs.

        {
            _currentItemIndexChangedToken = _itemsView.RegisterPropertyChangedCallback(
                                                            ItemsView.CurrentItemIndexProperty,
                                                            new DependencyPropertyChangedCallback(ItemsView_CurrentItemIndexChanged));

            UpdateItemsViewCurrentElementVisual(log: true);

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

            if (scrollView != null)
            {
                scrollView.ViewChanged += ScrollView_ViewChangedForCurrentElementVisual;
            }
        }

void ChkShowCurrentElement_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3314 of file ItemsViewSummaryPage.xaml.cs.

        {
            _itemsView.UnregisterPropertyChangedCallback(ItemsView.CurrentItemIndexProperty, _currentItemIndexChangedToken);

            UpdateItemsViewCurrentElementVisual(log: false);

            ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

            if (scrollView != null)
            {
                scrollView.ViewChanged -= ScrollView_ViewChangedForCurrentElementVisual;
            }
        }

void ChkShowKeyboardNavigationReferenceOffset_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3328 of file ItemsViewSummaryPage.xaml.cs.

        {
            ItemsViewTestHooks.KeyboardNavigationReferenceOffsetChanged += ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged;

            UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
        }

void ChkShowKeyboardNavigationReferenceOffset_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 3335 of file ItemsViewSummaryPage.xaml.cs.

        {
            ItemsViewTestHooks.KeyboardNavigationReferenceOffsetChanged -= ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged;

            UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
        }

void ClearFullLog ( ) [inline, private]

Definition at line 6220 of file ItemsViewSummaryPage.xaml.cs.

        {
            this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
            chkLogUpdated.IsChecked = false;
            _fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
            chkLogCleared.IsChecked = true;
            this.txtStatus.Text = "ClearFullLog. Done.";
        }

void CmbBackground_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4618 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    switch (cmbBackground.SelectedIndex)
                    {
                        case 0:
                            _itemsView.Background = null;
                            break;
                        case 1:
                            _itemsView.Background = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            _itemsView.Background = new SolidColorBrush(Colors.AliceBlue);
                            break;
                        case 3:
                            _itemsView.Background = new SolidColorBrush(Colors.Aqua);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbBorderBrush_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4648 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    switch (cmbBorderBrush.SelectedIndex)
                    {
                        case 0:
                            _itemsView.BorderBrush = null;
                            break;
                        case 1:
                            _itemsView.BorderBrush = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            _itemsView.BorderBrush = new SolidColorBrush(Colors.Blue);
                            break;
                        case 3:
                            _itemsView.BorderBrush = new SolidColorBrush(Colors.Green);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbItemsSource_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4427 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    switch (cmbItemsSource.SelectedIndex)
                    {
                        case 0:
                            _itemsView.ItemsSource = null;
                            break;
                        case 1:
                            if (_lstEntities == null)
                            {
                                var rnd = new Random();
                                _lstEntities = new List<Entity>();

                                for (int itemIndex = 0; itemIndex < 400; itemIndex++)
                                {
                                    _lstEntities.Add(new Entity() {
                                        ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
                                        Id = itemIndex,
                                        Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(25, 125))
                                    });
                                }
                            }
                            _itemsView.ItemsSource = _lstEntities;
                            break;
                        case 2:
                            if (_colSmallEntities == null)
                            {
                                _colSmallEntities = new ObservableCollection<Entity>();

                                for (int itemIndex = 0; itemIndex < 7; itemIndex++)
                                {
                                    _colSmallEntities.Add(new Entity() {
                                        ImageUri = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6)),
                                        Id = itemIndex,
                                        Description = itemIndex.ToString()
                                    });
                                }
                            }
                            _itemsView.ItemsSource = _colSmallEntities;
                            break;
                        case 3:
                            if (_colSmallUniformEntities == null)
                            {
                                var rnd = new Random();
                                _colSmallUniformEntities = new ObservableCollection<Entity>();

                                for (int itemIndex = 0; itemIndex < 7; itemIndex++)
                                {
                                    _colSmallUniformEntities.Add(new Entity() {
                                        ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 100)),
                                        Id = itemIndex,
                                        Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                                    });
                                }
                            }
                            _itemsView.ItemsSource = _colSmallUniformEntities;
                            break;
                        case 4:
                            if (_colEntities == null)
                            {
                                var rnd = new Random();
                                _colEntities = new ObservableCollection<Entity>();

                                for (int itemIndex = 0; itemIndex < 300; itemIndex++)
                                {
                                    _colEntities.Add(new Entity() {
                                        ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
                                        Id = itemIndex,
                                        Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                                    });
                                }
                            }
                            _itemsView.ItemsSource = _colEntities;
                            break;
                        case 5:
                            if (_colSmallItemContainers == null)
                            {
                                _colSmallItemContainers = new ObservableCollection<ItemContainer>();

                                for (int itemIndex = 0; itemIndex < 7; itemIndex++)
                                {
                                    ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(itemIndex);

                                    _colSmallItemContainers.Add(itemContainer);
                                }
                            }
                            _itemsView.ItemsSource = _colSmallItemContainers;
                            break;
                        case 6:
                            if (_colSmallImages == null)
                            {
                                _colSmallImages = new ObservableCollection<Image>();

                                for (int itemIndex = 0; itemIndex < 7; itemIndex++)
                                {
                                    Image image = GetImageAsItemsSourceItem(itemIndex);

                                    _colSmallImages.Add(image);
                                }
                            }
                            _itemsView.ItemsSource = _colSmallImages;
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbItemTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4397 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    if (cmbItemTemplate.SelectedIndex == 0)
                    {
                        _itemsView.ItemTemplate = null;
                    }
                    else
                    {
                        int templateIndex = cmbItemTemplate.SelectedIndex - 1;

                        if (_entityTemplates[templateIndex] == null)
                        {
                            _entityTemplates[templateIndex] = Resources["entityTemplate" + cmbItemTemplate.SelectedIndex.ToString()] as DataTemplate;
                        }

                        _itemsView.ItemTemplate = _entityTemplates[templateIndex];
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLayout_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4543 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    switch (cmbLayout.SelectedIndex)
                    {
                        case 0:
                            _itemsView.Layout = null;
                            break;
                        case 1:
                            if (_flowLayout == null)
                            {
                                _flowLayout = Resources["flowLayout"] as FlowLayout;
                            }
                            _itemsView.Layout = _flowLayout;
                            break;
                        case 2:
                            if (_linedFlowLayout == null)
                            {
                                _linedFlowLayout = Resources["linedFlowLayout"] as LinedFlowLayout;
                                HookLinedFlowLayoutEvents(_linedFlowLayout);
                                BtnSetLinedFlowLayoutLineHeight_Click(null, null);
                                BtnSetLinedFlowLayoutLineSpacing_Click(null, null);
                                BtnSetLinedFlowLayoutMinItemSpacing_Click(null, null);
                                ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged(null, null);
                                CmbLinedFlowLayoutItemsJustification_SelectionChanged(null, null);
                                CmbLinedFlowLayoutItemsStretch_SelectionChanged(null, null);
                            }
                            _itemsView.Layout = _linedFlowLayout;
                            break;
                        case 3:
                            _itemsView.Layout = _stackLayout;
                            break;
                        case 4:
                            if (_uniformGridLayout == null)
                            {
                                _uniformGridLayout = Resources["uniformGridLayout"] as UniformGridLayout;
                                BtnSetUniformGridLayoutMinColumnSpacing_Click(null, null);
                                BtnSetUniformGridLayoutMinRowSpacing_Click(null, null);
                                CmbUniformGridLayoutItemsJustification_SelectionChanged(null, null);
                                CmbUniformGridLayoutItemsStretch_SelectionChanged(null, null);
                            }
                            _itemsView.Layout = _uniformGridLayout;
                            break;
                    }

                    UpdateItemsRepeaterDefaultCacheLengths();
                    UpdateScrollViewDefaultAnchorRatios();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLinedFlowLayoutItemsJustification_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4710 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null && cmbLinedFlowLayoutItemsJustification != null && _linedFlowLayout.ItemsJustification != (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex)
                {
                    _linedFlowLayout.ItemsJustification = (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLinedFlowLayoutItemsStretch_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4726 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_linedFlowLayout != null && cmbLinedFlowLayoutItemsStretch != null && _linedFlowLayout.ItemsStretch != (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex)
                {
                    _linedFlowLayout.ItemsStretch = (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbSelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4602 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbSelectionMode != null && _itemsView.SelectionMode != (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex)
                {
                    _itemsView.SelectionMode = (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbTabNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4678 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbTabNavigation != null && _itemsView.TabNavigation != (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex)
                {
                    _itemsView.TabNavigation = (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbUniformGridLayoutItemsJustification_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4742 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_uniformGridLayout != null && cmbUniformGridLayoutItemsJustification != null && _uniformGridLayout.ItemsJustification != (UniformGridLayoutItemsJustification)cmbUniformGridLayoutItemsJustification.SelectedIndex)
                {
                    _uniformGridLayout.ItemsJustification = (UniformGridLayoutItemsJustification)cmbUniformGridLayoutItemsJustification.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbUniformGridLayoutItemsStretch_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4758 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_uniformGridLayout != null && cmbLinedFlowLayoutItemsStretch != null && _uniformGridLayout.ItemsStretch != (UniformGridLayoutItemsStretch)cmbUniformGridLayoutItemsStretch.SelectedIndex)
                {
                    _uniformGridLayout.ItemsStretch = (UniformGridLayoutItemsStretch)cmbUniformGridLayoutItemsStretch.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbXYFocusKeyboardNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 4694 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbXYFocusKeyboardNavigation != null && _itemsView.XYFocusKeyboardNavigation != (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex)
                {
                    _itemsView.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceAddItem ( ) [inline, private]

Definition at line 5092 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && _itemsView.ItemsSource != null)
                {
                    var rnd = new Random();

                    if (_itemsView.ItemsSource == _lstEntities)
                    {
                        var entity = new Entity() {
                            ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", _lstEntities.Count % 126 + 1)),
                            Id = _lstEntities.Count,
                            Description = _lstEntities.Count + " - " + _lorem.Substring(0, rnd.Next(25, 125))
                        };

                        _lstEntities.Add(entity);
                    }
                    else
                    {
                        ObservableCollection<Entity> colEntities = _itemsView.ItemsSource as ObservableCollection<Entity>;

                        if (colEntities != null)
                        {
                            string uriString;
                            string description;

                            if (colEntities == _colEntities || colEntities == _colSmallUniformEntities)
                            {
                                uriString = string.Format("ms-appx:///Images/vette{0}.jpg", colEntities.Count % 126 + 1);
                                description = colEntities.Count.ToString() + " - " + _lorem.Substring(0, rnd.Next(50, 350));
                            }
                            else
                            {
                                uriString = string.Format("ms-appx:///Images/Rect{0}.png", colEntities.Count % 6);
                                description = colEntities.Count.ToString();
                            }

                            var entity = new Entity() {
                                ImageUri = new Uri(uriString),
                                Id = colEntities.Count,
                                Description = description
                            };

                            colEntities.Add(entity);
                        }
                        else
                        {
                            ObservableCollection<ItemContainer> colItemContainers = _itemsView.ItemsSource as ObservableCollection<ItemContainer>;

                            if (colItemContainers != null)
                            {
                                ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(colItemContainers.Count);

                                colItemContainers.Add(itemContainer);
                            }
                            else
                            {
                                ObservableCollection<Image> colImages = _itemsView.ItemsSource as ObservableCollection<Image>;

                                if (colImages != null)
                                {
                                    Image image = GetImageAsItemsSourceItem(colImages.Count);

                                    colImages.Add(image);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceInsertItem ( int newItemIndex ) [inline, private]

Definition at line 5170 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && _itemsView.ItemsSource != null)
                {
                    var rnd = new Random();

                    if (_itemsView.ItemsSource == _lstEntities)
                    {
                        var entity = new Entity() {
                            ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", _lstEntities.Count % 126 + 1)),
                            Id = _lstEntities.Count,
                            Description = _lstEntities.Count + " - " + _lorem.Substring(0, rnd.Next(25, 125))
                        };

                        _lstEntities.Insert(newItemIndex, entity);
                    }
                    else
                    {
                        ObservableCollection<Entity> colEntities = _itemsView.ItemsSource as ObservableCollection<Entity>;

                        if (colEntities != null)
                        {
                            string uriString;
                            string description;

                            if (colEntities == _colEntities || colEntities == _colSmallUniformEntities)
                            {
                                uriString = string.Format("ms-appx:///Images/vette{0}.jpg", colEntities.Count % 126 + 1);
                                description = colEntities.Count.ToString() + " - " + _lorem.Substring(0, rnd.Next(50, 350));
                            }
                            else
                            {
                                uriString = string.Format("ms-appx:///Images/Rect{0}.png", colEntities.Count % 6);
                                description = colEntities.Count.ToString();
                            }

                            var entity = new Entity() {
                                ImageUri = new Uri(uriString),
                                Id = colEntities.Count,
                                Description = description
                            };

                            colEntities.Insert(newItemIndex, entity);
                        }
                        else
                        {
                            ObservableCollection<ItemContainer> colItemContainers = _itemsView.ItemsSource as ObservableCollection<ItemContainer>;

                            if (colItemContainers != null)
                            {
                                ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(colItemContainers.Count);

                                colItemContainers.Insert(newItemIndex, itemContainer);
                            }
                            else
                            {
                                ObservableCollection<Image> colImages = _itemsView.ItemsSource as ObservableCollection<Image>;

                                if (colImages != null)
                                {
                                    Image image = GetImageAsItemsSourceItem(colImages.Count);

                                    colImages.Insert(newItemIndex, image);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceRemoveAllItems ( ) [inline, private]

Definition at line 5248 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && _itemsView.ItemsSource != null)
                {
                    if (_itemsView.ItemsSource == _lstEntities)
                    {
                        _lstEntities.Clear();
                    }
                    else if (_itemsView.ItemsSource == _colSmallEntities)
                    {
                        _colSmallEntities.Clear();
                    }
                    else if (_itemsView.ItemsSource == _colSmallUniformEntities)
                    {
                        _colSmallUniformEntities.Clear();
                    }
                    else if (_itemsView.ItemsSource == _colEntities)
                    {
                        _colEntities.Clear();
                    }
                    else if (_itemsView.ItemsSource == _colSmallItemContainers)
                    {
                        _colSmallItemContainers.Clear();
                    }
                    else if (_itemsView.ItemsSource == _colSmallImages)
                    {
                        _colSmallImages.Clear();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceRemoveItem ( int oldItemIndex ) [inline, private]

Definition at line 5287 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && _itemsView.ItemsSource != null)
                {
                    if (_itemsView.ItemsSource == _lstEntities)
                    {
                        _lstEntities.RemoveAt(oldItemIndex);
                    }
                    else if (_itemsView.ItemsSource == _colSmallEntities)
                    {
                        _colSmallEntities.RemoveAt(oldItemIndex);
                    }
                    else if (_itemsView.ItemsSource == _colSmallUniformEntities)
                    {
                        _colSmallUniformEntities.RemoveAt(oldItemIndex);
                    }
                    else if (_itemsView.ItemsSource == _colEntities)
                    {
                        _colEntities.RemoveAt(oldItemIndex);
                    }
                    else if (_itemsView.ItemsSource == _colSmallItemContainers)
                    {
                        _colSmallItemContainers.RemoveAt(oldItemIndex);
                    }
                    else if (_itemsView.ItemsSource == _colSmallImages)
                    {
                        _colSmallImages.RemoveAt(oldItemIndex);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceReplaceItem ( int itemIndex ) [inline, private]

Definition at line 5326 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && _itemsView.ItemsSource != null)
                {
                    var rnd = new Random();

                    if (_itemsView.ItemsSource == _lstEntities)
                    {
                        var entity = new Entity() {
                            ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", _lstEntities.Count % 126 + 1)),
                            Id = _lstEntities.Count,
                            Description = _lstEntities.Count + " - " + _lorem.Substring(0, rnd.Next(25, 125))
                        };

                        _lstEntities[itemIndex] = entity;
                    }
                    else
                    {
                        ObservableCollection<Entity> colEntities = _itemsView.ItemsSource as ObservableCollection<Entity>;

                        if (colEntities != null)
                        {
                            string uriString;
                            string description;

                            if (colEntities == _colEntities || colEntities == _colSmallUniformEntities)
                            {
                                uriString = string.Format("ms-appx:///Images/vette{0}.jpg", colEntities.Count % 126 + 1);
                                description = colEntities.Count.ToString() + " - " + _lorem.Substring(0, rnd.Next(50, 350));
                            }
                            else
                            {
                                uriString = string.Format("ms-appx:///Images/Rect{0}.png", colEntities.Count % 6);
                                description = colEntities.Count.ToString();
                            }

                            var entity = new Entity() {
                                ImageUri = new Uri(uriString),
                                Id = colEntities.Count,
                                Description = description
                            };

                            colEntities[itemIndex] = entity;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceReplaceItemContent ( int itemIndex ) [inline, private]

Definition at line 5382 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        UIElement element = GetItemsRepeaterElement(itemsRepeater, itemIndex);

                        if (element is ItemContainer || element is ContentControl)
                        {
                            Border border = new Border() {
                                BorderThickness = new Thickness(4),
                                Background = _whiteBrush,
                                BorderBrush = _redBrush
                            };

                            ItemContainer itemContainer = element as ItemContainer;

                            if (itemContainer != null)
                            {
                                border.Width = 2 * itemContainer.ActualWidth;
                                border.Height = itemContainer.ActualHeight;
                                itemContainer.Child = border;
                            }
                            else
                            {
                                ContentControl contentControl = element as ContentControl;

                                border.Width = 2 * contentControl.ActualWidth;
                                border.Height = contentControl.ActualHeight;
                                contentControl.Content = border;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ExecuteQueuedOperations ( ) [inline, private]

Definition at line 5773 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                while (_lstQueuedOperations.Count > 0)
                {
                    QueuedOperation qo = _lstQueuedOperations[0];

                    switch (qo.Type)
                    {
                        case QueuedOperationType.SetWidth:
                            ItemsViewSetWidth(qo.DoubleValue);
                            break;
                        case QueuedOperationType.SetHeight:
                            ItemsViewSetHeight(qo.DoubleValue);
                            break;
                        case QueuedOperationType.StartBringItemIntoView:
                            ItemsViewStartBringItemIntoView();
                            break;
                        case QueuedOperationType.DataSourceAdd:
                            DataSourceAddItem();
                            break;
                        case QueuedOperationType.DataSourceInsert:
                            DataSourceInsertItem(qo.IntValue);
                            break;
                        case QueuedOperationType.DataSourceRemove:
                            DataSourceRemoveItem(qo.IntValue);
                            break;
                        case QueuedOperationType.DataSourceRemoveAll:
                            DataSourceRemoveAllItems();
                            break;
                        case QueuedOperationType.DataSourceReplace:
                            DataSourceReplaceItem(qo.IntValue);
                            break;
                    }

                    _lstQueuedOperations.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

string GetCaptionText ( Image image ) [inline, private]

Definition at line 924 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (image != null)
            {
                Panel itemPanel = image.Parent as Panel;

                if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
                {
                    TextBlock textBlock = itemPanel.Children[1] as TextBlock;

                    if (textBlock != null)
                    {
                        return textBlock.Text;
                    }
                }
            }

            return null;
        }

CornerRadius GetCornerRadiusFromString ( string cornerRadius ) [inline, private]

Definition at line 6422 of file ItemsViewSummaryPage.xaml.cs.

        {
            string[] lengths = cornerRadius.Split(',');
            if (lengths.Length < 4)
                return new CornerRadius(
                    Convert.ToDouble(lengths[0]));
            else
                return new CornerRadius(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void GetFullLog ( ) [inline, private]

Definition at line 6208 of file ItemsViewSummaryPage.xaml.cs.

        {
            this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
            chkLogCleared.IsChecked = false;
            foreach (string log in _fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
            chkLogUpdated.IsChecked = true;
            this.txtStatus.Text = "GetFullLog. Done.";
        }

Image GetImageAsItemsSourceItem ( int itemIndex ) [inline, private]

Definition at line 6391 of file ItemsViewSummaryPage.xaml.cs.

        {
            BitmapImage bitmapImage = new BitmapImage() {
                DecodePixelHeight = 96,
                UriSource = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6))
            };

            Image image = new Image() {
                Name = "image",
                MinWidth = 72.0,
                Height = 96.0,
                Stretch = Stretch.UniformToFill,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment = VerticalAlignment.Center,
                Source = bitmapImage
            };

            return image;
        }

ItemContainer GetItemContainerAsItemsSourceItem ( int itemIndex ) [inline, private]

Definition at line 6346 of file ItemsViewSummaryPage.xaml.cs.

        {
            Grid grid = new Grid() {
                Name = "itemPanel"
            };

            BitmapImage bitmapImage = new BitmapImage() {
                DecodePixelHeight = 96,
                UriSource = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6))
            };

            Image image = new Image() {
                Name = "image",
                Stretch = Stretch.UniformToFill,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment = VerticalAlignment.Center,
                Source = bitmapImage
            };

            grid.Children.Add(image);

            TextBlock textBlock = new TextBlock() {
                Text = itemIndex.ToString(),
                TextWrapping = TextWrapping.Wrap,
                Margin = new Thickness(4),
                Foreground = new SolidColorBrush(Colors.Yellow),
                FontSize = 14.0,
                MaxWidth = 68.0,
                MaxHeight = 48.0,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment = VerticalAlignment.Bottom
            };

            grid.Children.Add(textBlock);

            ItemContainer itemContainer = new ItemContainer() {
                MinWidth = 72.0,
                Height = 96.0,
                Background = new SolidColorBrush(Colors.Gray),
                Child = grid
            };

            return itemContainer;
        }

UIElement GetItemsRepeaterElement | ( | ItemsRepeater | itemsRepeater,
 |  | int | index |
 | ) |  |  | [inline, private]

Definition at line 6301 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    return itemsRepeater.TryGetElement(index);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }

            return null;
        }

int GetItemsRepeaterElementIndex ( FrameworkElement element ) [inline, private]

Definition at line 6319 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                if (itemsRepeater != null)
                {
                    FrameworkElement parent1 = element;
                    FrameworkElement parent2 = VisualTreeHelper.GetParent(parent1) as FrameworkElement;

                    while (parent1 != null && parent2 != itemsRepeater)
                    {
                        parent1 = parent2;
                        parent2 = VisualTreeHelper.GetParent(parent1) as FrameworkElement;
                    }

                    if (parent1 != null)
                    {
                        return itemsRepeater.GetElementIndex(parent1);
                    }
                }
            }

            return -1;
        }

UIElement GetItemsRepeaterMethodElement ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 6235 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    int index = -1;

                    int.TryParse(txtItemsRepeaterElementMethodIndex.Text, out index);

                    return GetItemsRepeaterElement(itemsRepeater, index);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }

            return null;
        }

UIElement GetItemsRepeaterPropertyElement ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 6257 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    int index = -1;

                    int.TryParse(txtItemsRepeaterElementPropertyIndex.Text, out index);

                    return GetItemsRepeaterElement(itemsRepeater, index);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }

            return null;
        }

UIElement GetLinedFlowLayoutMethodElement ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 6279 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    int index = -1;

                    int.TryParse(txtLinedFlowLayoutMethodIndex.Text, out index);

                    return GetItemsRepeaterElement(itemsRepeater, index);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }

            return null;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 6411 of file ItemsViewSummaryPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void HookItemsRepeaterEvents ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 5971 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                //Uncomment if needed for debugging purposes
                //itemsRepeater.LayoutUpdated += ItemsRepeater_LayoutUpdated;

                itemsRepeater.Loaded += ItemsRepeater_Loaded;
                itemsRepeater.SizeChanged += ItemsRepeater_SizeChanged;
                itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
                itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
            }
        }

void HookItemsViewEvents ( ) [inline, private]

Definition at line 6040 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                _itemsView.ItemInvoked += ItemsView_ItemInvoked;
                _itemsView.GettingFocus += ItemsView_GettingFocus;
                _itemsView.GotFocus += ItemsView_GotFocus;
                _itemsView.LosingFocus += ItemsView_LosingFocus;
                _itemsView.LostFocus += ItemsView_LostFocus;
                _itemsView.Loaded += ItemsView_Loaded;
                _itemsView.SelectionChanged += ItemsView_SelectionChanged;
                _itemsView.SizeChanged += ItemsView_SizeChanged;

                if (_itemsViewPointerWheelChangedEventHandler == null)
                {
                    _itemsViewPointerWheelChangedEventHandler = new PointerEventHandler(ItemsView_PointerWheelChanged);
                }
                _itemsView.AddHandler(UIElement.PointerWheelChangedEvent, _itemsViewPointerWheelChangedEventHandler, true);
            }
        }

void HookLinedFlowLayoutEvents ( LinedFlowLayout linedFlowLayout ) [inline, private]

Definition at line 5953 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (linedFlowLayout != null)
            {
                linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
                linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlocked;
            }
        }

void HookScrollViewEvents ( ScrollView scrollView ) [inline, private]

Definition at line 5997 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.Loaded += ScrollView_Loaded;
                scrollView.SizeChanged += ScrollView_SizeChanged;
                scrollView.ExtentChanged += ScrollView_ExtentChanged;
                scrollView.StateChanged += ScrollView_StateChanged;
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted += ScrollView_ZoomCompleted;

                if (_scrollViewPointerWheelChangedEventHandler == null)
                {
                    _scrollViewPointerWheelChangedEventHandler = new PointerEventHandler(ScrollView_PointerWheelChanged);
                }
                scrollView.AddHandler(UIElement.PointerWheelChangedEvent, _scrollViewPointerWheelChangedEventHandler, true);
            }
        }

void Image_ImageFailed | ( | object | sender,
 |  | ExceptionRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 639 of file ItemsViewSummaryPage.xaml.cs.

        {
            // When the Image has a TextBlock sibling, set its Foreground to Red to indicate the image loading failure.
            string captionText = SetCaptionColor(sender as Image, _redBrush);

            if (!string.IsNullOrEmpty(captionText))
            {
                AppendAsyncEventMessage($"Image_ImageFailed ErrorMessage={e.ErrorMessage}, Item Id={captionText}");
            }
        }

void Image_ImageOpened | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 604 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                Image image = sender as Image;

                // When the Image has a TextBlock sibling, set its Foreground to White to indicate the image loading success.
                SetCaptionColor(image, _whiteBrush);

                int elementIndex = GetItemsRepeaterElementIndex(image);

                if (elementIndex != -1)
                {
                    int linedFlowLayoutLogItemIndexDbg = _linedFlowLayout == null ? -1 : Convert.ToInt32(txtLinedFlowLayoutLogItemIndexDbg.Text);

                    if (chkLogImageEvents.IsChecked == true || elementIndex == linedFlowLayoutLogItemIndexDbg)
                    {
                        string captionText = GetCaptionText(image);

                        if (captionText == null)
                        {
                            captionText = "<None>";
                        }

                        AppendAsyncEventMessage($"Image_ImageOpened elementIndex={elementIndex}, Item Id={captionText}");
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ItemsRepeater_ElementClearing | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementClearingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 495 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                AppendAsyncEventMessage($"ItemsRepeater.ElementClearing Element={args.Element}");
            }

            FrameworkElement elementAsFE = args.Element as FrameworkElement;

            if (elementAsFE != null)
            {
                Image image = elementAsFE.FindName("image") as Image;

                if (image != null)
                {
                    // Not using a _yellowBrush class member to avoid memory leaks through ItemCoontainer->ItemsViewSummaryPage references.
                    SetCaptionColor(image, new SolidColorBrush(Colors.Yellow));

                    image.ImageOpened -= Image_ImageOpened;
                    image.ImageFailed -= Image_ImageFailed;
                }
            }

            args.Element.DragStarting -= UIElement_DragStarting;
        }

void ItemsRepeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 444 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                AppendAsyncEventMessage($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}");
            }

            try
            {
                FrameworkElement elementAsFE = args.Element as FrameworkElement;

                if (elementAsFE != null)
                {
                    Image image = elementAsFE.FindName("image") as Image;

                    if (image != null)
                    {
                        image.ImageOpened += Image_ImageOpened;
                        image.ImageFailed += Image_ImageFailed;
                    }

                    if ((bool)chkSetItemsRepeaterElementMinWidth.IsChecked && elementAsFE != null)
                    {
                        elementAsFE.MinWidth = double.Parse(txtItemsRepeaterElementMinWidthAll.Text);
                    }

                    if ((bool)chkSetItemsRepeaterElementMaxWidth.IsChecked && elementAsFE != null)
                    {
                        elementAsFE.MaxWidth = double.Parse(txtItemsRepeaterElementMaxWidthAll.Text);
                    }

                    if ((bool)chkSetItemsRepeaterElementMargin.IsChecked && elementAsFE != null)
                    {
                        elementAsFE.Margin = GetThicknessFromString(txtItemsRepeaterElementMarginAll.Text);
                    }
                }

                if ((bool)chkSetItemsRepeaterElementCanDrag.IsChecked)
                {
                    args.Element.CanDrag = (bool)chkItemsRepeaterElementCanDrag.IsChecked;

                    args.Element.DragStarting += UIElement_DragStarting;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ItemsRepeater_LayoutUpdated | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 392 of file ItemsViewSummaryPage.xaml.cs.

        {
            System.Diagnostics.Debug.WriteLine("ItemsRepeater.LayoutUpdated");
        }

void ItemsRepeater_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 397 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                AppendAsyncEventMessage($"ItemsRepeater.Loaded");
                LogItemsRepeaterInfo();
                if (chkLogItemsViewEvents.IsChecked == true)
                {
                    LogItemsViewInfo();
                }
            }
        }

void ItemsRepeater_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 410 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                if (canvasLinedFlowLayoutLockedItems != null)
                {
                    canvasLinedFlowLayoutLockedItems.Width = _itemsView.ActualWidth;
                    canvasLinedFlowLayoutLockedItems.Height = _itemsView.ActualHeight;
                }

                if (rectVerticalKeyboardNavigationReferenceOffset != null)
                {
                    rectVerticalKeyboardNavigationReferenceOffset.Height = _itemsView.ActualHeight;
                }

                if (chkLogItemsRepeaterEvents.IsChecked == true)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        AppendAsyncEventMessage($"ItemsRepeater.SizeChanged Size={itemsRepeater.ActualWidth}, {itemsRepeater.ActualHeight}");
                        /*
                        LogItemsRepeaterInfo();
                        if (chkLogItemsViewEvents.IsChecked == true)
                        {
                            LogItemsViewInfo();
                        }
                        */
                    }
                }
            }
        }

void ItemsView_CurrentItemIndexChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 6105 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsViewCurrentElementVisual(log: true);
        }

void ItemsView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 357 of file ItemsViewSummaryPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 382 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsView.GotFocus");
        }

void ItemsView_ItemInvoked | ( | ItemsView | sender,
 |  | ItemsViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 305 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsView.ItemInvoked InvokedItem={args.InvokedItem.ToString().Substring(0, 50)}");
        }

void ItemsView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 310 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsView.Loaded");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();

            UpdateScrollViewFields();
            UpdateItemsRepeaterFields();

            HookItemsRepeaterEvents(ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView));
        }

void ItemsView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 372 of file ItemsViewSummaryPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 367 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage("ItemsView.LostFocus");
        }

void ItemsView_PointerWheelChanged | ( | object | sender,
 |  | PointerRoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 387 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsView.PointerWheelChanged args.Handled={args.Handled}");
        }

void ItemsView_SelectionChanged | ( | ItemsView | sender,
 |  | ItemsViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 329 of file ItemsViewSummaryPage.xaml.cs.

        {
            string selectedItems = String.Empty;

            foreach (var selectedItem in sender.SelectedItems)
            {
                string selectedItemAsString = selectedItem.ToString();

                selectedItems += (selectedItem == null) ? "<null>, " : selectedItemAsString.Substring(0, Math.Min(selectedItemAsString.Length, 9)) + ", ";
            }

            AppendAsyncEventMessage($"ItemsView.SelectionChanged SelectedItems={selectedItems}");
        }

void ItemsView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 343 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ItemsView.SizeChanged Size={_itemsView.ActualWidth}, {_itemsView.ActualHeight}");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
            LogItemsViewInfo();
        }

void ItemsViewSetHeight ( double value ) [inline, private]

Definition at line 3407 of file ItemsViewSummaryPage.xaml.cs.

        {
            _itemsView.Height = value;
        }

void ItemsViewSetWidth ( double value ) [inline, private]

Definition at line 4043 of file ItemsViewSummaryPage.xaml.cs.

        {
            _itemsView.Width = value;

            if (rectHorizontalKeyboardNavigationReferenceOffset != null)
            {
                rectHorizontalKeyboardNavigationReferenceOffset.Width = _itemsView.ActualWidth;
            }
        }

void ItemsViewStartBringItemIntoView ( ) [inline, private]

Definition at line 2878 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    int index = -1;

                    int.TryParse(txtItemsViewMethodIndex.Text, out index);

                    BringIntoViewOptions bringIntoViewOptions = new BringIntoViewOptions();

                    bool startBringItemIntoViewSuccess = false;
                    bool animationDesired = cmbBringIntoViewOptionsAnimationDesired.SelectedIndex == 0;
                    double verticalAlignmentRatio = Convert.ToDouble(txtBringIntoViewOptionsVerticalAlignmentRatio.Text);
                    double verticalOffset = Convert.ToDouble(txtBringIntoViewOptionsVerticalOffset.Text);

                    if (!animationDesired ||
                        double.IsNaN(verticalAlignmentRatio) != double.IsNaN(bringIntoViewOptions.VerticalAlignmentRatio) ||
                        (!double.IsNaN(verticalAlignmentRatio) && verticalAlignmentRatio != bringIntoViewOptions.VerticalAlignmentRatio) ||
                        verticalOffset != bringIntoViewOptions.VerticalOffset ||
                        !string.IsNullOrWhiteSpace(txtBringIntoViewOptionsTargetRect.Text))
                    {
                        if (!string.IsNullOrWhiteSpace(txtBringIntoViewOptionsTargetRect.Text))
                        {
                            string[] rectComponents = txtBringIntoViewOptionsTargetRect.Text.Split(',');

                            if (rectComponents.Length != 4)
                            {
                                AppendEventMessage("Invalid TargetRect format.");
                                return;
                            }
                            bringIntoViewOptions.TargetRect = new Rect(double.Parse(rectComponents[0]), double.Parse(rectComponents[1]), double.Parse(rectComponents[2]), double.Parse(rectComponents[3]));
                        }

                        bringIntoViewOptions.AnimationDesired = animationDesired;
                        bringIntoViewOptions.VerticalAlignmentRatio = verticalAlignmentRatio;
                        bringIntoViewOptions.VerticalOffset = verticalOffset;

                        try
                        {
                            _itemsView.StartBringItemIntoView(index, bringIntoViewOptions);
                            startBringItemIntoViewSuccess = true;
                        }
                        catch (Exception)
                        {
                            startBringItemIntoViewSuccess = false;
                        }
                    }
                    else
                    {
                        try
                        {
                            _itemsView.StartBringItemIntoView(index, null);
                            startBringItemIntoViewSuccess = true;
                        }
                        catch (Exception)
                        {
                            startBringItemIntoViewSuccess = false;
                        }
                    }

                    AppendEventMessage($"StartBringItemIntoView({index})={startBringItemIntoViewSuccess}");
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ItemsViewSummaryPage_KeyDown | ( | object | sender,
 |  | KeyRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 138 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (e.Key == Windows.System.VirtualKey.G)
            {
                GetFullLog();
            }
            else if (e.Key == Windows.System.VirtualKey.C)
            {
                ClearFullLog();
            }
        }

void ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged | ( | ItemsView | itemsView,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 6110 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);

            if ((bool)chkShowCurrentElement.IsChecked)
            {
                UpdateItemsViewCurrentElementVisual(log: false);
            }
        }

void LayoutsTestHooks_LinedFlowLayoutInvalidated | ( | object | sender,
 |  | LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 6086 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout invalidated. InvalidationTrigger: " + args.InvalidationTrigger.ToString());
        }

void LayoutsTestHooks_LinedFlowLayoutItemLocked | ( | object | sender,
 |  | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 6091 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout item locked. ItemIndex: " + args.ItemIndex.ToString() + ", LineIndex: " + args.LineIndex.ToString());
        }

void LayoutsTestHooks_LinedFlowLayoutItemLocked2 | ( | object | sender,
 |  | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 6096 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (!_lstLinedFlowLayoutLockedItemIndexes.Contains(args.ItemIndex))
            {
                _lstLinedFlowLayoutLockedItemIndexes.Add(args.ItemIndex);
                UpdateLinedFlowLayoutLockedItemsVisuals();
            }
        }

void LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 6081 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout snapped average items per line changed. SnappedAverageItemsPerLine: " + LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(sender as LinedFlowLayout).ToString() + ", AverageItemAspectRatio: " + LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(sender as LinedFlowLayout).ToString());
        }

void LinedFlowLayout_ItemsInfoRequested | ( | LinedFlowLayout | sender,
 |  | LinedFlowLayoutItemsInfoRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 650 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (chkLogLinedFlowLayoutEvents.IsChecked == true)
            {
                AppendAsyncEventMessage($"LinedFlowLayout.ItemsInfoRequested ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
            }

            if (!(bool)chkProvideDesiredAspectRatioItemsInfo.IsChecked)
            {
                return;
            }

            try
            {
                bool provideMinSizeItemsInfo = (bool)chkProvideMinSizeItemsInfo.IsChecked;
                bool provideMaxSizeItemsInfo = (bool)chkProvideMaxSizeItemsInfo.IsChecked;
                bool provideExtraDesiredAspectRatioItemsInfo = (bool)chkProvideExtraDesiredAspectRatioItemsInfo.IsChecked;
                bool provideTemporaryDesiredAspectRatioItemsInfo = (bool)chkProvideTemporaryDesiredAspectRatioItemsInfo.IsChecked;
                bool provideMinSizeArrayItemsInfo = (bool)chkProvideMinSizeArrayItemsInfo.IsChecked;
                bool provideMaxSizeArrayItemsInfo = (bool)chkProvideMaxSizeArrayItemsInfo.IsChecked;

                int arrayOffset = 0;
                int arrayLength = 0;
                double[] desiredAspectRatios = null;
                double[] minWidths = null;
                double[] maxWiths = null;

                if (provideExtraDesiredAspectRatioItemsInfo)
                {
                    arrayOffset = args.ItemsRangeStartIndex = 0;

                    if (_itemsView.ItemsSource == _lstEntities)
                    {
                        arrayLength = _lstEntities.Count;
                    }
                    else if (_itemsView.ItemsSource == _colSmallEntities)
                    {
                        arrayLength = _colSmallEntities.Count;
                    }
                    else if (_itemsView.ItemsSource == _colSmallUniformEntities)
                    {
                        arrayLength = _colSmallUniformEntities.Count;
                    }
                    else if (_itemsView.ItemsSource == _colEntities)
                    {
                        arrayLength = _colEntities.Count;
                    }
                }
                else
                {
                    arrayOffset = args.ItemsRangeStartIndex;
                    arrayLength = args.ItemsRangeRequestedLength;
                }

                desiredAspectRatios = new double[arrayLength];

                if (provideMinSizeItemsInfo && provideMinSizeArrayItemsInfo)
                {
                    minWidths = new double[arrayLength];
                }

                if (provideMaxSizeItemsInfo && provideMaxSizeArrayItemsInfo)
                {
                    maxWiths = new double[arrayLength];
                }

                double minWidth = 0.0;
                int templateId = cmbItemTemplate.SelectedIndex;

                if (provideMinSizeItemsInfo)
                {
                    if ((bool)chkSetItemsRepeaterElementMinWidth.IsChecked)
                    {
                        minWidth = double.Parse(txtItemsRepeaterElementMinWidthAll.Text);
                    }
                    else
                    {
                        // These values come from the the 'entityTemplate1', 'entityTemplate2', ..., 'entityTemplate16' DataTemplates defined
                        // in ItemsViewSummaryPage.xaml.   Their MinWidth values are reused here.
                        switch (templateId)
                        {
                            case 16:
                            case 17:
                                minWidth = 32.0;
                                break;
                            case 2:
                            case 4:
                            case 8:
                            case 9:
                                minWidth = 40.0;
                                break;
                            case 1:
                                minWidth = 72.0;
                                break;
                            case 6:
                            case 11:
                                minWidth = 96.0;
                                break;
                            case 5:
                            case 10:
                                minWidth = 100.0;
                                break;
                            case 7:
                            case 12:
                                minWidth = 126.0;
                                break;
                        }
                    }
                }

                double maxWidth = -1.0;

                if (provideMaxSizeItemsInfo)
                {
                    if ((bool)chkSetItemsRepeaterElementMaxWidth.IsChecked)
                    {
                        maxWidth = double.Parse(txtItemsRepeaterElementMaxWidthAll.Text);
                    }
                }

                double temporaryAspectRatio = provideTemporaryDesiredAspectRatioItemsInfo ? double.Parse(txtTemporaryAspectRatio.Text) : 1.0;

                for (int index = 0; index < arrayLength; index++)
                {
                    if (provideTemporaryDesiredAspectRatioItemsInfo && index % 10 == 0)
                    {
                        // For 10% of the items, pretend the aspect ratio is still unknown.
                        desiredAspectRatios[index] = temporaryAspectRatio;
                        // A subsequent call to LinedFlowLayout.InvalidateItemsInfo after chkProvideTemporaryDesiredAspectRatioItemsInfo.IsChecked was reset
                        // can cause the full information to be provided.
                    }
                    else
                    {
                        // These values come from the the 'entityTemplate1', 'entityTemplate2', ..., 'entityTemplate16' DataTemplates defined
                        // in ItemsViewSummaryPage.xaml.   Some do not use the Entity object, but a hard-coded item size that is reused here.
                        // Others use the Entity object which exposes its own AspectRatio property.
                        switch (templateId)
                        {
                            case 5:
                            case 6:
                            case 11:
                            case 13:
                            case 14:
                            case 15:
                                {
                                    desiredAspectRatios[index] = 1.0;
                                    break;
                                }
                            case 7:
                            case 12:
                                {
                                    desiredAspectRatios[index] = 1.3125; // == 126/96
                                    break;
                                }
                            default:
                                {
                                    Entity entity = null;

                                    if (_itemsView.ItemsSource == _lstEntities)
                                    {
                                        entity = _lstEntities[arrayOffset + index];
                                    }
                                    else if (_itemsView.ItemsSource == _colSmallEntities)
                                    {
                                        entity = _colSmallEntities[arrayOffset + index];
                                    }
                                    else if (_itemsView.ItemsSource == _colSmallUniformEntities)
                                    {
                                        entity = _colSmallUniformEntities[arrayOffset + index];
                                    }
                                    else if (_itemsView.ItemsSource == _colEntities)
                                    {
                                        entity = _colEntities[arrayOffset + index];
                                    }

                                    desiredAspectRatios[index] = entity.AspectRatio;
                                    break;
                                }
                        }
                    }

                    if (provideMinSizeItemsInfo && provideMinSizeArrayItemsInfo)
                    {
                        minWidths[index] = minWidth;
                    }

                    if (provideMaxSizeItemsInfo && provideMaxSizeArrayItemsInfo)
                    {
                        maxWiths[index] = maxWidth;
                    }
                }

                args.SetDesiredAspectRatios(desiredAspectRatios);

                if (provideMinSizeItemsInfo)
                {
                    if (provideMinSizeArrayItemsInfo)
                    {
                        args.SetMinWidths(minWidths);
                    }
                    else
                    {
                        args.MinWidth = minWidth;
                    }
                }

                if (provideMaxSizeItemsInfo)
                {
                    if (provideMaxSizeArrayItemsInfo)
                    {
                        args.SetMaxWidths(maxWiths);
                    }
                    else
                    {
                        args.MaxWidth = maxWidth;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void LinedFlowLayout_ItemsUnlocked | ( | LinedFlowLayout | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 875 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (chkLogLinedFlowLayoutEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("LinedFlowLayout.ItemsUnlocked");
            }

            _lstLinedFlowLayoutLockedItemIndexes.Clear();
            UpdateLinedFlowLayoutLockedItemsVisuals();
        }

void LogItemsRepeaterInfo ( ) [inline, private]

Definition at line 891 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                if (itemsRepeater != null)
                {
                    AppendAsyncEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}, ChildrenCount={VisualTreeHelper.GetChildrenCount(itemsRepeater)}");
                }
            }
        }

void LogItemsViewInfo ( ) [inline, private]

Definition at line 917 of file ItemsViewSummaryPage.xaml.cs.

        {
            //AppendAsyncEventMessage($"ItemsView Info: ItemsSource={itemsView.ItemsSource}, ItemTemplate={itemsView.ItemTemplate}, Layout={itemsView.Layout}");
        }

void LogScrollViewInfo ( ) [inline, private]

Definition at line 904 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                AppendAsyncEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
                AppendAsyncEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
                AppendAsyncEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
                AppendAsyncEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
            }
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 6120 of file ItemsViewSummaryPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 150 of file ItemsViewSummaryPage.xaml.cs.

        {
            LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
            LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
            LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;
            LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked2;

            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            if (_itemsView != null)
            {
                _itemsView.ItemsSource = null;

                UnhookItemsRepeaterEvents(ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView));
                UnhookScrollViewEvents(ItemsViewTestHooks.GetScrollViewPart(_itemsView));
                UnhookItemsViewEvents();
            }
            UnhookLinedFlowLayoutEvents(_linedFlowLayout);

            ChkLinedFlowLayoutShowLockedItems_Unchecked(null, null);
            ChkShowCurrentElement_Unchecked(null, null);

            base.OnNavigatedFrom(e);
        }

void QueuedOperationsTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 5767 of file ItemsViewSummaryPage.xaml.cs.

        {
            _queuedOperationsTimer.Stop();
            ExecuteQueuedOperations();
        }

void ScrollView_BringingIntoView | ( | ScrollView | sender,
 |  | ScrollingBringingIntoViewEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 521 of file ItemsViewSummaryPage.xaml.cs.

        {
            var requestEventArgs = args.RequestEventArgs;

            AppendAsyncEventMessage($"ScrollView.BringingIntoView RequestEventArgs AnimationDesired={requestEventArgs.AnimationDesired}, VerticalAlignmentRatio={requestEventArgs.VerticalAlignmentRatio}, VerticalOffset={requestEventArgs.VerticalOffset}, TargetRect={requestEventArgs.TargetRect}");
            AppendAsyncEventMessage($"ScrollView.BringingIntoView CorrelationId={args.CorrelationId}, TargetVerticalOffset={args.TargetVerticalOffset}");

            bool animationDesired = cmbBringIntoViewOptionsAnimationDesired.SelectedIndex == 0;

            args.RequestEventArgs.AnimationDesired = animationDesired;
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 553 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
        }

void ScrollView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 533 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.Loaded");
            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_PointerWheelChanged | ( | object | sender,
 |  | PointerRoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 558 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.PointerWheelChanged args.Handled={args.Handled}");
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 584 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 594 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 543 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.SizeChanged Size={_itemsView.ActualWidth}, {_itemsView.ActualHeight}");
            LogScrollViewInfo();
            if (chkLogItemsViewEvents.IsChecked == true)
            {
                LogItemsViewInfo();
            }
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 563 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 568 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ViewChangedForCurrentElementVisual | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 578 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsViewCurrentElementVisual(log: false);
            UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: false);
        }

void ScrollView_ViewChangedForLockedItemsVisuals | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 573 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateLinedFlowLayoutLockedItemsVisuals();
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 589 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollView_ZoomCompleted | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 599 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

string SetCaptionColor | ( | Image | image,
 |  | Brush | brush |
 | ) |  |  | [inline, private]

Definition at line 944 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (image != null)
            {
                Panel itemPanel = image.Parent as Panel;

                if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
                {
                    TextBlock textBlock = itemPanel.Children[1] as TextBlock;

                    if (textBlock != null)
                    {
                        textBlock.Foreground = brush;

                        return textBlock.Text;
                    }
                }
            }

            return null;
        }

void UIElement_DragStarting | ( | UIElement | sender,
 |  | DragStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 886 of file ItemsViewSummaryPage.xaml.cs.

        {
            AppendAsyncEventMessage($"UIElement_DragStarting AllowedOperations={args.AllowedOperations}");
        }

void UnhookItemsRepeaterEvents ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 5985 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.LayoutUpdated -= ItemsRepeater_LayoutUpdated;
                itemsRepeater.Loaded -= ItemsRepeater_Loaded;
                itemsRepeater.SizeChanged -= ItemsRepeater_SizeChanged;
                itemsRepeater.ElementPrepared -= ItemsRepeater_ElementPrepared;
                itemsRepeater.ElementClearing -= ItemsRepeater_ElementClearing;
            }
        }

void UnhookItemsViewEvents ( ) [inline, private]

Definition at line 6061 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                _itemsView.ItemInvoked -= ItemsView_ItemInvoked;
                _itemsView.GettingFocus -= ItemsView_GettingFocus;
                _itemsView.GotFocus -= ItemsView_GotFocus;
                _itemsView.LosingFocus -= ItemsView_LosingFocus;
                _itemsView.LostFocus -= ItemsView_LostFocus;
                _itemsView.Loaded -= ItemsView_Loaded;
                _itemsView.SelectionChanged -= ItemsView_SelectionChanged;
                _itemsView.SizeChanged -= ItemsView_SizeChanged;

                if (_itemsViewPointerWheelChangedEventHandler != null)
                {
                    _itemsView.RemoveHandler(UIElement.PointerWheelChangedEvent, _itemsViewPointerWheelChangedEventHandler);
                }
            }
        }

void UnhookLinedFlowLayoutEvents ( LinedFlowLayout linedFlowLayout ) [inline, private]

Definition at line 5962 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (linedFlowLayout != null)
            {
                linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;
                linedFlowLayout.ItemsUnlocked -= LinedFlowLayout_ItemsUnlocked;
            }
        }

void UnhookScrollViewEvents ( ScrollView scrollView ) [inline, private]

Definition at line 6019 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.Loaded -= ScrollView_Loaded;
                scrollView.SizeChanged -= ScrollView_SizeChanged;
                scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                scrollView.StateChanged -= ScrollView_StateChanged;
                scrollView.ViewChanged -= ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;

                if (_scrollViewPointerWheelChangedEventHandler != null)
                {
                    scrollView.RemoveHandler(UIElement.PointerWheelChangedEvent, _scrollViewPointerWheelChangedEventHandler);
                }
            }
        }

void UpdateBackground ( ) [inline, private]

Definition at line 966 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && cmbBackground != null)
            {
                SolidColorBrush bg = _itemsView.Background as SolidColorBrush;

                if (bg == null)
                {
                    cmbBackground.SelectedIndex = 0;
                }
                else if (bg.Color == Colors.Transparent)
                {
                    cmbBackground.SelectedIndex = 1;
                }
                else if (bg.Color == Colors.AliceBlue)
                {
                    cmbBackground.SelectedIndex = 2;
                }
                else if (bg.Color == Colors.Aqua)
                {
                    cmbBackground.SelectedIndex = 3;
                }
                else
                {
                    cmbBackground.SelectedIndex = -1;
                }
            }
        }

void UpdateBorderBrush ( ) [inline, private]

Definition at line 995 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && cmbBorderBrush != null)
            {
                SolidColorBrush bb = _itemsView.BorderBrush as SolidColorBrush;

                if (bb == null)
                {
                    cmbBorderBrush.SelectedIndex = 0;
                }
                else if (bb.Color == Colors.Transparent)
                {
                    cmbBorderBrush.SelectedIndex = 1;
                }
                else if (bb.Color == Colors.Blue)
                {
                    cmbBorderBrush.SelectedIndex = 2;
                }
                else if (bb.Color == Colors.Green)
                {
                    cmbBorderBrush.SelectedIndex = 3;
                }
                else
                {
                    cmbBorderBrush.SelectedIndex = -1;
                }
            }
        }

void UpdateBorderThickness ( ) [inline, private]

Definition at line 1024 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtBorderThickness != null)
            {
                txtBorderThickness.Text = _itemsView.BorderThickness.ToString();
            }
        }

void UpdateContentOrientation ( ) [inline, private]

Definition at line 1032 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbContentOrientation != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        cmbContentOrientation.SelectedIndex = (int)scrollView.ContentOrientation;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateCornerRadius ( ) [inline, private]

Definition at line 1053 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtCornerRadius != null)
            {
                txtCornerRadius.Text = _itemsView.CornerRadius.ToString();
            }
        }

void UpdateCurrentItemIndex ( ) [inline, private]

Definition at line 1061 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtCurrentItemIndex != null)
            {
                txtCurrentItemIndex.Text = _itemsView.CurrentItemIndex.ToString();
            }
        }

void UpdateDataSourceItemCount ( ) [inline, private]

Definition at line 1069 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtDataSourceItemCount != null)
            {
                if (_itemsView.ItemsSource == null)
                {
                    txtDataSourceItemCount.Text = "0";
                }
                else if (_itemsView.ItemsSource == _lstEntities)
                {
                    txtDataSourceItemCount.Text = _lstEntities.Count.ToString();
                }
                else if (_itemsView.ItemsSource == _colSmallEntities)
                {
                    txtDataSourceItemCount.Text = _colSmallEntities.Count.ToString();
                }
                else if (_itemsView.ItemsSource == _colSmallUniformEntities)
                {
                    txtDataSourceItemCount.Text = _colSmallUniformEntities.Count.ToString();
                }
                else if (_itemsView.ItemsSource == _colEntities)
                {
                    txtDataSourceItemCount.Text = _colEntities.Count.ToString();
                }
                else if (_itemsView.ItemsSource == _colSmallItemContainers)
                {
                    txtDataSourceItemCount.Text = _colSmallItemContainers.Count.ToString();
                }
                else if (_itemsView.ItemsSource == _colSmallImages)
                {
                    txtDataSourceItemCount.Text = _colSmallImages.Count.ToString();
                }
            }
        }

void UpdateExtentHeight ( ) [inline, private]

Definition at line 1104 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtExtentHeight != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                if (scrollView != null)
                {
                    txtExtentHeight.Text = scrollView.ExtentHeight.ToString();
                }
            }
        }

void UpdateExtentWidth ( ) [inline, private]

Definition at line 1117 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtExtentWidth != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                if (scrollView != null)
                {
                    txtExtentWidth.Text = scrollView.ExtentWidth.ToString();
                }
            }
        }

void UpdateHeight ( ) [inline, private]

Definition at line 1130 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtHeight != null)
            {
                txtHeight.Text = _itemsView.Height.ToString();
            }
        }

void UpdateHorizontalAnchorRatio ( ) [inline, private]

Definition at line 1138 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtHorizontalAnchorRatio != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                if (scrollView != null)
                {
                    txtHorizontalAnchorRatio.Text = scrollView.HorizontalAnchorRatio.ToString();
                }
            }
        }

void UpdateHorizontalOffset ( ) [inline, private]

Definition at line 1151 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtHorizontalOffset != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                if (scrollView != null)
                {
                    txtHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
                }
            }
        }

void UpdateHorizontalScrollBarVisibility ( ) [inline, private]

Definition at line 1164 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbHorizontalScrollBarVisibility != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        cmbHorizontalScrollBarVisibility.SelectedIndex = (int)scrollView.HorizontalScrollBarVisibility;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateHorizontalScrollMode ( ) [inline, private]

Definition at line 1185 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbHorizontalScrollMode != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        cmbHorizontalScrollMode.SelectedIndex = (int)scrollView.HorizontalScrollMode;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateIsEnabled ( ) [inline, private]

Definition at line 1206 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && chkIsEnabled != null)
                {
                    chkIsEnabled.IsChecked = _itemsView.IsEnabled;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateIsTabStop ( ) [inline, private]

Definition at line 1222 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && chkIsTabStop != null)
                {
                    chkIsTabStop.IsChecked = _itemsView.IsTabStop;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterChildrenCount ( ) [inline, private]

Definition at line 1297 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterChildrenCount != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        txtItemsRepeaterChildrenCount.Text = VisualTreeHelper.GetChildrenCount(itemsRepeater).ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterDefaultCacheLengths ( ) [inline, private]

Definition at line 1238 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        if (_itemsView.Layout == _flowLayout)
                        {
                            itemsRepeater.HorizontalCacheLength = 2.0;
                            itemsRepeater.VerticalCacheLength = 2.0;
                        }
                        else if (_itemsView.Layout == _linedFlowLayout)
                        {
                            itemsRepeater.HorizontalCacheLength = 0.0;
                            itemsRepeater.VerticalCacheLength = 2.0;
                        }
                        else if (_itemsView.Layout == _stackLayout)
                        {
                            if (_stackLayout.Orientation == Orientation.Horizontal)
                            {
                                itemsRepeater.HorizontalCacheLength = 0.0;
                                itemsRepeater.VerticalCacheLength = 2.0;
                            }
                            else
                            {
                                itemsRepeater.HorizontalCacheLength = 2.0;
                                itemsRepeater.VerticalCacheLength = 0.0;
                            }
                        }
                        else if (_itemsView.Layout == _uniformGridLayout)
                        {
                            if (_uniformGridLayout.Orientation == Orientation.Horizontal)
                            {
                                itemsRepeater.HorizontalCacheLength = 0.0;
                                itemsRepeater.VerticalCacheLength = 2.0;
                            }
                            else
                            {
                                itemsRepeater.HorizontalCacheLength = 2.0;
                                itemsRepeater.VerticalCacheLength = 0.0;
                            }
                        }

                        UpdateItemsRepeaterHorizontalCacheLength();
                        UpdateItemsRepeaterVerticalCacheLength();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementActualHeight ( ) [inline, private]

Definition at line 2123 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementActualHeight != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementActualHeight.Text = frameworkElement.ActualHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementActualWidth ( ) [inline, private]

Definition at line 2145 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementActualWidth != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementActualWidth.Text = frameworkElement.ActualWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementDesiredSize ( ) [inline, private]

Definition at line 2321 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementDesiredSize != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element != null)
                    {
                        txtItemsRepeaterElementDesiredSize.Text = element.DesiredSize.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementHeight ( ) [inline, private]

Definition at line 2299 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementHeight != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementHeight.Text = frameworkElement.Height.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementIsEnabled ( ) [inline, private]

Definition at line 2167 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && chkItemsRepeaterElementIsEnabled != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is Control control)
                    {
                        chkItemsRepeaterElementIsEnabled.IsChecked = control != null && control.IsEnabled;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementMaxHeight ( ) [inline, private]

Definition at line 2277 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementMaxHeight != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementMaxHeight.Text = frameworkElement.MaxHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementMaxWidth ( ) [inline, private]

Definition at line 2211 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementMaxWidth != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementMaxWidth.Text = frameworkElement.MaxWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementMinHeight ( ) [inline, private]

Definition at line 2255 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementMinHeight != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementMinHeight.Text = frameworkElement.MinHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementMinWidth ( ) [inline, private]

Definition at line 2189 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementMinWidth != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementMinWidth.Text = frameworkElement.MinWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementRenderSize ( ) [inline, private]

Definition at line 2343 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementRenderSize != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element != null)
                    {
                        txtItemsRepeaterElementRenderSize.Text = element.RenderSize.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterElementWidth ( ) [inline, private]

Definition at line 2233 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterElementWidth != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtItemsRepeaterElementWidth.Text = frameworkElement.Width.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterFields ( ) [inline, private]

Definition at line 296 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateItemsRepeaterHorizontalAlignment();
            UpdateItemsRepeaterHorizontalCacheLength();
            UpdateItemsRepeaterVerticalAlignment();
            UpdateItemsRepeaterVerticalCacheLength();
            UpdateItemsRepeaterChildrenCount();
        }

void UpdateItemsRepeaterHorizontalAlignment ( ) [inline, private]

Definition at line 1318 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbItemsRepeaterHorizontalAlignment != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        cmbItemsRepeaterHorizontalAlignment.SelectedIndex = (int)itemsRepeater.HorizontalAlignment;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterHorizontalCacheLength ( ) [inline, private]

Definition at line 1339 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterHorizontalCacheLength != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        txtItemsRepeaterHorizontalCacheLength.Text = itemsRepeater.HorizontalCacheLength.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterItemContainerCanUserInvoke ( ) [inline, private]

Definition at line 2422 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && chkItemsRepeaterItemContainerCanUserInvoke != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is ItemContainer itemContainer)
                    {
#if MUX_PRERELEASE
                        if ((int)(itemContainer.CanUserInvoke & ItemContainerUserInvokeMode.UserCannotInvoke) == (int)ItemContainerUserInvokeMode.UserCannotInvoke)
                        {
                            chkItemsRepeaterItemContainerCanUserInvoke.IsChecked = false;
                        }
                        else if ((int)(itemContainer.CanUserInvoke & ItemContainerUserInvokeMode.UserCanInvoke) == (int)ItemContainerUserInvokeMode.UserCanInvoke)
                        {
                            chkItemsRepeaterItemContainerCanUserInvoke.IsChecked = true;
                        }
                        else
                        {
                            chkItemsRepeaterItemContainerCanUserInvoke.IsChecked = null;
                        }
#endif
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterItemContainerCanUserSelect ( ) [inline, private]

Definition at line 2365 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && chkItemsRepeaterItemContainerCanUserSelect != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is ItemContainer itemContainer)
                    {
#if MUX_PRERELEASE
                        if ((int)(itemContainer.CanUserSelect & ItemContainerUserSelectMode.UserCannotSelect) == (int)ItemContainerUserSelectMode.UserCannotSelect)
                        {
                            chkItemsRepeaterItemContainerCanUserSelect.IsChecked = false;
                        }
                        else if ((int)(itemContainer.CanUserSelect & ItemContainerUserSelectMode.UserCanSelect) == (int)ItemContainerUserSelectMode.UserCanSelect)
                        {
                            chkItemsRepeaterItemContainerCanUserSelect.IsChecked = true;
                        }
                        else
                        {
                            chkItemsRepeaterItemContainerCanUserSelect.IsChecked = null;
                        }
#endif
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterItemContainerIsSelected ( ) [inline, private]

Definition at line 2400 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && chkItemsRepeaterItemContainerIsSelected != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);

                    if (element is ItemContainer itemContainer)
                    {
                        chkItemsRepeaterItemContainerIsSelected.IsChecked = itemContainer != null && itemContainer.IsSelected;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterLogItemIndexDbg ( ) [inline, private]

Definition at line 2457 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (txtItemsRepeaterLogItemIndexDbg != null)
            {
                txtItemsRepeaterLogItemIndexDbg.Text = RepeaterTestHooks.GetLogItemIndex().ToString();
            }
        }

void UpdateItemsRepeaterVerticalAlignment ( ) [inline, private]

Definition at line 1360 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbItemsRepeaterVerticalAlignment != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        cmbItemsRepeaterVerticalAlignment.SelectedIndex = (int)itemsRepeater.VerticalAlignment;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsRepeaterVerticalCacheLength ( ) [inline, private]

Definition at line 1381 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtItemsRepeaterVerticalCacheLength != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                    if (itemsRepeater != null)
                    {
                        txtItemsRepeaterVerticalCacheLength.Text = itemsRepeater.VerticalCacheLength.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsViewCurrentElementVisual ( bool log ) [inline, private]

Definition at line 1575 of file ItemsViewSummaryPage.xaml.cs.

        {
            int currentItemIndex = _itemsView.CurrentItemIndex;

            if (log)
            {
                AppendAsyncEventMessage($"ItemsView.CurrentItemIndex={currentItemIndex}");
            }

            if (bdrCurrentElement != null)
            {
                UIElement currentElement = null;
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                if (itemsRepeater != null)
                {
                    currentElement = itemsRepeater.TryGetElement(currentItemIndex);
                }

                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                if (currentElement == null || scrollView == null || (bool)chkShowCurrentElement.IsChecked == false)
                {
                    bdrCurrentElement.Visibility = Visibility.Collapsed;
                }
                else
                {
                    bdrCurrentElement.Visibility = Visibility.Visible;
                    bdrCurrentElement.Width = currentElement.ActualSize.X * scrollView.ZoomFactor - bdrCurrentElement.BorderThickness.Left - bdrCurrentElement.BorderThickness.Right - 2;
                    bdrCurrentElement.Height = currentElement.ActualSize.Y * scrollView.ZoomFactor - bdrCurrentElement.BorderThickness.Top - bdrCurrentElement.BorderThickness.Bottom - 2;

                    double currentElementOffsetX = currentElement.ActualOffset.X * scrollView.ZoomFactor + bdrCurrentElement.BorderThickness.Left + 2;
                    double currentElementOffsetY = currentElement.ActualOffset.Y * scrollView.ZoomFactor + bdrCurrentElement.BorderThickness.Top + 2;

                    currentElementOffsetX -= scrollView.HorizontalOffset;
                    currentElementOffsetY -= scrollView.VerticalOffset;

                    double horizontalExtent = scrollView.ExtentWidth * scrollView.ZoomFactor;

                    if (horizontalExtent < scrollView.ViewportWidth)
                    {
                        if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Center || itemsRepeater.HorizontalAlignment == HorizontalAlignment.Stretch)
                        {
                            currentElementOffsetX += (scrollView.ViewportWidth - horizontalExtent) / 2.0;
                        }
                        else if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Right)
                        {
                            currentElementOffsetX += scrollView.ViewportWidth - horizontalExtent;
                        }
                    }

                    double verticalExtent = scrollView.ExtentHeight * scrollView.ZoomFactor;

                    if (verticalExtent < scrollView.ViewportHeight)
                    {
                        if (itemsRepeater.VerticalAlignment == VerticalAlignment.Center || itemsRepeater.VerticalAlignment == VerticalAlignment.Stretch)
                        {
                            currentElementOffsetX += (scrollView.ViewportHeight - verticalExtent) / 2.0;
                        }
                        else if (itemsRepeater.VerticalAlignment == VerticalAlignment.Bottom)
                        {
                            currentElementOffsetX += scrollView.ViewportHeight - verticalExtent;
                        }
                    }

                    bdrCurrentElement.Margin = new Thickness(currentElementOffsetX, currentElementOffsetY, 0, 0);
                }
            }
        }

void UpdateItemsViewIsItemInvokedEnabled ( ) [inline, private]

Definition at line 1402 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                chkIsItemInvokedEnabled.IsChecked = _itemsView.IsItemInvokedEnabled;
            }
        }

void UpdateItemsViewKeyboardNavigationReferenceOffsetVisual ( bool log ) [inline, private]

Definition at line 1645 of file ItemsViewSummaryPage.xaml.cs.

        {
            Point keyboardNavigationReferenceOffset = ItemsViewTestHooks.GetKeyboardNavigationReferenceOffset(_itemsView);

            if (log)
            {
                AppendAsyncEventMessage($"ItemsView.KeyboardNavigationReferenceOffset={keyboardNavigationReferenceOffset}");
            }

            IndexBasedLayoutOrientation indexBasedLayoutOrientation = _itemsView.Layout.IndexBasedLayoutOrientation;

            if (rectVerticalKeyboardNavigationReferenceOffset != null)
            {
                if (indexBasedLayoutOrientation != IndexBasedLayoutOrientation.TopToBottom)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked && scrollView != null)
                    {
                        double offset = keyboardNavigationReferenceOffset.X * scrollView.ZoomFactor - scrollView.HorizontalOffset - 2.0f;

                        ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                        if (itemsRepeater != null)
                        {
                            double horizontalExtent = scrollView.ExtentWidth * scrollView.ZoomFactor;

                            if (horizontalExtent < scrollView.ViewportWidth)
                            {
                                if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Center || itemsRepeater.HorizontalAlignment == HorizontalAlignment.Stretch)
                                {
                                    offset += (scrollView.ViewportWidth - horizontalExtent) / 2.0;
                                }
                                else if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Right)
                                {
                                    offset += scrollView.ViewportWidth - horizontalExtent;
                                }
                            }
                        }

                        rectVerticalKeyboardNavigationReferenceOffset.Margin = new Thickness(offset, 0, 0, 0);
                        rectVerticalKeyboardNavigationReferenceOffset.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        rectVerticalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
                    }
                }
                else
                {
                    rectVerticalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
                }
            }

            if (rectHorizontalKeyboardNavigationReferenceOffset != null)
            {
                if (indexBasedLayoutOrientation != IndexBasedLayoutOrientation.LeftToRight)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked && scrollView != null)
                    {
                        double offset = keyboardNavigationReferenceOffset.Y * scrollView.ZoomFactor - scrollView.VerticalOffset - 2.0f;

                        ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);

                        if (itemsRepeater != null)
                        {
                            double verticalExtent = scrollView.ExtentHeight * scrollView.ZoomFactor;

                            if (verticalExtent < scrollView.ViewportHeight)
                            {
                                if (itemsRepeater.VerticalAlignment == VerticalAlignment.Center || itemsRepeater.VerticalAlignment == VerticalAlignment.Stretch)
                                {
                                    offset += (scrollView.ViewportHeight - verticalExtent) / 2.0;
                                }
                                else if (itemsRepeater.VerticalAlignment == VerticalAlignment.Bottom)
                                {
                                    offset += scrollView.ViewportHeight - verticalExtent;
                                }
                            }
                        }

                        rectHorizontalKeyboardNavigationReferenceOffset.Margin = new Thickness(0, offset, 0, 0);
                        rectHorizontalKeyboardNavigationReferenceOffset.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        rectHorizontalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
                    }
                }
                else
                {
                    rectHorizontalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
                }
            }
        }

void UpdateItemsViewLayout ( ) [inline, private]

Definition at line 1410 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null)
            {
                if (_itemsView.Layout is StackLayout stackLayout)
                {
                    _stackLayout = stackLayout;
                    if (cmbLayout != null)
                    {
                        cmbLayout.SelectedIndex = 3;
                    }
                }
                else
                {
                    _stackLayout = Resources["stackLayout"] as StackLayout;
                    if (_itemsView.Layout == null && cmbLayout != null)
                    {
                        cmbLayout.SelectedIndex = 0;
                    }
                }
            }
        }

void UpdateItemsViewSelectionMode ( ) [inline, private]

Definition at line 1433 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && cmbSelectionMode != null)
            {
                cmbSelectionMode.SelectedIndex = (int)_itemsView.SelectionMode;
            }
        }

void UpdateLinedFlowLayoutActualLineHeight ( ) [inline, private]

Definition at line 1473 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutActualLineHeight.Text = _linedFlowLayout.ActualLineHeight.ToString();
            }
        }

void UpdateLinedFlowLayoutAverageItemAspectRatioDbg ( ) [inline, private]

Definition at line 1490 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                string averageItemAspectRatioDbg = LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(_linedFlowLayout).ToString();
                txtLinedFlowLayoutAverageItemAspectRatioDbg.Text = averageItemAspectRatioDbg.Substring(0, Math.Min(averageItemAspectRatioDbg.Length, 14));
            }
        }

void UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg ( ) [inline, private]

Definition at line 1499 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                string forcedAverageItemAspectRatioDbg = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemAspectRatio(_linedFlowLayout).ToString();
                txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text = forcedAverageItemAspectRatioDbg.Substring(0, Math.Min(forcedAverageItemAspectRatioDbg.Length, 14));
            }
        }

void UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg ( ) [inline, private]

Definition at line 1508 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                string forcedAverageItemsPerLineDividerDbg = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemsPerLineDivider(_linedFlowLayout).ToString();
                txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text = forcedAverageItemsPerLineDividerDbg.Substring(0, Math.Min(forcedAverageItemsPerLineDividerDbg.Length, 14));
            }
        }

void UpdateLinedFlowLayoutForcedWrapMultiplierDbg ( ) [inline, private]

Definition at line 1517 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                string forcedWrapMultiplierDbg = LayoutsTestHooks.GetLinedFlowLayoutForcedWrapMultiplier(_linedFlowLayout).ToString();
                txtLinedFlowLayoutForcedWrapMultiplierDbg.Text = forcedWrapMultiplierDbg.Substring(0, Math.Min(forcedWrapMultiplierDbg.Length, 14));
            }
        }

void UpdateLinedFlowLayoutFrozenItemIndexes ( ) [inline, private]

Definition at line 1526 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutFirstFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutFirstFrozenItemIndex(_linedFlowLayout).ToString();
                txtLinedFlowLayoutLastFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLastFrozenItemIndex(_linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutIsFastPathSupportedDbg ( ) [inline, private]

Definition at line 1535 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                chkLinedFlowLayoutIsFastPathSupportedDbg.IsChecked = LayoutsTestHooks.GetLinedFlowLayoutIsFastPathSupported(_linedFlowLayout);
            }
        }

void UpdateLinedFlowLayoutItemsJustification ( ) [inline, private]

Definition at line 1794 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                cmbLinedFlowLayoutItemsJustification.SelectedIndex = (int)_linedFlowLayout.ItemsJustification;
            }
        }

void UpdateLinedFlowLayoutItemsStretch ( ) [inline, private]

Definition at line 1802 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                cmbLinedFlowLayoutItemsStretch.SelectedIndex = (int)_linedFlowLayout.ItemsStretch;
            }
        }

void UpdateLinedFlowLayoutLineHeight ( ) [inline, private]

Definition at line 1543 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutLineHeight.Text = _linedFlowLayout.LineHeight.ToString();
            }
        }

void UpdateLinedFlowLayoutLineSpacing ( ) [inline, private]

Definition at line 1551 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutLineSpacing.Text = _linedFlowLayout.LineSpacing.ToString();
            }
        }

void UpdateLinedFlowLayoutLockedItemsVisuals ( ) [inline, private]

Definition at line 1743 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (canvasLinedFlowLayoutLockedItems != null)
            {
                bool showLockedItems = (bool)chkLinedFlowLayoutShowLockedItems.IsChecked;

                canvasLinedFlowLayoutLockedItems.Visibility = showLockedItems ? Visibility.Visible : Visibility.Collapsed;
                canvasLinedFlowLayoutLockedItems.Children.Clear();

                if (showLockedItems && _lstLinedFlowLayoutLockedItemIndexes.Count > 0)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    foreach (int lockedItemIndex in _lstLinedFlowLayoutLockedItemIndexes)
                    {
                        UIElement lockedItem = GetItemsRepeaterElement(itemsRepeater, lockedItemIndex);
                        if (lockedItem != null)
                        {
                            GeneralTransform gt = lockedItem.TransformToVisual(itemsRepeater);
                            Point lockedItemOriginPoint = new Point();
                            lockedItemOriginPoint = gt.TransformPoint(lockedItemOriginPoint);

                            if (lockedItemOriginPoint.X - scrollView.HorizontalOffset >= 0 && lockedItemOriginPoint.Y - scrollView.VerticalOffset >= 0 &&
                                lockedItemOriginPoint.X - scrollView.HorizontalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Width &&
                                lockedItemOriginPoint.Y - scrollView.VerticalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Height)
                            {
                                Microsoft.UI.Xaml.Shapes.Rectangle lockedItemRectangle = new Microsoft.UI.Xaml.Shapes.Rectangle() {
                                    Fill = new SolidColorBrush(Colors.Red),
                                    Width = 8,
                                    Height = 8
                                };

                                canvasLinedFlowLayoutLockedItems.Children.Add(lockedItemRectangle);
                                Canvas.SetLeft(lockedItemRectangle, lockedItemOriginPoint.X - scrollView.HorizontalOffset);
                                Canvas.SetTop(lockedItemRectangle, lockedItemOriginPoint.Y - scrollView.VerticalOffset);
                            }
                        }
                    }
                }
            }
        }

void UpdateLinedFlowLayoutLogItemIndexDbg ( ) [inline, private]

Definition at line 1786 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutLogItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLogItemIndex(_linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutMinItemSpacing ( ) [inline, private]

Definition at line 1810 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutMinItemSpacing.Text = _linedFlowLayout.MinItemSpacing.ToString();
            }
        }

void UpdateLinedFlowLayoutRealizedItemIndexes ( ) [inline, private]

Definition at line 1818 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutFirstRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutFirstRealizedItemIndex(_linedFlowLayout).ToString();
                txtLinedFlowLayoutLastRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutLastRealizedItemIndex(_linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutRequestedRangeLength ( ) [inline, private]

Definition at line 1559 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutRequestedRangeLength.Text = _linedFlowLayout.RequestedRangeLength.ToString();
            }
        }

void UpdateLinedFlowLayoutRequestedRangeStartIndex ( ) [inline, private]

Definition at line 1567 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                txtLinedFlowLayoutRequestedRangeStartIndex.Text = _linedFlowLayout.RequestedRangeStartIndex.ToString();
            }
        }

void UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg ( ) [inline, private]

Definition at line 1481 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_linedFlowLayout != null)
            {
                string snappedAverageItemsPerLineDbg = LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(_linedFlowLayout).ToString();
                txtLinedFlowLayoutSnappedAverageItemsPerLineDbg.Text = snappedAverageItemsPerLineDbg.Substring(0, Math.Min(snappedAverageItemsPerLineDbg.Length, 14));
            }
        }

void UpdateMargin ( ) [inline, private]

Definition at line 1441 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtMargin != null)
            {
                txtMargin.Text = _itemsView.Margin.ToString();
            }
        }

void UpdateMaxHeight ( ) [inline, private]

Definition at line 1449 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtMaxHeight != null)
            {
                txtMaxHeight.Text = _itemsView.MaxHeight.ToString();
            }
        }

void UpdateMaxWidth ( ) [inline, private]

Definition at line 1457 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtMaxWidth != null)
            {
                txtMaxWidth.Text = _itemsView.MaxWidth.ToString();
            }
        }

void UpdatePadding ( ) [inline, private]

Definition at line 1465 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtPadding != null)
            {
                txtPadding.Text = _itemsView.Padding.ToString();
            }
        }

void UpdateScrollViewDefaultAnchorRatios ( ) [inline, private]

Definition at line 1827 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null)
                {
                    ScrollView scrollView = _itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;

                    if (scrollView != null)
                    {
                        if (_itemsView.Layout == _flowLayout)
                        {
                            scrollView.HorizontalAnchorRatio = 0.0;
                            scrollView.VerticalAnchorRatio = 0.0;
                        }
                        else if (_itemsView.Layout == _linedFlowLayout)
                        {
                            scrollView.HorizontalAnchorRatio = double.NaN;
                            scrollView.VerticalAnchorRatio = double.NaN;
                        }
                        else if (_itemsView.Layout == _stackLayout)
                        {
                            if (_stackLayout.Orientation == Orientation.Horizontal)
                            {
                                scrollView.HorizontalAnchorRatio = double.NaN;
                                scrollView.VerticalAnchorRatio = 0.0;
                            }
                            else
                            {
                                scrollView.HorizontalAnchorRatio = 0.0;
                                scrollView.VerticalAnchorRatio = double.NaN;
                            }
                        }
                        else if (_itemsView.Layout == _uniformGridLayout)
                        {
                            if (_uniformGridLayout.Orientation == Orientation.Horizontal)
                            {
                                scrollView.HorizontalAnchorRatio = double.NaN;
                                scrollView.VerticalAnchorRatio = 0.0;
                            }
                            else
                            {
                                scrollView.HorizontalAnchorRatio = 0.0;
                                scrollView.VerticalAnchorRatio = double.NaN;
                            }
                        }

                        UpdateHorizontalAnchorRatio();
                        UpdateVerticalAnchorRatio();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewFields ( ) [inline, private]

Definition at line 279 of file ItemsViewSummaryPage.xaml.cs.

        {
            UpdateContentOrientation();
            UpdateHorizontalScrollMode();
            UpdateVerticalScrollMode();
            UpdateZoomFactor();
            UpdateZoomMode();
            UpdateHorizontalScrollBarVisibility();
            UpdateVerticalScrollBarVisibility();
            UpdateHorizontalAnchorRatio();
            UpdateVerticalAnchorRatio();
            UpdateHorizontalOffset();
            UpdateVerticalOffset();
            UpdateExtentWidth();
            UpdateExtentHeight();
        }

void UpdateSelectedItem ( ) [inline, private]

Definition at line 1886 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (txtSelectedItem != null)
            {
                if (_itemsView == null || _itemsView.SelectedItem == null)
                {
                    txtSelectedItem.Text = "<null>";
                }
                else
                {
                    string selectedItemAsString = _itemsView.SelectedItem.ToString();

                    txtSelectedItem.Text = selectedItemAsString.Substring(0, Math.Min(selectedItemAsString.Length, 12));
                }
            }
        }

void UpdateSelectedItems ( ) [inline, private]

Definition at line 1903 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (txtSelectedItems != null)
            {
                if (_itemsView == null)
                {
                    txtSelectedItems.Text = "<null>";
                }
                else
                {
                    txtSelectedItems.Text = String.Empty;

                    foreach (var selectedItem in _itemsView.SelectedItems)
                    {
                        string selectedItemAsString = selectedItem.ToString();

                        txtSelectedItems.Text += (selectedItem == null) ? "<null>, " : selectedItemAsString.Substring(0, Math.Min(selectedItemAsString.Length, 9)) + ", ";
                    }
                }
            }
        }

void UpdateStackLayoutOrientation ( ) [inline, private]

Definition at line 1925 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_stackLayout != null && cmbStackLayoutOrientation != null)
            {
                cmbStackLayoutOrientation.SelectedIndex = _stackLayout.Orientation == Orientation.Horizontal ? 0 : 1;
            }
        }

void UpdateStackLayoutSpacing ( ) [inline, private]

Definition at line 1933 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_stackLayout != null && txtStackLayoutSpacing != null)
            {
                txtStackLayoutSpacing.Text = _stackLayout.Spacing.ToString();
            }
        }

void UpdateTabNavigation ( ) [inline, private]

Definition at line 1941 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbTabNavigation != null)
                {
                    cmbTabNavigation.SelectedIndex = (int)_itemsView.TabNavigation;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateUniformGridLayoutMaximumRowsOrColumns ( ) [inline, private]

Definition at line 1957 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_uniformGridLayout != null)
            {
                txtUniformGridLayoutMaximumRowsOrColumns.Text = _uniformGridLayout.MaximumRowsOrColumns.ToString();
            }
        }

void UpdateUniformGridLayoutMinColumnSpacing ( ) [inline, private]

Definition at line 1965 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_uniformGridLayout != null)
            {
                txtUniformGridLayoutMinColumnSpacing.Text = _uniformGridLayout.MinColumnSpacing.ToString();
            }
        }

void UpdateUniformGridLayoutMinRowSpacing ( ) [inline, private]

Definition at line 1973 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_uniformGridLayout != null)
            {
                txtUniformGridLayoutMinRowSpacing.Text = _uniformGridLayout.MinRowSpacing.ToString();
            }
        }

void UpdateUniformGridLayoutOrientation ( ) [inline, private]

Definition at line 1981 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_uniformGridLayout != null)
            {
                cmbUniformGridLayoutOrientation.SelectedIndex = (int)_uniformGridLayout.Orientation;
            }
        }

void UpdateVerticalAnchorRatio ( ) [inline, private]

Definition at line 1989 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtVerticalAnchorRatio != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                if (scrollView != null)
                {
                    txtVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
                }
            }
        }

void UpdateVerticalOffset ( ) [inline, private]

Definition at line 2002 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtVerticalOffset != null)
            {
                ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                if (scrollView != null)
                {
                    txtVerticalOffset.Text = scrollView.VerticalOffset.ToString();
                }
            }
        }

void UpdateVerticalScrollBarVisibility ( ) [inline, private]

Definition at line 2015 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbVerticalScrollBarVisibility != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        cmbVerticalScrollBarVisibility.SelectedIndex = (int)scrollView.VerticalScrollBarVisibility;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateVerticalScrollMode ( ) [inline, private]

Definition at line 2036 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbVerticalScrollMode != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        cmbVerticalScrollMode.SelectedIndex = (int)scrollView.VerticalScrollMode;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateWidth ( ) [inline, private]

Definition at line 2057 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView != null && txtWidth != null)
            {
                txtWidth.Text = _itemsView.Width.ToString();
            }
        }

void UpdateXYFocusKeyboardNavigation ( ) [inline, private]

Definition at line 2065 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbXYFocusKeyboardNavigation != null)
                {
                    cmbXYFocusKeyboardNavigation.SelectedIndex = (int)_itemsView.XYFocusKeyboardNavigation;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateZoomFactor ( ) [inline, private]

Definition at line 2081 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && txtZoomFactor != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        txtZoomFactor.Text = scrollView.ZoomFactor.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateZoomMode ( ) [inline, private]

Definition at line 2102 of file ItemsViewSummaryPage.xaml.cs.

        {
            try
            {
                if (_itemsView != null && cmbZoomMode != null)
                {
                    ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);

                    if (scrollView != null)
                    {
                        cmbZoomMode.SelectedIndex = (int)scrollView.ZoomMode;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UseItemsView ( ItemsView iv ) [inline, private]

Definition at line 180 of file ItemsViewSummaryPage.xaml.cs.

        {
            if (_itemsView == iv || iv == null)
                return;

            try
            {
                if (_itemsView != null)
                {
                    if (chkLogItemsViewMessages.IsChecked == true)
                    {
                        MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
                        if (chkLogScrollViewMessages.IsChecked == false &&
                            chkLogItemsRepeaterMessages.IsChecked == false &&
                            chkLogLinedFlowLayoutMessages.IsChecked == false)
                            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
                    }

                    if (chkLogItemsViewEvents.IsChecked == true)
                    {
                        UnhookItemsViewEvents();
                    }

                    UnhookItemsRepeaterEvents(ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView));
                }

                _itemsView = iv;

                if (chkLogItemsViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    if (chkLogScrollViewMessages.IsChecked == false &&
                        chkLogItemsRepeaterMessages.IsChecked == false &&
                        chkLogLinedFlowLayoutMessages.IsChecked == false)
                        MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
                }

                if (chkLogItemsViewEvents.IsChecked == true)
                {
                    HookItemsViewEvents();
                }

                // Update ItemsView fields
                UpdateItemsViewLayout();
                UpdateItemsViewSelectionMode();
                UpdateItemsViewIsItemInvokedEnabled();
                UpdateBackground();
                UpdateBorderBrush();
                UpdateBorderThickness();
                UpdateMargin();
                UpdatePadding();
                UpdateWidth();
                UpdateHeight();
                UpdateMaxWidth();
                UpdateMaxHeight();
                UpdateCornerRadius();
                UpdateCurrentItemIndex();
                UpdateTabNavigation();
                UpdateXYFocusKeyboardNavigation();
                UpdateIsEnabled();
                UpdateIsTabStop();

                UpdateSelectedItem();
                UpdateSelectedItems();

                UpdateLinedFlowLayoutActualLineHeight();
                UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
                UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
                UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
                UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
                UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
                UpdateLinedFlowLayoutFrozenItemIndexes();
                UpdateLinedFlowLayoutIsFastPathSupportedDbg();
                UpdateLinedFlowLayoutLineHeight();
                UpdateLinedFlowLayoutLineSpacing();
                UpdateLinedFlowLayoutItemsJustification();
                UpdateLinedFlowLayoutItemsStretch();
                UpdateLinedFlowLayoutMinItemSpacing();
                UpdateLinedFlowLayoutRealizedItemIndexes();
                UpdateLinedFlowLayoutRequestedRangeLength();
                UpdateLinedFlowLayoutRequestedRangeStartIndex();
                UpdateStackLayoutOrientation();
                UpdateStackLayoutSpacing();
                UpdateUniformGridLayoutMaximumRowsOrColumns();
                UpdateUniformGridLayoutMinColumnSpacing();
                UpdateUniformGridLayoutMinRowSpacing();
                UpdateUniformGridLayoutOrientation();

                UpdateScrollViewFields();

                UpdateItemsRepeaterFields();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

Member Data Documentation

object _asyncEventReportingLock = new object() [private]

Definition at line 67 of file ItemsViewSummaryPage.xaml.cs.

ObservableCollection<Entity> _colEntities = null [private]

Definition at line 76 of file ItemsViewSummaryPage.xaml.cs.

ObservableCollection<Entity> _colSmallEntities = null [private]

Definition at line 77 of file ItemsViewSummaryPage.xaml.cs.

ObservableCollection<Image> _colSmallImages = null [private]

Definition at line 80 of file ItemsViewSummaryPage.xaml.cs.

ObservableCollection<ItemContainer> _colSmallItemContainers = null [private]

Definition at line 79 of file ItemsViewSummaryPage.xaml.cs.

ObservableCollection<Entity> _colSmallUniformEntities = null [private]

Definition at line 78 of file ItemsViewSummaryPage.xaml.cs.

long _currentItemIndexChangedToken [private]

Definition at line 90 of file ItemsViewSummaryPage.xaml.cs.

ItemsView _dynamicItemsView = null [private]

Definition at line 74 of file ItemsViewSummaryPage.xaml.cs.

DataTemplate [] _entityTemplates = new DataTemplate[17] [private]

Definition at line 82 of file ItemsViewSummaryPage.xaml.cs.

FlowLayout _flowLayout = null [private]

Definition at line 85 of file ItemsViewSummaryPage.xaml.cs.

List<string> _fullLogs = new List<string>() [private]

Definition at line 69 of file ItemsViewSummaryPage.xaml.cs.

ItemsView _itemsView = null [private]

Definition at line 75 of file ItemsViewSummaryPage.xaml.cs.

PointerEventHandler _itemsViewPointerWheelChangedEventHandler = null [private]

Definition at line 88 of file ItemsViewSummaryPage.xaml.cs.

LinedFlowLayout _linedFlowLayout = null [private]

Definition at line 86 of file ItemsViewSummaryPage.xaml.cs.

string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus." [private]

Definition at line 66 of file ItemsViewSummaryPage.xaml.cs.

List<string> _lstAsyncEventMessage = new List<string>() [private]

Definition at line 68 of file ItemsViewSummaryPage.xaml.cs.

List<Entity> _lstEntities = null [private]

Definition at line 81 of file ItemsViewSummaryPage.xaml.cs.

List<int> _lstLinedFlowLayoutLockedItemIndexes = new List<int>() [private]

Definition at line 71 of file ItemsViewSummaryPage.xaml.cs.

List<QueuedOperation> _lstQueuedOperations = new List<QueuedOperation>() [private]

Definition at line 70 of file ItemsViewSummaryPage.xaml.cs.

DispatcherTimer _queuedOperationsTimer = new DispatcherTimer() [private]

Definition at line 87 of file ItemsViewSummaryPage.xaml.cs.

SolidColorBrush _redBrush = new SolidColorBrush(Colors.Red) [private]

Definition at line 72 of file ItemsViewSummaryPage.xaml.cs.

PointerEventHandler _scrollViewPointerWheelChangedEventHandler = null [private]

Definition at line 89 of file ItemsViewSummaryPage.xaml.cs.

StackLayout _stackLayout = null [private]

Definition at line 83 of file ItemsViewSummaryPage.xaml.cs.

UniformGridLayout _uniformGridLayout = null [private]

Definition at line 84 of file ItemsViewSummaryPage.xaml.cs.

SolidColorBrush _whiteBrush = new SolidColorBrush(Colors.White) [private]

Definition at line 73 of file ItemsViewSummaryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewSummaryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewSummaryPage::QueuedOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewSummaryPage
  • ItemsViewSummaryPage::QueuedOperation
Public Member Functions | Properties

ItemsViewSummaryPage::QueuedOperation Class Reference

List of all members.

Public Member Functions

QueuedOperation (QueuedOperationType type)
QueuedOperation (QueuedOperationType type, string value)
QueuedOperation (QueuedOperationType type, int value)
QueuedOperation (QueuedOperationType type, double value)

Properties

double | DoubleValue [get, set]
int | IntValue [get, set]
string | StringValue [get, set]
QueuedOperationType | Type [get, set]

Detailed Description

Definition at line 35 of file ItemsViewSummaryPage.xaml.cs.

Constructor & Destructor Documentation

QueuedOperation ( QueuedOperationType type ) [inline]

Definition at line 37 of file ItemsViewSummaryPage.xaml.cs.

            {
                this.Type = type;
            }

QueuedOperation | ( | QueuedOperationType | type,
 |  | double | value |
 | ) |  |  | [inline]

Definition at line 42 of file ItemsViewSummaryPage.xaml.cs.

            {
                this.Type = type;
                this.DoubleValue = value;
            }

QueuedOperation | ( | QueuedOperationType | type,
 |  | int | value |
 | ) |  |  | [inline]

Definition at line 48 of file ItemsViewSummaryPage.xaml.cs.

            {
                this.Type = type;
                this.IntValue = value;
            }

QueuedOperation | ( | QueuedOperationType | type,
 |  | string | value |
 | ) |  |  | [inline]

Definition at line 54 of file ItemsViewSummaryPage.xaml.cs.

            {
                this.Type = type;
                this.StringValue = value;
            }

Property Documentation

double DoubleValue [get, set]

Definition at line 61 of file ItemsViewSummaryPage.xaml.cs.

int IntValue [get, set]

Definition at line 62 of file ItemsViewSummaryPage.xaml.cs.

string StringValue [get, set]

Definition at line 63 of file ItemsViewSummaryPage.xaml.cs.

QueuedOperationType Type [get, set]

Definition at line 60 of file ItemsViewSummaryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewSummaryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewTransitionPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ItemsViewTransitionPage
Public Member Functions | Private Member Functions | Private Attributes

ItemsViewTransitionPage Class Reference

List of all members.

Public Member Functions

ItemsViewTransitionPage ()

Private Member Functions

void | DeleteSelectedItem ()
void | OnAddButtonClick (object sender, RoutedEventArgs e)
void | OnClearHistoryButtonClick (object sender, RoutedEventArgs e)
void | OnDeleteButtonClick (object sender, RoutedEventArgs e)
void | OnItemsViewKeyDown (object sender, KeyRoutedEventArgs e)
void | OnLayoutSelectionChanged (object sender, SelectionChangedEventArgs e)
void | OnMoveButtonClick (object sender, RoutedEventArgs e)
void | OnRefreshButtonClick (object sender, RoutedEventArgs e)
void | OnResetItemTransitionProviderButtonClick (object sender, RoutedEventArgs e)
void | OnTransitionProviderTransitionCompleted (ItemCollectionTransitionProvider sender, ItemCollectionTransitionCompletedEventArgs args)
void | RefreshItems (int itemCount)

Private Attributes

readonly RefreshableCollection
< BitmapImage > 		items = new()

Detailed Description

Definition at line 40 of file ItemsViewTransitionPage.xaml.cs.

Constructor & Destructor Documentation

ItemsViewTransitionPage ( ) [inline]

Definition at line 44 of file ItemsViewTransitionPage.xaml.cs.

        {
            this.InitializeComponent();

            ItemCountComboBox.Items.Add(1);
            ItemCountComboBox.Items.Add(5);
            ItemCountComboBox.Items.Add(10);
            ItemCountComboBox.Items.Add(100);
            ItemCountComboBox.SelectedIndex = 0;
        }

Member Function Documentation

void DeleteSelectedItem ( ) [inline, private]

Definition at line 116 of file ItemsViewTransitionPage.xaml.cs.

        {
            var selectionModel = ItemsViewTestHooks.GetSelectionModel(itemsView);
            if (selectionModel.SelectedIndex?.GetSize() > 0)
            {
                int selectedIndex = selectionModel.SelectedIndex.GetAt(0);
                items.RemoveAt(selectedIndex);
            }
        }

void OnAddButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file ItemsViewTransitionPage.xaml.cs.

        {
            items.Insert(0, new BitmapImage(new Uri($"ms-appx:///Images/vette6.jpg")));
        }

void OnClearHistoryButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 139 of file ItemsViewTransitionPage.xaml.cs.

        {
            TransitionCompletedHistoryTextBox.Text = string.Empty;
        }

void OnDeleteButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file ItemsViewTransitionPage.xaml.cs.

        {
            DeleteSelectedItem();
        }

void OnItemsViewKeyDown | ( | object | sender,
 |  | KeyRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file ItemsViewTransitionPage.xaml.cs.

        {
            if (e.Key == VirtualKey.Delete)
            {
                DeleteSelectedItem();
            }
        }

void OnLayoutSelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file ItemsViewTransitionPage.xaml.cs.

        {
            switch (((ComboBox)sender).SelectedIndex)
            {
                case 0:
                    itemsView.Layout = null;
                    break;
                case 1:
                    itemsView.Layout = (LinedFlowLayout)Resources["LinedFlowLayout"];
                    itemsView.ItemTransitionProvider = (LinedFlowLayoutItemCollectionTransitionProvider)Resources["LinedFlowLayoutItemCollectionTransitionProvider"];
                    break;
                case 2:
                    itemsView.Layout = (StackLayout)Resources["StackLayout"];
                    break;
                case 3:
                    itemsView.Layout = (UniformGridLayout)Resources["UniformGridLayout"];
                    break;
            }
        }

void OnMoveButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file ItemsViewTransitionPage.xaml.cs.

        {
            var selectionModel = ItemsViewTestHooks.GetSelectionModel(itemsView);
            if (selectionModel.SelectedIndex?.GetSize() > 0)
            {
                int selectedIndex = selectionModel.SelectedIndex.GetAt(0);

                var item = items[selectedIndex];
                items.RemoveAt(selectedIndex);
                items.Insert(0, item);
            }
        }

void OnRefreshButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 86 of file ItemsViewTransitionPage.xaml.cs.

        {
            RefreshItems((int)ItemCountComboBox.SelectedItem);
        }

void OnResetItemTransitionProviderButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file ItemsViewTransitionPage.xaml.cs.

        {
            itemsView.ItemTransitionProvider = null;
        }

void OnTransitionProviderTransitionCompleted | ( | ItemCollectionTransitionProvider | sender,
 |  | ItemCollectionTransitionCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 144 of file ItemsViewTransitionPage.xaml.cs.

        {
            static string BoundsToString(Rect bounds)
            {
                return $"({Math.Round(bounds.X)}, {Math.Round(bounds.Y)}, {Math.Round(bounds.Width)}, {Math.Round(bounds.Height)})";
            }

            TransitionCompletedHistoryTextBox.Text =
                $"Operation = {args.Transition.Operation}, " +
                $"Triggers = {args.Transition.Triggers}, " +
                $"OldBounds = {BoundsToString(args.Transition.OldBounds)}, " +
                $"NewBounds = {BoundsToString(args.Transition.NewBounds)}" +
                (TransitionCompletedHistoryTextBox.Text.Length > 0 ? Environment.NewLine : "") +
                TransitionCompletedHistoryTextBox.Text;
        }

void RefreshItems ( int itemCount ) [inline, private]

Definition at line 126 of file ItemsViewTransitionPage.xaml.cs.

        {
            List<BitmapImage> newItems = new();

            foreach (int i in Enumerable.Range(0, itemCount))
            {
                BitmapImage image = new(new Uri($"ms-appx:///Images/vette{i % 126 + 1}.jpg"));
                newItems.Add(image);
            }

            items.Refresh(newItems);
        }

Member Data Documentation

readonly RefreshableCollection<BitmapImage> items = new() [private]

Definition at line 42 of file ItemsViewTransitionPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewTransitionPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewAnchoringPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewAnchoringPage
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

ListViewAnchoringPage Class Reference

List of all members.

Public Member Functions

ListViewAnchoringPage ()

Private Types

enum QueuedOperationType {
None = 0, PageShrinkSize = 1, SourceInsertItem = 2, SourceAppendItem = 4,
SourceRemoveFirstItem = 8, SourceRemoveLastItem = 16
}

Private Member Functions

void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearListViewItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsStackPanelItemsUpdatingScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewItemActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewItemHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewSize_Click (object sender, RoutedEventArgs e)
void | BtnGetModernCollectionBasePanelGroupHeaderPlacement_Click (object sender, RoutedEventArgs e)
void | BtnGetModernCollectionBasePanelGroupPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetModernCollectionBasePanelVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnGetPageSize_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetStackPanelVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnPageShrinkSize_Click (object sender, RoutedEventArgs e)
void | BtnResetListViewItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsStackPanelItemsUpdatingScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewFlatItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewGroupedItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewItemHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetModernCollectionBasePanelGroupHeaderPlacement_Click (object sender, RoutedEventArgs e)
void | BtnSetModernCollectionBasePanelGroupPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetModernCollectionBasePanelVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSetPageSize_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewerVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewerVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnSetStackPanelVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSourceAppendItem_Click (object sender, RoutedEventArgs e)
void | BtnSourceInsertItem_Click (object sender, RoutedEventArgs e)
void | BtnSourceRemoveFirstItem_Click (object sender, RoutedEventArgs e)
void | BtnSourceRemoveLastItem_Click (object sender, RoutedEventArgs e)
void | ChkModernCollectionBasePanelAreStickyGroupHeadersEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | CmbListViewItemsPanelType_SelectionChanged (object sender, SelectionChangedEventArgs e)
ItemsStackPanel | GetItemsStackPanel ()
ItemsWrapGrid | GetItemsWrapGrid ()
StackPanel | GetStackPanel ()
Thickness | GetThicknessFromString (string thickness)
void | ListViewAnchoringPage_Loaded (object sender, RoutedEventArgs e)
void | PageOperationTimer_Tick (object sender, object e)

Static Private Member Functions

static T | FindElementOfTypeInSubtree< T > (DependencyObject element)

Private Attributes

CollectionViewSource | _cvs
GroupedListViewBaseViewModel _groupedListViewBaseViewModel
ItemsPanelTemplate | _itemsStackPanelTemplate
int | _pageOperationCount
QueuedOperationType | _pageOperations = QueuedOperationType.None
DispatcherTimer | _pageOperationTimer

Detailed Description

Definition at line 14 of file ListViewAnchoringPage.xaml.cs.

Member Enumeration Documentation

enum QueuedOperationType [private]
Enumerator:
None
PageShrinkSize
SourceInsertItem
SourceAppendItem
SourceRemoveFirstItem
SourceRemoveLastItem

Definition at line 17 of file ListViewAnchoringPage.xaml.cs.

        {
            None = 0,
            PageShrinkSize = 1,
            SourceInsertItem = 2,
            SourceAppendItem = 4,
            SourceRemoveFirstItem = 8,
            SourceRemoveLastItem = 16
        }

Constructor & Destructor Documentation

ListViewAnchoringPage ( ) [inline]

Definition at line 34 of file ListViewAnchoringPage.xaml.cs.

        {
            this.InitializeComponent();

            _pageOperationTimer = new DispatcherTimer();
            _pageOperationTimer.Interval = new TimeSpan(0, 0, 0, 0, 125 /*ms*/);
            _pageOperationTimer.Tick += PageOperationTimer_Tick;

            Loaded += ListViewAnchoringPage_Loaded;
        }

Member Function Documentation

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 856 of file ListViewAnchoringPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearListViewItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 554 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null)
                {
                    ObservableCollection<GroupedListViewBaseItem> source = listView.ItemsSource as ObservableCollection<GroupedListViewBaseItem>;
                    if (source != null)
                    {
                        source.Clear();
                    }
                    else if (_groupedListViewBaseViewModel != null)
                    {
                        _groupedListViewBaseViewModel.Items.Clear();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetItemsStackPanelItemsUpdatingScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 226 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        cmbItemsStackPanelItemsUpdatingScrollMode.SelectedIndex = (int)itemsStackPanel.ItemsUpdatingScrollMode;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetListViewItemActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 688 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtListViewItemIndex != null && txtListViewItemActualHeight != null)
                {
                    int listViewItemIndex = int.Parse(txtListViewItemIndex.Text);
                    ListViewItem listViewItem = listView.ContainerFromIndex(listViewItemIndex) as ListViewItem;
                    txtListViewItemActualHeight.Text = listViewItem.ActualHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetListViewItemHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 705 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtListViewItemIndex != null && txtListViewItemHeight != null)
                {
                    int listViewItemIndex = int.Parse(txtListViewItemIndex.Text);
                    ListViewItem listViewItem = listView.ContainerFromIndex(listViewItemIndex) as ListViewItem;
                    txtListViewItemHeight.Text = listViewItem.Height.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetListViewSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 592 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtListViewWidth != null && txtListViewHeight != null)
                {
                    txtListViewWidth.Text = "AW: " + listView.ActualWidth.ToString();
                    txtListViewHeight.Text = "AH: " + listView.ActualHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetModernCollectionBasePanelGroupHeaderPlacement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 422 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (cmbModernCollectionBasePanelGroupHeaderPlacement != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        cmbModernCollectionBasePanelGroupHeaderPlacement.SelectedIndex = (int)itemsStackPanel.GroupHeaderPlacement;
                    }
                    else
                    {
                        ItemsWrapGrid itemsWrapGrid = GetItemsWrapGrid();

                        if (itemsWrapGrid != null)
                        {
                            cmbModernCollectionBasePanelGroupHeaderPlacement.SelectedIndex = (int)itemsWrapGrid.GroupHeaderPlacement;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetModernCollectionBasePanelGroupPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 266 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtModernCollectionBasePanelGroupPadding != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        txtModernCollectionBasePanelGroupPadding.Text = itemsStackPanel.GroupPadding.ToString();
                    }
                    else
                    {
                        ItemsWrapGrid itemsWrapGrid = GetItemsWrapGrid();

                        if (itemsWrapGrid != null)
                        {
                            txtModernCollectionBasePanelGroupPadding.Text = itemsWrapGrid.GroupPadding.ToString();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetModernCollectionBasePanelVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 324 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && cmbModernCollectionBasePanelVerticalAlignment != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        cmbModernCollectionBasePanelVerticalAlignment.SelectedIndex = (int)itemsStackPanel.VerticalAlignment;
                    }
                    else
                    {
                        ItemsWrapGrid itemsWrapGrid = GetItemsWrapGrid();

                        if (itemsWrapGrid != null)
                        {
                            cmbModernCollectionBasePanelVerticalAlignment.SelectedIndex = (int)itemsWrapGrid.VerticalAlignment;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetPageSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 739 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (txtPageWidth != null && txtPageHeight != null)
                {
                    txtPageWidth.Text = ActualWidth.ToString();
                    txtPageHeight.Text = ActualHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetScrollViewerVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 608 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtScrollViewerVerticalAnchorRatio != null)
                {
                    ScrollViewer scrollViewer = FindElementOfTypeInSubtree<ScrollViewer>(listView);

                    if (scrollViewer != null)
                    {
                        txtScrollViewerVerticalAnchorRatio.Text = scrollViewer.VerticalAnchorRatio.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetScrollViewerVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 648 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtScrollViewerVerticalOffset != null)
                {
                    ScrollViewer scrollViewer = FindElementOfTypeInSubtree<ScrollViewer>(listView);

                    if (scrollViewer != null)
                    {
                        txtScrollViewerVerticalOffset.Text = scrollViewer.VerticalOffset.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnGetStackPanelVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 382 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && cmbStackPanelVerticalAlignment != null)
                {
                    StackPanel stackPanel = GetStackPanel();

                    if (stackPanel != null)
                    {
                        cmbStackPanelVerticalAlignment.SelectedIndex = (int)stackPanel.VerticalAlignment;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnPageShrinkSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 771 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (_pageOperationTimer != null)
                {
                    _pageOperations |= QueuedOperationType.PageShrinkSize;
                    _pageOperationCount = 0;
                    _pageOperationTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnResetListViewItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 577 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null)
                {
                    listView.ItemsSource = null;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetItemsStackPanelItemsUpdatingScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 246 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        itemsStackPanel.ItemsUpdatingScrollMode = (ItemsUpdatingScrollMode)cmbItemsStackPanelItemsUpdatingScrollMode.SelectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetListViewFlatItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 509 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null)
                {
                    listView.ItemsSource = new ObservableCollection<GroupedListViewBaseItem>()
                    {
                        new GroupedListViewBaseItem("ListView Item 0"),
                        new GroupedListViewBaseItem("ListView Item 1"),
                        new GroupedListViewBaseItem("ListView Item 2"),
                        new GroupedListViewBaseItem("ListView Item 3"),
                        new GroupedListViewBaseItem("ListView Item 4"),
                        new GroupedListViewBaseItem("ListView Item 5")
                    };
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetListViewGroupedItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 532 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null)
                {
                    _groupedListViewBaseViewModel = new GroupedListViewBaseViewModel();
                    _cvs = new CollectionViewSource();

                    _cvs.Source = _groupedListViewBaseViewModel.Items;
                    _cvs.IsSourceGrouped = true;
                    _cvs.ItemsPath = new PropertyPath("Items");

                    listView.ItemsSource = _cvs.View;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetListViewItemHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 722 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtListViewItemIndex != null && txtListViewItemHeight != null)
                {
                    int listViewItemIndex = int.Parse(txtListViewItemIndex.Text);
                    ListViewItem listViewItem = listView.ContainerFromIndex(listViewItemIndex) as ListViewItem;
                    listViewItem.Height = double.Parse(txtListViewItemHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetModernCollectionBasePanelGroupHeaderPlacement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 451 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (cmbModernCollectionBasePanelGroupHeaderPlacement != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        itemsStackPanel.GroupHeaderPlacement = (GroupHeaderPlacement)cmbModernCollectionBasePanelGroupHeaderPlacement.SelectedIndex;
                    }
                    else
                    {
                        ItemsWrapGrid itemsWrapGrid = GetItemsWrapGrid();

                        if (itemsWrapGrid != null)
                        {
                            itemsWrapGrid.GroupHeaderPlacement = (GroupHeaderPlacement)cmbModernCollectionBasePanelGroupHeaderPlacement.SelectedIndex;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetModernCollectionBasePanelGroupPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 295 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtModernCollectionBasePanelGroupPadding != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        itemsStackPanel.GroupPadding = GetThicknessFromString(txtModernCollectionBasePanelGroupPadding.Text);
                    }
                    else
                    {
                        ItemsWrapGrid itemsWrapGrid = GetItemsWrapGrid();

                        if (itemsWrapGrid != null)
                        {
                            itemsWrapGrid.GroupPadding = GetThicknessFromString(txtModernCollectionBasePanelGroupPadding.Text);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetModernCollectionBasePanelVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 353 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && cmbModernCollectionBasePanelVerticalAlignment != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        itemsStackPanel.VerticalAlignment = (VerticalAlignment)cmbModernCollectionBasePanelVerticalAlignment.SelectedIndex;
                    }
                    else
                    {
                        ItemsWrapGrid itemsWrapGrid = GetItemsWrapGrid();

                        if (itemsWrapGrid != null)
                        {
                            itemsWrapGrid.VerticalAlignment = (VerticalAlignment)cmbModernCollectionBasePanelVerticalAlignment.SelectedIndex;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetPageSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 755 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (txtPageWidth != null && txtPageHeight != null)
                {
                    Width = double.Parse(txtPageWidth.Text);
                    Height = double.Parse(txtPageHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetScrollViewerVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 628 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtScrollViewerVerticalAnchorRatio != null)
                {
                    ScrollViewer scrollViewer = FindElementOfTypeInSubtree<ScrollViewer>(listView);

                    if (scrollViewer != null)
                    {
                        scrollViewer.VerticalAnchorRatio = double.Parse(txtScrollViewerVerticalAnchorRatio.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetScrollViewerVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 668 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && txtScrollViewerVerticalOffset != null)
                {
                    ScrollViewer scrollViewer = FindElementOfTypeInSubtree<ScrollViewer>(listView);

                    if (scrollViewer != null)
                    {
                        scrollViewer.ChangeView(null, double.Parse(txtScrollViewerVerticalOffset.Text), null, true);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSetStackPanelVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 402 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && cmbStackPanelVerticalAlignment != null)
                {
                    StackPanel stackPanel = GetStackPanel();

                    if (stackPanel != null)
                    {
                        stackPanel.VerticalAlignment = (VerticalAlignment)cmbStackPanelVerticalAlignment.SelectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSourceAppendItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 805 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (_pageOperationTimer != null)
                {
                    _pageOperations |= QueuedOperationType.SourceAppendItem;
                    _pageOperationCount = 0;
                    _pageOperationTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSourceInsertItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 788 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (_pageOperationTimer != null)
                {
                    _pageOperations |= QueuedOperationType.SourceInsertItem;
                    _pageOperationCount = 0;
                    _pageOperationTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSourceRemoveFirstItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 822 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (_pageOperationTimer != null)
                {
                    _pageOperations |= QueuedOperationType.SourceRemoveFirstItem;
                    _pageOperationCount = 0;
                    _pageOperationTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnSourceRemoveLastItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 839 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (_pageOperationTimer != null)
                {
                    _pageOperations |= QueuedOperationType.SourceRemoveLastItem;
                    _pageOperationCount = 0;
                    _pageOperationTimer.Start();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void ChkModernCollectionBasePanelAreStickyGroupHeadersEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 480 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (chkModernCollectionBasePanelAreStickyGroupHeadersEnabled != null)
                {
                    ItemsStackPanel itemsStackPanel = GetItemsStackPanel();

                    if (itemsStackPanel != null)
                    {
                        itemsStackPanel.AreStickyGroupHeadersEnabled = (bool)chkModernCollectionBasePanelAreStickyGroupHeadersEnabled.IsChecked;
                    }
                    else
                    {
                        ItemsWrapGrid itemsWrapGrid = GetItemsWrapGrid();

                        if (itemsWrapGrid != null)
                        {
                            itemsWrapGrid.AreStickyGroupHeadersEnabled = (bool)chkModernCollectionBasePanelAreStickyGroupHeadersEnabled.IsChecked;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void CmbListViewItemsPanelType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 197 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                if (listView != null && cmbListViewItemsPanelType != null)
                {
                    switch (cmbListViewItemsPanelType.SelectedIndex)
                    {
                        case 0:
                            if (_itemsStackPanelTemplate != null && _itemsStackPanelTemplate != listView.ItemsPanel)
                            {
                                listView.ItemsPanel = _itemsStackPanelTemplate;
                            }
                            break;
                        case 1: // Use the itemsWrapGridItemsPanelTemplate resource
                            listView.ItemsPanel = Resources["itemsWrapGridItemsPanelTemplate"] as ItemsPanelTemplate;
                            break;
                        case 2: // Use the stackPanelItemsPanelTemplate resource
                            listView.ItemsPanel = Resources["stackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

static T FindElementOfTypeInSubtree< T > ( DependencyObject element ) [inline, static, private]
Type Constraints
T : DependencyObject
ItemsStackPanel GetItemsStackPanel ( ) [inline, private]

Definition at line 861 of file ListViewAnchoringPage.xaml.cs.

        {
            if (listView != null)
            {
                return listView.ItemsPanelRoot as ItemsStackPanel;
            }
            return null;
        }

ItemsWrapGrid GetItemsWrapGrid ( ) [inline, private]

Definition at line 881 of file ListViewAnchoringPage.xaml.cs.

        {
            if (listView != null)
            {
                return listView.ItemsPanelRoot as ItemsWrapGrid;
            }
            return null;
        }

StackPanel GetStackPanel ( ) [inline, private]

Definition at line 890 of file ListViewAnchoringPage.xaml.cs.

        {
            if (listView != null)
            {
                return listView.ItemsPanelRoot as StackPanel;
            }
            return null;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 870 of file ListViewAnchoringPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void ListViewAnchoringPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file ListViewAnchoringPage.xaml.cs.

        {
            if (listView != null)
            {
                _itemsStackPanelTemplate = listView.ItemsPanel;
            }
        }

void PageOperationTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 53 of file ListViewAnchoringPage.xaml.cs.

        {
            try
            {
                _pageOperationCount++;

                int maxOperationCount = 10;

                if (txtPageOperationCount != null)
                {
                    maxOperationCount = int.Parse(txtPageOperationCount.Text);
                }

                if ((_pageOperations & QueuedOperationType.PageShrinkSize) == QueuedOperationType.PageShrinkSize)
                {
                    Width = ActualWidth - 10.0;
                    Height = ActualHeight - 10.0;
                }

                if (listView != null)
                {
                    if ((_pageOperations & QueuedOperationType.SourceInsertItem) == QueuedOperationType.SourceInsertItem)
                    {
                        if (listView.ItemsSource == null)
                        {
                            listView.ItemsSource = new ObservableCollection<GroupedListViewBaseItem>()
                            {
                                new GroupedListViewBaseItem("ListView Item 0")
                            };
                        }
                        else
                        {
                            ObservableCollection<GroupedListViewBaseItem> source = listView.ItemsSource as ObservableCollection<GroupedListViewBaseItem>;
                            if (source != null)
                            {
                                source.Insert(0, new GroupedListViewBaseItem("ListView Item " + source.Count));
                            }
                            else
                            {
                                int count = _groupedListViewBaseViewModel.Items.Count;
                                string groupName = ((char)(65 + count)).ToString();
                                GroupedListViewBaseGroupItem group = new GroupedListViewBaseGroupItem("Group " + groupName);
                                group.Items.Add(new GroupedListViewBaseItem("id" + groupName + "1"));
                                _groupedListViewBaseViewModel.Items.Insert(0, group);
                            }
                        }
                    }

                    if ((_pageOperations & QueuedOperationType.SourceAppendItem) == QueuedOperationType.SourceAppendItem)
                    {
                        if (listView.ItemsSource == null)
                        {
                            listView.ItemsSource = new ObservableCollection<GroupedListViewBaseItem>()
                            {
                                new GroupedListViewBaseItem("ListView Item 0")
                            };
                        }
                        else
                        {
                            ObservableCollection<GroupedListViewBaseItem> source = listView.ItemsSource as ObservableCollection<GroupedListViewBaseItem>;
                            if (source != null)
                            {
                                source.Add(new GroupedListViewBaseItem("ListView Item " + source.Count));
                            }
                            else
                            {
                                int count = _groupedListViewBaseViewModel.Items.Count;
                                string groupName = ((char)(65 + count)).ToString();
                                GroupedListViewBaseGroupItem group = new GroupedListViewBaseGroupItem("Group " + groupName);
                                group.Items.Add(new GroupedListViewBaseItem("id" + groupName + "1"));
                                _groupedListViewBaseViewModel.Items.Add(group);
                            }
                        }
                    }

                    if (listView.ItemsSource != null &&
                        (_pageOperations & QueuedOperationType.SourceRemoveFirstItem) == QueuedOperationType.SourceRemoveFirstItem)
                    {
                        ObservableCollection<GroupedListViewBaseItem> source = listView.ItemsSource as ObservableCollection<GroupedListViewBaseItem>;
                        if (source != null)
                        {
                            if (source.Count > 0)
                            {
                                source.RemoveAt(0);
                            }
                        }
                        else
                        {
                            int count = _groupedListViewBaseViewModel.Items.Count;
                            if (count > 0)
                            {
                                GroupedListViewBaseGroupItem group = _groupedListViewBaseViewModel.Items[0];
                                group.Items.RemoveAt(0);
                                if (group.Items.Count == 0)
                                {
                                    _groupedListViewBaseViewModel.Items.RemoveAt(0);
                                }
                            }
                        }
                    }

                    if (listView.ItemsSource != null &&
                        (_pageOperations & QueuedOperationType.SourceRemoveLastItem) == QueuedOperationType.SourceRemoveLastItem)
                    {
                        ObservableCollection<GroupedListViewBaseItem> source = listView.ItemsSource as ObservableCollection<GroupedListViewBaseItem>;
                        if (source != null)
                        {
                            if (source.Count > 0)
                            {
                                source.RemoveAt(source.Count - 1);
                            }
                        }
                        else
                        {
                            int count = _groupedListViewBaseViewModel.Items.Count;
                            if (count > 0)
                            {
                                GroupedListViewBaseGroupItem group = _groupedListViewBaseViewModel.Items[count - 1];
                                group.Items.RemoveAt(group.Items.Count - 1);
                                if (group.Items.Count == 0)
                                {
                                    _groupedListViewBaseViewModel.Items.RemoveAt(count - 1);
                                }
                            }
                        }
                    }

                    if (_pageOperationCount == maxOperationCount)
                    {
                        _pageOperations = QueuedOperationType.None;

                        if (_pageOperationTimer != null)
                        {
                            _pageOperationTimer.Stop();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

Member Data Documentation

CollectionViewSource _cvs [private]

Definition at line 28 of file ListViewAnchoringPage.xaml.cs.

GroupedListViewBaseViewModel _groupedListViewBaseViewModel [private]

Definition at line 27 of file ListViewAnchoringPage.xaml.cs.

ItemsPanelTemplate _itemsStackPanelTemplate [private]

Definition at line 29 of file ListViewAnchoringPage.xaml.cs.

int _pageOperationCount [private]

Definition at line 31 of file ListViewAnchoringPage.xaml.cs.

QueuedOperationType _pageOperations = QueuedOperationType.None [private]

Definition at line 32 of file ListViewAnchoringPage.xaml.cs.

DispatcherTimer _pageOperationTimer [private]

Definition at line 30 of file ListViewAnchoringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ListViewAnchoringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewBackgroundPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewBackgroundPage
Public Member Functions | Properties | Private Member Functions | Private Attributes

ListViewBackgroundPage Class Reference

List of all members.

Public Member Functions

ListViewBackgroundPage ()

Properties

Style | CustomListViewStyle [get, set]

Private Member Functions

void | btnChangeListViewStyle_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | PopulateData ()

Private Attributes

ObservableCollection< Ingredient > | Ingredients = new ObservableCollection<Ingredient>()

Detailed Description

Definition at line 10 of file ListViewBackgroundPage.xaml.cs.

Constructor & Destructor Documentation

ListViewBackgroundPage ( ) [inline]

Definition at line 14 of file ListViewBackgroundPage.xaml.cs.

        {
            this.InitializeComponent();
            this.CustomListViewStyle = this.sp.Resources["CustomListViewStyle"] as Style;
            PopulateData();
        }

Member Function Documentation

void btnChangeListViewStyle_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file ListViewBackgroundPage.xaml.cs.

        {
            if (this.IngredientList.Style == this.CustomListViewStyle)
            {
                this.IngredientList.Style = null;
            }
            else
            {
                this.IngredientList.Style = this.CustomListViewStyle;
            }
        }

void PopulateData ( ) [inline, private]

Definition at line 27 of file ListViewBackgroundPage.xaml.cs.

        {
            this.Ingredients.Add(new Ingredient("Banana", "10 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "27 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "12 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "54 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "2 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "5 lbs", "Assets/ingredient4.png"));
            this.Ingredients.Add(new Ingredient("Banana", "9 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "21 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "10 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "57 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "1 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "4 lbs", "Assets/ingredient4.png"));

            this.IngredientList.ItemsSource = this.Ingredients;
        }

Member Data Documentation

ObservableCollection<Ingredient> Ingredients = new ObservableCollection<Ingredient>() [private]

Definition at line 12 of file ListViewBackgroundPage.xaml.cs.

Property Documentation

Style CustomListViewStyle [get, set, private]

Definition at line 22 of file ListViewBackgroundPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/ListViewBackgroundPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewBasePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewBasePage
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

ListViewBasePage Class Reference

List of all members.

Classes

class | QueuedOperation

Public Member Functions

ListViewBasePage ()

Protected Member Functions

override void | OnNavigatedTo (NavigationEventArgs e)

Private Types

enum QueuedOperationType {
DataSourceAdd, DataSourceInsert, DataSourceRemove, DataSourceRemoveAll,
DataSourceReplace, DataSourceRaiseResetNotification
}

Private Member Functions

void | AppendEventMessage (string eventMessage)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceAddItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceGetItemCount_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceInsertItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceRaiseResetNotification_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceRemoveAllItems_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceRemoveItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceReplaceItem_Click (object sender, RoutedEventArgs e)
void | BtnDataSourceSetItemCount_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewBaseReorderMode_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewBaseSelectionMode_Click (object sender, RoutedEventArgs e)
void | BtnGetListViewBaseTabNavigation_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerExtentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerViewportHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewerViewportWidth_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceAddItem_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceInsertItem_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceRaiseResetNotification_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceRemoveAllItems_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceRemoveItem_Click (object sender, RoutedEventArgs e)
void | BtnQueueDataSourceReplaceItem_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsPanelOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewBaseReorderMode_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewBaseSelectionMode_Click (object sender, RoutedEventArgs e)
void | BtnSetListViewBaseTabNavigation_Click (object sender, RoutedEventArgs e)
void | ChkDataSource_Checked (object sender, RoutedEventArgs e)
void | ChkDataSource_Unchecked (object sender, RoutedEventArgs e)
void | ChkListViewBaseAllowDrop_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkListViewBaseCanDragItems_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkListViewBaseCanReorderItems_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkListViewBaseIsItemClickEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkListViewBaseIsSwipeEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkListViewBaseProperties_Checked (object sender, RoutedEventArgs e)
void | ChkListViewBaseProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | CmbListViewBaseFooter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbListViewBaseHeader_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbListViewBaseItemsPanelType_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerHorizontalSnapPointsType_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerVerticalSnapPointsType_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | DataSourceAddItem ()
void | DataSourceInsertItem (int newItemIndex)
void | DataSourceRaiseResetNotification ()
void | DataSourceRemoveAllItems ()
void | DataSourceRemoveItem (int oldItemIndex)
void | DataSourceReplaceItem (int itemIndex)
void | EnqueueOperation (QueuedOperation queuedOperation)
void | EnqueueOperation (QueuedOperationType queuedOperationType)
void | ExecuteQueuedOperations ()
BitmapImage | GetBitmapImage (int index)
Thickness | GetThicknessFromString (string thickness)
void | ListViewBase_ItemClick (object sender, ItemClickEventArgs e)
void | ListViewBasePage_Loaded (object sender, RoutedEventArgs e)
void | NbItemsWrapGridMaximumRowsOrColumns_ValueChanged (object sender, object e)
void | QueuedOperationsTimer_Tick (object sender, object e)
void | RestoreScrollViewerWidth ()
void | UpdateDataSourceItemCount ()
void | UpdateItemsPanelMargin ()
void | UpdateItemsPanelOrientation ()
void | UpdateItemsPanelProperties ()
void | UpdateItemsPanelType ()
void | UpdateItemsWrapGridMaximumRowsOrColumns ()
void | UpdateListViewBaseReorderMode ()
void | UpdateListViewBaseSelectionMode ()
void | UpdateListViewBaseSingleSelectionFollowsFocus ()
void | UpdateListViewBaseTabNavigation ()
void | UpdateModernPanelUIVisibility (Visibility visibility)
void | UpdateScrollViewerExtentHeight ()
void | UpdateScrollViewerExtentWidth ()
void | UpdateScrollViewerHorizontalOffset ()
void | UpdateScrollViewerHorizontalSnapPointsType ()
void | UpdateScrollViewerProperties ()
void | UpdateScrollViewerScrollOrientation ()
void | UpdateScrollViewerSizeProperties ()
void | UpdateScrollViewerVerticalOffset ()
void | UpdateScrollViewerVerticalSnapPointsType ()
void | UpdateScrollViewerViewportHeight ()
void | UpdateScrollViewerViewportWidth ()

Static Private Member Functions

static T | FindElementOfTypeInSubtree< T > (DependencyObject element)

Private Attributes

EntityObservableCollection | _colEntities = null
ListViewBase | _listViewBase = null
List< QueuedOperation > | _lstQueuedOperations = new List<QueuedOperation>()
ItemsPanelTemplate | _modernPanelTemplate = null
DispatcherTimer | _queuedOperationsTimer = new DispatcherTimer()
ScrollViewer | _scrollViewer = null

Detailed Description

Definition at line 19 of file ListViewBasePage.xaml.cs.

Member Enumeration Documentation

enum QueuedOperationType [private]
Enumerator:
DataSourceAdd
DataSourceInsert
DataSourceRemove
DataSourceRemoveAll
DataSourceReplace
DataSourceRaiseResetNotification

Definition at line 21 of file ListViewBasePage.xaml.cs.

        {
            DataSourceAdd,
            DataSourceInsert,
            DataSourceRemove,
            DataSourceRemoveAll,
            DataSourceReplace,
            DataSourceRaiseResetNotification
        }

Constructor & Destructor Documentation

ListViewBasePage ( ) [inline]

Definition at line 69 of file ListViewBasePage.xaml.cs.

        {
            this.InitializeComponent();

            _queuedOperationsTimer.Interval = new TimeSpan(0, 0, 10 /*sec*/);
            _queuedOperationsTimer.Tick += QueuedOperationsTimer_Tick;

            Loaded += ListViewBasePage_Loaded;
        }

Member Function Documentation

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 1353 of file ListViewBasePage.xaml.cs.

        {
            if (chkLog.IsChecked == true)
            {
                lstLogs.Items.Add(eventMessage);
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1361 of file ListViewBasePage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1366 of file ListViewBasePage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnDataSourceAddItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1071 of file ListViewBasePage.xaml.cs.

        {
            AppendEventMessage("DataSourceAdd");
            DataSourceAddItem();
        }

void BtnDataSourceGetItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1023 of file ListViewBasePage.xaml.cs.

        {
            UpdateDataSourceItemCount();
        }

void BtnDataSourceInsertItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1083 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("DataSourceInsert " + newItemIndex);
                    DataSourceInsertItem(newItemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceRaiseResetNotification_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1133 of file ListViewBasePage.xaml.cs.

        {
            AppendEventMessage("DataSourceRaiseResetNotification");
            DataSourceRaiseResetNotification();
        }

void BtnDataSourceRemoveAllItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1121 of file ListViewBasePage.xaml.cs.

        {
            AppendEventMessage("DataSourceRemoveAll");
            DataSourceRemoveAllItems();
        }

void BtnDataSourceRemoveItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1145 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("DataSourceRemove " + oldItemIndex);
                    DataSourceRemoveItem(oldItemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceReplaceItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1183 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int itemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("DataSourceReplace " + itemIndex);
                    DataSourceReplaceItem(itemIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnDataSourceSetItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1028 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _listViewBase.ItemsSource != null && txtDataSourceItemCount != null)
                {
                    int newItemCount = int.Parse(txtDataSourceItemCount.Text);

                    if (_listViewBase.ItemsSource == _colEntities)
                    {
                        if (_colEntities.Count < newItemCount)
                        {
                            var colEntitiesEnd = new List<Entity>();

                            for (int itemIndex = 0; itemIndex < newItemCount - _colEntities.Count; itemIndex++)
                            {
                                BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);

                                colEntitiesEnd.Add(new Entity()
                                {
                                    BitmapImage = bitmapImage,
                                    Id = itemIndex
                                });
                            }

                            _colEntities = new EntityObservableCollection(_colEntities.Collection.Concat(colEntitiesEnd));
                        }
                        else if (_colEntities.Count > newItemCount)
                        {
                            _colEntities = new EntityObservableCollection(_colEntities.Collection.Take(newItemCount));
                        }

                        _listViewBase.ItemsSource = _colEntities;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 882 of file ListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelMargin();
        }

void BtnGetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 827 of file ListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
        }

void BtnGetListViewBaseReorderMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 709 of file ListViewBasePage.xaml.cs.

        {
            UpdateListViewBaseReorderMode();
        }

void BtnGetListViewBaseSelectionMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 722 of file ListViewBasePage.xaml.cs.

        {
            UpdateListViewBaseSelectionMode();
        }

void BtnGetListViewBaseTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 735 of file ListViewBasePage.xaml.cs.

        {
            UpdateListViewBaseTabNavigation();
        }

void BtnGetScrollViewerExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 923 of file ListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerExtentHeight();
        }

void BtnGetScrollViewerExtentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 918 of file ListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerExtentWidth();
        }

void BtnGetScrollViewerHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 928 of file ListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerHorizontalOffset();
        }

void BtnGetScrollViewerVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 933 of file ListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerVerticalOffset();
        }

void BtnGetScrollViewerViewportHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 913 of file ListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerViewportHeight();
        }

void BtnGetScrollViewerViewportWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 908 of file ListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerViewportWidth();
        }

void BtnQueueDataSourceAddItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1077 of file ListViewBasePage.xaml.cs.

        {
            AppendEventMessage("Queued DataSourceAdd");
            EnqueueOperation(QueuedOperationType.DataSourceAdd);
        }

void BtnQueueDataSourceInsertItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1102 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("Queued DataSourceInsert " + newItemIndex);
                    EnqueueOperation(new QueuedOperation(QueuedOperationType.DataSourceInsert, newItemIndex));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueDataSourceRaiseResetNotification_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1139 of file ListViewBasePage.xaml.cs.

        {
            AppendEventMessage("Queued DataSourceRaiseResetNotification");
            EnqueueOperation(QueuedOperationType.DataSourceRaiseResetNotification);
        }

void BtnQueueDataSourceRemoveAllItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1127 of file ListViewBasePage.xaml.cs.

        {
            AppendEventMessage("Queued DataSourceRemoveAll");
            EnqueueOperation(QueuedOperationType.DataSourceRemoveAll);
        }

void BtnQueueDataSourceRemoveItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1164 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("Queued DataSourceRemove " + oldItemIndex);
                    EnqueueOperation(new QueuedOperation(QueuedOperationType.DataSourceRemove, oldItemIndex));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnQueueDataSourceReplaceItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1202 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (txtDataSourceItemIndex != null)
                {
                    int itemIndex = int.Parse(txtDataSourceItemIndex.Text);

                    AppendEventMessage("Queued DataSourceReplace " + itemIndex);
                    EnqueueOperation(new QueuedOperation(QueuedOperationType.DataSourceReplace, itemIndex));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 887 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = _listViewBase.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        itemsPanel.Margin = GetThicknessFromString(txtItemsPanelMargin.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetItemsPanelOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 832 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbItemsPanelOrientation != null)
            {
                ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                if (itemsWrapGrid != null)
                {
                    _listViewBase.ItemsSource = null;

                    itemsWrapGrid.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                }
                else
                {
                    ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                    if (itemsStackPanel != null)
                    {
                        _listViewBase.ItemsSource = null;

                        itemsStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                    }
                    else
                    {
                        VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;

                        if (virtualizingStackPanel != null)
                        {
                            virtualizingStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                        }
                        else
                        {
                            StackPanel stackPanel = _listViewBase.ItemsPanelRoot as StackPanel;

                            if (stackPanel != null)
                            {
                                stackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
                            }
                        }
                    }
                }

                _listViewBase.ItemsSource = _colEntities;

                // _listViewBase.ItemsPanelRoot is only updated asynchronously.
                _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerScrollOrientation);
                _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerProperties);
            }
        }

void BtnSetListViewBaseReorderMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 714 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseReorderMode != null)
            {
                _listViewBase.ReorderMode = (ListViewReorderMode)cmbListViewBaseReorderMode.SelectedIndex;
            }
        }

void BtnSetListViewBaseSelectionMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 727 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseSelectionMode != null)
            {
                _listViewBase.SelectionMode = (ListViewSelectionMode) cmbListViewBaseSelectionMode.SelectedIndex;
            }
        }

void BtnSetListViewBaseTabNavigation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 740 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseTabNavigation != null)
            {
                _listViewBase.TabNavigation = (KeyboardNavigationMode)cmbListViewBaseTabNavigation.SelectedIndex;
            }
        }

void ChkDataSource_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1329 of file ListViewBasePage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Visible;
        }

void ChkDataSource_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1335 of file ListViewBasePage.xaml.cs.

        {
            if (svDataSource != null)
                svDataSource.Visibility = Visibility.Collapsed;
        }

void ChkListViewBaseAllowDrop_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1221 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.AllowDrop = (bool)chkListViewBaseAllowDrop.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkListViewBaseCanDragItems_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1237 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.CanDragItems = (bool)chkListViewBaseCanDragItems.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkListViewBaseCanReorderItems_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1253 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.CanReorderItems = (bool)chkListViewBaseCanReorderItems.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkListViewBaseIsItemClickEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1285 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.IsItemClickEnabled = (bool)chkListViewBaseIsItemClickEnabled.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkListViewBaseIsSwipeEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1269 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.IsSwipeEnabled = (bool)chkListViewBaseIsSwipeEnabled.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkListViewBaseProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1317 of file ListViewBasePage.xaml.cs.

        {
            if (svListViewBaseProperties != null)
                svListViewBaseProperties.Visibility = Visibility.Visible;
        }

void ChkListViewBaseProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1323 of file ListViewBasePage.xaml.cs.

        {
            if (svListViewBaseProperties != null)
                svListViewBaseProperties.Visibility = Visibility.Collapsed;
        }

void ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1301 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    _listViewBase.SingleSelectionFollowsFocus = (bool)chkListViewBaseSingleSelectionFollowsFocus.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1341 of file ListViewBasePage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1347 of file ListViewBasePage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void CmbListViewBaseFooter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 790 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbListViewBaseFooter != null)
                {
                    switch (cmbListViewBaseFooter.SelectedIndex)
                    {
                        case 0: /*None*/
                            _listViewBase.Footer = null;
                            break;
                        case 1: /*Non-focusable*/
                            _listViewBase.Footer = new TextBlock()
                            {
                                FontSize = 18.0,
                                Margin = new Thickness(10.0),
                                Text = "Footer"
                            };
                            break;
                        case 2: /*Focusable*/
                            _listViewBase.Footer = new Button()
                            {
                                Content = "Footer",
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbListViewBaseHeader_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 753 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbListViewBaseHeader != null)
                {
                    switch (cmbListViewBaseHeader.SelectedIndex)
                    {
                        case 0: /*None*/
                            _listViewBase.Header = null;
                            break;
                        case 1: /*Non-focusable*/
                            _listViewBase.Header = new TextBlock()
                            {
                                FontSize = 18.0,
                                Margin = new Thickness(10.0),
                                Text = "Header"
                            };
                            break;
                        case 2: /*Focusable*/
                            _listViewBase.Header = new Button()
                            {
                                Content = "Header",
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbListViewBaseItemsPanelType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 748 of file ListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelType();
        }

void CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 970 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsAlignment != null)
                {
                    _scrollViewer.HorizontalSnapPointsAlignment = (SnapPointsAlignment)cmbScrollViewerHorizontalSnapPointsAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewerHorizontalSnapPointsType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 938 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsType != null)
                {
                    _scrollViewer.HorizontalSnapPointsType = (SnapPointsType)cmbScrollViewerHorizontalSnapPointsType.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 986 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsAlignment != null)
                {
                    _scrollViewer.VerticalSnapPointsAlignment = (SnapPointsAlignment)cmbScrollViewerVerticalSnapPointsAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewerVerticalSnapPointsType_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 954 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsType != null)
                {
                    _scrollViewer.VerticalSnapPointsType = (SnapPointsType)cmbScrollViewerVerticalSnapPointsType.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceAddItem ( ) [inline, private]

Definition at line 569 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _listViewBase.ItemsSource != null)
                {
                    if (_listViewBase.ItemsSource == _colEntities)
                    {
                        BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

                        var entity = new Entity()
                        {
                            BitmapImage = bitmapImage,
                            Id = _colEntities.Count
                        };

                        _colEntities.Add(entity);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceInsertItem ( int newItemIndex ) [inline, private]

Definition at line 596 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _listViewBase.ItemsSource != null)
                {
                    if (_listViewBase.ItemsSource == _colEntities)
                    {
                        BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

                        var entity = new Entity()
                        {
                            BitmapImage = bitmapImage,
                            Id = _colEntities.Count
                        };

                        _colEntities.Insert(newItemIndex, entity);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceRaiseResetNotification ( ) [inline, private]

Definition at line 688 of file ListViewBasePage.xaml.cs.

        {
            if (_colEntities != null)
            {
                _colEntities.RaiseResetNotification();
            }
        }

void DataSourceRemoveAllItems ( ) [inline, private]

Definition at line 623 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _listViewBase.ItemsSource != null)
                {
                    if (_listViewBase.ItemsSource == _colEntities)
                    {
                        _colEntities.Clear();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceRemoveItem ( int oldItemIndex ) [inline, private]

Definition at line 642 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _listViewBase.ItemsSource != null)
                {
                    if (_listViewBase.ItemsSource == _colEntities)
                    {
                        _colEntities.RemoveAt(oldItemIndex);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void DataSourceReplaceItem ( int itemIndex ) [inline, private]

Definition at line 661 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && _listViewBase.ItemsSource != null)
                {
                    if (_listViewBase.ItemsSource == _colEntities)
                    {
                        BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

                        var entity = new Entity()
                        {
                            BitmapImage = bitmapImage,
                            Id = _colEntities.Count
                        };

                        _colEntities[itemIndex] = entity;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void EnqueueOperation ( QueuedOperation queuedOperation ) [inline, private]

Definition at line 1412 of file ListViewBasePage.xaml.cs.

        {
            _lstQueuedOperations.Add(queuedOperation);
            _queuedOperationsTimer.Start();
        }

void EnqueueOperation ( QueuedOperationType queuedOperationType ) [inline, private]

Definition at line 1407 of file ListViewBasePage.xaml.cs.

        {
            EnqueueOperation(new QueuedOperation(queuedOperationType));
        }

void ExecuteQueuedOperations ( ) [inline, private]

Definition at line 1418 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                while (_lstQueuedOperations.Count > 0)
                {
                    QueuedOperation qo = _lstQueuedOperations[0];

                    switch (qo.Type)
                    {
                        case QueuedOperationType.DataSourceAdd:
                            DataSourceAddItem();
                            break;
                        case QueuedOperationType.DataSourceInsert:
                            DataSourceInsertItem(qo.IntValue);
                            break;
                        case QueuedOperationType.DataSourceRemove:
                            DataSourceRemoveItem(qo.IntValue);
                            break;
                        case QueuedOperationType.DataSourceRemoveAll:
                            DataSourceRemoveAllItems();
                            break;
                        case QueuedOperationType.DataSourceReplace:
                            DataSourceReplaceItem(qo.IntValue);
                            break;
                        case QueuedOperationType.DataSourceRaiseResetNotification:
                            DataSourceRaiseResetNotification();
                            break;
                    }

                    _lstQueuedOperations.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

static T FindElementOfTypeInSubtree< T > ( DependencyObject element ) [inline, static, private]
Type Constraints
T : DependencyObject
BitmapImage GetBitmapImage ( int index ) [inline, private]

Definition at line 559 of file ListViewBasePage.xaml.cs.

        {
            Uri uri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", index));
            BitmapImage bitmapImage = new BitmapImage();
            bitmapImage.DecodePixelWidth = 120;
            bitmapImage.DecodePixelHeight = 120;
            bitmapImage.UriSource = uri;
            return bitmapImage;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 1371 of file ListViewBasePage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void ListViewBase_ItemClick | ( | object | sender,
 |  | ItemClickEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 696 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                AppendEventMessage($"ListViewBase_ItemClick ClickedItem={e.ClickedItem.ToString()}");
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ListViewBasePage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 100 of file ListViewBasePage.xaml.cs.

        {
            _scrollViewer = FindElementOfTypeInSubtree<ScrollViewer>(_listViewBase);

            _colEntities = new EntityObservableCollection();

            for (int itemIndex = 0; itemIndex < 250; itemIndex++)
            {
                BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);

                _colEntities.Add(new Entity()
                {
                    BitmapImage = bitmapImage,
                    Id = itemIndex
                });
            }

            UpdateItemsPanelType();
            UpdateListViewBaseSingleSelectionFollowsFocus();

            _listViewBase.ItemsSource = _colEntities;
        }

void NbItemsWrapGridMaximumRowsOrColumns_ValueChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 1002 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && nbItemsWrapGridMaximumRowsOrColumns != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        itemsWrapGrid.MaximumRowsOrColumns = (int)nbItemsWrapGridMaximumRowsOrColumns.Value;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

override void OnNavigatedTo ( NavigationEventArgs e ) [inline, protected]

Definition at line 79 of file ListViewBasePage.xaml.cs.

        {
            bool useGridView = (bool)e.Parameter;

            _listViewBase = useGridView ? gridView : listView;
            _listViewBase.Visibility = Visibility.Visible;

            if (useGridView)
            {
                tblListViewBasePageTitle.Text = "GridView";
                tblItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Visible;
                nbItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Visible;
            }
            else
            {
                tblListViewBasePageTitle.Text = "ListView";
            }

            base.OnNavigatedTo(e);
        }

void QueuedOperationsTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 1401 of file ListViewBasePage.xaml.cs.

        {
            _queuedOperationsTimer.Stop();
            ExecuteQueuedOperations();
        }

void RestoreScrollViewerWidth ( ) [inline, private]

Definition at line 124 of file ListViewBasePage.xaml.cs.

        {
            if (_scrollViewer != null)
            {
                _scrollViewer.Width = double.NaN;

                _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerSizeProperties);
            }
        }

void UpdateDataSourceItemCount ( ) [inline, private]

Definition at line 544 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && txtDataSourceItemCount != null)
            {
                if (_listViewBase.ItemsSource == null)
                {
                    txtDataSourceItemCount.Text = "0";
                }
                else if (_listViewBase.ItemsSource == _colEntities)
                {
                    txtDataSourceItemCount.Text = _colEntities.Count.ToString();
                }
            }
        }

void UpdateItemsPanelMargin ( ) [inline, private]

Definition at line 282 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && txtItemsPanelMargin != null)
                {
                    Panel itemsPanel = _listViewBase.ItemsPanelRoot;

                    if (itemsPanel != null)
                    {
                        txtItemsPanelMargin.Text = itemsPanel.Margin.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsPanelOrientation ( ) [inline, private]

Definition at line 221 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbItemsPanelOrientation != null)
            {
                ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                if (itemsWrapGrid != null)
                {
                    cmbItemsPanelOrientation.SelectedIndex = (int)itemsWrapGrid.Orientation;
                }
                else
                {
                    ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                    if (itemsStackPanel != null)
                    {
                        cmbItemsPanelOrientation.SelectedIndex = (int)itemsStackPanel.Orientation;
                    }
                    else
                    {
                        VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;

                        if (virtualizingStackPanel != null)
                        {
                            cmbItemsPanelOrientation.SelectedIndex = (int)virtualizingStackPanel.Orientation;
                        }
                        else
                        {
                            StackPanel stackPanel = _listViewBase.ItemsPanelRoot as StackPanel;

                            if (stackPanel != null)
                            {
                                cmbItemsPanelOrientation.SelectedIndex = (int)stackPanel.Orientation;
                            }
                        }
                    }
                }
            }
        }

void UpdateItemsPanelProperties ( ) [inline, private]

Definition at line 174 of file ListViewBasePage.xaml.cs.

        {
            UpdateItemsPanelOrientation();
            UpdateItemsPanelMargin();

            if (_listViewBase.ItemsPanel == _modernPanelTemplate && _listViewBase == gridView)
            {
                UpdateItemsWrapGridMaximumRowsOrColumns();
            }

            // _listViewBase.ItemsPanelRoot is only updated asynchronously.
            _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerScrollOrientation);
            _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerProperties);
        }

void UpdateItemsPanelType ( ) [inline, private]

Definition at line 134 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && cmbListViewBaseItemsPanelType != null)
                {
                    switch (cmbListViewBaseItemsPanelType.SelectedIndex)
                    {
                        case 0:
                            if (_modernPanelTemplate == null)
                            {
                                _modernPanelTemplate = _listViewBase.ItemsPanel;
                            }
                            else
                            {
                                _listViewBase.ItemsPanel = _modernPanelTemplate;
                                UpdateModernPanelUIVisibility(Visibility.Visible);
                            }
                            break;
                        case 1: // Use the virtualizingStackPanelItemsPanelTemplate resource
                            _listViewBase.ItemsPanel = Resources["virtualizingStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateModernPanelUIVisibility(Visibility.Collapsed);
                            break;
                        case 2: // Use the stackPanelItemsPanelTemplate resource
                            _listViewBase.ItemsPanel = Resources["stackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
                            UpdateModernPanelUIVisibility(Visibility.Collapsed);
                            break;
                    }

                    // _listViewBase.ItemsPanelRoot is only updated asynchronously.
                    _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateItemsPanelProperties);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsWrapGridMaximumRowsOrColumns ( ) [inline, private]

Definition at line 261 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null && nbItemsWrapGridMaximumRowsOrColumns != null)
                {
                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null && itemsWrapGrid.MaximumRowsOrColumns != -1)
                    {
                        nbItemsWrapGridMaximumRowsOrColumns.Value = itemsWrapGrid.MaximumRowsOrColumns;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateListViewBaseReorderMode ( ) [inline, private]

Definition at line 189 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseReorderMode != null)
            {
                cmbListViewBaseReorderMode.SelectedIndex = (int)_listViewBase.ReorderMode;
            }
        }

void UpdateListViewBaseSelectionMode ( ) [inline, private]

Definition at line 197 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseSelectionMode != null)
            {
                cmbListViewBaseSelectionMode.SelectedIndex = (int)_listViewBase.SelectionMode;
            }
        }

void UpdateListViewBaseSingleSelectionFollowsFocus ( ) [inline, private]

Definition at line 205 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && chkListViewBaseSingleSelectionFollowsFocus != null)
            {
                chkListViewBaseSingleSelectionFollowsFocus.IsChecked = _listViewBase.SingleSelectionFollowsFocus;
            }
        }

void UpdateListViewBaseTabNavigation ( ) [inline, private]

Definition at line 213 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && cmbListViewBaseTabNavigation != null)
            {
                cmbListViewBaseTabNavigation.SelectedIndex = (int)_listViewBase.TabNavigation;
            }
        }

void UpdateModernPanelUIVisibility ( Visibility visibility ) [inline, private]

Definition at line 303 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase == gridView)
            {
                tblItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
                nbItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
            }
        }

void UpdateScrollViewerExtentHeight ( ) [inline, private]

Definition at line 464 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerExtentHeight != null)
                {
                    txtScrollViewerExtentHeight.Text = _scrollViewer.ExtentHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerExtentWidth ( ) [inline, private]

Definition at line 448 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerExtentWidth != null)
                {
                    txtScrollViewerExtentWidth.Text = _scrollViewer.ExtentWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerHorizontalOffset ( ) [inline, private]

Definition at line 480 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerHorizontalOffset != null)
                {
                    txtScrollViewerHorizontalOffset.Text = _scrollViewer.HorizontalOffset.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerHorizontalSnapPointsType ( ) [inline, private]

Definition at line 512 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsType != null)
                {
                    cmbScrollViewerHorizontalSnapPointsType.SelectedIndex = (int)_scrollViewer.HorizontalSnapPointsType;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerProperties ( ) [inline, private]

Definition at line 400 of file ListViewBasePage.xaml.cs.

        {
            if (_listViewBase != null && _scrollViewer != null && _listViewBase.ItemsPanelRoot is VirtualizingStackPanel)
            {
                // Workaround to avoid the ListViewBase not being scrollable after an ItemsPanel change to VirtualizingStackPanel.
                // Resizing the ScrollViewer temporarily fixes its manipulability.
                _scrollViewer.Width = _scrollViewer.ActualWidth + 1;

                _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, RestoreScrollViewerWidth);
            }

            UpdateScrollViewerSizeProperties();
            UpdateScrollViewerHorizontalSnapPointsType();
            UpdateScrollViewerVerticalSnapPointsType();
        }

void UpdateScrollViewerScrollOrientation ( ) [inline, private]

Definition at line 312 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_listViewBase != null)
                {
                    Orientation scrollOrientation = Orientation.Horizontal;

                    ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;

                    if (itemsWrapGrid != null)
                    {
                        if (itemsWrapGrid.Orientation == Orientation.Horizontal)
                        {
                            scrollOrientation = Orientation.Vertical;
                        }
                    }
                    else
                    {
                        ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;

                        if (itemsStackPanel != null)
                        {
                            if (itemsStackPanel.Orientation == Orientation.Vertical)
                            {
                                scrollOrientation = Orientation.Vertical;
                            }
                        }
                        else
                        {
                            VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;

                            if (virtualizingStackPanel != null)
                            {
                                if (virtualizingStackPanel.Orientation == Orientation.Vertical)
                                {
                                    scrollOrientation = Orientation.Vertical;
                                }
                            }
                            else
                            {
                                StackPanel stackPanel = _listViewBase.ItemsPanelRoot as StackPanel;

                                if (stackPanel != null && stackPanel.Orientation == Orientation.Vertical)
                                {
                                    scrollOrientation = Orientation.Vertical;
                                }
                            }
                        }
                    }

                    if (scrollOrientation == Orientation.Vertical)
                    {
                        ScrollViewer.SetHorizontalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Disabled);
                        ScrollViewer.SetVerticalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Auto);
                        ScrollViewer.SetHorizontalScrollMode(_listViewBase, ScrollMode.Disabled);
                        ScrollViewer.SetVerticalScrollMode(_listViewBase, ScrollMode.Enabled);
                        ScrollViewer.SetIsHorizontalRailEnabled(_listViewBase, false);
                        ScrollViewer.SetIsVerticalRailEnabled(_listViewBase, true);
                    }
                    else
                    {
                        ScrollViewer.SetHorizontalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Auto);
                        ScrollViewer.SetVerticalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Disabled);
                        ScrollViewer.SetHorizontalScrollMode(_listViewBase, ScrollMode.Enabled);
                        ScrollViewer.SetVerticalScrollMode(_listViewBase, ScrollMode.Disabled);
                        ScrollViewer.SetIsHorizontalRailEnabled(_listViewBase, true);
                        ScrollViewer.SetIsVerticalRailEnabled(_listViewBase, false);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerSizeProperties ( ) [inline, private]

Definition at line 390 of file ListViewBasePage.xaml.cs.

        {
            UpdateScrollViewerViewportWidth();
            UpdateScrollViewerViewportHeight();
            UpdateScrollViewerExtentWidth();
            UpdateScrollViewerExtentHeight();
            UpdateScrollViewerHorizontalOffset();
            UpdateScrollViewerVerticalOffset();
        }

void UpdateScrollViewerVerticalOffset ( ) [inline, private]

Definition at line 496 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerVerticalOffset != null)
                {
                    txtScrollViewerVerticalOffset.Text = _scrollViewer.VerticalOffset.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerVerticalSnapPointsType ( ) [inline, private]

Definition at line 528 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsType != null)
                {
                    cmbScrollViewerVerticalSnapPointsType.SelectedIndex = (int)_scrollViewer.VerticalSnapPointsType;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerViewportHeight ( ) [inline, private]

Definition at line 432 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerViewportHeight != null)
                {
                    txtScrollViewerViewportHeight.Text = _scrollViewer.ViewportHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewerViewportWidth ( ) [inline, private]

Definition at line 416 of file ListViewBasePage.xaml.cs.

        {
            try
            {
                if (_scrollViewer != null && txtScrollViewerViewportWidth != null)
                {
                    txtScrollViewerViewportWidth.Text = _scrollViewer.ViewportWidth.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

Member Data Documentation

EntityObservableCollection _colEntities = null [private]

Definition at line 62 of file ListViewBasePage.xaml.cs.

ListViewBase _listViewBase = null [private]

Definition at line 63 of file ListViewBasePage.xaml.cs.

List<QueuedOperation> _lstQueuedOperations = new List<QueuedOperation>() [private]

Definition at line 66 of file ListViewBasePage.xaml.cs.

ItemsPanelTemplate _modernPanelTemplate = null [private]

Definition at line 65 of file ListViewBasePage.xaml.cs.

DispatcherTimer _queuedOperationsTimer = new DispatcherTimer() [private]

Definition at line 67 of file ListViewBasePage.xaml.cs.

ScrollViewer _scrollViewer = null [private]

Definition at line 64 of file ListViewBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ListViewBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewBasePage::QueuedOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewBasePage
  • ListViewBasePage::QueuedOperation
Public Member Functions | Properties

ListViewBasePage::QueuedOperation Class Reference

List of all members.

Public Member Functions

QueuedOperation (QueuedOperationType type)
QueuedOperation (QueuedOperationType type, string value)
QueuedOperation (QueuedOperationType type, int value)
QueuedOperation (QueuedOperationType type, double value)

Properties

double | DoubleValue [get, set]
int | IntValue [get, set]
string | StringValue [get, set]
QueuedOperationType | Type [get, set]

Detailed Description

Definition at line 31 of file ListViewBasePage.xaml.cs.

Constructor & Destructor Documentation

QueuedOperation ( QueuedOperationType type ) [inline]

Definition at line 33 of file ListViewBasePage.xaml.cs.

            {
                this.Type = type;
            }

QueuedOperation | ( | QueuedOperationType | type,
 |  | double | value |
 | ) |  |  | [inline]

Definition at line 38 of file ListViewBasePage.xaml.cs.

            {
                this.Type = type;
                this.DoubleValue = value;
            }

QueuedOperation | ( | QueuedOperationType | type,
 |  | int | value |
 | ) |  |  | [inline]

Definition at line 44 of file ListViewBasePage.xaml.cs.

            {
                this.Type = type;
                this.IntValue = value;
            }

QueuedOperation | ( | QueuedOperationType | type,
 |  | string | value |
 | ) |  |  | [inline]

Definition at line 50 of file ListViewBasePage.xaml.cs.

            {
                this.Type = type;
                this.StringValue = value;
            }

Property Documentation

double DoubleValue [get, set]

Definition at line 57 of file ListViewBasePage.xaml.cs.

int IntValue [get, set]

Definition at line 58 of file ListViewBasePage.xaml.cs.

string StringValue [get, set]

Definition at line 59 of file ListViewBasePage.xaml.cs.

QueuedOperationType Type [get, set]

Definition at line 56 of file ListViewBasePage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ListViewBasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewElementNameBindingPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewElementNameBindingPage
Public Member Functions | Public Attributes | Private Member Functions

ListViewElementNameBindingPage Class Reference

List of all members.

Public Member Functions

ListViewElementNameBindingPage ()

Public Attributes

List
< MUXControlsTestApp.Samples.MyData > 		Numbers = new List<MUXControlsTestApp.Samples.MyData>()

Private Member Functions

void | ChkSample_CheckedChanged (object sender, RoutedEventArgs e)
void | ListView_ItemClick (object sender, ItemClickEventArgs e)

Detailed Description

Definition at line 12 of file ListViewElementNameBindingPage.xaml.cs.

Constructor & Destructor Documentation

ListViewElementNameBindingPage ( ) [inline]

Definition at line 16 of file ListViewElementNameBindingPage.xaml.cs.

        {
            for (int i = 0; i < 3; i++)
            {
                Numbers.Add(new MUXControlsTestApp.Samples.MyData(i));
            }

            this.InitializeComponent();
        }

Member Function Documentation

void ChkSample_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file ListViewElementNameBindingPage.xaml.cs.

        {
            if (sender == chkSample0)
            {
                listView0.Visibility = (bool)chkSample0.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample1)
            {
                listView1.Visibility = (bool)chkSample1.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample2)
            {
                listView2.Visibility = (bool)chkSample2.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample3)
            {
                listView3.Visibility = (bool)chkSample3.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample4)
            {
                listView4.Visibility = (bool)chkSample4.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
        }

void ListView_ItemClick | ( | object | sender,
 |  | ItemClickEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file ListViewElementNameBindingPage.xaml.cs.

        {
            Popup popup = ((sender as ItemsControl).ItemsPanelRoot.Children[(((MUXControlsTestApp.Samples.MyData)e.ClickedItem).number)] as ListViewItem).ContentTemplateRoot as Popup;

            if (popup != null)
            {
                popup.IsOpen = true;
            }
        }

Member Data Documentation

List<MUXControlsTestApp.Samples.MyData> Numbers = new List<MUXControlsTestApp.Samples.MyData>()

Definition at line 14 of file ListViewElementNameBindingPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ListViewElementNameBindingPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewHeaderPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewHeaderPage
Public Member Functions | Private Member Functions | Private Attributes

ListViewHeaderPage Class Reference

List of all members.

Public Member Functions

ListViewHeaderPage ()

Private Member Functions

void | PopulateData ()

Private Attributes

ObservableCollection< Ingredient > | Ingredients = new ObservableCollection<Ingredient>()

Detailed Description

Definition at line 9 of file ListViewHeaderPage.xaml.cs.

Constructor & Destructor Documentation

ListViewHeaderPage ( ) [inline]

Definition at line 13 of file ListViewHeaderPage.xaml.cs.

        {
            this.InitializeComponent();
            PopulateData();
        }

Member Function Documentation

void PopulateData ( ) [inline, private]

Definition at line 19 of file ListViewHeaderPage.xaml.cs.

        {
            this.Ingredients.Add(new Ingredient("Banana", "10 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "27 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "12 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "54 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "2 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "5 lbs", "Assets/ingredient4.png"));
            this.Ingredients.Add(new Ingredient("Banana", "9 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "21 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "10 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "57 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "1 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "4 lbs", "Assets/ingredient4.png"));

            this.IngredientList1.ItemsSource = this.Ingredients;
            this.IngredientList2.ItemsSource = this.Ingredients;
            this.IngredientList3.ItemsSource = this.Ingredients;
        }

Member Data Documentation

ObservableCollection<Ingredient> Ingredients = new ObservableCollection<Ingredient>() [private]

Definition at line 11 of file ListViewHeaderPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/ListViewHeaderPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewItemPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewItemPage
Public Member Functions | Private Member Functions | Private Attributes

ListViewItemPage Class Reference

List of all members.

Public Member Functions

ListViewItemPage ()

Private Member Functions

void | PopulateData ()

Private Attributes

ObservableCollection< Ingredient > | Ingredients = new ObservableCollection<Ingredient>()

Detailed Description

Definition at line 9 of file ListViewItemPage.xaml.cs.

Constructor & Destructor Documentation

ListViewItemPage ( ) [inline]

Definition at line 13 of file ListViewItemPage.xaml.cs.

        {
            this.InitializeComponent();
            PopulateData();
        }

Member Function Documentation

void PopulateData ( ) [inline, private]

Definition at line 19 of file ListViewItemPage.xaml.cs.

        {
            this.Ingredients.Add(new Ingredient("Banana", "10 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "27 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "12 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "54 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "2 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "5 lbs", "Assets/ingredient4.png"));
            this.Ingredients.Add(new Ingredient("Banana", "9 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "21 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "10 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "57 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "1 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "4 lbs", "Assets/ingredient4.png"));
            this.Ingredients.Add(new Ingredient("Banana", "7 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "5 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "4 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "76 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "3 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "3 lbs", "Assets/ingredient4.png"));

            this.IngredientList.ItemsSource = this.Ingredients;
        }

Member Data Documentation

ObservableCollection<Ingredient> Ingredients = new ObservableCollection<Ingredient>() [private]

Definition at line 11 of file ListViewItemPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/ListViewItemPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ListViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ListViewPage
Public Member Functions

ListViewPage Class Reference

List of all members.

Public Member Functions

ListViewPage ()

Detailed Description

Definition at line 9 of file ListViewPage.xaml.cs.

Constructor & Destructor Documentation

ListViewPage ( ) [inline]

Definition at line 11 of file ListViewPage.xaml.cs.

        {
            this.InitializeComponent();

            navigateToListView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewBasePage), false /*use GridView*/); };
            navigateToGroupedListView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(GroupedListViewBasePage), false /*use GridView*/); };
            navigateToNestedListViews.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NestedListViewsPage)); };
            navigateToListViewAnchoring.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewAnchoringPage)); };
            navigateToListViewElementNameBinding.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewElementNameBindingPage)); };
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ListViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MapControlPage
Public Member Functions | Private Member Functions

MapControlPage Class Reference

List of all members.

Public Member Functions

MapControlPage ()

Private Member Functions

void | AddLayer_Click (object sender, RoutedEventArgs e)
void | AddPin_Click (object sender, RoutedEventArgs e)
void | CenterButton_Click (object sender, RoutedEventArgs e)
void | GoButton_Click (object sender, RoutedEventArgs e)
void | Layer_MapElementClick (MapElementsLayer sender, MapElementClickEventArgs args)
void | Map_MapElementClick (MapControl sender, MapElementClickEventArgs args)
void | Map_MapServiceErrorOccurred (MapControl sender, MapControlMapServiceErrorOccurredEventArgs args)
void | SetZoom_Click (object sender, RoutedEventArgs e)
void | ToggleSwitch_Toggled (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 18 of file MapControlPage.xaml.cs.

Constructor & Destructor Documentation

MapControlPage ( ) [inline]

Definition at line 20 of file MapControlPage.xaml.cs.

        {
            this.InitializeComponent();

            myMap.MapServiceToken = MapControlApiKey.AzureMapsToken;

            BasicGeoposition firstCenterPosition = new BasicGeoposition() { Latitude = 0, Longitude = 0 };
            Geopoint firstCenterPoint = new Geopoint(firstCenterPosition);
            myMap.Center = firstCenterPoint;

            myMap.MapElementClick += Map_MapElementClick;
            myMap.MapServiceErrorOccurred += Map_MapServiceErrorOccurred;
        }

Member Function Documentation

void AddLayer_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 83 of file MapControlPage.xaml.cs.

        {
            var newLayer = new MapElementsLayer{};

            newLayer.MapElementClick += Layer_MapElementClick;
            myMap.Layers.Add(newLayer);
            layersSelection.Items.Add(newLayer);
            if(layersSelection.SelectedIndex == -1)
            {
                layersSelection.SelectedIndex = 0;
            }
        }

void AddPin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 66 of file MapControlPage.xaml.cs.

        {
            BasicGeoposition position = new BasicGeoposition()
            {
                Latitude = double.Parse(latitudePinText.Text),
                Longitude = double.Parse(longitudePinText.Text)
            };
            Geopoint point = new Geopoint(position);

            var icon = new MapIcon
            {
                Location = point,
            };

            var selectedLayer = layersSelection.SelectedItem as MapElementsLayer;
            selectedLayer.MapElements.Add(icon);
        }

void CenterButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 52 of file MapControlPage.xaml.cs.

        {
            BasicGeoposition centerPosition = new BasicGeoposition()
            {
                Latitude = double.Parse(latitudeText.Text),
                Longitude = double.Parse(longitudeText.Text)
            };
            Geopoint centerPoint = new Geopoint(centerPosition);
            myMap.Center = centerPoint;
        }

void GoButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file MapControlPage.xaml.cs.

        {
            myMap.MapServiceToken = MapServiceToken.Password;
        }

void Layer_MapElementClick | ( | MapElementsLayer | sender,
 |  | MapElementClickEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 96 of file MapControlPage.xaml.cs.

        {
            var icon = args.Element as MapIcon;
            sender.MapElements.Remove(icon);
            output.Text += "Layer Clicked\n";
        }

void Map_MapElementClick | ( | MapControl | sender,
 |  | MapElementClickEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 102 of file MapControlPage.xaml.cs.

        {
            output.Text += "Map Clicked\n";
        }

void Map_MapServiceErrorOccurred | ( | MapControl | sender,
 |  | MapControlMapServiceErrorOccurredEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 39 of file MapControlPage.xaml.cs.

        {
            output.Text += args.DiagnosticMessage;
        }

void SetZoom_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 62 of file MapControlPage.xaml.cs.

        {
            myMap.ZoomLevel = double.Parse(zoomText.Text);
        }

void ToggleSwitch_Toggled | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file MapControlPage.xaml.cs.

        {
            ToggleSwitch toggleSwitch = sender as ToggleSwitch;
            if (toggleSwitch != null)
            {
                myMap.InteractiveControlsVisible = toggleSwitch.IsOn;
            }
        }

The documentation for this class was generated from the following file:
  • MapControl/TestUI/MapControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MediaTransportControlsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MediaTransportControlsPage
Public Member Functions

MediaTransportControlsPage Class Reference

List of all members.

Public Member Functions

MediaTransportControlsPage ()

Detailed Description

Definition at line 16 of file MediaTransportControlsPage.xaml.cs.

Constructor & Destructor Documentation

MediaTransportControlsPage ( ) [inline]

Definition at line 18 of file MediaTransportControlsPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/MediaTransportControlsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MenuBarPage
Public Member Functions | Private Member Functions

MenuBarPage Class Reference

List of all members.

Public Member Functions

MenuBarPage ()

Private Member Functions

void | AddFlyoutItem_Click (object sender, RoutedEventArgs e)
void | AddMenuBarItem_Click (object sender, RoutedEventArgs e)
void | AddMenuBarToEmptyMenuBarItem_Click (object sender, RoutedEventArgs e)
void | CutCommand_ExecuteRequested (XamlUICommand sender, ExecuteRequestedEventArgs args)
void | NewItem_Click (object sender, RoutedEventArgs e)
void | RemoveFlyoutItem_Click (object sender, RoutedEventArgs e)
void | RemoveItemsFromOneChildrenItem_Click (object sender, RoutedEventArgs e)
void | RemoveMenuBarItem_Click (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Checked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | UndoItem_Click (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 14 of file MenuBarPage.xaml.cs.

Constructor & Destructor Documentation

MenuBarPage ( ) [inline]

Definition at line 16 of file MenuBarPage.xaml.cs.

        {
            this.InitializeComponent();

            FileItem.AccessKey = "A";
            NewItem.AccessKey = "B";

            var cutCommand = new StandardUICommand(StandardUICommandKind.Cut);
            cutCommand.ExecuteRequested += CutCommand_ExecuteRequested;
            CutItem.Command = cutCommand;

            var accelerator = new KeyboardAccelerator();
            accelerator.Modifiers = Windows.System.VirtualKeyModifiers.Control;
            accelerator.Key = Windows.System.VirtualKey.Z;
            UndoItem.KeyboardAccelerators.Add(accelerator);

            UndoItem.Click += UndoItem_Click;
        }

Member Function Documentation

void AddFlyoutItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 58 of file MenuBarPage.xaml.cs.

        {
            var item = new MenuFlyoutItem();
            item.Text = "New Flyout Item";
            FileItem.Items.Add(item);
        }

void AddMenuBarItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file MenuBarPage.xaml.cs.

        {
            var item = new MenuBarItem();
            item.Title = "New Menu Bar Item";
            menuBar.Items.Add(item);
        }

void AddMenuBarToEmptyMenuBarItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 86 of file MenuBarPage.xaml.cs.

        {
            int eCount = EmptyMenuBar.Items.Count;
            MenuBarItem mainMenuBarHelp = new MenuBarItem();
            mainMenuBarHelp.Title = "Help" + eCount;
            mainMenuBarHelp.SetValue(AutomationProperties.NameProperty, "Help" + eCount);
            MenuFlyoutItem newFlyout = new MenuFlyoutItem() { Text = "Add" + eCount };
            // UIA Name for interaction test
            newFlyout.SetValue(AutomationProperties.NameProperty, "Add" + eCount);
            mainMenuBarHelp.Items.Add(newFlyout);

            mainMenuBarHelp.Items.Add(new MenuFlyoutItem() { Text = "Remove" + eCount });
            EmptyMenuBar.Items.Add(mainMenuBarHelp);
        }

void CutCommand_ExecuteRequested | ( | XamlUICommand | sender,
 |  | ExecuteRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 40 of file MenuBarPage.xaml.cs.

        {
            TextOutput.Text = "Cut Clicked";
        }

void NewItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 71 of file MenuBarPage.xaml.cs.

        {
            TextOutput.Text = "New Clicked";
        }

void RemoveFlyoutItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 65 of file MenuBarPage.xaml.cs.

        {
            var size = FileItem.Items.Count;
            FileItem.Items.RemoveAt(size - 1);
        }

void RemoveItemsFromOneChildrenItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file MenuBarPage.xaml.cs.

        {
            OneChildrenFlyoutMenuBarItem.Items.Clear();
        }

void RemoveMenuBarItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 52 of file MenuBarPage.xaml.cs.

        {
            var size = menuBar.Items.Count;
            menuBar.Items.RemoveAt(size - 1);
        }

void TestFrameCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 76 of file MenuBarPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Visible);
        }

void TestFrameCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file MenuBarPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Collapsed);
        }

void UndoItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 35 of file MenuBarPage.xaml.cs.

        {
            TextOutput.Text = "Undo Clicked";
        }

The documentation for this class was generated from the following file:
  • MenuBar/MenuBar_TestUI/MenuBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuFlyoutPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MenuFlyoutPage
Public Member Functions | Private Member Functions | Private Attributes

MenuFlyoutPage Class Reference

List of all members.

Public Member Functions

MenuFlyoutPage ()

Private Member Functions

void | Grid_ContextRequested (UIElement sender, ContextRequestedEventArgs args)
void | OnMenuFlyoutChangingItemsClosed (object sender, object e)
void | OnMenuFlyoutChangingItemsOpened (object sender, object e)
void | OnMenuFlyoutChangingSubItemsClosed (object sender, object e)
void | OnMenuFlyoutChangingSubItemsOpened (object sender, object e)
void | TestMenuFlyoutItemClick (object sender, object e)

Private Attributes

DispatcherQueueTimer | itemChangeTimer
List< MenuFlyoutItemBase > | itemsToToggle
MenuFlyout | sharedFlyout
DispatcherQueueTimer | subItemChangeTimer
List< MenuFlyoutItemBase > | subItemsToToggle

Detailed Description

Definition at line 15 of file MenuFlyoutPage.xaml.cs.

Constructor & Destructor Documentation

MenuFlyoutPage ( ) [inline]

Definition at line 18 of file MenuFlyoutPage.xaml.cs.

        {
            this.InitializeComponent();

            sharedFlyout = (MenuFlyout)Resources["SampleContextMenu"];
        }

Member Function Documentation

void Grid_ContextRequested | ( | UIElement | sender,
 |  | ContextRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 31 of file MenuFlyoutPage.xaml.cs.

        {
            var requestedElement = sender as FrameworkElement;

            if (args.TryGetPosition(requestedElement, out Point point))
            {
                sharedFlyout.ShowAt(requestedElement, point);
            }
            else
            {
                sharedFlyout.ShowAt(requestedElement);
            }
        }

void OnMenuFlyoutChangingItemsClosed | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 79 of file MenuFlyoutPage.xaml.cs.

        {
            if (itemChangeTimer != null)
            {
                itemChangeTimer.Stop();
            }
        }

void OnMenuFlyoutChangingItemsOpened | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file MenuFlyoutPage.xaml.cs.

        {
            IList<MenuFlyoutItemBase> items = MenuFlyoutChangingItems.Items;

            if (itemChangeTimer == null)
            {
                itemsToToggle = new List<MenuFlyoutItemBase> {
                    items[4],
                    items[5],
                    items[6],
                    items[7]
                };

                itemChangeTimer = DispatcherQueue.GetForCurrentThread().CreateTimer();
                itemChangeTimer.Interval = System.TimeSpan.FromSeconds(1);
                itemChangeTimer.Tick += (timer, args) =>
                {
                    if (items.Count == 8)
                    {
                        itemsToToggle.ForEach(item => items.Remove(item));
                    }
                    else
                    {
                        itemsToToggle.ForEach(item => items.Add(item));
                    }
                };
            }

            itemChangeTimer.Start();
        }

void OnMenuFlyoutChangingSubItemsClosed | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 121 of file MenuFlyoutPage.xaml.cs.

        {
            if (itemChangeTimer != null)
            {
                itemChangeTimer.Stop();
            }
        }

void OnMenuFlyoutChangingSubItemsOpened | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 90 of file MenuFlyoutPage.xaml.cs.

        {
            IList<MenuFlyoutItemBase> subItems = ((MenuFlyoutSubItem)MenuFlyoutChangingSubItems.Items[0]).Items;

            if (subItemChangeTimer == null)
            {
                subItemsToToggle = new List<MenuFlyoutItemBase> {
                    subItems[4],
                    subItems[5],
                    subItems[6],
                    subItems[7]
                };

                subItemChangeTimer = DispatcherQueue.GetForCurrentThread().CreateTimer();
                subItemChangeTimer.Interval = System.TimeSpan.FromSeconds(1);
                subItemChangeTimer.Tick += (timer, args) =>
                {
                    if (subItems.Count == 8)
                    {
                        subItemsToToggle.ForEach(item => subItems.Remove(item));
                    }
                    else
                    {
                        subItemsToToggle.ForEach(item => subItems.Add(item));
                    }
                };
            }

            subItemChangeTimer.Start();
        }

void TestMenuFlyoutItemClick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 25 of file MenuFlyoutPage.xaml.cs.

        {
            TestMenuFlyoutItemHeightTextBlock.Text = $"{TestMenuFlyoutItem.ActualHeight}";
            TestMenuFlyoutItemWidthTextBlock.Text = $"{TestMenuFlyoutItem.ActualWidth}";
        }

Member Data Documentation

DispatcherQueueTimer itemChangeTimer [private]

Definition at line 45 of file MenuFlyoutPage.xaml.cs.

List<MenuFlyoutItemBase> itemsToToggle [private]

Definition at line 46 of file MenuFlyoutPage.xaml.cs.

MenuFlyout sharedFlyout [private]

Definition at line 17 of file MenuFlyoutPage.xaml.cs.

DispatcherQueueTimer subItemChangeTimer [private]

Definition at line 87 of file MenuFlyoutPage.xaml.cs.

List<MenuFlyoutItemBase> subItemsToToggle [private]

Definition at line 88 of file MenuFlyoutPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/MenuFlyoutPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockAnimatedIconSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MockAnimatedIconSource
Public Member Functions | Public Attributes | Private Attributes

MockAnimatedIconSource Class Reference

List of all members.

Public Member Functions

MockAnimatedIconSource ()
void | SetColorProperty (string propertyName, Color value)
IAnimatedVisual | TryCreateAnimatedVisual (Compositor compositor)

Public Attributes

IReadOnlyDictionary< string,
double > 		Markers = > markers

Private Attributes

Dictionary< string, double > | markers = new Dictionary<string, double>()
IRichAnimatedVisualSource | visual = new Controls_09_Hamburger()

Detailed Description

Definition at line 10 of file MockAnimatedIconSource.cs.

Constructor & Destructor Documentation

MockAnimatedIconSource ( ) [inline]

Definition at line 15 of file MockAnimatedIconSource.cs.

        {
            markers.Add("aTob_Start", 0.0);
            markers.Add("aTob_End", 0.316666663);
            markers.Add("NormalToPressedStart", 0.0);
            markers.Add("NormalToPressedEnd", 0.816666663);
            markers.Add("PointerOverToNormalStart", 0.316666663);
            markers.Add("PointerOverToNormalEnd", 0.0);
            markers.Add("PointerOverToPressedStart", 0.333333343);
            markers.Add("PointerOverToPressedEnd", 0.816666663);
            markers.Add("PressedToNormalStart", 0.833333313);
            markers.Add("PressedToNormalEnd", 0.983333349);
            markers.Add("PressedToPointerOverStart", 0.816666663);
            markers.Add("PressedToPointerOverEnd", 0.333333343);
            markers.Add("Disabled", 0.5);
        }

Member Function Documentation

void SetColorProperty | ( | string | propertyName,
 |  | Color | value |
 | ) |  |  | [inline]

Definition at line 36 of file MockAnimatedIconSource.cs.

        {
            visual.SetColorProperty(propertyName, value);
        }

IAnimatedVisual TryCreateAnimatedVisual ( Compositor compositor ) [inline]

Definition at line 31 of file MockAnimatedIconSource.cs.

        {
            return visual.TryCreateAnimatedVisual(Window.Current.Compositor);
        }

Member Data Documentation

Dictionary<string, double> markers = new Dictionary<string, double>() [private]

Definition at line 12 of file MockAnimatedIconSource.cs.

IReadOnlyDictionary<string, double> Markers = > markers

Definition at line 41 of file MockAnimatedIconSource.cs.

IRichAnimatedVisualSource visual = new Controls_09_Hamburger() [private]

Definition at line 14 of file MockAnimatedIconSource.cs.

The documentation for this class was generated from the following file:
  • AnimatedIcon/APITests/MockAnimatedIconSource.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MockIAnimatedIconSource2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MockIAnimatedIconSource2
Public Member Functions | Public Attributes | Private Attributes

MockIAnimatedIconSource2 Class Reference

List of all members.

Public Member Functions

MockIAnimatedIconSource2 ()
void | SetColorProperty (string propertyName, Color value)
IAnimatedVisual | TryCreateAnimatedVisual (Compositor compositor, out object diagnostics)

Public Attributes

IReadOnlyDictionary< string,
double > 		Markers = > markers

Private Attributes

Dictionary< string, double > | markers = new Dictionary<string, double>()
IAnimatedVisualSource2 | visual = new Controls_02_Hamburger()

Detailed Description

Definition at line 11 of file MockIRichAnimatedIconSource.cs.

Constructor & Destructor Documentation

MockIAnimatedIconSource2 ( ) [inline]

Definition at line 16 of file MockIRichAnimatedIconSource.cs.

        {
            markers.Add("aTob_Start", 0.12345);
            markers.Add("aTob_End", 0.12345);
            markers.Add("bToc_Start", 0.12345);
            markers.Add("cTod_End", 0.12345);
            markers.Add("dToe", 0.12345);
            markers.Add("f", 0.12345);
        }

Member Function Documentation

void SetColorProperty | ( | string | propertyName,
 |  | Color | value |
 | ) |  |  | [inline]

Definition at line 30 of file MockIRichAnimatedIconSource.cs.

        {
            visual.SetColorProperty(propertyName, value);
        }

IAnimatedVisual TryCreateAnimatedVisual | ( | Compositor | compositor,
 |  | out object | diagnostics |
 | ) |  |  | [inline]

Definition at line 25 of file MockIRichAnimatedIconSource.cs.

        {
            return visual.TryCreateAnimatedVisual(Microsoft.UI.Xaml.Media.CompositionTarget.GetCompositorForCurrentThread(), out diagnostics);
        }

Member Data Documentation

Dictionary<string, double> markers = new Dictionary<string, double>() [private]

Definition at line 13 of file MockIRichAnimatedIconSource.cs.

IReadOnlyDictionary<string, double> Markers = > markers

Definition at line 35 of file MockIRichAnimatedIconSource.cs.

IAnimatedVisualSource2 visual = new Controls_02_Hamburger() [private]

Definition at line 15 of file MockIRichAnimatedIconSource.cs.

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/MockIRichAnimatedIconSource.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenterPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MonochromaticOverlayPresenterPage
Public Member Functions

MonochromaticOverlayPresenterPage Class Reference

List of all members.

Public Member Functions

MonochromaticOverlayPresenterPage ()

Detailed Description

Definition at line 18 of file MonochromaticOverlayPresenterPage.xaml.cs.

Constructor & Destructor Documentation

MonochromaticOverlayPresenterPage ( ) [inline]

Definition at line 20 of file MonochromaticOverlayPresenterPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • MonochromaticOverlayPresenter/TestUI/MonochromaticOverlayPresenterPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MultipleTabViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MultipleTabViewPage
Public Member Functions | Static Public Member Functions | Properties | Private Member Functions | Private Attributes

MultipleTabViewPage Class Reference

List of all members.

Public Member Functions

MultipleTabViewPage ()

Static Public Member Functions

static string | RemoveWhitespace (string s)

Properties

ObservableCollection< TabDataItem > | CompactTabViewItems = new() [get]
ObservableCollection< TabDataItem > | FirstTabViewItems [get]
ObservableCollection< TabDataItem > | SecondTabViewItems = new() [get]
ObservableCollection< TabDataItem > | SizeToContentTabViewItems = new() [get]

Private Member Functions

void | AddNewTab (ObservableCollection< TabDataItem > itemCollection, int position=-1, TabDataItem item=null)
void | TabView_AddButtonClick (TabView sender, object args)
void | TabView_DragEnter (object sender, DragEventArgs args)
void | TabView_Drop (object sender, DragEventArgs args)
void | TabView_TabCloseRequested (TabView sender, TabViewTabCloseRequestedEventArgs args)
void | TabView_TabDragStarting (TabView sender, TabViewTabDragStartingEventArgs args)
void | TabViewItem_Loaded (object sender, RoutedEventArgs e)

Private Attributes

readonly Dictionary
< TabDataItem, TabViewItem > 		dataItemToTabItemDictionary = new()
const string | originatingTabViewIdentifier = "OriginatingTabView"
SymbolIconSource | symbolIconSource = new SymbolIconSource() { Symbol = Symbol.Placeholder }
int | tabCount = new() 0
const string | tabDataItemIdentifier = "TabDataItem"

Detailed Description

Definition at line 12 of file MultipleTabViewPage.xaml.cs.

Constructor & Destructor Documentation

MultipleTabViewPage ( ) [inline]

Definition at line 26 of file MultipleTabViewPage.xaml.cs.

        {
            this.InitializeComponent();

            AddNewTab(FirstTabViewItems);
            AddNewTab(FirstTabViewItems);
            AddNewTab(FirstTabViewItems);
            AddNewTab(FirstTabViewItems);
            AddNewTab(SecondTabViewItems);
            AddNewTab(CompactTabViewItems);
            AddNewTab(SizeToContentTabViewItems);
        }

Member Function Documentation

void AddNewTab | ( | ObservableCollection< TabDataItem > | itemCollection,
 |  | int | position = -1,
 |  | TabDataItem | item = null |
 | ) |  |  | [inline, private]

Definition at line 44 of file MultipleTabViewPage.xaml.cs.

        {
            if (item == null)
            {
                item = new TabDataItem {
                    IconSource = symbolIconSource,
                    Header = $"Item {tabCount}",
                    Content = $"This is tab {tabCount}."
                };

                tabCount++;
            }

            if (position < 0)
            {
                itemCollection.Add(item);
            }
            else
            {
                itemCollection.Insert(position, item);
            }
        }

static string RemoveWhitespace ( string s ) [inline, static]

Definition at line 39 of file MultipleTabViewPage.xaml.cs.

        {
            return s.Replace(" ", "");
        }

void TabView_AddButtonClick | ( | TabView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 67 of file MultipleTabViewPage.xaml.cs.

        {
            AddNewTab((ObservableCollection<TabDataItem>)sender.TabItemsSource);
        }

void TabView_DragEnter | ( | object | sender,
 |  | DragEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 84 of file MultipleTabViewPage.xaml.cs.

        {
            TabView target = (TabView)sender;

            // If we don't have the properties we expect in the data view properties, or if this is the same tab view
            // as what originated the drag, then we don't want to do anything - this either isn't a package we want to handle,
            // or it's a drag within the same tab view, in which case the tab view will handle everything internally.
            if (!args.DataView.Properties.TryGetValue(tabDataItemIdentifier, out _) ||
                !args.DataView.Properties.TryGetValue(originatingTabViewIdentifier, out object originatingTabView) ||
                originatingTabView == target)
            {
                args.Handled = false;
                return;
            }

            args.AcceptedOperation = DataPackageOperation.Move;
        }

void TabView_Drop | ( | object | sender,
 |  | DragEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 102 of file MultipleTabViewPage.xaml.cs.

        {
            TabView target = (TabView)sender;

            if (!args.DataView.Properties.TryGetValue(tabDataItemIdentifier, out object value) ||
                !args.DataView.Properties.TryGetValue(originatingTabViewIdentifier, out object originatingTabViewObject) ||
                originatingTabViewObject == target)
            {
                args.Handled = false;
                return;
            }

            TabDataItem item = (TabDataItem)value;

            int index = -1;
            for (int i = 0; i < target.TabItems.Count; i++)
            {
                if (target.TabItems[i] is TabDataItem tabDataItem)
                {
                    var tabItem = dataItemToTabItemDictionary[tabDataItem];

                    // If the mouse cursor is within the bounds of this tab item,
                    // then this is the place where we're dropping the dragged item.
                    if (args.GetPosition(tabItem).X > 0 &&
                        args.GetPosition(tabItem).X < tabItem.ActualWidth)
                    {
                        index = i;
                        break;
                    }
                }
            }

            AddNewTab((ObservableCollection<TabDataItem>)target.TabItemsSource, index, item);

            // We've dragged a tab item to a new TabView, so we'll want to remove it
            // from its original TabView now.
            var originatingTabView = (TabView)originatingTabViewObject;
            var originatingItemsSource = (ObservableCollection<TabDataItem>)originatingTabView.TabItemsSource;

            int selectedIndex = originatingItemsSource.IndexOf(item);
            originatingItemsSource.Remove(item);
            originatingTabView.SelectedIndex = selectedIndex >= originatingItemsSource.Count ? originatingItemsSource.Count - 1 : selectedIndex;
        }

void TabView_TabCloseRequested | ( | TabView | sender,
 |  | TabViewTabCloseRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 72 of file MultipleTabViewPage.xaml.cs.

        {
            ((ObservableCollection<TabDataItem>)sender.TabItemsSource).Remove((TabDataItem)args.Item);
        }

void TabView_TabDragStarting | ( | TabView | sender,
 |  | TabViewTabDragStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 77 of file MultipleTabViewPage.xaml.cs.

        {
            args.Data.Properties.Add(tabDataItemIdentifier, args.Item);
            args.Data.Properties.Add(originatingTabViewIdentifier, sender);
            args.Data.RequestedOperation = DataPackageOperation.Move;
        }

void TabViewItem_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 146 of file MultipleTabViewPage.xaml.cs.

        {
            TabViewItem item = (TabViewItem)sender;
            TabDataItem tabDataItem = (TabDataItem)item.Tag;

            dataItemToTabItemDictionary[tabDataItem] = item;
        }

Member Data Documentation

readonly Dictionary<TabDataItem, TabViewItem> dataItemToTabItemDictionary = new() [private]

Definition at line 24 of file MultipleTabViewPage.xaml.cs.

const string originatingTabViewIdentifier = "OriginatingTabView" [private]

Definition at line 22 of file MultipleTabViewPage.xaml.cs.

SymbolIconSource symbolIconSource = new SymbolIconSource() { Symbol = Symbol.Placeholder } [private]

Definition at line 20 of file MultipleTabViewPage.xaml.cs.

int tabCount = new() 0 [private]

Definition at line 19 of file MultipleTabViewPage.xaml.cs.

const string tabDataItemIdentifier = "TabDataItem" [private]

Definition at line 21 of file MultipleTabViewPage.xaml.cs.

Property Documentation

ObservableCollection<TabDataItem> CompactTabViewItems = new() [get]

Definition at line 16 of file MultipleTabViewPage.xaml.cs.

ObservableCollection<TabDataItem> FirstTabViewItems [get]

Definition at line 14 of file MultipleTabViewPage.xaml.cs.

ObservableCollection<TabDataItem> SecondTabViewItems = new() [get]

Definition at line 15 of file MultipleTabViewPage.xaml.cs.

ObservableCollection<TabDataItem> SizeToContentTabViewItems = new() [get]

Definition at line 17 of file MultipleTabViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/MultipleTabViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyColorSpectrum Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MyColorSpectrum
Protected Member Functions

MyColorSpectrum Class Reference

Inherits ColorSpectrum.

List of all members.

Protected Member Functions

override void OnApplyTemplate ()

Detailed Description

Definition at line 392 of file ColorPickerPage.xaml.cs.

Member Function Documentation

override void OnApplyTemplate ( ) [inline, protected]

Reimplemented from ColorSpectrum.

Definition at line 394 of file ColorPickerPage.xaml.cs.

        {
            // add an override just to exercise the override chaining.
            base.OnApplyTemplate();
        }

The documentation for this class was generated from the following file:
  • ColorPicker/TestUI/ColorPickerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyCommand Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MyCommand
Public Member Functions | Events | Private Attributes

MyCommand Class Reference

List of all members.

Public Member Functions

MyCommand ()
MyCommand (SplitButtonPage parentPage)
bool | CanExecute (object o)
void | Execute (object o)
void | UpdateCanExecute (bool canExecute)

Events

EventHandler | CanExecuteChanged

Private Attributes

bool | _canExecute = true
SplitButtonPage _parentPage

Detailed Description

Definition at line 151 of file SplitButtonPage.xaml.cs.

Constructor & Destructor Documentation

MyCommand ( ) [inline]

Definition at line 158 of file SplitButtonPage.xaml.cs.

{ }

MyCommand ( SplitButtonPage parentPage ) [inline]

Definition at line 160 of file SplitButtonPage.xaml.cs.

        {
            _parentPage = parentPage;
        }

Member Function Documentation

bool CanExecute ( object o ) [inline]

Definition at line 175 of file SplitButtonPage.xaml.cs.

        {
            return _canExecute;
        }

void Execute ( object o ) [inline]

Definition at line 180 of file SplitButtonPage.xaml.cs.

        {
            _parentPage.CommandExecute();
        }

void UpdateCanExecute ( bool canExecute ) [inline]

Definition at line 165 of file SplitButtonPage.xaml.cs.

        {
            _canExecute = canExecute;
            if (CanExecuteChanged != null)
            {
                EventArgs args = new EventArgs();
                CanExecuteChanged(this, args);
            }
        }

Member Data Documentation

bool _canExecute = true [private]

Definition at line 156 of file SplitButtonPage.xaml.cs.

SplitButtonPage _parentPage [private]

Definition at line 155 of file SplitButtonPage.xaml.cs.

Event Documentation

EventHandler CanExecuteChanged

Definition at line 153 of file SplitButtonPage.xaml.cs.

The documentation for this class was generated from the following file:
  • SplitButton/TestUI/SplitButtonPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyData Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • MyData
Properties

MyData Class Reference

List of all members.

Properties

object | DataContent [get, set]
string | DataHeader [get, set]
Microsoft.UI.Xaml.Controls.IconSource | DataIconSource [get, set]

Detailed Description

Definition at line 11 of file TabViewTabItemsSourcePage.xaml.cs.

Property Documentation

object DataContent [get, set]

Definition at line 15 of file TabViewTabItemsSourcePage.xaml.cs.

string DataHeader [get, set]

Definition at line 13 of file TabViewTabItemsSourcePage.xaml.cs.

Microsoft.UI.Xaml.Controls.IconSource DataIconSource [get, set]

Definition at line 14 of file TabViewTabItemsSourcePage.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewTabItemsSourcePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewAnimationPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewAnimationPage
Public Member Functions | Private Member Functions

NavigationViewAnimationPage Class Reference

List of all members.

Public Member Functions

NavigationViewAnimationPage ()

Private Member Functions

void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | NavigateToPage (object pageTag)
void | NavView_OnItemInvoked (NavigationView sender, NavigationViewItemInvokedEventArgs args)

Detailed Description

Definition at line 10 of file NavigationViewAnimationPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewAnimationPage ( ) [inline]

Definition at line 12 of file NavigationViewAnimationPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file NavigationViewAnimationPage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void NavigateToPage ( object pageTag ) [inline, private]

Definition at line 21 of file NavigationViewAnimationPage.xaml.cs.

        {
            if (pageTag == null)
            {
                pageTag = "BlankPage1";
            }
            var pageName = "MUXControlsTestApp.NavigationView" + pageTag;
            var pageType = Type.GetType(pageName);

            ContentFrame.Navigate(pageType);
        }

void NavView_OnItemInvoked | ( | NavigationView | sender,
 |  | NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 16 of file NavigationViewAnimationPage.xaml.cs.

        {
            NavigateToPage(args.InvokedItemContainer.Tag);
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewAnimationPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewAxeTestPage
Public Member Functions

NavigationViewAxeTestPage Class Reference

List of all members.

Public Member Functions

NavigationViewAxeTestPage ()

Detailed Description

Definition at line 22 of file NavigationViewAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewAxeTestPage ( ) [inline]

Definition at line 24 of file NavigationViewAxeTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/NavigationViewAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewBlankPage1 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewBlankPage1
Public Member Functions

NavigationViewBlankPage1 Class Reference

List of all members.

Public Member Functions

NavigationViewBlankPage1 ()

Detailed Description

Definition at line 8 of file NavigationViewBlankPage1.xaml.cs.

Constructor & Destructor Documentation

NavigationViewBlankPage1 ( ) [inline]

Definition at line 10 of file NavigationViewBlankPage1.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewBlankPage1.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewCaseBundle Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewCaseBundle
Public Member Functions | Private Member Functions

NavigationViewCaseBundle Class Reference

List of all members.

Public Member Functions

NavigationViewCaseBundle ()

Private Member Functions

void CmbNavigationViewOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 15 of file NavigationViewCaseBundle.xaml.cs.

Constructor & Destructor Documentation

NavigationViewCaseBundle ( ) [inline]

Definition at line 17 of file NavigationViewCaseBundle.xaml.cs.

        {
            LogController.InitializeLogging();
            this.InitializeComponent();
            NavigationViewPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewPage), 0); };
            NavigationViewInfoBadgePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewInfoBadgeTestPage), 0); };
            NavigationViewCompactPaneLengthTestPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewCompactPaneLengthTestPage), 0); };
            NavigationViewRS4Page.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewRS4Page), 0); };
            NavigationViewPageDataContext.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewPageDataContext), 0); };
            NavigationViewTopNavPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavPage), 0); };
            NavigationViewTopNavOnlyPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavOnlyPage), 0); };
            NavigationViewTopNavStorePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavStorePage), 0); };
            NavigateToTopNavOverflowButtonPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavOverflowButtonPage), 0); };
            NavigateToSelectedItemEdgeCasePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewSelectedItemEdgeCasePage), 0); };
            NavigateToInitPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewInitPage), 0); };
            NavigateToStretchPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewStretchPage), 0); };
            NavigationViewMenuItemsSourcePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewMenuItemsSourcePage), 0); };
            NavigateToItemTemplatePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewItemTemplatePage), 0); };
            NavigationViewCustomMenuItemPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewCustomMenuItemPage), 0); };
            NavigateToRS3Page.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewRS3Page), 0); };
            NavigateToAnimationPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewAnimationPage), 0); };
            NavigateToIsPaneOpenPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewIsPaneOpenPage), 0); };
            NavigateToMinimalPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewMinimalPage), 0); };
            NavigateToCustomThemeResourcesPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewCustomThemeResourcesPage), 0); };
            NavigationViewBlankPage1.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewBlankPage1), 0); };
            NavigationViewMenuItemStretchPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewMenuItemStretchPage), 0); };
            NavigateToHierarchicalNavigationViewMarkupPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(HierarchicalNavigationViewMarkup), 0); };
            NavigateToHierarchicalNavigationViewDataBindingPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(HierarchicalNavigationViewDataBinding), 0); };
            PaneLayoutTestPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(PaneLayoutTestPage), 0); };
            PaneFooterTestPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(PaneFooterTestPage), 0); };
        }

Member Function Documentation

void CmbNavigationViewOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file NavigationViewCaseBundle.xaml.cs.

        {
           MUXControlsTestHooks.SetOutputDebugStringLevelForType(
               "NavigationView",
               cmbNavigationViewOutputDebugStringLevel.SelectedIndex == 1 || cmbNavigationViewOutputDebugStringLevel.SelectedIndex == 2,
               cmbNavigationViewOutputDebugStringLevel.SelectedIndex == 2);
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/NavigationViewCaseBundle.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewCompactPaneLengthTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewCompactPaneLengthTestPage
Public Member Functions | Private Member Functions

NavigationViewCompactPaneLengthTestPage Class Reference

List of all members.

Public Member Functions

NavigationViewCompactPaneLengthTestPage ()

Private Member Functions

void | BackButtonEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | CheckMenuItemsOffset_Click (object sender, RoutedEventArgs e)
void | CompactPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
UIElement | GetContentBox (NavigationViewItem element)
void | IsPaneFooterVisibleCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | IsSettingsVisibleCheckbox_CheckedChanged (object sender, RoutedEventArgs e)
void | NavView_ItemInvoked (object sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs e)
void | OpenPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneDisplayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 12 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewCompactPaneLengthTestPage ( ) [inline]

Definition at line 14 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            this.InitializeComponent();

            NavView.CompactPaneLength = 96;
        }

Member Function Documentation

void BackButtonEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 76 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            NavView.IsBackEnabled = true;
        }

void BackButtonEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            NavView.IsBackEnabled = false;
        }

void BackButtonVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 66 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
        }

void BackButtonVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 71 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
        }

void CheckMenuItemsOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 86 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            bool allCorrect = true;

            foreach (var item in NavView.MenuItems)
            {
                if(item as NavigationViewItem == null)
                {
                    continue;
                }
                var transform = GetContentBox(item as NavigationViewItem).TransformToVisual(null) as MatrixTransform;
                if(Math.Abs(transform.Matrix.OffsetX - NavView.CompactPaneLength) - 1 > double.Epsilon)
                {
                    allCorrect = false;
                }
            }

            var rootgrid = VisualTreeHelper.GetChild(NavView, 0);
            var paneToggleButtonGrid = VisualTreeHelper.GetChild(rootgrid, 0);
            var buttonHolderGrid = VisualTreeHelper.GetChild(paneToggleButtonGrid, 1);
            var backButton = VisualTreeHelper.GetChild(buttonHolderGrid, 0) as Button;
            var togglePaneButton = VisualTreeHelper.GetChild(buttonHolderGrid, 2) as Button;
            var CompactPaneMargin = 8;

            if (Math.Abs(backButton.ActualWidth - NavView.CompactPaneLength) - CompactPaneMargin > double.Epsilon)
            {
                allCorrect = false;
            }

            if (Math.Abs(togglePaneButton.ActualWidth - NavView.CompactPaneLength) - CompactPaneMargin > double.Epsilon)
            {
                allCorrect = false;
            }

            MenuItemsCorrectOffset.IsChecked = allCorrect;

        }

void CompactPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 21 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactPaneLength = tag;
        }

UIElement GetContentBox ( NavigationViewItem element ) [inline, private]

Definition at line 136 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            if(element == null)
            {
                return null;
            }
            // Path we are using here: NVIGrid->NavigationViewItemPresenter->LayoutRoot
            // ->PresenterContentRootGrid->ContentGrid->ContentPresenter
            var elementGrid = VisualTreeHelper.GetChild(element,0);
            var presenter = VisualTreeHelper.GetChild(elementGrid, 0);
            var layoutRoot = VisualTreeHelper.GetChild(presenter, 0);
            var presenterContentRootGrid = VisualTreeHelper.GetChild(layoutRoot, 0);
            var contentGrid = VisualTreeHelper.GetChild(presenterContentRootGrid, 1);
            var contentPresenter = VisualTreeHelper.GetChild(contentGrid, 1);
            return contentPresenter as UIElement;

        }

void IsPaneFooterVisibleCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 41 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            if (IsPaneFooterVisibleCheckBox != null && PaneFooter != null)
            {
                PaneFooter.Visibility = IsPaneFooterVisibleCheckBox.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
            }
        }

void IsSettingsVisibleCheckbox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            if (IsSettingsVisibleCheckbox != null && NavView != null)
            {
                NavView.IsSettingsVisible = (bool)IsSettingsVisibleCheckbox.IsChecked;
            }
        }

void NavView_ItemInvoked | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 124 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            if(e.InvokedItem as string == "Home")
            {
                int invokeCount = int.Parse(HomeItemInvokedCount.Text);
                invokeCount++;
                HomeItemInvokedCount.Text = invokeCount.ToString();
            }
        }

void OpenPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 27 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.OpenPaneLength = tag;
        }

void PaneDisplayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
            NavView.PaneDisplayMode = mode;
        }

void PaneToggleButtonVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = true;
        }

void PaneToggleButtonVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 54 of file NavigationViewCompactPaneLengthTestPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = false;
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewCompactPaneLengthTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewCustomMenuItemPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewCustomMenuItemPage
Public Member Functions

NavigationViewCustomMenuItemPage Class Reference

List of all members.

Public Member Functions

NavigationViewCustomMenuItemPage ()

Detailed Description

Definition at line 15 of file NavigationViewCustomMenuItemPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewCustomMenuItemPage ( ) [inline]

Definition at line 17 of file NavigationViewCustomMenuItemPage.xaml.cs.

        {
            this.InitializeComponent();
            NavView.SelectedItem = nvi1;
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/CustomResources/NavigationViewCustomMenuItemPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewCustomThemeResourcesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewCustomThemeResourcesPage
Public Member Functions | Private Member Functions | Private Attributes

NavigationViewCustomThemeResourcesPage Class Reference

List of all members.

Public Member Functions

NavigationViewCustomThemeResourcesPage ()

Private Member Functions

void | BackButtonEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | ChangeContent_Click (object sender, RoutedEventArgs e)
void | ChangeHeaderButton_Click (object sender, RoutedEventArgs args)
void | ChangePaneHeader_Click (object sender, RoutedEventArgs e)
void | ChangePaneTitleStyle_Click (object sender, RoutedEventArgs e)
void | ChangePaneTitleText_Click (object sender, RoutedEventArgs e)
void | CompactModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CompactPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ExpandedModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | GetHeaderContentMargin_Click (object sender, RoutedEventArgs e)
void | GetNavViewActiveVisualStates_Click (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | HeightCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | IsTitleBarAutoPaddingEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | IsTitleBarAutoPaddingEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | NavigationViewPage_Loaded (object sender, RoutedEventArgs e)
void | OpenPaneButton_Click (object sender, RoutedEventArgs e)
void | OpenPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneDisplayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | SettingsItemVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | SettingsItemVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Checked (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | WidthCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

Style | defaultPaneTitleTextBlockStyle = null

Detailed Description

Definition at line 15 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewCustomThemeResourcesPage ( ) [inline]

Definition at line 19 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            this.InitializeComponent();

            this.Loaded += NavigationViewPage_Loaded;
        }

Member Function Documentation

void BackButtonEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 203 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsBackEnabled = true;
        }

void BackButtonEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 208 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsBackEnabled = false;
        }

void BackButtonVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 193 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
        }

void BackButtonVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 198 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
        }

void ChangeContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            if (NavView.Content == null)
            {
                NavView.Content = new TextBox() { Text = "|Test|" };
            }
            else
            {
                NavView.Content = null;
            }
        }

void ChangeHeaderButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 188 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.Header = NavView.Header == null ? new TextBlock() { Text = "|Bananas|" } : null;
        }

void ChangePaneHeader_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 239 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.PaneHeader = NavView.PaneHeader == null ? new TextBlock() { Text = "|Modified pane header|" } : null;
        }

void ChangePaneTitleStyle_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 163 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                var paneTitleTextBlock = rootGrid.FindName("PaneTitleTextBlock") as TextBlock;
                if (paneTitleTextBlock != null)
                {
                    if (defaultPaneTitleTextBlockStyle == null)
                    {
                        defaultPaneTitleTextBlockStyle = paneTitleTextBlock.Style;
                    }

                    if (defaultPaneTitleTextBlockStyle == paneTitleTextBlock.Style)
                    {
                        paneTitleTextBlock.Style = Resources["NavigationViewPaneTitleStyle"] as Style;
                    }
                    else
                    {
                        paneTitleTextBlock.Style = defaultPaneTitleTextBlockStyle;
                    }
                }
            }
        }

void ChangePaneTitleText_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 158 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.PaneTitle = (String.IsNullOrEmpty(NavView.PaneTitle) ? "|NavView Test|" : string.Empty);
        }

void CompactModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactModeThresholdWidth = tag;
        }

void CompactPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactPaneLength = tag;
        }

void ExpandedModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.ExpandedModeThresholdWidth = tag;
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 213 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void GetHeaderContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 218 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            string margin = "|Cannot find HeaderContent|";
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                var control = rootGrid.FindName("HeaderContent") as FrameworkElement;
                if (control != null)
                {
                    margin = control.Margin.ToString();
                }
            }
            HeaderContentMarginResult.Text = margin;
        }

void GetNavViewActiveVisualStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 233 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var visualstates = Utilities.VisualStateHelper.GetCurrentVisualStateName(NavView);
            NavViewActiveVisualStatesResult.Text = string.Join(",", visualstates);
        }

void HeaderVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.AlwaysShowHeader = true;
        }

void HeaderVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 106 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.AlwaysShowHeader = false;
        }

void HeightCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            if (tag == "Default")
            {
                MainGridRow.Height = new GridLength(1, GridUnitType.Star);
            }
            else if (tag == "300")
            {
                MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
            }
        }

void IsTitleBarAutoPaddingEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 130 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsTitleBarAutoPaddingEnabled = true;
        }

void IsTitleBarAutoPaddingEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 135 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsTitleBarAutoPaddingEnabled = false;
        }

void NavigationViewPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
            PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
            HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;
        }

void OpenPaneButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsPaneOpen = true;
        }

void OpenPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 95 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.OpenPaneLength = tag;
        }

void PaneDisplayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 62 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
            NavView.PaneDisplayMode = mode;
        }

void PaneToggleButtonVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 79 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = true;
        }

void PaneToggleButtonVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 84 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = false;
        }

void SettingsItemVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 69 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsSettingsVisible = true;
        }

void SettingsItemVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 74 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            NavView.IsSettingsVisible = false;
        }

void TitleBarCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = false;
            }
        }

void TitleBarCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 149 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = true;
            }
        }

void WidthCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 111 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.Width = tag;
        }

Member Data Documentation

Style defaultPaneTitleTextBlockStyle = null [private]

Definition at line 17 of file NavigationViewCustomThemeResourcesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/CustomResources/NavigationViewCustomThemeResourcesPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewInfoBadgeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewInfoBadgeTestPage
Public Member Functions | Private Member Functions

NavigationViewInfoBadgeTestPage Class Reference

An empty page that can be used on its own or navigated to within a Frame.

List of all members.

Public Member Functions

NavigationViewInfoBadgeTestPage ()

Private Member Functions

void FlipOrientationButton_Clicked (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 23 of file NavigationViewInfoBadge.xaml.cs.

Constructor & Destructor Documentation

NavigationViewInfoBadgeTestPage ( ) [inline]

Definition at line 25 of file NavigationViewInfoBadge.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void FlipOrientationButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 30 of file NavigationViewInfoBadge.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Top ? Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Auto : Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Top;
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewInfoBadge.xaml.cs
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewInitPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewInitPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

NavigationViewInitPage Class Reference

List of all members.

Public Member Functions

NavigationViewInitPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | AddButton_Click (object sender, RoutedEventArgs e)
void | AddFooterButton_Click (object sender, RoutedEventArgs e)
void | ChangePaneVisibleButton_Click (object sender, RoutedEventArgs e)
void | ChangeToIEnumerableButton_Clicks (object sender, RoutedEventArgs e)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | NavView2_ItemInvoked (NavigationView sender, NavigationViewItemInvokedEventArgs args)
void | NavView_ItemInvoked (NavigationView sender, NavigationViewItemInvokedEventArgs args)
void | NavView_SelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs args)
void | RemoveButton_Click (object sender, RoutedEventArgs e)
void | RemoveFooterButton_Click (object sender, RoutedEventArgs e)
void | SwitchFrame_Click (object sender, RoutedEventArgs e)

Private Attributes

ObservableCollection< string > | m_footerItems
ObservableCollection< string > | m_menuItems
LinkedList< string > | m_menuItemsEnumerable = null

Detailed Description

Definition at line 18 of file NavigationViewInitPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewInitPage ( ) [inline]

Definition at line 24 of file NavigationViewInitPage.xaml.cs.

        {
            this.InitializeComponent();

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            m_menuItems = new ObservableCollection<string>();

            m_menuItems.Add("Menu Item 1");
            m_menuItems.Add("Menu Item 2");
            m_menuItems.Add("Menu Item 3");
            m_menuItems.Add("Music");

            m_footerItems = new ObservableCollection<string>();

            m_footerItems.Add("Footer Item 1");
            m_footerItems.Add("Footer Item 2");
            m_footerItems.Add("Footer Item 3");

            NavView.MenuItemsSource = m_menuItems;
            NavView.FooterMenuItemsSource = m_footerItems;
            NavView.SelectedItem = m_menuItems[0];
        }

Member Function Documentation

void AddButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 57 of file NavigationViewInitPage.xaml.cs.

        {
            if (m_menuItemsEnumerable == null)
            {
                m_menuItems.Add("New Menu Item");
            }
            else
            {
                m_menuItemsEnumerable.AddLast("New Menu Item");
            }
        }

void AddFooterButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file NavigationViewInitPage.xaml.cs.

        {
            m_footerItems.Add("New Footer Item");
        }

void ChangePaneVisibleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 134 of file NavigationViewInitPage.xaml.cs.

        {
            NavView4.IsPaneVisible = !NavView4.IsPaneVisible;
        }

void ChangeToIEnumerableButton_Clicks | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file NavigationViewInitPage.xaml.cs.

        {
            var newMenuItems = new LinkedList<string>();
            newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 1");
            newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 2");
            newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 3");

            NavView.MenuItemsSource = newMenuItems;
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file NavigationViewInitPage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void NavView2_ItemInvoked | ( | NavigationView | sender,
 |  | NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 122 of file NavigationViewInitPage.xaml.cs.

        {
            if (Frame2.Content == null)
            {
                MyLocationResult.Text = "Frame1";
            }
            else
            {
                MyLocationResult.Text = "Frame2";
            }
        }

void NavView_ItemInvoked | ( | NavigationView | sender,
 |  | NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 139 of file NavigationViewInitPage.xaml.cs.

        {
            // Reset argument type indicatiors
            ItemInvokedItemType.Text = "null";
            ItemInvokedItemContainerType.Text = "null";

            if (args.InvokedItem != null)
            {
                ItemInvokedItemType.Text = args.InvokedItem.GetType().ToString();
            }

            if (args.InvokedItemContainer != null)
            {
                ItemInvokedItemContainerType.Text = args.InvokedItemContainer.GetType().ToString();
            }
        }

void NavView_SelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 156 of file NavigationViewInitPage.xaml.cs.

        {
            // Reset argument type indicatiors
            SelectionChangedItemType.Text = "null";
            SelectionChangedItemContainerType.Text = "null";

            if (args.SelectedItem != null)
            {
                SelectionChangedItemType.Text = args.SelectedItem.GetType().ToString();
            }

            if (args.SelectedItemContainer != null)
            {
                SelectionChangedItemContainerType.Text = args.SelectedItemContainer.GetType().ToString();
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 49 of file NavigationViewInitPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

void RemoveButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 69 of file NavigationViewInitPage.xaml.cs.

        {
            if (m_menuItemsEnumerable == null)
            {
                m_menuItems.RemoveAt(m_menuItems.Count - 1);
            }
            else
            {
                m_menuItemsEnumerable.RemoveLast();
            }
        }

void RemoveFooterButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 86 of file NavigationViewInitPage.xaml.cs.

        {
            m_footerItems.RemoveAt(m_footerItems.Count - 1);
        }

void SwitchFrame_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 106 of file NavigationViewInitPage.xaml.cs.

        {
            if (Frame2.Content == null)
            {
                var content = Frame1.Content;
                Frame1.Content = null;
                Frame2.Content = content;
            }
            else
            {
                var content = Frame2.Content;
                Frame2.Content = null;
                Frame1.Content = content;
            }
        }

Member Data Documentation

ObservableCollection<string> m_footerItems [private]

Definition at line 21 of file NavigationViewInitPage.xaml.cs.

ObservableCollection<string> m_menuItems [private]

Definition at line 20 of file NavigationViewInitPage.xaml.cs.

LinkedList<string> m_menuItemsEnumerable = null [private]

Definition at line 22 of file NavigationViewInitPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewInitPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewIsPaneOpenPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewIsPaneOpenPage
Public Member Functions | Private Member Functions

NavigationViewIsPaneOpenPage Class Reference

List of all members.

Public Member Functions

NavigationViewIsPaneOpenPage ()

Private Member Functions

void NavigationView_ItemInvoked (Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs args)

Detailed Description

Definition at line 8 of file NavigationViewIsPaneOpenPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewIsPaneOpenPage ( ) [inline]

Definition at line 10 of file NavigationViewIsPaneOpenPage.xaml.cs.

        {
            this.InitializeComponent();

        }

Member Function Documentation

void NavigationView_ItemInvoked | ( | Microsoft.UI.Xaml.Controls.NavigationView | sender,
 |  | Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 18 of file NavigationViewIsPaneOpenPage.xaml.cs.

        {
            if((args.InvokedItem as string) == "Apps")
            {
                CollapsedItem.Visibility = Microsoft.UI.Xaml.Visibility.Visible;

                NavView.SelectedItem = CollapsedItem;
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewIsPaneOpenPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemTemplatePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewItemTemplatePage
Public Member Functions | Private Member Functions

NavigationViewItemTemplatePage Class Reference

List of all members.

Public Member Functions

NavigationViewItemTemplatePage ()

Private Member Functions

void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | NavView_ItemInvoked (NavigationView sender, NavigationViewItemInvokedEventArgs args)
void | NavView_SelectionChanged (Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)

Detailed Description

Definition at line 49 of file NavigationViewItemTemplatePage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewItemTemplatePage ( ) [inline]

Definition at line 51 of file NavigationViewItemTemplatePage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 57 of file NavigationViewItemTemplatePage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void NavView_ItemInvoked | ( | NavigationView | sender,
 |  | NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 91 of file NavigationViewItemTemplatePage.xaml.cs.

        {
            // Reset argument type indicatiors
            ItemInvokedItemType.Text = "null";
            ItemInvokedItemContainerType.Text = "null";

            if (args.InvokedItem != null)
            {
                ItemInvokedItemType.Text = args.InvokedItem.GetType().ToString();
            }

            if (args.InvokedItemContainer != null)
            {
                ItemInvokedItemContainerType.Text = args.InvokedItemContainer.GetType().ToString();
            }
        }

void NavView_SelectionChanged | ( | Microsoft.UI.Xaml.Controls.NavigationView | sender,
 |  | Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 62 of file NavigationViewItemTemplatePage.xaml.cs.

        {
            var children = (Customer)args.SelectedItemContainer.Content;
            var customer = (Customer)args.SelectedItem;
            if (children != null && customer != null)
            {
                SelectionEventResult.Text = "Passed";
            }
            else
            {
                SelectionEventResult.Text = "Failed";
            }

            // Reset argument type indicatiors
            SelectionChangedItemType.Text = "null";
            SelectionChangedItemContainerType.Text = "null";

            // Update argument type indicators
            if (args.SelectedItem != null)
            {
                SelectionChangedItemType.Text = args.SelectedItem.GetType().ToString();
            }

            if (args.SelectedItemContainer != null)
            {
                SelectionChangedItemContainerType.Text = args.SelectedItemContainer.GetType().ToString();
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/CustomResources/NavigationViewItemTemplatePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewMenuItemsSourcePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewMenuItemsSourcePage
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

NavigationViewMenuItemsSourcePage Class Reference

List of all members.

Public Member Functions

NavigationViewMenuItemsSourcePage ()

Public Attributes

ObservableCollection
< NavViewPageData > 		Pages = new ObservableCollection<NavViewPageData>()

Private Member Functions

void | BtnInsertItemsFromBeginning_Click (object sender, RoutedEventArgs e)
void | NavigationView_ItemInvoked (NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs args)

Private Attributes

ObservableCollection
< NavViewPageData > 		_reverse_order_items = new ObservableCollection<NavViewPageData>()

Detailed Description

Definition at line 24 of file NavigationViewMenuItemsSourcePage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewMenuItemsSourcePage ( ) [inline]

Definition at line 30 of file NavigationViewMenuItemsSourcePage.xaml.cs.

        {
            this.InitializeComponent();

            Pages.Add(new NavViewPageData("First Item"));
            Pages.Add(new NavViewPageData("Second Item"));
            Pages.Add(new NavViewPageData("Third Item"));
            Pages.Add(new NavViewPageData("Fourth Item"));
            Pages.Add(new NavViewPageData("Fifth Item"));
            Pages.Add(new NavViewPageData("Sixth Item"));
            Pages.Add(new NavViewPageData("Seventh Item"));

            _reverse_order_items.Add(new NavViewPageData("Item 0"));
            _reverse_order_items.Add(new NavViewPageData("Item 1"));
        }

Member Function Documentation

void BtnInsertItemsFromBeginning_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 52 of file NavigationViewMenuItemsSourcePage.xaml.cs.

        {
            foreach (var item in _reverse_order_items.Reverse())
            {
                Pages.Insert(0, item);
            }
        }

void NavigationView_ItemInvoked | ( | NavigationView | sender,
 |  | Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 46 of file NavigationViewMenuItemsSourcePage.xaml.cs.

        {
            Pages.Add(new NavViewPageData("Menu Item NEW"));
            Pages.RemoveAt(0);
        }

Member Data Documentation

ObservableCollection<NavViewPageData> _reverse_order_items = new ObservableCollection<NavViewPageData>() [private]

Definition at line 28 of file NavigationViewMenuItemsSourcePage.xaml.cs.

ObservableCollection<NavViewPageData> Pages = new ObservableCollection<NavViewPageData>()

Definition at line 26 of file NavigationViewMenuItemsSourcePage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewMenuItemsSourcePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewMenuItemStretchPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewMenuItemStretchPage
Public Member Functions

NavigationViewMenuItemStretchPage Class Reference

List of all members.

Public Member Functions

NavigationViewMenuItemStretchPage ()

Detailed Description

Definition at line 6 of file NavigationViewMenuItemStretchPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewMenuItemStretchPage ( ) [inline]

Definition at line 8 of file NavigationViewMenuItemStretchPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewMenuItemStretchPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewMinimalPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewMinimalPage
Public Member Functions | Private Member Functions

NavigationViewMinimalPage Class Reference

List of all members.

Public Member Functions

NavigationViewMinimalPage ()

Private Member Functions

void | GetNavViewActiveVisualStates_Click (object sender, RoutedEventArgs e)
void | TogglePaneOpenButton_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)

Detailed Description

Definition at line 8 of file NavigationViewMinimalPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewMinimalPage ( ) [inline]

Definition at line 10 of file NavigationViewMinimalPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void GetNavViewActiveVisualStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 15 of file NavigationViewMinimalPage.xaml.cs.

        {
            var visualstates = Utilities.VisualStateHelper.GetCurrentVisualStateName(NavView);
            NavViewActiveVisualStatesResult.Text = string.Join(",", visualstates);
        }

void TogglePaneOpenButton_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 21 of file NavigationViewMinimalPage.xaml.cs.

        {
            if (NavView.IsPaneToggleButtonVisible)
            {
                NavView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
                NavView.IsPaneToggleButtonVisible = false;
            }
            else
            {
                NavView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftMinimal;
                NavView.IsPaneToggleButtonVisible = true;
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewMinimalPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewPage
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

NavigationViewPage Class Reference

List of all members.

Public Member Functions

NavigationViewPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Properties

int | m_itemInvokedEventsFired [get, set]
int | m_selectionChangedEventsFired [get, set]

Private Member Functions

void | AddFooterItemButton_Click (object sender, RoutedEventArgs e)
void | AddItemButton_Click (object sender, RoutedEventArgs e)
void | AutoSuggestBox_TextChanged (AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
void | AutoSuggestCheckbox_Checked (object sender, RoutedEventArgs e)
void | AutoSuggestCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackRequestedStateResetButton_Click (object sender, RoutedEventArgs args)
void | BringSettingsIntoViewButton_Click (object sender, RoutedEventArgs e)
void | ChangeContent_Click (object sender, RoutedEventArgs e)
void | ChangeFocusVisualKind_Click (object sender, RoutedEventArgs e)
void | ChangePaneHeader_Click (object sender, RoutedEventArgs e)
void | ChangePaneTitle_Click (object sender, RoutedEventArgs e)
void | ClearMenuButton_Click (object sender, RoutedEventArgs e)
void | ClearSelectedItem_Click (object sender, RoutedEventArgs e)
void | ClearSelectionChangeBlock (object sender, RoutedEventArgs e)
void | ClosingEventCountResetButton_Click (object sender, RoutedEventArgs e)
void | CompactModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CompactPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
async void | ContentDialogNavViewButton_Click (object sender, RoutedEventArgs e)
void | CopyGamesLabelButton_Click (object sender, RoutedEventArgs e)
void | CopyVolumeToolTipButton_Click (object sender, RoutedEventArgs e)
void | ExpandedModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | FindAndGiveAutomationNameToVisualChild (string childName)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | FlowDirectionCheckbox_Checked (object sender, RoutedEventArgs e)
void | FlowDirectionCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | GetChildNavViewItemContentPresenterMarginButton_Click (object sender, RoutedEventArgs e)
void | GetHeaderContentMargin_Click (object sender, RoutedEventArgs e)
void | GetHomeItemRevealVisualState_Click (object sender, RoutedEventArgs e)
void | GetNavViewActiveVisualStates_Click (object sender, RoutedEventArgs e)
void | GetTopLevelNavViewItemContentPresenterMarginButton_Click (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | HeightCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | IsPaneFooterVisibleCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | IsTitleBarAutoPaddingEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | IsTitleBarAutoPaddingEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | MoviesEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | MoviesEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | NavigationViewPage_Loaded (object sender, RoutedEventArgs e)
void | NavigationViewPage_Unloaded (object sender, RoutedEventArgs e)
void | NavView_BackRequested (NavigationView nv, NavigationViewBackRequestedEventArgs args)
void | NavView_DisplayModeChanged (NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
void | NavView_ItemInvoked (NavigationView sender, NavigationViewItemInvokedEventArgs args)
void | NavView_PaneClosed (NavigationView sender, object args)
void | NavView_PaneClosing (NavigationView sender, NavigationViewPaneClosingEventArgs args)
void | NavView_PaneOpened (NavigationView sender, object args)
void | NavView_PaneOpening (NavigationView sender, object args)
void | NavView_SelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs args)
void | OpenPaneButton_Click (object sender, RoutedEventArgs e)
void | OpenPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneAutoSuggestBox_SuggestionChosen (AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args)
void | PaneDisplayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | ReadSettingsSelected_Click (object sender, RoutedEventArgs e)
void | RemoveFooterItemButton_Click (object sender, RoutedEventArgs e)
void | RemoveItemButton_Click (object sender, RoutedEventArgs e)
void | ResetEventCounters_Click (object sender, RoutedEventArgs e)
void | ScrambleButton_Click (object sender, RoutedEventArgs e)
void | ScrollItemIntoViewButton_Click (object sender, RoutedEventArgs e)
void | SelectedItemCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | SelectedItemIsEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | SelectedItemIsEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | SelectionFollowFocus_Checked (object sender, RoutedEventArgs e)
void | SelectionFollowFocus_Unchecked (object sender, RoutedEventArgs e)
void | SetHeaderButton_Click (object sender, RoutedEventArgs args)
void | SettingsItemVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | SettingsItemVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | ShowFooterItemButton_Click (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Checked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | TestPage_Loaded (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Checked (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | ToggleBackgroundChanged (DependencyObject o, DependencyProperty p)
void | ToggleButtonStyleCheckbox_Checked (object sender, RoutedEventArgs e)
void | ToggleButtonStyleCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | UpdateToggleBackgroundColor (Button toggleButton)
void | WidthCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

int | _itemInvokedEventsFired = 0
int | _selectionChangedEventsFired = 0
int | m_closedEventsFired = 0
int | m_closingEventsFired = 0
FocusVisualKind | m_focusVisualKind
int | m_newFooterItemIndex = 0
int | m_newItemIndex = 0
bool | m_useFocusVisualKindReveal = false

Detailed Description

Definition at line 20 of file NavigationViewPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewPage ( ) [inline]

Definition at line 59 of file NavigationViewPage.xaml.cs.

        {
            this.InitializeComponent();

            this.Loaded += NavigationViewPage_Loaded;
            this.Unloaded += NavigationViewPage_Unloaded;

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            IntegerItem.Content = 7; // Testing that boxed ints don't cause crashes in tooltips
        }

Member Function Documentation

void AddFooterItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 322 of file NavigationViewPage.xaml.cs.

        {
            var menuItem = new NavigationViewItem();
            menuItem.Content = "New Footer Menu Item " + m_newFooterItemIndex.ToString();
            menuItem.Icon = new SymbolIcon(Symbol.AllApps);
            NavView.FooterMenuItems.Add(menuItem);
            m_newFooterItemIndex++;
        }

void AddItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 300 of file NavigationViewPage.xaml.cs.

        {
            var menuItem = new NavigationViewItem();
            menuItem.Content = "New Menu Item " + m_newItemIndex.ToString();
            menuItem.Icon = new SymbolIcon(Symbol.AllApps);
            NavView.MenuItems.Add(menuItem);
            m_newItemIndex++;
        }

void AutoSuggestBox_TextChanged | ( | AutoSuggestBox | sender,
 |  | AutoSuggestBoxTextChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 788 of file NavigationViewPage.xaml.cs.

        {
            var suggestions = new List<string>();
            suggestions.Add(sender.Text);
            suggestions.Add(sender.Text + "1");
            PaneAutoSuggestBox.ItemsSource = suggestions;
        }

void AutoSuggestCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 506 of file NavigationViewPage.xaml.cs.

        {
            // recreate AutoSuggestBox
            var autoSuggestBox = new AutoSuggestBox();
            AutomationProperties.SetName(autoSuggestBox, "PaneAutoSuggestBox");
            NavView.AutoSuggestBox = autoSuggestBox;
        }

void AutoSuggestCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 514 of file NavigationViewPage.xaml.cs.

        {
            NavView.AutoSuggestBox = null;
        }

void BackButtonEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 634 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsBackEnabled = true;
        }

void BackButtonEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 639 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsBackEnabled = false;
        }

void BackButtonVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 624 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
        }

void BackButtonVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 629 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
        }

void BackRequestedStateResetButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 659 of file NavigationViewPage.xaml.cs.

        {
            BackRequestedStateTextBlock.Text = "Test reset";
        }

void BringSettingsIntoViewButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 780 of file NavigationViewPage.xaml.cs.

        {
            if (NavView.SettingsItem is NavigationViewItem settingsItem)
            {
                settingsItem.StartBringIntoView();
            }
        }

void ChangeContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 136 of file NavigationViewPage.xaml.cs.

        {
            NavView.Content = new TextBox();
        }

void ChangeFocusVisualKind_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 681 of file NavigationViewPage.xaml.cs.

        {
            m_useFocusVisualKindReveal = !m_useFocusVisualKindReveal;
            if (m_useFocusVisualKindReveal)
            {
                Application.Current.FocusVisualKind = FocusVisualKind.Reveal;
            }
            else
            {
                Application.Current.FocusVisualKind = m_focusVisualKind;
            }

            // Force HomeItem to update visualstate
            if (HomeItem.Content.Equals("Home"))
            {
                HomeItem.Content = "Home1";
            }
            else
            {
                HomeItem.Content = "Home";
            }
        }

void ChangePaneHeader_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 725 of file NavigationViewPage.xaml.cs.

        {
            if (NavView.PaneHeader == null)
            {
                TextBlock text = new TextBlock();
                text.Text = "Modified Pane Header";
                NavView.PaneHeader = text;
            }
            else if (NavView.PaneHeader is TextBlock)
            {
                TextBox text = new TextBox();
                text.Text = "Large Pane Header";
                text.IsReadOnly = true;
                text.FontSize = 26;
                NavView.PaneHeader = text;
            }
            else
            {
                NavView.PaneHeader = null;
            }

            FindAndGiveAutomationNameToVisualChild("PaneHeaderOnTopPane");
            FindAndGiveAutomationNameToVisualChild("PaneHeaderContentBorder");
        }

void ChangePaneTitle_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 592 of file NavigationViewPage.xaml.cs.

        {
            NavView.PaneTitle = string.IsNullOrEmpty(NavView.PaneTitle) ? "NavView Test" : string.Empty;
        }

void ClearMenuButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 339 of file NavigationViewPage.xaml.cs.

        {
            NavView.MenuItems.Clear();
        }

void ClearSelectedItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 670 of file NavigationViewPage.xaml.cs.

        {
            NavView.SelectedItem = null;
        }

void ClearSelectionChangeBlock | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 441 of file NavigationViewPage.xaml.cs.

        {
            SelectionChangedRaised.Text = "False";
        }

void ClosingEventCountResetButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 549 of file NavigationViewPage.xaml.cs.

        {
            LastIngEventText.Text = "";
            LastEdEventText.Text = "";
            m_closingEventsFired = 0;
            m_closedEventsFired = 0;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
        }

void CompactModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 141 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactModeThresholdWidth = tag;
        }

void CompactPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 243 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactPaneLength = tag;
        }

async void ContentDialogNavViewButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 757 of file NavigationViewPage.xaml.cs.

        {
            DialogWithNavView dialog = new DialogWithNavView();
            dialog.XamlRoot = this.XamlRoot;
            await dialog.ShowAsync();
        }

void CopyGamesLabelButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 534 of file NavigationViewPage.xaml.cs.

        {
            var popups = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot);
            if (popups != null && popups.Count > 0)
            {
                Popup popup = popups[0];
                ToolTip toolTip = popup.Child as ToolTip;
                ToolTipStatusTextBlock.Text = toolTip.Content.ToString();
            }
            else
            {
                ToolTipStatusTextBlock.Text = "There are no popups";
            }
        }

void CopyVolumeToolTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 597 of file NavigationViewPage.xaml.cs.

        {
            var contentGrid = FindVisualChildByName(VolumeItem, "ContentGrid") as Grid;
            ToolTip tooltip = ToolTipService.GetToolTip(contentGrid) as ToolTip;
            if (tooltip == null || tooltip.Content == null)
            {
                ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is null";
            }
            else
            {
                ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is definitely not null";
            }
        }

void ExpandedModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 147 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.ExpandedModeThresholdWidth = tag;
        }

void FindAndGiveAutomationNameToVisualChild ( string childName ) [inline, private]

Definition at line 284 of file NavigationViewPage.xaml.cs.

        {
            DependencyObject obj = FindVisualChildByName(this.NavView, childName);

            if (obj != null)
            {
                AutomationProperties.SetName(obj, childName);
            }
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 664 of file NavigationViewPage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
            FindAndGiveAutomationNameToVisualChild("SettingsItem");
        }

void FlowDirectionCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 458 of file NavigationViewPage.xaml.cs.

        {
            this.FlowDirection = FlowDirection.LeftToRight;
        }

void FlowDirectionCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 463 of file NavigationViewPage.xaml.cs.

        {
            this.FlowDirection = FlowDirection.RightToLeft;
        }

void GetChildNavViewItemContentPresenterMarginButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 772 of file NavigationViewPage.xaml.cs.

        {
            if (FindVisualChildByName(ChildItem, "ContentPresenter") is ContentPresenter presenter)
            {
                NavViewItemContentPresenterMarginTextBlock.Text = presenter.Margin.ToString();
            }
        }

void GetHeaderContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 704 of file NavigationViewPage.xaml.cs.

        {
            string margin = "Can't find HeaderContent";
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                var control = rootGrid.FindName("HeaderContent") as FrameworkElement;
                if (control != null)
                {
                    margin = control.Margin.ToString();
                }
            }
            HeaderContentMarginResult.Text = margin;
        }

void GetHomeItemRevealVisualState_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 675 of file NavigationViewPage.xaml.cs.

        {
            var found = Utilities.VisualStateHelper.ContainsVisualState(HomeItem, "OnLeftNavigationReveal");
            OnLeftNavigationRevealVisualState.Text = found ? "True" : "False";
        }

void GetNavViewActiveVisualStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 719 of file NavigationViewPage.xaml.cs.

        {
            var visualstates = Utilities.VisualStateHelper.GetCurrentVisualStateName(NavView);
            NavViewActiveVisualStatesResult.Text = string.Join(",", visualstates);
        }

void GetTopLevelNavViewItemContentPresenterMarginButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 764 of file NavigationViewPage.xaml.cs.

        {
            if (FindVisualChildByName(HasChildItem, "ContentPresenter") is ContentPresenter presenter)
            {
                NavViewItemContentPresenterMarginTextBlock.Text = presenter.Margin.ToString();
            }
        }

void HeaderVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 274 of file NavigationViewPage.xaml.cs.

        {
            NavView.AlwaysShowHeader = true;
        }

void HeaderVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 279 of file NavigationViewPage.xaml.cs.

        {
            NavView.AlwaysShowHeader = false;
        }

void HeightCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 344 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            if (tag == "Default")
            {
                MainGridRow.Height = new GridLength(1, GridUnitType.Star);
            }
            else if (tag == "300")
            {
                MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
            }
        }

void IsPaneFooterVisibleCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 616 of file NavigationViewPage.xaml.cs.

        {
            if (IsPaneFooterVisibleCheckBox != null && PaneFooter != null)
            {
                PaneFooter.Visibility = IsPaneFooterVisibleCheckBox.IsChecked==true ? Visibility.Visible : Visibility.Collapsed;
            }
        }

void IsTitleBarAutoPaddingEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 468 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsTitleBarAutoPaddingEnabled = true;
        }

void IsTitleBarAutoPaddingEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 473 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsTitleBarAutoPaddingEnabled = false;
        }

void MoviesEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 446 of file NavigationViewPage.xaml.cs.

        {
            MoviesItem.IsEnabled = true;
            TVItem.IsEnabled = true;
        }

void MoviesEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 452 of file NavigationViewPage.xaml.cs.

        {
            MoviesItem.IsEnabled = false;
            TVItem.IsEnabled = false;
        }

void NavigationViewPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file NavigationViewPage.xaml.cs.

        {
            m_focusVisualKind = Application.Current.FocusVisualKind;

            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
                if (paneContentGrid != null)
                {
                    Button toggleButton = paneContentGrid.FindName("TogglePaneButton") as Button;
                    if (toggleButton != null)
                    {
                        toggleButton.RegisterPropertyChangedCallback(Button.BackgroundProperty, new DependencyPropertyChangedCallback(ToggleBackgroundChanged));
                        UpdateToggleBackgroundColor(toggleButton);
                    }
                }
            }

            SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
            PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
            HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;

            NavView.SelectedItem = HomeItem;

            FindAndGiveAutomationNameToVisualChild("NavigationViewBackButton");
        }

void NavigationViewPage_Unloaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 109 of file NavigationViewPage.xaml.cs.

        {
            Application.Current.FocusVisualKind = m_focusVisualKind;
        }

void NavView_BackRequested | ( | NavigationView | nv,
 |  | NavigationViewBackRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 654 of file NavigationViewPage.xaml.cs.

        {
            BackRequestedStateTextBlock.Text = "Back was requested";
        }

void NavView_DisplayModeChanged | ( | NavigationView | sender,
 |  | NavigationViewDisplayModeChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 255 of file NavigationViewPage.xaml.cs.

        {
            switch (args.DisplayMode)
            {
                case NavigationViewDisplayMode.Minimal:
                    DisplayModeTextBox.Text = "Minimal";
                    DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DodgerBlue);
                    break;
                case NavigationViewDisplayMode.Compact:
                    DisplayModeTextBox.Text = "Compact";
                    DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkMagenta);
                    break;
                case NavigationViewDisplayMode.Expanded:
                    DisplayModeTextBox.Text = "Expanded";
                    DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkRed);
                    break;
            }
        }

void NavView_ItemInvoked | ( | NavigationView | sender,
 |  | NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 363 of file NavigationViewPage.xaml.cs.

        {
            m_itemInvokedEventsFired++;

            // Reset argument type indicatiors
            ItemInvokedItemType.Text = "null";
            ItemInvokedItemContainerType.Text = "null";

            if (args.InvokedItem != null)
            {
                ItemInvokedItemType.Text = args.InvokedItem.GetType().ToString();
            }

            if (args.InvokedItemContainer != null)
            {
                ItemInvokedItemContainerType.Text = args.InvokedItemContainer.GetType().ToString();
            }

            var curSelected = sender.SelectedItem as NavigationViewItem;
            var text = args.InvokedItem as string;
            if (curSelected != null && (string)curSelected.Content == text)
            {
                if(InvokedItemState.Text == "ItemWasSelectedInItemInvoked")
                {
                    InvokedItemState.Text = "ItemWasInvokedSecomdTimeWithCorrectSelection";
                }
                else
                {
                    InvokedItemState.Text = "ItemWasSelectedInItemInvoked";
                }
            }
            else
            {
                InvokedItemState.Text = "Error:ItemUnselectedInItemInvoked";
            }
        }

void NavView_PaneClosed | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 572 of file NavigationViewPage.xaml.cs.

        {
            LastEdEventText.Text = "PaneClosed event fired";

            m_closedEventsFired++;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
            PaneOpenedOrClosedEvent.Text = "Closed";
        }

void NavView_PaneClosing | ( | NavigationView | sender,
 |  | NavigationViewPaneClosingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 558 of file NavigationViewPage.xaml.cs.

        {
            if (CancelClosingEvents != null && (bool)CancelClosingEvents.IsChecked)
            {
                args.Cancel = true;
            }

            LastIngEventText.Text = "PaneClosing event fired";

            m_closingEventsFired++;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;

        }

void NavView_PaneOpened | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 586 of file NavigationViewPage.xaml.cs.

        {
            LastEdEventText.Text = "PaneOpened event fired";
            PaneOpenedOrClosedEvent.Text = "Opened";
        }

void NavView_PaneOpening | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 581 of file NavigationViewPage.xaml.cs.

        {
            LastIngEventText.Text = "PaneOpening event fired";
        }

void NavView_SelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 400 of file NavigationViewPage.xaml.cs.

        {
            SelectionChangedRaised.Text = "True";
            // Reset argument type indicatiors
            SelectionChangedItemType.Text = "null";
            SelectionChangedItemContainerType.Text = "null";

            m_selectionChangedEventsFired++;
            if (args.SelectedItem != null)
            {
                SelectionChangedItemType.Text = args.SelectedItem.GetType().ToString();

                var itemdata = args.SelectedItem as NavigationViewItem;
                if (itemdata != null)
                {
                    if (itemdata.Content != null)
                    {
                        NavView.Header = itemdata.Content + " as header";
                    }
                    else if(args.IsSettingsSelected) // to handle settings without content case in top nav
                    {
                        NavView.Header = "Settings as header";
                    }
                }
            }

            if (args.SelectedItemContainer != null)
            {
                SelectionChangedItemContainerType.Text = args.SelectedItemContainer.GetType().ToString();
            }

            if (NavView.SelectedItem == null)
            {
                SelectedItemIsEnabledCheckbox.IsChecked = null;
            }
            else
            {
                SelectedItemIsEnabledCheckbox.IsChecked = (NavView.SelectedItem as Control).IsEnabled;
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 72 of file NavigationViewPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            base.OnNavigatedFrom(e);
        }

void OpenPaneButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 131 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsPaneOpen = true;
        }

void OpenPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 249 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.OpenPaneLength = tag;
        }

void PaneAutoSuggestBox_SuggestionChosen | ( | AutoSuggestBox | sender,
 |  | AutoSuggestBoxSuggestionChosenEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 796 of file NavigationViewPage.xaml.cs.

        {
            SuggestionChosenCheckbox.IsChecked = true;
        }

void PaneDisplayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 157 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
            NavView.PaneDisplayMode = mode;
        }

void PaneToggleButtonVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 223 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = true;
        }

void PaneToggleButtonVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 228 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = false;
        }

void ReadSettingsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 750 of file NavigationViewPage.xaml.cs.

        {
            DependencyObject settings = FindVisualChildByName(NavView, "SettingsItem");

            SettingsSelectedState.Text = (settings as NavigationViewItem).IsSelected.ToString();
        }

void RemoveFooterItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 331 of file NavigationViewPage.xaml.cs.

        {
            if (NavView.FooterMenuItems.Count > 0)
            {
                NavView.FooterMenuItems.RemoveAt(NavView.FooterMenuItems.Count - 1);
            }
        }

void RemoveItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 309 of file NavigationViewPage.xaml.cs.

        {
            if (NavView.MenuItems.Count > 0)
            {
                NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
            }
        }

void ResetEventCounters_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 357 of file NavigationViewPage.xaml.cs.

        {
            m_itemInvokedEventsFired = 0;
            m_selectionChangedEventsFired = 0;
        }

void ScrambleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 519 of file NavigationViewPage.xaml.cs.

        {
            foreach (var entry in NavView.MenuItems)
            {
                NavigationViewItem item = entry as NavigationViewItem;

                if (item != null)
                {
                    char[] newTitle = item.Content.ToString().ToCharArray();
                    Array.Reverse(newTitle);
                    item.Content = new string(newTitle);
                }
            }
        }

void ScrollItemIntoViewButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 801 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToString((ScrollItemIntoViewComboBox.SelectedItem as ComboBoxItem).Tag);
            switch (tag)
            {
                case "Home":
                    HomeItem.StartBringIntoView();
                    break;
                case "HasChildItem":
                    HasChildItem.StartBringIntoView();
                    break;
            }
        }

void SelectedItemCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 164 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            if (tag == "Home")
            {
                NavView.SelectedItem = HomeItem;
            }
            else if (tag == "Apps")
            {
                AppsItem.IsSelected = true;
            }
            else if (tag == "Games")
            {
                NavView.SelectedItem = GamesItem;
            }
            else if (tag == "Music")
            {
                NavView.SelectedItem = MusicItem;
            }
            else if (tag == "Movies")
            {
                NavView.SelectedItem = MoviesItem;
            }
            else if (tag == "TV")
            {
                NavView.SelectedItem = TVItem;
            }
            else if (tag == "Settings")
            {
                NavView.SelectedItem = NavView.SettingsItem;
            }
        }

void SelectedItemIsEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 197 of file NavigationViewPage.xaml.cs.

        {
            if (NavView.SelectedItem != null)
            {
                (NavView.SelectedItem as Control).IsEnabled = true;
            }
        }

void SelectedItemIsEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 205 of file NavigationViewPage.xaml.cs.

        {
            if (NavView.SelectedItem != null)
            {
                (NavView.SelectedItem as Control).IsEnabled = false;
            }
        }

void SelectionFollowFocus_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 644 of file NavigationViewPage.xaml.cs.

        {
            NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
        }

void SelectionFollowFocus_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 649 of file NavigationViewPage.xaml.cs.

        {
            NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
        }

void SetHeaderButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 611 of file NavigationViewPage.xaml.cs.

        {
            NavView.Header = new TextBlock() { Text = "Bananas" };
        }

void SettingsItemVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 213 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsSettingsVisible = true;
        }

void SettingsItemVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 218 of file NavigationViewPage.xaml.cs.

        {
            NavView.IsSettingsVisible = false;
        }

void ShowFooterItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 317 of file NavigationViewPage.xaml.cs.

        {
            FooterItem.Visibility = Visibility.Visible;
        }

void TestFrameCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 496 of file NavigationViewPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Visible);
        }

void TestFrameCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 501 of file NavigationViewPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Collapsed);
        }

void TestPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file NavigationViewPage.xaml.cs.

        {
        }

void TitleBarCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 478 of file NavigationViewPage.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = false;
            }
        }

void TitleBarCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 487 of file NavigationViewPage.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = true;
            }
        }

void ToggleBackgroundChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 114 of file NavigationViewPage.xaml.cs.

        {
            UpdateToggleBackgroundColor(o as Button);
        }

void ToggleButtonStyleCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 233 of file NavigationViewPage.xaml.cs.

        {
            NavView.PaneToggleButtonStyle = this.Resources["AlternateToggleButtonStyle"] as Style;
        }

void ToggleButtonStyleCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 238 of file NavigationViewPage.xaml.cs.

        {
            NavView.PaneToggleButtonStyle = Application.Current.Resources["PaneToggleButtonStyle"] as Style;
        }

void UpdateToggleBackgroundColor ( Button toggleButton ) [inline, private]

Definition at line 119 of file NavigationViewPage.xaml.cs.

        {
            if (toggleButton.Background != null && toggleButton.Background is SolidColorBrush)
            {
                ToggleButtonBackgroundColor.Text = (toggleButton.Background as SolidColorBrush).Color.ToString();
            }
            else
            {
                ToggleButtonBackgroundColor.Text = String.Empty;
            }
        }

void WidthCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 294 of file NavigationViewPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.Width = tag;
        }

Member Data Documentation

int _itemInvokedEventsFired = 0 [private]

Definition at line 44 of file NavigationViewPage.xaml.cs.

int _selectionChangedEventsFired = 0 [private]

Definition at line 30 of file NavigationViewPage.xaml.cs.

int m_closedEventsFired = 0 [private]

Definition at line 25 of file NavigationViewPage.xaml.cs.

int m_closingEventsFired = 0 [private]

Definition at line 24 of file NavigationViewPage.xaml.cs.

FocusVisualKind m_focusVisualKind [private]

Definition at line 28 of file NavigationViewPage.xaml.cs.

int m_newFooterItemIndex = 0 [private]

Definition at line 23 of file NavigationViewPage.xaml.cs.

int m_newItemIndex = 0 [private]

Definition at line 22 of file NavigationViewPage.xaml.cs.

bool m_useFocusVisualKindReveal = false [private]

Definition at line 26 of file NavigationViewPage.xaml.cs.

Property Documentation

int m_itemInvokedEventsFired [get, set]

Definition at line 46 of file NavigationViewPage.xaml.cs.

int m_selectionChangedEventsFired [get, set]

Definition at line 32 of file NavigationViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewPageDataContext Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewPageDataContext
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

NavigationViewPageDataContext Class Reference

List of all members.

Public Member Functions

NavigationViewPageDataContext ()

Properties

NavViewPageData[] | Pages [get, set]

Events

PropertyChangedEventHandler | PropertyChanged

Private Member Functions

void | GetNavViewActiveVisualStates_Click (object sender, RoutedEventArgs e)
void | NavigationView_ItemInvoked (NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs args)
void | NavView_SelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs args)
void | NotifyPropertyChanged ([CallerMemberName] string propertyName=null)

Private Attributes

NavViewPageData[] _pages

Detailed Description

Definition at line 22 of file NavigationViewPageDataContext.xaml.cs.

Constructor & Destructor Documentation

NavigationViewPageDataContext ( ) [inline]

Definition at line 44 of file NavigationViewPageDataContext.xaml.cs.

        {
            this.InitializeComponent();

            for (int i = 0; i < 8; i++)
            {
                var nvi = new NavigationViewItem();
                var itemString = "Item #" + i;
                nvi.Content = itemString;
                nvi.DataContext = itemString + "_DataContext";
                NavView.MenuItems.Add(nvi);
            }

            NavView.SelectedItem = NavView.MenuItems[0];

            Pages = new[]
            {
                new NavViewPageData("FirstInvokeChangeItem"),
                new NavViewPageData("SecondInvokeChangeItem"),
                new NavViewPageData("ThirdInvokeChangeItem"),
                new NavViewPageData("FourthInvokeChangeItem"),
                new NavViewPageData("FifthInvokeChangeItem"),
                new NavViewPageData("SixthInvokeChangeItem"),
                new NavViewPageData("SeventhInvokeChangeItem"),
            };
        }

Member Function Documentation

void GetNavViewActiveVisualStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 92 of file NavigationViewPageDataContext.xaml.cs.

        {
            var visualstates = Utilities.VisualStateHelper.GetCurrentVisualStateName(NavView);
            NavViewActiveVisualStatesResult.Text = string.Join(",", visualstates);
        }

void NavigationView_ItemInvoked | ( | NavigationView | sender,
 |  | Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 71 of file NavigationViewPageDataContext.xaml.cs.

        {
            if (_pages != null && _pages.Length == 0)
            {
                return;
            }

            var page = Pages[0];
            var newPages = new List<NavViewPageData>();
            newPages.Add(new NavViewPageData($"Clicked {page.Name}"));
            newPages.AddRange(Pages);

            Pages = newPages.ToArray();
        }

void NavView_SelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 86 of file NavigationViewPageDataContext.xaml.cs.

        {
            var nvi = args.SelectedItem as NavigationViewItem;
            NavViewSelectedDataContext.Text = nvi.DataContext as string ?? "";
        }

void NotifyPropertyChanged ( [CallerMemberName] string propertyName = null ) [inline, private]

Definition at line 27 of file NavigationViewPageDataContext.xaml.cs.

        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

Member Data Documentation

NavViewPageData [] _pages [private]

Definition at line 32 of file NavigationViewPageDataContext.xaml.cs.

Property Documentation

NavViewPageData [] Pages [get, set]

Definition at line 35 of file NavigationViewPageDataContext.xaml.cs.

Event Documentation

PropertyChangedEventHandler PropertyChanged

Definition at line 25 of file NavigationViewPageDataContext.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewPageDataContext.xaml.cs
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewRS3Page Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewRS3Page
Public Member Functions | Private Member Functions

NavigationViewRS3Page Class Reference

Verify ShouldPreserveNavigationViewRS3Behavior. More...

List of all members.

Public Member Functions

NavigationViewRS3Page ()

Private Member Functions

void | ChangeTestFrameVisibility (Visibility visibility)
void | GetToggleButtonRowHeight_Click (object sender, RoutedEventArgs e)
void | GetTopPaddingHeight_Click (object sender, RoutedEventArgs e)
void | OnLoaded (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Checked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Unchecked (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 28 of file NavigationViewRS3Page.xaml.cs.

Constructor & Destructor Documentation

NavigationViewRS3Page ( ) [inline]

Definition at line 30 of file NavigationViewRS3Page.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += OnLoaded;
        }

Member Function Documentation

void ChangeTestFrameVisibility ( Visibility visibility ) [inline, private]

Definition at line 72 of file NavigationViewRS3Page.xaml.cs.

        {
            var testFrame = App.CurrentWindow.Content as TestFrame;
            testFrame.ChangeBarVisibility(visibility);
        }

void GetToggleButtonRowHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file NavigationViewRS3Page.xaml.cs.

        {
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
                TestResult.Text = paneContentGrid.RowDefinitions[1].Height.ToString();
            }
        }

void GetTopPaddingHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 78 of file NavigationViewRS3Page.xaml.cs.

        {
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                Grid paneContentGrid = rootGrid.FindName("TogglePaneTopPadding") as Grid;
                TestResult.Text = paneContentGrid.Height.ToString();
            }
        }

void OnLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file NavigationViewRS3Page.xaml.cs.

        {
            ChangeTestFrameVisibility(Visibility.Collapsed);

            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = true;
            }

            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
            NavView.IsBackEnabled = true;
        }

void TestFrameCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file NavigationViewRS3Page.xaml.cs.

        {
            ChangeTestFrameVisibility(Visibility.Visible);

            if (CoreWindow.GetForCurrentThread() != null)
            {
                // Show titlebar to reenable clicking the buttons in the test frame
                CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
            }
        }

void TestFrameCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 61 of file NavigationViewRS3Page.xaml.cs.

        {
            ChangeTestFrameVisibility(Visibility.Collapsed);

            if (CoreWindow.GetForCurrentThread() != null)
            {
                // Hide titlebar again in case we hid it before
                CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Regression/NavigationViewRS3Page.xaml.cs
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewRS4Page Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewRS4Page
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

NavigationViewRS4Page Class Reference

List of all members.

Public Member Functions

NavigationViewRS4Page ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | AddItemButton_Click (object sender, RoutedEventArgs e)
void | AutoSuggestCheckbox_Checked (object sender, RoutedEventArgs e)
void | AutoSuggestCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackRequestedStateResetButton_Click (object sender, RoutedEventArgs args)
void | ChangeContent_Click (object sender, RoutedEventArgs e)
void | ChangePaneTitle_Click (object sender, RoutedEventArgs e)
void | ClearHeaderButton_Click (object sender, RoutedEventArgs args)
void | ClearMenuButton_Click (object sender, RoutedEventArgs e)
void | ClearSelectedItem_Click (object sender, RoutedEventArgs e)
void | ClosingEventCountResetButton_Click (object sender, RoutedEventArgs e)
void | CompactModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CompactPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CopyGamesLabelButton_Click (object sender, RoutedEventArgs e)
void | CopyVolumeToolTipButton_Click (object sender, RoutedEventArgs e)
void | ExpandedModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | FindAndGiveAutomationNameToVisualChild (string childName)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | HeightCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | MoviesEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | MoviesEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | NavigationViewRS4Page_Loaded (object sender, RoutedEventArgs e)
void | NavView_BackRequested (NavigationView nv, NavigationViewBackRequestedEventArgs args)
void | NavView_DisplayModeChanged (NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
void | NavView_PaneClosed (NavigationView sender, object args)
void | NavView_PaneClosing (NavigationView sender, NavigationViewPaneClosingEventArgs args)
void | NavView_PaneOpened (NavigationView sender, object args)
void | NavView_PaneOpening (NavigationView sender, object args)
void | NavView_SelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs args)
void | OpenPaneButton_Click (object sender, RoutedEventArgs e)
void | OpenPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | RemoveItemButton_Click (object sender, RoutedEventArgs e)
void | ScrambleButton_Click (object sender, RoutedEventArgs e)
void | SelectedItemCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | SelectionFollowFocus_Checked (object sender, RoutedEventArgs e)
void | SelectionFollowFocus_Unchecked (object sender, RoutedEventArgs e)
void | SetHeaderButton_Click (object sender, RoutedEventArgs args)
void | SettingsItemVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | SettingsItemVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Checked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | TestPage_Loaded (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Checked (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | ToggleBackgroundChanged (DependencyObject o, DependencyProperty p)
void | ToggleButtonStyleCheckbox_Checked (object sender, RoutedEventArgs e)
void | ToggleButtonStyleCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | UpdateToggleBackgroundColor (Button toggleButton)
void | WidthCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

int | m_closedEventsFired = 0
int | m_closingEventsFired = 0
int | m_newItemIndex = 0

Detailed Description

Definition at line 17 of file NavigationViewRS4Page.xaml.cs.

Constructor & Destructor Documentation

NavigationViewRS4Page ( ) [inline]

Definition at line 23 of file NavigationViewRS4Page.xaml.cs.

        {
            this.InitializeComponent();

            this.Loaded += NavigationViewRS4Page_Loaded;

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            IntegerItem.Content = 7; // Testing that boxed ints don't cause crashes in tooltips
        }

Member Function Documentation

void AddItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 234 of file NavigationViewRS4Page.xaml.cs.

        {
            var menuItem = new NavigationViewItem();
            menuItem.Content = "New Menu Item " + m_newItemIndex.ToString();
            menuItem.Icon = new SymbolIcon(Symbol.AllApps);
            NavView.MenuItems.Add(menuItem);
            m_newItemIndex++;
        }

void AutoSuggestCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 326 of file NavigationViewRS4Page.xaml.cs.

        {
            // recreate AutoSuggestBox
            var autoSuggestBox = new AutoSuggestBox();
            AutomationProperties.SetName(autoSuggestBox, "PaneAutoSuggestBox");
            NavView.AutoSuggestBox = autoSuggestBox;
        }

void AutoSuggestCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 334 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.AutoSuggestBox = null;
        }

void BackButtonEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 454 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsBackEnabled = true;
        }

void BackButtonEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 459 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsBackEnabled = false;
        }

void BackButtonVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 444 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
        }

void BackButtonVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 449 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
        }

void BackRequestedStateResetButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 479 of file NavigationViewRS4Page.xaml.cs.

        {
            BackRequestedStateTextBlock.Text = "Test reset";
        }

void ChangeContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 92 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.Content = new TextBox();
        }

void ChangePaneTitle_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 412 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.PaneTitle = "";
        }

void ClearHeaderButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 436 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.Header = null;

            var found = Utilities.VisualStateHelper.ContainsVisualState(NavView, "HeaderVisible");
            TestResult.Text = found ? "FoundHeaderContent" : "NoHeaderContent";
        }

void ClearMenuButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 251 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.MenuItems.Clear();
        }

void ClearSelectedItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 489 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.SelectedItem = null;
        }

void ClosingEventCountResetButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 369 of file NavigationViewRS4Page.xaml.cs.

        {
            LastIngEventText.Text = "";
            LastEdEventText.Text = "";
            m_closingEventsFired = 0;
            m_closedEventsFired = 0;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
        }

void CompactModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 97 of file NavigationViewRS4Page.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactModeThresholdWidth = tag;
        }

void CompactPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 176 of file NavigationViewRS4Page.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactPaneLength = tag;
        }

void CopyGamesLabelButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 354 of file NavigationViewRS4Page.xaml.cs.

        {
            var popups = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot);
            if (popups != null && popups.Count > 0)
            {
                Popup popup = popups[0];
                ToolTip toolTip = popup.Child as ToolTip;
                ToolTipStatusTextBlock.Text = toolTip.Content.ToString();
            }
            else
            {
                ToolTipStatusTextBlock.Text = "There are no popups";
            }
        }

void CopyVolumeToolTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 417 of file NavigationViewRS4Page.xaml.cs.

        {
            var contentGrid = FindVisualChildByName(VolumeItem, "ContentGrid") as Grid;
            ToolTip tooltip = ToolTipService.GetToolTip(contentGrid) as ToolTip;
            if (tooltip.Content == null)
            {
                ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is null";
            }
            else
            {
                ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is definitely not null";
            }
        }

void ExpandedModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 103 of file NavigationViewRS4Page.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.ExpandedModeThresholdWidth = tag;
        }

void FindAndGiveAutomationNameToVisualChild ( string childName ) [inline, private]

Definition at line 217 of file NavigationViewRS4Page.xaml.cs.

        {
            DependencyObject obj = FindVisualChildByName(this.NavView, childName);

            if (obj != null)
            {
                AutomationProperties.SetName(obj, childName);
            }
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 484 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void HeaderVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 207 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.AlwaysShowHeader = true;
        }

void HeaderVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 212 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.AlwaysShowHeader = false;
        }

void HeightCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 256 of file NavigationViewRS4Page.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            if (tag == "Default")
            {
                MainGridRow.Height = new GridLength(1, GridUnitType.Star);
            }
            else if (tag == "300")
            {
                MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
            }
        }

void MoviesEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 284 of file NavigationViewRS4Page.xaml.cs.

        {
            MoviesItem.IsEnabled = true;
            TVItem.IsEnabled = true;
        }

void MoviesEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 290 of file NavigationViewRS4Page.xaml.cs.

        {
            MoviesItem.IsEnabled = false;
            TVItem.IsEnabled = false;
        }

void NavigationViewRS4Page_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file NavigationViewRS4Page.xaml.cs.

        {
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
                if (paneContentGrid != null)
                {
                    Button toggleButton = paneContentGrid.FindName("TogglePaneButton") as Button;
                    if (toggleButton != null)
                    {
                        toggleButton.RegisterPropertyChangedCallback(Button.BackgroundProperty, new DependencyPropertyChangedCallback(ToggleBackgroundChanged));
                        UpdateToggleBackgroundColor(toggleButton);
                    }
                }
            }

            SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
            PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
            HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;

            NavView.SelectedItem = HomeItem;

            FindAndGiveAutomationNameToVisualChild("NavigationViewBackButton");
        }

void NavView_BackRequested | ( | NavigationView | nv,
 |  | NavigationViewBackRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 474 of file NavigationViewRS4Page.xaml.cs.

        {
            BackRequestedStateTextBlock.Text = "Back was requested";
        }

void NavView_DisplayModeChanged | ( | NavigationView | sender,
 |  | NavigationViewDisplayModeChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 188 of file NavigationViewRS4Page.xaml.cs.

        {
            switch (args.DisplayMode)
            {
                case NavigationViewDisplayMode.Minimal:
                    DisplayModeTextBox.Text = "Minimal";
                    DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DodgerBlue);
                    break;
                case NavigationViewDisplayMode.Compact:
                    DisplayModeTextBox.Text = "Compact";
                    DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkMagenta);
                    break;
                case NavigationViewDisplayMode.Expanded:
                    DisplayModeTextBox.Text = "Expanded";
                    DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkRed);
                    break;
            }
        }

void NavView_PaneClosed | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 392 of file NavigationViewRS4Page.xaml.cs.

        {
            LastEdEventText.Text = "PaneClosed event fired";

            m_closedEventsFired++;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
            PaneOpenedOrClosedEvent.Text = "Closed";
        }

void NavView_PaneClosing | ( | NavigationView | sender,
 |  | NavigationViewPaneClosingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 378 of file NavigationViewRS4Page.xaml.cs.

        {
            if (CancelClosingEvents != null && (bool)CancelClosingEvents.IsChecked)
            {
                args.Cancel = true;
            }

            LastIngEventText.Text = "PaneClosing event fired";

            m_closingEventsFired++;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;

        }

void NavView_PaneOpened | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 406 of file NavigationViewRS4Page.xaml.cs.

        {
            LastEdEventText.Text = "PaneOpened event fired";
            PaneOpenedOrClosedEvent.Text = "Opened";
        }

void NavView_PaneOpening | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 401 of file NavigationViewRS4Page.xaml.cs.

        {
            LastIngEventText.Text = "PaneOpening event fired";
        }

void NavView_SelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 269 of file NavigationViewRS4Page.xaml.cs.

        {
            if (args.SelectedItem != null)
            {
                var itemdata = args.SelectedItem as NavigationViewItem;
                if (itemdata != null)
                {
                    if (itemdata.Content != null)
                    {
                        NavView.Header = itemdata.Content + " as header";
                    }
                }
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 35 of file NavigationViewRS4Page.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            base.OnNavigatedFrom(e);
        }

void OpenPaneButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 87 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsPaneOpen = true;
        }

void OpenPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 182 of file NavigationViewRS4Page.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.OpenPaneLength = tag;
        }

void PaneToggleButtonVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 156 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = true;
        }

void PaneToggleButtonVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 161 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = false;
        }

void RemoveItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 243 of file NavigationViewRS4Page.xaml.cs.

        {
            if (NavView.MenuItems.Count > 0)
            {
                NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
            }
        }

void ScrambleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 339 of file NavigationViewRS4Page.xaml.cs.

        {
            foreach (var entry in NavView.MenuItems)
            {
                NavigationViewItem item = entry as NavigationViewItem;

                if (item != null)
                {
                    char[] newTitle = item.Content.ToString().ToCharArray();
                    Array.Reverse(newTitle);
                    item.Content = new string(newTitle);
                }
            }
        }

void SelectedItemCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 113 of file NavigationViewRS4Page.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            if (tag == "Home")
            {
                NavView.SelectedItem = HomeItem;
            }
            else if (tag == "Apps")
            {
                AppsItem.IsSelected = true;
            }
            else if (tag == "Games")
            {
                NavView.SelectedItem = GamesItem;
            }
            else if (tag == "Music")
            {
                NavView.SelectedItem = MusicItem;
            }
            else if (tag == "Movies")
            {
                NavView.SelectedItem = MoviesItem;
            }
            else if (tag == "TV")
            {
                NavView.SelectedItem = TVItem;
            }
            else if (tag == "Settings")
            {
                NavView.SelectedItem = NavView.SettingsItem;
            }
        }

void SelectionFollowFocus_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 464 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
        }

void SelectionFollowFocus_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 469 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
        }

void SetHeaderButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 431 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.Header = new TextBlock() { Text = "Bananas" };
        }

void SettingsItemVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 146 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsSettingsVisible = true;
        }

void SettingsItemVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 151 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.IsSettingsVisible = false;
        }

void TestFrameCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 314 of file NavigationViewRS4Page.xaml.cs.

        {
            var testFrame = App.CurrentWindow.Content as TestFrame;
            testFrame.ChangeBarVisibility(Visibility.Visible);
        }

void TestFrameCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 320 of file NavigationViewRS4Page.xaml.cs.

        {
            var testFrame = App.CurrentWindow.Content as TestFrame;
            testFrame.ChangeBarVisibility(Visibility.Collapsed);
        }

void TestPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 109 of file NavigationViewRS4Page.xaml.cs.

        {
        }

void TitleBarCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 296 of file NavigationViewRS4Page.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = false;
            }
        }

void TitleBarCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 305 of file NavigationViewRS4Page.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = true;
            }
        }

void ToggleBackgroundChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 70 of file NavigationViewRS4Page.xaml.cs.

        {
            UpdateToggleBackgroundColor(o as Button);
        }

void ToggleButtonStyleCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.PaneToggleButtonStyle = this.Resources["AlternateToggleButtonStyle"] as Style;
        }

void ToggleButtonStyleCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 171 of file NavigationViewRS4Page.xaml.cs.

        {
            NavView.PaneToggleButtonStyle = Application.Current.Resources["PaneToggleButtonStyle"] as Style;
        }

void UpdateToggleBackgroundColor ( Button toggleButton ) [inline, private]

Definition at line 75 of file NavigationViewRS4Page.xaml.cs.

        {
            if (toggleButton.Background != null && toggleButton.Background is SolidColorBrush)
            {
                ToggleButtonBackgroundColor.Text = (toggleButton.Background as SolidColorBrush).Color.ToString();
            }
            else
            {
                ToggleButtonBackgroundColor.Text = String.Empty;
            }
        }

void WidthCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 228 of file NavigationViewRS4Page.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.Width = tag;
        }

Member Data Documentation

int m_closedEventsFired = 0 [private]

Definition at line 21 of file NavigationViewRS4Page.xaml.cs.

int m_closingEventsFired = 0 [private]

Definition at line 20 of file NavigationViewRS4Page.xaml.cs.

int m_newItemIndex = 0 [private]

Definition at line 19 of file NavigationViewRS4Page.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Regression/NavigationViewRS4Page.xaml.cs
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewSelectedItemEdgeCasePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewSelectedItemEdgeCasePage
Public Member Functions | Private Member Functions

NavigationViewSelectedItemEdgeCasePage Class Reference

List of all members.

Public Member Functions

NavigationViewSelectedItemEdgeCasePage ()

Private Member Functions

void | Button_click (object sender, RoutedEventArgs e)
void | CopyIsSelected_Click (object sender, RoutedEventArgs e)
void | Movies_Click (object sender, RoutedEventArgs e)
void | Movies_Click2 (object sender, RoutedEventArgs e)
void | NavView_SelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs args)
void | TV_Click (object sender, RoutedEventArgs e)
void | TV_Click2 (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 24 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewSelectedItemEdgeCasePage ( ) [inline]

Definition at line 26 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {
            this.InitializeComponent();

            NavView.SelectedItem = NavView.MenuItems[1];
        }

Member Function Documentation

void Button_click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {
            var menuItem = new NavigationViewItem();
            menuItem.Content = "New Menu Item Ay";
            menuItem.Icon = new SymbolIcon(Symbol.AllApps);
            NavView.MenuItems.Add(menuItem);
        }

void CopyIsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 65 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {
            StatusTextBlock.Text = MoviesItem.IsSelected + " " + TVItem.IsSelected;
        }

void Movies_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {
            NavView.SelectedItem = MoviesItem;
        }

void Movies_Click2 | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {
            MoviesItem.IsSelected = true;
        }

void NavView_SelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 33 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {

        }

void TV_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {
            NavView.SelectedItem = TVItem;
        }

void TV_Click2 | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 60 of file NavigationViewSelectedItemEdgeCasePage.xaml.cs.

        {
            TVItem.IsSelected = true;
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewSelectedItemEdgeCasePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewStretchPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewStretchPage
Public Member Functions

NavigationViewStretchPage Class Reference

List of all members.

Public Member Functions

NavigationViewStretchPage ()

Detailed Description

Definition at line 6 of file NavigationViewStretchPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewStretchPage ( ) [inline]

Definition at line 8 of file NavigationViewStretchPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewStretchPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTopNavOnlyPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewTopNavOnlyPage
Public Member Functions | Private Member Functions | Private Attributes

NavigationViewTopNavOnlyPage Class Reference

List of all members.

Public Member Functions

NavigationViewTopNavOnlyPage ()

Private Member Functions

void | AddLongNavItem_Click (object sender, RoutedEventArgs e)
void | AddRemoveContentOverlay_Click (object sender, RoutedEventArgs e)
void | AddTenItems_Click (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | ChangeDataSource_Click (object sender, RoutedEventArgs e)
void | ChangeGamesContent_Click (object sender, RoutedEventArgs e)
void | ChangeOverflowLabelVisibility_Checked (object sender, RoutedEventArgs e)
void | ChangeOverflowLabelVisibility_Unchecked (object sender, RoutedEventArgs e)
void | ChangeTopNavVisibility_Click (object sender, RoutedEventArgs e)
void | ClearNavItemContent_Click (object sender, RoutedEventArgs e)
void | ExpectNullSelectedItemInItemInvoke_Click (object sender, RoutedEventArgs e)
void | FlipExtendViewIntoTitleBar_Click (object sender, RoutedEventArgs e)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | GetActiveVisualState_Click (object sender, RoutedEventArgs e)
string | GetAndVerifyTheContainer (object content, NavigationViewItem container)
void | NavInvalidateMeasure_Click (object sender, RoutedEventArgs e)
void | NavView_ItemInvoked (NavigationView sender, NavigationViewItemInvokedEventArgs e)
void | NavView_SelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs e)
void | PaneDisplayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
string | RecommendedNavigationTransitionInfoToString (NavigationTransitionInfo info)
void | ResetResult_Click (object sender, RoutedEventArgs e)
void | SelectionFollowsFocusSetter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | SetInvalidSelectedItem_Click (object sender, RoutedEventArgs e)
void | ShoulderNavigationEnabledSetter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | TestFrameCheckbox_Checked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | UpdateAppTitle ()

Private Attributes

TextBlock | contentOverlay = null
bool | m_expectNullSelectedItemInNextInvoke = false
int | m_numberOfItemAdded = 0

Detailed Description

Definition at line 20 of file NavigationViewTopNavOnlyPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewTopNavOnlyPage ( ) [inline]

Definition at line 26 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            this.InitializeComponent();

            UpdateTestFrameVisibility(Visibility.Visible);

            NavView.ItemInvoked += NavView_ItemInvoked;
            NavView.SelectionChanged += NavView_SelectionChanged;

            if (CoreWindow.GetForCurrentThread() != null)
            {
                var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
                coreTitleBar.LayoutMetricsChanged += (s, e) => UpdateAppTitle();

                //remove the solid-colored backgrounds behind the caption controls and system back button
                var viewTitleBar = ApplicationView.GetForCurrentView().TitleBar;
                viewTitleBar.ButtonBackgroundColor = Microsoft.UI.Colors.Transparent;
                viewTitleBar.ButtonInactiveBackgroundColor = Microsoft.UI.Colors.Transparent;
                viewTitleBar.ButtonForegroundColor = (Color)Resources["SystemBaseHighColor"];
            }

            Loaded += (s, e) => XamlRoot.Changed += (s, e) => UpdateAppTitle();
        }

Member Function Documentation

void AddLongNavItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 208 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            var content = "Bill".PadRight(100, '.') + "Gates";
            NavView.MenuItems.Add(new NavigationViewItem(){ Content = content });
        }

void AddRemoveContentOverlay_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 277 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            contentOverlay = (contentOverlay == null ? new TextBlock() { Text = "CONTENT OVERLAY" } : null);
            NavView.ContentOverlay = contentOverlay;
        }

void AddTenItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 214 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            var menuItems = NavView.MenuItems;
            for (int i = 0; i < 10; i++)
            {
                m_numberOfItemAdded++;
                var item = new NavigationViewItem() { Content = "Added Item " + m_numberOfItemAdded };
                menuItems.Add(item);
            }
        }

void BackButtonVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
        }

void BackButtonVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 138 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
        }

void ChangeDataSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 71 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.MenuItems.Clear();
            NavView.MenuItems.Add(new NavigationViewItem { Content = "First Item" });
            NavView.MenuItems.Add(new NavigationViewItem { Content = "Second Item" });
            NavView.MenuItems.Add(new NavigationViewItem { Content = "Happy birthday Item" });
            NavView.MenuItems.Add(new NavigationViewItem { Content = "Happy new year Item" });
            NavView.MenuItems.Add(new NavigationViewItem { Content = "OK Item" });
            NavView.SelectedItem = NavView.MenuItems[3];
        }

void ChangeGamesContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 179 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            GamesItem.Content = "Games AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
        }

void ChangeOverflowLabelVisibility_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 263 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.OverflowLabelMode = NavigationViewOverflowLabelMode.MoreLabel;
        }

void ChangeOverflowLabelVisibility_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 268 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.OverflowLabelMode = NavigationViewOverflowLabelMode.NoLabel;
        }

void ChangeTopNavVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 283 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.IsPaneVisible = !NavView.IsPaneVisible;
        }

void ClearNavItemContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 189 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            for (int i= NavView.MenuItems.Count-1; i>=0; i--)
            {
                var item = NavView.MenuItems[i];
                var container = item  as NavigationViewItem;
                if (container != null)
                {
                    container.Content = null;
                }

                var navHeader = item as NavigationViewItemHeader;
                if (navHeader != null)
                {
                    navHeader.Content = null;
                }
            }
        }

void ExpectNullSelectedItemInItemInvoke_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 224 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            m_expectNullSelectedItemInNextInvoke = true;
        }

void FlipExtendViewIntoTitleBar_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 229 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
                coreTitleBar.ExtendViewIntoTitleBar = !coreTitleBar.ExtendViewIntoTitleBar;
            }
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 58 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void GetActiveVisualState_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 272 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            TestResult.Text = Utilities.VisualStateHelper.GetCurrentVisualStateNameString(NavView);
        }

string GetAndVerifyTheContainer | ( | object | content,
 |  | NavigationViewItem | container |
 | ) |  |  | [inline, private]

Definition at line 84 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            if (content == null)
            {
                if (container.Content != null)
                {
                    return "container's content should be null but it is " + container.Content.ToString();
                }

                return container.Tag != null ? container.Tag.ToString(): "container should have tag property since content is null";
            }

            var contentString = content.ToString();
            var containerString = container.Content.ToString();

            if (contentString.Equals(containerString))
            {
                return contentString;
            }
            else
            {
                return string.Format("container's content:{0} doesn't match with content:{1}", containerString, contentString);
            }
        }

void NavInvalidateMeasure_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 184 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.InvalidateMeasure();
        }

void NavView_ItemInvoked | ( | NavigationView | sender,
 |  | NavigationViewItemInvokedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            var container = (e.InvokedItemContainer as NavigationViewItem);
            ItemInvokedResult.Text = GetAndVerifyTheContainer(e.InvokedItem, container);
            InvokeRecommendedTransition.Text = RecommendedNavigationTransitionInfoToString(e.RecommendedNavigationTransitionInfo);

            if (m_expectNullSelectedItemInNextInvoke)
            {
                NavView.SelectedItem = null;
                m_expectNullSelectedItemInNextInvoke = false;
            }
        }

void NavView_SelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 143 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            var container = (e.SelectedItemContainer as NavigationViewItem);

            if (container != null && !e.IsSettingsSelected && !container.IsSelected)
            {
                SelectionChangedResult.Text = "Error, NavigationViewItem.IsSelected should be true before raise SelectionChanged event";
            }
            else
            {
                if (e.SelectedItem is NavigationViewItem item)
                {
                    SelectionChangedResult.Text = GetAndVerifyTheContainer(item.Content, container);
                }
                else
                {
                    SelectionChangedResult.Text = "Null";
                }
            }

            SelectionChangeRecommendedTransition.Text = RecommendedNavigationTransitionInfoToString(e.RecommendedNavigationTransitionInfo);
        }

void PaneDisplayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 51 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
            NavView.PaneDisplayMode = mode;
        }

string RecommendedNavigationTransitionInfoToString ( NavigationTransitionInfo info ) [inline, private]

Definition at line 109 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            if ((info as EntranceNavigationTransitionInfo) != null)
            {
                return "Default";
            }
            var slideNav = (info as SlideNavigationTransitionInfo);
            if (slideNav != null)
            {
                try
                {
                    return slideNav.Effect.ToString();
                }
                catch (InvalidCastException)
                {
                    return "You are running on old RS5 machine which doesn't support ISlideNavigationTransitionInfo2 yet";
                }
            }
            else
            {
                return "Error";
            }
        }

void ResetResult_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            ItemInvokedResult.Text = "";
            SelectionChangedResult.Text = "";
            SelectionChangeRecommendedTransition.Text = "";
            InvokeRecommendedTransition.Text = "";
        }

void SelectionFollowsFocusSetter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 310 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            string selectedItem = (e.AddedItems[0] as ComboBoxItem).Content as string;

            if(selectedItem == "Enabled")
            {
                NavView.SelectionFollowsFocus = Microsoft.UI.Xaml.Controls.NavigationViewSelectionFollowsFocus.Enabled;
            }
            else
            {
                NavView.SelectionFollowsFocus = Microsoft.UI.Xaml.Controls.NavigationViewSelectionFollowsFocus.Disabled;

            }
        }

void SetInvalidSelectedItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 288 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            NavView.SelectedItem = new CheckBox();
        }

void ShoulderNavigationEnabledSetter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 293 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            string selectedItem = (e.AddedItems[0] as ComboBoxItem).Content as string;

            switch (selectedItem)
            {
                case "Always":
                    NavView.ShoulderNavigationEnabled = Microsoft.UI.Xaml.Controls.NavigationViewShoulderNavigationEnabled.Always;
                    break;
                case "WhenSelectionFollowsFocus":
                    NavView.ShoulderNavigationEnabled = Microsoft.UI.Xaml.Controls.NavigationViewShoulderNavigationEnabled.WhenSelectionFollowsFocus;
                    break;
                case "Never":
                    NavView.ShoulderNavigationEnabled = Microsoft.UI.Xaml.Controls.NavigationViewShoulderNavigationEnabled.Never;
                    break;
            }
        }

void TestFrameCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 254 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Visible);
        }

void TestFrameCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 259 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Collapsed);
        }

void UpdateAppTitle ( ) [inline, private]

Definition at line 238 of file NavigationViewTopNavOnlyPage.xaml.cs.

        {
            var full = false;

            if (CoreWindow.GetForCurrentThread() != null)
            {
                full = ApplicationView.GetForCurrentView().IsFullScreenMode;
                var left = 12 + (full ? 0 : CoreApplication.GetCurrentView().TitleBar.SystemOverlayLeftInset);
                AppTitle.Margin = new Thickness(left, 8, 0, 0);
            }
            else
            {
                AppTitle.Margin = new Thickness(12, 8, 0, 0);
            }
        }

Member Data Documentation

TextBlock contentOverlay = null [private]

Definition at line 23 of file NavigationViewTopNavOnlyPage.xaml.cs.

bool m_expectNullSelectedItemInNextInvoke = false [private]

Definition at line 24 of file NavigationViewTopNavOnlyPage.xaml.cs.

int m_numberOfItemAdded = 0 [private]

Definition at line 22 of file NavigationViewTopNavOnlyPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/TopMode/NavigationViewTopNavOnlyPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTopNavOverflowButtonPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewTopNavOverflowButtonPage
Public Member Functions | Private Member Functions

NavigationViewTopNavOverflowButtonPage Class Reference

List of all members.

Public Member Functions

NavigationViewTopNavOverflowButtonPage ()

Private Member Functions

void | AddItem4Button_Click (object sender, RoutedEventArgs e)
void | RemoveFirstItemButton_Click (object sender, RoutedEventArgs e)
void | RemoveLastItemButton_Click (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 10 of file NavigationViewTopNavOverflowButtonPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewTopNavOverflowButtonPage ( ) [inline]

Definition at line 12 of file NavigationViewTopNavOverflowButtonPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void AddItem4Button_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 17 of file NavigationViewTopNavOverflowButtonPage.xaml.cs.

        {
            var menuItem = new NavigationViewItem
            {
                Content = $"Menu Item 4",
            };

            this.NavView.MenuItems.Add(menuItem);
        }

void RemoveFirstItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 27 of file NavigationViewTopNavOverflowButtonPage.xaml.cs.

        {
            if (NavView.MenuItems.Count > 0)
            {
                NavView.MenuItems.RemoveAt(0);
            }
        }

void RemoveLastItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 35 of file NavigationViewTopNavOverflowButtonPage.xaml.cs.

        {
            if (NavView.MenuItems.Count > 0)
            {
                NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
            }
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/TopMode/NavigationViewTopNavOverflowButtonPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTopNavPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewTopNavPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

NavigationViewTopNavPage Class Reference

List of all members.

Public Member Functions

NavigationViewTopNavPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | AddFooterItemButton_Click (object sender, RoutedEventArgs e)
void | AddItemButton_Click (object sender, RoutedEventArgs e)
void | AutoSuggestCheckbox_Checked (object sender, RoutedEventArgs e)
void | AutoSuggestCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | BackButtonVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | BackRequestedStateResetButton_Click (object sender, RoutedEventArgs args)
void | ChangeContent_Click (object sender, RoutedEventArgs e)
void | ChangePaneTitle_Click (object sender, RoutedEventArgs e)
void | ClearMenuButton_Click (object sender, RoutedEventArgs e)
void | ClearSelectedItem_Click (object sender, RoutedEventArgs e)
void | ClosingEventCountResetButton_Click (object sender, RoutedEventArgs e)
void | CompactModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CompactPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CopyGamesLabelButton_Click (object sender, RoutedEventArgs e)
void | CopyVolumeToolTipButton_Click (object sender, RoutedEventArgs e)
void | ExpandedModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | FindAndGiveAutomationNameToVisualChild (string childName)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | GetOverflowMenuCornerRadiusButton_Click (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | HeaderVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | HeightCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | MoviesEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | MoviesEnabledCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | NavigationViewTopNavPage_Loaded (object sender, RoutedEventArgs e)
void | NavView_BackRequested (NavigationView nv, NavigationViewBackRequestedEventArgs args)
void | NavView_DisplayModeChanged (NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
void | NavView_PaneClosed (NavigationView sender, object args)
void | NavView_PaneClosing (NavigationView sender, NavigationViewPaneClosingEventArgs args)
void | NavView_PaneOpened (NavigationView sender, object args)
void | NavView_PaneOpening (NavigationView sender, object args)
void | NavView_SelectionChanged (NavigationView sender, NavigationViewSelectionChangedEventArgs args)
void | OpenPaneButton_Click (object sender, RoutedEventArgs e)
void | OpenPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Checked (object sender, RoutedEventArgs e)
void | PaneToggleButtonVisiblityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | RemoveFooterItemButton_Click (object sender, RoutedEventArgs e)
void | RemoveItemButton_Click (object sender, RoutedEventArgs e)
void | ScrambleButton_Click (object sender, RoutedEventArgs e)
void | SelectedItemCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | SelectionFollowFocus_Checked (object sender, RoutedEventArgs e)
void | SelectionFollowFocus_Unchecked (object sender, RoutedEventArgs e)
void | SetHeaderButton_Click (object sender, RoutedEventArgs args)
void | SettingsItemVisibilityCheckbox_Checked (object sender, RoutedEventArgs e)
void | SettingsItemVisibilityCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Checked (object sender, RoutedEventArgs e)
void | TestFrameCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | TestPage_Loaded (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Checked (object sender, RoutedEventArgs e)
void | TitleBarCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | ToggleBackgroundChanged (DependencyObject o, DependencyProperty p)
void | ToggleButtonStyleCheckbox_Checked (object sender, RoutedEventArgs e)
void | ToggleButtonStyleCheckbox_Unchecked (object sender, RoutedEventArgs e)
void | UpdateToggleBackgroundColor (Button toggleButton)
void | WidthCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

int | m_closedEventsFired = 0
int | m_closingEventsFired = 0
bool | m_initializeComponentComplete = false
int | m_newFooterItemIndex = 0
int | m_newItemIndex = 0

Detailed Description

Definition at line 18 of file NavigationViewTopNavPage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewTopNavPage ( ) [inline]

Definition at line 25 of file NavigationViewTopNavPage.xaml.cs.

        {
            this.InitializeComponent();
            m_initializeComponentComplete = true;

            this.Loaded += NavigationViewTopNavPage_Loaded;

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            IntegerItem.Content = 7; // Testing that boxed ints don't cause crashes in tooltips
        }

Member Function Documentation

void AddFooterItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 257 of file NavigationViewTopNavPage.xaml.cs.

        {
            var menuItem = new NavigationViewItem();
            menuItem.Content = "New Footer Menu Item " + m_newFooterItemIndex.ToString();
            menuItem.Icon = new SymbolIcon(Symbol.AllApps);
            NavView.FooterMenuItems.Add(menuItem);
            m_newFooterItemIndex++;
        }

void AddItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 240 of file NavigationViewTopNavPage.xaml.cs.

        {
            var menuItem = new NavigationViewItem();
            menuItem.Content = "New Menu Item " + m_newItemIndex.ToString();
            menuItem.Icon = new SymbolIcon(Symbol.AllApps);
            NavView.MenuItems.Add(menuItem);
            m_newItemIndex++;
        }

void AutoSuggestCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 351 of file NavigationViewTopNavPage.xaml.cs.

        {
            // recreate AutoSuggestBox
            var autoSuggestBox = new AutoSuggestBox();
            AutomationProperties.SetName(autoSuggestBox, "PaneAutoSuggestBox");
            NavView.AutoSuggestBox = autoSuggestBox;
        }

void AutoSuggestCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 359 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.AutoSuggestBox = null;
        }

void BackButtonEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 471 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsBackEnabled = true;
        }

void BackButtonEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 476 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsBackEnabled = false;
        }

void BackButtonVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 461 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
        }

void BackButtonVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 466 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
        }

void BackRequestedStateResetButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 496 of file NavigationViewTopNavPage.xaml.cs.

        {
            BackRequestedStateTextBlock.Text = "Test reset";
        }

void ChangeContent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.Content = new TextBox();
        }

void ChangePaneTitle_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 437 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.PaneTitle = "";
        }

void ClearMenuButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 274 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.MenuItems.Clear();
        }

void ClearSelectedItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 506 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.SelectedItem = null;
        }

void ClosingEventCountResetButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 394 of file NavigationViewTopNavPage.xaml.cs.

        {
            LastIngEventText.Text = "";
            LastEdEventText.Text = "";
            m_closingEventsFired = 0;
            m_closedEventsFired = 0;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
        }

void CompactModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file NavigationViewTopNavPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactModeThresholdWidth = tag;
        }

void CompactPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 180 of file NavigationViewTopNavPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactPaneLength = tag;
        }

void CopyGamesLabelButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 379 of file NavigationViewTopNavPage.xaml.cs.

        {
            var popups = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot);
            if (popups != null && popups.Count > 0)
            {
                Popup popup = popups[0];
                ToolTip toolTip = popup.Child as ToolTip;
                ToolTipStatusTextBlock.Text = toolTip.Content.ToString();
            }
            else
            {
                ToolTipStatusTextBlock.Text = "There are no popups";
            }
        }

void CopyVolumeToolTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 442 of file NavigationViewTopNavPage.xaml.cs.

        {
            var contentGrid = FindVisualChildByName(VolumeItem, "ContentGrid") as Grid;
            ToolTip tooltip = ToolTipService.GetToolTip(contentGrid) as ToolTip;
            if (tooltip == null || tooltip.Content == null)
            {
                ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is null";
            }
            else
            {
                ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is definitely not null";
            }
        }

void ExpandedModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 107 of file NavigationViewTopNavPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.ExpandedModeThresholdWidth = tag;
        }

void FindAndGiveAutomationNameToVisualChild ( string childName ) [inline, private]

Definition at line 224 of file NavigationViewTopNavPage.xaml.cs.

        {
            DependencyObject obj = FindVisualChildByName(this.NavView, childName);

            if (obj != null)
            {
                AutomationProperties.SetName(obj, childName);
            }
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 501 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void GetOverflowMenuCornerRadiusButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 511 of file NavigationViewTopNavPage.xaml.cs.

        {
            var lastMenuItem = NavView.MenuItems[NavView.MenuItems.Count - 1] as NavigationViewItem;
            var parent = lastMenuItem.FindVisualParentByType<FlyoutPresenter>();
            if (parent is FlyoutPresenter flyoutPresenter)
            {
                var contentPresenter = flyoutPresenter.FindVisualChildByName("ContentPresenter") as ContentPresenter;
                OverflowMenuCornerRadiusTextBlock.Text = contentPresenter?.CornerRadius.ToString() ?? "Internal ContentPresenter not found";
            }
        }

void HeaderVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 214 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.AlwaysShowHeader = true;
        }

void HeaderVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 219 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.AlwaysShowHeader = false;
        }

void HeightCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 279 of file NavigationViewTopNavPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            if (tag == "Default")
            {
                MainGridRow.Height = new GridLength(1, GridUnitType.Star);
            }
            else if (tag == "300")
            {
                MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
            }
        }

void MoviesEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 311 of file NavigationViewTopNavPage.xaml.cs.

        {
            MoviesItem.IsEnabled = true;
            TVItem.IsEnabled = true;
        }

void MoviesEnabledCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 317 of file NavigationViewTopNavPage.xaml.cs.

        {
            MoviesItem.IsEnabled = false;
            TVItem.IsEnabled = false;
        }

void NavigationViewTopNavPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 47 of file NavigationViewTopNavPage.xaml.cs.

        {
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
                if (paneContentGrid != null)
                {
                    Button toggleButton = paneContentGrid.FindName("TogglePaneButton") as Button;
                    if (toggleButton != null)
                    {
                        toggleButton.RegisterPropertyChangedCallback(Button.BackgroundProperty, new DependencyPropertyChangedCallback(ToggleBackgroundChanged));
                        UpdateToggleBackgroundColor(toggleButton);
                    }
                }
            }

            SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
            PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
            HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;

            NavView.SelectedItem = HomeItem;

            FindAndGiveAutomationNameToVisualChild("NavigationViewBackButton");
            FindAndGiveAutomationNameToVisualChild("SettingsTopNavPaneItem");
        }

void NavView_BackRequested | ( | NavigationView | nv,
 |  | NavigationViewBackRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 491 of file NavigationViewTopNavPage.xaml.cs.

        {
            BackRequestedStateTextBlock.Text = "Back was requested";
        }

void NavView_DisplayModeChanged | ( | NavigationView | sender,
 |  | NavigationViewDisplayModeChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 192 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (m_initializeComponentComplete)
            {
                switch (args.DisplayMode)
                {
                    case NavigationViewDisplayMode.Minimal:
                        DisplayModeTextBox.Text = "Minimal";
                        DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DodgerBlue);
                        break;
                    case NavigationViewDisplayMode.Compact:
                        DisplayModeTextBox.Text = "Compact";
                        DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkMagenta);
                        break;
                    case NavigationViewDisplayMode.Expanded:
                        DisplayModeTextBox.Text = "Expanded";
                        DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkRed);
                        break;
                }
            }
        }

void NavView_PaneClosed | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 417 of file NavigationViewTopNavPage.xaml.cs.

        {
            LastEdEventText.Text = "PaneClosed event fired";

            m_closedEventsFired++;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
            PaneOpenedOrClosedEvent.Text = "Closed";
        }

void NavView_PaneClosing | ( | NavigationView | sender,
 |  | NavigationViewPaneClosingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 403 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (CancelClosingEvents != null && (bool)CancelClosingEvents.IsChecked)
            {
                args.Cancel = true;
            }

            LastIngEventText.Text = "PaneClosing event fired";

            m_closingEventsFired++;
            ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;

        }

void NavView_PaneOpened | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 431 of file NavigationViewTopNavPage.xaml.cs.

        {
            LastEdEventText.Text = "PaneOpened event fired";
            PaneOpenedOrClosedEvent.Text = "Opened";
        }

void NavView_PaneOpening | ( | NavigationView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 426 of file NavigationViewTopNavPage.xaml.cs.

        {
            LastIngEventText.Text = "PaneOpening event fired";
        }

void NavView_SelectionChanged | ( | NavigationView | sender,
 |  | NavigationViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 292 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (args.SelectedItem != null)
            {
                var itemdata = args.SelectedItem as NavigationViewItem;
                if (itemdata != null)
                {
                    if (itemdata.Content != null)
                    {
                        NavView.Header = itemdata.Content + " as header";
                    }
                    else if (args.IsSettingsSelected) // to handle settings without content case in top nav
                    {
                        NavView.Header = "Settings as header";
                    }
                }
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 38 of file NavigationViewTopNavPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            base.OnNavigatedFrom(e);
        }

void OpenPaneButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsPaneOpen = true;
        }

void OpenPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 186 of file NavigationViewTopNavPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.OpenPaneLength = tag;
        }

void PaneToggleButtonVisiblityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 160 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = true;
        }

void PaneToggleButtonVisiblityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 165 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsPaneToggleButtonVisible = false;
        }

void RemoveFooterItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 266 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (NavView.FooterMenuItems.Count > 0)
            {
                NavView.FooterMenuItems.RemoveAt(NavView.FooterMenuItems.Count - 1);
            }
        }

void RemoveItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 249 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (NavView.MenuItems.Count > 0)
            {
                NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
            }
        }

void ScrambleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 364 of file NavigationViewTopNavPage.xaml.cs.

        {
            foreach (var entry in NavView.MenuItems)
            {
                NavigationViewItem item = entry as NavigationViewItem;

                if (item != null)
                {
                    char[] newTitle = item.Content.ToString().ToCharArray();
                    Array.Reverse(newTitle);
                    item.Content = new string(newTitle);
                }
            }
        }

void SelectedItemCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file NavigationViewTopNavPage.xaml.cs.

        {
            var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            if (tag == "Home")
            {
                NavView.SelectedItem = HomeItem;
            }
            else if (tag == "Apps")
            {
                AppsItem.IsSelected = true;
            }
            else if (tag == "Games")
            {
                NavView.SelectedItem = GamesItem;
            }
            else if (tag == "Music")
            {
                NavView.SelectedItem = MusicItem;
            }
            else if (tag == "Movies")
            {
                NavView.SelectedItem = MoviesItem;
            }
            else if (tag == "TV")
            {
                NavView.SelectedItem = TVItem;
            }
            else if (tag == "Settings")
            {
                NavView.SelectedItem = NavView.SettingsItem;
            }
        }

void SelectionFollowFocus_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 481 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
        }

void SelectionFollowFocus_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 486 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
        }

void SetHeaderButton_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 456 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.Header = new TextBlock() { Text = "Bananas" };
        }

void SettingsItemVisibilityCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 150 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsSettingsVisible = true;
        }

void SettingsItemVisibilityCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 155 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.IsSettingsVisible = false;
        }

void TestFrameCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 341 of file NavigationViewTopNavPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Visible);
        }

void TestFrameCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 346 of file NavigationViewTopNavPage.xaml.cs.

        {
            UpdateTestFrameVisibility(Visibility.Collapsed);
        }

void TestPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 113 of file NavigationViewTopNavPage.xaml.cs.

        {
        }

void TitleBarCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 323 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = false;
            }
        }

void TitleBarCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 332 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
                titleBar.ExtendViewIntoTitleBar = true;
            }
        }

void ToggleBackgroundChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 74 of file NavigationViewTopNavPage.xaml.cs.

        {
            UpdateToggleBackgroundColor(o as Button);
        }

void ToggleButtonStyleCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 170 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.PaneToggleButtonStyle = this.Resources["AlternateToggleButtonStyle"] as Style;
        }

void ToggleButtonStyleCheckbox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 175 of file NavigationViewTopNavPage.xaml.cs.

        {
            NavView.PaneToggleButtonStyle = Application.Current.Resources["PaneToggleButtonStyle"] as Style;
        }

void UpdateToggleBackgroundColor ( Button toggleButton ) [inline, private]

Definition at line 79 of file NavigationViewTopNavPage.xaml.cs.

        {
            if (toggleButton.Background != null && toggleButton.Background is SolidColorBrush)
            {
                ToggleButtonBackgroundColor.Text = (toggleButton.Background as SolidColorBrush).Color.ToString();
            }
            else
            {
                ToggleButtonBackgroundColor.Text = String.Empty;
            }
        }

void WidthCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 234 of file NavigationViewTopNavPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.Width = tag;
        }

Member Data Documentation

int m_closedEventsFired = 0 [private]

Definition at line 23 of file NavigationViewTopNavPage.xaml.cs.

int m_closingEventsFired = 0 [private]

Definition at line 22 of file NavigationViewTopNavPage.xaml.cs.

bool m_initializeComponentComplete = false [private]

Definition at line 24 of file NavigationViewTopNavPage.xaml.cs.

int m_newFooterItemIndex = 0 [private]

Definition at line 21 of file NavigationViewTopNavPage.xaml.cs.

int m_newItemIndex = 0 [private]

Definition at line 20 of file NavigationViewTopNavPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/TopMode/NavigationViewTopNavPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTopNavStorePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavigationViewTopNavStorePage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

NavigationViewTopNavStorePage Class Reference

List of all members.

Public Member Functions

NavigationViewTopNavStorePage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | AddButton_Click (object sender, RoutedEventArgs e)
void | AddButtonSuppressSelection_Click (object sender, RoutedEventArgs e)
void | AddRemoveContentOverlay_Click (object sender, RoutedEventArgs e)
void | AppBarButton_Click (object sender, RoutedEventArgs e)
void | ChangeContentOverlayVisibility_Click (object sender, RoutedEventArgs e)
void | ChangeSelectionInCode_Click (object sender, RoutedEventArgs e)
void | ChangeToIEnumerableButton_Clicks (object sender, RoutedEventArgs e)
void | ChangeTopNavVisibility_Click (object sender, RoutedEventArgs e)
void | ClearItemInvokedTextButton_Click (object sender, RoutedEventArgs e)
void | EnableSelectionFollowsFocus_Click (object sender, RoutedEventArgs e)
void | FlipIsTitleBarAutoPaddingEnabledButton_Click (object sender, RoutedEventArgs e)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | GetActiveVisualState_Click (object sender, RoutedEventArgs e)
void | GetNavItemActiveNavItemVisualState_Click (object sender, RoutedEventArgs e)
void | GetTopPaddingHeightButton_Click (object sender, RoutedEventArgs e)
void | MoveContentUnderTopnav_Click (object sender, RoutedEventArgs e)
void | MoveContentUnderTopnavTitleBar_Click (object sender, RoutedEventArgs e)
void | OnNavItemInvoked (object sender, NavigationViewItemInvokedEventArgs e)
void | RemoveButton_Click (object sender, RoutedEventArgs e)

Private Attributes

TextBlock | contentOverlay = null
int | currentSelectedItem = 0
ObservableCollection
< NavigationViewItemBase > 		m_menuItems
int | suppressSelectionNextNumber = 0

Detailed Description

Definition at line 21 of file NavigationViewTopNavStorePage.xaml.cs.

Constructor & Destructor Documentation

NavigationViewTopNavStorePage ( ) [inline]

Definition at line 28 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            this.InitializeComponent();

            App.Current.FocusVisualKind = FocusVisualKind.Reveal;

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            m_menuItems = new ObservableCollection<NavigationViewItemBase>();

            m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 1" });
            m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 2" });
            m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 3" });
            m_menuItems.Add(new NavigationViewItemSeparator());
            m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 4" });

            NavView.MenuItemsSource = m_menuItems;
            NavView.SelectedItem = m_menuItems[currentSelectedItem];

            NavViewIsTitleBarAutoPaddingEnabled.Text = NavView.IsTitleBarAutoPaddingEnabled.ToString();
        }

Member Function Documentation

void AddButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            m_menuItems.Add(new NavigationViewItem() { Content = "New Menu Item" });
        }

void AddButtonSuppressSelection_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 64 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            var newItem = new NavigationViewItem() { Content = "New Menu Item S.S", SelectsOnInvoked = false };
            AutomationProperties.SetAutomationId(newItem, "sup-selection-nav-item-" + suppressSelectionNextNumber);
            m_menuItems.Add(newItem);
            suppressSelectionNextNumber++;
        }

void AddRemoveContentOverlay_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 110 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            contentOverlay = contentOverlay == null ? new TextBlock() { Text = "CONTENT OVERLAY" } : null;
            NavView.ContentOverlay = contentOverlay;
        }

void AppBarButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file NavigationViewTopNavStorePage.xaml.cs.

        {
        }

void ChangeContentOverlayVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 116 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            if (contentOverlay != null)
            {
                contentOverlay.Visibility = contentOverlay.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
            }
        }

void ChangeSelectionInCode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 188 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            currentSelectedItem++;
            if (currentSelectedItem == m_menuItems.Count)
            {
                currentSelectedItem = 0;
            }

            NavView.SelectedItem = m_menuItems[currentSelectedItem];
        }

void ChangeToIEnumerableButton_Clicks | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 80 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            var newMenuItems = new LinkedList<string>();
            newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 1");
            newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 2");
            newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 3");

            NavView.MenuItemsSource = newMenuItems;
        }

void ChangeTopNavVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 105 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            NavView.IsPaneVisible = !NavView.IsPaneVisible;
        }

void ClearItemInvokedTextButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 241 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            ItemInvokedText.Text = string.Empty;
        }

void EnableSelectionFollowsFocus_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 218 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            if (NavView.SelectionFollowsFocus == NavigationViewSelectionFollowsFocus.Disabled)
            {
                NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
            }
            else
            {
                NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
            }
            EnableSelectionFollowsFocusButton.Content = NavView.SelectionFollowsFocus == NavigationViewSelectionFollowsFocus.Enabled ? "Disable Selection Follows Focus" : "Enable Selection Follows Focus";
        }

void FlipIsTitleBarAutoPaddingEnabledButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 90 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            NavView.IsTitleBarAutoPaddingEnabled = !NavView.IsTitleBarAutoPaddingEnabled;
            NavViewIsTitleBarAutoPaddingEnabled.Text = NavView.IsTitleBarAutoPaddingEnabled.ToString();
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void GetActiveVisualState_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 231 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            ActiveVisualStates.Text = Utilities.VisualStateHelper.GetCurrentVisualStateNameString(NavView);
        }

void GetNavItemActiveNavItemVisualState_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 236 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            NavItemActiveVisualStates.Text = Utilities.VisualStateHelper.GetCurrentVisualStateNameString(NavView.SelectedItem as FrameworkElement);
        }

void GetTopPaddingHeightButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 199 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
            if (rootGrid != null)
            {
                Grid paneContentGrid = rootGrid.FindName("TopNavTopPadding") as Grid;
                TopPaddingRenderedValue.Text = paneContentGrid.ActualHeight.ToString();
            }

            if (CoreWindow.GetForCurrentThread() != null && CoreApplication.GetCurrentView().TitleBar.IsVisible)
            {
                TitleBarIsVisible.Text = "True";
            }
            else
            {
                TitleBarIsVisible.Text = "False";
            }
        }

void MoveContentUnderTopnav_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 124 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            var topNavArea = FindVisualChildByName(NavView, "TopNavArea") as FrameworkElement;
            var topNavGrid = FindVisualChildByName(NavView, "TopNavGrid") as FrameworkElement;
            var topNavHeight = topNavGrid.Height;

            if (CoreWindow.GetForCurrentThread() != null)
            {
                CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
            }

            if (ContentScrollViewer.ActualHeight == 200)
            {
                Grid.SetRow(topNavArea, 0);
                ContentScrollViewer.Height = double.NaN;
                ContentStackPanel.Padding = new Thickness(0);
                ContentScrollViewer.Margin = new Thickness(0);
                ContentScrollViewer.Padding = new Thickness(0);
            }
            else
            {
                Grid.SetRow(topNavArea, 1);
                ContentScrollViewer.Height = 200;
                ContentStackPanel.Padding = new Thickness(0, topNavHeight, 0, 0);
                ContentScrollViewer.Margin = new Thickness(0, topNavHeight, 0, 0);
                ContentScrollViewer.Padding = new Thickness(0, -topNavHeight, 0, 0);
            }
        }

void MoveContentUnderTopnavTitleBar_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            var topNavArea = FindVisualChildByName(NavView, "TopNavArea") as FrameworkElement;
            var topNavGrid = FindVisualChildByName(NavView, "TopNavGrid") as FrameworkElement;
            var topNavHeight = topNavGrid.Height + 33;

            if (CoreWindow.GetForCurrentThread() != null && CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar)
            {
                //AppTitleBar
                UpdateTestFrameVisibility(Visibility.Visible);
                CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;

                // Reset values
                Grid.SetRow(topNavArea, 0);
                ContentScrollViewer.Height = double.NaN;
                ContentStackPanel.Padding = new Thickness(0);
                ContentScrollViewer.Margin = new Thickness(0);
                ContentScrollViewer.Padding = new Thickness(0);
            }
            else
            {
                //AppTitleBar
                UpdateTestFrameVisibility(Visibility.Collapsed);
                if(CoreWindow.GetForCurrentThread() != null)
                {
                    CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
                }
                Grid.SetRow(topNavArea, 1);
                ContentScrollViewer.Height = 200;
                ContentStackPanel.Padding = new Thickness(0, topNavHeight, 0, 0);
                ContentScrollViewer.Margin = new Thickness(0, topNavHeight, 0, 0);
                ContentScrollViewer.Padding = new Thickness(0, -topNavHeight, 0, 0);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 51 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

void OnNavItemInvoked | ( | object | sender,
 |  | NavigationViewItemInvokedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 246 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            ItemInvokedText.Text = e.InvokedItem as string;
        }

void RemoveButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 72 of file NavigationViewTopNavStorePage.xaml.cs.

        {
            if (m_menuItems.Count > 0)
            {
                m_menuItems.RemoveAt(m_menuItems.Count - 1);
            }
        }

Member Data Documentation

TextBlock contentOverlay = null [private]

Definition at line 24 of file NavigationViewTopNavStorePage.xaml.cs.

int currentSelectedItem = 0 [private]

Definition at line 25 of file NavigationViewTopNavStorePage.xaml.cs.

ObservableCollection<NavigationViewItemBase> m_menuItems [private]

Definition at line 23 of file NavigationViewTopNavStorePage.xaml.cs.

int suppressSelectionNextNumber = 0 [private]

Definition at line 26 of file NavigationViewTopNavStorePage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/TopMode/NavigationViewTopNavStorePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavViewPageData Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NavViewPageData
Public Member Functions | Properties

NavViewPageData Class Reference

List of all members.

Public Member Functions

NavViewPageData (string name)

Properties

string Name [get, set]

Detailed Description

Definition at line 99 of file NavigationViewPageDataContext.xaml.cs.

Constructor & Destructor Documentation

NavViewPageData ( string name ) [inline]

Definition at line 103 of file NavigationViewPageDataContext.xaml.cs.

        {
            Name = name;
        }

Property Documentation

string Name [get, set]

Definition at line 101 of file NavigationViewPageDataContext.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Common/NavigationViewPageDataContext.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NestedGridViewsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NestedGridViewsPage
Public Member Functions | Private Member Functions

NestedGridViewsPage Class Reference

List of all members.

Public Member Functions

NestedGridViewsPage ()

Private Member Functions

void | BtnGetItemsStackPanelCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsStackPanelCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnSwitchOuterListViewVisibility_Click (object sender, RoutedEventArgs e)
void | ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged (object sender, RoutedEventArgs e)
void | CmbOuterListViewSelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbOuterListViewTabNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 12 of file NestedGridViewsPage.xaml.cs.

Constructor & Destructor Documentation

NestedGridViewsPage ( ) [inline]

Definition at line 14 of file NestedGridViewsPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void BtnGetItemsStackPanelCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 58 of file NestedGridViewsPage.xaml.cs.

        {
            try
            {
                if (outerListView != null && txtItemsStackPanelCacheLength != null)
                {
                    ItemsStackPanel itemsStackPanel = outerListView.ItemsPanelRoot as ItemsStackPanel;

                    if (itemsStackPanel != null)
                    {
                        txtItemsStackPanelCacheLength.Text = itemsStackPanel.CacheLength.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtItemsStackPanelCacheLength.Text = ex.ToString();
            }
        }

void BtnSetItemsStackPanelCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 78 of file NestedGridViewsPage.xaml.cs.

        {
            try
            {
                if (outerListView != null && txtItemsStackPanelCacheLength != null)
                {
                    ItemsStackPanel itemsStackPanel = outerListView.ItemsPanelRoot as ItemsStackPanel;

                    if (itemsStackPanel != null)
                    {
                        itemsStackPanel.CacheLength = double.Parse(txtItemsStackPanelCacheLength.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtItemsStackPanelCacheLength.Text = ex.ToString();
            }
        }

void BtnSwitchOuterListViewVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file NestedGridViewsPage.xaml.cs.

        {
            if (outerListView != null)
            {
                if (outerListView.Visibility == Visibility.Visible)
                {
                    outerListView.Visibility = Visibility.Collapsed;
                }
                else
                {
                    outerListView.Visibility = Visibility.Visible;
                }
            }
        }

void ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file NestedGridViewsPage.xaml.cs.

        {
            if (outerListView != null && chkOuterListViewSingleSelectionFollowsFocus != null)
            {
                outerListView.SingleSelectionFollowsFocus = (bool)chkOuterListViewSingleSelectionFollowsFocus.IsChecked;
            }
        }

void CmbOuterListViewSelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 42 of file NestedGridViewsPage.xaml.cs.

        {
            if (outerListView != null && cmbOuterListViewSelectionMode != null)
            {
                outerListView.SelectionMode = (ListViewSelectionMode)cmbOuterListViewSelectionMode.SelectedIndex;
            }
        }

void CmbOuterListViewTabNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file NestedGridViewsPage.xaml.cs.

        {
            if (outerListView != null && cmbOuterListViewTabNavigation != null)
            {
                outerListView.TabNavigation = (KeyboardNavigationMode)cmbOuterListViewTabNavigation.SelectedIndex;
            }
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/NestedGridViewsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NestedItemsControlsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NestedItemsControlsPage
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

NestedItemsControlsPage Class Reference

List of all members.

Public Member Functions

NestedItemsControlsPage ()

Private Member Functions

void | ChkOuterItemsControlIsTabStop_IsCheckedChanged (object sender, RoutedEventArgs e)
void | CmbOuterItemsControlTabNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbOuterItemsPresenterFooter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbOuterItemsPresenterHeader_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbUseOuterItemsControl_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | NestedItemsControlsPage_Loaded (object sender, RoutedEventArgs e)
void | UpdateOuterItemsControl ()

Static Private Member Functions

static T | FindElementOfTypeInSubtree< T > (DependencyObject element)

Private Attributes

ItemsControl | _outerItemsControl = null

Detailed Description

Definition at line 11 of file NestedItemsControlsPage.xaml.cs.

Constructor & Destructor Documentation

NestedItemsControlsPage ( ) [inline]

Definition at line 15 of file NestedItemsControlsPage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += NestedItemsControlsPage_Loaded;
        }

Member Function Documentation

void ChkOuterItemsControlIsTabStop_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 76 of file NestedItemsControlsPage.xaml.cs.

        {
            if (_outerItemsControl != null && chkOuterItemsControlIsTabStop != null)
            {
                _outerItemsControl.IsTabStop = (bool)chkOuterItemsControlIsTabStop.IsChecked;
            }
        }

void CmbOuterItemsControlTabNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 84 of file NestedItemsControlsPage.xaml.cs.

        {
            if (_outerItemsControl != null && cmbOuterItemsControlTabNavigation != null)
            {
                _outerItemsControl.TabNavigation = (KeyboardNavigationMode)cmbOuterItemsControlTabNavigation.SelectedIndex;
            }
        }

void CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 92 of file NestedItemsControlsPage.xaml.cs.

        {
            if (_outerItemsControl != null && cmbOuterItemsControlXYFocusKeyboardNavigation != null)
            {
                _outerItemsControl.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbOuterItemsControlXYFocusKeyboardNavigation.SelectedIndex;
            }
        }

void CmbOuterItemsPresenterFooter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 146 of file NestedItemsControlsPage.xaml.cs.

        {
            if (_outerItemsControl != null && cmbOuterItemsPresenterFooter != null)
            {
                ItemsPresenter outerItemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(_outerItemsControl);

                if (outerItemsPresenter != null)
                {
                    switch (cmbOuterItemsPresenterFooter.SelectedIndex)
                    {
                        case 0: /*None*/
                            outerItemsPresenter.Footer = null;
                            break;
                        case 1: /*No TabStop*/
                            outerItemsPresenter.Footer = new TextBlock()
                            {
                                FontSize = 18.0,
                                Margin = new Thickness(10.0),
                                Text = "ItemsPresenter Footer"
                            };
                            break;
                        case 2: /*Single TabStop*/
                            outerItemsPresenter.Footer = new Button()
                            {
                                Content = "ItemsPresenter Footer",
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                        case 3: /*Nested TabStops*/
                            outerItemsPresenter.Footer = new Button()
                            {
                                Content = new Button()
                                {
                                    Content = "ItemsPresenter Footer",
                                    Margin = new Thickness(10.0)
                                },
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                    }
                }
            }
        }

void CmbOuterItemsPresenterHeader_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 100 of file NestedItemsControlsPage.xaml.cs.

        {
            if (_outerItemsControl != null && cmbOuterItemsPresenterHeader != null)
            {
                ItemsPresenter outerItemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(_outerItemsControl);

                if (outerItemsPresenter != null)
                {
                    switch (cmbOuterItemsPresenterHeader.SelectedIndex)
                    {
                        case 0: /*None*/
                            outerItemsPresenter.Header = null;
                            break;
                        case 1: /*No TabStop*/
                            outerItemsPresenter.Header = new TextBlock()
                            {
                                FontSize = 18.0,
                                Margin = new Thickness(10.0),
                                Text = "ItemsPresenter Header"
                            };
                            break;
                        case 2: /*Single TabStop*/
                            outerItemsPresenter.Header = new Button()
                            {
                                Content = "ItemsPresenter Header",
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                        case 3: /*Nested TabStops*/
                            outerItemsPresenter.Header = new Button()
                            {
                                Content = new Button()
                                {
                                    Content = "ItemsPresenter Header",
                                    Margin = new Thickness(10.0)
                                },
                                FontSize = 18.0,
                                Margin = new Thickness(10.0)
                            };
                            break;
                    }
                }
            }
        }

void CmbUseOuterItemsControl_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 71 of file NestedItemsControlsPage.xaml.cs.

        {
            UpdateOuterItemsControl();
        }

static T FindElementOfTypeInSubtree< T > ( DependencyObject element ) [inline, static, private]
Type Constraints
T : DependencyObject
void NestedItemsControlsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 66 of file NestedItemsControlsPage.xaml.cs.

        {
            UpdateOuterItemsControl();
        }

void UpdateOuterItemsControl ( ) [inline, private]

Definition at line 22 of file NestedItemsControlsPage.xaml.cs.

        {
            if (cmbUseOuterItemsControl != null)
            {
                if (_outerItemsControl != null)
                {
                    _outerItemsControl.Visibility = Visibility.Collapsed;
                }

                switch (cmbUseOuterItemsControl.SelectedIndex)
                {
                    case 0:
                    {
                        _outerItemsControl = outerItemsControl1;
                        break;
                    }
                    case 1:
                    {
                        _outerItemsControl = outerItemsControl2;
                        break;
                    }
                    case 2:
                    {
                        _outerItemsControl = outerItemsControl3;
                        break;
                    }
                    case 3:
                    {
                        _outerItemsControl = outerItemsControl4;
                        break;
                    }
                }

                if (_outerItemsControl != null)
                {
                    _outerItemsControl.Visibility = Visibility.Visible;

                    ChkOuterItemsControlIsTabStop_IsCheckedChanged(null, null);
                    CmbOuterItemsControlTabNavigation_SelectionChanged(null, null);
                    CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged(null, null);
                }
            }
        }

Member Data Documentation

ItemsControl _outerItemsControl = null [private]

Definition at line 13 of file NestedItemsControlsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/NestedItemsControlsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NestedListViewsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NestedListViewsPage
Public Member Functions | Private Member Functions | Private Attributes

NestedListViewsPage Class Reference

List of all members.

Public Member Functions

NestedListViewsPage ()

Private Member Functions

void | ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged (object sender, RoutedEventArgs e)
void | CmbOuterListViewFooter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbOuterListViewHeader_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbOuterListViewSelectionMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbOuterListViewTabNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbUseOuterListView_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | NestedListViewsPage_Loaded (object sender, RoutedEventArgs e)
void | UpdateOuterListView ()

Private Attributes

ListView | _outerListView = null

Detailed Description

Definition at line 10 of file NestedListViewsPage.xaml.cs.

Constructor & Destructor Documentation

NestedListViewsPage ( ) [inline]

Definition at line 14 of file NestedListViewsPage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += NestedListViewsPage_Loaded;
        }

Member Function Documentation

void ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 77 of file NestedListViewsPage.xaml.cs.

        {
            if (_outerListView != null && chkOuterListViewSingleSelectionFollowsFocus != null)
            {
                _outerListView.SingleSelectionFollowsFocus = (bool)chkOuterListViewSingleSelectionFollowsFocus.IsChecked;
            }
        }

void CmbOuterListViewFooter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 130 of file NestedListViewsPage.xaml.cs.

        {
            if (_outerListView != null && cmbOuterListViewFooter != null)
            {
                switch (cmbOuterListViewFooter.SelectedIndex)
                {
                    case 0: /*None*/
                        _outerListView.Footer = null;
                        break;
                    case 1: /*Non-focusable*/
                        _outerListView.Footer = new TextBlock()
                        {
                            FontSize = 18.0,
                            Margin = new Thickness(10.0),
                            Text = "Footer"
                        };
                        break;
                    case 2: /*Focusable*/
                        _outerListView.Footer = new Button()
                        {
                            Content = "Footer",
                            FontSize = 18.0,
                            Margin = new Thickness(10.0)
                        };
                        break;
                }
            }
        }

void CmbOuterListViewHeader_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file NestedListViewsPage.xaml.cs.

        {
            if (_outerListView != null && cmbOuterListViewHeader != null)
            {
                switch (cmbOuterListViewHeader.SelectedIndex)
                {
                    case 0: /*None*/
                        _outerListView.Header = null;
                        break;
                    case 1: /*Non-focusable*/
                        _outerListView.Header = new TextBlock()
                        {
                            FontSize = 18.0,
                            Margin = new Thickness(10.0),
                            Text = "Header"
                        };
                        break;
                    case 2: /*Focusable*/
                        _outerListView.Header = new Button()
                        {
                            Content = "Header",
                            FontSize = 18.0,
                            Margin = new Thickness(10.0)
                        };
                        break;
                }
            }
        }

void CmbOuterListViewSelectionMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 85 of file NestedListViewsPage.xaml.cs.

        {
            if (_outerListView != null && cmbOuterListViewSelectionMode != null)
            {
                _outerListView.SelectionMode = (ListViewSelectionMode)cmbOuterListViewSelectionMode.SelectedIndex;
            }
        }

void CmbOuterListViewTabNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 93 of file NestedListViewsPage.xaml.cs.

        {
            if (_outerListView != null && cmbOuterListViewTabNavigation != null)
            {
                _outerListView.TabNavigation = (KeyboardNavigationMode)cmbOuterListViewTabNavigation.SelectedIndex;
            }
        }

void CmbUseOuterListView_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 72 of file NestedListViewsPage.xaml.cs.

        {
            UpdateOuterListView();
        }

void NestedListViewsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 67 of file NestedListViewsPage.xaml.cs.

        {
            UpdateOuterListView();
        }

void UpdateOuterListView ( ) [inline, private]

Definition at line 21 of file NestedListViewsPage.xaml.cs.

        {
            if (cmbUseOuterListView != null)
            {
                if (_outerListView != null)
                {
                    _outerListView.Visibility = Visibility.Collapsed;
                }

                switch (cmbUseOuterListView.SelectedIndex)
                {
                    case 0:
                    {
                        _outerListView = outerListView1;
                        break;
                    }
                    case 1:
                    {
                        _outerListView = outerListView2;
                        break;
                    }
                    case 2:
                    {
                        _outerListView = outerListView3;
                        break;
                    }
                    case 3:
                    {
                        _outerListView = outerListView4;
                        break;
                    }
                }

                if (_outerListView != null)
                {
                    _outerListView.Visibility = Visibility.Visible;

                    ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged(null, null);
                    CmbOuterListViewSelectionMode_SelectionChanged(null, null);
                    CmbOuterListViewTabNavigation_SelectionChanged(null, null);
                    CmbOuterListViewHeader_SelectionChanged(null, null);
                    CmbOuterListViewFooter_SelectionChanged(null, null);
                }
            }
        }

Member Data Documentation

ListView _outerListView = null [private]

Definition at line 12 of file NestedListViewsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/NestedListViewsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NewWindowRootPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NewWindowRootPage
Public Member Functions

NewWindowRootPage Class Reference

List of all members.

Public Member Functions

NewWindowRootPage ()

Detailed Description

Definition at line 8 of file NewWindowRootPage.xaml.cs.

Constructor & Destructor Documentation

NewWindowRootPage ( ) [inline]

Definition at line 10 of file NewWindowRootPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/NewWindowRootPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NullableBooleanToBooleanConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NullableBooleanToBooleanConverter
Public Member Functions

NullableBooleanToBooleanConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 133 of file ProgressBarPage.xaml.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 135 of file ProgressBarPage.xaml.cs.

        {
            return value is bool ? (bool)value : (object)false;
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 140 of file ProgressBarPage.xaml.cs.

        {
            return value is bool ? (bool)value : (object)false;
        }

The documentation for this class was generated from the following file:
  • ProgressBar/TestUI/ProgressBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NumberBoxAxeTestPage
Public Member Functions

NumberBoxAxeTestPage Class Reference

List of all members.

Public Member Functions

NumberBoxAxeTestPage ()

Detailed Description

Definition at line 6 of file NumberBoxAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

NumberBoxAxeTestPage ( ) [inline]

Definition at line 8 of file NumberBoxAxeTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • NumberBox/TestUI/NumberBoxAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • NumberBoxPage
Public Member Functions | Properties | Private Member Functions

NumberBoxPage Class Reference

List of all members.

Public Member Functions

NumberBoxPage ()

Properties

DataModelWithINPC | DataModelWithINPC [get, set]

Private Member Functions

void | CustomFormatterButton_Click (object sender, RoutedEventArgs e)
void | InputScope_Changed (object sender, RoutedEventArgs e)
void | MaxCheckBox_CheckChanged (object sender, RoutedEventArgs e)
void | MaxValueChanged (object sender, object e)
void | MinCheckBox_CheckChanged (object sender, RoutedEventArgs e)
void | MinValueChanged (object sender, object e)
void | NumberBoxValueChanged (object sender, NumberBoxValueChangedEventArgs e)
void | ScrollviewerWithScroll_ViewChanged (object sender, ScrollViewerViewChangedEventArgs e)
void | SetNaNButton_Click (object sender, RoutedEventArgs e)
void | SetTextButton_Click (object sender, RoutedEventArgs e)
void | SetTwoWayBoundNaNButton_Click (object sender, RoutedEventArgs e)
void | SetValueButton_Click (object sender, RoutedEventArgs e)
void | SpinMode_Changed (object sender, RoutedEventArgs e)
void | TextAlignment_Changed (object sender, RoutedEventArgs e)
void | TextPropertyChanged (DependencyObject o, DependencyProperty p)
void | ToggleHeaderTemplateValueButton_Click (object sender, RoutedEventArgs e)
void | ToggleHeaderValueButton_Click (object sender, RoutedEventArgs e)
void | Validation_Changed (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 19 of file NumberBoxPage.xaml.cs.

Constructor & Destructor Documentation

NumberBoxPage ( ) [inline]

Definition at line 23 of file NumberBoxPage.xaml.cs.

        {
            this.InitializeComponent();

            TestNumberBox.RegisterPropertyChangedCallback(NumberBox.TextProperty, new DependencyPropertyChangedCallback(TextPropertyChanged));
        }

Member Function Documentation

void CustomFormatterButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 139 of file NumberBoxPage.xaml.cs.

        {
            List<string> languages = new List<string>() { "fr-FR" };
            DecimalFormatter formatter = new DecimalFormatter(languages, "FR");
            formatter.IntegerDigits = 1;
            formatter.FractionDigits = 2;
            TestNumberBox.NumberFormatter = formatter;
        }

void InputScope_Changed | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 30 of file NumberBoxPage.xaml.cs.

        {
            if (TestNumberBox != null &&
                sender is ComboBox comboBox &&
                comboBox.SelectedItem is ComboBoxItem item)
            {
                var scopeName = new InputScopeName();
                scopeName.NameValue = (InputScopeNameValue)Enum.Parse(typeof(InputScopeNameValue), item.Content?.ToString() ?? string.Empty, true);

                var scope = new InputScope();
                scope.Names.Add(scopeName);

                TestNumberBox.InputScope = scope;

                // Help testing by returning focus to the NumberBox to see the keyboard change
                TestNumberBox.Focus(FocusState.Keyboard);
            }
        }

void MaxCheckBox_CheckChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 108 of file NumberBoxPage.xaml.cs.

        {
            MaxNumberBox.IsEnabled = (bool)MaxCheckBox.IsChecked;
            MaxValueChanged(null, null);
        }

void MaxValueChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 122 of file NumberBoxPage.xaml.cs.

        {
            if (TestNumberBox != null)
            {
                TestNumberBox.Maximum = (bool)MaxCheckBox.IsChecked ? MaxNumberBox.Value : double.MaxValue;
            }
        }

void MinCheckBox_CheckChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 102 of file NumberBoxPage.xaml.cs.

        {
            MinNumberBox.IsEnabled = (bool)MinCheckBox.IsChecked;
            MinValueChanged(null, null);
        }

void MinValueChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 114 of file NumberBoxPage.xaml.cs.

        {
            if (TestNumberBox != null)
            {
                TestNumberBox.Minimum = (bool)MinCheckBox.IsChecked ? MinNumberBox.Value : double.MinValue;
            }
        }

void NumberBoxValueChanged | ( | object | sender,
 |  | NumberBoxValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 130 of file NumberBoxPage.xaml.cs.

        {
            if (TestNumberBox != null && NewValueTextBox != null && OldValueTextBox != null)
            {
                NewValueTextBox.Text = e.NewValue.ToString();
                OldValueTextBox.Text = e.OldValue.ToString();
            }
        }

void ScrollviewerWithScroll_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 215 of file NumberBoxPage.xaml.cs.

        {
            VerticalOffsetDisplayBlock.Text = (sender as Microsoft.UI.Xaml.Controls.ScrollViewer).VerticalOffset.ToString();
        }

void SetNaNButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 158 of file NumberBoxPage.xaml.cs.

        {
            TestNumberBox.Value = Double.NaN;
        }

void SetTextButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 148 of file NumberBoxPage.xaml.cs.

        {
            TestNumberBox.Text = "15";
        }

void SetTwoWayBoundNaNButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 163 of file NumberBoxPage.xaml.cs.

        {
            DataModelWithINPC.Value = Double.NaN;
            TwoWayBoundNumberBoxValue.Text = TwoWayBoundNumberBox.Value.ToString();
        }

void SetValueButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file NumberBoxPage.xaml.cs.

        {
            TestNumberBox.Value = 42;
        }

void SpinMode_Changed | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file NumberBoxPage.xaml.cs.

        {
            if (TestNumberBox != null)
            {
                if (SpinModeComboBox.SelectedIndex == 0)
                {
                    TestNumberBox.SpinButtonPlacementMode = NumberBoxSpinButtonPlacementMode.Hidden;
                }
                else if (SpinModeComboBox.SelectedIndex == 1)
                {
                    TestNumberBox.SpinButtonPlacementMode = NumberBoxSpinButtonPlacementMode.Compact;
                }
                else if (SpinModeComboBox.SelectedIndex == 2)
                {
                    TestNumberBox.SpinButtonPlacementMode = NumberBoxSpinButtonPlacementMode.Inline;
                }
            }
        }

void TextAlignment_Changed | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file NumberBoxPage.xaml.cs.

        {
            if (TestNumberBox != null)
            {
                if (TextAlignmentComboBox.SelectedIndex == 0)
                {
                    TestNumberBox.TextAlignment = TextAlignment.Left;
                }
                else if (TextAlignmentComboBox.SelectedIndex == 1)
                {
                    TestNumberBox.TextAlignment = TextAlignment.Center;
                }
                else if (TextAlignmentComboBox.SelectedIndex == 2)
                {
                    TestNumberBox.TextAlignment = TextAlignment.Right;
                }
            }
        }

void TextPropertyChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 210 of file NumberBoxPage.xaml.cs.

        {
            TextTextBox.Text = TestNumberBox.Text;
        }

void ToggleHeaderTemplateValueButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 192 of file NumberBoxPage.xaml.cs.

        {
            if (HeaderTemplateTestingNumberBox.HeaderTemplate is null)
            {
                string templateString =
                @"<DataTemplate
                xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
                    <TextBlock AutomationProperties.Name=""HeaderTemplateTestingBlock"" Text=""Some text""/>
                </DataTemplate>";
                HeaderTemplateTestingNumberBox.HeaderTemplate = XamlReader.Load(templateString) as DataTemplate;
            }
            else
            {
                // Switching between normal header and empty string header
                HeaderTemplateTestingNumberBox.HeaderTemplate = null;
            }
        }

void ToggleHeaderValueButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 169 of file NumberBoxPage.xaml.cs.

        {
            if(HeaderTestingNumberBox.Header is null)
            {
                var demoHeader = new TextBlock();
                demoHeader.SetValue(AutomationProperties.NameProperty, "NumberBoxHeaderClippingDemoHeader");
                demoHeader.Text = "Test header";
                HeaderTestingNumberBox.Header = demoHeader;
            }
            else
            {
                // Switching between normal header and empty string header
                if(HeaderTestingNumberBox.Header as string is null)
                {
                    HeaderTestingNumberBox.Header = "";
                }
                else
                {
                    HeaderTestingNumberBox.Header = null;
                }
            }
        }

void Validation_Changed | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 87 of file NumberBoxPage.xaml.cs.

        {
            if (TestNumberBox != null)
            {
                if (ValidationComboBox.SelectedIndex == 0)
                {
                    TestNumberBox.ValidationMode = NumberBoxValidationMode.InvalidInputOverwritten;
                }
                else if (ValidationComboBox.SelectedIndex == 1)
                {
                    TestNumberBox.ValidationMode = NumberBoxValidationMode.Disabled;
                }
            }
        }

Property Documentation

DataModelWithINPC DataModelWithINPC [get, set]

Definition at line 21 of file NumberBoxPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NumberBox/TestUI/NumberBoxPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PageInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PageInfo
Properties

PageInfo Class Reference

List of all members.

Properties

VirtualizingLayout | Level0Layout [get, set]
VirtualizingLayout | Level1Layout [get, set]
VirtualizingLayout | Level2Layout [get, set]
int | NumLevels [get, set]
Orientation | Orientation [get, set]

Detailed Description

Definition at line 317 of file RepeaterTestUIPage.xaml.cs.

Property Documentation

VirtualizingLayout Level0Layout [get, set]

Definition at line 319 of file RepeaterTestUIPage.xaml.cs.

VirtualizingLayout Level1Layout [get, set]

Definition at line 320 of file RepeaterTestUIPage.xaml.cs.

VirtualizingLayout Level2Layout [get, set]

Definition at line 321 of file RepeaterTestUIPage.xaml.cs.

int NumLevels [get, set]

Definition at line 322 of file RepeaterTestUIPage.xaml.cs.

Orientation Orientation [get, set]

Definition at line 323 of file RepeaterTestUIPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/RepeaterTestUIPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PagerControlAxeTestPage
Public Member Functions

PagerControlAxeTestPage Class Reference

List of all members.

Public Member Functions

PagerControlAxeTestPage ()

Detailed Description

Definition at line 6 of file PagerControlAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

PagerControlAxeTestPage ( ) [inline]

Definition at line 8 of file PagerControlAxeTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • PagerControl/TestUI/PagerControlAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PagerControlPage
Public Member Functions | Private Member Functions | Private Attributes

PagerControlPage Class Reference

List of all members.

Public Member Functions

PagerControlPage ()

Private Member Functions

void | CheckIfButtonsHiddenButtonClicked (object sender, RoutedEventArgs args)
void | IncreaseNumberOfPagesButtonClicked (object sender, RoutedEventArgs args)
void | NumberOfPagesInfinityButtonClicked (object sender, RoutedEventArgs args)
void | NumberOfPagesSetterButtonClicked (object sender, RoutedEventArgs args)
void | OnDisplayModeChanged (object sender, SelectionChangedEventArgs e)
void | OnFirstButtonVisibilityChanged (object sender, SelectionChangedEventArgs e)
void | OnLastButtonVisibilityChanged (object sender, SelectionChangedEventArgs e)
void | OnLoad (object sender, RoutedEventArgs args)
void | OnNextButtonVisibilityChanged (object sender, SelectionChangedEventArgs e)
void | OnPreviousButtonVisibilityChanged (object sender, SelectionChangedEventArgs e)
void | OnSelectedIndexChanged (PagerControl sender, PagerControlSelectedIndexChangedEventArgs args)
void | UpdateNumberPanelContentTextBlock (object sender, NotifyCollectionChangedEventArgs args)

Private Attributes

Button | firstPageButton
Button | lastPageButton
Button | nextPageButton
ComboBox | pagerComboBox
ItemsRepeater | pagerItemsRepeater
NumberBox pagerNumberBox
Button | previousPageButton

Detailed Description

Definition at line 15 of file PagerControlPage.xaml.cs.

Constructor & Destructor Documentation

PagerControlPage ( ) [inline]

Definition at line 26 of file PagerControlPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += OnLoad;
        }

Member Function Documentation

void CheckIfButtonsHiddenButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 130 of file PagerControlPage.xaml.cs.

        {
            var rootGrid = VisualTreeHelper.GetChild(TemplateButtonVisibilitySetPager, 0);
            var backButtonsPanel = VisualTreeHelper.GetChild(rootGrid, 0);
            var firstPageButtonTemplatePager = VisualTreeHelper.GetChild(backButtonsPanel, 0) as Button;
            var previousPageButtonTemplatePager = VisualTreeHelper.GetChild(backButtonsPanel, 1) as Button;

            var forwardButtonsPanel = VisualTreeHelper.GetChild(rootGrid, 4);
            var nextPageButtonTemplatePager = VisualTreeHelper.GetChild(forwardButtonsPanel, 0) as Button;
            var lastPageButtonTemplatePager = VisualTreeHelper.GetChild(forwardButtonsPanel, 1) as Button;

            int violationCount = 0;
            violationCount += (firstPageButtonTemplatePager?.Visibility == Visibility.Collapsed || firstPageButton?.Opacity == 0) ? 0 : 1;
            violationCount += (previousPageButtonTemplatePager?.Visibility == Visibility.Collapsed || previousPageButton?.Opacity == 0) ? 0 : 1;
            violationCount += (nextPageButtonTemplatePager?.Visibility == Visibility.Collapsed || nextPageButton?.Opacity == 0) ? 0 : 1;
            violationCount += (lastPageButtonTemplatePager?.Visibility == Visibility.Collapsed || lastPageButton?.Opacity == 0) ? 0 : 1;

            CheckIfButtonsHiddenLabel.Text = violationCount == 0 ? "Passed" : "Failed";
        }

void IncreaseNumberOfPagesButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 119 of file PagerControlPage.xaml.cs.

        {
            TestPager.NumberOfPages += 1;

            NumberBoxVisibilityCheckBox.IsChecked = pagerNumberBox?.Visibility == Visibility.Visible;
            ComboBoxVisibilityCheckBox.IsChecked = pagerComboBox?.Visibility == Visibility.Visible;
            NumberPanelVisibilityCheckBox.IsChecked = pagerItemsRepeater?.Visibility == Visibility.Visible;
            NumberBoxIsEnabledCheckBox.IsChecked = pagerNumberBox?.IsEnabled;
            ComboBoxIsEnabledCheckBox.IsChecked = pagerComboBox?.IsEnabled;
        }

void NumberOfPagesInfinityButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 108 of file PagerControlPage.xaml.cs.

        {
            TestPager.NumberOfPages = -1;

            NumberBoxVisibilityCheckBox.IsChecked = pagerNumberBox?.Visibility == Visibility.Visible;
            ComboBoxVisibilityCheckBox.IsChecked = pagerComboBox?.Visibility == Visibility.Visible;
            NumberPanelVisibilityCheckBox.IsChecked = pagerItemsRepeater?.Visibility == Visibility.Visible;
            NumberBoxIsEnabledCheckBox.IsChecked = pagerNumberBox?.IsEnabled;
            ComboBoxIsEnabledCheckBox.IsChecked = pagerComboBox?.IsEnabled;
        }

void NumberOfPagesSetterButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 88 of file PagerControlPage.xaml.cs.

        {
            if (TestPager.NumberOfPages == 5)
            {
                TestPager.NumberOfPages = 100;
                NumberOfPagesSetterButton.Content = "Set NumberOfPages to 5";
            }
            else
            {
                TestPager.NumberOfPages = 5;
                NumberOfPagesSetterButton.Content = "Set NumberOfPages to 100";
            }

            NumberBoxVisibilityCheckBox.IsChecked = pagerNumberBox?.Visibility == Visibility.Visible;
            ComboBoxVisibilityCheckBox.IsChecked = pagerComboBox?.Visibility == Visibility.Visible;
            NumberPanelVisibilityCheckBox.IsChecked = pagerItemsRepeater?.Visibility == Visibility.Visible;
            NumberBoxIsEnabledCheckBox.IsChecked = pagerNumberBox?.IsEnabled;
            ComboBoxIsEnabledCheckBox.IsChecked = pagerComboBox?.IsEnabled;
        }

void OnDisplayModeChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 167 of file PagerControlPage.xaml.cs.

        {
            var item = PagerDisplayModeComboBox.SelectedItem;

            if (item == this.AutoDisplayModeItem)
            {
                TestPager.DisplayMode = PagerControlDisplayMode.Auto;
                CustomizedPager.DisplayMode = PagerControlDisplayMode.Auto;
            }
            else if (item == this.NumberBoxDisplayModeItem)
            {
                TestPager.DisplayMode = PagerControlDisplayMode.NumberBox;
                CustomizedPager.DisplayMode = PagerControlDisplayMode.NumberBox;
            }
            else if (item == this.ComboBoxDisplayModeItem)
            {
                TestPager.DisplayMode = PagerControlDisplayMode.ComboBox;
                CustomizedPager.DisplayMode = PagerControlDisplayMode.ComboBox;
            }
            else if (item == this.NumberPanelDisplayModeItem)
            {
                TestPager.DisplayMode = PagerControlDisplayMode.ButtonPanel;
                CustomizedPager.DisplayMode = PagerControlDisplayMode.ButtonPanel;
            }

            NumberBoxVisibilityCheckBox.IsChecked = pagerNumberBox?.Visibility == Visibility.Visible;
            ComboBoxVisibilityCheckBox.IsChecked = pagerComboBox?.Visibility == Visibility.Visible;
            NumberPanelVisibilityCheckBox.IsChecked = pagerItemsRepeater?.Visibility == Visibility.Visible;
            NumberBoxIsEnabledCheckBox.IsChecked = pagerNumberBox?.IsEnabled;
            ComboBoxIsEnabledCheckBox.IsChecked = pagerComboBox?.IsEnabled;
        }

void OnFirstButtonVisibilityChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 199 of file PagerControlPage.xaml.cs.

        {
            var item = FirstPageButtonVisibilityComboBox.SelectedItem;

            if (item == this.NoneFirstPageButtonVisibilityItem)
            {
                TestPager.FirstButtonVisibility = PagerControlButtonVisibility.Hidden;
            }
            else if (item == this.AlwaysVisibleFirstPageButtonVisibilityItem)
            {
                TestPager.FirstButtonVisibility = PagerControlButtonVisibility.Visible;
            }
            else if (item == this.HiddenOnEdgeFirstPageButtonVisibilityItem)
            {
                TestPager.FirstButtonVisibility = PagerControlButtonVisibility.HiddenOnEdge;
            }

            FirstPageButtonVisibilityCheckBox.IsChecked = firstPageButton?.Visibility == Visibility.Visible && firstPageButton?.Opacity != 0;
        }

void OnLastButtonVisibilityChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 258 of file PagerControlPage.xaml.cs.

        {
            var item = LastPageButtonVisibilityComboBox.SelectedItem;

            if (item == this.NoneLastPageButtonVisibilityItem)
            {
                TestPager.LastButtonVisibility = PagerControlButtonVisibility.Hidden;
            }
            else if (item == this.AlwaysVisibleLastPageButtonVisibilityItem)
            {
                TestPager.LastButtonVisibility = PagerControlButtonVisibility.Visible;
            }
            else if (item == this.HiddenOnEdgeLastPageButtonVisibilityItem)
            {
                TestPager.LastButtonVisibility = PagerControlButtonVisibility.HiddenOnEdge;
            }

            LastPageButtonVisibilityCheckBox.IsChecked = lastPageButton?.Visibility == Visibility.Visible && lastPageButton?.Opacity != 0;
        }

void OnLoad | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 32 of file PagerControlPage.xaml.cs.

        {
            PagerDisplayModeComboBox.SelectionChanged += OnDisplayModeChanged;
            FirstPageButtonVisibilityComboBox.SelectionChanged += OnFirstButtonVisibilityChanged;
            PreviousPageButtonVisibilityComboBox.SelectionChanged += OnPreviousButtonVisibilityChanged;
            NextPageButtonVisibilityComboBox.SelectionChanged += OnNextButtonVisibilityChanged;
            LastPageButtonVisibilityComboBox.SelectionChanged += OnLastButtonVisibilityChanged;

            var rootGrid = VisualTreeHelper.GetChild(TestPager, 0);
            var backButtonsPanel = VisualTreeHelper.GetChild(rootGrid, 0);
            firstPageButton = VisualTreeHelper.GetChild(backButtonsPanel, 0) as Button;
            previousPageButton = VisualTreeHelper.GetChild(backButtonsPanel, 1) as Button;

            var boxPanels = VisualTreeHelper.GetChild(rootGrid, 1);
            pagerNumberBox = VisualTreeHelper.GetChild(boxPanels, 1) as NumberBox;
            pagerComboBox = VisualTreeHelper.GetChild(boxPanels, 2) as ComboBox;
            pagerItemsRepeater = VisualTreeHelper.GetChild(rootGrid, 2) as ItemsRepeater;

            var forwardButtonsPanel = VisualTreeHelper.GetChild(rootGrid, 4);
            nextPageButton = VisualTreeHelper.GetChild(forwardButtonsPanel, 0) as Button;
            lastPageButton = VisualTreeHelper.GetChild(forwardButtonsPanel, 1) as Button;

            NumberBoxVisibilityCheckBox.IsChecked = pagerNumberBox.Visibility == Visibility.Visible;
            ComboBoxVisibilityCheckBox.IsChecked = pagerComboBox.Visibility == Visibility.Visible;
            NumberPanelVisibilityCheckBox.IsChecked = pagerItemsRepeater.Visibility == Visibility.Visible;
            NumberBoxIsEnabledCheckBox.IsChecked = pagerNumberBox.IsEnabled;
            ComboBoxIsEnabledCheckBox.IsChecked = pagerComboBox.IsEnabled;

            FirstPageButtonVisibilityCheckBox.IsChecked = firstPageButton?.Visibility == Visibility.Visible && firstPageButton?.Opacity != 0;
            PreviousPageButtonVisibilityCheckBox.IsChecked = previousPageButton?.Visibility == Visibility.Visible && previousPageButton?.Opacity != 0;
            NextPageButtonVisibilityCheckBox.IsChecked = nextPageButton?.Visibility == Visibility.Visible && nextPageButton?.Opacity != 0;
            LastPageButtonVisibilityCheckBox.IsChecked = lastPageButton?.Visibility == Visibility.Visible && lastPageButton?.Opacity != 0;

            FirstPageButtonIsEnabledCheckBox.IsChecked = firstPageButton?.IsEnabled;
            PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
            NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;
            LastPageButtonIsEnabledCheckBox.IsChecked = lastPageButton?.IsEnabled;
            UpdateNumberPanelContentTextBlock(this, null);
        }

void OnNextButtonVisibilityChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 239 of file PagerControlPage.xaml.cs.

        {
            var item = NextPageButtonVisibilityComboBox.SelectedItem;

            if (item == this.NoneNextPageButtonVisibilityItem)
            {
                TestPager.NextButtonVisibility = PagerControlButtonVisibility.Hidden;
            }
            else if (item == this.AlwaysVisibleNextPageButtonVisibilityItem)
            {
                TestPager.NextButtonVisibility = PagerControlButtonVisibility.Visible;
            }
            else if (item == this.HiddenOnEdgeNextPageButtonVisibilityItem)
            {
                TestPager.NextButtonVisibility = PagerControlButtonVisibility.HiddenOnEdge;
            }

            NextPageButtonVisibilityCheckBox.IsChecked = nextPageButton?.Visibility == Visibility.Visible && nextPageButton?.Opacity != 0;
        }

void OnPreviousButtonVisibilityChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 219 of file PagerControlPage.xaml.cs.

        {
            var item = PreviousPageButtonVisibilityComboBox.SelectedItem;

            if (item == this.NonePreviousPageButtonVisibilityItem)
            {
                TestPager.PreviousButtonVisibility = PagerControlButtonVisibility.Hidden;
            }
            else if (item == this.AlwaysVisiblePreviousPageButtonVisibilityItem)
            {
                TestPager.PreviousButtonVisibility = PagerControlButtonVisibility.Visible;
            }
            else if (item == this.HiddenOnEdgePreviousPageButtonVisibilityItem)
            {
                TestPager.PreviousButtonVisibility = PagerControlButtonVisibility.HiddenOnEdge;
            }

            PreviousPageButtonVisibilityCheckBox.IsChecked = previousPageButton?.Visibility == Visibility.Visible && previousPageButton?.Opacity != 0;
        }

void OnSelectedIndexChanged | ( | PagerControl | sender,
 |  | PagerControlSelectedIndexChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 150 of file PagerControlPage.xaml.cs.

        {
            UpdateNumberPanelContentTextBlock(this, null);
            PreviousPageTextBlock.Text = args.PreviousPageIndex.ToString();
            CurrentPageTextBlock.Text = args.NewPageIndex.ToString();

            FirstPageButtonVisibilityCheckBox.IsChecked = firstPageButton?.Visibility == Visibility.Visible && firstPageButton?.Opacity != 0;
            PreviousPageButtonVisibilityCheckBox.IsChecked = previousPageButton?.Visibility == Visibility.Visible && previousPageButton?.Opacity != 0;
            NextPageButtonVisibilityCheckBox.IsChecked = nextPageButton?.Visibility == Visibility.Visible && nextPageButton?.Opacity != 0;
            LastPageButtonVisibilityCheckBox.IsChecked = lastPageButton?.Visibility == Visibility.Visible && lastPageButton?.Opacity != 0;

            FirstPageButtonIsEnabledCheckBox.IsChecked = firstPageButton?.IsEnabled;
            PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
            NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;
            LastPageButtonIsEnabledCheckBox.IsChecked = lastPageButton?.IsEnabled;
        }

void UpdateNumberPanelContentTextBlock | ( | object | sender,
 |  | NotifyCollectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 72 of file PagerControlPage.xaml.cs.

        {
            NumberPanelContentTextBlock.Text = "";
            foreach (var item in TestPager.TemplateSettings.NumberPanelItems)
            {
                if (item.GetType() == typeof(SymbolIcon))
                {
                    NumberPanelContentTextBlock.Text += (item as SymbolIcon).Symbol;
                }
                else if (item.GetType() == typeof(Button))
                {
                    NumberPanelContentTextBlock.Text += (item as Button).Content;
                }
            }
        }

Member Data Documentation

Button firstPageButton [private]

Definition at line 21 of file PagerControlPage.xaml.cs.

Button lastPageButton [private]

Definition at line 24 of file PagerControlPage.xaml.cs.

Button nextPageButton [private]

Definition at line 23 of file PagerControlPage.xaml.cs.

ComboBox pagerComboBox [private]

Definition at line 17 of file PagerControlPage.xaml.cs.

ItemsRepeater pagerItemsRepeater [private]

Definition at line 19 of file PagerControlPage.xaml.cs.

NumberBox pagerNumberBox [private]

Definition at line 18 of file PagerControlPage.xaml.cs.

Button previousPageButton [private]

Definition at line 22 of file PagerControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • PagerControl/TestUI/PagerControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PaneFooterTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PaneFooterTestPage
Public Member Functions | Private Member Functions

PaneFooterTestPage Class Reference

An empty page that can be used on its own or navigated to within a Frame.

List of all members.

Public Member Functions

PaneFooterTestPage ()

Private Member Functions

void | CompactPaneLength_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | FlipOrientation_Click (object sender, RoutedEventArgs e)
void | GetIconColumnWidth_Click (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 12 of file PaneFooterTestPage.xaml.cs.

Constructor & Destructor Documentation

PaneFooterTestPage ( ) [inline]

Definition at line 14 of file PaneFooterTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void CompactPaneLength_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 24 of file PaneFooterTestPage.xaml.cs.

        {
            var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
            NavView.CompactPaneLength = tag;
        }

void FlipOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file PaneFooterTestPage.xaml.cs.

        {
            NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
        }

void GetIconColumnWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 30 of file PaneFooterTestPage.xaml.cs.

        {
            var NVIRootGrid = VisualTreeHelper.GetChild(PaneFooterNavigationViewItem, 0);
            var navigationViewItemPresenter = VisualTreeHelper.GetChild(NVIRootGrid, 0);
            var layoutRoot = VisualTreeHelper.GetChild(navigationViewItemPresenter, 0);
            var presenterContentRootGrid = VisualTreeHelper.GetChild(layoutRoot, 0);
            var contentGrid = VisualTreeHelper.GetChild(presenterContentRootGrid, 1);
            var iconColumn = VisualTreeHelper.GetChild(contentGrid, 0);

            PaneFooterNavViewItemWidth.Text = (iconColumn as Border).ActualWidth.ToString();
        }

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Footer/PaneFooterTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PaneLayoutTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PaneLayoutTestPage
Public Member Functions | Private Member Functions | Private Attributes

PaneLayoutTestPage Class Reference

An empty page that can be used on its own or navigated to within a Frame.

List of all members.

Public Member Functions

PaneLayoutTestPage ()

Private Member Functions

void | AddFooterItemButton_Click (object sender, RoutedEventArgs e)
void | AddMenuItemButton_Click (object sender, RoutedEventArgs e)
void | ClearCollectionsButton_Click (object sender, RoutedEventArgs e)
void | GetLayoutHeightsButton_Click (object sender, RoutedEventArgs e)
void | IsSettingsEnabledCheckbox_Checked (object sender, RoutedEventArgs e)
void | IsSettingsEnabledCheckbox_UnChecked (object sender, RoutedEventArgs e)
void | ResetCollectionsButton_Click (object sender, RoutedEventArgs e)
void | TestCaseSelectionChanged (object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)

Private Attributes

IList< NavigationViewItem > | footerItems = new System.Collections.ObjectModel.ObservableCollection<NavigationViewItem>()
IList< NavigationViewItem > | menuItems = new System.Collections.ObjectModel.ObservableCollection<NavigationViewItem>()

Detailed Description

Definition at line 14 of file PaneLayoutTestPage.xaml.cs.

Constructor & Destructor Documentation

PaneLayoutTestPage ( ) [inline]

Definition at line 19 of file PaneLayoutTestPage.xaml.cs.

        {
            this.InitializeComponent();

            for (int i = 0; i < 3; i++)
            {
                menuItems.Add(
                    new NavigationViewItem() {
                        Content = "Item #" + i.ToString()
                    }
                );
            }

            for (int i = 0; i < 3; i++)
            {
                footerItems.Add(
                    new NavigationViewItem() {
                        Content = "Footer #" + i.ToString()
                    }
                );
            }
        }

Member Function Documentation

void AddFooterItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file PaneLayoutTestPage.xaml.cs.

        {
            footerItems.Add(new NavigationViewItem() { Content = "Text" });
        }

void AddMenuItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 69 of file PaneLayoutTestPage.xaml.cs.

        {
            menuItems.Add(new NavigationViewItem() { Content = "Text" });
        }

void ClearCollectionsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 92 of file PaneLayoutTestPage.xaml.cs.

        {
            menuItems.Clear();
            footerItems.Clear();
        }

void GetLayoutHeightsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file PaneLayoutTestPage.xaml.cs.

        {
            var itemsScroll = VisualTreeUtils.FindVisualChildByName(RootNavigationView, "MenuItemsScrollViewer");
            var footerScroll = VisualTreeUtils.FindVisualChildByName(RootNavigationView, "FooterItemsScrollViewer");
            LayoutHeightsReport.Text = itemsScroll.ActualHeight + ";" + footerScroll.ActualHeight;
        }

void IsSettingsEnabledCheckbox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 105 of file PaneLayoutTestPage.xaml.cs.

        {
            RootNavigationView.IsSettingsVisible = true;
        }

void IsSettingsEnabledCheckbox_UnChecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 110 of file PaneLayoutTestPage.xaml.cs.

        {
            RootNavigationView.IsSettingsVisible = false;
        }

void ResetCollectionsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 78 of file PaneLayoutTestPage.xaml.cs.

        {
            for (int i = menuItems.Count - 1; i > 2; i--)
            {
                menuItems.RemoveAt(i);
            }

            for (int i = footerItems.Count - 1; i > 2; i--)
            {
                footerItems.RemoveAt(i);
            }
        }

void TestCaseSelectionChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file PaneLayoutTestPage.xaml.cs.

        {
            if (sender is RadioButtons rb)
            {
                var caseTag = rb.SelectedIndex;

                switch (caseTag)
                {
                    case 0:
                        RootNavigationView.MenuItemsSource = null;
                        RootNavigationView.FooterMenuItemsSource = footerItems;
                        break;
                    case 1:
                        RootNavigationView.MenuItemsSource = menuItems;
                        RootNavigationView.FooterMenuItemsSource = null;
                        break;
                    case 2:
                        RootNavigationView.MenuItemsSource = menuItems;
                        RootNavigationView.FooterMenuItemsSource = footerItems;
                        break;
                }
            }
        }

Member Data Documentation

IList<NavigationViewItem> footerItems = new System.Collections.ObjectModel.ObservableCollection<NavigationViewItem>() [private]

Definition at line 17 of file PaneLayoutTestPage.xaml.cs.

IList<NavigationViewItem> menuItems = new System.Collections.ObjectModel.ObservableCollection<NavigationViewItem>() [private]

Definition at line 16 of file PaneLayoutTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • NavigationView/TestUI/Footer/PaneLayoutTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ParallaxViewPage
Public Member Functions

ParallaxViewPage Class Reference

List of all members.

Public Member Functions

ParallaxViewPage ()

Detailed Description

Definition at line 9 of file ParallaxViewPage.xaml.cs.

Constructor & Destructor Documentation

ParallaxViewPage ( ) [inline]

Definition at line 11 of file ParallaxViewPage.xaml.cs.

        {
            this.InitializeComponent();

            navigateToSimpleRectangle.Click += delegate { Frame.NavigateWithoutAnimation(typeof(SimpleRectanglePage), 0); };
            navigateToStackPanel.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ParallaxViewStackPanelPage), 0); };
            navigateToListViewBackground.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewBackgroundPage), 0); };
            navigateToVSP.Click += delegate { Frame.NavigateWithoutAnimation(typeof(VirtualizingStackPanelPage), 0); };
            navigateToListViewItem.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewItemPage), 0); };
            navigateToListViewHeader.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewHeaderPage), 0); };
            navigateToText.Click += delegate { Frame.NavigateWithoutAnimation(typeof(TextPage), 0); };
            navigateToDynamic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(DynamicPage), 0); };
        }

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/ParallaxViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxViewStackPanelPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ParallaxViewStackPanelPage
Public Member Functions

ParallaxViewStackPanelPage Class Reference

List of all members.

Public Member Functions

ParallaxViewStackPanelPage ()

Detailed Description

Definition at line 6 of file ParallaxViewStackPanelPage.xaml.cs.

Constructor & Destructor Documentation

ParallaxViewStackPanelPage ( ) [inline]

Definition at line 8 of file ParallaxViewStackPanelPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PersonInfo
Public Member Functions | Properties

PersonInfo Class Reference

List of all members.

Public Member Functions

PersonInfo (string name, string surname)

Properties

string | FullName [get, set]
string | Initials [get, set]

Detailed Description

Definition at line 139 of file PipsPagerExamples.xaml.cs.

Constructor & Destructor Documentation

PersonInfo | ( | string | name,
 |  | string | surname |
 | ) |  |  | [inline]

Definition at line 141 of file PipsPagerExamples.xaml.cs.

        {
            FullName = $"{name} {surname}";
            Initials = $"{Char.ToUpper(name.ElementAtOrDefault(0))}{Char.ToUpper(surname.ElementAtOrDefault(0))}";
        }

Property Documentation

string FullName [get, set]

Definition at line 147 of file PipsPagerExamples.xaml.cs.

string Initials [get, set]

Definition at line 148 of file PipsPagerExamples.xaml.cs.

The documentation for this class was generated from the following file:
  • PipsPager/TestUI/PipsPagerExamples.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicturePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PersonPicturePage
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

PersonPicturePage Class Reference

List of all members.

Classes

class | SportsGroup
class | SportsPerson

Public Member Functions

PersonPicturePage ()

Private Member Functions

void | BadgeGlyphTextBox_TextChanged (object sender, TextChangedEventArgs e)
void | BadgeNumberTextBox_TextChanged (object sender, RoutedEventArgs e)
void | ClearContactBtn_Click (object sender, RoutedEventArgs e)
void | ClearImageBtn_Click (object sender, RoutedEventArgs e)
void | ContactBtn_Click (object sender, RoutedEventArgs e)
async void | ContactImageBtn_Click (object sender, RoutedEventArgs e)
void | DisplayNameTextBox_TextChanged (object sender, TextChangedEventArgs e)
void | FindAndGiveAutomationNameToVisualChild (string childName)
void | GroupCheckBox_Checked (object sender, RoutedEventArgs e)
void | GroupCheckBox_Unchecked (object sender, RoutedEventArgs e)
void | ImageBtn_Click (object sender, RoutedEventArgs e)
void | InitialTextBox_TextChanged (object sender, TextChangedEventArgs e)
void | PersonPicture_LayoutUpdated (object sender, object e)
void | PersonPicture_Loaded (object sender, RoutedEventArgs e)
void | PrimaryEllipseFillChanged (DependencyObject o, DependencyProperty p)
void | TestPersonPicture_SizeChanged (object sender, SizeChangedEventArgs e)

Static Private Member Functions

static ObservableCollection
< SportsGroup > 		GetGroupedPeople ()

Private Attributes

Uri | imageUri = new Uri(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Assets", "ingredient2.png"))
bool | primaryEllipseLoaded = false

Detailed Description

Definition at line 22 of file PersonPicturePage.xaml.cs.

Constructor & Destructor Documentation

PersonPicturePage ( ) [inline]

Definition at line 27 of file PersonPicturePage.xaml.cs.

        {
            this.InitializeComponent();
            this.TestPersonPicture.Loaded += PersonPicture_Loaded;
            this.TestPersonPicture.LayoutUpdated += PersonPicture_LayoutUpdated;
        }

Member Function Documentation

void BadgeGlyphTextBox_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 120 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.BadgeGlyph = BadgeGlyphTextBox.Text;
        }

void BadgeNumberTextBox_TextChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 113 of file PersonPicturePage.xaml.cs.

        {
            int result = 0;
            int.TryParse(BadgeNumberTextBox.Text, out result);
            TestPersonPicture.BadgeNumber = result;
        }

void ClearContactBtn_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 162 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.Contact = null;
        }

void ClearImageBtn_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 172 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.ProfilePicture = null;
        }

void ContactBtn_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 145 of file PersonPicturePage.xaml.cs.

        {
            Contact contact = new Contact();
            contact.FirstName = "Test";
            contact.LastName = "Contact";

            TestPersonPicture.Contact = contact;
        }

async void ContactImageBtn_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 154 of file PersonPicturePage.xaml.cs.

        {
            Contact contact = new Contact();
            contact.SourceDisplayPicture = await StorageFile.GetFileFromPathAsync(imageUri.ToString());

            TestPersonPicture.Contact = contact;
        }

void DisplayNameTextBox_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.DisplayName = DisplayNameTextBox.Text;
        }

void FindAndGiveAutomationNameToVisualChild ( string childName ) [inline, private]

Definition at line 91 of file PersonPicturePage.xaml.cs.

        {
            DependencyObject obj = FindVisualChildByName(this.TestPersonPicture, childName);

            if (obj != null)
            {
                AutomationProperties.SetName(obj, childName);
            }
        }

static ObservableCollection<SportsGroup> GetGroupedPeople ( ) [inline, static, private]

Definition at line 189 of file PersonPicturePage.xaml.cs.

        {
            ObservableCollection<SportsGroup> groupedPeople = new ObservableCollection<SportsGroup>();

            for (int i = 0; i< 4; ++i)
            {
                SportsGroup group = null;

                switch (i)
                {
                case 0:
                    group = new SportsGroup("Tennis");

                    group.Add(new SportsPerson(1, "RF", "Roger Federer"));
                    group.Add(new SportsPerson(2, "RN", "Rafael Nadal"));
                    group.Add(new SportsPerson(3, "ND", "Novak Djokovic"));
                    group.Add(new SportsPerson(4, "AM", "Andy Murray"));
                    group.Add(new SportsPerson(5, "GD", "Grigor Dimitrov"));
                    break;

                case 1:
                    group = new SportsGroup("Soccer");

                    group.Add(new SportsPerson(6, "CR", "Cristiano Ronaldo"));
                    group.Add(new SportsPerson(7, "LM", "Lionel Messi"));
                    group.Add(new SportsPerson(8, "N", "Neymar"));
                    group.Add(new SportsPerson(9, "AI", "Andres Iniesta"));
                    group.Add(new SportsPerson(10, "GB", "Gareth Bale"));
                    group.Add(new SportsPerson(11, "X", "Xavi"));
                    group.Add(new SportsPerson(12, "JR", "James Rodriguez"));
                    group.Add(new SportsPerson(13, "R", "Ronaldinho"));
                    group.Add(new SportsPerson(14, "AR", "Arjen Robben"));
                    break;

                case 2:
                    group = new SportsGroup("Basketball");

                    group.Add(new SportsPerson(15, "AI", "Allen Iverson"));
                    group.Add(new SportsPerson(16, "DW", "Dwayne Wade"));
                    group.Add(new SportsPerson(17, "LJ", "LeBron James"));
                    group.Add(new SportsPerson(18, "KD", "Kevin Durant"));
                    group.Add(new SportsPerson(19, "KB", "Kobe Bryant"));
                    break;

                case 3:
                    group = new SportsGroup("Formula 1");

                    group.Add(new SportsPerson(20, "AP", "Alain Prost"));
                    group.Add(new SportsPerson(21, "AS", "Ayrton Senna"));
                    group.Add(new SportsPerson(22, "MS", "Michael Schumacher"));
                    group.Add(new SportsPerson(23, "NL", "Niki Lauda"));
                    group.Add(new SportsPerson(24, "SV", "Sebastian Vettel"));
                    break;
                }

                groupedPeople.Add(group);
            }

            return groupedPeople;
        }

void GroupCheckBox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 130 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.IsGroup = true;
        }

void GroupCheckBox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 135 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.IsGroup = false;
        }

void ImageBtn_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 167 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.ProfilePicture = new BitmapImage(imageUri);
        }

void InitialTextBox_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 125 of file PersonPicturePage.xaml.cs.

        {
            TestPersonPicture.Initials = InitialTextBox.Text;
        }

void PersonPicture_LayoutUpdated | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file PersonPicturePage.xaml.cs.

        {
            // Register items that are delay loaded
            if (!primaryEllipseLoaded)
            {
                string primaryEllipseName = "PersonPictureEllipse";
                Ellipse primaryEllipse = FindVisualChildByName(this.TestPersonPicture, primaryEllipseName) as Ellipse;
                if (primaryEllipse != null)
                {
                    // Capture initial state of the property
                    PrimaryEllipseFillChanged(primaryEllipse, Ellipse.FillProperty);

                    primaryEllipse.RegisterPropertyChangedCallback(Ellipse.FillProperty, new DependencyPropertyChangedCallback(PrimaryEllipseFillChanged));
                    primaryEllipseLoaded = true;
                }
            }
        }

void PersonPicture_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 52 of file PersonPicturePage.xaml.cs.

        {
            string InitialTextBlockName = "InitialsTextBlock";
            TextBlock initialTextBlock = FindVisualChildByName(this.TestPersonPicture, InitialTextBlockName) as TextBlock;
            if (initialTextBlock != null)
            {
                AutomationProperties.SetName(initialTextBlock, InitialTextBlockName);
                AutomationProperties.SetAccessibilityView(initialTextBlock, AccessibilityView.Content);
            }

            string badgeTextBlockName = "BadgeNumberTextBlock";
            TextBlock badgeTextBlock = FindVisualChildByName(this.TestPersonPicture, badgeTextBlockName) as TextBlock;
            if (badgeTextBlock != null)
            {
                AutomationProperties.SetName(badgeTextBlock, badgeTextBlockName);
                AutomationProperties.SetAccessibilityView(badgeTextBlock, AccessibilityView.Content);
            }

            string badgeGlyphIconName = "BadgeGlyphIcon";
            FontIcon badgeFontIcon = FindVisualChildByName(this.TestPersonPicture, badgeGlyphIconName) as FontIcon;
            if (badgeFontIcon != null)
            {
                AutomationProperties.SetName(badgeFontIcon, badgeGlyphIconName);
                AutomationProperties.SetAccessibilityView(badgeFontIcon, AccessibilityView.Content);
            }

            string badgeEllipseName = "BadgingEllipse";
            Ellipse badgeEllipse = FindVisualChildByName(this.TestPersonPicture, badgeEllipseName) as Ellipse;
            if (badgeEllipse != null)
            {
                AutomationProperties.SetName(badgeEllipse, badgeEllipseName);
                AutomationProperties.SetAccessibilityView(badgeEllipse, AccessibilityView.Content);
            }

            CollectionViewSource cvs = rootGrid.FindName("cvs") as CollectionViewSource;
            cvs.Source = GetGroupedPeople();
            cvs.IsSourceGrouped = true;
        }

void PrimaryEllipseFillChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 101 of file PersonPicturePage.xaml.cs.

        {
            if (((Ellipse)o).Fill != null)
            {
                BgEllipseFilled.IsChecked = true;
            }
            else
            {
                BgEllipseFilled.IsChecked = false;
            }
        }

void TestPersonPicture_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 177 of file PersonPicturePage.xaml.cs.

        {
            if (Math.Round(TestPersonPicture.Width) == Math.Round(TestPersonPicture.Height))
            {
                DimensionsMatch.IsChecked = true;
            }
            else
            {
                DimensionsMatch.IsChecked = false;
            }
        }

Member Data Documentation

Uri imageUri = new Uri(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Assets", "ingredient2.png")) [private]

Definition at line 24 of file PersonPicturePage.xaml.cs.

bool primaryEllipseLoaded = false [private]

Definition at line 25 of file PersonPicturePage.xaml.cs.

The documentation for this class was generated from the following file:
  • PersonPicture/TestUI/PersonPicturePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicturePage::SportsGroup Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PersonPicturePage
  • PersonPicturePage::SportsGroup
Public Member Functions | Properties

PersonPicturePage::SportsGroup Class Reference

List of all members.

Public Member Functions

SportsGroup (string name)

Properties

string Name [get, set]

Detailed Description

Definition at line 264 of file PersonPicturePage.xaml.cs.

Constructor & Destructor Documentation

SportsGroup ( string name ) [inline]

Definition at line 266 of file PersonPicturePage.xaml.cs.

            {
                Name = name;
            }

Property Documentation

string Name [get, set]

Definition at line 271 of file PersonPicturePage.xaml.cs.

The documentation for this class was generated from the following file:
  • PersonPicture/TestUI/PersonPicturePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicturePage::SportsPerson Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PersonPicturePage
  • PersonPicturePage::SportsPerson
Public Member Functions | Properties

PersonPicturePage::SportsPerson Class Reference

List of all members.

Public Member Functions

SportsPerson (int badgeNumber, string initials, string displayName)

Properties

int | BadgeNumber [get, set]
string | DisplayName [get, set]
string | Initials [get, set]

Detailed Description

Definition at line 250 of file PersonPicturePage.xaml.cs.

Constructor & Destructor Documentation

SportsPerson | ( | int | badgeNumber,
 |  | string | initials,
 |  | string | displayName |
 | ) |  |  | [inline]

Definition at line 252 of file PersonPicturePage.xaml.cs.

            {
                BadgeNumber = badgeNumber;
                Initials = initials;
                DisplayName = displayName;
            }

Property Documentation

int BadgeNumber [get, set]

Definition at line 259 of file PersonPicturePage.xaml.cs.

string DisplayName [get, set]

Definition at line 261 of file PersonPicturePage.xaml.cs.

string Initials [get, set]

Definition at line 260 of file PersonPicturePage.xaml.cs.

The documentation for this class was generated from the following file:
  • PersonPicture/TestUI/PersonPicturePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Picture Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Picture
Properties

Picture Class Reference

List of all members.

Properties

double | AspectRatio [get, set]
int | Id = string.Empty [get, set]
Location | Location = 1 [get, set]
string | Path [get, set]
string | Title [get, set]

Detailed Description

Definition at line 485 of file ItemsViewPictureLibraryPage.xaml.cs.

Property Documentation

double AspectRatio [get, set]

Definition at line 491 of file ItemsViewPictureLibraryPage.xaml.cs.

int Id = string.Empty [get, set]

Definition at line 489 of file ItemsViewPictureLibraryPage.xaml.cs.

Location Location = 1 [get, set]

Definition at line 493 of file ItemsViewPictureLibraryPage.xaml.cs.

string Path [get, set]

Definition at line 487 of file ItemsViewPictureLibraryPage.xaml.cs.

string Title [get, set]

Definition at line 488 of file ItemsViewPictureLibraryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewPictureLibraryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PictureLibrary Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PictureLibrary
Public Member Functions | Static Public Member Functions | Properties | Static Private Attributes

PictureLibrary Class Reference

List of all members.

Public Member Functions

PictureLibrary ()

Static Public Member Functions

static PictureLibrary | CreateLarge ()
static PictureLibrary | CreateSmall ()

Properties

string | Title [get, set]

Static Private Attributes

static PictureLibrary | s_LargeLibrary = null
static PictureLibrary | s_SmallLibrary = null

Detailed Description

Definition at line 503 of file ItemsViewPictureLibraryPage.xaml.cs.

Constructor & Destructor Documentation

PictureLibrary ( ) [inline]

Definition at line 507 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
        }

Member Function Documentation

static PictureLibrary CreateLarge ( ) [inline, static]

Definition at line 536 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (s_LargeLibrary == null)
            {
                var library = new PictureLibrary();

                for (int i = 0; i < 1000000 / 40; i++)
                {
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture1.png",  Title = "Image", Id = i * 40,      Location = Location.Seattle, AspectRatio = 1.497 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture2.png",  Title = "Image", Id = i * 40 + 1,  Location = Location.LA, AspectRatio = 1.529 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture3.png",  Title = "Image", Id = i * 40 + 2,  Location = Location.Miami, AspectRatio = 0.820 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture4.png",  Title = "Image", Id = i * 40 + 3,  Location = Location.Seattle, AspectRatio = 1.504 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture5.png",  Title = "Image", Id = i * 40 + 4,  Location = Location.LA, AspectRatio = 1.267 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture6.png",  Title = "Image", Id = i * 40 + 5,  Location = Location.Miami, AspectRatio = 0.740 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture7.png",  Title = "Image", Id = i * 40 + 6,  Location = Location.Seattle, AspectRatio = 1.488 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture8.png",  Title = "Image", Id = i * 40 + 7,  Location = Location.LA, AspectRatio = 0.727 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture9.png",  Title = "Image", Id = i * 40 + 8,  Location = Location.Miami, AspectRatio = 1.488 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture10.png", Title = "Image", Id = i * 40 + 9,  Location = Location.Seattle, AspectRatio = 0.813 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture11.png", Title = "Image", Id = i * 40 + 10, Location = Location.Seattle, AspectRatio = 0.797 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture12.png", Title = "Image", Id = i * 40 + 11, Location = Location.LA, AspectRatio = 1.496 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture13.png", Title = "Image", Id = i * 40 + 12, Location = Location.Miami, AspectRatio = 0.555 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture14.png", Title = "Image", Id = i * 40 + 13, Location = Location.Seattle, AspectRatio = 1.777 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture15.png", Title = "Image", Id = i * 40 + 14, Location = Location.LA, AspectRatio = 0.858 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture16.png", Title = "Image", Id = i * 40 + 15, Location = Location.Miami, AspectRatio = 1.782 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture17.png", Title = "Image", Id = i * 40 + 16, Location = Location.Seattle, AspectRatio = 1.334 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture18.png", Title = "Image", Id = i * 40 + 17, Location = Location.LA, AspectRatio = 0.998 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture19.png", Title = "Image", Id = i * 40 + 18, Location = Location.Miami, AspectRatio = 1.790 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture20.png", Title = "Image", Id = i * 40 + 19, Location = Location.Seattle, AspectRatio = 0.569 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture21.png", Title = "Image", Id = i * 40 + 20, Location = Location.Seattle, AspectRatio = 1.787 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture22.png", Title = "Image", Id = i * 40 + 21, Location = Location.LA, AspectRatio = 0.742 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture23.png", Title = "Image", Id = i * 40 + 22, Location = Location.Miami, AspectRatio = 0.555 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture24.png", Title = "Image", Id = i * 40 + 23, Location = Location.Seattle, AspectRatio = 1.778 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture25.png", Title = "Image", Id = i * 40 + 24, Location = Location.LA, AspectRatio = 0.998 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture26.png", Title = "Image", Id = i * 40 + 25, Location = Location.Miami, AspectRatio = 1.002 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture27.png", Title = "Image", Id = i * 40 + 26, Location = Location.Seattle, AspectRatio = 0.745 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture28.png", Title = "Image", Id = i * 40 + 27, Location = Location.LA, AspectRatio = 0.748 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture29.png", Title = "Image", Id = i * 40 + 28, Location = Location.Miami, AspectRatio = 1.512 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture30.png", Title = "Image", Id = i * 40 + 29, Location = Location.Seattle, AspectRatio = 0.997 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture31.png", Title = "Image", Id = i * 40 + 30, Location = Location.Seattle, AspectRatio = 0.798 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture32.png", Title = "Image", Id = i * 40 + 31, Location = Location.LA, AspectRatio = 1.501 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture33.png", Title = "Image", Id = i * 40 + 32, Location = Location.Miami, AspectRatio = 1.509 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture34.png", Title = "Image", Id = i * 40 + 33, Location = Location.Seattle, AspectRatio = 1.340 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture35.png", Title = "Image", Id = i * 40 + 34, Location = Location.LA, AspectRatio = 1.327 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture36.png", Title = "Image", Id = i * 40 + 35, Location = Location.Miami, AspectRatio = 1.848 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture37.png", Title = "Image", Id = i * 40 + 36, Location = Location.Seattle, AspectRatio = 1.526 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture38.png", Title = "Image", Id = i * 40 + 37, Location = Location.LA, AspectRatio = 0.743 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture39.png", Title = "Image", Id = i * 40 + 38, Location = Location.Miami, AspectRatio = 0.742 });
                    library.Add(new Picture() { Path = "ms-appx:///Images/Picture40.png", Title = "Image", Id = i * 40 + 39, Location = Location.Seattle, AspectRatio = 0.742 });
                };

                s_LargeLibrary = library;
            }

            return s_LargeLibrary;
        }

static PictureLibrary CreateSmall ( ) [inline, static]

Definition at line 511 of file ItemsViewPictureLibraryPage.xaml.cs.

        {
            if (s_SmallLibrary == null)
            {
                s_SmallLibrary = new PictureLibrary()
                {
                    new Picture() { Path = "ms-appx:///Images/Picture1.png",  Location = Location.Seattle},
                    new Picture() { Path = "ms-appx:///Images/Picture2.png",  Location = Location.LA},
                    new Picture() { Path = "ms-appx:///Images/Picture3.png",  Location = Location.Miami},
                    new Picture() { Path = "ms-appx:///Images/Picture4.png",  Location = Location.Seattle},
                    new Picture() { Path = "ms-appx:///Images/Picture5.png",  Location = Location.LA},
                    new Picture() { Path = "ms-appx:///Images/Picture6.png",  Location = Location.Miami},
                    new Picture() { Path = "ms-appx:///Images/Picture7.png",  Location = Location.Seattle},
                    new Picture() { Path = "ms-appx:///Images/Picture8.png",  Location = Location.LA},
                    new Picture() { Path = "ms-appx:///Images/Picture9.png",  Location = Location.Miami},
                    new Picture() { Path = "ms-appx:///Images/Picture10.png", Location = Location.Seattle},
                    new Picture() { Path = "ms-appx:///Images/Picture11.png", Location = Location.LA},
                    new Picture() { Path = "ms-appx:///Images/Picture12.png", Location = Location.Miami},
                    new Picture() { Path = "ms-appx:///Images/Picture13.png", Location = Location.Seattle}
                };
            }

            return s_SmallLibrary;
        }

Member Data Documentation

PictureLibrary s_LargeLibrary = null [static, private]

Definition at line 592 of file ItemsViewPictureLibraryPage.xaml.cs.

PictureLibrary s_SmallLibrary = null [static, private]

Definition at line 593 of file ItemsViewPictureLibraryPage.xaml.cs.

Property Documentation

string Title [get, set]

Definition at line 505 of file ItemsViewPictureLibraryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewPictureLibraryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PipsPagerAxeTestPage
Public Member Functions

PipsPagerAxeTestPage Class Reference

List of all members.

Public Member Functions

PipsPagerAxeTestPage ()

Detailed Description

Definition at line 6 of file PipsPagerAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

PipsPagerAxeTestPage ( ) [inline]

Definition at line 8 of file PipsPagerAxeTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • PipsPager/TestUI/PipsPagerAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerExamples Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PipsPagerExamples
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

PipsPagerExamples Class Reference

List of all members.

Public Member Functions

PipsPagerExamples ()

Public Attributes

List< string > | Pictures

Private Member Functions

void | ButtonListPager_SelectedIndexChanged (PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args)
void | ButtonListScrollViewer_ViewChanged (object sender, ScrollViewerViewChangedEventArgs e)
string[] | CreateButtonListItems ()
ObservableCollection< PersonInfo > | CreatePersonInfoList ()
ScrollViewer | FindInnerScrollViewer (ListView lv)
void | OnLoaded (object sender, RoutedEventArgs e)
void | OnViewChanged (ScrollViewer sv, PipsPager pager, ref double previousVerticalOffset, double rowSpacing=0.0)
void | PersonInfoList_ViewChanged (object sender, ScrollViewerViewChangedEventArgs e)
void | PersonInfoListPager_SelectedIndexChanged (PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args)
void | SetButtonListRepeaterSize ()

Private Attributes

double | ButtonListPreviousOffset = 0.0
int | MinRowSpacing = 8
double | PersonInfoListPreviousOffset = 0.0
ScrollViewer | PersonInfoListScrollViewer
int | TotalNumberOfDisplayedObjects = 50

Detailed Description

Definition at line 15 of file PipsPagerExamples.xaml.cs.

Constructor & Destructor Documentation

PipsPagerExamples ( ) [inline]

Definition at line 35 of file PipsPagerExamples.xaml.cs.

        {
            this.InitializeComponent();
            PersonInfoList.ItemsSource = CreatePersonInfoList();
            ButtonListRepeater.ItemsSource = CreateButtonListItems();
            this.Loaded += OnLoaded;
        }

Member Function Documentation

void ButtonListPager_SelectedIndexChanged | ( | PipsPager | sender,
 |  | PipsPagerSelectedIndexChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 86 of file PipsPagerExamples.xaml.cs.

        {
            ButtonListScrollViewer.ChangeView(null, sender.SelectedPageIndex * (ButtonListScrollViewer.ViewportHeight + MinRowSpacing), null);
        }

void ButtonListScrollViewer_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 78 of file PipsPagerExamples.xaml.cs.

        {
            if (!e.IsIntermediate)
            {
                OnViewChanged(ButtonListScrollViewer, ButtonListPager, ref ButtonListPreviousOffset, MinRowSpacing);
            }
        }

string [] CreateButtonListItems ( ) [inline, private]

Definition at line 101 of file PipsPagerExamples.xaml.cs.

        {
            var rnd = new Random();
            var items = new string[TotalNumberOfDisplayedObjects];
            for (int i = 0; i < TotalNumberOfDisplayedObjects; i++)
            {
                items[i] = $"Assets/ingredient{rnd.Next(1, 100) % 4 + 1}.png";
            }
            return items;
        }

ObservableCollection<PersonInfo> CreatePersonInfoList ( ) [inline, private]

Definition at line 91 of file PipsPagerExamples.xaml.cs.

        {
            ObservableCollection<PersonInfo> items = new ObservableCollection<PersonInfo>();
            for (int i = 0; i < 15; i++)
            {
                items.Add(new PersonInfo($"RandomName{i}", $"RandomSurname{i}"));
            }
            return items;
        }

ScrollViewer FindInnerScrollViewer ( ListView lv ) [inline, private]

Definition at line 112 of file PipsPagerExamples.xaml.cs.

        {
            Panel p = lv.ItemsPanelRoot;
            UIElement parent = VisualTreeHelper.GetParent(p) as UIElement;
            while (parent != null && !(parent is ScrollViewer))
                parent = VisualTreeHelper.GetParent(parent) as UIElement;

            return parent as ScrollViewer;
        }

void OnLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 43 of file PipsPagerExamples.xaml.cs.

        {
            ButtonListPager.NumberOfPages = (int)Math.Ceiling(ButtonListScrollViewer.ExtentHeight / ButtonListScrollViewer.ViewportHeight);
            SetButtonListRepeaterSize();
            PersonInfoListScrollViewer = FindInnerScrollViewer(PersonInfoList);
            PersonInfoListScrollViewer.ViewChanged += PersonInfoList_ViewChanged;
            PersonInfoListPager.NumberOfPages = (int)Math.Ceiling(PersonInfoListScrollViewer.ExtentHeight / PersonInfoListScrollViewer.ViewportHeight);
        }

void OnViewChanged | ( | ScrollViewer | sv,
 |  | PipsPager | pager,
 |  | ref double | previousVerticalOffset,
 |  | double | rowSpacing = 0.0 |
 | ) |  |  | [inline, private]

Definition at line 122 of file PipsPagerExamples.xaml.cs.

        {
            var newVerticalOffset = sv.VerticalOffset;

            if (newVerticalOffset <= previousVerticalOffset)
            {
                pager.SelectedPageIndex = (int)Math.Floor(sv.VerticalOffset / (sv.ViewportHeight + rowSpacing));
            }
            else
            {
                pager.SelectedPageIndex = (int)Math.Ceiling(sv.VerticalOffset / (sv.ViewportHeight + rowSpacing));
            }

            previousVerticalOffset = newVerticalOffset;
        }

void PersonInfoList_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 70 of file PipsPagerExamples.xaml.cs.

        {
            if (!e.IsIntermediate)
            {
                OnViewChanged(PersonInfoListScrollViewer, PersonInfoListPager, ref PersonInfoListPreviousOffset);
            }
        }

void PersonInfoListPager_SelectedIndexChanged | ( | PipsPager | sender,
 |  | PipsPagerSelectedIndexChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 62 of file PipsPagerExamples.xaml.cs.

        {
            if (PersonInfoListScrollViewer != null)
            {
                PersonInfoListScrollViewer.ChangeView(null, sender.SelectedPageIndex * PersonInfoListScrollViewer.ViewportHeight, null);
            }
        }

void SetButtonListRepeaterSize ( ) [inline, private]

Definition at line 52 of file PipsPagerExamples.xaml.cs.

        {
            DataTemplate dt = ButtonListRepeater.ItemTemplate as DataTemplate;
            Image img = VisualTreeHelper.GetChild(dt.LoadContent() as StackPanel, 0) as Image;
            img.Source = new BitmapImage(new Uri("ms-appx:/Assets/ingredient1.png"));
            img.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
            var numberOfPages = (int)Math.Ceiling(ButtonListScrollViewer.ExtentHeight / ButtonListScrollViewer.ViewportHeight);
            ButtonListRepeater.Height = ButtonListScrollViewer.ViewportHeight * numberOfPages + MinRowSpacing * (numberOfPages - 1); ;
        }

Member Data Documentation

double ButtonListPreviousOffset = 0.0 [private]

Definition at line 19 of file PipsPagerExamples.xaml.cs.

int MinRowSpacing = 8 [private]

Definition at line 17 of file PipsPagerExamples.xaml.cs.

double PersonInfoListPreviousOffset = 0.0 [private]

Definition at line 20 of file PipsPagerExamples.xaml.cs.

ScrollViewer PersonInfoListScrollViewer [private]

Definition at line 21 of file PipsPagerExamples.xaml.cs.

List<string> Pictures
Initial value:
 new List<string>()
        {

            "Assets/ingredient1.png",
            "Assets/ingredient2.png",
            "Assets/ingredient3.png",
            "Assets/ingredient4.png",
            "Assets/ingredient5.png",
            "Assets/ingredient6.png",
            "Assets/ingredient7.png",
            "Assets/ingredient8.png",
        }

Definition at line 22 of file PipsPagerExamples.xaml.cs.

int TotalNumberOfDisplayedObjects = 50 [private]

Definition at line 18 of file PipsPagerExamples.xaml.cs.

The documentation for this class was generated from the following file:
  • PipsPager/TestUI/PipsPagerExamples.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PipsPagerPage
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

PipsPagerPage Class Reference

List of all members.

Public Member Functions

PipsPagerPage ()
void | OnMaxVisiblePipsChanged (object sender, SelectionChangedEventArgs e)
void | OnNextPageButtonVisibilityChanged (object sender, SelectionChangedEventArgs e)
void | OnNumberOfPagesChanged (object sender, SelectionChangedEventArgs e)
void | OnOrientationChanged (object sender, SelectionChangedEventArgs e)
void | OnPreviousPageButtonVisibilityChanged (object sender, SelectionChangedEventArgs e)
void | OnSelectedIndexChanged (PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args)
void | OnWrapModeChanged (object sender, SelectionChangedEventArgs e)

Public Attributes

List< string > | Pictures

Private Member Functions

int | ConvertComboBoxItemToNumberOfPages (ComboBoxItem item)
PipsPagerButtonVisibility | ConvertComboBoxItemToVisibilityEnum (ComboBoxItem item, PipsPagerButtonVisibility defaultValue)
string | GetCurrentOrientation ()
string | GetNumberOfPages ()
void | GoToExamplesPage (object sender, RoutedEventArgs args)
bool | IsButtonVisible (Button btn)
void | OnButtonEnabledChanged (object sender, DependencyPropertyChangedEventArgs e)
void | OnGetPipsPagerButtonSizesClicked (object sender, RoutedEventArgs args)
void | OnLoad (object sender, RoutedEventArgs args)
void | OnRepeaterGotFocus (object sender, RoutedEventArgs e)
void | SkipToFirstPage (object sender, RoutedEventArgs args)
void | SkipToLastPage (object sender, RoutedEventArgs args)
void | TestPipsPager_GotFocus (object sender, RoutedEventArgs e)
void | TestPipsPager_LostFocus (object sender, RoutedEventArgs e)
void | TestPipsPager_PointerCanceled (object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
void | TestPipsPager_PointerEntered (object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
void | TestPipsPager_PointerExited (object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
void | UpdateButtonVisibilityCheckboxes ()

Private Attributes

Button | nextPageButton
Button | previousPageButton
ItemsRepeater | repeater
ItemsRepeater | verticalOrientationPipsPagerRepeater

Detailed Description

Definition at line 18 of file PipsPagerPage.xaml.cs.

Constructor & Destructor Documentation

PipsPagerPage ( ) [inline]

Definition at line 37 of file PipsPagerPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += OnLoad;
        }

Member Function Documentation

int ConvertComboBoxItemToNumberOfPages ( ComboBoxItem item ) [inline, private]

Definition at line 229 of file PipsPagerPage.xaml.cs.

        {
            int numberOfPages = -1;
            string digitsOnlyString = new String((item.Content as string).Where(Char.IsDigit).ToArray());
            if (!string.IsNullOrEmpty(digitsOnlyString))
            {
                Int32.TryParse(digitsOnlyString, out numberOfPages);
            }
            return numberOfPages;
        }

PipsPagerButtonVisibility ConvertComboBoxItemToVisibilityEnum | ( | ComboBoxItem | item,
 |  | PipsPagerButtonVisibility | defaultValue |
 | ) |  |  | [inline, private]

Definition at line 218 of file PipsPagerPage.xaml.cs.

        {
            PipsPagerButtonVisibility newVisibility = defaultValue;
            string selectedItem = item.Content as string;
            if (!Enum.TryParse<PipsPagerButtonVisibility>(selectedItem, out newVisibility))
            {
                System.Diagnostics.Debug.WriteLine("Unable to convert " + selectedItem + " to PipsPagerButtonVisibility Enum");
            }

            return newVisibility;
        }

string GetCurrentOrientation ( ) [inline, private]

Definition at line 122 of file PipsPagerPage.xaml.cs.

        {
            return $"Current orientation is: {TestPipsPager.Orientation}";
        }

string GetNumberOfPages ( ) [inline, private]

Definition at line 127 of file PipsPagerPage.xaml.cs.

        {
            string prefix = "Current number of pages: ";
            int numberOfPages = TestPipsPager.NumberOfPages;
            return numberOfPages > 0 ? $"{prefix}{numberOfPages}" : $"{prefix}Inifinite";
        }

void GoToExamplesPage | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 240 of file PipsPagerPage.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(PipsPagerExamples));
        }

bool IsButtonVisible ( Button btn ) [inline, private]

Definition at line 133 of file PipsPagerPage.xaml.cs.

        {
            return btn?.Visibility == Visibility.Visible && btn?.Opacity != 0;
        }

void OnButtonEnabledChanged | ( | object | sender,
 |  | DependencyPropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 110 of file PipsPagerPage.xaml.cs.

        {
            if (sender == previousPageButton)
            {
                PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
            }
            else
            {
                NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;
            }
        }

void OnGetPipsPagerButtonSizesClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 90 of file PipsPagerPage.xaml.cs.

        {
            //Button horizontalOrientationButton;
            if (repeater.TryGetElement(0) as FrameworkElement is var horizontalOrientationPip && horizontalOrientationPip != null)
            {
                HorizontalOrientationPipsPagerButtonWidthTextBlock.Text = $"{ horizontalOrientationPip.ActualWidth}";
                HorizontalOrientationPipsPagerButtonHeightTextBlock.Text = $"{horizontalOrientationPip.ActualHeight}";
            }
            if (verticalOrientationPipsPagerRepeater.TryGetElement(1) as FrameworkElement is var verticalOrientationPip && verticalOrientationPip != null)
            {
                VerticalOrientationPipsPagerButtonWidthTextBlock.Text = $"{verticalOrientationPip.ActualWidth}";
                VerticalOrientationPipsPagerButtonHeightTextBlock.Text = $"{verticalOrientationPip.ActualHeight}";
            }
        }

void OnLoad | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 43 of file PipsPagerPage.xaml.cs.

        {
            var rootPanel = VisualTreeHelper.GetChild(TestPipsPager, 0);
            previousPageButton = VisualTreeHelper.GetChild(rootPanel, 0) as Button;
            nextPageButton = VisualTreeHelper.GetChild(rootPanel, 2) as Button;
            repeater = rootPanel.FindVisualChildByType<ItemsRepeater>();
            var rootPanelVerticalPipsPager = VisualTreeHelper.GetChild(TestPipsPagerVerticalOrientation, 0);
            verticalOrientationPipsPagerRepeater = rootPanelVerticalPipsPager.FindVisualChildByType<ItemsRepeater>();

            PreviousPageButtonVisibilityComboBox.SelectionChanged += OnPreviousPageButtonVisibilityChanged;
            NextPageButtonVisibilityComboBox.SelectionChanged += OnNextPageButtonVisibilityChanged;
            TestPipsPagerNumberOfPagesComboBox.SelectionChanged += OnNumberOfPagesChanged;
            TestPipsPagerMaxVisiblePipsComboBox.SelectionChanged += OnMaxVisiblePipsChanged;
            TestPipsPagerOrientationComboBox.SelectionChanged += OnOrientationChanged;
            TestPipsPagerWrapModeComboBox.SelectionChanged += OnWrapModeChanged;
            TestPipsPager.PointerEntered += TestPipsPager_PointerEntered;
            TestPipsPager.PointerExited += TestPipsPager_PointerExited;
            TestPipsPager.GotFocus += TestPipsPager_GotFocus;
            TestPipsPager.LostFocus += TestPipsPager_LostFocus;
            TestPipsPager.PointerCanceled += TestPipsPager_PointerCanceled;
            previousPageButton.IsEnabledChanged += OnButtonEnabledChanged;
            nextPageButton.IsEnabledChanged += OnButtonEnabledChanged;
            repeater.GotFocus += OnRepeaterGotFocus;

            PreviousPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(previousPageButton);
            NextPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(nextPageButton);

            PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
            NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;

            CurrentNumberOfPagesTextBlock.Text = GetNumberOfPages();
            CurrentMaxVisiblePipsTextBlock.Text = $"Current max visual indicators: {TestPipsPager.MaxVisiblePips}";
            CurrentOrientationTextBlock.Text = GetCurrentOrientation();
        }

void OnMaxVisiblePipsChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 184 of file PipsPagerPage.xaml.cs.

        {
            TestPipsPager.MaxVisiblePips = ConvertComboBoxItemToNumberOfPages((sender as ComboBox).SelectedItem as ComboBoxItem);
            CurrentMaxVisiblePipsTextBlock.Text = $"Current max visual indicators: {TestPipsPager.MaxVisiblePips}";
        }

void OnNextPageButtonVisibilityChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 174 of file PipsPagerPage.xaml.cs.

        {
            TestPipsPager.NextButtonVisibility = ConvertComboBoxItemToVisibilityEnum((sender as ComboBox).SelectedItem as ComboBoxItem, TestPipsPager.NextButtonVisibility);
            UpdateButtonVisibilityCheckboxes();
        }

void OnNumberOfPagesChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 179 of file PipsPagerPage.xaml.cs.

        {
            TestPipsPager.NumberOfPages = ConvertComboBoxItemToNumberOfPages((sender as ComboBox).SelectedItem as ComboBoxItem);
            CurrentNumberOfPagesTextBlock.Text = GetNumberOfPages();
        }

void OnOrientationChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 201 of file PipsPagerPage.xaml.cs.

        {
            Orientation orientation = TestPipsPager.Orientation;
            string selectedItem = ((sender as ComboBox).SelectedItem as ComboBoxItem).Content as string;
            if (!Enum.TryParse<Orientation>(selectedItem, out orientation))
            {
                System.Diagnostics.Debug.WriteLine("Unable to convert " + selectedItem + " to Orientation Enum");
            }
            TestPipsPager.Orientation = orientation;
            CurrentOrientationTextBlock.Text = GetCurrentOrientation();
        }

void OnPreviousPageButtonVisibilityChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 169 of file PipsPagerPage.xaml.cs.

        {
            TestPipsPager.PreviousButtonVisibility = ConvertComboBoxItemToVisibilityEnum((sender as ComboBox).SelectedItem as ComboBoxItem, TestPipsPager.PreviousButtonVisibility);
            UpdateButtonVisibilityCheckboxes();
        }

void OnRepeaterGotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 105 of file PipsPagerPage.xaml.cs.

        {
            FocusedPageIndexTextBlock.Text = $"Current focused page index: {repeater.GetElementIndex((UIElement)e.OriginalSource).ToString()}";
        }

void OnSelectedIndexChanged | ( | PipsPager | sender,
 |  | PipsPagerSelectedIndexChangedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 190 of file PipsPagerPage.xaml.cs.

        {
            PreviousPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(previousPageButton);
            NextPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(nextPageButton);

            PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
            NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;

            CurrentPageIndexTextBlock.Text = $"Current index is: {sender.SelectedPageIndex}";
        }

void OnWrapModeChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 213 of file PipsPagerPage.xaml.cs.

        {
            TestPipsPager.WrapMode = (sender as ComboBox).SelectedIndex == 0 ? PipsPagerWrapMode.None : PipsPagerWrapMode.Wrap;
        }

void SkipToFirstPage | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 85 of file PipsPagerPage.xaml.cs.

        {
            TestPipsPager.SelectedPageIndex = 0;
        }

void SkipToLastPage | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 80 of file PipsPagerPage.xaml.cs.

        {
            TestPipsPager.SelectedPageIndex = TestPipsPager.NumberOfPages - 1;
        }

void TestPipsPager_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 144 of file PipsPagerPage.xaml.cs.

        {
            UpdateButtonVisibilityCheckboxes();
        }

void TestPipsPager_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 149 of file PipsPagerPage.xaml.cs.

        {
            UpdateButtonVisibilityCheckboxes();
        }

void TestPipsPager_PointerCanceled | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 154 of file PipsPagerPage.xaml.cs.

        {
            UpdateButtonVisibilityCheckboxes();
        }

void TestPipsPager_PointerEntered | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 164 of file PipsPagerPage.xaml.cs.

        {
            UpdateButtonVisibilityCheckboxes();
        }

void TestPipsPager_PointerExited | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 159 of file PipsPagerPage.xaml.cs.

        {
            UpdateButtonVisibilityCheckboxes();
        }

void UpdateButtonVisibilityCheckboxes ( ) [inline, private]

Definition at line 138 of file PipsPagerPage.xaml.cs.

        {
            PreviousPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(previousPageButton);
            NextPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(nextPageButton);
        }

Member Data Documentation

Button nextPageButton [private]

Definition at line 21 of file PipsPagerPage.xaml.cs.

List<string> Pictures
Initial value:
 new List<string>()
        {
            "Assets/ingredient1.png",
            "Assets/ingredient2.png",
            "Assets/ingredient3.png",
            "Assets/ingredient4.png",
            "Assets/ingredient5.png",
            "Assets/ingredient6.png",
            "Assets/ingredient7.png",
            "Assets/ingredient8.png",
        }

Definition at line 25 of file PipsPagerPage.xaml.cs.

Button previousPageButton [private]

Definition at line 20 of file PipsPagerPage.xaml.cs.

ItemsRepeater repeater [private]

Definition at line 22 of file PipsPagerPage.xaml.cs.

ItemsRepeater verticalOrientationPipsPagerRepeater [private]

Definition at line 23 of file PipsPagerPage.xaml.cs.

The documentation for this class was generated from the following file:
  • PipsPager/TestUI/PipsPagerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PivotPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PivotPage
Public Member Functions

PivotPage Class Reference

List of all members.

Public Member Functions

PivotPage ()

Detailed Description

Definition at line 7 of file PivotPage.xaml.cs.

Constructor & Destructor Documentation

PivotPage ( ) [inline]

Definition at line 9 of file PivotPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/PivotPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PrefixConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PrefixConverter
Public Member Functions

PrefixConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 99 of file NestedGridViewsPage.xaml.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 101 of file NestedGridViewsPage.xaml.cs.

        {
            string prefix = parameter as string;

            return prefix + " " + (value as string);
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 108 of file NestedGridViewsPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/NestedGridViewsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ProgressBarAxeTestPage
Public Member Functions

ProgressBarAxeTestPage Class Reference

List of all members.

Public Member Functions

ProgressBarAxeTestPage ()

Detailed Description

Definition at line 6 of file ProgressBarAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

ProgressBarAxeTestPage ( ) [inline]

Definition at line 8 of file ProgressBarAxeTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • ProgressBar/TestUI/ProgressBarAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ProgressBarPage
Public Member Functions | Private Member Functions

ProgressBarPage Class Reference

List of all members.

Public Member Functions

ProgressBarPage ()
void | ChangeValue_Click (object sender, RoutedEventArgs e)
void | IsVisibleCheckBox_CheckChanged (object sender, RoutedEventArgs e)
void | UpdateMinMax_Click (object sender, RoutedEventArgs e)
void | UpdatePadding_Click (object sender, RoutedEventArgs e)
void | UpdateValue_Click (object sender, RoutedEventArgs e)
void | UpdateWidth_Click (object sender, RoutedEventArgs e)

Private Member Functions

void | Indicator_SizeChanged (object sender, SizeChangedEventArgs e)
void | ProgressBarPage_CurrentStateChanged (object sender, VisualStateChangedEventArgs e)
void | ProgressBarPage_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 20 of file ProgressBarPage.xaml.cs.

Constructor & Destructor Documentation

ProgressBarPage ( ) [inline]

Definition at line 22 of file ProgressBarPage.xaml.cs.

        {
            this.InitializeComponent();
            Loaded += ProgressBarPage_Loaded;

            NavigateToReTemplatePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ProgressBarReTemplatePage), 0); };
        }

Member Function Documentation

void ChangeValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 93 of file ProgressBarPage.xaml.cs.

        {
            if (TestProgressBar.Value + 1 > TestProgressBar.Maximum)
            {
                TestProgressBar.Value = (int)(TestProgressBar.Minimum + 0.5);
            }
            else
            {
                TestProgressBar.Value += 1;
            }
            ROValueText.Text = TestProgressBar.Value.ToString();

            if (TestWUXProgressBar.Value + 1 > TestWUXProgressBar.Maximum)
            {
                TestWUXProgressBar.Value = (int)(TestWUXProgressBar.Minimum + 0.5);
            }
            else
            {
                TestWUXProgressBar.Value += 1;
            }
        }

void Indicator_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 61 of file ProgressBarPage.xaml.cs.

        {
            IndicatorWidthText.Text = ((Rectangle)sender).ActualWidth.ToString();
        }

void IsVisibleCheckBox_CheckChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 125 of file ProgressBarPage.xaml.cs.

        {
            Visibility isVisible = ShowIsVisibleCheckBox.IsChecked ?? false ? Visibility.Visible : Visibility.Collapsed;
            TestWUXProgressBar.Visibility = isVisible;
            TestProgressBar.Visibility = isVisible;
        }

void ProgressBarPage_CurrentStateChanged | ( | object | sender,
 |  | VisualStateChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 66 of file ProgressBarPage.xaml.cs.

        {
            VisualStateText.Text = e.NewState.Name;
        }

void ProgressBarPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 30 of file ProgressBarPage.xaml.cs.

        {
            var layoutRoot = (Grid)VisualTreeHelper.GetChild(TestProgressBar, 0);

            VisualStateManager.GetVisualStateGroups(layoutRoot)[0].CurrentStateChanged += this.ProgressBarPage_CurrentStateChanged;
            VisualStateText.Text = VisualStateManager.GetVisualStateGroups(layoutRoot)[0].CurrentState.Name;

            var progressBarRoot = VisualTreeHelper.GetChild(layoutRoot, 0);
            var clip = VisualTreeHelper.GetChild(progressBarRoot, 0);
            var grid = VisualTreeHelper.GetChild(clip, 0);
            Rectangle indicator = null;
            int child = 0;

            do
            {
                indicator = VisualTreeHelper.GetChild(grid, child) as Rectangle;
                child++;
            }
            while ((indicator == null || indicator.Name != "DeterminateProgressBarIndicator") && child < VisualTreeHelper.GetChildrenCount(grid));

            if (indicator != null)
            {
                indicator.SizeChanged += this.Indicator_SizeChanged;
            }

            IndicatorWidthText.Text = indicator.ActualWidth.ToString();
            ROValueText.Text = TestProgressBar.Value.ToString();

            Loaded -= ProgressBarPage_Loaded;
        }

void UpdateMinMax_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 71 of file ProgressBarPage.xaml.cs.

        {
            TestProgressBar.Maximum = String.IsNullOrEmpty(MaximumInput.Text) ? Double.Parse(MaximumInput.PlaceholderText) : Double.Parse(MaximumInput.Text);
            TestWUXProgressBar.Maximum = String.IsNullOrEmpty(MaximumInput.Text) ? Double.Parse(MaximumInput.PlaceholderText) : Double.Parse(MaximumInput.Text);
            TestProgressBar.Minimum = String.IsNullOrEmpty(MinimumInput.Text) ? Double.Parse(MinimumInput.PlaceholderText) : Double.Parse(MinimumInput.Text);
            TestWUXProgressBar.Minimum = String.IsNullOrEmpty(MinimumInput.Text) ? Double.Parse(MinimumInput.PlaceholderText) : Double.Parse(MinimumInput.Text);
            ROValueText.Text = TestProgressBar.Value.ToString();
        }

void UpdatePadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 115 of file ProgressBarPage.xaml.cs.

        {
            double paddingLeft = String.IsNullOrEmpty(PaddingLeftInput.Text) ? Double.Parse(PaddingLeftInput.PlaceholderText) : Double.Parse(PaddingLeftInput.Text);
            double paddingRight = String.IsNullOrEmpty(PaddingRightInput.Text) ? Double.Parse(PaddingRightInput.PlaceholderText) : Double.Parse(PaddingRightInput.Text);

            TestProgressBar.Padding = new Thickness(paddingLeft, 0, paddingRight, 0);
            ROValueText.Text = TestProgressBar.Value.ToString();

            TestWUXProgressBar.Padding = new Thickness(paddingLeft, 0, paddingRight, 0);
        }

void UpdateValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 86 of file ProgressBarPage.xaml.cs.

        {
            TestProgressBar.Value = String.IsNullOrEmpty(ValueInput.Text) ? Double.Parse(ValueInput.PlaceholderText) : Double.Parse(ValueInput.Text);
            TestWUXProgressBar.Value = String.IsNullOrEmpty(ValueInput.Text) ? Double.Parse(ValueInput.PlaceholderText) : Double.Parse(ValueInput.Text);
            ROValueText.Text = TestProgressBar.Value.ToString();
        }

void UpdateWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 80 of file ProgressBarPage.xaml.cs.

        {
            TestProgressBar.Width = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
            TestWUXProgressBar.Width = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
        }

The documentation for this class was generated from the following file:
  • ProgressBar/TestUI/ProgressBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarReTemplatePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ProgressBarReTemplatePage
Public Member Functions | Private Member Functions

ProgressBarReTemplatePage Class Reference

List of all members.

Public Member Functions

ProgressBarReTemplatePage ()
void | ChangeValue_Click (object sender, RoutedEventArgs e)
void | UpdateMinMax_Click (object sender, RoutedEventArgs e)
void | UpdatePadding_Click (object sender, RoutedEventArgs e)
void | UpdateValue_Click (object sender, RoutedEventArgs e)
void | UpdateWidth_Click (object sender, RoutedEventArgs e)

Private Member Functions

void | Indicator_SizeChanged (object sender, SizeChangedEventArgs e)
void | ProgressBarReTemplatePage_CurrentStateChanged (object sender, VisualStateChangedEventArgs e)
void | ProgressBarReTemplatePage_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 9 of file ProgressBarReTemplatePage.xaml.cs.

Constructor & Destructor Documentation

ProgressBarReTemplatePage ( ) [inline]

Definition at line 11 of file ProgressBarReTemplatePage.xaml.cs.

        {
            this.InitializeComponent();
            Loaded += ProgressBarReTemplatePage_Loaded;
        }

Member Function Documentation

void ChangeValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 64 of file ProgressBarReTemplatePage.xaml.cs.

        {
            if (TestProgressBar.Value + 1 > TestProgressBar.Maximum)
            {
                TestProgressBar.Value = (int)(TestProgressBar.Minimum + 0.5);
            }
            else
            {
                TestProgressBar.Value += 1;
            }
            ROValueText.Text = TestProgressBar.Value.ToString();
        }

void Indicator_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 36 of file ProgressBarReTemplatePage.xaml.cs.

        {
            IndicatorWidthText.Text = ((Rectangle)sender).ActualWidth.ToString();
        }

void ProgressBarReTemplatePage_CurrentStateChanged | ( | object | sender,
 |  | VisualStateChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 41 of file ProgressBarReTemplatePage.xaml.cs.

        {
            VisualStateText.Text = e.NewState.Name;
        }

void ProgressBarReTemplatePage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 17 of file ProgressBarReTemplatePage.xaml.cs.

        {
            var layoutRoot = (Grid)VisualTreeHelper.GetChild(TestProgressBar, 0);

            VisualStateManager.GetVisualStateGroups(layoutRoot)[0].CurrentStateChanged += this.ProgressBarReTemplatePage_CurrentStateChanged;
            VisualStateText.Text = VisualStateManager.GetVisualStateGroups(layoutRoot)[0].CurrentState.Name;

            var progressBarRoot = VisualTreeHelper.GetChild(layoutRoot, 1);
            var clip = VisualTreeHelper.GetChild(progressBarRoot, 0);
            var indicator = VisualTreeHelper.GetChild(clip, 0) as Rectangle;

            indicator.SizeChanged += this.Indicator_SizeChanged;

            IndicatorWidthText.Text = indicator.ActualWidth.ToString();
            ROValueText.Text = TestProgressBar.Value.ToString();

            Loaded -= ProgressBarReTemplatePage_Loaded;
        }

void UpdateMinMax_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 46 of file ProgressBarReTemplatePage.xaml.cs.

        {
            TestProgressBar.Maximum = String.IsNullOrEmpty(MaximumInput.Text) ? Double.Parse(MaximumInput.PlaceholderText) : Double.Parse(MaximumInput.Text);
            TestProgressBar.Minimum = String.IsNullOrEmpty(MinimumInput.Text) ? Double.Parse(MinimumInput.PlaceholderText) : Double.Parse(MinimumInput.Text);
            ROValueText.Text = TestProgressBar.Value.ToString();
        }

void UpdatePadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 77 of file ProgressBarReTemplatePage.xaml.cs.

        {
            double paddingLeft = String.IsNullOrEmpty(PaddingLeftInput.Text) ? Double.Parse(PaddingLeftInput.PlaceholderText) : Double.Parse(PaddingLeftInput.Text);
            double paddingRight = String.IsNullOrEmpty(PaddingRightInput.Text) ? Double.Parse(PaddingRightInput.PlaceholderText) : Double.Parse(PaddingRightInput.Text);

            TestProgressBar.Padding = new Thickness(paddingLeft, 0, paddingRight, 0);
            ROValueText.Text = TestProgressBar.Value.ToString();
        }

void UpdateValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 58 of file ProgressBarReTemplatePage.xaml.cs.

        {
            TestProgressBar.Value = String.IsNullOrEmpty(ValueInput.Text) ? Double.Parse(ValueInput.PlaceholderText) : Double.Parse(ValueInput.Text);
            ROValueText.Text = TestProgressBar.Value.ToString();
        }

void UpdateWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 53 of file ProgressBarReTemplatePage.xaml.cs.

        {
            TestProgressBar.Width = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
        }

The documentation for this class was generated from the following file:
  • ProgressBar/TestUI/ProgressBarReTemplatePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ProgressRingAxeTestPage
Public Member Functions

ProgressRingAxeTestPage Class Reference

List of all members.

Public Member Functions

ProgressRingAxeTestPage ()

Detailed Description

Definition at line 6 of file ProgressRingAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

ProgressRingAxeTestPage ( ) [inline]

Definition at line 8 of file ProgressRingAxeTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • ProgressRing/TestUI/ProgressRingAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingCustomLottieSourcePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ProgressRingCustomLottieSourcePage
Public Member Functions | Private Member Functions

ProgressRingCustomLottieSourcePage Class Reference

List of all members.

Public Member Functions

ProgressRingCustomLottieSourcePage ()
void | ChangeValue_Click (object sender, RoutedEventArgs e)
void | UpdateMinMax_Click (object sender, RoutedEventArgs e)
void | UpdateValue_Click (object sender, RoutedEventArgs e)
void | UpdateWidth_Click (object sender, RoutedEventArgs e)

Private Member Functions

void | ProgressRingCustomLottieSourcePage_CurrentStateChanged (object sender, VisualStateChangedEventArgs e)
void | ProgressRingCustomLottieSourcePage_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 9 of file ProgressRingCustomLottieSourcePage.xaml.cs.

Constructor & Destructor Documentation

ProgressRingCustomLottieSourcePage ( ) [inline]

Definition at line 11 of file ProgressRingCustomLottieSourcePage.xaml.cs.

        {
            this.InitializeComponent();
            Loaded += ProgressRingCustomLottieSourcePage_Loaded;

            NavigateToMainPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ProgressRingPage), 0); };
        }

Member Function Documentation

void ChangeValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 67 of file ProgressRingCustomLottieSourcePage.xaml.cs.

        {
            if (TestCustomLottieSourceProgressRing.Value + 1 > TestCustomLottieSourceProgressRing.Maximum)
            {
                TestCustomLottieSourceProgressRing.Value = (int)(TestCustomLottieSourceProgressRing.Minimum + 0.5);
            }
            else
            {
                TestCustomLottieSourceProgressRing.Value += 1;
            }
        }

void ProgressRingCustomLottieSourcePage_CurrentStateChanged | ( | object | sender,
 |  | VisualStateChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 41 of file ProgressRingCustomLottieSourcePage.xaml.cs.

        {
            VisualStateText.Text = e.NewState.Name;

            var layoutRoot = (Grid)VisualTreeHelper.GetChild(TestCustomLottieSourceProgressRing, 0);
            var animatedVisualPlayer = (Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer)VisualTreeHelper.GetChild(layoutRoot, 0);
            IsPlayingText.Text = animatedVisualPlayer.IsPlaying.ToString();
            OpacityText.Text = layoutRoot.Opacity.ToString();
        }

void ProgressRingCustomLottieSourcePage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file ProgressRingCustomLottieSourcePage.xaml.cs.

        {
            var layoutRoot = (Grid)VisualTreeHelper.GetChild(TestCustomLottieSourceProgressRing, 0);

            var commonStatesGroup = VisualStateManager.GetVisualStateGroups(layoutRoot)[0];
            commonStatesGroup.CurrentStateChanged += this.ProgressRingCustomLottieSourcePage_CurrentStateChanged;
            VisualStateText.Text = commonStatesGroup.CurrentState.Name;

            //for (int i = 0; i < commonStatesGroup.Transitions[0].Storyboard.Children.Count; i++)
            //{
            //    // Change the animation to 0 duration to avoid timing issues in the test.
            //    commonStatesGroup.Transitions[0].Storyboard.Children[i].Duration = new Duration(TimeSpan.FromSeconds(0));
            //}

            var animatedVisualPlayer = (Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer)VisualTreeHelper.GetChild(layoutRoot, 0);

            IsPlayingText.Text = animatedVisualPlayer.IsPlaying.ToString();
            OpacityText.Text = layoutRoot.Opacity.ToString();

            Loaded -= ProgressRingCustomLottieSourcePage_Loaded;
        }

void UpdateMinMax_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 51 of file ProgressRingCustomLottieSourcePage.xaml.cs.

        {
            TestCustomLottieSourceProgressRing.Maximum = String.IsNullOrEmpty(MaximumInput.Text) ? Double.Parse(MaximumInput.PlaceholderText) : Double.Parse(MaximumInput.Text);
            TestCustomLottieSourceProgressRing.Minimum = String.IsNullOrEmpty(MinimumInput.Text) ? Double.Parse(MinimumInput.PlaceholderText) : Double.Parse(MinimumInput.Text);
        }

void UpdateValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 63 of file ProgressRingCustomLottieSourcePage.xaml.cs.

        {
            TestCustomLottieSourceProgressRing.Value = String.IsNullOrEmpty(ValueInput.Text) ? Double.Parse(ValueInput.PlaceholderText) : Double.Parse(ValueInput.Text);
        }

void UpdateWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 57 of file ProgressRingCustomLottieSourcePage.xaml.cs.

        {
            TestCustomLottieSourceProgressRing.Width = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
            TestCustomLottieSourceProgressRing.Height = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
        }

The documentation for this class was generated from the following file:
  • ProgressRing/TestUI/ProgressRingCustomLottieSourcePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ProgressRingPage
Public Member Functions | Private Member Functions

ProgressRingPage Class Reference

List of all members.

Public Member Functions

ProgressRingPage ()
void | ChangeValue_Click (object sender, RoutedEventArgs e)
void | UpdateMinMax_Click (object sender, RoutedEventArgs e)
void | UpdateValue_Click (object sender, RoutedEventArgs e)
void | UpdateWidth_Click (object sender, RoutedEventArgs e)

Private Member Functions

void | ProgressRingPage_CurrentStateChanged (object sender, VisualStateChangedEventArgs e)
void | ProgressRingPage_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 16 of file ProgressRingPage.xaml.cs.

Constructor & Destructor Documentation

ProgressRingPage ( ) [inline]

Definition at line 18 of file ProgressRingPage.xaml.cs.

        {
            this.InitializeComponent();
            Loaded += ProgressRingPage_Loaded;

            NavigateToCustomLottieSourcePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ProgressRingCustomLottieSourcePage), 0); };
            NavigateToStoryboardAnimationPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ProgressRingStoryboardAnimationPage), 0); };
        }

Member Function Documentation

void ChangeValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 75 of file ProgressRingPage.xaml.cs.

        {
            if (TestProgressRing.Value + 1 > TestProgressRing.Maximum)
            {
                TestProgressRing.Value = (int)(TestProgressRing.Minimum + 0.5);
            }
            else
            {
                TestProgressRing.Value += 1;
            }
        }

void ProgressRingPage_CurrentStateChanged | ( | object | sender,
 |  | VisualStateChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file ProgressRingPage.xaml.cs.

        {
            VisualStateText.Text = e.NewState.Name;

            var layoutRoot = (Grid)VisualTreeHelper.GetChild(TestProgressRing, 0);
            var animatedVisualPlayer = (Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer)VisualTreeHelper.GetChild(layoutRoot, 0);
            IsPlayingText.Text = animatedVisualPlayer.IsPlaying.ToString();
            OpacityText.Text = layoutRoot.Opacity.ToString();
        }

void ProgressRingPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 27 of file ProgressRingPage.xaml.cs.

        {
            var layoutRoot = (Grid)VisualTreeHelper.GetChild(TestProgressRing, 0);

            var commonStatesGroup = VisualStateManager.GetVisualStateGroups(layoutRoot)[0];
            commonStatesGroup.CurrentStateChanged += this.ProgressRingPage_CurrentStateChanged;
            VisualStateText.Text = commonStatesGroup.CurrentState.Name;

            //for (int i = 0; i < commonStatesGroup.Transitions[0].Storyboard.Children.Count; i++)
            //{
            //    // Change the animation to 0 duration to avoid timing issues in the test.
            //    commonStatesGroup.Transitions[0].Storyboard.Children[i].Duration = new Duration(TimeSpan.FromSeconds(0));
            //}

            var animatedVisualPlayer = (Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer)VisualTreeHelper.GetChild(layoutRoot, 0);

            IsPlayingText.Text = animatedVisualPlayer.IsPlaying.ToString();
            OpacityText.Text = layoutRoot.Opacity.ToString();

            Loaded -= ProgressRingPage_Loaded;
        }

void UpdateMinMax_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 59 of file ProgressRingPage.xaml.cs.

        {
            TestProgressRing.Maximum = String.IsNullOrEmpty(MaximumInput.Text) ? Double.Parse(MaximumInput.PlaceholderText) : Double.Parse(MaximumInput.Text);
            TestProgressRing.Minimum = String.IsNullOrEmpty(MinimumInput.Text) ? Double.Parse(MinimumInput.PlaceholderText) : Double.Parse(MinimumInput.Text);
        }

void UpdateValue_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 71 of file ProgressRingPage.xaml.cs.

        {
            TestProgressRing.Value = String.IsNullOrEmpty(ValueInput.Text) ? Double.Parse(ValueInput.PlaceholderText) : Double.Parse(ValueInput.Text);
        }

void UpdateWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 65 of file ProgressRingPage.xaml.cs.

        {
            TestProgressRing.Width = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
            TestProgressRing.Height = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
        }

The documentation for this class was generated from the following file:
  • ProgressRing/TestUI/ProgressRingPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingStoryboardAnimationPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ProgressRingStoryboardAnimationPage
Public Member Functions | Private Member Functions

ProgressRingStoryboardAnimationPage Class Reference

List of all members.

Public Member Functions

ProgressRingStoryboardAnimationPage ()
void | UpdateWidth_Click (object sender, RoutedEventArgs e)

Private Member Functions

void | ProgressRingStoryboardAnimationPage_CurrentStateChanged (object sender, VisualStateChangedEventArgs e)
void | ProgressRingStoryboardAnimationPage_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 8 of file ProgressRingStoryboardAnimationPage.xaml.cs.

Constructor & Destructor Documentation

ProgressRingStoryboardAnimationPage ( ) [inline]

Definition at line 10 of file ProgressRingStoryboardAnimationPage.xaml.cs.

        {
            this.InitializeComponent();
            Loaded += ProgressRingStoryboardAnimationPage_Loaded;

            NavigateToMainPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ProgressRingPage), 0); };
        }

Member Function Documentation

void ProgressRingStoryboardAnimationPage_CurrentStateChanged | ( | object | sender,
 |  | VisualStateChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 29 of file ProgressRingStoryboardAnimationPage.xaml.cs.

        {
            VisualStateText.Text = e.NewState.Name;
        }

void ProgressRingStoryboardAnimationPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 18 of file ProgressRingStoryboardAnimationPage.xaml.cs.

        {
            var layoutRoot = (Grid)VisualTreeHelper.GetChild(TestStoryboardAnimationProgressRing, 0);

            var commonStatesGroup = VisualStateManager.GetVisualStateGroups(layoutRoot)[0];
            commonStatesGroup.CurrentStateChanged += this.ProgressRingStoryboardAnimationPage_CurrentStateChanged;
            VisualStateText.Text = commonStatesGroup.CurrentState.Name;

            Loaded -= ProgressRingStoryboardAnimationPage_Loaded;
        }

void UpdateWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 34 of file ProgressRingStoryboardAnimationPage.xaml.cs.

        {
            TestStoryboardAnimationProgressRing.Width = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
            TestStoryboardAnimationProgressRing.Height = String.IsNullOrEmpty(WidthInput.Text) ? Double.Parse(WidthInput.PlaceholderText) : Double.Parse(WidthInput.Text);
        }

The documentation for this class was generated from the following file:
  • ProgressRing/TestUI/ProgressRingStoryboardAnimationPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PTRPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • PTRPage
Public Member Functions

PTRPage Class Reference

List of all members.

Public Member Functions

PTRPage ()

Detailed Description

Definition at line 23 of file PTRPage.xaml.cs.

Constructor & Destructor Documentation

PTRPage ( ) [inline]

Definition at line 25 of file PTRPage.xaml.cs.

        {
            this.InitializeComponent();

            RefreshContainerButton.Click += delegate { Frame.Navigate(typeof(RefreshContainerPage), 0); };
            RefreshContainerOnImageButton.Click += delegate { Frame.Navigate(typeof(RefreshContainerOnImagePage), 0); };
            RefreshVisualizerButton.Click += delegate { Frame.Navigate(typeof(RefreshVisualizerPage), 0); };
        }

The documentation for this class was generated from the following file:
  • PullToRefresh/TestUI/PTRPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrushPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RadialGradientBrushPage
Public Member Functions | Public Attributes | Properties | Private Member Functions | Private Attributes

RadialGradientBrushPage Class Reference

List of all members.

Public Member Functions

RadialGradientBrushPage ()
string[] | GetColorSpaceValueNames ()
string[] | GetSpreadMethodValueNames ()

Public Attributes

RadialGradientBrush DynamicGradientBrush

Properties

string | DynamicGradientBrushInterpolationSpace [get, set]
string | DynamicGradientBrushSpreadMethod [get, set]

Private Member Functions

void | AddGradientStopButton_Click (object sender, RoutedEventArgs e)
void | AddRandomGradientStop (RadialGradientBrush gradientBrush)
async void | GenerateRenderTargetBitmapButton_Click (object sender, RoutedEventArgs e)
Color | GetPixelAtPoint (Point p, RenderTargetBitmap rtb, byte[] pixelArray)
void | RandomizeCenter (RadialGradientBrush gradientBrush)
void | RandomizeCenterButton_Click (object sender, RoutedEventArgs e)
void | RandomizeGradientOrigin (RadialGradientBrush gradientBrush)
void | RandomizeGradientOriginButton_Click (object sender, RoutedEventArgs e)
void | RandomizeRadius (RadialGradientBrush gradientBrush)
void | RandomizeRadiusButton_Click (object sender, RoutedEventArgs e)
void | RemoveGradientStopButton_Click (object sender, RoutedEventArgs e)
void | RemoveRandomGradientStop (RadialGradientBrush gradientBrush)
void | ReplaceGradientButton_Click (object sender, RoutedEventArgs e)
void | ToggleMappingMode (RadialGradientBrush gradientBrush)
void | ToggleMappingModeButton_Click (object sender, RoutedEventArgs e)

Private Attributes

Random | _random

Detailed Description

Definition at line 24 of file RadialGradientBrushPage.xaml.cs.

Constructor & Destructor Documentation

RadialGradientBrushPage ( ) [inline]

Definition at line 29 of file RadialGradientBrushPage.xaml.cs.

        {
            InitializeComponent();
            _random = new Random();
        }

Member Function Documentation

void AddGradientStopButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 109 of file RadialGradientBrushPage.xaml.cs.

        {
            AddRandomGradientStop(DynamicGradientBrush);
        }

void AddRandomGradientStop ( RadialGradientBrush gradientBrush ) [inline, private]

Definition at line 163 of file RadialGradientBrushPage.xaml.cs.

        {
            if (gradientBrush != null)
            {
                var stop = new GradientStop();
                stop.Color = Color.FromArgb(Byte.MaxValue, (byte)_random.Next(256), (byte)_random.Next(256), (byte)_random.Next(256));
                stop.Offset = _random.NextDouble();

                gradientBrush.GradientStops.Add(stop);
            }
        }

async void GenerateRenderTargetBitmapButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 139 of file RadialGradientBrushPage.xaml.cs.

        {
            var rtb = new RenderTargetBitmap();
            await rtb.RenderAsync(GradientRectangle);

            RenderTargetBitmapResultRectangle.Fill = new ImageBrush() { ImageSource = rtb };

            var pixelBuffer = await rtb.GetPixelsAsync();
            byte[] pixelArray = pixelBuffer.ToArray();

            // Sample top left and center pixels to verify rendering is correct.
            var centerColor = GetPixelAtPoint(new Point(rtb.PixelWidth / 2, rtb.PixelHeight / 2), rtb, pixelArray);
            var outerColor = GetPixelAtPoint(new Point(0, 0), rtb, pixelArray);

            if (centerColor == Colors.Orange && outerColor == Colors.Green)
            {
                ColorMatchTestResult.Text = "Passed";
            }
            else
            {
                ColorMatchTestResult.Text = "Failed";
            }
        }

string [] GetColorSpaceValueNames ( ) [inline]

Definition at line 35 of file RadialGradientBrushPage.xaml.cs.

        {
            return Enum.GetNames(typeof(CompositionColorSpace));
        }

Color GetPixelAtPoint | ( | Point | p,
 |  | RenderTargetBitmap | rtb,
 |  | byte[] | pixelArray |
 | ) |  |  | [inline, private]

Definition at line 242 of file RadialGradientBrushPage.xaml.cs.

        {
            Color pixelColor = new Color();
            int x = (int)(p.X);
            int y = (int)(p.Y);
            int pointPosition = 4 * (rtb.PixelWidth * y + x);

            pixelColor.B = pixelArray[pointPosition];
            pixelColor.G = pixelArray[pointPosition + 1];
            pixelColor.R = pixelArray[pointPosition + 2];
            pixelColor.A = pixelArray[pointPosition + 3];

            return pixelColor;
        }

string [] GetSpreadMethodValueNames ( ) [inline]

Definition at line 62 of file RadialGradientBrushPage.xaml.cs.

        {
            return Enum.GetNames(typeof(GradientSpreadMethod));
        }

void RandomizeCenter ( RadialGradientBrush gradientBrush ) [inline, private]

Definition at line 198 of file RadialGradientBrushPage.xaml.cs.

        {
            if (gradientBrush != null)
            {
                if (gradientBrush.MappingMode == BrushMappingMode.Absolute)
                {
                    gradientBrush.Center = new Point(_random.Next(0, 100), _random.Next(0, 100));
                }
                else
                {
                    gradientBrush.Center = new Point(_random.NextDouble(), _random.NextDouble());
                }
            }
        }

void RandomizeCenterButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 124 of file RadialGradientBrushPage.xaml.cs.

        {
            RandomizeCenter(DynamicGradientBrush);
        }

void RandomizeGradientOrigin ( RadialGradientBrush gradientBrush ) [inline, private]

Definition at line 183 of file RadialGradientBrushPage.xaml.cs.

        {
            if (gradientBrush != null)
            {
                if (gradientBrush.MappingMode == BrushMappingMode.Absolute)
                {
                    gradientBrush.GradientOrigin = new Point(_random.Next(0, 100), _random.Next(0, 100));
                }
                else
                {
                    gradientBrush.GradientOrigin = new Point(_random.Next(-100, 100) / 100f, _random.Next(-100, 100) / 100f);
                }
            }
        }

void RandomizeGradientOriginButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 119 of file RadialGradientBrushPage.xaml.cs.

        {
            RandomizeGradientOrigin(DynamicGradientBrush);
        }

void RandomizeRadius ( RadialGradientBrush gradientBrush ) [inline, private]

Definition at line 213 of file RadialGradientBrushPage.xaml.cs.

        {
            if (gradientBrush != null)
            {
                if (gradientBrush.MappingMode == BrushMappingMode.Absolute)
                {
                    gradientBrush.RadiusX = _random.Next(10, 200);
                    gradientBrush.RadiusY = _random.Next(10, 200);
                }
                else
                {
                    gradientBrush.RadiusX = _random.NextDouble();
                    gradientBrush.RadiusY = _random.NextDouble();
                }
            }
        }

void RandomizeRadiusButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 129 of file RadialGradientBrushPage.xaml.cs.

        {
            RandomizeRadius(DynamicGradientBrush);
        }

void RemoveGradientStopButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 114 of file RadialGradientBrushPage.xaml.cs.

        {
            RemoveRandomGradientStop(DynamicGradientBrush);
        }

void RemoveRandomGradientStop ( RadialGradientBrush gradientBrush ) [inline, private]

Definition at line 175 of file RadialGradientBrushPage.xaml.cs.

        {
            if (gradientBrush != null && gradientBrush.GradientStops.Count > 0)
            {
                gradientBrush.GradientStops.RemoveAt(_random.Next(0, gradientBrush.GradientStops.Count - 1));
            }
        }

void ReplaceGradientButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file RadialGradientBrushPage.xaml.cs.

        {
            DynamicGradientBrush = new RadialGradientBrush();
            DynamicGradientBrush.FallbackColor = Color.FromArgb(Byte.MaxValue, (byte)_random.Next(256), (byte)_random.Next(256), (byte)_random.Next(256));

            // Set brush before adding stops
            RectangleWithDynamicGradient.Fill = DynamicGradientBrush;

            DynamicGradientBrush.GradientStops.Clear();
            for (int i = 0; i < _random.Next(2, 5); i++)
            {
                AddRandomGradientStop(DynamicGradientBrush);
            }

            // Set brush after adding stops
            TextBlockWithDynamicGradient.Foreground = DynamicGradientBrush;

            Bindings.Update();
        }

void ToggleMappingMode ( RadialGradientBrush gradientBrush ) [inline, private]

Definition at line 230 of file RadialGradientBrushPage.xaml.cs.

        {
            if (gradientBrush != null)
            {
                gradientBrush.MappingMode = ((gradientBrush.MappingMode == BrushMappingMode.RelativeToBoundingBox) ? BrushMappingMode.Absolute : BrushMappingMode.RelativeToBoundingBox);

                RandomizeCenter(gradientBrush);
                RandomizeRadius(gradientBrush);
                RandomizeGradientOrigin(gradientBrush);
            }
        }

void ToggleMappingModeButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 134 of file RadialGradientBrushPage.xaml.cs.

        {
            ToggleMappingMode(DynamicGradientBrush);
        }

Member Data Documentation

Random _random [private]

Definition at line 27 of file RadialGradientBrushPage.xaml.cs.

RadialGradientBrush DynamicGradientBrush

Definition at line 26 of file RadialGradientBrushPage.xaml.cs.

Property Documentation

string DynamicGradientBrushInterpolationSpace [get, set]

Definition at line 41 of file RadialGradientBrushPage.xaml.cs.

string DynamicGradientBrushSpreadMethod [get, set]

Definition at line 68 of file RadialGradientBrushPage.xaml.cs.

The documentation for this class was generated from the following file:
  • RadialGradientBrush/TestUI/RadialGradientBrushPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RadioButtonsPage
Public Member Functions | Private Member Functions | Private Attributes

RadioButtonsPage Class Reference

List of all members.

Public Member Functions

RadioButtonsPage ()

Private Member Functions

void | ClearRadioButtonsEventsButton_Click (object sender, RoutedEventArgs e)
void | FocusSelectedItemButton_Clicked (object sender, RoutedEventArgs e)
int | getIndexToSelect ()
IEnumerable | GetItemsCollection ()
void | InsertDisplayRadioButtonButton_Click (object sender, RoutedEventArgs e)
void | ItemTypeComboBoxSelectionChanged (object sender, SelectionChangedEventArgs e)
void | RadioButtonsPage_Loaded (object sender, RoutedEventArgs e)
void | RadioButtonsTestHooks_LayoutChanged (RadioButtons sender, object args)
void | RootGotFocus (object sender, RoutedEventArgs e)
void | Select5ThenChangeSourceButton_Clicked (object sender, RoutedEventArgs e)
void | SelectByIndexButton_Click (object sender, RoutedEventArgs e)
void | SelectByItemButton_Click (object sender, RoutedEventArgs e)
void | SetBorderWidthButton_Click (object sender, RoutedEventArgs e)
void | SetMaxColumnsButton_Click (object sender, RoutedEventArgs e)
void | SetNumberOfItemsButton_Click (object sender, RoutedEventArgs e)
void | SourceComboBoxSelectionChanged (object sender, SelectionChangedEventArgs e)
void | TestRadioButtons_GotFocus (object sender, RoutedEventArgs e)
void | TestRadioButtons_LostFocus (object sender, RoutedEventArgs e)
void | TestRadioButtons_SelectionChanged (object sender, SelectionChangedEventArgs e)
bool | UpdateDisplayRadioButton ()
void | UpdateDisplayRadioButtonButton_Click (object sender, RoutedEventArgs e)
void | UpdateRadioButtonsSource ()

Private Attributes

bool | m_loaded = false
ObservableCollection< RadioButton > | m_radioButtonItemCollection
ObservableCollection< string > | m_stringItemCollection

Detailed Description

Definition at line 22 of file RadioButtonsPage.xaml.cs.

Constructor & Destructor Documentation

RadioButtonsPage ( ) [inline]

Definition at line 28 of file RadioButtonsPage.xaml.cs.

        {
            this.InitializeComponent();
            m_stringItemCollection = new ObservableCollection<string>();
            m_radioButtonItemCollection = new ObservableCollection<RadioButton>();
            this.Loaded += RadioButtonsPage_Loaded;
            this.SecondTestRadioButton.SelectedItem = this.TheRadioButton;
        }

Member Function Documentation

void ClearRadioButtonsEventsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 269 of file RadioButtonsPage.xaml.cs.

        {
        }

void FocusSelectedItemButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 235 of file RadioButtonsPage.xaml.cs.

        {
            var stackPanel = VisualTreeHelper.GetChild(TestRadioButtons, 0);
            var repeater = (ItemsRepeater)VisualTreeHelper.GetChild(stackPanel, 1);
            ((Control)repeater.TryGetElement(TestRadioButtons.SelectedIndex)).Focus(FocusState.Keyboard);
        }

int getIndexToSelect ( ) [inline, private]

Definition at line 192 of file RadioButtonsPage.xaml.cs.

        {
            if (Int32.TryParse(IndexToSelectTextBlock.Text, out int value))
            {
                if (value >= m_radioButtonItemCollection.Count)
                {
                    IndexToSelectTextBlock.Foreground = new SolidColorBrush(Colors.DarkRed);
                    return -2;
                }
                if (value < -1)
                {
                    IndexToSelectTextBlock.Foreground = new SolidColorBrush(Colors.DarkRed);
                    return -2;
                }
                IndexToSelectTextBlock.Foreground = new SolidColorBrush(Colors.Black);
                return value;
            }
            IndexToSelectTextBlock.Foreground = new SolidColorBrush(Colors.DarkRed);
            return -2;
        }

IEnumerable GetItemsCollection ( ) [inline, private]

Definition at line 295 of file RadioButtonsPage.xaml.cs.

        {
            if (ItemTypeComboBox.SelectedItem == StringsComboBoxItem)
            {
                InsertDisplayRadioButtonButton.IsEnabled = false;
                return m_stringItemCollection;
            }
            else
            {
                InsertDisplayRadioButtonButton.IsEnabled = true;
                return m_radioButtonItemCollection;
            }
        }

void InsertDisplayRadioButtonButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 217 of file RadioButtonsPage.xaml.cs.

        {
            if(UpdateDisplayRadioButton())
            {
                var radioButton = new RadioButton();
                radioButton.Content = DisplayRadioButton.Content;
                radioButton.IsEnabled = !(bool)CustomDisabledCheckBox.IsChecked;
                radioButton.IsChecked = (bool)CustomCheckedCheckBox.IsChecked;
                m_radioButtonItemCollection.Insert(Int32.Parse(CustomIndexTextBox.Text), radioButton);

                if (SourceComboBox.SelectedItem == ItemsComboBoxItem)
                {
                    UpdateRadioButtonsSource();
                }
            }
            TestRadioButtons_SelectionChanged(null, null);
        }

void ItemTypeComboBoxSelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 150 of file RadioButtonsPage.xaml.cs.

        {
            UpdateRadioButtonsSource();
        }

void RadioButtonsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file RadioButtonsPage.xaml.cs.

        {
            m_loaded = true;
            RadioButtonsTestHooks.SetTestHooksEnabled(TestRadioButtons, true);
            RadioButtonsTestHooks.LayoutChanged += RadioButtonsTestHooks_LayoutChanged;

            SetMaxColumnsButton_Click(null, null);
            SetNumberOfItemsButton_Click(null, null);
            UpdateRadioButtonsSource();
            UpdateDisplayRadioButton();
        }

void RadioButtonsTestHooks_LayoutChanged | ( | RadioButtons | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 49 of file RadioButtonsPage.xaml.cs.

        {
            LayoutNumberOfRowsTextBlock.Text = RadioButtonsTestHooks.GetRows(sender).ToString();
            LayoutNumberOfColumnsTextBlock.Text = RadioButtonsTestHooks.GetColumns(sender).ToString();
            LayoutNumberOfLargerColumnsTextBlock.Text = RadioButtonsTestHooks.GetLargerColumns(sender).ToString();
        }

void RootGotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 85 of file RadioButtonsPage.xaml.cs.

        {
            FocusedItemTextBlock.Text = e.OriginalSource.ToString();
        }

void Select5ThenChangeSourceButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 263 of file RadioButtonsPage.xaml.cs.

        {
            TestRadioButtons.SelectedIndex = 5;
            ItemTypeComboBox.SelectedIndex = (ItemTypeComboBox.SelectedIndex + 1) % 2;
        }

void SelectByIndexButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 155 of file RadioButtonsPage.xaml.cs.

        {
            var index = getIndexToSelect();
            if (index != -2)
            {
                TestRadioButtons.SelectedIndex = index;
            }
        }

void SelectByItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 164 of file RadioButtonsPage.xaml.cs.

        {
            var index = getIndexToSelect();
            if (index >= 0)
            {
                if (ItemTypeComboBox.SelectedItem == StringsComboBoxItem)
                {
                    if (SourceComboBox.SelectedItem == ItemsSourceComboBoxItem)
                    {
                        TestRadioButtons.SelectedItem = m_stringItemCollection[index];
                    }
                    else if (SourceComboBox.SelectedItem == ItemsComboBoxItem)
                    {
                        TestRadioButtons.SelectedItem = TestRadioButtons.Items[index];
                    }
                }
                else if (ItemTypeComboBox.SelectedItem == RadioButtonElementsComboBoxItem)
                {
                    TestRadioButtons.SelectedItem = m_radioButtonItemCollection[index];
                }
            }
            else
            {
                TestRadioButtons.SelectedItem = null;
            }

        }

void SetBorderWidthButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 242 of file RadioButtonsPage.xaml.cs.

        {
            if(this.BorderWidthTextBox.Text == "inf")
            {
                this.TestRadioButtonsBorder.Width = float.NaN;
                this.BorderWidthTextBox.BorderBrush = new SolidColorBrush(Colors.Black);
            }
            else
            {
                if(float.TryParse(this.BorderWidthTextBox.Text, out float value))
                {
                    this.TestRadioButtonsBorder.Width = value;
                    this.BorderWidthTextBox.BorderBrush = new SolidColorBrush(Colors.Black);
                }
                else
                {
                    this.BorderWidthTextBox.BorderBrush = new SolidColorBrush(Colors.DarkRed);
                }
            }
        }

void SetMaxColumnsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 104 of file RadioButtonsPage.xaml.cs.

        {
            if (UInt32.TryParse(MaxColumnsTextBlock.Text, out uint value))
            {
                TestRadioButtons.MaxColumns = (int)value;
                MaxColumnsTextBlock.BorderBrush = new SolidColorBrush(Colors.Black);
            }
            else
            {
                MaxColumnsTextBlock.BorderBrush = new SolidColorBrush(Colors.Red);
            }
        }

void SetNumberOfItemsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file RadioButtonsPage.xaml.cs.

        {
            if (UInt32.TryParse(NumberOfItemsTextBlock.Text, out uint value))
            {
                m_stringItemCollection.Clear();
                m_radioButtonItemCollection.Clear();
                for (int i = 0; i<value; i++)
                {
                    m_stringItemCollection.Add(i.ToString());
                    var radioButton = new RadioButton();
                    radioButton.Content = i.ToString() + "Radio Button";
                    radioButton.SetValue(AutomationProperties.NameProperty, "Radio Button " + i);
                    radioButton.Name = "Radio Button " + i;
                    m_radioButtonItemCollection.Add(radioButton);
                }

                if(SourceComboBox.SelectedItem == ItemsComboBoxItem)
                {
                    UpdateRadioButtonsSource();
                }
                NumberOfItemsTextBlock.BorderBrush = new SolidColorBrush(Colors.Black);
            }
            else
            {
                NumberOfItemsTextBlock.BorderBrush = new SolidColorBrush(Colors.Red);
            }
        }

void SourceComboBoxSelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 145 of file RadioButtonsPage.xaml.cs.

        {
            UpdateRadioButtonsSource();
        }

void TestRadioButtons_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 90 of file RadioButtonsPage.xaml.cs.

        {
            var stackPanel = VisualTreeHelper.GetChild(TestRadioButtons, 0);
            var repeater = (ItemsRepeater)VisualTreeHelper.GetChild(stackPanel, 1);
            FocusedIndexTextBlock.Text = repeater.GetElementIndex((UIElement)e.OriginalSource).ToString();
            RadioButtonsHasFocusCheckBox.IsChecked = true;
        }

void TestRadioButtons_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file RadioButtonsPage.xaml.cs.

        {
            FocusedIndexTextBlock.Text = "-1";
            RadioButtonsHasFocusCheckBox.IsChecked = false;
        }

void TestRadioButtons_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file RadioButtonsPage.xaml.cs.

        {
            var index = TestRadioButtons.SelectedIndex;
            SelectedIndexTextBlock.Text = index.ToString();
            if (TestRadioButtons.SelectedItem != null)
            {
                SelectedItemTextBlock.Text = TestRadioButtons.SelectedItem.ToString();
            }
            else
            {
                SelectedItemTextBlock.Text = "null";
            }

            if (index > 0)
            {
                var radioButton = TestRadioButtons.ContainerFromIndex(index);
                if (radioButton != null)
                {
                    SelectedPositionInSetTextBlock.Text = radioButton.GetValue(AutomationProperties.PositionInSetProperty).ToString();
                    SelectedSizeOfSetTextBlock.Text = radioButton.GetValue(AutomationProperties.SizeOfSetProperty).ToString();
                }
            }
            else
            {
                SelectedPositionInSetTextBlock.Text = "-1";
                SelectedSizeOfSetTextBlock.Text = "-1";
            }
        }

bool UpdateDisplayRadioButton ( ) [inline, private]

Definition at line 309 of file RadioButtonsPage.xaml.cs.

        {
            if (UInt32.TryParse(CustomIndexTextBox.Text, out uint value))
            {
                if (value > m_radioButtonItemCollection.Count)
                {
                    DisplayRadioButtonErrorMessage.Text = "Index out of Range";
                    DisplayRadioButtonErrorMessage.Foreground = new SolidColorBrush(Colors.DarkRed);
                    return false;
                }
            }
            else
            {
                DisplayRadioButtonErrorMessage.Text = "Malformed Index";
                DisplayRadioButtonErrorMessage.Foreground = new SolidColorBrush(Colors.DarkRed);
                return false;
            }

            DisplayRadioButton.Content = CustomContentTextBox.Text;

            DisplayRadioButtonErrorMessage.Text = "Okay";
            DisplayRadioButtonErrorMessage.Foreground = new SolidColorBrush(Colors.Green);
            return true;
        }

void UpdateDisplayRadioButtonButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 213 of file RadioButtonsPage.xaml.cs.

        {
            UpdateDisplayRadioButton();
        }

void UpdateRadioButtonsSource ( ) [inline, private]

Definition at line 273 of file RadioButtonsPage.xaml.cs.

        {
            if (m_loaded)
            {
                var source = SourceComboBox.SelectedItem;
                if (source == ItemsComboBoxItem)
                {
                    TestRadioButtons.Items.Clear();
                    TestRadioButtons.ItemsSource = null;
                    foreach (var item in GetItemsCollection())
                    {
                        TestRadioButtons.Items.Add(item);
                    }
                }
                else if (source == ItemsSourceComboBoxItem)
                {
                    TestRadioButtons.ItemsSource = GetItemsCollection();
                    TestRadioButtons.Items.Clear();
                }
            }
        }

Member Data Documentation

bool m_loaded = false [private]

Definition at line 26 of file RadioButtonsPage.xaml.cs.

ObservableCollection<RadioButton> m_radioButtonItemCollection [private]

Definition at line 25 of file RadioButtonsPage.xaml.cs.

ObservableCollection<string> m_stringItemCollection [private]

Definition at line 24 of file RadioButtonsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • RadioButtons/TestUI/RadioButtonsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItemPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RadioMenuFlyoutItemPage
Public Member Functions | Private Member Functions | Private Attributes

RadioMenuFlyoutItemPage Class Reference

List of all members.

Public Member Functions

RadioMenuFlyoutItemPage ()

Private Member Functions

void | IsCheckedChanged (DependencyObject o, DependencyProperty p)
void | RegisterItem (MenuFlyoutItemBase item)
void | UpdateTextState (RadioMenuFlyoutItem item, TextBlock textBlock)

Private Attributes

Dictionary< string, TextBlock > | itemStates

Detailed Description

Definition at line 19 of file RadioMenuFlyoutItemPage.xaml.cs.

Constructor & Destructor Documentation

RadioMenuFlyoutItemPage ( ) [inline]

Definition at line 23 of file RadioMenuFlyoutItemPage.xaml.cs.

        {
            this.InitializeComponent();

            itemStates = new Dictionary<string, TextBlock>();

            IconMenuFlyoutItem.Icon = new SymbolIcon(Symbol.Calendar);
            IconRadioMenuFlyoutItem.Icon = new SymbolIcon(Symbol.Calculator);
            IconRadioMenuFlyoutItem2.Icon = new SymbolIcon(Symbol.Calculator);

            ItemNames.Spacing = 4;
            ItemStates.Spacing = 4;

            // register all RadioMenuFlyoutItems
            foreach (MenuFlyoutItemBase item in ButtonMenuFlyout.Items)
            {
                RegisterItem(item);
            }
            foreach(MenuFlyoutItemBase item in ButtonSubMenuFlyout.Items)
            {
                RegisterItem(item);
            }
            foreach (MenuFlyoutItemBase item in RadioSubMenu.Items)
            {
                RegisterItem(item);
            }
        }

Member Function Documentation

void IsCheckedChanged | ( | DependencyObject | o,
 |  | DependencyProperty | p |
 | ) |  |  | [inline, private]

Definition at line 72 of file RadioMenuFlyoutItemPage.xaml.cs.

        {
            RadioMenuFlyoutItem radioItem = o as RadioMenuFlyoutItem;
            TextBlock stateText;
            if (itemStates.TryGetValue(radioItem.Text, out stateText))
            {
                UpdateTextState(radioItem, stateText);
            }
        }

void RegisterItem ( MenuFlyoutItemBase item ) [inline, private]

Definition at line 51 of file RadioMenuFlyoutItemPage.xaml.cs.

        {
            if (item is RadioMenuFlyoutItem)
            {
                RadioMenuFlyoutItem radioItem = item as RadioMenuFlyoutItem;

                radioItem.RegisterPropertyChangedCallback(RadioMenuFlyoutItem.IsCheckedProperty, new DependencyPropertyChangedCallback(IsCheckedChanged));

                TextBlock nameText = new TextBlock();
                nameText.Text = radioItem.Text;
                ItemNames.Children.Add(nameText);

                TextBlock stateText = new TextBlock();
                AutomationProperties.SetName(stateText, radioItem.Text + "State");
                UpdateTextState(radioItem, stateText);
                ItemStates.Children.Add(stateText);

                itemStates.Add(radioItem.Text, stateText);
            }
        }

void UpdateTextState | ( | RadioMenuFlyoutItem | item,
 |  | TextBlock | textBlock |
 | ) |  |  | [inline, private]

Definition at line 82 of file RadioMenuFlyoutItemPage.xaml.cs.

        {
            textBlock.Text = item.IsChecked ? "Checked" : "Unchecked";
        }

Member Data Documentation

Dictionary<string, TextBlock> itemStates [private]

Definition at line 21 of file RadioMenuFlyoutItemPage.xaml.cs.

The documentation for this class was generated from the following file:
  • RadioMenuFlyoutItem/TestUI/RadioMenuFlyoutItemPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RatingControlPage
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

RatingControlPage Class Reference

List of all members.

Public Member Functions

RatingControlPage ()

Protected Member Functions

override void | OnNavigatingFrom (NavigatingCancelEventArgs e)

Properties

CompositionPropertySet | AnimatedValuesSpy [get, set]
bool | IsRenderingHooked [get, set]
ExpressionAnimation | ScaleAnimation [get, set]
uint | UIThreadTicksForValuesSpy [get, set]

Private Member Functions

void | Button_Click (object sender, RoutedEventArgs e)
void | ChangeCustomImagesTwoType_Click (object sender, RoutedEventArgs e)
void | CheckSpyingTicksRequirement ()
void | CollapsedRatingControlButton_Click (object sender, RoutedEventArgs e)
void | ColorFlipButton_Click (object sender, RoutedEventArgs e)
void | CompositionTarget_Rendering (object sender, object e)
void | CustomImages_Loaded (object sender, RoutedEventArgs e)
void | CustomImagesTwo_Loaded (object sender, RoutedEventArgs e)
void | DisabledFallbackRating_Loaded (object sender, RoutedEventArgs e)
void | DisabledImageFallbackRating_Loaded (object sender, RoutedEventArgs e)
void | DispatcherTimer_Tick (object sender, object e)
void | MagicDisengager_ValueChanged (RatingControl sender, object args)
void | MakeTheAboveRatingSquares_Click (object sender, RoutedEventArgs e)
void | MaxRating9Unset_ValueChanged (RatingControl sender, object args)
void | MyRatingIsClearEnabled_ValueChanged (RatingControl sender, object args)
void | MyRatingReadOnly_ValueChanged (RatingControl sender, object args)
void | NoFallbackRating_Loaded (object sender, RoutedEventArgs e)
void | PerformGlyphVerification (RatingControl rc, String expectedGlyph, TextBlock resultTb, String stackPanelName, SolidColorBrush expectedColor=null)
void | PerformImageVerification (RatingControl rc, String expectedUri, TextBlock resultTb, String stackPanelName, SolidColorBrush expectedColor=null)
void | PlaceholderFallbackRating_Loaded (object sender, RoutedEventArgs e)
void | PlaceholderImageFallbackRating_Loaded (object sender, RoutedEventArgs e)
void | PointerOverFallbackRating_PointerMoved (object sender, PointerRoutedEventArgs e)
void | PointerOverImageFallbackRating_PointerMoved (object sender, PointerRoutedEventArgs e)
void | PointerOverPlaceholderFallbackRating_PointerMoved (object sender, PointerRoutedEventArgs e)
void | PointerOverPlaceholderImageFallbackRating_PointerMoved (object sender, PointerRoutedEventArgs e)
void | RatingBindingSampleButton_Click (object sender, RoutedEventArgs e)
void | RatingControlPage_Loaded (object sender, RoutedEventArgs e)
void | RatingXBindSampleButton_Click (object sender, RoutedEventArgs e)
void | ResetSpyOutput ()
DependencyObject | SearchVisualTree (DependencyObject root, string name)
void | SetupAnimatedValuesSpy ()
void | SpyAnimatedValues ()
void | StartAnimatedValuesSpy ()
void | StopAnimatedValuesSpy ()
void | TestRatingControl_Loaded (object sender, RoutedEventArgs e)
void | TestRatingControl_ValueChanged (RatingControl sender, object args)
void | TestRatingControlButton_Click (object sender, RoutedEventArgs e)
SolidColorBrush | ThemeResourceNameToColorBrush (String themeResource)
void | TickForValuesSpy ()
void | UnsetFallbackRating_Loaded (object sender, RoutedEventArgs e)
void | UnsetImageFallbackRating_Loaded (object sender, RoutedEventArgs e)
void | ValueChangeInMarkup_ValueChanged (RatingControl sender, object args)

Private Attributes

SolidColorBrush | _aqua = new SolidColorBrush(Microsoft.UI.Colors.Aqua)
DispatcherTimer | _dt
UIElement | _secondTextBlockUI
SolidColorBrush | _tomato = new SolidColorBrush(Microsoft.UI.Colors.Tomato)

Detailed Description

Definition at line 27 of file RatingControlPage.xaml.cs.

Constructor & Destructor Documentation

RatingControlPage ( ) [inline]

Definition at line 35 of file RatingControlPage.xaml.cs.

        {
            this.InitializeComponent();

            TestRatingControl.ValueChanged += TestRatingControl_ValueChanged;

            RatingDarkTheme.PlaceholderValue = 1.5;

            MyRatingReadOnlyTextBlock.Text = "2.2";
            MyRatingReadOnlyWithPlaceholder.PlaceholderValue = 3.3;

            DisabledWithValue.Value = 3;
            DisabledWithPlaceholderValue.PlaceholderValue = 3;

            CustomImages.Value = 3.0;
            CustomImages.PlaceholderValue = 1.5;

            var imageInfo = new RatingItemImageInfo();
            imageInfo.Image = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_set.png"));
            imageInfo.UnsetImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_unset.png")); ;
            imageInfo.PlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_placeholder.png")); ;
            imageInfo.DisabledImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_disabled.png")); ;
            imageInfo.PointerOverImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverset.png")); ;
            imageInfo.PointerOverPlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverplaceholder.png"));

            CustomImagesTwo.ItemInfo = imageInfo;
            CustomImagesTwo.Value = 3.0;
            CustomImagesTwo.PlaceholderValue = 4.25;

            PointerOverPlaceholderFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler (PointerOverPlaceholderFallbackRating_PointerMoved), true);
            PointerOverFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler(PointerOverFallbackRating_PointerMoved), true);

            PointerOverPlaceholderImageFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler(PointerOverPlaceholderImageFallbackRating_PointerMoved), true);
            PointerOverImageFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler(PointerOverImageFallbackRating_PointerMoved), true);

            ColorFlipButton.Foreground = _tomato;

            RatingBindingSample.DataContext = CaptionStringBox;
            BindingRatingCaption.DataContext = ColorFlipButton;

            Loaded += RatingControlPage_Loaded;
        }

Member Function Documentation

void Button_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 143 of file RatingControlPage.xaml.cs.

        {
            Frame.FlowDirection = Frame.FlowDirection == FlowDirection.LeftToRight ?
                FlowDirection.RightToLeft : FlowDirection.LeftToRight;
        }

void ChangeCustomImagesTwoType_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 213 of file RatingControlPage.xaml.cs.

        {
            if (CustomImagesTwo.ItemInfo is RatingItemImageInfo)
            {
                var rifi = new RatingItemFontInfo();
                rifi.Glyph = "\uEB52";
                rifi.UnsetGlyph = "\uEB52";
                rifi.PointerOverGlyph = "\uEB52";
                rifi.PointerOverPlaceholderGlyph = "\uEB52";
                rifi.DisabledGlyph = "\uEB52";

                CustomImagesTwo.ItemInfo = rifi;

                DependencyObject obj = FindVisualChildByName(CustomImagesTwo, "RatingBackgroundStackPanel");
                var child = VisualTreeHelper.GetChild(obj, 0);
                AutomationProperties.SetAutomationId(child, "CustomImagesTwo_FirstTextItem");
                AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);

                CustomImagesTwoLoadedStageTwoCheckBox.IsChecked = true;
            }
            else
            {
                var imageInfo = new RatingItemImageInfo();
                imageInfo.Image = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_set.png"));
                imageInfo.UnsetImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_unset.png")); ;
                imageInfo.PlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_placeholder.png")); ;
                imageInfo.DisabledImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_disabled.png")); ;
                imageInfo.PointerOverImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverset.png")); ;
                imageInfo.PointerOverPlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverplaceholder.png"));

                CustomImagesTwo.ItemInfo = imageInfo;

                DependencyObject obj = FindVisualChildByName(CustomImagesTwo, "RatingBackgroundStackPanel");
                var child = VisualTreeHelper.GetChild(obj, 0);
                AutomationProperties.SetAutomationId(child, "CustomImagesTwo_FirstImageItem_Again");
                AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);

                CustomImagesTwoLoadedStageThreeCheckBox.IsChecked = true;
            }
        }

void CheckSpyingTicksRequirement ( ) [inline, private]

Definition at line 394 of file RatingControlPage.xaml.cs.

        {
            if (this._secondTextBlockUI != null &&
                (this.UIThreadTicksForValuesSpy > 0) && this.AnimatedValuesSpy != null)
            {
                if (!this.IsRenderingHooked)
                {
                    this.IsRenderingHooked = true;
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering += CompositionTarget_Rendering;
                }
            }
            else
            {
                if (this.IsRenderingHooked)
                {
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering -= CompositionTarget_Rendering;
                    this.IsRenderingHooked = false;
                }
            }
        }

void CollapsedRatingControlButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file RatingControlPage.xaml.cs.

        {
            CollapsedRatingControl.Value = 3.3;
        }

void ColorFlipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 564 of file RatingControlPage.xaml.cs.

        {
            if (ColorFlipButton.Foreground.Equals(_tomato))
            {
                ColorFlipButton.Foreground = _aqua;
            }
            else
            {
                ColorFlipButton.Foreground = _tomato;
            }
        }

void CompositionTarget_Rendering | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 415 of file RatingControlPage.xaml.cs.

        {
            if (this.UIThreadTicksForValuesSpy > 0)
            {
                this.UIThreadTicksForValuesSpy--;
            }
            CheckSpyingTicksRequirement();
            SpyAnimatedValues();
        }

void CustomImages_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 203 of file RatingControlPage.xaml.cs.

        {
            DependencyObject obj = FindVisualChildByName(CustomImages, "RatingBackgroundStackPanel");
            var child = VisualTreeHelper.GetChild(obj, 0);
            AutomationProperties.SetAutomationId(child, "CustomImages_FirstImageItem");
            AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);

            CustomImagesLoadedCheckBox.IsChecked = true;
        }

void CustomImagesTwo_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 254 of file RatingControlPage.xaml.cs.

        {
            DependencyObject obj = FindVisualChildByName(CustomImagesTwo, "RatingBackgroundStackPanel");
            var child = VisualTreeHelper.GetChild(obj, 0);
            AutomationProperties.SetAutomationId(child, "CustomImagesTwo_FirstImageItem");
            AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);

            CustomImagesTwoLoadedStageOneCheckBox.IsChecked = true;
        }

void DisabledFallbackRating_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 499 of file RatingControlPage.xaml.cs.

        {
            PerformGlyphVerification(DisabledFallbackRating, "\uE8DD" /* world/globe */, DisabledFallbackTextBlock, "RatingForegroundStackPanel");
        }

void DisabledImageFallbackRating_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 539 of file RatingControlPage.xaml.cs.

        {
            PerformImageVerification(DisabledImageFallbackRating, "ms-appx:/Assets/rating_placeholder.png" /* world/globe */, DisabledImageFallbackTextBlock, "RatingForegroundStackPanel");
        }

void DispatcherTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 281 of file RatingControlPage.xaml.cs.

        {
            SpyAnimatedValues();
        }

void MagicDisengager_ValueChanged | ( | RatingControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 576 of file RatingControlPage.xaml.cs.

        {
            if (sender.Value == 3.0)
            {
                sender.RemoveFocusEngagement();
            }

            if (sender.Value == -1)
            {
                MagicDisengagerTextBlock.Text = "null";
            }
            else
            {
                MagicDisengagerTextBlock.Text = sender.Value.ToString();
            }
        }

void MakeTheAboveRatingSquares_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 193 of file RatingControlPage.xaml.cs.

        {
            MakeMeSquares.FontFamily = new FontFamily("Times New Roman");
        }

void MaxRating9Unset_ValueChanged | ( | RatingControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 181 of file RatingControlPage.xaml.cs.

        {
            if (sender.Value == -1)
            {
                MaxRating9UnsetTextBlock.Text = "!!" + sender.PlaceholderValue.ToString();
            }
            else
            {
                MaxRating9UnsetTextBlock.Text = sender.Value.ToString();
            }
        }

void MyRatingIsClearEnabled_ValueChanged | ( | RatingControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 154 of file RatingControlPage.xaml.cs.

        {
            if (sender.Value == -1)
            {
                MyRatingIsClearEnabledText.Text = "!" + sender.PlaceholderValue.ToString();
            }
            else
            {
                MyRatingIsClearEnabledText.Text = sender.Value.ToString();
            }
        }

void MyRatingReadOnly_ValueChanged | ( | RatingControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 198 of file RatingControlPage.xaml.cs.

        {
            MyRatingReadOnlyTextBlock.Text = sender.Value.ToString();
        }

void NoFallbackRating_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 524 of file RatingControlPage.xaml.cs.

        {
            PerformGlyphVerification(NoFallbackRating, "" /* glyph should fall back to nothing */, NoFallbackTextBlock, "RatingForegroundStackPanel");
        }

override void OnNavigatingFrom ( NavigatingCancelEventArgs e ) [inline, protected]

Definition at line 107 of file RatingControlPage.xaml.cs.

        {
            _dt.Tick -= DispatcherTimer_Tick; // prevent leaks since the dispatcher holds a pointer to this
        }

void PerformGlyphVerification | ( | RatingControl | rc,
 |  | String | expectedGlyph,
 |  | TextBlock | resultTb,
 |  | String | stackPanelName,
 |  | SolidColorBrush | expectedColor = null |
 | ) |  |  | [inline, private]

Definition at line 425 of file RatingControlPage.xaml.cs.

        {
            ContentPresenter presenter = FindVisualChildByName(rc, "ForegroundContentPresenter") as ContentPresenter;

            DependencyObject obj = FindVisualChildByName(rc, stackPanelName);
            var child = VisualTreeHelper.GetChild(obj, 0);
            TextBlock tb = child as TextBlock;

            String glyph = tb.Text;
            if (glyph.Equals(expectedGlyph))
            {
                resultTb.Text = "+";
                // Verify colour to make sure we don't accidentally take the non-pointer over as a false-positive
                if (expectedColor == null || presenter.Foreground.Equals(expectedColor))
                {
                    resultTb.Text = "+";
                }
                else
                {
                    resultTb.Text = "/";
                }
            }
            else
            {
                resultTb.Text = "-";
            }
        }

void PerformImageVerification | ( | RatingControl | rc,
 |  | String | expectedUri,
 |  | TextBlock | resultTb,
 |  | String | stackPanelName,
 |  | SolidColorBrush | expectedColor = null |
 | ) |  |  | [inline, private]

Definition at line 453 of file RatingControlPage.xaml.cs.

        {
            ContentPresenter presenter = FindVisualChildByName(rc, "ForegroundContentPresenter") as ContentPresenter;

            DependencyObject obj = FindVisualChildByName(rc, stackPanelName);
            var child = VisualTreeHelper.GetChild(obj, 0);
            Image image = child as Image;
            var source = image.Source;
            Microsoft.UI.Xaml.Media.Imaging.BitmapImage bitImage = source as Microsoft.UI.Xaml.Media.Imaging.BitmapImage;

            String uri = bitImage.UriSource.ToString();
            if (uri.Equals(expectedUri))
            {
                resultTb.Text = "+";
                // Verify colour to make sure we don't accidentally take the non-pointer over as a false-positive
                // The colours aren't used, but the state is there so we can still check.
                if (expectedColor == null || presenter.Foreground.Equals(expectedColor))
                {
                    resultTb.Text = "+";
                }
                else
                {
                    resultTb.Text = "/";
                }
            }
            else
            {
                resultTb.Text = "-";
            }
        }

void PlaceholderFallbackRating_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 494 of file RatingControlPage.xaml.cs.

        {
            PerformGlyphVerification(PlaceholderFallbackRating, "\uE909" /* world/globe */, PlaceholderFallbackTextBlock, "RatingForegroundStackPanel");
        }

void PlaceholderImageFallbackRating_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 534 of file RatingControlPage.xaml.cs.

        {
            PerformImageVerification(PlaceholderImageFallbackRating, "ms-appx:/Assets/rating_unset.png", PlaceholderImageFallbackTextBlock, "RatingBackgroundStackPanel");
        }

void PointerOverFallbackRating_PointerMoved | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 514 of file RatingControlPage.xaml.cs.

        {
            if (!PointerOverFallbackTextBlock.Text.Equals("+"))
            {
                // Have to make sure this doesn't trigger before the PointerOver
                PerformGlyphVerification(PointerOverFallbackRating, "\uE8CA", PointerOverFallbackTextBlock,
                    "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlSelectedForeground"));
            }
        }

void PointerOverImageFallbackRating_PointerMoved | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 554 of file RatingControlPage.xaml.cs.

        {
            if (!PointerOverImageFallbackTextBlock.Text.Equals("+"))
            {
                // Have to make sure this doesn't trigger before the PointerOver
                PerformImageVerification(PointerOverImageFallbackRating, "ms-appx:/Assets/rating_mouseoverplaceholder.png", PointerOverImageFallbackTextBlock,
                    "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlSelectedForeground"));
            }
        }

void PointerOverPlaceholderFallbackRating_PointerMoved | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 504 of file RatingControlPage.xaml.cs.

        {
            if (!PointerOverPlaceholderFallbackTextBlock.Text.Equals("+"))
            {
                // Have to make sure this doesn't trigger before the PointerOver
                PerformGlyphVerification(PointerOverPlaceholderFallbackRating, "\uEBAA", PointerOverPlaceholderFallbackTextBlock,
                    "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlPointerOverPlaceholderForeground"));
            }
        }

void PointerOverPlaceholderImageFallbackRating_PointerMoved | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 544 of file RatingControlPage.xaml.cs.

        {
            if (!PointerOverPlaceholderImageFallbackTextBlock.Text.Equals("+"))
            {
                // Have to make sure this doesn't trigger before the PointerOver
                PerformImageVerification(PointerOverPlaceholderImageFallbackRating, "ms-appx:/Assets/rating_disabled.png", PointerOverPlaceholderImageFallbackTextBlock,
                    "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlPointerOverPlaceholderForeground"));
            }
        }

void RatingBindingSampleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 176 of file RatingControlPage.xaml.cs.

        {
            RatingBindingSampleText.Text = RatingBindingSample.Caption;
        }

void RatingControlPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 78 of file RatingControlPage.xaml.cs.

        {
            FrameDetails.Text = XamlRoot.Content.ActualSize.ToString();
        }

void RatingXBindSampleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 171 of file RatingControlPage.xaml.cs.

        {
            RatingXBindSampleText.Text = RatingXBindSample.Caption;
        }

void ResetSpyOutput ( ) [inline, private]

Definition at line 383 of file RatingControlPage.xaml.cs.

        {
            this.ScaleTextX.Text = this.ScaleTextY.Text = "0 - reset";
        }

DependencyObject SearchVisualTree | ( | DependencyObject | root,
 |  | string | name |
 | ) |  |  | [inline, private]

Definition at line 83 of file RatingControlPage.xaml.cs.

        {
            int size = VisualTreeHelper.GetChildrenCount(root);
            DependencyObject child = null;

            for (int i = 0; i < size && child == null; i++)
            {
                DependencyObject depObj = VisualTreeHelper.GetChild(root, i);
                FrameworkElement fe = depObj as FrameworkElement;

                if (fe.Name.Equals(name))
                {
                    child = fe;
                }
                else
                {
                    child = SearchVisualTree(fe, name);
                }
            }

            return child;
        }

void SetupAnimatedValuesSpy ( ) [inline, private]

Definition at line 311 of file RatingControlPage.xaml.cs.

        {
            StopAnimatedValuesSpy();

            this.AnimatedValuesSpy = null;
            this.ScaleAnimation = null;

            if (this._secondTextBlockUI != null)
            {
                const string visualScaleTargetedPropertyName = "visual.Scale";
                UIElement ppChild = this._secondTextBlockUI;
                Visual visualPPChild = ElementCompositionPreview.GetElementVisual(ppChild);

                Compositor compositor = visualPPChild.Compositor;

                this.AnimatedValuesSpy = compositor.CreatePropertySet();

                this.AnimatedValuesSpy.InsertVector3("Scale", new Vector3(0.0f, 0.0f, 0.0f));

                this.ScaleAnimation = compositor.CreateExpressionAnimation(visualScaleTargetedPropertyName);
                this.ScaleAnimation.SetReferenceParameter("visual", visualPPChild);

                CheckSpyingTicksRequirement();

                TickForValuesSpy();
            }
            else
            {
                ResetSpyOutput();
            }
        }

void SpyAnimatedValues ( ) [inline, private]

Definition at line 359 of file RatingControlPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                StopAnimatedValuesSpy();

                Vector3 scale;
                CompositionGetValueStatus status = this.AnimatedValuesSpy.TryGetVector3("Scale", out scale);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    this.ScaleTextX.Text = scale.X.ToString();
                    this.ScaleTextY.Text = scale.Y.ToString();
                }
                else
                {
                    this.ScaleTextX.Text = this.ScaleTextY.Text = "status=" + status.ToString();
                }

                StartAnimatedValuesSpy();

                // System.Diagnostics.Debug.WriteLine("Spied values: " + this.ScaleTextX.Text);
            }
        }

void StartAnimatedValuesSpy ( ) [inline, private]

Definition at line 343 of file RatingControlPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StartAnimation("Scale", this.ScaleAnimation);
            }
        }

void StopAnimatedValuesSpy ( ) [inline, private]

Definition at line 351 of file RatingControlPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StopAnimation("Scale");
            }
        }

void TestRatingControl_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 264 of file RatingControlPage.xaml.cs.

        {
            _dt = new DispatcherTimer();
            _dt.Interval = TimeSpan.FromSeconds(0.1);
            _dt.Start();
            _dt.Tick += DispatcherTimer_Tick;

            DependencyObject obj = FindVisualChildByName(TestRatingControl, "RatingBackgroundStackPanel");
            UIElement ui = obj as UIElement;
            DependencyObject child = VisualTreeHelper.GetChild(obj, 1);
            TextBlock tb = child as TextBlock;
            this._secondTextBlockUI = tb;

            SetupAnimatedValuesSpy();
            SpyAnimatedValues();
        }

void TestRatingControl_ValueChanged | ( | RatingControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 112 of file RatingControlPage.xaml.cs.

        {
            if (TestRatingControl.Value == -1)
            {
                if (TestRatingControl.PlaceholderValue == -1)
                {
                    TestTextBlockControl.Text = "!";
                }
                else
                {
                    TestTextBlockControl.Text = "!" + TestRatingControl.PlaceholderValue.ToString();
                }
            }
            else
            {
                TestTextBlockControl.Text = sender.Value.ToString(); // Having both ways of referring to the control to make sure both work
            }
        }

void TestRatingControlButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 149 of file RatingControlPage.xaml.cs.

        {
            TestRatingControl.PlaceholderValue = -1;
        }

SolidColorBrush ThemeResourceNameToColorBrush ( String themeResource ) [inline, private]

Definition at line 484 of file RatingControlPage.xaml.cs.

        {
            return Application.Current.Resources[themeResource] as SolidColorBrush;
        }

void TickForValuesSpy ( ) [inline, private]

Definition at line 388 of file RatingControlPage.xaml.cs.

        {
            this.UIThreadTicksForValuesSpy = 6;
            CheckSpyingTicksRequirement();
        }

void UnsetFallbackRating_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 489 of file RatingControlPage.xaml.cs.

        {
            PerformGlyphVerification(UnsetFallbackRating, "\uE00B" /* full heart */, UnsetFallbackTextBlock, "RatingBackgroundStackPanel");
        }

void UnsetImageFallbackRating_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 529 of file RatingControlPage.xaml.cs.

        {
            PerformImageVerification(UnsetImageFallbackRating, "ms-appx:/Assets/rating_set.png", UnsetImageFallbackTextBlock, "RatingBackgroundStackPanel");
        }

void ValueChangeInMarkup_ValueChanged | ( | RatingControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 131 of file RatingControlPage.xaml.cs.

        {
            if (ValueChangeInMarkup.Value == -1)
            {
                ValueChangeInMarkupText.Text = "!!" + ValueChangeInMarkup.PlaceholderValue.ToString();
            }
            else
            {
                ValueChangeInMarkupText.Text = ValueChangeInMarkup.Value.ToString();
            }
        }

Member Data Documentation

SolidColorBrush _aqua = new SolidColorBrush(Microsoft.UI.Colors.Aqua) [private]

Definition at line 33 of file RatingControlPage.xaml.cs.

DispatcherTimer _dt [private]

Definition at line 30 of file RatingControlPage.xaml.cs.

UIElement _secondTextBlockUI [private]

Definition at line 29 of file RatingControlPage.xaml.cs.

SolidColorBrush _tomato = new SolidColorBrush(Microsoft.UI.Colors.Tomato) [private]

Definition at line 32 of file RatingControlPage.xaml.cs.

Property Documentation

CompositionPropertySet AnimatedValuesSpy [get, set, private]

Definition at line 288 of file RatingControlPage.xaml.cs.

bool IsRenderingHooked [get, set, private]

Definition at line 300 of file RatingControlPage.xaml.cs.

ExpressionAnimation ScaleAnimation [get, set, private]

Definition at line 294 of file RatingControlPage.xaml.cs.

uint UIThreadTicksForValuesSpy [get, set, private]

Definition at line 306 of file RatingControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • RatingControl/TestUI/RatingControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshableCollection-g< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RefreshableCollection-g< T >
Public Member Functions

RefreshableCollection-g< T > Class Template Reference

List of all members.

Public Member Functions

void Refresh (IEnumerable< T > newItems)

Detailed Description

template<T>
class MUXControlsTestApp::RefreshableCollection-g< T >

Definition at line 25 of file ItemsViewTransitionPage.xaml.cs.

Member Function Documentation

void Refresh ( IEnumerable< T > newItems ) [inline]

Definition at line 27 of file ItemsViewTransitionPage.xaml.cs.

        {
            Items.Clear();

            foreach (T item in newItems)
            {
                Items.Add(item);
            }

            OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
        }

The documentation for this class was generated from the following file:
  • ItemsView/TestUI/ItemsViewTransitionPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshContainerOnImagePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RefreshContainerOnImagePage
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

RefreshContainerOnImagePage Class Reference

List of all members.

Public Member Functions

RefreshContainerOnImagePage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Properties

Deferral | RefreshCompletionDeferral [get, set]

Private Member Functions

void | AdaptButton_Click (object sender, RoutedEventArgs e)
void | AddOrRemoveRefreshDelayButton_Click (object sender, RoutedEventArgs e)
void | ChangeAlignmentButton_Click (object sender, RoutedEventArgs e)
void | ChangeRefreshRequestedButton_Click (object sender, RoutedEventArgs e)
void | OnMainPageLoaded (object sender, RoutedEventArgs e)
void | RefreshContainer_RefreshRequested (object sender, RefreshRequestedEventArgs e)
void | RefreshInfoProvider_InteractionRatioChanged (IRefreshInfoProvider sender, RefreshInteractionRatioChangedEventArgs args)
void | RefreshOnContainerButton_Click (object sender, RoutedEventArgs e)
void | RefreshOnVisualizerButton_Click (object sender, RoutedEventArgs e)
void | RefreshVisualizer_RefreshRequested (object sender, RefreshRequestedEventArgs e)
void | RefreshVisualizer_RefreshStateChanged (RefreshVisualizer sender, RefreshStateChangedEventArgs args)
void | RefreshVisualizer_SizeChanged (object sender, SizeChangedEventArgs e)
void | ResetInteractionRatios_Click (object sender, RoutedEventArgs e)
void | ResetInteractionRatiosComboBox ()
void | ResetStates_Click (object sender, RoutedEventArgs e)
void | ResetStatesComboBox ()
void | RotateButton_Click (object sender, RoutedEventArgs e)
void | Timer_Tick (object sender, object e)
void | UpdateInteractionRatiosComboBox (double interactionRatio)
void | UpdateStatesComboBox (RefreshVisualizerState state)

Private Attributes

bool | containerHasHandler = true
bool | delayRefresh = true
int | refreshCount = 0
DispatcherTimer | timer = new DispatcherTimer()

Detailed Description

Definition at line 25 of file RefreshContainerOnImagePage.xaml.cs.

Constructor & Destructor Documentation

RefreshContainerOnImagePage ( ) [inline]

Definition at line 27 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += OnMainPageLoaded;

            timer.Interval = new TimeSpan(0, 0, 0, 0, 800);
            timer.Tick += Timer_Tick;
        }

Member Function Documentation

void AdaptButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 175 of file RefreshContainerOnImagePage.xaml.cs.

        {
            IRefreshContainerPrivate refreshContainerPrivate = (IRefreshContainerPrivate)this.RefreshContainer;
            IRefreshVisualizerPrivate refreshVisualizerPrivate = (IRefreshVisualizerPrivate)this.RefreshContainer.Visualizer;

            if (refreshVisualizerPrivate.InfoProvider != null)
            {
                refreshVisualizerPrivate.InfoProvider.InteractionRatioChanged -= RefreshInfoProvider_InteractionRatioChanged;
            }

            refreshVisualizerPrivate.InfoProvider = refreshContainerPrivate.RefreshInfoProviderAdapter.AdaptFromTree(this.Image, this.RefreshContainer.Visualizer.RenderSize);

            refreshContainerPrivate.RefreshInfoProviderAdapter.SetAnimations(this.RefreshContainer.Visualizer);
            refreshVisualizerPrivate.InfoProvider.InteractionRatioChanged += RefreshInfoProvider_InteractionRatioChanged;
        }

void AddOrRemoveRefreshDelayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 155 of file RefreshContainerOnImagePage.xaml.cs.

        {
            delayRefresh = !delayRefresh;
        }

void ChangeAlignmentButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 121 of file RefreshContainerOnImagePage.xaml.cs.

        {
            switch (this.RefreshContainer.VerticalAlignment)
            {
                case (VerticalAlignment.Center):
                    if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Center)
                    {
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Top;
                    }
                    if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Left)
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Bottom;
                    }
                    if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Right)
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
                    }
                    break;
                case (VerticalAlignment.Top):
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Left;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
                        break;
                    }
                case (VerticalAlignment.Bottom):
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Right;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
                        break;
                    }
            }
        }

void ChangeRefreshRequestedButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 160 of file RefreshContainerOnImagePage.xaml.cs.

        {
            if (containerHasHandler)
            {
                this.RefreshContainer.RefreshRequested -= RefreshContainer_RefreshRequested;
                this.RefreshContainer.Visualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
            }
            else
            {
                this.RefreshContainer.RefreshRequested += RefreshContainer_RefreshRequested;
                this.RefreshContainer.Visualizer.RefreshRequested -= RefreshVisualizer_RefreshRequested;
            }
            containerHasHandler = !containerHasHandler;
        }

void OnMainPageLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 47 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.RefreshContainer.Visualizer.SizeChanged += RefreshVisualizer_SizeChanged;
            ((IRefreshContainerPrivate)this.RefreshContainer).RefreshInfoProviderAdapter = new ImageIRefreshInfoProviderAdapter(this.RefreshContainer.PullDirection, new AnimationHandler(RefreshContainer, this.RefreshContainer.PullDirection));

            this.RefreshContainer.Visualizer.RefreshStateChanged += RefreshVisualizer_RefreshStateChanged;
            ResetStatesComboBox();
            ResetInteractionRatiosComboBox();
            this.RefreshOnContainerButton.Click += RefreshOnContainerButton_Click;
            this.RefreshOnVisualizerButton.Click += RefreshOnVisualizerButton_Click;
            this.ResetStates.Click += ResetStates_Click;
            this.ResetInteractionRatios.Click += ResetInteractionRatios_Click;
            this.AdaptButton.Click += AdaptButton_Click;
            this.RotateButton.Click += RotateButton_Click;
            this.ChangeAlignment.Click += ChangeAlignmentButton_Click;
            this.AddOrRemoveRefreshDelay.Click += AddOrRemoveRefreshDelayButton_Click;
            this.ChangeRefreshRequested.Click += ChangeRefreshRequestedButton_Click;
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 41 of file RefreshContainerOnImagePage.xaml.cs.

        {
            base.OnNavigatedFrom(e);
            timer.Stop();
        }

void RefreshContainer_RefreshRequested | ( | object | sender,
 |  | RefreshRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 66 of file RefreshContainerOnImagePage.xaml.cs.

        {
            if (delayRefresh)
            {
                this.RefreshCompletionDeferral = e.GetDeferral();
            }
            else
            {
                e.GetDeferral().Complete();
            }
            refreshCount++;
            this.RefreshCount.Text = refreshCount.ToString();
            timer.Start();
        }

void RefreshInfoProvider_InteractionRatioChanged | ( | IRefreshInfoProvider | sender,
 |  | RefreshInteractionRatioChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 86 of file RefreshContainerOnImagePage.xaml.cs.

        {
            UpdateInteractionRatiosComboBox(args.InteractionRatio);
        }

void RefreshOnContainerButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.RefreshContainer.RequestRefresh();
        }

void RefreshOnVisualizerButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.RefreshContainer.Visualizer.RequestRefresh();
        }

void RefreshVisualizer_RefreshRequested | ( | object | sender,
 |  | RefreshRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 230 of file RefreshContainerOnImagePage.xaml.cs.

        {
            if (delayRefresh)
            {
                this.RefreshCompletionDeferral = e.GetDeferral();
            }
            else
            {
                e.GetDeferral().Complete();

                BitmapImage bitmapImage = new BitmapImage();
                Image.Width = bitmapImage.DecodePixelWidth = 300;
                bitmapImage.UriSource = new Uri(Image.BaseUri, "Assets/ingredient" + ((refreshCount % 8) + 1).ToString() + ".png");
                Image.Source = bitmapImage;
            }
            refreshCount++;
            this.RefreshCount.Text = refreshCount.ToString();
            timer.Start();
        }

void RefreshVisualizer_RefreshStateChanged | ( | RefreshVisualizer | sender,
 |  | RefreshStateChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 191 of file RefreshContainerOnImagePage.xaml.cs.

        {
            UpdateStatesComboBox(args.NewState);
        }

void RefreshVisualizer_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file RefreshContainerOnImagePage.xaml.cs.

        {
            ((IRefreshContainerPrivate)this.RefreshContainer).RefreshInfoProviderAdapter = new ImageIRefreshInfoProviderAdapter(this.RefreshContainer.PullDirection, new AnimationHandler(RefreshContainer, this.RefreshContainer.PullDirection));
        }

void ResetInteractionRatios_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 201 of file RefreshContainerOnImagePage.xaml.cs.

        {
            ResetInteractionRatiosComboBox();
        }

void ResetInteractionRatiosComboBox ( ) [inline, private]

Definition at line 224 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.InteractionRatios.Items.Clear();
            UpdateInteractionRatiosComboBox(0.0);
        }

void ResetStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 196 of file RefreshContainerOnImagePage.xaml.cs.

        {
            ResetStatesComboBox();
        }

void ResetStatesComboBox ( ) [inline, private]

Definition at line 218 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.States.Items.Clear();
            UpdateStatesComboBox(this.RefreshContainer.Visualizer.State);
        }

void RotateButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file RefreshContainerOnImagePage.xaml.cs.

        {
            switch (this.RefreshContainer.PullDirection)
            {
                case (RefreshPullDirection.TopToBottom):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.LeftToRight;
                    break;
                case (RefreshPullDirection.LeftToRight):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.BottomToTop;
                    break;
                case (RefreshPullDirection.BottomToTop):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.RightToLeft;
                    break;
                case (RefreshPullDirection.RightToLeft):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.TopToBottom;
                    break;
            }
            ((IRefreshContainerPrivate)this.RefreshContainer).RefreshInfoProviderAdapter = new ImageIRefreshInfoProviderAdapter(this.RefreshContainer.PullDirection, new AnimationHandler(RefreshContainer, this.RefreshContainer.PullDirection));
        }

void Timer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 256 of file RefreshContainerOnImagePage.xaml.cs.

        {
            timer.Stop();

            if (this.RefreshCompletionDeferral != null)
            {
                BitmapImage bitmapImage = new BitmapImage();
                Image.Width = bitmapImage.DecodePixelWidth = 300;
                bitmapImage.UriSource = new Uri(Image.BaseUri, "Assets/ingredient" + ((refreshCount % 8) + 1).ToString() + ".png");
                Image.Source = bitmapImage;

                this.RefreshCompletionDeferral.Complete();
                this.RefreshCompletionDeferral.Dispose();
                this.RefreshCompletionDeferral = null;
            }
        }

void UpdateInteractionRatiosComboBox ( double interactionRatio ) [inline, private]

Definition at line 212 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.InteractionRatios.Items.Add(interactionRatio.ToString());
            this.InteractionRatios.SelectedIndex = this.InteractionRatios.Items.Count - 1;
        }

void UpdateStatesComboBox ( RefreshVisualizerState state ) [inline, private]

Definition at line 206 of file RefreshContainerOnImagePage.xaml.cs.

        {
            this.States.Items.Add(state.ToString());
            this.States.SelectedIndex = this.States.Items.Count - 1;
        }

Member Data Documentation

bool containerHasHandler = true [private]

Definition at line 37 of file RefreshContainerOnImagePage.xaml.cs.

bool delayRefresh = true [private]

Definition at line 38 of file RefreshContainerOnImagePage.xaml.cs.

int refreshCount = 0 [private]

Definition at line 39 of file RefreshContainerOnImagePage.xaml.cs.

DispatcherTimer timer = new DispatcherTimer() [private]

Definition at line 36 of file RefreshContainerOnImagePage.xaml.cs.

Property Documentation

Deferral RefreshCompletionDeferral [get, set, private]

Definition at line 251 of file RefreshContainerOnImagePage.xaml.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshContainer/TestUI/RefreshContainerOnImagePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshContainerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RefreshContainerPage
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

RefreshContainerPage Class Reference

List of all members.

Public Member Functions

RefreshContainerPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Properties

Deferral | ContainerRefreshCompletionDeferral [get, set]
Deferral | VisualizerRefreshCompletionDeferral [get, set]

Private Member Functions

void | AdaptButton_Click (object sender, RoutedEventArgs e)
void | AddOrRemoveRefreshDelayButton_Click (object sender, RoutedEventArgs e)
void | ChangeAlignmentButton_Click (object sender, RoutedEventArgs e)
void | ChangeRefreshRequestedButton_Click (object sender, RoutedEventArgs e)
async void | containerTimer_Tick (object sender, object e)
void | containerTimer_TickImpl ()
void | OnMainPageLoaded (object sender, RoutedEventArgs e)
void | RCRefreshRequestedComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | RCRefreshRequestedComboBoxSwitcher_Click (object sender, RoutedEventArgs e)
void | RefreshContainer_RefreshRequested (object sender, RefreshRequestedEventArgs e)
void | RefreshInfoProvider_InteractionRatioChanged (IRefreshInfoProvider sender, RefreshInteractionRatioChangedEventArgs args)
void | RefreshOnContainerButton_Click (object sender, RoutedEventArgs e)
void | RefreshOnVisualizerButton_Click (object sender, RoutedEventArgs e)
void | RefreshVisualizer_RefreshRequested (object sender, RefreshRequestedEventArgs e)
void | RefreshVisualizer_RefreshStateChanged (RefreshVisualizer sender, RefreshStateChangedEventArgs args)
void | ResetStates_Click (object sender, RoutedEventArgs e)
void | ResetStatesComboBox ()
void | RotateButton_Click (object sender, RoutedEventArgs e)
void | RVRefreshRequestedComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | RVRefreshRequestedComboBoxSwitcher_Click (object sender, RoutedEventArgs e)
void | Sv_ViewChanging (object sender, ScrollViewerViewChangingEventArgs e)
void | UpdateStatesComboBox (RefreshVisualizerState state)
async void | visualizerTimer_Tick (object sender, object e)
void | visualizerTimer_TickImpl ()

Private Attributes

bool | containerHasHandler = true
DispatcherTimer | containerTimer = new DispatcherTimer()
bool | delayRefresh = true
int | refreshCount = 0
DispatcherTimer | visualizerTimer = new DispatcherTimer()

Detailed Description

Definition at line 32 of file RefreshContainerPage.xaml.cs.

Constructor & Destructor Documentation

RefreshContainerPage ( ) [inline]

Definition at line 40 of file RefreshContainerPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += OnMainPageLoaded;

            containerTimer.Interval = new TimeSpan(0, 0, 0, 0, 800);
            containerTimer.Tick += containerTimer_Tick;
            visualizerTimer.Interval = new TimeSpan(0, 0, 0, 0, 800);
            visualizerTimer.Tick += visualizerTimer_Tick;
            LogController.InitializeLogging();
        }

Member Function Documentation

void AdaptButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 246 of file RefreshContainerPage.xaml.cs.

        {
            IRefreshContainerPrivate refreshContainerPrivate = (IRefreshContainerPrivate)this.RefreshContainer;
            IRefreshVisualizerPrivate refreshVisualizerPrivate = (IRefreshVisualizerPrivate)this.RefreshContainer.Visualizer;

            refreshVisualizerPrivate.InfoProvider = refreshContainerPrivate.RefreshInfoProviderAdapter.AdaptFromTree(this.listView, this.RefreshContainer.Visualizer.RenderSize);

            refreshContainerPrivate.RefreshInfoProviderAdapter.SetAnimations(this.RefreshContainer.Visualizer);
            refreshVisualizerPrivate.InfoProvider.InteractionRatioChanged += RefreshInfoProvider_InteractionRatioChanged;
        }

void AddOrRemoveRefreshDelayButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 226 of file RefreshContainerPage.xaml.cs.

        {
            delayRefresh = !delayRefresh;
        }

void ChangeAlignmentButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 190 of file RefreshContainerPage.xaml.cs.

        {
            switch(this.RefreshContainer.VerticalAlignment)
            {
                case (VerticalAlignment.Center):
                    if(this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Center)
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Top;
                    }
                    if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Left)
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Bottom;
                    }
                    if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Right)
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
                    }
                    break;
                case (VerticalAlignment.Top):
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Left;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
                        break;
                    }
                case (VerticalAlignment.Bottom):
                    {
                        this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Right;
                        this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
                        break;
                    }
            }
        }

void ChangeRefreshRequestedButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 231 of file RefreshContainerPage.xaml.cs.

        {
            if(containerHasHandler)
            {
                this.RefreshContainer.RefreshRequested -= RefreshContainer_RefreshRequested;
                this.RefreshContainer.Visualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
            }
            else
            {
                this.RefreshContainer.RefreshRequested += RefreshContainer_RefreshRequested;
                this.RefreshContainer.Visualizer.RefreshRequested -= RefreshVisualizer_RefreshRequested;
            }
            containerHasHandler = !containerHasHandler;
        }

async void containerTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 291 of file RefreshContainerPage.xaml.cs.

        {
            CoreDispatcher disp = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher;
            if (disp.HasThreadAccess)
            {
                containerTimer_TickImpl();
            }
            else
            {
                await disp.RunAsync(CoreDispatcherPriority.Normal, () =>
                 {
                     containerTimer_TickImpl();
                 });
            }
        }

void containerTimer_TickImpl ( ) [inline, private]

Definition at line 322 of file RefreshContainerPage.xaml.cs.

        {
            containerTimer.Stop();
            if (this.ContainerRefreshCompletionDeferral != null)
            {
                this.ContainerRefreshCompletionDeferral.Complete();
                this.ContainerRefreshCompletionDeferral.Dispose();
                this.ContainerRefreshCompletionDeferral = null;
            }
        }

void OnMainPageLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file RefreshContainerPage.xaml.cs.

        {
            this.RefreshContainer.Visualizer.RefreshStateChanged += RefreshVisualizer_RefreshStateChanged;
            ResetStatesComboBox();
            this.RefreshOnContainerButton.Click += RefreshOnContainerButton_Click;
            this.RefreshOnVisualizerButton.Click += RefreshOnVisualizerButton_Click;
            this.ResetStates.Click += ResetStates_Click;
            this.AdaptButton.Click += AdaptButton_Click;
            this.RotateButton.Click += RotateButton_Click;
            this.ChangeAlignment.Click += ChangeAlignmentButton_Click;
            this.AddOrRemoveRefreshDelay.Click += AddOrRemoveRefreshDelayButton_Click;

            this.RCRefreshRequestedComboBox.Items.Add("Off");
            this.RCRefreshRequestedComboBox.Items.Add("On");
            this.RCRefreshRequestedComboBox.SelectionChanged += RCRefreshRequestedComboBox_SelectionChanged;
            this.RCRefreshRequestedComboBox.SelectedIndex = 1;
            this.RCRefreshRequestedComboBoxSwitcher.Click += RCRefreshRequestedComboBoxSwitcher_Click;
            this.RVRefreshRequestedComboBox.Items.Add("Off");
            this.RVRefreshRequestedComboBox.Items.Add("On");
            this.RVRefreshRequestedComboBox.SelectionChanged += RVRefreshRequestedComboBox_SelectionChanged;
            this.RVRefreshRequestedComboBox.SelectedIndex = 0;
            this.RVRefreshRequestedComboBoxSwitcher.Click += RVRefreshRequestedComboBoxSwitcher_Click;

            ((IRefreshVisualizerPrivate)this.RefreshContainer.Visualizer).InfoProvider.InteractionRatioChanged += RefreshInfoProvider_InteractionRatioChanged;
            var boarderChild = VisualTreeHelper.GetChild(listView, 0);
            var sv = VisualTreeHelper.GetChild(boarderChild, 0);
            var sbas = (ScrollViewer)sv;
            sbas.ViewChanging += Sv_ViewChanging;
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 52 of file RefreshContainerPage.xaml.cs.

        {
            base.OnNavigatedFrom(e);
            containerTimer.Stop();
            visualizerTimer.Stop();
        }

void RCRefreshRequestedComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file RefreshContainerPage.xaml.cs.

        {
            if(this.RCRefreshRequestedComboBox.SelectedIndex == 0)
            {
                this.RefreshContainer.RefreshRequested -= RefreshContainer_RefreshRequested;
            }
            else
            {
                this.RefreshContainer.RefreshRequested += RefreshContainer_RefreshRequested;
            }
        }

void RCRefreshRequestedComboBoxSwitcher_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 152 of file RefreshContainerPage.xaml.cs.

        {
            this.RCRefreshRequestedComboBox.SelectedIndex = ((this.RCRefreshRequestedComboBox.SelectedIndex + 1) % 2);
        }

void RefreshContainer_RefreshRequested | ( | object | sender,
 |  | RefreshRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 113 of file RefreshContainerPage.xaml.cs.

        {
            if (delayRefresh)
            {
                this.ContainerRefreshCompletionDeferral = e.GetDeferral();
            }
            else
            {
                e.GetDeferral().Complete();
            }
            refreshCount++;
            this.RefreshCount.Text = refreshCount.ToString();
            containerTimer.Start();
        }

void RefreshInfoProvider_InteractionRatioChanged | ( | IRefreshInfoProvider | sender,
 |  | RefreshInteractionRatioChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 147 of file RefreshContainerPage.xaml.cs.

        {
            this.InteractionRatio.Text = args.InteractionRatio.ToString();
        }

void RefreshOnContainerButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 161 of file RefreshContainerPage.xaml.cs.

        {
            this.RefreshContainer.RequestRefresh();
        }

void RefreshOnVisualizerButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file RefreshContainerPage.xaml.cs.

        {
            this.RefreshContainer.Visualizer.RequestRefresh();
        }

void RefreshVisualizer_RefreshRequested | ( | object | sender,
 |  | RefreshRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 127 of file RefreshContainerPage.xaml.cs.

        {
            if (delayRefresh)
            {
                this.VisualizerRefreshCompletionDeferral = e.GetDeferral();
            }
            else
            {
                e.GetDeferral().Complete();
            }
            refreshCount++;
            this.RefreshCount.Text = refreshCount.ToString();
            visualizerTimer.Start();
        }

void RefreshVisualizer_RefreshStateChanged | ( | RefreshVisualizer | sender,
 |  | RefreshStateChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 257 of file RefreshContainerPage.xaml.cs.

        {
            UpdateStatesComboBox(args.NewState);
        }

void ResetStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 262 of file RefreshContainerPage.xaml.cs.

        {
            ResetStatesComboBox();
        }

void ResetStatesComboBox ( ) [inline, private]

Definition at line 273 of file RefreshContainerPage.xaml.cs.

        {
            this.States.Items.Clear();
            UpdateStatesComboBox(this.RefreshContainer.Visualizer.State);
        }

void RotateButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 171 of file RefreshContainerPage.xaml.cs.

        {
            switch(this.RefreshContainer.PullDirection)
            {
                case (RefreshPullDirection.TopToBottom):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.LeftToRight;
                    break;
                case (RefreshPullDirection.LeftToRight):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.BottomToTop;
                    break;
                case (RefreshPullDirection.BottomToTop):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.RightToLeft;
                    break;
                case (RefreshPullDirection.RightToLeft):
                    this.RefreshContainer.PullDirection = RefreshPullDirection.TopToBottom;
                    break;
            }
        }

void RVRefreshRequestedComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file RefreshContainerPage.xaml.cs.

        {
            if (this.RVRefreshRequestedComboBox.SelectedIndex == 0)
            {
                this.RefreshContainer.Visualizer.RefreshRequested -= RefreshVisualizer_RefreshRequested;
            }
            else
            {
                this.RefreshContainer.Visualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
            }
        }

void RVRefreshRequestedComboBoxSwitcher_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 156 of file RefreshContainerPage.xaml.cs.

        {
            this.RVRefreshRequestedComboBox.SelectedIndex = ((this.RVRefreshRequestedComboBox.SelectedIndex + 1) % 2);
        }

void Sv_ViewChanging | ( | object | sender,
 |  | ScrollViewerViewChangingEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 142 of file RefreshContainerPage.xaml.cs.

        {
            this.ScrollerOffset.Text = e.NextView.VerticalOffset.ToString();
        }

void UpdateStatesComboBox ( RefreshVisualizerState state ) [inline, private]

Definition at line 267 of file RefreshContainerPage.xaml.cs.

        {
            this.States.Items.Add(state.ToString());
            this.States.SelectedIndex = this.States.Items.Count - 1;
        }

async void visualizerTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 306 of file RefreshContainerPage.xaml.cs.

        {
            CoreDispatcher disp = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher;
            if (disp.HasThreadAccess)
            {
                visualizerTimer_TickImpl();
            }
            else
            {
                await disp.RunAsync(CoreDispatcherPriority.Normal, () =>
                {
                    visualizerTimer_TickImpl();
                });
            }
        }

void visualizerTimer_TickImpl ( ) [inline, private]

Definition at line 333 of file RefreshContainerPage.xaml.cs.

        {
            visualizerTimer.Stop();
            if (this.VisualizerRefreshCompletionDeferral != null)
            {
                this.VisualizerRefreshCompletionDeferral.Complete();
                this.VisualizerRefreshCompletionDeferral.Dispose();
                this.VisualizerRefreshCompletionDeferral = null;
            }
        }

Member Data Documentation

bool containerHasHandler = true [private]

Definition at line 37 of file RefreshContainerPage.xaml.cs.

DispatcherTimer containerTimer = new DispatcherTimer() [private]

Definition at line 34 of file RefreshContainerPage.xaml.cs.

bool delayRefresh = true [private]

Definition at line 36 of file RefreshContainerPage.xaml.cs.

int refreshCount = 0 [private]

Definition at line 38 of file RefreshContainerPage.xaml.cs.

DispatcherTimer visualizerTimer = new DispatcherTimer() [private]

Definition at line 35 of file RefreshContainerPage.xaml.cs.

Property Documentation

Deferral ContainerRefreshCompletionDeferral [get, set, private]

Definition at line 280 of file RefreshContainerPage.xaml.cs.

Deferral VisualizerRefreshCompletionDeferral [get, set, private]

Definition at line 286 of file RefreshContainerPage.xaml.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshContainer/TestUI/RefreshContainerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshInfoProviderImplementation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RefreshInfoProviderImplementation
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

RefreshInfoProviderImplementation Class Reference

List of all members.

Public Member Functions

RefreshInfoProviderImplementation (RefreshPullDirection refreshPullDirection, Size refreshVisualizerSize, Compositor compositor)
void | CustomAnimationStateEntered (InteractionTracker sender, InteractionTrackerCustomAnimationStateEnteredArgs args)
void | IdleStateEntered (InteractionTracker sender, InteractionTrackerIdleStateEnteredArgs args)
void | InertiaStateEntered (InteractionTracker sender, InteractionTrackerInertiaStateEnteredArgs args)
void | InteractingStateEntered (InteractionTracker sender, InteractionTrackerInteractingStateEnteredArgs args)
void | OnRefreshCompleted ()
void | OnRefreshStarted ()
void | RequestIgnored (InteractionTracker sender, InteractionTrackerRequestIgnoredArgs args)
void | UpdateIsInteractingForRefresh (bool value)
void | ValuesChanged (InteractionTracker sender, InteractionTrackerValuesChangedArgs args)

Properties

CompositionPropertySet | CompositionProperties [get]
double | ExecutionRatio [get, set]
string | InteractionRatioCompositionProperty [get]
bool | IsInteractingForRefresh [get]

Events

TypedEventHandler
< IRefreshInfoProvider,
RefreshInteractionRatioChangedEventArgs > 		InteractionRatioChanged
TypedEventHandler
< IRefreshInfoProvider, object > 		IsInteractingForRefreshChanged
TypedEventHandler
< IRefreshInfoProvider, object > 		RefreshCompleted
TypedEventHandler
< IRefreshInfoProvider, object > 		RefreshStarted

Private Member Functions

void | RaiseInteractionRatioChanged (double interactionRatio)

Private Attributes

CompositionPropertySet | compositionProperties
double | executionRatio = 0.8
int | interactionRatioChangedCount = 0
String | interactionRatioName = "InteractionRatio"
bool | isInteractingForRefresh = false
RefreshPullDirection | refreshPullDirection
Size | refreshVisualizerSize

Detailed Description

Definition at line 165 of file ImageIRefreshInfoProviderAdapter.cs.

Constructor & Destructor Documentation

RefreshInfoProviderImplementation | ( | RefreshPullDirection | refreshPullDirection,
 |  | Size | refreshVisualizerSize,
 |  | Compositor | compositor |
 | ) |  |  | [inline]

Definition at line 175 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            this.refreshPullDirection = refreshPullDirection;
            this.refreshVisualizerSize = refreshVisualizerSize;
            compositionProperties = compositor.CreatePropertySet();
        }

Member Function Documentation

void CustomAnimationStateEntered | ( | InteractionTracker | sender,
 |  | InteractionTrackerCustomAnimationStateEnteredArgs | args |
 | ) |  |  | [inline]

Definition at line 252 of file ImageIRefreshInfoProviderAdapter.cs.

        {
        }

void IdleStateEntered | ( | InteractionTracker | sender,
 |  | InteractionTrackerIdleStateEnteredArgs | args |
 | ) |  |  | [inline]

Definition at line 256 of file ImageIRefreshInfoProviderAdapter.cs.

        {
        }

void InertiaStateEntered | ( | InteractionTracker | sender,
 |  | InteractionTrackerInertiaStateEnteredArgs | args |
 | ) |  |  | [inline]

Definition at line 260 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            UpdateIsInteractingForRefresh(false);
        }

void InteractingStateEntered | ( | InteractionTracker | sender,
 |  | InteractionTrackerInteractingStateEnteredArgs | args |
 | ) |  |  | [inline]

Definition at line 265 of file ImageIRefreshInfoProviderAdapter.cs.

        {
        }

void OnRefreshCompleted ( ) [inline]

Definition at line 202 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            if (RefreshCompleted != null)
            {
                RefreshCompleted.Invoke(this, null);
            }
        }

void OnRefreshStarted ( ) [inline]

Definition at line 194 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            if (RefreshStarted != null)
            {
                RefreshStarted.Invoke(this, null);
            }
        }

void RaiseInteractionRatioChanged ( double interactionRatio ) [inline, private]

Definition at line 292 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            compositionProperties.InsertScalar(interactionRatioName, (float)(interactionRatio));

            if (interactionRatioChangedCount == 0 || interactionRatio == 0.0)
            {
                if (InteractionRatioChanged != null)
                {
                    var e = PullToRefreshHelperTestApi.CreateRefreshInteractionRatioChangedEventArgsInstance(interactionRatio);
                    InteractionRatioChanged.Invoke(this, e);
                }
                interactionRatioChangedCount++;
            }
            else if (interactionRatioChangedCount >= 5)
            {
                interactionRatioChangedCount = 0;
            }
            else
            {
                interactionRatioChangedCount++;
            }
        }

void RequestIgnored | ( | InteractionTracker | sender,
 |  | InteractionTrackerRequestIgnoredArgs | args |
 | ) |  |  | [inline]

Definition at line 269 of file ImageIRefreshInfoProviderAdapter.cs.

        {
        }

void UpdateIsInteractingForRefresh ( bool value ) [inline]

Definition at line 182 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            if (value != isInteractingForRefresh)
            {
                isInteractingForRefresh = value;
                if (IsInteractingForRefreshChanged != null)
                {
                    IsInteractingForRefreshChanged.Invoke(this, null);
                }
            }
        }

void ValuesChanged | ( | InteractionTracker | sender,
 |  | InteractionTrackerValuesChangedArgs | args |
 | ) |  |  | [inline]

Definition at line 273 of file ImageIRefreshInfoProviderAdapter.cs.

        {
            switch (refreshPullDirection)
            {
                case RefreshPullDirection.TopToBottom:
                    RaiseInteractionRatioChanged(refreshVisualizerSize.Height == 0 ? 1.0 : Math.Min(1.0, (double)-args.Position.Y / refreshVisualizerSize.Height));
                    break;
                case RefreshPullDirection.BottomToTop:
                    RaiseInteractionRatioChanged(refreshVisualizerSize.Height == 0 ? 1.0f : Math.Min(1.0, (double)args.Position.Y / refreshVisualizerSize.Height));
                    break;
                case RefreshPullDirection.LeftToRight:
                    RaiseInteractionRatioChanged(refreshVisualizerSize.Width == 0 ? 1.0f : Math.Min(1.0, (double)-args.Position.X / refreshVisualizerSize.Width));
                    break;
                case RefreshPullDirection.RightToLeft:
                    RaiseInteractionRatioChanged(refreshVisualizerSize.Width == 0 ? 1.0f : Math.Min(1.0, (double)args.Position.X / refreshVisualizerSize.Width));
                    break;
            }
        }

Member Data Documentation

CompositionPropertySet compositionProperties [private]

Definition at line 170 of file ImageIRefreshInfoProviderAdapter.cs.

double executionRatio = 0.8 [private]

Definition at line 167 of file ImageIRefreshInfoProviderAdapter.cs.

int interactionRatioChangedCount = 0 [private]

Definition at line 172 of file ImageIRefreshInfoProviderAdapter.cs.

String interactionRatioName = "InteractionRatio" [private]

Definition at line 171 of file ImageIRefreshInfoProviderAdapter.cs.

bool isInteractingForRefresh = false [private]

Definition at line 173 of file ImageIRefreshInfoProviderAdapter.cs.

RefreshPullDirection refreshPullDirection [private]

Definition at line 168 of file ImageIRefreshInfoProviderAdapter.cs.

Size refreshVisualizerSize [private]

Definition at line 169 of file ImageIRefreshInfoProviderAdapter.cs.

Property Documentation

CompositionPropertySet CompositionProperties [get]

Definition at line 224 of file ImageIRefreshInfoProviderAdapter.cs.

double ExecutionRatio [get, set]

Definition at line 211 of file ImageIRefreshInfoProviderAdapter.cs.

string InteractionRatioCompositionProperty [get]

Definition at line 232 of file ImageIRefreshInfoProviderAdapter.cs.

bool IsInteractingForRefresh [get]

Definition at line 240 of file ImageIRefreshInfoProviderAdapter.cs.

Event Documentation

TypedEventHandler<IRefreshInfoProvider, RefreshInteractionRatioChangedEventArgs> InteractionRatioChanged

Definition at line 247 of file ImageIRefreshInfoProviderAdapter.cs.

TypedEventHandler<IRefreshInfoProvider, object> IsInteractingForRefreshChanged

Definition at line 248 of file ImageIRefreshInfoProviderAdapter.cs.

TypedEventHandler<IRefreshInfoProvider, object> RefreshCompleted

Definition at line 249 of file ImageIRefreshInfoProviderAdapter.cs.

TypedEventHandler<IRefreshInfoProvider, object> RefreshStarted

Definition at line 250 of file ImageIRefreshInfoProviderAdapter.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshContainer/TestUI/ImageIRefreshInfoProviderAdapter.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshVisualizerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RefreshVisualizerPage
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

RefreshVisualizerPage Class Reference

List of all members.

Public Member Functions

RefreshVisualizerPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Properties

Deferral | RefreshCompletionDeferral [get, set]

Private Member Functions

void | ChangeBackgroundClick (object sender, RoutedEventArgs e)
void | ChangeForegroundClick (object sender, RoutedEventArgs e)
void | InsertButtonClick (object sender, RoutedEventArgs e)
void | InsertGridButtonClick (object sender, RoutedEventArgs e)
void | MainPageLoaded (object sender, object e)
void | MarginValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OrientationComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | RefreshButtonClick (object sender, RoutedEventArgs e)
void | RefreshVisualizer_RefreshRequested (object sender, RefreshRequestedEventArgs e)
void | RefreshVisualizer_RefreshStateChanged (RefreshVisualizer sender, RefreshStateChangedEventArgs args)
void | SizeValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | Timer_Tick (object sender, object e)

Private Attributes

DispatcherTimer | adapterTimer = new DispatcherTimer()
int | BackgroundColorCounter = 0
int | ForegroundColorCounter = 0
Grid | grid = new Grid()
SymbolIcon | icon = new SymbolIcon(Symbol.Cancel)
DispatcherTimer | timer = new DispatcherTimer()

Detailed Description

Definition at line 29 of file RefreshVisualizerPage.xaml.cs.

Constructor & Destructor Documentation

RefreshVisualizerPage ( ) [inline]

Definition at line 40 of file RefreshVisualizerPage.xaml.cs.

        {
            this.InitializeComponent();
            this.RefreshButton.Click += RefreshButtonClick;
            this.InsertIcon.Click += InsertButtonClick;
            this.InsertGrid.Click += InsertGridButtonClick;
            this.ChangeForeground.Click += ChangeForegroundClick;
            this.ChangeBackground.Click += ChangeBackgroundClick;
            this.MarginSlider.ValueChanged += MarginValueChanged;
            this.MySizeSlider.ValueChanged += SizeValueChanged;
            this.Loaded += MainPageLoaded;

            timer.Interval = new TimeSpan(0, 0, 3);
            timer.Tick += Timer_Tick;

            SymbolIcon icon = new SymbolIcon(Symbol.Cancel);
            icon.Margin = new Thickness(15);
            icon.VerticalAlignment = VerticalAlignment.Center;
            icon.HorizontalAlignment = HorizontalAlignment.Center;
            icon.Height = 30;
            icon.Width = 30;

            grid.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 255, 255, 0));
            grid.Margin = new Thickness(15);
            grid.VerticalAlignment = VerticalAlignment.Center;
            grid.HorizontalAlignment = HorizontalAlignment.Center;
            grid.Height = 30;
            grid.Width = 30;

            LogController.InitializeLogging();
        }

Member Function Documentation

void ChangeBackgroundClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 94 of file RefreshVisualizerPage.xaml.cs.

        {
            switch(BackgroundColorCounter)
            {
                case 0:
                    this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 255, 0, 0));
                    break;
                case 1:
                    this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0));
                    break;
                case 2:
                    this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 0, 255));
                    break;
                default:
                    this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(0, 0, 0, 0));
                    BackgroundColorCounter = -1;
                    break;
            }
            BackgroundColorCounter++;
        }

void ChangeForegroundClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 115 of file RefreshVisualizerPage.xaml.cs.

        {
            switch (ForegroundColorCounter)
            {
                case 0:
                    this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 255, 0, 0));
                    break;
                case 1:
                    this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0));
                    break;
                case 2:
                    this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 0, 255));
                    break;
                default:
                    this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 0, 0));
                    ForegroundColorCounter = -1;
                    break;
            }
            ForegroundColorCounter++;
        }

void InsertButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 136 of file RefreshVisualizerPage.xaml.cs.

        {
            this.RefreshVisualizer.Content = icon;
        }

void InsertGridButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 79 of file RefreshVisualizerPage.xaml.cs.

        {
            this.RefreshVisualizer.Content = grid;
        }

void MainPageLoaded | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 146 of file RefreshVisualizerPage.xaml.cs.

        {
            this.Loaded -= MainPageLoaded;
            this.RefreshVisualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
            var adapter = new SliderRefreshInfoProviderAdapter(this.Slider, adapterTimer);
            ((IRefreshVisualizerPrivate)this.RefreshVisualizer).InfoProvider = adapter.adapt();
            this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Auto);
            this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Normal);
            this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Rotate90DegreesCounterclockwise);
            this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Rotate270DegreesCounterclockwise);
            this.RefreshVisualizer.RefreshStateChanged += RefreshVisualizer_RefreshStateChanged;
            this.StateText.Text = this.RefreshVisualizer.State.ToString();
            this.OrientationComboBox.SelectedIndex = (int)this.RefreshVisualizer.Orientation;
            this.OrientationComboBox.SelectionChanged += OrientationComboBox_SelectionChanged;
            this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0));
        }

void MarginValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 84 of file RefreshVisualizerPage.xaml.cs.

        {
            icon.Margin = new Thickness(e.NewValue);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 72 of file RefreshVisualizerPage.xaml.cs.

        {
            base.OnNavigatedFrom(e);
            timer.Stop();
            adapterTimer.Stop();
        }

void OrientationComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 168 of file RefreshVisualizerPage.xaml.cs.

        {
            this.RefreshVisualizer.Orientation = (RefreshVisualizerOrientation)this.OrientationComboBox.SelectedItem;
        }

void RefreshButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 141 of file RefreshVisualizerPage.xaml.cs.

        {
            this.RefreshVisualizer.RequestRefresh();
        }

void RefreshVisualizer_RefreshRequested | ( | object | sender,
 |  | RefreshRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 173 of file RefreshVisualizerPage.xaml.cs.

        {
            this.RefreshCompletionDeferral = e.GetDeferral();
            timer.Start();
        }

void RefreshVisualizer_RefreshStateChanged | ( | RefreshVisualizer | sender,
 |  | RefreshStateChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 163 of file RefreshVisualizerPage.xaml.cs.

        {
            this.StateText.Text = args.NewState.ToString();
        }

void SizeValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file RefreshVisualizerPage.xaml.cs.

        {
            icon.Height = e.NewValue;
            icon.Width = e.NewValue;
        }

void Timer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 185 of file RefreshVisualizerPage.xaml.cs.

        {
            timer.Stop();
            this.RefreshCompletionDeferral.Complete();
        }

Member Data Documentation

DispatcherTimer adapterTimer = new DispatcherTimer() [private]

Definition at line 32 of file RefreshVisualizerPage.xaml.cs.

int BackgroundColorCounter = 0 [private]

Definition at line 33 of file RefreshVisualizerPage.xaml.cs.

int ForegroundColorCounter = 0 [private]

Definition at line 34 of file RefreshVisualizerPage.xaml.cs.

Grid grid = new Grid() [private]

Definition at line 38 of file RefreshVisualizerPage.xaml.cs.

SymbolIcon icon = new SymbolIcon(Symbol.Cancel) [private]

Definition at line 36 of file RefreshVisualizerPage.xaml.cs.

DispatcherTimer timer = new DispatcherTimer() [private]

Definition at line 31 of file RefreshVisualizerPage.xaml.cs.

Property Documentation

Deferral RefreshCompletionDeferral [get, set, private]

Definition at line 180 of file RefreshVisualizerPage.xaml.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshVisualizer/TestUI/RefreshVisualizerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterTestUIPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RepeaterTestUIPage
Public Member Functions | Private Member Functions | Private Attributes

RepeaterTestUIPage Class Reference

List of all members.

Public Member Functions

RepeaterTestUIPage ()

Private Member Functions

void CmbOutputDebugStringLevels_SelectionChanged (object sender, SelectionChangedEventArgs e)
VirtualizingLayout GetFlowLayout ()
VirtualizingLayout GetGridLayout ()
VirtualizingLayout GetStackLayout ()

Private Attributes

VirtualizingLayout _flowLayout
VirtualizingLayout _gridLayout
VirtualizingLayout _stackLayout

Detailed Description

Definition at line 12 of file RepeaterTestUIPage.xaml.cs.

Constructor & Destructor Documentation

RepeaterTestUIPage ( ) [inline]

Definition at line 18 of file RepeaterTestUIPage.xaml.cs.

        {
            this.InitializeComponent();

            objectModelTest.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ObjectModelTestPage));
            };

            defaultDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(Defaults));
            };

            basicDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(BasicDemo));
            };

            linedFlowLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(LinedFlowLayoutDemo));
            };

            uniformGridLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(UniformGridLayoutDemo));
            };

            keyboardNavigationSample.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(KeyboardNavigationSample));
            };

            itemsSourceDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ElementsInItemsSourcePage));
            };

            itemTemplateDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemTemplateDemo));
            };

            collectionChangeDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(CollectionChangeDemo));
            };

            sortingAndFilteringDemo.Click += delegate {
                Frame.NavigateWithoutAnimation(typeof(SortingAndFilteringPage));
            };

            variableSizedItemsDemo.Click += delegate {
                Frame.NavigateWithoutAnimation(typeof(VariableSizedItemsPage));
            };

            animationsDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(AnimationsDemoPage));
            };

            circleLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(CircleLayoutSamplePage));
            };

            nonVirtualStackLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(NonVirtualStackLayoutSamplePage));
            };

            virtualFixedStackLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(VirtualizingUniformStackLayoutSamplePage));
            };

            virtualStackLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(VirtualizingStackLayoutSamplePage));
            };

            pinterestLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(PinterestLayoutSamplePage));
            };

            flowLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(FlowLayoutDemoPage));
            };

            activityFeedLayoutDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ActivityFeedSamplePage));
            };

            storeDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.StoreDemoPage));
            };

            flatSelectionDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.Selection.FlatSample));
            };

            groupedSelectionDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.Selection.GroupedSample));
            };

            treeSelectionDemo.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.Selection.TreeViewSample));
            };

            animatedScrollDemo.Click += delegate {
                Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.ScaleAnimatedVerticalListDemo));
            };

            noGroupingList.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetStackLayout(),
                        NumLevels = 0,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            noGroupingGrid.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetGridLayout(),
                        NumLevels = 0,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            noGroupingFlow.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetFlowLayout(),
                        NumLevels = 0,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            groupedList.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetStackLayout(),
                        Level1Layout = GetStackLayout(),
                        NumLevels = 1,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            groupedGrid.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetStackLayout(),
                        Level1Layout = GetGridLayout(),
                        NumLevels = 1,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            groupedFlow.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetStackLayout(),
                        Level1Layout = GetFlowLayout(),
                        NumLevels = 1,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            nestedList.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetStackLayout(),
                        Level1Layout = GetStackLayout(),
                        Level2Layout = GetStackLayout(),
                        NumLevels = 2,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            nestedGrid.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetStackLayout(),
                        Level1Layout = GetStackLayout(),
                        Level2Layout = GetGridLayout(),
                        NumLevels = 2,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };

            nestedFlow.Click += delegate
            {
                Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
                    new PageInfo()
                    {
                        Level0Layout = GetStackLayout(),
                        Level1Layout = GetStackLayout(),
                        Level2Layout = GetFlowLayout(),
                        NumLevels = 2,
                        Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                    });
            };
        }

Member Function Documentation

void CmbOutputDebugStringLevels_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 248 of file RepeaterTestUIPage.xaml.cs.

        {
            if (chkScrollView != null && chkScrollView.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ScrollView",
                    cmbOutputDebugStringLevels.SelectedIndex == 1 || cmbOutputDebugStringLevels.SelectedIndex == 2,
                    cmbOutputDebugStringLevels.SelectedIndex == 2);
            }

            if (chkLinedFlowLayout != null && chkLinedFlowLayout.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "LinedFlowLayout",
                    cmbOutputDebugStringLevels.SelectedIndex == 1 || cmbOutputDebugStringLevels.SelectedIndex == 2,
                    cmbOutputDebugStringLevels.SelectedIndex == 2);
            }
        }

VirtualizingLayout GetFlowLayout ( ) [inline, private]

Definition at line 299 of file RepeaterTestUIPage.xaml.cs.

        {
            if (_flowLayout == null)
            {
                _flowLayout = new FlowLayout()
                {
                    MinRowSpacing = double.Parse(itemSpacing.Text),
                    MinColumnSpacing = double.Parse(lineSpacing.Text),
                    LineAlignment = (FlowLayoutLineAlignment)Enum.Parse(typeof(FlowLayoutLineAlignment), lineAlignment.Text),
                    Orientation = orientation.IsOn ? Orientation.Vertical : Orientation.Horizontal,
                };
            }

            return _flowLayout;
        }

VirtualizingLayout GetGridLayout ( ) [inline, private]

Definition at line 281 of file RepeaterTestUIPage.xaml.cs.

        {
            if (_gridLayout == null)
            {
                _gridLayout = new UniformGridLayout()
                {
                    MinItemWidth = 150,
                    MinItemHeight = 150,
                    MinRowSpacing = double.Parse(itemSpacing.Text),
                    MinColumnSpacing = double.Parse(lineSpacing.Text),
                    ItemsJustification = (UniformGridLayoutItemsJustification)Enum.Parse(typeof(UniformGridLayoutItemsJustification), lineAlignment.Text),
                    Orientation = orientation.IsOn ?  Orientation.Vertical: Orientation.Horizontal,
                };
            }

            return _gridLayout;
        }

VirtualizingLayout GetStackLayout ( ) [inline, private]

Definition at line 267 of file RepeaterTestUIPage.xaml.cs.

        {
            if (_stackLayout == null)
            {
                _stackLayout = new StackLayout()
                {
                    Spacing = double.Parse(lineSpacing.Text),
                    Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
                };
            }

            return _stackLayout;
        }

Member Data Documentation

VirtualizingLayout _flowLayout [private]

Definition at line 16 of file RepeaterTestUIPage.xaml.cs.

VirtualizingLayout _gridLayout [private]

Definition at line 15 of file RepeaterTestUIPage.xaml.cs.

VirtualizingLayout _stackLayout [private]

Definition at line 14 of file RepeaterTestUIPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/RepeaterTestUIPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBackgroundItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealBackgroundItem
Static Public Member Functions | Public Attributes | Static Private Attributes

RevealBackgroundItem Class Reference

List of all members.

Static Public Member Functions

static ObservableCollection
< RevealBackgroundItem > 		GetItems ()

Public Attributes

string Name
RevealTestBackgrounds Value

Static Private Attributes

static ObservableCollection
< RevealBackgroundItem > 		items

Detailed Description

Definition at line 97 of file RevealScenarioGrid.xaml.cs.

Member Function Documentation

static ObservableCollection<RevealBackgroundItem> GetItems ( ) [inline, static]

Definition at line 104 of file RevealScenarioGrid.xaml.cs.

        {
            if(items == null)
            {
                items = new ObservableCollection<RevealBackgroundItem>();
                foreach (RevealTestBackgrounds theme in Enum.GetValues(typeof(RevealTestBackgrounds)))
                {
                    items.Add(new RevealBackgroundItem { Name = Enum.GetName(typeof(RevealTestBackgrounds), theme), Value = theme });
                }
            }

            return items;
        }

Member Data Documentation

ObservableCollection<RevealBackgroundItem> items [static, private]

Definition at line 99 of file RevealScenarioGrid.xaml.cs.

string Name

Definition at line 101 of file RevealScenarioGrid.xaml.cs.

RevealTestBackgrounds Value

Definition at line 102 of file RevealScenarioGrid.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioGrid.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBasicPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealBasicPage
Public Member Functions | Private Member Functions

RevealBasicPage Class Reference

List of all members.

Public Member Functions

RevealBasicPage ()

Private Member Functions

void | OnBackgroundColorButtonClick (object sender, RoutedEventArgs e)
void | OnChangeDefaultPositionClick (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 13 of file RevealBasicPage.xaml.cs.

Constructor & Destructor Documentation

RevealBasicPage ( ) [inline]

Definition at line 15 of file RevealBasicPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void OnBackgroundColorButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 20 of file RevealBasicPage.xaml.cs.

        {
            if (RequestedTheme == ElementTheme.Dark)
            {
                RequestedTheme = ElementTheme.Light;
                RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.White);
            }
            else
            {
                RequestedTheme = ElementTheme.Dark;
                RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.Black);
            }
        }

void OnChangeDefaultPositionClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file RevealBasicPage.xaml.cs.

        {
            if (TopCmdBar.DefaultLabelPosition == Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Bottom)
            {
                TopCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Collapsed;
                BottomCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Collapsed;
            }
            else if (TopCmdBar.DefaultLabelPosition == Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Collapsed)
            {
                TopCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Right;
                BottomCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Right;
            }
            else
            {
                TopCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Bottom;
                BottomCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Bottom;
            }
        }

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealBasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealColorPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealColorPage
Public Member Functions | Static Public Member Functions | Properties | Private Member Functions | Private Attributes

RevealColorPage Class Reference

List of all members.

Public Member Functions

RevealColorPage ()

Static Public Member Functions

static string | GetBrushName (string fullName)

Properties

static IEnumerable< string > | BackgroundBrushNames [get]
string | Blah [get]
static IEnumerable< string > | BorderBrushNames [get]
IEnumerable< KeyValuePair
< string, Brush > > 		RevealBackgroundBrushes [get]
IEnumerable< KeyValuePair
< string, Brush > > 		RevealBorderBrushes [get]
RevealTestApi | RevealState [get]

Private Member Functions

void | BrushCheckFailed (string message)
void | BrushCheckFailed (string format, object arg0=null, object arg1=null)
void | OnCheckBrushResourcesClicked (object sender, RoutedEventArgs args)

Private Attributes

string | _checkBrushResult = ""
RevealTestApi | _revealState = new RevealTestApi()

Detailed Description

Definition at line 16 of file RevealColorPage.xaml.cs.

Constructor & Destructor Documentation

RevealColorPage ( ) [inline]

Definition at line 18 of file RevealColorPage.xaml.cs.

        {
            this.InitializeComponent();
            //_revealState.BorderLight.InnerConeColor = Microsoft.UI.Colors.Red;
        }

Member Function Documentation

void BrushCheckFailed ( string message ) [inline, private]

Definition at line 120 of file RevealColorPage.xaml.cs.

        {
            if (_checkBrushResult != "") _checkBrushResult += ";";
            _checkBrushResult += message;
        }

void BrushCheckFailed | ( | string | format,
 |  | object | arg0 = null,
 |  | object | arg1 = null |
 | ) |  |  | [inline, private]

Definition at line 126 of file RevealColorPage.xaml.cs.

        {
            BrushCheckFailed(string.Format(format, arg0, arg1));
        }

static string GetBrushName ( string fullName ) [inline, static]

Definition at line 82 of file RevealColorPage.xaml.cs.

        {
            //SystemControlTransparentRevealBackgroundBrush
            //SystemControlBackgroundTransparentRevealBorderBrush
            if (fullName == null || fullName.Length <= 24)
                return string.Empty;

            return fullName.Substring(19, fullName.Length - 24);
        }

void OnCheckBrushResourcesClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 131 of file RevealColorPage.xaml.cs.

        {
            using (var setup = new MaterialSetupHelper())
            {
                // Load up the resource dictionaries and do some consistency checks on them. Verify:
                // 1) All same resource names exist in all theme dictionaries (rs1, rs2) x (light, dark, hc)
                // 2) If a resource is a RevealBrush in Light that it's the same type of RevealBrush in Dark
                // 3) All RevealBrushes in Light should have TargetTheme=Light, same for Dark.
                // 4) Border-named brushes should be RevealBorderBrush, same for Background.

                try
                {
                    _checkBrushResult = "";

                    // RS1 should have no implicit keys.
                    int implicitKeys = RS1RevealThemeResourcesLight.Where(x => !(x.Key is string)).Count();
                    if (implicitKeys > 0)
                    {
                        BrushCheckFailed("Rs1 should have no implicit keys (had {0})", implicitKeys);
                    }

                    var rs1Keys = RS1RevealThemeResourcesLight.Keys.ToList();
                    var rs2Keys = RS2RevealThemeResourcesLight.Keys.ToList();

                    var uniqueKeysInRS1 = RS1RevealThemeResourcesLight.Where(x => !rs2Keys.Contains(x.Key)).ToList();
                    var uniqueKeysInRS2 = RS2RevealThemeResourcesLight.Where(x => !rs1Keys.Contains(x.Key)).Where(x => x.Key is string).ToList();

                    if (uniqueKeysInRS2.Count > 0)
                    {
                        BrushCheckFailed("RS2 should not have any keys that RS1 does not");
                    }

                    // Grab all the theme dictionaries -- for RS1 tack on any keys not in a theme dictionary and treat them as if they're in that theme dictionary.
                    var rs1dark = ((ResourceDictionary)RS1RevealThemeResourcesDark.ThemeDictionaries["Default"]).Concat(uniqueKeysInRS1).ToDictionary(x => x.Key, x => x.Value);
                    var rs1light = ((ResourceDictionary)RS1RevealThemeResourcesLight.ThemeDictionaries["Light"]).Concat(uniqueKeysInRS1).ToDictionary(x => x.Key, x => x.Value);
                    var rs1hc = ((ResourceDictionary)RS1RevealThemeResourcesLight.ThemeDictionaries["HighContrast"]).Concat(uniqueKeysInRS1).ToDictionary(x => x.Key, x => x.Value);
                    var rs2dark = ((ResourceDictionary)RS2RevealThemeResourcesDark.ThemeDictionaries["Default"]).ToDictionary(x => x.Key, x => x.Value);
                    var rs2light = ((ResourceDictionary)RS2RevealThemeResourcesLight.ThemeDictionaries["Light"]).ToDictionary(x => x.Key, x => x.Value);
                    var rs2hc = ((ResourceDictionary)RS2RevealThemeResourcesLight.ThemeDictionaries["HighContrast"]).ToDictionary(x => x.Key, x => x.Value);

                    // Choose the rs1 light keys as "truth" and check everyone else has those keys and doesn't have keys they shouldn't.
                    var expectedKeys = rs1light.Keys;
                    Action<string, Dictionary<object, object>> checkDictionary = (which, dict) =>
                    {
                        var unexpectedEntries = dict.Where(x => !expectedKeys.Contains(x.Key)).ToList();

                        foreach (var unexpected in unexpectedEntries)
                        {
                            BrushCheckFailed("Dictionary {0} has an entry it should not: {1}", which, unexpected.Key);
                        }

                        var missingEntries = expectedKeys.Where(x => !dict.ContainsKey(x)).ToList();
                        foreach (var missing in missingEntries)
                        {
                            BrushCheckFailed("Dictionary {0} should have had entry '{1}' but was missing", which, missing);
                        }
                    };

                    checkDictionary("rs1light", rs1light);
                    checkDictionary("rs2light", rs2light);

                    checkDictionary("rs1dark", rs1dark);
                    checkDictionary("rs2dark", rs2dark);

                    // NOTE: Doing this will cause the High Contrast brushes to load ThemeResource from Light/Dark instead of HighContrast.
                    // At the moment there's nothing we can do about that. But we can still check the keys in the dictionaries.
                    checkDictionary("rs1hc", rs1hc);
                    checkDictionary("rs2hc", rs2hc);

                    // Make sure there are no reveal brushes in high contrast or rs1.
                    foreach (var entry in rs1hc.Concat(rs1dark).Concat(rs1light))
                    {
                        var brush = entry.Value as RevealBrush;
                        if (brush != null)
                        {
                            BrushCheckFailed("RS1 theme dictionary had a RevealBrush entry {0}", entry.Key);
                        }
                    }

                    // Don't log failures for issues where the brush is intentionally different in RS1.
                    var brushesWithFallbackIssues = new HashSet<string> {
                    "SystemControlHighlightAccent2RevealBackgroundBrush",
                    "SystemControlHighlightAccent3RevealBackgroundBrush",
                    "SystemControlHighlightAccent3RevealAccent2BackgroundBrush",
                    "ListViewItemRevealBackgroundSelected",
                    "ListViewItemRevealBackgroundSelectedPointerOver",
                    "ListViewItemRevealBackgroundSelectedPressed",
                    "ComboBoxItemRevealBackgroundSelected",
                    "ComboBoxItemRevealBackgroundSelectedUnfocused",
                    "ComboBoxItemRevealBackgroundSelectedPointerOver",
                    "ComboBoxItemRevealBackgroundSelectedPressed",
                    "GridViewItemRevealBackgroundSelectedPointerOver",
                    "GridViewItemRevealBackgroundSelectedPressed",
                };

                    // Trying to dig the resources out of the dictionary simply doesn't work. We have to load XAML and put the element in the tree.
                    string snippetBegin = "<Grid RequestedTheme=\"{0}\" " +
                        " xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">" +
                        " <Grid.Resources><ResourceDictionary Source=\"{1}\"/></Grid.Resources>\r\n";

                    string snippetChildren = "";
                    foreach (var lightEntry in rs2light)
                    {
                        if (lightEntry.Value is RevealBrush)
                        {
                            snippetChildren += string.Format("<Grid Name=\"{0}\" Background=\"{{ThemeResource {0}}}\"/>\r\n", lightEntry.Key);
                        }
                    }

                    string snippetEnd = "</Grid>";
                    string rs1darksnippet = string.Format(snippetBegin, "Dark", "ms-appx:///RevealBrush_rs1_themeresources.xaml") + snippetChildren + snippetEnd;
                    string rs2darksnippet = string.Format(snippetBegin, "Dark", "ms-appx:///RevealBrush_rs2_themeresources.xaml") + snippetChildren + snippetEnd;
                    string rs1lightsnippet = string.Format(snippetBegin, "Light", "ms-appx:///RevealBrush_rs1_themeresources.xaml") + snippetChildren + snippetEnd;
                    string rs2lightsnippet = string.Format(snippetBegin, "Light", "ms-appx:///RevealBrush_rs2_themeresources.xaml") + snippetChildren + snippetEnd;
                    var darkGridRS1 = (Grid)XamlReader.Load(rs1darksnippet);
                    ResourceRootDarkRS1.Children.Add(darkGridRS1);
                    var darkGridRS2 = (Grid)XamlReader.Load(rs2darksnippet);
                    ResourceRootDarkRS2.Children.Add(darkGridRS2);
                    var lightGridRS1 = (Grid)XamlReader.Load(rs1lightsnippet);
                    ResourceRootLightRS1.Children.Add(lightGridRS1);
                    var lightGridRS2 = (Grid)XamlReader.Load(rs2lightsnippet);
                    ResourceRootLightRS2.Children.Add(lightGridRS2);

                    Dictionary<string, Grid> rs1DarkBrushes = new Dictionary<string, Grid>();
                    Dictionary<string, Grid> rs2DarkBrushes = new Dictionary<string, Grid>();
                    Dictionary<string, Grid> rs1LightBrushes = new Dictionary<string, Grid>();
                    Dictionary<string, Grid> rs2LightBrushes = new Dictionary<string, Grid>();

                    foreach (Grid grid in darkGridRS1.Children)
                    {
                        rs1DarkBrushes[grid.Name] = grid;
                    }

                    foreach (Grid grid in darkGridRS2.Children)
                    {
                        rs2DarkBrushes[grid.Name] = grid;
                    }

                    foreach (Grid grid in lightGridRS1.Children)
                    {
                        rs1LightBrushes[grid.Name] = grid;
                    }

                    foreach (Grid grid in lightGridRS2.Children)
                    {
                        rs2LightBrushes[grid.Name] = grid;
                    }

                    foreach (var lightEntry in rs1LightBrushes)
                    {
                        var darkRS1Brush = rs1DarkBrushes[(string)lightEntry.Key].Background as SolidColorBrush;
                        var darkBrush = rs2DarkBrushes[(string)lightEntry.Key].Background as RevealBrush;
                        var lightRS1Brush = rs1LightBrushes[(string)lightEntry.Key].Background as SolidColorBrush;
                        var lightBrush = rs2LightBrushes[(string)lightEntry.Key].Background as RevealBrush;

                        // Check that TargetTheme is set correctly.
                        if (lightBrush.TargetTheme != ApplicationTheme.Light)
                        {
                            BrushCheckFailed("RevealBrush for light theme did not have TargetTheme=Light: {0}", lightEntry.Key);
                        }

                        // Make sure that their fallback colors match their correspondents in RS1.
                        if (lightBrush.FallbackColor != lightRS1Brush.Color && !brushesWithFallbackIssues.Contains(lightEntry.Key))
                        {
                            BrushCheckFailed("FallbackColor for light theme did not match rs1 color: {0}", lightEntry.Key);
                        }

                        if (darkBrush == null || darkBrush.GetType() != lightBrush.GetType())
                        {
                            BrushCheckFailed("Light entry was RevealBrush but dark entry was not (or their types weren't the same): {0}", lightEntry.Key);
                        }
                        else
                        {
                            if (darkBrush.TargetTheme != ApplicationTheme.Dark)
                            {
                                BrushCheckFailed("RevealBrush for dark theme did not have TargetTheme=Dark: {0}", lightEntry.Key);
                            }
                            else
                            {
                                if (darkBrush.FallbackColor != darkRS1Brush.Color && !brushesWithFallbackIssues.Contains(lightEntry.Key))
                                {
                                    BrushCheckFailed("FallbackColor for dark theme did not match rs1 color: {0}", lightEntry.Key);
                                }
                            }
                        }
                    }
                }
                catch (Exception e)
                {
                    BrushCheckFailed("ERROR: " + e.ToString());
                }

                // Set at the end to make sure we only fire valuechanged once.
                CheckBrushesResult.TextWrapping = TextWrapping.Wrap;
                CheckBrushesResult.Text = _checkBrushResult;
            }
        }

Member Data Documentation

string _checkBrushResult = "" [private]

Definition at line 119 of file RevealColorPage.xaml.cs.

RevealTestApi _revealState = new RevealTestApi() [private]

Definition at line 24 of file RevealColorPage.xaml.cs.

Property Documentation

IEnumerable<string> BackgroundBrushNames [static, get]

Definition at line 32 of file RevealColorPage.xaml.cs.

string Blah [get]

Definition at line 330 of file RevealColorPage.xaml.cs.

IEnumerable<string> BorderBrushNames [static, get]

Definition at line 51 of file RevealColorPage.xaml.cs.

IEnumerable<KeyValuePair<string, Brush> > RevealBackgroundBrushes [get]

Definition at line 106 of file RevealColorPage.xaml.cs.

IEnumerable<KeyValuePair<string, Brush> > RevealBorderBrushes [get]

Definition at line 93 of file RevealColorPage.xaml.cs.

RevealTestApi RevealState [get]

Definition at line 27 of file RevealColorPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealColorPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealFallbackPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealFallbackPage
Public Member Functions | Private Member Functions | Private Attributes

RevealFallbackPage Class Reference

List of all members.

Public Member Functions

RevealFallbackPage ()

Private Member Functions

void | AlwaysUseFallbackButton_Checked (object sender, RoutedEventArgs e)
void | AlwaysUseFallbackButton_Unchecked (object sender, RoutedEventArgs e)
void | AlwaysUseFallbackHelper (bool value)
void | RunRevealAlwaysUseFallback ()
void | RunTestButton_Clicked (object sender, RoutedEventArgs e)
bool | VerifyAmbientLight (RevealBrush testBrush, bool value)
bool | VerifyBorderLight (RevealBrush testBrush, bool value)
bool | VerifyFallbackColor (RevealBrush testBrush, Color fallbackColor)
bool | VerifyHoverLight (RevealBrush testBrush, bool value)
bool | VerifyRevealBrush (RevealBrush testBrush)

Private Attributes

RevealBackgroundBrush _resourceButtonRevealBackgroundBrush
RevealBackgroundBrush _resourceButtonRevealBackgroundPointerOver
RevealBackgroundBrush _resourceButtonRevealBackgroundPressed
RevealBorderBrush _resourceButtonRevealBorderBrush
RevealBorderBrush _resourceButtonRevealBorderBrushPointerOver
RevealBorderBrush _resourceButtonRevealBorderBrushPressed
RevealBrushTestApi _revealBrushTestApi
RevealTestApi _revealTestApi

Detailed Description

Definition at line 15 of file RevealFallbackPage.xaml.cs.

Constructor & Destructor Documentation

RevealFallbackPage ( ) [inline]

Definition at line 26 of file RevealFallbackPage.xaml.cs.

        {
            this.InitializeComponent();

            AutomationProperties.SetName(this, "RevealFallbackPage");
            AutomationProperties.SetAutomationId(this, "RevealFallbackPage");

            _revealTestApi = new RevealTestApi();
            _revealBrushTestApi = new RevealBrushTestApi();
        }

Member Function Documentation

void AlwaysUseFallbackButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 124 of file RevealFallbackPage.xaml.cs.

        {
            AlwaysUseFallbackHelper(true);
        }

void AlwaysUseFallbackButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 129 of file RevealFallbackPage.xaml.cs.

        {
            AlwaysUseFallbackHelper(false);
        }

void AlwaysUseFallbackHelper ( bool value ) [inline, private]

Definition at line 134 of file RevealFallbackPage.xaml.cs.

        {
            _resourceButtonRevealBackgroundBrush.AlwaysUseFallback = value;
            _resourceButtonRevealBackgroundPointerOver.AlwaysUseFallback = value;
            _resourceButtonRevealBackgroundPressed.AlwaysUseFallback = value;
            _resourceButtonRevealBorderBrush.AlwaysUseFallback = value;
            _resourceButtonRevealBorderBrushPointerOver.AlwaysUseFallback = value;
            _resourceButtonRevealBorderBrushPressed.AlwaysUseFallback = value;
        }

void RunRevealAlwaysUseFallback ( ) [inline, private]

Definition at line 68 of file RevealFallbackPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = LargeButton.Background as RevealBrush;
            bool isInFallbackMode = _revealBrushTestApi.IsInFallbackMode;

            if (isInFallbackMode)
            {
                TestResult.Text = "RevealAlwaysUseFallback: Skipped";
            }
            else
            {
                // 1. Force fallback + validate
                AlwaysUseFallbackHelper(true);
                RevealBrush largeButtonBackgroundBrush = LargeButton.Background as RevealBrush;
                RevealBrush largeButtonBorderBrush = LargeButton.BorderBrush as RevealBrush;

                // Validate brushes
                bool fallbackBackgroundBrushResult = VerifyFallbackColor(largeButtonBackgroundBrush, Microsoft.UI.Colors.Orange);
                bool fallbackBorderBrushResult = VerifyFallbackColor(largeButtonBorderBrush, Microsoft.UI.Colors.Transparent);

                // Validate lights
                bool fallbackBackroundLightResult = VerifyAmbientLight(largeButtonBackgroundBrush, true) &&
                                                     VerifyBorderLight(largeButtonBackgroundBrush, false) &&
                                                     VerifyHoverLight(largeButtonBackgroundBrush, false);

                bool fallbackBorderLightResult = VerifyAmbientLight(largeButtonBorderBrush, true) &&
                                                     VerifyBorderLight(largeButtonBorderBrush, false) &&
                                                     VerifyHoverLight(largeButtonBorderBrush, false);

                // 2. Unforce fallback + validate
                AlwaysUseFallbackHelper(false);

                // Validate brushes
                bool backgroundBrushResult = VerifyRevealBrush(largeButtonBackgroundBrush);
                bool borderBrushResult = VerifyRevealBrush(largeButtonBorderBrush);

                // Validate lights
                bool backroundLightResult = VerifyAmbientLight(largeButtonBackgroundBrush, true) &&
                                                     VerifyBorderLight(largeButtonBackgroundBrush, false) &&
                                                     VerifyHoverLight(largeButtonBackgroundBrush, true);

                bool borderLightResult = VerifyAmbientLight(largeButtonBorderBrush, true) &&
                                                     VerifyBorderLight(largeButtonBorderBrush, true) &&
                                                     VerifyHoverLight(largeButtonBorderBrush, false);

                bool brushesResult = fallbackBackgroundBrushResult && fallbackBorderBrushResult && backgroundBrushResult && borderBrushResult;
                bool lightsResult = fallbackBackroundLightResult && fallbackBorderLightResult && backroundLightResult && borderLightResult;
                bool result = brushesResult && lightsResult;

                string brushesResultString = System.String.Format("({0},{1},{2},{3})", fallbackBackgroundBrushResult, fallbackBorderBrushResult, backgroundBrushResult, borderBrushResult);
                string lightsResultString = System.String.Format("({0},{1},{2},{3})", fallbackBackroundLightResult, fallbackBorderLightResult, backroundLightResult, borderLightResult);

                TestResult.Text = result ? "" : "Errors: brushes=" + brushesResultString + ", lights=" + lightsResultString;
            }
        }

void RunTestButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file RevealFallbackPage.xaml.cs.

        {
            using (var setup = new MaterialSetupHelper())
            {
                // Initialize local references to Page.Resources overrides for the RevealBrushes we'll use
                _resourceButtonRevealBackgroundBrush = Resources["ButtonRevealBackground"] as RevealBackgroundBrush;
                _resourceButtonRevealBackgroundPointerOver = Resources["ButtonRevealBackgroundPointerOver"] as RevealBackgroundBrush;
                _resourceButtonRevealBackgroundPressed = Resources["ButtonRevealBackgroundPressed"] as RevealBackgroundBrush;
                _resourceButtonRevealBorderBrush = Resources["ButtonRevealBorderBrush"] as RevealBorderBrush;
                _resourceButtonRevealBorderBrushPointerOver = Resources["ButtonRevealBorderBrushPointerOver"] as RevealBorderBrush;
                _resourceButtonRevealBorderBrushPressed = Resources["ButtonRevealBorderBrushPressed"] as RevealBorderBrush;

                // Apply reveal styles
                RevealButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
                RevealRepeatButton.Style = Application.Current.Resources["RepeatButtonRevealStyle"] as Style;
                RevealToggleButton.Style = Application.Current.Resources["ToggleButtonRevealStyle"] as Style;
                LargeButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
                NarrowButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;

                switch (TestNameComboBox.GetSelectedText())
                {
                    case "RevealAlwaysUseFallback":
                        {
                            RunRevealAlwaysUseFallback();
                            break;
                        }
                }
            }
        }

bool VerifyAmbientLight | ( | RevealBrush | testBrush,
 |  | bool | value |
 | ) |  |  | [inline, private]

Definition at line 172 of file RevealFallbackPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool ambientLightSet = _revealBrushTestApi.IsAmbientLightSet;
            return value ? ambientLightSet : !ambientLightSet;
        }

bool VerifyBorderLight | ( | RevealBrush | testBrush,
 |  | bool | value |
 | ) |  |  | [inline, private]

Definition at line 179 of file RevealFallbackPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool borderLightSet = _revealBrushTestApi.IsBorderLightSet;
            return value ? borderLightSet : !borderLightSet;
        }

bool VerifyFallbackColor | ( | RevealBrush | testBrush,
 |  | Color | fallbackColor |
 | ) |  |  | [inline, private]

Definition at line 154 of file RevealFallbackPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool isInFallbackMode = _revealBrushTestApi.IsInFallbackMode;
            CompositionBrush compositionBrush = _revealBrushTestApi.CompositionBrush;

            // In fallbackmode, comp brush is set to null if color is transparent
            // it's used to boost performance for LVIP.
            if (isInFallbackMode && fallbackColor.Equals(Microsoft.UI.Colors.Transparent))
            {
                return compositionBrush == null;
            }

            return isInFallbackMode &&
                   (compositionBrush != null && compositionBrush is CompositionColorBrush) &&
                   (compositionBrush as CompositionColorBrush).Color.Equals(fallbackColor);
        }

bool VerifyHoverLight | ( | RevealBrush | testBrush,
 |  | bool | value |
 | ) |  |  | [inline, private]

Definition at line 186 of file RevealFallbackPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool hoverLightSet = _revealBrushTestApi.IsHoverLightSet;
            return value ? hoverLightSet : !hoverLightSet;
        }

bool VerifyRevealBrush ( RevealBrush testBrush ) [inline, private]

Definition at line 144 of file RevealFallbackPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool isInFallbackMode = _revealBrushTestApi.IsInFallbackMode;
            CompositionBrush compositionBrush = _revealBrushTestApi.CompositionBrush;

            return !isInFallbackMode &&
                   (compositionBrush != null && compositionBrush is CompositionEffectBrush);
        }

Member Data Documentation

RevealBackgroundBrush _resourceButtonRevealBackgroundBrush [private]

Definition at line 19 of file RevealFallbackPage.xaml.cs.

RevealBackgroundBrush _resourceButtonRevealBackgroundPointerOver [private]

Definition at line 20 of file RevealFallbackPage.xaml.cs.

RevealBackgroundBrush _resourceButtonRevealBackgroundPressed [private]

Definition at line 21 of file RevealFallbackPage.xaml.cs.

RevealBorderBrush _resourceButtonRevealBorderBrush [private]

Definition at line 22 of file RevealFallbackPage.xaml.cs.

RevealBorderBrush _resourceButtonRevealBorderBrushPointerOver [private]

Definition at line 23 of file RevealFallbackPage.xaml.cs.

RevealBorderBrush _resourceButtonRevealBorderBrushPressed [private]

Definition at line 24 of file RevealFallbackPage.xaml.cs.

RevealBrushTestApi _revealBrushTestApi [private]

Definition at line 18 of file RevealFallbackPage.xaml.cs.

RevealTestApi _revealTestApi [private]

Definition at line 17 of file RevealFallbackPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealFallbackPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealGridItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealGridItem
Static Public Member Functions | Public Attributes | Static Private Attributes

RevealGridItem Class Reference

List of all members.

Static Public Member Functions

static ObservableCollection
< RevealGridItem > 		GetItems ()

Public Attributes

string | Header
BitmapImage | ImageSource
string | SubHeader = "This is a sub-header"

Static Private Attributes

static ObservableCollection
< RevealGridItem > 		items

Detailed Description

Definition at line 63 of file RevealScenarioGrid.xaml.cs.

Member Function Documentation

static ObservableCollection<RevealGridItem> GetItems ( ) [inline, static]

Definition at line 71 of file RevealScenarioGrid.xaml.cs.

        {
            if(items == null)
            {
                items = new ObservableCollection<RevealGridItem>();
                items.Add(new RevealGridItem { Header = "Smile", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage12.jpg")) });
                items.Add(new RevealGridItem { Header = "Business", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage23.jpg")) });
                items.Add(new RevealGridItem { Header = "Kid", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage20.jpg")) });
                items.Add(new RevealGridItem { Header = "Metal", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage22.jpg")) });
                items.Add(new RevealGridItem { Header = "Super Metal", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage7.jpg")) });
                items.Add(new RevealGridItem { Header = "Smile", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage12.jpg")) });
                items.Add(new RevealGridItem { Header = "Business", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage23.jpg")) });
                items.Add(new RevealGridItem { Header = "Kid", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage20.jpg")) });
                items.Add(new RevealGridItem { Header = "Metal", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage22.jpg")) });
                items.Add(new RevealGridItem { Header = "Super Metal", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage7.jpg")) });
                items.Add(new RevealGridItem { Header = "Smile", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage12.jpg")) });
                items.Add(new RevealGridItem { Header = "Business", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage23.jpg")) });
                items.Add(new RevealGridItem { Header = "Kid", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage20.jpg")) });
                items.Add(new RevealGridItem { Header = "Metal", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage22.jpg")) });
                items.Add(new RevealGridItem { Header = "Super Metal", ImageSource = new BitmapImage(new Uri("https://raw.githubusercontent.com/Microsoft/Windows-universal-samples/master/SharedContent/media/Samples/LandscapeImage7.jpg")) });
            }

            return items;
        }

Member Data Documentation

string Header

Definition at line 67 of file RevealScenarioGrid.xaml.cs.

BitmapImage ImageSource

Definition at line 69 of file RevealScenarioGrid.xaml.cs.

ObservableCollection<RevealGridItem> items [static, private]

Definition at line 65 of file RevealScenarioGrid.xaml.cs.

string SubHeader = "This is a sub-header"

Definition at line 68 of file RevealScenarioGrid.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioGrid.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealGridTypeItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealGridTypeItem
Static Public Member Functions | Public Attributes | Static Private Attributes

RevealGridTypeItem Class Reference

List of all members.

Static Public Member Functions

static ObservableCollection
< RevealGridTypeItem > 		GetItems ()

Public Attributes

string Name
RevealGridItemTemplates Template

Static Private Attributes

static ObservableCollection
< RevealGridTypeItem > 		items

Detailed Description

Definition at line 119 of file RevealScenarioGrid.xaml.cs.

Member Function Documentation

static ObservableCollection<RevealGridTypeItem> GetItems ( ) [inline, static]

Definition at line 126 of file RevealScenarioGrid.xaml.cs.

        {
            if(items == null)
            {
                items = new ObservableCollection<RevealGridTypeItem>();
                foreach (RevealGridItemTemplates template in Enum.GetValues(typeof(RevealGridItemTemplates)))
                {
                    items.Add(new RevealGridTypeItem { Name = Enum.GetName(typeof(RevealGridItemTemplates), template), Template = template });
                }
            }

            return items;
        }

Member Data Documentation

ObservableCollection<RevealGridTypeItem> items [static, private]

Definition at line 121 of file RevealScenarioGrid.xaml.cs.

string Name

Definition at line 123 of file RevealScenarioGrid.xaml.cs.

RevealGridItemTemplates Template

Definition at line 124 of file RevealScenarioGrid.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioGrid.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealItem
Public Attributes

RevealItem Class Reference

List of all members.

Public Attributes

string | Header
string | Icon
string | SubHeader

Detailed Description

Definition at line 15 of file RevealSimpleListPage.xaml.cs.

Member Data Documentation

string Header

Definition at line 17 of file RevealSimpleListPage.xaml.cs.

string Icon

Definition at line 19 of file RevealSimpleListPage.xaml.cs.

string SubHeader

Definition at line 18 of file RevealSimpleListPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealSimpleListPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealListPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealListPage
Public Member Functions | Properties | Private Member Functions

RevealListPage Class Reference

List of all members.

Public Member Functions

RevealListPage ()

Properties

SemanticZoomTemplateItem[] | DataTemplateList [get]

Private Member Functions

void | OnBackgroundColorButtonClick (object sender, RoutedEventArgs e)
void | OnBorderColorButtonClick (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 23 of file RevealListPage.xaml.cs.

Constructor & Destructor Documentation

RevealListPage ( ) [inline]

Definition at line 25 of file RevealListPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void OnBackgroundColorButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 60 of file RevealListPage.xaml.cs.

        {
            if (RequestedTheme == ElementTheme.Dark)
            {
                RequestedTheme = ElementTheme.Light;
                RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.White);
            }
            else
            {
                RequestedTheme = ElementTheme.Dark;
                RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.Black);
            }
        }

void OnBorderColorButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file RevealListPage.xaml.cs.

        {
            if (RootCanvas.Background is Microsoft.UI.Xaml.Media.ImageBrush)
            {
                if (RequestedTheme == ElementTheme.Dark)
                    RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.Black);
                else
                    RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.White);
            }
            else
            {
                RootCanvas.Background = Resources["BGImageBrush"] as Microsoft.UI.Xaml.Media.ImageBrush;
            }
        }

Property Documentation

SemanticZoomTemplateItem [] DataTemplateList [get]

Definition at line 31 of file RevealListPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealListPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealMarkupPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealMarkupPage
Public Member Functions | Protected Member Functions | Private Member Functions

RevealMarkupPage Class Reference

List of all members.

Public Member Functions

RevealMarkupPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

UIElement | GetTopParent (UIElement current)
void | RunTestButton_Clicked (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 13 of file RevealMarkupPage.xaml.cs.

Constructor & Destructor Documentation

RevealMarkupPage ( ) [inline]

Definition at line 15 of file RevealMarkupPage.xaml.cs.

        {
            this.InitializeComponent();

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

Member Function Documentation

UIElement GetTopParent ( UIElement current ) [inline, private]

Definition at line 52 of file RevealMarkupPage.xaml.cs.

        {
            UIElement parent = current;
            do
            {
                current = parent;
                parent = (UIElement)VisualTreeHelper.GetParent(current);
            } while (parent != null);

            return current;
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 23 of file RevealMarkupPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

void RunTestButton_Clicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 31 of file RevealMarkupPage.xaml.cs.

        {
            using (var logger = new ResultsLogger("RevealBrushFromMarkup", TestResult))
            {
                int globalLightCount = 0;
                const int globalLightCountExpected = 5;
                UIElement visualRoot = GetTopParent(XamlRoot.Content);

                if (visualRoot != null && visualRoot.GetType() == typeof(ScrollViewer))
                {
                    globalLightCount = visualRoot.Lights.Count;
                }
                else
                {
                    logger.Verify(false, "visualRoot = null or type is not ScrollViewer");
                }

                logger.Verify(globalLightCount == globalLightCountExpected, "globalLightCount: " + globalLightCount + ", expected: " + globalLightCountExpected);
            }
        }

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealMarkupPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealPage
Public Member Functions

RevealPage Class Reference

List of all members.

Public Member Functions

RevealPage ()

Detailed Description

Definition at line 9 of file RevealPage.xaml.cs.

Constructor & Destructor Documentation

RevealPage ( ) [inline]

Definition at line 11 of file RevealPage.xaml.cs.

        {
            this.InitializeComponent();

            navigateToBasicReveal.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealBasicPage), 0); };
            navigateToAdvReveal.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealListPage), 0); };
            navigateToColorReveal.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealColorPage), 0); };
            navigateToSimpleListReveal.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealSimpleListPage), 0); };
            navigateToRevealScenarios.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealScenarios), 0); };
            navigateToRevealFallback.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealFallbackPage), 0); };
            navigateToRevealStates.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealStatesPage), 0); };
            navigateToRevealRegressionTests.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealRegressionTestsPage), 0); };
            navigateToCoreWindowEventsTests.Click += delegate { Frame.NavigateWithoutAnimation(typeof(CoreWindowEventsPage), 0); };
#if FEATURE_NAVIGATIONVIEW_ENABLED
            navigateToRevealMarkup.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RevealMarkupPage), 0); };
#endif
        }

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealRegressionTestsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealRegressionTestsPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

RevealRegressionTestsPage Class Reference

List of all members.

Public Member Functions

RevealRegressionTestsPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | _test1_RevealButton_Click (object sender, RoutedEventArgs e)
void | AddBackRevealButton_Click (object sender, RoutedEventArgs e)
void | AddRevealButton_Click (object sender, RoutedEventArgs e)
UIElement | GetElementForHoverLight (object element)
void | RemoveRevealButton_Click (object sender, RoutedEventArgs e)
void | RevealButton_Click (object sender, RoutedEventArgs e)
void | SimluateDisabledByPolicyToggleButton_Checked (object sender, RoutedEventArgs e)
void | SimluateDisabledByPolicyToggleButton_Unchecked (object sender, RoutedEventArgs e)

Private Attributes

Button | _test1_RevealButton

Detailed Description

Definition at line 16 of file RevealRegressionTestsPage.xaml.cs.

Constructor & Destructor Documentation

RevealRegressionTestsPage ( ) [inline]

Definition at line 20 of file RevealRegressionTestsPage.xaml.cs.

        {
            this.InitializeComponent();

            AutomationProperties.SetName(this, "RevealRegressionTestsPage");
            AutomationProperties.SetAutomationId(this, "RevealRegressionTestsPage");

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

Member Function Documentation

void _test1_RevealButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file RevealRegressionTestsPage.xaml.cs.

        {
            throw new System.NotImplementedException();
        }

void AddBackRevealButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file RevealRegressionTestsPage.xaml.cs.

        {
            Test1_RevealButtonContainer.Children.Add(_test1_RevealButton);

            // Add handler for validation
            _test1_RevealButton.Click += RevealButton_Click;
        }

void AddRevealButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 39 of file RevealRegressionTestsPage.xaml.cs.

        {
            _test1_RevealButton = (Button)XamlReader.Load(@"
                        <Button xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                                xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                                x:Name='Test1_RevealButton' Style='{StaticResource ButtonRevealStyle}'
                                Content='Test1 Reveal Button' AutomationProperties.AutomationId='Test1_RevealButton' AutomationProperties.Name='Test1_RevealButton'/>");
            Test1_RevealButtonContainer.Children.Add(_test1_RevealButton);
        }

UIElement GetElementForHoverLight ( object element ) [inline, private]

Definition at line 67 of file RevealRegressionTestsPage.xaml.cs.

        {
            var target = element as Control;
            return VisualTreeHelper.GetChild(target, 0) as UIElement;
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 31 of file RevealRegressionTestsPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

void RemoveRevealButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 54 of file RevealRegressionTestsPage.xaml.cs.

        {
            Test1_RevealButtonContainer.Children.Remove(_test1_RevealButton);
        }

void RevealButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file RevealRegressionTestsPage.xaml.cs.

        {
            using (var logger = new ResultsLogger("RevealCreateThenEnableEffects", TestResult))
            {
                UIElement lightsElement = GetElementForHoverLight(sender);
                var lights = lightsElement.Lights;

                bool lightCountResult = lights.Count == 2;          // Reveal Press light is also present
                logger.Verify(lightCountResult, "lightCountResult:" + lightCountResult);
            }
        }

void SimluateDisabledByPolicyToggleButton_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 85 of file RevealRegressionTestsPage.xaml.cs.

        {
            MaterialHelperTestApi.SimulateDisabledByPolicy = true;
        }

void SimluateDisabledByPolicyToggleButton_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 90 of file RevealRegressionTestsPage.xaml.cs.

        {
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

Member Data Documentation

Button _test1_RevealButton [private]

Definition at line 18 of file RevealRegressionTestsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealRegressionTestsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealScenarioColors Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealScenarioColors
Public Member Functions | Properties | Private Member Functions | Private Attributes

RevealScenarioColors Class Reference

List of all members.

Public Member Functions

RevealScenarioColors ()

Properties

Color | DarkBorderColor [get, set]
Color | DarkHoverPlateColor [get, set]
Color | LightBorderColor [get, set]
Color | LightHoverPlateColor [get, set]

Private Member Functions

void | ColorList_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ColorPicker_ColorChanged (ColorPicker sender, ColorChangedEventArgs args)

Private Attributes

Color | darkBorderColor
Color | darkHoverPlateColor
Color | lightBorderColor
Color | lightHoverPlateColor

Detailed Description

Definition at line 31 of file RevealScenarioColors.xaml.cs.

Constructor & Destructor Documentation

RevealScenarioColors ( ) [inline]

Definition at line 33 of file RevealScenarioColors.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void ColorList_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file RevealScenarioColors.xaml.cs.

        {
            var colorItem = ColorList.SelectedItem as ColorItem;
            if (colorItem != null)
            {
                ColorPicker.Color = colorItem.ColorBrush.Color;
                ColorPicker.Visibility = Visibility.Visible;
            }
            else
            {
                ColorPicker.Visibility = Visibility.Collapsed;
            }
        }

void ColorPicker_ColorChanged | ( | ColorPicker | sender,
 |  | ColorChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 62 of file RevealScenarioColors.xaml.cs.

        {
            var colorItem = ColorList.SelectedItem as ColorItem;
            if (colorItem != null)
            {
                colorItem.ColorBrush.Color = args.NewColor;
            }
        }

Member Data Documentation

Color darkBorderColor [private]

Definition at line 39 of file RevealScenarioColors.xaml.cs.

Color darkHoverPlateColor [private]

Definition at line 38 of file RevealScenarioColors.xaml.cs.

Color lightBorderColor [private]

Definition at line 41 of file RevealScenarioColors.xaml.cs.

Color lightHoverPlateColor [private]

Definition at line 40 of file RevealScenarioColors.xaml.cs.

Property Documentation

Color DarkBorderColor [get, set]

Definition at line 44 of file RevealScenarioColors.xaml.cs.

Color DarkHoverPlateColor [get, set]

Definition at line 43 of file RevealScenarioColors.xaml.cs.

Color LightBorderColor [get, set]

Definition at line 46 of file RevealScenarioColors.xaml.cs.

Color LightHoverPlateColor [get, set]

Definition at line 45 of file RevealScenarioColors.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioColors.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealScenarioGrid Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealScenarioGrid
Public Member Functions | Private Member Functions | Private Attributes

RevealScenarioGrid Class Reference

List of all members.

Public Member Functions

RevealScenarioGrid ()

Private Member Functions

void | BackgroundComboBoxChanged (object sender, SelectionChangedEventArgs e)
void | ComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ComboBox_SelectionChanged_1 (object sender, SelectionChangedEventArgs e)

Private Attributes

ObservableCollection
< RevealBackgroundItem > 		backgroundTypeSource
ObservableCollection
< RevealGridTypeItem > 		gridItemTypeSource
ObservableCollection
< RevealGridItem > 		gridSource
ObservableCollection
< SelectionModeItem > 		selectionModeSource

Detailed Description

Definition at line 24 of file RevealScenarioGrid.xaml.cs.

Constructor & Destructor Documentation

RevealScenarioGrid ( ) [inline]

Definition at line 31 of file RevealScenarioGrid.xaml.cs.

        {
            this.InitializeComponent();

            gridSource = RevealGridItem.GetItems();
            backgroundTypeSource = RevealBackgroundItem.GetItems();
            gridItemTypeSource = RevealGridTypeItem.GetItems();
            selectionModeSource = SelectionModeItem.GetItems();
        }

Member Function Documentation

void BackgroundComboBoxChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 41 of file RevealScenarioGrid.xaml.cs.

        {
            ComboBox box = (ComboBox)sender;
            RevealBackgroundItem item = (RevealBackgroundItem)box.SelectedItem;
            VisualStateManager.GoToState(this, item.Name, false);
        }

void ComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file RevealScenarioGrid.xaml.cs.

        {
            ComboBox box = (ComboBox)sender;
            SelectionModeItem item = (SelectionModeItem)box.SelectedItem;
            RevealGrid.SelectionMode = item.Mode;
        }

void ComboBox_SelectionChanged_1 | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file RevealScenarioGrid.xaml.cs.

        {
            ComboBox box = (ComboBox)sender;
            RevealGridTypeItem item = (RevealGridTypeItem)box.SelectedItem;
            VisualStateManager.GoToState(this, item.Name, false);
        }

Member Data Documentation

ObservableCollection<RevealBackgroundItem> backgroundTypeSource [private]

Definition at line 27 of file RevealScenarioGrid.xaml.cs.

ObservableCollection<RevealGridTypeItem> gridItemTypeSource [private]

Definition at line 28 of file RevealScenarioGrid.xaml.cs.

ObservableCollection<RevealGridItem> gridSource [private]

Definition at line 26 of file RevealScenarioGrid.xaml.cs.

ObservableCollection<SelectionModeItem> selectionModeSource [private]

Definition at line 29 of file RevealScenarioGrid.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioGrid.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealScenarioItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealScenarioItem
Public Attributes

RevealScenarioItem Class Reference

List of all members.

Public Attributes

string | Header
string | Icon
Type | Page
string | SubHeader

Detailed Description

Definition at line 76 of file RevealScenarios.xaml.cs.

Member Data Documentation

string Header

Definition at line 78 of file RevealScenarios.xaml.cs.

string Icon

Definition at line 80 of file RevealScenarios.xaml.cs.

Type Page

Definition at line 81 of file RevealScenarios.xaml.cs.

string SubHeader

Definition at line 79 of file RevealScenarios.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarios.xaml.cs
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealScenarioLights Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealScenarioLights
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

RevealScenarioLights Class Reference

List of all members.

Public Member Functions

RevealScenarioLights ()

Protected Member Functions

override void | OnCurrentThemeChanged ()

Properties

double | BorderSpotlightAttenuationValue [get, set]
double | BorderSpotlightInnerConeValue [get, set]
double | BorderSpotlightOuterConeValue [get, set]
RevealTestApi | RevealTest [get]
double | SpotlightAttenuationValue [get, set]
double | SpotlightInnerConeAlphaValue [get, set]
double | SpotlightInnerConeValue [get, set]
double | SpotlightMaxSizeValue [get, set]
double | SpotlightMinSizeValue [get, set]
double | SpotlightOuterConeAlphaValue [get, set]
double | SpotlightOuterConeValue [get, set]
double | WideBorderSpotlightAttenuationValue [get, set]
double | WideBorderSpotlightInnerConeValue [get, set]
double | WideBorderSpotlightOuterConeValue [get, set]

Private Member Functions

void | AnimateTo (CompositionObject obj, string prop, float value)
void | ExprBind (CompositionObject target, CompositionObject source, string targetProperty, string sourceProperty=null)

Private Attributes

SpotLight | _backgroundLight
SpotLight | _borderLight
SpotLight | _borderWideLight
RevealTestApi _revealTest

Detailed Description

Definition at line 25 of file RevealScenarioLights.xaml.cs.

Constructor & Destructor Documentation

RevealScenarioLights ( ) [inline]

Definition at line 27 of file RevealScenarioLights.xaml.cs.

        {
            this.InitializeComponent();
            _revealTest = new RevealTestApi { TargetTheme = CurrentTheme };

            Compositor compositor = CompositionTarget.GetCompositorForCurrentThread();
            _backgroundLight = compositor.CreateSpotLight();
            _borderLight = compositor.CreateSpotLight();
            _borderWideLight = compositor.CreateSpotLight();

            _borderLight.Offset = _borderWideLight.Offset =
            _backgroundLight.Offset = new Vector3((float)SwatchInnerGrid.Width / 2, (float)SwatchInnerGrid.Height / 2, 100);

            ExprBind(_backgroundLight, _revealTest.BackgroundLight, "InnerConeAngle");
            ExprBind(_backgroundLight, _revealTest.BackgroundLight, "OuterConeAngle");
            ExprBind(_backgroundLight, _revealTest.BackgroundLight, "ConstantAttenuation");
            ExprBind(_backgroundLight, _revealTest.BackgroundLight, "InnerConeColor");
            ExprBind(_backgroundLight, _revealTest.BackgroundLight, "OuterConeColor");

            SpotLight borderSpotlight = _revealTest.GetSpotLight(_revealTest.BorderLight as XamlLight);
            ExprBind(_borderLight, borderSpotlight, "InnerConeAngle");
            ExprBind(_borderLight, borderSpotlight, "OuterConeAngle");
            ExprBind(_borderLight, borderSpotlight, "ConstantAttenuation");
            ExprBind(_borderLight, borderSpotlight, "InnerConeColor");
            ExprBind(_borderLight, borderSpotlight, "OuterConeColor");

            SpotLight borderWideSpotlight = _revealTest.GetSpotLight(_revealTest.BorderWideLight as XamlLight);
            ExprBind(_borderWideLight, borderWideSpotlight, "InnerConeAngle");
            ExprBind(_borderWideLight, borderWideSpotlight, "OuterConeAngle");
            ExprBind(_borderWideLight, borderWideSpotlight, "ConstantAttenuation");
            ExprBind(_borderWideLight, borderWideSpotlight, "InnerConeColor");
            ExprBind(_borderWideLight, borderWideSpotlight, "OuterConeColor");
        }

Member Function Documentation

void AnimateTo | ( | CompositionObject | obj,
 |  | string | prop,
 |  | float | value |
 | ) |  |  | [inline, private]

Definition at line 88 of file RevealScenarioLights.xaml.cs.

        {
            var anim = obj.Compositor.CreateScalarKeyFrameAnimation();
            anim.Duration = TimeSpan.FromMilliseconds(1);
            anim.InsertKeyFrame(1.0f, value);
            obj.StartAnimation(prop, anim);
        }

void ExprBind | ( | CompositionObject | target,
 |  | CompositionObject | source,
 |  | string | targetProperty,
 |  | string | sourceProperty = null |
 | ) |  |  | [inline, private]

Definition at line 61 of file RevealScenarioLights.xaml.cs.

        {
            if (sourceProperty == null) sourceProperty = targetProperty;
            var expr = target.Compositor.CreateExpressionAnimation(String.Format("source.{0}", sourceProperty));
            expr.SetReferenceParameter("source", source);
            target.StartAnimation(targetProperty, expr);
        }

override void OnCurrentThemeChanged ( ) [inline, protected]

Definition at line 79 of file RevealScenarioLights.xaml.cs.

        {
            // Refresh the UI so the bindings re-resolve against current theme
            Frame.NavigateWithoutAnimation(GetType(), null);
            Frame.GoBack();
        }

Member Data Documentation

SpotLight _backgroundLight [private]

Definition at line 70 of file RevealScenarioLights.xaml.cs.

SpotLight _borderLight [private]

Definition at line 71 of file RevealScenarioLights.xaml.cs.

SpotLight _borderWideLight [private]

Definition at line 72 of file RevealScenarioLights.xaml.cs.

RevealTestApi _revealTest [private]

Definition at line 69 of file RevealScenarioLights.xaml.cs.

Property Documentation

double BorderSpotlightAttenuationValue [get, set, private]

Definition at line 151 of file RevealScenarioLights.xaml.cs.

double BorderSpotlightInnerConeValue [get, set, private]

Definition at line 139 of file RevealScenarioLights.xaml.cs.

double BorderSpotlightOuterConeValue [get, set, private]

Definition at line 145 of file RevealScenarioLights.xaml.cs.

RevealTestApi RevealTest [get]

Definition at line 75 of file RevealScenarioLights.xaml.cs.

double SpotlightAttenuationValue [get, set, private]

Definition at line 121 of file RevealScenarioLights.xaml.cs.

double SpotlightInnerConeAlphaValue [get, set, private]

Definition at line 109 of file RevealScenarioLights.xaml.cs.

double SpotlightInnerConeValue [get, set, private]

Definition at line 97 of file RevealScenarioLights.xaml.cs.

double SpotlightMaxSizeValue [get, set, private]

Definition at line 133 of file RevealScenarioLights.xaml.cs.

double SpotlightMinSizeValue [get, set, private]

Definition at line 127 of file RevealScenarioLights.xaml.cs.

double SpotlightOuterConeAlphaValue [get, set, private]

Definition at line 115 of file RevealScenarioLights.xaml.cs.

double SpotlightOuterConeValue [get, set, private]

Definition at line 103 of file RevealScenarioLights.xaml.cs.

double WideBorderSpotlightAttenuationValue [get, set, private]

Definition at line 169 of file RevealScenarioLights.xaml.cs.

double WideBorderSpotlightInnerConeValue [get, set, private]

Definition at line 157 of file RevealScenarioLights.xaml.cs.

double WideBorderSpotlightOuterConeValue [get, set, private]

Definition at line 163 of file RevealScenarioLights.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioLights.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealScenarioList Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealScenarioList
Public Member Functions | Private Member Functions | Private Attributes

RevealScenarioList Class Reference

List of all members.

Public Member Functions

RevealScenarioList ()

Private Member Functions

void BackgroundComboBoxChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

ObservableCollection
< RevealBackgroundItem > 		backgroundTypeSource
ObservableCollection
< RevealGridItem > 		listSource

Detailed Description

Definition at line 24 of file RevealScenarioList.xaml.cs.

Constructor & Destructor Documentation

RevealScenarioList ( ) [inline]

Definition at line 29 of file RevealScenarioList.xaml.cs.

        {
            this.InitializeComponent();

            listSource = RevealGridItem.GetItems();
            backgroundTypeSource = RevealBackgroundItem.GetItems();
        }

Member Function Documentation

void BackgroundComboBoxChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file RevealScenarioList.xaml.cs.

        {
            ComboBox box = (ComboBox)sender;
            RevealBackgroundItem item = (RevealBackgroundItem)box.SelectedItem;
            VisualStateManager.GoToState(this, item.Name, false);
        }

Member Data Documentation

ObservableCollection<RevealBackgroundItem> backgroundTypeSource [private]

Definition at line 27 of file RevealScenarioList.xaml.cs.

ObservableCollection<RevealGridItem> listSource [private]

Definition at line 26 of file RevealScenarioList.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioList.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealScenarios Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealScenarios
Public Member Functions | Private Member Functions | Private Attributes

RevealScenarios Class Reference

List of all members.

Public Member Functions

RevealScenarios ()

Private Member Functions

void | ComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | RevealList_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ToggleSwitch_Toggled (object sender, RoutedEventArgs e)

Private Attributes

ObservableCollection
< RevealScenarioItem > 		listSource
ObservableCollection
< RevealThemeItem > 		themeSource

Detailed Description

Definition at line 24 of file RevealScenarios.xaml.cs.

Constructor & Destructor Documentation

RevealScenarios ( ) [inline]

Definition at line 28 of file RevealScenarios.xaml.cs.

        {
            this.InitializeComponent();

            listSource = new ObservableCollection<RevealScenarioItem>();
            listSource.Add(new RevealScenarioItem { Header = "Adjust Lights", SubHeader = "Click to adjust light props", Icon = "\uE105", Page = typeof(RevealScenarioLights) });
            listSource.Add(new RevealScenarioItem { Header = "Adjust Colors", SubHeader = "Click to adjust color props", Icon = "\uE105", Page = typeof(RevealScenarioColors) });
            listSource.Add(new RevealScenarioItem { Header = "Grid Test", SubHeader = "Click to see GridView tests", Icon = "\uE105", Page = typeof(RevealScenarioGrid) });
            listSource.Add(new RevealScenarioItem { Header = "List Test", SubHeader = "Click to see ListView", Icon = "\uE105", Page = typeof(RevealScenarioList) });
            listSource.Add(new RevealScenarioItem { Header = "Make another view", SubHeader = "Make secondary views", Icon = "\uE105", Page = typeof(RevealScenarioSecondaryView) });
            listSource.Add(new RevealScenarioItem { Header = "Test Item 4", SubHeader = "Click to do nothing", Icon = "\uE105" });

            themeSource = new ObservableCollection<RevealThemeItem>();
            foreach (ElementTheme theme in Enum.GetValues(typeof(ElementTheme)))
            {
                themeSource.Add(new RevealThemeItem { Name = Enum.GetName(typeof(ElementTheme), theme), Theme = theme });
            }
        }

Member Function Documentation

void ComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 57 of file RevealScenarios.xaml.cs.

        {
            ComboBox box = (ComboBox)sender;
            this.RequestedTheme = ((RevealThemeItem)box.SelectedItem).Theme;
        }

void RevealList_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 47 of file RevealScenarios.xaml.cs.

        {
            ListView list = (ListView)sender;
            RevealScenarioItem item = (RevealScenarioItem)list.SelectedItem;
            if (item.Page != null)
            {
                ContentFrame.NavigateWithoutAnimation(item.Page);
            }
        }

void ToggleSwitch_Toggled | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file RevealScenarios.xaml.cs.

        {
            ToggleSwitch toggle = (ToggleSwitch)sender;
            if (toggle.IsOn)
            {
                VisualStateManager.GoToState(this, "UseAcrylic", false);
            }
            else
            {
                VisualStateManager.GoToState(this, "NoAcrylic", false);
            }
        }

Member Data Documentation

ObservableCollection<RevealScenarioItem> listSource [private]

Definition at line 26 of file RevealScenarios.xaml.cs.

ObservableCollection<RevealThemeItem> themeSource [private]

Definition at line 27 of file RevealScenarios.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarios.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealScenarioSecondaryView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealScenarioSecondaryView
Public Member Functions | Private Member Functions

RevealScenarioSecondaryView Class Reference

List of all members.

Public Member Functions

RevealScenarioSecondaryView ()

Private Member Functions

async void CreateNewView (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 12 of file RevealScenarioSecondaryView.xaml.cs.

Constructor & Destructor Documentation

RevealScenarioSecondaryView ( ) [inline]

Definition at line 14 of file RevealScenarioSecondaryView.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

async void CreateNewView | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file RevealScenarioSecondaryView.xaml.cs.

        {
            var newView = await ViewHelper.MakeSecondaryViewFromUIThread(() =>
            {
                var frame = new TestFrame(typeof(MainPage));
                frame.NavigateWithoutAnimation(typeof(RevealScenarios));
                Window secondaryWindow = App.CurrentWindow;

                secondaryWindow.Content = frame;

                if (CoreWindow.GetForCurrentThread() != null)
                {
                    try
                    {
                        ApplicationView.GetForCurrentView().Consolidated += (consolidatedSender, args) =>
                        {
                            secondaryWindow.Close();
                        };
                    }
                    catch (COMException)
                    {
                        // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
                    }
                }
            });
        }

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioSecondaryView.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealSimpleListPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealSimpleListPage
Public Member Functions | Private Member Functions | Private Attributes

RevealSimpleListPage Class Reference

List of all members.

Public Member Functions

RevealSimpleListPage ()

Private Member Functions

void | BackgroundColorButton_Click (object sender, RoutedEventArgs e)
void | BorderColorButton_Click (object sender, RoutedEventArgs e)
void | OnColorValuesChanged ()
void | Settings_ColorValuesChanged (UISettings sender, object args)
void | StyleChooser_SelectionChanged (object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)

Private Attributes

bool | accent
Color | accentColor
UISettings | settings = new UISettings()
ObservableCollection< RevealItem > | source = new ObservableCollection<RevealItem>()

Detailed Description

Definition at line 22 of file RevealSimpleListPage.xaml.cs.

Constructor & Destructor Documentation

RevealSimpleListPage ( ) [inline]

Definition at line 29 of file RevealSimpleListPage.xaml.cs.

        {
            this.InitializeComponent();

            source.Add(new RevealItem { Header = "System", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Devices", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Network & Internet", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Personalization", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Apps", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Accounts", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Time & Language", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Gaming", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Ease of Access", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Privacy", SubHeader = "Display, notifications, power", Icon = "\uE105" });
            source.Add(new RevealItem { Header = "Update & Security", SubHeader = "Display, notifications, power", Icon = "\uE105" });

            RevealList.ItemsSource = source;
            this.accent = false;

            settings.ColorValuesChanged += Settings_ColorValuesChanged;

            StyleChooser_SelectionChanged(null, null);
        }

Member Function Documentation

void BackgroundColorButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 87 of file RevealSimpleListPage.xaml.cs.

        {
            if (RequestedTheme == ElementTheme.Dark)
            {
                RequestedTheme = ElementTheme.Light;
            }
            else
            {
                RequestedTheme = ElementTheme.Dark;
            }
            OnColorValuesChanged();
        }

void BorderColorButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 74 of file RevealSimpleListPage.xaml.cs.

        {
            if (this.accent)
            {
                this.accent = false;
            }
            else
            {
                this.accent = true;
            }
            OnColorValuesChanged();
        }

void OnColorValuesChanged ( ) [inline, private]

Definition at line 58 of file RevealSimpleListPage.xaml.cs.

        {
            this.accentColor = this.settings.UIElementColor(Windows.UI.ViewManagement.UIElementType.Highlight);
            if (this.accent)
            {
                RootCanvas.Background = new SolidColorBrush(this.accentColor);
            }
            else
            {
                if (RequestedTheme == ElementTheme.Dark)
                    RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.Black);
                else
                    RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.White);
            }
        }

void Settings_ColorValuesChanged | ( | UISettings | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 53 of file RevealSimpleListPage.xaml.cs.

        {
            var ignored = this.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, OnColorValuesChanged);
        }

void StyleChooser_SelectionChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 100 of file RevealSimpleListPage.xaml.cs.

        {
            if (RevealList != null)
            {
                RevealList.ItemTemplate = (DataTemplate)Resources[(string)StyleChooser.SelectedItem];
                RevealList.ItemContainerStyle = (Style)Resources[(string)RevealStyleChooser.SelectedItem];
            }
        }

Member Data Documentation

bool accent [private]

Definition at line 24 of file RevealSimpleListPage.xaml.cs.

Color accentColor [private]

Definition at line 25 of file RevealSimpleListPage.xaml.cs.

UISettings settings = new UISettings() [private]

Definition at line 26 of file RevealSimpleListPage.xaml.cs.

ObservableCollection<RevealItem> source = new ObservableCollection<RevealItem>() [private]

Definition at line 27 of file RevealSimpleListPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealSimpleListPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealStatesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealStatesPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

RevealStatesPage Class Reference

List of all members.

Public Member Functions

RevealStatesPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | AnotherButton_Click (object sender, RoutedEventArgs e)
void | AnotherListViewItem_Holding (object sender, Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs e)
void | BorderLight_ValidateBorderLightPanAway ()
void | ChainedHoverLightStateValuesValidationHelper (float hoverLight_InnerConeIntensityExpected, float hoverLight_outerConeIntensityExpected, float hoverLight_outerConeAngleExpected, float pressLight_InnerConeIntensityExpected, float pressLight_outerConeIntensityExpected, float pressLight_outerConeAngleExpected, float hoverLight_InnerConeIntensityExpected2, float hoverLight_outerConeIntensityExpected2, float hoverLight_outerConeAngleExpected2, float pressLight_InnerConeIntensityExpected2, float pressLight_outerConeIntensityExpected2, float pressLight_outerConeAngleExpected2, string testName, string targetName)
float | DegreesToRadians (float angle)
void | ElementTheme_Changed (object sender, SelectionChangedEventArgs e)
UIElement | GetElementForHoverLight (object element)
void | HoverLight_ValidateFastRelease_Values ()
bool | HoverLight_ValidateNormal (RevealHoverLight hoverLight)
void | HoverLight_ValidateNormalState ()
bool | HoverLight_ValidatePointerOver (RevealHoverLight hoverLight)
void | HoverLight_ValidatePointerOverState ()
void | HoverLight_ValidatePointerOverState_Values ()
void | HoverLight_ValidatePosition_Offset1_Values ()
void | HoverLight_ValidatePosition_Offset2_Values ()
void | HoverLight_ValidatePosition_Offset3_Values ()
bool | HoverLight_ValidatePressed (RevealHoverLight hoverLight)
void | HoverLight_ValidatePressedState_Values ()
void | HoverLight_ValidateSlowRelease_Values ()
void | HoverLightPositionValuesValidationHelper (System.Numerics.Vector3 positionExpected, string testName, string targetName)
void | HoverLightStateValuesValidationHelper (float hoverLight_InnerConeIntensityExpected, float hoverLight_outerConeIntensityExpected, float hoverLight_outerConeAngleExpected, float pressLight_InnerConeIntensityExpected, float pressLight_outerConeIntensityExpected, float pressLight_outerConeAngleExpected, string testName, string targetName)
void | LargeButton_Click (object sender, RoutedEventArgs e)
void | NarrowButton_Holding (object sender, Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs e)
void | NotificationsTestButton_Click (object sender, RoutedEventArgs e)
void | OneMoreListViewItem_Holding (object sender, Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs e)
float | RadiansToDegrees (float angle)
void | SetState_Click (object sender, RoutedEventArgs e)
bool | ShouldBorderLightBeOn ()
void | StartLoggingValues_Click (object sender, RoutedEventArgs e)
void | TestListView_ItemClick (object sender, Microsoft.UI.Xaml.Controls.ItemClickEventArgs e)
bool | ValidateEffectsPresent ()
void | ValidateLightsOnPressed ()
void | ValidationActionsComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
bool | VerifyAmbientLight (RevealBrush testBrush, bool value)
bool | VerifyBorderLight (RevealBrush testBrush, bool value)
bool | VerifyHoverBrushTargeting (RevealBrush testBrush)
bool | VerifyHoverLight (RevealBrush testBrush, bool value)

Private Attributes

CompositionPropertyLogger | _compositionPropertyLogger
SpotLight | _hoverSpotlight
int | _normalStateCheckNumber = 1
SpotLight | _pressSpotlight
RevealBrushTestApi _revealBrushTestApi
RevealTestApi _revealTestApi
const float | angleInRadiansTolerance = 0.1F
const float | c_hoverLight_OuterConeAngle_Expected = 0.469878F
const float | coneAngleTolerance = 0.1F
const float | coneIntensityTolerance = 0.1F
const float | offsetCoordinateTolerance = 3.0F
string | revealHoverLightOffset_KeyboardExpression = "Vector3((visual.Size.X / 2), (visual.Size.Y / 2), 256)"
string | revealHoverLightOffset_PointerExpression = "pointer.Position + Vector3(0, 0, 256)"

Detailed Description

Definition at line 23 of file RevealStatesPage.xaml.cs.

Constructor & Destructor Documentation

RevealStatesPage ( ) [inline]

Definition at line 48 of file RevealStatesPage.xaml.cs.

        {
            this.InitializeComponent();

            AutomationProperties.SetName(this, "RevealStatesPage");
            AutomationProperties.SetAutomationId(this, "RevealStatesPage");

            _revealTestApi = new RevealTestApi();
            _revealBrushTestApi = new RevealBrushTestApi();

            _compositionPropertyLogger = new CompositionPropertyLogger(this.XamlRoot);

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

Member Function Documentation

void AnotherButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 299 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            using (var logger = new ResultsLogger("HoverLightExpression_Button_Keyboard", TestResult))
            {
                Control target = FindName("AnotherButton") as Control;
                var lights = GetElementForHoverLight(target).Lights;

                var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[1]);           // Look at the press light
                var offsetExpression = _revealTestApi.GetHoverLightOffsetExpression(hoverLight);
                logger.Verify(String.Equals(offsetExpression.Expression, revealHoverLightOffset_KeyboardExpression), "HoverLightOffset using incorrect expression: " + offsetExpression.Expression + ", expected: " + revealHoverLightOffset_KeyboardExpression);
            }
        }

void AnotherListViewItem_Holding | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 274 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }
            using (var logger = new ResultsLogger("BorderLight_TapAndHold", TestResult))
            {
                bool shouldBorderLightBeOn = ShouldBorderLightBeOn();
                logger.Verify(shouldBorderLightBeOn == true, "ShouldBorderLightBeOn: " + shouldBorderLightBeOn);
            }
        }

void BorderLight_ValidateBorderLightPanAway ( ) [inline, private]

Definition at line 329 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            using (var logger = new ResultsLogger("BorderLight_PanAway", TestResult))
            {
                bool shouldBorderLightBeOn = ShouldBorderLightBeOn();
                logger.Verify(shouldBorderLightBeOn == false, "ShouldBorderLightBeOn: " + shouldBorderLightBeOn);
            }
        }

void ChainedHoverLightStateValuesValidationHelper | ( | float | hoverLight_InnerConeIntensityExpected,
 |  | float | hoverLight_outerConeIntensityExpected,
 |  | float | hoverLight_outerConeAngleExpected,
 |  | float | pressLight_InnerConeIntensityExpected,
 |  | float | pressLight_outerConeIntensityExpected,
 |  | float | pressLight_outerConeAngleExpected,
 |  | float | hoverLight_InnerConeIntensityExpected2,
 |  | float | hoverLight_outerConeIntensityExpected2,
 |  | float | hoverLight_outerConeAngleExpected2,
 |  | float | pressLight_InnerConeIntensityExpected2,
 |  | float | pressLight_outerConeIntensityExpected2,
 |  | float | pressLight_outerConeAngleExpected2,
 |  | string | testName,
 |  | string | targetName |
 | ) |  |  | [inline, private]

Definition at line 495 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            WaitHandle[] hoverLight_ValueValidationEvents = new WaitHandle[3];
            WaitHandle[] pressLight_ValueValidationEvents = new WaitHandle[3];

            Control target = FindName(targetName) as Control;
            var lights = GetElementForHoverLight(target).Lights;

            var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
            var pressLight = _revealTestApi.GetAsRevealHoverLight(lights[1]);
            _hoverSpotlight = _revealTestApi.GetSpotLight(hoverLight as Microsoft.UI.Xaml.Media.XamlLight);
            _pressSpotlight = _revealTestApi.GetSpotLight(pressLight as Microsoft.UI.Xaml.Media.XamlLight);

            hoverLight_ValueValidationEvents[0] = _compositionPropertyLogger.RegisterProperty(_hoverSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, hoverLight_InnerConeIntensityExpected, coneIntensityTolerance);
            hoverLight_ValueValidationEvents[1] = _compositionPropertyLogger.RegisterProperty(_hoverSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, hoverLight_outerConeIntensityExpected, coneIntensityTolerance);
            hoverLight_ValueValidationEvents[2] = _compositionPropertyLogger.RegisterProperty(_hoverSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float, 0.0f, hoverLight_outerConeAngleExpected, coneAngleTolerance);

            pressLight_ValueValidationEvents[0] = _compositionPropertyLogger.RegisterProperty(_pressSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, pressLight_InnerConeIntensityExpected, coneIntensityTolerance);
            pressLight_ValueValidationEvents[1] = _compositionPropertyLogger.RegisterProperty(_pressSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, pressLight_outerConeIntensityExpected, coneIntensityTolerance);
            pressLight_ValueValidationEvents[2] = _compositionPropertyLogger.RegisterProperty(_pressSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float, 0.0f, pressLight_outerConeAngleExpected, coneAngleTolerance);

            // Off-thread validation waits until each registered property hits its expected value
            Task.Run(() =>
            {
                var combined = hoverLight_ValueValidationEvents.Concat(pressLight_ValueValidationEvents).ToArray();
                bool hoverLight_Result = WaitHandle.WaitAll(hoverLight_ValueValidationEvents, 10000);
                bool pressLight_Result = WaitHandle.WaitAll(pressLight_ValueValidationEvents, 10000);
                RunOnUIThread.Execute(() =>
                {
                    // We will log values when we hit the secod expected state, so don't log at this point.
                    _compositionPropertyLogger.UnregisterProperty(_hoverSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                    _compositionPropertyLogger.UnregisterProperty(_hoverSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                    _compositionPropertyLogger.UnregisterProperty(_hoverSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float);
                    Array.Clear(hoverLight_ValueValidationEvents, 0, 3);

                    _compositionPropertyLogger.UnregisterProperty(_pressSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                    _compositionPropertyLogger.UnregisterProperty(_pressSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                    _compositionPropertyLogger.UnregisterProperty(_pressSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float);
                    Array.Clear(pressLight_ValueValidationEvents, 0, 3);

                    // Now validate we hit values for the second expected state
                    HoverLightStateValuesValidationHelper(
                        hoverLight_InnerConeIntensityExpected2, hoverLight_outerConeIntensityExpected2, hoverLight_outerConeAngleExpected2,
                        pressLight_InnerConeIntensityExpected2, pressLight_outerConeIntensityExpected2, pressLight_outerConeAngleExpected2,
                        testName,
                        targetName);
                });
            });
        }

float DegreesToRadians ( float angle ) [inline, private]

Definition at line 603 of file RevealStatesPage.xaml.cs.

        {
            return ((float)Math.PI) * angle / 180.0F;
        }

void ElementTheme_Changed | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 263 of file RevealStatesPage.xaml.cs.

        {
            var selectedText = ElementThemeComboBox.GetSelectedText();
            switch (selectedText)
            {
                case "Default": this.RequestedTheme = ElementTheme.Default; break;
                case "Light": this.RequestedTheme = ElementTheme.Light; break;
                case "Dark": this.RequestedTheme = ElementTheme.Dark; break;
            }
        }

UIElement GetElementForHoverLight ( object element ) [inline, private]

Definition at line 98 of file RevealStatesPage.xaml.cs.

        {
            var target = element as Control;
            return VisualTreeHelper.GetChild(target, 0) as UIElement;
        }

void HoverLight_ValidateFastRelease_Values ( ) [inline, private]

Definition at line 410 of file RevealStatesPage.xaml.cs.

        {
            // Note that for FastRelease, we expect to go through the same intermiedate and final values
            // as SlowReleaseabove, it just happens more quickly.
            ChainedHoverLightStateValuesValidationHelper(
                1.0F, 1.0F, c_hoverLight_OuterConeAngle_Expected,
                1.0F, 1.0F, 0.1845F,
                1.0F, 1.0F, c_hoverLight_OuterConeAngle_Expected,
                0.0F, 0.0F, 0.6865F,
                "FastRelease_Values",
                "LargeButton2");
        }

bool HoverLight_ValidateNormal ( RevealHoverLight hoverLight ) [inline, private]

Definition at line 340 of file RevealStatesPage.xaml.cs.

        {
            bool isPressed = _revealTestApi.HoverLight_IsPressed(hoverLight);
            bool isPointerOver = _revealTestApi.HoverLight_IsPointerOver(hoverLight);
            bool shouldLightBeOn = _revealTestApi.HoverLight_ShouldBeOn(hoverLight);

            return !isPressed && !isPointerOver && !shouldLightBeOn;
        }

void HoverLight_ValidateNormalState ( ) [inline, private]

Definition at line 104 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            using (var logger = new ResultsLogger("Normal", TestResult))
            {
                if (_normalStateCheckNumber < 1 || _normalStateCheckNumber > 2)
                {
                    logger.LogError("Error: unpexected call to HoverLight_ValidateNormalState");
                    return;
                }

                bool isInitialCheck = _normalStateCheckNumber == 1;
                _normalStateCheckNumber++;

                string targetText = TargetComboBox.GetSelectedText();
                Control target = FindName(targetText) as Control;

                // It is more complex to validate Reveal hover bursh targeting on ListViewItem
                // since it uses several brushes applied to the internal ListViewItemChrome. Skip the check here.
                bool lightTargetingResult = true;
                if (targetText != "NormalListViewItem")
                {
                    RevealBrush revealHoverBrush = target.Background as RevealBrush;
                    lightTargetingResult = VerifyHoverBrushTargeting(revealHoverBrush);
                }
                logger.Verify(lightTargetingResult, "lightTargetingResult:" + lightTargetingResult);

                var lights = GetElementForHoverLight(target).Lights;

                // No lights expected if we've never hovered over this Button
                bool lightCountResult = isInitialCheck ? lights.Count == 0 : lights.Count == 2;
                logger.Verify(lightCountResult, "lightCountResult:" + lightCountResult);
                bool lightValidationResult = true;

                // If we have hovered over the target, validate Reveal light is properly in normal state
                if (!isInitialCheck)
                {
                    var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
                    lightValidationResult = HoverLight_ValidateNormal(hoverLight);
                }
                logger.Verify(lightValidationResult, "lightValidationResult: " + lightValidationResult);
            }
        }

bool HoverLight_ValidatePointerOver ( RevealHoverLight hoverLight ) [inline, private]

Definition at line 349 of file RevealStatesPage.xaml.cs.

        {
            bool isPressed = _revealTestApi.HoverLight_IsPressed(hoverLight);
            bool isPointerOver = _revealTestApi.HoverLight_IsPointerOver(hoverLight);
            bool shouldLightBeOn = _revealTestApi.HoverLight_ShouldBeOn(hoverLight);

            return !isPressed && isPointerOver && shouldLightBeOn;
        }

void HoverLight_ValidatePointerOverState ( ) [inline, private]

Definition at line 149 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            using (var logger = new ResultsLogger("PointerOver", TestResult))
            {
                string targetText = TargetComboBox.GetSelectedText();
                Control target = FindName(targetText) as Control;

                // It is more complex to validate Reveal hover brush targeting on ListViewItem
                // since it uses several brushes applied to the internal ListViewItemChrome. Skip the check here.
                bool lightTargetingResult = true;
                if (targetText != "NormalListViewItem")
                {
                    RevealBrush revealHoverBrush = target.Background as RevealBrush;
                    lightTargetingResult = VerifyHoverBrushTargeting(revealHoverBrush);
                }

                logger.Verify(lightTargetingResult, "lightTargetingResult:" + lightTargetingResult);

                var lights = GetElementForHoverLight(target).Lights;

                bool lightCountResult = lights.Count == 2;          // Reveal Press light is also present
                logger.Verify(lightCountResult, "lightCountResult:" + lightCountResult);

                var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
                logger.Verify(hoverLight != null, "HoverLight should be non-null");

                bool lightValidationResult = HoverLight_ValidatePointerOver(hoverLight);
                logger.Verify(lightValidationResult, "lightValidationResult: " + lightValidationResult);
            }
        }

void HoverLight_ValidatePointerOverState_Values ( ) [inline, private]

Definition at line 381 of file RevealStatesPage.xaml.cs.

        {
            HoverLightStateValuesValidationHelper(
                1.0F, 1.0F, c_hoverLight_OuterConeAngle_Expected,
                0.0F, 0.0F, 0.1845F,
                "PointerOver_Values",
                "LargeButton2");
        }

void HoverLight_ValidatePosition_Offset1_Values ( ) [inline, private]

Definition at line 554 of file RevealStatesPage.xaml.cs.

        {
            HoverLightPositionValuesValidationHelper(new System.Numerics.Vector3(10F, 90F, 256F), "Offset1_Values", "LargeButton2");
        }

void HoverLight_ValidatePosition_Offset2_Values ( ) [inline, private]

Definition at line 559 of file RevealStatesPage.xaml.cs.

        {
            HoverLightPositionValuesValidationHelper(new System.Numerics.Vector3(50F, 50F, 256F), "Offset2_Values", "LargeButton2");
        }

void HoverLight_ValidatePosition_Offset3_Values ( ) [inline, private]

Definition at line 564 of file RevealStatesPage.xaml.cs.

        {
            HoverLightPositionValuesValidationHelper(new System.Numerics.Vector3(10F, 40F, 256F), "Offset3_Values", "NarrowButton2");
        }

bool HoverLight_ValidatePressed ( RevealHoverLight hoverLight ) [inline, private]

Definition at line 358 of file RevealStatesPage.xaml.cs.

        {
            bool isPressed = _revealTestApi.HoverLight_IsPressed(hoverLight);
            bool isPointerOver = _revealTestApi.HoverLight_IsPointerOver(hoverLight);
            bool shouldLightBeOn = _revealTestApi.HoverLight_ShouldBeOn(hoverLight);

            return isPressed && isPointerOver && shouldLightBeOn;
        }

void HoverLight_ValidatePressedState_Values ( ) [inline, private]

Definition at line 390 of file RevealStatesPage.xaml.cs.

        {
            HoverLightStateValuesValidationHelper(
                1.0F, 1.0F, c_hoverLight_OuterConeAngle_Expected,
                1.0F, 1.0F, 0.1845F,
                "Pressed_Values",
                "LargeButton2");
        }

void HoverLight_ValidateSlowRelease_Values ( ) [inline, private]

Definition at line 399 of file RevealStatesPage.xaml.cs.

        {
            ChainedHoverLightStateValuesValidationHelper(
                1.0F, 1.0F, c_hoverLight_OuterConeAngle_Expected,
                1.0F, 1.0F, 0.1845F,
                1.0F, 1.0F, c_hoverLight_OuterConeAngle_Expected,
                0.0F, 0.0F, 0.6865F,
                "SlowRelease_Values",
                "LargeButton2");
        }

void HoverLightPositionValuesValidationHelper | ( | System.Numerics.Vector3 | positionExpected,
 |  | string | testName,
 |  | string | targetName |
 | ) |  |  | [inline, private]

Definition at line 569 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            WaitHandle[] valueValidationEvents = new WaitHandle[1];

            Control target = FindName(targetName) as Control;
            var lights = GetElementForHoverLight(target).Lights;

            var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
            _hoverSpotlight = _revealTestApi.GetSpotLight(hoverLight as Microsoft.UI.Xaml.Media.XamlLight);

            valueValidationEvents[0] = _compositionPropertyLogger.RegisterProperty(_hoverSpotlight, "Offset", CompositionPropertyLogger.LoggableType.Vector3, new System.Numerics.Vector3(0F, 0F, 0F), positionExpected, offsetCoordinateTolerance);

            // Off-thread validation waits until each registered property hits its expected value
            Task.Run(() =>
            {
                bool result = WaitHandle.WaitAll(valueValidationEvents, 10000);
                RunOnUIThread.Execute(() =>
                {
                    using (var logger = new ResultsLogger(testName, TestResult))
                    {
                        var positionValues = _compositionPropertyLogger.GetValues(_hoverSpotlight, "Offset");
                        logger.LogMessage("Offset: " + string.Join(", ", positionValues));

                        _compositionPropertyLogger.UnregisterProperty(_hoverSpotlight, "Offset", CompositionPropertyLogger.LoggableType.Vector3);
                        Array.Clear(valueValidationEvents, 0, 1);

                        logger.Verify(result, "PositionValidationResult: error occured");
                    }
                });
            });
        }

void HoverLightStateValuesValidationHelper | ( | float | hoverLight_InnerConeIntensityExpected,
 |  | float | hoverLight_outerConeIntensityExpected,
 |  | float | hoverLight_outerConeAngleExpected,
 |  | float | pressLight_InnerConeIntensityExpected,
 |  | float | pressLight_outerConeIntensityExpected,
 |  | float | pressLight_outerConeAngleExpected,
 |  | string | testName,
 |  | string | targetName |
 | ) |  |  | [inline, private]

Definition at line 423 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            WaitHandle[] hoverLight_ValueValidationEvents = new WaitHandle[3];
            WaitHandle[] pressLight_ValueValidationEvents = new WaitHandle[3];

            Control target = FindName(targetName) as Control;
            var lights = GetElementForHoverLight(target).Lights;

            var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
            var pressLight = _revealTestApi.GetAsRevealHoverLight(lights[1]);
            _hoverSpotlight = _revealTestApi.GetSpotLight(hoverLight as Microsoft.UI.Xaml.Media.XamlLight);
            _pressSpotlight = _revealTestApi.GetSpotLight(pressLight as Microsoft.UI.Xaml.Media.XamlLight);

            hoverLight_ValueValidationEvents[0] = _compositionPropertyLogger.RegisterProperty(_hoverSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, hoverLight_InnerConeIntensityExpected, coneIntensityTolerance);
            hoverLight_ValueValidationEvents[1] = _compositionPropertyLogger.RegisterProperty(_hoverSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, hoverLight_outerConeIntensityExpected, coneIntensityTolerance);
            hoverLight_ValueValidationEvents[2] = _compositionPropertyLogger.RegisterProperty(_hoverSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float, 0.0f, hoverLight_outerConeAngleExpected, coneAngleTolerance);

            pressLight_ValueValidationEvents[0] = _compositionPropertyLogger.RegisterProperty(_pressSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, pressLight_InnerConeIntensityExpected, coneIntensityTolerance);
            pressLight_ValueValidationEvents[1] = _compositionPropertyLogger.RegisterProperty(_pressSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float, 0.0f, pressLight_outerConeIntensityExpected, coneIntensityTolerance);
            pressLight_ValueValidationEvents[2] = _compositionPropertyLogger.RegisterProperty(_pressSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float, 0.0f, pressLight_outerConeAngleExpected, coneAngleTolerance);

            // Off-thread validation waits until each registered property hits its expected value
            Task.Run(() =>
            {
                var combined = hoverLight_ValueValidationEvents.Concat(pressLight_ValueValidationEvents).ToArray();
                bool hoverLight_Result = WaitHandle.WaitAll(hoverLight_ValueValidationEvents, 10000);
                bool pressLight_Result = WaitHandle.WaitAll(pressLight_ValueValidationEvents, 10000);
                RunOnUIThread.Execute(() =>
                {
                    using (var logger = new ResultsLogger(testName, TestResult))
                    {
                        var hoverLight_InnerConeIntensityValues = _compositionPropertyLogger.GetValues(_hoverSpotlight, "InnerConeIntensity");
                        var hoverLight_OuterConeIntensityValues = _compositionPropertyLogger.GetValues(_hoverSpotlight, "OuterConeIntensity");
                        var hoverLight_OuterConeAngleValues = _compositionPropertyLogger.GetValues(_hoverSpotlight, "OuterConeAngle");

                        logger.LogMessage("HoverLight - InnerConeIntensity: " + string.Join(", ", hoverLight_InnerConeIntensityValues));
                        logger.LogMessage("HoverLight - OuterConeIntensity: " + string.Join(", ", hoverLight_OuterConeIntensityValues));
                        logger.LogMessage("HoverLight - OuterConeAngle: " + string.Join(", ", hoverLight_OuterConeAngleValues));

                        var pressLight_InnerConeIntensityValues = _compositionPropertyLogger.GetValues(_pressSpotlight, "InnerConeIntensity");
                        var pressLight_OuterConeIntensityValues = _compositionPropertyLogger.GetValues(_pressSpotlight, "OuterConeIntensity");
                        var pressLight_OuterConeAngleValues = _compositionPropertyLogger.GetValues(_pressSpotlight, "OuterConeAngle");

                        logger.LogMessage("PressLight - InnerConeIntensity: " + string.Join(", ", pressLight_InnerConeIntensityValues));
                        logger.LogMessage("PressLight - OuterConeIntensity: " + string.Join(", ", pressLight_OuterConeIntensityValues));
                        logger.LogMessage("PressLight - OuterConeAngle: " + string.Join(", ", pressLight_OuterConeAngleValues));

                        _compositionPropertyLogger.UnregisterProperty(_hoverSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                        _compositionPropertyLogger.UnregisterProperty(_hoverSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                        _compositionPropertyLogger.UnregisterProperty(_hoverSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float);
                        Array.Clear(hoverLight_ValueValidationEvents, 0, 3);

                        _compositionPropertyLogger.UnregisterProperty(_pressSpotlight, "InnerConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                        _compositionPropertyLogger.UnregisterProperty(_pressSpotlight, "OuterConeIntensity", CompositionPropertyLogger.LoggableType.Float);
                        _compositionPropertyLogger.UnregisterProperty(_pressSpotlight, "OuterConeAngle", CompositionPropertyLogger.LoggableType.Float);
                        Array.Clear(pressLight_ValueValidationEvents, 0, 3);

                        logger.Verify(hoverLight_Result && hoverLight_Result, "StateValidationResult: error occured");
                    }
                });
            });
        }

void LargeButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 182 of file RevealStatesPage.xaml.cs.

        {
            ValidateLightsOnPressed();
        }

void NarrowButton_Holding | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 284 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            using (var logger = new ResultsLogger("HoverLightExpression_Button_Touch", TestResult))
            {
                Control target = FindName("NarrowButton") as Control;
                var lights = GetElementForHoverLight(target).Lights;

                var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
                var offsetExpression = _revealTestApi.GetHoverLightOffsetExpression(hoverLight);
                logger.Verify(String.Equals(offsetExpression.Expression, revealHoverLightOffset_PointerExpression), "HoverLightOffset using incorrect expression: " + offsetExpression.Expression + ", expected: " + revealHoverLightOffset_PointerExpression);
            }
        }

void NotificationsTestButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 614 of file RevealStatesPage.xaml.cs.

        {

        }

void OneMoreListViewItem_Holding | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 314 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            using (var logger = new ResultsLogger("HoverLightExpression_ListViewItem_Touch", TestResult))
            {
                Control target = FindName("OneMoreListViewItem") as Control;
                var lights = GetElementForHoverLight(target).Lights;

                var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
                var offsetExpression = _revealTestApi.GetHoverLightOffsetExpression(hoverLight);
                logger.Verify(String.Equals(offsetExpression.Expression, revealHoverLightOffset_PointerExpression), "HoverLightOffset using incorrect expression: " + offsetExpression.Expression + ", expected: " + revealHoverLightOffset_PointerExpression);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 64 of file RevealStatesPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

float RadiansToDegrees ( float angle ) [inline, private]

Definition at line 608 of file RevealStatesPage.xaml.cs.

        {
            return 180.0F * angle / ((float)Math.PI);
        }

void SetState_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 374 of file RevealStatesPage.xaml.cs.

        {
            RevealBrushState state = RevealBrushState.Pressed;
            RevealBrush.SetState(Border4SetStatePressed, state);
            TestResult.Text = "SetState_Click: Clicked";
        }

bool ShouldBorderLightBeOn ( ) [inline, private]

Definition at line 367 of file RevealStatesPage.xaml.cs.

        {
            Microsoft.UI.Xaml.Media.XamlLight xamlLight = _revealTestApi.BorderLight;
            RevealBorderLight borderLight = _revealTestApi.GetAsRevealBorderLight(xamlLight);
            return _revealTestApi.BorderLight_ShouldBeOn(borderLight);
        }

void StartLoggingValues_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 83 of file RevealStatesPage.xaml.cs.

        {
            var selectedText = ValidationActionsComboBox.GetSelectedText();
            switch (selectedText)
            {
                case "HoverLight: Validate PointerOver state (Values)": HoverLight_ValidatePointerOverState_Values(); break;
                case "HoverLight: Validate Pressed state (Values)": HoverLight_ValidatePressedState_Values(); break;
                case "HoverLight: Validate SlowRelease state (Values)": HoverLight_ValidateSlowRelease_Values(); break;
                case "HoverLight: Validate FastRelease state (Values)": HoverLight_ValidateFastRelease_Values(); break;
                case "HoverLight: Validate Position Offset1 (Values)": HoverLight_ValidatePosition_Offset1_Values(); break;
                case "HoverLight: Validate Position Offset2 (Values)": HoverLight_ValidatePosition_Offset2_Values(); break;
                case "HoverLight: Validate Position Offset3 (Values)": HoverLight_ValidatePosition_Offset3_Values(); break;
            }
        }

void TestListView_ItemClick | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.ItemClickEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 187 of file RevealStatesPage.xaml.cs.

        {
            ValidateLightsOnPressed();
        }

bool ValidateEffectsPresent ( ) [inline, private]

Definition at line 223 of file RevealStatesPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = LargeButton.Background as RevealBrush;
            if (_revealBrushTestApi.IsInFallbackMode)
            {
                TestResult.Text = "RevealStates: Skipped";
                return false;
            }

            return true;
        }

void ValidateLightsOnPressed ( ) [inline, private]

Definition at line 192 of file RevealStatesPage.xaml.cs.

        {
            if (!ValidateEffectsPresent()) { return; }

            string targetText = TargetComboBox.GetSelectedText();
            if (targetText == "OneMoreListViewItem") { return; }            // We don't run this test for OneMoreListViewItem

            using (var logger = new ResultsLogger("Pressed", TestResult))
            {
                Control target = FindName(targetText) as Control;

                // It is more complex to validate Reveal hover brush targeting on ListViewItem
                // since it uses several brushes applied to the internal ListViewItemChrome. Skip the check here.
                bool lightTargetingResult = true;
                if (targetText != "NormalListViewItem")
                {
                    RevealBrush revealHoverBrush = target.Background as RevealBrush;
                    lightTargetingResult = VerifyHoverBrushTargeting(revealHoverBrush);
                }
                logger.Verify(lightTargetingResult, "lightTargetingResult:" + lightTargetingResult);

                var lights = GetElementForHoverLight(target).Lights;

                bool lightCountResult = lights.Count == 2;   // Reveal Press light is also present
                logger.Verify(lightCountResult, "lightCountResult:" + lightCountResult);
                var hoverLight = _revealTestApi.GetAsRevealHoverLight(lights[0]);
                bool lightValidationResult = HoverLight_ValidatePressed(hoverLight);
                logger.Verify(lightValidationResult, "lightValidationResult: " + lightValidationResult);
            }
        }

void ValidationActionsComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 72 of file RevealStatesPage.xaml.cs.

        {
            var selectedText = ValidationActionsComboBox.GetSelectedText();
            switch (selectedText)
            {
                case "HoverLight: Validate Normal state": HoverLight_ValidateNormalState(); break;
                case "HoverLight: Validate PointerOver state": HoverLight_ValidatePointerOverState(); break;
                case "BorderLight: Validate after panning away": BorderLight_ValidateBorderLightPanAway(); break;
            }
        }

bool VerifyAmbientLight | ( | RevealBrush | testBrush,
 |  | bool | value |
 | ) |  |  | [inline, private]

Definition at line 242 of file RevealStatesPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool ambientLightSet = _revealBrushTestApi.IsAmbientLightSet;
            return value ? ambientLightSet : !ambientLightSet;
        }

bool VerifyBorderLight | ( | RevealBrush | testBrush,
 |  | bool | value |
 | ) |  |  | [inline, private]

Definition at line 249 of file RevealStatesPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool borderLightSet = _revealBrushTestApi.IsBorderLightSet;
            return value ? borderLightSet : !borderLightSet;
        }

bool VerifyHoverBrushTargeting ( RevealBrush testBrush ) [inline, private]

Definition at line 235 of file RevealStatesPage.xaml.cs.

        {
            return VerifyAmbientLight(testBrush, true) &&
                   VerifyBorderLight(testBrush, false) &&
                   VerifyHoverLight(testBrush, true);
        }

bool VerifyHoverLight | ( | RevealBrush | testBrush,
 |  | bool | value |
 | ) |  |  | [inline, private]

Definition at line 256 of file RevealStatesPage.xaml.cs.

        {
            _revealBrushTestApi.RevealBrush = testBrush;
            bool hoverLightSet = _revealBrushTestApi.IsHoverLightSet;
            return value ? hoverLightSet : !hoverLightSet;
        }

Member Data Documentation

CompositionPropertyLogger _compositionPropertyLogger [private]

Definition at line 28 of file RevealStatesPage.xaml.cs.

SpotLight _hoverSpotlight [private]

Definition at line 29 of file RevealStatesPage.xaml.cs.

int _normalStateCheckNumber = 1 [private]

Definition at line 27 of file RevealStatesPage.xaml.cs.

SpotLight _pressSpotlight [private]

Definition at line 30 of file RevealStatesPage.xaml.cs.

RevealBrushTestApi _revealBrushTestApi [private]

Definition at line 26 of file RevealStatesPage.xaml.cs.

RevealTestApi _revealTestApi [private]

Definition at line 25 of file RevealStatesPage.xaml.cs.

const float angleInRadiansTolerance = 0.1F [private]

Definition at line 43 of file RevealStatesPage.xaml.cs.

const float c_hoverLight_OuterConeAngle_Expected = 0.469878F [private]

Definition at line 46 of file RevealStatesPage.xaml.cs.

const float coneAngleTolerance = 0.1F [private]

Definition at line 42 of file RevealStatesPage.xaml.cs.

const float coneIntensityTolerance = 0.1F [private]

Definition at line 41 of file RevealStatesPage.xaml.cs.

const float offsetCoordinateTolerance = 3.0F [private]

Definition at line 44 of file RevealStatesPage.xaml.cs.

string revealHoverLightOffset_KeyboardExpression = "Vector3((visual.Size.X / 2), (visual.Size.Y / 2), 256)" [private]

Definition at line 38 of file RevealStatesPage.xaml.cs.

string revealHoverLightOffset_PointerExpression = "pointer.Position + Vector3(0, 0, 256)" [private]

Definition at line 37 of file RevealStatesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealStatesPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealThemeItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • RevealThemeItem
Public Attributes

RevealThemeItem Class Reference

List of all members.

Public Attributes

string | Name
ElementTheme | Theme

Detailed Description

Definition at line 84 of file RevealScenarios.xaml.cs.

Member Data Documentation

string Name

Definition at line 86 of file RevealScenarios.xaml.cs.

ElementTheme Theme

Definition at line 87 of file RevealScenarios.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarios.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ActivityFeedLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ActivityFeedLayout
Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions | Private Attributes

ActivityFeedLayout Class Reference

This is a custom layout that displays elements in two different sizes wide (w) and narrow (n). More...

Inherits VirtualizingLayout.

List of all members.

Static Public Attributes

static readonly DependencyProperty | ItemSpacingProperty
static readonly DependencyProperty | MinItemSizeProperty
static readonly DependencyProperty | RowSpacingProperty

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override void | InitializeForContextCore (VirtualizingLayoutContext context)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)
override void | UninitializeForContextCore (VirtualizingLayoutContext context)

Properties

double | ItemSpacing [get, set]
Size | MinItemSize [get, set]
double | RowSpacing [get, set]

Private Member Functions

Rect[] | CalculateLayoutBoundsForRow (int rowIndex)

Static Private Member Functions

static void | OnPropertyChanged (DependencyObject obj, DependencyPropertyChangedEventArgs args)

Private Attributes

double | _itemSpacing
Size | _minItemSize
double | _rowSpacing

Detailed Description

There are two types of rows odd rows - narrow narrow wide even rows - wide narrow narrow This pattern repeats.

Definition at line 20 of file ActivityFeedLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 120 of file ActivityFeedLayout.cs.

        {
            Debug.WriteLine("ActivityFeedLayout.ArrangeOverride:");
            // walk through the cache of containers and arrange
            var state = context.LayoutState as ActivityFeedLayoutState;
            var virtualContext = context as VirtualizingLayoutContext;
            int currentIndex = state.FirstRealizedIndex;
            foreach(var arrangeRect in state.LayoutRects)
            {
                Debug.WriteLine("ActivityFeedLayout.ArrangeOverride  Arranging " + currentIndex + " at " + arrangeRect);
                var container = virtualContext.GetOrCreateElementAt(currentIndex);
                container.Arrange(arrangeRect);
                currentIndex++;
            }

            return finalSize;
        }

Rect [] CalculateLayoutBoundsForRow ( int rowIndex ) [inline, private]

Definition at line 140 of file ActivityFeedLayout.cs.

        {
            var boundsForRow = new Rect[3];

            var yoffset = rowIndex * (this.MinItemSize.Height + this.RowSpacing);
            boundsForRow[0].Y = boundsForRow[1].Y = boundsForRow[2].Y = yoffset;
            boundsForRow[0].Height = boundsForRow[1].Height = boundsForRow[2].Height = this.MinItemSize.Height;

            if (rowIndex % 2 == 0)
            {
                // Left tile (narrow)
                boundsForRow[0].X = 0;
                boundsForRow[0].Width = this.MinItemSize.Width;
                // Middle tile (narrow)
                boundsForRow[1].X = boundsForRow[0].Right + this.ItemSpacing;
                boundsForRow[1].Width = this.MinItemSize.Width;
                // Right tile (wide)
                boundsForRow[2].X = boundsForRow[1].Right + this.ItemSpacing;
                boundsForRow[2].Width = this.MinItemSize.Width * 2 + this.ItemSpacing;
            }
            else
            {
                // Left tile (wide)
                boundsForRow[0].X = 0;
                boundsForRow[0].Width = (this.MinItemSize.Width * 2 + this.ItemSpacing);
                // Middle tile (narrow)
                boundsForRow[1].X = boundsForRow[0].Right + this.ItemSpacing;
                boundsForRow[1].Width = this.MinItemSize.Width;
                // Right tile (narrow)
                boundsForRow[2].X = boundsForRow[1].Right + this.ItemSpacing;
                boundsForRow[2].Width = this.MinItemSize.Width;
            }

            return boundsForRow;
        }

override void InitializeForContextCore ( VirtualizingLayoutContext context ) [inline, protected]

Definition at line 55 of file ActivityFeedLayout.cs.

        {
            base.InitializeForContextCore(context);

            var state = context.LayoutState as ActivityFeedLayoutState;
            if (state == null)
            {
                // Store any state we might need since (in theory) the layout could be in use by multiple elements simultaneously
                // In reality for the Xbox Activity Feed there's probably only a single instance.
                context.LayoutState = new ActivityFeedLayoutState();
            }
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 80 of file ActivityFeedLayout.cs.

        {
            // In the Xbox scenario there isn't a user grabbing the window and resizing it.  Otherwise, it
            // might be useful to skip a full layout here and return a cached size until some condition is met
            // such as having enough room to fit another column.  That would require extra work like
            // tracking some additional state, comparing the virtualizing rect with the cached value.
            var virtualizingContext = context as VirtualizingLayoutContext;
            var realizationRect = virtualizingContext.RealizationRect;

            // Determine which rows need to be realized
            var firstRowIndex = Math.Max((int)(realizationRect.Y / (this.MinItemSize.Height + this.RowSpacing)) - 1, 0);
            var lastRowIndex = Math.Min((int)(realizationRect.Bottom / (this.MinItemSize.Height + this.RowSpacing)) + 1, (int)(context.ItemCount / 3));

            // Determine which items fall on those rows and determine the rect for each item
            var state = context.LayoutState as ActivityFeedLayoutState;
            state.LayoutRects.Clear();
            state.FirstRealizedIndex = firstRowIndex * 3;

            for (int rowIndex = firstRowIndex; rowIndex < lastRowIndex; rowIndex++)
            {
                int firstItemIndex = rowIndex * 3;
                var boundsForCurrentRow = CalculateLayoutBoundsForRow(rowIndex);

                for (int columnIndex = 0; columnIndex < 3; columnIndex++)
                {
                    var index = firstItemIndex + columnIndex;
                    var rect = boundsForCurrentRow[index % 3];
                    var container = virtualizingContext.GetOrCreateElementAt(index);
                    container.Measure(new Size(boundsForCurrentRow[columnIndex].Width, boundsForCurrentRow[columnIndex].Height));
                    state.LayoutRects.Add(boundsForCurrentRow[columnIndex]);
                }
            }

            // estimate the extent by finding the last item and getting its bottom/right position
            var extentHeight = ((int)(context.ItemCount / 3) - 1) * (this.MinItemSize.Height + this.RowSpacing) + this.MinItemSize.Height;

            // Report a desired size for the layout
            return new Size(this.MinItemSize.Width * 4 + this.ItemSpacing * 2, extentHeight);
        }

static void OnPropertyChanged | ( | DependencyObject | obj,
 |  | DependencyPropertyChangedEventArgs | args |
 | ) |  |  | [inline, static, private]

Definition at line 176 of file ActivityFeedLayout.cs.

        {
            var layout = obj as ActivityFeedLayout;
            if (args.Property == RowSpacingProperty)
            {
                layout._rowSpacing = (double)args.NewValue;
            }
            else if (args.Property == ItemSpacingProperty)
            {
                layout._itemSpacing = (double)args.NewValue;
            }
            else if (args.Property == MinItemSizeProperty)
            {
                layout._minItemSize = (Size)args.NewValue;
            }
            else
            {
                throw new InvalidOperationException("Don't know what you are talking about !");
            }

            layout.InvalidateMeasure();
        }

override void UninitializeForContextCore ( VirtualizingLayoutContext context ) [inline, protected]

Definition at line 68 of file ActivityFeedLayout.cs.

        {
            base.UninitializeForContextCore(context);

            // clear any state
            context.LayoutState = null;
        }

Member Data Documentation

double _itemSpacing [private]

Definition at line 202 of file ActivityFeedLayout.cs.

Size _minItemSize [private]

Definition at line 203 of file ActivityFeedLayout.cs.

double _rowSpacing [private]

Definition at line 201 of file ActivityFeedLayout.cs.

readonly DependencyProperty ItemSpacingProperty [static]
Initial value:
            DependencyProperty.Register("ItemSpacing", typeof(double), typeof(ActivityFeedLayout), new PropertyMetadata(0, OnPropertyChanged))

Definition at line 39 of file ActivityFeedLayout.cs.

readonly DependencyProperty MinItemSizeProperty [static]
Initial value:
            DependencyProperty.Register("MinItemSize", typeof(Size), typeof(ActivityFeedLayout), new PropertyMetadata(0, OnPropertyChanged))

Definition at line 48 of file ActivityFeedLayout.cs.

readonly DependencyProperty RowSpacingProperty [static]
Initial value:
            DependencyProperty.Register("RowSpacing", typeof(double), typeof(ActivityFeedLayout), new PropertyMetadata(0, OnPropertyChanged))

Definition at line 30 of file ActivityFeedLayout.cs.

Property Documentation

double ItemSpacing [get, set]

Definition at line 34 of file ActivityFeedLayout.cs.

Size MinItemSize [get, set]

Definition at line 43 of file ActivityFeedLayout.cs.

double RowSpacing [get, set]

Definition at line 25 of file ActivityFeedLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedLayout.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ActivityFeedLayoutState Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ActivityFeedLayoutState
Properties | Private Attributes

ActivityFeedLayoutState Class Reference

List of all members.

Properties

int | FirstRealizedIndex [get, set]
List< Rect > | LayoutRects [get]

Private Attributes

List< Rect > | _layoutRects

Detailed Description

Definition at line 206 of file ActivityFeedLayout.cs.

Member Data Documentation

List<Rect> _layoutRects [private]

Definition at line 225 of file ActivityFeedLayout.cs.

Property Documentation

int FirstRealizedIndex [get, set]

Definition at line 208 of file ActivityFeedLayout.cs.

List<Rect> LayoutRects [get]

List of indicies and their layout bounds.

Definition at line 213 of file ActivityFeedLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedLayout.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ActivityFeedSamplePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ActivityFeedSamplePage
Public Member Functions

ActivityFeedSamplePage Class Reference

List of all members.

Public Member Functions

ActivityFeedSamplePage ()

Detailed Description

Definition at line 9 of file ActivityFeedSamplePage.xaml.cs.

Constructor & Destructor Documentation

ActivityFeedSamplePage ( ) [inline]

Definition at line 11 of file ActivityFeedSamplePage.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemTemplate = elementFactory;
            repeater.ItemsSource = Enumerable.Range(0, 500);
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimationsDemoPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • AnimationsDemoPage
Classes | Public Member Functions | Private Member Functions | Private Attributes

AnimationsDemoPage Class Reference

List of all members.

Classes

class | AnimationElementFactory

Public Member Functions

AnimationsDemoPage ()

Private Member Functions

Recipe | CreateRecipe (int groupIndex, int itemIndex)
void | ProcessAddCommand (string command)
void | ProcessClearCommand (string command)
void | ProcessCommand (string command)
void | ProcessCommands (string commands)
void | ProcessRemoveCommand (string command)
void | ProcessResetCommand (string command)

Private Attributes

DelegatingItemsSource _dataSource
ResetableCollection< RecipeGroup > | _groups
string | _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus."
Random | _rnd = new Random(12345)

Detailed Description

Definition at line 16 of file AnimationsDemoPage.xaml.cs.

Constructor & Destructor Documentation

AnimationsDemoPage ( ) [inline]

Definition at line 23 of file AnimationsDemoPage.xaml.cs.

        {
            InitializeComponent();

            _groups = new ResetableCollection<RecipeGroup>(Enumerable.Range(0, 10).Select(j =>
                new RecipeGroup(
                    Enumerable.Range(0, _rnd.Next(5, 16)).Select(k => CreateRecipe(j, k)))
                {
                    Name = "Group #" + j
                }));

            _dataSource = new DelegatingItemsSource(_groups);

            Func<DelegatingItemsSource, int, string> KeyFromIndexFunc = (ds, index) => ds.GetAt(index).ToString();

            repeater.ItemsSource = _dataSource;
            _dataSource.KeyFromIndexFunc = KeyFromIndexFunc;

            repeater.Layout = new StackLayout();
            var generator = new AnimationElementFactory(
                (DataTemplate)Resources["RecipeGroupTemplate"],
                (DataTemplate)Resources["RecipeTemplate"],
                (ItemCollectionTransitionProvider)Resources["SharedTransitionProvider"],
                KeyFromIndexFunc);
            repeater.ItemTemplate = generator;
            goBack.Click += delegate { Frame.GoBack(); };

            commands.KeyDown += (s, e) =>
            {
                if (e.Key == Windows.System.VirtualKey.Enter)
                {
                    e.Handled = true;
                    ProcessCommands(commands.Text.ToLowerInvariant());
                }
            };

            stackLayout.Checked += delegate { generator.IsInnerLayoutGrid = false; };
            gridLayout.Checked += delegate { generator.IsInnerLayoutGrid = true; };
            withUniqueId.Checked += delegate { generator.UpdateInnerLayouts(); };
            withoutUniqueId.Checked += delegate { generator.UpdateInnerLayouts(); };

            animationSlowdown.ValueChanged += delegate
            {
                //ItemCollectionTransitionProvider.AnimationSlowdownFactor = animationSlowdown.Value;
            };
        }

Member Function Documentation

Recipe CreateRecipe | ( | int | groupIndex,
 |  | int | itemIndex |
 | ) |  |  | [inline, private]

Definition at line 166 of file AnimationsDemoPage.xaml.cs.

        {
            return new Recipe
            {
                ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", itemIndex % 8 + 1)),
                Description = _lorem.Substring(0, _rnd.Next(200, 650))
            };
        }

void ProcessAddCommand ( string command ) [inline, private]

Definition at line 87 of file AnimationsDemoPage.xaml.cs.

        {
            // Examples: add5w2, add5.7
            var args = command.Substring(3, command.Length - 3).Split('w');
            var indexPath = args[0];
            int[] indices = indexPath.Split('.').Select(i => int.Parse(i)).ToArray();
            if (indices.Length == 1)
            {
                var groupIndex = indices[0];
                var itemsCount = args.Length == 2 ? int.Parse(args[1]) : 0;
                var newGroup = new RecipeGroup(Enumerable.Range(0, itemsCount).Select(i => CreateRecipe(groupIndex, i)))
                {
                    Name = string.Format("Group #{0}", _groups.Count)
                };

                if (groupIndex == _groups.Count) _groups.Add(newGroup);
                else _groups.Insert(groupIndex, newGroup);
            }
            else if (indices.Length == 2)
            {
                var groupIndex = indices[0];
                var recipeIndex = indices[1];
                var group = _groups[groupIndex];
                var newRecipe = CreateRecipe(groupIndex, group.Count);

                if (recipeIndex == group.Count) group.Add(newRecipe);
                else group.Insert(recipeIndex, newRecipe);
            }
        }

void ProcessClearCommand ( string command ) [inline, private]

Definition at line 151 of file AnimationsDemoPage.xaml.cs.

        {
            // Examples: clr, clr5
            if (command == "clr")
            {
                _groups.Clear();
            }
            else
            {
                var groupIndex = int.Parse(command.Substring(3, command.Length - 3));
                _groups[groupIndex].Clear();
            }
        }

void ProcessCommand ( string command ) [inline, private]

Definition at line 79 of file AnimationsDemoPage.xaml.cs.

        {
            if (command.StartsWith("add")) ProcessAddCommand(command);
            else if (command.StartsWith("rem")) ProcessRemoveCommand(command);
            else if (command.StartsWith("res")) ProcessResetCommand(command);
            else if (command.StartsWith("clr")) ProcessClearCommand(command);
        }

void ProcessCommands ( string commands ) [inline, private]

Definition at line 70 of file AnimationsDemoPage.xaml.cs.

        {
            var commandsList = commands.Split(',');
            foreach (var command in commandsList)
            {
                ProcessCommand(command);
            }
        }

void ProcessRemoveCommand ( string command ) [inline, private]

Definition at line 117 of file AnimationsDemoPage.xaml.cs.

        {
            // Examples: rem5, rem5.7
            var indexPath = command.Substring(3, command.Length - 3);
            int[] indices = indexPath.Split('.').Select(i => int.Parse(i)).ToArray();
            var groupIndex = indices[0];
            if (indices.Length == 1)
            {
                _groups.RemoveAt(groupIndex);
            }
            else if (indices.Length == 2)
            {
                var itemIndex = indices[1];
                var group = _groups[groupIndex];
                group.RemoveAt(itemIndex);
            }
        }

void ProcessResetCommand ( string command ) [inline, private]

Definition at line 135 of file AnimationsDemoPage.xaml.cs.

        {
            // Examples: res, res5
            if (command == "res")
            {
                // Shuffles+add+remove
                _groups.ShuffleAndReset();
            }
            else
            {
                var groupIndex = int.Parse(command.Substring(3, command.Length - 3));
                var group = _groups[groupIndex];
                group.ShuffleAndReset();
            }
        }

Member Data Documentation

DelegatingItemsSource _dataSource [private]

Definition at line 20 of file AnimationsDemoPage.xaml.cs.

ResetableCollection<RecipeGroup> _groups [private]

Definition at line 19 of file AnimationsDemoPage.xaml.cs.

string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus." [private]

Definition at line 18 of file AnimationsDemoPage.xaml.cs.

Random _rnd = new Random(12345) [private]

Definition at line 21 of file AnimationsDemoPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/AnimationSamples/AnimationsDemoPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimationsDemoPage::AnimationElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • AnimationsDemoPage
  • AnimationsDemoPage::AnimationElementFactory
Public Member Functions | Protected Member Functions | Properties | Private Attributes

AnimationsDemoPage::AnimationElementFactory Class Reference

Inherits Microsoft::UI::Xaml::Controls::ElementFactory.

List of all members.

Public Member Functions

AnimationElementFactory (DataTemplate groupTemplate, DataTemplate recipeTemplate, ItemCollectionTransitionProvider transitionProvider, Func< DelegatingItemsSource, int, string > KeyFromIndexFunc)
void | UpdateInnerLayouts ()

Protected Member Functions

override UIElement | GetElementCore (ElementFactoryGetArgs args)
override void | RecycleElementCore (ElementFactoryRecycleArgs args)

Properties

bool | IsInnerLayoutGrid [get, set]

Private Attributes

DataTemplate | _groupTemplate
List< ItemsRepeater > | _innerRepeaters = new List<ItemsRepeater>()
bool | _isInnerLayoutGrid
Func< DelegatingItemsSource,
int, string > 		_KeyFromIndexFunc
DataTemplate | _recipeTemplate
RecyclePool | _recyclePool = new RecyclePool()
ItemCollectionTransitionProvider _transitionProvider

Detailed Description

Definition at line 175 of file AnimationsDemoPage.xaml.cs.

Constructor & Destructor Documentation

AnimationElementFactory | ( | DataTemplate | groupTemplate,
 |  | DataTemplate | recipeTemplate,
 |  | ItemCollectionTransitionProvider | transitionProvider,
 |  | Func< DelegatingItemsSource, int, string > | KeyFromIndexFunc |
 | ) |  |  | [inline]

Definition at line 199 of file AnimationsDemoPage.xaml.cs.

            {
                _groupTemplate = groupTemplate;
                _recipeTemplate = recipeTemplate;
                _transitionProvider = transitionProvider;
                _KeyFromIndexFunc = KeyFromIndexFunc;
            }

Member Function Documentation

override UIElement GetElementCore ( ElementFactoryGetArgs args ) [inline, protected]

Definition at line 211 of file AnimationsDemoPage.xaml.cs.

            {
                var key = (args.Data is RecipeGroup) ? "Group" : "Recipe";
                var element = (FrameworkElement)_recyclePool.TryGetElement(key, args.Parent);

                if (element == null)
                {
                    if (args.Data is RecipeGroup)
                    {
                        element = (FrameworkElement)_groupTemplate.LoadContent();
                        _innerRepeaters.Add((ItemsRepeater)element.FindName("groupLayout"));
                    }
                    else
                    {
                        element = (FrameworkElement)_recipeTemplate.LoadContent();
                    }
                }

                element.Tag = key;

                if (args.Data is RecipeGroup)
                {
                    var group = (RecipeGroup)args.Data;
                    var groupName = (TextBlock)element.FindName("groupName");
                    var repeater = (ItemsRepeater)element.FindName("groupLayout");

                    groupName.Text = group.Name;
                    var dataSource = new DelegatingItemsSource(group);
                    dataSource.KeyFromIndexFunc = _KeyFromIndexFunc;
                    repeater.ItemsSource = dataSource;
                    repeater.Layout = IsInnerLayoutGrid ? (VirtualizingLayout)new UniformGridLayout() { MinItemWidth = 150, MinItemHeight = 150 } : (VirtualizingLayout)new StackLayout();
                    RepeaterTestHooks.SetLayoutId(repeater.Layout, group.Name);
                    repeater.ItemTemplate = this;
                    repeater.ItemTransitionProvider = _transitionProvider;
                }
                else
                {
                    var recipe = (Recipe)args.Data;
                    var image = (Image)element.FindName("recipeImage");
                    var description = (TextBlock)element.FindName("recipeDescription");

                    image.Source = new BitmapImage(recipe.ImageUri);
                    description.Text = recipe.Description;
                }

                return element;
            }

override void RecycleElementCore ( ElementFactoryRecycleArgs args ) [inline, protected]

Definition at line 259 of file AnimationsDemoPage.xaml.cs.

            {
                var repeater = (ItemsRepeater)((FrameworkElement)args.Element).FindName("groupLayout");
                if (repeater != null)
                {
                    // Make sure all elements are cleared.
                    repeater.Layout = null;
                }

                _recyclePool.PutElement(args.Element, (string)((FrameworkElement)args.Element).Tag, args.Parent);
            }

void UpdateInnerLayouts ( ) [inline]

Definition at line 271 of file AnimationsDemoPage.xaml.cs.

            {
                foreach (var repeater in _innerRepeaters)
                {
                    if (repeater.Layout != null)
                    {
                        var id = RepeaterTestHooks.GetLayoutId(repeater.Layout);
                        repeater.Layout = IsInnerLayoutGrid ? (VirtualizingLayout)new UniformGridLayout() { MinItemWidth = 150, MinItemHeight = 150 } : (VirtualizingLayout)new StackLayout();
                        RepeaterTestHooks.SetLayoutId(repeater.Layout, id);
                    }
                }
            }

Member Data Documentation

DataTemplate _groupTemplate [private]

Definition at line 177 of file AnimationsDemoPage.xaml.cs.

List<ItemsRepeater> _innerRepeaters = new List<ItemsRepeater>() [private]

Definition at line 181 of file AnimationsDemoPage.xaml.cs.

bool _isInnerLayoutGrid [private]

Definition at line 183 of file AnimationsDemoPage.xaml.cs.

Func<DelegatingItemsSource, int, string> _KeyFromIndexFunc [private]

Definition at line 182 of file AnimationsDemoPage.xaml.cs.

DataTemplate _recipeTemplate [private]

Definition at line 178 of file AnimationsDemoPage.xaml.cs.

RecyclePool _recyclePool = new RecyclePool() [private]

Definition at line 180 of file AnimationsDemoPage.xaml.cs.

ItemCollectionTransitionProvider _transitionProvider [private]

Definition at line 179 of file AnimationsDemoPage.xaml.cs.

Property Documentation

bool IsInnerLayoutGrid [get, set]

Definition at line 187 of file AnimationsDemoPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/AnimationSamples/AnimationsDemoPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BasicDemo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • BasicDemo
Public Member Functions | Public Attributes | Private Member Functions

BasicDemo Class Reference

List of all members.

Public Member Functions

BasicDemo ()

Public Attributes

ObservableCollection< string > | simpleStringsList = new ObservableCollection<string>()

Private Member Functions

void | OnAddRecipeButton_Click (object sender, RoutedEventArgs e)
void | OnSelectTemplateKey (RecyclingElementFactory sender, SelectTemplateEventArgs args)

Detailed Description

Definition at line 12 of file BasicDemo.xaml.cs.

Constructor & Destructor Documentation

BasicDemo ( ) [inline]

Definition at line 16 of file BasicDemo.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemTemplate = elementFactory;
            var stack = repeater.Layout as StackLayout;
            int numItems = (stack != null && !stack.IsVirtualizationEnabled) ? 10 : 10000;
            repeater.ItemsSource = Enumerable.Range(0, numItems).Select(x => x.ToString());
        }

Member Function Documentation

void OnAddRecipeButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 25 of file BasicDemo.xaml.cs.

        {
            InsertAtStartChildCountLabel.Text = VisualTreeHelper.GetChildrenCount(insertStartTestRepeater).ToString();
            simpleStringsList.Insert(0,"Item" + simpleStringsList.Count );
        }

void OnSelectTemplateKey | ( | RecyclingElementFactory | sender,
 |  | SelectTemplateEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 31 of file BasicDemo.xaml.cs.

        {
            args.TemplateKey = (int.Parse(args.DataContext.ToString()) % 2 == 0) ? "even" : "odd";
        }

Member Data Documentation

ObservableCollection<string> simpleStringsList = new ObservableCollection<string>()

Definition at line 14 of file BasicDemo.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/BasicDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Category Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Category
Properties

Category Class Reference

List of all members.

Properties

string Name [get, set]

Detailed Description

Definition at line 35 of file StoreMockData.cs.

Property Documentation

string Name [get, set]

Definition at line 37 of file StoreMockData.cs.

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreMockData.cs
  • Repeater/TestUI/Samples/NestedLayoutSamples/StoreMockData.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CircleLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • CircleLayout
Protected Member Functions | Properties | Private Member Functions

CircleLayout Class Reference

Inherits VirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

double | ItemSize [get, set]

Private Member Functions

double | GetCircleRadius (Size availableSize)

Detailed Description

Definition at line 11 of file CircleLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 27 of file CircleLayout.cs.

        {
            var itemCount = context.ItemCount;
            var radius = GetCircleRadius(finalSize) - ItemSize / 2.0;
            var angleIncrement = 2 * Math.PI / itemCount;
            var angle = 0.0;

            for (int i = 0; i < context.ItemCount; i++)
            {
                var container = context.GetOrCreateElementAt(i);
                var x = Math.Sin(angle) * radius - ItemSize / 2.0 + finalSize.Width / 2.0;
                var y = -Math.Cos(angle) * radius - ItemSize / 2.0 + finalSize.Height / 2.0;
                container.Arrange(new Rect(x, y, ItemSize, ItemSize));
                angle += angleIncrement;
            }

            return finalSize;
        }

double GetCircleRadius ( Size availableSize ) [inline, private]

Definition at line 46 of file CircleLayout.cs.

        {
            return Math.Min(availableSize.Width, availableSize.Height) / 2;
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 15 of file CircleLayout.cs.

        {
            var itemCount = context.ItemCount;
            for(int i=0; i< context.ItemCount; i++)
            {
                var container = context.GetOrCreateElementAt(i);
                container.Measure(new Size(ItemSize, ItemSize));
            }

            return availableSize;
        }

Property Documentation

double ItemSize [get, set]

Definition at line 13 of file CircleLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayout.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CircleLayoutSamplePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • CircleLayoutSamplePage
Public Member Functions | Private Member Functions | Private Attributes

CircleLayoutSamplePage Class Reference

List of all members.

Public Member Functions

CircleLayoutSamplePage ()

Private Member Functions

Person NewPerson ()
void | OnExistingItemTapped (object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e)
void | OnNewItemTapped (object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e)

Private Attributes

ObservableCollection< Person > | _data
int | _lastId
Random | _rnd = new Random(123)

Detailed Description

Definition at line 16 of file CircleLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

CircleLayoutSamplePage ( ) [inline]

Definition at line 22 of file CircleLayoutSamplePage.xaml.cs.

        {
            InitializeComponent();

            _data = new ObservableCollection<Person>();
            repeater.ItemsSource = new PersonDataSource(_data);
            repeater.ItemTemplate = new PersonElementFactory((DataTemplate)Resources["PersonTemplate"]); ;
            newItem.Content = NewPerson();
            newItem.Tapped += OnNewItemTapped;

            shuffle.Click += delegate
            {
                for (int i = 0; i < _data.Count; i++)
                {
                    int from = _rnd.Next(0, _data.Count);
                    var value = _data[from];
                    _data.RemoveAt(from);
                    int to = _rnd.Next(0, _data.Count);
                    _data.Insert(to, value);
                }
            };

            bringIntoView.Click += delegate
            {
                if (_data.Count > 0)
                {
                    var anchor = repeater.GetOrCreateElement(0);
                    anchor.StartBringIntoView(new BringIntoViewOptions()
                    {
                        HorizontalAlignmentRatio = 0.5,
                        VerticalAlignmentRatio = 0.5,
                        HorizontalOffset = 0.0,
                        VerticalOffset = 0.0,
                        AnimationDesired = true
                    });
                }
            };

            expandButton.Click += delegate
            {
                expandButton.Height = 500 - expandButton.ActualHeight;
            };

            customAnimations.Checked += delegate { repeater.ItemTransitionProvider = new RadialItemCollectionTransitionProvider(); };
            customAnimations.Unchecked += delegate { repeater.ItemTransitionProvider = new DefaultItemCollectionTransitionProvider(); };

            maximumHorizontalCacheLength.TextChanged += delegate
            {
                double maximumHorizontalCacheLengthValue;
                if (double.TryParse(maximumHorizontalCacheLength.Text, out maximumHorizontalCacheLengthValue))
                {
                    repeater.HorizontalCacheLength = maximumHorizontalCacheLengthValue;
                }
            };

            maximumVerticalCacheLength.TextChanged += delegate
            {
                double maximumVerticalCacheLengthValue;
                if (double.TryParse(maximumVerticalCacheLength.Text, out maximumVerticalCacheLengthValue))
                {
                    repeater.VerticalCacheLength = maximumVerticalCacheLengthValue;
                }
            };
        }

Member Function Documentation

Person NewPerson ( ) [inline, private]

Definition at line 98 of file CircleLayoutSamplePage.xaml.cs.

        {
            ++_lastId;
            return new Person(_lastId.ToString());
        }

void OnExistingItemTapped | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.TappedRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 93 of file CircleLayoutSamplePage.xaml.cs.

        {
            _data.Remove((Person)((FrameworkElement)sender).DataContext);
        }

void OnNewItemTapped | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.TappedRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 87 of file CircleLayoutSamplePage.xaml.cs.

        {
            _data.Insert(0, (Person)newItem.Content);
            newItem.Content = NewPerson();
        }

Member Data Documentation

ObservableCollection<Person> _data [private]

Definition at line 18 of file CircleLayoutSamplePage.xaml.cs.

int _lastId [private]

Definition at line 19 of file CircleLayoutSamplePage.xaml.cs.

Random _rnd = new Random(123) [private]

Definition at line 20 of file CircleLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CollectionChangeDemo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • CollectionChangeDemo
Classes | Public Member Functions | Properties | Private Member Functions | Private Attributes

CollectionChangeDemo Class Reference

List of all members.

Classes

class | MyDataSource

Public Member Functions

CollectionChangeDemo ()

Properties

List< object > | ResettingListItems [get, set]

Private Member Functions

void | OnItemClicked (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | OnSelectTemplateKey (RecyclingElementFactory sender, SelectTemplateEventArgs args)
void | ResettingCollectionRemoveItemButton_ItemClick (object sender, RoutedEventArgs e)

Private Attributes

MyDataSource | _dataSource = new MyDataSource(Enumerable.Range(0, 10).Select(i => i.ToString()).ToList())

Detailed Description

Definition at line 14 of file CollectionChangeDemo.xaml.cs.

Constructor & Destructor Documentation

CollectionChangeDemo ( ) [inline]

Definition at line 18 of file CollectionChangeDemo.xaml.cs.

        {
            this.InitializeComponent();
            goBackButton.Click += delegate { Frame.GoBack(); };
            insertButton.Click += delegate { _dataSource.Insert(int.Parse(newStartIndex.Text), int.Parse(newCount.Text), resetMode.IsChecked ?? false); };
            removeButton.Click += delegate { _dataSource.Remove(int.Parse(oldStartIndex.Text), int.Parse(oldCount.Text), resetMode.IsChecked ?? false); };
            replaceButton.Click += delegate { _dataSource.Replace(int.Parse(oldStartIndex.Text), int.Parse(oldCount.Text), int.Parse(newCount.Text), resetMode.IsChecked ?? false); };
            moveButton.Click += delegate { _dataSource.Move(int.Parse(oldStartIndex.Text), int.Parse(newStartIndex.Text), int.Parse(oldCount.Text), resetMode.IsChecked ?? false); };
            resetButton.Click += delegate { _dataSource.Reset(); };

            repeater.ItemTemplate = elementFactory;
            repeater.ItemsSource = _dataSource;
        }

Member Function Documentation

void OnItemClicked | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 43 of file CollectionChangeDemo.xaml.cs.

        {
            int index = repeater.GetElementIndex(sender as UIElement);
            _dataSource.Remove(index, 1 /* count */ , true /* reset */);
        }

void OnSelectTemplateKey | ( | RecyclingElementFactory | sender,
 |  | SelectTemplateEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 32 of file CollectionChangeDemo.xaml.cs.

        {
            args.TemplateKey = (int.Parse(args.DataContext.ToString()) % 2 == 0) ? "even" : "odd";
        }

void ResettingCollectionRemoveItemButton_ItemClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file CollectionChangeDemo.xaml.cs.

        {
            ResettingListItems.Remove((sender as Button).Content);
            ResettingListItems = new List<object>(ResettingListItems);
            ResettingCollectionRepeater.ItemsSource = ResettingListItems;
        }

Member Data Documentation

MyDataSource _dataSource = new MyDataSource(Enumerable.Range(0, 10).Select(i => i.ToString()).ToList()) [private]

Definition at line 16 of file CollectionChangeDemo.xaml.cs.

Property Documentation

List<object> ResettingListItems [get, set]

Definition at line 17 of file CollectionChangeDemo.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/CollectionChangeDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CollectionChangeDemo::MyDataSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • CollectionChangeDemo
  • CollectionChangeDemo::MyDataSource
Public Member Functions | Protected Member Functions | Properties | Private Attributes

CollectionChangeDemo::MyDataSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping.

List of all members.

Public Member Functions

MyDataSource (List< string > source)
void | Insert (int index, int count, bool reset)
void | Move (int oldIndex, int newIndex, int count, bool reset)
void | Remove (int index, int count, bool reset)
void | Replace (int index, int oldCount, int newCount, bool reset)
void | Reset ()

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()
override string | KeyFromIndexCore (int index)

Properties

List< string > | Inner [get, set]

Private Attributes

List< string > | _inner

Detailed Description

Definition at line 49 of file CollectionChangeDemo.xaml.cs.

Constructor & Destructor Documentation

MyDataSource ( List< string > source ) [inline]

Definition at line 53 of file CollectionChangeDemo.xaml.cs.

            {
                Inner = source;
            }

Member Function Documentation

override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 76 of file CollectionChangeDemo.xaml.cs.

            {
                return Inner[index];
            }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 58 of file CollectionChangeDemo.xaml.cs.

            {
                return Inner.Count;
            }

void Insert | ( | int | index,
 |  | int | count,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 87 of file CollectionChangeDemo.xaml.cs.

            {
                for (int i = 0; i < count; i++)
                {
                    Inner.Insert(index + i, (1000 + i).ToString());
                }

                if (reset)
                {
                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
                }
                else
                {
                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                        NotifyCollectionChangedAction.Add,
                        oldStartingIndex: -1,
                        oldItemsCount: 0,
                        newStartingIndex: index,
                        newItemsCount: count));
                }
            }

override string KeyFromIndexCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceViewWithUniqueIdMapping.

Definition at line 81 of file CollectionChangeDemo.xaml.cs.

            {
                // data is the same as its unique id
                return Inner[index].ToString();
            }

void Move | ( | int | oldIndex,
 |  | int | newIndex,
 |  | int | count,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 158 of file CollectionChangeDemo.xaml.cs.

            {
                var items = Inner.GetRange(oldIndex, count);
                Inner.RemoveRange(oldIndex, count);
                Inner.InsertRange(newIndex, items);

                if (reset)
                {
                    OnItemsSourceChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
                }
                else
                {
                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                        NotifyCollectionChangedAction.Move,
                        oldStartingIndex: oldIndex,
                        oldItemsCount: count,
                        newStartingIndex: newIndex,
                        newItemsCount: count));
                }
            }

void Remove | ( | int | index,
 |  | int | count,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 109 of file CollectionChangeDemo.xaml.cs.

            {
                for (int i = 0; i < count; i++)
                {
                    Inner.RemoveAt(index);
                }

                if (reset)
                {
                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
                }
                else
                {
                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                        NotifyCollectionChangedAction.Remove,
                        oldStartingIndex: index,
                        oldItemsCount: count,
                        newStartingIndex: -1,
                        newItemsCount: 0));
                }
            }

void Replace | ( | int | index,
 |  | int | oldCount,
 |  | int | newCount,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 131 of file CollectionChangeDemo.xaml.cs.

            {
                for (int i = 0; i < oldCount; i++)
                {
                    Inner.RemoveAt(index);
                }

                for (int i = 0; i < newCount; i++)
                {
                    Inner.Insert(index, (10000 + i).ToString());
                }

                if (reset)
                {
                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
                }
                else
                {
                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                        NotifyCollectionChangedAction.Replace,
                        oldStartingIndex: index,
                        oldItemsCount: oldCount,
                        newStartingIndex: index,
                        newItemsCount: newCount));
                }
            }

void Reset ( ) [inline]

Definition at line 179 of file CollectionChangeDemo.xaml.cs.

            {
                Random rand = new Random(123);
                for (int i = 0; i < 10; i++)
                {
                    int from = rand.Next(0, Inner.Count - 1);
                    var value = Inner[from];
                    Inner.RemoveAt(from);
                    int to = rand.Next(0, Inner.Count - 1);
                    Inner.Insert(to, value);
                }

                // something changed, but i dont want to tell you the
                // exact changes
                OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
            }

Member Data Documentation

List<string> _inner [private]

Definition at line 51 of file CollectionChangeDemo.xaml.cs.

Property Documentation

List<string> Inner [get, set]

Definition at line 64 of file CollectionChangeDemo.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/CollectionChangeDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Defaults Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Defaults
Public Member Functions | Properties

Defaults Class Reference

List of all members.

Public Member Functions

Defaults ()

Properties

List< string > Data [get, set]

Detailed Description

Definition at line 10 of file Defaults.xaml.cs.

Constructor & Destructor Documentation

Defaults ( ) [inline]

Definition at line 14 of file Defaults.xaml.cs.

        {
            Data = Enumerable.Range(0, 10000).Select(x => x.ToString()).ToList();
            this.InitializeComponent();
        }

Property Documentation

List<string> Data [get, set]

Definition at line 12 of file Defaults.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/Defaults.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DelegatingItemsSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • DelegatingItemsSource
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

DelegatingItemsSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping.

List of all members.

Public Member Functions

DelegatingItemsSource (IList data)
object | GetAt (int index)

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()
override string | KeyFromIndexCore (int index)

Properties

Func< DelegatingItemsSource,
int, string > 		KeyFromIndexFunc [get, set]

Private Member Functions

void | OnCollectionChanged (object sender, NotifyCollectionChangedEventArgs e)

Private Attributes

IList | _data

Detailed Description

Definition at line 12 of file DelegatingItemsSource.cs.

Constructor & Destructor Documentation

DelegatingItemsSource ( IList data ) [inline]

Definition at line 20 of file DelegatingItemsSource.cs.

        {
            _data = data;
            var incc = data as INotifyCollectionChanged;
            if (incc != null)
            {
                incc.CollectionChanged += OnCollectionChanged;
            }
        }

Member Function Documentation

object GetAt ( int index ) [inline]

Definition at line 30 of file DelegatingItemsSource.cs.

        {
            return _data[index];
        }

override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 35 of file DelegatingItemsSource.cs.

        {
            return _data[index];
        }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 18 of file DelegatingItemsSource.cs.

{ return _data.Count; }

override string KeyFromIndexCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceViewWithUniqueIdMapping.

Definition at line 40 of file DelegatingItemsSource.cs.

        {
            return KeyFromIndexFunc(this, index);
        }

void OnCollectionChanged | ( | object | sender,
 |  | NotifyCollectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file DelegatingItemsSource.cs.

        {
            var args = CollectionChangeEventArgsConverters.CreateNotifyArgs(
                e.Action,
                e.OldStartingIndex,
                e.OldItems == null ? -1 : e.OldItems.Count,
                e.NewStartingIndex,
                e.NewItems == null ? -1 : e.NewItems.Count);

            OnItemsSourceChanged(args);
        }

Member Data Documentation

IList _data [private]

Definition at line 14 of file DelegatingItemsSource.cs.

Property Documentation

Func<DelegatingItemsSource, int, string> KeyFromIndexFunc [get, set]

Definition at line 16 of file DelegatingItemsSource.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/DelegatingItemsSource.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DisposableUserControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • DisposableUserControl
Public Member Functions | Static Public Attributes | Properties | Private Member Functions | Static Private Attributes

DisposableUserControl Class Reference

List of all members.

Public Member Functions

DisposableUserControl ()

Static Public Attributes

static readonly DependencyProperty | NumberProperty

Properties

int | Number [get, set]
static int | OpenItems [get]

Private Member Functions

~DisposableUserControl ()

Static Private Attributes

static int | _counter = 0

Detailed Description

Definition at line 21 of file DisposableUserControl.xaml.cs.

Constructor & Destructor Documentation

DisposableUserControl ( ) [inline]

Definition at line 37 of file DisposableUserControl.xaml.cs.

        {
            Interlocked.Increment(ref _counter);
            this.InitializeComponent();
        }

~DisposableUserControl ( ) [inline, private]

Definition at line 43 of file DisposableUserControl.xaml.cs.

        {
            Interlocked.Decrement(ref _counter);
        }

Member Data Documentation

int _counter = 0 [static, private]

Definition at line 35 of file DisposableUserControl.xaml.cs.

readonly DependencyProperty NumberProperty [static]
Initial value:
            DependencyProperty.Register("Number", typeof(int), typeof(DisposableUserControl), new PropertyMetadata(-1))

Definition at line 30 of file DisposableUserControl.xaml.cs.

Property Documentation

int Number [get, set]

Definition at line 25 of file DisposableUserControl.xaml.cs.

int OpenItems [static, get]

Definition at line 34 of file DisposableUserControl.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemTemplateSamples/DisposableUserControl.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ElementsInItemsSourcePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ElementsInItemsSourcePage
Public Member Functions

ElementsInItemsSourcePage Class Reference

List of all members.

Public Member Functions

ElementsInItemsSourcePage ()

Detailed Description

Definition at line 11 of file ElementsInItemsSourcePage.xaml.cs.

Constructor & Destructor Documentation

ElementsInItemsSourcePage ( ) [inline]

Definition at line 13 of file ElementsInItemsSourcePage.xaml.cs.

        {
            this.InitializeComponent();
            goBackButton.Click += delegate { Frame.GoBack(); };
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/ElementsInItemsSourcePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FixedSizeItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • FixedSizeItem
Public Member Functions | Properties

FixedSizeItem Class Reference

List of all members.

Public Member Functions

FixedSizeItem ()

Properties

int | Size [get, set]
string | Text [get, set]

Detailed Description

Definition at line 771 of file VariableSizedItemsPage.xaml.cs.

Constructor & Destructor Documentation

FixedSizeItem ( ) [inline]

Definition at line 773 of file VariableSizedItemsPage.xaml.cs.

        {
            Size = 50;
        }

Property Documentation

int Size [get, set]

Definition at line 779 of file VariableSizedItemsPage.xaml.cs.

string Text [get, set]

Definition at line 778 of file VariableSizedItemsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/VariableSizedItemsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutDemoPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • FlowLayoutDemoPage
Public Member Functions

FlowLayoutDemoPage Class Reference

List of all members.

Public Member Functions

FlowLayoutDemoPage ()

Detailed Description

Definition at line 10 of file FlowLayoutDemoPage.xaml.cs.

Constructor & Destructor Documentation

FlowLayoutDemoPage ( ) [inline]

Definition at line 12 of file FlowLayoutDemoPage.xaml.cs.

        {
            this.InitializeComponent();

            repeater.ItemsSource = (from i in Enumerable.Range(0, 1000)
                               select new MyItem() {
                                   Label = i.ToString(),
                                   Height = 50 + i % 2 * 50
                               }).ToList();
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/FlowLayoutDemoPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Item Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Item
Properties

Item Class Reference

List of all members.

Properties

string Name [get, set]

Detailed Description

Definition at line 40 of file StoreMockData.cs.

Property Documentation

string Name [get, set]

Definition at line 42 of file StoreMockData.cs.

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreMockData.cs
  • Repeater/TestUI/Samples/NestedLayoutSamples/StoreMockData.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewWithDataPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ItemsViewWithDataPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ItemsViewWithDataPage Class Reference

List of all members.

Public Member Functions

ItemsViewWithDataPage ()
ItemsViewWithDataPage ()

Protected Member Functions

override void | OnNavigatedTo (NavigationEventArgs e)
override void | OnNavigatedTo (NavigationEventArgs e)

Private Member Functions

void | ItemsStretchComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ItemsStretchComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | LineAlignmentComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | LineAlignmentComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | OnColumnSpacingSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnColumnSpacingSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnLayoutUpdated (object sender, object e)
void | OnLayoutUpdated (object sender, object e)
void | OnMaintainViewportSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnMaintainViewportSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnMaxRowsOrColumnsSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnMaxRowsOrColumnsSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnRecipeDeleted (object sender, RoutedEventArgs e)
void | OnRecipeDeleted (object sender, RoutedEventArgs e)
void | OnRecipeInserted (object sender, RoutedEventArgs e)
void | OnRecipeInserted (object sender, RoutedEventArgs e)
void | OnRendering (object sender, object e)
void | OnRendering (object sender, object e)
void | OnResizeMeButtonClick (object sender, RoutedEventArgs e)
void | OnResizeMeButtonClick (object sender, RoutedEventArgs e)
void | OnRowSpacingSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnRowSpacingSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | OnScrollButtonClicked (object sender, RoutedEventArgs e)
void | OnScrollButtonClicked (object sender, RoutedEventArgs e)

Private Attributes

ObservableCollection< Recipe > | _flatData
TestObservableCollection< Recipe > | _flatData
string | _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus."
TestObservableCollection
< RecipeGroup > 		_oneLevelNestedData
ObservableCollection< RecipeGroup > | _oneLevelNestedData
PageInfo _pageInfo
TestObservableCollection< Year > | _twoLevelNestedData
ObservableCollection< Year > | _twoLevelNestedData

Detailed Description

Definition at line 22 of file ItemsViewWithDataPage.xaml.cs.

Constructor & Destructor Documentation

ItemsViewWithDataPage ( ) [inline]

Definition at line 31 of file ItemsViewWithDataPage.xaml.cs.

        {
            this.InitializeComponent();

            goBackButton.Click += delegate
            {
                Frame.GoBack();
            };

            //this.LayoutUpdated += OnLayoutUpdated;
            //CompositionTarget.Rendering += OnRendering;
            lineAlignmentComboBox.SelectionChanged += LineAlignmentComboBox_SelectionChanged;
            itemsStretchComboBox.SelectionChanged += ItemsStretchComboBox_SelectionChanged;

            scrollButton.Click += OnScrollButtonClicked;
        }

ItemsViewWithDataPage ( ) [inline]

Definition at line 27 of file ItemsViewWithDataPage.xaml.cs.

        {
            this.InitializeComponent();

            goBackButton.Click += delegate
            {
                Frame.GoBack();
            };

            //this.LayoutUpdated += OnLayoutUpdated;
            //CompositionTarget.Rendering += OnRendering;
            lineAlignmentComboBox.SelectionChanged += LineAlignmentComboBox_SelectionChanged;
            itemsStretchComboBox.SelectionChanged += ItemsStretchComboBox_SelectionChanged;

            scrollButton.Click += OnScrollButtonClicked;
        }

Member Function Documentation

void ItemsStretchComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 202 of file ItemsViewWithDataPage.xaml.cs.

        {
            var alignment = (itemsStretchComboBox.SelectedItem as ComboBoxItem).Content.ToString();
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetItemsStretch(_pageInfo.Level0Layout, alignment);
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetItemsStretch(_pageInfo.Level1Layout, alignment);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetItemsStretch(_pageInfo.Level2Layout, alignment);
            }
        }

void ItemsStretchComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 198 of file ItemsViewWithDataPage.xaml.cs.

        {
            var alignment = (itemsStretchComboBox.SelectedItem as ComboBoxItem).Content.ToString();
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetItemsStretch(_pageInfo.Level0Layout, alignment);
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetItemsStretch(_pageInfo.Level1Layout, alignment);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetItemsStretch(_pageInfo.Level2Layout, alignment);
            }
        }

void LineAlignmentComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 183 of file ItemsViewWithDataPage.xaml.cs.

        {
            var alignment = (lineAlignmentComboBox.SelectedItem as ComboBoxItem).Content.ToString();
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetLineAlignment(_pageInfo.Level0Layout, alignment);
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetLineAlignment(_pageInfo.Level1Layout, alignment);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetLineAlignment(_pageInfo.Level2Layout, alignment);
            }
        }

void LineAlignmentComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 179 of file ItemsViewWithDataPage.xaml.cs.

        {
            var alignment = (lineAlignmentComboBox.SelectedItem as ComboBoxItem).Content.ToString();
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetLineAlignment(_pageInfo.Level0Layout, alignment);
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetLineAlignment(_pageInfo.Level1Layout, alignment);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetLineAlignment(_pageInfo.Level2Layout, alignment);
            }
        }

void OnColumnSpacingSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 161 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetMinColumnSpacing(_pageInfo.Level0Layout, colSpacingSlider.Value);
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetMinColumnSpacing(_pageInfo.Level1Layout, colSpacingSlider.Value);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetMinColumnSpacing(_pageInfo.Level2Layout, colSpacingSlider.Value);
            }
        }

void OnColumnSpacingSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 165 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetMinColumnSpacing(_pageInfo.Level0Layout, colSpacingSlider.Value);
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetMinColumnSpacing(_pageInfo.Level1Layout, colSpacingSlider.Value);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetMinColumnSpacing(_pageInfo.Level2Layout, colSpacingSlider.Value);
            }
        }

void OnLayoutUpdated | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 221 of file ItemsViewWithDataPage.xaml.cs.

        {
            //Logger.WriteLine("---------------------- layout updated ---------------------");
        }

void OnLayoutUpdated | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 217 of file ItemsViewWithDataPage.xaml.cs.

        {
            //Logger.WriteLine("---------------------- layout updated ---------------------");
        }

void OnMaintainViewportSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 131 of file ItemsViewWithDataPage.xaml.cs.

        {
            tracker.HorizontalAnchorRatio = maintainViewportSlider.Value;
        }

void OnMaintainViewportSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 135 of file ItemsViewWithDataPage.xaml.cs.

        {
            tracker.HorizontalAnchorRatio = maintainViewportSlider.Value;
        }

void OnMaxRowsOrColumnsSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetMaxRowsOrColumns(_pageInfo.Level0Layout, (int)(maxRowsOrColumnsSlider.Value));
            }
        }

void OnMaxRowsOrColumnsSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 157 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetMaxRowsOrColumns(_pageInfo.Level0Layout, (int)(maxRowsOrColumnsSlider.Value));
            }
        }

override void OnNavigatedTo ( NavigationEventArgs e ) [inline, protected]

Definition at line 48 of file ItemsViewWithDataPage.xaml.cs.

        {
            _pageInfo = e.Parameter as PageInfo;
            if (_pageInfo != null)
            {
                int levels = _pageInfo.NumLevels;
                var level0Layout = _pageInfo.Level0Layout;
                var level1Layout = _pageInfo.Level1Layout;
                var level2Layout = _pageInfo.Level2Layout;
                var rnd = new Random(12345);

                if (_pageInfo.Orientation == Orientation.Horizontal)
                {
                    scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
                    scrollViewer.VerticalScrollMode = ScrollMode.Disabled;
                    scrollViewer.HorizontalScrollMode = ScrollMode.Enabled;
                    scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
                }

                var generator = _pageInfo.Orientation == Orientation.Vertical ?
                    new RecipeElementFactory(
                        (DataTemplate)Resources["RecipeTemplate"],
                        (DataTemplate)Resources["RecipeGroupTemplate"],
                        (DataTemplate)Resources["YearTemplate"], _pageInfo) :
                    new RecipeElementFactory(
                        (DataTemplate)Resources["RecipeTemplateHorizontal"],
                        (DataTemplate)Resources["RecipeGroupTemplateHorizontal"],
                        (DataTemplate)Resources["YearTemplateHorizontal"], _pageInfo);

                generator.RecyclePool = new RecyclePool();
                rootRepeater.ItemTemplate = generator;
                rootRepeater.Layout = _pageInfo.Level0Layout;
                RepeaterTestHooks.SetLayoutId(rootRepeater.Layout, "Root");

                switch (levels)
                {
                    case 0:
                        _flatData = new ObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
                            new Recipe
                            {
                                ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                Description = k + " - " + _lorem.Substring(0, level0Layout is StackLayout ? rnd.Next(200, 650) : level0Layout is UniformGridLayout ? 0 : rnd.Next(10, 30))
                                //Description = k.ToString()
                            }));
                        rootRepeater.ItemsSource = _flatData;
                        break;
                    case 1:
                        _oneLevelNestedData = new ObservableCollection<RecipeGroup>(Enumerable.Range(0, 10).Select(j =>
                            new RecipeGroup(
                                Enumerable.Range(0, rnd.Next(5, 16)).Select(k =>
                                         new Recipe
                                         {
                                             ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                             Description = string.Format("{0}.{1} - {2}", j, k, _lorem.Substring(0, level1Layout is StackLayout ? rnd.Next(200, 650) : level1Layout is UniformGridLayout ? 0 : rnd.Next(10, 30)))
                                         }))
                            {
                                Name = "Group #" + j
                            }));
                        rootRepeater.ItemsSource = _oneLevelNestedData;
                        break;
                    case 2:
                        _twoLevelNestedData = new ObservableCollection<Year>(Enumerable.Range(0, 3).Select(i => new Year(
                            new ObservableCollection<RecipeGroup>(Enumerable.Range(0, rnd.Next(2, 5)).Select(j => new RecipeGroup(
                                Enumerable.Range(0, rnd.Next(5, 16)).Select(k =>
                                         new Recipe
                                         {
                                             ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                             Description = string.Format("{0}.{1}.{2} - {3}", 2016 - i, j, k, _lorem.Substring(0, level2Layout is StackLayout ? rnd.Next(200, 650) : level2Layout is UniformGridLayout ? 0 : rnd.Next(10, 30)))
                                         }))
                            {
                                Name = "Group #" + j
                            })))
                        {
                            Value = 2016 - i
                        }));
                        rootRepeater.ItemsSource = _twoLevelNestedData;
                        break;
                }
            }
        }

override void OnNavigatedTo ( NavigationEventArgs e ) [inline, protected]

Definition at line 44 of file ItemsViewWithDataPage.xaml.cs.

        {
            _pageInfo = e.Parameter as PageInfo;
            if (_pageInfo != null)
            {
                int levels = _pageInfo.NumLevels;
                var level0Layout = _pageInfo.Level0Layout;
                var level1Layout = _pageInfo.Level1Layout;
                var level2Layout = _pageInfo.Level2Layout;
                var rnd = new Random(12345);

                if (_pageInfo.Orientation == Orientation.Horizontal)
                {
                    scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
                    scrollViewer.VerticalScrollMode = ScrollMode.Disabled;
                    scrollViewer.HorizontalScrollMode = ScrollMode.Enabled;
                    scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
                }

                var generator = _pageInfo.Orientation == Orientation.Vertical ?
                    new RecipeElementFactory(
                        (DataTemplate)Resources["RecipeTemplate"],
                        (DataTemplate)Resources["RecipeGroupTemplate"],
                        (DataTemplate)Resources["YearTemplate"], _pageInfo) :
                    new RecipeElementFactory(
                        (DataTemplate)Resources["RecipeTemplateHorizontal"],
                        (DataTemplate)Resources["RecipeGroupTemplateHorizontal"],
                        (DataTemplate)Resources["YearTemplateHorizontal"], _pageInfo);

                generator.RecyclePool = new RecyclePool();
                rootRepeater.ItemTemplate = generator;
                rootRepeater.Layout = _pageInfo.Level0Layout;
                RepeaterTestHooks.SetLayoutId(rootRepeater.Layout, "Root");

                switch (levels)
                {
                    case 0:
                        _flatData = new TestObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
                            new Recipe
                            {
                                ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                Description = k + " - " + _lorem.Substring(0, level0Layout is StackLayout ? rnd.Next(200, 650) : level0Layout is UniformGridLayout ? 0 : rnd.Next(10, 30))
                                //Description = k.ToString()
                            }));
                        rootRepeater.ItemsSource = _flatData;
                        break;
                    case 1:
                        _oneLevelNestedData = new TestObservableCollection<RecipeGroup>(Enumerable.Range(0, 10).Select(j =>
                            new RecipeGroup(
                                Enumerable.Range(0, rnd.Next(5, 16)).Select(k =>
                                         new Recipe
                                         {
                                             ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                             Description = string.Format("{0}.{1} - {2}", j, k, _lorem.Substring(0, level1Layout is StackLayout ? rnd.Next(200, 650) : level1Layout is UniformGridLayout ? 0 : rnd.Next(10, 30)))
                                         }))
                            {
                                Name = "Group #" + j
                            }));
                        rootRepeater.ItemsSource = _oneLevelNestedData;
                        break;
                    case 2:
                        _twoLevelNestedData = new TestObservableCollection<Year>(Enumerable.Range(0, 3).Select(i => new Year(
                            new TestObservableCollection<RecipeGroup>(Enumerable.Range(0, rnd.Next(2, 5)).Select(j => new RecipeGroup(
                                Enumerable.Range(0, rnd.Next(5, 16)).Select(k =>
                                         new Recipe
                                         {
                                             ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                                             Description = string.Format("{0}.{1}.{2} - {3}", 2016 - i, j, k, _lorem.Substring(0, level2Layout is StackLayout ? rnd.Next(200, 650) : level2Layout is UniformGridLayout ? 0 : rnd.Next(10, 30)))
                                         }))
                            {
                                Name = "Group #" + j
                            })))
                        {
                            Value = 2016 - i
                        }));
                        rootRepeater.ItemsSource = _twoLevelNestedData;
                        break;
                }
            }
        }

void OnRecipeDeleted | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 255 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_flatData != null)
            {
                // walk up the tree to find the container and repeater.
                var container = (FrameworkElement)sender;
                while (!(container.Parent is ItemsRepeater))
                {
                    container = (FrameworkElement)container.Parent;
                }

                ItemsRepeater repeater = (ItemsRepeater)container.Parent;
                int index = repeater.GetElementIndex(container);
                _flatData.RemoveAt(index);
            }
        }

void OnRecipeDeleted | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 259 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_flatData != null)
            {
                // walk up the tree to find the container and repeater.
                var container = (FrameworkElement)sender;
                while (!(container.Parent is ItemsRepeater))
                {
                    container = (FrameworkElement)container.Parent;
                }

                ItemsRepeater repeater = (ItemsRepeater)container.Parent;
                int index = repeater.GetElementIndex(container);
                _flatData.RemoveAt(index);
            }
        }

void OnRecipeInserted | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 272 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_flatData != null)
            {
                // walk up the tree to find the container and repeater.
                var container = (FrameworkElement)sender;
                while (!(container.Parent is ItemsRepeater))
                {
                    container = (FrameworkElement)container.Parent;
                }

                ItemsRepeater repeater = (ItemsRepeater)container.Parent;
                int index = repeater.GetElementIndex(container) + 1;
                _flatData.Insert(index, new Recipe()
                {
                    ImageUri = new Uri("ms-appx:///Images/recipe0.png"),
                    Description = "added recipe",
                });
            }
        }

void OnRecipeInserted | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 276 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_flatData != null)
            {
                // walk up the tree to find the container and repeater.
                var container = (FrameworkElement)sender;
                while (!(container.Parent is ItemsRepeater))
                {
                    container = (FrameworkElement)container.Parent;
                }

                ItemsRepeater repeater = (ItemsRepeater)container.Parent;
                int index = repeater.GetElementIndex(container) + 1;
                _flatData.Insert(index, new Recipe()
                {
                    ImageUri = new Uri("ms-appx:///Images/recipe0.png"),
                    Description = "added recipe",
                });
            }
        }

void OnRendering | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 222 of file ItemsViewWithDataPage.xaml.cs.

        {
            //Logger.WriteLine("----------------------- on rendering ----------------------");
        }

void OnRendering | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 226 of file ItemsViewWithDataPage.xaml.cs.

        {
            //Logger.WriteLine("----------------------- on rendering ----------------------");
        }

void OnResizeMeButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 129 of file ItemsViewWithDataPage.xaml.cs.

        {
            var button = (Button)sender;
            button.Height = 5000 - button.Height;
        }

void OnResizeMeButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 125 of file ItemsViewWithDataPage.xaml.cs.

        {
            var button = (Button)sender;
            button.Height = 5000 - button.Height;
        }

void OnRowSpacingSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetMinRowSpacing(_pageInfo.Level0Layout, rowSpacingSlider.Value); ;
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetMinRowSpacing(_pageInfo.Level1Layout, rowSpacingSlider.Value);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetMinRowSpacing(_pageInfo.Level2Layout, rowSpacingSlider.Value);
            }
        }

void OnRowSpacingSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 136 of file ItemsViewWithDataPage.xaml.cs.

        {
            if (_pageInfo.Level0Layout != null)
            {
                LayoutHelper.SetMinRowSpacing(_pageInfo.Level0Layout, rowSpacingSlider.Value); ;
            }

            if (_pageInfo.Level1Layout != null)
            {
                LayoutHelper.SetMinRowSpacing(_pageInfo.Level1Layout, rowSpacingSlider.Value);
            }

            if (_pageInfo.Level2Layout != null)
            {
                LayoutHelper.SetMinRowSpacing(_pageInfo.Level2Layout, rowSpacingSlider.Value);
            }
        }

void OnScrollButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 227 of file ItemsViewWithDataPage.xaml.cs.

        {
            var indexPath = scrollIndex.Text.Split('.').Select(i => int.Parse(i)).ToArray();
            var repeater = rootRepeater;

            for (int i = 0; i < indexPath.Length; ++i)
            {
                var container = repeater.GetOrCreateElement(indexPath[i]);

                if (i < indexPath.Length - 1)
                {
                    repeater = container.FindElementOfTypeInSubtree<ItemsRepeater>();
                }
                else
                {
                    container.StartBringIntoView(new BringIntoViewOptions()
                    {
                        HorizontalAlignmentRatio = 0.5,
                        VerticalAlignmentRatio = maintainViewportSlider.Value,
                        HorizontalOffset = 0.0,
                        VerticalOffset = scrollOffset.Value,
                        AnimationDesired = scrollAnimate.IsChecked.GetValueOrDefault()
                    });
                }
            }

        }

void OnScrollButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 231 of file ItemsViewWithDataPage.xaml.cs.

        {
            var indexPath = scrollIndex.Text.Split('.').Select(i => int.Parse(i)).ToArray();
            var repeater = rootRepeater;

            for (int i = 0; i < indexPath.Length; ++i)
            {
                var container = repeater.GetOrCreateElement(indexPath[i]);

                if (i < indexPath.Length - 1)
                {
                    repeater = container.FindVisualChildByType<ItemsRepeater>();
                }
                else
                {
                    container.StartBringIntoView(new BringIntoViewOptions()
                    {
                        HorizontalAlignmentRatio = 0.5,
                        VerticalAlignmentRatio = maintainViewportSlider.Value,
                        HorizontalOffset = 0.0,
                        VerticalOffset = scrollOffset.Value,
                        AnimationDesired = scrollAnimate.IsChecked.GetValueOrDefault()
                    });
                }
            }

        }

Member Data Documentation

ObservableCollection<Recipe> _flatData [private]

Definition at line 26 of file ItemsViewWithDataPage.xaml.cs.

TestObservableCollection<Recipe> _flatData [private]

Definition at line 22 of file ItemsViewWithDataPage.xaml.cs.

string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus." [private]

Definition at line 24 of file ItemsViewWithDataPage.xaml.cs.

TestObservableCollection<RecipeGroup> _oneLevelNestedData [private]

Definition at line 23 of file ItemsViewWithDataPage.xaml.cs.

ObservableCollection<RecipeGroup> _oneLevelNestedData [private]

Definition at line 27 of file ItemsViewWithDataPage.xaml.cs.

PageInfo _pageInfo [private]

Definition at line 29 of file ItemsViewWithDataPage.xaml.cs.

TestObservableCollection<Year> _twoLevelNestedData [private]

Definition at line 24 of file ItemsViewWithDataPage.xaml.cs.

ObservableCollection<Year> _twoLevelNestedData [private]

Definition at line 28 of file ItemsViewWithDataPage.xaml.cs.

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/ItemsViewWithDataPage.xaml.cs
  • Repeater/TestUI/Samples/NestedLayoutSamples/ItemsViewWithDataPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemTemplateDemo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ItemTemplateDemo
Public Member Functions | Public Attributes | Properties | Private Member Functions

ItemTemplateDemo Class Reference

List of all members.

Public Member Functions

ItemTemplateDemo ()

Public Attributes

List< MyData > | Numbers = new List<MyData>()

Properties

List< int > | Data [get, set]

Private Member Functions

void | ChkSample_CheckedChanged (object sender, RoutedEventArgs e)
void | ItemsRepeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | OnSelectTemplateKey (RecyclingElementFactory sender, SelectTemplateEventArgs args)

Detailed Description

Definition at line 12 of file ItemTemplateDemo.xaml.cs.

Constructor & Destructor Documentation

ItemTemplateDemo ( ) [inline]

Definition at line 17 of file ItemTemplateDemo.xaml.cs.

        {
            Data = Enumerable.Range(0, 1000).ToList();

            for(int i=0;i<10;i++)
            {
                Numbers.Add(new MyData(i));
            }

            this.InitializeComponent();
        }

Member Function Documentation

void ChkSample_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file ItemTemplateDemo.xaml.cs.

        {
            if (sender == chkSample0)
            {
                itemsRepeaterScrollHost0.Visibility = (bool)chkSample0.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample1)
            {
                itemsRepeaterScrollHost1.Visibility = (bool)chkSample1.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample2)
            {
                itemsRepeaterScrollHost2.Visibility = (bool)chkSample2.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample3)
            {
                itemsRepeaterScrollHost3.Visibility = (bool)chkSample3.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample4)
            {
                itemsRepeaterScrollHost4.Visibility = (bool)chkSample4.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample5)
            {
                itemsRepeater5.Visibility = (bool)chkSample5.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample6)
            {
                itemsRepeater6.Visibility = (bool)chkSample6.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample7)
            {
                itemsRepeater7.Visibility = (bool)chkSample7.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample8)
            {
                myItemsRepeater8.Visibility = (bool)chkSample8.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample9)
            {
                itemsRepeater9.Visibility = (bool)chkSample9.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample10)
            {
                itemsRepeater10.Visibility = (bool)chkSample10.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample11)
            {
                listView11.Visibility = (bool)chkSample11.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
            else if (sender == chkSample12)
            {
                itemsRepeater12.Visibility = (bool)chkSample12.IsChecked ? Visibility.Visible : Visibility.Collapsed;
            }
        }

void ItemsRepeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 34 of file ItemTemplateDemo.xaml.cs.

        {
            Popup popup = args.Element as Popup;

            if (popup != null)
            {
                popup.IsOpen = true;
            }
        }

void OnSelectTemplateKey | ( | RecyclingElementFactory | sender,
 |  | SelectTemplateEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 29 of file ItemTemplateDemo.xaml.cs.

        {
            args.TemplateKey = (((int)args.DataContext) % 2 == 0) ? "even" : "odd";
        }

Member Data Documentation

List<MyData> Numbers = new List<MyData>()

Definition at line 15 of file ItemTemplateDemo.xaml.cs.

Property Documentation

List<int> Data [get, set]

Definition at line 14 of file ItemTemplateDemo.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemTemplateSamples/ItemTemplateDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: KeyboardNavigationSample Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • KeyboardNavigationSample
Public Member Functions | Private Member Functions

KeyboardNavigationSample Class Reference

List of all members.

Public Member Functions

KeyboardNavigationSample ()

Private Member Functions

~KeyboardNavigationSample ()
void | AppendLog (string log)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnResetItemsSource_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsSource_Click (object sender, RoutedEventArgs e)
void | CmbItemsRepeaterTabFocusNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewTabNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | HookItemsRepeaterEvents (ItemsRepeater itemsRepeater)
void | ItemsRepeater_ElementClearing (ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
void | ItemsRepeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | KeyboardNavigationSample_GotFocus (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 11 of file KeyboardNavigationSample.cs.

Constructor & Destructor Documentation

KeyboardNavigationSample ( ) [inline]

Definition at line 13 of file KeyboardNavigationSample.cs.

        {
            this.InitializeComponent();
            HookItemsRepeaterEvents(itemsRepeater);

            GotFocus += KeyboardNavigationSample_GotFocus;
        }

~KeyboardNavigationSample ( ) [inline, private]

Definition at line 21 of file KeyboardNavigationSample.cs.

        {
        }

Member Function Documentation

void AppendLog ( string log ) [inline, private]

Definition at line 79 of file KeyboardNavigationSample.cs.

        {
            lvLogs.Items.Add(log);
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 65 of file KeyboardNavigationSample.cs.

        {
            lvLogs.Items.Clear();
        }

void BtnResetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 60 of file KeyboardNavigationSample.cs.

        {
            itemsRepeater.ItemsSource = null;
        }

void BtnSetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file KeyboardNavigationSample.cs.

        {
            itemsRepeater.ItemsSource = Enumerable.Range(0, 20).Select(i => string.Format("Item #{0}", i));
        }

void CmbItemsRepeaterTabFocusNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 47 of file KeyboardNavigationSample.cs.

        {
            if (itemsRepeater != null && cmbItemsRepeaterTabFocusNavigation != null)
            {
                itemsRepeater.TabFocusNavigation = (KeyboardNavigationMode)cmbItemsRepeaterTabFocusNavigation.SelectedIndex;
            }
        }

void CmbScrollViewTabNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 39 of file KeyboardNavigationSample.cs.

        {
            if (scrollView != null && cmbScrollViewTabNavigation != null)
            {
                scrollView.TabNavigation = (KeyboardNavigationMode)cmbScrollViewTabNavigation.SelectedIndex;
            }
        }

void HookItemsRepeaterEvents ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 70 of file KeyboardNavigationSample.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
                itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
            }
        }

void ItemsRepeater_ElementClearing | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementClearingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 89 of file KeyboardNavigationSample.cs.

        {
            AppendLog($"ItemsRepeater.ElementClearing Element={args.Element}");
        }

void ItemsRepeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 84 of file KeyboardNavigationSample.cs.

        {
            AppendLog($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}");
        }

void KeyboardNavigationSample_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 25 of file KeyboardNavigationSample.cs.

        {
            FrameworkElement fe = e.OriginalSource as FrameworkElement;

            if (fe != null)
            {
                AppendLog($"KeyboardNavigationSample.GotFocus OriginalSource={e.OriginalSource}, Name={fe.Name}");
            }
            else
            {
                AppendLog($"KeyboardNavigationSample.GotFocus OriginalSource={e.OriginalSource}");
            }
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/KeyboardNavigationSample.cs
Generated on Sun Dec 1 2024 20:54:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutDemo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • LinedFlowLayoutDemo
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

LinedFlowLayoutDemo Class Reference

List of all members.

Public Member Functions

LinedFlowLayoutDemo ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~LinedFlowLayoutDemo ()
void | AddChild ()
void | AppendAsyncEventMessage ()
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendEventMessage (string eventMessage)
void | BtnAddChild_Click (object sender, RoutedEventArgs e)
void | BtnClearEvents_Click (object sender, RoutedEventArgs e)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnCopyEvents_Click (object sender, RoutedEventArgs e)
void | BtnGetChildrenCount_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementIsEnabled_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelElementWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelHorizontalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnGetLayoutPanelWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutActualLineHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutLineHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutLineSpacing_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutLogItemIndexDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutMinItemSpacing_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewExtentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewHorizontalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewVerticalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollViewZoomMode_Click (object sender, RoutedEventArgs e)
void | BtnInsertChild_Click (object sender, RoutedEventArgs e)
void | BtnLayoutInvalidateItemsInfo_Click (object sender, RoutedEventArgs e)
void | BtnLayoutInvalidateMeasure_Click (object sender, RoutedEventArgs e)
void | BtnLayoutPanelResetLayout_Click (object sender, RoutedEventArgs e)
void | BtnLayoutPanelSetLayout_Click (object sender, RoutedEventArgs e)
void | BtnLinedFlowLayoutLockItemToLine_Click (object sender, RoutedEventArgs e)
void | BtnLinedFlowLayoutUnlockItems_Click (object sender, RoutedEventArgs e)
void | BtnRemoveAllChildren_Click (object sender, RoutedEventArgs e)
void | BtnRemoveChild_Click (object sender, RoutedEventArgs e)
void | BtnReplaceChild_Click (object sender, RoutedEventArgs e)
void | BtnSetChildrenCount_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementIsEnabled_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelElementWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelHorizontalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelVerticalAlignment_Click (object sender, RoutedEventArgs e)
void | BtnSetLayoutPanelWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutLineHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutLineSpacing_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutLogItemIndexDbg_Click (object sender, RoutedEventArgs e)
void | BtnSetLinedFlowLayoutMinItemSpacing_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewHorizontalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewVerticalConstantVelocity_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewVerticalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollViewZoomMode_Click (object sender, RoutedEventArgs e)
void | ChkEvents_Checked (object sender, RoutedEventArgs e)
void | ChkEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLayoutPanel_Checked (object sender, RoutedEventArgs e)
void | ChkLayoutPanel_Unchecked (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayout_Checked (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayout_Unchecked (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayoutHandleItemsInfoRequested_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayoutShowLockedItems_Checked (object sender, RoutedEventArgs e)
void | ChkLinedFlowLayoutShowLockedItems_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogLinedFlowLayoutMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogLinedFlowLayoutMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollView_Checked (object sender, RoutedEventArgs e)
void | ChkScrollView_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollViewIsEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewIsEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollViewIsTabStop_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewIsTabStop_Unchecked (object sender, RoutedEventArgs e)
void | CmbLayoutPanelBackground_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLayoutPanelBorderBrush_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLinedFlowLayoutItemsJustification_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLinedFlowLayoutItemsStretch_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewBackground_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewBorderBrush_SelectionChanged (object sender, SelectionChangedEventArgs e)
UIElement | CreateChild (int id)
CornerRadius | GetCornerRadiusFromString (string cornerRadius)
UIElement | GetLayoutPanelElement ()
Thickness | GetThicknessFromString (string thickness)
void | HookLinedFlowLayoutEvents ()
void | HookScrollViewEvents ()
void | InsertChild (int newChildIndex)
void | LayoutsTestHooks_LinedFlowLayoutInvalidated (object sender, LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs args)
void | LayoutsTestHooks_LinedFlowLayoutItemLocked (object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
void | LayoutsTestHooks_LinedFlowLayoutItemLocked2 (object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
void | LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged (object sender, object args)
void | LinedFlowLayout_ItemsInfoRequested (LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
void | LinedFlowLayout_ItemsUnlocked (LinedFlowLayout sender, object args)
void | LinedFlowLayoutDemo_Loaded (object sender, RoutedEventArgs e)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | RemoveAllChildren ()
void | RemoveChild (int oldChildIndex)
void | ReplaceChild (int childIndex)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ViewChangedForLockedItemsVisuals (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompleted (ScrollView sender, ScrollingZoomCompletedEventArgs args)
void | UnhookScrollViewEvents ()
void | UpdateChildrenCount ()
void | UpdateLayoutPanelBackground ()
void | UpdateLayoutPanelBorderBrush ()
void | UpdateLayoutPanelBorderThickness ()
void | UpdateLayoutPanelCornerRadius ()
void | UpdateLayoutPanelElementActualHeight ()
void | UpdateLayoutPanelElementActualWidth ()
void | UpdateLayoutPanelElementCornerRadius ()
void | UpdateLayoutPanelElementHeight ()
void | UpdateLayoutPanelElementIsEnabled ()
void | UpdateLayoutPanelElementMaxHeight ()
void | UpdateLayoutPanelElementMaxWidth ()
void | UpdateLayoutPanelElementMinHeight ()
void | UpdateLayoutPanelElementMinWidth ()
void | UpdateLayoutPanelElementWidth ()
void | UpdateLayoutPanelHeight ()
void | UpdateLayoutPanelHorizontalAlignment ()
void | UpdateLayoutPanelMargin ()
void | UpdateLayoutPanelMaxHeight ()
void | UpdateLayoutPanelMaxWidth ()
void | UpdateLayoutPanelPadding ()
void | UpdateLayoutPanelVerticalAlignment ()
void | UpdateLayoutPanelWidth ()
void | UpdateLinedFlowLayoutActualLineHeight ()
void | UpdateLinedFlowLayoutAverageItemAspectRatioDbg ()
void | UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg ()
void | UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg ()
void | UpdateLinedFlowLayoutForcedWrapMultiplierDbg ()
void | UpdateLinedFlowLayoutFrozenItemIndexes ()
void | UpdateLinedFlowLayoutItemsJustification ()
void | UpdateLinedFlowLayoutItemsStretch ()
void | UpdateLinedFlowLayoutLineHeight ()
void | UpdateLinedFlowLayoutLineSpacing ()
void | UpdateLinedFlowLayoutLockedItemsVisuals ()
void | UpdateLinedFlowLayoutLogItemIndexDbg ()
void | UpdateLinedFlowLayoutMinItemSpacing ()
void | UpdateLinedFlowLayoutRealizedItemIndexes ()
void | UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg ()
void | UpdateScrollViewBackground ()
void | UpdateScrollViewBorderBrush ()
void | UpdateScrollViewBorderThickness ()
void | UpdateScrollViewContentOrientation ()
void | UpdateScrollViewCornerRadius ()
void | UpdateScrollViewExtentHeight ()
void | UpdateScrollViewExtentWidth ()
void | UpdateScrollViewHeight ()
void | UpdateScrollViewHorizontalAnchorRatio ()
void | UpdateScrollViewHorizontalOffset ()
void | UpdateScrollViewHorizontalScrollBarVisibility ()
void | UpdateScrollViewHorizontalScrollMode ()
void | UpdateScrollViewIsEnabled ()
void | UpdateScrollViewIsTabStop ()
void | UpdateScrollViewMargin ()
void | UpdateScrollViewMaxHeight ()
void | UpdateScrollViewMaxWidth ()
void | UpdateScrollViewPadding ()
void | UpdateScrollViewVerticalAnchorRatio ()
void | UpdateScrollViewVerticalOffset ()
void | UpdateScrollViewVerticalScrollBarVisibility ()
void | UpdateScrollViewVerticalScrollMode ()
void | UpdateScrollViewWidth ()
void | UpdateScrollViewZoomMode ()

Private Attributes

object | _asyncEventReportingLock = new object()
CornerRadius | _cornerRadiusFour = new CornerRadius(4)
SolidColorBrush | _grayBrush = new SolidColorBrush(Colors.Gray)
Layout | _layout = null
List< string > | _lstAsyncEventMessage = new List<string>()
List< int > | _lstLinedFlowLayoutLockedItemIndexes = new List<int>()
Thickness | _thicknessFour = new Thickness(4)
SolidColorBrush | _whiteBrush = new SolidColorBrush(Colors.White)

Detailed Description

Definition at line 18 of file LinedFlowLayoutDemo.cs.

Constructor & Destructor Documentation

LinedFlowLayoutDemo ( ) [inline]

Definition at line 29 of file LinedFlowLayoutDemo.cs.

        {
            this.InitializeComponent();

            if (chkLogScrollViewMessages.IsChecked == true || chkLogLinedFlowLayoutMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogLinedFlowLayoutMessages.IsChecked == true)
                {
                    LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
                    LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;
                    LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;

                    MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }

                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }

            HookLinedFlowLayoutEvents();

            if (chkLogScrollViewEvents.IsChecked == true)
            {
                HookScrollViewEvents();
            }

            this.Loaded += LinedFlowLayoutDemo_Loaded;
            LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked2;
        }

~LinedFlowLayoutDemo ( ) [inline, private]

Definition at line 63 of file LinedFlowLayoutDemo.cs.

        {
        }

Member Function Documentation

void AddChild ( ) [inline, private]

Definition at line 84 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Children.Add(CreateChild(layoutPanel.Children.Count));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 133 of file LinedFlowLayoutDemo.cs.

        {
            lock (_asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in _lstAsyncEventMessage)
                {
                    AppendEventMessage(asyncEventMessage);
                }
                _lstAsyncEventMessage.Clear();
            }
        }

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 100 of file LinedFlowLayoutDemo.cs.

        {
            lock (_asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    _lstAsyncEventMessage.Add(msgHead);
                }
                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 145 of file LinedFlowLayoutDemo.cs.

        {
            lstEvents.Items.Add(eventMessage);

            if ((bool)chkOutputDebugString.IsChecked)
            {
                System.Diagnostics.Debug.WriteLine(eventMessage);
            }
        }

void BtnAddChild_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 155 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage("AddChild");
            AddChild();
        }

void BtnClearEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file LinedFlowLayoutDemo.cs.

        {
            lstEvents.Items.Clear();
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 161 of file LinedFlowLayoutDemo.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnCopyEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 171 of file LinedFlowLayoutDemo.cs.

        {
            string logs = string.Empty;

            foreach (object log in lstEvents.Items)
            {
                logs += log.ToString() + "\n";
            }

            var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
            dataPackage.SetText(logs);
            Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
        }

void BtnGetChildrenCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 185 of file LinedFlowLayoutDemo.cs.

        {
            UpdateChildrenCount();
        }

void BtnGetLayoutPanelBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 190 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelBorderThickness();
        }

void BtnGetLayoutPanelCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 195 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelCornerRadius();
        }

void BtnGetLayoutPanelElementActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 200 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementActualHeight();
        }

void BtnGetLayoutPanelElementActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 205 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementActualWidth();
        }

void BtnGetLayoutPanelElementCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 210 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementCornerRadius();
        }

void BtnGetLayoutPanelElementHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 245 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementHeight();
        }

void BtnGetLayoutPanelElementIsEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 215 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementIsEnabled();
        }

void BtnGetLayoutPanelElementMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 240 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementMaxHeight();
        }

void BtnGetLayoutPanelElementMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 225 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementMaxWidth();
        }

void BtnGetLayoutPanelElementMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 235 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementMinHeight();
        }

void BtnGetLayoutPanelElementMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 220 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementMinWidth();
        }

void BtnGetLayoutPanelElementWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 230 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelElementWidth();
        }

void BtnGetLayoutPanelHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 250 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelHeight();
        }

void BtnGetLayoutPanelHorizontalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 280 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelHorizontalAlignment();
        }

void BtnGetLayoutPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 255 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelMargin();
        }

void BtnGetLayoutPanelMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 265 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelMaxHeight();
        }

void BtnGetLayoutPanelMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 270 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelMaxWidth();
        }

void BtnGetLayoutPanelPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 275 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelPadding();
        }

void BtnGetLayoutPanelVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 285 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelVerticalAlignment();
        }

void BtnGetLayoutPanelWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 260 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLayoutPanelWidth();
        }

void BtnGetLinedFlowLayoutActualLineHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 290 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutActualLineHeight();
        }

void BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 295 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
        }

void BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 300 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
        }

void BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 305 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
        }

void BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 310 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
        }

void BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 315 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutFrozenItemIndexes();
        }

void BtnGetLinedFlowLayoutLineHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 320 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutLineHeight();
        }

void BtnGetLinedFlowLayoutLineSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 325 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutLineSpacing();
        }

void BtnGetLinedFlowLayoutLogItemIndexDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 330 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutLogItemIndexDbg();
        }

void BtnGetLinedFlowLayoutMinItemSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 335 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutMinItemSpacing();
        }

void BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 340 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutRealizedItemIndexes();
        }

void BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 345 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
        }

void BtnGetScrollViewBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 350 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewBorderThickness();
        }

void BtnGetScrollViewContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 355 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewContentOrientation();
        }

void BtnGetScrollViewCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 360 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewCornerRadius();
        }

void BtnGetScrollViewExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 365 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewExtentHeight();
        }

void BtnGetScrollViewExtentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 370 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewExtentWidth();
        }

void BtnGetScrollViewHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 375 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewHeight();
        }

void BtnGetScrollViewHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 380 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewHorizontalAnchorRatio();
        }

void BtnGetScrollViewHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 385 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewHorizontalOffset();
        }

void BtnGetScrollViewHorizontalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 395 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewHorizontalScrollBarVisibility();
        }

void BtnGetScrollViewHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 390 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewHorizontalScrollMode();
        }

void BtnGetScrollViewMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 400 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewMargin();
        }

void BtnGetScrollViewMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 405 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewMaxHeight();
        }

void BtnGetScrollViewMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 410 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewMaxWidth();
        }

void BtnGetScrollViewPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 415 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewPadding();
        }

void BtnGetScrollViewVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1296 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewVerticalAnchorRatio();
        }

void BtnGetScrollViewVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1301 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewVerticalOffset();
        }

void BtnGetScrollViewVerticalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1306 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewVerticalScrollBarVisibility();
        }

void BtnGetScrollViewVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1311 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewVerticalScrollMode();
        }

void BtnGetScrollViewWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1291 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewWidth();
        }

void BtnGetScrollViewZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1316 of file LinedFlowLayoutDemo.cs.

        {
            UpdateScrollViewZoomMode();
        }

void BtnInsertChild_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 420 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (txtChildIndex != null)
                {
                    int newChildIndex = int.Parse(txtChildIndex.Text);

                    AppendAsyncEventMessage("InsertChild " + newChildIndex);
                    InsertChild(newChildIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLayoutInvalidateItemsInfo_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 472 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    linedFlowLayout.InvalidateItemsInfo();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLayoutInvalidateMeasure_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 488 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    LayoutsTestHooks.LayoutInvalidateMeasure(linedFlowLayout, relayout: true);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLayoutPanelResetLayout_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 439 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && layoutPanel.Layout != null)
                {
                    _layout = layoutPanel.Layout;
                    layoutPanel.Layout = null;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLayoutPanelSetLayout_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 456 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && layoutPanel.Layout == null)
                {
                    layoutPanel.Layout = _layout;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLinedFlowLayoutLockItemToLine_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 548 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    int itemIndex = int.Parse(txtLinedFlowLayoutItemIndex.Text);
                    int lineIndex = linedFlowLayout.LockItemToLine(itemIndex);

                    txtLinedFlowLayoutLockLine.Text = lineIndex.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnLinedFlowLayoutUnlockItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 567 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    LayoutsTestHooks.UnlockLinedFlowLayoutItems(linedFlowLayout);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnRemoveAllChildren_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 504 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage("RemoveAllChildren");
            RemoveAllChildren();
        }

void BtnRemoveChild_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 510 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (txtChildIndex != null)
                {
                    int oldChildIndex = int.Parse(txtChildIndex.Text);

                    AppendAsyncEventMessage("RemoveChild " + oldChildIndex);
                    RemoveChild(oldChildIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnReplaceChild_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 529 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (txtChildIndex != null)
                {
                    int childIndex = int.Parse(txtChildIndex.Text);

                    AppendAsyncEventMessage("ReplaceChild " + childIndex);
                    ReplaceChild(childIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetChildrenCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 583 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtChildrenCount != null)
                {
                    int newChildrenCount = int.Parse(txtChildrenCount.Text);

                    if (layoutPanel.Children.Count < newChildrenCount)
                    {
                        int addCount = newChildrenCount - layoutPanel.Children.Count;

                        for (int childIndex = 0; childIndex < addCount; childIndex++)
                        {
                            layoutPanel.Children.Add(CreateChild(layoutPanel.Children.Count));
                        }
                    }
                    else
                    {
                        while (layoutPanel.Children.Count > newChildrenCount)
                        {
                            layoutPanel.Children.RemoveAt(layoutPanel.Children.Count - 1);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 616 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.BorderThickness = GetThicknessFromString(txtLayoutPanelBorderThickness.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 832 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.CornerRadius = GetCornerRadiusFromString(txtLayoutPanelCornerRadius.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 632 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is Grid grid)
                    {
                        grid.CornerRadius = GetCornerRadiusFromString(txtLayoutPanelElementCornerRadius.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 779 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.Height = double.Parse(txtLayoutPanelElementHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementIsEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 653 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is Control control)
                    {
                        control.IsEnabled = (bool)chkLayoutPanelElementIsEnabled.IsChecked;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 758 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MaxHeight = double.Parse(txtLayoutPanelElementMaxHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 695 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MaxWidth = double.Parse(txtLayoutPanelElementMaxWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 737 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MinHeight = double.Parse(txtLayoutPanelElementMinHeight.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 674 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.MinWidth = double.Parse(txtLayoutPanelElementMinWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelElementWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 716 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        frameworkElement.Width = double.Parse(txtLayoutPanelElementWidth.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 848 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Height = Convert.ToDouble(txtLayoutPanelHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelHorizontalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 800 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.HorizontalAlignment = (HorizontalAlignment)cmbLayoutPanelHorizontalAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 864 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Margin = GetThicknessFromString(txtLayoutPanelMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 880 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.MaxHeight = Convert.ToDouble(txtLayoutPanelMaxHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 912 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.MaxWidth = Convert.ToDouble(txtLayoutPanelMaxWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 928 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Padding = GetThicknessFromString(txtLayoutPanelPadding.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelVerticalAlignment_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 816 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.VerticalAlignment = (VerticalAlignment)cmbLayoutPanelVerticalAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLayoutPanelWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 896 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Width = Convert.ToDouble(txtLayoutPanelWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 944 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemAspectRatio(linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 960 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemsPerLineDivider(linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 976 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutForcedWrapMultiplier(linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedWrapMultiplierDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutLineHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 992 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    linedFlowLayout.LineHeight = Convert.ToDouble(txtLinedFlowLayoutLineHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutLineSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1008 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    linedFlowLayout.LineSpacing = Convert.ToDouble(txtLinedFlowLayoutLineSpacing.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutLogItemIndexDbg_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1024 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutLogItemIndex(linedFlowLayout, Convert.ToInt32(txtLinedFlowLayoutLogItemIndexDbg.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetLinedFlowLayoutMinItemSpacing_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1040 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    linedFlowLayout.MinItemSpacing = Convert.ToDouble(txtLinedFlowLayoutMinItemSpacing.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1056 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.BorderThickness = GetThicknessFromString(txtScrollViewBorderThickness.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1072 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    ScrollingContentOrientation co = (ScrollingContentOrientation)cmbScrollViewContentOrientation.SelectedIndex;

                    scrollView.ContentOrientation = co;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1090 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.CornerRadius = GetCornerRadiusFromString(txtScrollViewCornerRadius.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1106 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.Height = Convert.ToDouble(txtScrollViewHeight.Text);

                    if (canvasLinedFlowLayoutLockedItems != null)
                    {
                        canvasLinedFlowLayoutLockedItems.Height = scrollView.Height;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1143 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.HorizontalAnchorRatio = Convert.ToDouble(txtScrollViewHorizontalAnchorRatio.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1159 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.ScrollTo(Convert.ToDouble(txtScrollViewHorizontalOffset.Text), scrollView.VerticalOffset);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewHorizontalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1175 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.HorizontalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbScrollViewHorizontalScrollBarVisibility.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1191 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    ScrollingScrollMode ssm = (ScrollingScrollMode)cmbScrollViewHorizontalScrollMode.SelectedIndex;

                    scrollView.HorizontalScrollMode = ssm;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1209 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.Margin = GetThicknessFromString(txtScrollViewMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1225 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.MaxHeight = Convert.ToDouble(txtScrollViewMaxHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1241 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.MaxWidth = Convert.ToDouble(txtScrollViewMaxWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1257 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.Padding = GetThicknessFromString(txtScrollViewPadding.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1321 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.VerticalAnchorRatio = Convert.ToDouble(txtScrollViewVerticalAnchorRatio.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewVerticalConstantVelocity_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1337 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    float verticalConstantVelocity = float.Parse(this.txtScrollViewVerticalConstantVelocity.Text);

                    if (verticalConstantVelocity == 0.0f)
                    {
                        scrollView.ScrollBy(0, 0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                    }
                    else
                    {
                        scrollView.AddScrollVelocity(new System.Numerics.Vector2(0.0f, verticalConstantVelocity), new System.Numerics.Vector2(0.0f, 0.0f));
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1362 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.ScrollTo(scrollView.HorizontalOffset, Convert.ToDouble(txtScrollViewVerticalOffset.Text));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewVerticalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1378 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.VerticalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbScrollViewVerticalScrollBarVisibility.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1394 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    ScrollingScrollMode ssm = (ScrollingScrollMode)cmbScrollViewVerticalScrollMode.SelectedIndex;

                    scrollView.VerticalScrollMode = ssm;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1127 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.Width = Convert.ToDouble(txtScrollViewWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetScrollViewZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1273 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    ScrollingZoomMode szm = (ScrollingZoomMode)cmbScrollViewZoomMode.SelectedIndex;

                    scrollView.ZoomMode = szm;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1412 of file LinedFlowLayoutDemo.cs.

        {
            if (grdEvents != null)
            {
                grdEvents.Visibility = Visibility.Visible;
                cdEvents.Width = new GridLength(1, GridUnitType.Star);
            }
        }

void ChkEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1421 of file LinedFlowLayoutDemo.cs.

        {
            if (grdEvents != null)
            {
                grdEvents.Visibility = Visibility.Collapsed;
                cdEvents.Width = new GridLength(0);
            }
        }

void ChkLayoutPanel_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1430 of file LinedFlowLayoutDemo.cs.

        {
            if (svLayoutPanel != null)
                svLayoutPanel.Visibility = Visibility.Visible;
        }

void ChkLayoutPanel_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1436 of file LinedFlowLayoutDemo.cs.

        {
            if (svLayoutPanel != null)
                svLayoutPanel.Visibility = Visibility.Collapsed;
        }

void ChkLinedFlowLayout_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1560 of file LinedFlowLayoutDemo.cs.

        {
            if (svLinedFlowLayout != null)
                svLinedFlowLayout.Visibility = Visibility.Visible;
        }

void ChkLinedFlowLayout_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1566 of file LinedFlowLayoutDemo.cs.

        {
            if (svLinedFlowLayout != null)
                svLinedFlowLayout.Visibility = Visibility.Collapsed;
        }

void ChkLinedFlowLayoutHandleItemsInfoRequested_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1572 of file LinedFlowLayoutDemo.cs.

        {
            BtnLayoutInvalidateItemsInfo_Click(null, null);
        }

void ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1577 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null)
                {
                    LayoutsTestHooks.SetLinedFlowLayoutIsFastPathSupported(linedFlowLayout, (bool)chkLinedFlowLayoutIsFastPathSupportedDbg.IsChecked);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkLinedFlowLayoutShowLockedItems_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1593 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutLockedItemsVisuals();

            if (scrollView != null)
            {
                scrollView.ViewChanged += ScrollView_ViewChangedForLockedItemsVisuals;
            }
        }

void ChkLinedFlowLayoutShowLockedItems_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1603 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutLockedItemsVisuals();

            if (scrollView != null)
            {
                scrollView.ViewChanged -= ScrollView_ViewChangedForLockedItemsVisuals;
            }
        }

void ChkLogLinedFlowLayoutMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1442 of file LinedFlowLayoutDemo.cs.

        {
            LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
            LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;
            LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;

            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
            }
        }

void ChkLogLinedFlowLayoutMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1455 of file LinedFlowLayoutDemo.cs.

        {
            LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
            LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;
            LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;

            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false)
            {
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
            }
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1486 of file LinedFlowLayoutDemo.cs.

        {
            HookScrollViewEvents();
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1491 of file LinedFlowLayoutDemo.cs.

        {
            UnhookScrollViewEvents();
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1468 of file LinedFlowLayoutDemo.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogLinedFlowLayoutMessages.IsChecked == false)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
            }
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1477 of file LinedFlowLayoutDemo.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogLinedFlowLayoutMessages.IsChecked == false)
            {
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
            }
        }

void ChkScrollView_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1613 of file LinedFlowLayoutDemo.cs.

        {
            if (svScrollView != null)
                svScrollView.Visibility = Visibility.Visible;
        }

void ChkScrollView_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1619 of file LinedFlowLayoutDemo.cs.

        {
            if (svScrollView != null)
                svScrollView.Visibility = Visibility.Collapsed;
        }

void ChkScrollViewIsEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1496 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.IsEnabled = true;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkScrollViewIsEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1512 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.IsEnabled = false;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkScrollViewIsTabStop_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1528 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.IsTabStop = true;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkScrollViewIsTabStop_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1544 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    scrollView.IsTabStop = false;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLayoutPanelBackground_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1625 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    switch (cmbLayoutPanelBackground.SelectedIndex)
                    {
                        case 0:
                            layoutPanel.Background = null;
                            break;
                        case 1:
                            layoutPanel.Background = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            layoutPanel.Background = new SolidColorBrush(Colors.AliceBlue);
                            break;
                        case 3:
                            layoutPanel.Background = new SolidColorBrush(Colors.Aqua);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLayoutPanelBorderBrush_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1655 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    switch (cmbLayoutPanelBorderBrush.SelectedIndex)
                    {
                        case 0:
                            layoutPanel.BorderBrush = null;
                            break;
                        case 1:
                            layoutPanel.BorderBrush = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            layoutPanel.BorderBrush = new SolidColorBrush(Colors.Blue);
                            break;
                        case 3:
                            layoutPanel.BorderBrush = new SolidColorBrush(Colors.Green);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLinedFlowLayoutItemsJustification_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1685 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null && cmbLinedFlowLayoutItemsJustification != null && linedFlowLayout.ItemsJustification != (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex)
                {
                    linedFlowLayout.ItemsJustification = (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLinedFlowLayoutItemsStretch_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1701 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (linedFlowLayout != null && cmbLinedFlowLayoutItemsStretch != null && linedFlowLayout.ItemsStretch != (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex)
                {
                    linedFlowLayout.ItemsStretch = (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewBackground_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1717 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    switch (cmbScrollViewBackground.SelectedIndex)
                    {
                        case 0:
                            scrollView.Background = null;
                            break;
                        case 1:
                            scrollView.Background = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            scrollView.Background = new SolidColorBrush(Colors.AliceBlue);
                            break;
                        case 3:
                            scrollView.Background = new SolidColorBrush(Colors.Aqua);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbScrollViewBorderBrush_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1747 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    switch (cmbScrollViewBorderBrush.SelectedIndex)
                    {
                        case 0:
                            scrollView.BorderBrush = null;
                            break;
                        case 1:
                            scrollView.BorderBrush = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            scrollView.BorderBrush = new SolidColorBrush(Colors.Blue);
                            break;
                        case 3:
                            scrollView.BorderBrush = new SolidColorBrush(Colors.Green);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

UIElement CreateChild ( int id ) [inline, private]

Definition at line 1777 of file LinedFlowLayoutDemo.cs.

        {
            FrameworkElement child;

            if (cmbLayoutPanelElementType.SelectedIndex != 2)
            {
                Uri uri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", id % 126 + 1));

                BitmapImage bitmapImage = new BitmapImage()
                {
                    DecodePixelHeight = 120,
                    UriSource = uri
                };

                Image image = new Image()
                {
                    Source = bitmapImage,
                    Stretch = Stretch.UniformToFill,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment = VerticalAlignment.Center
                };

                TextBlock textBlock = new TextBlock()
                {
                    Text = id.ToString(),
                    Margin = _thicknessFour,
                    Foreground = _whiteBrush,
                    FontSize = 14.0,
                    MinWidth = 36.0,
                    MaxWidth = 72.0,
                    MaxHeight = 48.0
                };

                Grid gridTB = new Grid()
                {
                    Background = _grayBrush,
                    CornerRadius = _cornerRadiusFour,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment = VerticalAlignment.Bottom
                };

                gridTB.Children.Add(textBlock);

                Grid grid = new Grid()
                {
                    Background = _grayBrush,
                    CornerRadius = _cornerRadiusFour
                };

                grid.Children.Add(image);
                grid.Children.Add(gridTB);

                if (cmbLayoutPanelElementType.SelectedIndex == 0)
                {
                    child = grid;
                }
                else
                {
                    ItemContainer itemContainer = new ItemContainer()
                    {
                        Child = grid
                    };

                    child = itemContainer;
                }
            }
            else
            {
                child = new Border()
                {
                    BorderBrush = _grayBrush,
                    BorderThickness = _thicknessFour,
                    CornerRadius = _cornerRadiusFour,
                    MinWidth = 48.0,
                    MinHeight = 48.0
                };
            }

            if (chkSetLayoutPanelElementMinWidth.IsChecked == true)
            {
                child.MinWidth = double.Parse(txtLayoutPanelElementMinWidthAll.Text);
            }

            if (chkSetLayoutPanelElementMaxWidth.IsChecked == true)
            {
                child.MaxWidth = double.Parse(txtLayoutPanelElementMaxWidthAll.Text);
            }

            return child;
        }

CornerRadius GetCornerRadiusFromString ( string cornerRadius ) [inline, private]

Definition at line 1868 of file LinedFlowLayoutDemo.cs.

        {
            string[] lengths = cornerRadius.Split(',');
            if (lengths.Length < 4)
                return new CornerRadius(
                    Convert.ToDouble(lengths[0]));
            else
                return new CornerRadius(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

UIElement GetLayoutPanelElement ( ) [inline, private]

Definition at line 1879 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    int index = int.Parse(txtLayoutPanelElementIndex.Text);

                    return layoutPanel.Children[index];
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }

            return null;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 1899 of file LinedFlowLayoutDemo.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void HookLinedFlowLayoutEvents ( ) [inline, private]

Definition at line 1910 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
                linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlocked;
            }
        }

void HookScrollViewEvents ( ) [inline, private]

Definition at line 1919 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null)
            {
                scrollView.SizeChanged += ScrollView_SizeChanged;
                scrollView.ExtentChanged += ScrollView_ExtentChanged;
                scrollView.StateChanged += ScrollView_StateChanged;
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
            }
        }

void InsertChild ( int newChildIndex ) [inline, private]

Definition at line 1934 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Children.Insert(newChildIndex, CreateChild(layoutPanel.Children.Count));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void LayoutsTestHooks_LinedFlowLayoutInvalidated | ( | object | sender,
 |  | LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1950 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout invalidated. InvalidationTrigger: " + args.InvalidationTrigger.ToString());
        }

void LayoutsTestHooks_LinedFlowLayoutItemLocked | ( | object | sender,
 |  | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1955 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout item locked. ItemIndex: " + args.ItemIndex + ", LineIndex: " + args.LineIndex.ToString());
        }

void LayoutsTestHooks_LinedFlowLayoutItemLocked2 | ( | object | sender,
 |  | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1960 of file LinedFlowLayoutDemo.cs.

        {
            if (!_lstLinedFlowLayoutLockedItemIndexes.Contains(args.ItemIndex))
            {
                _lstLinedFlowLayoutLockedItemIndexes.Add(args.ItemIndex);
                UpdateLinedFlowLayoutLockedItemsVisuals();
            }
        }

void LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 1969 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage("LinedFlowLayout snapped average items per line changed. SnappedAverageItemsPerLine: " + LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(sender as LinedFlowLayout).ToString() + ", AverageItemAspectRatio: " + LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(sender as LinedFlowLayout).ToString());
        }

void LinedFlowLayout_ItemsInfoRequested | ( | LinedFlowLayout | sender,
 |  | LinedFlowLayoutItemsInfoRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2054 of file LinedFlowLayoutDemo.cs.

        {
            if (chkLogLinedFlowLayoutEvents.IsChecked == true)
            {
                AppendAsyncEventMessage($"LinedFlowLayout.ItemsInfoRequested ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
            }

            if (!(bool)chkLinedFlowLayoutHandleItemsInfoRequested.IsChecked)
            {
                return;
            }

            int arrayLength = args.ItemsRangeRequestedLength;
            double[] desiredAspectRatios = new double[arrayLength];

            if (chkSetLayoutPanelElementMinWidth.IsChecked == true)
            {
                args.MinWidth = double.Parse(txtLayoutPanelElementMinWidthAll.Text);
            }
            else
            {
                args.MinWidth = 48.0;
            }

            if (chkSetLayoutPanelElementMaxWidth.IsChecked == true)
            {
                args.MaxWidth = double.Parse(txtLayoutPanelElementMaxWidthAll.Text);
            }

            for (int index = 0; index < arrayLength; index++)
            {
                desiredAspectRatios[index] = Recipe.GetKnownAspectRatioFromIndex(index + 1);
            }

            args.SetDesiredAspectRatios(desiredAspectRatios);
        }

void LinedFlowLayout_ItemsUnlocked | ( | LinedFlowLayout | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2091 of file LinedFlowLayoutDemo.cs.

        {
            if (chkLogLinedFlowLayoutEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("LinedFlowLayout.ItemsUnlocked");
            }

            _lstLinedFlowLayoutLockedItemIndexes.Clear();
            UpdateLinedFlowLayoutLockedItemsVisuals();
        }

void LinedFlowLayoutDemo_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2102 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                UpdateScrollViewBackground();
                UpdateScrollViewBorderBrush();
                UpdateScrollViewBorderThickness();
                UpdateScrollViewMargin();
                UpdateScrollViewPadding();
                UpdateScrollViewWidth();
                UpdateScrollViewHeight();
                UpdateScrollViewMaxWidth();
                UpdateScrollViewMaxHeight();
                UpdateScrollViewCornerRadius();
                UpdateScrollViewIsEnabled();
                UpdateScrollViewIsTabStop();
                UpdateScrollViewContentOrientation();
                UpdateScrollViewHorizontalScrollMode();
                UpdateScrollViewVerticalScrollMode();
                UpdateScrollViewZoomMode();
                UpdateScrollViewHorizontalScrollBarVisibility();
                UpdateScrollViewVerticalScrollBarVisibility();
                UpdateScrollViewHorizontalAnchorRatio();
                UpdateScrollViewVerticalAnchorRatio();
                UpdateScrollViewHorizontalOffset();
                UpdateScrollViewVerticalOffset();
                UpdateScrollViewExtentWidth();
                UpdateScrollViewExtentHeight();

                UpdateLayoutPanelBackground();
                UpdateLayoutPanelBorderBrush();
                UpdateLayoutPanelBorderThickness();
                UpdateLayoutPanelHorizontalAlignment();
                UpdateLayoutPanelVerticalAlignment();
                UpdateLayoutPanelMargin();
                UpdateLayoutPanelPadding();
                UpdateLayoutPanelWidth();
                UpdateLayoutPanelHeight();
                UpdateLayoutPanelMaxWidth();
                UpdateLayoutPanelMaxHeight();
                UpdateLayoutPanelCornerRadius();

                UpdateLinedFlowLayoutActualLineHeight();
                UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
                UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
                UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
                UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
                UpdateLinedFlowLayoutFrozenItemIndexes();
                UpdateLinedFlowLayoutLineHeight();
                UpdateLinedFlowLayoutLineSpacing();
                UpdateLinedFlowLayoutItemsJustification();
                UpdateLinedFlowLayoutItemsStretch();
                UpdateLinedFlowLayoutMinItemSpacing();
                UpdateLinedFlowLayoutRealizedItemIndexes();
                UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1974 of file LinedFlowLayoutDemo.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 67 of file LinedFlowLayoutDemo.cs.

        {
            LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked2;
            LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
            LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;
            LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;

            MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            UnhookScrollViewEvents();

            base.OnNavigatedFrom(e);
        }

void RemoveAllChildren ( ) [inline, private]

Definition at line 2006 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Children.Clear();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void RemoveChild ( int oldChildIndex ) [inline, private]

Definition at line 2022 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Children.RemoveAt(oldChildIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ReplaceChild ( int childIndex ) [inline, private]

Definition at line 2038 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null)
                {
                    layoutPanel.Children[childIndex] = CreateChild(childIndex);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2170 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2190 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2200 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2165 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2175 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2180 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ViewChangedForLockedItemsVisuals | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2185 of file LinedFlowLayoutDemo.cs.

        {
            UpdateLinedFlowLayoutLockedItemsVisuals();
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2195 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollView_ZoomCompleted | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2205 of file LinedFlowLayoutDemo.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

void UnhookScrollViewEvents ( ) [inline, private]

Definition at line 2210 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null)
            {
                scrollView.SizeChanged -= ScrollView_SizeChanged;
                scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                scrollView.StateChanged -= ScrollView_StateChanged;
                scrollView.ViewChanged -= ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
            }
        }

void UpdateChildrenCount ( ) [inline, private]

Definition at line 2225 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtChildrenCount != null)
            {
                txtChildrenCount.Text = layoutPanel.Children.Count.ToString();
            }
        }

void UpdateLayoutPanelBackground ( ) [inline, private]

Definition at line 2233 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && cmbLayoutPanelBackground != null)
            {
                SolidColorBrush bg = layoutPanel.Background as SolidColorBrush;

                if (bg == null)
                {
                    cmbLayoutPanelBackground.SelectedIndex = 0;
                }
                else if (bg.Color == Colors.Transparent)
                {
                    cmbLayoutPanelBackground.SelectedIndex = 1;
                }
                else if (bg.Color == Colors.AliceBlue)
                {
                    cmbLayoutPanelBackground.SelectedIndex = 2;
                }
                else if (bg.Color == Colors.Aqua)
                {
                    cmbLayoutPanelBackground.SelectedIndex = 3;
                }
                else
                {
                    cmbLayoutPanelBackground.SelectedIndex = -1;
                }
            }
        }

void UpdateLayoutPanelBorderBrush ( ) [inline, private]

Definition at line 2262 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && cmbLayoutPanelBorderBrush != null)
            {
                SolidColorBrush bb = layoutPanel.BorderBrush as SolidColorBrush;

                if (bb == null)
                {
                    cmbLayoutPanelBorderBrush.SelectedIndex = 0;
                }
                else if (bb.Color == Colors.Transparent)
                {
                    cmbLayoutPanelBorderBrush.SelectedIndex = 1;
                }
                else if (bb.Color == Colors.Blue)
                {
                    cmbLayoutPanelBorderBrush.SelectedIndex = 2;
                }
                else if (bb.Color == Colors.Green)
                {
                    cmbLayoutPanelBorderBrush.SelectedIndex = 3;
                }
                else
                {
                    cmbLayoutPanelBorderBrush.SelectedIndex = -1;
                }
            }
        }

void UpdateLayoutPanelBorderThickness ( ) [inline, private]

Definition at line 2291 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelBorderThickness != null)
            {
                txtLayoutPanelBorderThickness.Text = layoutPanel.BorderThickness.ToString();
            }
        }

void UpdateLayoutPanelCornerRadius ( ) [inline, private]

Definition at line 2299 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelCornerRadius != null)
            {
                txtLayoutPanelCornerRadius.Text = layoutPanel.CornerRadius.ToString();
            }
        }

void UpdateLayoutPanelElementActualHeight ( ) [inline, private]

Definition at line 2307 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementActualHeight != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementActualHeight.Text = frameworkElement.ActualHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementActualWidth ( ) [inline, private]

Definition at line 2328 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementActualWidth != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementActualWidth.Text = frameworkElement.ActualWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementCornerRadius ( ) [inline, private]

Definition at line 2349 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementCornerRadius != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is Grid grid)
                    {
                        txtLayoutPanelElementCornerRadius.Text = grid.CornerRadius.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementHeight ( ) [inline, private]

Definition at line 2433 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementHeight != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementHeight.Text = frameworkElement.Height.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementIsEnabled ( ) [inline, private]

Definition at line 2370 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && chkLayoutPanelElementIsEnabled != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is Control control)
                    {
                        chkLayoutPanelElementIsEnabled.IsChecked = control != null && control.IsEnabled;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementMaxHeight ( ) [inline, private]

Definition at line 2454 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementMaxHeight != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementMaxHeight.Text = frameworkElement.MaxHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementMaxWidth ( ) [inline, private]

Definition at line 2412 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementMaxWidth != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementMaxWidth.Text = frameworkElement.MaxWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementMinHeight ( ) [inline, private]

Definition at line 2475 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementMinHeight != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementMinHeight.Text = frameworkElement.MinHeight.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementMinWidth ( ) [inline, private]

Definition at line 2391 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementMinWidth != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementMinWidth.Text = frameworkElement.MinWidth.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelElementWidth ( ) [inline, private]

Definition at line 2496 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && txtLayoutPanelElementWidth != null)
                {
                    UIElement element = GetLayoutPanelElement();

                    if (element is FrameworkElement frameworkElement)
                    {
                        txtLayoutPanelElementWidth.Text = frameworkElement.Width.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelHeight ( ) [inline, private]

Definition at line 2517 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelHeight != null)
            {
                txtLayoutPanelHeight.Text = layoutPanel.Height.ToString();
            }
        }

void UpdateLayoutPanelHorizontalAlignment ( ) [inline, private]

Definition at line 2557 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && cmbLayoutPanelHorizontalAlignment != null)
                {
                    cmbLayoutPanelHorizontalAlignment.SelectedIndex = (int)layoutPanel.HorizontalAlignment;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelMargin ( ) [inline, private]

Definition at line 2525 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelMargin != null)
            {
                txtLayoutPanelMargin.Text = layoutPanel.Margin.ToString();
            }
        }

void UpdateLayoutPanelMaxHeight ( ) [inline, private]

Definition at line 2533 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelMaxHeight != null)
            {
                txtLayoutPanelMaxHeight.Text = layoutPanel.MaxHeight.ToString();
            }
        }

void UpdateLayoutPanelMaxWidth ( ) [inline, private]

Definition at line 2541 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelMaxWidth != null)
            {
                txtLayoutPanelMaxWidth.Text = layoutPanel.MaxWidth.ToString();
            }
        }

void UpdateLayoutPanelPadding ( ) [inline, private]

Definition at line 2549 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelPadding != null)
            {
                txtLayoutPanelPadding.Text = layoutPanel.Padding.ToString();
            }
        }

void UpdateLayoutPanelVerticalAlignment ( ) [inline, private]

Definition at line 2573 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (layoutPanel != null && cmbLayoutPanelVerticalAlignment != null)
                {
                    cmbLayoutPanelVerticalAlignment.SelectedIndex = (int)layoutPanel.VerticalAlignment;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateLayoutPanelWidth ( ) [inline, private]

Definition at line 2589 of file LinedFlowLayoutDemo.cs.

        {
            if (layoutPanel != null && txtLayoutPanelWidth != null)
            {
                txtLayoutPanelWidth.Text = layoutPanel.Width.ToString();
            }
        }

void UpdateLinedFlowLayoutActualLineHeight ( ) [inline, private]

Definition at line 2597 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutActualLineHeight.Text = linedFlowLayout.ActualLineHeight.ToString();
            }
        }

void UpdateLinedFlowLayoutAverageItemAspectRatioDbg ( ) [inline, private]

Definition at line 2605 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutAverageItemAspectRatioDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg ( ) [inline, private]

Definition at line 2613 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemAspectRatio(linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg ( ) [inline, private]

Definition at line 2621 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemsPerLineDivider(linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutForcedWrapMultiplierDbg ( ) [inline, private]

Definition at line 2629 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutForcedWrapMultiplierDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutForcedWrapMultiplier(linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutFrozenItemIndexes ( ) [inline, private]

Definition at line 2637 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutFirstFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutFirstFrozenItemIndex(linedFlowLayout).ToString();
                txtLinedFlowLayoutLastFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLastFrozenItemIndex(linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutItemsJustification ( ) [inline, private]

Definition at line 2713 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                cmbLinedFlowLayoutItemsJustification.SelectedIndex = (int)linedFlowLayout.ItemsJustification;
            }
        }

void UpdateLinedFlowLayoutItemsStretch ( ) [inline, private]

Definition at line 2721 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                cmbLinedFlowLayoutItemsStretch.SelectedIndex = (int)linedFlowLayout.ItemsStretch;
            }
        }

void UpdateLinedFlowLayoutLineHeight ( ) [inline, private]

Definition at line 2646 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutLineHeight.Text = linedFlowLayout.LineHeight.ToString();
            }
        }

void UpdateLinedFlowLayoutLineSpacing ( ) [inline, private]

Definition at line 2654 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutLineSpacing.Text = linedFlowLayout.LineSpacing.ToString();
            }
        }

void UpdateLinedFlowLayoutLockedItemsVisuals ( ) [inline, private]

Definition at line 2662 of file LinedFlowLayoutDemo.cs.

        {
            if (canvasLinedFlowLayoutLockedItems != null && layoutPanel != null)
            {
                bool showLockedItems = (bool)chkLinedFlowLayoutShowLockedItems.IsChecked;

                canvasLinedFlowLayoutLockedItems.Visibility = showLockedItems ? Visibility.Visible : Visibility.Collapsed;
                canvasLinedFlowLayoutLockedItems.Width = scrollView.ActualWidth;
                canvasLinedFlowLayoutLockedItems.Height = scrollView.ActualHeight;
                canvasLinedFlowLayoutLockedItems.Children.Clear();

                if (showLockedItems && _lstLinedFlowLayoutLockedItemIndexes.Count > 0)
                {
                    foreach (int lockedItemIndex in _lstLinedFlowLayoutLockedItemIndexes)
                    {
                        UIElement lockedItem = layoutPanel.Children[lockedItemIndex];
                        if (lockedItem != null)
                        {
                            GeneralTransform gt = lockedItem.TransformToVisual(layoutPanel);
                            Point lockedItemOriginPoint = new Point();
                            lockedItemOriginPoint = gt.TransformPoint(lockedItemOriginPoint);

                            if (lockedItemOriginPoint.X - scrollView.HorizontalOffset >= 0 && lockedItemOriginPoint.Y - scrollView.VerticalOffset >= 0 &&
                                lockedItemOriginPoint.X - scrollView.HorizontalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Width &&
                                lockedItemOriginPoint.Y - scrollView.VerticalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Height)
                            {
                                Microsoft.UI.Xaml.Shapes.Rectangle lockedItemRectangle = new Microsoft.UI.Xaml.Shapes.Rectangle()
                                {
                                    Fill = new SolidColorBrush(Colors.Red),
                                    Width = 8,
                                    Height = 8
                                };

                                canvasLinedFlowLayoutLockedItems.Children.Add(lockedItemRectangle);
                                Canvas.SetLeft(lockedItemRectangle, lockedItemOriginPoint.X - scrollView.HorizontalOffset);
                                Canvas.SetTop(lockedItemRectangle, lockedItemOriginPoint.Y - scrollView.VerticalOffset);
                            }
                        }
                    }
                }
            }
        }

void UpdateLinedFlowLayoutLogItemIndexDbg ( ) [inline, private]

Definition at line 2705 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutLogItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLogItemIndex(linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutMinItemSpacing ( ) [inline, private]

Definition at line 2729 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutMinItemSpacing.Text = linedFlowLayout.MinItemSpacing.ToString();
            }
        }

void UpdateLinedFlowLayoutRealizedItemIndexes ( ) [inline, private]

Definition at line 2737 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutFirstRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutFirstRealizedItemIndex(linedFlowLayout).ToString();
                txtLinedFlowLayoutLastRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutLastRealizedItemIndex(linedFlowLayout).ToString();
            }
        }

void UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg ( ) [inline, private]

Definition at line 2746 of file LinedFlowLayoutDemo.cs.

        {
            if (linedFlowLayout != null)
            {
                txtLinedFlowLayoutSnappedAverageItemsPerLineDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(linedFlowLayout).ToString();
            }
        }

void UpdateScrollViewBackground ( ) [inline, private]

Definition at line 2754 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && cmbScrollViewBackground != null)
            {
                SolidColorBrush bg = scrollView.Background as SolidColorBrush;

                if (bg == null)
                {
                    cmbScrollViewBackground.SelectedIndex = 0;
                }
                else if (bg.Color == Colors.Transparent)
                {
                    cmbScrollViewBackground.SelectedIndex = 1;
                }
                else if (bg.Color == Colors.AliceBlue)
                {
                    cmbScrollViewBackground.SelectedIndex = 2;
                }
                else if (bg.Color == Colors.Aqua)
                {
                    cmbScrollViewBackground.SelectedIndex = 3;
                }
                else
                {
                    cmbScrollViewBackground.SelectedIndex = -1;
                }
            }
        }

void UpdateScrollViewBorderBrush ( ) [inline, private]

Definition at line 2783 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && cmbScrollViewBorderBrush != null)
            {
                SolidColorBrush bb = scrollView.BorderBrush as SolidColorBrush;

                if (bb == null)
                {
                    cmbScrollViewBorderBrush.SelectedIndex = 0;
                }
                else if (bb.Color == Colors.Transparent)
                {
                    cmbScrollViewBorderBrush.SelectedIndex = 1;
                }
                else if (bb.Color == Colors.Blue)
                {
                    cmbScrollViewBorderBrush.SelectedIndex = 2;
                }
                else if (bb.Color == Colors.Green)
                {
                    cmbScrollViewBorderBrush.SelectedIndex = 3;
                }
                else
                {
                    cmbScrollViewBorderBrush.SelectedIndex = -1;
                }
            }
        }

void UpdateScrollViewBorderThickness ( ) [inline, private]

Definition at line 2812 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewBorderThickness != null)
            {
                txtScrollViewBorderThickness.Text = scrollView.BorderThickness.ToString();
            }
        }

void UpdateScrollViewContentOrientation ( ) [inline, private]

Definition at line 2820 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && cmbScrollViewContentOrientation != null)
                {
                    cmbScrollViewContentOrientation.SelectedIndex = (int)scrollView.ContentOrientation;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewCornerRadius ( ) [inline, private]

Definition at line 2836 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewCornerRadius != null)
            {
                txtScrollViewCornerRadius.Text = scrollView.CornerRadius.ToString();
            }
        }

void UpdateScrollViewExtentHeight ( ) [inline, private]

Definition at line 2844 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewExtentHeight != null)
            {
                txtScrollViewExtentHeight.Text = scrollView.ExtentHeight.ToString();
            }
        }

void UpdateScrollViewExtentWidth ( ) [inline, private]

Definition at line 2852 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewExtentWidth != null)
            {
                txtScrollViewExtentWidth.Text = scrollView.ExtentWidth.ToString();
            }
        }

void UpdateScrollViewHeight ( ) [inline, private]

Definition at line 2860 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewHeight != null)
            {
                txtScrollViewHeight.Text = scrollView.Height.ToString();
            }
        }

void UpdateScrollViewHorizontalAnchorRatio ( ) [inline, private]

Definition at line 2868 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewHorizontalAnchorRatio != null)
            {
                txtScrollViewHorizontalAnchorRatio.Text = scrollView.HorizontalAnchorRatio.ToString();
            }
        }

void UpdateScrollViewHorizontalOffset ( ) [inline, private]

Definition at line 2876 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewHorizontalOffset != null)
            {
                txtScrollViewHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
            }
        }

void UpdateScrollViewHorizontalScrollBarVisibility ( ) [inline, private]

Definition at line 2884 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && cmbScrollViewHorizontalScrollBarVisibility != null)
                {
                    cmbScrollViewHorizontalScrollBarVisibility.SelectedIndex = (int)scrollView.HorizontalScrollBarVisibility;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewHorizontalScrollMode ( ) [inline, private]

Definition at line 2900 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && cmbScrollViewHorizontalScrollMode != null)
                {
                    cmbScrollViewHorizontalScrollMode.SelectedIndex = (int)scrollView.HorizontalScrollMode;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewIsEnabled ( ) [inline, private]

Definition at line 2916 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && chkScrollViewIsEnabled != null)
                {
                    chkScrollViewIsEnabled.IsChecked = scrollView.IsEnabled;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewIsTabStop ( ) [inline, private]

Definition at line 2932 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && chkScrollViewIsTabStop != null)
                {
                    chkScrollViewIsTabStop.IsChecked = scrollView.IsTabStop;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewMargin ( ) [inline, private]

Definition at line 2948 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewMargin != null)
            {
                txtScrollViewMargin.Text = scrollView.Margin.ToString();
            }
        }

void UpdateScrollViewMaxHeight ( ) [inline, private]

Definition at line 2956 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewMaxHeight != null)
            {
                txtScrollViewMaxHeight.Text = scrollView.MaxHeight.ToString();
            }
        }

void UpdateScrollViewMaxWidth ( ) [inline, private]

Definition at line 2964 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewMaxWidth != null)
            {
                txtScrollViewMaxWidth.Text = scrollView.MaxWidth.ToString();
            }
        }

void UpdateScrollViewPadding ( ) [inline, private]

Definition at line 2972 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewPadding != null)
            {
                txtScrollViewPadding.Text = scrollView.Padding.ToString();
            }
        }

void UpdateScrollViewVerticalAnchorRatio ( ) [inline, private]

Definition at line 2980 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewVerticalAnchorRatio != null)
            {
                txtScrollViewVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
            }
        }

void UpdateScrollViewVerticalOffset ( ) [inline, private]

Definition at line 2988 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewVerticalOffset != null)
            {
                txtScrollViewVerticalOffset.Text = scrollView.VerticalOffset.ToString();
            }
        }

void UpdateScrollViewVerticalScrollBarVisibility ( ) [inline, private]

Definition at line 2996 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && cmbScrollViewVerticalScrollBarVisibility != null)
                {
                    cmbScrollViewVerticalScrollBarVisibility.SelectedIndex = (int)scrollView.VerticalScrollBarVisibility;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewVerticalScrollMode ( ) [inline, private]

Definition at line 3012 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && cmbScrollViewVerticalScrollMode != null)
                {
                    cmbScrollViewVerticalScrollMode.SelectedIndex = (int)scrollView.VerticalScrollMode;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateScrollViewWidth ( ) [inline, private]

Definition at line 3028 of file LinedFlowLayoutDemo.cs.

        {
            if (scrollView != null && txtScrollViewWidth != null)
            {
                txtScrollViewWidth.Text = scrollView.Width.ToString();
            }
        }

void UpdateScrollViewZoomMode ( ) [inline, private]

Definition at line 3036 of file LinedFlowLayoutDemo.cs.

        {
            try
            {
                if (scrollView != null && cmbScrollViewZoomMode != null)
                {
                    cmbScrollViewZoomMode.SelectedIndex = (int)scrollView.ZoomMode;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

Member Data Documentation

object _asyncEventReportingLock = new object() [private]

Definition at line 20 of file LinedFlowLayoutDemo.cs.

CornerRadius _cornerRadiusFour = new CornerRadius(4) [private]

Definition at line 26 of file LinedFlowLayoutDemo.cs.

SolidColorBrush _grayBrush = new SolidColorBrush(Colors.Gray) [private]

Definition at line 23 of file LinedFlowLayoutDemo.cs.

Layout _layout = null [private]

Definition at line 27 of file LinedFlowLayoutDemo.cs.

List<string> _lstAsyncEventMessage = new List<string>() [private]

Definition at line 21 of file LinedFlowLayoutDemo.cs.

List<int> _lstLinedFlowLayoutLockedItemIndexes = new List<int>() [private]

Definition at line 22 of file LinedFlowLayoutDemo.cs.

Thickness _thicknessFour = new Thickness(4) [private]

Definition at line 25 of file LinedFlowLayoutDemo.cs.

SolidColorBrush _whiteBrush = new SolidColorBrush(Colors.White) [private]

Definition at line 24 of file LinedFlowLayoutDemo.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LinedFlowLayoutDemo.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Recipe Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Model
  • Recipe
Public Member Functions | Static Public Member Functions | Properties | Events | Private Member Functions | Static Private Member Functions | Private Attributes

Recipe Class Reference

List of all members.

Public Member Functions

override string | ToString ()

Static Public Member Functions

static double | GetKnownAspectRatioFromIndex (int index)

Properties

double | AspectRatio [get]
BitmapImage | BitmapImage [get, set]
string | Description [get, set]
int | Id [get, set]
Uri | ImageUri [get, set]

Events

PropertyChangedEventHandler | PropertyChanged

Private Member Functions

void | OnPropertyChanged (string propertyName)

Static Private Member Functions

static double | GetKnownAspectRatioFromImageName (string imageName)
static double | GetKnownAspectRatioFromLocalPath (string localPath)

Private Attributes

BitmapImage | _bitmapImage
string | _description
int | _id
Uri | _imageUri

Detailed Description

Definition at line 10 of file Recipe.cs.

Member Function Documentation

static double GetKnownAspectRatioFromImageName ( string imageName ) [inline, static, private]

Definition at line 132 of file Recipe.cs.

        {
            switch (imageName)
            {
                case "vette1.jpg":
                case "vette2.jpg":
                case "vette3.jpg":
                case "vette7.jpg":
                case "vette8.jpg":
                case "vette9.jpg":
                case "vette10.jpg":
                case "vette11.jpg":
                case "vette14.jpg":
                case "vette15.jpg":
                case "vette19.jpg":
                case "vette21.jpg":
                case "vette22.jpg":
                case "vette25.jpg":
                case "vette29.jpg":
                case "vette30.jpg":
                case "vette31.jpg":
                case "vette33.jpg":
                case "vette34.jpg":
                case "vette37.jpg":
                case "vette40.jpg":
                case "vette41.jpg":
                case "vette42.jpg":
                case "vette43.jpg":
                case "vette46.jpg":
                case "vette51.jpg":
                case "vette52.jpg":
                case "vette55.jpg":
                case "vette58.jpg":
                case "vette68.jpg":
                case "vette69.jpg":
                case "vette71.jpg":
                case "vette73.jpg":
                case "vette74.jpg":
                case "vette75.jpg":
                case "vette76.jpg":
                case "vette78.jpg":
                case "vette79.jpg":
                case "vette80.jpg":
                case "vette81.jpg":
                case "vette82.jpg":
                case "vette84.jpg":
                case "vette85.jpg":
                case "vette87.jpg":
                case "vette90.jpg":
                case "vette91.jpg":
                case "vette92.jpg":
                case "vette94.jpg":
                case "vette95.jpg":
                case "vette96.jpg":
                case "vette97.jpg":
                case "vette100.jpg":
                case "vette101.jpg":
                case "vette102.jpg":
                case "vette103.jpg":
                case "vette104.jpg":
                case "vette105.jpg":
                case "vette106.jpg":
                case "vette107.jpg":
                case "vette108.jpg":
                case "vette110.jpg":
                case "vette112.jpg":
                case "vette113.jpg":
                case "vette114.jpg":
                case "vette115.jpg":
                case "vette116.jpg":
                case "vette117.jpg":
                case "vette118.jpg":
                case "vette119.jpg":
                case "vette120.jpg":
                case "vette123.jpg":
                    return 404.0 / 303.0;
                case "vette4.jpg":
                    return 71.0 / 404.0;
                case "vette5.jpg":
                case "vette12.jpg":
                case "vette13.jpg":
                case "vette16.jpg":
                case "vette23.jpg":
                case "vette24.jpg":
                case "vette28.jpg":
                case "vette38.jpg":
                case "vette39.jpg":
                case "vette44.jpg":
                case "vette45.jpg":
                case "vette49.jpg":
                case "vette50.jpg":
                case "vette53.jpg":
                case "vette54.jpg":
                case "vette56.jpg":
                case "vette57.jpg":
                case "vette59.jpg":
                case "vette60.jpg":
                case "vette61.jpg":
                case "vette62.jpg":
                case "vette63.jpg":
                case "vette64.jpg":
                case "vette65.jpg":
                case "vette66.jpg":
                case "vette67.jpg":
                case "vette70.jpg":
                case "vette72.jpg":
                case "vette83.jpg":
                case "vette93.jpg":
                case "vette98.jpg":
                case "vette99.jpg":
                case "vette109.jpg":
                case "vette111.jpg":
                case "vette121.jpg":
                case "vette122.jpg":
                case "vette124.jpg":
                case "vette125.jpg":
                    return 303.0 / 404.0;
                case "vette6.jpg":
                    return 404.0 / 175.0;
                case "vette17.jpg":
                    return 212.0 / 404.0;
                case "vette18.jpg":
                    return 404.0 / 153.0;
                case "vette20.jpg":
                    return 364.0 / 303.0;
                case "vette26.jpg":
                    return 404.0 / 238.0;
                case "vette27.jpg":
                    return 275.0 / 404.0;
                case "vette32.jpg":
                    return 404.0 / 212.0;
                case "vette35.jpg":
                    return 404.0 / 190.0;
                case "vette36.jpg":
                    return 193.0 / 404.0;
                case "vette47.jpg":
                    return 119.0 / 404.0;
                case "vette48.jpg":
                    return 188.0 / 404.0;
                case "vette77.jpg":
                    return 281.0 / 404.0;
                case "vette86.jpg":
                    return 404.0 / 98.0;
                case "vette88.jpg":
                    return 404.0 / 141.0;
                case "vette89.jpg":
                    return 221.0 / 404.0;
                case "vette126.jpg":
                    return 151.0 / 404.0;
                case "Rect0.png":
                    return 1.75; // 337.0 / 193.0
                case "Rect1.png":
                    return 1.5;  // 289.0 / 193.0
                case "Rect2.png":
                    return 1.25; // 241.0 / 193.0
                case "Rect3.png":
                    return 1.0;  // 193.0 / 193.0
                case "Rect4.png":
                    return 0.75; // 145.0 / 193.0;
                case "Rect5.png":
                    return 0.5;  //  97.0 / 193.0;
            }
            return 1.0;
        }

static double GetKnownAspectRatioFromIndex ( int index ) [inline, static]

Definition at line 118 of file Recipe.cs.

        {
            string imageName = "vette" + index + ".jpg";

            return GetKnownAspectRatioFromImageName(imageName);
        }

static double GetKnownAspectRatioFromLocalPath ( string localPath ) [inline, static, private]

Definition at line 125 of file Recipe.cs.

        {
            string imageName = localPath.Substring(8);

            return GetKnownAspectRatioFromImageName(imageName);
        }

void OnPropertyChanged ( string propertyName ) [inline, private]

Definition at line 83 of file Recipe.cs.

        {
            if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); }
        }

override string ToString ( ) [inline]

Definition at line 88 of file Recipe.cs.

        {
            return Description;
        }

Member Data Documentation

BitmapImage _bitmapImage [private]

Definition at line 12 of file Recipe.cs.

string _description [private]

Definition at line 15 of file Recipe.cs.

int _id [private]

Definition at line 14 of file Recipe.cs.

Uri _imageUri [private]

Definition at line 13 of file Recipe.cs.

Property Documentation

double AspectRatio [get]

Definition at line 94 of file Recipe.cs.

BitmapImage BitmapImage [get, set]

Definition at line 18 of file Recipe.cs.

string Description [get, set]

Definition at line 66 of file Recipe.cs.

int Id [get, set]

Definition at line 50 of file Recipe.cs.

Uri ImageUri [get, set]

Definition at line 34 of file Recipe.cs.

Event Documentation

PropertyChangedEventHandler PropertyChanged

Definition at line 81 of file Recipe.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/DataModel/Recipe.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecipeGroup Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Model
  • RecipeGroup
Public Member Functions | Properties

RecipeGroup Class Reference

List of all members.

Public Member Functions

RecipeGroup (IEnumerable< Recipe > recipes)
override string | ToString ()

Properties

string | Name [get, set]

Detailed Description

Definition at line 10 of file RecipeGroup.cs.

Constructor & Destructor Documentation

RecipeGroup ( IEnumerable< Recipe > recipes ) [inline]

Definition at line 14 of file RecipeGroup.cs.

            : base(recipes)
        { }

Member Function Documentation

override string ToString ( ) [inline]

Definition at line 18 of file RecipeGroup.cs.

        {
            return Name;
        }

Property Documentation

string Name [get, set]

Definition at line 12 of file RecipeGroup.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/DataModel/RecipeGroup.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Year Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Model
  • Year
Public Member Functions | Properties

Year Class Reference

List of all members.

Public Member Functions

Year (IEnumerable< RecipeGroup > recipeGroups)
override string | ToString ()

Properties

int | Value [get, set]

Detailed Description

Definition at line 10 of file Year.cs.

Constructor & Destructor Documentation

Year ( IEnumerable< RecipeGroup > recipeGroups ) [inline]

Definition at line 14 of file Year.cs.

            : base(recipeGroups)
        {

        }

Member Function Documentation

override string ToString ( ) [inline]

Definition at line 20 of file Year.cs.

        {
            return string.Format("Year {0}", Value);
        }

Property Documentation

int Value [get, set]

Definition at line 12 of file Year.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/DataModel/Year.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyCollection Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • MyCollection
Public Member Functions | Public Attributes | Properties | Events | Private Attributes

MyCollection Class Reference

List of all members.

Public Member Functions

MyCollection (IEnumerable< object > collection)
int | Add (object value)
void | Clear ()
bool | Contains (object value)
void | CopyTo (Array array, int index)
IEnumerator | GetEnumerator ()
int | IndexFromKey (string key)
int | IndexOf (object value)
void | InitializeCollection (IEnumerable< object > collection)
void | Insert (int index, object value)
string | KeyFromIndex (int index)
void | Remove (object value)
void | RemoveAt (int index)

Public Attributes

int | Count = > inner.Count
bool | IsFixedSize = > false
bool | IsReadOnly = > false
bool | IsSynchronized = > false
object | SyncRoot = > throw new NotImplementedException()

Properties

object | this [int index] [get, set]

Events

NotifyCollectionChangedEventHandler | CollectionChanged

Private Attributes

List< object > | inner = new List<object>()

Detailed Description

Definition at line 59 of file SortingAndFilteringPage.xaml.cs.

Constructor & Destructor Documentation

MyCollection ( IEnumerable< object > collection ) [inline]

Definition at line 78 of file SortingAndFilteringPage.xaml.cs.

        {
            InitializeCollection(collection);
        }

Member Function Documentation

int Add ( object value ) [inline]

Definition at line 121 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

void Clear ( ) [inline]

Definition at line 126 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

bool Contains ( object value ) [inline]

Definition at line 131 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

void CopyTo | ( | Array | array,
 |  | int | index |
 | ) |  |  | [inline]

Definition at line 156 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

IEnumerator GetEnumerator ( ) [inline]

Definition at line 161 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

int IndexFromKey ( string key ) [inline]

Definition at line 104 of file SortingAndFilteringPage.xaml.cs.

        {
            return inner.IndexOf(int.Parse(key));
        }

int IndexOf ( object value ) [inline]

Definition at line 136 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

void InitializeCollection ( IEnumerable< object > collection ) [inline]

Definition at line 83 of file SortingAndFilteringPage.xaml.cs.

        {
            inner.Clear();
            if (collection != null)
            {
                inner.AddRange(collection);
            }

            if (CollectionChanged != null)
            {
                CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
            }
        }

void Insert | ( | int | index,
 |  | object | value |
 | ) |  |  | [inline]

Definition at line 141 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

string KeyFromIndex ( int index ) [inline]

Definition at line 99 of file SortingAndFilteringPage.xaml.cs.

        {
            return inner[index].ToString();
        }

void Remove ( object value ) [inline]

Definition at line 146 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

void RemoveAt ( int index ) [inline]

Definition at line 151 of file SortingAndFilteringPage.xaml.cs.

        {
            throw new NotImplementedException();
        }

Member Data Documentation

int Count = > inner.Count

Definition at line 63 of file SortingAndFilteringPage.xaml.cs.

List<object> inner = new List<object>() [private]

Definition at line 61 of file SortingAndFilteringPage.xaml.cs.

bool IsFixedSize = > false

Definition at line 114 of file SortingAndFilteringPage.xaml.cs.

bool IsReadOnly = > false

Definition at line 116 of file SortingAndFilteringPage.xaml.cs.

bool IsSynchronized = > false

Definition at line 111 of file SortingAndFilteringPage.xaml.cs.

object SyncRoot = > throw new NotImplementedException()

Definition at line 119 of file SortingAndFilteringPage.xaml.cs.

Property Documentation

object this[int index] [get, set]

Definition at line 66 of file SortingAndFilteringPage.xaml.cs.

Event Documentation

NotifyCollectionChangedEventHandler CollectionChanged

Definition at line 97 of file SortingAndFilteringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/SortingAndFilteringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyData Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • MyData
Public Member Functions | Public Attributes

MyData Class Reference

List of all members.

Public Member Functions

MyData (int number)

Public Attributes

int number

Detailed Description

Definition at line 101 of file ItemTemplateDemo.xaml.cs.

Constructor & Destructor Documentation

MyData ( int number ) [inline]

Definition at line 105 of file ItemTemplateDemo.xaml.cs.

        {
            this.number = number;
        }

Member Data Documentation

int number

Definition at line 103 of file ItemTemplateDemo.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemTemplateSamples/ItemTemplateDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • MyItem
Properties

MyItem Class Reference

List of all members.

Properties

float | Height [get, set]
string | Label [get, set]

Detailed Description

Definition at line 24 of file FlowLayoutDemoPage.xaml.cs.

Property Documentation

float Height [get, set]

Definition at line 27 of file FlowLayoutDemoPage.xaml.cs.

string Label [get, set]

Definition at line 26 of file FlowLayoutDemoPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/FlowLayoutDemoPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MyItemsRepeater Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • MyItemsRepeater
Public Member Functions

MyItemsRepeater Class Reference

Inherits Microsoft::UI::Xaml::Controls::ItemsRepeater.

List of all members.

Public Member Functions

MyItemsRepeater ()

Detailed Description

Definition at line 123 of file ItemTemplateDemo.xaml.cs.

Constructor & Destructor Documentation

MyItemsRepeater ( ) [inline]

Definition at line 125 of file ItemTemplateDemo.xaml.cs.

        {
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemTemplateSamples/ItemTemplateDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MySelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • MySelector
Protected Member Functions | Properties

MySelector Class Reference

List of all members.

Protected Member Functions

override DataTemplate | SelectTemplateCore (object item)

Properties

DataTemplate | TemplateEven [get, set]
DataTemplate | TemplateOdd [get, set]

Detailed Description

Definition at line 111 of file ItemTemplateDemo.xaml.cs.

Member Function Documentation

override DataTemplate SelectTemplateCore ( object item ) [inline, protected]

Definition at line 117 of file ItemTemplateDemo.xaml.cs.

        {
            return (((int)item) % 2 == 0) ? TemplateEven : TemplateOdd;
        }

Property Documentation

DataTemplate TemplateEven [get, set]

Definition at line 115 of file ItemTemplateDemo.xaml.cs.

DataTemplate TemplateOdd [get, set]

Definition at line 113 of file ItemTemplateDemo.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemTemplateSamples/ItemTemplateDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NonVirtualStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • NonVirtualStackLayout
Protected Member Functions

NonVirtualStackLayout Class Reference

Inherits NonVirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (NonVirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (NonVirtualizingLayoutContext context, Size availableSize)

Detailed Description

Definition at line 11 of file NonVirtualStackLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 27 of file NonVirtualStackLayout.cs.

        {
            double offset = 0.0;
            foreach (var element in context.Children)
            {
                element.Arrange(new Rect(0, offset, element.DesiredSize.Width, element.DesiredSize.Height));
                offset += element.DesiredSize.Height;
            }

            return finalSize;
        }

override Size MeasureOverride | ( | NonVirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 13 of file NonVirtualStackLayout.cs.

        {
            double extentHeight = 0.0;
            double extentWidth = 0.0;
            foreach(var element in context.Children)
            {
                element.Measure(availableSize);
                extentHeight += element.DesiredSize.Height;
                extentWidth = Math.Max(extentWidth, element.DesiredSize.Width);
            }

            return new Size(extentWidth, extentHeight);
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayout.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NonVirtualStackLayoutSamplePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • NonVirtualStackLayoutSamplePage
Public Member Functions | Private Member Functions | Private Attributes

NonVirtualStackLayoutSamplePage Class Reference

List of all members.

Public Member Functions

NonVirtualStackLayoutSamplePage ()
NonVirtualStackLayoutSamplePage ()

Private Member Functions

void | BtnClear1_Click (object sender, RoutedEventArgs e)
void | BtnClear2_Click (object sender, RoutedEventArgs e)
void | BtnInsert1_Click (object sender, RoutedEventArgs e)
void | BtnInsert2_Click (object sender, RoutedEventArgs e)
void | BtnRemoveAt1_Click (object sender, RoutedEventArgs e)
void | BtnRemoveAt2_Click (object sender, RoutedEventArgs e)
void | BtnReplace1_Click (object sender, RoutedEventArgs e)
void | BtnReplace2_Click (object sender, RoutedEventArgs e)

Private Attributes

ObservableCollection< int > | _numbers = new ObservableCollection<int>()
SolidColorBrush | _solidColorBrushGreen = new SolidColorBrush(Colors.Green)
SolidColorBrush | _solidColorBrushRed = new SolidColorBrush(Colors.Red)
ObservableCollection< UIElement > | _uiElements = new ObservableCollection<UIElement>()

Detailed Description

Definition at line 14 of file NonVirtualStackLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

NonVirtualStackLayoutSamplePage ( ) [inline]

Definition at line 16 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemsSource = Enumerable.Range(0, 10);
        }

NonVirtualStackLayoutSamplePage ( ) [inline]

Definition at line 19 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();

            for (int i = 0; i < 10; i++)
            {
                _numbers.Add(i);
                _uiElements.Add(new TextBlock() { Text = i.ToString(), Foreground = _solidColorBrushRed });
            }

            itemsRepeater1.ItemsSource = _numbers;
            itemsRepeater2.ItemsSource = _uiElements;
        }

Member Function Documentation

void BtnClear1_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            _numbers.Clear();
        }

void BtnClear2_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            _uiElements.Clear();
        }

void BtnInsert1_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            int childIndex = int.Parse(txtChildIndex1.Text);
            _numbers.Insert(childIndex, _numbers.Count);
        }

void BtnInsert2_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 67 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            int childIndex = int.Parse(txtChildIndex2.Text);
            _uiElements.Insert(childIndex, new TextBlock() { Text = _uiElements.Count.ToString(), Foreground = _solidColorBrushGreen });
        }

void BtnRemoveAt1_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            int childIndex = int.Parse(txtChildIndex1.Text);
            _numbers.RemoveAt(childIndex);
        }

void BtnRemoveAt2_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            int childIndex = int.Parse(txtChildIndex2.Text);
            _uiElements.RemoveAt(childIndex);
        }

void BtnReplace1_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            int childIndex = int.Parse(txtChildIndex1.Text);
            _numbers[childIndex] = _numbers.Count;
        }

void BtnReplace2_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 61 of file NonVirtualStackLayoutSamplePage.xaml.cs.

        {
            int childIndex = int.Parse(txtChildIndex2.Text);
            _uiElements[childIndex] = new TextBlock() { Text = _uiElements.Count.ToString(), Foreground = _solidColorBrushGreen };
        }

Member Data Documentation

ObservableCollection<int> _numbers = new ObservableCollection<int>() [private]

Definition at line 14 of file NonVirtualStackLayoutSamplePage.xaml.cs.

SolidColorBrush _solidColorBrushGreen = new SolidColorBrush(Colors.Green) [private]

Definition at line 17 of file NonVirtualStackLayoutSamplePage.xaml.cs.

SolidColorBrush _solidColorBrushRed = new SolidColorBrush(Colors.Red) [private]

Definition at line 16 of file NonVirtualStackLayoutSamplePage.xaml.cs.

ObservableCollection<UIElement> _uiElements = new ObservableCollection<UIElement>() [private]

Definition at line 15 of file NonVirtualStackLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamplePages/NonVirtual/NonVirtualStackLayoutSamplePage.xaml.cs
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ObjectModelTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ObjectModelTestPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ObjectModelTestPage Class Reference

List of all members.

Public Member Functions

ObjectModelTestPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ObjectModelTestPage ()
void | AppendEventMessage (string eventMessage)
void | AppendEventMessage (List< string > lstEventMessage)
void | BtnChangeEvenItemsVisibility_Click (object sender, RoutedEventArgs e)
void | BtnChangeOddItemsVisibility_Click (object sender, RoutedEventArgs e)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | ChkItemsRepeaterProperties_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | CmbItemsSource_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemTemplate_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbLayout_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ItemsRepeater_ElementClearing (ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
void | ItemsRepeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | ItemsRepeater_Loaded (object sender, RoutedEventArgs e)
void | ItemsRepeater_SizeChanged (object sender, SizeChangedEventArgs e)
void | LogScrollViewInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ScrollView_GotFocus (object sender, RoutedEventArgs e)
void | ScrollView_Loaded (object sender, RoutedEventArgs e)
void | ScrollView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ScrollView_LostFocus (object sender, RoutedEventArgs e)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompleted (ScrollView sender, ScrollingZoomCompletedEventArgs args)

Private Attributes

List< int > | _collapsedElements = null
ObservableCollection< string > | _colStrings = null

Detailed Description

Definition at line 21 of file ObjectModelTestPage.xaml.cs.

Constructor & Destructor Documentation

ObjectModelTestPage ( ) [inline]

Definition at line 26 of file ObjectModelTestPage.xaml.cs.

        {
            this.InitializeComponent();

            if (chkLogScrollViewMessages.IsChecked == true || chkLogItemsRepeaterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogItemsRepeaterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }

            if (itemsRepeater != null)
            {
                itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
                itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
            }
        }

~ObjectModelTestPage ( ) [inline, private]

Definition at line 51 of file ObjectModelTestPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 552 of file ObjectModelTestPage.xaml.cs.

        {
            List<string> lstEventMessage = new List<string>();

            while (eventMessage.Length > 0)
            {
                string msgHead = eventMessage;

                if (eventMessage.Length > 110)
                {
                    int commaIndex = eventMessage.IndexOf(',', 110);
                    if (commaIndex != -1)
                    {
                        msgHead = eventMessage.Substring(0, commaIndex);
                        eventMessage = eventMessage.Substring(commaIndex + 1);
                    }
                    else
                    {
                        eventMessage = string.Empty;
                    }
                }
                else
                {
                    eventMessage = string.Empty;
                }

                lstEventMessage.Add(msgHead);
            }
            AppendEventMessage(lstEventMessage);
        }

void AppendEventMessage ( List< string > lstEventMessage ) [inline, private]

Definition at line 583 of file ObjectModelTestPage.xaml.cs.

        {
            foreach (string eventMessage in lstEventMessage)
            {
                lstLogs.Items.Add(eventMessage);
            }
            lstEventMessage.Clear();
        }

void BtnChangeEvenItemsVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 160 of file ObjectModelTestPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null && _colStrings != null)
                {
                    Visibility newVisibility = Visibility.Collapsed;

                    if (btnChangeEvenItemsVisibility.Content as string == "Collapse even realized items")
                    {
                        btnChangeEvenItemsVisibility.Content = "Show even realized items";
                    }
                    else
                    {
                        btnChangeEvenItemsVisibility.Content = "Collapse even realized items";
                        newVisibility = Visibility.Visible;
                    }

                    if (_collapsedElements == null)
                    {
                        _collapsedElements = new List<int>();
                    }

                    for (int i = 0; i < (_colStrings.Count + 1) / 2; i++)
                    {
                        UIElement element = itemsRepeater.TryGetElement(2 * i);
                        if (element != null)
                        {
                            element.Visibility = newVisibility;

                            if (newVisibility == Visibility.Visible)
                            {
                                if (_collapsedElements.Contains(2 * i))
                                {
                                    _collapsedElements.Remove(2 * i);
                                }
                            }
                            else
                            {
                                if (!_collapsedElements.Contains(2 * i))
                                {
                                    _collapsedElements.Add(2 * i);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnChangeOddItemsVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 215 of file ObjectModelTestPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null && _colStrings != null)
                {
                    Visibility newVisibility = Visibility.Collapsed;

                    if (btnChangeOddItemsVisibility.Content as string == "Collapse odd realized items")
                    {
                        btnChangeOddItemsVisibility.Content = "Show odd realized items";
                    }
                    else
                    {
                        btnChangeOddItemsVisibility.Content = "Collapse odd realized items";
                        newVisibility = Visibility.Visible;
                    }

                    if (_collapsedElements == null)
                    {
                        _collapsedElements = new List<int>();
                    }

                    for (int i = 0; i < _colStrings.Count / 2; i++)
                    {
                        UIElement element = itemsRepeater.TryGetElement(2 * i + 1);
                        if (element != null)
                        {
                            element.Visibility = newVisibility;

                            if (newVisibility == Visibility.Visible)
                            {
                                if (_collapsedElements.Contains(2 * i + 1))
                                {
                                    _collapsedElements.Remove(2 * i + 1);
                                }
                            }
                            else
                            {
                                if (!_collapsedElements.Contains(2 * i + 1))
                                {
                                    _collapsedElements.Add(2 * i + 1);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 592 of file ObjectModelTestPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 429 of file ObjectModelTestPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void ChkItemsRepeaterProperties_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 270 of file ObjectModelTestPage.xaml.cs.

        {
            if (grdItemsRepeaterProperties != null && chkItemsRepeaterProperties != null)
                grdItemsRepeaterProperties.Visibility = chkItemsRepeaterProperties.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
        }

void ChkLogItemsRepeaterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 434 of file ObjectModelTestPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.Loaded += ItemsRepeater_Loaded;
                itemsRepeater.SizeChanged += ItemsRepeater_SizeChanged;
            }
        }

void ChkLogItemsRepeaterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 443 of file ObjectModelTestPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.Loaded -= ItemsRepeater_Loaded;
                itemsRepeater.SizeChanged -= ItemsRepeater_SizeChanged;
            }
        }

void ChkLogItemsRepeaterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 492 of file ObjectModelTestPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 499 of file ObjectModelTestPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogs_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 276 of file ObjectModelTestPage.xaml.cs.

        {
            if (grdLogs != null && chkLogs != null)
                grdLogs.Visibility = chkLogs.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 452 of file ObjectModelTestPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.GettingFocus += ScrollView_GettingFocus;
                scrollView.GotFocus += ScrollView_GotFocus;
                scrollView.LosingFocus += ScrollView_LosingFocus;
                scrollView.LostFocus += ScrollView_LostFocus;
                scrollView.Loaded += ScrollView_Loaded;
                scrollView.SizeChanged += ScrollView_SizeChanged;
                scrollView.ExtentChanged += ScrollView_ExtentChanged;
                scrollView.StateChanged += ScrollView_StateChanged;
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 472 of file ObjectModelTestPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.GettingFocus -= ScrollView_GettingFocus;
                scrollView.GotFocus -= ScrollView_GotFocus;
                scrollView.LosingFocus -= ScrollView_LosingFocus;
                scrollView.LostFocus -= ScrollView_LostFocus;
                scrollView.Loaded -= ScrollView_Loaded;
                scrollView.SizeChanged -= ScrollView_SizeChanged;
                scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                scrollView.StateChanged -= ScrollView_StateChanged;
                scrollView.ViewChanged -= ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 506 of file ObjectModelTestPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 513 of file ObjectModelTestPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void CmbItemsSource_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 94 of file ObjectModelTestPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    switch (cmbItemsSource.SelectedIndex)
                    {
                        case 0:
                            if (itemsRepeater.ItemsSource != null)
                            {
                                itemsRepeater.ItemsSource = null;
                                _collapsedElements = null;
                                btnChangeEvenItemsVisibility.Content = "Collapse even realized items";
                                btnChangeOddItemsVisibility.Content = "Collapse odd realized items";
                            }
                            break;
                        case 1:
                            if (_colStrings == null)
                            {
                                _colStrings = new ObservableCollection<string>();

                                for (int itemIndex = 0; itemIndex < 200; itemIndex++)
                                {
                                    _colStrings.Add("Item" + itemIndex);
                                }
                            }
                            itemsRepeater.ItemsSource = _colStrings;
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbItemTemplate_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 71 of file ObjectModelTestPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    if (cmbItemTemplate.SelectedIndex == 0)
                    {
                        itemsRepeater.ItemTemplate = null;
                    }
                    else
                    {
                        itemsRepeater.ItemTemplate = Resources["template" + cmbItemTemplate.SelectedIndex.ToString()] as DataTemplate;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbLayout_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file ObjectModelTestPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    switch (cmbLayout.SelectedIndex)
                    {
                        case 0:
                            itemsRepeater.Layout = null;
                            break;
                        case 1:
                            itemsRepeater.Layout = new StackLayout();
                            break;
                        case 2:
                            itemsRepeater.Layout = new UniformGridLayout();
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ItemsRepeater_ElementClearing | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementClearingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 405 of file ObjectModelTestPage.xaml.cs.

        {
            try
            {
                if (chkLogItemsRepeaterEvents.IsChecked == true)
                {
                    AppendEventMessage($"ItemsRepeater.ElementClearing Element={args.Element}, Visibility={args.Element.Visibility}");
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ItemsRepeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 377 of file ObjectModelTestPage.xaml.cs.

        {
            try
            {
                if (chkLogItemsRepeaterEvents.IsChecked == true)
                {
                    AppendEventMessage($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}, Visibility={args.Element.Visibility}");
                }

                if (_collapsedElements != null && _collapsedElements.Contains(args.Index))
                {
                    if (args.Element.Visibility == Visibility.Visible)
                    {
                        args.Element.Visibility = Visibility.Collapsed;
                    }
                }
                else if (args.Element.Visibility == Visibility.Collapsed)
                {
                    args.Element.Visibility = Visibility.Visible;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ItemsRepeater_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 359 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ItemsRepeater.Loaded");
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
        }

void ItemsRepeater_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 368 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ItemsRepeater.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
        }

void LogScrollViewInfo ( ) [inline, private]

Definition at line 421 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
            AppendEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
            AppendEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
            AppendEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 520 of file ObjectModelTestPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string eventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                eventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                eventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendEventMessage(eventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 55 of file ObjectModelTestPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            if (itemsRepeater != null)
            {
                itemsRepeater.ElementPrepared -= ItemsRepeater_ElementPrepared;
                itemsRepeater.ElementClearing -= ItemsRepeater_ElementClearing;
            }

            base.OnNavigatedFrom(e);
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 324 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
        }

void ScrollView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 294 of file ObjectModelTestPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendEventMessage($"ScrollView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ScrollView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 319 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage("ScrollView.GotFocus");
        }

void ScrollView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 282 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.Loaded");
            LogScrollViewInfo();
        }

void ScrollView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 309 of file ObjectModelTestPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendEventMessage($"ScrollView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ScrollView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 304 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage("ScrollView.LostFocus");
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 339 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 349 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 288 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
            LogScrollViewInfo();
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 329 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 334 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 344 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}");
        }

void ScrollView_ZoomCompleted | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 354 of file ObjectModelTestPage.xaml.cs.

        {
            AppendEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

Member Data Documentation

List<int> _collapsedElements = null [private]

Definition at line 23 of file ObjectModelTestPage.xaml.cs.

ObservableCollection<string> _colStrings = null [private]

Definition at line 24 of file ObjectModelTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ObjectModelTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Person Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Person
Public Member Functions | Properties | Private Attributes

Person Class Reference

List of all members.

Public Member Functions

Person (string id)

Properties

string | Id [get]

Private Attributes

string | _id

Detailed Description

Definition at line 105 of file CircleLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

Person ( string id ) [inline]

Definition at line 116 of file CircleLayoutSamplePage.xaml.cs.

        {
            _id = id;
        }

Member Data Documentation

string _id [private]

Definition at line 107 of file CircleLayoutSamplePage.xaml.cs.

Property Documentation

string Id [get]

Definition at line 109 of file CircleLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonDataSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • PersonDataSource
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

PersonDataSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping.

List of all members.

Public Member Functions

PersonDataSource (ObservableCollection< Person > data)

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()
override string | KeyFromIndexCore (int index)

Private Member Functions

void | OnCollectionChanged (object sender, NotifyCollectionChangedEventArgs e)

Private Attributes

ObservableCollection< Person > | _data

Detailed Description

Definition at line 122 of file CircleLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

PersonDataSource ( ObservableCollection< Person > data ) [inline]

Definition at line 126 of file CircleLayoutSamplePage.xaml.cs.

        {
            _data = data;
            _data.CollectionChanged += OnCollectionChanged;
        }

Member Function Documentation

override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 132 of file CircleLayoutSamplePage.xaml.cs.

        { return _data[index]; }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 136 of file CircleLayoutSamplePage.xaml.cs.

        { return _data.Count; }

override string KeyFromIndexCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceViewWithUniqueIdMapping.

Definition at line 134 of file CircleLayoutSamplePage.xaml.cs.

        { return _data[index].Id; }

void OnCollectionChanged | ( | object | sender,
 |  | NotifyCollectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 139 of file CircleLayoutSamplePage.xaml.cs.

        {
            OnItemsSourceChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
        }

Member Data Documentation

ObservableCollection<Person> _data [private]

Definition at line 124 of file CircleLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • PersonElementFactory
Public Member Functions | Protected Member Functions | Private Attributes

PersonElementFactory Class Reference

Inherits Microsoft::UI::Xaml::Controls::ElementFactory.

List of all members.

Public Member Functions

PersonElementFactory (DataTemplate personTemplate)

Protected Member Functions

override UIElement | GetElementCore (ElementFactoryGetArgs args)
override void | RecycleElementCore (ElementFactoryRecycleArgs args)

Private Attributes

DataTemplate | _personTemplate

Detailed Description

Definition at line 145 of file CircleLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

PersonElementFactory ( DataTemplate personTemplate ) [inline]

Definition at line 149 of file CircleLayoutSamplePage.xaml.cs.

        {
            _personTemplate = personTemplate;
        }

Member Function Documentation

override UIElement GetElementCore ( ElementFactoryGetArgs args ) [inline, protected]

Definition at line 154 of file CircleLayoutSamplePage.xaml.cs.

        {
            var element = (FrameworkElement)_personTemplate.LoadContent();
            element.DataContext = args.Data;
            return element;
        }

override void RecycleElementCore ( ElementFactoryRecycleArgs args ) [inline, protected]

Definition at line 161 of file CircleLayoutSamplePage.xaml.cs.

        {

        }

Member Data Documentation

DataTemplate _personTemplate [private]

Definition at line 147 of file CircleLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PinterestLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • PinterestLayout
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

PinterestLayout Class Reference

Inherits VirtualizingLayout.

List of all members.

Public Member Functions

PinterestLayout ()

Protected Member Functions

override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

double | Width [get, set]

Private Member Functions

Size | GetExtentSize (Size availableSize)
int | GetIndexOfLowestColumn (List< double > columnOffsets, out double lowestOffset)
int | GetStartIndex (Rect viewport)
void | UpdateCachedBounds (Size availableSize)

Private Attributes

List< Rect > | m_cachedBounds = new List<Rect>()
List< double > | m_columnOffsets = new List<double>()
int | m_firstIndex = 0
double | m_lastAvailableWidth = 0.0
int | m_lastIndex = 0

Detailed Description

Definition at line 12 of file PinterestLayout.cs.

Constructor & Destructor Documentation

PinterestLayout ( ) [inline]

Definition at line 14 of file PinterestLayout.cs.

        {
            Width = 150.0;
        }

Member Function Documentation

Size GetExtentSize ( Size availableSize ) [inline, private]

Definition at line 159 of file PinterestLayout.cs.

        {
            double largestColumnOffset = m_columnOffsets[0];
            for (int index = 0; index < m_columnOffsets.Count; index++)
            {
                var currentOffset = m_columnOffsets[index];
                if (largestColumnOffset < currentOffset)
                {
                    largestColumnOffset = currentOffset;
                }
            }

            return new Size(availableSize.Width, largestColumnOffset);
        }

int GetIndexOfLowestColumn | ( | List< double > | columnOffsets,
 |  | out double | lowestOffset |
 | ) |  |  | [inline, private]

Definition at line 142 of file PinterestLayout.cs.

        {
            int lowestIndex = 0;
            lowestOffset = columnOffsets[lowestIndex];
            for (int index = 0; index < columnOffsets.Count; index++)
            {
                var currentOffset = columnOffsets[index];
                if (lowestOffset > currentOffset)
                {
                    lowestOffset = currentOffset;
                    lowestIndex = index;
                }
            }

            return lowestIndex;
        }

int GetStartIndex ( Rect viewport ) [inline, private]

Definition at line 115 of file PinterestLayout.cs.

        {
            int startIndex = 0;
            if (m_cachedBounds.Count == 0)
            {
                startIndex = 0;
            }
            else
            {
                // find first index that intersects the viewport
                // perhaps this can be done more efficiently than walking
                // from the start of the list.
                for (int i = 0; i < m_cachedBounds.Count; i++)
                {
                    var currentBounds = m_cachedBounds[i];
                    if (currentBounds.Y < viewport.Bottom &&
                        currentBounds.Bottom > viewport.Top)
                    {
                        startIndex = i;
                        break;
                    }
                }
            }

            return startIndex;
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 21 of file PinterestLayout.cs.

        {
            var viewport = context.RealizationRect;
            Debug.WriteLine("Measure: " + viewport);

            if (availableSize.Width != m_lastAvailableWidth)
            {
                UpdateCachedBounds(availableSize);
                m_lastAvailableWidth = availableSize.Width;
            }

            // Initialize column offsets
            int numColumns = (int)(availableSize.Width / Width);
            if (m_columnOffsets.Count == 0)
            {
                for (int i = 0; i < numColumns; i++)
                {
                    m_columnOffsets.Add(0);
                }
            }

            m_firstIndex = GetStartIndex(viewport);
            int currentIndex = m_firstIndex;
            double nextOffset = -1.0;

            // Measure items from start index to when we hit the end of the viewport.
            while (currentIndex < context.ItemCount && nextOffset < viewport.Bottom)
            {
                Debug.WriteLine("Measuring " + currentIndex);
                var child = context.GetOrCreateElementAt(currentIndex);
                child.Measure(new Size(Width, availableSize.Height));

                if (currentIndex >= m_cachedBounds.Count)
                {
                    // We do not have bounds for this index. Lay it out and cache it.
                    int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out nextOffset);
                    m_cachedBounds.Add(new Rect(columnIndex * Width, nextOffset, Width, child.DesiredSize.Height));
                    m_columnOffsets[columnIndex] += child.DesiredSize.Height;
                }
                else
                {
                    if (currentIndex + 1 == m_cachedBounds.Count)
                    {
                        // Last element. Use the next offset.
                        GetIndexOfLowestColumn(m_columnOffsets, out nextOffset);
                    }
                    else
                    {
                        nextOffset = m_cachedBounds[currentIndex + 1].Top;
                    }
                }

                child.Arrange(m_cachedBounds[currentIndex]);

                m_lastIndex = currentIndex;
                currentIndex++;
            }

            var extent = GetExtentSize(availableSize);
            return extent;
        }

void UpdateCachedBounds ( Size availableSize ) [inline, private]

Definition at line 96 of file PinterestLayout.cs.

        {
            int numColumns = (int)(availableSize.Width / Width);
            m_columnOffsets.Clear();
            for (int i = 0; i < numColumns; i++)
            {
                m_columnOffsets.Add(0);
            }

            for (int index = 0; index < m_cachedBounds.Count; index++)
            {
                double nextOffset = 0.0;
                int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out nextOffset);
                var oldHeight = m_cachedBounds[index].Height;
                m_cachedBounds[index] = new Rect(columnIndex * Width, nextOffset, Width, oldHeight);
                m_columnOffsets[columnIndex] += oldHeight;
            }
        }

Member Data Documentation

List<Rect> m_cachedBounds = new List<Rect>() [private]

Definition at line 178 of file PinterestLayout.cs.

List<double> m_columnOffsets = new List<double>() [private]

Definition at line 177 of file PinterestLayout.cs.

int m_firstIndex = 0 [private]

Definition at line 174 of file PinterestLayout.cs.

double m_lastAvailableWidth = 0.0 [private]

Definition at line 176 of file PinterestLayout.cs.

int m_lastIndex = 0 [private]

Definition at line 175 of file PinterestLayout.cs.

Property Documentation

double Width [get, set]

Definition at line 19 of file PinterestLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayout.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PinterestLayoutSamplePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • PinterestLayoutSamplePage
Public Member Functions | Private Member Functions | Private Attributes

PinterestLayoutSamplePage Class Reference

List of all members.

Public Member Functions

PinterestLayoutSamplePage ()
PinterestLayoutSamplePage ()

Private Member Functions

void | BringIntoView_Click (object sender, RoutedEventArgs e)
void | BringIntoView_Click (object sender, RoutedEventArgs e)

Private Attributes

string | _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus."

Detailed Description

Definition at line 16 of file PinterestLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

PinterestLayoutSamplePage ( ) [inline]

Definition at line 20 of file PinterestLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemTemplate = elementFactory;

            var rnd = new Random();
            var data = new TestObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
                           new Recipe
                           {
                               ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                               Description = k + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                           }));

            repeater.ItemsSource = data;
            bringIntoView.Click += BringIntoView_Click;
        }

PinterestLayoutSamplePage ( ) [inline]

Definition at line 19 of file PinterestLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemTemplate = elementFactory;

            var rnd = new Random();
            var data = new ObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
                           new Recipe
                           {
                               ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                               Description = k + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                           }));

            repeater.ItemsSource = data;
            bringIntoView.Click += BringIntoView_Click;
        }

Member Function Documentation

void BringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file PinterestLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if (int.TryParse(tb.Text, out index))
            {
                var anchor = repeater.GetOrCreateElement(index);
                anchor.StartBringIntoView();
            }
        }

void BringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 36 of file PinterestLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if (int.TryParse(tb.Text, out index))
            {
                if (index >= 0 && index < repeater.ItemsSourceView.Count)
                {
                    var anchor = repeater.GetOrCreateElement(index);
                    anchor.StartBringIntoView();
                }
            }
        }

Member Data Documentation

string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus." [private]

Definition at line 18 of file PinterestLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamplePages/Virtual/PinterestLayoutSamplePage.xaml.cs
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialItemCollectionTransitionProvider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • RadialItemCollectionTransitionProvider
Protected Member Functions | Properties | Static Private Member Functions | Private Attributes | Static Private Attributes

RadialItemCollectionTransitionProvider Class Reference

Inherits ItemCollectionTransitionProvider.

List of all members.

Protected Member Functions

override bool | ShouldAnimateCore (ItemCollectionTransition transition)
override void | StartTransitions (IList< ItemCollectionTransition > transitions)

Properties

static double | AnimationSlowdownFactor [get, set]

Static Private Member Functions

static void | AnimateOffset (Visual visual, Compositor compositor, Rect oldBounds, Rect newBounds)
static void | StartAddTransitions (IList< ItemCollectionTransition > transitions)
static void | StartMoveTransitions (IList< ItemCollectionTransition > transitions)
static void | StartRemoveTransitions (IList< ItemCollectionTransition > transitions)

Private Attributes

const double | DefaultAnimationDurationInMs = 600.0

Static Private Attributes

static double | _animationSlowdownFactor = 1.0

Detailed Description

Definition at line 19 of file RadialElementAnimator.cs.

Member Function Documentation

static void AnimateOffset | ( | Visual | visual,
 |  | Compositor | compositor,
 |  | Rect | oldBounds,
 |  | Rect | newBounds |
 | ) |  |  | [inline, static, private]

Definition at line 143 of file RadialElementAnimator.cs.

        {
            var offsetAnimation = compositor.CreateVector2KeyFrameAnimation();

            offsetAnimation.SetVector2Parameter("delta", new Vector2(
                (float)(oldBounds.X - newBounds.X),
                (float)(oldBounds.Y - newBounds.Y)));
            offsetAnimation.SetVector2Parameter("final", new Vector2());
            offsetAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue + delta");
            offsetAnimation.InsertExpressionKeyFrame(1.0f, "final");
            offsetAnimation.Duration = TimeSpan.FromMilliseconds(
                DefaultAnimationDurationInMs * AnimationSlowdownFactor);

            visual.StartAnimation("TransformMatrix._41_42", offsetAnimation);
        }

override bool ShouldAnimateCore ( ItemCollectionTransition transition ) [inline, protected]

Definition at line 36 of file RadialElementAnimator.cs.

        {
            return true;
        }

static void StartAddTransitions ( IList< ItemCollectionTransition > transitions ) [inline, static, private]

Definition at line 52 of file RadialElementAnimator.cs.

        {
            foreach (var transition in transitions)
            {
                var progress = transition.Start();
                var visual = ElementCompositionPreview.GetElementVisual(progress.Element);
                var compositor = visual.Compositor;

                var parent = (FrameworkElement)VisualTreeHelper.GetParent(progress.Element);
                var to = LayoutInformation.GetLayoutSlot((FrameworkElement)progress.Element);
                var from = to;
                from.X = (parent.ActualWidth - ((FrameworkElement)progress.Element).ActualWidth) / 2;
                from.Y = (parent.ActualHeight - ((FrameworkElement)progress.Element).ActualHeight) / 2;

                var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
                AnimateOffset(visual, compositor, from, to);
                batch.End();
                batch.Completed += delegate { progress.Complete(); };
            }
        }

static void StartMoveTransitions ( IList< ItemCollectionTransition > transitions ) [inline, static, private]

Definition at line 93 of file RadialElementAnimator.cs.

        {
            foreach (var transition in transitions)
            {
                var progress = transition.Start();
                var outerVisual = ElementCompositionPreview.GetElementVisual(progress.Element);
                var innerVisual = ElementCompositionPreview.GetElementVisual((UIElement)VisualTreeHelper.GetChild(progress.Element, 0));
                var compositor = outerVisual.Compositor;

                var parent = (FrameworkElement)VisualTreeHelper.GetParent(progress.Element);
                var center = new Point(parent.ActualWidth / 2, parent.ActualHeight / 2);
                var from = new Point((transition.OldBounds.Left + transition.OldBounds.Right) / 2 - center.X, -(transition.OldBounds.Top + transition.OldBounds.Bottom) / 2 + center.Y);
                var to = new Point((transition.NewBounds.Left + transition.NewBounds.Right) / 2 - center.X, -(transition.NewBounds.Top + transition.NewBounds.Bottom) / 2 + center.Y);
                var fromLength = Math.Sqrt(from.X * from.X + from.Y * from.Y);
                var toLength = Math.Sqrt(to.X * to.X + to.Y * to.Y);
                from.X /= fromLength;
                from.Y /= fromLength;
                to.X /= toLength;
                to.Y /= toLength;

                var angle = Math.Acos(Math.Min(1, to.X * from.X + to.Y * from.Y));
                var sign = Math.Sign(to.X * from.Y - to.Y * from.X);
                if (sign == 0) sign = Math.Sign(from.Y - to.Y);
                if (double.IsNaN(angle)) angle = 0;

                outerVisual.CenterPoint = new Vector3((float)(center.X - transition.NewBounds.X), (float)(center.Y - transition.NewBounds.Y), 0);
                innerVisual.CenterPoint = new Vector3((float)(transition.NewBounds.Width / 2), (float)(transition.NewBounds.Height / 2), 0);

                var outerRotate = compositor.CreateScalarKeyFrameAnimation();
                {
                    outerRotate.InsertExpressionKeyFrame(0.0f, (-sign * angle).ToString());
                    outerRotate.InsertKeyFrame(1.0f, 0.0f);
                    outerRotate.Duration = TimeSpan.FromMilliseconds(DefaultAnimationDurationInMs * AnimationSlowdownFactor);
                }

                var innerRotate = compositor.CreateScalarKeyFrameAnimation();
                {
                    innerRotate.InsertExpressionKeyFrame(0.0f, (sign * angle).ToString());
                    innerRotate.InsertKeyFrame(1.0f, 0.0f);
                    innerRotate.Duration = TimeSpan.FromMilliseconds(DefaultAnimationDurationInMs * AnimationSlowdownFactor);
                }

                var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
                outerVisual.StartAnimation("RotationAngle", outerRotate);
                innerVisual.StartAnimation("RotationAngle", innerRotate);
                batch.End();
                batch.Completed += delegate { progress.Complete(); };
            }
        }

static void StartRemoveTransitions ( IList< ItemCollectionTransition > transitions ) [inline, static, private]

Definition at line 73 of file RadialElementAnimator.cs.

        {
            foreach (var transition in transitions)
            {
                var progress = transition.Start();
                var visual = ElementCompositionPreview.GetElementVisual(progress.Element);
                var compositor = visual.Compositor;

                var fadeOutAnimation = compositor.CreateScalarKeyFrameAnimation();
                fadeOutAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue");
                fadeOutAnimation.InsertKeyFrame(1.0f, 0.0f);
                fadeOutAnimation.Duration = TimeSpan.FromMilliseconds(DefaultAnimationDurationInMs * AnimationSlowdownFactor);

                var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
                visual.StartAnimation("Opacity", fadeOutAnimation);
                batch.End();
                batch.Completed += delegate { progress.Complete(); };
            }
        }

override void StartTransitions ( IList< ItemCollectionTransition > transitions ) [inline, protected]

Definition at line 41 of file RadialElementAnimator.cs.

        {
            var addTransitions = transitions.Where(transition => transition.Operation == ItemCollectionTransitionOperation.Add).ToList();
            var removeTransitions = transitions.Where(transition => transition.Operation == ItemCollectionTransitionOperation.Remove).ToList();
            var moveTransitions = transitions.Where(transition => transition.Operation == ItemCollectionTransitionOperation.Move).ToList();

            StartAddTransitions(addTransitions);
            StartRemoveTransitions(removeTransitions);
            StartMoveTransitions(moveTransitions);
        }

Member Data Documentation

double _animationSlowdownFactor = 1.0 [static, private]

Definition at line 23 of file RadialElementAnimator.cs.

const double DefaultAnimationDurationInMs = 600.0 [private]

Definition at line 21 of file RadialElementAnimator.cs.

Property Documentation

double AnimationSlowdownFactor [static, get, set]

Definition at line 25 of file RadialElementAnimator.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/AnimationSamples/RadialElementAnimator.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecipeElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • RecipeElementFactory
Public Member Functions | Public Attributes | Protected Member Functions | Properties | Private Member Functions | Private Attributes

RecipeElementFactory Class Reference

Inherits Microsoft::UI::Xaml::Controls::ElementFactory.

List of all members.

Public Member Functions

RecipeElementFactory (DataTemplate itemTemplate, DataTemplate groupTemplate, DataTemplate yearTemplate, PageInfo pinfo)

Public Attributes

const string | RecipeContainerType = "RecipeContainer"
const string | RecipeGroupType = "RecipeGroup"
const string | YearType = "Year"

Protected Member Functions

override UIElement | GetElementCore (ElementFactoryGetArgs args)
override void | RecycleElementCore (ElementFactoryRecycleArgs args)

Properties

RecyclePool | RecyclePool [get, set]

Private Member Functions

UIElement | CreateContainer (string recycleKey)
string | GetContainerType (object data)
void | PrepareContainer (UIElement container, string containerType, object data)

Private Attributes

DataTemplate | _groupTemplate
DataTemplate | _itemTemplate
PageInfo _pageInfo
RecyclePool | _sharedRecyclePool = new RecyclePool()
DataTemplate | _yearTemplate

Detailed Description

Definition at line 14 of file RecipeViewGenerator.cs.

Constructor & Destructor Documentation

RecipeElementFactory | ( | DataTemplate | itemTemplate,
 |  | DataTemplate | groupTemplate,
 |  | DataTemplate | yearTemplate,
 |  | PageInfo | pinfo |
 | ) |  |  | [inline]

Definition at line 28 of file RecipeViewGenerator.cs.

        {
            _itemTemplate = itemTemplate;
            _groupTemplate = groupTemplate;
            _yearTemplate = yearTemplate;
            _pageInfo = pinfo;
        }

Member Function Documentation

UIElement CreateContainer ( string recycleKey ) [inline, private]

Definition at line 98 of file RecipeViewGenerator.cs.

        {
            return
               recycleKey == YearType ?
                   (FrameworkElement)_yearTemplate.LoadContent() :
               recycleKey == RecipeGroupType ?
                   (FrameworkElement)_groupTemplate.LoadContent() :
                   (FrameworkElement)_itemTemplate.LoadContent();
        }

string GetContainerType ( object data ) [inline, private]

Definition at line 91 of file RecipeViewGenerator.cs.

        {
            return
               data is Year ? YearType :
               data is RecipeGroup ? RecipeGroupType : RecipeContainerType;
        }

override UIElement GetElementCore ( ElementFactoryGetArgs args ) [inline, protected]

Definition at line 40 of file RecipeViewGenerator.cs.

        {
            var data = args.Data;
            string key = GetContainerType(data);
            var element = RecyclePool.TryGetElement(key, args.Parent);
            element = element ?? (FrameworkElement)CreateContainer(key);

            if (element == null)
            {
                throw new InvalidOperationException("Unable to create a container for key " + key);
            }

            PrepareContainer(element, key, data);

            (element as FrameworkElement).Tag = key;

            return element;
        }

void PrepareContainer | ( | UIElement | container,
 |  | string | containerType,
 |  | object | data |
 | ) |  |  | [inline, private]

Definition at line 108 of file RecipeViewGenerator.cs.

        {
            var containerFE = container as FrameworkElement;
            switch (containerType)
            {
                case RecipeContainerType:
                    {
                        var recipe = (Recipe)data;

                        var image = (Image)containerFE.FindName("recipeImage");
                        var description = (TextBlock)containerFE.FindName("recipeDescription");

                        if (image.Source == null)
                        {
                            image.Source = new BitmapImage(recipe.ImageUri);
                        }
                        else
                        {
                            ((BitmapImage)image.Source).UriSource = recipe.ImageUri;
                        }

                        description.Text = recipe.Description;

                        break;
                    }

                case RecipeGroupType:
                    {
                        var group = (RecipeGroup)data;

                        var groupName = (TextBlock)containerFE.FindName("groupName");
                        var repeater = (ItemsRepeater)containerFE.FindName("groupLayout");

                        groupName.Text = group.Name;

                        repeater.ItemsSource = group;
                        repeater.Layout = _pageInfo.NumLevels == 1 ? _pageInfo.Level1Layout : _pageInfo.Level2Layout;
#if DEBUG
                        RepeaterTestHooks.SetLayoutId(repeater.Layout, group.Name);
#endif
                        repeater.ItemTemplate = this;
                        break;
                    }

                case YearType:
                    {
                        var year = (Year)data;

                        var yearName = (TextBlock)containerFE.FindName("yearName");
                        var repeater = (ItemsRepeater)containerFE.FindName("yearLayout");

                        yearName.Text = year.Value.ToString();

                        repeater.ItemsSource = year;
                        repeater.Layout = _pageInfo.Level0Layout;
#if DEBUG
                        RepeaterTestHooks.SetLayoutId(repeater.Layout, string.Format("Year {0}", year.Value));
#endif
                        repeater.ItemTemplate = this;

                        break;
                    }
            }
        }

override void RecycleElementCore ( ElementFactoryRecycleArgs args ) [inline, protected]

Definition at line 59 of file RecipeViewGenerator.cs.

        {
            var element = args.Element;
            var owner = args.Parent;
            var key = (String)(element as FrameworkElement).Tag;
            Debug.Assert(key != null);
            RecyclePool.PutElement((FrameworkElement)element, key, owner);

#if DEBUG
            var containerAsFE = (FrameworkElement)element;

            switch (key)
            {
                case RecipeGroupType:
                    {
                        var repeater = (ItemsRepeater)containerAsFE.FindName("groupLayout");
                        var id = RepeaterTestHooks.GetLayoutId(repeater.Layout);
                        RepeaterTestHooks.SetLayoutId(repeater.Layout, id + "*");
                        break;
                    }
                case YearType:
                    {
                        var repeater = (ItemsRepeater)containerAsFE.FindName("yearLayout");
                        var id = RepeaterTestHooks.GetLayoutId(repeater.Layout);
                        RepeaterTestHooks.SetLayoutId(repeater.Layout, id + "*");
                        break;
                    }
            }
#endif
        }

Member Data Documentation

DataTemplate _groupTemplate [private]

Definition at line 17 of file RecipeViewGenerator.cs.

DataTemplate _itemTemplate [private]

Definition at line 16 of file RecipeViewGenerator.cs.

PageInfo _pageInfo [private]

Definition at line 20 of file RecipeViewGenerator.cs.

RecyclePool _sharedRecyclePool = new RecyclePool() [private]

Definition at line 19 of file RecipeViewGenerator.cs.

DataTemplate _yearTemplate [private]

Definition at line 18 of file RecipeViewGenerator.cs.

const string RecipeContainerType = "RecipeContainer"

Definition at line 22 of file RecipeViewGenerator.cs.

const string RecipeGroupType = "RecipeGroup"

Definition at line 23 of file RecipeViewGenerator.cs.

const string YearType = "Year"

Definition at line 24 of file RecipeViewGenerator.cs.

Property Documentation

RecyclePool RecyclePool [get, set]

Definition at line 26 of file RecipeViewGenerator.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/RecipeViewGenerator.cs
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScaleAnimatedVerticalListDemo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • ScaleAnimatedVerticalListDemo
Public Member Functions | Private Member Functions | Static Private Member Functions

ScaleAnimatedVerticalListDemo Class Reference

List of all members.

Public Member Functions

ScaleAnimatedVerticalListDemo ()

Private Member Functions

void | OnElementPrepared (Microsoft.UI.Xaml.Controls.ItemsRepeater sender, Microsoft.UI.Xaml.Controls.ItemsRepeaterElementPreparedEventArgs args)
void | OnItemClicked (object sender, RoutedEventArgs e)
void | OnItemGotFocus (object sender, RoutedEventArgs e)

Static Private Member Functions

static void | ScrollToCenterOfViewport (object sender)

Detailed Description

Definition at line 11 of file ScaleAnimatedVerticalListDemo.xaml.cs.

Constructor & Destructor Documentation

ScaleAnimatedVerticalListDemo ( ) [inline]

Definition at line 13 of file ScaleAnimatedVerticalListDemo.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemsSource = Enumerable.Range(0, 100);
            repeater.ElementPrepared += OnElementPrepared;
        }

Member Function Documentation

void OnElementPrepared | ( | Microsoft.UI.Xaml.Controls.ItemsRepeater | sender,
 |  | Microsoft.UI.Xaml.Controls.ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 20 of file ScaleAnimatedVerticalListDemo.xaml.cs.

        {
            var item = ElementCompositionPreview.GetElementVisual(args.Element);
            var svVisual = ElementCompositionPreview.GetElementVisual(sv);
            var scrollProperties = ElementCompositionPreview.GetScrollViewerManipulationPropertySet(sv);

            var scaleExpresion = scrollProperties.Compositor.CreateExpressionAnimation();
            scaleExpresion.SetReferenceParameter("svVisual", svVisual);
            scaleExpresion.SetReferenceParameter("scrollProperties", scrollProperties);
            scaleExpresion.SetReferenceParameter("item", item);

            // scale the item based on the distance of the item relative to the center of the viewport.
            scaleExpresion.Expression = "1 - abs((svVisual.Size.Y/2 - scrollProperties.Translation.Y) - (item.Offset.Y + item.Size.Y/2))*(.25/(svVisual.Size.Y/2))";
            item.StartAnimation("Scale.X", scaleExpresion);
            item.StartAnimation("Scale.Y", scaleExpresion);

            var centerPointExpression = scrollProperties.Compositor.CreateExpressionAnimation();
            centerPointExpression.SetReferenceParameter("item", item);
            centerPointExpression.Expression = "Vector3(item.Size.X/2, item.Size.Y/2, 0)";
            item.StartAnimation("CenterPoint", centerPointExpression);
        }

void OnItemClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 47 of file ScaleAnimatedVerticalListDemo.xaml.cs.

        {
            ScrollToCenterOfViewport(sender);
        }

void OnItemGotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 42 of file ScaleAnimatedVerticalListDemo.xaml.cs.

        {
            ScrollToCenterOfViewport(sender);
        }

static void ScrollToCenterOfViewport ( object sender ) [inline, static, private]

Definition at line 52 of file ScaleAnimatedVerticalListDemo.xaml.cs.

        {
            var item = sender as FrameworkElement;
            item.StartBringIntoView(new BringIntoViewOptions() {
                VerticalAlignmentRatio = 0.5,
                AnimationDesired = true,
            });
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/AnimationSamples/ScaleAnimatedVerticalListDemo.xaml.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BoolToBrushConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • BoolToBrushConverter
Public Member Functions

BoolToBrushConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 11 of file BoolToBrushConverter.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 13 of file BoolToBrushConverter.cs.

        {
            var val = value as bool?;
            if (!val.HasValue)
            {
                return new SolidColorBrush(Microsoft.UI.Colors.Yellow);
            }
            else
            {
                if (val.Value)
                {
                    return new SolidColorBrush(Microsoft.UI.Colors.Green);
                }
                else
                {
                    return new SolidColorBrush(Microsoft.UI.Colors.Transparent);
                }
            }
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 33 of file BoolToBrushConverter.cs.

        {
            throw new NotImplementedException();
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Common/BoolToBrushConverter.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BoolToVisibilityConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • BoolToVisibilityConverter
Public Member Functions

BoolToVisibilityConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 10 of file BoolToVisibilityConverter.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 12 of file BoolToVisibilityConverter.cs.

        {
            if ((bool)value)
            {
                {
                    return Visibility.Visible;
                }
            }

            return Visibility.Collapsed;
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 24 of file BoolToVisibilityConverter.cs.

        {
            throw new NotImplementedException();
        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Common/BoolToVisibilityConverter.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Data Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • Data
Static Public Member Functions | Static Private Attributes

Data Class Reference

List of all members.

Static Public Member Functions

static ObservableCollection
< object > 		CreateNested (int levels=3, int groupsAtLevel=5, int countAtLeaf=10)

Static Private Attributes

static int _next = 0

Detailed Description

Definition at line 9 of file Data.cs.

Member Function Documentation

static ObservableCollection<object> CreateNested | ( | int | levels = 3,
 |  | int | groupsAtLevel = 5,
 |  | int | countAtLeaf = 10 |
 | ) |  |  | [inline, static]

Definition at line 13 of file Data.cs.

        {
            var data = new ObservableCollection<object>();
            if (levels != 0)
            {
                for (int i = 0; i < groupsAtLevel; i++)
                {
                    data.Add(CreateNested(levels - 1, groupsAtLevel, countAtLeaf));
                }
            }
            else
            {
                for (int i = 0; i < countAtLeaf; i++)
                {
                    data.Add(_next++);
                }
            }

            return data;
        }

Member Data Documentation

int _next = 0 [static, private]

Definition at line 11 of file Data.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Common/Data.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlatSample Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • FlatSample
Public Member Functions | Private Member Functions | Private Attributes

FlatSample Class Reference

List of all members.

Public Member Functions

FlatSample ()

Private Member Functions

void | clear_Click (object sender, RoutedEventArgs e)
void | insert_Click (object sender, RoutedEventArgs e)
void | OnBackClicked (object sender, RoutedEventArgs e)
void | OnGroupedClicked (object sender, RoutedEventArgs e)
void | OnMultipleSelectionClicked (object sender, RoutedEventArgs e)
void | remove_Click (object sender, RoutedEventArgs e)
void | Repeater_ElementIndexChanged (ItemsRepeater sender, ItemsRepeaterElementIndexChangedEventArgs args)
void | Repeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | SelectionModel_PropertyChanged (object sender, PropertyChangedEventArgs e)

Private Attributes

ObservableCollection< string > | _data = new ObservableCollection<string>(Enumerable.Range(0, 1000).Select(x => x.ToString()))

Detailed Description

Definition at line 14 of file FlatSample.xaml.cs.

Constructor & Destructor Documentation

FlatSample ( ) [inline]

Definition at line 17 of file FlatSample.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemTemplate = elementFactory;
            repeater.ItemsSource = _data;
            selectionModel.Source = _data;
            repeater.ElementPrepared += Repeater_ElementPrepared;
            repeater.ElementIndexChanged += Repeater_ElementIndexChanged;
            selectionModel.PropertyChanged += SelectionModel_PropertyChanged;
        }

Member Function Documentation

void clear_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file FlatSample.xaml.cs.

        {
            _data.Move(0, 2);
            _data.Clear();
        }

void insert_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file FlatSample.xaml.cs.

        {
            var index = int.Parse(indexPath.Text);
            _data.Insert(index, "Insert:" + index.ToString());
        }

void OnBackClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 84 of file FlatSample.xaml.cs.

        {
            Frame.GoBack();
        }

void OnGroupedClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 79 of file FlatSample.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(GroupedSample));
        }

void OnMultipleSelectionClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 74 of file FlatSample.xaml.cs.

        {
            selectionModel.SingleSelect = multipleSelection.IsChecked.Value ? false : true;
        }

void remove_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 95 of file FlatSample.xaml.cs.

        {
            var index = int.Parse(indexPath.Text);
            _data.RemoveAt(index);
        }

void Repeater_ElementIndexChanged | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementIndexChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 64 of file FlatSample.xaml.cs.

        {
            (args.Element as RepeaterItem).RepeatedIndex = args.NewIndex;
        }

void Repeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 69 of file FlatSample.xaml.cs.

        {
            (args.Element as RepeaterItem).RepeatedIndex = args.Index;
        }

void SelectionModel_PropertyChanged | ( | object | sender,
 |  | PropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 28 of file FlatSample.xaml.cs.

        {
            var manager = sender as SelectionModel;
            if (e.PropertyName == "SelectedItem")
            {
                Debug.WriteLine("SelectedItem changed");
                Debug.WriteLine(manager.SelectedItem);
            }
            else if (e.PropertyName == "SelectedIndices")
            {
                Debug.WriteLine("SelectedIndices changed");
                for (int i = 0; i < manager.SelectedIndices.Count; i++)
                {
                    Debug.WriteLine(string.Format("{0}:{1}", manager.SelectedIndices[i], manager.SelectedItems[i].ToString()));
                }
            }
            else if (e.PropertyName == "SelectedItems")
            {
                Debug.WriteLine("SelectedItems changed");
                for (int i = 0; i < manager.SelectedIndices.Count; i++)
                {
                    Debug.WriteLine(string.Format("{0}:{1}", manager.SelectedIndices[i], manager.SelectedItems[i].ToString()));
                }
            }
            else if (e.PropertyName == "SelectedIndex")
            {
                Debug.WriteLine("SelectedIndex changed");
                Debug.WriteLine(manager.SelectedIndex);
            }

            var icpp = (Microsoft.UI.Xaml.Data.ICustomPropertyProvider)selectionModel;
            var selectedItemProperty = icpp.GetCustomProperty("SelectedItem");
            var canRead = selectedItemProperty.CanRead;
            var selectedItem =  selectedItemProperty.GetValue(selectionModel);
        }

Member Data Documentation

ObservableCollection<string> _data = new ObservableCollection<string>(Enumerable.Range(0, 1000).Select(x => x.ToString())) [private]

Definition at line 16 of file FlatSample.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Flat/FlatSample.xaml.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedRepeaterItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • GroupedRepeaterItem
Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions

GroupedRepeaterItem Class Reference

List of all members.

Public Member Functions

GroupedRepeaterItem ()
void | Deselect ()
void | Select ()

Static Public Attributes

static readonly DependencyProperty | IsSelectedProperty
static readonly DependencyProperty | RepeatedIndexProperty
static readonly DependencyProperty | SelectionModelProperty

Protected Member Functions

override AutomationPeer | OnCreateAutomationPeer ()
override void | OnKeyUp (KeyRoutedEventArgs e)
override void | OnPointerPressed (PointerRoutedEventArgs e)

Properties

bool | IsSelected [get, set]
int | RepeatedIndex [get, set]
SelectionModel | SelectionModel [get, set]

Private Member Functions

int | GetGroupIndex ()
void | OnselectionModelChanged (object sender, PropertyChangedEventArgs e)

Static Private Member Functions

static void | OnPropertyChanged (DependencyObject obj, DependencyPropertyChangedEventArgs args)

Detailed Description

Definition at line 14 of file GroupedRepeaterItem.cs.

Constructor & Destructor Documentation

GroupedRepeaterItem ( ) [inline]

Definition at line 16 of file GroupedRepeaterItem.cs.

        {
            IsTabStop = true;
            UseSystemFocusVisuals = true;
            Margin = new Thickness(3);
        }

Member Function Documentation

void Deselect ( ) [inline]

Definition at line 80 of file GroupedRepeaterItem.cs.

        {
            SelectionModel.Deselect(GetGroupIndex(), RepeatedIndex);
        }

int GetGroupIndex ( ) [inline, private]

Definition at line 157 of file GroupedRepeaterItem.cs.

        {
            var child = this.Parent as FrameworkElement;
            var parent = child.Parent as FrameworkElement;

            while (!(parent is ItemsRepeater))
            {
                child = parent;
                parent = parent.Parent as FrameworkElement;
            }

            var groupIndex = (parent as ItemsRepeater).GetElementIndex(child);

            return groupIndex;
        }

override AutomationPeer OnCreateAutomationPeer ( ) [inline, protected]

Definition at line 152 of file GroupedRepeaterItem.cs.

        {
            return new GroupedRepeaterItemAutomationPeer(this);
        }

override void OnKeyUp ( KeyRoutedEventArgs e ) [inline, protected]

Definition at line 85 of file GroupedRepeaterItem.cs.

        {
            if (SelectionModel != null)
            {
                if (e.Key == VirtualKey.Escape)
                {
                    SelectionModel.ClearSelection();
                }
                else if (e.Key == VirtualKey.Space)
                {
                    Select();
                }
                else if (!SelectionModel.SingleSelect)
                {
                    var isShiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
                    var isCtrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
                    if (e.Key == VirtualKey.A && isCtrlPressed)
                    {
                        SelectionModel.SelectAll();
                    }
                    else if (isShiftPressed)
                    {
                        SelectionModel.SelectRangeFromAnchor(GetGroupIndex(), RepeatedIndex);
                    }
                }
            }

            base.OnKeyUp(e);
        }

override void OnPointerPressed ( PointerRoutedEventArgs e ) [inline, protected]

Definition at line 115 of file GroupedRepeaterItem.cs.

        {
            if (SelectionModel != null)
            {
                if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Shift) && !SelectionModel.SingleSelect)
                {
                    if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
                    {
                        SelectionModel.DeselectRangeFromAnchor(GetGroupIndex(), RepeatedIndex);
                    }
                    else
                    {
                        SelectionModel.SelectRangeFromAnchor(GetGroupIndex(), RepeatedIndex);
                    }
                }
                else if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
                {
                    var groupIndex = GetGroupIndex();
                    if (SelectionModel.IsSelected(groupIndex, RepeatedIndex).Value)
                    {
                        Deselect();
                    }
                    else
                    {
                        Select();
                    }
                }
                else
                {
                    Select();
                    this.Focus(FocusState.Keyboard);
                }
            }

            base.OnPointerPressed(e);
        }

static void OnPropertyChanged | ( | DependencyObject | obj,
 |  | DependencyPropertyChangedEventArgs | args |
 | ) |  |  | [inline, static, private]

Definition at line 50 of file GroupedRepeaterItem.cs.

        {
            if (args.Property == RepeatedIndexProperty)
            {
                var item = obj as GroupedRepeaterItem;
                if (item.SelectionModel != null)
                {
                    int groupIndex = item.GetGroupIndex();
                    item.IsSelected = groupIndex >= 0 ? item.SelectionModel.IsSelected(groupIndex, item.RepeatedIndex).Value : false;
                }
            }
            else if (args.Property == SelectionModelProperty)
            {
                if (args.OldValue != null)
                {
                    (args.OldValue as SelectionModel).PropertyChanged -= (obj as GroupedRepeaterItem).OnselectionModelChanged;
                }

                if (args.NewValue != null)
                {
                    (args.NewValue as SelectionModel).PropertyChanged += (obj as GroupedRepeaterItem).OnselectionModelChanged;
                }
            }
        }

void OnselectionModelChanged | ( | object | sender,
 |  | PropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 173 of file GroupedRepeaterItem.cs.

        {
            if (e.PropertyName == "SelectedIndices")
            {
                bool oldValue = IsSelected;
                var groupIndex = GetGroupIndex();
                bool newValue = groupIndex >= 0 ? SelectionModel.IsSelected(groupIndex, RepeatedIndex).Value : false;

                if (oldValue != newValue)
                {
                    IsSelected = newValue;

                    // AutomationEvents.PropertyChanged is used as a value that means dont raise anything
                    AutomationEvents eventToRaise =
                        oldValue ?
                            (SelectionModel.SingleSelect ? AutomationEvents.PropertyChanged : AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection) :
                            (SelectionModel.SingleSelect ? AutomationEvents.SelectionItemPatternOnElementSelected : AutomationEvents.SelectionItemPatternOnElementAddedToSelection);

                    if (eventToRaise != AutomationEvents.PropertyChanged && AutomationPeer.ListenerExists(eventToRaise))
                    {
                        var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
                        peer.RaiseAutomationEvent(eventToRaise);
                    }
                }
            }
        }

void Select ( ) [inline]

Definition at line 75 of file GroupedRepeaterItem.cs.

        {
            SelectionModel.Select(GetGroupIndex(), RepeatedIndex);
        }

Member Data Documentation

readonly DependencyProperty IsSelectedProperty [static]
Initial value:
            DependencyProperty.Register("IsSelected", typeof(bool), typeof(GroupedRepeaterItem), new PropertyMetadata(false))

Definition at line 47 of file GroupedRepeaterItem.cs.

readonly DependencyProperty RepeatedIndexProperty [static]
Initial value:
            DependencyProperty.Register("RepeatedIndex", typeof(int), typeof(GroupedRepeaterItem), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 38 of file GroupedRepeaterItem.cs.

readonly DependencyProperty SelectionModelProperty [static]
Initial value:
            DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(GroupedRepeaterItem), new PropertyMetadata(null, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 29 of file GroupedRepeaterItem.cs.

Property Documentation

bool IsSelected [get, set]

Definition at line 42 of file GroupedRepeaterItem.cs.

int RepeatedIndex [get, set]

Definition at line 33 of file GroupedRepeaterItem.cs.

SelectionModel SelectionModel [get, set]

Definition at line 24 of file GroupedRepeaterItem.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItem.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedRepeaterItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • GroupedRepeaterItemAutomationPeer
Public Member Functions | Protected Member Functions | Properties | Private Attributes

GroupedRepeaterItemAutomationPeer Class Reference

List of all members.

Public Member Functions

GroupedRepeaterItemAutomationPeer (FrameworkElement owner)
void | AddToSelection ()
void | RemoveFromSelection ()
void | Select ()

Protected Member Functions

override AutomationControlType | GetAutomationControlTypeCore ()
override string | GetLocalizedControlTypeCore ()
override object | GetPatternCore (PatternInterface patternInterface)

Properties

bool | IsSelected [get]
IRawElementProviderSimple | SelectionContainer [get]

Private Attributes

GroupedRepeaterItem _owner

Detailed Description

Definition at line 10 of file GroupedRepeaterItemAutomationPeer.cs.

Constructor & Destructor Documentation

GroupedRepeaterItemAutomationPeer ( FrameworkElement owner ) [inline]

Definition at line 13 of file GroupedRepeaterItemAutomationPeer.cs.

                                                                         : base(owner)
        {
            _owner = (GroupedRepeaterItem)owner;
        }

Member Function Documentation

void AddToSelection ( ) [inline]

Definition at line 28 of file GroupedRepeaterItemAutomationPeer.cs.

        {
            _owner.Select();
        }

override AutomationControlType GetAutomationControlTypeCore ( ) [inline, protected]

Definition at line 73 of file GroupedRepeaterItemAutomationPeer.cs.

        {
            return AutomationControlType.ListItem;
        }

override string GetLocalizedControlTypeCore ( ) [inline, protected]

Definition at line 78 of file GroupedRepeaterItemAutomationPeer.cs.

        {
            return "Item";
        }

override object GetPatternCore ( PatternInterface patternInterface ) [inline, protected]

Definition at line 18 of file GroupedRepeaterItemAutomationPeer.cs.

        {
            if (patternInterface == PatternInterface.SelectionItem)
            {
                return this;
            }

            return base.GetPatternCore(patternInterface);
        }

void RemoveFromSelection ( ) [inline]

Definition at line 33 of file GroupedRepeaterItemAutomationPeer.cs.

        {
            _owner.Deselect();
        }

void Select ( ) [inline]

Definition at line 38 of file GroupedRepeaterItemAutomationPeer.cs.

        {
            _owner.Select();
        }

Member Data Documentation

GroupedRepeaterItem _owner [private]

Definition at line 12 of file GroupedRepeaterItemAutomationPeer.cs.

Property Documentation

bool IsSelected [get]

Definition at line 44 of file GroupedRepeaterItemAutomationPeer.cs.

IRawElementProviderSimple SelectionContainer [get]

Definition at line 52 of file GroupedRepeaterItemAutomationPeer.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItemAutomationPeer.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: GroupedSample Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • GroupedSample
Public Member Functions | Private Member Functions | Private Attributes

GroupedSample Class Reference

List of all members.

Public Member Functions

GroupedSample ()

Private Member Functions

void | groupRepeater_ElementIndexChanged (ItemsRepeater sender, ItemsRepeaterElementIndexChangedEventArgs args)
void | groupRepeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | OnBackClicked (object sender, RoutedEventArgs e)
void | OnMultipleSelectionClicked (object sender, RoutedEventArgs e)
void | OnSelectTemplateKey (RecyclingElementFactory sender, SelectTemplateEventArgs args)
void | OnTreeViewClicked (object sender, RoutedEventArgs e)

Private Attributes

ObservableCollection< object > | _groupedData = new ObservableCollection<object>(Enumerable.Range(0, 10).Select(i => Enumerable.Range(0, 20).Select(j => j.ToString()).ToList()))
StackLayout | _layout = new StackLayout()
Random | _rnd = new Random(12345)

Detailed Description

Definition at line 13 of file GroupedSample.xaml.cs.

Constructor & Destructor Documentation

GroupedSample ( ) [inline]

Definition at line 19 of file GroupedSample.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemsSource = _groupedData;
            selectionModel.Source = _groupedData;
        }

Member Function Documentation

void groupRepeater_ElementIndexChanged | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementIndexChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 54 of file GroupedSample.xaml.cs.

        {
            if (args.Element is GroupedRepeaterItem)
            {
                (args.Element as GroupedRepeaterItem).RepeatedIndex = args.NewIndex;
            }
        }

void groupRepeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 36 of file GroupedSample.xaml.cs.

        {
            if (args.Element is GroupedRepeaterItem)
            {
                (args.Element as GroupedRepeaterItem).RepeatedIndex = args.Index;
            }
        }

void OnBackClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file GroupedSample.xaml.cs.

        {
            Frame.GoBack();
        }

void OnMultipleSelectionClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file GroupedSample.xaml.cs.

        {
            selectionModel.SingleSelect = multipleSelection.IsChecked.Value ? false : true;
        }

void OnSelectTemplateKey | ( | RecyclingElementFactory | sender,
 |  | SelectTemplateEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 31 of file GroupedSample.xaml.cs.

        {
            args.TemplateKey = args.DataContext is string ? "RepeaterItemTemplate" : "RepeaterGroupTemplate";
        }

void OnTreeViewClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file GroupedSample.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(TreeViewSample));
        }

Member Data Documentation

ObservableCollection<object> _groupedData = new ObservableCollection<object>(Enumerable.Range(0, 10).Select(i => Enumerable.Range(0, 20).Select(j => j.ToString()).ToList())) [private]

Definition at line 17 of file GroupedSample.xaml.cs.

StackLayout _layout = new StackLayout() [private]

Definition at line 16 of file GroupedSample.xaml.cs.

Random _rnd = new Random(12345) [private]

Definition at line 15 of file GroupedSample.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedSample.xaml.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • RepeaterItem
Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions

RepeaterItem Class Reference

List of all members.

Public Member Functions

RepeaterItem ()

Static Public Attributes

static readonly DependencyProperty | IsSelectedProperty
static readonly DependencyProperty | RepeatedIndexProperty
static readonly DependencyProperty | SelectionModelProperty

Protected Member Functions

override AutomationPeer | OnCreateAutomationPeer ()
override void | OnKeyUp (KeyRoutedEventArgs e)
override void | OnPointerPressed (PointerRoutedEventArgs e)

Properties

bool | IsSelected [get, set]
int | RepeatedIndex [get, set]
SelectionModel | SelectionModel [get, set]

Private Member Functions

void | OnselectionModelChanged (object sender, PropertyChangedEventArgs e)

Static Private Member Functions

static void | OnPropertyChanged (DependencyObject obj, DependencyPropertyChangedEventArgs args)

Detailed Description

Definition at line 14 of file RepeaterItem.cs.

Constructor & Destructor Documentation

RepeaterItem ( ) [inline]

Definition at line 16 of file RepeaterItem.cs.

        {
            IsTabStop = true;
            UseSystemFocusVisuals = true;
            Margin = new Thickness(3);
        }

Member Function Documentation

override AutomationPeer OnCreateAutomationPeer ( ) [inline, protected]

Definition at line 140 of file RepeaterItem.cs.

        {
            return new RepeaterItemAutomationPeer(this);
        }

override void OnKeyUp ( KeyRoutedEventArgs e ) [inline, protected]

Definition at line 74 of file RepeaterItem.cs.

        {
            if (SelectionModel != null)
            {
                if (e.Key == VirtualKey.Escape)
                {
                    SelectionModel.ClearSelection();
                }
                else if (e.Key == VirtualKey.Space)
                {
                    SelectionModel.Select(RepeatedIndex);
                }
                else if (!SelectionModel.SingleSelect)
                {
                    var isShiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
                    var isCtrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
                    if (e.Key == VirtualKey.A && isCtrlPressed)
                    {
                        SelectionModel.SelectAll();
                    }
                    else if (isShiftPressed)
                    {
                        SelectionModel.SelectRangeFromAnchor(RepeatedIndex);
                    }
                }
            }

            base.OnKeyUp(e);
        }

override void OnPointerPressed ( PointerRoutedEventArgs e ) [inline, protected]

Definition at line 104 of file RepeaterItem.cs.

        {
            if (SelectionModel != null)
            {
                if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Shift) && !SelectionModel.SingleSelect)
                {
                    if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
                    {
                        SelectionModel.DeselectRangeFromAnchor(RepeatedIndex);
                    }
                    else
                    {
                        SelectionModel.SelectRangeFromAnchor(RepeatedIndex);
                    }
                }
                else if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
                {
                    if (SelectionModel.IsSelected(RepeatedIndex).Value)
                    {
                        SelectionModel.Deselect(RepeatedIndex);
                    }
                    else
                    {
                        SelectionModel.Select(RepeatedIndex);
                    }
                }
                else
                {
                    SelectionModel.Select(RepeatedIndex);
                    this.Focus(FocusState.Keyboard);
                }
            }

            base.OnPointerPressed(e);
        }

static void OnPropertyChanged | ( | DependencyObject | obj,
 |  | DependencyPropertyChangedEventArgs | args |
 | ) |  |  | [inline, static, private]

Definition at line 50 of file RepeaterItem.cs.

        {
            if (args.Property == RepeatedIndexProperty)
            {
                var item = obj as RepeaterItem;
                if (item.SelectionModel != null)
                {
                    item.IsSelected = item.SelectionModel.IsSelected(item.RepeatedIndex).Value;
                }
            }
            else if (args.Property == SelectionModelProperty)
            {
                if (args.OldValue != null)
                {
                    (args.OldValue as SelectionModel).PropertyChanged -= (obj as RepeaterItem).OnselectionModelChanged;
                }

                if (args.NewValue != null)
                {
                    (args.NewValue as SelectionModel).PropertyChanged += (obj as RepeaterItem).OnselectionModelChanged;
                }
            }
        }

void OnselectionModelChanged | ( | object | sender,
 |  | PropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 145 of file RepeaterItem.cs.

        {
            if (e.PropertyName == "SelectedIndices")
            {
                bool oldValue = IsSelected;
                bool newValue = SelectionModel.IsSelected(RepeatedIndex).Value;
                if (oldValue != newValue)
                {
                    IsSelected = newValue;

                    // AutomationEvents.PropertyChanged is used as a value that means dont raise anything
                    AutomationEvents eventToRaise =
                        oldValue ?
                            (SelectionModel.SingleSelect ? AutomationEvents.PropertyChanged : AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection) :
                            (SelectionModel.SingleSelect ? AutomationEvents.SelectionItemPatternOnElementSelected : AutomationEvents.SelectionItemPatternOnElementAddedToSelection);

                    if (eventToRaise != AutomationEvents.PropertyChanged && AutomationPeer.ListenerExists(eventToRaise))
                    {
                        var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
                        peer.RaiseAutomationEvent(eventToRaise);
                    }
                }
            }
        }

Member Data Documentation

readonly DependencyProperty IsSelectedProperty [static]
Initial value:
            DependencyProperty.Register("IsSelected", typeof(bool), typeof(RepeaterItem), new PropertyMetadata(false))

Definition at line 47 of file RepeaterItem.cs.

readonly DependencyProperty RepeatedIndexProperty [static]
Initial value:
            DependencyProperty.Register("RepeatedIndex", typeof(int), typeof(RepeaterItem), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 38 of file RepeaterItem.cs.

readonly DependencyProperty SelectionModelProperty [static]
Initial value:
            DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(RepeaterItem), new PropertyMetadata(null, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 29 of file RepeaterItem.cs.

Property Documentation

bool IsSelected [get, set]

Definition at line 42 of file RepeaterItem.cs.

int RepeatedIndex [get, set]

Definition at line 33 of file RepeaterItem.cs.

SelectionModel SelectionModel [get, set]

Definition at line 24 of file RepeaterItem.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItem.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • RepeaterItemAutomationPeer
Public Member Functions | Protected Member Functions | Properties | Private Attributes

RepeaterItemAutomationPeer Class Reference

List of all members.

Public Member Functions

RepeaterItemAutomationPeer (FrameworkElement owner)
void | AddToSelection ()
void | RemoveFromSelection ()
void | Select ()

Protected Member Functions

override AutomationControlType | GetAutomationControlTypeCore ()
override string | GetLocalizedControlTypeCore ()
override object | GetPatternCore (PatternInterface patternInterface)

Properties

bool | IsSelected [get]
IRawElementProviderSimple | SelectionContainer [get]

Private Attributes

RepeaterItem _owner

Detailed Description

Definition at line 10 of file RepeaterItemAutomationPeer.cs.

Constructor & Destructor Documentation

RepeaterItemAutomationPeer ( FrameworkElement owner ) [inline]

Definition at line 13 of file RepeaterItemAutomationPeer.cs.

                                                                  : base(owner)
        {
            _owner = (RepeaterItem)owner;
        }

Member Function Documentation

void AddToSelection ( ) [inline]

Definition at line 28 of file RepeaterItemAutomationPeer.cs.

        {
            _owner.SelectionModel.Select(_owner.RepeatedIndex);
        }

override AutomationControlType GetAutomationControlTypeCore ( ) [inline, protected]

Definition at line 73 of file RepeaterItemAutomationPeer.cs.

        {
            return AutomationControlType.ListItem;
        }

override string GetLocalizedControlTypeCore ( ) [inline, protected]

Definition at line 78 of file RepeaterItemAutomationPeer.cs.

        {
            return "Item";
        }

override object GetPatternCore ( PatternInterface patternInterface ) [inline, protected]

Definition at line 18 of file RepeaterItemAutomationPeer.cs.

        {
            if (patternInterface == PatternInterface.SelectionItem)
            {
                return this;
            }

            return base.GetPatternCore(patternInterface);
        }

void RemoveFromSelection ( ) [inline]

Definition at line 33 of file RepeaterItemAutomationPeer.cs.

        {
            _owner.SelectionModel.Deselect(_owner.RepeatedIndex);
        }

void Select ( ) [inline]

Definition at line 38 of file RepeaterItemAutomationPeer.cs.

        {
            _owner.SelectionModel.Select(_owner.RepeatedIndex);
        }

Member Data Documentation

RepeaterItem _owner [private]

Definition at line 12 of file RepeaterItemAutomationPeer.cs.

Property Documentation

bool IsSelected [get]

Definition at line 44 of file RepeaterItemAutomationPeer.cs.

IRawElementProviderSimple SelectionContainer [get]

Definition at line 52 of file RepeaterItemAutomationPeer.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItemAutomationPeer.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionContainer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • SelectionContainer
Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions

SelectionContainer Class Reference

List of all members.

Public Member Functions

SelectionContainer ()

Static Public Attributes

static readonly DependencyProperty | SelectionModelProperty

Protected Member Functions

override AutomationPeer | OnCreateAutomationPeer ()

Properties

SelectionModel | SelectionModel [get, set]

Private Member Functions

void | OnSelectionChanged (SelectionModel sender, SelectionModelSelectionChangedEventArgs args)

Static Private Member Functions

static void | OnSelectionModelChanged (DependencyObject sender, DependencyPropertyChangedEventArgs args)

Detailed Description

Definition at line 10 of file SelectionContainer.cs.

Constructor & Destructor Documentation

SelectionContainer ( ) [inline]

Definition at line 12 of file SelectionContainer.cs.

        {
            IsTabStop = false;
        }

Member Function Documentation

override AutomationPeer OnCreateAutomationPeer ( ) [inline, protected]

Definition at line 50 of file SelectionContainer.cs.

        {
            return new SelectionContainerAutomationPeer(this);
        }

void OnSelectionChanged | ( | SelectionModel | sender,
 |  | SelectionModelSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 41 of file SelectionContainer.cs.

        {
            if(AutomationPeer.ListenerExists(AutomationEvents.SelectionPatternOnInvalidated))
            {
                var peer = (SelectionContainerAutomationPeer)FrameworkElementAutomationPeer.CreatePeerForElement(this);
                peer.SelectionChanged(args);
            }
        }

static void OnSelectionModelChanged | ( | DependencyObject | sender,
 |  | DependencyPropertyChangedEventArgs | args |
 | ) |  |  | [inline, static, private]

Definition at line 26 of file SelectionContainer.cs.

        {
            if(args.OldValue != null)
            {
                var old = (SelectionModel)args.OldValue;
                old.SelectionChanged -= (sender as SelectionContainer).OnSelectionChanged;
            }

            if(args.NewValue != null)
            {
                var newValue = (SelectionModel)args.NewValue;
                newValue.SelectionChanged += (sender as SelectionContainer).OnSelectionChanged;
            }
        }

Member Data Documentation

readonly DependencyProperty SelectionModelProperty [static]
Initial value:
            DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(SelectionContainer), new PropertyMetadata(null, new PropertyChangedCallback(OnSelectionModelChanged)))

Definition at line 23 of file SelectionContainer.cs.

Property Documentation

SelectionModel SelectionModel [get, set]

Definition at line 18 of file SelectionContainer.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainer.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionContainerAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • SelectionContainerAutomationPeer
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

SelectionContainerAutomationPeer Class Reference

List of all members.

Public Member Functions

SelectionContainerAutomationPeer (FrameworkElement owner)
IRawElementProviderSimple[] | GetSelection ()

Protected Member Functions

override object | GetPatternCore (PatternInterface patternInterface)

Properties

bool | CanSelectMultiple [get]
bool | IsSelectionRequired [get]

Private Member Functions

internal void | SelectionChanged (SelectionModelSelectionChangedEventArgs args)

Private Attributes

SelectionContainer _owner

Detailed Description

Definition at line 12 of file SelectionContainerAutomationPeer.cs.

Constructor & Destructor Documentation

SelectionContainerAutomationPeer ( FrameworkElement owner ) [inline]

Definition at line 16 of file SelectionContainerAutomationPeer.cs.

                                                                        :
            base(owner)
        {
            _owner = (SelectionContainer)owner;
        }

Member Function Documentation

override object GetPatternCore ( PatternInterface patternInterface ) [inline, protected]

Definition at line 22 of file SelectionContainerAutomationPeer.cs.

        {
            if (patternInterface == PatternInterface.Selection)
            {
                return this;
            }

            return base.GetPatternCore(patternInterface);
        }

IRawElementProviderSimple [] GetSelection ( ) [inline]

Definition at line 32 of file SelectionContainerAutomationPeer.cs.

        {
            List<IRawElementProviderSimple> selected = new List<IRawElementProviderSimple>();
            // TODO: Need to get peers here or work with accesibility team to figure
            // out what to give here. The selected elements might not be realized.
            return selected.ToArray();
        }

internal void SelectionChanged ( SelectionModelSelectionChangedEventArgs args ) [inline, private]

Definition at line 56 of file SelectionContainerAutomationPeer.cs.

        {
            RaiseAutomationEvent(AutomationEvents.SelectionPatternOnInvalidated);
        }

Member Data Documentation

SelectionContainer _owner [private]

Definition at line 14 of file SelectionContainerAutomationPeer.cs.

Property Documentation

bool CanSelectMultiple [get]

Definition at line 41 of file SelectionContainerAutomationPeer.cs.

bool IsSelectionRequired [get]

Definition at line 49 of file SelectionContainerAutomationPeer.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainerAutomationPeer.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • TreeViewItem
Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions

TreeViewItem Class Reference

List of all members.

Public Member Functions

TreeViewItem ()
void | Select (bool select)

Static Public Attributes

static readonly DependencyProperty | IsSelectedProperty
static readonly DependencyProperty | RepeatedIndexProperty
static readonly DependencyProperty | SelectionModelProperty

Protected Member Functions

override AutomationPeer | OnCreateAutomationPeer ()
override void | OnKeyUp (KeyRoutedEventArgs e)
override void | OnPointerPressed (PointerRoutedEventArgs e)

Properties

bool | IsSelected [get, set]
int | RepeatedIndex [get, set]
SelectionModel | SelectionModel [get, set]

Private Member Functions

IndexPath GetIndexPath ()
void | OnselectionModelChanged (object sender, PropertyChangedEventArgs e)

Static Private Member Functions

static bool | IsRealized (IndexPath indexPath)
static void | OnPropertyChanged (DependencyObject obj, DependencyPropertyChangedEventArgs args)

Detailed Description

Definition at line 17 of file TreeViewItem.cs.

Constructor & Destructor Documentation

TreeViewItem ( ) [inline]

Definition at line 19 of file TreeViewItem.cs.

        {
            IsTabStop = true;
            UseSystemFocusVisuals = true;
            Margin = new Thickness(5);
        }

Member Function Documentation

IndexPath GetIndexPath ( ) [inline, private]

Definition at line 190 of file TreeViewItem.cs.

        {
            var child = this as FrameworkElement;
            var parent = child.Parent as FrameworkElement;
            List<int> path = new List<int>();

            // TOOD: Hack to know when to stop
            while (!(parent is ItemsRepeater) || (parent as ItemsRepeater).Name != "rootRepeater")
            {
                if (parent is ItemsRepeater)
                {
                    path.Insert(0, (parent as ItemsRepeater).GetElementIndex(child));
                }

                child = parent;
                parent = parent.Parent as FrameworkElement;
            }

            path.Insert(0, (parent as ItemsRepeater).GetElementIndex(child));

            return IndexPath.CreateFromIndices(path);
        }

static bool IsRealized ( IndexPath indexPath ) [inline, static, private]

Definition at line 244 of file TreeViewItem.cs.

        {
            bool isRealized = true;
            for (int i = 0; i < indexPath.GetSize(); i++)
            {
                if (indexPath.GetAt(i) < 0)
                {
                    isRealized = false;
                    break;
                }
            }

            return isRealized;
        }

override AutomationPeer OnCreateAutomationPeer ( ) [inline, protected]

Definition at line 185 of file TreeViewItem.cs.

        {
            return new TreeViewItemAutomationPeer(this);
        }

override void OnKeyUp ( KeyRoutedEventArgs e ) [inline, protected]

Definition at line 97 of file TreeViewItem.cs.

        {
            var indexPath = GetIndexPath();
            Debug.WriteLine("OnKeyUp:" + indexPath.ToString());

            if (SelectionModel != null)
            {
                if (e.Key == VirtualKey.Escape)
                {
                    SelectionModel.ClearSelection();
                }
                else if (e.Key == VirtualKey.Space)
                {
                    SelectionModel.SelectAt(indexPath);
                }
                else if (!SelectionModel.SingleSelect)
                {
                    var isShiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
                    var isCtrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
                    if (e.Key == VirtualKey.A && isCtrlPressed)
                    {
                        SelectionModel.SelectAll();
                    }
                    else if (isCtrlPressed && e.Key == VirtualKey.Space)
                    {
                        if(SelectionModel.IsSelectedAt(indexPath).Value)
                        {
                            SelectionModel.DeselectAt(indexPath);
                        }
                        else
                        {
                            SelectionModel.SelectAt(indexPath);
                        }
                    }
                    else if (isShiftPressed)
                    {
                        SelectionModel.SelectRangeFromAnchorTo(GetIndexPath());
                    }
                }
            }

            base.OnKeyUp(e);
        }

override void OnPointerPressed ( PointerRoutedEventArgs e ) [inline, protected]

Definition at line 141 of file TreeViewItem.cs.

        {
            if (!e.Handled)
            {
                var indexPath = GetIndexPath();
                Debug.WriteLine("OnPointerPressed:" + indexPath.ToString());

                if (SelectionModel != null)
                {
                    if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Shift) && !SelectionModel.SingleSelect)
                    {
                        if(e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
                        {
                            SelectionModel.DeselectRangeFromAnchorTo(GetIndexPath());
                        }
                        else
                        {
                            SelectionModel.SelectRangeFromAnchorTo(GetIndexPath());
                        }
                    }
                    else if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
                    {
                        var path = GetIndexPath();
                        if(SelectionModel.IsSelectedAt(path).Value)
                        {
                            SelectionModel.SelectAt(path);
                        }
                        else
                        {
                            SelectionModel.SelectAt(path);
                        }
                    }
                    else
                    {
                        SelectionModel.SelectAt(GetIndexPath());
                        this.Focus(FocusState.Keyboard);
                    }
                }

                e.Handled = true;
                base.OnPointerPressed(e);
            }
        }

static void OnPropertyChanged | ( | DependencyObject | obj,
 |  | DependencyPropertyChangedEventArgs | args |
 | ) |  |  | [inline, static, private]

Definition at line 69 of file TreeViewItem.cs.

        {
            if (args.Property == RepeatedIndexProperty)
            {
                var item = obj as TreeViewItem;
                var indexPath = item.GetIndexPath();
                if (item.SelectionModel != null)
                {
                    item.IsSelected = IsRealized(indexPath) ? item.SelectionModel.IsSelectedAt(indexPath) : false;
                }

                AutomationProperties.SetLevel(item, indexPath.GetSize());
            }
            else
            if (args.Property == SelectionModelProperty)
            {
                if (args.OldValue != null)
                {
                    (args.OldValue as SelectionModel).PropertyChanged -= (obj as TreeViewItem).OnselectionModelChanged;
                }

                if (args.NewValue != null)
                {
                    (args.NewValue as SelectionModel).PropertyChanged += (obj as TreeViewItem).OnselectionModelChanged;
                }
            }
        }

void OnselectionModelChanged | ( | object | sender,
 |  | PropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 213 of file TreeViewItem.cs.

        {
            if (e.PropertyName == "SelectedIndices")
            {
                bool? oldValue = IsSelected;
                var indexPath = GetIndexPath();
                bool? newValue = IsRealized(indexPath) ? SelectionModel.IsSelectedAt(indexPath) : false;

                if (oldValue != newValue)
                {
                    IsSelected = newValue;
                    bool oldValueAsBool = oldValue.HasValue && oldValue.Value;
                    bool newValueAsBool = newValue.HasValue && newValue.Value;
                    if (oldValueAsBool != newValueAsBool)
                    {
                        // AutomationEvents.PropertyChanged is used as a value that means dont raise anything
                        AutomationEvents eventToRaise =
                            oldValueAsBool ?
                                (SelectionModel.SingleSelect ? AutomationEvents.PropertyChanged : AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection) :
                                (SelectionModel.SingleSelect ? AutomationEvents.SelectionItemPatternOnElementSelected : AutomationEvents.SelectionItemPatternOnElementAddedToSelection);

                        if (eventToRaise != AutomationEvents.PropertyChanged && AutomationPeer.ListenerExists(eventToRaise))
                        {
                            var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
                            peer.RaiseAutomationEvent(eventToRaise);
                        }
                    }
                }
            }
        }

void Select ( bool select ) [inline]

Definition at line 44 of file TreeViewItem.cs.

        {
            if (SelectionModel != null)
            {
                var indexPath = GetIndexPath();
                if(select)
                {
                    SelectionModel.SelectAt(indexPath);
                }
                else
                {
                    SelectionModel.DeselectAt(indexPath);
                }
            }
        }

Member Data Documentation

readonly DependencyProperty IsSelectedProperty [static]
Initial value:
            DependencyProperty.Register("IsSelected", typeof(bool?), typeof(TreeViewItem), new PropertyMetadata(false))

Definition at line 41 of file TreeViewItem.cs.

readonly DependencyProperty RepeatedIndexProperty [static]
Initial value:
            DependencyProperty.Register("RepeatedIndex", typeof(int), typeof(TreeViewItem), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 66 of file TreeViewItem.cs.

readonly DependencyProperty SelectionModelProperty [static]
Initial value:
            DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(TreeViewItem), new PropertyMetadata(null, new PropertyChangedCallback(OnPropertyChanged)))

Definition at line 32 of file TreeViewItem.cs.

Property Documentation

bool IsSelected [get, set]

Definition at line 36 of file TreeViewItem.cs.

int RepeatedIndex [get, set]

Definition at line 61 of file TreeViewItem.cs.

SelectionModel SelectionModel [get, set]

Definition at line 27 of file TreeViewItem.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewItem.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • TreeViewItemAutomationPeer
Public Member Functions | Protected Member Functions | Properties | Private Attributes

TreeViewItemAutomationPeer Class Reference

List of all members.

Public Member Functions

TreeViewItemAutomationPeer (FrameworkElement owner)
void | AddToSelection ()
void | RemoveFromSelection ()
void | Select ()

Protected Member Functions

override AutomationControlType | GetAutomationControlTypeCore ()
override string | GetLocalizedControlTypeCore ()
override object | GetPatternCore (PatternInterface patternInterface)

Properties

bool | IsSelected [get]
IRawElementProviderSimple | SelectionContainer [get]

Private Attributes

TreeViewItem _owner

Detailed Description

Definition at line 10 of file TreeViewItemAutomationPeer.cs.

Constructor & Destructor Documentation

TreeViewItemAutomationPeer ( FrameworkElement owner ) [inline]

Definition at line 13 of file TreeViewItemAutomationPeer.cs.

                                                                  : base(owner)
        {
            _owner = (TreeViewItem)owner;
        }

Member Function Documentation

void AddToSelection ( ) [inline]

Definition at line 28 of file TreeViewItemAutomationPeer.cs.

        {
            _owner.Select(true);
        }

override AutomationControlType GetAutomationControlTypeCore ( ) [inline, protected]

Definition at line 73 of file TreeViewItemAutomationPeer.cs.

        {
            return AutomationControlType.ListItem;
        }

override string GetLocalizedControlTypeCore ( ) [inline, protected]

Definition at line 78 of file TreeViewItemAutomationPeer.cs.

        {
            return "Item";
        }

override object GetPatternCore ( PatternInterface patternInterface ) [inline, protected]

Definition at line 18 of file TreeViewItemAutomationPeer.cs.

        {
            if (patternInterface == PatternInterface.SelectionItem)
            {
                return this;
            }

            return base.GetPatternCore(patternInterface);
        }

void RemoveFromSelection ( ) [inline]

Definition at line 33 of file TreeViewItemAutomationPeer.cs.

        {
            _owner.Select(false);
        }

void Select ( ) [inline]

Definition at line 38 of file TreeViewItemAutomationPeer.cs.

        {
            _owner.Select(true);
        }

Member Data Documentation

TreeViewItem _owner [private]

Definition at line 12 of file TreeViewItemAutomationPeer.cs.

Property Documentation

bool IsSelected [get]

Definition at line 44 of file TreeViewItemAutomationPeer.cs.

IRawElementProviderSimple SelectionContainer [get]

Definition at line 52 of file TreeViewItemAutomationPeer.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewItemAutomationPeer.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewSample Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • Selection
  • TreeViewSample
Public Member Functions | Private Member Functions | Static Private Attributes

TreeViewSample Class Reference

List of all members.

Public Member Functions

TreeViewSample ()

Private Member Functions

void | Button_Click (object sender, RoutedEventArgs e)
void | clear_Click (object sender, RoutedEventArgs e)
void | ElementFactory_SelectTemplateKey (RecyclingElementFactory sender, SelectTemplateEventArgs args)
IList | GetData ()
int | GetLeafIndex ()
IList | GetParentData ()
void | insert_Click (object sender, RoutedEventArgs e)
void | OnBackClicked (object sender, RoutedEventArgs e)
void | OnElementIndexChanged (ItemsRepeater sender, ItemsRepeaterElementIndexChangedEventArgs args)
void | OnMultipleSelectionClicked (object sender, RoutedEventArgs e)
void | remove_Click (object sender, RoutedEventArgs e)
void | Repeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | SelectionModel_PropertyChanged (object sender, PropertyChangedEventArgs e)

Static Private Attributes

static object | _data = Data.CreateNested(3, 2, 4)

Detailed Description

Definition at line 13 of file TreeViewSample.xaml.cs.

Constructor & Destructor Documentation

TreeViewSample ( ) [inline]

Definition at line 16 of file TreeViewSample.xaml.cs.

        {
            this.InitializeComponent();
            rootRepeater.ItemsSource = _data;
            selectionModel.Source = _data;
            selectionModel.PropertyChanged += SelectionModel_PropertyChanged;
        }

Member Function Documentation

void Button_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 115 of file TreeViewSample.xaml.cs.

        {
            var indices = selectionModel.SelectedIndices;
            var items = selectionModel.SelectedItems;
            Debug.Assert(indices.Count == items.Count);
            for (int i = 0; i < items.Count; i++)
            {
                Debug.WriteLine(indices[i] + ":" + items[i]);
            }

            foreach (var index in selectionModel.SelectedIndices)
            {
                Debug.WriteLine(index);
            }

            foreach (var obj in selectionModel.SelectedItems)
            {
                Debug.WriteLine(obj);
            }
        }

void clear_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file TreeViewSample.xaml.cs.

        {
            var data = GetData();
            data.Clear();
        }

void ElementFactory_SelectTemplateKey | ( | RecyclingElementFactory | sender,
 |  | SelectTemplateEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 32 of file TreeViewSample.xaml.cs.

        {
            args.TemplateKey = args.DataContext is IEnumerable ? "group" : "item";
        }

IList GetData ( ) [inline, private]

Definition at line 58 of file TreeViewSample.xaml.cs.

        {
            var indices = indexPath.Text.Split('.');
            IList data = (IList)_data;
            foreach (var index in indices)
            {
                data = (IList)(data as IList)[int.Parse(index)];
            }

            return data;
        }

int GetLeafIndex ( ) [inline, private]

Definition at line 83 of file TreeViewSample.xaml.cs.

        {
            var indices = indexPath.Text.Split('.');
            return int.Parse(indices[indices.Length - 1]);
        }

IList GetParentData ( ) [inline, private]

Definition at line 70 of file TreeViewSample.xaml.cs.

        {
            var indices = indexPath.Text.Split('.');
            IList data = (IList)_data;
            for (int depth = 0; depth < indices.Length - 1; depth++)
            {
                var index = indices[depth];
                data = (IList)(data as IList)[int.Parse(index)];
            }

            return data;
        }

void insert_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file TreeViewSample.xaml.cs.

        {
            var data = GetParentData();
            data.Insert(GetLeafIndex(), 100);
        }

void OnBackClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file TreeViewSample.xaml.cs.

        {
            GC.Collect();
            GC.WaitForPendingFinalizers();
            GC.Collect();
            Frame.GoBack();
        }

void OnElementIndexChanged | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementIndexChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 107 of file TreeViewSample.xaml.cs.

        {
            if (args.Element is TreeViewItem)
            {
                (args.Element as TreeViewItem).RepeatedIndex = args.NewIndex;
            }
        }

void OnMultipleSelectionClicked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file TreeViewSample.xaml.cs.

        {
            selectionModel.SingleSelect = multipleSelection.IsChecked.Value ? false : true;
        }

void remove_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 95 of file TreeViewSample.xaml.cs.

        {
            var data = GetParentData();
            data.RemoveAt(GetLeafIndex());
        }

void Repeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 50 of file TreeViewSample.xaml.cs.

        {
            if (args.Element is TreeViewItem)
            {
                (args.Element as TreeViewItem).RepeatedIndex = args.Index;
            }
        }

void SelectionModel_PropertyChanged | ( | object | sender,
 |  | PropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 24 of file TreeViewSample.xaml.cs.

        {
            if (e.PropertyName == "SelectedItem")
            {
                var selected = (sender as SelectionModel).SelectedItem;
            }
        }

Member Data Documentation

object _data = Data.CreateNested(3, 2, 4) [static, private]

Definition at line 15 of file TreeViewSample.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewSample.xaml.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SortingAndFilteringPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • SortingAndFilteringPage
Public Member Functions | Private Member Functions | Private Attributes

SortingAndFilteringPage Class Reference

List of all members.

Public Member Functions

SortingAndFilteringPage ()

Private Member Functions

void | filterText_TextChanged (object sender, TextChangedEventArgs e)
void | OnSortAscClick (object sender, RoutedEventArgs e)
void | OnSortDesClick (object sender, RoutedEventArgs e)
void | UpdateSortAndFilter ()

Private Attributes

Type[] | AllTypes = typeof(SortingAndFilteringPage).GetTypeInfo().Assembly.GetTypes()
bool | IsSortDescending = false
MyCollection | SourceForRepeater = new MyCollection(null)

Detailed Description

Definition at line 12 of file SortingAndFilteringPage.xaml.cs.

Constructor & Destructor Documentation

SortingAndFilteringPage ( ) [inline]

Definition at line 18 of file SortingAndFilteringPage.xaml.cs.

        {
            this.InitializeComponent();

            SourceForRepeater = new MyCollection(AllTypes);
            repeater.ItemsSource = SourceForRepeater;
        }

Member Function Documentation

void filterText_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file SortingAndFilteringPage.xaml.cs.

        {
            UpdateSortAndFilter();
        }

void OnSortAscClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file SortingAndFilteringPage.xaml.cs.

        {
            if (IsSortDescending)
            {
                IsSortDescending = false;
                UpdateSortAndFilter();
            }
        }

void OnSortDesClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 35 of file SortingAndFilteringPage.xaml.cs.

        {
            if (!IsSortDescending)
            {
                IsSortDescending = true;
                UpdateSortAndFilter();
            }
        }

void UpdateSortAndFilter ( ) [inline, private]

Definition at line 49 of file SortingAndFilteringPage.xaml.cs.

        {
            var filteredTypes = AllTypes.Where(i => i.ToString().ToLower().Contains(filterText.Text.ToLower()));
            var sortedFilteredTypes = IsSortDescending ?
                filteredTypes.OrderByDescending(i => i.ToString()) :
                filteredTypes.OrderBy(i => i.ToString());
            SourceForRepeater.InitializeCollection(sortedFilteredTypes);
        }

Member Data Documentation

Type [] AllTypes = typeof(SortingAndFilteringPage).GetTypeInfo().Assembly.GetTypes() [private]

Definition at line 16 of file SortingAndFilteringPage.xaml.cs.

bool IsSortDescending = false [private]

Definition at line 15 of file SortingAndFilteringPage.xaml.cs.

MyCollection SourceForRepeater = new MyCollection(null) [private]

Definition at line 14 of file SortingAndFilteringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/SortingAndFilteringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StoreDemoPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • StoreDemoPage
Public Member Functions | Private Member Functions

StoreDemoPage Class Reference

List of all members.

Public Member Functions

StoreDemoPage ()
StoreDemoPage ()

Private Member Functions

void | OnSelectTemplateKey (RecyclingElementFactory sender, SelectTemplateEventArgs args)
void | OnSelectTemplateKey (RecyclingElementFactory sender, SelectTemplateEventArgs args)

Detailed Description

Definition at line 21 of file StoreDemoPage.xaml.cs.

Constructor & Destructor Documentation

StoreDemoPage ( ) [inline]

Definition at line 23 of file StoreDemoPage.xaml.cs.

        {
            this.InitializeComponent();
            var data = StoreMockData.Create(15, 10);
            outerRepeater.ItemsSource = data;
        }

StoreDemoPage ( ) [inline]

Definition at line 26 of file StoreDemoPage.xaml.cs.

        {
            this.InitializeComponent();
            var data = StoreMockData.Create(15, 10);
            outerRepeater.ItemsSource = data;
        }

Member Function Documentation

void OnSelectTemplateKey | ( | RecyclingElementFactory | sender,
 |  | SelectTemplateEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 30 of file StoreDemoPage.xaml.cs.

        {
            args.TemplateKey = args.DataContext is Category ? "Category" : "Item";
        }

void OnSelectTemplateKey | ( | RecyclingElementFactory | sender,
 |  | SelectTemplateEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 33 of file StoreDemoPage.xaml.cs.

        {
            args.TemplateKey = args.DataContext is Category ? "Category" : "Item";
        }

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreDemoPage.xaml.cs
  • Repeater/TestUI/Samples/NestedLayoutSamples/StoreDemoPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StoreMockData Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • StoreMockData
Static Public Member Functions

StoreMockData Class Reference

List of all members.

Static Public Member Functions

static ObservableCollection
< Category > 		Create (int numCategories, int numItemsPerCategory)
static ObservableCollection
< Category > 		Create (int numCategories, int numItemsPerCategory)
static Category | CreateCategory (int numItems, string name)
static Category | CreateCategory (int numItems, string name)

Detailed Description

Definition at line 9 of file StoreMockData.cs.

Member Function Documentation

static ObservableCollection<Category> Create | ( | int | numCategories,
 |  | int | numItemsPerCategory |
 | ) |  |  | [inline, static]

Definition at line 11 of file StoreMockData.cs.

        {
            var data = new ObservableCollection<Category>();
            for (int i = 0; i < numCategories; i++)
            {
                var category = CreateCategory(numItemsPerCategory, "Category " + i.ToString());
                data.Add(category);
            }

            return data;
        }

static ObservableCollection<Category> Create | ( | int | numCategories,
 |  | int | numItemsPerCategory |
 | ) |  |  | [inline, static]

Definition at line 10 of file StoreMockData.cs.

        {
            var data = new ObservableCollection<Category>();
            for (int i = 0; i < numCategories; i++)
            {
                var category = CreateCategory(numItemsPerCategory, "Category " + i.ToString());
                data.Add(category);
            }

            return data;
        }

static Category CreateCategory | ( | int | numItems,
 |  | string | name |
 | ) |  |  | [inline, static]

Definition at line 22 of file StoreMockData.cs.

        {
            var category = new Category() { Name = name };
            for (int i = 0; i < numItems; i++)
            {
                category.Add(new Item() { Name = "Item " + i.ToString() });
            }

            return category;
        }

static Category CreateCategory | ( | int | numItems,
 |  | string | name |
 | ) |  |  | [inline, static]

Definition at line 23 of file StoreMockData.cs.

        {
            var category = new Category() { Name = name };
            for (int i = 0; i < numItems; i++)
            {
                category.Add(new Item() { Name = "Item " + i.ToString() });
            }

            return category;
        }

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreMockData.cs
  • Repeater/TestUI/Samples/NestedLayoutSamples/StoreMockData.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UICollection Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • UICollection
Public Member Functions

UICollection Class Reference

List of all members.

Public Member Functions

UICollection ()

Detailed Description

Definition at line 20 of file ElementsInItemsSourcePage.xaml.cs.

Constructor & Destructor Documentation

UICollection ( ) [inline]

Definition at line 22 of file ElementsInItemsSourcePage.xaml.cs.

        {

        }

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/ElementsInItemsSourcePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UniformGridLayoutDemo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • UniformGridLayoutDemo
Public Member Functions | Public Attributes | Private Member Functions

UniformGridLayoutDemo Class Reference

List of all members.

Public Member Functions

UniformGridLayoutDemo ()
void | GetRepeaterActualHeightButtonClick (object sender, RoutedEventArgs e)

Public Attributes

IEnumerable< int > | collection

Private Member Functions

~UniformGridLayoutDemo ()
void | CmbScrollViewerHorizontalScrollBarVisibility_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbUniformGridLayoutItemsJustification_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbUniformGridLayoutItemsStretch_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbUniformGridLayoutOrientation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | GetScrollViewerHorizontalOffsetButtonClick (object sender, RoutedEventArgs e)
void | GetScrollViewerMaxHeightButtonClick (object sender, RoutedEventArgs e)
void | GetScrollViewerMaxWidthButtonClick (object sender, RoutedEventArgs e)
void | GetScrollViewerVerticalOffsetButtonClick (object sender, RoutedEventArgs e)
void | GetUniformGridLayoutMaximumRowsOrColumnsButtonClick (object sender, RoutedEventArgs e)
void | GetUniformGridLayoutMinColumnSpacingButtonClick (object sender, RoutedEventArgs e)
void | GetUniformGridLayoutMinItemHeightButtonClick (object sender, RoutedEventArgs e)
void | GetUniformGridLayoutMinItemWidthButtonClick (object sender, RoutedEventArgs e)
void | GetUniformGridLayoutMinRowSpacingButtonClick (object sender, RoutedEventArgs e)
void | SetScrollViewerHorizontalOffsetButtonClick (object sender, RoutedEventArgs e)
void | SetScrollViewerMaxHeightButtonClick (object sender, RoutedEventArgs e)
void | SetScrollViewerMaxWidthButtonClick (object sender, RoutedEventArgs e)
void | SetScrollViewerVerticalOffsetButtonClick (object sender, RoutedEventArgs e)
void | SetUniformGridLayoutMaximumRowsOrColumnsButtonClick (object sender, RoutedEventArgs e)
void | SetUniformGridLayoutMinColumnSpacingButtonClick (object sender, RoutedEventArgs e)
void | SetUniformGridLayoutMinItemHeightButtonClick (object sender, RoutedEventArgs e)
void | SetUniformGridLayoutMinItemWidthButtonClick (object sender, RoutedEventArgs e)
void | SetUniformGridLayoutMinRowSpacingButtonClick (object sender, RoutedEventArgs e)
void | UniformGridLayoutDemo_Loaded (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 11 of file UniformGridLayoutDemo.cs.

Constructor & Destructor Documentation

UniformGridLayoutDemo ( ) [inline]

Definition at line 15 of file UniformGridLayoutDemo.cs.

        {
            collection = Enumerable.Range(0, 40);
            this.InitializeComponent();
            imageAspectRatioTestRepeater.ItemsSource = Enumerable.Range(0, 30);

            Loaded += UniformGridLayoutDemo_Loaded;
        }

~UniformGridLayoutDemo ( ) [inline, private]

Definition at line 24 of file UniformGridLayoutDemo.cs.

        {
        }

Member Function Documentation

void CmbScrollViewerHorizontalScrollBarVisibility_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 156 of file UniformGridLayoutDemo.cs.

        {
            if (ScrollViewer != null)
            {
                ScrollViewer.HorizontalScrollBarVisibility = (ScrollBarVisibility)CmbScrollViewerHorizontalScrollBarVisibility.SelectedIndex;
            }
        }

void CmbUniformGridLayoutItemsJustification_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 138 of file UniformGridLayoutDemo.cs.

        {
            if (UniformGridRepeater != null)
            {
                var itemsJustification = (CmbUniformGridLayoutItemsJustification.SelectedItem as ComboBoxItem).Content.ToString();

                LayoutHelper.SetLineAlignment(UniformGridRepeater.Layout, itemsJustification);
            }
        }

void CmbUniformGridLayoutItemsStretch_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 128 of file UniformGridLayoutDemo.cs.

        {
            if (UniformGridRepeater != null)
            {
                var itemsStretch = (CmbUniformGridLayoutItemsStretch.SelectedItem as ComboBoxItem).Content.ToString();

                LayoutHelper.SetItemsStretch(UniformGridRepeater.Layout, itemsStretch);
            }
        }

void CmbUniformGridLayoutOrientation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 148 of file UniformGridLayoutDemo.cs.

        {
            if (UniformGridRepeater != null)
            {
                (UniformGridRepeater.Layout as UniformGridLayout).Orientation = CmbUniformGridLayoutOrientation.SelectedIndex == 0 ? Orientation.Vertical : Orientation.Horizontal;
            }
        }

void GetRepeaterActualHeightButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 33 of file UniformGridLayoutDemo.cs.

        {
            RepeaterActualHeightLabel.Text = UniformGridRepeater.ActualHeight.ToString();
        }

void GetScrollViewerHorizontalOffsetButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 108 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewerHorizontalOffset.Text = ScrollViewer.HorizontalOffset.ToString();
        }

void GetScrollViewerMaxHeightButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewerMaxHeight.Text = ScrollViewer.MaxHeight.ToString();
        }

void GetScrollViewerMaxWidthButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewerMaxWidth.Text = ScrollViewer.MaxWidth.ToString();
        }

void GetScrollViewerVerticalOffsetButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 118 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewerVerticalOffset.Text = ScrollViewer.VerticalOffset.ToString();
        }

void GetUniformGridLayoutMaximumRowsOrColumnsButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file UniformGridLayoutDemo.cs.

        {
            UniformGridLayoutMaximumRowsOrColumns.Text = (UniformGridRepeater.Layout as UniformGridLayout).MaximumRowsOrColumns.ToString();
        }

void GetUniformGridLayoutMinColumnSpacingButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file UniformGridLayoutDemo.cs.

        {
            UniformGridLayoutMinColumnSpacing.Text = (UniformGridRepeater.Layout as UniformGridLayout).MinColumnSpacing.ToString();
        }

void GetUniformGridLayoutMinItemHeightButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 78 of file UniformGridLayoutDemo.cs.

        {
            UniformGridLayoutMinItemHeight.Text = (UniformGridRepeater.Layout as UniformGridLayout).MinItemHeight.ToString();
        }

void GetUniformGridLayoutMinItemWidthButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file UniformGridLayoutDemo.cs.

        {
            UniformGridLayoutMinItemWidth.Text = (UniformGridRepeater.Layout as UniformGridLayout).MinItemWidth.ToString();
        }

void GetUniformGridLayoutMinRowSpacingButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 58 of file UniformGridLayoutDemo.cs.

        {
            UniformGridLayoutMinRowSpacing.Text = (UniformGridRepeater.Layout as UniformGridLayout).MinRowSpacing.ToString();
        }

void SetScrollViewerHorizontalOffsetButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 113 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewer.ChangeView(double.Parse(ScrollViewerHorizontalOffset.Text), null, null, true);
        }

void SetScrollViewerMaxHeightButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 103 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewer.MaxHeight = double.Parse(ScrollViewerMaxHeight.Text);
        }

void SetScrollViewerMaxWidthButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 93 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewer.MaxWidth = double.Parse(ScrollViewerMaxWidth.Text);
        }

void SetScrollViewerVerticalOffsetButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 123 of file UniformGridLayoutDemo.cs.

        {
            ScrollViewer.ChangeView(null, double.Parse(ScrollViewerVerticalOffset.Text), null, true);
        }

void SetUniformGridLayoutMaximumRowsOrColumnsButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 43 of file UniformGridLayoutDemo.cs.

        {
            LayoutHelper.SetMaxRowsOrColumns(UniformGridRepeater.Layout, int.Parse(UniformGridLayoutMaximumRowsOrColumns.Text));
        }

void SetUniformGridLayoutMinColumnSpacingButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 53 of file UniformGridLayoutDemo.cs.

        {
            LayoutHelper.SetMinColumnSpacing(UniformGridRepeater.Layout, double.Parse(UniformGridLayoutMinColumnSpacing.Text));
        }

void SetUniformGridLayoutMinItemHeightButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 83 of file UniformGridLayoutDemo.cs.

        {
            (UniformGridRepeater.Layout as UniformGridLayout).MinItemHeight = double.Parse(UniformGridLayoutMinItemHeight.Text);
        }

void SetUniformGridLayoutMinItemWidthButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file UniformGridLayoutDemo.cs.

        {
            (UniformGridRepeater.Layout as UniformGridLayout).MinItemWidth = double.Parse(UniformGridLayoutMinItemWidth.Text);
        }

void SetUniformGridLayoutMinRowSpacingButtonClick | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file UniformGridLayoutDemo.cs.

        {
            LayoutHelper.SetMinRowSpacing(UniformGridRepeater.Layout, double.Parse(UniformGridLayoutMinRowSpacing.Text));
        }

void UniformGridLayoutDemo_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 28 of file UniformGridLayoutDemo.cs.

        {
            GetUniformGridLayoutMaximumRowsOrColumnsButtonClick(null, null);
        }

Member Data Documentation

IEnumerable<int> collection

Definition at line 13 of file UniformGridLayoutDemo.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/UniformGridLayoutDemo.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VariableSizedItemsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • VariableSizedItemsPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

VariableSizedItemsPage Class Reference

List of all members.

Public Member Functions

VariableSizedItemsPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~VariableSizedItemsPage ()
void | AppendEventMessage (string message)
void | BtnClearEvents_Click (object sender, RoutedEventArgs e)
void | BtnGetItemsRepeaterVerticalCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerChangeViewVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerChangeViewVerticalScrollPercentage_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerScrollableHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerVerticalScrollPercentage_Click (object sender, RoutedEventArgs e)
void | BtnGetScrollerZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnScrollerChangeViewToVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnScrollerChangeViewToVerticalOffsetWithAnimation_Click (object sender, RoutedEventArgs e)
void | BtnScrollerChangeViewToVerticalScrollPercentage_Click (object sender, RoutedEventArgs e)
void | BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click (object sender, RoutedEventArgs e)
void | BtnScrollerChangeViewToZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnScrollerChangeViewToZoomFactorWithAnimation_Click (object sender, RoutedEventArgs e)
void | BtnSetItemsRepeaterVerticalCacheLength_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollerVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSwitchScroller_Click (object sender, RoutedEventArgs e)
void | BtnSwitchVariability_Click (object sender, RoutedEventArgs e)
void | CmbItemsRepeaterHorizontalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemsRepeaterVerticalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
Vector2 | ConvertFromStringToVector2 (string value)
void | HookScrollersEvents ()
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollViewer_ViewChanged (object sender, ScrollViewerViewChangedEventArgs args)
void | ScrollViewer_ViewChanging (object sender, ScrollViewerViewChangingEventArgs args)
string | ScrollViewerViewToString (ScrollViewerView scrollViewerView)
void | UnhookScrollersEvents ()
void | UpdateCmbItemsRepeaterHorizontalAlignment ()
void | UpdateCmbItemsRepeaterVerticalAlignment ()
void | UpdateExtentHeight ()
void | UpdateItemsRepeaterVerticalCacheLength ()
void | UpdateScrollerChangeViewVerticalScrollPercentage ()
void | UpdateScrollerExtentHeight ()
void | UpdateScrollerScrollableHeight ()
void | UpdateScrollerVerticalAnchorRatio ()
void | UpdateScrollerVerticalOffset ()
void | UpdateScrollerVerticalScrollPercentage ()
void | UpdateScrollerZoomFactor ()
void | VariableSizedItemsPage_Loaded (object sender, RoutedEventArgs e)

Private Attributes

int | m_changeViewToVerticalOffsetWithAnimationCorrelationId = -1
int | m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId = -1
double | m_extentHeight = 0

Detailed Description

Definition at line 17 of file VariableSizedItemsPage.xaml.cs.

Constructor & Destructor Documentation

VariableSizedItemsPage ( ) [inline]

Definition at line 23 of file VariableSizedItemsPage.xaml.cs.

        {
            this.InitializeComponent();
            goBackButton.Click += delegate { Frame.GoBack(); };

            itemsRepeater.ItemsSource = Enumerable.Range(0, 10000).Select(x => new VariableSizeItem(x)
            {
                Text = "Item " + x
            });

            Loaded += VariableSizedItemsPage_Loaded;
        }

~VariableSizedItemsPage ( ) [inline, private]

Definition at line 36 of file VariableSizedItemsPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendEventMessage ( string message ) [inline, private]

Definition at line 47 of file VariableSizedItemsPage.xaml.cs.

        {
            if (lstEvents != null)
            {
                lstEvents.Items.Add(message);
            }
        }

void BtnClearEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 748 of file VariableSizedItemsPage.xaml.cs.

        {
            if (lstEvents != null)
            {
                lstEvents.Items.Clear();
            }
        }

void BtnGetItemsRepeaterVerticalCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 693 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateItemsRepeaterVerticalCacheLength();
        }

void BtnGetScrollerChangeViewVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 658 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (txtScrollerChangeViewVerticalScrollPercentage.Text == "N/A")
                {
                    txtScrollerChangeViewVerticalOffset.Text = "N/A";
                    return;
                }

                double verticalScrollPercentage = Convert.ToDouble(txtScrollerChangeViewVerticalScrollPercentage.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    txtScrollerChangeViewVerticalOffset.Text = (scrollViewer.ScrollableHeight * verticalScrollPercentage / 100.0).ToString();
                }
                else if (scrollView != null)
                {
                    txtScrollerChangeViewVerticalOffset.Text = (scrollView.ScrollableHeight * verticalScrollPercentage / 100.0).ToString();
                }
            }
            catch (Exception ex)
            {
                string message = "BtnGetScrollerChangeViewVerticalOffset_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnGetScrollerChangeViewVerticalScrollPercentage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 688 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateScrollerChangeViewVerticalScrollPercentage();
        }

void BtnGetScrollerExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 462 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateScrollerExtentHeight();
        }

void BtnGetScrollerScrollableHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 457 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateScrollerScrollableHeight();
        }

void BtnGetScrollerVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 437 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateScrollerVerticalAnchorRatio();
        }

void BtnGetScrollerVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 442 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateScrollerVerticalOffset();
        }

void BtnGetScrollerVerticalScrollPercentage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 452 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateScrollerVerticalScrollPercentage();
        }

void BtnGetScrollerZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 447 of file VariableSizedItemsPage.xaml.cs.

        {
            UpdateScrollerZoomFactor();
        }

void BtnScrollerChangeViewToVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 491 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    scrollViewer.ChangeView(null, verticalOffset, null, true);
                }
                else if (scrollView != null)
                {
                    scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (Exception ex)
            {
                string message = "BtnScrollerChangeView_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnScrollerChangeViewToVerticalOffsetWithAnimation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 543 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    scrollViewer.ChangeView(null, verticalOffset, null, false);
                }
                else if (scrollView != null)
                {
                    m_changeViewToVerticalOffsetWithAnimationCorrelationId = scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset);
                }
            }
            catch (Exception ex)
            {
                string message = "BtnScrollerChangeViewWithAnimation_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnScrollerChangeViewToVerticalScrollPercentage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 515 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalScrollPercentage = Convert.ToDouble(txtScrollerChangeViewVerticalScrollPercentage.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    double verticalOffset = scrollViewer.ScrollableHeight * verticalScrollPercentage / 100.0;

                    scrollViewer.ChangeView(null, verticalOffset, null, true);
                }
                else if (scrollView != null)
                {
                    double verticalOffset = scrollView.ScrollableHeight * verticalScrollPercentage / 100.0;

                    scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (Exception ex)
            {
                string message = "BtnScrollerChangeViewToVerticalScrollPercentage_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 567 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalScrollPercentage = Convert.ToDouble(txtScrollerChangeViewVerticalScrollPercentage.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    double verticalOffset = scrollViewer.ScrollableHeight * verticalScrollPercentage / 100.0;

                    scrollViewer.ChangeView(null, verticalOffset, null, false);
                }
                else if (scrollView != null)
                {
                    double verticalOffset = scrollView.ScrollableHeight * verticalScrollPercentage / 100.0;

                    m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId = scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset);
                }
            }
            catch (Exception ex)
            {
                string message = "BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnScrollerChangeViewToZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 595 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);
                float zoomFactor = Convert.ToSingle(txtScrollerChangeViewZoomZoomFactor.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    scrollViewer.ChangeView(
                        null,
                        verticalOffset,
                        zoomFactor,
                        true);
                }
                else if (scrollView != null)
                {
                    scrollView.ZoomTo(
                        zoomFactor,
                        (txtScrollerChangeViewZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtScrollerChangeViewZoomCenterPoint.Text),
                        new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (Exception ex)
            {
                string message = "BtnScrollerChangeViewToZoomFactor_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnScrollerChangeViewToZoomFactorWithAnimation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 627 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);
                float zoomFactor = Convert.ToSingle(txtScrollerChangeViewZoomZoomFactor.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    scrollViewer.ChangeView(
                        null,
                        verticalOffset,
                        zoomFactor,
                        false);
                }
                else if (scrollView != null)
                {
                    scrollView.ZoomTo(
                        zoomFactor,
                        (txtScrollerChangeViewZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtScrollerChangeViewZoomCenterPoint.Text));
                }
            }
            catch (Exception ex)
            {
                string message = "BtnScrollerChangeViewToZoomFactorWithAnimation_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnSetItemsRepeaterVerticalCacheLength_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 698 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    itemsRepeater.VerticalCacheLength = Convert.ToDouble(txtItemsRepeaterVerticalCacheLength.Text);
                }
            }
            catch (Exception ex)
            {
                string message = "BtnSetItemsRepeaterVerticalCacheLength_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnSetScrollerVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 467 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalAnchorRatio = Convert.ToDouble(txtScrollerVerticalAnchorRatio.Text);

                if (scrollViewer != null)
                {
                    scrollViewer.VerticalAnchorRatio = verticalAnchorRatio;
                }
                if (scrollView != null)
                {
                    scrollView.VerticalAnchorRatio = verticalAnchorRatio;
                }
            }
            catch (Exception ex)
            {
                string message = "BtnSetScrollerVerticalAnchorRatio_Click. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void BtnSwitchScroller_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 387 of file VariableSizedItemsPage.xaml.cs.

        {
            if (btnSwitchScroller.Content as string == "Use ScrollView")
            {
                btnSwitchScroller.Content = "Use ScrollViewer";
                btnScrollerChangeViewToZoomFactor.Content = "Jump to ZoomFactor";
                btnScrollerChangeViewToZoomFactorWithAnimation.Content = "Animate to ZoomFactor";
                txtScrollerChangeViewToVerticalOffsetWithAnimationDuration.IsEnabled = true;
                txtScrollerChangeViewToVerticalScrollPercentageWithAnimationDuration.IsEnabled = true;
                txtScrollerChangeViewZoomCenterPoint.IsEnabled = true;
                scrollViewer.Visibility = Visibility.Collapsed;
                scrollView.Visibility = Visibility.Visible;
                scrollViewer.Content = null;
                scrollView.Content = itemsRepeater;
            }
            else
            {
                btnSwitchScroller.Content = "Use ScrollView";
                btnScrollerChangeViewToZoomFactor.Content = "Jump to VerticalOffset/ZoomFactor";
                btnScrollerChangeViewToZoomFactorWithAnimation.Content = "Animate to VerticalOffset/ZoomFactor";
                txtScrollerChangeViewToVerticalOffsetWithAnimationDuration.IsEnabled = false;
                txtScrollerChangeViewToVerticalScrollPercentageWithAnimationDuration.IsEnabled = false;
                txtScrollerChangeViewZoomCenterPoint.IsEnabled = false;
                scrollView.Visibility = Visibility.Collapsed;
                scrollViewer.Visibility = Visibility.Visible;
                scrollView.Content = null;
                scrollViewer.Content = itemsRepeater;
            }
        }

void BtnSwitchVariability_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 417 of file VariableSizedItemsPage.xaml.cs.

        {
            if (btnSwitchVariability.Content as string == "Use fixed heights")
            {
                btnSwitchVariability.Content = "Use variable heights";
                itemsRepeater.ItemsSource = Enumerable.Range(0, 10000).Select(x => new FixedSizeItem()
                {
                    Text = "Item " + x
                });
            }
            else
            {
                btnSwitchVariability.Content = "Use fixed heights";
                itemsRepeater.ItemsSource = Enumerable.Range(0, 10000).Select(x => new VariableSizeItem(x)
                {
                    Text = "Item " + x
                });
            }
        }

void CmbItemsRepeaterHorizontalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 716 of file VariableSizedItemsPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.HorizontalAlignment = (HorizontalAlignment)cmbItemsRepeaterHorizontalAlignment.SelectedIndex;
            }
        }

void CmbItemsRepeaterVerticalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 732 of file VariableSizedItemsPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.VerticalAlignment = (VerticalAlignment)cmbItemsRepeaterVerticalAlignment.SelectedIndex;
            }
        }

Vector2 ConvertFromStringToVector2 ( string value ) [inline, private]

Definition at line 756 of file VariableSizedItemsPage.xaml.cs.

        {
            float x = 0, y = 0;

            int commaIndex = value.IndexOf(',');
            if (commaIndex != -1)
            {
                x = Convert.ToSingle(value.Substring(0, commaIndex));
                y = Convert.ToSingle(value.Substring(commaIndex + 1));
            }

            return new Vector2(x, y);
        }

void HookScrollersEvents ( ) [inline, private]

Definition at line 55 of file VariableSizedItemsPage.xaml.cs.

        {
            if (scrollViewer != null)
            {
                scrollViewer.ViewChanging += ScrollViewer_ViewChanging;
                scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
            }
            if (scrollView != null)
            {
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 40 of file VariableSizedItemsPage.xaml.cs.

        {
            UnhookScrollersEvents();

            base.OnNavigatedFrom(e);
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 347 of file VariableSizedItemsPage.xaml.cs.

        {
            AppendEventMessage($"ScrollAnimationStarting CorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");

            try
            {
                Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;

                if (stockKeyFrameAnimation != null)
                {
                    TextBox txtChangeViewWithAnimationDuration = null;

                    if (m_changeViewToVerticalOffsetWithAnimationCorrelationId == args.CorrelationId)
                    {
                        txtChangeViewWithAnimationDuration = txtScrollerChangeViewToVerticalOffsetWithAnimationDuration;
                    }
                    else if (m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId == args.CorrelationId)
                    {
                        txtChangeViewWithAnimationDuration = txtScrollerChangeViewToVerticalScrollPercentageWithAnimationDuration;
                    }

                    if (txtChangeViewWithAnimationDuration != null &&
                        txtChangeViewWithAnimationDuration.Text != "N/A" &&
                        !string.IsNullOrWhiteSpace(txtChangeViewWithAnimationDuration.Text))
                    {
                        double durationOverride = Convert.ToDouble(txtChangeViewWithAnimationDuration.Text);

                        stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
                    }
                }
            }
            catch (Exception ex)
            {
                string message = "ScrollView_ScrollAnimationStarting. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 340 of file VariableSizedItemsPage.xaml.cs.

        {
            AppendEventMessage("ViewChanged H=" + scrollView.HorizontalOffset.ToString() + ", V=" + scrollView.VerticalOffset + ", ZF=" + scrollView.ZoomFactor);

            UpdateExtentHeight();
        }

void ScrollViewer_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 333 of file VariableSizedItemsPage.xaml.cs.

        {
            AppendEventMessage("ViewChanged IsIntermediate=" + args.IsIntermediate + ", H=" + scrollViewer.HorizontalOffset.ToString() + ", V=" + scrollViewer.VerticalOffset + ", ZF=" + scrollViewer.ZoomFactor);

            UpdateExtentHeight();
        }

void ScrollViewer_ViewChanging | ( | object | sender,
 |  | ScrollViewerViewChangingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 328 of file VariableSizedItemsPage.xaml.cs.

        {
            AppendEventMessage("ViewChanging IsInertial=" + args.IsInertial + ", NextView=(" + ScrollViewerViewToString(args.NextView) + "), FinalView=(" + ScrollViewerViewToString(args.FinalView) + ")");
        }

string ScrollViewerViewToString ( ScrollViewerView scrollViewerView ) [inline, private]

Definition at line 323 of file VariableSizedItemsPage.xaml.cs.

        {
            return "H=" + scrollViewerView.HorizontalOffset.ToString() + ", V=" + scrollViewerView.VerticalOffset + ", ZF=" + scrollViewerView.ZoomFactor;
        }

void UnhookScrollersEvents ( ) [inline, private]

Definition at line 69 of file VariableSizedItemsPage.xaml.cs.

        {
            if (scrollViewer != null)
            {
                scrollViewer.ViewChanging -= ScrollViewer_ViewChanging;
                scrollViewer.ViewChanged -= ScrollViewer_ViewChanged;
            }
            if (scrollView != null)
            {
                scrollView.ViewChanged -= ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
            }
        }

void UpdateCmbItemsRepeaterHorizontalAlignment ( ) [inline, private]

Definition at line 724 of file VariableSizedItemsPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                cmbItemsRepeaterHorizontalAlignment.SelectedIndex = (int)itemsRepeater.HorizontalAlignment;
            }
        }

void UpdateCmbItemsRepeaterVerticalAlignment ( ) [inline, private]

Definition at line 740 of file VariableSizedItemsPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                cmbItemsRepeaterVerticalAlignment.SelectedIndex = (int)itemsRepeater.VerticalAlignment;
            }
        }

void UpdateExtentHeight ( ) [inline, private]

Definition at line 249 of file VariableSizedItemsPage.xaml.cs.

        {
            double extentHeight = 0;

            if (scrollViewer != null && scrollViewer.Content != null)
            {
                extentHeight = scrollViewer.ExtentHeight;
            }
            else if (scrollView != null)
            {
                extentHeight = scrollView.ExtentHeight;
            }

            if (m_extentHeight != extentHeight)
            {
                AppendEventMessage("ExtentHeight changed. Old=" + m_extentHeight + ", New=" + extentHeight);

                m_extentHeight = extentHeight;
            }
        }

void UpdateItemsRepeaterVerticalCacheLength ( ) [inline, private]

Definition at line 83 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (itemsRepeater != null)
                {
                    txtItemsRepeaterVerticalCacheLength.Text = itemsRepeater.VerticalCacheLength.ToString();
                }
            }
            catch (Exception ex)
            {
                string message = "UpdateItemsRepeaterVerticalCacheLength. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void UpdateScrollerChangeViewVerticalScrollPercentage ( ) [inline, private]

Definition at line 270 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);

                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    if (scrollViewer.ScrollableHeight == 0)
                    {
                        txtScrollerChangeViewVerticalScrollPercentage.Text = "N/A";
                    }
                    else
                    {
                        txtScrollerChangeViewVerticalScrollPercentage.Text = (verticalOffset / scrollViewer.ScrollableHeight * 100.0).ToString();
                    }
                }
                else if (scrollView != null)
                {
                    if (scrollView.ScrollableHeight == 0)
                    {
                        txtScrollerChangeViewVerticalScrollPercentage.Text = "N/A";
                    }
                    else
                    {
                        txtScrollerChangeViewVerticalScrollPercentage.Text = (verticalOffset / scrollView.ScrollableHeight * 100.0).ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                string message = "UpdateScrollerChangeViewVerticalScrollPercentage. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void UpdateScrollerExtentHeight ( ) [inline, private]

Definition at line 225 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    txtScrollerExtentHeight.Text = scrollViewer.ExtentHeight.ToString();
                }
                else if (scrollView != null)
                {
                    txtScrollerExtentHeight.Text = scrollView.ExtentHeight.ToString();
                }

                UpdateExtentHeight();
            }
            catch (Exception ex)
            {
                string message = "UpdateScrollerExtentHeight. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void UpdateScrollerScrollableHeight ( ) [inline, private]

Definition at line 203 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    txtScrollerScrollableHeight.Text = scrollViewer.ScrollableHeight.ToString();
                }
                else if (scrollView != null)
                {
                    txtScrollerScrollableHeight.Text = scrollView.ScrollableHeight.ToString();
                }
            }
            catch (Exception ex)
            {
                string message = "UpdateScrollerScrollableHeight. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void UpdateScrollerVerticalAnchorRatio ( ) [inline, private]

Definition at line 101 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    txtScrollerVerticalAnchorRatio.Text = scrollViewer.VerticalAnchorRatio.ToString();
                }
                else if (scrollView != null)
                {
                    txtScrollerVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
                }
            }
            catch (Exception ex)
            {
                string message = "UpdateScrollerVerticalAnchorRatio. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void UpdateScrollerVerticalOffset ( ) [inline, private]

Definition at line 123 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    txtScrollerVerticalOffset.Text = scrollViewer.VerticalOffset.ToString();
                }
                else if (scrollView != null)
                {
                    txtScrollerVerticalOffset.Text = scrollView.VerticalOffset.ToString();
                }
            }
            catch (Exception ex)
            {
                string message = "UpdateScrollerVerticalOffset. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void UpdateScrollerVerticalScrollPercentage ( ) [inline, private]

Definition at line 167 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    if (scrollViewer.ScrollableHeight == 0)
                    {
                        txtScrollerVerticalScrollPercentage.Text = "N/A";
                    }
                    else
                    {
                        txtScrollerVerticalScrollPercentage.Text = (scrollViewer.VerticalOffset / scrollViewer.ScrollableHeight * 100.0).ToString();
                    }
                }
                else if (scrollView != null)
                {
                    if (scrollView.ScrollableHeight == 0)
                    {
                        txtScrollerVerticalScrollPercentage.Text = "N/A";
                    }
                    else
                    {
                        txtScrollerVerticalScrollPercentage.Text = (scrollView.VerticalOffset / scrollView.ScrollableHeight * 100.0).ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                string message = "UpdateScrollerVerticalScrollPercentage. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void UpdateScrollerZoomFactor ( ) [inline, private]

Definition at line 145 of file VariableSizedItemsPage.xaml.cs.

        {
            try
            {
                if (scrollViewer != null && scrollViewer.Content != null)
                {
                    txtScrollerZoomFactor.Text = scrollViewer.ZoomFactor.ToString();
                }
                else if (scrollView != null)
                {
                    txtScrollerZoomFactor.Text = scrollView.ZoomFactor.ToString();
                }
            }
            catch (Exception ex)
            {
                string message = "UpdateScrollerZoomFactor. Exception:" + ex.ToString();

                Debug.WriteLine(message);
                AppendEventMessage(message);
            }
        }

void VariableSizedItemsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 308 of file VariableSizedItemsPage.xaml.cs.

        {
            HookScrollersEvents();
            UpdateItemsRepeaterVerticalCacheLength();
            UpdateCmbItemsRepeaterHorizontalAlignment();
            UpdateCmbItemsRepeaterVerticalAlignment();
            UpdateScrollerVerticalAnchorRatio();
            UpdateScrollerVerticalOffset();
            UpdateScrollerZoomFactor();
            UpdateScrollerVerticalScrollPercentage();
            UpdateScrollerScrollableHeight();
            UpdateScrollerExtentHeight();
            UpdateScrollerChangeViewVerticalScrollPercentage();
        }

Member Data Documentation

int m_changeViewToVerticalOffsetWithAnimationCorrelationId = -1 [private]

Definition at line 20 of file VariableSizedItemsPage.xaml.cs.

int m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId = -1 [private]

Definition at line 21 of file VariableSizedItemsPage.xaml.cs.

double m_extentHeight = 0 [private]

Definition at line 19 of file VariableSizedItemsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/VariableSizedItemsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VariableSizeItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • VariableSizeItem
Public Member Functions | Properties

VariableSizeItem Class Reference

List of all members.

Public Member Functions

VariableSizeItem (int sizeSeed)

Properties

int | Size [get, set]
string | Text [get, set]

Detailed Description

Definition at line 782 of file VariableSizedItemsPage.xaml.cs.

Constructor & Destructor Documentation

VariableSizeItem ( int sizeSeed ) [inline]

Definition at line 784 of file VariableSizedItemsPage.xaml.cs.

        {
            long size = (sizeSeed + 9) * (sizeSeed + 10) * (sizeSeed + 11);
            string sizeStr = size.ToString();
            sizeStr = sizeStr.Substring(sizeStr.Length - 2);
            size = long.Parse(sizeStr) * 2;
            Size = Math.Max((int)size, 24);
        }

Property Documentation

int Size [get, set]

Definition at line 794 of file VariableSizedItemsPage.xaml.cs.

string Text [get, set]

Definition at line 793 of file VariableSizedItemsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/VariableSizedItemsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • VirtualizingStackLayout
Protected Member Functions | Private Member Functions | Private Attributes

VirtualizingStackLayout Class Reference

Inherits VirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)
override void | OnItemsChangedCore (VirtualizingLayoutContext context, object source, NotifyCollectionChangedEventArgs args)

Private Member Functions

void | ClearRealizedRange (int startRealizedIndex, int count)
void | ClearRealizedRange ()
void | DebugTrace (string message, params object[] args)
bool | EnsureRealized (int dataIndex)
Rect | EstimateExtent (VirtualizingLayoutContext context, Size availableSize)
int | EstimateIndexForViewport (Rect viewport, int dataCount)
void | Generate (VirtualizingLayoutContext context, Size availableSize, int anchorDataIndex, bool forward)
Rect | GetCachedBoundsForDataIndex (int dataIndex)
Rect | GetCachedBoundsForRealizationIndex (int relativeIndex)
int | GetFirstRealizedDataIndexInViewport (Rect viewport)
int | GetStartIndex (VirtualizingLayoutContext context, Size availableSize)
bool | Intersects (Rect bounds, Rect viewport)
bool | IsDataIndexValid (int currentDataIndex, int itemCount)
bool | IsRealized (int dataIndex)
Size | MeasureElement (VirtualizingLayoutContext context, int index, Size availableSize)
void | OnItemsAdded (int index, int count)
void | OnItemsRemoved (int index, int count)
int | RealizationIndex (int dataIndex)
void | RemoveCachedBoundsOutsideViewport (Rect viewport)
void | SetCachedBoundsForDataIndex (int dataIndex, Rect bounds)
bool | ShouldContinueFillingUpSpace (int dataIndex, bool forward, Rect viewport)

Private Attributes

List< double > | m_estimationBuffer = Enumerable.Repeat(0d, 100).ToList()
int | m_firstRealizedDataIndex = 0
Rect | m_lastExtent = new Rect()
int | m_numItemsUsedForEstimation = 0
List< Rect > | m_realizedElementBounds = new List<Rect>()
double | m_totalHeightForEstimation = 0

Detailed Description

Definition at line 31 of file VirtualizingStackLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 57 of file VirtualizingStackLayout.cs.

        {
            DebugTrace("ArrangeOverride: Viewport" + context.RealizationRect);
            for (int realizationIndex = 0; realizationIndex < m_realizedElementBounds.Count; realizationIndex++)
            {
                int currentDataIndex = m_firstRealizedDataIndex + realizationIndex;
                DebugTrace("Arranging " + currentDataIndex);

                // Arrange the child. If any alignment needs to be done, it
                // can be done here.
                var child = context.GetOrCreateElementAt(currentDataIndex);
                var arrangeBounds = m_realizedElementBounds[realizationIndex];
                arrangeBounds.X -= m_lastExtent.X;
                arrangeBounds.Y -= m_lastExtent.Y;
                child.Arrange(arrangeBounds);
            }

            return finalSize;
        }

void ClearRealizedRange | ( | int | startRealizedIndex,
 |  | int | count |
 | ) |  |  | [inline, private]

Definition at line 407 of file VirtualizingStackLayout.cs.

        {
            m_realizedElementBounds.RemoveRange(startRealizedIndex, count);
            if (startRealizedIndex == 0)
            {
                m_firstRealizedDataIndex = m_realizedElementBounds.Count == 0 ? 0 : m_firstRealizedDataIndex + count;
            }
        }

void ClearRealizedRange ( ) [inline, private]

Definition at line 416 of file VirtualizingStackLayout.cs.

        {
            m_realizedElementBounds.Clear();
            m_firstRealizedDataIndex = 0;
        }

void DebugTrace | ( | string | message,
 |  | params object[] | args |
 | ) |  |  | [inline, private]

Definition at line 437 of file VirtualizingStackLayout.cs.

        {
            Debug.WriteLine(message, args);
        }

bool EnsureRealized ( int dataIndex ) [inline, private]

Definition at line 283 of file VirtualizingStackLayout.cs.

        {
            if (!IsRealized(dataIndex))
            {
                int realizationIndex = RealizationIndex(dataIndex);
                Debug.Assert(dataIndex == m_firstRealizedDataIndex - 1 ||
                    dataIndex == m_firstRealizedDataIndex + m_realizedElementBounds.Count ||
                    m_realizedElementBounds.Count == 0);

                if (realizationIndex == -1)
                {
                    m_realizedElementBounds.Insert(0, new Rect());
                }
                else
                {
                    m_realizedElementBounds.Add(new Rect());
                }

                if (m_firstRealizedDataIndex > dataIndex)
                {
                    m_firstRealizedDataIndex = dataIndex;
                }

                return true;
            }

            return false;
        }

Rect EstimateExtent | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, private]

Definition at line 315 of file VirtualizingStackLayout.cs.

        {
            double averageHeight = m_totalHeightForEstimation / m_numItemsUsedForEstimation;

            Rect extent = new Rect(0, 0, availableSize.Width, context.ItemCount * averageHeight);

            if (context.ItemCount > 0 && m_realizedElementBounds.Count > 0)
            {
                extent.Y = m_firstRealizedDataIndex == 0 ?
                                m_realizedElementBounds[0].Y :
                                m_realizedElementBounds[0].Y - (m_firstRealizedDataIndex - 1) * averageHeight;

                int lastRealizedIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count;
                if (lastRealizedIndex == context.ItemCount - 1)
                {
                    var lastBounds = m_realizedElementBounds[m_realizedElementBounds.Count - 1];
                    extent.Y = lastBounds.Bottom;
                }
                else
                {
                    var lastBounds = m_realizedElementBounds[m_realizedElementBounds.Count - 1];
                    int lastRealizedDataIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count;
                    int numItemsAfterLastRealizedIndex = context.ItemCount - lastRealizedDataIndex;
                    extent.Height = lastBounds.Bottom + numItemsAfterLastRealizedIndex * averageHeight - extent.Y;
                }
            }

            DebugTrace("Extent " + extent + " with average height " + averageHeight);
            return extent;
        }

int EstimateIndexForViewport | ( | Rect | viewport,
 |  | int | dataCount |
 | ) |  |  | [inline, private]

Definition at line 236 of file VirtualizingStackLayout.cs.

        {
            double averageHeight = m_totalHeightForEstimation / m_numItemsUsedForEstimation;
            int estimatedIndex = (int)(viewport.Top / averageHeight);
            // clamp to an index within the collection
            estimatedIndex = Math.Max(0, Math.Min(estimatedIndex, dataCount));
            return estimatedIndex;
        }

void Generate | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize,
 |  | int | anchorDataIndex,
 |  | bool | forward |
 | ) |  |  | [inline, private]

Definition at line 106 of file VirtualizingStackLayout.cs.

        {
            // Generate forward or backward from anchorIndex until we hit the end of the viewport
            int step = forward ? 1 : -1;
            int previousDataIndex = anchorDataIndex;
            int currentDataIndex = previousDataIndex + step;
            var viewport = context.RealizationRect;
            while (IsDataIndexValid(currentDataIndex, context.ItemCount) &&
                ShouldContinueFillingUpSpace(previousDataIndex, forward, viewport))
            {
                EnsureRealized(currentDataIndex);
                DebugTrace("Measuring " + currentDataIndex);
                var desiredSize = MeasureElement(context, currentDataIndex, availableSize);
                var previousBounds = GetCachedBoundsForDataIndex(previousDataIndex);
                Rect currentBounds = new Rect(0,
                                              forward ? previousBounds.Y + previousBounds.Height : previousBounds.Y - desiredSize.Height,
                                              availableSize.Width,
                                              desiredSize.Height);
                SetCachedBoundsForDataIndex(currentDataIndex, currentBounds);
                previousDataIndex = currentDataIndex;
                currentDataIndex += step;
            }
        }

Rect GetCachedBoundsForDataIndex ( int dataIndex ) [inline, private]

Definition at line 422 of file VirtualizingStackLayout.cs.

        {
            return m_realizedElementBounds[RealizationIndex(dataIndex)];
        }

Rect GetCachedBoundsForRealizationIndex ( int relativeIndex ) [inline, private]

Definition at line 432 of file VirtualizingStackLayout.cs.

        {
            return m_realizedElementBounds[relativeIndex];
        }

int GetFirstRealizedDataIndexInViewport ( Rect viewport ) [inline, private]

Definition at line 245 of file VirtualizingStackLayout.cs.

        {
            int index = -1;
            if (m_realizedElementBounds.Count > 0)
            {
                for (int i = 0; i < m_realizedElementBounds.Count; i++)
                {
                    if (m_realizedElementBounds[i].Y < viewport.Bottom &&
                       m_realizedElementBounds[i].Bottom > viewport.Top)
                    {
                        index = m_firstRealizedDataIndex + i;
                        break;
                    }
                }
            }

            return index;
        }

int GetStartIndex | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, private]

Definition at line 181 of file VirtualizingStackLayout.cs.

        {
            int startDataIndex = -1;
            var anchorIndex = context.RecommendedAnchorIndex;
            bool isAnchorValid = anchorIndex != -1;

            if (isAnchorValid)
            {
                if (IsRealized(anchorIndex))
                {
                    startDataIndex = anchorIndex;
                }
                else
                {
                    ClearRealizedRange();
                    startDataIndex = anchorIndex;
                }
            }
            else
            {
                // find first realized element that is visible in the viewport.
                startDataIndex = GetFirstRealizedDataIndexInViewport(context.RealizationRect);
                if (startDataIndex < 0)
                {
                    startDataIndex = EstimateIndexForViewport(context.RealizationRect, context.ItemCount);
                    ClearRealizedRange();
                }
            }

            // We have an anchorIndex, realize and measure it and
            // figure out its bounds.
            if (startDataIndex != -1 & context.ItemCount > 0)
            {
                if (m_realizedElementBounds.Count == 0)
                {
                    m_firstRealizedDataIndex = startDataIndex;
                }

                var newAnchor = EnsureRealized(startDataIndex);
                DebugTrace("Measuring start index " + startDataIndex);
                var desiredSize = MeasureElement(context, startDataIndex, availableSize);

                var bounds = new Rect(
                    0,
                    newAnchor ?
                        (m_totalHeightForEstimation / m_numItemsUsedForEstimation) * startDataIndex :
                        GetCachedBoundsForDataIndex(startDataIndex).Y,
                    availableSize.Width,
                    desiredSize.Height);
                SetCachedBoundsForDataIndex(startDataIndex, bounds);
            }

            return startDataIndex;
        }

bool Intersects | ( | Rect | bounds,
 |  | Rect | viewport |
 | ) |  |  | [inline, private]

Definition at line 161 of file VirtualizingStackLayout.cs.

        {
            return !(bounds.Bottom < viewport.Top ||
                bounds.Top > viewport.Bottom);
        }

bool IsDataIndexValid | ( | int | currentDataIndex,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 175 of file VirtualizingStackLayout.cs.

        {
            return currentDataIndex >= 0 && currentDataIndex < itemCount;
        }

bool IsRealized ( int dataIndex ) [inline, private]

Definition at line 346 of file VirtualizingStackLayout.cs.

        {
            int realizationIndex = dataIndex - m_firstRealizedDataIndex;
            return realizationIndex >= 0 && realizationIndex < m_realizedElementBounds.Count;
        }

Size MeasureElement | ( | VirtualizingLayoutContext | context,
 |  | int | index,
 |  | Size | availableSize |
 | ) |  |  | [inline, private]

Definition at line 264 of file VirtualizingStackLayout.cs.

        {
            var child = context.GetOrCreateElementAt(index);
            child.Measure(availableSize);

            int estimationBufferIndex = index % m_estimationBuffer.Count;
            bool alreadyMeasured = m_estimationBuffer[estimationBufferIndex] != 0;
            if (!alreadyMeasured)
            {
                m_numItemsUsedForEstimation++;
            }

            m_totalHeightForEstimation -= m_estimationBuffer[estimationBufferIndex];
            m_totalHeightForEstimation += child.DesiredSize.Height;
            m_estimationBuffer[estimationBufferIndex] = child.DesiredSize.Height;

            return child.DesiredSize;
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 33 of file VirtualizingStackLayout.cs.

        {
            var viewport = context.RealizationRect;
            DebugTrace("MeasureOverride: Viewport " + viewport);

            DebugTrace("Visible Rect:" + context.VisibleRect);

            // Remove bounds for elements that are now outside the viewport.
            // Proactive recycling elements means we can reuse it during this measure pass again.
            RemoveCachedBoundsOutsideViewport(viewport);

            // Find the index of the element to start laying out from - the anchor
            int startIndex = GetStartIndex(context, availableSize);

            // Measure and layout elements starting from the start index, forward and backward.
            Generate(context, availableSize, startIndex, forward:true);
            Generate(context, availableSize, startIndex, forward:false);

            // Estimate the extent size. Note that this can have a non 0 origin.
            m_lastExtent = EstimateExtent(context, availableSize);
            context.LayoutOrigin = new Point(m_lastExtent.X, m_lastExtent.Y);
            return new Size(m_lastExtent.Width, m_lastExtent.Height);
        }

void OnItemsAdded | ( | int | index,
 |  | int | count |
 | ) |  |  | [inline, private]

Definition at line 358 of file VirtualizingStackLayout.cs.

        {
            // Using the old indexes here (before it was updated by the collection change)
            // if the insert data index is between the first and last realized data index, we need
            // to insert items.
            int lastRealizedDataIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count - 1;
            int newStartingIndex = index;
            if (newStartingIndex > m_firstRealizedDataIndex &&
                newStartingIndex <= lastRealizedDataIndex)
            {
                // Inserted within the realized range
                int insertRangeStartIndex = newStartingIndex - m_firstRealizedDataIndex;
                for (int i = 0; i < count; i++)
                {
                    // Insert null (sentinel) here instead of an element, that way we do not
                    // end up creating a lot of elements only to be thrown out in the next layout.
                    int insertRangeIndex = insertRangeStartIndex + i;
                    int dataIndex = newStartingIndex + i;
                    // This is to keep the contiguousness of the mapping
                    m_realizedElementBounds.Insert(insertRangeIndex, new Rect());
                }
            }
            else if (index <= m_firstRealizedDataIndex)
            {
                // Items were inserted before the realized range.
                // We need to update m_firstRealizedDataIndex;
                m_firstRealizedDataIndex += count;
            }
        }

override void OnItemsChangedCore | ( | VirtualizingLayoutContext | context,
 |  | object | source,
 |  | NotifyCollectionChangedEventArgs | args |
 | ) |  |  | [inline, protected]

Definition at line 79 of file VirtualizingStackLayout.cs.

        {
            InvalidateMeasure();
            if (m_realizedElementBounds.Count > 0)
            {
                switch (args.Action)
                {
                    case NotifyCollectionChangedAction.Add:
                        OnItemsAdded(args.NewStartingIndex, args.NewItems.Count);
                        break;
                    case NotifyCollectionChangedAction.Replace:
                        OnItemsRemoved(args.OldStartingIndex, args.OldItems.Count);
                        OnItemsAdded(args.NewStartingIndex, args.NewItems.Count);
                        break;
                    case NotifyCollectionChangedAction.Remove:
                        OnItemsRemoved(args.OldStartingIndex, args.OldItems.Count);
                        break;
                    case NotifyCollectionChangedAction.Reset:
                        m_realizedElementBounds.Clear();
                        m_firstRealizedDataIndex = 0;
                        break;
                    default:
                        throw new NotImplementedException();
                }
            }
        }

void OnItemsRemoved | ( | int | index,
 |  | int | count |
 | ) |  |  | [inline, private]

Definition at line 388 of file VirtualizingStackLayout.cs.

        {
            int lastRealizedDataIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count - 1;
            int startIndex = Math.Max(m_firstRealizedDataIndex, index);
            int endIndex = Math.Min(lastRealizedDataIndex, index + count - 1);
            bool removeAffectsFirstRealizedDataIndex = (index <= m_firstRealizedDataIndex);

            if (endIndex >= startIndex)
            {
                ClearRealizedRange(RealizationIndex(startIndex), endIndex - startIndex + 1);
            }

            if (removeAffectsFirstRealizedDataIndex &&
                m_firstRealizedDataIndex != -1)
            {
                m_firstRealizedDataIndex -= count;
            }
        }

int RealizationIndex ( int dataIndex ) [inline, private]

Definition at line 353 of file VirtualizingStackLayout.cs.

        {
            return dataIndex - m_firstRealizedDataIndex;
        }

void RemoveCachedBoundsOutsideViewport ( Rect viewport ) [inline, private]

Definition at line 133 of file VirtualizingStackLayout.cs.

        {
            int firstRealizedIndexInViewport = 0;
            while (firstRealizedIndexInViewport < m_realizedElementBounds.Count &&
                   !Intersects(m_realizedElementBounds[firstRealizedIndexInViewport], viewport))
            {
                firstRealizedIndexInViewport++;
            }

            int lastRealizedIndexInViewport = m_realizedElementBounds.Count - 1;
            while (lastRealizedIndexInViewport >= 0 &&
                !Intersects(m_realizedElementBounds[lastRealizedIndexInViewport], viewport))
            {
                lastRealizedIndexInViewport--;
            }

            if (firstRealizedIndexInViewport > 0)
            {
                m_firstRealizedDataIndex += firstRealizedIndexInViewport;
                m_realizedElementBounds.RemoveRange(0, firstRealizedIndexInViewport);
            }

            if (lastRealizedIndexInViewport >= 0 && lastRealizedIndexInViewport < m_realizedElementBounds.Count - 2)
            {
                m_realizedElementBounds.RemoveRange(lastRealizedIndexInViewport + 2, m_realizedElementBounds.Count - lastRealizedIndexInViewport - 3);
            }
        }

void SetCachedBoundsForDataIndex | ( | int | dataIndex,
 |  | Rect | bounds |
 | ) |  |  | [inline, private]

Definition at line 427 of file VirtualizingStackLayout.cs.

        {
            m_realizedElementBounds[RealizationIndex(dataIndex)] = bounds;
        }

bool ShouldContinueFillingUpSpace | ( | int | dataIndex,
 |  | bool | forward,
 |  | Rect | viewport |
 | ) |  |  | [inline, private]

Definition at line 167 of file VirtualizingStackLayout.cs.

        {
            var bounds = GetCachedBoundsForDataIndex(dataIndex);
            return forward ?
                bounds.Y < viewport.Bottom :
                bounds.Y > viewport.Top;
        }

Member Data Documentation

List<double> m_estimationBuffer = Enumerable.Repeat(0d, 100).ToList() [private]

Definition at line 443 of file VirtualizingStackLayout.cs.

int m_firstRealizedDataIndex = 0 [private]

Definition at line 448 of file VirtualizingStackLayout.cs.

Rect m_lastExtent = new Rect() [private]

Definition at line 451 of file VirtualizingStackLayout.cs.

int m_numItemsUsedForEstimation = 0 [private]

Definition at line 444 of file VirtualizingStackLayout.cs.

List<Rect> m_realizedElementBounds = new List<Rect>() [private]

Definition at line 449 of file VirtualizingStackLayout.cs.

double m_totalHeightForEstimation = 0 [private]

Definition at line 445 of file VirtualizingStackLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingStackLayout.cs
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingStackLayoutSamplePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • VirtualizingStackLayoutSamplePage
Public Member Functions | Private Member Functions | Private Attributes

VirtualizingStackLayoutSamplePage Class Reference

List of all members.

Public Member Functions

VirtualizingStackLayoutSamplePage ()
VirtualizingStackLayoutSamplePage ()

Private Member Functions

void | BringIntoView_Click (object sender, RoutedEventArgs e)
void | BringIntoView_Click (object sender, RoutedEventArgs e)

Private Attributes

string | _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus."

Detailed Description

Definition at line 16 of file VirtualizingStackLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

VirtualizingStackLayoutSamplePage ( ) [inline]

Definition at line 20 of file VirtualizingStackLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemTemplate = elementFactory;

            var rnd = new Random();
            var data = new TestObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
                           new Recipe
                           {
                               ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                               Description = k + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                           }));

            repeater.ItemsSource = data;
            bringIntoView.Click += BringIntoView_Click;
        }

VirtualizingStackLayoutSamplePage ( ) [inline]

Definition at line 17 of file VirtualizingStackLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();
            repeater.ItemTemplate = elementFactory;

            var rnd = new Random();
            var data = new ObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
                           new Recipe
                           {
                               ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
                               Description = k + " - " + _lorem.Substring(0, rnd.Next(50, 350))
                           }));

            repeater.ItemsSource = data;
            bringIntoView.Click += BringIntoView_Click;
        }

Member Function Documentation

void BringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file VirtualizingStackLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if (int.TryParse(tb.Text, out index))
            {
                var anchor = repeater.GetOrCreateElement(index);
                anchor.StartBringIntoView();
            }
        }

void BringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file VirtualizingStackLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if (int.TryParse(tb.Text, out index))
            {
                if (index >= 0 && index < repeater.ItemsSourceView.Count)
                {
                    var anchor = repeater.GetOrCreateElement(index);
                    anchor.StartBringIntoView();
                }
            }
        }

Member Data Documentation

string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus." [private]

Definition at line 18 of file VirtualizingStackLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingStackLayoutSamplePage.xaml.cs
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingStackLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingUniformStackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • VirtualizingUniformStackLayout
Protected Member Functions | Properties | Private Member Functions

VirtualizingUniformStackLayout Class Reference

Inherits VirtualizingLayout.

List of all members.

Protected Member Functions

override Size | ArrangeOverride (VirtualizingLayoutContext context, Size finalSize)
override Size | MeasureOverride (VirtualizingLayoutContext context, Size availableSize)

Properties

double | ItemHeight [get, set]
double | ItemWidth [get, set]

Private Member Functions

int | FirstRealizedIndexInRect (Rect realizationRect, int itemCount)
int | LastRealizedIndexInRect (Rect realizationRect, int itemCount)

Detailed Description

Definition at line 12 of file VirtualizingUniformStackLayout.cs.

Member Function Documentation

override Size ArrangeOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | finalSize |
 | ) |  |  | [inline, protected]

Definition at line 43 of file VirtualizingUniformStackLayout.cs.

        {
            var realizationRect = context.RealizationRect;
            int itemCount = context.ItemCount;
            int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
            int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
            Debug.WriteLine("Arrange:" + realizationRect.ToString());

            // Viewport + Buffer Rect.
            for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
            {
                var element = context.GetOrCreateElementAt(currentIndex);
                var arrangeRect = new Rect(0, currentIndex * ItemHeight, ItemWidth, ItemHeight);
                element.Arrange(arrangeRect);
                Debug.WriteLine("   Arrange:" + currentIndex + " :" + arrangeRect);
            }

            // Anchor
            var anchorIndex = context.RecommendedAnchorIndex;
            if (anchorIndex >= 0)
            {
                var anchor = context.GetOrCreateElementAt(anchorIndex);
                var arrangeRect = new Rect(0, anchorIndex * ItemHeight, ItemWidth, ItemHeight);
                anchor.Arrange(arrangeRect);
                Debug.WriteLine("   Arrange:" + anchorIndex + " :" + arrangeRect);
            }

            return finalSize;
        }

int FirstRealizedIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 75 of file VirtualizingUniformStackLayout.cs.

        {
            return Math.Max(0, Math.Min((int)(realizationRect.Y / ItemHeight), itemCount - 1));
        }

int LastRealizedIndexInRect | ( | Rect | realizationRect,
 |  | int | itemCount |
 | ) |  |  | [inline, private]

Definition at line 80 of file VirtualizingUniformStackLayout.cs.

        {
            int index = realizationRect.Bottom == double.PositiveInfinity ? itemCount - 1 : (int)(realizationRect.Bottom / ItemHeight);
            return Math.Max(0, Math.Min(index, itemCount - 1));
        }

override Size MeasureOverride | ( | VirtualizingLayoutContext | context,
 |  | Size | availableSize |
 | ) |  |  | [inline, protected]

Definition at line 17 of file VirtualizingUniformStackLayout.cs.

        {
            var realizationRect = context.RealizationRect;
            int itemCount = context.ItemCount;
            int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
            int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
            Debug.WriteLine("Measure:" + realizationRect.ToString());

            // Viewport + Buffer Rect.
            for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
            {
                var element = context.GetOrCreateElementAt(currentIndex);
                element.Measure(new Size(ItemWidth, ItemHeight));
            }

            // Anchor
            var anchorIndex = context.RecommendedAnchorIndex;
            if (anchorIndex >= 0)
            {
                var anchorElement = context.GetOrCreateElementAt(anchorIndex);
                anchorElement.Measure(new Size(ItemWidth, ItemHeight));
            }

            return new Size(ItemWidth, context.ItemCount * ItemHeight);
        }

Property Documentation

double ItemHeight [get, set]

Definition at line 15 of file VirtualizingUniformStackLayout.cs.

double ItemWidth [get, set]

Definition at line 14 of file VirtualizingUniformStackLayout.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayout.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingUniformStackLayoutSamplePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Samples
  • VirtualizingUniformStackLayoutSamplePage
Public Member Functions | Private Member Functions | Private Attributes

VirtualizingUniformStackLayoutSamplePage Class Reference

List of all members.

Public Member Functions

VirtualizingUniformStackLayoutSamplePage ()
VirtualizingUniformStackLayoutSamplePage ()

Private Member Functions

void | BringIntoView_Click (object sender, RoutedEventArgs e)
void | BringIntoView_Click (object sender, RoutedEventArgs e)
void | Insert_Click (object sender, RoutedEventArgs e)
void | Insert_Click (object sender, RoutedEventArgs e)

Private Attributes

TestObservableCollection< int > | data = new TestObservableCollection<int>(Enumerable.Range(0, 1000))
ObservableCollection< int > | data = new ObservableCollection<int>(Enumerable.Range(0, 1000))

Detailed Description

Definition at line 15 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

Constructor & Destructor Documentation

VirtualizingUniformStackLayoutSamplePage ( ) [inline]

Definition at line 18 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();

            repeater.ItemTemplate = elementFactory;
            repeater.ItemsSource = data;
            bringIntoView.Click += BringIntoView_Click;
            insert.Click += Insert_Click;
        }

VirtualizingUniformStackLayoutSamplePage ( ) [inline]

Definition at line 14 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

        {
            this.InitializeComponent();

            repeater.ItemTemplate = elementFactory;
            repeater.ItemsSource = data;
            bringIntoView.Click += BringIntoView_Click;
            insert.Click += Insert_Click;
        }

Member Function Documentation

void BringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 28 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if (int.TryParse(tb.Text, out index))
            {
                var anchor = repeater.GetOrCreateElement(index);
                anchor.StartBringIntoView();
            }
        }

void BringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 24 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if (int.TryParse(tb.Text, out index))
            {
                var anchor = repeater.GetOrCreateElement(index);
                anchor.StartBringIntoView();
            }
        }

void Insert_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if(!int.TryParse(indexTb.Text, out index))
            {
                index = 0;
            }

            int count = 1;
            if(!int.TryParse(countTb.Text, out count))
            {
                count = 1;
            }

            for (int i = 0; i < count; i++)
            {
                data.Insert(index, 50000 + i);
            }

        }

void Insert_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

        {
            int index = 0;
            if(!int.TryParse(indexTb.Text, out index))
            {
                index = 0;
            }

            int count = 1;
            if(!int.TryParse(countTb.Text, out count))
            {
                count = 1;
            }

            for (int i = 0; i < count; i++)
            {
                data.Insert(index, 50000 + i);
            }

        }

Member Data Documentation

TestObservableCollection<int> data = new TestObservableCollection<int>(Enumerable.Range(0, 1000)) [private]

Definition at line 17 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

ObservableCollection<int> data = new ObservableCollection<int>(Enumerable.Range(0, 1000)) [private]

Definition at line 13 of file VirtualizingUniformStackLayoutSamplePage.xaml.cs.

The documentation for this class was generated from the following files:
  • Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingUniformStackLayoutSamplePage.xaml.cs
  • Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayoutSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SampleSuggestions Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SampleSuggestions
Properties

SampleSuggestions Class Reference

List of all members.

Properties

ObservableCollection< string > Suggestions [get]

Detailed Description

Definition at line 12 of file RevealListPage.xaml.cs.

Property Documentation

ObservableCollection<string> Suggestions [get]

Definition at line 15 of file RevealListPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealListPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollBarController Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollBarController
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

ScrollBarController Class Reference

List of all members.

Public Member Functions

ScrollBarController (ScrollBar scrollBar, ListBox logList, bool isLogging)
CompositionAnimation | GetScrollAnimation (int correlationId, Vector2 startPosition, Vector2 endPosition, CompositionAnimation defaultAnimation)
void | NotifyRequestedScrollCompleted (int correlationId)
void | SetIsScrollable (bool isScrollable)
void | SetValues (double minOffset, double maxOffset, double offset, double viewportLength)

Properties

bool | CanScroll [get, set]
bool | IsEnabled [get, set]
bool | IsLogging [get, set]
bool | IsScrollingWithMouse [get, set]
Orientation | Orientation [get]
IScrollControllerPanningInfo | PanningInfo [get]

Events

TypedEventHandler
< IScrollController,
ScrollControllerAddScrollVelocityRequestedEventArgs > 		AddScrollVelocityRequested
TypedEventHandler
< IScrollController, object > 		CanScrollChanged
TypedEventHandler
< IScrollController, object > 		IsScrollingWithMouseChanged
TypedEventHandler
< IScrollController,
ScrollControllerScrollByRequestedEventArgs > 		ScrollByRequested
TypedEventHandler
< IScrollController,
ScrollControllerScrollToRequestedEventArgs > 		ScrollToRequested

Private Member Functions

void | LogMessage (string message)
int | RaiseAddScrollVelocityRequested (float offsetVelocity, float?inertiaDecayRate)
void | RaiseCanScrollChanged ()
void | RaiseIsScrollingWithMouseChanged ()
int | RaiseScrollByRequested (double offsetDelta, ScrollingAnimationMode animationMode)
int | RaiseScrollToRequested (double offset, ScrollingAnimationMode animationMode)
void | ScrollBarScroll (object sender, ScrollEventArgs e)
void | ScrollBarValueChanged (object sender, RangeBaseValueChangedEventArgs e)

Private Attributes

Object | asyncEventReportingLock = new Object()
List< int > | lstAddScrollVelocityCorrelationIds = new List<int>()
List< string > | lstAsyncEventMessage = new List<string>()
ListBox | lstLog = null
List< int > | lstScrollByCorrelationIds = new List<int>()
List< int > | lstScrollToCorrelationIds = new List<int>()
int | operationsCount = 0
ScrollBar | scrollBar = null

Detailed Description

Definition at line 559 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

Constructor & Destructor Documentation

ScrollBarController | ( | ScrollBar | scrollBar,
 |  | ListBox | logList,
 |  | bool | isLogging |
 | ) |  |  | [inline]

Definition at line 576 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            this.scrollBar = scrollBar;
            this.IsLogging = isLogging;
            this.IsScrollingWithMouse = false;

            lstLog = logList;
            LogMessage("ScrollBarController: constructor for Orientation=" + Orientation);

            scrollBar.SmallChange = 16.0;
            scrollBar.ValueChanged += ScrollBarValueChanged;
            scrollBar.Scroll += ScrollBarScroll;
        }

Member Function Documentation

CompositionAnimation GetScrollAnimation | ( | int | correlationId,
 |  | Vector2 | startPosition,
 |  | Vector2 | endPosition,
 |  | CompositionAnimation | defaultAnimation |
 | ) |  |  | [inline]

Definition at line 672 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage(
                "ScrollBarController: GetScrollAnimation for Orientation=" + Orientation +
                " with offsetChangeCorrelationId=" + correlationId + ", startPosition=" + startPosition + ", endPosition=" + endPosition);
            return null;
        }

void LogMessage ( string message ) [inline, private]

Definition at line 831 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (IsLogging)
            {
                lstLog.Items.Add(message);
            }
        }

void NotifyRequestedScrollCompleted ( int correlationId ) [inline]

Definition at line 684 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            int offsetChangeCorrelationId = correlationId;

            LogMessage(
                "ScrollBarController: NotifyRequestedScrollCompleted for Orientation=" + Orientation +
                " with offsetChangeCorrelationId=" + offsetChangeCorrelationId);

            if (lstScrollToCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstScrollToCorrelationIds.Remove(offsetChangeCorrelationId);
                operationsCount--;
            }
            else if (lstScrollByCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstScrollByCorrelationIds.Remove(offsetChangeCorrelationId);
                operationsCount--;
            }
            else if (lstAddScrollVelocityCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstAddScrollVelocityCorrelationIds.Remove(offsetChangeCorrelationId);
                operationsCount--;
            }
        }

int RaiseAddScrollVelocityRequested | ( | float | offsetVelocity,
 |  | float? | inertiaDecayRate |
 | ) |  |  | [inline, private]

Definition at line 810 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: RaiseAddScrollVelocityRequested for Orientation=" + Orientation + " with offsetVelocity=" + offsetVelocity + ", inertiaDecayRate=" + inertiaDecayRate);
            if (AddScrollVelocityRequested != null)
            {
                ScrollControllerAddScrollVelocityRequestedEventArgs e =
                    new ScrollControllerAddScrollVelocityRequestedEventArgs(
                        offsetVelocity,
                        inertiaDecayRate);
                AddScrollVelocityRequested(this, e);
                if (e.CorrelationId != -1 && !lstAddScrollVelocityCorrelationIds.Contains(e.CorrelationId))
                {
                    operationsCount++;
                    lstAddScrollVelocityCorrelationIds.Add(e.CorrelationId);
                }
                return e.CorrelationId;
            }
            return -1;
        }

void RaiseCanScrollChanged ( ) [inline, private]

Definition at line 748 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: RaiseCanScrollChanged for Orientation=" + Orientation);
            if (CanScrollChanged != null)
            {
                CanScrollChanged(this, null);
            }
        }

void RaiseIsScrollingWithMouseChanged ( ) [inline, private]

Definition at line 757 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: RaiseIsScrollingWithMouseChanged for Orientation=" + Orientation);
            if (IsScrollingWithMouseChanged != null)
            {
                IsScrollingWithMouseChanged(this, null);
            }
        }

int RaiseScrollByRequested | ( | double | offsetDelta,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline, private]

Definition at line 788 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: RaiseScrollByRequested for Orientation=" + Orientation + " with offsetDelta=" + offsetDelta + ", animationMode=" + animationMode);
            if (ScrollToRequested != null)
            {
                ScrollControllerScrollByRequestedEventArgs e =
                    new ScrollControllerScrollByRequestedEventArgs(
                        offsetDelta,
                        new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
                ScrollByRequested(this, e);
                if (e.CorrelationId != -1 && !lstScrollByCorrelationIds.Contains(e.CorrelationId))
                {
                    operationsCount++;
                    lstScrollByCorrelationIds.Add(e.CorrelationId);
                }
                return e.CorrelationId;
            }
            return -1;
        }

int RaiseScrollToRequested | ( | double | offset,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline, private]

Definition at line 766 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: RaiseScrollToRequested for Orientation=" + Orientation + " with offset=" + offset + ", animationMode=" + animationMode);
            if (ScrollToRequested != null)
            {
                ScrollControllerScrollToRequestedEventArgs e =
                    new ScrollControllerScrollToRequestedEventArgs(
                        offset,
                        new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
                ScrollToRequested(this, e);
                if (e.CorrelationId != -1 && !lstScrollToCorrelationIds.Contains(e.CorrelationId))
                {
                    operationsCount++;
                    lstScrollToCorrelationIds.Add(e.CorrelationId);
                }
                return e.CorrelationId;
            }
            return -1;
        }

void ScrollBarScroll | ( | object | sender,
 |  | ScrollEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 715 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: ScrollBarScroll for Orientation=" + Orientation + " with ScrollEventType=" + e.ScrollEventType + ", NewValue = " + e.NewValue);

            switch (e.ScrollEventType)
            {
                case ScrollEventType.EndScroll:
                    if (IsScrollingWithMouse)
                    {
                        IsScrollingWithMouse = false;
                        RaiseIsScrollingWithMouseChanged();
                    }
                    break;
                case ScrollEventType.LargeDecrement:
                case ScrollEventType.LargeIncrement:
                case ScrollEventType.SmallDecrement:
                case ScrollEventType.SmallIncrement:
                case ScrollEventType.ThumbPosition:
                case ScrollEventType.ThumbTrack:

                    if (e.ScrollEventType == ScrollEventType.ThumbTrack && !IsScrollingWithMouse)
                    {
                        IsScrollingWithMouse = true;
                        RaiseIsScrollingWithMouseChanged();
                    }

                    int offsetChangeCorrelationId = RaiseScrollToRequested(
                        e.NewValue,
                        ScrollingAnimationMode.Disabled);
                    break;
            }
        }

void ScrollBarValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 710 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: ScrollBarValueChanged for Orientation=" + Orientation + " with Value=" + scrollBar.Value);
        }

void SetIsScrollable ( bool isScrollable ) [inline]

Definition at line 638 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: SetIsScrollable for Orientation=" + Orientation + " with isScrollable=" + isScrollable);
            bool oldCanScroll = CanScroll;

            CanScroll = isScrollable && IsEnabled;

            if (oldCanScroll != CanScroll)
            {
                RaiseCanScrollChanged();
            }
        }

void SetValues | ( | double | minOffset,
 |  | double | maxOffset,
 |  | double | offset,
 |  | double | viewportLength |
 | ) |  |  | [inline]

Definition at line 651 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            LogMessage("ScrollBarController: SetValues for Orientation=" + Orientation + " with maxOffset=" + maxOffset + ", offset=" + offset + ", viewportLength=" + viewportLength);

            if (operationsCount > 0)
            {
                LogMessage("ScrollBarController: SetValues ignored during operation");
                return;
            }

            scrollBar.ViewportSize = viewportLength;
            scrollBar.Minimum = minOffset;
            scrollBar.Maximum = maxOffset;
            scrollBar.Value = offset;
            scrollBar.LargeChange = viewportLength;
        }

Member Data Documentation

Object asyncEventReportingLock = new Object() [private]

Definition at line 564 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

List<int> lstAddScrollVelocityCorrelationIds = new List<int>() [private]

Definition at line 568 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 565 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

ListBox lstLog = null [private]

Definition at line 561 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

List<int> lstScrollByCorrelationIds = new List<int>() [private]

Definition at line 567 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

List<int> lstScrollToCorrelationIds = new List<int>() [private]

Definition at line 566 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

int operationsCount = 0 [private]

Definition at line 563 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

ScrollBar scrollBar = null [private]

Definition at line 562 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

Property Documentation

bool CanScroll [get, set]

Definition at line 627 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

bool IsEnabled [get, set]

Definition at line 597 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

bool IsLogging [get, set]

Definition at line 591 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

bool IsScrollingWithMouse [get, set]

Definition at line 633 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

Orientation Orientation [get]

Definition at line 611 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

IScrollControllerPanningInfo PanningInfo [get]

Definition at line 619 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

Event Documentation

TypedEventHandler<IScrollController, ScrollControllerAddScrollVelocityRequestedEventArgs> AddScrollVelocityRequested

Definition at line 574 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

TypedEventHandler<IScrollController, object> CanScrollChanged

Definition at line 570 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

TypedEventHandler<IScrollController, object> IsScrollingWithMouseChanged

Definition at line 571 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

TypedEventHandler<IScrollController, ScrollControllerScrollByRequestedEventArgs> ScrollByRequested

Definition at line 573 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

TypedEventHandler<IScrollController, ScrollControllerScrollToRequestedEventArgs> ScrollToRequested

Definition at line 572 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterWithSimpleScrollControllersPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollBarPage
Public Member Functions

ScrollBarPage Class Reference

List of all members.

Public Member Functions

ScrollBarPage ()

Detailed Description

Definition at line 7 of file ScrollBarPage.xaml.cs.

Constructor & Destructor Documentation

ScrollBarPage ( ) [inline]

Definition at line 9 of file ScrollBarPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ScrollBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterAccessibilityPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterAccessibilityPage
Public Member Functions | Private Member Functions | Private Attributes

ScrollPresenterAccessibilityPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterAccessibilityPage ()

Private Member Functions

void | BtnSetScrollPercent_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | EnsureAutomationPeer ()

Private Attributes

IScrollProvider | scrollPresenterAutomationPeer

Detailed Description

Definition at line 10 of file ScrollPresenterAccessibilityPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterAccessibilityPage ( ) [inline]

Definition at line 14 of file ScrollPresenterAccessibilityPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void BtnSetScrollPercent_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file ScrollPresenterAccessibilityPage.xaml.cs.

        {
            EnsureAutomationPeer();

            if (scrollPresenterAutomationPeer != null)
            {
                scrollPresenterAutomationPeer.SetScrollPercent(
                    Math.Min(100.0, scrollPresenterAutomationPeer.HorizontalScrollPercent + 10.0),
                    Math.Min(100.0, scrollPresenterAutomationPeer.VerticalScrollPercent + 15.0));
            }
        }

void EnsureAutomationPeer ( ) [inline, private]

Definition at line 31 of file ScrollPresenterAccessibilityPage.xaml.cs.

        {
            if (scrollPresenterAutomationPeer == null)
            {
                scrollPresenterAutomationPeer = FrameworkElementAutomationPeer.CreatePeerForElement(scrollPresenter) as IScrollProvider;
            }
        }

Member Data Documentation

IScrollProvider scrollPresenterAutomationPeer [private]

Definition at line 12 of file ScrollPresenterAccessibilityPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterAccessibilityPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterBringIntoViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterBringIntoViewPage
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollPresenterBringIntoViewPage Class Reference

List of all members.

Classes

class | SampleDataSource

Public Member Functions

ScrollPresenterBringIntoViewPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearScrollPresenterEvents_Click (object sender, RoutedEventArgs e)
void | BtnStartBringIntoView_Click (object sender, RoutedEventArgs e)
void | ChkLogBringIntoViewRequestedEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogBringIntoViewRequestedEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | CmbNestingCombination_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | FrameworkElement_BringIntoViewRequested (UIElement sender, BringIntoViewRequestedEventArgs args)
void | HookBringIntoViewEvents ()
void | HookScrollPresenterEvents (ScrollPresenter scrollPresenter)
void | HookScrollViewerEvents (ScrollViewer scrollViewer)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | RefreshSnapPoints (ScrollPresenter scrollPresenter, StackPanel stackPanel)
void | Repeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | ScrollPresenter_BringingIntoView (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ScrollAnimationStarting (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_ScrollCompleted (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenterBringIntoViewPage_Loaded (object sender, RoutedEventArgs e)
void | ScrollViewer_ViewChanged (object sender, ScrollViewerViewChangedEventArgs e)
void | UnhookBringIntoViewEvents ()
void | UnhookScrollPresenterEvents (ScrollPresenter scrollPresenter)
void | UnhookScrollViewerEvents (ScrollViewer scrollViewer)

Private Attributes

Object | asyncEventReportingLock = new Object()
SampleDataSource | dataSource = null
List< string > | lstAsyncEventMessage = new List<string>()

Detailed Description

Definition at line 20 of file ScrollPresenterBringIntoViewPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterBringIntoViewPage ( ) [inline]

Definition at line 26 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            InitializeComponent();

            Loaded += ScrollPresenterBringIntoViewPage_Loaded;

            dataSource = new SampleDataSource(
                this,
                Enumerable.Range(0, 16).Select(i => string.Format("Item{0}", i)).ToList());

            repeater1.ItemTemplate = repeater1ElementFactory;
            repeater1.ItemsSource = dataSource;
            repeater1.ElementPrepared += Repeater_ElementPrepared;

            repeater2.ItemTemplate = repeater2ElementFactory;
            repeater2.ItemsSource = dataSource;
            repeater2.ElementPrepared += Repeater_ElementPrepared;

            repeater3.ItemTemplate = repeater3ElementFactory;
            repeater3.ItemsSource = dataSource;
            repeater3.ElementPrepared += Repeater_ElementPrepared;

            repeater4.ItemTemplate = repeater4ElementFactory;
            repeater4.ItemsSource = dataSource;
            repeater4.ElementPrepared += Repeater_ElementPrepared;
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 657 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }

                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 690 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstScrollPresenterEvents.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 547 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearScrollPresenterEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 542 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            lstScrollPresenterEvents.Items.Clear();
        }

void BtnStartBringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 224 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            try
            {
                txtInnerStockOffsetsChangeDuration.Text = string.Empty;
                txtOuterStockOffsetsChangeDuration.Text = string.Empty;

                FrameworkElement targetElement = null;
                ItemsRepeater repeater = null;

                switch (cmbNestingCombination.SelectedIndex)
                {
                    case 0: //ScrollPresenterInScrollPresenter (1)
                        repeater = repeater1;
                        break;

                    case 2: //ScrollPresenterInScrollViewer
                        repeater = repeater2;
                        break;

                    case 3: //ScrollViewerInScrollPresenter
                        repeater = repeater3;
                        break;

                    case 4: //ScrollViewerInScrollViewer
                        repeater = repeater4;
                        break;
                }

                Border border = null;

                if (repeater != null)
                {
                    border = repeater.TryGetElement(Convert.ToInt16(txtTargetElement.Text)) as Border;
                }
                else
                {
                    // case ScrollPresenterInScrollPresenter (2)
                    border = (innerScrollPresenter3.Content as StackPanel).Children[Convert.ToInt16(txtTargetElement.Text)] as Border;
                }

                if (border != null)
                {
                    targetElement = border.Child as FrameworkElement;

                    if (targetElement != null)
                    {
                        BringIntoViewOptions options = new BringIntoViewOptions();

                        options.AnimationDesired = cmbAnimationDesired.SelectedIndex == 0;
                        options.HorizontalAlignmentRatio = Convert.ToDouble(txtHorizontalAlignmentRatio.Text);
                        options.VerticalAlignmentRatio = Convert.ToDouble(txtVerticalAlignmentRatio.Text);
                        options.HorizontalOffset = Convert.ToDouble(txtHorizontalOffset.Text);
                        options.VerticalOffset = Convert.ToDouble(txtVerticalOffset.Text);

                        if (chkIgnoreSnapPoints.IsChecked == false)
                        {
                            ScrollPresenter scrollPresenter1 = null;
                            ScrollPresenter scrollPresenter2 = null;

                            switch (cmbNestingCombination.SelectedIndex)
                            {
                                case 0: //ScrollPresenterInScrollPresenter (1)
                                    scrollPresenter1 = outerScrollPresenter;
                                    scrollPresenter2 = innerScrollPresenter;
                                    break;

                                case 1: //ScrollPresenterInScrollPresenter (2)
                                    scrollPresenter1 = outerScrollPresenter3;
                                    scrollPresenter2 = innerScrollPresenter3;
                                    break;

                                case 2: //ScrollPresenterInScrollViewer
                                    scrollPresenter1 = innerScrollPresenter2;
                                    break;

                                case 3: //ScrollViewerInScrollPresenter
                                    scrollPresenter1 = outerScrollPresenter2;
                                    break;
                            }

                            if (scrollPresenter1 != null)
                            {
                                RefreshSnapPoints(scrollPresenter1, scrollPresenter1.Content as StackPanel);
                            }

                            if (scrollPresenter2 != null)
                            {
                                RefreshSnapPoints(scrollPresenter2, scrollPresenter2.Content as StackPanel);
                            }
                        }

                        if (chkLogBringIntoViewRequestedEvents.IsChecked == true)
                        {
                            AppendAsyncEventMessage("Invoking StartBringIntoView on " + targetElement.Name);
                        }
                        targetElement.StartBringIntoView(options);
                    }
                }

                if (targetElement == null && chkLogBringIntoViewRequestedEvents.IsChecked == true)
                {
                    AppendAsyncEventMessage("TargetElement not found");
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ChkLogBringIntoViewRequestedEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 388 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            HookBringIntoViewEvents();

            txtInnerStockOffsetsChangeDuration.IsEnabled = true;
            txtInnerOverriddenOffsetsChangeDuration.IsEnabled = true;
            txtOuterStockOffsetsChangeDuration.IsEnabled = true;
            txtOuterOverriddenOffsetsChangeDuration.IsEnabled = true;
            chkCancelOperationInBringingIntoView.IsEnabled = true;
        }

void ChkLogBringIntoViewRequestedEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 399 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            UnhookBringIntoViewEvents();

            txtInnerStockOffsetsChangeDuration.IsEnabled = false;
            txtInnerOverriddenOffsetsChangeDuration.IsEnabled = false;
            txtOuterStockOffsetsChangeDuration.IsEnabled = false;
            txtOuterOverriddenOffsetsChangeDuration.IsEnabled = false;
            chkCancelOperationInBringingIntoView.IsEnabled = false;
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 476 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            HookScrollPresenterEvents(innerScrollPresenter);
            HookScrollPresenterEvents(innerScrollPresenter2);
            HookScrollPresenterEvents(innerScrollPresenter3);
            HookScrollPresenterEvents(outerScrollPresenter);
            HookScrollPresenterEvents(outerScrollPresenter2);
            HookScrollPresenterEvents(outerScrollPresenter3);
            HookScrollViewerEvents(innerScrollViewer);
            HookScrollViewerEvents(innerScrollViewer2);
            HookScrollViewerEvents(outerScrollViewer);
            HookScrollViewerEvents(outerScrollViewer2);
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 490 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            UnhookScrollPresenterEvents(innerScrollPresenter);
            UnhookScrollPresenterEvents(innerScrollPresenter2);
            UnhookScrollPresenterEvents(innerScrollPresenter3);
            UnhookScrollPresenterEvents(outerScrollPresenter);
            UnhookScrollPresenterEvents(outerScrollPresenter2);
            UnhookScrollPresenterEvents(outerScrollPresenter3);
            UnhookScrollViewerEvents(innerScrollViewer);
            UnhookScrollViewerEvents(innerScrollViewer2);
            UnhookScrollViewerEvents(outerScrollViewer);
            UnhookScrollViewerEvents(outerScrollViewer2);
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 530 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 536 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void CmbNestingCombination_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 336 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            if (outerScrollPresenter == null ||
                outerScrollPresenter2 == null ||
                outerScrollPresenter3 == null ||
                outerScrollViewer == null ||
                outerScrollViewer2 == null) return;

            switch (cmbNestingCombination.SelectedIndex)
            {
                case 0: //ScrollPresenterInScrollPresenter (1)
                    outerScrollPresenter.Visibility = Visibility.Visible;
                    outerScrollViewer.Visibility = Visibility.Collapsed;
                    outerScrollPresenter2.Visibility = Visibility.Collapsed;
                    outerScrollViewer2.Visibility = Visibility.Collapsed;
                    outerScrollPresenter3.Visibility = Visibility.Collapsed;
                    break;

                case 1: //ScrollPresenterInScrollPresenter (2)
                    outerScrollPresenter.Visibility = Visibility.Collapsed;
                    outerScrollViewer.Visibility = Visibility.Collapsed;
                    outerScrollPresenter2.Visibility = Visibility.Collapsed;
                    outerScrollViewer2.Visibility = Visibility.Collapsed;
                    outerScrollPresenter3.Visibility = Visibility.Visible;
                    break;

                case 2: //ScrollPresenterInScrollViewer
                    outerScrollPresenter.Visibility = Visibility.Collapsed;
                    outerScrollViewer.Visibility = Visibility.Visible;
                    outerScrollPresenter2.Visibility = Visibility.Collapsed;
                    outerScrollViewer2.Visibility = Visibility.Collapsed;
                    outerScrollPresenter3.Visibility = Visibility.Collapsed;
                    break;

                case 3: //ScrollViewerInScrollPresenter
                    outerScrollPresenter.Visibility = Visibility.Collapsed;
                    outerScrollViewer.Visibility = Visibility.Collapsed;
                    outerScrollPresenter2.Visibility = Visibility.Visible;
                    outerScrollViewer2.Visibility = Visibility.Collapsed;
                    outerScrollPresenter3.Visibility = Visibility.Collapsed;
                    break;

                case 4: //ScrollViewerInScrollViewer
                    outerScrollPresenter.Visibility = Visibility.Collapsed;
                    outerScrollViewer.Visibility = Visibility.Collapsed;
                    outerScrollPresenter2.Visibility = Visibility.Collapsed;
                    outerScrollViewer2.Visibility = Visibility.Visible;
                    outerScrollPresenter3.Visibility = Visibility.Collapsed;
                    break;
            }
        }

void FrameworkElement_BringIntoViewRequested | ( | UIElement | sender,
 |  | BringIntoViewRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 181 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            string asyncEventMessage = "BringIntoViewRequested Sender=" + (sender as FrameworkElement).Name;
            asyncEventMessage += ", AnimationDesired=" + args.AnimationDesired + ", Handled=" + args.Handled;
            asyncEventMessage += ", HorizontalAlignmentRatio=" + args.HorizontalAlignmentRatio + ", VerticalAlignmentRatio=" + args.VerticalAlignmentRatio;
            asyncEventMessage += ", HorizontalOffset=" + args.HorizontalOffset + ", VerticalOffset=" + args.VerticalOffset;
            asyncEventMessage += ", TargetRect=" + args.TargetRect + ", TargetElement=" + (args.TargetElement as FrameworkElement).Name;
            asyncEventMessage += ", OriginalSource=";
            if (args.OriginalSource == null)
                asyncEventMessage += "null";
            else
                asyncEventMessage += (args.OriginalSource as FrameworkElement).Name;
            AppendAsyncEventMessage(asyncEventMessage);
        }

void HookBringIntoViewEvents ( ) [inline, private]

Definition at line 410 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            if (innerScrollPresenter != null)
            {
                innerScrollPresenter.BringingIntoView += ScrollPresenter_BringingIntoView;
                innerScrollPresenter2.BringingIntoView += ScrollPresenter_BringingIntoView;
                innerScrollPresenter3.BringingIntoView += ScrollPresenter_BringingIntoView;
                outerScrollPresenter.BringingIntoView += ScrollPresenter_BringingIntoView;
                outerScrollPresenter2.BringingIntoView += ScrollPresenter_BringingIntoView;
                outerScrollPresenter3.BringingIntoView += ScrollPresenter_BringingIntoView;

                innerScrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                innerScrollPresenter2.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                innerScrollPresenter3.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                outerScrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                outerScrollPresenter2.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                outerScrollPresenter3.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;

                innerScrollPresenter.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                innerScrollPresenter2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                innerScrollPresenter3.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                outerScrollPresenter.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                outerScrollPresenter2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                outerScrollPresenter3.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;

                outerScrollViewer.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                innerScrollViewer.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;

                outerScrollViewer2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                innerScrollViewer2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
            }
        }

void HookScrollPresenterEvents ( ScrollPresenter scrollPresenter ) [inline, private]

Definition at line 504 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
        }

void HookScrollViewerEvents ( ScrollViewer scrollViewer ) [inline, private]

Definition at line 520 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 628 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
                AppendAsyncEventMessage("Warning: Failure while accessing sender's Name");
            }

            if (args.IsVerboseLevel)
            {
                AppendAsyncEventMessage("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                AppendAsyncEventMessage("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 74 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void RefreshSnapPoints | ( | ScrollPresenter | scrollPresenter,
 |  | StackPanel | stackPanel |
 | ) |  |  | [inline, private]

Definition at line 552 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            if (scrollPresenter != null && stackPanel != null && stackPanel.Children.Count > 0)
            {
                AppendAsyncEventMessage("Populating snap points for " + scrollPresenter.Name + ":");

                ScrollSnapPoint scrollSnapPoint;
                GeneralTransform gt = stackPanel.TransformToVisual(scrollPresenter.Content);
                Point stackPanelOriginPoint = new Point();
                stackPanelOriginPoint = gt.TransformPoint(stackPanelOriginPoint);

                if (stackPanel.Orientation == Orientation.Horizontal)
                {
                    scrollPresenter.HorizontalSnapPoints.Clear();

                    scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.X, ScrollSnapPointsAlignment.Near);
                    AppendAsyncEventMessage("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.X);
                    scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
                }
                else
                {
                    scrollPresenter.VerticalSnapPoints.Clear();

                    scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.Y, ScrollSnapPointsAlignment.Near);
                    AppendAsyncEventMessage("Adding vertical snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.Y);
                    scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
                }

                foreach (UIElement child in stackPanel.Children)
                {
                    FrameworkElement childAsFE = child as FrameworkElement;

                    if (childAsFE != null)
                    {
                        gt = childAsFE.TransformToVisual(stackPanel);
                        Point childOriginPoint = new Point();
                        childOriginPoint = gt.TransformPoint(childOriginPoint);

                        double snapPointValue = 0.0;
                        Thickness margin = childAsFE.Margin;

                        if (stackPanel.Orientation == Orientation.Horizontal)
                        {
                            snapPointValue = margin.Right + childAsFE.ActualWidth + childOriginPoint.X;
                            if (snapPointValue <= scrollPresenter.ScrollableWidth)
                            {
                                scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
                                AppendAsyncEventMessage("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
                                scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
                            }
                            else
                            {
                                break;
                            }
                        }
                        else
                        {
                            snapPointValue = margin.Bottom + childAsFE.ActualHeight + childOriginPoint.Y;
                            if (snapPointValue <= scrollPresenter.ScrollableHeight)
                            {
                                scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
                                AppendAsyncEventMessage("Adding vertical snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
                                scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
                            }
                            else
                            {
                                break;
                            }
                        }
                    }

                    RefreshSnapPoints(scrollPresenter, child as StackPanel);
                }
            }
        }

void Repeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 53 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            try
            {
                Border b = args.Element as Border;
                b.Name = "B" + args.Index;

                TextBox txt = b.Child as TextBox;
                txt.Name = txt.Text;

                if (args.Index == 7)
                {
                    b.Visibility = Visibility.Collapsed;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void ScrollPresenter_BringingIntoView | ( | ScrollPresenter | sender,
 |  | ScrollingBringingIntoViewEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 113 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            string asyncEventMessage = "BringingIntoView ScrollPresenter=" + sender.Name;
            asyncEventMessage += ", TargetHorizontalOffset=" + args.TargetHorizontalOffset + ", TargetVerticalOffset=" + args.TargetVerticalOffset;
            asyncEventMessage += ", OffsetsChangeCorrelationId=" + args.CorrelationId;
            asyncEventMessage += ", SnapPointsMode=" + args.SnapPointsMode;
            asyncEventMessage += ", RequestEventArgs.AnimationDesired=" + args.RequestEventArgs.AnimationDesired + ", RequestEventArgs.Handled=" + args.RequestEventArgs.Handled;
            asyncEventMessage += ", RequestEventArgs.HorizontalAlignmentRatio=" + args.RequestEventArgs.HorizontalAlignmentRatio + ", RequestEventArgs.VerticalAlignmentRatio=" + args.RequestEventArgs.VerticalAlignmentRatio;
            asyncEventMessage += ", RequestEventArgs.HorizontalOffset=" + args.RequestEventArgs.HorizontalOffset + ", RequestEventArgs.VerticalOffset=" + args.RequestEventArgs.VerticalOffset;
            asyncEventMessage += ", RequestEventArgs.TargetRect=" + args.RequestEventArgs.TargetRect + ", RequestEventArgs.TargetElement=" + (args.RequestEventArgs.TargetElement as FrameworkElement).Name;
            asyncEventMessage += ", OriginalSource=";
            if (args.RequestEventArgs.OriginalSource == null)
                asyncEventMessage += "null";
            else
                asyncEventMessage += (args.RequestEventArgs.OriginalSource as FrameworkElement).Name;
            AppendAsyncEventMessage(asyncEventMessage);

            args.SnapPointsMode = chkIgnoreSnapPoints.IsChecked == true ? ScrollingSnapPointsMode.Ignore : ScrollingSnapPointsMode.Default;

            if (chkCancelOperationInBringingIntoView.IsChecked == true)
            {
                args.Cancel = true;
            }
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 196 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage("ExtentChanged ScrollPresenter=" + sender.Name + ", ExtentWidth=" + sender.ExtentWidth.ToString() + ", ExtentHeight=" + sender.ExtentHeight.ToString());
        }

void ScrollPresenter_ScrollAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 138 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            try
            {
                if (chkLogBringIntoViewRequestedEvents.IsChecked == true)
                {
                    AppendAsyncEventMessage("ScrollAnimationStarting ScrollPresenter=" + sender.Name + ", OffsetsChangeCorrelationId=" + args.CorrelationId);
                }

                Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;

                if (stockKeyFrameAnimation != null)
                {
                    TextBox txtStockOffsetsChangeDuration = null;
                    string overriddenOffsetsChangeDuration = string.Empty;

                    if (sender == innerScrollPresenter || sender == innerScrollPresenter2)
                    {
                        txtStockOffsetsChangeDuration = txtInnerStockOffsetsChangeDuration;
                        overriddenOffsetsChangeDuration = txtInnerOverriddenOffsetsChangeDuration.Text;
                    }
                    else
                    {
                        txtStockOffsetsChangeDuration = txtOuterStockOffsetsChangeDuration;
                        overriddenOffsetsChangeDuration = txtOuterOverriddenOffsetsChangeDuration.Text;
                    }

                    txtStockOffsetsChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();

                    if (!string.IsNullOrWhiteSpace(overriddenOffsetsChangeDuration))
                    {
                        double durationOverride = Convert.ToDouble(overriddenOffsetsChangeDuration);
                        stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenter_ScrollCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 211 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

            AppendAsyncEventMessage("ScrollCompleted ScrollPresenter=" + sender.Name + ", OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 201 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage("StateChanged ScrollPresenter=" + sender.Name + ", State=" + sender.State.ToString());
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 206 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage("ViewChanged ScrollPresenter=" + sender.Name + ", H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset.ToString() + ", ZF=" + sender.ZoomFactor.ToString());
        }

void ScrollPresenterBringIntoViewPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 82 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            try
            {
                if (chkLogScrollPresenterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
                }

                if (chkLogScrollPresenterEvents.IsChecked == true)
                {
                    HookScrollPresenterEvents(innerScrollPresenter);
                    HookScrollPresenterEvents(innerScrollPresenter2);
                    HookScrollPresenterEvents(innerScrollPresenter3);
                    HookScrollPresenterEvents(outerScrollPresenter);
                    HookScrollPresenterEvents(outerScrollPresenter2);
                    HookScrollPresenterEvents(outerScrollPresenter3);
                    HookScrollViewerEvents(innerScrollViewer);
                    HookScrollViewerEvents(innerScrollViewer2);
                    HookScrollViewerEvents(outerScrollViewer);
                    HookScrollViewerEvents(outerScrollViewer2);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollViewer_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 218 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            ScrollViewer sv = sender as ScrollViewer;
            AppendAsyncEventMessage("ViewChanged ScrollViewer=" + sv.Name + ", H=" + sv.HorizontalOffset + ", V=" + sv.VerticalOffset + ", S=" + sv.ZoomFactor);
        }

void UnhookBringIntoViewEvents ( ) [inline, private]

Definition at line 443 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            if (innerScrollPresenter != null)
            {
                innerScrollPresenter.BringingIntoView -= ScrollPresenter_BringingIntoView;
                innerScrollPresenter2.BringingIntoView -= ScrollPresenter_BringingIntoView;
                innerScrollPresenter3.BringingIntoView -= ScrollPresenter_BringingIntoView;
                outerScrollPresenter.BringingIntoView -= ScrollPresenter_BringingIntoView;
                outerScrollPresenter2.BringingIntoView -= ScrollPresenter_BringingIntoView;
                outerScrollPresenter3.BringingIntoView -= ScrollPresenter_BringingIntoView;

                innerScrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                innerScrollPresenter2.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                innerScrollPresenter3.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                outerScrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                outerScrollPresenter2.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                outerScrollPresenter3.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;

                innerScrollPresenter.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                innerScrollPresenter2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                innerScrollPresenter3.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                outerScrollPresenter.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                outerScrollPresenter2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                outerScrollPresenter3.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;

                outerScrollViewer.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                innerScrollViewer.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;

                outerScrollViewer2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                innerScrollViewer2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
            }
        }

void UnhookScrollPresenterEvents ( ScrollPresenter scrollPresenter ) [inline, private]

Definition at line 512 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
            scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
            scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
        }

void UnhookScrollViewerEvents ( ScrollViewer scrollViewer ) [inline, private]

Definition at line 525 of file ScrollPresenterBringIntoViewPage.xaml.cs.

        {
            scrollViewer.ViewChanged -= ScrollViewer_ViewChanged;
        }

Member Data Documentation

Object asyncEventReportingLock = new Object() [private]

Definition at line 23 of file ScrollPresenterBringIntoViewPage.xaml.cs.

SampleDataSource dataSource = null [private]

Definition at line 22 of file ScrollPresenterBringIntoViewPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 24 of file ScrollPresenterBringIntoViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterBringIntoViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterBringIntoViewPage::SampleDataSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterBringIntoViewPage
  • ScrollPresenterBringIntoViewPage::SampleDataSource
Public Member Functions | Protected Member Functions | Properties | Private Attributes

ScrollPresenterBringIntoViewPage::SampleDataSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping.

List of all members.

Public Member Functions

SampleDataSource (ScrollPresenterBringIntoViewPage owner, List< string > source)

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()
override string | KeyFromIndexCore (int index)

Properties

List< string > | Inner [get, set]
ScrollPresenterBringIntoViewPage | Owner [get, set]

Private Attributes

List< string > | _inner

Detailed Description

Definition at line 702 of file ScrollPresenterBringIntoViewPage.xaml.cs.

Constructor & Destructor Documentation

SampleDataSource | ( | ScrollPresenterBringIntoViewPage | owner,
 |  | List< string > | source |
 | ) |  |  | [inline]

Definition at line 706 of file ScrollPresenterBringIntoViewPage.xaml.cs.

            {
                Owner = owner;
                Inner = source;
            }

Member Function Documentation

override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 736 of file ScrollPresenterBringIntoViewPage.xaml.cs.

            {
                return Inner[index];
            }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 712 of file ScrollPresenterBringIntoViewPage.xaml.cs.

            {
                return Inner.Count;
            }

override string KeyFromIndexCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceViewWithUniqueIdMapping.

Definition at line 741 of file ScrollPresenterBringIntoViewPage.xaml.cs.

            {
                // data is the same as its unique id
                return Inner[index].ToString();
            }

Member Data Documentation

List<string> _inner [private]

Definition at line 704 of file ScrollPresenterBringIntoViewPage.xaml.cs.

Property Documentation

List<string> Inner [get, set]

Definition at line 718 of file ScrollPresenterBringIntoViewPage.xaml.cs.

ScrollPresenterBringIntoViewPage Owner [get, set, private]

Definition at line 731 of file ScrollPresenterBringIntoViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterBringIntoViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterChainingAndRailingPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterChainingAndRailingPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollPresenterChainingAndRailingPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterChainingAndRailingPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollPresenterChainingAndRailingPage ()
void | btnClearFullLog_Click (object sender, RoutedEventArgs e)
void | btnGetFullLog_Click (object sender, RoutedEventArgs e)
void | btnResetViews_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | CmbHorizontalScrollChainMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollRailMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollChainMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollRailMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbZoomChainMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
ScrollPresenter | GetScrollPresenterWithSuffix (string suffix)
ScrollViewer | GetScrollViewerWithSuffix (string suffix)
void | InitializeUIFromScrollPresenter (string suffix)
void | InitializeUIFromScrollViewer (string suffix)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ResetView (UIElement element)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomCompleted (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
void | ScrollViewer2_DirectManipulationCompleted (object sender, object e)
void | ScrollViewer2_DirectManipulationStarted (object sender, object e)

Private Attributes

List< string > | fullLogs = new List<string>()
int | scrollPresenter3ZoomFactorChangeCorrelationId = -1

Detailed Description

Definition at line 14 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterChainingAndRailingPage ( ) [inline]

Definition at line 19 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            InitializeComponent();
            InitializeUIFromScrollPresenter("0");
            InitializeUIFromScrollPresenter("1");
            InitializeUIFromScrollPresenter("3");
            InitializeUIFromScrollViewer("2");

            scrollPresenter0.StateChanged += ScrollPresenter_StateChanged;
            scrollPresenter1.StateChanged += ScrollPresenter_StateChanged;
            scrollPresenter3.StateChanged += ScrollPresenter_StateChanged;

            scrollPresenter3.ZoomCompleted += ScrollPresenter_ZoomCompleted;

            scrollViewer2.DirectManipulationStarted += ScrollViewer2_DirectManipulationStarted;
            scrollViewer2.DirectManipulationCompleted += ScrollViewer2_DirectManipulationCompleted;
        }

~ScrollPresenterChainingAndRailingPage ( ) [inline, private]

Definition at line 37 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
        }

Member Function Documentation

void btnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 354 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            this.fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
        }

void btnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 346 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            foreach (string log in this.fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
        }

void btnResetViews_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 266 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            this.txtResetStatus.Text = "Resetting views ...";
            ResetView(this.scrollViewer2);
            ResetView(this.scrollPresenter0);
            ResetView(this.scrollPresenter1);
            ResetView(this.scrollPresenter3);
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 301 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            //Turn on info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 309 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            //Turn off info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void CmbHorizontalScrollChainMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ComboBox cmb = sender as ComboBox;
            string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
            ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
            if (scrollPresenter != null)
            {
                scrollPresenter.HorizontalScrollChainMode = (ScrollingChainMode)cmb.SelectedIndex;
            }
            else
            {
                ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
                if (scrollViewer != null)
                {
                    scrollViewer.IsHorizontalScrollChainingEnabled = cmb.SelectedIndex == 0;
                }
            }
        }

void CmbHorizontalScrollRailMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 148 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ComboBox cmb = sender as ComboBox;
            string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
            ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
            if (scrollPresenter != null)
            {
                scrollPresenter.HorizontalScrollRailMode = (ScrollingRailMode)cmb.SelectedIndex;
            }
            else
            {
                ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
                if (scrollViewer != null)
                {
                    scrollViewer.IsHorizontalRailEnabled = cmb.SelectedIndex == 0;
                }
            }
        }

void CmbVerticalScrollChainMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 110 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ComboBox cmb = sender as ComboBox;
            string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
            ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
            if (scrollPresenter != null)
            {
                scrollPresenter.VerticalScrollChainMode = (ScrollingChainMode)cmb.SelectedIndex;
            }
            else
            {
                ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
                if (scrollViewer != null)
                {
                    scrollViewer.IsVerticalScrollChainingEnabled = cmb.SelectedIndex == 0;
                }
            }
        }

void CmbVerticalScrollRailMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 167 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ComboBox cmb = sender as ComboBox;
            string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
            ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
            if (scrollPresenter != null)
            {
                scrollPresenter.VerticalScrollRailMode = (ScrollingRailMode)cmb.SelectedIndex;
            }
            else
            {
                ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
                if (scrollViewer != null)
                {
                    scrollViewer.IsVerticalRailEnabled = cmb.SelectedIndex == 0;
                }
            }
        }

void CmbZoomChainMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 129 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ComboBox cmb = sender as ComboBox;
            string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
            ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
            if (scrollPresenter != null)
            {
                scrollPresenter.ZoomChainMode = (ScrollingChainMode)cmb.SelectedIndex;
            }
            else
            {
                ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
                if (scrollViewer != null)
                {
                    scrollViewer.IsZoomChainingEnabled = cmb.SelectedIndex == 0;
                }
            }
        }

ScrollPresenter GetScrollPresenterWithSuffix ( string suffix ) [inline, private]

Definition at line 186 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            switch (suffix)
            {
                case "0":
                    return scrollPresenter0;
                case "1":
                    return scrollPresenter1;
                case "3":
                    return scrollPresenter3;
                default:
                    return null;
            }
        }

ScrollViewer GetScrollViewerWithSuffix ( string suffix ) [inline, private]

Definition at line 201 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            switch (suffix)
            {
                case "2":
                    return scrollViewer2;
                default:
                    return null;
            }
        }

void InitializeUIFromScrollPresenter ( string suffix ) [inline, private]

Definition at line 212 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ScrollPresenter scrollPresenter = FindName("scrollPresenter" + suffix) as ScrollPresenter;
            if (scrollPresenter == null)
                return;

            ComboBox cmb = FindName("cmbHorizontalScrollChainMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = (int)scrollPresenter.HorizontalScrollChainMode;

            cmb = FindName("cmbVerticalScrollChainMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = (int)scrollPresenter.VerticalScrollChainMode;

            cmb = FindName("cmbZoomChainMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = (int)scrollPresenter.ZoomChainMode;

            cmb = FindName("cmbHorizontalScrollRailMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = (int)scrollPresenter.HorizontalScrollRailMode;

            cmb = FindName("cmbVerticalScrollRailMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = (int)scrollPresenter.VerticalScrollRailMode;
        }

void InitializeUIFromScrollViewer ( string suffix ) [inline, private]

Definition at line 239 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ScrollViewer scrollViewer = FindName("scrollViewer" + suffix) as ScrollViewer;
            if (scrollViewer == null)
                return;

            ComboBox cmb = FindName("cmbHorizontalScrollChainMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = scrollViewer.IsHorizontalScrollChainingEnabled ? 0 : 1;

            cmb = FindName("cmbVerticalScrollChainMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = scrollViewer.IsVerticalScrollChainingEnabled ? 0 : 1;

            cmb = FindName("cmbZoomChainMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = scrollViewer.IsZoomChainingEnabled ? 0 : 1;

            cmb = FindName("cmbHorizontalScrollRailMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = scrollViewer.IsHorizontalRailEnabled ? 0 : 1;

            cmb = FindName("cmbVerticalScrollRailMode" + suffix) as ComboBox;
            if (cmb != null)
                cmb.SelectedIndex = scrollViewer.IsVerticalRailEnabled ? 0 : 1;
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 317 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                this.fullLogs.Add("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 41 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ResetView ( UIElement element ) [inline, private]

Definition at line 275 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            ScrollPresenter scrollPresenter = element as ScrollPresenter;

            if (scrollPresenter != null)
            {
                scrollPresenter.ScrollTo(
                    0.0,
                    0.0,
                    new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));

                int viewChangeCorrelationId = scrollPresenter.ZoomTo(
                    1.0f,
                    System.Numerics.Vector2.Zero,
                    new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));

                if (this.scrollPresenter3 == scrollPresenter)
                    scrollPresenter3ZoomFactorChangeCorrelationId = viewChangeCorrelationId;
            }
            else
            {
                ScrollViewer scrollViewer = element as ScrollViewer;
                scrollViewer.ChangeView(0, 0, 1.0f, true /*disableAnimation*/);
            }
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 63 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            if (sender == scrollPresenter0)
            {
                txtScrollPresenter0State.Text = "scrollPresenter0 " + scrollPresenter0.State.ToString();
                txtScrollPresenter0HSP.Text = String.Format("{0,5:N1}%", sender.HorizontalOffset / 3.0);
                txtScrollPresenter0VSP.Text = String.Format("{0,5:N1}%", sender.VerticalOffset / 3.0);
            }
            else if (sender == scrollPresenter1)
            {
                txtScrollPresenter1State.Text = "scrollPresenter1 " + scrollPresenter1.State.ToString();
                txtScrollPresenter1HSP.Text = String.Format("{0,5:N1}%", sender.HorizontalOffset / 3.0);
                txtScrollPresenter1VSP.Text = String.Format("{0,5:N1}%", sender.VerticalOffset / 3.0);
            }
            else if (sender == scrollPresenter3)
            {
                txtScrollPresenter3State.Text = "scrollPresenter3 " + scrollPresenter3.State.ToString();
                txtScrollPresenter3HSP.Text = String.Format("{0,5:N1}%", sender.HorizontalOffset / 3.0);
                txtScrollPresenter3VSP.Text = String.Format("{0,5:N1}%", sender.VerticalOffset / 3.0);
            }
        }

void ScrollPresenter_ZoomCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 85 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            if (args.CorrelationId == scrollPresenter3ZoomFactorChangeCorrelationId)
                this.txtResetStatus.Text = "Views reset";
        }

void ScrollViewer2_DirectManipulationCompleted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            txtScrollViewer2State.Text = (sender as ScrollViewer).Name + " Idle";
            txtScrollViewer2HSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).HorizontalOffset / (sender as ScrollViewer).ScrollableWidth * 100.0);
            txtScrollViewer2VSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).VerticalOffset / (sender as ScrollViewer).ScrollableHeight * 100.0);
        }

void ScrollViewer2_DirectManipulationStarted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

        {
            txtScrollViewer2State.Text = (sender as ScrollViewer).Name + " Interaction";
            txtScrollViewer2HSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).HorizontalOffset / (sender as ScrollViewer).ScrollableWidth * 100.0);
            txtScrollViewer2VSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).VerticalOffset / (sender as ScrollViewer).ScrollableHeight * 100.0);
        }

Member Data Documentation

List<string> fullLogs = new List<string>() [private]

Definition at line 16 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

int scrollPresenter3ZoomFactorChangeCorrelationId = -1 [private]

Definition at line 17 of file ScrollPresenterChainingAndRailingPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterChainingAndRailingPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterDynamicPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterDynamicPage
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes

ScrollPresenterDynamicPage Class Reference

List of all members.

Classes

class | QueuedOperation

Public Member Functions

ScrollPresenterDynamicPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Types

enum QueuedOperationType {
SetMinZoomFactor, SetMaxZoomFactor, SetWidth, SetHeight,
SetContentMargin, SetContentPadding, SetContentMinWidth, SetContentMinHeight,
SetContentWidth, SetContentHeight, SetContentMaxWidth, SetContentMaxHeight
}

Private Member Functions

~ScrollPresenterDynamicPage ()
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnAddIrregularSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnAddRepeatedSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnAddScrollVelocity_Click (object sender, RoutedEventArgs e)
void | BtnAddZoomVelocity_Click (object sender, RoutedEventArgs e)
void | BtnCancelAddScrollVelocity_Click (object sender, RoutedEventArgs e)
void | BtnCancelAddZoomVelocity_Click (object sender, RoutedEventArgs e)
void | BtnCancelScroll_Click (object sender, RoutedEventArgs e)
void | BtnCancelZoom_Click (object sender, RoutedEventArgs e)
void | BtnChangeView_Click (object sender, RoutedEventArgs e)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearScrollPresenterEvents_Click (object sender, RoutedEventArgs e)
void | BtnClearSnapPoints_Click (object sender, RoutedEventArgs e)
void | BtnCopyScrollPresenterEvents_Click (object sender, RoutedEventArgs e)
void | BtnCreateDynamicScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnDiscardQueuedOperations_Click (object sender, RoutedEventArgs e)
void | BtnExecuteQueuedOperations_Click (object sender, RoutedEventArgs e)
void | BtnGetActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetArrangeRenderSizesDelta_Click (object sender, RoutedEventArgs e)
void | BtnGetContentActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentDesiredSize_Click (object sender, RoutedEventArgs e)
void | BtnGetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentLayoutOffsetX_Click (object sender, RoutedEventArgs e)
void | BtnGetContentLayoutOffsetY_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetContentRenderSize_Click (object sender, RoutedEventArgs e)
void | BtnGetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxPosition_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxPositionExpressionAnimationExpression_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetMinPosition_Click (object sender, RoutedEventArgs e)
void | BtnGetMinPositionExpressionAnimationExpression_Click (object sender, RoutedEventArgs e)
void | BtnGetMinZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetPosition_Click (object sender, RoutedEventArgs e)
void | BtnGetPositionExpressionAnimationExpression_Click (object sender, RoutedEventArgs e)
void | BtnGetState_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetViewportHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetViewportWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnParentDynamicScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnParentMarkupScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentPadding_Click (object sender, RoutedEventArgs e)
void | BtnQueueContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnQueueHeight_Click (object sender, RoutedEventArgs e)
void | BtnQueueMaxZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnQueueMinZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnQueueWidth_Click (object sender, RoutedEventArgs e)
void | BtnReleaseDynamicScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnScrollBy_Click (object sender, RoutedEventArgs e)
void | BtnScrollTo_Click (object sender, RoutedEventArgs e)
void | BtnSetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentLayoutOffsetX_Click (object sender, RoutedEventArgs e)
void | BtnSetContentLayoutOffsetY_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetContentPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxPosition_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxPositionExpressionAnimationExpression_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetMinPosition_Click (object sender, RoutedEventArgs e)
void | BtnSetMinPositionExpressionAnimationExpression_Click (object sender, RoutedEventArgs e)
void | BtnSetMinZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetPositionExpressionAnimationExpression_Click (object sender, RoutedEventArgs e)
void | BtnSetWidth_Click (object sender, RoutedEventArgs e)
void | BtnUnparentDynamicScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnUnparentMarkupScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnUnparentReparentMarkupScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnUseDynamicScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnUseMarkupScrollPresenter_Click (object sender, RoutedEventArgs e)
void | BtnZoomBy_Click (object sender, RoutedEventArgs e)
void | BtnZoomTo_Click (object sender, RoutedEventArgs e)
bool | ChangeView (ScrollPresenter scrollPresenter, double?horizontalOffset, double?verticalOffset, float?zoomFactor, bool disableAnimation)
void | ChkContentProperties_Checked (object sender, RoutedEventArgs e)
void | ChkContentProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogContentEffectiveViewportChangedEvent_Checked (object sender, RoutedEventArgs e)
void | ChkLogContentEffectiveViewportChangedEvent_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogContentPointerEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogContentPointerEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkPageMethods_Checked (object sender, RoutedEventArgs e)
void | ChkPageMethods_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterMethods_Checked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterMethods_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterProperties_Checked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterTestHooks_Checked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterTestHooks_Unchecked (object sender, RoutedEventArgs e)
void | CmbBackground_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContent_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentHorizontalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentManipulationMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentOrientation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentVerticalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollChainMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollRailMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbIgnoredInputKinds_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollPresenterManipulationMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbSnapPointKind_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollChainMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollRailMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbZoomChainMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbZoomMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
float | ComputeHorizontalPositionFromOffset (double offset)
float | ComputeMinHorizontalPosition (float zoomFactor)
float | ComputeMinVerticalPosition (float zoomFactor)
float | ComputeVerticalPositionFromOffset (double offset)
void | Content_EffectiveViewportChanged (FrameworkElement sender, EffectiveViewportChangedEventArgs args)
void | Content_PointerCanceled (object sender, PointerRoutedEventArgs e)
void | Content_PointerCaptureLost (object sender, PointerRoutedEventArgs e)
void | Content_PointerPressed (object sender, PointerRoutedEventArgs e)
void | Content_PointerReleased (object sender, PointerRoutedEventArgs e)
Vector2 | ConvertFromStringToVector2 (string value)
void | CreateChildren ()
void | ExecuteQueuedOperations ()
Thickness | GetThicknessFromString (string thickness)
void | HookContentEffectiveViewportChanged ()
void | HookContentPointerEvents ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | Scroll (bool isRelativeChange)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ScrollAnimationStarting (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_ScrollCompleted (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_ScrollStarting (ScrollPresenter sender, ScrollingScrollStartingEventArgs args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomAnimationStarting (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollPresenter_ZoomCompleted (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
void | ScrollPresenter_ZoomStarting (ScrollPresenter sender, ScrollingZoomStartingEventArgs args)
void | UnhookContentEffectiveViewportChanged ()
void | UnhookContentPointerEvents ()
void | UpdateCmbBackground ()
void | UpdateCmbContent ()
void | UpdateCmbContentHorizontalAlignment ()
void | UpdateCmbContentManipulationMode ()
void | UpdateCmbContentOrientation ()
void | UpdateCmbContentVerticalAlignment ()
void | UpdateCmbHorizontalScrollChainMode ()
void | UpdateCmbHorizontalScrollMode ()
void | UpdateCmbHorizontalScrollRailMode ()
void | UpdateCmbIgnoredInputKinds ()
void | UpdateCmbScrollPresenterManipulationMode ()
void | UpdateCmbVerticalScrollChainMode ()
void | UpdateCmbVerticalScrollMode ()
void | UpdateCmbVerticalScrollRailMode ()
void | UpdateCmbZoomChainMode ()
void | UpdateCmbZoomMode ()
void | UpdateMaxZoomFactor ()
void | UpdateMinZoomFactor ()
void | UseScrollPresenter (ScrollPresenter s)
void | Zoom (bool isRelativeChange)

Private Attributes

Object | asyncEventReportingLock = new Object()
Border | border
Button | button
PointerEventHandler | contentPointerCanceledEventHandler = null
PointerEventHandler | contentPointerCaptureLostEventHandler = null
PointerEventHandler | contentPointerPressedEventHandler = null
PointerEventHandler | contentPointerReleasedEventHandler = null
ScrollPresenter | dynamicScrollPresenter = null
StackPanel | horizontalStackPanel
Image | largeImg
int | lastOffsetsChangeCorrelationId = -1
int | lastOffsetsChangeWithAdditionalVelocityCorrelationId = -1
int | lastZoomFactorChangeCorrelationId = -1
int | lastZoomFactorChangeWithAdditionalVelocityCorrelationId = -1
List< string > | lstAsyncEventMessage = new List<string>()
List< QueuedOperation > | lstQueuedOperations = new List<QueuedOperation>()
Border | populatedBorder
Rectangle | rectangle
HashSet< int > | relativeChangeCorrelationIds = new HashSet<int>()
ScrollPresenter | scrollPresenter = null
TextBlock | textBlock
TilePanel | tilePanel
StackPanel | verticalStackPanel
Viewbox | viewbox

Detailed Description

Definition at line 26 of file ScrollPresenterDynamicPage.xaml.cs.

Member Enumeration Documentation

enum QueuedOperationType [private]
Enumerator:
SetMinZoomFactor
SetMaxZoomFactor
SetWidth
SetHeight
SetContentMargin
SetContentPadding
SetContentMinWidth
SetContentMinHeight
SetContentWidth
SetContentHeight
SetContentMaxWidth
SetContentMaxHeight

Definition at line 28 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            SetMinZoomFactor,
            SetMaxZoomFactor,
            SetWidth,
            SetHeight,
            SetContentMargin,
            SetContentPadding,
            SetContentMinWidth,
            SetContentMinHeight,
            SetContentWidth,
            SetContentHeight,
            SetContentMaxWidth,
            SetContentMaxHeight,
        }

Constructor & Destructor Documentation

ScrollPresenterDynamicPage ( ) [inline]

Definition at line 87 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            this.InitializeComponent();

            UseScrollPresenter(markupScrollPresenter);

            CreateChildren();
        }

~ScrollPresenterDynamicPage ( ) [inline, private]

Definition at line 96 of file ScrollPresenterDynamicPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 2282 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }

                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 2315 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstScrollPresenterEvents.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnAddIrregularSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2045 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
#if ApplicableRangeType
                if (cmbSnapPointKind.SelectedIndex == 0)
                {
                    ScrollSnapPoint snapPoint = new ScrollSnapPoint(Convert.ToSingle(txtSnapPointValue.Text), Convert.ToSingle(txtSnapPointValueRange.Text), ScrollSnapPointsAlignment.Near);
                    scrollPresenter.VerticalSnapPoints.Add(snapPoint);
                }
                else if (cmbSnapPointKind.SelectedIndex == 1)
                {
                    ScrollSnapPoint snapPoint = new ScrollSnapPoint(Convert.ToSingle(txtSnapPointValue.Text), Convert.ToSingle(txtSnapPointValueRange.Text), ScrollSnapPointsAlignment.Near);
                    scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
                }
                else if (cmbSnapPointKind.SelectedIndex == 2)
                {
                    ZoomSnapPoint snapPoint = new ZoomSnapPoint(Convert.ToSingle(txtSnapPointValue.Text), Convert.ToSingle(txtSnapPointValueRange.Text));
                    scrollPresenter.ZoomSnapPoints.Add(snapPoint);
                }
#else
                if (cmbSnapPointKind.SelectedIndex != 2)
                {
                    ScrollSnapPoint snapPoint = new ScrollSnapPoint(
                        Convert.ToSingle(txtIrregularSnapPointValue.Text),
                        (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
                    if (cmbSnapPointKind.SelectedIndex == 0)
                    {
                        scrollPresenter.VerticalSnapPoints.Add(snapPoint);
                    }
                    else
                    {
                        scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
                    }
                }
                else
                {
                    ZoomSnapPoint snapPoint = new ZoomSnapPoint(
                        Convert.ToSingle(txtIrregularSnapPointValue.Text));
                    scrollPresenter.ZoomSnapPoints.Add(snapPoint);
                }
#endif
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnAddRepeatedSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2095 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (cmbSnapPointKind.SelectedIndex != 2)
                {
                    RepeatedScrollSnapPoint snapPoint = new RepeatedScrollSnapPoint(
                        Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
                        Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
                        Convert.ToDouble(txtRepeatedSnapPointStart.Text),
                        Convert.ToDouble(txtRepeatedSnapPointEnd.Text),
                        (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
                    if (cmbSnapPointKind.SelectedIndex == 0)
                    {
                        scrollPresenter.VerticalSnapPoints.Add(snapPoint);
                    }
                    else
                    {
                        scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
                    }
                }
                else
                {
                    RepeatedZoomSnapPoint snapPoint = new RepeatedZoomSnapPoint(
                        Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
                        Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
                        Convert.ToDouble(txtRepeatedSnapPointStart.Text),
                        Convert.ToDouble(txtRepeatedSnapPointEnd.Text));
                    scrollPresenter.ZoomSnapPoints.Add(snapPoint);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnAddScrollVelocity_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1719 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                Vector2? inertiaDecayRate = null;

                if (txtScrollHorizontalInertiaDecayRate.Text != "null" && txtScrollVerticalInertiaDecayRate.Text != "null")
                {
                    inertiaDecayRate = new Vector2(Convert.ToSingle(txtScrollHorizontalInertiaDecayRate.Text), Convert.ToSingle(txtScrollVerticalInertiaDecayRate.Text));
                }

                txtStockOffsetsChangeDuration.Text = string.Empty;

                ExecuteQueuedOperations();

                lastOffsetsChangeWithAdditionalVelocityCorrelationId = scrollPresenter.AddScrollVelocity(
                    new Vector2(Convert.ToSingle(txtScrollHorizontalVelocity.Text), Convert.ToSingle(txtScrollVerticalVelocity.Text)),
                    inertiaDecayRate);
                AppendAsyncEventMessage("Invoked AddScrollVelocity CorrelationId=" + lastOffsetsChangeWithAdditionalVelocityCorrelationId);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnAddZoomVelocity_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1996 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                txtStockZoomFactorChangeDuration.Text = string.Empty;

                ExecuteQueuedOperations();

                lastZoomFactorChangeWithAdditionalVelocityCorrelationId = scrollPresenter.AddZoomVelocity(
                    Convert.ToSingle(txtAddZoomVelocityVelocity.Text),
                    (txtAddZoomVelocityCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtAddZoomVelocityCenterPoint.Text),
                    (txtAddZoomVelocityInertiaDecayRate.Text == "null") ? (float?)null : (float?)Convert.ToSingle(txtAddZoomVelocityInertiaDecayRate.Text));
                AppendAsyncEventMessage("Invoked AddZoomVelocity CorrelationId=" + lastZoomFactorChangeWithAdditionalVelocityCorrelationId);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnCancelAddScrollVelocity_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1746 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (lastOffsetsChangeWithAdditionalVelocityCorrelationId != -1)
                {
                    AppendAsyncEventMessage("Canceling AddScrollVelocity CorrelationId=" + lastOffsetsChangeWithAdditionalVelocityCorrelationId);
                    scrollPresenter.ScrollBy(
                        0,
                        0,
                        new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnCancelAddZoomVelocity_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2017 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (lastZoomFactorChangeWithAdditionalVelocityCorrelationId != -1)
                {
                    AppendAsyncEventMessage("Canceling AddZoomVelocity CorrelationId=" + lastZoomFactorChangeWithAdditionalVelocityCorrelationId);
                    scrollPresenter.ZoomBy(
                        0,
                        Vector2.Zero,
                        new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnCancelScroll_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1603 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (lastOffsetsChangeCorrelationId != -1)
                {
                    AppendAsyncEventMessage("Canceling scrollTo/By CorrelationId=" + lastOffsetsChangeCorrelationId);
                    scrollPresenter.ScrollBy(
                        0,
                        0,
                        new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnCancelZoom_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1893 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (lastZoomFactorChangeCorrelationId != -1)
                {
                    AppendAsyncEventMessage("Canceling ZoomTo/By CorrelationId=" + lastZoomFactorChangeCorrelationId);
                    scrollPresenter.ZoomBy(
                        0,
                        Vector2.Zero,
                        new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnChangeView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2133 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double? horizontalOffset = string.IsNullOrWhiteSpace(txtScrollHorizontalOffset.Text) ? (double?)null : Convert.ToDouble(txtScrollHorizontalOffset.Text);
                double? verticalOffset = string.IsNullOrWhiteSpace(txtScrollVerticalOffset.Text) ? (double?)null : Convert.ToDouble(txtScrollVerticalOffset.Text);
                float? zoomFactor = string.IsNullOrWhiteSpace(txtZoomZoomFactor.Text) ? (float?)null : Convert.ToSingle(txtZoomZoomFactor.Text);
                bool disableAnimation = true;

                if (horizontalOffset == null && verticalOffset == null && zoomFactor == null)
                {
                    return;
                }

                ComboBox cmbAnimationMode = (zoomFactor == null || zoomFactor == scrollPresenter.ZoomFactor) ?
                    cmbScrollAnimationMode : cmbZoomAnimationMode;

                switch (((ContentControl)cmbAnimationMode.SelectedItem).Content)
                {
                    case "Disabled":
                        break;
                    case "Enabled":
                        disableAnimation = false;
                        break;
                    default: // Auto
                        disableAnimation = !new UISettings().AnimationsEnabled;
                        break;
                }

                ChangeView(scrollPresenter, horizontalOffset, verticalOffset, zoomFactor, disableAnimation);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2341 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearScrollPresenterEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1537 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            lstScrollPresenterEvents.Items.Clear();
        }

void BtnClearSnapPoints_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2258 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (cmbSnapPointKind.SelectedIndex == 0)
                {
                    scrollPresenter.VerticalSnapPoints.Clear();
                }
                else if (cmbSnapPointKind.SelectedIndex == 1)
                {
                    scrollPresenter.HorizontalSnapPoints.Clear();
                }
                else if (cmbSnapPointKind.SelectedIndex == 2)
                {
                    scrollPresenter.ZoomSnapPoints.Clear();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnCopyScrollPresenterEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1542 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            string logs = string.Empty;

            foreach (object log in lstScrollPresenterEvents.Items)
            {
                logs += log.ToString() + "\n";
            }

            var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
            dataPackage.SetText(logs);
            Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
        }

void BtnCreateDynamicScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2386 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                dynamicScrollPresenter = new ScrollPresenter();
                dynamicScrollPresenter.Name = "dynamicScrollPresenter";
                dynamicScrollPresenter.Width = 300.0;
                dynamicScrollPresenter.Height = 400.0;
                dynamicScrollPresenter.Margin = new Thickness(1);
                dynamicScrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.HotPink);
                dynamicScrollPresenter.VerticalAlignment = VerticalAlignment.Top;
                Grid.SetRow(dynamicScrollPresenter, 1);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnDiscardQueuedOperations_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2455 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            lstQueuedOperations.Clear();
            AppendAsyncEventMessage("Queued operations cleared.");
        }

void BtnExecuteQueuedOperations_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2450 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            ExecuteQueuedOperations();
        }

void BtnGetActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1532 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblActualHeight.Text = scrollPresenter.ActualHeight.ToString();
        }

void BtnGetActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1527 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblActualWidth.Text = scrollPresenter.ActualWidth.ToString();
        }

void BtnGetArrangeRenderSizesDelta_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2521 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                txtArrangeRenderSizesDelta.Text = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter).ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetContentActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1285 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentActualHeight.Text = string.Empty;
            else
                txtContentActualHeight.Text = (scrollPresenter.Content as FrameworkElement).ActualHeight.ToString();
        }

void BtnGetContentActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1277 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentActualWidth.Text = string.Empty;
            else
                txtContentActualWidth.Text = (scrollPresenter.Content as FrameworkElement).ActualWidth.ToString();
        }

void BtnGetContentDesiredSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1293 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null)
                txtContentDesiredSize.Text = string.Empty;
            else
                txtContentDesiredSize.Text = scrollPresenter.Content.DesiredSize.ToString();
        }

void BtnGetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1080 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentHeight.Text = string.Empty;
            else
                txtContentHeight.Text = ((FrameworkElement)(scrollPresenter.Content)).Height.ToString();
        }

void BtnGetContentLayoutOffsetX_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2461 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                float contentLayoutOffsetX = 0.0f;

                ScrollPresenterTestHooks.GetContentLayoutOffsetX(scrollPresenter, out contentLayoutOffsetX);

                txtContentLayoutOffsetX.Text = contentLayoutOffsetX.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetContentLayoutOffsetY_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2491 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                float contentLayoutOffsetY = 0.0f;

                ScrollPresenterTestHooks.GetContentLayoutOffsetY(scrollPresenter, out contentLayoutOffsetY);

                txtContentLayoutOffsetY.Text = contentLayoutOffsetY.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1189 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentMargin.Text = string.Empty;
            else
                txtContentMargin.Text = ((FrameworkElement)(scrollPresenter.Content)).Margin.ToString();
        }

void BtnGetContentMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1088 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentMaxHeight.Text = string.Empty;
            else
                txtContentMaxHeight.Text = ((FrameworkElement)(scrollPresenter.Content)).MaxHeight.ToString();
        }

void BtnGetContentMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 971 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentMaxWidth.Text = string.Empty;
            else
                txtContentMaxWidth.Text = ((FrameworkElement)(scrollPresenter.Content)).MaxWidth.ToString();
        }

void BtnGetContentMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1072 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentMinHeight.Text = string.Empty;
            else
                txtContentMinHeight.Text = ((FrameworkElement)(scrollPresenter.Content)).MinHeight.ToString();
        }

void BtnGetContentMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 955 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentMinWidth.Text = string.Empty;
            else
                txtContentMinWidth.Text = ((FrameworkElement)(scrollPresenter.Content)).MinWidth.ToString();
        }

void BtnGetContentPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1227 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is Control || scrollPresenter.Content is Border || scrollPresenter.Content is StackPanel))
                txtContentPadding.Text = string.Empty;
            else if (scrollPresenter.Content is Control)
                txtContentPadding.Text = ((Control)(scrollPresenter.Content)).Padding.ToString();
            else if (scrollPresenter.Content is Border)
                txtContentPadding.Text = ((Border)(scrollPresenter.Content)).Padding.ToString();
            else
                txtContentPadding.Text = ((StackPanel)(scrollPresenter.Content)).Padding.ToString();
        }

void BtnGetContentRenderSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1301 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null)
                txtContentRenderSize.Text = string.Empty;
            else
                txtContentRenderSize.Text = scrollPresenter.Content.RenderSize.ToString();
        }

void BtnGetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 963 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
                txtContentWidth.Text = string.Empty;
            else
                txtContentWidth.Text = ((FrameworkElement)(scrollPresenter.Content)).Width.ToString();
        }

void BtnGetExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1410 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblExtentHeight.Text = scrollPresenter.ExtentHeight.ToString();
        }

void BtnGetExtentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1405 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblExtentWidth.Text = scrollPresenter.ExtentWidth.ToString();
        }

void BtnGetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1476 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            txtHeight.Text = scrollPresenter.Height.ToString();
        }

void BtnGetHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1385 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblHorizontalOffset.Text = scrollPresenter.HorizontalOffset.ToString();
        }

void BtnGetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1509 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            txtMaxHeight.Text = scrollPresenter.MaxHeight.ToString();
        }

void BtnGetMaxPosition_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2577 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                Vector2 maxPosition = ScrollPresenterTestHooks.GetMaxPosition(scrollPresenter);
                txtMaxPositionX.Text = maxPosition.X.ToString();
                txtMaxPositionY.Text = maxPosition.Y.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetMaxPositionExpressionAnimationExpression_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2657 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                txtMaxPositionExpressionAnimationExpression.Text = ScrollPresenterTestHooks.GetMaxPositionExpressionAnimationExpression(scrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1458 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            txtMaxWidth.Text = scrollPresenter.MaxWidth.ToString();
        }

void BtnGetMaxZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1352 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UpdateMaxZoomFactor();
        }

void BtnGetMinPosition_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2549 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
                txtMinPositionX.Text = minPosition.X.ToString();
                txtMinPositionY.Text = minPosition.Y.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetMinPositionExpressionAnimationExpression_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2631 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                txtMinPositionExpressionAnimationExpression.Text = ScrollPresenterTestHooks.GetMinPositionExpressionAnimationExpression(scrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetMinZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1319 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UpdateMinZoomFactor();
        }

void BtnGetPosition_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2534 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                Vector2 position = ScrollPresenterTestHooks.GetPosition(scrollPresenter);
                txtPositionX.Text = position.X.ToString();
                txtPositionY.Text = position.Y.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetPositionExpressionAnimationExpression_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2605 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                txtPositionExpressionAnimationExpression.Text = ScrollPresenterTestHooks.GetTransformExpressionAnimationExpression(scrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetState_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1400 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblState.Text = scrollPresenter.State.ToString();
        }

void BtnGetVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1390 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblVerticalOffset.Text = scrollPresenter.VerticalOffset.ToString();
        }

void BtnGetViewportHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1420 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblViewportHeight.Text = scrollPresenter.ViewportHeight.ToString();
        }

void BtnGetViewportWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1415 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblViewportWidth.Text = scrollPresenter.ViewportWidth.ToString();
        }

void BtnGetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1425 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            txtWidth.Text = scrollPresenter.Width.ToString();
        }

void BtnGetZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1395 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            tblZoomFactor.Text = scrollPresenter.ZoomFactor.ToString();
        }

void BtnParentDynamicScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2406 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                root.Children.Add(dynamicScrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnParentMarkupScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2346 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                root.Children.Add(markupScrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1159 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtContentHeight.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentHeight, value));
                AppendAsyncEventMessage("Queued SetContentHeight " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1213 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMargin, txtContentMargin.Text));
                AppendAsyncEventMessage("Queued SetContentMargin " + txtContentMargin.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1174 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtContentMaxHeight.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMaxHeight, value));
                AppendAsyncEventMessage("Queued SetContentMaxHeight " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1057 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtContentMaxWidth.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMaxWidth, value));
                AppendAsyncEventMessage("Queued SetContentMaxWidth " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1144 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtContentMinHeight.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMinHeight, value));
                AppendAsyncEventMessage("Queued SetContentMinHeight " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1027 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtContentMinWidth.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMinWidth, value));
                AppendAsyncEventMessage("Queued SetContentMinWidth " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1263 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentPadding, txtContentPadding.Text));
                AppendAsyncEventMessage("Queued SetContentPadding " + txtContentPadding.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1042 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtContentWidth.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentWidth, value));
                AppendAsyncEventMessage("Queued SetContentWidth " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1494 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtHeight.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetHeight, value));
                AppendAsyncEventMessage("Queued SetHeight " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueMaxZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1370 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtMaxZoomFactor.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetMaxZoomFactor, value));
                AppendAsyncEventMessage("Queued SetMaxZoomFactor " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueMinZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1337 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtMinZoomFactor.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetMinZoomFactor, value));
                AppendAsyncEventMessage("Queued SetMinZoomFactor " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnQueueWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1443 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtWidth.Text);
                lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetWidth, value));
                AppendAsyncEventMessage("Queued SetWidth " + value);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnReleaseDynamicScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2442 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            dynamicScrollPresenter = null;

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }

void BtnScrollBy_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1561 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            Scroll(isRelativeChange: true);
        }

void BtnScrollTo_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1556 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            Scroll(isRelativeChange: false);
        }

void BtnSetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1112 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollPresenter.Content)).Height = Convert.ToDouble(txtContentHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentLayoutOffsetX_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2478 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetContentLayoutOffsetX(scrollPresenter, Convert.ToSingle(txtContentLayoutOffsetX.Text));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentLayoutOffsetY_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2508 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetContentLayoutOffsetY(scrollPresenter, Convert.ToSingle(txtContentLayoutOffsetY.Text));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1197 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollPresenter.Content)).Margin = GetThicknessFromString(txtContentMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1128 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollPresenter.Content)).MaxHeight = Convert.ToDouble(txtContentMaxHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1011 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollPresenter.Content)).MaxWidth = Convert.ToDouble(txtContentMaxWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1096 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollPresenter.Content)).MinHeight = Convert.ToDouble(txtContentMinHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 979 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollPresenter.Content)).MinWidth = Convert.ToDouble(txtContentMinWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1239 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is Control)
                {
                    ((Control)(scrollPresenter.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
                }
                else if (scrollPresenter.Content is Border)
                {
                    ((Border)(scrollPresenter.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
                }
                else if (scrollPresenter.Content is StackPanel)
                {
                    ((StackPanel)(scrollPresenter.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 995 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollPresenter.Content)).Width = Convert.ToDouble(txtContentWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1481 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                scrollPresenter.Height = Convert.ToDouble(txtHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1514 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                scrollPresenter.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxPosition_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2592 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetMaxPosition(scrollPresenter, new Vector2(float.Parse(txtMaxPositionX.Text), float.Parse(txtMaxPositionY.Text)));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxPositionExpressionAnimationExpression_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2670 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetMaxPositionExpressionAnimationExpression(scrollPresenter, txtMaxPositionExpressionAnimationExpression.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1463 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                scrollPresenter.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1357 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                scrollPresenter.MaxZoomFactor = Convert.ToDouble(txtMaxZoomFactor.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMinPosition_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2564 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetMinPosition(scrollPresenter, new Vector2(float.Parse(txtMinPositionX.Text), float.Parse(txtMinPositionY.Text)));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMinPositionExpressionAnimationExpression_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2644 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetMinPositionExpressionAnimationExpression(scrollPresenter, txtMinPositionExpressionAnimationExpression.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMinZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1324 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                scrollPresenter.MinZoomFactor = Convert.ToDouble(txtMinZoomFactor.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetPositionExpressionAnimationExpression_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2618 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetTransformExpressionAnimationExpression(scrollPresenter, txtPositionExpressionAnimationExpression.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1430 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                scrollPresenter.Width = Convert.ToDouble(txtWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnUnparentDynamicScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2419 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                root.Children.Remove(dynamicScrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnUnparentMarkupScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2359 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                root.Children.Remove(markupScrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnUnparentReparentMarkupScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2372 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                root.Children.Remove(markupScrollPresenter);
                root.Children.Add(markupScrollPresenter);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnUseDynamicScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2437 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UseScrollPresenter(dynamicScrollPresenter);
        }

void BtnUseMarkupScrollPresenter_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2432 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UseScrollPresenter(markupScrollPresenter);
        }

void BtnZoomBy_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1851 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            Zoom(isRelativeChange: true);
        }

void BtnZoomTo_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1846 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            Zoom(isRelativeChange: false);
        }

bool ChangeView | ( | ScrollPresenter | scrollPresenter,
 |  | double? | horizontalOffset,
 |  | double? | verticalOffset,
 |  | float? | zoomFactor,
 |  | bool | disableAnimation |
 | ) |  |  | [inline, private]

Definition at line 2171 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ChangeView(horizontalOffset:{horizontalOffset}, verticalOffset:{verticalOffset}, zoomFactor:{zoomFactor}, disableAnimation:{disableAnimation}) from horizontalOffset:{scrollPresenter.HorizontalOffset}, verticalOffset:{scrollPresenter.VerticalOffset}, zoomFactor:{scrollPresenter.ZoomFactor}");

            double targetHorizontalOffset = horizontalOffset == null ? scrollPresenter.HorizontalOffset : (double)horizontalOffset;
            double targetVerticalOffset = verticalOffset == null ? scrollPresenter.VerticalOffset : (double)verticalOffset;
            float targetZoomFactor = zoomFactor == null ? scrollPresenter.ZoomFactor : (float)Math.Max(Math.Min((double)zoomFactor, scrollPresenter.MaxZoomFactor), scrollPresenter.MinZoomFactor);
            float deltaZoomFactor = targetZoomFactor - scrollPresenter.ZoomFactor;

            if (disableAnimation)
            {
                targetHorizontalOffset = Math.Max(Math.Min(targetHorizontalOffset, scrollPresenter.ExtentWidth * targetZoomFactor - scrollPresenter.ViewportWidth), 0.0);
                targetVerticalOffset = Math.Max(Math.Min(targetVerticalOffset, scrollPresenter.ExtentHeight * targetZoomFactor - scrollPresenter.ViewportHeight), 0.0);
            }
            // During an animation, out-of-bounds offsets may become valid as the extents are dynamically updated, so no clamping is performed for animated view changes.

            if (deltaZoomFactor == 0.0f)
            {
                if (targetHorizontalOffset == scrollPresenter.HorizontalOffset && targetVerticalOffset == scrollPresenter.VerticalOffset)
                {
                    AppendAsyncEventMessage("ChangeView no-op");
                    return false;
                }

                lastOffsetsChangeCorrelationId = scrollPresenter.ScrollTo(
                    targetHorizontalOffset,
                    targetVerticalOffset,
                    new ScrollingScrollOptions(
                        disableAnimation ? ScrollingAnimationMode.Disabled : ScrollingAnimationMode.Enabled,
                        disableAnimation ? ScrollingSnapPointsMode.Ignore : ScrollingSnapPointsMode.Default));
                AppendAsyncEventMessage($"ChangeView invoked ScrollTo(horizontalOffset:{targetHorizontalOffset}, verticalOffset:{targetVerticalOffset}) CorrelationId={lastOffsetsChangeCorrelationId}");
            }
            else
            {
                FrameworkElement contentAsFE = scrollPresenter.Content as FrameworkElement;
                HorizontalAlignment contentHorizontalAlignment = contentAsFE == null ? HorizontalAlignment.Stretch : contentAsFE.HorizontalAlignment;
                VerticalAlignment contentVerticalAlignment = contentAsFE == null ? VerticalAlignment.Stretch : contentAsFE.VerticalAlignment;
                double currentPositionX = scrollPresenter.HorizontalOffset;
                double currentPositionY = scrollPresenter.VerticalOffset;
                double currentViewportExcessX = scrollPresenter.ViewportWidth - scrollPresenter.ExtentWidth * scrollPresenter.ZoomFactor;
                double targetViewportExcessX = scrollPresenter.ViewportWidth - scrollPresenter.ExtentWidth * targetZoomFactor;
                double currentViewportExcessY = scrollPresenter.ViewportHeight - scrollPresenter.ExtentHeight * scrollPresenter.ZoomFactor;
                double targetViewportExcessY = scrollPresenter.ViewportHeight - scrollPresenter.ExtentHeight * targetZoomFactor;

                switch (contentHorizontalAlignment)
                {
                    case HorizontalAlignment.Center:
                    case HorizontalAlignment.Stretch:
                        if (currentViewportExcessX > 0) currentPositionX -= currentViewportExcessX / 2.0;
                        if (targetViewportExcessX > 0) targetHorizontalOffset -= targetViewportExcessX / 2.0;
                        break;
                    case HorizontalAlignment.Right:
                        if (currentViewportExcessX > 0) currentPositionX -= currentViewportExcessX;
                        if (targetViewportExcessX > 0) targetHorizontalOffset -= targetViewportExcessX;
                        break;
                }

                switch (contentVerticalAlignment)
                {
                    case VerticalAlignment.Center:
                    case VerticalAlignment.Stretch:
                        if (currentViewportExcessY > 0) currentPositionY -= currentViewportExcessY / 2.0;
                        if (targetViewportExcessY > 0) targetVerticalOffset -= targetViewportExcessY / 2.0;
                        break;
                    case VerticalAlignment.Bottom:
                        if (currentViewportExcessY > 0) currentPositionY -= currentViewportExcessY;
                        if (targetViewportExcessY > 0) targetVerticalOffset -= targetViewportExcessY;
                        break;
                }

                Vector2 centerPoint = new Vector2(
                    (float)(targetHorizontalOffset * scrollPresenter.ZoomFactor - currentPositionX * targetZoomFactor) / deltaZoomFactor,
                    (float)(targetVerticalOffset * scrollPresenter.ZoomFactor - currentPositionY * targetZoomFactor) / deltaZoomFactor);

                lastZoomFactorChangeCorrelationId = scrollPresenter.ZoomTo(
                    targetZoomFactor,
                    centerPoint,
                    new ScrollingZoomOptions(
                        disableAnimation ? ScrollingAnimationMode.Disabled : ScrollingAnimationMode.Enabled,
                        disableAnimation ? ScrollingSnapPointsMode.Ignore : ScrollingSnapPointsMode.Default));
                AppendAsyncEventMessage($"ChangeView invoked ZoomBy(zoomFactor:{targetZoomFactor}, centerPoint:{centerPoint}) targetting horizontalOffset:{targetHorizontalOffset}, verticalOffset:{targetVerticalOffset} CorrelationId={lastZoomFactorChangeCorrelationId}");
            }

            return true;
        }

void ChkContentProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 445 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Visible;
        }

void ChkContentProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 451 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Collapsed;
        }

void ChkLogContentEffectiveViewportChangedEvent_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 297 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            HookContentEffectiveViewportChanged();
        }

void ChkLogContentEffectiveViewportChangedEvent_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 302 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UnhookContentEffectiveViewportChanged();
        }

void ChkLogContentPointerEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 307 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            HookContentPointerEvents();
        }

void ChkLogContentPointerEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 312 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UnhookContentPointerEvents();
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 271 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
            scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
            scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
            scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 284 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
            scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
            scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
            scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompleted;
            scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
            scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
            scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
            scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 243 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            //To turn on info and verbose logging for a particular ScrollPresenter instance:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(scrollPresenter, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            //To turn on info and verbose logging without any filter:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            //To turn on info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 257 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            //To turn off info and verbose logging for a particular ScrollPresenter instance:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(scrollPresenter, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            //To turn off info and verbose logging without any filter:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            //To turn off info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkPageMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 481 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdPageMethods != null)
                grdPageMethods.Visibility = Visibility.Visible;
        }

void ChkPageMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 487 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdPageMethods != null)
                grdPageMethods.Visibility = Visibility.Collapsed;
        }

void ChkScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 469 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdScrollPresenterEvents != null)
                grdScrollPresenterEvents.Visibility = Visibility.Visible;
        }

void ChkScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 475 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdScrollPresenterEvents != null)
                grdScrollPresenterEvents.Visibility = Visibility.Collapsed;
        }

void ChkScrollPresenterMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 457 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (svScrollPresenterMethods != null)
                svScrollPresenterMethods.Visibility = Visibility.Visible;
        }

void ChkScrollPresenterMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 463 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (svScrollPresenterMethods != null)
                svScrollPresenterMethods.Visibility = Visibility.Collapsed;
        }

void ChkScrollPresenterProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 433 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (svScrollPresenterProperties != null)
                svScrollPresenterProperties.Visibility = Visibility.Visible;
        }

void ChkScrollPresenterProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 439 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (svScrollPresenterProperties != null)
                svScrollPresenterProperties.Visibility = Visibility.Collapsed;
        }

void ChkScrollPresenterTestHooks_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 493 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdScrollPresenterTestHooks != null)
                grdScrollPresenterTestHooks.Visibility = Visibility.Visible;
        }

void ChkScrollPresenterTestHooks_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 499 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (grdScrollPresenterTestHooks != null)
                grdScrollPresenterTestHooks.Visibility = Visibility.Collapsed;
        }

void CmbBackground_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 761 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            switch (cmbBackground.SelectedIndex)
            {
                case 0:
                    scrollPresenter.Background = null;
                    break;
                case 1:
                    scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
                    break;
                case 2:
                    scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
                    break;
                case 3:
                    scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Aqua);
                    break;
            }
        }

void CmbContent_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 802 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                FrameworkElement currentContent = scrollPresenter.Content as FrameworkElement;
                FrameworkElement newContent = null;

                switch (cmbContent.SelectedIndex)
                {
                    case 0:
                        newContent = null;
                        break;
                    case 1:
                        newContent = smallImg;
                        break;
                    case 2:
                        newContent = largeImg;
                        break;
                    case 3:
                        newContent = rectangle;
                        break;
                    case 4:
                        newContent = button;
                        break;
                    case 5:
                        newContent = border;
                        break;
                    case 6:
                        newContent = populatedBorder;
                        break;
                    case 7:
                        newContent = horizontalStackPanel;
                        break;
                    case 8:
                        newContent = verticalStackPanel;
                        break;
                    case 9:
                        newContent = tilePanel;
                        break;
                    case 10:
                        newContent = viewbox;
                        break;
                    case 11:
                        newContent = textBlock;
                        break;
                }

                if (chkPreserveProperties.IsChecked == true && currentContent != null && newContent != null)
                {
                    newContent.Width = currentContent.Width;
                    newContent.Height = currentContent.Height;
                    newContent.Margin = currentContent.Margin;
                    newContent.HorizontalAlignment = currentContent.HorizontalAlignment;
                    newContent.VerticalAlignment = currentContent.VerticalAlignment;

                    if (currentContent is Control && newContent is Control)
                    {
                        ((Control)newContent).Padding = ((Control)currentContent).Padding;
                    }
                }

                if (chkLogScrollPresenterEvents.IsChecked == true)
                {
                    UnhookContentEffectiveViewportChanged();
                }

                if (chkLogContentPointerEvents.IsChecked == true)
                {
                    UnhookContentPointerEvents();
                }

                scrollPresenter.Content = newContent;

                if (chkPreserveProperties.IsChecked == false)
                {
                    UpdateCmbContentHorizontalAlignment();
                    UpdateCmbContentVerticalAlignment();
                    UpdateCmbContentManipulationMode();
                }

                if (chkLogScrollPresenterEvents.IsChecked == true)
                {
                    HookContentEffectiveViewportChanged();
                }

                if (chkLogContentPointerEvents.IsChecked == true)
                {
                    HookContentPointerEvents();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());

                UpdateCmbContent();
            }
        }

void CmbContentHorizontalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 671 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content is FrameworkElement)
            {
                ((FrameworkElement)scrollPresenter.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
            }
        }

void CmbContentManipulationMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 729 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content is FrameworkElement)
            {
                switch (cmbContentManipulationMode.SelectedIndex)
                {
                    case 0:
                        scrollPresenter.Content.ManipulationMode = ManipulationModes.System;
                        break;
                    case 1:
                        scrollPresenter.Content.ManipulationMode = ManipulationModes.None;
                        break;
                }
            }
        }

void CmbContentOrientation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 505 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.ContentOrientation = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
        }

void CmbContentVerticalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 687 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content is FrameworkElement)
            {
                ((FrameworkElement)scrollPresenter.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
            }
        }

void CmbHorizontalScrollChainMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 535 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.HorizontalScrollChainMode = (ScrollingChainMode)cmbHorizontalScrollChainMode.SelectedIndex;
        }

void CmbHorizontalScrollMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 511 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.HorizontalScrollMode = (ScrollingScrollMode)cmbHorizontalScrollMode.SelectedIndex;
        }

void CmbHorizontalScrollRailMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 546 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.HorizontalScrollRailMode = (ScrollingRailMode)cmbHorizontalScrollRailMode.SelectedIndex;
        }

void CmbIgnoredInputKinds_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 612 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
            {
                switch (cmbIgnoredInputKinds.SelectedIndex)
                {
                    case 0:
                        scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.None;
                        break;
                    case 1:
                        scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Touch;
                        break;
                    case 2:
                        scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Pen;
                        break;
                    case 3:
                        scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.MouseWheel;
                        break;
                    case 4:
                        scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Keyboard;
                        break;
                    case 5:
                        scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Gamepad;
                        break;
                    case 6:
                        scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.All;
                        break;
                }
            }
        }

void CmbScrollPresenterManipulationMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 703 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            switch (cmbScrollPresenterManipulationMode.SelectedIndex)
            {
                case 0:
                    scrollPresenter.ManipulationMode = ManipulationModes.System;
                    break;
                case 1:
                    scrollPresenter.ManipulationMode = ManipulationModes.None;
                    break;
            }
        }

void CmbSnapPointKind_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2037 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (cmbSnapPointAlignment != null)
            {
                cmbSnapPointAlignment.IsEnabled = cmbSnapPointKind.SelectedIndex != 2;
            }
        }

void CmbVerticalScrollChainMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 568 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.VerticalScrollChainMode = (ScrollingChainMode)cmbVerticalScrollChainMode.SelectedIndex;
        }

void CmbVerticalScrollMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 557 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.VerticalScrollMode = (ScrollingScrollMode)cmbVerticalScrollMode.SelectedIndex;
        }

void CmbVerticalScrollRailMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 579 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.VerticalScrollRailMode = (ScrollingRailMode)cmbVerticalScrollRailMode.SelectedIndex;
        }

void CmbZoomChainMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 601 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.ZoomChainMode = (ScrollingChainMode)cmbZoomChainMode.SelectedIndex;
        }

void CmbZoomMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 590 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
                scrollPresenter.ZoomMode = (ScrollingZoomMode)cmbZoomMode.SelectedIndex;
        }

float ComputeHorizontalPositionFromOffset ( double offset ) [inline, private]

Definition at line 1766 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            return (float)(offset + ComputeMinHorizontalPosition(scrollPresenter.ZoomFactor));
        }

float ComputeMinHorizontalPosition ( float zoomFactor ) [inline, private]

Definition at line 1776 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UIElement content = scrollPresenter.Content;

            if (content == null)
            {
                return 0;
            }

            FrameworkElement contentAsFE = content as FrameworkElement;

            if (contentAsFE == null)
            {
                return 0;
            }

            Thickness contentMargin = contentAsFE.Margin;
            Visual scrollPresenterVisual = ElementCompositionPreview.GetElementVisual(scrollPresenter);
            double contentWidth = double.IsNaN(contentAsFE.Width) ? contentAsFE.ActualWidth : contentAsFE.Width;
            float minPosX = 0.0f;
            float extentWidth = Math.Max(0.0f, (float)(contentWidth + contentMargin.Left + contentMargin.Right));

            if (contentAsFE.HorizontalAlignment == HorizontalAlignment.Center ||
                contentAsFE.HorizontalAlignment == HorizontalAlignment.Stretch)
            {
                minPosX = Math.Min(0.0f, (extentWidth * zoomFactor - scrollPresenterVisual.Size.X) / 2.0f);
            }
            else if (contentAsFE.HorizontalAlignment == HorizontalAlignment.Right)
            {
                minPosX = Math.Min(0.0f, extentWidth * zoomFactor - scrollPresenterVisual.Size.X);
            }

            return minPosX;
        }

float ComputeMinVerticalPosition ( float zoomFactor ) [inline, private]

Definition at line 1811 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            UIElement content = scrollPresenter.Content;

            if (content == null)
            {
                return 0;
            }

            FrameworkElement contentAsFE = content as FrameworkElement;

            if (contentAsFE == null)
            {
                return 0;
            }

            Thickness contentMargin = contentAsFE.Margin;
            Visual scrollPresenterVisual = ElementCompositionPreview.GetElementVisual(scrollPresenter);
            double contentHeight = double.IsNaN(contentAsFE.Height) ? contentAsFE.ActualHeight : contentAsFE.Height;
            float minPosY = 0.0f;
            float extentHeight = Math.Max(0.0f, (float)(contentHeight + contentMargin.Top + contentMargin.Bottom));

            if (contentAsFE.VerticalAlignment == VerticalAlignment.Center ||
                contentAsFE.VerticalAlignment == VerticalAlignment.Stretch)
            {
                minPosY = Math.Min(0.0f, (extentHeight * zoomFactor - scrollPresenterVisual.Size.Y) / 2.0f);
            }
            else if (contentAsFE.VerticalAlignment == VerticalAlignment.Bottom)
            {
                minPosY = Math.Min(0.0f, extentHeight * zoomFactor - scrollPresenterVisual.Size.Y);
            }

            return minPosY;
        }

float ComputeVerticalPositionFromOffset ( double offset ) [inline, private]

Definition at line 1771 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            return (float)(offset + ComputeMinVerticalPosition(scrollPresenter.ZoomFactor));
        }

void Content_EffectiveViewportChanged | ( | FrameworkElement | sender,
 |  | EffectiveViewportChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 376 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("Content_EffectiveViewportChanged: BringIntoViewDistance=" +
                args.BringIntoViewDistanceX + "," + args.BringIntoViewDistanceY + ", EffectiveViewport=" +
                args.EffectiveViewport.ToString() + ", MaxViewport=" + args.MaxViewport.ToString());
        }

void Content_PointerCanceled | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 393 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("Content_PointerCanceled: PointerId=" + e.Pointer.PointerId);
        }

void Content_PointerCaptureLost | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 398 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("Content_PointerCaptureLost: PointerId=" + e.Pointer.PointerId);
        }

void Content_PointerPressed | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 383 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("Content_PointerPressed: PointerId=" + e.Pointer.PointerId);
        }

void Content_PointerReleased | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 388 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("Content_PointerReleased: PointerId=" + e.Pointer.PointerId);
        }

Vector2 ConvertFromStringToVector2 ( string value ) [inline, private]

Definition at line 2327 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            float x = 0, y = 0;

            int commaIndex = value.IndexOf(',');
            if (commaIndex != -1)
            {
                x = Convert.ToSingle(value.Substring(0, commaIndex));
                y = Convert.ToSingle(value.Substring(commaIndex + 1));
            }

            return new Vector2(x, y);
        }

void CreateChildren ( ) [inline, private]

Definition at line 150 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            textBlock = new TextBlock();
            textBlock.TextWrapping = TextWrapping.Wrap;
            string textBlockText = string.Empty;
            for (int i = 0; i < 50; i++)
            {
                textBlockText += "Large TextBlock Text. ";
            }
            textBlock.Text = textBlockText;

            viewbox = new Viewbox();
            tilePanel = new TilePanel();
            tilePanel.TileCount = 100;
            tilePanel.Background = new SolidColorBrush(Microsoft.UI.Colors.Orange);
            largeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
            SolidColorBrush chartreuseBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            SolidColorBrush blanchedAlmondBrush = new SolidColorBrush(Microsoft.UI.Colors.BlanchedAlmond);
            SolidColorBrush interBrush = new SolidColorBrush(Microsoft.UI.Colors.Yellow);
            LinearGradientBrush lgb = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };
            GradientStop gs = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
            lgb.GradientStops.Add(gs);
            gs = new GradientStop() { Color = Microsoft.UI.Colors.White, Offset = 0.5 };
            lgb.GradientStops.Add(gs);
            gs = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
            lgb.GradientStops.Add(gs);
            rectangle = new Rectangle() { Fill = lgb };
            button = new Button() { Content = "Button" };
            Rectangle viewboxChild = new Rectangle()
            {
                Fill = lgb,
                Width = 600,
                Height = 500
            };
            viewbox.Child = viewboxChild;
            Rectangle borderChild = new Rectangle()
            {
                Fill = lgb
            };
            border = new Border()
            {
                BorderBrush = chartreuseBrush,
                BorderThickness = new Thickness(5),
                Child = borderChild
            };
            StackPanel populatedBorderChild = new StackPanel();
            populatedBorderChild.Margin = new Thickness(30);
            for (int i = 0; i < 16; i++)
            {
                TextBlock textBlock = new TextBlock()
                {
                    Text = "TB#" + populatedBorderChild.Children.Count,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment = VerticalAlignment.Center
                };

                Border borderInSP = new Border()
                {
                    BorderThickness = border.Margin = new Thickness(3),
                    BorderBrush = chartreuseBrush,
                    Background = blanchedAlmondBrush,
                    Width = 170,
                    Height = 120,
                    Child = textBlock
                };

                populatedBorderChild.Children.Add(borderInSP);
            }
            populatedBorder = new Border()
            {
                BorderBrush = chartreuseBrush,
                BorderThickness = new Thickness(3),
                Margin = new Thickness(15),
                Background = new SolidColorBrush(Microsoft.UI.Colors.Beige),
                Child = populatedBorderChild
            };
            horizontalStackPanel = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };
            for (int index = 0; index < 10; index++)
            {
                horizontalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Width = 95 });
                horizontalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Width = 5 });
            }
            verticalStackPanel = new StackPanel();
            for (int index = 0; index < 10; index++)
            {
                verticalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Height = 95 });
                verticalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Height = 5 });
            }
        }

void ExecuteQueuedOperations ( ) [inline, private]

Definition at line 2785 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                while (lstQueuedOperations.Count > 0)
                {
                    QueuedOperation qo = lstQueuedOperations[0];

                    switch (qo.Type)
                    {
                        case QueuedOperationType.SetMinZoomFactor:
                            scrollPresenter.MinZoomFactor = qo.DoubleValue;
                            AppendAsyncEventMessage("Unqueued SetMinZoomFactor " + qo.DoubleValue);
                            break;
                        case QueuedOperationType.SetMaxZoomFactor:
                            scrollPresenter.MaxZoomFactor = qo.DoubleValue;
                            AppendAsyncEventMessage("Unqueued SetMaxZoomFactor " + qo.DoubleValue);
                            break;
                        case QueuedOperationType.SetWidth:
                            scrollPresenter.Width = qo.DoubleValue;
                            AppendAsyncEventMessage("Unqueued SetWidth " + qo.DoubleValue);
                            break;
                        case QueuedOperationType.SetHeight:
                            scrollPresenter.Height = qo.DoubleValue;
                            AppendAsyncEventMessage("Unqueued SetHeight " + qo.DoubleValue);
                            break;
                        case QueuedOperationType.SetContentWidth:
                            if (scrollPresenter.Content is FrameworkElement)
                            {
                                ((FrameworkElement)(scrollPresenter.Content)).Width = qo.DoubleValue;
                            }
                            AppendAsyncEventMessage("Unqueued SetContentWidth " + qo.DoubleValue);
                            break;
                        case QueuedOperationType.SetContentHeight:
                            if (scrollPresenter.Content is FrameworkElement)
                            {
                                ((FrameworkElement)(scrollPresenter.Content)).Height = qo.DoubleValue;
                            }
                            AppendAsyncEventMessage("Unqueued SetContentHeight " + qo.DoubleValue);
                            break;
                        case QueuedOperationType.SetContentMargin:
                            if (scrollPresenter.Content is FrameworkElement)
                            {
                                ((FrameworkElement)(scrollPresenter.Content)).Margin = GetThicknessFromString(qo.StringValue);
                            }
                            AppendAsyncEventMessage("Unqueued SetContentMargin " + qo.StringValue);
                            break;
                        case QueuedOperationType.SetContentPadding:
                            if (scrollPresenter.Content is Control)
                            {
                                ((Control)(scrollPresenter.Content)).Padding = GetThicknessFromString(qo.StringValue);
                            }
                            else if (scrollPresenter.Content is Border)
                            {
                                ((Border)(scrollPresenter.Content)).Padding = GetThicknessFromString(qo.StringValue);
                            }
                            else if (scrollPresenter.Content is StackPanel)
                            {
                                ((StackPanel)(scrollPresenter.Content)).Padding = GetThicknessFromString(qo.StringValue);
                            }
                            AppendAsyncEventMessage("Unqueued SetContentPadding " + qo.StringValue);
                            break;
                    }

                    lstQueuedOperations.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 2775 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void HookContentEffectiveViewportChanged ( ) [inline, private]

Definition at line 317 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
            {
                FrameworkElement contentAsFE = scrollPresenter.Content as FrameworkElement;
                if (contentAsFE != null)
                {
                    contentAsFE.EffectiveViewportChanged += Content_EffectiveViewportChanged;
                }
            }
        }

void HookContentPointerEvents ( ) [inline, private]

Definition at line 341 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
            {
                UIElement contentAsUIE = scrollPresenter.Content as UIElement;
                if (contentAsUIE != null)
                {
                    contentPointerPressedEventHandler = new PointerEventHandler(Content_PointerPressed);
                    contentPointerReleasedEventHandler = new PointerEventHandler(Content_PointerReleased);
                    contentPointerCanceledEventHandler = new PointerEventHandler(Content_PointerCanceled);
                    contentPointerCaptureLostEventHandler = new PointerEventHandler(Content_PointerCaptureLost);

                    contentAsUIE.AddHandler(UIElement.PointerPressedEvent, contentPointerPressedEventHandler, true);
                    contentAsUIE.AddHandler(UIElement.PointerReleasedEvent, contentPointerReleasedEventHandler, true);
                    contentAsUIE.AddHandler(UIElement.PointerCanceledEvent, contentPointerCanceledEventHandler, true);
                    contentAsUIE.AddHandler(UIElement.PointerCaptureLostEvent, contentPointerCaptureLostEventHandler, true);
                }
            }
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 403 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
                AppendAsyncEventMessage("Warning: Failure while accessing sender's Name");
            }

            if (args.IsVerboseLevel)
            {
                AppendAsyncEventMessage("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                AppendAsyncEventMessage("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 100 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (chkLogScrollPresenterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
            }

            base.OnNavigatedFrom(e);
        }

void Scroll ( bool isRelativeChange ) [inline, private]

Definition at line 1566 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingAnimationMode animatioMode = (ScrollingAnimationMode)cmbScrollAnimationMode.SelectedIndex;
                ScrollingSnapPointsMode snapPointsMode = (ScrollingSnapPointsMode)cmbScrollSnapPointsMode.SelectedIndex;
                ScrollingScrollOptions options = new ScrollingScrollOptions(animatioMode, snapPointsMode);

                txtStockOffsetsChangeDuration.Text = string.Empty;

                ExecuteQueuedOperations();

                if (isRelativeChange)
                {
                    lastOffsetsChangeCorrelationId = scrollPresenter.ScrollBy(
                        Convert.ToDouble(txtScrollHorizontalOffset.Text),
                        Convert.ToDouble(txtScrollVerticalOffset.Text),
                        options);
                    relativeChangeCorrelationIds.Add(lastOffsetsChangeCorrelationId);
                    AppendAsyncEventMessage("Invoked ScrollBy CorrelationId=" + lastOffsetsChangeCorrelationId);
                }
                else
                {
                    lastOffsetsChangeCorrelationId = scrollPresenter.ScrollTo(
                        Convert.ToDouble(txtScrollHorizontalOffset.Text),
                        Convert.ToDouble(txtScrollVerticalOffset.Text),
                        options);
                    AppendAsyncEventMessage("Invoked ScrollTo CorrelationId=" + lastOffsetsChangeCorrelationId);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 111 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
        }

void ScrollPresenter_ScrollAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1623 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                AppendAsyncEventMessage("ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId + " SP=(" + args.StartPosition.X + "," + args.StartPosition.Y + ") EP=(" + args.EndPosition.X + "," + args.EndPosition.Y + ")");

                Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;

                if (stockKeyFrameAnimation != null)
                {
                    Vector3KeyFrameAnimation customKeyFrameAnimation = stockKeyFrameAnimation;

                    if (cmbOverriddenOffsetsChangeAnimation.SelectedIndex != 0)
                    {
                        bool isRelativeChange = relativeChangeCorrelationIds.Contains(args.CorrelationId);

                        double targetHorizontalOffset = Convert.ToDouble(txtScrollHorizontalOffset.Text);
                        if (isRelativeChange)
                        {
                            targetHorizontalOffset += scrollPresenter.HorizontalOffset;
                        }
                        float targetHorizontalPosition = ComputeHorizontalPositionFromOffset(targetHorizontalOffset);

                        double targetVerticalOffset = Convert.ToDouble(txtScrollVerticalOffset.Text);
                        if (isRelativeChange)
                        {
                            targetVerticalOffset += scrollPresenter.VerticalOffset;
                        }
                        float targetVerticalPosition = ComputeVerticalPositionFromOffset(targetVerticalOffset);

                        customKeyFrameAnimation = stockKeyFrameAnimation.Compositor.CreateVector3KeyFrameAnimation();
                        if (cmbOverriddenOffsetsChangeAnimation.SelectedIndex == 1)
                        {
                            // Accordion case
                            float deltaHorizontalPosition = 0.1f * (float)(targetHorizontalOffset - scrollPresenter.HorizontalOffset);
                            float deltaVerticalPosition = 0.1f * (float)(targetVerticalOffset - scrollPresenter.VerticalOffset);

                            for (int step = 0; step < 3; step++)
                            {
                                customKeyFrameAnimation.InsertKeyFrame(
                                    1.0f - (0.4f / (float)Math.Pow(2, step)),
                                    new Vector3(targetHorizontalPosition + deltaHorizontalPosition, targetVerticalPosition + deltaVerticalPosition, 0.0f));
                                deltaHorizontalPosition /= -2.0f;
                                deltaVerticalPosition /= -2.0f;
                            }

                            customKeyFrameAnimation.InsertKeyFrame(1.0f, new Vector3(targetHorizontalPosition, targetVerticalPosition, 0.0f));
                        }
                        else
                        {
                            // Teleportation case
                            float deltaHorizontalPosition = (float)(targetHorizontalOffset - scrollPresenter.HorizontalOffset);
                            float deltaVerticalPosition = (float)(targetVerticalOffset - scrollPresenter.VerticalOffset);

                            CubicBezierEasingFunction cubicBezierStart = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
                                new Vector2(1.0f, 0.0f),
                                new Vector2(1.0f, 0.0f));

                            StepEasingFunction step = stockKeyFrameAnimation.Compositor.CreateStepEasingFunction(1);

                            CubicBezierEasingFunction cubicBezierEnd = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
                                new Vector2(0.0f, 1.0f),
                                new Vector2(0.0f, 1.0f));

                            customKeyFrameAnimation.InsertKeyFrame(
                                0.499999f,
                                new Vector3(targetHorizontalPosition - 0.9f * deltaHorizontalPosition, targetVerticalPosition - 0.9f * deltaVerticalPosition, 0.0f),
                                cubicBezierStart);
                            customKeyFrameAnimation.InsertKeyFrame(
                                0.5f,
                                new Vector3(targetHorizontalPosition - 0.1f * deltaHorizontalPosition, targetVerticalPosition - 0.1f * deltaVerticalPosition, 0.0f),
                                step);
                            customKeyFrameAnimation.InsertKeyFrame(
                                1.0f,
                                new Vector3(targetHorizontalPosition, targetVerticalPosition, 0.0f),
                                cubicBezierEnd);
                        }
                        customKeyFrameAnimation.Duration = stockKeyFrameAnimation.Duration;
                        args.Animation = customKeyFrameAnimation;
                    }

                    if (!string.IsNullOrWhiteSpace(txtOverriddenOffsetsChangeDuration.Text))
                    {
                        txtStockOffsetsChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();
                        double durationOverride = Convert.ToDouble(txtOverriddenOffsetsChangeDuration.Text);
                        customKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenter_ScrollCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 136 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

            AppendAsyncEventMessage("ScrollCompleted OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
        }

void ScrollPresenter_ScrollStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 126 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollStarting H=" + args.HorizontalOffset.ToString() + ", V=" + args.VerticalOffset + ", ZF=" + args.ZoomFactor);
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 116 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("StateChanged " + sender.State.ToString());
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 121 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
        }

void ScrollPresenter_ZoomAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1913 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                AppendAsyncEventMessage("ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint + ", SZF=" + args.StartZoomFactor + ", EZF=" + args.EndZoomFactor);

                ScalarKeyFrameAnimation stockKeyFrameAnimation = args.Animation as ScalarKeyFrameAnimation;

                if (stockKeyFrameAnimation != null)
                {
                    ScalarKeyFrameAnimation customKeyFrameAnimation = stockKeyFrameAnimation;

                    if (cmbOverriddenZoomFactorChangeAnimation.SelectedIndex != 0)
                    {
                        float targetZoomFactor = Convert.ToSingle(txtZoomZoomFactor.Text);
                        if (relativeChangeCorrelationIds.Contains(args.CorrelationId))
                        {
                            targetZoomFactor += scrollPresenter.ZoomFactor;
                        }

                        customKeyFrameAnimation = stockKeyFrameAnimation.Compositor.CreateScalarKeyFrameAnimation();
                        if (cmbOverriddenZoomFactorChangeAnimation.SelectedIndex == 1)
                        {
                            // Accordion case
                            float deltaZoomFactor = 0.1f * (float)(targetZoomFactor - scrollPresenter.ZoomFactor);

                            for (int step = 0; step < 3; step++)
                            {
                                customKeyFrameAnimation.InsertKeyFrame(
                                    1.0f - (0.4f / (float)Math.Pow(2, step)),
                                    targetZoomFactor + deltaZoomFactor);
                                deltaZoomFactor /= -2.0f;
                            }

                            customKeyFrameAnimation.InsertKeyFrame(1.0f, targetZoomFactor);
                        }
                        else
                        {
                            // Teleportation case
                            float deltaZoomFactor = (float)(targetZoomFactor - scrollPresenter.ZoomFactor);

                            CubicBezierEasingFunction cubicBezierStart = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
                                new Vector2(1.0f, 0.0f),
                                new Vector2(1.0f, 0.0f));

                            StepEasingFunction step = stockKeyFrameAnimation.Compositor.CreateStepEasingFunction(1);

                            CubicBezierEasingFunction cubicBezierEnd = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
                                new Vector2(0.0f, 1.0f),
                                new Vector2(0.0f, 1.0f));

                            customKeyFrameAnimation.InsertKeyFrame(
                                0.499999f,
                                targetZoomFactor - 0.9f * deltaZoomFactor,
                                cubicBezierStart);
                            customKeyFrameAnimation.InsertKeyFrame(
                                0.5f,
                                targetZoomFactor - 0.1f * deltaZoomFactor,
                                step);
                            customKeyFrameAnimation.InsertKeyFrame(
                                1.0f,
                                targetZoomFactor,
                                cubicBezierEnd);
                        }
                        customKeyFrameAnimation.Duration = stockKeyFrameAnimation.Duration;
                        args.Animation = customKeyFrameAnimation;
                    }

                    if (!string.IsNullOrWhiteSpace(txtOverriddenZoomFactorChangeDuration.Text))
                    {
                        txtStockZoomFactorChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();
                        double durationOverride = Convert.ToDouble(txtOverriddenZoomFactorChangeDuration.Text);
                        customKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenter_ZoomCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 143 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

            AppendAsyncEventMessage("ZoomCompleted ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
        }

void ScrollPresenter_ZoomStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 131 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ZoomStarting H=" + args.HorizontalOffset.ToString() + ", V=" + args.VerticalOffset + ", ZF=" + args.ZoomFactor);
        }

void UnhookContentEffectiveViewportChanged ( ) [inline, private]

Definition at line 329 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
            {
                FrameworkElement contentAsFE = scrollPresenter.Content as FrameworkElement;
                if (contentAsFE != null)
                {
                    contentAsFE.EffectiveViewportChanged -= Content_EffectiveViewportChanged;
                }
            }
        }

void UnhookContentPointerEvents ( ) [inline, private]

Definition at line 361 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter != null)
            {
                UIElement contentAsUIE = scrollPresenter.Content as UIElement;
                if (contentAsUIE != null)
                {
                    contentAsUIE.RemoveHandler(UIElement.PointerPressedEvent, contentPointerPressedEventHandler);
                    contentAsUIE.RemoveHandler(UIElement.PointerReleasedEvent, contentPointerReleasedEventHandler);
                    contentAsUIE.RemoveHandler(UIElement.PointerCanceledEvent, contentPointerCanceledEventHandler);
                    contentAsUIE.RemoveHandler(UIElement.PointerCaptureLostEvent, contentPointerCaptureLostEventHandler);
                }
            }
        }

void UpdateCmbBackground ( ) [inline, private]

Definition at line 780 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            SolidColorBrush bg = scrollPresenter.Background as SolidColorBrush;

            if (bg == null)
            {
                cmbBackground.SelectedIndex = 0;
            }
            else if (bg.Color == Microsoft.UI.Colors.Transparent)
            {
                cmbBackground.SelectedIndex = 1;
            }
            else if (bg.Color == Microsoft.UI.Colors.AliceBlue)
            {
                cmbBackground.SelectedIndex = 2;
            }
            else if (bg.Color == Microsoft.UI.Colors.Aqua)
            {
                cmbBackground.SelectedIndex = 3;
            }
        }

void UpdateCmbContent ( ) [inline, private]

Definition at line 901 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content == null)
            {
                cmbContent.SelectedIndex = 0;
            }
            else if (scrollPresenter.Content is Image)
            {
                if (((scrollPresenter.Content as Image).Source as BitmapImage).UriSource.AbsolutePath.ToLower().Contains("large"))
                {
                    cmbContent.SelectedIndex = 2;
                }
                else
                {
                    cmbContent.SelectedIndex = 1;
                }
            }
            else if (scrollPresenter.Content is Rectangle)
            {
                cmbContent.SelectedIndex = 3;
            }
            else if (scrollPresenter.Content is Button)
            {
                cmbContent.SelectedIndex = 4;
            }
            else if (scrollPresenter.Content is Border)
            {
                if ((scrollPresenter.Content as Border).Child is Rectangle)
                {
                    cmbContent.SelectedIndex = 5;
                }
                else
                {
                    cmbContent.SelectedIndex = 6;
                }
            }
            else if (scrollPresenter.Content is StackPanel)
            {
                cmbContent.SelectedIndex = 7;
            }
            else if (scrollPresenter.Content is TilePanel)
            {
                cmbContent.SelectedIndex = 8;
            }
            else if (scrollPresenter.Content is Viewbox)
            {
                cmbContent.SelectedIndex = 9;
            }
            else if (scrollPresenter.Content is TextBox)
            {
                cmbContent.SelectedIndex = 10;
            }
        }

void UpdateCmbContentHorizontalAlignment ( ) [inline, private]

Definition at line 679 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content is FrameworkElement)
            {
                cmbContentHorizontalAlignment.SelectedIndex = (int)((FrameworkElement)scrollPresenter.Content).HorizontalAlignment;
            }
        }

void UpdateCmbContentManipulationMode ( ) [inline, private]

Definition at line 745 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content != null)
            {
                switch (scrollPresenter.Content.ManipulationMode)
                {
                    case ManipulationModes.System:
                        cmbContentManipulationMode.SelectedIndex = 0;
                        break;
                    case ManipulationModes.None:
                        cmbContentManipulationMode.SelectedIndex = 1;
                        break;
                }
            }
        }

void UpdateCmbContentOrientation ( ) [inline, private]

Definition at line 517 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                cmbContentOrientation.SelectedIndex = (int)scrollPresenter.ContentOrientation;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void UpdateCmbContentVerticalAlignment ( ) [inline, private]

Definition at line 695 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter.Content is FrameworkElement)
            {
                cmbContentVerticalAlignment.SelectedIndex = (int)((FrameworkElement)scrollPresenter.Content).VerticalAlignment;
            }
        }

void UpdateCmbHorizontalScrollChainMode ( ) [inline, private]

Definition at line 541 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbHorizontalScrollChainMode.SelectedIndex = (int)scrollPresenter.HorizontalScrollChainMode;
        }

void UpdateCmbHorizontalScrollMode ( ) [inline, private]

Definition at line 530 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbHorizontalScrollMode.SelectedIndex = (int)scrollPresenter.HorizontalScrollMode;
        }

void UpdateCmbHorizontalScrollRailMode ( ) [inline, private]

Definition at line 552 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbHorizontalScrollRailMode.SelectedIndex = (int)scrollPresenter.HorizontalScrollRailMode;
        }

void UpdateCmbIgnoredInputKinds ( ) [inline, private]

Definition at line 643 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            switch (scrollPresenter.IgnoredInputKinds)
            {
                case ScrollingInputKinds.None:
                    cmbIgnoredInputKinds.SelectedIndex = 0;
                    break;
                case ScrollingInputKinds.Touch:
                    cmbIgnoredInputKinds.SelectedIndex = 1;
                    break;
                case ScrollingInputKinds.Pen:
                    cmbIgnoredInputKinds.SelectedIndex = 2;
                    break;
                case ScrollingInputKinds.MouseWheel:
                    cmbIgnoredInputKinds.SelectedIndex = 3;
                    break;
                case ScrollingInputKinds.Keyboard:
                    cmbIgnoredInputKinds.SelectedIndex = 4;
                    break;
                case ScrollingInputKinds.Gamepad:
                    cmbIgnoredInputKinds.SelectedIndex = 5;
                    break;
                case ScrollingInputKinds.All:
                    cmbIgnoredInputKinds.SelectedIndex = 6;
                    break;
            }
        }

void UpdateCmbScrollPresenterManipulationMode ( ) [inline, private]

Definition at line 716 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            switch (scrollPresenter.ManipulationMode)
            {
                case ManipulationModes.System:
                    cmbScrollPresenterManipulationMode.SelectedIndex = 0;
                    break;
                case ManipulationModes.None:
                    cmbScrollPresenterManipulationMode.SelectedIndex = 1;
                    break;
            }
        }

void UpdateCmbVerticalScrollChainMode ( ) [inline, private]

Definition at line 574 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbVerticalScrollChainMode.SelectedIndex = (int)scrollPresenter.VerticalScrollChainMode;
        }

void UpdateCmbVerticalScrollMode ( ) [inline, private]

Definition at line 563 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbVerticalScrollMode.SelectedIndex = (int)scrollPresenter.VerticalScrollMode;
        }

void UpdateCmbVerticalScrollRailMode ( ) [inline, private]

Definition at line 585 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbVerticalScrollRailMode.SelectedIndex = (int)scrollPresenter.VerticalScrollRailMode;
        }

void UpdateCmbZoomChainMode ( ) [inline, private]

Definition at line 607 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbZoomChainMode.SelectedIndex = (int)scrollPresenter.ZoomChainMode;
        }

void UpdateCmbZoomMode ( ) [inline, private]

Definition at line 596 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            cmbZoomMode.SelectedIndex = (int)scrollPresenter.ZoomMode;
        }

void UpdateMaxZoomFactor ( ) [inline, private]

Definition at line 1314 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            txtMaxZoomFactor.Text = scrollPresenter.MaxZoomFactor.ToString();
        }

void UpdateMinZoomFactor ( ) [inline, private]

Definition at line 1309 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            txtMinZoomFactor.Text = scrollPresenter.MinZoomFactor.ToString();
        }

void UseScrollPresenter ( ScrollPresenter s ) [inline, private]

Definition at line 2683 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            if (scrollPresenter == s || s == null)
                return;

            try
            {
                if (scrollPresenter != null)
                {
                    if (chkLogScrollPresenterMessages.IsChecked == true)
                    {
                        MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
                        MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
                    }

                    if (chkLogScrollPresenterEvents.IsChecked == true)
                    {
                        scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
                        scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
                        scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
                        scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
                        scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompleted;
                        scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
                        scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
                        scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                        scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
                    }

                    if (chkLogScrollPresenterEvents.IsChecked == true)
                    {
                        UnhookContentEffectiveViewportChanged();
                    }
                }

                scrollPresenter = s;

                if (chkLogScrollPresenterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
                }

                UpdateCmbContentOrientation();
                UpdateCmbHorizontalScrollMode();
                UpdateCmbHorizontalScrollChainMode();
                UpdateCmbHorizontalScrollRailMode();
                UpdateCmbVerticalScrollMode();
                UpdateCmbVerticalScrollChainMode();
                UpdateCmbVerticalScrollRailMode();
                UpdateCmbZoomMode();
                UpdateCmbZoomChainMode();
                UpdateCmbIgnoredInputKinds();
                UpdateCmbContentHorizontalAlignment();
                UpdateCmbContentVerticalAlignment();
                UpdateCmbScrollPresenterManipulationMode();
                UpdateCmbContentManipulationMode();
                UpdateCmbBackground();
                UpdateCmbContent();
                UpdateMinZoomFactor();
                UpdateMaxZoomFactor();

                txtWidth.Text = string.Empty;
                txtHeight.Text = string.Empty;

                if (scrollPresenter != null)
                {
                    if (chkLogScrollPresenterEvents.IsChecked == true)
                    {
                        scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                        scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                        scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                        scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
                        scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
                        scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
                        scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
                        scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                        scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
                    }

                    if (chkLogScrollPresenterEvents.IsChecked == true)
                    {
                        HookContentEffectiveViewportChanged();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void Zoom ( bool isRelativeChange ) [inline, private]

Definition at line 1856 of file ScrollPresenterDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingAnimationMode animationMode = (ScrollingAnimationMode)cmbZoomAnimationMode.SelectedIndex;
                ScrollingSnapPointsMode snapPointsMode = (ScrollingSnapPointsMode)cmbZoomSnapPointsMode.SelectedIndex;
                ScrollingZoomOptions options = new ScrollingZoomOptions(animationMode, snapPointsMode);

                txtStockZoomFactorChangeDuration.Text = string.Empty;

                ExecuteQueuedOperations();

                if (isRelativeChange)
                {
                    lastZoomFactorChangeCorrelationId = scrollPresenter.ZoomBy(
                        Convert.ToSingle(txtZoomZoomFactor.Text),
                        (txtZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtZoomCenterPoint.Text),
                        options);
                    relativeChangeCorrelationIds.Add(lastZoomFactorChangeCorrelationId);
                    AppendAsyncEventMessage("Invoked ZoomBy CorrelationId=" + lastZoomFactorChangeCorrelationId);
                }
                else
                {
                    lastZoomFactorChangeCorrelationId = scrollPresenter.ZoomTo(
                        Convert.ToSingle(txtZoomZoomFactor.Text),
                        (txtZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtZoomCenterPoint.Text),
                        options);
                    AppendAsyncEventMessage("Invoked ZoomTo CorrelationId=" + lastZoomFactorChangeCorrelationId);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

Member Data Documentation

Object asyncEventReportingLock = new Object() [private]

Definition at line 67 of file ScrollPresenterDynamicPage.xaml.cs.

Border border [private]

Definition at line 76 of file ScrollPresenterDynamicPage.xaml.cs.

Button button [private]

Definition at line 75 of file ScrollPresenterDynamicPage.xaml.cs.

PointerEventHandler contentPointerCanceledEventHandler = null [private]

Definition at line 84 of file ScrollPresenterDynamicPage.xaml.cs.

PointerEventHandler contentPointerCaptureLostEventHandler = null [private]

Definition at line 85 of file ScrollPresenterDynamicPage.xaml.cs.

PointerEventHandler contentPointerPressedEventHandler = null [private]

Definition at line 82 of file ScrollPresenterDynamicPage.xaml.cs.

PointerEventHandler contentPointerReleasedEventHandler = null [private]

Definition at line 83 of file ScrollPresenterDynamicPage.xaml.cs.

ScrollPresenter dynamicScrollPresenter = null [private]

Definition at line 80 of file ScrollPresenterDynamicPage.xaml.cs.

StackPanel horizontalStackPanel [private]

Definition at line 78 of file ScrollPresenterDynamicPage.xaml.cs.

Image largeImg [private]

Definition at line 73 of file ScrollPresenterDynamicPage.xaml.cs.

int lastOffsetsChangeCorrelationId = -1 [private]

Definition at line 62 of file ScrollPresenterDynamicPage.xaml.cs.

int lastOffsetsChangeWithAdditionalVelocityCorrelationId = -1 [private]

Definition at line 63 of file ScrollPresenterDynamicPage.xaml.cs.

int lastZoomFactorChangeCorrelationId = -1 [private]

Definition at line 64 of file ScrollPresenterDynamicPage.xaml.cs.

int lastZoomFactorChangeWithAdditionalVelocityCorrelationId = -1 [private]

Definition at line 65 of file ScrollPresenterDynamicPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 68 of file ScrollPresenterDynamicPage.xaml.cs.

List<QueuedOperation> lstQueuedOperations = new List<QueuedOperation>() [private]

Definition at line 69 of file ScrollPresenterDynamicPage.xaml.cs.

Border populatedBorder [private]

Definition at line 77 of file ScrollPresenterDynamicPage.xaml.cs.

Rectangle rectangle [private]

Definition at line 74 of file ScrollPresenterDynamicPage.xaml.cs.

HashSet<int> relativeChangeCorrelationIds = new HashSet<int>() [private]

Definition at line 66 of file ScrollPresenterDynamicPage.xaml.cs.

ScrollPresenter scrollPresenter = null [private]

Definition at line 81 of file ScrollPresenterDynamicPage.xaml.cs.

TextBlock textBlock [private]

Definition at line 70 of file ScrollPresenterDynamicPage.xaml.cs.

TilePanel tilePanel [private]

Definition at line 72 of file ScrollPresenterDynamicPage.xaml.cs.

StackPanel verticalStackPanel [private]

Definition at line 79 of file ScrollPresenterDynamicPage.xaml.cs.

Viewbox viewbox [private]

Definition at line 71 of file ScrollPresenterDynamicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterDynamicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterDynamicPage::QueuedOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterDynamicPage
  • ScrollPresenterDynamicPage::QueuedOperation
Public Member Functions | Properties

ScrollPresenterDynamicPage::QueuedOperation Class Reference

List of all members.

Public Member Functions

QueuedOperation (QueuedOperationType type, double value)
QueuedOperation (QueuedOperationType type, string value)

Properties

double | DoubleValue [get, set]
string | StringValue [get, set]
QueuedOperationType | Type [get, set]

Detailed Description

Definition at line 44 of file ScrollPresenterDynamicPage.xaml.cs.

Constructor & Destructor Documentation

QueuedOperation | ( | QueuedOperationType | type,
 |  | double | value |
 | ) |  |  | [inline]

Definition at line 46 of file ScrollPresenterDynamicPage.xaml.cs.

            {
                this.Type = type;
                this.DoubleValue = value;
            }

QueuedOperation | ( | QueuedOperationType | type,
 |  | string | value |
 | ) |  |  | [inline]

Definition at line 51 of file ScrollPresenterDynamicPage.xaml.cs.

            {
                this.Type = type;
                this.StringValue = value;
            }

Property Documentation

double DoubleValue [get, set]

Definition at line 58 of file ScrollPresenterDynamicPage.xaml.cs.

string StringValue [get, set]

Definition at line 59 of file ScrollPresenterDynamicPage.xaml.cs.

QueuedOperationType Type [get, set]

Definition at line 57 of file ScrollPresenterDynamicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterDynamicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterExpressionAnimationSourcesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterExpressionAnimationSourcesPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollPresenterExpressionAnimationSourcesPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterExpressionAnimationSourcesPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollPresenterExpressionAnimationSourcesPage ()
void | btnClearFullLog_Click (object sender, RoutedEventArgs e)
void | btnGetFullLog_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenter_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollPresenterExpressionAnimationSourcesPage_Loaded (object sender, RoutedEventArgs e)
void | SetLayoutCompleted ()
void | SetupScrollbars ()
void | UpdateScrollbars ()

Private Attributes

List< string > | fullLogs = new List<string>()
ExpressionAnimation | hIndicatorOffsetExpression
ExpressionAnimation | hIndicatorWidthExpression
Visual | hScrollBarVisual
SpriteVisual | hScrollIndicatorSpriteVisual
Visual | hScrollIndicatorVisual
bool | isLoggingMessages = false
int | layoutCompletedCount = 0
ExpressionAnimation | vIndicatorHeightExpression
ExpressionAnimation | vIndicatorOffsetExpression
Visual | vScrollBarVisual
SpriteVisual | vScrollIndicatorSpriteVisual
Visual | vScrollIndicatorVisual

Detailed Description

Definition at line 19 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterExpressionAnimationSourcesPage ( ) [inline]

Definition at line 36 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            InitializeComponent();
            Loaded += ScrollPresenterExpressionAnimationSourcesPage_Loaded;
            scrollPresenter.SizeChanged += ScrollPresenter_SizeChanged;

            ChkLogScrollPresenterMessages_Checked(null, null);
        }

~ScrollPresenterExpressionAnimationSourcesPage ( ) [inline, private]

Definition at line 45 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
        }

Member Function Documentation

void btnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 226 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            this.fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
        }

void btnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 218 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            foreach (string log in this.fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 163 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            if (!isLoggingMessages)
            {
                //Turn on info and verbose logging for the ScrollPresenter type:
                MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                isLoggingMessages = true;
            }
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 176 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            if (isLoggingMessages)
            {
                //Turn off info and verbose logging for the ScrollPresenter type:
                MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

                isLoggingMessages = false;
            }
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 189 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                this.fullLogs.Add("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 49 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ScrollPresenter_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 74 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            this.fullLogs.Add("ScrollPresenter_SizeChanged PreviousSize=" + e.PreviousSize + ", NewSize=" + e.NewSize);
            var ignored = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, UpdateScrollbars);

            // One additional SetLayoutCompleted call is required to declare the layout final
            txtLayoutCompleted.Text = "No";
            layoutCompletedCount++;
            ignored = this.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, SetLayoutCompleted);
        }

void ScrollPresenterExpressionAnimationSourcesPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            this.fullLogs.Add("ScrollPresenterExpressionAnimationSourcesPage_Loaded");
            var ignored = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, SetupScrollbars);
        }

void SetLayoutCompleted ( ) [inline, private]

Definition at line 57 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            this.fullLogs.Add("SetLayoutCompleted layoutCompletedCount=" + layoutCompletedCount);
            layoutCompletedCount--;

            if (layoutCompletedCount == 0)
            {
                txtLayoutCompleted.Text = "Yes";
            }
        }

void SetupScrollbars ( ) [inline, private]

Definition at line 85 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            this.fullLogs.Add("SetupScrollbars");

            hScrollIndicatorVisual = ElementCompositionPreview.GetElementVisual(hScrollIndicator);
            vScrollIndicatorVisual = ElementCompositionPreview.GetElementVisual(vScrollIndicator);
            hScrollBarVisual = ElementCompositionPreview.GetElementVisual(hScrollBar);
            vScrollBarVisual = ElementCompositionPreview.GetElementVisual(vScrollBar);

            hScrollIndicatorSpriteVisual = hScrollIndicatorVisual.Compositor.CreateSpriteVisual();
            vScrollIndicatorSpriteVisual = vScrollIndicatorVisual.Compositor.CreateSpriteVisual();

            CompositionColorBrush brush = hScrollIndicatorVisual.Compositor.CreateColorBrush(Microsoft.UI.Colors.Red);
            hScrollIndicatorSpriteVisual.Brush = brush;
            vScrollIndicatorSpriteVisual.Brush = brush;

            ElementCompositionPreview.SetElementChildVisual(hScrollIndicator, hScrollIndicatorSpriteVisual);
            ElementCompositionPreview.SetElementChildVisual(vScrollIndicator, vScrollIndicatorSpriteVisual);

            UpdateScrollbars();

            hIndicatorWidthExpression = hScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
                "Vector2(Max(20.0f, Min(hScrollBarVisual.Size.X , seas.Viewport.X * hScrollBarVisual.Size.X / Max(0.0001f, seas.Extent.X * seas.ZoomFactor))), 30.0f)");
            vIndicatorHeightExpression = vScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
                "Vector2(30.0f, Max(20.0f, Min(vScrollBarVisual.Size.Y, seas.Viewport.Y * vScrollBarVisual.Size.Y / Max(0.0001f, seas.Extent.Y * seas.ZoomFactor))))");
            hIndicatorWidthExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
            vIndicatorHeightExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
            hIndicatorWidthExpression.SetReferenceParameter("hScrollBarVisual", hScrollBarVisual);
            vIndicatorHeightExpression.SetReferenceParameter("vScrollBarVisual", vScrollBarVisual);
            hIndicatorOffsetExpression = hScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
                "Vector3(" +
                    "Max(0.0f, Min(hScrollBarVisual.Size.X - hScrollIndicatorSpriteVisual.Size.X, " +
                        "seas.Offset.X * (hScrollBarVisual.Size.X - hScrollIndicatorSpriteVisual.Size.X) / Max(1.0f, (seas.Extent.X * seas.ZoomFactor - seas.Viewport.X))))," +
                    "0.0f," +
                    "0.0f)");
            vIndicatorOffsetExpression = vScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
                "Vector3(" +
                    "0.0f," +
                    "Max(0.0f, Min(vScrollBarVisual.Size.Y - vScrollIndicatorSpriteVisual.Size.Y, " +
                        "seas.Offset.Y * (vScrollBarVisual.Size.Y - vScrollIndicatorSpriteVisual.Size.Y) / Max(1.0f, (seas.Extent.Y * seas.ZoomFactor - seas.Viewport.Y))))," +
                    "0.0f)");
            hIndicatorOffsetExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
            vIndicatorOffsetExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
            hIndicatorOffsetExpression.SetReferenceParameter("hScrollBarVisual", hScrollBarVisual);
            vIndicatorOffsetExpression.SetReferenceParameter("vScrollBarVisual", vScrollBarVisual);
            hIndicatorOffsetExpression.SetReferenceParameter("hScrollIndicatorSpriteVisual", hScrollIndicatorSpriteVisual);
            vIndicatorOffsetExpression.SetReferenceParameter("vScrollIndicatorSpriteVisual", vScrollIndicatorSpriteVisual);

            hScrollIndicatorSpriteVisual.StartAnimation("Size", hIndicatorWidthExpression);
            vScrollIndicatorSpriteVisual.StartAnimation("Size", vIndicatorHeightExpression);
            hScrollIndicatorVisual.StartAnimation("Offset", hIndicatorOffsetExpression);
            vScrollIndicatorVisual.StartAnimation("Offset", vIndicatorOffsetExpression);
        }

void UpdateScrollbars ( ) [inline, private]

Definition at line 139 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

        {
            this.fullLogs.Add("UpdateScrollbars");

            if (hScrollIndicatorSpriteVisual == null || hScrollIndicatorVisual == null || hScrollBarVisual == null ||
                vScrollIndicatorSpriteVisual == null || vScrollIndicatorVisual == null || vScrollBarVisual == null)
            {
                return;
            }

            Vector2 viewport;
            CompositionGetValueStatus cgvs = scrollPresenter.ExpressionAnimationSources.Properties.TryGetVector2("Viewport", out viewport);
            txtViewport.Text = cgvs.ToString() + ", " + viewport.ToString();

            Vector2 extent;
            cgvs = scrollPresenter.ExpressionAnimationSources.Properties.TryGetVector2("Extent", out extent);
            txtExtent.Text = cgvs.ToString() + ", " + extent.ToString();

            txtBarVisualWidth.Text = hScrollBarVisual.Size.X.ToString();
            txtIndicatorWidth.Text = (viewport.X * hScrollBarVisual.Size.X / Math.Max(1.0f, extent.X)).ToString();
            txtBarVisualHeight.Text = vScrollBarVisual.Size.Y.ToString();
            txtIndicatorHeight.Text = (viewport.Y * vScrollBarVisual.Size.Y / Math.Max(1.0f, extent.Y)).ToString();
        }

Member Data Documentation

List<string> fullLogs = new List<string>() [private]

Definition at line 23 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

ExpressionAnimation hIndicatorOffsetExpression [private]

Definition at line 28 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

ExpressionAnimation hIndicatorWidthExpression [private]

Definition at line 27 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

Visual hScrollBarVisual [private]

Definition at line 24 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

SpriteVisual hScrollIndicatorSpriteVisual [private]

Definition at line 26 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

Visual hScrollIndicatorVisual [private]

Definition at line 25 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

bool isLoggingMessages = false [private]

Definition at line 21 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

int layoutCompletedCount = 0 [private]

Definition at line 22 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

ExpressionAnimation vIndicatorHeightExpression [private]

Definition at line 33 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

ExpressionAnimation vIndicatorOffsetExpression [private]

Definition at line 34 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

Visual vScrollBarVisual [private]

Definition at line 30 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

SpriteVisual vScrollIndicatorSpriteVisual [private]

Definition at line 32 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

Visual vScrollIndicatorVisual [private]

Definition at line 31 of file ScrollPresenterExpressionAnimationSourcesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterExpressionAnimationSourcesPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterLeakDetectionPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterLeakDetectionPage
Public Member Functions | Private Member Functions | Private Attributes

ScrollPresenterLeakDetectionPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterLeakDetectionPage ()

Private Member Functions

void | BtnAddScrollPresenter_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | BtnCreateScrollPresenter_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | BtnDeleteScrollPresenter_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | BtnGarbageCollect_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | BtnRemoveScrollPresenter_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)

Private Attributes

ScrollPresenter | scrollPresenter = null

Detailed Description

Definition at line 15 of file ScrollPresenterLeakDetectionPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterLeakDetectionPage ( ) [inline]

Definition at line 19 of file ScrollPresenterLeakDetectionPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void BtnAddScrollPresenter_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 45 of file ScrollPresenterLeakDetectionPage.xaml.cs.

        {
            Grid.SetRow(scrollPresenter, 5);
            grid.Children.Add(scrollPresenter);

            btnAddScrollPresenter.IsEnabled = false;
            btnDeleteScrollPresenter.IsEnabled = false;
            btnRemoveScrollPresenter.IsEnabled = true;
        }

void BtnCreateScrollPresenter_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 24 of file ScrollPresenterLeakDetectionPage.xaml.cs.

        {
            scrollPresenter = new ScrollPresenter();
            scrollPresenter.Name = "dynamicScrollPresenter";
            scrollPresenter.Width = 300.0;
            scrollPresenter.Height = 400.0;
            scrollPresenter.Margin = new Thickness(1);
            scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.HotPink);
            scrollPresenter.VerticalAlignment = VerticalAlignment.Top;

            Rectangle rect = new Rectangle();
            rect.Width = 900.0;
            rect.Height = 1200.0;
            rect.Fill = new SolidColorBrush(Microsoft.UI.Colors.DarkRed);
            scrollPresenter.Content = rect;

            btnCreateScrollPresenter.IsEnabled = false;
            btnAddScrollPresenter.IsEnabled = true;
            btnDeleteScrollPresenter.IsEnabled = true;
        }

void BtnDeleteScrollPresenter_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 64 of file ScrollPresenterLeakDetectionPage.xaml.cs.

        {
            if (scrollPresenter == null || grid.Children.Count == 6)
                return;

            scrollPresenter.Content = null;
            scrollPresenter = null;

            btnDeleteScrollPresenter.IsEnabled = false;
            btnAddScrollPresenter.IsEnabled = false;
            btnCreateScrollPresenter.IsEnabled = true;
        }

void BtnGarbageCollect_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 77 of file ScrollPresenterLeakDetectionPage.xaml.cs.

        {
            System.GC.Collect();
            System.GC.WaitForPendingFinalizers();
        }

void BtnRemoveScrollPresenter_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file ScrollPresenterLeakDetectionPage.xaml.cs.

        {
            grid.Children.Remove(scrollPresenter);

            btnRemoveScrollPresenter.IsEnabled = false;
            btnAddScrollPresenter.IsEnabled = true;
            btnDeleteScrollPresenter.IsEnabled = true;
        }

Member Data Documentation

ScrollPresenter scrollPresenter = null [private]

Definition at line 17 of file ScrollPresenterLeakDetectionPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterLeakDetectionPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterManipulationModePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterManipulationModePage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollPresenterManipulationModePage Class Reference

List of all members.

Public Member Functions

ScrollPresenterManipulationModePage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollPresenterManipulationModePage ()
void | btnClearFullLog_Click (object sender, RoutedEventArgs e)
void | btnGetFullLog_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | CmbManipulationMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
ManipulationModes | ManipulationModeFromIndex (int index)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)

Private Attributes

List< string > | fullLogs = new List<string>()

Detailed Description

Definition at line 14 of file ScrollPresenterManipulationModePage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterManipulationModePage ( ) [inline]

Definition at line 18 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            this.InitializeComponent();

            scrollPresenter0.StateChanged += ScrollPresenter_StateChanged;
            scrollPresenter1.StateChanged += ScrollPresenter_StateChanged;
        }

~ScrollPresenterManipulationModePage ( ) [inline, private]

Definition at line 26 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
        }

Member Function Documentation

void btnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 135 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            this.fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
        }

void btnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 127 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            foreach (string log in this.fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 82 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            //Turn on info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 90 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            //Turn off info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void CmbManipulationMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 46 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            ComboBox cmb = sender as ComboBox;
            if (cmb == null)
                return;
            switch (cmb.Name)
            {
                case "cmbManipulationModeS1":
                    scrollPresenter1.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
                    break;
                case "cmbManipulationModeSP1":
                    stackPanel1.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
                    break;
                case "cmbManipulationModeS0":
                    scrollPresenter0.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
                    break;
                case "cmbManipulationModeSP0":
                    stackPanel0.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
                    break;
            }
        }

ManipulationModes ManipulationModeFromIndex ( int index ) [inline, private]

Definition at line 68 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            switch (index)
            {
                case 0:
                    return ManipulationModes.System;
                case 1:
                    return ManipulationModes.None;
                case 2:
                    return ManipulationModes.TranslateX;
            }
            return ManipulationModes.All;
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 98 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                this.fullLogs.Add("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 30 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 38 of file ScrollPresenterManipulationModePage.xaml.cs.

        {
            if (sender == scrollPresenter0)
                txtScrollPresenter0State.Text = "scrollPresenter0 " + scrollPresenter0.State.ToString();
            else if (sender == scrollPresenter1)
                txtScrollPresenter1State.Text = "scrollPresenter1 " + scrollPresenter1.State.ToString();
        }

Member Data Documentation

List<string> fullLogs = new List<string>() [private]

Definition at line 16 of file ScrollPresenterManipulationModePage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterManipulationModePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterMousePanningPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterMousePanningPage
Public Member Functions | Private Member Functions | Private Attributes

ScrollPresenterMousePanningPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterMousePanningPage ()

Private Member Functions

void | BtnClearEvents_Click (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | LogEvent (string log)
void | ScrollPresenter_PointerCanceled (object sender, PointerRoutedEventArgs e)
void | ScrollPresenter_PointerCaptureLost (object sender, PointerRoutedEventArgs e)
void | ScrollPresenter_PointerMoved (object sender, PointerRoutedEventArgs e)
void | ScrollPresenter_PointerPressed (object sender, PointerRoutedEventArgs e)
void | ScrollPresenter_PointerReleased (object sender, PointerRoutedEventArgs e)
void | StartConstantVelocityPan ()
void | StopConstantVelocityPan ()
void | StopMousePan ()

Private Attributes

bool | _isInConstantVelocityPan = false
bool | _isInMousePan = false
bool | _isMiddleButtonPressed = false
Point | _preConstantVelocityPanPosition
double | _preMousePanHorizontalOffset = 0.0
Point | _preMousePanPosition
double | _preMousePanVerticalOffset = 0.0

Detailed Description

Definition at line 14 of file ScrollPresenterMousePanningPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterMousePanningPage ( ) [inline]

Definition at line 24 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            InitializeComponent();

            btnClearEvents.Click += BtnClearEvents_Click;
            scrollPresenter.AddHandler(UIElement.PointerPressedEvent, new PointerEventHandler(ScrollPresenter_PointerPressed), true);
            scrollPresenter.AddHandler(UIElement.PointerReleasedEvent, new PointerEventHandler(ScrollPresenter_PointerReleased), true);
            scrollPresenter.AddHandler(UIElement.PointerMovedEvent, new PointerEventHandler(ScrollPresenter_PointerMoved), true);
            scrollPresenter.AddHandler(UIElement.PointerCanceledEvent, new PointerEventHandler(ScrollPresenter_PointerCanceled), true);
            scrollPresenter.AddHandler(UIElement.PointerCaptureLostEvent, new PointerEventHandler(ScrollPresenter_PointerCaptureLost), true);
        }

Member Function Documentation

void BtnClearEvents_Click | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 225 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            lstEvents.Items.Clear();
        }

void LogEvent ( string log ) [inline, private]

Definition at line 230 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            lstEvents.Items.Insert(0, log);
        }

void ScrollPresenter_PointerCanceled | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 178 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            LogEvent("Pointer canceled - id " + e.Pointer.PointerId);
            if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse)
            {
                if (_isInMousePan)
                {
                    StopMousePan();
                }
                else if (_isMiddleButtonPressed || _isInConstantVelocityPan)
                {
                    StopConstantVelocityPan();
                }
            }
        }

void ScrollPresenter_PointerCaptureLost | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 194 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            LogEvent("Pointer capture lost - id " + e.Pointer.PointerId);
        }

void ScrollPresenter_PointerMoved | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 138 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse)
            {
                Point position = e.GetCurrentPoint(scrollPresenter).Position;

                if (_isInMousePan)
                {
                    scrollPresenter.ScrollTo(
                        _preMousePanPosition.X - position.X + _preMousePanHorizontalOffset,
                        _preMousePanPosition.Y - position.Y + _preMousePanVerticalOffset,
                        new ScrollingScrollOptions(ScrollingAnimationMode.Disabled));
                }
                else
                {
                    if (_isMiddleButtonPressed)
                    {
                        if (Math.Abs(position.X - _preConstantVelocityPanPosition.X) >= 4.0 ||
                            Math.Abs(position.Y - _preConstantVelocityPanPosition.Y) >= 4.0)
                        {
                            if (!_isInConstantVelocityPan)
                            {
                                LogEvent("Pointer with pressed middle button moved to position " + position.ToString());
                                StartConstantVelocityPan();
                            }
                        }
                    }

                    if (_isInConstantVelocityPan)
                    {
                        Vector2 offsetsVelocity = new Vector2(
                            (float)(position.X - _preConstantVelocityPanPosition.X) / 2.0f,
                            (float)(position.Y - _preConstantVelocityPanPosition.Y) / 2.0f);

                        scrollPresenter.AddScrollVelocity(offsetsVelocity, inertiaDecayRate: Vector2.Zero);
                    }
                }
            }
        }

void ScrollPresenter_PointerPressed | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 36 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse &&
                e.KeyModifiers == Windows.System.VirtualKeyModifiers.None)
            {
                if (_isMiddleButtonPressed || _isInConstantVelocityPan)
                {
                    (sender as UIElement).ReleasePointerCapture(e.Pointer);
                    StopConstantVelocityPan();
                    return;
                }

                if (!e.Handled)
                {
                    PointerPointProperties ppp = e.GetCurrentPoint(null).Properties;
                    Point position = e.GetCurrentPoint(scrollPresenter).Position;

                    if (ppp.IsLeftButtonPressed)
                    {
                        if (e.OriginalSource == rect)
                        {
                            // 'rect' element is meant to be dragged with the mouse using its
                            // left button, so do not initiate a mouse pan.
                            return;
                        }

                        if ((sender as UIElement).CapturePointer(e.Pointer))
                        {
                            Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
                                Windows.UI.Core.CoreCursorType.Hand, 0);
                            _isInMousePan = true;
                            _preMousePanPosition = position;
                            _preMousePanHorizontalOffset = scrollPresenter.HorizontalOffset;
                            _preMousePanVerticalOffset = scrollPresenter.VerticalOffset;
                            LogEvent("Pointer capture initiated @ position " + _preMousePanPosition.ToString());
                        }
                        else
                        {
                            LogEvent("Pointer capture failed");
                        }
                    }
                    else if (ppp.IsMiddleButtonPressed)
                    {
                        if ((sender as UIElement).CapturePointer(e.Pointer))
                        {
                            Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
                                Windows.UI.Core.CoreCursorType.SizeAll, 0);
                            _isMiddleButtonPressed = true;
                            _preConstantVelocityPanPosition = position;
                            fiConstantVelocityPanCenter.Visibility = Visibility.Visible;
                            fiConstantVelocityPanCenter.Margin = new Thickness(
                                position.X - 6,
                                position.Y - 6,
                                4, 4);
                            LogEvent("Middle button pressed @ position " + _preConstantVelocityPanPosition.ToString());
                        }
                        else
                        {
                            LogEvent("Pointer capture failed");
                        }
                    }
                }
            }
        }

void ScrollPresenter_PointerReleased | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse)
            {
                PointerPointProperties ppp = e.GetCurrentPoint(null).Properties;
                Point position = e.GetCurrentPoint(scrollPresenter).Position;

                if (_isInMousePan && !ppp.IsLeftButtonPressed)
                {
                    (sender as UIElement).ReleasePointerCapture(e.Pointer);
                    StopMousePan();
                    LogEvent("Pointer capture released @ position " + position.ToString());
                }
                else if (_isMiddleButtonPressed && !ppp.IsMiddleButtonPressed)
                {
                    _isMiddleButtonPressed = false;
                    LogEvent("Middle button released @ position " + position.ToString());
                    if (Math.Abs(position.X - _preConstantVelocityPanPosition.X) >= 4.0 ||
                        Math.Abs(position.Y - _preConstantVelocityPanPosition.Y) >= 4.0)
                    {
                        if (_isInConstantVelocityPan)
                        {
                            (sender as UIElement).ReleasePointerCapture(e.Pointer);
                            StopConstantVelocityPan();
                        }
                    }
                    else if (!_isInConstantVelocityPan)
                    {
                        // Unfortunately mouse capture is automatically lost and apparently cannot
                        // be regained. Xaml framework should allow retention of mouse capture
                        // beyond the PointerReleased event to correctly support middle-button-based panning.
                        StartConstantVelocityPan();
                    }
                }
            }
        }

void StartConstantVelocityPan ( ) [inline, private]

Definition at line 208 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            _isInConstantVelocityPan = true;
            LogEvent("Constant velocity pan started");
        }

void StopConstantVelocityPan ( ) [inline, private]

Definition at line 214 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
                Windows.UI.Core.CoreCursorType.Arrow, 0);
            _isInConstantVelocityPan = false;
            _isMiddleButtonPressed = false;
            fiConstantVelocityPanCenter.Visibility = Visibility.Collapsed;
            scrollPresenter.ScrollBy(0, 0);
            LogEvent("Constant velocity pan stopped");
        }

void StopMousePan ( ) [inline, private]

Definition at line 199 of file ScrollPresenterMousePanningPage.xaml.cs.

        {
            Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
                Windows.UI.Core.CoreCursorType.Arrow, 0);
            _isInMousePan = false;
            _preMousePanHorizontalOffset = 0.0;
            _preMousePanVerticalOffset = 0.0;
        }

Member Data Documentation

bool _isInConstantVelocityPan = false [private]

Definition at line 17 of file ScrollPresenterMousePanningPage.xaml.cs.

bool _isInMousePan = false [private]

Definition at line 19 of file ScrollPresenterMousePanningPage.xaml.cs.

bool _isMiddleButtonPressed = false [private]

Definition at line 16 of file ScrollPresenterMousePanningPage.xaml.cs.

Point _preConstantVelocityPanPosition [private]

Definition at line 18 of file ScrollPresenterMousePanningPage.xaml.cs.

double _preMousePanHorizontalOffset = 0.0 [private]

Definition at line 21 of file ScrollPresenterMousePanningPage.xaml.cs.

Point _preMousePanPosition [private]

Definition at line 20 of file ScrollPresenterMousePanningPage.xaml.cs.

double _preMousePanVerticalOffset = 0.0 [private]

Definition at line 22 of file ScrollPresenterMousePanningPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterMousePanningPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterPage
Public Member Functions | Private Member Functions

ScrollPresenterPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterPage ()

Private Member Functions

void | BtnSetOffsetsChangeVelocityParameters_Click (object sender, RoutedEventArgs e)
void | BtnSetZoomFactorChangeVelocityParameters_Click (object sender, RoutedEventArgs e)
void | CmbScrollPresenterOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 17 of file ScrollPresenterPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterPage ( ) [inline]

Definition at line 19 of file ScrollPresenterPage.xaml.cs.

        {
            // Some pages we will navigate to will need the resources, so lets load them now!
            App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

            LogController.InitializeLogging();

            this.InitializeComponent();

            navigateToSimpleContents.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresentersWithSimpleContentsPage), 0); };
            navigateToDynamic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterDynamicPage), 0); };
            navigateToExpressionAnimationSources.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterExpressionAnimationSourcesPage), 0); };
            navigateToChainingAndRailing.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterChainingAndRailingPage), 0); };
            navigateToStackPanelAnchoring.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterStackPanelAnchoringPage), 0); };
            navigateToRepeaterAnchoring.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterRepeaterAnchoringPage), 0); };
            navigateToScrollSnapPoints.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterScrollSnapPointsPage), 0); };
            navigateToZoomSnapPoints.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterZoomSnapPointsPage), 0); };
            navigateToBringIntoView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterBringIntoViewPage), 0); };
            navigateToManipulationMode.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterManipulationModePage), 0); };
            navigateToAccessibility.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterAccessibilityPage), 0); };
            navigateToSimpleScrollControllers.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterWithSimpleScrollControllersPage), 0); };
            navigateToCompositionScrollControllers.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterWithCompositionScrollControllersPage), 0); };
            navigateToBiDirectionalScrollController.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterWithBiDirectionalScrollControllerPage), 0); };
            navigateToLeakDetection.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterLeakDetectionPage), 0); };
            navigateToMousePanning.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollPresenterMousePanningPage), 0); };

            try
            {
                int millisecondsPerUnit;
                int minMilliseconds;
                int maxMilliseconds;

                ScrollPresenterTestHooks.GetOffsetsChangeVelocityParameters(
                    out millisecondsPerUnit,
                    out minMilliseconds,
                    out maxMilliseconds);

                txtOffsetsChangeMillisecondsPerUnit.Text = millisecondsPerUnit.ToString();
                txtOffsetsChangeMinMilliseconds.Text = minMilliseconds.ToString();
                txtOffsetsChangeMaxMilliseconds.Text = maxMilliseconds.ToString();

                ScrollPresenterTestHooks.GetZoomFactorChangeVelocityParameters(
                    out millisecondsPerUnit,
                    out minMilliseconds,
                    out maxMilliseconds);

                txtZoomFactorChangeMillisecondsPerUnit.Text = millisecondsPerUnit.ToString();
                txtZoomFactorChangeMinMilliseconds.Text = minMilliseconds.ToString();
                txtZoomFactorChangeMaxMilliseconds.Text = maxMilliseconds.ToString();

            }
            catch (Exception ex)
            {
                tbException.Text = ex.ToString();
            }
        }

Member Function Documentation

void BtnSetOffsetsChangeVelocityParameters_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 83 of file ScrollPresenterPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetOffsetsChangeVelocityParameters(
                    Convert.ToInt32(txtOffsetsChangeMillisecondsPerUnit.Text),
                    Convert.ToInt32(txtOffsetsChangeMinMilliseconds.Text),
                    Convert.ToInt32(txtOffsetsChangeMaxMilliseconds.Text));
            }
            catch (Exception ex)
            {
                tbException.Text = ex.ToString();
            }
        }

void BtnSetZoomFactorChangeVelocityParameters_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file ScrollPresenterPage.xaml.cs.

        {
            try
            {
                ScrollPresenterTestHooks.SetZoomFactorChangeVelocityParameters(
                    Convert.ToInt32(txtZoomFactorChangeMillisecondsPerUnit.Text),
                    Convert.ToInt32(txtZoomFactorChangeMinMilliseconds.Text),
                    Convert.ToInt32(txtZoomFactorChangeMaxMilliseconds.Text));
            }
            catch (Exception ex)
            {
                tbException.Text = ex.ToString();
            }
        }

void CmbScrollPresenterOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 76 of file ScrollPresenterPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                "ScrollPresenter",
                cmbScrollPresenterOutputDebugStringLevel.SelectedIndex == 1 || cmbScrollPresenterOutputDebugStringLevel.SelectedIndex == 2,
                cmbScrollPresenterOutputDebugStringLevel.SelectedIndex == 2);
        }

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterRepeaterAnchoringPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterRepeaterAnchoringPage
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes

ScrollPresenterRepeaterAnchoringPage Class Reference

List of all members.

Classes

class | QueuedOperation
class | SampleDataSource

Public Member Functions

ScrollPresenterRepeaterAnchoringPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Types

enum | QueuedOperationType { Insert, Remove, Replace, Reset }

Private Member Functions

void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearScrollPresenterEvents_Click (object sender, RoutedEventArgs e)
void | BtnGetAnchorElement_Click (object sender, RoutedEventArgs e)
void | BtnGetCurrentAnchor_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnInsert_Click (object sender, RoutedEventArgs e)
void | BtnInvalidateArrange_Click (object sender, RoutedEventArgs e)
void | BtnRemove_Click (object sender, RoutedEventArgs e)
void | BtnReplace_Click (object sender, RoutedEventArgs e)
void | BtnReset_Click (object sender, RoutedEventArgs e)
void | BtnSetAnchorElement_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkUseAnimator_Checked (object sender, RoutedEventArgs e)
void | ChkUseAnimator_Unchecked (object sender, RoutedEventArgs e)
void | CmbAnchorElement_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbItemHeightMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ExecuteQueuedOperations ()
void | ExecuteTriggerableOperations ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenter_AnchorRequested (ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenterRepeaterAnchoringPage_Loaded (object sender, RoutedEventArgs e)
void | ScrollPresenterTestHooks_AnchorEvaluated (ScrollPresenter sender, ScrollPresenterTestHooksAnchorEvaluatedEventArgs args)
void | Timer_Tick (object sender, object e)
void | UpdateHorizontalAnchorRatio ()
void | UpdateRaiseAnchorNotifications (bool raiseAnchorNotifications)
void | UpdateVerticalAnchorRatio ()

Private Attributes

UIElement | anchorElement = null
Object | asyncEventReportingLock = new Object()
Border | currentAnchor = null
SampleDataSource | dataSource = null
double | lastScrollPresenterOffset = 0.0
List< string > | lstAsyncEventMessage = new List<string>()
List< QueuedOperation > | lstQueuedOperations = new List<QueuedOperation>()
List< QueuedOperation > | lstTriggeredOperations = new List<QueuedOperation>()
DispatcherTimer | timer = new DispatcherTimer()

Detailed Description

Definition at line 20 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

Member Enumeration Documentation

enum QueuedOperationType [private]
Enumerator:
Insert
Remove
Replace
Reset

Definition at line 706 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            Insert,
            Remove,
            Replace,
            Reset,
        }

Constructor & Destructor Documentation

ScrollPresenterRepeaterAnchoringPage ( ) [inline]

Definition at line 32 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            InitializeComponent();

            Loaded += ScrollPresenterRepeaterAnchoringPage_Loaded;

            timer.Interval = new TimeSpan(0, 0, 2 /*sec*/);
            timer.Tick += Timer_Tick;

            cnsAnchorPoint.Width = scrollPresenter.Width;
            cnsAnchorPoint.Height = scrollPresenter.Height;
            repeater.ItemTemplate = elementFactory;
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 684 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                lstAsyncEventMessage.Add(asyncEventMessage);

                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 694 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstScrollPresenterEvents.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 503 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearScrollPresenterEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 498 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            lstScrollPresenterEvents.Items.Clear();
        }

void BtnGetAnchorElement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 412 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                string asyncEventMessage = "AnchorElement=";

                if (anchorElement == null)
                {
                    cmbAnchorElement.SelectedIndex = 0;
                    asyncEventMessage += "null";
                }
                else if (anchorElement == scrollPresenter)
                {
                    cmbAnchorElement.SelectedIndex = 1;
                    asyncEventMessage += "scrollPresenter";
                }
                else if (anchorElement == tblCollapsedAnchorElement)
                {
                    cmbAnchorElement.SelectedIndex = 2;
                    asyncEventMessage += "collapsed";
                }
                else if (anchorElement == border)
                {
                    cmbAnchorElement.SelectedIndex = 3;
                    asyncEventMessage += "border";
                }
                else
                {
                    cmbAnchorElement.SelectedIndex = 4;
                    asyncEventMessage += "item";
                }
                AppendAsyncEventMessage(asyncEventMessage);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetCurrentAnchor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 390 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.CurrentAnchor == null)
                {
                    txtCurrentAnchor.Text = "null";
                }
                else
                {
                    FrameworkElement currentAnchorAsFE = scrollPresenter.CurrentAnchor as FrameworkElement;

                    txtCurrentAnchor.Text = currentAnchorAsFE == null ? "UIElement" : currentAnchorAsFE.Name;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 354 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            UpdateHorizontalAnchorRatio();
        }

void BtnGetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 372 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            UpdateVerticalAnchorRatio();
        }

void BtnInsert_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 119 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        dataSource.Insert(int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false);
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Insert, 0, 0, int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
                        AppendAsyncEventMessage("Queued Insert NewIndex=" + txtNewStartIndex.Text + ", NewCount=" + txtNewCount.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Insert, 0, 0, int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
                        AppendAsyncEventMessage("Triggerable Insert NewIndex=" + txtNewStartIndex.Text + ", NewCount=" + txtNewCount.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnInvalidateArrange_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 508 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            scrollPresenter.InvalidateArrange();
        }

void BtnRemove_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 146 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        dataSource.Remove(int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), tglResetMode.IsChecked ?? false);
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Remove, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, 0, tglResetMode.IsChecked ?? false));
                        AppendAsyncEventMessage("Queued Remove OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Remove, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, 0, tglResetMode.IsChecked ?? false));
                        AppendAsyncEventMessage("Triggerable Remove OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnReplace_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 173 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        dataSource.Replace(int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false);
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Replace, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
                        AppendAsyncEventMessage("Queued Replace OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text + ", NewCount=" + txtNewCount.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Replace, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
                        AppendAsyncEventMessage("Triggerable Replace OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text + ", NewCount=" + txtNewCount.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnReset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 200 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        dataSource.Reset();
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Reset, 0, 0, 0, 0, true));
                        AppendAsyncEventMessage("Queued Reset");
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Reset, 0, 0, 0, 0, true));
                        AppendAsyncEventMessage("Triggerable Reset");
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetAnchorElement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 452 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbAnchorElement.SelectedIndex)
                {
                    case 0:
                        anchorElement = null;
                        break;
                    case 1:
                        anchorElement = scrollPresenter;
                        break;
                    case 2:
                        anchorElement = tblCollapsedAnchorElement;
                        break;
                    case 3:
                        anchorElement = border;
                        break;
                    case 4:
                        anchorElement = repeater.TryGetElement(int.Parse(txtItemIndex.Text));
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 359 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                scrollPresenter.HorizontalAnchorRatio = Convert.ToDouble(txtHorizontalAnchorRatio.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 377 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                scrollPresenter.VerticalAnchorRatio = Convert.ToDouble(txtVerticalAnchorRatio.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 562 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 568 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 523 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 529 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkUseAnimator_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 513 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            repeater.ItemTransitionProvider = new Utils.DefaultItemCollectionTransitionProvider();
        }

void ChkUseAnimator_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 518 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            repeater.ItemTransitionProvider = null;
        }

void CmbAnchorElement_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 482 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            if (tblItemIndex != null && txtItemIndex != null && cmbAnchorElement != null)
                tblItemIndex.Visibility = txtItemIndex.Visibility = cmbAnchorElement.SelectedIndex == 4 ? Visibility.Visible : Visibility.Collapsed;
        }

void CmbItemHeightMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 86 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            if (repeater != null)
            {
                switch (cmbItemHeightMode.SelectedIndex)
                {
                    case 0: // Random
                        Random rand = new Random(123);
                        dataSource = new SampleDataSource(
                            this,
                            Enumerable.Range(0, 32).Select(i => new DataItem(string.Format("Item #{0}", i), 100 + rand.Next(0, 200))).ToList());
                        break;
                    case 1: // Increasing
                        dataSource = new SampleDataSource(
                            this,
                            Enumerable.Range(0, 32).Select(i => new DataItem(string.Format("Item #{0}", i), 100 + i * 10)).ToList());
                        break;
                    case 2: // Constant
                        dataSource = new SampleDataSource(
                            this,
                            Enumerable.Range(0, 32).Select(i => new DataItem(string.Format("Item #{0}", i), 100)).ToList());
                        break;
                }
                repeater.ItemsSource = dataSource;
            }
        }

void ExecuteQueuedOperations ( ) [inline, private]

Definition at line 227 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                while (lstQueuedOperations.Count > 0)
                {
                    QueuedOperation qo = lstQueuedOperations[0];

                    switch (qo.Type)
                    {
                        case QueuedOperationType.Insert:
                            AppendAsyncEventMessage("Unqueuing Insert NewIndex=" + qo.NewIndex + ", NewCount=" + qo.NewCount);
                            dataSource.Insert(qo.NewIndex, qo.NewCount, qo.Reset);
                            break;
                        case QueuedOperationType.Remove:
                            AppendAsyncEventMessage("Unqueuing Remove OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount);
                            dataSource.Remove(qo.OldIndex, qo.OldCount, qo.Reset);
                            break;
                        case QueuedOperationType.Replace:
                            AppendAsyncEventMessage("Unqueuing Replace OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount + ", NewCount=" + qo.NewCount);
                            dataSource.Replace(qo.OldIndex, qo.OldCount, qo.NewCount, qo.Reset);
                            break;
                        case QueuedOperationType.Reset:
                            AppendAsyncEventMessage("Unqueuing Reset");
                            dataSource.Reset();
                            break;
                    }

                    lstQueuedOperations.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ExecuteTriggerableOperations ( ) [inline, private]

Definition at line 265 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                while (lstTriggeredOperations.Count > 0)
                {
                    QueuedOperation qo = lstTriggeredOperations[0];

                    switch (qo.Type)
                    {
                        case QueuedOperationType.Insert:
                            AppendAsyncEventMessage("Triggering Insert NewIndex=" + qo.NewIndex + ", NewCount=" + qo.NewCount);
                            dataSource.Insert(qo.NewIndex, qo.NewCount, qo.Reset);
                            break;
                        case QueuedOperationType.Remove:
                            AppendAsyncEventMessage("Triggering Remove OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount);
                            dataSource.Remove(qo.OldIndex, qo.OldCount, qo.Reset);
                            break;
                        case QueuedOperationType.Replace:
                            AppendAsyncEventMessage("Triggering Replace OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount + ", NewCount=" + qo.NewCount);
                            dataSource.Replace(qo.OldIndex, qo.OldCount, qo.NewCount, qo.Reset);
                            break;
                        case QueuedOperationType.Reset:
                            AppendAsyncEventMessage("Triggering Reset");
                            dataSource.Reset();
                            break;
                    }

                    lstTriggeredOperations.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 574 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 46 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            UpdateRaiseAnchorNotifications(false /*raiseAnchorNotifications*/);

            base.OnNavigatedFrom(e);
        }

void ScrollPresenter_AnchorRequested | ( | ScrollPresenter | sender,
 |  | ScrollingAnchorRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 331 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                if (chkLogScrollPresenterEvents.IsChecked == true)
                {
                    IList<UIElement> anchorCandidates = args.AnchorCandidates;

                    AppendAsyncEventMessage("AnchorRequested anchor=" + (args.AnchorElement == null ? "null" : "non-null") + ", count=" + anchorCandidates.Count);
                }

                args.AnchorElement = anchorElement;
            }
            catch (Exception ex)
            {
                if (string.IsNullOrEmpty(txtExceptionReport.Text))
                {
                    txtExceptionReport.Text = ex.ToString();
                    lstScrollPresenterEvents.Items.Add(ex.ToString());
                }
            }
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 303 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            AppendAsyncEventMessage("ExtentChanged ExtentWidth=" + sender.ExtentWidth.ToString() + ", ExtentHeight=" + sender.ExtentHeight.ToString());
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 308 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            AppendAsyncEventMessage("StateChanged " + sender.State.ToString());
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 313 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset.ToString() + ", S=" + sender.ZoomFactor.ToString());
            }

            double newScrollPresenterOffset = scrollPresenter.VerticalOffset;

            if (lstTriggeredOperations.Count > 0 &&
                ((lastScrollPresenterOffset <= 350.0 && newScrollPresenterOffset > 350.0) || (lastScrollPresenterOffset >= 350.0 && newScrollPresenterOffset < 350.0)))
            {
                ExecuteTriggerableOperations();
            }

            lastScrollPresenterOffset = newScrollPresenterOffset;
        }

void ScrollPresenterRepeaterAnchoringPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            try
            {
                if (chkLogScrollPresenterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
                }

                UpdateRaiseAnchorNotifications(true /*raiseAnchorNotifications*/);

                UpdateHorizontalAnchorRatio();
                UpdateVerticalAnchorRatio();

                if (chkLogScrollPresenterEvents.IsChecked == true)
                {
                    scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                }
                scrollPresenter.AnchorRequested += ScrollPresenter_AnchorRequested;
                scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenterTestHooks_AnchorEvaluated | ( | ScrollPresenter | sender,
 |  | ScrollPresenterTestHooksAnchorEvaluatedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 606 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            string anchorName;
            Border newAnchor = null;

            if (args.AnchorElement == null)
            {
                anchorName = "null";
            }
            else
            {
                if (args.AnchorElement is FrameworkElement)
                {
                    FrameworkElement anchorElementAsFE = args.AnchorElement as FrameworkElement;

                    if (string.IsNullOrWhiteSpace(anchorElementAsFE.Name))
                        anchorName = "unnamed-FE";
                    else
                        anchorName = anchorElementAsFE.Name;

                    newAnchor = anchorElementAsFE as Border;
                }
                else
                {
                    anchorName = "UIE";
                }
            }

            if (newAnchor != currentAnchor)
            {
                if (currentAnchor != null)
                {
                    currentAnchor.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
                }
                if (newAnchor != null)
                {
                    newAnchor.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Orange);
                }
                currentAnchor = newAnchor;
            }

            if (double.IsNaN(args.ViewportAnchorPointHorizontalOffset) && double.IsNaN(args.ViewportAnchorPointVerticalOffset))
            {
                cnsAnchorPoint.Visibility = Visibility.Collapsed;
            }
            else
            {
                cnsAnchorPoint.Visibility = Visibility.Visible;

                if (double.IsNaN(args.ViewportAnchorPointHorizontalOffset))
                {
                    rectAnchorPoint.Width = scrollPresenter.Width;
                    Canvas.SetLeft(rectAnchorPoint, 0);
                }
                else
                {
                    rectAnchorPoint.Width = double.IsNaN(args.ViewportAnchorPointVerticalOffset) ? 2 : 4;
                    Canvas.SetLeft(rectAnchorPoint, args.ViewportAnchorPointHorizontalOffset * scrollPresenter.ZoomFactor - scrollPresenter.HorizontalOffset - rectAnchorPoint.Width / 2);
                }

                if (double.IsNaN(args.ViewportAnchorPointVerticalOffset))
                {
                    rectAnchorPoint.Height = scrollPresenter.Height;
                    Canvas.SetTop(rectAnchorPoint, 0);
                }
                else
                {
                    rectAnchorPoint.Height = double.IsNaN(args.ViewportAnchorPointHorizontalOffset) ? 2 : 4;
                    Canvas.SetTop(rectAnchorPoint, args.ViewportAnchorPointVerticalOffset * scrollPresenter.ZoomFactor - scrollPresenter.VerticalOffset - rectAnchorPoint.Height / 2);
                }
            }

            if (chkLogScrollPresenterAnchorNotifications.IsChecked == true)
            {
                AppendAsyncEventMessage("  AnchorEvaluated: s:" + sender.Name + ", a:" + anchorName + ", ap:(" + (int)args.ViewportAnchorPointHorizontalOffset + ", " + (int)args.ViewportAnchorPointVerticalOffset + ")");
            }
        }

void Timer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 113 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            timer.Stop();
            ExecuteQueuedOperations();
        }

void UpdateHorizontalAnchorRatio ( ) [inline, private]

Definition at line 488 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            txtHorizontalAnchorRatio.Text = scrollPresenter.HorizontalAnchorRatio.ToString();
        }

void UpdateRaiseAnchorNotifications ( bool raiseAnchorNotifications ) [inline, private]

Definition at line 535 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            if (raiseAnchorNotifications)
            {
                if (!ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
                {
                    ScrollPresenterTestHooks.AreAnchorNotificationsRaised = true;
                    ScrollPresenterTestHooks.AnchorEvaluated += ScrollPresenterTestHooks_AnchorEvaluated;
                }
            }
            else
            {
                if (ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
                {
                    ScrollPresenterTestHooks.AreAnchorNotificationsRaised = false;
                    ScrollPresenterTestHooks.AnchorEvaluated -= ScrollPresenterTestHooks_AnchorEvaluated;
                }

                if (currentAnchor != null)
                {
                    currentAnchor.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
                    currentAnchor = null;
                }
                cnsAnchorPoint.Visibility = Visibility.Collapsed;
            }
        }

void UpdateVerticalAnchorRatio ( ) [inline, private]

Definition at line 493 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

        {
            txtVerticalAnchorRatio.Text = scrollPresenter.VerticalAnchorRatio.ToString();
        }

Member Data Documentation

UIElement anchorElement = null [private]

Definition at line 29 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

Object asyncEventReportingLock = new Object() [private]

Definition at line 24 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

Border currentAnchor = null [private]

Definition at line 28 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

SampleDataSource dataSource = null [private]

Definition at line 22 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

double lastScrollPresenterOffset = 0.0 [private]

Definition at line 30 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 25 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

List<QueuedOperation> lstQueuedOperations = new List<QueuedOperation>() [private]

Definition at line 26 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

List<QueuedOperation> lstTriggeredOperations = new List<QueuedOperation>() [private]

Definition at line 27 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

DispatcherTimer timer = new DispatcherTimer() [private]

Definition at line 23 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterRepeaterAnchoringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterRepeaterAnchoringPage::QueuedOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterRepeaterAnchoringPage
  • ScrollPresenterRepeaterAnchoringPage::QueuedOperation
Public Member Functions | Properties

ScrollPresenterRepeaterAnchoringPage::QueuedOperation Class Reference

List of all members.

Public Member Functions

QueuedOperation (QueuedOperationType type, int oldIndex, int oldCount, int newIndex, int newCount, bool reset)

Properties

int | NewCount [get, set]
int | NewIndex [get, set]
int | OldCount [get, set]
int | OldIndex [get, set]
bool | Reset [get, set]
QueuedOperationType | Type [get, set]

Detailed Description

Definition at line 714 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

Constructor & Destructor Documentation

QueuedOperation | ( | QueuedOperationType | type,
 |  | int | oldIndex,
 |  | int | oldCount,
 |  | int | newIndex,
 |  | int | newCount,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 716 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                this.Type = type;
                this.OldIndex = oldIndex;
                this.OldCount = oldCount;
                this.NewIndex = newIndex;
                this.NewCount = newCount;
            }

Property Documentation

int NewCount [get, set]

Definition at line 729 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

int NewIndex [get, set]

Definition at line 727 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

int OldCount [get, set]

Definition at line 728 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

int OldIndex [get, set]

Definition at line 726 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

bool Reset [get, set]

Definition at line 730 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

QueuedOperationType Type [get, set]

Definition at line 725 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterRepeaterAnchoringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterRepeaterAnchoringPage::SampleDataSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterRepeaterAnchoringPage
  • ScrollPresenterRepeaterAnchoringPage::SampleDataSource
Public Member Functions | Protected Member Functions | Properties | Private Attributes

ScrollPresenterRepeaterAnchoringPage::SampleDataSource Class Reference

Inherits Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping.

List of all members.

Public Member Functions

SampleDataSource (ScrollPresenterRepeaterAnchoringPage owner, List< DataItem > source)
void | Insert (int index, int count, bool reset)
void | Remove (int index, int count, bool reset)
void | Replace (int index, int oldCount, int newCount, bool reset)
void | Reset ()

Protected Member Functions

override object | GetAtCore (int index)
override int | GetSizeCore ()
override string | KeyFromIndexCore (int index)

Properties

List< DataItem > | Inner [get, set]
ScrollPresenterRepeaterAnchoringPage | Owner [get, set]

Private Attributes

List< DataItem > | _inner

Detailed Description

Definition at line 733 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

Constructor & Destructor Documentation

SampleDataSource | ( | ScrollPresenterRepeaterAnchoringPage | owner,
 |  | List< DataItem > | source |
 | ) |  |  | [inline]

Definition at line 737 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                Owner = owner;
                Inner = source;
            }

Member Function Documentation

override object GetAtCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 767 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                return Inner[index];
            }

override int GetSizeCore ( ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceView.

Definition at line 743 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                return Inner.Count;
            }

void Insert | ( | int | index,
 |  | int | count,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 778 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                try
                {
                    Owner.AppendAsyncEventMessage("SampleDataSource Insert NewIndex=" + index + ", NewCount=" + count + ", Reset=" + reset);

                    for (int i = 0; i < count; i++)
                    {
                        switch (Owner.cmbItemHeightMode.SelectedIndex)
                        {
                            case 0: // Random
                                Random rand = new Random(123);
                                Inner.Insert(index + i, new DataItem(string.Format("ItemI #{0}", Inner.Count), 100 + rand.Next(0, 200)));
                                break;
                            case 1: // Increasing
                                Inner.Insert(index + i, new DataItem(string.Format("ItemI #{0}", Inner.Count), 100 + i * 10));
                                break;
                            case 2: // Constant
                                Inner.Insert(index + i, new DataItem(string.Format("ItemI #{0}", Inner.Count), 100));
                                break;
                        }
                    }

                    if (reset)
                    {
                        OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
                    }
                    else
                    {
                        OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                            NotifyCollectionChangedAction.Add,
                            oldStartingIndex: -1,
                            oldItemsCount: 0,
                            newStartingIndex: index,
                            newItemsCount: count));
                    }
                }
                catch (Exception ex)
                {
                    Owner.txtExceptionReport.Text = ex.ToString();
                    Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
                }
            }

override string KeyFromIndexCore ( int index ) [inline, protected, virtual]

Reimplemented from CustomItemsSourceViewWithUniqueIdMapping.

Definition at line 772 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                // data is the same as its unique id
                return Inner[index].ToString();
            }

void Remove | ( | int | index,
 |  | int | count,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 822 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                try
                {
                    Owner.AppendAsyncEventMessage("SampleDataSource Remove OldIndex=" + index + ", OldCount=" + count + ", Reset=" + reset);

                    for (int i = 0; i < count; i++)
                    {
                        Inner.RemoveAt(index);
                    }

                    if (reset)
                    {
                        OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
                    }
                    else
                    {
                        OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                            NotifyCollectionChangedAction.Remove,
                            oldStartingIndex: index,
                            oldItemsCount: count,
                            newStartingIndex: -1,
                            newItemsCount: 0));
                    }
                }
                catch (Exception ex)
                {
                    Owner.txtExceptionReport.Text = ex.ToString();
                    Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
                }
            }

void Replace | ( | int | index,
 |  | int | oldCount,
 |  | int | newCount,
 |  | bool | reset |
 | ) |  |  | [inline]

Definition at line 854 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                try
                {
                    Owner.AppendAsyncEventMessage("SampleDataSource Replace OldIndex=" + index + ", OldCount=" + oldCount + ", NewCount=" + newCount + ", Reset=" + reset);

                    for (int i = 0; i < oldCount; i++)
                    {
                        Inner.RemoveAt(index);
                    }

                    for (int i = 0; i < newCount; i++)
                    {
                        switch (Owner.cmbItemHeightMode.SelectedIndex)
                        {
                            case 0: // Random
                                Random rand = new Random(123);
                                Inner.Insert(index, new DataItem(string.Format("ItemR #{0}", Inner.Count), 100 + rand.Next(0, 200)));
                                break;
                            case 1: // Increasing
                                Inner.Insert(index, new DataItem(string.Format("ItemR #{0}", Inner.Count), 100 + i * 10));
                                break;
                            case 2: // Constant
                                Inner.Insert(index, new DataItem(string.Format("ItemR #{0}", Inner.Count), 100));
                                break;
                        }
                    }

                    if (reset)
                    {
                        OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
                    }
                    else
                    {
                        OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
                            NotifyCollectionChangedAction.Replace,
                            oldStartingIndex: index,
                            oldItemsCount: oldCount,
                            newStartingIndex: index,
                            newItemsCount: newCount));
                    }
                }
                catch (Exception ex)
                {
                    Owner.txtExceptionReport.Text = ex.ToString();
                    Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
                }
            }

void Reset ( ) [inline]

Definition at line 903 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

            {
                try
                {
                    Owner.AppendAsyncEventMessage("SampleDataSource Reset");

                    Random rand = new Random(123);

                    for (int i = 0; i < 10; i++)
                    {
                        int from = rand.Next(0, Inner.Count - 1);
                        var value = Inner[from];
                        Inner.RemoveAt(from);
                        int to = rand.Next(0, Inner.Count - 1);
                        Inner.Insert(to, value);
                    }

                    OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
                }
                catch (Exception ex)
                {
                    Owner.txtExceptionReport.Text = ex.ToString();
                    Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
                }
            }

Member Data Documentation

List<DataItem> _inner [private]

Definition at line 735 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

Property Documentation

List<DataItem> Inner [get, set]

Definition at line 749 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

ScrollPresenterRepeaterAnchoringPage Owner [get, set, private]

Definition at line 762 of file ScrollPresenterRepeaterAnchoringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterRepeaterAnchoringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterScrollSnapPointsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterScrollSnapPointsPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollPresenterScrollSnapPointsPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterScrollSnapPointsPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | btnClearFullLog_Click (object sender, RoutedEventArgs e)
void | btnGetFullLog_Click (object sender, RoutedEventArgs e)
void | BtnMIAddSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnMRAddSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnOffsetPlus10With_Click (object sender, RoutedEventArgs e)
void | BtnOffsetPlus10Without_Click (object sender, RoutedEventArgs e)
void | BtnRemoveAll_Click (object sender, RoutedEventArgs e)
void | BtnRemoveFirst_Click (object sender, RoutedEventArgs e)
void | BtnScrollPresenterOffsetChange_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
int | FillSnapPoint (List< double > values, double min, double max, int minColumn=0)
int | FillSnapPoint (List< double > values, double min, double max, Color fillColor, int minColumn=0)
void | FixConsolidatedView ()
double | GetFirstRepeatedSnapPoint (double offset, double interval, double start)
Color | GetNewColor ()
void | MarkupScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | MarkupScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenterScrollSnapPointsPage_Loaded (object sender, RoutedEventArgs e)

Private Attributes

int | colorIndex = 0
List< string > | fullLogs = new List<string>()
const int | snapPointColumnHeight = 10000
const int | snapPointColumns = 29
const int | snapPointColumnWidth = 10

Detailed Description

Definition at line 19 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterScrollSnapPointsPage ( ) [inline]

Definition at line 27 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            this.InitializeComponent();
            Loaded += ScrollPresenterScrollSnapPointsPage_Loaded;
        }

Member Function Documentation

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 241 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void btnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 669 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            this.fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
        }

void btnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 661 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            foreach (string log in this.fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
        }

void BtnMIAddSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 69 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtMISnapPointValue.Text);
                ScrollSnapPoint newSnapPoint = new ScrollSnapPoint(value, (ScrollSnapPointsAlignment)cmbMISnapPointAlignment.SelectedIndex);
                Color fillColor = GetNewColor();
                ScrollPresenterTestHooks.SetSnapPointVisualizationColor(newSnapPoint, fillColor);
                markupScrollPresenter.VerticalSnapPoints.Add(newSnapPoint);

                FillSnapPoint(new List<double> { value }, value, value, fillColor);
                FixConsolidatedView();
            }
            catch (Exception ex)
            {
                this.fullLogs.Add(ex.ToString());
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnMRAddSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 112 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            try
            {
                double offset = Convert.ToDouble(txtMRSnapPointOffset.Text);
                double interval = Convert.ToDouble(txtMRSnapPointInterval.Text);
                double start = Convert.ToDouble(txtMRSnapPointStart.Text);
                double end = Convert.ToDouble(txtMRSnapPointEnd.Text);
                RepeatedScrollSnapPoint newSnapPoint = new RepeatedScrollSnapPoint(offset, interval, start, end, (ScrollSnapPointsAlignment)cmbMRSnapPointAlignment.SelectedIndex);
                Color fillColor = GetNewColor();
                ScrollPresenterTestHooks.SetSnapPointVisualizationColor(newSnapPoint, fillColor);
                markupScrollPresenter.VerticalSnapPoints.Add(newSnapPoint);

                double value = GetFirstRepeatedSnapPoint(offset, interval, start);
                List<double> values = new List<double>();

                while (value <= end)
                {
                    values.Add(value);
                    value += interval;
                }

                FillSnapPoint(values, start, end, fillColor);
                FixConsolidatedView();
            }
            catch (Exception ex)
            {
                this.fullLogs.Add(ex.ToString());
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnOffsetPlus10With_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 217 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.ScrollBy(0.0, 10.0, new ScrollingScrollOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Default));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnOffsetPlus10Without_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 229 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.ScrollBy(0.0, 10.0, new ScrollingScrollOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnRemoveAll_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 191 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.VerticalSnapPoints.Clear();
                // TODO: Consider clearing visualization of snap points
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnRemoveFirst_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 178 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.VerticalSnapPoints.RemoveAt(0);
                // TODO: Consider refreshing visualization of snap points
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnScrollPresenterOffsetChange_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 204 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            try
            {
                double changeAmount = Convert.ToDouble(txtScrollPresenterOffsetChange.Text);
                markupScrollPresenter.AddScrollVelocity(new Vector2(0.0f, (float)((changeAmount * 3) + 30)), null);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 623 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            //Turn on info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 631 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            //Turn off info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

int FillSnapPoint | ( | List< double > | values,
 |  | double | min,
 |  | double | max,
 |  | int | minColumn = 0 |
 | ) |  |  | [inline, private]

Definition at line 246 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            return FillSnapPoint(values, min, max, GetNewColor(), minColumn);
        }

int FillSnapPoint | ( | List< double > | values,
 |  | double | min,
 |  | double | max,
 |  | Color | fillColor,
 |  | int | minColumn = 0 |
 | ) |  |  | [inline, private]

Definition at line 251 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            bool argsAreValid = true;
            foreach (int value in values)
            {
                if (!(min <= value && value <= max))
                {
                    argsAreValid = false;
                    break;
                }
            }
            if (argsAreValid)
            {
                for (int i = minColumn; i < snapPointColumns; i++)
                {
                    Grid snapPointColumn = ((Grid)this.stackPanel.Children[i]);
                    bool isOccupied = false;
                    foreach (Rectangle child in snapPointColumn.Children)
                    {
                        double previousSnapPointMin = child.Margin.Top;
                        double previousSnapPointMax = child.Height + previousSnapPointMin;
                        if ((min >= previousSnapPointMin && min <= previousSnapPointMax) ||
                           (min < previousSnapPointMin && max >= previousSnapPointMin))
                        {
                            isOccupied = true;
                            break;
                        }
                    }
                    if (!isOccupied)
                    {
                        Rectangle rangeRectangle = new Rectangle();
                        rangeRectangle.Width = snapPointColumnWidth;
                        rangeRectangle.Height = max - min;
                        rangeRectangle.Margin = new Thickness(0, min, 0, 0);
                        rangeRectangle.Fill = new SolidColorBrush(fillColor);
                        rangeRectangle.VerticalAlignment = VerticalAlignment.Top;
                        snapPointColumn.Children.Add(rangeRectangle);

                        foreach (int value in values)
                        {
                            Rectangle pointRectangle = new Rectangle();
                            pointRectangle.Width = snapPointColumnWidth;
                            pointRectangle.Height = 1;
                            pointRectangle.Margin = new Thickness(0, value, 0, 0);
                            pointRectangle.Fill = new SolidColorBrush(Microsoft.UI.Colors.Black);
                            pointRectangle.VerticalAlignment = VerticalAlignment.Top;
                            snapPointColumn.Children.Add(pointRectangle);
                        }
                        return i;
                    }
                }
                this.fullLogs.Add("Ran out of room to display additional snap points.");
            }
            else
            {
                throw (new ArgumentException(string.Format("The following inequality must be true: min <= All Values <= max. {0} <= {1} <= {2}", min, values.ToString(), max)));
            }
            return -1;
        }

void FixConsolidatedView ( ) [inline, private]

Definition at line 311 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            consolidatedView.Children.Clear();
            foreach (ScrollSnapPointBase snapPoint in ScrollPresenterTestHooks.GetConsolidatedVerticalScrollSnapPoints(markupScrollPresenter))
            {
                Vector2 zone = ScrollPresenterTestHooks.GetVerticalSnapPointActualApplicableZone(markupScrollPresenter, snapPoint);
                zone.X = Math.Max(0, zone.X);
                zone.Y = Math.Min(snapPointColumnHeight, zone.Y);
                Rectangle rangeRectangle = new Rectangle();
                rangeRectangle.Width = snapPointColumnWidth - 1;
                rangeRectangle.Height = zone.Y - zone.X;
                rangeRectangle.Margin = new Thickness(0, zone.X, 0, 0);
                rangeRectangle.Fill = new SolidColorBrush(ScrollPresenterTestHooks.GetSnapPointVisualizationColor(snapPoint));
                rangeRectangle.VerticalAlignment = VerticalAlignment.Top;
                consolidatedView.Children.Add(rangeRectangle);
            }
        }

double GetFirstRepeatedSnapPoint | ( | double | offset,
 |  | double | interval,
 |  | double | start |
 | ) |  |  | [inline, private]

Definition at line 329 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            Debug.Assert(offset >= start);
            Debug.Assert(interval > 0);

            return offset - (int)((offset - start) / interval) * interval;
        }

Color GetNewColor ( ) [inline, private]

Definition at line 337 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            colorIndex++;
            switch (colorIndex)
            {
                case 0:
                    return Microsoft.UI.Colors.YellowGreen;
                case 1:
                    return Microsoft.UI.Colors.AliceBlue;
                case 2:
                    return Microsoft.UI.Colors.AntiqueWhite;
                case 3:
                    return Microsoft.UI.Colors.Aqua;
                case 4:
                    return Microsoft.UI.Colors.Aquamarine;
                case 5:
                    return Microsoft.UI.Colors.Azure;
                case 6:
                    return Microsoft.UI.Colors.Beige;
                case 7:
                    return Microsoft.UI.Colors.Bisque;
                case 8:
                    return Microsoft.UI.Colors.BlanchedAlmond;
                case 9:
                    return Microsoft.UI.Colors.Blue;
                case 10:
                    return Microsoft.UI.Colors.BlueViolet;
                case 11:
                    return Microsoft.UI.Colors.Brown;
                case 12:
                    return Microsoft.UI.Colors.BurlyWood;
                case 13:
                    return Microsoft.UI.Colors.CadetBlue;
                case 14:
                    return Microsoft.UI.Colors.Chartreuse;
                case 15:
                    return Microsoft.UI.Colors.Chocolate;
                case 16:
                    return Microsoft.UI.Colors.Coral;
                case 17:
                    return Microsoft.UI.Colors.CornflowerBlue;
                case 18:
                    return Microsoft.UI.Colors.Cornsilk;
                case 19:
                    return Microsoft.UI.Colors.Crimson;
                case 20:
                    return Microsoft.UI.Colors.Cyan;
                case 21:
                    return Microsoft.UI.Colors.DarkBlue;
                case 22:
                    return Microsoft.UI.Colors.DarkCyan;
                case 23:
                    return Microsoft.UI.Colors.DarkGoldenrod;
                case 24:
                    return Microsoft.UI.Colors.DarkGray;
                case 25:
                    return Microsoft.UI.Colors.DarkGreen;
                case 26:
                    return Microsoft.UI.Colors.DarkKhaki;
                case 27:
                    return Microsoft.UI.Colors.DarkMagenta;
                case 28:
                    return Microsoft.UI.Colors.DarkOliveGreen;
                case 29:
                    return Microsoft.UI.Colors.DarkOrange;
                case 30:
                    return Microsoft.UI.Colors.DarkOrchid;
                case 31:
                    return Microsoft.UI.Colors.DarkRed;
                case 32:
                    return Microsoft.UI.Colors.DarkSalmon;
                case 33:
                    return Microsoft.UI.Colors.DarkSeaGreen;
                case 34:
                    return Microsoft.UI.Colors.DarkSlateBlue;
                case 35:
                    return Microsoft.UI.Colors.DarkSlateGray;
                case 36:
                    return Microsoft.UI.Colors.DarkTurquoise;
                case 37:
                    return Microsoft.UI.Colors.DarkViolet;
                case 38:
                    return Microsoft.UI.Colors.DeepPink;
                case 39:
                    return Microsoft.UI.Colors.DeepSkyBlue;
                case 40:
                    return Microsoft.UI.Colors.DimGray;
                case 41:
                    return Microsoft.UI.Colors.DodgerBlue;
                case 42:
                    return Microsoft.UI.Colors.Firebrick;
                case 43:
                    return Microsoft.UI.Colors.FloralWhite;
                case 44:
                    return Microsoft.UI.Colors.ForestGreen;
                case 45:
                    return Microsoft.UI.Colors.Fuchsia;
                case 46:
                    return Microsoft.UI.Colors.Gainsboro;
                case 47:
                    return Microsoft.UI.Colors.GhostWhite;
                case 48:
                    return Microsoft.UI.Colors.Gold;
                case 49:
                    return Microsoft.UI.Colors.Goldenrod;
                case 50:
                    return Microsoft.UI.Colors.Gray;
                case 51:
                    return Microsoft.UI.Colors.Green;
                case 52:
                    return Microsoft.UI.Colors.GreenYellow;
                case 53:
                    return Microsoft.UI.Colors.Honeydew;
                case 54:
                    return Microsoft.UI.Colors.HotPink;
                case 55:
                    return Microsoft.UI.Colors.IndianRed;
                case 56:
                    return Microsoft.UI.Colors.Indigo;
                case 57:
                    return Microsoft.UI.Colors.Ivory;
                case 58:
                    return Microsoft.UI.Colors.Khaki;
                case 59:
                    return Microsoft.UI.Colors.Lavender;
                case 60:
                    return Microsoft.UI.Colors.LavenderBlush;
                case 61:
                    return Microsoft.UI.Colors.LawnGreen;
                case 62:
                    return Microsoft.UI.Colors.LemonChiffon;
                case 63:
                    return Microsoft.UI.Colors.LightBlue;
                case 64:
                    return Microsoft.UI.Colors.LightCoral;
                case 65:
                    return Microsoft.UI.Colors.LightCyan;
                case 66:
                    return Microsoft.UI.Colors.LightGoldenrodYellow;
                case 67:
                    return Microsoft.UI.Colors.LightGray;
                case 68:
                    return Microsoft.UI.Colors.LightGreen;
                case 69:
                    return Microsoft.UI.Colors.LightPink;
                case 70:
                    return Microsoft.UI.Colors.LightSalmon;
                case 71:
                    return Microsoft.UI.Colors.LightSeaGreen;
                case 72:
                    return Microsoft.UI.Colors.LightSkyBlue;
                case 73:
                    return Microsoft.UI.Colors.LightSlateGray;
                case 74:
                    return Microsoft.UI.Colors.LightSteelBlue;
                case 75:
                    return Microsoft.UI.Colors.LightYellow;
                case 76:
                    return Microsoft.UI.Colors.Lime;
                case 77:
                    return Microsoft.UI.Colors.LimeGreen;
                case 78:
                    return Microsoft.UI.Colors.Linen;
                case 79:
                    return Microsoft.UI.Colors.Magenta;
                case 80:
                    return Microsoft.UI.Colors.Maroon;
                case 81:
                    return Microsoft.UI.Colors.MediumAquamarine;
                case 82:
                    return Microsoft.UI.Colors.MediumBlue;
                case 83:
                    return Microsoft.UI.Colors.MediumOrchid;
                case 84:
                    return Microsoft.UI.Colors.MediumPurple;
                case 85:
                    return Microsoft.UI.Colors.MediumSeaGreen;
                case 86:
                    return Microsoft.UI.Colors.MediumSlateBlue;
                case 87:
                    return Microsoft.UI.Colors.MediumSpringGreen;
                case 88:
                    return Microsoft.UI.Colors.MediumTurquoise;
                case 89:
                    return Microsoft.UI.Colors.MediumVioletRed;
                case 90:
                    return Microsoft.UI.Colors.MidnightBlue;
                case 91:
                    return Microsoft.UI.Colors.MintCream;
                case 92:
                    return Microsoft.UI.Colors.MistyRose;
                case 93:
                    return Microsoft.UI.Colors.Moccasin;
                case 94:
                    return Microsoft.UI.Colors.NavajoWhite;
                case 95:
                    return Microsoft.UI.Colors.Navy;
                case 96:
                    return Microsoft.UI.Colors.OldLace;
                case 97:
                    return Microsoft.UI.Colors.Olive;
                case 98:
                    return Microsoft.UI.Colors.OliveDrab;
                case 99:
                    return Microsoft.UI.Colors.Orange;
                case 100:
                    return Microsoft.UI.Colors.OrangeRed;
                case 101:
                    return Microsoft.UI.Colors.Orchid;
                case 102:
                    return Microsoft.UI.Colors.PaleGoldenrod;
                case 103:
                    return Microsoft.UI.Colors.PaleGreen;
                case 104:
                    return Microsoft.UI.Colors.PaleTurquoise;
                case 105:
                    return Microsoft.UI.Colors.PaleVioletRed;
                case 106:
                    return Microsoft.UI.Colors.PapayaWhip;
                case 107:
                    return Microsoft.UI.Colors.PeachPuff;
                case 108:
                    return Microsoft.UI.Colors.Peru;
                case 109:
                    return Microsoft.UI.Colors.Pink;
                case 110:
                    return Microsoft.UI.Colors.Plum;
                case 111:
                    return Microsoft.UI.Colors.PowderBlue;
                case 112:
                    return Microsoft.UI.Colors.Purple;
                case 113:
                    return Microsoft.UI.Colors.Red;
                case 114:
                    return Microsoft.UI.Colors.RosyBrown;
                case 115:
                    return Microsoft.UI.Colors.RoyalBlue;
                case 116:
                    return Microsoft.UI.Colors.SaddleBrown;
                case 117:
                    return Microsoft.UI.Colors.Salmon;
                case 118:
                    return Microsoft.UI.Colors.SandyBrown;
                case 119:
                    return Microsoft.UI.Colors.SeaGreen;
                case 120:
                    return Microsoft.UI.Colors.SeaShell;
                case 121:
                    return Microsoft.UI.Colors.Sienna;
                case 122:
                    return Microsoft.UI.Colors.Silver;
                case 123:
                    return Microsoft.UI.Colors.SkyBlue;
                case 124:
                    return Microsoft.UI.Colors.SlateBlue;
                case 125:
                    return Microsoft.UI.Colors.SlateGray;
                case 126:
                    return Microsoft.UI.Colors.Snow;
                case 127:
                    return Microsoft.UI.Colors.SpringGreen;
                case 128:
                    return Microsoft.UI.Colors.Tan;
                case 129:
                    return Microsoft.UI.Colors.Teal;
                case 130:
                    return Microsoft.UI.Colors.Thistle;
                case 131:
                    return Microsoft.UI.Colors.Tomato;
                case 132:
                    return Microsoft.UI.Colors.Turquoise;
                case 133:
                    return Microsoft.UI.Colors.Violet;
                case 134:
                    return Microsoft.UI.Colors.Wheat;
                case 135:
                    return Microsoft.UI.Colors.WhiteSmoke;
                case 136:
                    return Microsoft.UI.Colors.Yellow;
                case 137:
                    return Microsoft.UI.Colors.YellowGreen;
                default:
                    return Microsoft.UI.Colors.Black;
            }
        }

void MarkupScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 64 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            this.txtScrollPresenterState.Text = this.markupScrollPresenter.State.ToString();
        }

void MarkupScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 58 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            this.txtScrollPresenterOffset.Text = this.markupScrollPresenter.VerticalOffset.ToString("F2");
            this.txtScrollPresenterZoomFactor.Text = this.markupScrollPresenter.ZoomFactor.ToString("F2");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 639 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;
            FrameworkElement fe = sender as FrameworkElement;

            if (fe != null)
            {
                senderName = "s:" + fe.Name + ", ";
            }

            if (args.IsVerboseLevel)
            {
                this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                this.fullLogs.Add("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 33 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            if (chkLogScrollPresenterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
            }

            base.OnNavigatedFrom(e);
        }

void ScrollPresenterScrollSnapPointsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

        {
            SolidColorBrush brush = new SolidColorBrush(Microsoft.UI.Colors.Red);
            for (int j = 0; j < snapPointColumns; j++)
            {
                Grid innerGrid = new Grid();
                innerGrid.Width = snapPointColumnWidth;
                innerGrid.Height = snapPointColumnHeight;
                this.stackPanel.Children.Add(innerGrid);
            }
            this.markupScrollPresenter.ViewChanged += MarkupScrollPresenter_ViewChanged;
            this.markupScrollPresenter.StateChanged += MarkupScrollPresenter_StateChanged;
        }

Member Data Documentation

int colorIndex = 0 [private]

Definition at line 24 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

List<string> fullLogs = new List<string>() [private]

Definition at line 25 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

const int snapPointColumnHeight = 10000 [private]

Definition at line 23 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

const int snapPointColumns = 29 [private]

Definition at line 21 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

const int snapPointColumnWidth = 10 [private]

Definition at line 22 of file ScrollPresenterScrollSnapPointsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterScrollSnapPointsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterStackPanelAnchoringPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterStackPanelAnchoringPage
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes

ScrollPresenterStackPanelAnchoringPage Class Reference

List of all members.

Classes

class | QueuedOperation

Public Member Functions

ScrollPresenterStackPanelAnchoringPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Types

enum QueuedOperationType {
Insert, Remove, Replace, Shrink,
Expand
}

Private Member Functions

void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnAddScrollVelocity_Click (object sender, RoutedEventArgs e)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearScrollPresenterEvents_Click (object sender, RoutedEventArgs e)
void | BtnExpand_Click (object sender, RoutedEventArgs e)
void | BtnExpandMore_Click (object sender, RoutedEventArgs e)
void | BtnGetAnchorElement_Click (object sender, RoutedEventArgs e)
void | BtnGetCurrentAnchor_Click (object sender, RoutedEventArgs e)
void | BtnGetHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetWidth_Click (object sender, RoutedEventArgs e)
void | BtnInsert_Click (object sender, RoutedEventArgs e)
void | BtnInvalidateArrange_Click (object sender, RoutedEventArgs e)
void | BtnRemove_Click (object sender, RoutedEventArgs e)
void | BtnReplace_Click (object sender, RoutedEventArgs e)
void | BtnScrollTo_Click (object sender, RoutedEventArgs e)
void | BtnSetAnchorElement_Click (object sender, RoutedEventArgs e)
void | BtnSetHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetWidth_Click (object sender, RoutedEventArgs e)
void | BtnShrink_Click (object sender, RoutedEventArgs e)
void | BtnShrinkMore_Click (object sender, RoutedEventArgs e)
void | ChkHorizontalOrientation_Checked (object sender, RoutedEventArgs e)
void | ChkHorizontalOrientation_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | CmbAnchorElement_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ExecuteQueuedOperations ()
void | ExecuteTriggerableOperations ()
void | Expand (int index, int amount)
void | Insert (int newIndex, int newCount)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | Remove (int oldIndex, int oldCount)
void | Replace (int oldIndex, int oldCount, int newCount)
void | ScrollPresenter_AnchorRequested (ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ScrollAnimationStarting (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_ScrollCompleted (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenterStackPanelAnchoringPage_Loaded (object sender, RoutedEventArgs e)
void | ScrollPresenterTestHooks_AnchorEvaluated (ScrollPresenter sender, ScrollPresenterTestHooksAnchorEvaluatedEventArgs args)
void | Shrink (int index, int amount)
void | Timer_Tick (object sender, object e)
void | UpdateHorizontalAnchorRatio ()
void | UpdateRaiseAnchorNotifications (bool raiseAnchorNotifications)
void | UpdateVerticalAnchorRatio ()

Private Attributes

UIElement | anchorElement = null
Object | asyncEventReportingLock = new Object()
SolidColorBrush | blanchedAlmondBrush = new SolidColorBrush(Microsoft.UI.Colors.BlanchedAlmond)
SolidColorBrush | chartreuseBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse)
Border | currentAnchor = null
double | lastScrollPresenterOffset = 0.0
List< string > | lstAsyncEventMessage = new List<string>()
List< QueuedOperation > | lstQueuedOperations = new List<QueuedOperation>()
List< QueuedOperation > | lstTriggeredOperations = new List<QueuedOperation>()
int | operationCount = 0
SolidColorBrush | orangeBrush = new SolidColorBrush(Microsoft.UI.Colors.Orange)
DispatcherTimer | timer = new DispatcherTimer()

Detailed Description

Definition at line 20 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

Member Enumeration Documentation

enum QueuedOperationType [private]
Enumerator:
Insert
Remove
Replace
Shrink
Expand

Definition at line 1080 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            Insert,
            Remove,
            Replace,
            Shrink,
            Expand,
        }

Constructor & Destructor Documentation

ScrollPresenterStackPanelAnchoringPage ( ) [inline]

Definition at line 35 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            InitializeComponent();

            Loaded += ScrollPresenterStackPanelAnchoringPage_Loaded;

            scrollPresenter.SizeChanged += ScrollPresenter_SizeChanged;

            timer.Interval = new TimeSpan(0, 0, 2 /*sec*/);
            timer.Tick += Timer_Tick;

            Insert(0 /*newIndex*/, 16 /*newCount*/);
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 1058 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                lstAsyncEventMessage.Add(asyncEventMessage);

                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 1068 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstScrollPresenterEvents.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnAddScrollVelocity_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 818 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                Vector2? inertiaDecayRate = null;

                if (txtCOWAVAIDR.Text != "null")
                {
                    inertiaDecayRate = new Vector2(
                        chkHorizontalOrientation.IsChecked == true ? Convert.ToSingle(txtCOWAVAIDR.Text) : 0,
                        chkHorizontalOrientation.IsChecked == true ? 0 : Convert.ToSingle(txtCOWAVAIDR.Text));
                }

                txtStockOffsetsChangeDuration.Text = string.Empty;

                int viewChangeCorrelationId = scrollPresenter.AddScrollVelocity(
                    new Vector2(
                        chkHorizontalOrientation.IsChecked == true ? Convert.ToSingle(txtCOWAVAV.Text) : 0,
                        chkHorizontalOrientation.IsChecked == true ? 0 : Convert.ToSingle(txtCOWAVAV.Text)),
                    inertiaDecayRate);
                AppendAsyncEventMessage("Invoked AddScrollVelocity Id=" + viewChangeCorrelationId);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 852 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearScrollPresenterEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 847 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            lstScrollPresenterEvents.Items.Clear();
        }

void BtnExpand_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 238 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        Expand(int.Parse(txtIndex.Text), 1);
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Expand, 0, 0, int.Parse(txtIndex.Text), 1));
                        AppendAsyncEventMessage("Queued Expand Index=" + txtIndex.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Expand, 0, 0, int.Parse(txtIndex.Text), 1));
                        AppendAsyncEventMessage("Triggerable Expand Index=" + txtIndex.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnExpandMore_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 265 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        Expand(int.Parse(txtIndex.Text), 4);
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Expand, 0, 0, int.Parse(txtIndex.Text), 4));
                        AppendAsyncEventMessage("Queued Expand Index=" + txtIndex.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Expand, 0, 0, int.Parse(txtIndex.Text), 4));
                        AppendAsyncEventMessage("Triggerable Expand Index=" + txtIndex.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetAnchorElement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 684 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                string asyncEventMessage = "AnchorElement=";

                if (anchorElement == null)
                {
                    cmbAnchorElement.SelectedIndex = 0;
                    asyncEventMessage += "null";
                }
                else if (anchorElement == scrollPresenter)
                {
                    cmbAnchorElement.SelectedIndex = 1;
                    asyncEventMessage += "scrollPresenter";
                }
                else if (anchorElement == tblCollapsedAnchorElement)
                {
                    cmbAnchorElement.SelectedIndex = 2;
                    asyncEventMessage += "collapsed";
                }
                else if (anchorElement == border)
                {
                    cmbAnchorElement.SelectedIndex = 3;
                    asyncEventMessage += "border";
                }
                else
                {
                    cmbAnchorElement.SelectedIndex = 4;
                    asyncEventMessage += "item";
                }
                AppendAsyncEventMessage(asyncEventMessage);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetCurrentAnchor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 662 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                if (scrollPresenter.CurrentAnchor == null)
                {
                    txtCurrentAnchor.Text = "null";
                }
                else
                {
                    FrameworkElement currentAnchorAsFE = scrollPresenter.CurrentAnchor as FrameworkElement;

                    txtCurrentAnchor.Text = currentAnchorAsFE == null ? "UIElement" : currentAnchorAsFE.Name;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnGetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 644 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            txtHeight.Text = scrollPresenter.Height.ToString();
        }

void BtnGetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 590 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            UpdateHorizontalAnchorRatio();
        }

void BtnGetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 608 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            UpdateVerticalAnchorRatio();
        }

void BtnGetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 626 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            txtWidth.Text = scrollPresenter.Width.ToString();
        }

void BtnInsert_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 103 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        Insert(int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text));
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Insert, 0, 0, int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text)));
                        AppendAsyncEventMessage("Queued Insert NewIndex=" + txtNewStartIndex.Text + ", NewCount=" + txtNewCount.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Insert, 0, 0, int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text)));
                        AppendAsyncEventMessage("Triggerable Insert NewIndex=" + txtNewStartIndex.Text + ", NewCount=" + txtNewCount.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnInvalidateArrange_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 772 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            scrollPresenter.InvalidateArrange();
        }

void BtnRemove_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 130 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        Remove(int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text));
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Remove, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, 0));
                        AppendAsyncEventMessage("Queued Remove OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Remove, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, 0));
                        AppendAsyncEventMessage("Triggerable Remove OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnReplace_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 157 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        Replace(int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), int.Parse(txtNewCount.Text));
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Replace, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, int.Parse(txtNewCount.Text)));
                        AppendAsyncEventMessage("Queued Replace OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text + ", NewCount=" + txtNewCount.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Replace, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, int.Parse(txtNewCount.Text)));
                        AppendAsyncEventMessage("Triggerable Replace OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text + ", NewCount=" + txtNewCount.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnScrollTo_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 777 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                txtStockOffsetsChangeDuration.Text = string.Empty;

                int viewChangeCorrelationId = scrollPresenter.ScrollTo(
                    chkHorizontalOrientation.IsChecked == true ? Convert.ToDouble(txtCOAO.Text) : 0,
                    chkHorizontalOrientation.IsChecked == true ? 0 : Convert.ToDouble(txtCOAO.Text),
                    new ScrollingScrollOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore));
                AppendAsyncEventMessage("Invoked ScrollTo Id=" + viewChangeCorrelationId);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetAnchorElement_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 724 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbAnchorElement.SelectedIndex)
                {
                    case 0:
                        anchorElement = null;
                        break;
                    case 1:
                        anchorElement = scrollPresenter;
                        break;
                    case 2:
                        anchorElement = tblCollapsedAnchorElement;
                        break;
                    case 3:
                        anchorElement = border;
                        break;
                    case 4:
                        anchorElement = stackPanel.Children[int.Parse(txtItemIndex.Text)];
                        break;
                }

                scrollPresenter.InvalidateArrange();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 649 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                scrollPresenter.Height = Convert.ToDouble(txtHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 595 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                scrollPresenter.HorizontalAnchorRatio = Convert.ToDouble(txtHorizontalAnchorRatio.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 613 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                scrollPresenter.VerticalAnchorRatio = Convert.ToDouble(txtVerticalAnchorRatio.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 631 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                scrollPresenter.Width = Convert.ToDouble(txtWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnShrink_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 184 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        Shrink(int.Parse(txtIndex.Text), 1);
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Shrink, 0, 0, int.Parse(txtIndex.Text), 1));
                        AppendAsyncEventMessage("Queued Shrink Index=" + txtIndex.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Shrink, 0, 0, int.Parse(txtIndex.Text), 1));
                        AppendAsyncEventMessage("Triggerable Shrink Index=" + txtIndex.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void BtnShrinkMore_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 211 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                switch (cmbDelayMode.SelectedIndex)
                {
                    case 0: // No delay
                        Shrink(int.Parse(txtIndex.Text), 4);
                        break;
                    case 1: // Timer expiration
                        lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Shrink, 0, 0, int.Parse(txtIndex.Text), 4));
                        AppendAsyncEventMessage("Queued Shrink More Index=" + txtIndex.Text);
                        timer.Start();
                        break;
                    case 2: // Offset crosses 350
                        lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Shrink, 0, 0, int.Parse(txtIndex.Text), 4));
                        AppendAsyncEventMessage("Triggerable Shrink More Index=" + txtIndex.Text);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ChkHorizontalOrientation_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 896 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            stackPanel.Orientation = Orientation.Horizontal;
            scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
            scrollPresenter.Width = 600;
            scrollPresenter.Height = 300;
            cnsAnchorPoint.Width = 600;
            cnsAnchorPoint.Height = 300;
            Grid.SetRow(scrollPresenter, 0);
            Grid.SetColumnSpan(scrollPresenter, 4);
            Grid.SetRow(cnsAnchorPoint, 0);
            Grid.SetColumnSpan(cnsAnchorPoint, 4);

            foreach (Border border in stackPanel.Children)
            {
                border.Width = 120;
                border.Height = 170;
            }
        }

void ChkHorizontalOrientation_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 916 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            stackPanel.Orientation = Orientation.Vertical;
            scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
            scrollPresenter.Width = 300;
            scrollPresenter.Height = 600;
            cnsAnchorPoint.Width = 300;
            cnsAnchorPoint.Height = 600;
            Grid.SetRow(scrollPresenter, 1);
            Grid.SetColumnSpan(scrollPresenter, 1);
            Grid.SetRow(cnsAnchorPoint, 1);
            Grid.SetColumnSpan(cnsAnchorPoint, 1);

            foreach (Border border in stackPanel.Children)
            {
                border.Width = 170;
                border.Height = 120;
            }
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 936 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 942 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
            scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 857 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 863 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void CmbAnchorElement_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 756 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (tblItemIndex != null && txtItemIndex != null && cmbAnchorElement != null)
                tblItemIndex.Visibility = txtItemIndex.Visibility = cmbAnchorElement.SelectedIndex == 4 ? Visibility.Visible : Visibility.Collapsed;
        }

void ExecuteQueuedOperations ( ) [inline, private]

Definition at line 292 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                while (lstQueuedOperations.Count > 0)
                {
                    QueuedOperation qo = lstQueuedOperations[0];

                    switch (qo.Type)
                    {
                        case QueuedOperationType.Insert:
                            AppendAsyncEventMessage("Unqueuing Insert NewIndex=" + qo.NewIndex + ", NewCount=" + qo.NewCount);
                            Insert(qo.NewIndex, qo.NewCount);
                            break;
                        case QueuedOperationType.Remove:
                            AppendAsyncEventMessage("Unqueuing Remove OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount);
                            Remove(qo.OldIndex, qo.OldCount);
                            break;
                        case QueuedOperationType.Replace:
                            AppendAsyncEventMessage("Unqueuing Replace OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount + ", NewCount=" + qo.NewCount);
                            Replace(qo.OldIndex, qo.OldCount, qo.NewCount);
                            break;
                        case QueuedOperationType.Shrink:
                            AppendAsyncEventMessage("Unqueuing Shrink Index=" + qo.NewIndex + ", Amount=" + qo.NewCount * 20);
                            Shrink(qo.NewIndex, qo.NewCount);
                            break;
                        case QueuedOperationType.Expand:
                            AppendAsyncEventMessage("Unqueuing Expand Index=" + qo.NewIndex + ", Amount=" + qo.NewCount * 20);
                            Expand(qo.NewIndex, qo.NewCount);
                            break;
                    }

                    lstQueuedOperations.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ExecuteTriggerableOperations ( ) [inline, private]

Definition at line 334 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                while (lstTriggeredOperations.Count > 0)
                {
                    QueuedOperation qo = lstTriggeredOperations[0];

                    switch (qo.Type)
                    {
                        case QueuedOperationType.Insert:
                            AppendAsyncEventMessage("Triggering Insert NewIndex=" + qo.NewIndex + ", NewCount=" + qo.NewCount);
                            Insert(qo.NewIndex, qo.NewCount);
                            break;
                        case QueuedOperationType.Remove:
                            AppendAsyncEventMessage("Triggering Remove OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount);
                            Remove(qo.OldIndex, qo.OldCount);
                            break;
                        case QueuedOperationType.Replace:
                            AppendAsyncEventMessage("Triggering Replace OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount + ", NewCount=" + qo.NewCount);
                            Replace(qo.OldIndex, qo.OldCount, qo.NewCount);
                            break;
                        case QueuedOperationType.Shrink:
                            AppendAsyncEventMessage("Triggering Shrink Index=" + qo.NewIndex + ", Amount=" + qo.NewCount * 20);
                            Shrink(qo.NewIndex, qo.NewCount);
                            break;
                        case QueuedOperationType.Expand:
                            AppendAsyncEventMessage("Triggering Expand Index=" + qo.NewIndex + ", Amount=" + qo.NewCount * 20);
                            Expand(qo.NewIndex, qo.NewCount);
                            break;
                    }

                    lstTriggeredOperations.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void Expand | ( | int | index,
 |  | int | amount |
 | ) |  |  | [inline, private]

Definition at line 496 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (index < 0 || index >= stackPanel.Children.Count)
            {
                throw new ArgumentException();
            }

            Border border = stackPanel.Children[index] as Border;
            border.Height += 20 * amount;

            operationCount++;
        }

void Insert | ( | int | newIndex,
 |  | int | newCount |
 | ) |  |  | [inline, private]

Definition at line 376 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (newIndex < 0 || newIndex > stackPanel.Children.Count || newCount <= 0)
            {
                throw new ArgumentException();
            }

            for (int i = 0; i < newCount; i++)
            {
                TextBlock textBlock = new TextBlock();
                textBlock.Text = "TB#" + stackPanel.Children.Count + "_" + operationCount;
                textBlock.Name = "textBlock" + stackPanel.Children.Count + "_" + operationCount;
                textBlock.HorizontalAlignment = HorizontalAlignment.Center;
                textBlock.VerticalAlignment = VerticalAlignment.Center;

                Border border = new Border();
                border.Name = "border" + stackPanel.Children.Count + "_" + operationCount;
                border.BorderThickness = border.Margin = new Thickness(3);
                border.BorderBrush = chartreuseBrush;
                border.Background = blanchedAlmondBrush;
                if (chkHorizontalOrientation.IsChecked == true)
                {
                    border.Width = 120;
                    border.Height = 170;
                }
                else
                {
                    border.Width = 170;
                    border.Height = 120;
                }
                border.Child = textBlock;

                stackPanel.Children.Insert(newIndex + i, border);
            }

            operationCount++;
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 948 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 49 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            UpdateRaiseAnchorNotifications(raiseAnchorNotifications: false);

            base.OnNavigatedFrom(e);
        }

void Remove | ( | int | oldIndex,
 |  | int | oldCount |
 | ) |  |  | [inline, private]

Definition at line 414 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (oldIndex < 0 || oldIndex > stackPanel.Children.Count - oldCount || oldCount <= 0)
            {
                throw new ArgumentException();
            }

            bool isAnchorRemoved = false;

            for (int i = 0; i < oldCount; i++)
            {
                if (!isAnchorRemoved && anchorElement == stackPanel.Children[oldIndex])
                {
                    isAnchorRemoved = true;
                }
                stackPanel.Children.RemoveAt(oldIndex);
            }

            if (isAnchorRemoved)
            {
                BtnSetAnchorElement_Click(null, null);
            }

            operationCount++;
        }

void Replace | ( | int | oldIndex,
 |  | int | oldCount,
 |  | int | newCount |
 | ) |  |  | [inline, private]

Definition at line 440 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (oldIndex < 0 || oldIndex > stackPanel.Children.Count - oldCount || oldCount <= 0 || newCount <= 0)
            {
                throw new ArgumentException();
            }

            for (int i = 0; i < oldCount; i++)
            {
                stackPanel.Children.RemoveAt(oldIndex);
            }

            for (int i = 0; i < newCount; i++)
            {
                TextBlock textBlock = new TextBlock();
                textBlock.Text = "TB#" + stackPanel.Children.Count + "_" + operationCount;
                textBlock.Name = "textBlock" + stackPanel.Children.Count + "_" + operationCount;
                textBlock.HorizontalAlignment = HorizontalAlignment.Center;
                textBlock.VerticalAlignment = VerticalAlignment.Center;

                Border border = new Border();
                border.Name = "border" + stackPanel.Children.Count + "_" + operationCount;
                border.BorderThickness = border.Margin = new Thickness(3);
                border.BorderBrush = chartreuseBrush;
                border.Background = blanchedAlmondBrush;
                if (chkHorizontalOrientation.IsChecked == true)
                {
                    border.Width = 120;
                    border.Height = 170;
                }
                else
                {
                    border.Width = 170;
                    border.Height = 120;
                }
                border.Child = textBlock;

                stackPanel.Children.Insert(oldIndex + i, border);
            }

            operationCount++;
        }

void ScrollPresenter_AnchorRequested | ( | ScrollPresenter | sender,
 |  | ScrollingAnchorRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 557 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                IList<UIElement> anchorCandidates = args.AnchorCandidates;

                if (chkLogScrollPresenterEvents.IsChecked == true)
                {
                    AppendAsyncEventMessage("AnchorRequested anchor=" + (args.AnchorElement == null ? "null" : "non-null") + ", count=" + anchorCandidates.Count);
                }

                if (anchorElement == null)
                {
                    foreach (UIElement child in stackPanel.Children)
                    {
                        anchorCandidates.Add(child);
                    }
                }
                else
                {
                    args.AnchorElement = anchorElement;
                }
            }
            catch (Exception ex)
            {
                cmbAnchorElement.SelectedIndex = 0;
                BtnSetAnchorElement_Click(null, null);

                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 509 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("ExtentChanged ExtentWidth=" + sender.ExtentWidth.ToString() + ", ExtentHeight=" + sender.ExtentHeight.ToString());
            }
        }

void ScrollPresenter_ScrollAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 796 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                AppendAsyncEventMessage("ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId);

                Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;

                if (stockKeyFrameAnimation != null && !string.IsNullOrWhiteSpace(txtOverriddenOffsetsChangeDuration.Text))
                {
                    txtStockOffsetsChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();
                    double durationOverride = Convert.ToDouble(txtOverriddenOffsetsChangeDuration.Text);
                    stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenter_ScrollCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 547 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

                AppendAsyncEventMessage("ScrollCompleted OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
            }
        }

void ScrollPresenter_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            cnsAnchorPoint.Width = scrollPresenter.Width;
            cnsAnchorPoint.Height = scrollPresenter.Height;
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 517 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("StateChanged " + sender.State.ToString());
            }
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 525 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset.ToString() + ", S=" + sender.ZoomFactor.ToString());
            }

            double newScrollPresenterOffset = stackPanel.Orientation == Orientation.Horizontal ? scrollPresenter.HorizontalOffset : scrollPresenter.VerticalOffset;

            if (lstTriggeredOperations.Count > 0 &&
                ((lastScrollPresenterOffset <= 350.0 && newScrollPresenterOffset > 350.0) || (lastScrollPresenterOffset >= 350.0 && newScrollPresenterOffset < 350.0)))
            {
                ExecuteTriggerableOperations();
            }
            else
            {
                scrollPresenter.InvalidateArrange();
            }

            lastScrollPresenterOffset = newScrollPresenterOffset;
        }

void ScrollPresenterStackPanelAnchoringPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 59 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            try
            {
                if (chkLogScrollPresenterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
                }

                UpdateRaiseAnchorNotifications(raiseAnchorNotifications: true);

                UpdateHorizontalAnchorRatio();
                UpdateVerticalAnchorRatio();

                if (chkLogScrollPresenterEvents.IsChecked == true)
                {
                    scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                }
                scrollPresenter.AnchorRequested += ScrollPresenter_AnchorRequested;
                scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
                scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollPresenterEvents.Items.Add(ex.ToString());
            }
        }

void ScrollPresenterTestHooks_AnchorEvaluated | ( | ScrollPresenter | sender,
 |  | ScrollPresenterTestHooksAnchorEvaluatedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 980 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            string anchorName;
            Border newAnchor = null;

            if (args.AnchorElement == null)
            {
                anchorName = "null";
            }
            else
            {
                if (args.AnchorElement is FrameworkElement)
                {
                    FrameworkElement anchorElementAsFE = args.AnchorElement as FrameworkElement;

                    if (string.IsNullOrWhiteSpace(anchorElementAsFE.Name))
                        anchorName = "unnamed-FE";
                    else
                        anchorName = anchorElementAsFE.Name;

                    newAnchor = anchorElementAsFE as Border;
                }
                else
                {
                    anchorName = "UIE";
                }
            }

            if (newAnchor != currentAnchor)
            {
                if (currentAnchor != null)
                {
                    currentAnchor.BorderBrush = chartreuseBrush;
                }
                if (newAnchor != null)
                {
                    newAnchor.BorderBrush = orangeBrush;
                }
                currentAnchor = newAnchor;
            }

            if (double.IsNaN(args.ViewportAnchorPointHorizontalOffset) && double.IsNaN(args.ViewportAnchorPointVerticalOffset))
            {
                cnsAnchorPoint.Visibility = Visibility.Collapsed;
            }
            else
            {
                cnsAnchorPoint.Visibility = Visibility.Visible;

                if (double.IsNaN(args.ViewportAnchorPointHorizontalOffset))
                {
                    rectAnchorPoint.Width = scrollPresenter.Width;
                    Canvas.SetLeft(rectAnchorPoint, 0);
                }
                else
                {
                    rectAnchorPoint.Width = double.IsNaN(args.ViewportAnchorPointVerticalOffset) ? 2 : 4;
                    Canvas.SetLeft(rectAnchorPoint, args.ViewportAnchorPointHorizontalOffset * scrollPresenter.ZoomFactor - scrollPresenter.HorizontalOffset - rectAnchorPoint.Width / 2);
                }

                if (double.IsNaN(args.ViewportAnchorPointVerticalOffset))
                {
                    rectAnchorPoint.Height = scrollPresenter.Height;
                    Canvas.SetTop(rectAnchorPoint, 0);
                }
                else
                {
                    rectAnchorPoint.Height = double.IsNaN(args.ViewportAnchorPointHorizontalOffset) ? 2 : 4;
                    Canvas.SetTop(rectAnchorPoint, args.ViewportAnchorPointVerticalOffset * scrollPresenter.ZoomFactor - scrollPresenter.VerticalOffset - rectAnchorPoint.Height / 2);
                }
            }

            if (chkLogScrollPresenterAnchorNotifications.IsChecked == true)
            {
                AppendAsyncEventMessage("  AnchorEvaluated: s:" + sender.Name + ", a:" + anchorName + ", ap:(" + (int)args.ViewportAnchorPointHorizontalOffset + ", " + (int)args.ViewportAnchorPointVerticalOffset + ")");
            }
        }

void Shrink | ( | int | index,
 |  | int | amount |
 | ) |  |  | [inline, private]

Definition at line 483 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (index < 0 || index >= stackPanel.Children.Count)
            {
                throw new ArgumentException();
            }

            Border border = stackPanel.Children[index] as Border;
            border.Height = Math.Max(20, border.Height - 20 * amount);

            operationCount++;
        }

void Timer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 97 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            timer.Stop();
            ExecuteQueuedOperations();
        }

void UpdateHorizontalAnchorRatio ( ) [inline, private]

Definition at line 762 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            txtHorizontalAnchorRatio.Text = scrollPresenter.HorizontalAnchorRatio.ToString();
        }

void UpdateRaiseAnchorNotifications ( bool raiseAnchorNotifications ) [inline, private]

Definition at line 869 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            if (raiseAnchorNotifications)
            {
                if (!ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
                {
                    ScrollPresenterTestHooks.AreAnchorNotificationsRaised = true;
                    ScrollPresenterTestHooks.AnchorEvaluated += ScrollPresenterTestHooks_AnchorEvaluated;
                }
            }
            else
            {
                if (ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
                {
                    ScrollPresenterTestHooks.AreAnchorNotificationsRaised = false;
                    ScrollPresenterTestHooks.AnchorEvaluated -= ScrollPresenterTestHooks_AnchorEvaluated;
                }

                if (currentAnchor != null)
                {
                    currentAnchor.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
                    currentAnchor = null;
                }
                cnsAnchorPoint.Visibility = Visibility.Collapsed;
            }
        }

void UpdateVerticalAnchorRatio ( ) [inline, private]

Definition at line 767 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

        {
            txtVerticalAnchorRatio.Text = scrollPresenter.VerticalAnchorRatio.ToString();
        }

Member Data Documentation

UIElement anchorElement = null [private]

Definition at line 28 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

Object asyncEventReportingLock = new Object() [private]

Definition at line 23 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

SolidColorBrush blanchedAlmondBrush = new SolidColorBrush(Microsoft.UI.Colors.BlanchedAlmond) [private]

Definition at line 30 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

SolidColorBrush chartreuseBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse) [private]

Definition at line 29 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

Border currentAnchor = null [private]

Definition at line 27 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

double lastScrollPresenterOffset = 0.0 [private]

Definition at line 33 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 24 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

List<QueuedOperation> lstQueuedOperations = new List<QueuedOperation>() [private]

Definition at line 25 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

List<QueuedOperation> lstTriggeredOperations = new List<QueuedOperation>() [private]

Definition at line 26 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

int operationCount = 0 [private]

Definition at line 32 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

SolidColorBrush orangeBrush = new SolidColorBrush(Microsoft.UI.Colors.Orange) [private]

Definition at line 31 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

DispatcherTimer timer = new DispatcherTimer() [private]

Definition at line 22 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterStackPanelAnchoringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterStackPanelAnchoringPage::QueuedOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterStackPanelAnchoringPage
  • ScrollPresenterStackPanelAnchoringPage::QueuedOperation
Public Member Functions | Properties

ScrollPresenterStackPanelAnchoringPage::QueuedOperation Class Reference

List of all members.

Public Member Functions

QueuedOperation (QueuedOperationType type, int oldIndex, int oldCount, int newIndex, int newCount)

Properties

int | NewCount [get, set]
int | NewIndex [get, set]
int | OldCount [get, set]
int | OldIndex [get, set]
QueuedOperationType | Type [get, set]

Detailed Description

Definition at line 1089 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

Constructor & Destructor Documentation

QueuedOperation | ( | QueuedOperationType | type,
 |  | int | oldIndex,
 |  | int | oldCount,
 |  | int | newIndex,
 |  | int | newCount |
 | ) |  |  | [inline]

Definition at line 1091 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

            {
                this.Type = type;
                this.OldIndex = oldIndex;
                this.OldCount = oldCount;
                this.NewIndex = newIndex;
                this.NewCount = newCount;
            }

Property Documentation

int NewCount [get, set]

Definition at line 1104 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

int NewIndex [get, set]

Definition at line 1102 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

int OldCount [get, set]

Definition at line 1103 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

int OldIndex [get, set]

Definition at line 1101 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

QueuedOperationType Type [get, set]

Definition at line 1100 of file ScrollPresenterStackPanelAnchoringPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterStackPanelAnchoringPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresentersWithSimpleContentsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresentersWithSimpleContentsPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollPresentersWithSimpleContentsPage Class Reference

List of all members.

Public Member Functions

ScrollPresentersWithSimpleContentsPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollPresentersWithSimpleContentsPage ()
void | btnClearFullLog_Click (object sender, RoutedEventArgs e)
void | btnGetFullLog_Click (object sender, RoutedEventArgs e)
void | btnResetViews_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | CmbShowScrollPresenter_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ResetView (ScrollPresenter scrollPresenter)
void | ScrollPresenter_ScrollCompleted (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomCompleted (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
void | ScrollPresenterTestHooks_ContentLayoutOffsetXChanged (ScrollPresenter sender, object args)
void | ScrollPresenterTestHooks_ContentLayoutOffsetYChanged (ScrollPresenter sender, object args)

Private Attributes

bool | canScrollPresenter51ContentShrink = true
List< string > | fullLogs = new List<string>()
int | scrollPresenter52ZoomFactorChangeCorrelationId = -1

Detailed Description

Definition at line 26 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresentersWithSimpleContentsPage ( ) [inline]

Definition at line 32 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            this.InitializeComponent();

            this.scrollPresenter11.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter21.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter31.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter41.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter51.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter11.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter21.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter31.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter41.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter51.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter11.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter21.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter31.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter41.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter51.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter11.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter21.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter31.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter41.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter51.ZoomCompleted += ScrollPresenter_ZoomCompleted;

            this.scrollPresenter12.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter22.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter32.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter42.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter52.StateChanged += ScrollPresenter_StateChanged;
            this.scrollPresenter12.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter22.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter32.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter42.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter52.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollPresenter12.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter22.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter32.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter42.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter52.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollPresenter11.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter21.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter31.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter41.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollPresenter51.ZoomCompleted += ScrollPresenter_ZoomCompleted;

            ScrollPresenterTestHooks.ContentLayoutOffsetXChanged += ScrollPresenterTestHooks_ContentLayoutOffsetXChanged;
            ScrollPresenterTestHooks.ContentLayoutOffsetYChanged += ScrollPresenterTestHooks_ContentLayoutOffsetYChanged;
        }

~ScrollPresentersWithSimpleContentsPage ( ) [inline, private]

Definition at line 82 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
        }

Member Function Documentation

void btnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 325 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            this.fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
        }

void btnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 317 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            foreach (string log in this.fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
        }

void btnResetViews_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 331 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            this.txtResetStatus.Text = "Resetting views ...";
            ResetView(this.scrollPresenter11);
            ResetView(this.scrollPresenter21);
            ResetView(this.scrollPresenter31);
            ResetView(this.scrollPresenter41);
            ResetView(this.scrollPresenter51);
            ResetView(this.scrollPresenter12);
            ResetView(this.scrollPresenter22);
            ResetView(this.scrollPresenter32);
            ResetView(this.scrollPresenter42);
            ResetView(this.scrollPresenter52);
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 254 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            //Turn on info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 262 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            //Turn off info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void CmbShowScrollPresenter_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 148 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            if (this.scrollPresenter11 != null)
            {
                if (cmbShowScrollPresenter.SelectedIndex == 0)
                {
                    this.scrollPresenter11.Visibility = Visibility.Visible;
                    this.scrollPresenter21.Visibility = Visibility.Visible;
                    this.scrollPresenter31.Visibility = Visibility.Visible;
                    this.scrollPresenter41.Visibility = Visibility.Visible;
                    this.scrollPresenter51.Visibility = Visibility.Visible;
                    this.scrollPresenter12.Visibility = Visibility.Visible;
                    this.scrollPresenter22.Visibility = Visibility.Visible;
                    this.scrollPresenter32.Visibility = Visibility.Visible;
                    this.scrollPresenter42.Visibility = Visibility.Visible;
                    this.scrollPresenter52.Visibility = Visibility.Visible;

                    this.scrollPresenter11.Width = double.NaN;
                    this.scrollPresenter21.Width = double.NaN;
                    this.scrollPresenter31.Width = double.NaN;
                    this.scrollPresenter41.Width = double.NaN;
                    this.scrollPresenter51.Width = double.NaN;
                    this.scrollPresenter12.Width = double.NaN;
                    this.scrollPresenter22.Width = double.NaN;
                    this.scrollPresenter32.Width = double.NaN;
                    this.scrollPresenter42.Width = double.NaN;
                    this.scrollPresenter52.Width = double.NaN;
                    this.scrollPresenter11.Height = double.NaN;
                    this.scrollPresenter21.Height = double.NaN;
                    this.scrollPresenter31.Height = double.NaN;
                    this.scrollPresenter41.Height = double.NaN;
                    this.scrollPresenter51.Height = double.NaN;
                    this.scrollPresenter12.Height = double.NaN;
                    this.scrollPresenter22.Height = double.NaN;
                    this.scrollPresenter32.Height = double.NaN;
                    this.scrollPresenter42.Height = double.NaN;
                    this.scrollPresenter52.Height = double.NaN;

                    for (int rowIndex = 2; rowIndex < 4; rowIndex++)
                        this.rootGrid.RowDefinitions[rowIndex].Height = new GridLength(1, GridUnitType.Star);

                    for (int columnIndex = 0; columnIndex < 5; columnIndex++)
                        this.rootGrid.ColumnDefinitions[columnIndex].Width = new GridLength(1, GridUnitType.Star);
                }
                else
                {
                    this.scrollPresenter11.Visibility = Visibility.Collapsed;
                    this.scrollPresenter21.Visibility = Visibility.Collapsed;
                    this.scrollPresenter31.Visibility = Visibility.Collapsed;
                    this.scrollPresenter41.Visibility = Visibility.Collapsed;
                    this.scrollPresenter51.Visibility = Visibility.Collapsed;
                    this.scrollPresenter12.Visibility = Visibility.Collapsed;
                    this.scrollPresenter22.Visibility = Visibility.Collapsed;
                    this.scrollPresenter32.Visibility = Visibility.Collapsed;
                    this.scrollPresenter42.Visibility = Visibility.Collapsed;
                    this.scrollPresenter52.Visibility = Visibility.Collapsed;

                    for (int rowIndex = 2; rowIndex < 4; rowIndex++)
                        this.rootGrid.RowDefinitions[rowIndex].Height = GridLength.Auto;

                    for (int columnIndex = 0; columnIndex < 5; columnIndex++)
                        this.rootGrid.ColumnDefinitions[columnIndex].Width = GridLength.Auto;

                    ScrollPresenter scrollPresenter = null;

                    switch (cmbShowScrollPresenter.SelectedIndex)
                    {
                        case 1:
                            scrollPresenter = this.scrollPresenter11;
                            break;
                        case 2:
                            scrollPresenter = this.scrollPresenter21;
                            break;
                        case 3:
                            scrollPresenter = this.scrollPresenter31;
                            break;
                        case 4:
                            scrollPresenter = this.scrollPresenter41;
                            break;
                        case 5:
                            scrollPresenter = this.scrollPresenter51;
                            break;
                        case 6:
                            scrollPresenter = this.scrollPresenter12;
                            break;
                        case 7:
                            scrollPresenter = this.scrollPresenter22;
                            break;
                        case 8:
                            scrollPresenter = this.scrollPresenter32;
                            break;
                        case 9:
                            scrollPresenter = this.scrollPresenter42;
                            break;
                        case 10:
                            scrollPresenter = this.scrollPresenter52;
                            break;
                    }

                    scrollPresenter.Visibility = Visibility.Visible;
                    scrollPresenter.Width = 300;
                    scrollPresenter.Height = 400;
                }
            }
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 270 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                this.fullLogs.Add("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 86 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ResetView ( ScrollPresenter scrollPresenter ) [inline, private]

Definition at line 346 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            int viewChangeCorrelationId = scrollPresenter.ScrollTo(
                0.0,
                0.0,
                new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            this.fullLogs.Add(scrollPresenter.Name + " ScrollTo requested. Id=" + viewChangeCorrelationId);

            viewChangeCorrelationId = scrollPresenter.ZoomTo(
                1.0f,
                System.Numerics.Vector2.Zero,
                new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            this.fullLogs.Add(scrollPresenter.Name + " ZoomTo requested. Id=" + viewChangeCorrelationId);
            if (this.scrollPresenter52 == scrollPresenter)
            {
                scrollPresenter52ZoomFactorChangeCorrelationId = viewChangeCorrelationId;
            }
        }

void ScrollPresenter_ScrollCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 129 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

            this.fullLogs.Add(sender.Name + " ScrollCompleted OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 94 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            this.txtScrollPresenterState.Text = sender.Name + " " + sender.State.ToString();
            this.fullLogs.Add(sender.Name + " StateChanged S=" + sender.State.ToString());

            if (!canScrollPresenter51ContentShrink && sender == scrollPresenter51 && scrollPresenter51.State == ScrollingInteractionState.Idle)
            {
                canScrollPresenter51ContentShrink = true;
            }
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 105 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            this.txtScrollPresenterHorizontalOffset.Text = sender.HorizontalOffset.ToString();
            this.txtScrollPresenterVerticalOffset.Text = sender.VerticalOffset.ToString();
            this.txtScrollPresenterZoomFactor.Text = sender.ZoomFactor.ToString();
            this.fullLogs.Add(sender.Name + " ViewChanged H=" + this.txtScrollPresenterHorizontalOffset.Text + ", V=" + this.txtScrollPresenterVerticalOffset.Text + ", S=" + this.txtScrollPresenterZoomFactor.Text);

            if (canScrollPresenter51ContentShrink && sender == scrollPresenter51)
            {
                FrameworkElement content = scrollPresenter51.Content as FrameworkElement;

                if (scrollPresenter51.HorizontalOffset > scrollPresenter51.ScrollableWidth + 20.0)
                {
                    canScrollPresenter51ContentShrink = false;
                    content.Width -= 30.0;
                }
                if (scrollPresenter51.VerticalOffset > scrollPresenter51.ScrollableHeight + 25.0)
                {
                    canScrollPresenter51ContentShrink = false;
                    content.Height -= 40.0;
                }
            }
        }

void ScrollPresenter_ZoomCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 136 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

            this.fullLogs.Add(sender.Name + " ZoomCompleted ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);

            if (this.scrollPresenter52ZoomFactorChangeCorrelationId == args.CorrelationId)
            {
                this.txtResetStatus.Text = "Views reset";
            }
        }

void ScrollPresenterTestHooks_ContentLayoutOffsetXChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 299 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            float contentLayoutOffsetX = 0.0f;

            ScrollPresenterTestHooks.GetContentLayoutOffsetX(sender, out contentLayoutOffsetX);

            txtScrollPresenterContentLayoutOffsetX.Text = contentLayoutOffsetX.ToString();
        }

void ScrollPresenterTestHooks_ContentLayoutOffsetYChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 308 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

        {
            float contentLayoutOffsetY = 0.0f;

            ScrollPresenterTestHooks.GetContentLayoutOffsetY(sender, out contentLayoutOffsetY);

            txtScrollPresenterContentLayoutOffsetY.Text = contentLayoutOffsetY.ToString();
        }

Member Data Documentation

bool canScrollPresenter51ContentShrink = true [private]

Definition at line 30 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

List<string> fullLogs = new List<string>() [private]

Definition at line 28 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

int scrollPresenter52ZoomFactorChangeCorrelationId = -1 [private]

Definition at line 29 of file ScrollPresentersWithSimpleContentsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresentersWithSimpleContentsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterWithBiDirectionalScrollControllerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterWithBiDirectionalScrollControllerPage
Public Member Functions | Private Member Functions

ScrollPresenterWithBiDirectionalScrollControllerPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterWithBiDirectionalScrollControllerPage ()

Private Member Functions

void | BiDirectionalScrollController_LogMessage (BiDirectionalScrollController sender, string args)
void | BtnClearLog_Click (object sender, RoutedEventArgs e)
void | BtnResetScrollPresenterScrollControllers_Click (object sender, RoutedEventArgs e)
void | BtnSetScrollPresenterScrollControllers_Click (object sender, RoutedEventArgs e)
void | ChkIsBiDirectionalScrollControllerRailEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkIsBiDirectionalScrollControllerRailEnabled_Unchecked (object sender, RoutedEventArgs e)
void | LogMessage (string message)

Detailed Description

Definition at line 9 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterWithBiDirectionalScrollControllerPage ( ) [inline]

Definition at line 11 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            this.InitializeComponent();
            biDirectionalScrollController.LogMessage += BiDirectionalScrollController_LogMessage;
        }

Member Function Documentation

void BiDirectionalScrollController_LogMessage | ( | BiDirectionalScrollController | sender,
 |  | string | args |
 | ) |  |  | [inline, private]

Definition at line 39 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            LogMessage(args);
        }

void BtnClearLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 52 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            lstLog.Items.Clear();
        }

void BtnResetScrollPresenterScrollControllers_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 23 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            scrollPresenter.HorizontalScrollController = null;
            scrollPresenter.VerticalScrollController = null;
        }

void BtnSetScrollPresenterScrollControllers_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 17 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            scrollPresenter.HorizontalScrollController = biDirectionalScrollController.HorizontalScrollController;
            scrollPresenter.VerticalScrollController = biDirectionalScrollController.VerticalScrollController;
        }

void ChkIsBiDirectionalScrollControllerRailEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 29 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            biDirectionalScrollController.IsRailEnabled = true;
        }

void ChkIsBiDirectionalScrollControllerRailEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            biDirectionalScrollController.IsRailEnabled = false;
        }

void LogMessage ( string message ) [inline, private]

Definition at line 44 of file ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs.

        {
            if (chkLog.IsChecked.Value)
            {
                lstLog.Items.Add(message);
            }
        }

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterWithCompositionScrollControllersPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterWithCompositionScrollControllersPage
Public Member Functions | Private Member Functions

ScrollPresenterWithCompositionScrollControllersPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterWithCompositionScrollControllersPage ()

Private Member Functions

void | BtnClearLog_Click (object sender, RoutedEventArgs e)
void | ChkIsAnimatingThumbOffset_Checked (object sender, RoutedEventArgs e)
void | ChkIsAnimatingThumbOffset_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsHorizontallyScrollable_Checked (object sender, RoutedEventArgs e)
void | ChkIsHorizontallyScrollable_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsThumbPannable_Checked (object sender, RoutedEventArgs e)
void | ChkIsThumbPannable_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsThumbPositionMirrored_Checked (object sender, RoutedEventArgs e)
void | ChkIsThumbPositionMirrored_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsVerticallyScrollable_Checked (object sender, RoutedEventArgs e)
void | ChkIsVerticallyScrollable_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsVisible_Checked (object sender, RoutedEventArgs e)
void | ChkIsVisible_Unchecked (object sender, RoutedEventArgs e)
void | cmbHorizontalOverriddenOffsetsChangeAnimation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollController_SelectionChanged (object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
void | cmbVerticalOverriddenOffsetsChangeAnimation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollController_SelectionChanged (object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
void | CompositionScrollController_LogMessage (CompositionScrollController sender, string args)
void | LogMessage (string message)
void | txtHorizontalOverriddenOffsetsChangeDuration_TextChanged (object sender, TextChangedEventArgs e)
void | txtVerticalOverriddenOffsetsChangeDuration_TextChanged (object sender, TextChangedEventArgs e)

Detailed Description

Definition at line 12 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterWithCompositionScrollControllersPage ( ) [inline]

Definition at line 14 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            this.InitializeComponent();
            horizontalCompositionScrollController.LogMessage += CompositionScrollController_LogMessage;
            verticalCompositionScrollController.LogMessage += CompositionScrollController_LogMessage;
        }

Member Function Documentation

void BtnClearLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 92 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            lstLog.Items.Clear();
        }

void ChkIsAnimatingThumbOffset_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 195 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            if (sender == chkIsAnimatingHorizontalThumbOffset)
                horizontalCompositionScrollController.IsAnimatingThumbOffset = true;
            else
                verticalCompositionScrollController.IsAnimatingThumbOffset = true;
        }

void ChkIsAnimatingThumbOffset_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 203 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            if (sender == chkIsAnimatingHorizontalThumbOffset)
                horizontalCompositionScrollController.IsAnimatingThumbOffset = false;
            else
                verticalCompositionScrollController.IsAnimatingThumbOffset = false;
        }

void ChkIsHorizontallyScrollable_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 97 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            CheckBox chkIsHorizontallyScrollable = sender as CheckBox;
            ComboBox cmbHorizontalScrollController = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? cmbHorizontalScrollController1 : cmbHorizontalScrollController2;
            ScrollPresenter scrollPresenter = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? scrollPresenter1 : scrollPresenter2;

            scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Enabled;
            switch (cmbHorizontalScrollController.SelectedIndex)
            {
                case 1:
                    horizontalCompositionScrollController.IsEnabled = true;
                    break;
                case 2:
                    verticalCompositionScrollController.IsEnabled = true;
                    break;
            }
        }

void ChkIsHorizontallyScrollable_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 115 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            CheckBox chkIsHorizontallyScrollable = sender as CheckBox;
            ComboBox cmbHorizontalScrollController = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? cmbHorizontalScrollController1 : cmbHorizontalScrollController2;
            ScrollPresenter scrollPresenter = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? scrollPresenter1 : scrollPresenter2;

            scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Disabled;
            switch (cmbHorizontalScrollController.SelectedIndex)
            {
                case 1:
                    horizontalCompositionScrollController.IsEnabled = false;
                    break;
                case 2:
                    verticalCompositionScrollController.IsEnabled = false;
                    break;
            }
        }

void ChkIsThumbPannable_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 211 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            if (sender == chkIsHorizontalThumbPannable)
                horizontalCompositionScrollController.IsThumbPannable = true;
            else
                verticalCompositionScrollController.IsThumbPannable = true;
        }

void ChkIsThumbPannable_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 219 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            if (sender == chkIsHorizontalThumbPannable)
                horizontalCompositionScrollController.IsThumbPannable = false;
            else
                verticalCompositionScrollController.IsThumbPannable = false;
        }

void ChkIsThumbPositionMirrored_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 179 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            if (sender == chkIsHorizontalThumbPositionMirrored)
                horizontalCompositionScrollController.IsThumbPositionMirrored = true;
            else
                verticalCompositionScrollController.IsThumbPositionMirrored = true;
        }

void ChkIsThumbPositionMirrored_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 187 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            if (sender == chkIsHorizontalThumbPositionMirrored)
                horizontalCompositionScrollController.IsThumbPositionMirrored = false;
            else
                verticalCompositionScrollController.IsThumbPositionMirrored = false;
        }

void ChkIsVerticallyScrollable_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            CheckBox chkIsVerticallyScrollable = sender as CheckBox;
            ComboBox cmbVerticalScrollController = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? cmbVerticalScrollController1 : cmbVerticalScrollController2;
            ScrollPresenter scrollPresenter = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? scrollPresenter1 : scrollPresenter2;

            scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Enabled;
            switch (cmbVerticalScrollController.SelectedIndex)
            {
                case 1:
                    verticalCompositionScrollController.IsEnabled = true;
                    break;
                case 2:
                    horizontalCompositionScrollController.IsEnabled = true;
                    break;
            }
        }

void ChkIsVerticallyScrollable_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 151 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            CheckBox chkIsVerticallyScrollable = sender as CheckBox;
            ComboBox cmbVerticalScrollController = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? cmbVerticalScrollController1 : cmbVerticalScrollController2;
            ScrollPresenter scrollPresenter = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? scrollPresenter1 : scrollPresenter2;

            scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Disabled;
            switch (cmbVerticalScrollController.SelectedIndex)
            {
                case 1:
                    verticalCompositionScrollController.IsEnabled = false;
                    break;
                case 2:
                    horizontalCompositionScrollController.IsEnabled = false;
                    break;
            }
        }

void ChkIsVisible_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 169 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            scrollPresenter2.Visibility = Visibility.Visible;
        }

void ChkIsVisible_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 174 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            scrollPresenter2.Visibility = Visibility.Collapsed;
        }

void cmbHorizontalOverriddenOffsetsChangeAnimation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 253 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            switch (cmbHorizontalOverriddenOffsetsChangeAnimation.SelectedIndex)
            {
                case 0:
                    horizontalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Default;
                    break;
                case 1:
                    horizontalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Accordion;
                    break;
                case 2:
                    horizontalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Teleportation;
                    break;
            }
        }

void CmbHorizontalScrollController_SelectionChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            ComboBox cmbHorizontalScrollController = sender as ComboBox;
            ScrollPresenter scrollPresenter = cmbHorizontalScrollController == cmbHorizontalScrollController1 ? scrollPresenter1 : scrollPresenter2;
            CompositionScrollController oldCompositionScrollController = scrollPresenter.HorizontalScrollController as CompositionScrollController;

            switch (cmbHorizontalScrollController.SelectedIndex)
            {
                case 0:
                    if (scrollPresenter.HorizontalScrollController != null)
                    {
                        scrollPresenter.HorizontalScrollController = null;
                        LogMessage(scrollPresenter.Name + ".HorizontalScrollController reset");
                    }
                    break;
                case 1:
                    scrollPresenter.HorizontalScrollController = horizontalCompositionScrollController;
                    LogMessage(scrollPresenter.Name + ".HorizontalScrollController set to horizontalScrollController");
                    break;
                case 2:
                    scrollPresenter.HorizontalScrollController = verticalCompositionScrollController;
                    LogMessage(scrollPresenter.Name + ".HorizontalScrollController set to verticalScrollController");
                    break;
            }

            if (oldCompositionScrollController != null)
                oldCompositionScrollController.IsEnabled = true;
        }

void cmbVerticalOverriddenOffsetsChangeAnimation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 269 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            switch (cmbVerticalOverriddenOffsetsChangeAnimation.SelectedIndex)
            {
                case 0:
                    verticalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Default;
                    break;
                case 1:
                    verticalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Accordion;
                    break;
                case 2:
                    verticalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Teleportation;
                    break;
            }
        }

void CmbVerticalScrollController_SelectionChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            ComboBox cmbVerticalScrollController = sender as ComboBox;
            ScrollPresenter scrollPresenter = cmbVerticalScrollController == cmbVerticalScrollController1 ? scrollPresenter1 : scrollPresenter2;
            CompositionScrollController oldCompositionScrollController = scrollPresenter.VerticalScrollController as CompositionScrollController;

            switch (cmbVerticalScrollController.SelectedIndex)
            {
                case 0:
                    if (scrollPresenter.VerticalScrollController != null)
                    {
                        scrollPresenter.VerticalScrollController = null;
                        LogMessage(scrollPresenter.Name + ".VerticalScrollController reset");
                    }
                    break;
                case 1:
                    scrollPresenter.VerticalScrollController = verticalCompositionScrollController;
                    LogMessage(scrollPresenter.Name + ".VerticalScrollController set to verticalScrollController");
                    break;
                case 2:
                    scrollPresenter.VerticalScrollController = horizontalCompositionScrollController;
                    LogMessage(scrollPresenter.Name + ".VerticalScrollController set to horizontalScrollController");
                    break;
            }

            if (oldCompositionScrollController != null)
                oldCompositionScrollController.IsEnabled = true;
        }

void CompositionScrollController_LogMessage | ( | CompositionScrollController | sender,
 |  | string | args |
 | ) |  |  | [inline, private]

Definition at line 21 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            LogMessage(args);
        }

void LogMessage ( string message ) [inline, private]

Definition at line 84 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            if (chkLog.IsChecked.Value)
            {
                lstLog.Items.Add(message);
            }
        }

void txtHorizontalOverriddenOffsetsChangeDuration_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 227 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            try
            {
                double durationOverride = Convert.ToDouble(txtHorizontalOverriddenOffsetsChangeDuration.Text);
                horizontalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.FromMilliseconds(durationOverride);
            }
            catch
            {
                horizontalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.MinValue;
            }
        }

void txtVerticalOverriddenOffsetsChangeDuration_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 240 of file ScrollPresenterWithCompositionScrollControllersPage.xaml.cs.

        {
            try
            {
                double durationOverride = Convert.ToDouble(txtVerticalOverriddenOffsetsChangeDuration.Text);
                verticalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.FromMilliseconds(durationOverride);
            }
            catch
            {
                verticalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.MinValue;
            }
        }

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterWithCompositionScrollControllersPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterWithSimpleScrollControllersPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterWithSimpleScrollControllersPage
Public Member Functions | Private Member Functions | Private Attributes

ScrollPresenterWithSimpleScrollControllersPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterWithSimpleScrollControllersPage ()

Private Member Functions

void | BtnClearLog_Click (object sender, RoutedEventArgs e)
void | BtnResetHorizontalScrollController_Click (object sender, RoutedEventArgs e)
void | BtnResetVerticalScrollController_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollController_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollController_Click (object sender, RoutedEventArgs e)
void | ChkLog_Checked (object sender, RoutedEventArgs e)
void | ChkLog_Unchecked (object sender, RoutedEventArgs e)
void | CmbIScrollControllerConsumer_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | LogMessage (string message)
void | ScrollPresenterWithSimpleScrollControllersPageOnLoaded (object sender, RoutedEventArgs e)

Private Attributes

CanvasScrollControllerConsumer | canvasScrollControllerConsumer = null
IScrollController | horizontalScrollController = null
IScrollController | verticalScrollController = null

Detailed Description

Definition at line 19 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterWithSimpleScrollControllersPage ( ) [inline]

Definition at line 25 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += ScrollPresenterWithSimpleScrollControllersPageOnLoaded;
        }

Member Function Documentation

void BtnClearLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 132 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            lstLog.Items.Clear();
        }

void BtnResetHorizontalScrollController_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 97 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (scrollPresenter != null && scrollPresenter.HorizontalScrollController != null)
            {
                scrollPresenter.HorizontalScrollController = null;
                LogMessage("ScrollPresenter.HorizontalScrollController reset");
            }

            if (canvasScrollControllerConsumer != null && canvasScrollControllerConsumer.HorizontalScrollController != null)
            {
                canvasScrollControllerConsumer.HorizontalScrollController = null;
                LogMessage("CanvasScrollControllerConsumer.HorizontalScrollController reset");
            }

            if (horizontalScrollController != null)
                ((ScrollBarController)horizontalScrollController).IsEnabled = false;
        }

void BtnResetVerticalScrollController_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 115 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (scrollPresenter != null && scrollPresenter.VerticalScrollController != null)
            {
                scrollPresenter.VerticalScrollController = null;
                LogMessage("ScrollPresenter.VerticalScrollController reset");
            }
            if (canvasScrollControllerConsumer != null && canvasScrollControllerConsumer.VerticalScrollController != null)
            {
                canvasScrollControllerConsumer.VerticalScrollController = null;
                LogMessage("CanvasScrollControllerConsumer.VerticalScrollController reset");
            }

            if (verticalScrollController != null)
                ((ScrollBarController)verticalScrollController).IsEnabled = false;
        }

void BtnSetHorizontalScrollController_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (horizontalScrollController == null)
            {
                horizontalScrollController = new ScrollBarController(horizontalScrollBar, lstLog, chkLog.IsChecked.Value);
            }

            ((ScrollBarController)horizontalScrollController).IsEnabled = true;

            if (cmbIScrollControllerConsumer.SelectedIndex == 0)
            {
                if (scrollPresenter.HorizontalScrollController != horizontalScrollController)
                {
                    scrollPresenter.HorizontalScrollController = horizontalScrollController;
                    LogMessage("ScrollPresenter.HorizontalScrollController set");
                }
            }
            else if (canvasScrollControllerConsumer.HorizontalScrollController != horizontalScrollController)
            {
                canvasScrollControllerConsumer.HorizontalScrollController = horizontalScrollController;
                LogMessage("CanvasScrollControllerConsumer.HorizontalScrollController set");
            }
        }

void BtnSetVerticalScrollController_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (verticalScrollController == null)
            {
                verticalScrollController = new ScrollBarController(verticalScrollBar, lstLog, chkLog.IsChecked.Value);
            }

            ((ScrollBarController)verticalScrollController).IsEnabled = true;

            if (cmbIScrollControllerConsumer.SelectedIndex == 0)
            {
                if (scrollPresenter.VerticalScrollController != verticalScrollController)
                {
                    scrollPresenter.VerticalScrollController = verticalScrollController;
                    LogMessage("ScrollPresenter.VerticalScrollController set");
                }
            }
            else if (canvasScrollControllerConsumer.VerticalScrollController != verticalScrollController)
            {
                canvasScrollControllerConsumer.VerticalScrollController = verticalScrollController;
                LogMessage("CanvasScrollControllerConsumer.VerticalScrollController set");
            }
        }

void ChkLog_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 173 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (canvasScrollControllerConsumer != null)
                canvasScrollControllerConsumer.IsLogging = true;
            if (horizontalScrollController != null)
                ((ScrollBarController)horizontalScrollController).IsLogging = true;
            if (verticalScrollController != null)
                ((ScrollBarController)verticalScrollController).IsLogging = true;
        }

void ChkLog_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 183 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (canvasScrollControllerConsumer != null)
                canvasScrollControllerConsumer.IsLogging = false;
            if (horizontalScrollController != null)
                ((ScrollBarController)horizontalScrollController).IsLogging = false;
            if (verticalScrollController != null)
                ((ScrollBarController)verticalScrollController).IsLogging = false;
        }

void CmbIScrollControllerConsumer_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 137 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (lstLog != null)
            {
                BtnResetHorizontalScrollController_Click(null, null);
                BtnResetVerticalScrollController_Click(null, null);

                if (cmbIScrollControllerConsumer.SelectedIndex == 0)
                {
                    scrollPresenter.Visibility = Visibility.Visible;
                    canvas.Visibility = Visibility.Collapsed;
                }
                else
                {
                    scrollPresenter.Visibility = Visibility.Collapsed;
                    canvas.Visibility = Visibility.Visible;
                }

                if (cmbIScrollControllerConsumer.SelectedIndex == 1)
                {
                    if (canvasScrollControllerConsumer == null)
                    {
                        canvasScrollControllerConsumer = new CanvasScrollControllerConsumer(lstLog, canvas, img2, chkLog.IsChecked.Value);
                    }

                    canvasScrollControllerConsumer.IsEnabled = true;
                }
                else
                {
                    canvasScrollControllerConsumer.IsEnabled = false;
                }

                LogMessage(cmbIScrollControllerConsumer.SelectedIndex == 0 ? "ScrollPresenter is consumer" : "CanvasScrollControllerConsumer is consumer");
            }
        }

void LogMessage ( string message ) [inline, private]

Definition at line 31 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            if (chkLog.IsChecked.Value)
            {
                lstLog.Items.Add(message);
            }
        }

void ScrollPresenterWithSimpleScrollControllersPageOnLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 39 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

        {
            Rect rect = new Rect(0.0, 0.0, 300.0, 500.0);
            RectangleGeometry rectGeo = new RectangleGeometry();
            rectGeo.Rect = rect;
            this.canvas.Clip = rectGeo;

            CmbIScrollControllerConsumer_SelectionChanged(null, null);
        }

Member Data Documentation

CanvasScrollControllerConsumer canvasScrollControllerConsumer = null [private]

Definition at line 21 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

IScrollController horizontalScrollController = null [private]

Definition at line 22 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

IScrollController verticalScrollController = null [private]

Definition at line 23 of file ScrollPresenterWithSimpleScrollControllersPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterWithSimpleScrollControllersPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterZoomSnapPointsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollPresenterZoomSnapPointsPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollPresenterZoomSnapPointsPage Class Reference

List of all members.

Public Member Functions

ScrollPresenterZoomSnapPointsPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | btnClearFullLog_Click (object sender, RoutedEventArgs e)
void | btnGetFullLog_Click (object sender, RoutedEventArgs e)
void | BtnMIAddSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnMRAddSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnRemoveAll_Click (object sender, RoutedEventArgs e)
void | BtnRemoveFirst_Click (object sender, RoutedEventArgs e)
void | BtnScrollPresenterZoomFactorChange_Click (object sender, RoutedEventArgs e)
void | BtnZoomFactorPlus1With_Click (object sender, RoutedEventArgs e)
void | BtnZoomFactorPlus1Without_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | MarkupScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | MarkupScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenterZoomSnapPointsPage_Loaded (object sender, RoutedEventArgs e)

Private Attributes

List< string > | fullLogs = new List<string>()

Detailed Description

Definition at line 17 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

Constructor & Destructor Documentation

ScrollPresenterZoomSnapPointsPage ( ) [inline]

Definition at line 21 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            this.InitializeComponent();
            Loaded += ScrollPresenterZoomSnapPointsPage_Loaded;
        }

Member Function Documentation

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 190 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void btnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 241 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            this.fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
        }

void btnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 233 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            foreach (string log in this.fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
        }

void BtnMIAddSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            try
            {
                double value = Convert.ToDouble(txtMISnapPointValue.Text);
                ZoomSnapPoint newSnapPoint = new ZoomSnapPoint(value);
                markupScrollPresenter.ZoomSnapPoints.Add(newSnapPoint);
            }
            catch (Exception ex)
            {
                this.fullLogs.Add(ex.ToString());
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnMRAddSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            try
            {
                double offset = Convert.ToDouble(txtMRSnapPointOffset.Text);
                double interval = Convert.ToDouble(txtMRSnapPointInterval.Text);
                double start = Convert.ToDouble(txtMRSnapPointStart.Text);
                double end = Convert.ToDouble(txtMRSnapPointEnd.Text);
                RepeatedZoomSnapPoint newSnapPoint = new RepeatedZoomSnapPoint(offset, interval, start, end);
                markupScrollPresenter.ZoomSnapPoints.Add(newSnapPoint);
            }
            catch (Exception ex)
            {
                this.fullLogs.Add(ex.ToString());
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnRemoveAll_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 141 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.ZoomSnapPoints.Clear();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnRemoveFirst_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 129 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.ZoomSnapPoints.RemoveAt(0);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnScrollPresenterZoomFactorChange_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            try
            {
                float changeAmount = Convert.ToSingle(txtScrollPresenterZoomFactorChange.Text);
                markupScrollPresenter.AddZoomVelocity(changeAmount + 0.05f, null, null);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnZoomFactorPlus1With_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.ZoomBy(1.0f, null, new ScrollingZoomOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Default));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void BtnZoomFactorPlus1Without_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 178 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            try
            {
                markupScrollPresenter.ZoomBy(1.0f, null, new ScrollingZoomOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore));
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 195 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            //Turn on info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 203 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            //Turn off info and verbose logging for the ScrollPresenter type:
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void MarkupScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 51 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            this.txtScrollPresenterState.Text = this.markupScrollPresenter.State.ToString();
        }

void MarkupScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 44 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            this.txtScrollPresenterHorizontalOffset.Text = this.markupScrollPresenter.HorizontalOffset.ToString("F2");
            this.txtScrollPresenterVerticalOffset.Text = this.markupScrollPresenter.VerticalOffset.ToString("F2");
            this.txtScrollPresenterZoomFactor.Text = this.markupScrollPresenter.ZoomFactor.ToString("F2");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 211 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;
            FrameworkElement fe = sender as FrameworkElement;

            if (fe != null)
            {
                senderName = "s:" + fe.Name + ", ";
            }

            if (args.IsVerboseLevel)
            {
                this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                this.fullLogs.Add("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 27 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            if (chkLogScrollPresenterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
            }

            base.OnNavigatedFrom(e);
        }

void ScrollPresenterZoomSnapPointsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

        {
            this.markupScrollPresenter.ViewChanged += MarkupScrollPresenter_ViewChanged;
            this.markupScrollPresenter.StateChanged += MarkupScrollPresenter_StateChanged;
        }

Member Data Documentation

List<string> fullLogs = new List<string>() [private]

Definition at line 19 of file ScrollPresenterZoomSnapPointsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterZoomSnapPointsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewBlankPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewBlankPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollViewBlankPage Class Reference

List of all members.

Public Member Functions

ScrollViewBlankPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollViewBlankPage ()
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | ChkCustomUI_Checked (object sender, RoutedEventArgs e)
void | ChkCustomUI_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | LogScrollPresenterInfo ()
void | LogScrollViewInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_Loaded (object sender, RoutedEventArgs e)
void | ScrollPresenter_ScrollAnimationStarting (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_ScrollCompleted (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_ScrollStarting (ScrollPresenter sender, ScrollingScrollStartingEventArgs args)
void | ScrollPresenter_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomAnimationStarting (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollPresenter_ZoomCompleted (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
void | ScrollPresenter_ZoomStarting (ScrollPresenter sender, ScrollingZoomStartingEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ScrollView_GotFocus (object sender, RoutedEventArgs e)
void | ScrollView_Loaded (object sender, RoutedEventArgs e)
void | ScrollView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ScrollView_LostFocus (object sender, RoutedEventArgs e)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_ScrollStarting (ScrollView sender, ScrollingScrollStartingEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompleted (ScrollView sender, ScrollingZoomCompletedEventArgs args)
void | ScrollView_ZoomStarting (ScrollView sender, ScrollingZoomStartingEventArgs args)

Private Attributes

object | asyncEventReportingLock = new object()
List< string > | lstAsyncEventMessage = new List<string>()

Detailed Description

Definition at line 25 of file ScrollViewBlankPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewBlankPage ( ) [inline]

Definition at line 30 of file ScrollViewBlankPage.xaml.cs.

        {
            this.InitializeComponent();

            if (chkLogScrollViewMessages.IsChecked == true || chkLogScrollPresenterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogScrollPresenterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }
        }

~ScrollViewBlankPage ( ) [inline, private]

Definition at line 49 of file ScrollViewBlankPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 420 of file ScrollViewBlankPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }
                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 453 of file ScrollViewBlankPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 465 of file ScrollViewBlankPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 265 of file ScrollViewBlankPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void ChkCustomUI_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file ScrollViewBlankPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Visible;
        }

void ChkCustomUI_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 69 of file ScrollViewBlankPage.xaml.cs.

        {
            if (grdCustomUI != null)
                grdCustomUI.Visibility = Visibility.Collapsed;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 75 of file ScrollViewBlankPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 81 of file ScrollViewBlankPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 270 of file ScrollViewBlankPage.xaml.cs.

        {
            if (scrollView != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.Loaded += ScrollPresenter_Loaded;
                    scrollPresenter.SizeChanged += ScrollPresenter_SizeChanged;
                    scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
                    scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
                    scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
                    scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
                    scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
                }
            }
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 293 of file ScrollViewBlankPage.xaml.cs.

        {
            if (scrollView != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.Loaded -= ScrollPresenter_Loaded;
                    scrollPresenter.SizeChanged -= ScrollPresenter_SizeChanged;
                    scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
                    scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
                    scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
                    scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
                    scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompleted;
                }
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 360 of file ScrollViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 367 of file ScrollViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 316 of file ScrollViewBlankPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.GettingFocus += ScrollView_GettingFocus;
                scrollView.GotFocus += ScrollView_GotFocus;
                scrollView.LosingFocus += ScrollView_LosingFocus;
                scrollView.LostFocus += ScrollView_LostFocus;
                scrollView.Loaded += ScrollView_Loaded;
                scrollView.SizeChanged += ScrollView_SizeChanged;
                scrollView.ExtentChanged += ScrollView_ExtentChanged;
                scrollView.StateChanged += ScrollView_StateChanged;
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollStarting += ScrollView_ScrollStarting;
                scrollView.ZoomStarting += ScrollView_ZoomStarting;
                scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 338 of file ScrollViewBlankPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.GettingFocus -= ScrollView_GettingFocus;
                scrollView.GotFocus -= ScrollView_GotFocus;
                scrollView.LosingFocus -= ScrollView_LosingFocus;
                scrollView.LostFocus -= ScrollView_LostFocus;
                scrollView.Loaded -= ScrollView_Loaded;
                scrollView.SizeChanged -= ScrollView_SizeChanged;
                scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                scrollView.StateChanged -= ScrollView_StateChanged;
                scrollView.ViewChanged -= ScrollView_ViewChanged;
                scrollView.ScrollStarting -= ScrollView_ScrollStarting;
                scrollView.ZoomStarting -= ScrollView_ZoomStarting;
                scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 374 of file ScrollViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 381 of file ScrollViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void LogScrollPresenterInfo ( ) [inline, private]

Definition at line 247 of file ScrollViewBlankPage.xaml.cs.

        {
            ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

            AppendAsyncEventMessage($"ScrollPresenter Info: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
            AppendAsyncEventMessage($"ScrollPresenter Info: ViewportWidth={scrollPresenter.ViewportWidth}, ExtentHeight={scrollPresenter.ViewportHeight}");
            AppendAsyncEventMessage($"ScrollPresenter Info: ExtentWidth={scrollPresenter.ExtentWidth}, ExtentHeight={scrollPresenter.ExtentHeight}");
            AppendAsyncEventMessage($"ScrollPresenter Info: ScrollableWidth={scrollPresenter.ScrollableWidth}, ScrollableHeight={scrollPresenter.ScrollableHeight}");
        }

void LogScrollViewInfo ( ) [inline, private]

Definition at line 257 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
            AppendAsyncEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 388 of file ScrollViewBlankPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 53 of file ScrollViewBlankPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 157 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
        }

void ScrollPresenter_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 137 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.Loaded");
            LogScrollPresenterInfo();
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
        }

void ScrollPresenter_ScrollAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 182 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
        }

void ScrollPresenter_ScrollCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 192 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollPresenter_ScrollStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 172 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollStarting OffsetsChangeCorrelationId={args.CorrelationId}, HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
        }

void ScrollPresenter_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 147 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
            LogScrollPresenterInfo();
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 162 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.StateChanged {sender.State.ToString()}");
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 167 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollPresenter_ZoomAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 187 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollPresenter_ZoomCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 197 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

void ScrollPresenter_ZoomStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 177 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 202 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
        }

void ScrollView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 107 of file ScrollViewBlankPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ScrollView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ScrollView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 132 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.GotFocus");
        }

void ScrollView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 87 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.Loaded");
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                LogScrollPresenterInfo();
            }
            LogScrollViewInfo();
        }

void ScrollView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 122 of file ScrollViewBlankPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ScrollView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ScrollView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.LostFocus");
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 227 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 237 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_ScrollStarting | ( | ScrollView | sender,
 |  | ScrollingScrollStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 217 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollStarting OffsetsChangeCorrelationId={args.CorrelationId}, HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 97 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                LogScrollPresenterInfo();
            }
            LogScrollViewInfo();
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 207 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 212 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 232 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}");
        }

void ScrollView_ZoomCompleted | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 242 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_ZoomStarting | ( | ScrollView | sender,
 |  | ScrollingZoomStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 222 of file ScrollViewBlankPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
        }

Member Data Documentation

object asyncEventReportingLock = new object() [private]

Definition at line 27 of file ScrollViewBlankPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 28 of file ScrollViewBlankPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewBlankPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewBringIntoViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewBringIntoViewPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollViewBringIntoViewPage Class Reference

List of all members.

Public Member Functions

ScrollViewBringIntoViewPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollViewBringIntoViewPage ()
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnStartBringIntoView_Click (object sender, RoutedEventArgs e)
void | ChkBringIntoViewUI_Checked (object sender, RoutedEventArgs e)
void | ChkBringIntoViewUI_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | FrameworkElement_BringIntoViewRequested (UIElement sender, BringIntoViewRequestedEventArgs args)
void | LogScrollPresenterInfo ()
void | LogScrollViewInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenter_BringingIntoView (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_Loaded (object sender, RoutedEventArgs e)
void | ScrollPresenter_ScrollAnimationStarting (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_ScrollCompleted (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomAnimationStarting (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollPresenter_ZoomCompleted (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
void | ScrollView_BringingIntoView (ScrollView sender, ScrollingBringingIntoViewEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ScrollView_GotFocus (object sender, RoutedEventArgs e)
void | ScrollView_Loaded (object sender, RoutedEventArgs e)
void | ScrollView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ScrollView_LostFocus (object sender, RoutedEventArgs e)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollCompleted (ScrollView sender, ScrollingScrollCompletedEventArgs args)
void | ScrollView_SizeChanged (object sender, SizeChangedEventArgs e)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomCompleted (ScrollView sender, ScrollingZoomCompletedEventArgs args)

Private Attributes

object | asyncEventReportingLock = new object()
List< string > | lstAsyncEventMessage = new List<string>()

Detailed Description

Definition at line 24 of file ScrollViewBringIntoViewPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewBringIntoViewPage ( ) [inline]

Definition at line 29 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            this.InitializeComponent();

            if (chkLogScrollViewMessages.IsChecked == true || chkLogScrollPresenterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                if (chkLogScrollPresenterMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
                if (chkLogScrollViewMessages.IsChecked == true)
                {
                    MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                }
            }
        }

~ScrollViewBringIntoViewPage ( ) [inline, private]

Definition at line 48 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 528 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }
                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 561 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 573 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 358 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnStartBringIntoView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 62 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            try
            {
                txtStockOffsetsChangeDuration.Text = string.Empty;

                FrameworkElement targetElement = null;

                switch (cmbTargetElement.SelectedIndex)
                {
                    case 0:
                        targetElement = rectangle;
                        break;
                    case 1:
                        targetElement = scrollView;
                        break;
                }

                if (targetElement != null)
                {
                    BringIntoViewOptions options = new BringIntoViewOptions();

                    options.AnimationDesired = cmbAnimationDesired.SelectedIndex == 0;
                    options.HorizontalAlignmentRatio = Convert.ToDouble(txtHorizontalAlignmentRatio.Text);
                    options.VerticalAlignmentRatio = Convert.ToDouble(txtVerticalAlignmentRatio.Text);
                    options.HorizontalOffset = Convert.ToDouble(txtHorizontalOffset.Text);
                    options.VerticalOffset = Convert.ToDouble(txtVerticalOffset.Text);

                    if (chkLogScrollViewMessages.IsChecked == true)
                    {
                        AppendAsyncEventMessage("Invoking StartBringIntoView on " + targetElement.Name);
                    }
                    targetElement.StartBringIntoView(options);
                }

                if (targetElement == null && chkLogScrollViewMessages.IsChecked == true)
                {
                    AppendAsyncEventMessage("TargetElement not found");
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void ChkBringIntoViewUI_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 109 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (grdBringIntoViewUI != null)
                grdBringIntoViewUI.Visibility = Visibility.Visible;
        }

void ChkBringIntoViewUI_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 115 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (grdBringIntoViewUI != null)
                grdBringIntoViewUI.Visibility = Visibility.Collapsed;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 121 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 127 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 378 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (scrollView != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.Loaded += ScrollPresenter_Loaded;
                    scrollPresenter.SizeChanged += ScrollPresenter_SizeChanged;
                    scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
                    scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
                    scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
                    scrollPresenter.BringingIntoView += ScrollPresenter_BringingIntoView;
                    scrollPresenter.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
                }
            }
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 401 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (scrollView != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.Loaded -= ScrollPresenter_Loaded;
                    scrollPresenter.SizeChanged -= ScrollPresenter_SizeChanged;
                    scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
                    scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
                    scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompleted;
                    scrollPresenter.BringingIntoView -= ScrollPresenter_BringingIntoView;
                    scrollPresenter.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
                }
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 468 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 475 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 424 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.GettingFocus += ScrollView_GettingFocus;
                scrollView.GotFocus += ScrollView_GotFocus;
                scrollView.LosingFocus += ScrollView_LosingFocus;
                scrollView.LostFocus += ScrollView_LostFocus;
                scrollView.Loaded += ScrollView_Loaded;
                scrollView.SizeChanged += ScrollView_SizeChanged;
                scrollView.ExtentChanged += ScrollView_ExtentChanged;
                scrollView.StateChanged += ScrollView_StateChanged;
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
                scrollView.BringingIntoView += ScrollView_BringingIntoView;
                scrollView.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 446 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.GettingFocus -= ScrollView_GettingFocus;
                scrollView.GotFocus -= ScrollView_GotFocus;
                scrollView.LosingFocus -= ScrollView_LosingFocus;
                scrollView.LostFocus -= ScrollView_LostFocus;
                scrollView.Loaded -= ScrollView_Loaded;
                scrollView.SizeChanged -= ScrollView_SizeChanged;
                scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                scrollView.StateChanged -= ScrollView_StateChanged;
                scrollView.ViewChanged -= ScrollView_ViewChanged;
                scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
                scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
                scrollView.BringingIntoView -= ScrollView_BringingIntoView;
                scrollView.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 482 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 489 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void FrameworkElement_BringIntoViewRequested | ( | UIElement | sender,
 |  | BringIntoViewRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 363 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            string asyncEventMessage = "BringIntoViewRequested Sender=" + (sender as FrameworkElement).Name;
            asyncEventMessage += ", AnimationDesired=" + args.AnimationDesired + ", Handled=" + args.Handled;
            asyncEventMessage += ", HorizontalAlignmentRatio=" + args.HorizontalAlignmentRatio + ", VerticalAlignmentRatio=" + args.VerticalAlignmentRatio;
            asyncEventMessage += ", HorizontalOffset=" + args.HorizontalOffset + ", VerticalOffset=" + args.VerticalOffset;
            asyncEventMessage += ", TargetRect=" + args.TargetRect + ", TargetElement=" + (args.TargetElement as FrameworkElement).Name;
            asyncEventMessage += ", OriginalSource=";
            if (args.OriginalSource == null)
                asyncEventMessage += "null";
            else
                asyncEventMessage += (args.OriginalSource as FrameworkElement).Name;
            AppendAsyncEventMessage(asyncEventMessage);
        }

void LogScrollPresenterInfo ( ) [inline, private]

Definition at line 340 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

            AppendAsyncEventMessage($"ScrollPresenter Info: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
            AppendAsyncEventMessage($"ScrollPresenter Info: ViewportWidth={scrollPresenter.ViewportWidth}, ExtentHeight={scrollPresenter.ViewportHeight}");
            AppendAsyncEventMessage($"ScrollPresenter Info: ExtentWidth={scrollPresenter.ExtentWidth}, ExtentHeight={scrollPresenter.ExtentHeight}");
            AppendAsyncEventMessage($"ScrollPresenter Info: ScrollableWidth={scrollPresenter.ScrollableWidth}, ScrollableHeight={scrollPresenter.ScrollableHeight}");
        }

void LogScrollViewInfo ( ) [inline, private]

Definition at line 350 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
            AppendAsyncEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
            AppendAsyncEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 496 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 52 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ScrollPresenter_BringingIntoView | ( | ScrollPresenter | sender,
 |  | ScrollingBringingIntoViewEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 259 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            string asyncEventMessage = "BringingIntoView ScrollPresenter=" + sender.Name;
            asyncEventMessage += ", TargetHorizontalOffset=" + args.TargetHorizontalOffset + ", TargetVerticalOffset=" + args.TargetVerticalOffset;
            asyncEventMessage += ", OffsetsChangeCorrelationId=" + args.CorrelationId;
            asyncEventMessage += ", SnapPointsMode=" + args.SnapPointsMode;
            asyncEventMessage += ", RequestEventArgs.AnimationDesired=" + args.RequestEventArgs.AnimationDesired + ", RequestEventArgs.Handled=" + args.RequestEventArgs.Handled;
            asyncEventMessage += ", RequestEventArgs.HorizontalAlignmentRatio=" + args.RequestEventArgs.HorizontalAlignmentRatio + ", RequestEventArgs.VerticalAlignmentRatio=" + args.RequestEventArgs.VerticalAlignmentRatio;
            asyncEventMessage += ", RequestEventArgs.HorizontalOffset=" + args.RequestEventArgs.HorizontalOffset + ", RequestEventArgs.VerticalOffset=" + args.RequestEventArgs.VerticalOffset;
            asyncEventMessage += ", RequestEventArgs.TargetRect=" + args.RequestEventArgs.TargetRect + ", RequestEventArgs.TargetElement=" + (args.RequestEventArgs.TargetElement as FrameworkElement).Name;
            asyncEventMessage += ", OriginalSource=";
            if (args.RequestEventArgs.OriginalSource == null)
                asyncEventMessage += "null";
            else
                asyncEventMessage += (args.RequestEventArgs.OriginalSource as FrameworkElement).Name;
            AppendAsyncEventMessage(asyncEventMessage);

            if (chkCancelOperationInBringingIntoView.IsChecked == true)
            {
                args.Cancel = true;
            }
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 203 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
        }

void ScrollPresenter_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 183 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.Loaded");
            LogScrollPresenterInfo();
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
        }

void ScrollPresenter_ScrollAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 218 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");

            try
            {
                Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;

                if (stockKeyFrameAnimation != null)
                {
                    txtStockOffsetsChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();

                    if (!string.IsNullOrWhiteSpace(txtOverriddenOffsetsChangeDuration.Text))
                    {
                        double durationOverride = Convert.ToDouble(txtOverriddenOffsetsChangeDuration.Text);
                        stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void ScrollPresenter_ScrollCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 249 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollPresenter_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 193 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
            LogScrollPresenterInfo();
            if (chkLogScrollViewEvents.IsChecked == true)
            {
                LogScrollViewInfo();
            }
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 208 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.StateChanged {sender.State.ToString()}");
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 213 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollPresenter_ZoomAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 244 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
        }

void ScrollPresenter_ZoomCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 254 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_BringingIntoView | ( | ScrollView | sender,
 |  | ScrollingBringingIntoViewEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 317 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            string asyncEventMessage = "BringingIntoView ScrollPresenter=" + sender.Name;
            asyncEventMessage += ", TargetHorizontalOffset=" + args.TargetHorizontalOffset + ", TargetVerticalOffset=" + args.TargetVerticalOffset;
            asyncEventMessage += ", OffsetsChangeCorrelationId=" + args.CorrelationId;
            asyncEventMessage += ", SnapPointsMode=" + args.SnapPointsMode;
            asyncEventMessage += ", RequestEventArgs.AnimationDesired=" + args.RequestEventArgs.AnimationDesired + ", RequestEventArgs.Handled=" + args.RequestEventArgs.Handled;
            asyncEventMessage += ", RequestEventArgs.HorizontalAlignmentRatio=" + args.RequestEventArgs.HorizontalAlignmentRatio + ", RequestEventArgs.VerticalAlignmentRatio=" + args.RequestEventArgs.VerticalAlignmentRatio;
            asyncEventMessage += ", RequestEventArgs.HorizontalOffset=" + args.RequestEventArgs.HorizontalOffset + ", RequestEventArgs.VerticalOffset=" + args.RequestEventArgs.VerticalOffset;
            asyncEventMessage += ", RequestEventArgs.TargetRect=" + args.RequestEventArgs.TargetRect + ", RequestEventArgs.TargetElement=" + (args.RequestEventArgs.TargetElement as FrameworkElement).Name;
            asyncEventMessage += ", OriginalSource=";
            if (args.RequestEventArgs.OriginalSource == null)
                asyncEventMessage += "null";
            else
                asyncEventMessage += (args.RequestEventArgs.OriginalSource as FrameworkElement).Name;
            AppendAsyncEventMessage(asyncEventMessage);

            if (chkCancelOperationInBringingIntoView.IsChecked == true)
            {
                args.Cancel = true;
            }
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 282 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
        }

void ScrollView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 153 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ScrollView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ScrollView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 178 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.GotFocus");
        }

void ScrollView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.Loaded");
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                LogScrollPresenterInfo();
            }
            LogScrollViewInfo();
        }

void ScrollView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 168 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage($"ScrollView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ScrollView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 163 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.LostFocus");
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 297 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_ScrollCompleted | ( | ScrollView | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 307 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
        }

void ScrollView_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 143 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
            if (chkLogScrollPresenterEvents.IsChecked == true)
            {
                LogScrollPresenterInfo();
            }
            LogScrollViewInfo();
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 287 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 292 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 302 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}");
        }

void ScrollView_ZoomCompleted | ( | ScrollView | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 312 of file ScrollViewBringIntoViewPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
        }

Member Data Documentation

object asyncEventReportingLock = new object() [private]

Definition at line 26 of file ScrollViewBringIntoViewPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 27 of file ScrollViewBringIntoViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewBringIntoViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewDynamicPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewDynamicPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollViewDynamicPage Class Reference

List of all members.

Public Member Functions

ScrollViewDynamicPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollViewDynamicPage ()
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnAddIrregularSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnAddRepeatedSnapPoint_Click (object sender, RoutedEventArgs e)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnClearSnapPoints_Click (object sender, RoutedEventArgs e)
void | BtnGetComputedHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetComputedVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetContentActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentDesiredSize_Click (object sender, RoutedEventArgs e)
void | BtnGetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetContentPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetContentRenderSize_Click (object sender, RoutedEventArgs e)
void | BtnGetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetCurrentAnchor_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalScrollChainMode_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalScrollRailMode_Click (object sender, RoutedEventArgs e)
void | BtnGetIgnoredInputKinds_Click (object sender, RoutedEventArgs e)
void | BtnGetMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetMinZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalScrollChainMode_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalScrollRailMode_Click (object sender, RoutedEventArgs e)
void | BtnGetWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomChainMode_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomMode_Click (object sender, RoutedEventArgs e)
void | BtnSetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetContentPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollChainMode_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollRailMode_Click (object sender, RoutedEventArgs e)
void | BtnSetIgnoredInputKinds_Click (object sender, RoutedEventArgs e)
void | BtnSetMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetMinZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalAnchorRatio_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollChainMode_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollRailMode_Click (object sender, RoutedEventArgs e)
void | BtnSetWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetZoomChainMode_Click (object sender, RoutedEventArgs e)
void | BtnSetZoomMode_Click (object sender, RoutedEventArgs e)
void | ChkAutoHideScrollControllers_Checked (object sender, RoutedEventArgs e)
void | ChkAutoHideScrollControllers_Indeterminate (object sender, RoutedEventArgs e)
void | ChkAutoHideScrollControllers_Unchecked (object sender, RoutedEventArgs e)
void | ChkContentProperties_Checked (object sender, RoutedEventArgs e)
void | ChkContentProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkIsEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsTabStop_Checked (object sender, RoutedEventArgs e)
void | ChkIsTabStop_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogContentEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogContentEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterClonedProperties_Checked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterClonedProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollViewProperties_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewProperties_Unchecked (object sender, RoutedEventArgs e)
void | CmbBackground_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContent_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentHorizontalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentManipulationMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentVerticalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollBarVisibility_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbSnapPointKind_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollBarVisibility_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbXYFocusKeyboardNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | Content_PointerWheelChanged (object sender, PointerRoutedEventArgs args)
void | CreateChildren ()
Thickness | GetThicknessFromString (string thickness)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
bool | MuxRailModeToWuxRailMode (ScrollingRailMode muxRailingMode)
Microsoft.UI.Xaml.Controls.ScrollBarVisibility | MuxScrollBarVisibilityToWuxScrollBarVisibility (ScrollingScrollBarVisibility muxScrollBarVisibility)
Microsoft.UI.Xaml.Controls.ScrollMode | MuxScrollModeToWuxScrollMode (ScrollingScrollMode muxScrollMode)
Microsoft.UI.Xaml.Controls.ZoomMode | MuxZoomModeToWuxZoomMode (ScrollingZoomMode muxZoomMode)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_PointerWheelChanged (object sender, PointerRoutedEventArgs args)
void | ScrollPresenter_ScrollAnimationStarting (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_ScrollStarting (ScrollPresenter sender, ScrollingScrollStartingEventArgs args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomAnimationStarting (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollPresenter_ZoomStarting (ScrollPresenter sender, ScrollingZoomStartingEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ScrollView_GotFocus (object sender, RoutedEventArgs e)
void | ScrollView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ScrollView_LostFocus (object sender, RoutedEventArgs e)
void | ScrollView_PointerWheelChanged (object sender, PointerRoutedEventArgs args)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_ScrollStarting (ScrollView sender, ScrollingScrollStartingEventArgs args)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ZoomStarting (ScrollView sender, ScrollingZoomStartingEventArgs args)
void | ScrollViewDynamicPage_Loaded (object sender, RoutedEventArgs args)
void | UpdateBackground ()
void | UpdateCmbContentHorizontalAlignment ()
void | UpdateCmbContentManipulationMode ()
void | UpdateCmbContentVerticalAlignment ()
void | UpdateCmbHorizontalScrollBarVisibility ()
void | UpdateCmbVerticalScrollBarVisibility ()
void | UpdateCmbXYFocusKeyboardNavigation ()
void | UpdateContent ()
void | UpdateContentOrientation ()
void | UpdateExtentHeight ()
void | UpdateExtentWidth ()
void | UpdateHeight ()
void | UpdateHorizontalAnchorRatio ()
void | UpdateHorizontalOffset ()
void | UpdateHorizontalScrollChainMode ()
void | UpdateHorizontalScrollMode ()
void | UpdateHorizontalScrollRailMode ()
void | UpdateIgnoredInputKinds ()
void | UpdateMargin ()
void | UpdateMaxZoomFactor ()
void | UpdateMinZoomFactor ()
void | UpdatePadding ()
void | UpdateTblComputedHorizontalScrollMode ()
void | UpdateTblComputedVerticalScrollMode ()
void | UpdateVerticalAnchorRatio ()
void | UpdateVerticalOffset ()
void | UpdateVerticalScrollChainMode ()
void | UpdateVerticalScrollMode ()
void | UpdateVerticalScrollRailMode ()
void | UpdateWidth ()
void | UpdateZoomChainMode ()
void | UpdateZoomFactor ()
void | UpdateZoomMode ()
void | UseScrollView (ScrollView sv2)

Private Attributes

Object | asyncEventReportingLock = new Object()
Border | border = null
Button | button = null
PointerEventHandler | contentPointerWheelChangedEventHandler = null
Image | largeImg
List< string > | lstAsyncEventMessage = new List<string>()
Rectangle | rectangle = null
PointerEventHandler | scrollPresenterPointerWheelChangedEventHandler = null
ScrollView | scrollView = null
PointerEventHandler | scrollViewPointerWheelChangedEventHandler = null
StackPanel | sp1 = null
StackPanel | sp2 = null
Viewbox | viewbox = null
Border | wuxBorder = null
Button | wuxButton = null
Image | wuxLargeImg
Rectangle | wuxRectangle = null
StackPanel | wuxSp1 = null
StackPanel | wuxSp2 = null
Viewbox | wuxViewbox = null

Detailed Description

Definition at line 21 of file ScrollViewDynamicPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewDynamicPage ( ) [inline]

Definition at line 44 of file ScrollViewDynamicPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += ScrollViewDynamicPage_Loaded;
            CreateChildren();
        }

~ScrollViewDynamicPage ( ) [inline, private]

Definition at line 51 of file ScrollViewDynamicPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 2381 of file ScrollViewDynamicPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }

                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 2414 of file ScrollViewDynamicPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnAddIrregularSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1332 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                    if (scrollPresenter != null)
                    {
                        if (cmbSnapPointKind.SelectedIndex == 0)
                        {
                            ScrollSnapPoint snapPoint = new ScrollSnapPoint(
                                Convert.ToSingle(txtIrregularSnapPointValue.Text),
                                (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
                            if (cmbSnapPointKind.SelectedIndex == 0)
                            {
                                scrollPresenter.VerticalSnapPoints.Add(snapPoint);
                            }
                            else
                            {
                                scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
                            }
                        }
                        else if (cmbSnapPointKind.SelectedIndex == 2)
                        {
                            ZoomSnapPoint snapPoint = new ZoomSnapPoint(
                                Convert.ToSingle(txtIrregularSnapPointValue.Text));
                            scrollPresenter.ZoomSnapPoints.Add(snapPoint);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnAddRepeatedSnapPoint_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1372 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                    if (scrollPresenter != null)
                    {
                        if (cmbSnapPointKind.SelectedIndex == 0 || cmbSnapPointKind.SelectedIndex == 1)
                        {
                            RepeatedScrollSnapPoint snapPoint = new RepeatedScrollSnapPoint(
                                Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
                                Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
                                Convert.ToDouble(txtRepeatedSnapPointStart.Text),
                                Convert.ToDouble(txtRepeatedSnapPointEnd.Text),
                                (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
                            if (cmbSnapPointKind.SelectedIndex == 0)
                            {
                                scrollPresenter.VerticalSnapPoints.Add(snapPoint);
                            }
                            else
                            {
                                scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
                            }
                        }
                        else if (cmbSnapPointKind.SelectedIndex == 2)
                        {
                            RepeatedZoomSnapPoint snapPoint = new RepeatedZoomSnapPoint(
                                Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
                                Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
                                Convert.ToDouble(txtRepeatedSnapPointStart.Text),
                                Convert.ToDouble(txtRepeatedSnapPointEnd.Text));
                            scrollPresenter.ZoomSnapPoints.Add(snapPoint);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2426 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2176 of file ScrollViewDynamicPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnClearSnapPoints_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1418 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView != null)
                {
                    ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                    if (scrollPresenter != null)
                    {
                        if (cmbSnapPointKind.SelectedIndex == 0)
                        {
                            scrollPresenter.VerticalSnapPoints.Clear();
                        }
                        else if (cmbSnapPointKind.SelectedIndex == 1)
                        {
                            scrollPresenter.HorizontalSnapPoints.Clear();
                        }
                        else if (cmbSnapPointKind.SelectedIndex == 2)
                        {
                            scrollPresenter.ZoomSnapPoints.Clear();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnGetComputedHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 469 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateTblComputedHorizontalScrollMode();
        }

void BtnGetComputedVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 474 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateTblComputedVerticalScrollMode();
        }

void BtnGetContentActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1198 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentActualHeight.Text = string.Empty;
            else
            {
                txtContentActualHeight.Text = (scrollView.Content as FrameworkElement).ActualHeight.ToString();

                if ((scrollView.Content as FrameworkElement).ActualHeight != (wuxScrollViewer.Content as FrameworkElement).ActualHeight)
                {
                    lstLogs.Items.Add($"muxScrollView.Content.ActualHeight={(scrollView.Content as FrameworkElement).ActualHeight} != wuxScrollViewer.Content.ActualHeight={(wuxScrollViewer.Content as FrameworkElement).ActualHeight}");
                }
            }
        }

void BtnGetContentActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1183 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentActualWidth.Text = string.Empty;
            else
            {
                txtContentActualWidth.Text = (scrollView.Content as FrameworkElement).ActualWidth.ToString();

                if ((scrollView.Content as FrameworkElement).ActualWidth != (wuxScrollViewer.Content as FrameworkElement).ActualWidth)
                {
                    lstLogs.Items.Add($"muxScrollView.Content.ActualWidth={(scrollView.Content as FrameworkElement).ActualWidth} != wuxScrollViewer.Content.ActualWidth={(wuxScrollViewer.Content as FrameworkElement).ActualWidth}");
                }
            }
        }

void BtnGetContentDesiredSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1213 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null)
                txtContentDesiredSize.Text = string.Empty;
            else
            {
                txtContentDesiredSize.Text = scrollView.Content.DesiredSize.ToString();

                if (scrollView.Content.DesiredSize != (wuxScrollViewer.Content as UIElement).DesiredSize)
                {
                    lstLogs.Items.Add($"muxScrollView.Content.DesiredSize={scrollView.Content.DesiredSize} != wuxScrollViewer.Content.DesiredSize={(wuxScrollViewer.Content as UIElement).DesiredSize}");
                }
            }
        }

void BtnGetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1016 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentHeight.Text = string.Empty;
            else
                txtContentHeight.Text = ((FrameworkElement)scrollView.Content).Height.ToString();
        }

void BtnGetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1101 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentMargin.Text = string.Empty;
            else
                txtContentMargin.Text = ((FrameworkElement)scrollView.Content).Margin.ToString();
        }

void BtnGetContentMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1024 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentMaxHeight.Text = string.Empty;
            else
                txtContentMaxHeight.Text = ((FrameworkElement)scrollView.Content).MaxHeight.ToString();
        }

void BtnGetContentMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 931 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentMaxWidth.Text = string.Empty;
            else
                txtContentMaxWidth.Text = ((FrameworkElement)scrollView.Content).MaxWidth.ToString();
        }

void BtnGetContentMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1008 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentMinHeight.Text = string.Empty;
            else
                txtContentMinHeight.Text = ((FrameworkElement)scrollView.Content).MinHeight.ToString();
        }

void BtnGetContentMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 915 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentMinWidth.Text = string.Empty;
            else
                txtContentMinWidth.Text = ((FrameworkElement)scrollView.Content).MinWidth.ToString();
        }

void BtnGetContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 118 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateContentOrientation();
        }

void BtnGetContentPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1132 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is Control || scrollView.Content is Border || scrollView.Content is StackPanel))
                txtContentPadding.Text = string.Empty;
            else if (scrollView.Content is Control)
                txtContentPadding.Text = ((Control)scrollView.Content).Padding.ToString();
            else if (scrollView.Content is Border)
                txtContentPadding.Text = ((Border)scrollView.Content).Padding.ToString();
            else
                txtContentPadding.Text = ((StackPanel)scrollView.Content).Padding.ToString();
        }

void BtnGetContentRenderSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1228 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null)
                txtContentRenderSize.Text = string.Empty;
            else
            {
                txtContentRenderSize.Text = scrollView.Content.RenderSize.ToString();

                if (scrollView.Content.RenderSize != (wuxScrollViewer.Content as UIElement).RenderSize)
                {
                    lstLogs.Items.Add($"muxScrollView.Content.RenderSize={scrollView.Content.RenderSize} != wuxScrollViewer.Content.RenderSize={(wuxScrollViewer.Content as UIElement).RenderSize}");
                }
            }
        }

void BtnGetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 923 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
                txtContentWidth.Text = string.Empty;
            else
                txtContentWidth.Text = ((FrameworkElement)scrollView.Content).Width.ToString();
        }

void BtnGetCurrentAnchor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 760 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView.CurrentAnchor == null)
                {
                    txtCurrentAnchor.Text = "null";
                }
                else
                {
                    FrameworkElement currentAnchorAsFE = scrollView.CurrentAnchor as FrameworkElement;

                    txtCurrentAnchor.Text = currentAnchorAsFE == null ? "UIElement" : currentAnchorAsFE.Name;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnGetExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 464 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateExtentHeight();
        }

void BtnGetExtentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 459 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateExtentWidth();
        }

void BtnGetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 609 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateHeight();
        }

void BtnGetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 404 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateHorizontalAnchorRatio();
        }

void BtnGetHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 444 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateHorizontalOffset();
        }

void BtnGetHorizontalScrollChainMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 128 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateHorizontalScrollChainMode();
        }

void BtnGetHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 123 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateHorizontalScrollMode();
        }

void BtnGetHorizontalScrollRailMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateHorizontalScrollRailMode();
        }

void BtnGetIgnoredInputKinds_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 163 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateIgnoredInputKinds();
        }

void BtnGetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 847 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateMargin();
        }

void BtnGetMaxZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 173 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateMaxZoomFactor();
        }

void BtnGetMinZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 168 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateMinZoomFactor();
        }

void BtnGetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 867 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdatePadding();
        }

void BtnGetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 424 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateVerticalAnchorRatio();
        }

void BtnGetVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 449 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateVerticalOffset();
        }

void BtnGetVerticalScrollChainMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 143 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateVerticalScrollChainMode();
        }

void BtnGetVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 138 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateVerticalScrollMode();
        }

void BtnGetVerticalScrollRailMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 148 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateVerticalScrollRailMode();
        }

void BtnGetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 589 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateWidth();
        }

void BtnGetZoomChainMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 158 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateZoomChainMode();
        }

void BtnGetZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 454 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateZoomFactor();
        }

void BtnGetZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file ScrollViewDynamicPage.xaml.cs.

        {
            UpdateZoomMode();
        }

void BtnSetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1055 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                double height = Convert.ToDouble(txtContentHeight.Text);

                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).Height = height;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)wuxScrollViewer.Content).Height = height;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1109 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                Thickness margin = GetThicknessFromString(txtContentMargin.Text);

                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).Margin = margin;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)wuxScrollViewer.Content).Margin = margin;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1078 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                double maxHeight = Convert.ToDouble(txtContentMaxHeight.Text);

                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).MaxHeight = maxHeight;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)wuxScrollViewer.Content).MaxHeight = maxHeight;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 985 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                double maxWidth = Convert.ToDouble(txtContentMaxWidth.Text);

                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).MaxWidth = maxWidth;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)wuxScrollViewer.Content).MaxWidth = maxWidth;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1032 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                double minHeight = Convert.ToDouble(txtContentMinHeight.Text);

                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).MinHeight = minHeight;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)wuxScrollViewer.Content).MinHeight = minHeight;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 939 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                double minWidth = Convert.ToDouble(txtContentMinWidth.Text);

                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).MinWidth = minWidth;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)wuxScrollViewer.Content).MinWidth = minWidth;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 178 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
                scrollView.ContentOrientation = co;

                switch (co)
                {
                    case ScrollingContentOrientation.Horizontal:
                        wuxScrollViewer.HorizontalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.HorizontalScrollBarVisibility);
                        wuxScrollViewer.VerticalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
                        break;
                    case ScrollingContentOrientation.Vertical:
                        wuxScrollViewer.HorizontalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
                        wuxScrollViewer.VerticalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.VerticalScrollBarVisibility);
                        break;
                    case ScrollingContentOrientation.Both:
                        wuxScrollViewer.HorizontalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.HorizontalScrollBarVisibility);
                        wuxScrollViewer.VerticalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.VerticalScrollBarVisibility);
                        break;
                    case ScrollingContentOrientation.None:
                        wuxScrollViewer.HorizontalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
                        wuxScrollViewer.VerticalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1144 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                Thickness padding = GetThicknessFromString(txtContentPadding.Text);

                if (scrollView.Content is Control)
                {
                    ((Control)scrollView.Content).Padding = padding;
                }
                else if (scrollView.Content is Border)
                {
                    ((Border)scrollView.Content).Padding = padding;
                }
                else if (scrollView.Content is StackPanel)
                {
                    ((StackPanel)scrollView.Content).Padding = padding;
                }

                if (wuxScrollViewer.Content is Control)
                {
                    ((Control)wuxScrollViewer.Content).Padding = padding;
                }
                else if (wuxScrollViewer.Content is Border)
                {
                    ((Border)wuxScrollViewer.Content).Padding = padding;
                }
                else if (wuxScrollViewer.Content is StackPanel)
                {
                    ((StackPanel)wuxScrollViewer.Content).Padding = padding;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 962 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                double width = Convert.ToDouble(txtContentWidth.Text);

                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).Width = width;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)wuxScrollViewer.Content).Width = width;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 614 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.Height = Convert.ToDouble(txtHeight.Text);

                wuxScrollViewer.Height = scrollView.Height;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 409 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.HorizontalAnchorRatio = Convert.ToDouble(txtHorizontalAnchorRatio.Text);

                wuxScrollViewer.HorizontalAnchorRatio = scrollView.HorizontalAnchorRatio;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalScrollChainMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 228 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingChainMode scm = (ScrollingChainMode)cmbHorizontalScrollChainMode.SelectedIndex;
                scrollView.HorizontalScrollChainMode = scm;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 212 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingScrollMode ssm = (ScrollingScrollMode)cmbHorizontalScrollMode.SelectedIndex;
                scrollView.HorizontalScrollMode = ssm;

                wuxScrollViewer.HorizontalScrollMode = MuxScrollModeToWuxScrollMode(ssm);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalScrollRailMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 242 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingRailMode srm = (ScrollingRailMode)cmbHorizontalScrollRailMode.SelectedIndex;
                scrollView.HorizontalScrollRailMode = srm;

                wuxScrollViewer.IsHorizontalRailEnabled = MuxRailModeToWuxRailMode(srm);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetIgnoredInputKinds_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 334 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingInputKinds ignoredInputKinds;

                switch (cmbIgnoredInputKinds.SelectedIndex)
                {
                    case 0:
                        ignoredInputKinds = ScrollingInputKinds.None;
                        break;
                    case 1:
                        ignoredInputKinds = ScrollingInputKinds.Touch;
                        break;
                    case 2:
                        ignoredInputKinds = ScrollingInputKinds.Pen;
                        break;
                    case 3:
                        ignoredInputKinds = ScrollingInputKinds.MouseWheel;
                        break;
                    case 4:
                        ignoredInputKinds = ScrollingInputKinds.Keyboard;
                        break;
                    case 5:
                        ignoredInputKinds = ScrollingInputKinds.Gamepad;
                        break;
                    default:
                        ignoredInputKinds = ScrollingInputKinds.All;
                        break;
                }

                scrollView.IgnoredInputKinds = ignoredInputKinds;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 852 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.Margin = GetThicknessFromString(txtMargin.Text);

                wuxScrollViewer.Margin = scrollView.Margin;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 389 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.MaxZoomFactor = Convert.ToDouble(txtMaxZoomFactor.Text);

                wuxScrollViewer.MaxZoomFactor = (float)scrollView.MaxZoomFactor;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetMinZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 374 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.MinZoomFactor = Convert.ToDouble(txtMinZoomFactor.Text);

                wuxScrollViewer.MinZoomFactor = (float)scrollView.MinZoomFactor;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 872 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.Padding = GetThicknessFromString(txtPadding.Text);

                wuxScrollViewer.Padding = scrollView.Padding;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalAnchorRatio_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 429 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.VerticalAnchorRatio = Convert.ToDouble(txtVerticalAnchorRatio.Text);

                wuxScrollViewer.VerticalAnchorRatio = scrollView.VerticalAnchorRatio;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalScrollChainMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 274 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingChainMode scm = (ScrollingChainMode)cmbVerticalScrollChainMode.SelectedIndex;
                scrollView.VerticalScrollChainMode = scm;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 258 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingScrollMode ssm = (ScrollingScrollMode)cmbVerticalScrollMode.SelectedIndex;
                scrollView.VerticalScrollMode = ssm;

                wuxScrollViewer.VerticalScrollMode = MuxScrollModeToWuxScrollMode(ssm);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalScrollRailMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 288 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingRailMode srm = (ScrollingRailMode)cmbVerticalScrollRailMode.SelectedIndex;
                scrollView.VerticalScrollRailMode = srm;

                wuxScrollViewer.IsVerticalRailEnabled = MuxRailModeToWuxRailMode(srm);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 594 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.Width = Convert.ToDouble(txtWidth.Text);

                wuxScrollViewer.Width = scrollView.Width;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetZoomChainMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 320 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingChainMode scm = (ScrollingChainMode)cmbZoomChainMode.SelectedIndex;
                scrollView.ZoomChainMode = scm;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 304 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                ScrollingZoomMode szm = (ScrollingZoomMode)cmbZoomMode.SelectedIndex;
                scrollView.ZoomMode = szm;

                wuxScrollViewer.ZoomMode = MuxZoomModeToWuxZoomMode(szm);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void ChkAutoHideScrollControllers_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2339 of file ScrollViewDynamicPage.xaml.cs.

        {
            ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, true);
        }

void ChkAutoHideScrollControllers_Indeterminate | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2334 of file ScrollViewDynamicPage.xaml.cs.

        {
            ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, null);
        }

void ChkAutoHideScrollControllers_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2344 of file ScrollViewDynamicPage.xaml.cs.

        {
            ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, false);
        }

void ChkContentProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 94 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Visible;
        }

void ChkContentProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 100 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Collapsed;
        }

void ChkIsEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 887 of file ScrollViewDynamicPage.xaml.cs.

        {
            scrollView.IsEnabled = true;

            wuxScrollViewer.IsEnabled = true;
        }

void ChkIsEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 894 of file ScrollViewDynamicPage.xaml.cs.

        {
            scrollView.IsEnabled = false;

            wuxScrollViewer.IsEnabled = false;
        }

void ChkIsTabStop_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 901 of file ScrollViewDynamicPage.xaml.cs.

        {
            scrollView.IsTabStop = true;

            wuxScrollViewer.IsTabStop = true;
        }

void ChkIsTabStop_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 908 of file ScrollViewDynamicPage.xaml.cs.

        {
            scrollView.IsTabStop = false;

            wuxScrollViewer.IsTabStop = false;
        }

void ChkLogContentEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2181 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    UIElement content = scrollPresenter.Content;

                    if (content != null)
                    {
                        if (contentPointerWheelChangedEventHandler == null)
                        {
                            contentPointerWheelChangedEventHandler = new PointerEventHandler(Content_PointerWheelChanged);
                        }

                        content.AddHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler, true);
                    }
                }
            }
        }

void ChkLogContentEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2204 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView != null && contentPointerWheelChangedEventHandler != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    UIElement content = scrollPresenter.Content;

                    if (content != null)
                    {
                        content.RemoveHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler);
                    }
                }
            }
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 106 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 112 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2222 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
                    scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
                    scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
                    if (scrollPresenterPointerWheelChangedEventHandler == null)
                    {
                        scrollPresenterPointerWheelChangedEventHandler = new PointerEventHandler(ScrollPresenter_PointerWheelChanged);
                    }
                    scrollPresenter.AddHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler, true);
                }
            }
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2246 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView != null)
            {
                ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
                    scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
                    scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
                    if (scrollPresenterPointerWheelChangedEventHandler != null)
                    {
                        scrollPresenter.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler);
                    }
                }
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2306 of file ScrollViewDynamicPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2313 of file ScrollViewDynamicPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2269 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.ExtentChanged += ScrollView_ExtentChanged;
                scrollView.StateChanged += ScrollView_StateChanged;
                scrollView.ViewChanged += ScrollView_ViewChanged;
                scrollView.ScrollStarting += ScrollView_ScrollStarting;
                scrollView.ZoomStarting += ScrollView_ZoomStarting;
                scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                if (scrollViewPointerWheelChangedEventHandler == null)
                {
                    scrollViewPointerWheelChangedEventHandler = new PointerEventHandler(ScrollView_PointerWheelChanged);
                }
                scrollView.AddHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler, true);
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2288 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView != null)
            {
                scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                scrollView.StateChanged -= ScrollView_StateChanged;
                scrollView.ViewChanged -= ScrollView_ViewChanged;
                scrollView.ScrollStarting -= ScrollView_ScrollStarting;
                scrollView.ZoomStarting -= ScrollView_ZoomStarting;
                scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                if (scrollViewPointerWheelChangedEventHandler != null)
                {
                    scrollView.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler);
                }
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2320 of file ScrollViewDynamicPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2327 of file ScrollViewDynamicPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkScrollPresenterClonedProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 82 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdScrollPresenterClonedProperties != null)
                grdScrollPresenterClonedProperties.Visibility = Visibility.Visible;
        }

void ChkScrollPresenterClonedProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdScrollPresenterClonedProperties != null)
                grdScrollPresenterClonedProperties.Visibility = Visibility.Collapsed;
        }

void ChkScrollViewProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 70 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdScrollViewProperties != null)
                grdScrollViewProperties.Visibility = Visibility.Visible;
        }

void ChkScrollViewProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 76 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (grdScrollViewProperties != null)
                grdScrollViewProperties.Visibility = Visibility.Collapsed;
        }

void CmbBackground_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 629 of file ScrollViewDynamicPage.xaml.cs.

        {
            switch (cmbBackground.SelectedIndex)
            {
                case 0:
                    scrollView.Background = null;
                    break;
                case 1:
                    scrollView.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
                    break;
                case 2:
                    scrollView.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
                    break;
                case 3:
                    scrollView.Background = new SolidColorBrush(Microsoft.UI.Colors.Aqua);
                    break;
            }

            wuxScrollViewer.Background = scrollView.Background;
        }

void CmbContent_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 650 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                FrameworkElement currentContent = scrollView.Content as FrameworkElement;

                if (currentContent != null && contentPointerWheelChangedEventHandler != null)
                {
                    currentContent.RemoveHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler);
                }

                FrameworkElement newContent = null;
                FrameworkElement wuxNewContent = null;

                switch (cmbContent.SelectedIndex)
                {
                    case 1:
                        newContent = smallImg;
                        wuxNewContent = wuxSmallImg;
                        break;
                    case 2:
                        newContent = largeImg;
                        wuxNewContent = wuxLargeImg;
                        break;
                    case 3:
                        newContent = rectangle;
                        wuxNewContent = wuxRectangle;
                        break;
                    case 4:
                        newContent = button;
                        wuxNewContent = wuxButton;
                        break;
                    case 5:
                        newContent = border;
                        wuxNewContent = wuxBorder;
                        break;
                    case 6:
                        newContent = sp1;
                        wuxNewContent = wuxSp1;
                        break;
                    case 7:
                        newContent = sp2;
                        wuxNewContent = wuxSp2;
                        break;
                    case 8:
                        newContent = viewbox;
                        wuxNewContent = wuxViewbox;
                        break;
                    case 9:
                        newContent = spH1;
                        wuxNewContent = wuxSpH1;
                        break;
                }

                if (chkPreserveProperties.IsChecked == true && currentContent != null && newContent != null && wuxNewContent != null)
                {
                    newContent.MinWidth = currentContent.MinWidth;
                    newContent.Width = currentContent.Width;
                    newContent.MaxWidth = currentContent.MaxWidth;
                    newContent.MinHeight = currentContent.MinHeight;
                    newContent.Height = currentContent.Height;
                    newContent.MaxHeight = currentContent.MaxHeight;
                    newContent.Margin = currentContent.Margin;
                    newContent.HorizontalAlignment = currentContent.HorizontalAlignment;
                    newContent.VerticalAlignment = currentContent.VerticalAlignment;

                    if (currentContent is Control && newContent is Control)
                    {
                        ((Control)newContent).Padding = ((Control)currentContent).Padding;
                    }

                    wuxNewContent.MinWidth = currentContent.MinWidth;
                    wuxNewContent.Width = currentContent.Width;
                    wuxNewContent.MaxWidth = currentContent.MaxWidth;
                    wuxNewContent.MinHeight = currentContent.MinHeight;
                    wuxNewContent.Height = currentContent.Height;
                    wuxNewContent.MaxHeight = currentContent.MaxHeight;
                    wuxNewContent.Margin = currentContent.Margin;
                    wuxNewContent.HorizontalAlignment = currentContent.HorizontalAlignment;
                    wuxNewContent.VerticalAlignment = currentContent.VerticalAlignment;

                    if (currentContent is Control && wuxNewContent is Control)
                    {
                        ((Control)wuxNewContent).Padding = ((Control)currentContent).Padding;
                    }
                }

                scrollView.Content = newContent;

                if (newContent != null && chkLogScrollPresenterEvents.IsChecked == true)
                {
                    if (contentPointerWheelChangedEventHandler == null)
                    {
                        contentPointerWheelChangedEventHandler = new PointerEventHandler(Content_PointerWheelChanged);
                    }

                    newContent.AddHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler, true);
                }

                wuxScrollViewer.Content = wuxNewContent;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());

                UpdateContent();
            }
        }

void CmbContentHorizontalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1243 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    wuxScrollViewer.HorizontalContentAlignment =
                    ((FrameworkElement)wuxScrollViewer.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void CmbContentManipulationMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1287 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView.Content is FrameworkElement)
                {
                    switch (cmbContentManipulationMode.SelectedIndex)
                    {
                        case 0:
                            scrollView.Content.ManipulationMode = ManipulationModes.System;
                            break;
                        case 1:
                            scrollView.Content.ManipulationMode = ManipulationModes.None;
                            break;
                    }
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    switch (cmbContentManipulationMode.SelectedIndex)
                    {
                        case 0:
                            (wuxScrollViewer.Content as FrameworkElement).ManipulationMode = ManipulationModes.System;
                            break;
                        case 1:
                            (wuxScrollViewer.Content as FrameworkElement).ManipulationMode = ManipulationModes.None;
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void CmbContentVerticalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1265 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView.Content is FrameworkElement)
                {
                    ((FrameworkElement)scrollView.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
                }

                if (wuxScrollViewer.Content is FrameworkElement)
                {
                    wuxScrollViewer.VerticalContentAlignment =
                    ((FrameworkElement)wuxScrollViewer.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void CmbHorizontalScrollBarVisibility_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 782 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.HorizontalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbHorizontalScrollBarVisibility.SelectedIndex;

                ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
                switch (co)
                {
                    case ScrollingContentOrientation.Vertical:
                    case ScrollingContentOrientation.None:
                        wuxScrollViewer.HorizontalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
                        break;
                    default:
                        wuxScrollViewer.HorizontalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.HorizontalScrollBarVisibility);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void CmbSnapPointKind_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1324 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (cmbSnapPointAlignment != null)
            {
                cmbSnapPointAlignment.IsEnabled = cmbSnapPointKind.SelectedIndex != 2;
            }
        }

void CmbVerticalScrollBarVisibility_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 807 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.VerticalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbVerticalScrollBarVisibility.SelectedIndex;

                ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
                switch (co)
                {
                    case ScrollingContentOrientation.Horizontal:
                    case ScrollingContentOrientation.None:
                        wuxScrollViewer.VerticalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
                        break;
                    default:
                        wuxScrollViewer.VerticalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.VerticalScrollBarVisibility);
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void CmbXYFocusKeyboardNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 832 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                scrollView.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;

                wuxScrollViewer.XYFocusKeyboardNavigation = scrollView.XYFocusKeyboardNavigation;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void Content_PointerWheelChanged | ( | object | sender,
 |  | PointerRoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2061 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"Content.PointerWheelChanged args.Handled={args.Handled}");
        }

void CreateChildren ( ) [inline, private]

Definition at line 1774 of file ScrollViewDynamicPage.xaml.cs.

        {
            largeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
            LinearGradientBrush lgb = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };
            GradientStop gs = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
            lgb.GradientStops.Add(gs);
            gs = new GradientStop() { Color = Microsoft.UI.Colors.White, Offset = 0.5 };
            lgb.GradientStops.Add(gs);
            gs = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
            lgb.GradientStops.Add(gs);
            rectangle = new Rectangle() { Fill = lgb };
            rectangle.Name = "rect";
            button = new Button() { Content = "Button" };
            button.Name = "btn";
            Rectangle borderChild = new Rectangle() { Fill = lgb };
            border = new Border() { BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse), BorderThickness = new Thickness(5), Child = borderChild };
            border.Name = "bdr";

            sp1 = new StackPanel();
            sp1.Name = "sp1";
            Button button1 = new Button() { Content = "Button1" };
            button1.Name = "btn1";
            button1.Margin = new Thickness(50);
            Button button2 = new Button() { Content = "Button2" };
            button2.Name = "btn2";
            button2.Margin = new Thickness(50);
            sp1.Children.Add(button1);
            sp1.Children.Add(button2);

            sp2 = new StackPanel();
            sp2.Name = "sp2";
            sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Indigo) });
            sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Orange) });
            sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple) });
            sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Goldenrod) });

            viewbox = new Viewbox();
            viewbox.Name = "viewbox";
            Rectangle viewboxChild = new Rectangle() { Fill = lgb, Width = 600, Height = 400 };
            viewbox.Child = viewboxChild;

            wuxLargeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
            wuxRectangle = new Rectangle() { Fill = lgb };
            wuxRectangle.Name = "wuxRect";
            wuxButton = new Button() { Content = "Button" };
            wuxButton.Name = "wuxBtn";
            borderChild = new Rectangle() { Fill = lgb };
            wuxBorder = new Border() { BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse), BorderThickness = new Thickness(5), Child = borderChild };
            wuxBorder.Name = "wuxBdr";

            wuxSp1 = new StackPanel();
            wuxSp1.Name = "wuxSp1";
            button1 = new Button() { Content = "Button1" };
            button1.Name = "wuxBtn1";
            button1.Margin = new Thickness(50);
            button2 = new Button() { Content = "Button2" };
            button2.Name = "wuxBtn2";
            button2.Margin = new Thickness(50);
            wuxSp1.Children.Add(button1);
            wuxSp1.Children.Add(button2);

            wuxSp2 = new StackPanel();
            wuxSp2.Name = "wuxSp2";
            wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Indigo) });
            wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Orange) });
            wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple) });
            wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Goldenrod) });

            wuxViewbox = new Viewbox();
            wuxViewbox.Name = "wuxViewbox";
            viewboxChild = new Rectangle() { Fill = lgb, Width = 600, Height = 400 };
            wuxViewbox.Child = viewboxChild;

            rootGrid.Children.RemoveAt(rootGrid.Children.Count - 1);
            rootGrid.Children.RemoveAt(rootGrid.Children.Count - 1);

            spH1.Visibility = Visibility.Visible;
            wuxSpH1.Visibility = Visibility.Visible;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 1854 of file ScrollViewDynamicPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2349 of file ScrollViewDynamicPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

bool MuxRailModeToWuxRailMode ( ScrollingRailMode muxRailingMode ) [inline, private]

Definition at line 2050 of file ScrollViewDynamicPage.xaml.cs.

        {
            switch (muxRailingMode)
            {
                case ScrollingRailMode.Disabled:
                    return false;
                default:
                    return true;
            }
        }

Microsoft.UI.Xaml.Controls.ScrollBarVisibility MuxScrollBarVisibilityToWuxScrollBarVisibility ( ScrollingScrollBarVisibility muxScrollBarVisibility ) [inline, private]

Definition at line 2015 of file ScrollViewDynamicPage.xaml.cs.

        {
            switch (muxScrollBarVisibility)
            {
                case ScrollingScrollBarVisibility.Auto:
                    return Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Auto;
                case ScrollingScrollBarVisibility.Hidden:
                    return Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Hidden;
                default:
                    return Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Visible;
            }
        }

Microsoft.UI.Xaml.Controls.ScrollMode MuxScrollModeToWuxScrollMode ( ScrollingScrollMode muxScrollMode ) [inline, private]

Definition at line 2028 of file ScrollViewDynamicPage.xaml.cs.

        {
            switch (muxScrollMode)
            {
                case ScrollingScrollMode.Disabled:
                    return Microsoft.UI.Xaml.Controls.ScrollMode.Disabled;
                default:
                    return Microsoft.UI.Xaml.Controls.ScrollMode.Enabled;
            }
        }

Microsoft.UI.Xaml.Controls.ZoomMode MuxZoomModeToWuxZoomMode ( ScrollingZoomMode muxZoomMode ) [inline, private]

Definition at line 2039 of file ScrollViewDynamicPage.xaml.cs.

        {
            switch (muxZoomMode)
            {
                case ScrollingZoomMode.Disabled:
                    return Microsoft.UI.Xaml.Controls.ZoomMode.Disabled;
                default:
                    return Microsoft.UI.Xaml.Controls.ZoomMode.Enabled;
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 55 of file ScrollViewDynamicPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2096 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
        }

void ScrollPresenter_PointerWheelChanged | ( | object | sender,
 |  | PointerRoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2131 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.PointerWheelChanged args.Handled={args.Handled}");
        }

void ScrollPresenter_ScrollAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2121 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId + " SP=(" + args.StartPosition.X + "," + args.StartPosition.Y + ") EP=(" + args.EndPosition.X + "," + args.EndPosition.Y + ")");
        }

void ScrollPresenter_ScrollStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2111 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ScrollStarting OffsetsChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2101 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.StateChanged " + sender.State.ToString());
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2106 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
        }

void ScrollPresenter_ZoomAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2126 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint + ", SZF=" + args.StartZoomFactor + ", EZF=" + args.EndZoomFactor);
        }

void ScrollPresenter_ZoomStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2116 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollPresenter.ZoomStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2136 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
        }

void ScrollView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2066 of file ScrollViewDynamicPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage("ScrollView.GettingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
        }

void ScrollView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2091 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.GotFocus");
        }

void ScrollView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2081 of file ScrollViewDynamicPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage("ScrollView.LosingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
        }

void ScrollView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 2076 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.LostFocus");
        }

void ScrollView_PointerWheelChanged | ( | object | sender,
 |  | PointerRoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2171 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.PointerWheelChanged args.Handled={args.Handled}");
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2161 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId);
        }

void ScrollView_ScrollStarting | ( | ScrollView | sender,
 |  | ScrollingScrollStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2151 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ScrollStarting OffsetsChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2141 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.StateChanged " + sender.State.ToString());
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 2146 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2166 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint);
        }

void ScrollView_ZoomStarting | ( | ScrollView | sender,
 |  | ScrollingZoomStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 2156 of file ScrollViewDynamicPage.xaml.cs.

        {
            AppendAsyncEventMessage($"ScrollView.ZoomStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
        }

void ScrollViewDynamicPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 65 of file ScrollViewDynamicPage.xaml.cs.

        {
            UseScrollView(this.markupScrollView);
        }

void UpdateBackground ( ) [inline, private]

Definition at line 1698 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Background == null)
            {
                cmbBackground.SelectedIndex = 0;
            }
            else if ((scrollView.Background as SolidColorBrush).Color == Microsoft.UI.Colors.Transparent)
            {
                cmbBackground.SelectedIndex = 1;
            }
            else if ((scrollView.Background as SolidColorBrush).Color == Microsoft.UI.Colors.AliceBlue)
            {
                cmbBackground.SelectedIndex = 2;
            }
            else if ((scrollView.Background as SolidColorBrush).Color == Microsoft.UI.Colors.Aqua)
            {
                cmbBackground.SelectedIndex = 3;
            }
        }

void UpdateCmbContentHorizontalAlignment ( ) [inline, private]

Definition at line 1450 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView.Content is FrameworkElement)
                {
                    cmbContentHorizontalAlignment.SelectedIndex = (int)((FrameworkElement)scrollView.Content).HorizontalAlignment;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateCmbContentManipulationMode ( ) [inline, private]

Definition at line 1482 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView.Content != null)
                {
                    switch (scrollView.Content.ManipulationMode)
                    {
                        case ManipulationModes.System:
                            cmbContentManipulationMode.SelectedIndex = 0;
                            break;
                        case ManipulationModes.None:
                            cmbContentManipulationMode.SelectedIndex = 1;
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateCmbContentVerticalAlignment ( ) [inline, private]

Definition at line 1466 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                if (scrollView.Content is FrameworkElement)
                {
                    cmbContentVerticalAlignment.SelectedIndex = (int)((FrameworkElement)scrollView.Content).VerticalAlignment;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateCmbHorizontalScrollBarVisibility ( ) [inline, private]

Definition at line 505 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbHorizontalScrollBarVisibility.SelectedIndex = (int)scrollView.HorizontalScrollBarVisibility;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateCmbVerticalScrollBarVisibility ( ) [inline, private]

Definition at line 518 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbVerticalScrollBarVisibility.SelectedIndex = (int)scrollView.VerticalScrollBarVisibility;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateCmbXYFocusKeyboardNavigation ( ) [inline, private]

Definition at line 531 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbXYFocusKeyboardNavigation.SelectedIndex = (int)scrollView.XYFocusKeyboardNavigation;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateContent ( ) [inline, private]

Definition at line 1718 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView.Content == null)
            {
                cmbContent.SelectedIndex = 0;
            }
            else if (scrollView.Content is Image)
            {
                if (((scrollView.Content as Image).Source as BitmapImage).UriSource.AbsolutePath.ToLower().Contains("large"))
                {
                    cmbContent.SelectedIndex = 2;
                }
                else
                {
                    cmbContent.SelectedIndex = 1;
                }
            }
            else if (scrollView.Content is Rectangle)
            {
                cmbContent.SelectedIndex = 3;
            }
            else if (scrollView.Content is Button)
            {
                cmbContent.SelectedIndex = 4;
            }
            else if (scrollView.Content is Border)
            {
                cmbContent.SelectedIndex = 5;
            }
            else if (scrollView.Content is StackPanel)
            {
                if ((scrollView.Content as StackPanel).Children.Count == 2)
                {
                    cmbContent.SelectedIndex = 6;
                }
                else
                {
                    cmbContent.SelectedIndex = 7;
                }
            }
            else if (scrollView.Content is Viewbox)
            {
                cmbContent.SelectedIndex = 8;
            }
        }

void UpdateContentOrientation ( ) [inline, private]

Definition at line 1506 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbContentOrientation.SelectedIndex = (int)scrollView.ContentOrientation;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateExtentHeight ( ) [inline, private]

Definition at line 579 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtExtentHeight.Text = scrollView.ExtentHeight.ToString();

            if (Math.Abs(scrollView.ExtentHeight - wuxScrollViewer.ExtentHeight / wuxScrollViewer.ZoomFactor) > 0.0001)
            {
                lstLogs.Items.Add($"muxScrollView.ExtentHeight={scrollView.ExtentHeight} != wuxScrollViewer.ExtentHeight/wuxScrollViewer.ZoomFactor={wuxScrollViewer.ExtentHeight / wuxScrollViewer.ZoomFactor}");
            }
        }

void UpdateExtentWidth ( ) [inline, private]

Definition at line 569 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtExtentWidth.Text = scrollView.ExtentWidth.ToString();

            if (Math.Abs(scrollView.ExtentWidth - wuxScrollViewer.ExtentWidth / wuxScrollViewer.ZoomFactor) > 0.0001)
            {
                lstLogs.Items.Add($"muxScrollView.ExtentWidth={scrollView.ExtentWidth} != wuxScrollViewer.ExtentWidth/wuxScrollViewer.ZoomFactor={wuxScrollViewer.ExtentWidth / wuxScrollViewer.ZoomFactor}");
            }
        }

void UpdateHeight ( ) [inline, private]

Definition at line 1693 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtHeight.Text = scrollView.Height.ToString();
        }

void UpdateHorizontalAnchorRatio ( ) [inline, private]

Definition at line 544 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtHorizontalAnchorRatio.Text = scrollView.HorizontalAnchorRatio.ToString();
        }

void UpdateHorizontalOffset ( ) [inline, private]

Definition at line 554 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
        }

void UpdateHorizontalScrollChainMode ( ) [inline, private]

Definition at line 1532 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbHorizontalScrollChainMode.SelectedIndex = (int)scrollView.HorizontalScrollChainMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateHorizontalScrollMode ( ) [inline, private]

Definition at line 1519 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbHorizontalScrollMode.SelectedIndex = (int)scrollView.HorizontalScrollMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateHorizontalScrollRailMode ( ) [inline, private]

Definition at line 1545 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbHorizontalScrollRailMode.SelectedIndex = (int)scrollView.HorizontalScrollRailMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateIgnoredInputKinds ( ) [inline, private]

Definition at line 1649 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                switch (scrollView.IgnoredInputKinds)
                {
                    case ScrollingInputKinds.None:
                        cmbIgnoredInputKinds.SelectedIndex = 0;
                        break;
                    case ScrollingInputKinds.Touch:
                        cmbIgnoredInputKinds.SelectedIndex = 1;
                        break;
                    case ScrollingInputKinds.Pen:
                        cmbIgnoredInputKinds.SelectedIndex = 2;
                        break;
                    case ScrollingInputKinds.MouseWheel:
                        cmbIgnoredInputKinds.SelectedIndex = 3;
                        break;
                    case ScrollingInputKinds.Keyboard:
                        cmbIgnoredInputKinds.SelectedIndex = 4;
                        break;
                    case ScrollingInputKinds.Gamepad:
                        cmbIgnoredInputKinds.SelectedIndex = 5;
                        break;
                    case ScrollingInputKinds.All:
                        cmbIgnoredInputKinds.SelectedIndex = 6;
                        break;
                    default:
                        lstLogs.Items.Add("Unexpected IgnoredInputKinds value.");
                        break;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateMargin ( ) [inline, private]

Definition at line 1764 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtMargin.Text = scrollView.Margin.ToString();
        }

void UpdateMaxZoomFactor ( ) [inline, private]

Definition at line 1623 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                txtMaxZoomFactor.Text = scrollView.MaxZoomFactor.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateMinZoomFactor ( ) [inline, private]

Definition at line 1610 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                txtMinZoomFactor.Text = scrollView.MinZoomFactor.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdatePadding ( ) [inline, private]

Definition at line 1769 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtPadding.Text = scrollView.Padding.ToString();
        }

void UpdateTblComputedHorizontalScrollMode ( ) [inline, private]

Definition at line 479 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                tblComputedHorizontalScrollMode.Text = scrollView.ComputedHorizontalScrollMode.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateTblComputedVerticalScrollMode ( ) [inline, private]

Definition at line 492 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                tblComputedVerticalScrollMode.Text = scrollView.ComputedVerticalScrollMode.ToString();
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateVerticalAnchorRatio ( ) [inline, private]

Definition at line 549 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
        }

void UpdateVerticalOffset ( ) [inline, private]

Definition at line 559 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtVerticalOffset.Text = scrollView.VerticalOffset.ToString();
        }

void UpdateVerticalScrollChainMode ( ) [inline, private]

Definition at line 1571 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbVerticalScrollChainMode.SelectedIndex = (int)scrollView.VerticalScrollChainMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateVerticalScrollMode ( ) [inline, private]

Definition at line 1558 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbVerticalScrollMode.SelectedIndex = (int)scrollView.VerticalScrollMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateVerticalScrollRailMode ( ) [inline, private]

Definition at line 1584 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbVerticalScrollRailMode.SelectedIndex = (int)scrollView.VerticalScrollRailMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateWidth ( ) [inline, private]

Definition at line 1688 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtWidth.Text = scrollView.Width.ToString();
        }

void UpdateZoomChainMode ( ) [inline, private]

Definition at line 1636 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbZoomChainMode.SelectedIndex = (int)scrollView.ZoomChainMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateZoomFactor ( ) [inline, private]

Definition at line 564 of file ScrollViewDynamicPage.xaml.cs.

        {
            txtZoomFactor.Text = scrollView.ZoomFactor.ToString();
        }

void UpdateZoomMode ( ) [inline, private]

Definition at line 1597 of file ScrollViewDynamicPage.xaml.cs.

        {
            try
            {
                cmbZoomMode.SelectedIndex = (int)scrollView.ZoomMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UseScrollView ( ScrollView sv2 ) [inline, private]

Definition at line 1864 of file ScrollViewDynamicPage.xaml.cs.

        {
            if (scrollView == sv2 || sv2 == null)
                return;

            try
            {
                if (scrollView == null && (chkLogScrollViewMessages.IsChecked == true || chkLogScrollPresenterMessages.IsChecked == true))
                {
                    MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                    if (chkLogScrollPresenterMessages.IsChecked == true)
                    {
                        MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    }
                    if (chkLogScrollViewMessages.IsChecked == true)
                    {
                        MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    }
                }

                if (scrollView != null)
                {
                    scrollView.GettingFocus -= ScrollView_GettingFocus;
                    scrollView.GotFocus -= ScrollView_GotFocus;
                    scrollView.LosingFocus -= ScrollView_LosingFocus;
                    scrollView.LostFocus -= ScrollView_LostFocus;

                    if (chkLogScrollViewEvents.IsChecked == true)
                    {
                        scrollView.ExtentChanged -= ScrollView_ExtentChanged;
                        scrollView.StateChanged -= ScrollView_StateChanged;
                        scrollView.ViewChanged -= ScrollView_ViewChanged;
                        scrollView.ScrollStarting -= ScrollView_ScrollStarting;
                        scrollView.ZoomStarting -= ScrollView_ZoomStarting;
                        scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                        scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
                        if (scrollViewPointerWheelChangedEventHandler != null)
                        {
                            scrollView.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler);
                        }
                    }

                    ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                    if (scrollPresenter != null && chkLogScrollPresenterEvents.IsChecked == true)
                    {
                        scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
                        scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
                        scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
                        scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
                        scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
                        scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                        scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
                        if (scrollPresenterPointerWheelChangedEventHandler != null)
                        {
                            scrollPresenter.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler);
                        }
                    }
                }

                scrollView = sv2;

                UpdateContentOrientation();
                UpdateHorizontalScrollMode();
                UpdateHorizontalScrollChainMode();
                UpdateHorizontalScrollRailMode();
                UpdateVerticalScrollMode();
                UpdateVerticalScrollChainMode();
                UpdateVerticalScrollRailMode();
                UpdateZoomMode();
                UpdateZoomChainMode();
                UpdateIgnoredInputKinds();
                UpdateMinZoomFactor();
                UpdateMaxZoomFactor();

                UpdateWidth();
                UpdateHeight();
                UpdateBackground();
                UpdateContent();
                UpdateMargin();
                UpdatePadding();

                UpdateCmbHorizontalScrollBarVisibility();
                UpdateCmbVerticalScrollBarVisibility();
                UpdateCmbXYFocusKeyboardNavigation();
                UpdateHorizontalAnchorRatio();
                UpdateVerticalAnchorRatio();
                UpdateHorizontalOffset();
                UpdateVerticalOffset();
                UpdateZoomFactor();
                UpdateExtentWidth();
                UpdateExtentHeight();
                UpdateTblComputedHorizontalScrollMode();
                UpdateTblComputedVerticalScrollMode();
                UpdateCmbContentHorizontalAlignment();
                UpdateCmbContentVerticalAlignment();
                UpdateCmbContentManipulationMode();

                chkIsEnabled.IsChecked = scrollView.IsEnabled;
                chkIsTabStop.IsChecked = scrollView.IsTabStop;

                if (scrollView != null)
                {
                    scrollView.GettingFocus += ScrollView_GettingFocus;
                    scrollView.GotFocus += ScrollView_GotFocus;
                    scrollView.LosingFocus += ScrollView_LosingFocus;
                    scrollView.LostFocus += ScrollView_LostFocus;

                    if (chkLogScrollViewEvents.IsChecked == true)
                    {
                        scrollView.ExtentChanged += ScrollView_ExtentChanged;
                        scrollView.StateChanged += ScrollView_StateChanged;
                        scrollView.ViewChanged += ScrollView_ViewChanged;
                        scrollView.ScrollStarting += ScrollView_ScrollStarting;
                        scrollView.ZoomStarting += ScrollView_ZoomStarting;
                        scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                        scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
                        if (scrollViewPointerWheelChangedEventHandler == null)
                        {
                            scrollViewPointerWheelChangedEventHandler = new PointerEventHandler(ScrollView_PointerWheelChanged);
                        }
                        scrollView.AddHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler, true);
                    }

                    ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;

                    if (scrollPresenter != null && chkLogScrollPresenterEvents.IsChecked == true)
                    {
                        scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                        scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                        scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                        scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
                        scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
                        scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                        scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
                        if (scrollPresenterPointerWheelChangedEventHandler == null)
                        {
                            scrollPresenterPointerWheelChangedEventHandler = new PointerEventHandler(ScrollPresenter_PointerWheelChanged);
                        }
                        scrollPresenter.AddHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler, true);
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

Member Data Documentation

Object asyncEventReportingLock = new Object() [private]

Definition at line 23 of file ScrollViewDynamicPage.xaml.cs.

Border border = null [private]

Definition at line 31 of file ScrollViewDynamicPage.xaml.cs.

Button button = null [private]

Definition at line 29 of file ScrollViewDynamicPage.xaml.cs.

PointerEventHandler contentPointerWheelChangedEventHandler = null [private]

Definition at line 40 of file ScrollViewDynamicPage.xaml.cs.

Image largeImg [private]

Definition at line 25 of file ScrollViewDynamicPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 24 of file ScrollViewDynamicPage.xaml.cs.

Rectangle rectangle = null [private]

Definition at line 27 of file ScrollViewDynamicPage.xaml.cs.

PointerEventHandler scrollPresenterPointerWheelChangedEventHandler = null [private]

Definition at line 41 of file ScrollViewDynamicPage.xaml.cs.

ScrollView scrollView = null [private]

Definition at line 39 of file ScrollViewDynamicPage.xaml.cs.

PointerEventHandler scrollViewPointerWheelChangedEventHandler = null [private]

Definition at line 42 of file ScrollViewDynamicPage.xaml.cs.

StackPanel sp1 = null [private]

Definition at line 33 of file ScrollViewDynamicPage.xaml.cs.

StackPanel sp2 = null [private]

Definition at line 35 of file ScrollViewDynamicPage.xaml.cs.

Viewbox viewbox = null [private]

Definition at line 37 of file ScrollViewDynamicPage.xaml.cs.

Border wuxBorder = null [private]

Definition at line 32 of file ScrollViewDynamicPage.xaml.cs.

Button wuxButton = null [private]

Definition at line 30 of file ScrollViewDynamicPage.xaml.cs.

Image wuxLargeImg [private]

Definition at line 26 of file ScrollViewDynamicPage.xaml.cs.

Rectangle wuxRectangle = null [private]

Definition at line 28 of file ScrollViewDynamicPage.xaml.cs.

StackPanel wuxSp1 = null [private]

Definition at line 34 of file ScrollViewDynamicPage.xaml.cs.

StackPanel wuxSp2 = null [private]

Definition at line 36 of file ScrollViewDynamicPage.xaml.cs.

Viewbox wuxViewbox = null [private]

Definition at line 38 of file ScrollViewDynamicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewDynamicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewerAdapterPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewerAdapterPage
Public Member Functions | Private Member Functions | Private Attributes

ScrollViewerAdapterPage Class Reference

List of all members.

Public Member Functions

ScrollViewerAdapterPage ()

Private Member Functions

void | AdaptOnSVWithoutWaitingForLoaded_Click (object sender, RoutedEventArgs e)
void | CheckLeaks (Dictionary< string, WeakReference > objects)
void | CheckLeaks_Click (object sender, RoutedEventArgs e)
void | GC_Click (object sender, RoutedEventArgs e)
void | Remove_Click (object sender, RoutedEventArgs e)

Private Attributes

Dictionary< string, WeakReference > | objects = new Dictionary<string, WeakReference>()

Detailed Description

Definition at line 24 of file ScrollViewerAdapterPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewerAdapterPage ( ) [inline]

Definition at line 28 of file ScrollViewerAdapterPage.xaml.cs.

        {
            this.InitializeComponent();
            this.AdaptOnSVWithoutWaitingForLoadedButton.Click += AdaptOnSVWithoutWaitingForLoaded_Click;
            this.RemoveButton.Click += Remove_Click;
            this.GCButton.Click += GC_Click;
            this.CheckLeaksButton.Click += CheckLeaks_Click;
            LogController.InitializeLogging();
        }

Member Function Documentation

void AdaptOnSVWithoutWaitingForLoaded_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file ScrollViewerAdapterPage.xaml.cs.

        {
            ScrollViewer sv = new ScrollViewer();
            objects["sv"] = new WeakReference(sv);
            sv.Content = new Button();
            ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
            adapter.Adapt(sv, new Size(1.0, 1.0));
            this.TestRoot.Children.Add(sv);
        }

void CheckLeaks ( Dictionary< string, WeakReference > objects ) [inline, private]

Definition at line 65 of file ScrollViewerAdapterPage.xaml.cs.

        {
            foreach (var pair in objects)
            {
                Log.Comment("Checking if object {0} has been collected", pair.Key);
                object target = pair.Value.Target;
                if (target != null)
                {
                    Verify.DisableVerifyFailureExceptions = true; // throwing exceptions makes running this in TDP harder
                    Verify.Fail(String.Format("Object {0} is still alive when it should not be.", target));
                    Verify.DisableVerifyFailureExceptions = false;
                }
            }
            objects.Clear();
        }

void CheckLeaks_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 60 of file ScrollViewerAdapterPage.xaml.cs.

        {
            CheckLeaks(objects);
        }

void GC_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 53 of file ScrollViewerAdapterPage.xaml.cs.

        {
            GC.Collect();
            GC.WaitForPendingFinalizers();
            GC.Collect();
        }

void Remove_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file ScrollViewerAdapterPage.xaml.cs.

        {
            this.TestRoot.Children.Clear();
        }

Member Data Documentation

Dictionary<string, WeakReference> objects = new Dictionary<string, WeakReference>() [private]

Definition at line 26 of file ScrollViewerAdapterPage.xaml.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/TestUI/ScrollViewerAdapterPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewerPage
Public Member Functions | Private Member Functions | Private Attributes

ScrollViewerPage Class Reference

List of all members.

Public Member Functions

ScrollViewerPage ()

Private Member Functions

~ScrollViewerPage ()
void | AppendEventMessage (string message)
void | BtnChangeView_Click (object sender, RoutedEventArgs e)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearScrollViewerEvents_Click (object sender, RoutedEventArgs e)
void | BtnGetActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentActualHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentActualWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentDesiredSize_Click (object sender, RoutedEventArgs e)
void | BtnGetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetContentPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetContentRenderSize_Click (object sender, RoutedEventArgs e)
void | BtnGetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetExtentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetMinZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnGetPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalOffset_Click (object sender, RoutedEventArgs e)
void | BtnGetViewportHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetViewportWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMinHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMinWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetContentPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetMinZoomFactor_Click (object sender, RoutedEventArgs e)
void | BtnSetPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetWidth_Click (object sender, RoutedEventArgs e)
void | ChkContentProperties_Checked (object sender, RoutedEventArgs e)
void | ChkContentProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkIsHorizontalRailEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkIsHorizontalScrollChainingEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkIsTabStop_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkIsVerticalRailEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkIsVerticalScrollChainingEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkIsZoomChainingEnabled_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkScrollViewerEvents_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewerEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollViewerMethods_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewerMethods_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollViewerProperties_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewerProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkUseLeftHeader_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkUseTopHeader_IsCheckedChanged (object sender, RoutedEventArgs e)
void | ChkUseTopLeftHeader_IsCheckedChanged (object sender, RoutedEventArgs e)
void | CmbBackground_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContent_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentHorizontalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentManipulationMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbContentVerticalAlignment_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollBarVisibility_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbHorizontalScrollMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbScrollViewerManipulationMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollBarVisibility_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbVerticalScrollMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbXYFocusKeyboardNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbZoomMode_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CreateChildren ()
Thickness | GetThicknessFromString (string thickness)
void | ScrollViewer_ViewChanged (object sender, ScrollViewerViewChangedEventArgs args)
void | ScrollViewer_ViewChanging (object sender, ScrollViewerViewChangingEventArgs args)
void | ScrollViewerPage_Loaded (object sender, RoutedEventArgs args)
string | ScrollViewerViewToString (ScrollViewerView scrollViewerView)
void | UpdateChkIsEnabled ()
void | UpdateChkIsHorizontalRailEnabled ()
void | UpdateChkIsHorizontalScrollChainingEnabled ()
void | UpdateChkIsTabStop ()
void | UpdateChkIsVerticalRailEnabled ()
void | UpdateChkIsVerticalScrollChainingEnabled ()
void | UpdateChkIsZoomChainingEnabled ()
void | UpdateCmbBackground ()
void | UpdateCmbContent ()
void | UpdateCmbContentHorizontalAlignment ()
void | UpdateCmbContentManipulationMode ()
void | UpdateCmbContentVerticalAlignment ()
void | UpdateCmbHorizontalScrollBarVisibility ()
void | UpdateCmbHorizontalScrollMode ()
void | UpdateCmbScrollViewerManipulationMode ()
void | UpdateCmbVerticalScrollBarVisibility ()
void | UpdateCmbVerticalScrollMode ()
void | UpdateCmbXYFocusKeyboardNavigation ()
void | UpdateCmbZoomMode ()
void | UpdateHeaderSizes ()
void | UpdateTxtMargin ()
void | UpdateTxtMaxZoomFactor ()
void | UpdateTxtMinZoomFactor ()
void | UpdateTxtPadding ()
void | UseScrollViewer ()

Private Attributes

Border | border
Button | button
StackPanel | horizontalStackPanel
Image | largeImg
Border | populatedBorder
Rectangle | rectangle
Rectangle | rectangleLeftHeader
Rectangle | rectangleTopHeader
Rectangle | rectangleTopLeftHeader
RepeatButton | repeatButton
TextBlock | textBlock
TilePanel | tilePanel
StackPanel | verticalStackPanel
Viewbox | viewbox

Detailed Description

Definition at line 20 of file ScrollViewerPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewerPage ( ) [inline]

Definition at line 37 of file ScrollViewerPage.xaml.cs.

        {
            this.InitializeComponent();
            this.Loaded += ScrollViewerPage_Loaded;

            UseScrollViewer();
            CreateChildren();
        }

~ScrollViewerPage ( ) [inline, private]

Definition at line 46 of file ScrollViewerPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendEventMessage ( string message ) [inline, private]

Definition at line 1221 of file ScrollViewerPage.xaml.cs.

        {
            lstScrollViewerEvents.Items.Add(message);
        }

void BtnChangeView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1184 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                double? horizontalOffset = string.IsNullOrWhiteSpace(txtChangeViewHorizontalOffset.Text) ? (double?)null : Convert.ToDouble(txtChangeViewHorizontalOffset.Text);
                double? verticalOffset = string.IsNullOrWhiteSpace(txtChangeViewVerticalOffset.Text) ? (double?)null : Convert.ToDouble(txtChangeViewVerticalOffset.Text);
                float? zoomFactor = string.IsNullOrWhiteSpace(txtChangeViewZoomFactor.Text) ? (float?)null : Convert.ToSingle(txtChangeViewZoomFactor.Text);
                bool disableAnimation = true;

                if (horizontalOffset == null && verticalOffset == null && zoomFactor == null)
                {
                    return;
                }

                switch (cmbChangeViewAnimationMode.SelectedIndex)
                {
                    case 0: // Disabled
                        break;
                    case 1: // Enabled
                        disableAnimation = false;
                        break;
                    default: // Auto
                        disableAnimation = !new UISettings().AnimationsEnabled;
                        break;
                }

                AppendEventMessage($"ChangeView(horizontalOffset:{horizontalOffset}, verticalOffset:{verticalOffset}, zoomFactor:{zoomFactor}, disableAnimation:{disableAnimation}) from horizontalOffset:{scrollViewer.HorizontalOffset}, verticalOffset:{scrollViewer.VerticalOffset}, zoomFactor:{scrollViewer.ZoomFactor}");

                bool result = scrollViewer.ChangeView(horizontalOffset, verticalOffset, zoomFactor, disableAnimation);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1226 of file ScrollViewerPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearScrollViewerEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1179 of file ScrollViewerPage.xaml.cs.

        {
            lstScrollViewerEvents.Items.Clear();
        }

void BtnGetActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1174 of file ScrollViewerPage.xaml.cs.

        {
            tblActualHeight.Text = scrollViewer.ActualHeight.ToString();
        }

void BtnGetActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1169 of file ScrollViewerPage.xaml.cs.

        {
            tblActualWidth.Text = scrollViewer.ActualWidth.ToString();
        }

void BtnGetContentActualHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 992 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentActualHeight.Text = string.Empty;
            else
                txtContentActualHeight.Text = (scrollViewer.Content as FrameworkElement).ActualHeight.ToString();
        }

void BtnGetContentActualWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 984 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentActualWidth.Text = string.Empty;
            else
                txtContentActualWidth.Text = (scrollViewer.Content as FrameworkElement).ActualWidth.ToString();
        }

void BtnGetContentDesiredSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1000 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is UIElement))
                txtContentDesiredSize.Text = string.Empty;
            else
                txtContentDesiredSize.Text = (scrollViewer.Content as UIElement).DesiredSize.ToString();
        }

void BtnGetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 860 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentHeight.Text = string.Empty;
            else
                txtContentHeight.Text = ((FrameworkElement)(scrollViewer.Content)).Height.ToString();
        }

void BtnGetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 924 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentMargin.Text = string.Empty;
            else
                txtContentMargin.Text = ((FrameworkElement)(scrollViewer.Content)).Margin.ToString();
        }

void BtnGetContentMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 868 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentMaxHeight.Text = string.Empty;
            else
                txtContentMaxHeight.Text = ((FrameworkElement)(scrollViewer.Content)).MaxHeight.ToString();
        }

void BtnGetContentMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 796 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentMaxWidth.Text = string.Empty;
            else
                txtContentMaxWidth.Text = ((FrameworkElement)(scrollViewer.Content)).MaxWidth.ToString();
        }

void BtnGetContentMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 852 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentMinHeight.Text = string.Empty;
            else
                txtContentMinHeight.Text = ((FrameworkElement)(scrollViewer.Content)).MinHeight.ToString();
        }

void BtnGetContentMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 780 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentMinWidth.Text = string.Empty;
            else
                txtContentMinWidth.Text = ((FrameworkElement)(scrollViewer.Content)).MinWidth.ToString();
        }

void BtnGetContentPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 948 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is Control || scrollViewer.Content is Border || scrollViewer.Content is StackPanel))
                txtContentPadding.Text = string.Empty;
            else if (scrollViewer.Content is Control)
                txtContentPadding.Text = ((Control)(scrollViewer.Content)).Padding.ToString();
            else if (scrollViewer.Content is Border)
                txtContentPadding.Text = ((Border)(scrollViewer.Content)).Padding.ToString();
            else
                txtContentPadding.Text = ((StackPanel)(scrollViewer.Content)).Padding.ToString();
        }

void BtnGetContentRenderSize_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1008 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is UIElement))
                txtContentRenderSize.Text = string.Empty;
            else
                txtContentRenderSize.Text = (scrollViewer.Content as UIElement).RenderSize.ToString();
        }

void BtnGetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 788 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
                txtContentWidth.Text = string.Empty;
            else
                txtContentWidth.Text = ((FrameworkElement)(scrollViewer.Content)).Width.ToString();
        }

void BtnGetExtentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1082 of file ScrollViewerPage.xaml.cs.

        {
            tblExtentHeight.Text = scrollViewer.ExtentHeight.ToString();
        }

void BtnGetExtentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1077 of file ScrollViewerPage.xaml.cs.

        {
            tblExtentWidth.Text = scrollViewer.ExtentWidth.ToString();
        }

void BtnGetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1133 of file ScrollViewerPage.xaml.cs.

        {
            txtHeight.Text = scrollViewer.Height.ToString();
        }

void BtnGetHorizontalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1062 of file ScrollViewerPage.xaml.cs.

        {
            tblHorizontalOffset.Text = scrollViewer.HorizontalOffset.ToString();
        }

void BtnGetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 662 of file ScrollViewerPage.xaml.cs.

        {
            UpdateTxtMargin();
        }

void BtnGetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1151 of file ScrollViewerPage.xaml.cs.

        {
            txtMaxHeight.Text = scrollViewer.MaxHeight.ToString();
        }

void BtnGetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1115 of file ScrollViewerPage.xaml.cs.

        {
            txtMaxWidth.Text = scrollViewer.MaxWidth.ToString();
        }

void BtnGetMaxZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1044 of file ScrollViewerPage.xaml.cs.

        {
            UpdateTxtMaxZoomFactor();
        }

void BtnGetMinZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1026 of file ScrollViewerPage.xaml.cs.

        {
            UpdateTxtMinZoomFactor();
        }

void BtnGetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 680 of file ScrollViewerPage.xaml.cs.

        {
            UpdateTxtPadding();
        }

void BtnGetVerticalOffset_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1067 of file ScrollViewerPage.xaml.cs.

        {
            tblVerticalOffset.Text = scrollViewer.VerticalOffset.ToString();
        }

void BtnGetViewportHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1092 of file ScrollViewerPage.xaml.cs.

        {
            tblViewportHeight.Text = scrollViewer.ViewportHeight.ToString();
        }

void BtnGetViewportWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1087 of file ScrollViewerPage.xaml.cs.

        {
            tblViewportWidth.Text = scrollViewer.ViewportWidth.ToString();
        }

void BtnGetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1097 of file ScrollViewerPage.xaml.cs.

        {
            txtWidth.Text = scrollViewer.Width.ToString();
        }

void BtnGetZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1072 of file ScrollViewerPage.xaml.cs.

        {
            tblZoomFactor.Text = scrollViewer.ZoomFactor.ToString();
        }

void BtnSetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 892 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollViewer.Content)).Height = Convert.ToDouble(txtContentHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 932 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollViewer.Content)).Margin = GetThicknessFromString(txtContentMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 908 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollViewer.Content)).MaxHeight = Convert.ToDouble(txtContentMaxHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 836 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollViewer.Content)).MaxWidth = Convert.ToDouble(txtContentMaxWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMinHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 876 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollViewer.Content)).MinHeight = Convert.ToDouble(txtContentMinHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMinWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 804 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollViewer.Content)).MinWidth = Convert.ToDouble(txtContentMinWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 960 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is Control)
                {
                    ((Control)(scrollViewer.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
                }
                else if (scrollViewer.Content is Border)
                {
                    ((Border)(scrollViewer.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
                }
                else if (scrollViewer.Content is StackPanel)
                {
                    ((StackPanel)(scrollViewer.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 820 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                if (scrollViewer.Content is FrameworkElement)
                {
                    ((FrameworkElement)(scrollViewer.Content)).Width = Convert.ToDouble(txtContentWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1138 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.Height = Convert.ToDouble(txtHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 667 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.Margin = GetThicknessFromString(txtMargin.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1156 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1120 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMaxZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1049 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.MaxZoomFactor = Convert.ToSingle(txtMaxZoomFactor.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetMinZoomFactor_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1031 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.MinZoomFactor = Convert.ToSingle(txtMinZoomFactor.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 685 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.Padding = GetThicknessFromString(txtPadding.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void BtnSetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1102 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.Width = Convert.ToDouble(txtWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void ChkContentProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 221 of file ScrollViewerPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Visible;
        }

void ChkContentProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 227 of file ScrollViewerPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Collapsed;
        }

void ChkIsEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 703 of file ScrollViewerPage.xaml.cs.

        {
            scrollViewer.IsEnabled = (bool)chkIsEnabled.IsChecked;
        }

void ChkIsHorizontalRailEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 290 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.IsHorizontalRailEnabled = (bool)chkIsHorizontalRailEnabled.IsChecked;
        }

void ChkIsHorizontalScrollChainingEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 279 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.IsHorizontalScrollChainingEnabled = (bool)chkIsHorizontalScrollChainingEnabled.IsChecked;
        }

void ChkIsTabStop_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 713 of file ScrollViewerPage.xaml.cs.

        {
            scrollViewer.IsTabStop = (bool)chkIsTabStop.IsChecked;
            UpdateHeaderSizes();
        }

void ChkIsVerticalRailEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 334 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.IsVerticalRailEnabled = (bool)chkIsVerticalRailEnabled.IsChecked;
        }

void ChkIsVerticalScrollChainingEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 323 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.IsVerticalScrollChainingEnabled = (bool)chkIsVerticalScrollChainingEnabled.IsChecked;
        }

void ChkIsZoomChainingEnabled_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 356 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.IsZoomChainingEnabled = (bool)chkIsZoomChainingEnabled.IsChecked;
        }

void ChkScrollViewerEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 245 of file ScrollViewerPage.xaml.cs.

        {
            if (grdScrollViewerEvents != null)
                grdScrollViewerEvents.Visibility = Visibility.Visible;
        }

void ChkScrollViewerEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 251 of file ScrollViewerPage.xaml.cs.

        {
            if (grdScrollViewerEvents != null)
                grdScrollViewerEvents.Visibility = Visibility.Collapsed;
        }

void ChkScrollViewerMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 233 of file ScrollViewerPage.xaml.cs.

        {
            if (svScrollViewerMethods != null)
                svScrollViewerMethods.Visibility = Visibility.Visible;
        }

void ChkScrollViewerMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 239 of file ScrollViewerPage.xaml.cs.

        {
            if (svScrollViewerMethods != null)
                svScrollViewerMethods.Visibility = Visibility.Collapsed;
        }

void ChkScrollViewerProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 209 of file ScrollViewerPage.xaml.cs.

        {
            if (svScrollViewerProperties != null)
                svScrollViewerProperties.Visibility = Visibility.Visible;
        }

void ChkScrollViewerProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 215 of file ScrollViewerPage.xaml.cs.

        {
            if (svScrollViewerProperties != null)
                svScrollViewerProperties.Visibility = Visibility.Collapsed;
        }

void ChkUseLeftHeader_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 725 of file ScrollViewerPage.xaml.cs.

        {
            scrollViewer.LeftHeader = (bool)chkUseLeftHeader.IsChecked ? rectangleLeftHeader : null;
            UpdateHeaderSizes();
        }

void ChkUseTopHeader_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 731 of file ScrollViewerPage.xaml.cs.

        {
            scrollViewer.TopHeader = (bool)chkUseTopHeader.IsChecked ? rectangleTopHeader : null;
        }

void ChkUseTopLeftHeader_IsCheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 719 of file ScrollViewerPage.xaml.cs.

        {
            scrollViewer.TopLeftHeader = (bool)chkUseTopLeftHeader.IsChecked ? rectangleTopLeftHeader : null;
            UpdateHeaderSizes();
        }

void CmbBackground_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 457 of file ScrollViewerPage.xaml.cs.

        {
            switch (cmbBackground.SelectedIndex)
            {
                case 0:
                    scrollViewer.Background = null;
                    break;
                case 1:
                    scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
                    break;
                case 2:
                    scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
                    break;
                case 3:
                    scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.Aqua);
                    break;
            }
        }

void CmbContent_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 498 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                FrameworkElement currentContent = scrollViewer.Content as FrameworkElement;
                FrameworkElement newContent = null;

                switch (cmbContent.SelectedIndex)
                {
                    case 0:
                        newContent = null;
                        break;
                    case 1:
                        newContent = smallImg;
                        break;
                    case 2:
                        newContent = largeImg;
                        break;
                    case 3:
                        newContent = rectangle;
                        break;
                    case 4:
                        newContent = button;
                        break;
                    case 5:
                        newContent = border;
                        break;
                    case 6:
                        newContent = populatedBorder;
                        break;
                    case 7:
                        newContent = horizontalStackPanel;
                        break;
                    case 8:
                        newContent = verticalStackPanel;
                        break;
                    case 9:
                        newContent = tilePanel;
                        break;
                    case 10:
                        newContent = viewbox;
                        break;
                    case 11:
                        newContent = textBlock;
                        break;
                    case 12:
                        newContent = repeatButton;
                        break;
                }

                if (newContent != null)
                {
                    if (chkPreserveProperties.IsChecked == true && currentContent != null)
                    {
                        newContent.Width = currentContent.Width;
                        newContent.Height = currentContent.Height;
                        newContent.Margin = currentContent.Margin;
                        newContent.HorizontalAlignment = currentContent.HorizontalAlignment;
                        newContent.VerticalAlignment = currentContent.VerticalAlignment;

                        if (currentContent is Control && newContent is Control)
                        {
                            ((Control)newContent).Padding = ((Control)currentContent).Padding;
                        }
                    }

                    if ((bool)chkUseTopLeftHeader.IsChecked || (bool)chkUseLeftHeader.IsChecked || (bool)chkUseTopHeader.IsChecked)
                    {
                        newContent.HorizontalAlignment = HorizontalAlignment.Left;
                        newContent.VerticalAlignment = VerticalAlignment.Top;
                    }
                }

                scrollViewer.Content = newContent;

                UpdateCmbContentHorizontalAlignment();
                UpdateCmbContentVerticalAlignment();

                _ = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateHeaderSizes);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());

                UpdateCmbContent();
            }
        }

void CmbContentHorizontalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 367 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content is FrameworkElement)
            {
                ((FrameworkElement)scrollViewer.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
            }
        }

void CmbContentManipulationMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 425 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content is UIElement scrollViewerContentAsUIE)
            {
                switch (cmbContentManipulationMode.SelectedIndex)
                {
                    case 0:
                        scrollViewerContentAsUIE.ManipulationMode = ManipulationModes.System;
                        break;
                    case 1:
                        scrollViewerContentAsUIE.ManipulationMode = ManipulationModes.None;
                        break;
                }
            }
        }

void CmbContentVerticalAlignment_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 383 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content is FrameworkElement)
            {
                ((FrameworkElement)scrollViewer.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
            }
        }

void CmbHorizontalScrollBarVisibility_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 257 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.HorizontalScrollBarVisibility = (ScrollBarVisibility)cmbHorizontalScrollBarVisibility.SelectedIndex;
        }

void CmbHorizontalScrollMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 263 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.HorizontalScrollMode = (ScrollMode)cmbHorizontalScrollMode.SelectedIndex;
        }

void CmbScrollViewerManipulationMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 399 of file ScrollViewerPage.xaml.cs.

        {
            switch (cmbScrollViewerManipulationMode.SelectedIndex)
            {
                case 0:
                    scrollViewer.ManipulationMode = ManipulationModes.System;
                    break;
                case 1:
                    scrollViewer.ManipulationMode = ManipulationModes.None;
                    break;
            }
        }

void CmbVerticalScrollBarVisibility_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 301 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.VerticalScrollBarVisibility = (ScrollBarVisibility)cmbVerticalScrollBarVisibility.SelectedIndex;
        }

void CmbVerticalScrollMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 307 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.VerticalScrollMode = (ScrollMode)cmbVerticalScrollMode.SelectedIndex;
        }

void CmbXYFocusKeyboardNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 767 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                scrollViewer.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

void CmbZoomMode_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 345 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer != null)
                scrollViewer.ZoomMode = (ZoomMode)cmbZoomMode.SelectedIndex;
        }

void CreateChildren ( ) [inline, private]

Definition at line 88 of file ScrollViewerPage.xaml.cs.

        {
            textBlock = new TextBlock();
            textBlock.TextWrapping = TextWrapping.Wrap;
            string textBlockText = string.Empty;
            for (int i = 0; i < 50; i++)
            {
                textBlockText += "Large TextBlock Text. ";
            }
            textBlock.Text = textBlockText;

            viewbox = new Viewbox();
            tilePanel = new TilePanel();
            tilePanel.TileCount = 100;
            tilePanel.Background = new SolidColorBrush(Microsoft.UI.Colors.Orange);
            largeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
            SolidColorBrush chartreuseBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
            SolidColorBrush blanchedAlmondBrush = new SolidColorBrush(Microsoft.UI.Colors.BlanchedAlmond);
            SolidColorBrush interBrush = new SolidColorBrush(Microsoft.UI.Colors.Yellow);
            LinearGradientBrush lgb = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };
            GradientStop gs = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
            lgb.GradientStops.Add(gs);
            gs = new GradientStop() { Color = Microsoft.UI.Colors.White, Offset = 0.5 };
            lgb.GradientStops.Add(gs);
            gs = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
            lgb.GradientStops.Add(gs);
            rectangle = new Rectangle() { Fill = lgb };
            button = new Button() { Content = "Button" };
            Rectangle viewboxChild = new Rectangle()
            {
                Fill = lgb,
                Width = 600,
                Height = 500
            };
            viewbox.Child = viewboxChild;
            Rectangle borderChild = new Rectangle()
            {
                Fill = lgb
            };
            border = new Border()
            {
                BorderBrush = chartreuseBrush,
                BorderThickness = new Thickness(5),
                Child = borderChild
            };
            StackPanel populatedBorderChild = new StackPanel();
            populatedBorderChild.Margin = new Thickness(30);
            for (int i = 0; i < 16; i++)
            {
                TextBlock textBlock = new TextBlock()
                {
                    Text = "TB#" + populatedBorderChild.Children.Count,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment = VerticalAlignment.Center
                };

                Border borderInSP = new Border()
                {
                    BorderThickness = border.Margin = new Thickness(3),
                    BorderBrush = chartreuseBrush,
                    Background = blanchedAlmondBrush,
                    Width = 170,
                    Height = 120,
                    Child = textBlock
                };

                populatedBorderChild.Children.Add(borderInSP);
            }
            populatedBorder = new Border()
            {
                BorderBrush = chartreuseBrush,
                BorderThickness = new Thickness(3),
                Margin = new Thickness(15),
                Background = new SolidColorBrush(Microsoft.UI.Colors.Beige),
                Child = populatedBorderChild
            };
            horizontalStackPanel = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };
            for (int index = 0; index < 10; index++)
            {
                horizontalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Width = 95 });
                horizontalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Width = 5 });
            }
            verticalStackPanel = new StackPanel();
            for (int index = 0; index < 10; index++)
            {
                verticalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Height = 95 });
                verticalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Height = 5 });
            }
            repeatButton = new RepeatButton() { Content = "RepeatButton" };
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 1231 of file ScrollViewerPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void ScrollViewer_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 204 of file ScrollViewerPage.xaml.cs.

        {
            AppendEventMessage("ViewChanged IsIntermediate=" + args.IsIntermediate + ", H=" + scrollViewer.HorizontalOffset.ToString() + ", V=" + scrollViewer.VerticalOffset + ", ZF=" + scrollViewer.ZoomFactor);
        }

void ScrollViewer_ViewChanging | ( | object | sender,
 |  | ScrollViewerViewChangingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 199 of file ScrollViewerPage.xaml.cs.

        {
            AppendEventMessage("ViewChanging IsInertial=" + args.IsInertial + ", NextView=(" + ScrollViewerViewToString(args.NextView) + "), FinalView=(" + ScrollViewerViewToString(args.FinalView) + ")");
        }

void ScrollViewerPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 182 of file ScrollViewerPage.xaml.cs.

        {
            rectangleTopLeftHeader = scrollViewer.TopLeftHeader as Rectangle;
            scrollViewer.TopLeftHeader = null;

            rectangleLeftHeader = scrollViewer.LeftHeader as Rectangle;
            scrollViewer.LeftHeader = null;

            rectangleTopHeader = scrollViewer.TopHeader as Rectangle;
            scrollViewer.TopHeader = null;
        }

string ScrollViewerViewToString ( ScrollViewerView scrollViewerView ) [inline, private]

Definition at line 194 of file ScrollViewerPage.xaml.cs.

        {
            return "H=" + scrollViewerView.HorizontalOffset.ToString() + ", V=" + scrollViewerView.VerticalOffset + ", ZF=" + scrollViewerView.ZoomFactor;
        }

void UpdateChkIsEnabled ( ) [inline, private]

Definition at line 698 of file ScrollViewerPage.xaml.cs.

        {
            chkIsEnabled.IsChecked = scrollViewer.IsEnabled;
        }

void UpdateChkIsHorizontalRailEnabled ( ) [inline, private]

Definition at line 296 of file ScrollViewerPage.xaml.cs.

        {
            chkIsHorizontalRailEnabled.IsChecked = scrollViewer.IsHorizontalRailEnabled;
        }

void UpdateChkIsHorizontalScrollChainingEnabled ( ) [inline, private]

Definition at line 285 of file ScrollViewerPage.xaml.cs.

        {
            chkIsHorizontalScrollChainingEnabled.IsChecked = scrollViewer.IsHorizontalScrollChainingEnabled;
        }

void UpdateChkIsTabStop ( ) [inline, private]

Definition at line 708 of file ScrollViewerPage.xaml.cs.

        {
            chkIsTabStop.IsChecked = scrollViewer.IsTabStop;
        }

void UpdateChkIsVerticalRailEnabled ( ) [inline, private]

Definition at line 340 of file ScrollViewerPage.xaml.cs.

        {
            chkIsVerticalRailEnabled.IsChecked = scrollViewer.IsVerticalRailEnabled;
        }

void UpdateChkIsVerticalScrollChainingEnabled ( ) [inline, private]

Definition at line 329 of file ScrollViewerPage.xaml.cs.

        {
            chkIsVerticalScrollChainingEnabled.IsChecked = scrollViewer.IsVerticalScrollChainingEnabled;
        }

void UpdateChkIsZoomChainingEnabled ( ) [inline, private]

Definition at line 362 of file ScrollViewerPage.xaml.cs.

        {
            chkIsZoomChainingEnabled.IsChecked = scrollViewer.IsZoomChainingEnabled;
        }

void UpdateCmbBackground ( ) [inline, private]

Definition at line 476 of file ScrollViewerPage.xaml.cs.

        {
            SolidColorBrush bg = scrollViewer.Background as SolidColorBrush;

            if (bg == null)
            {
                cmbBackground.SelectedIndex = 0;
            }
            else if (bg.Color == Microsoft.UI.Colors.Transparent)
            {
                cmbBackground.SelectedIndex = 1;
            }
            else if (bg.Color == Microsoft.UI.Colors.AliceBlue)
            {
                cmbBackground.SelectedIndex = 2;
            }
            else if (bg.Color == Microsoft.UI.Colors.Aqua)
            {
                cmbBackground.SelectedIndex = 3;
            }
        }

void UpdateCmbContent ( ) [inline, private]

Definition at line 587 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null)
            {
                cmbContent.SelectedIndex = 0;
            }
            else if (scrollViewer.Content is Image)
            {
                if (((scrollViewer.Content as Image).Source as BitmapImage).UriSource.AbsolutePath.ToLower().Contains("large"))
                {
                    cmbContent.SelectedIndex = 2;
                }
                else
                {
                    cmbContent.SelectedIndex = 1;
                }
            }
            else if (scrollViewer.Content is Rectangle)
            {
                cmbContent.SelectedIndex = 3;
            }
            else if (scrollViewer.Content is Button)
            {
                cmbContent.SelectedIndex = 4;
            }
            else if (scrollViewer.Content is Border)
            {
                if ((scrollViewer.Content as Border).Child is Rectangle)
                {
                    cmbContent.SelectedIndex = 5;
                }
                else
                {
                    cmbContent.SelectedIndex = 6;
                }
            }
            else if (scrollViewer.Content is StackPanel)
            {
                if ((scrollViewer.Content as StackPanel).Orientation == Orientation.Horizontal)
                {
                    cmbContent.SelectedIndex = 7;
                }
                else
                {
                    cmbContent.SelectedIndex = 8;
                }
            }
            else if (scrollViewer.Content is TilePanel)
            {
                cmbContent.SelectedIndex = 9;
            }
            else if (scrollViewer.Content is Viewbox)
            {
                cmbContent.SelectedIndex = 10;
            }
            else if (scrollViewer.Content is TextBlock)
            {
                cmbContent.SelectedIndex = 11;
            }
            else if (scrollViewer.Content is RepeatButton)
            {
                cmbContent.SelectedIndex = 12;
            }
        }

void UpdateCmbContentHorizontalAlignment ( ) [inline, private]

Definition at line 375 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content is FrameworkElement)
            {
                cmbContentHorizontalAlignment.SelectedIndex = (int)((FrameworkElement)scrollViewer.Content).HorizontalAlignment;
            }
        }

void UpdateCmbContentManipulationMode ( ) [inline, private]

Definition at line 441 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content is UIElement scrollViewerContentAsUIE)
            {
                switch (scrollViewerContentAsUIE.ManipulationMode)
                {
                    case ManipulationModes.System:
                        cmbContentManipulationMode.SelectedIndex = 0;
                        break;
                    case ManipulationModes.None:
                        cmbContentManipulationMode.SelectedIndex = 1;
                        break;
                }
            }
        }

void UpdateCmbContentVerticalAlignment ( ) [inline, private]

Definition at line 391 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content is FrameworkElement)
            {
                cmbContentVerticalAlignment.SelectedIndex = (int)((FrameworkElement)scrollViewer.Content).VerticalAlignment;
            }
        }

void UpdateCmbHorizontalScrollBarVisibility ( ) [inline, private]

Definition at line 269 of file ScrollViewerPage.xaml.cs.

        {
            cmbHorizontalScrollBarVisibility.SelectedIndex = (int)scrollViewer.HorizontalScrollBarVisibility;
        }

void UpdateCmbHorizontalScrollMode ( ) [inline, private]

Definition at line 274 of file ScrollViewerPage.xaml.cs.

        {
            cmbHorizontalScrollMode.SelectedIndex = (int)scrollViewer.HorizontalScrollMode;
        }

void UpdateCmbScrollViewerManipulationMode ( ) [inline, private]

Definition at line 412 of file ScrollViewerPage.xaml.cs.

        {
            switch (scrollViewer.ManipulationMode)
            {
                case ManipulationModes.System:
                    cmbScrollViewerManipulationMode.SelectedIndex = 0;
                    break;
                case ManipulationModes.None:
                    cmbScrollViewerManipulationMode.SelectedIndex = 1;
                    break;
            }
        }

void UpdateCmbVerticalScrollBarVisibility ( ) [inline, private]

Definition at line 313 of file ScrollViewerPage.xaml.cs.

        {
            cmbVerticalScrollBarVisibility.SelectedIndex = (int)scrollViewer.VerticalScrollBarVisibility;
        }

void UpdateCmbVerticalScrollMode ( ) [inline, private]

Definition at line 318 of file ScrollViewerPage.xaml.cs.

        {
            cmbVerticalScrollMode.SelectedIndex = (int)scrollViewer.VerticalScrollMode;
        }

void UpdateCmbXYFocusKeyboardNavigation ( ) [inline, private]

Definition at line 762 of file ScrollViewerPage.xaml.cs.

        {
            cmbXYFocusKeyboardNavigation.SelectedIndex = (int)scrollViewer.XYFocusKeyboardNavigation;
        }

void UpdateCmbZoomMode ( ) [inline, private]

Definition at line 351 of file ScrollViewerPage.xaml.cs.

        {
            cmbZoomMode.SelectedIndex = (int)scrollViewer.ZoomMode;
        }

void UpdateHeaderSizes ( ) [inline, private]

Definition at line 736 of file ScrollViewerPage.xaml.cs.

        {
            if (scrollViewer.Content == null)
            {
                if (rectangleLeftHeader != null)
                {
                    rectangleLeftHeader.Height = 0;
                }
                if (rectangleTopHeader != null)
                {
                    rectangleTopHeader.Width = 0;
                }
            }
            else
            {
                if (rectangleLeftHeader != null)
                {
                    rectangleLeftHeader.Height = (scrollViewer.Content as FrameworkElement).ActualHeight;
                }
                if (rectangleTopHeader != null)
                {
                    rectangleTopHeader.Width = (scrollViewer.Content as FrameworkElement).ActualWidth;
                }
            }
        }

void UpdateTxtMargin ( ) [inline, private]

Definition at line 652 of file ScrollViewerPage.xaml.cs.

        {
            txtMargin.Text = scrollViewer.Margin.ToString();
        }

void UpdateTxtMaxZoomFactor ( ) [inline, private]

Definition at line 1021 of file ScrollViewerPage.xaml.cs.

        {
            txtMaxZoomFactor.Text = scrollViewer.MaxZoomFactor.ToString();
        }

void UpdateTxtMinZoomFactor ( ) [inline, private]

Definition at line 1016 of file ScrollViewerPage.xaml.cs.

        {
            txtMinZoomFactor.Text = scrollViewer.MinZoomFactor.ToString();
        }

void UpdateTxtPadding ( ) [inline, private]

Definition at line 657 of file ScrollViewerPage.xaml.cs.

        {
            txtPadding.Text = scrollViewer.Padding.ToString();
        }

void UseScrollViewer ( ) [inline, private]

Definition at line 50 of file ScrollViewerPage.xaml.cs.

        {
            try
            {
                UpdateCmbHorizontalScrollBarVisibility();
                UpdateCmbHorizontalScrollMode();
                UpdateChkIsHorizontalScrollChainingEnabled();
                UpdateChkIsHorizontalRailEnabled();
                UpdateCmbVerticalScrollBarVisibility();
                UpdateCmbVerticalScrollMode();
                UpdateChkIsVerticalScrollChainingEnabled();
                UpdateChkIsVerticalRailEnabled();
                UpdateCmbZoomMode();
                UpdateChkIsZoomChainingEnabled();
                UpdateCmbContentHorizontalAlignment();
                UpdateCmbContentVerticalAlignment();
                UpdateCmbScrollViewerManipulationMode();
                UpdateCmbContentManipulationMode();
                UpdateCmbBackground();
                UpdateCmbContent();
                UpdateCmbXYFocusKeyboardNavigation();
                UpdateTxtMinZoomFactor();
                UpdateTxtMaxZoomFactor();
                UpdateTxtMargin();
                UpdateTxtPadding();
                UpdateChkIsEnabled();
                UpdateChkIsTabStop();

                scrollViewer.ViewChanging += ScrollViewer_ViewChanging;
                scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstScrollViewerEvents.Items.Add(ex.ToString());
            }
        }

Member Data Documentation

Border border [private]

Definition at line 29 of file ScrollViewerPage.xaml.cs.

Button button [private]

Definition at line 27 of file ScrollViewerPage.xaml.cs.

StackPanel horizontalStackPanel [private]

Definition at line 31 of file ScrollViewerPage.xaml.cs.

Image largeImg [private]

Definition at line 25 of file ScrollViewerPage.xaml.cs.

Border populatedBorder [private]

Definition at line 30 of file ScrollViewerPage.xaml.cs.

Rectangle rectangle [private]

Definition at line 26 of file ScrollViewerPage.xaml.cs.

Rectangle rectangleLeftHeader [private]

Definition at line 34 of file ScrollViewerPage.xaml.cs.

Rectangle rectangleTopHeader [private]

Definition at line 35 of file ScrollViewerPage.xaml.cs.

Rectangle rectangleTopLeftHeader [private]

Definition at line 33 of file ScrollViewerPage.xaml.cs.

RepeatButton repeatButton [private]

Definition at line 28 of file ScrollViewerPage.xaml.cs.

TextBlock textBlock [private]

Definition at line 22 of file ScrollViewerPage.xaml.cs.

TilePanel tilePanel [private]

Definition at line 24 of file ScrollViewerPage.xaml.cs.

StackPanel verticalStackPanel [private]

Definition at line 32 of file ScrollViewerPage.xaml.cs.

Viewbox viewbox [private]

Definition at line 23 of file ScrollViewerPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ScrollViewerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewKeyboardAndGamepadNavigationPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewKeyboardAndGamepadNavigationPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollViewKeyboardAndGamepadNavigationPage Class Reference

List of all members.

Public Member Functions

ScrollViewKeyboardAndGamepadNavigationPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollViewKeyboardAndGamepadNavigationPage ()
void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ScrollPresenter_ExtentChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ScrollAnimationStarting (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomAnimationStarting (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
void | ScrollView_ExtentChanged (ScrollView sender, object args)
void | ScrollView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ScrollView_GotFocus (object sender, RoutedEventArgs e)
void | ScrollView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ScrollView_LostFocus (object sender, RoutedEventArgs e)
void | ScrollView_ScrollAnimationStarting (ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
void | ScrollView_StateChanged (ScrollView sender, object args)
void | ScrollView_ViewChanged (ScrollView sender, object args)
void | ScrollView_ZoomAnimationStarting (ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)

Private Attributes

Object | asyncEventReportingLock = new Object()
List< string > | lstAsyncEventMessage = new List<string>()

Detailed Description

Definition at line 14 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewKeyboardAndGamepadNavigationPage ( ) [inline]

Definition at line 19 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            this.InitializeComponent();
        }

~ScrollViewKeyboardAndGamepadNavigationPage ( ) [inline, private]

Definition at line 24 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 249 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 100)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 100);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }
                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 282 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 118 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void ChkLogScrollPresenterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 123 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            if (muxScrollView != null)
            {
                ScrollPresenter scrollPresenter = muxScrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
                }
            }
        }

void ChkLogScrollPresenterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 140 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            if (muxScrollView != null)
            {
                ScrollPresenter scrollPresenter = muxScrollView.ScrollPresenter;

                if (scrollPresenter != null)
                {
                    scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
                    scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
                    scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
                    scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
                    scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
                }
            }
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 189 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 196 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 157 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            if (muxScrollView != null)
            {
                muxScrollView.GettingFocus += ScrollView_GettingFocus;
                muxScrollView.GotFocus += ScrollView_GotFocus;
                muxScrollView.LosingFocus += ScrollView_LosingFocus;
                muxScrollView.LostFocus += ScrollView_LostFocus;
                muxScrollView.ExtentChanged += ScrollView_ExtentChanged;
                muxScrollView.StateChanged += ScrollView_StateChanged;
                muxScrollView.ViewChanged += ScrollView_ViewChanged;
                muxScrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
                muxScrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
            }
        }

void ChkLogScrollViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 173 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            if (muxScrollView != null)
            {
                muxScrollView.GettingFocus -= ScrollView_GettingFocus;
                muxScrollView.GotFocus -= ScrollView_GotFocus;
                muxScrollView.LosingFocus -= ScrollView_LosingFocus;
                muxScrollView.LostFocus -= ScrollView_LostFocus;
                muxScrollView.ExtentChanged -= ScrollView_ExtentChanged;
                muxScrollView.StateChanged -= ScrollView_StateChanged;
                muxScrollView.ViewChanged -= ScrollView_ViewChanged;
                muxScrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
                muxScrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
            }
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 203 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 210 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 217 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            if ((chkLogScrollPresenterMessages.IsChecked == false && sender is ScrollPresenter) ||
                (chkLogScrollViewMessages.IsChecked == false && sender is ScrollView))
            {
                return;
            }

            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage = string.Empty;
            string senderName = string.Empty;

            FrameworkElement fe = sender as FrameworkElement;

            if (fe != null)
            {
                senderName = "s:" + fe.Name + ", ";
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendAsyncEventMessage(asyncEventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 28 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ScrollPresenter_ExtentChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 38 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
        }

void ScrollPresenter_ScrollAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 53 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId + " SP=(" + args.StartPosition.X + "," + args.StartPosition.Y + ") EP=(" + args.EndPosition.X + "," + args.EndPosition.Y + ")");
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 43 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.StateChanged " + sender.State.ToString());
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 48 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
        }

void ScrollPresenter_ZoomAnimationStarting | ( | ScrollPresenter | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 58 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollPresenter.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint + ", SZF=" + args.StartZoomFactor + ", EZF=" + args.EndZoomFactor);
        }

void ScrollView_ExtentChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 93 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
        }

void ScrollView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 63 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage("ScrollView.GettingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
        }

void ScrollView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.GotFocus");
        }

void ScrollView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 78 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendAsyncEventMessage("ScrollView.LosingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
        }

void ScrollView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.LostFocus");
        }

void ScrollView_ScrollAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingScrollAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 108 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId);
        }

void ScrollView_StateChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 98 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.StateChanged " + sender.State.ToString());
        }

void ScrollView_ViewChanged | ( | ScrollView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 103 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
        }

void ScrollView_ZoomAnimationStarting | ( | ScrollView | sender,
 |  | ScrollingZoomAnimationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 113 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

        {
            AppendAsyncEventMessage("ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint);
        }

Member Data Documentation

Object asyncEventReportingLock = new Object() [private]

Definition at line 16 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 17 of file ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewPage
Public Member Functions | Private Member Functions

ScrollViewPage Class Reference

List of all members.

Public Member Functions

ScrollViewPage ()

Private Member Functions

void CmbScrollViewOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 16 of file ScrollViewPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewPage ( ) [inline]

Definition at line 18 of file ScrollViewPage.xaml.cs.

        {
            LogController.InitializeLogging();
            this.InitializeComponent();

            navigateToSimpleContents.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewsWithSimpleContentsPage), 0); };
            navigateToDynamic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewDynamicPage), 0); };
            navigateToScrollControllers.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewWithScrollControllersPage), 0); };
            navigateToRTL.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewWithRTLFlowDirectionPage), 0); };
            navigateToKeyboardAndGamepadNavigation.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewKeyboardAndGamepadNavigationPage), 0); };
            navigateToBringIntoView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewBringIntoViewPage), 0); };
            navigateToBlank.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewBlankPage), 0); };
        }

Member Function Documentation

void CmbScrollViewOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 32 of file ScrollViewPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                "ScrollView",
                cmbScrollViewOutputDebugStringLevel.SelectedIndex == 1 || cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2,
                cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2);

            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                "ScrollPresenter",
                cmbScrollViewOutputDebugStringLevel.SelectedIndex == 1 || cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2,
                cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2);
        }

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewsWithSimpleContentsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewsWithSimpleContentsPage
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

ScrollViewsWithSimpleContentsPage Class Reference

List of all members.

Public Member Functions

ScrollViewsWithSimpleContentsPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Properties

ScrollView | SelectedScrollView [get]

Private Member Functions

~ScrollViewsWithSimpleContentsPage ()
void | btnClearFullLog_Click (object sender, RoutedEventArgs e)
void | btnGetFullLog_Click (object sender, RoutedEventArgs e)
void | btnResetViews_Click (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ClearFullLog ()
void | CmbIgnoredInputKinds_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbShowScrollView_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | GetFullLog ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | ResetView (ScrollView scrollView)
void | ScrollPresenter_ScrollCompleted (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
void | ScrollPresenter_StateChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollPresenter_ZoomCompleted (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
void | ScrollViewsWithSimpleContentsPage_KeyDown (object sender, KeyRoutedEventArgs e)
void | ScrollViewsWithSimpleContentsPage_Loaded (object sender, RoutedEventArgs e)

Private Attributes

List< string > | fullLogs = new List<string>()
int | scrollView52ZoomFactorChangeCorrelationId = -1

Detailed Description

Definition at line 29 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewsWithSimpleContentsPage ( ) [inline]

Definition at line 34 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            this.InitializeComponent();

            this.scrollView51.XYFocusKeyboardNavigation = XYFocusKeyboardNavigationMode.Enabled;

            Loaded += ScrollViewsWithSimpleContentsPage_Loaded;
            KeyDown += ScrollViewsWithSimpleContentsPage_KeyDown;
        }

~ScrollViewsWithSimpleContentsPage ( ) [inline, private]

Definition at line 44 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
        }

Member Function Documentation

void btnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 397 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            ClearFullLog();
        }

void btnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 392 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            GetFullLog();
        }

void btnResetViews_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 402 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            this.txtResetStatus.Text = "Resetting views ...";
            ResetView(this.scrollView11);
            ResetView(this.scrollView21);
            ResetView(this.scrollView31);
            ResetView(this.scrollView41);
            ResetView(this.scrollView51);
            ResetView(this.scrollView12);
            ResetView(this.scrollView22);
            ResetView(this.scrollView32);
            ResetView(this.scrollView42);
            ResetView(this.scrollView52);
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 115 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ScrollPresenter",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ScrollPresenter",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 131 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ScrollPresenter",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ScrollPresenter",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 147 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: true,
                isLoggingVerboseLevel: true);

            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 163 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            MUXControlsTestHooks.SetLoggingLevelForType(
                type: "ScrollView",
                isLoggingInfoLevel: false,
                isLoggingVerboseLevel: false);

            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ClearFullLog ( ) [inline, private]

Definition at line 429 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            this.txtResetStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
            chkLogUpdated.IsChecked = false;
            this.fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
            chkLogCleared.IsChecked = true;
            this.txtResetStatus.Text = "ClearFullLog. Done.";
        }

void CmbIgnoredInputKinds_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 357 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            ScrollingInputKinds ignoredInputKinds;
            ScrollView scrollView = SelectedScrollView;

            switch (cmbIgnoredInputKinds.SelectedIndex)
            {
                case 0:
                    return;
                case 1:
                    ignoredInputKinds = ScrollingInputKinds.None;
                    break;
                case 2:
                    ignoredInputKinds = ScrollingInputKinds.Touch;
                    break;
                case 3:
                    ignoredInputKinds = ScrollingInputKinds.Pen;
                    break;
                case 4:
                    ignoredInputKinds = ScrollingInputKinds.MouseWheel;
                    break;
                case 5:
                    ignoredInputKinds = ScrollingInputKinds.Keyboard;
                    break;
                case 6:
                    ignoredInputKinds = ScrollingInputKinds.Gamepad;
                    break;
                default:
                    ignoredInputKinds = ScrollingInputKinds.All;
                    break;
            }

            scrollView.IgnoredInputKinds = ignoredInputKinds;
        }

void CmbShowScrollView_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 248 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            if (this.scrollView11 != null)
            {
                if (cmbShowScrollView.SelectedIndex == 0)
                {
                    this.scrollView11.Visibility = Visibility.Visible;
                    this.scrollView21.Visibility = Visibility.Visible;
                    this.scrollView31.Visibility = Visibility.Visible;
                    this.scrollView41.Visibility = Visibility.Visible;
                    this.scrollView51.Visibility = Visibility.Visible;
                    this.scrollView12.Visibility = Visibility.Visible;
                    this.scrollView22.Visibility = Visibility.Visible;
                    this.scrollView32.Visibility = Visibility.Visible;
                    this.scrollView42.Visibility = Visibility.Visible;
                    this.scrollView52.Visibility = Visibility.Visible;

                    this.scrollView11.Width = double.NaN;
                    this.scrollView21.Width = double.NaN;
                    this.scrollView31.Width = double.NaN;
                    this.scrollView41.Width = double.NaN;
                    this.scrollView51.Width = double.NaN;
                    this.scrollView12.Width = double.NaN;
                    this.scrollView22.Width = double.NaN;
                    this.scrollView32.Width = double.NaN;
                    this.scrollView42.Width = double.NaN;
                    this.scrollView52.Width = double.NaN;
                    this.scrollView11.Height = double.NaN;
                    this.scrollView21.Height = double.NaN;
                    this.scrollView31.Height = double.NaN;
                    this.scrollView41.Height = double.NaN;
                    this.scrollView51.Height = double.NaN;
                    this.scrollView12.Height = double.NaN;
                    this.scrollView22.Height = double.NaN;
                    this.scrollView32.Height = double.NaN;
                    this.scrollView42.Height = double.NaN;
                    this.scrollView52.Height = double.NaN;

                    for (int rowIndex = 2; rowIndex < 4; rowIndex++)
                        this.rootGrid.RowDefinitions[rowIndex].Height = new GridLength(1, GridUnitType.Star);

                    for (int columnIndex = 0; columnIndex < 5; columnIndex++)
                        this.rootGrid.ColumnDefinitions[columnIndex].Width = new GridLength(1, GridUnitType.Star);

                    cmbIgnoredInputKinds.IsEnabled = false;
                    cmbIgnoredInputKinds.SelectedIndex = 0;
                }
                else
                {
                    this.scrollView11.Visibility = Visibility.Collapsed;
                    this.scrollView21.Visibility = Visibility.Collapsed;
                    this.scrollView31.Visibility = Visibility.Collapsed;
                    this.scrollView41.Visibility = Visibility.Collapsed;
                    this.scrollView51.Visibility = Visibility.Collapsed;
                    this.scrollView12.Visibility = Visibility.Collapsed;
                    this.scrollView22.Visibility = Visibility.Collapsed;
                    this.scrollView32.Visibility = Visibility.Collapsed;
                    this.scrollView42.Visibility = Visibility.Collapsed;
                    this.scrollView52.Visibility = Visibility.Collapsed;

                    for (int rowIndex = 2; rowIndex < 4; rowIndex++)
                        this.rootGrid.RowDefinitions[rowIndex].Height = GridLength.Auto;

                    for (int columnIndex = 0; columnIndex < 5; columnIndex++)
                        this.rootGrid.ColumnDefinitions[columnIndex].Width = GridLength.Auto;

                    cmbIgnoredInputKinds.IsEnabled = true;

                    ScrollView scrollView = SelectedScrollView;

                    scrollView.Visibility = Visibility.Visible;
                    scrollView.Width = 300;
                    scrollView.Height = 400;

                    txtScrollPresenterHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
                    txtScrollPresenterVerticalOffset.Text = scrollView.VerticalOffset.ToString();
                    txtScrollPresenterZoomFactor.Text = scrollView.ZoomFactor.ToString();

                    switch (scrollView.IgnoredInputKinds)
                    {
                        case ScrollingInputKinds.None:
                            cmbIgnoredInputKinds.SelectedIndex = 1;
                            break;
                        case ScrollingInputKinds.Touch:
                            cmbIgnoredInputKinds.SelectedIndex = 2;
                            break;
                        case ScrollingInputKinds.Pen:
                            cmbIgnoredInputKinds.SelectedIndex = 3;
                            break;
                        case ScrollingInputKinds.MouseWheel:
                            cmbIgnoredInputKinds.SelectedIndex = 4;
                            break;
                        case ScrollingInputKinds.Keyboard:
                            cmbIgnoredInputKinds.SelectedIndex = 5;
                            break;
                        case ScrollingInputKinds.Gamepad:
                            cmbIgnoredInputKinds.SelectedIndex = 6;
                            break;
                        case ScrollingInputKinds.All:
                            cmbIgnoredInputKinds.SelectedIndex = 7;
                            break;
                        default:
                            cmbIgnoredInputKinds.SelectedIndex = 0;
                            break;
                    }
                }
            }
        }

void GetFullLog ( ) [inline, private]

Definition at line 417 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            this.txtResetStatus.Text = "GetFullLog. Populating cmbFullLog...";
            chkLogCleared.IsChecked = false;
            foreach (string log in this.fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
            chkLogUpdated.IsChecked = true;
            this.txtResetStatus.Text = "GetFullLog. Done.";
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 439 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;
            FrameworkElement fe = sender as FrameworkElement;

            if (fe != null)
            {
                senderName = "s:" + fe.Name + ", ";
            }

            fullLogs.Add((args.IsVerboseLevel ? "Verbose: " : "Info: ") + senderName + "m:" + msg);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 48 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void ResetView ( ScrollView scrollView ) [inline, private]

Definition at line 454 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
            string scrollPresenterId = (VisualTreeHelper.GetParent(scrollPresenter) as FrameworkElement).Name + "." + scrollPresenter.Name;

            int viewChangeCorrelationId = scrollPresenter.ScrollTo(0.0, 0.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            this.fullLogs.Add(scrollPresenterId + " ScrollTo requested. Id=" + viewChangeCorrelationId);

            viewChangeCorrelationId = scrollPresenter.ZoomTo(1.0f, System.Numerics.Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
            this.fullLogs.Add(scrollPresenterId + " ZoomTo requested. Id=" + viewChangeCorrelationId);

            chkLogUpdated.IsChecked = false;

            if (scrollView == this.scrollView52)
                scrollView52ZoomFactorChangeCorrelationId = viewChangeCorrelationId;
        }

void ScrollPresenter_ScrollCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 212 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            string senderId = "." + sender.Name;
            FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
            if (parent != null)
            {
                senderId = parent.Name + senderId;
            }

            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);

            this.fullLogs.Add(senderId + " ScrollCompleted. OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
            chkLogUpdated.IsChecked = false;
        }

void ScrollPresenter_StateChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 179 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            string senderId = "." + sender.Name;
            FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
            if (parent != null)
            {
                senderId = "." + parent.Name + senderId;
                FrameworkElement grandParent = VisualTreeHelper.GetParent(parent) as FrameworkElement;
                if (grandParent != null)
                {
                    senderId = grandParent.Name + senderId;
                }
            }
            this.txtScrollPresenterState.Text = senderId + " " + sender.State.ToString();
            this.fullLogs.Add(senderId + " StateChanged S=" + sender.State.ToString());
            chkLogUpdated.IsChecked = false;
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 197 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            string senderId = "." + sender.Name;
            FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
            if (parent != null)
            {
                senderId = parent.Name + senderId;
            }
            this.txtScrollPresenterHorizontalOffset.Text = sender.HorizontalOffset.ToString();
            this.txtScrollPresenterVerticalOffset.Text = sender.VerticalOffset.ToString();
            this.txtScrollPresenterZoomFactor.Text = sender.ZoomFactor.ToString();
            this.fullLogs.Add(senderId + " ViewChanged H=" + this.txtScrollPresenterHorizontalOffset.Text + ", V=" + this.txtScrollPresenterVerticalOffset.Text + ", ZF=" + this.txtScrollPresenterZoomFactor.Text);
            chkLogUpdated.IsChecked = false;
        }

void ScrollPresenter_ZoomCompleted | ( | ScrollPresenter | sender,
 |  | ScrollingZoomCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 227 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            string senderId = "." + sender.Name;
            FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
            if (parent != null)
            {
                senderId = parent.Name + senderId;
            }

            ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);

            this.fullLogs.Add(senderId + " ZoomCompleted. ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
            chkLogUpdated.IsChecked = false;

            if (args.CorrelationId == scrollView52ZoomFactorChangeCorrelationId)
            {
                this.txtResetStatus.Text = "Views reset";
                scrollView52ZoomFactorChangeCorrelationId = -1;
            }
        }

void ScrollViewsWithSimpleContentsPage_KeyDown | ( | object | sender,
 |  | KeyRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 103 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            if (e.Key == Windows.System.VirtualKey.G)
            {
                GetFullLog();
            }
            else if (e.Key == Windows.System.VirtualKey.C)
            {
                ClearFullLog();
            }
        }

void ScrollViewsWithSimpleContentsPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 58 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

        {
            this.scrollView11.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView21.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView31.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView41.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView51.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView11.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView21.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView31.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView41.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView51.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView11.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView21.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView31.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView41.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView51.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView11.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView21.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView31.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView41.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView51.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;

            this.scrollView12.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView22.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView32.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView42.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView52.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
            this.scrollView12.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView22.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView32.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView42.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView52.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
            this.scrollView12.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView22.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView32.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView42.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView52.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
            this.scrollView12.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView22.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView32.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView42.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
            this.scrollView52.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
        }

Member Data Documentation

List<string> fullLogs = new List<string>() [private]

Definition at line 31 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

int scrollView52ZoomFactorChangeCorrelationId = -1 [private]

Definition at line 32 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

Property Documentation

ScrollView SelectedScrollView [get, private]

Definition at line 472 of file ScrollViewsWithSimpleContentsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewsWithSimpleContentsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewWithRTLFlowDirectionPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewWithRTLFlowDirectionPage
Public Member Functions | Private Member Functions

ScrollViewWithRTLFlowDirectionPage Class Reference

List of all members.

Public Member Functions

ScrollViewWithRTLFlowDirectionPage ()

Private Member Functions

void | ChkScrollViewContentFlowDirection_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewContentFlowDirection_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollViewFlowDirection_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewFlowDirection_Unchecked (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 8 of file ScrollViewWithRTLFlowDirectionPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewWithRTLFlowDirectionPage ( ) [inline]

Definition at line 10 of file ScrollViewWithRTLFlowDirectionPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void ChkScrollViewContentFlowDirection_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file ScrollViewWithRTLFlowDirectionPage.xaml.cs.

        {
            if (muxScrollView != null && wuxScrollViewer != null)
            {
                FrameworkElement content = muxScrollView.Content as FrameworkElement;

                if (content != null)
                {
                    content.FlowDirection = FlowDirection.RightToLeft;
                }

                content = wuxScrollViewer.Content as FrameworkElement;

                if (content != null)
                {
                    content.FlowDirection = FlowDirection.RightToLeft;
                }
            }
        }

void ChkScrollViewContentFlowDirection_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 53 of file ScrollViewWithRTLFlowDirectionPage.xaml.cs.

        {
            if (muxScrollView != null && wuxScrollViewer != null)
            {
                FrameworkElement content = muxScrollView.Content as FrameworkElement;

                if (content != null)
                {
                    content.FlowDirection = FlowDirection.LeftToRight;
                }

                content = wuxScrollViewer.Content as FrameworkElement;

                if (content != null)
                {
                    content.FlowDirection = FlowDirection.LeftToRight;
                }
            }
        }

void ChkScrollViewFlowDirection_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 15 of file ScrollViewWithRTLFlowDirectionPage.xaml.cs.

        {
            if (muxScrollView != null && wuxScrollViewer != null)
            {
                muxScrollView.FlowDirection = FlowDirection.RightToLeft;
                wuxScrollViewer.FlowDirection = FlowDirection.RightToLeft;
            }
        }

void ChkScrollViewFlowDirection_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 24 of file ScrollViewWithRTLFlowDirectionPage.xaml.cs.

        {
            if (muxScrollView != null && wuxScrollViewer != null)
            {
                muxScrollView.FlowDirection = FlowDirection.LeftToRight;
                wuxScrollViewer.FlowDirection = FlowDirection.LeftToRight;
            }
        }

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewWithRTLFlowDirectionPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewWithScrollControllersPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ScrollViewWithScrollControllersPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ScrollViewWithScrollControllersPage Class Reference

List of all members.

Public Member Functions

ScrollViewWithScrollControllersPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~ScrollViewWithScrollControllersPage ()
void | AppendAsyncEventMessage ()
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnGetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnGetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnGetHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnGetVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnGetWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetZoomMode_Click (object sender, RoutedEventArgs e)
void | BtnSetContentHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetContentMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetContentOrientation_Click (object sender, RoutedEventArgs e)
void | BtnSetContentWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnSetHorizontalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollBarVisibility_Click (object sender, RoutedEventArgs e)
void | BtnSetVerticalScrollMode_Click (object sender, RoutedEventArgs e)
void | BtnSetWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetZoomMode_Click (object sender, RoutedEventArgs e)
void | ChkContentProperties_Checked (object sender, RoutedEventArgs e)
void | ChkContentProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsContentEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkIsContentEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsContentTabStop_Checked (object sender, RoutedEventArgs e)
void | ChkIsContentTabStop_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsEnabled_Checked (object sender, RoutedEventArgs e)
void | ChkIsEnabled_Unchecked (object sender, RoutedEventArgs e)
void | ChkIsTabStop_Checked (object sender, RoutedEventArgs e)
void | ChkIsTabStop_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollPresenterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogScrollViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterAttachedProperties_Checked (object sender, RoutedEventArgs e)
void | ChkScrollPresenterAttachedProperties_Unchecked (object sender, RoutedEventArgs e)
void | ChkScrollViewProperties_Checked (object sender, RoutedEventArgs e)
void | ChkScrollViewProperties_Unchecked (object sender, RoutedEventArgs e)
Thickness | GetThicknessFromString (string thickness)
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | UpdateContentHeight ()
void | UpdateContentMargin ()
void | UpdateContentOrientation ()
void | UpdateContentWidth ()
void | UpdateHeight ()
void | UpdateHorizontalScrollBarVisibility ()
void | UpdateHorizontalScrollMode ()
void | UpdatePadding ()
void | UpdateVerticalScrollBarVisibility ()
void | UpdateVerticalScrollMode ()
void | UpdateWidth ()
void | UpdateZoomMode ()
void | UseScrollView (ScrollView sv2)

Private Attributes

Object | asyncEventReportingLock = new Object()
List< string > | lstAsyncEventMessage = new List<string>()
ScrollView | scrollView = null

Detailed Description

Definition at line 14 of file ScrollViewWithScrollControllersPage.xaml.cs.

Constructor & Destructor Documentation

ScrollViewWithScrollControllersPage ( ) [inline]

Definition at line 20 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            // We need the styles of the CompositionScrollController, so lets load it
            App.AppendResourceDictionaryToMergedDictionaries(App.AdditionStylesXaml);

            this.InitializeComponent();
            UseScrollView(this.markupScrollView);
        }

~ScrollViewWithScrollControllersPage ( ) [inline, private]

Definition at line 29 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 605 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    lstLogs.Items.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 617 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 534 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnGetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 297 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateContentHeight();
        }

void BtnGetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 317 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateContentMargin();
        }

void BtnGetContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateContentOrientation();
        }

void BtnGetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 277 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateContentWidth();
        }

void BtnGetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 185 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateHeight();
        }

void BtnGetHorizontalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 221 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateHorizontalScrollBarVisibility();
        }

void BtnGetHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateHorizontalScrollMode();
        }

void BtnGetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 203 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdatePadding();
        }

void BtnGetVerticalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 239 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateVerticalScrollBarVisibility();
        }

void BtnGetVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 101 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateVerticalScrollMode();
        }

void BtnGetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 167 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateWidth();
        }

void BtnGetZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 106 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            UpdateZoomMode();
        }

void BtnSetContentHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 302 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                FrameworkElement contentAsFE = scrollView.Content as FrameworkElement;
                if (contentAsFE != null)
                    contentAsFE.Height = Convert.ToDouble(txtContentHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 322 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                FrameworkElement contentAsFE = scrollView.Content as FrameworkElement;
                if (contentAsFE != null)
                    contentAsFE.Margin = GetThicknessFromString(txtContentMargin.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentOrientation_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 111 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
                scrollView.ContentOrientation = co;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetContentWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 282 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                FrameworkElement contentAsFE = scrollView.Content as FrameworkElement;
                if (contentAsFE != null)
                    contentAsFE.Width = Convert.ToDouble(txtContentWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 190 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                scrollView.Height = Convert.ToDouble(txtHeight.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 226 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                scrollView.HorizontalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbHorizontalScrollBarVisibility.SelectedIndex;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetHorizontalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 125 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                ScrollingScrollMode ssm = (ScrollingScrollMode)cmbHorizontalScrollMode.SelectedIndex;
                scrollView.HorizontalScrollMode = ssm;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 208 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                scrollView.Padding = GetThicknessFromString(txtPadding.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalScrollBarVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 244 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                scrollView.VerticalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbVerticalScrollBarVisibility.SelectedIndex;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetVerticalScrollMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 139 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                ScrollingScrollMode ssm = (ScrollingScrollMode)cmbVerticalScrollMode.SelectedIndex;
                scrollView.VerticalScrollMode = ssm;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 172 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                scrollView.Width = Convert.ToDouble(txtWidth.Text);
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void BtnSetZoomMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 153 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                ScrollingZoomMode ssm = (ScrollingZoomMode)cmbZoomMode.SelectedIndex;
                scrollView.ZoomMode = ssm;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void ChkContentProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 67 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Visible;
        }

void ChkContentProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdContentProperties != null)
                grdContentProperties.Visibility = Visibility.Collapsed;
        }

void ChkIsContentEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 337 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            Control contentAsC = scrollView.Content as Control;
            if (contentAsC != null)
                contentAsC.IsEnabled = true;
        }

void ChkIsContentEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 344 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            Control contentAsC = scrollView.Content as Control;
            if (contentAsC != null)
                contentAsC.IsEnabled = false;
        }

void ChkIsContentTabStop_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 351 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            Control contentAsC = scrollView.Content as Control;
            if (contentAsC != null)
                contentAsC.IsTabStop = true;
        }

void ChkIsContentTabStop_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 358 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            Control contentAsC = scrollView.Content as Control;
            if (contentAsC != null)
                contentAsC.IsTabStop = false;
        }

void ChkIsEnabled_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 257 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            scrollView.IsEnabled = true;
        }

void ChkIsEnabled_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 262 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            scrollView.IsEnabled = false;
        }

void ChkIsTabStop_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 267 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            scrollView.IsTabStop = true;
        }

void ChkIsTabStop_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 272 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            scrollView.IsTabStop = false;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 79 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 85 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogScrollPresenterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 539 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollPresenterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 546 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollViewMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 553 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogScrollViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 560 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogScrollPresenterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkScrollPresenterAttachedProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 55 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdScrollPresenterAttachedProperties != null)
                grdScrollPresenterAttachedProperties.Visibility = Visibility.Visible;
        }

void ChkScrollPresenterAttachedProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 61 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdScrollPresenterAttachedProperties != null)
                grdScrollPresenterAttachedProperties.Visibility = Visibility.Collapsed;
        }

void ChkScrollViewProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 43 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdScrollViewProperties != null)
                grdScrollViewProperties.Visibility = Visibility.Visible;
        }

void ChkScrollViewProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 49 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (grdScrollViewProperties != null)
                grdScrollViewProperties.Visibility = Visibility.Collapsed;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 469 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 567 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string asyncEventMessage = string.Empty;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                asyncEventMessage = "Info: " + senderName + "m:" + msg;
            }

            lock (asyncEventReportingLock)
            {
                lstAsyncEventMessage.Add(asyncEventMessage);

                var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal,
                                                              AppendAsyncEventMessage);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 33 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            base.OnNavigatedFrom(e);
        }

void UpdateContentHeight ( ) [inline, private]

Definition at line 451 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            FrameworkElement contentAsFE = scrollView.Content as FrameworkElement;
            if (contentAsFE == null)
                txtContentHeight.Text = string.Empty;
            else
                txtContentHeight.Text = contentAsFE.Height.ToString();
        }

void UpdateContentMargin ( ) [inline, private]

Definition at line 460 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            FrameworkElement contentAsFE = scrollView.Content as FrameworkElement;
            if (contentAsFE == null)
                txtContentMargin.Text = string.Empty;
            else
                txtContentMargin.Text = contentAsFE.Margin.ToString();
        }

void UpdateContentOrientation ( ) [inline, private]

Definition at line 365 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                cmbContentOrientation.SelectedIndex = (int)scrollView.ContentOrientation;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateContentWidth ( ) [inline, private]

Definition at line 442 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            FrameworkElement contentAsFE = scrollView.Content as FrameworkElement;
            if (contentAsFE == null)
                txtContentWidth.Text = string.Empty;
            else
                txtContentWidth.Text = contentAsFE.Width.ToString();
        }

void UpdateHeight ( ) [inline, private]

Definition at line 422 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            txtHeight.Text = scrollView.Height.ToString();
        }

void UpdateHorizontalScrollBarVisibility ( ) [inline, private]

Definition at line 432 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            cmbHorizontalScrollBarVisibility.SelectedIndex = (int)scrollView.HorizontalScrollBarVisibility;
        }

void UpdateHorizontalScrollMode ( ) [inline, private]

Definition at line 378 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                cmbHorizontalScrollMode.SelectedIndex = (int)scrollView.HorizontalScrollMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdatePadding ( ) [inline, private]

Definition at line 427 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            txtPadding.Text = scrollView.Padding.ToString();
        }

void UpdateVerticalScrollBarVisibility ( ) [inline, private]

Definition at line 437 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            cmbVerticalScrollBarVisibility.SelectedIndex = (int)scrollView.VerticalScrollBarVisibility;
        }

void UpdateVerticalScrollMode ( ) [inline, private]

Definition at line 391 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                cmbVerticalScrollMode.SelectedIndex = (int)scrollView.VerticalScrollMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UpdateWidth ( ) [inline, private]

Definition at line 417 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            txtWidth.Text = scrollView.Width.ToString();
        }

void UpdateZoomMode ( ) [inline, private]

Definition at line 404 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            try
            {
                cmbZoomMode.SelectedIndex = (int)scrollView.ZoomMode;
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

void UseScrollView ( ScrollView sv2 ) [inline, private]

Definition at line 479 of file ScrollViewWithScrollControllersPage.xaml.cs.

        {
            if (scrollView == sv2 || sv2 == null)
                return;

            try
            {
                if (scrollView == null && (chkLogScrollViewMessages.IsChecked == true || chkLogScrollPresenterMessages.IsChecked == true))
                {
                    MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;

                    if (chkLogScrollPresenterMessages.IsChecked == true)
                    {
                        MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    }
                    if (chkLogScrollViewMessages.IsChecked == true)
                    {
                        MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                    }
                }

                scrollView = sv2;

                UpdateContentOrientation();
                UpdateHorizontalScrollMode();
                UpdateVerticalScrollMode();
                UpdateZoomMode();

                UpdateWidth();
                UpdateHeight();
                UpdatePadding();
                UpdateHorizontalScrollBarVisibility();
                UpdateVerticalScrollBarVisibility();

                chkIsEnabled.IsChecked = scrollView.IsEnabled;
                chkIsTabStop.IsChecked = scrollView.IsTabStop;

                UpdateContentWidth();
                UpdateContentHeight();
                UpdateContentMargin();

                Control contentAsC = scrollView.Content as Control;
                if (contentAsC != null)
                {
                    chkIsContentEnabled.IsChecked = contentAsC.IsEnabled;
                    chkIsContentTabStop.IsChecked = contentAsC.IsTabStop;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                lstLogs.Items.Add(ex.ToString());
            }
        }

Member Data Documentation

Object asyncEventReportingLock = new Object() [private]

Definition at line 16 of file ScrollViewWithScrollControllersPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 17 of file ScrollViewWithScrollControllersPage.xaml.cs.

ScrollView scrollView = null [private]

Definition at line 18 of file ScrollViewWithScrollControllersPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewWithScrollControllersPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModeItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SelectionModeItem
Static Public Member Functions | Public Attributes | Static Private Attributes

SelectionModeItem Class Reference

List of all members.

Static Public Member Functions

static ObservableCollection
< SelectionModeItem > 		GetItems ()

Public Attributes

ListViewSelectionMode | Mode
string | Name

Static Private Attributes

static ObservableCollection
< SelectionModeItem > 		items

Detailed Description

Definition at line 141 of file RevealScenarioGrid.xaml.cs.

Member Function Documentation

static ObservableCollection<SelectionModeItem> GetItems ( ) [inline, static]

Definition at line 148 of file RevealScenarioGrid.xaml.cs.

        {
            if (items == null)
            {
                items = new ObservableCollection<SelectionModeItem>();
                foreach (ListViewSelectionMode mode in Enum.GetValues(typeof(ListViewSelectionMode)))
                {
                    items.Add(new SelectionModeItem { Name = Enum.GetName(typeof(ListViewSelectionMode), mode), Mode = mode });
                }
            }

            return items;
        }

Member Data Documentation

ObservableCollection<SelectionModeItem> items [static, private]

Definition at line 143 of file RevealScenarioGrid.xaml.cs.

ListViewSelectionMode Mode

Definition at line 146 of file RevealScenarioGrid.xaml.cs.

string Name

Definition at line 145 of file RevealScenarioGrid.xaml.cs.

The documentation for this class was generated from the following file:
  • Materials/Reveal/TestUI/RevealScenarioGrid.xaml.cs
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SelectorBarPage
Public Member Functions | Private Member Functions

SelectorBarPage Class Reference

List of all members.

Public Member Functions

SelectorBarPage ()

Private Member Functions

void CmbSelectorBarOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 16 of file SelectorBarPage.xaml.cs.

Constructor & Destructor Documentation

SelectorBarPage ( ) [inline]

Definition at line 18 of file SelectorBarPage.xaml.cs.

        {
            LogController.InitializeLogging();
            this.InitializeComponent();

            navigateToSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(SelectorBarSummaryPage), 0); };
            navigateToSample.Click += delegate { Frame.NavigateWithoutAnimation(typeof(SelectorBarSamplePage), 0); };
        }

Member Function Documentation

void CmbSelectorBarOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 27 of file SelectorBarPage.xaml.cs.

        {
            if (chkSelectorBar != null && chkSelectorBar.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "SelectorBar",
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 1 || cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2,
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkItemsView != null && chkItemsView.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ItemsView",
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 1 || cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2,
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkItemContainer != null && chkItemContainer.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ItemContainer",
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 1 || cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2,
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2);
            }

            if (chkItemsRepeater != null && chkItemsRepeater.IsChecked == true)
            {
                MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                    "ItemsRepeater",
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 1 || cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2,
                    cmbSelectorBarOutputDebugStringLevel.SelectedIndex == 2);
            }
        }

The documentation for this class was generated from the following file:
  • SelectorBar/TestUI/SelectorBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarSamplePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SelectorBarSamplePage
Public Member Functions | Private Member Functions | Private Attributes

SelectorBarSamplePage Class Reference

List of all members.

Public Member Functions

SelectorBarSamplePage ()

Private Member Functions

~SelectorBarSamplePage ()
void | SelectorBar_SelectionChanged (SelectorBar sender, SelectorBarSelectionChangedEventArgs args)

Private Attributes

ObservableCollection< Recipe > | _colFavoritePhotos = null
ObservableCollection< Recipe > | _colRemotePhotos = null
ObservableCollection< Recipe > | _colSharedPhotos = null

Detailed Description

Definition at line 11 of file SelectorBarSamplePage.xaml.cs.

Constructor & Destructor Documentation

SelectorBarSamplePage ( ) [inline]

Definition at line 17 of file SelectorBarSamplePage.xaml.cs.

        {
            this.InitializeComponent();

            _colRemotePhotos = new ObservableCollection<Recipe>();
            _colSharedPhotos = new ObservableCollection<Recipe>();
            _colFavoritePhotos = new ObservableCollection<Recipe>();

            int imageCount = 20;

            for (int itemIndex = 0; itemIndex < imageCount; itemIndex++)
            {
                _colRemotePhotos.Add(new Recipe()
                {
                    ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1))
                });
                _colSharedPhotos.Add(new Recipe()
                {
                    ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + imageCount + 1))
                });
                _colFavoritePhotos.Add(new Recipe()
                {
                    ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 2 * imageCount + 1))
                });
            }
        }

~SelectorBarSamplePage ( ) [inline, private]

Definition at line 44 of file SelectorBarSamplePage.xaml.cs.

        {
        }

Member Function Documentation

void SelectorBar_SelectionChanged | ( | SelectorBar | sender,
 |  | SelectorBarSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 48 of file SelectorBarSamplePage.xaml.cs.

        {
            if (sender.SelectedItem == selectorBarItemRemote)
            {
                photos.ItemsSource = _colRemotePhotos;
            }
            else if (sender.SelectedItem == selectorBarItemShared)
            {
                photos.ItemsSource = _colSharedPhotos;
            }
            else
            {
                photos.ItemsSource = _colFavoritePhotos;
            }

            if (tblSelectedSelectorBarItem != null)
            {
                tblSelectedSelectorBarItem.Text = sender.SelectedItem == null ? "null" : sender.SelectedItem.Name;
            }
        }

Member Data Documentation

ObservableCollection<Recipe> _colFavoritePhotos = null [private]

Definition at line 15 of file SelectorBarSamplePage.xaml.cs.

ObservableCollection<Recipe> _colRemotePhotos = null [private]

Definition at line 13 of file SelectorBarSamplePage.xaml.cs.

ObservableCollection<Recipe> _colSharedPhotos = null [private]

Definition at line 14 of file SelectorBarSamplePage.xaml.cs.

The documentation for this class was generated from the following file:
  • SelectorBar/TestUI/SelectorBarSamplePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarSummaryPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SelectorBarSummaryPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

SelectorBarSummaryPage Class Reference

List of all members.

Public Member Functions

SelectorBarSummaryPage ()

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Private Member Functions

~SelectorBarSummaryPage ()
void | AppendEventMessage (string eventMessage)
void | BtnAddSelectorBarItem_Click (object sender, RoutedEventArgs e)
void | BtnClearExceptionReport_Click (object sender, RoutedEventArgs e)
void | BtnClearFullLog_Click (object sender, RoutedEventArgs e)
void | BtnClearLogs_Click (object sender, RoutedEventArgs e)
void | BtnCopyEvents_Click (object sender, RoutedEventArgs e)
void | BtnGetBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnGetCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnGetFullLog_Click (object sender, RoutedEventArgs e)
void | BtnGetMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnGetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnGetPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemChild_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemForeground_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemIcon_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemIsEnabled_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemIsSelected_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemMargin_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemPadding_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemsCount_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemText_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarItemVisibility_Click (object sender, RoutedEventArgs e)
void | BtnGetSelectorBarSelectedItem_Click (object sender, RoutedEventArgs e)
void | BtnInsertSelectorBarItem_Click (object sender, RoutedEventArgs e)
void | BtnRemoveAllSelectorBarItems_Click (object sender, RoutedEventArgs e)
void | BtnRemoveSelectorBarItem_Click (object sender, RoutedEventArgs e)
void | BtnReplaceSelectorBarItem_Click (object sender, RoutedEventArgs e)
void | BtnSetBorderThickness_Click (object sender, RoutedEventArgs e)
void | BtnSetCornerRadius_Click (object sender, RoutedEventArgs e)
void | BtnSetMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxHeight_Click (object sender, RoutedEventArgs e)
void | BtnSetMaxWidth_Click (object sender, RoutedEventArgs e)
void | BtnSetPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemChild_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemForeground_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemIcon_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemIsEnabled_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemIsSelected_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemMargin_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemPadding_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemText_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarItemVisibility_Click (object sender, RoutedEventArgs e)
void | BtnSetSelectorBarSelectedItem_Click (object sender, RoutedEventArgs e)
void | ChkIsEnabled_CheckedChanged (object sender, RoutedEventArgs e)
void | ChkIsTabStop_CheckedChanged (object sender, RoutedEventArgs e)
void | ChkLogItemContainerMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemContainerMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsRepeaterMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogItemsViewMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogs_Checked (object sender, RoutedEventArgs e)
void | ChkLogs_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogSelectorBarEvents_Checked (object sender, RoutedEventArgs e)
void | ChkLogSelectorBarEvents_Unchecked (object sender, RoutedEventArgs e)
void | ChkLogSelectorBarMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogSelectorBarMessages_Unchecked (object sender, RoutedEventArgs e)
void | ChkSelectorBarItems_Checked (object sender, RoutedEventArgs e)
void | ChkSelectorBarItems_Unchecked (object sender, RoutedEventArgs e)
void | ChkSelectorBarProperties_Checked (object sender, RoutedEventArgs e)
void | ChkSelectorBarProperties_Unchecked (object sender, RoutedEventArgs e)
void | ClearFullLog ()
void | CmbBackground_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbBorderBrush_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbTabNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | CmbXYFocusKeyboardNavigation_SelectionChanged (object sender, SelectionChangedEventArgs e)
CornerRadius | GetCornerRadiusFromString (string cornerRadius)
Brush | GetForeground ()
void | GetFullLog ()
IconElement | GetIconElementFromString (string icon)
int | GetIntFromSymbol (Symbol symbol)
SelectorBarItem GetSelectorBarItem ()
string | GetStringFromChild (SelectorBarItem selectorBarItem)
string | GetStringFromIconElement (IconElement iconElement)
string | GetStringFromSelectorBarItem (SelectorBarItem selectorBarItem)
Symbol | GetSymbolFromInt (int symbolIndex)
TextBlock | GetTextBlockChild ()
TextBox | GetTextBoxChild ()
Thickness | GetThicknessFromString (string thickness)
void | HookItemsRepeaterEvents (ItemsRepeater itemsRepeater)
void | HookItemsViewEvents (ItemsView itemsView)
void | HookSelectorBarEvents ()
void | ItemsRepeater_ElementClearing (ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
void | ItemsRepeater_ElementPrepared (ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
void | ItemsRepeater_Loaded (object sender, RoutedEventArgs e)
void | ItemsView_GettingFocus (UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
void | ItemsView_GotFocus (object sender, RoutedEventArgs e)
void | ItemsView_ItemInvoked (ItemsView sender, ItemsViewItemInvokedEventArgs args)
void | ItemsView_Loaded (object sender, RoutedEventArgs e)
void | ItemsView_LosingFocus (UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
void | ItemsView_LostFocus (object sender, RoutedEventArgs e)
void | ItemsView_SelectionChanged (ItemsView sender, ItemsViewSelectionChangedEventArgs args)
void | LogItemsRepeaterInfo ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | PopulateCmbSelectorBarSelectedItem ()
void | SelectorBar_Loaded (object sender, RoutedEventArgs e)
void | SelectorBar_SelectionChanged (SelectorBar sender, SelectorBarSelectionChangedEventArgs args)
void | UnhookItemsRepeaterEvents (ItemsRepeater itemsRepeater)
void | UnhookItemsViewEvents (ItemsView itemsView)
void | UnhookSelectorBarEvents ()
void | UpdateBackground ()
void | UpdateBorderBrush ()
void | UpdateBorderThickness ()
void | UpdateCornerRadius ()
void | UpdateIsEnabled ()
void | UpdateIsTabStop ()
void | UpdateItemsCount ()
void | UpdateMargin ()
void | UpdateMaxHeight ()
void | UpdateMaxWidth ()
void | UpdatePadding ()
void | UpdateSelectedItem ()
void | UpdateTabNavigation ()
void | UpdateXYFocusKeyboardNavigation ()

Private Attributes

List< string > | _fullLogs = new List<string>()
SelectorBarItem | _otherSelectorBarItem = new SelectorBarItem()

Detailed Description

Definition at line 19 of file SelectorBarSummaryPage.xaml.cs.

Constructor & Destructor Documentation

SelectorBarSummaryPage ( ) [inline]

Definition at line 24 of file SelectorBarSummaryPage.xaml.cs.

        {
            this.InitializeComponent();

            PopulateCmbSelectorBarSelectedItem();
            UpdateBackground();
            UpdateBorderBrush();
            UpdateBorderThickness();
            UpdateMargin();
            UpdatePadding();
            UpdateMaxWidth();
            UpdateMaxHeight();
            UpdateCornerRadius();
            UpdateTabNavigation();
            UpdateXYFocusKeyboardNavigation();
            UpdateIsEnabled();
            UpdateIsTabStop();
            UpdateSelectedItem();

            if (chkLogItemContainerMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            }
            if (chkLogItemsRepeaterMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            }
            if (chkLogItemsViewMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            }
            if (chkLogSelectorBarMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            }

            if (chkLogSelectorBarMessages.IsChecked == true ||
                chkLogItemsViewMessages.IsChecked == true ||
                chkLogItemsRepeaterMessages.IsChecked == true ||
                chkLogItemContainerMessages.IsChecked == true)
            {
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
            }
        }

~SelectorBarSummaryPage ( ) [inline, private]

Definition at line 69 of file SelectorBarSummaryPage.xaml.cs.

        {
        }

Member Function Documentation

void AppendEventMessage ( string eventMessage ) [inline, private]

Definition at line 1539 of file SelectorBarSummaryPage.xaml.cs.

        {
            while (eventMessage.Length > 0)
            {
                string msgHead = eventMessage;

                if (eventMessage.Length > 110)
                {
                    int commaIndex = eventMessage.IndexOf(',', 110);
                    if (commaIndex != -1)
                    {
                        msgHead = eventMessage.Substring(0, commaIndex);
                        eventMessage = eventMessage.Substring(commaIndex + 1);
                    }
                    else
                    {
                        eventMessage = string.Empty;
                    }
                }
                else
                {
                    eventMessage = string.Empty;
                }

                lstLogs.Items.Add(msgHead);
                _fullLogs.Add(msgHead);

                if ((bool)chkOutputDebugString.IsChecked)
                {
                    System.Diagnostics.Debug.WriteLine(msgHead);
                }
            }
        }

void BtnAddSelectorBarItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1145 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null)
                {
                    selectorBar.Items.Add(GetSelectorBarItem());
                    PopulateCmbSelectorBarSelectedItem();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnClearExceptionReport_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1595 of file SelectorBarSummaryPage.xaml.cs.

        {
            txtExceptionReport.Text = string.Empty;
        }

void BtnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1273 of file SelectorBarSummaryPage.xaml.cs.

        {
            ClearFullLog();
        }

void BtnClearLogs_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1278 of file SelectorBarSummaryPage.xaml.cs.

        {
            lstLogs.Items.Clear();
        }

void BtnCopyEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1283 of file SelectorBarSummaryPage.xaml.cs.

        {
            string logs = string.Empty;

            foreach (object log in lstLogs.Items)
            {
                logs += log.ToString() + "\n";
            }

            var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
            dataPackage.SetText(logs);
            Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
        }

void BtnGetBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 470 of file SelectorBarSummaryPage.xaml.cs.

        {
            UpdateBorderThickness();
        }

void BtnGetCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 475 of file SelectorBarSummaryPage.xaml.cs.

        {
            UpdateCornerRadius();
        }

void BtnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1268 of file SelectorBarSummaryPage.xaml.cs.

        {
            GetFullLog();
        }

void BtnGetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 480 of file SelectorBarSummaryPage.xaml.cs.

        {
            UpdateMargin();
        }

void BtnGetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 485 of file SelectorBarSummaryPage.xaml.cs.

        {
            UpdateMaxHeight();
        }

void BtnGetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 490 of file SelectorBarSummaryPage.xaml.cs.

        {
            UpdateMaxWidth();
        }

void BtnGetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 495 of file SelectorBarSummaryPage.xaml.cs.

        {
            UpdatePadding();
        }

void BtnGetSelectorBarItemChild_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1084 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemChild != null)
                {
                    cmbSelectorBarItemChild.SelectedIndex = -1;

                    SelectorBarItem selectorBarItem = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)];

                    if (selectorBarItem.Child == null)
                    {
                        cmbSelectorBarItemChild.SelectedIndex = 0;
                    }
                    else if (selectorBarItem.Child is TextBlock)
                    {
                        cmbSelectorBarItemChild.SelectedIndex = 1;
                    }
                    else if (selectorBarItem.Child is TextBox)
                    {
                        cmbSelectorBarItemChild.SelectedIndex = 2;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemForeground_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 875 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemForeground != null)
                {
                    SolidColorBrush fg = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Foreground as SolidColorBrush;

                    if (fg == null)
                    {
                        cmbSelectorBarItemForeground.SelectedIndex = 0;
                    }
                    else if (fg.Color == Colors.Black)
                    {
                        cmbSelectorBarItemForeground.SelectedIndex = 1;
                    }
                    else if (fg.Color == Colors.Red)
                    {
                        cmbSelectorBarItemForeground.SelectedIndex = 2;
                    }
                    else if (fg.Color == Colors.Green)
                    {
                        cmbSelectorBarItemForeground.SelectedIndex = 3;
                    }
                    else
                    {
                        cmbSelectorBarItemForeground.SelectedIndex = -1;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemIcon_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1025 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIcon != null)
                {
                    cmbSelectorBarItemIcon.SelectedIndex = -1;

                    SymbolIcon symbolIcon = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Icon as SymbolIcon;

                    if (symbolIcon == null)
                    {
                        cmbSelectorBarItemIcon.SelectedIndex = 0;
                        return;
                    }

                    cmbSelectorBarItemIcon.SelectedIndex = GetIntFromSymbol(symbolIcon.Symbol);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemIsEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 772 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsEnabled != null)
                {
                    cmbSelectorBarItemIsEnabled.SelectedIndex = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsEnabled ? 1 : 0;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemIsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 804 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsSelected != null)
                {
                    cmbSelectorBarItemIsSelected.SelectedIndex = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsSelected ? 1 : 0;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 928 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemMargin != null)
                {
                    txtSelectorBarItemMargin.Text = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Margin.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 960 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemPadding != null)
                {
                    txtSelectorBarItemPadding.Text = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Padding.ToString();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemsCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 749 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemsCount != null)
                {
                    if (selectorBar.Items == null)
                    {
                        txtSelectorBarItemsCount.Text = "null";
                    }
                    else
                    {
                        txtSelectorBarItemsCount.Text = selectorBar.Items.Count.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemText_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 992 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemText != null)
                {
                    txtSelectorBarItemText.Text = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Text;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarItemVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 836 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (cmbSelectorBarItemVisibility != null)
                {
                    if (selectorBar == null || txtSelectorBarItemIndex == null)
                    {
                        cmbSelectorBarItemVisibility.SelectedIndex = -1;
                    }
                    else
                    {
                        cmbSelectorBarItemVisibility.SelectedIndex = (int)selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Visibility;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnGetSelectorBarSelectedItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 500 of file SelectorBarSummaryPage.xaml.cs.

        {
            UpdateSelectedItem();
        }

void BtnInsertSelectorBarItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1196 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null)
                {
                    selectorBar.Items.Insert(int.Parse(txtSelectorBarItemIndex.Text), GetSelectorBarItem());
                    PopulateCmbSelectorBarSelectedItem();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnRemoveAllSelectorBarItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1162 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null)
                {
                    selectorBar.Items.Clear();
                    PopulateCmbSelectorBarSelectedItem();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnRemoveSelectorBarItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1213 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null)
                {
                    selectorBar.Items.RemoveAt(int.Parse(txtSelectorBarItemIndex.Text));
                    PopulateCmbSelectorBarSelectedItem();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnReplaceSelectorBarItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1179 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)] = GetSelectorBarItem();
                    PopulateCmbSelectorBarSelectedItem();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetBorderThickness_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 637 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null)
                {
                    selectorBar.BorderThickness = GetThicknessFromString(txtBorderThickness.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetCornerRadius_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 541 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtCornerRadius != null)
                {
                    selectorBar.CornerRadius = GetCornerRadiusFromString(txtCornerRadius.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 557 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtMargin != null)
                {
                    selectorBar.Margin = GetThicknessFromString(txtMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetMaxHeight_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 573 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtMaxHeight != null)
                {
                    selectorBar.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetMaxWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 589 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtMaxWidth != null)
                {
                    selectorBar.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 605 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtPadding != null)
                {
                    selectorBar.Padding = GetThicknessFromString(txtPadding.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemChild_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1115 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemChild != null)
                {
                    SelectorBarItem selectorBarItem = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)];

                    switch (cmbSelectorBarItemChild.SelectedIndex)
                    {
                        case -1:
                        case 0:
                            selectorBarItem.Child = null;
                            break;
                        case 1:
                            selectorBarItem.Child = GetTextBlockChild();
                            break;
                        case 2:
                            selectorBarItem.Child = GetTextBoxChild();
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemForeground_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 912 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemForeground != null)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Foreground = GetForeground();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemIcon_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1051 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIcon != null)
                {
                    SelectorBarItem selectorBarItem = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)];

                    if (cmbSelectorBarItemIcon.SelectedIndex < 1)
                    {
                        selectorBarItem.Icon = null;
                        return;
                    }

                    SymbolIcon symbolIcon = selectorBarItem.Icon as SymbolIcon;

                    if (symbolIcon == null)
                    {
                        symbolIcon = new SymbolIcon();
                    }

                    symbolIcon.Symbol = GetSymbolFromInt(cmbSelectorBarItemIcon.SelectedIndex);
                    selectorBarItem.Icon = symbolIcon;
                    PopulateCmbSelectorBarSelectedItem();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemIsEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 788 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsEnabled != null)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsEnabled = cmbSelectorBarItemIsEnabled.SelectedIndex == 1;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemIsSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 820 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsSelected != null)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsSelected = cmbSelectorBarItemIsSelected.SelectedIndex == 1;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemMargin_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 944 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemMargin != null)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Margin = GetThicknessFromString(txtSelectorBarItemMargin.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemPadding_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 976 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemPadding != null)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Padding = GetThicknessFromString(txtSelectorBarItemPadding.Text);
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemText_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1008 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemText != null)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Text = txtSelectorBarItemText.Text;
                    PopulateCmbSelectorBarSelectedItem();
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarItemVisibility_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 859 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemVisibility != null && cmbSelectorBarItemVisibility.SelectedIndex != -1)
                {
                    selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Visibility = (Visibility)cmbSelectorBarItemVisibility.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void BtnSetSelectorBarSelectedItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 621 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && cmbSelectorBarSelectedItem != null)
                {
                    selectorBar.SelectedItem = (cmbSelectorBarSelectedItem.SelectedItem as ComboBoxItem).Tag as SelectorBarItem;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkIsEnabled_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 509 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && chkIsEnabled != null)
                {
                    selectorBar.IsEnabled = (bool)chkIsEnabled.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkIsTabStop_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 525 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && chkIsTabStop != null)
                {
                    selectorBar.IsTabStop = (bool)chkIsTabStop.IsChecked;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void ChkLogItemContainerMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1369 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogSelectorBarMessages != null && chkLogSelectorBarMessages.IsChecked == false &&
                chkLogItemsViewMessages != null && chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages != null && chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemContainerMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1378 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogSelectorBarMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1297 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null)
            {
                ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);

                if (itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                    if (itemsRepeater != null)
                    {
                        HookItemsRepeaterEvents(itemsRepeater);
                    }
                }
            }
        }

void ChkLogItemsRepeaterEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1315 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null)
            {
                ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);

                if (itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                    if (itemsRepeater != null)
                    {
                        UnhookItemsRepeaterEvents(itemsRepeater);
                    }
                }
            }
        }

void ChkLogItemsRepeaterMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1387 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogSelectorBarMessages != null && chkLogSelectorBarMessages.IsChecked == false &&
                chkLogItemsViewMessages != null && chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemContainerMessages != null && chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsRepeaterMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1396 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogSelectorBarMessages.IsChecked == false &&
                chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1333 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null)
            {
                ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);

                if (itemsView != null)
                {
                    HookItemsViewEvents(itemsView);
                }
            }
        }

void ChkLogItemsViewEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1346 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null)
            {
                ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);

                if (itemsView != null)
                {
                    UnhookItemsViewEvents(itemsView);
                }
            }
        }

void ChkLogItemsViewMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1405 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogSelectorBarMessages != null && chkLogSelectorBarMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages != null && chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemContainerMessages != null && chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogItemsViewMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1414 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogSelectorBarMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogs_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1256 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Visible;
        }

void ChkLogs_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1262 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (grdLogs != null)
                grdLogs.Visibility = Visibility.Collapsed;
        }

void ChkLogSelectorBarEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1359 of file SelectorBarSummaryPage.xaml.cs.

        {
            HookSelectorBarEvents();
        }

void ChkLogSelectorBarEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1364 of file SelectorBarSummaryPage.xaml.cs.

        {
            UnhookSelectorBarEvents();
        }

void ChkLogSelectorBarMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1423 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
            if (chkLogItemsViewMessages != null && chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages != null && chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemContainerMessages != null && chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogSelectorBarMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1432 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            if (chkLogItemsViewMessages.IsChecked == false &&
                chkLogItemsRepeaterMessages.IsChecked == false &&
                chkLogItemContainerMessages.IsChecked == false)
                MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void ChkSelectorBarItems_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1244 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (svSelectorBarItems != null)
                svSelectorBarItems.Visibility = Visibility.Visible;
        }

void ChkSelectorBarItems_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1250 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (svSelectorBarItems != null)
                svSelectorBarItems.Visibility = Visibility.Collapsed;
        }

void ChkSelectorBarProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1232 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (svSelectorBarProperties != null)
                svSelectorBarProperties.Visibility = Visibility.Visible;
        }

void ChkSelectorBarProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1238 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (svSelectorBarProperties != null)
                svSelectorBarProperties.Visibility = Visibility.Collapsed;
        }

void ClearFullLog ( ) [inline, private]

Definition at line 1585 of file SelectorBarSummaryPage.xaml.cs.

        {
            this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
            chkLogUpdated.IsChecked = false;
            _fullLogs.Clear();
            this.cmbFullLog.Items.Clear();
            chkLogCleared.IsChecked = true;
            this.txtStatus.Text = "ClearFullLog. Done.";
        }

void CmbBackground_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 653 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null)
                {
                    switch (cmbBackground.SelectedIndex)
                    {
                        case 0:
                            selectorBar.Background = null;
                            break;
                        case 1:
                            selectorBar.Background = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            selectorBar.Background = new SolidColorBrush(Colors.AliceBlue);
                            break;
                        case 3:
                            selectorBar.Background = new SolidColorBrush(Colors.Aqua);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbBorderBrush_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 683 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null)
                {
                    switch (cmbBorderBrush.SelectedIndex)
                    {
                        case 0:
                            selectorBar.BorderBrush = null;
                            break;
                        case 1:
                            selectorBar.BorderBrush = new SolidColorBrush(Colors.Transparent);
                            break;
                        case 2:
                            selectorBar.BorderBrush = new SolidColorBrush(Colors.Blue);
                            break;
                        case 3:
                            selectorBar.BorderBrush = new SolidColorBrush(Colors.Green);
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbTabNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 713 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && cmbTabNavigation != null && selectorBar.TabNavigation != (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex)
                {
                    selectorBar.TabNavigation = (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void CmbXYFocusKeyboardNavigation_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 729 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && cmbXYFocusKeyboardNavigation != null && selectorBar.XYFocusKeyboardNavigation != (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex)
                {
                    selectorBar.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

CornerRadius GetCornerRadiusFromString ( string cornerRadius ) [inline, private]

Definition at line 1611 of file SelectorBarSummaryPage.xaml.cs.

        {
            string[] lengths = cornerRadius.Split(',');
            if (lengths.Length < 4)
                return new CornerRadius(
                    Convert.ToDouble(lengths[0]));
            else
                return new CornerRadius(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

Brush GetForeground ( ) [inline, private]

Definition at line 1761 of file SelectorBarSummaryPage.xaml.cs.

        {
            switch (cmbSelectorBarItemForeground.SelectedIndex)
            {
                case -1:
                case 0:
                    return null;
                case 1:
                    return new SolidColorBrush(Colors.Black);
                case 2:
                    return new SolidColorBrush(Colors.Red);
                default:
                    return new SolidColorBrush(Colors.Green);
            }
        }

void GetFullLog ( ) [inline, private]

Definition at line 1573 of file SelectorBarSummaryPage.xaml.cs.

        {
            this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
            chkLogCleared.IsChecked = false;
            foreach (string log in _fullLogs)
            {
                this.cmbFullLog.Items.Add(log);
            }
            chkLogUpdated.IsChecked = true;
            this.txtStatus.Text = "GetFullLog. Done.";
        }

IconElement GetIconElementFromString ( string icon ) [inline, private]

Definition at line 1622 of file SelectorBarSummaryPage.xaml.cs.

        {
            switch (icon)
            {
                case "Cut":
                    return new SymbolIcon(Symbol.Cut);
                case "Copy":
                    return new SymbolIcon(Symbol.Copy);
                case "Paste":
                    return new SymbolIcon(Symbol.Paste);
                case "Bold":
                    return new SymbolIcon(Symbol.Bold);
                case "Italic":
                    return new SymbolIcon(Symbol.Italic);
                case "Underline":
                    return new SymbolIcon(Symbol.Underline);
            }

            return null;
        }

int GetIntFromSymbol ( Symbol symbol ) [inline, private]

Definition at line 1696 of file SelectorBarSummaryPage.xaml.cs.

        {
            switch (symbol)
            {
                case Symbol.Cut:
                    return 1;
                case Symbol.Copy:
                    return 2;
                case Symbol.Paste:
                    return 3;
                case Symbol.Bold:
                    return 4;
                case Symbol.Italic:
                    return 5;
                case Symbol.Underline:
                    return 6;
                default:
                    return -1;
            }
        }

SelectorBarItem GetSelectorBarItem ( ) [inline, private]

Definition at line 1717 of file SelectorBarSummaryPage.xaml.cs.

        {
            SelectorBarItem selectorBarItem = new SelectorBarItem();

            if (txtSelectorBarItemText != null)
            {
                selectorBarItem.Text = txtSelectorBarItemText.Text;
            }

            if (cmbSelectorBarItemIcon != null && cmbSelectorBarItemIcon.SelectedIndex > 0)
            {
                selectorBarItem.Icon = new SymbolIcon(GetSymbolFromInt(cmbSelectorBarItemIcon.SelectedIndex));
            }

            if (cmbSelectorBarItemChild != null && cmbSelectorBarItemChild.SelectedIndex > 0)
            {
                selectorBarItem.Child = cmbSelectorBarItemChild.SelectedIndex == 1 ? GetTextBlockChild() : GetTextBoxChild();
            }

            return selectorBarItem;
        }

string GetStringFromChild ( SelectorBarItem selectorBarItem ) [inline, private]

Definition at line 1655 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBarItem == null || selectorBarItem.Child == null)
            {
                return "null";
            }

            if (selectorBarItem.Child is TextBlock)
            {
                return (selectorBarItem.Child as TextBlock).Text;
            }
            else
            {
                return (selectorBarItem.Child as TextBox).Text;
            }
        }

string GetStringFromIconElement ( IconElement iconElement ) [inline, private]

Definition at line 1643 of file SelectorBarSummaryPage.xaml.cs.

        {
            SymbolIcon symbolIcon = iconElement as SymbolIcon;

            if (symbolIcon == null)
            {
                return "null";
            }

            return symbolIcon.Symbol.ToString();
        }

string GetStringFromSelectorBarItem ( SelectorBarItem selectorBarItem ) [inline, private]

Definition at line 1672 of file SelectorBarSummaryPage.xaml.cs.

        {
            return "Icon:" + GetStringFromIconElement(selectorBarItem.Icon) + ", Text:" + selectorBarItem.Text + ", Child:" + GetStringFromChild(selectorBarItem);
        }

Symbol GetSymbolFromInt ( int symbolIndex ) [inline, private]

Definition at line 1677 of file SelectorBarSummaryPage.xaml.cs.

        {
            switch (symbolIndex)
            {
                case 1:
                    return Symbol.Cut;
                case 2:
                    return Symbol.Copy;
                case 3:
                    return Symbol.Paste;
                case 4:
                    return Symbol.Bold;
                case 5:
                    return Symbol.Italic;
                default:
                    return Symbol.Underline;
            }
        }

TextBlock GetTextBlockChild ( ) [inline, private]

Definition at line 1739 of file SelectorBarSummaryPage.xaml.cs.

        {
            TextBlock textBlock = new TextBlock()
            {
                Text = "TextBlock",
                VerticalAlignment = VerticalAlignment.Center
            };

            return textBlock;
        }

TextBox GetTextBoxChild ( ) [inline, private]

Definition at line 1750 of file SelectorBarSummaryPage.xaml.cs.

        {
            TextBox textBox = new TextBox()
            {
                Text = "TextBox",
                VerticalAlignment = VerticalAlignment.Center
            };

            return textBox;
        }

Thickness GetThicknessFromString ( string thickness ) [inline, private]

Definition at line 1600 of file SelectorBarSummaryPage.xaml.cs.

        {
            string[] lengths = thickness.Split(',');
            if (lengths.Length < 4)
                return new Thickness(
                    Convert.ToDouble(lengths[0]));
            else
                return new Thickness(
                    Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
        }

void HookItemsRepeaterEvents ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 1441 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.Loaded += ItemsRepeater_Loaded;
                itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
                itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
            }
        }

void HookItemsViewEvents ( ItemsView itemsView ) [inline, private]

Definition at line 1461 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.ItemInvoked += ItemsView_ItemInvoked;
                itemsView.GettingFocus += ItemsView_GettingFocus;
                itemsView.GotFocus += ItemsView_GotFocus;
                itemsView.LosingFocus += ItemsView_LosingFocus;
                itemsView.LostFocus += ItemsView_LostFocus;
                itemsView.Loaded += ItemsView_Loaded;
                itemsView.SelectionChanged += ItemsView_SelectionChanged;
            }
        }

void HookSelectorBarEvents ( ) [inline, private]

Definition at line 1489 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null)
            {
                selectorBar.Loaded += SelectorBar_Loaded;
                selectorBar.SelectionChanged += SelectorBar_SelectionChanged;
            }
        }

void ItemsRepeater_ElementClearing | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementClearingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 201 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                AppendEventMessage($"ItemsRepeater.ElementClearing Element={args.Element}");
            }
        }

void ItemsRepeater_ElementPrepared | ( | ItemsRepeater | sender,
 |  | ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 193 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                AppendEventMessage($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}");
            }
        }

void ItemsRepeater_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 184 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                AppendEventMessage($"ItemsRepeater.Loaded");
                LogItemsRepeaterInfo();
            }
        }

void ItemsView_GettingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.GettingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 154 of file SelectorBarSummaryPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 179 of file SelectorBarSummaryPage.xaml.cs.

        {
            AppendEventMessage("ItemsView.GotFocus");
        }

void ItemsView_ItemInvoked | ( | ItemsView | sender,
 |  | ItemsViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 116 of file SelectorBarSummaryPage.xaml.cs.

        {
            AppendEventMessage($"ItemsView.ItemInvoked InvokedItem={args.InvokedItem.ToString().Substring(0, 50)}");
        }

void ItemsView_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 121 of file SelectorBarSummaryPage.xaml.cs.

        {
            AppendEventMessage($"ItemsView.Loaded");
            if (chkLogItemsRepeaterEvents.IsChecked == true)
            {
                LogItemsRepeaterInfo();
            }

            ItemsView itemsView = sender as ItemsView;

            if (itemsView != null)
            {
                ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                if (itemsRepeater != null)
                {
                    HookItemsRepeaterEvents(itemsRepeater);
                }
            }
        }

void ItemsView_LosingFocus | ( | UIElement | sender,
 |  | Microsoft.UI.Xaml.Input.LosingFocusEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 169 of file SelectorBarSummaryPage.xaml.cs.

        {
            FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
            string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
            FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
            string newFEName = (newFE == null) ? "null" : newFE.Name;

            AppendEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
        }

void ItemsView_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 164 of file SelectorBarSummaryPage.xaml.cs.

        {
            AppendEventMessage("ItemsView.LostFocus");
        }

void ItemsView_SelectionChanged | ( | ItemsView | sender,
 |  | ItemsViewSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 142 of file SelectorBarSummaryPage.xaml.cs.

        {
            string selectedItems = String.Empty;

            foreach (var selectedItem in sender.SelectedItems)
            {
                selectedItems += (selectedItem == null) ? "<null>, " : selectedItem.ToString().Substring(0, 9) + ", ";
            }

            AppendEventMessage($"ItemsView.SelectionChanged SelectedItems={selectedItems}");
        }

void LogItemsRepeaterInfo ( ) [inline, private]

Definition at line 209 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null)
            {
                ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);

                if (itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                    if (itemsRepeater != null)
                    {
                        AppendEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}, ChildrenCount={VisualTreeHelper.GetChildrenCount(itemsRepeater)}");
                    }
                }
            }
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1507 of file SelectorBarSummaryPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string eventMessage;
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
            }

            if (args.IsVerboseLevel)
            {
                eventMessage = "Verbose: " + senderName + "m:" + msg;
            }
            else
            {
                eventMessage = "Info: " + senderName + "m:" + msg;
            }

            AppendEventMessage(eventMessage);
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 73 of file SelectorBarSummaryPage.xaml.cs.

        {
            MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
            MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;

            if (selectorBar != null)
            {
                ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);

                if (itemsView != null)
                {
                    ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);

                    if (itemsRepeater != null)
                    {
                        UnhookItemsRepeaterEvents(itemsRepeater);
                    }

                    UnhookItemsViewEvents(itemsView);
                }

                UnhookSelectorBarEvents();
            }

            base.OnNavigatedFrom(e);
        }

void PopulateCmbSelectorBarSelectedItem ( ) [inline, private]

Definition at line 404 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && cmbSelectorBarSelectedItem != null)
            {
                cmbSelectorBarSelectedItem.Items.Clear();

                cmbSelectorBarSelectedItem.Items.Add(new ComboBoxItem()
                {
                    Content = "null"
                });

                if (selectorBar.Items != null)
                {
                    foreach (SelectorBarItem selectorBarItem in selectorBar.Items)
                    {
                        cmbSelectorBarSelectedItem.Items.Add(new ComboBoxItem()
                        {
                            Content = GetStringFromSelectorBarItem(selectorBarItem),
                            Tag = selectorBarItem
                        });
                    }
                }

                cmbSelectorBarSelectedItem.Items.Add(new ComboBoxItem()
                {
                    Content = "Other",
                    Tag = _otherSelectorBarItem
                });
            }
        }

void SelectorBar_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 104 of file SelectorBarSummaryPage.xaml.cs.

        {
            AppendEventMessage($"SelectorBar.Loaded");
        }

void SelectorBar_SelectionChanged | ( | SelectorBar | sender,
 |  | SelectorBarSelectionChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 109 of file SelectorBarSummaryPage.xaml.cs.

        {
            string selectedItem = (sender.SelectedItem == null) ? "<null>" : GetStringFromSelectorBarItem(sender.SelectedItem);

            AppendEventMessage($"SelectorBar.SelectionChanged SelectedItem={selectedItem}");
        }

void UnhookItemsRepeaterEvents ( ItemsRepeater itemsRepeater ) [inline, private]

Definition at line 1451 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (itemsRepeater != null)
            {
                itemsRepeater.Loaded -= ItemsRepeater_Loaded;
                itemsRepeater.ElementPrepared -= ItemsRepeater_ElementPrepared;
                itemsRepeater.ElementClearing -= ItemsRepeater_ElementClearing;
            }
        }

void UnhookItemsViewEvents ( ItemsView itemsView ) [inline, private]

Definition at line 1475 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (itemsView != null)
            {
                itemsView.ItemInvoked -= ItemsView_ItemInvoked;
                itemsView.GettingFocus -= ItemsView_GettingFocus;
                itemsView.GotFocus -= ItemsView_GotFocus;
                itemsView.LosingFocus -= ItemsView_LosingFocus;
                itemsView.LostFocus -= ItemsView_LostFocus;
                itemsView.Loaded -= ItemsView_Loaded;
                itemsView.SelectionChanged -= ItemsView_SelectionChanged;
            }
        }

void UnhookSelectorBarEvents ( ) [inline, private]

Definition at line 1498 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null)
            {
                selectorBar.Loaded -= SelectorBar_Loaded;
                selectorBar.SelectionChanged -= SelectorBar_SelectionChanged;
            }
        }

void UpdateBackground ( ) [inline, private]

Definition at line 261 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && cmbBackground != null)
            {
                SolidColorBrush bg = selectorBar.Background as SolidColorBrush;

                if (bg == null)
                {
                    cmbBackground.SelectedIndex = 0;
                }
                else if (bg.Color == Colors.Transparent)
                {
                    cmbBackground.SelectedIndex = 1;
                }
                else if (bg.Color == Colors.AliceBlue)
                {
                    cmbBackground.SelectedIndex = 2;
                }
                else if (bg.Color == Colors.Aqua)
                {
                    cmbBackground.SelectedIndex = 3;
                }
                else
                {
                    cmbBackground.SelectedIndex = -1;
                }
            }
        }

void UpdateBorderBrush ( ) [inline, private]

Definition at line 290 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && cmbBorderBrush != null)
            {
                SolidColorBrush bb = selectorBar.BorderBrush as SolidColorBrush;

                if (bb == null)
                {
                    cmbBorderBrush.SelectedIndex = 0;
                }
                else if (bb.Color == Colors.Transparent)
                {
                    cmbBorderBrush.SelectedIndex = 1;
                }
                else if (bb.Color == Colors.Blue)
                {
                    cmbBorderBrush.SelectedIndex = 2;
                }
                else if (bb.Color == Colors.Green)
                {
                    cmbBorderBrush.SelectedIndex = 3;
                }
                else
                {
                    cmbBorderBrush.SelectedIndex = -1;
                }
            }
        }

void UpdateBorderThickness ( ) [inline, private]

Definition at line 319 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && txtBorderThickness != null)
            {
                txtBorderThickness.Text = selectorBar.BorderThickness.ToString();
            }
        }

void UpdateCornerRadius ( ) [inline, private]

Definition at line 327 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && txtCornerRadius != null)
            {
                txtCornerRadius.Text = selectorBar.CornerRadius.ToString();
            }
        }

void UpdateIsEnabled ( ) [inline, private]

Definition at line 372 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && chkIsEnabled != null)
                {
                    chkIsEnabled.IsChecked = selectorBar.IsEnabled;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateIsTabStop ( ) [inline, private]

Definition at line 388 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && chkIsTabStop != null)
                {
                    chkIsTabStop.IsChecked = selectorBar.IsTabStop;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateItemsCount ( ) [inline, private]

Definition at line 367 of file SelectorBarSummaryPage.xaml.cs.

        {
            // TODO
        }

void UpdateMargin ( ) [inline, private]

Definition at line 229 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && txtMargin != null)
            {
                txtMargin.Text = selectorBar.Margin.ToString();
            }
        }

void UpdateMaxHeight ( ) [inline, private]

Definition at line 237 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && txtMaxHeight != null)
            {
                txtMaxHeight.Text = selectorBar.MaxHeight.ToString();
            }
        }

void UpdateMaxWidth ( ) [inline, private]

Definition at line 245 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && txtMaxWidth != null)
            {
                txtMaxWidth.Text = selectorBar.MaxWidth.ToString();
            }
        }

void UpdatePadding ( ) [inline, private]

Definition at line 253 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && txtPadding != null)
            {
                txtPadding.Text = selectorBar.Padding.ToString();
            }
        }

void UpdateSelectedItem ( ) [inline, private]

Definition at line 435 of file SelectorBarSummaryPage.xaml.cs.

        {
            if (selectorBar != null && cmbSelectorBarSelectedItem != null)
            {
                if (selectorBar.SelectedItem == null)
                {
                    cmbSelectorBarSelectedItem.SelectedIndex = 0;
                }
                else
                {
                    int selectedIndex = 1;

                    if (selectorBar.Items != null)
                    {
                        foreach (SelectorBarItem selectorBarItem in selectorBar.Items)
                        {
                            if (selectorBarItem == selectorBar.SelectedItem)
                            {
                                cmbSelectorBarSelectedItem.SelectedIndex = selectedIndex;
                                break;
                            }

                            selectedIndex++;
                        }
                    }

                    cmbSelectorBarSelectedItem.SelectedIndex = selectedIndex;
                }
            }
        }

void UpdateTabNavigation ( ) [inline, private]

Definition at line 335 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && cmbTabNavigation != null)
                {
                    cmbTabNavigation.SelectedIndex = (int)selectorBar.TabNavigation;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

void UpdateXYFocusKeyboardNavigation ( ) [inline, private]

Definition at line 351 of file SelectorBarSummaryPage.xaml.cs.

        {
            try
            {
                if (selectorBar != null && cmbXYFocusKeyboardNavigation != null)
                {
                    cmbXYFocusKeyboardNavigation.SelectedIndex = (int)selectorBar.XYFocusKeyboardNavigation;
                }
            }
            catch (Exception ex)
            {
                txtExceptionReport.Text = ex.ToString();
                AppendEventMessage(ex.ToString());
            }
        }

Member Data Documentation

List<string> _fullLogs = new List<string>() [private]

Definition at line 21 of file SelectorBarSummaryPage.xaml.cs.

SelectorBarItem _otherSelectorBarItem = new SelectorBarItem() [private]

Definition at line 22 of file SelectorBarSummaryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • SelectorBar/TestUI/SelectorBarSummaryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SimpleRectanglePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SimpleRectanglePage
Public Member Functions | Properties | Private Member Functions

SimpleRectanglePage Class Reference

List of all members.

Public Member Functions

SimpleRectanglePage ()

Properties

CompositionPropertySet | AnimatedValuesSpy [get, set]
bool | HasDirectManipulation [get, set]
ExpressionAnimation | HorizontalOffsetAnimation1 [get, set]
ExpressionAnimation | HorizontalOffsetAnimation2 [get, set]
bool | IsRenderingHooked [get, set]
uint | UIThreadTicksForValuesSpy [get, set]
ExpressionAnimation | VerticalOffsetAnimation1 [get, set]
ExpressionAnimation | VerticalOffsetAnimation2 [get, set]

Private Member Functions

void | CheckSpyingTicksRequirement ()
void | CompositionTarget_Rendering (object sender, object e)
void | ScrollPresenter_ViewChanged (ScrollPresenter sender, object args)
void | ScrollViewer_DirectManipulationCompleted (object sender, object e)
void | ScrollViewer_DirectManipulationStarted (object sender, object e)
void | ScrollViewer_ViewChanged (object sender, ScrollViewerViewChangedEventArgs e)
void | SetupAnimatedValuesSpy ()
void | SetupScrollPresenter ()
void | SpyAnimatedValues ()
void | StartAnimatedValuesSpy ()
void | StopAnimatedValuesSpy ()
void | TickForValuesSpy ()

Detailed Description

Definition at line 17 of file SimpleRectanglePage.xaml.cs.

Constructor & Destructor Documentation

SimpleRectanglePage ( ) [inline]

Definition at line 19 of file SimpleRectanglePage.xaml.cs.

        {
            this.InitializeComponent();
            this.AnimatedValuesSpy = null;
            this.HorizontalOffsetAnimation1 = null;
            this.HorizontalOffsetAnimation2 = null;
            this.HasDirectManipulation = false;
            this.UIThreadTicksForValuesSpy = 0;
            this.IsRenderingHooked = false;

            this.sv.ViewChanged += ScrollViewer_ViewChanged;
            this.sv.DirectManipulationStarted += ScrollViewer_DirectManipulationStarted;
            this.sv.DirectManipulationCompleted += ScrollViewer_DirectManipulationCompleted;

            this.VerticalOffsetAnimation1 = null;
            this.VerticalOffsetAnimation2 = null;
            SetupScrollPresenter();

            SetupAnimatedValuesSpy();
            TickForValuesSpy();
        }

Member Function Documentation

void CheckSpyingTicksRequirement ( ) [inline, private]

Definition at line 188 of file SimpleRectanglePage.xaml.cs.

        {
            if (this.sv != null &&
                this.AnimatedValuesSpy != null &&
                (this.HasDirectManipulation || this.UIThreadTicksForValuesSpy > 0) &&
                (this.sv.HorizontalOffset == 0 || this.sv.HorizontalOffset == this.sv.ScrollableWidth))
            {
                if (!this.IsRenderingHooked)
                {
                    this.IsRenderingHooked = true;
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering += CompositionTarget_Rendering;
                }
            }
            else
            {
                if (this.IsRenderingHooked)
                {
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering -= CompositionTarget_Rendering;
                    this.IsRenderingHooked = false;
                }
            }
        }

void CompositionTarget_Rendering | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 211 of file SimpleRectanglePage.xaml.cs.

        {
            if (this.UIThreadTicksForValuesSpy > 0)
            {
                this.UIThreadTicksForValuesSpy--;
            }
            CheckSpyingTicksRequirement();
            SpyAnimatedValues();
        }

void ScrollPresenter_ViewChanged | ( | ScrollPresenter | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 337 of file SimpleRectanglePage.xaml.cs.

        {
            SpyAnimatedValues();
        }

void ScrollViewer_DirectManipulationCompleted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 284 of file SimpleRectanglePage.xaml.cs.

        {
            TickForValuesSpy();
            this.HasDirectManipulation = false;
        }

void ScrollViewer_DirectManipulationStarted | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 290 of file SimpleRectanglePage.xaml.cs.

        {
            this.HasDirectManipulation = true;
            CheckSpyingTicksRequirement();
        }

void ScrollViewer_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 296 of file SimpleRectanglePage.xaml.cs.

        {
            CheckSpyingTicksRequirement();
            SpyAnimatedValues();
        }

void SetupAnimatedValuesSpy ( ) [inline, private]

Definition at line 89 of file SimpleRectanglePage.xaml.cs.

        {
            string visualHorizontalTargetedPropertyName = "visual.Translation.X";

            if (this.parallaxView1 != null && this.parallaxView1.Child is UIElement)
            {
                UIElement ppChild = this.parallaxView1.Child as UIElement;
                Visual visualPPChild = ElementCompositionPreview.GetElementVisual(ppChild);
                Compositor compositor = visualPPChild.Compositor;

                if (this.AnimatedValuesSpy == null)
                {
                    this.AnimatedValuesSpy = compositor.CreatePropertySet();
                }

                this.AnimatedValuesSpy.InsertScalar("HorizontalOffset1", 0.0f);

                this.HorizontalOffsetAnimation1 = compositor.CreateExpressionAnimation(visualHorizontalTargetedPropertyName);
                this.HorizontalOffsetAnimation1.SetReferenceParameter("visual", visualPPChild);
            }

            if (this.parallaxView2 != null && this.parallaxView2.Child is UIElement)
            {
                UIElement ppChild = this.parallaxView2.Child as UIElement;
                Visual visualPPChild = ElementCompositionPreview.GetElementVisual(ppChild);
                Compositor compositor = visualPPChild.Compositor;

                if (this.AnimatedValuesSpy == null)
                {
                    this.AnimatedValuesSpy = compositor.CreatePropertySet();
                }

                this.AnimatedValuesSpy.InsertScalar("HorizontalOffset2", 0.0f);

                this.HorizontalOffsetAnimation2 = compositor.CreateExpressionAnimation(visualHorizontalTargetedPropertyName);
                this.HorizontalOffsetAnimation2.SetReferenceParameter("visual", visualPPChild);
            }

            string visualVerticalTargetedPropertyName = "visual.Translation.Y";

            if (this.parallaxView3 != null && this.parallaxView3.Child is UIElement)
            {
                UIElement ppChild = this.parallaxView3.Child as UIElement;
                Visual visualPPChild = ElementCompositionPreview.GetElementVisual(ppChild);
                Compositor compositor = visualPPChild.Compositor;

                if (this.AnimatedValuesSpy == null)
                {
                    this.AnimatedValuesSpy = compositor.CreatePropertySet();
                }

                this.AnimatedValuesSpy.InsertScalar("VerticalOffset1", 0.0f);

                this.VerticalOffsetAnimation1 = compositor.CreateExpressionAnimation(visualVerticalTargetedPropertyName);
                this.VerticalOffsetAnimation1.SetReferenceParameter("visual", visualPPChild);
            }

            if (this.parallaxView4 != null && this.parallaxView4.Child is UIElement)
            {
                UIElement ppChild = this.parallaxView4.Child as UIElement;
                Visual visualPPChild = ElementCompositionPreview.GetElementVisual(ppChild);
                Compositor compositor = visualPPChild.Compositor;

                if (this.AnimatedValuesSpy == null)
                {
                    this.AnimatedValuesSpy = compositor.CreatePropertySet();
                }

                this.AnimatedValuesSpy.InsertScalar("VerticalOffset2", 0.0f);

                this.VerticalOffsetAnimation2 = compositor.CreateExpressionAnimation(visualVerticalTargetedPropertyName);
                this.VerticalOffsetAnimation2.SetReferenceParameter("visual", visualPPChild);
            }

            CheckSpyingTicksRequirement();
        }

void SetupScrollPresenter ( ) [inline, private]

Definition at line 302 of file SimpleRectanglePage.xaml.cs.

        {
            LinearGradientBrush threeColorsLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };

            GradientStop blueGS = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
            threeColorsLGB.GradientStops.Add(blueGS);

            GradientStop yellowGS = new GradientStop() { Color = Microsoft.UI.Colors.Yellow, Offset = 0.5 };
            threeColorsLGB.GradientStops.Add(yellowGS);

            GradientStop redGS = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
            threeColorsLGB.GradientStops.Add(redGS);

            Rectangle rectSC = new Rectangle();
            rectSC.Width = 1000;
            rectSC.Height = 900;
            rectSC.Fill = threeColorsLGB;

            ScrollPresenter s = new ScrollPresenter();
            s.Name = "s";
            s.Width = 500;
            s.Height = 300;
            s.Background = new SolidColorBrush(Microsoft.UI.Colors.LightBlue);
            s.Margin = new Thickness(4);
            s.HorizontalScrollMode = ScrollingScrollMode.Enabled;
            s.VerticalScrollMode = ScrollingScrollMode.Enabled;
            s.Content = rectSC;
            s.ViewChanged += ScrollPresenter_ViewChanged;

            sp.Children.Insert(0, s);

            parallaxView3.Source = s;
            parallaxView4.Source = s;
        }

void SpyAnimatedValues ( ) [inline, private]

Definition at line 227 of file SimpleRectanglePage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                StopAnimatedValuesSpy();

                float offset;
                CompositionGetValueStatus status;

                status = this.AnimatedValuesSpy.TryGetScalar("HorizontalOffset1", out offset);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    this.tbHorizontalOutput1.Text = offset.ToString();
                }
                else
                {
                    this.tbHorizontalOutput1.Text = "status=" + status.ToString();
                }
                System.Diagnostics.Debug.WriteLine("Spied value 1: " + this.tbHorizontalOutput1.Text);

                status = this.AnimatedValuesSpy.TryGetScalar("HorizontalOffset2", out offset);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    this.tbHorizontalOutput2.Text = offset.ToString();
                }
                else
                {
                    this.tbHorizontalOutput2.Text = "status=" + status.ToString();
                }
                System.Diagnostics.Debug.WriteLine("Spied value 2: " + this.tbHorizontalOutput2.Text);

                status = this.AnimatedValuesSpy.TryGetScalar("VerticalOffset1", out offset);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    this.tbVerticalOutput1.Text = offset.ToString();
                }
                else
                {
                    this.tbVerticalOutput1.Text = "status=" + status.ToString();
                }
                System.Diagnostics.Debug.WriteLine("Spied value 3: " + this.tbVerticalOutput1.Text);

                status = this.AnimatedValuesSpy.TryGetScalar("VerticalOffset2", out offset);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    this.tbVerticalOutput2.Text = offset.ToString();
                }
                else
                {
                    this.tbVerticalOutput2.Text = "status=" + status.ToString();
                }
                System.Diagnostics.Debug.WriteLine("Spied value 4: " + this.tbVerticalOutput2.Text);

                StartAnimatedValuesSpy();
            }
        }

void StartAnimatedValuesSpy ( ) [inline, private]

Definition at line 166 of file SimpleRectanglePage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StartAnimation("HorizontalOffset1", this.HorizontalOffsetAnimation1);
                this.AnimatedValuesSpy.StartAnimation("HorizontalOffset2", this.HorizontalOffsetAnimation2);
                this.AnimatedValuesSpy.StartAnimation("VerticalOffset1", this.VerticalOffsetAnimation1);
                this.AnimatedValuesSpy.StartAnimation("VerticalOffset2", this.VerticalOffsetAnimation2);
            }
        }

void StopAnimatedValuesSpy ( ) [inline, private]

Definition at line 177 of file SimpleRectanglePage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StopAnimation("HorizontalOffset1");
                this.AnimatedValuesSpy.StopAnimation("HorizontalOffset2");
                this.AnimatedValuesSpy.StopAnimation("VerticalOffset1");
                this.AnimatedValuesSpy.StopAnimation("VerticalOffset2");
            }
        }

void TickForValuesSpy ( ) [inline, private]

Definition at line 221 of file SimpleRectanglePage.xaml.cs.

        {
            this.UIThreadTicksForValuesSpy = 8;
            CheckSpyingTicksRequirement();
        }

Property Documentation

CompositionPropertySet AnimatedValuesSpy [get, set, private]

Definition at line 42 of file SimpleRectanglePage.xaml.cs.

bool HasDirectManipulation [get, set, private]

Definition at line 72 of file SimpleRectanglePage.xaml.cs.

ExpressionAnimation HorizontalOffsetAnimation1 [get, set, private]

Definition at line 48 of file SimpleRectanglePage.xaml.cs.

ExpressionAnimation HorizontalOffsetAnimation2 [get, set, private]

Definition at line 54 of file SimpleRectanglePage.xaml.cs.

bool IsRenderingHooked [get, set, private]

Definition at line 78 of file SimpleRectanglePage.xaml.cs.

uint UIThreadTicksForValuesSpy [get, set, private]

Definition at line 84 of file SimpleRectanglePage.xaml.cs.

ExpressionAnimation VerticalOffsetAnimation1 [get, set, private]

Definition at line 60 of file SimpleRectanglePage.xaml.cs.

ExpressionAnimation VerticalOffsetAnimation2 [get, set, private]

Definition at line 66 of file SimpleRectanglePage.xaml.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/SimpleRectanglePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SimpleVerify Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SimpleVerify
Public Member Functions | Private Attributes

SimpleVerify Class Reference

List of all members.

Public Member Functions

void | IsEqual (object actualValue, object expectValue, string message)
void | IsTrue (bool condition, string message)
override string | ToString ()

Private Attributes

List< string > | _errors = new List<string>()

Detailed Description

Definition at line 16 of file CommonStylesPage.xaml.cs.

Member Function Documentation

void IsEqual | ( | object | actualValue,
 |  | object | expectValue,
 |  | string | message |
 | ) |  |  | [inline]

Definition at line 27 of file CommonStylesPage.xaml.cs.

        {
            if (expectValue != actualValue && !expectValue.Equals(actualValue))
            {
                _errors.Add(message + " - expect " + expectValue.ToString() + " but it's " + actualValue.ToString());
            }
        }

void IsTrue | ( | bool | condition,
 |  | string | message |
 | ) |  |  | [inline]

Definition at line 20 of file CommonStylesPage.xaml.cs.

        {
            if (!condition)
            {
                _errors.Add(message);
            }
        }

override string ToString ( ) [inline]

Definition at line 35 of file CommonStylesPage.xaml.cs.

        {
            if (_errors.Count == 0)
            {
                return "Pass";
            }
            return "Fail: " + string.Join(";", _errors);
        }

Member Data Documentation

List<string> _errors = new List<string>() [private]

Definition at line 18 of file CommonStylesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/CommonStylesPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderInteractionPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SliderInteractionPage
Public Member Functions | Properties

SliderInteractionPage Class Reference

List of all members.

Public Member Functions

SliderInteractionPage ()

Properties

SliderInteraction | HorizontalSliderInteraction [get, set]
SliderInteraction | VerticalSliderInteraction [get, set]

Detailed Description

Definition at line 17 of file SliderInteractionPage.xaml.cs.

Constructor & Destructor Documentation

SliderInteractionPage ( ) [inline]

Definition at line 19 of file SliderInteractionPage.xaml.cs.

        {
            this.InitializeComponent();

            HorizontalSliderInteraction = new SliderInteraction()
            {
                Minimum = 0,
                Maximum = 200 - 2 - 20 // Subtract 2x host border thickness and the width of the scrubber thumb
            };

            horizontalElement.Interactions.Add(HorizontalSliderInteraction);

            VerticalSliderInteraction = new SliderInteraction()
            {
                Orientation = Orientation.Vertical,
                Minimum = 0,
                Maximum = 200 - 2 - 20 // Subtract 2x host border thickness and the height of the scrubber thumb
            };

            verticalElement.Interactions.Add(VerticalSliderInteraction);
        }

Property Documentation

SliderInteraction HorizontalSliderInteraction [get, set]

Definition at line 42 of file SliderInteractionPage.xaml.cs.

SliderInteraction VerticalSliderInteraction [get, set]

Definition at line 47 of file SliderInteractionPage.xaml.cs.

The documentation for this class was generated from the following file:
  • Interactions/SliderInteraction/TestUI/SliderInteractionPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SliderPage
Public Member Functions

SliderPage Class Reference

List of all members.

Public Member Functions

SliderPage ()

Detailed Description

Definition at line 7 of file SliderPage.xaml.cs.

Constructor & Destructor Documentation

SliderPage ( ) [inline]

Definition at line 9 of file SliderPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/SliderPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SplitButtonPage
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

SplitButtonPage Class Reference

List of all members.

Public Member Functions

SplitButtonPage ()
void | CommandExecute ()

Public Attributes

MyCommand TestExecuteCommand

Private Member Functions

void | CanExecuteCheckBox_Checked (object sender, RoutedEventArgs e)
void | CanExecuteCheckBox_Unchecked (object sender, RoutedEventArgs e)
void | EnableCheckBox_Checked (object sender, RoutedEventArgs e)
void | EnableCheckBox_Unchecked (object sender, RoutedEventArgs e)
void | SetFlyoutCheckBox_Checked (object sender, RoutedEventArgs e)
void | SetFlyoutCheckBox_Unchecked (object sender, RoutedEventArgs e)
void | SimulateTouchCheckBox_Checked (object sender, RoutedEventArgs e)
void | SimulateTouchCheckBox_Unchecked (object sender, RoutedEventArgs e)
void | TestSplitButton_Click (object sender, object e)
void | TestSplitButtonFlyout_Closed (object sender, object e)
void | TestSplitButtonFlyout_Opened (object sender, object e)
void | ToggleSplitButton_Click (object sender, object e)
void | ToggleSplitButton_IsCheckedChanged (ToggleSplitButton sender, ToggleSplitButtonIsCheckedChangedEventArgs args)

Private Attributes

int | _clickCount = 0
int | _commandExecuteCount = 0
int | _flyoutClosedCount = 0
int | _flyoutOpenedCount = 0
Flyout | _placementFlyout

Detailed Description

Definition at line 18 of file SplitButtonPage.xaml.cs.

Constructor & Destructor Documentation

SplitButtonPage ( ) [inline]

Definition at line 29 of file SplitButtonPage.xaml.cs.

        {
            this.InitializeComponent();

            SplitButtonTestApi.SimulateTouch = false;

            TestExecuteCommand = new MyCommand(this);

            _placementFlyout = new Flyout();
            _placementFlyout.Placement = FlyoutPlacementMode.Bottom;
            TextBlock textBlock = new TextBlock();
            textBlock.Text = "Placement Flyout";
            _placementFlyout.Content = textBlock;

            ControlStateViewer.ControlType = TestSplitButton.GetType();
            ControlStateViewer.States = new List<string>
            {
                "Normal",
                "FlyoutOpen",
                "TouchPressed",
                "PrimaryPointerOver",
                "PrimaryPressed",
                "SecondaryPointerOver",
                "SecondaryPressed",
            };

            ToggleControlStateViewer.ControlType = TestSplitButton.GetType();
            ToggleControlStateViewer.States = new List<string>
            {
                "Checked",
                "CheckedFlyoutOpen",
                "CheckedTouchPressed",
                "CheckedPrimaryPointerOver",
                "CheckedPrimaryPressed",
                "CheckedSecondaryPointerOver",
                "CheckedSecondaryPressed",
            };
        }

Member Function Documentation

void CanExecuteCheckBox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 103 of file SplitButtonPage.xaml.cs.

        {
            if (TestExecuteCommand != null)
            {
                TestExecuteCommand.UpdateCanExecute(true);
            }
        }

void CanExecuteCheckBox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 111 of file SplitButtonPage.xaml.cs.

        {
            if (TestExecuteCommand != null)
            {
                TestExecuteCommand.UpdateCanExecute(false);
            }
        }

void CommandExecute ( ) [inline]

Definition at line 119 of file SplitButtonPage.xaml.cs.

        {
            ExecuteCountTextBlock.Text = (++_commandExecuteCount).ToString();
        }

void EnableCheckBox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 93 of file SplitButtonPage.xaml.cs.

        {
            DisabledSplitButton.IsEnabled = true;
        }

void EnableCheckBox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file SplitButtonPage.xaml.cs.

        {
            DisabledSplitButton.IsEnabled = false;
        }

void SetFlyoutCheckBox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 124 of file SplitButtonPage.xaml.cs.

        {
            if (FlyoutSetSplitButton != null)
            {
                FlyoutSetSplitButton.Flyout = _placementFlyout;
            }
        }

void SetFlyoutCheckBox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 132 of file SplitButtonPage.xaml.cs.

        {
            if (FlyoutSetSplitButton != null)
            {
                FlyoutSetSplitButton.Flyout = null;
            }
        }

void SimulateTouchCheckBox_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 83 of file SplitButtonPage.xaml.cs.

        {
            SplitButtonTestApi.SimulateTouch = true;
        }

void SimulateTouchCheckBox_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file SplitButtonPage.xaml.cs.

        {
            SplitButtonTestApi.SimulateTouch = false;
        }

void TestSplitButton_Click | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 68 of file SplitButtonPage.xaml.cs.

        {
            ClickCountTextBlock.Text = (++_clickCount).ToString();
        }

void TestSplitButtonFlyout_Closed | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 78 of file SplitButtonPage.xaml.cs.

        {
            FlyoutClosedCountTextBlock.Text = (++_flyoutClosedCount).ToString();
        }

void TestSplitButtonFlyout_Opened | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file SplitButtonPage.xaml.cs.

        {
            FlyoutOpenedCountTextBlock.Text = (++_flyoutOpenedCount).ToString();
        }

void ToggleSplitButton_Click | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 145 of file SplitButtonPage.xaml.cs.

        {
            ToggleStateOnClickTextBlock.Text = ToggleSplitButton.IsChecked ? "Checked" : "Unchecked";
        }

void ToggleSplitButton_IsCheckedChanged | ( | ToggleSplitButton | sender,
 |  | ToggleSplitButtonIsCheckedChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 140 of file SplitButtonPage.xaml.cs.

        {
            ToggleStateTextBlock.Text = ToggleSplitButton.IsChecked ? "Checked" : "Unchecked";
        }

Member Data Documentation

int _clickCount = 0 [private]

Definition at line 20 of file SplitButtonPage.xaml.cs.

int _commandExecuteCount = 0 [private]

Definition at line 25 of file SplitButtonPage.xaml.cs.

int _flyoutClosedCount = 0 [private]

Definition at line 22 of file SplitButtonPage.xaml.cs.

int _flyoutOpenedCount = 0 [private]

Definition at line 21 of file SplitButtonPage.xaml.cs.

Flyout _placementFlyout [private]

Definition at line 27 of file SplitButtonPage.xaml.cs.

MyCommand TestExecuteCommand

Definition at line 24 of file SplitButtonPage.xaml.cs.

The documentation for this class was generated from the following file:
  • SplitButton/TestUI/SplitButtonPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SplitViewPage
Public Member Functions | Private Member Functions

SplitViewPage Class Reference

List of all members.

Public Member Functions

SplitViewPage ()

Private Member Functions

void | DisplayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | Pane_Closed (SplitView sender, object e)
void | Pane_Opened (SplitView sender, object e)
void | PaneOpenCheckbox_CheckChanged (object sender, RoutedEventArgs e)
void | PanePlacement_Toggled (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 11 of file SplitViewPage.xaml.cs.

Constructor & Destructor Documentation

SplitViewPage ( ) [inline]

Definition at line 13 of file SplitViewPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void DisplayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 18 of file SplitViewPage.xaml.cs.

        {
            splitView.DisplayMode = (SplitViewDisplayMode)Enum.Parse(typeof(SplitViewDisplayMode), (e.AddedItems[0] as ComboBoxItem).Content.ToString());
        }

void Pane_Closed | ( | SplitView | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 23 of file SplitViewPage.xaml.cs.

        {
            paneOpenCheckbox.IsChecked = false;
        }

void Pane_Opened | ( | SplitView | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 28 of file SplitViewPage.xaml.cs.

        {
            paneOpenCheckbox.IsChecked = true;
        }

void PaneOpenCheckbox_CheckChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file SplitViewPage.xaml.cs.

        {
            splitView.IsPaneOpen = paneOpenCheckbox.IsChecked.GetValueOrDefault();
        }

void PanePlacement_Toggled | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file SplitViewPage.xaml.cs.

        {
            var ts = sender as ToggleSwitch;
            if (ts.IsOn)
            {
                splitView.PanePlacement = SplitViewPanePlacement.Right;
            }
            else
            {
                splitView.PanePlacement = SplitViewPanePlacement.Left;
            }
        }

The documentation for this class was generated from the following file:
  • SplitView/TestUI/SplitViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Square Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Square
Properties

Square Class Reference

List of all members.

Properties

string | Color [get, set]
string | Name [get, set]
double | Width [get, set]

Detailed Description

Definition at line 17 of file AnnotatedScrollBarSummaryPage.xaml.cs.

Property Documentation

string Color [get, set]

Definition at line 20 of file AnnotatedScrollBarSummaryPage.xaml.cs.

string Name [get, set]

Definition at line 19 of file AnnotatedScrollBarSummaryPage.xaml.cs.

double Width [get, set]

Definition at line 21 of file AnnotatedScrollBarSummaryPage.xaml.cs.

The documentation for this class was generated from the following file:
  • AnnotatedScrollBar/TestUI/AnnotatedScrollBarSummaryPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlClearPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SwipeControlClearPage
Public Member Functions | Private Attributes

SwipeControlClearPage Class Reference

Test page used for clearing existing SwipeControls. More...

List of all members.

Public Member Functions

SwipeControlClearPage ()
void | AddSwipeItemsButton_Click (object sender, RoutedEventArgs e)
void | ClearSwipeItemsButton_Click (object sender, RoutedEventArgs e)

Private Attributes

string[] | items = new string[] { "some text" }

Detailed Description

Definition at line 12 of file SwipeControlClearPage.xaml.cs.

Constructor & Destructor Documentation

SwipeControlClearPage ( ) [inline]

Definition at line 16 of file SwipeControlClearPage.xaml.cs.

        {
            this.InitializeComponent();
            SwipeItemsChildSum.Text = (DefaultSwipeItemsHorizontal.Count + DefaultSwipeItemsVertical.Count).ToString();

            leftSwipe.ItemsSource = items;
            topSwipe.ItemsSource = items;
            rightSwipe.ItemsSource = items;
            bottomSwipe.ItemsSource = items;
        }

Member Function Documentation

void AddSwipeItemsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 27 of file SwipeControlClearPage.xaml.cs.

        {
            DefaultSwipeItemsHorizontal.Clear();
            DefaultSwipeItemsVertical.Clear();

            DefaultSwipeItemsHorizontal.Mode = Microsoft.UI.Xaml.Controls.SwipeMode.Reveal;
            DefaultSwipeItemsHorizontal.Add(DefaultSwipeItemHorizontal);

            // Using swipecontrol inside datatemplate prevents us from setting that:
            // Swipecontrol is in horizontal mode, can not add vertical swipe items...
            //DefaultSwipeItemsVertical.Mode = Microsoft.UI.Xaml.Controls.SwipeMode.Reveal;
            //DefaultSwipeItemsVertical.Add(DefaultSwipeItemVertical);

            SwipeItemsChildSum.Text = (DefaultSwipeItemsHorizontal.Count + DefaultSwipeItemsVertical.Count).ToString();
        }

void ClearSwipeItemsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 42 of file SwipeControlClearPage.xaml.cs.

        {
            DefaultSwipeItemsHorizontal.Clear();
            DefaultSwipeItemsVertical.Clear();
            SwipeItemsChildSum.Text = (DefaultSwipeItemsHorizontal.Count + DefaultSwipeItemsVertical.Count).ToString();
        }

Member Data Documentation

string [] items = new string[] { "some text" } [private]

Definition at line 14 of file SwipeControlClearPage.xaml.cs.

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControl_TestUI/SwipeControlClearPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SwipeControlPage
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

SwipeControlPage Class Reference

List of all members.

Public Member Functions

SwipeControlPage ()
void | ChangeText (string text)

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)
override void | OnNavigatingFrom (NavigatingCancelEventArgs e)

Properties

CompositionPropertySet | AnimatedValuesSpy [get, set]
bool | IsRenderingHooked [get, set]
ExpressionAnimation | PositionAnimation [get, set]
uint | UIThreadTicksForValuesSpy [get, set]

Private Member Functions

void | AppendAsyncEventMessage (string asyncEventMessage)
void | AppendAsyncEventMessage ()
void | BtnClearFullLog_Click (object sender, RoutedEventArgs e)
void | BtnClearSwipeControlEvents_Click (object sender, RoutedEventArgs e)
void | BtnGetFullLog_Click (object sender, RoutedEventArgs e)
void | CheckSpyingTicksRequirement ()
void | ChkLogSwipeControlMessages_Checked (object sender, RoutedEventArgs e)
void | ChkLogSwipeControlMessages_Unchecked (object sender, RoutedEventArgs e)
void | CompositionTarget_Rendering (object sender, object e)
void | ContainerSizeChangedHandler (object sender, object e)
void | DispatcherTimer_Tick (object sender, object e)
void | ExecuteRemainOpenInvoked (SwipeItem sender, SwipeItemInvokedEventArgs args)
void | LastInteractedWithSwipeControlSwipeContentElement_SizeChanged (object sender, SizeChangedEventArgs e)
void | MaterialHelperTestApiSetup ()
void | MUXControlsTestHooks_LoggingMessage (object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
void | OnResetClick (object sender, RoutedEventArgs args)
void | PrintGridWidth ()
void | ProgramaticallyCloseSwipeControl11 (SwipeItem sender, SwipeItemInvokedEventArgs args)
void | ProgramaticallyCloseSwipeControl3 (SwipeItem sender, SwipeItemInvokedEventArgs args)
void | ProgramaticallyCloseSwipeControl9 (SwipeItem sender, SwipeItemInvokedEventArgs args)
void | ResetSpyOutput ()
void | SetupAnimatedValuesSpy ()
void | SpyAnimatedValues ()
void | StartAnimatedValuesSpy ()
void | StopAnimatedValuesSpy ()
void | SwipeItemInvoked (SwipeItem sender, SwipeItemInvokedEventArgs args)
void | SwipeItemInvokedAndResizeGrid (SwipeItem sender, SwipeItemInvokedEventArgs args)
void | SwipeTestHooks_IdleStatusChanged (SwipeControl sender, object args)
void | SwipeTestHooks_LastInteractedWithSwipeControlChanged (object sender, object args)
void | SwipeTestHooks_OpenedStatusChanged (SwipeControl sender, object args)
void | TestSwipeControl_Loaded (object sender, RoutedEventArgs e)
void | TestSwipeControl_Unloaded (object sender, RoutedEventArgs e)
void | TickForValuesSpy ()
void | UICommand_ExecuteRequested (XamlUICommand command, ExecuteRequestedEventArgs args)

Private Attributes

DispatcherTimer | _dt
UIElement | animatedSwipe
object | asyncEventReportingLock = new object()
List< string > | fullLogs = new List<string>()
FrameworkElement | lastInteractedWithSwipeControlContentContainer
FrameworkElement | lastInteractedWithSwipeControlContentRoot
List< string > | lstAsyncEventMessage = new List<string>()
SwipeItem pastSender

Detailed Description

Definition at line 23 of file SwipeControlPage.xaml.cs.

Constructor & Destructor Documentation

SwipeControlPage ( ) [inline]

Definition at line 34 of file SwipeControlPage.xaml.cs.

        {
            // create command, and bind it to this object before initializing the components
            var command = new TestCommand(this);
            Resources.Add("command", command);

            this.InitializeComponent();
            Container.SizeChanged += ContainerSizeChangedHandler;
            SwipeTestHooks.LastInteractedWithSwipeControlChanged += SwipeTestHooks_LastInteractedWithSwipeControlChanged;
            MaterialHelperTestApiSetup();

            XamlUICommand uiCommand = new XamlUICommand
            {
                Label = "UICommand Label",
                IconSource = new SymbolIconSource { Symbol = Symbol.Setting }
            };

            uiCommand.ExecuteRequested += UICommand_ExecuteRequested;
            this.SwipeItemForUICommand.Command = uiCommand;

            if (chkLogSwipeControlMessages.IsChecked == true)
            {
                MUXControlsTestHooks.SetLoggingLevelForType("SwipeControl", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
                MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
            }
        }

Member Function Documentation

void AppendAsyncEventMessage ( string asyncEventMessage ) [inline, private]

Definition at line 727 of file SwipeControlPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                while (asyncEventMessage.Length > 0)
                {
                    string msgHead = asyncEventMessage;

                    if (asyncEventMessage.Length > 110)
                    {
                        int commaIndex = asyncEventMessage.IndexOf(',', 110);
                        if (commaIndex != -1)
                        {
                            msgHead = asyncEventMessage.Substring(0, commaIndex);
                            asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
                        }
                        else
                        {
                            asyncEventMessage = string.Empty;
                        }
                    }
                    else
                    {
                        asyncEventMessage = string.Empty;
                    }

                    lstAsyncEventMessage.Add(msgHead);
                }

                var ignored = this.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, AppendAsyncEventMessage);

            }
        }

void AppendAsyncEventMessage ( ) [inline, private]

Definition at line 761 of file SwipeControlPage.xaml.cs.

        {
            lock (asyncEventReportingLock)
            {
                foreach (string asyncEventMessage in lstAsyncEventMessage)
                {
                    if (chkDisplayLogs.IsChecked == true)
                    {
                        lstSwipeControlEvents.Items.Add(asyncEventMessage);
                    }
                    fullLogs.Add(asyncEventMessage);
                }
                lstAsyncEventMessage.Clear();
            }
        }

void BtnClearFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 790 of file SwipeControlPage.xaml.cs.

        {
            fullLogs.Clear();
            cmbFullLog.Items.Clear();
        }

void BtnClearSwipeControlEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 777 of file SwipeControlPage.xaml.cs.

        {
            lstSwipeControlEvents.Items.Clear();
        }

void BtnGetFullLog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 782 of file SwipeControlPage.xaml.cs.

        {
            foreach (string log in fullLogs)
            {
                cmbFullLog.Items.Add(log);
            }
        }

void ChangeText ( string text ) [inline]

Definition at line 102 of file SwipeControlPage.xaml.cs.

        {
            textBlock.Text = text;
            var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
            peer.RaiseAutomationEvent(AutomationEvents.MenuClosed);
        }

void CheckSpyingTicksRequirement ( ) [inline, private]

Definition at line 613 of file SwipeControlPage.xaml.cs.

        {
            if (this.animatedSwipe != null &&
                (this.UIThreadTicksForValuesSpy > 0) && this.AnimatedValuesSpy != null)
            {
                if (!this.IsRenderingHooked)
                {
                    this.IsRenderingHooked = true;
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering += CompositionTarget_Rendering;
                }
            }
            else
            {
                if (this.IsRenderingHooked)
                {
                    Microsoft.UI.Xaml.Media.CompositionTarget.Rendering -= CompositionTarget_Rendering;
                    this.IsRenderingHooked = false;
                }
            }
        }

void ChkLogSwipeControlMessages_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 669 of file SwipeControlPage.xaml.cs.

        {
            //To turn on info and verbose logging for a particular SwipeControl instance:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(sc1, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            //To turn on info and verbose logging without any filter:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            //To turn on info and verbose logging for the SwipeControl type:
            MUXControlsTestHooks.SetLoggingLevelForType("SwipeControl", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);

            MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
        }

void ChkLogSwipeControlMessages_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 683 of file SwipeControlPage.xaml.cs.

        {
            //To turn off info and verbose logging for a particular SwipeControl instance:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(swipeControl, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            //To turn off info and verbose logging without any filter:
            //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            //To turn off info and verbose logging for the SwipeControl type:
            MUXControlsTestHooks.SetLoggingLevelForType("SwipeControl", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);

            MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
        }

void CompositionTarget_Rendering | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 634 of file SwipeControlPage.xaml.cs.

        {
            if (this.UIThreadTicksForValuesSpy > 0)
            {
                this.UIThreadTicksForValuesSpy--;
            }
            CheckSpyingTicksRequirement();
            SpyAnimatedValues();
        }

void ContainerSizeChangedHandler | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 109 of file SwipeControlPage.xaml.cs.

        {
            //var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
            //peer.RaiseAutomationEvent(AutomationEvents.MenuOpened);

            PrintGridWidth();
        }

void DispatcherTimer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 558 of file SwipeControlPage.xaml.cs.

        {
            SpyAnimatedValues();
        }

void ExecuteRemainOpenInvoked | ( | SwipeItem | sender,
 |  | SwipeItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 198 of file SwipeControlPage.xaml.cs.

        {
            textBlock.Text = sender.Text;
        }

void LastInteractedWithSwipeControlSwipeContentElement_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 91 of file SwipeControlPage.xaml.cs.

        {
            PrintGridWidth();
        }

void MaterialHelperTestApiSetup ( ) [inline, private]

Definition at line 117 of file SwipeControlPage.xaml.cs.

        {
            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
        }

void MUXControlsTestHooks_LoggingMessage | ( | object | sender,
 |  | MUXControlsTestHooksLoggingMessageEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 697 of file SwipeControlPage.xaml.cs.

        {
            // Cut off the terminating new line.
            string msg = args.Message.Substring(0, args.Message.Length - 1);
            string senderName = string.Empty;

            try
            {
                FrameworkElement fe = sender as FrameworkElement;

                if (fe != null)
                {
                    senderName = "s:" + fe.Name + ", ";
                }
            }
            catch
            {
                AppendAsyncEventMessage("Warning: Failure while accessing sender's Name");
            }

            if (args.IsVerboseLevel)
            {
                AppendAsyncEventMessage("Verbose: " + senderName + "m:" + msg);
            }
            else
            {
                AppendAsyncEventMessage("Info: " + senderName + "m:" + msg);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 123 of file SwipeControlPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            SwipeTestHooks.LastInteractedWithSwipeControlChanged -= SwipeTestHooks_LastInteractedWithSwipeControlChanged;
            base.OnNavigatedFrom(e);
        }

override void OnNavigatingFrom ( NavigatingCancelEventArgs e ) [inline, protected]

Definition at line 219 of file SwipeControlPage.xaml.cs.

        {
            _dt.Tick -= DispatcherTimer_Tick; // prevent leaks since the dispatcher holds a pointer to this
        }

void OnResetClick | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 132 of file SwipeControlPage.xaml.cs.

        {
            textBlock.Text = "";
            TextBox.Text = "";
        }

void PrintGridWidth ( ) [inline, private]

Definition at line 138 of file SwipeControlPage.xaml.cs.

        {
            String newText = "";

            if (lastInteractedWithSwipeControlContentRoot != null)
            {
                newText+= lastInteractedWithSwipeControlContentRoot.ActualWidth.ToString();
            }
            if (lastInteractedWithSwipeControlContentContainer != null)
            {
                newText += ", ";
                newText += lastInteractedWithSwipeControlContentContainer.ActualWidth.ToString();
            }

            TextBox.Text = newText;
        }

void ProgramaticallyCloseSwipeControl11 | ( | SwipeItem | sender,
 |  | SwipeItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 184 of file SwipeControlPage.xaml.cs.

        {
            SwipeItemInvoked(sender, args);
            textBlock.Text = "sc11.Close()";
            sc11.Close();
        }

void ProgramaticallyCloseSwipeControl3 | ( | SwipeItem | sender,
 |  | SwipeItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 177 of file SwipeControlPage.xaml.cs.

        {
            SwipeItemInvoked(sender, args);
            textBlock.Text = "sc3.Close()";
            sc3.Close();
        }

void ProgramaticallyCloseSwipeControl9 | ( | SwipeItem | sender,
 |  | SwipeItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 191 of file SwipeControlPage.xaml.cs.

        {
            SwipeItemInvoked(sender, args);
            textBlock.Text = "sc9.Close()";
            sc9.Close();
        }

void ResetSpyOutput ( ) [inline, private]

Definition at line 602 of file SwipeControlPage.xaml.cs.

        {
            this.PositionX.Text = this.PositionY.Text = "0 - reset";
        }

void SetupAnimatedValuesSpy ( ) [inline, private]

Definition at line 531 of file SwipeControlPage.xaml.cs.

        {
            StopAnimatedValuesSpy();

            this.AnimatedValuesSpy = null;
            this.PositionAnimation = null;

            if (this.animatedSwipe != null)
            {
                Visual visualPPChild = ElementCompositionPreview.GetElementVisual(this.animatedSwipe);
                Compositor compositor = visualPPChild.Compositor;

                this.AnimatedValuesSpy = compositor.CreatePropertySet();
                AnimatedValuesSpy.InsertVector3("Offset", new Vector3());

                this.PositionAnimation = compositor.CreateExpressionAnimation("visual.Offset");
                this.PositionAnimation.SetReferenceParameter("visual", visualPPChild);

                CheckSpyingTicksRequirement();
                TickForValuesSpy();
            }
            else
            {
                ResetSpyOutput();
            }
        }

void SpyAnimatedValues ( ) [inline, private]

Definition at line 579 of file SwipeControlPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                //StopAnimatedValuesSpy();

                Vector3 position;
                CompositionGetValueStatus status = this.AnimatedValuesSpy.TryGetVector3("Offset", out position);
                if (CompositionGetValueStatus.Succeeded == status)
                {
                    // add a position textblock in the file
                    this.PositionX.Text = position.X.ToString();
                    this.PositionY.Text = position.Y.ToString();
                }
                else
                {
                    this.PositionX.Text = this.PositionY.Text = "status=" + status.ToString();
                }

                StartAnimatedValuesSpy();
            }
        }

void StartAnimatedValuesSpy ( ) [inline, private]

Definition at line 563 of file SwipeControlPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StartAnimation("Offset", this.PositionAnimation);
            }
        }

void StopAnimatedValuesSpy ( ) [inline, private]

Definition at line 571 of file SwipeControlPage.xaml.cs.

        {
            if (this.AnimatedValuesSpy != null)
            {
                this.AnimatedValuesSpy.StopAnimation("Offset");
            }
        }

void SwipeItemInvoked | ( | SwipeItem | sender,
 |  | SwipeItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 155 of file SwipeControlPage.xaml.cs.

        {
            if (chkLogSwipeControlEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("SwipeItemInvoked sender.Text=" + sender.Text + ", args.SwipeControl.Name=" + args.SwipeControl.Name);
            }

            // ensures that this method is invoked twice for only one swipe action.
            if (pastSender == sender)
            {
                textBlock.Text = "FailTest";
            }
            else
            {
                textBlock.Text = sender.Text;
            }
            pastSender = sender;

            var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
            peer.RaiseAutomationEvent(AutomationEvents.MenuClosed);
        }

void SwipeItemInvokedAndResizeGrid | ( | SwipeItem | sender,
 |  | SwipeItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 203 of file SwipeControlPage.xaml.cs.

        {
            SwipeItemInvoked(sender, args);

            if (sender.Text == "Scale Down")
            {
                SwipePanel.Width = 400;
            }
            else if (sender.Text == "Scale Up")
            {
                SwipePanel.Width = 700;
            }

            PrintGridWidth();
        }

void SwipeTestHooks_IdleStatusChanged | ( | SwipeControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 247 of file SwipeControlPage.xaml.cs.

        {
            if (chkLogSwipeControlEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged sender.Name=" + sender.Name);
            }

            if (sender.Name == this.sc1.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc1))
                {
                    this.SwipeItem1IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem1IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc2.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc2))
                {
                    this.SwipeItem2IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem2IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc3.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc3))
                {
                    this.SwipeItem3IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem3IdleCheckBox.IsChecked = false;
                }

                if (chkLogSwipeControlEvents.IsChecked == true)
                {
                    AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged IsIdle=" + this.SwipeItem3IdleCheckBox.IsChecked.ToString());
                }

                Grid contentRootGrid = (Grid)VisualTreeHelper.GetChild(VisualTreeHelper.GetChild(sc3, 0), 0);
                SolidColorBrush solidColorBrush = (SolidColorBrush)contentRootGrid.Background;
                if (solidColorBrush != null)
                {
                    Swipe3BackgroundColorTextBlock.Text = solidColorBrush.Color.ToString();
                    if (chkLogSwipeControlEvents.IsChecked == true)
                    {
                        AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged contentRootGrid.Background=" + solidColorBrush.Color.ToString());
                    }
                }
                else
                {
                    Swipe3BackgroundColorTextBlock.Text = "null";
                    if (chkLogSwipeControlEvents.IsChecked == true)
                    {
                        AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged contentRootGrid.Background=null");
                    }
                }
            }
            if (sender.Name == this.sc4.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc4))
                {
                    this.SwipeItem4IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem4IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc5.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc5))
                {
                    this.SwipeItem5IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem5IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc6.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc6))
                {
                    this.SwipeItem6IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem6IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc7.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc7))
                {
                    this.SwipeItem7IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem7IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc8.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc8))
                {
                    this.SwipeItem8IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem8IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc9.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc9))
                {
                    this.SwipeItem9IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem9IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc10.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc10))
                {
                    this.SwipeItem10IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem10IdleCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc11.Name)
            {
                if (SwipeTestHooks.GetIsIdle(this.sc11))
                {
                    this.SwipeItem11IdleCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem11IdleCheckBox.IsChecked = false;
                }
            }
        }

void SwipeTestHooks_LastInteractedWithSwipeControlChanged | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 61 of file SwipeControlPage.xaml.cs.

        {
            if (lastInteractedWithSwipeControlContentContainer != null)
            {
                lastInteractedWithSwipeControlContentContainer.SizeChanged -= LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
            }
            if(lastInteractedWithSwipeControlContentRoot != null)
            {
                lastInteractedWithSwipeControlContentRoot.SizeChanged -= LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
            }

            SwipeControl lastInteractedWithSwipeControl = SwipeTestHooks.GetLastInteractedWithSwipeControl();
            if (lastInteractedWithSwipeControl != null)
            {
                lastInteractedWithSwipeControlContentContainer = (FrameworkElement)FindVisualChildByName(SwipeTestHooks.GetLastInteractedWithSwipeControl(), "SwipeContentStackPanel");
                lastInteractedWithSwipeControlContentRoot = (FrameworkElement)FindVisualChildByName(SwipeTestHooks.GetLastInteractedWithSwipeControl(), "SwipeContentRoot");
            }

            if (lastInteractedWithSwipeControlContentContainer != null)
            {
                lastInteractedWithSwipeControlContentContainer.SizeChanged += LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
            }
            if (lastInteractedWithSwipeControlContentRoot != null)
            {
                lastInteractedWithSwipeControlContentRoot.SizeChanged += LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
            }

            PrintGridWidth();
        }

void SwipeTestHooks_OpenedStatusChanged | ( | SwipeControl | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 401 of file SwipeControlPage.xaml.cs.

        {
            if (chkLogSwipeControlEvents.IsChecked == true)
            {
                AppendAsyncEventMessage("SwipeTestHooks_OpenedStatusChanged sender.Name=" + sender.Name);
            }

            if (sender.Name == this.sc1.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc1))
                {
                    this.SwipeItem1OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem1OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc2.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc2))
                {
                    this.SwipeItem2OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem2OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc3.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc3))
                {
                    this.SwipeItem3OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem3OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc4.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc4))
                {
                    this.SwipeItem4OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem4OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc5.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc5))
                {
                    this.SwipeItem5OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem5OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc6.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc6))
                {
                    this.SwipeItem6OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem6OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc7.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc7))
                {
                    this.SwipeItem7OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem7OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc8.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc8))
                {
                    this.SwipeItem8OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem8OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc9.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc9))
                {
                    this.SwipeItem9OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem9OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc10.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc10))
                {
                    this.SwipeItem10OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem10OpenCheckBox.IsChecked = false;
                }
            }
            if (sender.Name == this.sc11.Name)
            {
                if (SwipeTestHooks.GetIsOpen(this.sc11))
                {
                    this.SwipeItem11OpenCheckBox.IsChecked = true;
                }
                else
                {
                    this.SwipeItem11OpenCheckBox.IsChecked = false;
                }
            }
        }

void TestSwipeControl_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 224 of file SwipeControlPage.xaml.cs.

        {
            _dt = new DispatcherTimer();
            _dt.Interval = TimeSpan.FromSeconds(0.1);
            _dt.Start();
            _dt.Tick += DispatcherTimer_Tick;

            DependencyObject obj = FindVisualChildByName(SwipeControl4, "ContentRoot");
            UIElement ui = obj as UIElement;
            this.animatedSwipe = ui;

            SetupAnimatedValuesSpy();
            SpyAnimatedValues();
            SwipeTestHooks.OpenedStatusChanged += SwipeTestHooks_OpenedStatusChanged;
            SwipeTestHooks.IdleStatusChanged += SwipeTestHooks_IdleStatusChanged;
        }

void TestSwipeControl_Unloaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 241 of file SwipeControlPage.xaml.cs.

        {
            SwipeTestHooks.OpenedStatusChanged -= SwipeTestHooks_OpenedStatusChanged;
            SwipeTestHooks.IdleStatusChanged -= SwipeTestHooks_IdleStatusChanged;
        }

void TickForValuesSpy ( ) [inline, private]

Definition at line 607 of file SwipeControlPage.xaml.cs.

        {
            this.UIThreadTicksForValuesSpy = 6;
            CheckSpyingTicksRequirement();
        }

void UICommand_ExecuteRequested | ( | XamlUICommand | command,
 |  | ExecuteRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 96 of file SwipeControlPage.xaml.cs.

        {
            ChangeText(command.Label);
        }

Member Data Documentation

DispatcherTimer _dt [private]

Definition at line 32 of file SwipeControlPage.xaml.cs.

UIElement animatedSwipe [private]

Definition at line 31 of file SwipeControlPage.xaml.cs.

object asyncEventReportingLock = new object() [private]

Definition at line 25 of file SwipeControlPage.xaml.cs.

List<string> fullLogs = new List<string>() [private]

Definition at line 27 of file SwipeControlPage.xaml.cs.

FrameworkElement lastInteractedWithSwipeControlContentContainer [private]

Definition at line 28 of file SwipeControlPage.xaml.cs.

FrameworkElement lastInteractedWithSwipeControlContentRoot [private]

Definition at line 29 of file SwipeControlPage.xaml.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 26 of file SwipeControlPage.xaml.cs.

SwipeItem pastSender [private]

Definition at line 30 of file SwipeControlPage.xaml.cs.

Property Documentation

CompositionPropertySet AnimatedValuesSpy [get, set, private]

Definition at line 646 of file SwipeControlPage.xaml.cs.

bool IsRenderingHooked [get, set, private]

Definition at line 658 of file SwipeControlPage.xaml.cs.

ExpressionAnimation PositionAnimation [get, set, private]

Definition at line 652 of file SwipeControlPage.xaml.cs.

uint UIThreadTicksForValuesSpy [get, set, private]

Definition at line 664 of file SwipeControlPage.xaml.cs.

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControl_TestUI/SwipeControlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlPage2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SwipeControlPage2
Public Member Functions | Private Member Functions | Private Attributes

SwipeControlPage2 Class Reference

List of all members.

Public Member Functions

SwipeControlPage2 ()
void | BtnAddItem_Click (object sender, RoutedEventArgs args)
void | BtnCancel_Click (object sender, RoutedEventArgs args)
void | BtnClose_Click (object sender, RoutedEventArgs args)
void | BtnGetBottomItems_Click (object sender, RoutedEventArgs args)
void | BtnGetLeftItems_Click (object sender, RoutedEventArgs args)
void | BtnGetRightItems_Click (object sender, RoutedEventArgs args)
void | BtnGetTopItems_Click (object sender, RoutedEventArgs args)
void | ChkPageMethods_Checked (object sender, RoutedEventArgs args)
void | ChkPageMethods_Unchecked (object sender, RoutedEventArgs args)
void | ChkSwipeControlProperties_Checked (object sender, RoutedEventArgs args)
void | ChkSwipeControlProperties_Unchecked (object sender, RoutedEventArgs args)
void | ChkSwipeEvents_Checked (object sender, RoutedEventArgs args)
void | ChkSwipeEvents_Unchecked (object sender, RoutedEventArgs args)
void | ChkSwipeItemProperties_Checked (object sender, RoutedEventArgs args)
void | ChkSwipeItemProperties_Unchecked (object sender, RoutedEventArgs args)
void | ChkSwipeMethods_Checked (object sender, RoutedEventArgs args)
void | ChkSwipeMethods_Unchecked (object sender, RoutedEventArgs args)
void | ChkSwipeTestHooks_Checked (object sender, RoutedEventArgs args)
void | ChkSwipeTestHooks_Unchecked (object sender, RoutedEventArgs args)

Private Member Functions

void | resetSwipeItemChoices ()
void | SwipeItemInvoked (SwipeItem sender, SwipeItemInvokedEventArgs args)

Private Attributes

SwipeItem pastSender

Detailed Description

Definition at line 23 of file SwipeControlPage2.xaml.cs.

Constructor & Destructor Documentation

SwipeControlPage2 ( ) [inline]

Definition at line 26 of file SwipeControlPage2.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void BtnAddItem_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 158 of file SwipeControlPage2.xaml.cs.

        {
            SwipeItem swipeItem = new SwipeItem();
            swipeItem.Text = txtText.Text;
            switch(cmbIcon.SelectedIndex)
            {
                case (0):
                    swipeItem.IconSource = Resources["SymbolIcon"] as IconSource;
                    break;
                case (1):
                    swipeItem.IconSource = Resources["FontIcon"] as IconSource;
                    break;
                case (2):
                    swipeItem.IconSource = Resources["BitmapIcon"] as IconSource;
                    break;
                case (3):
                    swipeItem.IconSource = Resources["PathIcon"] as IconSource;
                    break;
            }
            swipeItem.Background = new SolidColorBrush(cpBackground.Color);
            switch(cmbBehaviorOnInvoked.SelectedIndex)
            {
                case (0):
                    swipeItem.BehaviorOnInvoked = SwipeBehaviorOnInvoked.Auto;
                    break;
                case (1):
                    swipeItem.BehaviorOnInvoked = SwipeBehaviorOnInvoked.Close;
                    break;
                case (2):
                    swipeItem.BehaviorOnInvoked = SwipeBehaviorOnInvoked.RemainOpen;
                    break;
            }
            SwipeItems swipeItems = null;
            switch (cmbCollection.SelectedIndex)
            {
                case (0):
                    swipeItems = markupSwipeControl.LeftItems;
                    if (swipeItems == null)
                    {
                        swipeItems = new SwipeItems();
                        swipeItems.Add(swipeItem);
                        markupSwipeControl.LeftItems = swipeItems;
                    }
                    else
                    {
                        swipeItems.Add(swipeItem);
                    }
                    break;
                case (1):
                    swipeItems = markupSwipeControl.RightItems;
                    if (swipeItems == null)
                    {
                        swipeItems = new SwipeItems();
                        swipeItems.Add(swipeItem);
                        markupSwipeControl.RightItems = swipeItems;
                    }
                    else
                    {
                        swipeItems.Add(swipeItem);
                    }
                    break;
                case (2):
                    swipeItems = markupSwipeControl.TopItems;
                    if (swipeItems == null)
                    {
                        swipeItems = new SwipeItems();
                        swipeItems.Add(swipeItem);
                        markupSwipeControl.TopItems = swipeItems;
                    }
                    else
                    {
                        swipeItems.Add(swipeItem);
                    }
                    break;
                case (3):
                    swipeItems = markupSwipeControl.BottomItems;
                    if (swipeItems == null)
                    {
                        swipeItems = new SwipeItems();
                        swipeItems.Add(swipeItem);
                        markupSwipeControl.BottomItems = swipeItems;
                    }
                    else
                    {
                        swipeItems.Add(swipeItem);
                    }
                    break;
            }
            switch (cmbMode.SelectedIndex)
            {
                case (0):
                    swipeItems.Mode = SwipeMode.Reveal;
                    break;
                case (1):
                    swipeItems.Mode = SwipeMode.Execute;
                    break;
            }
            resetSwipeItemChoices();
        }

void BtnCancel_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 257 of file SwipeControlPage2.xaml.cs.

        {
            resetSwipeItemChoices();
        }

void BtnClose_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 153 of file SwipeControlPage2.xaml.cs.

        {
            markupSwipeControl.Close();
        }

void BtnGetBottomItems_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 139 of file SwipeControlPage2.xaml.cs.

        {
            if (markupSwipeControl.BottomItems != null)
            {
                tblBottomItems.Text = markupSwipeControl.BottomItems.Count.ToString();
                tblBottomItems.Text += " - ";
                tblBottomItems.Text += markupSwipeControl.BottomItems.Mode.ToString();
            }
            else
            {
                tblBottomItems.Text = "0";
            }
        }

void BtnGetLeftItems_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 100 of file SwipeControlPage2.xaml.cs.

        {
            if (markupSwipeControl.LeftItems != null)
            {
                tblLeftItems.Text = markupSwipeControl.LeftItems.Count.ToString();
                tblLeftItems.Text += " - ";
                tblLeftItems.Text += markupSwipeControl.LeftItems.Mode.ToString();
            }
            else
            {
                tblLeftItems.Text = "0";
            }
        }

void BtnGetRightItems_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 113 of file SwipeControlPage2.xaml.cs.

        {
            if (markupSwipeControl.RightItems != null)
            {
                tblRightItems.Text = markupSwipeControl.RightItems.Count.ToString();
                tblRightItems.Text += " - ";
                tblRightItems.Text += markupSwipeControl.RightItems.Mode.ToString();
            }
            else
            {
                tblRightItems.Text = "0";
            }
        }

void BtnGetTopItems_Click | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 126 of file SwipeControlPage2.xaml.cs.

        {
            if (markupSwipeControl.TopItems != null)
            {
                tblTopItems.Text = markupSwipeControl.TopItems.Count.ToString();
                tblTopItems.Text += " - ";
                tblTopItems.Text += markupSwipeControl.TopItems.Mode.ToString();
            }
            else
            {
                tblTopItems.Text = "0";
            }
        }

void ChkPageMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 84 of file SwipeControlPage2.xaml.cs.

        {
        }

void ChkPageMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 87 of file SwipeControlPage2.xaml.cs.

        {
        }

void ChkSwipeControlProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 31 of file SwipeControlPage2.xaml.cs.

        {
            if(svSwipeControlProperties != null)
            {
                svSwipeControlProperties.Visibility = Visibility.Visible;
            }
        }

void ChkSwipeControlProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 38 of file SwipeControlPage2.xaml.cs.

        {
            if (svSwipeControlProperties != null)
            {
                svSwipeControlProperties.Visibility = Visibility.Collapsed;
            }
        }

void ChkSwipeEvents_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 76 of file SwipeControlPage2.xaml.cs.

        {
        }

void ChkSwipeEvents_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 80 of file SwipeControlPage2.xaml.cs.

        {
        }

void ChkSwipeItemProperties_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 61 of file SwipeControlPage2.xaml.cs.

        {
            if (svSwipeItemProperties != null)
            {
                svSwipeItemProperties.Visibility = Visibility.Visible;
            }
        }

void ChkSwipeItemProperties_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 68 of file SwipeControlPage2.xaml.cs.

        {
            if (svSwipeItemProperties != null)
            {
                svSwipeItemProperties.Visibility = Visibility.Collapsed;
            }
        }

void ChkSwipeMethods_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 46 of file SwipeControlPage2.xaml.cs.

        {
            if (svSwipeControlMethods != null)
            {
                svSwipeControlMethods.Visibility = Visibility.Visible;
            }
        }

void ChkSwipeMethods_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 54 of file SwipeControlPage2.xaml.cs.

        {
            if (svSwipeControlMethods != null)
            {
                svSwipeControlMethods.Visibility = Visibility.Collapsed;
            }
        }

void ChkSwipeTestHooks_Checked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 91 of file SwipeControlPage2.xaml.cs.

        {
        }

void ChkSwipeTestHooks_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 95 of file SwipeControlPage2.xaml.cs.

        {
        }

void resetSwipeItemChoices ( ) [inline, private]

Definition at line 262 of file SwipeControlPage2.xaml.cs.

        {
            cmbCollection.SelectedIndex = 0;
            cmbMode.SelectedIndex = 0;
            txtText.Text = "";
            cmbIcon.SelectedIndex = 0;
            cpBackground.Color = Microsoft.UI.Colors.White;
            cmbBehaviorOnInvoked.SelectedIndex = 0;
        }

void SwipeItemInvoked | ( | SwipeItem | sender,
 |  | SwipeItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 272 of file SwipeControlPage2.xaml.cs.

        {
            // ensures that this method is invoked twice for only one swipe action.
            if (pastSender == sender)
            {
                textBlock.Text = "FailTest";
            }
            else
            {
                textBlock.Text = sender.Text;
            }
            pastSender = sender;

            var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
            peer.RaiseAutomationEvent(AutomationEvents.MenuClosed);
        }

Member Data Documentation

SwipeItem pastSender [private]

Definition at line 25 of file SwipeControlPage2.xaml.cs.

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControl_TestUI/SwipeControlPage2.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • SwipePage
Public Member Functions | Private Member Functions

SwipePage Class Reference

List of all members.

Public Member Functions

SwipePage ()

Private Member Functions

void CmbSwipeControlOutputDebugStringLevel_SelectionChanged (object sender, SelectionChangedEventArgs e)

Detailed Description

Definition at line 17 of file SwipePage.xaml.cs.

Constructor & Destructor Documentation

SwipePage ( ) [inline]

Definition at line 19 of file SwipePage.xaml.cs.

        {
            LogController.InitializeLogging();

            this.InitializeComponent();

            navigateToSimpleContents.Click += delegate { Frame.NavigateWithoutAnimation(typeof(SwipeControlPage), 0); };
            navigateToDynamic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(SwipeControlPage2), 0); };
            navigateToClear.Click += delegate { Frame.NavigateWithoutAnimation(typeof(SwipeControlClearPage), 0); };
        }

Member Function Documentation

void CmbSwipeControlOutputDebugStringLevel_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 30 of file SwipePage.xaml.cs.

        {
            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
                "SwipeControl",
                cmbSwipeControlOutputDebugStringLevel.SelectedIndex == 1 || cmbSwipeControlOutputDebugStringLevel.SelectedIndex == 2,
                cmbSwipeControlOutputDebugStringLevel.SelectedIndex == 2);
        }

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControl_TestUI/SwipePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabDataItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabDataItem
Properties

TabDataItem Class Reference

List of all members.

Properties

String | Content [get, set]
String | Header [get, set]
SymbolIconSource | IconSource [get, set]

Detailed Description

Definition at line 24 of file TabViewPage.xaml.cs.

Property Documentation

String Content [get, set]

Definition at line 28 of file TabViewPage.xaml.cs.

String Header [get, set]

Definition at line 26 of file TabViewPage.xaml.cs.

SymbolIconSource IconSource [get, set]

Definition at line 27 of file TabViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewAxeTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabViewAxeTestPage
Public Member Functions

TabViewAxeTestPage Class Reference

List of all members.

Public Member Functions

TabViewAxeTestPage ()

Detailed Description

Definition at line 7 of file TabViewAxeTestPage.xaml.cs.

Constructor & Destructor Documentation

TabViewAxeTestPage ( ) [inline]

Definition at line 9 of file TabViewAxeTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewAxeTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabViewPage
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

TabViewPage Class Reference

List of all members.

Public Member Functions

TabViewPage ()
void | AddButtonClick (object sender, object e)
void | ChangeShopTextButton_Click (object sender, RoutedEventArgs e)
void | CustomTooltipButton_Click (object sender, RoutedEventArgs e)
void | GetFirstTabLocationButton_Click (object sender, RoutedEventArgs e)
void | GetScrollButtonsVisible_Click (object sender, RoutedEventArgs e)
void | GetScrollDecreaseButtonEnabled_Click (object sender, RoutedEventArgs e)
void | GetScrollIncreaseButtonEnabled_Click (object sender, RoutedEventArgs e)
void | GetTab0ToolTipButton_Click (object sender, RoutedEventArgs e)
void | GetTab1ToolTipButton_Click (object sender, RoutedEventArgs e)
void | GetToolTipStringForUIElement (UIElement item, TextBlock textBlock)
void | IsClosableCheckBox_CheckChanged (object sender, RoutedEventArgs e)
void | IsDisabledTabVisibleCheckBox_CheckChanged (object sender, RoutedEventArgs e)
void | RemoveTabButton_Click (object sender, RoutedEventArgs e)
void | SelectIndexButton_Click (object sender, RoutedEventArgs e)
void | SelectItemButton_Click (object sender, RoutedEventArgs e)
void | SetTabViewWidth_Click (object sender, RoutedEventArgs e)
void | TabViewScrollToTheLeftButton_Click (object sender, RoutedEventArgs e)
void | TabViewScrollToTheMiddleButton_Click (object sender, RoutedEventArgs e)
void | TabViewScrollToTheRightButton_Click (object sender, RoutedEventArgs e)

Protected Member Functions

async override void | OnNavigatedTo (Microsoft.UI.Xaml.Navigation.NavigationEventArgs args)

Private Member Functions

void | CacheFirstTabSelectedBackgroundPathFill ()
void | ClearColorsButton_Click (object sender, RoutedEventArgs e)
void | ClearOverlapCheck_Click (object sender, RoutedEventArgs e)
void | CloseButtonOverlayModeCombobox_SelectionChanged (object sender, SelectionChangedEventArgs e)
FrameworkElement | FindFrameworkElementWithName (string name, DependencyObject startNode)
TabViewItem | FindTabViewItemFromContent (TabView tabView, object content)
void | FirstTab_CloseRequested (object sender, Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs e)
void | GetScrollDecreaseButtonToolTipButton_Click (object sender, RoutedEventArgs e)
void | GetScrollIncreaseButtonToolTipButton_Click (object sender, RoutedEventArgs e)
void | HomeTabOverlapCheck_Click (object sender, RoutedEventArgs e)
void | MultipleTabViewPageButton_Click (object sender, RoutedEventArgs e)
void | OnSecondTabDragStarting (object sender, DragStartingEventArgs e)
void | OnTabDragStarting (object sender, TabViewTabDragStartingEventArgs e)
void | OnTabStripDragOver (object sender, DragEventArgs e)
void | OnTabStripDrop (object sender, DragEventArgs e)
void | SetActiveContentTransparent_Click (object sender, RoutedEventArgs e)
void | SetActiveTabTransparent_Click (object sender, RoutedEventArgs e)
void | SetColorsButton_Click (object sender, RoutedEventArgs e)
void | SetFirstTabSelectedBackgroundPathFill (Brush newBrush)
void | ShortLongTextButton_Click (object sender, RoutedEventArgs e)
void | Tabs_TabItemsChanged (TabView sender, Windows.Foundation.Collections.IVectorChangedEventArgs args)
void | TabViewSelectionChanged (object sender, SelectionChangedEventArgs e)
void | TabViewSizingPageButton_Click (object sender, RoutedEventArgs e)
void | TabViewTabCloseRequested (object sender, Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs e)
void | TabViewTabClosingBehaviorButton_Click (object sender, RoutedEventArgs e)
void | TabViewTabDroppedOutside (object sender, Microsoft.UI.Xaml.Controls.TabViewTabDroppedOutsideEventArgs e)
void | TabViewTabItemsSourcePageButton_Click (object sender, RoutedEventArgs e)
void | TabViewTearOutWindowWithDataItemsButton_Click (object sender, RoutedEventArgs e)
void | TabViewTearOutWindowWithoutDataItemsButton_Click (object sender, RoutedEventArgs e)
void | TabWidthComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

SymbolIconSource | _iconSource
int | _newTabNumber = 1
Brush | activeTabContentBackgroundBrushCache
Brush | activeTabSelectedBackgroundPathBrushCache
Brush | backgroundColorCache
const string | DataIdentifier = "MyTabItem"
const string | DataTabView = "MyTabView"

Detailed Description

Definition at line 32 of file TabViewPage.xaml.cs.

Constructor & Destructor Documentation

TabViewPage ( ) [inline]

Definition at line 37 of file TabViewPage.xaml.cs.

        {
            this.InitializeComponent();

            _iconSource = new SymbolIconSource();
            _iconSource.Symbol = Symbol.Placeholder;

            Tabs.TabItemsChanged += Tabs_TabItemsChanged;

            ObservableCollection<TabDataItem> itemSource = new ObservableCollection<TabDataItem>();
            for (int i = 0; i < 5; i++)
            {
                var item = new TabDataItem();
                item.IconSource = _iconSource;
                item.Header = "Item " + i;
                item.Content = "This is tab " + i + ".";
                itemSource.Add(item);
            }
            DataBindingTabView.TabItemsSource = itemSource;

            backgroundColorCache = BackgroundGrid.Background;
            activeTabContentBackgroundBrushCache = FirstTabContent.Background;
            CacheFirstTabSelectedBackgroundPathFill();
        }

Member Function Documentation

void AddButtonClick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline]

Definition at line 105 of file TabViewPage.xaml.cs.

        {
            if (Tabs != null)
            {
                TabViewItem item = new TabViewItem();
                item.IconSource = _iconSource;
                item.Header = "New Tab " + _newTabNumber;
                item.Content = item.Header;

                Tabs.TabItems.Add(item);

                _newTabNumber++;
            }
        }

void CacheFirstTabSelectedBackgroundPathFill ( ) [inline, private]

Definition at line 492 of file TabViewPage.xaml.cs.

        {
            FrameworkElement selectedBackgroundPath = FindFrameworkElementWithName("SelectedBackgroundPath", FirstTab);
            if(selectedBackgroundPath != null)
            {
                activeTabSelectedBackgroundPathBrushCache = (selectedBackgroundPath as Path).Fill;
            }
        }

void ChangeShopTextButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 145 of file TabViewPage.xaml.cs.

        {
            SecondTab.Header = "Changed";
        }

void ClearColorsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 543 of file TabViewPage.xaml.cs.

        {
            SecondTab.ClearValue(ForegroundProperty);
            SecondTab.ClearValue(BackgroundProperty);
        }

void ClearOverlapCheck_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 473 of file TabViewPage.xaml.cs.

        {
            BackgroundGrid.Background = backgroundColorCache;

            if(activeTabSelectedBackgroundPathBrushCache != null)
            {
                FrameworkElement selectedBackgroundPath = FindFrameworkElementWithName("SelectedBackgroundPath", FirstTab);
                if(selectedBackgroundPath != null)
                {
                    (selectedBackgroundPath as Path).Fill = activeTabSelectedBackgroundPathBrushCache;
                }
            }

            if(activeTabContentBackgroundBrushCache != null)
            {
                FirstTabContent.Background = activeTabContentBackgroundBrushCache;
            }
        }

void CloseButtonOverlayModeCombobox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 213 of file TabViewPage.xaml.cs.

        {
            if (Tabs != null)
            {
                switch (CloseButtonOverlayModeCombobox.SelectedIndex)
                {
                    case 0: Tabs.CloseButtonOverlayMode = Microsoft.UI.Xaml.Controls.TabViewCloseButtonOverlayMode.Auto; break;
                    case 1: Tabs.CloseButtonOverlayMode = Microsoft.UI.Xaml.Controls.TabViewCloseButtonOverlayMode.OnPointerOver; break;
                    case 2: Tabs.CloseButtonOverlayMode = Microsoft.UI.Xaml.Controls.TabViewCloseButtonOverlayMode.Always; break;
                }
            }
        }

void CustomTooltipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 150 of file TabViewPage.xaml.cs.

        {
            ToolTipService.SetToolTip(SecondTab, "Custom");
        }

FrameworkElement FindFrameworkElementWithName | ( | string | name,
 |  | DependencyObject | startNode |
 | ) |  |  | [inline, private]

Definition at line 510 of file TabViewPage.xaml.cs.

        {
            int count = VisualTreeHelper.GetChildrenCount(startNode);
            for (int i = 0; i < count; i++)
            {
                DependencyObject current = VisualTreeHelper.GetChild(startNode, i);
                if ((current.GetType()).Equals(typeof(FrameworkElement)) || (current.GetType().GetTypeInfo().IsSubclassOf(typeof(FrameworkElement))))
                {
                    FrameworkElement fe = (FrameworkElement)current;
                    if(fe.Name == name)
                    {
                        return fe;
                    }
                }
                var result = FindFrameworkElementWithName(name, current);
                if(result != null)
                {
                    return result;
                }
            }
            return null;
        }

TabViewItem FindTabViewItemFromContent | ( | TabView | tabView,
 |  | object | content |
 | ) |  |  | [inline, private]

Definition at line 261 of file TabViewPage.xaml.cs.

        {
            var numItems = tabView.TabItems.Count;
            for (int i = 0; i < numItems; i++)
            {
                var tabItem = tabView.ContainerFromIndex(i) as TabViewItem;
                if (tabItem.Content == content)
                {
                    return tabItem;
                }
            }
            return null;
        }

void FirstTab_CloseRequested | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 239 of file TabViewPage.xaml.cs.

        {
            if ((bool)HandleTabItemCloseRequestedCheckBox.IsChecked)
            {
                Tabs.TabItems.Remove(e.Tab);
            }
        }

void GetFirstTabLocationButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 178 of file TabViewPage.xaml.cs.

        {
            FrameworkElement element = FirstTab as FrameworkElement;
            while (element != null)
            {
                if (element == Tabs)
                {
                    FirstTabLocationTextBlock.Text = "FirstTabView";
                    return;
                }
                if (element == SecondTabView)
                {
                    FirstTabLocationTextBlock.Text = "SecondTabView";
                    return;
                }

                element = VisualTreeHelper.GetParent(element) as FrameworkElement;
            }

            FirstTabLocationTextBlock.Text = "";
        }

void GetScrollButtonsVisible_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 356 of file TabViewPage.xaml.cs.

        {
            var scrollDecrease = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButtonContainer") as FrameworkElement;
            var scrollIncrease = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButtonContainer") as FrameworkElement;
            if(scrollDecrease.Visibility == Visibility.Visible && scrollIncrease.Visibility == Visibility.Visible)
            {
                ScrollButtonsVisible.Text = "True";
            }
            else if(scrollIncrease.Visibility == Visibility.Collapsed && scrollDecrease.Visibility == Visibility.Collapsed)
            {
                ScrollButtonsVisible.Text = "False";
            }
            else
            {
                ScrollButtonsVisible.Text = "Unexpected";
            }
        }

void GetScrollDecreaseButtonEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 392 of file TabViewPage.xaml.cs.

        {
            var scrollDecreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButton") as RepeatButton;
            ScrollDecreaseButtonEnabled.Text = scrollDecreaseButton.IsEnabled ? "True" : "False";
        }

void GetScrollDecreaseButtonToolTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 549 of file TabViewPage.xaml.cs.

        {
            if (VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButton") is RepeatButton scrollDecreaseButton)
            {
                GetToolTipStringForUIElement(scrollDecreaseButton, ScrollDecreaseButtonToolTipTextBlock);
            }
        }

void GetScrollIncreaseButtonEnabled_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 398 of file TabViewPage.xaml.cs.

        {
            var scrollIncreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButton") as RepeatButton;
            ScrollIncreaseButtonEnabled.Text = scrollIncreaseButton.IsEnabled ? "True" : "False";
        }

void GetScrollIncreaseButtonToolTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 557 of file TabViewPage.xaml.cs.

        {
            if (VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButton") is RepeatButton scrollIncreaseButton)
            {
                GetToolTipStringForUIElement(scrollIncreaseButton, ScrollIncreaseButtonToolTipTextBlock);
            }
        }

void GetTab0ToolTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 155 of file TabViewPage.xaml.cs.

        {
            GetToolTipStringForUIElement(FirstTab, Tab0ToolTipTextBlock);
        }

void GetTab1ToolTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 160 of file TabViewPage.xaml.cs.

        {
            GetToolTipStringForUIElement(SecondTab, Tab1ToolTipTextBlock);
        }

void GetToolTipStringForUIElement | ( | UIElement | item,
 |  | TextBlock | textBlock |
 | ) |  |  | [inline]

Definition at line 165 of file TabViewPage.xaml.cs.

        {
            var tooltip = ToolTipService.GetToolTip(item);
            if (tooltip is ToolTip)
            {
                textBlock.Text = (tooltip as ToolTip).Content.ToString();
            }
            else
            {
                textBlock.Text = tooltip.ToString();
            }
        }

void HomeTabOverlapCheck_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 444 of file TabViewPage.xaml.cs.

        {
            var redBrush = new SolidColorBrush();
            redBrush.Color = Colors.Red;
            BackgroundGrid.Background = redBrush;

            var tabBrush = new SolidColorBrush();
            tabBrush.Color = Colors.Blue;
            SetFirstTabSelectedBackgroundPathFill(tabBrush);

            var contentBrush = new SolidColorBrush();
            contentBrush.Color = Colors.Green;
            FirstTabContent.Background = contentBrush;
        }

void IsClosableCheckBox_CheckChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 79 of file TabViewPage.xaml.cs.

        {
            if (FirstTab != null)
            {
                FirstTab.IsClosable = (bool)IsClosableCheckBox.IsChecked;
            }
        }

void IsDisabledTabVisibleCheckBox_CheckChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 87 of file TabViewPage.xaml.cs.

        {
            if (Tabs != null && DisabledTab != null)
            {
                var isVisible = (bool)IsDisabledTabVisibleCheckBox.IsChecked;
                if (isVisible && !Tabs.TabItems.Contains(DisabledTab))
                {
                    // Let's insert the DisabledTab just after NotCloseableTab
                    var n = Tabs.TabItems.IndexOf(NotCloseableTab) + 1;
                    Tabs.TabItems.Insert(n, DisabledTab);
                }
                else
                {
                    Tabs.TabItems.Remove(DisabledTab);
                }
            }
        }

void MultipleTabViewPageButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 419 of file TabViewPage.xaml.cs.

        {
            this.Frame.Navigate(typeof(MultipleTabViewPage));
        }

async override void OnNavigatedTo ( Microsoft.UI.Xaml.Navigation.NavigationEventArgs args ) [inline, protected]

Definition at line 66 of file TabViewPage.xaml.cs.

        {
            NotCloseableTab.Visibility = Visibility.Collapsed;
            await Task.Delay(TimeSpan.FromMilliseconds(1));
            NotCloseableTab.Visibility = Visibility.Visible;
        }

void OnSecondTabDragStarting | ( | object | sender,
 |  | DragStartingEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 565 of file TabViewPage.xaml.cs.

        {
            TabDraggedResultsTextBlock.Text = "SecondTab dragged";
            e.DragUI.SetContentFromBitmapImage(new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:///Assets/ingredient2.png")));
        }

void OnTabDragStarting | ( | object | sender,
 |  | TabViewTabDragStartingEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 275 of file TabViewPage.xaml.cs.

        {
            // Set the drag data to the tab
            e.Data.Properties.Add(DataIdentifier, e.Tab);
            e.Data.Properties.Add(DataTabView, sender as TabView);

            // And indicate that we can move it
            e.Data.RequestedOperation = DataPackageOperation.Move;
        }

void OnTabStripDragOver | ( | object | sender,
 |  | DragEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 285 of file TabViewPage.xaml.cs.

        {
            if (e.DataView.Properties.ContainsKey(DataIdentifier))
            {
                e.AcceptedOperation = DataPackageOperation.Move;
            }
        }

void OnTabStripDrop | ( | object | sender,
 |  | DragEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 293 of file TabViewPage.xaml.cs.

        {
            // This event is called when we're dragging between different TabViews
            // It is responsible for handling the drop of the item into the second TabView

            object obj;
            object objOriginTabView;
            if (e.DataView.Properties.TryGetValue(DataIdentifier, out obj) && e.DataView.Properties.TryGetValue(DataTabView, out objOriginTabView))
            {
                // TODO - BUG: obj should never be null, but occassionally is. Why?
                if (obj == null || objOriginTabView == null)
                {
                    return;
                }

                var originTabView = objOriginTabView as TabView;
                var destinationTabView = sender as TabView;
                var destinationItems = destinationTabView.TabItems;
                var tabViewItem = obj as TabViewItem;

                if (destinationItems != null)
                {
                    // First we need to get the position in the List to drop to
                    var index = -1;

                    // Determine which items in the list our pointer is inbetween.
                    for (int i = 0; i < destinationTabView.TabItems.Count; i++)
                    {
                        var item = destinationTabView.ContainerFromIndex(i) as TabViewItem;

                        if (e.GetPosition(item).X - item.ActualWidth < 0)
                        {
                            index = i;
                            break;
                        }
                    }

                    // Remove item from the old TabView
                    originTabView.TabItems.Remove(tabViewItem);

                    if (index < 0)
                    {
                        // We didn't find a transition point, so we're at the end of the list
                        destinationItems.Add(tabViewItem);
                    }
                    else if (index < destinationTabView.TabItems.Count)
                    {
                        // Otherwise, insert at the provided index.
                        destinationItems.Insert(index, tabViewItem);
                    }

                    // Select the newly dragged tab
                    destinationTabView.SelectedItem = tabViewItem;
                }
            }
        }

void RemoveTabButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 120 of file TabViewPage.xaml.cs.

        {
            if (Tabs != null && Tabs.TabItems.Count > 0)
            {
                Tabs.TabItems.RemoveAt(Tabs.TabItems.Count - 1);
            }
        }

void SelectIndexButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 137 of file TabViewPage.xaml.cs.

        {
            if (Tabs != null)
            {
                Tabs.SelectedIndex = 2;
            }
        }

void SelectItemButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 129 of file TabViewPage.xaml.cs.

        {
            if (Tabs != null)
            {
                Tabs.SelectedItem = Tabs.TabItems[1];
            }
        }

void SetActiveContentTransparent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 466 of file TabViewPage.xaml.cs.

        {
            var contentBrush = new SolidColorBrush();
            contentBrush.Color = Colors.Transparent;
            FirstTabContent.Background = contentBrush;
        }

void SetActiveTabTransparent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 459 of file TabViewPage.xaml.cs.

        {
            var tabBrush = new SolidColorBrush();
            tabBrush.Color = Colors.Transparent;
            SetFirstTabSelectedBackgroundPathFill(tabBrush);
        }

void SetColorsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 533 of file TabViewPage.xaml.cs.

        {
            var foregroundBrush = new SolidColorBrush();
            foregroundBrush.Color = Colors.Blue;
            SecondTab.Foreground = foregroundBrush;
            var backgroundBrush = new SolidColorBrush();
            backgroundBrush.Color = Colors.Purple;
            SecondTab.Background = backgroundBrush;
        }

void SetFirstTabSelectedBackgroundPathFill ( Brush newBrush ) [inline, private]

Definition at line 501 of file TabViewPage.xaml.cs.

        {
            FrameworkElement selectedBackgroundPath = FindFrameworkElementWithName("SelectedBackgroundPath", FirstTab);
            if(selectedBackgroundPath != null)
            {
                (selectedBackgroundPath as Path).Fill = newBrush;
            }
        }

void SetTabViewWidth_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 350 of file TabViewPage.xaml.cs.

        {
            // This is the smallest width that fits our content without any scrolling.
            Tabs.Width = 752;
        }

void ShortLongTextButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 438 of file TabViewPage.xaml.cs.

        {
            FirstTab.Header = "s";
            LongHeaderTab.Header = "long long long long long long long long";
        }

void Tabs_TabItemsChanged | ( | TabView | sender,
 |  | Windows.Foundation.Collections.IVectorChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 73 of file TabViewPage.xaml.cs.

        {
            TabsItemChangedEventArgsTextBlock.Text = args.CollectionChange.ToString();
            TabsItemChangedEventArgsIndexTextBlock.Text = args.Index.ToString();
        }

void TabViewScrollToTheLeftButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 374 of file TabViewPage.xaml.cs.

        {
            var scrollViewer = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
            scrollViewer.ChangeView(0, null, null, true);
        }

void TabViewScrollToTheMiddleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 380 of file TabViewPage.xaml.cs.

        {
            var scrollViewer = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
            scrollViewer.ChangeView(scrollViewer.ScrollableWidth / 2.0f, null, null, true);
        }

void TabViewScrollToTheRightButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 386 of file TabViewPage.xaml.cs.

        {
            var scrollViewer = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
            scrollViewer.ChangeView(double.MaxValue, null, null, true);
        }

void TabViewSelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 226 of file TabViewPage.xaml.cs.

        {
            SelectedIndexTextBlock.Text = Tabs.SelectedIndex.ToString();
        }

void TabViewSizingPageButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 404 of file TabViewPage.xaml.cs.

        {
            this.Frame.Navigate(typeof(TabViewSizingPage));
        }

void TabViewTabCloseRequested | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 231 of file TabViewPage.xaml.cs.

        {
            if ((bool)HandleTabCloseRequestedCheckBox.IsChecked)
            {
                Tabs.TabItems.Remove(e.Tab);
            }
        }

void TabViewTabClosingBehaviorButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 409 of file TabViewPage.xaml.cs.

        {
            this.Frame.Navigate(typeof(TabViewTabClosingBehaviorPage));
        }

void TabViewTabDroppedOutside | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.TabViewTabDroppedOutsideEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 247 of file TabViewPage.xaml.cs.

        {
            TabViewItem tab = e.Tab;
            if (tab != null)
            {
                TabDroppedOutsideTextBlock.Text = tab.Header.ToString();
            }
        }

void TabViewTabItemsSourcePageButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 414 of file TabViewPage.xaml.cs.

        {
            this.Frame.Navigate(typeof(TabViewTabItemsSourcePage));
        }

void TabViewTearOutWindowWithDataItemsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 424 of file TabViewPage.xaml.cs.

        {
            TabViewTearOutWindowWithDataItems newWindow = new() { ExtendsContentIntoTitleBar = true };
            newWindow.AppWindow.Resize(TabViewTearOutWindowWithDataItems.DefaultWindowSize);
            newWindow.Activate();
        }

void TabViewTearOutWindowWithoutDataItemsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 431 of file TabViewPage.xaml.cs.

        {
            TabViewTearOutWindowWithoutDataItems newWindow = new() { ExtendsContentIntoTitleBar = true };
            newWindow.AppWindow.Resize(TabViewTearOutWindowWithoutDataItems.DefaultWindowSize);
            newWindow.Activate();
        }

void TabWidthComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 200 of file TabViewPage.xaml.cs.

        {
            if (Tabs != null)
            {
                switch (TabWidthComboBox.SelectedIndex)
                {
                    case 0: Tabs.TabWidthMode = Microsoft.UI.Xaml.Controls.TabViewWidthMode.Equal; break;
                    case 1: Tabs.TabWidthMode = Microsoft.UI.Xaml.Controls.TabViewWidthMode.SizeToContent; break;
                    case 2: Tabs.TabWidthMode = Microsoft.UI.Xaml.Controls.TabViewWidthMode.Compact; break;
                }
            }
        }

Member Data Documentation

SymbolIconSource _iconSource [private]

Definition at line 35 of file TabViewPage.xaml.cs.

int _newTabNumber = 1 [private]

Definition at line 34 of file TabViewPage.xaml.cs.

Brush activeTabContentBackgroundBrushCache [private]

Definition at line 64 of file TabViewPage.xaml.cs.

Brush activeTabSelectedBackgroundPathBrushCache [private]

Definition at line 63 of file TabViewPage.xaml.cs.

Brush backgroundColorCache [private]

Definition at line 62 of file TabViewPage.xaml.cs.

const string DataIdentifier = "MyTabItem" [private]

Definition at line 258 of file TabViewPage.xaml.cs.

const string DataTabView = "MyTabView" [private]

Definition at line 259 of file TabViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewSizingPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabViewSizingPage
Public Member Functions | Private Member Functions | Private Attributes

TabViewSizingPage Class Reference

List of all members.

Public Member Functions

TabViewSizingPage ()

Private Member Functions

void | GetWidthsButton_Click (object sender, object args)
void | SetLargeWidth_Click (object sender, object args)
void | SetSmallWidth_Click (object sender, object args)
void | Tabs_TabCloseRequested (TabView sender, TabViewTabCloseRequestedEventArgs e)
void | Tabview_AddTabButtonClick (TabView sender, object args)

Private Attributes

int | _newTabNumber = 1

Detailed Description

Definition at line 16 of file TabViewSizingPage.xaml.cs.

Constructor & Destructor Documentation

TabViewSizingPage ( ) [inline]

Definition at line 18 of file TabViewSizingPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void GetWidthsButton_Click | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 35 of file TabViewSizingPage.xaml.cs.

        {
            WidthEqualText.Text = TabViewEqual.ActualWidth.ToString();
            WidthSizeToContentText.Text = TabViewSizeToContent.ActualWidth.ToString();
        }

void SetLargeWidth_Click | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 30 of file TabViewSizingPage.xaml.cs.

        {
            LayoutRoot.Width = 800;
        }

void SetSmallWidth_Click | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 25 of file TabViewSizingPage.xaml.cs.

        {
            LayoutRoot.Width = 500;
        }

void Tabs_TabCloseRequested | ( | TabView | sender,
 |  | TabViewTabCloseRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 51 of file TabViewSizingPage.xaml.cs.

        {
            sender.TabItems.Remove(e.Tab);
        }

void Tabview_AddTabButtonClick | ( | TabView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 41 of file TabViewSizingPage.xaml.cs.

        {
            TabViewItem item = new TabViewItem();
            item.IconSource = new Microsoft.UI.Xaml.Controls.SymbolIconSource { Symbol = Symbol.Accept };
            item.Header = "New Tab " + _newTabNumber++;
            item.Content = item.Header;

            sender.TabItems.Add(item);
        }

Member Data Documentation

int _newTabNumber = 1 [private]

Definition at line 23 of file TabViewSizingPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewSizingPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabClosingBehaviorPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabViewTabClosingBehaviorPage
Public Member Functions | Private Member Functions | Private Attributes

TabViewTabClosingBehaviorPage Class Reference

An empty page that can be used on its own or navigated to within a Frame.

List of all members.

Public Member Functions

TabViewTabClosingBehaviorPage ()
void | AddButtonClick (object sender, object e)
void | GetActualWidthsButton_Click (object sender, RoutedEventArgs e)
void | GetFirstItemWidthButton_Click (object sender, RoutedEventArgs e)
void | IncreaseScrollButton_Click (object sender, RoutedEventArgs e)

Private Member Functions

void | RemoveLastItem_Click (object sender, RoutedEventArgs e)
void | RemoveMiddleItem_Click (object sender, RoutedEventArgs e)
void | TabViewTabCloseRequested (object sender, Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs e)

Private Attributes

int | _newTabNumber = 0

Detailed Description

Definition at line 25 of file TabViewTabClosingBehaviorPage.xaml.cs.

Constructor & Destructor Documentation

TabViewTabClosingBehaviorPage ( ) [inline]

Definition at line 29 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void AddButtonClick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline]

Definition at line 34 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            if (Tabs != null)
            {
                TabViewItem item = new TabViewItem();
                item.Header = "New Tab " + _newTabNumber;
                item.Content = item.Header;

                Tabs.TabItems.Add(item);

                _newTabNumber++;
            }
        }

void GetActualWidthsButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 74 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            // This is the smallest width that fits our content without any scrolling.
            TabViewWidth.Text = Tabs.ActualWidth.ToString();

            // Header width
            TabViewHeaderWidth.Text = Tab0.Width.ToString();
        }

void GetFirstItemWidthButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 66 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            // This is the smallest width that fits our content without any scrolling.
            TabViewWidth.Text = Tabs.ActualWidth.ToString();

            // Header width
            TabViewHeaderWidth.Text = Tab0.Width.ToString();
        }

void IncreaseScrollButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline]

Definition at line 83 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            var sv = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
            sv.ChangeView(10000, null, null, disableAnimation: true);
        }

void RemoveLastItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 94 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            Tabs.TabItems.RemoveAt(Tabs.TabItems.Count - 1);
        }

void RemoveMiddleItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            Tabs.TabItems.RemoveAt(1);
        }

void TabViewTabCloseRequested | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file TabViewTabClosingBehaviorPage.xaml.cs.

        {
            Tabs.TabItems.Remove(e.Tab);

            TabViewWidth.Text = Tabs.ActualWidth.ToString();
            TabViewHeaderWidth.Text = Tab0.Width.ToString();

            var scrollButtonStateValue = "";

            var scrollIncreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButton") as RepeatButton;
            var scrollDecreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButton") as RepeatButton;

            scrollButtonStateValue += scrollIncreaseButton.IsEnabled + ";";
            scrollButtonStateValue += scrollDecreaseButton.IsEnabled + ";";

            ScrollButtonStatus.Text = scrollButtonStateValue;
        }

Member Data Documentation

int _newTabNumber = 0 [private]

Definition at line 27 of file TabViewTabClosingBehaviorPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewTabClosingBehaviorPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabItemsSourcePage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabViewTabItemsSourcePage
Public Member Functions | Private Member Functions | Private Attributes

TabViewTabItemsSourcePage Class Reference

List of all members.

Public Member Functions

TabViewTabItemsSourcePage ()

Private Member Functions

void | ChkAllowDrop_Checked (object sender, RoutedEventArgs e)
void | ChkAllowDrop_Unchecked (object sender, RoutedEventArgs e)
void | ChkCanDrag_Checked (object sender, RoutedEventArgs e)
void | ChkCanDrag_Unchecked (object sender, RoutedEventArgs e)
void | ChkCanDragItems_Checked (object sender, RoutedEventArgs e)
void | ChkCanDragItems_Unchecked (object sender, RoutedEventArgs e)
void | ChkCanReorderItems_Checked (object sender, RoutedEventArgs e)
void | ChkCanReorderItems_Unchecked (object sender, RoutedEventArgs e)
MyData | CreateNewMyData (int index)
void | InitializeDataBindingSampleData ()
void | TabViewItemsSourceSample_AddTabButtonClick (TabView sender, object args)
void | TabViewItemsSourceSample_TabCloseRequested (TabView sender, TabViewTabCloseRequestedEventArgs args)
void | TabViewItemsSourceSample_TabItemsChanged (TabView sender, IVectorChangedEventArgs args)
void | TabViewTabItemsSourcePage_Loaded (object sender, RoutedEventArgs e)

Private Attributes

const int | initialTabsCount = 3
ListView | innerListView = null
ObservableCollection< MyData > | myDatas

Detailed Description

Definition at line 18 of file TabViewTabItemsSourcePage.xaml.cs.

Constructor & Destructor Documentation

TabViewTabItemsSourcePage ( ) [inline]

Definition at line 24 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += TabViewTabItemsSourcePage_Loaded;
            TabViewItemsSourceSample.TabItemsChanged += TabViewItemsSourceSample_TabItemsChanged;

            InitializeDataBindingSampleData();
        }

Member Function Documentation

void ChkAllowDrop_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 104 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.AllowDrop = true;
            }
        }

void ChkAllowDrop_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 112 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.AllowDrop = false;
            }
        }

void ChkCanDrag_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 88 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.CanDrag = true;
            }
        }

void ChkCanDrag_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 96 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.CanDrag = false;
            }
        }

void ChkCanDragItems_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.CanDragItems = true;
            }
        }

void ChkCanDragItems_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 64 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.CanDragItems = false;
            }
        }

void ChkCanReorderItems_Checked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 72 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.CanReorderItems = true;
            }
        }

void ChkCanReorderItems_Unchecked | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 80 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            if (innerListView != null)
            {
                innerListView.CanReorderItems = false;
            }
        }

MyData CreateNewMyData ( int index ) [inline, private]

Definition at line 130 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            var textBlock = new TextBlock();
            textBlock.Text = "Sample" + index;

            var newData = new MyData
            {
                DataHeader = $"MyData {index}",
                DataIconSource = new Microsoft.UI.Xaml.Controls.SymbolIconSource() { Symbol = Symbol.Caption + index },
                DataContent = textBlock
            };

            return newData;
        }

void InitializeDataBindingSampleData ( ) [inline, private]

Definition at line 120 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            myDatas = new ObservableCollection<MyData>();

            for (int index = 0; index < initialTabsCount; index++)
            {
                myDatas.Add(CreateNewMyData(index));
            }
        }

void TabViewItemsSourceSample_AddTabButtonClick | ( | TabView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 145 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            // Add a new MyData item to the collection. TabView automatically generates a TabViewItem.
            myDatas.Add(CreateNewMyData(myDatas.Count));
        }

void TabViewItemsSourceSample_TabCloseRequested | ( | TabView | sender,
 |  | TabViewTabCloseRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 151 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            // Remove the requested MyData object from the collection.
            myDatas.Remove(args.Item as MyData);
        }

void TabViewItemsSourceSample_TabItemsChanged | ( | TabView | sender,
 |  | IVectorChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 34 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            tblIVectorChangedEventArgsCollectionChange.Text = args.CollectionChange.ToString();
            tblIVectorChangedEventArgsIndex.Text = args.Index.ToString();
        }

void TabViewTabItemsSourcePage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 40 of file TabViewTabItemsSourcePage.xaml.cs.

        {
            innerListView = TabViewItemsSourceSample.FindVisualChildByType<ListView>();

            for (int tabIndex = 0; tabIndex < initialTabsCount; tabIndex++)
            {
                var tabViewItem = TabViewItemsSourceSample.ContainerFromIndex(tabIndex) as TabViewItem;

                if (tabViewItem != null)
                {
                    tabViewItem.Name = "tabViewItem" + tabIndex;
                    AutomationProperties.SetName(tabViewItem, tabViewItem.Name);
                }
            }
        }

Member Data Documentation

const int initialTabsCount = 3 [private]

Definition at line 20 of file TabViewTabItemsSourcePage.xaml.cs.

ListView innerListView = null [private]

Definition at line 21 of file TabViewTabItemsSourcePage.xaml.cs.

ObservableCollection<MyData> myDatas [private]

Definition at line 22 of file TabViewTabItemsSourcePage.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewTabItemsSourcePage.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTearOutWindowWithDataItems Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabViewTearOutWindowWithDataItems
Public Member Functions | Static Public Attributes | Properties | Private Member Functions

TabViewTearOutWindowWithDataItems Class Reference

Inherits Microsoft::Windows::Apps::Test::Foundation::Controls::Window.

List of all members.

Public Member Functions

TabViewTearOutWindowWithDataItems ()

Static Public Attributes

static readonly SizeInt32 | DefaultWindowSize = new(1000, 300)

Properties

ObservableCollection< object > | StringList [get, set]

Private Member Functions

void | OnExternalTornOutTabsDropped (TabView _, TabViewExternalTornOutTabsDroppedEventArgs args)
void | OnExternalTornOutTabsDropping (TabView _, TabViewExternalTornOutTabsDroppingEventArgs args)
void | OnTabTearOutRequested (TabView _, TabViewTabTearOutRequestedEventArgs args)
void | OnTabTearOutWindowRequested (TabView _, TabViewTabTearOutWindowRequestedEventArgs args)

Detailed Description

Definition at line 17 of file TabViewTearOutWindowWithDataItems.xaml.cs.

Constructor & Destructor Documentation

TabViewTearOutWindowWithDataItems ( ) [inline]

Definition at line 23 of file TabViewTearOutWindowWithDataItems.xaml.cs.

        {
            this.InitializeComponent();

            StringList = [
                "Document 1",
                "Document 2",
                "Document 3",
            ];

            Title = "MUXControlsTestApp.Desktop - Secondary TabViewTearOutWindow";
        }

Member Function Documentation

void OnExternalTornOutTabsDropped | ( | TabView | _,
 |  | TabViewExternalTornOutTabsDroppedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 70 of file TabViewTearOutWindowWithDataItems.xaml.cs.

        {
            for (int i = 0; i < args.Items.Length; i++)
            {
                int index = StringList.IndexOf(args.Items[i]);

                if (index >= 0)
                {
                    StringList.RemoveAt(index);
                }
            }

            for (int i = 0; i < args.Items.Length; i++)
            {
                StringList.Insert(Math.Min(args.DropIndex + i, StringList.Count), args.Items[i]);
            }
        }

void OnExternalTornOutTabsDropping | ( | TabView | _,
 |  | TabViewExternalTornOutTabsDroppingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 63 of file TabViewTearOutWindowWithDataItems.xaml.cs.

        {
            args.AllowDrop = true;
        }

void OnTabTearOutRequested | ( | TabView | _,
 |  | TabViewTabTearOutRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 47 of file TabViewTearOutWindowWithDataItems.xaml.cs.

        {
            for (int i = 0; i < args.Items.Length; i++)
            {
                int index = StringList.IndexOf(args.Items[i]);

                if (index >= 0)
                {
                    StringList.RemoveAt(index);
                }
            }
        }

void OnTabTearOutWindowRequested | ( | TabView | _,
 |  | TabViewTabTearOutWindowRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 38 of file TabViewTearOutWindowWithDataItems.xaml.cs.

        {
            TabViewTearOutWindowWithDataItems newWindow = new() { StringList = [.. args.Items], ExtendsContentIntoTitleBar = true };
            newWindow.AppWindow.Hide();
            newWindow.AppWindow.Resize(DefaultWindowSize);
            args.NewWindowId = newWindow.AppWindow.Id;
        }

Member Data Documentation

readonly SizeInt32 DefaultWindowSize = new(1000, 300) [static]

Definition at line 19 of file TabViewTearOutWindowWithDataItems.xaml.cs.

Property Documentation

ObservableCollection<object> StringList [get, set]

Definition at line 21 of file TabViewTearOutWindowWithDataItems.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewTearOutWindowWithDataItems.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTearOutWindowWithoutDataItems Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TabViewTearOutWindowWithoutDataItems
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

TabViewTearOutWindowWithoutDataItems Class Reference

Inherits Microsoft::Windows::Apps::Test::Foundation::Controls::Window.

List of all members.

Public Member Functions

TabViewTearOutWindowWithoutDataItems ()

Static Public Attributes

static readonly SizeInt32 | DefaultWindowSize = new(1000, 300)

Private Member Functions

void | OnExternalTornOutTabsDropped (TabView tabView, TabViewExternalTornOutTabsDroppedEventArgs args)
void | OnExternalTornOutTabsDropping (TabView _, TabViewExternalTornOutTabsDroppingEventArgs args)
void | OnTabTearOutRequested (TabView tabView, TabViewTabTearOutRequestedEventArgs args)
void | OnTabTearOutWindowRequested (TabView _, TabViewTabTearOutWindowRequestedEventArgs args)

Private Attributes

TabViewTearOutWindowWithoutDataItems tearOutWindow

Detailed Description

Definition at line 12 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

Constructor & Destructor Documentation

TabViewTearOutWindowWithoutDataItems ( ) [inline]

Definition at line 18 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

        {
            this.InitializeComponent();
            Title = "MUXControlsTestApp.Desktop - Secondary TabViewTearOutWindow";
        }

Member Function Documentation

void OnExternalTornOutTabsDropped | ( | TabView | tabView,
 |  | TabViewExternalTornOutTabsDroppedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 55 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

        {
            int insertionIndex = args.DropIndex;

            foreach (var tab in args.Tabs.Cast<TabViewItem>())
            {
                TabView otherTabView = null;
                DependencyObject current = tab;

                while (otherTabView == null)
                {
                    if (current is TabView foundTabView)
                    {
                        otherTabView = foundTabView;
                    }

                    current = VisualTreeHelper.GetParent(current);
                }

                otherTabView?.TabItems.Remove(tab);
                tabView.TabItems.Insert(insertionIndex++, tab);
            }
        }

void OnExternalTornOutTabsDropping | ( | TabView | _,
 |  | TabViewExternalTornOutTabsDroppingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 48 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

        {
            args.AllowDrop = true;
        }

void OnTabTearOutRequested | ( | TabView | tabView,
 |  | TabViewTabTearOutRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 36 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

        {
            foreach (var tab in args.Tabs.Cast<TabViewItem>())
            {
                tabView.TabItems.Remove(tab);
                tearOutWindow.TearOutTabsTabView.TabItems.Add(tab);
            }
        }

void OnTabTearOutWindowRequested | ( | TabView | _,
 |  | TabViewTabTearOutWindowRequestedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 26 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

        {
            tearOutWindow = new() { ExtendsContentIntoTitleBar = true };
            tearOutWindow.TearOutTabsTabView.TabItems.Clear();
            tearOutWindow.AppWindow.Hide();
            tearOutWindow.AppWindow.Resize(DefaultWindowSize);
            args.NewWindowId = tearOutWindow.AppWindow.Id;
        }

Member Data Documentation

readonly SizeInt32 DefaultWindowSize = new(1000, 300) [static]

Definition at line 14 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

TabViewTearOutWindowWithoutDataItems tearOutWindow [private]

Definition at line 16 of file TabViewTearOutWindowWithoutDataItems.xaml.cs.

The documentation for this class was generated from the following file:
  • TabView/TestUI/TabViewTearOutWindowWithoutDataItems.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TargetElement Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TargetElement
Public Member Functions | Protected Member Functions

TargetElement Class Reference

List of all members.

Public Member Functions

TargetElement ()

Protected Member Functions

override AutomationPeer OnCreateAutomationPeer ()

Detailed Description

Definition at line 24 of file TargetElement.xaml.cs.

Constructor & Destructor Documentation

TargetElement ( ) [inline]

Definition at line 26 of file TargetElement.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

override AutomationPeer OnCreateAutomationPeer ( ) [inline, protected]

Definition at line 31 of file TargetElement.xaml.cs.

        {
            return new FrameworkElementAutomationPeer(this);
        }

The documentation for this class was generated from the following file:
  • Interactions/ButtonInteraction/TestUI/TargetElement.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipCaseBundle Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TeachingTipCaseBundle
Public Member Functions

TeachingTipCaseBundle Class Reference

List of all members.

Public Member Functions

TeachingTipCaseBundle ()

Detailed Description

Definition at line 7 of file TeachingTipCaseBundle.xaml.cs.

Constructor & Destructor Documentation

TeachingTipCaseBundle ( ) [inline]

Definition at line 9 of file TeachingTipCaseBundle.xaml.cs.

        {
            InitializeComponent();

            TeachingTipPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(TeachingTipPage), 0); };
            TeachingTipFocusPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(TeachingTipFocusPage), 0); };
            TeachingTipInXamlPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(TeachingTipInXamlPage), 0); };
        }

The documentation for this class was generated from the following file:
  • TeachingTip/TestUI/TeachingTipCaseBundle.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipFocusPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TeachingTipFocusPage
Public Member Functions | Private Member Functions

TeachingTipFocusPage Class Reference

List of all members.

Public Member Functions

TeachingTipFocusPage ()

Private Member Functions

void | ChangeTestFrameVisibility (Visibility visibility)
void | CloseTeachingTipButton_Click (object sender, RoutedEventArgs e)
void | OnLoaded (object sender, RoutedEventArgs e)
void | OpenTeachingTipButton_Click (object sender, RoutedEventArgs e)
void | TeachingTipTestHooks_IdleStatusChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_OpenedStatusChanged (TeachingTip sender, object args)

Detailed Description

Definition at line 10 of file TeachingTipFocusPage.xaml.cs.

Constructor & Destructor Documentation

TeachingTipFocusPage ( ) [inline]

Definition at line 12 of file TeachingTipFocusPage.xaml.cs.

        {
            this.InitializeComponent();
            TeachingTipTestHooks.IdleStatusChanged += TeachingTipTestHooks_IdleStatusChanged;
            TeachingTipTestHooks.OpenedStatusChanged += TeachingTipTestHooks_OpenedStatusChanged;

            this.Loaded += OnLoaded;
        }

Member Function Documentation

void ChangeTestFrameVisibility ( Visibility visibility ) [inline, private]

Definition at line 26 of file TeachingTipFocusPage.xaml.cs.

        {
            var testFrame = this.Frame as TestFrame;
            testFrame?.ChangeBarVisibility(visibility);
        }

void CloseTeachingTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 37 of file TeachingTipFocusPage.xaml.cs.

        {
            this.TestTeachingTip.IsOpen = false;
        }

void OnLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 21 of file TeachingTipFocusPage.xaml.cs.

        {
            ChangeTestFrameVisibility(Visibility.Collapsed);
        }

void OpenTeachingTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 32 of file TeachingTipFocusPage.xaml.cs.

        {
            this.TestTeachingTip.IsOpen = true;
        }

void TeachingTipTestHooks_IdleStatusChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 54 of file TeachingTipFocusPage.xaml.cs.

        {
            if (TeachingTipTestHooks.GetIsIdle(this.TestTeachingTip))
            {
                this.IsIdleCheckBox.IsChecked = true;
            }
            else
            {
                this.IsIdleCheckBox.IsChecked = false;
            }
        }

void TeachingTipTestHooks_OpenedStatusChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 42 of file TeachingTipFocusPage.xaml.cs.

        {
            if (this.TestTeachingTip.IsOpen)
            {
                this.IsOpenCheckBox.IsChecked = true;
            }
            else
            {
                this.IsOpenCheckBox.IsChecked = false;
            }
        }

The documentation for this class was generated from the following file:
  • TeachingTip/TestUI/TeachingTipFocusPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipInXamlPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TeachingTipInXamlPage
Public Member Functions | Private Member Functions

TeachingTipInXamlPage Class Reference

List of all members.

Public Member Functions

TeachingTipInXamlPage ()

Private Member Functions

void | CloseTeachingTipButton_Click (object sender, RoutedEventArgs e)
void | OpenTeachingTipButton_Click (object sender, RoutedEventArgs e)
void | TeachingTipTestHooks_IdleStatusChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_OpenedStatusChanged (TeachingTip sender, object args)

Detailed Description

Definition at line 10 of file TeachingTipInXamlPage.xaml.cs.

Constructor & Destructor Documentation

TeachingTipInXamlPage ( ) [inline]

Definition at line 12 of file TeachingTipInXamlPage.xaml.cs.

        {
            this.InitializeComponent();
            TeachingTipTestHooks.IdleStatusChanged += TeachingTipTestHooks_IdleStatusChanged;
            TeachingTipTestHooks.OpenedStatusChanged += TeachingTipTestHooks_OpenedStatusChanged;
        }

Member Function Documentation

void CloseTeachingTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 24 of file TeachingTipInXamlPage.xaml.cs.

        {
            this.TestTeachingTip.IsOpen = false;
        }

void OpenTeachingTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 19 of file TeachingTipInXamlPage.xaml.cs.

        {
            this.TestTeachingTip.IsOpen = true;
        }

void TeachingTipTestHooks_IdleStatusChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 41 of file TeachingTipInXamlPage.xaml.cs.

        {
            if (TeachingTipTestHooks.GetIsIdle(this.TestTeachingTip))
            {
                this.IsIdleCheckBox.IsChecked = true;
            }
            else
            {
                this.IsIdleCheckBox.IsChecked = false;
            }
        }

void TeachingTipTestHooks_OpenedStatusChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 29 of file TeachingTipInXamlPage.xaml.cs.

        {
            if (this.TestTeachingTip.IsOpen)
            {
                this.IsOpenCheckBox.IsChecked = true;
            }
            else
            {
                this.IsOpenCheckBox.IsChecked = false;
            }
        }

The documentation for this class was generated from the following file:
  • TeachingTip/TestUI/TeachingTipInXamlPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TeachingTipPage
Public Member Functions | Protected Member Functions | Properties | Events | Private Member Functions | Private Attributes

TeachingTipPage Class Reference

List of all members.

Public Member Functions

TeachingTipPage ()
string | BrushToString (Brush brush)
void | ContentElevationSliderChanged (object sender, RangeBaseValueChangedEventArgs args)
void | GetEdgeTeachingTipOffset_Clicked (object sender, RoutedEventArgs args)
void | OnBringTargetIntoViewButtonClicked (object sender, RoutedEventArgs args)
void | OnCloseButtonClicked (object sender, RoutedEventArgs args)
void | OnGetTargetBoundsButtonClicked (object sender, RoutedEventArgs args)
void | OnReturnTopForOutOfWindowPlacementCheckBoxChecked (object sender, RoutedEventArgs args)
void | OnReturnTopForOutOfWindowPlacementCheckBoxUnchecked (object sender, RoutedEventArgs args)
void | OnSetActionButtonContentButtonClicked (object sender, RoutedEventArgs args)
void | OnSetAnimationDurationsButtonClicked (object sender, RoutedEventArgs args)
void | OnSetAnimationParametersButtonClicked (object sender, RoutedEventArgs args)
void | OnSetAutomationNameButtonClicked (object sender, RoutedEventArgs args)
void | OnSetBleeingImagePlacementButtonClicked (object sender, RoutedEventArgs args)
void | OnSetCloseButtonContentButtonClicked (object sender, RoutedEventArgs args)
void | OnSetContentButtonClicked (object sender, RoutedEventArgs args)
void | OnSetHeroContentButtonClicked (object sender, RoutedEventArgs args)
void | OnSetIconButtonClicked (object sender, RoutedEventArgs args)
void | OnSetIsLightDismissEnabledButtonClicked (object sender, RoutedEventArgs args)
void | OnSetPlacementMarginButtonClicked (object sender, RoutedEventArgs args)
void | OnSetPreferredPlacementButtonClicked (object sender, RoutedEventArgs args)
void | OnSetScrollViewerOffsetButtonClicked (object sender, RoutedEventArgs args)
void | OnSetShouldConstrainToRootBoundsButtonClicked (object sender, RoutedEventArgs args)
void | OnSetSubtitleButtonClicked (object sender, RoutedEventArgs args)
void | OnSetTailVisibilityButtonClicked (object sender, RoutedEventArgs args)
void | OnSetTargetButtonClicked (object sender, RoutedEventArgs args)
void | OnSetTargetHorizontalAlignmentButtonClicked (object sender, RoutedEventArgs args)
void | OnSetTargetVerticalAlignmentButtonClicked (object sender, RoutedEventArgs args)
void | OnSetTipLocationButton (object sender, RoutedEventArgs args)
void | OnSetTitleButtonClicked (object sender, RoutedEventArgs args)
void | OnShowAfterDelayButtonClicked (object sender, RoutedEventArgs args)
void | OnShowButtonClicked (object sender, RoutedEventArgs args)
void | OnShowButtonClickedRightEdge (object sender, RoutedEventArgs args)
void | OnSwitchTargetButtonClicked (object sender, RoutedEventArgs args)
void | OnTeachingTipActionButtonClicked (object sender, object args)
void | OnTeachingTipCloseButtonClicked (object sender, object args)
void | OnTeachingTipClosed (object sender, TeachingTipClosedEventArgs args)
void | OnTeachingTipClosing (TeachingTip sender, TeachingTipClosingEventArgs args)
void | OnTipFollowsTargetCheckBoxChecked (object sender, RoutedEventArgs args)
void | OnTipFollowsTargetCheckBoxUnchecked (object sender, RoutedEventArgs args)
void | OnTipShadowChecked (object sender, RoutedEventArgs args)
void | OnTipShadowUnchecked (object sender, RoutedEventArgs args)
void | OnUntargetButtonClicked (object sender, RoutedEventArgs args)
void | OnUseTestScreenBoundsCheckBoxUnchecked (object sender, RoutedEventArgs args)
void | OnUseTestSreenBoundsCheckBoxChecked (object sender, RoutedEventArgs args)
void | OnUseTestWindowBoundsCheckBoxChecked (object sender, RoutedEventArgs args)
void | OnUseTestWindowBoundsCheckBoxUnchecked (object sender, RoutedEventArgs args)
void | TailElevationSliderChanged (object sender, RangeBaseValueChangedEventArgs args)

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Properties

Button | ActionButton [get]
bool | IsPageRTL [get, set]

Events

PropertyChangedEventHandler | PropertyChanged

Private Member Functions

void | BtnClearTeachingTipEvents_Click (object sender, RoutedEventArgs e)
void | ContentScrollViewer_ViewChanged (object sender, ScrollViewerViewChangedEventArgs e)
CheckBox | getCancelClosesInTeachingTip ()
TeachingTip getTeachingTip ()
FrameworkElement | getTeachingTipRoot (UIElement cancelClosesCheckBox)
void | NotifyPropertyChanged ([CallerMemberName]string propertyName=null)
void | OnPageThemeComboBoxSelectionChanged (object sender, SelectionChangedEventArgs e)
void | RemoveOpenButton_Click (object sender, RoutedEventArgs e)
void | RemoveTeachingTipButton_Click (object sender, RoutedEventArgs e)
void | RemoveTeachingTipTextBlockContent_Unloaded (object sender, RoutedEventArgs e)
void | ShowTimerTick (object sender, object e)
void | TeachingTip_SizeChanged (object sender, SizeChangedEventArgs e)
void | TeachingTipInResources_Closed (TeachingTip sender, TeachingTipClosedEventArgs args)
void | TeachingTipInResourcesOnEdge_Closed (TeachingTip sender, TeachingTipClosedEventArgs args)
void | TeachingTipInResourcesRoot_Loaded (object sender, RoutedEventArgs e)
void | TeachingTipInVisualTree_Closed (TeachingTip sender, TeachingTipClosedEventArgs args)
void | TeachingTipInVisualTreeRoot_Loaded (object sender, RoutedEventArgs e)
void | TeachingTipTestHooks_EffectiveHeroContentPlacementChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_EffectivePlacementChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_IdleStatusChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_OffsetChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_OpenedStatusChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_SubtitleVisibilityChanged (TeachingTip sender, object args)
void | TeachingTipTestHooks_TitleVisibilityChanged (TeachingTip sender, object args)
void | Timer_Tick (object sender, object e)

Private Attributes

CheckBox | CurrentCancelClosesCheckBox
Deferral | deferral
DispatcherTimer | showTimer
FrameworkElement | TeachingTipInResourcesRoot
FrameworkElement | TeachingTipInVisualTreeRoot
Popup | testScreenBounds
Popup | testWindowBounds
DispatcherTimer | timer
TipLocation | tipLocation = TipLocation.VisualTree

Detailed Description

Definition at line 29 of file TeachingTipPage.xaml.cs.

Constructor & Destructor Documentation

TeachingTipPage ( ) [inline]

Definition at line 47 of file TeachingTipPage.xaml.cs.

        {
            this.InitializeComponent();
            TeachingTipTestHooks.IdleStatusChanged += TeachingTipTestHooks_IdleStatusChanged;
            TeachingTipTestHooks.OpenedStatusChanged += TeachingTipTestHooks_OpenedStatusChanged;
            TeachingTipTestHooks.EffectivePlacementChanged += TeachingTipTestHooks_EffectivePlacementChanged;
            TeachingTipTestHooks.EffectiveHeroContentPlacementChanged += TeachingTipTestHooks_EffectiveHeroContentPlacementChanged;
            TeachingTipTestHooks.OffsetChanged += TeachingTipTestHooks_OffsetChanged;
            TeachingTipTestHooks.TitleVisibilityChanged += TeachingTipTestHooks_TitleVisibilityChanged;
            TeachingTipTestHooks.SubtitleVisibilityChanged += TeachingTipTestHooks_SubtitleVisibilityChanged;
            this.TeachingTipInVisualTree.Closed += TeachingTipInVisualTree_Closed;
            this.TeachingTipInResources.Closed += TeachingTipInResources_Closed;
            this.TeachingTipInResourcesOnEdge.Closed += TeachingTipInResourcesOnEdge_Closed;
            this.ContentScrollViewer.ViewChanged += ContentScrollViewer_ViewChanged;
        }

Member Function Documentation

string BrushToString ( Brush brush ) [inline]

Definition at line 968 of file TeachingTipPage.xaml.cs.

        {
            if (brush is SolidColorBrush solidBrush)
            {
                return String.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", solidBrush.Color.A, solidBrush.Color.R, solidBrush.Color.G, solidBrush.Color.B);
            }

            return "Unknown";
        }

void BtnClearTeachingTipEvents_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 881 of file TeachingTipPage.xaml.cs.

        {
            this.lstTeachingTipEvents.Items.Clear();
        }

void ContentElevationSliderChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 805 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetContentElevation(getTeachingTip(), (float)args.NewValue);
        }

void ContentScrollViewer_ViewChanged | ( | object | sender,
 |  | ScrollViewerViewChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 149 of file TeachingTipPage.xaml.cs.

        {
            this.ScrollViewerOffsetTextBox.Text = this.ContentScrollViewer.VerticalOffset.ToString();
            if(e.IsIntermediate)
            {
                this.ScrollViewerStateTextBox.Text = "Scrolling";
            }
            else
            {
                this.ScrollViewerStateTextBox.Text = "Idle";
            }
            OnGetTargetBoundsButtonClicked(null, null);
        }

CheckBox getCancelClosesInTeachingTip ( ) [inline, private]

Definition at line 897 of file TeachingTipPage.xaml.cs.

        {
            switch(tipLocation)
            {
                case TipLocation.VisualTree:
                    return this.CancelClosesCheckBoxInVisualTree;
                default:
                    return this.CancelClosesCheckBoxInResources;
            }
        }

void GetEdgeTeachingTipOffset_Clicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 685 of file TeachingTipPage.xaml.cs.

        {
            EdgeTeachingTipOffset.Text = TeachingTipTestHooks.GetHorizontalOffset(TeachingTipInResourcesOnEdge).ToString()
                + ";" + TeachingTipTestHooks.GetVerticalOffset(TeachingTipInResourcesOnEdge).ToString();
        }

TeachingTip getTeachingTip ( ) [inline, private]

Definition at line 886 of file TeachingTipPage.xaml.cs.

        {
            switch(tipLocation)
            {
                case TipLocation.VisualTree:
                    return this.TeachingTipInVisualTree;
                default:
                    return this.TeachingTipInResources;
            }
        }

FrameworkElement getTeachingTipRoot ( UIElement cancelClosesCheckBox ) [inline, private]

Definition at line 908 of file TeachingTipPage.xaml.cs.

        {
            DependencyObject current = cancelClosesCheckBox;
            for(int i = 0; i < 11; i++)
            {
                current = VisualTreeHelper.GetParent(current);
            }
            return (FrameworkElement)current;
        }

void NotifyPropertyChanged ( [CallerMemberName] string propertyName = null ) [inline, private]

Definition at line 32 of file TeachingTipPage.xaml.cs.

        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

void OnBringTargetIntoViewButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 439 of file TeachingTipPage.xaml.cs.

        {
            this.targetButton.StartBringIntoView(new BringIntoViewOptions());
        }

void OnCloseButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 727 of file TeachingTipPage.xaml.cs.

        {
            getTeachingTip().IsOpen = false;
        }

void OnGetTargetBoundsButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 421 of file TeachingTipPage.xaml.cs.

        {
            var bounds = this.targetButton.TransformToVisual(null).TransformBounds(new Rect(0.0,
                0.0,
                this.targetButton.ActualWidth,
                this.targetButton.ActualHeight));

            this.TargetXOffsetTextBlock.Text = bounds.X.ToString();
            this.TargetYOffsetTextBlock.Text = bounds.Y.ToString();
            this.TargetWidthTextBlock.Text = bounds.Width.ToString();
            this.TargetHeightTextBlock.Text = bounds.Height.ToString();
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 86 of file TeachingTipPage.xaml.cs.

        {
            if (testWindowBounds != null && testWindowBounds.IsOpen)
            {
                testWindowBounds.IsOpen = false;
            }
            if(testScreenBounds != null && testScreenBounds.IsOpen)
            {
                testScreenBounds.IsOpen = false;
            }
            base.OnNavigatedFrom(e);
        }

void OnPageThemeComboBoxSelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 932 of file TeachingTipPage.xaml.cs.

        {
            var selectedItem = ((ComboBoxItem)PageThemeComboBox.SelectedItem);
            if (String.Equals(selectedItem?.Content, "Light"))
            {
                RequestedTheme = ElementTheme.Light;
            }
            else if (String.Equals(selectedItem?.Content, "Dark"))
            {
                RequestedTheme = ElementTheme.Dark;
            }
            else
            {
                RequestedTheme = ElementTheme.Default;
            }
        }

void OnReturnTopForOutOfWindowPlacementCheckBoxChecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 520 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetReturnTopForOutOfWindowPlacement(getTeachingTip(), true);
        }

void OnReturnTopForOutOfWindowPlacementCheckBoxUnchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 525 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetReturnTopForOutOfWindowPlacement(getTeachingTip(), false);
        }

void OnSetActionButtonContentButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 361 of file TeachingTipPage.xaml.cs.

        {
            if (this.ActionButtonContentComboBox.SelectedItem == ActionButtonContentNo)
            {
                getTeachingTip().ActionButtonContent = "";
            }
            else if (this.ActionButtonContentComboBox.SelectedItem == ActionButtonContentSmall)
            {
                getTeachingTip().ActionButtonContent = "A:Short Text.";
            }
            else if (this.ActionButtonContentComboBox.SelectedItem == ActionButtonContentLong)
            {
                getTeachingTip().ActionButtonContent = "A:This is a much longer button text that might cause some issues if we don't do the right thing...";
            }
            else
            {
                var button = new Button();
                button.Content = "A:Button in a Button!";
                getTeachingTip().ActionButtonContent = button;
            }
            NotifyPropertyChanged("ActionButton");
        }

void OnSetAnimationDurationsButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 797 of file TeachingTipPage.xaml.cs.

        {
            var expandDuration = new TimeSpan(0, 0, 0, 0, int.Parse(ExpandAnimationDuration.Text));
            var contractDuration = new TimeSpan(0, 0, 0, 0, int.Parse(ContractAnimationDuration.Text));
            TeachingTipTestHooks.SetExpandAnimationDuration(getTeachingTip(), expandDuration);
            TeachingTipTestHooks.SetContractAnimationDuration(getTeachingTip(), contractDuration);
        }

void OnSetAnimationParametersButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 782 of file TeachingTipPage.xaml.cs.

        {
            var expandEasing = CompositionTarget.GetCompositorForCurrentThread().CreateCubicBezierEasingFunction(
                new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint1X.Text), float.Parse(this.ExpandControlPoint1Y.Text)),
                new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint2X.Text), float.Parse(this.ExpandControlPoint2Y.Text)));

            var contractEasing = CompositionTarget.GetCompositorForCurrentThread().CreateCubicBezierEasingFunction(
                new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint1X.Text), float.Parse(this.ExpandControlPoint1Y.Text)),
                new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint2X.Text), float.Parse(this.ExpandControlPoint2Y.Text)));

            var tip = getTeachingTip();
            TeachingTipTestHooks.SetExpandEasingFunction(tip, expandEasing);
            TeachingTipTestHooks.SetContractEasingFunction(tip, contractEasing);
        }

void OnSetAutomationNameButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 732 of file TeachingTipPage.xaml.cs.

        {
            var tip = getTeachingTip();
            if(this.AutomationNameComboBox.SelectedItem == AutomationNameVisualTree)
            {
                AutomationProperties.SetName(tip, "TeachingTipInVisualTree");
            }
            else if(this.AutomationNameComboBox.SelectedItem == AutomationNameResources)
            {
                AutomationProperties.SetName(tip, "TeachingTipInResources");
            }
            else
            {
                AutomationProperties.SetName(tip, "");
            }
        }

void OnSetBleeingImagePlacementButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 406 of file TeachingTipPage.xaml.cs.

        {
            if(this.HeroContentPlacementComboBox.SelectedItem == HeroContentPlacementAuto)
            {
                getTeachingTip().HeroContentPlacement = TeachingTipHeroContentPlacementMode.Auto;
            }
            else if(this.HeroContentPlacementComboBox.SelectedItem == HeroContentPlacementTop)
            {
                getTeachingTip().HeroContentPlacement = TeachingTipHeroContentPlacementMode.Top;
            }
            else
            {
                getTeachingTip().HeroContentPlacement = TeachingTipHeroContentPlacementMode.Bottom;
            }
        }

void OnSetCloseButtonContentButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 384 of file TeachingTipPage.xaml.cs.

        {
            if (this.CloseButtonContentComboBox.SelectedItem == CloseButtonContentNo)
            {
                getTeachingTip().CloseButtonContent = "";
            }
            else if (this.CloseButtonContentComboBox.SelectedItem == CloseButtonContentSmall)
            {
                getTeachingTip().CloseButtonContent = "C:Short Text.";
            }
            else if (this.CloseButtonContentComboBox.SelectedItem == CloseButtonContentLong)
            {
                getTeachingTip().CloseButtonContent = "C:This is a much longer button text that might cause some issues if we don't do the right thing...";
            }
            else
            {
                var button = new Button();
                button.Content = "C:Button in a Button!";
                getTeachingTip().CloseButtonContent = button;
            }
        }

void OnSetContentButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 270 of file TeachingTipPage.xaml.cs.

        {
            if (this.ContentComboBox.SelectedItem == ContentRedSquare)
            {
                Grid grid = new Grid();
                grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Red);
                getTeachingTip().Content = grid;
            }
            else if (this.ContentComboBox.SelectedItem == ContentBlueSquare)
            {
                Grid grid = new Grid();
                grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Blue);
                getTeachingTip().Content = grid;
            }
            else if (this.ContentComboBox.SelectedItem == ContentImage)
            {
                Image image = new Image();
                BitmapImage bitmapImage = new BitmapImage();
                image.Width = bitmapImage.DecodePixelWidth = 300;
                bitmapImage.UriSource = new Uri("ms-appx:///Assets/ingredient1.png");
                image.Source = bitmapImage;
                getTeachingTip().Content = image;
            }
            else if (this.ContentComboBox.SelectedItem == ContentShort)
            {
                TextBlock textBlock = new TextBlock();
                textBlock.Text = "This is shorter content.";
                getTeachingTip().Content = textBlock;
            }
            else if (this.ContentComboBox.SelectedItem == ContentLong)
            {
                TextBlock textBlock = new TextBlock();
                textBlock.Text = "This is longer content. This is longer content. This is longer content. This is longer content. " +
                    "This is longer content. This is longer content.This is longer content. This is longer content." +
                    "This is longer content.This is longer content.This is longer content. This is longer content." +
                    "This is longer content.This is longer content.This is longer content.This is longer content." +
                    "This is longer content.This is longer content.This is longer content.This is longer content." +
                    "This is longer content.This is longer content.This is longer content.This is longer content." +
                    "This is longer content.This is longer content.This is longer content.This is longer content." +
                    "This is longer content.This is longer content.This is longer content.This is longer content." +
                    "This is longer content.This is longer content.";
                textBlock.TextWrapping = TextWrapping.WrapWholeWords;
                getTeachingTip().Content = textBlock;
            }
            else if (this.ContentComboBox.SelectedItem == ContentAutoSave)
            {
                Image image = new Image();
                BitmapImage bitmapImage = new BitmapImage();
                bitmapImage.UriSource = new Uri("ms-appx:///Assets/AutoSave.png");
                image.Source = bitmapImage;
                getTeachingTip().Content = image;
            }
            else
            {
                getTeachingTip().Content = null;
            }
        }

void OnSetHeroContentButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 229 of file TeachingTipPage.xaml.cs.

        {
            if (this.HeroContentComboBox.SelectedItem == HeroContentRedSquare)
            {
                Grid grid = new Grid();
                grid.MinHeight = 200;
                grid.MinWidth = 200;
                grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Red);
                getTeachingTip().HeroContent = grid;
            }
            else if (this.HeroContentComboBox.SelectedItem == HeroContentBlueSquare)
            {
                Grid grid = new Grid();
                grid.MinHeight = 200;
                grid.MinWidth = 200;
                grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Blue);
                getTeachingTip().HeroContent = grid;
            }
            else if (this.HeroContentComboBox.SelectedItem == HeroContentImage)
            {
                Image image = new Image();
                BitmapImage bitmapImage = new BitmapImage();
                image.Width = bitmapImage.DecodePixelWidth = 300;
                bitmapImage.UriSource = new Uri("ms-appx:///Assets/ingredient1.png");
                image.Source = bitmapImage;
                getTeachingTip().HeroContent = image;
            }
            else if (this.HeroContentComboBox.SelectedItem == HeroContentAutoSave)
            {
                Image image = new Image();
                BitmapImage bitmapImage = new BitmapImage();
                bitmapImage.UriSource = new Uri("ms-appx:///Assets/AutoSave.png");
                image.Source = bitmapImage;
                getTeachingTip().HeroContent = image;
            }
            else
            {
                getTeachingTip().HeroContent = null;
            }
        }

void OnSetIconButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 189 of file TeachingTipPage.xaml.cs.

        {
            if (this.IconComboBox.SelectedItem == IconPeople)
            {
                SymbolIconSource symbolIconSource = new SymbolIconSource();
                symbolIconSource.Symbol = Symbol.People;
                getTeachingTip().IconSource = symbolIconSource;

            }
            else
            {
                getTeachingTip().IconSource = null;
            }
        }

void OnSetIsLightDismissEnabledButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 590 of file TeachingTipPage.xaml.cs.

        {
            if(this.IsLightDismissEnabledComboBox.SelectedItem == IsLightDismissFalse)
            {
                getTeachingTip().IsLightDismissEnabled = false;
            }
            else
            {
                getTeachingTip().IsLightDismissEnabled = true;
            }
        }

void OnSetPlacementMarginButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 614 of file TeachingTipPage.xaml.cs.

        {
            getTeachingTip().PlacementMargin = new Thickness(Double.Parse(this.PlacementMarginTextBox.Text));
        }

void OnSetPreferredPlacementButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 530 of file TeachingTipPage.xaml.cs.

        {
            if (this.PreferredPlacementComboBox.SelectedItem == PlacementTop)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Top;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementBottom)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Bottom;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementLeft)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Left;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementRight)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Right;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementTopRight)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.TopRight;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementTopLeft)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.TopLeft;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementBottomRight)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.BottomRight;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementBottomLeft)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.BottomLeft;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementLeftTop)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.LeftTop;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementLeftBottom)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.LeftBottom;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementRightTop)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.RightTop;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementRightBottom)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.RightBottom;
            }
            else if (this.PreferredPlacementComboBox.SelectedItem == PlacementCenter)
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Center;
            }
            else
            {
                getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Auto;
            }
        }

void OnSetScrollViewerOffsetButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 434 of file TeachingTipPage.xaml.cs.

        {
            this.ContentScrollViewer.ChangeView(0, double.Parse(this.ScrollViewerOffsetTextBox.Text), 1);
        }

void OnSetShouldConstrainToRootBoundsButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 602 of file TeachingTipPage.xaml.cs.

        {
            if(this.ShouldConstrainToRootBoundsComboBox.SelectedItem == ShouldConstrainToRootBoundsFalse)
            {
                getTeachingTip().ShouldConstrainToRootBounds = false;
            }
            else
            {
                getTeachingTip().ShouldConstrainToRootBounds = true;
            }
        }

void OnSetSubtitleButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 344 of file TeachingTipPage.xaml.cs.

        {
            if (this.SubtitleComboBox.SelectedItem == SubtitleNo)
            {
                getTeachingTip().Subtitle = "";
            }
            else if (this.SubtitleComboBox.SelectedItem == SubtitleSmall)
            {
                getTeachingTip().Subtitle = "Short Subtitle.";
            }
            else
            {
                getTeachingTip().Subtitle = "This is a much longer subtitle that might cause some issues if we don't do the right thing..." +
                    "This is a much longer subtitle that might cause some issues if we don't do the right thing...";
            }
        }

void OnSetTailVisibilityButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 619 of file TeachingTipPage.xaml.cs.

        {
            if (this.TailVisibilityComboBox.SelectedItem == TailVisibilityAuto)
            {
                getTeachingTip().TailVisibility = TeachingTipTailVisibility.Auto;
            }
            else if (this.TailVisibilityComboBox.SelectedItem == TailVisibilityVisible)
            {
                getTeachingTip().TailVisibility = TeachingTipTailVisibility.Visible;
            }
            else
            {
                getTeachingTip().TailVisibility = TeachingTipTailVisibility.Collapsed;
            }
        }

void OnSetTargetButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 635 of file TeachingTipPage.xaml.cs.

        {
            getTeachingTip().Target = this.targetButton;
        }

void OnSetTargetHorizontalAlignmentButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 765 of file TeachingTipPage.xaml.cs.

        {
            if (TargetHorizontalAlignmentComboBox.SelectedItem == TargetHorizontalAlignmentLeft)
            {
                this.targetButton.HorizontalAlignment = HorizontalAlignment.Left;
            }
            else if (TargetHorizontalAlignmentComboBox.SelectedItem == TargetHorizontalAlignmentCenter)
            {
                this.targetButton.HorizontalAlignment = HorizontalAlignment.Center;
            }
            else
            {
                this.targetButton.HorizontalAlignment = HorizontalAlignment.Right;
            }
            OnGetTargetBoundsButtonClicked(null, null);
        }

void OnSetTargetVerticalAlignmentButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 749 of file TeachingTipPage.xaml.cs.

        {
            if(TargetVerticalAlignmentComboBox.SelectedItem == TargetVerticalAlignmentTop)
            {
                getTeachingTip().VerticalAlignment = VerticalAlignment.Top;
            }
            else if (TargetVerticalAlignmentComboBox.SelectedItem == TargetVerticalAlignmentCenter)
            {
                getTeachingTip().VerticalAlignment = VerticalAlignment.Center;
            }
            else
            {
                getTeachingTip().VerticalAlignment = VerticalAlignment.Bottom;
            }
            OnGetTargetBoundsButtonClicked(null, null);
        }

void OnSetTipLocationButton | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 204 of file TeachingTipPage.xaml.cs.

        {
            if (this.TipLocationComboBox.SelectedItem == TipInVisualTree)
            {
                if (tipLocation != TipLocation.VisualTree)
                {
                    TeachingTipInResources.IsOpen = false;
                    tipLocation = TipLocation.VisualTree;
                }
                tipLocation = TipLocation.VisualTree;
                AutomationNameComboBox.SelectedItem = AutomationNameVisualTree;
            }
            else
            {
                if (tipLocation != TipLocation.Resources)
                {
                    TeachingTipInVisualTree.IsOpen = false;
                    tipLocation = TipLocation.Resources;
                }
                tipLocation = TipLocation.Resources;
                AutomationNameComboBox.SelectedItem = AutomationNameResources;
            }
            OnSetAutomationNameButtonClicked(null, null);
        }

void OnSetTitleButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 328 of file TeachingTipPage.xaml.cs.

        {
            if (this.TitleComboBox.SelectedItem == TitleNo)
            {
                getTeachingTip().Title = "";
            }
            else if (this.TitleComboBox.SelectedItem == TitleSmall)
            {
                getTeachingTip().Title = "Short title.";
            }
            else
            {
                getTeachingTip().Title = "This is a much longer title that might cause some issues if we don't do the right thing...";
            }
        }

void OnShowAfterDelayButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 691 of file TeachingTipPage.xaml.cs.

        {
            showTimer = new DispatcherTimer();
            showTimer.Interval = new TimeSpan(0, 0, 2);
            showTimer.Tick += ShowTimerTick;
            showTimer.Start();
        }

void OnShowButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 645 of file TeachingTipPage.xaml.cs.

        {
            getTeachingTip().IsOpen = true;
            switch (tipLocation)
            {
                case TipLocation.VisualTree:
                    if (TeachingTipInVisualTreeRoot == null)
                    {
                        getCancelClosesInTeachingTip().Loaded += TeachingTipInVisualTreeRoot_Loaded; ;
                    }
                    else
                    {
                        TeachingTipInVisualTreeRoot.SizeChanged += TeachingTip_SizeChanged;
                        TeachingTip_SizeChanged(TeachingTipInVisualTreeRoot, null);
                    }
                    break;
                default:
                    if (TeachingTipInResourcesRoot == null)
                    {
                        getCancelClosesInTeachingTip().Loaded += TeachingTipInResourcesRoot_Loaded;
                    }
                    else
                    {
                        TeachingTipInResourcesRoot.SizeChanged += TeachingTip_SizeChanged;
                        TeachingTip_SizeChanged(TeachingTipInResourcesRoot, null);
                    }
                    break;
            }

            CurrentCancelClosesCheckBox = getCancelClosesInTeachingTip();
            NotifyPropertyChanged("CurrentCancelClosesCheckBox");
        }

void OnShowButtonClickedRightEdge | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 678 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipInResourcesOnEdge.IsOpen = true;
            TeachingTipInResourcesOnEdge.SizeChanged += TeachingTip_SizeChanged;
            TeachingTip_SizeChanged(TeachingTipInResourcesOnEdge, null);
        }

void OnSwitchTargetButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 949 of file TeachingTipPage.xaml.cs.

        {
            var newTarget = getTeachingTip().Target == targetButton ? targetButton2 : targetButton;
            getTeachingTip().Target = newTarget;
        }

void OnTeachingTipActionButtonClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 869 of file TeachingTipPage.xaml.cs.

        {
            lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + "Action Button Clicked Event");
            lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
        }

void OnTeachingTipCloseButtonClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline]

Definition at line 875 of file TeachingTipPage.xaml.cs.

        {
            lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + "Close Button Clicked Event");
            lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
        }

void OnTeachingTipClosed | ( | object | sender,
 |  | TeachingTipClosedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 825 of file TeachingTipPage.xaml.cs.

        {
            if (lstTeachingTipEvents != null)
            {
                lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + args.ToString() + " Reason: " + args.Reason.ToString());
                lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
            }
        }

void OnTeachingTipClosing | ( | TeachingTip | sender,
 |  | TeachingTipClosingEventArgs | args |
 | ) |  |  | [inline]

Definition at line 834 of file TeachingTipPage.xaml.cs.

        {
            if (lstTeachingTipEvents != null)
            {
                lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + args.ToString() + " Reason: " + args.Reason.ToString());
                lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
            }

            CheckBox cancelClosesCheckBox = null;
            if (sender == TeachingTipInResources)
            {
                cancelClosesCheckBox = CancelClosesCheckBoxInResources;
            }
            else
            {
                cancelClosesCheckBox = CancelClosesCheckBoxInVisualTree;
            }

            if (cancelClosesCheckBox != null && cancelClosesCheckBox.IsChecked == true)
            {
                deferral = args.GetDeferral();
                args.Cancel = true;
                timer = new DispatcherTimer();
                timer.Tick += Timer_Tick;
                timer.Interval = new TimeSpan(0, 0, 1);
                timer.Start();
            }
        }

void OnTipFollowsTargetCheckBoxChecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 510 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetTipFollowsTarget(getTeachingTip(), true);
        }

void OnTipFollowsTargetCheckBoxUnchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 515 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetTipFollowsTarget(getTeachingTip(), false);
        }

void OnTipShadowChecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 815 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetTipShouldHaveShadow(getTeachingTip(), true);
        }

void OnTipShadowUnchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 820 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetTipShouldHaveShadow(getTeachingTip(), false);
        }

void OnUntargetButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 640 of file TeachingTipPage.xaml.cs.

        {
            getTeachingTip().Target = null;
        }

void OnUseTestScreenBoundsCheckBoxUnchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 504 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetUseTestScreenBounds(getTeachingTip(), false);
            testScreenBounds.IsOpen = false;
        }

void OnUseTestSreenBoundsCheckBoxChecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 471 of file TeachingTipPage.xaml.cs.

        {
            var tip = getTeachingTip();
            Rect screenRect = new Rect(double.Parse(this.TestScreenBoundsXTextBox.Text),
                                       double.Parse(this.TestScreenBoundsYTextBox.Text),
                                       double.Parse(this.TestScreenBoundsWidthTextBox.Text),
                                       double.Parse(this.TestScreenBoundsHeightTextBox.Text));
            TeachingTipTestHooks.SetUseTestScreenBounds(tip, true);
            TeachingTipTestHooks.SetTestScreenBounds(tip, screenRect);
            if (testScreenBounds == null)
            {
                testScreenBounds = new Popup();
                testScreenBounds.IsHitTestVisible = false;
                testScreenBounds.XamlRoot = this.XamlRoot;
            }
            Grid windowBounds = new Grid();
            windowBounds.Width = screenRect.Width;
            windowBounds.Height = screenRect.Height;
            windowBounds.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
            windowBounds.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Blue);
            windowBounds.BorderThickness = new Thickness(1.0);
            testScreenBounds.Child = windowBounds;
            testScreenBounds.HorizontalOffset = screenRect.X;
            testScreenBounds.VerticalOffset = screenRect.Y;
            testScreenBounds.IsOpen = true;
        }

void OnUseTestWindowBoundsCheckBoxChecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 444 of file TeachingTipPage.xaml.cs.

        {
            var tip = getTeachingTip();
            Rect windowRect = new Rect(double.Parse(this.TestWindowBoundsXTextBox.Text),
                                       double.Parse(this.TestWindowBoundsYTextBox.Text),
                                       double.Parse(this.TestWindowBoundsWidthTextBox.Text),
                                       double.Parse(this.TestWindowBoundsHeightTextBox.Text));
            TeachingTipTestHooks.SetUseTestWindowBounds(tip, true);
            TeachingTipTestHooks.SetTestWindowBounds(tip, windowRect);
            if(testWindowBounds == null)
            {
                testWindowBounds = new Popup();
                testWindowBounds.IsHitTestVisible = false;
                testWindowBounds.XamlRoot = this.XamlRoot;
            }
            Grid windowBounds = new Grid();
            windowBounds.Width = windowRect.Width;
            windowBounds.Height = windowRect.Height;
            windowBounds.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
            windowBounds.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
            windowBounds.BorderThickness = new Thickness(1.0);
            testWindowBounds.Child = windowBounds;
            testWindowBounds.HorizontalOffset = windowRect.X;
            testWindowBounds.VerticalOffset = windowRect.Y;
            testWindowBounds.IsOpen = true;
        }

void OnUseTestWindowBoundsCheckBoxUnchecked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 498 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetUseTestWindowBounds(getTeachingTip(), false);
            testWindowBounds.IsOpen = false;
        }

void RemoveOpenButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 989 of file TeachingTipPage.xaml.cs.

        {
            ContentStackPanel.Children.Remove(targetButton);
        }

void RemoveTeachingTipButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 978 of file TeachingTipPage.xaml.cs.

        {
            ContentStackPanel.Children.Remove(TeachingTipInVisualTree);
            ContentStackPanel.Children.Remove(TeachingTipInResources);
        }

void RemoveTeachingTipTextBlockContent_Unloaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 984 of file TeachingTipPage.xaml.cs.

        {
            VisualTreeTeachingTipContentTextBlockUnloaded.IsChecked = true;
        }

void ShowTimerTick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 699 of file TeachingTipPage.xaml.cs.

        {
            showTimer.Tick -= ShowTimerTick;
            showTimer.Stop();
            OnShowButtonClicked(null, null);
        }

void TailElevationSliderChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 810 of file TeachingTipPage.xaml.cs.

        {
            TeachingTipTestHooks.SetTailElevation(getTeachingTip(), (float)args.NewValue);
        }

void TeachingTip_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 99 of file TeachingTipPage.xaml.cs.

        {
            this.TipHeightTextBlock.Text = ((FrameworkElement)sender).ActualHeight.ToString();
            this.TipWidthTextBlock.Text = ((FrameworkElement)sender).ActualWidth.ToString();
            NotifyPropertyChanged("ActionButton");
        }

void TeachingTipInResources_Closed | ( | TeachingTip | sender,
 |  | TeachingTipClosedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 63 of file TeachingTipPage.xaml.cs.

        {
            if (TeachingTipInResourcesRoot != null)
            {
                TeachingTipInResourcesRoot.SizeChanged -= TeachingTip_SizeChanged;
            }
        }

void TeachingTipInResourcesOnEdge_Closed | ( | TeachingTip | sender,
 |  | TeachingTipClosedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 70 of file TeachingTipPage.xaml.cs.

        {
            if (TeachingTipInResourcesOnEdge != null)
            {
                TeachingTipInResourcesOnEdge.SizeChanged -= TeachingTip_SizeChanged;
            }
        }

void TeachingTipInResourcesRoot_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 706 of file TeachingTipPage.xaml.cs.

        {
            ((FrameworkElement)sender).Loaded -= TeachingTipInResourcesRoot_Loaded;
            TeachingTipInResourcesRoot = getTeachingTipRoot(getCancelClosesInTeachingTip());
            TeachingTipInResourcesRoot.SizeChanged += TeachingTip_SizeChanged;
            TeachingTip_SizeChanged(TeachingTipInResourcesRoot, null);
            this.TitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetTitleVisibility(this.TeachingTipInResources).ToString();
            this.SubtitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetSubtitleVisibility(this.TeachingTipInResources).ToString();
        }

void TeachingTipInVisualTree_Closed | ( | TeachingTip | sender,
 |  | TeachingTipClosedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 78 of file TeachingTipPage.xaml.cs.

        {
            if (TeachingTipInVisualTreeRoot != null)
            {
                TeachingTipInVisualTreeRoot.SizeChanged -= TeachingTip_SizeChanged;
            }
        }

void TeachingTipInVisualTreeRoot_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 716 of file TeachingTipPage.xaml.cs.

        {
            ((FrameworkElement)sender).Loaded -= TeachingTipInVisualTreeRoot_Loaded;
            TeachingTipInVisualTreeRoot = getTeachingTipRoot(getCancelClosesInTeachingTip());
            TeachingTipInVisualTreeRoot.SizeChanged += TeachingTip_SizeChanged;
            TeachingTip_SizeChanged(TeachingTipInVisualTreeRoot, null);

            this.TitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetTitleVisibility(this.TeachingTipInVisualTree).ToString();
            this.SubtitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetSubtitleVisibility(this.TeachingTipInVisualTree).ToString();
        }

void TeachingTipTestHooks_EffectiveHeroContentPlacementChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 131 of file TeachingTipPage.xaml.cs.

        {
            if (sender == getTeachingTip())
            {
                var placement = TeachingTipTestHooks.GetEffectiveHeroContentPlacement(sender);
                this.EffectiveHeroContentPlacementTextBlock.Text = placement.ToString();
            }
        }

void TeachingTipTestHooks_EffectivePlacementChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 140 of file TeachingTipPage.xaml.cs.

        {
            if (sender == getTeachingTip())
            {
                var placement = TeachingTipTestHooks.GetEffectivePlacement(sender);
                this.EffectivePlacementTextBlock.Text = placement.ToString();
            }
        }

void TeachingTipTestHooks_IdleStatusChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 176 of file TeachingTipPage.xaml.cs.

        {
            if (TeachingTipTestHooks.GetIsIdle(this.TeachingTipInResources) &&
                TeachingTipTestHooks.GetIsIdle(this.TeachingTipInVisualTree))
            {
                this.IsIdleCheckBox.IsChecked = true;
            }
            else
            {
                this.IsIdleCheckBox.IsChecked = false;
            }
        }

void TeachingTipTestHooks_OffsetChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 106 of file TeachingTipPage.xaml.cs.

        {
            if (sender == getTeachingTip())
            {
                this.PopupVerticalOffsetTextBlock.Text = TeachingTipTestHooks.GetVerticalOffset(sender).ToString();
                this.PopupHorizontalOffsetTextBlock.Text = TeachingTipTestHooks.GetHorizontalOffset(sender).ToString();
            }
        }

void TeachingTipTestHooks_OpenedStatusChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 163 of file TeachingTipPage.xaml.cs.

        {
            if (this.TeachingTipInResources.IsOpen ||
                this.TeachingTipInVisualTree.IsOpen)
            {
                this.IsOpenCheckBox.IsChecked = true;
            }
            else
            {
                this.IsOpenCheckBox.IsChecked = false;
            }
        }

void TeachingTipTestHooks_SubtitleVisibilityChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 123 of file TeachingTipPage.xaml.cs.

        {
            if (sender == getTeachingTip())
            {
                this.SubtitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetSubtitleVisibility(sender).ToString();
            }
        }

void TeachingTipTestHooks_TitleVisibilityChanged | ( | TeachingTip | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 115 of file TeachingTipPage.xaml.cs.

        {
            if (sender == getTeachingTip())
            {
                this.TitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetTitleVisibility(sender).ToString();
            }
        }

void Timer_Tick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 863 of file TeachingTipPage.xaml.cs.

        {
            timer.Stop();
            deferral.Complete();
        }

Member Data Documentation

CheckBox CurrentCancelClosesCheckBox [private]

Definition at line 45 of file TeachingTipPage.xaml.cs.

Deferral deferral [private]

Definition at line 37 of file TeachingTipPage.xaml.cs.

DispatcherTimer showTimer [private]

Definition at line 39 of file TeachingTipPage.xaml.cs.

FrameworkElement TeachingTipInResourcesRoot [private]

Definition at line 43 of file TeachingTipPage.xaml.cs.

FrameworkElement TeachingTipInVisualTreeRoot [private]

Definition at line 44 of file TeachingTipPage.xaml.cs.

Popup testScreenBounds [private]

Definition at line 41 of file TeachingTipPage.xaml.cs.

Popup testWindowBounds [private]

Definition at line 40 of file TeachingTipPage.xaml.cs.

DispatcherTimer timer [private]

Definition at line 38 of file TeachingTipPage.xaml.cs.

TipLocation tipLocation = TipLocation.VisualTree [private]

Definition at line 42 of file TeachingTipPage.xaml.cs.

Property Documentation

Button ActionButton [get]

Definition at line 956 of file TeachingTipPage.xaml.cs.

bool IsPageRTL [get, set]

Definition at line 919 of file TeachingTipPage.xaml.cs.

Event Documentation

PropertyChangedEventHandler PropertyChanged

Definition at line 31 of file TeachingTipPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TeachingTip/TestUI/TeachingTipPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TestControl
Protected Member Functions

TestControl Class Reference

List of all members.

Protected Member Functions

override AutomationPeer OnCreateAutomationPeer ()

Detailed Description

Definition at line 20 of file ExpanderPage.xaml.cs.

Member Function Documentation

override AutomationPeer OnCreateAutomationPeer ( ) [inline, protected]

Definition at line 22 of file ExpanderPage.xaml.cs.

        {
            return new TestControlAutomationPeer(this);
        }

The documentation for this class was generated from the following file:
  • Expander/TestUI/ExpanderPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestControlAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TestControlAutomationPeer
Public Member Functions | Protected Member Functions

TestControlAutomationPeer Class Reference

List of all members.

Public Member Functions

TestControlAutomationPeer (TestControl owner)

Protected Member Functions

override AutomationControlType | GetAutomationControlTypeCore ()
override string | GetLocalizedControlTypeCore ()

Detailed Description

Definition at line 29 of file ExpanderPage.xaml.cs.

Constructor & Destructor Documentation

TestControlAutomationPeer ( TestControl owner ) [inline]

Definition at line 31 of file ExpanderPage.xaml.cs.

: base(owner){}

Member Function Documentation

override AutomationControlType GetAutomationControlTypeCore ( ) [inline, protected]

Definition at line 32 of file ExpanderPage.xaml.cs.

        {
            return AutomationControlType.Custom;
        }

override string GetLocalizedControlTypeCore ( ) [inline, protected]

Definition at line 37 of file ExpanderPage.xaml.cs.

        {
            return "TestControl";
        }

The documentation for this class was generated from the following file:
  • Expander/TestUI/ExpanderPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TextCommandBarFlyoutPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TextCommandBarFlyoutPage
Public Member Functions | Private Member Functions

TextCommandBarFlyoutPage Class Reference

List of all members.

Public Member Functions

TextCommandBarFlyoutPage ()

Private Member Functions

void | OnClearClipboardContentsClicked (object sender, object args)
async void | OnClipboardContentChanged (object sender, object e)
void | OnGetRichEditBoxRtfContentClicked (object sender, object args)
void | OnRichEditBoxClearSelectionClicked (object sender, object args)
void | OnRichEditBoxFillWithTextClicked (object sender, object args)
void | OnRichEditBoxSelectAllClicked (object sender, object args)
void | OnRichTextBlockClearSelectionClicked (object sender, object args)
void | OnRichTextBlockSelectAllClicked (object sender, object args)
void | OnSetClipboardContentsClicked (object sender, object args)
void | OnShowStandardTextControlFlyoutOnPasswordBoxClicked (object sender, object args)
void | OnShowStandardTextControlFlyoutOnRichEditBoxClicked (object sender, object args)
void | OnShowStandardTextControlFlyoutOnRichTextBlockClicked (object sender, object args)
void | OnShowStandardTextControlFlyoutOnTextBlockClicked (object sender, object args)
void | OnShowStandardTextControlFlyoutOnTextBoxClicked (object sender, object args)
void | OnShowTextControlFlyoutOnPasswordBoxClicked (object sender, object args)
void | OnShowTextControlFlyoutOnRichEditBoxClicked (object sender, object args)
void | OnShowTextControlFlyoutOnRichTextBlockClicked (object sender, object args)
void | OnShowTextControlFlyoutOnTextBlockClicked (object sender, object args)
void | OnShowTextControlFlyoutOnTextBoxClicked (object sender, object args)
void | OnTextBlockClearSelectionClicked (object sender, object args)
void | OnTextBlockSelectAllClicked (object sender, object args)
void | OnTextBoxClearSelectionClicked (object sender, object args)
void | OnTextBoxFillWithTextClicked (object sender, object args)
void | OnTextBoxSelectAllClicked (object sender, object args)
void | RecordEvent (string eventString)
void | RecordEvent (object sender, string eventString)
void | ShowTextControlContextFlyoutStandard (FrameworkElement targetElement)
void | ShowTextControlContextFlyoutTransient (FrameworkElement targetElement)

Detailed Description

Definition at line 20 of file TextCommandBarFlyoutPage.xaml.cs.

Constructor & Destructor Documentation

TextCommandBarFlyoutPage ( ) [inline]

Definition at line 22 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            this.InitializeComponent();

            RichEditBox1.Document.SetText(TextSetOptions.None, "Lorem ipsum ergo sum");
            Clipboard.ContentChanged += OnClipboardContentChanged;

            TextControlContextFlyout.Placement = FlyoutPlacementMode.BottomEdgeAlignedLeft;
            TextControlSelectionFlyout.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
            TextBox1.ContextFlyout = TextControlContextFlyout;
            TextBlock1.ContextFlyout = TextControlContextFlyout;
            RichEditBox1.ContextFlyout = TextControlContextFlyout;
            RichTextBlock1.ContextFlyout = TextControlContextFlyout;
            PasswordBox1.ContextFlyout = TextControlContextFlyout;
            TextBox1.SelectionFlyout = TextControlSelectionFlyout;
            TextBlock1.SelectionFlyout = TextControlSelectionFlyout;
            RichEditBox1.SelectionFlyout = TextControlSelectionFlyout;
            RichTextBlock1.SelectionFlyout = TextControlSelectionFlyout;
            PasswordBox1.SelectionFlyout = TextControlSelectionFlyout;
        }

Member Function Documentation

void OnClearClipboardContentsClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 186 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            Clipboard.Clear();
        }

async void OnClipboardContentChanged | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 43 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            var clipboardContent = Clipboard.GetContent();

            if (clipboardContent.Contains(StandardDataFormats.Rtf))
            {
                RecordEvent(string.Format("Clipboard content changed to '{0}'", await Clipboard.GetContent().GetRtfAsync()));
            }
            else if (clipboardContent.Contains(StandardDataFormats.Text))
            {
                RecordEvent(string.Format("Clipboard content changed to '{0}'", await Clipboard.GetContent().GetTextAsync()));
            }
            else
            {
                RecordEvent(string.Format("Clipboard content changed to ''"));
            }
        }

void OnGetRichEditBoxRtfContentClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 201 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            string rtfContent;
            RichEditBox1.Document.GetText(TextGetOptions.FormatRtf, out rtfContent);
            StatusReportingTextBox.Text = rtfContent;
        }

void OnRichEditBoxClearSelectionClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 106 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            RichEditBox1.Document.Selection.Collapse(true);
        }

void OnRichEditBoxFillWithTextClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 116 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            RichEditBox1.Document.SetText(TextSetOptions.None, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
        }

void OnRichEditBoxSelectAllClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 86 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            RichEditBox1.Document.Selection.Expand(TextRangeUnit.Story);
        }

void OnRichTextBlockClearSelectionClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 121 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            RichTextBlock1.Select(RichTextBlock1.ContentStart, RichTextBlock1.ContentStart);
        }

void OnRichTextBlockSelectAllClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 91 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            RichTextBlock1.SelectAll();
        }

void OnSetClipboardContentsClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 191 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            DataPackage dataPackage = new DataPackage();

            dataPackage.RequestedOperation = DataPackageOperation.Copy;
            dataPackage.SetText("Automatically set clipboard text");

            Clipboard.SetContent(dataPackage);
        }

void OnShowStandardTextControlFlyoutOnPasswordBoxClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 171 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutStandard(PasswordBox1);
        }

void OnShowStandardTextControlFlyoutOnRichEditBoxClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 161 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutStandard(RichEditBox1);
        }

void OnShowStandardTextControlFlyoutOnRichTextBlockClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 166 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutStandard(RichTextBlock1);
        }

void OnShowStandardTextControlFlyoutOnTextBlockClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 156 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutStandard(TextBlock1);
        }

void OnShowStandardTextControlFlyoutOnTextBoxClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 151 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutStandard(TextBox1);
        }

void OnShowTextControlFlyoutOnPasswordBoxClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 146 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutTransient(PasswordBox1);
        }

void OnShowTextControlFlyoutOnRichEditBoxClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 136 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutTransient(RichEditBox1);
        }

void OnShowTextControlFlyoutOnRichTextBlockClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 141 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutTransient(RichTextBlock1);
        }

void OnShowTextControlFlyoutOnTextBlockClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 131 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutTransient(TextBlock1);
        }

void OnShowTextControlFlyoutOnTextBoxClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 126 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            ShowTextControlContextFlyoutTransient(TextBox1);
        }

void OnTextBlockClearSelectionClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 101 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            TextBlock1.Select(TextBlock1.ContentStart, TextBlock1.ContentStart);
        }

void OnTextBlockSelectAllClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 81 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            TextBlock1.SelectAll();
        }

void OnTextBoxClearSelectionClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 96 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            TextBox1.Select(0, 0);
        }

void OnTextBoxFillWithTextClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 111 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            TextBox1.Text = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
        }

void OnTextBoxSelectAllClicked | ( | object | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 76 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            TextBox1.SelectAll();
        }

void RecordEvent ( string eventString ) [inline, private]

Definition at line 61 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            StatusReportingTextBox.Text = eventString;
        }

void RecordEvent | ( | object | sender,
 |  | string | eventString |
 | ) |  |  | [inline, private]

Definition at line 66 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            DependencyObject senderAsDO = sender as DependencyObject;

            if (senderAsDO != null)
            {
                RecordEvent(AutomationProperties.GetAutomationId(senderAsDO) + " " + eventString);
            }
        }

void ShowTextControlContextFlyoutStandard ( FrameworkElement targetElement ) [inline, private]

Definition at line 181 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            TextControlSelectionFlyout.ShowAt(targetElement, new FlyoutShowOptions { ShowMode = FlyoutShowMode.Standard });
        }

void ShowTextControlContextFlyoutTransient ( FrameworkElement targetElement ) [inline, private]

Definition at line 176 of file TextCommandBarFlyoutPage.xaml.cs.

        {
            TextControlContextFlyout.ShowAt(targetElement, new FlyoutShowOptions { ShowMode = FlyoutShowMode.Transient });
        }

The documentation for this class was generated from the following file:
  • CommandBarFlyout/TestUI/TextCommandBarFlyoutPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TextControlsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TextControlsPage
Public Member Functions | Private Member Functions | Private Attributes

TextControlsPage Class Reference

List of all members.

Public Member Functions

TextControlsPage ()

Private Member Functions

void | ResizeRootGrid (object sender, RoutedEventArgs e)

Private Attributes

bool | isRootGridDefaultSize = true

Detailed Description

Definition at line 11 of file TextControlsPage.xaml.cs.

Constructor & Destructor Documentation

TextControlsPage ( ) [inline]

Definition at line 15 of file TextControlsPage.xaml.cs.

        {
            this.InitializeComponent();
            resizeWindowButton.Click += ResizeRootGrid;
        }

Member Function Documentation

void ResizeRootGrid | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 21 of file TextControlsPage.xaml.cs.

        {
            if (isRootGridDefaultSize)
            {
                this.FindVisualParentByType<TestFrame>().SetRootGridSizeToCustomSize(1, 1);
            }
            else
            {
                // Reset to default size
                this.FindVisualParentByType<TestFrame>().SetRootGridSizeToCustomSize(-1, -1);
            }
            isRootGridDefaultSize = !isRootGridDefaultSize;
        }

Member Data Documentation

bool isRootGridDefaultSize = true [private]

Definition at line 13 of file TextControlsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/TextControlsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TextPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TextPage
Public Member Functions

TextPage Class Reference

List of all members.

Public Member Functions

TextPage ()

Detailed Description

Definition at line 6 of file TextPage.xaml.cs.

Constructor & Destructor Documentation

TextPage ( ) [inline]

Definition at line 8 of file TextPage.xaml.cs.

        {
            this.InitializeComponent();

            for (int i=0; i<32; i++)
                this.textBox.Text += "Text " + i + "\r\n";
        }

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/TextPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TimePickerPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TimePickerPage
Public Member Functions

TimePickerPage Class Reference

List of all members.

Public Member Functions

TimePickerPage ()

Detailed Description

Definition at line 7 of file TimePickerPage.xaml.cs.

Constructor & Destructor Documentation

TimePickerPage ( ) [inline]

Definition at line 9 of file TimePickerPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/TimePickerPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TitleBarPage
Public Member Functions | Private Member Functions

TitleBarPage Class Reference

List of all members.

Public Member Functions

TitleBarPage ()

Private Member Functions

void TitleBarWindowingButton_Click (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 21 of file TitleBarPage.xaml.cs.

Constructor & Destructor Documentation

TitleBarPage ( ) [inline]

Definition at line 23 of file TitleBarPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void TitleBarWindowingButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 28 of file TitleBarPage.xaml.cs.

        {
            var newWindow = new TitleBarPageWindow();
            newWindow.Activate();
        }

The documentation for this class was generated from the following file:
  • TitleBar/TestUI/TitleBarPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarPageWindow Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TitleBarPageWindow
Public Member Functions | Private Member Functions | Private Attributes

TitleBarPageWindow Class Reference

Inherits Microsoft::Windows::Apps::Test::Foundation::Controls::Window.

List of all members.

Public Member Functions

TitleBarPageWindow ()

Private Member Functions

void | CustomContentCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | FooterContentCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | HeaderContentCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | IsBackButtonVisibleCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | IsBackEnabledCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | IsPaneToggleButtonVisibleCheckbox_CheckedChanged (object sender, RoutedEventArgs e)
void | SetIconCheckBox_CheckedChanged (object sender, RoutedEventArgs e)
void | SetSubtitleButton_Click (object sender, RoutedEventArgs e)
void | TitleButton_Click (object sender, RoutedEventArgs e)
void | WindowingTitleBar_BackRequested (TitleBar sender, object args)
void | WindowingTitleBar_PaneToggleRequested (TitleBar sender, object args)

Private Attributes

int | backRequestedCount = 0
int | paneToggleRequestedCount = 0

Detailed Description

Definition at line 8 of file TitleBarPageWindow.xaml.cs.

Constructor & Destructor Documentation

TitleBarPageWindow ( ) [inline]

Definition at line 12 of file TitleBarPageWindow.xaml.cs.

        {
            this.InitializeComponent();

            // C# code to set AppTitleBar uielement as titlebar
            this.ExtendsContentIntoTitleBar = true;
            this.SetTitleBar(this.WindowingTitleBar);

        }

Member Function Documentation

void CustomContentCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 73 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                if (CustomContentCheckBox.IsChecked.Value)
                {
                    string xaml =
                    @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
                         <Grid.ColumnDefinitions>
                            <ColumnDefinition Width='Auto'/>
                            <ColumnDefinition Width='*' />
                         </Grid.ColumnDefinitions >

                         <Button Content='Left'/>
                         <Button Grid.Column='1' Content='Right' HorizontalAlignment='Right'/>
                    </Grid>";

                    var element = XamlReader.Load(xaml);
                    WindowingTitleBar.Content = element;
                }
                else
                {
                    WindowingTitleBar.Content = null;
                }
            }
        }

void FooterContentCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 117 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                if (FooterContentCheckBox.IsChecked.Value)
                {
                    var button = new Button();
                    button.Content = "Footer";
                    WindowingTitleBar.Footer = button;
                }
                else
                {
                    WindowingTitleBar.Footer = null;
                }
            }
        }

void HeaderContentCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 100 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                if (HeaderContentCheckBox.IsChecked.Value)
                {
                    var button = new Button();
                    button.Content = "Header";
                    WindowingTitleBar.Header = button;
                }
                else
                {
                    WindowingTitleBar.Header = null;
                }
            }
        }

void IsBackButtonVisibleCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 27 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                WindowingTitleBar.IsBackButtonVisible = IsBackButtonVisibleCheckBox.IsChecked.Value;
            }
        }

void IsBackEnabledCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 35 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                WindowingTitleBar.IsBackEnabled = IsBackEnabledCheckBox.IsChecked.Value;
            }
        }

void IsPaneToggleButtonVisibleCheckbox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 48 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                WindowingTitleBar.IsPaneToggleButtonVisible = IsPaneToggleButtonVisibleCheckbox.IsChecked.Value;
            }
        }

void SetIconCheckBox_CheckedChanged | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                if (SetIconCheckBox.IsChecked.Value)
                {
                    var icon = new Microsoft.UI.Xaml.Controls.SymbolIconSource();
                    icon.Symbol = Symbol.Mail;
                    WindowingTitleBar.IconSource = icon;
                }
                else
                {
                    WindowingTitleBar.IconSource = null;
                }
            }
        }

void SetSubtitleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 134 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                WindowingTitleBar.Subtitle = SubtitleTextBox.Text;
            }
        }

void TitleButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 142 of file TitleBarPageWindow.xaml.cs.

        {
            if (WindowingTitleBar != null)
            {
                WindowingTitleBar.Title = TitleTextBox.Text;
            }
        }

void WindowingTitleBar_BackRequested | ( | TitleBar | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 22 of file TitleBarPageWindow.xaml.cs.

        {
            BackRequestedCountTextBox.Text = (backRequestedCount++).ToString();
        }

void WindowingTitleBar_PaneToggleRequested | ( | TitleBar | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 43 of file TitleBarPageWindow.xaml.cs.

        {
            PaneToggleButtonRequestedCountTextBox.Text = (paneToggleRequestedCount++).ToString();
        }

Member Data Documentation

int backRequestedCount = 0 [private]

Definition at line 10 of file TitleBarPageWindow.xaml.cs.

int paneToggleRequestedCount = 0 [private]

Definition at line 11 of file TitleBarPageWindow.xaml.cs.

The documentation for this class was generated from the following file:
  • TitleBar/TestUI/TitleBarPageWindow.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ToggleAnimatedIconHost Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ToggleAnimatedIconHost
Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions | Private Attributes

ToggleAnimatedIconHost Class Reference

List of all members.

Public Member Functions

ToggleAnimatedIconHost ()
AnimatedIcon | GetAnimatedIcon ()

Static Public Attributes

static readonly DependencyProperty | IconSourceProperty
static readonly DependencyProperty | TitleProperty

Protected Member Functions

override void | OnApplyTemplate ()

Properties

IconSource | IconSource [get, set]
String | Title [get, set]

Private Member Functions

void | AnimatedIconTestHooks_LastAnimationSegmentChanged (AnimatedIcon sender, object args)
void | IconSourceChanged ()

Static Private Member Functions

static void | OnIconSourceChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)

Private Attributes

Border | m_iconPresenter
TextBlock | m_transitionTextBlock

Detailed Description

Definition at line 19 of file ToggleAnimatedIconHost.cs.

Constructor & Destructor Documentation

ToggleAnimatedIconHost ( ) [inline]

Definition at line 55 of file ToggleAnimatedIconHost.cs.

        {
            this.DefaultStyleKey = typeof(AnimatedIconHost);
            AnimatedIconTestHooks.LastAnimationSegmentChanged += AnimatedIconTestHooks_LastAnimationSegmentChanged;
        }

Member Function Documentation

void AnimatedIconTestHooks_LastAnimationSegmentChanged | ( | AnimatedIcon | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 61 of file ToggleAnimatedIconHost.cs.

        {
            if (sender == GetAnimatedIcon())
            {
                m_transitionTextBlock.Text = AnimatedIconTestHooks.GetLastAnimationSegment(sender);
            }
        }

AnimatedIcon GetAnimatedIcon ( ) [inline]

Definition at line 69 of file ToggleAnimatedIconHost.cs.

        {
            return m_iconPresenter.Child as AnimatedIcon;
        }

void IconSourceChanged ( ) [inline, private]

Definition at line 82 of file ToggleAnimatedIconHost.cs.

        {
            if (m_iconPresenter != null)
            {
                AnimatedIcon animatedIcon = new AnimatedIcon();
                AnimatedIconSource source = (AnimatedIconSource)IconSource;
                if (source.Source != null)
                {
                    animatedIcon.Source = source.Source;
                }
                if (source.FallbackIconSource != null)
                {
                    animatedIcon.FallbackIconSource = source.FallbackIconSource;
                }
                if (source.Foreground != null)
                {
                    animatedIcon.Foreground = source.Foreground;
                }
                m_iconPresenter.Child = animatedIcon;
            }
        }

override void OnApplyTemplate ( ) [inline, protected]

Definition at line 74 of file ToggleAnimatedIconHost.cs.

        {
            m_iconPresenter = (Border)GetTemplateChild("Icon");
            m_transitionTextBlock = (TextBlock)GetTemplateChild("TransitionTextBlock");

            IconSourceChanged();
        }

static void OnIconSourceChanged | ( | DependencyObject | d,
 |  | DependencyPropertyChangedEventArgs | e |
 | ) |  |  | [inline, static, private]

Definition at line 37 of file ToggleAnimatedIconHost.cs.

        {
            ((ToggleAnimatedIconHost)d).IconSourceChanged();
        }

Member Data Documentation

readonly DependencyProperty IconSourceProperty [static]
Initial value:
 DependencyProperty.Register(
          "IconSource",
          typeof(IconSource),
          typeof(AnimatedIconHost),
          new PropertyMetadata(null, new PropertyChangedCallback(OnIconSourceChanged))
        )

Definition at line 24 of file ToggleAnimatedIconHost.cs.

Border m_iconPresenter [private]

Definition at line 21 of file ToggleAnimatedIconHost.cs.

TextBlock m_transitionTextBlock [private]

Definition at line 22 of file ToggleAnimatedIconHost.cs.

readonly DependencyProperty TitleProperty [static]
Initial value:
 DependencyProperty.Register(
          "Title",
          typeof(String),
          typeof(ToggleAnimatedIconHost),
          null
        )

Definition at line 48 of file ToggleAnimatedIconHost.cs.

Property Documentation

IconSource IconSource [get, set]

Definition at line 32 of file ToggleAnimatedIconHost.cs.

String Title [get, set]

Definition at line 43 of file ToggleAnimatedIconHost.cs.

The documentation for this class was generated from the following file:
  • AnimatedIcon/TestUI/ToggleAnimatedIconHost.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ToolTipPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • ToolTipPage
Public Member Functions

ToolTipPage Class Reference

List of all members.

Public Member Functions

ToolTipPage ()

Detailed Description

Definition at line 7 of file ToolTipPage.xaml.cs.

Constructor & Destructor Documentation

ToolTipPage ( ) [inline]

Definition at line 9 of file ToolTipPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/ToolTipPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewItemSource
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

TreeViewItemSource Class Reference

List of all members.

Public Member Functions

TreeViewItemSource ()

Properties

ObservableCollection
< TreeViewItemSource > 		Children [get, set]
String | Content [get, set]
bool | HasUnrealizedChildren [get, set]
bool | IsExpanded [get, set]
bool | IsSelected [get, set]

Events

PropertyChangedEventHandler | PropertyChanged

Private Member Functions

void | NotifyPropertyChanged (String propertyName)

Private Attributes

bool | m_hasUnrealizedChildren
bool | m_isExpanded
bool | m_isSelected

Detailed Description

Definition at line 11 of file TreeViewItemSource.cs.

Constructor & Destructor Documentation

TreeViewItemSource ( ) [inline]

Definition at line 72 of file TreeViewItemSource.cs.

        {
            Children = new ObservableCollection<TreeViewItemSource>();
        }

Member Function Documentation

void NotifyPropertyChanged ( String propertyName ) [inline, private]

Definition at line 64 of file TreeViewItemSource.cs.

        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

Member Data Documentation

bool m_hasUnrealizedChildren [private]

Definition at line 47 of file TreeViewItemSource.cs.

bool m_isExpanded [private]

Definition at line 17 of file TreeViewItemSource.cs.

bool m_isSelected [private]

Definition at line 31 of file TreeViewItemSource.cs.

Property Documentation

ObservableCollection<TreeViewItemSource> Children [get, set]

Definition at line 15 of file TreeViewItemSource.cs.

String Content [get, set]

Definition at line 14 of file TreeViewItemSource.cs.

bool HasUnrealizedChildren [get, set]

Definition at line 49 of file TreeViewItemSource.cs.

bool IsExpanded [get, set]

Definition at line 19 of file TreeViewItemSource.cs.

bool IsSelected [get, set]

Definition at line 33 of file TreeViewItemSource.cs.

Event Documentation

PropertyChangedEventHandler PropertyChanged

Definition at line 13 of file TreeViewItemSource.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewItemSource.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemsSourceTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewItemsSourceTestPage
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

TreeViewItemsSourceTestPage Class Reference

List of all members.

Public Member Functions

TreeViewItemsSourceTestPage ()
ObservableCollection
< TreeViewViewModelItem > 		PrepareItemsSourceForContainerReuseTest ()

Private Member Functions

void | ExpandSecondItem_Click (object sender, RoutedEventArgs e)
void | ScrollToEndOfContentTreeView_Click (object sender, RoutedEventArgs e)
void | ScrollToTopOfContentTreeView_Click (object sender, RoutedEventArgs e)
void | SetUpContainerReuseTest_Click (object sender, RoutedEventArgs e)

Static Private Member Functions

static IEnumerable< UIElement > | EnumerateDescendants (UIElement?reference)

Private Attributes

readonly TreeViewViewModel | viewModel = new()

Detailed Description

Definition at line 13 of file TreeViewItemsSourceTestPage.xaml.cs.

Constructor & Destructor Documentation

TreeViewItemsSourceTestPage ( ) [inline]

Definition at line 17 of file TreeViewItemsSourceTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

static IEnumerable<UIElement> EnumerateDescendants ( UIElement? reference ) [inline, static, private]

Definition at line 45 of file TreeViewItemsSourceTestPage.xaml.cs.

        {
            var children = Enumerable
                .Range(0, VisualTreeHelper.GetChildrenCount(reference))
                .Select(x => VisualTreeHelper.GetChild(reference, x))
                .OfType<UIElement>();
            foreach (var child in children)
            {
                yield return child;
                foreach (var grandchild in EnumerateDescendants(child))
                {
                    yield return grandchild;
                }
            }
        }

void ExpandSecondItem_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 28 of file TreeViewItemsSourceTestPage.xaml.cs.

        {
            TestTreeView.RootNodes[1].IsExpanded = true;
        }

ObservableCollection<TreeViewViewModelItem> PrepareItemsSourceForContainerReuseTest ( ) [inline]

Definition at line 61 of file TreeViewItemsSourceTestPage.xaml.cs.

        {
            var list = Enumerable.Range(0, 60).Select(i =>
                new TreeViewViewModelItem {
                    Name = $"Root{i}",
                    Items = new ObservableCollection<TreeViewViewModelItem>
                    {
                    new TreeViewViewModelItem { Name = $"Root{i} Child 1", Items = new ObservableCollection<TreeViewViewModelItem>
                        {
                            new TreeViewViewModelItem { Name = $"Root{i} Grandchild 1" },
                            new TreeViewViewModelItem { Name = $"Root{i} Grandchild 2" }
                        }
                    },
                    new TreeViewViewModelItem { Name = $"Root{i} Child 2" }
                    }
                }
            ).ToList();

            return new ObservableCollection<TreeViewViewModelItem>(list);
        }

void ScrollToEndOfContentTreeView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file TreeViewItemsSourceTestPage.xaml.cs.

        {
            var sv = EnumerateDescendants(TestTreeView).OfType<ScrollViewer>().First();
            sv.ScrollToVerticalOffset(9999);
        }

void ScrollToTopOfContentTreeView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 39 of file TreeViewItemsSourceTestPage.xaml.cs.

        {
            var sv = EnumerateDescendants(TestTreeView).OfType<ScrollViewer>().First();
            sv.ScrollToVerticalOffset(0);
        }

void SetUpContainerReuseTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 22 of file TreeViewItemsSourceTestPage.xaml.cs.

        {
            TestTreeView.ItemsSource = null;
            TestTreeView.ItemsSource = PrepareItemsSourceForContainerReuseTest();
        }

Member Data Documentation

readonly TreeViewViewModel viewModel = new() [private]

Definition at line 15 of file TreeViewItemsSourceTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewItemsSourceTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemStyleSelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewItemStyleSelector
Protected Member Functions | Properties

TreeViewItemStyleSelector Class Reference

List of all members.

Protected Member Functions

override Style | SelectStyleCore (object item, DependencyObject container)

Properties

Style | Style1 [get, set]
Style | Style2 [get, set]

Detailed Description

Definition at line 33 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

Member Function Documentation

override Style SelectStyleCore | ( | object | item,
 |  | DependencyObject | container |
 | ) |  |  | [inline, protected]

Definition at line 38 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

        {
            var node = (TreeViewNode)item;
            int content = (int)node.Content;
            if (content % 2 == 0) return Style2;
            return Style1;
        }

Property Documentation

Style Style1 [get, set]

Definition at line 35 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

Style Style2 [get, set]

Definition at line 36 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewItemTemplateSelectorTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemTemplateSelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewItemTemplateSelector
Protected Member Functions | Properties

TreeViewItemTemplateSelector Class Reference

List of all members.

Protected Member Functions

override DataTemplate | SelectTemplateCore (object item)

Properties

DataTemplate | Template1 [get, set]
DataTemplate | Template2 [get, set]

Detailed Description

Definition at line 19 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

Member Function Documentation

override DataTemplate SelectTemplateCore ( object item ) [inline, protected]

Definition at line 24 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

        {
            var node = (TreeViewNode)item;
            int content = (int)node.Content;
            if (content % 2 == 0) return Template2;
            return Template1;
        }

Property Documentation

DataTemplate Template1 [get, set]

Definition at line 21 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

DataTemplate Template2 [get, set]

Definition at line 22 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewItemTemplateSelectorTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemTemplateSelectorTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewItemTemplateSelectorTestPage
Public Member Functions

TreeViewItemTemplateSelectorTestPage Class Reference

List of all members.

Public Member Functions

TreeViewItemTemplateSelectorTestPage ()

Detailed Description

Definition at line 9 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

Constructor & Destructor Documentation

TreeViewItemTemplateSelectorTestPage ( ) [inline]

Definition at line 11 of file TreeViewItemTemplateSelectorTestPage.xaml.cs.

        {
            this.InitializeComponent();
            TestTreeView.RootNodes.Add(new TreeViewNode() { Content = 1 });
            TestTreeView.RootNodes.Add(new TreeViewNode() { Content = 2 });
        }

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewItemTemplateSelectorTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewLateDataInitTest Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewLateDataInitTest
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

TreeViewLateDataInitTest Class Reference

Test page for late initialization data binding. ItemsSource is null until we click the button to set it.

List of all members.

Public Member Functions

TreeViewLateDataInitTest ()

Properties

ObservableCollection
< TreeViewItemSource > 		TestTreeViewItemsSource [get, set]

Events

PropertyChangedEventHandler | PropertyChanged

Private Member Functions

void | InitializeItemsSource_Click (object sender, RoutedEventArgs e)
void | NotifyPropertyChanged (String propertyName)
ObservableCollection
< TreeViewItemSource > 		PrepareItemsSource ()

Private Attributes

ObservableCollection
< TreeViewItemSource > 		m_testTreeViewItemsSource

Detailed Description

Definition at line 12 of file TreeViewLateDataInitTestPage.xaml.cs.

Constructor & Destructor Documentation

TreeViewLateDataInitTest ( ) [inline]

Definition at line 29 of file TreeViewLateDataInitTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void InitializeItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 34 of file TreeViewLateDataInitTestPage.xaml.cs.

        {
            TestTreeViewItemsSource = PrepareItemsSource();
        }

void NotifyPropertyChanged ( String propertyName ) [inline, private]

Definition at line 48 of file TreeViewLateDataInitTestPage.xaml.cs.

        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

ObservableCollection<TreeViewItemSource> PrepareItemsSource ( ) [inline, private]

Definition at line 39 of file TreeViewLateDataInitTestPage.xaml.cs.

        {
            var root0 = new TreeViewItemSource() { Content = "Root.0" };
            var root1 = new TreeViewItemSource() { Content = "Root.1" };
            var root = new TreeViewItemSource() { Content = "Root", Children = { root0, root1 } };

            return new ObservableCollection<TreeViewItemSource> { root };
        }

Member Data Documentation

ObservableCollection<TreeViewItemSource> m_testTreeViewItemsSource [private]

Definition at line 15 of file TreeViewLateDataInitTestPage.xaml.cs.

Property Documentation

ObservableCollection<TreeViewItemSource> TestTreeViewItemsSource [get, set]

Definition at line 17 of file TreeViewLateDataInitTestPage.xaml.cs.

Event Documentation

PropertyChangedEventHandler PropertyChanged

Definition at line 14 of file TreeViewLateDataInitTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewLateDataInitTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewNode2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewNode2

TreeViewNode2 Class Reference

Inherits TreeViewNode.

List of all members.

Detailed Description

Definition at line 9 of file TreeViewNode2.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewNode2.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewNodeInMarkupTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewNodeInMarkupTestPage
Public Member Functions

TreeViewNodeInMarkupTestPage Class Reference

List of all members.

Public Member Functions

TreeViewNodeInMarkupTestPage ()

Detailed Description

Definition at line 6 of file TreeViewNodeInMarkupTestPage.xaml.cs.

Constructor & Destructor Documentation

TreeViewNodeInMarkupTestPage ( ) [inline]

Definition at line 8 of file TreeViewNodeInMarkupTestPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewNodeInMarkupTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewPage
Public Member Functions | Public Attributes | Protected Member Functions | Properties | Private Member Functions | Private Attributes

TreeViewPage Class Reference

List of all members.

Public Member Functions

TreeViewPage ()

Public Attributes

TreeViewItem flyoutTVI

Protected Member Functions

override void | OnNavigatedFrom (NavigationEventArgs e)

Properties

ObservableCollection
< TreeViewItemSource > 		TestTreeView2ItemsSource [get, set]
ObservableCollection
< TreeViewItemSource > 		TestTreeViewItemsSource [get, set]

Private Member Functions

void | AddExtraNodes_Click (object sender, RoutedEventArgs e)
void | AddInheritedTreeViewNode_Click (object sender, RoutedEventArgs e)
void | AddNodeWithEmpyUnrealizedChildren_Click (object sender, RoutedEventArgs e)
void | AddRootNode_Click (object sender, RoutedEventArgs e)
void | AddSecondLevelOfNodes_Click (object sender, RoutedEventArgs e)
void | ChangeFlowDirection_Click (object sender, RoutedEventArgs e)
void | ChangeSelectionAfterFlyout_Click (object sender, RoutedEventArgs e)
void | ClearException_Click (object sender, RoutedEventArgs e)
void | ClearNodes_Click (object sender, RoutedEventArgs e)
void | ContentModeTestTreeView_Expanding (TreeView sender, TreeViewExpandingEventArgs args)
TreeViewNode CreateTree ()
void | DisableClickToExpand_Click (object sender, RoutedEventArgs e)
void | DisableItemDrag_Click (object sender, RoutedEventArgs e)
void | DisableItemReorder_Click (object sender, RoutedEventArgs e)
void | DragEnterForApiTest (object sender, DragEventArgs args)
void | Draggable_DragStarting (UIElement sender, DragStartingEventArgs args)
void | DragItemsCompletedForApiTest (TreeView sender, TreeViewDragItemsCompletedEventArgs args)
void | DragItemsStartingForApiTest (TreeView sender, TreeViewDragItemsStartingEventArgs args)
void | DragLeaveForApiTest (object sender, DragEventArgs args)
void | DragOverForApiTest (object sender, DragEventArgs args)
void | DropForApiTest (object sender, DragEventArgs args)
void | DropTarget_DragOver (object sender, DragEventArgs e)
async void | DropTarget_Drop (object sender, DragEventArgs e)
void | ExpandRootNode_Click (object sender, RoutedEventArgs e)
void | GetCheckBoxStates (TreeView tree)
void | GetChildrenOrder_Click (object sender, RoutedEventArgs e)
String | GetDraggedItemsNames (IEnumerable< object > items)
void | GetFlyoutTreeViewItemCount_Click (object sender, RoutedEventArgs e)
void | GetItemCommonStates_Click (object sender, RoutedEventArgs e)
void | GetItemCount_Click (object sender, RoutedEventArgs e)
string | GetItemsSourceOrder ()
void | GetMultiSelectCheckBoxStates_Click (object sender, RoutedEventArgs e)
String | GetNodeContent (TreeViewNode node)
string | GetRootNodeChildrenOrder (TreeView tree)
void | GetSelected_Click (object sender, RoutedEventArgs e)
string | GetSelection (TreeView tree)
void | GetTree2ItemCount_Click (object sender, RoutedEventArgs e)
bool | IsInContentMode ()
void | Item_DragEnter (object sender, DragEventArgs e)
void | ItemTemplateSelectorTestPage_Click (object sender, RoutedEventArgs e)
void | LabelItems_Click (object sender, RoutedEventArgs e)
void | LoadPerfTreeView_Click (object sender, RoutedEventArgs e)
void | ModifySecondLevelOfNode_Click (object sender, RoutedEventArgs e)
void | MoveNodesToNewTreeView_Click (object sender, RoutedEventArgs e)
ObservableCollection
< TreeViewItemSource > 		PrepareItemsSource (bool expandRootNode=false)
async Task
< ObservableCollection
< TreeViewItemSource > > 		PrepareItemsSourceAsync ()
void | ReadBindingResult_Click (object sender, RoutedEventArgs e)
void | RemoveSecondLevelOfNode_Click (object sender, RoutedEventArgs e)
void | ResetContentMode_Click (object sender, RoutedEventArgs e)
void | ResetItemsSource_Click (object sender, RoutedEventArgs e)
async void | ResetItemsSourceAsync_Click (object sender, RoutedEventArgs e)
void | SelectLastRootNode_Click (object sender, RoutedEventArgs e)
void | SelectRoot2Item_Click (object sender, RoutedEventArgs e)
void | SetAutomationIdForNodes (TreeView tree)
void | SetContentMode_Click (object sender, RoutedEventArgs e)
void | SetRoot1HasUnrealizedChildren_Click (object sender, RoutedEventArgs e)
void | SetupCustomDragUIOverride_Click (object sender, RoutedEventArgs e)
void | SetupDragDropHandlersForApiTest_Click (object sender, RoutedEventArgs e)
void | SetupDragToDropTarget_Click (object sender, RoutedEventArgs e)
void | SetupExpandingNodeEvent_Click (object sender, RoutedEventArgs e)
void | SetupNoReorderNodes_Click (object sender, RoutedEventArgs e)
void | SizeTreeViewsForDrags_Click (object sender, RoutedEventArgs e)
void | SwapItemsSource_Click (object sender, RoutedEventArgs e)
void | TestTreeView_DragItemsStarting (TreeView sender, TreeViewDragItemsStartingEventArgs e)
void | TestTreeView_Expanding (TreeView sender, TreeViewExpandingEventArgs args)
void | TestTreeView_ItemInvoked (TreeView sender, TreeViewItemInvokedEventArgs args)
void | TestTreeViewContentMode_ItemInvoked (TreeView sender, TreeViewItemInvokedEventArgs args)
void | ToggleRoot0Selection_Click (object sender, RoutedEventArgs e)
void | ToggleSelectedNodes_Click (object sender, RoutedEventArgs e)
void | ToggleSelectionMode_Click (object sender, RoutedEventArgs e)
void | TreeView_DragOver (object sender, DragEventArgs e)
async void | TreeView_Drop (object sender, DragEventArgs e)
void | TreeViewInFlyout_Click (object sender, RoutedEventArgs e)
void | TreeViewItemsSourceTestPage_Click (object sender, RoutedEventArgs e)
void | TreeViewLateDataInitTestPage_Click (object sender, RoutedEventArgs e)
void | TreeViewNodeInMarkupTestPage_Click (object sender, RoutedEventArgs e)
void | TreeViewUnrealizedChildrenTestPage_Click (object sender, RoutedEventArgs e)
void | TwoWayBoundButton_Click (object sender, RoutedEventArgs e)

Private Attributes

bool | _disableClickToExpand
TreeViewNode _virtualizedNode
TreeViewNode _visualRoot

Detailed Description

Definition at line 23 of file TreeViewPage.xaml.cs.

Constructor & Destructor Documentation

TreeViewPage ( ) [inline]

Definition at line 32 of file TreeViewPage.xaml.cs.

        {
            this.DataContext = this;
            this.InitializeComponent();

            MaterialHelperTestApi.IgnoreAreEffectsFast = true;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;

            _disableClickToExpand = false;

            SetupCustomDragUIOverride.Click += SetupCustomDragUIOverride_Click;

            _visualRoot = CreateTree();
            TestTreeView.RootNodes.Add(_visualRoot);

            TestTreeView2.RootNodes.Add(new TreeViewNode() { Content = "item1" });
            TestTreeView2.RootNodes.Add(new TreeViewNode() { Content = "item2" });

            TestTreeViewItemsSource = PrepareItemsSource();

            var item1 = new TreeViewItemSource() { Content = "item1" };
            var item2 = new TreeViewItemSource() { Content = "item2" };
            TestTreeView2ItemsSource = new ObservableCollection<TreeViewItemSource>() { item1, item2 };
        }

Member Function Documentation

void AddExtraNodes_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 943 of file TreeViewPage.xaml.cs.

        {
            for (int i = 1; i <= 50; i++)
            {
                TestTreeView.RootNodes.Add(new TreeViewNode() { Content = "Node " + i });
            }
        }

void AddInheritedTreeViewNode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 888 of file TreeViewPage.xaml.cs.

        {
            if (_visualRoot != null)
            {
                var node = new TreeViewNode2() { Content = "Inherited from TreeViewNode" };
                _visualRoot.Children.Add(node);
            }
        }

void AddNodeWithEmpyUnrealizedChildren_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 774 of file TreeViewPage.xaml.cs.

        {
            if (_visualRoot != null)
            {
                var node = new TreeViewNode() {
                    Content = "Root.3",
                    HasUnrealizedChildren = true,
                    IsExpanded = true
                };
                _visualRoot.Children.Add(node);
            }
        }

void AddRootNode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 918 of file TreeViewPage.xaml.cs.

        {
            try
            {
                if (IsInContentMode())
                {
                    var newNode = new TreeViewItemSource() { Content = "Root" + TestTreeViewItemsSource.Count };
                    TestTreeViewItemsSource.Add(newNode);
                }
                else
                {
                    var newNode = new TreeViewNode() { Content = "Root" + TestTreeView.RootNodes.Count };
                    TestTreeView.RootNodes.Add(newNode);
                    if (_visualRoot == null)
                    {
                        _visualRoot = newNode;
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionMessage.Text = ex.ToString();
            }
        }

void AddSecondLevelOfNodes_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 590 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                var root0 = TestTreeViewItemsSource[0].Children[0];
                var x0 = new TreeViewItemSource { Content = "Root.0.0" };
                root0.Children.Add(x0);

                var root1 = TestTreeViewItemsSource[0].Children[1];
                var y0 = new TreeViewItemSource { Content = "Root.1.0" };
                var y1 = new TreeViewItemSource { Content = "Root.1.1" };
                var y2 = new TreeViewItemSource { Content = "Root.1.2" };
                root1.Children.Add(y0);
                root1.Children.Add(y1);
                root1.Children.Add(y2);
            }
            else if (_visualRoot != null)
            {
                var root0 = _visualRoot.Children[0];
                var x0 = new TreeViewNode { Content = "Root.0.0" };
                root0.Children.Add(x0);

                var root1 = _visualRoot.Children[1];
                var y0 = new TreeViewNode { Content = "Root.1.0" };
                var y1 = new TreeViewNode { Content = "Root.1.1" };
                var y2 = new TreeViewNode { Content = "Root.1.2" };
                root1.Children.Add(y0);
                root1.Children.Add(y1);
                root1.Children.Add(y2);
            }
        }

void ChangeFlowDirection_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 387 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.FlowDirection = FlowDirection.RightToLeft;
            ContentModeTestTreeView.FlowDirection = FlowDirection.RightToLeft;
        }

void ChangeSelectionAfterFlyout_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 475 of file TreeViewPage.xaml.cs.

        {
            flyoutTVI.IsSelected = false;
        }

void ClearException_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 982 of file TreeViewPage.xaml.cs.

        {
            ExceptionMessage.Text = string.Empty;
        }

void ClearNodes_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 897 of file TreeViewPage.xaml.cs.

        {
            try
            {
                if (IsInContentMode())
                {
                    TestTreeViewItemsSource.Clear();
                }
                else if (_visualRoot != null)
                {
                    _visualRoot.Children.Clear();
                    _visualRoot = null;
                    TestTreeView.RootNodes.Clear();
                }
            }
            catch (Exception ex)
            {
                ExceptionMessage.Text = ex.ToString();
            }
        }

void ContentModeTestTreeView_Expanding | ( | TreeView | sender,
 |  | TreeViewExpandingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 372 of file TreeViewPage.xaml.cs.

        {
            var loadingItem = args.Item as TreeViewItemSource;
            var count = TestTreeViewItemsSource[0].Children.Count;
            if (loadingItem == TestTreeViewItemsSource[0].Children[count-1])
            {
                loadingItem.Children.Add(new TreeViewItemSource() { Content = "Loaded: 1" });
                loadingItem.Children.Add(new TreeViewItemSource() { Content = "Loaded: 2" });
                loadingItem.Children.Add(new TreeViewItemSource() { Content = "Loaded: 3" });
                loadingItem.HasUnrealizedChildren = false;

                Results.Text = "Loaded";
            }
        }

TreeViewNode CreateTree ( ) [inline, private]

Definition at line 443 of file TreeViewPage.xaml.cs.

        {
            var root = new TreeViewNode() { Content = "Root" };
            var root0 = new TreeViewNode() { Content = "Root.0" };
            var root1 = new TreeViewNode() { Content = "Root.1" };
            var root2 = new TreeViewNode() { Content = "Root.2" };

            root.Children.Add(root0);
            root.Children.Add(root1);
            root.Children.Add(root2);

            return root;
        }

void DisableClickToExpand_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 183 of file TreeViewPage.xaml.cs.

        {
            _disableClickToExpand = true;
        }

void DisableItemDrag_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 717 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.CanDragItems = false;
            ContentModeTestTreeView.CanDragItems = false;
        }

void DisableItemReorder_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 723 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.CanReorderItems = false;
            ContentModeTestTreeView.CanReorderItems = false;
        }

void DragEnterForApiTest | ( | object | sender,
 |  | DragEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 692 of file TreeViewPage.xaml.cs.

        {
            args.AcceptedOperation = DataPackageOperation.Copy;
            Results.Text = "DragEnter";
        }

void Draggable_DragStarting | ( | UIElement | sender,
 |  | DragStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 530 of file TreeViewPage.xaml.cs.

        {
            args.Data.SetText("Test Item");
            args.Data.RequestedOperation = DataPackageOperation.Copy;
            Results.Text = "Drag started";
        }

void DragItemsCompletedForApiTest | ( | TreeView | sender,
 |  | TreeViewDragItemsCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 734 of file TreeViewPage.xaml.cs.

        {
            Results.Text += "\nDragItemsCompleted:" + GetDraggedItemsNames(args.Items);

            var parent = args.NewParentItem;
            if (parent != null)
            {
                var parentName = IsInContentMode() ? (parent as TreeViewItemSource).Content : (parent as TreeViewNode).Content.ToString();
                Results.Text += "\nNewParent: " + parentName;
            }
        }

void DragItemsStartingForApiTest | ( | TreeView | sender,
 |  | TreeViewDragItemsStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 729 of file TreeViewPage.xaml.cs.

        {
            Results.Text = "DragItemsStarting:" + GetDraggedItemsNames(args.Items);
        }

void DragLeaveForApiTest | ( | object | sender,
 |  | DragEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 707 of file TreeViewPage.xaml.cs.

        {
            Results.Text += "->DragLeave";
        }

void DragOverForApiTest | ( | object | sender,
 |  | DragEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 698 of file TreeViewPage.xaml.cs.

        {
            args.AcceptedOperation = DataPackageOperation.Copy;
            if (!Results.Text.Contains("DragOver"))
            {
                Results.Text += "->DragOver";
            }
        }

void DropForApiTest | ( | object | sender,
 |  | DragEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 712 of file TreeViewPage.xaml.cs.

        {
            Results.Text += "->Drop";
        }

void DropTarget_DragOver | ( | object | sender,
 |  | DragEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 548 of file TreeViewPage.xaml.cs.

        {
            e.AcceptedOperation = DataPackageOperation.Copy;
        }

async void DropTarget_Drop | ( | object | sender,
 |  | DragEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 553 of file TreeViewPage.xaml.cs.

        {
            try
            {
                var text = await e.DataView.GetTextAsync();
                DropTargetTextBlock.Text = text;
            }
            catch (Exception ex)
            {
                ExceptionMessage.Text = ex.ToString();
            }
        }

void ExpandRootNode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 998 of file TreeViewPage.xaml.cs.

        {
            TestTreeViewItemsSource[0].IsExpanded = !TestTreeViewItemsSource[0].IsExpanded;
        }

void GetCheckBoxStates ( TreeView tree ) [inline, private]

Definition at line 802 of file TreeViewPage.xaml.cs.

        {
            StringBuilder sb = new StringBuilder();
            Stack<TreeViewNode> pendingNodes = new Stack<TreeViewNode>();
            pendingNodes.Push(tree.RootNodes[0]);
            while (pendingNodes.Count > 0)
            {
                var currentNode = pendingNodes.Pop();
                var children = currentNode.Children;
                var size = children.Count;
                for (int i = 0; i < size; i++)
                {
                    pendingNodes.Push(currentNode.Children[size - 1 - i]);
                }
                var treeViewItem = tree.ContainerFromNode(currentNode) as TreeViewItem;
                var checkBox = FindVisualChildByName(treeViewItem, "MultiSelectCheckBox") as CheckBox;
                if (checkBox.IsChecked == true)
                {
                    // selected
                    sb.Append("s|");
                }
                else if (checkBox.IsChecked == false)
                {
                    // unselected
                    sb.Append("u|");
                }
                else
                {
                    // partial selected
                    sb.Append("p|");
                }
            }

            Results.Text = sb.ToString();
        }

void GetChildrenOrder_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 291 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                var itemsSourceOrder = GetItemsSourceOrder();
                var treeViewNodeOrder = GetRootNodeChildrenOrder(ContentModeTestTreeView);
                // Make sure ItemsSource and TreeViewNode orders are in sync
                if (itemsSourceOrder == treeViewNodeOrder)
                {
                    Results.Text = itemsSourceOrder;
                }
                else
                {
                    Results.Text = $"ItemsSourceOrder: {itemsSourceOrder}; TreeViewNodeOrder: {treeViewNodeOrder}";
                }
            }
            else
            {
                Results.Text = GetRootNodeChildrenOrder(TestTreeView);
            }
        }

String GetDraggedItemsNames ( IEnumerable< object > items ) [inline, private]

Definition at line 746 of file TreeViewPage.xaml.cs.

        {
            var names = new StringBuilder();
            if (IsInContentMode())
            {
                foreach (TreeViewItemSource item in items)
                {
                    if (names.Length > 0) names.Append("|");
                    names.Append(item.Content);
                }
            }
            else
            {
                foreach (TreeViewNode node in items)
                {
                    if (names.Length > 0) names.Append("|");
                    names.Append(node.Content.ToString());
                }
            }

            return names.ToString();
        }

void GetFlyoutTreeViewItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 413 of file TreeViewPage.xaml.cs.

        {
            var listControl = FindVisualChildByName(this.FlyoutTreeView, "ListControl") as TreeViewList;
            flyoutTVI = (TreeViewItem)listControl.ContainerFromIndex(0);
            Results.Text = (listControl.Items.Count).ToString();
        }

void GetItemCommonStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 333 of file TreeViewPage.xaml.cs.

        {
            string commonStates = string.Empty;
            var listControl = FindVisualChildByName(this.TestTreeView, "ListControl") as TreeViewList;
            if (IsInContentMode())
            {
                listControl = FindVisualChildByName(ContentModeTestTreeView, "ListControl") as TreeViewList;
            }

            for (int i = 0; i < listControl.Items.Count; i++)
            {
                var container = (TreeViewItem)listControl.ContainerFromIndex(0);
                var groups = VisualStateManager.GetVisualStateGroups((FrameworkElement)VisualTreeHelper.GetChild(container, 0));
                foreach (var group in groups)
                {
                    if (group.Name == "CommonStates")
                    {
                        commonStates += group.CurrentState.Name + " ";
                    }
                }
            }

            Results.Text = commonStates;
        }

void GetItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 393 of file TreeViewPage.xaml.cs.

        {
            var listControl = FindVisualChildByName(TestTreeView, "ListControl") as TreeViewList;
            if (IsInContentMode())
            {
                listControl = FindVisualChildByName(ContentModeTestTreeView, "ListControl") as TreeViewList;
            }
            Results.Text = (listControl.Items.Count).ToString();
        }

string GetItemsSourceOrder ( ) [inline, private]

Definition at line 272 of file TreeViewPage.xaml.cs.

        {
            List<string> result = new List<string>();
            Stack<TreeViewItemSource> pendingItems = new Stack<TreeViewItemSource>();
            pendingItems.Push(TestTreeViewItemsSource[0]);
            while (pendingItems.Count > 0)
            {
                var currentItem = pendingItems.Pop();
                var size = currentItem.Children.Count;
                for (int i = 0; i < size; i++)
                {
                    pendingItems.Push(currentItem.Children[size - 1 - i]);
                }
                result.Add(currentItem.Content);
            }

            return string.Join(" | ", result);
        }

void GetMultiSelectCheckBoxStates_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 838 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                GetCheckBoxStates(ContentModeTestTreeView);
            }
            else
            {
                GetCheckBoxStates(TestTreeView);
            }
        }

String GetNodeContent ( TreeViewNode node ) [inline, private]

Definition at line 242 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                TreeViewItemSource item = node.Content as TreeViewItemSource;
                return item.Content;
            }
            return node.Content.ToString();
        }

string GetRootNodeChildrenOrder ( TreeView tree ) [inline, private]

Definition at line 252 of file TreeViewPage.xaml.cs.

        {
            List<string> result = new List<string>();
            Stack<TreeViewNode> pendingNodes = new Stack<TreeViewNode>();
            pendingNodes.Push(tree.RootNodes[0]);
            while (pendingNodes.Count > 0)
            {
                var currentNode = pendingNodes.Pop();
                var size = currentNode.Children.Count;
                for (int i = 0; i < size; i++)
                {
                    pendingNodes.Push(currentNode.Children[size - 1 - i]);
                }

                result.Add(GetNodeContent(currentNode));
            }

            return string.Join(" | ", result);
        }

void GetSelected_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 132 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                Results.Text = GetSelection(ContentModeTestTreeView);
            }
            else
            {
                Results.Text = GetSelection(TestTreeView);
            }
        }

string GetSelection ( TreeView tree ) [inline, private]

Definition at line 95 of file TreeViewPage.xaml.cs.

        {
            int count = tree.SelectedNodes.Count;

            if (count != tree.SelectedItems.Count)
            {
                return "SelectedNodes.Count != SelectedItems.Count";
            }

            List<string> result = new List<string>();
            for (int i = 0; i < count; i++)
            {
                // Make sure selectedNodes and SelectedItems are in sync
                var node = tree.SelectedNodes[i];
                var item = IsInContentMode() ? node.Content : node;
                if (item != tree.SelectedItems[i])
                {
                    return "$SelectedNodes[{i}] != SelectedItems[{i}]";
                }

                result.Add(GetNodeContent(node));
            }

            result.Sort();

            // Verify SelectedItem and SelectedNode for single selection
            if(tree.SelectionMode == TreeViewSelectionMode.Single && result.Count > 0)
            {
                if(tree.SelectedItem != tree.SelectedItems[0] || tree.SelectedNode != tree.SelectedNodes[0])
                {
                    return "SelectedItem!=SelectedItems[0] || SelectedNode!=SelectedNodes[0]";
                }
            }

            return result.Count > 0 ? "Selected: " + string.Join(", ", result) : "Nothing selected";
        }

void GetTree2ItemCount_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 403 of file TreeViewPage.xaml.cs.

        {
            var listControl = FindVisualChildByName(TestTreeView2, "ListControl") as TreeViewList;
            if (IsInContentMode())
            {
                listControl = FindVisualChildByName(ContentModeTestTreeView2, "ListControl") as TreeViewList;
            }
            Results.Text = (listControl.Items.Count).ToString();
        }

bool IsInContentMode ( ) [inline, private]

Definition at line 797 of file TreeViewPage.xaml.cs.

        {
            return Mode.Text.Equals("content mode");
        }

void Item_DragEnter | ( | object | sender,
 |  | DragEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 508 of file TreeViewPage.xaml.cs.

        {
            e.DragUIOverride.Caption = "test caption";
            e.DragUIOverride.IsCaptionVisible = true;
            e.DragUIOverride.IsGlyphVisible = false;
            e.DragUIOverride.IsContentVisible = false;
            e.Handled = true;
        }

void ItemTemplateSelectorTestPage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 769 of file TreeViewPage.xaml.cs.

        {
            this.Frame.NavigateWithoutAnimation(typeof(TreeViewItemTemplateSelectorTestPage));
        }

void LabelItems_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 206 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                SetAutomationIdForNodes(ContentModeTestTreeView);
            }
            else
            {
                SetAutomationIdForNodes(TestTreeView);
            }
        }

void LoadPerfTreeView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1030 of file TreeViewPage.xaml.cs.

        {
            TreeViewNode rootNode = new TreeViewNode() { Content = "Root" };
            for (int level1Index = 0; level1Index < 10; level1Index++)
            {
                TreeViewNode level1 = new TreeViewNode()
                {
                    Content = level1Index,
                };
                rootNode.Children.Add(level1);

                for (int level2Index = 0; level2Index < 5000; level2Index++)
                {
                    TreeViewNode level2 = new TreeViewNode()
                    {
                        Content = level1Index + "_" + level2Index,
                    };
                    level1.Children.Add(level2);
                }
            }
            PerfScenarioTreeView.RootNodes.Clear();
            PerfScenarioTreeView.RootNodes.Add(rootNode);
        }

void ModifySecondLevelOfNode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 636 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                var y0 = new TreeViewItemSource { Content = "THIS IS NEW" };
                var root0 = TestTreeViewItemsSource[0].Children[0];
                root0.Children[0] = y0;
            }
            else if (_visualRoot != null)
            {
                var y0 = new TreeViewNode { Content = "THIS IS NEW" };
                var root0 = _visualRoot.Children[0];
                root0.Children[0] = y0;
            }
        }

void MoveNodesToNewTreeView_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 167 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                ContentModeTestTreeView.ItemsSource = null;
                TestTreeView2ItemsSource.Add(TestTreeViewItemsSource[0]);
                ContentModeTestStackPanel.Children.Remove(ContentModeTestTreeView);
            }
            else if (_visualRoot != null)
            {
                TestTreeView.RootNodes.Remove(_visualRoot);
                TestTreeView2.RootNodes.Add(_visualRoot);
                TestStackPanel.Children.Remove(TestTreeView);
            }
        }

override void OnNavigatedFrom ( NavigationEventArgs e ) [inline, protected]

Definition at line 87 of file TreeViewPage.xaml.cs.

        {
            // Unset all override flags to avoid impacting subsequent tests
            MaterialHelperTestApi.IgnoreAreEffectsFast = false;
            MaterialHelperTestApi.SimulateDisabledByPolicy = false;
            base.OnNavigatedFrom(e);
        }

ObservableCollection<TreeViewItemSource> PrepareItemsSource ( bool expandRootNode = false ) [inline, private]

Definition at line 57 of file TreeViewPage.xaml.cs.

        {
            var root0 = new TreeViewItemSource() { Content = "Root.0" };
            var root1 = new TreeViewItemSource() { Content = "Root.1" };
            var root2 = new TreeViewItemSource() { Content = "Root.2" };
            var root = new TreeViewItemSource() { Content = "Root", Children = { root0, root1, root2 }, IsExpanded = expandRootNode };

            return new ObservableCollection<TreeViewItemSource>{root};
        }

async Task<ObservableCollection<TreeViewItemSource> > PrepareItemsSourceAsync ( ) [inline, private]

Definition at line 67 of file TreeViewPage.xaml.cs.

        {
            return await Task.Run(() => {
                var items = PrepareItemsSource(expandRootNode: true);

                var root0 = items[0].Children[0];
                var x0 = new TreeViewItemSource { Content = "Root.0.0" };
                root0.Children.Add(x0);

                var root1 = items[0].Children[1];
                var y0 = new TreeViewItemSource { Content = "Root.1.0" };
                var y1 = new TreeViewItemSource { Content = "Root.1.1" };
                root1.Children.Add(y0);
                root1.Children.Add(y1);
                root1.IsExpanded = true;

                return items;
            });
        }

void ReadBindingResult_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1024 of file TreeViewPage.xaml.cs.

        {
            Results.Text = ((TwoWayBoundButton.Content as TreeViewNode).Content as string)
                + ";" + (TestTreeView.SelectedItem as TreeViewNode).Content as string;
        }

void RemoveSecondLevelOfNode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 622 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                var root0 = TestTreeViewItemsSource[0].Children[0];
                root0.Children.RemoveAt(0);
            }
            else if (_visualRoot != null)
            {
                var root0 = _visualRoot.Children[0];
                root0.Children.RemoveAt(0);
            }
        }

void ResetContentMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 792 of file TreeViewPage.xaml.cs.

        {
            Mode.Text = string.Empty;
        }

void ResetItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 993 of file TreeViewPage.xaml.cs.

        {
            ContentModeTestTreeView.ItemsSource = PrepareItemsSource(expandRootNode: true);
        }

async void ResetItemsSourceAsync_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 987 of file TreeViewPage.xaml.cs.

        {
            TestTreeViewItemsSource = await PrepareItemsSourceAsync();
            this.Bindings.Update();
        }

void SelectLastRootNode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 951 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.SelectedNode = TestTreeView.RootNodes[TestTreeView.RootNodes.Count-1];
        }

void SelectRoot2Item_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1020 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.SelectedItem = TestTreeView.RootNodes[0].Children[2];
        }

void SetAutomationIdForNodes ( TreeView tree ) [inline, private]

Definition at line 218 of file TreeViewPage.xaml.cs.

        {
            var listControl = FindVisualChildByName(this.TestTreeView, "ListControl") as TreeViewList;
            Stack<TreeViewNode> pendingNodes = new Stack<TreeViewNode>();
            foreach (var node in tree.RootNodes)
            {
                pendingNodes.Push(node);
            }
            while (pendingNodes.Count > 0)
            {
                var currentNode = pendingNodes.Pop();
                foreach (var child in currentNode.Children)
                {
                    pendingNodes.Push(child);
                }

                var container = tree.ContainerFromNode(currentNode);
                if (container != null)
                {
                    AutomationProperties.SetAutomationId(container as DependencyObject, GetNodeContent(currentNode));
                }
            }
        }

void SetContentMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 787 of file TreeViewPage.xaml.cs.

        {
            Mode.Text = "content mode";
        }

void SetRoot1HasUnrealizedChildren_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 652 of file TreeViewPage.xaml.cs.

        {
            if (_visualRoot != null)
            {
                var root1 = _visualRoot.Children[1];
                root1.HasUnrealizedChildren = true;
                TestTreeView.Expanding += (tv, args) =>
                {
                    Results.Text = "Expanding Raised";
                };

                TestTreeViewItemsSource[0].Children[1].HasUnrealizedChildren = true;
                ContentModeTestTreeView.Expanding += (tv, args) =>
                {
                    Results.Text = "Expanding Raised";
                };
            }
        }

void SetupCustomDragUIOverride_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 499 of file TreeViewPage.xaml.cs.

        {
            List<TreeViewItem> items = FindVisualChildrenByType<TreeViewItem>(this.TestTreeView);
            TreeViewItem lastItem = items.Last();

            lastItem.DragEnter += Item_DragEnter;
            AutomationProperties.SetName(lastItem, "CustomDragUIOverrideDropTarget");
        }

void SetupDragDropHandlersForApiTest_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 671 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.Height = 200;
            TestTreeView2.Height = 200;
            TestTreeView.DragItemsStarting += DragItemsStartingForApiTest;
            TestTreeView.DragItemsCompleted += DragItemsCompletedForApiTest;
            TestTreeView2.DragEnter += DragEnterForApiTest;
            TestTreeView2.DragOver += DragOverForApiTest;
            TestTreeView2.DragLeave += DragLeaveForApiTest;
            TestTreeView2.Drop += DropForApiTest;

            ContentModeTestTreeView.Height = 200;
            ContentModeTestTreeView2.Height = 200;
            ContentModeTestTreeView.DragItemsStarting += DragItemsStartingForApiTest;
            ContentModeTestTreeView.DragItemsCompleted += DragItemsCompletedForApiTest;
            ContentModeTestTreeView2.DragEnter += DragEnterForApiTest;
            ContentModeTestTreeView2.DragOver += DragOverForApiTest;
            ContentModeTestTreeView2.DragLeave += DragLeaveForApiTest;
            ContentModeTestTreeView2.Drop += DropForApiTest;
        }

void SetupDragToDropTarget_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 480 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.Height = 200;
            TestTreeView2.Visibility = Visibility.Collapsed;

            ContentModeTestTreeView.Height = 200;
            ContentModeTestTreeView2.Visibility = Visibility.Collapsed;

            TestTreeView.DragItemsStarting += TestTreeView_DragItemsStarting;
            TestTreeView.DragOver += TreeView_DragOver;
            TestTreeView.Drop += TreeView_Drop;

            ContentModeTestTreeView.DragItemsStarting += TestTreeView_DragItemsStarting;
            ContentModeTestTreeView.DragOver += TreeView_DragOver;
            ContentModeTestTreeView.Drop += TreeView_Drop;

            DraggableElement.DragStarting += Draggable_DragStarting;
        }

void SetupExpandingNodeEvent_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 188 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                TreeViewItemSource item = new TreeViewItemSource() { Content = "Virtualized", HasUnrealizedChildren = true };
                TestTreeViewItemsSource[0].Children.Add(item);
                ContentModeTestTreeView.Expanding += ContentModeTestTreeView_Expanding;
            }
            else if(_visualRoot != null)
            {
                _virtualizedNode = new TreeViewNode() { Content = "Virtualized" };
                _virtualizedNode.HasUnrealizedChildren = true;
                _visualRoot.Children.Add(_virtualizedNode);

                TestTreeView.Expanding += TestTreeView_Expanding;
            }
        }

void SetupNoReorderNodes_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 420 of file TreeViewPage.xaml.cs.

        {
            var treeView = IsInContentMode() ? ContentModeTestTreeView : TestTreeView;
            var listControl = FindVisualChildByName(treeView, "ListControl") as TreeViewList;
            var lockedItem = (TreeViewItem)listControl.ContainerFromIndex(1);
            lockedItem.AllowDrop = false;

            if (IsInContentMode())
            {
                var lockedNode = treeView.ItemFromContainer(lockedItem) as TreeViewItemSource;
                lockedNode.Children.Add(new TreeViewItemSource() { Content = "Locked1" });
                lockedNode.Children.Add(new TreeViewItemSource() { Content = "Locked2" });
                lockedNode.Children.Add(new TreeViewItemSource() { Content = "Locked3" });
            }
            else
            {
                var lockedNode = treeView.NodeFromContainer(lockedItem);
                lockedNode.Children.Add(new TreeViewNode() { Content = "Locked1" });
                lockedNode.Children.Add(new TreeViewNode() { Content = "Locked2" });
                lockedNode.Children.Add(new TreeViewNode() { Content = "Locked3" });
            }
        }

void SizeTreeViewsForDrags_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 542 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.Height = 200;
            TestTreeView2.Height = 200;
        }

void SwapItemsSource_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1003 of file TreeViewPage.xaml.cs.

        {
            if (ContentModeTestTreeView.ItemsSource == TestTreeView2ItemsSource)
            {
                this.ContentModeTestTreeView.ItemsSource = TestTreeViewItemsSource;
            }
            else
            {
                this.ContentModeTestTreeView.ItemsSource = TestTreeView2ItemsSource;
            }
        }

void TestTreeView_DragItemsStarting | ( | TreeView | sender,
 |  | TreeViewDragItemsStartingEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 566 of file TreeViewPage.xaml.cs.

        {
            var items = new StringBuilder();
            if (IsInContentMode())
            {
                foreach (TreeViewItemSource item in e.Items)
                {
                    if (items.Length > 0) items.AppendLine();
                    items.Append(item.Content);
                }
            }
            else
            {
                foreach (TreeViewNode node in e.Items)
                {
                    if (items.Length > 0) items.AppendLine();
                    items.Append(node.Content.ToString());
                }
            }

            e.Data.SetText(items.ToString());
            e.Data.RequestedOperation = DataPackageOperation.Copy;
        }

void TestTreeView_Expanding | ( | TreeView | sender,
 |  | TreeViewExpandingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 358 of file TreeViewPage.xaml.cs.

        {
            var loadingNode = args.Node;
            if (loadingNode == _virtualizedNode)
            {
                loadingNode.Children.Add(new TreeViewNode() { Content = "Loaded: 1" });
                loadingNode.Children.Add(new TreeViewNode() { Content = "Loaded: 2" });
                loadingNode.Children.Add(new TreeViewNode() { Content = "Loaded: 3" });
                loadingNode.HasUnrealizedChildren = false;

                Results.Text = "Loaded";
            }
        }

void TestTreeView_ItemInvoked | ( | TreeView | sender,
 |  | TreeViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 144 of file TreeViewPage.xaml.cs.

        {
            var data = ((TreeViewNode)args.InvokedItem).Content.ToString();
            Results.Text = "ItemClicked:" + data;

            if (!_disableClickToExpand)
            {
                var node = args.InvokedItem as TreeViewNode;
                node.IsExpanded = !node.IsExpanded;
            }
        }

void TestTreeViewContentMode_ItemInvoked | ( | TreeView | sender,
 |  | TreeViewItemInvokedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 156 of file TreeViewPage.xaml.cs.

        {
            var item = args.InvokedItem as TreeViewItemSource;
            Results.Text = "ItemClicked:" + item.Content;

            if (!_disableClickToExpand)
            {
                item.IsExpanded = !item.IsExpanded;
            }
        }

void ToggleRoot0Selection_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 961 of file TreeViewPage.xaml.cs.

        {
            TestTreeView.SelectedNode = TestTreeView.SelectedNode == null ? TestTreeView.RootNodes[0].Children[0] : null;
            ContentModeTestTreeView.SelectedItem = ContentModeTestTreeView.SelectedItem==null ? TestTreeViewItemsSource[0].Children[0] : null;
        }

void ToggleSelectedNodes_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 850 of file TreeViewPage.xaml.cs.

        {
            if (IsInContentMode())
            {
                ContentModeTestTreeView.SelectionMode = TreeViewSelectionMode.Multiple;
                var item0 = TestTreeViewItemsSource[0].Children[0];
                var item2 = TestTreeViewItemsSource[0].Children[2];
                var selectedItems = ContentModeTestTreeView.SelectedItems;
                if (selectedItems.Contains(item0))
                {
                    selectedItems.Remove(item0);
                    selectedItems.Remove(item2);
                }
                else
                {
                    selectedItems.Add(item0);
                    selectedItems.Add(item2);
                }
            }
            else
            {
                TestTreeView.SelectionMode = TreeViewSelectionMode.Multiple;
                var node0 = TestTreeView.RootNodes[0].Children[0];
                var node2 = TestTreeView.RootNodes[0].Children[2];
                var selectedNodes = TestTreeView.SelectedNodes;
                if (selectedNodes.Contains(node0))
                {
                    selectedNodes.Remove(node0);
                    selectedNodes.Remove(node2);
                }
                else
                {
                    selectedNodes.Add(node0);
                    selectedNodes.Add(node2);
                }
            }
        }

void ToggleSelectionMode_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 313 of file TreeViewPage.xaml.cs.

        {
            var selectionMode = TreeViewSelectionMode.Single;
            if (TestTreeView.SelectionMode == TreeViewSelectionMode.Single)
            {
                selectionMode = TreeViewSelectionMode.Multiple;
            }
            else if (TestTreeView.SelectionMode == TreeViewSelectionMode.Multiple)
            {
                selectionMode = TreeViewSelectionMode.None;
            }
            else
            {
                selectionMode = TreeViewSelectionMode.Single;
            }

            TestTreeView.SelectionMode = selectionMode;
            ContentModeTestTreeView.SelectionMode = selectionMode;
        }

void TreeView_DragOver | ( | object | sender,
 |  | DragEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 537 of file TreeViewPage.xaml.cs.

        {
            e.AcceptedOperation = DataPackageOperation.Copy;
        }

async void TreeView_Drop | ( | object | sender,
 |  | DragEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 517 of file TreeViewPage.xaml.cs.

        {
            try
            {
                var text = await e.DataView.GetTextAsync();
                Results.Text = "Dropped: " + text;
            }
            catch (Exception ex)
            {
                ExceptionMessage.Text = ex.ToString();
            }
        }

void TreeViewInFlyout_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 457 of file TreeViewPage.xaml.cs.

        {
            FrameworkElement element = sender as FrameworkElement;
            if (element != null)
            {
                if (FlyoutTreeView.RootNodes.Count == 0)
                {
                    FlyoutTreeView.RootNodes.Add(CreateTree());
                }
                else
                {
                    FlyoutTreeView.RootNodes[0] = CreateTree();
                }

                FlyoutBase.ShowAttachedFlyout(element);
            }
        }

void TreeViewItemsSourceTestPage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 977 of file TreeViewPage.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(TreeViewItemsSourceTestPage));
        }

void TreeViewLateDataInitTestPage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 956 of file TreeViewPage.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(TreeViewLateDataInitTest));
        }

void TreeViewNodeInMarkupTestPage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 967 of file TreeViewPage.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(TreeViewNodeInMarkupTestPage));
        }

void TreeViewUnrealizedChildrenTestPage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 972 of file TreeViewPage.xaml.cs.

        {
            Frame.NavigateWithoutAnimation(typeof(TreeViewUnrealizedChildrenTestPage));
        }

void TwoWayBoundButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1015 of file TreeViewPage.xaml.cs.

        {
            TwoWayBoundButton.Content = TestTreeView.RootNodes[0].Children[1];
        }

Member Data Documentation

bool _disableClickToExpand [private]

Definition at line 25 of file TreeViewPage.xaml.cs.

TreeViewNode _virtualizedNode [private]

Definition at line 28 of file TreeViewPage.xaml.cs.

TreeViewNode _visualRoot [private]

Definition at line 27 of file TreeViewPage.xaml.cs.

TreeViewItem flyoutTVI

Definition at line 26 of file TreeViewPage.xaml.cs.

Property Documentation

ObservableCollection<TreeViewItemSource> TestTreeView2ItemsSource [get, set]

Definition at line 30 of file TreeViewPage.xaml.cs.

ObservableCollection<TreeViewItemSource> TestTreeViewItemsSource [get, set]

Definition at line 29 of file TreeViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewUnrealizedChildrenTestPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewUnrealizedChildrenTestPage
Public Member Functions | Public Attributes | Private Member Functions

TreeViewUnrealizedChildrenTestPage Class Reference

An empty page that can be used on its own or navigated to within a Frame.

List of all members.

Public Member Functions

TreeViewUnrealizedChildrenTestPage ()

Public Attributes

CustomContent CustomContentRootNode
TreeViewNode VirtualizingTestRootNode

Private Member Functions

void | GetSelectedItemName_Click (object sender, RoutedEventArgs e)
void | UnrealizedTreeViewSelection_Collapsed (Microsoft.UI.Xaml.Controls.TreeView sender, Microsoft.UI.Xaml.Controls.TreeViewCollapsedEventArgs args)
void | UnrealizedTreeViewSelection_Expanding (Microsoft.UI.Xaml.Controls.TreeView sender, Microsoft.UI.Xaml.Controls.TreeViewExpandingEventArgs args)

Detailed Description

Definition at line 23 of file TreeViewUnrealizedChildrenTestPage.xaml.cs.

Constructor & Destructor Documentation

TreeViewUnrealizedChildrenTestPage ( ) [inline]

Definition at line 29 of file TreeViewUnrealizedChildrenTestPage.xaml.cs.

        {

            this.InitializeComponent();
            CustomContentRootNode = new CustomContent(3);
            VirtualizingTestRootNode = CustomContentRootNode.GetTreeViewNode();
            UnrealizedTreeViewSelection.RootNodes.Add(VirtualizingTestRootNode);
        }

Member Function Documentation

void GetSelectedItemName_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 38 of file TreeViewUnrealizedChildrenTestPage.xaml.cs.

        {
            SelectedItemName.Text = ((UnrealizedTreeViewSelection.SelectedItem as TreeViewNode).Content as CustomContent).ToString();
        }

void UnrealizedTreeViewSelection_Collapsed | ( | Microsoft.UI.Xaml.Controls.TreeView | sender,
 |  | Microsoft.UI.Xaml.Controls.TreeViewCollapsedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 47 of file TreeViewUnrealizedChildrenTestPage.xaml.cs.

        {
            VirtualizingDataSource.EmptyTreeNode(args.Node);
        }

void UnrealizedTreeViewSelection_Expanding | ( | Microsoft.UI.Xaml.Controls.TreeView | sender,
 |  | Microsoft.UI.Xaml.Controls.TreeViewExpandingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 43 of file TreeViewUnrealizedChildrenTestPage.xaml.cs.

        {
            VirtualizingDataSource.FillTreeNode(args.Node);
        }

Member Data Documentation

CustomContent CustomContentRootNode

Definition at line 27 of file TreeViewUnrealizedChildrenTestPage.xaml.cs.

TreeViewNode VirtualizingTestRootNode

Definition at line 26 of file TreeViewUnrealizedChildrenTestPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewUnrealizedChildrenTestPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewViewModel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewViewModel
Public Member Functions | Properties

TreeViewViewModel Class Reference

List of all members.

Public Member Functions

TreeViewViewModel ()

Properties

ObservableCollection
< TreeViewViewModelItem > 		Items [get, set]

Detailed Description

Definition at line 15 of file TreeViewViewModel.cs.

Constructor & Destructor Documentation

TreeViewViewModel ( ) [inline]

Definition at line 19 of file TreeViewViewModel.cs.

        {
            Items = new ObservableCollection<TreeViewViewModelItem>();

            for (int i = 0; i < 5; i++)
            {
                TreeViewViewModelItem item = new()
                {
                    Name = $"Item {i + 1}",
                    Items = new ObservableCollection<TreeViewViewModelItem>()
                };

                for (int j = 0; j < 5; j++)
                {
                    item.Items.Add(new TreeViewViewModelItem()
                    {
                        Name = $"Item {i + 1}.{j + 1}"
                    });
                }

                Items.Add(item);
            }
        }

Property Documentation

ObservableCollection<TreeViewViewModelItem> Items [get, set]

Definition at line 17 of file TreeViewViewModel.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewViewModel.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewViewModelItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TreeViewViewModelItem
Properties

TreeViewViewModelItem Class Reference

List of all members.

Properties

ObservableCollection
< TreeViewViewModelItem > 		Items [get, set]
string Name [get, set]

Detailed Description

Definition at line 8 of file TreeViewViewModel.cs.

Property Documentation

ObservableCollection<TreeViewViewModelItem> Items [get, set]

Definition at line 12 of file TreeViewViewModel.cs.

string Name [get, set]

Definition at line 10 of file TreeViewViewModel.cs.

The documentation for this class was generated from the following file:
  • TreeView/TestUI/TreeViewViewModel.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneViewPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • TwoPaneViewPage
Public Member Functions | Private Member Functions | Private Attributes

TwoPaneViewPage Class Reference

List of all members.

Public Member Functions

TwoPaneViewPage ()

Private Member Functions

void | AddMarginCheckBox_Checked (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | AddMarginCheckBox_Unchecked (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | HeightComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | MinTallModeHeightTextBox_TextChanged (object sender, TextChangedEventArgs e)
void | MinWideModeWidthTextBox_TextChanged (object sender, TextChangedEventArgs e)
void | OneSideCheckBox_Checked (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | OneSideCheckBox_Unchecked (object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
void | Pane1LengthComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | Pane1LengthTextBox_TextChanged (object sender, TextChangedEventArgs e)
void | Pane2LengthComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | Pane2LengthTextBox_TextChanged (object sender, TextChangedEventArgs e)
void | PanePriorityComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | PaneSizeChanged (object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e)
void | SimulateComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | TallModeConfigurationComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | TwoPaneView_ModeChanged (TwoPaneView sender, object args)
void | TwoPaneView_SizeChanged (object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e)
void | UpdateLength (int pane)
string | ViewModeToString (TwoPaneViewMode configuration)
void | WideModeConfigurationComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | WidthComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

Thickness | c_controlMargin = new Thickness(40, 10, 30, 20)
const double | c_defaultMinTallModeHeight = 641.0
const double | c_defaultMinWideModeWidth = 641.0
const double | c_simulatedMiddle = 12.0
const double | c_simulatedPaneHeight = 400.0
const double | c_simulatedPaneWidth = 300.0

Detailed Description

Definition at line 16 of file TwoPaneViewPage.xaml.cs.

Constructor & Destructor Documentation

TwoPaneViewPage ( ) [inline]

Definition at line 30 of file TwoPaneViewPage.xaml.cs.

        {
            this.InitializeComponent();

            DisplayRegionHelperTestApi.SimulateDisplayRegions = false;

            TwoPaneView.ModeChanged += TwoPaneView_ModeChanged;
            ConfigurationTextBlock.Text = TwoPaneView.Mode.ToString();
        }

Member Function Documentation

void AddMarginCheckBox_Checked | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 161 of file TwoPaneViewPage.xaml.cs.

        {
            TwoPaneView.Margin = c_controlMargin;
        }

void AddMarginCheckBox_Unchecked | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 166 of file TwoPaneViewPage.xaml.cs.

        {
            TwoPaneView.Margin = new Thickness(0);
        }

void HeightComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 121 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            switch (HeightComboBox.SelectedIndex)
            {
                case 0: TwoPaneView.Height = double.NaN; break;
                case 1: TwoPaneView.Height = c_defaultMinTallModeHeight + 10; break;
                case 2: TwoPaneView.Height = c_defaultMinTallModeHeight - 10; break;
            }
        }

void MinTallModeHeightTextBox_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            double newHeight;
            if (double.TryParse(MinTallModeHeightTextBox.Text, out newHeight))
            {
                TwoPaneView.MinTallModeHeight = newHeight;
            }
        }

void MinWideModeWidthTextBox_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 87 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            double newWidth;
            if (double.TryParse(MinWideModeWidthTextBox.Text, out newWidth))
            {
                TwoPaneView.MinWideModeWidth = newWidth;
            }
        }

void OneSideCheckBox_Checked | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 171 of file TwoPaneViewPage.xaml.cs.

        {
            TwoPaneView.HorizontalAlignment = HorizontalAlignment.Left;
            TwoPaneView.Width = c_simulatedPaneWidth;
        }

void OneSideCheckBox_Unchecked | ( | object | sender,
 |  | Microsoft.UI.Xaml.RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 177 of file TwoPaneViewPage.xaml.cs.

        {
            TwoPaneView.HorizontalAlignment = HorizontalAlignment.Stretch;
            TwoPaneView.Width = double.NaN;
        }

void Pane1LengthComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 224 of file TwoPaneViewPage.xaml.cs.

        {
            UpdateLength(1);
        }

void Pane1LengthTextBox_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 219 of file TwoPaneViewPage.xaml.cs.

        {
            UpdateLength(1);
        }

void Pane2LengthComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 234 of file TwoPaneViewPage.xaml.cs.

        {
            UpdateLength(2);
        }

void Pane2LengthTextBox_TextChanged | ( | object | sender,
 |  | TextChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 229 of file TwoPaneViewPage.xaml.cs.

        {
            UpdateLength(2);
        }

void PanePriorityComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 56 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            TwoPaneView.PanePriority = PanePriorityComboBox.SelectedIndex == 0 ? TwoPaneViewPriority.Pane1 : TwoPaneViewPriority.Pane2;
        }

void PaneSizeChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 183 of file TwoPaneViewPage.xaml.cs.

        {
            TextBlock widthTextBlock = (sender == Pane1Content) ? WidthText1 : WidthText2;
            TextBlock heightTextBlock = (sender == Pane1Content) ? HeightText1 : HeightText2;

            widthTextBlock.Text = ((int)e.NewSize.Width).ToString();
            heightTextBlock.Text = ((int)e.NewSize.Height).ToString();

            if (TwoPaneView.Mode == TwoPaneViewMode.SinglePane)
            {
                SpacingTextBox.Text = "0";
            }
            else
            {
                GeneralTransform t = Pane1Content.TransformToVisual(SimulatedWindow);
                Rect bounds = new Rect(0, 0, Pane1Content.ActualWidth, Pane1Content.ActualHeight);
                Rect rc1 = t.TransformBounds(bounds);

                t = Pane2Content.TransformToVisual(SimulatedWindow);
                bounds = new Rect(0, 0, Pane2Content.ActualWidth, Pane2Content.ActualHeight);
                Rect rc2 = t.TransformBounds(bounds);

                int spacing = (int)((TwoPaneView.Mode == TwoPaneViewMode.Wide)
                    ? rc2.X - (rc1.X + rc1.Width)
                    : rc2.Y - (rc1.Y + rc1.Height));

                SpacingTextBox.Text = spacing.ToString();
            }
        }

void SimulateComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 133 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            switch (SimulateComboBox.SelectedIndex)
            {
                case 0:
                    DisplayRegionHelperTestApi.SimulateDisplayRegions = false;
                    SimulatedWindow.Width = double.NaN;
                    SimulatedWindow.Height = double.NaN;
                    break;

                case 1:
                    DisplayRegionHelperTestApi.SimulateDisplayRegions = true;
                    DisplayRegionHelperTestApi.SimulateMode = TwoPaneViewMode.Wide;
                    SimulatedWindow.Width = c_simulatedPaneWidth * 2 + c_simulatedMiddle;
                    SimulatedWindow.Height = c_simulatedPaneHeight;
                    break;

                case 2:
                    DisplayRegionHelperTestApi.SimulateDisplayRegions = true;
                    DisplayRegionHelperTestApi.SimulateMode = TwoPaneViewMode.Tall;
                    SimulatedWindow.Width = c_simulatedPaneHeight;
                    SimulatedWindow.Height = c_simulatedPaneWidth * 2 + c_simulatedMiddle;
                    break;
            }
        }

void TallModeConfigurationComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 75 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            switch (TallModeConfigurationComboBox.SelectedIndex)
            {
                case 0: TwoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.TopBottom; break;
                case 1: TwoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.BottomTop; break;
                case 2: TwoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.SinglePane; break;
            }
        }

void TwoPaneView_ModeChanged | ( | TwoPaneView | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 40 of file TwoPaneViewPage.xaml.cs.

        {
            ConfigurationTextBlock.Text = TwoPaneView.Mode.ToString();
        }

void TwoPaneView_SizeChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 213 of file TwoPaneViewPage.xaml.cs.

        {
            ControlWidthText.Text = ((int)e.NewSize.Width).ToString();
            ControlHeightText.Text = ((int)e.NewSize.Height).ToString();
        }

void UpdateLength ( int pane ) [inline, private]

Definition at line 239 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            TextBox textBox = pane == 1 ? Pane1LengthTextBox : Pane2LengthTextBox;
            ComboBox comboBox = pane == 1 ? Pane1LengthComboBox : Pane2LengthComboBox;

            double value;
            if (double.TryParse(textBox.Text, out value))
            {
                GridUnitType type = GridUnitType.Auto;

                switch (comboBox.SelectedIndex)
                {
                    case 1: type = GridUnitType.Pixel; break;
                    case 2: type = GridUnitType.Star;  break;
                }

                GridLength gridLength = new GridLength(value, type);

                if (pane == 1)
                {
                    TwoPaneView.Pane1Length = gridLength;
                }
                else
                {
                    TwoPaneView.Pane2Length = gridLength;
                }
            }
        }

string ViewModeToString ( TwoPaneViewMode configuration ) [inline, private]

Definition at line 45 of file TwoPaneViewPage.xaml.cs.

        {
            switch (configuration)
            {
                case TwoPaneViewMode.SinglePane: return "SinglePane";
                case TwoPaneViewMode.Wide: return "Wide";
                case TwoPaneViewMode.Tall: return "Tall";
            }
            return string.Empty;
        }

void WideModeConfigurationComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 63 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            switch (WideModeConfigurationComboBox.SelectedIndex)
            {
                case 0: TwoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.LeftRight; break;
                case 1: TwoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.RightLeft; break;
                case 2: TwoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.SinglePane; break;
            }
        }

void WidthComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 109 of file TwoPaneViewPage.xaml.cs.

        {
            if (TwoPaneView == null) return;

            switch (WidthComboBox.SelectedIndex)
            {
                case 0: TwoPaneView.Width = double.NaN ; break;
                case 1: TwoPaneView.Width = c_defaultMinWideModeWidth + 10; break;
                case 2: TwoPaneView.Width = c_defaultMinWideModeWidth - 10; break;
            }
        }

Member Data Documentation

Thickness c_controlMargin = new Thickness(40, 10, 30, 20) [private]

Definition at line 28 of file TwoPaneViewPage.xaml.cs.

const double c_defaultMinTallModeHeight = 641.0 [private]

Definition at line 20 of file TwoPaneViewPage.xaml.cs.

const double c_defaultMinWideModeWidth = 641.0 [private]

Definition at line 19 of file TwoPaneViewPage.xaml.cs.

const double c_simulatedMiddle = 12.0 [private]

Definition at line 25 of file TwoPaneViewPage.xaml.cs.

const double c_simulatedPaneHeight = 400.0 [private]

Definition at line 24 of file TwoPaneViewPage.xaml.cs.

const double c_simulatedPaneWidth = 300.0 [private]

Definition at line 23 of file TwoPaneViewPage.xaml.cs.

The documentation for this class was generated from the following file:
  • TwoPaneView/TestUI/TwoPaneViewPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UriToStringConverter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • UriToStringConverter
Public Member Functions

UriToStringConverter Class Reference

List of all members.

Public Member Functions

object | Convert (object value, Type targetType, object parameter, string language)
object | ConvertBack (object value, Type targetType, object parameter, string language)

Detailed Description

Definition at line 53 of file WebView2BasicPage.xaml.cs.

Member Function Documentation

object Convert | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 56 of file WebView2BasicPage.xaml.cs.

        {
            return value;
        }

object ConvertBack | ( | object | value,
 |  | Type | targetType,
 |  | object | parameter,
 |  | string | language |
 | ) |  |  | [inline]

Definition at line 61 of file WebView2BasicPage.xaml.cs.

        {
            Uri newUri;
            string uriString = value as string;
            try
            {
                Uri.TryCreate(uriString, UriKind.RelativeOrAbsolute, out newUri);
                return newUri;
            }
            catch
            {
                return null;
            }
        }

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2BasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BiDirectionalScrollController Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • BiDirectionalScrollController
Classes | Public Member Functions | Protected Member Functions | Properties | Events | Private Member Functions | Private Attributes

BiDirectionalScrollController Class Reference

List of all members.

Classes

struct | OperationInfo
class | UniScrollController
class | UniScrollControllerScrollingScrollCompletedEventArgs

Public Member Functions

BiDirectionalScrollController ()
int | AddScrollVelocity (Vector2 offsetVelocity, Vector2?inertiaDecayRate)
int | ScrollBy (double horizontalOffsetDelta, double verticalOffsetDelta, ScrollingAnimationMode animationMode)
int | ScrollTo (double horizontalOffset, double verticalOffset, ScrollingAnimationMode animationMode)

Protected Member Functions

override void | OnApplyTemplate ()

Properties

IScrollController | HorizontalScrollController [get]
double | HorizontalThumbOffset [get]
bool | IsRailEnabled [get, set]
internal bool | IsScrollingWithMouse [get, set]
internal Point | OffsetTarget [get, set]
internal int | OperationsCount [get]
FrameworkElement | Thumb [get, set]
IScrollController | VerticalScrollController [get]
double | VerticalThumbOffset [get]

Events

TypedEventHandler
< BiDirectionalScrollController,
string > 		LogMessage
TypedEventHandler
< BiDirectionalScrollController,
BiDirectionalScrollControllerScrollingScrollCompletedEventArgs > 		ScrollCompleted

Private Member Functions

void | BiDecrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | BiDirectionalScrollController_IsEnabledChanged (object sender, DependencyPropertyChangedEventArgs e)
void | BiDirectionalScrollController_SizeChanged (object sender, SizeChangedEventArgs e)
void | BiIncrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | HookHandlers ()
void | HorizontalDecrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | HorizontalDecrementVerticalIncrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | HorizontalIncrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | HorizontalIncrementVerticalDecrementRepeatButton_Click (object sender, RoutedEventArgs e)
Point | MaxThumbOffset ()
void | Parent_PointerPressed (object sender, PointerRoutedEventArgs e)
int | RaiseAddScrollVelocityRequested (Vector2 additionalVelocity, Vector2?inertiaDecayRate, bool hookupCompletion)
internal void | RaiseLogMessage (string message)
void | RaisePanRequested (PointerPoint pointerPoint)
int | RaiseScrollByRequested (Point offsetDelta, ScrollingAnimationMode animationMode, bool hookupCompletion)
void | RaiseScrollCompleted (int viewChangeCorrelationId)
int | RaiseScrollToRequested (Point offset, ScrollingAnimationMode animationMode, bool hookupCompletion)
Point | ScrollPresenterOffsetFromThumbOffset (Point thumbOffset)
void | Thumb_ManipulationCompleted (object sender, ManipulationCompletedRoutedEventArgs e)
void | Thumb_ManipulationDelta (object sender, ManipulationDeltaRoutedEventArgs e)
void | Thumb_ManipulationStarting (object sender, ManipulationStartingRoutedEventArgs e)
void | Thumb_PointerPressed (object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
void | UnhookHandlers ()
void | UniScrollController_ScrollCompleted (IScrollController sender, UniScrollControllerScrollingScrollCompletedEventArgs args)
void | VerticalDecrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | VerticalIncrementRepeatButton_Click (object sender, RoutedEventArgs e)

Private Attributes

RepeatButton | biDecrementRepeatButton = null
RepeatButton | biIncrementRepeatButton = null
RepeatButton | horizontalDecrementRepeatButton = null
RepeatButton | horizontalDecrementVerticalIncrementRepeatButton = null
RepeatButton | horizontalIncrementRepeatButton = null
RepeatButton | horizontalIncrementVerticalDecrementRepeatButton = null
UniScrollController | horizontalScrollController = null
bool | isRailEnabled = true
List< int > | lstAddScrollVelocityCorrelationIds = new List<int>()
List< string > | lstAsyncEventMessage = new List<string>()
List< int > | lstScrollByCorrelationIds = new List<int>()
List< int > | lstScrollToCorrelationIds = new List<int>()
List< int > | lstViewChangeCorrelationIds = new List<int>()
Dictionary< int, OperationInfo > | operations = new Dictionary<int, OperationInfo>()
Point | preManipulationThumbOffset
const float | SmallChangeAdditionalVelocity = 144.0f
const float | SmallChangeInertiaDecayRate = 0.975f
RepeatButton | verticalDecrementRepeatButton = null
RepeatButton | verticalIncrementRepeatButton = null
UniScrollController | verticalScrollController = null

Detailed Description

Definition at line 33 of file BiDirectionalScrollController.cs.

Constructor & Destructor Documentation

BiDirectionalScrollController ( ) [inline]

Definition at line 388 of file BiDirectionalScrollController.cs.

        {
            this.DefaultStyleKey = typeof(BiDirectionalScrollController);
            this.IsScrollingWithMouse = false;
            this.horizontalScrollController = new UniScrollController(this, Orientation.Horizontal);
            this.verticalScrollController = new UniScrollController(this, Orientation.Vertical);

            this.horizontalScrollController.ScrollCompleted += UniScrollController_ScrollCompleted;
            this.verticalScrollController.ScrollCompleted += UniScrollController_ScrollCompleted;

            IsEnabledChanged += BiDirectionalScrollController_IsEnabledChanged;
            SizeChanged += BiDirectionalScrollController_SizeChanged;
        }

Member Function Documentation

int AddScrollVelocity | ( | Vector2 | offsetVelocity,
 |  | Vector2? | inertiaDecayRate |
 | ) |  |  | [inline]

Definition at line 463 of file BiDirectionalScrollController.cs.

        {
            int viewChangeCorrelationId = RaiseAddScrollVelocityRequested(
                offsetVelocity, inertiaDecayRate, false /*hookupCompletion*/);
            lstViewChangeCorrelationIds.Add(viewChangeCorrelationId);
            return viewChangeCorrelationId;
        }

void BiDecrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 694 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: BiDecrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(-SmallChangeAdditionalVelocity), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

void BiDirectionalScrollController_IsEnabledChanged | ( | object | sender,
 |  | DependencyPropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 885 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: IsEnabledChanged with IsEnabled=" + IsEnabled);

            horizontalScrollController.UpdateCanScroll();
            verticalScrollController.UpdateCanScroll();
        }

void BiDirectionalScrollController_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 893 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: SizeChanged with NewSize=" + e.NewSize);

            horizontalScrollController.UpdatePanningFrameworkElementLength();
            verticalScrollController.UpdatePanningFrameworkElementLength();
        }

void BiIncrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 706 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: BiIncrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(SmallChangeAdditionalVelocity), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

void HookHandlers ( ) [inline, private]

Definition at line 579 of file BiDirectionalScrollController.cs.

        {
            if (biDecrementRepeatButton != null)
            {
                biDecrementRepeatButton.Click += BiDecrementRepeatButton_Click;
            }

            if (biIncrementRepeatButton != null)
            {
                biIncrementRepeatButton.Click += BiIncrementRepeatButton_Click;
            }

            if (horizontalIncrementVerticalDecrementRepeatButton != null)
            {
                horizontalIncrementVerticalDecrementRepeatButton.Click += HorizontalIncrementVerticalDecrementRepeatButton_Click;
            }

            if (horizontalDecrementVerticalIncrementRepeatButton != null)
            {
                horizontalDecrementVerticalIncrementRepeatButton.Click += HorizontalDecrementVerticalIncrementRepeatButton_Click;
            }

            if (horizontalDecrementRepeatButton != null)
            {
                horizontalDecrementRepeatButton.Click += HorizontalDecrementRepeatButton_Click;
            }

            if (horizontalIncrementRepeatButton != null)
            {
                horizontalIncrementRepeatButton.Click += HorizontalIncrementRepeatButton_Click;
            }

            if (verticalDecrementRepeatButton != null)
            {
                verticalDecrementRepeatButton.Click += VerticalDecrementRepeatButton_Click;
            }

            if (verticalIncrementRepeatButton != null)
            {
                verticalIncrementRepeatButton.Click += VerticalIncrementRepeatButton_Click;
            }

            if (Thumb != null)
            {
                Thumb.PointerPressed += Thumb_PointerPressed;
                Thumb.ManipulationStarting += Thumb_ManipulationStarting;
                Thumb.ManipulationDelta += Thumb_ManipulationDelta;
                Thumb.ManipulationCompleted += Thumb_ManipulationCompleted;

                FrameworkElement parent = Thumb.Parent as FrameworkElement;

                if (parent != null)
                {
                    parent.PointerPressed += Parent_PointerPressed;
                }
            }
        }

void HorizontalDecrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 742 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: HorizontalDecrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(-SmallChangeAdditionalVelocity, 0), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

void HorizontalDecrementVerticalIncrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 730 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: HorizontalDecrementVerticalIncrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(-SmallChangeAdditionalVelocity, SmallChangeAdditionalVelocity), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

void HorizontalIncrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 754 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: HorizontalIncrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(SmallChangeAdditionalVelocity, 0), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

void HorizontalIncrementVerticalDecrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 718 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: HorizontalIncrementVerticalDecrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(SmallChangeAdditionalVelocity, -SmallChangeAdditionalVelocity), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

Point MaxThumbOffset ( ) [inline, private]

Definition at line 925 of file BiDirectionalScrollController.cs.

        {
            Point maxThumbOffset = new Point();

            if (Thumb != null)
            {
                Size parentSize = new Size();
                Size thumbSize = new Size(Thumb.ActualWidth, Thumb.ActualHeight);
                FrameworkElement parent = Thumb.Parent as FrameworkElement;
                if (parent != null)
                {
                    parentSize = new Size(parent.ActualWidth, parent.ActualHeight);
                }
                maxThumbOffset = new Point(
                    Math.Max(0.0, parentSize.Width - thumbSize.Width),
                    Math.Max(0.0, parentSize.Height - thumbSize.Height));
            }

            return maxThumbOffset;
        }

override void OnApplyTemplate ( ) [inline, protected]

Definition at line 471 of file BiDirectionalScrollController.cs.

        {
            UnhookHandlers();

            base.OnApplyTemplate();

            Thumb = GetTemplateChild("Thumb") as FrameworkElement;
            biDecrementRepeatButton = GetTemplateChild("BiDecrementRepeatButton") as RepeatButton;
            biIncrementRepeatButton = GetTemplateChild("BiIncrementRepeatButton") as RepeatButton;
            horizontalIncrementVerticalDecrementRepeatButton = GetTemplateChild("HorizontalIncrementVerticalDecrementRepeatButton") as RepeatButton;
            horizontalDecrementVerticalIncrementRepeatButton = GetTemplateChild("HorizontalDecrementVerticalIncrementRepeatButton") as RepeatButton;
            horizontalDecrementRepeatButton = GetTemplateChild("HorizontalDecrementRepeatButton") as RepeatButton;
            horizontalIncrementRepeatButton = GetTemplateChild("HorizontalIncrementRepeatButton") as RepeatButton;
            verticalDecrementRepeatButton = GetTemplateChild("VerticalDecrementRepeatButton") as RepeatButton;
            verticalIncrementRepeatButton = GetTemplateChild("VerticalIncrementRepeatButton") as RepeatButton;

            if (Thumb != null)
            {
                Thumb.ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY;
                if (IsRailEnabled)
                {
                    Thumb.ManipulationMode |= ManipulationModes.TranslateRailsX | ManipulationModes.TranslateRailsY;
                }

                FrameworkElement parent = Thumb.Parent as FrameworkElement;

                if (parent != null)
                {
                    horizontalScrollController.SetPanningFrameworkElement(Thumb);
                    verticalScrollController.SetPanningFrameworkElement(Thumb);
                }
                else
                {
                    horizontalScrollController.SetPanningFrameworkElement(null);
                    verticalScrollController.SetPanningFrameworkElement(null);
                }
            }
            else
            {
                horizontalScrollController.SetPanningFrameworkElement(null);
                verticalScrollController.SetPanningFrameworkElement(null);
            }

            HookHandlers();
        }

void Parent_PointerPressed | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 819 of file BiDirectionalScrollController.cs.

        {
            Point pt = e.GetCurrentPoint(sender as UIElement).Position;
            RaiseLogMessage("BiDirectionalScrollController: Parent_PointerPressed with position=" + pt);

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            Point maxThumbOffset = MaxThumbOffset();
            double targetThumbHorizontalOffset = pt.X - Thumb.ActualWidth / 2.0;
            double targetThumbVerticalOffset = pt.Y - Thumb.ActualHeight / 2.0;

            targetThumbHorizontalOffset = Math.Max(targetThumbHorizontalOffset, 0.0);
            targetThumbVerticalOffset = Math.Max(targetThumbVerticalOffset, 0.0);

            targetThumbHorizontalOffset = Math.Min(targetThumbHorizontalOffset, maxThumbOffset.X);
            targetThumbVerticalOffset = Math.Min(targetThumbVerticalOffset, maxThumbOffset.Y);

            Point targetThumbOffset = new Point(targetThumbHorizontalOffset, targetThumbVerticalOffset);
            Point targetScrollPresenterOffset = ScrollPresenterOffsetFromThumbOffset(targetThumbOffset);

            int viewChangeCorrelationId = RaiseScrollToRequested(targetScrollPresenterOffset, ScrollingAnimationMode.Auto, true /*hookupCompletion*/);
            if (viewChangeCorrelationId != -1 && !operations.ContainsKey(viewChangeCorrelationId))
            {
                operations.Add(
                    viewChangeCorrelationId,
                    new OperationInfo(viewChangeCorrelationId, new Point(targetScrollPresenterOffset.X - HorizontalThumbOffset, targetScrollPresenterOffset.Y - VerticalThumbOffset), targetScrollPresenterOffset));
            }
        }

int RaiseAddScrollVelocityRequested | ( | Vector2 | additionalVelocity,
 |  | Vector2? | inertiaDecayRate,
 |  | bool | hookupCompletion |
 | ) |  |  | [inline, private]

Definition at line 1100 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: RaiseAddScrollVelocityRequested with additionalVelocity=" + additionalVelocity + ", inertiaDecayRate=" + inertiaDecayRate);

            int horizontalOffsetChangeCorrelationId = -1;
            int verticalOffsetChangeCorrelationId = -1;

            if (additionalVelocity.X != 0.0f)
            {
                horizontalOffsetChangeCorrelationId = horizontalScrollController.RaiseAddScrollVelocityRequested(
                    additionalVelocity.X, inertiaDecayRate == null ? (float?)null : inertiaDecayRate.Value.X);

                if (horizontalOffsetChangeCorrelationId != -1)
                    RaiseLogMessage("BiDirectionalScrollController: AddScrollVelocityRequest started. CorrelationId=" + horizontalOffsetChangeCorrelationId);
            }

            if (additionalVelocity.Y != 0.0f)
            {
                verticalOffsetChangeCorrelationId = verticalScrollController.RaiseAddScrollVelocityRequested(
                    additionalVelocity.Y, inertiaDecayRate == null ? (float?)null : inertiaDecayRate.Value.Y);

                if (verticalOffsetChangeCorrelationId != -1)
                    RaiseLogMessage("BiDirectionalScrollController: AddScrollVelocityRequest started. CorrelationId=" + verticalOffsetChangeCorrelationId);
            }

            int offsetChangeCorrelationId = -1;

            if (horizontalOffsetChangeCorrelationId != -1 && verticalOffsetChangeCorrelationId != -1 && horizontalOffsetChangeCorrelationId == verticalOffsetChangeCorrelationId)
            {
                offsetChangeCorrelationId = horizontalOffsetChangeCorrelationId;
            }
            else if (horizontalOffsetChangeCorrelationId != -1 && verticalOffsetChangeCorrelationId != -1 && horizontalOffsetChangeCorrelationId != verticalOffsetChangeCorrelationId)
            {
                RaiseLogMessage("BiDirectionalScrollController: AddScrollVelocityRequest operations do not match.");
            }
            else if (horizontalOffsetChangeCorrelationId != -1)
            {
                offsetChangeCorrelationId = horizontalOffsetChangeCorrelationId;
            }
            else if (verticalOffsetChangeCorrelationId != -1)
            {
                offsetChangeCorrelationId = verticalOffsetChangeCorrelationId;
            }
            else
            {
                RaiseLogMessage("BiDirectionalScrollController: AddScrollVelocityRequest operations are null.");
            }

            if (hookupCompletion && offsetChangeCorrelationId != -1 && !lstAddScrollVelocityCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstAddScrollVelocityCorrelationIds.Add(offsetChangeCorrelationId);
            }

            return offsetChangeCorrelationId;
        }

internal void RaiseLogMessage ( string message ) [inline, private]

Definition at line 1165 of file BiDirectionalScrollController.cs.

        {
            if (LogMessage != null)
            {
                LogMessage(this, message);
            }
        }

void RaisePanRequested ( PointerPoint pointerPoint ) [inline, private]

Definition at line 993 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: RaisePanRequested with pointerPoint=" + pointerPoint);
            bool handled = horizontalScrollController.RaisePanRequested(pointerPoint);
            RaiseLogMessage("BiDirectionalScrollController: RaisePanRequested result Handled=" + handled);
        }

int RaiseScrollByRequested | ( | Point | offsetDelta,
 |  | ScrollingAnimationMode | animationMode,
 |  | bool | hookupCompletion |
 | ) |  |  | [inline, private]

Definition at line 1050 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: RaiseScrollByRequested with offsetDelta=" + offsetDelta + ", animationMode=" + animationMode);

            int horizontalOffsetChangeCorrelationId = horizontalScrollController.RaiseScrollByRequested(
                offsetDelta.X, animationMode);

            if (horizontalOffsetChangeCorrelationId != -1)
                RaiseLogMessage("BiDirectionalScrollController: Horizontal ScrollByRequest started. CorrelationId=" + horizontalOffsetChangeCorrelationId);

            int verticalOffsetChangeCorrelationId = verticalScrollController.RaiseScrollByRequested(
                offsetDelta.Y, animationMode);

            if (verticalOffsetChangeCorrelationId != -1)
                RaiseLogMessage("BiDirectionalScrollController: Vertical ScrollByRequest started. CorrelationId=" + verticalOffsetChangeCorrelationId);

            int offsetChangeCorrelationId = -1;

            if (horizontalOffsetChangeCorrelationId != -1 && verticalOffsetChangeCorrelationId != -1 && horizontalOffsetChangeCorrelationId == verticalOffsetChangeCorrelationId)
            {
                offsetChangeCorrelationId = horizontalOffsetChangeCorrelationId;
            }
            else if (horizontalOffsetChangeCorrelationId != -1 && verticalOffsetChangeCorrelationId != -1 && horizontalOffsetChangeCorrelationId != verticalOffsetChangeCorrelationId)
            {
                RaiseLogMessage("BiDirectionalScrollController: ScrollByRequest CorrelationIds do not match.");
            }
            else if (horizontalOffsetChangeCorrelationId != -1)
            {
                offsetChangeCorrelationId = horizontalOffsetChangeCorrelationId;
            }
            else if (verticalOffsetChangeCorrelationId != -1)
            {
                offsetChangeCorrelationId = verticalOffsetChangeCorrelationId;
            }
            else
            {
                RaiseLogMessage("BiDirectionalScrollController: ScrollByRequest CorrelationIds are -1.");
            }

            if (hookupCompletion && offsetChangeCorrelationId != -1 && !lstScrollByCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstScrollByCorrelationIds.Add(offsetChangeCorrelationId);
            }

            return offsetChangeCorrelationId;
        }

void RaiseScrollCompleted ( int viewChangeCorrelationId ) [inline, private]

Definition at line 1173 of file BiDirectionalScrollController.cs.

        {
            if (ScrollCompleted != null)
            {
                BiDirectionalScrollControllerScrollingScrollCompletedEventArgs args = new BiDirectionalScrollControllerScrollingScrollCompletedEventArgs(viewChangeCorrelationId);

                ScrollCompleted(this, args);
            }
        }

int RaiseScrollToRequested | ( | Point | offset,
 |  | ScrollingAnimationMode | animationMode,
 |  | bool | hookupCompletion |
 | ) |  |  | [inline, private]

Definition at line 1000 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: RaiseScrollToRequested with offset=" + offset + ", animationMode=" + animationMode);

            int horizontalOffsetChangeCorrelationId = horizontalScrollController.RaiseScrollToRequested(
                offset.X, animationMode);

            if (horizontalOffsetChangeCorrelationId != -1)
                RaiseLogMessage("BiDirectionalScrollController: Horizontal ScrollToRequest started. CorrelationId=" + horizontalOffsetChangeCorrelationId);

            int verticalOffsetChangeCorrelationId = verticalScrollController.RaiseScrollToRequested(
                offset.Y, animationMode);

            if (verticalOffsetChangeCorrelationId != -1)
                RaiseLogMessage("BiDirectionalScrollController: Vertical ScrollToRequest started. CorrelationId=" + verticalOffsetChangeCorrelationId);

            int offsetChangeCorrelationId = -1;

            if (horizontalOffsetChangeCorrelationId != -1 && verticalOffsetChangeCorrelationId != -1 && horizontalOffsetChangeCorrelationId == verticalOffsetChangeCorrelationId)
            {
                offsetChangeCorrelationId = horizontalOffsetChangeCorrelationId;
            }
            else if (horizontalOffsetChangeCorrelationId != -1 && verticalOffsetChangeCorrelationId != -1 && horizontalOffsetChangeCorrelationId != verticalOffsetChangeCorrelationId)
            {
                RaiseLogMessage("BiDirectionalScrollController: ScrollToRequest CorrelationIds do not match.");
            }
            else if (horizontalOffsetChangeCorrelationId != -1)
            {
                offsetChangeCorrelationId = horizontalOffsetChangeCorrelationId;
            }
            else if (verticalOffsetChangeCorrelationId != -1)
            {
                offsetChangeCorrelationId = verticalOffsetChangeCorrelationId;
            }
            else
            {
                RaiseLogMessage("BiDirectionalScrollController: ScrollToRequest CorrelationIds are -1.");
            }

            if (hookupCompletion && offsetChangeCorrelationId != -1 && !lstScrollToCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstScrollToCorrelationIds.Add(offsetChangeCorrelationId);
            }

            return offsetChangeCorrelationId;
        }

int ScrollBy | ( | double | horizontalOffsetDelta,
 |  | double | verticalOffsetDelta,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline]

Definition at line 454 of file BiDirectionalScrollController.cs.

        {
            int viewChangeCorrelationId = RaiseScrollByRequested(
                new Point(horizontalOffsetDelta, verticalOffsetDelta),
                animationMode, false /*hookupCompletion*/);
            lstViewChangeCorrelationIds.Add(viewChangeCorrelationId);
            return viewChangeCorrelationId;
        }

Point ScrollPresenterOffsetFromThumbOffset ( Point thumbOffset ) [inline, private]

Definition at line 901 of file BiDirectionalScrollController.cs.

        {
            Point scrollPresenterOffset = new Point();

            if (Thumb != null)
            {
                Size parentSize = new Size();
                Size thumbSize = new Size(Thumb.ActualWidth, Thumb.ActualHeight);
                FrameworkElement parent = Thumb.Parent as FrameworkElement;
                if (parent != null)
                {
                    parentSize = new Size(parent.ActualWidth, parent.ActualHeight);
                }
                if (parentSize.Width != thumbSize.Width || parentSize.Height != thumbSize.Height)
                {
                    scrollPresenterOffset = new Point(
                        parentSize.Width == thumbSize.Width ? 0 : (thumbOffset.X * (horizontalScrollController.MaxOffset - horizontalScrollController.MinOffset) / (parentSize.Width - thumbSize.Width)),
                        parentSize.Height == thumbSize.Height ? 0 : (thumbOffset.Y * (verticalScrollController.MaxOffset - verticalScrollController.MinOffset) / (parentSize.Height - thumbSize.Height)));
                }
            }

            return scrollPresenterOffset;
        }

int ScrollTo | ( | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline]

Definition at line 445 of file BiDirectionalScrollController.cs.

        {
            int viewChangeCorrelationId = RaiseScrollToRequested(
                new Point(horizontalOffset, verticalOffset),
                animationMode, false /*hookupCompletion*/);
            lstViewChangeCorrelationIds.Add(viewChangeCorrelationId);
            return viewChangeCorrelationId;
        }

void Thumb_ManipulationCompleted | ( | object | sender,
 |  | ManipulationCompletedRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 872 of file BiDirectionalScrollController.cs.

        {
            if (IsScrollingWithMouse)
            {
                IsScrollingWithMouse = false;

                if (HorizontalScrollController.CanScroll)
                    horizontalScrollController.RaiseIsScrollingWithMouseChanged();
                if (VerticalScrollController.CanScroll)
                    verticalScrollController.RaiseIsScrollingWithMouseChanged();
            }
        }

void Thumb_ManipulationDelta | ( | object | sender,
 |  | ManipulationDeltaRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 858 of file BiDirectionalScrollController.cs.

        {
            if (IsScrollingWithMouse)
            {
                Point targetThumbOffset = new Point(
                    preManipulationThumbOffset.X + e.Cumulative.Translation.X,
                    preManipulationThumbOffset.Y + e.Cumulative.Translation.Y);
                Point scrollPresenterOffset = ScrollPresenterOffsetFromThumbOffset(targetThumbOffset);

                int viewChangeCorrelationId = RaiseScrollToRequested(
                    scrollPresenterOffset, ScrollingAnimationMode.Disabled, true /*hookupCompletion*/);
            }
        }

void Thumb_ManipulationStarting | ( | object | sender,
 |  | ManipulationStartingRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 850 of file BiDirectionalScrollController.cs.

        {
            if (IsScrollingWithMouse)
            {
                preManipulationThumbOffset = new Point(HorizontalThumbOffset, VerticalThumbOffset);
            }
        }

void Thumb_PointerPressed | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 790 of file BiDirectionalScrollController.cs.

        {
            Point pt = e.GetCurrentPoint(sender as UIElement).Position;
            RaiseLogMessage("BiDirectionalScrollController: Thumb_PointerPressed with position=" + pt);

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            switch (e.Pointer.PointerDeviceType)
            {
                case Microsoft.UI.Input.PointerDeviceType.Touch:
                case Microsoft.UI.Input.PointerDeviceType.Pen:
                    RaisePanRequested(e.GetCurrentPoint(null));
                    break;
                case Microsoft.UI.Input.PointerDeviceType.Mouse:
                    if (!IsScrollingWithMouse)
                    {
                        IsScrollingWithMouse = true;

                        if (HorizontalScrollController.CanScroll)
                            horizontalScrollController.RaiseIsScrollingWithMouseChanged();
                        if (VerticalScrollController.CanScroll)
                            verticalScrollController.RaiseIsScrollingWithMouseChanged();
                    }
                    break;
            }
        }

void UnhookHandlers ( ) [inline, private]

Definition at line 637 of file BiDirectionalScrollController.cs.

        {
            if (biDecrementRepeatButton != null)
            {
                biDecrementRepeatButton.Click -= BiDecrementRepeatButton_Click;
            }

            if (biIncrementRepeatButton != null)
            {
                biIncrementRepeatButton.Click -= BiIncrementRepeatButton_Click;
            }

            if (horizontalIncrementVerticalDecrementRepeatButton != null)
            {
                horizontalIncrementVerticalDecrementRepeatButton.Click -= HorizontalIncrementVerticalDecrementRepeatButton_Click;
            }

            if (horizontalDecrementVerticalIncrementRepeatButton != null)
            {
                horizontalDecrementVerticalIncrementRepeatButton.Click -= HorizontalDecrementVerticalIncrementRepeatButton_Click;
            }

            if (horizontalDecrementRepeatButton != null)
            {
                horizontalDecrementRepeatButton.Click -= HorizontalDecrementRepeatButton_Click;
            }

            if (horizontalIncrementRepeatButton != null)
            {
                horizontalIncrementRepeatButton.Click -= HorizontalIncrementRepeatButton_Click;
            }

            if (verticalDecrementRepeatButton != null)
            {
                verticalDecrementRepeatButton.Click -= VerticalDecrementRepeatButton_Click;
            }

            if (verticalIncrementRepeatButton != null)
            {
                verticalIncrementRepeatButton.Click -= VerticalIncrementRepeatButton_Click;
            }

            if (Thumb != null)
            {
                Thumb.PointerPressed -= Thumb_PointerPressed;
                Thumb.ManipulationStarting -= Thumb_ManipulationStarting;
                Thumb.ManipulationDelta -= Thumb_ManipulationDelta;
                Thumb.ManipulationCompleted -= Thumb_ManipulationCompleted;

                FrameworkElement parent = Thumb.Parent as FrameworkElement;
                if (parent != null)
                {
                    parent.PointerPressed -= Parent_PointerPressed;
                }
            }
        }

void UniScrollController_ScrollCompleted | ( | IScrollController | sender,
 |  | UniScrollControllerScrollingScrollCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 946 of file BiDirectionalScrollController.cs.

        {
            if (lstScrollToCorrelationIds.Contains(args.OffsetChangeCorrelationId))
            {
                lstScrollToCorrelationIds.Remove(args.OffsetChangeCorrelationId);

                Point relativeOffsetChange;

                if (operations.ContainsKey(args.OffsetChangeCorrelationId))
                {
                    OperationInfo oi = operations[args.OffsetChangeCorrelationId];
                    relativeOffsetChange = oi.RelativeOffsetChange;
                    operations.Remove(args.OffsetChangeCorrelationId);
                }

                RaiseLogMessage("BiDirectionalScrollController: ScrollToRequest completed. OffsetChangeCorrelationId=" + args.OffsetChangeCorrelationId);
            }
            else if (lstScrollByCorrelationIds.Contains(args.OffsetChangeCorrelationId))
            {
                lstScrollByCorrelationIds.Remove(args.OffsetChangeCorrelationId);

                Point relativeOffsetChange;

                if (operations.ContainsKey(args.OffsetChangeCorrelationId))
                {
                    OperationInfo oi = operations[args.OffsetChangeCorrelationId];
                    relativeOffsetChange = oi.RelativeOffsetChange;
                    operations.Remove(args.OffsetChangeCorrelationId);
                }

                RaiseLogMessage("BiDirectionalScrollController: ScrollByRequest completed. OffsetChangeCorrelationId=" + args.OffsetChangeCorrelationId);
            }
            else if (lstAddScrollVelocityCorrelationIds.Contains(args.OffsetChangeCorrelationId))
            {
                lstAddScrollVelocityCorrelationIds.Remove(args.OffsetChangeCorrelationId);

                RaiseLogMessage("BiDirectionalScrollController: AddScrollVelocityRequest completed. OffsetChangeCorrelationId=" + args.OffsetChangeCorrelationId);
            }

            if (lstViewChangeCorrelationIds.Contains(args.OffsetChangeCorrelationId))
            {
                lstViewChangeCorrelationIds.Remove(args.OffsetChangeCorrelationId);

                RaiseScrollCompleted(args.OffsetChangeCorrelationId);
            }
        }

void VerticalDecrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 766 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: VerticalDecrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(0, -SmallChangeAdditionalVelocity), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

void VerticalIncrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 778 of file BiDirectionalScrollController.cs.

        {
            RaiseLogMessage("BiDirectionalScrollController: VerticalIncrementRepeatButton_Click");

            if (!HorizontalScrollController.CanScroll &&
                !VerticalScrollController.CanScroll)
                return;

            int viewChangeCorrelationId =
                RaiseAddScrollVelocityRequested(new Vector2(0, SmallChangeAdditionalVelocity), new Vector2(SmallChangeInertiaDecayRate), true /*hookupCompletion*/);
        }

Member Data Documentation

RepeatButton biDecrementRepeatButton = null [private]

Definition at line 374 of file BiDirectionalScrollController.cs.

RepeatButton biIncrementRepeatButton = null [private]

Definition at line 375 of file BiDirectionalScrollController.cs.

RepeatButton horizontalDecrementRepeatButton = null [private]

Definition at line 378 of file BiDirectionalScrollController.cs.

RepeatButton horizontalDecrementVerticalIncrementRepeatButton = null [private]

Definition at line 377 of file BiDirectionalScrollController.cs.

RepeatButton horizontalIncrementRepeatButton = null [private]

Definition at line 379 of file BiDirectionalScrollController.cs.

RepeatButton horizontalIncrementVerticalDecrementRepeatButton = null [private]

Definition at line 376 of file BiDirectionalScrollController.cs.

UniScrollController horizontalScrollController = null [private]

Definition at line 372 of file BiDirectionalScrollController.cs.

bool isRailEnabled = true [private]

Definition at line 382 of file BiDirectionalScrollController.cs.

List<int> lstAddScrollVelocityCorrelationIds = new List<int>() [private]

Definition at line 370 of file BiDirectionalScrollController.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 366 of file BiDirectionalScrollController.cs.

List<int> lstScrollByCorrelationIds = new List<int>() [private]

Definition at line 369 of file BiDirectionalScrollController.cs.

List<int> lstScrollToCorrelationIds = new List<int>() [private]

Definition at line 368 of file BiDirectionalScrollController.cs.

List<int> lstViewChangeCorrelationIds = new List<int>() [private]

Definition at line 367 of file BiDirectionalScrollController.cs.

Dictionary<int, OperationInfo> operations = new Dictionary<int, OperationInfo>() [private]

Definition at line 371 of file BiDirectionalScrollController.cs.

Point preManipulationThumbOffset [private]

Definition at line 383 of file BiDirectionalScrollController.cs.

const float SmallChangeAdditionalVelocity = 144.0f [private]

Definition at line 363 of file BiDirectionalScrollController.cs.

const float SmallChangeInertiaDecayRate = 0.975f [private]

Definition at line 364 of file BiDirectionalScrollController.cs.

RepeatButton verticalDecrementRepeatButton = null [private]

Definition at line 380 of file BiDirectionalScrollController.cs.

RepeatButton verticalIncrementRepeatButton = null [private]

Definition at line 381 of file BiDirectionalScrollController.cs.

UniScrollController verticalScrollController = null [private]

Definition at line 373 of file BiDirectionalScrollController.cs.

Property Documentation

IScrollController HorizontalScrollController [get]

Definition at line 430 of file BiDirectionalScrollController.cs.

double HorizontalThumbOffset [get, private]

Definition at line 536 of file BiDirectionalScrollController.cs.

bool IsRailEnabled [get, set]

Definition at line 403 of file BiDirectionalScrollController.cs.

internal bool IsScrollingWithMouse [get, set, private]

Definition at line 518 of file BiDirectionalScrollController.cs.

internal Point OffsetTarget [get, set, private]

Definition at line 524 of file BiDirectionalScrollController.cs.

internal int OperationsCount [get, private]

Definition at line 1158 of file BiDirectionalScrollController.cs.

FrameworkElement Thumb [get, set, private]

Definition at line 530 of file BiDirectionalScrollController.cs.

IScrollController VerticalScrollController [get]

Definition at line 438 of file BiDirectionalScrollController.cs.

double VerticalThumbOffset [get, private]

Definition at line 558 of file BiDirectionalScrollController.cs.

Event Documentation

TypedEventHandler<BiDirectionalScrollController, string> LogMessage

Definition at line 385 of file BiDirectionalScrollController.cs.

TypedEventHandler<BiDirectionalScrollController, BiDirectionalScrollControllerScrollingScrollCompletedEventArgs> ScrollCompleted

Definition at line 386 of file BiDirectionalScrollController.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/BiDirectionalScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BiDirectionalScrollController::OperationInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • BiDirectionalScrollController
  • BiDirectionalScrollController::OperationInfo
Public Member Functions | Public Attributes

BiDirectionalScrollController::OperationInfo Struct Reference

List of all members.

Public Member Functions

OperationInfo (int correlationId, Point relativeOffsetChange, Point offsetTarget)

Public Attributes

int | CorrelationId
Point | OffsetTarget
Point | RelativeOffsetChange

Detailed Description

Definition at line 349 of file BiDirectionalScrollController.cs.

Constructor & Destructor Documentation

OperationInfo | ( | int | correlationId,
 |  | Point | relativeOffsetChange,
 |  | Point | offsetTarget |
 | ) |  |  | [inline]

Definition at line 355 of file BiDirectionalScrollController.cs.

                                                                                : this()
            {
                CorrelationId = correlationId;
                RelativeOffsetChange = relativeOffsetChange;
                OffsetTarget = offsetTarget;
            }

Member Data Documentation

int CorrelationId

Definition at line 351 of file BiDirectionalScrollController.cs.

Point OffsetTarget

Definition at line 353 of file BiDirectionalScrollController.cs.

Point RelativeOffsetChange

Definition at line 352 of file BiDirectionalScrollController.cs.

The documentation for this struct was generated from the following file:
  • ScrollPresenter/TestUI/BiDirectionalScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BiDirectionalScrollController::UniScrollController Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • BiDirectionalScrollController
  • BiDirectionalScrollController::UniScrollController
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

BiDirectionalScrollController::UniScrollController Class Reference

List of all members.

Public Member Functions

UniScrollController (BiDirectionalScrollController owner, Orientation orientation)
CompositionAnimation | GetScrollAnimation (int correlationId, Vector2 startPosition, Vector2 endPosition, CompositionAnimation defaultAnimation)
void | NotifyRequestedScrollCompleted (int correlationId)
void | SetIsScrollable (bool isScrollable)
void | SetValues (double minOffset, double maxOffset, double offset, double viewportLength)

Properties

bool | CanScroll [get, set]
internal bool | IsRailEnabled [get, set]
bool | IsScrollable [get, set]
bool | IsScrollingWithMouse [get]
internal double | MaxOffset [get, set]
internal double | MinOffset [get, set]
internal double | Offset [get, set]
Orientation | Orientation [get, set]
BiDirectionalScrollController | Owner [get, set]
IScrollControllerPanningInfo | PanningInfo [get]
internal double | ViewportLength [get, set]

Events

TypedEventHandler
< IScrollController,
ScrollControllerAddScrollVelocityRequestedEventArgs > 		AddScrollVelocityRequested
TypedEventHandler
< IScrollController, object > 		CanScrollChanged
TypedEventHandler
< IScrollController, object > 		IsScrollingWithMouseChanged
TypedEventHandler
< IScrollController,
ScrollControllerScrollByRequestedEventArgs > 		ScrollByRequested
TypedEventHandler
< UniScrollController,
UniScrollControllerScrollingScrollCompletedEventArgs > 		ScrollCompleted
TypedEventHandler
< IScrollController,
ScrollControllerScrollToRequestedEventArgs > 		ScrollToRequested

Private Member Functions

internal int | RaiseAddScrollVelocityRequested (float offsetVelocity, float?inertiaDecayRate)
internal void | RaiseCanScrollChanged ()
internal void | RaiseIsScrollingWithMouseChanged ()
void | RaiseLogMessage (string message)
internal bool | RaisePanRequested (PointerPoint pointerPoint)
internal int | RaiseScrollByRequested (double offsetDelta, ScrollingAnimationMode animationMode)
internal int | RaiseScrollToRequested (double offset, ScrollingAnimationMode animationMode)
internal void | SetPanningFrameworkElement (FrameworkElement value)
internal void | UpdateCanScroll ()
internal void | UpdatePanningFrameworkElementLength ()

Private Attributes

CompositionScrollControllerPanningInfo | panningInfo = null

Detailed Description

Definition at line 49 of file BiDirectionalScrollController.cs.

Constructor & Destructor Documentation

UniScrollController | ( | BiDirectionalScrollController | owner,
 |  | Orientation | orientation |
 | ) |  |  | [inline]

Definition at line 61 of file BiDirectionalScrollController.cs.

            {
                panningInfo = new CompositionScrollControllerPanningInfo(owner.DispatcherQueue, owner.IsRailEnabled, orientation);

                Owner = owner;
                Orientation = orientation;
                MinOffset = 0.0;
                MaxOffset = 0.0;
                Offset = 0.0;
                ViewportLength = 0.0;
            }

Member Function Documentation

CompositionAnimation GetScrollAnimation | ( | int | correlationId,
 |  | Vector2 | startPosition,
 |  | Vector2 | endPosition,
 |  | CompositionAnimation | defaultAnimation |
 | ) |  |  | [inline]

Definition at line 218 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage(
                    "UniScrollController: GetScrollAnimation for Orientation=" + Orientation +
                    " with OffsetsChangeCorrelationId=" + correlationId + ", startPosition=" + startPosition + ", endPosition=" + endPosition);
                return defaultAnimation;
            }

void NotifyRequestedScrollCompleted ( int correlationId ) [inline]

Definition at line 230 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage(
                    "UniScrollController: NotifyRequestedScrollCompleted for Orientation=" + Orientation +
                    " with OffsetsChangeCorrelationId=" + correlationId);

                ScrollCompleted?.Invoke(this, new UniScrollControllerScrollingScrollCompletedEventArgs(correlationId));
            }

internal int RaiseAddScrollVelocityRequested | ( | float | offsetVelocity,
 |  | float? | inertiaDecayRate |
 | ) |  |  | [inline, private]

Definition at line 326 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage("UniScrollController: RaiseAddScrollVelocityRequested for Orientation=" + Orientation + " with offsetVelocity=" + offsetVelocity + ", inertiaDecayRate=" + inertiaDecayRate);

                if (AddScrollVelocityRequested != null)
                {
                    ScrollControllerAddScrollVelocityRequestedEventArgs e =
                        new ScrollControllerAddScrollVelocityRequestedEventArgs(
                            offsetVelocity,
                            inertiaDecayRate);
                    AddScrollVelocityRequested(this, e);
                    return e.CorrelationId;
                }
                return -1;
            }

internal void RaiseCanScrollChanged ( ) [inline, private]

Definition at line 263 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage("UniScrollController: RaiseCanScrollChanged for Orientation=" + Orientation);

                if (CanScrollChanged != null)
                {
                    CanScrollChanged(this, null);
                }
            }

internal void RaiseIsScrollingWithMouseChanged ( ) [inline, private]

Definition at line 273 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage("UniScrollController: RaiseIsScrollingWithMouseChanged for Orientation=" + Orientation);

                if (IsScrollingWithMouseChanged != null)
                {
                    IsScrollingWithMouseChanged(this, null);
                }
            }

void RaiseLogMessage ( string message ) [inline, private]

Definition at line 343 of file BiDirectionalScrollController.cs.

            {
                Owner.RaiseLogMessage(message);
            }

internal bool RaisePanRequested ( PointerPoint pointerPoint ) [inline, private]

Definition at line 283 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage("UniScrollController: RaisePanRequested for Orientation=" + Orientation + " with pointerPoint=" + pointerPoint);

                return panningInfo.RaisePanRequested(pointerPoint);
            }

internal int RaiseScrollByRequested | ( | double | offsetDelta,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline, private]

Definition at line 308 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage("UniScrollController: RaiseScrollByRequested for Orientation=" + Orientation + " with offsetDelta=" + offsetDelta + ", animationMode=" + animationMode);

                if (ScrollByRequested != null)
                {
                    ScrollControllerScrollByRequestedEventArgs e =
                        new ScrollControllerScrollByRequestedEventArgs(
                            offsetDelta,
                            new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
                    ScrollByRequested(this, e);
                    return e.CorrelationId;
                }
                return -1;
            }

internal int RaiseScrollToRequested | ( | double | offset,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline, private]

Definition at line 290 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage("UniScrollController: RaiseScrollToRequested for Orientation=" + Orientation + " with offset=" + offset + ", animationMode=" + animationMode);

                if (ScrollToRequested != null)
                {
                    ScrollControllerScrollToRequestedEventArgs e =
                        new ScrollControllerScrollToRequestedEventArgs(
                            offset,
                            new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
                    ScrollToRequested(this, e);
                    return e.CorrelationId;
                }
                return -1;
            }

void SetIsScrollable ( bool isScrollable ) [inline]

Definition at line 150 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage(
                    "UniScrollController: SetIsScrollable for Orientation=" + Orientation +
                    " with isScrollable=" + isScrollable);
                IsScrollable = isScrollable;
                UpdateCanScroll();
            }

internal void SetPanningFrameworkElement ( FrameworkElement value ) [inline, private]

Definition at line 240 of file BiDirectionalScrollController.cs.

            {
                panningInfo.SetPanningFrameworkElement(value);
            }

void SetValues | ( | double | minOffset,
 |  | double | maxOffset,
 |  | double | offset,
 |  | double | viewportLength |
 | ) |  |  | [inline]

Definition at line 159 of file BiDirectionalScrollController.cs.

            {
                RaiseLogMessage(
                    "UniScrollController: SetValues for Orientation=" + Orientation +
                    " with minOffset=" + minOffset +
                    ", maxOffset=" + maxOffset +
                    ", offset=" + offset +
                    ", viewportLength=" + viewportLength);

                if (maxOffset < minOffset)
                {
                    throw new ArgumentOutOfRangeException("maxOffset");
                }

                if (viewportLength < 0.0)
                {
                    throw new ArgumentOutOfRangeException("viewportLength");
                }

                offset = Math.Max(minOffset, offset);
                offset = Math.Min(maxOffset, offset);

                double offsetTarget = 0.0;

                if (Owner.OperationsCount == 0)
                {
                    offsetTarget = offset;
                }
                else
                {
                    offsetTarget = Math.Max(minOffset, offsetTarget);
                    offsetTarget = Math.Min(maxOffset, offsetTarget);
                }

                if (Orientation == Orientation.Horizontal)
                    Owner.OffsetTarget = new Point(offsetTarget, Owner.OffsetTarget.Y);
                else
                    Owner.OffsetTarget = new Point(Owner.OffsetTarget.X, offsetTarget);

                bool updatePanningFrameworkElementLength =
                    MinOffset != minOffset ||
                    MaxOffset != maxOffset ||
                    ViewportLength != viewportLength;

                MinOffset = minOffset;
                Offset = offset;
                MaxOffset = maxOffset;
                ViewportLength = viewportLength;

                if (updatePanningFrameworkElementLength && !panningInfo.UpdatePanningFrameworkElementLength(minOffset, maxOffset, viewportLength))
                {
                    panningInfo.UpdatePanningElementOffsetMultiplier();
                }

                // Potentially changed MinOffset / MaxOffset value(s) may have an effect
                // on the read-only IScrollController.CanScroll property.
                UpdateCanScroll();
            }

internal void UpdateCanScroll ( ) [inline, private]

Definition at line 245 of file BiDirectionalScrollController.cs.

            {
                bool oldCanScroll = CanScroll;

                CanScroll =
                    MaxOffset > MinOffset && IsScrollable && Owner.IsEnabled;

                if (oldCanScroll != CanScroll)
                {
                    RaiseCanScrollChanged();
                }
            }

internal void UpdatePanningFrameworkElementLength ( ) [inline, private]

Definition at line 258 of file BiDirectionalScrollController.cs.

            {
                panningInfo.UpdatePanningFrameworkElementLength(MinOffset, MaxOffset, ViewportLength);
            }

Member Data Documentation

CompositionScrollControllerPanningInfo panningInfo = null [private]

Definition at line 59 of file BiDirectionalScrollController.cs.

Property Documentation

bool CanScroll [get, set]

Definition at line 82 of file BiDirectionalScrollController.cs.

internal bool IsRailEnabled [get, set, private]

Definition at line 121 of file BiDirectionalScrollController.cs.

bool IsScrollable [get, set, private]

Definition at line 133 of file BiDirectionalScrollController.cs.

bool IsScrollingWithMouse [get]

Definition at line 88 of file BiDirectionalScrollController.cs.

internal double MaxOffset [get, set, private]

Definition at line 103 of file BiDirectionalScrollController.cs.

internal double MinOffset [get, set, private]

Definition at line 97 of file BiDirectionalScrollController.cs.

internal double Offset [get, set, private]

Definition at line 109 of file BiDirectionalScrollController.cs.

Orientation Orientation [get, set, private]

Definition at line 139 of file BiDirectionalScrollController.cs.

BiDirectionalScrollController Owner [get, set, private]

Definition at line 145 of file BiDirectionalScrollController.cs.

IScrollControllerPanningInfo PanningInfo [get]

Definition at line 74 of file BiDirectionalScrollController.cs.

internal double ViewportLength [get, set, private]

Definition at line 115 of file BiDirectionalScrollController.cs.

Event Documentation

TypedEventHandler<IScrollController, ScrollControllerAddScrollVelocityRequestedEventArgs> AddScrollVelocityRequested

Definition at line 55 of file BiDirectionalScrollController.cs.

TypedEventHandler<IScrollController, object> CanScrollChanged

Definition at line 51 of file BiDirectionalScrollController.cs.

TypedEventHandler<IScrollController, object> IsScrollingWithMouseChanged

Definition at line 52 of file BiDirectionalScrollController.cs.

TypedEventHandler<IScrollController, ScrollControllerScrollByRequestedEventArgs> ScrollByRequested

Definition at line 54 of file BiDirectionalScrollController.cs.

TypedEventHandler<UniScrollController, UniScrollControllerScrollingScrollCompletedEventArgs> ScrollCompleted

Definition at line 57 of file BiDirectionalScrollController.cs.

TypedEventHandler<IScrollController, ScrollControllerScrollToRequestedEventArgs> ScrollToRequested

Definition at line 53 of file BiDirectionalScrollController.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/BiDirectionalScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • BiDirectionalScrollController
  • BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs
Public Member Functions | Properties

BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs Class Reference

List of all members.

Public Member Functions

UniScrollControllerScrollingScrollCompletedEventArgs (int offsetChangeCorrelationId)

Properties

int OffsetChangeCorrelationId [get, set]

Detailed Description

Definition at line 35 of file BiDirectionalScrollController.cs.

Constructor & Destructor Documentation

UniScrollControllerScrollingScrollCompletedEventArgs ( int offsetChangeCorrelationId ) [inline]

Definition at line 37 of file BiDirectionalScrollController.cs.

            {
                OffsetChangeCorrelationId = offsetChangeCorrelationId;
            }

Property Documentation

int OffsetChangeCorrelationId [get, set]

Definition at line 43 of file BiDirectionalScrollController.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/BiDirectionalScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BiDirectionalScrollControllerScrollingScrollCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • BiDirectionalScrollControllerScrollingScrollCompletedEventArgs
Properties | Private Member Functions

BiDirectionalScrollControllerScrollingScrollCompletedEventArgs Class Reference

List of all members.

Properties

int | OffsetsChangeCorrelationId [get, set]

Private Member Functions

internal | BiDirectionalScrollControllerScrollingScrollCompletedEventArgs (int offsetsChangeCorrelationId)

Detailed Description

Definition at line 19 of file BiDirectionalScrollController.cs.

Constructor & Destructor Documentation

internal BiDirectionalScrollControllerScrollingScrollCompletedEventArgs ( int offsetsChangeCorrelationId ) [inline, private]

Definition at line 21 of file BiDirectionalScrollController.cs.

        {
            OffsetsChangeCorrelationId = offsetsChangeCorrelationId;
        }

Property Documentation

int OffsetsChangeCorrelationId [get, set]

Definition at line 27 of file BiDirectionalScrollController.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/BiDirectionalScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CompositionScrollController Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • CompositionScrollController
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Events | Private Member Functions | Private Attributes

CompositionScrollController Class Reference

List of all members.

Classes

struct | OperationInfo

Public Types

enum | AnimationType { Default, Accordion, Teleportation }

Public Member Functions

CompositionScrollController ()
int | AddScrollVelocity (float offsetVelocity, float?inertiaDecayRate)
CompositionAnimation | GetScrollAnimation (int correlationId, Vector2 startPosition, Vector2 endPosition, CompositionAnimation defaultAnimation)
void | NotifyRequestedScrollCompleted (int correlationId)
int | ScrollBy (double offsetDelta, ScrollingAnimationMode animationMode)
int | ScrollTo (double offset, ScrollingAnimationMode animationMode)
void | SetIsScrollable (bool isScrollable)
void | SetValues (double minOffset, double maxOffset, double offset, double viewportLength)

Static Public Attributes

static bool | s_IsDebugOutputEnabled = false

Protected Member Functions

override void | OnApplyTemplate ()

Properties

bool | CanScroll [get, set]
double | HorizontalThumbOffset [get]
bool | IsAnimatingThumbOffset [get, set]
bool | IsScrollingWithMouse [get, set]
bool | IsThumbPannable [get, set]
bool | IsThumbPositionMirrored [get, set]
AnimationType | OffsetChangeAnimationType [get, set]
Orientation | Orientation [get, set]
TimeSpan | OverriddenOffsetChangeDuration [get, set]
IScrollControllerPanningInfo | PanningInfo [get]
TimeSpan | StockOffsetChangeDuration [get, set]
double | VerticalThumbOffset [get]

Events

TypedEventHandler
< IScrollController,
ScrollControllerAddScrollVelocityRequestedEventArgs > 		AddScrollVelocityRequested
TypedEventHandler
< IScrollController, Object > 		CanScrollChanged
TypedEventHandler
< IScrollController, Object > 		IsScrollingWithMouseChanged
TypedEventHandler
< CompositionScrollController,
string > 		LogMessage
TypedEventHandler
< CompositionScrollController,
CompositionScrollControllerOffsetChangeCompletedEventArgs > 		OffsetChangeCompleted
TypedEventHandler
< IScrollController,
ScrollControllerScrollByRequestedEventArgs > 		ScrollByRequested
TypedEventHandler
< IScrollController,
ScrollControllerScrollToRequestedEventArgs > 		ScrollToRequested

Private Member Functions

void | CompositionScrollController_IsEnabledChanged (object sender, DependencyPropertyChangedEventArgs e)
void | CompositionScrollController_SizeChanged (object sender, SizeChangedEventArgs e)
void | DecrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | IncrementRepeatButton_Click (object sender, RoutedEventArgs e)
void | PanningFrameworkElement_ManipulationCompleted (object sender, ManipulationCompletedRoutedEventArgs e)
void | PanningFrameworkElement_ManipulationDelta (object sender, ManipulationDeltaRoutedEventArgs e)
void | PanningFrameworkElement_ManipulationStarting (object sender, ManipulationStartingRoutedEventArgs e)
void | PanningFrameworkElement_PointerPressed (object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
void | PanningInfo_LogMessage (IScrollControllerPanningInfo sender, string message)
void | Parent_PointerPressed (object sender, PointerRoutedEventArgs e)
int | RaiseAddScrollVelocityRequested (float offsetVelocity, float?inertiaDecayRate, bool hookupCompletion)
void | RaiseCanScrollChanged ()
void | RaiseIsScrollingWithMouseChanged ()
void | RaiseLogMessage (string message)
int | RaiseScrollByRequested (double offsetDelta, ScrollingAnimationMode animationMode, bool hookupCompletion)
int | RaiseScrollToRequested (double offset, ScrollingAnimationMode animationMode, bool hookupCompletion)
double | ScrollPresenterOffsetFromThumbOffset (double thumbOffset)
void | UnhookHandlers ()
bool | UpdateCanScroll ()
void | UpdateOrientation ()
void | UpdatePanningFrameworkElementOffset ()

Private Attributes

RepeatButton | horizontalDecrementRepeatButton = null
UIElement | horizontalGrid = null
RepeatButton | horizontalIncrementRepeatButton = null
UIElement | horizontalThumb = null
bool | isScrollable = false
List< int > | lstAddScrollVelocityCorrelationIds = new List<int>()
List< string > | lstAsyncEventMessage = new List<string>()
List< int > | lstOffsetChangeCorrelationIds = new List<int>()
double | maxOffset = 0.0
double | minOffset = 0.0
double | offset = 0.0
double | offsetTarget = 0.0
Dictionary< int, OperationInfo > | operations = new Dictionary<int, OperationInfo>()
Orientation | orientation = Orientation.Vertical
FrameworkElement | panningFrameworkElement = null
CompositionScrollControllerPanningInfo | panningInfo = null
double | preManipulationThumbOffset = 0.0
const float | SmallChangeAdditionalVelocity = 144.0f
const float | SmallChangeInertiaDecayRate = 0.975f
RepeatButton | verticalDecrementRepeatButton = null
UIElement | verticalGrid = null
RepeatButton | verticalIncrementRepeatButton = null
UIElement | verticalThumb = null
double | viewportLength = 0.0

Detailed Description

Definition at line 476 of file CompositionScrollController.cs.

Member Enumeration Documentation

enum AnimationType
Enumerator:
Default
Accordion
Teleportation

Definition at line 485 of file CompositionScrollController.cs.

        {
            Default,
            Accordion,
            Teleportation
        }

Constructor & Destructor Documentation

CompositionScrollController ( ) [inline]

Definition at line 529 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: CompositionScrollController()");

            this.DefaultStyleKey = typeof(CompositionScrollController);
            panningInfo = new CompositionScrollControllerPanningInfo(DispatcherQueue, true, orientation);
            panningInfo.LogMessage += PanningInfo_LogMessage;
            IsScrollingWithMouse = false;
            OffsetChangeAnimationType = AnimationType.Default;
            StockOffsetChangeDuration = TimeSpan.MinValue;
            OverriddenOffsetChangeDuration = TimeSpan.MinValue;
            IsEnabledChanged += CompositionScrollController_IsEnabledChanged;
            SizeChanged += CompositionScrollController_SizeChanged;
        }

Member Function Documentation

int AddScrollVelocity | ( | float | offsetVelocity,
 |  | float? | inertiaDecayRate |
 | ) |  |  | [inline]

Definition at line 925 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: AddScrollVelocity for Orientation=" + Orientation + " with offsetVelocity=" + offsetVelocity + ", inertiaDecayRate=" + inertiaDecayRate);

            return RaiseAddScrollVelocityRequested(
                offsetVelocity, inertiaDecayRate, false /*hookupCompletion*/);
        }

void CompositionScrollController_IsEnabledChanged | ( | object | sender,
 |  | DependencyPropertyChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1434 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: IsEnabledChanged for Orientation=" + Orientation + ", IsEnabled=" + IsEnabled);

            // CanScroll's evaluation depends on IsEnabled.
            UpdateCanScroll();
        }

void CompositionScrollController_SizeChanged | ( | object | sender,
 |  | SizeChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1428 of file CompositionScrollController.cs.

        {
            panningInfo.UpdatePanningFrameworkElementLength(minOffset, maxOffset, viewportLength);
            UpdatePanningFrameworkElementOffset();
        }

void DecrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1314 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: DecrementRepeatButton_Click for Orientation=" + Orientation);

            if (!CanScroll)
                return;

            int offsetChangeCorrelationId =
                RaiseAddScrollVelocityRequested(IsThumbPositionMirrored ? SmallChangeAdditionalVelocity : -SmallChangeAdditionalVelocity, SmallChangeInertiaDecayRate, true /*hookupCompletion*/);
        }

CompositionAnimation GetScrollAnimation | ( | int | correlationId,
 |  | Vector2 | startPosition,
 |  | Vector2 | endPosition,
 |  | CompositionAnimation | defaultAnimation |
 | ) |  |  | [inline]

Definition at line 718 of file CompositionScrollController.cs.

        {
            RaiseLogMessage(
                "CompositionScrollController: GetScrollAnimation for Orientation=" + Orientation +
                " with OffsetsChangeCorrelationId=" + correlationId + ", startPosition=" + startPosition + ", endPosition=" + endPosition);

            try
            {
                Vector3KeyFrameAnimation stockKeyFrameAnimation = defaultAnimation as Vector3KeyFrameAnimation;

                if (stockKeyFrameAnimation != null)
                {
                    Vector3KeyFrameAnimation customKeyFrameAnimation = stockKeyFrameAnimation;

                    if (OffsetChangeAnimationType != AnimationType.Default)
                    {
                        OperationInfo oi = operations[correlationId];
                        float positionTarget = (float)oi.OffsetTarget;
                        float otherOrientationPosition = orientation == Orientation.Horizontal ? startPosition.Y : startPosition.X;

                        customKeyFrameAnimation = stockKeyFrameAnimation.Compositor.CreateVector3KeyFrameAnimation();
                        if (OffsetChangeAnimationType == AnimationType.Accordion)
                        {
                            float deltaPosition = 0.1f * (float)(positionTarget - offset);

                            if (orientation == Orientation.Horizontal)
                            {
                                for (int step = 0; step < 3; step++)
                                {
                                    customKeyFrameAnimation.InsertKeyFrame(
                                        1.0f - (0.4f / (float)Math.Pow(2, step)),
                                        new Vector3(positionTarget + deltaPosition, otherOrientationPosition, 0.0f));
                                    deltaPosition /= -2.0f;
                                }

                                customKeyFrameAnimation.InsertKeyFrame(1.0f, new Vector3(positionTarget, otherOrientationPosition, 0.0f));
                            }
                            else
                            {
                                for (int step = 0; step < 3; step++)
                                {
                                    customKeyFrameAnimation.InsertKeyFrame(
                                        1.0f - (0.4f / (float)Math.Pow(2, step)),
                                        new Vector3(otherOrientationPosition, positionTarget + deltaPosition, 0.0f));
                                    deltaPosition /= -2.0f;
                                }

                                customKeyFrameAnimation.InsertKeyFrame(1.0f, new Vector3(otherOrientationPosition, positionTarget, 0.0f));
                            }
                        }
                        else
                        {
                            // Teleportation case
                            float deltaPosition = (float)(positionTarget - offset);

                            CubicBezierEasingFunction cubicBezierStart = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
                                new Vector2(1.0f, 0.0f),
                                new Vector2(1.0f, 0.0f));

                            StepEasingFunction step = stockKeyFrameAnimation.Compositor.CreateStepEasingFunction(1);

                            CubicBezierEasingFunction cubicBezierEnd = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
                                new Vector2(0.0f, 1.0f),
                                new Vector2(0.0f, 1.0f));

                            if (orientation == Orientation.Horizontal)
                            {
                                customKeyFrameAnimation.InsertKeyFrame(
                                    0.499999f,
                                    new Vector3(positionTarget - 0.9f * deltaPosition, otherOrientationPosition, 0.0f),
                                    cubicBezierStart);
                                customKeyFrameAnimation.InsertKeyFrame(
                                    0.5f,
                                    new Vector3(positionTarget - 0.1f * deltaPosition, otherOrientationPosition, 0.0f),
                                    step);
                                customKeyFrameAnimation.InsertKeyFrame(
                                    1.0f,
                                    new Vector3(positionTarget, otherOrientationPosition, 0.0f),
                                    cubicBezierEnd);
                            }
                            else
                            {
                                customKeyFrameAnimation.InsertKeyFrame(
                                    0.499999f,
                                    new Vector3(otherOrientationPosition, positionTarget - 0.9f * deltaPosition, 0.0f),
                                    cubicBezierStart);
                                customKeyFrameAnimation.InsertKeyFrame(
                                    0.5f,
                                    new Vector3(otherOrientationPosition, positionTarget - 0.1f * deltaPosition, 0.0f),
                                    step);
                                customKeyFrameAnimation.InsertKeyFrame(
                                    1.0f,
                                    new Vector3(otherOrientationPosition, positionTarget, 0.0f),
                                    cubicBezierEnd);
                            }
                        }
                        customKeyFrameAnimation.Duration = stockKeyFrameAnimation.Duration;
                    }

                    if (OverriddenOffsetChangeDuration != TimeSpan.MinValue)
                    {
                        StockOffsetChangeDuration = stockKeyFrameAnimation.Duration;
                        customKeyFrameAnimation.Duration = OverriddenOffsetChangeDuration;
                    }

                    return customKeyFrameAnimation;
                }
            }
            catch (Exception ex)
            {
                RaiseLogMessage("CompositionScrollController: GetScrollAnimation exception=" + ex);
            }

            return null;
        }

void IncrementRepeatButton_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1325 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: IncrementRepeatButton_Click for Orientation=" + Orientation);

            if (!CanScroll)
                return;

            int offsetChangeCorrelationId =
                RaiseAddScrollVelocityRequested(IsThumbPositionMirrored ? -SmallChangeAdditionalVelocity : SmallChangeAdditionalVelocity, SmallChangeInertiaDecayRate, true /*hookupCompletion*/);
        }

void NotifyRequestedScrollCompleted ( int correlationId ) [inline]

Definition at line 838 of file CompositionScrollController.cs.

        {
            int offsetChangeCorrelationId = correlationId;

            RaiseLogMessage(
                "CompositionScrollController: NotifyRequestedScrollCompleted for Orientation=" + Orientation +
                " with offsetChangeCorrelationId=" + offsetChangeCorrelationId);

            if (lstOffsetChangeCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstOffsetChangeCorrelationIds.Remove(offsetChangeCorrelationId);

                double relativeOffsetChange = 0.0;

                if (operations.ContainsKey(offsetChangeCorrelationId))
                {
                    OperationInfo oi = operations[offsetChangeCorrelationId];
                    relativeOffsetChange = oi.RelativeOffsetChange;
                    operations.Remove(offsetChangeCorrelationId);
                }

                RaiseLogMessage("CompositionScrollController: ScrollTo/By completed. CorrelationId=" + offsetChangeCorrelationId);
            }
            else if (lstAddScrollVelocityCorrelationIds.Contains(offsetChangeCorrelationId))
            {
                lstAddScrollVelocityCorrelationIds.Add(offsetChangeCorrelationId);

                RaiseLogMessage("CompositionScrollController: AddScrollVelocityRequest completed. CorrelationId=" + offsetChangeCorrelationId);
            }

            if (OffsetChangeCompleted != null)
            {
                RaiseLogMessage(
                    "CompositionScrollController: NotifyRequestedScrollCompleted raising OffsetChangeCompleted event.");
                OffsetChangeCompleted(this, new CompositionScrollControllerOffsetChangeCompletedEventArgs(offsetChangeCorrelationId));
            }
        }

override void OnApplyTemplate ( ) [inline, protected]

Definition at line 544 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: OnApplyTemplate()");

            UnhookHandlers();

            base.OnApplyTemplate();

            horizontalGrid = GetTemplateChild("HorizontalGrid") as UIElement;
            verticalGrid = GetTemplateChild("VerticalGrid") as UIElement;
            horizontalThumb = GetTemplateChild("HorizontalThumb") as UIElement;
            verticalThumb = GetTemplateChild("VerticalThumb") as UIElement;
            horizontalDecrementRepeatButton = GetTemplateChild("HorizontalDecrementRepeatButton") as RepeatButton;
            verticalDecrementRepeatButton = GetTemplateChild("VerticalDecrementRepeatButton") as RepeatButton;
            horizontalIncrementRepeatButton = GetTemplateChild("HorizontalIncrementRepeatButton") as RepeatButton;
            verticalIncrementRepeatButton = GetTemplateChild("VerticalIncrementRepeatButton") as RepeatButton;

            UpdateOrientation();
        }

void PanningFrameworkElement_ManipulationCompleted | ( | object | sender,
 |  | ManipulationCompletedRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1112 of file CompositionScrollController.cs.

        {
            if (IsScrollingWithMouse)
            {
                // Ending a mouse-driven thumb drag.
                IsScrollingWithMouse = false;
                RaiseIsScrollingWithMouseChanged();
            }
        }

void PanningFrameworkElement_ManipulationDelta | ( | object | sender,
 |  | ManipulationDeltaRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1100 of file CompositionScrollController.cs.

        {
            if (IsScrollingWithMouse)
            {
                double targetThumbOffset = preManipulationThumbOffset + (Orientation == Orientation.Horizontal ? e.Cumulative.Translation.X : e.Cumulative.Translation.Y);
                double scrollPresenterOffset = ScrollPresenterOffsetFromThumbOffset(targetThumbOffset);

                int offsetChangeCorrelationId = RaiseScrollToRequested(
                    scrollPresenterOffset, ScrollingAnimationMode.Disabled, true /*hookupCompletion*/);
            }
        }

void PanningFrameworkElement_ManipulationStarting | ( | object | sender,
 |  | ManipulationStartingRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1092 of file CompositionScrollController.cs.

        {
            if (IsScrollingWithMouse)
            {
                preManipulationThumbOffset = Orientation == Orientation.Horizontal ? HorizontalThumbOffset : VerticalThumbOffset;
            }
        }

void PanningFrameworkElement_PointerPressed | ( | object | sender,
 |  | Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1066 of file CompositionScrollController.cs.

        {
            Point pt = e.GetCurrentPoint(sender as UIElement).Position;
            RaiseLogMessage("CompositionScrollController: PanningFrameworkElement_PointerPressed for Orientation=" + Orientation + ", position=" + pt);

            if (!CanScroll)
                return;

            switch (e.Pointer.PointerDeviceType)
            {
                case Microsoft.UI.Input.PointerDeviceType.Touch:
                case Microsoft.UI.Input.PointerDeviceType.Pen:
                    // Attempt an UI-thread-independent pan.
                    panningInfo.RaisePanRequested(e.GetCurrentPoint(null));
                    break;
                case Microsoft.UI.Input.PointerDeviceType.Mouse:
                    if (!IsScrollingWithMouse)
                    {
                        // Starting a mouse-driven thumb drag.
                        IsScrollingWithMouse = true;
                        RaiseIsScrollingWithMouseChanged();
                    }
                    break;
            }
        }

void PanningInfo_LogMessage | ( | IScrollControllerPanningInfo | sender,
 |  | string | message |
 | ) |  |  | [inline, private]

Definition at line 934 of file CompositionScrollController.cs.

        {
            RaiseLogMessage(message);
        }

void Parent_PointerPressed | ( | object | sender,
 |  | PointerRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 1442 of file CompositionScrollController.cs.

        {
            Point pt = e.GetCurrentPoint(sender as UIElement).Position;
            RaiseLogMessage("CompositionScrollController: Parent_PointerPressed for Orientation=" + Orientation + ", position=" + pt);

            if (!CanScroll)
                return;

            double relativeOffsetChange = 0.0;
            double newOffsetTarget = 0.0;

            if (Orientation == Orientation.Horizontal)
            {
                if (pt.X < HorizontalThumbOffset)
                {
                    if (IsThumbPositionMirrored)
                        relativeOffsetChange = viewportLength;
                    else
                        relativeOffsetChange = -viewportLength;
                }
                else if (pt.X > HorizontalThumbOffset + panningFrameworkElement.ActualWidth)
                {
                    if (IsThumbPositionMirrored)
                        relativeOffsetChange = -viewportLength;
                    else
                        relativeOffsetChange = viewportLength;
                }
                else
                {
                    return;
                }
            }
            else
            {
                if (pt.Y < VerticalThumbOffset)
                {
                    if (IsThumbPositionMirrored)
                        relativeOffsetChange = viewportLength;
                    else
                        relativeOffsetChange = -viewportLength;
                }
                else if (pt.Y > VerticalThumbOffset + panningFrameworkElement.ActualHeight)
                {
                    if (IsThumbPositionMirrored)
                        relativeOffsetChange = -viewportLength;
                    else
                        relativeOffsetChange = viewportLength;
                }
                else
                {
                    return;
                }
            }

            newOffsetTarget = offsetTarget + relativeOffsetChange;
            newOffsetTarget = Math.Max(minOffset, newOffsetTarget);
            newOffsetTarget = Math.Min(maxOffset, newOffsetTarget);
            relativeOffsetChange = newOffsetTarget - offsetTarget;
            offsetTarget = newOffsetTarget;

            int offsetChangeCorrelationId = RaiseScrollToRequested(
                offsetTarget, ScrollingAnimationMode.Auto, true /*hookupCompletion*/);
            if (offsetChangeCorrelationId != -1 && !operations.ContainsKey(offsetChangeCorrelationId))
            {
                operations.Add(offsetChangeCorrelationId, new OperationInfo(offsetChangeCorrelationId, relativeOffsetChange, offsetTarget));
            }
        }

int RaiseAddScrollVelocityRequested | ( | float | offsetVelocity,
 |  | float? | inertiaDecayRate,
 |  | bool | hookupCompletion |
 | ) |  |  | [inline, private]

Definition at line 1040 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: RaiseAddScrollVelocityRequested for Orientation=" + Orientation + " with offsetVelocity=" + offsetVelocity + ", inertiaDecayRate=" + inertiaDecayRate);

            if (AddScrollVelocityRequested != null)
            {
                ScrollControllerAddScrollVelocityRequestedEventArgs e =
                    new ScrollControllerAddScrollVelocityRequestedEventArgs(
                        offsetVelocity,
                        inertiaDecayRate);
                AddScrollVelocityRequested(this, e);
                if (e.CorrelationId != -1)
                {
                    RaiseLogMessage("CompositionScrollController: AddScrollVelocityRequest started. OffsetsChangeCorrelationId=" + e.CorrelationId);

                    if (hookupCompletion && !lstAddScrollVelocityCorrelationIds.Contains(e.CorrelationId))
                    {
                        lstAddScrollVelocityCorrelationIds.Add(e.CorrelationId);
                    }
                }
                return e.CorrelationId;
            }
            return -1;
        }

void RaiseCanScrollChanged ( ) [inline, private]

Definition at line 950 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: RaiseCanScrollChanged for Orientation=" + Orientation);
            if (CanScrollChanged != null)
            {
                CanScrollChanged(this, null);
            }
        }

void RaiseIsScrollingWithMouseChanged ( ) [inline, private]

Definition at line 959 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: RaiseIsScrollingWithMouseChanged for Orientation=" + Orientation);
            if (IsScrollingWithMouseChanged != null)
            {
                IsScrollingWithMouseChanged(this, null);
            }
        }

void RaiseLogMessage ( string message ) [inline, private]

Definition at line 939 of file CompositionScrollController.cs.

        {
            if (s_IsDebugOutputEnabled)
                System.Diagnostics.Debug.WriteLine(message);

            if (LogMessage != null)
            {
                LogMessage(this, message);
            }
        }

int RaiseScrollByRequested | ( | double | offsetDelta,
 |  | ScrollingAnimationMode | animationMode,
 |  | bool | hookupCompletion |
 | ) |  |  | [inline, private]

Definition at line 1004 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: RaiseScrollByRequested for Orientation=" + Orientation + " with offsetDelta=" + offsetDelta + ", animationMode=" + animationMode);

            try
            {
                if (ScrollByRequested != null)
                {
                    ScrollControllerScrollByRequestedEventArgs e =
                        new ScrollControllerScrollByRequestedEventArgs(
                            offsetDelta,
                            new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
                    ScrollByRequested(this, e);
                    if (e.CorrelationId != -1)
                    {
                        RaiseLogMessage("CompositionScrollController: ScrollByRequest started. OffsetsChangeCorrelationId=" + e.CorrelationId);

                        if (hookupCompletion && !lstOffsetChangeCorrelationIds.Contains(e.CorrelationId))
                        {
                            lstOffsetChangeCorrelationIds.Add(e.CorrelationId);
                        }
                    }
                    return e.CorrelationId;
                }
            }
            catch (Exception ex)
            {
                RaiseLogMessage("CompositionScrollController: RaiseScrollByRequested - exception=" + ex);
            }

            return -1;
        }

int RaiseScrollToRequested | ( | double | offset,
 |  | ScrollingAnimationMode | animationMode,
 |  | bool | hookupCompletion |
 | ) |  |  | [inline, private]

Definition at line 968 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: RaiseScrollToRequested for Orientation=" + Orientation + " with offset=" + offset + ", animationMode=" + animationMode);

            try
            {
                if (ScrollToRequested != null)
                {
                    ScrollControllerScrollToRequestedEventArgs e =
                        new ScrollControllerScrollToRequestedEventArgs(
                            offset,
                            new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
                    ScrollToRequested(this, e);
                    if (e.CorrelationId != -1)
                    {
                        RaiseLogMessage("CompositionScrollController: ScrollToRequest started. OffsetsChangeCorrelationId=" + e.CorrelationId);

                        if (hookupCompletion && !lstOffsetChangeCorrelationIds.Contains(e.CorrelationId))
                        {
                            lstOffsetChangeCorrelationIds.Add(e.CorrelationId);
                        }
                    }
                    return e.CorrelationId;
                }
            }
            catch (Exception ex)
            {
                RaiseLogMessage("CompositionScrollController: RaiseScrollToRequested - exception=" + ex);
            }

            return -1;
        }

int ScrollBy | ( | double | offsetDelta,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline]

Definition at line 916 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: ScrollBy for Orientation=" + Orientation + " with offsetDelta=" + offsetDelta + ", animationMode=" + animationMode);

            return RaiseScrollByRequested(
                offsetDelta, animationMode, false /*hookupCompletion*/);
        }

double ScrollPresenterOffsetFromThumbOffset ( double thumbOffset ) [inline, private]

Definition at line 1398 of file CompositionScrollController.cs.

        {
            double scrollPresenterOffset = 0.0;

            if (panningFrameworkElement != null)
            {
                double parentLength = 0.0;
                double panningFrameworkElementLength =
                    Orientation == Orientation.Horizontal ? panningFrameworkElement.ActualWidth : panningFrameworkElement.ActualHeight;
                FrameworkElement parent = panningFrameworkElement.Parent as FrameworkElement;
                if (parent != null)
                {
                    parentLength = Orientation == Orientation.Horizontal ? parent.ActualWidth : parent.ActualHeight;
                }
                if (parentLength != panningFrameworkElementLength)
                {
                    if (IsThumbPositionMirrored)
                    {
                        scrollPresenterOffset = (parentLength - panningFrameworkElementLength - thumbOffset) * (maxOffset - minOffset) / (parentLength - panningFrameworkElementLength);
                    }
                    else
                    {
                        scrollPresenterOffset = thumbOffset * (maxOffset - minOffset) / (parentLength - panningFrameworkElementLength);
                    }
                }
            }

            return scrollPresenterOffset;
        }

int ScrollTo | ( | double | offset,
 |  | ScrollingAnimationMode | animationMode |
 | ) |  |  | [inline]

Definition at line 907 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollController: ScrollTo for Orientation=" + Orientation + " with offset=" + offset + ", animationMode=" + animationMode);

            return RaiseScrollToRequested(
                offset, animationMode, false /*hookupCompletion*/);
        }

void SetIsScrollable ( bool isScrollable ) [inline]

Definition at line 652 of file CompositionScrollController.cs.

        {
            RaiseLogMessage(
                "CompositionScrollController: SetIsScrollable for Orientation=" + Orientation +
                " with isScrollable=" + isScrollable);
            this.isScrollable = isScrollable;
            // CanScroll's evaluation depends on isScrollable.
            UpdateCanScroll();
        }

void SetValues | ( | double | minOffset,
 |  | double | maxOffset,
 |  | double | offset,
 |  | double | viewportLength |
 | ) |  |  | [inline]

Definition at line 662 of file CompositionScrollController.cs.

        {
            RaiseLogMessage(
                "CompositionScrollController: SetValues for Orientation=" + Orientation +
                " with minOffset=" + minOffset +
                ", maxOffset=" + maxOffset +
                ", offset=" + offset +
                ", viewportLength=" + viewportLength);

            if (maxOffset < minOffset)
            {
                throw new ArgumentOutOfRangeException("maxOffset");
            }

            if (viewportLength < 0.0)
            {
                throw new ArgumentOutOfRangeException("viewportLength");
            }

            offset = Math.Max(minOffset, offset);
            offset = Math.Min(maxOffset, offset);

            if (operations.Count == 0)
            {
                offsetTarget = offset;
            }
            else
            {
                offsetTarget = Math.Max(minOffset, offsetTarget);
                offsetTarget = Math.Min(maxOffset, offsetTarget);
            }

            bool updatePanningFrameworkElementLength =
                this.minOffset != minOffset ||
                this.maxOffset != maxOffset ||
                this.viewportLength != viewportLength;

            this.minOffset = minOffset;
            this.offset = offset;
            this.maxOffset = maxOffset;
            this.viewportLength = viewportLength;

            if (updatePanningFrameworkElementLength && !panningInfo.UpdatePanningFrameworkElementLength(minOffset, maxOffset, viewportLength))
            {
                panningInfo.UpdatePanningElementOffsetMultiplier();
            }

            UpdatePanningFrameworkElementOffset();

            // Potentially changed minOffset / maxOffset value(s) may have an effect
            // on the read-only IScrollController.CanScroll property.
            UpdateCanScroll();
        }

void UnhookHandlers ( ) [inline, private]

Definition at line 1122 of file CompositionScrollController.cs.

        {
            if (horizontalDecrementRepeatButton != null)
            {
                horizontalDecrementRepeatButton.Click -= DecrementRepeatButton_Click;
            }

            if (horizontalIncrementRepeatButton != null)
            {
                horizontalIncrementRepeatButton.Click -= IncrementRepeatButton_Click;
            }

            if (verticalDecrementRepeatButton != null)
            {
                verticalDecrementRepeatButton.Click -= DecrementRepeatButton_Click;
            }

            if (verticalIncrementRepeatButton != null)
            {
                verticalIncrementRepeatButton.Click -= IncrementRepeatButton_Click;
            }

            if (panningFrameworkElement != null)
            {
                panningFrameworkElement.PointerPressed -= PanningFrameworkElement_PointerPressed;
                panningFrameworkElement.ManipulationStarting -= PanningFrameworkElement_ManipulationStarting;
                panningFrameworkElement.ManipulationDelta -= PanningFrameworkElement_ManipulationDelta;
                panningFrameworkElement.ManipulationCompleted -= PanningFrameworkElement_ManipulationCompleted;

                FrameworkElement parent = panningFrameworkElement.Parent as FrameworkElement;
                if (parent != null)
                {
                    parent.PointerPressed -= Parent_PointerPressed;
                }
            }
        }

bool UpdateCanScroll ( ) [inline, private]

Definition at line 1159 of file CompositionScrollController.cs.

        {
            bool oldCanScroll = CanScroll;

            CanScroll =
                maxOffset > minOffset && isScrollable && IsEnabled;

            if (oldCanScroll != CanScroll)
            {
                RaiseCanScrollChanged();
                return true;
            }
            return false;
        }

void UpdateOrientation ( ) [inline, private]

Definition at line 1174 of file CompositionScrollController.cs.

        {
            panningFrameworkElement = null;

            if (Orientation == Orientation.Horizontal)
            {
                if (horizontalGrid != null)
                    horizontalGrid.Visibility = Visibility.Visible;
                if (verticalGrid != null)
                    verticalGrid.Visibility = Visibility.Collapsed;
                panningFrameworkElement = horizontalThumb as FrameworkElement;
                if (panningFrameworkElement != null)
                {
                    panningFrameworkElement.ManipulationMode = ManipulationModes.TranslateX;
                }

                if (horizontalDecrementRepeatButton != null)
                {
                    horizontalDecrementRepeatButton.Click += DecrementRepeatButton_Click;
                }

                if (horizontalIncrementRepeatButton != null)
                {
                    horizontalIncrementRepeatButton.Click += IncrementRepeatButton_Click;
                }
            }
            else
            {
                if (verticalGrid != null)
                    verticalGrid.Visibility = Visibility.Visible;
                if (horizontalGrid != null)
                    horizontalGrid.Visibility = Visibility.Collapsed;
                panningFrameworkElement = verticalThumb as FrameworkElement;
                if (panningFrameworkElement != null)
                {
                    panningFrameworkElement.ManipulationMode = ManipulationModes.TranslateY;
                }

                if (verticalDecrementRepeatButton != null)
                {
                    verticalDecrementRepeatButton.Click += DecrementRepeatButton_Click;
                }

                if (verticalIncrementRepeatButton != null)
                {
                    verticalIncrementRepeatButton.Click += IncrementRepeatButton_Click;
                }
            }

            panningInfo.PanOrientation = Orientation;

            if (panningFrameworkElement != null)
            {
                // Setting up the pannable thumb for mouse-driven drags.
                panningFrameworkElement.PointerPressed += PanningFrameworkElement_PointerPressed;
                panningFrameworkElement.ManipulationStarting += PanningFrameworkElement_ManipulationStarting;
                panningFrameworkElement.ManipulationDelta += PanningFrameworkElement_ManipulationDelta;
                panningFrameworkElement.ManipulationCompleted += PanningFrameworkElement_ManipulationCompleted;

                FrameworkElement parent = panningFrameworkElement.Parent as FrameworkElement;

                if (parent != null)
                {
                    parent.PointerPressed += Parent_PointerPressed;
                    panningInfo.SetPanningFrameworkElement(panningFrameworkElement);
                    panningInfo.StartThumbAnimation();
                }
                else
                {
                    panningInfo.SetPanningFrameworkElement(null);
                }
            }
            else
            {
                panningInfo.SetPanningFrameworkElement(null);
            }
        }

void UpdatePanningFrameworkElementOffset ( ) [inline, private]

Definition at line 1252 of file CompositionScrollController.cs.

        {
            Visual panningVisual = panningInfo.PanningVisual;

            if (!IsAnimatingThumbOffset && panningVisual != null)
            {
                if (orientation == Orientation.Horizontal)
                {
                    float horizontalThumbOffset = (float)HorizontalThumbOffset;
                    Vector3 currentHorizontalThumbOffset;

                    panningVisual.Properties.TryGetVector3("Translation", out currentHorizontalThumbOffset);
                    if (currentHorizontalThumbOffset.X != horizontalThumbOffset)
                    {
                        RaiseLogMessage("CompositionScrollController: UpdatePanningFrameworkElementOffset for Orientation=Horizontal, HorizontalThumbOffset=" + horizontalThumbOffset);
                        panningVisual.Properties.InsertVector3("Translation", new Vector3(horizontalThumbOffset, 0.0f, 0.0f));
                    }
                }
                else
                {
                    float verticalThumbOffset = (float)VerticalThumbOffset;
                    Vector3 currentVerticalThumbOffset;

                    panningVisual.Properties.TryGetVector3("Translation", out currentVerticalThumbOffset);
                    if (currentVerticalThumbOffset.Y != verticalThumbOffset)
                    {
                        RaiseLogMessage("CompositionScrollController: UpdatePanningFrameworkElementOffset for Orientation=Vertical, VerticalThumbOffset=" + verticalThumbOffset);
                        panningVisual.Properties.InsertVector3("Translation", new Vector3(0.0f, verticalThumbOffset, 0.0f));
                    }
                }
            }
            else if (!IsThumbPannable && panningFrameworkElement != null)
            {
                Thickness margin;

                if (orientation == Orientation.Horizontal)
                {
                    if (IsThumbPositionMirrored)
                    {
                        margin = new Thickness((maxOffset - offset) / panningInfo.PanningElementOffsetMultiplier, 0, 0, 0);
                    }
                    else
                    {
                        margin = new Thickness((minOffset - offset) / panningInfo.PanningElementOffsetMultiplier, 0, 0, 0);
                    }
                }
                else
                {
                    if (IsThumbPositionMirrored)
                    {
                        margin = new Thickness(0, (maxOffset - offset) / panningInfo.PanningElementOffsetMultiplier, 0, 0);
                    }
                    else
                    {
                        margin = new Thickness(0, (minOffset - offset) / panningInfo.PanningElementOffsetMultiplier, 0, 0);
                    }
                }

                panningFrameworkElement.Margin = margin;
            }
        }

Member Data Documentation

RepeatButton horizontalDecrementRepeatButton = null [private]

Definition at line 516 of file CompositionScrollController.cs.

UIElement horizontalGrid = null [private]

Definition at line 512 of file CompositionScrollController.cs.

RepeatButton horizontalIncrementRepeatButton = null [private]

Definition at line 518 of file CompositionScrollController.cs.

UIElement horizontalThumb = null [private]

Definition at line 514 of file CompositionScrollController.cs.

bool isScrollable = false [private]

Definition at line 521 of file CompositionScrollController.cs.

List<int> lstAddScrollVelocityCorrelationIds = new List<int>() [private]

Definition at line 508 of file CompositionScrollController.cs.

List<string> lstAsyncEventMessage = new List<string>() [private]

Definition at line 506 of file CompositionScrollController.cs.

List<int> lstOffsetChangeCorrelationIds = new List<int>() [private]

Definition at line 507 of file CompositionScrollController.cs.

double maxOffset = 0.0 [private]

Definition at line 523 of file CompositionScrollController.cs.

double minOffset = 0.0 [private]

Definition at line 522 of file CompositionScrollController.cs.

double offset = 0.0 [private]

Definition at line 524 of file CompositionScrollController.cs.

double offsetTarget = 0.0 [private]

Definition at line 525 of file CompositionScrollController.cs.

Dictionary<int, OperationInfo> operations = new Dictionary<int, OperationInfo>() [private]

Definition at line 510 of file CompositionScrollController.cs.

Orientation orientation = Orientation.Vertical [private]

Definition at line 520 of file CompositionScrollController.cs.

FrameworkElement panningFrameworkElement = null [private]

Definition at line 511 of file CompositionScrollController.cs.

CompositionScrollControllerPanningInfo panningInfo = null [private]

Definition at line 509 of file CompositionScrollController.cs.

double preManipulationThumbOffset = 0.0 [private]

Definition at line 527 of file CompositionScrollController.cs.

bool s_IsDebugOutputEnabled = false [static]

Definition at line 480 of file CompositionScrollController.cs.

const float SmallChangeAdditionalVelocity = 144.0f [private]

Definition at line 482 of file CompositionScrollController.cs.

const float SmallChangeInertiaDecayRate = 0.975f [private]

Definition at line 483 of file CompositionScrollController.cs.

RepeatButton verticalDecrementRepeatButton = null [private]

Definition at line 517 of file CompositionScrollController.cs.

UIElement verticalGrid = null [private]

Definition at line 513 of file CompositionScrollController.cs.

RepeatButton verticalIncrementRepeatButton = null [private]

Definition at line 519 of file CompositionScrollController.cs.

UIElement verticalThumb = null [private]

Definition at line 515 of file CompositionScrollController.cs.

double viewportLength = 0.0 [private]

Definition at line 526 of file CompositionScrollController.cs.

Property Documentation

bool CanScroll [get, set]

Definition at line 888 of file CompositionScrollController.cs.

double HorizontalThumbOffset [get, private]

Definition at line 1339 of file CompositionScrollController.cs.

bool IsAnimatingThumbOffset [get, set]

Definition at line 583 of file CompositionScrollController.cs.

bool IsScrollingWithMouse [get, set]

Definition at line 894 of file CompositionScrollController.cs.

bool IsThumbPannable [get, set]

Definition at line 597 of file CompositionScrollController.cs.

bool IsThumbPositionMirrored [get, set]

Definition at line 611 of file CompositionScrollController.cs.

AnimationType OffsetChangeAnimationType [get, set]

Definition at line 565 of file CompositionScrollController.cs.

Orientation Orientation [get, set]

Definition at line 630 of file CompositionScrollController.cs.

TimeSpan OverriddenOffsetChangeDuration [get, set]

Definition at line 577 of file CompositionScrollController.cs.

IScrollControllerPanningInfo PanningInfo [get]

Definition at line 878 of file CompositionScrollController.cs.

TimeSpan StockOffsetChangeDuration [get, set]

Definition at line 571 of file CompositionScrollController.cs.

double VerticalThumbOffset [get, private]

Definition at line 1370 of file CompositionScrollController.cs.

Event Documentation

TypedEventHandler<IScrollController, ScrollControllerAddScrollVelocityRequestedEventArgs> AddScrollVelocityRequested

Definition at line 905 of file CompositionScrollController.cs.

TypedEventHandler<IScrollController, Object> CanScrollChanged

Definition at line 901 of file CompositionScrollController.cs.

TypedEventHandler<IScrollController, Object> IsScrollingWithMouseChanged

Definition at line 902 of file CompositionScrollController.cs.

TypedEventHandler<CompositionScrollController, string> LogMessage

Definition at line 899 of file CompositionScrollController.cs.

TypedEventHandler<CompositionScrollController, CompositionScrollControllerOffsetChangeCompletedEventArgs> OffsetChangeCompleted

Definition at line 478 of file CompositionScrollController.cs.

TypedEventHandler<IScrollController, ScrollControllerScrollByRequestedEventArgs> ScrollByRequested

Definition at line 904 of file CompositionScrollController.cs.

TypedEventHandler<IScrollController, ScrollControllerScrollToRequestedEventArgs> ScrollToRequested

Definition at line 903 of file CompositionScrollController.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/CompositionScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CompositionScrollController::OperationInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • CompositionScrollController
  • CompositionScrollController::OperationInfo
Public Member Functions | Public Attributes

CompositionScrollController::OperationInfo Struct Reference

List of all members.

Public Member Functions

OperationInfo (int correlationId, double relativeOffsetChange, double offsetTarget)

Public Attributes

int | CorrelationId
double | OffsetTarget
double | RelativeOffsetChange

Detailed Description

Definition at line 492 of file CompositionScrollController.cs.

Constructor & Destructor Documentation

OperationInfo | ( | int | correlationId,
 |  | double | relativeOffsetChange,
 |  | double | offsetTarget |
 | ) |  |  | [inline]

Definition at line 498 of file CompositionScrollController.cs.

                                                                                : this()
            {
                CorrelationId = correlationId;
                RelativeOffsetChange = relativeOffsetChange;
                OffsetTarget = offsetTarget;
            }

Member Data Documentation

int CorrelationId

Definition at line 494 of file CompositionScrollController.cs.

double OffsetTarget

Definition at line 496 of file CompositionScrollController.cs.

double RelativeOffsetChange

Definition at line 495 of file CompositionScrollController.cs.

The documentation for this struct was generated from the following file:
  • ScrollPresenter/TestUI/CompositionScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CompositionScrollControllerOffsetChangeCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • CompositionScrollControllerOffsetChangeCompletedEventArgs
Properties | Private Member Functions

CompositionScrollControllerOffsetChangeCompletedEventArgs Class Reference

List of all members.

Properties

int | OffsetChangeCorrelationId [get, set]

Private Member Functions

internal | CompositionScrollControllerOffsetChangeCompletedEventArgs (int offsetChangeCorrelationId)

Detailed Description

Definition at line 462 of file CompositionScrollController.cs.

Constructor & Destructor Documentation

internal CompositionScrollControllerOffsetChangeCompletedEventArgs ( int offsetChangeCorrelationId ) [inline, private]

Definition at line 464 of file CompositionScrollController.cs.

        {
            OffsetChangeCorrelationId = offsetChangeCorrelationId;
        }

Property Documentation

int OffsetChangeCorrelationId [get, set]

Definition at line 470 of file CompositionScrollController.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/CompositionScrollController.cs
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CompositionScrollControllerPanningInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • CompositionScrollControllerPanningInfo
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

CompositionScrollControllerPanningInfo Class Reference

List of all members.

Public Member Functions

void | SetPanningElementExpressionAnimationSources (CompositionPropertySet propertySet, string minOffsetPropertyName, string maxOffsetPropertyName, string offsetPropertyName, string multiplierPropertyName)

Properties

internal bool | IsAnimatingThumbOffset [get, set]
bool | IsRailEnabled [get, set]
internal bool | IsThumbPannable [get, set]
internal bool | IsThumbPositionMirrored [get, set]
UIElement | PanningElementAncestor [get, set]
internal float | PanningElementOffsetMultiplier [get]
internal Visual | PanningVisual [get]
Orientation | PanOrientation [get, set]

Events

TypedEventHandler
< IScrollControllerPanningInfo,
Object > 		Changed
TypedEventHandler
< IScrollControllerPanningInfo,
String > 		LogMessage
TypedEventHandler
< IScrollControllerPanningInfo,
ScrollControllerPanRequestedEventArgs > 		PanRequested

Private Member Functions

internal | CompositionScrollControllerPanningInfo (DispatcherQueue dispatcherQueue, bool isRailEnabled, Orientation panOrientation)
void | EnsureThumbAnimation ()
void | RaiseChanged ()
void | RaiseLogMessage (string logMessage)
internal bool | RaisePanRequested (PointerPoint pointerPoint)
internal void | SetPanningFrameworkElement (FrameworkElement value)
internal void | StartThumbAnimation ()
internal void | StopThumbAnimation ()
internal void | UpdatePanningElementOffsetMultiplier ()
internal bool | UpdatePanningFrameworkElementLength (double minOffset, double maxOffset, double viewportLength)
void | UpdateThumbExpression ()

Private Attributes

DispatcherQueue | dispatcherQueue = null
CompositionPropertySet | expressionAnimationSources = null
bool | isAnimatingThumbOffset = true
bool | isRailEnabled = true
bool | isThumbPannable = true
bool | isThumbPositionMirrored = false
double | maxOffset
string | maxOffsetPropertyName
double | minOffset
string | minOffsetPropertyName
string | multiplierPropertyName
string | offsetPropertyName
UIElement | panningElementAncestor = null
FrameworkElement | panningFrameworkElement = null
Visual | panningVisual = null
Orientation | panOrientation = Orientation.Vertical
ExpressionAnimation | thumbOffsetAnimation = null

Detailed Description

Definition at line 19 of file CompositionScrollController.cs.

Constructor & Destructor Documentation

internal CompositionScrollControllerPanningInfo | ( | DispatcherQueue | dispatcherQueue,
 |  | bool | isRailEnabled,
 |  | Orientation | panOrientation |
 | ) |  |  | [inline, private]

Definition at line 211 of file CompositionScrollController.cs.

        {
            this.dispatcherQueue = dispatcherQueue;
            this.IsRailEnabled = isRailEnabled;
            this.PanOrientation = panOrientation;
        }

Member Function Documentation

void EnsureThumbAnimation ( ) [inline, private]

Definition at line 411 of file CompositionScrollController.cs.

        {
            if (thumbOffsetAnimation == null && expressionAnimationSources != null &&
                !string.IsNullOrWhiteSpace(multiplierPropertyName) &&
                !string.IsNullOrWhiteSpace(offsetPropertyName) &&
                !string.IsNullOrWhiteSpace(minOffsetPropertyName) &&
                !string.IsNullOrWhiteSpace(maxOffsetPropertyName))
            {
                thumbOffsetAnimation = expressionAnimationSources.Compositor.CreateExpressionAnimation();
                thumbOffsetAnimation.SetReferenceParameter("sources", expressionAnimationSources);
            }
        }

void RaiseChanged ( ) [inline, private]

Definition at line 451 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollControllerPanningInfo: RaiseChanged for PanOrientation=" + panOrientation);

            if (Changed != null)
            {
                Changed(this, null);
            }
        }

void RaiseLogMessage ( string logMessage ) [inline, private]

Definition at line 443 of file CompositionScrollController.cs.

        {
            if (LogMessage != null)
            {
                LogMessage(this, logMessage);
            }
        }

internal bool RaisePanRequested ( PointerPoint pointerPoint ) [inline, private]

Definition at line 354 of file CompositionScrollController.cs.

        {
            RaiseLogMessage("CompositionScrollControllerPanningInfo: RaisePanRequested for PanOrientation=" + panOrientation + " with pointerPoint=" + pointerPoint);

            if (PanRequested != null)
            {
                ScrollControllerPanRequestedEventArgs args = new ScrollControllerPanRequestedEventArgs(pointerPoint);

                PanRequested(this, args);
                RaiseLogMessage("CompositionScrollControllerPanningInfo: RaisePanRequested result Handled=" + args.Handled);

                return args.Handled;
            }

            return false;
        }

void SetPanningElementExpressionAnimationSources | ( | CompositionPropertySet | propertySet,
 |  | string | minOffsetPropertyName,
 |  | string | maxOffsetPropertyName,
 |  | string | offsetPropertyName,
 |  | string | multiplierPropertyName |
 | ) |  |  | [inline]

Definition at line 165 of file CompositionScrollController.cs.

        {
            RaiseLogMessage(
                "CompositionScrollControllerPanningInfo: SetPanningElementExpressionAnimationSources for PanOrientation=" + panOrientation +
                " with minOffsetPropertyName=" + minOffsetPropertyName +
                ", maxOffsetPropertyName=" + maxOffsetPropertyName +
                ", offsetPropertyName=" + offsetPropertyName +
                ", multiplierPropertyName=" + multiplierPropertyName);

            expressionAnimationSources = propertySet;
            if (expressionAnimationSources != null)
            {
                this.minOffsetPropertyName = minOffsetPropertyName.Trim();
                this.maxOffsetPropertyName = maxOffsetPropertyName.Trim();
                this.offsetPropertyName = offsetPropertyName.Trim();
                this.multiplierPropertyName = multiplierPropertyName.Trim();

                UpdatePanningElementOffsetMultiplier();

                if (thumbOffsetAnimation == null && IsAnimatingThumbOffset)
                {
                    EnsureThumbAnimation();
                    UpdateThumbExpression();
                    StartThumbAnimation();
                }
            }
            else
            {
                this.minOffsetPropertyName =
                this.maxOffsetPropertyName =
                this.offsetPropertyName =
                this.multiplierPropertyName = string.Empty;

                if (IsAnimatingThumbOffset)
                {
                    thumbOffsetAnimation = null;
                    StopThumbAnimation();
                }
            }
        }

internal void SetPanningFrameworkElement ( FrameworkElement value ) [inline, private]

Definition at line 221 of file CompositionScrollController.cs.

        {
            if (panningFrameworkElement != value)
            {
                panningFrameworkElement = value;

                if (panningFrameworkElement == null)
                {
                    panningVisual = null;

                    PanningElementAncestor = null;
                }
                else
                {
                    panningVisual = ElementCompositionPreview.GetElementVisual(panningFrameworkElement);
                    ElementCompositionPreview.SetIsTranslationEnabled(panningFrameworkElement, true);

                    PanningElementAncestor = panningFrameworkElement.Parent as UIElement;
                }
            }
        }

internal void StartThumbAnimation ( ) [inline, private]

Definition at line 324 of file CompositionScrollController.cs.

        {
            if (panningVisual != null && thumbOffsetAnimation != null)
            {
                if (panOrientation == Orientation.Horizontal)
                {
                    panningVisual.StartAnimation("Translation.X", thumbOffsetAnimation);
                }
                else
                {
                    panningVisual.StartAnimation("Translation.Y", thumbOffsetAnimation);
                }
            }
        }

internal void StopThumbAnimation ( ) [inline, private]

Definition at line 339 of file CompositionScrollController.cs.

        {
            if (panningVisual != null)
            {
                if (panOrientation == Orientation.Horizontal)
                {
                    panningVisual.StopAnimation("Translation.X");
                }
                else
                {
                    panningVisual.StopAnimation("Translation.Y");
                }
            }
        }

internal void UpdatePanningElementOffsetMultiplier ( ) [inline, private]

Definition at line 245 of file CompositionScrollController.cs.

        {
            if (expressionAnimationSources != null && !string.IsNullOrWhiteSpace(multiplierPropertyName))
            {
                float panningVisualScrollMultiplier = PanningElementOffsetMultiplier;

                RaiseLogMessage("CompositionScrollControllerPanningInfo: UpdatePanningElementOffsetMultiplier for PanOrientation=" + panOrientation +
                    ", PanningElementOffsetMultiplier=" + panningVisualScrollMultiplier);

                expressionAnimationSources.InsertScalar(multiplierPropertyName, panningVisualScrollMultiplier);
            }
        }

internal bool UpdatePanningFrameworkElementLength | ( | double | minOffset,
 |  | double | maxOffset,
 |  | double | viewportLength |
 | ) |  |  | [inline, private]

Definition at line 260 of file CompositionScrollController.cs.

        {
            this.minOffset = minOffset;
            this.maxOffset = maxOffset;

            if (panningFrameworkElement != null)
            {
                double parentWidth = 0.0;
                double parentHeight = 0.0;
                FrameworkElement parent = panningFrameworkElement.Parent as FrameworkElement;

                if (parent != null)
                {
                    parentWidth = parent.ActualWidth;
                    parentHeight = parent.ActualHeight;
                }

                if (panOrientation == Orientation.Horizontal)
                {
                    double newWidth;
                    if (viewportLength == 0.0)
                    {
                        newWidth = 40.0;
                    }
                    else
                    {
                        newWidth = Math.Max(Math.Min(40.0, parentWidth), viewportLength / (maxOffset - minOffset + viewportLength) * parentWidth);
                    }
                    if (newWidth != panningFrameworkElement.Width)
                    {
                        RaiseLogMessage("CompositionScrollControllerPanningInfo: UpdatePanningFrameworkElementLength for PanOrientation=Horizontal, setting Width=" + newWidth);

                        panningFrameworkElement.Width = newWidth;
                        var ignored = dispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdatePanningElementOffsetMultiplier);
                        return true;
                    }
                }
                else
                {
                    double newHeight;
                    if (viewportLength == 0.0)
                    {
                        newHeight = 40.0;
                    }
                    else
                    {
                        newHeight = Math.Max(Math.Min(40.0, parentHeight), viewportLength / (maxOffset - minOffset + viewportLength) * parentHeight);
                    }
                    if (newHeight != panningFrameworkElement.Height)
                    {
                        RaiseLogMessage("CompositionScrollControllerPanningInfo: UpdatePanningFrameworkElementLength for PanOrientation=Vertical, setting Height=" + newHeight);

                        panningFrameworkElement.Height = newHeight;
                        var ignored = dispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdatePanningElementOffsetMultiplier);
                        return true;
                    }
                }
            }
            return false;
        }

void UpdateThumbExpression ( ) [inline, private]

Definition at line 426 of file CompositionScrollController.cs.

        {
            if (thumbOffsetAnimation != null)
            {
                if (isThumbPositionMirrored)
                {
                    thumbOffsetAnimation.Expression =
                        "(sources." + maxOffsetPropertyName + " - min(sources." + maxOffsetPropertyName + ",max(sources." + minOffsetPropertyName + ",sources." + offsetPropertyName + ")))/(sources." + multiplierPropertyName + ")";
                }
                else
                {
                    thumbOffsetAnimation.Expression =
                        "min(sources." + maxOffsetPropertyName + ",max(sources." + minOffsetPropertyName + ",sources." + offsetPropertyName + "))/(-sources." + multiplierPropertyName + ")";
                }
            }
        }

Member Data Documentation

DispatcherQueue dispatcherQueue = null [private]

Definition at line 21 of file CompositionScrollController.cs.

CompositionPropertySet expressionAnimationSources = null [private]

Definition at line 22 of file CompositionScrollController.cs.

bool isAnimatingThumbOffset = true [private]

Definition at line 28 of file CompositionScrollController.cs.

bool isRailEnabled = true [private]

Definition at line 31 of file CompositionScrollController.cs.

bool isThumbPannable = true [private]

Definition at line 29 of file CompositionScrollController.cs.

bool isThumbPositionMirrored = false [private]

Definition at line 30 of file CompositionScrollController.cs.

double maxOffset [private]

Definition at line 37 of file CompositionScrollController.cs.

string maxOffsetPropertyName [private]

Definition at line 33 of file CompositionScrollController.cs.

double minOffset [private]

Definition at line 36 of file CompositionScrollController.cs.

string minOffsetPropertyName [private]

Definition at line 32 of file CompositionScrollController.cs.

string multiplierPropertyName [private]

Definition at line 35 of file CompositionScrollController.cs.

string offsetPropertyName [private]

Definition at line 34 of file CompositionScrollController.cs.

UIElement panningElementAncestor = null [private]

Definition at line 26 of file CompositionScrollController.cs.

FrameworkElement panningFrameworkElement = null [private]

Definition at line 25 of file CompositionScrollController.cs.

Visual panningVisual = null [private]

Definition at line 24 of file CompositionScrollController.cs.

Orientation panOrientation = Orientation.Vertical [private]

Definition at line 27 of file CompositionScrollController.cs.

ExpressionAnimation thumbOffsetAnimation = null [private]

Definition at line 23 of file CompositionScrollController.cs.

Property Documentation

internal bool IsAnimatingThumbOffset [get, set, private]

Definition at line 44 of file CompositionScrollController.cs.

bool IsRailEnabled [get, set]

Definition at line 132 of file CompositionScrollController.cs.

internal bool IsThumbPannable [get, set, private]

Definition at line 59 of file CompositionScrollController.cs.

internal bool IsThumbPositionMirrored [get, set, private]

Definition at line 75 of file CompositionScrollController.cs.

UIElement PanningElementAncestor [get, set]

Definition at line 112 of file CompositionScrollController.cs.

internal float PanningElementOffsetMultiplier [get, private]

Definition at line 374 of file CompositionScrollController.cs.

internal Visual PanningVisual [get, private]

Definition at line 103 of file CompositionScrollController.cs.

Orientation PanOrientation [get, set]

Definition at line 148 of file CompositionScrollController.cs.

Event Documentation

TypedEventHandler<IScrollControllerPanningInfo, Object> Changed

Definition at line 40 of file CompositionScrollController.cs.

TypedEventHandler<IScrollControllerPanningInfo, String> LogMessage

Definition at line 39 of file CompositionScrollController.cs.

TypedEventHandler<IScrollControllerPanningInfo, ScrollControllerPanRequestedEventArgs> PanRequested

Definition at line 41 of file CompositionScrollController.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/CompositionScrollController.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpressionAnimationStatusChange Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • ExpressionAnimationStatusChange
Public Member Functions | Properties

ExpressionAnimationStatusChange Class Reference

List of all members.

Public Member Functions

ExpressionAnimationStatusChange (bool isExpressionAnimationStarted, string propertyName)

Properties

bool | IsExpressionAnimationStarted [get, set]
string | PropertyName [get, set]

Detailed Description

Definition at line 18 of file ScrollPresenterTestHooksHelper.cs.

Constructor & Destructor Documentation

ExpressionAnimationStatusChange | ( | bool | isExpressionAnimationStarted,
 |  | string | propertyName |
 | ) |  |  | [inline]

Definition at line 20 of file ScrollPresenterTestHooksHelper.cs.

        {
            IsExpressionAnimationStarted = isExpressionAnimationStarted;
            PropertyName = propertyName;
        }

Property Documentation

bool IsExpressionAnimationStarted [get, set]

Definition at line 26 of file ScrollPresenterTestHooksHelper.cs.

string PropertyName [get, set]

Definition at line 28 of file ScrollPresenterTestHooksHelper.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterTestHooksHelper.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestHooksHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • ScrollPresenterTestHooksHelper
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

ScrollPresenterTestHooksHelper Class Reference

List of all members.

Public Member Functions

ScrollPresenterTestHooksHelper (bool enableAnchorNotifications=true, bool enableInteractionSourcesNotifications=true, bool enableExpressionAnimationStatusNotifications=true, bool?isAnimationsEnabledOverride=null)
void | Dispose ()
List
< ExpressionAnimationStatusChange > 		GetExpressionAnimationStatusChanges (ScrollPresenter scrollPresenter)
CompositionInteractionSourceCollection | GetInteractionSources (ScrollPresenter scrollPresenter)
void | ResetExpressionAnimationStatusChanges (ScrollPresenter scrollPresenter)
void | ResetIsAnimationsEnabledOverride ()
void | SetIsAnimationsEnabledOverride (bool isAnimationsEnabledOverride)
void | TurnOffAnchorNotifications ()
void | TurnOffExpressionAnimationStatusNotifications ()
void | TurnOffInteractionSourcesNotifications ()
void | TurnOnAnchorNotifications ()
void | TurnOnExpressionAnimationStatusNotifications ()
void | TurnOnInteractionSourcesNotifications ()

Static Public Member Functions

static void | LogExpressionAnimationStatusChanges (List< ExpressionAnimationStatusChange > expressionAnimationStatusChanges)
static void | LogInteractionSources (CompositionInteractionSourceCollection interactionSources)

Private Member Functions

void | ScrollPresenterTestHooks_AnchorEvaluated (ScrollPresenter sender, ScrollPresenterTestHooksAnchorEvaluatedEventArgs args)
void | ScrollPresenterTestHooks_ExpressionAnimationStatusChanged (ScrollPresenter sender, ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs args)
void | ScrollPresenterTestHooks_InteractionSourcesChanged (ScrollPresenter sender, ScrollPresenterTestHooksInteractionSourcesChangedEventArgs args)

Private Attributes

Dictionary< ScrollPresenter,
List
< ExpressionAnimationStatusChange > > 		m_expressionAnimationStatusChanges = null
Dictionary< ScrollPresenter,
CompositionInteractionSourceCollection > 		m_interactionSources = null

Detailed Description

Definition at line 32 of file ScrollPresenterTestHooksHelper.cs.

Constructor & Destructor Documentation

ScrollPresenterTestHooksHelper | ( | bool | enableAnchorNotifications = true,
 |  | bool | enableInteractionSourcesNotifications = true,
 |  | bool | enableExpressionAnimationStatusNotifications = true,
 |  | bool? | isAnimationsEnabledOverride = null |
 | ) |  |  | [inline]

Definition at line 37 of file ScrollPresenterTestHooksHelper.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                if (enableAnchorNotifications)
                {
                    TurnOnAnchorNotifications();
                }

                if (enableInteractionSourcesNotifications)
                {
                    TurnOnInteractionSourcesNotifications();
                }

                if (enableExpressionAnimationStatusNotifications)
                {
                    TurnOnExpressionAnimationStatusNotifications();
                }

                if (isAnimationsEnabledOverride.HasValue)
                {
                    SetIsAnimationsEnabledOverride(isAnimationsEnabledOverride.Value);
                }

                m_interactionSources = new Dictionary<ScrollPresenter, CompositionInteractionSourceCollection>();
                m_expressionAnimationStatusChanges = new Dictionary<ScrollPresenter, List<ExpressionAnimationStatusChange>>();
            });
        }

Member Function Documentation

void Dispose ( ) [inline]

Definition at line 148 of file ScrollPresenterTestHooksHelper.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                TurnOffAnchorNotifications();
                TurnOffInteractionSourcesNotifications();
                TurnOffExpressionAnimationStatusNotifications();
                ResetIsAnimationsEnabledOverride();

                m_interactionSources.Clear();
                m_expressionAnimationStatusChanges.Clear();
            });
        }

List<ExpressionAnimationStatusChange> GetExpressionAnimationStatusChanges ( ScrollPresenter scrollPresenter ) [inline]

Definition at line 174 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (m_expressionAnimationStatusChanges.ContainsKey(scrollPresenter))
            {
                return m_expressionAnimationStatusChanges[scrollPresenter];
            }
            else
            {
                return null;
            }
        }

CompositionInteractionSourceCollection GetInteractionSources ( ScrollPresenter scrollPresenter ) [inline]

Definition at line 162 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (m_interactionSources.ContainsKey(scrollPresenter))
            {
                return m_interactionSources[scrollPresenter];
            }
            else
            {
                return null;
            }
        }

static void LogExpressionAnimationStatusChanges ( List< ExpressionAnimationStatusChange > expressionAnimationStatusChanges ) [inline, static]

Definition at line 225 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (expressionAnimationStatusChanges == null)
            {
                Log.Comment("expressionAnimationStatusChanges is null");
                return;
            }

            Log.Comment("expressionAnimationStatusChanges:");
            foreach (ExpressionAnimationStatusChange expressionAnimationStatusChange in expressionAnimationStatusChanges)
            {
                Log.Comment($"  IsExpressionAnimationStarted: {expressionAnimationStatusChange.IsExpressionAnimationStarted}, PropertyName: {expressionAnimationStatusChange.PropertyName}");
            }
        }

static void LogInteractionSources ( CompositionInteractionSourceCollection interactionSources ) [inline, static]

Definition at line 194 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (interactionSources == null)
            {
                Log.Warning("LogInteractionSources: parameter interactionSources is null");
                throw new ArgumentNullException("interactionSources");
            }

            Log.Comment("    Interaction sources count: " + interactionSources.Count);

            foreach (ICompositionInteractionSource interactionSource in interactionSources)
            {
                VisualInteractionSource visualInteractionSource = interactionSource as VisualInteractionSource;
                if (visualInteractionSource != null)
                {
                    Log.Comment("    VisualInteractionSource: ManipulationRedirectionMode: " + visualInteractionSource.ManipulationRedirectionMode);
                    Log.Comment("    VisualInteractionSource: IsPositionXRailsEnabled: " + visualInteractionSource.IsPositionXRailsEnabled +
                        ", IsPositionYRailsEnabled:" + visualInteractionSource.IsPositionYRailsEnabled);
                    Log.Comment("    VisualInteractionSource: PositionXChainingMode: " + visualInteractionSource.PositionXChainingMode +
                        ", PositionYChainingMode:" + visualInteractionSource.PositionYChainingMode +
                        ", ScaleChainingMode:" + visualInteractionSource.ScaleChainingMode);
                    Log.Comment("    VisualInteractionSource: PositionXSourceMode: " + visualInteractionSource.PositionXSourceMode +
                        ", PositionYSourceMode:" + visualInteractionSource.PositionYSourceMode +
                        ", ScaleSourceMode:" + visualInteractionSource.ScaleSourceMode);
                    Log.Comment("    VisualInteractionSource: PointerWheelConfig: (" + visualInteractionSource.PointerWheelConfig.PositionXSourceMode +
                        ", " + visualInteractionSource.PointerWheelConfig.PositionYSourceMode +
                        ", " + visualInteractionSource.PointerWheelConfig.ScaleSourceMode + ")");
                }
            }
        }

void ResetExpressionAnimationStatusChanges ( ScrollPresenter scrollPresenter ) [inline]

Definition at line 186 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (m_expressionAnimationStatusChanges.ContainsKey(scrollPresenter))
            {
                m_expressionAnimationStatusChanges.Remove(scrollPresenter);
            }
        }

void ResetIsAnimationsEnabledOverride ( ) [inline]

Definition at line 139 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (ScrollPresenterTestHooks.IsAnimationsEnabledOverride.HasValue)
            {
                Log.Comment($"ScrollPresenterTestHooksHelper: Resetting IsAnimationsEnabledOverride from {ScrollPresenterTestHooks.IsAnimationsEnabledOverride.Value}.");
                ScrollPresenterTestHooks.IsAnimationsEnabledOverride = null;
            }
        }

void ScrollPresenterTestHooks_AnchorEvaluated | ( | ScrollPresenter | sender,
 |  | ScrollPresenterTestHooksAnchorEvaluatedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 240 of file ScrollPresenterTestHooksHelper.cs.

        {
            string anchorName = (args.AnchorElement is FrameworkElement) ? (args.AnchorElement as FrameworkElement).Name : string.Empty;

            Log.Comment("  AnchorEvaluated: s:" + sender.Name + ", a:" + anchorName + ", ap:(" + args.ViewportAnchorPointHorizontalOffset + "," + args.ViewportAnchorPointVerticalOffset + ")");
        }

void ScrollPresenterTestHooks_ExpressionAnimationStatusChanged | ( | ScrollPresenter | sender,
 |  | ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 261 of file ScrollPresenterTestHooksHelper.cs.

        {
            Log.Comment($"  ExpressionAnimationStatusChanged: s: {sender.Name}, IsExpressionAnimationStarted: {args.IsExpressionAnimationStarted}, PropertyName: {args.PropertyName}");
            List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = null;

            if (!m_expressionAnimationStatusChanges.ContainsKey(sender))
            {
                expressionAnimationStatusChanges = new List<ExpressionAnimationStatusChange>();
                m_expressionAnimationStatusChanges.Add(sender, expressionAnimationStatusChanges);
            }
            else
            {
                expressionAnimationStatusChanges = m_expressionAnimationStatusChanges[sender];
            }

            expressionAnimationStatusChanges.Add(new ExpressionAnimationStatusChange(args.IsExpressionAnimationStarted, args.PropertyName));
        }

void ScrollPresenterTestHooks_InteractionSourcesChanged | ( | ScrollPresenter | sender,
 |  | ScrollPresenterTestHooksInteractionSourcesChangedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 247 of file ScrollPresenterTestHooksHelper.cs.

        {
            Log.Comment("  InteractionSourcesChanged: s: " + sender.Name);
            if (!m_interactionSources.ContainsKey(sender))
            {
                m_interactionSources.Add(sender, args.InteractionSources);
            }
            else
            {
                m_interactionSources[sender] = args.InteractionSources;
            }
            LogInteractionSources(args.InteractionSources);
        }

void SetIsAnimationsEnabledOverride ( bool isAnimationsEnabledOverride ) [inline]

Definition at line 130 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (!ScrollPresenterTestHooks.IsAnimationsEnabledOverride.HasValue || ScrollPresenterTestHooks.IsAnimationsEnabledOverride.Value != isAnimationsEnabledOverride)
            {
                Log.Comment($"ScrollPresenterTestHooksHelper: Setting IsAnimationsEnabledOverride to {isAnimationsEnabledOverride}.");
                ScrollPresenterTestHooks.IsAnimationsEnabledOverride = isAnimationsEnabledOverride;
            }
        }

void TurnOffAnchorNotifications ( ) [inline]

Definition at line 80 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
            {
                Log.Comment("ScrollPresenterTestHooksHelper: Turning off anchor notifications.");
                ScrollPresenterTestHooks.AreAnchorNotificationsRaised = false;
                ScrollPresenterTestHooks.AnchorEvaluated -= ScrollPresenterTestHooks_AnchorEvaluated;
            }
        }

void TurnOffExpressionAnimationStatusNotifications ( ) [inline]

Definition at line 120 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised)
            {
                Log.Comment("ScrollPresenterTestHooksHelper: Turning off ExpressionAnimation status notifications.");
                ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised = false;
                ScrollPresenterTestHooks.ExpressionAnimationStatusChanged -= ScrollPresenterTestHooks_ExpressionAnimationStatusChanged;
            }
        }

void TurnOffInteractionSourcesNotifications ( ) [inline]

Definition at line 100 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised)
            {
                Log.Comment("ScrollPresenterTestHooksHelper: Turning off InteractionSources notifications.");
                ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised = false;
                ScrollPresenterTestHooks.InteractionSourcesChanged -= ScrollPresenterTestHooks_InteractionSourcesChanged;
            }
        }

void TurnOnAnchorNotifications ( ) [inline]

Definition at line 70 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (!ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
            {
                Log.Comment("ScrollPresenterTestHooksHelper: Turning on anchor notifications.");
                ScrollPresenterTestHooks.AreAnchorNotificationsRaised = true;
                ScrollPresenterTestHooks.AnchorEvaluated += ScrollPresenterTestHooks_AnchorEvaluated;
            }
        }

void TurnOnExpressionAnimationStatusNotifications ( ) [inline]

Definition at line 110 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (!ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised)
            {
                Log.Comment("ScrollPresenterTestHooksHelper: Turning on ExpressionAnimation status notifications.");
                ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised = true;
                ScrollPresenterTestHooks.ExpressionAnimationStatusChanged += ScrollPresenterTestHooks_ExpressionAnimationStatusChanged;
            }
        }

void TurnOnInteractionSourcesNotifications ( ) [inline]

Definition at line 90 of file ScrollPresenterTestHooksHelper.cs.

        {
            if (!ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised)
            {
                Log.Comment("ScrollPresenterTestHooksHelper: Turning on InteractionSources notifications.");
                ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised = true;
                ScrollPresenterTestHooks.InteractionSourcesChanged += ScrollPresenterTestHooks_InteractionSourcesChanged;
            }
        }

Member Data Documentation

Dictionary<ScrollPresenter, List<ExpressionAnimationStatusChange> > m_expressionAnimationStatusChanges = null [private]

Definition at line 35 of file ScrollPresenterTestHooksHelper.cs.

Dictionary<ScrollPresenter, CompositionInteractionSourceCollection> m_interactionSources = null [private]

Definition at line 34 of file ScrollPresenterTestHooksHelper.cs.

The documentation for this class was generated from the following file:
  • ScrollPresenter/TestUI/ScrollPresenterTestHooksHelper.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewTestHooksHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utilities
  • ScrollViewTestHooksHelper
Public Member Functions | Properties

ScrollViewTestHooksHelper Class Reference

List of all members.

Public Member Functions

ScrollViewTestHooksHelper (ScrollView scrollView, bool?autoHideScrollControllers=null)
void | Dispose ()

Properties

bool | AutoHideScrollControllers [get, set]
ScrollView | ScrollView [get, set]

Detailed Description

Definition at line 14 of file ScrollViewTestHooksHelper.cs.

Constructor & Destructor Documentation

ScrollViewTestHooksHelper | ( | ScrollView | scrollView,
 |  | bool? | autoHideScrollControllers = null |
 | ) |  |  | [inline]

Definition at line 16 of file ScrollViewTestHooksHelper.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                if (scrollView != null)
                {
                    ScrollView = scrollView;

                    ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, autoHideScrollControllers);
                }
            });
        }

Member Function Documentation

void Dispose ( ) [inline]

Definition at line 55 of file ScrollViewTestHooksHelper.cs.

        {
            RunOnUIThread.Execute(() =>
            {
                Log.Comment("PrivateLoggingHelper disposal: Resetting AutoHideScrollControllers.");
                AutoHideScrollControllers = null;
            });
        }

Property Documentation

bool AutoHideScrollControllers [get, set]

Definition at line 36 of file ScrollViewTestHooksHelper.cs.

ScrollView ScrollView [get, set]

Definition at line 30 of file ScrollViewTestHooksHelper.cs.

The documentation for this class was generated from the following file:
  • ScrollView/TestUI/ScrollViewTestHooksHelper.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DefaultItemCollectionTransitionProvider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utils
  • DefaultItemCollectionTransitionProvider
Protected Member Functions | Properties | Static Private Member Functions | Private Attributes

DefaultItemCollectionTransitionProvider Class Reference

Inherits ItemCollectionTransitionProvider.

List of all members.

Protected Member Functions

override bool | ShouldAnimateCore (ItemCollectionTransition transition)
override void | StartTransitions (IList< ItemCollectionTransition > transitions)

Properties

static double | AnimationSlowdownFactor [get, set]

Static Private Member Functions

static | DefaultItemCollectionTransitionProvider ()
static void | AnimateOffset (Visual visual, Compositor compositor, Rect oldBounds, Rect newBounds, bool hasRemoveAnimations)
static void | StartAddTransitions (IList< ItemCollectionTransition > transitions, bool hasRemoveTransitions, bool hasMoveTransitions)
static void | StartMoveTransitions (IList< ItemCollectionTransition > transitions, bool hasRemoveAnimations)
static void | StartRemoveTransitions (IList< ItemCollectionTransition > transitions)

Private Attributes

const double | DefaultAnimationDurationInMs = 300.0

Detailed Description

Definition at line 18 of file DefaultElementAnimator.cs.

Constructor & Destructor Documentation

static DefaultItemCollectionTransitionProvider ( ) [inline, static, private]

Definition at line 23 of file DefaultElementAnimator.cs.

        {
            AnimationSlowdownFactor = 1.0;
        }

Member Function Documentation

static void AnimateOffset | ( | Visual | visual,
 |  | Compositor | compositor,
 |  | Rect | oldBounds,
 |  | Rect | newBounds,
 |  | bool | hasRemoveAnimations |
 | ) |  |  | [inline, static, private]

Definition at line 119 of file DefaultElementAnimator.cs.

        {
            var offsetAnimation = compositor.CreateVector2KeyFrameAnimation();

            offsetAnimation.SetVector2Parameter("delta", new Vector2(
                (float)(oldBounds.X - newBounds.X),
                (float)(oldBounds.Y - newBounds.Y)));
            offsetAnimation.SetVector2Parameter("final", new Vector2());
            offsetAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue + delta");
            if (hasRemoveAnimations)
            {
                offsetAnimation.InsertExpressionKeyFrame(0.5f, "delta");
            }
            offsetAnimation.InsertExpressionKeyFrame(1.0f, "final");
            offsetAnimation.Duration = TimeSpan.FromMilliseconds(
                DefaultAnimationDurationInMs * ((hasRemoveAnimations ? 1 : 0) + 1) * AnimationSlowdownFactor);

            visual.StartAnimation("TransformMatrix._41_42", offsetAnimation);
        }

override bool ShouldAnimateCore ( ItemCollectionTransition transition ) [inline, protected]

Definition at line 28 of file DefaultElementAnimator.cs.

        {
            return true;
        }

static void StartAddTransitions | ( | IList< ItemCollectionTransition > | transitions,
 |  | bool | hasRemoveTransitions,
 |  | bool | hasMoveTransitions |
 | ) |  |  | [inline, static, private]

Definition at line 44 of file DefaultElementAnimator.cs.

        {
            foreach (var transition in transitions)
            {
                var progress = transition.Start();
                var visual = ElementCompositionPreview.GetElementVisual(progress.Element);
                var compositor = visual.Compositor;

                var fadeInAnimation = compositor.CreateScalarKeyFrameAnimation();
                fadeInAnimation.InsertKeyFrame(0.0f, 0.0f);

                if (hasMoveTransitions && hasRemoveTransitions)
                {
                    fadeInAnimation.InsertKeyFrame(0.66f, 0.0f);
                }
                else if (hasMoveTransitions || hasRemoveTransitions)
                {
                    fadeInAnimation.InsertKeyFrame(0.5f, 0.0f);
                }

                fadeInAnimation.InsertKeyFrame(1.0f, 1.0f);
                fadeInAnimation.Duration = TimeSpan.FromMilliseconds(
                    DefaultAnimationDurationInMs * ((hasRemoveTransitions ? 1 : 0) + (hasMoveTransitions ? 1 : 0) + 1) * AnimationSlowdownFactor);

                var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
                visual.StartAnimation("Opacity", fadeInAnimation);
                batch.End();
                batch.Completed += delegate { progress.Complete(); };
            }
        }

static void StartMoveTransitions | ( | IList< ItemCollectionTransition > | transitions,
 |  | bool | hasRemoveAnimations |
 | ) |  |  | [inline, static, private]

Definition at line 98 of file DefaultElementAnimator.cs.

        {
            foreach (var transition in transitions)
            {
                var progress = transition.Start();
                var visual = ElementCompositionPreview.GetElementVisual(progress.Element);
                var compositor = visual.Compositor;
                var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);

                // Animate offset.
                if (transition.OldBounds.X != transition.NewBounds.X ||
                    transition.OldBounds.Y != transition.NewBounds.Y)
                {
                    AnimateOffset(visual, compositor, transition.OldBounds, transition.NewBounds, hasRemoveAnimations);
                }

                batch.End();
                batch.Completed += delegate { progress.Complete(); };
            }
        }

static void StartRemoveTransitions ( IList< ItemCollectionTransition > transitions ) [inline, static, private]

Definition at line 75 of file DefaultElementAnimator.cs.

        {
            foreach (var transition in transitions)
            {
                var progress = transition.Start();
                var visual = ElementCompositionPreview.GetElementVisual(progress.Element);
                var compositor = visual.Compositor;

                var fadeOutAnimation = compositor.CreateScalarKeyFrameAnimation();
                fadeOutAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue");
                fadeOutAnimation.InsertKeyFrame(1.0f, 0.0f);
                fadeOutAnimation.Duration = TimeSpan.FromMilliseconds(DefaultAnimationDurationInMs * AnimationSlowdownFactor);

                var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
                visual.StartAnimation("Opacity", fadeOutAnimation);
                batch.End();
                batch.Completed += delegate {
                    visual.Opacity = 1.0f;
                    progress.Complete();
                };
            }
        }

override void StartTransitions ( IList< ItemCollectionTransition > transitions ) [inline, protected]

Definition at line 33 of file DefaultElementAnimator.cs.

        {
            var addTransitions = transitions.Where(transition => transition.Operation == ItemCollectionTransitionOperation.Add).ToList();
            var removeTransitions = transitions.Where(transition => transition.Operation == ItemCollectionTransitionOperation.Remove).ToList();
            var moveTransitions = transitions.Where(transition => transition.Operation == ItemCollectionTransitionOperation.Move).ToList();

            StartAddTransitions(addTransitions, removeTransitions.Count > 0, moveTransitions.Count > 0);
            StartRemoveTransitions(removeTransitions);
            StartMoveTransitions(moveTransitions, removeTransitions.Count > 0);
        }

Member Data Documentation

const double DefaultAnimationDurationInMs = 300.0 [private]

Definition at line 20 of file DefaultElementAnimator.cs.

Property Documentation

double AnimationSlowdownFactor [static, get, set]

Definition at line 21 of file DefaultElementAnimator.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/AnimationSamples/DefaultElementAnimator.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResetableCollection-g< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • Utils
  • ResetableCollection-g< T >
Public Member Functions | Private Attributes

ResetableCollection-g< T > Class Template Reference

List of all members.

Public Member Functions

ResetableCollection (IEnumerable< T > collection)
void | ShuffleAndReset ()

Private Attributes

Random | _rnd = new Random(123)

Detailed Description

template<T>
class MUXControlsTestApp::Utils::ResetableCollection-g< T >

Definition at line 12 of file ResetableCollection.cs.

Member Function Documentation

ResetableCollection ( IEnumerable< T > collection ) [inline]

Definition at line 16 of file ResetableCollection.cs.

            : base(collection)
        { }

void ShuffleAndReset ( ) [inline]

Definition at line 20 of file ResetableCollection.cs.

        {
            for (int i = 0; i < 5; i++)
            {
                int from = _rnd.Next(0, Items.Count - 1);
                var value = Items[from];
                Items.RemoveAt(from);
                int to = _rnd.Next(0, Items.Count - 1);
                Items.Insert(to, value);
            }

            OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
        }

Member Data Documentation

Random _rnd = new Random(123) [private]

Definition at line 14 of file ResetableCollection.cs.

The documentation for this class was generated from the following file:
  • Repeater/TestUI/Samples/ItemsSourceSamples/ResetableCollection.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingDataSource Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • VirtualizingDataSource
Static Public Member Functions

VirtualizingDataSource Class Reference

List of all members.

Static Public Member Functions

static void | EmptyTreeNode (TreeViewNode node)
static void | FillTreeNode (TreeViewNode node)

Detailed Description

Definition at line 44 of file VirtualizingDataSource.cs.

Member Function Documentation

static void EmptyTreeNode ( TreeViewNode node ) [inline, static]

Definition at line 62 of file VirtualizingDataSource.cs.

        {
            node.Children.Clear();
            node.HasUnrealizedChildren = true;
        }

static void FillTreeNode ( TreeViewNode node ) [inline, static]

Definition at line 46 of file VirtualizingDataSource.cs.

        {
            var customContent = (CustomContent)node.Content;
            if(customContent != null)
            {
                if(node.HasUnrealizedChildren)
                {
                    foreach(var child in customContent.Children)
                    {
                        node.Children.Add(child.GetTreeViewNode());
                    }
                }
                node.HasUnrealizedChildren = false;
            }
        }

The documentation for this class was generated from the following file:
  • TreeView/TestUI/VirtualizingDataSource.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingStackPanelPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • VirtualizingStackPanelPage
Public Member Functions | Private Member Functions | Private Attributes

VirtualizingStackPanelPage Class Reference

List of all members.

Public Member Functions

VirtualizingStackPanelPage ()

Private Member Functions

void | PopulateData ()

Private Attributes

ObservableCollection< Ingredient > | Ingredients = new ObservableCollection<Ingredient>()

Detailed Description

Definition at line 9 of file VirtualizingStackPanelPage.xaml.cs.

Constructor & Destructor Documentation

VirtualizingStackPanelPage ( ) [inline]

Definition at line 13 of file VirtualizingStackPanelPage.xaml.cs.

        {
            this.InitializeComponent();
            PopulateData();
        }

Member Function Documentation

void PopulateData ( ) [inline, private]

Definition at line 19 of file VirtualizingStackPanelPage.xaml.cs.

        {
            this.Ingredients.Add(new Ingredient("Banana", "10 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "27 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "12 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "54 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "2 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "5 lbs", "Assets/ingredient4.png"));
            this.Ingredients.Add(new Ingredient("Banana", "9 lbs", "Assets/ingredient1.png"));
            this.Ingredients.Add(new Ingredient("Strawberry", "21 lbs", "Assets/ingredient2.png"));
            this.Ingredients.Add(new Ingredient("Lemon", "10 lbs", "Assets/ingredient5.png"));
            this.Ingredients.Add(new Ingredient("Orange", "57 lbs", "Assets/ingredient3.png"));
            this.Ingredients.Add(new Ingredient("Vanilla", "1 lbs", "Assets/ingredient8.png"));
            this.Ingredients.Add(new Ingredient("Mint", "4 lbs", "Assets/ingredient4.png"));

            this.IngredientList.ItemsSource = this.Ingredients;
        }

Member Data Documentation

ObservableCollection<Ingredient> Ingredients = new ObservableCollection<Ingredient>() [private]

Definition at line 11 of file VirtualizingStackPanelPage.xaml.cs.

The documentation for this class was generated from the following file:
  • ParallaxView/TestUI/VirtualizingStackPanelPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VisualPropertiesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • VisualPropertiesPage
Public Member Functions | Private Member Functions | Private Attributes

VisualPropertiesPage Class Reference

List of all members.

Public Member Functions

VisualPropertiesPage ()

Private Member Functions

void | BackgroundPropertyComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | ForegroundPropertyComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | InitializeSampleTreeView ()
void | SetControlStackPanelBackground (SolidColorBrush color)
void | SetControlStackPanelForeground (SolidColorBrush color)
async void | ShowDialog_Click (object sender, RoutedEventArgs e)
void | VisualPropertiesPage_Loaded (object sender, RoutedEventArgs e)

Private Attributes

TreeViewNode treeViewFolder

Detailed Description

Definition at line 24 of file VisualPropertiesPage.xaml.cs.

Constructor & Destructor Documentation

VisualPropertiesPage ( ) [inline]

Definition at line 28 of file VisualPropertiesPage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += VisualPropertiesPage_Loaded;

            DefaultBreadCrumbBar.ItemsSource = new ObservableCollection<BreadcrumbBarFolder>{
                new BreadcrumbBarFolder { Name = "Home"},
                new BreadcrumbBarFolder { Name = "Folder1" },
                new BreadcrumbBarFolder { Name = "Folder2" },
                new BreadcrumbBarFolder { Name = "Folder3" },
            };

            InitializeSampleTreeView();
        }

Member Function Documentation

void BackgroundPropertyComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 82 of file VisualPropertiesPage.xaml.cs.

        {
            string colorName = e.AddedItems[0].ToString();
            SolidColorBrush color;

            switch (colorName)
            {
                case "Green":
                    color = new SolidColorBrush(Colors.Green);
                    break;
                case "Purple":
                    color = new SolidColorBrush(Colors.Purple);
                    break;
                default:
                    throw new Exception($"Invalid argument: {colorName}");
            }

            SetControlStackPanelBackground(color);
        }

void ForegroundPropertyComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file VisualPropertiesPage.xaml.cs.

        {
            string colorName = e.AddedItems[0].ToString();
            SolidColorBrush color;

            switch (colorName)
            {
                case "Red":
                    color = new SolidColorBrush(Colors.Red);
                    break;
                case "Blue":
                    color = new SolidColorBrush(Colors.Blue);
                    break;
                default:
                    throw new Exception($"Invalid argument: {colorName}");
            }

            SetControlStackPanelForeground(color);
        }

void InitializeSampleTreeView ( ) [inline, private]

Definition at line 114 of file VisualPropertiesPage.xaml.cs.

        {
            treeViewFolder = new TreeViewNode() { Content = "TreeViewFolder" };
            treeViewFolder.IsExpanded = true;
            treeViewFolder.Children.Add(new TreeViewNode() { Content = "TreeViewItem1" });

            DefaultTreeView.RootNodes.Add(treeViewFolder);
        }

void SetControlStackPanelBackground ( SolidColorBrush color ) [inline, private]

Definition at line 102 of file VisualPropertiesPage.xaml.cs.

        {

            foreach (var child in ControlStackPanel.Children)
            {
                if (child is Control)
                {
                    (child as Control).Background = color;
                }
            }
        }

void SetControlStackPanelForeground ( SolidColorBrush color ) [inline, private]

Definition at line 70 of file VisualPropertiesPage.xaml.cs.

        {

            foreach (var child in ControlStackPanel.Children)
            {
                if (child is Control)
                {
                    (child as Control).Foreground = color;
                }
            }
        }

async void ShowDialog_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 123 of file VisualPropertiesPage.xaml.cs.

        {
            await DefaultContentDialog.ShowAsync();
        }

void VisualPropertiesPage_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 44 of file VisualPropertiesPage.xaml.cs.

        {
            ForegroundPropertyComboBox.SelectedIndex = 0;
            BackgroundPropertyComboBox.SelectedIndex = 0;
        }

Member Data Documentation

TreeViewNode treeViewFolder [private]

Definition at line 26 of file VisualPropertiesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/VisualPropertiesPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VisualStatesPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • VisualStatesPage
Public Member Functions | Private Attributes

VisualStatesPage Class Reference

List of all members.

Public Member Functions

VisualStatesPage ()

Private Attributes

List< ControlStateViewer > viewers

Detailed Description

Definition at line 13 of file VisualStatesPage.xaml.cs.

Constructor & Destructor Documentation

VisualStatesPage ( ) [inline]

Definition at line 55 of file VisualStatesPage.xaml.cs.

        {
            this.InitializeComponent();

            foreach (var viewer in viewers)
            {
                ControlPanel.Children.Add(viewer);
            }
        }

Member Data Documentation

List<ControlStateViewer> viewers [private]

Definition at line 15 of file VisualStatesPage.xaml.cs.

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/VisualStatesPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2BasicPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • WebView2BasicPage
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

WebView2BasicPage Class Reference

List of all members.

Public Member Functions

WebView2BasicPage ()
async void | CleanupCurrentTest (object sender, RoutedEventArgs args)
void | ClearStatus ()
async void | CompleteCurrentTest (object sender, RoutedEventArgs args)
string | GetDocumentTitle (WebView2 wv2)
void | OnAddWebviewButtonClicked (object sender, RoutedEventArgs args)
async void | OnEnsureCWV2ButtonClicked (object sender, RoutedEventArgs args)
void | OnGetDocumentTitleButtonClicked (object sender, RoutedEventArgs args)
void | OnGoBackButtonClicked (object sender, RoutedEventArgs args)
void | OnGoForwardButtonClicked (object sender, RoutedEventArgs args)
void | OnNavigateToStringButtonClicked (object sender, RoutedEventArgs args)
void | OnResizeWebViewVisualButtonClicked (object sender, RoutedEventArgs args)
void | OnSetSourceButtonClicked (object sender, RoutedEventArgs args)
void | OnToggleWebViewVisibilityButtonClicked (object sender, RoutedEventArgs args)
void | OnVideoButtonClicked (object sender, RoutedEventArgs args)
void | ResetTransformWebView (object sender, RoutedEventArgs args)
void | ResetWebViewVisibility (object sender, RoutedEventArgs args)
void | ResetWebViewVisual (object sender, RoutedEventArgs args)
void | TransformWebView (object sender, RoutedEventArgs args)
void | VerifyWebMessageBasedTest (string stringResult, string jsonResult)

Static Public Member Functions

static void | NavigateToVideo (WebView2 webview)

Protected Member Functions

override void | OnNavigatingFrom (NavigatingCancelEventArgs e)

Private Types

enum TestList {
BasicRenderingTest, MouseLeftClickTest, MouseMiddleClickTest, MouseRightClickTest,
MouseXButton1ClickTest, MouseXButton2ClickTest, MouseWheelScrollTest, NavigationErrorTest,
Focus_BasicTabTest, Focus_ReverseTabTest, Focus_BackAndForthTabTest, Focus_MouseActivateTest,
ExecuteScriptTest, MultipleWebviews_BasicRenderingTest, MultipleWebviews_FocusTest, MultipleWebviews_LanguageTest,
CopyPasteTest, BasicKeyboardTest, WebMessageReceivedTest, MouseCaptureTest,
ReloadTest, NavigateToStringTest, SourceBindingTest, GoBackAndForwardTest,
NavigationStartingTest, NavigationStartingInvalidTest, ResizeTest, BasicTapTouchTest,
BasicFlingTouchTest, BasicStretchTouchTest, BasicPanTouchTest, BasicLongPressTouchTest,
ScaledTouchTest, MoveTest, ReparentElementTest, SourceBeforeLoadTest,
VisibilityHiddenTest, VisibilityTurnedOnTest, ParentVisibilityHiddenTest, ParentVisibilityTurnedOnTest,
SpecificTouchTest, CursorUpdateTest, CursorClickUpdateTest, WebView2CleanedUpTest,
QueryCoreWebView2BasicTest, CoreWebView2InitializedTest, CoreWebView2Initialized_FailedTest, WindowHiddenTest,
WindowlessPopupTest, PointerReleaseWithoutPressTest, HostNameToFolderMappingTest, NavigateToVideoTest,
NavigateToLocalImageTest, CloseThenDPIChangeTest, AddHostObjectToScriptTest, UserAgentTest,
KeyboardAcceleratorTest, AccessKeyTest, NonAsciiUriTest, OffTreeWebViewInputTest,
HtmlDropdownTest, HiddenThenVisibleTest, ParentHiddenThenVisibleTest, LifetimeTabTest,
DragDropIntoWebView2Test, CustomConfiguration_BasicTest, CustomConfiguration_EnsureAgainAfterDefaultTest, CustomConfiguration_EnsureAgainAfterCustomTest
}

Private Member Functions

void | AddWebViewControl (string webviewName)
void | AddWebViewEventHandlers (WebView2 webview)
void | AppendMessage (string message)
async Task | CleanupWebViewElements ()
void | DraggableText_DragStarting (UIElement sender, DragStartingEventArgs args)
void | HandleWebError (CoreWebView2NavigationCompletedEventArgs args)
bool | IsTransientWebMessage (string webMessageAsString)
void | LogFailure (ResultsLogger logger, string testName, string message)
void | LogFailure_Exception (ResultsLogger logger, string testName, Exception e)
void | LogHeader (string testName, string header)
void | LogSuccess (string testName)
void | MoveWebViewControl (string webviewName, WebView2 webView2)
void | OnCoreProcessFailed (WebView2 sender, CoreWebView2ProcessFailedEventArgs args)
void | OnCoreWebView2Initialized (WebView2 sender, CoreWebView2InitializedEventArgs args)
void | OnNavigationCompleted (WebView2 sender, CoreWebView2NavigationCompletedEventArgs args)
void | OnNavigationStarting (WebView2 sender, CoreWebView2NavigationStartingEventArgs args)
void | OnWebMessageReceived (WebView2 sender, CoreWebView2WebMessageReceivedEventArgs args)
Border | RemoveExistingWebViewControl (WebView2 webview)
void | RemoveWebViewControls (bool keepDefault=false)
void | RemoveWebViewEventHandlers (WebView2 webview)
void | TestNameComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)
void | UpdateSourceOnEnter (object sender, KeyRoutedEventArgs args)

Static Private Member Functions

static bool | AreEqualIgnoringSpace (string string1, string string2)
static bool | IsFocusMessage (string webMessageAsString)
static bool | IsTransientTapTest (TestList selectedTest)
static bool | IsVisiblityTest (TestList selectedTest)
static bool | IsW2CenterPointMessage (string webMessageAsString)

Private Attributes

bool | _areWebviewElementsCleanedUp = false
string | _customUserDataFolder = string.Empty
readonly WebView2Common | _helpers
bool | _isApplicationLanguageOverrideSet = false
bool | _isRedirected = false
bool | _isUserInitiated = false
double | _originalHeight
double | _originalWidth
readonly Dictionary< TestList,
int > 		TestInfoDictionary
readonly string[] | TestPageNames

Detailed Description

Definition at line 133 of file WebView2BasicPage.xaml.cs.

Member Enumeration Documentation

enum TestList [private]
Enumerator:
BasicRenderingTest
MouseLeftClickTest
MouseMiddleClickTest
MouseRightClickTest
MouseXButton1ClickTest
MouseXButton2ClickTest
MouseWheelScrollTest
NavigationErrorTest
Focus_BasicTabTest
Focus_ReverseTabTest
Focus_BackAndForthTabTest
Focus_MouseActivateTest
ExecuteScriptTest
MultipleWebviews_BasicRenderingTest
MultipleWebviews_FocusTest
MultipleWebviews_LanguageTest
CopyPasteTest
BasicKeyboardTest
WebMessageReceivedTest
MouseCaptureTest
ReloadTest
NavigateToStringTest
SourceBindingTest
GoBackAndForwardTest
NavigationStartingTest
NavigationStartingInvalidTest
ResizeTest
BasicTapTouchTest
BasicFlingTouchTest
BasicStretchTouchTest
BasicPanTouchTest
BasicLongPressTouchTest
ScaledTouchTest
MoveTest
ReparentElementTest
SourceBeforeLoadTest
VisibilityHiddenTest
VisibilityTurnedOnTest
ParentVisibilityHiddenTest
ParentVisibilityTurnedOnTest
SpecificTouchTest
CursorUpdateTest
CursorClickUpdateTest
WebView2CleanedUpTest
QueryCoreWebView2BasicTest
CoreWebView2InitializedTest
CoreWebView2Initialized_FailedTest
WindowHiddenTest
WindowlessPopupTest
PointerReleaseWithoutPressTest
HostNameToFolderMappingTest
NavigateToVideoTest
NavigateToLocalImageTest
CloseThenDPIChangeTest
AddHostObjectToScriptTest
UserAgentTest
KeyboardAcceleratorTest
AccessKeyTest
NonAsciiUriTest
OffTreeWebViewInputTest
HtmlDropdownTest
HiddenThenVisibleTest
ParentHiddenThenVisibleTest
LifetimeTabTest
DragDropIntoWebView2Test
CustomConfiguration_BasicTest
CustomConfiguration_EnsureAgainAfterDefaultTest
CustomConfiguration_EnsureAgainAfterCustomTest

Definition at line 135 of file WebView2BasicPage.xaml.cs.

        {
            BasicRenderingTest,
            MouseLeftClickTest,
            MouseMiddleClickTest,
            MouseRightClickTest,
            MouseXButton1ClickTest,
            MouseXButton2ClickTest,
            MouseWheelScrollTest,
            NavigationErrorTest,
            Focus_BasicTabTest,
            Focus_ReverseTabTest,
            Focus_BackAndForthTabTest,
            Focus_MouseActivateTest,
            ExecuteScriptTest,
            MultipleWebviews_BasicRenderingTest,
            MultipleWebviews_FocusTest,
            MultipleWebviews_LanguageTest,
            CopyPasteTest,
            BasicKeyboardTest,
            WebMessageReceivedTest,
            MouseCaptureTest,
            ReloadTest,
            NavigateToStringTest,
            SourceBindingTest,
            GoBackAndForwardTest,
            NavigationStartingTest,
            NavigationStartingInvalidTest,
            ResizeTest,
            BasicTapTouchTest,
            BasicFlingTouchTest,
            BasicStretchTouchTest,
            BasicPanTouchTest,
            BasicLongPressTouchTest,
            ScaledTouchTest,
            MoveTest,
            ReparentElementTest,
            SourceBeforeLoadTest,
            VisibilityHiddenTest,
            VisibilityTurnedOnTest,
            ParentVisibilityHiddenTest,
            ParentVisibilityTurnedOnTest,
            SpecificTouchTest,
            CursorUpdateTest,
            CursorClickUpdateTest,
            WebView2CleanedUpTest,
            QueryCoreWebView2BasicTest,
            CoreWebView2InitializedTest,
            CoreWebView2Initialized_FailedTest,
            WindowHiddenTest,
            WindowlessPopupTest,
            PointerReleaseWithoutPressTest,
            HostNameToFolderMappingTest,
            NavigateToVideoTest,
            NavigateToLocalImageTest,
            CloseThenDPIChangeTest,
            AddHostObjectToScriptTest,
            UserAgentTest,
            KeyboardAcceleratorTest,
            AccessKeyTest,
            NonAsciiUriTest,
            OffTreeWebViewInputTest,
            HtmlDropdownTest,
            HiddenThenVisibleTest,
            ParentHiddenThenVisibleTest,
            LifetimeTabTest,
            DragDropIntoWebView2Test,
            CustomConfiguration_BasicTest,
            CustomConfiguration_EnsureAgainAfterDefaultTest,
            CustomConfiguration_EnsureAgainAfterCustomTest
        };

Constructor & Destructor Documentation

WebView2BasicPage ( ) [inline]

Definition at line 303 of file WebView2BasicPage.xaml.cs.

        {
            InitializeComponent();
            _helpers = new WebView2Common(this);
            _helpers.CopyTestPagesLocally();

            // setup first webview and tabstops in the right order
            var tabStop1 = new Button()
            {
                Name = "TabStopButton1",
                Content = "[x1] TabStop1"
            };
            AutomationProperties.SetName(tabStop1, "TabStopButton1");
            tabStop1.GotFocus += (sender, args) =>
            {
                focusLog.Text += "Focus on: [x1]" + "\n";
                focusScrollViewer.ChangeView(null, focusScrollViewer.ScrollableHeight, null);
            };
            var tabStop2 = new Button()
            {
                Name = "TabStopButton2",
                Content = "[x2] TabStop2"
            };
            AutomationProperties.SetName(tabStop2, "TabStopButton2");
            tabStop2.GotFocus += (sender, args) =>
            {
                focusLog.Text += "Focus on: [x2]" + "\n";
                focusScrollViewer.ChangeView(null, focusScrollViewer.ScrollableHeight, null);
            };

            AddWebViewControl("MyWebView2");
            // adding tabstop buttons x1 and x2 before and after default webview and its title, respectively
            var defaultStackPanel = WebView2Collection.Children[0] as StackPanel;
            var titleStackPanel = defaultStackPanel.Children[0] as StackPanel;
            titleStackPanel.Children.Add(tabStop1);
            defaultStackPanel.Children.Add(tabStop2);
        }

Member Function Documentation

void AddWebViewControl ( string webviewName ) [inline, private]

Definition at line 925 of file WebView2BasicPage.xaml.cs.

        {
            if (FindName(webviewName) != null)
            {
                Debug.Fail("Webview already exists by name " + webviewName);
                return;
            }

            var textBlock = new TextBlock()
            {
                Text = webviewName,
                FontWeight = FontWeights.Bold,
                FontSize = 11,
                Margin = new Thickness(0, 2, 0, 2)
            };

            var toggleSwitch = new ToggleSwitch()
            {
                Name = webviewName + "Toggle",
                IsOn = true,
                OffContent = "Not selected",
                OnContent = "Selected",
                IsTabStop = false
            };

            var stackPanelText = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };
            stackPanelText.Children.Add(textBlock);
            stackPanelText.Children.Add(toggleSwitch);

            ApplicationTheme appTheme = Application.Current.RequestedTheme;
            Color backgroundColor = (appTheme == ApplicationTheme.Light) ? Colors.White : Colors.Black;
            var webView2 = new WebView2()
            {
                Name = webviewName,
                Margin = new Thickness(8, 8, 8, 8),
                DefaultBackgroundColor = backgroundColor
            };
            AutomationProperties.SetName(webView2, webviewName);

            var border = new Border()
            {
                Width = 670,
                Height = 370,
                BorderBrush = new SolidColorBrush(Colors.Blue),
                BorderThickness = new Thickness(1),
                Name = webviewName + "Border"
            };
            border.Child = webView2;

            Binding binding = new Binding()
            {
                Mode = BindingMode.TwoWay,
                Source = WebViewBorderWidthSlider,
                Path = new PropertyPath("Value")
            };
            border.SetBinding(Border.WidthProperty, binding);

            var stackPanel = new StackPanel()
            {
                Name = webviewName + "StackPanel"  // makes it easy to get webview name by following this naming convention
            };
            stackPanel.Children.Add(stackPanelText);
            stackPanel.Children.Add(border);
            WebView2Collection.Children.Add(stackPanel);

            AddWebViewEventHandlers(webView2);
        }

void AddWebViewEventHandlers ( WebView2 webview ) [inline, private]

Definition at line 1024 of file WebView2BasicPage.xaml.cs.

        {
            webview.NavigationStarting += OnNavigationStarting;
            webview.NavigationCompleted += OnNavigationCompleted;
            webview.WebMessageReceived += OnWebMessageReceived;
            webview.CoreProcessFailed += OnCoreProcessFailed;
            webview.CoreWebView2Initialized += OnCoreWebView2Initialized;
        }

void AppendMessage ( string message ) [inline, private]

Definition at line 2374 of file WebView2BasicPage.xaml.cs.

        {
            MessageLog.Text = MessageLog.Text + message + Environment.NewLine;
        }

static bool AreEqualIgnoringSpace | ( | string | string1,
 |  | string | string2 |
 | ) |  |  | [inline, static, private]

Definition at line 838 of file WebView2BasicPage.xaml.cs.

        {
            string1 = string1.Replace(" ", "%20");
            string2 = string2.Replace(" ", "%20");
            return string1 == string2;
        }

async void CleanupCurrentTest | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 2335 of file WebView2BasicPage.xaml.cs.

        {
            // Ensure any WebViewElements are destroyed + removed from UIA tree prior to signaling test completion
            // to avoid impacting next test.
            await CleanupWebViewElements();

            if (_isApplicationLanguageOverrideSet)
            {
                ApplicationLanguages.PrimaryLanguageOverride = string.Empty;
                _isApplicationLanguageOverrideSet = false;
            }

            if (_customUserDataFolder != string.Empty)
            {
                // Delete the custom UserDataFolder
                System.IO.Directory.Delete(_customUserDataFolder, true);
                _customUserDataFolder = string.Empty;
            }

            CleanupResultTextBox.Text = "Cleanup completed.";
        }

async Task CleanupWebViewElements ( ) [inline, private]

Definition at line 1069 of file WebView2BasicPage.xaml.cs.

        {
            RemoveWebViewControls();
            GC.Collect();
            await Task.Delay(3000);
            _areWebviewElementsCleanedUp = true;
        }

void ClearStatus ( ) [inline]

Definition at line 533 of file WebView2BasicPage.xaml.cs.

        {
            _helpers.ClearStatus();
            var messageReceivedBox = FindName("MessageReceived") as CheckBox;
            messageReceivedBox.IsChecked = false;
            AnaheimFocusTextBox.Text = string.Empty;
        }

async void CompleteCurrentTest | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 1298 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            TestList selectedTest = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
            using (var logger = new ResultsLogger(selectedTest.ToString(), TestResult))
            {

                switch (selectedTest)
                {

                    case TestList.NavigationErrorTest:
                        {
                            var task = MyWebView2.GetNavigationCompletedTask();
                            MyWebView2.Source = new Uri("http://www.test.invalid");
                            await task;

                            var testStatus = Status2.Text;
                            bool result = testStatus.Equals("HostNameNotResolved");
                            logger.Verify(result,
                                          string.Format("Test {0}: Expected web error status {1} did not match with received error status {2}",
                                                        selectedTest, "HostNameNotResolved", testStatus));
                        }
                        break;

                    case TestList.ExecuteScriptTest:
                        {
                            string expectedResult = "1000";
                            string result = await MyWebView2.ExecuteScriptAsync("timer();"); // calling timer function which takes >1s to complete
                            logger.Verify(result == expectedResult,
                                          string.Format("Test {0}: Expected result {1} did not match with returned result {2}",
                                                        selectedTest, expectedResult.ToString(), result));
                        }
                        break;

                    case TestList.MultipleWebviews_BasicRenderingTest:
                        {
                            // Clear any other message that may be there
                            Status2.Text = string.Empty;
                            // wait for the other webviews to complete navigation before testing
                            var tasks = new List<Task>();
                            foreach (var unit in WebView2Collection.Children)
                            {
                                var webviewStackPanel = unit as StackPanel;
                                Debug.Assert(webviewStackPanel != null);
                                string stackPanelName = webviewStackPanel.Name;
                                string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
                                var webview = FindName(webviewName) as WebView2;
                                Debug.Assert(webview != null);
                                tasks.Add(webview.GetNavigationCompletedTask());

                                WebView2Common.LoadWebPage(webview, TestPageNames[0]);
                                var parentOfWebview = webview.Parent as Border;
                                parentOfWebview.Height = 100;
                                parentOfWebview.UpdateLayout();
                            }
                            await Task.WhenAll(tasks);
                        }
                        break;

                    case TestList.MultipleWebviews_LanguageTest:
                        {
                            var tasks = new List<Task>();

                            var wv1_name = "MyWebView2";
                            var wv1 = FindName(wv1_name) as WebView2;
                            tasks.Add(wv1.GetNavigationCompletedTask());
                            var wv2_name = "MyWebView2B";
                            var wv2 = FindName(wv2_name) as WebView2;
                            tasks.Add(wv2.GetNavigationCompletedTask());

                            wv1.Reload();
                            wv2.Reload();
                            await Task.WhenAll(tasks);

                            string wv1_expectedLanguage = "\"zh-CN\"";
                            string wv1_language = await wv1.ExecuteScriptAsync("getLanguage();");
                            logger.Verify((wv1_language == wv1_expectedLanguage),
                                          string.Format("Test {0}: {1} Language {2} did not match expected value {3}",
                                                         selectedTest.ToString(), wv1_name, wv1_language, wv1_expectedLanguage));

                            // TODO_WebView2: When we expose API to set custom UserData, update the 2nd WebView to use a different language
                            //                (same UserData implies same browser instance and therefore requires same Language)

                            string wv2_expectedLanguage = "\"zh-CN\"";
                            string wv2_language = await wv2.ExecuteScriptAsync("getLanguage();");
                            logger.Verify((wv2_language == wv2_expectedLanguage),
                                          string.Format("Test {0}: {1} Language {2} did not match expected value {3}",
                                                         selectedTest.ToString(), wv2_name, wv2_language, wv2_expectedLanguage));
                        }
                        break;

                    case TestList.BasicKeyboardTest:
                        {
                            string expectedText = "Hello 123 Worm";
                            string textResult = CopyPasteTextBox2.Text;
                            logger.Verify((textResult == expectedText),
                                          string.Format("Test {0}: Expected text {1} did not match with sampled text {2}.",
                                                        selectedTest.ToString(), expectedText, textResult));
                        }
                        break;

                    case TestList.MouseCaptureTest:
                        {
                            string textResult = CopyPasteTextBox2.Text;
                            string expectedResult = "MouseCaptureResult";
                            logger.Verify((textResult == expectedResult),
                                           string.Format("Test {0}: Expected text {1} did not match with sampled text {2}",
                                                         selectedTest.ToString(), expectedResult, textResult));
                        }
                        break;

                    case TestList.ReloadTest:
                        {
                            Uri prevUri = MyWebView2.Source;
                            await MyWebView2.ExecuteScriptAsync("document.getElementById(\"w1\").value='injectedText';");
                            var task = MyWebView2.GetNavigationCompletedTask();
                            MyWebView2.Reload();
                            await task;
                            string finalTextContent = await MyWebView2.ExecuteScriptAsync("document.getElementById(\"w1\").value;");
                            logger.Verify((finalTextContent == "\"\""),
                                          string.Format("Test {0}: TextBox value was not cleared (\"\"), value: {1}",
                                                        selectedTest.ToString(), finalTextContent));
                            Uri newUri = MyWebView2.Source;
                            logger.Verify((prevUri.ToString() == newUri.ToString()),
                                          string.Format("Test {0}: Previous Uri {1} did not match the post-reload Uri {2}",
                                                        selectedTest.ToString(), prevUri.ToString(), newUri.ToString()));
                        }
                        break;

                    case TestList.NavigateToStringTest:
                        {
                            var task = MyWebView2.GetNavigationCompletedTask();
                            WebView2Common.NavigateToStringMessage(MyWebView2);
                            await task;

                            string expectedText = "\"You've navigated to a string message.\"";
                            string textResult = await MyWebView2.ExecuteScriptAsync("document.body.textContent;");
                            logger.Verify((expectedText == textResult),
                                          string.Format("Test {0}: Expected content: {1} did not match with sampled content: {2}",
                                                         selectedTest.ToString(), expectedText, textResult));
                            string expectedSourceUri = "about:blank";
                            string sourceUri = MyWebView2.Source.ToString();
                            logger.Verify((expectedText == textResult) && (expectedSourceUri == sourceUri),
                                          string.Format("Test {0}: Expected Uri: {1} did not match with sampled Uri: {2}",
                                                        selectedTest.ToString(), expectedSourceUri, sourceUri));
                        }
                        break;

                    case TestList.SourceBindingTest:
                        {
                            string expectedInitialUri = WebView2Common.GetTestPageUri("SimplePage.html").ToString();
                            var ActualUriTextBlock = FindName("ActualUriTextBlock") as TextBlock;
                            string initialActualSourceUri = ActualUriTextBlock.Text;
                            logger.Verify(AreEqualIgnoringSpace(expectedInitialUri, initialActualSourceUri),
                                          string.Format("Test {0}: Expected source bound text, {1}, did not match actual text binding {2}",
                                                       selectedTest.ToString(), expectedInitialUri, initialActualSourceUri));
                            var task = MyWebView2.GetNavigationCompletedTask();
                            _ = MyWebView2.ExecuteScriptAsync("navigateToTextPage();");
                            // Confirm that navigation to SimplePageWithText.html occurred,
                            // meaning SimplePage intermediate was correctly loaded from textbox.
                            string expectedFinalSourceUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
                            await task;
                            string finalActualSourceUri = ActualUriTextBlock.Text;
                            logger.Verify(AreEqualIgnoringSpace(finalActualSourceUri, expectedFinalSourceUri),
                                          string.Format("Test {0}: Expected navigate to bound uri text {1} failed with current uri {2}",
                                                        selectedTest.ToString(), expectedFinalSourceUri, finalActualSourceUri));
                        }
                        break;

                    case TestList.GoBackAndForwardTest:
                        {
                            var goBackButton = FindName("GoBackButton") as Button;
                            var goForwardButton = FindName("GoForwardButton") as Button;
                            bool canGoBackBindingVerify = !goBackButton.IsEnabled; // Verify both buttons are initially disabled
                            bool canGoForwardBindingVerify = !goForwardButton.IsEnabled;
                            ActualUriTextBlock = FindName("ActualUriTextBlock") as TextBlock;

                            // Part 1: [SimplePage.html] calls  navigateToTextPage() -> Navigates to [SimplePageWithText.html].
                            //         Ensure we are at the right URI (via  ActualUriTextBlock)
                            //         Scope task to make sure we unsubscribe from NavigationStarting before starting Part 2.
                            {
                                var task = MyWebView2.GetNavigationCompletedTask();
                                _ = MyWebView2.ExecuteScriptAsync("navigateToTextPage();");
                                await task;
                                var expectedInitialUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
                                var initialActualSourceUri = ActualUriTextBlock.Text;
                                logger.Verify(AreEqualIgnoringSpace(expectedInitialUri, initialActualSourceUri),
                                              string.Format("\nTest {0}: Failed, Expected initial Uri {1} did not match actual Uri {2}",
                                                            selectedTest, expectedInitialUri, initialActualSourceUri));
                            }

                            // Part 2: Use GoBack to navigate back. Ensure we are back at [SimplePage.html].
                            {
                                canGoBackBindingVerify = canGoBackBindingVerify && goBackButton.IsEnabled; // Should both be true now
                                logger.Verify(canGoBackBindingVerify,
                                              string.Format("\nTest {0}: Failed, canGoBackBindingVerify failed {1}",
                                                            selectedTest, canGoBackBindingVerify));
                                var task = MyWebView2.GetNavigationCompletedTask();
                                MyWebView2.GoBack();
                                string expectedSecondSourceUri = WebView2Common.GetTestPageUri("SimplePage.html").ToString();
                                await task;
                                string actualSecondSourceUri = ActualUriTextBlock.Text;
                                logger.Verify(AreEqualIgnoringSpace(expectedSecondSourceUri, actualSecondSourceUri),
                                              string.Format("\nTest {0}: Failed, Expected intermediate Uri {1} did not match actual Uri {2}",
                                                            selectedTest, expectedSecondSourceUri, actualSecondSourceUri));
                            }

                            // Part 3: Use GoForward to navigate forward. Ensure we are back at [SimplePageWithText.html"].
                            {
                                canGoForwardBindingVerify = canGoForwardBindingVerify && goForwardButton.IsEnabled; // Should both be true now
                                logger.Verify(canGoForwardBindingVerify,
                                              string.Format("\nTest {0}: Failed, canGoForwardBindingVerify failed {1}",
                                                            selectedTest, canGoForwardBindingVerify));
                                var task = MyWebView2.GetNavigationCompletedTask();
                                MyWebView2.GoForward();
                                string expectedFinalSourceUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
                                await task;
                                string actualFinalSourceUri = ActualUriTextBlock.Text;
                                logger.Verify(AreEqualIgnoringSpace(expectedFinalSourceUri, actualFinalSourceUri),
                                            string.Format("\nTest {0}: Failed, Expected final Uri {1} did not match actual Uri {2}",
                                                            selectedTest, expectedFinalSourceUri, actualFinalSourceUri));
                            }
                        }
                        break;

                    case TestList.NavigationStartingTest:
                        {
                            // Part 1: [SimplePage.html] calls navigateToTextPage() -> Navigates to [SimplePageWithText.html].
                            //         Ensure we get expected NavigationStarting event/args.
                            var startTask = MyWebView2.GetNavigationStartingTask();
                            _ = MyWebView2.ExecuteScriptAsync("navigateToTextPage();");
                            await startTask;
                            string startingStatus = Status1.Text;
                            string expectedStatus = "MyWebView2 navigation starting...";
                            logger.Verify((startingStatus == expectedStatus),
                                            string.Format("Test {0}: Failed, Expected navigation status: {1} did not match actual navigation status: {2}",
                                                        selectedTest, expectedStatus, startingStatus));
                            string navigationStartingUri = Status3.Text;
                            string expectedUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
                            logger.Verify(AreEqualIgnoringSpace(navigationStartingUri, expectedUri),
                                            string.Format("Test {0}: Failed, Expected NavigationStarting Uri {1} did not match actual NavigationStarting Uri {2}",
                                                        selectedTest, expectedUri, navigationStartingUri));
                            logger.Verify(_isUserInitiated,
                                            string.Format("Test {0}: Failed, NavigationStartingArgs.IsUserInitiated value: {1}, did not match expected value: true",
                                                        selectedTest, _isUserInitiated.ToString()));
                            logger.Verify(!_isRedirected,
                                            string.Format("Test {0}: Failed, NavigationStartingArgs.IsRedirected value: {1}, did not match expected value: false",
                                                        selectedTest, _isRedirected.ToString()));
                        }
                        break;

                    case TestList.NavigationStartingInvalidTest:
                        {
                            // Part 2: [SimplePage.html] navigates to http://www.blockedbynavigationstarting.invalid -> navigation cancelled via OnNavigationStarting.
                            //         Ensure we are still on [SimplePage.html] at end.
                            var startTask2 = MyWebView2.GetNavigationStartingTask();
                            _ = MyWebView2.ExecuteScriptAsync("navigateToInvalidPage();");
                            await startTask2;

                            string navigationStartingUri = Status3.Text;
                            string expectedUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
                            logger.Verify(AreEqualIgnoringSpace(navigationStartingUri, expectedUri),
                                        string.Format("Test {0}: Failed, Expected NavigationStarting Uri {1} did not match actual NavigationStarting Uri {2}",
                                                        selectedTest, expectedUri, navigationStartingUri));
                        }
                        break;

                    case TestList.ResizeTest:
                        {
                            // Clear any previous resize message from when we created the webview
                            Status2.Text = string.Empty;

                            MyWebView2.Width = MyWebView2.ActualWidth / 2;
                            MyWebView2.Height = MyWebView2.ActualHeight / 2;
                            MyWebView2.UpdateLayout();
                        }
                        break;

                    case TestList.MoveTest:
                        {
                            var yPos1 = await MyWebView2.ExecuteScriptAsync("getWindowYPosition();");

                            var tcs = new TaskCompletionSource<bool>();
                            Task renderedTask = tcs.Task;
                            EventHandler<RenderedEventArgs> renderedHandler = null;
                            renderedHandler += (sender, args) =>
                            {
                                CompositionTarget.Rendered -= renderedHandler;
                                tcs.SetResult(true);
                            };
                            CompositionTarget.Rendered += renderedHandler;

                            var panel = FindName("WebView2Collection") as StackPanel;
                            Thickness margin = panel.Margin;
                            margin.Top = margin.Top += 100;
                            panel.Margin = margin;
                            panel.UpdateLayout();

                            await renderedTask;

                            var yPos2 = await MyWebView2.ExecuteScriptAsync("getWindowYPosition();");
                            logger.Verify((yPos1 != yPos2),
                                          string.Format("Test {0} Part 1: Failed, Expected MyWebView2 to move",
                                                        selectedTest));

                            var xPos = await MyWebView2.ExecuteScriptAsync("getWindowXPosition();");
                            // Get the point at the top-left of the TestPage panel, relative to the webview
                            // Expected screenPoint value: (-22, -400)
                            GeneralTransform gt = TransformToVisual(MyWebView2);
                            Point screenPoint = gt.TransformPoint(new Point(0,0));
                            double expectedX = screenPoint.X * -1;
                            // This offset accounts for the elements above the webview on the page--
                            // specifically TestPage panel, which has its top at 60px, and the title bar.
                            // This offset is also valid only when the MUXC test app window is in the top left corner of the main monitor display.
                            // Otherwise, the test will fail.
                            int offset = 60;
                            double expectedY = screenPoint.Y * -1 + offset;

                            logger.Verify((xPos == expectedX.ToString()),
                                          string.Format("Test {0} Part 2: Failed, Expected MyWebView2 xPosition to be {1}, Actual: {2}",
                                                        selectedTest, expectedX.ToString(), xPos.ToString()));
                            logger.Verify((yPos2 == expectedY.ToString()),
                                          string.Format("Test {0} Part 3: Failed, Expected MyWebView2 yPosition to be {1}, Actual: {2}",
                                                        selectedTest, expectedY.ToString(), yPos2.ToString()));

                            var width = await MyWebView2.ExecuteScriptAsync("getWindowWidth();");
                            var height = await MyWebView2.ExecuteScriptAsync("getWindowHeight();");
                            logger.Verify((width == MyWebView2.ActualWidth.ToString()),
                                          string.Format("Test {0} Part 4: Failed, Expected MyWebView2 width to be {1}, Actual: {2}",
                                                        selectedTest, MyWebView2.ActualWidth.ToString(), width.ToString()));
                            logger.Verify((height == MyWebView2.ActualHeight.ToString()),
                                          string.Format("Test {0} Part 5: Failed, Expected MyWebView2 height to be {1}, Actual: {2}",
                                                        selectedTest, MyWebView2.ActualHeight.ToString(), height.ToString()));
                        }
                        break;

                    case TestList.ReparentElementTest:
                        {
                            // Pull the webview out of its border
                            var parentOfWebview = MyWebView2.Parent as Border;
                            parentOfWebview.Child = null;

                            // Make the old location smaller so we can see the webview in its new
                            // position even on a small screen
                            parentOfWebview.Height = 10;

                            // Put the Webview inside a new border in WebView2Collection
                            MoveWebViewControl("MyWebView2", MyWebView2);
                        }
                        break;

                    case TestList.SourceBeforeLoadTest:
                        {
                            // TODO_WebView2: This test should validate rendering
                            logger.Verify((MyWebView2.Source != null),
                                string.Format("Test {0}: Failed, Expected MyWebView2.Source to be {1}",
                                    selectedTest, WebView2Common.GetTestPageUri("SimplePageWithButton.html").ToString()));
                        }
                        break;

                    case TestList.VisibilityHiddenTest:
                        {
                            MyWebView2.Visibility = Visibility.Collapsed;
                        }
                        break;

                    case TestList.VisibilityTurnedOnTest:
                        {
                            // Show the ancestor that was previously hidden
                            MyWebView2.Visibility = Visibility.Visible;
                        }
                        break;

                    case TestList.ParentVisibilityHiddenTest:
                        {
                            // Hide the parent border
                            var testContentsBorder = FindName("TestContentsBorder") as Border;
                            testContentsBorder.Visibility = Visibility.Collapsed;
                        }
                        break;

                    case TestList.ParentVisibilityTurnedOnTest:
                        {
                            // Show the ancestor that was previously hidden
                            var testContentsBorder = FindName("TestContentsBorder") as Border;
                            testContentsBorder.Visibility = Visibility.Visible;
                        }
                        break;

                    case TestList.QueryCoreWebView2BasicTest:
                        {
                            // First load test's default webpage SimplePage.html
                            var navCompletedTask1 = MyWebView2.GetNavigationCompletedTask();
                            WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            await navCompletedTask1;

                            // Validate CoreWebView2.DocumentTitle
                            string expectedTitle1 = "Simple Page";
                            string actualTitle1 = GetDocumentTitle(MyWebView2);
                            logger.Verify((expectedTitle1 == actualTitle1),
                                          string.Format("Part 1: Expected WV2.CWV2.DocumentTitle: {0}, actual: {1}",
                                                         expectedTitle1, actualTitle1));

                            // Load a different page
                            var navCompletedTask2 = MyWebView2.GetNavigationCompletedTask();
                            WebView2Common.LoadWebPage(MyWebView2, TestPageNames[1]);
                            await navCompletedTask2;

                            string expectedTitle2 = "Simple Page With Button";
                            string actualTitle2 = GetDocumentTitle(MyWebView2);
                            logger.Verify((expectedTitle2 == actualTitle2),
                                          string.Format("Part 2: Expected WV2.CWV2.DocumentTitle: {0}, actual: {1}",
                                                         expectedTitle2, actualTitle2));

                            // Close() WebView2 - CWV2 should be shutdown + reference cleared
                            MyWebView2.Close();
                            string expectedTitle3 = string.Empty;
                            string actualTitle3 = GetDocumentTitle(MyWebView2);
                            logger.Verify((expectedTitle3 == actualTitle3),
                                          string.Format("Part 3: Expected WV2.CWV2.DocumentTitle: {0}, actual: {1}",
                                                         expectedTitle3, actualTitle3));
                        }
                        break;

                    case TestList.CursorUpdateTest:
                    case TestList.CursorClickUpdateTest:
                        {
                            WebView2WithCursor webviewWithCursor = MyWebView2 as WebView2WithCursor;
                            Microsoft.UI.Input.InputCursor cursor = webviewWithCursor.WrappedProtectedCursor;
                            logger.Verify(cursor != null, "ProtectedCursor was null");
                            if (cursor == null) break;
                            Microsoft.UI.Input.InputSystemCursor cursorAsInputSystemCursor = cursor.As<Microsoft.UI.Input.InputSystemCursor>();
                            var actualCursorType = cursorAsInputSystemCursor.CursorShape;
                            var expectedCursorType = Microsoft.UI.Input.InputSystemCursorShape.Hand;
                            logger.Verify((expectedCursorType == actualCursorType),
                                          string.Format("Expected cursor type ({0}) did not match actual: {1}",
                                                        expectedCursorType, actualCursorType));
                        }
                        break;

                    case TestList.CoreWebView2InitializedTest:
                        {
                            // First load test's default webpage SimplePage.html
                            var tasks = new List<Task>();
                            var initializedTask = MyWebView2.GetCoreWebView2InitializedTask();
                            tasks.Add(MyWebView2.GetNavigationCompletedTask());
                            tasks.Add(initializedTask);

                            WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            await Task.WhenAll(tasks);

                            CoreWebView2InitializedEventArgs eventArgs = initializedTask.Result;
                            bool isExceptionNull = (eventArgs.Exception == null);

                            logger.Verify(isExceptionNull,
                                          string.Format("Expected CoreWV2InitializedEventArgs.Exception to be null, actual: {0}",
                                                         eventArgs.Exception));
                        }
                        break;

                    case TestList.CoreWebView2Initialized_FailedTest:
                        {
                            // Try to load test's default webpage SimplePage.html
                            // This should fail since we uninstalled WebView2Runtime
                            var tasks = new List<Task>();
                            var initializedTask = MyWebView2.GetCoreWebView2InitializedTask();

                            WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            await initializedTask;

                            CoreWebView2InitializedEventArgs eventArgs = initializedTask.Result;
                            bool exceptionFired = (eventArgs.Exception != null);

                            logger.Verify(exceptionFired,
                                          string.Format("Expected CoreWV2InitializedEventArgs.Exception to fire"));
                        }
                        break;

                    case TestList.WindowlessPopupTest:
                        {
                            var popWebView2 = FindName("popWebView2") as WebView2;
                            var navCompletedTask = popWebView2.GetNavigationCompletedTask();
                            WebView2Common.LoadWebPage(popWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            await navCompletedTask;
                        }
                        break;

                    case TestList.HostNameToFolderMappingTest:
                        {
                            var task = MyWebView2.GetNavigationCompletedTask();
                            var core_wv2 = MyWebView2.CoreWebView2;
                            if (core_wv2 != null)
                            {
                                core_wv2.SetVirtualHostNameToFolderMapping(
                                    "testapp.example", "assets",
                                    Microsoft.Web.WebView2.Core.CoreWebView2HostResourceAccessKind.Allow);
                            }

                            string uriString = "https://testapp.example/SimplePageWithButton.html";
                            WebView2Common.NavigateToUri(MyWebView2, uriString);
                            await task;
                        }
                        break;

                    case TestList.NavigateToVideoTest:
                        {
                            var task = MyWebView2.GetNavigationCompletedTask();
                            NavigateToVideo(MyWebView2);
                            await task;

                            string expectedSourceUri = "https://appassets.example/CastingVideo.mp4";
                            string sourceUri = MyWebView2.Source.ToString(); // Actually expecting "https://appassets.example/CastingVideo.mp4 []"
                            logger.Verify(sourceUri.StartsWith(expectedSourceUri),
                                          string.Format("Test {0}: Expected Uri: {1} did not match with sampled Uri: {2}",
                                                        selectedTest.ToString(), expectedSourceUri, sourceUri));
                        }
                        break;

                    case TestList.NavigateToLocalImageTest:
                        {
                            var task = MyWebView2.GetNavigationCompletedTask();
                            var core_wv2 = MyWebView2.CoreWebView2;
                            if (core_wv2 != null)
                            {
                                core_wv2.SetVirtualHostNameToFolderMapping(
                                    "testapp.example", "assets",
                                    Microsoft.Web.WebView2.Core.CoreWebView2HostResourceAccessKind.Allow);
                            }

                            string uriString = "https://testapp.example/SimplePageWithImage.html";
                            WebView2Common.NavigateToUri(MyWebView2, uriString);
                            await task;
                        }
                        break;

                    case TestList.ScaledTouchTest:
                        {
                            MyWebView2.RenderTransformOrigin = new Windows.Foundation.Point(0, 0);
                            var scaleTransform = new ScaleTransform { ScaleX = 1.2, ScaleY = 1.2 };
                            TransformGroup transformGroup = new TransformGroup();
                            transformGroup.Children.Add(scaleTransform);
                            MyWebView2.RenderTransform = transformGroup;
                        }
                        break;

                    case TestList.CloseThenDPIChangeTest:
                        {
                            MyWebView2.Close();
                        }
                        break;

                    case TestList.AddHostObjectToScriptTest:
                        {
                            var core_wv2 = MyWebView2.CoreWebView2;
                            logger.Verify(core_wv2 != null, string.Format(
                                "Test {0}: CoreWebView2 was null.", selectedTest.ToString()));

                            bool winrtNotImpl = false;
                            try
                            {
                                core_wv2.AddHostObjectToScript("bridge", new Bridge());
                                core_wv2.RemoveHostObjectFromScript("bridge");
                            }
                            catch (NotImplementedException)
                            {
                                // WinRT version of AddHostObjectToScript is not implemented yet,
                                // expect a NotImplementedException for now
                                winrtNotImpl = true;
                            }
                            logger.Verify(winrtNotImpl == true, string.Format(
                                "Test {0}: Expected NotImplementedException but did not receive it.", selectedTest.ToString()));

                            // There is a interop we can use to access the method
                            var interop = core_wv2.As<ICoreWebView2Interop>();
                            try
                            {
                                interop.AddHostObjectToScript("bridge", new Bridge());

                                // AddHostObjectToScript represents the host objects in JavaScript using JavaScript async proxies.
                                // Accessing any member off of the proxy gives back a promise for another async proxy. You need to
                                // await a proxy to get to an actual value. The async proxies have no knowledge of the members of
                                // the actual host object, so JSON.toString on an async proxy won’t tell you anything interesting
                                // because the async proxy doesn’t know it has a property named Property. When you do bridge.Property
                                // you immediately get back an async proxy representing the result of doing a property get on ‘Property’
                                // on that object and a message is sent off to the host process to find that value, but that async proxy
                                // may resolve to an exception if there isn’t actually a property named Property on the actual host object.
                                string result = await MyWebView2.ExecuteScriptAsync(
                                    "(async function() { " +
                                        "let result = await window.chrome.webview.hostObjects.bridge.AnotherObject.Prop; " +
                                        "window.chrome.webview.postMessage(result); })();");
                                // Listen for WebMessageReceived

                                core_wv2.RemoveHostObjectFromScript("bridge");
                            }
                            catch (Exception e)
                            {
                                logger.Verify(false, string.Format("Test {0}: Unexpected exception: {1}",
                                    selectedTest.ToString(), e.ToString()));
                            }
                        }
                        break;

                    case TestList.UserAgentTest:
                        {
                            var userAgent = string.Empty;
                            var core_wv2 = MyWebView2.CoreWebView2;
                            if (core_wv2 == null)
                            {
                                logger.LogError(string.Format("Test {0}: Couldn't get CoreWebView2 object", selectedTest.ToString()));
                                break;
                            }

                            var core_wv2_settings = core_wv2.Settings;
                            if (core_wv2_settings == null)
                            {
                                logger.LogError(string.Format("Test {0}: Couldn't get CoreWebView2Settings object", selectedTest.ToString()));
                                break;
                            }

                            userAgent = core_wv2_settings.UserAgent;

                            // The "Edg" token identifies the Chromium Edge browser
                            // For more information, see https://docs.microsoft.com/en-us/microsoft-edge/web-platform/user-agent-guidance
                            logger.Verify(userAgent.Contains("Edg"),
                                string.Format("Test {0}: Expected a valid UserAgent, got {1}", selectedTest.ToString(), userAgent));
                        }
                        break;

                    case TestList.KeyboardAcceleratorTest:
                        {
                            logger.Verify(Status2.Text != "F5",
                                string.Format("Test {0}: Typing 't' should not have invoked an F5 handler",
                                    selectedTest.ToString()));
                        }
                        break;

                    case TestList.OffTreeWebViewInputTest:
                        {
                            // Create a new webview
                            ApplicationTheme appTheme = Application.Current.RequestedTheme;
                            Color backgroundColor = (appTheme == ApplicationTheme.Light) ? Colors.White : Colors.Black;
                            var webView2 = new WebView2() {
                                Name = "MyWebView2",
                                Margin = new Thickness(8, 8, 8, 8),
                                DefaultBackgroundColor = backgroundColor
                            };
                            AutomationProperties.SetName(webView2, "MyWebView2");
                            AddWebViewEventHandlers(webView2);

                            // Ensure the webview before we add it to the tree
                            var task = webView2.EnsureCoreWebView2Async();
                            await task;

                            // Navigate
                            var navCompletedTask = webView2.GetNavigationCompletedTask();
                            WebView2Common.LoadWebPage(webView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            await navCompletedTask;

                            // Add the webview to the tree so we can see it
                            var border = FindName("MyWebView2Border") as Border;
                            border.Child = webView2;
                        }
                        break;

                    case TestList.HtmlDropdownTest:
                        {
                            var selctedOption = await MyWebView2.ExecuteScriptAsync("getSelectedOption();");
                            logger.Verify(selctedOption.Equals("\"2\""),
                                string.Format("Test {0} Failed, Expected option \"2\" to be selcted, actually got {1}",
                                    selectedTest, selctedOption));
                        }
                        break;

                    case TestList.HiddenThenVisibleTest:
                        {
                            logger.Verify(MyWebView2.Visibility == Visibility.Collapsed,
                                 string.Format("Test {0}: Incorrect setup, Expected MyWebView2.Visibility to be Collapsed, was {1}",
                                    selectedTest, MyWebView2.Visibility));

                            // Make WebView2 visible
                            MyWebView2.Visibility = Visibility.Visible;

                            logger.Verify(MyWebView2.IsHitTestVisible,
                                 string.Format("Test {0}: Failed, Expected MyWebView2.IsHitTestVisible to be true, was {1}",
                                    selectedTest, MyWebView2.IsHitTestVisible));
                        }
                        break;

                    case TestList.ParentHiddenThenVisibleTest:
                        {
                            var parentBorder = MyWebView2.Parent as Border;

                            logger.Verify(parentBorder.Visibility == Visibility.Collapsed,
                                 string.Format("Test {0}: Incorrect setup, Expected parentBorder.Visibility to be Collapsed, was {1}",
                                    selectedTest, parentBorder.Visibility));

                            // Make WebView2's parent Border visible
                            parentBorder.Visibility = Visibility.Visible;

                            logger.Verify(MyWebView2.IsHitTestVisible,
                                 string.Format("Test {0}: Failed, Expected MyWebView2.IsHitTestVisible to be true, was {1}",
                                    selectedTest, MyWebView2.IsHitTestVisible));
                        }
                        break;

                    case TestList.LifetimeTabTest:
                        {
                            MyWebView2.Close();
                        }
                        break;

                    case TestList.CustomConfiguration_BasicTest:
                        {
                            // Create a custom environment
                            var exePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
                            var userDataFolder = exePath + ".CustomUDF";

                            CoreWebView2EnvironmentOptions environmentOptions = new CoreWebView2EnvironmentOptions();
                            environmentOptions.Language = "zh-Hans";

                            CoreWebView2Environment environment =
                                await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
                                    String.Empty /* browserExecutableFolder */, userDataFolder, environmentOptions);

                            // Create custom ControllerOptions
                            CoreWebView2ControllerOptions controllerOptions = environment.CreateCoreWebView2ControllerOptions();
                            controllerOptions.IsInPrivateModeEnabled = true;

                            // Create the WebView2 using the custom Environment
                            await MyWebView2.EnsureCoreWebView2Async(environment, controllerOptions);

                            var navCompletedTask = MyWebView2.GetNavigationCompletedTask();
                            WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            await navCompletedTask;

                            // Save the UDF path so we can delete it later
                            _customUserDataFolder = MyWebView2.CoreWebView2.Environment.UserDataFolder;

                             // Check that the WebView2 has the language set by custom CoreWebView2EnvironmentOptions
                            //
                            // "zh-Hans" and "zh-CN" both represent simplified Chinese, but one may be preferred in some contexts.
                            // When "zh-Hans" is set via CWV2EnvironmentOptions, calling JS getLanugage() on WV2Runtime
                            // maps it to "zh-CN" on Win10, and keeps "zh-Hans" on Win11, so check for both possibilities.
                            string expectedLanguage = "\"zh-Hans\"";
                            string expectedLanguageAlternate = "\"zh-CN\"";
                            string expectedLanguageList = expectedLanguage + " OR " + expectedLanguageAlternate;
                            string actualLanguage = await MyWebView2.ExecuteScriptAsync("getLanguage();");

                            logger.Verify((actualLanguage == expectedLanguage || actualLanguage == expectedLanguageAlternate),
                                          string.Format("Test {0}: Custom Environment's Language {1} did not match expected value in {2}",
                                                         selectedTest.ToString(), actualLanguage, expectedLanguageList));
                        }
                        break;

                    case TestList.CustomConfiguration_EnsureAgainAfterDefaultTest:
                        {
                            // Ensure again after (automatic) Source-based creation
                            var navCompletedTask = MyWebView2.GetNavigationCompletedTask();

                            // TEST 1: EnsureCoreWebView2Async() : <--- should succeed for any configuration
                            try
                            {
                                LogHeader("TEST 1", "Ensure again with (), expecting: SUCCESS");
                                await MyWebView2.EnsureCoreWebView2Async();
                                WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                                await navCompletedTask;
                                LogSuccess("TEST 1");
                            }
                            catch (Exception e)
                            {
                                LogFailure_Exception(logger, "TEST 1", e);
                            }

                            // TEST 2: EnsureCoreWebView2Async(null) <--- should succeed for any configuration
                            try
                            {
                               LogHeader("TEST 2", "Ensure again with (null), expecting: SUCCESS");
                               await MyWebView2.EnsureCoreWebView2Async(null);
                               WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                               await navCompletedTask;
                               LogSuccess("TEST 2");
                            }
                            catch (Exception e)
                            {
                               LogFailure_Exception(logger, "TEST 2", e);
                            }

                            // TEST 3: EnsureCoreWebView2Async(null, null) <--- should succeed for any configuration
                            try
                            {
                               LogHeader("TEST 3", "Ensure again with (null, null), expecting: SUCCESS");
                               await MyWebView2.EnsureCoreWebView2Async(null, null);
                               WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                               await navCompletedTask;
                               LogSuccess("TEST 3");
                            }
                            catch (Exception e)
                            {
                               LogFailure_Exception(logger, "TEST 3", e);
                            }

                            CoreWebView2Environment DefaultEnvironment = MyWebView2.CoreWebView2.Environment;

                            // TODO : Different CoreWebView2Environment instance is returned from CoreWebView2.Environment getter than
                            //        the one cached during implicit CoreWebView2 creation. Need to follow up with  Edge team on this.
                            //        Bug 48528478: WebView2: myWV2.EnsureCoreWebView2Async(myWV2.CoreWebView2.CoreWebView2Environment)
                            //                      unexpectedly fails on default-initialized WebView2
                            //
                            // // TEST  4: EnsureCoreWebView2Async(DefaultEnvironment) <--- should succeed (Default Environment & ControllerOptions)
                            // try
                            // {
                            //     LogHeader("TEST 4", "Ensure again with (DefaultEnvironment), expecting: SUCCESS");
                            //     await MyWebView2.EnsureCoreWebView2Async(DefaultEnvironment);
                            //     WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            //     await navCompletedTask;
                            //     LogSuccess("TEST 4");
                            // }
                            // catch (Exception e)
                            // {
                            //     LogFailure_Exception(logger, "TEST 4", e);
                            // }

                            // Create an equivalent custom environment to the default
                            CoreWebView2EnvironmentOptions environmentOptions = new CoreWebView2EnvironmentOptions();
                            CoreWebView2Environment EquivalentCustomEnvironment =
                                await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
                                    String.Empty /* browserExecutableFolder */, String.Empty /* UserDataFolder */, environmentOptions);

                            // Ensure Again Test 5: EnsureCoreWebView2Async(EquivalentCustomEnvironment) <--- should fail (different environment instance)
                            try
                            {
                                _helpers.AppendMessage("[TEST 5] Ensure again with (EquivalentCustomEnvironment), expecting: ARGUMENT_EXCEPTION");
                                await MyWebView2.EnsureCoreWebView2Async(EquivalentCustomEnvironment);
                                LogFailure(logger, "[TEST 5]", "ArgumentException wasn't raised.");
                            }
                            catch (ArgumentException e)
                            {
                               if (e is ArgumentException)
                               {
                                    LogSuccess("TEST 5");
                               }
                               else
                               {
                                    LogFailure_Exception(logger, "TEST 5", e);
                               }
                            }

                            CoreWebView2ControllerOptions EquivalentCustomOptions = DefaultEnvironment.CreateCoreWebView2ControllerOptions();

                            // Ensure Again Test 6: EnsureCoreWebView2Async(DefaultEnvironment, EquivalentCustomOptions) <--- should fail (different options instance)
                            try
                            {
                                _helpers.AppendMessage("[TEST 6] Ensure again with (DefaultEnvironment, EquivalentCustomOptions), expecting: ARGUMENT_EXCEPTION");
                                await MyWebView2.EnsureCoreWebView2Async(DefaultEnvironment, EquivalentCustomOptions);
                                LogFailure(logger, "[TEST 6]", "ArgumentException wasn't raised.");
                            }
                            catch (ArgumentException e)
                            {
                               if (e is ArgumentException)
                               {
                                    LogSuccess("TEST 6");
                               }
                               else
                               {
                                    LogFailure_Exception(logger, "TEST 6", e);
                               }
                            }
                        }
                        break;

                    case TestList.CustomConfiguration_EnsureAgainAfterCustomTest:
                        {
                            // Create a custom environment
                            CoreWebView2EnvironmentOptions environmentOptions = new CoreWebView2EnvironmentOptions();
                            environmentOptions.Language = "zh-Hans";

                            CoreWebView2Environment CustomEnvironment =
                                await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
                                    String.Empty /* browserExecutableFolder */, String.Empty /* UserDataFolder */, environmentOptions);

                            CoreWebView2ControllerOptions CustomOptions = CustomEnvironment.CreateCoreWebView2ControllerOptions();
                            CustomOptions.IsInPrivateModeEnabled = true;

                            // Create the WebView2 using the custom environment and options: EnsureCoreWebView2Async(customEnvironment, customOptions);
                            _helpers.AppendMessage("[SETUP] Create WebView2 & initialize with (CustomEnvironment, CustomOptions)...");
                            await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment, CustomOptions);
                            var navCompletedTask = MyWebView2.GetNavigationCompletedTask();
                            WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                            await navCompletedTask;

                            // TEST 1: EnsureCoreWebView2Async() : <--- should succeed for any configuration
                            try
                            {
                                LogHeader("TEST 1", "Ensure again with (), expecting: SUCCESS");
                                await MyWebView2.EnsureCoreWebView2Async();
                                WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                                await navCompletedTask;
                                LogSuccess("TEST 1");
                            }
                            catch (Exception e)
                            {
                                LogFailure_Exception(logger, "TEST 1", e);
                            }

                            // TEST 2: EnsureCoreWebView2Async(null) <--- should succeed for any configuration
                            try
                            {
                               LogHeader("TEST 2", "Ensure again with (null), expecting: SUCCESS");
                               await MyWebView2.EnsureCoreWebView2Async(null);
                               WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                               await navCompletedTask;
                               LogSuccess("TEST 2");
                            }
                            catch (Exception e)
                            {
                               LogFailure_Exception(logger, "TEST 2", e);
                            }

                            // TEST 3: EnsureCoreWebView2Async(null, null) <--- should succeed for any configuration
                            try
                            {
                               LogHeader("TEST 3", "Ensure again with (null, null), expecting: SUCCESS");
                               await MyWebView2.EnsureCoreWebView2Async(null, null);
                               WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                               await navCompletedTask;
                               LogSuccess("TEST 3");
                            }
                            catch (Exception e)
                            {
                               LogFailure_Exception(logger, "TEST 3", e);
                            }

                            // TEST 4: EnsureCoreWebView2Async(CustomEnvironment) <--- should fail (different ControllerOptions)
                            try
                            {
                                LogHeader("TEST 4", "Ensure again with (CustomEnvironment), expecting: ARGUMENT_EXCEPTION.");
                                await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment);
                                LogFailure(logger, "TEST 4", " ArgumentException wasn't raised");
                            }
                            catch (Exception e)
                            {
                               if (e is ArgumentException)
                               {
                                    LogSuccess("TEST 4");
                               }
                               else
                               {
                                    LogFailure_Exception(logger, "TEST 4", e);
                               }
                            }

                            // TEST  5: EnsureCoreWebView2Async(CustomEnvironment, CustomOptions) <--- should succeed (same Environment & CotnrollerOptions)
                            try
                            {
                                LogHeader("TEST 5", "Ensure again with (CustomEnvironment, CustomOptions), expecting: SUCCESS");
                                await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment, CustomOptions);
                                WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
                                await navCompletedTask;
                                LogSuccess("TEST 5");
                            }
                            catch (Exception e)
                            {
                                LogFailure_Exception(logger, "TEST 5", e);
                            }

                            CoreWebView2Environment EquivalentCustomEnvironment =
                                await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
                                    String.Empty /* browserExecutableFolder */, String.Empty /* UserDataFolder */, environmentOptions);

                            // Ensure Again Test 6: EnsureCoreWebView2Async(EquivalentCustomEnvironment>) <--- should fail (different environment instance)
                            try
                            {
                                _helpers.AppendMessage("[TEST 6] Ensure again with (EquivalentCustomEnvironment), expecting: ARGUMENT_EXCEPTION");
                                await MyWebView2.EnsureCoreWebView2Async(EquivalentCustomEnvironment);
                                LogFailure(logger, "[TEST 6]", "ArgumentException wasn't raised.");
                            }
                            catch (ArgumentException e)
                            {
                               if (e is ArgumentException)
                               {
                                    LogSuccess("TEST 6");
                               }
                               else
                               {
                                    LogFailure_Exception(logger, "TEST 6", e);
                               }
                            }

                            // Ensure Again Test 7: EnsureCoreWebView2Async(EquivalentCustomEnvironment, CustomOptions>) <--- should fail (different environment instance)
                            try
                            {
                                _helpers.AppendMessage("[TEST 7] Ensure again with (EquivalentCustomEnvironment, CustomOptions), expecting: ARGUMENT_EXCEPTION");
                                await MyWebView2.EnsureCoreWebView2Async(EquivalentCustomEnvironment, CustomOptions);
                                LogFailure(logger, "[TEST 7]", "ArgumentException wasn't raised.");
                            }
                            catch (ArgumentException e)
                            {
                               if (e is ArgumentException)
                               {
                                    LogSuccess("TEST 7");
                               }
                               else
                               {
                                    LogFailure_Exception(logger, "TEST 7", e);
                               }
                            }

                            CoreWebView2ControllerOptions EquivalentCustomOptions = CustomEnvironment.CreateCoreWebView2ControllerOptions();
                            EquivalentCustomOptions.IsInPrivateModeEnabled = true;

                            // Ensure Again Test 8 EnsureCoreWebView2Async(CustomEnvironment, EquivalentCustomOptions>) <--- should fail (different options instance)
                            try
                            {
                                _helpers.AppendMessage("[TEST 8] Ensure again with (CustomEnvironment, EquivalentCustomOptions), expecting: ARGUMENT_EXCEPTION");
                                await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment, EquivalentCustomOptions);
                                LogFailure(logger, "[TEST 8]", "ArgumentException wasn't raised.");
                            }
                            catch (ArgumentException e)
                            {
                               if (e is ArgumentException)
                               {
                                    LogSuccess("TEST 8");
                               }
                               else
                               {
                                    LogFailure_Exception(logger, "TEST 8", e);
                               }
                            }
                        }
                        break;

                    default:
                        break;
                }
            }
        }

void DraggableText_DragStarting | ( | UIElement | sender,
 |  | DragStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 1084 of file WebView2BasicPage.xaml.cs.

        {
            TextBlock draggableTexTextBlock = sender as TextBlock;
            args.Data.SetText(draggableTexTextBlock.Text);
            args.Data.RequestedOperation = DataPackageOperation.Copy;
        }

string GetDocumentTitle ( WebView2 wv2 ) [inline]

Definition at line 420 of file WebView2BasicPage.xaml.cs.

        {
            string documentTitle = string.Empty;

            var core_wv2 = wv2.CoreWebView2;
            if (core_wv2 != null)
            {
                documentTitle = core_wv2.DocumentTitle;
            }

            var DocumentTitleTextBlock = FindName("DocumentTitleTextBlock") as TextBlock;
            DocumentTitleTextBlock.Text = documentTitle;

            return documentTitle;
        }

void HandleWebError ( CoreWebView2NavigationCompletedEventArgs args ) [inline, private]

Definition at line 1078 of file WebView2BasicPage.xaml.cs.

        {
            var errorStatus = args.WebErrorStatus;
            Status2.Text = errorStatus.ToString("G");
        }

static bool IsFocusMessage ( string webMessageAsString ) [inline, static, private]

Definition at line 903 of file WebView2BasicPage.xaml.cs.

        {
            return webMessageAsString.StartsWith("Focus on:") || webMessageAsString.StartsWith("Blur on:");
        }

static bool IsTransientTapTest ( TestList selectedTest ) [inline, static, private]

Definition at line 1110 of file WebView2BasicPage.xaml.cs.

        {
            return selectedTest == TestList.BasicFlingTouchTest     ||
                   selectedTest == TestList.BasicPanTouchTest       ||
                   selectedTest == TestList.BasicLongPressTouchTest ||
                   selectedTest == TestList.BasicStretchTouchTest;
        }

bool IsTransientWebMessage ( string webMessageAsString ) [inline, private]

Definition at line 1092 of file WebView2BasicPage.xaml.cs.

        {
            TestList selectedTest = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());

            // The transient message each of these generates is the tap acknowledgment - "Tap received, zoom: 1"
            bool isTapWhenWaitingForSomethingElse = webMessageAsString == "Tap received, zoom: 1" && IsTransientTapTest(selectedTest);
            // Tests may receive a resize message when the webview is initially sized
            bool isInitialResize = webMessageAsString == "Webview resized." && selectedTest != TestList.ResizeTest;
            // Tests may receive a resize message when the webview is initially displayed on screen
            bool isInitialWindowVisible = webMessageAsString.StartsWith("Visibility state is now") && !IsVisiblityTest(selectedTest);

            return isTapWhenWaitingForSomethingElse ||
                   isInitialResize ||
                   isInitialWindowVisible ||
                   IsW2CenterPointMessage(webMessageAsString) ||
                   IsFocusMessage(webMessageAsString);
        }

static bool IsVisiblityTest ( TestList selectedTest ) [inline, static, private]

Definition at line 1118 of file WebView2BasicPage.xaml.cs.

        {
            return selectedTest == TestList.WindowHiddenTest           ||
                   selectedTest == TestList.VisibilityHiddenTest       ||
                   selectedTest == TestList.VisibilityTurnedOnTest     ||
                   selectedTest == TestList.ParentVisibilityHiddenTest ||
                   selectedTest == TestList.ParentVisibilityTurnedOnTest;
        }

static bool IsW2CenterPointMessage ( string webMessageAsString ) [inline, static, private]

Definition at line 898 of file WebView2BasicPage.xaml.cs.

        {
            return webMessageAsString.StartsWith("w2 CenterPoint:");
        }

void LogFailure | ( | ResultsLogger | logger,
 |  | string | testName,
 |  | string | message |
 | ) |  |  | [inline, private]

Definition at line 2389 of file WebView2BasicPage.xaml.cs.

        {
            string failureText = string.Format("[{0}] Failed: {1}.", testName, message);
            _helpers.AppendMessage(failureText);
            logger.LogError(failureText);
        }

void LogFailure_Exception | ( | ResultsLogger | logger,
 |  | string | testName,
 |  | Exception | e |
 | ) |  |  | [inline, private]

Definition at line 2396 of file WebView2BasicPage.xaml.cs.

        {
            string failureText = string.Format("[{0}] Failed: Got {1}({2}).", testName, e, e.Message);
            _helpers.AppendMessage(failureText);
            logger.LogError(failureText);
        }

void LogHeader | ( | string | testName,
 |  | string | header |
 | ) |  |  | [inline, private]

Definition at line 2379 of file WebView2BasicPage.xaml.cs.

        {
            _helpers.AppendMessage(string.Format("[{0}]: {1}.", testName, header));
        }

void LogSuccess ( string testName ) [inline, private]

Definition at line 2384 of file WebView2BasicPage.xaml.cs.

        {
            _helpers.AppendMessage(string.Format("[{0}] Passed.", testName));
        }

void MoveWebViewControl | ( | string | webviewName,
 |  | WebView2 | webView2 |
 | ) |  |  | [inline, private]

Definition at line 996 of file WebView2BasicPage.xaml.cs.

        {
            var border = new Border()
            {
                Width = 670,
                Height = 370,
                BorderBrush = new SolidColorBrush(Colors.Pink),
                BorderThickness = new Thickness(1)
            };
            border.Child = webView2;

            var stackPanel = new StackPanel()
            {
                Name = webviewName + "StackPanel"
            };
            stackPanel.Children.Add(border);
            WebView2Collection.Children.Add(stackPanel);
        }

static void NavigateToVideo ( WebView2 webview ) [inline, static]

Definition at line 452 of file WebView2BasicPage.xaml.cs.

        {
            var core_wv2 = webview.CoreWebView2;
            if (core_wv2 != null)
            {
                core_wv2.SetVirtualHostNameToFolderMapping(
                    "appassets.example", "assets",
                    Microsoft.Web.WebView2.Core.CoreWebView2HostResourceAccessKind.Allow);

                string uriString = "https://appassets.example/CastingVideo.mp4";
                WebView2Common.NavigateToUri(webview, uriString);
            }
        }

void OnAddWebviewButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 387 of file WebView2BasicPage.xaml.cs.

        {
            string prefixName = "MyWebView2";
            var numWebViews = WebView2Collection.Children.Count;
            char suffix = (char)('A' + numWebViews + 1); // choosing between A-Z based on existing webviews
            string finalName = prefixName + suffix;
            AddWebViewControl(finalName);
        }

void OnCoreProcessFailed | ( | WebView2 | sender,
 |  | CoreWebView2ProcessFailedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 908 of file WebView2BasicPage.xaml.cs.

        {
            AppendMessage(string.Format("[{0}]: Got CoreProcessFailed ({1}).", sender.Name, args.ProcessFailedKind.ToString()));
        }

void OnCoreWebView2Initialized | ( | WebView2 | sender,
 |  | CoreWebView2InitializedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 913 of file WebView2BasicPage.xaml.cs.

        {
            if (args.Exception != null)
            {
                AppendMessage(string.Format("[{0}]: Got CoreWebView2Initialized with exception ({1}).", sender.Name, args.Exception.ToString()));
            }
            else
            {
                AppendMessage(string.Format("[{0}]: Got CoreWebView2Initialized.", sender.Name));
            }
        }

async void OnEnsureCWV2ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 364 of file WebView2BasicPage.xaml.cs.

        {
            ClearStatus();
            foreach (var unit in WebView2Collection.Children)
            {
                var webviewStackPanel = unit as StackPanel;
                if (webviewStackPanel != null)
                {
                    string stackPanelName = webviewStackPanel.Name;
                    string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
                    var toggleBox = FindName(webviewName + "Toggle") as ToggleSwitch;
                    Debug.Assert(toggleBox != null);
                    if (toggleBox.IsOn)
                    {
                        var webview = FindName(webviewName) as WebView2;
                        Debug.Assert(webview != null);
                        await webview.EnsureCoreWebView2Async();
                        Status1.Text = "EnsureCoreWebView2Async() completed";
                    }
                }
            }
        }

void OnGetDocumentTitleButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 436 of file WebView2BasicPage.xaml.cs.

        {
            GetDocumentTitle(FindName("MyWebView2") as WebView2);
        }

void OnGoBackButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 408 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.GoBack();
        }

void OnGoForwardButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 414 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.GoForward();
        }

void OnNavigateToStringButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 396 of file WebView2BasicPage.xaml.cs.

        {
            string navigateToStringString = NavigateToStringString.Text;
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.NavigateToString(NavigateToStringString.Text);
        }

override void OnNavigatingFrom ( NavigatingCancelEventArgs e ) [inline, protected]

Definition at line 2357 of file WebView2BasicPage.xaml.cs.

        {
            if (TestNameComboBox.GetSelectedText() != "")
            {
                // For test stability, webviews should be fully cleaned up before we leave the test page.
                Debug.Assert(_areWebviewElementsCleanedUp);
            }
            else
            {
                // If we're not running a test, we should clean up any WebView2s before navigating away.
                if (!_areWebviewElementsCleanedUp)
                {
                    CleanupCurrentTest(null, null);
                }
            }
        }

void OnNavigationCompleted | ( | WebView2 | sender,
 |  | CoreWebView2NavigationCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 824 of file WebView2BasicPage.xaml.cs.

        {
            AppendMessage(string.Format("[{0}]: Got NavigationCompleted.", sender.Name));

            if (args.IsSuccess)
            {
                Status2.Text += string.Format("{0},", sender.Name); // indicating webview has loaded
            }
            else
            {
                HandleWebError(args);
            }
        }

void OnNavigationStarting | ( | WebView2 | sender,
 |  | CoreWebView2NavigationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 804 of file WebView2BasicPage.xaml.cs.

        {
            // Be careful if changing this message. The "NavigationStarting" string is expected
            // to be logged exactly once per NavigationStarting event by the NonAsciiUriTest.
            AppendMessage(string.Format("[{0}]: Got NavigationStarting ({1}).", sender.Name, args.Uri));

            string expectedUri = "http://www.blockedbynavigationstarting.invalid/";
            if (args.Uri.ToString() == expectedUri)
            {
                args.Cancel = true;
            }
            else
            {
                Status1.Text = sender.Name + " navigation starting...";
                Status3.Text = args.Uri;
                _isUserInitiated = args.IsUserInitiated;
                _isRedirected = args.IsRedirected;
            }
        }

void OnResizeWebViewVisualButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 494 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            _originalWidth = MyWebView2.ActualWidth;
            _originalHeight = MyWebView2.ActualHeight;
            MyWebView2.Width = MyWebView2.ActualWidth / 2;
            MyWebView2.Height = MyWebView2.ActualHeight / 2;

            MyWebView2.UpdateLayout();

            ResizeWebViewVisualButton.Content = "Reset";
        }

void OnSetSourceButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 341 of file WebView2BasicPage.xaml.cs.

        {
            ClearStatus();
            string newUriString = UriTextBox.Text;
            foreach (var unit in WebView2Collection.Children)
            {
                var webviewStackPanel = unit as StackPanel;
                if (webviewStackPanel != null)
                {
                    string stackPanelName = webviewStackPanel.Name;
                    string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
                    var toggleBox = FindName(webviewName + "Toggle") as ToggleSwitch;
                    Debug.Assert(toggleBox != null);
                    if (toggleBox.IsOn)
                    {
                        var webview = FindName(webviewName) as WebView2;
                        Debug.Assert(webview != null);
                        WebView2Common.NavigateToUri(webview, newUriString);
                    }
                }
            }
        }

void OnToggleWebViewVisibilityButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 517 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.Visibility = Visibility.Collapsed;

            ToggleWebViewVisibilityButton.Content = "Reset";
        }

void OnVideoButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 403 of file WebView2BasicPage.xaml.cs.

        {
            NavigateToVideo(FindName("MyWebView2") as WebView2);
        }

void OnWebMessageReceived | ( | WebView2 | sender,
 |  | CoreWebView2WebMessageReceivedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 845 of file WebView2BasicPage.xaml.cs.

        {
            try
            {
                AppendMessage(string.Format("[{0}]: Got WebMessageReceived ({1}).", sender.Name, args.TryGetWebMessageAsString()));
            }
            catch
            {
                AppendMessage(string.Format("[{0}]: Got WebMessageReceived ({1}).", sender.Name, string.Empty));
            }

            // Do not process message if webview is not enabled or source is not validated.
            Status1.Text = string.Empty;
            Status2.Text = string.Empty;
            string webMessageAsString = string.Empty;
            string webMessageAsJson = string.Empty;

            // TODO_WebView2: Create wrapper WebView2Info with easy access to state like toggleswitch
            var toggleSwitch = FindName(sender.Name + "Toggle") as ToggleSwitch;
            if (AreEqualIgnoringSpace(args.Source, sender.Source.ToString()) && toggleSwitch.IsOn)
            {
                try
                {
                    webMessageAsString = args.TryGetWebMessageAsString();
                    if (IsFocusMessage(webMessageAsString))
                    {
                        AnaheimFocusTextBox.Text = webMessageAsString;
                        focusLog.Text += webMessageAsString + "\n";
                        focusScrollViewer.ChangeView(null, focusScrollViewer.ScrollableHeight, null);
                    }
                    else if (IsW2CenterPointMessage(webMessageAsString))
                    {
                        MiscTextBox.Text = webMessageAsString;
                    }
                    else
                    {
                        Status1.Text = webMessageAsJson = args.WebMessageAsJson;
                        Status2.Text = webMessageAsString;
                    }
                }
                catch
                {
                    Status1.Text = webMessageAsJson = args.WebMessageAsJson;
                    Status2.Text = "Invalid string (try args.WebMessageAsJson instead)";
                }
            }

            if (!IsTransientWebMessage(webMessageAsString))
            {
                VerifyWebMessageBasedTest(webMessageAsString, webMessageAsJson);
            }
        }

Border RemoveExistingWebViewControl ( WebView2 webview ) [inline, private]

Definition at line 1015 of file WebView2BasicPage.xaml.cs.

        {
            RemoveWebViewEventHandlers(webview);
            webview.Close();
            Border parentBorder = webview.Parent as Border;
            parentBorder.Child = null;
            return parentBorder;
        }

void RemoveWebViewControls ( bool keepDefault = false ) [inline, private]

Definition at line 1042 of file WebView2BasicPage.xaml.cs.

        {
            int lastToRemove = keepDefault ? 1 : 0;
            for (int i = WebView2Collection.Children.Count - 1; i >= lastToRemove; i--)
            {
                StackPanel webviewStackPanel = WebView2Collection.Children[i] as StackPanel;
                Debug.Assert(webviewStackPanel != null);
                string stackPanelName = webviewStackPanel.Name;
                string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
                var webview = FindName(webviewName) as WebView2;
                if (webview != null)
                {
                    RemoveWebViewEventHandlers(webview);
                    webview.Close();
                }

                WebView2Collection.Children.RemoveAt(i);
            }
        }

void RemoveWebViewEventHandlers ( WebView2 webview ) [inline, private]

Definition at line 1033 of file WebView2BasicPage.xaml.cs.

        {
            webview.NavigationStarting -= OnNavigationStarting;
            webview.NavigationCompleted -= OnNavigationCompleted;
            webview.WebMessageReceived -= OnWebMessageReceived;
            webview.CoreProcessFailed -= OnCoreProcessFailed;
            webview.CoreWebView2Initialized -= OnCoreWebView2Initialized;
        }

void ResetTransformWebView | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 480 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.RenderTransformOrigin = new Windows.Foundation.Point(0, 0);
            var rotateTransform = new RotateTransform { Angle = 0 };
            var scaleTransform = new ScaleTransform { ScaleX = 1, ScaleY = 1 };
            TransformGroup transformGroup = new TransformGroup();
            transformGroup.Children.Add(rotateTransform);
            transformGroup.Children.Add(scaleTransform);
            MyWebView2.RenderTransform = transformGroup;

            RotateScaleButton.Content = "Rotate and Scale";
        }

void ResetWebViewVisibility | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 525 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.Visibility = Visibility.Visible;

            ToggleWebViewVisibilityButton.Content = "Hide WebView";
        }

void ResetWebViewVisual | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 507 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.Width = _originalWidth;
            MyWebView2.Height = _originalHeight;
            MyWebView2.UpdateLayout();

            ResizeWebViewVisualButton.Content = "Resize visual";
        }

void TestNameComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 541 of file WebView2BasicPage.xaml.cs.

        {
            // if there are more webviews than just default one, remove them
            if (WebView2Collection.Children.Count > 1)
            {
                RemoveWebViewControls(true /* keep default webview */);
            }

            var MyWebView2 = FindName("MyWebView2") as WebView2;
            TestList test = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
            switch (test)
            {
                case TestList.MultipleWebviews_BasicRenderingTest:
                    {
                        AddWebViewControl("MyWebView2B");
                        AddWebViewControl("MyWebView2C");
                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.MultipleWebviews_FocusTest:
                    {
                        AddWebViewControl("MyWebView2B");
                        // both webviews will load different webpages
                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                        WebView2Common.LoadWebPage((FindName("MyWebView2B") as WebView2), TestPageNames[0]);
                    }
                    break;
                case TestList.MultipleWebviews_LanguageTest:
                    {
                        // Set Application Language override to zh-Hans - create new WV2
                        ApplicationLanguages.PrimaryLanguageOverride = "zh-Hans";
                        _isApplicationLanguageOverrideSet = true;
                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);

                        // TODO_WebView2: When we expose API to set custom UserData, update the 2nd WebView to use a different language
                        //                (same UserData implies same browser instance and therefore requires same Language)
                        AddWebViewControl("MyWebView2B");
                        StackPanel MyWebView2B_Ancestor = FindName("MyWebView2BStackPanel") as StackPanel;
                        WebView2Common.LoadWebPage((FindName("MyWebView2B") as WebView2), TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.SourceBeforeLoadTest:
                    {
                        // Remove existing WebView, we're going to replace it
                        Border parentBorder = RemoveExistingWebViewControl(MyWebView2);

                        Uri uri = WebView2Common.GetTestPageUri("SimplePageWithButton.html");
                        var newWebView2 = new WebView2() {
                            Name = "MyWebView2",
                            Margin = new Thickness(8, 8, 8, 8),
                            // Set the source before we put the webview in the tree
                            Source = uri
                        };
                        AutomationProperties.SetName(newWebView2, "MyWebView2");
                        parentBorder.Child = newWebView2;
                        AddWebViewEventHandlers(newWebView2);
                    }
                    break;
                case TestList.VisibilityTurnedOnTest:
                    {
                        MyWebView2.Visibility = Visibility.Collapsed;
                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.ParentVisibilityTurnedOnTest:
                    {
                        var testContentsBorder = FindName("TestContentsBorder") as Border;
                        testContentsBorder.Visibility = Visibility.Collapsed;
                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.QueryCoreWebView2BasicTest:
                    {
                        // Defer 1st source set to CompleteCurrentTest to avoid race conditions
                    }
                    break;
                case TestList.CoreWebView2InitializedTest:
                    {
                        // Defer 1st source set to CompleteCurrentTest to listen to event during CoreWV initialization
                    }
                    break;
                case TestList.CoreWebView2Initialized_FailedTest:
                    {
                        // Defer 1st source set to CompleteCurrentTest to listen to event during CoreWV initialization
                    }
                    break;
                case TestList.WindowlessPopupTest:
                    {
                        // Remove existing WebView so it doesn't get confused with the one in the popup
                        _ = RemoveExistingWebViewControl(MyWebView2);

                        // Create popup contents: a new webview
                        var webviewInPopup = new WebView2() {
                            Name = "popWebView2",
                            Margin = new Thickness(8, 8, 8, 8),
                            Height = 500,
                            Width = 500,
                        };
                        AutomationProperties.SetName(webviewInPopup, "popWebView2");
                        AddWebViewEventHandlers(webviewInPopup);

                        // Add a ToggleSwitch back in so that OnWebMessageReceived can find it
                        var toggleSwitch = new ToggleSwitch()
                        {
                            Name = "popWebView2" + "Toggle",
                            IsOn = true,
                            OffContent = "Not selected",
                            OnContent = "Selected",
                            IsTabStop = false
                        };
                        var messageReceivedSP = (FindName("MessageReceived") as CheckBox).Parent as StackPanel;
                        messageReceivedSP.Children.Add(toggleSwitch);

                        // Create Popup
                        var popupOpened = new System.Threading.AutoResetEvent(false);
                        Popup popup = new Popup {
                            HorizontalOffset = 50,
                            VerticalOffset = 50,
                            Child = webviewInPopup,
                        };
                        popup.Opened += (sender, args) =>
                        {
                            popupOpened.Set();
                        };

                        // Place popup and open it
                        Border testContentsBorder = FindName("TestContentsBorder") as Border;
                        testContentsBorder.Child = popup;
                        if (!popup.IsOpen) { popup.IsOpen = true; }

                        // Wait up to 5 seconds for the popup to open
                        popupOpened.WaitOne(TimeSpan.FromSeconds(5));
                    }
                    break;
                case TestList.CursorUpdateTest:
                case TestList.CursorClickUpdateTest:
                    {
                        // Remove existing WebView, we're going to replace it
                        Border parentBorder = RemoveExistingWebViewControl(MyWebView2);

                        // Insert webview with public ProtectedCursor
                        var newWebView2 = new WebView2WithCursor() {
                            Name = "MyWebView2",
                            Margin = new Thickness(8, 8, 8, 8),
                        };
                        AutomationProperties.SetName(newWebView2, "MyWebView2");
                        parentBorder.Child = newWebView2;
                        AddWebViewEventHandlers(newWebView2);
                        WebView2Common.LoadWebPage(newWebView2, TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.KeyboardAcceleratorTest:
                    {
                        var f5Accelerator = new KeyboardAccelerator();
                        f5Accelerator.Key = VirtualKey.F5;
                        f5Accelerator.Invoked += (sender, args) =>
                        {
                            Status2.Text = "F5";
                        };
                        MyWebView2.KeyboardAccelerators.Add(f5Accelerator);
                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.AccessKeyTest:
                    {
                        MyWebView2.AccessKey = "W";
                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.NonAsciiUriTest:
                    {
                        // Put the URI with non-ascii characters in a TextBox, so we can easily copy/paste for manual testing.
                        var box = FindName("CopyPasteTextBox2") as TextBox;
                        string fileLocation = WebView2Common.GetTestPageUri("SimplePageWithNonÅscií.html").ToString();
                        string query = "?query=";
                        box.Text = fileLocation + query;

                        WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                    }
                    break;
                case TestList.OffTreeWebViewInputTest:
                    {
                        Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
                        parentBorder.BorderBrush = new SolidColorBrush(Colors.Pink);
                    }
                    break;
                case TestList.HiddenThenVisibleTest:
                    {
                        // Remove existing WebView, we're going to replace it with a hidden one
                        Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
                        var parentStackPanel = parentBorder.Parent as StackPanel;
                        parentStackPanel.Children.Remove(parentBorder);

                        // Create a new border that gets its size from the webview
                        var newBorder = new Border()
                        {
                            BorderBrush = new SolidColorBrush(Colors.Red),
                            BorderThickness = new Thickness(5)
                        };

                        // Add a new, collapsed WebView2 into the tree
                        var uri = WebView2Common.GetTestPageUri(TestPageNames[TestInfoDictionary[test]]);
                        var newWebView2 = new WebView2()
                        {
                            Name = "MyWebView2",
                            Margin = new Thickness(8, 8, 8, 8),
                            Width = 670,
                            Height = 370,
                            Source = uri,
                            Visibility = Visibility.Collapsed,
                        };
                        AutomationProperties.SetName(newWebView2, "MyWebView2");
                        newBorder.Child = newWebView2;
                        parentStackPanel.Children.Add(newBorder);
                        AddWebViewEventHandlers(newWebView2);
                    }
                    break;
                case TestList.ParentHiddenThenVisibleTest:
                    {
                        // Remove existing WebView, we're going to replace it with a hidden one
                        Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
                        var parentStackPanel = parentBorder.Parent as StackPanel;
                        parentStackPanel.Children.Remove(parentBorder);

                        // Create a new, collapsed border that gets its size from the webview
                        var newBorder = new Border()
                        {
                            BorderBrush = new SolidColorBrush(Colors.Red),
                            BorderThickness = new Thickness(5),
                            Visibility = Visibility.Collapsed
                        };

                        // Add a new WebView2 into the tree
                        var uri = WebView2Common.GetTestPageUri(TestPageNames[TestInfoDictionary[test]]);
                        var newWebView2 = new WebView2()
                        {
                            Name = "MyWebView2",
                            Margin = new Thickness(8, 8, 8, 8),
                            Width = 670,
                            Height = 370,
                            Source = uri,
                            Visibility = Visibility.Visible,
                        };
                        AutomationProperties.SetName(newWebView2, "MyWebView2");
                        newBorder.Child = newWebView2;
                        parentStackPanel.Children.Add(newBorder);
                        AddWebViewEventHandlers(newWebView2);
                    }
                    break;

                case TestList.CustomConfiguration_BasicTest:
                case TestList.CustomConfiguration_EnsureAgainAfterCustomTest:
                    {
                        // Defer load so we can use custom Environment and ControllerOptions
                    }
                    break;

                default:
                    WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
                    break;
            }
        }

void TransformWebView | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 466 of file WebView2BasicPage.xaml.cs.

        {
            var MyWebView2 = FindName("MyWebView2") as WebView2;
            MyWebView2.RenderTransformOrigin = new Windows.Foundation.Point(0, 0);
            var rotateTransform = new RotateTransform { Angle = 45 };
            var scaleTransform = new ScaleTransform { ScaleX = 1.2, ScaleY = 1.2 };
            TransformGroup transformGroup = new TransformGroup();
            transformGroup.Children.Add(rotateTransform);
            transformGroup.Children.Add(scaleTransform);
            MyWebView2.RenderTransform = transformGroup;

            RotateScaleButton.Content = "Reset";
        }

void UpdateSourceOnEnter | ( | object | sender,
 |  | KeyRoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 441 of file WebView2BasicPage.xaml.cs.

        {
            if (args.Key == VirtualKey.Enter)
            {
                var ActualUriTextBlock = FindName("ActualUriTextBlock") as TextBlock;
                ActualUriTextBlock.Text = UriTextBox.Text;
            }
        }

void VerifyWebMessageBasedTest | ( | string | stringResult,
 |  | string | jsonResult |
 | ) |  |  | [inline]

Definition at line 1127 of file WebView2BasicPage.xaml.cs.

        {
            TestList selectedTest = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
            using (var logger = new ResultsLogger(selectedTest.ToString(), TestResult))
            {
                string expectedStringResult = string.Empty;
                string expectedJsonResult = string.Empty;

                switch (selectedTest)
                {
                    case TestList.MouseLeftClickTest:
                        expectedStringResult = "Left mouse button clicked.";
                        break;

                    case TestList.MouseMiddleClickTest:
                        expectedStringResult = "Middle mouse button clicked.";
                        break;

                    case TestList.MouseRightClickTest:
                        expectedStringResult = "Right mouse button clicked.";
                        break;

                    case TestList.MouseXButton1ClickTest:
                        expectedStringResult = "First X mouse button clicked.";
                        break;

                    case TestList.MouseXButton2ClickTest:
                        expectedStringResult = "Second X mouse button clicked.";
                        break;

                    case TestList.MouseWheelScrollTest:
                        expectedStringResult = "End of page reached.";
                        break;

                    case TestList.WebMessageReceivedTest:
                        {
                             expectedStringResult = "Input button clicked.";
                             expectedJsonResult = "\"Input button clicked.\"";
                        }
                        break;

                    case TestList.ResizeTest:
                        expectedStringResult = "Webview resized.";
                        break;

                    case TestList.BasicTapTouchTest:
                        expectedStringResult = "Tap received, zoom: 1";
                        break;

                    case TestList.BasicFlingTouchTest:
                        expectedStringResult = "Far side of page reached.";
                        break;

                    case TestList.BasicStretchTouchTest:
                        {
                            string[] split = stringResult.Split(' ');
                            string zoom = split[split.Length - 1];
                            float zoomResultAsFloat = float.Parse(zoom);
                            logger.Verify((zoomResultAsFloat > 1.0),
                                          string.Format("Test {0}: Expected zoom value greater than 1.0, actual zoom was {1}",
                                                        selectedTest.ToString(), zoom));
                        }
                        break;

                    case TestList.BasicPanTouchTest:
                        expectedStringResult = "Far side of page reached.";
                        break;

                    case TestList.BasicLongPressTouchTest:
                        expectedStringResult = "Long press received.";
                        break;

                    case TestList.HostNameToFolderMappingTest:
                        expectedStringResult = "Left mouse button clicked.";
                        break;

                    case TestList.NavigateToLocalImageTest:
                        expectedStringResult = "Image loaded.";
                        break;

                    case TestList.ScaledTouchTest:
                        expectedStringResult = "Tap received, zoom: 1";
                        break;

                    case TestList.VisibilityHiddenTest:
                    case TestList.ParentVisibilityHiddenTest:
                        expectedStringResult = "Visibility state is now hidden";
                        break;

                    case TestList.VisibilityTurnedOnTest:
                    case TestList.ParentVisibilityTurnedOnTest:
                        {
                            // We start the test by hiding the WebView so ignore that message if it comes through
                            if (stringResult == "Visibility state is now hidden") return;
                            expectedStringResult = "Visibility state is now visible";
                        }
                        break;

                    case TestList.SpecificTouchTest:
                        {
                            expectedStringResult = "Received: 35";
                        }
                        break;

                    case TestList.WindowHiddenTest:
                        {
                            // We hide the window before showing it again, so ignore the first message
                            if (stringResult == "Visibility state is now hidden") return;
                            expectedStringResult = "Visibility state is now visible";
                        }
                        break;

                    case TestList.WindowlessPopupTest:
                        expectedStringResult = "Left mouse button clicked.";
                        break;

                    case TestList.AddHostObjectToScriptTest:
                        expectedStringResult = "Example property from host object";
                        break;

                    case TestList.OffTreeWebViewInputTest:
                        expectedStringResult = "Left mouse button clicked.";
                        break;

                    case TestList.HiddenThenVisibleTest:
                    case TestList.ParentHiddenThenVisibleTest:
                        expectedStringResult = "Left mouse button clicked.";
                        break;

                    case TestList.DragDropIntoWebView2Test:
                        expectedStringResult = "Input on w2: Draggable Text";
                        break;

                    default:
                        {
                            logger.LogError("Unexpected test type in VerifyWebMessageBasedTest(), got message: " + stringResult);
                            return;
                        }
                }

                bool allWebMessagesReceived = true;
                // Most tests just validate string equality - do that here.
                // Tests doing other validation would do it elsewhere (leaving expectedStringResult/expectedJsonResult empty).
                if (expectedStringResult != string.Empty)
                {
                    logger.Verify((expectedStringResult == stringResult),
                                    string.Format("Test {0}: Expected string text {1} did not match with sampled string text {2}",
                                                selectedTest.ToString(), expectedStringResult, stringResult));
                    allWebMessagesReceived = allWebMessagesReceived && (expectedStringResult == stringResult);
                }

                if (expectedJsonResult != string.Empty)
                {
                    logger.Verify((expectedJsonResult == jsonResult),
                                    string.Format("Test {0}: Expected Json result {1} did not match with sampled Json result {2}",
                                                    selectedTest.ToString(), expectedJsonResult, jsonResult));
                    allWebMessagesReceived = allWebMessagesReceived && (expectedJsonResult == jsonResult);
                }

                // Explicitly check a box to show that the web message was received. CompleteCurrentTest() also logs
                // its pass/fail to the same place, so sometimes we can get false positives here if we're relying
                // on that method to do work before the web message is sent.
                if (allWebMessagesReceived)
                {
                    var messageReceivedBox = FindName("MessageReceived") as CheckBox;
                    messageReceivedBox.IsChecked = true;
                }
            }
        }

Member Data Documentation

bool _areWebviewElementsCleanedUp = false [private]

Definition at line 296 of file WebView2BasicPage.xaml.cs.

string _customUserDataFolder = string.Empty [private]

Definition at line 298 of file WebView2BasicPage.xaml.cs.

readonly WebView2Common _helpers [private]

Definition at line 292 of file WebView2BasicPage.xaml.cs.

bool _isApplicationLanguageOverrideSet = false [private]

Definition at line 297 of file WebView2BasicPage.xaml.cs.

bool _isRedirected = false [private]

Definition at line 295 of file WebView2BasicPage.xaml.cs.

bool _isUserInitiated = false [private]

Definition at line 294 of file WebView2BasicPage.xaml.cs.

double _originalHeight [private]

Definition at line 300 of file WebView2BasicPage.xaml.cs.

double _originalWidth [private]

Definition at line 301 of file WebView2BasicPage.xaml.cs.

readonly Dictionary<TestList, int> TestInfoDictionary [private]

Definition at line 208 of file WebView2BasicPage.xaml.cs.

readonly string [] TestPageNames [private]
Initial value:
        {
            "SimplePage.html",
            "SimplePageWithButton.html",
            "SimplePageWithScrollableColoredBlocks.html",
            "SimplePageForFocus.html",
            "SimplePageWithText.html",
            "SimpleInputPage.html",
            "SimplePageWithManyButtons.html",
            "SimplePageWithNonÅscií.html",
        }

Definition at line 280 of file WebView2BasicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2BasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2Common Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • WebView2Common
Public Member Functions | Static Public Member Functions | Private Attributes

WebView2Common Class Reference

List of all members.

Public Member Functions

WebView2Common (TestPage testPage)
void | AppendMessage (string message)
void | ClearStatus ()
void | CopyTestPagesLocally ()

Static Public Member Functions

static Uri | GetTestPageUri (string testPageName)
static void | LoadWebPage (WebView2 webview, string testPageName)
static void | NavigateToStringMessage (WebView2 webview)
static void | NavigateToUri (WebView2 webview, Uri uri)
static void | NavigateToUri (WebView2 webview, string UriString)

Private Attributes

readonly TestPage | _testPage
readonly TextBox | MessageLog
readonly TextBox | Status1
readonly TextBox | Status2
readonly TextBox | Status3

Detailed Description

Definition at line 14 of file WebView2Common.cs.

Constructor & Destructor Documentation

WebView2Common ( TestPage testPage ) [inline]

Definition at line 22 of file WebView2Common.cs.

        {
            _testPage = testPage;

            Status1 = _testPage.FindName("Status1") as TextBox;
            Status2 = _testPage.FindName("Status2") as TextBox;
            Status3 = _testPage.FindName("Status3") as TextBox;
            MessageLog = _testPage.FindName("MessageLog") as TextBox;
        }

Member Function Documentation

void AppendMessage ( string message ) [inline]

Definition at line 82 of file WebView2Common.cs.

        {
            if (MessageLog != null)
            {
                MessageLog.Text = MessageLog.Text + message + Environment.NewLine;
            }
        }

void ClearStatus ( ) [inline]

Definition at line 32 of file WebView2Common.cs.

        {
            Status1.Text = string.Empty;
            Status2.Text = string.Empty;
            Status3.Text = string.Empty;
        }

void CopyTestPagesLocally ( ) [inline]

Definition at line 40 of file WebView2Common.cs.

        {
            Status1.Text = "HTML files ready";
        }

static Uri GetTestPageUri ( string testPageName ) [inline, static]

Definition at line 47 of file WebView2Common.cs.

        {
            string appDirectory  = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string fullUri = @"file:///" + appDirectory + @"/Assets/" + testPageName;

            return new Uri(fullUri);
        }

static void LoadWebPage | ( | WebView2 | webview,
 |  | string | testPageName |
 | ) |  |  | [inline, static]

Definition at line 76 of file WebView2Common.cs.

        {
             Uri testPageUri = GetTestPageUri(testPageName);
             NavigateToUri(webview, testPageUri);
        }

static void NavigateToStringMessage ( WebView2 webview ) [inline, static]

Definition at line 71 of file WebView2Common.cs.

        {
            webview.NavigateToString("You've navigated to a string message.");
        }

static void NavigateToUri | ( | WebView2 | webview,
 |  | string | UriString |
 | ) |  |  | [inline, static]

Definition at line 55 of file WebView2Common.cs.

        {
            Uri newUri;
            if (!string.IsNullOrEmpty(UriString) &&
                Uri.TryCreate(UriString, UriKind.RelativeOrAbsolute, out newUri) == true)
            {
                webview.Source = newUri;
            }
        }

static void NavigateToUri | ( | WebView2 | webview,
 |  | Uri | uri |
 | ) |  |  | [inline, static]

Definition at line 65 of file WebView2Common.cs.

        {
            string uriString = uri.ToString();
            NavigateToUri(webview, uriString);
        }

Member Data Documentation

readonly TestPage _testPage [private]

Definition at line 16 of file WebView2Common.cs.

readonly TextBox MessageLog [private]

Definition at line 20 of file WebView2Common.cs.

readonly TextBox Status1 [private]

Definition at line 17 of file WebView2Common.cs.

readonly TextBox Status2 [private]

Definition at line 18 of file WebView2Common.cs.

readonly TextBox Status3 [private]

Definition at line 19 of file WebView2Common.cs.

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2Common.cs
Generated on Sun Dec 1 2024 20:54:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2CoreObjectsPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • WebView2CoreObjectsPage
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes

WebView2CoreObjectsPage Class Reference

List of all members.

Public Member Functions

WebView2CoreObjectsPage ()
async void | CleanupCurrentTest (object sender, RoutedEventArgs args)
void | OnAdd_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnBad_Source_Browser_ButtonClicked (object sender, RoutedEventArgs args)
void | OnBad_Source_Render_ButtonClicked (object sender, RoutedEventArgs args)
void | OnClose_ConcurrentCreationElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnClose_LiveElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnClose_MarkupElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnClose_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnCreate_ConcurrentCreationElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnCreate_CoreProcessFailed_ButtonClicked (object sender, RoutedEventArgs args)
void | OnCreate_LiveElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnCreate_MarkupElement_Blank_ButtonClicked (object sender, RoutedEventArgs args)
void | OnCreate_MarkupElement_Source_ButtonClicked (object sender, RoutedEventArgs args)
void | OnCreate_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
async void | OnEnsure_Ensure_ButtonClicked (object sender, RoutedEventArgs args)
async void | OnEnsure_Source_ButtonClicked (object sender, RoutedEventArgs args)
async void | OnEnsureCoreWebView2_LiveElement_ButtonClicked (object sender, RoutedEventArgs args)
async void | OnEnsureCoreWebView2_MarkupElement_ButtonClicked (object sender, RoutedEventArgs args)
async void | OnEnsureCoreWebView2_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnGood_Source_ButtonClicked (object sender, RoutedEventArgs args)
void | OnReleaseReference_LiveElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnReleaseReference_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnRemove_ConcurrentCreationElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnRemove_LiveElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnRemove_MarkupElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnRemove_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnResetCounts_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSetCustomSource_LiveElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSetCustomSource_MarkupElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSetCustomSource_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSetSource_LiveElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSetSource_MarkupElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSetSource_OfflineElement_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSource_Ensure_ButtonClicked (object sender, RoutedEventArgs args)
void | OnSource_Source_ButtonClicked (object sender, RoutedEventArgs args)

Protected Member Functions

override void | OnNavigatingFrom (NavigatingCancelEventArgs e)

Private Types

enum | TestList { BasicCoreObjectCreationAndDestructionTest, ConcurrentCreationRequestsTest, EdgeProcessFailedTest }

Private Member Functions

void | AddWebViewEventHandlers (WebView2 webview)
async Task | CleanupWebViewElements ()
void | OnBadSourceButtonClickedHelper (string badUri)
void | OnCoreProcessFailed (object sender, CoreWebView2ProcessFailedEventArgs e)
void | OnCoreWebView2Initialized (WebView2 sender, object args)
async void | OnCoreWebView2Initialized_Ensure (WebView2 sender, object args)
void | OnCoreWebView2Initialized_Source (WebView2 sender, object args)
void | OnLoaded (object sender, RoutedEventArgs e)
void | OnNavigationCompleted (WebView2 sender, CoreWebView2NavigationCompletedEventArgs args)
void | OnNavigationStarting (WebView2 sender, CoreWebView2NavigationStartingEventArgs args)
void | OnReloadButtonClicked (object sender, RoutedEventArgs args)
void | OnUnloaded (object sender, RoutedEventArgs e)
void | Page_Loaded (object sender, RoutedEventArgs e)
void | RemoveAllWebViewControls ()
void | RemoveWebViewEventHandlers (WebView2 webview)
void | ResetCounts ()
void | SetClosedExceptionCount (int value)
void | SetCoreProcessFailedCount (int value)
void | SetCoreWebView2InitializedCount (int value)
void | SetEnsureCoreWebView2CompletionCount (int value)
void | SetLoadedCount (int value)
void | SetNavigationCompletedCount (int value)
void | SetNavigationStartingCount (int value)
void | SetUnloadedCount (int value)
void | TestNameComboBox_SelectionChanged (object sender, SelectionChangedEventArgs e)

Private Attributes

bool | _areWebviewElementsCleanedUp = false
int | _closedExceptionCount = 0
int | _coreProcessFailedCount = 0
int | _coreWebView2InitializedCount = 0
int | _ensureCoreWebView2CompletionCount = 0
readonly WebView2Common | _helpers
int | _loadedCount = 0
int | _navigationCompletedCount = 0
int | _navigationStartingCount = 0
int | _unloadedCount = 0
WebView2 | _wv2_ConcurrentCreation
WebView2 | _wv2_CoreProcessFailed
WebView2 | _wv2_Markup
WebView2 | _wv2_Programmatic_Live
WebView2 | _wv2_Programmatic_Offline

Detailed Description

Definition at line 15 of file WebView2CoreObjectsPage.xaml.cs.

Member Enumeration Documentation

enum TestList [private]
Enumerator:
BasicCoreObjectCreationAndDestructionTest
ConcurrentCreationRequestsTest
EdgeProcessFailedTest

Definition at line 17 of file WebView2CoreObjectsPage.xaml.cs.

        {
            BasicCoreObjectCreationAndDestructionTest,
            ConcurrentCreationRequestsTest,
            EdgeProcessFailedTest
        };

Constructor & Destructor Documentation

WebView2CoreObjectsPage ( ) [inline]

Definition at line 43 of file WebView2CoreObjectsPage.xaml.cs.

        {
            InitializeComponent();
            _helpers = new WebView2Common(this);
            Loaded += Page_Loaded;
        }

Member Function Documentation

void AddWebViewEventHandlers ( WebView2 webview ) [inline, private]

Definition at line 115 of file WebView2CoreObjectsPage.xaml.cs.

        {
            ResetCounts();

            webview.NavigationStarting += OnNavigationStarting;
            webview.NavigationCompleted += OnNavigationCompleted;
            webview.CoreWebView2Initialized += OnCoreWebView2Initialized;
            webview.Loaded += OnLoaded;
            webview.Unloaded += OnUnloaded;
            webview.CoreProcessFailed += OnCoreProcessFailed;
        }

async void CleanupCurrentTest | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 801 of file WebView2CoreObjectsPage.xaml.cs.

        {
            // Ensure any WebViewElements are destroyed + removed from UIA tree prior to signaling test completion
            // to avoid impacting next test.
            await CleanupWebViewElements();
            CleanupResultTextBox.Text = "Cleanup completed.";
        }

async Task CleanupWebViewElements ( ) [inline, private]

Definition at line 761 of file WebView2CoreObjectsPage.xaml.cs.

        {
            RemoveAllWebViewControls();
            GC.Collect();
            await Task.Delay(3000);
        }

void OnAdd_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 290 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                WebView2_Container1.Child = _wv2_Programmatic_Offline;
            }
        }

void OnBad_Source_Browser_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 684 of file WebView2CoreObjectsPage.xaml.cs.

        {
            // Crashes the browser - recover by re-creating CoreWebView2
            OnBadSourceButtonClickedHelper("edge://inducebrowsercrashforrealz/");
        }

void OnBad_Source_Render_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 690 of file WebView2CoreObjectsPage.xaml.cs.

        {
            // Crashes the current rendering process - recover with Reload()
            OnBadSourceButtonClickedHelper("edge://crash");
        }

void OnBadSourceButtonClickedHelper ( string badUri ) [inline, private]

Definition at line 696 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_CoreProcessFailed != null)
            {
                try
                {
                    WebView2Common.NavigateToUri(_wv2_CoreProcessFailed, new Uri(badUri));
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_CoreProcessFailed.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnClose_ConcurrentCreationElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 661 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_ConcurrentCreation != null)
            {
                _wv2_ConcurrentCreation.Close();
            }
        }

void OnClose_LiveElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 421 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Live != null)
            {
                _wv2_Programmatic_Live.Close();
            }
        }

void OnClose_MarkupElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 543 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Markup != null)
            {
                _wv2_Markup.Close();
            }
        }

void OnClose_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 314 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                _wv2_Programmatic_Offline.Close();
            }
        }

void OnCoreProcessFailed | ( | object | sender,
 |  | CoreWebView2ProcessFailedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 211 of file WebView2CoreObjectsPage.xaml.cs.

        {
            var error = e.ProcessFailedKind;
            EventDetail.Text = error.ToString();

            string s = string.Format("[{0}]: Got CoreProcessFailed ({1}), ", (sender as WebView2).Name, error.ToString());
            _helpers.AppendMessage(s);
            Status2.Text = Status2.Text + " " + s;

            SetCoreProcessFailedCount(_coreProcessFailedCount + 1);
        }

void OnCoreWebView2Initialized | ( | WebView2 | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 145 of file WebView2CoreObjectsPage.xaml.cs.

        {
            SetCoreWebView2InitializedCount(_coreWebView2InitializedCount + 1);

            string s = string.Format("[{0}]: Got CoreWebView2Initialized, ", sender.Name);
            _helpers.AppendMessage(s);
            Status2.Text = Status2.Text + " " + s;
        }

async void OnCoreWebView2Initialized_Ensure | ( | WebView2 | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 161 of file WebView2CoreObjectsPage.xaml.cs.

        {
            sender.CoreWebView2Initialized -= OnCoreWebView2Initialized_Ensure; // Don't spin creation on next CWV2Initialized!
            await sender.EnsureCoreWebView2Async();
            {
                SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);

                string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", sender.Name);
                _helpers.AppendMessage(s);
                Status2.Text = Status2.Text + " " + s;
            }
        }

void OnCoreWebView2Initialized_Source | ( | WebView2 | sender,
 |  | object | args |
 | ) |  |  | [inline, private]

Definition at line 155 of file WebView2CoreObjectsPage.xaml.cs.

        {
            sender.CoreWebView2Initialized -= OnCoreWebView2Initialized_Source; // Don't spin creation on next CWV2Initialized!
            WebView2Common.NavigateToUri(sender, WebView2Common.GetTestPageUri("SimplePageWithButton.html"));
        }

void OnCreate_ConcurrentCreationElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 574 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_ConcurrentCreation != null)
            {
                RemoveWebViewEventHandlers(_wv2_ConcurrentCreation);
                _wv2_ConcurrentCreation.Close();
            }

            var myWebView = new WebView2 {
                Name = "WV2_ConcurrentCreation"
            };
            AddWebViewEventHandlers(myWebView);
            _wv2_ConcurrentCreation = myWebView;
            WebView2_Container4.Child = _wv2_ConcurrentCreation;
        }

void OnCreate_CoreProcessFailed_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 668 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_CoreProcessFailed != null)
            {
                RemoveWebViewEventHandlers(_wv2_CoreProcessFailed);
                _wv2_CoreProcessFailed.Close();
            }

            var myWebView = new WebView2 {
                Name = "WV2_CoreProcessFailed"
            };
            AddWebViewEventHandlers(myWebView);
            _wv2_CoreProcessFailed = myWebView;
            WebView2_Container5.Child = _wv2_CoreProcessFailed;
        }

void OnCreate_LiveElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 344 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Live != null)
            {
                RemoveWebViewEventHandlers(_wv2_Programmatic_Live);
                _wv2_Programmatic_Live.Close();
            }

            var myWebView = new WebView2 {
                Name = "WV2_Programmatic_Live"
            };
            AddWebViewEventHandlers(myWebView);
            _wv2_Programmatic_Live = myWebView;
            WebView2_Container2.Child = _wv2_Programmatic_Live;
        }

void OnCreate_MarkupElement_Blank_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 451 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Markup != null)
            {
                RemoveWebViewEventHandlers(_wv2_Markup);
                _wv2_Markup.Close();
            }

            var myWebView = (WebView2) XamlReader.Load(@"
                <WebView2 xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                          xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                          x:Name='WV2_Markup'/>");

            AddWebViewEventHandlers(myWebView);
            _wv2_Markup = myWebView;
            WebView2_Container3.Child = _wv2_Markup;
        }

void OnCreate_MarkupElement_Source_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 469 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Markup != null)
            {
                _wv2_Markup.Close();
                RemoveWebViewEventHandlers(_wv2_Markup);
            }

            string uriString = WebView2Common.GetTestPageUri("SimplePage.html").ToString();

            var myWebView = (WebView2) XamlReader.Load(@"
                <WebView2 xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
                          xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
                          x:Name='_wv2_Markup'
                          Source='" +  uriString + @"'/>");

            AddWebViewEventHandlers(myWebView);
            _wv2_Markup = myWebView;
            WebView2_Container3.Child = _wv2_Markup;
        }

void OnCreate_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 228 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                RemoveWebViewEventHandlers(_wv2_Programmatic_Offline);
                _wv2_Programmatic_Offline.Close();
            }

            var myWebView = new WebView2 {
                Name = "WV2_Programmatic_Offline"
            };
            AddWebViewEventHandlers(myWebView);
            _wv2_Programmatic_Offline = myWebView;
        }

async void OnEnsure_Ensure_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 634 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_ConcurrentCreation != null)
            {
                // We'll call EnsureCWV2() (#2) in this special CWV2Initialized Handler
                _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Ensure;

                // EnsureCWV2()
                await _wv2_ConcurrentCreation.EnsureCoreWebView2Async();
                {
                    SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);

                    string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_ConcurrentCreation.Name);
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

async void OnEnsure_Source_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 615 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_ConcurrentCreation != null)
            {
                // We'll set Source in this special CWV2Initialized Handler
                _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Source;

                // EnsureCWV2()
                await _wv2_ConcurrentCreation.EnsureCoreWebView2Async();
                {
                    SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);

                    string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_ConcurrentCreation.Name);
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

async void OnEnsureCoreWebView2_LiveElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 379 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Live != null)
            {
                try
                {
                    await _wv2_Programmatic_Live.EnsureCoreWebView2Async();
                    {
                        SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);

                        string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_Programmatic_Live.Name);
                        _helpers.AppendMessage(s);
                        Status2.Text = Status2.Text + " " + s;
                    }
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Live.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

async void OnEnsureCoreWebView2_MarkupElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 509 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Markup != null)
            {
                try
                {
                    await _wv2_Markup.EnsureCoreWebView2Async();
                    {
                        SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);

                        string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_Markup.Name);
                        _helpers.AppendMessage(s);
                        Status2.Text = Status2.Text + " " + s;
                    }
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Markup.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

async void OnEnsureCoreWebView2_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 263 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                try
                {
                    await _wv2_Programmatic_Offline.EnsureCoreWebView2Async();
                    {
                        SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);

                        string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_Programmatic_Offline.Name);
                        _helpers.AppendMessage(s);
                        Status2.Text = Status2.Text + " " + s;
                    }
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Offline.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }

            }
        }

void OnGood_Source_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 715 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_CoreProcessFailed != null)
            {
                try
                {
                    WebView2Common.NavigateToUri(_wv2_CoreProcessFailed, WebView2Common.GetTestPageUri("SimplePage.html"));
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_CoreProcessFailed.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 193 of file WebView2CoreObjectsPage.xaml.cs.

        {
            SetLoadedCount(_loadedCount + 1);

            string s = string.Format("[{0}]: Got Loaded, ", (sender as WebView2).Name);
            _helpers.AppendMessage(s);
            Status2.Text = Status2.Text + " " + s;
        }

override void OnNavigatingFrom ( NavigatingCancelEventArgs e ) [inline, protected]

Definition at line 809 of file WebView2CoreObjectsPage.xaml.cs.

        {
            // For test stability, webviews should be fully cleaned up before we leave the test page.
            Debug.Assert(_areWebviewElementsCleanedUp);
        }

void OnNavigationCompleted | ( | WebView2 | sender,
 |  | CoreWebView2NavigationCompletedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 184 of file WebView2CoreObjectsPage.xaml.cs.

        {
            SetNavigationCompletedCount(_navigationCompletedCount + 1);

            string s = string.Format("[{0}]: Got NavigationcOompleted, ", sender.Name);
            _helpers.AppendMessage(s);
            Status2.Text = Status2.Text + " " + s;
        }

void OnNavigationStarting | ( | WebView2 | sender,
 |  | CoreWebView2NavigationStartingEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 174 of file WebView2CoreObjectsPage.xaml.cs.

        {
            SetNavigationStartingCount(_navigationStartingCount + 1);

            string s = string.Format("[{0}]: Got NavigationStarting ({1}), ", sender.Name, args.Uri);
            _helpers.AppendMessage(s);
            Status1.Text = s;
            Status3.Text = args.Uri;
        }

void OnReleaseReference_LiveElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 413 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Live != null)
            {
                _wv2_Programmatic_Live = null;
            }
        }

void OnReleaseReference_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 306 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                _wv2_Programmatic_Offline = null;
            }
        }

void OnReloadButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline, private]

Definition at line 734 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_CoreProcessFailed != null)
            {
                try
                {
                    _wv2_CoreProcessFailed.Reload();
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_CoreProcessFailed.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnRemove_ConcurrentCreationElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 653 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_ConcurrentCreation != null)
            {
                WebView2_Container4.Child = null;
            }
        }

void OnRemove_LiveElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 405 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Live != null)
            {
                WebView2_Container2.Child = null;
            }
        }

void OnRemove_MarkupElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 535 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Markup != null)
            {
                WebView2_Container3.Child = null;
            }
        }

void OnRemove_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 298 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                WebView2_Container1.Child = null;
            }
        }

void OnResetCounts_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 223 of file WebView2CoreObjectsPage.xaml.cs.

        {
            ResetCounts();
        }

void OnSetCustomSource_LiveElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 429 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Live != null)
            {
                try
                {
                    Uri newUri;
                    string newUriString = CustomSource_UriTextBox.Text;
                    Uri.TryCreate(newUriString, UriKind.RelativeOrAbsolute, out newUri);
                    _wv2_Programmatic_Live.Source = newUri;
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Live.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnSetCustomSource_MarkupElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 551 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Markup != null)
            {
                try
                {
                    Uri newUri;
                    string newUriString = CustomSource_UriTextBox.Text;
                    Uri.TryCreate(newUriString, UriKind.RelativeOrAbsolute, out newUri);
                    _wv2_Markup.Source = newUri;
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Markup.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnSetCustomSource_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 322 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                try
                {
                    Uri newUri;
                    string newUriString = CustomSource_UriTextBox.Text;
                    Uri.TryCreate(newUriString, UriKind.RelativeOrAbsolute, out newUri);
                    _wv2_Programmatic_Offline.Source = newUri;
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Offline.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnSetSource_LiveElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 360 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Live != null)
            {
                try
                {
                    WebView2Common.NavigateToUri(_wv2_Programmatic_Live, WebView2Common.GetTestPageUri("SimplePage.html"));
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Live.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnSetSource_MarkupElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 490 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Markup != null)
            {
                try
                {
                    WebView2Common.NavigateToUri(_wv2_Markup, WebView2Common.GetTestPageUri("SimplePage.html"));
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Markup.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnSetSource_OfflineElement_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 243 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                try
                {
                    Uri newUri = WebView2Common.GetTestPageUri("SimplePage.html");
                    _wv2_Programmatic_Offline.Source = newUri;
                }
                catch (Exception e)
                {
                    SetClosedExceptionCount(_closedExceptionCount + 1);

                    string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Offline.Name, e.ToString());
                    _helpers.AppendMessage(s);
                    Status2.Text = Status2.Text + " " + s;
                }
            }
        }

void OnSource_Ensure_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 603 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_ConcurrentCreation != null)
            {
                // We'll call EnsureCWV2() in this special CWV2Initialized Handler
                _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Ensure;

                // Set Source #1
                WebView2Common.NavigateToUri(_wv2_ConcurrentCreation, WebView2Common.GetTestPageUri("SimplePage.html"));
            }
        }

void OnSource_Source_ButtonClicked | ( | object | sender,
 |  | RoutedEventArgs | args |
 | ) |  |  | [inline]

Definition at line 591 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_ConcurrentCreation != null)
            {
                // We'll set Source #2 in this special CWV2Initialized Handler
                _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Source;

                // Set Source #1 and attach  special CoreWebView2Initialized handler to apply Source #2 at that time
                WebView2Common.NavigateToUri(_wv2_ConcurrentCreation, WebView2Common.GetTestPageUri("SimplePage.html"));
            }
        }

void OnUnloaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 202 of file WebView2CoreObjectsPage.xaml.cs.

        {
            SetUnloadedCount(_unloadedCount + 1);

            string s = string.Format("[{0}]: Got Unloaded, ", (sender as WebView2).Name);
            _helpers.AppendMessage(s);
            Status2.Text = Status2.Text + " " + s;
        }

void Page_Loaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 50 of file WebView2CoreObjectsPage.xaml.cs.

        {
            _helpers.ClearStatus();
            _helpers.CopyTestPagesLocally();
        }

void RemoveAllWebViewControls ( ) [inline, private]

Definition at line 768 of file WebView2CoreObjectsPage.xaml.cs.

        {
            if (_wv2_Programmatic_Offline != null)
            {
                RemoveWebViewEventHandlers(_wv2_Programmatic_Offline);
                _wv2_Programmatic_Offline.Close();
                WebView2_Container1.Child = null;
            }

            if (_wv2_Programmatic_Live != null)
            {
                RemoveWebViewEventHandlers(_wv2_Programmatic_Live);
                _wv2_Programmatic_Live.Close();
                WebView2_Container2.Child = null;
            }

            if (_wv2_Markup != null)
            {
                RemoveWebViewEventHandlers(_wv2_Markup);
                _wv2_Markup.Close();
                WebView2_Container3.Child = null;
            }

            if (_wv2_ConcurrentCreation != null)
            {
                RemoveWebViewEventHandlers(_wv2_ConcurrentCreation);
                _wv2_ConcurrentCreation.Close();
                WebView2_Container4.Child = null;
            }

            _areWebviewElementsCleanedUp = true;
        }

void RemoveWebViewEventHandlers ( WebView2 webview ) [inline, private]

Definition at line 127 of file WebView2CoreObjectsPage.xaml.cs.

        {
            ResetCounts();

            webview.NavigationStarting -= OnNavigationStarting;
            webview.NavigationCompleted -= OnNavigationCompleted;
            webview.CoreWebView2Initialized -= OnCoreWebView2Initialized;
            webview.Loaded -= OnLoaded;
            webview.Unloaded -= OnUnloaded;
            webview.CoreProcessFailed -= OnCoreProcessFailed;
        }

void ResetCounts ( ) [inline, private]

Definition at line 103 of file WebView2CoreObjectsPage.xaml.cs.

        {
            SetCoreWebView2InitializedCount(0);
            SetEnsureCoreWebView2CompletionCount(0);
            SetNavigationStartingCount(0);
            SetNavigationCompletedCount(0);
            SetLoadedCount(0);
            SetUnloadedCount(0);
            SetClosedExceptionCount(0);
            SetCoreProcessFailedCount(0);
        }

void SetClosedExceptionCount ( int value ) [inline, private]

Definition at line 91 of file WebView2CoreObjectsPage.xaml.cs.

        {
            ClosedExceptionCount.Text = value.ToString();
            _closedExceptionCount = value;
        }

void SetCoreProcessFailedCount ( int value ) [inline, private]

Definition at line 97 of file WebView2CoreObjectsPage.xaml.cs.

        {
            CoreProcessFailedCount.Text = value.ToString();
            _coreProcessFailedCount = value;
        }

void SetCoreWebView2InitializedCount ( int value ) [inline, private]

Definition at line 56 of file WebView2CoreObjectsPage.xaml.cs.

        {
            CoreWebView2InitializedCount.Text = value.ToString();
            _coreWebView2InitializedCount = value;
        }

void SetEnsureCoreWebView2CompletionCount ( int value ) [inline, private]

Definition at line 61 of file WebView2CoreObjectsPage.xaml.cs.

        {
            EnsureCoreWebView2CompletionCount.Text = value.ToString();
            _ensureCoreWebView2CompletionCount = value;
        }

void SetLoadedCount ( int value ) [inline, private]

Definition at line 79 of file WebView2CoreObjectsPage.xaml.cs.

        {
            LoadedCount.Text = value.ToString();
            _loadedCount = value;
        }

void SetNavigationCompletedCount ( int value ) [inline, private]

Definition at line 73 of file WebView2CoreObjectsPage.xaml.cs.

        {
            NavigationCompletedCount.Text = value.ToString();
            _navigationCompletedCount = value;
        }

void SetNavigationStartingCount ( int value ) [inline, private]

Definition at line 67 of file WebView2CoreObjectsPage.xaml.cs.

        {
            NavigationStartingCount.Text = value.ToString();
            _navigationStartingCount = value;
        }

void SetUnloadedCount ( int value ) [inline, private]

Definition at line 85 of file WebView2CoreObjectsPage.xaml.cs.

        {
            UnloadedCount.Text = value.ToString();
            _unloadedCount = value;
        }

void TestNameComboBox_SelectionChanged | ( | object | sender,
 |  | SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 139 of file WebView2CoreObjectsPage.xaml.cs.

        {
            // TestList test = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
            // Nothing needed per test?
        }

Member Data Documentation

bool _areWebviewElementsCleanedUp = false [private]

Definition at line 41 of file WebView2CoreObjectsPage.xaml.cs.

int _closedExceptionCount = 0 [private]

Definition at line 38 of file WebView2CoreObjectsPage.xaml.cs.

int _coreProcessFailedCount = 0 [private]

Definition at line 39 of file WebView2CoreObjectsPage.xaml.cs.

int _coreWebView2InitializedCount = 0 [private]

Definition at line 32 of file WebView2CoreObjectsPage.xaml.cs.

int _ensureCoreWebView2CompletionCount = 0 [private]

Definition at line 33 of file WebView2CoreObjectsPage.xaml.cs.

readonly WebView2Common _helpers [private]

Definition at line 22 of file WebView2CoreObjectsPage.xaml.cs.

int _loadedCount = 0 [private]

Definition at line 36 of file WebView2CoreObjectsPage.xaml.cs.

int _navigationCompletedCount = 0 [private]

Definition at line 35 of file WebView2CoreObjectsPage.xaml.cs.

int _navigationStartingCount = 0 [private]

Definition at line 34 of file WebView2CoreObjectsPage.xaml.cs.

int _unloadedCount = 0 [private]

Definition at line 37 of file WebView2CoreObjectsPage.xaml.cs.

WebView2 _wv2_ConcurrentCreation [private]

Definition at line 28 of file WebView2CoreObjectsPage.xaml.cs.

WebView2 _wv2_CoreProcessFailed [private]

Definition at line 30 of file WebView2CoreObjectsPage.xaml.cs.

WebView2 _wv2_Markup [private]

Definition at line 27 of file WebView2CoreObjectsPage.xaml.cs.

WebView2 _wv2_Programmatic_Live [private]

Definition at line 26 of file WebView2CoreObjectsPage.xaml.cs.

WebView2 _wv2_Programmatic_Offline [private]

Definition at line 25 of file WebView2CoreObjectsPage.xaml.cs.

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2CoreObjectsPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2Page Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • WebView2Page
Public Member Functions

WebView2Page Class Reference

List of all members.

Public Member Functions

WebView2Page ()

Detailed Description

Definition at line 9 of file WebView2Page.xaml.cs.

Constructor & Destructor Documentation

WebView2Page ( ) [inline]

Definition at line 11 of file WebView2Page.xaml.cs.

        {
            InitializeComponent();

            navigateToBasicWebView2.Click += delegate { Frame.NavigateWithoutAnimation(typeof(WebView2BasicPage), 0); };
            navigateToCoreObjectsWebView2.Click += delegate { Frame.NavigateWithoutAnimation(typeof(WebView2CoreObjectsPage), 0); };
        }

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2Page.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2WithCursor Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • WebView2WithCursor
Public Attributes

WebView2WithCursor Class Reference

Inherits Microsoft::UI::Xaml::Controls::WebView2.

List of all members.

Public Attributes

Microsoft.UI.Input.InputCursor WrappedProtectedCursor = > this.ProtectedCursor

Detailed Description

Definition at line 128 of file WebView2BasicPage.xaml.cs.

Member Data Documentation

Microsoft.UI.Input.InputCursor WrappedProtectedCursor = > this.ProtectedCursor

Definition at line 130 of file WebView2BasicPage.xaml.cs.

The documentation for this class was generated from the following file:
  • WebView2/TestUI/WebView2BasicPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WindowPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • MUXControlsTestApp
  • WindowPage
Public Member Functions | Private Member Functions

WindowPage Class Reference

List of all members.

Public Member Functions

WindowPage ()

Private Member Functions

void | BtnOpenNewMainPage_Click (object sender, RoutedEventArgs e)
void | BtnOpenNewWindowRootPage_Click (object sender, RoutedEventArgs e)

Detailed Description

Definition at line 10 of file WindowPage.xaml.cs.

Constructor & Destructor Documentation

WindowPage ( ) [inline]

Definition at line 12 of file WindowPage.xaml.cs.

        {
            this.InitializeComponent();
        }

Member Function Documentation

void BtnOpenNewMainPage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 26 of file WindowPage.xaml.cs.

        {
            Window newWindow = new Window() { Title = "MUXControlsTestApp.Desktop - Secondary MainPage" };
            TestFrame rootFrame = new TestFrame(typeof(MainPage));
            newWindow.Content = rootFrame;
            rootFrame.NavigateWithoutAnimation(typeof(MainPage));
            newWindow.Activate();
        }

void BtnOpenNewWindowRootPage_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 17 of file WindowPage.xaml.cs.

        {
            Window newWindow = new Window() { Title = "MUXControlsTestApp.Desktop - Secondary NewWindowRootPage" };
            TestFrame rootFrame = new TestFrame(typeof(NewWindowRootPage));
            newWindow.Content = rootFrame;
            rootFrame.NavigateWithoutAnimation(typeof(NewWindowRootPage));
            newWindow.Activate();
        }

The documentation for this class was generated from the following file:
  • CommonStyles/TestUI/WindowPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

MUXControlsTestHooks Class Reference

#include "MUXControlsTestHooks.h"

List of all members.

Public Member Functions

winrt::event_token | BuildTreeCompletedImpl (winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value)
void | BuildTreeCompletedImpl (winrt::event_token const &token)
UCHAR | GetLoggingLevelForInstance (const winrt::IInspectable &sender)
UCHAR | GetLoggingLevelForType (const wstring_view &type)
void | LoggingMessageImpl (winrt::event_token const &token)
winrt::event_token | LoggingMessageImpl (winrt::TypedEventHandler< winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs > const &value)
void | LogMessage (const winrt::IInspectable &sender, const wstring_view &message, bool isVerboseLevel)
void | NotifyBuildTreeCompletedImpl ()
void | SetLoggingLevelForInstanceImpl (const winrt::IInspectable &sender, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)
void | SetLoggingLevelForTypeImpl (const wstring_view &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)
void | SetOutputDebugStringLevelForTypeImpl (const wstring_view &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)

Static Public Member Functions

static winrt::event_token | BuildTreeCompleted (winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value)
static void | BuildTreeCompleted (winrt::event_token const &token)
static com_ptr
< MUXControlsTestHooks > 		GetGlobalTestHooks ()
static winrt::event_token | LoggingMessage (winrt::TypedEventHandler< winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs > const &value)
static void | LoggingMessage (winrt::event_token const &token)
static void | NotifyBuildTreeCompleted ()
static void | SetLoggingLevelForInstance (winrt::IInspectable const &sender, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)
static void | SetLoggingLevelForType (winrt::hstring const &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)
static void | SetOutputDebugStringLevelForType (winrt::hstring const &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)

Static Private Member Functions

static void | EnsureHooks ()

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::IInspectable,
winrt::IInspectable > > 		m_buildTreeCompleted
std::map< winrt::IInspectable,
UCHAR > 		m_instanceLoggingLevels
winrt::event
< winrt::TypedEventHandler
< winrt::IInspectable,
winrt::MUXControlsTestHooksLoggingMessageEventArgs > > 		m_loggingMessageEventSource
std::map< std::wstring, UCHAR,
std::less<> > 		m_typeLoggingLevels

Static Private Attributes

static MUXControlsTestHooks * | s_testHooks

Detailed Description

Definition at line 14 of file MUXControlsTestHooks.h.

Member Function Documentation

static winrt::event_token BuildTreeCompleted ( winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const & value ) [static]
static void BuildTreeCompleted ( winrt::event_token const & token ) [static]
winrt::event_token BuildTreeCompletedImpl ( winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const & value )
void BuildTreeCompletedImpl ( winrt::event_token const & token )
static void EnsureHooks ( ) [static, private]
static com_ptr<MUXControlsTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 30 of file MUXControlsTestHooks.h.

    {
        return s_testHooks->get_strong();
    }

UCHAR GetLoggingLevelForInstance ( const winrt::IInspectable & sender )
UCHAR GetLoggingLevelForType ( const wstring_view & type )
static winrt::event_token LoggingMessage ( winrt::TypedEventHandler< winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs > const & value ) [static]
static void LoggingMessage ( winrt::event_token const & token ) [static]
void LoggingMessageImpl ( winrt::event_token const & token )
winrt::event_token LoggingMessageImpl ( winrt::TypedEventHandler< winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs > const & value )
void LogMessage | ( | const winrt::IInspectable & | sender,
 |  | const wstring_view & | message,
 |  | bool | isVerboseLevel
 | ) |  |
static void NotifyBuildTreeCompleted ( ) [static]
void NotifyBuildTreeCompletedImpl ( )
static void SetLoggingLevelForInstance | ( | winrt::IInspectable const & | sender,
 |  | bool | isLoggingInfoLevel,
 |  | bool | isLoggingVerboseLevel |
 | ) |  |  | [static]
void SetLoggingLevelForInstanceImpl | ( | const winrt::IInspectable & | sender,
 |  | bool | isLoggingInfoLevel,
 |  | bool | isLoggingVerboseLevel
 | ) |  |
static void SetLoggingLevelForType | ( | winrt::hstring const & | type,
 |  | bool | isLoggingInfoLevel,
 |  | bool | isLoggingVerboseLevel |
 | ) |  |  | [static]
void SetLoggingLevelForTypeImpl | ( | const wstring_view & | type,
 |  | bool | isLoggingInfoLevel,
 |  | bool | isLoggingVerboseLevel
 | ) |  |
static void SetOutputDebugStringLevelForType | ( | winrt::hstring const & | type,
 |  | bool | isLoggingInfoLevel,
 |  | bool | isLoggingVerboseLevel |
 | ) |  |  | [static]
void SetOutputDebugStringLevelForTypeImpl | ( | const wstring_view & | type,
 |  | bool | isLoggingInfoLevel,
 |  | bool | isLoggingVerboseLevel
 | ) |  |

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> > m_buildTreeCompleted [private]

Definition at line 55 of file MUXControlsTestHooks.h.

std::map<winrt::IInspectable , UCHAR > m_instanceLoggingLevels [private]

Definition at line 54 of file MUXControlsTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs> > m_loggingMessageEventSource [private]

Definition at line 52 of file MUXControlsTestHooks.h.

std::map<std::wstring , UCHAR , std::less<> > m_typeLoggingLevels [private]

Definition at line 53 of file MUXControlsTestHooks.h.

MUXControlsTestHooks* s_testHooks [static, private]

Definition at line 47 of file MUXControlsTestHooks.h.

The documentation for this class was generated from the following file:
  • TestHooks/MUXControlsTestHooks.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestHooksLoggingMessageEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

MUXControlsTestHooksLoggingMessageEventArgs Class Reference

#include "MUXControlsTestHooksLoggingMessageEventArgs.h"

List of all members.

Public Member Functions

bool | IsVerboseLevel ()
winrt::hstring | Message ()
void | SetIsVerboseLevel (bool isVerboseLevel)
void | SetMessage (const wstring_view &message)

Detailed Description

Definition at line 8 of file MUXControlsTestHooksLoggingMessageEventArgs.h.

Member Function Documentation

bool IsVerboseLevel ( )
winrt::hstring Message ( )
void SetIsVerboseLevel ( bool isVerboseLevel )
void SetMessage ( const wstring_view & message )
The documentation for this class was generated from the following file:
  • TestHooks/MUXControlsTestHooksLoggingMessageEventArgs.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

NavigationView Class Reference

#include "NavigationView.h"

Inherits ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT >, and NavigationViewProperties.

List of all members.

Public Member Functions

NavigationView ()
virtual | ~NavigationView ()
void | CoerceToGreaterThanZero (double &value)
void | Collapse (const winrt::NavigationViewItem &item)
winrt::DependencyObject | ContainerFromMenuItem (winrt::IInspectable const &item)
void | Expand (const winrt::NavigationViewItem &item)
winrt::UIElement | FindSelectionIndicator (const winrt::IInspectable &item)
template<typename T >
T | GetContainerForData (const winrt::IInspectable &data)
winrt::IndexPath | GetIndexPathForContainer (const winrt::NavigationViewItemBase &nvib)
int | GetNavigationViewItemCountInPrimaryList ()
int | GetNavigationViewItemCountInTopNav ()
com_ptr
< NavigationViewItemsFactory > 		GetNavigationViewItemsFactory ()
winrt::ItemsRepeater | GetParentItemsRepeaterForContainer (const winrt::NavigationViewItemBase &nvib)
winrt::ItemsRepeater | GetParentRootItemsRepeaterForContainer (const winrt::NavigationViewItemBase &nvib)
winrt::NavigationViewItem | GetSelectedContainer ()
winrt::SplitView | GetSplitView ()
TopNavigationViewDataProvider & GetTopDataProvider ()
bool | IsFullScreenOrTabletMode ()
winrt::ItemsRepeater | LeftNavRepeater ()
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
winrt::IInspectable | MenuItemFromContainer (winrt::DependencyObject const &container)
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnKeyDown (winrt::KeyRoutedEventArgs const &args)
void | OnLoaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnNavigationViewItemClicked (const winrt::NavigationViewItem &sender)
void | OnNavigationViewItemInvoked (const winrt::NavigationViewItem &nvi)
void | OnPreviewKeyDown (winrt::KeyRoutedEventArgs const &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnRepeaterElementClearing (const winrt::ItemsRepeater &ir, const winrt::ItemsRepeaterElementClearingEventArgs &args)
void | OnRepeaterElementPrepared (const winrt::ItemsRepeater &ir, const winrt::ItemsRepeaterElementPreparedEventArgs &args)
void | OnRepeaterLoaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnSettingsInvoked ()
void | OnTopNavDataSourceChanged (winrt::NotifyCollectionChangedEventArgs const &args)
void | OnUnloaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | TopNavigationViewItemContentChanged ()

Static Public Member Functions

static void | CreateAndAttachHeaderAnimation (const winrt::Visual &visual)

Private Member Functions

void | AnimateSelectionChanged (const winrt::IInspectable &currentItem)
void | AnimateSelectionChangedToItem (const winrt::IInspectable &selectedItem)
void | ApplyCustomMenuItemContainerStyling (const winrt::NavigationViewItemBase &nvib, const winrt::ItemsRepeater &ir, int index)
void | ArrangeTopNavItems (winrt::Size const &availableSize)
bool | AttemptClosePaneLightly ()
bool | BumperNavigation (int offset)
void | ChangeIsExpandedNavigationViewItem (const winrt::NavigationViewItem &nvi, bool isExpanded)
void | ChangeSelection (const winrt::IInspectable &prevItem, const winrt::IInspectable &nextItem)
void | ChangeSelectStatusForItem (winrt::IInspectable const &item, bool selected)
void | ClearAllNavigationViewItemBaseRevokers () noexcept
void | ClearNavigationViewItemBaseRevokers (const winrt::NavigationViewItemBase &nvib)
void | CloseFlyoutIfRequired (const winrt::NavigationViewItem &selectedItem)
void | ClosePane ()
void | ClosePaneIfNeccessaryAfterItemIsClicked (const winrt::NavigationViewItem &selectedItem)
void | CloseTopNavigationViewFlyout ()
void | CompletePendingSelectionChange ()
void | CreateAndHookEventsToSettings ()
winrt::NavigationTransitionInfo | CreateNavigationTransitionInfo (NavigationRecommendedTransitionDirection recommendedTransitionDirection)
bool | DoesNavigationViewItemHaveChildren (const winrt::NavigationViewItem &nvi)
bool | DoesRepeaterHaveRealizedContainers (const winrt::ItemsRepeater &ir)
winrt::NavigationViewItem | FindLowestLevelContainerToDisplaySelectionIndicator ()
std::vector< int > | FindMovableItemsBeyondAvailableWidth (float availableWidth)
std::vector< int > | FindMovableItemsRecoverToPrimaryList (float availableWidth, std::vector< int > const &includeItems)
std::vector< int > | FindMovableItemsToBeRemovedFromPrimaryList (float widthToBeRemoved, std::vector< int > const &excludeItems)
void | FocusNextDownItem (const winrt::NavigationViewItem &nvi, const winrt::KeyRoutedEventArgs &args)
void | FocusNextUpItem (const winrt::NavigationViewItem &nvi, const winrt::KeyRoutedEventArgs &args)
winrt::IInspectable | GetChildren (const winrt::NavigationViewItem &nvi)
winrt::IInspectable | GetChildrenForItemInIndexPath (const winrt::UIElement &firstContainer, const winrt::IndexPath &ip, bool forceRealize=false)
winrt::IInspectable | GetChildrenForItemInIndexPath (const winrt::IndexPath &ip, bool forceRealize=false)
winrt::ItemsRepeater | GetChildRepeaterForIndexPath (const winrt::IndexPath &ip)
int | GetContainerCountInRepeater (const winrt::ItemsRepeater &ir)
template<typename T >
T | GetContainerForData (const winrt::IInspectable &data)
winrt::UIElement | GetContainerForIndex (int index, bool inFooter)
winrt::NavigationViewItemBase | GetContainerForIndexPath (const winrt::IndexPath &ip, bool lastVisible=false, bool forceRealize=false)
winrt::NavigationViewItemBase | GetContainerForIndexPath (const winrt::UIElement &firstContainer, const winrt::IndexPath &ip, bool lastVisible, bool forceRealize)
int | GetIndexFromItem (const winrt::ItemsRepeater &ir, const winrt::IInspectable &data)
winrt::IndexPath | GetIndexPathOfItem (const winrt::IInspectable &data)
double | GetPaneToggleButtonHeight ()
double | GetPaneToggleButtonWidth ()
winrt::NavigationViewItem | GetParentNavigationViewItemForContainer (const winrt::NavigationViewItemBase &nvib)
NavigationRecommendedTransitionDirection | GetRecommendedTransitionDirection (winrt::DependencyObject const &prev, winrt::DependencyObject const &next)
int | GetSelectedItemIndex ()
NavigationViewTemplateSettings * GetTemplateSettings ()
float | GetTopNavigationViewActualWidth ()
NavigationViewVisualStateDisplayMode | GetVisualStateDisplayMode (const winrt::NavigationViewDisplayMode &displayMode)
void | HandleKeyEventForNavigationViewItem (const winrt::NavigationViewItem &nvi, const winrt::KeyRoutedEventArgs &args)
void | HandleTopNavigationMeasureOverride (winrt::Size const &availableSize)
void | HandleTopNavigationMeasureOverrideNormal (const winrt::Windows::Foundation::Size &availableSize)
void | HandleTopNavigationMeasureOverrideOverflow (const winrt::Windows::Foundation::Size &availableSize)
bool | HasTopNavigationViewItemNotInPrimaryList ()
void | InvalidateTopNavPrimaryLayout ()
bool | IsContainerTheSelectedItemInTheSelectionModel (const winrt::NavigationViewItemBase &nvib)
bool | IsLightDismissible ()
bool | IsNavigationViewListSingleSelectionFollowsFocus ()
bool | IsOverlay ()
bool | IsRootGridOfFlyout (const winrt::DependencyObject &element)
bool | IsRootItemsRepeater (const winrt::DependencyObject &element)
bool | IsSelectionSuppressed (const winrt::IInspectable &item)
bool | IsSettingsItem (winrt::IInspectable const &item)
bool | IsTopLevelItem (const winrt::NavigationViewItemBase &nvib)
bool | IsTopNavigationView ()
bool | IsTopPrimaryListVisible ()
bool | IsVisible (const winrt::DependencyObject &obj)
void | KeepAtLeastOneItemInPrimaryList (std::vector< int > &itemInPrimaryToBeRemoved, bool shouldKeepFirst)
void | KeyboardFocusFirstItemFromItem (const winrt::NavigationViewItemBase &nvib)
void | KeyboardFocusLastItemFromItem (const winrt::NavigationViewItemBase &nvib)
float | MeasureTopNavigationViewDesiredWidth (winrt::Size const &availableSize)
float | MeasureTopNavMenuItemsHostDesiredWidth (winrt::Size const &availableSize)
winrt::NavigationViewItemBase | NavigationViewItemBaseOrSettingsContentFromData (const winrt::IInspectable &data)
winrt::NavigationViewItem | NavigationViewItemOrSettingsContentFromData (const winrt::IInspectable &data)
bool | NeedRearrangeOfTopElementsAfterOverflowSelectionChanged (int selectedOriginalIndex)
bool | NeedTopPaddingForRS5OrHigher (winrt::CoreApplicationViewTitleBar const &coreTitleBar)
void | OnAccessKeyInvoked (winrt::IInspectable const &sender, winrt::AccessKeyInvokedEventArgs const &args)
void | OnAnimationComplete (const winrt::IInspectable &sender, const winrt::CompositionBatchCompletedEventArgs &args)
void | OnAutoSuggestBoxQuerySubmitted (const winrt::AutoSuggestBox &sender, const winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs &args)
void | OnBackButtonClicked (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnFlyoutClosing (const winrt::IInspectable &sender, const winrt::FlyoutBaseClosingEventArgs &args)
void | OnFooterItemsSourceCollectionChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnIsPaneOpenChanged ()
void | OnItemsContainerSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnLayoutUpdated (const winrt::IInspectable &sender, const winrt::IInspectable &e)
void | OnMenuItemsSourceCollectionChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnNavigationViewItemBaseVisibilityPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnNavigationViewItemExpandedPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnNavigationViewItemIsSelectedPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnNavigationViewItemKeyDown (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | OnNavigationViewItemOnGotFocus (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &e)
void | OnOverflowItemsSourceCollectionChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnPaneSearchButtonClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnPaneTitleHolderSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnPaneToggleButtonClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnRepeaterGettingFocus (const winrt::IInspectable &sender, const winrt::GettingFocusEventArgs &args)
void | OnSelectedItemLayoutUpdated (const winrt::IInspectable &sender, const winrt::IInspectable &obj)
void | OnSelectedItemPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnSelectionModelChildrenRequested (const winrt::SelectionModel &selectionModel, const winrt::SelectionModelChildrenRequestedEventArgs &e)
void | OnSelectionModelSelectionChanged (const winrt::SelectionModel &selectionModel, const winrt::SelectionModelSelectionChangedEventArgs &e)
void | OnSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnSplitViewClosedCompactChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnSplitViewPaneClosed (const winrt::DependencyObject &sender, const winrt::IInspectable &obj)
void | OnSplitViewPaneClosing (const winrt::DependencyObject &sender, const winrt::SplitViewPaneClosingEventArgs &args)
void | OnSplitViewPaneOpened (const winrt::DependencyObject &sender, const winrt::IInspectable &obj)
void | OnSplitViewPaneOpening (const winrt::DependencyObject &sender, const winrt::IInspectable &obj)
void | OnTitleBarIsVisibleChanged (const winrt::CoreApplicationViewTitleBar &sender, const winrt::IInspectable &args)
void | OnTitleBarMetricsChanged (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OpenPane ()
void | PlayIndicatorAnimations (const winrt::UIElement &indicator, float yFrom, float yTo, winrt::Size beginSize, winrt::Size endSize, bool isOutgoing)
void | PlayIndicatorNonSameLevelAnimations (const winrt::UIElement &indicator, bool isOutgoing, bool fromTop)
void | PlayIndicatorNonSameLevelTopPrimaryAnimation (const winrt::UIElement &indicator, bool isOutgoing)
void | RaiseCollapsedEvent (const winrt::NavigationViewItemBase &container)
void | RaiseDisplayModeChanged (const winrt::NavigationViewDisplayMode &displayMode)
void | RaiseExpandingEvent (const winrt::NavigationViewItemBase &container)
void | RaiseItemInvoked (winrt::IInspectable const &item, bool isSettings, winrt::NavigationViewItemBase const &container=nullptr, NavigationRecommendedTransitionDirection recommendedDirection=NavigationRecommendedTransitionDirection::Default)
void | RaiseItemInvokedForNavigationViewItem (const winrt::NavigationViewItem &nvi)
void | RaiseSelectionChangedEvent (winrt::IInspectable const &nextItem, bool isSettingsItem, NavigationRecommendedTransitionDirection recommendedDirection=NavigationRecommendedTransitionDirection::Default)
void | RecycleContainer (const winrt::UIElement &container)
void | ResetAndRearrangeTopNavItems (winrt::Size const &availableSize)
void | ResetElementAnimationProperties (const winrt::UIElement &element, float desiredOpacity)
winrt::NavigationViewItemBase | ResolveContainerForItem (const winrt::IInspectable &item)
void | RevokeNavigationViewItemBaseRevokers (const winrt::NavigationViewItemBase &nvib)
winrt::UIElement | SearchEntireTreeForContainer (const winrt::ItemsRepeater &rootRepeater, const winrt::IInspectable &data)
winrt::IndexPath | SearchEntireTreeForIndexPath (const winrt::ItemsRepeater &rootRepeater, const winrt::IInspectable &data, bool isFooterRepeater)
winrt::IndexPath | SearchEntireTreeForIndexPath (const winrt::NavigationViewItem &parentContainer, const winrt::IInspectable &data, const winrt::IndexPath &ip)
void | SelectandMoveOverflowItem (winrt::IInspectable const &selectedItem, winrt::IndexPath const &selectedIndex, bool closeFlyout)
void | SelectOverflowItem (winrt::IInspectable const &item, winrt::IndexPath const &ip)
bool | SelectSelectableItemWithOffset (int startIndex, int offset, winrt::ItemsRepeater const &repeater, int repeaterCollectionSize)
void | SetDisplayMode (const winrt::NavigationViewDisplayMode &displayMode, bool forceSetDisplayMode=false)
void | SetDropShadow ()
void | SetNavigationViewItemBaseRevokers (const winrt::NavigationViewItemBase &nvib)
void | SetNavigationViewItemRevokers (const winrt::NavigationViewItem &nvi)
void | SetOverflowButtonVisibility (winrt::Visibility const &visibility)
std::function< void()> | SetPaneTitleFrameworkElementParent (const winrt::ContentControl &parent, const winrt::FrameworkElement &paneTitle, bool shouldNotContainPaneTitle)
void | SetPaneToggleButtonAutomationName ()
void | SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI (winrt::IInspectable const &item)
void | ShadowCasterEaseOutStoryboard_Completed (const winrt::Grid &shadowCaster)
bool | ShouldShowBackButton ()
bool | ShouldShowBackOrCloseButton ()
bool | ShouldShowCloseButton ()
void | ShowHideChildrenItemsRepeater (const winrt::NavigationViewItem &nvi)
void | ShrinkTopNavigationSize (float desiredWidth, winrt::Size const &availableSize)
void | SwapPaneHeaderContent (tracker_ref< winrt::ContentControl > newParent, tracker_ref< winrt::ContentControl > oldParent, winrt::hstring const &propertyPathName)
void | SyncItemTemplates ()
void | ToggleIsExpandedNavigationViewItem (const winrt::NavigationViewItem &nvi)
void | UndoSelectionAndRevertSelectionTo (winrt::IInspectable const &prevSelectedItem, winrt::IInspectable const &nextItem)
void | UnhookEventsAndClearFields (bool isFromDestructor=false)
void | UnselectPrevItem (winrt::IInspectable const &prevItem, winrt::IInspectable const &nextItem)
void | UnsetDropShadow ()
void | UpdateAdaptiveLayout (double width, bool forceSetDisplayMode=false)
void | UpdateBackAndCloseButtonsVisibility ()
void | UpdateContentBindingsForPaneDisplayMode ()
void | UpdateFooterRepeaterItemsSource (bool sourceCollectionReseted, bool sourceCollectionChanged)
void | UpdateHeaderVisibility ()
void | UpdateHeaderVisibility (winrt::NavigationViewDisplayMode displayMode)
void | UpdateIsChildSelected (const winrt::IndexPath &prevIP, const winrt::IndexPath &nextIP)
void | UpdateIsChildSelectedForIndexPath (const winrt::IndexPath &ip, bool isChildSelected)
void | UpdateIsClosedCompact ()
void | UpdateLeftNavigationOnlyVisualState (bool useTransitions)
void | UpdateLeftRepeaterItemSource (const winrt::IInspectable &items)
void | UpdateNavigationViewItemsFactory ()
void | UpdateOpenPaneLength (double width)
void | UpdatePaneButtonsWidths ()
void | UpdatePaneDisplayMode ()
void | UpdatePaneDisplayMode (winrt::NavigationViewPaneDisplayMode oldDisplayMode, winrt::NavigationViewPaneDisplayMode newDisplayMode)
void | UpdatePaneLayout ()
void | UpdatePaneOverlayGroup ()
void | UpdatePaneTabFocusNavigation ()
void | UpdatePaneTitleFrameworkElementParents ()
void | UpdatePaneTitleMargins ()
void | UpdatePaneToggleButtonVisibility ()
void | UpdatePaneToggleSize ()
void | UpdatePaneVisibility ()
void | UpdateRepeaterItemsSource (bool forceSelectionModelUpdate)
bool | UpdateSelectedItemFromMenuItems (const winrt::impl::com_ref< winrt::IVector< winrt::IInspectable >> &menuItems, bool foundFirstSelected=false)
void | UpdateSelectionForMenuItems ()
void | UpdateSelectionModelSelection (const winrt::IndexPath &ip)
void | UpdateSelectionModelSelectionForSelectedItem (const winrt::IInspectable &selectedItem)
void | UpdateSettingsItemToolTip ()
void | UpdateSingleSelectionFollowsFocusTemplateSetting ()
void | UpdateTitleBarPadding ()
void | UpdateTopNavigationWidthCache ()
void | UpdateTopNavOverflowRepeaterItemsSource (const winrt::IInspectable &items)
void | UpdateTopNavPrimaryRepeaterItemsSource (const winrt::IInspectable &items)
void | UpdateTopNavRepeatersItemSource (const winrt::IInspectable &items)
void | UpdateVisualState (bool useTransitions=false)
void | UpdateVisualStateForDisplayModeGroup (const winrt::NavigationViewDisplayMode &displayMode)
void | UpdateVisualStateForOverflowButton ()

Static Private Member Functions

static winrt::IInspectable | GetItemFromIndex (const winrt::ItemsRepeater &ir, int index)
static void | UpdateItemsRepeaterItemsSource (const winrt::ItemsRepeater &listView, const winrt::IInspectable &itemsSource)

Private Attributes

std::set
< winrt::NavigationViewItemBase > 		m_itemsWithRevokerObjects

Detailed Description

Definition at line 32 of file NavigationView.h.

Constructor & Destructor Documentation

NavigationView ( )
virtual ~NavigationView ( ) [virtual]

Member Function Documentation

void AnimateSelectionChanged ( const winrt::IInspectable & currentItem ) [private]
void AnimateSelectionChangedToItem ( const winrt::IInspectable & selectedItem ) [private]
void ApplyCustomMenuItemContainerStyling | ( | const winrt::NavigationViewItemBase & | nvib,
 |  | const winrt::ItemsRepeater & | ir,
 |  | int | index |
 | ) |  |  | [private]
void ArrangeTopNavItems ( winrt::Size const & availableSize ) [private]
bool AttemptClosePaneLightly ( ) [private]
bool BumperNavigation ( int offset ) [private]
void ChangeIsExpandedNavigationViewItem | ( | const winrt::NavigationViewItem & | nvi,
 |  | bool | isExpanded |
 | ) |  |  | [private]
void ChangeSelection | ( | const winrt::IInspectable & | prevItem,
 |  | const winrt::IInspectable & | nextItem |
 | ) |  |  | [private]
void ChangeSelectStatusForItem | ( | winrt::IInspectable const & | item,
 |  | bool | selected |
 | ) |  |  | [private]
void ClearAllNavigationViewItemBaseRevokers ( ) [private]
void ClearNavigationViewItemBaseRevokers ( const winrt::NavigationViewItemBase & nvib ) [private]
void CloseFlyoutIfRequired ( const winrt::NavigationViewItem & selectedItem ) [private]
void ClosePane ( ) [private]
void ClosePaneIfNeccessaryAfterItemIsClicked ( const winrt::NavigationViewItem & selectedItem ) [private]
void CloseTopNavigationViewFlyout ( ) [private]
void CoerceToGreaterThanZero ( double & value )
void Collapse ( const winrt::NavigationViewItem & item )
void CompletePendingSelectionChange ( ) [private]
winrt::DependencyObject ContainerFromMenuItem ( winrt::IInspectable const & item )
static void CreateAndAttachHeaderAnimation ( const winrt::Visual & visual ) [static]
void CreateAndHookEventsToSettings ( ) [private]
winrt::NavigationTransitionInfo CreateNavigationTransitionInfo ( NavigationRecommendedTransitionDirection recommendedTransitionDirection ) [private]
bool DoesNavigationViewItemHaveChildren ( const winrt::NavigationViewItem & nvi ) [private]
bool DoesRepeaterHaveRealizedContainers ( const winrt::ItemsRepeater & ir ) [private]
void Expand ( const winrt::NavigationViewItem & item )
winrt::NavigationViewItem FindLowestLevelContainerToDisplaySelectionIndicator ( ) [private]
std::vector<int> FindMovableItemsBeyondAvailableWidth ( float availableWidth ) [private]
std::vector<int> FindMovableItemsRecoverToPrimaryList | ( | float | availableWidth,
 |  | std::vector< int > const & | includeItems |
 | ) |  |  | [private]
std::vector<int> FindMovableItemsToBeRemovedFromPrimaryList | ( | float | widthToBeRemoved,
 |  | std::vector< int > const & | excludeItems |
 | ) |  |  | [private]
winrt::UIElement FindSelectionIndicator ( const winrt::IInspectable & item )
void FocusNextDownItem | ( | const winrt::NavigationViewItem & | nvi,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]
void FocusNextUpItem | ( | const winrt::NavigationViewItem & | nvi,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]
winrt::IInspectable GetChildren ( const winrt::NavigationViewItem & nvi ) [private]
winrt::IInspectable GetChildrenForItemInIndexPath | ( | const winrt::UIElement & | firstContainer,
 |  | const winrt::IndexPath & | ip,
 |  | bool | forceRealize = false |
 | ) |  |  | [private]
winrt::IInspectable GetChildrenForItemInIndexPath | ( | const winrt::IndexPath & | ip,
 |  | bool | forceRealize = false |
 | ) |  |  | [private]
winrt::ItemsRepeater GetChildRepeaterForIndexPath ( const winrt::IndexPath & ip ) [private]
int GetContainerCountInRepeater ( const winrt::ItemsRepeater & ir ) [private]
T GetContainerForData ( const winrt::IInspectable & data ) [private]
T GetContainerForData ( const winrt::IInspectable & data )

Definition at line 4985 of file NavigationView.cpp.

{
    if (!data)
    {
        return nullptr;
    }

    if (auto nvi = data.try_as<T>())
    {
        return nvi;
    }

    // First conduct a basic top level search in main menu, which should succeed for a lot of scenarios.
    const auto mainRepeater = IsTopNavigationView() ? m_topNavRepeater.get() : m_leftNavRepeater.get();
    auto itemIndex = GetIndexFromItem(mainRepeater, data);
    if (itemIndex >= 0)
    {
        if (auto container = mainRepeater.TryGetElement(itemIndex))
        {
            return container.try_as<T>();
        }
    }

    // then look in footer menu
    const auto footerRepeater = IsTopNavigationView() ? m_topNavFooterMenuRepeater.get() : m_leftNavFooterMenuRepeater.get();
    itemIndex = GetIndexFromItem(footerRepeater, data);
    if (itemIndex >= 0)
    {
        if (auto container = footerRepeater.TryGetElement(itemIndex))
        {
            return container.try_as<T>();
        }
    }

    // If unsuccessful, unfortunately we are going to have to search through the whole tree
    // TODO: Either fix or remove implementation for TopNav.
    // It may not be required due to top nav rarely having realized children in its default state.
    if (auto const container = SearchEntireTreeForContainer(mainRepeater, data))
    {
        return container.try_as<T>();
    }

    if (auto const container = SearchEntireTreeForContainer(footerRepeater, data))
    {
        return container.try_as<T>();
    }

    return nullptr;
}

winrt::UIElement GetContainerForIndex | ( | int | index,
 |  | bool | inFooter |
 | ) |  |  | [private]
winrt::NavigationViewItemBase GetContainerForIndexPath | ( | const winrt::IndexPath & | ip,
 |  | bool | lastVisible = false,
 |  | bool | forceRealize = false |
 | ) |  |  | [private]
winrt::NavigationViewItemBase GetContainerForIndexPath | ( | const winrt::UIElement & | firstContainer,
 |  | const winrt::IndexPath & | ip,
 |  | bool | lastVisible,
 |  | bool | forceRealize |
 | ) |  |  | [private]
int GetIndexFromItem | ( | const winrt::ItemsRepeater & | ir,
 |  | const winrt::IInspectable & | data |
 | ) |  |  | [private]
winrt::IndexPath GetIndexPathForContainer ( const winrt::NavigationViewItemBase & nvib )
winrt::IndexPath GetIndexPathOfItem ( const winrt::IInspectable & data ) [private]
static winrt::IInspectable GetItemFromIndex | ( | const winrt::ItemsRepeater & | ir,
 |  | int | index |
 | ) |  |  | [static, private]
int GetNavigationViewItemCountInPrimaryList ( )
int GetNavigationViewItemCountInTopNav ( )
com_ptr<NavigationViewItemsFactory> GetNavigationViewItemsFactory ( ) [inline]

Definition at line 83 of file NavigationView.h.

{ return m_navigationViewItemsFactory; };

double GetPaneToggleButtonHeight ( ) [private]
double GetPaneToggleButtonWidth ( ) [private]
winrt::ItemsRepeater GetParentItemsRepeaterForContainer ( const winrt::NavigationViewItemBase & nvib )
winrt::NavigationViewItem GetParentNavigationViewItemForContainer ( const winrt::NavigationViewItemBase & nvib ) [private]
winrt::ItemsRepeater GetParentRootItemsRepeaterForContainer ( const winrt::NavigationViewItemBase & nvib )
NavigationRecommendedTransitionDirection GetRecommendedTransitionDirection | ( | winrt::DependencyObject const & | prev,
 |  | winrt::DependencyObject const & | next |
 | ) |  |  | [private]
winrt::NavigationViewItem GetSelectedContainer ( )
int GetSelectedItemIndex ( ) [private]
winrt::SplitView GetSplitView ( )
NavigationViewTemplateSettings* GetTemplateSettings ( ) [inline, private]
TopNavigationViewDataProvider& GetTopDataProvider ( ) [inline]

Definition at line 75 of file NavigationView.h.

{ return m_topDataProvider; };

float GetTopNavigationViewActualWidth ( ) [private]
NavigationViewVisualStateDisplayMode GetVisualStateDisplayMode ( const winrt::NavigationViewDisplayMode & displayMode ) [private]
void HandleKeyEventForNavigationViewItem | ( | const winrt::NavigationViewItem & | nvi,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandleTopNavigationMeasureOverride ( winrt::Size const & availableSize ) [private]
void HandleTopNavigationMeasureOverrideNormal ( const winrt::Windows::Foundation::Size & availableSize ) [private]
void HandleTopNavigationMeasureOverrideOverflow ( const winrt::Windows::Foundation::Size & availableSize ) [private]
bool HasTopNavigationViewItemNotInPrimaryList ( ) [private]
void InvalidateTopNavPrimaryLayout ( ) [private]
bool IsContainerTheSelectedItemInTheSelectionModel ( const winrt::NavigationViewItemBase & nvib ) [private]
bool IsFullScreenOrTabletMode ( )
bool IsLightDismissible ( ) [private]
bool IsNavigationViewListSingleSelectionFollowsFocus ( ) [inline, private]
bool IsOverlay ( ) [private]
bool IsRootGridOfFlyout ( const winrt::DependencyObject & element ) [private]
bool IsRootItemsRepeater ( const winrt::DependencyObject & element ) [private]
bool IsSelectionSuppressed ( const winrt::IInspectable & item ) [private]
bool IsSettingsItem ( winrt::IInspectable const & item ) [private]
bool IsTopLevelItem ( const winrt::NavigationViewItemBase & nvib ) [private]
bool IsTopNavigationView ( ) [private]
bool IsTopPrimaryListVisible ( ) [private]
bool IsVisible ( const winrt::DependencyObject & obj ) [private]
void KeepAtLeastOneItemInPrimaryList | ( | std::vector< int > & | itemInPrimaryToBeRemoved,
 |  | bool | shouldKeepFirst |
 | ) |  |  | [private]
void KeyboardFocusFirstItemFromItem ( const winrt::NavigationViewItemBase & nvib ) [private]
void KeyboardFocusLastItemFromItem ( const winrt::NavigationViewItemBase & nvib ) [private]
winrt::ItemsRepeater LeftNavRepeater ( )
winrt::Size MeasureOverride ( winrt::Size const & availableSize )
float MeasureTopNavigationViewDesiredWidth ( winrt::Size const & availableSize ) [private]
float MeasureTopNavMenuItemsHostDesiredWidth ( winrt::Size const & availableSize ) [private]
winrt::IInspectable MenuItemFromContainer ( winrt::DependencyObject const & container )
winrt::NavigationViewItemBase NavigationViewItemBaseOrSettingsContentFromData ( const winrt::IInspectable & data ) [private]
winrt::NavigationViewItem NavigationViewItemOrSettingsContentFromData ( const winrt::IInspectable & data ) [private]
bool NeedRearrangeOfTopElementsAfterOverflowSelectionChanged ( int selectedOriginalIndex ) [private]
bool NeedTopPaddingForRS5OrHigher ( winrt::CoreApplicationViewTitleBar const & coreTitleBar ) [private]
void OnAccessKeyInvoked | ( | winrt::IInspectable const & | sender,
 |  | winrt::AccessKeyInvokedEventArgs const & | args |
 | ) |  |  | [private]
void OnAnimationComplete | ( | const winrt::IInspectable & | sender,
 |  | const winrt::CompositionBatchCompletedEventArgs & | args |
 | ) |  |  | [private]
void OnApplyTemplate ( )
void OnAutoSuggestBoxQuerySubmitted | ( | const winrt::AutoSuggestBox & | sender,
 |  | const winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs & | args |
 | ) |  |  | [private]
void OnBackButtonClicked | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
winrt::AutomationPeer OnCreateAutomationPeer ( )
void OnFlyoutClosing | ( | const winrt::IInspectable & | sender,
 |  | const winrt::FlyoutBaseClosingEventArgs & | args |
 | ) |  |  | [private]
void OnFooterItemsSourceCollectionChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]
void OnIsPaneOpenChanged ( ) [private]
void OnItemsContainerSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]
void OnKeyDown ( winrt::KeyRoutedEventArgs const & args )
void OnLayoutUpdated | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | e |
 | ) |  |  | [private]
void OnLoaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args
 | ) |  |
void OnMenuItemsSourceCollectionChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]
void OnNavigationViewItemBaseVisibilityPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnNavigationViewItemClicked ( const winrt::NavigationViewItem & sender )
void OnNavigationViewItemExpandedPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnNavigationViewItemInvoked ( const winrt::NavigationViewItem & nvi )
void OnNavigationViewItemIsSelectedPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnNavigationViewItemKeyDown | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnNavigationViewItemOnGotFocus | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | e |
 | ) |  |  | [private]
void OnOverflowItemsSourceCollectionChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]
void OnPaneSearchButtonClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPaneTitleHolderSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]
void OnPaneToggleButtonClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPreviewKeyDown ( winrt::KeyRoutedEventArgs const & args )
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnRepeaterElementClearing | ( | const winrt::ItemsRepeater & | ir,
 |  | const winrt::ItemsRepeaterElementClearingEventArgs & | args
 | ) |  |
void OnRepeaterElementPrepared | ( | const winrt::ItemsRepeater & | ir,
 |  | const winrt::ItemsRepeaterElementPreparedEventArgs & | args
 | ) |  |
void OnRepeaterGettingFocus | ( | const winrt::IInspectable & | sender,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]
void OnRepeaterLoaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args
 | ) |  |
void OnSelectedItemLayoutUpdated | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | obj |
 | ) |  |  | [private]
void OnSelectedItemPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args ) [private]
void OnSelectionModelChildrenRequested | ( | const winrt::SelectionModel & | selectionModel,
 |  | const winrt::SelectionModelChildrenRequestedEventArgs & | e |
 | ) |  |  | [private]
void OnSelectionModelSelectionChanged | ( | const winrt::SelectionModel & | selectionModel,
 |  | const winrt::SelectionModelSelectionChangedEventArgs & | e |
 | ) |  |  | [private]
void OnSettingsInvoked ( )
void OnSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]
void OnSplitViewClosedCompactChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnSplitViewPaneClosed | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::IInspectable & | obj |
 | ) |  |  | [private]
void OnSplitViewPaneClosing | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::SplitViewPaneClosingEventArgs & | args |
 | ) |  |  | [private]
void OnSplitViewPaneOpened | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::IInspectable & | obj |
 | ) |  |  | [private]
void OnSplitViewPaneOpening | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::IInspectable & | obj |
 | ) |  |  | [private]
void OnTitleBarIsVisibleChanged | ( | const winrt::CoreApplicationViewTitleBar & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnTitleBarMetricsChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnTopNavDataSourceChanged ( winrt::NotifyCollectionChangedEventArgs const & args )
void OnUnloaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args
 | ) |  |
void OpenPane ( ) [private]
void PlayIndicatorAnimations | ( | const winrt::UIElement & | indicator,
 |  | float | yFrom,
 |  | float | yTo,
 |  | winrt::Size | beginSize,
 |  | winrt::Size | endSize,
 |  | bool | isOutgoing |
 | ) |  |  | [private]
void PlayIndicatorNonSameLevelAnimations | ( | const winrt::UIElement & | indicator,
 |  | bool | isOutgoing,
 |  | bool | fromTop |
 | ) |  |  | [private]
void PlayIndicatorNonSameLevelTopPrimaryAnimation | ( | const winrt::UIElement & | indicator,
 |  | bool | isOutgoing |
 | ) |  |  | [private]
void RaiseCollapsedEvent ( const winrt::NavigationViewItemBase & container ) [private]
void RaiseDisplayModeChanged ( const winrt::NavigationViewDisplayMode & displayMode ) [private]
void RaiseExpandingEvent ( const winrt::NavigationViewItemBase & container ) [private]
void RaiseItemInvoked | ( | winrt::IInspectable const & | item,
 |  | bool | isSettings,
 |  | winrt::NavigationViewItemBase const & | container = nullptr,
 |  | NavigationRecommendedTransitionDirection | recommendedDirection = NavigationRecommendedTransitionDirection::Default |
 | ) |  |  | [private]
void RaiseItemInvokedForNavigationViewItem ( const winrt::NavigationViewItem & nvi ) [private]
void RaiseSelectionChangedEvent | ( | winrt::IInspectable const & | nextItem,
 |  | bool | isSettingsItem,
 |  | NavigationRecommendedTransitionDirection | recommendedDirection = NavigationRecommendedTransitionDirection::Default |
 | ) |  |  | [private]
void RecycleContainer ( const winrt::UIElement & container ) [private]
void ResetAndRearrangeTopNavItems ( winrt::Size const & availableSize ) [private]
void ResetElementAnimationProperties | ( | const winrt::UIElement & | element,
 |  | float | desiredOpacity |
 | ) |  |  | [private]
winrt::NavigationViewItemBase ResolveContainerForItem ( const winrt::IInspectable & item ) [private]
void RevokeNavigationViewItemBaseRevokers ( const winrt::NavigationViewItemBase & nvib ) [private]
winrt::UIElement SearchEntireTreeForContainer | ( | const winrt::ItemsRepeater & | rootRepeater,
 |  | const winrt::IInspectable & | data |
 | ) |  |  | [private]
winrt::IndexPath SearchEntireTreeForIndexPath | ( | const winrt::NavigationViewItem & | parentContainer,
 |  | const winrt::IInspectable & | data,
 |  | const winrt::IndexPath & | ip |
 | ) |  |  | [private]
winrt::IndexPath SearchEntireTreeForIndexPath | ( | const winrt::ItemsRepeater & | rootRepeater,
 |  | const winrt::IInspectable & | data,
 |  | bool | isFooterRepeater |
 | ) |  |  | [private]
void SelectandMoveOverflowItem | ( | winrt::IInspectable const & | selectedItem,
 |  | winrt::IndexPath const & | selectedIndex,
 |  | bool | closeFlyout |
 | ) |  |  | [private]
void SelectOverflowItem | ( | winrt::IInspectable const & | item,
 |  | winrt::IndexPath const & | ip |
 | ) |  |  | [private]
bool SelectSelectableItemWithOffset | ( | int | startIndex,
 |  | int | offset,
 |  | winrt::ItemsRepeater const & | repeater,
 |  | int | repeaterCollectionSize |
 | ) |  |  | [private]
void SetDisplayMode | ( | const winrt::NavigationViewDisplayMode & | displayMode,
 |  | bool | forceSetDisplayMode = false |
 | ) |  |  | [private]
void SetDropShadow ( ) [private]
void SetNavigationViewItemBaseRevokers ( const winrt::NavigationViewItemBase & nvib ) [inline, private]
void SetNavigationViewItemRevokers ( const winrt::NavigationViewItem & nvi ) [private]
void SetOverflowButtonVisibility ( winrt::Visibility const & visibility ) [private]
std::function<void ()> SetPaneTitleFrameworkElementParent | ( | const winrt::ContentControl & | parent,
 |  | const winrt::FrameworkElement & | paneTitle,
 |  | bool | shouldNotContainPaneTitle |
 | ) |  |  | [private]
void SetPaneToggleButtonAutomationName ( ) [private]
void SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI ( winrt::IInspectable const & item ) [private]
void ShadowCasterEaseOutStoryboard_Completed ( const winrt::Grid & shadowCaster ) [private]
bool ShouldShowBackButton ( ) [private]
bool ShouldShowBackOrCloseButton ( ) [private]
bool ShouldShowCloseButton ( ) [private]
void ShowHideChildrenItemsRepeater ( const winrt::NavigationViewItem & nvi ) [private]
void ShrinkTopNavigationSize | ( | float | desiredWidth,
 |  | winrt::Size const & | availableSize |
 | ) |  |  | [private]
void SwapPaneHeaderContent | ( | tracker_ref< winrt::ContentControl > | newParent,
 |  | tracker_ref< winrt::ContentControl > | oldParent,
 |  | winrt::hstring const & | propertyPathName |
 | ) |  |  | [private]
void SyncItemTemplates ( ) [private]
void ToggleIsExpandedNavigationViewItem ( const winrt::NavigationViewItem & nvi ) [private]
void TopNavigationViewItemContentChanged ( )
void UndoSelectionAndRevertSelectionTo | ( | winrt::IInspectable const & | prevSelectedItem,
 |  | winrt::IInspectable const & | nextItem |
 | ) |  |  | [private]
void UnhookEventsAndClearFields ( bool isFromDestructor = false ) [private]
void UnselectPrevItem | ( | winrt::IInspectable const & | prevItem,
 |  | winrt::IInspectable const & | nextItem |
 | ) |  |  | [private]
void UnsetDropShadow ( ) [private]
void UpdateAdaptiveLayout | ( | double | width,
 |  | bool | forceSetDisplayMode = false |
 | ) |  |  | [private]
void UpdateBackAndCloseButtonsVisibility ( ) [private]
void UpdateContentBindingsForPaneDisplayMode ( ) [private]
void UpdateFooterRepeaterItemsSource | ( | bool | sourceCollectionReseted,
 |  | bool | sourceCollectionChanged |
 | ) |  |  | [private]
void UpdateHeaderVisibility ( ) [private]
void UpdateHeaderVisibility ( winrt::NavigationViewDisplayMode displayMode ) [private]
void UpdateIsChildSelected | ( | const winrt::IndexPath & | prevIP,
 |  | const winrt::IndexPath & | nextIP |
 | ) |  |  | [private]
void UpdateIsChildSelectedForIndexPath | ( | const winrt::IndexPath & | ip,
 |  | bool | isChildSelected |
 | ) |  |  | [private]
void UpdateIsClosedCompact ( ) [private]
static void UpdateItemsRepeaterItemsSource | ( | const winrt::ItemsRepeater & | listView,
 |  | const winrt::IInspectable & | itemsSource |
 | ) |  |  | [static, private]
void UpdateLeftNavigationOnlyVisualState ( bool useTransitions ) [private]
void UpdateLeftRepeaterItemSource ( const winrt::IInspectable & items ) [private]
void UpdateNavigationViewItemsFactory ( ) [private]
void UpdateOpenPaneLength ( double width ) [private]
void UpdatePaneButtonsWidths ( ) [private]
void UpdatePaneDisplayMode | ( | winrt::NavigationViewPaneDisplayMode | oldDisplayMode,
 |  | winrt::NavigationViewPaneDisplayMode | newDisplayMode |
 | ) |  |  | [private]
void UpdatePaneDisplayMode ( ) [private]
void UpdatePaneLayout ( ) [private]
void UpdatePaneOverlayGroup ( ) [private]
void UpdatePaneTabFocusNavigation ( ) [private]
void UpdatePaneTitleFrameworkElementParents ( ) [private]
void UpdatePaneTitleMargins ( ) [private]
void UpdatePaneToggleButtonVisibility ( ) [private]
void UpdatePaneToggleSize ( ) [private]
void UpdatePaneVisibility ( ) [private]
void UpdateRepeaterItemsSource ( bool forceSelectionModelUpdate ) [private]
bool UpdateSelectedItemFromMenuItems | ( | const winrt::impl::com_ref< winrt::IVector< winrt::IInspectable >> & | menuItems,
 |  | bool | foundFirstSelected = false |
 | ) |  |  | [private]
void UpdateSelectionForMenuItems ( ) [private]
void UpdateSelectionModelSelection ( const winrt::IndexPath & ip ) [private]
void UpdateSelectionModelSelectionForSelectedItem ( const winrt::IInspectable & selectedItem ) [private]
void UpdateSettingsItemToolTip ( ) [private]
void UpdateSingleSelectionFollowsFocusTemplateSetting ( ) [inline, private]
void UpdateTitleBarPadding ( ) [private]
void UpdateTopNavigationWidthCache ( ) [private]
void UpdateTopNavOverflowRepeaterItemsSource ( const winrt::IInspectable & items ) [private]
void UpdateTopNavPrimaryRepeaterItemsSource ( const winrt::IInspectable & items ) [private]
void UpdateTopNavRepeatersItemSource ( const winrt::IInspectable & items ) [private]
void UpdateVisualState ( bool useTransitions = false ) [private]
void UpdateVisualStateForDisplayModeGroup ( const winrt::NavigationViewDisplayMode & displayMode ) [private]
void UpdateVisualStateForOverflowButton ( ) [private]

Member Data Documentation

std::set<winrt::NavigationViewItemBase> m_itemsWithRevokerObjects [private]

Definition at line 197 of file NavigationView.h.

The documentation for this class was generated from the following files:
  • NavigationView/NavigationView.h
  • NavigationView/NavigationView.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewAutomationPeer Class Reference

#include "NavigationViewAutomationPeer.h"

Inherits ReferenceTracker< NavigationViewAutomationPeer, winrt::implementation::NavigationViewAutomationPeerT, winrt::ISelectionProvider >.

List of all members.

Public Member Functions

NavigationViewAutomationPeer (winrt::NavigationView const &owner)
bool | CanSelectMultiple ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
winrt::com_array
< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > 		GetSelection ()
bool | IsSelectionRequired ()
void | RaiseSelectionChangedEvent (winrt::IInspectable const &oldSelection, winrt::IInspectable const &newSelection)

Detailed Description

Definition at line 9 of file NavigationViewAutomationPeer.h.

Constructor & Destructor Documentation

NavigationViewAutomationPeer ( winrt::NavigationView const & owner )

Definition at line 14 of file NavigationViewAutomationPeer.cpp.

                                                                                :
    ReferenceTracker(owner)
{
}

Member Function Documentation

bool CanSelectMultiple ( )

Definition at line 29 of file NavigationViewAutomationPeer.cpp.

{
    return false;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file NavigationViewAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Selection)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::com_array< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > GetSelection ( )

Definition at line 39 of file NavigationViewAutomationPeer.cpp.

{
    if (auto nv = Owner().try_as<winrt::NavigationView>())
    {
        if (auto nvi = winrt::get_self<NavigationView>(nv)->GetSelectedContainer())
        {
            if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(nvi))
            {
                return { ProviderFromPeer(peer) };
            }
        }
    }
    return {};
}

bool IsSelectionRequired ( )

Definition at line 34 of file NavigationViewAutomationPeer.cpp.

{
    return false;
}

void RaiseSelectionChangedEvent | ( | winrt::IInspectable const & | oldSelection,
 |  | winrt::IInspectable const & | newSelection
 | ) |  |

Definition at line 54 of file NavigationViewAutomationPeer.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::SelectionPatternOnInvalidated))
    {
        if (auto nv = Owner().try_as<winrt::NavigationView>())
        {
            if (auto nvi = winrt::get_self<NavigationView>(nv)->GetSelectedContainer())
            {
                if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(nvi))
                {
                    peer.RaiseAutomationEvent(winrt::AutomationEvents::SelectionItemPatternOnElementSelected);
                }
            }
        }
    }
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewAutomationPeer.h
  • NavigationView/NavigationViewAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewBackRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewBackRequestedEventArgs Class Reference

#include "NavigationViewBackRequestedEventArgs.h"

Detailed Description

Definition at line 8 of file NavigationViewBackRequestedEventArgs.h.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewBackRequestedEventArgs.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewDisplayModeChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewDisplayModeChangedEventArgs Class Reference

#include "NavigationViewDisplayModeChangedEventArgs.h"

List of all members.

Public Member Functions

winrt::NavigationViewDisplayMode | DisplayMode ()
void | DisplayMode (winrt::NavigationViewDisplayMode value)

Detailed Description

Definition at line 8 of file NavigationViewDisplayModeChangedEventArgs.h.

Member Function Documentation

winrt::NavigationViewDisplayMode DisplayMode ( )

Definition at line 10 of file NavigationViewDisplayModeChangedEventArgs.cpp.

{
    return m_DisplayMode;
}

void DisplayMode ( winrt::NavigationViewDisplayMode value )

Definition at line 16 of file NavigationViewDisplayModeChangedEventArgs.cpp.

{
    m_DisplayMode = value;
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewDisplayModeChangedEventArgs.h
  • NavigationView/NavigationViewDisplayModeChangedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

NavigationViewItem Class Reference

#include "NavigationViewItem.h"

Inherits NavigationViewItemProperties.

List of all members.

Public Member Functions

ForwardRefToBaseReferenceTracker (NavigationViewItemBase) NavigationViewItem()
winrt::ItemsRepeater | GetRepeater () const
winrt::UIElement | GetSelectionIndicator () const
bool | HasChildren ()
bool | HasPotentialChildren ()
bool | IsRepeaterVisible () const
void | OnApplyTemplate () override
void | OnContentChanged (winrt::IInspectable const &oldContent, winrt::IInspectable const &newContent) override
winrt::AutomationPeer | OnCreateAutomationPeer () override
void | OnExpandCollapseChevronPointerReleased ()
void | OnGotFocus (winrt::RoutedEventArgs const &e) override
void | OnHasUnrealizedChildrenPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIconPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnInfoBadgePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsExpandedPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnLoaded (winrt::IInspectable const &, winrt::RoutedEventArgs const &)
void | OnLostFocus (winrt::RoutedEventArgs const &e) override
void | OnMenuItemsPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMenuItemsSourcePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | PropagateDepthToChildren (int depth)
void | RotateExpandCollapseChevron (bool isExpanded)
bool | ShouldRepeaterShowInFlyout () const
void | ShowHideChildren ()
void | UpdateVisualStateNoTransition ()

Private Member Functions

void | ForceCollapse ()
NavigationViewItemPresenter * | GetPresenter () const
winrt::UIElement const | GetPresenterOrItem () const
void | HandleExpansionStateMemory ()
void | HookInputEvents (const winrt::IControlProtected &controlProtected)
bool | IgnorePointerId (const winrt::PointerRoutedEventArgs &args)
bool | IsOnLeftNav () const
bool | IsOnTopPrimary () const
bool | IsOutOfControlBounds (const winrt::Point &point)
void | LoadElementsForDisplayingChildren ()
void | LoadMenuItemsHost ()
void | OnFlyoutClosing (const winrt::IInspectable &sender, const winrt::FlyoutBaseClosingEventArgs &args)
void | OnIsEnabledChanged (const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args)
void | OnItemsSourceViewChanged (const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &args)
void | OnMenuItemsVectorChanged (const winrt::Collections::IObservableVector< winrt::IInspectable > &sender, const winrt::Collections::IVectorChangedEventArgs &args)
void | OnNavigationViewItemBaseDepthChanged () override
void | OnNavigationViewItemBaseIsSelectedChanged () override
void | OnNavigationViewItemBasePositionChanged () override
void | OnPresenterPointerCanceled (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPresenterPointerCaptureLost (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPresenterPointerEntered (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPresenterPointerExited (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPresenterPointerMoved (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPresenterPointerPressed (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPresenterPointerReleased (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnSplitViewPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | PrepNavigationViewItem (const winrt::SplitView &splitView)
void | ProcessPointerCanceled (const winrt::PointerRoutedEventArgs &args)
void | ProcessPointerOver (const winrt::PointerRoutedEventArgs &args)
void | ReparentRepeater ()
void | ResetTrackedPointerId ()
void | RestoreExpandedState ()
bool | ShouldEnableToolTip () const
bool | ShouldShowContent ()
bool | ShouldShowIcon ()
bool | ShouldShowInfoBadge ()
void | ShowSelectionIndicator (bool visible)
void | SuggestedToolTipChanged (winrt::IInspectable const &newContent)
void | UnhookEventsAndClearFields ()
void | UnhookInputEvents ()
void | UpdateCompactPaneLength ()
void | UpdateIsClosedCompact ()
void | UpdateItemIndentation ()
void | UpdateNavigationViewItemToolTip ()
void | UpdateRepeaterItemsSource ()
void | UpdateVisualState (bool useTransitions)
void | UpdateVisualStateForChevron ()
void | UpdateVisualStateForClosedCompact ()
void | UpdateVisualStateForIconAndContent (bool showIcon, bool showContent)
void | UpdateVisualStateForInfoBadge ()
void | UpdateVisualStateForKeyboardFocusedState ()
void | UpdateVisualStateForNavigationViewPositionChange ()
void | UpdateVisualStateForPointer ()
void | UpdateVisualStateForToolTip ()

Detailed Description

Definition at line 14 of file NavigationViewItem.h.

Member Function Documentation

void ForceCollapse ( ) [private]
ForwardRefToBaseReferenceTracker ( NavigationViewItemBase )
NavigationViewItemPresenter* GetPresenter ( ) const [private]
winrt::UIElement const GetPresenterOrItem ( ) const [private]
winrt::ItemsRepeater GetRepeater ( ) const [inline]

Definition at line 60 of file NavigationViewItem.h.

{ return m_repeater.get(); };

winrt::UIElement GetSelectionIndicator ( ) const
void HandleExpansionStateMemory ( ) [private]
bool HasChildren ( )
bool HasPotentialChildren ( )
void HookInputEvents ( const winrt::IControlProtected & controlProtected ) [private]
bool IgnorePointerId ( const winrt::PointerRoutedEventArgs & args ) [private]
bool IsOnLeftNav ( ) const [private]
bool IsOnTopPrimary ( ) const [private]
bool IsOutOfControlBounds ( const winrt::Point & point ) [private]
bool IsRepeaterVisible ( ) const
void LoadElementsForDisplayingChildren ( ) [private]
void LoadMenuItemsHost ( ) [private]
void OnApplyTemplate ( ) [override]
void OnContentChanged | ( | winrt::IInspectable const & | oldContent,
 |  | winrt::IInspectable const & | newContent |
 | ) |  |  | [override]
winrt::AutomationPeer OnCreateAutomationPeer ( ) [override]
void OnExpandCollapseChevronPointerReleased ( )
void OnFlyoutClosing | ( | const winrt::IInspectable & | sender,
 |  | const winrt::FlyoutBaseClosingEventArgs & | args |
 | ) |  |  | [private]
void OnGotFocus ( winrt::RoutedEventArgs const & e ) [override]
void OnHasUnrealizedChildrenPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnIconPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnInfoBadgePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnIsEnabledChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [private]
void OnIsExpandedPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnItemsSourceViewChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args |
 | ) |  |  | [private]
void OnLoaded | ( | winrt::IInspectable const & | ,
 |  | winrt::RoutedEventArgs const & |
 | ) |  |
void OnLostFocus ( winrt::RoutedEventArgs const & e ) [override]
void OnMenuItemsPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnMenuItemsSourcePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnMenuItemsVectorChanged | ( | const winrt::Collections::IObservableVector< winrt::IInspectable > & | sender,
 |  | const winrt::Collections::IVectorChangedEventArgs & | args |
 | ) |  |  | [private]
void OnNavigationViewItemBaseDepthChanged ( ) [override, private]
void OnNavigationViewItemBaseIsSelectedChanged ( ) [override, private]
void OnNavigationViewItemBasePositionChanged ( ) [override, private]
void OnPresenterPointerCanceled | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPresenterPointerCaptureLost | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPresenterPointerEntered | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPresenterPointerExited | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPresenterPointerMoved | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPresenterPointerPressed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPresenterPointerReleased | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnSplitViewPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void PrepNavigationViewItem ( const winrt::SplitView & splitView ) [private]
void ProcessPointerCanceled ( const winrt::PointerRoutedEventArgs & args ) [private]
void ProcessPointerOver ( const winrt::PointerRoutedEventArgs & args ) [private]
void PropagateDepthToChildren ( int depth )
void ReparentRepeater ( ) [private]
void ResetTrackedPointerId ( ) [private]
void RestoreExpandedState ( ) [private]
void RotateExpandCollapseChevron ( bool isExpanded )
bool ShouldEnableToolTip ( ) const [private]
bool ShouldRepeaterShowInFlyout ( ) const
bool ShouldShowContent ( ) [private]
bool ShouldShowIcon ( ) [private]
bool ShouldShowInfoBadge ( ) [private]
void ShowHideChildren ( )
void ShowSelectionIndicator ( bool visible ) [private]
void SuggestedToolTipChanged ( winrt::IInspectable const & newContent ) [private]
void UnhookEventsAndClearFields ( ) [private]
void UnhookInputEvents ( ) [private]
void UpdateCompactPaneLength ( ) [private]
void UpdateIsClosedCompact ( ) [private]
void UpdateItemIndentation ( ) [private]
void UpdateNavigationViewItemToolTip ( ) [private]
void UpdateRepeaterItemsSource ( ) [private]
void UpdateVisualState ( bool useTransitions ) [private]
void UpdateVisualStateForChevron ( ) [private]
void UpdateVisualStateForClosedCompact ( ) [private]
void UpdateVisualStateForIconAndContent | ( | bool | showIcon,
 |  | bool | showContent |
 | ) |  |  | [private]
void UpdateVisualStateForInfoBadge ( ) [private]
void UpdateVisualStateForKeyboardFocusedState ( ) [private]
void UpdateVisualStateForNavigationViewPositionChange ( ) [private]
void UpdateVisualStateForPointer ( ) [private]
void UpdateVisualStateForToolTip ( ) [private]
void UpdateVisualStateNoTransition ( )
The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewItem.h
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Types | Private Member Functions

NavigationViewItemAutomationPeer Class Reference

#include "NavigationViewItemAutomationPeer.h"

Inherits ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider >.

List of all members.

Public Member Functions

NavigationViewItemAutomationPeer (winrt::NavigationViewItem const &owner)
void | AddToSelection ()
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
int32_t | GetLevelCore ()
winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
int32_t | GetPositionInSetCore ()
int32_t | GetSizeOfSetCore ()
void | Invoke ()
bool | IsSelected ()
void | RaiseExpandCollapseAutomationEvent (winrt::ExpandCollapseState newState)
void | RemoveFromSelection ()
void | Select ()
winrt::IRawElementProviderSimple | SelectionContainer ()

Private Types

enum | AutomationOutput { Position, Size }

Private Member Functions

void | ChangeSelection (bool isSelected)
int32_t | GetNavigationViewItemCountInPrimaryList ()
int32_t | GetNavigationViewItemCountInTopNav ()
NavigationViewRepeaterPosition GetNavigationViewRepeaterPosition ()
winrt::ItemsRepeater | GetParentItemsRepeater ()
winrt::NavigationView | GetParentNavigationView ()
int32_t | GetPositionOrSetCountHelper (AutomationOutput automationOutput)
bool | HasChildren ()
bool | IsOnFooterNavigation ()
bool | IsOnTopNavigation ()
bool | IsOnTopNavigationOverflow ()
bool | IsSettingsItem ()

Detailed Description

Definition at line 10 of file NavigationViewItemAutomationPeer.h.

Member Enumeration Documentation

enum AutomationOutput [private]
Enumerator:
Position
Size

Definition at line 48 of file NavigationViewItemAutomationPeer.h.

    {
        Position,
        Size,
    };

Constructor & Destructor Documentation

NavigationViewItemAutomationPeer ( winrt::NavigationViewItem const & owner )

Definition at line 16 of file NavigationViewItemAutomationPeer.cpp.

                                                                                :
    ReferenceTracker(owner)
{
}

Member Function Documentation

void AddToSelection ( )

Definition at line 354 of file NavigationViewItemAutomationPeer.cpp.

{
    ChangeSelection(true);
}

void ChangeSelection ( bool isSelected ) [private]

Definition at line 369 of file NavigationViewItemAutomationPeer.cpp.

{
    // If the item is being selected, we trigger an invoke as if the user had clicked on the item:
    if(isSelected)
    {
        Invoke();
    }
    if (auto nvi = Owner().try_as<winrt::NavigationViewItem>())
    {
        nvi.IsSelected(isSelected);
    }
}

void Collapse ( )

Definition at line 151 of file NavigationViewItemAutomationPeer.cpp.

{
    if (auto const navView = GetParentNavigationView())
    {
        if (winrt::NavigationViewItem navigationViewItem = Owner().try_as<winrt::NavigationViewItem>())
        {
            navView.Collapse(navigationViewItem);
            RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Collapsed);
        }
    }
}

void Expand ( )

Definition at line 163 of file NavigationViewItemAutomationPeer.cpp.

{
    if (auto const navView = GetParentNavigationView())
    {
        if (winrt::NavigationViewItem navigationViewItem = Owner().try_as<winrt::NavigationViewItem>())
        {
            navView.Expand(navigationViewItem);
            RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Expanded);
        }
    }
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 138 of file NavigationViewItemAutomationPeer.cpp.

{
    auto state = winrt::ExpandCollapseState::LeafNode;
    if (winrt::NavigationViewItem navigationViewItem = Owner().try_as<winrt::NavigationViewItem>())
    {
        state = winrt::get_self<NavigationViewItem>(navigationViewItem)->IsExpanded() ?
            winrt::ExpandCollapseState::Expanded :
            winrt::ExpandCollapseState::Collapsed;
    }

    return state;
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 67 of file NavigationViewItemAutomationPeer.cpp.

{
    // To be compliant with MAS 4.1.2, in DisplayMode 'Top',
    //  a NavigationViewItem should report itsself as TabItem
    if (IsOnTopNavigation())
    {
        return winrt::AutomationControlType::TabItem;
    }
    else
    {
        // TODO: Should this be ListItem in minimal mode and
        // TreeItem otherwise.
        return winrt::AutomationControlType::ListItem;
    }
}

winrt::hstring GetClassNameCore ( )

Definition at line 62 of file NavigationViewItemAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::NavigationViewItem>();
}

int32_t GetLevelCore ( )

Definition at line 94 of file NavigationViewItemAutomationPeer.cpp.

{
    if (winrt::NavigationViewItemBase nvib = Owner().try_as<winrt::NavigationViewItemBase>())
    {
        auto const nvibImpl = winrt::get_self<NavigationViewItemBase>(nvib);
        if (nvibImpl->IsTopLevelItem())
        {
            return 1;
        }
        else
        {
            if (auto const navView = GetParentNavigationView())
            {
                if (auto const indexPath = winrt::get_self<NavigationView>(navView)->GetIndexPathForContainer(nvib))
                {
                    // first index in path stands for main or footer menu
                    return indexPath.GetSize() - 1;
                }
            }
        }
    }

    return 0;
}

winrt::hstring GetNameCore ( )

Definition at line 23 of file NavigationViewItemAutomationPeer.cpp.

{
    winrt::hstring returnHString = __super::GetNameCore();

    // If a name hasn't been provided by AutomationProperties.Name in markup:
    if (returnHString.empty())
    {
        if (auto lvi = Owner().try_as<winrt::NavigationViewItem>())
        {
            returnHString = SharedHelpers::TryGetStringRepresentationFromObject(lvi.Content());
        }
    }

    if (returnHString.empty())
    {
        // NB: It'll be up to the app to determine the automation label for
        // when they're using a PlaceholderValue vs. Value.

        returnHString = ResourceAccessor::GetLocalizedStringResource(SR_NavigationViewItemDefaultControlName);
    }

    return returnHString;
}

int32_t GetNavigationViewItemCountInPrimaryList ( ) [private]

Definition at line 204 of file NavigationViewItemAutomationPeer.cpp.

{
    int32_t count = 0;
    if (auto navigationView = GetParentNavigationView())
    {
        count = winrt::get_self<NavigationView>(navigationView)->GetNavigationViewItemCountInPrimaryList();
    }
    return count;
}

int32_t GetNavigationViewItemCountInTopNav ( ) [private]

Definition at line 214 of file NavigationViewItemAutomationPeer.cpp.

{
    int32_t count = 0;
    if (auto navigationView = GetParentNavigationView())
    {
        count = winrt::get_self<NavigationView>(navigationView)->GetNavigationViewItemCountInTopNav();
    }
    return count;
}

NavigationViewRepeaterPosition GetNavigationViewRepeaterPosition ( ) [private]

Definition at line 255 of file NavigationViewItemAutomationPeer.cpp.

{
    if (winrt::NavigationViewItemBase navigationViewItem = Owner().try_as<winrt::NavigationViewItemBase>())
    {
        return winrt::get_self<NavigationViewItemBase>(navigationViewItem)->Position();
    }
    return NavigationViewRepeaterPosition::LeftNav;
}

winrt::ItemsRepeater GetParentItemsRepeater ( ) [private]

Definition at line 264 of file NavigationViewItemAutomationPeer.cpp.

{
    if (auto const navview = GetParentNavigationView())
    {
        if (winrt::NavigationViewItemBase navigationViewItem = Owner().try_as<winrt::NavigationViewItemBase>())
        {
            return winrt::get_self<NavigationView>(navview)->GetParentItemsRepeaterForContainer(navigationViewItem);
        }
    }
    return nullptr;
}

winrt::NavigationView GetParentNavigationView ( ) [private]

Definition at line 192 of file NavigationViewItemAutomationPeer.cpp.

{
    winrt::NavigationView navigationView{ nullptr };

    winrt::NavigationViewItemBase navigationViewItem = Owner().try_as<winrt::NavigationViewItemBase>();
    if (navigationViewItem)
    {
        navigationView = winrt::get_self<NavigationViewItemBase>(navigationViewItem)->GetNavigationView();
    }
    return navigationView;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 47 of file NavigationViewItemAutomationPeer.cpp.

{
    // Note: We are intentionally not supporting Invoke Pattern, since supporting both SelectionItem and Invoke was
    // causing problems.
    // See this Issue for more details: https://github.com/microsoft/microsoft-ui-xaml/issues/2702
    if (pattern == winrt::PatternInterface::SelectionItem ||
        // Only provide expand collapse pattern if we have children!
        (pattern == winrt::PatternInterface::ExpandCollapse && HasChildren()))
    {
        return *this;
    }

    return __super::GetPatternCore(pattern);
}

int32_t GetPositionInSetCore ( )

Definition at line 84 of file NavigationViewItemAutomationPeer.cpp.

{
    return GetPositionOrSetCountHelper(AutomationOutput::Position);
}

int32_t GetPositionOrSetCountHelper ( AutomationOutput automationOutput ) [private]

Definition at line 279 of file NavigationViewItemAutomationPeer.cpp.

{
    int32_t returnValue = 0;
    bool itemFound = false;

    if (auto const parentRepeater = GetParentItemsRepeater())
    {
        if (auto const itemsSourceView = parentRepeater.ItemsSourceView())
        {
            auto const numberOfElements = itemsSourceView.Count();

            for (int32_t i = 0; i < numberOfElements; i++)
            {
                if (auto child = parentRepeater.TryGetElement(i))
                {
                    if (child.try_as<winrt::NavigationViewItemHeader>())
                    {
                        if (automationOutput == AutomationOutput::Size && itemFound)
                        {
                            break;
                        }
                        else
                        {
                            returnValue = 0;
                        }
                    }
                    else if (auto const navviewitem = child.try_as<winrt::NavigationViewItem>())
                    {
                        if (navviewitem.Visibility() == winrt::Visibility::Visible)
                        {
                            returnValue++;

                            if (winrt::FrameworkElementAutomationPeer::FromElement(navviewitem) == static_cast<winrt::NavigationViewItemAutomationPeer>(*this))
                            {
                                if (automationOutput == AutomationOutput::Position)
                                {
                                    break;
                                }
                                else
                                {
                                    itemFound = true;
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    return returnValue;
}

int32_t GetSizeOfSetCore ( )

Definition at line 89 of file NavigationViewItemAutomationPeer.cpp.

{
    return GetPositionOrSetCountHelper(AutomationOutput::Size);
}

bool HasChildren ( ) [private]

Definition at line 382 of file NavigationViewItemAutomationPeer.cpp.

{
    if (const auto& navigationViewItem = Owner().try_as<NavigationViewItem>())
    {
        return navigationViewItem->HasChildren();
    }
    return false;
}

void Invoke ( )

Definition at line 119 of file NavigationViewItemAutomationPeer.cpp.

{
    if (auto const navView = GetParentNavigationView())
    {
        if (auto const navigationViewItem = Owner().try_as<winrt::NavigationViewItem>())
        {
            if (navigationViewItem == navView.SettingsItem())
            {
                winrt::get_self<NavigationView>(navView)->OnSettingsInvoked();
            }
            else
            {
                winrt::get_self<NavigationView>(navView)->OnNavigationViewItemInvoked(navigationViewItem);
            }
        }
    }
}

bool IsOnFooterNavigation ( ) [private]

Definition at line 249 of file NavigationViewItemAutomationPeer.cpp.

{
    const auto position = GetNavigationViewRepeaterPosition();
    return position == NavigationViewRepeaterPosition::LeftFooter || position == NavigationViewRepeaterPosition::TopFooter;
}

bool IsOnTopNavigation ( ) [private]

Definition at line 238 of file NavigationViewItemAutomationPeer.cpp.

{
    const auto position = GetNavigationViewRepeaterPosition();
    return position != NavigationViewRepeaterPosition::LeftNav && position != NavigationViewRepeaterPosition::LeftFooter;
}

bool IsOnTopNavigationOverflow ( ) [private]

Definition at line 244 of file NavigationViewItemAutomationPeer.cpp.

{
    return GetNavigationViewRepeaterPosition() == NavigationViewRepeaterPosition::TopOverflow;
}

bool IsSelected ( )

Definition at line 332 of file NavigationViewItemAutomationPeer.cpp.

{
    if (auto const nvi = Owner().try_as<winrt::NavigationViewItem>())
    {
        return nvi.IsSelected();
    }
    return false;
}

bool IsSettingsItem ( ) [private]

Definition at line 224 of file NavigationViewItemAutomationPeer.cpp.

{
    if (auto navView = GetParentNavigationView())
    {
        winrt::NavigationViewItem item = Owner().try_as<winrt::NavigationViewItem>();
        auto settingsItem = navView.SettingsItem();
        if (item && settingsItem && (item == settingsItem || item.Content() == settingsItem))
        {
            return true;
        }
    }
    return false;
}

void RaiseExpandCollapseAutomationEvent ( winrt::ExpandCollapseState newState )

Definition at line 175 of file NavigationViewItemAutomationPeer.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
    {
        const winrt::ExpandCollapseState oldState = (newState == winrt::ExpandCollapseState::Expanded) ?
            winrt::ExpandCollapseState::Collapsed :
            winrt::ExpandCollapseState::Expanded;

        // box_value(oldState) doesn't work here, use ReferenceWithABIRuntimeClassName to make Narrator can unbox it.
        RaisePropertyChangedEvent(winrt::ExpandCollapsePatternIdentifiers::ExpandCollapseStateProperty(),
            box_value(oldState),
            box_value(newState));
    }
}

void RemoveFromSelection ( )

Definition at line 364 of file NavigationViewItemAutomationPeer.cpp.

{
    ChangeSelection(false);
}

void Select ( )

Definition at line 359 of file NavigationViewItemAutomationPeer.cpp.

{
    ChangeSelection(true);
}

winrt::IRawElementProviderSimple SelectionContainer ( )

Definition at line 341 of file NavigationViewItemAutomationPeer.cpp.

{
    if (auto const navview = GetParentNavigationView())
    {
        if (auto const peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(navview))
        {
            return ProviderFromPeer(peer);
        }
    }

    return nullptr;
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemAutomationPeer.h
  • NavigationView/NavigationViewItemAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Attributes

NavigationViewItemBase Class Reference

#include "NavigationViewItemBase.h"

Inherits ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable >, and NavigationViewItemBaseProperties.

List of all members.

Public Member Functions

NavigationViewItemBase ()
void | CreatedByNavigationViewItemsFactory (bool createdByNavigationViewItemsFactory)
bool | CreatedByNavigationViewItemsFactory ()
void | Depth (int depth)
int | Depth () const
winrt::NavigationView | GetNavigationView () const
winrt::SplitView | GetSplitView () const
void | IsInNavigationViewOwnedRepeater (bool isInNavigationViewOwnedRepeater)
bool | IsInNavigationViewOwnedRepeater () const
void | IsTopLevelItem (bool isTopLevelItem)
bool | IsTopLevelItem () const
virtual void | OnApplyTemplate ()
virtual void | OnContentChanged (winrt::IInspectable const &oldContent, winrt::IInspectable const &newContent)
virtual winrt::AutomationPeer | OnCreateAutomationPeer ()
virtual void | OnGotFocus (winrt::RoutedEventArgs const &e)
void | OnLoaded (winrt::IInspectable const &, winrt::RoutedEventArgs const &)
virtual void | OnLostFocus (winrt::RoutedEventArgs const &e)
virtual void | OnNavigationViewItemBaseDepthChanged ()
virtual void | OnNavigationViewItemBaseIsSelectedChanged ()
virtual void | OnNavigationViewItemBasePositionChanged ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
NavigationViewRepeaterPosition | Position () const
void | Position (NavigationViewRepeaterPosition value)
void | SetNavigationViewParent (winrt::NavigationView const &navigationView)

Static Public Attributes

static constexpr int | c_itemIndentation = 31

Detailed Description

Definition at line 10 of file NavigationViewItemBase.h.

Constructor & Destructor Documentation

NavigationViewItemBase ( )

Definition at line 10 of file NavigationViewItemBase.cpp.

{
    Loaded({ this, &NavigationViewItemBase::OnLoaded });
}

Member Function Documentation

void CreatedByNavigationViewItemsFactory ( bool createdByNavigationViewItemsFactory ) [inline]

Definition at line 68 of file NavigationViewItemBase.h.

{ m_createdByNavigationViewItemsFactory = createdByNavigationViewItemsFactory; };

bool CreatedByNavigationViewItemsFactory ( ) [inline]

Definition at line 69 of file NavigationViewItemBase.h.

{ return m_createdByNavigationViewItemsFactory; };

void Depth ( int depth )

Definition at line 48 of file NavigationViewItemBase.cpp.

{
    if (m_depth != depth)
    {
        m_depth = depth;
        OnNavigationViewItemBaseDepthChanged();
    }
}

int Depth ( ) const

Definition at line 57 of file NavigationViewItemBase.cpp.

{
    return m_depth;
}

winrt::NavigationView GetNavigationView ( ) const

Definition at line 43 of file NavigationViewItemBase.cpp.

{
    return m_navigationView.get();
}

winrt::SplitView GetSplitView ( ) const

Definition at line 62 of file NavigationViewItemBase.cpp.

{
    winrt::SplitView splitView{ nullptr };
    auto navigationView = GetNavigationView();
    if (navigationView)
    {
        splitView = winrt::get_self<NavigationView>(navigationView)->GetSplitView();
    }
    return splitView;
}

bool IsInNavigationViewOwnedRepeater ( ) const [inline]

Definition at line 72 of file NavigationViewItemBase.h.

{ return m_isInNavigationViewOwnedRepeater; };

void IsInNavigationViewOwnedRepeater ( bool isInNavigationViewOwnedRepeater ) [inline]

Definition at line 71 of file NavigationViewItemBase.h.

{ m_isInNavigationViewOwnedRepeater = isInNavigationViewOwnedRepeater; };

void IsTopLevelItem ( bool isTopLevelItem ) [inline]

Definition at line 65 of file NavigationViewItemBase.h.

{ m_isTopLevelItem = isTopLevelItem; };

bool IsTopLevelItem ( ) const [inline]

Definition at line 66 of file NavigationViewItemBase.h.

{ return m_isTopLevelItem; };

void OnApplyTemplate ( ) [virtual]

Definition at line 15 of file NavigationViewItemBase.cpp.

{
    __super::OnApplyTemplate();
}

virtual void OnContentChanged | ( | winrt::IInspectable const & | oldContent,
 |  | winrt::IInspectable const & | newContent |
 | ) |  |  | [inline, virtual]

Definition at line 30 of file NavigationViewItemBase.h.

    {
        __super::OnContentChanged(oldContent, newContent);
    }

virtual winrt::AutomationPeer OnCreateAutomationPeer ( ) [inline, virtual]

Definition at line 24 of file NavigationViewItemBase.h.

    {
        return __super::OnCreateAutomationPeer();
    }

virtual void OnGotFocus ( winrt::RoutedEventArgs const & e ) [inline, virtual]

Definition at line 36 of file NavigationViewItemBase.h.

    {
        __super::OnGotFocus(e);
    }

void OnLoaded | ( | winrt::IInspectable const & | ,
 |  | winrt::RoutedEventArgs const & |
 | ) |  |

Definition at line 20 of file NavigationViewItemBase.cpp.

{
    // If the NavViewItem is not prepared in an ItemPresenter it will be missing a reference to NavigationView, so adding that here.
    if (!m_navigationView.get())
    {
        SetNavigationViewParent(SharedHelpers::GetAncestorOfType<winrt::NavigationView>(*this));
    }
}

virtual void OnLostFocus ( winrt::RoutedEventArgs const & e ) [inline, virtual]

Definition at line 41 of file NavigationViewItemBase.h.

    {
        __super::OnLostFocus(e);
    }

virtual void OnNavigationViewItemBaseDepthChanged ( ) [inline, virtual]

Definition at line 54 of file NavigationViewItemBase.h.

{}

virtual void OnNavigationViewItemBaseIsSelectedChanged ( ) [inline, virtual]

Definition at line 56 of file NavigationViewItemBase.h.

{}

virtual void OnNavigationViewItemBasePositionChanged ( ) [inline, virtual]

Definition at line 50 of file NavigationViewItemBase.h.

{}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 78 of file NavigationViewItemBase.cpp.

{
    if (args.Property() == s_IsSelectedProperty)
    {
        OnNavigationViewItemBaseIsSelectedChanged();
    }
}

NavigationViewRepeaterPosition Position ( ) const

Definition at line 29 of file NavigationViewItemBase.cpp.

{
    return m_position;
}

void Position ( NavigationViewRepeaterPosition value )

Definition at line 34 of file NavigationViewItemBase.cpp.

{
    if (m_position != value)
    {
        m_position = value;
        OnNavigationViewItemBasePositionChanged();
    }
}

void SetNavigationViewParent ( winrt::NavigationView const & navigationView )

Definition at line 73 of file NavigationViewItemBase.cpp.

{
    m_navigationView = winrt::make_weak(navigationView);
}

Member Data Documentation

constexpr int c_itemIndentation = 31 [static]

Definition at line 63 of file NavigationViewItemBase.h.

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemBase.h
  • NavigationView/NavigationViewItemBase.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemBaseProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

NavigationViewItemBaseProperties Class Reference

#include "NavigationViewItemBase.properties.h"

Inherited by NavigationViewItemBase.

List of all members.

Public Member Functions

NavigationViewItemBaseProperties ()
bool | IsSelected ()
void | IsSelected (bool value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsSelectedProperty ()
static void | OnIsSelectedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Static Public Attributes

static GlobalDependencyProperty | s_IsSelectedProperty

Detailed Description

Definition at line 7 of file NavigationViewItemBase.properties.h.

Constructor & Destructor Documentation

NavigationViewItemBaseProperties ( )

Definition at line 18 of file NavigationViewItemBase.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file NavigationViewItemBase.properties.cpp.

{
    s_IsSelectedProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file NavigationViewItemBase.properties.cpp.

{
    if (!s_IsSelectedProperty)
    {
        s_IsSelectedProperty =
            InitializeDependencyProperty(
                L"IsSelected",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::NavigationViewItemBase>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsSelectedPropertyChanged));
    }
}

void IsSelected ( bool value )

Definition at line 51 of file NavigationViewItemBase.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItemBase*>(this)->SetValue(s_IsSelectedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsSelected ( )

Definition at line 59 of file NavigationViewItemBase.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewItemBase*>(this)->GetValue(s_IsSelectedProperty));
}

static winrt::DependencyProperty IsSelectedProperty ( ) [inline, static]

Definition at line 15 of file NavigationViewItemBase.properties.h.

{ return s_IsSelectedProperty; }

void OnIsSelectedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 43 of file NavigationViewItemBase.properties.cpp.

{
    auto owner = sender.as<winrt::NavigationViewItemBase>();
    winrt::get_self<NavigationViewItemBase>(owner)->OnPropertyChanged(args);
}

Member Data Documentation

GlobalDependencyProperty s_IsSelectedProperty [static]

Definition at line 17 of file NavigationViewItemBase.properties.h.

The documentation for this class was generated from the following files:
  • Generated/NavigationViewItemBase.properties.h
  • Generated/NavigationViewItemBase.properties.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemBaseRevokers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewItemBaseRevokers Class Reference

#include "NavigationViewItemBaseRevokers.h"

List of all members.

Public Member Functions

void RevokeAll ()

Detailed Description

Definition at line 6 of file NavigationViewItemBaseRevokers.h.

Member Function Documentation

void RevokeAll ( ) [inline]

Definition at line 15 of file NavigationViewItemBaseRevokers.h.

                     {
        if (keyDownRevoker) keyDownRevoker.revoke();
        if (gotFocusRevoker) gotFocusRevoker.revoke();
        if (visibilityRevoker) visibilityRevoker.revoke();
        if (isSelectedRevoker) isSelectedRevoker.revoke();
        if (isExpandedRevoker) isExpandedRevoker.revoke();
    }

The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewItemBaseRevokers.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemCollapsedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewItemCollapsedEventArgs Class Reference

#include "NavigationViewItemCollapsedEventArgs.h"

Inherits ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

NavigationViewItemCollapsedEventArgs (const winrt::NavigationView &navigationView)
winrt::IInspectable | CollapsedItem ()
void | CollapsedItemContainer (winrt::NavigationViewItemBase const &value)
winrt::NavigationViewItemBase | CollapsedItemContainer ()

Detailed Description

Definition at line 8 of file NavigationViewItemCollapsedEventArgs.h.

Constructor & Destructor Documentation

NavigationViewItemCollapsedEventArgs ( const winrt::NavigationView & navigationView )

Definition at line 8 of file NavigationViewItemCollapsedEventArgs.cpp.

{
    m_navigationView.set(navigationView);
}

Member Function Documentation

winrt::IInspectable CollapsedItem ( )

Definition at line 23 of file NavigationViewItemCollapsedEventArgs.cpp.

{
    if (auto const collapsedItem = m_collapsedItem.get())
    {
        return collapsedItem;
    }

    if (auto const nv = m_navigationView.get())
    {
        m_collapsedItem.set(nv.MenuItemFromContainer(m_collapsedItemContainer.get()));
        return m_collapsedItem.get();
    }

    return nullptr;
}

winrt::NavigationViewItemBase CollapsedItemContainer ( )

Definition at line 13 of file NavigationViewItemCollapsedEventArgs.cpp.

{
    return m_collapsedItemContainer.get();
}

void CollapsedItemContainer ( winrt::NavigationViewItemBase const & value )

Definition at line 18 of file NavigationViewItemCollapsedEventArgs.cpp.

{
    m_collapsedItemContainer.set(value);
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemCollapsedEventArgs.h
  • NavigationView/NavigationViewItemCollapsedEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemExpandingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewItemExpandingEventArgs Class Reference

#include "NavigationViewItemExpandingEventArgs.h"

Inherits ReferenceTracker< NavigationViewItemExpandingEventArgs, winrt::implementation::NavigationViewItemExpandingEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

NavigationViewItemExpandingEventArgs (const winrt::NavigationView &navigationView)
winrt::IInspectable | ExpandingItem ()
void | ExpandingItemContainer (winrt::NavigationViewItemBase const &value)
winrt::NavigationViewItemBase | ExpandingItemContainer ()

Detailed Description

Definition at line 8 of file NavigationViewItemExpandingEventArgs.h.

Constructor & Destructor Documentation

NavigationViewItemExpandingEventArgs ( const winrt::NavigationView & navigationView )

Definition at line 8 of file NavigationViewItemExpandingEventArgs.cpp.

{
    m_navigationView.set(navigationView);
}

Member Function Documentation

winrt::IInspectable ExpandingItem ( )

Definition at line 23 of file NavigationViewItemExpandingEventArgs.cpp.

{
    if (auto const expandingItem = m_expandingItem.get())
    {
        return expandingItem;
    }

    if (auto const nv = m_navigationView.get())
    {
        m_expandingItem.set(nv.MenuItemFromContainer(m_expandingItemContainer.get()));
        return m_expandingItem.get();
    }

    return nullptr;
}

winrt::NavigationViewItemBase ExpandingItemContainer ( )

Definition at line 13 of file NavigationViewItemExpandingEventArgs.cpp.

{
    return m_expandingItemContainer.get();
}

void ExpandingItemContainer ( winrt::NavigationViewItemBase const & value )

Definition at line 18 of file NavigationViewItemExpandingEventArgs.cpp.

{
    m_expandingItemContainer.set(value);
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemExpandingEventArgs.h
  • NavigationView/NavigationViewItemExpandingEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemHeader Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

NavigationViewItemHeader Class Reference

#include "NavigationViewItemHeader.h"

List of all members.

Public Member Functions

ForwardRefToBaseReferenceTracker (NavigationViewItemBase) NavigationViewItemHeader()
void | OnApplyTemplate () override

Private Member Functions

void | OnNavigationViewItemBaseDepthChanged () override
void | OnSplitViewPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | UpdateIsClosedCompact ()
void | UpdateItemIndentation ()
void | UpdateVisualState (bool useTransitions)

Detailed Description

Definition at line 9 of file NavigationViewItemHeader.h.

Member Function Documentation

ForwardRefToBaseReferenceTracker ( NavigationViewItemBase )
void OnApplyTemplate ( ) [override]

Definition at line 18 of file NavigationViewItemHeader.cpp.

{
    if (auto splitView = GetSplitView())
    {
        m_splitViewIsPaneOpenChangedRevoker = RegisterPropertyChanged(splitView,
            winrt::SplitView::IsPaneOpenProperty(), { this, &NavigationViewItemHeader::OnSplitViewPropertyChanged });
        m_splitViewDisplayModeChangedRevoker = RegisterPropertyChanged(splitView,
            winrt::SplitView::DisplayModeProperty(), { this, &NavigationViewItemHeader::OnSplitViewPropertyChanged });

        UpdateIsClosedCompact();
    }

    if (auto rootGrid = GetTemplateChildT<winrt::Grid>(c_rootGrid, *this))
    {
        m_rootGrid.set(rootGrid);
    }

    UpdateVisualState(false /*useTransitions*/);
    UpdateItemIndentation();

    auto visual = winrt::ElementCompositionPreview::GetElementVisual(*this);
    NavigationView::CreateAndAttachHeaderAnimation(visual);
}

void OnNavigationViewItemBaseDepthChanged ( ) [override, private]

Definition at line 71 of file NavigationViewItemHeader.cpp.

{
    UpdateItemIndentation();
}

void OnSplitViewPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 42 of file NavigationViewItemHeader.cpp.

{
    if (args == winrt::SplitView::IsPaneOpenProperty() ||
        args == winrt::SplitView::DisplayModeProperty())
    {
        UpdateIsClosedCompact();
    }
}

void UpdateIsClosedCompact ( ) [private]

Definition at line 51 of file NavigationViewItemHeader.cpp.

{
    if (auto splitView = GetSplitView())
    {
        // Check if the pane is closed and if the splitview is in either compact mode.
        m_isClosedCompact = !splitView.IsPaneOpen() && (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactInline);
        UpdateVisualState(true /*useTransitions*/);
    }
}

void UpdateItemIndentation ( ) [private]

Definition at line 76 of file NavigationViewItemHeader.cpp.

{
    // Update item indentation based on its depth
    if (auto const rootGrid = m_rootGrid.get())
    {
        auto const oldMargin = rootGrid.Margin();
        const auto newLeftMargin = Depth() * c_itemIndentation;
        rootGrid.Margin({ static_cast<double>(newLeftMargin), oldMargin.Top, oldMargin.Right, oldMargin.Bottom });
    }
}

void UpdateVisualState ( bool useTransitions ) [private]

Definition at line 61 of file NavigationViewItemHeader.cpp.

{
    winrt::VisualStateManager::GoToState(*this, m_isClosedCompact && IsTopLevelItem() ? L"HeaderTextCollapsed" : L"HeaderTextVisible", useTransitions);

    if (auto navigationView = GetNavigationView())
    {
        winrt::VisualStateManager::GoToState(*this, navigationView.PaneDisplayMode() == winrt::NavigationViewPaneDisplayMode::Top ? L"TopMode" : L"LeftMode", useTransitions);
    }
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemHeader.h
  • NavigationView/NavigationViewItemHeader.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemHelper< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes | Static Private Attributes

NavigationViewItemHelper< T > Class Template Reference

#include "NavigationViewHelper.h"

List of all members.

Public Member Functions

NavigationViewItemHelper (const ITrackerHandleManager *owner)
winrt::UIElement | GetSelectionIndicator () const
void | Init (const winrt::IControlProtected &controlProtected)

Private Attributes

const ITrackerHandleManager * | m_owner

Static Private Attributes

static constexpr wstring_view | c_selectionIndicatorName = "SelectionIndicator"sv

Detailed Description

template<typename T>
class NavigationViewItemHelper< T >

Definition at line 34 of file NavigationViewHelper.h.

Constructor & Destructor Documentation

NavigationViewItemHelper ( const ITrackerHandleManager * owner ) [inline]

Definition at line 37 of file NavigationViewHelper.h.

                                                                : m_owner(owner)
    {
    }

Member Function Documentation

winrt::UIElement GetSelectionIndicator ( ) const [inline]

Definition at line 41 of file NavigationViewHelper.h.

{ return m_selectionIndicator.get(); }

void Init ( const winrt::IControlProtected & controlProtected ) [inline]

Definition at line 43 of file NavigationViewHelper.h.

    {
        m_selectionIndicator.set(GetTemplateChildT<winrt::UIElement>(c_selectionIndicatorName, controlProtected));
    }

Member Data Documentation

constexpr wstring_view c_selectionIndicatorName = "SelectionIndicator"sv [static, private]

Definition at line 52 of file NavigationViewHelper.h.

const ITrackerHandleManager* m_owner [private]

Definition at line 49 of file NavigationViewHelper.h.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewHelper.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemInvokedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewItemInvokedEventArgs Class Reference

#include "NavigationViewItemInvokedEventArgs.h"

Inherits ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

winrt::IInspectable | InvokedItem ()
void | InvokedItem (const winrt::IInspectable &value)
winrt::NavigationViewItemBase | InvokedItemContainer ()
void | InvokedItemContainer (winrt::NavigationViewItemBase const &value)
bool | IsSettingsInvoked ()
void | IsSettingsInvoked (bool value)
void | RecommendedNavigationTransitionInfo (winrt::NavigationTransitionInfo const &value)
winrt::NavigationTransitionInfo | RecommendedNavigationTransitionInfo ()

Detailed Description

Definition at line 8 of file NavigationViewItemInvokedEventArgs.h.

Member Function Documentation

winrt::IInspectable InvokedItem ( )
void InvokedItem ( const winrt::IInspectable & value )
winrt::NavigationViewItemBase InvokedItemContainer ( )
void InvokedItemContainer ( winrt::NavigationViewItemBase const & value )
bool IsSettingsInvoked ( )
void IsSettingsInvoked ( bool value )
void RecommendedNavigationTransitionInfo ( winrt::NavigationTransitionInfo const & value )
winrt::NavigationTransitionInfo RecommendedNavigationTransitionInfo ( )
The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewItemInvokedEventArgs.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemPresenter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

NavigationViewItemPresenter Class Reference

#include "NavigationViewItemPresenter.h"

Inherits ReferenceTracker< NavigationViewItemPresenter, winrt::implementation::NavigationViewItemPresenterT >, and NavigationViewItemPresenterProperties.

List of all members.

Public Member Functions

NavigationViewItemPresenter ()
winrt::UIElement | GetSelectionIndicator ()
bool | GoToElementStateCore (winrt::hstring const &stateName, bool useTransitions)
void | LoadChevron ()
void | OnApplyTemplate ()
void | RotateExpandCollapseChevron (bool isExpanded)
void | UpdateClosedCompactVisualState (bool isTopLevelItem, bool isClosedCompact)
void | UpdateCompactPaneLength (double compactPaneLength, bool shouldUpdate)
void | UpdateContentLeftIndentation (double leftIndentation)

Private Member Functions

NavigationViewItem * | GetNavigationViewItem ()
bool | IgnorePointerId (const winrt::PointerRoutedEventArgs &args)
void | OnExpandCollapseChevronPointerCanceled (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnExpandCollapseChevronPointerCaptureLost (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnExpandCollapseChevronPointerExited (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnExpandCollapseChevronPointerPressed (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnExpandCollapseChevronPointerReleased (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | ResetTrackedPointerId ()
void | UnhookEventsAndClearFields ()
void | UpdateMargin ()

Detailed Description

Definition at line 13 of file NavigationViewItemPresenter.h.

Constructor & Destructor Documentation

NavigationViewItemPresenter ( )

Definition at line 16 of file NavigationViewItemPresenter.cpp.

{
    SetValue(s_TemplateSettingsProperty, winrt::make<::NavigationViewItemPresenterTemplateSettings>());
    SetDefaultStyleKey(this);
}

Member Function Documentation

NavigationViewItem * GetNavigationViewItem ( ) [private]

Definition at line 251 of file NavigationViewItemPresenter.cpp.

{
    NavigationViewItem* navigationViewItem = nullptr;

    winrt::DependencyObject obj = operator winrt::DependencyObject();

    if (auto item = SharedHelpers::GetAncestorOfType<winrt::NavigationViewItem>(winrt::VisualTreeHelper::GetParent(obj)))
    {
        navigationViewItem = winrt::get_self<NavigationViewItem>(item);
    }
    return navigationViewItem;
}

winrt::UIElement GetSelectionIndicator ( )

Definition at line 226 of file NavigationViewItemPresenter.cpp.

{
    return m_helper.GetSelectionIndicator();
}

bool GoToElementStateCore | ( | winrt::hstring const & | stateName,
 |  | bool | useTransitions
 | ) |  |

Definition at line 231 of file NavigationViewItemPresenter.cpp.

{
    // GoToElementStateCore: Update visualstate for itself.
    // VisualStateManager::GoToState: update visualstate for it's first child.

    // If NavigationViewItemPresenter is used, two sets of VisualStateGroups are supported. One set is help to switch the style and it's NavigationViewItemPresenter itself and defined in NavigationViewItem
    // Another set is defined in style for NavigationViewItemPresenter.
    // OnLeftNavigation, OnTopNavigationPrimary, OnTopNavigationOverflow only apply to itself.
    if (state == c_OnLeftNavigation || state == c_OnLeftNavigationReveal || state == c_OnTopNavigationPrimary
        || state == c_OnTopNavigationPrimaryReveal || state == c_OnTopNavigationOverflow)
    {
        if (auto const infoBadgePresenter = m_infoBadgePresenter.get())
        {
            infoBadgePresenter.Content(nullptr);
        }
        return __super::GoToElementStateCore(state, useTransitions);
    }
    return winrt::VisualStateManager::GoToState(*this, state, useTransitions);
}

bool IgnorePointerId ( const winrt::PointerRoutedEventArgs & args ) [private]

Definition at line 120 of file NavigationViewItemPresenter.cpp.

{
    uint32_t pointerId = args.Pointer().PointerId();

    if (m_trackedPointerId == 0)
    {
        m_trackedPointerId = pointerId;
    }
    else if (m_trackedPointerId != pointerId)
    {
        return true;
    }
    return false;
}

void LoadChevron ( )

Definition at line 79 of file NavigationViewItemPresenter.cpp.

{
    if (!m_expandCollapseChevron)
    {
        if (auto navigationViewItem = GetNavigationViewItem())
        {
            if (auto const expandCollapseChevron = GetTemplateChildT<winrt::Grid>(c_expandCollapseChevron, *this))
            {
                m_expandCollapseChevron.set(expandCollapseChevron);

                m_expandCollapseChevronPointerPressedRevoker = expandCollapseChevron.PointerPressed(winrt::auto_revoke, { this, &NavigationViewItemPresenter::OnExpandCollapseChevronPointerPressed });
                m_expandCollapseChevronPointerReleasedRevoker = expandCollapseChevron.PointerReleased(winrt::auto_revoke, { this, &NavigationViewItemPresenter::OnExpandCollapseChevronPointerReleased });

                m_expandCollapseChevronPointerCanceledRevoker = AddRoutedEventHandler<RoutedEventType::PointerCanceled>(
                    *this,
                    { this, &NavigationViewItemPresenter::OnExpandCollapseChevronPointerCanceled },
                    true /*handledEventsToo*/);

                m_expandCollapseChevronPointerExitedRevoker = AddRoutedEventHandler<RoutedEventType::PointerExited>(
                    *this,
                    { this, &NavigationViewItemPresenter::OnExpandCollapseChevronPointerExited },
                    true /*handledEventsToo*/);

                m_expandCollapseChevronPointerCaptureLostRevoker = AddRoutedEventHandler<RoutedEventType::PointerCaptureLost>(
                    *this,
                    { this, &NavigationViewItemPresenter::OnExpandCollapseChevronPointerCaptureLost },
                    true /*handledEventsToo*/);
            }
        }
    }
}

void OnApplyTemplate ( )

Definition at line 39 of file NavigationViewItemPresenter.cpp.

{
    winrt::IControlProtected controlProtected = *this;

    // Retrieve pointers to stable controls
    m_helper.Init(*this);

    UnhookEventsAndClearFields();

    if (auto contentGrid = GetTemplateChildT<winrt::Grid>(c_contentGrid, *this))
    {
        m_contentGrid.set(contentGrid);
    }

    m_infoBadgePresenter.set(GetTemplateChildT<winrt::ContentPresenter>(c_infoBadgePresenter, controlProtected));

    if (auto navigationViewItem = GetNavigationViewItem())
    {
        if (navigationViewItem->HasPotentialChildren())
        {
            LoadChevron();
        }
        navigationViewItem->UpdateVisualStateNoTransition();

        // We probably switched displaymode, so restore width now, otherwise the next time we will restore is when the CompactPaneLength changes
        if (const auto&& navigationView = navigationViewItem->GetNavigationView())
        {
            if (navigationView.PaneDisplayMode() != winrt::NavigationViewPaneDisplayMode::Top)
            {
                UpdateCompactPaneLength(m_compactPaneLengthValue, true);
            }
        }
    }

    m_chevronExpandedStoryboard.set(GetTemplateChildT<winrt::Storyboard>(c_expandCollapseRotateExpandedStoryboard, *this));
    m_chevronCollapsedStoryboard.set(GetTemplateChildT<winrt::Storyboard>(c_expandCollapseRotateCollapsedStoryboard, *this));

    UpdateMargin();
}

void OnExpandCollapseChevronPointerCanceled | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 175 of file NavigationViewItemPresenter.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    m_isChevronPressed = false;
    ResetTrackedPointerId();
}

void OnExpandCollapseChevronPointerCaptureLost | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 197 of file NavigationViewItemPresenter.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    m_isChevronPressed = false;
    ResetTrackedPointerId();
}

void OnExpandCollapseChevronPointerExited | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 186 of file NavigationViewItemPresenter.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    m_isChevronPressed = false;
    ResetTrackedPointerId();
}

void OnExpandCollapseChevronPointerPressed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 135 of file NavigationViewItemPresenter.cpp.

{
    const bool ignorePointerId = IgnorePointerId(args);
    const auto pointerProperties = args.GetCurrentPoint(*this).Properties();
    if (ignorePointerId ||
        !pointerProperties.IsLeftButtonPressed() ||
        args.Handled())
    {
        // We are only interested in the primary action of the pointer device
        // (e.g. left click of a mouse)
    // Despite the name, IsLeftButtonPressed covers the primary action regardless of device.
        return;
    }

    m_isChevronPressed = true;
    args.Handled(true);
}

void OnExpandCollapseChevronPointerReleased | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 153 of file NavigationViewItemPresenter.cpp.

{
    if (IgnorePointerId(args))
    {
        return;
    }

    const auto navigationViewItem = GetNavigationViewItem();
    const auto pointerProperties = args.GetCurrentPoint(*this).Properties();
    if (!args.Handled() &&
        m_isChevronPressed &&
        pointerProperties.PointerUpdateKind() == winrt::PointerUpdateKind::LeftButtonReleased &&
        navigationViewItem)
    {
        navigationViewItem->OnExpandCollapseChevronPointerReleased();
        args.Handled(true);
    }

    m_isChevronPressed = false;
    ResetTrackedPointerId();
}

void ResetTrackedPointerId ( ) [private]

Definition at line 112 of file NavigationViewItemPresenter.cpp.

{
    m_trackedPointerId = 0;
}

void RotateExpandCollapseChevron ( bool isExpanded )

Definition at line 208 of file NavigationViewItemPresenter.cpp.

{
    if (isExpanded)
    {
        if (auto const openStoryboard = m_chevronExpandedStoryboard.get())
        {
            openStoryboard.Begin();
        }
    }
    else
    {
        if (auto const closedStoryboard = m_chevronCollapsedStoryboard.get())
        {
            closedStoryboard.Begin();
        }
    }
}

void UnhookEventsAndClearFields ( ) [private]

Definition at line 22 of file NavigationViewItemPresenter.cpp.

{
    m_expandCollapseChevronPointerPressedRevoker.revoke();
    m_expandCollapseChevronPointerReleasedRevoker.revoke();
    m_expandCollapseChevronPointerExitedRevoker.revoke();
    m_expandCollapseChevronPointerCanceledRevoker.revoke();
    m_expandCollapseChevronPointerCaptureLostRevoker.revoke();

    m_contentGrid.set(nullptr);
    m_infoBadgePresenter.set(nullptr);
    m_expandCollapseChevron.set(nullptr);
    m_chevronExpandedStoryboard.set(nullptr);
    m_chevronCollapsedStoryboard.set(nullptr);

    m_isChevronPressed = false;
}

void UpdateClosedCompactVisualState | ( | bool | isTopLevelItem,
 |  | bool | isClosedCompact
 | ) |  |

Definition at line 293 of file NavigationViewItemPresenter.cpp.

{
    // We increased the ContentPresenter margin to align it visually with the expand/collapse chevron. This updated margin is even applied when the
    // NavigationView is in a visual state where no expand/collapse chevrons are shown, leading to more content being cut off than necessary.
    // This is the case for top-level items when the NavigationView is in a compact mode and the NavigationView pane is closed. To keep the original
    // cutoff visual experience intact, we restore  the original ContentPresenter margin for such top-level items only (children shown in a flyout
    // will use the updated margin).
    const auto stateName = isClosedCompact && isTopLevelItem
        ? L"ClosedCompactAndTopLevelItem"
        : L"NotClosedCompactAndTopLevelItem";

    winrt::VisualStateManager::GoToState(*this, stateName, false /*useTransitions*/);
}

void UpdateCompactPaneLength | ( | double | compactPaneLength,
 |  | bool | shouldUpdate
 | ) |  |

Definition at line 279 of file NavigationViewItemPresenter.cpp.

{
    m_compactPaneLengthValue = compactPaneLength;

    if (shouldUpdate)
    {
        const auto templateSettings = winrt::get_self<NavigationViewItemPresenterTemplateSettings>(TemplateSettings());
        const auto gridLength = compactPaneLength;

        templateSettings->IconWidth(gridLength);
        templateSettings->SmallerIconWidth(std::max(0.0, gridLength - 8));
    }
}

void UpdateContentLeftIndentation ( double leftIndentation )

Definition at line 264 of file NavigationViewItemPresenter.cpp.

{
    m_leftIndentation = leftIndentation;
    UpdateMargin();
}

void UpdateMargin ( ) [private]

Definition at line 270 of file NavigationViewItemPresenter.cpp.

{
    if (auto const grid = m_contentGrid.get())
    {
        auto const oldGridMargin = grid.Margin();
        grid.Margin({ m_leftIndentation, oldGridMargin.Top, oldGridMargin.Right, oldGridMargin.Bottom });
    }
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemPresenter.h
  • NavigationView/NavigationViewItemPresenter.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemPresenterProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

NavigationViewItemPresenterProperties Class Reference

#include "NavigationViewItemPresenter.properties.h"

Inherited by NavigationViewItemPresenter.

List of all members.

Public Member Functions

NavigationViewItemPresenterProperties ()
void | Icon (winrt::IconElement const &value)
winrt::IconElement | Icon ()
winrt::InfoBadge | InfoBadge ()
void | InfoBadge (winrt::InfoBadge const &value)
void | TemplateSettings (winrt::NavigationViewItemPresenterTemplateSettings const &value)
winrt::NavigationViewItemPresenterTemplateSettings | TemplateSettings ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconProperty ()
static winrt::DependencyProperty | InfoBadgeProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconProperty
static GlobalDependencyProperty | s_InfoBadgeProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty

Detailed Description

Definition at line 7 of file NavigationViewItemPresenter.properties.h.

Constructor & Destructor Documentation

NavigationViewItemPresenterProperties ( )

Definition at line 20 of file NavigationViewItemPresenter.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 62 of file NavigationViewItemPresenter.properties.cpp.

{
    s_IconProperty = nullptr;
    s_InfoBadgeProperty = nullptr;
    s_TemplateSettingsProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 25 of file NavigationViewItemPresenter.properties.cpp.

{
    if (!s_IconProperty)
    {
        s_IconProperty =
            InitializeDependencyProperty(
                L"Icon",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::NavigationViewItemPresenter>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_InfoBadgeProperty)
    {
        s_InfoBadgeProperty =
            InitializeDependencyProperty(
                L"InfoBadge",
                winrt::name_of<winrt::InfoBadge>(),
                winrt::name_of<winrt::NavigationViewItemPresenter>(),
                false /* isAttached */,
                ValueHelper<winrt::InfoBadge>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_TemplateSettingsProperty)
    {
        s_TemplateSettingsProperty =
            InitializeDependencyProperty(
                L"TemplateSettings",
                winrt::name_of<winrt::NavigationViewItemPresenterTemplateSettings>(),
                winrt::name_of<winrt::NavigationViewItemPresenter>(),
                false /* isAttached */,
                ValueHelper<winrt::NavigationViewItemPresenterTemplateSettings>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IconElement Icon ( )

Definition at line 77 of file NavigationViewItemPresenter.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<NavigationViewItemPresenter*>(this)->GetValue(s_IconProperty));
}

void Icon ( winrt::IconElement const & value )

Definition at line 69 of file NavigationViewItemPresenter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItemPresenter*>(this)->SetValue(s_IconProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconProperty ( ) [inline, static]

Definition at line 21 of file NavigationViewItemPresenter.properties.h.

{ return s_IconProperty; }

winrt::InfoBadge InfoBadge ( )

Definition at line 90 of file NavigationViewItemPresenter.properties.cpp.

{
    return ValueHelper<winrt::InfoBadge>::CastOrUnbox(static_cast<NavigationViewItemPresenter*>(this)->GetValue(s_InfoBadgeProperty));
}

void InfoBadge ( winrt::InfoBadge const & value )

Definition at line 82 of file NavigationViewItemPresenter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItemPresenter*>(this)->SetValue(s_InfoBadgeProperty, ValueHelper<winrt::InfoBadge>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty InfoBadgeProperty ( ) [inline, static]

Definition at line 22 of file NavigationViewItemPresenter.properties.h.

{ return s_InfoBadgeProperty; }

void TemplateSettings ( winrt::NavigationViewItemPresenterTemplateSettings const & value )

Definition at line 95 of file NavigationViewItemPresenter.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItemPresenter*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::NavigationViewItemPresenterTemplateSettings>::BoxValueIfNecessary(value));
    }
}

winrt::NavigationViewItemPresenterTemplateSettings TemplateSettings ( )

Definition at line 103 of file NavigationViewItemPresenter.properties.cpp.

{
    return ValueHelper<winrt::NavigationViewItemPresenterTemplateSettings>::CastOrUnbox(static_cast<NavigationViewItemPresenter*>(this)->GetValue(s_TemplateSettingsProperty));
}

static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 23 of file NavigationViewItemPresenter.properties.h.

{ return s_TemplateSettingsProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconProperty [static]

Definition at line 25 of file NavigationViewItemPresenter.properties.h.

GlobalDependencyProperty s_InfoBadgeProperty [static]

Definition at line 26 of file NavigationViewItemPresenter.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 27 of file NavigationViewItemPresenter.properties.h.

The documentation for this class was generated from the following files:
  • Generated/NavigationViewItemPresenter.properties.h
  • Generated/NavigationViewItemPresenter.properties.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemPresenterTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemPresenterTemplateSettings Class Reference

#include "NavigationViewItemPresenterTemplateSettings.h"

Inherits NavigationViewItemPresenterTemplateSettingsProperties.

List of all members.

Detailed Description

Definition at line 9 of file NavigationViewItemPresenterTemplateSettings.h.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewItemPresenterTemplateSettings.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemPresenterTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

NavigationViewItemPresenterTemplateSettingsProperties Class Reference

#include "NavigationViewItemPresenterTemplateSettings.properties.h"

Inherited by NavigationViewItemPresenterTemplateSettings.

List of all members.

Public Member Functions

NavigationViewItemPresenterTemplateSettingsProperties ()
void | IconWidth (double value)
double | IconWidth ()
void | SmallerIconWidth (double value)
double | SmallerIconWidth ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconWidthProperty ()
static winrt::DependencyProperty | SmallerIconWidthProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconWidthProperty
static GlobalDependencyProperty | s_SmallerIconWidthProperty

Detailed Description

Definition at line 7 of file NavigationViewItemPresenterTemplateSettings.properties.h.

Constructor & Destructor Documentation

NavigationViewItemPresenterTemplateSettingsProperties ( )

Definition at line 19 of file NavigationViewItemPresenterTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file NavigationViewItemPresenterTemplateSettings.properties.cpp.

{
    s_IconWidthProperty = nullptr;
    s_SmallerIconWidthProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file NavigationViewItemPresenterTemplateSettings.properties.cpp.

{
    if (!s_IconWidthProperty)
    {
        s_IconWidthProperty =
            InitializeDependencyProperty(
                L"IconWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::NavigationViewItemPresenterTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SmallerIconWidthProperty)
    {
        s_SmallerIconWidthProperty =
            InitializeDependencyProperty(
                L"SmallerIconWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::NavigationViewItemPresenterTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
}

double IconWidth ( )

Definition at line 64 of file NavigationViewItemPresenterTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->GetValue(s_IconWidthProperty));
}

void IconWidth ( double value )

Definition at line 56 of file NavigationViewItemPresenterTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->SetValue(s_IconWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconWidthProperty ( ) [inline, static]

Definition at line 18 of file NavigationViewItemPresenterTemplateSettings.properties.h.

{ return s_IconWidthProperty; }

double SmallerIconWidth ( )

Definition at line 77 of file NavigationViewItemPresenterTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->GetValue(s_SmallerIconWidthProperty));
}

void SmallerIconWidth ( double value )

Definition at line 69 of file NavigationViewItemPresenterTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->SetValue(s_SmallerIconWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SmallerIconWidthProperty ( ) [inline, static]

Definition at line 19 of file NavigationViewItemPresenterTemplateSettings.properties.h.

{ return s_SmallerIconWidthProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconWidthProperty [static]

Definition at line 21 of file NavigationViewItemPresenterTemplateSettings.properties.h.

GlobalDependencyProperty s_SmallerIconWidthProperty [static]

Definition at line 22 of file NavigationViewItemPresenterTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/NavigationViewItemPresenterTemplateSettings.properties.h
  • Generated/NavigationViewItemPresenterTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

NavigationViewItemProperties Class Reference

#include "NavigationViewItem.properties.h"

Inherited by NavigationViewItem.

List of all members.

Public Member Functions

NavigationViewItemProperties ()
void | CompactPaneLength (double value)
double | CompactPaneLength ()
void | HasUnrealizedChildren (bool value)
bool | HasUnrealizedChildren ()
void | Icon (winrt::IconElement const &value)
winrt::IconElement | Icon ()
void | InfoBadge (winrt::InfoBadge const &value)
winrt::InfoBadge | InfoBadge ()
void | IsChildSelected (bool value)
bool | IsChildSelected ()
void | IsExpanded (bool value)
bool | IsExpanded ()
void | MenuItems (winrt::IVector< winrt::IInspectable > const &value)
winrt::IVector
< winrt::IInspectable > 		MenuItems ()
winrt::IInspectable | MenuItemsSource ()
void | MenuItemsSource (winrt::IInspectable const &value)
bool | SelectsOnInvoked ()
void | SelectsOnInvoked (bool value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | CompactPaneLengthProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HasUnrealizedChildrenProperty ()
static winrt::DependencyProperty | IconProperty ()
static winrt::DependencyProperty | InfoBadgeProperty ()
static winrt::DependencyProperty | IsChildSelectedProperty ()
static winrt::DependencyProperty | IsExpandedProperty ()
static winrt::DependencyProperty | MenuItemsProperty ()
static winrt::DependencyProperty | MenuItemsSourceProperty ()
static void | OnHasUnrealizedChildrenPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIconPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnInfoBadgePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsExpandedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SelectsOnInvokedProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_CompactPaneLengthProperty
static GlobalDependencyProperty | s_HasUnrealizedChildrenProperty
static GlobalDependencyProperty | s_IconProperty
static GlobalDependencyProperty | s_InfoBadgeProperty
static GlobalDependencyProperty | s_IsChildSelectedProperty
static GlobalDependencyProperty | s_IsExpandedProperty
static GlobalDependencyProperty | s_MenuItemsProperty
static GlobalDependencyProperty | s_MenuItemsSourceProperty
static GlobalDependencyProperty | s_SelectsOnInvokedProperty

Detailed Description

Definition at line 7 of file NavigationViewItem.properties.h.

Constructor & Destructor Documentation

NavigationViewItemProperties ( )

Definition at line 26 of file NavigationViewItem.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 135 of file NavigationViewItem.properties.cpp.

{
    s_CompactPaneLengthProperty = nullptr;
    s_HasUnrealizedChildrenProperty = nullptr;
    s_IconProperty = nullptr;
    s_InfoBadgeProperty = nullptr;
    s_IsChildSelectedProperty = nullptr;
    s_IsExpandedProperty = nullptr;
    s_MenuItemsProperty = nullptr;
    s_MenuItemsSourceProperty = nullptr;
    s_SelectsOnInvokedProperty = nullptr;
    NavigationViewItemBase::ClearProperties();
}

double CompactPaneLength ( )

Definition at line 205 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_CompactPaneLengthProperty));
}

void CompactPaneLength ( double value )

Definition at line 197 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_CompactPaneLengthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty CompactPaneLengthProperty ( ) [inline, static]

Definition at line 39 of file NavigationViewItem.properties.h.

{ return s_CompactPaneLengthProperty; }

void EnsureProperties ( ) [static]

Definition at line 31 of file NavigationViewItem.properties.cpp.

{
    NavigationViewItemBase::EnsureProperties();
    if (!s_CompactPaneLengthProperty)
    {
        s_CompactPaneLengthProperty =
            InitializeDependencyProperty(
                L"CompactPaneLength",
                winrt::name_of<double>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(48.0),
                nullptr);
    }
    if (!s_HasUnrealizedChildrenProperty)
    {
        s_HasUnrealizedChildrenProperty =
            InitializeDependencyProperty(
                L"HasUnrealizedChildren",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(false),
                winrt::PropertyChangedCallback(&OnHasUnrealizedChildrenPropertyChanged));
    }
    if (!s_IconProperty)
    {
        s_IconProperty =
            InitializeDependencyProperty(
                L"Icon",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIconPropertyChanged));
    }
    if (!s_InfoBadgeProperty)
    {
        s_InfoBadgeProperty =
            InitializeDependencyProperty(
                L"InfoBadge",
                winrt::name_of<winrt::InfoBadge>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::InfoBadge>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnInfoBadgePropertyChanged));
    }
    if (!s_IsChildSelectedProperty)
    {
        s_IsChildSelectedProperty =
            InitializeDependencyProperty(
                L"IsChildSelected",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(false),
                nullptr);
    }
    if (!s_IsExpandedProperty)
    {
        s_IsExpandedProperty =
            InitializeDependencyProperty(
                L"IsExpanded",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(false),
                winrt::PropertyChangedCallback(&OnIsExpandedPropertyChanged));
    }
    if (!s_MenuItemsProperty)
    {
        s_MenuItemsProperty =
            InitializeDependencyProperty(
                L"MenuItems",
                winrt::name_of<winrt::IVector<winrt::IInspectable>>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnMenuItemsPropertyChanged));
    }
    if (!s_MenuItemsSourceProperty)
    {
        s_MenuItemsSourceProperty =
            InitializeDependencyProperty(
                L"MenuItemsSource",
                winrt::name_of<winrt::IInspectable>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnMenuItemsSourcePropertyChanged));
    }
    if (!s_SelectsOnInvokedProperty)
    {
        s_SelectsOnInvokedProperty =
            InitializeDependencyProperty(
                L"SelectsOnInvoked",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::NavigationViewItem>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                nullptr);
    }
}

bool HasUnrealizedChildren ( )

Definition at line 218 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_HasUnrealizedChildrenProperty));
}

void HasUnrealizedChildren ( bool value )

Definition at line 210 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_HasUnrealizedChildrenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty HasUnrealizedChildrenProperty ( ) [inline, static]

Definition at line 40 of file NavigationViewItem.properties.h.

{ return s_HasUnrealizedChildrenProperty; }

void Icon ( winrt::IconElement const & value )

Definition at line 223 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_IconProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

winrt::IconElement Icon ( )

Definition at line 231 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_IconProperty));
}

static winrt::DependencyProperty IconProperty ( ) [inline, static]

Definition at line 41 of file NavigationViewItem.properties.h.

{ return s_IconProperty; }

winrt::InfoBadge InfoBadge ( )

Definition at line 244 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<winrt::InfoBadge>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_InfoBadgeProperty));
}

void InfoBadge ( winrt::InfoBadge const & value )

Definition at line 236 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_InfoBadgeProperty, ValueHelper<winrt::InfoBadge>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty InfoBadgeProperty ( ) [inline, static]

Definition at line 42 of file NavigationViewItem.properties.h.

{ return s_InfoBadgeProperty; }

void IsChildSelected ( bool value )

Definition at line 249 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_IsChildSelectedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsChildSelected ( )

Definition at line 257 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_IsChildSelectedProperty));
}

static winrt::DependencyProperty IsChildSelectedProperty ( ) [inline, static]

Definition at line 43 of file NavigationViewItem.properties.h.

{ return s_IsChildSelectedProperty; }

void IsExpanded ( bool value )

Definition at line 262 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_IsExpandedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsExpanded ( )

Definition at line 270 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_IsExpandedProperty));
}

static winrt::DependencyProperty IsExpandedProperty ( ) [inline, static]

Definition at line 44 of file NavigationViewItem.properties.h.

{ return s_IsExpandedProperty; }

void MenuItems ( winrt::IVector< winrt::IInspectable > const & value )

Definition at line 275 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_MenuItemsProperty, ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxValueIfNecessary(value));
    }
}

winrt::IVector< winrt::IInspectable > MenuItems ( )

Definition at line 283 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<winrt::IVector<winrt::IInspectable>>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_MenuItemsProperty));
}

static winrt::DependencyProperty MenuItemsProperty ( ) [inline, static]

Definition at line 45 of file NavigationViewItem.properties.h.

{ return s_MenuItemsProperty; }

winrt::IInspectable MenuItemsSource ( )

Definition at line 296 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_MenuItemsSourceProperty));
}

void MenuItemsSource ( winrt::IInspectable const & value )

Definition at line 288 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_MenuItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MenuItemsSourceProperty ( ) [inline, static]

Definition at line 46 of file NavigationViewItem.properties.h.

{ return s_MenuItemsSourceProperty; }

void OnHasUnrealizedChildrenPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 149 of file NavigationViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::NavigationViewItem>();
    winrt::get_self<NavigationViewItem>(owner)->OnHasUnrealizedChildrenPropertyChanged(args);
}

void OnIconPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 157 of file NavigationViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::NavigationViewItem>();
    winrt::get_self<NavigationViewItem>(owner)->OnIconPropertyChanged(args);
}

void OnInfoBadgePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 165 of file NavigationViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::NavigationViewItem>();
    winrt::get_self<NavigationViewItem>(owner)->OnInfoBadgePropertyChanged(args);
}

void OnIsExpandedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 173 of file NavigationViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::NavigationViewItem>();
    winrt::get_self<NavigationViewItem>(owner)->OnIsExpandedPropertyChanged(args);
}

void OnMenuItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 181 of file NavigationViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::NavigationViewItem>();
    winrt::get_self<NavigationViewItem>(owner)->OnMenuItemsPropertyChanged(args);
}

void OnMenuItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 189 of file NavigationViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::NavigationViewItem>();
    winrt::get_self<NavigationViewItem>(owner)->OnMenuItemsSourcePropertyChanged(args);
}

bool SelectsOnInvoked ( )

Definition at line 309 of file NavigationViewItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewItem*>(this)->GetValue(s_SelectsOnInvokedProperty));
}

void SelectsOnInvoked ( bool value )

Definition at line 301 of file NavigationViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewItem*>(this)->SetValue(s_SelectsOnInvokedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SelectsOnInvokedProperty ( ) [inline, static]

Definition at line 47 of file NavigationViewItem.properties.h.

{ return s_SelectsOnInvokedProperty; }

Member Data Documentation

GlobalDependencyProperty s_CompactPaneLengthProperty [static]

Definition at line 49 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_HasUnrealizedChildrenProperty [static]

Definition at line 50 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_IconProperty [static]

Definition at line 51 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_InfoBadgeProperty [static]

Definition at line 52 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_IsChildSelectedProperty [static]

Definition at line 53 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_IsExpandedProperty [static]

Definition at line 54 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_MenuItemsProperty [static]

Definition at line 55 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_MenuItemsSourceProperty [static]

Definition at line 56 of file NavigationViewItem.properties.h.

GlobalDependencyProperty s_SelectsOnInvokedProperty [static]

Definition at line 57 of file NavigationViewItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/NavigationViewItem.properties.h
  • Generated/NavigationViewItem.properties.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemSeparator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

NavigationViewItemSeparator Class Reference

#include "NavigationViewItemSeparator.h"

List of all members.

Public Member Functions

ForwardRefToBaseReferenceTracker (NavigationViewItemBase) NavigationViewItemSeparator()
void | OnApplyTemplate () override

Private Member Functions

void | OnNavigationViewItemBaseDepthChanged () override
void | OnNavigationViewItemBasePositionChanged () override
void | OnSplitViewPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | UpdateIsClosedCompact (bool updateVisualState)
void | UpdateItemIndentation ()
void | UpdateVisualState (bool useTransitions)

Detailed Description

Definition at line 9 of file NavigationViewItemSeparator.h.

Member Function Documentation

ForwardRefToBaseReferenceTracker ( NavigationViewItemBase )
void OnApplyTemplate ( ) [override]

Definition at line 33 of file NavigationViewItemSeparator.cpp.

{
    // Stop UpdateVisualState before template is applied. Otherwise the visual may not the same as we expect
    m_appliedTemplate = false;
    NavigationViewItemBase::OnApplyTemplate();

    if (auto rootGrid = GetTemplateChildT<winrt::Grid>(c_rootGrid, *this))
    {
        m_rootGrid.set(rootGrid);
    }

    if (auto splitView = GetSplitView())
    {
        m_splitViewIsPaneOpenChangedRevoker = RegisterPropertyChanged(splitView,
            winrt::SplitView::IsPaneOpenProperty(), { this, &NavigationViewItemSeparator::OnSplitViewPropertyChanged });
        m_splitViewDisplayModeChangedRevoker = RegisterPropertyChanged(splitView,
            winrt::SplitView::DisplayModeProperty(), { this, &NavigationViewItemSeparator::OnSplitViewPropertyChanged });

        UpdateIsClosedCompact(false);
    }

    m_appliedTemplate = true;
    UpdateVisualState(false /*useTransition*/);
    UpdateItemIndentation();
}

void OnNavigationViewItemBaseDepthChanged ( ) [override, private]

Definition at line 59 of file NavigationViewItemSeparator.cpp.

{
    UpdateItemIndentation();
}

void OnNavigationViewItemBasePositionChanged ( ) [override, private]

Definition at line 64 of file NavigationViewItemSeparator.cpp.

{
    UpdateVisualState(false /*useTransition*/);
}

void OnSplitViewPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |  |
 | ) |  |  | [private]

Definition at line 69 of file NavigationViewItemSeparator.cpp.

{
    UpdateIsClosedCompact(true);
}

void UpdateIsClosedCompact ( bool updateVisualState ) [private]

Definition at line 85 of file NavigationViewItemSeparator.cpp.

{
    if (auto splitView = GetSplitView())
    {
        // Check if the pane is closed and if the splitview is in either compact mode
        m_isClosedCompact = !splitView.IsPaneOpen()
            && (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactInline);

        if (updateVisualState)
        {
            UpdateVisualState(false /*useTransition*/);
        }
    }
}

void UpdateItemIndentation ( ) [private]

Definition at line 74 of file NavigationViewItemSeparator.cpp.

{
    // Update item indentation based on its depth
    if (auto const rootGrid = m_rootGrid.get())
    {
        auto const oldMargin = rootGrid.Margin();
        const auto newLeftMargin = Depth() * c_itemIndentation;
        rootGrid.Margin({ static_cast<double>(newLeftMargin), oldMargin.Top, oldMargin.Right, oldMargin.Bottom });
    }
}

void UpdateVisualState ( bool useTransitions ) [private]

Definition at line 18 of file NavigationViewItemSeparator.cpp.

{
    if (m_appliedTemplate)
    {
        static auto groupName = L"NavigationSeparatorLineStates"sv;
        const auto stateName = (Position() != NavigationViewRepeaterPosition::TopPrimary && Position() != NavigationViewRepeaterPosition::TopFooter)
            ? m_isClosedCompact
                ? L"HorizontalLineCompact"sv
                : L"HorizontalLine"sv
            : L"VerticalLine"sv;

        VisualStateUtil::GoToStateIfGroupExists(*this, groupName, stateName, false /*useTransitions*/);
    }
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemSeparator.h
  • NavigationView/NavigationViewItemSeparator.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemsFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

NavigationViewItemsFactory Class Reference

#include "NavigationViewItemsFactory.h"

List of all members.

Public Member Functions

winrt::UIElement | GetElementCore (winrt::ElementFactoryGetArgs const &args)
void | RecycleElementCore (winrt::ElementFactoryRecycleArgs const &args)
void | SettingsItem (winrt::NavigationViewItemBase const &settingsItem)
void | UserElementFactory (winrt::IInspectable const &newValue)

Private Member Functions

void | UnlinkElementFromParent (winrt::ElementFactoryRecycleArgs const &args)

Private Attributes

std::vector
< winrt::NavigationViewItem > 		navigationViewItemPool

Detailed Description

Definition at line 9 of file NavigationViewItemsFactory.h.

Member Function Documentation

winrt::UIElement GetElementCore ( winrt::ElementFactoryGetArgs const & args )

Definition at line 36 of file NavigationViewItemsFactory.cpp.

{
    auto const newContent = [itemTemplateWrapper = m_itemTemplateWrapper, settingsItem = m_settingsItem, args]() {
        // Do not template SettingsItem
        if (settingsItem && settingsItem == args.Data())
        {
            return args.Data();
        }

        if (itemTemplateWrapper)
        {
            return itemTemplateWrapper.GetElement(args).as<winrt::IInspectable>();
        }
        return args.Data();
    }();

    // Element is already of expected type, just return it
    if (auto const newItem = newContent.try_as<winrt::NavigationViewItemBase>())
    {
        return newItem;
    }

    // Get or create a wrapping container for the data
    auto const nvi = [this]() {
        if (navigationViewItemPool.size() > 0)
        {
            auto nvi = navigationViewItemPool.back();
            navigationViewItemPool.pop_back();
            return nvi;
        }
        return winrt::make<NavigationViewItem>();
    }();
    auto const nviImpl = winrt::get_self<NavigationViewItem>(nvi);
    nviImpl->CreatedByNavigationViewItemsFactory(true);

    // If a user provided item template exists, just pass the template and data down to the ContentPresenter of the NavigationViewItem
    if (m_itemTemplateWrapper)
    {
        if (auto itemTemplateWrapper = m_itemTemplateWrapper.try_as<ItemTemplateWrapper>())
        {
            // Recycle newContent
            auto const tempArgs = winrt::ElementFactoryRecycleArgs();
            tempArgs.Element(newContent.try_as<winrt::UIElement>());
            m_itemTemplateWrapper.RecycleElement(tempArgs);

            nviImpl->Content(args.Data());
            nviImpl->ContentTemplate(itemTemplateWrapper->Template());
            nviImpl->ContentTemplateSelector(itemTemplateWrapper->TemplateSelector());
            return *nviImpl;
        }
    }

    nviImpl->Content(newContent);
    return *nviImpl;
}

void RecycleElementCore ( winrt::ElementFactoryRecycleArgs const & args )

Definition at line 93 of file NavigationViewItemsFactory.cpp.

{
    if (auto element = args.Element())
    {
        if (auto nvi = element.try_as<winrt::NavigationViewItem>())
        {
            auto const nviImpl = winrt::get_self<NavigationViewItem>(nvi);
            // Check whether we wrapped the element in a NavigationViewItem ourselves.
            // If yes, we are responsible for recycling it.
            if (nviImpl->CreatedByNavigationViewItemsFactory())
            {
                nviImpl->CreatedByNavigationViewItemsFactory(false);
                UnlinkElementFromParent(args);
                args.Element(nullptr);

                // Retain the NVI that we created for future re-use
                navigationViewItemPool.push_back(nvi);

                // Retrieve the proper element that requires recycling for a user defined item template
                // and update the args correspondingly
                if (m_itemTemplateWrapper)
                {
                    // TODO: Retrieve the element and add to the args
                }
            }
        }

        // Do not recycle SettingsItem
        bool isSettingsItem = m_settingsItem && m_settingsItem == args.Element();

        UnlinkElementFromParent(args);
        if (m_itemTemplateWrapper && !isSettingsItem)
        {
            m_itemTemplateWrapper.RecycleElement(args);
        }
    }
}

void SettingsItem ( winrt::NavigationViewItemBase const & settingsItem )

Definition at line 28 of file NavigationViewItemsFactory.cpp.

{
    m_settingsItem = settingsItem;
}

void UnlinkElementFromParent ( winrt::ElementFactoryRecycleArgs const & args ) [private]

Definition at line 131 of file NavigationViewItemsFactory.cpp.

{
    // We want to unlink the containers from the parent repeater
    // in case we are required to move it to a different repeater.
    if (auto panel = args.Parent().try_as<winrt::Panel>())
    {
        auto children = panel.Children();
        unsigned int childIndex = 0;
        if (children.IndexOf(args.Element(), childIndex))
        {
            children.RemoveAt(childIndex);
            args.Parent(nullptr);
        }
    }
}

void UserElementFactory ( winrt::IInspectable const & newValue )

Definition at line 10 of file NavigationViewItemsFactory.cpp.

{
    if (auto dataTemplate = newValue.try_as<winrt::DataTemplate>())
    {
        m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(dataTemplate);
    }
    else if (auto selector = newValue.try_as<winrt::DataTemplateSelector>())
    {
        m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(selector);
    }
    else if (auto customElementFactory = newValue.try_as<winrt::IElementFactory>())
    {
        m_itemTemplateWrapper = customElementFactory;
    }

    navigationViewItemPool = std::vector<winrt::NavigationViewItem>();
}

Member Data Documentation

std::vector<winrt::NavigationViewItem> navigationViewItemPool [private]

Definition at line 22 of file NavigationViewItemsFactory.h.

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewItemsFactory.h
  • NavigationView/NavigationViewItemsFactory.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewPaneClosingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewPaneClosingEventArgs Class Reference

#include "NavigationViewPaneClosingEventArgs.h"

Inherits ReferenceTracker< NavigationViewPaneClosingEventArgs, winrt::implementation::NavigationViewPaneClosingEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

bool | Cancel ()
void | Cancel (bool value)
void | SplitViewClosingArgs (winrt::SplitViewPaneClosingEventArgs const &value)

Detailed Description

Definition at line 8 of file NavigationViewPaneClosingEventArgs.h.

Member Function Documentation

bool Cancel ( )

Definition at line 9 of file NavigationViewPaneClosingEventArgs.cpp.

{
    return m_cancelled;
}

void Cancel ( bool value )

Definition at line 14 of file NavigationViewPaneClosingEventArgs.cpp.

{
    m_cancelled = value;

    if (auto args = m_splitViewClosingArgs.get())
    {
        args.Cancel(value);
    }
}

void SplitViewClosingArgs ( winrt::SplitViewPaneClosingEventArgs const & value )

Definition at line 24 of file NavigationViewPaneClosingEventArgs.cpp.

{
    m_splitViewClosingArgs.set(value);
}

The documentation for this class was generated from the following files:
  • NavigationView/NavigationViewPaneClosingEventArgs.h
  • NavigationView/NavigationViewPaneClosingEventArgs.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

NavigationViewProperties Class Reference

#include "NavigationView.properties.h"

Inherited by NavigationView.

List of all members.

Public Member Functions

NavigationViewProperties ()
void | AlwaysShowHeader (bool value)
bool | AlwaysShowHeader ()
void | AutoSuggestBox (winrt::AutoSuggestBox const &value)
winrt::AutoSuggestBox | AutoSuggestBox ()
winrt::event_token | BackRequested (winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs > const &value)
void | BackRequested (winrt::event_token const &token)
winrt::event_token | Collapsed (winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs > const &value)
void | Collapsed (winrt::event_token const &token)
void | CompactModeThresholdWidth (double value)
double | CompactModeThresholdWidth ()
void | CompactPaneLength (double value)
double | CompactPaneLength ()
void | ContentOverlay (winrt::UIElement const &value)
winrt::UIElement | ContentOverlay ()
void | DisplayMode (winrt::NavigationViewDisplayMode const &value)
winrt::NavigationViewDisplayMode | DisplayMode ()
winrt::event_token | DisplayModeChanged (winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs > const &value)
void | DisplayModeChanged (winrt::event_token const &token)
void | ExpandedModeThresholdWidth (double value)
double | ExpandedModeThresholdWidth ()
void | Expanding (winrt::event_token const &token)
winrt::event_token | Expanding (winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs > const &value)
void | FooterMenuItems (winrt::IVector< winrt::IInspectable > const &value)
winrt::IVector
< winrt::IInspectable > 		FooterMenuItems ()
void | FooterMenuItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | FooterMenuItemsSource ()
void | Header (winrt::IInspectable const &value)
winrt::IInspectable | Header ()
void | HeaderTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | HeaderTemplate ()
void | IsBackButtonVisible (winrt::NavigationViewBackButtonVisible const &value)
winrt::NavigationViewBackButtonVisible | IsBackButtonVisible ()
void | IsBackEnabled (bool value)
bool | IsBackEnabled ()
void | IsPaneOpen (bool value)
bool | IsPaneOpen ()
void | IsPaneToggleButtonVisible (bool value)
bool | IsPaneToggleButtonVisible ()
void | IsPaneVisible (bool value)
bool | IsPaneVisible ()
void | IsSettingsVisible (bool value)
bool | IsSettingsVisible ()
void | IsTitleBarAutoPaddingEnabled (bool value)
bool | IsTitleBarAutoPaddingEnabled ()
void | ItemInvoked (winrt::event_token const &token)
winrt::event_token | ItemInvoked (winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs > const &value)
void | MenuItemContainerStyle (winrt::Style const &value)
winrt::Style | MenuItemContainerStyle ()
winrt::StyleSelector | MenuItemContainerStyleSelector ()
void | MenuItemContainerStyleSelector (winrt::StyleSelector const &value)
winrt::IVector
< winrt::IInspectable > 		MenuItems ()
void | MenuItems (winrt::IVector< winrt::IInspectable > const &value)
void | MenuItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | MenuItemsSource ()
winrt::DataTemplate | MenuItemTemplate ()
void | MenuItemTemplate (winrt::DataTemplate const &value)
void | MenuItemTemplateSelector (winrt::DataTemplateSelector const &value)
winrt::DataTemplateSelector | MenuItemTemplateSelector ()
double | OpenPaneLength ()
void | OpenPaneLength (double value)
void | OverflowLabelMode (winrt::NavigationViewOverflowLabelMode const &value)
winrt::NavigationViewOverflowLabelMode | OverflowLabelMode ()
winrt::event_token | PaneClosed (winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value)
void | PaneClosed (winrt::event_token const &token)
void | PaneClosing (winrt::event_token const &token)
winrt::event_token | PaneClosing (winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs > const &value)
winrt::UIElement | PaneCustomContent ()
void | PaneCustomContent (winrt::UIElement const &value)
void | PaneDisplayMode (winrt::NavigationViewPaneDisplayMode const &value)
winrt::NavigationViewPaneDisplayMode | PaneDisplayMode ()
void | PaneFooter (winrt::UIElement const &value)
winrt::UIElement | PaneFooter ()
void | PaneHeader (winrt::UIElement const &value)
winrt::UIElement | PaneHeader ()
void | PaneOpened (winrt::event_token const &token)
winrt::event_token | PaneOpened (winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value)
void | PaneOpening (winrt::event_token const &token)
winrt::event_token | PaneOpening (winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value)
void | PaneTitle (winrt::hstring const &value)
winrt::hstring | PaneTitle ()
void | PaneToggleButtonStyle (winrt::Style const &value)
winrt::Style | PaneToggleButtonStyle ()
void | SelectedItem (winrt::IInspectable const &value)
winrt::IInspectable | SelectedItem ()
winrt::event_token | SelectionChanged (winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs > const &value)
void | SelectionChanged (winrt::event_token const &token)
void | SelectionFollowsFocus (winrt::NavigationViewSelectionFollowsFocus const &value)
winrt::NavigationViewSelectionFollowsFocus | SelectionFollowsFocus ()
void | SettingsItem (winrt::IInspectable const &value)
winrt::IInspectable | SettingsItem ()
winrt::NavigationViewShoulderNavigationEnabled | ShoulderNavigationEnabled ()
void | ShoulderNavigationEnabled (winrt::NavigationViewShoulderNavigationEnabled const &value)
void | TemplateSettings (winrt::NavigationViewTemplateSettings const &value)
winrt::NavigationViewTemplateSettings | TemplateSettings ()

Static Public Member Functions

static winrt::DependencyProperty | AlwaysShowHeaderProperty ()
static winrt::DependencyProperty | AutoSuggestBoxProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | CompactModeThresholdWidthProperty ()
static winrt::DependencyProperty | CompactPaneLengthProperty ()
static winrt::DependencyProperty | ContentOverlayProperty ()
static winrt::DependencyProperty | DisplayModeProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ExpandedModeThresholdWidthProperty ()
static winrt::DependencyProperty | FooterMenuItemsProperty ()
static winrt::DependencyProperty | FooterMenuItemsSourceProperty ()
static winrt::DependencyProperty | HeaderProperty ()
static winrt::DependencyProperty | HeaderTemplateProperty ()
static winrt::DependencyProperty | IsBackButtonVisibleProperty ()
static winrt::DependencyProperty | IsBackEnabledProperty ()
static winrt::DependencyProperty | IsPaneOpenProperty ()
static winrt::DependencyProperty | IsPaneToggleButtonVisibleProperty ()
static winrt::DependencyProperty | IsPaneVisibleProperty ()
static winrt::DependencyProperty | IsSettingsVisibleProperty ()
static winrt::DependencyProperty | IsTitleBarAutoPaddingEnabledProperty ()
static winrt::DependencyProperty | MenuItemContainerStyleProperty ()
static winrt::DependencyProperty | MenuItemContainerStyleSelectorProperty ()
static winrt::DependencyProperty | MenuItemsProperty ()
static winrt::DependencyProperty | MenuItemsSourceProperty ()
static winrt::DependencyProperty | MenuItemTemplateProperty ()
static winrt::DependencyProperty | MenuItemTemplateSelectorProperty ()
static void | OnAlwaysShowHeaderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnAutoSuggestBoxPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCompactModeThresholdWidthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCompactPaneLengthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnDisplayModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnExpandedModeThresholdWidthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFooterMenuItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFooterMenuItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHeaderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHeaderTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsBackButtonVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsBackEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsPaneOpenPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsPaneToggleButtonVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsPaneVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsSettingsVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsTitleBarAutoPaddingEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemContainerStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemContainerStyleSelectorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMenuItemTemplateSelectorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOpenPaneLengthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOverflowLabelModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPaneDisplayModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPaneFooterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPaneTitlePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPaneToggleButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedItemPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectionFollowsFocusPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSettingsItemPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnShoulderNavigationEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | OpenPaneLengthProperty ()
static winrt::DependencyProperty | OverflowLabelModeProperty ()
static winrt::DependencyProperty | PaneCustomContentProperty ()
static winrt::DependencyProperty | PaneDisplayModeProperty ()
static winrt::DependencyProperty | PaneFooterProperty ()
static winrt::DependencyProperty | PaneHeaderProperty ()
static winrt::DependencyProperty | PaneTitleProperty ()
static winrt::DependencyProperty | PaneToggleButtonStyleProperty ()
static winrt::DependencyProperty | SelectedItemProperty ()
static winrt::DependencyProperty | SelectionFollowsFocusProperty ()
static winrt::DependencyProperty | SettingsItemProperty ()
static winrt::DependencyProperty | ShoulderNavigationEnabledProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::NavigationViewBackRequestedEventArgs > > 		m_backRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::NavigationViewItemCollapsedEventArgs > > 		m_collapsedEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::NavigationViewDisplayModeChangedEventArgs > > 		m_displayModeChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::NavigationViewItemExpandingEventArgs > > 		m_expandingEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::NavigationViewItemInvokedEventArgs > > 		m_itemInvokedEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::IInspectable > > 		m_paneClosedEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::NavigationViewPaneClosingEventArgs > > 		m_paneClosingEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::IInspectable > > 		m_paneOpenedEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::IInspectable > > 		m_paneOpeningEventSource
event_source
< winrt::TypedEventHandler
< winrt::NavigationView,
winrt::NavigationViewSelectionChangedEventArgs > > 		m_selectionChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_AlwaysShowHeaderProperty
static GlobalDependencyProperty | s_AutoSuggestBoxProperty
static GlobalDependencyProperty | s_CompactModeThresholdWidthProperty
static GlobalDependencyProperty | s_CompactPaneLengthProperty
static GlobalDependencyProperty | s_ContentOverlayProperty
static GlobalDependencyProperty | s_DisplayModeProperty
static GlobalDependencyProperty | s_ExpandedModeThresholdWidthProperty
static GlobalDependencyProperty | s_FooterMenuItemsProperty
static GlobalDependencyProperty | s_FooterMenuItemsSourceProperty
static GlobalDependencyProperty | s_HeaderProperty
static GlobalDependencyProperty | s_HeaderTemplateProperty
static GlobalDependencyProperty | s_IsBackButtonVisibleProperty
static GlobalDependencyProperty | s_IsBackEnabledProperty
static GlobalDependencyProperty | s_IsPaneOpenProperty
static GlobalDependencyProperty | s_IsPaneToggleButtonVisibleProperty
static GlobalDependencyProperty | s_IsPaneVisibleProperty
static GlobalDependencyProperty | s_IsSettingsVisibleProperty
static GlobalDependencyProperty | s_IsTitleBarAutoPaddingEnabledProperty
static GlobalDependencyProperty | s_MenuItemContainerStyleProperty
static GlobalDependencyProperty | s_MenuItemContainerStyleSelectorProperty
static GlobalDependencyProperty | s_MenuItemsProperty
static GlobalDependencyProperty | s_MenuItemsSourceProperty
static GlobalDependencyProperty | s_MenuItemTemplateProperty
static GlobalDependencyProperty | s_MenuItemTemplateSelectorProperty
static GlobalDependencyProperty | s_OpenPaneLengthProperty
static GlobalDependencyProperty | s_OverflowLabelModeProperty
static GlobalDependencyProperty | s_PaneCustomContentProperty
static GlobalDependencyProperty | s_PaneDisplayModeProperty
static GlobalDependencyProperty | s_PaneFooterProperty
static GlobalDependencyProperty | s_PaneHeaderProperty
static GlobalDependencyProperty | s_PaneTitleProperty
static GlobalDependencyProperty | s_PaneToggleButtonStyleProperty
static GlobalDependencyProperty | s_SelectedItemProperty
static GlobalDependencyProperty | s_SelectionFollowsFocusProperty
static GlobalDependencyProperty | s_SettingsItemProperty
static GlobalDependencyProperty | s_ShoulderNavigationEnabledProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty

Detailed Description

Definition at line 7 of file NavigationView.properties.h.

Constructor & Destructor Documentation

NavigationViewProperties ( )

Definition at line 54 of file NavigationView.properties.cpp.

    : m_backRequestedEventSource{static_cast<NavigationView*>(this)}

Member Function Documentation

void AlwaysShowHeader ( bool value )
bool AlwaysShowHeader ( )
static winrt::DependencyProperty AlwaysShowHeaderProperty ( ) [inline, static]

Definition at line 123 of file NavigationView.properties.h.

{ return s_AlwaysShowHeaderProperty; }

winrt::AutoSuggestBox AutoSuggestBox ( )
void AutoSuggestBox ( winrt::AutoSuggestBox const & value )
static winrt::DependencyProperty AutoSuggestBoxProperty ( ) [inline, static]

Definition at line 124 of file NavigationView.properties.h.

{ return s_AutoSuggestBoxProperty; }

winrt::event_token BackRequested ( winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs > const & value )
void BackRequested ( winrt::event_token const & token )
static void ClearProperties ( ) [static]
winrt::event_token Collapsed ( winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs > const & value )
void Collapsed ( winrt::event_token const & token )
void CompactModeThresholdWidth ( double value )
double CompactModeThresholdWidth ( )
static winrt::DependencyProperty CompactModeThresholdWidthProperty ( ) [inline, static]

Definition at line 125 of file NavigationView.properties.h.

{ return s_CompactModeThresholdWidthProperty; }

double CompactPaneLength ( )
void CompactPaneLength ( double value )
static winrt::DependencyProperty CompactPaneLengthProperty ( ) [inline, static]

Definition at line 126 of file NavigationView.properties.h.

{ return s_CompactPaneLengthProperty; }

void ContentOverlay ( winrt::UIElement const & value )
winrt::UIElement ContentOverlay ( )
static winrt::DependencyProperty ContentOverlayProperty ( ) [inline, static]

Definition at line 127 of file NavigationView.properties.h.

{ return s_ContentOverlayProperty; }

void DisplayMode ( winrt::NavigationViewDisplayMode const & value )
winrt::NavigationViewDisplayMode DisplayMode ( )
winrt::event_token DisplayModeChanged ( winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs > const & value )
void DisplayModeChanged ( winrt::event_token const & token )
static winrt::DependencyProperty DisplayModeProperty ( ) [inline, static]

Definition at line 128 of file NavigationView.properties.h.

{ return s_DisplayModeProperty; }

static void EnsureProperties ( ) [static]
void ExpandedModeThresholdWidth ( double value )
double ExpandedModeThresholdWidth ( )
static winrt::DependencyProperty ExpandedModeThresholdWidthProperty ( ) [inline, static]

Definition at line 129 of file NavigationView.properties.h.

{ return s_ExpandedModeThresholdWidthProperty; }

winrt::event_token Expanding ( winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs > const & value )
void Expanding ( winrt::event_token const & token )
winrt::IVector<winrt::IInspectable> FooterMenuItems ( )
void FooterMenuItems ( winrt::IVector< winrt::IInspectable > const & value )
static winrt::DependencyProperty FooterMenuItemsProperty ( ) [inline, static]

Definition at line 130 of file NavigationView.properties.h.

{ return s_FooterMenuItemsProperty; }

void FooterMenuItemsSource ( winrt::IInspectable const & value )
winrt::IInspectable FooterMenuItemsSource ( )
static winrt::DependencyProperty FooterMenuItemsSourceProperty ( ) [inline, static]

Definition at line 131 of file NavigationView.properties.h.

{ return s_FooterMenuItemsSourceProperty; }

void Header ( winrt::IInspectable const & value )
winrt::IInspectable Header ( )
static winrt::DependencyProperty HeaderProperty ( ) [inline, static]

Definition at line 132 of file NavigationView.properties.h.

{ return s_HeaderProperty; }

void HeaderTemplate ( winrt::DataTemplate const & value )
winrt::DataTemplate HeaderTemplate ( )
static winrt::DependencyProperty HeaderTemplateProperty ( ) [inline, static]

Definition at line 133 of file NavigationView.properties.h.

{ return s_HeaderTemplateProperty; }

void IsBackButtonVisible ( winrt::NavigationViewBackButtonVisible const & value )
winrt::NavigationViewBackButtonVisible IsBackButtonVisible ( )
static winrt::DependencyProperty IsBackButtonVisibleProperty ( ) [inline, static]

Definition at line 134 of file NavigationView.properties.h.

{ return s_IsBackButtonVisibleProperty; }

void IsBackEnabled ( bool value )
bool IsBackEnabled ( )
static winrt::DependencyProperty IsBackEnabledProperty ( ) [inline, static]

Definition at line 135 of file NavigationView.properties.h.

{ return s_IsBackEnabledProperty; }

void IsPaneOpen ( bool value )
bool IsPaneOpen ( )
static winrt::DependencyProperty IsPaneOpenProperty ( ) [inline, static]

Definition at line 136 of file NavigationView.properties.h.

{ return s_IsPaneOpenProperty; }

void IsPaneToggleButtonVisible ( bool value )
bool IsPaneToggleButtonVisible ( )
static winrt::DependencyProperty IsPaneToggleButtonVisibleProperty ( ) [inline, static]

Definition at line 137 of file NavigationView.properties.h.

{ return s_IsPaneToggleButtonVisibleProperty; }

bool IsPaneVisible ( )
void IsPaneVisible ( bool value )
static winrt::DependencyProperty IsPaneVisibleProperty ( ) [inline, static]

Definition at line 138 of file NavigationView.properties.h.

{ return s_IsPaneVisibleProperty; }

void IsSettingsVisible ( bool value )
bool IsSettingsVisible ( )
static winrt::DependencyProperty IsSettingsVisibleProperty ( ) [inline, static]

Definition at line 139 of file NavigationView.properties.h.

{ return s_IsSettingsVisibleProperty; }

void IsTitleBarAutoPaddingEnabled ( bool value )
bool IsTitleBarAutoPaddingEnabled ( )
static winrt::DependencyProperty IsTitleBarAutoPaddingEnabledProperty ( ) [inline, static]

Definition at line 140 of file NavigationView.properties.h.

{ return s_IsTitleBarAutoPaddingEnabledProperty; }

winrt::event_token ItemInvoked ( winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs > const & value )
void ItemInvoked ( winrt::event_token const & token )
void MenuItemContainerStyle ( winrt::Style const & value )
winrt::Style MenuItemContainerStyle ( )
static winrt::DependencyProperty MenuItemContainerStyleProperty ( ) [inline, static]

Definition at line 141 of file NavigationView.properties.h.

{ return s_MenuItemContainerStyleProperty; }

void MenuItemContainerStyleSelector ( winrt::StyleSelector const & value )
winrt::StyleSelector MenuItemContainerStyleSelector ( )
static winrt::DependencyProperty MenuItemContainerStyleSelectorProperty ( ) [inline, static]

Definition at line 142 of file NavigationView.properties.h.

{ return s_MenuItemContainerStyleSelectorProperty; }

void MenuItems ( winrt::IVector< winrt::IInspectable > const & value )
winrt::IVector<winrt::IInspectable> MenuItems ( )
static winrt::DependencyProperty MenuItemsProperty ( ) [inline, static]

Definition at line 143 of file NavigationView.properties.h.

{ return s_MenuItemsProperty; }

void MenuItemsSource ( winrt::IInspectable const & value )
winrt::IInspectable MenuItemsSource ( )
static winrt::DependencyProperty MenuItemsSourceProperty ( ) [inline, static]

Definition at line 144 of file NavigationView.properties.h.

{ return s_MenuItemsSourceProperty; }

void MenuItemTemplate ( winrt::DataTemplate const & value )
winrt::DataTemplate MenuItemTemplate ( )
static winrt::DependencyProperty MenuItemTemplateProperty ( ) [inline, static]

Definition at line 145 of file NavigationView.properties.h.

{ return s_MenuItemTemplateProperty; }

void MenuItemTemplateSelector ( winrt::DataTemplateSelector const & value )
winrt::DataTemplateSelector MenuItemTemplateSelector ( )
static winrt::DependencyProperty MenuItemTemplateSelectorProperty ( ) [inline, static]

Definition at line 146 of file NavigationView.properties.h.

{ return s_MenuItemTemplateSelectorProperty; }

static void OnAlwaysShowHeaderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnAutoSuggestBoxPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCompactModeThresholdWidthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCompactPaneLengthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnDisplayModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnExpandedModeThresholdWidthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnFooterMenuItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnFooterMenuItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHeaderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHeaderTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsBackButtonVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsBackEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsPaneOpenPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsPaneToggleButtonVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsPaneVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsSettingsVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsTitleBarAutoPaddingEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMenuItemContainerStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMenuItemContainerStyleSelectorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMenuItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMenuItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMenuItemTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMenuItemTemplateSelectorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnOpenPaneLengthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnOverflowLabelModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPaneDisplayModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPaneFooterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPaneTitlePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPaneToggleButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedItemPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectionFollowsFocusPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSettingsItemPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnShoulderNavigationEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void OpenPaneLength ( double value )
double OpenPaneLength ( )
static winrt::DependencyProperty OpenPaneLengthProperty ( ) [inline, static]

Definition at line 147 of file NavigationView.properties.h.

{ return s_OpenPaneLengthProperty; }

void OverflowLabelMode ( winrt::NavigationViewOverflowLabelMode const & value )
winrt::NavigationViewOverflowLabelMode OverflowLabelMode ( )
static winrt::DependencyProperty OverflowLabelModeProperty ( ) [inline, static]

Definition at line 148 of file NavigationView.properties.h.

{ return s_OverflowLabelModeProperty; }

void PaneClosed ( winrt::event_token const & token )
winrt::event_token PaneClosed ( winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const & value )
void PaneClosing ( winrt::event_token const & token )
winrt::event_token PaneClosing ( winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs > const & value )
void PaneCustomContent ( winrt::UIElement const & value )
winrt::UIElement PaneCustomContent ( )
static winrt::DependencyProperty PaneCustomContentProperty ( ) [inline, static]

Definition at line 149 of file NavigationView.properties.h.

{ return s_PaneCustomContentProperty; }

void PaneDisplayMode ( winrt::NavigationViewPaneDisplayMode const & value )
winrt::NavigationViewPaneDisplayMode PaneDisplayMode ( )
static winrt::DependencyProperty PaneDisplayModeProperty ( ) [inline, static]

Definition at line 150 of file NavigationView.properties.h.

{ return s_PaneDisplayModeProperty; }

void PaneFooter ( winrt::UIElement const & value )
winrt::UIElement PaneFooter ( )
static winrt::DependencyProperty PaneFooterProperty ( ) [inline, static]

Definition at line 151 of file NavigationView.properties.h.

{ return s_PaneFooterProperty; }

void PaneHeader ( winrt::UIElement const & value )
winrt::UIElement PaneHeader ( )
static winrt::DependencyProperty PaneHeaderProperty ( ) [inline, static]

Definition at line 152 of file NavigationView.properties.h.

{ return s_PaneHeaderProperty; }

void PaneOpened ( winrt::event_token const & token )
winrt::event_token PaneOpened ( winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const & value )
void PaneOpening ( winrt::event_token const & token )
winrt::event_token PaneOpening ( winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const & value )
winrt::hstring PaneTitle ( )
void PaneTitle ( winrt::hstring const & value )
static winrt::DependencyProperty PaneTitleProperty ( ) [inline, static]

Definition at line 153 of file NavigationView.properties.h.

{ return s_PaneTitleProperty; }

void PaneToggleButtonStyle ( winrt::Style const & value )
winrt::Style PaneToggleButtonStyle ( )
static winrt::DependencyProperty PaneToggleButtonStyleProperty ( ) [inline, static]

Definition at line 154 of file NavigationView.properties.h.

{ return s_PaneToggleButtonStyleProperty; }

void SelectedItem ( winrt::IInspectable const & value )
winrt::IInspectable SelectedItem ( )
static winrt::DependencyProperty SelectedItemProperty ( ) [inline, static]

Definition at line 155 of file NavigationView.properties.h.

{ return s_SelectedItemProperty; }

void SelectionChanged ( winrt::event_token const & token )
winrt::event_token SelectionChanged ( winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs > const & value )
winrt::NavigationViewSelectionFollowsFocus SelectionFollowsFocus ( )
void SelectionFollowsFocus ( winrt::NavigationViewSelectionFollowsFocus const & value )
static winrt::DependencyProperty SelectionFollowsFocusProperty ( ) [inline, static]

Definition at line 156 of file NavigationView.properties.h.

{ return s_SelectionFollowsFocusProperty; }

void SettingsItem ( winrt::IInspectable const & value )
winrt::IInspectable SettingsItem ( )
static winrt::DependencyProperty SettingsItemProperty ( ) [inline, static]

Definition at line 157 of file NavigationView.properties.h.

{ return s_SettingsItemProperty; }

winrt::NavigationViewShoulderNavigationEnabled ShoulderNavigationEnabled ( )
void ShoulderNavigationEnabled ( winrt::NavigationViewShoulderNavigationEnabled const & value )
static winrt::DependencyProperty ShoulderNavigationEnabledProperty ( ) [inline, static]

Definition at line 158 of file NavigationView.properties.h.

{ return s_ShoulderNavigationEnabledProperty; }

winrt::NavigationViewTemplateSettings TemplateSettings ( )
void TemplateSettings ( winrt::NavigationViewTemplateSettings const & value )
static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 159 of file NavigationView.properties.h.

{ return s_TemplateSettingsProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs> > m_backRequestedEventSource

Definition at line 220 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs> > m_collapsedEventSource

Definition at line 221 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs> > m_displayModeChangedEventSource

Definition at line 222 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs> > m_expandingEventSource

Definition at line 223 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs> > m_itemInvokedEventSource

Definition at line 224 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> > m_paneClosedEventSource

Definition at line 225 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs> > m_paneClosingEventSource

Definition at line 226 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> > m_paneOpenedEventSource

Definition at line 227 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> > m_paneOpeningEventSource

Definition at line 228 of file NavigationView.properties.h.

event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs> > m_selectionChangedEventSource

Definition at line 229 of file NavigationView.properties.h.

GlobalDependencyProperty s_AlwaysShowHeaderProperty [static]

Definition at line 161 of file NavigationView.properties.h.

GlobalDependencyProperty s_AutoSuggestBoxProperty [static]

Definition at line 162 of file NavigationView.properties.h.

GlobalDependencyProperty s_CompactModeThresholdWidthProperty [static]

Definition at line 163 of file NavigationView.properties.h.

GlobalDependencyProperty s_CompactPaneLengthProperty [static]

Definition at line 164 of file NavigationView.properties.h.

GlobalDependencyProperty s_ContentOverlayProperty [static]

Definition at line 165 of file NavigationView.properties.h.

GlobalDependencyProperty s_DisplayModeProperty [static]

Definition at line 166 of file NavigationView.properties.h.

GlobalDependencyProperty s_ExpandedModeThresholdWidthProperty [static]

Definition at line 167 of file NavigationView.properties.h.

GlobalDependencyProperty s_FooterMenuItemsProperty [static]

Definition at line 168 of file NavigationView.properties.h.

GlobalDependencyProperty s_FooterMenuItemsSourceProperty [static]

Definition at line 169 of file NavigationView.properties.h.

GlobalDependencyProperty s_HeaderProperty [static]

Definition at line 170 of file NavigationView.properties.h.

GlobalDependencyProperty s_HeaderTemplateProperty [static]

Definition at line 171 of file NavigationView.properties.h.

GlobalDependencyProperty s_IsBackButtonVisibleProperty [static]

Definition at line 172 of file NavigationView.properties.h.

GlobalDependencyProperty s_IsBackEnabledProperty [static]

Definition at line 173 of file NavigationView.properties.h.

GlobalDependencyProperty s_IsPaneOpenProperty [static]

Definition at line 174 of file NavigationView.properties.h.

GlobalDependencyProperty s_IsPaneToggleButtonVisibleProperty [static]

Definition at line 175 of file NavigationView.properties.h.

GlobalDependencyProperty s_IsPaneVisibleProperty [static]

Definition at line 176 of file NavigationView.properties.h.

GlobalDependencyProperty s_IsSettingsVisibleProperty [static]

Definition at line 177 of file NavigationView.properties.h.

GlobalDependencyProperty s_IsTitleBarAutoPaddingEnabledProperty [static]

Definition at line 178 of file NavigationView.properties.h.

GlobalDependencyProperty s_MenuItemContainerStyleProperty [static]

Definition at line 179 of file NavigationView.properties.h.

GlobalDependencyProperty s_MenuItemContainerStyleSelectorProperty [static]

Definition at line 180 of file NavigationView.properties.h.

GlobalDependencyProperty s_MenuItemsProperty [static]

Definition at line 181 of file NavigationView.properties.h.

GlobalDependencyProperty s_MenuItemsSourceProperty [static]

Definition at line 182 of file NavigationView.properties.h.

GlobalDependencyProperty s_MenuItemTemplateProperty [static]

Definition at line 183 of file NavigationView.properties.h.

GlobalDependencyProperty s_MenuItemTemplateSelectorProperty [static]

Definition at line 184 of file NavigationView.properties.h.

GlobalDependencyProperty s_OpenPaneLengthProperty [static]

Definition at line 185 of file NavigationView.properties.h.

GlobalDependencyProperty s_OverflowLabelModeProperty [static]

Definition at line 186 of file NavigationView.properties.h.

GlobalDependencyProperty s_PaneCustomContentProperty [static]

Definition at line 187 of file NavigationView.properties.h.

GlobalDependencyProperty s_PaneDisplayModeProperty [static]

Definition at line 188 of file NavigationView.properties.h.

GlobalDependencyProperty s_PaneFooterProperty [static]

Definition at line 189 of file NavigationView.properties.h.

GlobalDependencyProperty s_PaneHeaderProperty [static]

Definition at line 190 of file NavigationView.properties.h.

GlobalDependencyProperty s_PaneTitleProperty [static]

Definition at line 191 of file NavigationView.properties.h.

GlobalDependencyProperty s_PaneToggleButtonStyleProperty [static]

Definition at line 192 of file NavigationView.properties.h.

GlobalDependencyProperty s_SelectedItemProperty [static]

Definition at line 193 of file NavigationView.properties.h.

GlobalDependencyProperty s_SelectionFollowsFocusProperty [static]

Definition at line 194 of file NavigationView.properties.h.

GlobalDependencyProperty s_SettingsItemProperty [static]

Definition at line 195 of file NavigationView.properties.h.

GlobalDependencyProperty s_ShoulderNavigationEnabledProperty [static]

Definition at line 196 of file NavigationView.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 197 of file NavigationView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/NavigationView.properties.h
  • Generated/NavigationView.properties.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewSelectionChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NavigationViewSelectionChangedEventArgs Class Reference

#include "NavigationViewSelectionChangedEventArgs.h"

Inherits ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

bool | IsSettingsSelected ()
void | IsSettingsSelected (bool value)
void | RecommendedNavigationTransitionInfo (winrt::NavigationTransitionInfo const &value)
winrt::NavigationTransitionInfo | RecommendedNavigationTransitionInfo ()
void | SelectedItem (winrt::IInspectable const &value)
winrt::IInspectable | SelectedItem ()
void | SelectedItemContainer (winrt::NavigationViewItemBase const &value)
winrt::NavigationViewItemBase | SelectedItemContainer ()

Detailed Description

Definition at line 8 of file NavigationViewSelectionChangedEventArgs.h.

Member Function Documentation

bool IsSettingsSelected ( )
void IsSettingsSelected ( bool value )
void RecommendedNavigationTransitionInfo ( winrt::NavigationTransitionInfo const & value )
winrt::NavigationTransitionInfo RecommendedNavigationTransitionInfo ( )
void SelectedItem ( winrt::IInspectable const & value )
winrt::IInspectable SelectedItem ( )
void SelectedItemContainer ( winrt::NavigationViewItemBase const & value )
winrt::NavigationViewItemBase SelectedItemContainer ( )
The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewSelectionChangedEventArgs.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTemplateSettings Class Reference

#include "NavigationViewTemplateSettings.h"

Inherits NavigationViewTemplateSettingsProperties.

List of all members.

Detailed Description

Definition at line 9 of file NavigationViewTemplateSettings.h.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewTemplateSettings.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

NavigationViewTemplateSettingsProperties Class Reference

#include "NavigationViewTemplateSettings.properties.h"

Inherited by NavigationViewTemplateSettings.

List of all members.

Public Member Functions

NavigationViewTemplateSettingsProperties ()
void | BackButtonVisibility (winrt::Visibility const &value)
winrt::Visibility | BackButtonVisibility ()
void | LeftPaneVisibility (winrt::Visibility const &value)
winrt::Visibility | LeftPaneVisibility ()
void | OpenPaneLength (double value)
double | OpenPaneLength ()
void | OverflowButtonVisibility (winrt::Visibility const &value)
winrt::Visibility | OverflowButtonVisibility ()
void | PaneToggleButtonVisibility (winrt::Visibility const &value)
winrt::Visibility | PaneToggleButtonVisibility ()
void | PaneToggleButtonWidth (double value)
double | PaneToggleButtonWidth ()
bool | SingleSelectionFollowsFocus ()
void | SingleSelectionFollowsFocus (bool value)
void | SmallerPaneToggleButtonWidth (double value)
double | SmallerPaneToggleButtonWidth ()
void | TopPadding (double value)
double | TopPadding ()
winrt::Visibility | TopPaneVisibility ()
void | TopPaneVisibility (winrt::Visibility const &value)

Static Public Member Functions

static winrt::DependencyProperty | BackButtonVisibilityProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | LeftPaneVisibilityProperty ()
static winrt::DependencyProperty | OpenPaneLengthProperty ()
static winrt::DependencyProperty | OverflowButtonVisibilityProperty ()
static winrt::DependencyProperty | PaneToggleButtonVisibilityProperty ()
static winrt::DependencyProperty | PaneToggleButtonWidthProperty ()
static winrt::DependencyProperty | SingleSelectionFollowsFocusProperty ()
static winrt::DependencyProperty | SmallerPaneToggleButtonWidthProperty ()
static winrt::DependencyProperty | TopPaddingProperty ()
static winrt::DependencyProperty | TopPaneVisibilityProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_BackButtonVisibilityProperty
static GlobalDependencyProperty | s_LeftPaneVisibilityProperty
static GlobalDependencyProperty | s_OpenPaneLengthProperty
static GlobalDependencyProperty | s_OverflowButtonVisibilityProperty
static GlobalDependencyProperty | s_PaneToggleButtonVisibilityProperty
static GlobalDependencyProperty | s_PaneToggleButtonWidthProperty
static GlobalDependencyProperty | s_SingleSelectionFollowsFocusProperty
static GlobalDependencyProperty | s_SmallerPaneToggleButtonWidthProperty
static GlobalDependencyProperty | s_TopPaddingProperty
static GlobalDependencyProperty | s_TopPaneVisibilityProperty

Detailed Description

Definition at line 7 of file NavigationViewTemplateSettings.properties.h.

Constructor & Destructor Documentation

NavigationViewTemplateSettingsProperties ( )

Definition at line 27 of file NavigationViewTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void BackButtonVisibility ( winrt::Visibility const & value )

Definition at line 160 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_BackButtonVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
    }
}

winrt::Visibility BackButtonVisibility ( )

Definition at line 168 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_BackButtonVisibilityProperty));
}

static winrt::DependencyProperty BackButtonVisibilityProperty ( ) [inline, static]

Definition at line 42 of file NavigationViewTemplateSettings.properties.h.

{ return s_BackButtonVisibilityProperty; }

void ClearProperties ( ) [static]

Definition at line 146 of file NavigationViewTemplateSettings.properties.cpp.

{
    s_BackButtonVisibilityProperty = nullptr;
    s_LeftPaneVisibilityProperty = nullptr;
    s_OpenPaneLengthProperty = nullptr;
    s_OverflowButtonVisibilityProperty = nullptr;
    s_PaneToggleButtonVisibilityProperty = nullptr;
    s_PaneToggleButtonWidthProperty = nullptr;
    s_SingleSelectionFollowsFocusProperty = nullptr;
    s_SmallerPaneToggleButtonWidthProperty = nullptr;
    s_TopPaddingProperty = nullptr;
    s_TopPaneVisibilityProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 32 of file NavigationViewTemplateSettings.properties.cpp.

{
    if (!s_BackButtonVisibilityProperty)
    {
        s_BackButtonVisibilityProperty =
            InitializeDependencyProperty(
                L"BackButtonVisibility",
                winrt::name_of<winrt::Visibility>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
                nullptr);
    }
    if (!s_LeftPaneVisibilityProperty)
    {
        s_LeftPaneVisibilityProperty =
            InitializeDependencyProperty(
                L"LeftPaneVisibility",
                winrt::name_of<winrt::Visibility>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Visible),
                nullptr);
    }
    if (!s_OpenPaneLengthProperty)
    {
        s_OpenPaneLengthProperty =
            InitializeDependencyProperty(
                L"OpenPaneLength",
                winrt::name_of<double>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(320.0),
                nullptr);
    }
    if (!s_OverflowButtonVisibilityProperty)
    {
        s_OverflowButtonVisibilityProperty =
            InitializeDependencyProperty(
                L"OverflowButtonVisibility",
                winrt::name_of<winrt::Visibility>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
                nullptr);
    }
    if (!s_PaneToggleButtonVisibilityProperty)
    {
        s_PaneToggleButtonVisibilityProperty =
            InitializeDependencyProperty(
                L"PaneToggleButtonVisibility",
                winrt::name_of<winrt::Visibility>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Visible),
                nullptr);
    }
    if (!s_PaneToggleButtonWidthProperty)
    {
        s_PaneToggleButtonWidthProperty =
            InitializeDependencyProperty(
                L"PaneToggleButtonWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SingleSelectionFollowsFocusProperty)
    {
        s_SingleSelectionFollowsFocusProperty =
            InitializeDependencyProperty(
                L"SingleSelectionFollowsFocus",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_SmallerPaneToggleButtonWidthProperty)
    {
        s_SmallerPaneToggleButtonWidthProperty =
            InitializeDependencyProperty(
                L"SmallerPaneToggleButtonWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_TopPaddingProperty)
    {
        s_TopPaddingProperty =
            InitializeDependencyProperty(
                L"TopPadding",
                winrt::name_of<double>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                nullptr);
    }
    if (!s_TopPaneVisibilityProperty)
    {
        s_TopPaneVisibilityProperty =
            InitializeDependencyProperty(
                L"TopPaneVisibility",
                winrt::name_of<winrt::Visibility>(),
                winrt::name_of<winrt::NavigationViewTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
                nullptr);
    }
}

winrt::Visibility LeftPaneVisibility ( )

Definition at line 181 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_LeftPaneVisibilityProperty));
}

void LeftPaneVisibility ( winrt::Visibility const & value )

Definition at line 173 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_LeftPaneVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty LeftPaneVisibilityProperty ( ) [inline, static]

Definition at line 43 of file NavigationViewTemplateSettings.properties.h.

{ return s_LeftPaneVisibilityProperty; }

void OpenPaneLength ( double value )

Definition at line 186 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_OpenPaneLengthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double OpenPaneLength ( )

Definition at line 194 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_OpenPaneLengthProperty));
}

static winrt::DependencyProperty OpenPaneLengthProperty ( ) [inline, static]

Definition at line 44 of file NavigationViewTemplateSettings.properties.h.

{ return s_OpenPaneLengthProperty; }

winrt::Visibility OverflowButtonVisibility ( )

Definition at line 207 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_OverflowButtonVisibilityProperty));
}

void OverflowButtonVisibility ( winrt::Visibility const & value )

Definition at line 199 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_OverflowButtonVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty OverflowButtonVisibilityProperty ( ) [inline, static]

Definition at line 45 of file NavigationViewTemplateSettings.properties.h.

{ return s_OverflowButtonVisibilityProperty; }

void PaneToggleButtonVisibility ( winrt::Visibility const & value )

Definition at line 212 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_PaneToggleButtonVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
    }
}

winrt::Visibility PaneToggleButtonVisibility ( )

Definition at line 220 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_PaneToggleButtonVisibilityProperty));
}

static winrt::DependencyProperty PaneToggleButtonVisibilityProperty ( ) [inline, static]

Definition at line 46 of file NavigationViewTemplateSettings.properties.h.

{ return s_PaneToggleButtonVisibilityProperty; }

void PaneToggleButtonWidth ( double value )

Definition at line 225 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_PaneToggleButtonWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double PaneToggleButtonWidth ( )

Definition at line 233 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_PaneToggleButtonWidthProperty));
}

static winrt::DependencyProperty PaneToggleButtonWidthProperty ( ) [inline, static]

Definition at line 47 of file NavigationViewTemplateSettings.properties.h.

{ return s_PaneToggleButtonWidthProperty; }

void SingleSelectionFollowsFocus ( bool value )

Definition at line 238 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_SingleSelectionFollowsFocusProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool SingleSelectionFollowsFocus ( )

Definition at line 246 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_SingleSelectionFollowsFocusProperty));
}

static winrt::DependencyProperty SingleSelectionFollowsFocusProperty ( ) [inline, static]

Definition at line 48 of file NavigationViewTemplateSettings.properties.h.

{ return s_SingleSelectionFollowsFocusProperty; }

void SmallerPaneToggleButtonWidth ( double value )

Definition at line 251 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_SmallerPaneToggleButtonWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double SmallerPaneToggleButtonWidth ( )

Definition at line 259 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_SmallerPaneToggleButtonWidthProperty));
}

static winrt::DependencyProperty SmallerPaneToggleButtonWidthProperty ( ) [inline, static]

Definition at line 49 of file NavigationViewTemplateSettings.properties.h.

{ return s_SmallerPaneToggleButtonWidthProperty; }

double TopPadding ( )

Definition at line 272 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_TopPaddingProperty));
}

void TopPadding ( double value )

Definition at line 264 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_TopPaddingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TopPaddingProperty ( ) [inline, static]

Definition at line 50 of file NavigationViewTemplateSettings.properties.h.

{ return s_TopPaddingProperty; }

winrt::Visibility TopPaneVisibility ( )

Definition at line 285 of file NavigationViewTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_TopPaneVisibilityProperty));
}

void TopPaneVisibility ( winrt::Visibility const & value )

Definition at line 277 of file NavigationViewTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_TopPaneVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TopPaneVisibilityProperty ( ) [inline, static]

Definition at line 51 of file NavigationViewTemplateSettings.properties.h.

{ return s_TopPaneVisibilityProperty; }

Member Data Documentation

GlobalDependencyProperty s_BackButtonVisibilityProperty [static]

Definition at line 53 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_LeftPaneVisibilityProperty [static]

Definition at line 54 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_OpenPaneLengthProperty [static]

Definition at line 55 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_OverflowButtonVisibilityProperty [static]

Definition at line 56 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_PaneToggleButtonVisibilityProperty [static]

Definition at line 57 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_PaneToggleButtonWidthProperty [static]

Definition at line 58 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_SingleSelectionFollowsFocusProperty [static]

Definition at line 59 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_SmallerPaneToggleButtonWidthProperty [static]

Definition at line 60 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_TopPaddingProperty [static]

Definition at line 61 of file NavigationViewTemplateSettings.properties.h.

GlobalDependencyProperty s_TopPaneVisibilityProperty [static]

Definition at line 62 of file NavigationViewTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/NavigationViewTemplateSettings.properties.h
  • Generated/NavigationViewTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

NavigationViewTrace Class Reference

#include "NavigationViewTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file NavigationViewTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file NavigationViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "NavigationViewInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_NAVIGATIONVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"NavigationView") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 152 of file NavigationViewTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "NavigationViewPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_NAVIGATIONVIEW),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file NavigationViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "NavigationViewVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_NAVIGATIONVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"NavigationView") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file NavigationViewTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file NavigationViewTrace.h.

The documentation for this class was generated from the following file:
  • NavigationView/NavigationViewTrace.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NonReferenceTrackerStorageHelper< T > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NonReferenceTrackerStorageHelper< T > Struct Template Reference

#include "tracker_ref.h"

Inherited by event< T >.

List of all members.

Public Member Functions

T | unwrap (const T &value) const
auto | wrap (const T &value) const

Detailed Description

template<typename T>
struct NonReferenceTrackerStorageHelper< T >

Definition at line 458 of file tracker_ref.h.

Member Function Documentation

T unwrap ( const T & value ) const [inline]

Definition at line 465 of file tracker_ref.h.

    {
        return value;
    }

auto wrap ( const T & value ) const [inline]

Definition at line 460 of file tracker_ref.h.

    {
        return value;
    }

The documentation for this struct was generated from the following file:
  • inc/tracker_ref.h
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NonVirtualizingLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NonVirtualizingLayout Class Reference

#include "NonVirtualizingLayout.h"

Inherited by Flex, MyCustomNonVirtualizingStackLayout, MockNonVirtualizingLayout, NonVirtualStackLayout, and NonVirtualStackLayout.

List of all members.

Public Member Functions

NonVirtualizingLayout ()
virtual winrt::Size | ArrangeOverride (winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &finalSize)
virtual void | InitializeForContextCore (winrt::LayoutContext const &context)
virtual winrt::Size | MeasureOverride (winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &availableSize)
virtual void | UninitializeForContextCore (winrt::LayoutContext const &context)

Detailed Description

Definition at line 9 of file NonVirtualizingLayout.h.

Constructor & Destructor Documentation

NonVirtualizingLayout ( )

Definition at line 15 of file NonVirtualizingLayout.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_NonVirtualizingLayout);
}

Member Function Documentation

winrt::Size ArrangeOverride | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize |
 | ) |  |  | [virtual]

Definition at line 35 of file NonVirtualizingLayout.cpp.

{
    throw winrt::hresult_not_implemented();
}

void InitializeForContextCore ( winrt::LayoutContext const & context ) [virtual]

Definition at line 20 of file NonVirtualizingLayout.cpp.

{

}

winrt::Size MeasureOverride | ( | winrt::NonVirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize |
 | ) |  |  | [virtual]

Definition at line 30 of file NonVirtualizingLayout.cpp.

{
    throw winrt::hresult_not_implemented();
}

void UninitializeForContextCore ( winrt::LayoutContext const & context ) [virtual]

Definition at line 25 of file NonVirtualizingLayout.cpp.

{

}

The documentation for this class was generated from the following files:
  • Repeater/NonVirtualizingLayout.h
  • Repeater/NonVirtualizingLayout.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NonVirtualizingLayoutContext Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NonVirtualizingLayoutContext Class Reference

#include "NonvirtualizingLayoutContext.h"

List of all members.

Public Member Functions

winrt::IVectorView
< winrt::UIElement > 		Children ()
virtual winrt::IVectorView
< winrt::UIElement > 		ChildrenCore ()
winrt::VirtualizingLayoutContext GetVirtualizingContextAdapter ()

Detailed Description

Definition at line 9 of file NonvirtualizingLayoutContext.h.

Member Function Documentation

winrt::IVectorView< winrt::UIElement > Children ( )

Definition at line 14 of file NonvirtualizingLayoutContext.cpp.

{
    return overridable().ChildrenCore();
}

winrt::IVectorView< winrt::UIElement > ChildrenCore ( ) [virtual]

Definition at line 23 of file NonvirtualizingLayoutContext.cpp.

{
    throw winrt::hresult_not_implemented();
}

winrt::VirtualizingLayoutContext GetVirtualizingContextAdapter ( )

Definition at line 30 of file NonvirtualizingLayoutContext.cpp.

{
    if (!m_contextAdapter)
    {
        m_contextAdapter = winrt::make<LayoutContextAdapter>(get_strong().as<winrt::NonVirtualizingLayoutContext>());
    }
    return m_contextAdapter;
}

The documentation for this class was generated from the following files:
  • Repeater/NonvirtualizingLayoutContext.h
  • Repeater/NonvirtualizingLayoutContext.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NullableXamlType Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NullableXamlType Class Reference

#include "XamlType.h"

Inherits XamlTypeBase.

List of all members.

Public Member Functions

NullableXamlType (wstring_view const &typeName, wstring_view const &valueTypeName)

Detailed Description

Definition at line 98 of file XamlType.h.

Constructor & Destructor Documentation

NullableXamlType | ( | wstring_view const & | typeName,
 |  | wstring_view const & | valueTypeName
 | ) |  |

Definition at line 233 of file XamlType.cpp.

{
    m_typeName = typeName;
    m_boxedType = XamlMetadataProvider::LookupXamlType(valueTypeName);
}

The documentation for this class was generated from the following files:
  • dll/XamlType.h
  • dll/XamlType.cpp
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NullSelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

NullSelector Class Reference

#include "NullSelector.h"

Inherits SelectorBase.

List of all members.

Public Member Functions

NullSelector ()
~NullSelector ()

Detailed Description

Definition at line 8 of file NullSelector.h.

Constructor & Destructor Documentation

NullSelector ( )

Definition at line 8 of file NullSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~NullSelector ( )

Definition at line 13 of file NullSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

The documentation for this class was generated from the following files:
  • ItemsView/NullSelector.h
  • ItemsView/NullSelector.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

NumberBox Class Reference

#include "NumberBox.h"

Inherits ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT >, and NumberBoxProperties.

List of all members.

Public Member Functions

NumberBox ()
void | OnApplyTemplate ()
virtual winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnHeaderPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnHeaderTemplatePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsWrapEnabledPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMaximumPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMinimumPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnNumberFormatterPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSmallChangePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSpinButtonPlacementModePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnTextBoxLoaded (winrt::IInspectable const &, winrt::RoutedEventArgs const &)
void | OnTextPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnValidationModePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnValuePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | ValidateNumberFormatter (winrt::INumberFormatter2 value)
void | Value (double value)
double | Value ()

Private Member Functions

void | CoerceMaximum ()
void | CoerceMinimum ()
void | CoerceValue ()
winrt::DecimalFormatter | GetRegionalSettingsAwareDecimalFormatter ()
bool | IsInBounds (double value)
void | MoveCaretToTextEnd ()
void | OnAutomationPropertiesLabeledByPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OnAutomationPropertiesNamePropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OnIsEnabledChanged (const winrt::IInspectable &, const winrt::DependencyPropertyChangedEventArgs &)
void | OnNumberBoxGotFocus (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnNumberBoxKeyDown (winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args)
void | OnNumberBoxKeyUp (winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args)
void | OnNumberBoxLostFocus (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnNumberBoxScroll (winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnSpinDownClick (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnSpinUpClick (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | ReevaluateForwardedUIAProperties ()
void | SetDefaultInputScope ()
void | StepValue (double change)
void | UnhookEvents ()
void | UpdateHeaderPresenterState ()
void | UpdateSpinButtonEnabled ()
void | UpdateSpinButtonPlacement ()
void | UpdateTextToValue ()
void | UpdateValueToText ()
void | UpdateVisualStateForIsEnabledChange ()
void | ValidateInput ()

Detailed Description

Definition at line 27 of file NumberBox.h.

Constructor & Destructor Documentation

NumberBox ( )

Definition at line 35 of file NumberBox.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_NumberBox);

    NumberFormatter(GetRegionalSettingsAwareDecimalFormatter());

    PointerWheelChanged({ this, &NumberBox::OnNumberBoxScroll });

    GotFocus({ this, &NumberBox::OnNumberBoxGotFocus });
    LostFocus({ this, &NumberBox::OnNumberBoxLostFocus });

    SetDefaultStyleKey(this);
    SetDefaultInputScope();

    // We are not revoking this since the event and the listener reside on the same object and as such have the same lifecycle.
    // That means that as soon as the NumberBox gets removed so will the event and the listener.
    this->RegisterPropertyChangedCallback(winrt::AutomationProperties::NameProperty(), { this , &NumberBox::OnAutomationPropertiesNamePropertyChanged });
    this->RegisterPropertyChangedCallback(winrt::AutomationProperties::LabeledByProperty(), { this, &NumberBox::OnAutomationPropertiesLabeledByPropertyChanged });
}

Member Function Documentation

void CoerceMaximum ( ) [private]

Definition at line 451 of file NumberBox.cpp.

{
    const auto min = Minimum();
    if (Maximum() < min)
    {
        Maximum(min);
    }
}

void CoerceMinimum ( ) [private]

Definition at line 442 of file NumberBox.cpp.

{
    const auto max = Maximum();
    if (Minimum() > max)
    {
        Minimum(max);
    }
}

void CoerceValue ( ) [private]

Definition at line 460 of file NumberBox.cpp.

{
    // Validate that the value is in bounds
    const auto value = Value();
    if (!std::isnan(value) && !IsInBounds(value) && ValidationMode() == winrt::NumberBoxValidationMode::InvalidInputOverwritten)
    {
        // Coerce value to be within range
        const auto max = Maximum();
        if (value > max)
        {
            Value(max);
        }
        else
        {
            Value(Minimum());
        }
    }
}

winrt::DecimalFormatter GetRegionalSettingsAwareDecimalFormatter ( ) [private]

Definition at line 82 of file NumberBox.cpp.

{
    winrt::DecimalFormatter formatter = nullptr;

    WCHAR currentLocale[LOCALE_NAME_MAX_LENGTH] = {};
    if (GetUserDefaultLocaleName(currentLocale, LOCALE_NAME_MAX_LENGTH) != 0)
    {
        // GetUserDefaultLocaleName may return an invalid bcp47 language tag with trailing non-BCP47 friendly characters,
        // which if present would start with an underscore, for example sort order
        // (see https://msdn.microsoft.com/en-us/library/windows/desktop/dd373814(v=vs.85).aspx).
        // Therefore, if there is an underscore in the locale name, trim all characters from the underscore onwards.
        WCHAR* underscore = wcschr(currentLocale, L'_');
        if (underscore != nullptr)
        {
            *underscore = L'\0';
        }

        if (winrt::Language::IsWellFormed(currentLocale))
        {
            std::vector<winrt::hstring> languageList;
            languageList.push_back(winrt::hstring(currentLocale));
            formatter = winrt::DecimalFormatter(languageList, winrt::GlobalizationPreferences::HomeGeographicRegion());
        }
    }

    if (!formatter)
    {
        formatter = winrt::DecimalFormatter();
    }

    formatter.IntegerDigits(1);
    formatter.FractionDigits(0);

    return formatter;
}

bool IsInBounds ( double value ) [private]

Definition at line 712 of file NumberBox.cpp.

{
    return (value >= Minimum() && value <= Maximum());
}

void MoveCaretToTextEnd ( ) [private]

Definition at line 768 of file NumberBox.cpp.

{
    if (auto && textBox = m_textBox.get())
    {
        // This places the caret at the end of the text.
        textBox.Select(static_cast<int32_t>(textBox.Text().size()), 0);
    }
}

void OnApplyTemplate ( )

Definition at line 141 of file NumberBox.cpp.

{
    UnhookEvents();

    const winrt::IControlProtected controlProtected = *this;

    const auto spinDownName = ResourceAccessor::GetLocalizedStringResource(SR_NumberBoxDownSpinButtonName);
    const auto spinUpName = ResourceAccessor::GetLocalizedStringResource(SR_NumberBoxUpSpinButtonName);

    if (const auto spinDown = GetTemplateChildT<winrt::RepeatButton>(c_numberBoxDownButtonName, controlProtected))
    {
        m_downButtonClickRevoker = spinDown.Click(winrt::auto_revoke, { this, &NumberBox::OnSpinDownClick });

        // Do localization for the down button
        if (winrt::AutomationProperties::GetName(spinDown).empty())
        {
            winrt::AutomationProperties::SetName(spinDown, spinDownName);
        }
    }

    if (const auto spinUp = GetTemplateChildT<winrt::RepeatButton>(c_numberBoxUpButtonName, controlProtected))
    {
        m_upButtonClickRevoker = spinUp.Click(winrt::auto_revoke, { this, &NumberBox::OnSpinUpClick });

        // Do localization for the up button
        if (winrt::AutomationProperties::GetName(spinUp).empty())
        {
            winrt::AutomationProperties::SetName(spinUp, spinUpName);
        }
    }

    UpdateHeaderPresenterState();

    m_textBox.set([this, controlProtected]() {
        const auto textBox = GetTemplateChildT<winrt::TextBox>(c_numberBoxTextBoxName, controlProtected);
        if (textBox)
        {
            // Listen to PreviewKeyDown because textbox eats the down arrow key in some circumstances.
            m_textBoxPreviewKeyDownRevoker = textBox.PreviewKeyDown(winrt::auto_revoke, { this, &NumberBox::OnNumberBoxKeyDown });
            m_textBoxKeyUpRevoker = textBox.KeyUp(winrt::auto_revoke, { this, &NumberBox::OnNumberBoxKeyUp });
        }
        return textBox;
    }());

    if (const auto textBox = m_textBox.get())
    {
        m_textBoxLoadedRevoker = textBox.Loaded(winrt::auto_revoke, { this, &NumberBox::OnTextBoxLoaded });
    }

    m_popup.set(GetTemplateChildT<winrt::Popup>(c_numberBoxPopupName, controlProtected));

    if (const auto popupRoot = GetTemplateChildT<winrt::UIElement>(c_numberBoxPopupContentRootName, controlProtected))
    {
        if (!popupRoot.Shadow())
        {
            popupRoot.Shadow(winrt::ThemeShadow{});
            const auto translation = popupRoot.Translation();

            const double shadowDepth = unbox_value<double>(SharedHelpers::FindInApplicationResources(c_numberBoxPopupShadowDepthName, box_value(c_popupShadowDepth)));

            popupRoot.Translation({ translation.x, translation.y, static_cast<float>(shadowDepth) });
        }
    }

    if (const auto popupSpinDown = GetTemplateChildT<winrt::RepeatButton>(c_numberBoxPopupDownButtonName, controlProtected))
    {
        m_popupDownButtonClickRevoker = popupSpinDown.Click(winrt::auto_revoke, { this, &NumberBox::OnSpinDownClick });
    }

    if (const auto popupSpinUp = GetTemplateChildT<winrt::RepeatButton>(c_numberBoxPopupUpButtonName, controlProtected))
    {
        m_popupUpButtonClickRevoker = popupSpinUp.Click(winrt::auto_revoke, { this, &NumberBox::OnSpinUpClick });
    }

    m_isEnabledChangedRevoker = IsEnabledChanged(winrt::auto_revoke, { this,  &NumberBox::OnIsEnabledChanged });

    m_displayRounder.SignificantDigits(10);

    UpdateSpinButtonPlacement();
    UpdateSpinButtonEnabled();

    UpdateVisualStateForIsEnabledChange();

    ReevaluateForwardedUIAProperties();

    if (ReadLocalValue(s_ValueProperty) == winrt::DependencyProperty::UnsetValue()
        && ReadLocalValue(s_TextProperty) != winrt::DependencyProperty::UnsetValue())
    {
        // If Text has been set, but Value hasn't, update Value based on Text.
        UpdateValueToText();
    }
    else
    {
        UpdateTextToValue();
    }
}

void OnAutomationPropertiesLabeledByPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |  |
 | ) |  |  | [private]

Definition at line 369 of file NumberBox.cpp.

{
    ReevaluateForwardedUIAProperties();
}

void OnAutomationPropertiesNamePropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |  |
 | ) |  |  | [private]

Definition at line 364 of file NumberBox.cpp.

{
    ReevaluateForwardedUIAProperties();
}

winrt::AutomationPeer OnCreateAutomationPeer ( ) [virtual]

Definition at line 136 of file NumberBox.cpp.

{
    return winrt::make<NumberBoxAutomationPeer>(*this);
}

void OnHeaderPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 343 of file NumberBox.cpp.

{
    UpdateHeaderPresenterState();
}

void OnHeaderTemplatePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 348 of file NumberBox.cpp.

{
    UpdateHeaderPresenterState();
}

void OnIsEnabledChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::DependencyPropertyChangedEventArgs & |  |
 | ) |  |  | [private]

Definition at line 359 of file NumberBox.cpp.

{
    UpdateVisualStateForIsEnabledChange();
}

void OnIsWrapEnabledPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 301 of file NumberBox.cpp.

{
    UpdateSpinButtonEnabled();
}

void OnMaximumPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 287 of file NumberBox.cpp.

{
    CoerceMinimum();
    CoerceValue();

    UpdateSpinButtonEnabled();
    ReevaluateForwardedUIAProperties();
}

void OnMinimumPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 278 of file NumberBox.cpp.

{
    CoerceMaximum();
    CoerceValue();

    UpdateSpinButtonEnabled();
    ReevaluateForwardedUIAProperties();
}

void OnNumberBoxGotFocus | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 415 of file NumberBox.cpp.

{
    // When the control receives focus, select the text
    if (auto && textBox = m_textBox.get())
    {
        textBox.SelectAll();
    }

    if (SpinButtonPlacementMode() == winrt::NumberBoxSpinButtonPlacementMode::Compact)
    {
        if (auto && popup = m_popup.get())
        {
            popup.IsOpen(true);
        }
    }
}

void OnNumberBoxKeyDown | ( | winrt::IInspectable const & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 534 of file NumberBox.cpp.

{
    // Handle these on key down so that we get repeat behavior.
    switch (args.OriginalKey())
    {
        case winrt::VirtualKey::Up:
            StepValue(SmallChange());
            args.Handled(true);
            break;

        case winrt::VirtualKey::Down:
            StepValue(-SmallChange());
            args.Handled(true);
            break;

        case winrt::VirtualKey::PageUp:
            StepValue(LargeChange());
            args.Handled(true);
            break;

        case winrt::VirtualKey::PageDown:
            StepValue(-LargeChange());
            args.Handled(true);
            break;
    }
}

void OnNumberBoxKeyUp | ( | winrt::IInspectable const & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 561 of file NumberBox.cpp.

{
    switch (args.OriginalKey())
    {
    case winrt::VirtualKey::Enter:
    case winrt::VirtualKey::GamepadA:
        ValidateInput();
        args.Handled(true);
        break;

    case winrt::VirtualKey::Escape:
    case winrt::VirtualKey::GamepadB:
        UpdateTextToValue();
        args.Handled(true);
        break;
    }
}

void OnNumberBoxLostFocus | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 432 of file NumberBox.cpp.

{
    ValidateInput();

    if (auto && popup = m_popup.get())
    {
        popup.IsOpen(false);
    }
}

void OnNumberBoxScroll | ( | winrt::IInspectable const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 579 of file NumberBox.cpp.

{
    if (auto && textBox = m_textBox.get())
    {
        if (textBox.FocusState() != winrt::FocusState::Unfocused)
        {
            const auto delta = args.GetCurrentPoint(*this).Properties().MouseWheelDelta();
            if (delta > 0)
            {
                StepValue(SmallChange());
            }
            else if (delta < 0)
            {
                StepValue(-SmallChange());
            }
            // Only set as handled when we actually changed our state.
            args.Handled(true);
        }
    }
}

void OnNumberFormatterPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 306 of file NumberBox.cpp.

{
    // Update text with new formatting
    UpdateTextToValue();
}

void OnSmallChangePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 296 of file NumberBox.cpp.

{
    UpdateSpinButtonEnabled();
}

void OnSpinButtonPlacementModePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 321 of file NumberBox.cpp.

{
    UpdateSpinButtonPlacement();
}

void OnSpinDownClick | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 524 of file NumberBox.cpp.

{
    StepValue(-SmallChange());
}

void OnSpinUpClick | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 529 of file NumberBox.cpp.

{
    StepValue(SmallChange());
}

void OnTextBoxLoaded | ( | winrt::IInspectable const & | ,
 |  | winrt::RoutedEventArgs const & |
 | ) |  |

Definition at line 238 of file NumberBox.cpp.

{
    // Updating again once TextBox is loaded so its visual states are set properly.
    UpdateSpinButtonPlacement();
}

void OnTextPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 326 of file NumberBox.cpp.

{
    if (!m_textUpdating)
    {
        UpdateValueToText();
    }
}

void OnValidationModePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 353 of file NumberBox.cpp.

{
    ValidateInput();
    UpdateSpinButtonEnabled();
}

void OnValuePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 244 of file NumberBox.cpp.

{
    // This handler may change Value; don't send extra events in that case.
    if (!m_valueUpdating)
    {
        const auto oldValue = unbox_value<double>(args.OldValue());

        auto scopeGuard = gsl::finally([this]()
        {
            m_valueUpdating = false;
        });
        m_valueUpdating = true;

        CoerceValue();

        const auto newValue = Value();
        if (newValue != oldValue && !(std::isnan(newValue) && std::isnan(oldValue)))
        {
            // Fire ValueChanged event
            const auto valueChangedArgs = winrt::make_self<NumberBoxValueChangedEventArgs>(oldValue, newValue);
            m_valueChangedEventSource(*this, *valueChangedArgs);

            // Fire value property change for UIA
            if (const auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this).as<winrt::NumberBoxAutomationPeer>())
            {
                winrt::get_self<NumberBoxAutomationPeer>(peer)->RaiseValueChangedEvent(oldValue, newValue);
            }
        }

        UpdateTextToValue();
        UpdateSpinButtonEnabled();
    }
}

void ReevaluateForwardedUIAProperties ( ) [private]

Definition at line 374 of file NumberBox.cpp.

{
    if (const auto textBox = m_textBox.get())
    {
        // UIA Name
        const auto name = winrt::AutomationProperties::GetName(*this);
        const auto minimum = Minimum() == -std::numeric_limits<double>::max() ?
            winrt::hstring{} :
            winrt::hstring{ L" " + ResourceAccessor::GetLocalizedStringResource(SR_NumberBoxMinimumValueStatus) + winrt::to_hstring(Minimum()) };
        const auto maximum = Maximum() == std::numeric_limits<double>::max() ?
            winrt::hstring{} :
            winrt::hstring{ L" " + ResourceAccessor::GetLocalizedStringResource(SR_NumberBoxMaximumValueStatus) + winrt::to_hstring(Maximum()) };

        if (!name.empty())
        {
            // AutomationProperties.Name is a non empty string, we will use that value.
            winrt::AutomationProperties::SetName(textBox, name + minimum + maximum );
        }
        else
        {
            if (const auto headerAsString = Header().try_as<winrt::IReference<winrt::hstring>>())
            {
                // Header is a string, we can use that as our UIA name.
                winrt::AutomationProperties::SetName(textBox, headerAsString.Value() + minimum + maximum );
            }
        }

        // UIA LabeledBy
        const auto labeledBy = winrt::AutomationProperties::GetLabeledBy(*this);
        if (labeledBy)
        {
            winrt::AutomationProperties::SetLabeledBy(textBox, labeledBy);
        }
    }
}

void SetDefaultInputScope ( ) [private]

Definition at line 68 of file NumberBox.cpp.

{
    // Sets the default value of the InputScope property.
    // Note that InputScope is a class that cannot be set to a default value within the IDL.
    const auto inputScopeName = winrt::InputScopeName(winrt::InputScopeNameValue::Number);
    const auto inputScope = winrt::InputScope();
    inputScope.Names().Append(inputScopeName);

    static_cast<NumberBox*>(this)->SetValue(s_InputScopeProperty, ValueHelper<winrt::InputScope>::BoxValueIfNecessary(inputScope));

    return;
}

void StepValue ( double change ) [private]

Definition at line 600 of file NumberBox.cpp.

{
    // Before adjusting the value, validate the contents of the textbox so we don't override it.
    ValidateInput();

    auto newVal = Value();
    if (!std::isnan(newVal))
    {
        newVal += change;

        if (IsWrapEnabled())
        {
            const auto max = Maximum();
            const auto min = Minimum();

            if (newVal > max)
            {
                newVal = min;
            }
            else if (newVal < min)
            {
                newVal = max;
            }
        }

        Value(newVal);

        // We don't want the caret to move to the front of the text for example when using the up/down arrows
        // to change the numberbox value.
        MoveCaretToTextEnd();
    }
}

void UnhookEvents ( ) [private]

Definition at line 55 of file NumberBox.cpp.

{
    m_upButtonClickRevoker.revoke();
    m_downButtonClickRevoker.revoke();
    m_textBoxPreviewKeyDownRevoker.revoke();
    m_textBoxKeyDownRevoker.revoke();
    m_textBoxKeyUpRevoker.revoke();
    m_popupUpButtonClickRevoker.revoke();
    m_popupDownButtonClickRevoker.revoke();
    m_isEnabledChangedRevoker.revoke();
    m_textBoxLoadedRevoker.revoke();
}

void UpdateHeaderPresenterState ( ) [private]

Definition at line 717 of file NumberBox.cpp.

{
    bool shouldShowHeader = false;

    // Load header presenter as late as possible

    // To enable lightweight styling, collapse header presenter if there is no header specified
    if (const auto header = Header())
    {
        // Check if header is string or not
        if (const auto headerAsString = header.try_as<winrt::IReference<winrt::hstring>>())
        {
            if (!headerAsString.Value().empty())
            {
                // Header is not empty string
                shouldShowHeader = true;
            }
        }
        else
        {
            // Header is not a string, so let's show header presenter
            shouldShowHeader = true;
            // When our header isn't a string, we use the NumberBox's UIA name for the textbox's UIA name.
            if (const auto textBox = m_textBox.get())
            {
                winrt::AutomationProperties::SetName(textBox, winrt::AutomationProperties::GetName(*this));
            }
        }
    }
    if(const auto headerTemplate = HeaderTemplate())
    {
        shouldShowHeader = true;
    }

    if(shouldShowHeader && m_headerPresenter == nullptr)
    {
        if (const auto headerPresenter = GetTemplateChildT<winrt::ContentPresenter>(c_numberBoxHeaderName, (winrt::IControlProtected)*this))
        {
            // Set presenter to enable lightweight styling of the headers margin
            m_headerPresenter.set(headerPresenter);
        }
    }

    if (auto&& headerPresenter = m_headerPresenter.get())
    {
        headerPresenter.Visibility(shouldShowHeader ? winrt::Visibility::Visible : winrt::Visibility::Collapsed);
    }

    ReevaluateForwardedUIAProperties();
}

void UpdateSpinButtonEnabled ( ) [private]

Definition at line 681 of file NumberBox.cpp.

{
    const auto value = Value();
    bool isUpButtonEnabled = false;
    bool isDownButtonEnabled = false;

    if (!std::isnan(value))
    {
        if (IsWrapEnabled() || ValidationMode() != winrt::NumberBoxValidationMode::InvalidInputOverwritten)
        {
            // If wrapping is enabled, or invalid values are allowed, then the buttons should be enabled
            isUpButtonEnabled = true;
            isDownButtonEnabled = true;
        }
        else
        {
            if (value < Maximum())
            {
                isUpButtonEnabled = true;
            }
            if (value > Minimum())
            {
                isDownButtonEnabled = true;
            }
        }
    }

    winrt::VisualStateManager::GoToState(*this, isUpButtonEnabled ? L"UpSpinButtonEnabled" : L"UpSpinButtonDisabled", false);
    winrt::VisualStateManager::GoToState(*this, isDownButtonEnabled ? L"DownSpinButtonEnabled" : L"DownSpinButtonDisabled", false);
}

void UpdateSpinButtonPlacement ( ) [private]

Definition at line 659 of file NumberBox.cpp.

{
    const auto spinButtonMode = SpinButtonPlacementMode();
    auto state = L"SpinButtonsCollapsed";

    if (spinButtonMode == winrt::NumberBoxSpinButtonPlacementMode::Inline)
    {
        state = L"SpinButtonsVisible";
    }
    else if (spinButtonMode == winrt::NumberBoxSpinButtonPlacementMode::Compact)
    {
        state = L"SpinButtonsPopup";
    }

    winrt::VisualStateManager::GoToState(*this, state, false);

    if (const auto textbox = m_textBox.get())
    {
        winrt::VisualStateManager::GoToState(textbox, state, false);
    }
}

void UpdateTextToValue ( ) [private]

Definition at line 634 of file NumberBox.cpp.

{
    if (auto && textBox = m_textBox.get())
    {
        winrt::hstring newText = L"";

        const auto value = Value();
        if (!std::isnan(value))
        {
            // Rounding the value here will prevent displaying digits caused by floating point imprecision.
            const auto roundedValue = m_displayRounder.RoundDouble(value);
            newText = NumberFormatter().FormatDouble(roundedValue);
        }

        textBox.Text(newText);

        auto scopeGuard = gsl::finally([this]()
        {
            m_textUpdating = false;
        });
        m_textUpdating = true;
        Text(newText.data());
    }
}

void UpdateValueToText ( ) [private]

Definition at line 334 of file NumberBox.cpp.

{
    if (auto && textBox = m_textBox.get())
    {
        textBox.Text(Text());
        ValidateInput();
    }
}

void UpdateVisualStateForIsEnabledChange ( ) [private]

Definition at line 410 of file NumberBox.cpp.

{
    winrt::VisualStateManager::GoToState(*this, IsEnabled() ? L"Normal" : L"Disabled", false);
}

void ValidateInput ( ) [private]

Definition at line 479 of file NumberBox.cpp.

{
    // Validate the content of the inner textbox
    if (auto&& textBox = m_textBox.get())
    {
        const auto text = trim(textBox.Text().data());

        // Handles empty TextBox case, set text to current value
        if (text.empty())
        {
            Value(std::numeric_limits<double>::quiet_NaN());
        }
        else
        {
            // Setting NumberFormatter to something that isn't an INumberParser will throw an exception, so this should be safe
            const auto numberParser = NumberFormatter().as<winrt::INumberParser>();

            const winrt::IReference<double> value = AcceptsExpression()
                ? NumberBoxParser::Compute(text, numberParser)
                : numberParser.ParseDouble(text);

            if (!value)
            {
                if (ValidationMode() == winrt::NumberBoxValidationMode::InvalidInputOverwritten)
                {
                    // Override text to current value
                    UpdateTextToValue();
                }
            }
            else
            {
                if (value.Value() == Value())
                {
                    // Even if the value hasn't changed, we still want to update the text (e.g. Value is 3, user types 1 + 2, we want to replace the text with 3)
                    UpdateTextToValue();
                }
                else
                {
                    Value(value.Value());
                }
            }
        }
    }
}

void ValidateNumberFormatter ( winrt::INumberFormatter2 value )

Definition at line 312 of file NumberBox.cpp.

{
    // NumberFormatter also needs to be an INumberParser
    if (!value.try_as<winrt::INumberParser>())
    {
        throw winrt::hresult_error(E_INVALIDARG);
    }
}

double Value ( )

Reimplemented from NumberBoxProperties.

Definition at line 131 of file NumberBox.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_ValueProperty));
}

void Value ( double value )

Reimplemented from NumberBoxProperties.

Definition at line 118 of file NumberBox.cpp.

{
    // When using two way bindings to Value using x:Bind, we could end up with a stack overflow because
    // nan != nan. However in this case, we are using nan as a value to represent value not set (cleared)
    // and that can happen quite often. We can avoid the stack overflow by breaking the cycle here. This is possible
    // for x:Bind since the generated code goes through this property setter. This is not the case for Binding
    // unfortunately. x:Bind is recommended over Binding anyway due to its perf and debuggability benefits.
    if (!std::isnan(value) || !std::isnan(Value()))
    {
        static_cast<NumberBox*>(this)->SetValue(s_ValueProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

The documentation for this class was generated from the following files:
  • NumberBox/NumberBox.h
  • NumberBox/NumberBox.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

NumberBoxAutomationPeer Class Reference

#include "NumberBoxAutomationPeer.h"

Inherits ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider >.

List of all members.

Public Member Functions

NumberBoxAutomationPeer (winrt::NumberBox const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | IsReadOnly ()
double | LargeChange ()
double | Maximum ()
double | Minimum ()
void | RaiseValueChangedEvent (double oldValue, double newValue)
void | SetValue (double value)
double | SmallChange ()
double | Value ()

Private Member Functions

com_ptr< NumberBox > | GetImpl ()

Detailed Description

Definition at line 9 of file NumberBoxAutomationPeer.h.

Constructor & Destructor Documentation

NumberBoxAutomationPeer ( winrt::NumberBox const & owner )

Definition at line 13 of file NumberBoxAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 49 of file NumberBoxAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Spinner;
}

hstring GetClassNameCore ( )

Definition at line 29 of file NumberBoxAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::NumberBox>();
}

com_ptr< NumberBox > GetImpl ( ) [private]

Definition at line 54 of file NumberBoxAutomationPeer.cpp.

{
    com_ptr<NumberBox> impl = nullptr;

    if (auto numberBox = Owner().try_as<winrt::NumberBox>())
    {
        impl = winrt::get_self<NumberBox>(numberBox)->get_strong();
    }

    return impl;
}

hstring GetNameCore ( )

Definition at line 34 of file NumberBoxAutomationPeer.cpp.

{
    winrt::hstring name = __super::GetNameCore();

    if (name.empty())
    {
        if (auto numberBox = Owner().try_as<winrt::NumberBox>())
        {
            name = SharedHelpers::TryGetStringRepresentationFromObject(numberBox.Header());
        }
    }

    return name;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file NumberBoxAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::RangeValue)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

bool IsReadOnly ( ) [inline]

Definition at line 23 of file NumberBoxAutomationPeer.h.

{ return false; }

double LargeChange ( )

Definition at line 87 of file NumberBoxAutomationPeer.cpp.

{
    return GetImpl()->LargeChange();
}

double Maximum ( )

Definition at line 72 of file NumberBoxAutomationPeer.cpp.

{
    return GetImpl()->Maximum();
}

double Minimum ( )

Definition at line 67 of file NumberBoxAutomationPeer.cpp.

{
    return GetImpl()->Minimum();
}

void RaiseValueChangedEvent | ( | double | oldValue,
 |  | double | newValue
 | ) |  |

Definition at line 97 of file NumberBoxAutomationPeer.cpp.

{
    __super::RaisePropertyChangedEvent(winrt::RangeValuePatternIdentifiers::ValueProperty(),
        winrt::PropertyValue::CreateDouble(oldValue),
        winrt::PropertyValue::CreateDouble(newValue));
}

void SetValue ( double value )

Definition at line 92 of file NumberBoxAutomationPeer.cpp.

{
    GetImpl()->Value(value);
}

double SmallChange ( )

Definition at line 82 of file NumberBoxAutomationPeer.cpp.

{
    return GetImpl()->SmallChange();
}

double Value ( )

Definition at line 77 of file NumberBoxAutomationPeer.cpp.

{
    return GetImpl()->Value();
}

The documentation for this class was generated from the following files:
  • NumberBox/NumberBoxAutomationPeer.h
  • NumberBox/NumberBoxAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxParser Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Private Member Functions

NumberBoxParser Class Reference

#include "NumberBoxParser.h"

List of all members.

Static Public Member Functions

static winrt::IReference< double > | Compute (const std::wstring_view expr, const winrt::INumberParser &numberParser)

Static Private Member Functions

static winrt::IReference< double > | ComputePostfixExpression (const std::vector< MathToken > &tokens)
static std::vector< MathToken > | ConvertInfixToPostfix (const std::vector< MathToken > &tokens)
static std::tuple< double, size_t > | GetNextNumber (const std::wstring &input, const winrt::INumberParser &numberParser)
static int constexpr | GetPrecedenceValue (wchar_t c)
static std::vector< MathToken > | GetTokens (const wchar_t *input, const winrt::INumberParser &numberParser)

Detailed Description

Definition at line 28 of file NumberBoxParser.h.

Member Function Documentation

winrt::IReference< double > Compute | ( | const std::wstring_view | expr,
 |  | const winrt::INumberParser & | numberParser |
 | ) |  |  | [static]

Definition at line 255 of file NumberBoxParser.cpp.

{
    // Tokenize the input string
    auto tokens = GetTokens(expr.data(), numberParser);
    if (tokens.size() > 0)
    {
        // Rearrange to postfix notation
        auto postfixTokens = ConvertInfixToPostfix(tokens);
        if (postfixTokens.size() > 0)
        {
            // Compute expression
            return ComputePostfixExpression(postfixTokens);
        }
    }

    return nullptr;
}

winrt::IReference< double > ComputePostfixExpression ( const std::vector< MathToken > & tokens ) [static, private]

Definition at line 182 of file NumberBoxParser.cpp.

{
    std::stack<double> stack;

    for (auto const& token : tokens)
    {
        if (token.Type == MathTokenType::Operator)
        {
            // There has to be at least two values on the stack to apply
            if (stack.size() < 2)
            {
                return nullptr;
            }

            const auto op1 = stack.top();
            stack.pop();

            const auto op2 = stack.top();
            stack.pop();

            double result;

            switch (token.Char)
            {
                case L'-':
                    result = op2 - op1;
                    break;

                case L'+':
                    result = op1 + op2;
                    break;

                case L'*':
                    result = op1 * op2;
                    break;

                case L'/':
                    if (op1 == 0)
                    {
                        // divide by zero
                        return std::numeric_limits<double>::quiet_NaN();
                    }
                    else
                    {
                        result = op2 / op1;
                    }
                    break;

                case L'^':
                    result = std::pow(op2, op1);
                    break;

                default:
                    return nullptr;
            }

            stack.push(result);
        }
        else if (token.Type == MathTokenType::Numeric)
        {
            stack.push(token.Value);
        }
    }

    // If there is more than one number on the stack, we didn't have enough operations, which is also an error.
    if (stack.size() != 1)
    {
        return nullptr;
    }

    return stack.top();
}

std::vector< MathToken > ConvertInfixToPostfix ( const std::vector< MathToken > & tokens ) [static, private]

Definition at line 111 of file NumberBoxParser.cpp.

{
    std::vector<MathToken> postfixTokens;
    std::stack<MathToken> operatorStack;

    for (auto const& token : infixTokens)
    {
        if (token.Type == MathTokenType::Numeric)
        {
            postfixTokens.push_back(token);
        }
        else if (token.Type == MathTokenType::Operator)
        {
            while (!operatorStack.empty())
            {
                const auto& top = operatorStack.top();
                if (top.Type != MathTokenType::Parenthesis && (GetPrecedenceValue(top.Char) >= GetPrecedenceValue(token.Char)))
                {
                    postfixTokens.push_back(operatorStack.top());
                    operatorStack.pop();
                }
                else
                {
                    break;
                }
            }
            operatorStack.push(token);
        }
        else if (token.Type == MathTokenType::Parenthesis)
        {
            if (token.Char == L'(')
            {
                operatorStack.push(token);
            }
            else
            {
                while (!operatorStack.empty() && operatorStack.top().Char != L'(')
                {
                    // Pop operators onto output until we reach a left paren
                    postfixTokens.push_back(operatorStack.top());
                    operatorStack.pop();
                }

                if (operatorStack.empty())
                {
                    // Broken parenthesis
                    return {};
                }

                // Pop left paren and discard
                operatorStack.pop();
            }
        }
    }

    // Pop all remaining operators.
    while (!operatorStack.empty())
    {
        if (operatorStack.top().Type == MathTokenType::Parenthesis)
        {
            // Broken parenthesis
            return {};
        }

        postfixTokens.push_back(operatorStack.top());
        operatorStack.pop();
    }

    return postfixTokens;
}

std::tuple< double, size_t > GetNextNumber | ( | const std::wstring & | input,
 |  | const winrt::INumberParser & | numberParser |
 | ) |  |  | [static, private]

Definition at line 74 of file NumberBoxParser.cpp.

{
    // Attempt to parse anything before an operator or space as a number
    std::wregex regex(L"^-?([^-+/*\\(\\)\\^\\s]+)");
    std::wsmatch match;
    if (std::regex_search(input.cbegin(), input.cend(), match, regex))
    {
        // Might be a number
        const auto matchLength = match[0].length();
        const auto parsedNum = numberParser.ParseDouble(input.substr(0, matchLength));

        if (parsedNum)
        {
            // Parsing was successful
            return { parsedNum.Value(), matchLength };
        }
    }

    return { std::numeric_limits<double>::quiet_NaN(), 0 };
}

int constexpr GetPrecedenceValue ( wchar_t c ) [static, private]

Definition at line 95 of file NumberBoxParser.cpp.

{
    int opPrecedence = 0;
    if (c == L'*' || c == L'/')
    {
        opPrecedence = 1;
    }
    else if (c == L'^')
    {
        opPrecedence = 2;
    }

    return opPrecedence;
}

std::vector< MathToken > GetTokens | ( | const wchar_t * | input,
 |  | const winrt::INumberParser & | numberParser |
 | ) |  |  | [static, private]

Definition at line 12 of file NumberBoxParser.cpp.

{
    auto tokens = std::vector<MathToken>();

    bool expectNumber = true;
    while (input[0] != '\0')
    {
        // Skip spaces
        const auto nextChar = input[0];
        if (nextChar != L' ')
        {
            if (expectNumber)
            {
                if (nextChar == '(')
                {
                    // Open parens are also acceptable, but don't change the next expected token type.
                    tokens.push_back(MathToken(MathTokenType::Parenthesis, nextChar));
                }
                else
                {
                    const auto [value, charLength] = GetNextNumber(input, numberParser);

                    if (charLength > 0)
                    {
                        tokens.push_back(MathToken(MathTokenType::Numeric, value));
                        input += charLength - 1; // advance the end of the token
                        expectNumber = false; // next token should be an operator
                    }
                    else
                    {
                        // Error case -- next token is not a number
                        return {};
                    }
                }
            }
            else
            {
                if (c_numberBoxOperators.find(nextChar) != std::wstring::npos)
                {
                    tokens.push_back(MathToken(MathTokenType::Operator, nextChar));
                    expectNumber = true; // next token should be a number
                }
                else if (nextChar == ')')
                {
                    // Closed parens are also acceptable, but don't change the next expected token type.
                    tokens.push_back(MathToken(MathTokenType::Parenthesis, nextChar));
                }
                else
                {
                    // Error case -- could not evaluate part of the expression
                    return {};
                }
            }
        }

        input++;
    }

    return tokens;
}

The documentation for this class was generated from the following files:
  • NumberBox/NumberBoxParser.h
  • NumberBox/NumberBoxParser.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

NumberBoxProperties Class Reference

#include "NumberBox.properties.h"

Inherited by NumberBox.

List of all members.

Public Member Functions

NumberBoxProperties ()
void | AcceptsExpression (bool value)
bool | AcceptsExpression ()
void | Description (winrt::IInspectable const &value)
winrt::IInspectable | Description ()
void | Header (winrt::IInspectable const &value)
winrt::IInspectable | Header ()
void | HeaderTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | HeaderTemplate ()
void | InputScope (winrt::InputScope const &value)
winrt::InputScope | InputScope ()
void | IsWrapEnabled (bool value)
bool | IsWrapEnabled ()
void | LargeChange (double value)
double | LargeChange ()
void | Maximum (double value)
double | Maximum ()
void | Minimum (double value)
double | Minimum ()
void | NumberFormatter (winrt::INumberFormatter2 const &value)
winrt::INumberFormatter2 | NumberFormatter ()
void | PlaceholderText (winrt::hstring const &value)
winrt::hstring | PlaceholderText ()
void | PreventKeyboardDisplayOnProgrammaticFocus (bool value)
bool | PreventKeyboardDisplayOnProgrammaticFocus ()
winrt::FlyoutBase | SelectionFlyout ()
void | SelectionFlyout (winrt::FlyoutBase const &value)
void | SelectionHighlightColor (winrt::SolidColorBrush const &value)
winrt::SolidColorBrush | SelectionHighlightColor ()
double | SmallChange ()
void | SmallChange (double value)
void | SpinButtonPlacementMode (winrt::NumberBoxSpinButtonPlacementMode const &value)
winrt::NumberBoxSpinButtonPlacementMode | SpinButtonPlacementMode ()
void | Text (winrt::hstring const &value)
winrt::hstring | Text ()
void | TextAlignment (winrt::TextAlignment const &value)
winrt::TextAlignment | TextAlignment ()
void | TextReadingOrder (winrt::TextReadingOrder const &value)
winrt::TextReadingOrder | TextReadingOrder ()
void | ValidationMode (winrt::NumberBoxValidationMode const &value)
winrt::NumberBoxValidationMode | ValidationMode ()
double | Value ()
void | Value (double value)
void | ValueChanged (winrt::event_token const &token)
winrt::event_token | ValueChanged (winrt::TypedEventHandler< winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs > const &value)

Static Public Member Functions

static winrt::DependencyProperty | AcceptsExpressionProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | DescriptionProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HeaderProperty ()
static winrt::DependencyProperty | HeaderTemplateProperty ()
static winrt::DependencyProperty | InputScopeProperty ()
static winrt::DependencyProperty | IsWrapEnabledProperty ()
static winrt::DependencyProperty | LargeChangeProperty ()
static winrt::DependencyProperty | MaximumProperty ()
static winrt::DependencyProperty | MinimumProperty ()
static winrt::DependencyProperty | NumberFormatterProperty ()
static void | OnHeaderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHeaderTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsWrapEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaximumPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinimumPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNumberFormatterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSmallChangePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSpinButtonPlacementModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTextPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnValidationModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PlaceholderTextProperty ()
static winrt::DependencyProperty | PreventKeyboardDisplayOnProgrammaticFocusProperty ()
static winrt::DependencyProperty | SelectionFlyoutProperty ()
static winrt::DependencyProperty | SelectionHighlightColorProperty ()
static winrt::DependencyProperty | SmallChangeProperty ()
static winrt::DependencyProperty | SpinButtonPlacementModeProperty ()
static winrt::DependencyProperty | TextAlignmentProperty ()
static winrt::DependencyProperty | TextProperty ()
static winrt::DependencyProperty | TextReadingOrderProperty ()
static winrt::DependencyProperty | ValidationModeProperty ()
static winrt::DependencyProperty | ValueProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::NumberBox,
winrt::NumberBoxValueChangedEventArgs > > 		m_valueChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_AcceptsExpressionProperty
static GlobalDependencyProperty | s_DescriptionProperty
static GlobalDependencyProperty | s_HeaderProperty
static GlobalDependencyProperty | s_HeaderTemplateProperty
static GlobalDependencyProperty | s_InputScopeProperty
static GlobalDependencyProperty | s_IsWrapEnabledProperty
static GlobalDependencyProperty | s_LargeChangeProperty
static GlobalDependencyProperty | s_MaximumProperty
static GlobalDependencyProperty | s_MinimumProperty
static GlobalDependencyProperty | s_NumberFormatterProperty
static GlobalDependencyProperty | s_PlaceholderTextProperty
static GlobalDependencyProperty | s_PreventKeyboardDisplayOnProgrammaticFocusProperty
static GlobalDependencyProperty | s_SelectionFlyoutProperty
static GlobalDependencyProperty | s_SelectionHighlightColorProperty
static GlobalDependencyProperty | s_SmallChangeProperty
static GlobalDependencyProperty | s_SpinButtonPlacementModeProperty
static GlobalDependencyProperty | s_TextAlignmentProperty
static GlobalDependencyProperty | s_TextProperty
static GlobalDependencyProperty | s_TextReadingOrderProperty
static GlobalDependencyProperty | s_ValidationModeProperty
static GlobalDependencyProperty | s_ValueProperty

Detailed Description

Definition at line 7 of file NumberBox.properties.h.

Constructor & Destructor Documentation

NumberBoxProperties ( )

Definition at line 38 of file NumberBox.properties.cpp.

    : m_valueChangedEventSource{static_cast<NumberBox*>(this)}

Member Function Documentation

void AcceptsExpression ( bool value )
bool AcceptsExpression ( )
static winrt::DependencyProperty AcceptsExpressionProperty ( ) [inline, static]

Definition at line 75 of file NumberBox.properties.h.

{ return s_AcceptsExpressionProperty; }

static void ClearProperties ( ) [static]
winrt::IInspectable Description ( )
void Description ( winrt::IInspectable const & value )
static winrt::DependencyProperty DescriptionProperty ( ) [inline, static]

Definition at line 76 of file NumberBox.properties.h.

{ return s_DescriptionProperty; }

static void EnsureProperties ( ) [static]
void Header ( winrt::IInspectable const & value )
winrt::IInspectable Header ( )
static winrt::DependencyProperty HeaderProperty ( ) [inline, static]

Definition at line 77 of file NumberBox.properties.h.

{ return s_HeaderProperty; }

winrt::DataTemplate HeaderTemplate ( )
void HeaderTemplate ( winrt::DataTemplate const & value )
static winrt::DependencyProperty HeaderTemplateProperty ( ) [inline, static]

Definition at line 78 of file NumberBox.properties.h.

{ return s_HeaderTemplateProperty; }

void InputScope ( winrt::InputScope const & value )
winrt::InputScope InputScope ( )
static winrt::DependencyProperty InputScopeProperty ( ) [inline, static]

Definition at line 79 of file NumberBox.properties.h.

{ return s_InputScopeProperty; }

void IsWrapEnabled ( bool value )
bool IsWrapEnabled ( )
static winrt::DependencyProperty IsWrapEnabledProperty ( ) [inline, static]

Definition at line 80 of file NumberBox.properties.h.

{ return s_IsWrapEnabledProperty; }

void LargeChange ( double value )
double LargeChange ( )
static winrt::DependencyProperty LargeChangeProperty ( ) [inline, static]

Definition at line 81 of file NumberBox.properties.h.

{ return s_LargeChangeProperty; }

double Maximum ( )
void Maximum ( double value )
static winrt::DependencyProperty MaximumProperty ( ) [inline, static]

Definition at line 82 of file NumberBox.properties.h.

{ return s_MaximumProperty; }

void Minimum ( double value )
double Minimum ( )
static winrt::DependencyProperty MinimumProperty ( ) [inline, static]

Definition at line 83 of file NumberBox.properties.h.

{ return s_MinimumProperty; }

void NumberFormatter ( winrt::INumberFormatter2 const & value )
winrt::INumberFormatter2 NumberFormatter ( )
static winrt::DependencyProperty NumberFormatterProperty ( ) [inline, static]

Definition at line 84 of file NumberBox.properties.h.

{ return s_NumberFormatterProperty; }

static void OnHeaderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHeaderTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsWrapEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaximumPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinimumPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNumberFormatterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSmallChangePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSpinButtonPlacementModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTextPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnValidationModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void PlaceholderText ( winrt::hstring const & value )
winrt::hstring PlaceholderText ( )
static winrt::DependencyProperty PlaceholderTextProperty ( ) [inline, static]

Definition at line 85 of file NumberBox.properties.h.

{ return s_PlaceholderTextProperty; }

void PreventKeyboardDisplayOnProgrammaticFocus ( bool value )
bool PreventKeyboardDisplayOnProgrammaticFocus ( )
static winrt::DependencyProperty PreventKeyboardDisplayOnProgrammaticFocusProperty ( ) [inline, static]

Definition at line 86 of file NumberBox.properties.h.

{ return s_PreventKeyboardDisplayOnProgrammaticFocusProperty; }

void SelectionFlyout ( winrt::FlyoutBase const & value )
winrt::FlyoutBase SelectionFlyout ( )
static winrt::DependencyProperty SelectionFlyoutProperty ( ) [inline, static]

Definition at line 87 of file NumberBox.properties.h.

{ return s_SelectionFlyoutProperty; }

void SelectionHighlightColor ( winrt::SolidColorBrush const & value )
winrt::SolidColorBrush SelectionHighlightColor ( )
static winrt::DependencyProperty SelectionHighlightColorProperty ( ) [inline, static]

Definition at line 88 of file NumberBox.properties.h.

{ return s_SelectionHighlightColorProperty; }

void SmallChange ( double value )
double SmallChange ( )
static winrt::DependencyProperty SmallChangeProperty ( ) [inline, static]

Definition at line 89 of file NumberBox.properties.h.

{ return s_SmallChangeProperty; }

winrt::NumberBoxSpinButtonPlacementMode SpinButtonPlacementMode ( )
void SpinButtonPlacementMode ( winrt::NumberBoxSpinButtonPlacementMode const & value )
static winrt::DependencyProperty SpinButtonPlacementModeProperty ( ) [inline, static]

Definition at line 90 of file NumberBox.properties.h.

{ return s_SpinButtonPlacementModeProperty; }

void Text ( winrt::hstring const & value )
winrt::hstring Text ( )
winrt::TextAlignment TextAlignment ( )
void TextAlignment ( winrt::TextAlignment const & value )
static winrt::DependencyProperty TextAlignmentProperty ( ) [inline, static]

Definition at line 92 of file NumberBox.properties.h.

{ return s_TextAlignmentProperty; }

static winrt::DependencyProperty TextProperty ( ) [inline, static]

Definition at line 91 of file NumberBox.properties.h.

{ return s_TextProperty; }

void TextReadingOrder ( winrt::TextReadingOrder const & value )
winrt::TextReadingOrder TextReadingOrder ( )
static winrt::DependencyProperty TextReadingOrderProperty ( ) [inline, static]

Definition at line 93 of file NumberBox.properties.h.

{ return s_TextReadingOrderProperty; }

void ValidationMode ( winrt::NumberBoxValidationMode const & value )
winrt::NumberBoxValidationMode ValidationMode ( )
static winrt::DependencyProperty ValidationModeProperty ( ) [inline, static]

Definition at line 94 of file NumberBox.properties.h.

{ return s_ValidationModeProperty; }

double Value ( )

Reimplemented in NumberBox.

void Value ( double value )

Reimplemented in NumberBox.

winrt::event_token ValueChanged ( winrt::TypedEventHandler< winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs > const & value )
void ValueChanged ( winrt::event_token const & token )
static winrt::DependencyProperty ValueProperty ( ) [inline, static]

Definition at line 95 of file NumberBox.properties.h.

{ return s_ValueProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs> > m_valueChangedEventSource

Definition at line 122 of file NumberBox.properties.h.

GlobalDependencyProperty s_AcceptsExpressionProperty [static]

Definition at line 97 of file NumberBox.properties.h.

GlobalDependencyProperty s_DescriptionProperty [static]

Definition at line 98 of file NumberBox.properties.h.

GlobalDependencyProperty s_HeaderProperty [static]

Definition at line 99 of file NumberBox.properties.h.

GlobalDependencyProperty s_HeaderTemplateProperty [static]

Definition at line 100 of file NumberBox.properties.h.

GlobalDependencyProperty s_InputScopeProperty [static]

Definition at line 101 of file NumberBox.properties.h.

GlobalDependencyProperty s_IsWrapEnabledProperty [static]

Definition at line 102 of file NumberBox.properties.h.

GlobalDependencyProperty s_LargeChangeProperty [static]

Definition at line 103 of file NumberBox.properties.h.

GlobalDependencyProperty s_MaximumProperty [static]

Definition at line 104 of file NumberBox.properties.h.

GlobalDependencyProperty s_MinimumProperty [static]

Definition at line 105 of file NumberBox.properties.h.

GlobalDependencyProperty s_NumberFormatterProperty [static]

Definition at line 106 of file NumberBox.properties.h.

GlobalDependencyProperty s_PlaceholderTextProperty [static]

Definition at line 107 of file NumberBox.properties.h.

GlobalDependencyProperty s_PreventKeyboardDisplayOnProgrammaticFocusProperty [static]

Definition at line 108 of file NumberBox.properties.h.

GlobalDependencyProperty s_SelectionFlyoutProperty [static]

Definition at line 109 of file NumberBox.properties.h.

GlobalDependencyProperty s_SelectionHighlightColorProperty [static]

Definition at line 110 of file NumberBox.properties.h.

GlobalDependencyProperty s_SmallChangeProperty [static]

Definition at line 111 of file NumberBox.properties.h.

GlobalDependencyProperty s_SpinButtonPlacementModeProperty [static]

Definition at line 112 of file NumberBox.properties.h.

GlobalDependencyProperty s_TextAlignmentProperty [static]

Definition at line 114 of file NumberBox.properties.h.

GlobalDependencyProperty s_TextProperty [static]

Definition at line 113 of file NumberBox.properties.h.

GlobalDependencyProperty s_TextReadingOrderProperty [static]

Definition at line 115 of file NumberBox.properties.h.

GlobalDependencyProperty s_ValidationModeProperty [static]

Definition at line 116 of file NumberBox.properties.h.

GlobalDependencyProperty s_ValueProperty [static]

Definition at line 117 of file NumberBox.properties.h.

The documentation for this class was generated from the following files:
  • Generated/NumberBox.properties.h
  • Generated/NumberBox.properties.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxValueChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

NumberBoxValueChangedEventArgs Class Reference

#include "NumberBox.h"

List of all members.

Public Member Functions

NumberBoxValueChangedEventArgs (double oldValue, double newValue)
double | NewValue ()
double | OldValue ()

Private Attributes

double | m_newValue
double | m_oldValue

Detailed Description

Definition at line 13 of file NumberBox.h.

Constructor & Destructor Documentation

NumberBoxValueChangedEventArgs | ( | double | oldValue,
 |  | double | newValue |
 | ) |  |  | [inline]

Definition at line 17 of file NumberBox.h.

: m_oldValue(oldValue), m_newValue(newValue) {}

Member Function Documentation

double NewValue ( ) [inline]

Definition at line 20 of file NumberBox.h.

{ return m_newValue; }

double OldValue ( ) [inline]

Definition at line 19 of file NumberBox.h.

{ return m_oldValue; }

Member Data Documentation

double m_newValue [private]

Definition at line 24 of file NumberBox.h.

double m_oldValue [private]

Definition at line 23 of file NumberBox.h.

The documentation for this class was generated from the following file:
  • NumberBox/NumberBox.h
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ObservableTraits< T, isObservable, isBindable > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Types

ObservableTraits< T, isObservable, isBindable > Struct Template Reference

#include "Vector.h"

List of all members.

Classes

struct Dummy

Public Types

typedef struct
ObservableTraits::Dummy 		EventSource

Detailed Description

template<class T, bool isObservable, bool isBindable>
struct ObservableTraits< T, isObservable, isBindable >

Definition at line 90 of file Vector.h.

Member Typedef Documentation

typedef struct ObservableTraits::Dummy EventSource
The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ObservableTraits< T, isObservable, isBindable >::Dummy Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ObservableTraits< T, isObservable, isBindable >
  • ObservableTraits< T, isObservable, isBindable >::Dummy
Public Member Functions

ObservableTraits< T, isObservable, isBindable >::Dummy Struct Reference

#include "Vector.h"

List of all members.

Public Member Functions

Dummy (ITrackerHandleManager *)

Detailed Description

template<class T, bool isObservable, bool isBindable>
struct ObservableTraits< T, isObservable, isBindable >::Dummy

Definition at line 92 of file Vector.h.

Constructor & Destructor Documentation

Dummy ( ITrackerHandleManager * ) [inline]

Definition at line 92 of file Vector.h.

{ Dummy(ITrackerHandleManager*) {} } EventSource;

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ObservableTraits< T, true, isBindable > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

ObservableTraits< T, true, isBindable > Struct Template Reference

#include "Vector.h"

List of all members.

Static Public Member Functions

static winrt::event_token | AddEventHandler (EventSource *e, EventHandler const &handler)
static void | RaiseEvent (EventSource *e, SenderType sender, winrt::CollectionChange collectionChange, uint32_t index)
static void | RemoveEventHandler (EventSource *e, winrt::event_token const &token)

Detailed Description

template<class T, bool isBindable>
struct ObservableTraits< T, true, isBindable >

Definition at line 109 of file Vector.h.

Member Function Documentation

static winrt::event_token AddEventHandler | ( | EventSource * | e,
 |  | EventHandler const & | handler |
 | ) |  |  | [inline, static]

Definition at line 132 of file Vector.h.

    {
        return e->add(handler);
    };

static void RaiseEvent | ( | EventSource * | e,
 |  | SenderType | sender,
 |  | winrt::CollectionChange | collectionChange,
 |  | uint32_t | index |
 | ) |  |  | [inline, static]

Definition at line 127 of file Vector.h.

    {
        auto args = winrt::make<VectorChangedEventArgs>(collectionChange, index);
        (*e)(sender, args);
    }

static void RemoveEventHandler | ( | EventSource * | e,
 |  | winrt::event_token const & | token |
 | ) |  |  | [inline, static]

Definition at line 136 of file Vector.h.

    {
        e->remove(token);
    };

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ObservableVector< T > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Attributes

ObservableVector< T > Struct Template Reference

#include "Vector.h"

List of all members.

Classes

struct | Iterator

Public Member Functions

void | Append (winrt::IInspectable const &value)
void | Clear ()
winrt::IIterator
< winrt::IInspectable > 		First ()
winrt::IInspectable | GetAt (uint32_t index)
uint32_t | GetMany (uint32_t const startIndex, winrt::array_view< winrt::IInspectable > values)
winrt::IVectorView
< winrt::IInspectable > 		GetView ()
bool | IndexOf (winrt::IInspectable const &value, uint32_t &index)
void | InsertAt (uint32_t index, winrt::IInspectable const &value)
void | RemoveAt (uint32_t index)
void | RemoveAtEnd ()
void | ReplaceAll (winrt::array_view< winrt::IInspectable const > value)
void | SetAt (uint32_t const index, winrt::IInspectable const &value)
uint32_t | Size ()
void | VectorChanged (winrt::event_token const cookie)
winrt::event_token | VectorChanged (winrt::VectorChangedEventHandler< winrt::IInspectable > const &handler)

Private Attributes

winrt::event
< winrt::VectorChangedEventHandler
< winrt::IInspectable > > 		m_changed
winrt::IObservableVector< T >
::VectorChanged_revoker 		m_innerChangedRevoker

Detailed Description

template<typename T>
struct ObservableVector< T >

Definition at line 738 of file Vector.h.

Member Function Documentation

void Append ( winrt::IInspectable const & value ) [inline]

Definition at line 804 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->Append(value.as<T>());
    }

void Clear ( ) [inline]

Definition at line 824 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->Clear();
    }

winrt::IIterator<winrt::IInspectable> First ( ) [inline]

Definition at line 766 of file Vector.h.

    {
        return winrt::make<Iterator>(Vector<T>::First());
    }

winrt::IInspectable GetAt ( uint32_t index ) [inline]

Definition at line 782 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->GetAt(index);
    }

uint32_t GetMany | ( | uint32_t const | startIndex,
 |  | winrt::array_view< winrt::IInspectable > | values |
 | ) |  |  | [inline]

Definition at line 794 of file Vector.h.

    {
        throw winrt::hresult_not_implemented();
    }

winrt::IVectorView<winrt::IInspectable> GetView ( ) [inline]

Definition at line 771 of file Vector.h.

    {
        throw winrt::hresult_not_implemented();
    }

bool IndexOf | ( | winrt::IInspectable const & | value,
 |  | uint32_t & | index |
 | ) |  |  | [inline]

Definition at line 788 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->IndexOf(value.as<T>(), index);
    }

void InsertAt | ( | uint32_t | index,
 |  | winrt::IInspectable const & | value |
 | ) |  |  | [inline]

Definition at line 809 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->InsertAt(index, value.as<T>());
    }

void RemoveAt ( uint32_t index ) [inline]

Definition at line 814 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->RemoveAt(index);
    }

void RemoveAtEnd ( ) [inline]

Definition at line 819 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->RemoveAtEnd();
    }

void ReplaceAll ( winrt::array_view< winrt::IInspectable const > value ) [inline]

Definition at line 829 of file Vector.h.

    {
        throw winrt::hresult_not_implemented();
    }

void SetAt | ( | uint32_t const | index,
 |  | winrt::IInspectable const & | value |
 | ) |  |  | [inline]

Definition at line 799 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        inner->SetAt(index, value.as<T>());
    }

uint32_t Size ( ) [inline]

Definition at line 776 of file Vector.h.

    {
        auto inner = this->GetVectorInnerImpl();
        return inner->Size();
    }

void VectorChanged ( winrt::event_token const cookie ) [inline]

Definition at line 761 of file Vector.h.

    {
        m_changed.remove(cookie);
    }

winrt::event_token VectorChanged ( winrt::VectorChangedEventHandler< winrt::IInspectable > const & handler ) [inline]

Definition at line 746 of file Vector.h.

    {
        // Unfortunately we can't just forward the delegates to IObservableVector<T> because callers assume that the sender
        // is IObservableVector<IInspectable> so we have to re-raise. Luckily we can reuse the args.
        if (!m_innerChangedRevoker)
        {
            m_innerChangedRevoker = static_cast<winrt::IObservableVector<T>>(*this).VectorChanged(winrt::auto_revoke,
                [this](auto&& sender, auto &&args)
                {
                    m_changed(*this, args);
                });
        }
        return m_changed.add(handler);
    }

Member Data Documentation

winrt::event<winrt::VectorChangedEventHandler<winrt::IInspectable> > m_changed [private]

Definition at line 866 of file Vector.h.

winrt::IObservableVector<T>::VectorChanged_revoker m_innerChangedRevoker [private]

Definition at line 867 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ObservableVector< T >::Iterator Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ObservableVector< T >
  • ObservableVector< T >::Iterator
Public Member Functions | Private Attributes

ObservableVector< T >::Iterator Struct Reference

List of all members.

Public Member Functions

Iterator (winrt::IIterator< T > &&inner) noexcept
winrt::IInspectable | Current () const
uint32_t | GetMany (winrt::array_view< winrt::IInspectable > value)
bool | HasCurrent () const noexcept
bool | MoveNext () noexcept

Private Attributes

winrt::IIterator< T > | m_inner

Detailed Description

template<typename T>
struct ObservableVector< T >::Iterator

Definition at line 835 of file Vector.h.

Constructor & Destructor Documentation

Iterator ( winrt::IIterator< T > && inner ) [inline, explicit]

Definition at line 837 of file Vector.h.

                                                              :
            m_inner(std::move(inner))
        {
        }

Member Function Documentation

winrt::IInspectable Current ( ) const [inline]

Definition at line 842 of file Vector.h.

        {
            return m_inner.Current();
        }

uint32_t GetMany ( winrt::array_view< winrt::IInspectable > value ) [inline]

Definition at line 857 of file Vector.h.

        {
            throw winrt::hresult_not_implemented();
        }

bool HasCurrent ( ) const [inline]

Definition at line 847 of file Vector.h.

        {
            return m_inner.HasCurrent();
        }

bool MoveNext ( ) [inline]

Definition at line 852 of file Vector.h.

        {
            return m_inner.MoveNext();
        }

Member Data Documentation

winrt::IIterator<T> m_inner [private]

Definition at line 863 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ObservableVectorInnerImpl< VectorOptions, Wrapper > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ObservableVectorInnerImpl< VectorOptions, Wrapper > Struct Template Reference

#include "Vector.h"

Inherits VectorInnerImpl< VectorOptions, Wrapper >.

List of all members.

Public Member Functions

ObservableVectorInnerImpl (IVectorOwner< EventSource, T_type > *pIVectorExternal)
winrt::event_token | AddEventHandler (EventHandler const &handler)
void | RaiseChildrenChanged (winrt::CollectionChange collectionChange, unsigned int index) override
void | RemoveEventHandler (winrt::event_token const &token)

Detailed Description

template<typename VectorOptions, typename Wrapper = TStorageWrapperImpl<typename VectorOptions::T_type, VectorOptions::NoTrackRef>>
struct ObservableVectorInnerImpl< VectorOptions, Wrapper >

Definition at line 396 of file Vector.h.

Constructor & Destructor Documentation

ObservableVectorInnerImpl ( IVectorOwner< EventSource, T_type > * pIVectorExternal ) [inline]

Definition at line 408 of file Vector.h.

                                                                                :
        VectorInnerImpl<VectorOptions, Wrapper>(pIVectorExternal->GetExternalTrackerHandleManager()),
        m_pIVectorExternal(pIVectorExternal)
    {
    }

Member Function Documentation

winrt::event_token AddEventHandler ( EventHandler const & handler ) [inline]

Definition at line 421 of file Vector.h.

    {
        return Traits::AddEventHandler(m_pIVectorExternal->GetVectorEventSource(), handler);
    };

void RaiseChildrenChanged | ( | winrt::CollectionChange | collectionChange,
 |  | unsigned int | index |
 | ) |  |  | [inline, override, virtual]

Reimplemented from VectorInnerImpl< VectorOptions, Wrapper >.

Definition at line 414 of file Vector.h.

    {
        if (auto sender = m_pIVectorExternal->GetVectorEventSender().try_as< SenderType>()) {
            Traits::RaiseEvent(m_pIVectorExternal->GetVectorEventSource(), sender, collectionChange, index);
        }
    }

void RemoveEventHandler ( winrt::event_token const & token ) [inline]

Definition at line 426 of file Vector.h.

    {
       Traits::RemoveEventHandler(m_pIVectorExternal->GetVectorEventSource(), token);
    };

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: OffsetsChange Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

OffsetsChange Class Reference

#include "OffsetsChange.h"

Inherits ViewChange.

Inherited by BringIntoViewOffsetsChange.

List of all members.

Public Member Functions

OffsetsChange (double zoomedHorizontalOffset, double zoomedVerticalOffset, ScrollPresenterViewKind offsetsKind, winrt::IInspectable const &options)
~OffsetsChange ()
void | ZoomedHorizontalOffset (double zoomedHorizontalOffset)
double | ZoomedHorizontalOffset () const
double | ZoomedVerticalOffset () const
void | ZoomedVerticalOffset (double zoomedVerticalOffset)

Detailed Description

Definition at line 8 of file OffsetsChange.h.

Constructor & Destructor Documentation

OffsetsChange | ( | double | zoomedHorizontalOffset,
 |  | double | zoomedVerticalOffset,
 |  | ScrollPresenterViewKind | offsetsKind,
 |  | winrt::IInspectable const & | options
 | ) |  |

Definition at line 10 of file OffsetsChange.cpp.

                                      :
        m_zoomedHorizontalOffset(zoomedHorizontalOffset),
        m_zoomedVerticalOffset(zoomedVerticalOffset),
        ViewChange(offsetsKind, options)
{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL_DBL, METH_NAME, this,
        zoomedHorizontalOffset, zoomedVerticalOffset);
}

~OffsetsChange ( )

Definition at line 23 of file OffsetsChange.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

double ZoomedHorizontalOffset ( ) const [inline]

Definition at line 18 of file OffsetsChange.h.

    {
        return m_zoomedHorizontalOffset;
    }

void ZoomedHorizontalOffset ( double zoomedHorizontalOffset )

Definition at line 28 of file OffsetsChange.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, zoomedHorizontalOffset);

    m_zoomedHorizontalOffset = zoomedHorizontalOffset;
}

void ZoomedVerticalOffset ( double zoomedVerticalOffset )

Definition at line 35 of file OffsetsChange.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, zoomedVerticalOffset);

    m_zoomedVerticalOffset = zoomedVerticalOffset;
}

double ZoomedVerticalOffset ( ) const [inline]

Definition at line 23 of file OffsetsChange.h.

    {
        return m_zoomedVerticalOffset;
    }

The documentation for this class was generated from the following files:
  • ScrollPresenter/OffsetsChange.h
  • ScrollPresenter/OffsetsChange.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: OffsetsChangeWithAdditionalVelocity Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

OffsetsChangeWithAdditionalVelocity Class Reference

#include "OffsetsChangeWithAdditionalVelocity.h"

Inherits ViewChangeBase.

List of all members.

Public Member Functions

OffsetsChangeWithAdditionalVelocity (winrt::float2 offsetsVelocity, winrt::float2 anticipatedOffsetsChange, winrt::IReference< winrt::float2 > inertiaDecayRate)
~OffsetsChangeWithAdditionalVelocity ()
winrt::float2 | AnticipatedOffsetsChange () const
void | AnticipatedOffsetsChange (winrt::float2 const &anticipatedOffsetsChange)
winrt::IReference< winrt::float2 > | InertiaDecayRate () const
void | InertiaDecayRate (winrt::IReference< winrt::float2 > const &inertiaDecayRate)
winrt::float2 | OffsetsVelocity () const
void | OffsetsVelocity (winrt::float2 const &offsetsVelocity)

Detailed Description

Definition at line 8 of file OffsetsChangeWithAdditionalVelocity.h.

Constructor & Destructor Documentation

OffsetsChangeWithAdditionalVelocity | ( | winrt::float2 | offsetsVelocity,
 |  | winrt::float2 | anticipatedOffsetsChange,
 |  | winrt::IReference< winrt::float2 > | inertiaDecayRate
 | ) |  |

Definition at line 10 of file OffsetsChangeWithAdditionalVelocity.cpp.

                                                   :
        m_offsetsVelocity(offsetsVelocity),
        m_anticipatedOffsetsChange(anticipatedOffsetsChange),
        m_inertiaDecayRate(inertiaDecayRate)
{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR_STR, METH_NAME, this,
        TypeLogging::Float2ToString(offsetsVelocity).c_str(),
        TypeLogging::Float2ToString(anticipatedOffsetsChange).c_str(),
        TypeLogging::NullableFloat2ToString(inertiaDecayRate).c_str());
}

~OffsetsChangeWithAdditionalVelocity ( )

Definition at line 24 of file OffsetsChangeWithAdditionalVelocity.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

winrt::float2 AnticipatedOffsetsChange ( ) const [inline]

Definition at line 24 of file OffsetsChangeWithAdditionalVelocity.h.

    {
        return m_anticipatedOffsetsChange;
    }

void AnticipatedOffsetsChange ( winrt::float2 const & anticipatedOffsetsChange )

Definition at line 36 of file OffsetsChangeWithAdditionalVelocity.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::Float2ToString(anticipatedOffsetsChange).c_str());

    m_anticipatedOffsetsChange = anticipatedOffsetsChange;
}

winrt::IReference<winrt::float2> InertiaDecayRate ( ) const [inline]

Definition at line 31 of file OffsetsChangeWithAdditionalVelocity.h.

    {
        return m_inertiaDecayRate;
    }

void InertiaDecayRate ( winrt::IReference< winrt::float2 > const & inertiaDecayRate )

Definition at line 43 of file OffsetsChangeWithAdditionalVelocity.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::NullableFloat2ToString(inertiaDecayRate).c_str());

    m_inertiaDecayRate = inertiaDecayRate;
}

void OffsetsVelocity ( winrt::float2 const & offsetsVelocity )

Definition at line 29 of file OffsetsChangeWithAdditionalVelocity.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::Float2ToString(offsetsVelocity).c_str());

    m_offsetsVelocity = offsetsVelocity;
}

winrt::float2 OffsetsVelocity ( ) const [inline]

Definition at line 17 of file OffsetsChangeWithAdditionalVelocity.h.

    {
        return m_offsetsVelocity;
    }

The documentation for this class was generated from the following files:
  • ScrollPresenter/OffsetsChangeWithAdditionalVelocity.h
  • ScrollPresenter/OffsetsChangeWithAdditionalVelocity.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: OrientationBasedMeasures Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

OrientationBasedMeasures Class Reference

#include "OrientationBasedMeasures.h"

Inherited by FlowLayout, FlowLayoutAlgorithm [private], StackLayout, and UniformGridLayout.

List of all members.

Public Member Functions

ScrollOrientation | GetScrollOrientation () const
float & | Major (const winrt::Size &size)
float | MajorEnd (const winrt::Rect &rect) const
float & | MajorSize (const winrt::Rect &rect)
float & | MajorStart (const winrt::Rect &rect)
float & | Minor (const winrt::Size &size)
float | MinorEnd (const winrt::Rect &rect) const
winrt::Point | MinorMajorPoint (float minor, float major)
winrt::Rect | MinorMajorRect (float minor, float major, float minorSize, float majorSize)
winrt::Size | MinorMajorSize (float minor, float major)
float & | MinorSize (const winrt::Rect &rect)
float & | MinorStart (const winrt::Rect &rect)
void | SetScrollOrientation (ScrollOrientation value)

Detailed Description

Definition at line 12 of file OrientationBasedMeasures.h.

Member Function Documentation

ScrollOrientation GetScrollOrientation ( ) const [inline]

Definition at line 15 of file OrientationBasedMeasures.h.

{ return m_orientation; }

float & Major ( const winrt::Size & size )

Definition at line 7 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ? ((winrt::Size&)size).Height : ((winrt::Size&)size).Width;
}

float MajorEnd ( const winrt::Rect & rect ) const

Definition at line 32 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ?
        rect.Y + rect.Height : rect.X + rect.Width;
}

float & MajorSize ( const winrt::Rect & rect )

Definition at line 17 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).Height : ((winrt::Rect&)rect).Width;
}

float & MajorStart ( const winrt::Rect & rect )

Definition at line 27 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).Y : ((winrt::Rect&)rect).X;
}

float & Minor ( const winrt::Size & size )

Definition at line 12 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ? ((winrt::Size&)size).Width : ((winrt::Size&)size).Height;
}

float MinorEnd ( const winrt::Rect & rect ) const

Definition at line 43 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ?
        rect.X + rect.Width : rect.Y + rect.Height;
}

winrt::Point MinorMajorPoint | ( | float | minor,
 |  | float | major
 | ) |  |

Definition at line 56 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ?
        winrt::Point(minor, major) :
        winrt::Point(major, minor);
}

winrt::Rect MinorMajorRect | ( | float | minor,
 |  | float | major,
 |  | float | minorSize,
 |  | float | majorSize
 | ) |  |

Definition at line 49 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ?
        winrt::Rect{ minor, major, minorSize, majorSize } :
        winrt::Rect{ major, minor, majorSize, minorSize };
}

winrt::Size MinorMajorSize | ( | float | minor,
 |  | float | major
 | ) |  |

Definition at line 63 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ?
        winrt::Size(minor, major) :
        winrt::Size(major, minor);
}

float & MinorSize ( const winrt::Rect & rect )

Definition at line 22 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).Width : ((winrt::Rect&)rect).Height;
}

float & MinorStart ( const winrt::Rect & rect )

Definition at line 38 of file OrientationBasedMeasures.cpp.

{
    return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).X : ((winrt::Rect&)rect).Y;
}

void SetScrollOrientation ( ScrollOrientation value ) [inline]

Definition at line 16 of file OrientationBasedMeasures.h.

{ m_orientation = value; }

The documentation for this class was generated from the following files:
  • Repeater/OrientationBasedMeasures.h
  • Repeater/OrientationBasedMeasures.cpp
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

PagerControl Class Reference

#include "PagerControl.h"

Inherits ReferenceTracker< PagerControl, winrt::implementation::PagerControlT >, and PagerControlProperties.

List of all members.

Public Member Functions

PagerControl ()
~PagerControl ()
void | OnApplyTemplate ()
void | OnButtonVisibilityChanged (const winrt::PagerControlButtonVisibility visibility, const wstring_view visibleStateName, const wstring_view collapsedStateName, const wstring_view hiddenStateName, const int hiddenOnEdgePageCriteria)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnDisplayModeChanged ()
void | OnNumberOfPagesChanged (const int oldValue)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSelectedPageIndexChange (const int oldValue)
void | UpdateDisplayModeAutoState ()

Private Member Functions

void | AppendButtonToNumberPanelList (const int pageNumber, const int numberOfPages)
void | AppendEllipsisIconToNumberPanelList ()
void | ComboBoxSelectionChanged (const winrt::IInspectable &sender, const winrt::SelectionChangedEventArgs &args)
void | FillComboBoxCollectionToSize (const int numberOfPages)
void | FirstButtonClicked (const IInspectable &sender, const winrt::RoutedEventArgs &args)
void | LastButtonClicked (const IInspectable &sender, const winrt::RoutedEventArgs &args)
void | MoveIdentifierToElement (const int index)
void | NextButtonClicked (const IInspectable &sender, const winrt::RoutedEventArgs &args)
void | NumberBoxValueChanged (const winrt::IInspectable &sender, const winrt::NumberBoxValueChangedEventArgs &args)
void | OnRootGridKeyDown (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | PreviousButtonClicked (const IInspectable &sender, const winrt::RoutedEventArgs &args)
void | RaiseSelectedIndexChanged ()
void | UpdateNumberOfPanelCollectionInfiniteItems ()
void | UpdateNumberPanel (const int numberOfPages)
void | UpdateNumberPanelCollectionAllItems (const int numberOfPages)
void | UpdateNumberPanelCollectionCenterWithEllipsis (const int numberOfPages, const int selectedIndex)
void | UpdateNumberPanelCollectionEndWithEllipsis (const int numberOfPages, const int selectedIndex)
void | UpdateNumberPanelCollectionStartWithEllipsis (const int numberOfPages, const int selectedIndex)
void | UpdateOnEdgeButtonVisualStates ()
void | UpdateTemplateSettingElementLists ()

Private Attributes

int | m_lastNumberOfPagesCount = 0
int | m_lastSelectedPageIndex = -1

Detailed Description

Definition at line 12 of file PagerControl.h.

Constructor & Destructor Documentation

PagerControl ( )

Definition at line 61 of file PagerControl.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_PagerControl);

    m_comboBoxEntries = winrt::make<Vector<IInspectable>>().as<winrt::IObservableVector<IInspectable>>();
    m_numberPanelElements = winrt::make<Vector<IInspectable>>().as<winrt::IObservableVector<IInspectable>>();

    const auto templateSettings = winrt::make<PagerControlTemplateSettings>();
    templateSettings.SetValue(PagerControlTemplateSettingsProperties::s_PagesProperty, m_comboBoxEntries);
    templateSettings.SetValue(PagerControlTemplateSettingsProperties::s_NumberPanelItemsProperty, m_numberPanelElements);
    SetValue(s_TemplateSettingsProperty, templateSettings);

    SetDefaultStyleKey(this);
}

~PagerControl ( )

Definition at line 76 of file PagerControl.cpp.

{
    m_rootGridKeyDownRevoker.revoke();
    m_comboBoxSelectionChangedRevoker.revoke();
    m_firstPageButtonClickRevoker.revoke();
    m_previousPageButtonClickRevoker.revoke();
    m_nextPageButtonClickRevoker.revoke();
    m_lastPageButtonClickRevoker.revoke();
}

Member Function Documentation

void AppendButtonToNumberPanelList | ( | const int | pageNumber,
 |  | const int | numberOfPages |
 | ) |  |  | [private]

Definition at line 714 of file PagerControl.cpp.

{
    winrt::Button button;
    button.Content(winrt::box_value(pageNumber));
    const auto buttonClickedFunc = [this](auto const& sender, auto const& args) {
        if (const auto button = sender.try_as<winrt::Button>())
        {
            const int unboxedValue = winrt::unbox_value<int>(button.Content());
            SelectedPageIndex(unboxedValue - 1);
        }
    };
    button.Click(buttonClickedFunc);
    // Set the default style of buttons
    button.Style(unbox_value<winrt::Style>(ResourceAccessor::ResourceLookup(*this, box_value(c_numberPanelButtonStyleName))));
    winrt::AutomationProperties::SetName(button, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPageTextName) + L" " + winrt::to_hstring(pageNumber));
    winrt::AutomationProperties::SetPositionInSet(button, pageNumber);
    winrt::AutomationProperties::SetSizeOfSet(button, numberOfPages);
    m_numberPanelElements.Append(button);
}

void AppendEllipsisIconToNumberPanelList ( ) [private]

Definition at line 734 of file PagerControl.cpp.

{
    winrt::SymbolIcon ellipsisIcon;
    ellipsisIcon.Symbol(winrt::Symbol::More);
    m_numberPanelElements.Append(ellipsisIcon);
}

void ComboBoxSelectionChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SelectionChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 758 of file PagerControl.cpp.

{
    if (const auto comboBox = m_comboBox.get())
    {
        SelectedPageIndex(comboBox.SelectedIndex());
    }
}

void FillComboBoxCollectionToSize ( const int numberOfPages ) [private]

Definition at line 419 of file PagerControl.cpp.

{
    const int currentComboBoxItemsCount = (int32_t)m_comboBoxEntries.Size();
    if (currentComboBoxItemsCount <= numberOfPages)
    {
        // We are increasing the number of pages, so add the missing numbers.
        for (int i = currentComboBoxItemsCount; i < numberOfPages; i++)
        {
            m_comboBoxEntries.Append(winrt::box_value(i + 1));
        }
    }
    else
    {
        // We are decreasing the number of pages, so remove numbers starting at the end.
        for (int i = currentComboBoxItemsCount; i > numberOfPages; i--)
        {
            m_comboBoxEntries.RemoveAtEnd();
        }
    }
}

void FirstButtonClicked | ( | const IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 771 of file PagerControl.cpp.

{
    SelectedPageIndex(0);
    if (const auto command = FirstButtonCommand())
    {
        command.Execute(nullptr);
    }
}

void LastButtonClicked | ( | const IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 800 of file PagerControl.cpp.

{
    SelectedPageIndex(NumberOfPages() - 1);
    if (const auto command = LastButtonCommand())
    {
        command.Execute(nullptr);
    }
}

void MoveIdentifierToElement ( const int index ) [private]

Definition at line 692 of file PagerControl.cpp.

{
    if (const auto indicator = m_selectedPageIndicator.get())
    {
        if (const auto repeater = m_numberPanelRepeater.get())
        {
            repeater.UpdateLayout();
            if (const auto element = repeater.TryGetElement(index).try_as<winrt::FrameworkElement>())
            {
                const auto boundingRect = element.TransformToVisual(repeater).TransformBounds(winrt::Rect::Rect(0, 0, (float)repeater.ActualWidth(), (float)repeater.ActualHeight()));
                winrt::Thickness newMargin;
                newMargin.Left = boundingRect.X;
                newMargin.Top = 0;
                newMargin.Right = 0;
                newMargin.Bottom = 0;
                indicator.Margin(newMargin);
                indicator.Width(element.ActualWidth());
            }
        }
    }
}

void NextButtonClicked | ( | const IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 790 of file PagerControl.cpp.

{
    // In this method, SelectedPageIndex is always less than maximum.
    SelectedPageIndex(SelectedPageIndex() + 1);
    if (const auto command = NextButtonCommand())
    {
        command.Execute(nullptr);
    }
}

void NumberBoxValueChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::NumberBoxValueChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 766 of file PagerControl.cpp.

{
    SelectedPageIndex((int)(args.NewValue()) - 1);
}

void OnApplyTemplate ( )

Definition at line 86 of file PagerControl.cpp.

{
    if (PrefixText().empty())
    {
        PrefixText(ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPrefixTextName));
    }
    if (SuffixText().empty())
    {
        SuffixText(ResourceAccessor::GetLocalizedStringResource(SR_PagerControlSuffixTextName));
    }
    if (const auto rootGrid = GetTemplateChildT<winrt::FrameworkElement>(c_rootGridName, *this))
    {
        m_rootGridKeyDownRevoker = rootGrid.KeyDown(winrt::auto_revoke, { this, &PagerControl::OnRootGridKeyDown });
    }

    if (const auto firstPageButton = GetTemplateChildT<winrt::Button>(c_firstPageButtonName, *this))
    {
        winrt::AutomationProperties::SetName(firstPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlFirstPageButtonTextName));
        m_firstPageButtonClickRevoker = firstPageButton.Click(winrt::auto_revoke, { this, &PagerControl::FirstButtonClicked });
    }
    if (const auto previousPageButton = GetTemplateChildT<winrt::Button>(c_previousPageButtonName, *this))
    {
        winrt::AutomationProperties::SetName(previousPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPreviousPageButtonTextName));
        m_previousPageButtonClickRevoker = previousPageButton.Click(winrt::auto_revoke, { this, &PagerControl::PreviousButtonClicked });
    }
    if (const auto nextPageButton = GetTemplateChildT<winrt::Button>(c_nextPageButtonName, *this))
    {
        winrt::AutomationProperties::SetName(nextPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlNextPageButtonTextName));
        m_nextPageButtonClickRevoker = nextPageButton.Click(winrt::auto_revoke, { this, &PagerControl::NextButtonClicked });
    }
    if (const auto lastPageButton = GetTemplateChildT<winrt::Button>(c_lastPageButtonName, *this))
    {
        winrt::AutomationProperties::SetName(lastPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlLastPageButtonTextName));
        m_lastPageButtonClickRevoker = lastPageButton.Click(winrt::auto_revoke, { this, &PagerControl::LastButtonClicked });
    }

    m_comboBoxSelectionChangedRevoker.revoke();
    [this](const winrt::ComboBox comboBox) {
        m_comboBox.set(comboBox);
        if (comboBox)
        {
            FillComboBoxCollectionToSize(NumberOfPages());
            comboBox.SelectedIndex(SelectedPageIndex() - 1);
            winrt::AutomationProperties::SetName(comboBox, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPageTextName));
            m_comboBoxSelectionChangedRevoker = comboBox.SelectionChanged(winrt::auto_revoke, { this, &PagerControl::ComboBoxSelectionChanged });
        }
    }(GetTemplateChildT<winrt::ComboBox>(c_comboBoxName, *this));

    m_numberBoxValueChangedRevoker.revoke();
    [this](const winrt::NumberBox numberBox) {
        m_numberBox.set(numberBox);
        if (numberBox)
        {
            numberBox.Value(static_cast<double>(SelectedPageIndex()) + 1);
            winrt::AutomationProperties::SetName(numberBox, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPageTextName));
            m_numberBoxValueChangedRevoker = numberBox.ValueChanged(winrt::auto_revoke, { this,&PagerControl::NumberBoxValueChanged });
        }
    }(GetTemplateChildT<winrt::NumberBox>(c_numberBoxName, *this));

    m_numberPanelRepeater.set(GetTemplateChildT<winrt::ItemsRepeater>(c_numberPanelRepeaterName, *this));
    m_selectedPageIndicator.set(GetTemplateChildT<winrt::FrameworkElement>(c_numberPanelIndicatorName, *this));

    // This is for the initial loading of the control
    OnDisplayModeChanged();
    UpdateOnEdgeButtonVisualStates();
    OnNumberOfPagesChanged(0);

    // Update button visibilities
    OnButtonVisibilityChanged(FirstButtonVisibility(),
        c_firstPageButtonVisibleVisualState,
        c_firstPageButtonNotVisibleVisualState,
        c_firstPageButtonHiddenVisualState,
        0);
    OnButtonVisibilityChanged(PreviousButtonVisibility(),
        c_previousPageButtonVisibleVisualState,
        c_previousPageButtonNotVisibleVisualState,
        c_previousPageButtonHiddenVisualState,
        0);
    OnButtonVisibilityChanged(NextButtonVisibility(),
        c_nextPageButtonVisibleVisualState,
        c_nextPageButtonNotVisibleVisualState,
        c_nextPageButtonHiddenVisualState,
        NumberOfPages() - 1);
    OnButtonVisibilityChanged(LastButtonVisibility(),
        c_lastPageButtonVisibleVisualState,
        c_lastPageButtonNotVisibleVisualState,
        c_lastPageButtonHiddenVisualState,
        NumberOfPages() - 1);

    OnSelectedPageIndexChange(-1);
}

void OnButtonVisibilityChanged | ( | const winrt::PagerControlButtonVisibility | visibility,
 |  | const wstring_view | visibleStateName,
 |  | const wstring_view | collapsedStateName,
 |  | const wstring_view | hiddenStateName,
 |  | const int | hiddenOnEdgePageCriteria
 | ) |  |

Definition at line 365 of file PagerControl.cpp.

{
    if (visibility == winrt::PagerControlButtonVisibility::Visible)
    {
        winrt::VisualStateManager::GoToState(*this, visibleStateName, false);
    }
    else if (visibility == winrt::PagerControlButtonVisibility::Hidden)
    {
        winrt::VisualStateManager::GoToState(*this, collapsedStateName, false);
    }
    else
    {
        if (SelectedPageIndex() != hiddenOnEdgePageCriteria)
        {
            winrt::VisualStateManager::GoToState(*this, visibleStateName, false);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, hiddenStateName, false);
        }
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 238 of file PagerControl.cpp.

{
    return winrt::make<PagerControlAutomationPeer>(*this);
}

void OnDisplayModeChanged ( )

Definition at line 244 of file PagerControl.cpp.

{
    // Cache for performance reasons
    const auto displayMode = DisplayMode();

    if (displayMode == winrt::PagerControlDisplayMode::ButtonPanel)
    {
        winrt::VisualStateManager::GoToState(*this, c_numberPanelVisibleVisualState, false);
    }
    else if (displayMode == winrt::PagerControlDisplayMode::ComboBox)
    {
        winrt::VisualStateManager::GoToState(*this, c_comboBoxVisibleVisualState, false);
    }
    else if (displayMode == winrt::PagerControlDisplayMode::NumberBox)
    {
        winrt::VisualStateManager::GoToState(*this, c_numberBoxVisibleVisualState, false);
    }
    else
    {
        UpdateDisplayModeAutoState();
    }
}

void OnNumberOfPagesChanged ( const int oldValue )

Definition at line 281 of file PagerControl.cpp.

{
    m_lastNumberOfPagesCount = oldValue;
    const int numberOfPages = NumberOfPages();
    if (numberOfPages < SelectedPageIndex() && numberOfPages > -1)
    {
        SelectedPageIndex(numberOfPages - 1);
    }
    UpdateTemplateSettingElementLists();
    if (DisplayMode() == winrt::PagerControlDisplayMode::Auto)
    {
        UpdateDisplayModeAutoState();
    }
    if (numberOfPages > -1)
    {
        winrt::VisualStateManager::GoToState(*this, c_finiteItemsModeState, false);
        if (const auto numberBox = m_numberBox.get())
        {
            numberBox.Maximum(numberOfPages);
        }
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, c_infiniteItemsModeState, false);
        if (const auto numberBox = m_numberBox.get())
        {
            numberBox.Maximum(INFINITY);
        }
    }
    UpdateOnEdgeButtonVisualStates();
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 178 of file PagerControl.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    if (this->Template() != nullptr)
    {
        if (property == FirstButtonVisibilityProperty())
        {
            OnButtonVisibilityChanged(FirstButtonVisibility(),
                c_firstPageButtonVisibleVisualState,
                c_firstPageButtonNotVisibleVisualState,
                c_firstPageButtonHiddenVisualState,
                0);
        }
        else if (property == PreviousButtonVisibilityProperty())
        {
            OnButtonVisibilityChanged(PreviousButtonVisibility(),
                c_previousPageButtonVisibleVisualState,
                c_previousPageButtonNotVisibleVisualState,
                c_previousPageButtonHiddenVisualState,
                0);
        }
        else if (property == NextButtonVisibilityProperty())
        {
            OnButtonVisibilityChanged(NextButtonVisibility(),
                c_nextPageButtonVisibleVisualState,
                c_nextPageButtonNotVisibleVisualState,
                c_nextPageButtonHiddenVisualState,
                NumberOfPages() - 1);
        }
        else if (property == LastButtonVisibilityProperty())
        {
            OnButtonVisibilityChanged(LastButtonVisibility(),
                c_lastPageButtonVisibleVisualState,
                c_lastPageButtonNotVisibleVisualState,
                c_lastPageButtonHiddenVisualState,
                NumberOfPages() - 1);
        }
        else if (property == DisplayModeProperty())
        {
            OnDisplayModeChanged();
            // Why are we calling this you might ask.
            // The reason is that that method only updates what it currently needs to update.
            // So when we switch to ComboBox from NumberPanel, the NumberPanel element list might be out of date.
            UpdateTemplateSettingElementLists();
        }
        else if (property == NumberOfPagesProperty())
        {
            OnNumberOfPagesChanged(winrt::unbox_value<int>(args.OldValue()));
        }
        else if (property == SelectedPageIndexProperty())
        {
            OnSelectedPageIndexChange(winrt::unbox_value<int>(args.OldValue()));
        }
        else if (property == ButtonPanelAlwaysShowFirstLastPageIndexProperty())
        {
            UpdateNumberPanel(NumberOfPages());
        }
    }
}

void OnRootGridKeyDown | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 742 of file PagerControl.cpp.

{
    if (args.Key() == winrt::VirtualKey::Left || args.Key() == winrt::VirtualKey::GamepadDPadLeft)
    {
        auto options = winrt::FindNextElementOptions();
        options.SearchRoot(this->XamlRoot().Content());
        winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Left, options);
    }
    else if (args.Key() == winrt::VirtualKey::Right || args.Key() == winrt::VirtualKey::GamepadDPadRight)
    {
        auto options = winrt::FindNextElementOptions();
        options.SearchRoot(this->XamlRoot().Content());
        winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Right, options);
    }
}

void OnSelectedPageIndexChange ( const int oldValue )

Definition at line 313 of file PagerControl.cpp.

{
    // If we don't have any pages, there is nothing we should do.
    // Ensure that SelectedPageIndex will end up in the valid range of values
    // Special case is NumberOfPages being 0, in that case, don't verify upperbound restrictions
    if (SelectedPageIndex() > NumberOfPages() - 1 && NumberOfPages() > 0)
    {
        SelectedPageIndex(NumberOfPages() - 1);
    }
    else if (SelectedPageIndex() < 0)
    {
        SelectedPageIndex(0);
    }
    // Now handle the value changes
    m_lastSelectedPageIndex = oldValue;

    if (const auto comboBox = m_comboBox.get())
    {
        if (SelectedPageIndex() < (int32_t)m_comboBoxEntries.Size())
        {
            comboBox.SelectedIndex(SelectedPageIndex());
        }
    }
    if (const auto numBox = m_numberBox.get())
    {
        numBox.Value(static_cast<double>(SelectedPageIndex()) + 1);
    }

    UpdateOnEdgeButtonVisualStates();
    UpdateTemplateSettingElementLists();

    if (DisplayMode() == winrt::PagerControlDisplayMode::ButtonPanel)
    {
        // NumberPanel needs to update based on multiple parameters.
        // SelectedPageIndex is one of them, so let's do that now!
        UpdateNumberPanel(NumberOfPages());
    }

    // Fire value property change for UIA
    if (const auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this).try_as<winrt::PagerControlAutomationPeer>())
    {
        winrt::get_self<PagerControlAutomationPeer>(peer)->RaiseSelectionChanged(m_lastSelectedPageIndex, SelectedPageIndex());
    }
    RaiseSelectedIndexChanged();
}

void PreviousButtonClicked | ( | const IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 780 of file PagerControl.cpp.

{
    // In this method, SelectedPageIndex is always greater than 1.
    SelectedPageIndex(SelectedPageIndex() - 1);
    if (const auto command = PreviousButtonCommand())
    {
        command.Execute(nullptr);
    }
}

void RaiseSelectedIndexChanged ( ) [private]

Definition at line 359 of file PagerControl.cpp.

{
    const auto args = winrt::make_self<PagerControlSelectedIndexChangedEventArgs>(m_lastSelectedPageIndex, SelectedPageIndex());
    m_selectedIndexChangedEventSource(*this, *args);
}

void UpdateDisplayModeAutoState ( )

Definition at line 267 of file PagerControl.cpp.

{
    const int numberOfPages = NumberOfPages();
    if (numberOfPages > -1)
    {
        winrt::VisualStateManager::GoToState(*this, numberOfPages < c_AutoDisplayModeNumberOfPagesThreshold ?
            c_comboBoxVisibleVisualState : c_numberBoxVisibleVisualState, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, c_numberBoxVisibleVisualState, false);
    }
}

void UpdateNumberOfPanelCollectionInfiniteItems ( ) [private]

Definition at line 561 of file PagerControl.cpp.

{
    const int selectedIndex = SelectedPageIndex();

    m_numberPanelElements.Clear();
    if (selectedIndex < 3)
    {
        AppendButtonToNumberPanelList(1, 0);
        AppendButtonToNumberPanelList(2, 0);
        AppendButtonToNumberPanelList(3, 0);
        AppendButtonToNumberPanelList(4, 0);
        AppendButtonToNumberPanelList(5, 0);
        MoveIdentifierToElement(selectedIndex);
    }
    else
    {
        AppendButtonToNumberPanelList(1, 0);
        AppendEllipsisIconToNumberPanelList();
        AppendButtonToNumberPanelList(selectedIndex, 0);
        AppendButtonToNumberPanelList(selectedIndex + 1, 0);
        AppendButtonToNumberPanelList(selectedIndex + 2, 0);
        MoveIdentifierToElement(3);
    }
}

void UpdateNumberPanel ( const int numberOfPages ) [private]

Definition at line 524 of file PagerControl.cpp.

{
    if (numberOfPages < 0)
    {
        UpdateNumberOfPanelCollectionInfiniteItems();
    }
    else if (numberOfPages < 8)
    {
        UpdateNumberPanelCollectionAllItems(numberOfPages);
    }
    else
    {
        const auto selectedIndex = SelectedPageIndex();
        // Idea: Choose correct "template" based on SelectedPageIndex (x) and NumberOfPages (n)
        // 1 2 3 4 5 6 ... n <-- Items
        if (selectedIndex < 4)
        {
            // First four items selected, create following pattern:
            // 1 2 3 4 5... n
            UpdateNumberPanelCollectionStartWithEllipsis(numberOfPages, selectedIndex);
        }
        else if (selectedIndex >= numberOfPages - 4)
        {
            // Last four items selected, create following pattern:
            //1 [...] n-4 n-3 n-2 n-1 n
            UpdateNumberPanelCollectionEndWithEllipsis(numberOfPages, selectedIndex);
        }
        else
        {
            // Neither start or end, so lets do this:
            // 1 [...] x-2 x-1 x x+1 x+2 [...] n
            // where x > 4 and x < n - 4
            UpdateNumberPanelCollectionCenterWithEllipsis(numberOfPages, selectedIndex);
        }
    }
}

void UpdateNumberPanelCollectionAllItems ( const int numberOfPages ) [private]

Definition at line 586 of file PagerControl.cpp.

{
    // Check that the NumberOfPages did not change, so we can skip recreating collection
    if (m_lastNumberOfPagesCount != numberOfPages)
    {
        m_numberPanelElements.Clear();
        for (int i = 0; i < numberOfPages && i < 7; i++)
        {
            AppendButtonToNumberPanelList(i + 1, numberOfPages);
        }
    }
    MoveIdentifierToElement(SelectedPageIndex());
}

void UpdateNumberPanelCollectionCenterWithEllipsis | ( | const int | numberOfPages,
 |  | const int | selectedIndex |
 | ) |  |  | [private]

Definition at line 656 of file PagerControl.cpp.

{
    const auto showFirstLastPageIndex = ButtonPanelAlwaysShowFirstLastPageIndex();
    if (m_lastNumberOfPagesCount != numberOfPages)
    {
        // Do a recalculation as the number of pages changed.
        m_numberPanelElements.Clear();
        if (showFirstLastPageIndex)
        {
            AppendButtonToNumberPanelList(1, numberOfPages);
            AppendEllipsisIconToNumberPanelList();
        }
        AppendButtonToNumberPanelList(selectedIndex, numberOfPages);
        AppendButtonToNumberPanelList(selectedIndex + 1, numberOfPages);
        AppendButtonToNumberPanelList(selectedIndex + 2, numberOfPages);
        if (showFirstLastPageIndex)
        {
            AppendEllipsisIconToNumberPanelList();
            AppendButtonToNumberPanelList(numberOfPages, numberOfPages);
        }
    }
    // "selectedIndex + 1" is our representation for SelectedIndex.
    if (showFirstLastPageIndex)
    {
        // SelectedIndex + 1 is the fifth element.
        // Collections are base zero, so the index to underline is 3.
        MoveIdentifierToElement(3);
    }
    else
    {
        // SelectedIndex + 1 is the third element.
        // Collections are base zero, so the index to underline is 1.
        MoveIdentifierToElement(1);
    }
}

void UpdateNumberPanelCollectionEndWithEllipsis | ( | const int | numberOfPages,
 |  | const int | selectedIndex |
 | ) |  |  | [private]

Definition at line 621 of file PagerControl.cpp.

{
    if (m_lastNumberOfPagesCount != numberOfPages)
    {
        // Do a recalculation as the number of pages changed.
        m_numberPanelElements.Clear();
        if (ButtonPanelAlwaysShowFirstLastPageIndex())
        {
            AppendButtonToNumberPanelList(1, numberOfPages);
            AppendEllipsisIconToNumberPanelList();
        }
        AppendButtonToNumberPanelList(numberOfPages - 4, numberOfPages);
        AppendButtonToNumberPanelList(numberOfPages - 3, numberOfPages);
        AppendButtonToNumberPanelList(numberOfPages - 2, numberOfPages);
        AppendButtonToNumberPanelList(numberOfPages - 1, numberOfPages);
        AppendButtonToNumberPanelList(numberOfPages, numberOfPages);
    }
    // We can only be either the last, the second from last or third from last
    // => SelectedIndex = NumberOfPages - y with y in {1,2,3}
    if (ButtonPanelAlwaysShowFirstLastPageIndex())
    {
        // Last item sits at index 4.
        // SelectedPageIndex for the last page is NumberOfPages - 1.
        // => SelectedItem = SelectedIndex - NumberOfPages + 7;
        MoveIdentifierToElement(selectedIndex - numberOfPages + 7);
    }
    else
    {
        // Last item sits at index 6.
        // SelectedPageIndex for the last page is NumberOfPages - 1.
        // => SelectedItem = SelectedIndex - NumberOfPages + 5;
        MoveIdentifierToElement(selectedIndex - numberOfPages + 5);
    }
}

void UpdateNumberPanelCollectionStartWithEllipsis | ( | const int | numberOfPages,
 |  | const int | selectedIndex |
 | ) |  |  | [private]

Definition at line 600 of file PagerControl.cpp.

{
    if (m_lastNumberOfPagesCount != numberOfPages)
    {
        // Do a recalculation as the number of pages changed.
        m_numberPanelElements.Clear();
        AppendButtonToNumberPanelList(1, numberOfPages);
        AppendButtonToNumberPanelList(2, numberOfPages);
        AppendButtonToNumberPanelList(3, numberOfPages);
        AppendButtonToNumberPanelList(4, numberOfPages);
        AppendButtonToNumberPanelList(5, numberOfPages);
        if (ButtonPanelAlwaysShowFirstLastPageIndex())
        {
            AppendEllipsisIconToNumberPanelList();
            AppendButtonToNumberPanelList(numberOfPages, numberOfPages);
        }
    }
    // SelectedIndex is definitely the correct index here as we are counting from start
    MoveIdentifierToElement(selectedIndex);
}

void UpdateOnEdgeButtonVisualStates ( ) [private]

Definition at line 440 of file PagerControl.cpp.

{
    // Cache those values as we need them often and accessing a DP is (relatively) expensive
    const int selectedPageIndex = SelectedPageIndex();
    const int numberOfPages = NumberOfPages();

    // Handle disabled/enabled status of buttons
    if (selectedPageIndex == 0)
    {
        winrt::VisualStateManager::GoToState(*this, c_firstPageButtonDisabledVisualState, false);
        winrt::VisualStateManager::GoToState(*this, c_previousPageButtonDisabledVisualState, false);
        winrt::VisualStateManager::GoToState(*this, c_nextPageButtonEnabledVisualState, false);
        winrt::VisualStateManager::GoToState(*this, c_lastPageButtonEnabledVisualState, false);
    }
    else if (selectedPageIndex >= numberOfPages - 1)
    {
        winrt::VisualStateManager::GoToState(*this, c_firstPageButtonEnabledVisualState, false);
        winrt::VisualStateManager::GoToState(*this, c_previousPageButtonEnabledVisualState, false);
        if (numberOfPages > -1)
        {
            winrt::VisualStateManager::GoToState(*this, c_nextPageButtonDisabledVisualState, false);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, c_nextPageButtonEnabledVisualState, false);
        }
        winrt::VisualStateManager::GoToState(*this, c_lastPageButtonDisabledVisualState, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, c_firstPageButtonEnabledVisualState, false);
        winrt::VisualStateManager::GoToState(*this, c_previousPageButtonEnabledVisualState, false);
        winrt::VisualStateManager::GoToState(*this, c_nextPageButtonEnabledVisualState, false);
        winrt::VisualStateManager::GoToState(*this, c_lastPageButtonEnabledVisualState, false);
    }

    // Handle HiddenOnEdge states
    if (FirstButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
    {
        if (selectedPageIndex != 0)
        {
            winrt::VisualStateManager::GoToState(*this, c_firstPageButtonVisibleVisualState, false);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, c_firstPageButtonHiddenVisualState, false);
        }
    }
    if (PreviousButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
    {
        if (selectedPageIndex != 0)
        {
            winrt::VisualStateManager::GoToState(*this, c_previousPageButtonVisibleVisualState, false);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, c_previousPageButtonHiddenVisualState, false);
        }
    }
    if (NextButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
    {
        if (selectedPageIndex != numberOfPages - 1)
        {
            winrt::VisualStateManager::GoToState(*this, c_nextPageButtonVisibleVisualState, false);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, c_nextPageButtonHiddenVisualState, false);
        }
    }
    if (LastButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
    {
        if (selectedPageIndex != numberOfPages - 1)
        {
            winrt::VisualStateManager::GoToState(*this, c_lastPageButtonVisibleVisualState, false);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, c_lastPageButtonHiddenVisualState, false);
        }
    }
}

void UpdateTemplateSettingElementLists ( ) [private]

Definition at line 392 of file PagerControl.cpp.

{
    // Cache values for performance :)
    const auto displayMode = DisplayMode();
    const auto numberOfPages = NumberOfPages();

    if (displayMode == winrt::PagerControlDisplayMode::ComboBox ||
        displayMode == winrt::PagerControlDisplayMode::Auto)
    {
        if (numberOfPages > -1)
        {
            FillComboBoxCollectionToSize(numberOfPages);
        }
        else
        {
            if (m_comboBoxEntries.Size() < c_infiniteModeComboBoxItemsIncrement)
            {
                FillComboBoxCollectionToSize(c_infiniteModeComboBoxItemsIncrement);
            }
        }
    }
    else if (displayMode == winrt::PagerControlDisplayMode::ButtonPanel)
    {
        UpdateNumberPanel(numberOfPages);
    }
}

Member Data Documentation

int m_lastNumberOfPagesCount = 0 [private]

Definition at line 70 of file PagerControl.h.

int m_lastSelectedPageIndex = -1 [private]

Definition at line 69 of file PagerControl.h.

The documentation for this class was generated from the following files:
  • PagerControl/PagerControl.h
  • PagerControl/PagerControl.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

PagerControlAutomationPeer Class Reference

#include "PagerControlAutomationPeer.h"

Inherits ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider >.

List of all members.

Public Member Functions

PagerControlAutomationPeer (winrt::PagerControl const &owner)
bool | CanSelectMultiple ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
winrt::com_array
< winrt::IInspectable > 		GetSelection ()
bool | IsSelectionRequired ()
void | RaiseSelectionChanged (double oldIndex, double newIndex)

Private Member Functions

com_ptr< PagerControl > | GetImpl ()

Detailed Description

Definition at line 9 of file PagerControlAutomationPeer.h.

Constructor & Destructor Documentation

PagerControlAutomationPeer ( winrt::PagerControl const & owner )

Definition at line 13 of file PagerControlAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

bool CanSelectMultiple ( ) [inline]

Definition at line 23 of file PagerControlAutomationPeer.h.

{ return false; };

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 49 of file PagerControlAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Menu;
}

hstring GetClassNameCore ( )

Definition at line 29 of file PagerControlAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::PagerControl>();
}

com_ptr< PagerControl > GetImpl ( ) [private]

Definition at line 54 of file PagerControlAutomationPeer.cpp.

{
    com_ptr<PagerControl> impl = nullptr;

    if (const auto pagerControl = Owner().try_as<winrt::PagerControl>())
    {
        impl = winrt::get_self<PagerControl>(pagerControl)->get_strong();
    }

    return impl;
}

hstring GetNameCore ( )

Definition at line 34 of file PagerControlAutomationPeer.cpp.

{
    winrt::hstring name = __super::GetNameCore();

    if (name.empty())
    {
        if (const auto PagerControl = Owner().try_as<winrt::PagerControl>())
        {
            name = SharedHelpers::TryGetStringRepresentationFromObject(PagerControl.GetValue(winrt::AutomationProperties::NameProperty()));
        }
    }

    return name;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file PagerControlAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Selection)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::com_array< winrt::IInspectable > GetSelection ( )

Definition at line 66 of file PagerControlAutomationPeer.cpp.

{
    if (const auto pager = GetImpl())
    {
        return { winrt::box_value(pager->SelectedPageIndex()) };
    }
    return {};
}

bool IsSelectionRequired ( ) [inline]

Definition at line 24 of file PagerControlAutomationPeer.h.

{ return true; };

void RaiseSelectionChanged | ( | double | oldIndex,
 |  | double | newIndex
 | ) |  |

Definition at line 75 of file PagerControlAutomationPeer.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
    {
        RaisePropertyChangedEvent(winrt::SelectionPatternIdentifiers::SelectionProperty(),
            winrt::PropertyValue::CreateDouble(oldIndex),
            winrt::PropertyValue::CreateDouble(newIndex));
    }
}

The documentation for this class was generated from the following files:
  • PagerControl/PagerControlAutomationPeer.h
  • PagerControl/PagerControlAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

PagerControlProperties Class Reference

#include "PagerControl.properties.h"

Inherited by PagerControl.

List of all members.

Public Member Functions

PagerControlProperties ()
void | ButtonPanelAlwaysShowFirstLastPageIndex (bool value)
bool | ButtonPanelAlwaysShowFirstLastPageIndex ()
void | DisplayMode (winrt::PagerControlDisplayMode const &value)
winrt::PagerControlDisplayMode | DisplayMode ()
void | FirstButtonCommand (winrt::ICommand const &value)
winrt::ICommand | FirstButtonCommand ()
void | FirstButtonStyle (winrt::Style const &value)
winrt::Style | FirstButtonStyle ()
void | FirstButtonVisibility (winrt::PagerControlButtonVisibility const &value)
winrt::PagerControlButtonVisibility | FirstButtonVisibility ()
void | LastButtonCommand (winrt::ICommand const &value)
winrt::ICommand | LastButtonCommand ()
void | LastButtonStyle (winrt::Style const &value)
winrt::Style | LastButtonStyle ()
void | LastButtonVisibility (winrt::PagerControlButtonVisibility const &value)
winrt::PagerControlButtonVisibility | LastButtonVisibility ()
void | NextButtonCommand (winrt::ICommand const &value)
winrt::ICommand | NextButtonCommand ()
void | NextButtonStyle (winrt::Style const &value)
winrt::Style | NextButtonStyle ()
void | NextButtonVisibility (winrt::PagerControlButtonVisibility const &value)
winrt::PagerControlButtonVisibility | NextButtonVisibility ()
void | NumberOfPages (int value)
int | NumberOfPages ()
winrt::ICommand | PagerInputCommand ()
void | PagerInputCommand (winrt::ICommand const &value)
void | PrefixText (winrt::hstring const &value)
winrt::hstring | PrefixText ()
winrt::ICommand | PreviousButtonCommand ()
void | PreviousButtonCommand (winrt::ICommand const &value)
void | PreviousButtonStyle (winrt::Style const &value)
winrt::Style | PreviousButtonStyle ()
winrt::PagerControlButtonVisibility | PreviousButtonVisibility ()
void | PreviousButtonVisibility (winrt::PagerControlButtonVisibility const &value)
winrt::event_token | SelectedIndexChanged (winrt::TypedEventHandler< winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs > const &value)
void | SelectedIndexChanged (winrt::event_token const &token)
void | SelectedPageIndex (int value)
int | SelectedPageIndex ()
void | SuffixText (winrt::hstring const &value)
winrt::hstring | SuffixText ()
winrt::PagerControlTemplateSettings | TemplateSettings ()
void | TemplateSettings (winrt::PagerControlTemplateSettings const &value)

Static Public Member Functions

static winrt::DependencyProperty | ButtonPanelAlwaysShowFirstLastPageIndexProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | DisplayModeProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FirstButtonCommandProperty ()
static winrt::DependencyProperty | FirstButtonStyleProperty ()
static winrt::DependencyProperty | FirstButtonVisibilityProperty ()
static winrt::DependencyProperty | LastButtonCommandProperty ()
static winrt::DependencyProperty | LastButtonStyleProperty ()
static winrt::DependencyProperty | LastButtonVisibilityProperty ()
static winrt::DependencyProperty | NextButtonCommandProperty ()
static winrt::DependencyProperty | NextButtonStyleProperty ()
static winrt::DependencyProperty | NextButtonVisibilityProperty ()
static winrt::DependencyProperty | NumberOfPagesProperty ()
static void | OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnDisplayModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFirstButtonCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFirstButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFirstButtonVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLastButtonCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLastButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLastButtonVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNextButtonCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNextButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNextButtonVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNumberOfPagesPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPagerInputCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPrefixTextPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreviousButtonCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreviousButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreviousButtonVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedPageIndexPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSuffixTextPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTemplateSettingsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PagerInputCommandProperty ()
static winrt::DependencyProperty | PrefixTextProperty ()
static winrt::DependencyProperty | PreviousButtonCommandProperty ()
static winrt::DependencyProperty | PreviousButtonStyleProperty ()
static winrt::DependencyProperty | PreviousButtonVisibilityProperty ()
static winrt::DependencyProperty | SelectedPageIndexProperty ()
static winrt::DependencyProperty | SuffixTextProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::PagerControl,
winrt::PagerControlSelectedIndexChangedEventArgs > > 		m_selectedIndexChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ButtonPanelAlwaysShowFirstLastPageIndexProperty
static GlobalDependencyProperty | s_DisplayModeProperty
static GlobalDependencyProperty | s_FirstButtonCommandProperty
static GlobalDependencyProperty | s_FirstButtonStyleProperty
static GlobalDependencyProperty | s_FirstButtonVisibilityProperty
static GlobalDependencyProperty | s_LastButtonCommandProperty
static GlobalDependencyProperty | s_LastButtonStyleProperty
static GlobalDependencyProperty | s_LastButtonVisibilityProperty
static GlobalDependencyProperty | s_NextButtonCommandProperty
static GlobalDependencyProperty | s_NextButtonStyleProperty
static GlobalDependencyProperty | s_NextButtonVisibilityProperty
static GlobalDependencyProperty | s_NumberOfPagesProperty
static GlobalDependencyProperty | s_PagerInputCommandProperty
static GlobalDependencyProperty | s_PrefixTextProperty
static GlobalDependencyProperty | s_PreviousButtonCommandProperty
static GlobalDependencyProperty | s_PreviousButtonStyleProperty
static GlobalDependencyProperty | s_PreviousButtonVisibilityProperty
static GlobalDependencyProperty | s_SelectedPageIndexProperty
static GlobalDependencyProperty | s_SuffixTextProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty

Detailed Description

Definition at line 7 of file PagerControl.properties.h.

Constructor & Destructor Documentation

PagerControlProperties ( )

Definition at line 37 of file PagerControl.properties.cpp.

    : m_selectedIndexChangedEventSource{static_cast<PagerControl*>(this)}

Member Function Documentation

void ButtonPanelAlwaysShowFirstLastPageIndex ( bool value )
bool ButtonPanelAlwaysShowFirstLastPageIndex ( )
static winrt::DependencyProperty ButtonPanelAlwaysShowFirstLastPageIndexProperty ( ) [inline, static]

Definition at line 72 of file PagerControl.properties.h.

{ return s_ButtonPanelAlwaysShowFirstLastPageIndexProperty; }

static void ClearProperties ( ) [static]
winrt::PagerControlDisplayMode DisplayMode ( )
void DisplayMode ( winrt::PagerControlDisplayMode const & value )
static winrt::DependencyProperty DisplayModeProperty ( ) [inline, static]

Definition at line 73 of file PagerControl.properties.h.

{ return s_DisplayModeProperty; }

static void EnsureProperties ( ) [static]
void FirstButtonCommand ( winrt::ICommand const & value )
winrt::ICommand FirstButtonCommand ( )
static winrt::DependencyProperty FirstButtonCommandProperty ( ) [inline, static]

Definition at line 74 of file PagerControl.properties.h.

{ return s_FirstButtonCommandProperty; }

winrt::Style FirstButtonStyle ( )
void FirstButtonStyle ( winrt::Style const & value )
static winrt::DependencyProperty FirstButtonStyleProperty ( ) [inline, static]

Definition at line 75 of file PagerControl.properties.h.

{ return s_FirstButtonStyleProperty; }

void FirstButtonVisibility ( winrt::PagerControlButtonVisibility const & value )
winrt::PagerControlButtonVisibility FirstButtonVisibility ( )
static winrt::DependencyProperty FirstButtonVisibilityProperty ( ) [inline, static]

Definition at line 76 of file PagerControl.properties.h.

{ return s_FirstButtonVisibilityProperty; }

void LastButtonCommand ( winrt::ICommand const & value )
winrt::ICommand LastButtonCommand ( )
static winrt::DependencyProperty LastButtonCommandProperty ( ) [inline, static]

Definition at line 77 of file PagerControl.properties.h.

{ return s_LastButtonCommandProperty; }

void LastButtonStyle ( winrt::Style const & value )
winrt::Style LastButtonStyle ( )
static winrt::DependencyProperty LastButtonStyleProperty ( ) [inline, static]

Definition at line 78 of file PagerControl.properties.h.

{ return s_LastButtonStyleProperty; }

winrt::PagerControlButtonVisibility LastButtonVisibility ( )
void LastButtonVisibility ( winrt::PagerControlButtonVisibility const & value )
static winrt::DependencyProperty LastButtonVisibilityProperty ( ) [inline, static]

Definition at line 79 of file PagerControl.properties.h.

{ return s_LastButtonVisibilityProperty; }

void NextButtonCommand ( winrt::ICommand const & value )
winrt::ICommand NextButtonCommand ( )
static winrt::DependencyProperty NextButtonCommandProperty ( ) [inline, static]

Definition at line 80 of file PagerControl.properties.h.

{ return s_NextButtonCommandProperty; }

void NextButtonStyle ( winrt::Style const & value )
winrt::Style NextButtonStyle ( )
static winrt::DependencyProperty NextButtonStyleProperty ( ) [inline, static]

Definition at line 81 of file PagerControl.properties.h.

{ return s_NextButtonStyleProperty; }

void NextButtonVisibility ( winrt::PagerControlButtonVisibility const & value )
winrt::PagerControlButtonVisibility NextButtonVisibility ( )
static winrt::DependencyProperty NextButtonVisibilityProperty ( ) [inline, static]

Definition at line 82 of file PagerControl.properties.h.

{ return s_NextButtonVisibilityProperty; }

void NumberOfPages ( int value )
int NumberOfPages ( )
static winrt::DependencyProperty NumberOfPagesProperty ( ) [inline, static]

Definition at line 83 of file PagerControl.properties.h.

{ return s_NumberOfPagesProperty; }

static void OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnDisplayModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnFirstButtonCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnFirstButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnFirstButtonVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLastButtonCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLastButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnLastButtonVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNextButtonCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNextButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNextButtonVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNumberOfPagesPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPagerInputCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPrefixTextPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPreviousButtonCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPreviousButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPreviousButtonVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedPageIndexPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSuffixTextPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTemplateSettingsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::ICommand PagerInputCommand ( )
void PagerInputCommand ( winrt::ICommand const & value )
static winrt::DependencyProperty PagerInputCommandProperty ( ) [inline, static]

Definition at line 84 of file PagerControl.properties.h.

{ return s_PagerInputCommandProperty; }

void PrefixText ( winrt::hstring const & value )
winrt::hstring PrefixText ( )
static winrt::DependencyProperty PrefixTextProperty ( ) [inline, static]

Definition at line 85 of file PagerControl.properties.h.

{ return s_PrefixTextProperty; }

void PreviousButtonCommand ( winrt::ICommand const & value )
winrt::ICommand PreviousButtonCommand ( )
static winrt::DependencyProperty PreviousButtonCommandProperty ( ) [inline, static]

Definition at line 86 of file PagerControl.properties.h.

{ return s_PreviousButtonCommandProperty; }

winrt::Style PreviousButtonStyle ( )
void PreviousButtonStyle ( winrt::Style const & value )
static winrt::DependencyProperty PreviousButtonStyleProperty ( ) [inline, static]

Definition at line 87 of file PagerControl.properties.h.

{ return s_PreviousButtonStyleProperty; }

winrt::PagerControlButtonVisibility PreviousButtonVisibility ( )
void PreviousButtonVisibility ( winrt::PagerControlButtonVisibility const & value )
static winrt::DependencyProperty PreviousButtonVisibilityProperty ( ) [inline, static]

Definition at line 88 of file PagerControl.properties.h.

{ return s_PreviousButtonVisibilityProperty; }

void SelectedIndexChanged ( winrt::event_token const & token )
winrt::event_token SelectedIndexChanged ( winrt::TypedEventHandler< winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs > const & value )
void SelectedPageIndex ( int value )
int SelectedPageIndex ( )
static winrt::DependencyProperty SelectedPageIndexProperty ( ) [inline, static]

Definition at line 89 of file PagerControl.properties.h.

{ return s_SelectedPageIndexProperty; }

winrt::hstring SuffixText ( )
void SuffixText ( winrt::hstring const & value )
static winrt::DependencyProperty SuffixTextProperty ( ) [inline, static]

Definition at line 90 of file PagerControl.properties.h.

{ return s_SuffixTextProperty; }

winrt::PagerControlTemplateSettings TemplateSettings ( )
void TemplateSettings ( winrt::PagerControlTemplateSettings const & value )
static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 91 of file PagerControl.properties.h.

{ return s_TemplateSettingsProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs> > m_selectedIndexChangedEventSource

Definition at line 117 of file PagerControl.properties.h.

GlobalDependencyProperty s_ButtonPanelAlwaysShowFirstLastPageIndexProperty [static]

Definition at line 93 of file PagerControl.properties.h.

GlobalDependencyProperty s_DisplayModeProperty [static]

Definition at line 94 of file PagerControl.properties.h.

GlobalDependencyProperty s_FirstButtonCommandProperty [static]

Definition at line 95 of file PagerControl.properties.h.

GlobalDependencyProperty s_FirstButtonStyleProperty [static]

Definition at line 96 of file PagerControl.properties.h.

GlobalDependencyProperty s_FirstButtonVisibilityProperty [static]

Definition at line 97 of file PagerControl.properties.h.

GlobalDependencyProperty s_LastButtonCommandProperty [static]

Definition at line 98 of file PagerControl.properties.h.

GlobalDependencyProperty s_LastButtonStyleProperty [static]

Definition at line 99 of file PagerControl.properties.h.

GlobalDependencyProperty s_LastButtonVisibilityProperty [static]

Definition at line 100 of file PagerControl.properties.h.

GlobalDependencyProperty s_NextButtonCommandProperty [static]

Definition at line 101 of file PagerControl.properties.h.

GlobalDependencyProperty s_NextButtonStyleProperty [static]

Definition at line 102 of file PagerControl.properties.h.

GlobalDependencyProperty s_NextButtonVisibilityProperty [static]

Definition at line 103 of file PagerControl.properties.h.

GlobalDependencyProperty s_NumberOfPagesProperty [static]

Definition at line 104 of file PagerControl.properties.h.

GlobalDependencyProperty s_PagerInputCommandProperty [static]

Definition at line 105 of file PagerControl.properties.h.

GlobalDependencyProperty s_PrefixTextProperty [static]

Definition at line 106 of file PagerControl.properties.h.

GlobalDependencyProperty s_PreviousButtonCommandProperty [static]

Definition at line 107 of file PagerControl.properties.h.

GlobalDependencyProperty s_PreviousButtonStyleProperty [static]

Definition at line 108 of file PagerControl.properties.h.

GlobalDependencyProperty s_PreviousButtonVisibilityProperty [static]

Definition at line 109 of file PagerControl.properties.h.

GlobalDependencyProperty s_SelectedPageIndexProperty [static]

Definition at line 110 of file PagerControl.properties.h.

GlobalDependencyProperty s_SuffixTextProperty [static]

Definition at line 111 of file PagerControl.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 112 of file PagerControl.properties.h.

The documentation for this class was generated from the following files:
  • Generated/PagerControl.properties.h
  • Generated/PagerControl.properties.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlSelectedIndexChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

PagerControlSelectedIndexChangedEventArgs Class Reference

#include "PagerControlSelectedIndexChangedEventArgs.h"

List of all members.

Public Member Functions

PagerControlSelectedIndexChangedEventArgs (const int previousIndex, const int newIndex)
int | NewPageIndex ()
int | PreviousPageIndex ()

Private Attributes

int | m_newPageIndex = -1
int | m_previousPageIndex = -1

Detailed Description

Definition at line 8 of file PagerControlSelectedIndexChangedEventArgs.h.

Constructor & Destructor Documentation

PagerControlSelectedIndexChangedEventArgs | ( | const int | previousIndex,
 |  | const int | newIndex |
 | ) |  |  | [inline]

Definition at line 12 of file PagerControlSelectedIndexChangedEventArgs.h.

                                                                                :
        m_previousPageIndex(previousIndex), m_newPageIndex(newIndex) {};

Member Function Documentation

int NewPageIndex ( ) [inline]

Definition at line 15 of file PagerControlSelectedIndexChangedEventArgs.h.

{ return m_newPageIndex; };

int PreviousPageIndex ( ) [inline]

Definition at line 16 of file PagerControlSelectedIndexChangedEventArgs.h.

{ return m_previousPageIndex; };

Member Data Documentation

int m_newPageIndex = -1 [private]

Definition at line 20 of file PagerControlSelectedIndexChangedEventArgs.h.

int m_previousPageIndex = -1 [private]

Definition at line 21 of file PagerControlSelectedIndexChangedEventArgs.h.

The documentation for this class was generated from the following file:
  • PagerControl/PagerControlSelectedIndexChangedEventArgs.h
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

PagerControlTemplateSettings Class Reference

#include "PagerControlTemplateSettings.h"

Inherits PagerControlTemplateSettingsProperties.

List of all members.

Public Member Functions

PagerControlTemplateSettings ()

Detailed Description

Definition at line 9 of file PagerControlTemplateSettings.h.

Constructor & Destructor Documentation

PagerControlTemplateSettings ( ) [inline]

Definition at line 14 of file PagerControlTemplateSettings.h.

{ };

The documentation for this class was generated from the following file:
  • PagerControl/PagerControlTemplateSettings.h
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

PagerControlTemplateSettingsProperties Class Reference

#include "PagerControlTemplateSettings.properties.h"

Inherited by PagerControlTemplateSettings.

List of all members.

Public Member Functions

PagerControlTemplateSettingsProperties ()
void | NumberPanelItems (winrt::IVector< winrt::IInspectable > const &value)
winrt::IVector
< winrt::IInspectable > 		NumberPanelItems ()
void | Pages (winrt::IVector< winrt::IInspectable > const &value)
winrt::IVector
< winrt::IInspectable > 		Pages ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | NumberPanelItemsProperty ()
static winrt::DependencyProperty | PagesProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_NumberPanelItemsProperty
static GlobalDependencyProperty | s_PagesProperty

Detailed Description

Definition at line 7 of file PagerControlTemplateSettings.properties.h.

Constructor & Destructor Documentation

PagerControlTemplateSettingsProperties ( )

Definition at line 19 of file PagerControlTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file PagerControlTemplateSettings.properties.cpp.

{
    s_NumberPanelItemsProperty = nullptr;
    s_PagesProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file PagerControlTemplateSettings.properties.cpp.

{
    if (!s_NumberPanelItemsProperty)
    {
        s_NumberPanelItemsProperty =
            InitializeDependencyProperty(
                L"NumberPanelItems",
                winrt::name_of<winrt::IVector<winrt::IInspectable>>(),
                winrt::name_of<winrt::PagerControlTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PagesProperty)
    {
        s_PagesProperty =
            InitializeDependencyProperty(
                L"Pages",
                winrt::name_of<winrt::IVector<winrt::IInspectable>>(),
                winrt::name_of<winrt::PagerControlTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IVector< winrt::IInspectable > NumberPanelItems ( )

Definition at line 64 of file PagerControlTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IVector<winrt::IInspectable>>::CastOrUnbox(static_cast<PagerControlTemplateSettings*>(this)->GetValue(s_NumberPanelItemsProperty));
}

void NumberPanelItems ( winrt::IVector< winrt::IInspectable > const & value )

Definition at line 56 of file PagerControlTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PagerControlTemplateSettings*>(this)->SetValue(s_NumberPanelItemsProperty, ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty NumberPanelItemsProperty ( ) [inline, static]

Definition at line 18 of file PagerControlTemplateSettings.properties.h.

{ return s_NumberPanelItemsProperty; }

winrt::IVector< winrt::IInspectable > Pages ( )

Definition at line 77 of file PagerControlTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IVector<winrt::IInspectable>>::CastOrUnbox(static_cast<PagerControlTemplateSettings*>(this)->GetValue(s_PagesProperty));
}

void Pages ( winrt::IVector< winrt::IInspectable > const & value )

Definition at line 69 of file PagerControlTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PagerControlTemplateSettings*>(this)->SetValue(s_PagesProperty, ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty PagesProperty ( ) [inline, static]

Definition at line 19 of file PagerControlTemplateSettings.properties.h.

{ return s_PagesProperty; }

Member Data Documentation

GlobalDependencyProperty s_NumberPanelItemsProperty [static]

Definition at line 21 of file PagerControlTemplateSettings.properties.h.

GlobalDependencyProperty s_PagesProperty [static]

Definition at line 22 of file PagerControlTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/PagerControlTemplateSettings.properties.h
  • Generated/PagerControlTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

ParallaxView Class Reference

#include "ParallaxView.h"

Inherits ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView >, and ParallaxViewProperties.

List of all members.

Public Member Functions

ParallaxView ()
~ParallaxView ()
winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnScrollInputHelperInfoChanged (bool horizontalInfoChanged, bool verticalInfoChanged)
void | RefreshAutomaticHorizontalOffsets ()
void | RefreshAutomaticVerticalOffsets ()

Private Member Functions

void | EnsureAnimatedVariables ()
void | HookChildPropertyChanged (const winrt::FrameworkElement &child)
void | HookLoaded ()
void | HookSizeChanged ()
void | OnChildPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | UnhookChildPropertyChanged (bool isInDestructor)
void | UpdateChild (const winrt::UIElement &oldChild, const winrt::UIElement &newChild)
void | UpdateEndOffsetExpression (winrt::Orientation orientation)
void | UpdateExpressionAnimation (winrt::Orientation orientation)
void | UpdateStartOffsetExpression (winrt::Orientation orientation)

Static Private Member Functions

static wstring_view | GetVisualTargetedPropertyName (winrt::Orientation orientation)

Detailed Description

Definition at line 11 of file ParallaxView.h.

Constructor & Destructor Documentation

ParallaxView ( )

Definition at line 16 of file ParallaxView.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_ParallaxView);

    std::shared_ptr<ScrollInputHelper> scrollInputHelper(
        std::make_shared<ScrollInputHelper>(
            this,
            [this](bool horizontalInfoChanged, bool verticalInfoChanged)
            {
                OnScrollInputHelperInfoChanged(horizontalInfoChanged, verticalInfoChanged);
            }));
    m_scrollInputHelper = scrollInputHelper;

    HookLoaded();
    HookSizeChanged();
}

~ParallaxView ( )

Definition at line 11 of file ParallaxView.cpp.

{
    UnhookChildPropertyChanged(true /* isInDestructor */);
}

Member Function Documentation

winrt::Size ArrangeOverride ( winrt::Size const & finalSize )

Definition at line 79 of file ParallaxView.cpp.

{
    winrt::UIElement child = Child();

    if (child)
    {
        winrt::FrameworkElement childAsFE = child.try_as<winrt::FrameworkElement>();
        winrt::Rect finalRect = { 0.0f, 0.0f, child.DesiredSize().Width, child.DesiredSize().Height };

        if (HorizontalShift() != 0.0 && finalRect.Width < finalSize.Width + abs(HorizontalShift()))
        {
            // The child is parallaxing horizontally. Ensure that its arrange width exceeds the ParallaxView's arrange width by at least HorizontalShift.
            // Expand its height by the same ratio if it's stretched vertically.
            const float stretchRatio = finalRect.Width > 0.0f ? (finalSize.Width + static_cast<float>(abs(HorizontalShift()))) / finalRect.Width : 0.0f;
            finalRect.Width = finalSize.Width + static_cast<float>(abs(HorizontalShift()));
            if (stretchRatio != 0.0f && childAsFE && isnan(childAsFE.Height()) && childAsFE.VerticalAlignment() == winrt::VerticalAlignment::Stretch)
            {
                finalRect.Height *= stretchRatio;
            }
        }
        if (VerticalShift() != 0.0 && finalRect.Height < finalSize.Height + abs(VerticalShift()))
        {
            // The child is parallaxing vertically. Ensure that its arrange height exceeds the ParallaxView's arrange height by at least VerticalShift.
            // Expand its width by the same ratio if it's stretched horizontally.
            const float stretchRatio = finalRect.Height > 0.0f ? (finalSize.Height + static_cast<float>(abs(VerticalShift()))) / finalRect.Height : 0.0f;
            finalRect.Height = finalSize.Height + static_cast<float>(abs(VerticalShift()));
            if (stretchRatio != 0.0f && childAsFE && isnan(childAsFE.Width()) && childAsFE.HorizontalAlignment() == winrt::HorizontalAlignment::Stretch)
            {
                finalRect.Width *= stretchRatio;
            }
        }

        if (childAsFE)
        {
            // Ensure the child is properly aligned within the ParallaxView based on its
            // alignment properties. This alignment behavior is identical to the Border's behavior.
            float offset = 0.0f;

            switch (childAsFE.HorizontalAlignment())
            {
            case winrt::HorizontalAlignment::Center:
                offset = (finalSize.Width - finalRect.Width) / 2.0f;
                break;
            case winrt::HorizontalAlignment::Right:
                offset = finalSize.Width - finalRect.Width;
                break;
            case winrt::HorizontalAlignment::Stretch:
                if (finalRect.Width < finalSize.Width)
                {
                    offset = (finalSize.Width - finalRect.Width) / 2.0f;
                }
                break;
            }
            finalRect.X = offset;

            offset = 0.0f;

            switch (childAsFE.VerticalAlignment())
            {
            case winrt::VerticalAlignment::Center:
                offset = (finalSize.Height - finalRect.Height) / 2.0f;
                break;
            case winrt::VerticalAlignment::Bottom:
                offset = finalSize.Height - finalRect.Height;
                break;
            case winrt::VerticalAlignment::Stretch:
                if (finalRect.Height < finalSize.Height)
                {
                    offset = (finalSize.Height - finalRect.Height) / 2.0f;
                }
                break;
            }
            finalRect.Y = offset;
        }

        child.Arrange(finalRect);

        // Set a rectangular clip on this ParallaxView the same size as the arrange
        // rectangle so the child does not render beyond it.
        auto rectangleGeometry = Clip().as<winrt::RectangleGeometry>();

        if (!rectangleGeometry)
        {
            // Ensure that this ParallaxView has a rectangular clip.
            winrt::RectangleGeometry newRectangleGeometry;
            Clip(newRectangleGeometry);

            rectangleGeometry = newRectangleGeometry;
        }

        const winrt::Rect currentClipRect = rectangleGeometry.Rect();

        if (currentClipRect.X != 0.0f || currentClipRect.Width != finalSize.Width ||
            currentClipRect.Y != 0.0f || currentClipRect.Height != finalSize.Height)
        {
            const winrt::Rect newClipRect{ 0.0f, 0.0f, finalSize.Width, finalSize.Height };
            rectangleGeometry.Rect(newClipRect);
        }
    }

    return finalSize;
}

void EnsureAnimatedVariables ( ) [private]

Definition at line 323 of file ParallaxView.cpp.

{
    if (!m_animatedVariables && m_targetVisual)
    {
        m_animatedVariables = m_targetVisual.Compositor().CreatePropertySet();
        m_animatedVariables.InsertScalar(L"HorizontalSourceStartOffset", 0.0f);
        m_animatedVariables.InsertScalar(L"HorizontalSourceEndOffset", 0.0f);
        m_animatedVariables.InsertScalar(L"VerticalSourceStartOffset", 0.0f);
        m_animatedVariables.InsertScalar(L"VerticalSourceEndOffset", 0.0f);
    }
}

wstring_view GetVisualTargetedPropertyName ( winrt::Orientation orientation ) [static, private]

Definition at line 184 of file ParallaxView.cpp.

{
    return orientation == winrt::Orientation::Horizontal ? s_translationXPropertyName : s_translationYPropertyName;
}

void HookChildPropertyChanged ( const winrt::FrameworkElement & child ) [private]

Definition at line 729 of file ParallaxView.cpp.

{
    if (child)
    {
        m_currentListeningChild.set(child);
        if (m_childHorizontalAlignmentChangedToken.value == 0)
        {
            m_childHorizontalAlignmentChangedToken.value = child.RegisterPropertyChangedCallback(
                winrt::FrameworkElement::HorizontalAlignmentProperty(), { this, &ParallaxView::OnChildPropertyChanged });
        }
        if (m_childVerticalAlignmentChangedToken.value == 0)
        {
            m_childVerticalAlignmentChangedToken.value = child.RegisterPropertyChangedCallback(
                winrt::FrameworkElement::VerticalAlignmentProperty(), { this, &ParallaxView::OnChildPropertyChanged });
        }
    }
}

void HookLoaded ( ) [private]

Definition at line 713 of file ParallaxView.cpp.

{
    if (m_loadedToken.value == 0)
    {
        m_loadedToken = Loaded({ this, &ParallaxView::OnLoaded });
    }
}

void HookSizeChanged ( ) [private]

Definition at line 721 of file ParallaxView.cpp.

{
    if (m_sizeChangedToken.value == 0)
    {
        m_sizeChangedToken = SizeChanged({ this, &ParallaxView::OnSizeChanged });
    }
}

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 58 of file ParallaxView.cpp.

{
    winrt::Size childDesiredSize{ 0.0f, 0.0f };
    winrt::UIElement child = Child();

    if (child)
    {
        // Include the HorizontalShift/VerticalShift amounts in the available size so the desired child size
        // accounts for the parallaxing effect.
        const winrt::Size childAvailableSize {
            static_cast<float>(availableSize.Width + abs(HorizontalShift())),
            static_cast<float>(availableSize.Height + abs(VerticalShift())) };
        child.Measure(childAvailableSize);
        childDesiredSize = child.DesiredSize();
    }

    return {
        std::isinf(availableSize.Width) ? childDesiredSize.Width : availableSize.Width,
        std::isinf(availableSize.Height) ? childDesiredSize.Height : availableSize.Height };
}

void OnChildPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 278 of file ParallaxView.cpp.

{
    winrt::FrameworkElement senderAsFrameworkElement = sender.try_as<winrt::FrameworkElement>();

    if (senderAsFrameworkElement &&
        (args == winrt::FrameworkElement::HorizontalAlignmentProperty() ||
         args == winrt::FrameworkElement::VerticalAlignmentProperty()))
    {
        senderAsFrameworkElement.InvalidateArrange();
    }
}

void OnLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 247 of file ParallaxView.cpp.

{
    // Characteristics influencing the source start and end offsets are ready now.
    if (HorizontalShift() != 0.0)
    {
        UpdateStartOffsetExpression(winrt::Orientation::Horizontal);
        UpdateEndOffsetExpression(winrt::Orientation::Horizontal);
    }

    if (VerticalShift() != 0.0)
    {
        UpdateStartOffsetExpression(winrt::Orientation::Vertical);
        UpdateEndOffsetExpression(winrt::Orientation::Vertical);
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 191 of file ParallaxView.cpp.

{
    winrt::IDependencyProperty dependencyProperty = args.Property();

    if (dependencyProperty == s_ChildProperty)
    {
        winrt::IInspectable oldChild = args.OldValue();
        winrt::IInspectable newChild = args.NewValue();
        UpdateChild(oldChild.as<winrt::UIElement>(), newChild.as<winrt::UIElement>());
    }
    else if (dependencyProperty == s_IsHorizontalShiftClampedProperty ||
             dependencyProperty == s_HorizontalSourceOffsetKindProperty ||
             dependencyProperty == s_HorizontalSourceStartOffsetProperty ||
             dependencyProperty == s_HorizontalSourceEndOffsetProperty ||
             dependencyProperty == s_MaxHorizontalShiftRatioProperty)
    {
        UpdateExpressionAnimation(winrt::Orientation::Horizontal);
    }
    else if (dependencyProperty == s_HorizontalShiftProperty)
    {
        InvalidateMeasure();
        UpdateExpressionAnimation(winrt::Orientation::Horizontal);
    }
    else if (dependencyProperty == s_SourceProperty)
    {
        if (m_scrollInputHelper)
        {
            winrt::IInspectable newSource = args.NewValue();
            m_scrollInputHelper->SetSourceElement(newSource.as<winrt::UIElement>());
        }
    }
    else if (dependencyProperty == s_IsVerticalShiftClampedProperty ||
             dependencyProperty == s_VerticalSourceOffsetKindProperty ||
             dependencyProperty == s_VerticalSourceStartOffsetProperty ||
             dependencyProperty == s_VerticalSourceEndOffsetProperty ||
             dependencyProperty == s_MaxVerticalShiftRatioProperty)
    {
        UpdateExpressionAnimation(winrt::Orientation::Vertical);
    }
    else if (dependencyProperty == s_VerticalShiftProperty)
    {
        InvalidateMeasure();
        UpdateExpressionAnimation(winrt::Orientation::Vertical);
    }
}

void OnScrollInputHelperInfoChanged | ( | bool | horizontalInfoChanged,
 |  | bool | verticalInfoChanged
 | ) |  |

Definition at line 239 of file ParallaxView.cpp.

{
    if (horizontalInfoChanged)
        UpdateExpressionAnimation(winrt::Orientation::Horizontal);
    if (verticalInfoChanged)
        UpdateExpressionAnimation(winrt::Orientation::Vertical);
}

void OnSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 263 of file ParallaxView.cpp.

{
    // ParallaxView sizes influence the source end offset.
    if (HorizontalShift() != 0.0)
    {
        UpdateEndOffsetExpression(winrt::Orientation::Horizontal);
    }

    if (VerticalShift() != 0.0)
    {
        UpdateEndOffsetExpression(winrt::Orientation::Vertical);
    }
}

void RefreshAutomaticHorizontalOffsets ( )

Definition at line 34 of file ParallaxView.cpp.

{
    // This method is meant to be invoked when the ParallaxView is parallaxing horizontally, is
    // placed within a scrollPresenter content and its horizontal offset within that content has changed.
    if (HorizontalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative && HorizontalShift() != 0.0)
    {
        UpdateStartOffsetExpression(winrt::Orientation::Horizontal);
        UpdateEndOffsetExpression(winrt::Orientation::Horizontal);
    }
}

void RefreshAutomaticVerticalOffsets ( )

Definition at line 45 of file ParallaxView.cpp.

{
    // This method is meant to be invoked when the ParallaxView is parallaxing vertically, is
    // placed within a scrollPresenter content and its vertical offset within that content has changed.
    if (VerticalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative && VerticalShift() != 0.0)
    {
        UpdateStartOffsetExpression(winrt::Orientation::Vertical);
        UpdateEndOffsetExpression(winrt::Orientation::Vertical);
    }
}

void UnhookChildPropertyChanged ( bool isInDestructor ) [private]

Definition at line 747 of file ParallaxView.cpp.

{
    if (auto child = m_currentListeningChild.safe_get(isInDestructor))
    {
        if (m_childHorizontalAlignmentChangedToken.value != 0)
        {
            child.UnregisterPropertyChangedCallback(winrt::FrameworkElement::HorizontalAlignmentProperty(), m_childHorizontalAlignmentChangedToken.value);
            m_childHorizontalAlignmentChangedToken.value = 0;
        }
        if (m_childVerticalAlignmentChangedToken.value != 0)
        {
            child.UnregisterPropertyChangedCallback(winrt::FrameworkElement::VerticalAlignmentProperty(), m_childVerticalAlignmentChangedToken.value);
            m_childVerticalAlignmentChangedToken.value = 0;
        }
        m_currentListeningChild.set(nullptr);
    }
}

void UpdateChild | ( | const winrt::UIElement & | oldChild,
 |  | const winrt::UIElement & | newChild |
 | ) |  |  | [private]

Definition at line 290 of file ParallaxView.cpp.

{
    winrt::FrameworkElement childAsFrameworkElement = nullptr;

    UnhookChildPropertyChanged(false /* isInDestructor */);

    auto children = try_as<winrt::Panel>().Children();
    children.Clear();

    if (newChild)
    {
        children.Append(newChild);

        // Detect when a child alignment changes, so it can be re-arranged.
        childAsFrameworkElement = newChild.try_as<winrt::FrameworkElement>();
        HookChildPropertyChanged(childAsFrameworkElement);
    }

    if (m_scrollInputHelper && m_scrollInputHelper->TargetElement() != newChild)
    {
        m_scrollInputHelper->SetTargetElement(newChild);
        if (HorizontalShift() != 0.0)
        {
            UpdateExpressionAnimation(winrt::Orientation::Horizontal);
        }
        if (VerticalShift() != 0.0)
        {
            UpdateExpressionAnimation(winrt::Orientation::Vertical);
        }
    }
}

void UpdateEndOffsetExpression ( winrt::Orientation orientation ) [private]

Definition at line 427 of file ParallaxView.cpp.

{
    if (m_scrollInputHelper && m_scrollInputHelper->SourcePropertySet() && m_animatedVariables &&
        ((orientation == winrt::Orientation::Horizontal && HorizontalShift() != 0.0) ||
        (orientation == winrt::Orientation::Vertical && VerticalShift() != 0.0)))
    {
        winrt::ExpressionAnimation endOffsetExpressionAnimation = nullptr;

        if (orientation == winrt::Orientation::Horizontal)
        {
            if (!m_horizontalSourceEndOffsetExpression)
            {
                m_horizontalSourceEndOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
            }
            endOffsetExpressionAnimation = m_horizontalSourceEndOffsetExpression;
        }
        else
        {
            if (!m_verticalSourceEndOffsetExpression)
            {
                m_verticalSourceEndOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
            }
            endOffsetExpressionAnimation = m_verticalSourceEndOffsetExpression;
        }

        std::wstring endOffsetExpression;
        const float endOffset = static_cast<float>(orientation == winrt::Orientation::Horizontal ? HorizontalSourceEndOffset() : VerticalSourceEndOffset());

        endOffsetExpressionAnimation.SetScalarParameter(L"endOffset", endOffset);
        endOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());

        if ((orientation == winrt::Orientation::Horizontal && HorizontalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative) ||
            (orientation == winrt::Orientation::Vertical && VerticalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative))
        {
            // Horizontal/VerticalSourceEndOffset is added to automatic value

            const float maxOverpanOffset = static_cast<float>(m_scrollInputHelper->GetMaxOverpanOffset(orientation));

            endOffsetExpressionAnimation.SetScalarParameter(L"maxOverpanOffset", maxOverpanOffset);

            if (m_scrollInputHelper->IsTargetElementInSource())
            {
                // Target is inside the scrollPresenter.

                // endOffset = (ParallaxViewOffset + ParallaxViewWidth + HorizontalSourceEndOffset) * ZoomFactor + MaxOverpanOffset
                const float parallaxViewOffset = static_cast<float>(m_scrollInputHelper->GetOffsetFromScrollContentElement(*this, orientation));
                const float parallaxViewSize = static_cast<float>(orientation == winrt::Orientation::Horizontal ? ActualWidth() : ActualHeight());

                endOffsetExpression = L"(parallaxViewOffset + parallaxViewSize + endOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" + maxOverpanOffset";
                endOffsetExpressionAnimation.SetScalarParameter(L"parallaxViewOffset", parallaxViewOffset);
                endOffsetExpressionAnimation.SetScalarParameter(L"parallaxViewSize", parallaxViewSize);
            }
            else
            {
                // Target is outside the scrollPresenter.

                const float viewportSize = static_cast<float>(m_scrollInputHelper->GetViewportSize(orientation));
                const float contentSize = static_cast<float>(m_scrollInputHelper->GetContentSize(orientation));

                // endOffset = Max(0, (ContentWidth + HorizontalSourceEndOffset) * ZoomFactor - ViewportWidth) + MaxOverpanOffset
                endOffsetExpression = L"Max(0.0f, (contentSize + endOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize) + maxOverpanOffset";
                endOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", viewportSize);
                endOffsetExpressionAnimation.SetScalarParameter(L"contentSize", contentSize);
            }
        }
        else
        {
            // Horizontal/VerticalSourceEndOffset is an absolute value

            const float viewportSize = static_cast<float>(m_scrollInputHelper->GetViewportSize(orientation));
            const float contentSize = static_cast<float>(m_scrollInputHelper->GetContentSize(orientation));

            // If (ContentWidth > ViewportWidth) Then
            //   If (HorizontalSourceEndOffset <= ContentWidth - ViewportWidth) Then
            //     endOffset = Max(0, HorizontalSourceEndOffset * ZoomFactor)
            //   Else
            //     endOffset = Max(0, (ContentWidth - ViewportWidth) * ZoomFactor) + HorizontalSourceEndOffset - ContentWidth + ViewportWidth
            // Else
            //   If (HorizontalSourceEndOffset <= 0) Then
            //     endOffset = Max(0, (ContentWith + HorizontalSourceEndOffset) * ZoomFactor - ViewportWidth)
            //   Else
            //     endOffset = Max(0, ContentWidth * ZoomFactor - ViewportWidth) + HorizontalSourceEndOffset
            if (contentSize > viewportSize)
            {
                if (endOffset <= contentSize - viewportSize)
                {
                    endOffsetExpression = L"Max(0.0f, endOffset * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L")";
                }
                else
                {
                    endOffsetExpression = L"Max(0.0f, (contentSize - viewportSize) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L") + endOffset - contentSize + viewportSize";
                    endOffsetExpressionAnimation.SetScalarParameter(L"contentSize", contentSize);
                    endOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", viewportSize);
                }
            }
            else
            {
                if (endOffset <= 0.0f)
                {
                    endOffsetExpression = L"Max(0.0f, (contentSize + endOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize)";
                }
                else
                {
                    endOffsetExpression = L"Max(0.0f, contentSize * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize) + endOffset";
                }
                endOffsetExpressionAnimation.SetScalarParameter(L"contentSize", contentSize);
                endOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", viewportSize);
            }
        }

        if (endOffsetExpressionAnimation.Expression() != endOffsetExpression)
        {
            endOffsetExpressionAnimation.Expression(endOffsetExpression);
        }

        m_animatedVariables.StopAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceEndOffset" : L"VerticalSourceEndOffset");
        m_animatedVariables.StartAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceEndOffset" : L"VerticalSourceEndOffset", endOffsetExpressionAnimation);
    }
}

void UpdateExpressionAnimation ( winrt::Orientation orientation ) [private]

Definition at line 548 of file ParallaxView.cpp.

{
    if (m_scrollInputHelper && m_scrollInputHelper->TargetElement() && m_scrollInputHelper->SourcePropertySet())
    {
        winrt::Visual targetVisual = winrt::ElementCompositionPreview::GetElementVisual(m_scrollInputHelper->TargetElement());
        if (m_targetVisual != targetVisual)
        {
            m_targetVisual = targetVisual;
            winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_scrollInputHelper->TargetElement(), true);
            EnsureAnimatedVariables();
        }
    }
    else if (m_targetVisual)
    {
        // Stop prior parallaxing animations.
        m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal));
        m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical));
        m_isHorizontalAnimationStarted = m_isVerticalAnimationStarted = false;
        m_targetVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });
        m_targetVisual = nullptr;
    }

    if (m_targetVisual)
    {
        if ((orientation == winrt::Orientation::Horizontal && HorizontalShift() == 0.0) ||
            (orientation == winrt::Orientation::Vertical && VerticalShift() == 0.0))
        {
            if (orientation == winrt::Orientation::Horizontal)
            {
                if (m_isHorizontalAnimationStarted)
                {
                    // Stop prior horizontal parallaxing animation.
                    m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal));
                    m_isHorizontalAnimationStarted = false;
                    m_targetVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });

                    if (m_isVerticalAnimationStarted)
                    {
                        m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical), m_verticalParallaxExpressionInternal);
                    }
                }
            }
            else if (m_isVerticalAnimationStarted)
            {
                // Stop prior vertical parallaxing animation.
                m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical));
                m_isVerticalAnimationStarted = false;
                m_targetVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });

                if (m_isHorizontalAnimationStarted)
                {
                    m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal), m_horizontalParallaxExpressionInternal);
                }
            }
        }
        else
        {
            UpdateStartOffsetExpression(orientation);
            UpdateEndOffsetExpression(orientation);

            winrt::ExpressionAnimation parallaxExpressionInternal = (orientation == winrt::Orientation::Horizontal) ? m_horizontalParallaxExpressionInternal : m_verticalParallaxExpressionInternal;
            std::wstring source = L"source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceOffsetPropertyName(orientation));
            std::wstring startOffset = (orientation == winrt::Orientation::Horizontal) ? L"animatedVariables.HorizontalSourceStartOffset" : L"animatedVariables.VerticalSourceStartOffset";
            std::wstring endOffset = (orientation == winrt::Orientation::Horizontal) ? L"animatedVariables.HorizontalSourceEndOffset" : L"animatedVariables.VerticalSourceEndOffset";
            std::wstring parallaxExpression;
            const float shift = (float)(orientation == winrt::Orientation::Horizontal ? HorizontalShift() : VerticalShift());

            if ((orientation == winrt::Orientation::Horizontal && IsHorizontalShiftClamped()) ||
                (orientation == winrt::Orientation::Vertical && IsVerticalShiftClamped()))
            {
                // Clamped parallax offset case.

                if (shift > 0.0)
                {
                    // X <= startOffset --> P(X) = 0
                    parallaxExpression = L"(-" + static_cast<std::wstring>(source) + L" <= " + static_cast<std::wstring>(startOffset) + L") ? 0.0f : ";

                    // startOffset < X < endOffset --> P(X) = -Min(MaxRatio, shift / (endOffset - startOffset)) * (X - startOffset)
                    parallaxExpression += L"((-" + static_cast<std::wstring>(source) + L" < " + static_cast<std::wstring>(endOffset) + L") ? ";
                    parallaxExpression += L"(-Min(maxRatio, (shift / (" + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L"))) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(startOffset) + L")) : ";

                    // X >= endOffset --> P(X) = -Min(MaxRatio * Max(0 , endOffset - startOffset), shift)
                    parallaxExpression += L"-Min(maxRatio * Max(0.0f, " + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L"), shift))";
                }
                else
                {
                    // shift < 0.0

                    // X <= startOffset --> P(X) = -Min(MaxRatio * Max(0 , endOffset - startOffset), -shift)
                    parallaxExpression = L"(-" + static_cast<std::wstring>(source) + L" <= " + static_cast<std::wstring>(startOffset) + L") ? -Min(maxRatio * Max(0.0f, " + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L"), -shift) : ";

                    // startOffset < X < endOffset --> P(X) = Min(MaxRatio, shift / (startOffset - endOffset)) * (X - endOffset)
                    parallaxExpression += L"((-" + static_cast<std::wstring>(source) + L" < " + static_cast<std::wstring>(endOffset) + L") ? ";
                    parallaxExpression += L"(Min(maxRatio, (shift / (" + static_cast<std::wstring>(startOffset) + L" - " + static_cast<std::wstring>(endOffset) + L"))) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(endOffset) + L")) : ";

                    // X >= endOffset --> P(X) = 0
                    parallaxExpression += L"0.0f)";
                }
            }
            else
            {
                // Unclamped parallax offset case.

                if (shift > 0.0)
                {
                    // startOffset == endOffset --> P(X) = 0
                    parallaxExpression = L"(" + static_cast<std::wstring>(startOffset) + L" == " + static_cast<std::wstring>(endOffset) + L") ? 0.0f : ";

                    // startOffset != endOffset --> P(X) = -Min(MaxRatio, shift / (endOffset - startOffset)) * (X - startOffset)
                    parallaxExpression += L"-Min(maxRatio, shift / (" + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L")) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(startOffset) + L")";
                }
                else
                {
                    // startOffset == endOffset --> P(X) = 0
                    parallaxExpression = L"(" + static_cast<std::wstring>(startOffset) + L" == " + static_cast<std::wstring>(endOffset) + L") ? 0.0f : ";

                    // startOffset != endOffset --> P(X) = Min(MaxRatio, shift / (startOffset - endOffset)) * (X - endOffset)
                    parallaxExpression += L"Min(maxRatio, shift / (" + static_cast<std::wstring>(startOffset) + L" - " + static_cast<std::wstring>(endOffset) + L")) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(endOffset) + L")";
                }
            }

            if (!parallaxExpressionInternal)
            {
                parallaxExpressionInternal = m_targetVisual.Compositor().CreateExpressionAnimation(parallaxExpression);
                if (orientation == winrt::Orientation::Horizontal)
                {
                    m_horizontalParallaxExpressionInternal = parallaxExpressionInternal;
                }
                else
                {
                    m_verticalParallaxExpressionInternal = parallaxExpressionInternal;
                }
            }
            else if (parallaxExpressionInternal.Expression() != parallaxExpression)
            {
                parallaxExpressionInternal.Expression(parallaxExpression);
            }

            parallaxExpressionInternal.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
            parallaxExpressionInternal.SetReferenceParameter(L"animatedVariables", m_animatedVariables);
            parallaxExpressionInternal.SetScalarParameter(L"maxRatio", static_cast<float>(max(0.0, (orientation == winrt::Orientation::Horizontal ? MaxHorizontalShiftRatio() : MaxVerticalShiftRatio()))));
            parallaxExpressionInternal.SetScalarParameter(L"shift", shift);

            if (orientation == winrt::Orientation::Horizontal)
            {
                if (m_isHorizontalAnimationStarted)
                {
                    m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal));
                }
                m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal), parallaxExpressionInternal);
                m_isHorizontalAnimationStarted = true;
            }
            else
            {
                if (m_isVerticalAnimationStarted)
                {
                    m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical));
                }
                m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical), parallaxExpressionInternal);
                m_isVerticalAnimationStarted = true;
            }
        }
    }
}

void UpdateStartOffsetExpression ( winrt::Orientation orientation ) [private]

Definition at line 336 of file ParallaxView.cpp.

{
    if (m_scrollInputHelper && m_scrollInputHelper->SourcePropertySet() && m_animatedVariables &&
        ((orientation == winrt::Orientation::Horizontal && HorizontalShift() != 0.0) ||
        (orientation == winrt::Orientation::Vertical && VerticalShift() != 0.0)))
    {
        winrt::ExpressionAnimation startOffsetExpressionAnimation = nullptr;

        if (orientation == winrt::Orientation::Horizontal)
        {
            if (!m_horizontalSourceStartOffsetExpression)
            {
                m_horizontalSourceStartOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
            }
            startOffsetExpressionAnimation = m_horizontalSourceStartOffsetExpression;
        }
        else
        {
            if (!m_verticalSourceStartOffsetExpression)
            {
                m_verticalSourceStartOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
            }
            startOffsetExpressionAnimation = m_verticalSourceStartOffsetExpression;
        }

        std::wstring startOffsetExpression;
        const float startOffset = static_cast<float>(orientation == winrt::Orientation::Horizontal ? HorizontalSourceStartOffset() : VerticalSourceStartOffset());

        startOffsetExpressionAnimation.SetScalarParameter(L"startOffset", startOffset);

        if ((orientation == winrt::Orientation::Horizontal && HorizontalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative) ||
            (orientation == winrt::Orientation::Vertical && VerticalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative))
        {
            // Horizontal/VerticalSourceStartOffset is added to automatic value

            const float maxUnderpanOffset = static_cast<float>(m_scrollInputHelper->GetMaxUnderpanOffset(orientation));

            startOffsetExpressionAnimation.SetScalarParameter(L"maxUnderpanOffset", maxUnderpanOffset);

            if (m_scrollInputHelper->IsTargetElementInSource())
            {
                // Target is inside the scrollPresenter.

                // startOffset = (ParallaxViewOffset + HorizontalSourceStartOffset) * ZoomFactor - ViewportWidth - MaxUnderpanOffset
                const float parallaxViewOffset = static_cast<float>(m_scrollInputHelper->GetOffsetFromScrollContentElement(*this, orientation));
                const float viewportSize = static_cast<float>(m_scrollInputHelper->GetViewportSize(orientation));

                startOffsetExpression = L"(parallaxViewOffset + startOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize - maxUnderpanOffset";
                startOffsetExpressionAnimation.SetScalarParameter(L"parallaxViewOffset", static_cast<float>(parallaxViewOffset));
                startOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", static_cast<float>(viewportSize));
                startOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
            }
            else
            {
                // Target is outside the scrollPresenter.

                // startOffset = HorizontalSourceStartOffset * ZoomFactor - MaxUnderpanOffset
                startOffsetExpression = L"startOffset * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - maxUnderpanOffset";
                startOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
            }
        }
        else
        {
            // Horizontal/VerticalSourceStartOffset is an absolute value

            // If HorizontalSourceStartOffset <= 0 Then
            //   startOffset = HorizontalSourceStartOffset
            // Else
            //   startOffset = HorizontalSourceStartOffset * ZoomFactor
            if (startOffset > 0.0f)
            {
                startOffsetExpression = L"startOffset * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName());
                startOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
            }
            else
            {
                startOffsetExpression = L"startOffset";
            }
        }

        if (startOffsetExpressionAnimation.Expression() != startOffsetExpression)
        {
            startOffsetExpressionAnimation.Expression(startOffsetExpression);
        }

        m_animatedVariables.StopAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceStartOffset" : L"VerticalSourceStartOffset");
        m_animatedVariables.StartAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceStartOffset" : L"VerticalSourceStartOffset", startOffsetExpressionAnimation);
    }
}

The documentation for this class was generated from the following files:
  • ParallaxView/ParallaxView.h
  • ParallaxView/ParallaxView.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ParallaxViewProperties Class Reference

#include "ParallaxView.properties.h"

Inherited by ParallaxView.

List of all members.

Public Member Functions

ParallaxViewProperties ()
void | Child (winrt::UIElement const &value)
winrt::UIElement | Child ()
void | HorizontalShift (double value)
double | HorizontalShift ()
void | HorizontalSourceEndOffset (double value)
double | HorizontalSourceEndOffset ()
void | HorizontalSourceOffsetKind (winrt::ParallaxSourceOffsetKind const &value)
winrt::ParallaxSourceOffsetKind | HorizontalSourceOffsetKind ()
void | HorizontalSourceStartOffset (double value)
double | HorizontalSourceStartOffset ()
void | IsHorizontalShiftClamped (bool value)
bool | IsHorizontalShiftClamped ()
void | IsVerticalShiftClamped (bool value)
bool | IsVerticalShiftClamped ()
void | MaxHorizontalShiftRatio (double value)
double | MaxHorizontalShiftRatio ()
void | MaxVerticalShiftRatio (double value)
double | MaxVerticalShiftRatio ()
winrt::UIElement | Source ()
void | Source (winrt::UIElement const &value)
double | VerticalShift ()
void | VerticalShift (double value)
double | VerticalSourceEndOffset ()
void | VerticalSourceEndOffset (double value)
void | VerticalSourceOffsetKind (winrt::ParallaxSourceOffsetKind const &value)
winrt::ParallaxSourceOffsetKind | VerticalSourceOffsetKind ()
double | VerticalSourceStartOffset ()
void | VerticalSourceStartOffset (double value)

Static Public Member Functions

static winrt::DependencyProperty | ChildProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HorizontalShiftProperty ()
static winrt::DependencyProperty | HorizontalSourceEndOffsetProperty ()
static winrt::DependencyProperty | HorizontalSourceOffsetKindProperty ()
static winrt::DependencyProperty | HorizontalSourceStartOffsetProperty ()
static winrt::DependencyProperty | IsHorizontalShiftClampedProperty ()
static winrt::DependencyProperty | IsVerticalShiftClampedProperty ()
static winrt::DependencyProperty | MaxHorizontalShiftRatioProperty ()
static winrt::DependencyProperty | MaxVerticalShiftRatioProperty ()
static void | OnChildPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalShiftPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalSourceEndOffsetPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalSourceOffsetKindPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalSourceStartOffsetPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsHorizontalShiftClampedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsVerticalShiftClampedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxHorizontalShiftRatioPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxVerticalShiftRatioPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalShiftPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalSourceEndOffsetPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalSourceOffsetKindPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalSourceStartOffsetPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SourceProperty ()
static winrt::DependencyProperty | VerticalShiftProperty ()
static winrt::DependencyProperty | VerticalSourceEndOffsetProperty ()
static winrt::DependencyProperty | VerticalSourceOffsetKindProperty ()
static winrt::DependencyProperty | VerticalSourceStartOffsetProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ChildProperty
static GlobalDependencyProperty | s_HorizontalShiftProperty
static GlobalDependencyProperty | s_HorizontalSourceEndOffsetProperty
static GlobalDependencyProperty | s_HorizontalSourceOffsetKindProperty
static GlobalDependencyProperty | s_HorizontalSourceStartOffsetProperty
static GlobalDependencyProperty | s_IsHorizontalShiftClampedProperty
static GlobalDependencyProperty | s_IsVerticalShiftClampedProperty
static GlobalDependencyProperty | s_MaxHorizontalShiftRatioProperty
static GlobalDependencyProperty | s_MaxVerticalShiftRatioProperty
static GlobalDependencyProperty | s_SourceProperty
static GlobalDependencyProperty | s_VerticalShiftProperty
static GlobalDependencyProperty | s_VerticalSourceEndOffsetProperty
static GlobalDependencyProperty | s_VerticalSourceOffsetKindProperty
static GlobalDependencyProperty | s_VerticalSourceStartOffsetProperty

Detailed Description

Definition at line 7 of file ParallaxView.properties.h.

Constructor & Destructor Documentation

ParallaxViewProperties ( )

Definition at line 31 of file ParallaxView.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void Child ( winrt::UIElement const & value )

Definition at line 324 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_ChildProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
    }
}

winrt::UIElement Child ( )

Definition at line 332 of file ParallaxView.properties.cpp.

{
    return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_ChildProperty));
}

static winrt::DependencyProperty ChildProperty ( ) [inline, static]

Definition at line 54 of file ParallaxView.properties.h.

{ return s_ChildProperty; }

void ClearProperties ( ) [static]

Definition at line 194 of file ParallaxView.properties.cpp.

{
    s_ChildProperty = nullptr;
    s_HorizontalShiftProperty = nullptr;
    s_HorizontalSourceEndOffsetProperty = nullptr;
    s_HorizontalSourceOffsetKindProperty = nullptr;
    s_HorizontalSourceStartOffsetProperty = nullptr;
    s_IsHorizontalShiftClampedProperty = nullptr;
    s_IsVerticalShiftClampedProperty = nullptr;
    s_MaxHorizontalShiftRatioProperty = nullptr;
    s_MaxVerticalShiftRatioProperty = nullptr;
    s_SourceProperty = nullptr;
    s_VerticalShiftProperty = nullptr;
    s_VerticalSourceEndOffsetProperty = nullptr;
    s_VerticalSourceOffsetKindProperty = nullptr;
    s_VerticalSourceStartOffsetProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 36 of file ParallaxView.properties.cpp.

{
    if (!s_ChildProperty)
    {
        s_ChildProperty =
            InitializeDependencyProperty(
                L"Child",
                winrt::name_of<winrt::UIElement>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnChildPropertyChanged));
    }
    if (!s_HorizontalShiftProperty)
    {
        s_HorizontalShiftProperty =
            InitializeDependencyProperty(
                L"HorizontalShift",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnHorizontalShiftPropertyChanged));
    }
    if (!s_HorizontalSourceEndOffsetProperty)
    {
        s_HorizontalSourceEndOffsetProperty =
            InitializeDependencyProperty(
                L"HorizontalSourceEndOffset",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnHorizontalSourceEndOffsetPropertyChanged));
    }
    if (!s_HorizontalSourceOffsetKindProperty)
    {
        s_HorizontalSourceOffsetKindProperty =
            InitializeDependencyProperty(
                L"HorizontalSourceOffsetKind",
                winrt::name_of<winrt::ParallaxSourceOffsetKind>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(winrt::ParallaxSourceOffsetKind::Relative),
                winrt::PropertyChangedCallback(&OnHorizontalSourceOffsetKindPropertyChanged));
    }
    if (!s_HorizontalSourceStartOffsetProperty)
    {
        s_HorizontalSourceStartOffsetProperty =
            InitializeDependencyProperty(
                L"HorizontalSourceStartOffset",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnHorizontalSourceStartOffsetPropertyChanged));
    }
    if (!s_IsHorizontalShiftClampedProperty)
    {
        s_IsHorizontalShiftClampedProperty =
            InitializeDependencyProperty(
                L"IsHorizontalShiftClamped",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsHorizontalShiftClampedPropertyChanged));
    }
    if (!s_IsVerticalShiftClampedProperty)
    {
        s_IsVerticalShiftClampedProperty =
            InitializeDependencyProperty(
                L"IsVerticalShiftClamped",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsVerticalShiftClampedPropertyChanged));
    }
    if (!s_MaxHorizontalShiftRatioProperty)
    {
        s_MaxHorizontalShiftRatioProperty =
            InitializeDependencyProperty(
                L"MaxHorizontalShiftRatio",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(1.0),
                winrt::PropertyChangedCallback(&OnMaxHorizontalShiftRatioPropertyChanged));
    }
    if (!s_MaxVerticalShiftRatioProperty)
    {
        s_MaxVerticalShiftRatioProperty =
            InitializeDependencyProperty(
                L"MaxVerticalShiftRatio",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(1.0),
                winrt::PropertyChangedCallback(&OnMaxVerticalShiftRatioPropertyChanged));
    }
    if (!s_SourceProperty)
    {
        s_SourceProperty =
            InitializeDependencyProperty(
                L"Source",
                winrt::name_of<winrt::UIElement>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnSourcePropertyChanged));
    }
    if (!s_VerticalShiftProperty)
    {
        s_VerticalShiftProperty =
            InitializeDependencyProperty(
                L"VerticalShift",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnVerticalShiftPropertyChanged));
    }
    if (!s_VerticalSourceEndOffsetProperty)
    {
        s_VerticalSourceEndOffsetProperty =
            InitializeDependencyProperty(
                L"VerticalSourceEndOffset",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnVerticalSourceEndOffsetPropertyChanged));
    }
    if (!s_VerticalSourceOffsetKindProperty)
    {
        s_VerticalSourceOffsetKindProperty =
            InitializeDependencyProperty(
                L"VerticalSourceOffsetKind",
                winrt::name_of<winrt::ParallaxSourceOffsetKind>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(winrt::ParallaxSourceOffsetKind::Relative),
                winrt::PropertyChangedCallback(&OnVerticalSourceOffsetKindPropertyChanged));
    }
    if (!s_VerticalSourceStartOffsetProperty)
    {
        s_VerticalSourceStartOffsetProperty =
            InitializeDependencyProperty(
                L"VerticalSourceStartOffset",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ParallaxView>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnVerticalSourceStartOffsetPropertyChanged));
    }
}

double HorizontalShift ( )

Definition at line 345 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalShiftProperty));
}

void HorizontalShift ( double value )

Definition at line 337 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_HorizontalShiftProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty HorizontalShiftProperty ( ) [inline, static]

Definition at line 55 of file ParallaxView.properties.h.

{ return s_HorizontalShiftProperty; }

void HorizontalSourceEndOffset ( double value )

Definition at line 350 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_HorizontalSourceEndOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double HorizontalSourceEndOffset ( )

Definition at line 358 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalSourceEndOffsetProperty));
}

static winrt::DependencyProperty HorizontalSourceEndOffsetProperty ( ) [inline, static]

Definition at line 56 of file ParallaxView.properties.h.

{ return s_HorizontalSourceEndOffsetProperty; }

winrt::ParallaxSourceOffsetKind HorizontalSourceOffsetKind ( )

Definition at line 371 of file ParallaxView.properties.cpp.

{
    return ValueHelper<winrt::ParallaxSourceOffsetKind>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalSourceOffsetKindProperty));
}

void HorizontalSourceOffsetKind ( winrt::ParallaxSourceOffsetKind const & value )

Definition at line 363 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_HorizontalSourceOffsetKindProperty, ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty HorizontalSourceOffsetKindProperty ( ) [inline, static]

Definition at line 57 of file ParallaxView.properties.h.

{ return s_HorizontalSourceOffsetKindProperty; }

void HorizontalSourceStartOffset ( double value )

Definition at line 376 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_HorizontalSourceStartOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double HorizontalSourceStartOffset ( )

Definition at line 384 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalSourceStartOffsetProperty));
}

static winrt::DependencyProperty HorizontalSourceStartOffsetProperty ( ) [inline, static]

Definition at line 58 of file ParallaxView.properties.h.

{ return s_HorizontalSourceStartOffsetProperty; }

void IsHorizontalShiftClamped ( bool value )

Definition at line 389 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_IsHorizontalShiftClampedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsHorizontalShiftClamped ( )

Definition at line 397 of file ParallaxView.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_IsHorizontalShiftClampedProperty));
}

static winrt::DependencyProperty IsHorizontalShiftClampedProperty ( ) [inline, static]

Definition at line 59 of file ParallaxView.properties.h.

{ return s_IsHorizontalShiftClampedProperty; }

void IsVerticalShiftClamped ( bool value )

Definition at line 402 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_IsVerticalShiftClampedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsVerticalShiftClamped ( )

Definition at line 410 of file ParallaxView.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_IsVerticalShiftClampedProperty));
}

static winrt::DependencyProperty IsVerticalShiftClampedProperty ( ) [inline, static]

Definition at line 60 of file ParallaxView.properties.h.

{ return s_IsVerticalShiftClampedProperty; }

double MaxHorizontalShiftRatio ( )

Definition at line 423 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_MaxHorizontalShiftRatioProperty));
}

void MaxHorizontalShiftRatio ( double value )

Definition at line 415 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_MaxHorizontalShiftRatioProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MaxHorizontalShiftRatioProperty ( ) [inline, static]

Definition at line 61 of file ParallaxView.properties.h.

{ return s_MaxHorizontalShiftRatioProperty; }

void MaxVerticalShiftRatio ( double value )

Definition at line 428 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_MaxVerticalShiftRatioProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double MaxVerticalShiftRatio ( )

Definition at line 436 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_MaxVerticalShiftRatioProperty));
}

static winrt::DependencyProperty MaxVerticalShiftRatioProperty ( ) [inline, static]

Definition at line 62 of file ParallaxView.properties.h.

{ return s_MaxVerticalShiftRatioProperty; }

void OnChildPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 212 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnHorizontalShiftPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 220 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnHorizontalSourceEndOffsetPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 228 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnHorizontalSourceOffsetKindPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 236 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnHorizontalSourceStartOffsetPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 244 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnIsHorizontalShiftClampedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 252 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnIsVerticalShiftClampedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 260 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnMaxHorizontalShiftRatioPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 268 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnMaxVerticalShiftRatioPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 276 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 284 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnVerticalShiftPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 292 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnVerticalSourceEndOffsetPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 300 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnVerticalSourceOffsetKindPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 308 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void OnVerticalSourceStartOffsetPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 316 of file ParallaxView.properties.cpp.

{
    auto owner = sender.as<winrt::ParallaxView>();
    winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
}

void Source ( winrt::UIElement const & value )

Definition at line 441 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
    }
}

winrt::UIElement Source ( )

Definition at line 449 of file ParallaxView.properties.cpp.

{
    return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_SourceProperty));
}

static winrt::DependencyProperty SourceProperty ( ) [inline, static]

Definition at line 63 of file ParallaxView.properties.h.

{ return s_SourceProperty; }

double VerticalShift ( )

Definition at line 462 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalShiftProperty));
}

void VerticalShift ( double value )

Definition at line 454 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_VerticalShiftProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty VerticalShiftProperty ( ) [inline, static]

Definition at line 64 of file ParallaxView.properties.h.

{ return s_VerticalShiftProperty; }

double VerticalSourceEndOffset ( )

Definition at line 475 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalSourceEndOffsetProperty));
}

void VerticalSourceEndOffset ( double value )

Definition at line 467 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_VerticalSourceEndOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty VerticalSourceEndOffsetProperty ( ) [inline, static]

Definition at line 65 of file ParallaxView.properties.h.

{ return s_VerticalSourceEndOffsetProperty; }

void VerticalSourceOffsetKind ( winrt::ParallaxSourceOffsetKind const & value )

Definition at line 480 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_VerticalSourceOffsetKindProperty, ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(value));
    }
}

winrt::ParallaxSourceOffsetKind VerticalSourceOffsetKind ( )

Definition at line 488 of file ParallaxView.properties.cpp.

{
    return ValueHelper<winrt::ParallaxSourceOffsetKind>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalSourceOffsetKindProperty));
}

static winrt::DependencyProperty VerticalSourceOffsetKindProperty ( ) [inline, static]

Definition at line 66 of file ParallaxView.properties.h.

{ return s_VerticalSourceOffsetKindProperty; }

double VerticalSourceStartOffset ( )

Definition at line 501 of file ParallaxView.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalSourceStartOffsetProperty));
}

void VerticalSourceStartOffset ( double value )

Definition at line 493 of file ParallaxView.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ParallaxView*>(this)->SetValue(s_VerticalSourceStartOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty VerticalSourceStartOffsetProperty ( ) [inline, static]

Definition at line 67 of file ParallaxView.properties.h.

{ return s_VerticalSourceStartOffsetProperty; }

Member Data Documentation

GlobalDependencyProperty s_ChildProperty [static]

Definition at line 69 of file ParallaxView.properties.h.

GlobalDependencyProperty s_HorizontalShiftProperty [static]

Definition at line 70 of file ParallaxView.properties.h.

GlobalDependencyProperty s_HorizontalSourceEndOffsetProperty [static]

Definition at line 71 of file ParallaxView.properties.h.

GlobalDependencyProperty s_HorizontalSourceOffsetKindProperty [static]

Definition at line 72 of file ParallaxView.properties.h.

GlobalDependencyProperty s_HorizontalSourceStartOffsetProperty [static]

Definition at line 73 of file ParallaxView.properties.h.

GlobalDependencyProperty s_IsHorizontalShiftClampedProperty [static]

Definition at line 74 of file ParallaxView.properties.h.

GlobalDependencyProperty s_IsVerticalShiftClampedProperty [static]

Definition at line 75 of file ParallaxView.properties.h.

GlobalDependencyProperty s_MaxHorizontalShiftRatioProperty [static]

Definition at line 76 of file ParallaxView.properties.h.

GlobalDependencyProperty s_MaxVerticalShiftRatioProperty [static]

Definition at line 77 of file ParallaxView.properties.h.

GlobalDependencyProperty s_SourceProperty [static]

Definition at line 78 of file ParallaxView.properties.h.

GlobalDependencyProperty s_VerticalShiftProperty [static]

Definition at line 79 of file ParallaxView.properties.h.

GlobalDependencyProperty s_VerticalSourceEndOffsetProperty [static]

Definition at line 80 of file ParallaxView.properties.h.

GlobalDependencyProperty s_VerticalSourceOffsetKindProperty [static]

Definition at line 81 of file ParallaxView.properties.h.

GlobalDependencyProperty s_VerticalSourceStartOffsetProperty [static]

Definition at line 82 of file ParallaxView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ParallaxView.properties.h
  • Generated/ParallaxView.properties.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PerfXamlEvent_RAII Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

PerfXamlEvent_RAII Struct Reference

#include "MuxcTraceLogging.h"

List of all members.

Public Member Functions

PerfXamlEvent_RAII (uint64_t objectPointer, PCSTR eventName, bool isInteresting)
PerfXamlEvent_RAII (PerfXamlEvent_RAII &&)
PerfXamlEvent_RAII (const PerfXamlEvent_RAII &)
~PerfXamlEvent_RAII ()
PerfXamlEvent_RAII & | operator= (const PerfXamlEvent_RAII &)
PerfXamlEvent_RAII & operator= (PerfXamlEvent_RAII &&)

Private Attributes

PCSTR | m_eventName
bool | m_isInteresting
uint64_t | m_objectPointer

Detailed Description

Definition at line 202 of file MuxcTraceLogging.h.

Constructor & Destructor Documentation

PerfXamlEvent_RAII | ( | uint64_t | objectPointer,
 |  | PCSTR | eventName,
 |  | bool | isInteresting |
 | ) |  |  | [inline]

Definition at line 205 of file MuxcTraceLogging.h.

        : m_objectPointer(objectPointer)
        , m_eventName(eventName)
        , m_isInteresting(isInteresting)
    {
        XamlTelemetry::PerfXamlEvent(true, m_objectPointer, m_eventName, m_isInteresting);
    }

~PerfXamlEvent_RAII ( ) [inline]

Definition at line 213 of file MuxcTraceLogging.h.

    {
        XamlTelemetry::PerfXamlEvent(false, m_objectPointer, m_eventName, m_isInteresting);
    }

PerfXamlEvent_RAII ( const PerfXamlEvent_RAII & )
PerfXamlEvent_RAII ( PerfXamlEvent_RAII && )

Member Function Documentation

PerfXamlEvent_RAII& operator= ( const PerfXamlEvent_RAII & )
PerfXamlEvent_RAII& operator= ( PerfXamlEvent_RAII && )

Member Data Documentation

PCSTR m_eventName [private]

Definition at line 226 of file MuxcTraceLogging.h.

bool m_isInteresting [private]

Definition at line 227 of file MuxcTraceLogging.h.

uint64_t m_objectPointer [private]

Definition at line 225 of file MuxcTraceLogging.h.

The documentation for this struct was generated from the following file:
  • Telemetry/MuxcTraceLogging.h
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

PersonPicture Class Reference

#include "PersonPicture.h"

Inherits ReferenceTracker< PersonPicture, winrt::implementation::PersonPictureT >, and PersonPictureProperties.

List of all members.

Public Member Functions

PersonPicture ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

winrt::ImageSource | GetImageSource ()
winrt::hstring | GetInitials ()
winrt::hstring | GetLocalizedPluralBadgeItemStringResource (unsigned int numericValue)
void | LoadImageAsync (std::shared_ptr< winrt::IRandomAccessStreamReference > thumbStreamReference, std::function< void(winrt::BitmapImage)> completedFunction)
void | OnContactChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnDisplayNameChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &e)
void | OnUnloaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &e)
void | UpdateAutomationName ()
void | UpdateBadge ()
void | UpdateBadgeGlyph ()
void | UpdateBadgeImageSource ()
void | UpdateBadgeNumber ()
void | UpdateControlForContact (bool isNewContact)
void | UpdateIfReady ()

Detailed Description

Definition at line 9 of file PersonPicture.h.

Constructor & Destructor Documentation

PersonPicture ( )

Definition at line 14 of file PersonPicture.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_PersonPicture);

    SetDefaultStyleKey(this);

    TemplateSettings(winrt::make<PersonPictureTemplateSettings>());

    Unloaded({ this, &PersonPicture::OnUnloaded });
    SizeChanged({ this, &PersonPicture::OnSizeChanged });
}

Member Function Documentation

winrt::ImageSource GetImageSource ( ) [private]

Helper to determine the image source that should be shown.

Definition at line 124 of file PersonPicture.cpp.

{
    if (ProfilePicture())
    {
        return ProfilePicture();
    }
    else
    {
        return m_contactImageSource.get();
    }
}

winrt::hstring GetInitials ( ) [private]

Helper to determine the initials that should be shown.

Definition at line 108 of file PersonPicture.cpp.

{
    if (!Initials().empty())
    {
        return Initials();
    }
    else if (!m_displayNameInitials.empty())
    {
        return m_displayNameInitials;
    }
    else
    {
        return m_contactDisplayNameInitials;
    }
}

winrt::hstring GetLocalizedPluralBadgeItemStringResource ( unsigned int numericValue ) [private]

Definition at line 368 of file PersonPicture.cpp.

{
    const UINT32 valueMod10 = numericValue % 10;
    winrt::hstring value;

    if (numericValue == 1)  // Singular
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemSingular);
    }
    else if (numericValue == 2) // 2
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural7);
    }
    else if (numericValue == 3 || numericValue == 4) // 3,4
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural2);
    }
    else if (numericValue >= 5 && numericValue <= 10) // 5-10
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural5);
    }
    else if (numericValue >= 11 && numericValue <= 19) // 11-19
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural6);
    }
    else if (valueMod10 == 1) // 21, 31, 41, etc.
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural1);
    }
    else if (valueMod10 >= 2 && valueMod10 <= 4) // 22-24, 32-34, 42-44, etc.
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural3);
    }
    else // Everything else... 0, 20, 25-30, 35-40, etc.
    {
        value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural4);
    }

    return value;
}

void LoadImageAsync | ( | std::shared_ptr< winrt::IRandomAccessStreamReference > | thumbStreamReference,
 |  | std::function< void(winrt::BitmapImage)> | completedFunction |
 | ) |  |  | [private]

Definition at line 26 of file PersonPicture.cpp.

{
    com_ptr<PersonPicture> strongThis = get_strong();
    auto operation = thumbStreamReference->OpenReadAsync();

    operation.Completed(
        winrt::AsyncOperationCompletedHandler<winrt::IRandomAccessStreamWithContentType>(
            [strongThis, completedFunction](
                winrt::IAsyncOperation<winrt::IRandomAccessStreamWithContentType> operation,
                winrt::AsyncStatus asyncStatus)
    {
        strongThis->DispatcherQueue().TryEnqueue(winrt::DispatcherQueueHandler(
            [strongThis, asyncStatus, completedFunction, operation]()
        {
            winrt::BitmapImage bitmap;

            // Handle the failure case here to ensure we are on the UI thread.
            if (asyncStatus != winrt::AsyncStatus::Completed)
            {
                strongThis->m_profilePictureReadAsync.set(nullptr);
                return;
            }

            try
            {
                bitmap.SetSourceAsync(operation.GetResults()).Completed(
                    winrt::AsyncActionCompletedHandler(
                        [strongThis, completedFunction, bitmap](winrt::IAsyncAction, winrt::AsyncStatus asyncStatus)
                {
                    if (asyncStatus != winrt::AsyncStatus::Completed)
                    {
                        strongThis->m_profilePictureReadAsync.set(nullptr);
                        return;
                    }

                    completedFunction(bitmap);
                    strongThis->m_profilePictureReadAsync.set(nullptr);
                }));
            }
            catch (const winrt::hresult_error &e)
            {
                strongThis->m_profilePictureReadAsync.set(nullptr);

                // Ignore the exception if the image is invalid
                if (e.to_abi() == E_INVALIDARG)
                {
                    return;
                }
                else
                {
                    throw;
                }
            }
        }));
    }));

    m_profilePictureReadAsync.set(operation);
}

void OnApplyTemplate ( )

Definition at line 92 of file PersonPicture.cpp.

{
    // Retrieve pointers to stable controls
    winrt::IControlProtected thisAsControlProtected = *this;

    m_initialsTextBlock.set(GetTemplateChildT<winrt::TextBlock>(L"InitialsTextBlock", thisAsControlProtected));

    m_badgeNumberTextBlock.set(GetTemplateChildT<winrt::TextBlock>(L"BadgeNumberTextBlock", thisAsControlProtected));
    m_badgeGlyphIcon.set(GetTemplateChildT<winrt::FontIcon>(L"BadgeGlyphIcon", thisAsControlProtected));
    m_badgingEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"BadgingEllipse", thisAsControlProtected));
    m_badgingBackgroundEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"BadgingBackgroundEllipse", thisAsControlProtected));

    UpdateBadge();
    UpdateIfReady();
}

void OnContactChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 543 of file PersonPicture.cpp.

{
    bool isNewContact = true;

    if (args && args.OldValue() && args.NewValue())
    {
        winrt::Contact oldContact = args.OldValue().as<winrt::Contact>();
        winrt::Contact newContact = args.NewValue().as<winrt::Contact>();

        // Verify that the IDs are not null before comparing the old and new contact object.
        // If both contact IDs are null, it will be treated as a newcontact.
        if (!oldContact.Id().empty() || !newContact.Id().empty())
        {
            isNewContact = oldContact.Id() != newContact.Id();
        }
    }

    UpdateControlForContact(isNewContact);
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 87 of file PersonPicture.cpp.

{
    return winrt::make<PersonPictureAutomationPeer>(*this);
}

void OnDisplayNameChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 536 of file PersonPicture.cpp.

{
    m_displayNameInitials.set(InitialsGenerator::InitialsFromDisplayName(DisplayName()));

    UpdateIfReady();
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 505 of file PersonPicture.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_BadgeNumberProperty ||
        property == s_BadgeGlyphProperty ||
        property == s_BadgeImageSourceProperty)
    {
        UpdateBadge();
    }
    else if (property == s_BadgeTextProperty)
    {
        UpdateAutomationName();
    }
    else if (property == s_ContactProperty)
    {
        OnContactChanged(args);
    }
    else if (property == s_DisplayNameProperty)
    {
        OnDisplayNameChanged(args);
    }
    else if (property == s_ProfilePictureProperty ||
        property == s_InitialsProperty ||
        property == s_IsGroupProperty)
    {
        UpdateIfReady();
    }
    // No additional action required for s_PreferSmallImageProperty
}

void OnSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | e |
 | ) |  |  | [private]

Definition at line 563 of file PersonPicture.cpp.

{
    {
        const bool widthChanged = (args.NewSize().Width != args.PreviousSize().Width);
        const bool heightChanged = (args.NewSize().Height != args.PreviousSize().Height);
        double newSize;

        if (widthChanged && heightChanged)
        {
            // Maintain circle by enforcing the new size on both Width and Height.
            // To do so, we will use the minimum value.
            newSize = (args.NewSize().Width < args.NewSize().Height) ? args.NewSize().Width : args.NewSize().Height;
        }
        else if (widthChanged)
        {
            newSize = args.NewSize().Width;
        }
        else if (heightChanged)
        {
            newSize = args.NewSize().Height;
        }
        else
        {
            return;
        }

        Height(newSize);
        Width(newSize);
    }

    // Calculate the FontSize of the control's text. Design guidelines have specified the
    // font size to be 42% of the container. Since it's circular, 42% of either Width or Height.
    // Note that we cap it to a minimum of 1, since a font size of less than 1 is an invalid value
    // that will result in a failure.
    const double fontSize = std::max(1.0, Width() * .42);

    if (auto initialsTextBlock = m_initialsTextBlock.get())
    {
        initialsTextBlock.FontSize(fontSize);
    }

    if (m_badgingEllipse && m_badgingBackgroundEllipse && m_badgeNumberTextBlock && m_badgeGlyphIcon)
    {
        // Maintain badging circle and font size by enforcing the new size on both Width and Height.
        // Design guidelines have specified the font size to be 60% of the badging plate, and we want to keep
        // badging plate to be about 50% of the control so that don't block the initial/profile picture.
        const double newSize = (args.NewSize().Width < args.NewSize().Height) ? args.NewSize().Width : args.NewSize().Height;
        m_badgingEllipse.get().Height(newSize * 0.5);
        m_badgingEllipse.get().Width(newSize * 0.5);
        m_badgingBackgroundEllipse.get().Height(newSize * 0.5);
        m_badgingBackgroundEllipse.get().Width(newSize * 0.5);
        m_badgeNumberTextBlock.get().FontSize(std::max(1.0, m_badgingEllipse.get().Height() * 0.6));
        m_badgeGlyphIcon.get().FontSize(std::max(1.0, m_badgingEllipse.get().Height() * 0.6));
    }
}

void OnUnloaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | e |
 | ) |  |  | [private]

Definition at line 619 of file PersonPicture.cpp.

{
    if (auto profilePictureReadAsync = m_profilePictureReadAsync.get())
    {
        profilePictureReadAsync.Cancel();
    }
}

void UpdateAutomationName ( ) [private]

Sets the UI Automation name for the control based on contact name and badge state.

Definition at line 293 of file PersonPicture.cpp.

{
    winrt::Contact contact = Contact();
    std::wstring automationName;
    std::wstring contactName;

    // The AutomationName for the control is in the format: PersonName, BadgeInformation.
    // PersonName is set based on the name / initial properties in the order below.
    // if none exist, it defaults to "Person"
    if (IsGroup())
    {
        contactName = ResourceAccessor::GetLocalizedStringResource(SR_GroupName);
    }
    else if (contact && !contact.DisplayName().empty())
    {
        contactName = contact.DisplayName();
    }
    else if (!DisplayName().empty())
    {
        contactName = DisplayName();
    }
    else if (!Initials().empty())
    {
        contactName = Initials();
    }
    else
    {
        contactName = ResourceAccessor::GetLocalizedStringResource(SR_PersonName);
    }

    // BadgeInformation portion of the AutomationName is set to 'n items' if there is a BadgeNumber,
    // or 'icon' for BadgeGlyph or BadgeImageSource. If BadgeText is specified, it will override
    // the string 'items' or 'icon'
    if (BadgeNumber() > 0)
    {
        if (!BadgeText().empty())
        {
            automationName = StringUtil::FormatString(
                ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemTextOverride),
                contactName.data(),
                BadgeNumber(),
                BadgeText().data());
        }
        else
        {
            automationName = StringUtil::FormatString(
                GetLocalizedPluralBadgeItemStringResource(BadgeNumber()),
                contactName.data(),
                BadgeNumber());
        }
    }
    else if (!BadgeGlyph().empty() || BadgeImageSource())
    {
        if (!BadgeText().empty())
        {
            automationName = StringUtil::FormatString(
                ResourceAccessor::GetLocalizedStringResource(SR_BadgeIconTextOverride),
                contactName.data(),
                BadgeText().data());
        }
        else
        {
            automationName = StringUtil::FormatString(
                ResourceAccessor::GetLocalizedStringResource(SR_BadgeIcon),
                contactName.data());
        }
    }
    else
    {
        automationName = contactName;
    }

    winrt::AutomationProperties::SetName(*this, automationName);
}

void UpdateBadge ( ) [private]

Updates the state of the Badging element.

Definition at line 185 of file PersonPicture.cpp.

{
    if (BadgeImageSource())
    {
        UpdateBadgeImageSource();
    }
    else if (BadgeNumber() != 0)
    {
        UpdateBadgeNumber();
    }
    else if (!BadgeGlyph().empty())
    {
        UpdateBadgeGlyph();
    }
    // No badge properties set, so clear the badge XAML
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);

        if (auto badgeNumberTextBlock = m_badgeNumberTextBlock.get())
        {
            badgeNumberTextBlock.Text(L"");
        }

        if (auto badgeGlyphIcon = m_badgeGlyphIcon.get())
        {
            badgeGlyphIcon.Glyph(L"");
        }
    }

    UpdateAutomationName();
}

void UpdateBadgeGlyph ( ) [private]

Updates Badging Glyph element.

Definition at line 247 of file PersonPicture.cpp.

{
    if (!m_badgingEllipse || !m_badgeGlyphIcon)
    {
        return;
    }

    winrt::hstring badgeGlyph = BadgeGlyph();

    if (badgeGlyph.empty())
    {
        winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);
        m_badgeGlyphIcon.get().Glyph(L"");
        return;
    }

    // should have badging Glyph to show if we are here
    winrt::VisualStateManager::GoToState(*this, L"BadgeWithoutImageSource", false);

    m_badgeGlyphIcon.get().Glyph(badgeGlyph);
}

void UpdateBadgeImageSource ( ) [private]

Updates Badging Image element.

Definition at line 269 of file PersonPicture.cpp.

{
    if (m_badgeImageBrush == nullptr)
    {
        m_badgeImageBrush.set(GetTemplateChildT<winrt::ImageBrush>(L"BadgeImageBrush", *this));
    }

    if (!m_badgingEllipse || !m_badgeImageBrush)
    {
        return;
    }

    m_badgeImageBrush.get().ImageSource(BadgeImageSource());

    if (BadgeImageSource())
    {
        winrt::VisualStateManager::GoToState(*this, L"BadgeWithImageSource", false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);
    }
}

void UpdateBadgeNumber ( ) [private]

Updates Badging Number text element.

Definition at line 218 of file PersonPicture.cpp.

{
    if (!m_badgingEllipse || !m_badgeNumberTextBlock)
    {
        return;
    }

    const int badgeNumber = BadgeNumber();

    if (badgeNumber <= 0)
    {
        winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);
        m_badgeNumberTextBlock.get().Text(L"");
        return;
    }

    // should have badging number to show if we are here
    winrt::VisualStateManager::GoToState(*this, L"BadgeWithoutImageSource", false);

    if (badgeNumber <= 99)
    {
        m_badgeNumberTextBlock.get().Text(std::to_wstring(badgeNumber));
    }
    else
    {
        m_badgeNumberTextBlock.get().Text(L"99+");
    }
}

void UpdateControlForContact ( bool isNewContact ) [private]

Helper function to contain the calls to load and display a user's profile picture.

Parameters:
isNewContact Specifies if the target contact is to be handled as newContact.

Definition at line 409 of file PersonPicture.cpp.

{
    winrt::Contact contact = Contact();

    if (!contact)
    {
        // Explicitly setting to empty/nullptr ensures the bound XAML is
        // correctly updated.
        m_contactDisplayNameInitials.set(L"");
        m_contactImageSource.set(nullptr);
        UpdateIfReady();
        return;
    }

    // It's possible for a second update to occur before the first finished loading
    // a profile picture (regardless of second having a picture or not).
    // Cancellation of any previously-activated tasks will mitigate race conditions.
    if (auto profilePictureReadAsync = m_profilePictureReadAsync.get())
    {
        profilePictureReadAsync.Cancel();
    }

    m_contactDisplayNameInitials.set(InitialsGenerator::InitialsFromContactObject(contact));

    // Order of preference (but all work): Large, Small, Source, Thumbnail
    std::shared_ptr<winrt::IRandomAccessStreamReference> thumbStreamReference = std::make_shared<winrt::IRandomAccessStreamReference>();

    if (PreferSmallImage() && contact.SmallDisplayPicture())
    {
        *thumbStreamReference = contact.SmallDisplayPicture();
    }
    else
    {
        if (contact.LargeDisplayPicture())
        {
            *thumbStreamReference = contact.LargeDisplayPicture();
        }
        else if (contact.SmallDisplayPicture())
        {
            *thumbStreamReference = contact.SmallDisplayPicture();
        }
        else if (contact.SourceDisplayPicture())
        {
            *thumbStreamReference = contact.SourceDisplayPicture();
        }
        else if (contact.Thumbnail())
        {
            *thumbStreamReference = contact.Thumbnail();
        }
    }

    // If we have profile picture data available per the above, async load the picture from the platform.
    if (*thumbStreamReference != nullptr)
    {
        if (isNewContact)
        {
            // Prevent the case where context of a contact changes, but we show an old person while the new one is loaded.
            m_contactImageSource.set(nullptr);
        }

        // The dispatcher is not available in design mode, so when in design mode bypass the call to LoadImageAsync.
        if (!SharedHelpers::IsInDesignMode())
        {
            com_ptr<PersonPicture> strongThis = get_strong();

            LoadImageAsync(
                thumbStreamReference,
                [strongThis](winrt::BitmapImage profileBitmap)
            {
                profileBitmap.DecodePixelType(winrt::DecodePixelType::Logical);

                // We want to constrain the shorter side to the same dimension as the control, allowing the decoder to
                // choose the other dimension without distorting the image.
                if (profileBitmap.PixelHeight() < profileBitmap.PixelWidth())
                {
                    profileBitmap.DecodePixelHeight(static_cast<int>(strongThis->Height()));
                }
                else
                {
                    profileBitmap.DecodePixelWidth(static_cast<int>(strongThis->Width()));
                }

                strongThis->m_contactImageSource.set(winrt::ImageSource(profileBitmap));
                strongThis->UpdateIfReady();
            });
        }
    }
    else
    {
        // Else clause indicates that (Contact->Thumbnail == nullptr).
        m_contactImageSource.set(nullptr);
    }

    UpdateIfReady();
}

void UpdateIfReady ( ) [private]

Updates Control elements, if available, with the latest values.

Definition at line 136 of file PersonPicture.cpp.

{
    winrt::hstring initials = GetInitials();
    winrt::ImageSource imageSrc = GetImageSource();

    auto templateSettings = winrt::get_self<PersonPictureTemplateSettings>(TemplateSettings());
    templateSettings->ActualInitials(initials);
    if (imageSrc)
    {
        auto imageBrush = templateSettings->ActualImageBrush();
        if (!imageBrush)
        {
            imageBrush = winrt::ImageBrush{};
            imageBrush.Stretch(winrt::Stretch::UniformToFill);
            templateSettings->ActualImageBrush(imageBrush);
        }

        imageBrush.ImageSource(imageSrc);
    }
    else
    {
        templateSettings->ActualImageBrush(nullptr);
    }

    // If the control is converted to 'Group-mode', we'll clear individual-specific information.
    // When IsGroup evaluates to false, we will restore state.
    if (IsGroup())
    {
        winrt::VisualStateManager::GoToState(*this, L"Group", false);
    }
    else
    {
        if (imageSrc)
        {
            winrt::VisualStateManager::GoToState(*this, L"Photo", false);
        }
        else if (!initials.empty())
        {
            winrt::VisualStateManager::GoToState(*this, L"Initials", false);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, L"NoPhotoOrInitials", false);
        }
    }

    UpdateAutomationName();
}

The documentation for this class was generated from the following files:
  • PersonPicture/PersonPicture.h
  • PersonPicture/PersonPicture.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

PersonPictureAutomationPeer Class Reference

#include "PersonPictureAutomationPeer.h"

Inherits ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT >.

List of all members.

Public Member Functions

PersonPictureAutomationPeer (winrt::PersonPicture const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()

Detailed Description

Definition at line 10 of file PersonPictureAutomationPeer.h.

Constructor & Destructor Documentation

PersonPictureAutomationPeer ( winrt::PersonPicture const & owner )

Definition at line 11 of file PersonPictureAutomationPeer.cpp.

                                                                                :
    ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 18 of file PersonPictureAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Text;
}

winrt::hstring GetClassNameCore ( )

Definition at line 23 of file PersonPictureAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::PersonPicture>();
}

The documentation for this class was generated from the following files:
  • PersonPicture/PersonPictureAutomationPeer.h
  • PersonPicture/PersonPictureAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

PersonPictureProperties Class Reference

#include "PersonPicture.properties.h"

Inherited by PersonPicture.

List of all members.

Public Member Functions

PersonPictureProperties ()
void | BadgeGlyph (winrt::hstring const &value)
winrt::hstring | BadgeGlyph ()
void | BadgeImageSource (winrt::ImageSource const &value)
winrt::ImageSource | BadgeImageSource ()
void | BadgeNumber (int value)
int | BadgeNumber ()
void | BadgeText (winrt::hstring const &value)
winrt::hstring | BadgeText ()
void | Contact (winrt::Contact const &value)
winrt::Contact | Contact ()
void | DisplayName (winrt::hstring const &value)
winrt::hstring | DisplayName ()
winrt::hstring | Initials ()
void | Initials (winrt::hstring const &value)
bool | IsGroup ()
void | IsGroup (bool value)
void | PreferSmallImage (bool value)
bool | PreferSmallImage ()
void | ProfilePicture (winrt::ImageSource const &value)
winrt::ImageSource | ProfilePicture ()
winrt::PersonPictureTemplateSettings | TemplateSettings ()
void | TemplateSettings (winrt::PersonPictureTemplateSettings const &value)

Static Public Member Functions

static winrt::DependencyProperty | BadgeGlyphProperty ()
static winrt::DependencyProperty | BadgeImageSourceProperty ()
static winrt::DependencyProperty | BadgeNumberProperty ()
static winrt::DependencyProperty | BadgeTextProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | ContactProperty ()
static winrt::DependencyProperty | DisplayNameProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | InitialsProperty ()
static winrt::DependencyProperty | IsGroupProperty ()
static void | OnBadgeGlyphPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnBadgeImageSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnBadgeNumberPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnBadgeTextPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnContactPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnDisplayNamePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnInitialsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsGroupPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreferSmallImagePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnProfilePicturePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTemplateSettingsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PreferSmallImageProperty ()
static winrt::DependencyProperty | ProfilePictureProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_BadgeGlyphProperty
static GlobalDependencyProperty | s_BadgeImageSourceProperty
static GlobalDependencyProperty | s_BadgeNumberProperty
static GlobalDependencyProperty | s_BadgeTextProperty
static GlobalDependencyProperty | s_ContactProperty
static GlobalDependencyProperty | s_DisplayNameProperty
static GlobalDependencyProperty | s_InitialsProperty
static GlobalDependencyProperty | s_IsGroupProperty
static GlobalDependencyProperty | s_PreferSmallImageProperty
static GlobalDependencyProperty | s_ProfilePictureProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty

Detailed Description

Definition at line 7 of file PersonPicture.properties.h.

Constructor & Destructor Documentation

PersonPictureProperties ( )

Definition at line 28 of file PersonPicture.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void BadgeGlyph ( winrt::hstring const & value )

Definition at line 261 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_BadgeGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring BadgeGlyph ( )

Definition at line 269 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeGlyphProperty));
}

static winrt::DependencyProperty BadgeGlyphProperty ( ) [inline, static]

Definition at line 45 of file PersonPicture.properties.h.

{ return s_BadgeGlyphProperty; }

winrt::ImageSource BadgeImageSource ( )

Definition at line 282 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeImageSourceProperty));
}

void BadgeImageSource ( winrt::ImageSource const & value )

Definition at line 274 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_BadgeImageSourceProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty BadgeImageSourceProperty ( ) [inline, static]

Definition at line 46 of file PersonPicture.properties.h.

{ return s_BadgeImageSourceProperty; }

void BadgeNumber ( int value )

Definition at line 287 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_BadgeNumberProperty, ValueHelper<int>::BoxValueIfNecessary(value));
    }
}

int BadgeNumber ( )

Definition at line 295 of file PersonPicture.properties.cpp.

{
    return ValueHelper<int>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeNumberProperty));
}

static winrt::DependencyProperty BadgeNumberProperty ( ) [inline, static]

Definition at line 47 of file PersonPicture.properties.h.

{ return s_BadgeNumberProperty; }

winrt::hstring BadgeText ( )

Definition at line 308 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeTextProperty));
}

void BadgeText ( winrt::hstring const & value )

Definition at line 300 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_BadgeTextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty BadgeTextProperty ( ) [inline, static]

Definition at line 48 of file PersonPicture.properties.h.

{ return s_BadgeTextProperty; }

void ClearProperties ( ) [static]

Definition at line 158 of file PersonPicture.properties.cpp.

{
    s_BadgeGlyphProperty = nullptr;
    s_BadgeImageSourceProperty = nullptr;
    s_BadgeNumberProperty = nullptr;
    s_BadgeTextProperty = nullptr;
    s_ContactProperty = nullptr;
    s_DisplayNameProperty = nullptr;
    s_InitialsProperty = nullptr;
    s_IsGroupProperty = nullptr;
    s_PreferSmallImageProperty = nullptr;
    s_ProfilePictureProperty = nullptr;
    s_TemplateSettingsProperty = nullptr;
}

void Contact ( winrt::Contact const & value )

Definition at line 313 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_ContactProperty, ValueHelper<winrt::Contact>::BoxValueIfNecessary(value));
    }
}

winrt::Contact Contact ( )

Definition at line 321 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::Contact>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_ContactProperty));
}

static winrt::DependencyProperty ContactProperty ( ) [inline, static]

Definition at line 49 of file PersonPicture.properties.h.

{ return s_ContactProperty; }

void DisplayName ( winrt::hstring const & value )

Definition at line 326 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_DisplayNameProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring DisplayName ( )

Definition at line 334 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_DisplayNameProperty));
}

static winrt::DependencyProperty DisplayNameProperty ( ) [inline, static]

Definition at line 50 of file PersonPicture.properties.h.

{ return s_DisplayNameProperty; }

void EnsureProperties ( ) [static]

Definition at line 33 of file PersonPicture.properties.cpp.

{
    if (!s_BadgeGlyphProperty)
    {
        s_BadgeGlyphProperty =
            InitializeDependencyProperty(
                L"BadgeGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnBadgeGlyphPropertyChanged));
    }
    if (!s_BadgeImageSourceProperty)
    {
        s_BadgeImageSourceProperty =
            InitializeDependencyProperty(
                L"BadgeImageSource",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnBadgeImageSourcePropertyChanged));
    }
    if (!s_BadgeNumberProperty)
    {
        s_BadgeNumberProperty =
            InitializeDependencyProperty(
                L"BadgeNumber",
                winrt::name_of<int>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<int>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnBadgeNumberPropertyChanged));
    }
    if (!s_BadgeTextProperty)
    {
        s_BadgeTextProperty =
            InitializeDependencyProperty(
                L"BadgeText",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnBadgeTextPropertyChanged));
    }
    if (!s_ContactProperty)
    {
        s_ContactProperty =
            InitializeDependencyProperty(
                L"Contact",
                winrt::name_of<winrt::Contact>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::Contact>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnContactPropertyChanged));
    }
    if (!s_DisplayNameProperty)
    {
        s_DisplayNameProperty =
            InitializeDependencyProperty(
                L"DisplayName",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnDisplayNamePropertyChanged));
    }
    if (!s_InitialsProperty)
    {
        s_InitialsProperty =
            InitializeDependencyProperty(
                L"Initials",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnInitialsPropertyChanged));
    }
    if (!s_IsGroupProperty)
    {
        s_IsGroupProperty =
            InitializeDependencyProperty(
                L"IsGroup",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsGroupPropertyChanged));
    }
    if (!s_PreferSmallImageProperty)
    {
        s_PreferSmallImageProperty =
            InitializeDependencyProperty(
                L"PreferSmallImage",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnPreferSmallImagePropertyChanged));
    }
    if (!s_ProfilePictureProperty)
    {
        s_ProfilePictureProperty =
            InitializeDependencyProperty(
                L"ProfilePicture",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnProfilePicturePropertyChanged));
    }
    if (!s_TemplateSettingsProperty)
    {
        s_TemplateSettingsProperty =
            InitializeDependencyProperty(
                L"TemplateSettings",
                winrt::name_of<winrt::PersonPictureTemplateSettings>(),
                winrt::name_of<winrt::PersonPicture>(),
                false /* isAttached */,
                ValueHelper<winrt::PersonPictureTemplateSettings>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnTemplateSettingsPropertyChanged));
    }
}

void Initials ( winrt::hstring const & value )

Definition at line 339 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_InitialsProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring Initials ( )

Definition at line 347 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_InitialsProperty));
}

static winrt::DependencyProperty InitialsProperty ( ) [inline, static]

Definition at line 51 of file PersonPicture.properties.h.

{ return s_InitialsProperty; }

bool IsGroup ( )

Definition at line 360 of file PersonPicture.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_IsGroupProperty));
}

void IsGroup ( bool value )

Definition at line 352 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_IsGroupProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsGroupProperty ( ) [inline, static]

Definition at line 52 of file PersonPicture.properties.h.

{ return s_IsGroupProperty; }

void OnBadgeGlyphPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 173 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnBadgeImageSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 181 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnBadgeNumberPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 189 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnBadgeTextPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 197 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnContactPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 205 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnDisplayNamePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 213 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnInitialsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 221 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnIsGroupPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 229 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnPreferSmallImagePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 237 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnProfilePicturePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 245 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void OnTemplateSettingsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 253 of file PersonPicture.properties.cpp.

{
    auto owner = sender.as<winrt::PersonPicture>();
    winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
}

void PreferSmallImage ( bool value )

Definition at line 365 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_PreferSmallImageProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool PreferSmallImage ( )

Definition at line 373 of file PersonPicture.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_PreferSmallImageProperty));
}

static winrt::DependencyProperty PreferSmallImageProperty ( ) [inline, static]

Definition at line 53 of file PersonPicture.properties.h.

{ return s_PreferSmallImageProperty; }

void ProfilePicture ( winrt::ImageSource const & value )

Definition at line 378 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_ProfilePictureProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

winrt::ImageSource ProfilePicture ( )

Definition at line 386 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_ProfilePictureProperty));
}

static winrt::DependencyProperty ProfilePictureProperty ( ) [inline, static]

Definition at line 54 of file PersonPicture.properties.h.

{ return s_ProfilePictureProperty; }

winrt::PersonPictureTemplateSettings TemplateSettings ( )

Definition at line 399 of file PersonPicture.properties.cpp.

{
    return ValueHelper<winrt::PersonPictureTemplateSettings>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_TemplateSettingsProperty));
}

void TemplateSettings ( winrt::PersonPictureTemplateSettings const & value )

Definition at line 391 of file PersonPicture.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPicture*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::PersonPictureTemplateSettings>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 55 of file PersonPicture.properties.h.

{ return s_TemplateSettingsProperty; }

Member Data Documentation

GlobalDependencyProperty s_BadgeGlyphProperty [static]

Definition at line 57 of file PersonPicture.properties.h.

GlobalDependencyProperty s_BadgeImageSourceProperty [static]

Definition at line 58 of file PersonPicture.properties.h.

GlobalDependencyProperty s_BadgeNumberProperty [static]

Definition at line 59 of file PersonPicture.properties.h.

GlobalDependencyProperty s_BadgeTextProperty [static]

Definition at line 60 of file PersonPicture.properties.h.

GlobalDependencyProperty s_ContactProperty [static]

Definition at line 61 of file PersonPicture.properties.h.

GlobalDependencyProperty s_DisplayNameProperty [static]

Definition at line 62 of file PersonPicture.properties.h.

GlobalDependencyProperty s_InitialsProperty [static]

Definition at line 63 of file PersonPicture.properties.h.

GlobalDependencyProperty s_IsGroupProperty [static]

Definition at line 64 of file PersonPicture.properties.h.

GlobalDependencyProperty s_PreferSmallImageProperty [static]

Definition at line 65 of file PersonPicture.properties.h.

GlobalDependencyProperty s_ProfilePictureProperty [static]

Definition at line 66 of file PersonPicture.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 67 of file PersonPicture.properties.h.

The documentation for this class was generated from the following files:
  • Generated/PersonPicture.properties.h
  • Generated/PersonPicture.properties.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPictureTemplateSettings Class Reference

#include "PersonPictureTemplateSettings.h"

Inherits PersonPictureTemplateSettingsProperties.

List of all members.

Detailed Description

Definition at line 9 of file PersonPictureTemplateSettings.h.

The documentation for this class was generated from the following file:
  • PersonPicture/PersonPictureTemplateSettings.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

PersonPictureTemplateSettingsProperties Class Reference

#include "PersonPictureTemplateSettings.properties.h"

Inherited by PersonPictureTemplateSettings.

List of all members.

Public Member Functions

PersonPictureTemplateSettingsProperties ()
void | ActualImageBrush (winrt::ImageBrush const &value)
winrt::ImageBrush | ActualImageBrush ()
void | ActualInitials (winrt::hstring const &value)
winrt::hstring | ActualInitials ()

Static Public Member Functions

static winrt::DependencyProperty | ActualImageBrushProperty ()
static winrt::DependencyProperty | ActualInitialsProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()

Static Public Attributes

static GlobalDependencyProperty | s_ActualImageBrushProperty
static GlobalDependencyProperty | s_ActualInitialsProperty

Detailed Description

Definition at line 7 of file PersonPictureTemplateSettings.properties.h.

Constructor & Destructor Documentation

PersonPictureTemplateSettingsProperties ( )

Definition at line 12 of file PersonPictureTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ActualImageBrush ( winrt::ImageBrush const & value )

Definition at line 49 of file PersonPictureTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPictureTemplateSettings*>(this)->SetValue(s_ActualImageBrushProperty, ValueHelper<winrt::ImageBrush>::BoxValueIfNecessary(value));
    }
}

winrt::ImageBrush ActualImageBrush ( )

Definition at line 57 of file PersonPictureTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::ImageBrush>::CastOrUnbox(static_cast<PersonPictureTemplateSettings*>(this)->GetValue(s_ActualImageBrushProperty));
}

static winrt::DependencyProperty ActualImageBrushProperty ( ) [inline, static]

Definition at line 18 of file PersonPictureTemplateSettings.properties.h.

{ return s_ActualImageBrushProperty; }

winrt::hstring ActualInitials ( )

Definition at line 70 of file PersonPictureTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPictureTemplateSettings*>(this)->GetValue(s_ActualInitialsProperty));
}

void ActualInitials ( winrt::hstring const & value )

Definition at line 62 of file PersonPictureTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PersonPictureTemplateSettings*>(this)->SetValue(s_ActualInitialsProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ActualInitialsProperty ( ) [inline, static]

Definition at line 19 of file PersonPictureTemplateSettings.properties.h.

{ return s_ActualInitialsProperty; }

void ClearProperties ( ) [static]

Definition at line 43 of file PersonPictureTemplateSettings.properties.cpp.

{
    s_ActualImageBrushProperty = nullptr;
    s_ActualInitialsProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 17 of file PersonPictureTemplateSettings.properties.cpp.

{
    if (!s_ActualImageBrushProperty)
    {
        s_ActualImageBrushProperty =
            InitializeDependencyProperty(
                L"ActualImageBrush",
                winrt::name_of<winrt::ImageBrush>(),
                winrt::name_of<winrt::PersonPictureTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageBrush>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ActualInitialsProperty)
    {
        s_ActualInitialsProperty =
            InitializeDependencyProperty(
                L"ActualInitials",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::PersonPictureTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
}

Member Data Documentation

GlobalDependencyProperty s_ActualImageBrushProperty [static]

Definition at line 21 of file PersonPictureTemplateSettings.properties.h.

GlobalDependencyProperty s_ActualInitialsProperty [static]

Definition at line 22 of file PersonPictureTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/PersonPictureTemplateSettings.properties.h
  • Generated/PersonPictureTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Private Member Functions

PipsPager Class Reference

#include "PipsPager.h"

Inherits ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT >, and PipsPagerProperties.

List of all members.

Public Member Functions

PipsPager ()
winrt::UIElement | GetSelectedItem ()
void | LosingFocus (const IInspectable &sender, const winrt::LosingFocusEventArgs &args)
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnGotFocus (const winrt::RoutedEventArgs &args)
void | OnKeyDown (const winrt::KeyRoutedEventArgs &args)
void | OnLostFocus (const winrt::RoutedEventArgs &args)
void | OnMaxVisiblePipsChanged ()
void | OnNavigationButtonVisibilityChanged (const winrt::PipsPagerButtonVisibility visibility, const wstring_view &collapsedStateName, const wstring_view &disabledStateName)
void | OnNumberOfPagesChanged ()
void | OnOrientationChanged ()
void | OnPointerCanceled (const winrt::PointerRoutedEventArgs &args)
void | OnPointerEntered (const winrt::PointerRoutedEventArgs &args)
void | OnPointerExited (const winrt::PointerRoutedEventArgs &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSelectedPageIndexChanged (const int oldValue)
void | OnWrapModeChanged ()
void | UpdateSizeOfSetForElements (const int numberOfPages, const int numberOfItems)

Public Attributes

GlobalDependencyProperty s_pipButtonHandlersProperty

Private Member Functions

void | ApplyStyleToPipAndUpdateOrientation (const winrt::FrameworkElement &pip, const winrt::Style &style)
double | CalculateScrollViewerSize (const double defaultPipSize, const double selectedPipSize, const int numberOfPages, int maxVisualIndicators)
winrt::Size | GetDesiredPipSize (const winrt::Style &style)
bool | IsOutOfControlBounds (const winrt::Point &point)
bool | IsWrapEnabled ()
void | OnElementIndexChanged (const winrt::ItemsRepeater &repeater, const winrt::ItemsRepeaterElementIndexChangedEventArgs &args)
void | OnElementPrepared (winrt::ItemsRepeater sender, winrt::ItemsRepeaterElementPreparedEventArgs args)
void | OnItemsRepeaterLayoutChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &args)
void | OnNextButtonClicked (const IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnPipsAreaBringIntoViewRequested (const IInspectable &sender, const winrt::BringIntoViewRequestedEventArgs &args)
void | OnPipsAreaGettingFocus (const IInspectable &sender, const winrt::GettingFocusEventArgs &args)
void | OnPreviousButtonClicked (const IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnScrollViewerBringIntoViewRequested (const IInspectable &sender, const winrt::BringIntoViewRequestedEventArgs &args)
void | RaiseSelectedIndexChanged ()
void | RestoreLayoutVirtualization ()
void | ScrollToCenterOfViewport (const winrt::UIElement sender, const int index)
void | SetScrollViewerMaxSize ()
void | UpdateIndividualNavigationButtonVisualState (const bool hiddenOnEdgeCondition, const winrt::PipsPagerButtonVisibility visibility, const wstring_view &visibleStateName, const wstring_view &hiddenStateName, const wstring_view &enabledStateName, const wstring_view &disabledStateName)
void | UpdateLayoutVirtualization ()
void | UpdateNavigationButtonVisualStates ()
void | UpdatePipOrientation (const winrt::Control &pip)
void | UpdatePipsItems (const int numberOfPages, int maxVisualIndicators)
void | UpdateSelectedPip (const int index)

Detailed Description

Definition at line 17 of file PipsPager.h.

Constructor & Destructor Documentation

PipsPager ( )

Member Function Documentation

void ApplyStyleToPipAndUpdateOrientation | ( | const winrt::FrameworkElement & | pip,
 |  | const winrt::Style & | style |
 | ) |  |  | [private]
double CalculateScrollViewerSize | ( | const double | defaultPipSize,
 |  | const double | selectedPipSize,
 |  | const int | numberOfPages,
 |  | int | maxVisualIndicators |
 | ) |  |  | [private]
winrt::Size GetDesiredPipSize ( const winrt::Style & style ) [private]
winrt::UIElement GetSelectedItem ( )
bool IsOutOfControlBounds ( const winrt::Point & point ) [private]
bool IsWrapEnabled ( ) [inline, private]

Definition at line 76 of file PipsPager.h.

{ return WrapMode() == winrt::PipsPagerWrapMode::Wrap; };

void LosingFocus | ( | const IInspectable & | sender,
 |  | const winrt::LosingFocusEventArgs & | args
 | ) |  |
void OnApplyTemplate ( )
winrt::AutomationPeer OnCreateAutomationPeer ( )
void OnElementIndexChanged | ( | const winrt::ItemsRepeater & | repeater,
 |  | const winrt::ItemsRepeaterElementIndexChangedEventArgs & | args |
 | ) |  |  | [private]
void OnElementPrepared | ( | winrt::ItemsRepeater | sender,
 |  | winrt::ItemsRepeaterElementPreparedEventArgs | args |
 | ) |  |  | [private]
void OnGotFocus ( const winrt::RoutedEventArgs & args )
void OnItemsRepeaterLayoutChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnKeyDown ( const winrt::KeyRoutedEventArgs & args )
void OnLostFocus ( const winrt::RoutedEventArgs & args )
void OnMaxVisiblePipsChanged ( )
void OnNavigationButtonVisibilityChanged | ( | const winrt::PipsPagerButtonVisibility | visibility,
 |  | const wstring_view & | collapsedStateName,
 |  | const wstring_view & | disabledStateName
 | ) |  |
void OnNextButtonClicked | ( | const IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnNumberOfPagesChanged ( )
void OnOrientationChanged ( )
void OnPipsAreaBringIntoViewRequested | ( | const IInspectable & | sender,
 |  | const winrt::BringIntoViewRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnPipsAreaGettingFocus | ( | const IInspectable & | sender,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]
void OnPointerCanceled ( const winrt::PointerRoutedEventArgs & args )
void OnPointerEntered ( const winrt::PointerRoutedEventArgs & args )
void OnPointerExited ( const winrt::PointerRoutedEventArgs & args )
void OnPreviousButtonClicked | ( | const IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnScrollViewerBringIntoViewRequested | ( | const IInspectable & | sender,
 |  | const winrt::BringIntoViewRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnSelectedPageIndexChanged ( const int oldValue )
void OnWrapModeChanged ( )
void RaiseSelectedIndexChanged ( ) [private]
void RestoreLayoutVirtualization ( ) [private]
void ScrollToCenterOfViewport | ( | const winrt::UIElement | sender,
 |  | const int | index |
 | ) |  |  | [private]
void SetScrollViewerMaxSize ( ) [private]
void UpdateIndividualNavigationButtonVisualState | ( | const bool | hiddenOnEdgeCondition,
 |  | const winrt::PipsPagerButtonVisibility | visibility,
 |  | const wstring_view & | visibleStateName,
 |  | const wstring_view & | hiddenStateName,
 |  | const wstring_view & | enabledStateName,
 |  | const wstring_view & | disabledStateName |
 | ) |  |  | [private]
void UpdateLayoutVirtualization ( ) [private]
void UpdateNavigationButtonVisualStates ( ) [private]
void UpdatePipOrientation ( const winrt::Control & pip ) [private]
void UpdatePipsItems | ( | const int | numberOfPages,
 |  | int | maxVisualIndicators |
 | ) |  |  | [private]
void UpdateSelectedPip ( const int index ) [private]
void UpdateSizeOfSetForElements | ( | const int | numberOfPages,
 |  | const int | numberOfItems
 | ) |  |

Member Data Documentation

GlobalDependencyProperty s_pipButtonHandlersProperty

Definition at line 54 of file PipsPager.h.

The documentation for this class was generated from the following file:
  • PipsPager/PipsPager.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

PipsPagerAutomationPeer Class Reference

#include "PipsPagerAutomationPeer.h"

Inherits ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider >.

List of all members.

Public Member Functions

PipsPagerAutomationPeer (winrt::PipsPager const &owner)
bool | CanSelectMultiple ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
winrt::com_array
< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > 		GetSelection ()
bool | IsSelectionRequired ()
void | RaiseSelectionChanged (double oldIndex, double newIndex)

Private Member Functions

com_ptr< PipsPager > | GetImpl ()

Detailed Description

Definition at line 9 of file PipsPagerAutomationPeer.h.

Constructor & Destructor Documentation

PipsPagerAutomationPeer ( winrt::PipsPager const & owner )

Definition at line 13 of file PipsPagerAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

bool CanSelectMultiple ( ) [inline]

Definition at line 23 of file PipsPagerAutomationPeer.h.

{ return false; };

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 49 of file PipsPagerAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Menu;
}

hstring GetClassNameCore ( )

Definition at line 29 of file PipsPagerAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::PipsPager>();
}

com_ptr< PipsPager > GetImpl ( ) [private]

Definition at line 54 of file PipsPagerAutomationPeer.cpp.

{
    com_ptr<PipsPager> impl = nullptr;

    if (const auto pipsPager = Owner().try_as<winrt::PipsPager>())
    {
        impl = winrt::get_self<PipsPager>(pipsPager)->get_strong();
    }

    return impl;
}

hstring GetNameCore ( )

Definition at line 34 of file PipsPagerAutomationPeer.cpp.

{
    winrt::hstring name = __super::GetNameCore();

    if (name.empty())
    {
        if (const auto pipsPager = Owner().try_as<winrt::PipsPager>())
        {
            name = SharedHelpers::TryGetStringRepresentationFromObject(pipsPager.GetValue(winrt::AutomationProperties::NameProperty()));
        }
    }

    return name;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file PipsPagerAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Selection)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::com_array< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > GetSelection ( )

Definition at line 66 of file PipsPagerAutomationPeer.cpp.

{
    if (const auto pager = GetImpl())
    {
        if (auto pip = pager->GetSelectedItem())
        {
            if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(pip))
            {
                return { ProviderFromPeer(peer) };
            }
        }
    }
    return {};
}

bool IsSelectionRequired ( ) [inline]

Definition at line 24 of file PipsPagerAutomationPeer.h.

{ return true; };

void RaiseSelectionChanged | ( | double | oldIndex,
 |  | double | newIndex
 | ) |  |

Definition at line 81 of file PipsPagerAutomationPeer.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
    {
        RaisePropertyChangedEvent(winrt::SelectionPatternIdentifiers::SelectionProperty(),
            winrt::PropertyValue::CreateDouble(oldIndex),
            winrt::PropertyValue::CreateDouble(newIndex));
    }
}

The documentation for this class was generated from the following files:
  • PipsPager/PipsPagerAutomationPeer.h
  • PipsPager/PipsPagerAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

PipsPagerProperties Class Reference

#include "PipsPager.properties.h"

Inherited by PipsPager.

List of all members.

Public Member Functions

PipsPagerProperties ()
void | MaxVisiblePips (int value)
int | MaxVisiblePips ()
void | NextButtonStyle (winrt::Style const &value)
winrt::Style | NextButtonStyle ()
void | NextButtonVisibility (winrt::PipsPagerButtonVisibility const &value)
winrt::PipsPagerButtonVisibility | NextButtonVisibility ()
void | NormalPipStyle (winrt::Style const &value)
winrt::Style | NormalPipStyle ()
void | NumberOfPages (int value)
int | NumberOfPages ()
void | Orientation (winrt::Orientation const &value)
winrt::Orientation | Orientation ()
void | PreviousButtonStyle (winrt::Style const &value)
winrt::Style | PreviousButtonStyle ()
void | PreviousButtonVisibility (winrt::PipsPagerButtonVisibility const &value)
winrt::PipsPagerButtonVisibility | PreviousButtonVisibility ()
void | SelectedIndexChanged (winrt::event_token const &token)
winrt::event_token | SelectedIndexChanged (winrt::TypedEventHandler< winrt::PipsPager, winrt::PipsPagerSelectedIndexChangedEventArgs > const &value)
void | SelectedPageIndex (int value)
int | SelectedPageIndex ()
void | SelectedPipStyle (winrt::Style const &value)
winrt::Style | SelectedPipStyle ()
void | TemplateSettings (winrt::PipsPagerTemplateSettings const &value)
winrt::PipsPagerTemplateSettings | TemplateSettings ()
winrt::PipsPagerWrapMode | WrapMode ()
void | WrapMode (winrt::PipsPagerWrapMode const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MaxVisiblePipsProperty ()
static winrt::DependencyProperty | NextButtonStyleProperty ()
static winrt::DependencyProperty | NextButtonVisibilityProperty ()
static winrt::DependencyProperty | NormalPipStyleProperty ()
static winrt::DependencyProperty | NumberOfPagesProperty ()
static void | OnMaxVisiblePipsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNextButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNextButtonVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNormalPipStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnNumberOfPagesPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreviousButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreviousButtonVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedPageIndexPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedPipStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTemplateSettingsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnWrapModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | OrientationProperty ()
static winrt::DependencyProperty | PreviousButtonStyleProperty ()
static winrt::DependencyProperty | PreviousButtonVisibilityProperty ()
static winrt::DependencyProperty | SelectedPageIndexProperty ()
static winrt::DependencyProperty | SelectedPipStyleProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()
static winrt::DependencyProperty | WrapModeProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::PipsPager,
winrt::PipsPagerSelectedIndexChangedEventArgs > > 		m_selectedIndexChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_MaxVisiblePipsProperty
static GlobalDependencyProperty | s_NextButtonStyleProperty
static GlobalDependencyProperty | s_NextButtonVisibilityProperty
static GlobalDependencyProperty | s_NormalPipStyleProperty
static GlobalDependencyProperty | s_NumberOfPagesProperty
static GlobalDependencyProperty | s_OrientationProperty
static GlobalDependencyProperty | s_PreviousButtonStyleProperty
static GlobalDependencyProperty | s_PreviousButtonVisibilityProperty
static GlobalDependencyProperty | s_SelectedPageIndexProperty
static GlobalDependencyProperty | s_SelectedPipStyleProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty
static GlobalDependencyProperty | s_WrapModeProperty

Detailed Description

Definition at line 7 of file PipsPager.properties.h.

Constructor & Destructor Documentation

PipsPagerProperties ( )

Definition at line 29 of file PipsPager.properties.cpp.

    : m_selectedIndexChangedEventSource{static_cast<PipsPager*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
int MaxVisiblePips ( )
void MaxVisiblePips ( int value )
static winrt::DependencyProperty MaxVisiblePipsProperty ( ) [inline, static]

Definition at line 48 of file PipsPager.properties.h.

{ return s_MaxVisiblePipsProperty; }

winrt::Style NextButtonStyle ( )
void NextButtonStyle ( winrt::Style const & value )
static winrt::DependencyProperty NextButtonStyleProperty ( ) [inline, static]

Definition at line 49 of file PipsPager.properties.h.

{ return s_NextButtonStyleProperty; }

void NextButtonVisibility ( winrt::PipsPagerButtonVisibility const & value )
winrt::PipsPagerButtonVisibility NextButtonVisibility ( )
static winrt::DependencyProperty NextButtonVisibilityProperty ( ) [inline, static]

Definition at line 50 of file PipsPager.properties.h.

{ return s_NextButtonVisibilityProperty; }

winrt::Style NormalPipStyle ( )
void NormalPipStyle ( winrt::Style const & value )
static winrt::DependencyProperty NormalPipStyleProperty ( ) [inline, static]

Definition at line 51 of file PipsPager.properties.h.

{ return s_NormalPipStyleProperty; }

void NumberOfPages ( int value )
int NumberOfPages ( )
static winrt::DependencyProperty NumberOfPagesProperty ( ) [inline, static]

Definition at line 52 of file PipsPager.properties.h.

{ return s_NumberOfPagesProperty; }

static void OnMaxVisiblePipsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNextButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNextButtonVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNormalPipStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnNumberOfPagesPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPreviousButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPreviousButtonVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedPageIndexPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedPipStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTemplateSettingsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnWrapModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::Orientation Orientation ( )
void Orientation ( winrt::Orientation const & value )
static winrt::DependencyProperty OrientationProperty ( ) [inline, static]

Definition at line 53 of file PipsPager.properties.h.

{ return s_OrientationProperty; }

void PreviousButtonStyle ( winrt::Style const & value )
winrt::Style PreviousButtonStyle ( )
static winrt::DependencyProperty PreviousButtonStyleProperty ( ) [inline, static]

Definition at line 54 of file PipsPager.properties.h.

{ return s_PreviousButtonStyleProperty; }

winrt::PipsPagerButtonVisibility PreviousButtonVisibility ( )
void PreviousButtonVisibility ( winrt::PipsPagerButtonVisibility const & value )
static winrt::DependencyProperty PreviousButtonVisibilityProperty ( ) [inline, static]

Definition at line 55 of file PipsPager.properties.h.

{ return s_PreviousButtonVisibilityProperty; }

winrt::event_token SelectedIndexChanged ( winrt::TypedEventHandler< winrt::PipsPager, winrt::PipsPagerSelectedIndexChangedEventArgs > const & value )
void SelectedIndexChanged ( winrt::event_token const & token )
void SelectedPageIndex ( int value )
int SelectedPageIndex ( )
static winrt::DependencyProperty SelectedPageIndexProperty ( ) [inline, static]

Definition at line 56 of file PipsPager.properties.h.

{ return s_SelectedPageIndexProperty; }

winrt::Style SelectedPipStyle ( )
void SelectedPipStyle ( winrt::Style const & value )
static winrt::DependencyProperty SelectedPipStyleProperty ( ) [inline, static]

Definition at line 57 of file PipsPager.properties.h.

{ return s_SelectedPipStyleProperty; }

winrt::PipsPagerTemplateSettings TemplateSettings ( )
void TemplateSettings ( winrt::PipsPagerTemplateSettings const & value )
static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 58 of file PipsPager.properties.h.

{ return s_TemplateSettingsProperty; }

winrt::PipsPagerWrapMode WrapMode ( )
void WrapMode ( winrt::PipsPagerWrapMode const & value )
static winrt::DependencyProperty WrapModeProperty ( ) [inline, static]

Definition at line 59 of file PipsPager.properties.h.

{ return s_WrapModeProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::PipsPager, winrt::PipsPagerSelectedIndexChangedEventArgs> > m_selectedIndexChangedEventSource

Definition at line 77 of file PipsPager.properties.h.

GlobalDependencyProperty s_MaxVisiblePipsProperty [static]

Definition at line 61 of file PipsPager.properties.h.

GlobalDependencyProperty s_NextButtonStyleProperty [static]

Definition at line 62 of file PipsPager.properties.h.

GlobalDependencyProperty s_NextButtonVisibilityProperty [static]

Definition at line 63 of file PipsPager.properties.h.

GlobalDependencyProperty s_NormalPipStyleProperty [static]

Definition at line 64 of file PipsPager.properties.h.

GlobalDependencyProperty s_NumberOfPagesProperty [static]

Definition at line 65 of file PipsPager.properties.h.

GlobalDependencyProperty s_OrientationProperty [static]

Definition at line 66 of file PipsPager.properties.h.

GlobalDependencyProperty s_PreviousButtonStyleProperty [static]

Definition at line 67 of file PipsPager.properties.h.

GlobalDependencyProperty s_PreviousButtonVisibilityProperty [static]

Definition at line 68 of file PipsPager.properties.h.

GlobalDependencyProperty s_SelectedPageIndexProperty [static]

Definition at line 69 of file PipsPager.properties.h.

GlobalDependencyProperty s_SelectedPipStyleProperty [static]

Definition at line 70 of file PipsPager.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 71 of file PipsPager.properties.h.

GlobalDependencyProperty s_WrapModeProperty [static]

Definition at line 72 of file PipsPager.properties.h.

The documentation for this class was generated from the following files:
  • Generated/PipsPager.properties.h
  • Generated/PipsPager.properties.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerSelectedIndexChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerSelectedIndexChangedEventArgs Class Reference

#include "PipsPagerSelectedIndexChangedEventArgs.h"

Detailed Description

Definition at line 8 of file PipsPagerSelectedIndexChangedEventArgs.h.

The documentation for this class was generated from the following file:
  • PipsPager/PipsPagerSelectedIndexChangedEventArgs.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerTemplateSettings Class Reference

#include "PipsPagerTemplateSettings.h"

Inherits PipsPagerTemplateSettingsProperties.

List of all members.

Detailed Description

Definition at line 10 of file PipsPagerTemplateSettings.h.

The documentation for this class was generated from the following file:
  • PipsPager/PipsPagerTemplateSettings.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

PipsPagerTemplateSettingsProperties Class Reference

#include "PipsPagerTemplateSettings.properties.h"

Inherited by PipsPagerTemplateSettings.

List of all members.

Public Member Functions

PipsPagerTemplateSettingsProperties ()
winrt::IVector< int > | PipsPagerItems ()
void | PipsPagerItems (winrt::IVector< int > const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | PipsPagerItemsProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_PipsPagerItemsProperty

Detailed Description

Definition at line 7 of file PipsPagerTemplateSettings.properties.h.

Constructor & Destructor Documentation

PipsPagerTemplateSettingsProperties ( )

Definition at line 11 of file PipsPagerTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 31 of file PipsPagerTemplateSettings.properties.cpp.

{
    s_PipsPagerItemsProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 16 of file PipsPagerTemplateSettings.properties.cpp.

{
    if (!s_PipsPagerItemsProperty)
    {
        s_PipsPagerItemsProperty =
            InitializeDependencyProperty(
                L"PipsPagerItems",
                winrt::name_of<winrt::IVector<int>>(),
                winrt::name_of<winrt::PipsPagerTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IVector<int>>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IVector< int > PipsPagerItems ( )

Definition at line 44 of file PipsPagerTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IVector<int>>::CastOrUnbox(static_cast<PipsPagerTemplateSettings*>(this)->GetValue(s_PipsPagerItemsProperty));
}

void PipsPagerItems ( winrt::IVector< int > const & value )

Definition at line 36 of file PipsPagerTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<PipsPagerTemplateSettings*>(this)->SetValue(s_PipsPagerItemsProperty, ValueHelper<winrt::IVector<int>>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty PipsPagerItemsProperty ( ) [inline, static]

Definition at line 15 of file PipsPagerTemplateSettings.properties.h.

{ return s_PipsPagerItemsProperty; }

Member Data Documentation

GlobalDependencyProperty s_PipsPagerItemsProperty [static]

Definition at line 17 of file PipsPagerTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/PipsPagerTemplateSettings.properties.h
  • Generated/PipsPagerTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerViewItemRevokers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerViewItemRevokers Class Reference

#include "PipsPager.h"

Detailed Description

Definition at line 11 of file PipsPager.h.

The documentation for this class was generated from the following file:
  • PipsPager/PipsPager.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PointerInfo< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

PointerInfo< T > Class Template Reference

#include "PointerInfo.h"

List of all members.

Public Member Functions

PointerInfo ()
~PointerInfo ()
bool | IsMouseButtonPressed (bool isForLeftMouseButton) const
bool | IsMousePointerOver () const
bool | IsPenPointerOver () const
bool | IsPointerIdTracked (uint32_t pointerId) const
bool | IsPointerOver () const
bool | IsPressed () const
bool | IsTouchPointerOver () const
bool | IsTrackingPointer () const
void | ResetAll ()
void | ResetIsMouseButtonPressed (bool isForLeftMouseButton)
void | ResetIsMousePointerOver ()
void | ResetIsPenPointerOver ()
void | ResetIsTouchPointerOver ()
void | ResetPointerPressed ()
void | ResetTrackedPointerId ()
void | SetIsMouseButtonPressed (bool isForLeftMouseButton)
void | SetIsMousePointerOver ()
void | SetIsPenPointerOver ()
void | SetIsTouchPointerOver ()
void | SetPointerPressed ()
void | TrackPointerId (uint32_t pointerId)

Detailed Description

template<typename T>
class PointerInfo< T >

Definition at line 37 of file PointerInfo.h.

Constructor & Destructor Documentation

PointerInfo ( ) [inline]

Definition at line 47 of file PointerInfo.h.

    {
    }

~PointerInfo ( ) [inline]

Definition at line 51 of file PointerInfo.h.

    {
    }

Member Function Documentation

bool IsMouseButtonPressed ( bool isForLeftMouseButton ) const [inline]

Definition at line 110 of file PointerInfo.h.

    {
        return isForLeftMouseButton ? flags_enum::is_set(m_pointerPressedStatus, PointerPressedStatus::LeftMouseButton) : flags_enum::is_set(m_pointerPressedStatus, PointerPressedStatus::RightMouseButton);
    }

bool IsMousePointerOver ( ) const [inline]

Definition at line 70 of file PointerInfo.h.

    {
        return flags_enum::is_set(m_pointerOverStatus, PointerOverStatus::Mouse);
    }

bool IsPenPointerOver ( ) const [inline]

Definition at line 65 of file PointerInfo.h.

    {
        return flags_enum::is_set(m_pointerOverStatus, PointerOverStatus::Pen);
    }

bool IsPointerIdTracked ( uint32_t pointerId ) const [inline]

Definition at line 154 of file PointerInfo.h.

    {
        return m_trackedPointerId == pointerId;
    }

bool IsPointerOver ( ) const [inline]

Definition at line 55 of file PointerInfo.h.

    {
        return m_pointerOverStatus != PointerOverStatus::None;
    }

bool IsPressed ( ) const [inline]

Definition at line 105 of file PointerInfo.h.

    {
        return m_pointerPressedStatus != PointerPressedStatus::None;
    }

bool IsTouchPointerOver ( ) const [inline]

Definition at line 60 of file PointerInfo.h.

    {
        return flags_enum::is_set(m_pointerOverStatus, PointerOverStatus::Touch);
    }

bool IsTrackingPointer ( ) const [inline]

Definition at line 149 of file PointerInfo.h.

    {
        return m_trackedPointerId != 0;
    }

void ResetAll ( ) [inline]

Definition at line 171 of file PointerInfo.h.

    {
        m_trackedPointerId = 0;
        m_pointerOverStatus = PointerOverStatus::None;
        m_pointerPressedStatus = PointerPressedStatus::None;
    }

void ResetIsMouseButtonPressed ( bool isForLeftMouseButton ) [inline]

Definition at line 127 of file PointerInfo.h.

    {
        if (isForLeftMouseButton)
        {
            m_pointerPressedStatus = flags_enum::unset(m_pointerPressedStatus, PointerPressedStatus::LeftMouseButton);
        }
        else
        {
            m_pointerPressedStatus = flags_enum::unset(m_pointerPressedStatus, PointerPressedStatus::RightMouseButton);
        }
    }

void ResetIsMousePointerOver ( ) [inline]

Definition at line 100 of file PointerInfo.h.

    {
        m_pointerOverStatus = flags_enum::unset(m_pointerOverStatus, PointerOverStatus::Mouse);
    }

void ResetIsPenPointerOver ( ) [inline]

Definition at line 90 of file PointerInfo.h.

    {
        m_pointerOverStatus = flags_enum::unset(m_pointerOverStatus, PointerOverStatus::Pen);
    }

void ResetIsTouchPointerOver ( ) [inline]

Definition at line 80 of file PointerInfo.h.

    {
        m_pointerOverStatus = flags_enum::unset(m_pointerOverStatus, PointerOverStatus::Touch);
    }

void ResetPointerPressed ( ) [inline]

Definition at line 144 of file PointerInfo.h.

    {
        m_pointerPressedStatus = flags_enum::unset(m_pointerPressedStatus, PointerPressedStatus::Pointer);
    }

void ResetTrackedPointerId ( ) [inline]

Definition at line 166 of file PointerInfo.h.

    {
        m_trackedPointerId = 0;
    }

void SetIsMouseButtonPressed ( bool isForLeftMouseButton ) [inline]

Definition at line 115 of file PointerInfo.h.

    {
        if (isForLeftMouseButton)
        {
            m_pointerPressedStatus = flags_enum::set(m_pointerPressedStatus, PointerPressedStatus::LeftMouseButton);
        }
        else
        {
            m_pointerPressedStatus = flags_enum::set(m_pointerPressedStatus, PointerPressedStatus::RightMouseButton);
        }
    }

void SetIsMousePointerOver ( ) [inline]

Definition at line 95 of file PointerInfo.h.

    {
        m_pointerOverStatus = flags_enum::set(m_pointerOverStatus, PointerOverStatus::Mouse);
    }

void SetIsPenPointerOver ( ) [inline]

Definition at line 85 of file PointerInfo.h.

    {
        m_pointerOverStatus = flags_enum::set(m_pointerOverStatus, PointerOverStatus::Pen);
    }

void SetIsTouchPointerOver ( ) [inline]

Definition at line 75 of file PointerInfo.h.

    {
        m_pointerOverStatus = flags_enum::set(m_pointerOverStatus, PointerOverStatus::Touch);
    }

void SetPointerPressed ( ) [inline]

Definition at line 139 of file PointerInfo.h.

    {
        m_pointerPressedStatus = flags_enum::set(m_pointerPressedStatus, PointerPressedStatus::Pointer);
    }

void TrackPointerId ( uint32_t pointerId ) [inline]

Definition at line 159 of file PointerInfo.h.

    {
        MUX_ASSERT(m_trackedPointerId == 0);

        m_trackedPointerId = pointerId;
    }

The documentation for this class was generated from the following file:
  • Common/PointerInfo.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PointerInfoRevokers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

PointerInfoRevokers Class Reference

#include "PointerInfoRevokers.h"

List of all members.

Public Member Functions

void RevokeAll ()

Detailed Description

Definition at line 6 of file PointerInfoRevokers.h.

Member Function Documentation

void RevokeAll ( ) [inline]

Definition at line 9 of file PointerInfoRevokers.h.

    {
        if (m_pointerEnteredRevoker)
        {
            m_pointerEnteredRevoker.revoke();
        }

        if (m_pointerMovedRevoker)
        {
            m_pointerMovedRevoker.revoke();
        }

        if (m_pointerExitedRevoker)
        {
            m_pointerExitedRevoker.revoke();
        }

        if (m_pointerPressedRevoker)
        {
            m_pointerPressedRevoker.revoke();
        }

        if (m_pointerReleasedRevoker)
        {
            m_pointerReleasedRevoker.revoke();
        }

        if (m_pointerCanceledRevoker)
        {
            m_pointerCanceledRevoker.revoke();
        }

        if (m_pointerCaptureLostRevoker)
        {
            m_pointerCaptureLostRevoker.revoke();
        }

        if (m_gettingFocusRevoker)
        {
            m_gettingFocusRevoker.revoke();
        }

        if (m_losingFocusRevoker)
        {
            m_losingFocusRevoker.revoke();
        }

        if (m_tappedRevoker)
        {
            m_tappedRevoker.revoke();
        }

        if (m_doubleTappedRevoker)
        {
            m_doubleTappedRevoker.revoke();
        }

        if (m_isEnabledChangedRevoker)
        {
            m_isEnabledChangedRevoker.revoke();
        }
    }

The documentation for this class was generated from the following file:
  • Common/PointerInfoRevokers.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PrimitiveXamlType Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

PrimitiveXamlType Class Reference

#include "XamlType.h"

Inherits XamlTypeBase.

List of all members.

Public Member Functions

PrimitiveXamlType (wstring_view const &typeName)

Detailed Description

Definition at line 88 of file XamlType.h.

Constructor & Destructor Documentation

PrimitiveXamlType ( wstring_view const & typeName ) [inline]

Definition at line 91 of file XamlType.h.

    {
        m_typeName = typeName;
        m_isSystemType = true;
    }

The documentation for this class was generated from the following file:
  • dll/XamlType.h
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ProgressBar Class Reference

#include "ProgressBar.h"

Inherits ReferenceTracker< ProgressBar, winrt::implementation::ProgressBarT >, and ProgressBarProperties.

List of all members.

Public Member Functions

ProgressBar ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnIsIndeterminatePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnShowErrorPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnShowPausedPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | OnIndicatorWidthComponentChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnSizeChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnVisibilityPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | SetProgressBarIndicatorWidth ()
void | UpdateStates ()
void | UpdateWidthBasedTemplateSettings ()

Detailed Description

Definition at line 14 of file ProgressBar.h.

Constructor & Destructor Documentation

ProgressBar ( )

Definition at line 11 of file ProgressBar.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_ProgressBar);

    SetDefaultStyleKey(this);

    SizeChanged({ this, &ProgressBar::OnSizeChanged });

    // NOTE: This is necessary only because Value isn't one of OUR properties, it's implemented in RangeBase.
    // If it was one of ProgressBar's properties, defined in the IDL, you'd do it differently (see IsIndeterminate).
    RegisterPropertyChangedCallback(winrt::RangeBase::ValueProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
    RegisterPropertyChangedCallback(winrt::RangeBase::MinimumProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
    RegisterPropertyChangedCallback(winrt::RangeBase::MaximumProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
    RegisterPropertyChangedCallback(winrt::Control::PaddingProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
    RegisterPropertyChangedCallback(winrt::UIElement::VisibilityProperty(), { this, &ProgressBar::OnVisibilityPropertyChanged });

    SetValue(s_TemplateSettingsProperty, winrt::make<::ProgressBarTemplateSettings>());
}

Member Function Documentation

void OnApplyTemplate ( )

Definition at line 36 of file ProgressBar.cpp.

{
    winrt::IControlProtected controlProtected{ *this };

    // NOTE: Example of how named parts are loaded from the template. Important to remember that it's possible for
    // any of them not to be found, since devs can replace the template with their own.

    m_layoutRoot.set(GetTemplateChildT<winrt::Grid>(s_LayoutRootName, controlProtected));
    m_determinateProgressBarIndicator.set(GetTemplateChildT<winrt::Rectangle>(s_DeterminateProgressBarIndicatorName, controlProtected));
    m_indeterminateProgressBarIndicator.set(GetTemplateChildT<winrt::Rectangle>(s_IndeterminateProgressBarIndicatorName, controlProtected));
    m_indeterminateProgressBarIndicator2.set(GetTemplateChildT<winrt::Rectangle>(s_IndeterminateProgressBarIndicator2Name, controlProtected));

    UpdateStates();
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 30 of file ProgressBar.cpp.

{
    return winrt::make<ProgressBarAutomationPeer>(*this);
}

void OnIndicatorWidthComponentChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 57 of file ProgressBar.cpp.

{
    // NOTE: This hits when the Value property changes, because we called RegisterPropertyChangedCallback.
    SetProgressBarIndicatorWidth();
}

void OnIsIndeterminatePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 63 of file ProgressBar.cpp.

{
    // NOTE: This hits when IsIndeterminate changes because we set MUX_PROPERTY_CHANGED_CALLBACK to true in the idl.
    SetProgressBarIndicatorWidth();
    UpdateStates();
}

void OnShowErrorPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 81 of file ProgressBar.cpp.

{
    SetProgressBarIndicatorWidth();
    UpdateStates();
}

void OnShowPausedPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 70 of file ProgressBar.cpp.

{
    SetProgressBarIndicatorWidth();
    UpdateStates();
}

void OnSizeChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 51 of file ProgressBar.cpp.

{
    SetProgressBarIndicatorWidth();
    UpdateWidthBasedTemplateSettings();
}

void OnVisibilityPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 76 of file ProgressBar.cpp.

{
    UpdateStates();
}

void SetProgressBarIndicatorWidth ( ) [private]

Definition at line 128 of file ProgressBar.cpp.

{
    const auto templateSettings = winrt::get_self<::ProgressBarTemplateSettings>(TemplateSettings());

    if (auto&& progressBar = m_layoutRoot.get())
    {
        if (auto&& determinateProgressBarIndicator = m_determinateProgressBarIndicator.get())
        {
            const double progressBarWidth = progressBar.ActualWidth();
            const double prevIndicatorWidth = determinateProgressBarIndicator.ActualWidth();
            const double maximum = Maximum();
            const double minimum = Minimum();
            const auto padding = Padding();
            const auto borderThickness = BorderThickness();

            // Round the border width, if necessary. Note that the Left and Right values of BorderThickness
            // should be individually rounded (see CBorder::GetLayoutRoundedThickness).
            const double scaleFactor = progressBar.XamlRoot().RasterizationScale();
            const double roundedBorderWidth = progressBar.UseLayoutRounding() ?
                (LayoutRound(borderThickness.Left, scaleFactor) + LayoutRound(borderThickness.Right, scaleFactor)) :
                (borderThickness.Left + borderThickness.Right);

            const double paddingAndBorderWidth = (padding.Left + padding.Right) + roundedBorderWidth;
            const double maxIndicatorWidth = std::max(progressBarWidth - paddingAndBorderWidth, 0.0);

            // Adds "Updating" state in between to trigger RepositionThemeAnimation Visual Transition
            // in ProgressBar.xaml when reverting back to previous state
            if (ShowError())
            {
                winrt::VisualStateManager::GoToState(*this, s_UpdatingWithErrorStateName, true);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, s_UpdatingStateName, true);
            }

            if (IsIndeterminate())
            {
                determinateProgressBarIndicator.Width(0);

                if (auto&& indeterminateProgressBarIndicator = m_indeterminateProgressBarIndicator.get())
                {
                    indeterminateProgressBarIndicator.Width(maxIndicatorWidth * 0.4); // 40% of ProgressBar Width
                }

                if (auto&& indeterminateProgressBarIndicator2 = m_indeterminateProgressBarIndicator2.get())
                {
                    if (ShowPaused() || ShowError()) // If IndeterminatePaused or IndeterminateError
                    {
                        indeterminateProgressBarIndicator2.Width(maxIndicatorWidth); // 100% of ProgressBar Width
                    }
                    else
                    {
                        indeterminateProgressBarIndicator2.Width(maxIndicatorWidth * 0.6); // 60% of ProgressBar Width
                    }

                }
            }
            else if (std::abs(maximum - minimum) > DBL_EPSILON)
            {
                const double increment = maxIndicatorWidth / (maximum - minimum);
                const double indicatorWidth = increment * (Value() - minimum);
                const double widthDelta = indicatorWidth - prevIndicatorWidth;
                templateSettings->IndicatorLengthDelta(-widthDelta);
                determinateProgressBarIndicator.Width(indicatorWidth);
            }
            else
            {
                determinateProgressBarIndicator.Width(0); // Error
            }

            UpdateStates(); // Reverts back to previous state
        }
    }
}

void UpdateStates ( ) [private]

Definition at line 87 of file ProgressBar.cpp.

{
    if (IsIndeterminate() && Visibility() == winrt::Visibility::Visible)
    {
        if (ShowError())
        {
            winrt::VisualStateManager::GoToState(*this, s_IndeterminateErrorStateName, true);
        }
        else if (ShowPaused())
        {
            winrt::VisualStateManager::GoToState(*this, s_IndeterminatePausedStateName, true);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, s_IndeterminateStateName, true);
        }
        UpdateWidthBasedTemplateSettings();
    }
    else
    {
        if (ShowError())
        {
            winrt::VisualStateManager::GoToState(*this, s_ErrorStateName, true);
        }
        else if(ShowPaused())
        {
            winrt::VisualStateManager::GoToState(*this, s_PausedStateName, true);
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, s_DeterminateStateName, true);
        }
    }

}

void UpdateWidthBasedTemplateSettings ( ) [private]

Definition at line 204 of file ProgressBar.cpp.

{
    const auto templateSettings = winrt::get_self<::ProgressBarTemplateSettings>(TemplateSettings());

    const auto [width, height] = [progressBar = m_layoutRoot.get()]()
    {
        if (progressBar)
        {
            const float width = static_cast<float>(progressBar.ActualWidth());
            const float height = static_cast<float>(progressBar.ActualHeight());
            return std::make_tuple(width, height);
        }
        return std::make_tuple(0.0f, 0.0f);
    }();

    const double indeterminateProgressBarIndicatorWidth = width * 0.4; // Indicator width at 40% of ProgressBar
    const double indeterminateProgressBarIndicatorWidth2 = width * 0.6; // Indicator width at 60% of ProgressBar

    templateSettings->ContainerAnimationStartPosition(indeterminateProgressBarIndicatorWidth * -1.0); // Position at -100%
    templateSettings->ContainerAnimationEndPosition(indeterminateProgressBarIndicatorWidth * 3.0); // Position at 300%

    templateSettings->Container2AnimationStartPosition(indeterminateProgressBarIndicatorWidth2 * -1.5); // Position at -150%
    templateSettings->Container2AnimationEndPosition(indeterminateProgressBarIndicatorWidth2 * 1.66); // Position at 166%

    templateSettings->ContainerAnimationMidPosition(0);

    const auto rectangle = [width, height, padding = Padding()]()
    {
        const auto returnValue = winrt::RectangleGeometry();
        returnValue.Rect({
            static_cast<float>(padding.Left),
            static_cast<float>(padding.Top),
            width - static_cast<float>(padding.Right + padding.Left),
            height - static_cast<float>(padding.Bottom + padding.Top)
            });
        return returnValue;
    }();

    templateSettings->ClipRect(rectangle);

    // TemplateSetting properties from WUXC for backwards compatibility.
    templateSettings->EllipseAnimationEndPosition((1.0 / 3.0) * width);
    templateSettings->EllipseAnimationWellPosition((2.0 / 3.0) * width);

    if (width <= 180.0)
    {
        // Small ellipse diameter and offset.
        templateSettings->EllipseDiameter(4.0);
        templateSettings->EllipseOffset(4.0);
    }
    else if (width <= 280.0)
    {
        // Medium ellipse diameter and offset.
        templateSettings->EllipseDiameter(5.0);
        templateSettings->EllipseOffset(7.0);
    }
    else
    {
        // Large ellipse diameter and offset.
        templateSettings->EllipseDiameter(6.0);
        templateSettings->EllipseOffset(9.0);
    }
}

The documentation for this class was generated from the following files:
  • ProgressBar/ProgressBar.h
  • ProgressBar/ProgressBar.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ProgressBarAutomationPeer Class Reference

#include "ProgressBarAutomationPeer.h"

Inherits ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider >.

List of all members.

Public Member Functions

ProgressBarAutomationPeer (winrt::ProgressBar const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | IsReadOnly ()
double | LargeChange ()
double | Maximum ()
double | Minimum ()
void | SetValue (double value)
double | SmallChange ()
double | Value ()

Private Member Functions

com_ptr< ProgressBar > | GetImpl ()

Detailed Description

Definition at line 9 of file ProgressBarAutomationPeer.h.

Constructor & Destructor Documentation

ProgressBarAutomationPeer ( winrt::ProgressBar const & owner )

Definition at line 13 of file ProgressBarAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 65 of file ProgressBarAutomationPeer.cpp.

{
    return winrt::AutomationControlType::ProgressBar;
}

hstring GetClassNameCore ( )

Definition at line 37 of file ProgressBarAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::ProgressBar>();
}

com_ptr< ProgressBar > GetImpl ( ) [private]

Definition at line 70 of file ProgressBarAutomationPeer.cpp.

{
    com_ptr<ProgressBar> impl = nullptr;

    if (auto progressBar = Owner().try_as<winrt::ProgressBar>())
    {
        impl = winrt::get_self<ProgressBar>(progressBar)->get_strong();
    }

    return impl;
}

winrt::hstring GetNameCore ( )

Definition at line 42 of file ProgressBarAutomationPeer.cpp.

{
    //Check to see if the item has a defined AutomationProperties.Name
    winrt::hstring name = __super::GetNameCore();

    if (auto progressBar = Owner().try_as<winrt::ProgressBar>())
    {
        if (progressBar.ShowError())
        {
            return winrt::hstring{ ResourceAccessor::GetLocalizedStringResource(SR_ProgressBarErrorStatus) + name };
        }
        else if (progressBar.ShowPaused())
        {
            return winrt::hstring{ ResourceAccessor::GetLocalizedStringResource(SR_ProgressBarPausedStatus) + name };
        }
        else if (progressBar.IsIndeterminate())
        {
            return winrt::hstring{ ResourceAccessor::GetLocalizedStringResource(SR_ProgressBarIndeterminateStatus) + name };
        }
    }
    return name;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file ProgressBarAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::RangeValue)
    {
        if (auto progressBar = Owner().try_as<winrt::ProgressBar>())
        {
            if (progressBar.IsIndeterminate())
            {
                return nullptr;
            }
        }

        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

bool IsReadOnly ( ) [inline]

Definition at line 23 of file ProgressBarAutomationPeer.h.

{ return true; }

double LargeChange ( )

Definition at line 93 of file ProgressBarAutomationPeer.cpp.

{
    return std::numeric_limits<double>::quiet_NaN();
}

double Maximum ( )

Definition at line 103 of file ProgressBarAutomationPeer.cpp.

{
    return GetImpl()->Maximum();
}

double Minimum ( )

Definition at line 98 of file ProgressBarAutomationPeer.cpp.

{
    return GetImpl()->Minimum();
}

void SetValue ( double value )

Definition at line 108 of file ProgressBarAutomationPeer.cpp.

{
    GetImpl()->Value(value);
}

double SmallChange ( )

Definition at line 88 of file ProgressBarAutomationPeer.cpp.

{
    return std::numeric_limits<double>::quiet_NaN();
}

double Value ( )

Definition at line 83 of file ProgressBarAutomationPeer.cpp.

{
    return GetImpl()->Value();
}

The documentation for this class was generated from the following files:
  • ProgressBar/ProgressBarAutomationPeer.h
  • ProgressBar/ProgressBarAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ProgressBarProperties Class Reference

#include "ProgressBar.properties.h"

Inherited by ProgressBar.

List of all members.

Public Member Functions

ProgressBarProperties ()
void | IsIndeterminate (bool value)
bool | IsIndeterminate ()
void | ShowError (bool value)
bool | ShowError ()
bool | ShowPaused ()
void | ShowPaused (bool value)
winrt::ProgressBarTemplateSettings | TemplateSettings ()
void | TemplateSettings (winrt::ProgressBarTemplateSettings const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsIndeterminateProperty ()
static void | OnIsIndeterminatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnShowErrorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnShowPausedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | ShowErrorProperty ()
static winrt::DependencyProperty | ShowPausedProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IsIndeterminateProperty
static GlobalDependencyProperty | s_ShowErrorProperty
static GlobalDependencyProperty | s_ShowPausedProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty

Detailed Description

Definition at line 7 of file ProgressBar.properties.h.

Constructor & Destructor Documentation

ProgressBarProperties ( )

Definition at line 21 of file ProgressBar.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 74 of file ProgressBar.properties.cpp.

{
    s_IsIndeterminateProperty = nullptr;
    s_ShowErrorProperty = nullptr;
    s_ShowPausedProperty = nullptr;
    s_TemplateSettingsProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 26 of file ProgressBar.properties.cpp.

{
    if (!s_IsIndeterminateProperty)
    {
        s_IsIndeterminateProperty =
            InitializeDependencyProperty(
                L"IsIndeterminate",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ProgressBar>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsIndeterminatePropertyChanged));
    }
    if (!s_ShowErrorProperty)
    {
        s_ShowErrorProperty =
            InitializeDependencyProperty(
                L"ShowError",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ProgressBar>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnShowErrorPropertyChanged));
    }
    if (!s_ShowPausedProperty)
    {
        s_ShowPausedProperty =
            InitializeDependencyProperty(
                L"ShowPaused",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ProgressBar>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnShowPausedPropertyChanged));
    }
    if (!s_TemplateSettingsProperty)
    {
        s_TemplateSettingsProperty =
            InitializeDependencyProperty(
                L"TemplateSettings",
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                winrt::name_of<winrt::ProgressBar>(),
                false /* isAttached */,
                ValueHelper<winrt::ProgressBarTemplateSettings>::BoxedDefaultValue(),
                nullptr);
    }
}

bool IsIndeterminate ( )

Definition at line 114 of file ProgressBar.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_IsIndeterminateProperty));
}

void IsIndeterminate ( bool value )

Definition at line 106 of file ProgressBar.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBar*>(this)->SetValue(s_IsIndeterminateProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsIndeterminateProperty ( ) [inline, static]

Definition at line 24 of file ProgressBar.properties.h.

{ return s_IsIndeterminateProperty; }

void OnIsIndeterminatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 82 of file ProgressBar.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressBar>();
    winrt::get_self<ProgressBar>(owner)->OnIsIndeterminatePropertyChanged(args);
}

void OnShowErrorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 90 of file ProgressBar.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressBar>();
    winrt::get_self<ProgressBar>(owner)->OnShowErrorPropertyChanged(args);
}

void OnShowPausedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 98 of file ProgressBar.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressBar>();
    winrt::get_self<ProgressBar>(owner)->OnShowPausedPropertyChanged(args);
}

bool ShowError ( )

Definition at line 127 of file ProgressBar.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_ShowErrorProperty));
}

void ShowError ( bool value )

Definition at line 119 of file ProgressBar.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBar*>(this)->SetValue(s_ShowErrorProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ShowErrorProperty ( ) [inline, static]

Definition at line 25 of file ProgressBar.properties.h.

{ return s_ShowErrorProperty; }

void ShowPaused ( bool value )

Definition at line 132 of file ProgressBar.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBar*>(this)->SetValue(s_ShowPausedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool ShowPaused ( )

Definition at line 140 of file ProgressBar.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_ShowPausedProperty));
}

static winrt::DependencyProperty ShowPausedProperty ( ) [inline, static]

Definition at line 26 of file ProgressBar.properties.h.

{ return s_ShowPausedProperty; }

winrt::ProgressBarTemplateSettings TemplateSettings ( )

Definition at line 153 of file ProgressBar.properties.cpp.

{
    return ValueHelper<winrt::ProgressBarTemplateSettings>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_TemplateSettingsProperty));
}

void TemplateSettings ( winrt::ProgressBarTemplateSettings const & value )

Definition at line 145 of file ProgressBar.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBar*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::ProgressBarTemplateSettings>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 27 of file ProgressBar.properties.h.

{ return s_TemplateSettingsProperty; }

Member Data Documentation

GlobalDependencyProperty s_IsIndeterminateProperty [static]

Definition at line 29 of file ProgressBar.properties.h.

GlobalDependencyProperty s_ShowErrorProperty [static]

Definition at line 30 of file ProgressBar.properties.h.

GlobalDependencyProperty s_ShowPausedProperty [static]

Definition at line 31 of file ProgressBar.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 32 of file ProgressBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ProgressBar.properties.h
  • Generated/ProgressBar.properties.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ProgressBarTemplateSettings Class Reference

#include "ProgressBarTemplateSettings.h"

Inherits ProgressBarTemplateSettingsProperties.

List of all members.

Public Member Functions

ProgressBarTemplateSettings ()

Detailed Description

Definition at line 9 of file ProgressBarTemplateSettings.h.

Constructor & Destructor Documentation

ProgressBarTemplateSettings ( )

Definition at line 8 of file ProgressBarTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • ProgressBar/ProgressBarTemplateSettings.h
  • ProgressBar/ProgressBarTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ProgressBarTemplateSettingsProperties Class Reference

#include "ProgressBarTemplateSettings.properties.h"

Inherited by ProgressBarTemplateSettings.

List of all members.

Public Member Functions

ProgressBarTemplateSettingsProperties ()
void | ClipRect (winrt::RectangleGeometry const &value)
winrt::RectangleGeometry | ClipRect ()
void | Container2AnimationEndPosition (double value)
double | Container2AnimationEndPosition ()
void | Container2AnimationStartPosition (double value)
double | Container2AnimationStartPosition ()
void | ContainerAnimationEndPosition (double value)
double | ContainerAnimationEndPosition ()
void | ContainerAnimationMidPosition (double value)
double | ContainerAnimationMidPosition ()
void | ContainerAnimationStartPosition (double value)
double | ContainerAnimationStartPosition ()
double | EllipseAnimationEndPosition ()
void | EllipseAnimationEndPosition (double value)
double | EllipseAnimationWellPosition ()
void | EllipseAnimationWellPosition (double value)
void | EllipseDiameter (double value)
double | EllipseDiameter ()
void | EllipseOffset (double value)
double | EllipseOffset ()
double | IndicatorLengthDelta ()
void | IndicatorLengthDelta (double value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ClipRectProperty ()
static winrt::DependencyProperty | Container2AnimationEndPositionProperty ()
static winrt::DependencyProperty | Container2AnimationStartPositionProperty ()
static winrt::DependencyProperty | ContainerAnimationEndPositionProperty ()
static winrt::DependencyProperty | ContainerAnimationMidPositionProperty ()
static winrt::DependencyProperty | ContainerAnimationStartPositionProperty ()
static winrt::DependencyProperty | EllipseAnimationEndPositionProperty ()
static winrt::DependencyProperty | EllipseAnimationWellPositionProperty ()
static winrt::DependencyProperty | EllipseDiameterProperty ()
static winrt::DependencyProperty | EllipseOffsetProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IndicatorLengthDeltaProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ClipRectProperty
static GlobalDependencyProperty | s_Container2AnimationEndPositionProperty
static GlobalDependencyProperty | s_Container2AnimationStartPositionProperty
static GlobalDependencyProperty | s_ContainerAnimationEndPositionProperty
static GlobalDependencyProperty | s_ContainerAnimationMidPositionProperty
static GlobalDependencyProperty | s_ContainerAnimationStartPositionProperty
static GlobalDependencyProperty | s_EllipseAnimationEndPositionProperty
static GlobalDependencyProperty | s_EllipseAnimationWellPositionProperty
static GlobalDependencyProperty | s_EllipseDiameterProperty
static GlobalDependencyProperty | s_EllipseOffsetProperty
static GlobalDependencyProperty | s_IndicatorLengthDeltaProperty

Detailed Description

Definition at line 7 of file ProgressBarTemplateSettings.properties.h.

Constructor & Destructor Documentation

ProgressBarTemplateSettingsProperties ( )

Definition at line 21 of file ProgressBarTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 151 of file ProgressBarTemplateSettings.properties.cpp.

{
    s_ClipRectProperty = nullptr;
    s_Container2AnimationEndPositionProperty = nullptr;
    s_Container2AnimationStartPositionProperty = nullptr;
    s_ContainerAnimationEndPositionProperty = nullptr;
    s_ContainerAnimationMidPositionProperty = nullptr;
    s_ContainerAnimationStartPositionProperty = nullptr;
    s_EllipseAnimationEndPositionProperty = nullptr;
    s_EllipseAnimationWellPositionProperty = nullptr;
    s_EllipseDiameterProperty = nullptr;
    s_EllipseOffsetProperty = nullptr;
    s_IndicatorLengthDeltaProperty = nullptr;
}

void ClipRect ( winrt::RectangleGeometry const & value )

Definition at line 166 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ClipRectProperty, ValueHelper<winrt::RectangleGeometry>::BoxValueIfNecessary(value));
    }
}

winrt::RectangleGeometry ClipRect ( )

Definition at line 174 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::RectangleGeometry>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ClipRectProperty));
}

static winrt::DependencyProperty ClipRectProperty ( ) [inline, static]

Definition at line 45 of file ProgressBarTemplateSettings.properties.h.

{ return s_ClipRectProperty; }

double Container2AnimationEndPosition ( )

Definition at line 187 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_Container2AnimationEndPositionProperty));
}

void Container2AnimationEndPosition ( double value )

Definition at line 179 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_Container2AnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty Container2AnimationEndPositionProperty ( ) [inline, static]

Definition at line 46 of file ProgressBarTemplateSettings.properties.h.

{ return s_Container2AnimationEndPositionProperty; }

void Container2AnimationStartPosition ( double value )

Definition at line 192 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_Container2AnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double Container2AnimationStartPosition ( )

Definition at line 200 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_Container2AnimationStartPositionProperty));
}

static winrt::DependencyProperty Container2AnimationStartPositionProperty ( ) [inline, static]

Definition at line 47 of file ProgressBarTemplateSettings.properties.h.

{ return s_Container2AnimationStartPositionProperty; }

double ContainerAnimationEndPosition ( )

Definition at line 213 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ContainerAnimationEndPositionProperty));
}

void ContainerAnimationEndPosition ( double value )

Definition at line 205 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ContainerAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ContainerAnimationEndPositionProperty ( ) [inline, static]

Definition at line 48 of file ProgressBarTemplateSettings.properties.h.

{ return s_ContainerAnimationEndPositionProperty; }

void ContainerAnimationMidPosition ( double value )

Definition at line 218 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ContainerAnimationMidPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ContainerAnimationMidPosition ( )

Definition at line 226 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ContainerAnimationMidPositionProperty));
}

static winrt::DependencyProperty ContainerAnimationMidPositionProperty ( ) [inline, static]

Definition at line 49 of file ProgressBarTemplateSettings.properties.h.

{ return s_ContainerAnimationMidPositionProperty; }

void ContainerAnimationStartPosition ( double value )

Definition at line 231 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ContainerAnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double ContainerAnimationStartPosition ( )

Definition at line 239 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ContainerAnimationStartPositionProperty));
}

static winrt::DependencyProperty ContainerAnimationStartPositionProperty ( ) [inline, static]

Definition at line 50 of file ProgressBarTemplateSettings.properties.h.

{ return s_ContainerAnimationStartPositionProperty; }

void EllipseAnimationEndPosition ( double value )

Definition at line 244 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double EllipseAnimationEndPosition ( )

Definition at line 252 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseAnimationEndPositionProperty));
}

static winrt::DependencyProperty EllipseAnimationEndPositionProperty ( ) [inline, static]

Definition at line 51 of file ProgressBarTemplateSettings.properties.h.

{ return s_EllipseAnimationEndPositionProperty; }

double EllipseAnimationWellPosition ( )

Definition at line 265 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseAnimationWellPositionProperty));
}

void EllipseAnimationWellPosition ( double value )

Definition at line 257 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseAnimationWellPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty EllipseAnimationWellPositionProperty ( ) [inline, static]

Definition at line 52 of file ProgressBarTemplateSettings.properties.h.

{ return s_EllipseAnimationWellPositionProperty; }

void EllipseDiameter ( double value )

Definition at line 270 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseDiameterProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double EllipseDiameter ( )

Definition at line 278 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseDiameterProperty));
}

static winrt::DependencyProperty EllipseDiameterProperty ( ) [inline, static]

Definition at line 53 of file ProgressBarTemplateSettings.properties.h.

{ return s_EllipseDiameterProperty; }

double EllipseOffset ( )

Definition at line 291 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseOffsetProperty));
}

void EllipseOffset ( double value )

Definition at line 283 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty EllipseOffsetProperty ( ) [inline, static]

Definition at line 54 of file ProgressBarTemplateSettings.properties.h.

{ return s_EllipseOffsetProperty; }

void EnsureProperties ( ) [static]

Definition at line 26 of file ProgressBarTemplateSettings.properties.cpp.

{
    if (!s_ClipRectProperty)
    {
        s_ClipRectProperty =
            InitializeDependencyProperty(
                L"ClipRect",
                winrt::name_of<winrt::RectangleGeometry>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::RectangleGeometry>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_Container2AnimationEndPositionProperty)
    {
        s_Container2AnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"Container2AnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_Container2AnimationStartPositionProperty)
    {
        s_Container2AnimationStartPositionProperty =
            InitializeDependencyProperty(
                L"Container2AnimationStartPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ContainerAnimationEndPositionProperty)
    {
        s_ContainerAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"ContainerAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ContainerAnimationMidPositionProperty)
    {
        s_ContainerAnimationMidPositionProperty =
            InitializeDependencyProperty(
                L"ContainerAnimationMidPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ContainerAnimationStartPositionProperty)
    {
        s_ContainerAnimationStartPositionProperty =
            InitializeDependencyProperty(
                L"ContainerAnimationStartPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_EllipseAnimationEndPositionProperty)
    {
        s_EllipseAnimationEndPositionProperty =
            InitializeDependencyProperty(
                L"EllipseAnimationEndPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_EllipseAnimationWellPositionProperty)
    {
        s_EllipseAnimationWellPositionProperty =
            InitializeDependencyProperty(
                L"EllipseAnimationWellPosition",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_EllipseDiameterProperty)
    {
        s_EllipseDiameterProperty =
            InitializeDependencyProperty(
                L"EllipseDiameter",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_EllipseOffsetProperty)
    {
        s_EllipseOffsetProperty =
            InitializeDependencyProperty(
                L"EllipseOffset",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_IndicatorLengthDeltaProperty)
    {
        s_IndicatorLengthDeltaProperty =
            InitializeDependencyProperty(
                L"IndicatorLengthDelta",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
}

void IndicatorLengthDelta ( double value )

Definition at line 296 of file ProgressBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_IndicatorLengthDeltaProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double IndicatorLengthDelta ( )

Definition at line 304 of file ProgressBarTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_IndicatorLengthDeltaProperty));
}

static winrt::DependencyProperty IndicatorLengthDeltaProperty ( ) [inline, static]

Definition at line 55 of file ProgressBarTemplateSettings.properties.h.

{ return s_IndicatorLengthDeltaProperty; }

Member Data Documentation

GlobalDependencyProperty s_ClipRectProperty [static]

Definition at line 57 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_Container2AnimationEndPositionProperty [static]

Definition at line 58 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_Container2AnimationStartPositionProperty [static]

Definition at line 59 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ContainerAnimationEndPositionProperty [static]

Definition at line 60 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ContainerAnimationMidPositionProperty [static]

Definition at line 61 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_ContainerAnimationStartPositionProperty [static]

Definition at line 62 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_EllipseAnimationEndPositionProperty [static]

Definition at line 63 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_EllipseAnimationWellPositionProperty [static]

Definition at line 64 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_EllipseDiameterProperty [static]

Definition at line 65 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_EllipseOffsetProperty [static]

Definition at line 66 of file ProgressBarTemplateSettings.properties.h.

GlobalDependencyProperty s_IndicatorLengthDeltaProperty [static]

Definition at line 67 of file ProgressBarTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ProgressBarTemplateSettings.properties.h
  • Generated/ProgressBarTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ProgressRing Class Reference

#include "ProgressRing.h"

Inherits ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT >, and ProgressRingProperties.

List of all members.

Public Member Functions

ProgressRing ()
void | OnApplyTemplate ()
void | OnBackgroundColorPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OnBackgroundPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnDeterminateSourcePropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnForegroundColorPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OnForegroundPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OnIndeterminateSourcePropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
void | OnIsActivePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsIndeterminatePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMaximumPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMinimumPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnValuePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | ApplyTemplateSettings ()
void | CoerceMaximum ()
void | CoerceMinimum ()
void | CoerceValue ()
bool | IsInBounds (double value)
void | OnLoaded (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnSizeChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | SetAnimatedVisualPlayerSource ()
void | SetLottieBackgroundColor (const winrt::IAnimatedVisualSource)
void | SetLottieForegroundColor (const winrt::IAnimatedVisualSource)
void | UpdateLottieProgress ()
void | UpdateStates ()

Detailed Description

Definition at line 16 of file ProgressRing.h.

Constructor & Destructor Documentation

ProgressRing ( )

Definition at line 22 of file ProgressRing.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_ProgressRing);

    SetDefaultStyleKey(this);

    RegisterPropertyChangedCallback(winrt::Control::ForegroundProperty(), { this, &ProgressRing::OnForegroundPropertyChanged });
    RegisterPropertyChangedCallback(winrt::Control::BackgroundProperty(), { this, &ProgressRing::OnBackgroundPropertyChanged });

    SetValue(s_TemplateSettingsProperty, winrt::make<::ProgressRingTemplateSettings>());

    SizeChanged({ this, &ProgressRing::OnSizeChanged });
    Loaded({ this, &ProgressRing::OnLoaded });
}

Member Function Documentation

void ApplyTemplateSettings ( ) [private]

Definition at line 366 of file ProgressRing.cpp.

{
    // TemplateSetting properties from WUXC for backwards compatibility.
    const auto templateSettings = winrt::get_self<::ProgressRingTemplateSettings>(TemplateSettings());

    const auto [width, diameterValue, anchorPoint] = [this]()
    {
        if (this->ActualWidth())
        {
            const float width = static_cast<float>(this->ActualWidth());

            const auto diameterAdditive = [width]()
            {
                if (width <= 40.0f)
                {
                    return 1.0f;
                }
                return 0.0f;
            }();

            const float diamaterValue = (width * 0.1f) + diameterAdditive;
            const float anchorPoint = (width * 0.5f) - diamaterValue;
            return std::make_tuple(width, diamaterValue, anchorPoint);
        }

        return std::make_tuple(0.0f, 0.0f, 0.0f);
    }();

    templateSettings->EllipseDiameter(diameterValue);

    const winrt::Thickness thicknessEllipseOffset = { 0, anchorPoint, 0, 0 };

    templateSettings->EllipseOffset(thicknessEllipseOffset);
    templateSettings->MaxSideLength(width);
}

void CoerceMaximum ( ) [private]

Definition at line 411 of file ProgressRing.cpp.

{
    const auto min = Minimum();
    if (Maximum() < min)
    {
        Maximum(min);
    }
}

void CoerceMinimum ( ) [private]

Definition at line 402 of file ProgressRing.cpp.

{
    const auto max = Maximum();
    if (Minimum() > max)
    {
        Minimum(max);
    }
}

void CoerceValue ( ) [private]

Definition at line 420 of file ProgressRing.cpp.

{
    // Validate that the value is in bounds
    const auto value = Value();
    if (!std::isnan(value) && !IsInBounds(value))
    {
        // Coerce value to be within range
        const auto max = Maximum();
        if (value > max)
        {
            Value(max);
        }
        else
        {
            Value(Minimum());
        }
    }
}

bool IsInBounds ( double value ) [private]

Definition at line 439 of file ProgressRing.cpp.

{
    return (value >= Minimum() && value <= Maximum());
}

void OnApplyTemplate ( )

Definition at line 42 of file ProgressRing.cpp.

{
    winrt::IControlProtected controlProtected{ *this };

    m_layoutRoot.set(GetTemplateChildT<winrt::Grid>(s_LayoutRootName, controlProtected));
    m_player.set(GetTemplateChildT<winrt::AnimatedVisualPlayer>(s_LottiePlayerName, controlProtected));

    SetAnimatedVisualPlayerSource();
    UpdateLottieProgress();
    UpdateStates();
}

void OnBackgroundColorPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |
 | ) |  |

Definition at line 118 of file ProgressRing.cpp.

{
    if (auto&& player = m_player.get())
    {
        if (auto const progressRingAnimation = player.Source())
        {
            if (IsIndeterminate())
            {
                if (!IndeterminateSource())
                {
                    SetLottieBackgroundColor(progressRingAnimation);
                }
            }
            else
            {
                if (!DeterminateSource())
                {
                    SetLottieBackgroundColor(progressRingAnimation);
                }
            }
        }
    }
}

void OnBackgroundPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |
 | ) |  |

Definition at line 108 of file ProgressRing.cpp.

{
    if (const auto background = Background().try_as<winrt::SolidColorBrush>())
    {
        m_backgroundColorPropertyChangedRevoker = RegisterPropertyChanged(background, winrt::SolidColorBrush::ColorProperty(), { this, &ProgressRing::OnBackgroundColorPropertyChanged });
    }

    OnBackgroundColorPropertyChanged(nullptr, nullptr);
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 37 of file ProgressRing.cpp.

{
    return winrt::make<ProgressRingAutomationPeer>(*this);
}

void OnDeterminateSourcePropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 54 of file ProgressRing.cpp.

{
    SetAnimatedVisualPlayerSource();
}

void OnForegroundColorPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |
 | ) |  |

Definition at line 84 of file ProgressRing.cpp.

{
    if (auto&& player = m_player.get())
    {
        if (auto const progressRingAnimation = player.Source())
        {
            if (IsIndeterminate())
            {
                if (!IndeterminateSource())
                {
                    SetLottieForegroundColor(progressRingAnimation);
                }
            }
            else
            {
                if (!DeterminateSource())
                {
                    SetLottieForegroundColor(progressRingAnimation);
                }
            }
        }
    }
}

void OnForegroundPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |
 | ) |  |

Definition at line 74 of file ProgressRing.cpp.

{
    if (const auto foreground = Foreground().try_as<winrt::SolidColorBrush>())
    {
        m_foregroundColorPropertyChangedRevoker = RegisterPropertyChanged(foreground, winrt::SolidColorBrush::ColorProperty(), { this, &ProgressRing::OnForegroundColorPropertyChanged });
    }

    OnForegroundColorPropertyChanged(nullptr, nullptr);
}

void OnIndeterminateSourcePropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 59 of file ProgressRing.cpp.

{
    SetAnimatedVisualPlayerSource();
}

void OnIsActivePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 142 of file ProgressRing.cpp.

{
    UpdateStates();
}

void OnIsIndeterminatePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 147 of file ProgressRing.cpp.

{
    UpdateStates();
}

void OnLoaded | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 69 of file ProgressRing.cpp.

{
    UpdateStates();
}

void OnMaximumPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 172 of file ProgressRing.cpp.

{
    if (!m_rangeBasePropertyUpdating)
    {
        auto scopeGuard = gsl::finally([this]()
            {
                m_rangeBasePropertyUpdating = false;
            });
        m_rangeBasePropertyUpdating = true;

        CoerceMinimum();
        CoerceValue();

        if (!IsIndeterminate())
        {
            UpdateLottieProgress();
        }
    }
}

void OnMinimumPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 192 of file ProgressRing.cpp.

{
    if (!m_rangeBasePropertyUpdating)
    {
        auto scopeGuard = gsl::finally([this]()
            {
                m_rangeBasePropertyUpdating = false;
            });
        m_rangeBasePropertyUpdating = true;

        CoerceMaximum();
        CoerceValue();

        if (!IsIndeterminate())
        {
            UpdateLottieProgress();
        }
    }
}

void OnSizeChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 64 of file ProgressRing.cpp.

{
    ApplyTemplateSettings();
}

void OnValuePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 153 of file ProgressRing.cpp.

{
    if (!m_rangeBasePropertyUpdating)
    {
        auto scopeGuard = gsl::finally([this]()
            {
                m_rangeBasePropertyUpdating = false;
            });
        m_rangeBasePropertyUpdating = true;

        CoerceValue();

        if (!IsIndeterminate())
        {
            UpdateLottieProgress();
        }
    }
}

void SetAnimatedVisualPlayerSource ( ) [private]

Definition at line 212 of file ProgressRing.cpp.

{
    if (auto&& player = m_player.get())
    {
        if (IsIndeterminate())
        {
            // Check if custom indeterminate animation source is set.
            if (!IndeterminateSource())
            {
                // Set default indeterminate animation source.
                player.Source(winrt::make<AnimatedVisuals::ProgressRingIndeterminate>());

                if (const auto progressRingAnimation = player.Source())
                {
                    SetLottieForegroundColor(progressRingAnimation);
                    SetLottieBackgroundColor(progressRingAnimation);
                }
            }
            else
            {
                // Set custom indeterminate animation source.
                player.Source(IndeterminateSource());
            }
        }
        else
        {
            // Check if custom determinate animation source is set.
            if (!DeterminateSource())
            {
                // Set default determinate animation source.
                player.Source(winrt::make<AnimatedVisuals::ProgressRingDeterminate>());

                if (const auto progressRingAnimation = player.Source())
                {
                    SetLottieForegroundColor(progressRingAnimation);
                    SetLottieBackgroundColor(progressRingAnimation);
                }
            }
            else
            {
                // Set custom determinate animation source.
                player.Source(DeterminateSource());
            }
        }
    }
}

void SetLottieBackgroundColor ( const winrt::IAnimatedVisualSource animatedVisualSource ) [private]

Definition at line 282 of file ProgressRing.cpp.

{
    const auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

    const auto backgroundColor = [background = Background().try_as<winrt::SolidColorBrush>()]()
    {
        if (background)
        {
            return background.Color();
        }
        else
        {
             //Default color fallback if Background() Brush does not contain SolidColorBrush with Color property.
            return SharedHelpers::FindInApplicationResources(s_DefaultBackgroundThemeResourceName).as<winrt::SolidColorBrush>().Color();
        }
    }();

    if (const auto progressRingAnimation = animatedVisualSource.try_as<AnimatedVisuals::ProgressRingIndeterminate>())
    {
        progressRingAnimation->GetThemeProperties(compositor).InsertVector4(s_BackgroundName, SharedHelpers::RgbaColor(backgroundColor));
    }
}

void SetLottieForegroundColor ( const winrt::IAnimatedVisualSource animatedVisualSource ) [private]

Definition at line 259 of file ProgressRing.cpp.

{
    const auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

    const auto foregroundColor = [foreground = Foreground().try_as<winrt::SolidColorBrush>()]()
    {
        if (foreground)
        {
            return foreground.Color();
        }
        else
        {
            // Default color fallback if Foreground() Brush does not contain SolidColorBrush with Color property.
            return SharedHelpers::FindInApplicationResources(s_DefaultForegroundThemeResourceName).as<winrt::SolidColorBrush>().Color();
        }
    }();

    if (const auto progressRingAnimation = animatedVisualSource.try_as<AnimatedVisuals::ProgressRingIndeterminate>())
    {
        progressRingAnimation->GetThemeProperties(compositor).InsertVector4(s_ForegroundName, SharedHelpers::RgbaColor(foregroundColor));
    }
}

void UpdateLottieProgress ( ) [private]

Definition at line 305 of file ProgressRing.cpp.

{
    if (auto&& player = m_player.get())
    {
        const double value = Value();
        const double min = Minimum();
        const double range = Maximum() - min;
        const double fromProgress = (m_oldValue - min) / range;
        const double toProgress = (value - min) / range;
        if (fromProgress < toProgress)
        {
            const auto _ = player.PlayAsync(fromProgress, toProgress, false);
        }
        else
        {
            player.SetProgress(toProgress);
        }

        m_oldValue = value;
    }
}

void UpdateStates ( ) [private]

Definition at line 327 of file ProgressRing.cpp.

{
    if (IsActive())
    {
        if (IsIndeterminate())
        {
            winrt::VisualStateManager::GoToState(*this, s_ActiveStateName, true);

            // Swap player source to indeterminate.
            SetAnimatedVisualPlayerSource();

            if (auto&& player = m_player.get())
            {
                const auto _ = player.PlayAsync(0, 1, true);
            }
        }
        else
        {
            winrt::VisualStateManager::GoToState(*this, s_DeterminateActiveStateName, true);

            // Swap player source to determinate.
            SetAnimatedVisualPlayerSource();
            UpdateLottieProgress();
        }
        winrt::AutomationProperties::SetAccessibilityView(*this, winrt::AccessibilityView::Content);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, s_InactiveStateName, true);

        if (auto&& player = m_player.get())
        {
            player.Stop();
        }

        winrt::AutomationProperties::SetAccessibilityView(*this, winrt::AccessibilityView::Raw);
    }
}

The documentation for this class was generated from the following files:
  • ProgressRing/ProgressRing.h
  • ProgressRing/ProgressRing.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ProgressRingAutomationPeer Class Reference

#include "ProgressRingAutomationPeer.h"

Inherits ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT >.

List of all members.

Public Member Functions

ProgressRingAutomationPeer (winrt::ProgressRing const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
winrt::hstring | GetLocalizedControlTypeCore ()
winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | IsReadOnly ()
double | LargeChange ()
double | Maximum ()
double | Minimum ()
void | SetValue (double value)
double | SmallChange ()
double | Value ()

Private Member Functions

com_ptr< ProgressRing > | GetImpl ()

Detailed Description

Definition at line 9 of file ProgressRingAutomationPeer.h.

Constructor & Destructor Documentation

ProgressRingAutomationPeer ( winrt::ProgressRing const & owner )

Definition at line 13 of file ProgressRingAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 62 of file ProgressRingAutomationPeer.cpp.

{
    return winrt::AutomationControlType::ProgressBar;
}

winrt::hstring GetClassNameCore ( )

Definition at line 35 of file ProgressRingAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::ProgressRing>();
}

com_ptr< ProgressRing > GetImpl ( ) [private]

Definition at line 103 of file ProgressRingAutomationPeer.cpp.

{
    com_ptr<ProgressRing> impl = nullptr;

    if (auto numberBox = Owner().try_as<winrt::ProgressRing>())
    {
        impl = winrt::get_self<ProgressRing>(numberBox)->get_strong();
    }

    return impl;
}

winrt::hstring GetLocalizedControlTypeCore ( )

Definition at line 67 of file ProgressRingAutomationPeer.cpp.

{
    return ResourceAccessor::GetLocalizedStringResource(SR_ProgressRingName);
}

winrt::hstring GetNameCore ( )

Definition at line 40 of file ProgressRingAutomationPeer.cpp.

{
    //Check to see if the item has a defined AutomationProperties.Name
    winrt::hstring name = __super::GetNameCore();

    if (auto progressRing = Owner().try_as<winrt::ProgressRing>())
    {
        if (progressRing.IsActive())
        {
            if (progressRing.IsIndeterminate())
            {
                return winrt::hstring{ ResourceAccessor::GetLocalizedStringResource(SR_ProgressRingIndeterminateStatus) + L" " + name };
            }
            else
            {
                return name;
            }
        }
    }
    return name;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 18 of file ProgressRingAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::RangeValue)
    {
        if (GetImpl()->IsIndeterminate())
        {
            return nullptr;
        }
        else
        {
            return *this;
        }
    }

    return __super::GetPatternCore(patternInterface);
}

bool IsReadOnly ( ) [inline]

Definition at line 23 of file ProgressRingAutomationPeer.h.

{ return true; }

double LargeChange ( )

Definition at line 93 of file ProgressRingAutomationPeer.cpp.

{
    return std::numeric_limits<double>::quiet_NaN();
}

double Maximum ( )

Definition at line 78 of file ProgressRingAutomationPeer.cpp.

{
    return GetImpl()->Maximum();
}

double Minimum ( )

Definition at line 73 of file ProgressRingAutomationPeer.cpp.

{
    return GetImpl()->Minimum();
}

void SetValue ( double value )

Definition at line 98 of file ProgressRingAutomationPeer.cpp.

{
    GetImpl()->Value(value);
}

double SmallChange ( )

Definition at line 88 of file ProgressRingAutomationPeer.cpp.

{
    return std::numeric_limits<double>::quiet_NaN();
}

double Value ( )

Definition at line 83 of file ProgressRingAutomationPeer.cpp.

{
    return GetImpl()->Value();
}

The documentation for this class was generated from the following files:
  • ProgressRing/ProgressRingAutomationPeer.h
  • ProgressRing/ProgressRingAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ProgressRingProperties Class Reference

#include "ProgressRing.properties.h"

Inherited by ProgressRing.

List of all members.

Public Member Functions

ProgressRingProperties ()
void | DeterminateSource (winrt::IAnimatedVisualSource const &value)
winrt::IAnimatedVisualSource | DeterminateSource ()
void | IndeterminateSource (winrt::IAnimatedVisualSource const &value)
winrt::IAnimatedVisualSource | IndeterminateSource ()
void | IsActive (bool value)
bool | IsActive ()
void | IsIndeterminate (bool value)
bool | IsIndeterminate ()
double | Maximum ()
void | Maximum (double value)
double | Minimum ()
void | Minimum (double value)
void | TemplateSettings (winrt::ProgressRingTemplateSettings const &value)
winrt::ProgressRingTemplateSettings | TemplateSettings ()
void | Value (double value)
double | Value ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | DeterminateSourceProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IndeterminateSourceProperty ()
static winrt::DependencyProperty | IsActiveProperty ()
static winrt::DependencyProperty | IsIndeterminateProperty ()
static winrt::DependencyProperty | MaximumProperty ()
static winrt::DependencyProperty | MinimumProperty ()
static void | OnDeterminateSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIndeterminateSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsActivePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsIndeterminatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaximumPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinimumPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TemplateSettingsProperty ()
static winrt::DependencyProperty | ValueProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_DeterminateSourceProperty
static GlobalDependencyProperty | s_IndeterminateSourceProperty
static GlobalDependencyProperty | s_IsActiveProperty
static GlobalDependencyProperty | s_IsIndeterminateProperty
static GlobalDependencyProperty | s_MaximumProperty
static GlobalDependencyProperty | s_MinimumProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty
static GlobalDependencyProperty | s_ValueProperty

Detailed Description

Definition at line 7 of file ProgressRing.properties.h.

Constructor & Destructor Documentation

ProgressRingProperties ( )

Definition at line 25 of file ProgressRing.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 122 of file ProgressRing.properties.cpp.

{
    s_DeterminateSourceProperty = nullptr;
    s_IndeterminateSourceProperty = nullptr;
    s_IsActiveProperty = nullptr;
    s_IsIndeterminateProperty = nullptr;
    s_MaximumProperty = nullptr;
    s_MinimumProperty = nullptr;
    s_TemplateSettingsProperty = nullptr;
    s_ValueProperty = nullptr;
}

winrt::IAnimatedVisualSource DeterminateSource ( )

Definition at line 198 of file ProgressRing.properties.cpp.

{
    return ValueHelper<winrt::IAnimatedVisualSource>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_DeterminateSourceProperty));
}

void DeterminateSource ( winrt::IAnimatedVisualSource const & value )

Definition at line 190 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_DeterminateSourceProperty, ValueHelper<winrt::IAnimatedVisualSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty DeterminateSourceProperty ( ) [inline, static]

Definition at line 36 of file ProgressRing.properties.h.

{ return s_DeterminateSourceProperty; }

void EnsureProperties ( ) [static]

Definition at line 30 of file ProgressRing.properties.cpp.

{
    if (!s_DeterminateSourceProperty)
    {
        s_DeterminateSourceProperty =
            InitializeDependencyProperty(
                L"DeterminateSource",
                winrt::name_of<winrt::IAnimatedVisualSource>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<winrt::IAnimatedVisualSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnDeterminateSourcePropertyChanged));
    }
    if (!s_IndeterminateSourceProperty)
    {
        s_IndeterminateSourceProperty =
            InitializeDependencyProperty(
                L"IndeterminateSource",
                winrt::name_of<winrt::IAnimatedVisualSource>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<winrt::IAnimatedVisualSource>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIndeterminateSourcePropertyChanged));
    }
    if (!s_IsActiveProperty)
    {
        s_IsActiveProperty =
            InitializeDependencyProperty(
                L"IsActive",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsActivePropertyChanged));
    }
    if (!s_IsIndeterminateProperty)
    {
        s_IsIndeterminateProperty =
            InitializeDependencyProperty(
                L"IsIndeterminate",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsIndeterminatePropertyChanged));
    }
    if (!s_MaximumProperty)
    {
        s_MaximumProperty =
            InitializeDependencyProperty(
                L"Maximum",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(100.0),
                winrt::PropertyChangedCallback(&OnMaximumPropertyChanged));
    }
    if (!s_MinimumProperty)
    {
        s_MinimumProperty =
            InitializeDependencyProperty(
                L"Minimum",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnMinimumPropertyChanged));
    }
    if (!s_TemplateSettingsProperty)
    {
        s_TemplateSettingsProperty =
            InitializeDependencyProperty(
                L"TemplateSettings",
                winrt::name_of<winrt::ProgressRingTemplateSettings>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<winrt::ProgressRingTemplateSettings>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ValueProperty)
    {
        s_ValueProperty =
            InitializeDependencyProperty(
                L"Value",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressRing>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnValuePropertyChanged));
    }
}

winrt::IAnimatedVisualSource IndeterminateSource ( )

Definition at line 211 of file ProgressRing.properties.cpp.

{
    return ValueHelper<winrt::IAnimatedVisualSource>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_IndeterminateSourceProperty));
}

void IndeterminateSource ( winrt::IAnimatedVisualSource const & value )

Definition at line 203 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_IndeterminateSourceProperty, ValueHelper<winrt::IAnimatedVisualSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IndeterminateSourceProperty ( ) [inline, static]

Definition at line 37 of file ProgressRing.properties.h.

{ return s_IndeterminateSourceProperty; }

void IsActive ( bool value )

Definition at line 216 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_IsActiveProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsActive ( )

Definition at line 224 of file ProgressRing.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_IsActiveProperty));
}

static winrt::DependencyProperty IsActiveProperty ( ) [inline, static]

Definition at line 38 of file ProgressRing.properties.h.

{ return s_IsActiveProperty; }

bool IsIndeterminate ( )

Definition at line 237 of file ProgressRing.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_IsIndeterminateProperty));
}

void IsIndeterminate ( bool value )

Definition at line 229 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_IsIndeterminateProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsIndeterminateProperty ( ) [inline, static]

Definition at line 39 of file ProgressRing.properties.h.

{ return s_IsIndeterminateProperty; }

void Maximum ( double value )

Definition at line 242 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_MaximumProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double Maximum ( )

Definition at line 250 of file ProgressRing.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_MaximumProperty));
}

static winrt::DependencyProperty MaximumProperty ( ) [inline, static]

Definition at line 40 of file ProgressRing.properties.h.

{ return s_MaximumProperty; }

void Minimum ( double value )

Definition at line 255 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_MinimumProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double Minimum ( )

Definition at line 263 of file ProgressRing.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_MinimumProperty));
}

static winrt::DependencyProperty MinimumProperty ( ) [inline, static]

Definition at line 41 of file ProgressRing.properties.h.

{ return s_MinimumProperty; }

void OnDeterminateSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 134 of file ProgressRing.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressRing>();
    winrt::get_self<ProgressRing>(owner)->OnDeterminateSourcePropertyChanged(args);
}

void OnIndeterminateSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 142 of file ProgressRing.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressRing>();
    winrt::get_self<ProgressRing>(owner)->OnIndeterminateSourcePropertyChanged(args);
}

void OnIsActivePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 150 of file ProgressRing.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressRing>();
    winrt::get_self<ProgressRing>(owner)->OnIsActivePropertyChanged(args);
}

void OnIsIndeterminatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 158 of file ProgressRing.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressRing>();
    winrt::get_self<ProgressRing>(owner)->OnIsIndeterminatePropertyChanged(args);
}

void OnMaximumPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 166 of file ProgressRing.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressRing>();
    winrt::get_self<ProgressRing>(owner)->OnMaximumPropertyChanged(args);
}

void OnMinimumPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 174 of file ProgressRing.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressRing>();
    winrt::get_self<ProgressRing>(owner)->OnMinimumPropertyChanged(args);
}

void OnValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 182 of file ProgressRing.properties.cpp.

{
    auto owner = sender.as<winrt::ProgressRing>();
    winrt::get_self<ProgressRing>(owner)->OnValuePropertyChanged(args);
}

winrt::ProgressRingTemplateSettings TemplateSettings ( )

Definition at line 276 of file ProgressRing.properties.cpp.

{
    return ValueHelper<winrt::ProgressRingTemplateSettings>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_TemplateSettingsProperty));
}

void TemplateSettings ( winrt::ProgressRingTemplateSettings const & value )

Definition at line 268 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::ProgressRingTemplateSettings>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 42 of file ProgressRing.properties.h.

{ return s_TemplateSettingsProperty; }

double Value ( )

Definition at line 289 of file ProgressRing.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_ValueProperty));
}

void Value ( double value )

Definition at line 281 of file ProgressRing.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRing*>(this)->SetValue(s_ValueProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ValueProperty ( ) [inline, static]

Definition at line 43 of file ProgressRing.properties.h.

{ return s_ValueProperty; }

Member Data Documentation

GlobalDependencyProperty s_DeterminateSourceProperty [static]

Definition at line 45 of file ProgressRing.properties.h.

GlobalDependencyProperty s_IndeterminateSourceProperty [static]

Definition at line 46 of file ProgressRing.properties.h.

GlobalDependencyProperty s_IsActiveProperty [static]

Definition at line 47 of file ProgressRing.properties.h.

GlobalDependencyProperty s_IsIndeterminateProperty [static]

Definition at line 48 of file ProgressRing.properties.h.

GlobalDependencyProperty s_MaximumProperty [static]

Definition at line 49 of file ProgressRing.properties.h.

GlobalDependencyProperty s_MinimumProperty [static]

Definition at line 50 of file ProgressRing.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 51 of file ProgressRing.properties.h.

GlobalDependencyProperty s_ValueProperty [static]

Definition at line 52 of file ProgressRing.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ProgressRing.properties.h
  • Generated/ProgressRing.properties.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ProgressRingTemplateSettings Class Reference

#include "ProgressRingTemplateSettings.h"

Inherits ProgressRingTemplateSettingsProperties.

List of all members.

Public Member Functions

ProgressRingTemplateSettings ()

Detailed Description

Definition at line 9 of file ProgressRingTemplateSettings.h.

Constructor & Destructor Documentation

ProgressRingTemplateSettings ( )

Definition at line 8 of file ProgressRingTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • ProgressRing/ProgressRingTemplateSettings.h
  • ProgressRing/ProgressRingTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

ProgressRingTemplateSettingsProperties Class Reference

#include "ProgressRingTemplateSettings.properties.h"

Inherited by ProgressRingTemplateSettings.

List of all members.

Public Member Functions

ProgressRingTemplateSettingsProperties ()
void | EllipseDiameter (double value)
double | EllipseDiameter ()
winrt::Thickness | EllipseOffset ()
void | EllipseOffset (winrt::Thickness const &value)
void | MaxSideLength (double value)
double | MaxSideLength ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | EllipseDiameterProperty ()
static winrt::DependencyProperty | EllipseOffsetProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MaxSideLengthProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_EllipseDiameterProperty
static GlobalDependencyProperty | s_EllipseOffsetProperty
static GlobalDependencyProperty | s_MaxSideLengthProperty

Detailed Description

Definition at line 7 of file ProgressRingTemplateSettings.properties.h.

Constructor & Destructor Documentation

ProgressRingTemplateSettingsProperties ( )

Definition at line 13 of file ProgressRingTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 55 of file ProgressRingTemplateSettings.properties.cpp.

{
    s_EllipseDiameterProperty = nullptr;
    s_EllipseOffsetProperty = nullptr;
    s_MaxSideLengthProperty = nullptr;
}

void EllipseDiameter ( double value )

Definition at line 62 of file ProgressRingTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRingTemplateSettings*>(this)->SetValue(s_EllipseDiameterProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double EllipseDiameter ( )

Definition at line 70 of file ProgressRingTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRingTemplateSettings*>(this)->GetValue(s_EllipseDiameterProperty));
}

static winrt::DependencyProperty EllipseDiameterProperty ( ) [inline, static]

Definition at line 21 of file ProgressRingTemplateSettings.properties.h.

{ return s_EllipseDiameterProperty; }

winrt::Thickness EllipseOffset ( )

Definition at line 83 of file ProgressRingTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<ProgressRingTemplateSettings*>(this)->GetValue(s_EllipseOffsetProperty));
}

void EllipseOffset ( winrt::Thickness const & value )

Definition at line 75 of file ProgressRingTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRingTemplateSettings*>(this)->SetValue(s_EllipseOffsetProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty EllipseOffsetProperty ( ) [inline, static]

Definition at line 22 of file ProgressRingTemplateSettings.properties.h.

{ return s_EllipseOffsetProperty; }

void EnsureProperties ( ) [static]

Definition at line 18 of file ProgressRingTemplateSettings.properties.cpp.

{
    if (!s_EllipseDiameterProperty)
    {
        s_EllipseDiameterProperty =
            InitializeDependencyProperty(
                L"EllipseDiameter",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressRingTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_EllipseOffsetProperty)
    {
        s_EllipseOffsetProperty =
            InitializeDependencyProperty(
                L"EllipseOffset",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::ProgressRingTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_MaxSideLengthProperty)
    {
        s_MaxSideLengthProperty =
            InitializeDependencyProperty(
                L"MaxSideLength",
                winrt::name_of<double>(),
                winrt::name_of<winrt::ProgressRingTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<double>::BoxedDefaultValue(),
                nullptr);
    }
}

void MaxSideLength ( double value )

Definition at line 88 of file ProgressRingTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<ProgressRingTemplateSettings*>(this)->SetValue(s_MaxSideLengthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double MaxSideLength ( )

Definition at line 96 of file ProgressRingTemplateSettings.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRingTemplateSettings*>(this)->GetValue(s_MaxSideLengthProperty));
}

static winrt::DependencyProperty MaxSideLengthProperty ( ) [inline, static]

Definition at line 23 of file ProgressRingTemplateSettings.properties.h.

{ return s_MaxSideLengthProperty; }

Member Data Documentation

GlobalDependencyProperty s_EllipseDiameterProperty [static]

Definition at line 25 of file ProgressRingTemplateSettings.properties.h.

GlobalDependencyProperty s_EllipseOffsetProperty [static]

Definition at line 26 of file ProgressRingTemplateSettings.properties.h.

GlobalDependencyProperty s_MaxSideLengthProperty [static]

Definition at line 27 of file ProgressRingTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ProgressRingTemplateSettings.properties.h
  • Generated/ProgressRingTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PropertyChanged_revoker Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

PropertyChanged_revoker Struct Reference

#include "CppWinRTHelpers.h"

List of all members.

Public Member Functions

PropertyChanged_revoker () noexcept
PropertyChanged_revoker (PropertyChanged_revoker const &)
PropertyChanged_revoker (PropertyChanged_revoker &&other) noexcept
PropertyChanged_revoker (winrt::DependencyObject const &object, const winrt::DependencyProperty &dp, int64_t token)
~PropertyChanged_revoker () noexcept
operator bool () const noexcept
PropertyChanged_revoker & | operator= (PropertyChanged_revoker &&other) noexcept
PropertyChanged_revoker & | operator= (PropertyChanged_revoker const &)
void | revoke () noexcept

Private Member Functions

void | move_from (PropertyChanged_revoker &other)

Private Attributes

weak_ref< winrt::DependencyObject > | m_object

Detailed Description

Definition at line 276 of file CppWinRTHelpers.h.

Constructor & Destructor Documentation

PropertyChanged_revoker ( )
PropertyChanged_revoker ( PropertyChanged_revoker const & )
PropertyChanged_revoker ( PropertyChanged_revoker && other ) [inline]

Definition at line 281 of file CppWinRTHelpers.h.

   {
       move_from(other);
   }

PropertyChanged_revoker | ( | winrt::DependencyObject const & | object,
 |  | const winrt::DependencyProperty & | dp,
 |  | int64_t | token |
 | ) |  |  | [inline]

Definition at line 292 of file CppWinRTHelpers.h.

                                                                                :
        m_object(object),
        m_property(dp),
        m_token(token)
    {}

~PropertyChanged_revoker ( ) [inline]

Definition at line 298 of file CppWinRTHelpers.h.

    {
        revoke();
    }

Member Function Documentation

void move_from ( PropertyChanged_revoker & other ) [inline, private]

Definition at line 323 of file CppWinRTHelpers.h.

    {
        if (this != &other)
        {
            revoke();
            m_object = other.m_object;
            m_token = other.m_token;
            m_property = other.m_property;
            other.m_object = nullptr;
            other.m_token = 0;
            other.m_property = nullptr;
        }
    }

operator bool ( ) const [inline, explicit]

Definition at line 318 of file CppWinRTHelpers.h.

    {
        return static_cast<bool>(m_object);
    }

PropertyChanged_revoker& operator= ( PropertyChanged_revoker && other ) [inline]

Definition at line 286 of file CppWinRTHelpers.h.

   {
       move_from(other);
       return *this;
   }

PropertyChanged_revoker& operator= ( PropertyChanged_revoker const & )
void revoke ( ) [inline]

Definition at line 303 of file CppWinRTHelpers.h.

    {
        if (!m_object)
        {
            return;
        }

        if (auto object = m_object.get())
        {
            object.UnregisterPropertyChangedCallback(m_property, m_token);
        }

        m_object = nullptr;
    }

Member Data Documentation

weak_ref<winrt::DependencyObject> m_object [private]

Definition at line 337 of file CppWinRTHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefreshPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PTR_TestUI
  • PullToRefreshPage
Public Member Functions

PullToRefreshPage Class Reference

An empty page that can be used on its own or navigated to within a Frame.

List of all members.

Public Member Functions

PullToRefreshPage ()

Detailed Description

Definition at line 26 of file PullToRefreshPage.xaml.cs.

Constructor & Destructor Documentation

PullToRefreshPage ( ) [inline]

Definition at line 28 of file PullToRefreshPage.xaml.cs.

        {
            this.InitializeComponent();
        }

The documentation for this class was generated from the following file:
  • PullToRefresh/TestUI/PullToRefreshPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PTRTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

PTRTrace Class Reference

#include "PTRTracing.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 72 of file PTRTracing.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 78 of file PTRTracing.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "PTRInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_PTR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"PTR") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 150 of file PTRTracing.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "PTRPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_PTR),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 114 of file PTRTracing.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if SUCCEEDED((StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "PTRVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_PTR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"PTR") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 75 of file PTRTracing.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 76 of file PTRTracing.h.

The documentation for this class was generated from the following file:
  • PullToRefresh/PTRTracing/PTRTracing.h
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefreshHelperTestApi Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

PullToRefreshHelperTestApi Class Reference

#include "PullToRefreshHelperTestApi.h"

List of all members.

Static Public Member Functions

static
winrt::RefreshInteractionRatioChangedEventArgs 		CreateRefreshInteractionRatioChangedEventArgsInstance (double value)
static
winrt::RefreshRequestedEventArgs 		CreateRefreshRequestedEventArgsInstance (winrt::Deferral const &handler)
static
winrt::RefreshStateChangedEventArgs 		CreateRefreshStateChangedEventArgsInstance (winrt::RefreshVisualizerState const &oldValue, winrt::RefreshVisualizerState const &newValue)

Detailed Description

Definition at line 8 of file PullToRefreshHelperTestApi.h.

Member Function Documentation

winrt::RefreshInteractionRatioChangedEventArgs CreateRefreshInteractionRatioChangedEventArgsInstance ( double value ) [static]

Definition at line 13 of file PullToRefreshHelperTestApiFactory.cpp.

{
    return winrt::make<RefreshInteractionRatioChangedEventArgs>(value);
}

winrt::RefreshRequestedEventArgs CreateRefreshRequestedEventArgsInstance ( winrt::Deferral const & handler ) [static]

Definition at line 23 of file PullToRefreshHelperTestApiFactory.cpp.

{
    return winrt::make<RefreshRequestedEventArgs>(handler);
}

winrt::RefreshStateChangedEventArgs CreateRefreshStateChangedEventArgsInstance | ( | winrt::RefreshVisualizerState const & | oldValue,
 |  | winrt::RefreshVisualizerState const & | newValue |
 | ) |  |  | [static]

Definition at line 18 of file PullToRefreshHelperTestApiFactory.cpp.

{
    return winrt::make<RefreshStateChangedEventArgs>(oldValue, newValue);
}

The documentation for this class was generated from the following files:
  • PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApi.h
  • PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApiFactory.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

RadialGradientBrush Class Reference

#include "RadialGradientBrush.h"

Inherits ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT >, and RadialGradientBrushProperties.

List of all members.

Public Member Functions

RadialGradientBrush ()
~RadialGradientBrush ()
winrt::IObservableVector
< winrt::GradientStop > 		GradientStops ()
void | OnCenterPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnConnected ()
void | OnDisconnected ()
void | OnGradientOriginPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnInterpolationSpacePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMappingModePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnRadiusXPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnRadiusYPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSpreadMethodPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | EnsureCompositionBrush ()
void | OnFallbackColorChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnGradientStopsVectorChanged (winrt::Collections::IObservableVector< winrt::GradientStop > const &sender, winrt::Collections::IVectorChangedEventArgs const &e)
void | UpdateCompositionExtendMode ()
void | UpdateCompositionGradientCenter ()
void | UpdateCompositionGradientMappingMode ()
void | UpdateCompositionGradientOrigin ()
void | UpdateCompositionGradientRadius ()
void | UpdateCompositionGradientStops ()
void | UpdateCompositionInterpolationSpace ()
void | UpdateFallbackBrush ()

Detailed Description

Definition at line 11 of file RadialGradientBrush.h.

Constructor & Destructor Documentation

RadialGradientBrush ( )

Definition at line 12 of file RadialGradientBrush.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_RadialGradientBrush);

    m_gradientStops = winrt::make<Vector<winrt::GradientStop>>().as<winrt::IObservableVector<winrt::GradientStop>>();
}

~RadialGradientBrush ( ) [inline]

Definition at line 18 of file RadialGradientBrush.h.

{};

Member Function Documentation

void EnsureCompositionBrush ( ) [private]

Definition at line 104 of file RadialGradientBrush.cpp.

{
    if (m_isConnected && !m_brush)
    {
        const auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

        // If CompositionRadialGradientBrush is available then use it to render a gradient.
        m_brush = compositor.CreateRadialGradientBrush();

        UpdateCompositionGradientCenter();
        UpdateCompositionGradientRadius();
        UpdateCompositionGradientOrigin();
        UpdateCompositionGradientStops();
        UpdateCompositionGradientMappingMode();
        UpdateCompositionInterpolationSpace();
        UpdateCompositionExtendMode();

        CompositionBrush(m_brush);
    }
}

winrt::IObservableVector< winrt::GradientStop > GradientStops ( )

Definition at line 19 of file RadialGradientBrush.cpp.

{
    return m_gradientStops;
}

void OnCenterPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 59 of file RadialGradientBrush.cpp.

{
    UpdateCompositionGradientCenter();
}

void OnConnected ( )

Definition at line 24 of file RadialGradientBrush.cpp.

{
    // XCBB will use fallback rendering in design v1 mode, so do not create a CompositionBrush.
    if (SharedHelpers::IsInDesignMode()) { return; }

    m_isConnected = true;

    EnsureCompositionBrush();

    // If CompositionRadialGradientBrush will be used then listen for changes to gradient stops so the CompositionRadialGradientBrush can be updated.
    m_gradientStopsVectorChangedRevoker = m_gradientStops.VectorChanged(winrt::auto_revoke, { this, &RadialGradientBrush::OnGradientStopsVectorChanged });
}

void OnDisconnected ( )

Definition at line 37 of file RadialGradientBrush.cpp.

{
    m_isConnected = false;

    if (m_brush)
    {
        m_brush.Close();
        m_brush = nullptr;
        CompositionBrush(nullptr);
    }

    if (m_gradientStopsVectorChangedRevoker)
    {
        m_gradientStopsVectorChangedRevoker.revoke();
    }

    if (m_fallbackColorChangedRevoker)
    {
        m_fallbackColorChangedRevoker.revoke();
    }
}

void OnFallbackColorChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 94 of file RadialGradientBrush.cpp.

{
    UpdateFallbackBrush();
}

void OnGradientOriginPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 74 of file RadialGradientBrush.cpp.

{
    UpdateCompositionGradientOrigin();
}

void OnGradientStopsVectorChanged | ( | winrt::Collections::IObservableVector< winrt::GradientStop > const & | sender,
 |  | winrt::Collections::IVectorChangedEventArgs const & | e |
 | ) |  |  | [private]

Definition at line 99 of file RadialGradientBrush.cpp.

{
    UpdateCompositionGradientStops();
}

void OnInterpolationSpacePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 84 of file RadialGradientBrush.cpp.

{
    UpdateCompositionInterpolationSpace();
}

void OnMappingModePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 79 of file RadialGradientBrush.cpp.

{
    UpdateCompositionGradientMappingMode();
}

void OnRadiusXPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 64 of file RadialGradientBrush.cpp.

{
    UpdateCompositionGradientRadius();
}

void OnRadiusYPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 69 of file RadialGradientBrush.cpp.

{
    UpdateCompositionGradientRadius();
}

void OnSpreadMethodPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 89 of file RadialGradientBrush.cpp.

{
    UpdateCompositionExtendMode();
}

void UpdateCompositionExtendMode ( ) [private]

Definition at line 211 of file RadialGradientBrush.cpp.

{
    if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
    {
        switch (SpreadMethod())
        {
        case winrt::GradientSpreadMethod::Repeat:
            compositionGradientBrush.ExtendMode(winrt::Microsoft::UI::Composition::CompositionGradientExtendMode::Wrap);
            break;
        case winrt::GradientSpreadMethod::Reflect:
            compositionGradientBrush.ExtendMode(winrt::Microsoft::UI::Composition::CompositionGradientExtendMode::Mirror);
            break;
        case winrt::GradientSpreadMethod::Pad:
            [[fallthrough]];
        default: // Use Pad as the default if the mode isn't recognized.
            compositionGradientBrush.ExtendMode(winrt::Microsoft::UI::Composition::CompositionGradientExtendMode::Clamp);
            break;
        }
    }
}

void UpdateCompositionGradientCenter ( ) [private]

Definition at line 125 of file RadialGradientBrush.cpp.

{
    if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
    {
        const auto center = Center();
        compositionGradientBrush.EllipseCenter(winrt::float2(center.X, center.Y));

        // Changing the center affects the origin in the comp brush because we are translating from
        // Origin to offset.
        UpdateCompositionGradientOrigin();
    }
}

void UpdateCompositionGradientMappingMode ( ) [private]

Definition at line 146 of file RadialGradientBrush.cpp.

{
    if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
    {
        switch (MappingMode())
        {
        case winrt::BrushMappingMode::Absolute:
            compositionGradientBrush.MappingMode(winrt::Microsoft::UI::Composition::CompositionMappingMode::Absolute);
            break;
        case winrt::BrushMappingMode::RelativeToBoundingBox:
            [[fallthrough]];
        default: // Use Relative as the default if the mode isn't recognized.
            compositionGradientBrush.MappingMode(winrt::Microsoft::UI::Composition::CompositionMappingMode::Relative);
            break;
        }
    }
}

void UpdateCompositionGradientOrigin ( ) [private]

Definition at line 164 of file RadialGradientBrush.cpp.

{
    if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
    {
        const auto gradientOrigin = GradientOrigin();
        const auto center = Center();
        // Comp uses offset, WinUI will follow WPF and use bounds relative to the element in all mapping modes.
        // If ElementWidth=100 ElementHeight=100
        // Relative mode
        //     TopLeft of element = 0,0
        //     Center of element = .5,.5
        //     BottomRight of element = 1,1
        // Absolute mode
        //     TopLeft of element = 0,0
        //     Center of element = 50,50
        //     BottomRight of element = 100,100
        compositionGradientBrush.GradientOriginOffset(winrt::float2(gradientOrigin.X - center.X, gradientOrigin.Y - center.Y));
    }
}

void UpdateCompositionGradientRadius ( ) [private]

Definition at line 138 of file RadialGradientBrush.cpp.

{
    if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
    {
        compositionGradientBrush.EllipseRadius(winrt::float2(static_cast<float>(RadiusX()), static_cast<float>(RadiusY())));
    }
}

void UpdateCompositionGradientStops ( ) [private]

Definition at line 184 of file RadialGradientBrush.cpp.

{
    if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
    {
        const auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

        compositionGradientBrush.ColorStops().Clear();

        for (const auto& gradientStop : m_gradientStops)
        {
            const auto compositionStop = compositor.CreateColorGradientStop();
            compositionStop.Color(gradientStop.Color());
            compositionStop.Offset(static_cast<float>(gradientStop.Offset()));

            compositionGradientBrush.ColorStops().Append(compositionStop);
        }
    }
}

void UpdateCompositionInterpolationSpace ( ) [private]

Definition at line 203 of file RadialGradientBrush.cpp.

{
    if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
    {
        compositionGradientBrush.InterpolationSpace(InterpolationSpace());
    }
}

void UpdateFallbackBrush ( ) [private]

Definition at line 232 of file RadialGradientBrush.cpp.

{
    if (const auto compositionColorBrush = m_brush.try_as<winrt::CompositionColorBrush>())
    {
        compositionColorBrush.Color(FallbackColor());
    }
}

The documentation for this class was generated from the following files:
  • RadialGradientBrush/RadialGradientBrush.h
  • RadialGradientBrush/RadialGradientBrush.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrushProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

RadialGradientBrushProperties Class Reference

#include "RadialGradientBrush.properties.h"

Inherited by RadialGradientBrush.

List of all members.

Public Member Functions

RadialGradientBrushProperties ()
void | Center (winrt::Point const &value)
winrt::Point | Center ()
void | GradientOrigin (winrt::Point const &value)
winrt::Point | GradientOrigin ()
void | InterpolationSpace (winrt::CompositionColorSpace const &value)
winrt::CompositionColorSpace | InterpolationSpace ()
void | MappingMode (winrt::BrushMappingMode const &value)
winrt::BrushMappingMode | MappingMode ()
void | RadiusX (double value)
double | RadiusX ()
double | RadiusY ()
void | RadiusY (double value)
void | SpreadMethod (winrt::GradientSpreadMethod const &value)
winrt::GradientSpreadMethod | SpreadMethod ()

Static Public Member Functions

static winrt::DependencyProperty | CenterProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | GradientOriginProperty ()
static winrt::DependencyProperty | InterpolationSpaceProperty ()
static winrt::DependencyProperty | MappingModeProperty ()
static void | OnCenterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnGradientOriginPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnInterpolationSpacePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMappingModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnRadiusXPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnRadiusYPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSpreadMethodPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | RadiusXProperty ()
static winrt::DependencyProperty | RadiusYProperty ()
static winrt::DependencyProperty | SpreadMethodProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_CenterProperty
static GlobalDependencyProperty | s_GradientOriginProperty
static GlobalDependencyProperty | s_InterpolationSpaceProperty
static GlobalDependencyProperty | s_MappingModeProperty
static GlobalDependencyProperty | s_RadiusXProperty
static GlobalDependencyProperty | s_RadiusYProperty
static GlobalDependencyProperty | s_SpreadMethodProperty

Detailed Description

Definition at line 7 of file RadialGradientBrush.properties.h.

Constructor & Destructor Documentation

RadialGradientBrushProperties ( )

Definition at line 24 of file RadialGradientBrush.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void Center ( winrt::Point const & value )

Definition at line 177 of file RadialGradientBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadialGradientBrush*>(this)->SetValue(s_CenterProperty, ValueHelper<winrt::Point>::BoxValueIfNecessary(value));
    }
}

winrt::Point Center ( )

Definition at line 185 of file RadialGradientBrush.properties.cpp.

{
    return ValueHelper<winrt::Point>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_CenterProperty));
}

static winrt::DependencyProperty CenterProperty ( ) [inline, static]

Definition at line 33 of file RadialGradientBrush.properties.h.

{ return s_CenterProperty; }

void ClearProperties ( ) [static]

Definition at line 110 of file RadialGradientBrush.properties.cpp.

{
    s_CenterProperty = nullptr;
    s_GradientOriginProperty = nullptr;
    s_InterpolationSpaceProperty = nullptr;
    s_MappingModeProperty = nullptr;
    s_RadiusXProperty = nullptr;
    s_RadiusYProperty = nullptr;
    s_SpreadMethodProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 29 of file RadialGradientBrush.properties.cpp.

{
    if (!s_CenterProperty)
    {
        s_CenterProperty =
            InitializeDependencyProperty(
                L"Center",
                winrt::name_of<winrt::Point>(),
                winrt::name_of<winrt::RadialGradientBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::Point>::BoxValueIfNecessary(winrt::Point(0.5,0.5)),
                winrt::PropertyChangedCallback(&OnCenterPropertyChanged));
    }
    if (!s_GradientOriginProperty)
    {
        s_GradientOriginProperty =
            InitializeDependencyProperty(
                L"GradientOrigin",
                winrt::name_of<winrt::Point>(),
                winrt::name_of<winrt::RadialGradientBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::Point>::BoxValueIfNecessary(winrt::Point(0.5,0.5)),
                winrt::PropertyChangedCallback(&OnGradientOriginPropertyChanged));
    }
    if (!s_InterpolationSpaceProperty)
    {
        s_InterpolationSpaceProperty =
            InitializeDependencyProperty(
                L"InterpolationSpace",
                winrt::name_of<winrt::CompositionColorSpace>(),
                winrt::name_of<winrt::RadialGradientBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::CompositionColorSpace>::BoxValueIfNecessary(winrt::Microsoft::UI::Composition::CompositionColorSpace::Auto),
                winrt::PropertyChangedCallback(&OnInterpolationSpacePropertyChanged));
    }
    if (!s_MappingModeProperty)
    {
        s_MappingModeProperty =
            InitializeDependencyProperty(
                L"MappingMode",
                winrt::name_of<winrt::BrushMappingMode>(),
                winrt::name_of<winrt::RadialGradientBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::BrushMappingMode>::BoxValueIfNecessary(winrt::BrushMappingMode::RelativeToBoundingBox),
                winrt::PropertyChangedCallback(&OnMappingModePropertyChanged));
    }
    if (!s_RadiusXProperty)
    {
        s_RadiusXProperty =
            InitializeDependencyProperty(
                L"RadiusX",
                winrt::name_of<double>(),
                winrt::name_of<winrt::RadialGradientBrush>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.5),
                winrt::PropertyChangedCallback(&OnRadiusXPropertyChanged));
    }
    if (!s_RadiusYProperty)
    {
        s_RadiusYProperty =
            InitializeDependencyProperty(
                L"RadiusY",
                winrt::name_of<double>(),
                winrt::name_of<winrt::RadialGradientBrush>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.5),
                winrt::PropertyChangedCallback(&OnRadiusYPropertyChanged));
    }
    if (!s_SpreadMethodProperty)
    {
        s_SpreadMethodProperty =
            InitializeDependencyProperty(
                L"SpreadMethod",
                winrt::name_of<winrt::GradientSpreadMethod>(),
                winrt::name_of<winrt::RadialGradientBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::GradientSpreadMethod>::BoxValueIfNecessary(winrt::GradientSpreadMethod::Pad),
                winrt::PropertyChangedCallback(&OnSpreadMethodPropertyChanged));
    }
}

winrt::Point GradientOrigin ( )

Definition at line 198 of file RadialGradientBrush.properties.cpp.

{
    return ValueHelper<winrt::Point>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_GradientOriginProperty));
}

void GradientOrigin ( winrt::Point const & value )

Definition at line 190 of file RadialGradientBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadialGradientBrush*>(this)->SetValue(s_GradientOriginProperty, ValueHelper<winrt::Point>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty GradientOriginProperty ( ) [inline, static]

Definition at line 34 of file RadialGradientBrush.properties.h.

{ return s_GradientOriginProperty; }

void InterpolationSpace ( winrt::CompositionColorSpace const & value )

Definition at line 203 of file RadialGradientBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadialGradientBrush*>(this)->SetValue(s_InterpolationSpaceProperty, ValueHelper<winrt::CompositionColorSpace>::BoxValueIfNecessary(value));
    }
}

winrt::CompositionColorSpace InterpolationSpace ( )

Definition at line 211 of file RadialGradientBrush.properties.cpp.

{
    return ValueHelper<winrt::CompositionColorSpace>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_InterpolationSpaceProperty));
}

static winrt::DependencyProperty InterpolationSpaceProperty ( ) [inline, static]

Definition at line 35 of file RadialGradientBrush.properties.h.

{ return s_InterpolationSpaceProperty; }

winrt::BrushMappingMode MappingMode ( )

Definition at line 224 of file RadialGradientBrush.properties.cpp.

{
    return ValueHelper<winrt::BrushMappingMode>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_MappingModeProperty));
}

void MappingMode ( winrt::BrushMappingMode const & value )

Definition at line 216 of file RadialGradientBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadialGradientBrush*>(this)->SetValue(s_MappingModeProperty, ValueHelper<winrt::BrushMappingMode>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MappingModeProperty ( ) [inline, static]

Definition at line 36 of file RadialGradientBrush.properties.h.

{ return s_MappingModeProperty; }

void OnCenterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 121 of file RadialGradientBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RadialGradientBrush>();
    winrt::get_self<RadialGradientBrush>(owner)->OnCenterPropertyChanged(args);
}

void OnGradientOriginPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 129 of file RadialGradientBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RadialGradientBrush>();
    winrt::get_self<RadialGradientBrush>(owner)->OnGradientOriginPropertyChanged(args);
}

void OnInterpolationSpacePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 137 of file RadialGradientBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RadialGradientBrush>();
    winrt::get_self<RadialGradientBrush>(owner)->OnInterpolationSpacePropertyChanged(args);
}

void OnMappingModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 145 of file RadialGradientBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RadialGradientBrush>();
    winrt::get_self<RadialGradientBrush>(owner)->OnMappingModePropertyChanged(args);
}

void OnRadiusXPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 153 of file RadialGradientBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RadialGradientBrush>();
    winrt::get_self<RadialGradientBrush>(owner)->OnRadiusXPropertyChanged(args);
}

void OnRadiusYPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 161 of file RadialGradientBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RadialGradientBrush>();
    winrt::get_self<RadialGradientBrush>(owner)->OnRadiusYPropertyChanged(args);
}

void OnSpreadMethodPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 169 of file RadialGradientBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RadialGradientBrush>();
    winrt::get_self<RadialGradientBrush>(owner)->OnSpreadMethodPropertyChanged(args);
}

void RadiusX ( double value )

Definition at line 229 of file RadialGradientBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadialGradientBrush*>(this)->SetValue(s_RadiusXProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double RadiusX ( )

Definition at line 237 of file RadialGradientBrush.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_RadiusXProperty));
}

static winrt::DependencyProperty RadiusXProperty ( ) [inline, static]

Definition at line 37 of file RadialGradientBrush.properties.h.

{ return s_RadiusXProperty; }

double RadiusY ( )

Definition at line 250 of file RadialGradientBrush.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_RadiusYProperty));
}

void RadiusY ( double value )

Definition at line 242 of file RadialGradientBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadialGradientBrush*>(this)->SetValue(s_RadiusYProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty RadiusYProperty ( ) [inline, static]

Definition at line 38 of file RadialGradientBrush.properties.h.

{ return s_RadiusYProperty; }

winrt::GradientSpreadMethod SpreadMethod ( )

Definition at line 263 of file RadialGradientBrush.properties.cpp.

{
    return ValueHelper<winrt::GradientSpreadMethod>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_SpreadMethodProperty));
}

void SpreadMethod ( winrt::GradientSpreadMethod const & value )

Definition at line 255 of file RadialGradientBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadialGradientBrush*>(this)->SetValue(s_SpreadMethodProperty, ValueHelper<winrt::GradientSpreadMethod>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty SpreadMethodProperty ( ) [inline, static]

Definition at line 39 of file RadialGradientBrush.properties.h.

{ return s_SpreadMethodProperty; }

Member Data Documentation

GlobalDependencyProperty s_CenterProperty [static]

Definition at line 41 of file RadialGradientBrush.properties.h.

GlobalDependencyProperty s_GradientOriginProperty [static]

Definition at line 42 of file RadialGradientBrush.properties.h.

GlobalDependencyProperty s_InterpolationSpaceProperty [static]

Definition at line 43 of file RadialGradientBrush.properties.h.

GlobalDependencyProperty s_MappingModeProperty [static]

Definition at line 44 of file RadialGradientBrush.properties.h.

GlobalDependencyProperty s_RadiusXProperty [static]

Definition at line 45 of file RadialGradientBrush.properties.h.

GlobalDependencyProperty s_RadiusYProperty [static]

Definition at line 46 of file RadialGradientBrush.properties.h.

GlobalDependencyProperty s_SpreadMethodProperty [static]

Definition at line 47 of file RadialGradientBrush.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RadialGradientBrush.properties.h
  • Generated/RadialGradientBrush.properties.cpp
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

RadioButtons Class Reference

#include "RadioButtons.h"

Inherits ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT >, and RadioButtonsProperties.

List of all members.

Public Member Functions

RadioButtons ()
~RadioButtons ()
winrt::UIElement | ContainerFromIndex (int index)
int | GetColumns ()
int | GetLargerColumns ()
int | GetRows ()
void | OnApplyTemplate ()
virtual winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | SetTestHooksEnabled (bool enabled)

Private Member Functions

void | AttachToLayoutChanged ()
void | DetatchFromLayoutChanged ()
winrt::IInspectable | GetDataAtIndex (int index, bool containerIsChecked)
winrt::FindNextElementOptions | GetFindNextElementOptions (bool useThisAsSearchRoot)
winrt::IInspectable | GetItemsSource ()
com_ptr
< ColumnMajorUniformToLargestGridLayout > 		GetLayout ()
bool | HandleEdgeCaseFocus (bool first, const winrt::IInspectable &source)
bool | MoveFocus (int initialIndexIncrement)
bool | MoveFocusNext ()
bool | MoveFocusPrevious ()
void | OnAccessKeyInvoked (const winrt::UIElement &, const winrt::AccessKeyInvokedEventArgs &args)
void | OnChildChecked (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnChildPreviewKeyDown (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | OnChildUnchecked (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnGettingFocus (const winrt::IInspectable &, const winrt::GettingFocusEventArgs &args)
void | OnIsEnabledChanged (const winrt::IInspectable &, const winrt::DependencyPropertyChangedEventArgs &)
void | OnLayoutChanged (const winrt::ColumnMajorUniformToLargestGridLayout &, const winrt::IInspectable &)
void | OnRepeaterCollectionChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnRepeaterElementClearing (const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementClearingEventArgs &args)
void | OnRepeaterElementIndexChanged (const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementIndexChangedEventArgs &args)
void | OnRepeaterElementPrepared (const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementPreparedEventArgs &args)
void | OnRepeaterLoaded (const winrt::IInspectable &, const winrt::RoutedEventArgs &)
void | Select (int index)
void | UpdateItemsSource ()
void | UpdateItemTemplate ()
void | UpdateSelectedIndex ()
void | UpdateSelectedItem ()
void | UpdateVisualStateForIsEnabledChange ()

Detailed Description

Definition at line 25 of file RadioButtons.h.

Constructor & Destructor Documentation

RadioButtons ( )

Definition at line 13 of file RadioButtons.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_RadioButtons);

    auto const items = winrt::make<Vector<winrt::IInspectable>>();
    SetValue(s_ItemsProperty, items);

    SetDefaultStyleKey(this);

    // Override normal up/down/left/right behavior -- down should always go to the next item and up to the previous.
    // left and right should be spacial but contained to the RadioButtons control. We have to attach to PreviewKeyDown
    // because RadioButton has a key down handler for up and down that gets called before we can intercept. Issue #1634.
    PreviewKeyDown({ this, &RadioButtons::OnChildPreviewKeyDown });

    AccessKeyInvoked({ this, &RadioButtons::OnAccessKeyInvoked });
    GettingFocus({ this, &RadioButtons::OnGettingFocus });

    m_radioButtonsElementFactory = winrt::make_self<RadioButtonsElementFactory>();

    // RadioButtons adds handlers to its child radio button elements' checked and unchecked events.
    // To ensure proper lifetime management we create revokers for these elements and attach
    // the revokers to the child radio button via this attached property.  This way, if/when the child
    // is cleaned up we will automatically revoke the handler.
    s_childHandlersProperty =
        InitializeDependencyProperty(
            s_childHandlersPropertyName,
            winrt::name_of<ChildHandlers>(),
            winrt::name_of<winrt::RadioButtons>(),
            true /* isAttached */,
            nullptr,
            nullptr);
}

~RadioButtons ( )

Definition at line 563 of file RadioButtons.cpp.

{
    if (m_layoutChangedToken)
    {
        if (auto const layout = GetLayout())
        {
            layout->LayoutChanged(m_layoutChangedToken);
            m_layoutChangedToken = { 0 };
        }
    }
}

Member Function Documentation

void AttachToLayoutChanged ( ) [private]

Definition at line 608 of file RadioButtons.cpp.

{
    if (auto const layout = GetLayout())
    {
        layout->SetTestHooksEnabled(true);
        m_layoutChangedToken = layout->LayoutChanged({ this, &RadioButtons::OnLayoutChanged });
    }
}

winrt::UIElement ContainerFromIndex ( int index )

Definition at line 478 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        return repeater.TryGetElement(index);
    }
    return nullptr;
}

void DetatchFromLayoutChanged ( ) [private]

Definition at line 617 of file RadioButtons.cpp.

{
    if (auto const layout = GetLayout())
    {
        layout->SetTestHooksEnabled(false);
        layout->LayoutChanged(m_layoutChangedToken);
        m_layoutChangedToken = { 0 };
    }
}

int GetColumns ( )

Definition at line 589 of file RadioButtons.cpp.

{
    if (auto const layout = GetLayout())
    {
        return layout->GetColumns();
    }
    return -1;
}

winrt::IInspectable GetDataAtIndex | ( | int | index,
 |  | bool | containerIsChecked |
 | ) |  |  | [private]

Definition at line 356 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        if (auto const item = repeater.TryGetElement(index))
        {
            if (auto const itemAsToggleButton = item.try_as<winrt::ToggleButton>())
            {
                itemAsToggleButton.IsChecked(containerIsChecked);
            }
        }
        if (index >= 0)
        {
            if (auto const itemsSourceView = repeater.ItemsSourceView())
            {
                if (index < itemsSourceView.Count())
                {
                    return itemsSourceView.GetAt(index);
                }
            }
        }
    }
    return static_cast<winrt::IInspectable>(nullptr);
}

winrt::FindNextElementOptions GetFindNextElementOptions ( bool useThisAsSearchRoot ) [private]

Definition at line 242 of file RadioButtons.cpp.

{
    auto const findNextElementOptions = winrt::FindNextElementOptions{};
    findNextElementOptions.SearchRoot(useThisAsSearchRoot ? *this : this->XamlRoot().Content());
    return findNextElementOptions;
}

winrt::IInspectable GetItemsSource ( ) [private]

Definition at line 502 of file RadioButtons.cpp.

{
    if (auto const itemsSource = ItemsSource())
    {
        return itemsSource;
    }
    else
    {
        return Items();
    }
}

int GetLargerColumns ( )

Definition at line 598 of file RadioButtons.cpp.

{
    if (auto const layout = GetLayout())
    {
        return layout->GetLargerColumns();
    }
    return -1;
}

com_ptr< ColumnMajorUniformToLargestGridLayout > GetLayout ( ) [private]

Definition at line 627 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        if (auto const layout = repeater.Layout())
        {
            if (auto const customLayout = layout.try_as<winrt::ColumnMajorUniformToLargestGridLayout>())
            {
                return winrt::get_self<ColumnMajorUniformToLargestGridLayout>(customLayout)->get_strong();
            }
        }
    }
    return nullptr;
}

int GetRows ( )

Definition at line 580 of file RadioButtons.cpp.

{
    if (auto const layout = GetLayout())
    {
        return layout->GetRows();
    }
    return -1;
}

bool HandleEdgeCaseFocus | ( | bool | first,
 |  | const winrt::IInspectable & | source |
 | ) |  |  | [private]

Definition at line 214 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        if (auto const sourceAsUIElement = source.try_as<winrt::UIElement>())
        {
            auto const index = [first, repeater]()
            {
                if (first)
                {
                    return 0;
                }
                if (auto const itemsSourceView = repeater.ItemsSourceView())
                {
                    return itemsSourceView.Count() - 1;
                }
                return -1;
            }();

            if (repeater.GetElementIndex(sourceAsUIElement) == index)
            {
                return true;
            }
        }
    }
    return false;
}

bool MoveFocus ( int initialIndexIncrement ) [private]

Definition at line 422 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        if (auto const focusedElement = winrt::FocusManager::GetFocusedElement(XamlRoot()).try_as<winrt::UIElement>())
        {
            auto focusedIndex = repeater.GetElementIndex(focusedElement);

            if (focusedIndex >= 0)
            {
                focusedIndex += indexIncrement;
                auto const itemCount = repeater.ItemsSourceView().Count();
                while (focusedIndex >= 0 && focusedIndex < itemCount)
                {
                    if (auto const item = repeater.TryGetElement(focusedIndex))
                    {
                        if (item.Focus(winrt::FocusState::Programmatic))
                        {
                            return true;
                        }
                    }
                    focusedIndex += indexIncrement;
                }
            }
        }
    }
    return false;
}

bool MoveFocusNext ( ) [private]

Definition at line 412 of file RadioButtons.cpp.

{
    return MoveFocus(1);
}

bool MoveFocusPrevious ( ) [private]

Definition at line 417 of file RadioButtons.cpp.

{
    return MoveFocus(-1);
}

void OnAccessKeyInvoked | ( | const winrt::UIElement & | ,
 |  | const winrt::AccessKeyInvokedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 185 of file RadioButtons.cpp.

{
    // If RadioButtons is an AccessKeyScope then we do not want to handle the access
    // key invoked event because the user has (probably) set up access keys for the
    // RadioButton elements.
    if (!IsAccessKeyScope())
    {
        if (m_selectedIndex)
        {
            if (auto const repeater = m_repeater.get())
            {
                if (auto const selectedItem = repeater.TryGetElement(m_selectedIndex))
                {
                    if (auto const selectedItemAsControl = selectedItem.try_as<winrt::Control>())
                    {
                        return args.Handled(selectedItemAsControl.Focus(winrt::FocusState::Programmatic));
                    }
                }
            }
        }
        // If we don't have a selected index, focus the RadioButton's which under normal
        // circumstances will put focus on the first radio button.
        args.Handled(this->Focus(winrt::FocusState::Programmatic));
    }
}

void OnApplyTemplate ( )

Definition at line 52 of file RadioButtons.cpp.

{
    const winrt::IControlProtected controlProtected{ *this };

    m_isEnabledChangedRevoker = IsEnabledChanged(winrt::auto_revoke, { this,  &RadioButtons::OnIsEnabledChanged });

    m_repeater.set([this, controlProtected]() {
        if (auto const repeater = GetTemplateChildT<winrt::ItemsRepeater>(s_repeaterName, controlProtected))
        {
            repeater.ItemTemplate(*m_radioButtonsElementFactory);

            m_repeaterElementPreparedRevoker = repeater.ElementPrepared(winrt::auto_revoke, { this, &RadioButtons::OnRepeaterElementPrepared });
            m_repeaterElementClearingRevoker = repeater.ElementClearing(winrt::auto_revoke, { this, &RadioButtons::OnRepeaterElementClearing });
            m_repeaterElementIndexChangedRevoker = repeater.ElementIndexChanged(winrt::auto_revoke, { this, &RadioButtons::OnRepeaterElementIndexChanged });
            m_repeaterLoadedRevoker = repeater.Loaded(winrt::auto_revoke, { this, &RadioButtons::OnRepeaterLoaded });
            return repeater;
        }
        return static_cast<winrt::ItemsRepeater>(nullptr);
    }());

    UpdateItemsSource();
    UpdateVisualStateForIsEnabledChange();
}

void OnChildChecked | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 381 of file RadioButtons.cpp.

{
    if (!m_currentlySelecting)
    {
        if (auto const repeater = m_repeater.get())
        {
            if (auto const senderAsUIE = sender.as<winrt::UIElement>())
            {
                Select(repeater.GetElementIndex(senderAsUIE));
            }
        }
    }
}

void OnChildPreviewKeyDown | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 133 of file RadioButtons.cpp.

{
    switch (args.Key())
    {
    case winrt::VirtualKey::Down:
        if (MoveFocusNext())
        {
            return args.Handled(true);
        }
        else if (args.OriginalKey() == winrt::VirtualKey::GamepadDPadDown)
        {
            if (winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Next, GetFindNextElementOptions(false /*useThisAsSearchRoot*/)))
            {
                return args.Handled(true);
            }
        }
        args.Handled(HandleEdgeCaseFocus(false, args.OriginalSource()));
        break;
    case winrt::VirtualKey::Up:
        if (MoveFocusPrevious())
        {
            return args.Handled(true);
        }
        else if (args.OriginalKey() == winrt::VirtualKey::GamepadDPadUp)
        {
            if (winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Previous, GetFindNextElementOptions(false /*useThisAsSearchRoot*/)))
            {
                return args.Handled(true);
            }
        }
        args.Handled(HandleEdgeCaseFocus(true, args.OriginalSource()));
        break;
    case winrt::VirtualKey::Right:
        if (winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Right,
                GetFindNextElementOptions(args.OriginalKey() != winrt::VirtualKey::GamepadDPadRight /*useThisAsSearchRoot*/)))
        {
            return args.Handled(true);
        }
        args.Handled(HandleEdgeCaseFocus(false, args.OriginalSource()));
        break;

    case winrt::VirtualKey::Left:
        if (winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Left,
            GetFindNextElementOptions(args.OriginalKey() != winrt::VirtualKey::GamepadDPadLeft /*useThisAsSearchRoot*/)))
        {
            return args.Handled(true);
        }
        args.Handled(HandleEdgeCaseFocus(true, args.OriginalSource()));
        break;
    }
}

void OnChildUnchecked | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 395 of file RadioButtons.cpp.

{
    if (!m_currentlySelecting)
    {
        if (auto const repeater = m_repeater.get())
        {
            if (auto const senderAsUIE = sender.as<winrt::UIElement>())
            {
                if (m_selectedIndex == repeater.GetElementIndex(senderAsUIE))
                {
                    Select(-1);
                }
            }
        }
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( ) [virtual]

Definition at line 46 of file RadioButtons.cpp.

{
    return winrt::make<RadioButtonsAutomationPeer>(*this);
}

void OnGettingFocus | ( | const winrt::IInspectable & | ,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]

Definition at line 77 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        auto const inputDevice = args.InputDevice();
        if (inputDevice == winrt::FocusInputDeviceKind::Keyboard)
        {
            // If focus is coming from outside the repeater, put focus on the selected item.
            auto const oldFocusedElement = args.OldFocusedElement();
            if (!oldFocusedElement || repeater != winrt::VisualTreeHelper::GetParent(oldFocusedElement))
            {
                if (auto const selectedItem = repeater.TryGetElement(m_selectedIndex))
                {
                    if (args.TrySetNewFocusedElement(selectedItem))
                    {
                        args.Handled(true);
                    }
                }
            }

            // Selection follows focus unless control is held down.
            else if ((winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) != winrt::CoreVirtualKeyStates::Down)
            {
                if (auto const newFocusedElementAsUIE = args.NewFocusedElement().as<winrt::UIElement>())
                {
                    Select(repeater.GetElementIndex(newFocusedElementAsUIE));
                    args.Handled(true);
                }
            }
        }
    }
}

void OnIsEnabledChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::DependencyPropertyChangedEventArgs & |  |
 | ) |  |  | [private]

Definition at line 473 of file RadioButtons.cpp.

{
    UpdateVisualStateForIsEnabledChange();
}

void OnLayoutChanged | ( | const winrt::ColumnMajorUniformToLargestGridLayout & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 575 of file RadioButtons.cpp.

{
    RadioButtonsTestHooks::NotifyLayoutChanged(*this);
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 451 of file RadioButtons.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_ItemsProperty || property == s_ItemsSourceProperty)
    {
        UpdateItemsSource();
    }
    else if (property == s_SelectedIndexProperty)
    {
        UpdateSelectedIndex();
    }
    else if (property == s_SelectedItemProperty)
    {
        UpdateSelectedItem();
    }
    else if (property == s_ItemTemplateProperty)
    {
        UpdateItemTemplate();
    }
}

void OnRepeaterCollectionChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 312 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        if (auto const itemSourceView = repeater.ItemsSourceView())
        {
            auto const count = itemSourceView.Count();
            for (auto index = 0; index < count; index++)
            {
                if (auto const element = repeater.TryGetElement(index))
                {
                    element.SetValue(winrt::AutomationProperties::SizeOfSetProperty(), box_value(count));
                }
            }
        }
    }
}

void OnRepeaterElementClearing | ( | const winrt::ItemsRepeater & | ,
 |  | const winrt::ItemsRepeaterElementClearingEventArgs & | args |
 | ) |  |  | [private]

Definition at line 278 of file RadioButtons.cpp.

{
    if (auto const element = args.Element())
    {
        element.SetValue(s_childHandlersProperty, nullptr);

        // If the removed element was the selected one, update selection to -1
        if (auto const elementAsToggle = element.try_as<winrt::ToggleButton>())
        {
            if (SharedHelpers::IsTrue(elementAsToggle.IsChecked()))
            {
                Select(-1);
            }
        }
    }
}

void OnRepeaterElementIndexChanged | ( | const winrt::ItemsRepeater & | ,
 |  | const winrt::ItemsRepeaterElementIndexChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 295 of file RadioButtons.cpp.

{
    if (auto const element = args.Element())
    {
        element.SetValue(winrt::AutomationProperties::PositionInSetProperty(), box_value(args.NewIndex() + 1));

        // When the selected item's index changes, update selection to match
        if (auto const elementAsToggle = element.try_as<winrt::ToggleButton>())
        {
            if (SharedHelpers::IsTrue(elementAsToggle.IsChecked()))
            {
                Select(args.NewIndex());
            }
        }
    }
}

void OnRepeaterElementPrepared | ( | const winrt::ItemsRepeater & | ,
 |  | const winrt::ItemsRepeaterElementPreparedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 249 of file RadioButtons.cpp.

{
    if (auto const element = args.Element())
    {
        if (auto const toggleButton = element.try_as<winrt::ToggleButton>())
        {
            auto childHandlers = winrt::make_self<ChildHandlers>();
            childHandlers->checkedRevoker = toggleButton.Checked(winrt::auto_revoke, { this, &RadioButtons::OnChildChecked });
            childHandlers->uncheckedRevoker = toggleButton.Unchecked(winrt::auto_revoke, { this, &RadioButtons::OnChildUnchecked });

            toggleButton.SetValue(s_childHandlersProperty, childHandlers.as<winrt::IInspectable>());

            // If the developer adds a checked toggle button to the collection, update selection to this item.
            if (SharedHelpers::IsTrue(toggleButton.IsChecked()))
            {
                Select(args.Index());
            }
        }
        if (auto const repeater = m_repeater.get())
        {
            if (auto const itemSourceView = repeater.ItemsSourceView())
            {
                element.SetValue(winrt::AutomationProperties::PositionInSetProperty(), box_value(args.Index() + 1));
                element.SetValue(winrt::AutomationProperties::SizeOfSetProperty(), box_value(itemSourceView.Count()));
            }
        }
    }
}

void OnRepeaterLoaded | ( | const winrt::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]

Definition at line 110 of file RadioButtons.cpp.

{
    if (auto const repeater = m_repeater.get())
    {
        if (m_testHooksEnabled)
        {
            AttachToLayoutChanged();
        }

        m_blockSelecting = false;
        if (SelectedIndex() == -1 && SelectedItem())
        {
            UpdateSelectedItem();
        }
        else
        {
            UpdateSelectedIndex();
        }

        OnRepeaterCollectionChanged(nullptr, nullptr);
    }
}

void Select ( int index ) [private]

Definition at line 330 of file RadioButtons.cpp.

{
    if(!m_blockSelecting && !m_currentlySelecting && m_selectedIndex != index)
    {
        // Calling Select updates the checked state on the radio button being selected
        // and the radio button being unselected, as well as updates the SelectedIndex
        // and SelectedItem DP. All of these things would cause Select to be called so
        // we'll prevent reentrency with this m_currentlySelecting boolean.
        auto clearSelecting = gsl::finally([this]()
            {
                m_currentlySelecting = false;
            });
        m_currentlySelecting = true;

        auto const previousSelectedIndex = m_selectedIndex;
        m_selectedIndex = index;

        auto const newSelectedItem = GetDataAtIndex(m_selectedIndex, true);
        auto const previousSelectedItem = GetDataAtIndex(previousSelectedIndex, false);

        SelectedIndex(m_selectedIndex);
        SelectedItem(newSelectedItem);
        m_selectionChangedEventSource(*this, winrt::SelectionChangedEventArgs({ previousSelectedItem }, { newSelectedItem }));
    }
}

void SetTestHooksEnabled ( bool enabled )

Definition at line 547 of file RadioButtons.cpp.

{
    if (m_testHooksEnabled != enabled)
    {
        m_testHooksEnabled = enabled;
        if (enabled)
        {
            AttachToLayoutChanged();
        }
        else
        {
            DetatchFromLayoutChanged();
        }
    }
}

void UpdateItemsSource ( ) [private]

Definition at line 487 of file RadioButtons.cpp.

{
    Select(-1);
    m_itemsSourceChanged.revoke();
    if (auto const repeater = m_repeater.get())
    {
        repeater.ItemsSource(GetItemsSource());

        if (auto const itemsSourceView = repeater.ItemsSourceView())
        {
            m_itemsSourceChanged = itemsSourceView.CollectionChanged(winrt::auto_revoke, { this, &RadioButtons::OnRepeaterCollectionChanged });
        }
    }
}

void UpdateItemTemplate ( ) [private]

Definition at line 536 of file RadioButtons.cpp.

{
    m_radioButtonsElementFactory->UserElementFactory(ItemTemplate());
}

void UpdateSelectedIndex ( ) [private]

Definition at line 514 of file RadioButtons.cpp.

{
    if (!m_currentlySelecting)
    {
        Select(SelectedIndex());
    }
}

void UpdateSelectedItem ( ) [private]

Definition at line 522 of file RadioButtons.cpp.

{
    if (!m_currentlySelecting)
    {
        if (auto const repeater = m_repeater.get())
        {
            if (auto const itemsSourceView = repeater.ItemsSourceView())
            {
                Select(itemsSourceView.IndexOf(SelectedItem()));
            }
        }
    }
}

void UpdateVisualStateForIsEnabledChange ( ) [private]

Definition at line 541 of file RadioButtons.cpp.

{
    winrt::VisualStateManager::GoToState(*this, IsEnabled() ? L"Normal" : L"Disabled", false);
}

The documentation for this class was generated from the following files:
  • RadioButtons/RadioButtons.h
  • RadioButtons/RadioButtons.cpp
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsCaseBundle Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RadioButtons_TestUI
  • RadioButtonsCaseBundle
Public Member Functions

RadioButtonsCaseBundle Class Reference

List of all members.

Public Member Functions

RadioButtonsCaseBundle ()

Detailed Description

Definition at line 10 of file RadioButtonsCaseBundle.xaml.cs.

Constructor & Destructor Documentation

RadioButtonsCaseBundle ( ) [inline]

Definition at line 12 of file RadioButtonsCaseBundle.xaml.cs.

        {
            this.InitializeComponent();

            RadioButtonsPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RadioButtonsPage), 0); };
            RadioButtonsFocusPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RadioButtonsFocusPage), 0); };
        }

The documentation for this class was generated from the following file:
  • RadioButtons/TestUI/RadioButtonsCaseBundle.xaml.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsFocusPage Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RadioButtons_TestUI
  • RadioButtonsFocusPage
Public Member Functions | Private Member Functions

RadioButtonsFocusPage Class Reference

List of all members.

Public Member Functions

RadioButtonsFocusPage ()

Private Member Functions

void | ChangeTestFrameVisibility (Visibility visibility)
int | getIndexToSelect (bool selectRadioButtons2)
void | OnLoaded (object sender, RoutedEventArgs e)
void | SelectByIndexButton1_Click (object sender, RoutedEventArgs e)
void | SelectByIndexButton2_Click (object sender, RoutedEventArgs e)
void | TestRadioButtons2_GotFocus (object sender, RoutedEventArgs e)
void | TestRadioButtons2_LostFocus (object sender, RoutedEventArgs e)
void | TestRadioButtons2_SelectionChanged (object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
void | TestRadioButtons_GotFocus (object sender, RoutedEventArgs e)
void | TestRadioButtons_LostFocus (object sender, RoutedEventArgs e)
void | TestRadioButtons_SelectionChanged (object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)

Detailed Description

Definition at line 13 of file RadioButtonsFocusPage.xaml.cs.

Constructor & Destructor Documentation

RadioButtonsFocusPage ( ) [inline]

Definition at line 15 of file RadioButtonsFocusPage.xaml.cs.

        {
            this.InitializeComponent();

            Loaded += OnLoaded;
        }

Member Function Documentation

void ChangeTestFrameVisibility ( Visibility visibility ) [inline, private]

Definition at line 27 of file RadioButtonsFocusPage.xaml.cs.

        {
            var testFrame = App.TestContentRoot as TestFrame;
            testFrame.ChangeBarVisibility(visibility);
        }

int getIndexToSelect ( bool selectRadioButtons2 ) [inline, private]

Definition at line 107 of file RadioButtonsFocusPage.xaml.cs.

        {
            int value;
            bool success;
            if (selectRadioButtons2)
            {
                success = Int32.TryParse(IndexToSelectTextBox2.Text, out value);
            }
            else
            {
                success = Int32.TryParse(IndexToSelectTextBox1.Text, out value);
            }

            if (success)
            {
                if (value >= 3)
                {
                    return 1;
                }
                if (value < -1)
                {
                    return -2;
                }
                return value;
            }
            return -2;
        }

void OnLoaded | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 22 of file RadioButtonsFocusPage.xaml.cs.

        {
            ChangeTestFrameVisibility(Visibility.Collapsed);
        }

void SelectByIndexButton1_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 89 of file RadioButtonsFocusPage.xaml.cs.

        {
            var index = getIndexToSelect(false);
            if (index != -2)
            {
                TestRadioButtons1.SelectedIndex = index;
            }
        }

void SelectByIndexButton2_Click | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 98 of file RadioButtonsFocusPage.xaml.cs.

        {
            var index = getIndexToSelect(true);
            if (index != -2)
            {
                TestRadioButtons2.SelectedIndex = index;
            }
        }

void TestRadioButtons2_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 75 of file RadioButtonsFocusPage.xaml.cs.

        {
            var stackPanel = VisualTreeHelper.GetChild(TestRadioButtons2, 0);
            var repeater = (ItemsRepeater)VisualTreeHelper.GetChild(stackPanel, 1);
            FocusedIndexTextBlock2.Text = repeater.GetElementIndex((UIElement)e.OriginalSource).ToString();
            TestRadioButtons2HasFocusCheckBox.IsChecked = true;
        }

void TestRadioButtons2_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 83 of file RadioButtonsFocusPage.xaml.cs.

        {
            FocusedIndexTextBlock2.Text = "-1";
            TestRadioButtons2HasFocusCheckBox.IsChecked = false;
        }

void TestRadioButtons2_SelectionChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 47 of file RadioButtonsFocusPage.xaml.cs.

        {
            var index = TestRadioButtons2.SelectedIndex;
            SelectedIndexTextBlock2.Text = index.ToString();
            if (TestRadioButtons2.SelectedItem != null)
            {
                SelectedItemTextBlock2.Text = TestRadioButtons2.SelectedItem.ToString();
            }
            else
            {
                SelectedItemTextBlock2.Text = "null";
            }
        }

void TestRadioButtons_GotFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 61 of file RadioButtonsFocusPage.xaml.cs.

        {
            var stackPanel = VisualTreeHelper.GetChild(TestRadioButtons1, 0);
            var repeater = (ItemsRepeater)VisualTreeHelper.GetChild(stackPanel, 1);
            FocusedIndexTextBlock1.Text = repeater.GetElementIndex((UIElement)e.OriginalSource).ToString();
            TestRadioButtons1HasFocusCheckBox.IsChecked = true;
        }

void TestRadioButtons_LostFocus | ( | object | sender,
 |  | RoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 69 of file RadioButtonsFocusPage.xaml.cs.

        {
            FocusedIndexTextBlock1.Text = "-1";
            TestRadioButtons1HasFocusCheckBox.IsChecked = false;
        }

void TestRadioButtons_SelectionChanged | ( | object | sender,
 |  | Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 33 of file RadioButtonsFocusPage.xaml.cs.

        {
            var index = TestRadioButtons1.SelectedIndex;
            SelectedIndexTextBlock1.Text = index.ToString();
            if (TestRadioButtons1.SelectedItem != null)
            {
                SelectedItemTextBlock1.Text = TestRadioButtons1.SelectedItem.ToString();
            }
            else
            {
                SelectedItemTextBlock1.Text = "null";
            }
        }

The documentation for this class was generated from the following file:
  • RadioButtons/TestUI/RadioButtonsFocusPage.xaml.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RadioButtonsAutomationPeer Class Reference

#include "RadioButtonsAutomationPeer.h"

Inherits ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT >.

List of all members.

Public Member Functions

RadioButtonsAutomationPeer (winrt::RadioButtons const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
hstring | GetNameCore ()

Detailed Description

Definition at line 9 of file RadioButtonsAutomationPeer.h.

Constructor & Destructor Documentation

RadioButtonsAutomationPeer ( winrt::RadioButtons const & owner )

Definition at line 13 of file RadioButtonsAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 38 of file RadioButtonsAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Group;
}

hstring GetClassNameCore ( )

Definition at line 18 of file RadioButtonsAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::RadioButtons>();
}

hstring GetNameCore ( )

Definition at line 23 of file RadioButtonsAutomationPeer.cpp.

{
    winrt::hstring name = __super::GetNameCore();

    if (name.empty())
    {
        if (auto radioButtons = Owner().try_as<winrt::RadioButtons>())
        {
            name = SharedHelpers::TryGetStringRepresentationFromObject(radioButtons.Header());
        }
    }

    return name;
}

The documentation for this class was generated from the following files:
  • RadioButtons/RadioButtonsAutomationPeer.h
  • RadioButtons/RadioButtonsAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RadioButtonsElementFactory Class Reference

#include "RadioButtonsElementFactory.h"

List of all members.

Public Member Functions

RadioButtonsElementFactory ()
winrt::UIElement | GetElementCore (const winrt::ElementFactoryGetArgs &args) override
void | RecycleElementCore (const winrt::ElementFactoryRecycleArgs &args) override
void | UserElementFactory (const winrt::IInspectable &newValue)

Detailed Description

Definition at line 8 of file RadioButtonsElementFactory.h.

Constructor & Destructor Documentation

RadioButtonsElementFactory ( )

Definition at line 11 of file RadioButtonsElementFactory.cpp.

{
}

Member Function Documentation

winrt::UIElement GetElementCore ( const winrt::ElementFactoryGetArgs & args ) [override]

Definition at line 31 of file RadioButtonsElementFactory.cpp.

{
    auto const newContent = [itemTemplateWrapper = m_itemTemplateWrapper, args]() {
        if (itemTemplateWrapper)
        {
            return itemTemplateWrapper.GetElement(args).as<winrt::IInspectable>();
        }
        return args.Data();
    }();

    // Element is already a RadioButton, so we just return it.
    if (auto const radioButton = newContent.try_as<winrt::RadioButton>())
    {
        return radioButton;
    }

    // Element is not a RadioButton. We'll wrap it in a RadioButton now.
    auto const newRadioButton = winrt::RadioButton{};
    newRadioButton.Content(args.Data());

    // If a user provided item template exists, we pass the template down to the ContentPresenter of the RadioButton.
    if (auto const itemTemplateWrapper = m_itemTemplateWrapper.try_as<ItemTemplateWrapper>())
    {
        newRadioButton.ContentTemplate(itemTemplateWrapper->Template());
    }

    return newRadioButton;
}

void RecycleElementCore ( const winrt::ElementFactoryRecycleArgs & args ) [override]

Definition at line 60 of file RadioButtonsElementFactory.cpp.

{

}

void UserElementFactory ( const winrt::IInspectable & newValue )

Definition at line 15 of file RadioButtonsElementFactory.cpp.

{
    if (auto dataTemplate = newValue.try_as<winrt::DataTemplate>())
    {
        m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(dataTemplate);
    }
    else if (auto selector = newValue.try_as<winrt::DataTemplateSelector>())
    {
        m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(selector);
    }
    else if (auto customElementFactory = newValue.try_as<winrt::IElementFactory>())
    {
        m_itemTemplateWrapper = customElementFactory;
    }
}

The documentation for this class was generated from the following files:
  • RadioButtons/RadioButtonsElementFactory.h
  • RadioButtons/RadioButtonsElementFactory.cpp
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

RadioButtonsProperties Class Reference

#include "RadioButtons.properties.h"

Inherited by RadioButtons.

List of all members.

Public Member Functions

RadioButtonsProperties ()
void | Header (winrt::IInspectable const &value)
winrt::IInspectable | Header ()
void | HeaderTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | HeaderTemplate ()
void | Items (winrt::IVector< winrt::IInspectable > const &value)
winrt::IVector
< winrt::IInspectable > 		Items ()
void | ItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | ItemsSource ()
void | ItemTemplate (winrt::IInspectable const &value)
winrt::IInspectable | ItemTemplate ()
void | MaxColumns (int value)
int | MaxColumns ()
void | SelectedIndex (int value)
int | SelectedIndex ()
winrt::IInspectable | SelectedItem ()
void | SelectedItem (winrt::IInspectable const &value)
void | SelectionChanged (winrt::event_token const &token)
winrt::event_token | SelectionChanged (winrt::SelectionChangedEventHandler const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HeaderProperty ()
static winrt::DependencyProperty | HeaderTemplateProperty ()
static winrt::DependencyProperty | ItemsProperty ()
static winrt::DependencyProperty | ItemsSourceProperty ()
static winrt::DependencyProperty | ItemTemplateProperty ()
static winrt::DependencyProperty | MaxColumnsProperty ()
static void | OnHeaderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHeaderTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemTemplatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxColumnsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedIndexPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedItemPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SelectedIndexProperty ()
static winrt::DependencyProperty | SelectedItemProperty ()

Public Attributes

event_source
< winrt::SelectionChangedEventHandler > 		m_selectionChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_HeaderProperty
static GlobalDependencyProperty | s_HeaderTemplateProperty
static GlobalDependencyProperty | s_ItemsProperty
static GlobalDependencyProperty | s_ItemsSourceProperty
static GlobalDependencyProperty | s_ItemTemplateProperty
static GlobalDependencyProperty | s_MaxColumnsProperty
static GlobalDependencyProperty | s_SelectedIndexProperty
static GlobalDependencyProperty | s_SelectedItemProperty

Detailed Description

Definition at line 7 of file RadioButtons.properties.h.

Constructor & Destructor Documentation

RadioButtonsProperties ( )

Definition at line 25 of file RadioButtons.properties.cpp.

    : m_selectionChangedEventSource{static_cast<RadioButtons*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::IInspectable Header ( )
void Header ( winrt::IInspectable const & value )
static winrt::DependencyProperty HeaderProperty ( ) [inline, static]

Definition at line 36 of file RadioButtons.properties.h.

{ return s_HeaderProperty; }

winrt::DataTemplate HeaderTemplate ( )
void HeaderTemplate ( winrt::DataTemplate const & value )
static winrt::DependencyProperty HeaderTemplateProperty ( ) [inline, static]

Definition at line 37 of file RadioButtons.properties.h.

{ return s_HeaderTemplateProperty; }

void Items ( winrt::IVector< winrt::IInspectable > const & value )
winrt::IVector<winrt::IInspectable> Items ( )
static winrt::DependencyProperty ItemsProperty ( ) [inline, static]

Definition at line 38 of file RadioButtons.properties.h.

{ return s_ItemsProperty; }

winrt::IInspectable ItemsSource ( )
void ItemsSource ( winrt::IInspectable const & value )
static winrt::DependencyProperty ItemsSourceProperty ( ) [inline, static]

Definition at line 39 of file RadioButtons.properties.h.

{ return s_ItemsSourceProperty; }

void ItemTemplate ( winrt::IInspectable const & value )
winrt::IInspectable ItemTemplate ( )
static winrt::DependencyProperty ItemTemplateProperty ( ) [inline, static]

Definition at line 40 of file RadioButtons.properties.h.

{ return s_ItemTemplateProperty; }

void MaxColumns ( int value )
int MaxColumns ( )
static winrt::DependencyProperty MaxColumnsProperty ( ) [inline, static]

Definition at line 41 of file RadioButtons.properties.h.

{ return s_MaxColumnsProperty; }

static void OnHeaderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHeaderTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemTemplatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxColumnsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedIndexPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedItemPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void SelectedIndex ( int value )
int SelectedIndex ( )
static winrt::DependencyProperty SelectedIndexProperty ( ) [inline, static]

Definition at line 42 of file RadioButtons.properties.h.

{ return s_SelectedIndexProperty; }

winrt::IInspectable SelectedItem ( )
void SelectedItem ( winrt::IInspectable const & value )
static winrt::DependencyProperty SelectedItemProperty ( ) [inline, static]

Definition at line 43 of file RadioButtons.properties.h.

{ return s_SelectedItemProperty; }

void SelectionChanged ( winrt::event_token const & token )
winrt::event_token SelectionChanged ( winrt::SelectionChangedEventHandler const & value )

Member Data Documentation

event_source<winrt::SelectionChangedEventHandler> m_selectionChangedEventSource

Definition at line 57 of file RadioButtons.properties.h.

GlobalDependencyProperty s_HeaderProperty [static]

Definition at line 45 of file RadioButtons.properties.h.

GlobalDependencyProperty s_HeaderTemplateProperty [static]

Definition at line 46 of file RadioButtons.properties.h.

GlobalDependencyProperty s_ItemsProperty [static]

Definition at line 47 of file RadioButtons.properties.h.

GlobalDependencyProperty s_ItemsSourceProperty [static]

Definition at line 48 of file RadioButtons.properties.h.

GlobalDependencyProperty s_ItemTemplateProperty [static]

Definition at line 49 of file RadioButtons.properties.h.

GlobalDependencyProperty s_MaxColumnsProperty [static]

Definition at line 50 of file RadioButtons.properties.h.

GlobalDependencyProperty s_SelectedIndexProperty [static]

Definition at line 51 of file RadioButtons.properties.h.

GlobalDependencyProperty s_SelectedItemProperty [static]

Definition at line 52 of file RadioButtons.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RadioButtons.properties.h
  • Generated/RadioButtons.properties.cpp
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Attributes | Static Private Attributes

RadioButtonsTestHooks Class Reference

#include "RadioButtonsTestHooks.h"

List of all members.

Static Public Member Functions

static com_ptr
< RadioButtonsTestHooks > 		EnsureGlobalTestHooks ()
static int | GetColumns (const winrt::RadioButtons &radioButtons)
static com_ptr
< RadioButtonsTestHooks > 		GetGlobalTestHooks ()
static int | GetLargerColumns (const winrt::RadioButtons &radioButtons)
static int | GetRows (const winrt::RadioButtons &radioButtons)
static void | LayoutChanged (winrt::event_token const &token)
static winrt::event_token | LayoutChanged (winrt::TypedEventHandler< winrt::RadioButtons, winrt::IInspectable > const &value)
static void | NotifyLayoutChanged (const winrt::RadioButtons &sender)
static void | SetTestHooksEnabled (const winrt::RadioButtons &radioButtons, bool enabled)

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::RadioButtons,
winrt::IInspectable > > 		m_layoutChangedEventSource

Static Private Attributes

static com_ptr
< RadioButtonsTestHooks > 		s_testHooks

Detailed Description

Definition at line 7 of file RadioButtonsTestHooks.h.

Member Function Documentation

com_ptr< RadioButtonsTestHooks > EnsureGlobalTestHooks ( ) [static]

Definition at line 9 of file RadioButtonsTestHooks.cpp.

{
    static bool s_initialized = []() {
        s_testHooks = winrt::make_self<RadioButtonsTestHooks>();
        return true;
    }();
    return s_testHooks;
}

int GetColumns ( const winrt::RadioButtons & radioButtons ) [static]

Definition at line 56 of file RadioButtonsTestHooks.cpp.

{
    if (radioButtons)
    {
        return winrt::get_self<RadioButtons>(radioButtons)->GetColumns();
    }
    return -1;
}

static com_ptr<RadioButtonsTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 11 of file RadioButtonsTestHooks.h.

    {
        return s_testHooks;
    }

int GetLargerColumns ( const winrt::RadioButtons & radioButtons ) [static]

Definition at line 65 of file RadioButtonsTestHooks.cpp.

{
    if (radioButtons)
    {
        return winrt::get_self<RadioButtons>(radioButtons)->GetLargerColumns();
    }
    return -1;
}

int GetRows ( const winrt::RadioButtons & radioButtons ) [static]

Definition at line 47 of file RadioButtonsTestHooks.cpp.

{
    if (radioButtons)
    {
        return winrt::get_self<RadioButtons>(radioButtons)->GetRows();
    }
    return -1;
}

void LayoutChanged ( winrt::event_token const & token ) [static]

Definition at line 41 of file RadioButtonsTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_layoutChangedEventSource.remove(token);
}

winrt::event_token LayoutChanged ( winrt::TypedEventHandler< winrt::RadioButtons, winrt::IInspectable > const & value ) [static]

Definition at line 35 of file RadioButtonsTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_layoutChangedEventSource.add(value);
}

void NotifyLayoutChanged ( const winrt::RadioButtons & sender ) [static]

Definition at line 26 of file RadioButtonsTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_layoutChangedEventSource)
    {
        hooks->m_layoutChangedEventSource(sender, nullptr);
    }
}

void SetTestHooksEnabled | ( | const winrt::RadioButtons & | radioButtons,
 |  | bool | enabled |
 | ) |  |  | [static]

Definition at line 18 of file RadioButtonsTestHooks.cpp.

{
    if (radioButtons)
    {
        winrt::get_self<RadioButtons>(radioButtons)->SetTestHooksEnabled(enabled);
    }
}

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::RadioButtons, winrt::IInspectable> > m_layoutChangedEventSource [private]

Definition at line 30 of file RadioButtonsTestHooks.h.

com_ptr<RadioButtonsTestHooks> s_testHooks [static, private]

Definition at line 29 of file RadioButtonsTestHooks.h.

The documentation for this class was generated from the following files:
  • RadioButtons/RadioButtonsTestHooks.h
  • RadioButtons/RadioButtonsTestHooks.cpp
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes

RadioMenuFlyoutItem Class Reference

#include "RadioMenuFlyoutItem.h"

Inherits ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem >, and RadioMenuFlyoutItemProperties.

List of all members.

Public Member Functions

RadioMenuFlyoutItem ()
void | OnLoaded (winrt::IInspectable const &, winrt::RoutedEventArgs const &)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnUnloaded (winrt::IInspectable const &, winrt::RoutedEventArgs const &)

Static Public Member Functions

static void | OnAreCheckStatesEnabledPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | OnInternalIsCheckedChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | UpdateCheckedItemInGroup ()

Static Private Attributes

static thread_local
std::unique_ptr< std::map
< winrt::hstring,
winrt::weak_ref
< RadioMenuFlyoutItem > > > 		s_selectionMap

Detailed Description

Definition at line 41 of file RadioMenuFlyoutItem.h.

Constructor & Destructor Documentation

RadioMenuFlyoutItem ( )

Definition at line 12 of file RadioMenuFlyoutItem.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_RadioMenuFlyoutItem);

    m_InternalIsCheckedChangedRevoker = RegisterPropertyChanged(*this, winrt::ToggleMenuFlyoutItem::IsCheckedProperty(), { this, &RadioMenuFlyoutItem::OnInternalIsCheckedChanged });

    if (!s_selectionMap)
    {
        // Ensure that this object exists
        s_selectionMap = std::make_unique<std::map<winrt::hstring, winrt::weak_ref<RadioMenuFlyoutItem>>>();
    }

    Loaded({ this, &RadioMenuFlyoutItem::OnLoaded });
    Unloaded({ this, &RadioMenuFlyoutItem::OnUnloaded });

    SetDefaultStyleKey(this);
}

Member Function Documentation

void OnAreCheckStatesEnabledPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static]

Definition at line 108 of file RadioMenuFlyoutItem.cpp.

{
    if (unbox_value<bool>(args.NewValue()))
    {
        if (auto const& subMenu = sender.try_as<winrt::MenuFlyoutSubItem>())
        {
            // Every time the submenu is loaded, see if it contains a checked RadioMenuFlyoutItem or not.
            subMenu.Loaded(
            {
                [subMenuWeak = winrt::make_weak(subMenu)](winrt::IInspectable const& sender, auto const&)
                {
                    if (auto subMenu = subMenuWeak.get())
                    {
                        bool isAnyItemChecked = false;
                        for (auto const& item : subMenu.Items())
                        {
                            if (auto const& radioItem = item.try_as<winrt::RadioMenuFlyoutItem>())
                            {
                                isAnyItemChecked = isAnyItemChecked || radioItem.IsChecked();
                            }
                        }

                        winrt::VisualStateManager::GoToState(subMenu, isAnyItemChecked ? L"Checked" : L"Unchecked", false);
                    }
                }
            });
        }
    }
}

void OnInternalIsCheckedChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 65 of file RadioMenuFlyoutItem.cpp.

{
    if (!InternalIsChecked())
    {
        if (m_isSafeUncheck)
        {
            // The uncheck is due to another radio button being checked -- that's all right.
            IsChecked(false);
        }
        else
        {
            // The uncheck is due to user interaction -- not allowed.
            InternalIsChecked(true);
        }
    }
    else if (!IsChecked())
    {
        IsChecked(true);
        UpdateCheckedItemInGroup();
    }
}

void OnLoaded | ( | winrt::IInspectable const & | ,
 |  | winrt::RoutedEventArgs const & |
 | ) |  |

Definition at line 30 of file RadioMenuFlyoutItem.cpp.

{
    UpdateCheckedItemInGroup();
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 44 of file RadioMenuFlyoutItem.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_IsCheckedProperty)
    {
        if (InternalIsChecked() != IsChecked())
        {
            m_isSafeUncheck = true;
            InternalIsChecked(IsChecked());
            m_isSafeUncheck = false;
            UpdateCheckedItemInGroup();
        }
        m_isChecked = IsChecked();
    }
    else if (property == s_GroupNameProperty)
    {
        m_groupName = GroupName();
    }
}

void OnUnloaded | ( | winrt::IInspectable const & | ,
 |  | winrt::RoutedEventArgs const & |
 | ) |  |

Definition at line 35 of file RadioMenuFlyoutItem.cpp.

{
    // If this is the checked item, remove it from the lookup.
    if (m_isChecked && s_selectionMap)
    {
        SharedHelpers::EraseIfExists(*s_selectionMap, m_groupName);
    }
}

void UpdateCheckedItemInGroup ( ) [private]

Definition at line 87 of file RadioMenuFlyoutItem.cpp.

{
    if (IsChecked())
    {
        const auto groupName = GroupName();

        if (const auto previousCheckedItemWeak = (*s_selectionMap)[groupName])
        {
            if (auto previousCheckedItem = previousCheckedItemWeak.get())
            {
                if (previousCheckedItem.get() != this)
                {
                    // Uncheck the previously checked item.
                    previousCheckedItem->IsChecked(false);
                }
            }
        }
        (*s_selectionMap)[groupName] = this->get_weak();
    }
}

Member Data Documentation

thread_local std::unique_ptr< std::map< winrt::hstring, winrt::weak_ref< RadioMenuFlyoutItem > > > s_selectionMap [static, private]

Definition at line 65 of file RadioMenuFlyoutItem.h.

The documentation for this class was generated from the following files:
  • RadioMenuFlyoutItem/RadioMenuFlyoutItem.h
  • RadioMenuFlyoutItem/RadioMenuFlyoutItem.cpp
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

RadioMenuFlyoutItemProperties Class Reference

#include "RadioMenuFlyoutItem.properties.h"

Inherited by RadioMenuFlyoutItem.

List of all members.

Public Member Functions

RadioMenuFlyoutItemProperties ()
void | GroupName (winrt::hstring const &value)
winrt::hstring | GroupName ()
void | IsChecked (bool value)
bool | IsChecked ()

Static Public Member Functions

static winrt::DependencyProperty | AreCheckStatesEnabledProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static bool | GetAreCheckStatesEnabled (winrt::MenuFlyoutSubItem const &target)
static winrt::DependencyProperty | GroupNameProperty ()
static winrt::DependencyProperty | IsCheckedProperty ()
static void | OnGroupNamePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsCheckedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | SetAreCheckStatesEnabled (winrt::MenuFlyoutSubItem const &target, bool value)

Static Public Attributes

static GlobalDependencyProperty | s_AreCheckStatesEnabledProperty
static GlobalDependencyProperty | s_GroupNameProperty
static GlobalDependencyProperty | s_IsCheckedProperty

Detailed Description

Definition at line 7 of file RadioMenuFlyoutItem.properties.h.

Constructor & Destructor Documentation

RadioMenuFlyoutItemProperties ( )

Definition at line 20 of file RadioMenuFlyoutItem.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

static winrt::DependencyProperty AreCheckStatesEnabledProperty ( ) [inline, static]

Definition at line 21 of file RadioMenuFlyoutItem.properties.h.

{ return s_AreCheckStatesEnabledProperty; }

void ClearProperties ( ) [static]

Definition at line 62 of file RadioMenuFlyoutItem.properties.cpp.

{
    s_AreCheckStatesEnabledProperty = nullptr;
    s_GroupNameProperty = nullptr;
    s_IsCheckedProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 25 of file RadioMenuFlyoutItem.properties.cpp.

{
    if (!s_AreCheckStatesEnabledProperty)
    {
        s_AreCheckStatesEnabledProperty =
            InitializeDependencyProperty(
                L"AreCheckStatesEnabled",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::RadioMenuFlyoutItem>(),
                true /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(false),
                &RadioMenuFlyoutItem::OnAreCheckStatesEnabledPropertyChanged);
    }
    if (!s_GroupNameProperty)
    {
        s_GroupNameProperty =
            InitializeDependencyProperty(
                L"GroupName",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::RadioMenuFlyoutItem>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnGroupNamePropertyChanged));
    }
    if (!s_IsCheckedProperty)
    {
        s_IsCheckedProperty =
            InitializeDependencyProperty(
                L"IsChecked",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::RadioMenuFlyoutItem>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsCheckedPropertyChanged));
    }
}

bool GetAreCheckStatesEnabled ( winrt::MenuFlyoutSubItem const & target ) [static]

Definition at line 91 of file RadioMenuFlyoutItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(target.GetValue(s_AreCheckStatesEnabledProperty));
}

winrt::hstring GroupName ( )

Definition at line 104 of file RadioMenuFlyoutItem.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RadioMenuFlyoutItem*>(this)->GetValue(s_GroupNameProperty));
}

void GroupName ( winrt::hstring const & value )

Definition at line 96 of file RadioMenuFlyoutItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadioMenuFlyoutItem*>(this)->SetValue(s_GroupNameProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty GroupNameProperty ( ) [inline, static]

Definition at line 22 of file RadioMenuFlyoutItem.properties.h.

{ return s_GroupNameProperty; }

void IsChecked ( bool value )

Definition at line 109 of file RadioMenuFlyoutItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RadioMenuFlyoutItem*>(this)->SetValue(s_IsCheckedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsChecked ( )

Definition at line 117 of file RadioMenuFlyoutItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<RadioMenuFlyoutItem*>(this)->GetValue(s_IsCheckedProperty));
}

static winrt::DependencyProperty IsCheckedProperty ( ) [inline, static]

Definition at line 23 of file RadioMenuFlyoutItem.properties.h.

{ return s_IsCheckedProperty; }

void OnGroupNamePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 69 of file RadioMenuFlyoutItem.properties.cpp.

{
    auto owner = sender.as<winrt::RadioMenuFlyoutItem>();
    winrt::get_self<RadioMenuFlyoutItem>(owner)->OnPropertyChanged(args);
}

void OnIsCheckedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 77 of file RadioMenuFlyoutItem.properties.cpp.

{
    auto owner = sender.as<winrt::RadioMenuFlyoutItem>();
    winrt::get_self<RadioMenuFlyoutItem>(owner)->OnPropertyChanged(args);
}

void SetAreCheckStatesEnabled | ( | winrt::MenuFlyoutSubItem const & | target,
 |  | bool | value |
 | ) |  |  | [static]

Definition at line 86 of file RadioMenuFlyoutItem.properties.cpp.

{
    target.SetValue(s_AreCheckStatesEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
}

Member Data Documentation

GlobalDependencyProperty s_AreCheckStatesEnabledProperty [static]

Definition at line 25 of file RadioMenuFlyoutItem.properties.h.

GlobalDependencyProperty s_GroupNameProperty [static]

Definition at line 26 of file RadioMenuFlyoutItem.properties.h.

GlobalDependencyProperty s_IsCheckedProperty [static]

Definition at line 27 of file RadioMenuFlyoutItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RadioMenuFlyoutItem.properties.h
  • Generated/RadioMenuFlyoutItem.properties.cpp
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

RatingControl Class Reference

#include "RatingControl.h"

Inherits ReferenceTracker< RatingControl, winrt::implementation::RatingControlT >, and RatingControlProperties.

List of all members.

Public Member Functions

RatingControl ()
~RatingControl ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnKeyDown (winrt::KeyRoutedEventArgs const &e)
void | OnPreviewKeyDown (winrt::KeyRoutedEventArgs const &e)
void | OnPreviewKeyUp (winrt::KeyRoutedEventArgs const &e)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

float | ActualRatingFontSize ()
void | ApplyScaleExpressionAnimation (const winrt::UIElement &uiElement, int starIndex)
double | CalculateActualRatingWidth ()
double | CalculateStarCenter (int starIndex)
double | CalculateTotalRatingControlWidth ()
void | ChangeRatingBy (double increase, bool originatedFromMouse)
double | CoerceValueBetweenMinAndMax (double value)
void | CustomizeRatingItem (const winrt::UIElement &ui, RatingControlStates type)
void | CustomizeStackPanel (const winrt::StackPanel &stackPanel, RatingControlStates state)
void | EnsureResourcesLoaded ()
void | EnterGamepadEngagementMode ()
void | ExitGamepadEngagementMode ()
winrt::hstring | GetAppropriateGlyph (RatingControlStates type)
winrt::ImageSource | GetAppropriateImageSource (RatingControlStates type)
winrt::hstring | GetNextGlyphIfNull (winrt::hstring glyph, RatingControlStates fallbackType=RatingControlStates::Set)
winrt::ImageSource | GetNextImageIfNull (winrt::ImageSource image, RatingControlStates fallbackType=RatingControlStates::Set)
bool | IsItemInfoPresentAndFontInfo ()
bool | IsItemInfoPresentAndImageInfo ()
double | ItemSpacing ()
void | OnCaptionChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnCaptionSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnFocusDisengaged (const winrt::Control &sender, const winrt::FocusDisengagedEventArgs &args)
void | OnFocusEngaged (const winrt::Control &sender, const winrt::FocusEngagedEventArgs &args)
void | OnFontFamilyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnInitialSetValueChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsClearEnabledChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsEnabledChanged (const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsReadOnlyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnItemInfoChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnMaxRatingChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnPlaceholderValueChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnPointerCancelledBackgroundStackPanel (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPointerCaptureLostBackgroundStackPanel (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPointerEnteredBackgroundStackPanel (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPointerExitedBackgroundStackPanel (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPointerMovedOverBackgroundStackPanel (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPointerPressedBackgroundStackPanel (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnPointerReleasedBackgroundStackPanel (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnTextScaleFactorChanged (const winrt::UISettings &setting, const winrt::IInspectable &args)
void | OnValueChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | PointerExitedImpl (const winrt::PointerRoutedEventArgs &args, bool resetScaleAnimation=true)
void | PopulateStackPanelWithItems (wstring_view templateName, const winrt::StackPanel &stackPanel, RatingControlStates state)
void | RecycleEvents (bool useSafeGet=false)
float | RenderingRatingFontSize ()
void | ReRenderCaption ()
void | ResetControlWidth ()
void | SetRatingTo (double newRating, bool originatedFromMouse)
void | StampOutRatingItems ()
void | UpdateCaptionMargins ()
void | UpdateRatingItemsAppearance ()

Static Private Member Functions

static winrt::UISettings | GetUISettings ()

Detailed Description

Definition at line 30 of file RatingControl.h.

Constructor & Destructor Documentation

RatingControl ( )

Definition at line 29 of file RatingControl.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_RatingControl);

    SetDefaultStyleKey(this);
}

~RatingControl ( )

Definition at line 36 of file RatingControl.cpp.

{
    // We only need to use safe_get in the deconstruction loop
    RecycleEvents(true /* useSafeGet */);
}

Member Function Documentation

float ActualRatingFontSize ( ) [private]

Definition at line 50 of file RatingControl.cpp.

{
    return RenderingRatingFontSize() / 2;
}

void ApplyScaleExpressionAnimation | ( | const winrt::UIElement & | uiElement,
 |  | int | starIndex |
 | ) |  |  | [private]

Definition at line 311 of file RatingControl.cpp.

{
    const winrt::Visual uiElementVisual = winrt::ElementCompositionPreview::GetElementVisual(uiElement);
    const winrt::Compositor comp = uiElementVisual.Compositor();

    // starsScaleFocalPoint is updated in OnPointerMovedOverBackgroundStackPanel.
    // This expression uses the horizontal delta between pointer position and star center to calculate the star scale.
    // Star gets larger when pointer is closer to its center, and gets smaller when pointer moves further away.
    const winrt::ExpressionAnimation ea = comp.CreateExpressionAnimation(
        L"max( (-0.0005 * sharedPropertySet.pointerScalar * ((starCenterX - sharedPropertySet.starsScaleFocalPoint)*(starCenterX - sharedPropertySet.starsScaleFocalPoint))) + 1.0*sharedPropertySet.pointerScalar, 0.5)"
    );
    const auto starCenter = static_cast<float>(CalculateStarCenter(starIndex));
    ea.SetScalarParameter(L"starCenterX", starCenter);
    ea.SetReferenceParameter(L"sharedPropertySet", m_sharedPointerPropertySet);

    uiElementVisual.StartAnimation(L"Scale.X", ea);
    uiElementVisual.StartAnimation(L"Scale.Y", ea);

    EnsureResourcesLoaded();

    uiElementVisual.CenterPoint(winrt::float3(static_cast<float>(m_fontSizeForRendering * c_horizontalScaleAnimationCenterPoint), static_cast<float>(m_fontSizeForRendering * c_verticalScaleAnimationCenterPoint), 0.0f));
}

double CalculateActualRatingWidth ( ) [private]

Definition at line 929 of file RatingControl.cpp.

{
    // TODO: replace hardcoding
    // MSFT #10030063
    // (max rating * rating size) + ((max rating - 1) * item spacing)
    return (static_cast<double>(MaxRating()) * ActualRatingFontSize()) + ((static_cast<double>(MaxRating()) - 1) * ItemSpacing());
}

double CalculateStarCenter ( int starIndex ) [private]

Definition at line 921 of file RatingControl.cpp.

{
    // TODO: sub in real API DP values
    // MSFT #10030063
    // [real Rating Size * (starIndex + 0.5)] + (starIndex * itemSpacing)
    return (ActualRatingFontSize() * (starIndex + 0.5)) + (starIndex * ItemSpacing());
}

double CalculateTotalRatingControlWidth ( ) [private]

Definition at line 900 of file RatingControl.cpp.

{
    const double ratingStarsWidth = CalculateActualRatingWidth();
    const auto captionAsWinRT = unbox_value<winrt::hstring>(GetValue(s_CaptionProperty));
    double textSpacing = 0.0;

    if (captionAsWinRT.size() > 0)
    {
        textSpacing = ItemSpacing();
    }

    double captionWidth = 0.0;

    if (m_captionTextBlock)
    {
        captionWidth = m_captionTextBlock.get().ActualWidth();
    }

    return ratingStarsWidth + textSpacing + captionWidth;
}

void ChangeRatingBy | ( | double | increase,
 |  | bool | originatedFromMouse |
 | ) |  |  | [private]

Definition at line 524 of file RatingControl.cpp.

{
    if (change != 0.0)
    {
        double ratingValue = 0.0;
        double oldRatingValue = Value();
        if (oldRatingValue != c_noValueSetSentinel)
        {
            // If the Value was programmatically set to a fraction, drop that fraction before we modify it
            if ((int)Value() != Value())
            {
                if (change == -1)
                {
                    ratingValue = (int)Value();
                }
                else
                {
                    ratingValue = (int)Value() + change;
                }
            }
            else
            {
                oldRatingValue = ratingValue = oldRatingValue;
                ratingValue += change;
            }
        }
        else
        {
            ratingValue = InitialSetValue();
        }

        SetRatingTo(ratingValue, originatedFromMouse);
    }
}

double CoerceValueBetweenMinAndMax ( double value ) [private]

Definition at line 150 of file RatingControl.cpp.

{
    if (value < 0.0) // Force all negative values to the sentinel "unset" value.
    {
        value = c_noValueSetSentinel;
    }
    else if (value <= 1.0)
    {
        value = 1.0;
    }
    else if (value > MaxRating())
    {
        value = MaxRating();
    }

    return value;
}

void CustomizeRatingItem | ( | const winrt::UIElement & | ui,
 |  | RatingControlStates | type |
 | ) |  |  | [private]

Definition at line 378 of file RatingControl.cpp.

{
    if (IsItemInfoPresentAndFontInfo())
    {
        if (auto textBlock = ui.as<winrt::TextBlock>())
        {
            textBlock.FontFamily(FontFamily());
            textBlock.Text(GetAppropriateGlyph(type));
            textBlock.FontSize(m_fontSizeForRendering);
        }
    }
    else if (IsItemInfoPresentAndImageInfo())
    {
        if (auto image = ui.as<winrt::Image>())
        {
            image.Source(GetAppropriateImageSource(type));
            image.Width(RenderingRatingFontSize()); //
            image.Height(RenderingRatingFontSize()); // MSFT #10030063 Replacing with Rating size DPs
        }
    }
    else
    {
        MUX_FAIL_FAST_MSG("Runtime error, ItemInfo property is null");
    }

    if (auto fe = ui.try_as<winrt::FrameworkElement>())
    {
        // The default top margin is -8, but we want to increase or decrease that so that the center of the stars stays in a consistent place.
        // To do that, we'll add on half of the difference between the actual font size and its default value.
        auto margin = fe.Margin();
        margin.Top = -8 + (16 - ActualRatingFontSize());
        fe.Margin(margin);
    }
}

void CustomizeStackPanel | ( | const winrt::StackPanel & | stackPanel,
 |  | RatingControlStates | state |
 | ) |  |  | [private]

Definition at line 413 of file RatingControl.cpp.

{
    for (winrt::UIElement child : stackPanel.Children())
    {
        CustomizeRatingItem(child, state);
    }
}

void EnsureResourcesLoaded ( ) [private]

Definition at line 1212 of file RatingControl.cpp.

{
    if (!m_resourcesLoaded)
    {
        auto fontSizeForRenderingKey = box_value(c_fontSizeForRenderingKey);
        auto itemSpacingKey = box_value(c_itemSpacingKey);

        if (Resources().HasKey(fontSizeForRenderingKey))
        {
            m_fontSizeForRendering = unbox_value<double>(Resources().Lookup(fontSizeForRenderingKey));
        }
        else if (winrt::Application::Current().Resources().HasKey(fontSizeForRenderingKey))
        {
            m_fontSizeForRendering = unbox_value<double>(winrt::Application::Current().Resources().Lookup(fontSizeForRenderingKey));
        }
        else
        {
            m_fontSizeForRendering = c_defaultFontSizeForRendering;
        }

        if (Resources().HasKey(itemSpacingKey))
        {
            m_itemSpacing = unbox_value<double>(Resources().Lookup(itemSpacingKey));
        }
        else if (winrt::Application::Current().Resources().HasKey(itemSpacingKey))
        {
            m_itemSpacing = unbox_value<double>(winrt::Application::Current().Resources().Lookup(itemSpacingKey));
        }
        else
        {
            m_itemSpacing = c_defaultItemSpacing;
        }

        m_resourcesLoaded = true;
    }
}

void EnterGamepadEngagementMode ( ) [private]

Definition at line 1107 of file RatingControl.cpp.

{
    double currentValue = Value();
    m_shouldDiscardValue = true;

    if (currentValue == c_noValueSetSentinel)
    {
        Value(InitialSetValue());
        // Notify that the Value has changed
        m_valueChangedEventSource(*this, nullptr);
        currentValue = InitialSetValue();
        m_preEngagementValue = -1;
    }
    else
    {
        currentValue = Value();
        m_preEngagementValue = currentValue;
    }

    winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::Invoke);
}

void ExitGamepadEngagementMode ( ) [private]

Definition at line 1129 of file RatingControl.cpp.

{
    winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::GoBack);

    m_sharedPointerPropertySet.InsertScalar(L"starsScaleFocalPoint", c_noPointerOverMagicNumber);
    m_disengagedWithA = false;
}

winrt::hstring GetAppropriateGlyph ( RatingControlStates type ) [private]

Definition at line 421 of file RatingControl.cpp.

{
    if (!IsItemInfoPresentAndFontInfo())
    {
        MUX_FAIL_FAST_MSG("Runtime error, tried to retrieve a glyph when the ItemInfo is not a RatingItemGlyphInfo");
    }

    winrt::RatingItemFontInfo rifi = ItemInfo().as<winrt::RatingItemFontInfo>();

    switch (type)
    {
    case RatingControlStates::Disabled:
        return GetNextGlyphIfNull(rifi.DisabledGlyph(), RatingControlStates::Set);
        break;
    case RatingControlStates::PointerOverSet:
        return GetNextGlyphIfNull(rifi.PointerOverGlyph(), RatingControlStates::Set);
        break;
    case RatingControlStates::PointerOverPlaceholder:
        return GetNextGlyphIfNull(rifi.PointerOverPlaceholderGlyph(), RatingControlStates::Placeholder);
        break;
    case RatingControlStates::Placeholder:
        return GetNextGlyphIfNull(rifi.PlaceholderGlyph(), RatingControlStates::Set);
        break;
    case RatingControlStates::Unset:
        return GetNextGlyphIfNull(rifi.UnsetGlyph(), RatingControlStates::Set);
        break;
    case RatingControlStates::Null:
        return {};
        break;
    default:
        return rifi.Glyph(); // "Set" state
        break;
    }
}

winrt::ImageSource GetAppropriateImageSource ( RatingControlStates type ) [private]

Definition at line 469 of file RatingControl.cpp.

{
    if (!IsItemInfoPresentAndImageInfo())
    {
        MUX_ASSERT_MSG(false, "Runtime error, tried to retrieve an image when the ItemInfo is not a RatingItemImageInfo");
    }

    winrt::RatingItemImageInfo imageInfo = ItemInfo().as<winrt::RatingItemImageInfo>();

    switch (type)
    {
    case RatingControlStates::Disabled:
        return GetNextImageIfNull(imageInfo.DisabledImage(), RatingControlStates::Set);
        break;
    case RatingControlStates::PointerOverSet:
        return GetNextImageIfNull(imageInfo.PointerOverImage(), RatingControlStates::Set);
        break;
    case RatingControlStates::PointerOverPlaceholder:
        return GetNextImageIfNull(imageInfo.PointerOverPlaceholderImage(), RatingControlStates::Placeholder);
        break;
    case RatingControlStates::Placeholder:
        return GetNextImageIfNull(imageInfo.PlaceholderImage(), RatingControlStates::Set);
        break;
    case RatingControlStates::Unset:
        return GetNextImageIfNull(imageInfo.UnsetImage(), RatingControlStates::Set);
        break;
    case RatingControlStates::Null:
        return nullptr;
        break;
    default:
        return imageInfo.Image(); // "Set" state
        break;
    }
}

winrt::hstring GetNextGlyphIfNull | ( | winrt::hstring | glyph,
 |  | RatingControlStates | fallbackType = RatingControlStates::Set |
 | ) |  |  | [private]

Definition at line 456 of file RatingControl.cpp.

{
    if (glyph.size() == 0)
    {
        if (fallbackType == RatingControlStates::Null)
        {
            return {};
        }
        return GetAppropriateGlyph(fallbackType);
    }
    return glyph;
}

winrt::ImageSource GetNextImageIfNull | ( | winrt::ImageSource | image,
 |  | RatingControlStates | fallbackType = RatingControlStates::Set |
 | ) |  |  | [private]

Definition at line 504 of file RatingControl.cpp.

{
    if (!image)
    {
        if (fallbackType == RatingControlStates::Null)
        {
            return nullptr;
        }
        return GetAppropriateImageSource(fallbackType);
    }
    return image;
}

winrt::UISettings GetUISettings ( ) [static, private]

Definition at line 1206 of file RatingControl.cpp.

{
    static winrt::UISettings uiSettings = winrt::UISettings();
    return uiSettings;
}

bool IsItemInfoPresentAndFontInfo ( ) [inline, private]

Definition at line 92 of file RatingControl.h.

    {
        return m_infoType == RatingInfoType::Font;
    };

bool IsItemInfoPresentAndImageInfo ( ) [inline, private]

Definition at line 96 of file RatingControl.h.

    {
        return m_infoType == RatingInfoType::Image;
    };

double ItemSpacing ( ) [private]

Definition at line 56 of file RatingControl.cpp.

{
    EnsureResourcesLoaded();

    // Stars are rendered 2x size and we use expression animation to shrink them down to desired size,
    // which will create those spacings (not system margin).
    // Since text scale factor won't affect system margins,
    // when stars get bigger, the spacing will become smaller.
    // Therefore we should include TextScaleFactor when calculating item spacing
    // in order to get correct total width and star center positions.
    const double defaultFontSize = m_fontSizeForRendering / 2;
    return m_itemSpacing - (GetUISettings().TextScaleFactor() - 1.0) * defaultFontSize / 2;
}

void OnApplyTemplate ( )

Definition at line 93 of file RatingControl.cpp.

{
    RecycleEvents();

    // Retrieve pointers to stable controls
    winrt::IControlProtected thisAsControlProtected = *this;

    if (auto captionStackPanel = GetTemplateChildT<winrt::StackPanel>(L"CaptionStackPanel", thisAsControlProtected))
    {
        m_captionStackPanel.set(captionStackPanel);
    }

    if (auto captionTextBlock = GetTemplateChildT<winrt::TextBlock>(L"Caption", thisAsControlProtected))
    {
        m_captionTextBlock.set(captionTextBlock);
        m_captionSizeChangedToken = captionTextBlock.SizeChanged({ this, &RatingControl::OnCaptionSizeChanged });
        UpdateCaptionMargins();
    }

    if (auto backgroundStackPanel = GetTemplateChildT<winrt::StackPanel>(L"RatingBackgroundStackPanel", thisAsControlProtected))
    {
        m_backgroundStackPanel.set(backgroundStackPanel);
        m_pointerCancelledToken = backgroundStackPanel.PointerCanceled({ this, &RatingControl::OnPointerCancelledBackgroundStackPanel });
        m_pointerCaptureLostToken = backgroundStackPanel.PointerCaptureLost({ this, &RatingControl::OnPointerCaptureLostBackgroundStackPanel });
        m_pointerMovedToken = backgroundStackPanel.PointerMoved({ this, &RatingControl::OnPointerMovedOverBackgroundStackPanel });
        m_pointerEnteredToken = backgroundStackPanel.PointerEntered({ this, &RatingControl::OnPointerEnteredBackgroundStackPanel });
        m_pointerExitedToken = backgroundStackPanel.PointerExited({ this, &RatingControl::OnPointerExitedBackgroundStackPanel });
        m_pointerPressedToken = backgroundStackPanel.PointerPressed({ this, &RatingControl::OnPointerPressedBackgroundStackPanel });
        m_pointerReleasedToken = backgroundStackPanel.PointerReleased({ this, &RatingControl::OnPointerReleasedBackgroundStackPanel });
    }

    m_foregroundStackPanel.set(GetTemplateChildT<winrt::StackPanel>(L"RatingForegroundStackPanel", thisAsControlProtected));

    // FUTURE: Ideally these would be in template overrides:

    // IsFocusEngagementEnabled means the control has to be "engaged" with
    // using the A button before it actually receives key input from gamepad.
    FocusEngaged({ this, &RatingControl::OnFocusEngaged });
    FocusDisengaged({ this, &RatingControl::OnFocusDisengaged });

    IsEnabledChanged({ this, &RatingControl::OnIsEnabledChanged });
    m_fontFamilyChangedToken.value = RegisterPropertyChangedCallback(
        winrt::Control::FontFamilyProperty(), { this, &RatingControl::OnFontFamilyChanged });

    winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(*this);
    winrt::Compositor comp = visual.Compositor();

    m_sharedPointerPropertySet = comp.CreatePropertySet();

    m_sharedPointerPropertySet.InsertScalar(L"starsScaleFocalPoint", c_noPointerOverMagicNumber);
    m_sharedPointerPropertySet.InsertScalar(L"pointerScalar", c_mouseOverScale);

    StampOutRatingItems();
    m_textScaleChangedRevoker = GetUISettings().TextScaleFactorChanged(winrt::auto_revoke, { this, &RatingControl::OnTextScaleFactorChanged });
}

void OnCaptionChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 668 of file RatingControl.cpp.

{
    ReRenderCaption();
}

void OnCaptionSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 779 of file RatingControl.cpp.

{
    ResetControlWidth();
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 169 of file RatingControl.cpp.

{
    return winrt::make<RatingControlAutomationPeer>(*this);
}

void OnFocusDisengaged | ( | const winrt::Control & | sender,
 |  | const winrt::FocusDisengagedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1082 of file RatingControl.cpp.

{
    // Revert value:
    // for catching programmatic disengagements, gamepad ones are handled in OnPreviewKeyDown
    if (m_shouldDiscardValue)
    {
        bool valueChanged = false;

        if (Value() != m_preEngagementValue)
        {
            valueChanged = true;
        }

        Value(m_preEngagementValue);
        m_preEngagementValue = -1.0f;

        if (valueChanged)
        {
            m_valueChangedEventSource(*this, nullptr);
        }
    }

    ExitGamepadEngagementMode();
}

void OnFocusEngaged | ( | const winrt::Control & | sender,
 |  | const winrt::FocusEngagedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1074 of file RatingControl.cpp.

{
    if (!IsReadOnly())
    {
        EnterGamepadEngagementMode();
    }
}

void OnFontFamilyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 673 of file RatingControl.cpp.

{
    if (m_backgroundStackPanel) // We don't want to do this for the initial property set
    {
        for (int i = 0; i < MaxRating(); i++)
        {
            // FUTURE: handle image rating items
            if (auto backgroundTB = m_backgroundStackPanel.get().Children().GetAt(i).try_as<winrt::TextBlock>())
            {
                CustomizeRatingItem(backgroundTB, RatingControlStates::Unset);
            }

            if (auto foregroundTB = m_foregroundStackPanel.get().Children().GetAt(i).try_as<winrt::TextBlock>())
            {
                CustomizeRatingItem(foregroundTB, RatingControlStates::Set);
            }
        }
    }

    UpdateRatingItemsAppearance();
}

void OnInitialSetValueChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 695 of file RatingControl.cpp.

{

}

void OnIsClearEnabledChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 700 of file RatingControl.cpp.

{

}

void OnIsEnabledChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 773 of file RatingControl.cpp.

{
    // MSFT 11521414 TODO: change states (add a state)
    UpdateRatingItemsAppearance();
}

void OnIsReadOnlyChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 705 of file RatingControl.cpp.

{
    // TODO: Colour changes - see spec
}

void OnItemInfoChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 710 of file RatingControl.cpp.

{
    bool changedType = false;

    if (!ItemInfo())
    {
        m_infoType = RatingInfoType::None;
    }
    else if (ItemInfo().try_as<winrt::RatingItemFontInfo>())
    {
        if (m_infoType != RatingInfoType::Font && m_backgroundStackPanel /* prevent calling StampOutRatingItems() twice at initialisation */)
        {
            m_infoType = RatingInfoType::Font;
            StampOutRatingItems();
            changedType = true;
        }
    }
    else
    {
        if (m_infoType != RatingInfoType::Image)
        {
            m_infoType = RatingInfoType::Image;
            StampOutRatingItems();
            changedType = true;
        }
    }

    // We don't want to do this for the initial property set
    // Or if we just stamped them out
    if (m_backgroundStackPanel && !changedType)
    {
        for (int i = 0; i < MaxRating(); i++)
        {
            CustomizeRatingItem(m_backgroundStackPanel.get().Children().GetAt(i), RatingControlStates::Unset);
            CustomizeRatingItem(m_foregroundStackPanel.get().Children().GetAt(i), RatingControlStates::Set);
        }
    }

    UpdateRatingItemsAppearance();
}

void OnKeyDown ( winrt::KeyRoutedEventArgs const & e )

Definition at line 938 of file RatingControl.cpp.

{
    if (eventArgs.Handled())
    {
        return;
    }

    if (!IsReadOnly())
    {
        bool handled = false;
        winrt::VirtualKey key = eventArgs.as<winrt::KeyRoutedEventArgs>().Key();

        double flowDirectionReverser = 1.0;

        if (FlowDirection() == winrt::FlowDirection::RightToLeft)
        {
            flowDirectionReverser *= -1.0;
        }

        auto originalKey = eventArgs.as<winrt::KeyRoutedEventArgs>().OriginalKey();

        // Up down are right/left in keyboard only
        if (originalKey == winrt::VirtualKey::Up)
        {
            key = winrt::VirtualKey::Right;
            flowDirectionReverser = 1.0;
        }
        else if (originalKey == winrt::VirtualKey::Down)
        {
            key = winrt::VirtualKey::Left;
            flowDirectionReverser = 1.0;
        }

        if (originalKey == winrt::VirtualKey::GamepadDPadLeft || originalKey == winrt::VirtualKey::GamepadDPadRight ||
            originalKey == winrt::VirtualKey::GamepadLeftThumbstickLeft || originalKey == winrt::VirtualKey::GamepadLeftThumbstickRight)
        {
            winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::Focus);
        }

        switch (key)
        {
        case winrt::VirtualKey::Left:
            ChangeRatingBy(-1.0 * flowDirectionReverser, false);
            handled = true;
            break;
        case winrt::VirtualKey::Right:
            ChangeRatingBy(1.0 * flowDirectionReverser, false);
            handled = true;
            break;
        case winrt::VirtualKey::Home:
            SetRatingTo(0.0, false);
            handled = true;
            break;
        case winrt::VirtualKey::End:
            SetRatingTo(static_cast<double>(MaxRating()), false);
            handled = true;
            break;
        default:
            break;
        }

        eventArgs.Handled(handled);
    }

    __super::OnKeyDown(eventArgs);
}

void OnMaxRatingChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 751 of file RatingControl.cpp.

{
    StampOutRatingItems();
}

void OnPlaceholderValueChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 756 of file RatingControl.cpp.

{
    UpdateRatingItemsAppearance();
}

void OnPointerCancelledBackgroundStackPanel | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 784 of file RatingControl.cpp.

{
    PointerExitedImpl(args);
}

void OnPointerCaptureLostBackgroundStackPanel | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 789 of file RatingControl.cpp.

{
    // We capture the pointer because we want to support the drag off the
    // left side to clear the rating scenario. However, this means that
    // when we simply click to set values - we get here, but we don't want
    // to reset the scaling on the stars underneath the pointer.
    PointerExitedImpl(args, false /* resetScaleAnimation */);
    m_hasPointerCapture = false;
}

void OnPointerEnteredBackgroundStackPanel | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 816 of file RatingControl.cpp.

{
    if (!IsReadOnly())
    {
        m_isPointerOver = true;

        if (auto backgroundStackPanel = m_backgroundStackPanel.get())
        {
            if (MaxRating() >= 1)
            {
                auto firstItem = backgroundStackPanel.Children().GetAt(0).as<winrt::UIElement>();
                auto firstItemOffsetPoint = firstItem.TransformToVisual(backgroundStackPanel).TransformPoint({ 0, 0 });
                m_firstItemOffset = firstItemOffsetPoint.X;
            }
        }

        args.Handled(true);
    }
}

void OnPointerExitedBackgroundStackPanel | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 836 of file RatingControl.cpp.

{
    PointerExitedImpl(args);
}

void OnPointerMovedOverBackgroundStackPanel | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 799 of file RatingControl.cpp.

{
    if (!IsReadOnly())
    {
        if (auto backgroundStackPanel = m_backgroundStackPanel.get())
        {
            const auto point = args.GetCurrentPoint(backgroundStackPanel);
            const float xPosition = point.Position().X;

            m_mousePercentage = static_cast<double>(xPosition - m_firstItemOffset) / CalculateActualRatingWidth();

            UpdateRatingItemsAppearance();
            args.Handled(true);
        }
    }
}

void OnPointerPressedBackgroundStackPanel | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 867 of file RatingControl.cpp.

{
    if (!IsReadOnly())
    {
        m_isPointerDown = true;

        // We capture the pointer on pointer down because we want to support
        // the drag off the left side to clear the rating scenario.
        m_backgroundStackPanel.get().CapturePointer(args.Pointer());
        m_hasPointerCapture = true;
    }
}

void OnPointerReleasedBackgroundStackPanel | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 880 of file RatingControl.cpp.

{
    if (!IsReadOnly())
    {
        const auto point = args.GetCurrentPoint(m_backgroundStackPanel.get());
        const auto xPosition = point.Position().X;

        const double mousePercentage = xPosition / CalculateActualRatingWidth();
        SetRatingTo(ceil(mousePercentage * MaxRating()), true);

        winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::Invoke);
    }

    if (m_isPointerDown)
    {
        m_isPointerDown = false;
        UpdateRatingItemsAppearance();
    }
}

void OnPreviewKeyDown ( winrt::KeyRoutedEventArgs const & e )

Definition at line 1020 of file RatingControl.cpp.

{
    if (eventArgs.Handled())
    {
        return;
    }

    if (!IsReadOnly() && IsFocusEngaged() && IsFocusEngagementEnabled())
    {
        auto originalKey = eventArgs.as<winrt::KeyRoutedEventArgs>().OriginalKey();
        if (originalKey == winrt::VirtualKey::GamepadA)
        {
            m_shouldDiscardValue = false;
            m_preEngagementValue = -1.0;
            RemoveFocusEngagement();
            m_disengagedWithA = true;
            eventArgs.Handled(true);
        }
        else if (originalKey == winrt::VirtualKey::GamepadB)
        {
            bool valueChanged = false;
            m_shouldDiscardValue = false;

            if (Value() != m_preEngagementValue)
            {
                valueChanged = true;
            }

            Value(m_preEngagementValue);

            if (valueChanged)
            {
                m_valueChangedEventSource(*this, nullptr);
            }

            m_preEngagementValue = -1.0;
            RemoveFocusEngagement();
            eventArgs.Handled(true);
        }
    }
}

void OnPreviewKeyUp ( winrt::KeyRoutedEventArgs const & e )

Definition at line 1062 of file RatingControl.cpp.

{
    auto originalKey = eventArgs.as<winrt::KeyRoutedEventArgs>().OriginalKey();

    if (IsFocusEngagementEnabled() && originalKey == winrt::VirtualKey::GamepadA && m_disengagedWithA)
    {
        // Block the re-engagement
        m_disengagedWithA = false; // We want to do this regardless of handled
        eventArgs.Handled(true);
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 595 of file RatingControl.cpp.

{
    auto property = args.Property();
    // Do coercion first.
    if (property == s_MaxRatingProperty)
    {
        // Enforce minimum MaxRating
        auto value = winrt::unbox_value<int>(args.NewValue());
        auto coercedValue = std::max(1, value);

        if (Value() > coercedValue)
        {
            Value(coercedValue);
        }

        if (PlaceholderValue() > coercedValue)
        {
            PlaceholderValue(coercedValue);
        }

        if (coercedValue != value)
        {
            SetValue(property, winrt::box_value(coercedValue));
            return;
        }
    }
    else if (property == s_PlaceholderValueProperty || property == s_ValueProperty)
    {
        const auto value = winrt::unbox_value<double>(args.NewValue());
        const auto coercedValue = CoerceValueBetweenMinAndMax(value);
        if (value != coercedValue)
        {
            SetValue(property, winrt::box_value(coercedValue));
            // early return, we'll come back to handle the change to the corced value.
            return;
        }
    }

    // Property value changed handling.
    if (property == s_CaptionProperty)
    {
        OnCaptionChanged(args);
    }
    else if (property == s_InitialSetValueProperty)
    {
        OnInitialSetValueChanged(args);
    }
    else if (property == s_IsClearEnabledProperty)
    {
        OnIsClearEnabledChanged(args);
    }
    else if (property == s_IsReadOnlyProperty)
    {
        OnIsReadOnlyChanged(args);
    }
    else if (property == s_ItemInfoProperty)
    {
        OnItemInfoChanged(args);
    }
    else if (property == s_MaxRatingProperty)
    {
        OnMaxRatingChanged(args);
    }
    else if (property == s_PlaceholderValueProperty)
    {
        OnPlaceholderValueChanged(args);
    }
    else if (property == s_ValueProperty)
    {
        OnValueChanged(args);
    }
}

void OnTextScaleFactorChanged | ( | const winrt::UISettings & | setting,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 1194 of file RatingControl.cpp.

{
    // OnTextScaleFactorChanged happens in non-UI thread, use dispatcher to call StampOutRatingItems in UI thread.
    auto strongThis = get_strong();
    m_dispatcherHelper.RunAsync([strongThis]()
        {
            strongThis->StampOutRatingItems();
            strongThis->UpdateCaptionMargins();
        });

}

void OnValueChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 761 of file RatingControl.cpp.

{
    // Fire property change for UIA
    if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
    {
        auto ratingPeer = peer.as<winrt::RatingControlAutomationPeer>();
        winrt::get_self<RatingControlAutomationPeer>(ratingPeer)->RaisePropertyChangedEvent(Value());
    }

    UpdateRatingItemsAppearance();
}

void PointerExitedImpl | ( | const winrt::PointerRoutedEventArgs & | args,
 |  | bool | resetScaleAnimation = true |
 | ) |  |  | [private]

Definition at line 841 of file RatingControl.cpp.

{
    if (resetScaleAnimation)
    {
        m_isPointerOver = false;
    }

    if (!m_isPointerDown)
    {
        // Only clear pointer capture when not holding pointer down for drag left to clear value scenario.
        if (m_hasPointerCapture)
        {
            m_backgroundStackPanel.get().ReleasePointerCapture(args.Pointer());
            m_hasPointerCapture = false;
        }

        if (resetScaleAnimation)
        {
            m_sharedPointerPropertySet.InsertScalar(L"starsScaleFocalPoint", c_noPointerOverMagicNumber);
        }
        UpdateRatingItemsAppearance();
    }

    args.Handled(true);
}

void PopulateStackPanelWithItems | ( | wstring_view | templateName,
 |  | const winrt::StackPanel & | stackPanel,
 |  | RatingControlStates | state |
 | ) |  |  | [private]

Definition at line 334 of file RatingControl.cpp.

{
    winrt::IInspectable lookup = winrt::Application::Current().Resources().Lookup(box_value(templateName));
    auto dt = lookup.as<winrt::DataTemplate>();

    EnsureResourcesLoaded();

    for (int i = 0; i < MaxRating(); i++)
    {
        if (auto ui = dt.LoadContent().as<winrt::UIElement>())
        {
            CustomizeRatingItem(ui, state);
            stackPanel.Children().Append(ui);
            ApplyScaleExpressionAnimation(ui, i);
        }
    }

    // If we have at least one item, we'll use the first item as a representative element to determine some values.
    if (MaxRating() >= 1)
    {
        auto firstItem = stackPanel.Children().GetAt(0).as<winrt::UIElement>();
        firstItem.Measure({ std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() });
        auto defaultItemSpacing = firstItem.DesiredSize().Width - ActualRatingFontSize();

        // We want the caption to be 12 pixels away from the right-hand side of the last item,
        // so we'll give it a left margin that accounts for the built-in item spacing.
        if (auto captionTextBlock = m_captionTextBlock.get())
        {
            auto margin = captionTextBlock.Margin();
            margin.Left = 12 - defaultItemSpacing;
            captionTextBlock.Margin(margin);
        }

        // If we have at least two items, we'll need to apply the item spacing.
        // We'll calculate the default item spacing using the first item, and then
        // subtract it from the desired item spacing to get the Spacing property
        // to apply to the stack panel.
        if (MaxRating() >= 2)
        {
            stackPanel.Spacing(ItemSpacing() - defaultItemSpacing);
        }
    }
}

void RecycleEvents ( bool useSafeGet = false ) [private]

Definition at line 1137 of file RatingControl.cpp.

{
    if (auto backgroundStackPanel = m_backgroundStackPanel.safe_get(useSafeGet))
    {
        if (m_pointerCancelledToken.value)
        {
            backgroundStackPanel.PointerCanceled(m_pointerCancelledToken);
            m_pointerCancelledToken.value = 0;
        }

        if (m_pointerCaptureLostToken.value)
        {
            backgroundStackPanel.PointerCaptureLost(m_pointerCaptureLostToken);
            m_pointerCaptureLostToken.value = 0;
        }

        if (m_pointerMovedToken.value)
        {
            backgroundStackPanel.PointerMoved(m_pointerMovedToken);
            m_pointerMovedToken.value = 0;
        }

        if (m_pointerEnteredToken.value)
        {
            backgroundStackPanel.PointerEntered(m_pointerEnteredToken);
            m_pointerEnteredToken.value = 0;
        }

        if (m_pointerExitedToken.value)
        {
            backgroundStackPanel.PointerExited(m_pointerExitedToken);
            m_pointerExitedToken.value = 0;
        }

        if (m_pointerPressedToken.value)
        {
            backgroundStackPanel.PointerPressed(m_pointerPressedToken);
            m_pointerPressedToken.value = 0;
        }

        if (m_pointerReleasedToken.value)
        {
            backgroundStackPanel.PointerReleased(m_pointerReleasedToken);
            m_pointerReleasedToken.value = 0;
        }
    }

    if (auto captionTextBlock = m_captionTextBlock.safe_get(useSafeGet))
    {
        if (m_captionSizeChangedToken.value)
        {
            captionTextBlock.SizeChanged(m_captionSizeChangedToken);
            m_captionSizeChangedToken.value = 0;
        }
    }
}

float RenderingRatingFontSize ( ) [private]

Definition at line 42 of file RatingControl.cpp.

{
    EnsureResourcesLoaded();

    // MSFT #10030063 Replacing with Rating size DPs
    return (float)(m_fontSizeForRendering * GetUISettings().TextScaleFactor());
}

void ReRenderCaption ( ) [private]

Definition at line 214 of file RatingControl.cpp.

{
    if (auto captionTextBlock = m_captionTextBlock.get())
    {
        ResetControlWidth();
    }
}

void ResetControlWidth ( ) [private]

Definition at line 517 of file RatingControl.cpp.

{
    const double newWidth = CalculateTotalRatingControlWidth();
    const winrt::Control thisAsControl = *this;
    thisAsControl.Width(newWidth);
}

void SetRatingTo | ( | double | newRating,
 |  | bool | originatedFromMouse |
 | ) |  |  | [private]

Definition at line 559 of file RatingControl.cpp.

{
    double ratingValue = 0.0;
    const double oldRatingValue = Value();

    ratingValue = std::min(newRating, static_cast<double>(MaxRating()));
    ratingValue = std::max(ratingValue, 0.0);

    // The base case, and the you have no rating, and you pressed left case [wherein nothing should happen]
    if (oldRatingValue > c_noValueSetSentinel || ratingValue != 0.0)
    {
        if (!IsClearEnabled() && ratingValue <= 0.0)
        {
            Value(1.0);
        }
        else if (ratingValue == oldRatingValue && IsClearEnabled() && (ratingValue != MaxRating() || originatedFromMouse))
        {
            // If you increase the Rating via the keyboard/gamepad when it's maxed, the value should stay stable.
            // But if you click a star that represents the current Rating value, it should clear the rating.

            Value(c_noValueSetSentinel);
        }
        else if (ratingValue > 0.0)
        {
            Value(ratingValue);
        }
        else
        {
            Value(c_noValueSetSentinel);
        }

        // Notify that the Value has changed
        m_valueChangedEventSource(*this, nullptr);
    }
}

void StampOutRatingItems ( ) [private]

Definition at line 177 of file RatingControl.cpp.

{
    if (!m_backgroundStackPanel || !m_foregroundStackPanel)
    {
        // OnApplyTemplate() hasn't executed yet, this is being called
        // from a property value changed handler for markup set values.

        return;
    }

    // Background initialization:

    m_backgroundStackPanel.get().Children().Clear();

    if (IsItemInfoPresentAndFontInfo())
    {
        PopulateStackPanelWithItems(L"BackgroundGlyphDefaultTemplate", m_backgroundStackPanel.get(), RatingControlStates::Unset);
    }
    else if (IsItemInfoPresentAndImageInfo())
    {
        PopulateStackPanelWithItems(L"BackgroundImageDefaultTemplate", m_backgroundStackPanel.get(), RatingControlStates::Unset);
    }

    // Foreground initialization:
    m_foregroundStackPanel.get().Children().Clear();
    if (IsItemInfoPresentAndFontInfo())
    {
        PopulateStackPanelWithItems(L"ForegroundGlyphDefaultTemplate", m_foregroundStackPanel.get(), RatingControlStates::Set);
    }
    else if (IsItemInfoPresentAndImageInfo())
    {
        PopulateStackPanelWithItems(L"ForegroundImageDefaultTemplate", m_foregroundStackPanel.get(), RatingControlStates::Set);
    }

    UpdateRatingItemsAppearance();
}

void UpdateCaptionMargins ( ) [private]

Definition at line 70 of file RatingControl.cpp.

{
    // We manually set margins to caption text to make it center-aligned with the stars
    // When text scale changes we need to update top margin to make the text follow start center.
    if (auto captionTextBlock = m_captionTextBlock.safe_get())
    {
        double captionStackPanelTopMargin = 0;

        if (auto captionStackPanel = m_captionStackPanel.safe_get())
        {
            captionStackPanelTopMargin = captionStackPanel.Margin().Top;
        }

        EnsureResourcesLoaded();

        double textScaleFactor = GetUISettings().TextScaleFactor();
        winrt::Thickness margin = captionTextBlock.Margin();
        margin.Top = static_cast<double>(c_captionTopMarginSlope * RenderingRatingFontSize() + c_captionTopMarginIntercept - captionStackPanelTopMargin);

        captionTextBlock.Margin(margin);
    }
}

void UpdateRatingItemsAppearance ( ) [private]

Definition at line 222 of file RatingControl.cpp.

{
    if (m_foregroundStackPanel)
    {
        // TODO: MSFT 11521414 - complete disabled state functionality

        const double placeholderValue = PlaceholderValue();
        const double ratingValue = Value();
        double value = 0.0;

        if (m_isPointerOver)
        {
            value = ceil(m_mousePercentage * MaxRating());
            if (ratingValue == c_noValueSetSentinel)
            {
                if (placeholderValue == -1)
                {
                    winrt::VisualStateManager::GoToState(*this, L"PointerOverPlaceholder", false);
                    CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::PointerOverPlaceholder);
                }
                else
                {
                    winrt::VisualStateManager::GoToState(*this, L"PointerOverUnselected", false);
                    // The API is locked, so we can't change this part to be consistent any more:
                    CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::PointerOverPlaceholder);
                }
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, L"PointerOverSet", false);
                CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::PointerOverSet);
            }
        }
        else if (ratingValue > c_noValueSetSentinel)
        {
            value = ratingValue;
            winrt::VisualStateManager::GoToState(*this, L"Set", false);
            CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::Set);
        }
        else if (placeholderValue > c_noValueSetSentinel)
        {
            value = placeholderValue;
            winrt::VisualStateManager::GoToState(*this, L"Placeholder", false);
            CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::Placeholder);
        } // there's no "unset" state because the foreground items are simply cropped out

        if (!IsEnabled())
        {
            // TODO: MSFT 11521414 - complete disabled state functionality [merge this code block with ifs above]
            winrt::VisualStateManager::GoToState(*this, L"Disabled", false);
            CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::Disabled);
        }

        unsigned int i = 0;
        for (const auto& uiElement : m_foregroundStackPanel.get().Children())
        {
            // Handle clips on stars
            float width = RenderingRatingFontSize();
            if (static_cast<double>(i) + 1 > value)
            {
                if (i < value)
                {
                    // partial stars
                    width *= static_cast<float>(value - floor(value));
                }
                else
                {
                    // empty stars
                    width = 0.0;
                }
            }

            winrt::Rect rect;
            rect.X = 0;
            rect.Y = 0;
            rect.Height = RenderingRatingFontSize();
            rect.Width = width;

            winrt::RectangleGeometry rg;
            rg.Rect(rect);
            uiElement.as<winrt::UIElement>().Clip(rg);

            i++;
        }

        ResetControlWidth();
    }
}

The documentation for this class was generated from the following files:
  • RatingControl/RatingControl.h
  • RatingControl/RatingControl.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControlAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

RatingControlAutomationPeer Class Reference

#include "RatingControlAutomationPeer.h"

Inherits ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider >.

List of all members.

Public Member Functions

RatingControlAutomationPeer (winrt::FrameworkElement const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetLocalizedControlTypeCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | IsReadOnly ()
hstring | IValueProvider_Value ()
double | LargeChange ()
double | Maximum ()
double | Minimum ()
void | RaisePropertyChangedEvent (double newValue)
void | SetValue (hstring const &value)
void | SetValue (double value)
double | SmallChange ()
double | Value ()

Private Member Functions

int | DetermineFractionDigits (double value)
int | DetermineSignificantDigits (double value, int fractionDigits)
winrt::hstring | GenerateValue_ValueString (const winrt::hstring &resourceString, double ratingValue)
winrt::RatingControl | GetRatingControl ()

Detailed Description

Definition at line 19 of file RatingControlAutomationPeer.h.

Constructor & Destructor Documentation

RatingControlAutomationPeer ( winrt::FrameworkElement const & owner )

Definition at line 12 of file RatingControlAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

int DetermineFractionDigits ( double value ) [private]

Definition at line 151 of file RatingControlAutomationPeer.cpp.

{
    value = value * 100;
    const int intValue = (int)value;

    // When reading out the Value_Value, we want clients to read out the least number of digits
    // possible. We don't want a 3 (represented as a double) to be read out as 3.00...
    // Here we determine the number of digits past the decimal point we care about,
    // and this number is used by the caller to truncate the Value_Value string.

    if (intValue % 100 == 0)
    {
        return 0;
    }
    else if (intValue % 10 == 0)
    {
        return 1;
    }
    else
    {
        return 2;
    }
}

int DetermineSignificantDigits | ( | double | value,
 |  | int | fractionDigits |
 | ) |  |  | [private]

Definition at line 175 of file RatingControlAutomationPeer.cpp.

{
    int sigFigsInt = (int)value;
    int length = 0;

    while (sigFigsInt > 0)
    {
        sigFigsInt /= 10;
        length++;
    }

    return length + fractionDigits;
}

winrt::hstring GenerateValue_ValueString | ( | const winrt::hstring & | resourceString,
 |  | double | ratingValue |
 | ) |  |  | [private]

Definition at line 189 of file RatingControlAutomationPeer.cpp.

{
    winrt::DecimalFormatter formatter;
    winrt::SignificantDigitsNumberRounder rounder;
    formatter.NumberRounder(rounder);

    std::wstring maxRatingString = std::to_wstring(GetRatingControl().MaxRating());

    const int fractionDigits = DetermineFractionDigits(ratingValue);
    const int sigDigits = DetermineSignificantDigits(ratingValue, fractionDigits);
    formatter.FractionDigits(fractionDigits);
    rounder.SignificantDigits(sigDigits);
    winrt::hstring ratingString = formatter.Format(ratingValue);

    return StringUtil::FormatString(resourceString, ratingString.c_str(), maxRatingString.c_str());
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 117 of file RatingControlAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Slider;
}

hstring GetLocalizedControlTypeCore ( )

Definition at line 17 of file RatingControlAutomationPeer.cpp.

{
    return ResourceAccessor::GetLocalizedStringResource(SR_RatingLocalizedControlType);
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 107 of file RatingControlAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Value || patternInterface == winrt::PatternInterface::RangeValue)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::RatingControl GetRatingControl ( ) [private]

Definition at line 145 of file RatingControlAutomationPeer.cpp.

{
    winrt::UIElement owner = Owner();
    return owner.as<winrt::RatingControl>();
}

bool IsReadOnly ( )

Definition at line 23 of file RatingControlAutomationPeer.cpp.

{
    return GetRatingControl().IsReadOnly();
}

hstring IValueProvider_Value ( )

Definition at line 28 of file RatingControlAutomationPeer.cpp.

{
    double ratingValue = GetRatingControl().Value();
    winrt::hstring valueString;

    winrt::hstring ratingString;

    if (ratingValue == -1)
    {
        double placeholderValue = GetRatingControl().PlaceholderValue();
        if (placeholderValue == -1)
        {
            valueString = ResourceAccessor::GetLocalizedStringResource(SR_RatingUnset);
        }
        else
        {
            valueString = GenerateValue_ValueString(ResourceAccessor::GetLocalizedStringResource(SR_CommunityRatingString), placeholderValue);
        }
    }
    else
    {
        valueString = GenerateValue_ValueString(ResourceAccessor::GetLocalizedStringResource(SR_BasicRatingString), ratingValue);
    }

    return valueString;
}

double LargeChange ( )

Definition at line 71 of file RatingControlAutomationPeer.cpp.

{
    return 1.0;
}

double Maximum ( )

Definition at line 76 of file RatingControlAutomationPeer.cpp.

{
    return GetRatingControl().MaxRating();
}

double Minimum ( )

Definition at line 81 of file RatingControlAutomationPeer.cpp.

{
    return 0;
}

void RaisePropertyChangedEvent ( double newValue )

Definition at line 123 of file RatingControlAutomationPeer.cpp.

{
    // UIA doesn't tolerate a null doubles, so we convert them to zeroes.
    double oldValue = GetRatingControl().Value();
    auto oldValueProp = winrt::PropertyValue::CreateDouble(oldValue);

    if (newValue == -1)
    {
        auto newValueProp = winrt::PropertyValue::CreateDouble(0.0);
        __super::RaisePropertyChangedEvent(winrt::ValuePatternIdentifiers::ValueProperty(), oldValueProp, newValueProp);
        __super::RaisePropertyChangedEvent(winrt::RangeValuePatternIdentifiers::ValueProperty(), oldValueProp, newValueProp);
    }
    else
    {
        auto newValueProp = winrt::PropertyValue::CreateDouble(newValue);
        __super::RaisePropertyChangedEvent(winrt::ValuePatternIdentifiers::ValueProperty(), oldValueProp, newValueProp); // make these strings
        __super::RaisePropertyChangedEvent(winrt::RangeValuePatternIdentifiers::ValueProperty(), oldValueProp, newValueProp);
    }
}

void SetValue ( double value )

Definition at line 100 of file RatingControlAutomationPeer.cpp.

{
    GetRatingControl().Value(value);
}

void SetValue ( hstring const & value )

Definition at line 55 of file RatingControlAutomationPeer.cpp.

{
    winrt::DecimalFormatter formatter;
    auto potentialRating = formatter.ParseDouble(value);
    if (potentialRating)
    {
        GetRatingControl().Value(potentialRating.Value());
    }
}

double SmallChange ( )

Definition at line 66 of file RatingControlAutomationPeer.cpp.

{
    return 1.0;
}

double Value ( )

Definition at line 86 of file RatingControlAutomationPeer.cpp.

{
    // Change this to provide a placeholder value too.
    double value = GetRatingControl().Value();
    if (value == -1)
    {
        return 0;
    }
    else
    {
        return value;
    }
}

The documentation for this class was generated from the following files:
  • RatingControl/RatingControlAutomationPeer.h
  • RatingControl/RatingControlAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControlProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

RatingControlProperties Class Reference

#include "RatingControl.properties.h"

Inherited by RatingControl.

List of all members.

Public Member Functions

RatingControlProperties ()
void | Caption (winrt::hstring const &value)
winrt::hstring | Caption ()
void | InitialSetValue (int value)
int | InitialSetValue ()
void | IsClearEnabled (bool value)
bool | IsClearEnabled ()
void | IsReadOnly (bool value)
bool | IsReadOnly ()
void | ItemInfo (winrt::RatingItemInfo const &value)
winrt::RatingItemInfo | ItemInfo ()
void | MaxRating (int value)
int | MaxRating ()
void | PlaceholderValue (double value)
double | PlaceholderValue ()
double | Value ()
void | Value (double value)
void | ValueChanged (winrt::event_token const &token)
winrt::event_token | ValueChanged (winrt::TypedEventHandler< winrt::RatingControl, winrt::IInspectable > const &value)

Static Public Member Functions

static winrt::DependencyProperty | CaptionProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | InitialSetValueProperty ()
static winrt::DependencyProperty | IsClearEnabledProperty ()
static winrt::DependencyProperty | IsReadOnlyProperty ()
static winrt::DependencyProperty | ItemInfoProperty ()
static winrt::DependencyProperty | MaxRatingProperty ()
static void | OnCaptionPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnInitialSetValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsClearEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsReadOnlyPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemInfoPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxRatingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPlaceholderValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnValuePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PlaceholderValueProperty ()
static winrt::DependencyProperty | ValueProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::RatingControl,
winrt::IInspectable > > 		m_valueChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_CaptionProperty
static GlobalDependencyProperty | s_InitialSetValueProperty
static GlobalDependencyProperty | s_IsClearEnabledProperty
static GlobalDependencyProperty | s_IsReadOnlyProperty
static GlobalDependencyProperty | s_ItemInfoProperty
static GlobalDependencyProperty | s_MaxRatingProperty
static GlobalDependencyProperty | s_PlaceholderValueProperty
static GlobalDependencyProperty | s_ValueProperty

Detailed Description

Definition at line 7 of file RatingControl.properties.h.

Constructor & Destructor Documentation

RatingControlProperties ( )

Definition at line 25 of file RatingControl.properties.cpp.

    : m_valueChangedEventSource{static_cast<RatingControl*>(this)}

Member Function Documentation

void Caption ( winrt::hstring const & value )
winrt::hstring Caption ( )
static winrt::DependencyProperty CaptionProperty ( ) [inline, static]

Definition at line 36 of file RatingControl.properties.h.

{ return s_CaptionProperty; }

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
int InitialSetValue ( )
void InitialSetValue ( int value )
static winrt::DependencyProperty InitialSetValueProperty ( ) [inline, static]

Definition at line 37 of file RatingControl.properties.h.

{ return s_InitialSetValueProperty; }

void IsClearEnabled ( bool value )
bool IsClearEnabled ( )
static winrt::DependencyProperty IsClearEnabledProperty ( ) [inline, static]

Definition at line 38 of file RatingControl.properties.h.

{ return s_IsClearEnabledProperty; }

bool IsReadOnly ( )
void IsReadOnly ( bool value )
static winrt::DependencyProperty IsReadOnlyProperty ( ) [inline, static]

Definition at line 39 of file RatingControl.properties.h.

{ return s_IsReadOnlyProperty; }

void ItemInfo ( winrt::RatingItemInfo const & value )
winrt::RatingItemInfo ItemInfo ( )
static winrt::DependencyProperty ItemInfoProperty ( ) [inline, static]

Definition at line 40 of file RatingControl.properties.h.

{ return s_ItemInfoProperty; }

void MaxRating ( int value )
int MaxRating ( )
static winrt::DependencyProperty MaxRatingProperty ( ) [inline, static]

Definition at line 41 of file RatingControl.properties.h.

{ return s_MaxRatingProperty; }

static void OnCaptionPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnInitialSetValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsClearEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsReadOnlyPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnItemInfoPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxRatingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPlaceholderValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnValuePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void PlaceholderValue ( double value )
double PlaceholderValue ( )
static winrt::DependencyProperty PlaceholderValueProperty ( ) [inline, static]

Definition at line 42 of file RatingControl.properties.h.

{ return s_PlaceholderValueProperty; }

void Value ( double value )
double Value ( )
void ValueChanged ( winrt::event_token const & token )
winrt::event_token ValueChanged ( winrt::TypedEventHandler< winrt::RatingControl, winrt::IInspectable > const & value )
static winrt::DependencyProperty ValueProperty ( ) [inline, static]

Definition at line 43 of file RatingControl.properties.h.

{ return s_ValueProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::RatingControl, winrt::IInspectable> > m_valueChangedEventSource

Definition at line 57 of file RatingControl.properties.h.

GlobalDependencyProperty s_CaptionProperty [static]

Definition at line 45 of file RatingControl.properties.h.

GlobalDependencyProperty s_InitialSetValueProperty [static]

Definition at line 46 of file RatingControl.properties.h.

GlobalDependencyProperty s_IsClearEnabledProperty [static]

Definition at line 47 of file RatingControl.properties.h.

GlobalDependencyProperty s_IsReadOnlyProperty [static]

Definition at line 48 of file RatingControl.properties.h.

GlobalDependencyProperty s_ItemInfoProperty [static]

Definition at line 49 of file RatingControl.properties.h.

GlobalDependencyProperty s_MaxRatingProperty [static]

Definition at line 50 of file RatingControl.properties.h.

GlobalDependencyProperty s_PlaceholderValueProperty [static]

Definition at line 51 of file RatingControl.properties.h.

GlobalDependencyProperty s_ValueProperty [static]

Definition at line 52 of file RatingControl.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RatingControl.properties.h
  • Generated/RatingControl.properties.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingItemFontInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingItemFontInfo Class Reference

#include "RatingItemFontInfo.h"

Inherits RatingItemFontInfoProperties.

List of all members.

Detailed Description

Definition at line 10 of file RatingItemFontInfo.h.

The documentation for this class was generated from the following file:
  • RatingControl/RatingItemFontInfo.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingItemFontInfoProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

RatingItemFontInfoProperties Class Reference

#include "RatingItemFontInfo.properties.h"

Inherited by RatingItemFontInfo.

List of all members.

Public Member Functions

RatingItemFontInfoProperties ()
void | DisabledGlyph (winrt::hstring const &value)
winrt::hstring | DisabledGlyph ()
void | Glyph (winrt::hstring const &value)
winrt::hstring | Glyph ()
void | PlaceholderGlyph (winrt::hstring const &value)
winrt::hstring | PlaceholderGlyph ()
void | PointerOverGlyph (winrt::hstring const &value)
winrt::hstring | PointerOverGlyph ()
winrt::hstring | PointerOverPlaceholderGlyph ()
void | PointerOverPlaceholderGlyph (winrt::hstring const &value)
winrt::hstring | UnsetGlyph ()
void | UnsetGlyph (winrt::hstring const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | DisabledGlyphProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | GlyphProperty ()
static winrt::DependencyProperty | PlaceholderGlyphProperty ()
static winrt::DependencyProperty | PointerOverGlyphProperty ()
static winrt::DependencyProperty | PointerOverPlaceholderGlyphProperty ()
static winrt::DependencyProperty | UnsetGlyphProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_DisabledGlyphProperty
static GlobalDependencyProperty | s_GlyphProperty
static GlobalDependencyProperty | s_PlaceholderGlyphProperty
static GlobalDependencyProperty | s_PointerOverGlyphProperty
static GlobalDependencyProperty | s_PointerOverPlaceholderGlyphProperty
static GlobalDependencyProperty | s_UnsetGlyphProperty

Detailed Description

Definition at line 7 of file RatingItemFontInfo.properties.h.

Constructor & Destructor Documentation

RatingItemFontInfoProperties ( )

Definition at line 23 of file RatingItemFontInfo.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 98 of file RatingItemFontInfo.properties.cpp.

{
    s_DisabledGlyphProperty = nullptr;
    s_GlyphProperty = nullptr;
    s_PlaceholderGlyphProperty = nullptr;
    s_PointerOverGlyphProperty = nullptr;
    s_PointerOverPlaceholderGlyphProperty = nullptr;
    s_UnsetGlyphProperty = nullptr;
}

void DisabledGlyph ( winrt::hstring const & value )

Definition at line 108 of file RatingItemFontInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemFontInfo*>(this)->SetValue(s_DisabledGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring DisabledGlyph ( )

Definition at line 116 of file RatingItemFontInfo.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_DisabledGlyphProperty));
}

static winrt::DependencyProperty DisabledGlyphProperty ( ) [inline, static]

Definition at line 30 of file RatingItemFontInfo.properties.h.

{ return s_DisabledGlyphProperty; }

void EnsureProperties ( ) [static]

Definition at line 28 of file RatingItemFontInfo.properties.cpp.

{
    if (!s_DisabledGlyphProperty)
    {
        s_DisabledGlyphProperty =
            InitializeDependencyProperty(
                L"DisabledGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::RatingItemFontInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_GlyphProperty)
    {
        s_GlyphProperty =
            InitializeDependencyProperty(
                L"Glyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::RatingItemFontInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PlaceholderGlyphProperty)
    {
        s_PlaceholderGlyphProperty =
            InitializeDependencyProperty(
                L"PlaceholderGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::RatingItemFontInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PointerOverGlyphProperty)
    {
        s_PointerOverGlyphProperty =
            InitializeDependencyProperty(
                L"PointerOverGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::RatingItemFontInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PointerOverPlaceholderGlyphProperty)
    {
        s_PointerOverPlaceholderGlyphProperty =
            InitializeDependencyProperty(
                L"PointerOverPlaceholderGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::RatingItemFontInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_UnsetGlyphProperty)
    {
        s_UnsetGlyphProperty =
            InitializeDependencyProperty(
                L"UnsetGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::RatingItemFontInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::hstring Glyph ( )

Definition at line 129 of file RatingItemFontInfo.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_GlyphProperty));
}

void Glyph ( winrt::hstring const & value )

Definition at line 121 of file RatingItemFontInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemFontInfo*>(this)->SetValue(s_GlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty GlyphProperty ( ) [inline, static]

Definition at line 31 of file RatingItemFontInfo.properties.h.

{ return s_GlyphProperty; }

void PlaceholderGlyph ( winrt::hstring const & value )

Definition at line 134 of file RatingItemFontInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemFontInfo*>(this)->SetValue(s_PlaceholderGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring PlaceholderGlyph ( )

Definition at line 142 of file RatingItemFontInfo.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_PlaceholderGlyphProperty));
}

static winrt::DependencyProperty PlaceholderGlyphProperty ( ) [inline, static]

Definition at line 32 of file RatingItemFontInfo.properties.h.

{ return s_PlaceholderGlyphProperty; }

winrt::hstring PointerOverGlyph ( )

Definition at line 155 of file RatingItemFontInfo.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_PointerOverGlyphProperty));
}

void PointerOverGlyph ( winrt::hstring const & value )

Definition at line 147 of file RatingItemFontInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemFontInfo*>(this)->SetValue(s_PointerOverGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty PointerOverGlyphProperty ( ) [inline, static]

Definition at line 33 of file RatingItemFontInfo.properties.h.

{ return s_PointerOverGlyphProperty; }

void PointerOverPlaceholderGlyph ( winrt::hstring const & value )

Definition at line 160 of file RatingItemFontInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemFontInfo*>(this)->SetValue(s_PointerOverPlaceholderGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring PointerOverPlaceholderGlyph ( )

Definition at line 168 of file RatingItemFontInfo.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_PointerOverPlaceholderGlyphProperty));
}

static winrt::DependencyProperty PointerOverPlaceholderGlyphProperty ( ) [inline, static]

Definition at line 34 of file RatingItemFontInfo.properties.h.

{ return s_PointerOverPlaceholderGlyphProperty; }

void UnsetGlyph ( winrt::hstring const & value )

Definition at line 173 of file RatingItemFontInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemFontInfo*>(this)->SetValue(s_UnsetGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring UnsetGlyph ( )

Definition at line 181 of file RatingItemFontInfo.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_UnsetGlyphProperty));
}

static winrt::DependencyProperty UnsetGlyphProperty ( ) [inline, static]

Definition at line 35 of file RatingItemFontInfo.properties.h.

{ return s_UnsetGlyphProperty; }

Member Data Documentation

GlobalDependencyProperty s_DisabledGlyphProperty [static]

Definition at line 37 of file RatingItemFontInfo.properties.h.

GlobalDependencyProperty s_GlyphProperty [static]

Definition at line 38 of file RatingItemFontInfo.properties.h.

GlobalDependencyProperty s_PlaceholderGlyphProperty [static]

Definition at line 39 of file RatingItemFontInfo.properties.h.

GlobalDependencyProperty s_PointerOverGlyphProperty [static]

Definition at line 40 of file RatingItemFontInfo.properties.h.

GlobalDependencyProperty s_PointerOverPlaceholderGlyphProperty [static]

Definition at line 41 of file RatingItemFontInfo.properties.h.

GlobalDependencyProperty s_UnsetGlyphProperty [static]

Definition at line 42 of file RatingItemFontInfo.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RatingItemFontInfo.properties.h
  • Generated/RatingItemFontInfo.properties.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingItemImageInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingItemImageInfo Class Reference

#include "RatingItemImageInfo.h"

Inherits RatingItemImageInfoProperties.

List of all members.

Detailed Description

Definition at line 10 of file RatingItemImageInfo.h.

The documentation for this class was generated from the following file:
  • RatingControl/RatingItemImageInfo.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingItemImageInfoProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

RatingItemImageInfoProperties Class Reference

#include "RatingItemImageInfo.properties.h"

Inherited by RatingItemImageInfo.

List of all members.

Public Member Functions

RatingItemImageInfoProperties ()
void | DisabledImage (winrt::ImageSource const &value)
winrt::ImageSource | DisabledImage ()
void | Image (winrt::ImageSource const &value)
winrt::ImageSource | Image ()
void | PlaceholderImage (winrt::ImageSource const &value)
winrt::ImageSource | PlaceholderImage ()
void | PointerOverImage (winrt::ImageSource const &value)
winrt::ImageSource | PointerOverImage ()
winrt::ImageSource | PointerOverPlaceholderImage ()
void | PointerOverPlaceholderImage (winrt::ImageSource const &value)
winrt::ImageSource | UnsetImage ()
void | UnsetImage (winrt::ImageSource const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | DisabledImageProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ImageProperty ()
static winrt::DependencyProperty | PlaceholderImageProperty ()
static winrt::DependencyProperty | PointerOverImageProperty ()
static winrt::DependencyProperty | PointerOverPlaceholderImageProperty ()
static winrt::DependencyProperty | UnsetImageProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_DisabledImageProperty
static GlobalDependencyProperty | s_ImageProperty
static GlobalDependencyProperty | s_PlaceholderImageProperty
static GlobalDependencyProperty | s_PointerOverImageProperty
static GlobalDependencyProperty | s_PointerOverPlaceholderImageProperty
static GlobalDependencyProperty | s_UnsetImageProperty

Detailed Description

Definition at line 7 of file RatingItemImageInfo.properties.h.

Constructor & Destructor Documentation

RatingItemImageInfoProperties ( )

Definition at line 23 of file RatingItemImageInfo.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 98 of file RatingItemImageInfo.properties.cpp.

{
    s_DisabledImageProperty = nullptr;
    s_ImageProperty = nullptr;
    s_PlaceholderImageProperty = nullptr;
    s_PointerOverImageProperty = nullptr;
    s_PointerOverPlaceholderImageProperty = nullptr;
    s_UnsetImageProperty = nullptr;
}

void DisabledImage ( winrt::ImageSource const & value )

Definition at line 108 of file RatingItemImageInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemImageInfo*>(this)->SetValue(s_DisabledImageProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

winrt::ImageSource DisabledImage ( )

Definition at line 116 of file RatingItemImageInfo.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<RatingItemImageInfo*>(this)->GetValue(s_DisabledImageProperty));
}

static winrt::DependencyProperty DisabledImageProperty ( ) [inline, static]

Definition at line 30 of file RatingItemImageInfo.properties.h.

{ return s_DisabledImageProperty; }

void EnsureProperties ( ) [static]

Definition at line 28 of file RatingItemImageInfo.properties.cpp.

{
    if (!s_DisabledImageProperty)
    {
        s_DisabledImageProperty =
            InitializeDependencyProperty(
                L"DisabledImage",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::RatingItemImageInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ImageProperty)
    {
        s_ImageProperty =
            InitializeDependencyProperty(
                L"Image",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::RatingItemImageInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PlaceholderImageProperty)
    {
        s_PlaceholderImageProperty =
            InitializeDependencyProperty(
                L"PlaceholderImage",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::RatingItemImageInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PointerOverImageProperty)
    {
        s_PointerOverImageProperty =
            InitializeDependencyProperty(
                L"PointerOverImage",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::RatingItemImageInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_PointerOverPlaceholderImageProperty)
    {
        s_PointerOverPlaceholderImageProperty =
            InitializeDependencyProperty(
                L"PointerOverPlaceholderImage",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::RatingItemImageInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_UnsetImageProperty)
    {
        s_UnsetImageProperty =
            InitializeDependencyProperty(
                L"UnsetImage",
                winrt::name_of<winrt::ImageSource>(),
                winrt::name_of<winrt::RatingItemImageInfo>(),
                false /* isAttached */,
                ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::ImageSource Image ( )

Definition at line 129 of file RatingItemImageInfo.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<RatingItemImageInfo*>(this)->GetValue(s_ImageProperty));
}

void Image ( winrt::ImageSource const & value )

Definition at line 121 of file RatingItemImageInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemImageInfo*>(this)->SetValue(s_ImageProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ImageProperty ( ) [inline, static]

Definition at line 31 of file RatingItemImageInfo.properties.h.

{ return s_ImageProperty; }

void PlaceholderImage ( winrt::ImageSource const & value )

Definition at line 134 of file RatingItemImageInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemImageInfo*>(this)->SetValue(s_PlaceholderImageProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

winrt::ImageSource PlaceholderImage ( )

Definition at line 142 of file RatingItemImageInfo.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<RatingItemImageInfo*>(this)->GetValue(s_PlaceholderImageProperty));
}

static winrt::DependencyProperty PlaceholderImageProperty ( ) [inline, static]

Definition at line 32 of file RatingItemImageInfo.properties.h.

{ return s_PlaceholderImageProperty; }

winrt::ImageSource PointerOverImage ( )

Definition at line 155 of file RatingItemImageInfo.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<RatingItemImageInfo*>(this)->GetValue(s_PointerOverImageProperty));
}

void PointerOverImage ( winrt::ImageSource const & value )

Definition at line 147 of file RatingItemImageInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemImageInfo*>(this)->SetValue(s_PointerOverImageProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty PointerOverImageProperty ( ) [inline, static]

Definition at line 33 of file RatingItemImageInfo.properties.h.

{ return s_PointerOverImageProperty; }

void PointerOverPlaceholderImage ( winrt::ImageSource const & value )

Definition at line 160 of file RatingItemImageInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemImageInfo*>(this)->SetValue(s_PointerOverPlaceholderImageProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

winrt::ImageSource PointerOverPlaceholderImage ( )

Definition at line 168 of file RatingItemImageInfo.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<RatingItemImageInfo*>(this)->GetValue(s_PointerOverPlaceholderImageProperty));
}

static winrt::DependencyProperty PointerOverPlaceholderImageProperty ( ) [inline, static]

Definition at line 34 of file RatingItemImageInfo.properties.h.

{ return s_PointerOverPlaceholderImageProperty; }

void UnsetImage ( winrt::ImageSource const & value )

Definition at line 173 of file RatingItemImageInfo.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RatingItemImageInfo*>(this)->SetValue(s_UnsetImageProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
    }
}

winrt::ImageSource UnsetImage ( )

Definition at line 181 of file RatingItemImageInfo.properties.cpp.

{
    return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<RatingItemImageInfo*>(this)->GetValue(s_UnsetImageProperty));
}

static winrt::DependencyProperty UnsetImageProperty ( ) [inline, static]

Definition at line 35 of file RatingItemImageInfo.properties.h.

{ return s_UnsetImageProperty; }

Member Data Documentation

GlobalDependencyProperty s_DisabledImageProperty [static]

Definition at line 37 of file RatingItemImageInfo.properties.h.

GlobalDependencyProperty s_ImageProperty [static]

Definition at line 38 of file RatingItemImageInfo.properties.h.

GlobalDependencyProperty s_PlaceholderImageProperty [static]

Definition at line 39 of file RatingItemImageInfo.properties.h.

GlobalDependencyProperty s_PointerOverImageProperty [static]

Definition at line 40 of file RatingItemImageInfo.properties.h.

GlobalDependencyProperty s_PointerOverPlaceholderImageProperty [static]

Definition at line 41 of file RatingItemImageInfo.properties.h.

GlobalDependencyProperty s_UnsetImageProperty [static]

Definition at line 42 of file RatingItemImageInfo.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RatingItemImageInfo.properties.h
  • Generated/RatingItemImageInfo.properties.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingItemInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingItemInfo Class Reference

#include "RatingItemInfo.h"

Inherits ReferenceTracker< RatingItemInfo, winrt::implementation::RatingItemInfoT >.

List of all members.

Detailed Description

Definition at line 8 of file RatingItemInfo.h.

The documentation for this class was generated from the following file:
  • RatingControl/RatingItemInfo.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclePool Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

RecyclePool Class Reference

#include "RecyclePool.h"

Inherits ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing >.

List of all members.

Classes

struct | ElementInfo

Public Member Functions

RecyclePool ()
hstring | GetRuntimeClassName () const
void | PutElement (winrt::UIElement const &element, winrt::hstring const &key, winrt::UIElement const &owner)
void | PutElement (winrt::UIElement const &element, winrt::hstring const &key)
void | PutElementCore (winrt::UIElement const &element, winrt::hstring const &key, winrt::UIElement const &owner)
winrt::UIElement | TryGetElement (winrt::hstring const &key)
winrt::UIElement | TryGetElement (winrt::hstring const &key, winrt::UIElement const &owner)
winrt::UIElement | TryGetElementCore (winrt::hstring const &key, winrt::UIElement const &owner)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DataTemplate | GetOriginTemplate (winrt::UIElement const &element)
static winrt::RecyclePool | GetPoolInstance (winrt::DataTemplate const &dataTemplate)
static winrt::hstring | GetReuseKey (winrt::UIElement const &element)
static winrt::DependencyProperty | PoolInstanceProperty ()
static winrt::DependencyProperty | ReuseKeyProperty ()
static void | SetOriginTemplate (winrt::UIElement const &element, winrt::DataTemplate const &value)
static void | SetPoolInstance (winrt::DataTemplate const &dataTemplate, winrt::RecyclePool const &recyclePool)
static void | SetReuseKey (winrt::UIElement const &element, winrt::hstring const &value)

Private Member Functions

winrt::Panel | EnsureOwnerIsPanelOrNull (const winrt::UIElement &owner)

Private Attributes

std::map< winrt::hstring,
std::vector< ElementInfo > > 		m_elements

Static Private Attributes

static GlobalDependencyProperty | s_originTemplateProperty
static GlobalDependencyProperty | s_PoolInstanceProperty
static GlobalDependencyProperty | s_reuseKeyProperty

Detailed Description

Definition at line 14 of file RecyclePool.h.

Constructor & Destructor Documentation

RecyclePool ( )

Member Function Documentation

static void ClearProperties ( ) [static]
winrt::Panel EnsureOwnerIsPanelOrNull ( const winrt::UIElement & owner ) [private]
static void EnsureProperties ( ) [static]
static winrt::DataTemplate GetOriginTemplate ( winrt::UIElement const & element ) [static]
static winrt::RecyclePool GetPoolInstance ( winrt::DataTemplate const & dataTemplate ) [static]
static winrt::hstring GetReuseKey ( winrt::UIElement const & element ) [static]
hstring GetRuntimeClassName ( ) const [inline]

Definition at line 26 of file RecyclePool.h.

    {
        return winrt::hstring_name_of<winrt::IInspectable>();
    }

static winrt::DependencyProperty PoolInstanceProperty ( ) [inline, static]

Definition at line 63 of file RecyclePool.h.

{ return s_PoolInstanceProperty; }

void PutElement | ( | winrt::UIElement const & | element,
 |  | winrt::hstring const & | key
 | ) |  |
void PutElement | ( | winrt::UIElement const & | element,
 |  | winrt::hstring const & | key,
 |  | winrt::UIElement const & | owner
 | ) |  |
void PutElementCore | ( | winrt::UIElement const & | element,
 |  | winrt::hstring const & | key,
 |  | winrt::UIElement const & | owner
 | ) |  |
static winrt::DependencyProperty ReuseKeyProperty ( ) [inline, static]

Definition at line 58 of file RecyclePool.h.

{ return s_reuseKeyProperty; }

static void SetOriginTemplate | ( | winrt::UIElement const & | element,
 |  | winrt::DataTemplate const & | value |
 | ) |  |  | [static]
static void SetPoolInstance | ( | winrt::DataTemplate const & | dataTemplate,
 |  | winrt::RecyclePool const & | recyclePool |
 | ) |  |  | [static]
static void SetReuseKey | ( | winrt::UIElement const & | element,
 |  | winrt::hstring const & | value |
 | ) |  |  | [static]
winrt::UIElement TryGetElement ( winrt::hstring const & key )
winrt::UIElement TryGetElement | ( | winrt::hstring const & | key,
 |  | winrt::UIElement const & | owner
 | ) |  |
winrt::UIElement TryGetElementCore | ( | winrt::hstring const & | key,
 |  | winrt::UIElement const & | owner
 | ) |  |

Member Data Documentation

std::map<winrt::hstring , std::vector<ElementInfo> > m_elements [private]

Definition at line 98 of file RecyclePool.h.

GlobalDependencyProperty s_originTemplateProperty [static, private]

Definition at line 81 of file RecyclePool.h.

GlobalDependencyProperty s_PoolInstanceProperty [static, private]

Definition at line 78 of file RecyclePool.h.

GlobalDependencyProperty s_reuseKeyProperty [static, private]

Definition at line 80 of file RecyclePool.h.

The documentation for this class was generated from the following file:
  • Repeater/RecyclePool.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclePool::ElementInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RecyclePool
  • RecyclePool::ElementInfo
Public Member Functions | Private Attributes

RecyclePool::ElementInfo Struct Reference

List of all members.

Public Member Functions

ElementInfo (const ITrackerHandleManager *refManager, const winrt::UIElement &element, const winrt::Panel &owner)
winrt::UIElement | Element () const
winrt::Panel | Owner () const

Private Attributes

tracker_ref< winrt::UIElement > | m_element
tracker_ref< winrt::Panel > | m_owner

Detailed Description

Definition at line 85 of file RecyclePool.h.

Constructor & Destructor Documentation

ElementInfo | ( | const ITrackerHandleManager * | refManager,
 |  | const winrt::UIElement & | element,
 |  | const winrt::Panel & | owner |
 | ) |  |  | [inline]

Definition at line 87 of file RecyclePool.h.

            :m_element(refManager, element), m_owner(refManager, owner) {}

Member Function Documentation

winrt::UIElement Element ( ) const [inline]

Definition at line 90 of file RecyclePool.h.

{ return m_element.get(); };

winrt::Panel Owner ( ) const [inline]

Definition at line 91 of file RecyclePool.h.

{ return m_owner.get(); };

Member Data Documentation

tracker_ref<winrt::UIElement> m_element [private]

Definition at line 91 of file RecyclePool.h.

tracker_ref<winrt::Panel> m_owner [private]

Definition at line 95 of file RecyclePool.h.

The documentation for this struct was generated from the following file:
  • Repeater/RecyclePool.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclePoolProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

RecyclePoolProperties Class Reference

#include "RecyclePool.properties.h"

List of all members.

Public Member Functions

RecyclePoolProperties ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::RecyclePool | GetPoolInstance (winrt::DataTemplate const &target)
static winrt::DependencyProperty | PoolInstanceProperty ()
static void | SetPoolInstance (winrt::DataTemplate const &target, winrt::RecyclePool const &value)

Static Public Attributes

static GlobalDependencyProperty | s_PoolInstanceProperty

Detailed Description

Definition at line 7 of file RecyclePool.properties.h.

Constructor & Destructor Documentation

RecyclePoolProperties ( )

Definition at line 18 of file RecyclePool.properties.cpp.

{
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 37 of file RecyclePool.properties.cpp.

{
    s_PoolInstanceProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 22 of file RecyclePool.properties.cpp.

{
    if (!s_PoolInstanceProperty)
    {
        s_PoolInstanceProperty =
            InitializeDependencyProperty(
                L"PoolInstance",
                winrt::name_of<winrt::RecyclePool>(),
                winrt::name_of<winrt::RecyclePool>(),
                true /* isAttached */,
                ValueHelper<winrt::RecyclePool>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::RecyclePool GetPoolInstance ( winrt::DataTemplate const & target ) [static]

Definition at line 48 of file RecyclePool.properties.cpp.

{
    return ValueHelper<winrt::RecyclePool>::CastOrUnbox(target.GetValue(s_PoolInstanceProperty));
}

static winrt::DependencyProperty PoolInstanceProperty ( ) [inline, static]

Definition at line 15 of file RecyclePool.properties.h.

{ return s_PoolInstanceProperty; }

void SetPoolInstance | ( | winrt::DataTemplate const & | target,
 |  | winrt::RecyclePool const & | value |
 | ) |  |  | [static]

Definition at line 43 of file RecyclePool.properties.cpp.

{
    target.SetValue(s_PoolInstanceProperty, ValueHelper<winrt::RecyclePool>::BoxValueIfNecessary(value));
}

Member Data Documentation

GlobalDependencyProperty s_PoolInstanceProperty [static]

Definition at line 17 of file RecyclePool.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RecyclePool.properties.h
  • Generated/RecyclePool.properties.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclingElementFactory Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RecyclingElementFactory Class Reference

#include "RecyclingElementFactory.h"

Inherits ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory >, and RecyclingElementFactoryProperties.

List of all members.

Public Member Functions

RecyclingElementFactory ()
winrt::UIElement | GetElementCore (winrt::ElementFactoryGetArgs const &args)
winrt::hstring | OnSelectTemplateKeyCore (winrt::IInspectable const &dataContext, winrt::UIElement const &owner)
void | RecycleElementCore (winrt::ElementFactoryRecycleArgs const &args)
winrt::RecyclePool | RecyclePool ()
void | RecyclePool (winrt::RecyclePool const &value)
winrt::IMap< winrt::hstring,
winrt::DataTemplate > 		Templates ()
void | Templates (winrt::IMap< winrt::hstring, winrt::DataTemplate > const &value)

Detailed Description

Definition at line 10 of file RecyclingElementFactory.h.

Constructor & Destructor Documentation

RecyclingElementFactory ( )

Member Function Documentation

winrt::UIElement GetElementCore ( winrt::ElementFactoryGetArgs const & args )
winrt::hstring OnSelectTemplateKeyCore | ( | winrt::IInspectable const & | dataContext,
 |  | winrt::UIElement const & | owner
 | ) |  |
void RecycleElementCore ( winrt::ElementFactoryRecycleArgs const & args )
void RecyclePool ( winrt::RecyclePool const & value )
winrt::RecyclePool RecyclePool ( )
winrt::IMap<winrt::hstring, winrt::DataTemplate> Templates ( )
void Templates ( winrt::IMap< winrt::hstring, winrt::DataTemplate > const & value )
The documentation for this class was generated from the following file:
  • Repeater/RecyclingElementFactory.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclingElementFactoryProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

RecyclingElementFactoryProperties Class Reference

#include "RecyclingElementFactory.properties.h"

Inherited by RecyclingElementFactory.

List of all members.

Public Member Functions

RecyclingElementFactoryProperties ()
void | SelectTemplateKey (winrt::event_token const &token)
winrt::event_token | SelectTemplateKey (winrt::TypedEventHandler< winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs > const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::RecyclingElementFactory,
winrt::SelectTemplateEventArgs > > 		m_selectTemplateKeyEventSource

Detailed Description

Definition at line 7 of file RecyclingElementFactory.properties.h.

Constructor & Destructor Documentation

RecyclingElementFactoryProperties ( )

Definition at line 17 of file RecyclingElementFactory.properties.cpp.

    : m_selectTemplateKeyEventSource{static_cast<RecyclingElementFactory*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::event_token SelectTemplateKey ( winrt::TypedEventHandler< winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs > const & value )
void SelectTemplateKey ( winrt::event_token const & token )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs> > m_selectTemplateKeyEventSource

Definition at line 17 of file RecyclingElementFactory.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RecyclingElementFactory.properties.h
  • Generated/RecyclingElementFactory.properties.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: reference_tracker_custom_implements_t< WinRTClassType, ImplT > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

reference_tracker_custom_implements_t< WinRTClassType, ImplT > Struct Template Reference

#include "RuntimeClassHelpers.h"

Detailed Description

template<typename WinRTClassType, template< typename, typename...> class ImplT>
struct reference_tracker_custom_implements_t< WinRTClassType, ImplT >

Definition at line 30 of file RuntimeClassHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: reference_tracker_implements< D, WinRTClassType, ImplT, I > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

reference_tracker_implements< D, WinRTClassType, ImplT, I > Struct Template Reference

#include "RuntimeClassHelpers.h"

List of all members.

Public Member Functions

reference_tracker_implements ()

Detailed Description

template<typename D, typename WinRTClassType, template< typename, typename...> class ImplT, typename... I>
struct reference_tracker_implements< D, WinRTClassType, ImplT, I >

Definition at line 12 of file RuntimeClassHelpers.h.

Constructor & Destructor Documentation

reference_tracker_implements ( ) [inline]

Definition at line 17 of file RuntimeClassHelpers.h.

    {
    }

The documentation for this struct was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: reference_tracker_implements_t< WinRTClassType > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

reference_tracker_implements_t< WinRTClassType > Struct Template Reference

#include "RuntimeClassHelpers.h"

Detailed Description

template<typename WinRTClassType>
struct reference_tracker_implements_t< WinRTClassType >

Definition at line 23 of file RuntimeClassHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< AnnotatedScrollBarPanningInfo, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< AnnotatedScrollBarPanningInfo, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< BreadcrumbIterable, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< BreadcrumbIterable, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< ChildrenCollection< T >, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< ChildrenCollection< T >, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< ChildrenCollection< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< ChildrenInTabFocusOrderIterable, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< ChildrenInTabFocusOrderIterable, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< ElementFactoryGetArgsDownlevel, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< ElementFactoryGetArgsDownlevel, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< ElementFactoryRecycleArgsDownlevel, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< ElementFactoryRecycleArgsDownlevel, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< ElementFactoryRecycleArgsDownlevel, reference_tracker_implements_t< winrt::Microsoft::UI::Xaml::IElementFactoryRecycleArgs >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< HashMap< K, V >, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< HashMap< K, V >, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< Iterator, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< Iterator, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type >, and ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< KeyValuePair, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< KeyValuePair, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< RefreshInfoProviderImpl, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< RefreshInfoProviderImpl, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< SelectedItems< T >, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< SelectedItems< T >, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< SelectedItemsVector, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< SelectedItemsVector, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< SelectedTreeNodeVector, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< SelectedTreeNodeVector, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< SelectedTreeNodeVector, reference_tracker_implements_t< SelectedTreeNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< TreeViewNodeVector, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< TreeViewNodeVector, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: type< ViewModel, I...,::IReferenceTrackerExtension > Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

type< ViewModel, I...,::IReferenceTrackerExtension > Class Reference

Inherited by ReferenceTracker< ViewModel, reference_tracker_implements_t< ViewModelVectorOptions::VectorType >::type, ViewModelVectorOptions::IterableType, ViewModelVectorOptions::ObservableVectorType >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ReferenceTracker< D, ImplT, I > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions

ReferenceTracker< D, ImplT, I > Struct Template Reference

#include "RuntimeClassHelpers.h"

Inherits ITrackerHandleManager.

List of all members.

Public Member Functions

template<typename... Args>
ReferenceTracker (Args &&...args)
void | abi_enter ()
void | CheckThread ()
void | EnsureReferenceTrackerInterfaces ()
template<typename BaseType >
auto | GetBase ()
winrt::IInspectable | GetInner ()
bool | IsOnThread ()
int32_t __stdcall | NonDelegatingQueryInterface (winrt::guid const &riid, void **value) noexcept
HRESULT __stdcall | QueryInterface (GUID const &id_abi, void **object) noexcept

Static Public Member Functions

static void | DeleteInstanceOnUIThread (std::unique_ptr< D > &&self) noexcept
static void | final_release (std::unique_ptr< D > &&self)

Detailed Description

template<typename D, template< typename, typename...> class ImplT, typename... I>
struct ReferenceTracker< D, ImplT, I >

Definition at line 37 of file RuntimeClassHelpers.h.

Constructor & Destructor Documentation

ReferenceTracker ( Args &&... args ) [inline]

Definition at line 42 of file RuntimeClassHelpers.h.

                                     : impl_type(std::forward<Args>(args) ...)
    {
        m_owningThreadId = ::GetCurrentThreadId();
        m_dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread();

        EnsureReferenceTrackerInterfaces();
    }

Member Function Documentation

void abi_enter ( ) [inline]

Definition at line 50 of file RuntimeClassHelpers.h.

    {
        CheckThread();
    }

void CheckThread ( ) [inline]

Definition at line 61 of file RuntimeClassHelpers.h.

    {
        if (!IsOnThread())
        {
            throw winrt::hresult_wrong_thread();
        }
    }

static void DeleteInstanceOnUIThread ( std::unique_ptr< D > && self ) [inline, static]

Definition at line 149 of file RuntimeClassHelpers.h.

    {
        bool queued = false;

        // See if we're on the UI thread
        if(!self->IsOnThread())
        {
            // We're not on the UI thread
            if(auto dispatcherQueue = static_cast<ReferenceTracker<D, ImplT, I...>*>(self.get())->m_dispatcherQueue)
            {
                dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler(
                    [instance = self.release()]()
                {
                    delete instance;
                }));

                queued = true;
            }
            else
            {
                // We expect to always have a dispatcherQueue.  If m_dispatcherQueue is null here,
                // it may be that "self" is in the middle of getting cleaned up, and its dtor has
                // already run.
                MUX_ASSERT(FALSE);
            }
        }

        if (!queued)
        {
            self.reset();
        }
    }

void EnsureReferenceTrackerInterfaces ( ) [inline]

Definition at line 182 of file RuntimeClassHelpers.h.

    {
        // Should be called once after the object is initialized.
#if DBG
        MUX_ASSERT_NOASSUME(!m_wasEnsureCalled);
#endif
        if (!this->m_inner) // We need to derive from DependencyObject. Do so if it didn't happen yet.
        {
#pragma warning(push)
#pragma warning(disable : 26444) // Disable es.84, there is sometimes a return value that needs to be assigned and ignored
            // Internally derive from DependencyObject to get ReferenceTracker behavior.
            winrt::impl::call_factory<winrt::DependencyObject, winrt::IDependencyObjectFactory>([&](auto&& f) { f.CreateInstance(*this, this->m_inner); });
            //winrt::get_activation_factory<winrt::DependencyObject, winrt::IDependencyObjectFactory>().CreateInstance(*this, this->m_inner);
#pragma warning(pop)
        }
        if (this->m_inner)
        {
            if (auto trackerOwnerInner = this->m_inner.try_as<::ITrackerOwner>()) // Only exists on RS2+
            {
                m_trackerOwnerInnerNoRef = static_cast<::ITrackerOwner*>(winrt::get_abi(trackerOwnerInner));
            }
        }

#if DBG
        m_wasEnsureCalled = true;
#endif
    }

static void final_release ( std::unique_ptr< D > && self ) [inline, static]

Definition at line 129 of file RuntimeClassHelpers.h.

    {
        // Add an extra ref to prevent a crash due to double deletion.  There can be multiple reasons why it's good to
        // add an extra "safety ref" during destruction, but here's one such example:
        // C++/WinRT calls final_release when the ref-count goes to zero, and we call DeleteInstanceOnUIThread so that
        // if we're not on the UIThread, we dispatch a task to the UI thread to do the final delete there.  The problem
        // is that it's possible that while this final delete is happening on the UI thread, the same object is being
        // processed during the ReferenceTracker walk, which does an AddRef/Release to get the current ref count of the
        // object (see ComposingTrackerExtensionWrapper::GetActualRefCount).  If the refcount is zero, the AddRef/Release
        // will trigger another deletion (another call to this function), and we'll be in a bad state because the object
        // gets deleted twice.  The fix is to just add an extra ref, so it won't go to zero again.
        // C++/WinRT actually does this trick as well in root_implements<>::NonDelegatingRelease, which calls this function.
        // But the dtor for root_implements<> does one extra release, taking the refcount back down to zero again, so this
        // doesn't fix our problem.
        self->AddRef();
        DeleteInstanceOnUIThread(std::move(self));
    }

auto GetBase ( ) [inline]

Definition at line 70 of file RuntimeClassHelpers.h.

    {
        return this->m_inner.as<BaseType>();
    }

winrt::IInspectable GetInner ( ) [inline]

Definition at line 77 of file RuntimeClassHelpers.h.

    {
        return this->m_inner;
    }

bool IsOnThread ( ) [inline]

Definition at line 56 of file RuntimeClassHelpers.h.

    {
        return ::GetCurrentThreadId() == m_owningThreadId;
    }

int32_t __stdcall NonDelegatingQueryInterface | ( | winrt::guid const & | riid,
 |  | void ** | value |
 | ) |  |  | [inline]

Definition at line 82 of file RuntimeClassHelpers.h.

    {
        // In order for the reference tracking mechanism to work, we actually need to hand out XAML's
        // implementation of IWeakReferenceSource. However there are some bugs on RS2 where XAML calls
        // back out to the outer during initialization for IWeakReferenceSource and so our m_inner is null.
        // In that case we allow our "self" implementation to leak out (if we returned null, XAML would crash).
        if (InlineIsEqualGUID(riid, __uuidof(::IWeakReferenceSource)) && this->m_inner)
        {
            return winrt::get_unknown(this->m_inner)->QueryInterface(riid, value);
        }
        else
        {
            // We only implement IReferenceTrackerExtension if we're not composed (subclassed)
            // by another class; this interface has to be implemented by the controlling unknown,
            // because that's the object that controls the ref count.  Implementing this interface
            // communicates that you return valid ref counts from Release().
            if (InlineIsEqualGUID(riid, __uuidof(::IReferenceTrackerExtension)) && !this->outer())
            {
                *value = static_cast<::IReferenceTrackerExtension*>(this);
                static_cast<IUnknown*>(*value)->AddRef();
            }
            else
            {
                return impl_type::NonDelegatingQueryInterface(riid, value);
            }
        }

        return S_OK;
    }

HRESULT __stdcall QueryInterface | ( | GUID const & | id_abi,
 |  | void ** | object |
 | ) |  |  | [inline]

Definition at line 116 of file RuntimeClassHelpers.h.

    {
        auto& id = reinterpret_cast<winrt::guid const&>(id_abi);
        if (this->outer())
        {
            return this->outer()->QueryInterface(id, object);
        }

        return NonDelegatingQueryInterface(id, object);
    }

The documentation for this struct was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ReferenceTrackerContainerBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ReferenceTrackerContainerBase Class Reference

#include "tracker_ref.h"

Inherited by event_source< T >, event_source< winrt::DragEventHandler >, event_source< winrt::NotifyCollectionChangedEventHandler >, event_source< winrt::PropertyChangedEventHandler >, event_source< winrt::SelectionChangedEventHandler >, event_source< winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ColorPicker, winrt::ColorChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ColorSpectrum, winrt::ColorChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderCollapsedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderExpandingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::InfoBar, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::InkToolBarFlyoutItem, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ItemContainer, winrt::ItemContainerInvokedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::MapControl, winrt::MapControlMapServiceErrorOccurredEventArgs > >, event_source< winrt::TypedEventHandler< winrt::MapControl, winrt::MapElementClickEventArgs > >, event_source< winrt::TypedEventHandler< winrt::MapElementsLayer, winrt::MapElementClickEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::PipsPager, winrt::PipsPagerSelectedIndexChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::RatingControl, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs > >, event_source< winrt::TypedEventHandler< winrt::RefreshContainer, winrt::RefreshRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshStateChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingAnchorRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingBringingIntoViewEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollAnimationStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelChildrenRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelSelectionChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::SplitButton, winrt::SplitButtonClickEventArgs > >, event_source< winrt::TypedEventHandler< winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::IVectorChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::ToggleSplitButton, winrt::ToggleSplitButtonIsCheckedChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewCollapsedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewDragItemsCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewDragItemsStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewExpandingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewItemInvokedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewSelectionChangedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::TwoPaneView, winrt::IInspectable > >, event_source< winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2InitializedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationCompletedEventArgs > >, event_source< winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationStartingEventArgs > >, event_source< winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2ProcessFailedEventArgs > >, and event_source< winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2WebMessageReceivedEventArgs > >.

List of all members.

Public Member Functions

ReferenceTrackerContainerBase (ITrackerHandleManager *owner)

Detailed Description

Definition at line 409 of file tracker_ref.h.

Constructor & Destructor Documentation

ReferenceTrackerContainerBase ( ITrackerHandleManager * owner ) [inline]

Definition at line 412 of file tracker_ref.h.

        : m_owner{ owner }

The documentation for this class was generated from the following file:
  • inc/tracker_ref.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ReferenceTrackerStorageHelper< ImplT, T > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ReferenceTrackerStorageHelper< ImplT, T > Struct Template Reference

#include "tracker_ref.h"

List of all members.

Public Member Functions

T | unwrap (const tracker_ref< T > &holder) const
auto | wrap (const T &value) const

Private Member Functions

const ImplT * | Impl () const

Detailed Description

template<typename ImplT, typename T>
struct ReferenceTrackerStorageHelper< ImplT, T >

Definition at line 439 of file tracker_ref.h.

Member Function Documentation

const ImplT* Impl ( ) const [inline, private]

Definition at line 454 of file tracker_ref.h.

{ return static_cast<const ImplT*>(this); }

T unwrap ( const tracker_ref< T > & holder ) const [inline]

Definition at line 448 of file tracker_ref.h.

    {
        return holder.get();
    }

auto wrap ( const T & value ) const [inline]

Definition at line 441 of file tracker_ref.h.

    {
        tracker_ref<T> holder{ Impl()->GetTrackerHandleManager() };
        holder.set(value);
        return holder;
    }

The documentation for this struct was generated from the following file:
  • inc/tracker_ref.h
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshContainer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

RefreshContainer Class Reference

#include "RefreshContainer.h"

Inherits ReferenceTracker< RefreshContainer, winrt::implementation::RefreshContainerT, winrt::IRefreshContainerPrivate >, and RefreshContainerProperties.

List of all members.

Public Member Functions

RefreshContainer ()
~RefreshContainer ()
void | OnApplyTemplate ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RefreshInfoProviderAdapter (winrt::IRefreshInfoProviderAdapter const &value)
winrt::IRefreshInfoProviderAdapter | RefreshInfoProviderAdapter ()
void | RequestRefresh ()

Private Member Functions

void | OnPullDirectionChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnPullDirectionChangedImpl ()
void | OnRefreshInfoProviderAdapterChanged ()
void | OnRefreshInfoProviderAdapterChangedImpl ()
void | OnRefreshVisualizerChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnRefreshVisualizerChangedImpl ()
void | OnVisualizerRefreshRequested (const winrt::IInspectable &sender, const winrt::RefreshRequestedEventArgs &args)
void | OnVisualizerSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | RaiseRefreshRequested ()
void | RefreshCompleted ()
winrt::IRefreshInfoProvider | SearchTreeForIRefreshInfoProvider ()
winrt::IRefreshInfoProvider | SearchTreeForIRefreshInfoProviderRecursiveHelper (winrt::DependencyObject root, int depth)

Static Private Member Functions

static void | OnPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Detailed Description

Definition at line 9 of file RefreshContainer.h.

Constructor & Destructor Documentation

RefreshContainer ( )

Definition at line 56 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    __RP_Marker_ClassById(RuntimeProfiler::ProfId_RefreshContainer);

    SetDefaultStyleKey(this);

    m_refreshInfoProviderAdapter.set(winrt::make<ScrollViewerIRefreshInfoProviderAdapter>(PullDirection(), nullptr));
    m_hasDefaultRefreshInfoProviderAdapter = true;
    OnRefreshInfoProviderAdapterChanged();
}

~RefreshContainer ( )

Definition at line 47 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (auto refreshVisualizer = m_refreshVisualizer.safe_get())
    {
        refreshVisualizer.SizeChanged(m_refreshVisualizerSizeChangedToken);
    }
}

Member Function Documentation

void OnApplyTemplate ( )

Definition at line 69 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
    // BEGIN: Populate template children
    winrt::IControlProtected thisAsControlProtected = *this;
    m_root.set(GetTemplateChildT<winrt::Panel>(L"Root", thisAsControlProtected));
    m_refreshVisualizerPresenter.set(GetTemplateChildT<winrt::Panel>(L"RefreshVisualizerPresenter", thisAsControlProtected));
    // END: Populate template children

    if (m_root)
    {
        auto rootVisual = winrt::ElementCompositionPreview::GetElementVisual(m_root.get());
        rootVisual.Clip(rootVisual.Compositor().CreateInsetClip(0.0f, 0.0f, 0.0f, 0.0f));
    }

    m_refreshVisualizer.set(Visualizer());
    if (!m_refreshVisualizer)
    {
        Visualizer(winrt::RefreshVisualizer());
        m_hasDefaultRefreshVisualizer = true;
    }
    else
    {
        OnRefreshVisualizerChangedImpl();
        m_hasDefaultRefreshVisualizer = false;
    }

    m_refreshPullDirection = PullDirection();
    OnPullDirectionChangedImpl();
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 110 of file RefreshContainer.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    if (property == s_VisualizerProperty)
    {
        OnRefreshVisualizerChanged(args);
    }
    else if (property == s_PullDirectionProperty)
    {
        OnPullDirectionChanged(args);
    }
}

static void OnPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static, private]
void OnPullDirectionChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 154 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, args.OldValue(), args.NewValue());
    m_refreshPullDirection = PullDirection();
    OnPullDirectionChangedImpl();
}

void OnPullDirectionChangedImpl ( ) [private]

Definition at line 161 of file RefreshContainer.cpp.

{
    if (m_refreshVisualizerPresenter)
    {
        switch (m_refreshPullDirection)
        {
        case winrt::RefreshPullDirection::TopToBottom:
            m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Top);
            m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Stretch);
            if (m_hasDefaultRefreshVisualizer)
            {
                m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::TopToBottom);
                m_refreshVisualizer.get().Height(DEFAULT_PULL_DIMENSION_SIZE);
                m_refreshVisualizer.get().Width(DoubleUtil::NaN);
            }
            break;
        case winrt::RefreshPullDirection::LeftToRight:
            m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Stretch);
            m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Left);
            if (m_hasDefaultRefreshVisualizer)
            {
                m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::LeftToRight);
                m_refreshVisualizer.get().Height(DoubleUtil::NaN);
                m_refreshVisualizer.get().Width(DEFAULT_PULL_DIMENSION_SIZE);
            }
            break;
        case winrt::RefreshPullDirection::RightToLeft:
            m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Stretch);
            m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Right);
            if (m_hasDefaultRefreshVisualizer)
            {
                m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::RightToLeft);
                m_refreshVisualizer.get().Height(DoubleUtil::NaN);
                m_refreshVisualizer.get().Width(DEFAULT_PULL_DIMENSION_SIZE);
            }
            break;
        case winrt::RefreshPullDirection::BottomToTop:
            m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Bottom);
            m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Stretch);
            if (m_hasDefaultRefreshVisualizer)
            {
                m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::BottomToTop);
                m_refreshVisualizer.get().Height(DEFAULT_PULL_DIMENSION_SIZE);
                m_refreshVisualizer.get().Width(DoubleUtil::NaN);
            }
            break;
        default:
            MUX_ASSERT(false);
        }

        //If we have changed the PullDirection but the Adapter wont be updated by the size changed handler.
        if (m_hasDefaultRefreshInfoProviderAdapter &&
            m_hasDefaultRefreshVisualizer &&
            m_refreshVisualizer.get().ActualHeight() == DEFAULT_PULL_DIMENSION_SIZE &&
            m_refreshVisualizer.get().ActualWidth() == DEFAULT_PULL_DIMENSION_SIZE)
        {
            m_refreshInfoProviderAdapter.set(winrt::make<ScrollViewerIRefreshInfoProviderAdapter>(PullDirection(), nullptr));
            OnRefreshInfoProviderAdapterChanged();
        }

    }
}

void OnRefreshInfoProviderAdapterChanged ( ) [private]

Definition at line 224 of file RefreshContainer.cpp.

{
    if (m_root)
    {
        winrt::IRefreshInfoProvider firstChildAsInfoProvider = m_root.get().Children().GetAt(0).try_as<winrt::IRefreshInfoProvider>();
        if (firstChildAsInfoProvider)
        {
            m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().InfoProvider(firstChildAsInfoProvider);
        }
        else
        {
            winrt::IRefreshInfoProvider adaptFromTreeResult = nullptr;
            if (m_refreshInfoProviderAdapter)
            {
                adaptFromTreeResult = m_refreshInfoProviderAdapter.get().AdaptFromTree(m_root.get(), m_refreshVisualizer.get().RenderSize());
                if (adaptFromTreeResult)
                {
                    m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().InfoProvider(adaptFromTreeResult);
                    m_refreshInfoProviderAdapter.get().SetAnimations(m_refreshVisualizer.get());
                }
            }
            if (!adaptFromTreeResult)
            {
                m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().InfoProvider(SearchTreeForIRefreshInfoProvider());
            }
        }
    }
}

void OnRefreshInfoProviderAdapterChangedImpl ( ) [private]
void OnRefreshVisualizerChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 123 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH_PTR_PTR, METH_NAME, this, args.OldValue(), args.NewValue());
    if (m_refreshVisualizer && m_refreshVisualizerSizeChangedToken.value != 0)
    {
        m_refreshVisualizer.get().SizeChanged(m_refreshVisualizerSizeChangedToken);
    }

    m_refreshVisualizer.set(Visualizer());
    m_hasDefaultRefreshVisualizer = false;
    OnRefreshVisualizerChangedImpl();
}

void OnRefreshVisualizerChangedImpl ( ) [private]

Definition at line 136 of file RefreshContainer.cpp.

{
    if (m_refreshVisualizerPresenter)
    {
        m_refreshVisualizerPresenter.get().Children().Clear();
        if (m_refreshVisualizer)
        {
            m_refreshVisualizerPresenter.get().Children().Append(m_refreshVisualizer.get());
        }
    }

    if (m_refreshVisualizer)
    {
        m_refreshVisualizer.get().SizeChanged({ this, &RefreshContainer::OnVisualizerSizeChanged });
        m_refreshVisualizer.get().RefreshRequested({ this, &RefreshContainer::OnVisualizerRefreshRequested });
    }
}

void OnVisualizerRefreshRequested | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RefreshRequestedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 324 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
    m_visualizerRefreshCompletedDeferral.set(args.GetDeferral());
    RaiseRefreshRequested();
}

void OnVisualizerSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 314 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH_FLT_FLT_FLT_FLT, METH_NAME, this, args.PreviousSize().Width, args.PreviousSize().Height, args.NewSize().Width, args.NewSize().Height);
    if (m_hasDefaultRefreshInfoProviderAdapter)
    {
        m_refreshInfoProviderAdapter.set(winrt::make<ScrollViewerIRefreshInfoProviderAdapter>(PullDirection(), nullptr));
        OnRefreshInfoProviderAdapterChanged();
    }
}

void RaiseRefreshRequested ( ) [private]

Definition at line 331 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    com_ptr<RefreshContainer> strongThis = get_strong();

    winrt::Deferral instance{ [strongThis]()
        {
            strongThis->CheckThread();
            strongThis->RefreshCompleted();
        }
    };

    auto args = winrt::make_self<RefreshRequestedEventArgs>(instance);

    //This makes sure that everyone registered for this event can get access to the deferral
    //Otherwise someone could complete the deferral before someone else has had a chance to grab it
    args->IncrementDeferralCount();
    m_refreshRequestedEventSource(*this, *args);
    args->DecrementDeferralCount();
}

void RefreshCompleted ( ) [private]

Definition at line 352 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_visualizerRefreshCompletedDeferral)
    {
        m_visualizerRefreshCompletedDeferral.get().Complete();
    }
}

winrt::IRefreshInfoProviderAdapter RefreshInfoProviderAdapter ( )

Definition at line 362 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
    return m_refreshInfoProviderAdapter.get();
}

void RefreshInfoProviderAdapter ( winrt::IRefreshInfoProviderAdapter const & value )

Definition at line 368 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH_PTR, METH_NAME, this, value);
    m_refreshInfoProviderAdapter.set(value);
    m_hasDefaultRefreshInfoProviderAdapter = false;
    OnRefreshInfoProviderAdapterChanged();
}

void RequestRefresh ( )

Definition at line 100 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
    if (m_refreshVisualizer)
    {
        m_refreshVisualizer.get().RequestRefresh();
    }
}

winrt::IRefreshInfoProvider SearchTreeForIRefreshInfoProvider ( ) [private]

Definition at line 253 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
    if (m_root)
    {
        winrt::IRefreshInfoProvider rootAsIRIP = m_root.try_as<winrt::IRefreshInfoProvider>();
        int depth = 0;
        if (rootAsIRIP)
        {
            return rootAsIRIP;
        }
        else
        {
            while (depth < MAX_BFS_DEPTH)
            {
                winrt::IRefreshInfoProvider result = SearchTreeForIRefreshInfoProviderRecursiveHelper(m_root.get(), depth);
                if (result)
                {
                    return result;
                    break;
                }
                depth++;
            }
        }
    }

    return nullptr;
}

winrt::IRefreshInfoProvider SearchTreeForIRefreshInfoProviderRecursiveHelper | ( | winrt::DependencyObject | root,
 |  | int | depth |
 | ) |  |  | [private]

Definition at line 282 of file RefreshContainer.cpp.

{
    PTR_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, depth);
    const int numChildren = winrt::VisualTreeHelper::GetChildrenCount(root);
    if (depth == 0)
    {
        for (int i = 0; i < numChildren; i++)
        {
            winrt::DependencyObject childObject = winrt::VisualTreeHelper::GetChild(root, i);
            winrt::IRefreshInfoProvider childObjectAsIRIP = childObject.try_as<winrt::IRefreshInfoProvider>();
            if (childObjectAsIRIP)
            {
                return childObjectAsIRIP;
            }
        }
        return nullptr;
    }
    else
    {
        for (int i = 0; i < numChildren; i++)
        {
            winrt::DependencyObject childObject = winrt::VisualTreeHelper::GetChild(root, i);
            winrt::IRefreshInfoProvider recursiveResult = SearchTreeForIRefreshInfoProviderRecursiveHelper(childObject, depth - 1);
            if (recursiveResult)
            {
                return recursiveResult;
            }
        }
        return nullptr;
    }
}

The documentation for this class was generated from the following files:
  • PullToRefresh/RefreshContainer/RefreshContainer.h
  • PullToRefresh/RefreshContainer/RefreshContainer.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshContainerProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

RefreshContainerProperties Class Reference

#include "RefreshContainer.properties.h"

Inherited by RefreshContainer.

List of all members.

Public Member Functions

RefreshContainerProperties ()
void | PullDirection (winrt::RefreshPullDirection const &value)
winrt::RefreshPullDirection | PullDirection ()
void | RefreshRequested (winrt::event_token const &token)
winrt::event_token | RefreshRequested (winrt::TypedEventHandler< winrt::RefreshContainer, winrt::RefreshRequestedEventArgs > const &value)
void | Visualizer (winrt::RefreshVisualizer const &value)
winrt::RefreshVisualizer | Visualizer ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static void | OnPullDirectionPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVisualizerPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PullDirectionProperty ()
static winrt::DependencyProperty | VisualizerProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::RefreshContainer,
winrt::RefreshRequestedEventArgs > > 		m_refreshRequestedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_PullDirectionProperty
static GlobalDependencyProperty | s_VisualizerProperty

Detailed Description

Definition at line 7 of file RefreshContainer.properties.h.

Constructor & Destructor Documentation

RefreshContainerProperties ( )

Definition at line 19 of file RefreshContainer.properties.cpp.

    : m_refreshRequestedEventSource{static_cast<RefreshContainer*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
static void OnPullDirectionPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVisualizerPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::RefreshPullDirection PullDirection ( )
void PullDirection ( winrt::RefreshPullDirection const & value )
static winrt::DependencyProperty PullDirectionProperty ( ) [inline, static]

Definition at line 18 of file RefreshContainer.properties.h.

{ return s_PullDirectionProperty; }

void RefreshRequested ( winrt::event_token const & token )
winrt::event_token RefreshRequested ( winrt::TypedEventHandler< winrt::RefreshContainer, winrt::RefreshRequestedEventArgs > const & value )
winrt::RefreshVisualizer Visualizer ( )
void Visualizer ( winrt::RefreshVisualizer const & value )
static winrt::DependencyProperty VisualizerProperty ( ) [inline, static]

Definition at line 19 of file RefreshContainer.properties.h.

{ return s_VisualizerProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::RefreshContainer, winrt::RefreshRequestedEventArgs> > m_refreshRequestedEventSource

Definition at line 27 of file RefreshContainer.properties.h.

GlobalDependencyProperty s_PullDirectionProperty [static]

Definition at line 21 of file RefreshContainer.properties.h.

GlobalDependencyProperty s_VisualizerProperty [static]

Definition at line 22 of file RefreshContainer.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RefreshContainer.properties.h
  • Generated/RefreshContainer.properties.cpp
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshInfoProviderImpl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

RefreshInfoProviderImpl Class Reference

#include "RefreshInfoProviderImpl.h"

Inherits ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner >.

List of all members.

Public Member Functions

RefreshInfoProviderImpl ()
RefreshInfoProviderImpl (const winrt::RefreshPullDirection &refreshPullDirection, const winrt::Size &refreshVisualizerSize, const winrt::Compositor &compositor)
~RefreshInfoProviderImpl ()
bool | AreClose (double interactionRatio, double target)
winrt::CompositionPropertySet | CompositionProperties ()
void | CustomAnimationStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs &args)
double | ExecutionRatio ()
void | IdleStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerIdleStateEnteredArgs &args)
void | InertiaStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInertiaStateEnteredArgs &args)
void | InteractingStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInteractingStateEnteredArgs &args)
winrt::event_token | InteractionRatioChanged (const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::RefreshInteractionRatioChangedEventArgs > &handler)
void | InteractionRatioChanged (const winrt::event_token &token)
winrt::hstring | InteractionRatioCompositionProperty ()
bool | IsInteractingForRefresh ()
void | IsInteractingForRefreshChanged (const winrt::event_token &token)
winrt::event_token | IsInteractingForRefreshChanged (const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > &handler)
void | OnRefreshCompleted ()
void | OnRefreshStarted ()
void | RaiseInteractionRatioChanged (double interactionRatio)
void | RaiseIsInteractingForRefreshChanged ()
void | RaiseRefreshCompleted ()
void | RaiseRefreshStarted ()
winrt::event_token | RefreshCompleted (const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > &handler)
void | RefreshCompleted (const winrt::event_token &token)
void | RefreshStarted (const winrt::event_token &token)
winrt::event_token | RefreshStarted (const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > &handler)
void | RequestIgnored (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerRequestIgnoredArgs &args)
void | SetPeekingMode (bool peeking)
void | UpdateIsInteractingForRefresh (bool value)
void | ValuesChanged (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerValuesChangedArgs &args)

Private Attributes

PCWSTR | m_interactionRatioCompositionProperty = "InteractionRatio"

Detailed Description

Definition at line 9 of file RefreshInfoProviderImpl.h.

Constructor & Destructor Documentation

RefreshInfoProviderImpl ( )

Definition at line 24 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~RefreshInfoProviderImpl ( )

Definition at line 29 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

RefreshInfoProviderImpl | ( | const winrt::RefreshPullDirection & | refreshPullDirection,
 |  | const winrt::Size & | refreshVisualizerSize,
 |  | const winrt::Compositor & | compositor
 | ) |  |

Definition at line 34 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_refreshPullDirection = refreshPullDirection;
    m_refreshVisualizerSize = refreshVisualizerSize;
    m_compositionProperties = compositor.CreatePropertySet();
}

Member Function Documentation

bool AreClose | ( | double | interactionRatio,
 |  | double | target
 | ) |  |

Definition at line 217 of file RefreshInfoProviderImpl.cpp.

{
    return abs(interactionRatio - target) < ALWAYS_RAISE_INTERACTION_RATIO_TOLERANCE;
}

winrt::CompositionPropertySet CompositionProperties ( )

Definition at line 179 of file RefreshInfoProviderImpl.cpp.

{
    return m_compositionProperties;
}

void CustomAnimationStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerCustomAnimationStateEnteredArgs & | args
 | ) |  |

Definition at line 100 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
}

double ExecutionRatio ( )

Definition at line 168 of file RefreshInfoProviderImpl.cpp.

{
    return m_executionRatio;
}

void IdleStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerIdleStateEnteredArgs & | args
 | ) |  |

Definition at line 95 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
}

void InertiaStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerInertiaStateEnteredArgs & | args
 | ) |  |

Definition at line 89 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
    UpdateIsInteractingForRefresh(false);
}

void InteractingStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerInteractingStateEnteredArgs & | args
 | ) |  |

Definition at line 83 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
    UpdateIsInteractingForRefresh(true);
}

winrt::event_token InteractionRatioChanged ( const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::RefreshInteractionRatioChangedEventArgs > & handler )

Definition at line 120 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
    return m_InteractionRatioChangedEventSource.add(handler);
}

void InteractionRatioChanged ( const winrt::event_token & token )

Definition at line 126 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
    m_InteractionRatioChangedEventSource.remove(token);
}

winrt::hstring InteractionRatioCompositionProperty ( )

Definition at line 173 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    return m_interactionRatioCompositionProperty;
}

bool IsInteractingForRefresh ( )

Definition at line 184 of file RefreshInfoProviderImpl.cpp.

{
    return m_isInteractingForRefresh;
}

void IsInteractingForRefreshChanged ( const winrt::event_token & token )

Definition at line 138 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
    m_IsInteractingForRefreshChangedEventSource.remove(token);
}

winrt::event_token IsInteractingForRefreshChanged ( const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > & handler )

Definition at line 132 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
    return m_IsInteractingForRefreshChangedEventSource.add(handler);
}

void OnRefreshCompleted ( )

Definition at line 114 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    RaiseRefreshCompleted();
}

void OnRefreshStarted ( )

Definition at line 108 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    RaiseRefreshStarted();
}

void RaiseInteractionRatioChanged ( double interactionRatio )

Definition at line 192 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, interactionRatio);

    m_compositionProperties.InsertScalar(m_interactionRatioCompositionProperty, static_cast<float>(interactionRatio));

    if (m_interactionRatioChangedCount == 0 || AreClose(interactionRatio, 0.0) || AreClose(interactionRatio, m_executionRatio))
    {
        if (m_InteractionRatioChangedEventSource)
        {
            auto interactionRatioChangedArgs = winrt::make<RefreshInteractionRatioChangedEventArgs>(interactionRatio);
            m_InteractionRatioChangedEventSource(*this, interactionRatioChangedArgs);
        }
        m_interactionRatioChangedCount = 1;
    }
    else if (m_interactionRatioChangedCount >= RAISE_INTERACTION_RATIO_CHANGED_FREQUENCY)
    {
        m_interactionRatioChangedCount = 0;
    }
    else
    {
        m_interactionRatioChangedCount++;
    }
}

void RaiseIsInteractingForRefreshChanged ( )

Definition at line 222 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_IsInteractingForRefreshChangedEventSource(*this, nullptr);
}

void RaiseRefreshCompleted ( )

Definition at line 234 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_RefreshCompletedEventSource(*this, nullptr);
}

void RaiseRefreshStarted ( )

Definition at line 228 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_RefreshStartedEventSource(*this, nullptr);
}

winrt::event_token RefreshCompleted ( const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > & handler )

Definition at line 156 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
    return m_RefreshCompletedEventSource.add(handler);
}

void RefreshCompleted ( const winrt::event_token & token )

Definition at line 162 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
    m_RefreshCompletedEventSource.remove(token);
}

void RefreshStarted ( const winrt::event_token & token )

Definition at line 150 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
    m_RefreshStartedEventSource.remove(token);
}

winrt::event_token RefreshStarted ( const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > & handler )

Definition at line 144 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
    return m_RefreshStartedEventSource.add(handler);
}

void RequestIgnored | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerRequestIgnoredArgs & | args
 | ) |  |

Definition at line 78 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
}

void SetPeekingMode ( bool peeking )

Definition at line 240 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, peeking);
    m_peeking = peeking;
}

void UpdateIsInteractingForRefresh ( bool value )

Definition at line 42 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    const bool isInteractingForRefresh = value && !m_peeking;
    if (isInteractingForRefresh != m_isInteractingForRefresh)
    {
        m_isInteractingForRefresh = isInteractingForRefresh;
        RaiseIsInteractingForRefreshChanged();
    }
}

void ValuesChanged | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerValuesChangedArgs & | args
 | ) |  |

Definition at line 56 of file RefreshInfoProviderImpl.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_FLT_FLT_FLT, METH_NAME, this, args.Position().x, args.Position().y, args.Position().z);
    switch (m_refreshPullDirection)
    {
    case winrt::RefreshPullDirection::TopToBottom:
        RaiseInteractionRatioChanged(m_refreshVisualizerSize.Height == 0 ? 1.0 : std::min(1.0, (double)-args.Position().y / m_refreshVisualizerSize.Height));
        break;
    case winrt::RefreshPullDirection::BottomToTop:
        RaiseInteractionRatioChanged(m_refreshVisualizerSize.Height == 0 ? 1.0f : std::min(1.0, (double)args.Position().y / m_refreshVisualizerSize.Height));
        break;
    case winrt::RefreshPullDirection::LeftToRight:
        RaiseInteractionRatioChanged(m_refreshVisualizerSize.Width == 0 ? 1.0f : std::min(1.0, (double)-args.Position().x / m_refreshVisualizerSize.Width));
        break;
    case winrt::RefreshPullDirection::RightToLeft:
        RaiseInteractionRatioChanged(m_refreshVisualizerSize.Width == 0 ? 1.0f : std::min(1.0, (double)args.Position().x / m_refreshVisualizerSize.Width));
        break;
    default:
        MUX_ASSERT(false);
    }
}

Member Data Documentation

PCWSTR m_interactionRatioCompositionProperty = "InteractionRatio" [private]

Definition at line 60 of file RefreshInfoProviderImpl.h.

The documentation for this class was generated from the following files:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.h
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshInteractionRatioChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RefreshInteractionRatioChangedEventArgs Class Reference

#include "RefreshInteractionRatioChangedEventArgs.h"

List of all members.

Public Member Functions

RefreshInteractionRatioChangedEventArgs (double value)
double InteractionRatio ()

Detailed Description

Definition at line 8 of file RefreshInteractionRatioChangedEventArgs.h.

Constructor & Destructor Documentation

RefreshInteractionRatioChangedEventArgs ( double value )

Definition at line 9 of file RefreshInteractionRatioChangedEventArgs.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_interactionRatio = value;
}

Member Function Documentation

double InteractionRatio ( )

Definition at line 15 of file RefreshInteractionRatioChangedEventArgs.cpp.

{
    return m_interactionRatio;
}

The documentation for this class was generated from the following files:
  • PullToRefresh/RefreshVisualizer/RefreshInteractionRatioChangedEventArgs.h
  • PullToRefresh/RefreshVisualizer/RefreshInteractionRatioChangedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RefreshRequestedEventArgs Class Reference

#include "RefreshVisualizerEventArgs.h"

Inherits ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

RefreshRequestedEventArgs (const winrt::Deferral &handler)
void | DecrementDeferralCount ()
winrt::Deferral | GetDeferral ()
void | IncrementDeferralCount ()

Detailed Description

Definition at line 35 of file RefreshVisualizerEventArgs.h.

Constructor & Destructor Documentation

RefreshRequestedEventArgs ( const winrt::Deferral & handler )

Definition at line 35 of file RefreshVisualizerEventArgs.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_deferral.set(handler);
}

Member Function Documentation

void DecrementDeferralCount ( )

Definition at line 56 of file RefreshVisualizerEventArgs.cpp.

{
    MUX_ASSERT(m_deferralCount >= 0);
    m_deferralCount--;
    if (m_deferralCount == 0)
    {
        m_deferral.get().Complete();
    }
}

winrt::Deferral GetDeferral ( )

Definition at line 41 of file RefreshVisualizerEventArgs.cpp.

{
    m_deferralCount++;

    com_ptr<RefreshRequestedEventArgs> strongThis = get_strong();

    winrt::Deferral instance{ [strongThis]()
        {
            strongThis->CheckThread();
            strongThis->DecrementDeferralCount();
        }
    };
    return instance;
}

void IncrementDeferralCount ( )

Definition at line 66 of file RefreshVisualizerEventArgs.cpp.

{
    m_deferralCount++;
}

The documentation for this class was generated from the following files:
  • PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.h
  • PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshStateChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RefreshStateChangedEventArgs Class Reference

#include "RefreshVisualizerEventArgs.h"

List of all members.

Public Member Functions

RefreshStateChangedEventArgs (winrt::RefreshVisualizerState oldValue, winrt::RefreshVisualizerState newValue)
winrt::RefreshVisualizerState | NewState ()
winrt::RefreshVisualizerState | OldState ()

Detailed Description

Definition at line 15 of file RefreshVisualizerEventArgs.h.

Constructor & Destructor Documentation

RefreshStateChangedEventArgs | ( | winrt::RefreshVisualizerState | oldValue,
 |  | winrt::RefreshVisualizerState | newValue
 | ) |  |

Definition at line 15 of file RefreshVisualizerEventArgs.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_oldState = oldValue;
    m_newState = newValue;
}

Member Function Documentation

winrt::RefreshVisualizerState NewState ( )

Definition at line 27 of file RefreshVisualizerEventArgs.cpp.

{
    return m_newState;
}

winrt::RefreshVisualizerState OldState ( )

Definition at line 22 of file RefreshVisualizerEventArgs.cpp.

{
    return m_oldState;
}

The documentation for this class was generated from the following files:
  • PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.h
  • PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshVisualizer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

RefreshVisualizer Class Reference

#include "RefreshVisualizer.h"

Inherits ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate >, and RefreshVisualizerProperties.

List of all members.

Public Member Functions

RefreshVisualizer ()
~RefreshVisualizer ()
void | InfoProvider (winrt::IRefreshInfoProvider const &value)
winrt::IRefreshInfoProvider | InfoProvider ()
void | OnApplyTemplate ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RequestRefresh ()
void | SetInternalPullDirection (winrt::RefreshPullDirection const &value)

Private Member Functions

void | ExecuteExecutingRotationAnimation ()
void | ExecuteInteractingAnimations ()
void | ExecuteScaleUpAnimation ()
bool | IsPullDirectionFar ()
bool | IsPullDirectionVertical ()
void | OnContentChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnContentChangedImpl ()
void | OnOrientationChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnOrientationChangedImpl ()
void | OnRefreshInfoProviderChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnStateChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | put_State (const winrt::RefreshVisualizerState &value)
void | RaiseRefreshRequested ()
void | RaiseRefreshStateChanged (const winrt::RefreshVisualizerState &oldState, const winrt::RefreshVisualizerState &newState)
void | RefreshCompleted ()
void | RefreshInfoProvider_InteractingForRefreshChanged (const winrt::IInspectable &sender, const winrt::IInspectable &e)
void | RefreshInfoProvider_InteractionRatioChanged (const winrt::IRefreshInfoProvider &sender, const winrt::RefreshInteractionRatioChangedEventArgs &e)
void | UpdateContent ()
void | UpdateRefreshState (const winrt::RefreshVisualizerState &newState)

Detailed Description

Definition at line 9 of file RefreshVisualizer.h.

Constructor & Destructor Documentation

RefreshVisualizer ( )

Definition at line 35 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    __RP_Marker_ClassById(RuntimeProfiler::ProfId_RefreshVisualizer);

    SetDefaultStyleKey(this);
}

~RefreshVisualizer ( )

Definition at line 25 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (auto refreshInfoProvider = m_refreshInfoProvider.safe_get())
    {
        refreshInfoProvider.IsInteractingForRefreshChanged(m_RefreshInfoProvider_InteractingForRefreshChangedToken);
        refreshInfoProvider.InteractionRatioChanged(m_RefreshInfoProvider_InteractionRatioChangedToken);
    }
}

Member Function Documentation

void ExecuteExecutingRotationAnimation ( ) [private]

Definition at line 422 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_content)
    {
        const winrt::Visual contentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_content.get());
        if (!m_compositor)
        {
            m_compositor.set(contentVisual.Compositor());
        }

        const winrt::ScalarKeyFrameAnimation contentExecutionRotationAnimation = m_compositor.get().CreateScalarKeyFrameAnimation();
        contentExecutionRotationAnimation.InsertKeyFrame(0.0f, m_startingRotationAngle, m_compositor.get().CreateLinearEasingFunction());
        contentExecutionRotationAnimation.InsertKeyFrame(1.0f, m_startingRotationAngle + (float)(2.0f * M_PI), m_compositor.get().CreateLinearEasingFunction());
        contentExecutionRotationAnimation.Duration(500ms);
        contentExecutionRotationAnimation.IterationBehavior(winrt::AnimationIterationBehavior::Forever);

        const winrt::Size contentSize = m_content.get().RenderSize();
        contentVisual.CenterPoint({ (float)(contentSize.Height / 2), (float)(contentSize.Width / 2), 0.0f });

        contentVisual.StartAnimation(L"RotationAngle", contentExecutionRotationAnimation);
    }
}

void ExecuteInteractingAnimations ( ) [private]

Definition at line 317 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_content && m_refreshInfoProvider)
    {
        winrt::Visual contentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_content.get());
        if (!m_compositor)
        {
            m_compositor.set(contentVisual.Compositor());
        }

        //Set up the InteractionRatioRotationAnimation
        const winrt::Size contentSize = m_content.get().RenderSize();
        contentVisual.CenterPoint({ (float)(contentSize.Height / 2), (float)(contentSize.Width / 2), 0.0f });

        const winrt::hstring interactionRatioPropertyName = m_refreshInfoProvider.get().InteractionRatioCompositionProperty();
        const winrt::CompositionPropertySet interactionRatioPropertySet = m_refreshInfoProvider.get().CompositionProperties();

        const winrt::ExpressionAnimation contentInteractionRatioRotationAnimation = m_compositor.get().CreateExpressionAnimation(
            L"startingRotationAngle + (Pi * (Clamp(RefreshInteractionRatioPropertySet." +
            static_cast<std::wstring>(interactionRatioPropertyName) +
            L", 0.0f, contentVisual.DEFAULT_REFRESHINDICATOR_THRESHOLD_RATIO) / contentVisual.DEFAULT_REFRESHINDICATOR_THRESHOLD_RATIO) * 2)");

        const auto thresholdRatioName{ L"DEFAULT_REFRESHINDICATOR_THRESHOLD_RATIO"sv };
        contentVisual.Properties().InsertScalar(thresholdRatioName, static_cast<float>(m_executionRatio));
        contentInteractionRatioRotationAnimation.SetReferenceParameter(L"contentVisual", contentVisual);
        contentInteractionRatioRotationAnimation.SetReferenceParameter(L"RefreshInteractionRatioPropertySet", interactionRatioPropertySet);
        contentInteractionRatioRotationAnimation.SetScalarParameter(L"startingRotationAngle", m_startingRotationAngle);

        contentVisual.StartAnimation(L"RotationAngle", contentInteractionRatioRotationAnimation);

        //Set up the InteractionRatioOpacityAnimation
        const winrt::ExpressionAnimation contentInteractionRatioOpacityAnimation = m_compositor.get().CreateExpressionAnimation(
            L"((1.0f - contentVisual.MINIMUM_INDICATOR_OPACITY) * RefreshInteractionRatioPropertySet."
            + static_cast<std::wstring>(interactionRatioPropertyName) +
            L") + contentVisual.MINIMUM_INDICATOR_OPACITY");
        const auto minOpacityName{ L"MINIMUM_INDICATOR_OPACITY"sv };
        contentVisual.Properties().InsertScalar(minOpacityName, MINIMUM_INDICATOR_OPACITY);
        contentInteractionRatioOpacityAnimation.SetReferenceParameter(L"contentVisual", contentVisual);
        contentInteractionRatioOpacityAnimation.SetReferenceParameter(L"RefreshInteractionRatioPropertySet", interactionRatioPropertySet);

        //contentVisual.StartAnimation(L"Opacity", contentInteractionRatioOpacityAnimation);

        //Set up the InteractionRatioParallaxAnimation
        winrt::ExpressionAnimation contentInteractionRatioParallaxAnimation{ nullptr };
        if (IsPullDirectionFar())
        {
            contentInteractionRatioParallaxAnimation = m_compositor.get().CreateExpressionAnimation(
                L"((1.0f - contentVisual.DEFAULT_REFRESHINDICATOR_THRESHOLD_RATIO) * rootSize * 0.5f * -1.0f) * min((RefreshInteractionRatioPropertySet."
                + static_cast<std::wstring>(interactionRatioPropertyName) +
                L" / contentVisual.DEFAULT_REFRESHINDICATOR_THRESHOLD_RATIO), 1.0f)");
        }
        else
        {
            contentInteractionRatioParallaxAnimation = m_compositor.get().CreateExpressionAnimation(
                L"((1.0f - contentVisual.DEFAULT_REFRESHINDICATOR_THRESHOLD_RATIO) * rootSize * 0.5f) * min((RefreshInteractionRatioPropertySet."
                + static_cast<std::wstring>(interactionRatioPropertyName) +
                L" / contentVisual.DEFAULT_REFRESHINDICATOR_THRESHOLD_RATIO), 1.0f)");
        }
        if (m_root)
        {
            contentInteractionRatioParallaxAnimation.SetScalarParameter(L"rootSize", (float)(IsPullDirectionVertical() ? m_root.get().ActualHeight() : m_root.get().ActualWidth()));
        }
        else
        {
            contentInteractionRatioParallaxAnimation.SetScalarParameter(L"rootSize", 0.0f);
        }

        contentInteractionRatioParallaxAnimation.SetReferenceParameter(L"contentVisual", contentVisual);
        contentInteractionRatioParallaxAnimation.SetReferenceParameter(L"RefreshInteractionRatioPropertySet", interactionRatioPropertySet);

        if (IsPullDirectionVertical())
        {
            contentVisual.StartAnimation(L"Translation.Y", contentInteractionRatioParallaxAnimation);
        }
        else
        {
            contentVisual.StartAnimation(L"Translation.X", contentInteractionRatioParallaxAnimation);
        }
    }
}

void ExecuteScaleUpAnimation ( ) [private]

Definition at line 399 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_content)
    {
        const winrt::Visual contentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_content.get());
        if (!m_compositor)
        {
            m_compositor.set(contentVisual.Compositor());
        }

        const winrt::Vector2KeyFrameAnimation contentScaleAnimation = m_compositor.get().CreateVector2KeyFrameAnimation();
        contentScaleAnimation.InsertKeyFrame(0.5f, winrt::float2(1.50f, 1.50f));
        contentScaleAnimation.InsertKeyFrame(1.0f, winrt::float2(1.0f, 1.0f));
        contentScaleAnimation.Duration(300ms);

        const winrt::Size contentSize = m_content.get().RenderSize();
        contentVisual.CenterPoint({ (float)(contentSize.Height / 2), (float)(contentSize.Width / 2), 0.0f });

        contentVisual.StartAnimation(L"Scale.XY", contentScaleAnimation);
    }
}

void InfoProvider ( winrt::IRefreshInfoProvider const & value )

Definition at line 94 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, value);
    SetValue(s_InfoProviderProperty, value);
}

winrt::IRefreshInfoProvider InfoProvider ( )

Definition at line 88 of file RefreshVisualizer.cpp.

{
    winrt::IInspectable valueAsII = GetValue(s_InfoProviderProperty);
    return valueAsII.as<winrt::IRefreshInfoProvider>();
}

bool IsPullDirectionFar ( ) [private]

Definition at line 599 of file RefreshVisualizer.cpp.

{
    return m_pullDirection == winrt::RefreshPullDirection::BottomToTop || m_pullDirection == winrt::RefreshPullDirection::RightToLeft;
}

bool IsPullDirectionVertical ( ) [private]

Definition at line 594 of file RefreshVisualizer.cpp.

{
    return m_pullDirection == winrt::RefreshPullDirection::TopToBottom || m_pullDirection == winrt::RefreshPullDirection::BottomToTop;
}

void OnApplyTemplate ( )

Definition at line 44 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    // BEGIN: Populate template children
    winrt::IControlProtected thisAsControlProtected = *this;
    m_root.set(GetTemplateChildT<winrt::Panel>(L"Root", thisAsControlProtected));
    // END: Populate template children

    // BEGIN: Initialize our private backers to the dependency properties and initialize state.
    m_state = State();

    m_orientation = Orientation();
    OnOrientationChangedImpl();

    m_content.set(Content());
    if (!m_content)
    {
        winrt::SymbolIcon defaultContent = winrt::SymbolIcon(winrt::Symbol::Refresh);
        defaultContent.Height(DEFAULT_INDICATOR_SIZE);
        defaultContent.Width(DEFAULT_INDICATOR_SIZE);

        Content(defaultContent);
    }
    else
    {
        OnContentChangedImpl();
    }
    // END: Initialize

    UpdateContent();
}

void OnContentChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 208 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR_PTR, METH_NAME, this, args.OldValue(), args.NewValue());
    m_content.set(Content());
    OnContentChangedImpl();
    UpdateContent();
}

void OnContentChangedImpl ( ) [private]

Definition at line 216 of file RefreshVisualizer.cpp.

{
    if (m_root)
    {
        // There is a slight parallax animation of the progress indicator as the IRefreshInfoProvider updates
        // the interaction ratio. Unfortunately, this composition animation would be clobbered by setting the alignment
        // properties of the visual's Xaml object. To get around this we wrap the indicator in a container and set the
        // container's alignment properties instead. On RS2+ we can instead animate the Translation XAML property, if
        // the progress Indicator is a Framework Element and has the Vertical/Horizontal Alignment properties.
        m_root.get().Children().Clear();

        if (!m_content)
        {
            winrt::SymbolIcon defaultContent = winrt::SymbolIcon(winrt::Symbol::Refresh);
            defaultContent.Height(DEFAULT_INDICATOR_SIZE);
            defaultContent.Width(DEFAULT_INDICATOR_SIZE);

            m_content.set(defaultContent);
        }

        winrt::Panel m_containerPanel = m_root.get();
        auto contentAsFrameworkElement = m_content.try_as<winrt::FrameworkElement>();

        if (!contentAsFrameworkElement)
        {
            m_containerPanel = winrt::Grid();
            m_root.get().Children().InsertAt(0, m_containerPanel);
            m_containerPanel.VerticalAlignment(winrt::VerticalAlignment::Center);
            m_containerPanel.HorizontalAlignment(winrt::HorizontalAlignment::Center);
        }
        else
        {
            winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_content.get(), true);
            contentAsFrameworkElement.VerticalAlignment(winrt::VerticalAlignment::Center);
            contentAsFrameworkElement.HorizontalAlignment(winrt::HorizontalAlignment::Center);
        }

        m_containerPanel.Children().InsertAt(0, m_content.get());
    }
}

void OnOrientationChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 157 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, args.OldValue(), args.NewValue());
    m_orientation = Orientation();
    OnOrientationChangedImpl();
    UpdateContent();
}

void OnOrientationChangedImpl ( ) [private]

Definition at line 165 of file RefreshVisualizer.cpp.

{
    switch (m_orientation)
    {
    case winrt::RefreshVisualizerOrientation::Auto:
        switch (m_pullDirection)
        {
        case winrt::RefreshPullDirection::TopToBottom:
        case winrt::RefreshPullDirection::BottomToTop:
            m_startingRotationAngle = 0.0f;
            break;
        case winrt::RefreshPullDirection::LeftToRight:
            m_startingRotationAngle = (float)-M_PI_2;
            break;
        case winrt::RefreshPullDirection::RightToLeft:
            m_startingRotationAngle = (float)M_PI_2;
            break;
        }
        break;
    case winrt::RefreshVisualizerOrientation::Normal:
        m_startingRotationAngle = 0.0f;
        break;
    case winrt::RefreshVisualizerOrientation::Rotate270DegreesCounterclockwise:
        m_startingRotationAngle = (float)-M_PI_2;
        break;
    case winrt::RefreshVisualizerOrientation::Rotate90DegreesCounterclockwise:
        m_startingRotationAngle = (float)M_PI_2;
        break;
    default:
        MUX_ASSERT(false);
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 109 of file RefreshVisualizer.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    if (property == s_InfoProviderProperty)
    {
        OnRefreshInfoProviderChanged(args);
    }
    else if (property == s_OrientationProperty)
    {
        OnOrientationChanged(args);
    }
    else if (property == s_StateProperty)
    {
        OnStateChanged(args);
    }
    else if (property == s_ContentProperty)
    {
        OnContentChanged(args);
    }
}

void OnRefreshInfoProviderChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 130 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR_PTR, METH_NAME, this, args.OldValue(), args.NewValue());
    if (m_refreshInfoProvider)
    {
        m_refreshInfoProvider.get().IsInteractingForRefreshChanged(m_RefreshInfoProvider_InteractingForRefreshChangedToken);
        m_refreshInfoProvider.get().InteractionRatioChanged(m_RefreshInfoProvider_InteractionRatioChangedToken);
    }

    m_refreshInfoProvider.set(InfoProvider());

    if (m_refreshInfoProvider)
    {
        m_RefreshInfoProvider_InteractingForRefreshChangedToken = m_refreshInfoProvider.get().IsInteractingForRefreshChanged({ this, &RefreshVisualizer::RefreshInfoProvider_InteractingForRefreshChanged });
        m_RefreshInfoProvider_InteractionRatioChangedToken = m_refreshInfoProvider.get().InteractionRatioChanged({ this, &RefreshVisualizer::RefreshInfoProvider_InteractionRatioChanged });

        m_executionRatio = m_refreshInfoProvider.get().ExecutionRatio();
    }
    else
    {
        m_RefreshInfoProvider_InteractingForRefreshChangedToken = {};
        m_RefreshInfoProvider_InteractionRatioChangedToken = {};

        m_executionRatio = 1.0f;
    }
}

void OnStateChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 198 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, args.OldValue(), args.NewValue());
    const winrt::RefreshVisualizerState oldstate = m_state;
    m_state = State();
    UpdateContent();
    RaiseRefreshStateChanged(oldstate, m_state);
}

void put_State ( const winrt::RefreshVisualizerState & value ) [private]

Definition at line 588 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, value);
    SetValue(s_StateProperty, box_value(value));
}

void RaiseRefreshRequested ( ) [private]

Definition at line 462 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    com_ptr<RefreshVisualizer> strongThis = get_strong();

    const winrt::Deferral instance{ [strongThis]()
        {
            strongThis->CheckThread();
            strongThis->RefreshCompleted();
        }
    };

    const auto args = winrt::make_self<RefreshRequestedEventArgs>(instance);

    //This makes sure that everyone registered for this event can get access to the deferral
    //Otherwise someone could complete the deferral before someone else has had a chance to grab it
    args->IncrementDeferralCount();
    m_refreshRequestedEventSource(*this, *args);
    args->DecrementDeferralCount();
}

void RaiseRefreshStateChanged | ( | const winrt::RefreshVisualizerState & | oldState,
 |  | const winrt::RefreshVisualizerState & | newState |
 | ) |  |  | [private]

Definition at line 455 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, oldState, newState);
    const auto e = winrt::make<RefreshStateChangedEventArgs>(oldState, newState);
    m_refreshStateChangedEventSource(*this, e);
}

void RefreshCompleted ( ) [private]

Definition at line 483 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    UpdateRefreshState(winrt::RefreshVisualizerState::Idle);
    if (m_refreshInfoProvider)
    {
        m_refreshInfoProvider.get().OnRefreshCompleted();
    }
}

void RefreshInfoProvider_InteractingForRefreshChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | e |
 | ) |  |  | [private]

Definition at line 493 of file RefreshVisualizer.cpp.

{
    if (m_refreshInfoProvider)
    {
        m_isInteractingForRefresh = m_refreshInfoProvider.get().IsInteractingForRefresh();
        PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, m_isInteractingForRefresh);
        if (!m_isInteractingForRefresh)
        {
            switch (m_state)
            {
            case winrt::RefreshVisualizerState::Pending:
                // User stopped interaction after it hit the Pending state.
                RequestRefresh();
                break;
            case winrt::RefreshVisualizerState::Refreshing:
                // We don't want to interrupt a currently executing refresh.
                break;
            default:
                //Peeking, interacting, or idle results in idle.
                UpdateRefreshState(winrt::RefreshVisualizerState::Idle);
                break;
            }
        }
    }
}

void RefreshInfoProvider_InteractionRatioChanged | ( | const winrt::IRefreshInfoProvider & | sender,
 |  | const winrt::RefreshInteractionRatioChangedEventArgs & | e |
 | ) |  |  | [private]

Definition at line 519 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, e.InteractionRatio());
    const bool wasAtZero = m_interactionRatio == 0.0f;
    m_interactionRatio = e.InteractionRatio();
    if (m_isInteractingForRefresh)
    {
        if (m_state == winrt::RefreshVisualizerState::Idle)
        {
            if (wasAtZero)
            {
                if (m_interactionRatio > m_executionRatio)
                {
                    //Sometimes due to missed frames in the interplay of comp and xaml the interaction tracker will 'jump' passed the executionRatio on the first Value changed.
                    UpdateRefreshState(winrt::RefreshVisualizerState::Pending);
                }
                else if (m_interactionRatio > 0.0f)
                {
                    UpdateRefreshState(winrt::RefreshVisualizerState::Interacting);
                }
            }
            else if (m_interactionRatio > 0.0f)
            {
                // TODO: IRefreshInfoProvider does not raise InteractionRatioChanged yet when DManip is overpanning. Thus we do not yet
                // enter the Peeking state when DManip overpans in inertia.
                UpdateRefreshState(winrt::RefreshVisualizerState::Peeking);
            }
        }
        else if (m_state == winrt::RefreshVisualizerState::Interacting)
        {
            if (m_interactionRatio <= 0.0f)
            {
                UpdateRefreshState(winrt::RefreshVisualizerState::Idle);
            }
            else if (m_interactionRatio > m_executionRatio)
            {
                UpdateRefreshState(winrt::RefreshVisualizerState::Pending);
            }
        }
        else if (m_state == winrt::RefreshVisualizerState::Pending)
        {
            if (m_interactionRatio <= m_executionRatio)
            {
                UpdateRefreshState(winrt::RefreshVisualizerState::Interacting);
            }
            else if (m_interactionRatio <= 0.0f)
            {
                UpdateRefreshState(winrt::RefreshVisualizerState::Idle);
            }
        }
        //If we are in Refreshing or Peeking we want to stay in those states.
    }
    else
    {
        //If we are not refreshing or interacting for refresh then the only valid states are Peeking and Idle
        if (m_state != winrt::RefreshVisualizerState::Refreshing)
        {
            if (m_interactionRatio > 0.0f)
            {
                UpdateRefreshState(winrt::RefreshVisualizerState::Peeking);
            }
            else
            {
                UpdateRefreshState(winrt::RefreshVisualizerState::Idle);
            }
        }
    }
}

void RequestRefresh ( )

Definition at line 76 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    UpdateRefreshState(winrt::RefreshVisualizerState::Refreshing);
    if (m_refreshInfoProvider.get())
    {
        m_refreshInfoProvider.get().OnRefreshStarted();
    }
    RaiseRefreshRequested();
}

void SetInternalPullDirection ( winrt::RefreshPullDirection const & value )

Definition at line 100 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, value);
    m_pullDirection = value;
    OnOrientationChangedImpl();
    UpdateContent();
}

void UpdateContent ( ) [private]

Definition at line 257 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_content)
    {
        const winrt::Visual contentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_content.get());

        const winrt::Size contentSize = m_content.get().RenderSize();
        contentVisual.CenterPoint({ (float)(contentSize.Height / 2), (float)(contentSize.Width / 2), 0.0f });

        switch (m_state)
        {
        case winrt::RefreshVisualizerState::Idle:
            contentVisual.Opacity(MINIMUM_INDICATOR_OPACITY);
            contentVisual.RotationAngle(m_startingRotationAngle);
            contentVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });
            break;
        case winrt::RefreshVisualizerState::Peeking:
            contentVisual.Opacity(1.0f);
            contentVisual.RotationAngle(m_startingRotationAngle);
            break;
        case winrt::RefreshVisualizerState::Interacting:
            contentVisual.Opacity(MINIMUM_INDICATOR_OPACITY);
            ExecuteInteractingAnimations();
            break;
        case winrt::RefreshVisualizerState::Pending:
            ExecuteScaleUpAnimation();
            contentVisual.Opacity(1.0f);
            contentVisual.RotationAngle(m_startingRotationAngle);
            break;
        case winrt::RefreshVisualizerState::Refreshing:
            ExecuteExecutingRotationAnimation();
            contentVisual.Opacity(1.0f);
            if (m_root)
            {
                float translationRatio = [this]() {
                    if (auto&& refreshInfoProvider = m_refreshInfoProvider.get())
                    {
                        return (1.0f - (float)(refreshInfoProvider.ExecutionRatio())) * PARALLAX_POSITION_RATIO;
                    }
                    return 1.0f;
                }();
                translationRatio = IsPullDirectionFar() ? -1.0f * translationRatio : translationRatio;
                if (IsPullDirectionVertical())
                {
                    contentVisual.Properties().InsertVector3(L"Translation", { 0.0f, translationRatio * (float)m_root.get().ActualHeight(), 0.0f });
                }
                else
                {
                    contentVisual.Properties().InsertVector3(L"Translation", { translationRatio * (float)m_root.get().ActualWidth(), 0.0f, 0.0f });
                }
            }

            break;
        default:
            MUX_ASSERT(false);
        }
    }
}

void UpdateRefreshState ( const winrt::RefreshVisualizerState & newState ) [private]

Definition at line 446 of file RefreshVisualizer.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, newState);
    if (newState != m_state)
    {
        put_State(newState);
    }
}

The documentation for this class was generated from the following files:
  • PullToRefresh/RefreshVisualizer/RefreshVisualizer.h
  • PullToRefresh/RefreshVisualizer/RefreshVisualizer.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshVisualizerProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

RefreshVisualizerProperties Class Reference

#include "RefreshVisualizer.properties.h"

Inherited by RefreshVisualizer.

List of all members.

Public Member Functions

RefreshVisualizerProperties ()
void | Content (winrt::UIElement const &value)
winrt::UIElement | Content ()
void | Orientation (winrt::RefreshVisualizerOrientation const &value)
winrt::RefreshVisualizerOrientation | Orientation ()
winrt::event_token | RefreshRequested (winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshRequestedEventArgs > const &value)
void | RefreshRequested (winrt::event_token const &token)
void | RefreshStateChanged (winrt::event_token const &token)
winrt::event_token | RefreshStateChanged (winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshStateChangedEventArgs > const &value)
void | State (winrt::RefreshVisualizerState const &value)
winrt::RefreshVisualizerState | State ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ContentProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | InfoProviderProperty ()
static void | OnContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnInfoProviderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnStatePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | OrientationProperty ()
static winrt::DependencyProperty | StateProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::RefreshVisualizer,
winrt::RefreshRequestedEventArgs > > 		m_refreshRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::RefreshVisualizer,
winrt::RefreshStateChangedEventArgs > > 		m_refreshStateChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ContentProperty
static GlobalDependencyProperty | s_InfoProviderProperty
static GlobalDependencyProperty | s_OrientationProperty
static GlobalDependencyProperty | s_StateProperty

Detailed Description

Definition at line 7 of file RefreshVisualizer.properties.h.

Constructor & Destructor Documentation

RefreshVisualizerProperties ( )

Definition at line 21 of file RefreshVisualizer.properties.cpp.

    : m_refreshRequestedEventSource{static_cast<RefreshVisualizer*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
void Content ( winrt::UIElement const & value )
winrt::UIElement Content ( )
static winrt::DependencyProperty ContentProperty ( ) [inline, static]

Definition at line 21 of file RefreshVisualizer.properties.h.

{ return s_ContentProperty; }

static void EnsureProperties ( ) [static]
static winrt::DependencyProperty InfoProviderProperty ( ) [inline, static]

Definition at line 22 of file RefreshVisualizer.properties.h.

{ return s_InfoProviderProperty; }

static void OnContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnInfoProviderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnStatePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::RefreshVisualizerOrientation Orientation ( )
void Orientation ( winrt::RefreshVisualizerOrientation const & value )
static winrt::DependencyProperty OrientationProperty ( ) [inline, static]

Definition at line 23 of file RefreshVisualizer.properties.h.

{ return s_OrientationProperty; }

winrt::event_token RefreshRequested ( winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshRequestedEventArgs > const & value )
void RefreshRequested ( winrt::event_token const & token )
void RefreshStateChanged ( winrt::event_token const & token )
winrt::event_token RefreshStateChanged ( winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshStateChangedEventArgs > const & value )
winrt::RefreshVisualizerState State ( )
void State ( winrt::RefreshVisualizerState const & value )
static winrt::DependencyProperty StateProperty ( ) [inline, static]

Definition at line 24 of file RefreshVisualizer.properties.h.

{ return s_StateProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::RefreshVisualizer, winrt::RefreshRequestedEventArgs> > m_refreshRequestedEventSource

Definition at line 36 of file RefreshVisualizer.properties.h.

event_source<winrt::TypedEventHandler<winrt::RefreshVisualizer, winrt::RefreshStateChangedEventArgs> > m_refreshStateChangedEventSource

Definition at line 37 of file RefreshVisualizer.properties.h.

GlobalDependencyProperty s_ContentProperty [static]

Definition at line 26 of file RefreshVisualizer.properties.h.

GlobalDependencyProperty s_InfoProviderProperty [static]

Definition at line 27 of file RefreshVisualizer.properties.h.

GlobalDependencyProperty s_OrientationProperty [static]

Definition at line 28 of file RefreshVisualizer.properties.h.

GlobalDependencyProperty s_StateProperty [static]

Definition at line 29 of file RefreshVisualizer.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RefreshVisualizer.properties.h
  • Generated/RefreshVisualizer.properties.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshInfoProviderImplementation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RefreshVizualizer_TestUI
  • RefreshInfoProviderImplementation
Public Member Functions | Properties | Events | Private Member Functions | Private Attributes

RefreshInfoProviderImplementation Class Reference

List of all members.

Public Member Functions

RefreshInfoProviderImplementation (Slider slider, DispatcherTimer timer)
void | OnRefreshCompleted ()
void | OnRefreshStarted ()

Properties

CompositionPropertySet | CompositionProperties [get, set]
double | ExecutionRatio [get, set]
string | InteractionRatioCompositionProperty [get]
bool | IsInteractingForRefresh [get, set]

Events

TypedEventHandler
< IRefreshInfoProvider,
RefreshInteractionRatioChangedEventArgs > 		InteractionRatioChanged
TypedEventHandler
< IRefreshInfoProvider, object > 		IsInteractingForRefreshChanged
TypedEventHandler
< IRefreshInfoProvider, object > 		RefreshCompleted
TypedEventHandler
< IRefreshInfoProvider, object > 		RefreshStarted

Private Member Functions

void | onSliderPointerPressed (object sender, ManipulationStartingRoutedEventArgs e)
void | onSliderPointerReleased (object sender, ManipulationCompletedRoutedEventArgs e)
void | onSliderValueChanged (object sender, RangeBaseValueChangedEventArgs e)
void | RaiseInteractingForRefreshChanged ()
void | RaiseInteractionRatioChanged (float interactionRatio)
void | timerTick (object sender, object e)
void | UpdateIsInteractingForRefresh (Boolean value)

Private Attributes

CompositionPropertySet | compositionProperties
double | executionRatio
Boolean | isInteractingForRefresh
Slider | slider
DispatcherTimer | timer

Detailed Description

Definition at line 36 of file SliderAsRefreshInfoProvider.cs.

Constructor & Destructor Documentation

RefreshInfoProviderImplementation | ( | Slider | slider,
 |  | DispatcherTimer | timer |
 | ) |  |  | [inline]

Definition at line 43 of file SliderAsRefreshInfoProvider.cs.

        {
            this.timer = timer;
            this.slider = slider;
            var visual = ElementCompositionPreview.GetElementVisual(slider);
            var compositor = visual.Compositor;

            this.ExecutionRatio = 0.8f;
            this.CompositionProperties = compositor.CreatePropertySet();
            this.CompositionProperties.InsertScalar(InteractionRatioCompositionProperty, 0.0f);

            this.timer.Interval = TimeSpan.FromMilliseconds(1);
            this.timer.Tick += timerTick;

            this.slider.ManipulationMode = ManipulationModes.TranslateX;
            this.slider.ValueChanged += onSliderValueChanged;
            this.slider.ManipulationStarting += onSliderPointerPressed;
            this.slider.ManipulationCompleted += onSliderPointerReleased;
        }

Member Function Documentation

void OnRefreshCompleted ( ) [inline]

Definition at line 112 of file SliderAsRefreshInfoProvider.cs.

        {
            if (this.RefreshCompleted != null)
            {
                this.RefreshCompleted.Invoke(this, new EventArgs());
            }

            this.slider.Value = 0;
        }

void OnRefreshStarted ( ) [inline]

Definition at line 122 of file SliderAsRefreshInfoProvider.cs.

        {
            if (this.RefreshStarted != null)
            {
                this.RefreshStarted.Invoke(this, new EventArgs());
            }
            this.timer.Stop();
            this.slider.Value = this.slider.Maximum;
        }

void onSliderPointerPressed | ( | object | sender,
 |  | ManipulationStartingRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 139 of file SliderAsRefreshInfoProvider.cs.

        {
            this.timer.Stop();
            UpdateIsInteractingForRefresh(true);
        }

void onSliderPointerReleased | ( | object | sender,
 |  | ManipulationCompletedRoutedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 145 of file SliderAsRefreshInfoProvider.cs.

        {
            UpdateIsInteractingForRefresh(false);
        }

void onSliderValueChanged | ( | object | sender,
 |  | RangeBaseValueChangedEventArgs | e |
 | ) |  |  | [inline, private]

Definition at line 132 of file SliderAsRefreshInfoProvider.cs.

        {
            float interactionRatio = (float)(e.NewValue / this.slider.Maximum);
            this.CompositionProperties.InsertScalar(InteractionRatioCompositionProperty, (float)e.NewValue / (float)this.slider.Maximum);
            RaiseInteractionRatioChanged((float)e.NewValue);
        }

void RaiseInteractingForRefreshChanged ( ) [inline, private]

Definition at line 171 of file SliderAsRefreshInfoProvider.cs.

        {
            if (this.IsInteractingForRefreshChanged != null)
            {
                this.IsInteractingForRefreshChanged.Invoke(this, new EventArgs());
            }
        }

void RaiseInteractionRatioChanged ( float interactionRatio ) [inline, private]

Definition at line 150 of file SliderAsRefreshInfoProvider.cs.

        {
            if (this.InteractionRatioChanged != null)
            {
                this.InteractionRatioChanged.Invoke(this, PullToRefreshHelperTestApi.CreateRefreshInteractionRatioChangedEventArgsInstance((interactionRatio / (float)this.slider.Maximum)));
            }
        }

void timerTick | ( | object | sender,
 |  | object | e |
 | ) |  |  | [inline, private]

Definition at line 179 of file SliderAsRefreshInfoProvider.cs.

        {
            if(this.slider.Value == 0)
            {
                this.timer.Stop();
            }
            else
            {
                this.slider.Value -= 1;
            }
        }

void UpdateIsInteractingForRefresh ( Boolean value ) [inline, private]

Definition at line 158 of file SliderAsRefreshInfoProvider.cs.

        {
            if (value != this.IsInteractingForRefresh)
            {
                this.IsInteractingForRefresh = value;
                if (this.IsInteractingForRefresh == false)
                {
                    this.timer.Start();
                }
                RaiseInteractingForRefreshChanged();
            }
        }

Member Data Documentation

CompositionPropertySet compositionProperties [private]

Definition at line 41 of file SliderAsRefreshInfoProvider.cs.

double executionRatio [private]

Definition at line 40 of file SliderAsRefreshInfoProvider.cs.

Boolean isInteractingForRefresh [private]

Definition at line 42 of file SliderAsRefreshInfoProvider.cs.

Slider slider [private]

Definition at line 39 of file SliderAsRefreshInfoProvider.cs.

DispatcherTimer timer [private]

Definition at line 38 of file SliderAsRefreshInfoProvider.cs.

Property Documentation

CompositionPropertySet CompositionProperties [get, set]

Definition at line 77 of file SliderAsRefreshInfoProvider.cs.

double ExecutionRatio [get, set]

Definition at line 64 of file SliderAsRefreshInfoProvider.cs.

string InteractionRatioCompositionProperty [get]

Definition at line 89 of file SliderAsRefreshInfoProvider.cs.

bool IsInteractingForRefresh [get, set]

Definition at line 97 of file SliderAsRefreshInfoProvider.cs.

Event Documentation

TypedEventHandler<IRefreshInfoProvider, RefreshInteractionRatioChangedEventArgs> InteractionRatioChanged

Definition at line 107 of file SliderAsRefreshInfoProvider.cs.

TypedEventHandler<IRefreshInfoProvider, object> IsInteractingForRefreshChanged

Definition at line 108 of file SliderAsRefreshInfoProvider.cs.

TypedEventHandler<IRefreshInfoProvider, object> RefreshCompleted

Definition at line 109 of file SliderAsRefreshInfoProvider.cs.

TypedEventHandler<IRefreshInfoProvider, object> RefreshStarted

Definition at line 110 of file SliderAsRefreshInfoProvider.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshVisualizer/TestUI/SliderAsRefreshInfoProvider.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderRefreshInfoProviderAdapter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RefreshVizualizer_TestUI
  • SliderRefreshInfoProviderAdapter
Public Member Functions | Private Attributes

SliderRefreshInfoProviderAdapter Class Reference

List of all members.

Public Member Functions

SliderRefreshInfoProviderAdapter (Slider slider, DispatcherTimer timer)
RefreshInfoProviderImplementation adapt ()

Private Attributes

Slider | mySlider
DispatcherTimer | myTimer

Detailed Description

Definition at line 19 of file SliderAsRefreshInfoProvider.cs.

Constructor & Destructor Documentation

SliderRefreshInfoProviderAdapter | ( | Slider | slider,
 |  | DispatcherTimer | timer |
 | ) |  |  | [inline]

Definition at line 24 of file SliderAsRefreshInfoProvider.cs.

        {
            mySlider = slider;
            myTimer = timer;
        }

Member Function Documentation

RefreshInfoProviderImplementation adapt ( ) [inline]

Definition at line 30 of file SliderAsRefreshInfoProvider.cs.

        {
            return new RefreshInfoProviderImplementation(mySlider, myTimer);
        }

Member Data Documentation

Slider mySlider [private]

Definition at line 21 of file SliderAsRefreshInfoProvider.cs.

DispatcherTimer myTimer [private]

Definition at line 22 of file SliderAsRefreshInfoProvider.cs.

The documentation for this class was generated from the following file:
  • PullToRefresh/RefreshVisualizer/TestUI/SliderAsRefreshInfoProvider.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RegUtil Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RegUtil Class Reference

#include "RegUtil.h"

List of all members.

Static Public Member Functions

static bool UseDynamicScrollbars () noexcept

Detailed Description

Definition at line 34 of file RegUtil.h.

Member Function Documentation

bool UseDynamicScrollbars ( ) [static]

Definition at line 8 of file RegUtil.cpp.

{
    LPCWSTR subKey = L"Control Panel\\Accessibility";
    LPCWSTR value = L"DynamicScrollbars";
    DWORD keyValue = 0;
    DWORD keySize = sizeof(DWORD);

    if (SUCCEEDED(HRESULT_FROM_WIN32(::RegGetValueW(HKEY_CURRENT_USER, subKey, value, RRF_RT_REG_DWORD, nullptr, &keyValue, &keySize))))
    {
        return keyValue != 0;
    }

    return true;
}

The documentation for this class was generated from the following files:
  • inc/RegUtil.h
  • dll/RegUtil.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeatedScrollSnapPoint Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

RepeatedScrollSnapPoint Class Reference

#include "SnapPoint.h"

List of all members.

Public Member Functions

RepeatedScrollSnapPoint (double offset, double interval, double start, double end, winrt::ScrollSnapPointsAlignment alignment=winrt::ScrollSnapPointsAlignment::Near)
void | Combine (int &combinationCount, winrt::SnapPointBase const &snapPoint) const
winrt::ExpressionAnimation | CreateConditionalExpression (std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
winrt::ExpressionAnimation | CreateRestingPointExpression (double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
std::tuple< double, double > | DetermineActualApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint)
std::tuple< double, double > | DetermineActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue)
double | End ()
double | Evaluate (std::tuple< double, double > actualApplicableZone, double value) const
double | ImpulseInfluence (double edgeOfMidpoint, double ignoredValue) const
double | Influence (double edgeOfMidpoint) const
double | Interval ()
double | Offset ()
int | SnapCount () const
SnapPointSortPredicate | SortPredicate () const
double | Start ()
void | UpdateConditionalExpressionAnimationForImpulse (winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const
void | UpdateRestingPointExpressionAnimationForImpulse (winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const

Private Member Functions

double | ActualEnd () const
double | ActualOffset () const
double | ActualStart () const
double | DetermineFirstRepeatedSnapPointValue () const
double | DetermineLastRepeatedSnapPointValue () const
double | DetermineMaxActualApplicableZone (const SnapPointBase *nextSnapPoint) const
double | DetermineMaxActualImpulseApplicableZone (const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double nextIgnoredValue) const
double | DetermineMinActualApplicableZone (const SnapPointBase *previousSnapPoint) const
double | DetermineMinActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, double currentIgnoredValue, double previousIgnoredValue) const
void | ValidateConstructorParameters (double offset, double interval, double start, double end) const

Detailed Description

Definition at line 232 of file SnapPoint.h.

Constructor & Destructor Documentation

RepeatedScrollSnapPoint | ( | double | offset,
 |  | double | interval,
 |  | double | start,
 |  | double | end,
 |  | winrt::ScrollSnapPointsAlignment | alignment = winrt::ScrollSnapPointsAlignment::Near
 | ) |  |

Definition at line 543 of file SnapPoint.cpp.

{
    ValidateConstructorParameters(
#ifdef ApplicableRangeType
        false /*applicableRangeToo*/,
        0 /*applicableRange*/,
#endif
        offset,
        interval,
        start,
        end);

    m_offset = offset;
    m_interval = interval;
    m_start = start;
    m_end = end;
    m_alignment = alignment;
}

Member Function Documentation

double ActualEnd ( ) const [private]

Definition at line 838 of file SnapPoint.cpp.

{
    return m_end + m_alignmentAdjustment;
}

double ActualOffset ( ) const [private]

Definition at line 828 of file SnapPoint.cpp.

{
    return m_offset + m_alignmentAdjustment;
}

double ActualStart ( ) const [private]

Definition at line 833 of file SnapPoint.cpp.

{
    return m_start + m_alignmentAdjustment;
}

void Combine | ( | int & | combinationCount,
 |  | winrt::SnapPointBase const & | snapPoint |
 | ) |  |  | const

Definition at line 1018 of file SnapPoint.cpp.

{
    // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
    // TODO: Provide custom error message
    throw winrt::hresult_error(E_INVALIDARG);
}

winrt::ExpressionAnimation CreateConditionalExpression | ( | std::tuple< double, double > | actualApplicableZone,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 710 of file SnapPoint.cpp.

{
    MUX_ASSERT(std::get<0>(actualApplicableZone) == ActualStart());
    MUX_ASSERT(std::get<1>(actualApplicableZone) == ActualEnd());

    /*
    fracTarget = (target / scale - first) / interval       // Unsnapped value in fractional unscaled intervals from first snapping value
    prevSnap = ((Floor(fracTarget) * interval) + first)    // First unscaled snapped value before unsnapped value
    nextSnap = ((Ceil(fracTarget) * interval) + first)     // First unscaled snapped value after unsnapped value
    effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of unscaled applicable zone

    Expression:
    (
     (!IsInertiaFromImpulse && target / scale >= start && target / scale <= end)       // If we are within the start and end in non-impulse mode
     ||
     (IsInertiaFromImpulse && target / scale >= impStart && target / scale <= impEnd)  // or we are within the impulse start and end in impulse mode
    )
    &&                                                                                 // and...
    (                                                                                  // The location of the repeated snap point just before the natural resting point
     (prevSnap + appRange >= target / scale)                                           // Plus the applicable range is greater than the natural resting point
     ||                                                                                // or...
     (                                                                                 // The location of the repeated snap point just after the natural resting point
      (nextSnap - appRange <= target / scale) &&                                       // Minus the applicable range is less than the natural resting point.
      (nextSnap <= effectiveEnd)                                                       // And the snap point after the natural resting point is less than or equal to the effective end value
     )
    )
    */

    winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
    winrt::hstring expression = StringUtil::FormatString(
        L"((!%1!s!&&T.%2!s!/T.Scale>=S&&T.%2!s!/T.Scale<=E)||(%1!s!&&T.%2!s!/T.Scale>=iS&&T.%2!s!/T.Scale<=iE))&&(((Floor((T.%2!s!/T.Scale-P)/V)*V)+P+aR>=T.%2!s!/T.Scale)||(((Ceil((T.%2!s!/T.Scale-P)/V)*V)+P-aR<=T.%2!s!/T.Scale)&&((Ceil((T.%2!s!/T.Scale-P)/V)*V)+P<=(%1!s!?iE:E))))",
        isInertiaFromImpulseExpression.data(),
        target.data());

    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());

    auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);

    SetScalarParameter(conditionExpressionAnimation, s_interval, static_cast<float>(m_interval));
    SetScalarParameter(conditionExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
    SetScalarParameter(conditionExpressionAnimation, s_start, static_cast<float>(ActualStart()));
    SetScalarParameter(conditionExpressionAnimation, s_end, static_cast<float>(ActualEnd()));
    SetScalarParameter(conditionExpressionAnimation, s_applicableRange, static_cast<float>(m_specifiedApplicableRange));
    conditionExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);

    UpdateConditionalExpressionAnimationForImpulse(
        conditionExpressionAnimation,
        actualImpulseApplicableZone);

    return conditionExpressionAnimation;
}

winrt::ExpressionAnimation CreateRestingPointExpression | ( | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 614 of file SnapPoint.cpp.

{
    /*
    fracTarget = (target / scale - first) / interval       // Unsnapped value in fractional unscaled intervals from first snapping value
    prevSnap = ((Floor(fracTarget) * interval) + first)    // First unscaled snapped value before unsnapped value
    nextSnap = ((Ceil(fracTarget) * interval) + first)     // First unscaled snapped value after unsnapped value
    effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of unscaled applicable zone

    Expression:
     ((Abs(target / scale - prevSnap) >= Abs(target / scale - nextSnap)) && (nextSnap <= effectiveEnd))
     ?
     // nextSnap value is closer to unsnapped value and within applicable zone.
     (
      IsInertiaFromImpulse
      ?
      // Impulse mode.
      (
       nextSnap == impIgn
       ?
       (
        // Next snapped value is ignored. Pick the previous snapped value if any, else the ignored value.
        (impIgn == first ? first * scale : (impIgn - interval) * scale)
       )
       :
       // Pick next snapped value.
       nextSnap * scale
      )
      :
      // Regular mode. Pick next snapped value.
      nextSnap * scale
     )
     :
     // prevSnap value is closer to unsnapped value.
     (
      IsInertiaFromImpulse
      ?
      // Impulse mode.
      (
       prevSnap == impIgn
       ?
       // Previous snapped value is ignored. Pick the next snapped value if any, else the ignored value.
       (impIgn + interval <= effectiveEnd ? (impIgn + interval) * scale : impIgn * scale)
       :
       (
        prevSnap < first i.e. fracTarget < -0.5
        ?
        // Pick next snapped value as previous snapped value is outside applicable zone.
        nextSnap * scale
        :
        // Pick previous snapped value as it is within applicable zone.
        prevSnap * scale
       )
      )
      :
      // Regular mode.
      (
       prevSnap < first i.e. fracTarget < -0.5
       ?
       // Pick next snapped value as previous snapped value is outside applicable zone.
       nextSnap * scale
       :
       // Pick previous snapped value as it is within applicable zone.
       prevSnap * scale
      )
     )
    */

    winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
    winrt::hstring expression = StringUtil::FormatString(
        L"((Abs(T.%2!s!/T.Scale-(Floor((T.%2!s!/T.Scale-P)/V)*V+P))>=Abs(T.%2!s!/T.Scale-(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)))&&((Ceil((T.%2!s!/T.Scale-P)/V)*V+P)<=(%1!s!?iE:E)))?(%1!s!?((Ceil((T.%2!s!/T.Scale-P)/V)*V+P)==M?((M==P?P*T.Scale:(M-V)*T.Scale)):(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale):(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale):(%1!s!?((Floor((T.%2!s!/T.Scale-P)/V)*V+P)==M?(M+V<=(%1!s!?iE:E)?(M+V)*T.Scale:M*T.Scale):(T.%2!s!/T.Scale<P-0.5*V?(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale:(Floor((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale)):(T.%2!s!/T.Scale<P-0.5*V?(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale:(Floor((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale))",
        isInertiaFromImpulseExpression.data(),
        target.data());

    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());

    auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);

    SetScalarParameter(restingPointExpressionAnimation, s_interval, static_cast<float>(m_interval));
    SetScalarParameter(restingPointExpressionAnimation, s_end, static_cast<float>(ActualEnd()));
    SetScalarParameter(restingPointExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
    restingPointExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);

    UpdateRestingPointExpressionAnimationForImpulse(
        restingPointExpressionAnimation,
        ignoredValue,
        actualImpulseApplicableZone);

    return restingPointExpressionAnimation;
}

std::tuple< double, double > DetermineActualApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint
 | ) |  |

Definition at line 791 of file SnapPoint.cpp.

{
    std::tuple<double, double> actualApplicableZoneReturned = std::make_tuple(
        DetermineMinActualApplicableZone(previousSnapPoint),
        DetermineMaxActualApplicableZone(nextSnapPoint));

    // Influence() will not have thrown if either of the adjacent snap points are also repeated snap points which have the same start and end, however this is not allowed.
    // We only need to check the nextSnapPoint because of the symmetry in the algorithm.
    if (nextSnapPoint && *static_cast<SnapPointBase*>(this) == (nextSnapPoint))
    {
        // TODO: Provide custom error message
        throw winrt::hresult_error(E_INVALIDARG);
    }

    return actualApplicableZoneReturned;
}

std::tuple< double, double > DetermineActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue,
 |  | double | nextIgnoredValue
 | ) |  |

Definition at line 810 of file SnapPoint.cpp.

{
    return std::make_tuple(
        DetermineMinActualImpulseApplicableZone(
            previousSnapPoint,
            currentIgnoredValue,
            previousIgnoredValue),
        DetermineMaxActualImpulseApplicableZone(
            nextSnapPoint,
            currentIgnoredValue,
            nextIgnoredValue));
}

double DetermineFirstRepeatedSnapPointValue ( ) const [private]

Definition at line 843 of file SnapPoint.cpp.

{
    const double actualOffset = ActualOffset();
    const double actualStart = ActualStart();

    MUX_ASSERT(actualOffset >= actualStart);
    MUX_ASSERT(m_interval > 0.0);

    return actualOffset - std::floor((actualOffset - actualStart) / m_interval) * m_interval;
}

double DetermineLastRepeatedSnapPointValue ( ) const [private]

Definition at line 854 of file SnapPoint.cpp.

{
    const double actualOffset = ActualOffset();
    const double actualEnd = ActualEnd();

    MUX_ASSERT(actualOffset <= m_end);
    MUX_ASSERT(m_interval > 0.0);

    return actualOffset + std::floor((actualEnd - actualOffset) / m_interval) * m_interval;
}

double DetermineMaxActualApplicableZone ( const SnapPointBase * nextSnapPoint ) const [private]

Definition at line 899 of file SnapPoint.cpp.

{
    const double actualEnd = ActualEnd();

    // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
    // This call will ensure that we are not in the range of the next snap point if it is.
    if (nextSnapPoint)
    {
        nextSnapPoint->Influence(actualEnd);
    }
    return actualEnd;
}

double DetermineMaxActualImpulseApplicableZone | ( | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | nextIgnoredValue |
 | ) |  |  | const [private]

Definition at line 913 of file SnapPoint.cpp.

{
    if (nextSnapPoint)
    {
        if (currentIgnoredValue == DetermineLastRepeatedSnapPointValue())
        {
            return currentIgnoredValue;
        }

        if (!isnan(nextIgnoredValue))
        {
            return nextSnapPoint->ImpulseInfluence(ActualEnd(), nextIgnoredValue);
        }
    }
    return ActualEnd();
}

double DetermineMinActualApplicableZone ( const SnapPointBase * previousSnapPoint ) const [private]

Definition at line 865 of file SnapPoint.cpp.

{
    const double actualStart = ActualStart();

    // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
    // This call will ensure that we are not in the range of the previous snap point if it is.
    if (previousSnapPoint)
    {
        previousSnapPoint->Influence(actualStart);
    }
    return actualStart;
}

double DetermineMinActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue |
 | ) |  |  | const [private]

Definition at line 879 of file SnapPoint.cpp.

{
    if (previousSnapPoint)
    {
        if (currentIgnoredValue == DetermineFirstRepeatedSnapPointValue())
        {
            return currentIgnoredValue;
        }

        if (!isnan(previousIgnoredValue))
        {
            return previousSnapPoint->ImpulseInfluence(ActualStart(), previousIgnoredValue);
        }
    }
    return ActualStart();
}

double End ( )

Definition at line 609 of file SnapPoint.cpp.

{
    return m_end;
}

double Evaluate | ( | std::tuple< double, double > | actualApplicableZone,
 |  | double | value |
 | ) |  |  | const

Definition at line 1032 of file SnapPoint.cpp.

{
    if (value >= ActualStart() && value <= ActualEnd())
    {
        const double firstSnapPointValue = DetermineFirstRepeatedSnapPointValue();
        const double passedSnapPoints = std::floor((value - firstSnapPointValue) / m_interval);
        const double previousSnapPointValue = (passedSnapPoints * m_interval) + firstSnapPointValue;
        const double nextSnapPointValue = previousSnapPointValue + m_interval;

        if ((value - previousSnapPointValue) <= (nextSnapPointValue - value))
        {
            if (previousSnapPointValue + m_specifiedApplicableRange >= value)
            {
                return previousSnapPointValue;
            }
        }
        else
        {
            if (nextSnapPointValue - m_specifiedApplicableRange <= value)
            {
                return nextSnapPointValue;
            }
        }
    }
    return value;
}

double ImpulseInfluence | ( | double | edgeOfMidpoint,
 |  | double | ignoredValue |
 | ) |  |  | const

Definition at line 993 of file SnapPoint.cpp.

{
    if (edgeOfMidpoint <= ActualStart())
    {
        if (ignoredValue == DetermineFirstRepeatedSnapPointValue())
        {
            return ignoredValue;
        }
        return ActualStart();
    }
    else if (edgeOfMidpoint >= ActualEnd())
    {
        if (ignoredValue == DetermineLastRepeatedSnapPointValue())
        {
            return ignoredValue;
        }
        return ActualEnd();
    }
    else
    {
        MUX_ASSERT(false);
        return 0.0;
    }
}

double Influence ( double edgeOfMidpoint ) const

Definition at line 971 of file SnapPoint.cpp.

{
    const double actualStart = ActualStart();
    const double actualEnd = ActualEnd();

    if (edgeOfMidpoint <= actualStart)
    {
        return actualStart;
    }
    else if (edgeOfMidpoint >= actualEnd)
    {
        return actualEnd;
    }
    else
    {
        // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
        // TODO: Provide custom error message
        throw winrt::hresult_error(E_INVALIDARG);
    }
    return 0.0;
}

double Interval ( )

Definition at line 599 of file SnapPoint.cpp.

{
    return m_interval;
}

double Offset ( )

Definition at line 594 of file SnapPoint.cpp.

{
    return m_offset;
}

int SnapCount ( ) const

Definition at line 1027 of file SnapPoint.cpp.

{
    return static_cast<int>((m_end - m_start) / m_interval);
}

SnapPointSortPredicate SortPredicate ( ) const

Definition at line 785 of file SnapPoint.cpp.

{
    // Repeated snap points should be sorted after irregular snap points, so give it a tertiary sort value of 1 (irregular snap points get 0)
    return SnapPointSortPredicate{ ActualStart(), ActualEnd(), 1 };
}

double Start ( )

Definition at line 604 of file SnapPoint.cpp.

{
    return m_start;
}

void UpdateConditionalExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | conditionExpressionAnimation,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 768 of file SnapPoint.cpp.

{
    SetScalarParameter(conditionExpressionAnimation, s_impulseStart, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
    SetScalarParameter(conditionExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
}

void UpdateRestingPointExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | restingValueExpressionAnimation,
 |  | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 776 of file SnapPoint.cpp.

{
    SetScalarParameter(restingValueExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
    SetScalarParameter(restingValueExpressionAnimation, s_impulseIgnoredValue, static_cast<float>(ignoredValue));
}

void ValidateConstructorParameters | ( | double | offset,
 |  | double | interval,
 |  | double | start,
 |  | double | end |
 | ) |  |  | const [private]

Definition at line 933 of file SnapPoint.cpp.

{
    if (end <= start)
    {
        throw winrt::hresult_invalid_argument(L"'end' must be greater than 'start'.");
    }

    if (offset < start)
    {
        throw winrt::hresult_invalid_argument(L"'offset' must be greater than or equal to 'start'.");
    }

    if (offset > end)
    {
        throw winrt::hresult_invalid_argument(L"'offset' must be smaller than or equal to 'end'.");
    }

    if (interval <= 0)
    {
        throw winrt::hresult_invalid_argument(L"'interval' must be strictly positive.");
    }

#ifdef ApplicableRangeType
    if (applicableRangeToo && applicableRange <= 0)
    {
        throw winrt::hresult_invalid_argument(L"'applicableRange' must be strictly positive.");
    }
#endif
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPoint.h
  • ScrollPresenter/SnapPoint.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeatedZoomSnapPoint Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

RepeatedZoomSnapPoint Class Reference

#include "SnapPoint.h"

List of all members.

Public Member Functions

RepeatedZoomSnapPoint (double offset, double interval, double start, double end)
void | Combine (int &combinationCount, winrt::SnapPointBase const &snapPoint) const
winrt::ExpressionAnimation | CreateConditionalExpression (std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
winrt::ExpressionAnimation | CreateRestingPointExpression (double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
std::tuple< double, double > | DetermineActualApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint)
std::tuple< double, double > | DetermineActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue)
double | End ()
double | Evaluate (std::tuple< double, double > actualApplicableZone, double value) const
double | ImpulseInfluence (double edgeOfMidpoint, double ignoredValue) const
double | Influence (double edgeOfMidpoint) const
double | Interval ()
double | Offset ()
int | SnapCount () const
SnapPointSortPredicate | SortPredicate () const
double | Start ()
void | UpdateConditionalExpressionAnimationForImpulse (winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const
void | UpdateRestingPointExpressionAnimationForImpulse (winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const

Private Member Functions

double | DetermineFirstRepeatedSnapPointValue () const
double | DetermineLastRepeatedSnapPointValue () const
double | DetermineMaxActualApplicableZone (const SnapPointBase *nextSnapPoint) const
double | DetermineMaxActualImpulseApplicableZone (const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double nextIgnoredValue) const
double | DetermineMinActualApplicableZone (const SnapPointBase *previousSnapPoint) const
double | DetermineMinActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, double currentIgnoredValue, double previousIgnoredValue) const
void | ValidateConstructorParameters (double offset, double interval, double start, double end) const

Detailed Description

Definition at line 424 of file SnapPoint.h.

Constructor & Destructor Documentation

RepeatedZoomSnapPoint | ( | double | offset,
 |  | double | interval,
 |  | double | start,
 |  | double | end
 | ) |  |

Definition at line 1433 of file SnapPoint.cpp.

{
    ValidateConstructorParameters(
#ifdef ApplicableRangeType
        false /*applicableRangeToo*/,
        0 /*applicableRange*/,
#endif
        offset,
        interval,
        start,
        end);

    m_offset = offset;
    m_interval = interval;
    m_start = start;
    m_end = end;
}

Member Function Documentation

void Combine | ( | int & | combinationCount,
 |  | winrt::SnapPointBase const & | snapPoint |
 | ) |  |  | const

Definition at line 1878 of file SnapPoint.cpp.

{
    // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
    // TODO: Provide custom error message
    throw winrt::hresult_error(E_INVALIDARG);
}

winrt::ExpressionAnimation CreateConditionalExpression | ( | std::tuple< double, double > | actualApplicableZone,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 1598 of file SnapPoint.cpp.

{
    MUX_ASSERT(std::get<0>(actualApplicableZone) == m_start);
    MUX_ASSERT(std::get<1>(actualApplicableZone) == m_end);

    /*
    fracTarget = (target - first) / interval               // Unsnapped value in fractional intervals from first snapping value
    prevSnap = ((Floor(fracTarget) * interval) + first)    // First snapped value before unsnapped value
    nextSnap = ((Ceil(fracTarget) * interval) + first)     // First snapped value after unsnapped value
    effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of applicable zone

    Expression:
    (
     (!IsInertiaFromImpulse && target >= start && target <= end)       // If we are within the start and end in non-impulse mode
     ||
     (IsInertiaFromImpulse && target >= impStart && target <= impEnd)  // or we are within the impulse start and end in impulse mode
    )
    &&                                                                 // and...
    (                                                                  // The location of the repeated snap point just before the natural resting point
     (prevSnap + appRange >= target)                                   // Plus the applicable range is greater than the natural resting point
     ||                                                                // or...
     (                                                                 // The location of the repeated snap point just after the natural resting point
      (nextSnap - appRange <= target) &&                               // Minus the applicable range is less than the natural resting point.
      (nextSnap <= effectiveEnd)                                       // And the snap point after the natural resting point is less than or equal to the effective end value
     )
    )
    */

    winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
    winrt::hstring expression = StringUtil::FormatString(
        L"((!%1!s!&&T.%2!s!>=S&&T.%2!s!<=E)||(%1!s!&&T.%2!s!>=iS&&T.%2!s!<=iE))&&((Floor((T.%2!s!-P)/V)*V+P+aR>=T.%2!s!)||((Ceil((T.%2!s!-P)/V)*V+P-aR<=T.%2!s!)&&(Ceil((T.%2!s!-P)/V)*V+P<=(%1!s!?iE:E))))",
        isInertiaFromImpulseExpression.data(),
        target.data());

    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());

    auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);

    SetScalarParameter(conditionExpressionAnimation, s_interval, static_cast<float>(m_interval));
    SetScalarParameter(conditionExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
    SetScalarParameter(conditionExpressionAnimation, s_start, static_cast<float>(m_start));
    SetScalarParameter(conditionExpressionAnimation, s_end, static_cast<float>(m_end));
    SetScalarParameter(conditionExpressionAnimation, s_applicableRange, static_cast<float>(m_specifiedApplicableRange));
    conditionExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);

    UpdateConditionalExpressionAnimationForImpulse(
        conditionExpressionAnimation,
        actualImpulseApplicableZone);

    return conditionExpressionAnimation;
}

winrt::ExpressionAnimation CreateRestingPointExpression | ( | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 1501 of file SnapPoint.cpp.

{
    /*
    fracTarget = (target - first) / interval               // Unsnapped value in fractional intervals from first snapping value
    prevSnap = ((Floor(fracTarget) * interval) + first)    // First snapped value before unsnapped value
    nextSnap = ((Ceil(fracTarget) * interval) + first)     // First snapped value after unsnapped value
    effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of applicable zone

    Expression:
     ((Abs(target - prevSnap) >= Abs(target - nextSnap)) && (nextSnap <= effectiveEnd))
     ?
     // nextSnap value is closer to unsnapped value and within applicable zone.
     (
      IsInertiaFromImpulse
      ?
      // Impulse mode.
      (
       nextSnap == impIgn
       ?
       (
        // Next snapped value is ignored. Pick the previous snapped value if any, else the ignored value.
        (impIgn == first ? first : impIgn - interval)
       )
       :
       // Pick next snapped value.
       nextSnap
      )
      :
      // Regular mode. Pick next snapped value.
      nextSnap
     )
     :
     // prevSnap value is closer to unsnapped value.
     (
      IsInertiaFromImpulse
      ?
      // Impulse mode.
      (
       prevSnap == impIgn
       ?
       // Previous snapped value is ignored. Pick the next snapped value if any, else the ignored value.
       (impIgn + interval <= effectiveEnd ? impIgn + interval : impIgn)
       :
       (
        prevSnap < first i.e. fracTarget < -0.5
        ?
        // Pick next snapped value as previous snapped value is outside applicable zone.
        nextSnap
        :
        // Pick previous snapped value as it is within applicable zone.
        prevSnap
       )
      )
      :
      // Regular mode.
      (
       prevSnap < first i.e. fracTarget < -0.5
       ?
       // Pick next snapped value as previous snapped value is outside applicable zone.
       nextSnap
       :
       // Pick previous snapped value as it is within applicable zone.
       prevSnap
      )
     )
    */

    winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
    winrt::hstring expression = StringUtil::FormatString(
        L"((Abs(T.%2!s!-(Floor((T.%2!s!-P)/V)*V+P))>=Abs(T.%2!s!-(Ceil((T.%2!s!-P)/V)*V+P)))&&(Ceil((T.%2!s!-P)/V)*V+P<=(%1!s!?iE:E)))?(%1!s!?(Ceil((T.%2!s!-P)/V)*V+P==M?(M==P?P:M-V):Ceil((T.%2!s!-P)/V)*V+P):Ceil((T.%2!s!-P)/V)*V+P):(%1!s!?(Floor((T.%2!s!-P)/V)*V+P==M?(M+V<=(%1!s!?iE:E)?(M+V):M):(T.%2!s!<P-0.5*V?Ceil((T.%2!s!-P)/V)*V+P:Floor((T.%2!s!-P)/V)*V+P)):(T.%2!s!<P-0.5*V?Ceil((T.%2!s!-P)/V)*V+P:Floor((T.%2!s!-P)/V)*V+P))",
        isInertiaFromImpulseExpression.data(),
        target.data());

    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());

    auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);

    SetScalarParameter(restingPointExpressionAnimation, s_interval, static_cast<float>(m_interval));
    SetScalarParameter(restingPointExpressionAnimation, s_end, static_cast<float>(m_end));
    SetScalarParameter(restingPointExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
    restingPointExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);

    UpdateRestingPointExpressionAnimationForImpulse(
        restingPointExpressionAnimation,
        ignoredValue,
        actualImpulseApplicableZone);

    return restingPointExpressionAnimation;
}

std::tuple< double, double > DetermineActualApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint
 | ) |  |

Definition at line 1679 of file SnapPoint.cpp.

{
    std::tuple<double, double> actualApplicableZoneReturned = std::make_tuple(
        DetermineMinActualApplicableZone(previousSnapPoint),
        DetermineMaxActualApplicableZone(nextSnapPoint));

    // Influence() will not have thrown if either of the adjacent snap points are also repeated snap points which have the same start and end, however this is not allowed.
    // We only need to check the nextSnapPoint because of the symmetry in the algorithm.
    if (nextSnapPoint && *static_cast<SnapPointBase*>(this) == (nextSnapPoint))
    {
        // TODO: Provide custom error message
        throw winrt::hresult_error(E_INVALIDARG);
    }

    return actualApplicableZoneReturned;
}

std::tuple< double, double > DetermineActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue,
 |  | double | nextIgnoredValue
 | ) |  |

Definition at line 1698 of file SnapPoint.cpp.

{
    return std::make_tuple(
        DetermineMinActualImpulseApplicableZone(
            previousSnapPoint,
            currentIgnoredValue,
            previousIgnoredValue),
        DetermineMaxActualImpulseApplicableZone(
            nextSnapPoint,
            currentIgnoredValue,
            nextIgnoredValue));
}

double DetermineFirstRepeatedSnapPointValue ( ) const [private]

Definition at line 1716 of file SnapPoint.cpp.

{
    MUX_ASSERT(m_offset >= m_start);
    MUX_ASSERT(m_interval > 0.0);

    return m_offset - std::floor((m_offset - m_start) / m_interval) * m_interval;
}

double DetermineLastRepeatedSnapPointValue ( ) const [private]

Definition at line 1724 of file SnapPoint.cpp.

{
    MUX_ASSERT(m_offset <= m_end);
    MUX_ASSERT(m_interval > 0.0);

    return m_offset + std::floor((m_end - m_offset) / m_interval) * m_interval;
}

double DetermineMaxActualApplicableZone ( const SnapPointBase * nextSnapPoint ) const [private]

Definition at line 1764 of file SnapPoint.cpp.

{
    // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
    // This call will ensure that we are not in the range of the next snap point if it is.
    if (nextSnapPoint)
    {
        nextSnapPoint->Influence(m_end);
    }
    return m_end;
}

double DetermineMaxActualImpulseApplicableZone | ( | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | nextIgnoredValue |
 | ) |  |  | const [private]

Definition at line 1776 of file SnapPoint.cpp.

{
    if (nextSnapPoint)
    {
        if (currentIgnoredValue == DetermineLastRepeatedSnapPointValue())
        {
            return currentIgnoredValue;
        }

        if (!isnan(nextIgnoredValue))
        {
            return nextSnapPoint->ImpulseInfluence(m_end, nextIgnoredValue);
        }
    }
    return m_end;
}

double DetermineMinActualApplicableZone ( const SnapPointBase * previousSnapPoint ) const [private]

Definition at line 1732 of file SnapPoint.cpp.

{
    // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
    // This call will ensure that we are not in the range of the previous snap point if it is.
    if (previousSnapPoint)
    {
        previousSnapPoint->Influence(m_start);
    }
    return m_start;
}

double DetermineMinActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue |
 | ) |  |  | const [private]

Definition at line 1744 of file SnapPoint.cpp.

{
    if (previousSnapPoint)
    {
        if (currentIgnoredValue == DetermineFirstRepeatedSnapPointValue())
        {
            return currentIgnoredValue;
        }

        if (!isnan(previousIgnoredValue))
        {
            return previousSnapPoint->ImpulseInfluence(m_start, previousIgnoredValue);
        }
    }
    return m_start;
}

double End ( )

Definition at line 1495 of file SnapPoint.cpp.

{
    return m_end;
}

double Evaluate | ( | std::tuple< double, double > | actualApplicableZone,
 |  | double | value |
 | ) |  |  | const

Definition at line 1892 of file SnapPoint.cpp.

{
    if (value >= m_start && value <= m_end)
    {
        const double firstSnapPointValue = DetermineFirstRepeatedSnapPointValue();
        const double passedSnapPoints = std::floor((value - firstSnapPointValue) / m_interval);
        const double previousSnapPointValue = (passedSnapPoints * m_interval) + firstSnapPointValue;
        const double nextSnapPointValue = previousSnapPointValue + m_interval;

        if ((value - previousSnapPointValue) <= (nextSnapPointValue - value))
        {
            if (previousSnapPointValue + m_specifiedApplicableRange >= value)
            {
                return previousSnapPointValue;
            }
        }
        else
        {
            if (nextSnapPointValue - m_specifiedApplicableRange <= value)
            {
                return nextSnapPointValue;
            }
        }
    }
    return value;
}

double ImpulseInfluence | ( | double | edgeOfMidpoint,
 |  | double | ignoredValue |
 | ) |  |  | const

Definition at line 1853 of file SnapPoint.cpp.

{
    if (edgeOfMidpoint <= m_start)
    {
        if (ignoredValue == DetermineFirstRepeatedSnapPointValue())
        {
            return ignoredValue;
        }
        return m_start;
    }
    else if (edgeOfMidpoint >= m_end)
    {
        if (ignoredValue == DetermineLastRepeatedSnapPointValue())
        {
            return ignoredValue;
        }
        return m_end;
    }
    else
    {
        MUX_ASSERT(false);
        return 0.0;
    }
}

double Influence ( double edgeOfMidpoint ) const

Definition at line 1834 of file SnapPoint.cpp.

{
    if (edgeOfMidpoint <= m_start)
    {
        return m_start;
    }
    else if (edgeOfMidpoint >= m_end)
    {
        return m_end;
    }
    else
    {
        // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
        // TODO: Provide custom error message
        throw winrt::hresult_error(E_INVALIDARG);
    }
    return 0.0;
}

double Interval ( )

Definition at line 1485 of file SnapPoint.cpp.

{
    return m_interval;
}

double Offset ( )

Definition at line 1480 of file SnapPoint.cpp.

{
    return m_offset;
}

int SnapCount ( ) const

Definition at line 1887 of file SnapPoint.cpp.

{
    return static_cast<int>((m_end - m_start) / m_interval);
}

SnapPointSortPredicate SortPredicate ( ) const

Definition at line 1673 of file SnapPoint.cpp.

{
    // Repeated snap points should be sorted after irregular snap points, so give it a tertiary sort value of 1 (irregular snap points get 0)
    return SnapPointSortPredicate{ m_start, m_end, 1 };
}

double Start ( )

Definition at line 1490 of file SnapPoint.cpp.

{
    return m_start;
}

void UpdateConditionalExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | conditionExpressionAnimation,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 1656 of file SnapPoint.cpp.

{
    SetScalarParameter(conditionExpressionAnimation, s_impulseStart, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
    SetScalarParameter(conditionExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
}

void UpdateRestingPointExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | restingValueExpressionAnimation,
 |  | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 1664 of file SnapPoint.cpp.

{
    SetScalarParameter(restingValueExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
    SetScalarParameter(restingValueExpressionAnimation, s_impulseIgnoredValue, static_cast<float>(ignoredValue));
}

void ValidateConstructorParameters | ( | double | offset,
 |  | double | interval,
 |  | double | start,
 |  | double | end |
 | ) |  |  | const [private]

Definition at line 1796 of file SnapPoint.cpp.

{
    if (end <= start)
    {
        throw winrt::hresult_invalid_argument(L"'end' must be greater than 'start'.");
    }

    if (offset < start)
    {
        throw winrt::hresult_invalid_argument(L"'offset' must be greater than or equal to 'start'.");
    }

    if (offset > end)
    {
        throw winrt::hresult_invalid_argument(L"'offset' must be smaller than or equal to 'end'.");
    }

    if (interval <= 0)
    {
        throw winrt::hresult_invalid_argument(L"'interval' must be strictly positive.");
    }

#ifdef ApplicableRangeType
    if (applicableRangeToo && applicableRange <= 0)
    {
        throw winrt::hresult_invalid_argument(L"'applicableRange' must be strictly positive.");
    }
#endif
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPoint.h
  • ScrollPresenter/SnapPoint.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

RepeaterAutomationPeer Class Reference

#include "RepeaterAutomationPeer.h"

Inherits ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT >.

List of all members.

Public Member Functions

RepeaterAutomationPeer (winrt::ItemsRepeater const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::IVector
< winrt::AutomationPeer > 		GetChildrenCore ()

Private Member Functions

winrt::UIElement | GetElement (const winrt::AutomationPeer &peer, const winrt::ItemsRepeater &repeater)

Detailed Description

Definition at line 8 of file RepeaterAutomationPeer.h.

Constructor & Destructor Documentation

RepeaterAutomationPeer ( winrt::ItemsRepeater const & owner )

Definition at line 15 of file RepeaterAutomationPeer.cpp.

                                                                              :
    ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 62 of file RepeaterAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Group;
}

winrt::IVector< winrt::AutomationPeer > GetChildrenCore ( )

Definition at line 22 of file RepeaterAutomationPeer.cpp.

{
    const auto repeater = Owner().as<winrt::ItemsRepeater>();
    const auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();
    const unsigned peerCount = childrenPeers.Size();

    std::vector<std::pair<int /* index */, winrt::AutomationPeer>> realizedPeers;
    realizedPeers.reserve(static_cast<int>(peerCount));

    // Filter out unrealized peers.
    {
        for (unsigned i = 0u; i < peerCount; ++i)
        {
            auto childPeer = childrenPeers.GetAt(i);
            if (auto childElement = GetElement(childPeer, repeater))
            {
                auto virtInfo = ItemsRepeater::GetVirtualizationInfo(childElement);
                if (virtInfo->IsRealized())
                {
                    realizedPeers.push_back(std::make_pair(virtInfo->Index(), childPeer));
                }
            }
        }
    }

    // Sort peers by index.
    std::sort(realizedPeers.begin(), realizedPeers.end(), [](const auto& lhs, const auto& rhs) { return lhs.first < rhs.first; });

    // Select peers.
    {
        auto peers = winrt::make<Vector<winrt::AutomationPeer, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>(
            static_cast<int>(realizedPeers.size()) /* capacity */);
        for (auto& entry : realizedPeers)
        {
            peers.Append(entry.second);
        }
        return peers;
    }
}

winrt::UIElement GetElement | ( | const winrt::AutomationPeer & | peer,
 |  | const winrt::ItemsRepeater & | repeater |
 | ) |  |  | [private]

Definition at line 70 of file RepeaterAutomationPeer.cpp.

{
    auto childElement = static_cast<winrt::DependencyObject>(childPeer.as<winrt::FrameworkElementAutomationPeer>().Owner());

    auto parent = CachedVisualTreeHelpers::GetParent(childElement);
    // Child peer could have given a descendant of the repeater's child. We
    // want to get to the immediate child.
    while (parent && parent.try_as<winrt::ItemsRepeater>() != repeater)
    {
        childElement = parent;
        parent = CachedVisualTreeHelpers::GetParent(childElement);
    }

    return childElement.as<winrt::UIElement>();
}

The documentation for this class was generated from the following files:
  • Repeater/RepeaterAutomationPeer.h
  • Repeater/RepeaterAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterLayoutContext Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

RepeaterLayoutContext Class Reference

#include "RepeaterLayoutContext.h"

List of all members.

Public Member Functions

RepeaterLayoutContext (const winrt::ItemsRepeater &owner)
winrt::IInspectable | GetItemAtCore (int index)
winrt::UIElement | GetOrCreateElementAtCore (int index, winrt::ElementRealizationOptions const &options)
hstring | GetRuntimeClassName () const
int32_t | ItemCountCore ()
winrt::Point | LayoutOriginCore ()
void | LayoutOriginCore (winrt::Point const &value)
void | LayoutStateCore (winrt::IInspectable const &state)
winrt::IInspectable | LayoutStateCore ()
winrt::Rect | RealizationRectCore ()
int32_t | RecommendedAnchorIndexCore ()
void | RecycleElementCore (winrt::UIElement const &element)
winrt::Rect | VisibleRectCore ()

Private Member Functions

winrt::ItemsRepeater | GetOwner ()

Private Attributes

winrt::weak_ref
< winrt::ItemsRepeater > 		m_owner

Detailed Description

Definition at line 8 of file RepeaterLayoutContext.h.

Constructor & Destructor Documentation

RepeaterLayoutContext ( const winrt::ItemsRepeater & owner )

Definition at line 10 of file RepeaterLayoutContext.cpp.

{
    m_owner = winrt::make_weak(owner);
}

Member Function Documentation

winrt::IInspectable GetItemAtCore ( int index )

Definition at line 52 of file RepeaterLayoutContext.cpp.

{
    return GetOwner().ItemsSourceView().GetAt(index);
}

winrt::UIElement GetOrCreateElementAtCore | ( | int | index,
 |  | winrt::ElementRealizationOptions const & | options
 | ) |  |

Definition at line 27 of file RepeaterLayoutContext.cpp.

{
    return winrt::get_self<ItemsRepeater>(GetOwner())->GetElementImpl(index,
        (options & winrt::ElementRealizationOptions::ForceCreate) == winrt::ElementRealizationOptions::ForceCreate,
        (options & winrt::ElementRealizationOptions::SuppressAutoRecycle) == winrt::ElementRealizationOptions::SuppressAutoRecycle);
}

winrt::ItemsRepeater GetOwner ( ) [private]

Definition at line 100 of file RepeaterLayoutContext.cpp.

{
    return m_owner.get();
}

hstring GetRuntimeClassName ( ) const [inline]

Definition at line 16 of file RepeaterLayoutContext.h.

    {
        return VirtualizingLayoutContext::GetRuntimeClassName();
    }

int32_t ItemCountCore ( )

Definition at line 17 of file RepeaterLayoutContext.cpp.

{
    auto dataSource = GetOwner().ItemsSourceView();
    if (dataSource)
    {
        return dataSource.Count();
    }
    return 0;
}

winrt::Point LayoutOriginCore ( )

Definition at line 88 of file RepeaterLayoutContext.cpp.

{
    return winrt::get_self<ItemsRepeater>(GetOwner())->LayoutOrigin();
}

void LayoutOriginCore ( winrt::Point const & value )

Definition at line 93 of file RepeaterLayoutContext.cpp.

{
    winrt::get_self<ItemsRepeater>(GetOwner())->LayoutOrigin(value);
}

winrt::IInspectable LayoutStateCore ( )

Definition at line 34 of file RepeaterLayoutContext.cpp.

{
    if (auto owner = GetOwner())
    {
        return winrt::get_self<ItemsRepeater>(owner)->LayoutState();
    }
    return winrt::IInspectable{ nullptr };
}

void LayoutStateCore ( winrt::IInspectable const & state )

Definition at line 43 of file RepeaterLayoutContext.cpp.

{
    winrt::get_self<ItemsRepeater>(GetOwner())->LayoutState(value);
}

winrt::Rect RealizationRectCore ( )

Definition at line 70 of file RepeaterLayoutContext.cpp.

{
    return winrt::get_self<ItemsRepeater>(GetOwner())->RealizationWindow();
}

int32_t RecommendedAnchorIndexCore ( )

Definition at line 75 of file RepeaterLayoutContext.cpp.

{
    int anchorIndex = -1;
    auto repeater = winrt::get_self<ItemsRepeater>(GetOwner());
    auto anchor = repeater->SuggestedAnchor();
    if (anchor)
    {
        anchorIndex = repeater->GetElementIndex(anchor);
    }

    return anchorIndex;
}

void RecycleElementCore ( winrt::UIElement const & element )

Definition at line 58 of file RepeaterLayoutContext.cpp.

{
    auto owner = winrt::get_self<ItemsRepeater>(GetOwner());
    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"RecycleElement:", owner->GetElementIndex(element));
    owner->ClearElementImpl(element);
}

winrt::Rect VisibleRectCore ( )

Definition at line 65 of file RepeaterLayoutContext.cpp.

{
    return winrt::get_self<ItemsRepeater>(GetOwner())->VisibleWindow();
}

Member Data Documentation

winrt::weak_ref<winrt::ItemsRepeater> m_owner [private]

Definition at line 51 of file RepeaterLayoutContext.h.

The documentation for this class was generated from the following files:
  • Repeater/RepeaterLayoutContext.h
  • Repeater/RepeaterLayoutContext.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

RepeaterTestHooks Class Reference

#include "RepeaterTestHooks.h"

List of all members.

Public Member Functions

winrt::event_token | BuildTreeCompletedImpl (winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value)
void | BuildTreeCompletedImpl (winrt::event_token const &token)
void | NotifyBuildTreeCompletedImpl ()

Static Public Member Functions

static winrt::event_token | BuildTreeCompleted (winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value)
static void | BuildTreeCompleted (winrt::event_token const &token)
static int | GetElementFactoryElementIndex ()
static com_ptr< RepeaterTestHooks > | GetGlobalTestHooks ()
static hstring | GetLayoutId (winrt::IInspectable const &layout)
static int | GetLogItemIndex ()
static void | NotifyBuildTreeCompleted ()
static void | SetElementFactoryElementIndex (int index)
static void | SetLayoutId (winrt::IInspectable const &layout, const hstring &id)
static void | SetLogItemIndex (int logItemIndex)

Static Private Member Functions

static void | EnsureHooks ()

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::IInspectable,
winrt::IInspectable > > 		m_buildTreeCompleted

Static Private Attributes

static int | s_elementFactoryElementIndex
static RepeaterTestHooks * | s_testHooks

Detailed Description

Definition at line 10 of file RepeaterTestHooks.h.

Member Function Documentation

static winrt::event_token BuildTreeCompleted ( winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const & value ) [static]
static void BuildTreeCompleted ( winrt::event_token const & token ) [static]
winrt::event_token BuildTreeCompletedImpl ( winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const & value )
void BuildTreeCompletedImpl ( winrt::event_token const & token )
static void EnsureHooks ( ) [static, private]
static int GetElementFactoryElementIndex ( ) [static]
static com_ptr<RepeaterTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 18 of file RepeaterTestHooks.h.

    {
        return s_testHooks->get_strong();
    }

static hstring GetLayoutId ( winrt::IInspectable const & layout ) [static]
static int GetLogItemIndex ( ) [static]
static void NotifyBuildTreeCompleted ( ) [static]
void NotifyBuildTreeCompletedImpl ( )
static void SetElementFactoryElementIndex ( int index ) [static]
static void SetLayoutId | ( | winrt::IInspectable const & | layout,
 |  | const hstring & | id |
 | ) |  |  | [static]
static void SetLogItemIndex ( int logItemIndex ) [static]

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> > m_buildTreeCompleted [private]

Definition at line 38 of file RepeaterTestHooks.h.

int s_elementFactoryElementIndex [static, private]

Definition at line 35 of file RepeaterTestHooks.h.

RepeaterTestHooks* s_testHooks [static, private]

Definition at line 36 of file RepeaterTestHooks.h.

The documentation for this class was generated from the following file:
  • Repeater/RepeaterTestHooks.h
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBackgroundBrush Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBackgroundBrush Class Reference

#include "RevealBrush.h"

Inherits ReferenceTracker< RevealBackgroundBrush, winrt::implementation::RevealBackgroundBrushT, RevealBrush >.

List of all members.

Detailed Description

Definition at line 132 of file RevealBrush.h.

The documentation for this class was generated from the following file:
  • Materials/Reveal/RevealBrush.h
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBorderBrush Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RevealBorderBrush Class Reference

#include "RevealBrush.h"

Inherits ReferenceTracker< RevealBorderBrush, winrt::implementation::RevealBorderBrushT, RevealBrush >.

List of all members.

Public Member Functions

RevealBorderBrush ()

Detailed Description

Definition at line 125 of file RevealBrush.h.

Constructor & Destructor Documentation

RevealBorderBrush ( )

Definition at line 114 of file RevealBrush.cpp.

{
    m_isBorder = true;
}

The documentation for this class was generated from the following files:
  • Materials/Reveal/RevealBrush.h
  • Materials/Reveal/RevealBrush.cpp
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBorderLight Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

RevealBorderLight Class Reference

#include "RevealBorderLight.h"

Inherits ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT >.

List of all members.

Public Member Functions

winrt::hstring | GetId ()
void | OnConnected (winrt::UIElement const &newElement)
void | OnDisconnected (winrt::UIElement const &oldElement)
void | OnMaterialPolicyStatusChanged (const com_ptr< MaterialHelperBase > &sender, bool isDisabledByMaterialPolicy)
void | SetIsLightTheme (bool isLightTheme)
void | SetIsWideLight (bool isWideLight)

Static Public Member Functions

static winrt::hstring & | GetDarkThemeIdStatic ()
static winrt::hstring & | GetLightThemeIdStatic ()

Private Member Functions

void | EnsureCompositionResources ()
void | EnsureLocalLight ()
winrt::SpotLight | GetLight ()
bool | GetShouldLightBeOn ()
void | HookupWindowPointerHandlers ()
void | ReleaseCompositionResources ()
void | ReleaseLocalLight ()
void | SwitchLight (bool turnOn)
void | UnhookWindowPointerHandlers ()

Private Attributes

friend | MaterialHelper
friend | MaterialHelperBase
friend | RevealTestApi

Detailed Description

Definition at line 13 of file RevealBorderLight.h.

Member Function Documentation

void EnsureCompositionResources ( ) [private]

Definition at line 80 of file RevealBorderLight.cpp.

{
    EnsureLocalLight();
}

void EnsureLocalLight ( ) [private]

Definition at line 85 of file RevealBorderLight.cpp.

{
    if (!m_compositionSpotLight)
    {
        auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
        m_compositionSpotLight = compositor.CreateSpotLight();
        CompositionLight(m_compositionSpotLight);

        m_colorsProxy = CreateSpotLightColorsProxy(m_compositionSpotLight);
        m_offsetProps = compositor.CreatePropertySet();

        m_offsetProps.InsertScalar(L"SpotlightHeight", m_isWideLight ? s_revealBorderSpotlightStateWide.Height.Value : s_revealBorderSpotlightState.Height.Value);
        SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_isWideLight ? s_revealBorderSpotlightStateWide : s_revealBorderSpotlightState);

        HookupWindowPointerHandlers();

        // Create an expression animation that combines the PointerPositionPropertySet pointer position and the z-depth of the light
        if (auto targetElement = m_targetElement.get())
        {
            m_offsetAnimation = compositor.CreateExpressionAnimation(c_PointerOffsetExpression);
            m_offsetAnimation.SetReferenceParameter(L"props", m_offsetProps);

            m_pointer = winrt::ElementCompositionPreview::GetPointerPositionPropertySet(targetElement);
            m_offsetAnimation.SetReferenceParameter(L"pointer", m_pointer);

            m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
        }
    }
}

winrt::hstring & GetDarkThemeIdStatic ( ) [static]

Definition at line 58 of file RevealBorderLight.cpp.

{
    static winrt::hstring s_revealBorderLightDarkTheme{ MUXCONTROLSMEDIA_NAMESPACE_STR L".RevealBorderLight_DarkTheme" };
    return s_revealBorderLightDarkTheme;
}

winrt::hstring GetId ( )

Definition at line 64 of file RevealBorderLight.cpp.

{
    return m_isLightTheme ? GetLightThemeIdStatic() : GetDarkThemeIdStatic();
}

winrt::SpotLight GetLight ( ) [inline, private]

Definition at line 34 of file RevealBorderLight.h.

{ return m_compositionSpotLight; } // For test APIs

winrt::hstring & GetLightThemeIdStatic ( ) [static]

Definition at line 52 of file RevealBorderLight.cpp.

{
    static winrt::hstring s_revealBorderLightLightTheme{ MUXCONTROLSMEDIA_NAMESPACE_STR L".RevealBorderLight_LightTheme" };
    return s_revealBorderLightLightTheme;
}

bool GetShouldLightBeOn ( ) [private]

Definition at line 156 of file RevealBorderLight.cpp.

{
    return m_shouldLightBeOn;
}

void HookupWindowPointerHandlers ( ) [private]

Definition at line 219 of file RevealBorderLight.cpp.

{
    auto coreWindow = winrt::CoreWindow::GetForCurrentThread();
    WINRT_ASSERT(coreWindow);       // CoreWindow presence required for Reveal experience
    m_coreWindow = coreWindow;

    if (m_coreWindow)
    {
        auto strongThis = get_strong();

        // Make sure RevealBorderLight is alive and the token is valid before executing each handler's body.
        // Otherwise, it's possible for the handler to get invoked after we've unsubscribed from the event and the object has been destroyed.
        // See comments in UnhookWindowPointerHandlers() for more details.
        m_PointerEnteredToken = m_coreWindow.PointerEntered(
            [strongThis](const winrt::CoreWindow&, const::winrt::Windows::UI::Core::PointerEventArgs&)
            {
                if (strongThis->m_PointerEnteredToken.value != 0)
                {
                    strongThis->SwitchLight(true);
                }
            });

        m_PointerExitedToken = m_coreWindow.PointerExited(
            [strongThis](const winrt::CoreWindow&, const ::winrt::Windows::UI::Core::PointerEventArgs&)
            {
                if (strongThis->m_PointerExitedToken.value != 0)
                {
                    strongThis->SwitchLight(false);
                }
            });

        m_PointerMovedToken = m_coreWindow.PointerMoved(
            [strongThis](const winrt::CoreWindow&, const ::winrt::Windows::UI::Core::PointerEventArgs& args)
            {
                if (strongThis->m_PointerMovedToken.value != 0)
                {
                    // On PointerMoved, make sure that the border light is on, except in the following cases:
                    //
                    // 1. This is a Touch or Pen PointerMoved. This should not be necessary as we already listen for events that mark when a touch interaction starts
                    //    (PointerEntered/Pressed) and ends (PointerExited/Released/CaptureLost. Also, in the case of dragging items in a ListView with CanDragItems = true,
                    //    we get a touch PointerMoved after completing the drag, which keeps the light on at the touch point (where DManip first took over).
                    //
                    // 2. This is the first PointerMoved after a CaptureLost event we got due to DManip taking over touch or pen input (eg pan in ScrollViewer).
                    //    In this case, after the touch/pen interaction is complete, we occasionally get a PointerMoved on Mouse for an unknown reason.
                    //    Ignore this event, as it will otherwise keep the light on at the touch point (where DManip first took over).
                    if (args.CurrentPoint().PointerDevice().PointerDeviceType() == winrt::Devices::Input::PointerDeviceType::Mouse &&
                        !strongThis->m_gotPointerCaptureLostDueToDManip)
                    {
                        strongThis->SwitchLight(true);
                    }

                    strongThis->m_gotPointerCaptureLostDueToDManip = false;
                }
            });

        m_PointerPressedToken = m_coreWindow.PointerPressed(
            [strongThis](const winrt::CoreWindow&, const ::winrt::Windows::UI::Core::PointerEventArgs&)
            {
                if (strongThis->m_PointerPressedToken.value != 0)
                {
                    strongThis->SwitchLight(true);
                }
            });

        m_PointerReleasedToken = m_coreWindow.PointerReleased(
            [strongThis](const winrt::CoreWindow&, const ::winrt::Windows::UI::Core::PointerEventArgs& args)
            {
                if (strongThis->m_PointerReleasedToken.value != 0)
                {
                    if (args.CurrentPoint().PointerDevice().PointerDeviceType() == winrt::Devices::Input::PointerDeviceType::Touch)
                    {
                        strongThis->SwitchLight(false);
                    }
                }
            });

        m_PointerCaptureLostToken = m_coreWindow.PointerCaptureLost(
            [strongThis](const winrt::CoreWindow&, const ::winrt::Windows::UI::Core::PointerEventArgs& args)
            {
                if (strongThis->m_PointerCaptureLostToken.value != 0)
                {
                    strongThis->SwitchLight(false);

                    if (args.CurrentPoint().PointerDevice().PointerDeviceType() == winrt::Devices::Input::PointerDeviceType::Pen ||
                        args.CurrentPoint().PointerDevice().PointerDeviceType() == winrt::Devices::Input::PointerDeviceType::Touch)
                    {
                        strongThis->m_gotPointerCaptureLostDueToDManip = true;
                    }
                }
            });
    }
}

void OnConnected ( winrt::UIElement const & newElement )

Definition at line 69 of file RevealBorderLight.cpp.

{
    m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });

    m_targetElement = winrt::make_weak(newElement);
    if (!m_isDisabledByMaterialPolicy)
    {
        EnsureCompositionResources();
    }
}

void OnDisconnected ( winrt::UIElement const & oldElement )

Definition at line 141 of file RevealBorderLight.cpp.

{
    ReleaseCompositionResources();
    m_targetElement = nullptr;

    MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
    m_materialPolicyChangedToken.value = 0;
}

void OnMaterialPolicyStatusChanged | ( | const com_ptr< MaterialHelperBase > & | sender,
 |  | bool | isDisabledByMaterialPolicy
 | ) |  |

Definition at line 150 of file RevealBorderLight.cpp.

{
    // MaterialHelper::LightPolicyChangedHelper<RevealBorderLight>(this, isDisabledByMaterialPolicy); // Bug 24355584: DCPP: Reveal is disabled
    MaterialHelper::LightPolicyChangedHelper<RevealBorderLight>(this, true);
}

void ReleaseCompositionResources ( ) [private]

Definition at line 115 of file RevealBorderLight.cpp.

{
    ReleaseLocalLight();
    CompositionLight(nullptr);
}

void ReleaseLocalLight ( ) [private]

Definition at line 121 of file RevealBorderLight.cpp.

{
    m_colorsProxy = nullptr;
    m_shouldLightBeOn = false;
    UnhookWindowPointerHandlers();
    if (m_compositionSpotLight)
    {
        m_compositionSpotLight.StopAnimation(L"Offset");
    }
    if (m_pointer)
    {
        m_pointer.Close();
        m_pointer = nullptr;
    }
    m_offsetAnimation = nullptr;
    m_offsetProps = nullptr;
    m_compositionSpotLight = nullptr;
}

void SetIsLightTheme ( bool isLightTheme ) [inline]

Definition at line 24 of file RevealBorderLight.h.

{ m_isLightTheme = isLightTheme; }

void SetIsWideLight ( bool isWideLight ) [inline]

Definition at line 23 of file RevealBorderLight.h.

{ m_isWideLight = isWideLight; }

void SwitchLight ( bool turnOn ) [private]

Definition at line 162 of file RevealBorderLight.cpp.

{
    if ((m_shouldLightBeOn == turnOn) ||
        m_isDisabledByMaterialPolicy ||
        !m_colorsProxy)
    {
        return;
    }

    m_shouldLightBeOn = turnOn;

    const auto animateSpotLight = [this, turnOn]()
    {
        auto animation = m_colorsProxy.Compositor().CreateScalarKeyFrameAnimation();
        animation.Duration(250ms);
        animation.InsertKeyFrame(1, turnOn ? 1.f : 0.f);
        m_colorsProxy.StartAnimation(L"LightIntensity", animation);
    };

    // Also use the more performanant IsEnabled property if available (RS4+).
    auto lightWithEnabledProperty = m_compositionSpotLight.try_as<winrt::ICompositionLight3>();

    if (turnOn)
    {
        if (lightWithEnabledProperty)
        {
            // If TurnOn animation was started while a TurnOff animation is running, the TurnOff Completed
            // event fires after TurnOn starts, causing IsEnabled to end up at False. Set flag to prevent this scenario here.
            m_setLightDisabledAfterTurnOffAnimation = false;
            lightWithEnabledProperty.IsEnabled(true);
        }
        animateSpotLight();
    }
    else
    {
        winrt::CompositionScopedBatch scopedBatch = winrt::CompositionTarget::GetCompositorForCurrentThread().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
        animateSpotLight();
        scopedBatch.End();

        if (lightWithEnabledProperty)
        {
            m_setLightDisabledAfterTurnOffAnimation = true;
            auto strongThis = get_strong();

            scopedBatch.Completed(
                [strongThis, lightWithEnabledProperty](auto sender, auto args)
                {
                    if (strongThis->m_setLightDisabledAfterTurnOffAnimation)
                    {
                        lightWithEnabledProperty.IsEnabled(false);
                        strongThis->m_setLightDisabledAfterTurnOffAnimation = false;
                    }
                });
        }
    }
}

void UnhookWindowPointerHandlers ( ) [private]

Definition at line 312 of file RevealBorderLight.cpp.

{
    if (m_coreWindow)
    {
        // It's possible for UnhookWindowPointerHandlers() to be called while handling another CoreWindow.PointerExited.
        // In this case, CoreWindow's list of handlers is locked and the scheduled PointerExited will fire even after beig unsubscribed.
        // Clear the token after unregistering so any suuch callbacks can be ignored.
        if (m_PointerEnteredToken.value != 0)
        {
            m_coreWindow.PointerEntered(m_PointerEnteredToken);
            m_PointerEnteredToken.value = 0;
        }

        if (m_PointerExitedToken.value != 0)
        {
            m_coreWindow.PointerExited(m_PointerExitedToken);
            m_PointerExitedToken.value = 0;
        }

        if (m_PointerMovedToken.value != 0)
        {
            m_coreWindow.PointerMoved(m_PointerMovedToken);
            m_PointerMovedToken.value = 0;
        }

        if (m_PointerPressedToken.value != 0)
        {
            m_coreWindow.PointerPressed(m_PointerPressedToken);
            m_PointerPressedToken.value = 0;
        }

        if (m_PointerReleasedToken.value != 0)
        {
            m_coreWindow.PointerReleased(m_PointerReleasedToken);
            m_PointerReleasedToken.value = 0;
        }

        if (m_PointerCaptureLostToken.value != 0)
        {
            m_coreWindow.PointerCaptureLost(m_PointerCaptureLostToken);
            m_PointerCaptureLostToken.value = 0;
        }

        m_coreWindow = nullptr;
    }
}

Member Data Documentation

friend MaterialHelper [private]

Definition at line 18 of file RevealBorderLight.h.

friend MaterialHelperBase [private]

Definition at line 17 of file RevealBorderLight.h.

friend RevealTestApi [private]

Definition at line 16 of file RevealBorderLight.h.

The documentation for this class was generated from the following files:
  • Lights/RevealBorderLight.h
  • Lights/RevealBorderLight.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBorderSpotlightInfo< ValueType > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBorderSpotlightInfo< ValueType > Struct Template Reference

#include "SpotLightStateHelper.h"

Detailed Description

template<typename ValueType>
struct RevealBorderSpotlightInfo< ValueType >

Definition at line 87 of file SpotLightStateHelper.h.

The documentation for this struct was generated from the following file:
  • Lights/SpotLightStateHelper.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBorderSpotlightStateDesc Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

RevealBorderSpotlightStateDesc Struct Reference

#include "SpotLightStateHelper.h"

List of all members.

Public Attributes

RevealBorderSpotlightInfo< float > | ConstantAttenuation
RevealBorderSpotlightInfo< float > | Height
RevealBorderSpotlightInfo< float > | InnerConeAngleInDegrees
RevealBorderSpotlightInfo
< winrt::Color > 		InnerConeColor
RevealBorderSpotlightInfo< float > | LinearAttenuation
RevealBorderSpotlightInfo< float > | OuterAngleScale
RevealBorderSpotlightInfo< float > | OuterConeAngleInDegrees
RevealBorderSpotlightInfo
< winrt::Color > 		OuterConeColor

Detailed Description

Definition at line 94 of file SpotLightStateHelper.h.

Member Data Documentation

RevealBorderSpotlightInfo<float> ConstantAttenuation

Definition at line 96 of file SpotLightStateHelper.h.

RevealBorderSpotlightInfo<float> Height

Definition at line 102 of file SpotLightStateHelper.h.

RevealBorderSpotlightInfo<float> InnerConeAngleInDegrees

Definition at line 98 of file SpotLightStateHelper.h.

RevealBorderSpotlightInfo<winrt::Color> InnerConeColor

Definition at line 99 of file SpotLightStateHelper.h.

RevealBorderSpotlightInfo<float> LinearAttenuation

Definition at line 97 of file SpotLightStateHelper.h.

RevealBorderSpotlightInfo<float> OuterAngleScale

Definition at line 103 of file SpotLightStateHelper.h.

RevealBorderSpotlightInfo<float> OuterConeAngleInDegrees

Definition at line 100 of file SpotLightStateHelper.h.

RevealBorderSpotlightInfo<winrt::Color> OuterConeColor

Definition at line 101 of file SpotLightStateHelper.h.

The documentation for this struct was generated from the following file:
  • Lights/SpotLightStateHelper.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBrush Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes

RevealBrush Class Reference

#include "RevealBrush.h"

Inherits RevealBrushProperties.

List of all members.

Public Member Functions

RevealBrush ()
virtual | ~RevealBrush ()
void | OnConnected ()
void | OnDisconnected ()
void | OnMaterialPolicyStatusChanged (const com_ptr< MaterialHelperBase > &sender, bool isDisabledByMaterialPolicy)
void | OnNoiseChanged (const com_ptr< MaterialHelperBase > &sender)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Static Public Member Functions

static void | AttachLights ()
static void | AttachLightsToAncestor (const winrt::UIElement &root, bool trackRootToDisconnectFrom)
static void | ClearProperties ()
static void | EnsureProperties ()
static void | OnStatePropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)
static void | StopAttachingLights ()

Static Public Attributes

static GlobalDependencyProperty | s_IsContainerProperty
static const winrt::Color | sc_defaultColor

Protected Member Functions

void | CreateRevealBrush ()
bool | IsInFallbackMode ()
void | OnColorChanged ()
void | OnFallbackColorChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnTargetThemeChanged ()
void | UpdateLightTargets (bool ambientToo)
void | UpdateRevealBrush ()

Static Protected Member Functions

static winrt::IGraphicsEffect | CreateRevealBorderEffect (bool isInverted, bool hasBaseColor)
static winrt::IGraphicsEffect | CreateRevealHoverEffect ()

Static Protected Attributes

static const winrt::Color | sc_ambientContributionColor
static const winrt::Matrix5x4 | sc_colorToAlphaMatrix
static const float | sc_diffuseAmount
static const float | sc_diffuseAmountBorder
static const winrt::Matrix5x4 | sc_luminanceToAlphaMatrix
static const float | sc_specularAmount
static const float | sc_specularAmountBorder
static const float | sc_specularShine
static const float | sc_specularShineBorder

Private Member Functions

void | EnsureNoiseBrush ()
winrt::CompositionEffectFactory | GetOrCreateRevealBrushCompositionEffectFactory (bool isBorder, bool isInverted, bool hasBaseColor, const winrt::Compositor &compositor)
void | PolicyStatusChangedHelper (bool isDisabledByMaterialPolicy)
void | RemoveTargetBrush (const wstring_view &lightID)

Static Private Member Functions

static void | AttachLightsImpl ()
static void | AttachLightsToElement (const winrt::UIElement &element, bool trackAsRootToDisconnectFrom)
static winrt::UIElement | GetAncestor (const winrt::UIElement &root)
static bool | IsOnXboxAndNotMouseMode ()
static void | OnIsContainerPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)
static bool | ValidatePublicRootAncestor ()

Private Attributes

friend | MaterialHelper
friend | RevealBrushTestApi

Detailed Description

Definition at line 14 of file RevealBrush.h.

Constructor & Destructor Documentation

RevealBrush ( )

Definition at line 106 of file RevealBrush.cpp.

{
    //  Logging usage telemetry
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_Reveal);

    EnsureProperties();
}

~RevealBrush ( ) [virtual]

Definition at line 119 of file RevealBrush.cpp.

{
    if (m_noiseChangedToken.value)
    {
        MaterialHelper::NoiseChanged(m_noiseChangedToken);
        m_noiseChangedToken.value = 0;
    }
}

Member Function Documentation

void AttachLights ( ) [static]

Definition at line 553 of file RevealBrush.cpp.

{
    // There are some non-fatal cases where we failed to hook up lights, tracked by:
    // Bug 18893751: WUXC: Investigate test failures when MUX_ASSERT(ValidatePublicRootAncestor()) is enabled
    // Comment this assert for now and skip attaching lights. Remove this when Bug 18893751 is fixed.
    // MUX_ASSERT(ValidatePublicRootAncestor());

    RevealBrush::AttachLightsImpl();
}

void AttachLightsImpl ( ) [static, private]

Definition at line 563 of file RevealBrush.cpp.

{
    // Safe to attach RootScrollViewer lights immediately
    auto windowRoot = winrt::Window::Current() ? winrt::Window::Current().Content() : nullptr;
    if (!windowRoot) { return; }

    RevealBrush::AttachLightsToAncestor(windowRoot, true);
}

void AttachLightsToAncestor | ( | const winrt::UIElement & | root,
 |  | bool | trackRootToDisconnectFrom |
 | ) |  |  | [static]

Definition at line 664 of file RevealBrush.cpp.

{
    auto ancestor = GetAncestor(root);
    AttachLightsToElement(ancestor, trackAsRootToDisconnectFrom);
}

void AttachLightsToElement | ( | const winrt::UIElement & | element,
 |  | bool | trackAsRootToDisconnectFrom |
 | ) |  |  | [static, private]

Definition at line 611 of file RevealBrush.cpp.

{
    auto lights = element.Lights();

    bool hasRevealBorderLights = false;
    for (auto light : lights)
    {
        if (auto self = light.try_as<winrt::RevealBorderLight>())
        {
            hasRevealBorderLights = true;
            break;
        }
    }

    if (!hasRevealBorderLights)
    {
        //
        // To achieve the reveal border effect we need two lights AND the configuration of those lights needs be different per-theme.
        // In order to do this we attach 4 lights to the root in each combination -- ("normal", "wide") x ("light", "dark").
        //
        // When RevealBorderLight is in light theme it reports a different ID than in dark theme. RevealBorderBrush also has a
        // theme property and it will select the RevealBorderLight "light theme" or "dark theme" ID as appropriate.
        //
        // In this way we can have the desired effect of different light configs in dark vs light theme but also support
        // subtrees that have different theme via FrameworkElement.RequestedTheme because the ThemeResource references to
        // RevealBorderBrush resources will choose the right brush and then those brushes will choose the right light.
        //
        auto borderLightTheme = winrt::make_self<RevealBorderLight>();
        borderLightTheme->SetIsLightTheme(true);
        auto wideBorderLightTheme = winrt::make_self<RevealBorderLight>();
        wideBorderLightTheme->SetIsWideLight(true);
        wideBorderLightTheme->SetIsLightTheme(true);

        auto borderDarkTheme = winrt::make_self<RevealBorderLight>();
        auto wideBorderDarkTheme = winrt::make_self<RevealBorderLight>();
        wideBorderDarkTheme->SetIsWideLight(true);

        auto ambientLight = winrt::make_self<XamlAmbientLight>();

        lights.Append(*borderLightTheme);
        lights.Append(*wideBorderLightTheme);
        lights.Append(*borderDarkTheme);
        lights.Append(*wideBorderDarkTheme);
        lights.Append(*ambientLight);

        if (trackAsRootToDisconnectFrom)
        {
            MaterialHelper::TrackRevealLightsToRemove(lights,
                { *borderLightTheme, *wideBorderLightTheme, *borderDarkTheme, *wideBorderDarkTheme, *ambientLight });
        }
    }
}

void ClearProperties ( ) [static]

Reimplemented from RevealBrushProperties.

Definition at line 84 of file RevealBrush.cpp.

{
    s_IsContainerProperty = nullptr;
    RevealBrushProperties::ClearProperties();
}

winrt::Windows::Graphics::Effects::IGraphicsEffect CreateRevealBorderEffect | ( | bool | isInverted,
 |  | bool | hasBaseColor |
 | ) |  |  | [static, protected]

Definition at line 410 of file RevealBrush.cpp.

{
    // (1) SceneLightingEffect
    // Note: Unlike the Win2D-based effects, SceneLightingEffect is a public Windows platform type, we can instatiate it directly via winrt.
    winrt::Microsoft::UI::Composition::Effects::SceneLightingEffect sceneLightingEffect;
    sceneLightingEffect.AmbientAmount(0.0f);
    sceneLightingEffect.DiffuseAmount(sc_diffuseAmountBorder);
    sceneLightingEffect.SpecularAmount(sc_specularAmountBorder);
    sceneLightingEffect.SpecularShine(sc_specularShineBorder);

    // (2) ColorMatrixEffect applied to 1
    auto colorMatrixEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorMatrixEffect>();
    colorMatrixEffect->ColorMatrix(isInverted ? sc_revealInvertedBorderColorMatrix : sc_revealBorderColorMatrix);
    colorMatrixEffect->AlphaMode(winrt::CanvasAlphaMode::Straight);
    colorMatrixEffect->Source(sceneLightingEffect);

    if (hasBaseColor)
    {
        // (3) Base Color Effect
        auto  baseColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
        baseColorEffect->Name(L"BaseColorEffect");
        // Set base color to 0 because we want to build one EffectFactory and cache it regardless of the different colors that
        // the app may choose. So make the factory have it as 0,0,0,0 and then we'll make it an animatable property and set it
        // immediately after we create it.
        baseColorEffect->Color({ 0,0,0,0 });

        // (4) Do a source over blend of (2) the color matrix with (3) the base color.
        auto compositeEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CompositeStepEffect>();
        compositeEffect->Mode(winrt::CanvasComposite::SourceOver);
        compositeEffect->Source(*colorMatrixEffect);
        compositeEffect->Destination(*baseColorEffect);

        return *compositeEffect;
    }
    else
    {
        // No base color, just return the color matrix effect.
        return *colorMatrixEffect;
    }
}

void CreateRevealBrush ( ) [protected]

Definition at line 487 of file RevealBrush.cpp.

{
    winrt::Compositor compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
    if (!IsInFallbackMode())
    {
        const auto color = Color();
        // If the color is ever not transparent black then start using the base color version of the effect.
        if (color.A != 0 || color.R != 0 || color.G != 0 || color.B != 0)
        {
            m_hasBaseColor = true;
        }

        EnsureNoiseBrush();

        const bool isInverted = m_isBorder && (TargetTheme() == winrt::ApplicationTheme::Light);
        const auto effectFactory = GetOrCreateRevealBrushCompositionEffectFactory(m_isBorder, isInverted, m_hasBaseColor, compositor);
        const winrt::CompositionEffectBrush revealBrush = effectFactory.CreateBrush();

        if (m_hasBaseColor)
        {
            // effectFactory is only a template and doesn't have correct color setting, change it
            revealBrush.Properties().InsertColor(L"BaseColorEffect.Color", color);
        }

        if (!m_isBorder)
        {
            // Set noise image source. The border brush is only used for a few pixels, and does not show banding, so it doesn't get noise.
            MUX_ASSERT(m_noiseBrush);
            revealBrush.SetSourceParameter(L"Noise", m_noiseBrush);
        }

        m_brush = revealBrush;
    }
    else
    {
        const auto fallbackColor = FallbackColor();

        if (fallbackColor.A == 0)
        {
            // fallback and transparent brush, set to nullptr for performance optimization
            m_brush = nullptr;
        }
        else
        {
            m_brush = compositor.CreateColorBrush(fallbackColor);
        }
    }

}

winrt::Windows::Graphics::Effects::IGraphicsEffect CreateRevealHoverEffect ( ) [static, protected]

Definition at line 324 of file RevealBrush.cpp.

{
    // We apply noise to the SceneLightingEffect to reduce banding artifacts, but we don't want the noise to show up with just
    // ambient lighting (when the brush doesn't have the pointer near it). Since the ambient contribution is a constant, we factor
    // it out to a separate ColorSourceEffect. We can then mask the SLE with a noise texture, combine that with the ambient color
    // effect, and use that in the rest of the effect graph:
    //
    //  (1) <ArithmeticCompositeEffect>
    //  (2)     <BaseColorEffect />
    //  (3)     <ColorMatrixEffect>
    //  (4)         <CompositeStepEffect>
    //  (5)             <ColorSourceEffect for ambient contribution/>
    //  (6)             <AlphaMaskEffect>
    //  (7)                 <SceneLightingEffect without ambient coefficient/>
    //  (8)                 <ColorMatrixEffect>
    //  (9)                     <BorderEffect>
    //                              <Noise texture in a brush />
    //                          </BorderEffect>
    //                      </ColorMatrixEffect>
    //                  </AlphaMaskEffect>
    //              </CompositeStepEffect>
    //          </ColorMatrixEffect>
    //      </ArithmeticCompositeEffect>
    winrt::Color initBaseColor{ 0, 0, 0, 0 };

    // (9) Noise image BorderEffect (infinitely tiles noise image)
    auto noiseBorderEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::BorderEffect>();
    noiseBorderEffect->ExtendX(winrt::CanvasEdgeBehavior::Wrap);
    noiseBorderEffect->ExtendY(winrt::CanvasEdgeBehavior::Wrap);
    winrt::CompositionEffectSourceParameter noiseEffectSourceParameter{ L"Noise" };
    noiseBorderEffect->Source(noiseEffectSourceParameter);

    // (8) ColorMatrixEffect applied to (9) to introduce alpha, to be used to mask the SceneLightingEffect
    auto noiseOpacityEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorMatrixEffect>();
    noiseOpacityEffect->ColorMatrix(sc_colorToAlphaMatrix);
    noiseOpacityEffect->AlphaMode(winrt::CanvasAlphaMode::Straight);
    noiseOpacityEffect->Source(*noiseBorderEffect);

    // (7) SceneLightingEffect
    // Note: Unlike the Win2D-based effects, SceneLightingEffect is a public Windows platform type, we can instatiate it directly via winrt.
    // No ambient coefficient. This SLE gets noise applied to it, and we don't want the ambient contribution to be affected by noise. The
    // ambient contribution will be added by a separate ColorSourceEffect.
    winrt::Microsoft::UI::Composition::Effects::SceneLightingEffect sceneLightingEffect;
    sceneLightingEffect.AmbientAmount(0);
    sceneLightingEffect.DiffuseAmount(sc_diffuseAmount);
    sceneLightingEffect.SpecularAmount(sc_specularAmount);
    sceneLightingEffect.SpecularShine(sc_specularShine);

    // (6) Alpha mask of (7) with (8)
    auto blendEffectOuter = winrt::make_self<Microsoft::UI::Private::Composition::Effects::AlphaMaskEffect>();
    blendEffectOuter->Source(sceneLightingEffect);
    blendEffectOuter->Mask(*noiseOpacityEffect);

    // (5) ColorSourceEffect
    auto colorSourceEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
    colorSourceEffect->Color(sc_ambientContributionColor);

    // (4) Composite of (5) with (6)
    auto compositeEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CompositeStepEffect>();
    compositeEffect->Mode(winrt::CanvasComposite::Add);
    compositeEffect->Destination(*colorSourceEffect);
    compositeEffect->Source(*blendEffectOuter);

    // (3) ColorMatrixEffect applied to (4)
    auto colorMatrixEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorMatrixEffect>();
    colorMatrixEffect->ColorMatrix(sc_luminanceToAlphaMatrix);
    colorMatrixEffect->AlphaMode(winrt::CanvasAlphaMode::Straight);
    colorMatrixEffect->Source(*compositeEffect);

    // (2) Base Color Effect
    auto baseColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
    baseColorEffect->Name(L"BaseColorEffect");
    baseColorEffect->Color(initBaseColor);

    // (1) Composite of (3) [source] with (2) [destination]
    auto arithmeticCompositeEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ArithmeticCompositeEffect>();
    arithmeticCompositeEffect->Source1Amount(2.0f);
    arithmeticCompositeEffect->Source2Amount(2.0f);
    arithmeticCompositeEffect->MultiplyAmount(-2.0f);
    arithmeticCompositeEffect->Offset(-1.0f);
    arithmeticCompositeEffect->Source1(*colorMatrixEffect);
    arithmeticCompositeEffect->Source2(*baseColorEffect);

    return *arithmeticCompositeEffect;
}

void EnsureNoiseBrush ( ) [private]

Definition at line 314 of file RevealBrush.cpp.

{
    auto noiseBrush = MaterialHelper::GetNoiseBrush();
    if (noiseBrush != m_noiseBrush)
    {
        m_noiseBrush = noiseBrush;
    }
    m_noiseChanged = false;
}

void EnsureProperties ( ) [static]

Reimplemented from RevealBrushProperties.

Definition at line 90 of file RevealBrush.cpp.

{
    RevealBrushProperties::EnsureProperties();
    if (!s_IsContainerProperty)
    {
        s_IsContainerProperty =
            InitializeDependencyProperty(
                L"IsContainer",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::RevealBrush>(),
                true /* isAttached */,
                box_value(false),
                &OnIsContainerPropertyChanged);
    }
}

winrt::UIElement GetAncestor ( const winrt::UIElement & root ) [static, private]

Definition at line 572 of file RevealBrush.cpp.

{
    auto current = root;
    auto parent = current;

    // Walk up to the highest element and hook up lights there.
    // If there is an ambient light anywhere on the path, we must have already
    // added the global lights required for Reveal, so return immediately.
    do
    {
        current = parent;
        parent = winrt::VisualTreeHelper::GetParent(current).as<winrt::UIElement>();
    } while (parent != nullptr);

    return current;
}

winrt::CompositionEffectFactory GetOrCreateRevealBrushCompositionEffectFactory | ( | bool | isBorder,
 |  | bool | isInverted,
 |  | bool | hasBaseColor,
 |  | const winrt::Compositor & | compositor |
 | ) |  |  | [private]

Definition at line 452 of file RevealBrush.cpp.

{
    auto effectFactory = MaterialHelper::GetOrCreateRevealBrushCompositionEffectFactoryFromCache(
        isBorder,
        isInverted,
        hasBaseColor,
        [isBorder, isInverted, hasBaseColor, &compositor]() {
            // Set up the effect chain for reveal
            winrt::IGraphicsEffect effect;
            if (isBorder)
            {
                effect = CreateRevealBorderEffect(isInverted, hasBaseColor);
            }
            else
            {
                effect = CreateRevealHoverEffect();
            }

            winrt::IVector<winrt::hstring> animatedProperties;
            if (hasBaseColor)
            {
                animatedProperties = winrt::make<Vector<winrt::hstring, MakeVectorParam<VectorFlag::None>()>>();
                animatedProperties.Append(L"BaseColorEffect.Color");
            }

            // Create the Comp effect Brush
            return compositor.CreateEffectFactory(effect, animatedProperties);
        });
    return effectFactory;
}

bool IsInFallbackMode ( ) [protected]

Definition at line 681 of file RevealBrush.cpp.

{
    return m_isInFallbackMode = m_isDisabledByMaterialPolicy || AlwaysUseFallback() || IsOnXboxAndNotMouseMode();
}

bool IsOnXboxAndNotMouseMode ( ) [static, private]

Definition at line 676 of file RevealBrush.cpp.

{
    return SharedHelpers::IsOnXbox() && !SharedHelpers::IsMouseModeEnabled();
}

void OnColorChanged ( ) [protected]
void OnConnected ( )

Definition at line 128 of file RevealBrush.cpp.

{
    // XCBB will use Fallback rendering, so do not run derived Brush code.
    if (SharedHelpers::IsInDesignMode()) { return; }

    MaterialHelper::OnRevealBrushConnected();

    if (!m_fallbackColorChangedToken.value)
    {
        m_fallbackColorChangedToken.value = RegisterPropertyChangedCallback(
            winrt::XamlCompositionBrushBase::FallbackColorProperty(), { this, &RevealBrush::OnFallbackColorChanged });
    }

    // Stay subscribed to NoiseChanged events when brush disconnected so that it gets marked to pick up new noise when (and if) it gets reconnected.
    if (!m_noiseChangedToken.value)
    {
        m_noiseChangedToken = MaterialHelper::NoiseChanged([this](auto sender) { OnNoiseChanged(sender); });
    }

    m_isConnected = true;
    m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });

    UpdateLightTargets(true /* ambientToo */);
    UpdateRevealBrush();
}

void OnDisconnected ( )

Definition at line 154 of file RevealBrush.cpp.

{
    if (SharedHelpers::IsInDesignMode()) { return; }

    m_isConnected = false;

    UpdateLightTargets(true /* ambientToo */);

    if (m_brush)
    {
        // Try for winrt::IClosable because MockDComp doesn't implement IClosable.
        if (auto closable = m_brush.try_as<winrt::IClosable>())
        {
            closable.Close();
        }
        m_brush = nullptr;
        CompositionBrush(nullptr);
    }

    if (m_fallbackColorChangedToken.value)
    {
        UnregisterPropertyChangedCallback(winrt::XamlCompositionBrushBase::FallbackColorProperty(), m_fallbackColorChangedToken.value);
        m_fallbackColorChangedToken.value = 0;
    }

    MaterialHelper::OnRevealBrushDisconnected();

    MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
    m_materialPolicyChangedToken.value = 0;
}

void OnFallbackColorChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [protected]

Definition at line 185 of file RevealBrush.cpp.

{
    // FallbackColor is used by RevealBrush to determine the solid color to use when we experience fallback due to policy.
    // If it changes dynamically and we're using the fallback brush, make sure we update it now.
    if (IsInFallbackMode())
    {
        UpdateLightTargets(false /* ambientToo */);
        UpdateRevealBrush();
    }
}

void OnIsContainerPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static, private]

Definition at line 686 of file RevealBrush.cpp.

{
    if (auto elementSender = sender.try_as<winrt::IUIElement>())
    {
        bool isAdding = unbox_value<bool>(args.NewValue());

        auto lights = elementSender.Lights();
        int i = 0;

        if (isAdding)
        {
            // add the hover light
            auto hoverLight = winrt::make_self<RevealHoverLight>();
            lights.Append(*hoverLight);

            // add the press light
            auto pressLight = winrt::make_self<RevealHoverLight>();
            pressLight->SetIsPressLight(true);
            lights.Append(*pressLight);
        }
        else
        {
            // Step through all of the lights
            for (auto light : lights)
            {
                if (auto self = light.try_as<winrt::RevealHoverLight>())
                {
                    // if we are in remove mode, remove all hover lights
                    lights.RemoveAt(i);
                }
                i++;
            }
        }
    }
}

void OnMaterialPolicyStatusChanged | ( | const com_ptr< MaterialHelperBase > & | sender,
 |  | bool | isDisabledByMaterialPolicy
 | ) |  |

Definition at line 299 of file RevealBrush.cpp.

{
    //PolicyStatusChangedHelper(isDisabledByMaterialPolicy); // Bug 24355584: DCPP: Reveal is disabled
    PolicyStatusChangedHelper(true);
}

void OnNoiseChanged ( const com_ptr< MaterialHelperBase > & sender )

Definition at line 305 of file RevealBrush.cpp.

{
    m_noiseChanged = true;
    if (m_isConnected)
    {
        UpdateRevealBrush();
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 196 of file RevealBrush.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_ColorProperty)
    {
        UpdateRevealBrush();
    }
    else if (property == s_TargetThemeProperty)
    {
        UpdateLightTargets(false /* ambientToo */);
        UpdateRevealBrush();
    }
    else if (property == s_AlwaysUseFallbackProperty)
    {
        UpdateLightTargets(false /* ambientToo */);
        UpdateRevealBrush();
    }
}

void OnStatePropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static]

Definition at line 724 of file RevealBrush.cpp.

{
    auto currentState = unbox_value<winrt::RevealBrushState>(args.OldValue());
    auto targetState = unbox_value<winrt::RevealBrushState>(args.NewValue());

    if (currentState == targetState)
    {
        return;
    }

    if (sender)
    {
        if (auto uiElement = sender.try_as<winrt::IUIElement>())
        {
            // If we transition to something other than Normal, see if we need to attach the hover light.
            if (targetState != winrt::RevealBrushState::Normal)
            {
                sender.SetValue(s_IsContainerProperty, box_value(true));
            }

            // Transition the Hover Light and the Pressed Light
            auto lights = uiElement.Lights();
            MUX_ASSERT(lights.Size() == 2);

            for (auto light : lights)
            {
                if (auto hoverLight = light.try_as<winrt::RevealHoverLight>())
                {
                    auto internalHoverLight = winrt::get_self<RevealHoverLight>(hoverLight);
                    internalHoverLight->GoToState(targetState);
                }
            }
        }
    }
}

void OnTargetThemeChanged ( ) [protected]
void PolicyStatusChangedHelper ( bool isDisabledByMaterialPolicy ) [private]

Definition at line 289 of file RevealBrush.cpp.

{
    m_isDisabledByMaterialPolicy = isDisabledByMaterialPolicy;
    if (m_isConnected)
    {
        UpdateLightTargets(true /* ambientToo */);
        UpdateRevealBrush();
    }
}

void RemoveTargetBrush ( const wstring_view & lightID ) [private]

Definition at line 216 of file RevealBrush.cpp.

{
    try
    {
        winrt::XamlLight::RemoveTargetBrush(lightID, *this);
    }
    catch (const winrt::hresult_error& e)
    {
        // RemoveTargetBrush can fail with RPC_E_WRONG_THREAD if called while the Xaml Core is being shutdown,
        // and there is evidence from Watson that such calls are made in real apps.
        // In this case, all the relationships between lights and brushes are going to be cleared as part of core shutdown,
        // so effectively all brush targets will be unset, so it's ok to ignore this error.
        if (e.to_abi() != RPC_E_WRONG_THREAD) { throw; }
    }
}

void StopAttachingLights ( ) [static]

Definition at line 546 of file RevealBrush.cpp.

{
    MaterialHelper::SetShouldBeginAttachingLights(false);
    MaterialHelper::SetShouldContinueAttachingLights(false);
    MaterialHelper::ResetFailedToAttachLightsCount();
}

void UpdateLightTargets ( bool ambientToo ) [protected]

Definition at line 232 of file RevealBrush.cpp.

{
    if (!m_isConnected || IsInFallbackMode())
    {
        // Untarget the brush by hover/border/ambient lights
        if (m_isBorder && m_isBorderLightSet)
        {
            auto currentLightId = TargetTheme() == winrt::ApplicationTheme::Light ?
                RevealBorderLight::GetLightThemeIdStatic() : RevealBorderLight::GetDarkThemeIdStatic();
            RemoveTargetBrush(currentLightId);
            m_isBorderLightSet = false;
        }
        else if (m_isHoverLightSet)
        {
            RemoveTargetBrush(RevealHoverLight::GetLightIdStatic());
            m_isHoverLightSet = false;
        }

        if (ambientToo && m_isAmbientLightSet)
        {
            RemoveTargetBrush(XamlAmbientLight::GetLightIdStatic());
            m_isAmbientLightSet = false;
        }
    }
    else
    {
        // Target the brush by hover/border/ambient lights
        if (m_isBorder)         // May need to switch border light so always referesh
        {
            auto oldLightId = RevealBorderLight::GetLightThemeIdStatic();
            auto newLightId = RevealBorderLight::GetDarkThemeIdStatic();
            if (TargetTheme() == winrt::ApplicationTheme::Light)
            {
                std::swap(oldLightId, newLightId);
            }
            if (m_isBorderLightSet)
            {
                RemoveTargetBrush(oldLightId);
                m_isBorderLightSet = false;
            }
            winrt::XamlLight::AddTargetBrush(newLightId, *this);
            m_isBorderLightSet = true;
        }
        else if (!m_isHoverLightSet)
        {
            winrt::XamlLight::AddTargetBrush(RevealHoverLight::GetLightIdStatic(), *this);
            m_isHoverLightSet = true;
        }

        if (ambientToo && !m_isAmbientLightSet)
        {
            winrt::XamlLight::AddTargetBrush(XamlAmbientLight::GetLightIdStatic(), *this);
            m_isAmbientLightSet = true;
        }
    }
}

void UpdateRevealBrush ( ) [protected]

Definition at line 537 of file RevealBrush.cpp.

{
    if (m_isConnected)
    {
        CreateRevealBrush();
    }
    CompositionBrush(m_brush);
}

bool ValidatePublicRootAncestor ( ) [static, private]

Definition at line 589 of file RevealBrush.cpp.

{
    auto windowRoot = winrt::Window::Current() ? winrt::Window::Current().Content() : nullptr;

    // On MUX + RS2, it's possible XCB::OnConnected is called before window has content.
    if (!windowRoot)
    {
        return false;
    }

    // Do some more checks to ensure we didn't put lights where we don't expect.
    // Either Window.Content is a Canvas, in which case it's the immediate child of the root visual and we should set lights
    // on it directly, or it isn't, in which case we should have walked up to the RootScrollViewer and set lights there.
    auto ancestor = GetAncestor(windowRoot);
    bool windowContentIsCanvas = static_cast<bool>(windowRoot.try_as<winrt::Canvas>());
    bool walkedUpToScrollViewer = winrt::VisualTreeHelper::GetParent(windowRoot) &&
        static_cast<bool>(ancestor.try_as<winrt::FxScrollViewer>());

    // On MUX + RS3/RS4, it's possible XCB::OnConnected is called before visual tree is constructed and the ancestor walk returns a false elemenet.
    return windowContentIsCanvas || walkedUpToScrollViewer;
}

Member Data Documentation

friend MaterialHelper [private]

Definition at line 19 of file RevealBrush.h.

friend RevealBrushTestApi [private]

Definition at line 18 of file RevealBrush.h.

GlobalDependencyProperty s_IsContainerProperty [static]

Definition at line 42 of file RevealBrush.h.

const winrt::Color sc_ambientContributionColor [static, protected]

Definition at line 66 of file RevealBrush.h.

const winrt::Matrix5x4 sc_colorToAlphaMatrix [static, protected]
Initial value:
{ 1.0f, 0.0f, 0.0f, 0.15f,
  0.0f, 1.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 1.0f, 0.0f,
  0.0f, 0.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 0.0f, 0.85f }

Definition at line 89 of file RevealBrush.h.

const winrt::Color sc_defaultColor [static]

Definition at line 46 of file RevealBrush.h.

const float sc_diffuseAmount [static, protected]

Definition at line 83 of file RevealBrush.h.

const float sc_diffuseAmountBorder [static, protected]

Definition at line 86 of file RevealBrush.h.

const winrt::Matrix5x4 sc_luminanceToAlphaMatrix [static, protected]

Definition at line 90 of file RevealBrush.h.

const float sc_specularAmount [static, protected]

Definition at line 84 of file RevealBrush.h.

const float sc_specularAmountBorder [static, protected]

Definition at line 87 of file RevealBrush.h.

const float sc_specularShine [static, protected]

Definition at line 85 of file RevealBrush.h.

const float sc_specularShineBorder [static, protected]

Definition at line 88 of file RevealBrush.h.

The documentation for this class was generated from the following files:
  • Materials/Reveal/RevealBrush.h
  • Materials/Reveal/RevealBrush.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBrushProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

RevealBrushProperties Class Reference

#include "RevealBrush.properties.h"

Inherited by RevealBrush.

List of all members.

Public Member Functions

RevealBrushProperties ()
void | AlwaysUseFallback (bool value)
bool | AlwaysUseFallback ()
winrt::Color | Color ()
void | Color (winrt::Color const &value)
void | TargetTheme (winrt::ApplicationTheme const &value)
winrt::ApplicationTheme | TargetTheme ()

Static Public Member Functions

static winrt::DependencyProperty | AlwaysUseFallbackProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | ColorProperty ()
static void | EnsureProperties ()
static winrt::RevealBrushState | GetState (winrt::UIElement const &target)
static void | OnAlwaysUseFallbackPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTargetThemePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | SetState (winrt::UIElement const &target, winrt::RevealBrushState const &value)
static winrt::DependencyProperty | StateProperty ()
static winrt::DependencyProperty | TargetThemeProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_AlwaysUseFallbackProperty
static GlobalDependencyProperty | s_ColorProperty
static GlobalDependencyProperty | s_StateProperty
static GlobalDependencyProperty | s_TargetThemeProperty

Detailed Description

Definition at line 7 of file RevealBrush.properties.h.

Constructor & Destructor Documentation

RevealBrushProperties ( )

Definition at line 21 of file RevealBrush.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void AlwaysUseFallback ( bool value )

Definition at line 106 of file RevealBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RevealBrush*>(this)->SetValue(s_AlwaysUseFallbackProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool AlwaysUseFallback ( )

Definition at line 114 of file RevealBrush.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<RevealBrush*>(this)->GetValue(s_AlwaysUseFallbackProperty));
}

static winrt::DependencyProperty AlwaysUseFallbackProperty ( ) [inline, static]

Definition at line 24 of file RevealBrush.properties.h.

{ return s_AlwaysUseFallbackProperty; }

void ClearProperties ( ) [static]

Reimplemented in RevealBrush.

Definition at line 74 of file RevealBrush.properties.cpp.

{
    s_AlwaysUseFallbackProperty = nullptr;
    s_ColorProperty = nullptr;
    s_StateProperty = nullptr;
    s_TargetThemeProperty = nullptr;
}

winrt::Color Color ( )

Definition at line 127 of file RevealBrush.properties.cpp.

{
    return ValueHelper<winrt::Color>::CastOrUnbox(static_cast<RevealBrush*>(this)->GetValue(s_ColorProperty));
}

void Color ( winrt::Color const & value )

Definition at line 119 of file RevealBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RevealBrush*>(this)->SetValue(s_ColorProperty, ValueHelper<winrt::Color>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ColorProperty ( ) [inline, static]

Definition at line 25 of file RevealBrush.properties.h.

{ return s_ColorProperty; }

void EnsureProperties ( ) [static]

Reimplemented in RevealBrush.

Definition at line 26 of file RevealBrush.properties.cpp.

{
    if (!s_AlwaysUseFallbackProperty)
    {
        s_AlwaysUseFallbackProperty =
            InitializeDependencyProperty(
                L"AlwaysUseFallback",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::RevealBrush>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnAlwaysUseFallbackPropertyChanged));
    }
    if (!s_ColorProperty)
    {
        s_ColorProperty =
            InitializeDependencyProperty(
                L"Color",
                winrt::name_of<winrt::Color>(),
                winrt::name_of<winrt::RevealBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::Color>::BoxValueIfNecessary(RevealBrush::sc_defaultColor),
                winrt::PropertyChangedCallback(&OnColorPropertyChanged));
    }
    if (!s_StateProperty)
    {
        s_StateProperty =
            InitializeDependencyProperty(
                L"State",
                winrt::name_of<winrt::RevealBrushState>(),
                winrt::name_of<winrt::RevealBrush>(),
                true /* isAttached */,
                ValueHelper<winrt::RevealBrushState>::BoxValueIfNecessary(winrt::RevealBrushState::Normal),
                &RevealBrush::OnStatePropertyChanged);
    }
    if (!s_TargetThemeProperty)
    {
        s_TargetThemeProperty =
            InitializeDependencyProperty(
                L"TargetTheme",
                winrt::name_of<winrt::ApplicationTheme>(),
                winrt::name_of<winrt::RevealBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::ApplicationTheme>::BoxValueIfNecessary(winrt::ApplicationTheme::Light),
                winrt::PropertyChangedCallback(&OnTargetThemePropertyChanged));
    }
}

winrt::RevealBrushState GetState ( winrt::UIElement const & target ) [static]

Definition at line 138 of file RevealBrush.properties.cpp.

{
    return ValueHelper<winrt::RevealBrushState>::CastOrUnbox(target.GetValue(s_StateProperty));
}

void OnAlwaysUseFallbackPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 82 of file RevealBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RevealBrush>();
    winrt::get_self<RevealBrush>(owner)->OnPropertyChanged(args);
}

void OnColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 90 of file RevealBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RevealBrush>();
    winrt::get_self<RevealBrush>(owner)->OnPropertyChanged(args);
}

void OnTargetThemePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 98 of file RevealBrush.properties.cpp.

{
    auto owner = sender.as<winrt::RevealBrush>();
    winrt::get_self<RevealBrush>(owner)->OnPropertyChanged(args);
}

void SetState | ( | winrt::UIElement const & | target,
 |  | winrt::RevealBrushState const & | value |
 | ) |  |  | [static]

Definition at line 133 of file RevealBrush.properties.cpp.

{
    target.SetValue(s_StateProperty, ValueHelper<winrt::RevealBrushState>::BoxValueIfNecessary(value));
}

static winrt::DependencyProperty StateProperty ( ) [inline, static]

Definition at line 26 of file RevealBrush.properties.h.

{ return s_StateProperty; }

winrt::ApplicationTheme TargetTheme ( )

Definition at line 151 of file RevealBrush.properties.cpp.

{
    return ValueHelper<winrt::ApplicationTheme>::CastOrUnbox(static_cast<RevealBrush*>(this)->GetValue(s_TargetThemeProperty));
}

void TargetTheme ( winrt::ApplicationTheme const & value )

Definition at line 143 of file RevealBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<RevealBrush*>(this)->SetValue(s_TargetThemeProperty, ValueHelper<winrt::ApplicationTheme>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TargetThemeProperty ( ) [inline, static]

Definition at line 27 of file RevealBrush.properties.h.

{ return s_TargetThemeProperty; }

Member Data Documentation

GlobalDependencyProperty s_AlwaysUseFallbackProperty [static]

Definition at line 29 of file RevealBrush.properties.h.

GlobalDependencyProperty s_ColorProperty [static]

Definition at line 30 of file RevealBrush.properties.h.

GlobalDependencyProperty s_StateProperty [static]

Definition at line 31 of file RevealBrush.properties.h.

GlobalDependencyProperty s_TargetThemeProperty [static]

Definition at line 32 of file RevealBrush.properties.h.

The documentation for this class was generated from the following files:
  • Generated/RevealBrush.properties.h
  • Generated/RevealBrush.properties.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBrushTestApi Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RevealBrushTestApi Class Reference

#include "RevealBrushTestApi.h"

Inherits ReferenceTracker< RevealBrushTestApi, winrt::implementation::RevealBrushTestApiT, winrt::composable >.

List of all members.

Public Member Functions

winrt::CompositionBrush | CompositionBrush ()
bool | IsAmbientLightSet ()
bool | IsBorderLightSet ()
bool | IsHoverLightSet ()
bool | IsInFallbackMode ()
winrt::CompositionBrush | NoiseBrush ()
winrt::RevealBrush | RevealBrush ()
void | RevealBrush (winrt::RevealBrush const &value)

Detailed Description

Definition at line 8 of file RevealBrushTestApi.h.

Member Function Documentation

winrt::CompositionBrush CompositionBrush ( )

Definition at line 41 of file RevealBrushTestApi.cpp.

{
    return (winrt::get_self<::RevealBrush>(m_revealBrush))->m_brush;
}

bool IsAmbientLightSet ( )

Definition at line 26 of file RevealBrushTestApi.cpp.

{
    return (winrt::get_self<::RevealBrush>(m_revealBrush))->m_isAmbientLightSet;
}

bool IsBorderLightSet ( )

Definition at line 31 of file RevealBrushTestApi.cpp.

{
    return (winrt::get_self<::RevealBrush>(m_revealBrush))->m_isBorderLightSet;
}

bool IsHoverLightSet ( )

Definition at line 36 of file RevealBrushTestApi.cpp.

{
    return (winrt::get_self<::RevealBrush>(m_revealBrush))->m_isHoverLightSet;
}

bool IsInFallbackMode ( )

Definition at line 21 of file RevealBrushTestApi.cpp.

{
    return (winrt::get_self<::RevealBrush>(m_revealBrush))->m_isInFallbackMode;
}

winrt::CompositionBrush NoiseBrush ( )

Definition at line 46 of file RevealBrushTestApi.cpp.

{
    return (winrt::get_self<::RevealBrush>(m_revealBrush))->m_noiseBrush;
}

winrt::RevealBrush RevealBrush ( )

Definition at line 11 of file RevealBrushTestApi.cpp.

{
    return m_revealBrush;
}

void RevealBrush ( winrt::RevealBrush const & value )

Definition at line 16 of file RevealBrushTestApi.cpp.

{
    m_revealBrush = value;
}

The documentation for this class was generated from the following files:
  • Materials/Reveal/RevealBrushTestApi.h
  • Materials/Reveal/RevealBrushTestApi.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealHoverLight Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes

RevealHoverLight Class Reference

#include "RevealHoverLight.h"

Inherits ReferenceTracker< RevealHoverLight, winrt::implementation::RevealHoverLightT >.

List of all members.

Public Member Functions

winrt::hstring | GetId ()
bool | GetIsPressLight ()
winrt::SpotLight | GetLight ()
void | GoToState (_In_ winrt::RevealBrushState newState)
void | OnConnected (winrt::UIElement const &newElement)
void | OnDisconnected (winrt::UIElement const &oldElement)
void | OnMaterialPolicyStatusChanged (const com_ptr< MaterialHelperBase > &sender, bool isDisabledByMaterialPolicy)
void | SetIsPressLight (bool isPressLight)

Static Public Member Functions

static winrt::hstring & | GetLightIdStatic ()

Static Public Attributes

static const float | s_constantAttenuation
static const float | s_linearAttenuation
static std::array
< RevealHoverSpotlightStateDesc,
RevealHoverSpotlightState_StateCount > 		s_pressSpotLightStates
static std::array
< RevealHoverSpotlightStateDesc,
RevealHoverSpotlightState_StateCount > 		s_revealHoverSpotlightStates

Protected Member Functions

void | InitializeImpl (_In_opt_ IInspectable *outer)

Private Types

enum | LightEvents { GotoNormal, GotoPointerOver, GotoPressed, AnimationComplete }
enum LightStates {
Off, AnimToHover, AnimToOff, Hover,
Pressing, FastRelease, SlowRelease
}

Private Member Functions

void | CancelCurrentPressStateContinuation ()
void | DisableHoverAnimation ()
void | EnableHoverAnimation ()
void | EnsureCompositionResources ()
winrt::ApplicationTheme | GetCurrentTheme (const winrt::UIElement &target)
void | GotoLightState (LightEvents e)
void | GotoLightStateHelper (LightStates target, bool skipAnimation=false)
void | OnPointerPressed (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | ReleaseCompositionResources ()
void | SwitchLight (bool turnOn)

Private Attributes

std::function< void()> | m_cancelCurrentPressStateContinuation
friend | MaterialHelper
friend | MaterialHelperBase
friend | RevealTestApi

Detailed Description

Definition at line 14 of file RevealHoverLight.h.

Member Enumeration Documentation

enum LightEvents [private]
Enumerator:
GotoNormal
GotoPointerOver
GotoPressed
AnimationComplete

Definition at line 63 of file RevealHoverLight.h.

{ GotoNormal, GotoPointerOver, GotoPressed, AnimationComplete };

enum LightStates [private]
Enumerator:
Off
AnimToHover
AnimToOff
Hover
Pressing
FastRelease
SlowRelease

Definition at line 62 of file RevealHoverLight.h.

{ Off, AnimToHover, AnimToOff, Hover, Pressing, FastRelease, SlowRelease };

Member Function Documentation

void CancelCurrentPressStateContinuation ( ) [private]

Definition at line 663 of file RevealHoverLight.cpp.

{
    if (m_cancelCurrentPressStateContinuation)
    {
        m_cancelCurrentPressStateContinuation();
        m_cancelCurrentPressStateContinuation = nullptr;
    }
}

void DisableHoverAnimation ( ) [private]

Definition at line 713 of file RevealHoverLight.cpp.

{
    if (m_compositionSpotLight && m_isHoverAnimationActive)
    {
        m_isHoverAnimationActive = false;
        m_compositionSpotLight.StopAnimation(L"Offset");
        m_compositionSpotLight.StopAnimation(L"OuterConeAngle");
    }
}

void EnableHoverAnimation ( ) [private]

Definition at line 703 of file RevealHoverLight.cpp.

{
    if (m_compositionSpotLight && !m_isHoverAnimationActive)
    {
        m_isHoverAnimationActive = true;
        m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
        m_compositionSpotLight.StartAnimation(L"OuterConeAngle", m_outerAngleAnimation);
    }
}

void EnsureCompositionResources ( ) [private]

Definition at line 196 of file RevealHoverLight.cpp.

{
    if (!m_compositionSpotLight)
    {
        if (auto element = m_targetElement.get())
        {
            auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

            m_compositionSpotLight = compositor.CreateSpotLight();
            CompositionLight(m_compositionSpotLight);

            // Set non-default constant values
            m_compositionSpotLight.ConstantAttenuation(s_constantAttenuation);
            m_compositionSpotLight.LinearAttenuation(s_linearAttenuation);

            // Not initializing these prevents spotlight from rendering
            m_compositionSpotLight.InnerConeAngleInDegrees(0);
            m_compositionSpotLight.OuterConeAngleInDegrees(0);

            // Set non-animatable initial state. In DBG mode, it can be adjusted via the PropertySet through RevealTestApi
            m_offsetProps = compositor.CreatePropertySet();
#if DBG
            m_offsetProps.InsertScalar(L"MinSize", s_lightMinSize);
            m_offsetProps.InsertScalar(L"MaxSize", s_lightMaxSize);
            m_offsetProps.InsertScalar(L"SizeAdjustment", s_sizeAdjustment);
            m_offsetProps.InsertScalar(L"PressOuterSize", s_pressOuterSize);
            m_offsetProps.InsertScalar(L"SpotlightHeight", s_spotlightHeight);
#endif

            m_offsetAnimation = compositor.CreateExpressionAnimation(c_CenteredOffsetExpression);
            m_offsetAnimation.SetReferenceParameter(L"props", m_offsetProps);

            m_outerAngleAnimation = compositor.CreateExpressionAnimation(m_isPressLight ? c_PressOuterAngleExpression : c_OuterAngleExpression);
            m_outerAngleAnimation.SetReferenceParameter(L"props", m_offsetProps);

            m_colorsProxy = CreateSpotLightColorsProxy(m_compositionSpotLight);

            // hook into PointerPressed event so we know if pressed is invoked by mouse/touch versus keyboard
            m_elementPointerPressedEventHandler = winrt::box_value<winrt::PointerEventHandler>({ this, &RevealHoverLight::OnPointerPressed });
            element.AddHandler(winrt::UIElement::PointerPressedEvent(), m_elementPointerPressedEventHandler, true);

            // Set animatable initial state
#if DBG
            m_spotLightStates = m_isPressLight ? s_pressSpotLightStates.data() : s_revealHoverSpotlightStates.data();
#else
            m_spotLightStates = m_isPressLight ? sc_pressSpotLightStates.data() : sc_revealHoverSpotlightStates.data();
#endif
            SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToOff]);

            m_pointer = winrt::ElementCompositionPreview::GetPointerPositionPropertySet(element);
            const auto elementVisual = winrt::ElementCompositionPreview::GetElementVisual(element);

            m_offsetAnimation.SetReferenceParameter(L"pointer", m_pointer);
            m_offsetAnimation.SetReferenceParameter(L"visual", elementVisual);
            m_outerAngleAnimation.SetReferenceParameter(L"visual", elementVisual);

            if (m_shouldLightBeOn)
            {
                SwitchLight(true);
            }
        }
    }
}

winrt::ApplicationTheme GetCurrentTheme ( const winrt::UIElement & target ) [private]
winrt::hstring GetId ( )

Definition at line 169 of file RevealHoverLight.cpp.

{
    return GetLightIdStatic();
}

bool GetIsPressLight ( ) [inline]

Definition at line 33 of file RevealHoverLight.h.

{ return m_isPressLight; }

winrt::SpotLight GetLight ( ) [inline]

Definition at line 34 of file RevealHoverLight.h.

{ return m_compositionSpotLight; } // For test APIs

winrt::hstring & GetLightIdStatic ( ) [static]

Definition at line 163 of file RevealHoverLight.cpp.

{
    static winrt::hstring s_RevealHoverLightId{ MUXCONTROLSMEDIA_NAMESPACE_STR L".RevealHoverLight" };
    return s_RevealHoverLightId;
}

void GotoLightState ( LightEvents e ) [private]

Definition at line 323 of file RevealHoverLight.cpp.

{
    // Update pointer flags before transitioning to the next state
    switch (e)
    {
    case LightEvents::GotoNormal:
    {
        m_centerLight = true;
        m_isPointerOver = false;
        m_isPressed = false;
    }
    break;

    case LightEvents::GotoPointerOver:
    {
        m_centerLight = false;
        m_isPointerOver = true;
        m_isPressed = false;
    }
    break;

    case LightEvents::GotoPressed:
    {
        m_isPressed = true;
    }
    break;
    case LightEvents::AnimationComplete:
        break;
    }

    const auto initState = m_currentLightState;
    switch (initState)
    {
    case LightStates::Off:
        switch (e)
        {
        case LightEvents::GotoNormal:
            break;
        case LightEvents::GotoPointerOver:
            GotoLightStateHelper(LightStates::AnimToHover);
            break;
        case LightEvents::GotoPressed:
            GotoLightStateHelper(LightStates::Pressing);
            break;
        case LightEvents::AnimationComplete:
            break;
        }
        break;

    case LightStates::AnimToHover:
        switch (e)
        {
        case LightEvents::GotoNormal:
            GotoLightStateHelper(LightStates::AnimToOff);
            break;
        case LightEvents::GotoPointerOver:
            break;
        case LightEvents::GotoPressed:
            GotoLightStateHelper(LightStates::Pressing);
            break;
        case LightEvents::AnimationComplete:
            GotoLightStateHelper(LightStates::Hover);
            break;
        }
        break;

    case LightStates::AnimToOff:
        switch (e)
        {
        case LightEvents::GotoNormal:
            break;
        case LightEvents::GotoPointerOver:
            GotoLightStateHelper(LightStates::AnimToHover);
            break;
        case LightEvents::GotoPressed:
            GotoLightStateHelper(LightStates::Pressing);
            break;
        case LightEvents::AnimationComplete:
            GotoLightStateHelper(LightStates::Off);
            break;
        }
        break;

    case LightStates::Hover:
        switch (e)
        {
        case LightEvents::GotoNormal:
            GotoLightStateHelper(LightStates::AnimToOff);
            break;
        case LightEvents::GotoPointerOver:
            break;
        case LightEvents::GotoPressed:
            GotoLightStateHelper(LightStates::Pressing);
            break;
        case LightEvents::AnimationComplete:
            break;
        }
        break;

    case LightStates::Pressing:
    {
        // Once the press is done, we always reset to pointer-based offset
        if (m_compositionSpotLight)
        {
            m_offsetAnimation.Expression(c_PointerOffsetExpression);
            m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
        }

        switch (e)
        {
        case LightEvents::GotoNormal:
            GotoLightStateHelper(LightStates::AnimToOff);
            break;
        case LightEvents::GotoPointerOver:
            break;
        case LightEvents::GotoPressed:
        {
            // This indicates a press, then release then press again while the first press animation is still going
            GotoLightStateHelper(LightStates::AnimToHover, true);
            GotoLightStateHelper(LightStates::Pressing);
        }
        break;
        case LightEvents::AnimationComplete:
        {
            if (m_isPressed)
            {
                GotoLightStateHelper(LightStates::SlowRelease);
            }
            else
            {
                GotoLightStateHelper(LightStates::FastRelease);
            }
        }
        break;
        }
    }
    break;

    case LightStates::FastRelease:
        switch (e)
        {
        case LightEvents::GotoNormal:
            GotoLightStateHelper(LightStates::AnimToOff);
            break;
        case LightEvents::GotoPointerOver:
            break;
        case LightEvents::GotoPressed:
            // This indicates a press, then release then press again while the first press animation is still going
            GotoLightStateHelper(LightStates::AnimToHover, true);
            GotoLightStateHelper(LightStates::Pressing);
            break;
        case LightEvents::AnimationComplete:
            if (!m_isPressed && m_isPointerOver)
            {
                GotoLightStateHelper(LightStates::AnimToHover, true);
            }
            break;
        }
        break;

    case LightStates::SlowRelease:
        switch (e)
        {
        case LightEvents::GotoNormal:
            GotoLightStateHelper(LightStates::AnimToOff);
            break;
        case LightEvents::GotoPointerOver:
            // This indicates a semi-long press, where button is released before it's done. Complete it with a FastRelease animation.
            GotoLightStateHelper(LightStates::FastRelease);
            break;
        case LightEvents::GotoPressed:
            // This indicates a press, then release then press again while the first press animation is still going
            GotoLightStateHelper(LightStates::AnimToHover, true);
            GotoLightStateHelper(LightStates::Pressing);
            break;
        case LightEvents::AnimationComplete:
            if (!m_isPressed && m_isPointerOver)
            {
                GotoLightStateHelper(LightStates::AnimToHover, true);
            }
            break;
        }
        break;
    }
}

void GotoLightStateHelper | ( | LightStates | target,
 |  | bool | skipAnimation = false |
 | ) |  |  | [private]

Definition at line 509 of file RevealHoverLight.cpp.

{
    CancelCurrentPressStateContinuation();

    m_currentLightState = target;

    switch (target)
    {
    case LightStates::Off:
    {
        SwitchLight(false);
    }
    break;

    case LightStates::AnimToOff:
    {
        SwitchLight(true);

        if (skipAnimation)
        {
            SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToOff]);
            GotoLightState(LightEvents::AnimationComplete);
        }
        else
        {
            PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToOff], &m_cancelCurrentPressStateContinuation, [=]
                {
                    GotoLightState(LightEvents::AnimationComplete);
                });
        }
    }
    break;

    case LightStates::AnimToHover:
    {
        if (m_compositionSpotLight)
        {
            m_offsetAnimation.Expression(c_PointerOffsetExpression);
            m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
        }

        SwitchLight(true);

        if (skipAnimation)
        {
            SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToHover]);
            GotoLightState(LightEvents::AnimationComplete);
        }
        else
        {
            PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToHover], &m_cancelCurrentPressStateContinuation, [=]
                {
                    GotoLightState(LightEvents::AnimationComplete);
                });
        }
    }
    break;

    case LightStates::Hover:
    {
        SwitchLight(true);
    }
    break;

    case LightStates::Pressing:
    {
        if (m_compositionSpotLight)
        {
            auto targetControl = m_targetElement.get().try_as<winrt::Control>();

            // m_targetElement can be Grid or other kind of element which is not a control.
            // In this case, we only check m_centerLight, and set focusState directly to keyboard.
            // This is not a perfect solution, The light may appear in the wrong place if apps
            // apply RevealBrush.State to elements really deep in the template:
            // m_centerLight alone is not correct if reveal light is added on Pressed(as usually happens for touch),
            // in that case the light misses the PointerPressed event since it's not yet hooked up at that time,
            // and we will still do keyboard placement.

            // To avoid these types of cases, we should suggest customer that RevealState is always applied to immediate child of a Control
            // Like below, we add UserControl:
            //  <Grid><UserControl><Border Name="myBorderElement"></Border></UserControl></Grid>
            //  then RevealBrush::SetState(myBorderElement, RevealBrushState::Pressed);
            auto const focusState = targetControl ? targetControl.FocusState() : winrt::FocusState::Keyboard;

            // Only center the hover light if the element has KB focus and to the best of our knowledge
            // it is the keyboard and not pointer that's responsible for current press.
            if (focusState == winrt::FocusState::Keyboard && m_centerLight)
            {
                m_offsetAnimation.Expression(c_CenteredOffsetExpression);
                m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
            }
            else
            {
                m_offsetAnimation.Expression(c_PointerOffsetExpression);
                m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
            }
        }
        SwitchLight(true);

        if (skipAnimation)
        {
            SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_Pressing]);
            GotoLightState(LightEvents::AnimationComplete);
        }
        else
        {
            PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_Pressing], &m_cancelCurrentPressStateContinuation, [=]
                {
                    GotoLightState(LightEvents::AnimationComplete);
                });
        }
    }
    break;

    case LightStates::FastRelease:
    {
        SwitchLight(true);

        if (skipAnimation)
        {
            SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_FastRelease]);
            GotoLightState(LightEvents::AnimationComplete);
        }
        else
        {
            PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_FastRelease], &m_cancelCurrentPressStateContinuation, [=]
                {
                    GotoLightState(LightEvents::AnimationComplete);
                });
        }
    }
    break;

    case LightStates::SlowRelease:
    {
        SwitchLight(true);

        if (skipAnimation)
        {
            SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_SlowRelease]);
            GotoLightState(LightEvents::AnimationComplete);
        }
        else
        {
            PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_SlowRelease], &m_cancelCurrentPressStateContinuation, [=]
                {
                    GotoLightState(LightEvents::AnimationComplete);
                });
        }
    }
    break;
    }
}

void GoToState ( _In_ winrt::RevealBrushState newState )

Definition at line 301 of file RevealHoverLight.cpp.

{
    switch (newState)
    {
    case winrt::RevealBrushState::Normal:
        GotoLightState(LightEvents::GotoNormal);
        break;
    case winrt::RevealBrushState::PointerOver:
        GotoLightState(LightEvents::GotoPointerOver);
        break;
    case winrt::RevealBrushState::Pressed:
        GotoLightState(LightEvents::GotoPressed);
        break;
    }
}

void InitializeImpl ( _In_opt_ IInspectable * outer ) [protected]
void OnConnected ( winrt::UIElement const & newElement )

Definition at line 174 of file RevealHoverLight.cpp.

{
    m_targetElement = winrt::make_weak(newElement);

    m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });

    if (!m_isDisabledByMaterialPolicy)
    {
        EnsureCompositionResources();
    }
}

void OnDisconnected ( winrt::UIElement const & oldElement )

Definition at line 186 of file RevealHoverLight.cpp.

{
    ReleaseCompositionResources();

    m_targetElement = nullptr;

    MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
    m_materialPolicyChangedToken.value = 0;
}

void OnMaterialPolicyStatusChanged | ( | const com_ptr< MaterialHelperBase > & | sender,
 |  | bool | isDisabledByMaterialPolicy
 | ) |  |

Definition at line 294 of file RevealHoverLight.cpp.

{
    // MaterialHelper::LightPolicyChangedHelper<RevealHoverLight>(this, isDisabledByMaterialPolicy); // Bug 24355584: DCPP: Reveal is disabled
    MaterialHelper::LightPolicyChangedHelper<RevealHoverLight>(this, true);

}

void OnPointerPressed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 672 of file RevealHoverLight.cpp.

{
    m_centerLight = false;

    // Sometimes we get pointer pressed after the VSM has already gone to the pressed state. Handle that case by
    // updating the expression if we get these out of sequence.
    if (m_isPressed && m_compositionSpotLight)
    {
        m_offsetAnimation.Expression(c_PointerOffsetExpression);
        m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
    }
}

void ReleaseCompositionResources ( ) [private]

Definition at line 260 of file RevealHoverLight.cpp.

{
    CancelCurrentPressStateContinuation();

    if (m_targetElement)
    {
        auto element = m_targetElement.get();

        if (m_elementPointerPressedEventHandler)
        {
            // clean up PointerPressed event
            element.RemoveHandler(winrt::UIElement::PointerPressedEvent(), m_elementPointerPressedEventHandler);
        }
    }
    m_elementPointerPressedEventHandler = nullptr;

    DisableHoverAnimation();
    m_offsetAnimation = nullptr;
    m_outerAngleAnimation = nullptr;
    m_compositionSpotLight = nullptr;

    if (m_pointer)
    {
        m_pointer.Close();
        m_pointer = nullptr;
    }

    m_colorsProxy = nullptr;
    m_offsetAnimation = nullptr;
    m_offsetProps = nullptr;

    CompositionLight(nullptr);
}

void SetIsPressLight ( bool isPressLight ) [inline]

Definition at line 32 of file RevealHoverLight.h.

{ m_isPressLight = isPressLight; }

void SwitchLight ( bool turnOn ) [private]

Definition at line 686 of file RevealHoverLight.cpp.

{
    if (m_compositionSpotLight && (!m_cancelCurrentPressStateContinuation || turnOn))
    {
        m_shouldLightBeOn = turnOn;
        m_shouldLightBeOn ? EnableHoverAnimation() : DisableHoverAnimation();

        m_colorsProxy.InsertScalar(L"LightIntensity", turnOn ? 1.f : 0.f);

        // Also use the more performanant IsEnabled property if it is available (RS4+).
        if (auto lightWithEnabledProperty = m_compositionSpotLight.try_as<winrt::ICompositionLight3>())
        {
            lightWithEnabledProperty.IsEnabled(turnOn);
        }
    }
}

Member Data Documentation

std::function<void()> m_cancelCurrentPressStateContinuation [private]

Definition at line 81 of file RevealHoverLight.h.

friend MaterialHelper [private]

Definition at line 19 of file RevealHoverLight.h.

friend MaterialHelperBase [private]

Definition at line 18 of file RevealHoverLight.h.

friend RevealTestApi [private]

Definition at line 17 of file RevealHoverLight.h.

const float s_constantAttenuation [static]

Definition at line 50 of file RevealHoverLight.h.

const float s_linearAttenuation [static]

Definition at line 51 of file RevealHoverLight.h.

std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> s_pressSpotLightStates [static]

Definition at line 55 of file RevealHoverLight.h.

std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> s_revealHoverSpotlightStates [static]

Definition at line 54 of file RevealHoverLight.h.

The documentation for this class was generated from the following files:
  • Lights/RevealHoverLight.h
  • Lights/RevealHoverLight.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealHoverSpotlightAnimationInfo< ValueType > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealHoverSpotlightAnimationInfo< ValueType > Struct Template Reference

#include "SpotLightStateHelper.h"

Detailed Description

template<typename ValueType>
struct RevealHoverSpotlightAnimationInfo< ValueType >

Definition at line 54 of file SpotLightStateHelper.h.

The documentation for this struct was generated from the following file:
  • Lights/SpotLightStateHelper.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealHoverSpotlightStateDesc Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

RevealHoverSpotlightStateDesc Struct Reference

#include "SpotLightStateHelper.h"

List of all members.

Public Attributes

RevealHoverSpotlightAnimationInfo
< winrt::Color > 		InnerConeColor
RevealHoverSpotlightAnimationInfo
< float > 		InnerConeIntensity
RevealHoverSpotlightAnimationInfo
< float > 		OuterAngleScale
RevealHoverSpotlightAnimationInfo
< winrt::Color > 		OuterConeColor
RevealHoverSpotlightAnimationInfo
< float > 		OuterConeIntensity

Detailed Description

Definition at line 64 of file SpotLightStateHelper.h.

Member Data Documentation

RevealHoverSpotlightAnimationInfo<winrt::Color> InnerConeColor

Definition at line 66 of file SpotLightStateHelper.h.

RevealHoverSpotlightAnimationInfo<float> InnerConeIntensity

Definition at line 68 of file SpotLightStateHelper.h.

RevealHoverSpotlightAnimationInfo<float> OuterAngleScale

Definition at line 70 of file SpotLightStateHelper.h.

RevealHoverSpotlightAnimationInfo<winrt::Color> OuterConeColor

Definition at line 67 of file SpotLightStateHelper.h.

RevealHoverSpotlightAnimationInfo<float> OuterConeIntensity

Definition at line 69 of file SpotLightStateHelper.h.

The documentation for this struct was generated from the following file:
  • Lights/SpotLightStateHelper.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealListViewItemPresenter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

RevealListViewItemPresenter Class Reference

#include "RevealListViewItemPresenter.h"

Inherits ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT >.

List of all members.

Public Member Functions

bool GoToElementStateCore (winrt::hstring const &stateName, bool useTransitions)

Detailed Description

Definition at line 8 of file RevealListViewItemPresenter.h.

Member Function Documentation

bool GoToElementStateCore | ( | winrt::hstring const & | stateName,
 |  | bool | useTransitions
 | ) |  |

Definition at line 9 of file RevealListViewItemPresenter.cpp.

{
    RevealBrush::EnsureProperties();

    const auto goToState = [this](winrt::RevealBrushState state) {
        SetValue(RevealBrush::s_StateProperty, box_value(state));
    };

    // Handle all of the states in the ListViewItemPresenter "Common" state group.
    if (state == L"Normal" || state == L"Selected" || state == L"Disabled")
    {
        goToState(winrt::RevealBrushState::Normal);
    }
    else if (state == L"PointerOver" || state == L"PointerOverSelected")
    {
        goToState(winrt::RevealBrushState::PointerOver);
    }
    else if (state == L"Pressed" || state == L"PointerOverPressed" || state == L"PressedSelected")
    {
        goToState(winrt::RevealBrushState::Pressed);
    }

    return __super::GoToElementStateCore(state, useTransitions);
}

The documentation for this class was generated from the following files:
  • Materials/Reveal/RevealListViewItemPresenter.h
  • Materials/Reveal/RevealListViewItemPresenter.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealTestApi Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions

RevealTestApi Class Reference

#include "RevealTestApi.h"

Inherits ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable >.

List of all members.

Public Member Functions

RevealTestApi ()
winrt::SpotLight | BackgroundLight ()
double | BackgroundLightMaxSize ()
void | BackgroundLightMaxSize (double value)
double | BackgroundLightMinSize ()
void | BackgroundLightMinSize (double value)
winrt::XamlLight | BorderLight ()
bool | BorderLight_ShouldBeOn (winrt::RevealBorderLight const &value)
winrt::XamlLight | BorderWideLight ()
winrt::RevealBorderLight | GetAsRevealBorderLight (winrt::XamlLight const &value)
winrt::RevealHoverLight | GetAsRevealHoverLight (winrt::XamlLight const &value)
winrt::ExpressionAnimation | GetHoverLightOffsetExpression (winrt::RevealHoverLight const &value)
winrt::SpotLight | GetSpotLight (winrt::XamlLight const &value)
bool | HoverLight_IsPointerOver (winrt::RevealHoverLight const &value)
bool | HoverLight_IsPressed (winrt::RevealHoverLight const &value)
bool | HoverLight_ShouldBeOn (winrt::RevealHoverLight const &value)
void | TargetTheme (winrt::ApplicationTheme const &value)
winrt::ApplicationTheme | TargetTheme ()

Static Public Member Functions

static winrt::SpotLight | GetBackgroundSpotlightProxy (winrt::ApplicationTheme theme)

Private Member Functions

winrt::XamlLight | GetWindowLightAt (uint32_t i)

Detailed Description

Definition at line 8 of file RevealTestApi.h.

Constructor & Destructor Documentation

RevealTestApi ( )

Definition at line 12 of file RevealTestApi.cpp.

{
    MUXControlsFactory::EnsureInitialized(); // Just in case we are called earlier than app initialization.
}

Member Function Documentation

winrt::SpotLight BackgroundLight ( )

Definition at line 44 of file RevealTestApi.cpp.

{
    return GetBackgroundSpotlightProxy(m_targetTheme);
}

double BackgroundLightMaxSize ( )

Definition at line 85 of file RevealTestApi.cpp.

{
#if DBG
    return RevealHoverLight::s_lightMaxSize;
#else
    return 0;
#endif
}

void BackgroundLightMaxSize ( double value )

Definition at line 94 of file RevealTestApi.cpp.

{
#if DBG
    RevealHoverLight::s_lightMaxSize = (float)value;
#endif
}

double BackgroundLightMinSize ( )

Definition at line 69 of file RevealTestApi.cpp.

{
#if DBG
    return RevealHoverLight::s_lightMinSize;
#else
    return 0;
#endif
}

void BackgroundLightMinSize ( double value )

Definition at line 78 of file RevealTestApi.cpp.

{
#if DBG
    RevealHoverLight::s_lightMinSize = (float)value;
#endif
}

winrt::XamlLight BorderLight ( )

Definition at line 49 of file RevealTestApi.cpp.

{
    return GetWindowLightAt((m_targetTheme == winrt::ApplicationTheme::Light) ? 0 : 2);
}

bool BorderLight_ShouldBeOn ( winrt::RevealBorderLight const & value )

Definition at line 121 of file RevealTestApi.cpp.

{
    return winrt::get_self<RevealBorderLight>(value)->GetShouldLightBeOn();
}

winrt::XamlLight BorderWideLight ( )

Definition at line 54 of file RevealTestApi.cpp.

{
    return GetWindowLightAt((m_targetTheme == winrt::ApplicationTheme::Light) ? 1 : 3);
}

winrt::RevealBorderLight GetAsRevealBorderLight ( winrt::XamlLight const & value )

Definition at line 111 of file RevealTestApi.cpp.

{
    return value.as<winrt::RevealBorderLight>();
}

winrt::RevealHoverLight GetAsRevealHoverLight ( winrt::XamlLight const & value )

Definition at line 116 of file RevealTestApi.cpp.

{
    return value.as<winrt::RevealHoverLight>();
}

winrt::SpotLight GetBackgroundSpotlightProxy ( winrt::ApplicationTheme theme ) [static]

Definition at line 146 of file RevealTestApi.cpp.

{
#if DBG
    int index = std::clamp((int)theme, 0, 1);
    if (!s_backgroundSpotlightProxy[index])
    {
        auto light = s_backgroundSpotlightProxy[index] = winrt::CompositionTarget::GetCompositorForCurrentThread().CreateSpotLight();

        light.InnerConeAngleInDegrees(RevealHoverLight::s_innerConeAngleInDegrees);
        light.OuterConeAngleInDegrees(RevealHoverLight::s_outerConeAngleInDegrees);
        light.ConstantAttenuation(RevealHoverLight::s_constantAttenuation);
        light.InnerConeColor(RevealHoverLight::s_revealHoverSpotlightStates[RevealHoverSpotlightState_AnimToOff].InnerConeColor.Value);
        light.OuterConeColor(RevealHoverLight::s_revealHoverSpotlightStates[RevealHoverSpotlightState_AnimToOff].OuterConeColor.Value);

        s_pointerMovedRevoker = winrt::CoreWindow::GetForCurrentThread().PointerMoved(winrt::auto_revoke,
            [=](const winrt::CoreWindow&, const ::winrt::Windows::UI::Core::PointerEventArgs&)
            {
                RevealHoverLight::s_revealHoverSpotlightStates[RevealHoverSpotlightState_AnimToOff].InnerConeColor.Value = light.InnerConeColor();
                RevealHoverLight::s_revealHoverSpotlightStates[RevealHoverSpotlightState_AnimToOff].OuterConeColor.Value = light.OuterConeColor();
            });
    }

    return s_backgroundSpotlightProxy[index];
#else
    return nullptr;
#endif
}

winrt::ExpressionAnimation GetHoverLightOffsetExpression ( winrt::RevealHoverLight const & value )

Definition at line 106 of file RevealTestApi.cpp.

{
    return winrt::get_self<RevealHoverLight>(value)->m_offsetAnimation;
}

winrt::SpotLight GetSpotLight ( winrt::XamlLight const & value )

Definition at line 101 of file RevealTestApi.cpp.

{
    return value.as<winrt::IXamlLightProtected>().CompositionLight().as<winrt::SpotLight>();
}

winrt::XamlLight GetWindowLightAt ( uint32_t i ) [private]

Definition at line 17 of file RevealTestApi.cpp.

{
    auto root = winrt::Window::Current() ? winrt::Window::Current().Content() : nullptr;
    if (root)
    {
        // Walk up to find the lights.
        auto current = root;
        auto parent = current;
        do
        {
            current = parent;
            parent = winrt::VisualTreeHelper::GetParent(current).as<winrt::UIElement>();
        } while (parent != nullptr);

        winrt::XamlLight light = nullptr;
        if (auto lights = current.Lights())
        {
            light = lights.GetAt(i);
        }

        return light;
    }

    return nullptr;
}

bool HoverLight_IsPointerOver ( winrt::RevealHoverLight const & value )

Definition at line 136 of file RevealTestApi.cpp.

{
    return winrt::get_self<RevealHoverLight>(value)->m_isPointerOver;
}

bool HoverLight_IsPressed ( winrt::RevealHoverLight const & value )

Definition at line 131 of file RevealTestApi.cpp.

{
    return winrt::get_self<RevealHoverLight>(value)->m_isPressed;
}

bool HoverLight_ShouldBeOn ( winrt::RevealHoverLight const & value )

Definition at line 126 of file RevealTestApi.cpp.

{
    return winrt::get_self<RevealHoverLight>(value)->m_shouldLightBeOn;
}

void TargetTheme ( winrt::ApplicationTheme const & value )

Definition at line 64 of file RevealTestApi.cpp.

{
    m_targetTheme = value;
}

winrt::ApplicationTheme TargetTheme ( )

Definition at line 59 of file RevealTestApi.cpp.

{
    return m_targetTheme;
}

The documentation for this class was generated from the following files:
  • Lights/RevealTestApi.h
  • Lights/RevealTestApi.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Rgb Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

Rgb Class Reference

#include "ColorConversion.h"

List of all members.

Public Member Functions

Rgb ()
Rgb (double r, double g, double b)

Detailed Description

Definition at line 9 of file ColorConversion.h.

Constructor & Destructor Documentation

Rgb ( )
Rgb | ( | double | r,
 |  | double | g,
 |  | double | b
 | ) |  |

Definition at line 9 of file ColorConversion.cpp.

: r{ r }, g{ g }, b{ b }

The documentation for this class was generated from the following files:
  • Common/ColorConversion.h
  • Common/ColorConversion.cpp
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventHandler_revoker Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

RoutedEventHandler_revoker Struct Reference

#include "RoutedEventHelpers.h"

List of all members.

Public Member Functions

RoutedEventHandler_revoker () noexcept
RoutedEventHandler_revoker (RoutedEventHandler_revoker const &)
RoutedEventHandler_revoker (RoutedEventHandler_revoker &&other) noexcept
RoutedEventHandler_revoker (winrt::UIElement const &object, winrt::RoutedEvent event, winrt::IInspectable handler)
~RoutedEventHandler_revoker () noexcept
operator bool () const noexcept
RoutedEventHandler_revoker & | operator= (RoutedEventHandler_revoker &&other) noexcept
RoutedEventHandler_revoker & | operator= (RoutedEventHandler_revoker const &)
void | revoke () noexcept

Private Member Functions

void | move_from (RoutedEventHandler_revoker &other)

Private Attributes

weak_ref< winrt::UIElement > | m_object
winrt::RoutedEvent m_event | nullptr

Detailed Description

Definition at line 15 of file RoutedEventHelpers.h.

Constructor & Destructor Documentation

RoutedEventHandler_revoker ( )
RoutedEventHandler_revoker ( RoutedEventHandler_revoker const & )
RoutedEventHandler_revoker ( RoutedEventHandler_revoker && other ) [inline]

Definition at line 20 of file RoutedEventHelpers.h.

    {
        move_from(other);
    }

RoutedEventHandler_revoker | ( | winrt::UIElement const & | object,
 |  | winrt::RoutedEvent | event,
 |  | winrt::IInspectable | handler |
 | ) |  |  | [inline]

Definition at line 31 of file RoutedEventHelpers.h.

                                                                                :
        m_object(object),
        m_event(std::move(event)),
        m_handler(std::move(handler))
    {}

~RoutedEventHandler_revoker ( ) [inline]

Definition at line 37 of file RoutedEventHelpers.h.

    {
        revoke();
    }

Member Function Documentation

void move_from ( RoutedEventHandler_revoker & other ) [inline, private]

Definition at line 62 of file RoutedEventHelpers.h.

    {
        if (this != &other)
        {
            revoke();
            std::swap(m_object, other.m_object);
            std::swap(m_event, other.m_event);
            std::swap(m_handler, other.m_handler);
        }
    }

operator bool ( ) const [inline, explicit]

Definition at line 57 of file RoutedEventHelpers.h.

    {
        return static_cast<bool>(m_object);
    }

RoutedEventHandler_revoker& operator= ( RoutedEventHandler_revoker && other ) [inline]

Definition at line 25 of file RoutedEventHelpers.h.

    {
        move_from(other);
        return *this;
    }

RoutedEventHandler_revoker& operator= ( RoutedEventHandler_revoker const & )
void revoke ( ) [inline]

Definition at line 42 of file RoutedEventHelpers.h.

    {
        if (!m_object)
        {
            return;
        }

        if (auto object = m_object.get())
        {
            object.RemoveHandler(m_event, m_handler);
        }

        m_object = nullptr;
    }

Member Data Documentation

weak_ref<winrt::UIElement> m_object [private]

Definition at line 73 of file RoutedEventHelpers.h.

winrt::RoutedEvent m_event nullptr [private]

Definition at line 74 of file RoutedEventHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< eventType > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< eventType > Struct Template Reference

#include "RoutedEventHelpers.h"

Detailed Description

template<RoutedEventType eventType>
struct RoutedEventTraits< eventType >

Definition at line 95 of file RoutedEventHelpers.h.

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::DragEnter > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::DragEnter > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::DragEnter >

Definition at line 156 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 158 of file RoutedEventHelpers.h.

{ return winrt::UIElement::DragEnterEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::DragLeave > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::DragLeave > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::DragLeave >

Definition at line 163 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 165 of file RoutedEventHelpers.h.

{ return winrt::UIElement::DragLeaveEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::Drop > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::Drop > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::Drop >

Definition at line 170 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 172 of file RoutedEventHelpers.h.

{ return winrt::UIElement::DropEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::GettingFocus > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::GettingFocus > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::GettingFocus >

Definition at line 100 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 102 of file RoutedEventHelpers.h.

{ return winrt::UIElement::GettingFocusEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::KeyDown > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::KeyDown > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::KeyDown >

Definition at line 114 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 116 of file RoutedEventHelpers.h.

{ return winrt::UIElement::KeyDownEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::LosingFocus > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::LosingFocus > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::LosingFocus >

Definition at line 107 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 109 of file RoutedEventHelpers.h.

{ return winrt::UIElement::LosingFocusEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::PointerCanceled > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::PointerCanceled > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::PointerCanceled >

Definition at line 142 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 144 of file RoutedEventHelpers.h.

{ return winrt::UIElement::PointerCanceledEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::PointerCaptureLost > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::PointerCaptureLost > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::PointerCaptureLost >

Definition at line 149 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 151 of file RoutedEventHelpers.h.

{ return winrt::UIElement::PointerCaptureLostEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::PointerExited > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::PointerExited > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::PointerExited >

Definition at line 135 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 137 of file RoutedEventHelpers.h.

{ return winrt::UIElement::PointerExitedEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::PointerPressed > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::PointerPressed > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::PointerPressed >

Definition at line 121 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 123 of file RoutedEventHelpers.h.

{ return winrt::UIElement::PointerPressedEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RoutedEventTraits< RoutedEventType::PointerReleased > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

RoutedEventTraits< RoutedEventType::PointerReleased > Struct Template Reference

#include "RoutedEventHelpers.h"

List of all members.

Static Public Member Functions

static winrt::RoutedEvent Event ()

Detailed Description

template<>
struct RoutedEventTraits< RoutedEventType::PointerReleased >

Definition at line 128 of file RoutedEventHelpers.h.

Member Function Documentation

static winrt::RoutedEvent Event ( ) [inline, static]

Definition at line 130 of file RoutedEventHelpers.h.

{ return winrt::UIElement::PointerReleasedEvent(); }

The documentation for this struct was generated from the following file:
  • inc/RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CMethodProfileGroup< size > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RuntimeProfiler
  • CMethodProfileGroup< size >
Public Member Functions | Static Public Attributes | Private Attributes

CMethodProfileGroup< size > Class Template Reference

Inherits RuntimeProfiler::CMethodProfileGroupBase.

List of all members.

Public Member Functions

CMethodProfileGroup (ProfileGroup group)
~CMethodProfileGroup ()
void | FireEvent (bool bSuspend) noexcept override
void | RegisterMethod (UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept override

Static Public Attributes

static const int | TableSize = size

Private Attributes

LONG | m_cMethods
std::array
< FunctionTelemetryCount,
TableSize > 		m_Counts = {0}
ProfileGroup m_group

Detailed Description

template<size_t size>
class RuntimeProfiler::CMethodProfileGroup< size >

Definition at line 31 of file RuntimeProfiler.cpp.

Constructor & Destructor Documentation

CMethodProfileGroup ( ProfileGroup group ) [inline]

Definition at line 36 of file RuntimeProfiler.cpp.

        :   m_cMethods(0)
        ,   m_group(group)
        {
            //  Note: We are declaring these objects in a global scope which
            //      basically means that anything we call here in the
            //      constructor needs to be safe to call during DllMain.
        }

~CMethodProfileGroup ( ) [inline]

Definition at line 45 of file RuntimeProfiler.cpp.

        {
            //  Ditto from above.
            UninitializeRuntimeProfiler();
        }

Member Function Documentation

void FireEvent ( bool bSuspend ) [inline, override, virtual]

Implements CMethodProfileGroupBase.

Definition at line 77 of file RuntimeProfiler.cpp.

        {
            if (!g_IsTelemetryProviderEnabled)
            {
                // Trace logging provider for Microsoft telemetry is not enabled. Exit right away.
                return;
            }

            const UINT32      ArraySize = (UINT32)(m_Counts.max_size());
            const bool        bOverflow = ((UINT32)(m_cMethods) >= ArraySize);
            UINT32      cMethods = (UINT32)m_cMethods;
            bool        bStringOverflow = false;
            UINT16      cMethodsLogged = 0;
            bool        bSeparator = false;

            //  Each entry will look like this:
            //  [XX|YYYY]:ZZZ
            //  Conservatively accounting for 20 characters per entry depending
            //  on the length of the numbers.
            WCHAR       OutputBuffer[20 * TableSize];
            size_t      cchDest = ARRAYSIZE(OutputBuffer);

            // min
            cMethods = std::min(cMethods, ArraySize);

            PWSTR       pszDest = &(OutputBuffer[0]);

            for (UINT32 ii = 0; ii < cMethods; ii++)
            {
                LONG        cHits;

                if (!m_Counts[ii].pInstanceCount)
                {
                    //  In the middle of RegisterMethod on another thread,
                    //  we'll forgo logging this method for now and pick it
                    //  up on the next FireEvent().
                    continue;
                }

                //  Zeroing out AND getting value.
                cHits = InterlockedExchange(m_Counts[ii].pInstanceCount, 0);

                if (0 != cHits)
                {
                    //  We're using id's instead.  The entry in the list will
                    //  look like '[type index|method index]:count'
                    const HRESULT hr = StringCchPrintfExW(
                            pszDest,
                            cchDest,
                            &pszDest,
                            &cchDest,
                            STRSAFE_NULL_ON_FAILURE,
                            L"%ls[%d|%d]:%d",
                            (bSeparator?L",":L""),
                            (int)m_Counts[ii].uTypeIndex,
                            (int)m_Counts[ii].uMethodIndex,
                            cHits);

                    if (S_OK == hr)
                    {
                        cMethodsLogged++;
                        bSeparator = true;
                    }
                    else if ((STRSAFE_E_INSUFFICIENT_BUFFER == hr) ||
                             (STRSAFE_E_INVALID_PARAMETER == hr))
                    {
                        //  The only legit ways to get invalid parameter
                        //    here is ccDest == 0, so it's effectively an
                        //    overflow condition.
                        bStringOverflow = true;
                        break;
                    }
                }
            }

            if (0 == cMethodsLogged)
            {
                return;
            }

            TraceLoggingWrite(
                g_hTelemetryProvider,
                "RuntimeProfiler",
                TraceLoggingDescription("XAML methods that have been called."),
                TraceLoggingString(gFileVersion, "BinaryVersion"),
                TraceLoggingWideString(OutputBuffer, "ApiCounts"),
                TraceLoggingUInt32(((UINT32)m_group), "ProfileGroupId"),
                TraceLoggingUInt32(((UINT32)cMethods),"TotalCount"),
                TraceLoggingBoolean(bSuspend, "OnSuspend"),
                TraceLoggingBoolean(bOverflow, "Overflow"),
                TraceLoggingBoolean(bStringOverflow, "StringOverflow"),
                TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"),
                TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
                TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
        }

void RegisterMethod | ( | UINT16 | uTypeIndex,
 |  | UINT16 | uMethodIndex,
 |  | volatile LONG * | pCount |
 | ) |  |  | [inline, override, virtual]

Implements CMethodProfileGroupBase.

Definition at line 51 of file RuntimeProfiler.cpp.

        {
            static_assert(sizeof(LONG) == sizeof(UINT32), "Since we're using InterlockedIncrement, make sure that this is the same size independent of build flavors.");

            //  Zero-based index
            const LONG WriteIndex = ::InterlockedIncrement(&m_cMethods) - 1;

            if (WriteIndex < (LONG)(m_Counts.max_size()))
            {
                m_Counts[WriteIndex].uTypeIndex          = uTypeIndex;
                m_Counts[WriteIndex].uMethodIndex        = uMethodIndex;

                //  Note:  This pointer is the last thing to be set, this is
                //    intentional, FireEvent will check the this pointer and
                //    if set will assume that the rest of this structure is
                //    valid, do not change the order.
                m_Counts[WriteIndex].pInstanceCount      = pCount;

                //  FireEvent() will reset counts to zero and we don't want
                //  RegisterMethod() to be called again, thus we set the
                //  initial static value to -1, to be incremented to 0 on first
                //  call and we increment again for an accurate count.
                ::InterlockedIncrement(pCount);
            }
        }

Member Data Documentation

LONG m_cMethods [private]

Definition at line 175 of file RuntimeProfiler.cpp.

std::array<FunctionTelemetryCount, TableSize> m_Counts = {0} [private]

Definition at line 174 of file RuntimeProfiler.cpp.

ProfileGroup m_group [private]

Definition at line 176 of file RuntimeProfiler.cpp.

const int TableSize = size [static]

Definition at line 34 of file RuntimeProfiler.cpp.

The documentation for this class was generated from the following file:
  • Telemetry/RuntimeProfiler.cpp
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CMethodProfileGroupBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RuntimeProfiler
  • CMethodProfileGroupBase
Public Member Functions

CMethodProfileGroupBase Class Reference

Inherited by CMethodProfileGroup< size >.

List of all members.

Public Member Functions

virtual void | FireEvent (bool bSuspend) noexcept=0
virtual void | RegisterMethod (UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept=0

Detailed Description

Definition at line 23 of file RuntimeProfiler.cpp.

Member Function Documentation

virtual void FireEvent ( bool bSuspend ) [pure virtual]

Implemented in CMethodProfileGroup< size >.

virtual void RegisterMethod | ( | UINT16 | uTypeIndex,
 |  | UINT16 | uMethodIndex,
 |  | volatile LONG * | pCount |
 | ) |  |  | [pure virtual]

Implemented in CMethodProfileGroup< size >.

The documentation for this class was generated from the following file:
  • Telemetry/RuntimeProfiler.cpp
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FunctionTelemetryCount Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RuntimeProfiler
  • FunctionTelemetryCount

FunctionTelemetryCount Struct Reference

Detailed Description

Definition at line 16 of file RuntimeProfiler.cpp.

The documentation for this struct was generated from the following file:
  • Telemetry/RuntimeProfiler.cpp
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProfileGroupInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • RuntimeProfiler
  • ProfileGroupInfo
Public Attributes

ProfileGroupInfo Struct Reference

List of all members.

Public Attributes

CMethodProfileGroupBase * pGroup
const char * pszGroupName

Detailed Description

Definition at line 184 of file RuntimeProfiler.cpp.

Member Data Documentation

CMethodProfileGroupBase* pGroup

Definition at line 186 of file RuntimeProfiler.cpp.

const char* pszGroupName

Definition at line 187 of file RuntimeProfiler.cpp.

The documentation for this struct was generated from the following file:
  • Telemetry/RuntimeProfiler.cpp
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScopedBatchCompleted_revoker Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ScopedBatchCompleted_revoker Struct Reference

#include "CppWinRTHelpers.h"

List of all members.

Public Member Functions

ScopedBatchCompleted_revoker () noexcept
ScopedBatchCompleted_revoker (ScopedBatchCompleted_revoker const &)
ScopedBatchCompleted_revoker (ScopedBatchCompleted_revoker &&other) noexcept
ScopedBatchCompleted_revoker (winrt::CompositionScopedBatch const &batch, winrt::event_token token)
~ScopedBatchCompleted_revoker () noexcept
operator bool () const noexcept
ScopedBatchCompleted_revoker & | operator= (ScopedBatchCompleted_revoker &&other) noexcept
ScopedBatchCompleted_revoker & | operator= (ScopedBatchCompleted_revoker const &)
void | revoke () noexcept

Private Member Functions

void | move_from (ScopedBatchCompleted_revoker &other)

Detailed Description

Definition at line 146 of file CppWinRTHelpers.h.

Constructor & Destructor Documentation

ScopedBatchCompleted_revoker ( )
ScopedBatchCompleted_revoker ( ScopedBatchCompleted_revoker const & )
ScopedBatchCompleted_revoker ( ScopedBatchCompleted_revoker && other ) [inline]

Definition at line 151 of file CppWinRTHelpers.h.

    {
        move_from(other);
    }

ScopedBatchCompleted_revoker | ( | winrt::CompositionScopedBatch const & | batch,
 |  | winrt::event_token | token |
 | ) |  |  | [inline]

Definition at line 162 of file CppWinRTHelpers.h.

                                                                                :
        m_batch(batch),
        m_token(token)
    {}

~ScopedBatchCompleted_revoker ( ) [inline]

Definition at line 167 of file CppWinRTHelpers.h.

    {
        revoke();
    }

Member Function Documentation

void move_from ( ScopedBatchCompleted_revoker & other ) [inline, private]

Definition at line 188 of file CppWinRTHelpers.h.

    {
        if (this != &other)
        {
            revoke();
            m_batch = other.m_batch;
            m_token = other.m_token;
            other.m_batch = nullptr;
            other.m_token.value = 0;
        }
    }

operator bool ( ) const [inline, explicit]

Definition at line 183 of file CppWinRTHelpers.h.

    {
        return static_cast<bool>(m_batch);
    }

ScopedBatchCompleted_revoker& operator= ( ScopedBatchCompleted_revoker && other ) [inline]

Definition at line 156 of file CppWinRTHelpers.h.

    {
        move_from(other);
        return *this;
    }

ScopedBatchCompleted_revoker& operator= ( ScopedBatchCompleted_revoker const & )
void revoke ( ) [inline]

Definition at line 172 of file CppWinRTHelpers.h.

    {
        if (!m_batch)
        {
            return;
        }

        m_batch.Completed(m_token);
        m_batch = nullptr;
    }

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollBarController Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

ScrollBarController Class Reference

#include "ScrollBarController.h"

List of all members.

Public Member Functions

ScrollBarController ()
~ScrollBarController ()
void | AddScrollVelocityRequested (winrt::event_token const &token)
winrt::event_token | AddScrollVelocityRequested (winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerAddScrollVelocityRequestedEventArgs > const &value)
bool | CanScroll ()
winrt::event_token | CanScrollChanged (winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value)
void | CanScrollChanged (winrt::event_token const &token)
winrt::CompositionAnimation | GetScrollAnimation (int correlationId, winrt::float2 const &startPosition, winrt::float2 const &endPosition, winrt::CompositionAnimation const &defaultAnimation)
bool | IsScrollingWithMouse ()
winrt::event_token | IsScrollingWithMouseChanged (winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value)
void | IsScrollingWithMouseChanged (winrt::event_token const &token)
void | NotifyRequestedScrollCompleted (int correlationId)
winrt::IScrollControllerPanningInfo | PanningInfo ()
void | ScrollByRequested (winrt::event_token const &token)
winrt::event_token | ScrollByRequested (winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollByRequestedEventArgs > const &value)
winrt::event_token | ScrollToRequested (winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollToRequestedEventArgs > const &value)
void | ScrollToRequested (winrt::event_token const &token)
void | SetIsScrollable (bool isScrollable)
void | SetScrollBar (const winrt::ScrollBar &scrollBar)
void | SetValues (double minOffset, double maxOffset, double offset, double viewportLength)

Private Member Functions

void | HookScrollBarEvent ()
void | HookScrollBarPropertyChanged ()
void | OnScroll (const winrt::IInspectable &sender, const winrt::ScrollEventArgs &args)
void | OnScrollBarPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
bool | RaiseAddScrollVelocityRequested (double offsetChange)
void | RaiseCanScrollChanged ()
void | RaiseIsScrollingWithMouseChanged ()
bool | RaiseScrollByRequested (double offsetChange)
bool | RaiseScrollToRequested (double offset)
void | UnhookScrollBarEvent ()
void | UnhookScrollBarPropertyChanged ()
void | UpdateCanScroll ()

Private Attributes

winrt::ScrollBar | m_scrollBar

Static Private Attributes

static constexpr float | s_inertiaDecayRate = 0.9995f

Detailed Description

Definition at line 12 of file ScrollBarController.h.

Constructor & Destructor Documentation

ScrollBarController ( )

Definition at line 15 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~ScrollBarController ( )

Definition at line 20 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    UnhookScrollBarEvent();
    UnhookScrollBarPropertyChanged();
}

Member Function Documentation

winrt::event_token AddScrollVelocityRequested ( winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerAddScrollVelocityRequestedEventArgs > const & value )

Definition at line 201 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    return m_addScrollVelocityRequested.add(value);
}

void AddScrollVelocityRequested ( winrt::event_token const & token )

Definition at line 208 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_addScrollVelocityRequested.remove(token);
}

bool CanScroll ( )

Definition at line 47 of file ScrollBarController.cpp.

{
    return m_canScroll;
}

void CanScrollChanged ( winrt::event_token const & token )

Definition at line 222 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_canScrollChanged.remove(token);
}

winrt::event_token CanScrollChanged ( winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const & value )

Definition at line 215 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    return m_canScrollChanged.add(value);
}

winrt::CompositionAnimation GetScrollAnimation | ( | int | correlationId,
 |  | winrt::float2 const & | startPosition,
 |  | winrt::float2 const & | endPosition,
 |  | winrt::CompositionAnimation const & | defaultAnimation
 | ) |  |

Definition at line 141 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, correlationId);

    // Using the consumer's default animation.
    return nullptr;
}

void HookScrollBarEvent ( ) [private]

Definition at line 315 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    MUX_ASSERT(m_scrollBarScrollToken.value == 0);

    if (m_scrollBar)
    {
        m_scrollBarScrollToken = m_scrollBar.Scroll({ this, &ScrollBarController::OnScroll });
    }
}

void HookScrollBarPropertyChanged ( ) [private]

Definition at line 245 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

#ifdef DBG
    MUX_ASSERT(m_scrollBarIndicatorModeChangedToken.value == 0);
    MUX_ASSERT(m_scrollBarVisibilityChangedToken.value == 0);
#endif //DBG
    MUX_ASSERT(m_scrollBarIsEnabledChangedToken.value == 0);

    if (m_scrollBar)
    {
#ifdef DBG
        m_scrollBarIndicatorModeChangedToken.value = m_scrollBar.RegisterPropertyChangedCallback(
            winrt::ScrollBar::IndicatorModeProperty(), { this, &ScrollBarController::OnScrollBarPropertyChanged });

        m_scrollBarVisibilityChangedToken.value = m_scrollBar.RegisterPropertyChangedCallback(
            winrt::UIElement::VisibilityProperty(), { this, &ScrollBarController::OnScrollBarPropertyChanged });
#endif //DBG

        m_scrollBarIsEnabledChangedToken.value = m_scrollBar.RegisterPropertyChangedCallback(
            winrt::Control::IsEnabledProperty(), { this, &ScrollBarController::OnScrollBarPropertyChanged });
    }
}

bool IsScrollingWithMouse ( )

Definition at line 52 of file ScrollBarController.cpp.

{
    return m_isScrollingWithMouse;
}

winrt::event_token IsScrollingWithMouseChanged ( winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const & value )

Definition at line 229 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    return m_isScrollingWithMouseChanged.add(value);
}

void IsScrollingWithMouseChanged ( winrt::event_token const & token )

Definition at line 236 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_isScrollingWithMouseChanged.remove(token);
}

void NotifyRequestedScrollCompleted ( int correlationId )

Definition at line 153 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_INFO(
        nullptr,
        TRACE_MSG_METH_INT,
        METH_NAME,
        this,
        correlationId);

    MUX_ASSERT(m_operationsCount > 0);
    m_operationsCount--;

    if (m_operationsCount == 0 && m_scrollBar && m_scrollBar.Value() != m_lastOffset)
    {
        m_scrollBar.Value(m_lastOffset);
        m_lastScrollBarValue = m_lastOffset;
    }
}

void OnScroll | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollEventArgs & | args |
 | ) |  |  | [private]

Definition at line 380 of file ScrollBarController.cpp.

{
    const auto scrollEventType = args.ScrollEventType();

    SCROLLVIEW_TRACE_VERBOSE(
        nullptr,
        TRACE_MSG_METH_STR,
        METH_NAME,
        this,
        TypeLogging::ScrollEventTypeToString(scrollEventType).c_str());

    if (!m_scrollBar)
    {
        return;
    }

    if (!m_isScrollable && scrollEventType != winrt::ScrollEventType::ThumbPosition)
    {
        // This ScrollBar is not interactive. Restore its previous Value.
        m_scrollBar.Value(m_lastScrollBarValue);
        return;
    }

    switch (scrollEventType)
    {
    case winrt::ScrollEventType::First:
    case winrt::ScrollEventType::Last:
    {
        break;
    }
    case winrt::ScrollEventType::EndScroll:
    {
        if (m_isScrollingWithMouse)
        {
            m_isScrollingWithMouse = false;
            RaiseIsScrollingWithMouseChanged();
        }
        break;
    }
    case winrt::ScrollEventType::LargeDecrement:
    case winrt::ScrollEventType::LargeIncrement:
    case winrt::ScrollEventType::SmallDecrement:
    case winrt::ScrollEventType::SmallIncrement:
    case winrt::ScrollEventType::ThumbPosition:
    case winrt::ScrollEventType::ThumbTrack:
    {
        if (scrollEventType == winrt::ScrollEventType::ThumbTrack)
        {
            if (!m_isScrollingWithMouse)
            {
                m_isScrollingWithMouse = true;
                RaiseIsScrollingWithMouseChanged();
            }
        }

        bool offsetChangeRequested = false;

        if (scrollEventType == winrt::ScrollEventType::ThumbPosition ||
            scrollEventType == winrt::ScrollEventType::ThumbTrack)
        {
            offsetChangeRequested = RaiseScrollToRequested(args.NewValue());
        }
        else
        {
            double offsetChange = 0.0;

            switch (scrollEventType)
            {
            case winrt::ScrollEventType::LargeDecrement:
                offsetChange = -min(m_lastScrollBarValue - m_scrollBar.Minimum(), m_scrollBar.LargeChange());
                break;
            case winrt::ScrollEventType::LargeIncrement:
                offsetChange = min(m_scrollBar.Maximum() - m_lastScrollBarValue, m_scrollBar.LargeChange());
                break;
            case winrt::ScrollEventType::SmallDecrement:
                offsetChange = -min(m_lastScrollBarValue - m_scrollBar.Minimum(), m_scrollBar.SmallChange());
                break;
            case winrt::ScrollEventType::SmallIncrement:
                offsetChange = min(m_scrollBar.Maximum() - m_lastScrollBarValue, m_scrollBar.SmallChange());
                break;
            }

            // When the requested Value is near the Mininum or Maximum, include a little additional velocity
            // to ensure the extreme value is reached.
            if (args.NewValue() - m_scrollBar.Minimum() < s_minMaxEpsilon)
            {
                MUX_ASSERT(offsetChange < 0.0);
                offsetChange -= s_minMaxEpsilon;
            }
            else if (m_scrollBar.Maximum() - args.NewValue() < s_minMaxEpsilon)
            {
                MUX_ASSERT(offsetChange > 0.0);
                offsetChange += s_minMaxEpsilon;
            }

            if (SharedHelpers::IsAnimationsEnabled())
            {
                offsetChangeRequested = RaiseAddScrollVelocityRequested(offsetChange);
            }
            else
            {
                offsetChangeRequested = RaiseScrollByRequested(offsetChange);
            }
        }

        if (!offsetChangeRequested)
        {
            // This request could not be requested, restore the previous Value.
            m_scrollBar.Value(m_lastScrollBarValue);
        }
        break;
    }
    }

    m_lastScrollBarValue = m_scrollBar.Value();
}

void OnScrollBarPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 338 of file ScrollBarController.cpp.

{
    MUX_ASSERT(m_scrollBar);

    if (args == winrt::Control::IsEnabledProperty())
    {
        SCROLLVIEW_TRACE_VERBOSE(
            nullptr,
            TRACE_MSG_METH_STR_INT,
            METH_NAME,
            this,
            L"IsEnabled",
            m_scrollBar.IsEnabled());

        UpdateCanScroll();
    }
#ifdef DBG
    else if (args == winrt::UIElement::VisibilityProperty())
    {
        SCROLLVIEW_TRACE_VERBOSE(
            nullptr,
            TRACE_MSG_METH_STR_INT,
            METH_NAME,
            this,
            L"Visibility",
            m_scrollBar.Visibility());
    }
    else if (args == winrt::ScrollBar::IndicatorModeProperty())
    {
        SCROLLVIEW_TRACE_VERBOSE(
            nullptr,
            TRACE_MSG_METH_STR_STR,
            METH_NAME,
            this,
            L"IndicatorMode",
            TypeLogging::ScrollingIndicatorModeToString(m_scrollBar.IndicatorMode()).c_str());
    }
#endif //DBG
}

winrt::IScrollControllerPanningInfo PanningInfo ( )

Definition at line 42 of file ScrollBarController.cpp.

{
    return nullptr;
}

bool RaiseAddScrollVelocityRequested ( double offsetChange ) [private]

Definition at line 583 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, offsetChange);

    if (!m_addScrollVelocityRequested)
    {
        return false;
    }

    winrt::IInspectable inertiaDecayRateAsInsp = box_value(s_inertiaDecayRate);
    winrt::IReference<float> inertiaDecayRate = inertiaDecayRateAsInsp.as<winrt::IReference<float>>();

    auto addScrollVelocityRequestedEventArgs = winrt::make_self<ScrollControllerAddScrollVelocityRequestedEventArgs>(
        static_cast<float>(offsetChange * s_velocityNeededPerPixel),
        inertiaDecayRate);

    m_addScrollVelocityRequested(*this, *addScrollVelocityRequestedEventArgs);

    // The CorrelationId property was set by the AddScrollVelocityRequested event handler.
    // Typically it is set to a new unique value, but it may also be set to the ID
    // from the prior request. This occurs when a request is quickly raised before
    // the prior one was handed off to the Composition layer. The back-to-back requests
    // are then coalesced into a single operation handed off to the Composition layer.
    int32_t offsetChangeCorrelationId = addScrollVelocityRequestedEventArgs.as<winrt::ScrollControllerAddScrollVelocityRequestedEventArgs>().CorrelationId();

    if (offsetChangeCorrelationId != -1)
    {
        // Only increment m_operationsCount when the returned CorrelationId represents a new request that was not coalesced with a pending request.
        if (offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForAddScrollVelocity)
        {
            m_lastOffsetChangeCorrelationIdForAddScrollVelocity = offsetChangeCorrelationId;
            m_operationsCount++;
        }

        return true;
    }

    return false;
}

void RaiseCanScrollChanged ( ) [private]

Definition at line 624 of file ScrollBarController.cpp.

{
    if (!m_canScrollChanged)
    {
        return;
    }

    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_canScrollChanged(*this, nullptr);
}

void RaiseIsScrollingWithMouseChanged ( ) [private]

Definition at line 636 of file ScrollBarController.cpp.

{
    if (!m_isScrollingWithMouseChanged)
    {
        return;
    }

    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_isScrollingWithMouseChanged(*this, nullptr);
}

bool RaiseScrollByRequested ( double offsetChange ) [private]

Definition at line 541 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, offsetChange);

    if (!m_scrollByRequested)
    {
        return false;
    }

    auto options = winrt::make_self<ScrollingScrollOptions>(
        winrt::ScrollingAnimationMode::Disabled,
        winrt::ScrollingSnapPointsMode::Ignore);

    auto scrollByRequestedEventArgs = winrt::make_self<ScrollControllerScrollByRequestedEventArgs>(
        offsetChange,
        *options);

    m_scrollByRequested(*this, *scrollByRequestedEventArgs);

    // The CorrelationId property was set by the ScrollByRequested event handler.
    // Typically it is set to a new unique value, but it may also be set to the ID
    // from the prior request. This occurs when a request is quickly raised before
    // the prior one was handed off to the Composition layer. The back-to-back requests
    // are then coalesced into a single operation handed off to the Composition layer.
    int32_t offsetChangeCorrelationId = scrollByRequestedEventArgs.as<winrt::ScrollControllerScrollByRequestedEventArgs>().CorrelationId();

    if (offsetChangeCorrelationId != -1)
    {
        // Only increment m_operationsCount when the returned CorrelationId represents a new request that was not coalesced with a pending request.
        if (offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollBy)
        {
            m_lastOffsetChangeCorrelationIdForScrollBy = offsetChangeCorrelationId;
            m_operationsCount++;
        }

        return true;
    }

    return false;
}

bool RaiseScrollToRequested ( double offset ) [private]

Definition at line 499 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, offset);

    if (!m_scrollToRequested)
    {
        return false;
    }

    auto options = winrt::make_self<ScrollingScrollOptions>(
        winrt::ScrollingAnimationMode::Disabled,
        winrt::ScrollingSnapPointsMode::Ignore);

    auto scrollToRequestedEventArgs = winrt::make_self<ScrollControllerScrollToRequestedEventArgs>(
        offset,
        *options);

    m_scrollToRequested(*this, *scrollToRequestedEventArgs);

    // The CorrelationId property was set by the ScrollToRequested event handler.
    // Typically it is set to a new unique value, but it may also be set to the ID
    // from the prior request. This occurs when a request is quickly raised before
    // the prior one was handed off to the Composition layer. The back-to-back requests
    // are then coalesced into a single operation handed off to the Composition layer.
    int32_t offsetChangeCorrelationId = scrollToRequestedEventArgs.as<winrt::ScrollControllerScrollToRequestedEventArgs>().CorrelationId();

    if (offsetChangeCorrelationId != -1)
    {
        // Only increment m_operationsCount when the returned CorrelationId represents a new request that was not coalesced with a pending request.
        if (offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollTo)
        {
            m_lastOffsetChangeCorrelationIdForScrollTo = offsetChangeCorrelationId;
            m_operationsCount++;
        }

        return true;
    }

    return false;
}

winrt::event_token ScrollByRequested ( winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollByRequestedEventArgs > const & value )

Definition at line 187 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    return m_scrollByRequested.add(value);
}

void ScrollByRequested ( winrt::event_token const & token )

Definition at line 194 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_scrollByRequested.remove(token);
}

void ScrollToRequested ( winrt::event_token const & token )

Definition at line 180 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_scrollToRequested.remove(token);
}

winrt::event_token ScrollToRequested ( winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollToRequestedEventArgs > const & value )

Definition at line 173 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    return m_scrollToRequested.add(value);
}

void SetIsScrollable ( bool isScrollable )

Definition at line 57 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_INFO(
        nullptr,
        TRACE_MSG_METH_INT,
        METH_NAME,
        this,
        isScrollable);
    m_isScrollable = isScrollable;

    UpdateCanScroll();
}

void SetScrollBar ( const winrt::ScrollBar & scrollBar )

Definition at line 28 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    UnhookScrollBarEvent();

    m_scrollBar = scrollBar;

    HookScrollBarEvent();
    HookScrollBarPropertyChanged();
}

void SetValues | ( | double | minOffset,
 |  | double | maxOffset,
 |  | double | offset,
 |  | double | viewportLength
 | ) |  |

Definition at line 71 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_INFO(
        nullptr,
        L"%s[0x%p](minOffset:%lf, maxOffset:%lf, offset:%lf, viewportLength:%lf, operationsCount:%d)\n",
        METH_NAME,
        this,
        minOffset,
        maxOffset,
        offset,
        viewportLength,
        m_operationsCount);

    if (maxOffset < minOffset)
    {
        throw winrt::hresult_invalid_argument(L"maxOffset cannot be smaller than minOffset.");
    }

    if (viewportLength < 0.0)
    {
        throw winrt::hresult_invalid_argument(L"viewportLength cannot be negative.");
    }

    offset = max(minOffset, offset);
    offset = min(maxOffset, offset);
    m_lastOffset = offset;

    MUX_ASSERT(m_scrollBar);

    if (minOffset < m_scrollBar.Minimum())
    {
        m_scrollBar.Minimum(minOffset);
    }

    if (maxOffset > m_scrollBar.Maximum())
    {
        m_scrollBar.Maximum(maxOffset);
    }

    if (minOffset != m_scrollBar.Minimum())
    {
        m_scrollBar.Minimum(minOffset);
    }

    if (maxOffset != m_scrollBar.Maximum())
    {
        m_scrollBar.Maximum(maxOffset);
    }

    m_scrollBar.ViewportSize(viewportLength);
    m_scrollBar.LargeChange(viewportLength);
    m_scrollBar.SmallChange(max(1.0, viewportLength / s_defaultViewportToSmallChangeRatio));

    // The ScrollBar Value is only updated when there is no operation in progress otherwise the Scroll
    // event handler, ScrollBarScroll, may initiate a new request impeding the on-going operation.
    if (m_operationsCount == 0 || m_scrollBar.Value() < minOffset || m_scrollBar.Value() > maxOffset)
    {
        m_scrollBar.Value(offset);
        m_lastScrollBarValue = offset;
    }

    // Potentially changed ScrollBar.Minimum / ScrollBar.Maximum value(s) may have an effect
    // on the read-only IScrollController.CanScroll property.
    UpdateCanScroll();
}

void UnhookScrollBarEvent ( ) [private]

Definition at line 327 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (m_scrollBar && m_scrollBarScrollToken.value != 0)
    {
        m_scrollBar.Scroll(m_scrollBarScrollToken);
        m_scrollBarScrollToken.value = 0;
    }
}

void UnhookScrollBarPropertyChanged ( ) [private]

Definition at line 270 of file ScrollBarController.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (m_scrollBar)
    {
#ifdef DBG
        if (m_scrollBarIndicatorModeChangedToken.value != 0)
        {
            m_scrollBar.UnregisterPropertyChangedCallback(winrt::ScrollBar::IndicatorModeProperty(), m_scrollBarIndicatorModeChangedToken.value);
            m_scrollBarIndicatorModeChangedToken.value = 0;
        }

        if (m_scrollBarVisibilityChangedToken.value != 0)
        {
            m_scrollBar.UnregisterPropertyChangedCallback(winrt::UIElement::VisibilityProperty(), m_scrollBarVisibilityChangedToken.value);
            m_scrollBarVisibilityChangedToken.value = 0;
        }
#endif //DBG

        if (m_scrollBarIsEnabledChangedToken.value != 0)
        {
            m_scrollBar.UnregisterPropertyChangedCallback(winrt::Control::IsEnabledProperty(), m_scrollBarIsEnabledChangedToken.value);
            m_scrollBarIsEnabledChangedToken.value = 0;
        }
    }
}

void UpdateCanScroll ( ) [private]

Definition at line 298 of file ScrollBarController.cpp.

{
    const bool oldCanScroll = m_canScroll;

    m_canScroll =
        m_scrollBar &&
        m_scrollBar.Parent() &&
        m_scrollBar.IsEnabled() &&
        m_scrollBar.Maximum() > m_scrollBar.Minimum() &&
        m_isScrollable;

    if (oldCanScroll != m_canScroll)
    {
        RaiseCanScrollChanged();
    }
}

Member Data Documentation

winrt::ScrollBar m_scrollBar [private]

Definition at line 96 of file ScrollBarController.h.

constexpr float s_inertiaDecayRate = 0.9995f [static, private]

Definition at line 93 of file ScrollBarController.h.

The documentation for this class was generated from the following files:
  • ScrollView/ScrollBarController.h
  • ScrollView/ScrollBarController.cpp
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollControllerAddScrollVelocityRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollControllerAddScrollVelocityRequestedEventArgs Class Reference

#include "ScrollControllerAddScrollVelocityRequestedEventArgs.h"

List of all members.

Public Member Functions

ScrollControllerAddScrollVelocityRequestedEventArgs (float offsetVelocity, winrt::IReference< float > inertiaDecayRate)
~ScrollControllerAddScrollVelocityRequestedEventArgs ()
int32_t | CorrelationId () const
void | CorrelationId (int32_t correlationId)
winrt::IReference< float > | InertiaDecayRate () const
float | OffsetVelocity () const

Detailed Description

Definition at line 8 of file ScrollControllerAddScrollVelocityRequestedEventArgs.h.

Constructor & Destructor Documentation

~ScrollControllerAddScrollVelocityRequestedEventArgs ( ) [inline]

Definition at line 12 of file ScrollControllerAddScrollVelocityRequestedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

ScrollControllerAddScrollVelocityRequestedEventArgs | ( | float | offsetVelocity,
 |  | winrt::IReference< float > | inertiaDecayRate
 | ) |  |

Definition at line 12 of file ScrollControllerAddScrollVelocityRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this,
        TypeLogging::NullableFloatToString(inertiaDecayRate).c_str(), offsetVelocity);

    m_offsetVelocity = offsetVelocity;
    m_inertiaDecayRate = inertiaDecayRate;
}

Member Function Documentation

int32_t CorrelationId ( ) const

Definition at line 33 of file ScrollControllerAddScrollVelocityRequestedEventArgs.cpp.

{
    return m_correlationId;
}

void CorrelationId ( int32_t correlationId )

Definition at line 38 of file ScrollControllerAddScrollVelocityRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, correlationId);

    m_correlationId = correlationId;
}

winrt::IReference< float > InertiaDecayRate ( ) const

Definition at line 28 of file ScrollControllerAddScrollVelocityRequestedEventArgs.cpp.

{
    return m_inertiaDecayRate;
}

float OffsetVelocity ( ) const

Definition at line 23 of file ScrollControllerAddScrollVelocityRequestedEventArgs.cpp.

{
    return m_offsetVelocity;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollControllerAddScrollVelocityRequestedEventArgs.h
  • ScrollPresenter/ScrollControllerAddScrollVelocityRequestedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollControllerPanRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollControllerPanRequestedEventArgs Class Reference

#include "ScrollControllerPanRequestedEventArgs.h"

List of all members.

Public Member Functions

ScrollControllerPanRequestedEventArgs (const winrt::PointerPoint &pointerPoint)
~ScrollControllerPanRequestedEventArgs ()
bool | Handled () const
void | Handled (bool handled)
winrt::PointerPoint | PointerPoint () const

Detailed Description

Definition at line 10 of file ScrollControllerPanRequestedEventArgs.h.

Constructor & Destructor Documentation

~ScrollControllerPanRequestedEventArgs ( ) [inline]

Definition at line 14 of file ScrollControllerPanRequestedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

ScrollControllerPanRequestedEventArgs ( const winrt::PointerPoint & pointerPoint )

Definition at line 12 of file ScrollControllerPanRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::PointerPointToString(pointerPoint).c_str());

    m_pointerPoint = pointerPoint;
}

Member Function Documentation

bool Handled ( ) const

Definition at line 25 of file ScrollControllerPanRequestedEventArgs.cpp.

{
    return m_handled;
}

void Handled ( bool handled )

Definition at line 30 of file ScrollControllerPanRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, handled);
    m_handled = handled;
}

winrt::PointerPoint PointerPoint ( ) const

Definition at line 20 of file ScrollControllerPanRequestedEventArgs.cpp.

{
    return m_pointerPoint;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollControllerPanRequestedEventArgs.h
  • ScrollPresenter/ScrollControllerPanRequestedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollControllerScrollByRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollControllerScrollByRequestedEventArgs Class Reference

#include "ScrollControllerScrollByRequestedEventArgs.h"

List of all members.

Public Member Functions

ScrollControllerScrollByRequestedEventArgs (double offsetDelta, winrt::ScrollingScrollOptions const &options)
~ScrollControllerScrollByRequestedEventArgs ()
int32_t | CorrelationId () const
void | CorrelationId (int32_t correlationId)
double | OffsetDelta () const
winrt::ScrollingScrollOptions | Options () const

Detailed Description

Definition at line 8 of file ScrollControllerScrollByRequestedEventArgs.h.

Constructor & Destructor Documentation

~ScrollControllerScrollByRequestedEventArgs ( ) [inline]

Definition at line 12 of file ScrollControllerScrollByRequestedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

ScrollControllerScrollByRequestedEventArgs | ( | double | offsetDelta,
 |  | winrt::ScrollingScrollOptions const & | options
 | ) |  |

Definition at line 12 of file ScrollControllerScrollByRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_DBL, METH_NAME, this,
        TypeLogging::ScrollOptionsToString(options).c_str(), offsetDelta);

    m_offsetDelta = offsetDelta;
    m_options = options;
}

Member Function Documentation

int32_t CorrelationId ( ) const

Definition at line 33 of file ScrollControllerScrollByRequestedEventArgs.cpp.

{
    return m_correlationId;
}

void CorrelationId ( int32_t correlationId )

Definition at line 38 of file ScrollControllerScrollByRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, correlationId);

    m_correlationId = correlationId;
}

double OffsetDelta ( ) const

Definition at line 23 of file ScrollControllerScrollByRequestedEventArgs.cpp.

{
    return m_offsetDelta;
}

winrt::ScrollingScrollOptions Options ( ) const

Definition at line 28 of file ScrollControllerScrollByRequestedEventArgs.cpp.

{
    return m_options;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.h
  • ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollControllerScrollToRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollControllerScrollToRequestedEventArgs Class Reference

#include "ScrollControllerScrollToRequestedEventArgs.h"

List of all members.

Public Member Functions

ScrollControllerScrollToRequestedEventArgs (double offset, winrt::ScrollingScrollOptions const &options)
~ScrollControllerScrollToRequestedEventArgs ()
int32_t | CorrelationId () const
void | CorrelationId (int32_t correlationId)
double | Offset () const
winrt::ScrollingScrollOptions | Options () const

Detailed Description

Definition at line 8 of file ScrollControllerScrollToRequestedEventArgs.h.

Constructor & Destructor Documentation

~ScrollControllerScrollToRequestedEventArgs ( ) [inline]

Definition at line 12 of file ScrollControllerScrollToRequestedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

ScrollControllerScrollToRequestedEventArgs | ( | double | offset,
 |  | winrt::ScrollingScrollOptions const & | options
 | ) |  |

Definition at line 13 of file ScrollControllerScrollToRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_DBL, METH_NAME, this,
        TypeLogging::ScrollOptionsToString(options).c_str(), offset);

    m_offset = offset;
    m_options = options;
}

Member Function Documentation

int32_t CorrelationId ( ) const

Definition at line 34 of file ScrollControllerScrollToRequestedEventArgs.cpp.

{
    return m_correlationId;
}

void CorrelationId ( int32_t correlationId )

Definition at line 39 of file ScrollControllerScrollToRequestedEventArgs.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, correlationId);

    m_correlationId = correlationId;
}

double Offset ( ) const

Definition at line 24 of file ScrollControllerScrollToRequestedEventArgs.cpp.

{
    return m_offset;
}

winrt::ScrollingScrollOptions Options ( ) const

Definition at line 29 of file ScrollControllerScrollToRequestedEventArgs.cpp.

{
    return m_options;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollControllerScrollToRequestedEventArgs.h
  • ScrollPresenter/ScrollControllerScrollToRequestedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingAnchorRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingAnchorRequestedEventArgs Class Reference

#include "ScrollingAnchorRequestedEventArgs.h"

Inherits ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

ScrollingAnchorRequestedEventArgs (const winrt::ScrollPresenter &scrollPresenter)
~ScrollingAnchorRequestedEventArgs ()
winrt::IVector< winrt::UIElement > | AnchorCandidates ()
winrt::UIElement | AnchorElement ()
void | AnchorElement (winrt::UIElement const &value)
winrt::IVector< winrt::UIElement > | GetAnchorCandidates ()
winrt::UIElement | GetAnchorElement () const
void | SetAnchorCandidates (const std::vector< tracker_ref< winrt::UIElement >> &anchorCandidates)
void | SetAnchorElement (const winrt::UIElement &anchorElement)

Detailed Description

Definition at line 8 of file ScrollingAnchorRequestedEventArgs.h.

Constructor & Destructor Documentation

~ScrollingAnchorRequestedEventArgs ( ) [inline]

Definition at line 12 of file ScrollingAnchorRequestedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

ScrollingAnchorRequestedEventArgs ( const winrt::ScrollPresenter & scrollPresenter )

Member Function Documentation

winrt::IVector<winrt::UIElement> AnchorCandidates ( )
winrt::UIElement AnchorElement ( )
void AnchorElement ( winrt::UIElement const & value )
winrt::IVector<winrt::UIElement> GetAnchorCandidates ( )
winrt::UIElement GetAnchorElement ( ) const
void SetAnchorCandidates ( const std::vector< tracker_ref< winrt::UIElement >> & anchorCandidates )
void SetAnchorElement ( const winrt::UIElement & anchorElement )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingAnchorRequestedEventArgs.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingBringingIntoViewEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingBringingIntoViewEventArgs Class Reference

#include "ScrollingBringingIntoViewEventArgs.h"

List of all members.

Public Member Functions

ScrollingBringingIntoViewEventArgs ()
~ScrollingBringingIntoViewEventArgs ()
bool | Cancel ()
void | Cancel (bool value)
int32_t | CorrelationId ()
bool | GetCancel () const
double | GetTargetHorizontalOffset () const
double | GetTargetVerticalOffset () const
void | OffsetsChangeCorrelationId (int32_t offsetsChangeCorrelationId)
void | RequestEventArgs (const winrt::BringIntoViewRequestedEventArgs &requestEventArgs)
winrt::BringIntoViewRequestedEventArgs | RequestEventArgs ()
void | SnapPointsMode (winrt::ScrollingSnapPointsMode snapPointsMode)
winrt::ScrollingSnapPointsMode | SnapPointsMode ()
double | TargetHorizontalOffset ()
void | TargetOffsets (double targetHorizontalOffset, double targetVerticalOffset)
double | TargetVerticalOffset ()

Detailed Description

Definition at line 8 of file ScrollingBringingIntoViewEventArgs.h.

Constructor & Destructor Documentation

ScrollingBringingIntoViewEventArgs ( ) [inline]

Definition at line 12 of file ScrollingBringingIntoViewEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

~ScrollingBringingIntoViewEventArgs ( ) [inline]

Definition at line 17 of file ScrollingBringingIntoViewEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

bool Cancel ( )
void Cancel ( bool value )
int32_t CorrelationId ( )
bool GetCancel ( ) const [inline]

Definition at line 42 of file ScrollingBringingIntoViewEventArgs.h.

    {
        return m_cancel;
    }

double GetTargetHorizontalOffset ( ) const [inline]

Definition at line 32 of file ScrollingBringingIntoViewEventArgs.h.

    {
        return m_targetHorizontalOffset;
    }

double GetTargetVerticalOffset ( ) const [inline]

Definition at line 37 of file ScrollingBringingIntoViewEventArgs.h.

    {
        return m_targetVerticalOffset;
    }

void OffsetsChangeCorrelationId ( int32_t offsetsChangeCorrelationId )
void RequestEventArgs ( const winrt::BringIntoViewRequestedEventArgs & requestEventArgs )
winrt::BringIntoViewRequestedEventArgs RequestEventArgs ( )
winrt::ScrollingSnapPointsMode SnapPointsMode ( )
void SnapPointsMode ( winrt::ScrollingSnapPointsMode snapPointsMode )
double TargetHorizontalOffset ( )
void TargetOffsets | ( | double | targetHorizontalOffset,
 |  | double | targetVerticalOffset
 | ) |  |
double TargetVerticalOffset ( )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingBringingIntoViewEventArgs.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingScrollAnimationStartingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingScrollAnimationStartingEventArgs Class Reference

#include "ScrollingScrollAnimationStartingEventArgs.h"

List of all members.

Public Member Functions

ScrollingScrollAnimationStartingEventArgs ()
~ScrollingScrollAnimationStartingEventArgs ()
void | Animation (winrt::CompositionAnimation const &value)
winrt::CompositionAnimation | Animation ()
int32_t | CorrelationId ()
winrt::float2 | EndPosition ()
winrt::CompositionAnimation | GetAnimation () const
void | SetAnimation (const winrt::CompositionAnimation &animation)
void | SetEndPosition (const winrt::float2 &endPosition)
void | SetOffsetsChangeCorrelationId (int32_t offsetsChangeCorrelationId)
void | SetStartPosition (const winrt::float2 &startPosition)
winrt::float2 | StartPosition ()

Detailed Description

Definition at line 9 of file ScrollingScrollAnimationStartingEventArgs.h.

Constructor & Destructor Documentation

ScrollingScrollAnimationStartingEventArgs ( ) [inline]

Definition at line 13 of file ScrollingScrollAnimationStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

~ScrollingScrollAnimationStartingEventArgs ( ) [inline]

Definition at line 18 of file ScrollingScrollAnimationStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

winrt::CompositionAnimation Animation ( )
void Animation ( winrt::CompositionAnimation const & value )
int32_t CorrelationId ( )
winrt::float2 EndPosition ( )
winrt::CompositionAnimation GetAnimation ( ) const
void SetAnimation ( const winrt::CompositionAnimation & animation )
void SetEndPosition ( const winrt::float2 & endPosition )
void SetOffsetsChangeCorrelationId ( int32_t offsetsChangeCorrelationId )
void SetStartPosition ( const winrt::float2 & startPosition )
winrt::float2 StartPosition ( )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingScrollAnimationStartingEventArgs.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingScrollCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingScrollCompletedEventArgs Class Reference

#include "ScrollingScrollCompletedEventArgs.h"

List of all members.

Public Member Functions

ScrollingScrollCompletedEventArgs ()
~ScrollingScrollCompletedEventArgs ()
int32_t | CorrelationId ()
void | OffsetsChangeCorrelationId (int32_t offsetsChangeCorrelationId)
void | Result (ScrollPresenterViewChangeResult result)
ScrollPresenterViewChangeResult Result ()

Detailed Description

Definition at line 9 of file ScrollingScrollCompletedEventArgs.h.

Constructor & Destructor Documentation

ScrollingScrollCompletedEventArgs ( ) [inline]

Definition at line 13 of file ScrollingScrollCompletedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

~ScrollingScrollCompletedEventArgs ( ) [inline]

Definition at line 18 of file ScrollingScrollCompletedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

int32_t CorrelationId ( )
void OffsetsChangeCorrelationId ( int32_t offsetsChangeCorrelationId )
void Result ( ScrollPresenterViewChangeResult result )
ScrollPresenterViewChangeResult Result ( )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingScrollCompletedEventArgs.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingScrollOptions Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingScrollOptions Class Reference

#include "ScrollingScrollOptions.h"

List of all members.

Public Member Functions

ScrollingScrollOptions (winrt::ScrollingAnimationMode const &animationMode)
ScrollingScrollOptions (winrt::ScrollingAnimationMode const &animationMode, winrt::ScrollingSnapPointsMode const &snapPointsMode)
~ScrollingScrollOptions ()
void | AnimationMode (winrt::ScrollingAnimationMode const &animationMode)
winrt::ScrollingAnimationMode | AnimationMode () const
winrt::ScrollingSnapPointsMode | SnapPointsMode () const
void | SnapPointsMode (winrt::ScrollingSnapPointsMode const &snapPointsMode)

Detailed Description

Definition at line 9 of file ScrollingScrollOptions.h.

Constructor & Destructor Documentation

ScrollingScrollOptions ( winrt::ScrollingAnimationMode const & animationMode )
ScrollingScrollOptions | ( | winrt::ScrollingAnimationMode const & | animationMode,
 |  | winrt::ScrollingSnapPointsMode const & | snapPointsMode
 | ) |  |
~ScrollingScrollOptions ( ) [inline]

Definition at line 16 of file ScrollingScrollOptions.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

winrt::ScrollingAnimationMode AnimationMode ( ) const
void AnimationMode ( winrt::ScrollingAnimationMode const & animationMode )
winrt::ScrollingSnapPointsMode SnapPointsMode ( ) const
void SnapPointsMode ( winrt::ScrollingSnapPointsMode const & snapPointsMode )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingScrollOptions.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingScrollStartingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingScrollStartingEventArgs Class Reference

#include "ScrollingScrollStartingEventArgs.h"

List of all members.

Public Member Functions

ScrollingScrollStartingEventArgs ()
~ScrollingScrollStartingEventArgs ()
int32_t | CorrelationId () const
double | HorizontalOffset () const
void | SetCorrelationId (int32_t correlationId)
void | SetHorizontalOffset (double horizontalOffset)
void | SetVerticalOffset (double verticalOffset)
void | SetZoomFactor (float zoomFactor)
double | VerticalOffset () const
float | ZoomFactor () const

Detailed Description

Definition at line 9 of file ScrollingScrollStartingEventArgs.h.

Constructor & Destructor Documentation

ScrollingScrollStartingEventArgs ( ) [inline]

Definition at line 13 of file ScrollingScrollStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

~ScrollingScrollStartingEventArgs ( ) [inline]

Definition at line 18 of file ScrollingScrollStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

int32_t CorrelationId ( ) const

Definition at line 7 of file ScrollingScrollStartingEventArgs.cpp.

{
    return m_correlationId;
}

double HorizontalOffset ( ) const

Definition at line 17 of file ScrollingScrollStartingEventArgs.cpp.

{
    return m_horizontalOffset;
}

void SetCorrelationId ( int32_t correlationId )

Definition at line 12 of file ScrollingScrollStartingEventArgs.cpp.

{
    m_correlationId = correlationId;
}

void SetHorizontalOffset ( double horizontalOffset )

Definition at line 22 of file ScrollingScrollStartingEventArgs.cpp.

{
    m_horizontalOffset = horizontalOffset;
}

void SetVerticalOffset ( double verticalOffset )

Definition at line 32 of file ScrollingScrollStartingEventArgs.cpp.

{
    m_verticalOffset = verticalOffset;
}

void SetZoomFactor ( float zoomFactor )

Definition at line 42 of file ScrollingScrollStartingEventArgs.cpp.

{
    m_zoomFactor = zoomFactor;
}

double VerticalOffset ( ) const

Definition at line 27 of file ScrollingScrollStartingEventArgs.cpp.

{
    return m_verticalOffset;
}

float ZoomFactor ( ) const

Definition at line 37 of file ScrollingScrollStartingEventArgs.cpp.

{
    return m_zoomFactor;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollingScrollStartingEventArgs.h
  • ScrollPresenter/ScrollingScrollStartingEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingZoomAnimationStartingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingZoomAnimationStartingEventArgs Class Reference

#include "ScrollingZoomAnimationStartingEventArgs.h"

List of all members.

Public Member Functions

ScrollingZoomAnimationStartingEventArgs ()
~ScrollingZoomAnimationStartingEventArgs ()
winrt::CompositionAnimation | Animation ()
void | Animation (winrt::CompositionAnimation const &value)
winrt::float2 | CenterPoint ()
int32_t | CorrelationId ()
float | EndZoomFactor ()
winrt::CompositionAnimation | GetAnimation () const
void | SetAnimation (const winrt::CompositionAnimation &animation)
void | SetCenterPoint (const winrt::float2 &centerPoint)
void | SetEndZoomFactor (const float &endZoomFactor)
void | SetStartZoomFactor (const float &startZoomFactor)
void | SetZoomFactorChangeCorrelationId (int32_t zoomFactorChangeCorrelationId)
float | StartZoomFactor ()

Detailed Description

Definition at line 8 of file ScrollingZoomAnimationStartingEventArgs.h.

Constructor & Destructor Documentation

ScrollingZoomAnimationStartingEventArgs ( ) [inline]

Definition at line 12 of file ScrollingZoomAnimationStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

~ScrollingZoomAnimationStartingEventArgs ( ) [inline]

Definition at line 17 of file ScrollingZoomAnimationStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

winrt::CompositionAnimation Animation ( )
void Animation ( winrt::CompositionAnimation const & value )
winrt::float2 CenterPoint ( )
int32_t CorrelationId ( )
float EndZoomFactor ( )
winrt::CompositionAnimation GetAnimation ( ) const
void SetAnimation ( const winrt::CompositionAnimation & animation )
void SetCenterPoint ( const winrt::float2 & centerPoint )
void SetEndZoomFactor ( const float & endZoomFactor )
void SetStartZoomFactor ( const float & startZoomFactor )
void SetZoomFactorChangeCorrelationId ( int32_t zoomFactorChangeCorrelationId )
float StartZoomFactor ( )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingZoomAnimationStartingEventArgs.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingZoomCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingZoomCompletedEventArgs Class Reference

#include "ScrollingZoomCompletedEventArgs.h"

List of all members.

Public Member Functions

ScrollingZoomCompletedEventArgs ()
~ScrollingZoomCompletedEventArgs ()
int32_t | CorrelationId ()
ScrollPresenterViewChangeResult Result ()
void | Result (ScrollPresenterViewChangeResult result)
void | ZoomFactorChangeCorrelationId (int32_t zoomFactorChangeCorrelationId)

Detailed Description

Definition at line 9 of file ScrollingZoomCompletedEventArgs.h.

Constructor & Destructor Documentation

ScrollingZoomCompletedEventArgs ( ) [inline]

Definition at line 13 of file ScrollingZoomCompletedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

~ScrollingZoomCompletedEventArgs ( ) [inline]

Definition at line 18 of file ScrollingZoomCompletedEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

int32_t CorrelationId ( )
void Result ( ScrollPresenterViewChangeResult result )
ScrollPresenterViewChangeResult Result ( )
void ZoomFactorChangeCorrelationId ( int32_t zoomFactorChangeCorrelationId )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingZoomCompletedEventArgs.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingZoomOptions Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingZoomOptions Class Reference

#include "ScrollingZoomOptions.h"

List of all members.

Public Member Functions

ScrollingZoomOptions (winrt::ScrollingAnimationMode const &animationMode)
ScrollingZoomOptions (winrt::ScrollingAnimationMode const &animationMode, winrt::ScrollingSnapPointsMode const &snapPointsMode)
~ScrollingZoomOptions ()
void | AnimationMode (winrt::ScrollingAnimationMode const &animationMode)
winrt::ScrollingAnimationMode | AnimationMode () const
winrt::ScrollingSnapPointsMode | SnapPointsMode () const
void | SnapPointsMode (winrt::ScrollingSnapPointsMode const &snapPointsMode)

Detailed Description

Definition at line 9 of file ScrollingZoomOptions.h.

Constructor & Destructor Documentation

ScrollingZoomOptions ( winrt::ScrollingAnimationMode const & animationMode )
ScrollingZoomOptions | ( | winrt::ScrollingAnimationMode const & | animationMode,
 |  | winrt::ScrollingSnapPointsMode const & | snapPointsMode
 | ) |  |
~ScrollingZoomOptions ( ) [inline]

Definition at line 16 of file ScrollingZoomOptions.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

winrt::ScrollingAnimationMode AnimationMode ( ) const
void AnimationMode ( winrt::ScrollingAnimationMode const & animationMode )
winrt::ScrollingSnapPointsMode SnapPointsMode ( ) const
void SnapPointsMode ( winrt::ScrollingSnapPointsMode const & snapPointsMode )
The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollingZoomOptions.h
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingZoomStartingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollingZoomStartingEventArgs Class Reference

#include "ScrollingZoomStartingEventArgs.h"

List of all members.

Public Member Functions

ScrollingZoomStartingEventArgs ()
~ScrollingZoomStartingEventArgs ()
int32_t | CorrelationId () const
double | HorizontalOffset () const
void | SetCorrelationId (int32_t correlationId)
void | SetHorizontalOffset (double horizontalOffset)
void | SetVerticalOffset (double verticalOffset)
void | SetZoomFactor (float zoomFactor)
double | VerticalOffset () const
float | ZoomFactor () const

Detailed Description

Definition at line 9 of file ScrollingZoomStartingEventArgs.h.

Constructor & Destructor Documentation

ScrollingZoomStartingEventArgs ( ) [inline]

Definition at line 13 of file ScrollingZoomStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

~ScrollingZoomStartingEventArgs ( ) [inline]

Definition at line 18 of file ScrollingZoomStartingEventArgs.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

int32_t CorrelationId ( ) const

Definition at line 7 of file ScrollingZoomStartingEventArgs.cpp.

{
    return m_correlationId;
}

double HorizontalOffset ( ) const

Definition at line 17 of file ScrollingZoomStartingEventArgs.cpp.

{
    return m_horizontalOffset;
}

void SetCorrelationId ( int32_t correlationId )

Definition at line 12 of file ScrollingZoomStartingEventArgs.cpp.

{
    m_correlationId = correlationId;
}

void SetHorizontalOffset ( double horizontalOffset )

Definition at line 22 of file ScrollingZoomStartingEventArgs.cpp.

{
    m_horizontalOffset = horizontalOffset;
}

void SetVerticalOffset ( double verticalOffset )

Definition at line 32 of file ScrollingZoomStartingEventArgs.cpp.

{
    m_verticalOffset = verticalOffset;
}

void SetZoomFactor ( float zoomFactor )

Definition at line 42 of file ScrollingZoomStartingEventArgs.cpp.

{
    m_zoomFactor = zoomFactor;
}

double VerticalOffset ( ) const

Definition at line 27 of file ScrollingZoomStartingEventArgs.cpp.

{
    return m_verticalOffset;
}

float ZoomFactor ( ) const

Definition at line 37 of file ScrollingZoomStartingEventArgs.cpp.

{
    return m_zoomFactor;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollingZoomStartingEventArgs.h
  • ScrollPresenter/ScrollingZoomStartingEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollInputHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

ScrollInputHelper Class Reference

#include "ScrollInputHelper.h"

List of all members.

Public Member Functions

ScrollInputHelper (const ITrackerHandleManager *owner, std::function< void(bool, bool)> infoChangedFunction)
~ScrollInputHelper ()
double | GetContentSize (winrt::Orientation orientation) const
double | GetMaxOverpanOffset (winrt::Orientation orientation) const
double | GetMaxUnderpanOffset (winrt::Orientation orientation) const
double | GetOffsetFromScrollContentElement (const winrt::UIElement &element, winrt::Orientation orientation) const
winrt::hstring | GetSourceOffsetPropertyName (winrt::Orientation orientation) const
winrt::hstring | GetSourceScalePropertyName () const
double | GetViewportSize (winrt::Orientation orientation) const
bool | IsTargetElementInSource () const
void | SetSourceElement (const winrt::UIElement &sourceElement)
void | SetTargetElement (const winrt::UIElement &targetElement)
winrt::CompositionPropertySet | SourcePropertySet () const
winrt::UIElement | TargetElement () const

Private Member Functions

winrt::HorizontalAlignment | ComputeHorizontalContentAlignment () const
winrt::VerticalAlignment | ComputeVerticalContentAlignment () const
winrt::FxZoomMode | ComputeZoomMode () const
void | EnsureInternalSourcePropertySetAndExpressionAnimations ()
winrt::HorizontalAlignment | GetEffectiveHorizontalAlignment () const
winrt::VerticalAlignment | GetEffectiveVerticalAlignment () const
winrt::FxZoomMode | GetEffectiveZoomMode () const
winrt::UIElement | GetScrollContentElement () const
void | HookCompositionTargetRendering ()
void | HookRichEditBoxTextChanged ()
void | HookScrollPresenterContentPropertyChanged ()
void | HookScrollPresenterPropertyChanged ()
void | HookScrollViewerContentPropertyChanged ()
void | HookScrollViewerDirectManipulationCompleted ()
void | HookScrollViewerDirectManipulationStarted ()
void | HookScrollViewerPropertyChanged ()
void | HookSourceControlTemplateChanged ()
void | HookSourceElementLoaded ()
void | HookTargetElementLoaded ()
bool | IsScrollContentPresenterIScrollInfoProvider () const
void | OnCompositionTargetRendering (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnRichEditBoxTextChanged (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnScrollPresenterPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnScrollViewerContentPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnScrollViewerDirectManipulationCompleted (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollViewerDirectManipulationStarted (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollViewerPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnSourceContentSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnSourceElementChanged (bool allowSourceElementLoadedHookup)
void | OnSourceElementLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnSourceElementPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnSourceInfoChanged (bool horizontalInfoChanged, bool verticalInfoChanged, bool zoomInfoChanged)
void | OnSourceSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnTargetElementChanged ()
void | OnTargetElementLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | ProcessContentSizeChange ()
void | ProcessScrollPresenterContentChange ()
void | ProcessScrollViewerContentChange ()
void | ProcessScrollViewerZoomModeChange ()
void | ProcessSourceControlTemplateChange ()
void | ProcessSourceElementChange (bool allowSourceElementLoadedHookup)
void | ProcessTargetElementChange ()
void | SetScrollPresenter (const winrt::ScrollPresenter &scrollPresenter)
void | SetScrollViewer (const winrt::FxScrollViewer &scrollViewer)
void | StartInternalExpressionAnimations (const winrt::CompositionPropertySet &source)
void | StopInternalExpressionAnimations ()
void | UnhookCompositionTargetRendering ()
void | UnhookRichEditBoxTextChanged ()
void | UnhookScrollPresenterContentPropertyChanged ()
void | UnhookScrollPresenterPropertyChanged ()
void | UnhookScrollViewerContentPropertyChanged ()
void | UnhookScrollViewerDirectManipulationCompleted ()
void | UnhookScrollViewerDirectManipulationStarted ()
void | UnhookScrollViewerPropertyChanged ()
void | UnhookSourceControlTemplateChanged ()
void | UnhookSourceElementLoaded ()
void | UnhookTargetElementLoaded ()
void | UpdateContentSize ()
void | UpdateInternalExpressionAnimations (bool horizontalInfoChanged, bool verticalInfoChanged, bool zoomInfoChanged)
void | UpdateIsTargetElementInSource ()
void | UpdateManipulationAlignments ()
void | UpdateManipulationZoomMode ()
void | UpdateOutOfBoundsPanSize ()
void | UpdateSource (bool allowSourceElementLoadedHookup)
void | UpdateViewportSize ()

Static Private Member Functions

static void | GetChildScrollPresenterOrScrollViewer (const winrt::DependencyObject &rootElement, _Out_ winrt::ScrollPresenter *scrollPresenter, _Out_ winrt::FxScrollViewer *scrollViewer)
static winrt::RichEditBox | GetRichEditBoxParent (const winrt::DependencyObject &childElement)

Private Attributes

std::function< void(bool, bool)> | m_infoChangedFunction
const ITrackerHandleManager * | m_owner

Static Private Attributes

static PCWSTR | s_horizontalOffsetPropertyName = "TranslationX"
static PCWSTR | s_scalePropertyName = "Scale"
static PCWSTR | s_verticalOffsetPropertyName = "TranslationY"

Detailed Description

Definition at line 7 of file ScrollInputHelper.h.

Constructor & Destructor Documentation

ScrollInputHelper | ( | const ITrackerHandleManager * | owner,
 |  | std::function< void(bool, bool)> | infoChangedFunction
 | ) |  |

Definition at line 13 of file ScrollInputHelper.cpp.

    :m_owner(owner)
{
    m_infoChangedFunction = infoChangedFunction;
}

~ScrollInputHelper ( )

Definition at line 21 of file ScrollInputHelper.cpp.

{
    UnhookScrollPresenterPropertyChanged();
    UnhookScrollPresenterContentPropertyChanged();
    UnhookScrollViewerPropertyChanged();
    UnhookScrollViewerContentPropertyChanged();
    UnhookScrollViewerDirectManipulationStarted();
    UnhookScrollViewerDirectManipulationCompleted();
    UnhookRichEditBoxTextChanged();
    UnhookSourceControlTemplateChanged();
    UnhookSourceElementLoaded();
    UnhookTargetElementLoaded();
    UnhookCompositionTargetRendering();
}

Member Function Documentation

winrt::HorizontalAlignment ComputeHorizontalContentAlignment ( ) const [private]

Definition at line 738 of file ScrollInputHelper.cpp.

{
    // Panels that implement XAML's internal IScrollInfo interface: OrientedVirtualizingPanel, CarouselPanel, TextBoxView for TextBox, RichTextBox and PasswordBox.

    winrt::HorizontalAlignment horizontalAlignment = winrt::HorizontalAlignment::Stretch;

    // First access the ScrollViewer's HorizontalContentAlignment
    if (m_scrollViewer)
    {
        horizontalAlignment = m_scrollViewer.get().HorizontalContentAlignment();

        // Determine whether the ScrollContentPresenter is the IScrollInfo implementer or not
        if (IsScrollContentPresenterIScrollInfoProvider())
        {
            // When the ScrollContentPresenter is the IScrollInfo implementer,
            // use the horizontal alignment of the manipulated element by default.
            winrt::UIElement scrollContentElement = GetScrollContentElement();

            if (scrollContentElement)
            {
                winrt::FrameworkElement contentAsFrameworkElement = scrollContentElement.try_as<winrt::FrameworkElement>();

                if (contentAsFrameworkElement)
                {
                    horizontalAlignment = contentAsFrameworkElement.HorizontalAlignment();
                }
            }
        }
    }

    return horizontalAlignment;
}

winrt::VerticalAlignment ComputeVerticalContentAlignment ( ) const [private]

Definition at line 772 of file ScrollInputHelper.cpp.

{
    // Panels that implement XAML's internal IScrollInfo interface: OrientedVirtualizingPanel, CarouselPanel, TextBoxView for TextBox, RichTextBox and PasswordBox.

    winrt::VerticalAlignment verticalAlignment = winrt::VerticalAlignment::Stretch;

    // First access the ScrollViewer's VerticalContentAlignment
    if (m_scrollViewer)
    {
        verticalAlignment = m_scrollViewer.get().VerticalContentAlignment();

        // Determine whether the ScrollContentPresenter is the IScrollInfo implementer or not
        if (IsScrollContentPresenterIScrollInfoProvider())
        {
            // When the ScrollContentPresenter is the IScrollInfo implementer,
            // use the vertical alignment of the manipulated element by default.
            winrt::UIElement scrollContentElement = GetScrollContentElement();

            if (scrollContentElement)
            {
                winrt::FrameworkElement contentAsFrameworkElement = scrollContentElement.try_as<winrt::FrameworkElement>();

                if (contentAsFrameworkElement)
                {
                    verticalAlignment = contentAsFrameworkElement.VerticalAlignment();
                }
            }
        }
    }

    return verticalAlignment;
}

winrt::FxZoomMode ComputeZoomMode ( ) const [private]

Definition at line 805 of file ScrollInputHelper.cpp.

{
    return m_scrollViewer ? m_scrollViewer.get().ZoomMode() : winrt::FxZoomMode::Disabled;
}

void EnsureInternalSourcePropertySetAndExpressionAnimations ( ) [private]

Definition at line 848 of file ScrollInputHelper.cpp.

{
    auto targetElement = m_targetElement.get();
    if (!m_internalSourcePropertySet && targetElement)
    {
        winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(targetElement);
        winrt::Compositor compositor = visual.Compositor();

        m_internalSourcePropertySet = compositor.CreatePropertySet();
        m_internalSourcePropertySet.InsertScalar(s_horizontalOffsetPropertyName, 0.0f);
        m_internalSourcePropertySet.InsertScalar(s_verticalOffsetPropertyName, 0.0f);
        m_internalSourcePropertySet.InsertScalar(s_scalePropertyName, 1.0f);

        auto scrollViewer = m_scrollViewer.get();
        m_internalTranslationXExpressionAnimation = compositor.CreateExpressionAnimation(scrollViewer ? L"source.Translation.X" : L"source.MinPosition.X - source.Position.X");
        m_internalTranslationYExpressionAnimation = compositor.CreateExpressionAnimation(scrollViewer ? L"source.Translation.Y" : L"source.MinPosition.Y - source.Position.Y");
        m_internalScaleExpressionAnimation = compositor.CreateExpressionAnimation(scrollViewer ? L"source.Scale.X" : L"source.ZoomFactor");
    }
}

void GetChildScrollPresenterOrScrollViewer | ( | const winrt::DependencyObject & | rootElement,
 |  | _Out_ winrt::ScrollPresenter * | scrollPresenter,
 |  | _Out_ winrt::FxScrollViewer * | scrollViewer |
 | ) |  |  | [static, private]

Definition at line 195 of file ScrollInputHelper.cpp.

{
    *scrollPresenter = nullptr;
    *scrollViewer = nullptr;

    if (rootElement)
    {
        const int childCount = winrt::VisualTreeHelper::GetChildrenCount(rootElement);
        for (int i = 0; i < childCount; i++)
        {
            winrt::DependencyObject current = winrt::VisualTreeHelper::GetChild(rootElement, i);
            *scrollViewer = current.try_as<winrt::FxScrollViewer>();
            if (*scrollViewer)
            {
                return;
            }
            *scrollPresenter = current.try_as<winrt::ScrollPresenter>();
            if (*scrollPresenter)
            {
                return;
            }
        }

        for (int i = 0; i < childCount; i++)
        {
            winrt::DependencyObject current = winrt::VisualTreeHelper::GetChild(rootElement, i);
            ScrollInputHelper::GetChildScrollPresenterOrScrollViewer(
                current,
                scrollPresenter,
                scrollViewer);
            if (*scrollPresenter)
            {
                return;
            }
            if (*scrollViewer)
            {
                return;
            }
        }
    }
}

double GetContentSize ( winrt::Orientation orientation ) const

Definition at line 87 of file ScrollInputHelper.cpp.

{
    return (orientation == winrt::Orientation::Horizontal) ? m_contentSize.Width : m_contentSize.Height;
}

winrt::HorizontalAlignment GetEffectiveHorizontalAlignment ( ) const [private]

Definition at line 261 of file ScrollInputHelper.cpp.

{
    if (m_isScrollViewerInDirectManipulation)
    {
        return m_manipulationHorizontalAlignment;
    }
    else
    {
        return ComputeHorizontalContentAlignment();
    }
}

winrt::VerticalAlignment GetEffectiveVerticalAlignment ( ) const [private]

Definition at line 274 of file ScrollInputHelper.cpp.

{
    if (m_isScrollViewerInDirectManipulation)
    {
        return m_manipulationVerticalAlignment;
    }
    else
    {
        return ComputeVerticalContentAlignment();
    }
}

winrt::FxZoomMode GetEffectiveZoomMode ( ) const [private]

Definition at line 287 of file ScrollInputHelper.cpp.

{
    if (m_isScrollViewerInDirectManipulation)
    {
        return m_manipulationZoomMode;
    }
    else
    {
        return ComputeZoomMode();
    }
}

double GetMaxOverpanOffset ( winrt::Orientation orientation ) const

Definition at line 82 of file ScrollInputHelper.cpp.

{
    return (orientation == winrt::Orientation::Horizontal) ? m_outOfBoundsPanSize.Width : m_outOfBoundsPanSize.Height;
}

double GetMaxUnderpanOffset ( winrt::Orientation orientation ) const

Definition at line 77 of file ScrollInputHelper.cpp.

{
    return (orientation == winrt::Orientation::Horizontal) ? m_outOfBoundsPanSize.Width : m_outOfBoundsPanSize.Height;
}

double GetOffsetFromScrollContentElement | ( | const winrt::UIElement & | element,
 |  | winrt::Orientation | orientation |
 | ) |  |  | const

Definition at line 62 of file ScrollInputHelper.cpp.

{
    const winrt::UIElement scrollContentElement = GetScrollContentElement();

    if (!scrollContentElement)
    {
        return 0.0;
    }

    const winrt::GeneralTransform gt = element.TransformToVisual(scrollContentElement);
    const winrt::Windows::Foundation::Point elementOffset = gt.TransformPoint(winrt::Windows::Foundation::Point(0, 0));

    return orientation == winrt::Orientation::Horizontal ? elementOffset.X : elementOffset.Y;
}

winrt::RichEditBox GetRichEditBoxParent ( const winrt::DependencyObject & childElement ) [static, private]

Definition at line 175 of file ScrollInputHelper.cpp.

{
    if (childElement)
    {
        winrt::DependencyObject parent = winrt::VisualTreeHelper::GetParent(childElement);
        if (parent)
        {
            winrt::RichEditBox richEditBoxParent = parent.try_as<winrt::RichEditBox>();
            if (richEditBoxParent)
            {
                return richEditBoxParent;
            }
            return ScrollInputHelper::GetRichEditBoxParent(parent);
        }
    }

    return nullptr;
}

winrt::UIElement GetScrollContentElement ( ) const [private]

Definition at line 241 of file ScrollInputHelper.cpp.

{
    if (m_scrollViewer)
    {
        winrt::ContentControl scrollViewerAsContentControl = m_scrollViewer.as<winrt::ContentControl>();

        winrt::IInspectable content = scrollViewerAsContentControl.Content();
        if (content)
        {
            return content.try_as<winrt::UIElement>();
        }
    }
    else if (auto scrollPresenter = m_scrollPresenter.get())
    {
        return scrollPresenter.Content();
    }
    return nullptr;
}

winrt::hstring GetSourceOffsetPropertyName ( winrt::Orientation orientation ) const

Definition at line 51 of file ScrollInputHelper.cpp.

{
    return (orientation == winrt::Orientation::Horizontal) ? s_horizontalOffsetPropertyName : s_verticalOffsetPropertyName;
}

winrt::hstring GetSourceScalePropertyName ( ) const

Definition at line 56 of file ScrollInputHelper.cpp.

{
    return s_scalePropertyName;
}

double GetViewportSize ( winrt::Orientation orientation ) const

Definition at line 92 of file ScrollInputHelper.cpp.

{
    return (orientation == winrt::Orientation::Horizontal) ? m_viewportSize.Width : m_viewportSize.Height;
}

void HookCompositionTargetRendering ( ) [private]

Definition at line 1589 of file ScrollInputHelper.cpp.

{
    if (m_renderingToken.value == 0)
    {
        winrt::Microsoft::UI::Xaml::Media::CompositionTarget compositionTarget{ nullptr };

        m_renderingToken = compositionTarget.Rendering({ this, &ScrollInputHelper::OnCompositionTargetRendering });
    }
}

void HookRichEditBoxTextChanged ( ) [private]

Definition at line 1568 of file ScrollInputHelper.cpp.

{
    auto richEditBox = m_richEditBox.get();
    if (richEditBox)
    {
        MUX_ASSERT(m_richEditBoxTextChangedToken.value == 0);

        m_richEditBoxTextChangedToken = richEditBox.TextChanged({ this, &ScrollInputHelper::OnRichEditBoxTextChanged });
    }
}

void HookScrollPresenterContentPropertyChanged ( ) [private]

Definition at line 1471 of file ScrollInputHelper.cpp.

{
    auto sourceContent = m_sourceContent.get();

    if (sourceContent)
    {
        if (m_sourceContentSizeChangedToken.value == 0)
        {
            m_sourceContentSizeChangedToken = sourceContent.SizeChanged({ this, &ScrollInputHelper::OnSourceContentSizeChanged });
        }
    }
}

void HookScrollPresenterPropertyChanged ( ) [private]

Definition at line 1382 of file ScrollInputHelper.cpp.

{
    auto scrollPresenter = m_scrollPresenter.get();

    if (scrollPresenter)
    {
        MUX_ASSERT(m_scrollPresenterContentChangedToken.value == 0);
        MUX_ASSERT(m_sourceSizeChangedToken.value == 0);

        m_scrollPresenterContentChangedToken.value = scrollPresenter.RegisterPropertyChangedCallback(
            winrt::ScrollPresenter::ContentProperty(), { this, &ScrollInputHelper::OnScrollPresenterPropertyChanged });
        m_sourceSizeChangedToken = scrollPresenter.SizeChanged({ this, &ScrollInputHelper::OnSourceSizeChanged });
    }
}

void HookScrollViewerContentPropertyChanged ( ) [private]

Definition at line 1449 of file ScrollInputHelper.cpp.

{
    auto sourceContent = m_sourceContent.get();
    if (sourceContent)
    {
        if (m_scrollViewerContentHorizontalAlignmentChangedToken.value == 0)
        {
            m_scrollViewerContentHorizontalAlignmentChangedToken.value = sourceContent.RegisterPropertyChangedCallback(
                winrt::FrameworkElement::HorizontalAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerContentPropertyChanged });
        }
        if (m_scrollViewerContentVerticalAlignmentChangedToken.value == 0)
        {
            m_scrollViewerContentVerticalAlignmentChangedToken.value = sourceContent.RegisterPropertyChangedCallback(
                winrt::FrameworkElement::VerticalAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerContentPropertyChanged });
        }
        if (m_sourceContentSizeChangedToken.value == 0)
        {
            m_sourceContentSizeChangedToken = sourceContent.SizeChanged({ this, &ScrollInputHelper::OnSourceContentSizeChanged });
        }
    }
}

void HookScrollViewerDirectManipulationCompleted ( ) [private]

Definition at line 1547 of file ScrollInputHelper.cpp.

{
    auto scrollViewer = m_scrollViewer.get();
    if (scrollViewer)
    {
        MUX_ASSERT(m_scrollViewerDirectManipulationCompletedToken.value == 0);

        m_scrollViewerDirectManipulationCompletedToken = scrollViewer.DirectManipulationCompleted({ this, &ScrollInputHelper::OnScrollViewerDirectManipulationCompleted });
    }
}

void HookScrollViewerDirectManipulationStarted ( ) [private]

Definition at line 1526 of file ScrollInputHelper.cpp.

{
    auto scrollViewer = m_scrollViewer.get();
    if (scrollViewer)
    {
        MUX_ASSERT(m_scrollViewerDirectManipulationStartedToken.value == 0);

        m_scrollViewerDirectManipulationStartedToken = scrollViewer.DirectManipulationStarted({ this, &ScrollInputHelper::OnScrollViewerDirectManipulationStarted });
    }
}

void HookScrollViewerPropertyChanged ( ) [private]

Definition at line 1359 of file ScrollInputHelper.cpp.

{
    auto scrollViewer = m_scrollViewer.get();
    if (scrollViewer)
    {
        MUX_ASSERT(m_scrollViewerContentChangedToken.value == 0);
        MUX_ASSERT(m_scrollViewerHorizontalContentAlignmentChangedToken.value == 0);
        MUX_ASSERT(m_scrollViewerVerticalContentAlignmentChangedToken.value == 0);
        MUX_ASSERT(m_scrollViewerZoomModeChangedToken.value == 0);
        MUX_ASSERT(m_sourceSizeChangedToken.value == 0);

        m_scrollViewerContentChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
            winrt::ContentControl::ContentProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
        m_scrollViewerHorizontalContentAlignmentChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
            winrt::Control::HorizontalContentAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
        m_scrollViewerVerticalContentAlignmentChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
            winrt::Control::VerticalContentAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
        m_scrollViewerZoomModeChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
            winrt::FxScrollViewer::ZoomModeProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
        m_sourceSizeChangedToken = scrollViewer.SizeChanged({ this, &ScrollInputHelper::OnSourceSizeChanged });
    }
}

void HookSourceControlTemplateChanged ( ) [private]

Definition at line 1309 of file ScrollInputHelper.cpp.

{
    auto sourceElement = m_sourceElement.get();
    if (sourceElement && m_sourceControlTemplateChangedToken.value == 0)
    {
        m_sourceControlTemplateChangedToken.value = sourceElement.RegisterPropertyChangedCallback(
            winrt::Control::TemplateProperty(), { this, &ScrollInputHelper::OnSourceElementPropertyChanged });
    }
}

void HookSourceElementLoaded ( ) [private]

Definition at line 1280 of file ScrollInputHelper.cpp.

{
    auto sourceElement = m_sourceElement.get();
    if (sourceElement && m_sourceElementLoadedToken.value == 0)
    {
        winrt::FrameworkElement sourceElementAsFrameworkElement = sourceElement.try_as<winrt::FrameworkElement>();

        if (sourceElementAsFrameworkElement)
        {
            m_sourceElementLoadedToken = sourceElementAsFrameworkElement.Loaded({ this, &ScrollInputHelper::OnSourceElementLoaded });
        }
    }
}

void HookTargetElementLoaded ( ) [private]

Definition at line 1329 of file ScrollInputHelper.cpp.

{
    auto targetElement = m_targetElement.get();

    if (targetElement && m_targetElementLoadedToken.value == 0)
    {
        winrt::FrameworkElement targetElementAsFrameworkElement = targetElement.try_as<winrt::FrameworkElement>();

        if (targetElementAsFrameworkElement)
        {
            m_targetElementLoadedToken = targetElementAsFrameworkElement.Loaded({ this, &ScrollInputHelper::OnTargetElementLoaded });
        }
    }
}

bool IsScrollContentPresenterIScrollInfoProvider ( ) const [private]

Definition at line 811 of file ScrollInputHelper.cpp.

{
    if (m_scrollViewer)
    {
        winrt::UIElement scrollContentElement = GetScrollContentElement();

        if (scrollContentElement)
        {
            winrt::ItemsPresenter itemsPresenter = scrollContentElement.try_as<winrt::ItemsPresenter>();

            if (itemsPresenter)
            {
                int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter);

                if (childrenCount > 0)
                {
                    winrt::DependencyObject child = winrt::VisualTreeHelper::GetChild(itemsPresenter, childrenCount == 1 ? 0 : 1);

                    if (child)
                    {
                        winrt::OrientedVirtualizingPanel itemsPanelAsOrientedVirtualizingPanel = child.try_as<winrt::OrientedVirtualizingPanel>();
                        winrt::CarouselPanel itemsPanelAsCarouselPanel = child.try_as<winrt::CarouselPanel>();

                        if (itemsPanelAsOrientedVirtualizingPanel || itemsPanelAsCarouselPanel)
                        {
                            return false;
                        }
                    }
                }
            }
        }
        return true;
    }
    return false;
}

bool IsTargetElementInSource ( ) const

Definition at line 46 of file ScrollInputHelper.cpp.

{
    return m_isTargetElementInSource;
}

void OnCompositionTargetRendering | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 1210 of file ScrollInputHelper.cpp.

{
    // Unhook the Rendering event handler and attempt to find the potential new inner ScrollViewer.
    UnhookCompositionTargetRendering();
    ProcessSourceElementChange(false /*allowSourceElementLoadedHookup*/);
}

void OnRichEditBoxTextChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1205 of file ScrollInputHelper.cpp.

{
    ProcessContentSizeChange();
}

void OnScrollPresenterPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 1253 of file ScrollInputHelper.cpp.

{
    if (args == winrt::ScrollPresenter::ContentProperty())
    {
        ProcessScrollPresenterContentChange();
    }
}

void OnScrollViewerContentPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 1262 of file ScrollInputHelper.cpp.

{
    if (args == winrt::FrameworkElement::HorizontalAlignmentProperty())
    {
        if (!m_isScrollViewerInDirectManipulation)
        {
            UpdateInternalExpressionAnimations(true /*horizontalInfoChanged*/, false /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
        }
    }
    else if (args == winrt::FrameworkElement::VerticalAlignmentProperty())
    {
        if (!m_isScrollViewerInDirectManipulation)
        {
            UpdateInternalExpressionAnimations(false /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
        }
    }
}

void OnScrollViewerDirectManipulationCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 1166 of file ScrollInputHelper.cpp.

{
    // Alignment and zoom mode changes that occurred during this completed manipulation are now taken into account.

    winrt::HorizontalAlignment oldEffectiveHorizontalAlignment = winrt::HorizontalAlignment::Left;
    winrt::VerticalAlignment oldEffectiveVerticalAlignment = winrt::VerticalAlignment::Top;
    winrt::FxZoomMode oldZoomMode = winrt::FxZoomMode::Disabled;

    if (m_targetElement)
    {
        oldEffectiveHorizontalAlignment = GetEffectiveHorizontalAlignment();
        oldEffectiveVerticalAlignment = GetEffectiveVerticalAlignment();
        oldZoomMode = GetEffectiveZoomMode();
    }

    m_isScrollViewerInDirectManipulation = false;

    if (m_targetElement)
    {
        const winrt::FxZoomMode newZoomMode = GetEffectiveZoomMode();

        if (oldZoomMode != newZoomMode)
        {
            ProcessScrollViewerZoomModeChange();
        }

        const winrt::HorizontalAlignment newEffectiveHorizontalAlignment = GetEffectiveHorizontalAlignment();
        const winrt::VerticalAlignment newEffectiveVerticalAlignment = GetEffectiveVerticalAlignment();

        if (oldEffectiveHorizontalAlignment != newEffectiveHorizontalAlignment || oldEffectiveVerticalAlignment != newEffectiveVerticalAlignment)
        {
            UpdateInternalExpressionAnimations(
                oldEffectiveHorizontalAlignment != newEffectiveHorizontalAlignment,
                oldEffectiveVerticalAlignment != newEffectiveVerticalAlignment,
                false /*zoomInfoChanged*/);
        }
    }
}

void OnScrollViewerDirectManipulationStarted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 1156 of file ScrollInputHelper.cpp.

{
    // Alignment and zoom mode changes during a manipulation are ignored until the end of that manipulation.

    m_isScrollViewerInDirectManipulation = true;

    UpdateManipulationAlignments();
    UpdateManipulationZoomMode();
}

void OnScrollViewerPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 1223 of file ScrollInputHelper.cpp.

{
    if (args == winrt::ContentControl::ContentProperty())
    {
        ProcessScrollViewerContentChange();
    }
    else if (args == winrt::FxScrollViewer::ZoomModeProperty())
    {
        if (!m_isScrollViewerInDirectManipulation)
        {
            ProcessScrollViewerZoomModeChange();
        }
    }
    else if (args == winrt::Control::HorizontalContentAlignmentProperty())
    {
        if (!m_isScrollViewerInDirectManipulation)
        {
            UpdateInternalExpressionAnimations(true /*horizontalInfoChanged*/, false /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
        }
    }
    else if (args == winrt::Control::VerticalContentAlignmentProperty())
    {
        if (!m_isScrollViewerInDirectManipulation)
        {
            UpdateInternalExpressionAnimations(false /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
        }
    }
}

void OnSourceContentSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1217 of file ScrollInputHelper.cpp.

{
    ProcessContentSizeChange();
}

void OnSourceElementChanged ( bool allowSourceElementLoadedHookup ) [private]

Definition at line 979 of file ScrollInputHelper.cpp.

{
    auto sourceElement = m_sourceElement.get();
    if (sourceElement)
    {
        winrt::Control sourceAsControl = sourceElement.try_as<winrt::Control>();
        winrt::FxScrollViewer sourceAsScrollViewer = sourceElement.try_as<winrt::FxScrollViewer>();

        if (sourceAsControl && !sourceAsScrollViewer)
        {
            HookSourceControlTemplateChanged();
        }
    }
    else
    {
        // No need to find the inner ScrollViewer at the next UI thread tick.
        UnhookCompositionTargetRendering();
    }

    ProcessSourceElementChange(allowSourceElementLoadedHookup);
}

void OnSourceElementLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1064 of file ScrollInputHelper.cpp.

{
    UnhookSourceElementLoaded();
    ProcessSourceElementChange(false /*allowSourceElementLoadedHookup*/);
}

void OnSourceElementPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 1070 of file ScrollInputHelper.cpp.

{
    if (args == winrt::Control::TemplateProperty())
    {
        ProcessSourceControlTemplateChange();
    }
}

void OnSourceInfoChanged | ( | bool | horizontalInfoChanged,
 |  | bool | verticalInfoChanged,
 |  | bool | zoomInfoChanged |
 | ) |  |  | [private]

Definition at line 1042 of file ScrollInputHelper.cpp.

{
    MUX_ASSERT(horizontalInfoChanged || verticalInfoChanged);

    if ((m_scrollPresenter || m_scrollViewer) && m_targetElement)
    {
        UpdateInternalExpressionAnimations(horizontalInfoChanged, verticalInfoChanged, zoomInfoChanged);
    }

    if (m_infoChangedFunction)
    {
        // Let the ScrollInputHelper consumer know about the characteristic change too.
        m_infoChangedFunction(horizontalInfoChanged, verticalInfoChanged);
    }
}

void OnSourceSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1128 of file ScrollInputHelper.cpp.

{
    const double oldViewportWidth = GetViewportSize(winrt::Orientation::Horizontal);
    const double oldViewportHeight = GetViewportSize(winrt::Orientation::Vertical);
    const double oldUnderpanWidth = GetMaxUnderpanOffset(winrt::Orientation::Horizontal);
    const double oldUnderpanHeight = GetMaxUnderpanOffset(winrt::Orientation::Vertical);
    const double oldOverpanWidth = GetMaxOverpanOffset(winrt::Orientation::Horizontal);
    const double oldOverpanHeight = GetMaxOverpanOffset(winrt::Orientation::Vertical);

    UpdateViewportSize();
    UpdateOutOfBoundsPanSize();

    const bool horizontalInfoChanged =
        oldViewportWidth != GetViewportSize(winrt::Orientation::Horizontal) ||
        oldUnderpanWidth != GetMaxUnderpanOffset(winrt::Orientation::Horizontal) ||
        oldOverpanWidth != GetMaxOverpanOffset(winrt::Orientation::Horizontal);

    const bool verticalInfoChanged =
        oldViewportHeight != GetViewportSize(winrt::Orientation::Vertical) ||
        oldUnderpanHeight != GetMaxUnderpanOffset(winrt::Orientation::Vertical) ||
        oldOverpanHeight != GetMaxOverpanOffset(winrt::Orientation::Vertical);

    if (horizontalInfoChanged || verticalInfoChanged)
    {
        OnSourceInfoChanged(horizontalInfoChanged, verticalInfoChanged, false /*zoomInfoChanged*/);
    }
}

void OnTargetElementChanged ( ) [private]

Definition at line 1002 of file ScrollInputHelper.cpp.

{
    auto scrollViewer = m_scrollViewer.get();
    auto targetElement = m_targetElement.get();
    auto scrollPresenter = m_scrollPresenter.get();
    if (targetElement)
    {
        winrt::DependencyObject parent = winrt::VisualTreeHelper::GetParent(targetElement);
        if (!parent)
        {
            HookTargetElementLoaded();
        }
    }

    if (scrollPresenter || scrollViewer)
    {
        EnsureInternalSourcePropertySetAndExpressionAnimations();
        m_sourcePropertySet = m_internalSourcePropertySet;
        if (targetElement)
        {
            StartInternalExpressionAnimations(scrollViewer ? m_scrollViewerPropertySet : scrollPresenter.ExpressionAnimationSources());
            if (m_isScrollViewerInDirectManipulation)
            {
                UpdateManipulationAlignments();
                UpdateManipulationZoomMode();
            }
        }

        ProcessTargetElementChange();
    }
}

void OnTargetElementLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1058 of file ScrollInputHelper.cpp.

{
    UnhookTargetElementLoaded();
    ProcessTargetElementChange();
}

void ProcessContentSizeChange ( ) [private]

Definition at line 962 of file ScrollInputHelper.cpp.

{
    const double oldContentWidth = GetContentSize(winrt::Orientation::Horizontal);
    const double oldContentHeight = GetContentSize(winrt::Orientation::Vertical);

    UpdateContentSize();

    const double newContentWidth = GetContentSize(winrt::Orientation::Horizontal);
    const double newContentHeight = GetContentSize(winrt::Orientation::Vertical);

    if (oldContentWidth != newContentWidth || oldContentHeight != newContentHeight)
    {
        OnSourceInfoChanged(oldContentWidth != newContentWidth, oldContentHeight != newContentHeight, false /*zoomInfoChanged*/);
    }
}

void ProcessScrollPresenterContentChange ( ) [private]

Definition at line 1100 of file ScrollInputHelper.cpp.

{
    auto scrollPresenter = m_scrollPresenter.get();
    UnhookScrollPresenterContentPropertyChanged();

    m_sourceContent.set(nullptr);

    if (scrollPresenter)
    {
        winrt::UIElement newContent = scrollPresenter.Content();

        if (newContent)
        {
            m_sourceContent.set(newContent.try_as<winrt::FrameworkElement>());

            HookScrollPresenterContentPropertyChanged();
        }
    }

    OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, true /*zoomInfoChanged*/);
}

void ProcessScrollViewerContentChange ( ) [private]

Definition at line 1078 of file ScrollInputHelper.cpp.

{
    UnhookScrollViewerContentPropertyChanged();

    m_sourceContent.set(nullptr);

    auto scrollViewer = m_scrollViewer.get();
    if (scrollViewer)
    {
        winrt::IInspectable newContent = scrollViewer.Content();

        if (newContent)
        {
            m_sourceContent.set(newContent.try_as<winrt::FrameworkElement>());

            HookScrollViewerContentPropertyChanged();
        }
    }

    OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, true /*zoomInfoChanged*/);
}

void ProcessScrollViewerZoomModeChange ( ) [private]

Definition at line 1122 of file ScrollInputHelper.cpp.

{
    UpdateOutOfBoundsPanSize();
    OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
}

void ProcessSourceControlTemplateChange ( ) [private]

Definition at line 1035 of file ScrollInputHelper.cpp.

{
    // Wait for one UI thread tick so the new control template gets applied and the potential inner ScrollViewer can be set.
    HookCompositionTargetRendering();
}

void ProcessSourceElementChange ( bool allowSourceElementLoadedHookup ) [private]

Definition at line 902 of file ScrollInputHelper.cpp.

{
    winrt::CompositionPropertySet oldSourcePropertySet = m_sourcePropertySet;
    const bool oldIsTargetElementInSource = m_isTargetElementInSource;
    const double oldViewportWidth = GetViewportSize(winrt::Orientation::Horizontal);
    const double oldViewportHeight = GetViewportSize(winrt::Orientation::Vertical);
    const double oldContentWidth = GetContentSize(winrt::Orientation::Horizontal);
    const double oldContentHeight = GetContentSize(winrt::Orientation::Vertical);
    const double oldUnderpanWidth = GetMaxUnderpanOffset(winrt::Orientation::Horizontal);
    const double oldUnderpanHeight = GetMaxUnderpanOffset(winrt::Orientation::Vertical);
    const double oldOverpanWidth = GetMaxOverpanOffset(winrt::Orientation::Horizontal);
    const double oldOverpanHeight = GetMaxOverpanOffset(winrt::Orientation::Vertical);

    UnhookSourceElementLoaded();

    UpdateSource(allowSourceElementLoadedHookup);

    if (m_sourcePropertySet != oldSourcePropertySet ||
        m_isTargetElementInSource != oldIsTargetElementInSource)
    {
        OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, true /*zoomInfoChanged*/);
    }
    else
    {
        const bool horizontalInfoChanged =
            oldViewportWidth != GetViewportSize(winrt::Orientation::Horizontal) ||
            oldContentWidth != GetContentSize(winrt::Orientation::Horizontal) ||
            oldUnderpanWidth != GetMaxUnderpanOffset(winrt::Orientation::Horizontal) ||
            oldOverpanWidth != GetMaxOverpanOffset(winrt::Orientation::Horizontal);

        const bool verticalInfoChanged =
            oldViewportHeight != GetViewportSize(winrt::Orientation::Vertical) ||
            oldContentHeight != GetContentSize(winrt::Orientation::Vertical) ||
            oldUnderpanHeight != GetMaxUnderpanOffset(winrt::Orientation::Vertical) ||
            oldOverpanHeight != GetMaxOverpanOffset(winrt::Orientation::Vertical);

        if (horizontalInfoChanged || verticalInfoChanged)
        {
            OnSourceInfoChanged(horizontalInfoChanged, verticalInfoChanged, true /*zoomInfoChanged*/);
        }
    }
}

void ProcessTargetElementChange ( ) [private]

Definition at line 945 of file ScrollInputHelper.cpp.

{
    const bool oldIsTargetElementInSource = m_isTargetElementInSource;

    UpdateIsTargetElementInSource();

    if (m_isTargetElementInSource != oldIsTargetElementInSource)
    {
        OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
    }
    else if (m_targetElement)
    {
        UpdateInternalExpressionAnimations(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
    }
}

void SetScrollPresenter ( const winrt::ScrollPresenter & scrollPresenter ) [private]

Definition at line 154 of file ScrollInputHelper.cpp.

{
    if (scrollPresenter != m_scrollPresenter.get())
    {
        if (m_scrollPresenter)
        {
            UnhookScrollPresenterPropertyChanged();
        }

        m_scrollPresenter.set(scrollPresenter);

        if (scrollPresenter)
        {
            HookScrollPresenterPropertyChanged();
        }

        ProcessScrollPresenterContentChange();
    }
}

void SetScrollViewer ( const winrt::FxScrollViewer & scrollViewer ) [private]

Definition at line 118 of file ScrollInputHelper.cpp.

{
    if (scrollViewer != m_scrollViewer.get())
    {
        if (m_scrollViewer)
        {
            UnhookScrollViewerPropertyChanged();
            UnhookScrollViewerDirectManipulationStarted();
            UnhookScrollViewerDirectManipulationCompleted();
            UnhookRichEditBoxTextChanged();

            m_richEditBox.set(nullptr);
            m_scrollViewerPropertySet = nullptr;
            m_isScrollViewerInDirectManipulation = false;
        }

        m_scrollViewer.set(scrollViewer);

        if (scrollViewer)
        {
            // Check if the ScrollViewer belongs to a RichEditBox so content size changes can be detected
            // via its TextChanged event.
            m_richEditBox.set(ScrollInputHelper::GetRichEditBoxParent(scrollViewer));

            HookScrollViewerPropertyChanged();
            HookScrollViewerDirectManipulationStarted();
            HookScrollViewerDirectManipulationCompleted();
            HookRichEditBoxTextChanged();

            m_scrollViewerPropertySet = winrt::ElementCompositionPreview::GetScrollViewerManipulationPropertySet(scrollViewer);
        }

        ProcessScrollViewerContentChange();
    }
}

void SetSourceElement ( const winrt::UIElement & sourceElement )

Definition at line 97 of file ScrollInputHelper.cpp.

{
    if (m_sourceElement.get() != sourceElement)
    {
        UnhookSourceControlTemplateChanged();

        m_sourceElement.set(sourceElement);
        OnSourceElementChanged(true /*allowSourceElementLoadedHookup*/);
    }
}

void SetTargetElement ( const winrt::UIElement & targetElement )

Definition at line 108 of file ScrollInputHelper.cpp.

{
    if (m_targetElement.get() != targetElement)
    {
        UnhookTargetElementLoaded();
        m_targetElement.set(targetElement);
        OnTargetElementChanged();
    }
}

winrt::CompositionPropertySet SourcePropertySet ( ) const

Definition at line 41 of file ScrollInputHelper.cpp.

{
    return m_sourcePropertySet;
}

void StartInternalExpressionAnimations ( const winrt::CompositionPropertySet & source ) [private]

Definition at line 869 of file ScrollInputHelper.cpp.

{
    if (m_internalSourcePropertySet && source)
    {
        m_internalTranslationXExpressionAnimation.SetReferenceParameter(L"source", source);
        m_internalTranslationYExpressionAnimation.SetReferenceParameter(L"source", source);
        m_internalScaleExpressionAnimation.SetReferenceParameter(L"source", source);

        m_internalSourcePropertySet.StopAnimation(s_horizontalOffsetPropertyName);
        m_internalSourcePropertySet.StopAnimation(s_verticalOffsetPropertyName);
        m_internalSourcePropertySet.StopAnimation(s_scalePropertyName);

        m_internalSourcePropertySet.StartAnimation(s_horizontalOffsetPropertyName, m_internalTranslationXExpressionAnimation);
        m_internalSourcePropertySet.StartAnimation(s_verticalOffsetPropertyName, m_internalTranslationYExpressionAnimation);
        m_internalSourcePropertySet.StartAnimation(s_scalePropertyName, m_internalScaleExpressionAnimation);
    }
}

void StopInternalExpressionAnimations ( ) [private]

Definition at line 888 of file ScrollInputHelper.cpp.

{
    if (m_internalSourcePropertySet)
    {
        m_internalSourcePropertySet.StopAnimation(s_horizontalOffsetPropertyName);
        m_internalSourcePropertySet.StopAnimation(s_verticalOffsetPropertyName);
        m_internalSourcePropertySet.StopAnimation(s_scalePropertyName);

        m_internalSourcePropertySet.InsertScalar(s_horizontalOffsetPropertyName, 0.0f);
        m_internalSourcePropertySet.InsertScalar(s_verticalOffsetPropertyName, 0.0f);
        m_internalSourcePropertySet.InsertScalar(s_scalePropertyName, 1.0f);
    }
}

winrt::UIElement TargetElement ( ) const

Definition at line 36 of file ScrollInputHelper.cpp.

{
    return m_targetElement.get();
}

void UnhookCompositionTargetRendering ( ) [private]

Definition at line 1599 of file ScrollInputHelper.cpp.

{
    if (m_renderingToken.value != 0)
    {
        winrt::Microsoft::UI::Xaml::Media::CompositionTarget compositionTarget{ nullptr };

        compositionTarget.Rendering(m_renderingToken);
        m_renderingToken.value = 0;
    }
}

void UnhookRichEditBoxTextChanged ( ) [private]

Definition at line 1579 of file ScrollInputHelper.cpp.

{
    auto richEditBox = m_richEditBox.safe_get();
    if (richEditBox && m_richEditBoxTextChangedToken.value != 0)
    {
        richEditBox.TextChanged(m_richEditBoxTextChangedToken);
        m_richEditBoxTextChangedToken.value = 0;
    }
}

void UnhookScrollPresenterContentPropertyChanged ( ) [private]

Definition at line 1512 of file ScrollInputHelper.cpp.

{
    auto sourceContent = m_sourceContent.safe_get();

    if (sourceContent)
    {
        if (m_sourceContentSizeChangedToken.value != 0)
        {
            sourceContent.SizeChanged(m_sourceContentSizeChangedToken);
            m_sourceContentSizeChangedToken.value = 0;
        }
    }
}

void UnhookScrollPresenterPropertyChanged ( ) [private]

Definition at line 1430 of file ScrollInputHelper.cpp.

{
    auto scrollPresenter = m_scrollPresenter.safe_get();

    if (scrollPresenter)
    {
        if (m_scrollPresenterContentChangedToken.value != 0)
        {
            scrollPresenter.UnregisterPropertyChangedCallback(winrt::ScrollPresenter::ContentProperty(), m_scrollPresenterContentChangedToken.value);
            m_scrollPresenterContentChangedToken.value = 0;
        }
        if (m_sourceSizeChangedToken.value != 0)
        {
            scrollPresenter.SizeChanged(m_sourceSizeChangedToken);
            m_sourceSizeChangedToken.value = 0;
        }
    }
}

void UnhookScrollViewerContentPropertyChanged ( ) [private]

Definition at line 1484 of file ScrollInputHelper.cpp.

{
    auto sourceContent = m_sourceContent.safe_get();

    if (sourceContent)
    {
        if (m_scrollViewerContentHorizontalAlignmentChangedToken.value != 0)
        {
            sourceContent.UnregisterPropertyChangedCallback(winrt::FrameworkElement::HorizontalAlignmentProperty(), m_scrollViewerContentHorizontalAlignmentChangedToken.value);
            m_scrollViewerContentHorizontalAlignmentChangedToken.value = 0;
        }
        if (m_scrollViewerContentVerticalAlignmentChangedToken.value != 0)
        {
            sourceContent.UnregisterPropertyChangedCallback(winrt::FrameworkElement::VerticalAlignmentProperty(), m_scrollViewerContentVerticalAlignmentChangedToken.value);
            m_scrollViewerContentVerticalAlignmentChangedToken.value = 0;
        }
        if (m_sourceContentSizeChangedToken.value != 0)
        {
            sourceContent.SizeChanged(m_sourceContentSizeChangedToken);
            m_sourceContentSizeChangedToken.value = 0;
        }
    }
}

void UnhookScrollViewerDirectManipulationCompleted ( ) [private]

Definition at line 1558 of file ScrollInputHelper.cpp.

{
    auto scrollViewer = m_scrollViewer.safe_get();
    if (scrollViewer && m_scrollViewerDirectManipulationCompletedToken.value != 0)
    {
        scrollViewer.DirectManipulationCompleted(m_scrollViewerDirectManipulationCompletedToken);
        m_scrollViewerDirectManipulationCompletedToken.value = 0;
    }
}

void UnhookScrollViewerDirectManipulationStarted ( ) [private]

Definition at line 1537 of file ScrollInputHelper.cpp.

{
    auto scrollViewer = m_scrollViewer.safe_get();
    if (scrollViewer && m_scrollViewerDirectManipulationStartedToken.value != 0)
    {
        scrollViewer.DirectManipulationStarted(m_scrollViewerDirectManipulationStartedToken);
        m_scrollViewerDirectManipulationStartedToken.value = 0;
    }
}

void UnhookScrollViewerPropertyChanged ( ) [private]

Definition at line 1397 of file ScrollInputHelper.cpp.

{
    auto scrollViewer = m_scrollViewer.safe_get();
    if (scrollViewer)
    {
        if (m_scrollViewerContentChangedToken.value != 0)
        {
            scrollViewer.UnregisterPropertyChangedCallback(winrt::ContentControl::ContentProperty(), m_scrollViewerContentChangedToken.value);
            m_scrollViewerContentChangedToken.value = 0;
        }
        if (m_scrollViewerHorizontalContentAlignmentChangedToken.value != 0)
        {
            scrollViewer.UnregisterPropertyChangedCallback(winrt::Control::HorizontalContentAlignmentProperty(), m_scrollViewerHorizontalContentAlignmentChangedToken.value);
            m_scrollViewerHorizontalContentAlignmentChangedToken.value = 0;
        }
        if (m_scrollViewerVerticalContentAlignmentChangedToken.value != 0)
        {
            scrollViewer.UnregisterPropertyChangedCallback(winrt::Control::VerticalContentAlignmentProperty(), m_scrollViewerVerticalContentAlignmentChangedToken.value);
            m_scrollViewerVerticalContentAlignmentChangedToken.value = 0;
        }
        if (m_scrollViewerZoomModeChangedToken.value != 0)
        {
            scrollViewer.UnregisterPropertyChangedCallback(winrt::FxScrollViewer::ZoomModeProperty(), m_scrollViewerZoomModeChangedToken.value);
            m_scrollViewerZoomModeChangedToken.value = 0;
        }
        if (m_sourceSizeChangedToken.value != 0)
        {
            scrollViewer.SizeChanged(m_sourceSizeChangedToken);
            m_sourceSizeChangedToken.value = 0;
        }
    }
}

void UnhookSourceControlTemplateChanged ( ) [private]

Definition at line 1319 of file ScrollInputHelper.cpp.

{
    auto sourceElement = m_sourceElement.safe_get();
    if (sourceElement && m_sourceControlTemplateChangedToken.value != 0)
    {
        sourceElement.UnregisterPropertyChangedCallback(winrt::Control::TemplateProperty(), m_sourceControlTemplateChangedToken.value);
        m_sourceControlTemplateChangedToken.value = 0;
    }
}

void UnhookSourceElementLoaded ( ) [private]

Definition at line 1294 of file ScrollInputHelper.cpp.

{
    auto sourceElement = m_sourceElement.safe_get();
    if (sourceElement && m_sourceElementLoadedToken.value != 0)
    {
        winrt::FrameworkElement sourceElementAsFrameworkElement = sourceElement.try_as<winrt::FrameworkElement>();

        if (sourceElementAsFrameworkElement)
        {
            sourceElementAsFrameworkElement.Loaded(m_sourceElementLoadedToken);
            m_sourceElementLoadedToken.value = 0;
        }
    }
}

void UnhookTargetElementLoaded ( ) [private]

Definition at line 1344 of file ScrollInputHelper.cpp.

{
    auto targetElement = m_targetElement.safe_get();
    if (targetElement && m_targetElementLoadedToken.value != 0)
    {
        winrt::FrameworkElement targetElementAsFrameworkElement = targetElement.try_as<winrt::FrameworkElement>();

        if (targetElementAsFrameworkElement)
        {
            targetElementAsFrameworkElement.Loaded(m_targetElementLoadedToken);
            m_targetElementLoadedToken.value = 0;
        }
    }
}

void UpdateContentSize ( ) [private]

Definition at line 332 of file ScrollInputHelper.cpp.

{
    m_contentSize.Width = m_contentSize.Height = 0.0f;
    auto scrollPresenter = m_scrollPresenter.get();

    if (!scrollPresenter && !m_scrollViewer)
    {
        return;
    }

    if (scrollPresenter)
    {
        winrt::CompositionPropertySet scrollPresenterPropertySet = scrollPresenter.ExpressionAnimationSources();
        winrt::float2 extent{};

        const winrt::CompositionGetValueStatus status = scrollPresenterPropertySet.TryGetVector2(ScrollPresenter::s_extentSourcePropertyName, extent);
        if (status == winrt::CompositionGetValueStatus::Succeeded)
        {
            m_contentSize.Width = extent.x;
            m_contentSize.Height = extent.y;
        }
        return;
    }
    auto scrollViewer = m_scrollViewer.get();
    const float extentWidth = static_cast<float>(scrollViewer.ExtentWidth());
    const float extentHeight = static_cast<float>(scrollViewer.ExtentHeight());

    winrt::UIElement scrollContentElement = GetScrollContentElement();
    winrt::ItemsPresenter itemsPresenter = scrollContentElement ? (scrollContentElement.try_as<winrt::ItemsPresenter>()) : nullptr;

    if (!scrollContentElement || !itemsPresenter)
    {
        m_contentSize.Width = extentWidth;
        m_contentSize.Height = extentHeight;
        return;
    }

    int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter);

    if (childrenCount > 0)
    {
        winrt::DependencyObject child = winrt::VisualTreeHelper::GetChild(itemsPresenter, childrenCount == 1 ? 0 : 1);

        if (child)
        {
            winrt::VirtualizingStackPanel virtualizingStackPanel = child.try_as<winrt::VirtualizingStackPanel>();

            if (virtualizingStackPanel)
            {
                // VirtualizingStackPanel are handled specially because the ScrollViewer.ExtentWidth/ExtentHeight is unit-based instead
                // of pixel-based in the virtualized dimension. The computed size accounts for the potential margins, header and footer.
                double virtualizingSize = 0.0;
                const winrt::Thickness vspMargin = virtualizingStackPanel.Margin();
                const winrt::Thickness itMargin = itemsPresenter.Margin();

                if (virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal)
                {
                    virtualizingSize = virtualizingStackPanel.ExtentWidth() * virtualizingStackPanel.ActualWidth() / virtualizingStackPanel.ViewportWidth() +
                        vspMargin.Left + vspMargin.Right + itMargin.Left + itMargin.Right;
                }
                else
                {
                    virtualizingSize = virtualizingStackPanel.ExtentHeight() * virtualizingStackPanel.ActualHeight() / virtualizingStackPanel.ViewportHeight() +
                        vspMargin.Top + vspMargin.Bottom + itMargin.Top + itMargin.Bottom;
                }

                if (childrenCount > 1)
                {
                    child = winrt::VisualTreeHelper::GetChild(itemsPresenter, 0);

                    if (child)
                    {
                        winrt::FrameworkElement headerChild = child.try_as<winrt::FrameworkElement>();

                        if (headerChild)
                        {
                            virtualizingSize += virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal ? headerChild.ActualWidth() : headerChild.ActualHeight();
                        }
                    }
                }

                if (childrenCount > 2)
                {
                    child = winrt::VisualTreeHelper::GetChild(itemsPresenter, 2);

                    if (child)
                    {
                        winrt::FrameworkElement footerChild = child.try_as<winrt::FrameworkElement>();

                        if (footerChild)
                        {
                            virtualizingSize += virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal ? footerChild.ActualWidth() : footerChild.ActualHeight();
                        }
                    }
                }

                if (virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal)
                {
                    m_contentSize.Width = static_cast<float>(virtualizingSize);
                    m_contentSize.Height = extentHeight;
                }
                else
                {
                    m_contentSize.Width = extentWidth;
                    m_contentSize.Height = static_cast<float>(virtualizingSize);
                }

                return;
            }
        }
    }

    m_contentSize.Width = extentWidth;
    m_contentSize.Height = extentHeight;
}

void UpdateInternalExpressionAnimations | ( | bool | horizontalInfoChanged,
 |  | bool | verticalInfoChanged,
 |  | bool | zoomInfoChanged |
 | ) |  |  | [private]

Definition at line 643 of file ScrollInputHelper.cpp.

{
    bool restartAnimations = false;

    if (m_scrollViewer)
    {
        if (horizontalInfoChanged && m_internalTranslationXExpressionAnimation)
        {
            switch (GetEffectiveHorizontalAlignment())
            {
            case winrt::HorizontalAlignment::Left:
                m_internalTranslationXExpressionAnimation.Expression(L"source.Translation.X");
                break;

            case winrt::HorizontalAlignment::Stretch:
            case winrt::HorizontalAlignment::Center:
                m_internalTranslationXExpressionAnimation.Expression(
                    L"source.Translation.X + ((contentWidth * source.Scale.X - viewportWidth) < 0.0f ? (contentWidth * source.Scale.X - viewportWidth) / 2.0f : 0.0f)");
                m_internalTranslationXExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Horizontal)));
                m_internalTranslationXExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Horizontal)));
                break;

            case winrt::HorizontalAlignment::Right:
                m_internalTranslationXExpressionAnimation.Expression(L"source.Translation.X + ((contentWidth * source.Scale.X - viewportWidth) < 0.0f ? (contentWidth * source.Scale.X - viewportWidth) : 0.0f)");
                m_internalTranslationXExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Horizontal)));
                m_internalTranslationXExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Horizontal)));
                break;
            }
            restartAnimations = true;
        }

        if (verticalInfoChanged && m_internalTranslationYExpressionAnimation)
        {
            switch (GetEffectiveVerticalAlignment())
            {
            case winrt::VerticalAlignment::Top:
                m_internalTranslationYExpressionAnimation.Expression(L"source.Translation.Y");
                break;

            case winrt::VerticalAlignment::Stretch:
            case winrt::VerticalAlignment::Center:
                m_internalTranslationYExpressionAnimation.Expression(
                    L"source.Translation.Y + ((contentWidth * source.Scale.Y - viewportWidth) < 0.0f ? (contentWidth * source.Scale.Y - viewportWidth) / 2.0f : 0.0f)");
                m_internalTranslationYExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Vertical)));
                m_internalTranslationYExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Vertical)));
                break;

            case winrt::VerticalAlignment::Bottom:
                m_internalTranslationYExpressionAnimation.Expression(
                    L"source.Translation.Y + ((contentWidth * source.Scale.Y - viewportWidth) < 0.0f ? (contentWidth * source.Scale.Y - viewportWidth) : 0.0f)");
                m_internalTranslationYExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Vertical)));
                m_internalTranslationYExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Vertical)));
                break;
            }
            restartAnimations = true;
        }

        if (zoomInfoChanged && m_internalScaleExpressionAnimation)
        {
            m_internalScaleExpressionAnimation.Expression(L"source.Scale.X");
            restartAnimations = true;
        }

        if (restartAnimations && m_targetElement)
        {
            StartInternalExpressionAnimations(m_scrollViewerPropertySet);
        }
    }
    else if (auto scrollPresenter = m_scrollPresenter.get())
    {
        if (horizontalInfoChanged && m_internalTranslationXExpressionAnimation)
        {
            m_internalTranslationXExpressionAnimation.Expression(L"source.MinPosition.X - source.Position.X");
            restartAnimations = true;
        }
        if (verticalInfoChanged && m_internalTranslationYExpressionAnimation)
        {
            m_internalTranslationYExpressionAnimation.Expression(L"source.MinPosition.Y - source.Position.Y");
            restartAnimations = true;
        }

        if (zoomInfoChanged && m_internalScaleExpressionAnimation)
        {
            m_internalScaleExpressionAnimation.Expression(L"source.ZoomFactor");
            restartAnimations = true;
        }

        if (restartAnimations && m_targetElement)
        {
            StartInternalExpressionAnimations(scrollPresenter.ExpressionAnimationSources());
        }
    }
}

void UpdateIsTargetElementInSource ( ) [private]

Definition at line 577 of file ScrollInputHelper.cpp.

{
    auto targetElement = m_targetElement.get();

    if (targetElement)
    {
        bool sourceIsScrollViewer = m_scrollViewer != nullptr;
        bool sourceIsScrollPresenter = m_scrollPresenter != nullptr;

        if (sourceIsScrollViewer || sourceIsScrollPresenter)
        {
            winrt::DependencyObject parent = targetElement;
            do
            {
                parent = winrt::VisualTreeHelper::GetParent(parent);
                if (parent)
                {
                    if (sourceIsScrollViewer)
                    {
                        winrt::FxScrollViewer parentAsScrollViewer = parent.try_as<winrt::FxScrollViewer>();

                        if (parentAsScrollViewer == m_scrollViewer.get())
                        {
                            m_isTargetElementInSource = true;
                            return;
                        }
                    }
                    else
                    {
                        winrt::ScrollPresenter parentAsScrollPresenter = parent.try_as<winrt::ScrollPresenter>();

                        if (parentAsScrollPresenter == m_scrollPresenter.get())
                        {
                            m_isTargetElementInSource = true;
                            return;
                        }
                    }
                }
            } while (parent);
        }
    }

    m_isTargetElementInSource = false;
}

void UpdateManipulationAlignments ( ) [private]

Definition at line 632 of file ScrollInputHelper.cpp.

{
    if (m_targetElement)
    {
        m_manipulationHorizontalAlignment = ComputeHorizontalContentAlignment();
        m_manipulationVerticalAlignment = ComputeVerticalContentAlignment();
    }
}

void UpdateManipulationZoomMode ( ) [private]

Definition at line 623 of file ScrollInputHelper.cpp.

{
    if (m_targetElement)
    {
        m_manipulationZoomMode = ComputeZoomMode();
    }
}

void UpdateOutOfBoundsPanSize ( ) [private]

Definition at line 300 of file ScrollInputHelper.cpp.

{
    if (m_scrollPresenter || m_scrollViewer)
    {
        const double viewportWith = GetViewportSize(winrt::Orientation::Horizontal);
        const double viewportHeight = GetViewportSize(winrt::Orientation::Vertical);

        if (m_scrollViewer && GetEffectiveZoomMode() == winrt::FxZoomMode::Disabled)
        {
            // A ScrollViewer can under/overpan up to 10% of its viewport size
            m_outOfBoundsPanSize.Width = static_cast<float>(0.1 * viewportWith);
            m_outOfBoundsPanSize.Height = static_cast<float>(0.1 * viewportHeight);
        }
        else
        {
            // When zooming is allowed for a ScrollViewer, or in general for the ScrollPresenter,
            // the content can be pushed all the way to the edge of the screen with two fingers,
            // but we limit the offset to one viewport size.
            // Note that if in the future, the ScrollPresenter's underpan & overpan limits become customizable,
            // its ExpressionAnimationSources property set will have to expose those custom limits.
            // The values would then be consumed here for a more accurate ParallaxView behavior.
            m_outOfBoundsPanSize.Width = static_cast<float>(viewportWith);
            m_outOfBoundsPanSize.Height = static_cast<float>(viewportHeight);
        }
    }
    else
    {
        m_outOfBoundsPanSize.Width = m_outOfBoundsPanSize.Height = 0.0f;
    }
}

void UpdateSource ( bool allowSourceElementLoadedHookup ) [private]

Definition at line 520 of file ScrollInputHelper.cpp.

{
    winrt::ScrollPresenter scrollPresenter = nullptr;
    winrt::FxScrollViewer scrollViewer = nullptr;
    auto sourceElement = m_sourceElement.get();
    if (sourceElement)
    {
        scrollPresenter = sourceElement.try_as<winrt::ScrollPresenter>();
        scrollViewer = sourceElement.try_as<winrt::FxScrollViewer>();
    }

    if (scrollPresenter || scrollViewer)
    {
        SetScrollPresenter(scrollPresenter);
        SetScrollViewer(scrollViewer);
    }
    else if (sourceElement)
    {
        ScrollInputHelper::GetChildScrollPresenterOrScrollViewer(
            sourceElement,
            &scrollPresenter,
            &scrollViewer);
        SetScrollPresenter(scrollPresenter);
        SetScrollViewer(scrollViewer);
    }
    else
    {
        SetScrollPresenter(nullptr);
        SetScrollViewer(nullptr);
    }

    if (allowSourceElementLoadedHookup &&
        !scrollPresenter &&
        !m_scrollViewer)
    {
        HookSourceElementLoaded();
    }

    if (!scrollPresenter && !m_scrollViewer)
    {
        StopInternalExpressionAnimations();
        m_sourcePropertySet = nullptr;
    }
    else if (m_targetElement)
    {
        EnsureInternalSourcePropertySetAndExpressionAnimations();
        m_sourcePropertySet = m_internalSourcePropertySet;
        StartInternalExpressionAnimations(m_scrollViewer ? m_scrollViewerPropertySet : scrollPresenter.ExpressionAnimationSources());
    }

    UpdateIsTargetElementInSource();
    UpdateContentSize();
    UpdateViewportSize();
    UpdateOutOfBoundsPanSize();
}

void UpdateViewportSize ( ) [private]

Definition at line 449 of file ScrollInputHelper.cpp.

{
    auto scrollPresenter = m_scrollPresenter.get();
    if (scrollPresenter)
    {
        winrt::CompositionPropertySet scrollPresenterPropertySet = scrollPresenter.ExpressionAnimationSources();
        winrt::float2 viewport{};

        const winrt::CompositionGetValueStatus status = scrollPresenterPropertySet.TryGetVector2(ScrollPresenter::s_viewportSourcePropertyName, viewport);
        if (status == winrt::CompositionGetValueStatus::Succeeded)
        {
            m_viewportSize.Width = viewport.x;
            m_viewportSize.Height = viewport.y;
        }
        return;
    }

    if (m_scrollViewer)
    {
        auto scrollViewer = m_scrollViewer.get();
        winrt::UIElement scrollContentElement = GetScrollContentElement();

        if (scrollContentElement)
        {
            winrt::ItemsPresenter itemsPresenter = scrollContentElement.try_as<winrt::ItemsPresenter>();

            if (itemsPresenter)
            {
                int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter);

                if (childrenCount > 0)
                {
                    winrt::DependencyObject child = winrt::VisualTreeHelper::GetChild(itemsPresenter, childrenCount == 1 ? 0 : 1);

                    if (child)
                    {
                        winrt::VirtualizingStackPanel virtualizingStackPanel = child.try_as<winrt::VirtualizingStackPanel>();

                        if (virtualizingStackPanel)
                        {
                            // VirtualizingStackPanel are handled specially because the ScrollViewer.ViewportWidth/ViewportHeight is unit-based instead
                            // of pixel-based in the virtualized dimension. The computed size accounts for the potential margins.
                            const winrt::Thickness itMargin = itemsPresenter.Margin();

                            if (virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal)
                            {
                                m_viewportSize.Width = static_cast<float>(itemsPresenter.ActualWidth() + itMargin.Left + itMargin.Right);
                                m_viewportSize.Height = static_cast<float>(scrollViewer.ViewportHeight());
                            }
                            else
                            {
                                m_viewportSize.Width = static_cast<float>(scrollViewer.ViewportWidth());
                                m_viewportSize.Height = static_cast<float>(itemsPresenter.ActualHeight() + itMargin.Top + itMargin.Bottom);
                            }
                            return;
                        }
                    }
                }
            }
        }
        m_viewportSize.Width = static_cast<float>(scrollViewer.ViewportWidth());
        m_viewportSize.Height = static_cast<float>(scrollViewer.ViewportHeight());
    }
    else
    {
        m_viewportSize.Width = m_viewportSize.Height = 0.0f;
    }
}

Member Data Documentation

std::function<void(bool, bool)> m_infoChangedFunction [private]

Definition at line 112 of file ScrollInputHelper.h.

const ITrackerHandleManager* m_owner [private]

Definition at line 111 of file ScrollInputHelper.h.

PCWSTR s_horizontalOffsetPropertyName = "TranslationX" [static, private]

Definition at line 114 of file ScrollInputHelper.h.

PCWSTR s_scalePropertyName = "Scale" [static, private]

Definition at line 156 of file ScrollInputHelper.h.

PCWSTR s_verticalOffsetPropertyName = "TranslationY" [static, private]

Definition at line 155 of file ScrollInputHelper.h.

The documentation for this class was generated from the following files:
  • ParallaxView/ScrollInputHelper.h
  • ParallaxView/ScrollInputHelper.cpp
Generated on Sun Dec 1 2024 20:53:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes

ScrollPresenter Class Reference

#include "ScrollPresenter.h"

Inherits ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface >, and ScrollPresenterProperties.

List of all members.

Public Types

enum ScrollPresenterDimension {
HorizontalScroll, VerticalScroll, HorizontalZoomFactor, VerticalZoomFactor,
Scroll, ZoomFactor
}

Public Member Functions

ScrollPresenter ()
~ScrollPresenter ()
int32_t | AddScrollVelocity (winrt::float2 offsetsVelocity, winrt::IReference< winrt::float2 > inertiaDecayRate)
int32_t | AddZoomVelocity (float zoomFactorVelocity, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate)
winrt::UIElement | AnchorElement ()
winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
template<typename T >
double | ComputeValueAfterSnapPoints (double value, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> const &snapPointsSet)
void | ConfigurationChanged (winrt::event_token const &token)
winrt::event_token | ConfigurationChanged (winrt::ConfigurationChangedEventHandler const &value)
winrt::UIElement | CurrentAnchor ()
void | CustomAnimationStateEntered (const winrt::InteractionTrackerCustomAnimationStateEnteredArgs &args)
winrt::CompositionPropertySet | ExpressionAnimationSources ()
double | ExtentHeight () const
double | ExtentWidth () const
winrt::float2 | GetArrangeRenderSizesDeltaDbg ()
winrt::IVector
< winrt::ScrollSnapPointBase > 		GetConsolidatedHorizontalScrollSnapPointsDbg ()
winrt::IVector
< winrt::ScrollSnapPointBase > 		GetConsolidatedScrollSnapPointsDbg (ScrollPresenterDimension dimension)
winrt::IVector
< winrt::ScrollSnapPointBase > 		GetConsolidatedVerticalScrollSnapPointsDbg ()
winrt::IVector
< winrt::ZoomSnapPointBase > 		GetConsolidatedZoomSnapPointsDbg ()
float | GetContentLayoutOffsetXDbg () const
float | GetContentLayoutOffsetYDbg () const
std::shared_ptr
< SnapPointWrapper
< winrt::ScrollSnapPointBase > > 		GetHorizontalSnapPointWrapperDbg (winrt::ScrollSnapPointBase const &scrollSnapPoint)
template<typename T >
winrt::InteractionTrackerInertiaRestingValue | GetInertiaRestingValue (std::shared_ptr< SnapPointWrapper< T >> snapPointWrapper, winrt::Compositor const &compositor, winrt::hstring const &target, winrt::hstring const &scale) const
winrt::float2 | GetMaxPositionDbg ()
winrt::hstring | GetMaxPositionExpressionAnimationExpressionDbg () const
winrt::float2 | GetMinPositionDbg ()
winrt::hstring | GetMinPositionExpressionAnimationExpressionDbg () const
winrt::float2 | GetPositionDbg ()
winrt::Rect | GetRelativeViewport (winrt::UIElement const &content)
std::shared_ptr
< SnapPointWrapper
< winrt::ScrollSnapPointBase > > 		GetScrollSnapPointWrapperDbg (ScrollPresenterDimension dimension, winrt::ScrollSnapPointBase const &scrollSnapPoint)
winrt::hstring | GetTransformExpressionAnimationExpressionDbg () const
std::shared_ptr
< SnapPointWrapper
< winrt::ScrollSnapPointBase > > 		GetVerticalSnapPointWrapperDbg (winrt::ScrollSnapPointBase const &scrollSnapPoint)
double | GetZoomedExtentHeight () const
double | GetZoomedExtentWidth () const
std::shared_ptr
< SnapPointWrapper
< winrt::ZoomSnapPointBase > > 		GetZoomSnapPointWrapperDbg (winrt::ZoomSnapPointBase const &zoomSnapPoint)
double | HorizontalOffset () const
winrt::IScrollController | HorizontalScrollController () const
void | HorizontalScrollController (winrt::IScrollController const &value)
winrt::IVector
< winrt::ScrollSnapPointBase > 		HorizontalSnapPoints ()
void | IdleStateEntered (const winrt::InteractionTrackerIdleStateEnteredArgs &args)
winrt::ScrollingInputKinds | IgnoredInputKinds () const
void | IgnoredInputKinds (winrt::ScrollingInputKinds const &value)
void | InertiaStateEntered (const winrt::InteractionTrackerInertiaStateEnteredArgs &args)
void | InteractingStateEntered (const winrt::InteractionTrackerInteractingStateEnteredArgs &args)
bool | IsElementValidAnchor (const winrt::UIElement &element)
bool | IsHorizontallyScrollable ()
bool | IsVerticallyScrollable ()
void | LineDown ()
void | LineLeft ()
void | LineRight ()
void | LineUp ()
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | OnContentPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | PageDown ()
void | PageLeft ()
void | PageRight ()
void | PageUp ()
void | Parent (winrt::Controls::IScrollAnchorProvider const &value)
winrt::Controls::IScrollAnchorProvider | Parent ()
winrt::event_token | PostArrange (winrt::PostArrangeEventHandler const &value)
void | PostArrange (winrt::event_token const &token)
template<typename T >
void | RegenerateSnapPointsSet (winrt::IObservableVector< T > const &userVector, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *internalSet)
void | RegisterAnchorCandidate (winrt::UIElement const &element)
void | RequestIgnored (const winrt::InteractionTrackerRequestIgnoredArgs &args)
double | ScrollableHeight () const
double | ScrollableWidth () const
int32_t | ScrollBy (double horizontalOffsetDelta, double verticalOffsetDelta)
int32_t | ScrollBy (double horizontalOffsetDelta, double verticalOffsetDelta, winrt::ScrollingScrollOptions const &options)
int32_t | ScrollTo (double horizontalOffset, double verticalOffset)
int32_t | ScrollTo (double horizontalOffset, double verticalOffset, winrt::ScrollingScrollOptions const &options)
void | ScrollToHorizontalOffset (double offset)
void | ScrollToOffsets (double horizontalOffset, double verticalOffset)
void | ScrollToVerticalOffset (double offset)
void | SetContentLayoutOffsetXDbg (float contentLayoutOffsetX)
void | SetContentLayoutOffsetYDbg (float contentLayoutOffsetY)
void | SetMaxPositionDbg (winrt::float2 maxPosition)
void | SetMaxPositionExpressionAnimationExpressionDbg (winrt::hstring const &maxPositionExpressionAnimationExpression)
void | SetMinPositionDbg (winrt::float2 minPosition)
void | SetMinPositionExpressionAnimationExpressionDbg (winrt::hstring const &minPositionExpressionAnimationExpression)
void | SetTransformExpressionAnimationExpressionDbg (winrt::hstring const &transformExpressionAnimationExpression)
template<typename T >
void | SetupSnapPoints (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension)
template<typename T >
void | SnapPointsVectorChangedHelper (winrt::IObservableVector< T > const &snapPoints, winrt::IVectorChangedEventArgs const &args, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension)
template<typename T >
void | SnapPointsVectorItemInsertedHelper (std::shared_ptr< SnapPointWrapper< T >> insertedItem, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet)
template<typename T >
bool | SnapPointsViewportChangedHelper (winrt::IObservableVector< T > const &snapPoints, double viewport)
winrt::ScrollingInteractionState | State () const
void | UnregisterAnchorCandidate (winrt::UIElement const &element)
template<typename T >
void | UpdateSnapPointsIgnoredValue (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension)
template<typename T >
bool | UpdateSnapPointsIgnoredValue (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, double newIgnoredValue)
template<typename T >
void | UpdateSnapPointsRanges (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, bool forImpulseOnly)
void | ValuesChanged (const winrt::InteractionTrackerValuesChangedArgs &args)
double | VerticalOffset () const
void | VerticalScrollController (winrt::IScrollController const &value)
winrt::IScrollController | VerticalScrollController () const
winrt::IVector
< winrt::ScrollSnapPointBase > 		VerticalSnapPoints ()
void | ViewportChanged (winrt::event_token const &token)
winrt::event_token | ViewportChanged (winrt::ViewportChangedEventHandler const &value)
double | ViewportHeight () const
double | ViewportWidth () const
int32_t | ZoomBy (float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options)
int32_t | ZoomBy (float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint)
float | ZoomFactor () const
winrt::IVector
< winrt::ZoomSnapPointBase > 		ZoomSnapPoints ()
int32_t | ZoomTo (float zoomFactor, winrt::IReference< winrt::float2 > centerPoint)
int32_t | ZoomTo (float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options)

Static Public Member Functions

static bool | IsAnchorRatioValid (double value)
static bool | IsZoomFactorBoundaryValid (double value)
static void | ValidateAnchorRatio (double value)
static void | ValidateZoomFactoryBoundary (double value)

Static Public Attributes

static const int32_t | s_noOpCorrelationId
static constexpr int | s_translationAndZoomFactorAnimationsRestartTicks = 4

Private Member Functions

double | AnticipatedScrollableHeight () const
double | AnticipatedScrollableWidth () const
double | AnticipatedZoomedHorizontalOffset () const
double | AnticipatedZoomedVerticalOffset () const
float | AnticipatedZoomFactor () const
winrt::Size | ArrangeContent (const winrt::UIElement &content, const winrt::Thickness &contentMargin, winrt::Rect &finalContentRect, bool wasContentArrangeWidthStretched, bool wasContentArrangeHeightStretched)
void | ChangeOffsetsPrivate (double zoomedHorizontalOffset, double zoomedVerticalOffset, ScrollPresenterViewKind offsetsKind, winrt::ScrollingScrollOptions const &options, winrt::BringIntoViewRequestedEventArgs const &bringIntoViewRequestedEventArgs, InteractionTrackerAsyncOperationTrigger operationTrigger, int32_t existingViewChangeCorrelationId, _Out_opt_ int32_t *viewChangeCorrelationId)
void | ChangeOffsetsWithAdditionalVelocityPrivate (winrt::float2 offsetsVelocity, winrt::float2 anticipatedOffsetsChange, winrt::IReference< winrt::float2 > inertiaDecayRate, InteractionTrackerAsyncOperationTrigger operationTrigger, _Out_opt_ int32_t *viewChangeCorrelationId)
void | ChangeZoomFactorPrivate (float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, ScrollPresenterViewKind zoomFactorKind, winrt::ScrollingZoomOptions const &options, _Out_opt_ int32_t *viewChangeCorrelationId)
void | ChangeZoomFactorWithAdditionalVelocityPrivate (float zoomFactorVelocity, float anticipatedZoomFactorChange, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate, InteractionTrackerAsyncOperationTrigger operationTrigger, _Out_opt_ int32_t *viewChangeCorrelationId)
void | ClearAnchorCandidates ()
void | CompleteDelayedOperations ()
void | CompleteInteractionTrackerOperations (int requestId, ScrollPresenterViewChangeResult operationResult, ScrollPresenterViewChangeResult priorNonAnimatedOperationsResult, ScrollPresenterViewChangeResult priorAnimatedOperationsResult, bool completeNonAnimatedOperation, bool completeAnimatedOperation, bool completePriorNonAnimatedOperations, bool completePriorAnimatedOperations)
void | CompleteViewChange (std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation, ScrollPresenterViewChangeResult result)
void | ComputeAnchorPoint (const winrt::Rect &anchorBounds, _Out_ double *anchorPointX, _Out_ double *anchorPointY)
void | ComputeBringIntoViewTargetOffsets (const winrt::UIElement &content, const winrt::UIElement &element, const winrt::Rect &elementRect, const winrt::ScrollingSnapPointsMode &snapPointsMode, double horizontalAlignmentRatio, double verticalAlignmentRatio, double horizontalOffset, double verticalOffset, _Out_ double *targetZoomedHorizontalOffset, _Out_ double *targetZoomedVerticalOffset, _Out_opt_ double *appliedOffsetX, _Out_opt_ double *appliedOffsetY, _Out_opt_ winrt::Rect *targetRect)
void | ComputeBringIntoViewTargetOffsetsFromRequestEventArgs (const winrt::UIElement &content, const winrt::ScrollingSnapPointsMode &snapPointsMode, const winrt::BringIntoViewRequestedEventArgs &requestEventArgs, _Out_ double *targetZoomedHorizontalOffset, _Out_ double *targetZoomedVerticalOffset, _Out_ double *appliedOffsetX, _Out_ double *appliedOffsetY, _Out_ winrt::Rect *targetRect)
void | ComputeBringIntoViewUpdatedTargetOffsets (const winrt::UIElement &content, const winrt::UIElement &element, const winrt::Rect &elementRect, const winrt::ScrollingSnapPointsMode &snapPointsMode, double horizontalAlignmentRatio, double verticalAlignmentRatio, double horizontalOffset, double verticalOffset, _Out_ double *targetZoomedHorizontalOffset, _Out_ double *targetZoomedVerticalOffset)
float | ComputeContentLayoutOffsetDelta (ScrollPresenterDimension dimension, float unzoomedDelta) const
void | ComputeElementAnchorPoint (bool isForPreArrange, _Out_ double *elementAnchorPointHorizontalOffset, _Out_ double *elementAnchorPointVerticalOffset)
float | ComputeEndOfInertiaZoomFactor () const
void | ComputeMinMaxPositions (float zoomFactor, _Out_opt_ winrt::float2 *minPosition, _Out_opt_ winrt::float2 *maxPosition)
winrt::float2 | ComputePositionFromOffsets (double zoomedHorizontalOffset, double zoomedVerticalOffset)
template<typename T >
double | ComputeValueAfterSnapPoints (double value, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> const &snapPointsSet)
void | ComputeViewportAnchorPoint (double viewportWidth, double viewportHeight, _Out_ double *viewportAnchorPointHorizontalOffset, _Out_ double *viewportAnchorPointVerticalOffset)
winrt::Size | ComputeViewportToElementAnchorPointsDistance (double viewportWidth, double viewportHeight, bool isForPreArrange)
void | EnsureAnchorElementSelection ()
void | EnsureExpressionAnimationSources ()
void | EnsureInteractionTracker ()
void | EnsurePositionBoundariesExpressionAnimations ()
void | EnsureScrollControllerExpressionAnimationSources (ScrollPresenterDimension dimension)
void | EnsureScrollControllerVisualInteractionSource (const winrt::Visual &panningElementAncestorVisual, ScrollPresenterDimension dimension)
void | EnsureScrollPresenterVisualInteractionSource ()
void | EnsureTransformExpressionAnimations ()
winrt::float2 | GetArrangeRenderSizesDelta (const winrt::UIElement &content) const
double | GetComputedMaxHeight (double defaultMaxHeight, const winrt::FrameworkElement &content) const
double | GetComputedMaxWidth (double defaultMaxWidth, const winrt::FrameworkElement &content) const
winrt::ScrollingScrollMode | GetComputedScrollMode (ScrollPresenterDimension dimension, bool ignoreZoomMode=false)
template<typename T >
winrt::InteractionTrackerInertiaRestingValue | GetInertiaRestingValue (std::shared_ptr< SnapPointWrapper< T >> snapPointWrapper, winrt::Compositor const &compositor, winrt::hstring const &target, winrt::hstring const &scale) const
std::shared_ptr
< InteractionTrackerAsyncOperation > 		GetInteractionTrackerOperationFromKinds (bool isOperationTypeForOffsetsChange, InteractionTrackerAsyncOperationTrigger operationTrigger, ScrollPresenterViewKind const &viewKind, winrt::ScrollingScrollOptions const &options) const
std::shared_ptr
< InteractionTrackerAsyncOperation > 		GetInteractionTrackerOperationFromRequestId (int requestId) const
int | GetInteractionTrackerOperationsCount (bool includeAnimatedOperations, bool includeNonAnimatedOperations) const
int | GetInteractionTrackerOperationsTicksCountdown () const
std::shared_ptr
< InteractionTrackerAsyncOperation > 		GetInteractionTrackerOperationWithAdditionalVelocity (bool isOperationTypeForOffsetsChange, InteractionTrackerAsyncOperationTrigger operationTrigger) const
std::shared_ptr
< InteractionTrackerAsyncOperation > 		GetLastNonAnimatedInteractionTrackerOperation (std::shared_ptr< InteractionTrackerAsyncOperation > priorToInteractionTrackerOperation) const
winrt::hstring | GetMaxPositionExpression (const winrt::UIElement &content) const
winrt::hstring | GetMaxPositionXExpression (const winrt::UIElement &content) const
winrt::hstring | GetMaxPositionYExpression (const winrt::UIElement &content) const
winrt::hstring | GetMinPositionExpression (const winrt::UIElement &content) const
winrt::hstring | GetMinPositionXExpression (const winrt::UIElement &content) const
winrt::hstring | GetMinPositionYExpression (const winrt::UIElement &content) const
int32_t | GetNextViewChangeCorrelationId ()
winrt::CompositionAnimation | GetPositionAnimation (double zoomedHorizontalOffset, double zoomedVerticalOffset, InteractionTrackerAsyncOperationTrigger operationTrigger, int32_t offsetsChangeCorrelationId)
winrt::CompositionAnimation | GetZoomFactorAnimation (float zoomFactor, const winrt::float2 &centerPoint, int32_t zoomFactorChangeCorrelationId)
bool | HasBringingIntoViewListener () const
void | HookCompositionTargetRendering ()
void | HookContentPropertyChanged (const winrt::UIElement &content)
void | HookHorizontalScrollControllerEvents (const winrt::IScrollController &horizontalScrollController)
void | HookHorizontalScrollControllerInteractionSourceEvents (const winrt::IScrollControllerPanningInfo &horizontalScrollControllerPanningInfo)
void | HookHorizontalScrollControllerPanningInfoEvents (const winrt::IScrollControllerPanningInfo &horizontalScrollControllerPanningInfo, bool hasInteractionSource)
void | HookScrollPresenterEvents ()
void | HookVerticalScrollControllerEvents (const winrt::IScrollController &verticalScrollController)
void | HookVerticalScrollControllerInteractionSourceEvents (const winrt::IScrollControllerPanningInfo &verticalScrollControllerPanningInfo)
void | HookVerticalScrollControllerPanningInfoEvents (const winrt::IScrollControllerPanningInfo &verticalScrollControllerPanningInfo, bool hasInteractionSource)
void | IsAnchoring (_Out_ bool *isAnchoringElementHorizontally, _Out_ bool *isAnchoringElementVertically, _Out_opt_ bool *isAnchoringFarEdgeHorizontally=nullptr, _Out_opt_ bool *isAnchoringFarEdgeVertically=nullptr)
bool | IsInertiaFromImpulse () const
bool | IsInputKindIgnored (winrt::ScrollingInputKinds const &inputKind)
bool | IsLoadedAndSetUp () const
void | MaximizeInteractionTrackerOperationsTicksCountdown ()
void | OnBringIntoViewRequestedHandler (const winrt::IInspectable &sender, const winrt::BringIntoViewRequestedEventArgs &args)
void | OnCompositionTargetRendering (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnContentLayoutOffsetChanged (ScrollPresenterDimension dimension)
void | OnContentSizeChanged (const winrt::UIElement &content)
void | OnFlowDirectionChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnHorizontalSnapPointsVectorChanged (const winrt::IObservableVector< winrt::ScrollSnapPointBase > &sender, const winrt::IVectorChangedEventArgs event)
void | OnLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnPointerPressed (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnScrollControllerAddScrollVelocityRequested (const winrt::IScrollController &sender, const winrt::ScrollControllerAddScrollVelocityRequestedEventArgs &args)
void | OnScrollControllerPanningInfoChanged (const winrt::IScrollControllerPanningInfo &sender, const winrt::IInspectable &args)
void | OnScrollControllerPanningInfoPanRequested (const winrt::IScrollControllerPanningInfo &sender, const winrt::ScrollControllerPanRequestedEventArgs &args)
void | OnScrollControllerScrollByRequested (const winrt::IScrollController &sender, const winrt::ScrollControllerScrollByRequestedEventArgs &args)
void | OnScrollControllerScrollToRequested (const winrt::IScrollController &sender, const winrt::ScrollControllerScrollToRequestedEventArgs &args)
void | OnUnloaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnVerticalSnapPointsVectorChanged (const winrt::IObservableVector< winrt::ScrollSnapPointBase > &sender, const winrt::IVectorChangedEventArgs event)
void | OnViewChanged (bool horizontalOffsetChanged, bool verticalOffsetChanged)
void | OnZoomSnapPointsVectorChanged (const winrt::IObservableVector< winrt::ZoomSnapPointBase > &sender, const winrt::IVectorChangedEventArgs event)
void | PostProcessOffsetsChange (std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation)
void | PostProcessZoomFactorChange (std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation)
void | ProcessAnchorCandidate (const winrt::UIElement &anchorCandidate, const winrt::UIElement &content, const winrt::Rect &viewportAnchorBounds, double viewportAnchorPointHorizontalOffset, double viewportAnchorPointVerticalOffset, _Inout_ double *bestAnchorCandidateDistance, _Inout_ winrt::UIElement *bestAnchorCandidate, _Inout_ winrt::Rect *bestAnchorCandidateBounds) const
void | ProcessDequeuedViewChange (std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation)
void | ProcessOffsetsChange (InteractionTrackerAsyncOperationTrigger operationTrigger, std::shared_ptr< OffsetsChange > offsetsChange, int32_t offsetsChangeCorrelationId, bool isForAsyncOperation)
void | ProcessOffsetsChange (InteractionTrackerAsyncOperationTrigger operationTrigger, std::shared_ptr< OffsetsChangeWithAdditionalVelocity > offsetsChangeWithAdditionalVelocity)
void | ProcessZoomFactorChange (InteractionTrackerAsyncOperationTrigger operationTrigger, std::shared_ptr< ZoomFactorChangeWithAdditionalVelocity > zoomFactorChangeWithAdditionalVelocity)
void | ProcessZoomFactorChange (std::shared_ptr< ZoomFactorChange > zoomFactorChange, int32_t zoomFactorChangeCorrelationId)
void | RaiseAnchorRequested ()
bool | RaiseBringingIntoView (double targetZoomedHorizontalOffset, double targetZoomedVerticalOffset, const winrt::BringIntoViewRequestedEventArgs &requestEventArgs, int32_t offsetsChangeCorrelationId, _Inout_ winrt::ScrollingSnapPointsMode *snapPointsMode)
void | RaiseConfigurationChanged ()
void | RaiseExpressionAnimationStatusChanged (bool isExpressionAnimationStarted, wstring_view const &propertyName)
void | RaiseExtentChanged ()
void | RaiseInteractionSourcesChanged ()
void | RaisePostArrange ()
winrt::CompositionAnimation | RaiseScrollAnimationStarting (const winrt::Vector3KeyFrameAnimation &positionAnimation, const winrt::float2 &startPosition, const winrt::float2 &endPosition, int32_t offsetsChangeCorrelationId)
void | RaiseScrollStarting (int32_t offsetsChangeCorrelationId, double anticipatedHorizontalOffset, double anticipatedVerticalOffset, float anticipatedZoomFactor)
void | RaiseStateChanged ()
void | RaiseViewChangeCompleted (bool isForScroll, ScrollPresenterViewChangeResult result, int32_t viewChangeCorrelationId)
void | RaiseViewChanged ()
void | RaiseViewportChanged (const bool isFinal)
winrt::CompositionAnimation | RaiseZoomAnimationStarting (const winrt::ScalarKeyFrameAnimation &zoomFactorAnimation, const float endZoomFactor, const winrt::float2 &centerPoint, int32_t zoomFactorChangeCorrelationId)
void | RaiseZoomStarting (int32_t zoomFactorChangeCorrelationId, double anticipatedHorizontalOffset, double anticipatedVerticalOffset, float anticipatedZoomFactor)
template<typename T >
void | RegenerateSnapPointsSet (winrt::IObservableVector< T > const &userVector, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *internalSet)
void | ResetAnchorElement ()
void | ResetAnticipatedView ()
void | ResetOffsetsInertiaDecayRate ()
void | ResetZoomFactorInertiaDecayRate ()
void | SetupInteractionTrackerBoundaries ()
void | SetupInteractionTrackerZoomFactorBoundaries (double minZoomFactor, double maxZoomFactor)
void | SetupPositionBoundariesExpressionAnimations (const winrt::UIElement &content)
void | SetupScrollControllerVisualInterationSource (ScrollPresenterDimension dimension)
void | SetupScrollControllerVisualInterationSourcePositionModifiers (ScrollPresenterDimension dimension, const winrt::Orientation &orientation)
void | SetupScrollPresenterVisualInteractionSource ()
template<typename T >
void | SetupSnapPoints (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension)
void | SetupTransformExpressionAnimations (const winrt::UIElement &content)
void | SetupVisualInteractionSourceCenterPointModifier (const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, bool flowDirectionChanged)
void | SetupVisualInteractionSourceChainingMode (const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, const winrt::ScrollingChainMode &chainingMode)
void | SetupVisualInteractionSourceMode (const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, const winrt::ScrollingScrollMode &scrollMode)
void | SetupVisualInteractionSourceMode (const winrt::VisualInteractionSource &visualInteractionSource, const winrt::ScrollingZoomMode &zoomMode)
void | SetupVisualInteractionSourceRailingMode (const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, const winrt::ScrollingRailMode &railingMode)
void | SetupVisualInteractionSourceRedirectionMode (const winrt::VisualInteractionSource &visualInteractionSource)
template<typename T >
void | SnapPointsVectorChangedHelper (winrt::IObservableVector< T > const &scrollSnapPoints, winrt::IVectorChangedEventArgs const &args, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension)
template<typename T >
void | SnapPointsVectorItemInsertedHelper (std::shared_ptr< SnapPointWrapper< T >> insertedItem, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet)
template<typename T >
bool | SnapPointsViewportChangedHelper (winrt::IObservableVector< T > const &snapPoints, double viewport)
void | StartExpressionAnimationSourcesAnimations ()
void | StartScrollControllerExpressionAnimationSourcesAnimations (ScrollPresenterDimension dimension)
void | StartTransformExpressionAnimations (const winrt::UIElement &content)
bool | StartTranslationAndZoomFactorExpressionAnimations (bool interruptCountdown=false)
void | StopScrollControllerExpressionAnimationSourcesAnimations (ScrollPresenterDimension dimension)
void | StopTransformExpressionAnimations (const winrt::UIElement &content)
void | StopTranslationAndZoomFactorExpressionAnimations ()
void | UnhookCompositionTargetRendering ()
void | UnhookContentPropertyChanged (const winrt::UIElement &content)
void | UnhookHorizontalScrollControllerEvents ()
void | UnhookHorizontalScrollControllerPanningInfoEvents ()
void | UnhookScrollPresenterEvents ()
void | UnhookVerticalScrollControllerEvents ()
void | UnhookVerticalScrollControllerPanningInfoEvents ()
void | UpdateAnticipatedOffset (ScrollPresenterDimension dimension, double zoomedOffset)
void | UpdateAnticipatedZoomFactor (float zoomFactor)
void | UpdateContent (const winrt::UIElement &oldContent, const winrt::UIElement &newContent)
void | UpdateExpressionAnimationSources ()
void | UpdateManipulationRedirectionMode ()
void | UpdateOffset (ScrollPresenterDimension dimension, double zoomedOffset)
void | UpdatePositionBoundaries (const winrt::UIElement &content)
void | UpdateScrollAutomationPatternProperties ()
void | UpdateScrollControllerIsScrollable (ScrollPresenterDimension dimension)
void | UpdateScrollControllerValues (ScrollPresenterDimension dimension)
template<typename T >
bool | UpdateSnapPointsIgnoredValue (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, double newIgnoredValue)
template<typename T >
void | UpdateSnapPointsIgnoredValue (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension)
template<typename T >
void | UpdateSnapPointsRanges (std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, bool forImpulseOnly)
void | UpdateState (const winrt::ScrollingInteractionState &state)
void | UpdateTransformSource (const winrt::UIElement &oldContent, const winrt::UIElement &newContent)
void | UpdateUnzoomedExtentAndViewport (bool renderSizeChanged, double unzoomedExtentWidth, double unzoomedExtentHeight, double viewportWidth, double viewportHeight)
void | UpdateVisualInteractionSourceMode (ScrollPresenterDimension dimension)

Static Private Member Functions

static double | ComputeZoomedOffsetWithMinimalChange (double viewportStart, double viewportEnd, double childStart, double childEnd)
static
winrt::ScrollingAnimationMode 		GetComputedAnimationMode (winrt::ScrollingAnimationMode const &animationMode)
static winrt::Rect | GetDescendantBounds (const winrt::UIElement &content, const winrt::UIElement &descendant)
static winrt::Rect | GetDescendantBounds (const winrt::UIElement &content, const winrt::UIElement &descendant, const winrt::Rect &descendantRect)
static wstring_view | GetVisualTargetedPropertyName (ScrollPresenterDimension dimension)
static
winrt::InteractionChainingMode 		InteractionChainingModeFromChainingMode (const winrt::ScrollingChainMode &chainingMode)
static winrt::InteractionSourceMode | InteractionSourceModeFromScrollMode (const winrt::ScrollingScrollMode &scrollMode)
static winrt::InteractionSourceMode | InteractionSourceModeFromZoomMode (const winrt::ScrollingZoomMode &zoomMode)
static bool | IsElementValidAnchor (const winrt::UIElement &element, const winrt::UIElement &content)

Private Attributes

std::vector< tracker_ref
< winrt::UIElement > > 		m_anchorCandidates
std::list< std::shared_ptr
< InteractionTrackerAsyncOperation > > 		m_interactionTrackerAsyncOperations

Detailed Description

Definition at line 29 of file ScrollPresenter.h.

Member Enumeration Documentation

enum ScrollPresenterDimension
Enumerator:
HorizontalScroll
VerticalScroll
HorizontalZoomFactor
VerticalZoomFactor
Scroll
ZoomFactor

Definition at line 174 of file ScrollPresenter.h.

    {
        HorizontalScroll,
        VerticalScroll,
        HorizontalZoomFactor,
        VerticalZoomFactor,
        Scroll,
        ZoomFactor
    };

Constructor & Destructor Documentation

ScrollPresenter ( )
~ScrollPresenter ( )

Member Function Documentation

int32_t AddScrollVelocity | ( | winrt::float2 | offsetsVelocity,
 |  | winrt::IReference< winrt::float2 > | inertiaDecayRate
 | ) |  |
int32_t AddZoomVelocity | ( | float | zoomFactorVelocity,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::IReference< float > | inertiaDecayRate
 | ) |  |
winrt::UIElement AnchorElement ( )
double AnticipatedScrollableHeight ( ) const [private]
double AnticipatedScrollableWidth ( ) const [private]
double AnticipatedZoomedHorizontalOffset ( ) const [private]
double AnticipatedZoomedVerticalOffset ( ) const [private]
float AnticipatedZoomFactor ( ) const [private]
winrt::Size ArrangeContent | ( | const winrt::UIElement & | content,
 |  | const winrt::Thickness & | contentMargin,
 |  | winrt::Rect & | finalContentRect,
 |  | bool | wasContentArrangeWidthStretched,
 |  | bool | wasContentArrangeHeightStretched |
 | ) |  |  | [private]
winrt::Size ArrangeOverride ( winrt::Size const & finalSize )
void ChangeOffsetsPrivate | ( | double | zoomedHorizontalOffset,
 |  | double | zoomedVerticalOffset,
 |  | ScrollPresenterViewKind | offsetsKind,
 |  | winrt::ScrollingScrollOptions const & | options,
 |  | winrt::BringIntoViewRequestedEventArgs const & | bringIntoViewRequestedEventArgs,
 |  | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | int32_t | existingViewChangeCorrelationId,
 |  | _Out_opt_ int32_t * | viewChangeCorrelationId |
 | ) |  |  | [private]
void ChangeOffsetsWithAdditionalVelocityPrivate | ( | winrt::float2 | offsetsVelocity,
 |  | winrt::float2 | anticipatedOffsetsChange,
 |  | winrt::IReference< winrt::float2 > | inertiaDecayRate,
 |  | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | _Out_opt_ int32_t * | viewChangeCorrelationId |
 | ) |  |  | [private]
void ChangeZoomFactorPrivate | ( | float | zoomFactor,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | ScrollPresenterViewKind | zoomFactorKind,
 |  | winrt::ScrollingZoomOptions const & | options,
 |  | _Out_opt_ int32_t * | viewChangeCorrelationId |
 | ) |  |  | [private]
void ChangeZoomFactorWithAdditionalVelocityPrivate | ( | float | zoomFactorVelocity,
 |  | float | anticipatedZoomFactorChange,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::IReference< float > | inertiaDecayRate,
 |  | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | _Out_opt_ int32_t * | viewChangeCorrelationId |
 | ) |  |  | [private]
void ClearAnchorCandidates ( ) [private]
void CompleteDelayedOperations ( ) [private]
void CompleteInteractionTrackerOperations | ( | int | requestId,
 |  | ScrollPresenterViewChangeResult | operationResult,
 |  | ScrollPresenterViewChangeResult | priorNonAnimatedOperationsResult,
 |  | ScrollPresenterViewChangeResult | priorAnimatedOperationsResult,
 |  | bool | completeNonAnimatedOperation,
 |  | bool | completeAnimatedOperation,
 |  | bool | completePriorNonAnimatedOperations,
 |  | bool | completePriorAnimatedOperations |
 | ) |  |  | [private]
void CompleteViewChange | ( | std::shared_ptr< InteractionTrackerAsyncOperation > | interactionTrackerAsyncOperation,
 |  | ScrollPresenterViewChangeResult | result |
 | ) |  |  | [private]
void ComputeAnchorPoint | ( | const winrt::Rect & | anchorBounds,
 |  | _Out_ double * | anchorPointX,
 |  | _Out_ double * | anchorPointY |
 | ) |  |  | [private]
void ComputeBringIntoViewTargetOffsets | ( | const winrt::UIElement & | content,
 |  | const winrt::UIElement & | element,
 |  | const winrt::Rect & | elementRect,
 |  | const winrt::ScrollingSnapPointsMode & | snapPointsMode,
 |  | double | horizontalAlignmentRatio,
 |  | double | verticalAlignmentRatio,
 |  | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | _Out_ double * | targetZoomedHorizontalOffset,
 |  | _Out_ double * | targetZoomedVerticalOffset,
 |  | _Out_opt_ double * | appliedOffsetX,
 |  | _Out_opt_ double * | appliedOffsetY,
 |  | _Out_opt_ winrt::Rect * | targetRect |
 | ) |  |  | [private]
void ComputeBringIntoViewTargetOffsetsFromRequestEventArgs | ( | const winrt::UIElement & | content,
 |  | const winrt::ScrollingSnapPointsMode & | snapPointsMode,
 |  | const winrt::BringIntoViewRequestedEventArgs & | requestEventArgs,
 |  | _Out_ double * | targetZoomedHorizontalOffset,
 |  | _Out_ double * | targetZoomedVerticalOffset,
 |  | _Out_ double * | appliedOffsetX,
 |  | _Out_ double * | appliedOffsetY,
 |  | _Out_ winrt::Rect * | targetRect |
 | ) |  |  | [private]
void ComputeBringIntoViewUpdatedTargetOffsets | ( | const winrt::UIElement & | content,
 |  | const winrt::UIElement & | element,
 |  | const winrt::Rect & | elementRect,
 |  | const winrt::ScrollingSnapPointsMode & | snapPointsMode,
 |  | double | horizontalAlignmentRatio,
 |  | double | verticalAlignmentRatio,
 |  | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | _Out_ double * | targetZoomedHorizontalOffset,
 |  | _Out_ double * | targetZoomedVerticalOffset |
 | ) |  |  | [private]
float ComputeContentLayoutOffsetDelta | ( | ScrollPresenterDimension | dimension,
 |  | float | unzoomedDelta |
 | ) |  |  | const [private]
void ComputeElementAnchorPoint | ( | bool | isForPreArrange,
 |  | _Out_ double * | elementAnchorPointHorizontalOffset,
 |  | _Out_ double * | elementAnchorPointVerticalOffset |
 | ) |  |  | [private]
float ComputeEndOfInertiaZoomFactor ( ) const [private]
void ComputeMinMaxPositions | ( | float | zoomFactor,
 |  | _Out_opt_ winrt::float2 * | minPosition,
 |  | _Out_opt_ winrt::float2 * | maxPosition |
 | ) |  |  | [private]
winrt::float2 ComputePositionFromOffsets | ( | double | zoomedHorizontalOffset,
 |  | double | zoomedVerticalOffset |
 | ) |  |  | [private]
double ComputeValueAfterSnapPoints | ( | double | value,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> const & | snapPointsSet
 | ) |  |

Definition at line 1545 of file ScrollPresenter.cpp.

{
    for (std::shared_ptr<SnapPointWrapper<T>> snapPointWrapper : snapPointsSet)
    {
        if (std::get<0>(snapPointWrapper->ActualApplicableZone()) <= value &&
            std::get<1>(snapPointWrapper->ActualApplicableZone()) >= value)
        {
            return snapPointWrapper->Evaluate(static_cast<float>(value));
        }
    }
    return value;
}

double ComputeValueAfterSnapPoints | ( | double | value,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> const & | snapPointsSet |
 | ) |  |  | [private]
void ComputeViewportAnchorPoint | ( | double | viewportWidth,
 |  | double | viewportHeight,
 |  | _Out_ double * | viewportAnchorPointHorizontalOffset,
 |  | _Out_ double * | viewportAnchorPointVerticalOffset |
 | ) |  |  | [private]
winrt::Size ComputeViewportToElementAnchorPointsDistance | ( | double | viewportWidth,
 |  | double | viewportHeight,
 |  | bool | isForPreArrange |
 | ) |  |  | [private]
static double ComputeZoomedOffsetWithMinimalChange | ( | double | viewportStart,
 |  | double | viewportEnd,
 |  | double | childStart,
 |  | double | childEnd |
 | ) |  |  | [static, private]
winrt::event_token ConfigurationChanged ( winrt::ConfigurationChangedEventHandler const & value )
void ConfigurationChanged ( winrt::event_token const & token )
winrt::UIElement CurrentAnchor ( )
void CustomAnimationStateEntered ( const winrt::InteractionTrackerCustomAnimationStateEnteredArgs & args )
void EnsureAnchorElementSelection ( ) [private]
void EnsureExpressionAnimationSources ( ) [private]
void EnsureInteractionTracker ( ) [private]
void EnsurePositionBoundariesExpressionAnimations ( ) [private]
void EnsureScrollControllerExpressionAnimationSources ( ScrollPresenterDimension dimension ) [private]
void EnsureScrollControllerVisualInteractionSource | ( | const winrt::Visual & | panningElementAncestorVisual,
 |  | ScrollPresenterDimension | dimension |
 | ) |  |  | [private]
void EnsureScrollPresenterVisualInteractionSource ( ) [private]
void EnsureTransformExpressionAnimations ( ) [private]
winrt::CompositionPropertySet ExpressionAnimationSources ( )
double ExtentHeight ( ) const
double ExtentWidth ( ) const
winrt::float2 GetArrangeRenderSizesDelta ( const winrt::UIElement & content ) const [private]
winrt::float2 GetArrangeRenderSizesDeltaDbg ( )
static winrt::ScrollingAnimationMode GetComputedAnimationMode ( winrt::ScrollingAnimationMode const & animationMode ) [static, private]
double GetComputedMaxHeight | ( | double | defaultMaxHeight,
 |  | const winrt::FrameworkElement & | content |
 | ) |  |  | const [private]
double GetComputedMaxWidth | ( | double | defaultMaxWidth,
 |  | const winrt::FrameworkElement & | content |
 | ) |  |  | const [private]
winrt::ScrollingScrollMode GetComputedScrollMode | ( | ScrollPresenterDimension | dimension,
 |  | bool | ignoreZoomMode = false |
 | ) |  |  | [private]
winrt::IVector<winrt::ScrollSnapPointBase> GetConsolidatedHorizontalScrollSnapPointsDbg ( ) [inline]

Definition at line 226 of file ScrollPresenter.h.

    {
        return GetConsolidatedScrollSnapPointsDbg(ScrollPresenterDimension::HorizontalScroll);
    }

winrt::IVector<winrt::ScrollSnapPointBase> GetConsolidatedScrollSnapPointsDbg ( ScrollPresenterDimension dimension )
winrt::IVector<winrt::ScrollSnapPointBase> GetConsolidatedVerticalScrollSnapPointsDbg ( ) [inline]

Definition at line 231 of file ScrollPresenter.h.

    {
        return GetConsolidatedScrollSnapPointsDbg(ScrollPresenterDimension::VerticalScroll);
    }

winrt::IVector<winrt::ZoomSnapPointBase> GetConsolidatedZoomSnapPointsDbg ( )
float GetContentLayoutOffsetXDbg ( ) const [inline]

Definition at line 196 of file ScrollPresenter.h.

    {
        return m_contentLayoutOffsetX;
    }

float GetContentLayoutOffsetYDbg ( ) const [inline]

Definition at line 201 of file ScrollPresenter.h.

    {
        return m_contentLayoutOffsetY;
    }

static winrt::Rect GetDescendantBounds | ( | const winrt::UIElement & | content,
 |  | const winrt::UIElement & | descendant |
 | ) |  |  | [static, private]
static winrt::Rect GetDescendantBounds | ( | const winrt::UIElement & | content,
 |  | const winrt::UIElement & | descendant,
 |  | const winrt::Rect & | descendantRect |
 | ) |  |  | [static, private]
std::shared_ptr<SnapPointWrapper<winrt::ScrollSnapPointBase> > GetHorizontalSnapPointWrapperDbg ( winrt::ScrollSnapPointBase const & scrollSnapPoint ) [inline]

Definition at line 239 of file ScrollPresenter.h.

    {
        return GetScrollSnapPointWrapperDbg(ScrollPresenterDimension::HorizontalScroll, scrollSnapPoint);
    }

winrt::InteractionTrackerInertiaRestingValue GetInertiaRestingValue | ( | std::shared_ptr< SnapPointWrapper< T >> | snapPointWrapper,
 |  | winrt::Compositor const & | compositor,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale |
 | ) |  |  | const

Definition at line 7168 of file ScrollPresenter.cpp.

{
    const bool isInertiaFromImpulse = IsInertiaFromImpulse();
    const winrt::InteractionTrackerInertiaRestingValue modifier = winrt::InteractionTrackerInertiaRestingValue::Create(compositor);
    const winrt::ExpressionAnimation conditionExpressionAnimation = snapPointWrapper->CreateConditionalExpression(m_interactionTracker, target, scale, isInertiaFromImpulse);
    const winrt::ExpressionAnimation restingPointExpressionAnimation = snapPointWrapper->CreateRestingPointExpression(m_interactionTracker, target, scale, isInertiaFromImpulse);

    modifier.Condition(conditionExpressionAnimation);
    modifier.RestingValue(restingPointExpressionAnimation);

    return modifier;
}

winrt::InteractionTrackerInertiaRestingValue GetInertiaRestingValue | ( | std::shared_ptr< SnapPointWrapper< T >> | snapPointWrapper,
 |  | winrt::Compositor const & | compositor,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale |
 | ) |  |  | const [private]
std::shared_ptr<InteractionTrackerAsyncOperation> GetInteractionTrackerOperationFromKinds | ( | bool | isOperationTypeForOffsetsChange,
 |  | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | ScrollPresenterViewKind const & | viewKind,
 |  | winrt::ScrollingScrollOptions const & | options |
 | ) |  |  | const [private]
std::shared_ptr<InteractionTrackerAsyncOperation> GetInteractionTrackerOperationFromRequestId ( int requestId ) const [private]
int GetInteractionTrackerOperationsCount | ( | bool | includeAnimatedOperations,
 |  | bool | includeNonAnimatedOperations |
 | ) |  |  | const [private]
int GetInteractionTrackerOperationsTicksCountdown ( ) const [private]
std::shared_ptr<InteractionTrackerAsyncOperation> GetInteractionTrackerOperationWithAdditionalVelocity | ( | bool | isOperationTypeForOffsetsChange,
 |  | InteractionTrackerAsyncOperationTrigger | operationTrigger |
 | ) |  |  | const [private]
std::shared_ptr<InteractionTrackerAsyncOperation> GetLastNonAnimatedInteractionTrackerOperation ( std::shared_ptr< InteractionTrackerAsyncOperation > priorToInteractionTrackerOperation ) const [private]
winrt::float2 GetMaxPositionDbg ( )
winrt::hstring GetMaxPositionExpression ( const winrt::UIElement & content ) const [private]
winrt::hstring GetMaxPositionExpressionAnimationExpressionDbg ( ) const
winrt::hstring GetMaxPositionXExpression ( const winrt::UIElement & content ) const [private]
winrt::hstring GetMaxPositionYExpression ( const winrt::UIElement & content ) const [private]
winrt::float2 GetMinPositionDbg ( )
winrt::hstring GetMinPositionExpression ( const winrt::UIElement & content ) const [private]
winrt::hstring GetMinPositionExpressionAnimationExpressionDbg ( ) const
winrt::hstring GetMinPositionXExpression ( const winrt::UIElement & content ) const [private]
winrt::hstring GetMinPositionYExpression ( const winrt::UIElement & content ) const [private]
int32_t GetNextViewChangeCorrelationId ( ) [private]
winrt::CompositionAnimation GetPositionAnimation | ( | double | zoomedHorizontalOffset,
 |  | double | zoomedVerticalOffset,
 |  | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | int32_t | offsetsChangeCorrelationId |
 | ) |  |  | [private]
winrt::float2 GetPositionDbg ( )
winrt::Rect GetRelativeViewport ( winrt::UIElement const & content )
std::shared_ptr<SnapPointWrapper<winrt::ScrollSnapPointBase> > GetScrollSnapPointWrapperDbg | ( | ScrollPresenterDimension | dimension,
 |  | winrt::ScrollSnapPointBase const & | scrollSnapPoint
 | ) |  |
winrt::hstring GetTransformExpressionAnimationExpressionDbg ( ) const
std::shared_ptr<SnapPointWrapper<winrt::ScrollSnapPointBase> > GetVerticalSnapPointWrapperDbg ( winrt::ScrollSnapPointBase const & scrollSnapPoint ) [inline]

Definition at line 244 of file ScrollPresenter.h.

    {
        return GetScrollSnapPointWrapperDbg(ScrollPresenterDimension::VerticalScroll, scrollSnapPoint);
    }

static wstring_view GetVisualTargetedPropertyName ( ScrollPresenterDimension dimension ) [static, private]
double GetZoomedExtentHeight ( ) const
double GetZoomedExtentWidth ( ) const
winrt::CompositionAnimation GetZoomFactorAnimation | ( | float | zoomFactor,
 |  | const winrt::float2 & | centerPoint,
 |  | int32_t | zoomFactorChangeCorrelationId |
 | ) |  |  | [private]
std::shared_ptr<SnapPointWrapper<winrt::ZoomSnapPointBase> > GetZoomSnapPointWrapperDbg ( winrt::ZoomSnapPointBase const & zoomSnapPoint )
bool HasBringingIntoViewListener ( ) const [inline, private]

Definition at line 581 of file ScrollPresenter.h.

    {
        return !!m_bringingIntoViewEventSource;
    }

void HookCompositionTargetRendering ( ) [private]
void HookContentPropertyChanged ( const winrt::UIElement & content ) [private]
void HookHorizontalScrollControllerEvents ( const winrt::IScrollController & horizontalScrollController ) [private]
void HookHorizontalScrollControllerInteractionSourceEvents ( const winrt::IScrollControllerPanningInfo & horizontalScrollControllerPanningInfo ) [private]
void HookHorizontalScrollControllerPanningInfoEvents | ( | const winrt::IScrollControllerPanningInfo & | horizontalScrollControllerPanningInfo,
 |  | bool | hasInteractionSource |
 | ) |  |  | [private]
void HookScrollPresenterEvents ( ) [private]
void HookVerticalScrollControllerEvents ( const winrt::IScrollController & verticalScrollController ) [private]
void HookVerticalScrollControllerInteractionSourceEvents ( const winrt::IScrollControllerPanningInfo & verticalScrollControllerPanningInfo ) [private]
void HookVerticalScrollControllerPanningInfoEvents | ( | const winrt::IScrollControllerPanningInfo & | verticalScrollControllerPanningInfo,
 |  | bool | hasInteractionSource |
 | ) |  |  | [private]
double HorizontalOffset ( ) const
winrt::IScrollController HorizontalScrollController ( ) const
void HorizontalScrollController ( winrt::IScrollController const & value )
winrt::IVector<winrt::ScrollSnapPointBase> HorizontalSnapPoints ( )
void IdleStateEntered ( const winrt::InteractionTrackerIdleStateEnteredArgs & args )
winrt::ScrollingInputKinds IgnoredInputKinds ( ) const
void IgnoredInputKinds ( winrt::ScrollingInputKinds const & value )

Reimplemented from ScrollPresenterProperties.

void InertiaStateEntered ( const winrt::InteractionTrackerInertiaStateEnteredArgs & args )
void InteractingStateEntered ( const winrt::InteractionTrackerInteractingStateEnteredArgs & args )
static winrt::InteractionChainingMode InteractionChainingModeFromChainingMode ( const winrt::ScrollingChainMode & chainingMode ) [static, private]
static winrt::InteractionSourceMode InteractionSourceModeFromScrollMode ( const winrt::ScrollingScrollMode & scrollMode ) [static, private]
static winrt::InteractionSourceMode InteractionSourceModeFromZoomMode ( const winrt::ScrollingZoomMode & zoomMode ) [static, private]
void IsAnchoring | ( | _Out_ bool * | isAnchoringElementHorizontally,
 |  | _Out_ bool * | isAnchoringElementVertically,
 |  | _Out_opt_ bool * | isAnchoringFarEdgeHorizontally = nullptr,
 |  | _Out_opt_ bool * | isAnchoringFarEdgeVertically = nullptr |
 | ) |  |  | [private]
static bool IsAnchorRatioValid ( double value ) [static]
static bool IsElementValidAnchor | ( | const winrt::UIElement & | element,
 |  | const winrt::UIElement & | content |
 | ) |  |  | [static, private]
bool IsElementValidAnchor ( const winrt::UIElement & element )
bool IsHorizontallyScrollable ( )
bool IsInertiaFromImpulse ( ) const [private]
bool IsInputKindIgnored ( winrt::ScrollingInputKinds const & inputKind ) [private]
bool IsLoadedAndSetUp ( ) const [private]
bool IsVerticallyScrollable ( )
static bool IsZoomFactorBoundaryValid ( double value ) [static]
void LineDown ( )
void LineLeft ( )
void LineRight ( )
void LineUp ( )
void MaximizeInteractionTrackerOperationsTicksCountdown ( ) [private]
winrt::Size MeasureOverride ( winrt::Size const & availableSize )
void OnBringIntoViewRequestedHandler | ( | const winrt::IInspectable & | sender,
 |  | const winrt::BringIntoViewRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnCompositionTargetRendering | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnContentLayoutOffsetChanged ( ScrollPresenterDimension dimension ) [private]
void OnContentPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args
 | ) |  |
void OnContentSizeChanged ( const winrt::UIElement & content ) [private]
winrt::AutomationPeer OnCreateAutomationPeer ( )
void OnFlowDirectionChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnHorizontalSnapPointsVectorChanged | ( | const winrt::IObservableVector< winrt::ScrollSnapPointBase > & | sender,
 |  | const winrt::IVectorChangedEventArgs | event |
 | ) |  |  | [private]
void OnLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPointerPressed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnScrollControllerAddScrollVelocityRequested | ( | const winrt::IScrollController & | sender,
 |  | const winrt::ScrollControllerAddScrollVelocityRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollControllerPanningInfoChanged | ( | const winrt::IScrollControllerPanningInfo & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnScrollControllerPanningInfoPanRequested | ( | const winrt::IScrollControllerPanningInfo & | sender,
 |  | const winrt::ScrollControllerPanRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollControllerScrollByRequested | ( | const winrt::IScrollController & | sender,
 |  | const winrt::ScrollControllerScrollByRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollControllerScrollToRequested | ( | const winrt::IScrollController & | sender,
 |  | const winrt::ScrollControllerScrollToRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnUnloaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnVerticalSnapPointsVectorChanged | ( | const winrt::IObservableVector< winrt::ScrollSnapPointBase > & | sender,
 |  | const winrt::IVectorChangedEventArgs | event |
 | ) |  |  | [private]
void OnViewChanged | ( | bool | horizontalOffsetChanged,
 |  | bool | verticalOffsetChanged |
 | ) |  |  | [private]
void OnZoomSnapPointsVectorChanged | ( | const winrt::IObservableVector< winrt::ZoomSnapPointBase > & | sender,
 |  | const winrt::IVectorChangedEventArgs | event |
 | ) |  |  | [private]
void PageDown ( )
void PageLeft ( )
void PageRight ( )
void PageUp ( )
winrt::Controls::IScrollAnchorProvider Parent ( ) [inline]

Definition at line 89 of file ScrollPresenter.h.

{ return nullptr; }

void Parent ( winrt::Controls::IScrollAnchorProvider const & value ) [inline]

Definition at line 90 of file ScrollPresenter.h.

{}

void PostArrange ( winrt::event_token const & token )
winrt::event_token PostArrange ( winrt::PostArrangeEventHandler const & value )
void PostProcessOffsetsChange ( std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation ) [private]
void PostProcessZoomFactorChange ( std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation ) [private]
void ProcessAnchorCandidate | ( | const winrt::UIElement & | anchorCandidate,
 |  | const winrt::UIElement & | content,
 |  | const winrt::Rect & | viewportAnchorBounds,
 |  | double | viewportAnchorPointHorizontalOffset,
 |  | double | viewportAnchorPointVerticalOffset,
 |  | _Inout_ double * | bestAnchorCandidateDistance,
 |  | _Inout_ winrt::UIElement * | bestAnchorCandidate,
 |  | _Inout_ winrt::Rect * | bestAnchorCandidateBounds |
 | ) |  |  | const [private]
void ProcessDequeuedViewChange ( std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation ) [private]
void ProcessOffsetsChange | ( | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | std::shared_ptr< OffsetsChangeWithAdditionalVelocity > | offsetsChangeWithAdditionalVelocity |
 | ) |  |  | [private]
void ProcessOffsetsChange | ( | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | std::shared_ptr< OffsetsChange > | offsetsChange,
 |  | int32_t | offsetsChangeCorrelationId,
 |  | bool | isForAsyncOperation |
 | ) |  |  | [private]
void ProcessZoomFactorChange | ( | std::shared_ptr< ZoomFactorChange > | zoomFactorChange,
 |  | int32_t | zoomFactorChangeCorrelationId |
 | ) |  |  | [private]
void ProcessZoomFactorChange | ( | InteractionTrackerAsyncOperationTrigger | operationTrigger,
 |  | std::shared_ptr< ZoomFactorChangeWithAdditionalVelocity > | zoomFactorChangeWithAdditionalVelocity |
 | ) |  |  | [private]
void RaiseAnchorRequested ( ) [private]
bool RaiseBringingIntoView | ( | double | targetZoomedHorizontalOffset,
 |  | double | targetZoomedVerticalOffset,
 |  | const winrt::BringIntoViewRequestedEventArgs & | requestEventArgs,
 |  | int32_t | offsetsChangeCorrelationId,
 |  | _Inout_ winrt::ScrollingSnapPointsMode * | snapPointsMode |
 | ) |  |  | [private]
void RaiseConfigurationChanged ( ) [private]
void RaiseExpressionAnimationStatusChanged | ( | bool | isExpressionAnimationStarted,
 |  | wstring_view const & | propertyName |
 | ) |  |  | [private]
void RaiseExtentChanged ( ) [private]
void RaiseInteractionSourcesChanged ( ) [private]
void RaisePostArrange ( ) [private]
winrt::CompositionAnimation RaiseScrollAnimationStarting | ( | const winrt::Vector3KeyFrameAnimation & | positionAnimation,
 |  | const winrt::float2 & | startPosition,
 |  | const winrt::float2 & | endPosition,
 |  | int32_t | offsetsChangeCorrelationId |
 | ) |  |  | [private]
void RaiseScrollStarting | ( | int32_t | offsetsChangeCorrelationId,
 |  | double | anticipatedHorizontalOffset,
 |  | double | anticipatedVerticalOffset,
 |  | float | anticipatedZoomFactor |
 | ) |  |  | [private]
void RaiseStateChanged ( ) [private]
void RaiseViewChangeCompleted | ( | bool | isForScroll,
 |  | ScrollPresenterViewChangeResult | result,
 |  | int32_t | viewChangeCorrelationId |
 | ) |  |  | [private]
void RaiseViewChanged ( ) [private]
void RaiseViewportChanged ( const bool isFinal ) [private]
winrt::CompositionAnimation RaiseZoomAnimationStarting | ( | const winrt::ScalarKeyFrameAnimation & | zoomFactorAnimation,
 |  | const float | endZoomFactor,
 |  | const winrt::float2 & | centerPoint,
 |  | int32_t | zoomFactorChangeCorrelationId |
 | ) |  |  | [private]
void RaiseZoomStarting | ( | int32_t | zoomFactorChangeCorrelationId,
 |  | double | anticipatedHorizontalOffset,
 |  | double | anticipatedVerticalOffset,
 |  | float | anticipatedZoomFactor |
 | ) |  |  | [private]
void RegenerateSnapPointsSet | ( | winrt::IObservableVector< T > const & | userVector,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | internalSet
 | ) |  |

Definition at line 5162 of file ScrollPresenter.cpp.

{
    MUX_ASSERT(internalSet);

    internalSet->clear();
    for (T snapPoint : userVector)
    {
        std::shared_ptr<SnapPointWrapper<T>> snapPointWrapper =
            std::make_shared<SnapPointWrapper<T>>(snapPoint);

        SnapPointsVectorItemInsertedHelper(snapPointWrapper, internalSet);
    }
}

void RegenerateSnapPointsSet | ( | winrt::IObservableVector< T > const & | userVector,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | internalSet |
 | ) |  |  | [private]
void RegisterAnchorCandidate ( winrt::UIElement const & element )
void RequestIgnored ( const winrt::InteractionTrackerRequestIgnoredArgs & args )
void ResetAnchorElement ( ) [private]
void ResetAnticipatedView ( ) [private]
void ResetOffsetsInertiaDecayRate ( ) [private]
void ResetZoomFactorInertiaDecayRate ( ) [private]
double ScrollableHeight ( ) const
double ScrollableWidth ( ) const
int32_t ScrollBy | ( | double | horizontalOffsetDelta,
 |  | double | verticalOffsetDelta
 | ) |  |
int32_t ScrollBy | ( | double | horizontalOffsetDelta,
 |  | double | verticalOffsetDelta,
 |  | winrt::ScrollingScrollOptions const & | options
 | ) |  |
int32_t ScrollTo | ( | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | winrt::ScrollingScrollOptions const & | options
 | ) |  |
int32_t ScrollTo | ( | double | horizontalOffset,
 |  | double | verticalOffset
 | ) |  |
void ScrollToHorizontalOffset ( double offset )
void ScrollToOffsets | ( | double | horizontalOffset,
 |  | double | verticalOffset
 | ) |  |
void ScrollToVerticalOffset ( double offset )
void SetContentLayoutOffsetXDbg ( float contentLayoutOffsetX )
void SetContentLayoutOffsetYDbg ( float contentLayoutOffsetY )
void SetMaxPositionDbg ( winrt::float2 maxPosition )
void SetMaxPositionExpressionAnimationExpressionDbg ( winrt::hstring const & maxPositionExpressionAnimationExpression )
void SetMinPositionDbg ( winrt::float2 minPosition )
void SetMinPositionExpressionAnimationExpressionDbg ( winrt::hstring const & minPositionExpressionAnimationExpression )
void SetTransformExpressionAnimationExpressionDbg ( winrt::hstring const & transformExpressionAnimationExpression )
void SetupInteractionTrackerBoundaries ( ) [private]
void SetupInteractionTrackerZoomFactorBoundaries | ( | double | minZoomFactor,
 |  | double | maxZoomFactor |
 | ) |  |  | [private]
void SetupPositionBoundariesExpressionAnimations ( const winrt::UIElement & content ) [private]
void SetupScrollControllerVisualInterationSource ( ScrollPresenterDimension dimension ) [private]
void SetupScrollControllerVisualInterationSourcePositionModifiers | ( | ScrollPresenterDimension | dimension,
 |  | const winrt::Orientation & | orientation |
 | ) |  |  | [private]
void SetupScrollPresenterVisualInteractionSource ( ) [private]
void SetupSnapPoints | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | ScrollPresenterDimension | dimension |
 | ) |  |  | [private]
void SetupSnapPoints | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | ScrollPresenterDimension | dimension
 | ) |  |

Definition at line 2004 of file ScrollPresenter.cpp.

{
    MUX_ASSERT(snapPointsSet);

    if (!m_interactionTracker)
    {
        EnsureInteractionTracker();
    }

    if (m_state == winrt::ScrollingInteractionState::Idle)
    {
        const double ignoredValue = [this, dimension]()
        {
            switch (dimension)
            {
            case ScrollPresenterDimension::VerticalScroll:
                return m_zoomedVerticalOffset / m_zoomFactor;
            case ScrollPresenterDimension::HorizontalScroll:
                return m_zoomedHorizontalOffset / m_zoomFactor;
            case ScrollPresenterDimension::ZoomFactor:
                return static_cast<double>(m_zoomFactor);
            default:
                MUX_ASSERT(false);
                return 0.0;
            }
        }();

        // When snap points are changed while in the Idle State, update
        // ignored snapping values for any potential start of an impulse inertia.
        UpdateSnapPointsIgnoredValue(snapPointsSet, ignoredValue);
    }

    // Update the regular and impulse actual applicable ranges.
    UpdateSnapPointsRanges(snapPointsSet, false /*forImpulseOnly*/);

    winrt::Compositor compositor = m_interactionTracker.Compositor();
    winrt::IVector<winrt::InteractionTrackerInertiaModifier> modifiers = winrt::make<Vector<winrt::InteractionTrackerInertiaModifier>>();

    winrt::hstring target = L"";
    winrt::hstring scale = L"";

    switch (dimension)
    {
    case ScrollPresenterDimension::HorizontalZoomFactor:
    case ScrollPresenterDimension::VerticalZoomFactor:
    case ScrollPresenterDimension::Scroll:
        //these ScrollPresenterDimensions are not expected
        MUX_ASSERT(false);
        break;
    case ScrollPresenterDimension::HorizontalScroll:
        target = s_naturalRestingPositionXPropertyName;
        scale = s_targetScalePropertyName;
        break;
    case ScrollPresenterDimension::VerticalScroll:
        target = s_naturalRestingPositionYPropertyName;
        scale = s_targetScalePropertyName;
        break;
    case ScrollPresenterDimension::ZoomFactor:
        target = s_naturalRestingScalePropertyName;
        scale = L"1.0";
        break;
    default:
        MUX_ASSERT(false);
    }

    // For older versions of windows the interaction tracker cannot accept empty collections of inertia modifiers
    if (snapPointsSet->size() == 0)
    {
        winrt::InteractionTrackerInertiaRestingValue modifier = winrt::InteractionTrackerInertiaRestingValue::Create(compositor);
        winrt::ExpressionAnimation conditionExpressionAnimation = compositor.CreateExpressionAnimation(L"false");
        winrt::ExpressionAnimation restingPointExpressionAnimation = compositor.CreateExpressionAnimation(L"this.Target." + target);

        modifier.Condition(conditionExpressionAnimation);
        modifier.RestingValue(restingPointExpressionAnimation);

        modifiers.Append(modifier);
    }
    else
    {
        for (auto snapPointWrapper : *snapPointsSet)
        {
            winrt::InteractionTrackerInertiaRestingValue modifier = GetInertiaRestingValue(
                snapPointWrapper,
                compositor,
                target,
                scale);

            modifiers.Append(modifier);
        }
    }

    switch (dimension)
    {
    case ScrollPresenterDimension::HorizontalZoomFactor:
    case ScrollPresenterDimension::VerticalZoomFactor:
    case ScrollPresenterDimension::Scroll:
        //these ScrollPresenterDimensions are not expected
        MUX_ASSERT(false);
        break;
    case ScrollPresenterDimension::HorizontalScroll:
        m_interactionTracker.ConfigurePositionXInertiaModifiers(modifiers);
        break;
    case ScrollPresenterDimension::VerticalScroll:
        m_interactionTracker.ConfigurePositionYInertiaModifiers(modifiers);
        break;
    case ScrollPresenterDimension::ZoomFactor:
        m_interactionTracker.ConfigureScaleInertiaModifiers(modifiers);
        break;
    default:
        MUX_ASSERT(false);
    }
}

void SetupTransformExpressionAnimations ( const winrt::UIElement & content ) [private]
void SetupVisualInteractionSourceCenterPointModifier | ( | const winrt::VisualInteractionSource & | visualInteractionSource,
 |  | ScrollPresenterDimension | dimension,
 |  | bool | flowDirectionChanged |
 | ) |  |  | [private]
void SetupVisualInteractionSourceChainingMode | ( | const winrt::VisualInteractionSource & | visualInteractionSource,
 |  | ScrollPresenterDimension | dimension,
 |  | const winrt::ScrollingChainMode & | chainingMode |
 | ) |  |  | [private]
void SetupVisualInteractionSourceMode | ( | const winrt::VisualInteractionSource & | visualInteractionSource,
 |  | ScrollPresenterDimension | dimension,
 |  | const winrt::ScrollingScrollMode & | scrollMode |
 | ) |  |  | [private]
void SetupVisualInteractionSourceMode | ( | const winrt::VisualInteractionSource & | visualInteractionSource,
 |  | const winrt::ScrollingZoomMode & | zoomMode |
 | ) |  |  | [private]
void SetupVisualInteractionSourceRailingMode | ( | const winrt::VisualInteractionSource & | visualInteractionSource,
 |  | ScrollPresenterDimension | dimension,
 |  | const winrt::ScrollingRailMode & | railingMode |
 | ) |  |  | [private]
void SetupVisualInteractionSourceRedirectionMode ( const winrt::VisualInteractionSource & visualInteractionSource ) [private]
void SnapPointsVectorChangedHelper | ( | winrt::IObservableVector< T > const & | snapPoints,
 |  | winrt::IVectorChangedEventArgs const & | args,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | ScrollPresenterDimension | dimension
 | ) |  |

Definition at line 5036 of file ScrollPresenter.cpp.

{
    MUX_ASSERT(snapPoints);
    MUX_ASSERT(snapPointsSet);

    T insertedItem = nullptr;
    const winrt::CollectionChange collectionChange = args.CollectionChange();

    if (dimension != ScrollPresenterDimension::ZoomFactor)
    {
        const double viewportSize = dimension == ScrollPresenterDimension::HorizontalScroll ? m_viewportWidth : m_viewportHeight;

        if (collectionChange == winrt::CollectionChange::ItemInserted)
        {
            insertedItem = snapPoints.GetAt(args.Index());

            winrt::SnapPointBase winrtSnapPointBase = insertedItem.as<winrt::SnapPointBase>();
            SnapPointBase* snapPointBase = winrt::get_self<SnapPointBase>(winrtSnapPointBase);

            // Newly inserted scroll snap point is provided the viewport size, for the case it's not near-aligned.
            const bool snapPointNeedsViewportUpdates = snapPointBase->OnUpdateViewport(viewportSize);

            // When snapPointNeedsViewportUpdates is True, this newly inserted scroll snap point may be the first one
            // that requires viewport updates.
            if (dimension == ScrollPresenterDimension::HorizontalScroll)
            {
                m_horizontalSnapPointsNeedViewportUpdates |= snapPointNeedsViewportUpdates;
            }
            else
            {
                m_verticalSnapPointsNeedViewportUpdates |= snapPointNeedsViewportUpdates;
            }
        }
        else if (collectionChange == winrt::CollectionChange::Reset ||
            collectionChange == winrt::CollectionChange::ItemChanged)
        {
            // Globally reevaluate the need for viewport updates even for CollectionChange::ItemChanged since
            // the old item may or may not have been the sole snap point requiring viewport updates.
            const bool snapPointsNeedViewportUpdates = SnapPointsViewportChangedHelper(snapPoints, viewportSize);

            if (dimension == ScrollPresenterDimension::HorizontalScroll)
            {
                m_horizontalSnapPointsNeedViewportUpdates = snapPointsNeedViewportUpdates;
            }
            else
            {
                m_verticalSnapPointsNeedViewportUpdates = snapPointsNeedViewportUpdates;
            }
        }
    }

    switch (collectionChange)
    {
    case winrt::CollectionChange::ItemInserted:
    {
        if (!insertedItem)
        {
            insertedItem = snapPoints.GetAt(args.Index());
        }

        std::shared_ptr<SnapPointWrapper<T>> insertedSnapPointWrapper =
            std::make_shared<SnapPointWrapper<T>>(insertedItem);

        SnapPointsVectorItemInsertedHelper(insertedSnapPointWrapper, snapPointsSet);
        break;
    }
    case winrt::CollectionChange::Reset:
    case winrt::CollectionChange::ItemRemoved:
    case winrt::CollectionChange::ItemChanged:
    {
        RegenerateSnapPointsSet(snapPoints, snapPointsSet);
        break;
    }
    default:
        MUX_ASSERT(false);
        break;
    }

    SetupSnapPoints(snapPointsSet, dimension);
}

void SnapPointsVectorChangedHelper | ( | winrt::IObservableVector< T > const & | scrollSnapPoints,
 |  | winrt::IVectorChangedEventArgs const & | args,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | ScrollPresenterDimension | dimension |
 | ) |  |  | [private]
void SnapPointsVectorItemInsertedHelper | ( | std::shared_ptr< SnapPointWrapper< T >> | insertedItem,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet |
 | ) |  |  | [private]
void SnapPointsVectorItemInsertedHelper | ( | std::shared_ptr< SnapPointWrapper< T >> | insertedItem,
 |  | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet
 | ) |  |

Definition at line 5122 of file ScrollPresenter.cpp.

{
    if (snapPointsSet->empty())
    {
        snapPointsSet->insert(insertedItem);
        return;
    }

    winrt::SnapPointBase winrtInsertedItem = insertedItem->SnapPoint().as<winrt::SnapPointBase>();
    auto lowerBound = snapPointsSet->lower_bound(insertedItem);

    if (lowerBound != snapPointsSet->end())
    {
        winrt::SnapPointBase winrtSnapPointBase = (*lowerBound)->SnapPoint().as<winrt::SnapPointBase>();
        SnapPointBase* lowerSnapPoint = winrt::get_self<SnapPointBase>(winrtSnapPointBase);

        if (*lowerSnapPoint == winrt::get_self<SnapPointBase>(winrtInsertedItem))
        {
            (*lowerBound)->Combine(insertedItem.get());
            return;
        }
        lowerBound++;
    }
    if (lowerBound != snapPointsSet->end())
    {
        winrt::SnapPointBase winrtSnapPointBase = (*lowerBound)->SnapPoint().as<winrt::SnapPointBase>();
        SnapPointBase* upperSnapPoint = winrt::get_self<SnapPointBase>(winrtSnapPointBase);

        if (*upperSnapPoint == winrt::get_self<SnapPointBase>(winrtInsertedItem))
        {
            (*lowerBound)->Combine(insertedItem.get());
            return;
        }
    }
    snapPointsSet->insert(insertedItem);
}

bool SnapPointsViewportChangedHelper | ( | winrt::IObservableVector< T > const & | snapPoints,
 |  | double | viewport
 | ) |  |

Definition at line 5018 of file ScrollPresenter.cpp.

{
    bool snapPointsNeedViewportUpdates = false;

    for (T snapPoint : snapPoints)
    {
        winrt::SnapPointBase winrtSnapPointBase = snapPoint.as<winrt::SnapPointBase>();
        SnapPointBase* snapPointBase = winrt::get_self<SnapPointBase>(winrtSnapPointBase);

        snapPointsNeedViewportUpdates |= snapPointBase->OnUpdateViewport(viewport);
    }

    return snapPointsNeedViewportUpdates;
}

bool SnapPointsViewportChangedHelper | ( | winrt::IObservableVector< T > const & | snapPoints,
 |  | double | viewport |
 | ) |  |  | [private]
void StartExpressionAnimationSourcesAnimations ( ) [private]
void StartScrollControllerExpressionAnimationSourcesAnimations ( ScrollPresenterDimension dimension ) [private]
void StartTransformExpressionAnimations ( const winrt::UIElement & content ) [private]
bool StartTranslationAndZoomFactorExpressionAnimations ( bool interruptCountdown = false ) [private]
winrt::ScrollingInteractionState State ( ) const
void StopScrollControllerExpressionAnimationSourcesAnimations ( ScrollPresenterDimension dimension ) [private]
void StopTransformExpressionAnimations ( const winrt::UIElement & content ) [private]
void StopTranslationAndZoomFactorExpressionAnimations ( ) [private]
void UnhookCompositionTargetRendering ( ) [private]
void UnhookContentPropertyChanged ( const winrt::UIElement & content ) [private]
void UnhookHorizontalScrollControllerEvents ( ) [private]
void UnhookHorizontalScrollControllerPanningInfoEvents ( ) [private]
void UnhookScrollPresenterEvents ( ) [private]
void UnhookVerticalScrollControllerEvents ( ) [private]
void UnhookVerticalScrollControllerPanningInfoEvents ( ) [private]
void UnregisterAnchorCandidate ( winrt::UIElement const & element )
void UpdateAnticipatedOffset | ( | ScrollPresenterDimension | dimension,
 |  | double | zoomedOffset |
 | ) |  |  | [private]
void UpdateAnticipatedZoomFactor ( float zoomFactor ) [private]
void UpdateContent | ( | const winrt::UIElement & | oldContent,
 |  | const winrt::UIElement & | newContent |
 | ) |  |  | [private]
void UpdateExpressionAnimationSources ( ) [private]
void UpdateManipulationRedirectionMode ( ) [private]
void UpdateOffset | ( | ScrollPresenterDimension | dimension,
 |  | double | zoomedOffset |
 | ) |  |  | [private]
void UpdatePositionBoundaries ( const winrt::UIElement & content ) [private]
void UpdateScrollAutomationPatternProperties ( ) [private]
void UpdateScrollControllerIsScrollable ( ScrollPresenterDimension dimension ) [private]
void UpdateScrollControllerValues ( ScrollPresenterDimension dimension ) [private]
bool UpdateSnapPointsIgnoredValue | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | double | newIgnoredValue
 | ) |  |

Definition at line 2217 of file ScrollPresenter.cpp.

{
    bool ignoredValueUpdated = false;

    for (auto snapPointWrapper : *snapPointsSet)
    {
        if (snapPointWrapper->ResetIgnoredValue())
        {
            ignoredValueUpdated = true;
            break;
        }
    }

    int snapCount = 0;

    for (auto snapPointWrapper : *snapPointsSet)
    {
        const SnapPointBase* snapPoint = SnapPointWrapper<T>::GetSnapPointFromWrapper(snapPointWrapper);

        snapCount += snapPoint->SnapCount();

        if (snapCount > 1)
        {
            break;
        }
    }

    if (snapCount > 1)
    {
        for (auto snapPointWrapper : *snapPointsSet)
        {
            if (snapPointWrapper->SnapsAt(newIgnoredValue))
            {
                snapPointWrapper->SetIgnoredValue(newIgnoredValue);
                ignoredValueUpdated = true;
                break;
            }
        }
    }

    return ignoredValueUpdated;
}

void UpdateSnapPointsIgnoredValue | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | ScrollPresenterDimension | dimension |
 | ) |  |  | [private]
void UpdateSnapPointsIgnoredValue | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | ScrollPresenterDimension | dimension
 | ) |  |

Definition at line 2160 of file ScrollPresenter.cpp.

{
    const double newIgnoredValue = [this, dimension]()
    {
        switch (dimension)
        {
        case ScrollPresenterDimension::VerticalScroll:
            return m_zoomedVerticalOffset / m_zoomFactor;
        case ScrollPresenterDimension::HorizontalScroll:
            return m_zoomedHorizontalOffset / m_zoomFactor;
        case ScrollPresenterDimension::ZoomFactor:
            return static_cast<double>(m_zoomFactor);
        default:
            MUX_ASSERT(false);
            return 0.0;
        }
    }();

    if (UpdateSnapPointsIgnoredValue(snapPointsSet, newIgnoredValue))
    {
        // The ignored snap point value has changed.
        UpdateSnapPointsRanges(snapPointsSet, true /*forImpulseOnly*/);

        winrt::Compositor compositor = m_interactionTracker.Compositor();
        winrt::IVector<winrt::InteractionTrackerInertiaModifier> modifiers = winrt::make<Vector<winrt::InteractionTrackerInertiaModifier>>();

        for (auto snapPointWrapper : *snapPointsSet)
        {
            auto modifier = winrt::InteractionTrackerInertiaRestingValue::Create(compositor);
            auto const [conditionExpressionAnimation, restingValueExpressionAnimation] = snapPointWrapper->GetUpdatedExpressionAnimationsForImpulse();

            modifier.Condition(conditionExpressionAnimation);
            modifier.RestingValue(restingValueExpressionAnimation);

            modifiers.Append(modifier);
        }

        switch (dimension)
        {
        case ScrollPresenterDimension::VerticalScroll:
            m_interactionTracker.ConfigurePositionYInertiaModifiers(modifiers);
            break;
        case ScrollPresenterDimension::HorizontalScroll:
            m_interactionTracker.ConfigurePositionXInertiaModifiers(modifiers);
            break;
        case ScrollPresenterDimension::ZoomFactor:
            m_interactionTracker.ConfigureScaleInertiaModifiers(modifiers);
            break;
        }
    }
}

bool UpdateSnapPointsIgnoredValue | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | double | newIgnoredValue |
 | ) |  |  | [private]
void UpdateSnapPointsRanges | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | bool | forImpulseOnly
 | ) |  |

Definition at line 2125 of file ScrollPresenter.cpp.

{
    MUX_ASSERT(snapPointsSet);

    std::shared_ptr<SnapPointWrapper<T>> currentSnapPointWrapper = nullptr;
    std::shared_ptr<SnapPointWrapper<T>> previousSnapPointWrapper = nullptr;
    std::shared_ptr<SnapPointWrapper<T>> nextSnapPointWrapper = nullptr;

    for (auto snapPointWrapper : *snapPointsSet)
    {
        previousSnapPointWrapper = currentSnapPointWrapper;
        currentSnapPointWrapper = nextSnapPointWrapper;
        nextSnapPointWrapper = snapPointWrapper;

        if (currentSnapPointWrapper)
        {
            currentSnapPointWrapper->DetermineActualApplicableZone(
                previousSnapPointWrapper ? previousSnapPointWrapper.get() : nullptr,
                nextSnapPointWrapper ? nextSnapPointWrapper.get() : nullptr,
                forImpulseOnly);
        }
    }

    if (nextSnapPointWrapper)
    {
        nextSnapPointWrapper->DetermineActualApplicableZone(
            currentSnapPointWrapper ? currentSnapPointWrapper.get() : nullptr,
            nullptr,
            forImpulseOnly);
    }
}

void UpdateSnapPointsRanges | ( | std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> * | snapPointsSet,
 |  | bool | forImpulseOnly |
 | ) |  |  | [private]
void UpdateState ( const winrt::ScrollingInteractionState & state ) [private]
void UpdateTransformSource | ( | const winrt::UIElement & | oldContent,
 |  | const winrt::UIElement & | newContent |
 | ) |  |  | [private]
void UpdateUnzoomedExtentAndViewport | ( | bool | renderSizeChanged,
 |  | double | unzoomedExtentWidth,
 |  | double | unzoomedExtentHeight,
 |  | double | viewportWidth,
 |  | double | viewportHeight |
 | ) |  |  | [private]
void UpdateVisualInteractionSourceMode ( ScrollPresenterDimension dimension ) [private]
static void ValidateAnchorRatio ( double value ) [static]
static void ValidateZoomFactoryBoundary ( double value ) [static]
void ValuesChanged ( const winrt::InteractionTrackerValuesChangedArgs & args )
double VerticalOffset ( ) const
void VerticalScrollController ( winrt::IScrollController const & value )
winrt::IScrollController VerticalScrollController ( ) const
winrt::IVector<winrt::ScrollSnapPointBase> VerticalSnapPoints ( )
void ViewportChanged ( winrt::event_token const & token )
winrt::event_token ViewportChanged ( winrt::ViewportChangedEventHandler const & value )
double ViewportHeight ( ) const
double ViewportWidth ( ) const
int32_t ZoomBy | ( | float | zoomFactorDelta,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::ScrollingZoomOptions const & | options
 | ) |  |
int32_t ZoomBy | ( | float | zoomFactorDelta,
 |  | winrt::IReference< winrt::float2 > | centerPoint
 | ) |  |
float ZoomFactor ( ) const
winrt::IVector<winrt::ZoomSnapPointBase> ZoomSnapPoints ( )
int32_t ZoomTo | ( | float | zoomFactor,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::ScrollingZoomOptions const & | options
 | ) |  |
int32_t ZoomTo | ( | float | zoomFactor,
 |  | winrt::IReference< winrt::float2 > | centerPoint
 | ) |  |

Member Data Documentation

std::vector<tracker_ref<winrt::UIElement> > m_anchorCandidates [private]

Definition at line 804 of file ScrollPresenter.h.

std::list<std::shared_ptr<InteractionTrackerAsyncOperation> > m_interactionTrackerAsyncOperations [private]

Definition at line 842 of file ScrollPresenter.h.

const int32_t s_noOpCorrelationId [static]

Definition at line 81 of file ScrollPresenter.h.

constexpr int s_translationAndZoomFactorAnimationsRestartTicks = 4 [static]

Definition at line 79 of file ScrollPresenter.h.

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollPresenter.h
  • ScrollPresenter/ScrollPresenter.cpp
Generated on Sun Dec 1 2024 20:53:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes

ScrollPresenterAutomationPeer Class Reference

#include "ScrollPresenterAutomationPeer.h"

Inherits ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider >.

List of all members.

Public Member Functions

ScrollPresenterAutomationPeer (winrt::ScrollPresenter const &owner)
~ScrollPresenterAutomationPeer ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | HorizontallyScrollable ()
double | HorizontalScrollPercent ()
double | HorizontalViewSize ()
void | Scroll (winrt::ScrollAmount const &horizontalAmount, winrt::ScrollAmount const &verticalAmount)
void | SetScrollPercent (double horizontalPercent, double verticalPercent)
void | UpdateScrollPatternProperties ()
bool | VerticallyScrollable ()
double | VerticalScrollPercent ()
double | VerticalViewSize ()

Private Member Functions

bool | get_HorizontallyScrollableImpl ()
double | get_HorizontalScrollPercentImpl ()
double | get_HorizontalViewSizeImpl ()
bool | get_VerticallyScrollableImpl ()
double | get_VerticalScrollPercentImpl ()
double | get_VerticalViewSizeImpl ()
winrt::IInspectable | GetPatternCoreImpl (winrt::PatternInterface patternInterface)
winrt::ScrollPresenter | GetScrollPresenter ()

Static Private Member Functions

static double | GetScrollPercent (double zoomedExtent, double viewport, double offset)
static double | GetViewPercent (double zoomedExtent, double viewport)

Static Private Attributes

static double | s_maximumPercent
static double | s_minimumPercent
static double | s_noScroll

Detailed Description

Definition at line 10 of file ScrollPresenterAutomationPeer.h.

Constructor & Destructor Documentation

ScrollPresenterAutomationPeer ( winrt::ScrollPresenter const & owner )

Definition at line 19 of file ScrollPresenterAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
    SCROLLPRESENTER_TRACE_VERBOSE(owner, TRACE_MSG_METH_PTR, METH_NAME, this, owner);
}

~ScrollPresenterAutomationPeer ( ) [inline]

Definition at line 16 of file ScrollPresenterAutomationPeer.h.

    {
        SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
    }

Member Function Documentation

bool get_HorizontallyScrollableImpl ( ) [private]

Definition at line 325 of file ScrollPresenterAutomationPeer.cpp.

{
    com_ptr<ScrollPresenter> scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter())->get_strong();

    return scrollPresenter->ScrollableWidth() > 0.0;
}

double get_HorizontalScrollPercentImpl ( ) [private]

Definition at line 285 of file ScrollPresenterAutomationPeer.cpp.

{
    com_ptr<ScrollPresenter> scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter())->get_strong();

    return GetScrollPercent(
        scrollPresenter->GetZoomedExtentWidth(),
        scrollPresenter->ViewportWidth(),
        GetScrollPresenter().HorizontalOffset());
}

double get_HorizontalViewSizeImpl ( ) [private]

Definition at line 306 of file ScrollPresenterAutomationPeer.cpp.

{
    com_ptr<ScrollPresenter> scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter())->get_strong();

    return GetViewPercent(
        scrollPresenter->GetZoomedExtentWidth(),
        scrollPresenter->ViewportWidth());
}

bool get_VerticallyScrollableImpl ( ) [private]

Definition at line 332 of file ScrollPresenterAutomationPeer.cpp.

{
    com_ptr<ScrollPresenter> scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter())->get_strong();

    return scrollPresenter->ScrollableHeight() > 0.0;
}

double get_VerticalScrollPercentImpl ( ) [private]

Definition at line 295 of file ScrollPresenterAutomationPeer.cpp.

{
    com_ptr<ScrollPresenter> scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter())->get_strong();

    return GetScrollPercent(
        scrollPresenter->GetZoomedExtentHeight(),
        scrollPresenter->ViewportHeight(),
        GetScrollPresenter().VerticalOffset());
}

double get_VerticalViewSizeImpl ( ) [private]

Definition at line 316 of file ScrollPresenterAutomationPeer.cpp.

{
    com_ptr<ScrollPresenter> scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter())->get_strong();

    return GetViewPercent(
        scrollPresenter->GetZoomedExtentHeight(),
        scrollPresenter->ViewportHeight());
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 27 of file ScrollPresenterAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Pane;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 32 of file ScrollPresenterAutomationPeer.cpp.

{
    return GetPatternCoreImpl(patternInterface);
}

winrt::IInspectable GetPatternCoreImpl ( winrt::PatternInterface patternInterface ) [private]

Definition at line 339 of file ScrollPresenterAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Scroll)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

double GetScrollPercent | ( | double | zoomedExtent,
 |  | double | viewport,
 |  | double | offset |
 | ) |  |  | [static, private]

Definition at line 368 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(zoomedExtent >= 0.0);
    MUX_ASSERT(viewport >= 0.0);

    if (viewport >= zoomedExtent)
    {
        return winrt::ScrollPatternIdentifiers::NoScroll();
    }

    double scrollPercent = offset / (zoomedExtent - viewport) * s_maximumPercent;

    scrollPercent = std::max(scrollPercent, s_minimumPercent);
    scrollPercent = std::min(scrollPercent, s_maximumPercent);

    return scrollPercent;
}

winrt::ScrollPresenter GetScrollPresenter ( ) [private]

Definition at line 349 of file ScrollPresenterAutomationPeer.cpp.

{
    winrt::UIElement owner = Owner();
    return owner.as<winrt::ScrollPresenter>();
}

double GetViewPercent | ( | double | zoomedExtent,
 |  | double | viewport |
 | ) |  |  | [static, private]

Definition at line 355 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(zoomedExtent >= 0.0);
    MUX_ASSERT(viewport >= 0.0);

    if (zoomedExtent == 0.0)
    {
        return s_maximumPercent;
    }

    return std::min(s_maximumPercent, (viewport / zoomedExtent * s_maximumPercent));
}

bool HorizontallyScrollable ( )

Definition at line 198 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(m_horizontallyScrollable == get_HorizontallyScrollableImpl());

    return m_horizontallyScrollable;
}

double HorizontalScrollPercent ( )

Definition at line 168 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(m_horizontalScrollPercent == get_HorizontalScrollPercentImpl());

    return m_horizontalScrollPercent;
}

double HorizontalViewSize ( )

Definition at line 183 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(m_horizontalViewSize == get_HorizontalViewSizeImpl());

    return m_horizontalViewSize;
}

void Scroll | ( | winrt::ScrollAmount const & | horizontalAmount,
 |  | winrt::ScrollAmount const & | verticalAmount
 | ) |  |

Definition at line 42 of file ScrollPresenterAutomationPeer.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(Owner(), TRACE_MSG_METH_STR_STR, METH_NAME, this,
        TypeLogging::ScrollAmountToString(horizontalAmount).c_str(), TypeLogging::ScrollAmountToString(verticalAmount).c_str());

    if (!IsEnabled())
    {
        throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
    }

    const bool scrollHorizontally = horizontalAmount != winrt::ScrollAmount::NoAmount;
    const bool scrollVertically = verticalAmount != winrt::ScrollAmount::NoAmount;

    const bool isHorizontallyScrollable = HorizontallyScrollable();
    const bool isVerticallyScrollable = VerticallyScrollable();

    if (!(scrollHorizontally && !isHorizontallyScrollable) && !(scrollVertically && !isVerticallyScrollable))
    {
        auto scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter());
        bool isInvalidOperation = false;

        switch (horizontalAmount)
        {
        case winrt::ScrollAmount::LargeDecrement:
            scrollPresenter->PageLeft();
            break;
        case winrt::ScrollAmount::LargeIncrement:
            scrollPresenter->PageRight();
            break;
        case winrt::ScrollAmount::SmallDecrement:
            scrollPresenter->LineLeft();
            break;
        case winrt::ScrollAmount::SmallIncrement:
            scrollPresenter->LineRight();
            break;
        case winrt::ScrollAmount::NoAmount:
            break;
        default:
            isInvalidOperation = true;
            break;
        }

        if (!isInvalidOperation)
        {
            switch (verticalAmount)
            {
            case winrt::ScrollAmount::LargeDecrement:
                scrollPresenter->PageUp();
                return;
            case winrt::ScrollAmount::SmallDecrement:
                scrollPresenter->LineUp();
                return;
            case winrt::ScrollAmount::SmallIncrement:
                scrollPresenter->LineDown();
                return;
            case winrt::ScrollAmount::LargeIncrement:
                scrollPresenter->PageDown();
                return;
            case winrt::ScrollAmount::NoAmount:
                return;
            }
        }
    }

    throw winrt::hresult_error(UIA_E_INVALIDOPERATION, L"Cannot perform the operation.");
}

void SetScrollPercent | ( | double | horizontalPercent,
 |  | double | verticalPercent
 | ) |  |

Definition at line 113 of file ScrollPresenterAutomationPeer.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(Owner(), TRACE_MSG_METH_DBL_DBL, METH_NAME, this, horizontalPercent, verticalPercent);

    if (!IsEnabled())
    {
        throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
    }

    const bool scrollHorizontally = horizontalPercent != s_noScroll;
    const bool scrollVertically = verticalPercent != s_noScroll;

    if (!scrollHorizontally && !scrollVertically)
    {
        return;
    }

    const bool isHorizontallyScrollable = HorizontallyScrollable();
    const bool isVerticallyScrollable = VerticallyScrollable();

    if ((scrollHorizontally && !isHorizontallyScrollable) || (scrollVertically && !isVerticallyScrollable))
    {
        throw winrt::hresult_error(UIA_E_INVALIDOPERATION, L"Cannot perform the operation.");
    }

    if ((scrollHorizontally && (horizontalPercent < s_minimumPercent || horizontalPercent > s_maximumPercent)) ||
        (scrollVertically && (verticalPercent < s_minimumPercent || verticalPercent > s_maximumPercent)))
    {
        throw winrt::hresult_error(E_INVALIDARG);
    }

    auto scrollPresenter = winrt::get_self<ScrollPresenter>(GetScrollPresenter());

    if (scrollHorizontally && !scrollVertically)
    {
        const double maxOffset = scrollPresenter->ScrollableWidth();

        scrollPresenter->ScrollToHorizontalOffset(maxOffset * horizontalPercent / s_maximumPercent);
    }
    else if (scrollVertically && !scrollHorizontally)
    {
        const double maxOffset = scrollPresenter->ScrollableHeight();

        scrollPresenter->ScrollToVerticalOffset(maxOffset * verticalPercent / s_maximumPercent);
    }
    else
    {
        const double maxHorizontalOffset = scrollPresenter->ScrollableWidth();
        const double maxVerticalOffset = scrollPresenter->ScrollableHeight();

        scrollPresenter->ScrollToOffsets(
            maxHorizontalOffset * horizontalPercent / s_maximumPercent, maxVerticalOffset * verticalPercent / s_maximumPercent);
    }
}

void UpdateScrollPatternProperties ( )

Definition at line 213 of file ScrollPresenterAutomationPeer.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(Owner(), TRACE_MSG_METH, METH_NAME, this);

    const double newHorizontalScrollPercent = get_HorizontalScrollPercentImpl();
    const double newVerticalScrollPercent = get_VerticalScrollPercentImpl();
    const double newHorizontalViewSize = get_HorizontalViewSizeImpl();
    const double newVerticalViewSize = get_VerticalViewSizeImpl();
    const bool newHorizontallyScrollable = get_HorizontallyScrollableImpl();
    const bool newVerticallyScrollable = get_VerticallyScrollableImpl();

    if (newHorizontallyScrollable != m_horizontallyScrollable)
    {
        const bool oldHorizontallyScrollable = m_horizontallyScrollable;
        m_horizontallyScrollable = newHorizontallyScrollable;
        RaisePropertyChangedEvent(
            winrt::ScrollPatternIdentifiers::HorizontallyScrollableProperty(),
            box_value(oldHorizontallyScrollable).as<winrt::IReference<bool>>(),
            box_value(newHorizontallyScrollable).as<winrt::IReference<bool>>());
    }

    if (newVerticallyScrollable != m_verticallyScrollable)
    {
        const bool oldVerticallyScrollable = m_verticallyScrollable;
        m_verticallyScrollable = newVerticallyScrollable;
        RaisePropertyChangedEvent(
            winrt::ScrollPatternIdentifiers::HorizontallyScrollableProperty(),
            box_value(oldVerticallyScrollable).as<winrt::IReference<bool>>(),
            box_value(newVerticallyScrollable).as<winrt::IReference<bool>>());
    }

    if (newHorizontalViewSize != m_horizontalViewSize)
    {
        const double oldHorizontalViewSize = m_horizontalViewSize;
        m_horizontalViewSize = newHorizontalViewSize;
        RaisePropertyChangedEvent(
            winrt::ScrollPatternIdentifiers::HorizontalViewSizeProperty(),
            box_value(oldHorizontalViewSize).as<winrt::IReference<double>>(),
            box_value(newHorizontalViewSize).as<winrt::IReference<double>>());
    }

    if (newVerticalViewSize != m_verticalViewSize)
    {
        const double oldVerticalViewSize = m_verticalViewSize;
        m_verticalViewSize = newVerticalViewSize;
        RaisePropertyChangedEvent(
            winrt::ScrollPatternIdentifiers::VerticalViewSizeProperty(),
            box_value(oldVerticalViewSize).as<winrt::IReference<double>>(),
            box_value(newVerticalViewSize).as<winrt::IReference<double>>());
    }

    if (newHorizontalScrollPercent != m_horizontalScrollPercent)
    {
        const double oldHorizontalScrollPercent = m_horizontalScrollPercent;
        m_horizontalScrollPercent = newHorizontalScrollPercent;
        RaisePropertyChangedEvent(
            winrt::ScrollPatternIdentifiers::HorizontalScrollPercentProperty(),
            box_value(oldHorizontalScrollPercent).as<winrt::IReference<double>>(),
            box_value(newHorizontalScrollPercent).as<winrt::IReference<double>>());
    }

    if (newVerticalScrollPercent != m_verticalScrollPercent)
    {
        const double oldVerticalScrollPercent = m_verticalScrollPercent;
        m_verticalScrollPercent = newVerticalScrollPercent;
        RaisePropertyChangedEvent(
            winrt::ScrollPatternIdentifiers::VerticalScrollPercentProperty(),
            box_value(oldVerticalScrollPercent).as<winrt::IReference<double>>(),
            box_value(newVerticalScrollPercent).as<winrt::IReference<double>>());
    }
}

bool VerticallyScrollable ( )

Definition at line 205 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(m_verticallyScrollable == get_VerticallyScrollableImpl());

    return m_verticallyScrollable;
}

double VerticalScrollPercent ( )

Definition at line 175 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(m_verticalScrollPercent == get_VerticalScrollPercentImpl());

    return m_verticalScrollPercent;
}

double VerticalViewSize ( )

Definition at line 191 of file ScrollPresenterAutomationPeer.cpp.

{
    MUX_ASSERT(m_verticalViewSize == get_VerticalViewSizeImpl());

    return m_verticalViewSize;
}

Member Data Documentation

double s_maximumPercent [static, private]

Definition at line 60 of file ScrollPresenterAutomationPeer.h.

double s_minimumPercent [static, private]

Definition at line 52 of file ScrollPresenterAutomationPeer.h.

double s_noScroll [static, private]

Definition at line 61 of file ScrollPresenterAutomationPeer.h.

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollPresenterAutomationPeer.h
  • ScrollPresenter/ScrollPresenterAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ScrollPresenterProperties Class Reference

#include "ScrollPresenter.properties.h"

Inherited by ScrollPresenter.

List of all members.

Public Member Functions

ScrollPresenterProperties ()
winrt::event_token | AnchorRequested (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingAnchorRequestedEventArgs > const &value)
void | AnchorRequested (winrt::event_token const &token)
void | Background (winrt::Brush const &value)
winrt::Brush | Background ()
winrt::event_token | BringingIntoView (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingBringingIntoViewEventArgs > const &value)
void | BringingIntoView (winrt::event_token const &token)
void | ComputedHorizontalScrollMode (winrt::ScrollingScrollMode const &value)
winrt::ScrollingScrollMode | ComputedHorizontalScrollMode ()
void | ComputedVerticalScrollMode (winrt::ScrollingScrollMode const &value)
winrt::ScrollingScrollMode | ComputedVerticalScrollMode ()
void | Content (winrt::UIElement const &value)
winrt::UIElement | Content ()
void | ContentOrientation (winrt::ScrollingContentOrientation const &value)
winrt::ScrollingContentOrientation | ContentOrientation ()
winrt::event_token | ExtentChanged (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value)
void | ExtentChanged (winrt::event_token const &token)
void | HorizontalAnchorRatio (double value)
double | HorizontalAnchorRatio ()
void | HorizontalScrollChainMode (winrt::ScrollingChainMode const &value)
winrt::ScrollingChainMode | HorizontalScrollChainMode ()
void | HorizontalScrollMode (winrt::ScrollingScrollMode const &value)
winrt::ScrollingScrollMode | HorizontalScrollMode ()
void | HorizontalScrollRailMode (winrt::ScrollingRailMode const &value)
winrt::ScrollingRailMode | HorizontalScrollRailMode ()
void | IgnoredInputKinds (winrt::ScrollingInputKinds const &value)
winrt::ScrollingInputKinds | IgnoredInputKinds ()
void | MaxZoomFactor (double value)
double | MaxZoomFactor ()
void | MinZoomFactor (double value)
double | MinZoomFactor ()
void | ScrollAnimationStarting (winrt::event_token const &token)
winrt::event_token | ScrollAnimationStarting (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollAnimationStartingEventArgs > const &value)
winrt::event_token | ScrollCompleted (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs > const &value)
void | ScrollCompleted (winrt::event_token const &token)
void | ScrollStarting (winrt::event_token const &token)
winrt::event_token | ScrollStarting (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs > const &value)
winrt::event_token | StateChanged (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value)
void | StateChanged (winrt::event_token const &token)
double | VerticalAnchorRatio ()
void | VerticalAnchorRatio (double value)
winrt::ScrollingChainMode | VerticalScrollChainMode ()
void | VerticalScrollChainMode (winrt::ScrollingChainMode const &value)
winrt::ScrollingScrollMode | VerticalScrollMode ()
void | VerticalScrollMode (winrt::ScrollingScrollMode const &value)
void | VerticalScrollRailMode (winrt::ScrollingRailMode const &value)
winrt::ScrollingRailMode | VerticalScrollRailMode ()
void | ViewChanged (winrt::event_token const &token)
winrt::event_token | ViewChanged (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value)
winrt::event_token | ZoomAnimationStarting (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs > const &value)
void | ZoomAnimationStarting (winrt::event_token const &token)
winrt::ScrollingChainMode | ZoomChainMode ()
void | ZoomChainMode (winrt::ScrollingChainMode const &value)
void | ZoomCompleted (winrt::event_token const &token)
winrt::event_token | ZoomCompleted (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs > const &value)
void | ZoomMode (winrt::ScrollingZoomMode const &value)
winrt::ScrollingZoomMode | ZoomMode ()
winrt::event_token | ZoomStarting (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs > const &value)
void | ZoomStarting (winrt::event_token const &token)

Static Public Member Functions

static winrt::DependencyProperty | BackgroundProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | ComputedHorizontalScrollModeProperty ()
static winrt::DependencyProperty | ComputedVerticalScrollModeProperty ()
static winrt::DependencyProperty | ContentOrientationProperty ()
static winrt::DependencyProperty | ContentProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HorizontalAnchorRatioProperty ()
static winrt::DependencyProperty | HorizontalScrollChainModeProperty ()
static winrt::DependencyProperty | HorizontalScrollModeProperty ()
static winrt::DependencyProperty | HorizontalScrollRailModeProperty ()
static winrt::DependencyProperty | IgnoredInputKindsProperty ()
static winrt::DependencyProperty | MaxZoomFactorProperty ()
static winrt::DependencyProperty | MinZoomFactorProperty ()
static void | OnBackgroundPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnComputedHorizontalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnComputedVerticalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnContentOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalAnchorRatioPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalScrollChainModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalScrollRailModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIgnoredInputKindsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxZoomFactorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinZoomFactorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalAnchorRatioPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollChainModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollRailModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnZoomChainModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnZoomModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | VerticalAnchorRatioProperty ()
static winrt::DependencyProperty | VerticalScrollChainModeProperty ()
static winrt::DependencyProperty | VerticalScrollModeProperty ()
static winrt::DependencyProperty | VerticalScrollRailModeProperty ()
static winrt::DependencyProperty | ZoomChainModeProperty ()
static winrt::DependencyProperty | ZoomModeProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingAnchorRequestedEventArgs > > 		m_anchorRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingBringingIntoViewEventArgs > > 		m_bringingIntoViewEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::IInspectable > > 		m_extentChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingScrollAnimationStartingEventArgs > > 		m_scrollAnimationStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingScrollCompletedEventArgs > > 		m_scrollCompletedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingScrollStartingEventArgs > > 		m_scrollStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::IInspectable > > 		m_stateChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::IInspectable > > 		m_viewChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingZoomAnimationStartingEventArgs > > 		m_zoomAnimationStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingZoomCompletedEventArgs > > 		m_zoomCompletedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollingZoomStartingEventArgs > > 		m_zoomStartingEventSource

Static Public Attributes

static GlobalDependencyProperty | s_BackgroundProperty
static GlobalDependencyProperty | s_ComputedHorizontalScrollModeProperty
static GlobalDependencyProperty | s_ComputedVerticalScrollModeProperty
static GlobalDependencyProperty | s_ContentOrientationProperty
static GlobalDependencyProperty | s_ContentProperty
static GlobalDependencyProperty | s_HorizontalAnchorRatioProperty
static GlobalDependencyProperty | s_HorizontalScrollChainModeProperty
static GlobalDependencyProperty | s_HorizontalScrollModeProperty
static GlobalDependencyProperty | s_HorizontalScrollRailModeProperty
static GlobalDependencyProperty | s_IgnoredInputKindsProperty
static GlobalDependencyProperty | s_MaxZoomFactorProperty
static GlobalDependencyProperty | s_MinZoomFactorProperty
static GlobalDependencyProperty | s_VerticalAnchorRatioProperty
static GlobalDependencyProperty | s_VerticalScrollChainModeProperty
static GlobalDependencyProperty | s_VerticalScrollModeProperty
static GlobalDependencyProperty | s_VerticalScrollRailModeProperty
static GlobalDependencyProperty | s_ZoomChainModeProperty
static GlobalDependencyProperty | s_ZoomModeProperty

Detailed Description

Definition at line 7 of file ScrollPresenter.properties.h.

Constructor & Destructor Documentation

ScrollPresenterProperties ( )

Definition at line 35 of file ScrollPresenter.properties.cpp.

    : m_anchorRequestedEventSource{static_cast<ScrollPresenter*>(this)}

Member Function Documentation

winrt::event_token AnchorRequested ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingAnchorRequestedEventArgs > const & value )
void AnchorRequested ( winrt::event_token const & token )
winrt::Brush Background ( )
void Background ( winrt::Brush const & value )
static winrt::DependencyProperty BackgroundProperty ( ) [inline, static]

Definition at line 66 of file ScrollPresenter.properties.h.

{ return s_BackgroundProperty; }

winrt::event_token BringingIntoView ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingBringingIntoViewEventArgs > const & value )
void BringingIntoView ( winrt::event_token const & token )
static void ClearProperties ( ) [static]
winrt::ScrollingScrollMode ComputedHorizontalScrollMode ( )
void ComputedHorizontalScrollMode ( winrt::ScrollingScrollMode const & value )
static winrt::DependencyProperty ComputedHorizontalScrollModeProperty ( ) [inline, static]

Definition at line 67 of file ScrollPresenter.properties.h.

{ return s_ComputedHorizontalScrollModeProperty; }

void ComputedVerticalScrollMode ( winrt::ScrollingScrollMode const & value )
winrt::ScrollingScrollMode ComputedVerticalScrollMode ( )
static winrt::DependencyProperty ComputedVerticalScrollModeProperty ( ) [inline, static]

Definition at line 68 of file ScrollPresenter.properties.h.

{ return s_ComputedVerticalScrollModeProperty; }

winrt::UIElement Content ( )
void Content ( winrt::UIElement const & value )
void ContentOrientation ( winrt::ScrollingContentOrientation const & value )
winrt::ScrollingContentOrientation ContentOrientation ( )
static winrt::DependencyProperty ContentOrientationProperty ( ) [inline, static]

Definition at line 70 of file ScrollPresenter.properties.h.

{ return s_ContentOrientationProperty; }

static winrt::DependencyProperty ContentProperty ( ) [inline, static]

Definition at line 69 of file ScrollPresenter.properties.h.

{ return s_ContentProperty; }

static void EnsureProperties ( ) [static]
winrt::event_token ExtentChanged ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const & value )
void ExtentChanged ( winrt::event_token const & token )
void HorizontalAnchorRatio ( double value )
double HorizontalAnchorRatio ( )
static winrt::DependencyProperty HorizontalAnchorRatioProperty ( ) [inline, static]

Definition at line 71 of file ScrollPresenter.properties.h.

{ return s_HorizontalAnchorRatioProperty; }

void HorizontalScrollChainMode ( winrt::ScrollingChainMode const & value )
winrt::ScrollingChainMode HorizontalScrollChainMode ( )
static winrt::DependencyProperty HorizontalScrollChainModeProperty ( ) [inline, static]

Definition at line 72 of file ScrollPresenter.properties.h.

{ return s_HorizontalScrollChainModeProperty; }

winrt::ScrollingScrollMode HorizontalScrollMode ( )
void HorizontalScrollMode ( winrt::ScrollingScrollMode const & value )
static winrt::DependencyProperty HorizontalScrollModeProperty ( ) [inline, static]

Definition at line 73 of file ScrollPresenter.properties.h.

{ return s_HorizontalScrollModeProperty; }

void HorizontalScrollRailMode ( winrt::ScrollingRailMode const & value )
winrt::ScrollingRailMode HorizontalScrollRailMode ( )
static winrt::DependencyProperty HorizontalScrollRailModeProperty ( ) [inline, static]

Definition at line 74 of file ScrollPresenter.properties.h.

{ return s_HorizontalScrollRailModeProperty; }

void IgnoredInputKinds ( winrt::ScrollingInputKinds const & value )

Reimplemented in ScrollPresenter.

winrt::ScrollingInputKinds IgnoredInputKinds ( )
static winrt::DependencyProperty IgnoredInputKindsProperty ( ) [inline, static]

Definition at line 75 of file ScrollPresenter.properties.h.

{ return s_IgnoredInputKindsProperty; }

void MaxZoomFactor ( double value )
double MaxZoomFactor ( )
static winrt::DependencyProperty MaxZoomFactorProperty ( ) [inline, static]

Definition at line 76 of file ScrollPresenter.properties.h.

{ return s_MaxZoomFactorProperty; }

void MinZoomFactor ( double value )
double MinZoomFactor ( )
static winrt::DependencyProperty MinZoomFactorProperty ( ) [inline, static]

Definition at line 77 of file ScrollPresenter.properties.h.

{ return s_MinZoomFactorProperty; }

static void OnBackgroundPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnComputedHorizontalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnComputedVerticalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnContentOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalAnchorRatioPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalScrollChainModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalScrollRailModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIgnoredInputKindsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxZoomFactorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinZoomFactorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalAnchorRatioPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollChainModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollRailModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnZoomChainModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnZoomModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::event_token ScrollAnimationStarting ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollAnimationStartingEventArgs > const & value )
void ScrollAnimationStarting ( winrt::event_token const & token )
void ScrollCompleted ( winrt::event_token const & token )
winrt::event_token ScrollCompleted ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs > const & value )
winrt::event_token ScrollStarting ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs > const & value )
void ScrollStarting ( winrt::event_token const & token )
void StateChanged ( winrt::event_token const & token )
winrt::event_token StateChanged ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const & value )
void VerticalAnchorRatio ( double value )
double VerticalAnchorRatio ( )
static winrt::DependencyProperty VerticalAnchorRatioProperty ( ) [inline, static]

Definition at line 78 of file ScrollPresenter.properties.h.

{ return s_VerticalAnchorRatioProperty; }

winrt::ScrollingChainMode VerticalScrollChainMode ( )
void VerticalScrollChainMode ( winrt::ScrollingChainMode const & value )
static winrt::DependencyProperty VerticalScrollChainModeProperty ( ) [inline, static]

Definition at line 79 of file ScrollPresenter.properties.h.

{ return s_VerticalScrollChainModeProperty; }

void VerticalScrollMode ( winrt::ScrollingScrollMode const & value )
winrt::ScrollingScrollMode VerticalScrollMode ( )
static winrt::DependencyProperty VerticalScrollModeProperty ( ) [inline, static]

Definition at line 80 of file ScrollPresenter.properties.h.

{ return s_VerticalScrollModeProperty; }

void VerticalScrollRailMode ( winrt::ScrollingRailMode const & value )
winrt::ScrollingRailMode VerticalScrollRailMode ( )
static winrt::DependencyProperty VerticalScrollRailModeProperty ( ) [inline, static]

Definition at line 81 of file ScrollPresenter.properties.h.

{ return s_VerticalScrollRailModeProperty; }

winrt::event_token ViewChanged ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const & value )
void ViewChanged ( winrt::event_token const & token )
void ZoomAnimationStarting ( winrt::event_token const & token )
winrt::event_token ZoomAnimationStarting ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs > const & value )
void ZoomChainMode ( winrt::ScrollingChainMode const & value )
winrt::ScrollingChainMode ZoomChainMode ( )
static winrt::DependencyProperty ZoomChainModeProperty ( ) [inline, static]

Definition at line 82 of file ScrollPresenter.properties.h.

{ return s_ZoomChainModeProperty; }

void ZoomCompleted ( winrt::event_token const & token )
winrt::event_token ZoomCompleted ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs > const & value )
winrt::ScrollingZoomMode ZoomMode ( )
void ZoomMode ( winrt::ScrollingZoomMode const & value )
static winrt::DependencyProperty ZoomModeProperty ( ) [inline, static]

Definition at line 83 of file ScrollPresenter.properties.h.

{ return s_ZoomModeProperty; }

void ZoomStarting ( winrt::event_token const & token )
winrt::event_token ZoomStarting ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs > const & value )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingAnchorRequestedEventArgs> > m_anchorRequestedEventSource

Definition at line 127 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingBringingIntoViewEventArgs> > m_bringingIntoViewEventSource

Definition at line 128 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> > m_extentChangedEventSource

Definition at line 129 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollAnimationStartingEventArgs> > m_scrollAnimationStartingEventSource

Definition at line 130 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs> > m_scrollCompletedEventSource

Definition at line 131 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs> > m_scrollStartingEventSource

Definition at line 132 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> > m_stateChangedEventSource

Definition at line 133 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> > m_viewChangedEventSource

Definition at line 134 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs> > m_zoomAnimationStartingEventSource

Definition at line 135 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs> > m_zoomCompletedEventSource

Definition at line 136 of file ScrollPresenter.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs> > m_zoomStartingEventSource

Definition at line 137 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_BackgroundProperty [static]

Definition at line 85 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_ComputedHorizontalScrollModeProperty [static]

Definition at line 86 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_ComputedVerticalScrollModeProperty [static]

Definition at line 87 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_ContentOrientationProperty [static]

Definition at line 89 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_ContentProperty [static]

Definition at line 88 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_HorizontalAnchorRatioProperty [static]

Definition at line 90 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_HorizontalScrollChainModeProperty [static]

Definition at line 91 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_HorizontalScrollModeProperty [static]

Definition at line 92 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_HorizontalScrollRailModeProperty [static]

Definition at line 93 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_IgnoredInputKindsProperty [static]

Definition at line 94 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_MaxZoomFactorProperty [static]

Definition at line 95 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_MinZoomFactorProperty [static]

Definition at line 96 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_VerticalAnchorRatioProperty [static]

Definition at line 97 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_VerticalScrollChainModeProperty [static]

Definition at line 98 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_VerticalScrollModeProperty [static]

Definition at line 99 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_VerticalScrollRailModeProperty [static]

Definition at line 100 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_ZoomChainModeProperty [static]

Definition at line 101 of file ScrollPresenter.properties.h.

GlobalDependencyProperty s_ZoomModeProperty [static]

Definition at line 102 of file ScrollPresenter.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ScrollPresenter.properties.h
  • Generated/ScrollPresenter.properties.cpp
Generated on Sun Dec 1 2024 20:53:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

ScrollPresenterTestHooks Class Reference

#include "ScrollPresenterTestHooks.h"

List of all members.

Public Member Functions

ScrollPresenterTestHooks ()

Static Public Member Functions

static winrt::event_token | AnchorEvaluated (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksAnchorEvaluatedEventArgs > const &value)
static void | AnchorEvaluated (winrt::event_token const &token)
static bool | AreAnchorNotificationsRaised ()
static void | AreAnchorNotificationsRaised (bool areAnchorNotificationsRaised)
static void | AreExpressionAnimationStatusNotificationsRaised (bool areExpressionAnimationStatusNotificationsRaised)
static bool | AreExpressionAnimationStatusNotificationsRaised ()
static bool | AreInteractionSourcesNotificationsRaised ()
static void | AreInteractionSourcesNotificationsRaised (bool areInteractionSourcesNotificationsRaised)
static winrt::event_token | ContentLayoutOffsetXChanged (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value)
static void | ContentLayoutOffsetXChanged (winrt::event_token const &token)
static winrt::event_token | ContentLayoutOffsetYChanged (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value)
static void | ContentLayoutOffsetYChanged (winrt::event_token const &token)
static com_ptr
< ScrollPresenterTestHooks > 		EnsureGlobalTestHooks ()
static void | ExpressionAnimationStatusChanged (winrt::event_token const &token)
static winrt::event_token | ExpressionAnimationStatusChanged (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs > const &value)
static winrt::float2 | GetArrangeRenderSizesDelta (const winrt::ScrollPresenter &scrollPresenter)
static winrt::IVector
< winrt::ScrollSnapPointBase > 		GetConsolidatedHorizontalScrollSnapPoints (const winrt::ScrollPresenter &scrollPresenter)
static winrt::IVector
< winrt::ScrollSnapPointBase > 		GetConsolidatedVerticalScrollSnapPoints (const winrt::ScrollPresenter &scrollPresenter)
static winrt::IVector
< winrt::ZoomSnapPointBase > 		GetConsolidatedZoomSnapPoints (const winrt::ScrollPresenter &scrollPresenter)
static void | GetContentLayoutOffsetX (const winrt::ScrollPresenter &scrollPresenter, float &contentLayoutOffsetX)
static void | GetContentLayoutOffsetY (const winrt::ScrollPresenter &scrollPresenter, float &contentLayoutOffsetY)
static com_ptr
< ScrollPresenterTestHooks > 		GetGlobalTestHooks ()
static winrt::float2 | GetHorizontalSnapPointActualApplicableZone (const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint)
static int | GetHorizontalSnapPointCombinationCount (const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint)
static winrt::float2 | GetMaxPosition (const winrt::ScrollPresenter &scrollPresenter)
static winrt::hstring | GetMaxPositionExpressionAnimationExpression (const winrt::ScrollPresenter &scrollPresenter)
static winrt::float2 | GetMinPosition (const winrt::ScrollPresenter &scrollPresenter)
static winrt::hstring | GetMinPositionExpressionAnimationExpression (const winrt::ScrollPresenter &scrollPresenter)
static void | GetOffsetsChangeVelocityParameters (int &millisecondsPerUnit, int &minMilliseconds, int &maxMilliseconds)
static winrt::float2 | GetPosition (const winrt::ScrollPresenter &scrollPresenter)
static
winrt::ScrollPresenterViewChangeResult 		GetScrollCompletedResult (const winrt::ScrollingScrollCompletedEventArgs &scrollCompletedEventArgs)
static winrt::Color | GetSnapPointVisualizationColor (const winrt::SnapPointBase &snapPoint)
static winrt::hstring | GetTransformExpressionAnimationExpression (const winrt::ScrollPresenter &scrollPresenter)
static winrt::float2 | GetVerticalSnapPointActualApplicableZone (const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint)
static int | GetVerticalSnapPointCombinationCount (const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint)
static
winrt::ScrollPresenterViewChangeResult 		GetZoomCompletedResult (const winrt::ScrollingZoomCompletedEventArgs &zoomCompletedEventArgs)
static void | GetZoomFactorChangeVelocityParameters (int &millisecondsPerUnit, int &minMilliseconds, int &maxMilliseconds)
static winrt::float2 | GetZoomSnapPointActualApplicableZone (const winrt::ScrollPresenter &scrollPresenter, const winrt::ZoomSnapPointBase &zoomSnapPoint)
static int | GetZoomSnapPointCombinationCount (const winrt::ScrollPresenter &scrollPresenter, const winrt::ZoomSnapPointBase &zoomSnapPoint)
static winrt::event_token | InteractionSourcesChanged (winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs > const &value)
static void | InteractionSourcesChanged (winrt::event_token const &token)
static winrt::IReference< bool > | IsAnimationsEnabledOverride ()
static void | IsAnimationsEnabledOverride (winrt::IReference< bool > isAnimationsEnabledOverride)
static void | NotifyAnchorEvaluated (const winrt::ScrollPresenter &sender, const winrt::UIElement &anchorElement, double viewportAnchorPointHorizontalOffset, double viewportAnchorPointVerticalOffset)
static void | NotifyContentLayoutOffsetXChanged (const winrt::ScrollPresenter &sender)
static void | NotifyContentLayoutOffsetYChanged (const winrt::ScrollPresenter &sender)
static void | NotifyExpressionAnimationStatusChanged (const winrt::ScrollPresenter &sender, bool isExpressionAnimationStarted, wstring_view const &propertyName)
static void | NotifyInteractionSourcesChanged (const winrt::ScrollPresenter &sender, const winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection &interactionSources)
static void | SetContentLayoutOffsetX (const winrt::ScrollPresenter &scrollPresenter, float contentLayoutOffsetX)
static void | SetContentLayoutOffsetY (const winrt::ScrollPresenter &scrollPresenter, float contentLayoutOffsetY)
static void | SetMaxPosition (const winrt::ScrollPresenter &scrollPresenter, winrt::float2 maxPosition)
static void | SetMaxPositionExpressionAnimationExpression (const winrt::ScrollPresenter &scrollPresenter, winrt::hstring const &maxPositionExpressionAnimationExpression)
static void | SetMinPosition (const winrt::ScrollPresenter &scrollPresenter, winrt::float2 minPosition)
static void | SetMinPositionExpressionAnimationExpression (const winrt::ScrollPresenter &scrollPresenter, winrt::hstring const &minPositionExpressionAnimationExpression)
static void | SetOffsetsChangeVelocityParameters (int millisecondsPerUnit, int minMilliseconds, int maxMilliseconds)
static void | SetSnapPointVisualizationColor (const winrt::SnapPointBase &snapPoint, const winrt::Color &color)
static void | SetTransformExpressionAnimationExpression (const winrt::ScrollPresenter &scrollPresenter, winrt::hstring const &transformExpressionAnimationExpression)
static void | SetZoomFactorChangeVelocityParameters (int millisecondsPerUnit, int minMilliseconds, int maxMilliseconds)

Static Private Member Functions

static
winrt::ScrollPresenterViewChangeResult 		TestHooksViewChangeResult (ScrollPresenterViewChangeResult result)

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollPresenterTestHooksAnchorEvaluatedEventArgs > > 		m_anchorEvaluatedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::IInspectable > > 		m_contentLayoutOffsetXChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::IInspectable > > 		m_contentLayoutOffsetYChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs > > 		m_expressionAnimationStatusChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::ScrollPresenter,
winrt::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs > > 		m_interactionSourcesChangedEventSource

Static Private Attributes

static com_ptr
< ScrollPresenterTestHooks > 		s_testHooks

Detailed Description

Definition at line 13 of file ScrollPresenterTestHooks.h.

Constructor & Destructor Documentation

ScrollPresenterTestHooks ( )

Member Function Documentation

static winrt::event_token AnchorEvaluated ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksAnchorEvaluatedEventArgs > const & value ) [static]
static void AnchorEvaluated ( winrt::event_token const & token ) [static]
static bool AreAnchorNotificationsRaised ( ) [static]
static void AreAnchorNotificationsRaised ( bool areAnchorNotificationsRaised ) [static]
static void AreExpressionAnimationStatusNotificationsRaised ( bool areExpressionAnimationStatusNotificationsRaised ) [static]
static bool AreExpressionAnimationStatusNotificationsRaised ( ) [static]
static bool AreInteractionSourcesNotificationsRaised ( ) [static]
static void AreInteractionSourcesNotificationsRaised ( bool areInteractionSourcesNotificationsRaised ) [static]
static winrt::event_token ContentLayoutOffsetXChanged ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const & value ) [static]
static void ContentLayoutOffsetXChanged ( winrt::event_token const & token ) [static]
static winrt::event_token ContentLayoutOffsetYChanged ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const & value ) [static]
static void ContentLayoutOffsetYChanged ( winrt::event_token const & token ) [static]
static com_ptr<ScrollPresenterTestHooks> EnsureGlobalTestHooks ( ) [static]
static void ExpressionAnimationStatusChanged ( winrt::event_token const & token ) [static]
static winrt::event_token ExpressionAnimationStatusChanged ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs > const & value ) [static]
static winrt::float2 GetArrangeRenderSizesDelta ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::IVector<winrt::ScrollSnapPointBase> GetConsolidatedHorizontalScrollSnapPoints ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::IVector<winrt::ScrollSnapPointBase> GetConsolidatedVerticalScrollSnapPoints ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::IVector<winrt::ZoomSnapPointBase> GetConsolidatedZoomSnapPoints ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static void GetContentLayoutOffsetX | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | float & | contentLayoutOffsetX |
 | ) |  |  | [static]
static void GetContentLayoutOffsetY | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | float & | contentLayoutOffsetY |
 | ) |  |  | [static]
static com_ptr<ScrollPresenterTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 19 of file ScrollPresenterTestHooks.h.

    {
        return s_testHooks;
    }

static winrt::float2 GetHorizontalSnapPointActualApplicableZone | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | const winrt::ScrollSnapPointBase & | scrollSnapPoint |
 | ) |  |  | [static]
static int GetHorizontalSnapPointCombinationCount | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | const winrt::ScrollSnapPointBase & | scrollSnapPoint |
 | ) |  |  | [static]
static winrt::float2 GetMaxPosition ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::hstring GetMaxPositionExpressionAnimationExpression ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::float2 GetMinPosition ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::hstring GetMinPositionExpressionAnimationExpression ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static void GetOffsetsChangeVelocityParameters | ( | int & | millisecondsPerUnit,
 |  | int & | minMilliseconds,
 |  | int & | maxMilliseconds |
 | ) |  |  | [static]
static winrt::float2 GetPosition ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::ScrollPresenterViewChangeResult GetScrollCompletedResult ( const winrt::ScrollingScrollCompletedEventArgs & scrollCompletedEventArgs ) [static]
static winrt::Color GetSnapPointVisualizationColor ( const winrt::SnapPointBase & snapPoint ) [static]
static winrt::hstring GetTransformExpressionAnimationExpression ( const winrt::ScrollPresenter & scrollPresenter ) [static]
static winrt::float2 GetVerticalSnapPointActualApplicableZone | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | const winrt::ScrollSnapPointBase & | scrollSnapPoint |
 | ) |  |  | [static]
static int GetVerticalSnapPointCombinationCount | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | const winrt::ScrollSnapPointBase & | scrollSnapPoint |
 | ) |  |  | [static]
static winrt::ScrollPresenterViewChangeResult GetZoomCompletedResult ( const winrt::ScrollingZoomCompletedEventArgs & zoomCompletedEventArgs ) [static]
static void GetZoomFactorChangeVelocityParameters | ( | int & | millisecondsPerUnit,
 |  | int & | minMilliseconds,
 |  | int & | maxMilliseconds |
 | ) |  |  | [static]
static winrt::float2 GetZoomSnapPointActualApplicableZone | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | const winrt::ZoomSnapPointBase & | zoomSnapPoint |
 | ) |  |  | [static]
static int GetZoomSnapPointCombinationCount | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | const winrt::ZoomSnapPointBase & | zoomSnapPoint |
 | ) |  |  | [static]
static winrt::event_token InteractionSourcesChanged ( winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs > const & value ) [static]
static void InteractionSourcesChanged ( winrt::event_token const & token ) [static]
static winrt::IReference<bool> IsAnimationsEnabledOverride ( ) [static]
static void IsAnimationsEnabledOverride ( winrt::IReference< bool > isAnimationsEnabledOverride ) [static]
static void NotifyAnchorEvaluated | ( | const winrt::ScrollPresenter & | sender,
 |  | const winrt::UIElement & | anchorElement,
 |  | double | viewportAnchorPointHorizontalOffset,
 |  | double | viewportAnchorPointVerticalOffset |
 | ) |  |  | [static]
static void NotifyContentLayoutOffsetXChanged ( const winrt::ScrollPresenter & sender ) [static]
static void NotifyContentLayoutOffsetYChanged ( const winrt::ScrollPresenter & sender ) [static]
static void NotifyExpressionAnimationStatusChanged | ( | const winrt::ScrollPresenter & | sender,
 |  | bool | isExpressionAnimationStarted,
 |  | wstring_view const & | propertyName |
 | ) |  |  | [static]
static void NotifyInteractionSourcesChanged | ( | const winrt::ScrollPresenter & | sender,
 |  | const winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection & | interactionSources |
 | ) |  |  | [static]
static void SetContentLayoutOffsetX | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | float | contentLayoutOffsetX |
 | ) |  |  | [static]
static void SetContentLayoutOffsetY | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | float | contentLayoutOffsetY |
 | ) |  |  | [static]
static void SetMaxPosition | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | winrt::float2 | maxPosition |
 | ) |  |  | [static]
static void SetMaxPositionExpressionAnimationExpression | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | winrt::hstring const & | maxPositionExpressionAnimationExpression |
 | ) |  |  | [static]
static void SetMinPosition | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | winrt::float2 | minPosition |
 | ) |  |  | [static]
static void SetMinPositionExpressionAnimationExpression | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | winrt::hstring const & | minPositionExpressionAnimationExpression |
 | ) |  |  | [static]
static void SetOffsetsChangeVelocityParameters | ( | int | millisecondsPerUnit,
 |  | int | minMilliseconds,
 |  | int | maxMilliseconds |
 | ) |  |  | [static]
static void SetSnapPointVisualizationColor | ( | const winrt::SnapPointBase & | snapPoint,
 |  | const winrt::Color & | color |
 | ) |  |  | [static]
static void SetTransformExpressionAnimationExpression | ( | const winrt::ScrollPresenter & | scrollPresenter,
 |  | winrt::hstring const & | transformExpressionAnimationExpression |
 | ) |  |  | [static]
static void SetZoomFactorChangeVelocityParameters | ( | int | millisecondsPerUnit,
 |  | int | minMilliseconds,
 |  | int | maxMilliseconds |
 | ) |  |  | [static]
static winrt::ScrollPresenterViewChangeResult TestHooksViewChangeResult ( ScrollPresenterViewChangeResult result ) [static, private]

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksAnchorEvaluatedEventArgs> > m_anchorEvaluatedEventSource [private]

Definition at line 105 of file ScrollPresenterTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> > m_contentLayoutOffsetXChangedEventSource [private]

Definition at line 108 of file ScrollPresenterTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> > m_contentLayoutOffsetYChangedEventSource [private]

Definition at line 109 of file ScrollPresenterTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs> > m_expressionAnimationStatusChangedEventSource [private]

Definition at line 107 of file ScrollPresenterTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs> > m_interactionSourcesChangedEventSource [private]

Definition at line 106 of file ScrollPresenterTestHooks.h.

com_ptr<ScrollPresenterTestHooks> s_testHooks [static, private]

Definition at line 104 of file ScrollPresenterTestHooks.h.

The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollPresenterTestHooks.h
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestHooksAnchorEvaluatedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

ScrollPresenterTestHooksAnchorEvaluatedEventArgs Class Reference

#include "ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h"

List of all members.

Public Member Functions

ScrollPresenterTestHooksAnchorEvaluatedEventArgs (const winrt::UIElement &anchorElement, double viewportAnchorPointHorizontalOffset, double viewportAanchorPointVerticalOffset)
winrt::UIElement | AnchorElement ()
double | ViewportAnchorPointHorizontalOffset ()
double | ViewportAnchorPointVerticalOffset ()

Private Attributes

winrt::weak_ref< winrt::UIElement > | m_anchorElement

Detailed Description

Definition at line 8 of file ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h.

Constructor & Destructor Documentation

ScrollPresenterTestHooksAnchorEvaluatedEventArgs | ( | const winrt::UIElement & | anchorElement,
 |  | double | viewportAnchorPointHorizontalOffset,
 |  | double | viewportAanchorPointVerticalOffset
 | ) |  |

Definition at line 8 of file ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp.

{
    if (anchorElement)
    {
        m_anchorElement = winrt::make_weak(anchorElement);
    }
    m_viewportAnchorPointHorizontalOffset = viewportAnchorPointHorizontalOffset;
    m_viewportAnchorPointVerticalOffset = viewportAnchorPointVerticalOffset;
}

Member Function Documentation

winrt::UIElement AnchorElement ( )

Definition at line 23 of file ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp.

{
    return m_anchorElement.get();
}

double ViewportAnchorPointHorizontalOffset ( )

Definition at line 28 of file ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp.

{
    return m_viewportAnchorPointHorizontalOffset;
}

double ViewportAnchorPointVerticalOffset ( )

Definition at line 33 of file ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp.

{
    return m_viewportAnchorPointVerticalOffset;
}

Member Data Documentation

winrt::weak_ref<winrt::UIElement> m_anchorElement [private]

Definition at line 20 of file ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h.

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h
  • ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs Class Reference

#include "ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h"

List of all members.

Public Member Functions

ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs (bool isExpressionAnimationStarted, wstring_view const &propertyName)
bool | IsExpressionAnimationStarted ()
winrt::hstring | PropertyName ()

Detailed Description

Definition at line 8 of file ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h.

Constructor & Destructor Documentation

ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs | ( | bool | isExpressionAnimationStarted,
 |  | wstring_view const & | propertyName
 | ) |  |

Definition at line 8 of file ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp.

{
    m_isExpressionAnimationStarted = isExpressionAnimationStarted;
    m_propertyName = propertyName.data();
}

Member Function Documentation

bool IsExpressionAnimationStarted ( )

Definition at line 17 of file ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp.

{
    return m_isExpressionAnimationStarted;
}

winrt::hstring PropertyName ( )

Definition at line 22 of file ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp.

{
    return m_propertyName;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h
  • ScrollPresenter/ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTestHooksInteractionSourcesChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ScrollPresenterTestHooksInteractionSourcesChangedEventArgs Class Reference

#include "ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h"

List of all members.

Public Member Functions

ScrollPresenterTestHooksInteractionSourcesChangedEventArgs (const winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection &interactionSources)
winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection InteractionSources ()

Detailed Description

Definition at line 8 of file ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h.

Constructor & Destructor Documentation

ScrollPresenterTestHooksInteractionSourcesChangedEventArgs ( const winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection & interactionSources )

Definition at line 8 of file ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.cpp.

{
    m_interactionSources = interactionSources;
}

Member Function Documentation

winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection InteractionSources ( )

Definition at line 16 of file ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.cpp.

{
    return m_interactionSources;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h
  • ScrollPresenter/ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

ScrollPresenterTrace Class Reference

#include "ScrollPresenterTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file ScrollPresenterTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file ScrollPresenterTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ScrollPresenterInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_SCROLLPRESENTER),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ScrollPresenter") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 153 of file ScrollPresenterTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "ScrollPresenterPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_SCROLLPRESENTER),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file ScrollPresenterTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[1024]{};
        const HRESULT hr = StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args);
        if (SUCCEEDED(hr) || hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ScrollPresenterVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_SCROLLPRESENTER),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ScrollPresenter") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file ScrollPresenterTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file ScrollPresenterTrace.h.

The documentation for this class was generated from the following file:
  • ScrollPresenter/ScrollPresenterTrace.h
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollSnapPoint Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ScrollSnapPoint Class Reference

#include "SnapPoint.h"

List of all members.

Public Member Functions

ScrollSnapPoint (double snapPointValue, winrt::ScrollSnapPointsAlignment alignment=winrt::ScrollSnapPointsAlignment::Near)
void | Combine (int &combinationCount, winrt::SnapPointBase const &snapPoint) const
winrt::ExpressionAnimation | CreateConditionalExpression (std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
winrt::ExpressionAnimation | CreateRestingPointExpression (double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
std::tuple< double, double > | DetermineActualApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint)
std::tuple< double, double > | DetermineActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue)
double | Evaluate (std::tuple< double, double > actualApplicableZone, double value) const
double | ImpulseInfluence (double edgeOfMidpoint, double ignoredValue) const
double | Influence (double edgeOfMidpoint) const
int | SnapCount () const
SnapPointSortPredicate | SortPredicate () const
void | UpdateConditionalExpressionAnimationForImpulse (winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const
void | UpdateRestingPointExpressionAnimationForImpulse (winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const
double | Value ()

Private Member Functions

double | ActualValue () const
double | DetermineMaxActualApplicableZone (const SnapPointBase *nextSnapPoint) const
double | DetermineMaxActualImpulseApplicableZone (const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double nextIgnoredValue) const
double | DetermineMinActualApplicableZone (const SnapPointBase *previousSnapPoint) const
double | DetermineMinActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, double currentIgnoredValue, double previousIgnoredValue) const

Detailed Description

Definition at line 152 of file SnapPoint.h.

Constructor & Destructor Documentation

ScrollSnapPoint | ( | double | snapPointValue,
 |  | winrt::ScrollSnapPointsAlignment | alignment = winrt::ScrollSnapPointsAlignment::Near
 | ) |  |

Definition at line 161 of file SnapPoint.cpp.

{
    m_value = snapPointValue;
    m_alignment = alignment;
}

Member Function Documentation

double ActualValue ( ) const [private]

Definition at line 315 of file SnapPoint.cpp.

{
    return m_value + m_alignmentAdjustment;
}

void Combine | ( | int & | combinationCount,
 |  | winrt::SnapPointBase const & | snapPoint |
 | ) |  |  | const

Definition at line 500 of file SnapPoint.cpp.

{
    auto snapPointAsIrregular = snapPoint.try_as<winrt::ScrollSnapPoint>();
    if (snapPointAsIrregular)
    {
#ifdef ApplicableRangeType
        //TODO: The m_specifiedApplicableRange field is never expected to change after creation. A correction will be needed here.
        m_specifiedApplicableRange = std::max(snapPointAsIrregular.ApplicableRange(), m_specifiedApplicableRange);
#else
        MUX_ASSERT(m_specifiedApplicableRange == INFINITY);
#endif
        combinationCount++;
    }
    else
    {
        // TODO: Provide custom error message
        throw winrt::hresult_error(E_INVALIDARG);
    }
}

winrt::ExpressionAnimation CreateConditionalExpression | ( | std::tuple< double, double > | actualApplicableZone,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 212 of file SnapPoint.cpp.

{
    const wstring_view scaledValue = L"(%1!s!*%2!s!)";
    winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(L"this.Target");
    winrt::hstring targetExpression = GetTargetExpression(target);
    winrt::hstring scaledMinApplicableRange = StringUtil::FormatString(
        scaledValue.data(),
        s_minApplicableValue.data(),
        scale.data());
    winrt::hstring scaledMaxApplicableRange = StringUtil::FormatString(
        scaledValue.data(),
        s_maxApplicableValue.data(),
        scale.data());
    winrt::hstring scaledMinImpulseApplicableRange = StringUtil::FormatString(
        scaledValue.data(),
        s_minImpulseApplicableValue.data(),
        scale.data());
    winrt::hstring scaledMaxImpulseApplicableRange = StringUtil::FormatString(
        scaledValue.data(),
        s_maxImpulseApplicableValue.data(),
        scale.data());
    winrt::hstring expression = StringUtil::FormatString(
        L"%1!s!?(%2!s!>=%5!s!&&%2!s!<=%6!s!):(%2!s!>=%3!s!&&%2!s!<= %4!s!)",
        isInertiaFromImpulseExpression.data(),
        targetExpression.data(),
        scaledMinApplicableRange.data(),
        scaledMaxApplicableRange.data(),
        scaledMinImpulseApplicableRange.data(),
        scaledMaxImpulseApplicableRange.data());

    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());

    auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);

    SetScalarParameter(conditionExpressionAnimation, s_minApplicableValue, static_cast<float>(std::get<0>(actualApplicableZone)));
    SetScalarParameter(conditionExpressionAnimation, s_maxApplicableValue, static_cast<float>(std::get<1>(actualApplicableZone)));

    UpdateConditionalExpressionAnimationForImpulse(
        conditionExpressionAnimation,
        actualImpulseApplicableZone);

    return conditionExpressionAnimation;
}

winrt::ExpressionAnimation CreateRestingPointExpression | ( | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 193 of file SnapPoint.cpp.

{
    winrt::hstring expression = StringUtil::FormatString(L"%1!s!*%2!s!", s_snapPointValue.data(), scale.data());

    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());

    auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);

    SetScalarParameter(restingPointExpressionAnimation, s_snapPointValue, static_cast<float>(ActualValue()));

    return restingPointExpressionAnimation;
}

std::tuple< double, double > DetermineActualApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint
 | ) |  |

Definition at line 288 of file SnapPoint.cpp.

{
    return std::make_tuple(
        DetermineMinActualApplicableZone(previousSnapPoint),
        DetermineMaxActualApplicableZone(nextSnapPoint));
}

std::tuple< double, double > DetermineActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue,
 |  | double | nextIgnoredValue
 | ) |  |

Definition at line 297 of file SnapPoint.cpp.

{
    return std::make_tuple(
        DetermineMinActualImpulseApplicableZone(
            previousSnapPoint,
            currentIgnoredValue,
            previousIgnoredValue),
        DetermineMaxActualImpulseApplicableZone(
            nextSnapPoint,
            currentIgnoredValue,
            nextIgnoredValue));
}

double DetermineMaxActualApplicableZone ( const SnapPointBase * nextSnapPoint ) const [private]

Definition at line 385 of file SnapPoint.cpp.

{
    // If we are not passed a nextSnapPoint it means we are the last in the list, see if we expand to Infinity or stay put.
    if (!nextSnapPoint)
    {
#ifdef ApplicableRangeType
        if (m_applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
        {
            return INFINITY;
        }
        else
        {
            return ActualValue() + m_specifiedApplicableRange;
        }
#else
        return INFINITY;
#endif
    }
    // If we are passed a nextSnapPoint then we need to account for its influence on us.
    else
    {
        const double nextMinInfluence = nextSnapPoint->Influence(ActualValue());

#ifdef ApplicableRangeType
        switch (m_applicableRangeType)
        {
        case winrt::SnapPointApplicableRangeType::Optional:
            return std::min(ActualValue() + m_specifiedApplicableRange, nextMinInfluence);
        case winrt::SnapPointApplicableRangeType::Mandatory:
            return nextMinInfluence;
        default:
            MUX_ASSERT(false);
            return 0.0;
        }
#else
        return nextMinInfluence;
#endif
    }
}

double DetermineMaxActualImpulseApplicableZone | ( | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | nextIgnoredValue |
 | ) |  |  | const [private]

Definition at line 426 of file SnapPoint.cpp.

{
    if (!nextSnapPoint)
    {
        return INFINITY;
    }
    else
    {
        const double nextMinInfluence = nextSnapPoint->ImpulseInfluence(ActualValue(), nextIgnoredValue);

        if (isnan(currentIgnoredValue))
        {
            return nextMinInfluence;
        }
        else
        {
            return std::min(ActualValue(), nextMinInfluence);
        }
    }
}

double DetermineMinActualApplicableZone ( const SnapPointBase * previousSnapPoint ) const [private]

Definition at line 320 of file SnapPoint.cpp.

{
    // If we are not passed a previousSnapPoint it means we are the first in the list, see if we expand to negative Infinity or stay put.
    if (!previousSnapPoint)
    {
#ifdef ApplicableRangeType
        if (applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
        {
            return -INFINITY;
        }
        else
        {
            return ActualValue() - m_specifiedApplicableRange;
        }
#else
        return -INFINITY;
#endif
    }
    // If we are passed a previousSnapPoint then we need to account for its influence on us.
    else
    {
        const double previousMaxInfluence = previousSnapPoint->Influence(ActualValue());

#ifdef ApplicableRangeType
        switch (m_applicableRangeType)
        {
        case winrt::SnapPointApplicableRangeType::Optional:
            return std::max(previousMaxInfluence, ActualValue() - m_specifiedApplicableRange);
        case winrt::SnapPointApplicableRangeType::Mandatory:
            return previousMaxInfluence;
        default:
            MUX_ASSERT(false);
            return 0.0;
        }
#else
        return previousMaxInfluence;
#endif
    }
}

double DetermineMinActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue |
 | ) |  |  | const [private]

Definition at line 361 of file SnapPoint.cpp.

{
    if (!previousSnapPoint)
    {
        return -INFINITY;
    }
    else
    {
        const double previousMaxInfluence = previousSnapPoint->ImpulseInfluence(ActualValue(), previousIgnoredValue);

        if (isnan(currentIgnoredValue))
        {
            return previousMaxInfluence;
        }
        else
        {
            return std::max(previousMaxInfluence, ActualValue());
        }
    }
}

double Evaluate | ( | std::tuple< double, double > | actualApplicableZone,
 |  | double | value |
 | ) |  |  | const

Definition at line 527 of file SnapPoint.cpp.

{
    if (value >= std::get<0>(actualApplicableZone) && value <= std::get<1>(actualApplicableZone))
    {
        return ActualValue();
    }
    return value;
}

double ImpulseInfluence | ( | double | edgeOfMidpoint,
 |  | double | ignoredValue |
 | ) |  |  | const

Definition at line 478 of file SnapPoint.cpp.

{
    const double actualValue = ActualValue();
    const double midPoint = (actualValue + edgeOfMidpoint) / 2.0;

    if (isnan(ignoredValue))
    {
        return midPoint;
    }
    else
    {
        if (actualValue <= edgeOfMidpoint)
        {
            return std::min(actualValue, midPoint);
        }
        else
        {
            return std::max(actualValue, midPoint);
        }
    }
}

double Influence ( double edgeOfMidpoint ) const

Definition at line 450 of file SnapPoint.cpp.

{
    const double actualValue = ActualValue();
    const double midPoint = (actualValue + edgeOfMidpoint) / 2;

#ifdef ApplicableRangeType
    switch (m_applicableRangeType)
    {
    case winrt::SnapPointApplicableRangeType::Optional:
        if (actualValue <= edgeOfMidpoint)
        {
            return std::min(actualValue + m_specifiedApplicableRange, midPoint);
        }
        else
        {
            return std::max(actualValue - m_specifiedApplicableRange, midPoint);
        }
    case winrt::SnapPointApplicableRangeType::Mandatory:
        return midPoint;
    default:
        MUX_ASSERT(false);
        return 0.0;
    }
#else
    return midPoint;
#endif
}

int SnapCount ( ) const

Definition at line 522 of file SnapPoint.cpp.

{
    return 1;
}

SnapPointSortPredicate SortPredicate ( ) const

Definition at line 280 of file SnapPoint.cpp.

{
    const double actualValue = ActualValue();

    // Irregular snap point should be sorted before repeated snap points so it gives a tertiary sort value of 0 (repeated snap points get 1)
    return SnapPointSortPredicate{ actualValue, actualValue, 0 };
}

void UpdateConditionalExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | conditionExpressionAnimation,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 262 of file SnapPoint.cpp.

{
    SetScalarParameter(conditionExpressionAnimation, s_minImpulseApplicableValue, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
    SetScalarParameter(conditionExpressionAnimation, s_maxImpulseApplicableValue, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
}

void UpdateRestingPointExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | restingValueExpressionAnimation,
 |  | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 270 of file SnapPoint.cpp.

{
    // An irregular snap point like ScrollSnapPoint is either completely ignored in impulse mode or not ignored at all, unlike repeated snap points
    // which can be partially ignored. Its conditional expression depends on the impulse mode, whereas its resting point expression does not,
    // thus this method has no job to do.
}

double Value ( )

Definition at line 188 of file SnapPoint.cpp.

{
    return m_value;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPoint.h
  • ScrollPresenter/SnapPoint.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollSnapPointBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

ScrollSnapPointBase Class Reference

#include "SnapPoint.h"

List of all members.

Public Member Functions

winrt::ScrollSnapPointsAlignment | Alignment ()
bool | OnUpdateViewport (double newViewport)

Protected Member Functions

ScrollSnapPointBase ()

Detailed Description

Definition at line 136 of file SnapPoint.h.

Constructor & Destructor Documentation

ScrollSnapPointBase ( ) [protected]

Definition at line 128 of file SnapPoint.cpp.

{
    // throw (ERROR_CALL_NOT_IMPLEMENTED);
}

Member Function Documentation

winrt::ScrollSnapPointsAlignment Alignment ( )

Definition at line 133 of file SnapPoint.cpp.

{
    return m_alignment;
}

bool OnUpdateViewport ( double newViewport )

Definition at line 139 of file SnapPoint.cpp.

{
    switch (m_alignment)
    {
    case winrt::ScrollSnapPointsAlignment::Near:
        MUX_ASSERT(m_alignmentAdjustment == 0.0);
        return false;
    case winrt::ScrollSnapPointsAlignment::Center:
        m_alignmentAdjustment = -newViewport / 2.0;
        break;
    case winrt::ScrollSnapPointsAlignment::Far:
        m_alignmentAdjustment = -newViewport;
        break;
    }
    return true;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPoint.h
  • ScrollPresenter/SnapPoint.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes

ScrollView Class Reference

#include "ScrollView.h"

Inherits ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT >, and ScrollViewProperties.

List of all members.

Classes

struct | AutoHideScrollBarsState

Public Member Functions

ScrollView ()
~ScrollView ()
int32_t | AddScrollVelocity (winrt::float2 offsetsVelocity, winrt::IReference< winrt::float2 > inertiaDecayRate)
int32_t | AddZoomVelocity (float zoomFactorVelocity, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate)
winrt::UIElement | CurrentAnchor ()
winrt::CompositionPropertySet | ExpressionAnimationSources ()
double | ExtentHeight ()
double | ExtentWidth ()
double | HorizontalOffset ()
winrt::ScrollingInputKinds | IgnoredInputKinds ()
void | IgnoredInputKinds (winrt::ScrollingInputKinds const &value)
void | OnApplyTemplate ()
void | OnGotFocus (winrt::RoutedEventArgs const &args)
void | OnKeyDown (winrt::KeyRoutedEventArgs const &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RegisterAnchorCandidate (winrt::UIElement const &element)
double | ScrollableHeight ()
double | ScrollableWidth ()
int32_t | ScrollBy (double horizontalOffsetDelta, double verticalOffsetDelta)
int32_t | ScrollBy (double horizontalOffsetDelta, double verticalOffsetDelta, winrt::ScrollingScrollOptions const &options)
void | ScrollControllersAutoHidingChangedDbg ()
winrt::ScrollPresenter | ScrollPresenter () const
int32_t | ScrollTo (double horizontalOffset, double verticalOffset)
int32_t | ScrollTo (double horizontalOffset, double verticalOffset, winrt::ScrollingScrollOptions const &options)
winrt::ScrollingInteractionState | State ()
void | UnregisterAnchorCandidate (winrt::UIElement const &element)
double | VerticalOffset ()
double | ViewportHeight ()
double | ViewportWidth ()
int32_t | ZoomBy (float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options)
int32_t | ZoomBy (float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint)
float | ZoomFactor ()
int32_t | ZoomTo (float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options)
int32_t | ZoomTo (float zoomFactor, winrt::IReference< winrt::float2 > centerPoint)

Static Public Member Functions

static void | ValidateAnchorRatio (double value)
static void | ValidateZoomFactoryBoundary (double value)

Static Public Attributes

static const int32_t | s_noOpCorrelationId

Private Member Functions

bool | AreAllScrollControllersCollapsed (bool useSafeGet=false) const
bool | AreBothScrollControllersVisible () const
bool | AreScrollControllersAutoHiding ()
bool | CanScrollDown ()
bool | CanScrollHorizontallyInDirection (bool inPositiveDirection)
bool | CanScrollInDirection (winrt::FocusNavigationDirection drection)
bool | CanScrollLeft ()
bool | CanScrollRight ()
bool | CanScrollUp ()
bool | CanScrollVerticallyInDirection (bool inPositiveDirection)
void | DoScroll (double offsetAmount, winrt::Orientation orientation)
bool | DoScrollForKey (winrt::VirtualKey key, double scrollProportion)
winrt::DependencyObject | GetNextFocusCandidate (winrt::FocusNavigationDirection direction, bool isPageNavigation)
void | GoToState (std::wstring_view const &stateName, bool useTransitions=true)
void | HandleKeyDownForStandardScroll (winrt::KeyRoutedEventArgs)
void | HandleKeyDownForXYNavigation (winrt::KeyRoutedEventArgs)
void | HandleScrollControllerPointerEntered (bool isForHorizontalScrollController)
void | HandleScrollControllerPointerExited (bool isForHorizontalScrollController)
void | HideIndicators (bool useTransitions=true, bool useSafeGet=false)
void | HideIndicatorsAfterDelay ()
void | HookCompositionTargetRendering ()
void | HookHorizontalScrollControllerEvents ()
void | HookScrollPresenterEvents ()
void | HookScrollViewEvents ()
void | HookUISettingsEvent ()
void | HookVerticalScrollControllerEvents ()
bool | IsInputKindIgnored (winrt::ScrollingInputKinds const &inputKind)
bool | IsScrollControllersSeparatorVisible () const
void | OnAutoHideScrollBarsChanged (winrt::UISettings const &uiSettings, winrt::UISettingsAutoHideScrollBarsChangedEventArgs const &args)
void | OnCompositionTargetRendering (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnHideIndicatorsTimerTick (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnHorizontalScrollControllerPointerEntered (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnHorizontalScrollControllerPointerExited (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnIndicatorStateStoryboardCompleted (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnNoIndicatorStateStoryboardCompleted (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollAnimationStarting (const winrt::IInspectable &sender, const winrt::ScrollingScrollAnimationStartingEventArgs &args)
void | OnScrollControllerCanScrollChanged (const winrt::IScrollController &sender, const winrt::IInspectable &args)
void | OnScrollControllerIsScrollingWithMouseChanged (const winrt::IScrollController &sender, const winrt::IInspectable &args)
void | OnScrollPresenterAnchorRequested (const winrt::IInspectable &sender, const winrt::ScrollingAnchorRequestedEventArgs &args)
void | OnScrollPresenterBringingIntoView (const winrt::IInspectable &sender, const winrt::ScrollingBringingIntoViewEventArgs &args)
void | OnScrollPresenterExtentChanged (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollPresenterPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnScrollPresenterScrollCompleted (const winrt::IInspectable &sender, const winrt::ScrollingScrollCompletedEventArgs &args)
void | OnScrollPresenterScrollStarting (const winrt::IInspectable &sender, const winrt::ScrollingScrollStartingEventArgs &args)
void | OnScrollPresenterStateChanged (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollPresenterViewChanged (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollPresenterZoomCompleted (const winrt::IInspectable &sender, const winrt::ScrollingZoomCompletedEventArgs &args)
void | OnScrollPresenterZoomStarting (const winrt::IInspectable &sender, const winrt::ScrollingZoomStartingEventArgs &args)
void | OnScrollViewGettingFocus (const winrt::IInspectable &sender, const winrt::GettingFocusEventArgs &args)
void | OnScrollViewIsEnabledChanged (const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args)
void | OnScrollViewPointerCanceled (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnScrollViewPointerEntered (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnScrollViewPointerExited (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnScrollViewPointerMoved (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnScrollViewPointerPressed (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnScrollViewPointerReleased (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnScrollViewUnloaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnVerticalScrollControllerPointerEntered (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnVerticalScrollControllerPointerExited (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnZoomAnimationStarting (const winrt::IInspectable &sender, const winrt::ScrollingZoomAnimationStartingEventArgs &args)
void | ResetHideIndicatorsTimer (bool restart=false)
void | UnhookCompositionTargetRendering ()
void | UnhookHorizontalScrollControllerEvents (bool isForDestructor)
void | UnhookScrollPresenterEvents (bool isForDestructor)
void | UnhookScrollViewEvents ()
void | UnhookVerticalScrollControllerEvents (bool isForDestructor)
void | UpdateHorizontalScrollController (const winrt::IScrollController &horizontalScrollController, const winrt::IUIElement &horizontalScrollControllerElement)
void | UpdateScrollControllersAutoHiding (bool forceUpdate=false)
void | UpdateScrollControllersSeparator (const winrt::IUIElement &scrollControllersSeparator)
void | UpdateScrollControllersSeparatorVisualState (bool useTransitions=true, bool scrollControllersAutoHidingChanged=false)
void | UpdateScrollControllersVisibility (bool horizontalChange, bool verticalChange)
void | UpdateScrollControllersVisualState (bool useTransitions=true, bool showIndicators=false, bool hideIndicators=false)
void | UpdateScrollPresenter (const winrt::ScrollPresenter &scrollPresenter)
void | UpdateScrollPresenterHorizontalScrollController (const winrt::IScrollController &horizontalScrollController)
void | UpdateScrollPresenterVerticalScrollController (const winrt::IScrollController &verticalScrollController)
void | UpdateVerticalScrollController (const winrt::IScrollController &verticalScrollController, const winrt::IUIElement &verticalScrollControllerElement)
void | UpdateVisualStates (bool useTransitions=true, bool showIndicators=false, bool hideIndicators=false, bool scrollControllersAutoHidingChanged=false, bool updateScrollControllersAutoHiding=false, bool onlyForAutoHidingScrollControllers=false)

Static Private Member Functions

static std::unique_ptr
< AutoHideScrollBarsState > 		MakeAutoHideScrollBarsState ()

Private Attributes

std::unique_ptr
< AutoHideScrollBarsState > 		m_autoHideScrollBarsState = MakeAutoHideScrollBarsState()

Detailed Description

Definition at line 17 of file ScrollView.h.

Constructor & Destructor Documentation

ScrollView ( )
~ScrollView ( )

Member Function Documentation

int32_t AddScrollVelocity | ( | winrt::float2 | offsetsVelocity,
 |  | winrt::IReference< winrt::float2 > | inertiaDecayRate
 | ) |  |
int32_t AddZoomVelocity | ( | float | zoomFactorVelocity,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::IReference< float > | inertiaDecayRate
 | ) |  |
bool AreAllScrollControllersCollapsed ( bool useSafeGet = false ) const [private]
bool AreBothScrollControllersVisible ( ) const [private]
bool AreScrollControllersAutoHiding ( ) [private]
bool CanScrollDown ( ) [private]
bool CanScrollHorizontallyInDirection ( bool inPositiveDirection ) [private]
bool CanScrollInDirection ( winrt::FocusNavigationDirection drection ) [private]
bool CanScrollLeft ( ) [private]
bool CanScrollRight ( ) [private]
bool CanScrollUp ( ) [private]
bool CanScrollVerticallyInDirection ( bool inPositiveDirection ) [private]
winrt::UIElement CurrentAnchor ( )
void DoScroll | ( | double | offsetAmount,
 |  | winrt::Orientation | orientation |
 | ) |  |  | [private]
bool DoScrollForKey | ( | winrt::VirtualKey | key,
 |  | double | scrollProportion |
 | ) |  |  | [private]
winrt::CompositionPropertySet ExpressionAnimationSources ( )
double ExtentHeight ( )
double ExtentWidth ( )
winrt::DependencyObject GetNextFocusCandidate | ( | winrt::FocusNavigationDirection | direction,
 |  | bool | isPageNavigation |
 | ) |  |  | [private]
void GoToState | ( | std::wstring_view const & | stateName,
 |  | bool | useTransitions = true |
 | ) |  |  | [private]
void HandleKeyDownForStandardScroll ( winrt::KeyRoutedEventArgs ) [private]
void HandleKeyDownForXYNavigation ( winrt::KeyRoutedEventArgs ) [private]
void HandleScrollControllerPointerEntered ( bool isForHorizontalScrollController ) [private]
void HandleScrollControllerPointerExited ( bool isForHorizontalScrollController ) [private]
void HideIndicators | ( | bool | useTransitions = true,
 |  | bool | useSafeGet = false |
 | ) |  |  | [private]
void HideIndicatorsAfterDelay ( ) [private]
void HookCompositionTargetRendering ( ) [private]
void HookHorizontalScrollControllerEvents ( ) [private]
void HookScrollPresenterEvents ( ) [private]
void HookScrollViewEvents ( ) [private]
void HookUISettingsEvent ( ) [private]
void HookVerticalScrollControllerEvents ( ) [private]
double HorizontalOffset ( )
winrt::ScrollingInputKinds IgnoredInputKinds ( )

Reimplemented from ScrollViewProperties.

void IgnoredInputKinds ( winrt::ScrollingInputKinds const & value )

Reimplemented from ScrollViewProperties.

bool IsInputKindIgnored ( winrt::ScrollingInputKinds const & inputKind ) [private]
bool IsScrollControllersSeparatorVisible ( ) const [private]
static std::unique_ptr<AutoHideScrollBarsState> MakeAutoHideScrollBarsState ( ) [static, private]
void OnApplyTemplate ( )
void OnAutoHideScrollBarsChanged | ( | winrt::UISettings const & | uiSettings,
 |  | winrt::UISettingsAutoHideScrollBarsChangedEventArgs const & | args |
 | ) |  |  | [private]
void OnCompositionTargetRendering | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnGotFocus ( winrt::RoutedEventArgs const & args )
void OnHideIndicatorsTimerTick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnHorizontalScrollControllerPointerEntered | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnHorizontalScrollControllerPointerExited | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnIndicatorStateStoryboardCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnKeyDown ( winrt::KeyRoutedEventArgs const & args )
void OnNoIndicatorStateStoryboardCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void OnScrollAnimationStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingScrollAnimationStartingEventArgs & | args |
 | ) |  |  | [private]
void OnScrollControllerCanScrollChanged | ( | const winrt::IScrollController & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnScrollControllerIsScrollingWithMouseChanged | ( | const winrt::IScrollController & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnScrollPresenterAnchorRequested | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingAnchorRequestedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollPresenterBringingIntoView | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingBringingIntoViewEventArgs & | args |
 | ) |  |  | [private]
void OnScrollPresenterExtentChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnScrollPresenterPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]
void OnScrollPresenterScrollCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingScrollCompletedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollPresenterScrollStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingScrollStartingEventArgs & | args |
 | ) |  |  | [private]
void OnScrollPresenterStateChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnScrollPresenterViewChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]
void OnScrollPresenterZoomCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingZoomCompletedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollPresenterZoomStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingZoomStartingEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewGettingFocus | ( | const winrt::IInspectable & | sender,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewIsEnabledChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewPointerCanceled | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewPointerEntered | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewPointerExited | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewPointerMoved | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewPointerPressed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewPointerReleased | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnScrollViewUnloaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]
void OnVerticalScrollControllerPointerEntered | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnVerticalScrollControllerPointerExited | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void OnZoomAnimationStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ScrollingZoomAnimationStartingEventArgs & | args |
 | ) |  |  | [private]
void RegisterAnchorCandidate ( winrt::UIElement const & element )
void ResetHideIndicatorsTimer ( bool restart = false ) [private]
double ScrollableHeight ( )
double ScrollableWidth ( )
int32_t ScrollBy | ( | double | horizontalOffsetDelta,
 |  | double | verticalOffsetDelta
 | ) |  |
int32_t ScrollBy | ( | double | horizontalOffsetDelta,
 |  | double | verticalOffsetDelta,
 |  | winrt::ScrollingScrollOptions const & | options
 | ) |  |
void ScrollControllersAutoHidingChangedDbg ( )
winrt::ScrollPresenter ScrollPresenter ( ) const
int32_t ScrollTo | ( | double | horizontalOffset,
 |  | double | verticalOffset
 | ) |  |
int32_t ScrollTo | ( | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | winrt::ScrollingScrollOptions const & | options
 | ) |  |
winrt::ScrollingInteractionState State ( )
void UnhookCompositionTargetRendering ( ) [private]
void UnhookHorizontalScrollControllerEvents ( bool isForDestructor ) [private]
void UnhookScrollPresenterEvents ( bool isForDestructor ) [private]
void UnhookScrollViewEvents ( ) [private]
void UnhookVerticalScrollControllerEvents ( bool isForDestructor ) [private]
void UnregisterAnchorCandidate ( winrt::UIElement const & element )
void UpdateHorizontalScrollController | ( | const winrt::IScrollController & | horizontalScrollController,
 |  | const winrt::IUIElement & | horizontalScrollControllerElement |
 | ) |  |  | [private]
void UpdateScrollControllersAutoHiding ( bool forceUpdate = false ) [private]
void UpdateScrollControllersSeparator ( const winrt::IUIElement & scrollControllersSeparator ) [private]
void UpdateScrollControllersSeparatorVisualState | ( | bool | useTransitions = true,
 |  | bool | scrollControllersAutoHidingChanged = false |
 | ) |  |  | [private]
void UpdateScrollControllersVisibility | ( | bool | horizontalChange,
 |  | bool | verticalChange |
 | ) |  |  | [private]
void UpdateScrollControllersVisualState | ( | bool | useTransitions = true,
 |  | bool | showIndicators = false,
 |  | bool | hideIndicators = false |
 | ) |  |  | [private]
void UpdateScrollPresenter ( const winrt::ScrollPresenter & scrollPresenter ) [private]
void UpdateScrollPresenterHorizontalScrollController ( const winrt::IScrollController & horizontalScrollController ) [private]
void UpdateScrollPresenterVerticalScrollController ( const winrt::IScrollController & verticalScrollController ) [private]
void UpdateVerticalScrollController | ( | const winrt::IScrollController & | verticalScrollController,
 |  | const winrt::IUIElement & | verticalScrollControllerElement |
 | ) |  |  | [private]
void UpdateVisualStates | ( | bool | useTransitions = true,
 |  | bool | showIndicators = false,
 |  | bool | hideIndicators = false,
 |  | bool | scrollControllersAutoHidingChanged = false,
 |  | bool | updateScrollControllersAutoHiding = false,
 |  | bool | onlyForAutoHidingScrollControllers = false |
 | ) |  |  | [private]
static void ValidateAnchorRatio ( double value ) [static]
static void ValidateZoomFactoryBoundary ( double value ) [static]
double VerticalOffset ( )
double ViewportHeight ( )
double ViewportWidth ( )
int32_t ZoomBy | ( | float | zoomFactorDelta,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::ScrollingZoomOptions const & | options
 | ) |  |
int32_t ZoomBy | ( | float | zoomFactorDelta,
 |  | winrt::IReference< winrt::float2 > | centerPoint
 | ) |  |
float ZoomFactor ( )
int32_t ZoomTo | ( | float | zoomFactor,
 |  | winrt::IReference< winrt::float2 > | centerPoint
 | ) |  |
int32_t ZoomTo | ( | float | zoomFactor,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::ScrollingZoomOptions const & | options
 | ) |  |

Member Data Documentation

std::unique_ptr<AutoHideScrollBarsState> m_autoHideScrollBarsState = MakeAutoHideScrollBarsState() [private]

Definition at line 338 of file ScrollView.h.

const int32_t s_noOpCorrelationId [static]

Definition at line 26 of file ScrollView.h.

The documentation for this class was generated from the following file:
  • ScrollView/ScrollView.h
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView::AutoHideScrollBarsState Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ScrollView
  • ScrollView::AutoHideScrollBarsState
Public Member Functions

ScrollView::AutoHideScrollBarsState Struct Reference

List of all members.

Public Member Functions

void HookUISettingsEvent (ScrollView *scrollView)

Detailed Description

Definition at line 20 of file ScrollViewLightup.cpp.

Member Function Documentation

void HookUISettingsEvent ( ScrollView * scrollView ) [inline]

Definition at line 25 of file ScrollViewLightup.cpp.

    {
        // Introduced in 19H1, IUISettings5 exposes the AutoHideScrollBars property and AutoHideScrollBarsChanged event.
        if (!m_uiSettings5)
        {
            winrt::UISettings uiSettings;

            m_uiSettings5 = uiSettings.try_as<winrt::IUISettings5>();
            if (m_uiSettings5)
            {
                m_autoHideScrollBarsChangedRevoker = m_uiSettings5.AutoHideScrollBarsChanged(
                    winrt::auto_revoke,
                    { scrollView, &ScrollView::OnAutoHideScrollBarsChanged });
            }
        }
    }

The documentation for this struct was generated from the following file:
  • ScrollView/ScrollViewLightup.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewBringIntoViewOperation Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

ScrollViewBringIntoViewOperation Class Reference

#include "ScrollViewBringIntoViewOperation.h"

List of all members.

Public Member Functions

ScrollViewBringIntoViewOperation (winrt::UIElement const &targetElement, bool cancelBringIntoView)
~ScrollViewBringIntoViewOperation ()
bool | HasMaxTicksCount () const
bool | ShouldCancelBringIntoView ()
winrt::UIElement | TargetElement () const
int8_t | TickOperation ()
int8_t | TicksCount () const

Private Attributes

bool | m_cancelBringIntoView
weak_ref< winrt::UIElement > | m_targetElement

Detailed Description

Definition at line 8 of file ScrollViewBringIntoViewOperation.h.

Constructor & Destructor Documentation

ScrollViewBringIntoViewOperation | ( | winrt::UIElement const & | targetElement,
 |  | bool | cancelBringIntoView
 | ) |  |

Definition at line 8 of file ScrollViewBringIntoViewOperation.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, targetElement);

    m_targetElement = winrt::make_weak(targetElement);
    m_cancelBringIntoView = cancelBringIntoView;
}

~ScrollViewBringIntoViewOperation ( )

Definition at line 16 of file ScrollViewBringIntoViewOperation.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, m_targetElement.get(), m_ticksCount);
}

Member Function Documentation

bool HasMaxTicksCount ( ) const

Definition at line 21 of file ScrollViewBringIntoViewOperation.cpp.

{
    MUX_ASSERT(m_ticksCount <= s_maxTicksCount);

    return m_ticksCount == s_maxTicksCount;
}

bool ShouldCancelBringIntoView ( ) [inline]

Definition at line 19 of file ScrollViewBringIntoViewOperation.h.

    {
        return m_cancelBringIntoView;
    }

winrt::UIElement TargetElement ( ) const

Definition at line 28 of file ScrollViewBringIntoViewOperation.cpp.

{
    return m_targetElement.get();
}

int8_t TickOperation ( )

Definition at line 38 of file ScrollViewBringIntoViewOperation.cpp.

{
    SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, m_targetElement.get(), m_ticksCount);

    MUX_ASSERT(m_ticksCount < s_maxTicksCount);

    return ++m_ticksCount;
}

int8_t TicksCount ( ) const

Definition at line 33 of file ScrollViewBringIntoViewOperation.cpp.

{
    return m_ticksCount;
}

Member Data Documentation

bool m_cancelBringIntoView [private]

Definition at line 31 of file ScrollViewBringIntoViewOperation.h.

weak_ref<winrt::UIElement> m_targetElement [private]

Definition at line 27 of file ScrollViewBringIntoViewOperation.h.

The documentation for this class was generated from the following files:
  • ScrollView/ScrollViewBringIntoViewOperation.h
  • ScrollView/ScrollViewBringIntoViewOperation.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewerIRefreshInfoProviderAdapter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ScrollViewerIRefreshInfoProviderAdapter Class Reference

#include "ScrollViewerIRefreshInfoProviderAdapter.h"

Inherits ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

ScrollViewerIRefreshInfoProviderAdapter (winrt::RefreshPullDirection const &refreshPullDirection, winrt::IAdapterAnimationHandler const &animationHandler)
~ScrollViewerIRefreshInfoProviderAdapter ()
winrt::IRefreshInfoProvider | Adapt (winrt::FxScrollViewer const &adaptee, winrt::Size const &size)
winrt::IRefreshInfoProvider | AdaptFromTree (winrt::UIElement const &root, winrt::Size const &size)
void | SetAnimations (winrt::UIElement const &refreshVisualizerContainer)

Private Member Functions

winrt::FxScrollViewer | AdaptFromTreeRecursiveHelper (const winrt::DependencyObject &, int depth)
void | CleanupIRefreshInfoProvider ()
void | CleanupScrollViewer ()
winrt::UIElement | GetScrollContent ()
bool | IsOrientationVertical ()
bool | IsWithinOffsetThreshold ()
void | MakeInteractionSource (const winrt::UIElement &contentParent)
void | OnRefreshCompleted (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnRefreshStarted (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollViewerDirectManipulationCompleted (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollViewerLoaded (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnScrollViewerViewChanging (const winrt::IInspectable &sender, const winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs &args)

Detailed Description

Definition at line 10 of file ScrollViewerIRefreshInfoProviderAdapter.h.

Constructor & Destructor Documentation

ScrollViewerIRefreshInfoProviderAdapter | ( | winrt::RefreshPullDirection const & | refreshPullDirection,
 |  | winrt::IAdapterAnimationHandler const & | animationHandler
 | ) |  |

Definition at line 39 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_refreshPullDirection = refreshPullDirection;
    if (animationHandler)
    {
        m_animationHandler.set(animationHandler);
    }
    else
    {
        m_animationHandler.set(winrt::make_self<ScrollViewerIRefreshInfoProviderDefaultAnimationHandler>(nullptr, m_refreshPullDirection).as<winrt::IAdapterAnimationHandler>());
    }
}

~ScrollViewerIRefreshInfoProviderAdapter ( )

Definition at line 25 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_scrollViewer.safe_get())
    {
        CleanupScrollViewer();
    }

    if (m_infoProvider.safe_get<winrt::IRefreshInfoProvider>())
    {
        CleanupIRefreshInfoProvider();
    }
}

Member Function Documentation

winrt::IRefreshInfoProvider Adapt | ( | winrt::FxScrollViewer const & | adaptee,
 |  | winrt::Size const & | size
 | ) |  |

Definition at line 83 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, adaptee);
    if (!adaptee)
    {
        throw winrt::hresult_invalid_argument(L"Adaptee cannot be null.");
    }

    if (m_scrollViewer)
    {
        CleanupScrollViewer();
    }

    if (m_infoProvider)
    {
        CleanupIRefreshInfoProvider();
    }

    m_infoProvider.set(nullptr);
    m_interactionTracker.set(nullptr);
    m_visualInteractionSource.set(nullptr);
    m_scrollViewer.set(adaptee);

    if (!m_scrollViewer.get().Content())
    {
        throw winrt::hresult_invalid_argument(L"Adaptee's content property cannot be null.");
    }

    winrt::UIElement content = GetScrollContent();
    if (!content)
    {
        throw winrt::hresult_invalid_argument(L"Adaptee's content property must be a UIElement.");
    }

    auto contentParent = winrt::VisualTreeHelper::GetParent(content);
    if (!contentParent)
    {
        //If the Content property does not have a parent this likely means the OnLoaded event of the SV has not fired yet.
        //Attach to this event to finish the adaption.
        m_scrollViewer_LoadedToken = m_scrollViewer.get().Loaded({ this, &ScrollViewerIRefreshInfoProviderAdapter::OnScrollViewerLoaded });
    }
    else
    {
        OnScrollViewerLoaded(nullptr, nullptr);
        winrt::UIElement contentParentAsUIElement = contentParent.try_as<winrt::UIElement>();
        if (!contentParentAsUIElement)
        {
            throw winrt::hresult_invalid_argument(L"Adaptee's content's parent must be a UIElement.");
        }
    }
    winrt::Visual contentVisual = winrt::ElementCompositionPreview::GetElementVisual(content);
    winrt::Compositor compositor = contentVisual.Compositor();

    m_infoProvider.set(winrt::make_self<RefreshInfoProviderImpl>(m_refreshPullDirection, refreshVisualizerSize, compositor));

    m_infoProvider_RefreshStartedToken = m_infoProvider.get()->RefreshStarted({ this, &ScrollViewerIRefreshInfoProviderAdapter::OnRefreshStarted });
    m_infoProvider_RefreshCompletedToken = m_infoProvider.get()->RefreshCompleted({ this, &ScrollViewerIRefreshInfoProviderAdapter::OnRefreshCompleted });

    m_interactionTracker.set(winrt::InteractionTracker::CreateWithOwner(compositor, m_infoProvider.as<winrt::IInteractionTrackerOwner>()));

    m_interactionTracker.get().MinPosition(winrt::float3(0.0f));
    m_interactionTracker.get().MaxPosition(winrt::float3(0.0f));
    m_interactionTracker.get().MinScale(1.0f);
    m_interactionTracker.get().MaxScale(1.0f);

    if (m_visualInteractionSource.get())
    {
        m_interactionTracker.get().InteractionSources().Add(m_visualInteractionSource.get());
        m_visualInteractionSourceIsAttached = true;
    }

    winrt::PointerEventHandler myEventHandler =
    [=](auto sender, auto args)
    {
        PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, L"ScrollViewer::PointerPressedHandler", this);
        if (args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch && m_visualInteractionSource.get())
        {
            if (m_visualInteractionSourceIsAttached)
            {
                winrt::PointerPoint pp = args.GetCurrentPoint(nullptr);

                if (pp)
                {
                    bool tryRedirectForManipulationSuccessful = true;

                    try
                    {
                        PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_METH, L"ScrollViewer::PointerPressedHandler", this, L"TryRedirectForManipulation");
                        m_visualInteractionSource.get().TryRedirectForManipulation(pp);
                    }
                    catch (const winrt::hresult_error& e)
                    {
                        // Swallowing Access Denied error because of InteractionTracker bug 17434718 which has been causing crashes at least in RS3, RS4 and RS5.
                        if (e.to_abi() != E_ACCESSDENIED)
                        {
                            throw;
                        }

                        tryRedirectForManipulationSuccessful = false;
                    }

                    if (tryRedirectForManipulationSuccessful)
                    {
                        m_infoProvider.get()->SetPeekingMode(!IsWithinOffsetThreshold());
                    }
                }
            }
            else
            {
                throw winrt::hresult_invalid_argument(L"Invalid IRefreshInfoProvider adaptation of scroll viewer, this can occur when calling TryRedirectForManipulation to an unattached visual interaction source.");
            }
        }
    };

    m_boxedPointerPressedEventHandler.set(winrt::box_value<winrt::PointerEventHandler>(myEventHandler));
    m_scrollViewer.get().AddHandler(winrt::UIElement::PointerPressedEvent(), m_boxedPointerPressedEventHandler.get(), true /* handledEventsToo */);
    m_scrollViewer_DirectManipulationCompletedToken = m_scrollViewer.get().DirectManipulationCompleted({ this, &ScrollViewerIRefreshInfoProviderAdapter::OnScrollViewerDirectManipulationCompleted });
    m_scrollViewer_ViewChangingToken = m_scrollViewer.get().ViewChanging({ this, &ScrollViewerIRefreshInfoProviderAdapter::OnScrollViewerViewChanging });

    return m_infoProvider.as<winrt::IRefreshInfoProvider>();
}

winrt::IRefreshInfoProvider AdaptFromTree | ( | winrt::UIElement const & | root,
 |  | winrt::Size const & | size
 | ) |  |

Definition at line 55 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    const winrt::UIElement& winrtRoot = root;
    winrt::FxScrollViewer rootAsSV = winrtRoot.try_as<winrt::FxScrollViewer>();
    int depth = 0;
    if (rootAsSV)
    {
        return Adapt(winrtRoot.as<winrt::FxScrollViewer>(), refreshVisualizerSize);
    }
    else
    {
        while (depth < MAX_BFS_DEPTH)
        {
            winrt::FxScrollViewer helperResult = AdaptFromTreeRecursiveHelper(winrtRoot, depth);
            if (helperResult)
            {
                return Adapt(helperResult, refreshVisualizerSize);
                break;
            }
            depth++;
        }
    }

    return nullptr;
}

winrt::FxScrollViewer AdaptFromTreeRecursiveHelper | ( | const winrt::DependencyObject & | root,
 |  | int | depth |
 | ) |  |  | [private]

Definition at line 325 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, depth);
    const int numChildren = winrt::VisualTreeHelper::GetChildrenCount(root);
    if (depth == 0)
    {
        for (int i = 0; i < numChildren; i++)
        {
            const winrt::DependencyObject childObject = winrt::VisualTreeHelper::GetChild(root, i);
            const winrt::FxScrollViewer childObjectAsSV = childObject.try_as<winrt::FxScrollViewer>();
            if (childObjectAsSV)
            {
                return childObjectAsSV;
            }
        }
        return nullptr;
    }
    else
    {
        for (int i = 0; i < numChildren; i++)
        {
            const winrt::DependencyObject childObject = winrt::VisualTreeHelper::GetChild(root, i);
            const winrt::FxScrollViewer recursiveResult = AdaptFromTreeRecursiveHelper(childObject, depth - 1);
            if (recursiveResult)
            {
                return recursiveResult;
            }
        }
        return nullptr;
    }
}

void CleanupIRefreshInfoProvider ( ) [private]

Definition at line 382 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    auto&& provider = m_infoProvider.get();
    if (m_infoProvider_RefreshStartedToken.value)
    {
        provider->RefreshStarted(m_infoProvider_RefreshStartedToken);
        m_infoProvider_RefreshStartedToken.value = 0;
    }
    if (m_infoProvider_RefreshCompletedToken.value)
    {
        provider->RefreshCompleted(m_infoProvider_RefreshCompletedToken);
        m_infoProvider_RefreshCompletedToken.value = 0;
    }
}

void CleanupScrollViewer ( ) [private]

Definition at line 357 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    auto&& sv = m_scrollViewer.get();
    if (m_boxedPointerPressedEventHandler)
    {
        sv.RemoveHandler(winrt::UIElement::PointerPressedEvent(), m_boxedPointerPressedEventHandler.get());
        m_boxedPointerPressedEventHandler.set(nullptr);
    }
    if (m_scrollViewer_DirectManipulationCompletedToken.value)
    {
        sv.DirectManipulationCompleted(m_scrollViewer_DirectManipulationCompletedToken);
        m_scrollViewer_DirectManipulationCompletedToken.value = 0;
    }
    if (m_scrollViewer_ViewChangingToken.value)
    {
        sv.ViewChanging(m_scrollViewer_ViewChangingToken);
        m_scrollViewer_ViewChangingToken.value = 0;
    }
    if (m_scrollViewer_LoadedToken.value)
    {
        sv.Loaded(m_scrollViewer_LoadedToken);
        m_scrollViewer_LoadedToken.value = 0;
    }
}

winrt::UIElement GetScrollContent ( ) [private]

Definition at line 294 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    if (m_scrollViewer)
    {
        auto content = m_scrollViewer.get().Content();
        return content.try_as<winrt::UIElement>();
    }
    return nullptr;
}

bool IsOrientationVertical ( ) [private]

Definition at line 289 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    return (m_refreshPullDirection == winrt::RefreshPullDirection::TopToBottom || m_refreshPullDirection == winrt::RefreshPullDirection::BottomToTop);
}

bool IsWithinOffsetThreshold ( ) [private]

Definition at line 397 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    switch (m_refreshPullDirection)
    {
    case winrt::RefreshPullDirection::TopToBottom:
        return m_scrollViewer.get().VerticalOffset() < INITIAL_OFFSET_THRESHOLD;
    case winrt::RefreshPullDirection::BottomToTop:
        return m_scrollViewer.get().VerticalOffset() > m_scrollViewer.get().ScrollableHeight() - INITIAL_OFFSET_THRESHOLD;
    case winrt::RefreshPullDirection::LeftToRight:
        return m_scrollViewer.get().HorizontalOffset() < INITIAL_OFFSET_THRESHOLD;
    case winrt::RefreshPullDirection::RightToLeft:
        return m_scrollViewer.get().HorizontalOffset() > m_scrollViewer.get().ScrollableWidth() - INITIAL_OFFSET_THRESHOLD;
    default:
        MUX_ASSERT(false);
        return false;
    }
}

void MakeInteractionSource ( const winrt::UIElement & contentParent ) [private]

Definition at line 304 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    winrt::Visual contentParentVisual = winrt::ElementCompositionPreview::GetElementVisual(contentParent);

    m_visualInteractionSourceIsAttached = false;
    m_visualInteractionSource.set(winrt::VisualInteractionSource::Create(contentParentVisual));
    m_visualInteractionSource.get().ManipulationRedirectionMode(winrt::VisualInteractionSourceRedirectionMode::CapableTouchpadOnly);
    m_visualInteractionSource.get().ScaleSourceMode(winrt::InteractionSourceMode::Disabled);
    m_visualInteractionSource.get().PositionXSourceMode(IsOrientationVertical() ? winrt::InteractionSourceMode::Disabled : winrt::InteractionSourceMode::EnabledWithInertia);
    m_visualInteractionSource.get().PositionXChainingMode(IsOrientationVertical() ? winrt::InteractionChainingMode::Auto : winrt::InteractionChainingMode::Never);
    m_visualInteractionSource.get().PositionYSourceMode(IsOrientationVertical() ? winrt::InteractionSourceMode::EnabledWithInertia : winrt::InteractionSourceMode::Disabled);
    m_visualInteractionSource.get().PositionYChainingMode(IsOrientationVertical() ? winrt::InteractionChainingMode::Never : winrt::InteractionChainingMode::Auto);

    if (m_interactionTracker)
    {
        m_interactionTracker.get().InteractionSources().Add(m_visualInteractionSource.get());
        m_visualInteractionSourceIsAttached = true;
    }
}

void OnRefreshCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 235 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_animationHandler.get().RefreshCompletedAnimation(nullptr, GetScrollContent());
}

void OnRefreshStarted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 217 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    auto content = GetScrollContent();
    if (content)
    {
        content.CancelDirectManipulations();
    }

    double executionRatio = FALLBACK_EXECUTION_RATIO;
    if (m_infoProvider.get())
    {
        executionRatio = m_infoProvider.get()->ExecutionRatio();
    }

    m_animationHandler.get().RefreshRequestedAnimation(nullptr, content, executionRatio);
}

void OnScrollViewerDirectManipulationCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 267 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_infoProvider.get())
    {
        m_infoProvider.get()->UpdateIsInteractingForRefresh(false);
    }
}

void OnScrollViewerLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 241 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    winrt::UIElement content = GetScrollContent();
    if (!content)
    {
        throw winrt::hresult_invalid_argument(L"Adaptee's content property must be a UIElement.");
    }

    auto contentParent = winrt::VisualTreeHelper::GetParent(content);
    if (!contentParent)
    {
        throw winrt::hresult_invalid_argument(L"Adaptee cannot be null.");
    }

    winrt::UIElement contentParentAsUIElement = contentParent.try_as<winrt::UIElement>();
    if (!contentParentAsUIElement)
    {
        throw winrt::hresult_invalid_argument(L"Adaptee's content's parent must be a UIElement.");
    }

    MakeInteractionSource(contentParentAsUIElement);

    m_scrollViewer.get().Loaded(m_scrollViewer_LoadedToken);
}

void OnScrollViewerViewChanging | ( | const winrt::IInspectable & | sender,
 |  | const winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs & | args |
 | ) |  |  | [private]

Definition at line 276 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    if (m_infoProvider.get() && m_infoProvider.get()->IsInteractingForRefresh())
    {
        PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, args.FinalView().HorizontalOffset(), args.FinalView().VerticalOffset());
        if (!IsWithinOffsetThreshold())
        {
            PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"No longer interacting for refresh due to ScrollViewer view change.");
            m_infoProvider.get()->UpdateIsInteractingForRefresh(false);
        }
    }
}

void SetAnimations ( winrt::UIElement const & refreshVisualizerContainer )

Definition at line 206 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (!refreshVisualizerContainer)
    {
        throw winrt::hresult_invalid_argument(L"The refreshVisualizerContainer cannot be null.");
    }

    m_animationHandler.get().InteractionTrackerAnimation(refreshVisualizerContainer, GetScrollContent(), m_interactionTracker.get());
}

The documentation for this class was generated from the following files:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.h
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewerIRefreshInfoProviderDefaultAnimationHandler Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler Class Reference

#include "ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h"

Inherits ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type >.

List of all members.

Public Member Functions

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler (const winrt::UIElement &container, const winrt::RefreshPullDirection &refreshPullDirection)
~ScrollViewerIRefreshInfoProviderDefaultAnimationHandler ()
void | InteractionTrackerAnimation (const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider, const winrt::InteractionTracker &interactionTracker)
void | RefreshCompletedAnimation (const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider)
void | RefreshRequestedAnimation (const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider, double executionRatio)

Private Member Functions

winrt::hstring | getAnimatedPropertyName ()
bool | IsOrientationVertical ()
void | RefreshCompletedBatchCompleted (const winrt::IInspectable &sender, const winrt::CompositionBatchCompletedEventArgs &args)
void | ValidateAndStoreParameters (const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider, const winrt::InteractionTracker &interactionTracker)

Private Attributes

winrt::RefreshPullDirection | m_refreshPullDirection

Detailed Description

Definition at line 9 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h.

Constructor & Destructor Documentation

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler | ( | const winrt::UIElement & | container,
 |  | const winrt::RefreshPullDirection & | refreshPullDirection
 | ) |  |

Definition at line 26 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (container)
    {
        auto containerVisual = winrt::ElementCompositionPreview::GetElementVisual(container);
        m_compositor = containerVisual.Compositor();
        containerVisual.Clip(m_compositor.CreateInsetClip(0.0f, 0.0f, 0.0f, 0.0f));
    }
    m_refreshPullDirection = refreshPullDirection;
}

~ScrollViewerIRefreshInfoProviderDefaultAnimationHandler ( )

Definition at line 38 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    if (m_refreshCompletedScopedBatch)
    {
        m_refreshCompletedScopedBatch.Completed(m_compositionScopedBatchCompletedEventToken);
    }
}

Member Function Documentation

winrt::hstring getAnimatedPropertyName ( ) [private]

Definition at line 278 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    winrt::hstring animatedProperty = L"";
    animatedProperty = static_cast<std::wstring>(animatedProperty) + L"Translation";

    if (IsOrientationVertical())
    {
        animatedProperty = static_cast<std::wstring>(animatedProperty) + L".Y";
    }
    else
    {
        animatedProperty = static_cast<std::wstring>(animatedProperty) + L".X";
    }

    return animatedProperty;
}

void InteractionTrackerAnimation | ( | const winrt::UIElement & | refreshVisualizer,
 |  | const winrt::UIElement & | infoProvider,
 |  | const winrt::InteractionTracker & | interactionTracker
 | ) |  |

Definition at line 47 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    ValidateAndStoreParameters(refreshVisualizer, infoProvider, interactionTracker);

    if (!interactionTracker)
    {
        m_interactionTracker = nullptr;
        return;
    }

    if ((!m_refreshVisualizerVisualOffsetAnimation || !m_infoProviderOffsetAnimation || m_interactionAnimationNeedsUpdating) && m_compositor)
    {
        switch (m_refreshPullDirection)
        {
        case winrt::RefreshPullDirection::TopToBottom:
            m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"-refreshVisualizerVisual.Size.Y + min(refreshVisualizerVisual.Size.Y, -interactionTracker.Position.Y)");

            m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"min(refreshVisualizerVisual.Size.Y, max(-interactionTracker.Position.Y, -refreshVisualizerVisual.Size.Y * 0.4))");

            break;
        case winrt::RefreshPullDirection::BottomToTop:
            m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"refreshVisualizerVisual.Size.Y - min(refreshVisualizerVisual.Size.Y, interactionTracker.Position.Y)");

            m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"max(-refreshVisualizerVisual.Size.Y, min(-interactionTracker.Position.Y, refreshVisualizerVisual.Size.Y * 0.4))");

            break;
        case winrt::RefreshPullDirection::LeftToRight:
            m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"-refreshVisualizerVisual.Size.X + min(refreshVisualizerVisual.Size.X, -interactionTracker.Position.X)");

            m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"min(refreshVisualizerVisual.Size.X, max(-interactionTracker.Position.X, -refreshVisualizerVisual.Size.X * 0.4))");

            break;
        case winrt::RefreshPullDirection::RightToLeft:
            m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"refreshVisualizerVisual.Size.X - min(refreshVisualizerVisual.Size.X, interactionTracker.Position.X)");

            m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
                L"max(-refreshVisualizerVisual.Size.X, min(-interactionTracker.Position.X, refreshVisualizerVisual.Size.X * 0.4))");

            break;
        default:
            MUX_ASSERT(false);
        }

        m_refreshVisualizerVisualOffsetAnimation.SetReferenceParameter(L"refreshVisualizerVisual", m_refreshVisualizerVisual);
        m_refreshVisualizerVisualOffsetAnimation.SetReferenceParameter(L"interactionTracker", m_interactionTracker);

        m_infoProviderOffsetAnimation.SetReferenceParameter(L"refreshVisualizerVisual", m_refreshVisualizerVisual);
        m_infoProviderOffsetAnimation.SetReferenceParameter(L"infoProviderVisual", m_infoProviderVisual);
        m_infoProviderOffsetAnimation.SetReferenceParameter(L"interactionTracker", m_interactionTracker);

        m_interactionAnimationNeedsUpdating = false;
    }

    if (m_refreshVisualizerVisualOffsetAnimation && m_infoProviderOffsetAnimation)
    {
        m_refreshVisualizerVisual.Offset(winrt::float3(0.0f));
        m_infoProviderVisual.Offset(winrt::float3(0.0f));
        m_refreshVisualizerVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });
        m_infoProviderVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });

        winrt::hstring animatedProperty = getAnimatedPropertyName();

        m_refreshVisualizerVisual.StartAnimation(animatedProperty, m_refreshVisualizerVisualOffsetAnimation);
        m_infoProviderVisual.StartAnimation(animatedProperty, m_infoProviderOffsetAnimation);
    }
}

bool IsOrientationVertical ( ) [private]

Definition at line 273 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    return (m_refreshPullDirection == winrt::RefreshPullDirection::TopToBottom || m_refreshPullDirection == winrt::RefreshPullDirection::BottomToTop);
}

void RefreshCompletedAnimation | ( | const winrt::UIElement & | refreshVisualizer,
 |  | const winrt::UIElement & | infoProvider
 | ) |  |

Definition at line 166 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    ValidateAndStoreParameters(refreshVisualizer, infoProvider, nullptr);

    if ((!m_refreshVisualizerRefreshCompletedAnimation || !m_infoProviderRefreshCompletedAnimation || m_refreshCompletedAnimationNeedsUpdating) && m_compositor)
    {
        m_refreshVisualizerRefreshCompletedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
        m_refreshVisualizerRefreshCompletedAnimation.Duration(REFRESH_ANIMATION_DURATION);
        m_infoProviderRefreshCompletedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
        m_infoProviderRefreshCompletedAnimation.Duration(REFRESH_ANIMATION_DURATION);
        m_infoProviderRefreshCompletedAnimation.InsertKeyFrame(1.0f, 0.0f);

        switch (m_refreshPullDirection)
        {
        case winrt::RefreshPullDirection::TopToBottom:
            m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().y));
            break;
        case winrt::RefreshPullDirection::BottomToTop:
            m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().y);
            break;
        case winrt::RefreshPullDirection::LeftToRight:
            m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().x));
            break;
        case winrt::RefreshPullDirection::RightToLeft:
            m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().x);
            break;
        default:
            MUX_ASSERT(false);
        }
        m_refreshCompletedAnimationNeedsUpdating = false;
    }

    if (m_compositor)
    {
        m_refreshCompletedScopedBatch = m_compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
        m_compositionScopedBatchCompletedEventToken = m_refreshCompletedScopedBatch.Completed({ this, &ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::RefreshCompletedBatchCompleted });
    }

    if (m_refreshVisualizerRefreshCompletedAnimation && m_infoProviderRefreshCompletedAnimation)
    {
        winrt::hstring animatedProperty = getAnimatedPropertyName();

        m_refreshVisualizerVisual.StartAnimation(animatedProperty, m_refreshVisualizerRefreshCompletedAnimation);
        m_infoProviderVisual.StartAnimation(animatedProperty, m_infoProviderRefreshCompletedAnimation);
    }

    if (m_refreshCompletedScopedBatch)
    {
        m_refreshCompletedScopedBatch.End();
    }
}

void RefreshCompletedBatchCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::CompositionBatchCompletedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 266 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    m_refreshCompletedScopedBatch.Completed(m_compositionScopedBatchCompletedEventToken);
    InteractionTrackerAnimation(m_refreshVisualizer.get(), m_infoProvider.get(), m_interactionTracker);
}

void RefreshRequestedAnimation | ( | const winrt::UIElement & | refreshVisualizer,
 |  | const winrt::UIElement & | infoProvider,
 |  | double | executionRatio
 | ) |  |

Definition at line 122 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
    ValidateAndStoreParameters(refreshVisualizer, infoProvider, nullptr);

    if ((!m_refreshVisualizerRefreshRequestedAnimation || !m_infoProviderRefreshRequestedAnimation || m_refreshRequestedAnimationNeedsUpdating) && m_compositor)
    {
        m_refreshVisualizerRefreshRequestedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
        m_refreshVisualizerRefreshRequestedAnimation.Duration(REFRESH_ANIMATION_DURATION);
        m_infoProviderRefreshRequestedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
        m_infoProviderRefreshRequestedAnimation.Duration(REFRESH_ANIMATION_DURATION);
        switch (m_refreshPullDirection)
        {
        case winrt::RefreshPullDirection::TopToBottom:
            m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().y * (1 - (float)executionRatio)));
            m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().y * (float)executionRatio);
            break;
        case winrt::RefreshPullDirection::BottomToTop:
            m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().y * (1 - (float)executionRatio));
            m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, -m_refreshVisualizerVisual.Size().y * (float)executionRatio);
            break;
        case winrt::RefreshPullDirection::LeftToRight:
            m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().x * (1 - (float)executionRatio)));
            m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().x * (float)executionRatio);
            break;
        case winrt::RefreshPullDirection::RightToLeft:
            m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().x * (1 - (float)executionRatio));
            m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, -m_refreshVisualizerVisual.Size().x * (float)executionRatio);
            break;
        default:
            MUX_ASSERT(false);
        }
        m_refreshRequestedAnimationNeedsUpdating = false;
    }

    if (m_refreshVisualizerRefreshRequestedAnimation && m_infoProviderRefreshRequestedAnimation)
    {
        winrt::hstring animatedProperty = getAnimatedPropertyName();

        m_refreshVisualizerVisual.StartAnimation(animatedProperty, m_refreshVisualizerRefreshRequestedAnimation);
        m_infoProviderVisual.StartAnimation(animatedProperty, m_infoProviderRefreshRequestedAnimation);
    }
}

void ValidateAndStoreParameters | ( | const winrt::UIElement & | refreshVisualizer,
 |  | const winrt::UIElement & | infoProvider,
 |  | const winrt::InteractionTracker & | interactionTracker |
 | ) |  |  | [private]

Definition at line 220 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

{
    if (refreshVisualizer && m_refreshVisualizer.get() != refreshVisualizer)
    {

        m_refreshVisualizerVisual = winrt::ElementCompositionPreview::GetElementVisual(refreshVisualizer);
        m_refreshVisualizer.set(refreshVisualizer);
        m_interactionAnimationNeedsUpdating = true;
        m_refreshRequestedAnimationNeedsUpdating = true;
        m_refreshCompletedAnimationNeedsUpdating = true;

        winrt::ElementCompositionPreview::SetIsTranslationEnabled(refreshVisualizer, true);
        m_refreshVisualizerVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });

        if (!m_compositor)
        {
            m_compositor = m_refreshVisualizerVisual.Compositor();
        }
    }

    if (infoProvider && m_infoProvider.get() != infoProvider)
    {
        m_infoProviderVisual = winrt::ElementCompositionPreview::GetElementVisual(infoProvider);
        m_infoProvider.set(infoProvider);
        m_interactionAnimationNeedsUpdating = true;
        m_refreshRequestedAnimationNeedsUpdating = true;
        m_refreshCompletedAnimationNeedsUpdating = true;

        winrt::ElementCompositionPreview::SetIsTranslationEnabled(infoProvider, true);
        m_infoProviderVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });

        if (!m_compositor)
        {
            m_compositor = m_infoProviderVisual.Compositor();
        }
    }

    if (interactionTracker && m_interactionTracker != interactionTracker)
    {
        m_interactionTracker = interactionTracker;
        m_interactionAnimationNeedsUpdating = true;
        m_refreshRequestedAnimationNeedsUpdating = true;
        m_refreshCompletedAnimationNeedsUpdating = true;
    }
}

Member Data Documentation

winrt::RefreshPullDirection m_refreshPullDirection [private]

Definition at line 30 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h.

The documentation for this class was generated from the following files:
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h
  • PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ScrollViewProperties Class Reference

#include "ScrollView.properties.h"

Inherited by ScrollView.

List of all members.

Public Member Functions

ScrollViewProperties ()
winrt::event_token | AnchorRequested (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs > const &value)
void | AnchorRequested (winrt::event_token const &token)
winrt::event_token | BringingIntoView (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs > const &value)
void | BringingIntoView (winrt::event_token const &token)
void | ComputedHorizontalScrollBarVisibility (winrt::Visibility const &value)
winrt::Visibility | ComputedHorizontalScrollBarVisibility ()
void | ComputedHorizontalScrollMode (winrt::ScrollingScrollMode const &value)
winrt::ScrollingScrollMode | ComputedHorizontalScrollMode ()
void | ComputedVerticalScrollBarVisibility (winrt::Visibility const &value)
winrt::Visibility | ComputedVerticalScrollBarVisibility ()
void | ComputedVerticalScrollMode (winrt::ScrollingScrollMode const &value)
winrt::ScrollingScrollMode | ComputedVerticalScrollMode ()
void | Content (winrt::UIElement const &value)
winrt::UIElement | Content ()
void | ContentOrientation (winrt::ScrollingContentOrientation const &value)
winrt::ScrollingContentOrientation | ContentOrientation ()
winrt::event_token | ExtentChanged (winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value)
void | ExtentChanged (winrt::event_token const &token)
void | HorizontalAnchorRatio (double value)
double | HorizontalAnchorRatio ()
void | HorizontalScrollBarVisibility (winrt::ScrollingScrollBarVisibility const &value)
winrt::ScrollingScrollBarVisibility | HorizontalScrollBarVisibility ()
void | HorizontalScrollChainMode (winrt::ScrollingChainMode const &value)
winrt::ScrollingChainMode | HorizontalScrollChainMode ()
void | HorizontalScrollMode (winrt::ScrollingScrollMode const &value)
winrt::ScrollingScrollMode | HorizontalScrollMode ()
void | HorizontalScrollRailMode (winrt::ScrollingRailMode const &value)
winrt::ScrollingRailMode | HorizontalScrollRailMode ()
void | IgnoredInputKinds (winrt::ScrollingInputKinds const &value)
winrt::ScrollingInputKinds | IgnoredInputKinds ()
void | MaxZoomFactor (double value)
double | MaxZoomFactor ()
void | MinZoomFactor (double value)
double | MinZoomFactor ()
void | ScrollAnimationStarting (winrt::event_token const &token)
winrt::event_token | ScrollAnimationStarting (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs > const &value)
winrt::event_token | ScrollCompleted (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs > const &value)
void | ScrollCompleted (winrt::event_token const &token)
void | ScrollPresenter (winrt::ScrollPresenter const &value)
winrt::ScrollPresenter | ScrollPresenter ()
void | ScrollStarting (winrt::event_token const &token)
winrt::event_token | ScrollStarting (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs > const &value)
void | StateChanged (winrt::event_token const &token)
winrt::event_token | StateChanged (winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value)
void | VerticalAnchorRatio (double value)
double | VerticalAnchorRatio ()
void | VerticalScrollBarVisibility (winrt::ScrollingScrollBarVisibility const &value)
winrt::ScrollingScrollBarVisibility | VerticalScrollBarVisibility ()
void | VerticalScrollChainMode (winrt::ScrollingChainMode const &value)
winrt::ScrollingChainMode | VerticalScrollChainMode ()
void | VerticalScrollMode (winrt::ScrollingScrollMode const &value)
winrt::ScrollingScrollMode | VerticalScrollMode ()
winrt::ScrollingRailMode | VerticalScrollRailMode ()
void | VerticalScrollRailMode (winrt::ScrollingRailMode const &value)
void | ViewChanged (winrt::event_token const &token)
winrt::event_token | ViewChanged (winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value)
winrt::event_token | ZoomAnimationStarting (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs > const &value)
void | ZoomAnimationStarting (winrt::event_token const &token)
winrt::ScrollingChainMode | ZoomChainMode ()
void | ZoomChainMode (winrt::ScrollingChainMode const &value)
winrt::event_token | ZoomCompleted (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs > const &value)
void | ZoomCompleted (winrt::event_token const &token)
void | ZoomMode (winrt::ScrollingZoomMode const &value)
winrt::ScrollingZoomMode | ZoomMode ()
winrt::event_token | ZoomStarting (winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs > const &value)
void | ZoomStarting (winrt::event_token const &token)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ComputedHorizontalScrollBarVisibilityProperty ()
static winrt::DependencyProperty | ComputedHorizontalScrollModeProperty ()
static winrt::DependencyProperty | ComputedVerticalScrollBarVisibilityProperty ()
static winrt::DependencyProperty | ComputedVerticalScrollModeProperty ()
static winrt::DependencyProperty | ContentOrientationProperty ()
static winrt::DependencyProperty | ContentProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HorizontalAnchorRatioProperty ()
static winrt::DependencyProperty | HorizontalScrollBarVisibilityProperty ()
static winrt::DependencyProperty | HorizontalScrollChainModeProperty ()
static winrt::DependencyProperty | HorizontalScrollModeProperty ()
static winrt::DependencyProperty | HorizontalScrollRailModeProperty ()
static winrt::DependencyProperty | IgnoredInputKindsProperty ()
static winrt::DependencyProperty | MaxZoomFactorProperty ()
static winrt::DependencyProperty | MinZoomFactorProperty ()
static void | OnComputedHorizontalScrollBarVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnComputedHorizontalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnComputedVerticalScrollBarVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnComputedVerticalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnContentOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalAnchorRatioPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalScrollBarVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalScrollChainModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHorizontalScrollRailModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIgnoredInputKindsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxZoomFactorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinZoomFactorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnScrollPresenterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalAnchorRatioPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollBarVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollChainModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnVerticalScrollRailModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnZoomChainModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnZoomModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | ScrollPresenterProperty ()
static winrt::DependencyProperty | VerticalAnchorRatioProperty ()
static winrt::DependencyProperty | VerticalScrollBarVisibilityProperty ()
static winrt::DependencyProperty | VerticalScrollChainModeProperty ()
static winrt::DependencyProperty | VerticalScrollModeProperty ()
static winrt::DependencyProperty | VerticalScrollRailModeProperty ()
static winrt::DependencyProperty | ZoomChainModeProperty ()
static winrt::DependencyProperty | ZoomModeProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingAnchorRequestedEventArgs > > 		m_anchorRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingBringingIntoViewEventArgs > > 		m_bringingIntoViewEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::IInspectable > > 		m_extentChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingScrollAnimationStartingEventArgs > > 		m_scrollAnimationStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingScrollCompletedEventArgs > > 		m_scrollCompletedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingScrollStartingEventArgs > > 		m_scrollStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::IInspectable > > 		m_stateChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::IInspectable > > 		m_viewChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingZoomAnimationStartingEventArgs > > 		m_zoomAnimationStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingZoomCompletedEventArgs > > 		m_zoomCompletedEventSource
event_source
< winrt::TypedEventHandler
< winrt::ScrollView,
winrt::ScrollingZoomStartingEventArgs > > 		m_zoomStartingEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ComputedHorizontalScrollBarVisibilityProperty
static GlobalDependencyProperty | s_ComputedHorizontalScrollModeProperty
static GlobalDependencyProperty | s_ComputedVerticalScrollBarVisibilityProperty
static GlobalDependencyProperty | s_ComputedVerticalScrollModeProperty
static GlobalDependencyProperty | s_ContentOrientationProperty
static GlobalDependencyProperty | s_ContentProperty
static GlobalDependencyProperty | s_HorizontalAnchorRatioProperty
static GlobalDependencyProperty | s_HorizontalScrollBarVisibilityProperty
static GlobalDependencyProperty | s_HorizontalScrollChainModeProperty
static GlobalDependencyProperty | s_HorizontalScrollModeProperty
static GlobalDependencyProperty | s_HorizontalScrollRailModeProperty
static GlobalDependencyProperty | s_IgnoredInputKindsProperty
static GlobalDependencyProperty | s_MaxZoomFactorProperty
static GlobalDependencyProperty | s_MinZoomFactorProperty
static GlobalDependencyProperty | s_ScrollPresenterProperty
static GlobalDependencyProperty | s_VerticalAnchorRatioProperty
static GlobalDependencyProperty | s_VerticalScrollBarVisibilityProperty
static GlobalDependencyProperty | s_VerticalScrollChainModeProperty
static GlobalDependencyProperty | s_VerticalScrollModeProperty
static GlobalDependencyProperty | s_VerticalScrollRailModeProperty
static GlobalDependencyProperty | s_ZoomChainModeProperty
static GlobalDependencyProperty | s_ZoomModeProperty

Detailed Description

Definition at line 7 of file ScrollView.properties.h.

Constructor & Destructor Documentation

ScrollViewProperties ( )

Definition at line 39 of file ScrollView.properties.cpp.

    : m_anchorRequestedEventSource{static_cast<ScrollView*>(this)}

Member Function Documentation

winrt::event_token AnchorRequested ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs > const & value )
void AnchorRequested ( winrt::event_token const & token )
winrt::event_token BringingIntoView ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs > const & value )
void BringingIntoView ( winrt::event_token const & token )
static void ClearProperties ( ) [static]
void ComputedHorizontalScrollBarVisibility ( winrt::Visibility const & value )
winrt::Visibility ComputedHorizontalScrollBarVisibility ( )
static winrt::DependencyProperty ComputedHorizontalScrollBarVisibilityProperty ( ) [inline, static]

Definition at line 78 of file ScrollView.properties.h.

{ return s_ComputedHorizontalScrollBarVisibilityProperty; }

winrt::ScrollingScrollMode ComputedHorizontalScrollMode ( )
void ComputedHorizontalScrollMode ( winrt::ScrollingScrollMode const & value )
static winrt::DependencyProperty ComputedHorizontalScrollModeProperty ( ) [inline, static]

Definition at line 79 of file ScrollView.properties.h.

{ return s_ComputedHorizontalScrollModeProperty; }

void ComputedVerticalScrollBarVisibility ( winrt::Visibility const & value )
winrt::Visibility ComputedVerticalScrollBarVisibility ( )
static winrt::DependencyProperty ComputedVerticalScrollBarVisibilityProperty ( ) [inline, static]

Definition at line 80 of file ScrollView.properties.h.

{ return s_ComputedVerticalScrollBarVisibilityProperty; }

winrt::ScrollingScrollMode ComputedVerticalScrollMode ( )
void ComputedVerticalScrollMode ( winrt::ScrollingScrollMode const & value )
static winrt::DependencyProperty ComputedVerticalScrollModeProperty ( ) [inline, static]

Definition at line 81 of file ScrollView.properties.h.

{ return s_ComputedVerticalScrollModeProperty; }

void Content ( winrt::UIElement const & value )
winrt::UIElement Content ( )
void ContentOrientation ( winrt::ScrollingContentOrientation const & value )
winrt::ScrollingContentOrientation ContentOrientation ( )
static winrt::DependencyProperty ContentOrientationProperty ( ) [inline, static]

Definition at line 83 of file ScrollView.properties.h.

{ return s_ContentOrientationProperty; }

static winrt::DependencyProperty ContentProperty ( ) [inline, static]

Definition at line 82 of file ScrollView.properties.h.

{ return s_ContentProperty; }

static void EnsureProperties ( ) [static]
winrt::event_token ExtentChanged ( winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const & value )
void ExtentChanged ( winrt::event_token const & token )
void HorizontalAnchorRatio ( double value )
double HorizontalAnchorRatio ( )
static winrt::DependencyProperty HorizontalAnchorRatioProperty ( ) [inline, static]

Definition at line 84 of file ScrollView.properties.h.

{ return s_HorizontalAnchorRatioProperty; }

winrt::ScrollingScrollBarVisibility HorizontalScrollBarVisibility ( )
void HorizontalScrollBarVisibility ( winrt::ScrollingScrollBarVisibility const & value )
static winrt::DependencyProperty HorizontalScrollBarVisibilityProperty ( ) [inline, static]

Definition at line 85 of file ScrollView.properties.h.

{ return s_HorizontalScrollBarVisibilityProperty; }

void HorizontalScrollChainMode ( winrt::ScrollingChainMode const & value )
winrt::ScrollingChainMode HorizontalScrollChainMode ( )
static winrt::DependencyProperty HorizontalScrollChainModeProperty ( ) [inline, static]

Definition at line 86 of file ScrollView.properties.h.

{ return s_HorizontalScrollChainModeProperty; }

void HorizontalScrollMode ( winrt::ScrollingScrollMode const & value )
winrt::ScrollingScrollMode HorizontalScrollMode ( )
static winrt::DependencyProperty HorizontalScrollModeProperty ( ) [inline, static]

Definition at line 87 of file ScrollView.properties.h.

{ return s_HorizontalScrollModeProperty; }

void HorizontalScrollRailMode ( winrt::ScrollingRailMode const & value )
winrt::ScrollingRailMode HorizontalScrollRailMode ( )
static winrt::DependencyProperty HorizontalScrollRailModeProperty ( ) [inline, static]

Definition at line 88 of file ScrollView.properties.h.

{ return s_HorizontalScrollRailModeProperty; }

void IgnoredInputKinds ( winrt::ScrollingInputKinds const & value )

Reimplemented in ScrollView.

winrt::ScrollingInputKinds IgnoredInputKinds ( )

Reimplemented in ScrollView.

static winrt::DependencyProperty IgnoredInputKindsProperty ( ) [inline, static]

Definition at line 89 of file ScrollView.properties.h.

{ return s_IgnoredInputKindsProperty; }

void MaxZoomFactor ( double value )
double MaxZoomFactor ( )
static winrt::DependencyProperty MaxZoomFactorProperty ( ) [inline, static]

Definition at line 90 of file ScrollView.properties.h.

{ return s_MaxZoomFactorProperty; }

void MinZoomFactor ( double value )
double MinZoomFactor ( )
static winrt::DependencyProperty MinZoomFactorProperty ( ) [inline, static]

Definition at line 91 of file ScrollView.properties.h.

{ return s_MinZoomFactorProperty; }

static void OnComputedHorizontalScrollBarVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnComputedHorizontalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnComputedVerticalScrollBarVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnComputedVerticalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnContentOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalAnchorRatioPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalScrollBarVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalScrollChainModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHorizontalScrollRailModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIgnoredInputKindsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMaxZoomFactorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinZoomFactorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnScrollPresenterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalAnchorRatioPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollBarVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollChainModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnVerticalScrollRailModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnZoomChainModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnZoomModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::event_token ScrollAnimationStarting ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs > const & value )
void ScrollAnimationStarting ( winrt::event_token const & token )
void ScrollCompleted ( winrt::event_token const & token )
winrt::event_token ScrollCompleted ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs > const & value )
void ScrollPresenter ( winrt::ScrollPresenter const & value )
winrt::ScrollPresenter ScrollPresenter ( )
static winrt::DependencyProperty ScrollPresenterProperty ( ) [inline, static]

Definition at line 92 of file ScrollView.properties.h.

{ return s_ScrollPresenterProperty; }

winrt::event_token ScrollStarting ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs > const & value )
void ScrollStarting ( winrt::event_token const & token )
void StateChanged ( winrt::event_token const & token )
winrt::event_token StateChanged ( winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const & value )
double VerticalAnchorRatio ( )
void VerticalAnchorRatio ( double value )
static winrt::DependencyProperty VerticalAnchorRatioProperty ( ) [inline, static]

Definition at line 93 of file ScrollView.properties.h.

{ return s_VerticalAnchorRatioProperty; }

void VerticalScrollBarVisibility ( winrt::ScrollingScrollBarVisibility const & value )
winrt::ScrollingScrollBarVisibility VerticalScrollBarVisibility ( )
static winrt::DependencyProperty VerticalScrollBarVisibilityProperty ( ) [inline, static]

Definition at line 94 of file ScrollView.properties.h.

{ return s_VerticalScrollBarVisibilityProperty; }

winrt::ScrollingChainMode VerticalScrollChainMode ( )
void VerticalScrollChainMode ( winrt::ScrollingChainMode const & value )
static winrt::DependencyProperty VerticalScrollChainModeProperty ( ) [inline, static]

Definition at line 95 of file ScrollView.properties.h.

{ return s_VerticalScrollChainModeProperty; }

void VerticalScrollMode ( winrt::ScrollingScrollMode const & value )
winrt::ScrollingScrollMode VerticalScrollMode ( )
static winrt::DependencyProperty VerticalScrollModeProperty ( ) [inline, static]

Definition at line 96 of file ScrollView.properties.h.

{ return s_VerticalScrollModeProperty; }

void VerticalScrollRailMode ( winrt::ScrollingRailMode const & value )
winrt::ScrollingRailMode VerticalScrollRailMode ( )
static winrt::DependencyProperty VerticalScrollRailModeProperty ( ) [inline, static]

Definition at line 97 of file ScrollView.properties.h.

{ return s_VerticalScrollRailModeProperty; }

winrt::event_token ViewChanged ( winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const & value )
void ViewChanged ( winrt::event_token const & token )
winrt::event_token ZoomAnimationStarting ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs > const & value )
void ZoomAnimationStarting ( winrt::event_token const & token )
winrt::ScrollingChainMode ZoomChainMode ( )
void ZoomChainMode ( winrt::ScrollingChainMode const & value )
static winrt::DependencyProperty ZoomChainModeProperty ( ) [inline, static]

Definition at line 98 of file ScrollView.properties.h.

{ return s_ZoomChainModeProperty; }

void ZoomCompleted ( winrt::event_token const & token )
winrt::event_token ZoomCompleted ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs > const & value )
void ZoomMode ( winrt::ScrollingZoomMode const & value )
winrt::ScrollingZoomMode ZoomMode ( )
static winrt::DependencyProperty ZoomModeProperty ( ) [inline, static]

Definition at line 99 of file ScrollView.properties.h.

{ return s_ZoomModeProperty; }

winrt::event_token ZoomStarting ( winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs > const & value )
void ZoomStarting ( winrt::event_token const & token )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs> > m_anchorRequestedEventSource

Definition at line 147 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs> > m_bringingIntoViewEventSource

Definition at line 148 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> > m_extentChangedEventSource

Definition at line 149 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs> > m_scrollAnimationStartingEventSource

Definition at line 150 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs> > m_scrollCompletedEventSource

Definition at line 151 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs> > m_scrollStartingEventSource

Definition at line 152 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> > m_stateChangedEventSource

Definition at line 153 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> > m_viewChangedEventSource

Definition at line 154 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs> > m_zoomAnimationStartingEventSource

Definition at line 155 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs> > m_zoomCompletedEventSource

Definition at line 156 of file ScrollView.properties.h.

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs> > m_zoomStartingEventSource

Definition at line 157 of file ScrollView.properties.h.

GlobalDependencyProperty s_ComputedHorizontalScrollBarVisibilityProperty [static]

Definition at line 101 of file ScrollView.properties.h.

GlobalDependencyProperty s_ComputedHorizontalScrollModeProperty [static]

Definition at line 102 of file ScrollView.properties.h.

GlobalDependencyProperty s_ComputedVerticalScrollBarVisibilityProperty [static]

Definition at line 103 of file ScrollView.properties.h.

GlobalDependencyProperty s_ComputedVerticalScrollModeProperty [static]

Definition at line 104 of file ScrollView.properties.h.

GlobalDependencyProperty s_ContentOrientationProperty [static]

Definition at line 106 of file ScrollView.properties.h.

GlobalDependencyProperty s_ContentProperty [static]

Definition at line 105 of file ScrollView.properties.h.

GlobalDependencyProperty s_HorizontalAnchorRatioProperty [static]

Definition at line 107 of file ScrollView.properties.h.

GlobalDependencyProperty s_HorizontalScrollBarVisibilityProperty [static]

Definition at line 108 of file ScrollView.properties.h.

GlobalDependencyProperty s_HorizontalScrollChainModeProperty [static]

Definition at line 109 of file ScrollView.properties.h.

GlobalDependencyProperty s_HorizontalScrollModeProperty [static]

Definition at line 110 of file ScrollView.properties.h.

GlobalDependencyProperty s_HorizontalScrollRailModeProperty [static]

Definition at line 111 of file ScrollView.properties.h.

GlobalDependencyProperty s_IgnoredInputKindsProperty [static]

Definition at line 112 of file ScrollView.properties.h.

GlobalDependencyProperty s_MaxZoomFactorProperty [static]

Definition at line 113 of file ScrollView.properties.h.

GlobalDependencyProperty s_MinZoomFactorProperty [static]

Definition at line 114 of file ScrollView.properties.h.

GlobalDependencyProperty s_ScrollPresenterProperty [static]

Definition at line 115 of file ScrollView.properties.h.

GlobalDependencyProperty s_VerticalAnchorRatioProperty [static]

Definition at line 116 of file ScrollView.properties.h.

GlobalDependencyProperty s_VerticalScrollBarVisibilityProperty [static]

Definition at line 117 of file ScrollView.properties.h.

GlobalDependencyProperty s_VerticalScrollChainModeProperty [static]

Definition at line 118 of file ScrollView.properties.h.

GlobalDependencyProperty s_VerticalScrollModeProperty [static]

Definition at line 119 of file ScrollView.properties.h.

GlobalDependencyProperty s_VerticalScrollRailModeProperty [static]

Definition at line 120 of file ScrollView.properties.h.

GlobalDependencyProperty s_ZoomChainModeProperty [static]

Definition at line 121 of file ScrollView.properties.h.

GlobalDependencyProperty s_ZoomModeProperty [static]

Definition at line 122 of file ScrollView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ScrollView.properties.h
  • Generated/ScrollView.properties.cpp
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Attributes | Static Private Attributes

ScrollViewTestHooks Class Reference

#include "ScrollViewTestHooks.h"

List of all members.

Static Public Member Functions

static com_ptr
< ScrollViewTestHooks > 		EnsureGlobalTestHooks ()
static winrt::IReference< bool > | GetAutoHideScrollControllers (const winrt::ScrollView &scrollView)
static com_ptr
< ScrollViewTestHooks > 		GetGlobalTestHooks ()
static void | SetAutoHideScrollControllers (const winrt::ScrollView &scrollView, winrt::IReference< bool > value)

Private Attributes

std::map< winrt::IScrollView,
winrt::IReference< bool > > 		m_autoHideScrollControllersMap

Static Private Attributes

static com_ptr
< ScrollViewTestHooks > 		s_testHooks

Detailed Description

Definition at line 9 of file ScrollViewTestHooks.h.

Member Function Documentation

static com_ptr<ScrollViewTestHooks> EnsureGlobalTestHooks ( ) [static]
static winrt::IReference<bool> GetAutoHideScrollControllers ( const winrt::ScrollView & scrollView ) [static]
static com_ptr<ScrollViewTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 13 of file ScrollViewTestHooks.h.

    {
        return s_testHooks;
    }

static void SetAutoHideScrollControllers | ( | const winrt::ScrollView & | scrollView,
 |  | winrt::IReference< bool > | value |
 | ) |  |  | [static]

Member Data Documentation

std::map<winrt::IScrollView, winrt::IReference<bool> > m_autoHideScrollControllersMap [private]

Definition at line 26 of file ScrollViewTestHooks.h.

com_ptr<ScrollViewTestHooks> s_testHooks [static, private]

Definition at line 24 of file ScrollViewTestHooks.h.

The documentation for this class was generated from the following file:
  • ScrollView/ScrollViewTestHooks.h
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

ScrollViewTrace Class Reference

#include "ScrollViewTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file ScrollViewTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file ScrollViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ScrollViewInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_SCROLLVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ScrollView") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 152 of file ScrollViewTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "ScrollViewPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_SCROLLVIEW),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file ScrollViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "ScrollViewVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_SCROLLVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"ScrollView") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file ScrollViewTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file ScrollViewTrace.h.

The documentation for this class was generated from the following file:
  • ScrollView/ScrollViewTrace.h
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: sealed< T, fallback, RawStorageT > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes

sealed< T, fallback, RawStorageT > Class Template Reference

Resource Accessor. More...

#include "tracker_ref.h"

List of all members.

Public Member Functions

~tracker_ref ()
template<typename U >
U | as () const
const T & | get () const
operator bool () const
bool | operator!= (const T &rhs) const
bool | operator!= (const tracker_ref &rhs) const
tracker_ref & | operator= (const tracker_ref &other)
tracker_ref & | operator= (tracker_ref &&other) noexcept
bool | operator== (const T &rhs) const
bool | operator== (const tracker_ref &rhs) const
template<typename V = T>
V | safe_get (bool useSafeGet=true) const
void | set (const T &value)
void | Swap (tracker_ref &other)
tracker_ref (const tracker_ref &other)
tracker_ref (const ITrackerHandleManager *owner, const T &value)
tracker_ref (nullptr_t)
tracker_ref (const ITrackerHandleManager *owner)
tracker_ref (tracker_ref &&other) noexcept
template<typename U >
U | try_as () const

Static Public Member Functions

static
winrt::Windows::Foundation::IAsyncOperation
< winrt::hstring > 		GetFileContents (const wstring_view &assetFileName)
static winrt::LoadedImageSurface | GetImageSurface (const wstring_view &assetName, winrt::Size imageSize)
static winrt::hstring | GetLocalizedStringResource (const wstring_view &resourceName)
static bool | IsResourceIdNull (ResourceIdType resourceId)
static winrt::IInspectable | ResourceLookup (const winrt::Control &control, const winrt::IInspectable &key)

Private Member Functions

ResourceAccessor ()
void | SetOwner (const ITrackerHandleManager *owner)
bool | ShouldFallbackToComPointers () const

Static Private Member Functions

static
winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap 		GetAssetMap ()
static
winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceContext 		GetResourceContext ()
static
winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager 		GetResourceManager ()
static
winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager 		GetResourceManagerImpl ()
static
winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap 		GetResourceMap ()

Static Private Attributes

static PCWSTR | c_assetLoc
static PCWSTR | c_resourceLoc
static PCWSTR | c_resourceLocWinUI
static
winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager 		m_resourceManagerWinRT

Detailed Description

template<typename T, TrackerRefFallback fallback = TrackerRefFallback::None, typename RawStorageT = ::IUnknown*>
class sealed< T, fallback, RawStorageT >

Definition at line 127 of file tracker_ref.h.

Constructor & Destructor Documentation

~tracker_ref ( ) [inline]

Definition at line 147 of file tracker_ref.h.

    {
        if (m_owner)
        {
            if (!ShouldFallbackToComPointers())
            {
                if (m_handle)
                {
                    MUX_ASSERT(m_owner);
                    m_owner->DeleteTrackerHandle(m_handle);
                }
            }
            else
            {
                // In fallback mode, the field actually holds a COM reference so treat it as a T instead of RawStorageT
                // to go through the Release() of the COM reference.
                reinterpret_cast<T&>(m_valueNoRef) = nullptr;
            }

#ifdef DBG
            m_owner->DEBUG_NotifyTrackerInactive();
#endif
        }
        else
        {
            // Despite the guards in the constructor, owner may be null if we are destroying a moved-from tracker_ref.
            // Just make sure that m_valueNoRef is null in that case.
            MUX_ASSERT(!m_valueNoRef);
        }
    }

Member Function Documentation

U as ( ) const [inline]

Definition at line 336 of file tracker_ref.h.

    {
        return get().as<U>();
    }

const T& get ( ) const [inline]

Definition at line 254 of file tracker_ref.h.

    {
#if DBG
        // Do some debug validation to make sure that m_valueNoRef and the GetTrackerValue result don't
        // get out of sync. Also if GetTrackerValue returns false it means that the caller should have been
        // using safe_get instead because we're being called during finalization and the target already got
        // collected.
        auto succeeded = false;

        if (m_handle)
        {
            com_ptr<IUnknown> unknown;
            succeeded = m_owner->GetTrackerValue(m_handle, unknown.put());
            MUX_ASSERT_MSG(succeeded, "GetTrackerValue returned false, should have called safe_get instead?");

            // Check if the pointers are identical or, if not, that their IUnknowns QI to the same thing
            MUX_ASSERT(
                unknown.as<winrt::IUnknown>() == (reinterpret_cast<const T&>(m_valueNoRef)).as<winrt::IUnknown>());
        }
#endif
        return reinterpret_cast<const T &>(m_valueNoRef);
    }

static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap GetAssetMap ( ) [static, private]
static winrt::Windows::Foundation::IAsyncOperation<winrt::hstring> GetFileContents ( const wstring_view & assetFileName ) [static]
static winrt::LoadedImageSurface GetImageSurface | ( | const wstring_view & | assetName,
 |  | winrt::Size | imageSize |
 | ) |  |  | [static]
static winrt::hstring GetLocalizedStringResource ( const wstring_view & resourceName ) [static]
static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceContext GetResourceContext ( ) [static, private]
static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager GetResourceManager ( ) [static, private]
static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager GetResourceManagerImpl ( ) [static, private]
static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap GetResourceMap ( ) [static, private]
static bool IsResourceIdNull ( ResourceIdType resourceId ) [inline, static]

Definition at line 38 of file ResourceAccessor.h.

    {
        return resourceId.size() == 0;
    }

operator bool ( ) const [inline, explicit]

Definition at line 310 of file tracker_ref.h.

    {
        return (m_valueNoRef != nullptr);
    }

bool operator!= ( const T & rhs ) const [inline]

Definition at line 330 of file tracker_ref.h.

    {
        return !(*this == rhs);
    }

bool operator!= ( const tracker_ref & rhs ) const [inline]

Definition at line 320 of file tracker_ref.h.

    {
        return !(*this == rhs);
    }

tracker_ref& operator= ( tracker_ref && other ) [inline]

Definition at line 192 of file tracker_ref.h.

    {
        if (this != std::addressof(other))
        {
            tracker_ref(std::move(other)).Swap(*this);
        }
        return *this;
    }

tracker_ref& operator= ( const tracker_ref & other ) [inline]

Definition at line 206 of file tracker_ref.h.

    {
        if (!m_owner)
        {
            SetOwner(other.m_owner);
        }
        else
        {
            MUX_ASSERT_MSG(m_owner == other.m_owner, "When assigning, tracker_ref needs to either have its owner not set or same owner");
        }
        set(other.get());
        return *this;
    }

bool operator== ( const T & rhs ) const [inline]

Definition at line 325 of file tracker_ref.h.

    {
        return get() == rhs;
    }

bool operator== ( const tracker_ref & rhs ) const [inline]

Definition at line 315 of file tracker_ref.h.

    {
        return get() == rhs.get();
    }

ResourceAccessor ( ) [private]

Declare a private constructor to prevent instance creation.

static winrt::IInspectable ResourceLookup | ( | const winrt::Control & | control,
 |  | const winrt::IInspectable & | key |
 | ) |  |  | [static]
V safe_get ( bool useSafeGet = true ) const [inline]

Definition at line 278 of file tracker_ref.h.

    {
        if (m_valueNoRef == nullptr)
        {
            return nullptr;
        }
        else
        {
            if (useSafeGet && !ShouldFallbackToComPointers())
            {
                com_ptr<IUnknown> unknown;
                if (m_owner->GetTrackerValue(m_handle, unknown.put()))
                {
                    auto value = unknown.as<V>();
                    return value;
                }

                return nullptr;
            }
            else
            {
                // Always safe to use values in fallback mode or "!useSafeGet".
                // useSafeGet is an optimization for callers who mostly want to use the faster get() version but the
                // call site may be called during the destructor path.
                return get().as<V>();
            }
        }
    }

void set ( const T & value ) [inline]

Definition at line 227 of file tracker_ref.h.

    {
        MUX_ASSERT(m_owner);

        if (!ShouldFallbackToComPointers())
        {
            m_valueNoRef = reinterpret_cast<RawStorageT>(winrt::get_abi(value));

            // Optimization: only create the handle if value isn't null or,
            // if it is, we are already set to a non-null value.
            if (!m_handle && value)
            {
                m_owner->NewTrackerHandle(m_handle);
            }
            if (m_handle)
            {
                m_owner->SetTrackerValue(m_handle, IUnknownAccessorT::get(value).get());
            }
        }
        else
        {
            // In fallback mode, the field actually has a reference, treat it as T instead of RawStorageT
            // to go through the Release of the old value and AddRef of the new value.
            reinterpret_cast<T&>(m_valueNoRef) = value;
        }
    }

void SetOwner ( const ITrackerHandleManager * owner ) [inline, private]

Definition at line 348 of file tracker_ref.h.

    {
        m_owner = owner;
#ifdef DBG
        MUX_ASSERT(m_owner);
        m_owner->DEBUG_NotifyTrackerActive();
#endif
    }

bool ShouldFallbackToComPointers ( ) const [inline, private]

Definition at line 357 of file tracker_ref.h.

    {
        return m_owner->ShouldFallbackToComPointers();
    }

void Swap ( tracker_ref & other ) [inline]

Definition at line 220 of file tracker_ref.h.

    {
        std::swap(m_owner, other.m_owner);
        std::swap(m_handle, other.m_handle);
        std::swap(m_valueNoRef, other.m_valueNoRef);
    }

tracker_ref | ( | const ITrackerHandleManager * | owner,
 |  | const T & | value |
 | ) |  |  | [inline, explicit]

Definition at line 136 of file tracker_ref.h.

    {
        SetOwner(owner);
        set(value);
    }

tracker_ref ( nullptr_t ) [inline, explicit]

Definition at line 142 of file tracker_ref.h.

    {
        static_assert_false("tracker_ref should only be used in ReferenceRuntimeClass-derived field members and 'this' should be passed for the owner");
    }

tracker_ref ( const ITrackerHandleManager * owner ) [inline, explicit]

Definition at line 131 of file tracker_ref.h.

    {
        SetOwner(owner);
    }

tracker_ref ( tracker_ref && other ) [inline]

Definition at line 182 of file tracker_ref.h.

        : m_owner(std::move(other.m_owner))
        , m_handle(std::move(other.m_handle))
        , m_valueNoRef(std::move(other.m_valueNoRef))
    {
        other.m_owner = nullptr;
        other.m_handle = nullptr;
        other.m_valueNoRef = nullptr;
    }

tracker_ref ( const tracker_ref & other ) [inline]

Definition at line 201 of file tracker_ref.h.

    {
        SetOwner(other.m_owner);
        set(other.get());
    }

U try_as ( ) const [inline]

Definition at line 342 of file tracker_ref.h.

    {
        return get().try_as<U>();
    }

Member Data Documentation

PCWSTR c_assetLoc [static, private]

Definition at line 23 of file ResourceAccessor.h.

PCWSTR c_resourceLoc [static, private]

String containing the resource location.

Definition at line 22 of file ResourceAccessor.h.

PCWSTR c_resourceLocWinUI [static, private]

Definition at line 24 of file ResourceAccessor.h.

winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager m_resourceManagerWinRT [static, private]

Definition at line 31 of file ResourceAccessor.h.

The documentation for this class was generated from the following files:
  • inc/tracker_ref.h
  • ResourceHelper/ResourceAccessor.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectedItemInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

SelectedItemInfo Struct Reference

#include "SelectionModel.h"

List of all members.

Public Attributes

std::weak_ptr< SelectionNode > | Node
winrt::IndexPath | Path

Detailed Description

Definition at line 9 of file SelectionModel.h.

Member Data Documentation

std::weak_ptr<SelectionNode> Node

Definition at line 11 of file SelectionModel.h.

winrt::IndexPath Path

Definition at line 12 of file SelectionModel.h.

The documentation for this struct was generated from the following file:
  • Repeater/SelectionModel.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectedItems< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Attributes

SelectedItems< T > Class Template Reference

#include "SelectedItems.h"

Inherits ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >.

List of all members.

Classes

class | Iterator

Public Member Functions

SelectedItems (const std::vector< SelectedItemInfo > &infos, std::function< T(const std::vector< SelectedItemInfo > &infos, unsigned int index)> getAtImpl)
~SelectedItems ()
winrt::IIterator< T > | First ()
T | GetAt (uint32_t index)
uint32_t | GetMany (uint32_t startIndex, winrt::array_view< T > const &values) noexcept
bool | IndexOf (T const &value, uint32_t &index) noexcept
uint32_t | Size ()

Private Attributes

std::function< T(const
std::vector< SelectedItemInfo >
&infos, int)> 		m_getAtImpl
std::vector< SelectedItemInfo > | m_infos

Detailed Description

template<typename T>
class SelectedItems< T >

Definition at line 9 of file SelectedItems.h.

Constructor & Destructor Documentation

SelectedItems | ( | const std::vector< SelectedItemInfo > & | infos,
 |  | std::function< T(const std::vector< SelectedItemInfo > &infos, unsigned int index)> | getAtImpl |
 | ) |  |  | [inline]

Definition at line 15 of file SelectedItems.h.

    {
        m_infos = infos;
        m_getAtImpl = getAtImpl;
        for (auto& info: infos)
        {
            if (auto node = info.Node.lock())
            {
                m_totalCount += node->SelectedCount();
            }
            else
            {
                throw winrt::hresult_error(E_FAIL, L"Selection changed after the SelectedIndices/Items property was read.");
            }
        }
    }

~SelectedItems ( ) [inline]

Definition at line 33 of file SelectedItems.h.

    {
        m_infos.clear();
    }

Member Function Documentation

winrt::IIterator<T> First ( ) [inline]

Definition at line 62 of file SelectedItems.h.

    {
        return winrt::make<SelectedItems<T>::Iterator>(*this);
    }

T GetAt ( uint32_t index ) [inline]

Definition at line 44 of file SelectedItems.h.

    {
        return m_getAtImpl(m_infos, index);
    }

uint32_t GetMany | ( | uint32_t | startIndex,
 |  | winrt::array_view< T > const & | values |
 | ) |  |  | [inline]

Definition at line 54 of file SelectedItems.h.

    {
        winrt::throw_hresult(E_NOTIMPL);
    }

bool IndexOf | ( | T const & | value,
 |  | uint32_t & | index |
 | ) |  |  | [inline]

Definition at line 49 of file SelectedItems.h.

    {
        winrt::throw_hresult(E_NOTIMPL);
    }

uint32_t Size ( ) [inline]

Definition at line 39 of file SelectedItems.h.

    {
        return m_totalCount;
    }

Member Data Documentation

std::function<T(const std::vector<SelectedItemInfo>& infos, int )> m_getAtImpl [private]

Definition at line 137 of file SelectedItems.h.

std::vector<SelectedItemInfo> m_infos [private]

Definition at line 136 of file SelectedItems.h.

The documentation for this class was generated from the following file:
  • Repeater/SelectedItems.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectedItems< T >::Iterator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • SelectedItems< T >
  • SelectedItems< T >::Iterator
Public Member Functions | Private Attributes

SelectedItems< T >::Iterator Class Reference

Inherits ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type >.

List of all members.

Public Member Functions

Iterator (const winrt::IVectorView< T > &selectedItems)
~Iterator ()
T | Current ()
uint32_t | GetMany (winrt::array_view< T > values)
bool | HasCurrent ()
bool | MoveNext ()

Private Attributes

unsigned int | m_currentIndex = 0

Detailed Description

template<typename T>
class SelectedItems< T >::Iterator

Definition at line 69 of file SelectedItems.h.

Constructor & Destructor Documentation

Iterator ( const winrt::IVectorView< T > & selectedItems ) [inline]

Definition at line 73 of file SelectedItems.h.

        {
            m_selectedItems = selectedItems;
        }

~Iterator ( ) [inline]

Definition at line 78 of file SelectedItems.h.

        {

        }

Member Function Documentation

T Current ( ) [inline]

Definition at line 83 of file SelectedItems.h.

        {
            auto items = m_selectedItems;
            if(m_currentIndex < items.Size())
            {
                return items.GetAt(m_currentIndex);
            }
            else
            {
                throw winrt::hresult_out_of_bounds();
            }
        }

uint32_t GetMany ( winrt::array_view< T > values ) [inline]

Definition at line 114 of file SelectedItems.h.

        {
            uint32_t howMany = 0;
            if (HasCurrent())
            {
                do
                {
                    if (howMany >= values.size()) break;

                    values[howMany] = Current();
                    howMany++;
                } while (MoveNext());
            }

            return howMany;
        }

bool HasCurrent ( ) [inline]

Definition at line 96 of file SelectedItems.h.

        {
            return (m_currentIndex < m_selectedItems.Size());
        }

bool MoveNext ( ) [inline]

Definition at line 101 of file SelectedItems.h.

        {
            if (m_currentIndex < m_selectedItems.Size())
            {
                ++m_currentIndex;
                return (m_currentIndex < m_selectedItems.Size());
            }
            else
            {
                throw winrt::hresult_out_of_bounds();
            }
        }

Member Data Documentation

unsigned int m_currentIndex = 0 [private]

Definition at line 133 of file SelectedItems.h.

The documentation for this class was generated from the following file:
  • Repeater/SelectedItems.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectedItemsVector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Private Member Functions

SelectedItemsVector Class Reference

#include "ViewModel.h"

Inherits ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType >.

List of all members.

Public Member Functions

void | Append (winrt::IInspectable const &item)
void | Clear ()
bool | Contains (winrt::IInspectable const &item)
bool | IndexOf_OptimizedForRemove (winrt::IInspectable const &node, uint32_t &index)
void | InsertAt (unsigned int index, winrt::IInspectable const &item)
void | InsertAt_NoContainsCheck (unsigned int index, winrt::IInspectable const &item)
void | RemoveAt (unsigned int index)
void | RemoveAtEnd ()
void | ReplaceAll (winrt::array_view< winrt::IInspectable const > items)
void | SetAt (unsigned int index, winrt::IInspectable const &item)
void | SetViewModel (ViewModel &viewModel)

Public Attributes

std::function< bool(winrt::IInspectable
const &value, uint32_t &index)> 		GetCustomIndexOfFunction () override

Private Member Functions

Implement_Vector_Read (SelectedItemsVectorOptions) private

Detailed Description

Definition at line 168 of file ViewModel.h.

Member Function Documentation

void Append ( winrt::IInspectable const & item )

Definition at line 153 of file ViewModel.cpp.

{
    InsertAt(Size(), item);
}

void Clear ( )

Definition at line 224 of file ViewModel.cpp.

{
    while (Size() > 0)
    {
        RemoveAtEnd();
    }
}

bool Contains ( winrt::IInspectable const & item )

Definition at line 232 of file ViewModel.cpp.

{
    uint32_t index;
    return GetVectorInnerImpl()->IndexOf(item, index);
}

Implement_Vector_Read ( SelectedItemsVectorOptions ) [inline, private]

Definition at line 176 of file ViewModel.h.

       :
    winrt::weak_ref<ViewModel> m_viewModel{ nullptr };

bool IndexOf_OptimizedForRemove | ( | winrt::IInspectable const & | node,
 |  | uint32_t & | index
 | ) |  |

Definition at line 143 of file ViewModel.cpp.

{
    return GetVectorInnerImpl()->IndexOf_OptimizedForRemove(node, index);
}

void InsertAt | ( | unsigned int | index,
 |  | winrt::IInspectable const & | item
 | ) |  |

Definition at line 158 of file ViewModel.cpp.

{
    if (!Contains(item))
    {
        InsertAt_NoContainsCheck(index, item);
    }
}

void InsertAt_NoContainsCheck | ( | unsigned int | index,
 |  | winrt::IInspectable const & | item
 | ) |  |

Definition at line 166 of file ViewModel.cpp.

{
    MUX_ASSERT(!Contains(item));
    GetVectorInnerImpl()->InsertAt(index, item);

    // Keep SelectedNodes and SelectedItems in sync
    if (auto viewModel = m_viewModel.get())
    {
        auto selectedNodes = viewModel->GetSelectedNodes();
        if (selectedNodes.Size() != Size())
        {
            if (auto listControl = viewModel->ListControl())
            {
                if (auto node = winrt::get_self<TreeViewList>(listControl)->NodeFromItem(item))
                {
                    selectedNodes.InsertAt(index, node);
                }
            }
        }
    }
}

void RemoveAt ( unsigned int index )

Definition at line 194 of file ViewModel.cpp.

{
    GetVectorInnerImpl()->RemoveAt(index);

    // Keep SelectedNodes and SelectedItems in sync
    if (auto viewModel = m_viewModel.get())
    {
        auto selectedNodes = viewModel->GetSelectedNodes();
        if (Size() != selectedNodes.Size())
        {
            selectedNodes.RemoveAt(index);
        }
    }
}

void RemoveAtEnd ( )

Definition at line 209 of file ViewModel.cpp.

{
    RemoveAt(Size() - 1);
}

void ReplaceAll ( winrt::array_view< winrt::IInspectable const > items )

Definition at line 214 of file ViewModel.cpp.

{
    Clear();

    for (auto const& node : items)
    {
        Append(node);
    }
}

void SetAt | ( | unsigned int | index,
 |  | winrt::IInspectable const & | item
 | ) |  |

Definition at line 188 of file ViewModel.cpp.

{
    RemoveAt(index);
    InsertAt(index, item);
}

void SetViewModel ( ViewModel & viewModel )

Definition at line 148 of file ViewModel.cpp.

{
    m_viewModel = viewModel.get_weak();
}

Member Data Documentation

std::function<bool(winrt::IInspectable const& value, uint32_t& index)> GetCustomIndexOfFunction() override [inline, override]

Definition at line 193 of file ViewModel.h.

{ return [this](winrt::IInspectable const& value, uint32_t& index) { return IndexOf_OptimizedForRemove(value, index); }; }

The documentation for this class was generated from the following files:
  • TreeView/ViewModel.h
  • TreeView/ViewModel.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectedTreeNodeVector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Public Attributes | Private Member Functions

SelectedTreeNodeVector Class Reference

#include "ViewModel.h"

Inherits ReferenceTracker< SelectedTreeNodeVector, reference_tracker_implements_t< SelectedTreeNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >.

List of all members.

Public Member Functions

void | Append (winrt::TreeViewNode const &node)
void | Clear ()
bool | Contains (winrt::TreeViewNode const &node)
bool | IndexOf_OptimizedForRemove (winrt::TreeViewNode const &node, uint32_t &index)
void | InsertAt (unsigned int index, winrt::TreeViewNode const &node)
void | InsertAtCore_NoContainsCheck (unsigned int index, winrt::TreeViewNode const &node)
void | RemoveAt (unsigned int index)
void | RemoveAtCore (unsigned int index)
void | RemoveAtEnd ()
void | ReplaceAll (winrt::array_view< winrt::TreeViewNode const > nodes)
void | SetAt (unsigned int index, winrt::TreeViewNode const &node)
void | SetViewModel (ViewModel &viewModel)

Public Attributes

std::function< bool(winrt::TreeViewNode
const &value, uint32_t &index)> 		GetCustomIndexOfFunction () override

Private Member Functions

Implement_Vector_Read (SelectedTreeNodeVectorOptions) private
void | UpdateSelection (winrt::TreeViewNode const &node, TreeNodeSelectionState state)

Detailed Description

Definition at line 125 of file ViewModel.h.

Member Function Documentation

void Append ( winrt::TreeViewNode const & node )

Definition at line 40 of file ViewModel.cpp.

{
    InsertAt(Size(), node);
}

void Clear ( )

Definition at line 80 of file ViewModel.cpp.

{
    while (Size() > 0)
    {
        RemoveAtEnd();
    }
}

bool Contains ( winrt::TreeViewNode const & node )

Definition at line 88 of file ViewModel.cpp.

{
    uint32_t index;
    return GetVectorInnerImpl()->IndexOf(node, index);
}

Implement_Vector_Read ( SelectedTreeNodeVectorOptions ) [inline, private]

Definition at line 133 of file ViewModel.h.

       :
    winrt::weak_ref<ViewModel> m_viewModel{ nullptr };

bool IndexOf_OptimizedForRemove | ( | winrt::TreeViewNode const & | node,
 |  | uint32_t & | index
 | ) |  |

Definition at line 18 of file ViewModel.cpp.

{
    return GetVectorInnerImpl()->IndexOf_OptimizedForRemove(node, index);
}

void InsertAt | ( | unsigned int | index,
 |  | winrt::TreeViewNode const & | node
 | ) |  |

Definition at line 45 of file ViewModel.cpp.

{
    // UpdateSelection will call InsertAtCore_NoContainsCheck
    UpdateSelection(node, TreeNodeSelectionState::Selected);
}

void InsertAtCore_NoContainsCheck | ( | unsigned int | index,
 |  | winrt::TreeViewNode const & | node
 | ) |  |

Definition at line 96 of file ViewModel.cpp.

{
    MUX_ASSERT(!Contains(node));

    GetVectorInnerImpl()->InsertAt(index, node);

    // Keep SelectedItems and SelectedNodes in sync
    if (auto viewModel = m_viewModel.get())
    {
        auto selectedItems = viewModel->GetSelectedItems();
        if (selectedItems.Size() != Size())
        {
            if (auto listControl = viewModel->ListControl())
            {
                if (auto item = winrt::get_self<TreeViewList>(listControl)->ItemFromNode(node))
                {
                    winrt::get_self<SelectedItemsVector>(selectedItems)->InsertAt_NoContainsCheck(index, item);
                    viewModel->TrackItemSelected(item);
                }
            }
        }
    }
}

void RemoveAt ( unsigned int index )

Definition at line 57 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    auto oldNode = winrt::get_self<TreeViewNode>(inner->GetAt(index));
    // UpdateSelection will call RemoveAtCore
    UpdateSelection(*oldNode, TreeNodeSelectionState::UnSelected);
}

void RemoveAtCore ( unsigned int index )

Definition at line 120 of file ViewModel.cpp.

{
    GetVectorInnerImpl()->RemoveAt(index);

    // Keep SelectedItems and SelectedNodes in sync
    if (auto viewModel = m_viewModel.get())
    {
        auto selectedItems = viewModel->GetSelectedItems();
        if (selectedItems.Size() != Size())
        {
            const auto item = selectedItems.GetAt(index);
            selectedItems.RemoveAt(index);
            viewModel->TrackItemUnselected(item);
        }
    }
}

void RemoveAtEnd ( )

Definition at line 65 of file ViewModel.cpp.

{
    RemoveAt(Size() - 1);
}

void ReplaceAll ( winrt::array_view< winrt::TreeViewNode const > nodes )

Definition at line 70 of file ViewModel.cpp.

{
    Clear();

    for (auto const& node : nodes)
    {
        Append(node);
    }
}

void SetAt | ( | unsigned int | index,
 |  | winrt::TreeViewNode const & | node
 | ) |  |

Definition at line 51 of file ViewModel.cpp.

{
    RemoveAt(index);
    InsertAt(index, node);
}

void SetViewModel ( ViewModel & viewModel )

Definition at line 35 of file ViewModel.cpp.

{
    m_viewModel = viewModel.get_weak();
}

void UpdateSelection | ( | winrt::TreeViewNode const & | node,
 |  | TreeNodeSelectionState | state |
 | ) |  |  | [private]

Definition at line 23 of file ViewModel.cpp.

{
    if (winrt::get_self<TreeViewNode>(node)->SelectionState() != state)
    {
        if (auto viewModel = m_viewModel.get())
        {
            viewModel->UpdateSelection(node, state);
            viewModel->NotifyContainerOfSelectionChange(node, state);
        }
    }
}

Member Data Documentation

std::function<bool(winrt::TreeViewNode const& value, uint32_t& index)> GetCustomIndexOfFunction() override [inline, override]

Definition at line 151 of file ViewModel.h.

{ return [this](winrt::TreeViewNode const& value, uint32_t& index) { return IndexOf_OptimizedForRemove(value, index); }; }

The documentation for this class was generated from the following files:
  • TreeView/ViewModel.h
  • TreeView/ViewModel.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

SelectionModel Class Reference

#include "SelectionModel.h"

Inherits ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing >, and SelectionModelProperties.

Inherited by CustomSelectionModel.

List of all members.

Public Member Functions

SelectionModel ()
~SelectionModel ()
void | AnchorIndex (winrt::IndexPath const &value)
winrt::IndexPath | AnchorIndex ()
void | ClearSelection ()
void | Deselect (int index)
void | Deselect (int groupIndex, int itemIndex)
void | DeselectAt (winrt::IndexPath const &index)
void | DeselectRange (winrt::IndexPath const &start, winrt::IndexPath const &end)
void | DeselectRangeFromAnchor (int32_t index)
void | DeselectRangeFromAnchor (int groupIndex, int itemIndex)
void | DeselectRangeFromAnchorTo (winrt::IndexPath const &index)
winrt::ICustomProperty | GetCustomProperty (hstring const &name)
winrt::ICustomProperty | GetIndexedProperty (hstring const &name, winrt::TypeName const &type)
hstring | GetStringRepresentation ()
winrt::IReference< bool > | IsSelected (int index)
winrt::IReference< bool > | IsSelected (int groupIndex, int itemIndex)
winrt::IReference< bool > | IsSelectedAt (winrt::IndexPath const &index)
void | OnPropertyChanged (winrt::hstring const &propertyName)
void | OnSelectionInvalidatedDueToCollectionChange ()
winrt::event_token | PropertyChanged (winrt::PropertyChangedEventHandler const &value)
void | PropertyChanged (winrt::event_token const &token)
winrt::IInspectable | ResolvePath (const winrt::IInspectable &data, const winrt::IndexPath &dataIndexPath)
void | Select (int index)
void | Select (int groupIndex, int itemIndex)
void | SelectAll ()
void | SelectAllFlat ()
void | SelectAt (winrt::IndexPath const &index)
void | SelectedIndex (winrt::IndexPath const &value)
winrt::IndexPath | SelectedIndex ()
winrt::IVectorView
< winrt::IndexPath > 		SelectedIndices ()
winrt::IInspectable | SelectedItem ()
winrt::IVectorView
< winrt::IInspectable > 		SelectedItems ()
bool | SelectionInvalidatedDueToCollectionChange () const
void | SelectRange (winrt::IndexPath const &start, winrt::IndexPath const &end)
void | SelectRangeFromAnchor (int groupIndex, int itemIndex)
void | SelectRangeFromAnchor (int32_t index)
void | SelectRangeFromAnchorTo (winrt::IndexPath const &index)
void | SetAnchorIndex (int32_t index)
void | SetAnchorIndex (int groupIndex, int itemIndex)
std::shared_ptr< SelectionNode > | SharedLeafNode ()
bool | SingleSelect ()
void | SingleSelect (bool value)
winrt::IInspectable | Source ()
void | Source (winrt::IInspectable const &value)
winrt::TypeName | Type ()

Private Member Functions

void | ClearSelection (bool resetAnchor, bool raiseSelectionChanged)
void | OnSelectionChanged ()
void | RaisePropertyChanged (std::wstring_view const &name)
void | SelectImpl (int index, bool select)
void | SelectRangeFromAnchorImpl (int index, bool select)
void | SelectRangeFromAnchorWithGroupImpl (int groupIndex, int itemIndex, bool select)
void | SelectRangeImpl (const winrt::IndexPath &start, const winrt::IndexPath &end, bool select)
void | SelectWithGroupImpl (int groupIndex, int itemIndex, bool select)
void | SelectWithPathImpl (const winrt::IndexPath &index, bool select, bool raiseSelectionChanged)

Private Attributes

std::shared_ptr< SelectionNode > | m_leafNode

Detailed Description

Definition at line 15 of file SelectionModel.h.

Constructor & Destructor Documentation

SelectionModel ( )

Definition at line 19 of file SelectionModel.cpp.

{
    // Parent is null for root node.
    m_rootNode = std::make_shared<SelectionNode>(this, nullptr /* parent */);
    // Parent is null for leaf node since it is shared. This is ok since we just
    // use the leaf as a placeholder and never ask stuff of it.
    m_leafNode = std::make_shared<SelectionNode>(this, nullptr /* parent */);
}

~SelectionModel ( )

Definition at line 28 of file SelectionModel.cpp.

{
    ClearSelection(false /*resetAnchor*/, false /*raiseSelectionChanged*/);
    m_rootNode = nullptr;
    m_leafNode = nullptr;
    m_selectedIndicesCached = nullptr;
    m_selectedItemsCached = nullptr;
}

Member Function Documentation

winrt::IndexPath AnchorIndex ( )

Definition at line 80 of file SelectionModel.cpp.

{
    winrt::IndexPath anchor = nullptr;
    if (m_rootNode->AnchorIndex() >= 0)
    {
        std::vector<int> path;
        auto current = m_rootNode;
        while (current && current->AnchorIndex() >= 0)
        {
            path.emplace_back(current->AnchorIndex());
            current = current->GetAt(current->AnchorIndex(), false);
        }

        anchor = winrt::make<IndexPath>(path);
    }

    return anchor;
}

void AnchorIndex ( winrt::IndexPath const & value )

Definition at line 99 of file SelectionModel.cpp.

{
    if (value)
    {
        SelectionTreeHelper::TraverseIndexPath(
            m_rootNode,
            value,
            true, /* realizeChildren */
            [](std::shared_ptr<SelectionNode> currentNode, const winrt::IndexPath& path, int depth, int childIndex)
        {
            currentNode->AnchorIndex(path.GetAt(depth));
        }
        );
    }
    else
    {
        m_rootNode->AnchorIndex(-1);
    }

    RaisePropertyChanged(L"AnchorIndex");
}

void ClearSelection ( )

Definition at line 428 of file SelectionModel.cpp.

{
    ClearSelection(true /*resetAnchor*/, true /* raiseSelectionChanged */);
}

void ClearSelection | ( | bool | resetAnchor,
 |  | bool | raiseSelectionChanged |
 | ) |  |  | [private]

Definition at line 556 of file SelectionModel.cpp.

{
    SelectionTreeHelper::Traverse(
        m_rootNode,
        false, /* realizeChildren */
        [](const SelectionTreeHelper::TreeWalkNodeInfo& info)
    {
        info.Node->Clear();
    });

    if (resetAnchor)
    {
        AnchorIndex(nullptr);
    }

    if (raiseSelectionChanged)
    {
        OnSelectionChanged();
    }
}

void Deselect ( int index )
void Deselect | ( | int | groupIndex,
 |  | int | itemIndex
 | ) |  |

Definition at line 299 of file SelectionModel.cpp.

{
    SelectWithGroupImpl(groupIndex, itemIndex, false /* select */);
}

void DeselectAt ( winrt::IndexPath const & index )

Definition at line 304 of file SelectionModel.cpp.

{
    SelectWithPathImpl(index, false /* select */, true /* raiseSelectionChanged */);
}

void DeselectRange | ( | winrt::IndexPath const & | start,
 |  | winrt::IndexPath const & | end
 | ) |  |

Definition at line 399 of file SelectionModel.cpp.

{
    SelectRangeImpl(start, end, false /* select */);
}

void DeselectRangeFromAnchor ( int32_t index )

Definition at line 378 of file SelectionModel.cpp.

{
    SelectRangeFromAnchorImpl(index, false /* select */);
}

void DeselectRangeFromAnchor | ( | int | groupIndex,
 |  | int | itemIndex
 | ) |  |

Definition at line 383 of file SelectionModel.cpp.

{
    SelectRangeFromAnchorWithGroupImpl(endGroupIndex, endItemIndex, false /* select */);
}

void DeselectRangeFromAnchorTo ( winrt::IndexPath const & index )

Definition at line 388 of file SelectionModel.cpp.

{
    SelectRangeImpl(AnchorIndex(), index, false /* select */);
}

winrt::ICustomProperty GetCustomProperty ( hstring const & name )

Definition at line 446 of file SelectionModel.cpp.

{
    // Exposing SelectedItem through ICustomPropertyProvider so that Binding can work
    // for SelectedItem. This is requried since SelectedItem is not a dependency proeprty and
    // is evaluated when requested.
    if (name == L"SelectedItem")
    {
        auto selectedItemCustomProperty = winrt::make<CustomProperty>(
            L"SelectedItem" /* name */,
            winrt::xaml_typename<winrt::IInspectable>() /* typeName */,
            [](winrt::IInspectable const& target) { return target.as<winrt::SelectionModel>().SelectedItem(); } /* getter */,
            nullptr /* setter */);
        return selectedItemCustomProperty;
    }

    return nullptr;
}

winrt::ICustomProperty GetIndexedProperty | ( | hstring const & | name,
 |  | winrt::TypeName const & | type
 | ) |  |

Definition at line 464 of file SelectionModel.cpp.

{
    // No indexed properties exposed via ICustomPropertyProvider
    return nullptr;
}

hstring GetStringRepresentation ( )

Definition at line 470 of file SelectionModel.cpp.

{
    return L"SelectionModel";
}

winrt::IReference< bool > IsSelected | ( | int | groupIndex,
 |  | int | itemIndex
 | ) |  |

Definition at line 316 of file SelectionModel.cpp.

{
    MUX_ASSERT(groupIndex >= 0 && itemIndex >= 0);
    winrt::IReference<bool> isSelected = false;
    auto childNode = m_rootNode->GetAt(groupIndex, false /*realizeChild*/);
    if (childNode)
    {
        isSelected = childNode->IsSelectedWithPartial(itemIndex);
    }

    return isSelected;
}

winrt::IReference< bool > IsSelected ( int index )

Definition at line 309 of file SelectionModel.cpp.

{
    MUX_ASSERT(index >= 0);
    auto isSelected = m_rootNode->IsSelectedWithPartial(index);
    return isSelected;
}

winrt::IReference< bool > IsSelectedAt ( winrt::IndexPath const & index )

Definition at line 329 of file SelectionModel.cpp.

{
    const auto path = index;
    MUX_ASSERT(winrt::get_self<IndexPath>(path)->IsValid());
    bool isRealized = true;
    auto node = m_rootNode;
    for (int i = 0; i < path.GetSize() - 1; i++)
    {
        const auto childIndex = path.GetAt(i);
        node = node->GetAt(childIndex, false /* realizeChild */);
        if (!node)
        {
            isRealized = false;
            break;
        }
    }

    winrt::IReference<bool> isSelected = false;
    if (isRealized)
    {
        const auto size = path.GetSize();
        if (size == 0)
        {
            isSelected = SelectionNode::ConvertToNullableBool(node->EvaluateIsSelectedBasedOnChildrenNodes());
        }
        else
        {
            isSelected = node->IsSelectedWithPartial(path.GetAt(size - 1));
        }
    }

    return isSelected;
}

void OnPropertyChanged ( winrt::hstring const & propertyName )

Definition at line 493 of file SelectionModel.cpp.

{
    RaisePropertyChanged(propertyName);
}

void OnSelectionChanged ( ) [private]

Definition at line 577 of file SelectionModel.cpp.

{
    m_selectedIndicesCached = nullptr;
    m_selectedItemsCached = nullptr;

    // Raise SelectionChanged event
    if (m_selectionChangedEventSource)
    {
        if (!m_selectionChangedEventArgs)
        {
            m_selectionChangedEventArgs = tracker_ref<winrt::SelectionModelSelectionChangedEventArgs>(this, winrt::make<SelectionModelSelectionChangedEventArgs>());
        }

        m_selectionChangedEventSource(*this, m_selectionChangedEventArgs.get());
    }

    RaisePropertyChanged(L"SelectedIndex");
    RaisePropertyChanged(L"SelectedIndices");
    if (m_rootNode->Source())
    {
        RaisePropertyChanged(L"SelectedItem");
        RaisePropertyChanged(L"SelectedItems");
    }
}

void OnSelectionInvalidatedDueToCollectionChange ( )

Definition at line 505 of file SelectionModel.cpp.

{
    auto scopeGuard = gsl::finally([this]()
    {
        m_selectionInvalidatedDueToCollectionChange = false;
    });

    m_selectionInvalidatedDueToCollectionChange = true;
    OnSelectionChanged();
}

winrt::event_token PropertyChanged ( winrt::PropertyChangedEventHandler const & value )

Reimplemented from SelectionModelProperties.

Definition at line 479 of file SelectionModel.cpp.

{
    return m_propertyChangedEventSource.add(value);
}

void PropertyChanged ( winrt::event_token const & token )

Reimplemented from SelectionModelProperties.

Definition at line 484 of file SelectionModel.cpp.

{
    m_propertyChangedEventSource.remove(token);
}

void RaisePropertyChanged ( std::wstring_view const & name ) [private]

Definition at line 500 of file SelectionModel.cpp.

{
    m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(name));
}

winrt::IInspectable ResolvePath | ( | const winrt::IInspectable & | data,
 |  | const winrt::IndexPath & | dataIndexPath
 | ) |  |

Definition at line 516 of file SelectionModel.cpp.

{
    winrt::IInspectable resolved = nullptr;
    // Raise ChildrenRequested event if there is a handler
    if (m_childrenRequestedEventSource)
    {
        if (!m_childrenRequestedEventArgs)
        {
            m_childrenRequestedEventArgs = tracker_ref<winrt::SelectionModelChildrenRequestedEventArgs>(this, winrt::make<SelectionModelChildrenRequestedEventArgs>(data, dataIndexPath, false /*throwOnAccess*/));
        }
        else
        {
            winrt::get_self<SelectionModelChildrenRequestedEventArgs>(m_childrenRequestedEventArgs.get())->Initialize(data, dataIndexPath, false /*throwOnAccess*/);
        }

        m_childrenRequestedEventSource(*this, m_childrenRequestedEventArgs.get());
        resolved = m_childrenRequestedEventArgs.get().Children();

        // Clear out the values in the args so that it cannot be used after the event handler call.
        winrt::get_self<SelectionModelChildrenRequestedEventArgs>(m_childrenRequestedEventArgs.get())->Initialize(nullptr, nullptr, true /*throwOnAccess*/);
    }
    else
    {
        // No handlers for ChildrenRequested event. If data is of type ItemsSourceView
        // or a type that can be used to create a ItemsSourceView using ItemsSourceView::CreateFrom, then we can
        // auto-resolve that as the child. If not, then we consider the value as a leaf. This is to
        // avoid having to provide the event handler for the most common scenarios. If the app dev does
        // not want this default behavior, they can provide the handler to override.
        if (data.try_as<winrt::ItemsSourceView>() ||
            data.try_as<winrt::IBindableVector>() ||
            data.try_as<winrt::IIterable<winrt::IInspectable>>() ||
            data.try_as<winrt::IBindableIterable>())
        {
            resolved = data;
        }
    }

    return resolved;
}

void Select ( int index )
void Select | ( | int | groupIndex,
 |  | int | itemIndex
 | ) |  |

Definition at line 284 of file SelectionModel.cpp.

{
    SelectWithGroupImpl(groupIndex, itemIndex, true /* select */);
}

void SelectAll ( )

Definition at line 404 of file SelectionModel.cpp.

{
    SelectionTreeHelper::Traverse(
        m_rootNode,
        true, /* realizeChildren */
        [](const SelectionTreeHelper::TreeWalkNodeInfo& info)
    {
        if (info.Node->DataCount() > 0)
        {
            info.Node->SelectAll();
        }
    });

    OnSelectionChanged();
}

void SelectAllFlat ( )

Definition at line 422 of file SelectionModel.cpp.

{
    m_rootNode->SelectAll();
    OnSelectionChanged();
}

void SelectAt ( winrt::IndexPath const & index )

Definition at line 289 of file SelectionModel.cpp.

{
    SelectWithPathImpl(index, true /* select */, true /* raiseSelectionChanged */);
}

void SelectedIndex ( winrt::IndexPath const & value )

Definition at line 133 of file SelectionModel.cpp.

{
    auto isSelected = IsSelectedAt(value);
    if (!isSelected || !isSelected.Value())
    {
        ClearSelection(true /* resetAnchor */, false /*raiseSelectionChanged */);
        SelectWithPathImpl(value, true /* select */, false /* raiseSelectionChanged */);
        OnSelectionChanged();
    }
}

winrt::IndexPath SelectedIndex ( )

Definition at line 121 of file SelectionModel.cpp.

{
    winrt::IndexPath selectedIndex = nullptr;
    auto selectedIndices = SelectedIndices();
    if (selectedIndices && selectedIndices.Size() > 0)
    {
        selectedIndex = selectedIndices.GetAt(0);
    }

    return selectedIndex;
}

winrt::IVectorView< winrt::IndexPath > SelectedIndices ( )

Definition at line 214 of file SelectionModel.cpp.

{
    if (!m_selectedIndicesCached)
    {
        std::vector<SelectedItemInfo> selectedInfos;
        SelectionTreeHelper::Traverse(
            m_rootNode,
            false, /* realizeChildren */
            [&selectedInfos](const SelectionTreeHelper::TreeWalkNodeInfo& currentInfo)
        {
            if (currentInfo.Node->SelectedCount() > 0)
            {
                selectedInfos.emplace_back(SelectedItemInfo{ currentInfo.Node, currentInfo.Path });
            }
        });

        // Instead of creating a dumb vector that takes up the space for all the selected indices,
        // we create a custom VectorView implimentation that calls back using a delegate to find
        // the IndexPath at a particular index. This avoid having to create the storage and copying
        // needed in a dumb vector. This also allows us to expose a tree of selected nodes into an
        // easier to consume flat vector view of IndexPaths.
        auto indices = winrt::make<::SelectedItems<winrt::IndexPath>>(
            selectedInfos,
            [](const std::vector<SelectedItemInfo>& infos, unsigned int index) // callback for GetAt(index)
        {
            unsigned int currentIndex = 0;
            winrt::IndexPath path{ nullptr };
            for (const auto info : infos)
            {
                if (const auto node = info.Node.lock())
                {
                    const unsigned int currentCount = node->SelectedCount();
                    if (index >= currentIndex && index < currentIndex + currentCount)
                    {
                        int targetIndex = node->SelectedIndices().at(index - currentIndex);
                        path = winrt::get_self<IndexPath>(info.Path)->CloneWithChildIndex(targetIndex);
                        break;
                    }

                    currentIndex += currentCount;
                }
                else
                {
                    throw winrt::hresult_error(E_FAIL, L"selection has changed since SelectedIndices property was read.");
                }
            }

            return path;
        });
        m_selectedIndicesCached = indices;
    }

    return m_selectedIndicesCached;
}

winrt::IInspectable SelectedItem ( )

Definition at line 144 of file SelectionModel.cpp.

{
    winrt::IInspectable item = nullptr;
    auto selectedItems = SelectedItems();
    if (selectedItems && selectedItems.Size() > 0)
    {
        item = selectedItems.GetAt(0);
    }

    return item;
}

winrt::IVectorView< winrt::IInspectable > SelectedItems ( )

Definition at line 156 of file SelectionModel.cpp.

{
    if (!m_selectedItemsCached)
    {
        std::vector<SelectedItemInfo> selectedInfos;
        if (m_rootNode.get()->Source())
        {
            SelectionTreeHelper::Traverse(
                m_rootNode,
                false, /* realizeChildren */
                [&selectedInfos](const SelectionTreeHelper::TreeWalkNodeInfo& currentInfo)
            {
                if (currentInfo.Node->SelectedCount() > 0)
                {
                    selectedInfos.emplace_back(SelectedItemInfo{ currentInfo.Node, currentInfo.Path });
                }
            });
        }

        // Instead of creating a dumb vector that takes up the space for all the selected items,
        // we create a custom VectorView implimentation that calls back using a delegate to find
        // the selected item at a particular index. This avoid having to create the storage and copying
        // needed in a dumb vector. This also allows us to expose a tree of selected nodes into an
        // easier to consume flat vector view of objects.
        auto selectedItems = winrt::make<::SelectedItems<winrt::IInspectable>>(
            selectedInfos,
            [](const std::vector<SelectedItemInfo>& infos, unsigned int index) // callback for GetAt(index)
        {
            unsigned int currentIndex = 0;
            winrt::IInspectable item{ nullptr };
            for (const auto& info : infos)
            {
                if (const auto node = info.Node.lock())
                {
                    const unsigned int currentCount = node->SelectedCount();
                    if (index >= currentIndex && index < currentIndex + currentCount)
                    {
                        int targetIndex = node->SelectedIndices().at(index - currentIndex);
                        item = node->ItemsSourceView().GetAt(targetIndex);
                        break;
                    }

                    currentIndex += currentCount;
                }
                else
                {
                    throw winrt::hresult_error(E_FAIL, L"selection has changed since SelectedItems property was read.");
                }
            }

            return item;
        });
        m_selectedItemsCached = selectedItems;
    }

    return m_selectedItemsCached;
}

void SelectImpl | ( | int | index,
 |  | bool | select |
 | ) |  |  | [private]

Definition at line 602 of file SelectionModel.cpp.

{
    if (m_rootNode->IsSelected(index) != select)
    {
        if (m_singleSelect)
        {
            ClearSelection(true /*resetAnchor*/, false /* raiseSelectionChanged */);
        }
        const auto selected = m_rootNode->Select(index, select);
        if (selected)
        {
            AnchorIndex(winrt::make<IndexPath>(index));
        }
        OnSelectionChanged();
    }
}

bool SelectionInvalidatedDueToCollectionChange ( ) const [inline]

Definition at line 88 of file SelectionModel.h.

    {
        return m_selectionInvalidatedDueToCollectionChange;
    }

void SelectRange | ( | winrt::IndexPath const & | start,
 |  | winrt::IndexPath const & | end
 | ) |  |

Definition at line 394 of file SelectionModel.cpp.

{
    SelectRangeImpl(start, end, true /* select */);
}

void SelectRangeFromAnchor | ( | int | groupIndex,
 |  | int | itemIndex
 | ) |  |

Definition at line 368 of file SelectionModel.cpp.

{
    SelectRangeFromAnchorWithGroupImpl(endGroupIndex, endItemIndex, true /* select */);
}

void SelectRangeFromAnchor ( int32_t index )

Definition at line 363 of file SelectionModel.cpp.

{
    SelectRangeFromAnchorImpl(index, true /* select */ );
}

void SelectRangeFromAnchorImpl | ( | int | index,
 |  | bool | select |
 | ) |  |  | [private]

Definition at line 712 of file SelectionModel.cpp.

{
    int anchorIndex = 0;
    const auto anchor = AnchorIndex();
    if (anchor)
    {
        MUX_ASSERT(anchor.GetSize() == 1);
        anchorIndex = anchor.GetAt(0);
    }

    const bool selected = m_rootNode->SelectRange(IndexRange(anchorIndex, index), select);
    if (selected)
    {
        OnSelectionChanged();
    }
}

void SelectRangeFromAnchorTo ( winrt::IndexPath const & index )

Definition at line 373 of file SelectionModel.cpp.

{
    SelectRangeImpl(AnchorIndex(), index, true /* select */);
}

void SelectRangeFromAnchorWithGroupImpl | ( | int | groupIndex,
 |  | int | itemIndex,
 |  | bool | select |
 | ) |  |  | [private]

Definition at line 729 of file SelectionModel.cpp.

{
    int startGroupIndex = 0;
    int startItemIndex = 0;
    auto anchorIndex = AnchorIndex();
    if (anchorIndex)
    {
        MUX_ASSERT(anchorIndex.GetSize() == 2);
        startGroupIndex = anchorIndex.GetAt(0);
        startItemIndex = anchorIndex.GetAt(1);
    }

    // Make sure start > end
    if (startGroupIndex > endGroupIndex ||
        (startGroupIndex == endGroupIndex && startItemIndex > endItemIndex))
    {
        int temp = startGroupIndex;
        startGroupIndex = endGroupIndex;
        endGroupIndex = temp;
        temp = startItemIndex;
        startItemIndex = endItemIndex;
        endItemIndex = temp;
    }

    bool selected = false;
    for (int groupIdx = startGroupIndex; groupIdx <= endGroupIndex; groupIdx++)
    {
        const auto groupNode = m_rootNode->GetAt(groupIdx, true /* realizeChild */);
        const int startIndex = groupIdx == startGroupIndex ? startItemIndex : 0;
        const int endIndex = groupIdx == endGroupIndex ? endItemIndex : groupNode->DataCount() - 1;
        selected |= groupNode->SelectRange(IndexRange(startIndex, endIndex), select);
    }

    if (selected)
    {
        OnSelectionChanged();
    }
}

void SelectRangeImpl | ( | const winrt::IndexPath & | start,
 |  | const winrt::IndexPath & | end,
 |  | bool | select |
 | ) |  |  | [private]

Definition at line 768 of file SelectionModel.cpp.

{
    auto winrtStart = start;
    auto winrtEnd = end;

    int32_t compareIndexPaths = winrtEnd.CompareTo(winrtStart);

    if (compareIndexPaths == 0)
    {
        if (select)
        {
            SelectAt(winrtStart);
        }
        else
        {
            DeselectAt(winrtStart);
        }
    }
    else
    {
        // Make sure start <= end
        if (compareIndexPaths == -1)
        {
            auto temp = winrtStart;
            winrtStart = winrtEnd;
            winrtEnd = temp;
        }

        // Note: Since we do not know the depth of the tree, we have to walk to each leaf
        SelectionTreeHelper::TraverseRangeRealizeChildren(
            m_rootNode,
            winrtStart,
            winrtEnd,
            [select](const SelectionTreeHelper::TreeWalkNodeInfo& info)
        {
            if (info.Node->DataCount() == 0)
            {
                // Select only leaf nodes
                info.ParentNode->Select(info.Path.GetAt(info.Path.GetSize() - 1), select);
            }
        });
    }

    OnSelectionChanged();
}

void SelectWithGroupImpl | ( | int | groupIndex,
 |  | int | itemIndex,
 |  | bool | select |
 | ) |  |  | [private]

Definition at line 619 of file SelectionModel.cpp.

{
    if (m_singleSelect)
    {
        ClearSelection(true /*resetAnchor*/, false /* raiseSelectionChanged */);
    }

    const auto childNode = m_rootNode->GetAt(groupIndex, true /* realize */);
    const auto selected = childNode->Select(itemIndex, select);
    if (selected)
    {
        AnchorIndex(winrt::make<IndexPath>(groupIndex, itemIndex));
    }

    OnSelectionChanged();
}

void SelectWithPathImpl | ( | const winrt::IndexPath & | index,
 |  | bool | select,
 |  | bool | raiseSelectionChanged |
 | ) |  |  | [private]

Definition at line 636 of file SelectionModel.cpp.

{
    bool newSelection = true;

    // Handle single select differently as comparing indexpaths is faster
    if (m_singleSelect)
    {
        if (auto const selectedIndex = SelectedIndex())
        {
            // If paths are equal and we want to select, skip everything and do nothing
            if (select && selectedIndex.CompareTo(index) == 0)
            {
                newSelection = false;
            }
        }
        else
        {
            // If we are in single select and selectedIndex is null, deselecting is not a new change.
            // Selecting something is a new change, so set flag to appropriate value here.
            newSelection = select;
        }
    }

    // Selection is actually different from previous one, so update.
    if (newSelection)
    {
        bool selected = false;
        // If we unselect something, raise event any way, otherwise changedSelection is false
        bool changedSelection = false;

        // We only need to clear selection by walking the data structure from the beginning when:
        // - we are in single selection mode and
        // - want to select something.
        //
        // If we want to unselect something we unselect it directly in TraverseIndexPath below and raise the SelectionChanged event
        // if required.
        if (m_singleSelect && select)
        {
            ClearSelection(true /*resetAnchor*/, false /* raiseSelectionChanged */);
        }

        SelectionTreeHelper::TraverseIndexPath(
            m_rootNode,
            index,
            true, /* realizeChildren */
            [&selected, &select, &changedSelection](std::shared_ptr<SelectionNode> currentNode, const winrt::IndexPath& path, int depth, int childIndex)
            {
                if (depth == path.GetSize() - 1)
                {
                    if (currentNode->IsSelected(childIndex) != select)
                    {
                        // Node has different value then we want to set, so lets update!
                        changedSelection = true;
                    }
                    selected = currentNode->Select(childIndex, select);
                }
            }
        );

        if (selected)
        {
            AnchorIndex(index);
        }

        // The walk tree operation can change the indices, and the next time it get's read,
        // we would throw an exception. That's what we are preventing with next two lines
        m_selectedIndicesCached = nullptr;
        m_selectedItemsCached = nullptr;

        if (raiseSelectionChanged && changedSelection)
        {
            OnSelectionChanged();
        }
    }
}

void SetAnchorIndex | ( | int | groupIndex,
 |  | int | itemIndex
 | ) |  |

Definition at line 274 of file SelectionModel.cpp.

{
    AnchorIndex(winrt::make<IndexPath>(groupIndex, itemIndex));
}

void SetAnchorIndex ( int32_t index )

Definition at line 269 of file SelectionModel.cpp.

{
    AnchorIndex(winrt::make<IndexPath>(index));
}

std::shared_ptr<SelectionNode> SharedLeafNode ( ) [inline]

Definition at line 95 of file SelectionModel.h.

{ return m_leafNode; }

void SingleSelect ( bool value )

Definition at line 57 of file SelectionModel.cpp.

{
    if (m_singleSelect != !!value)
    {
        m_singleSelect = value;
        auto selectedIndices = SelectedIndices();

        // Only update selection and raise SelectionChanged event when:
        // - we switch from SelectionMode::Multiple to SelectionMode::Single and
        // - more than one item was selected at the time of the switch
        if (value && selectedIndices && selectedIndices.Size() > 1)
        {
            // We want to be single select, so make sure there is only
            // one selected item.
            auto firstSelectionIndexPath = selectedIndices.GetAt(0);
            ClearSelection(true /* resetAnchor */, false /*raiseSelectionChanged */);
            SelectWithPathImpl(firstSelectionIndexPath, true /* select */, true /* raiseSelectionChanged */);
        }

        RaisePropertyChanged(L"SingleSelect");
    }
}

bool SingleSelect ( )

Definition at line 52 of file SelectionModel.cpp.

{
    return m_singleSelect;
}

void Source ( winrt::IInspectable const & value )

Definition at line 44 of file SelectionModel.cpp.

{
    ClearSelection(true /* resetAnchor */, false /* raiseSelectionChanged */);
    m_rootNode->Source(value);
    OnSelectionChanged();
    RaisePropertyChanged(L"Source");
}

winrt::IInspectable Source ( )

Definition at line 39 of file SelectionModel.cpp.

{
    return m_rootNode->Source();
}

winrt::TypeName Type ( )

Definition at line 437 of file SelectionModel.cpp.

{
    auto outer = get_strong().as<winrt::IInspectable>();
    winrt::TypeName typeName;
    typeName.Kind = winrt::TypeKind::Metadata;
    typeName.Name = winrt::get_class_name(outer);
    return typeName;
}

Member Data Documentation

std::shared_ptr<SelectionNode> m_leafNode [private]

Definition at line 109 of file SelectionModel.h.

The documentation for this class was generated from the following files:
  • Repeater/SelectionModel.h
  • Repeater/SelectionModel.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModelChildrenRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

SelectionModelChildrenRequestedEventArgs Class Reference

#include "SelectionModelChildrenRequestedEventArgs.h"

Inherits ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

SelectionModelChildrenRequestedEventArgs (const winrt::IInspectable &data, const winrt::IndexPath &sourceIndexPath, bool throwOnAccess)
winrt::IInspectable | Children ()
void | Children (winrt::IInspectable const &value)
void | Initialize (const winrt::IInspectable &source, const winrt::IndexPath &sourceIndexPath, bool throwOnAccess)
winrt::IInspectable | Source ()
winrt::IndexPath | SourceIndex ()

Detailed Description

Definition at line 8 of file SelectionModelChildrenRequestedEventArgs.h.

Constructor & Destructor Documentation

SelectionModelChildrenRequestedEventArgs | ( | const winrt::IInspectable & | data,
 |  | const winrt::IndexPath & | sourceIndexPath,
 |  | bool | throwOnAccess
 | ) |  |

Definition at line 10 of file SelectionModelChildrenRequestedEventArgs.cpp.

{
    Initialize(source, sourceIndexPath, throwOnAccess);
}

Member Function Documentation

winrt::IInspectable Children ( )

Definition at line 37 of file SelectionModelChildrenRequestedEventArgs.cpp.

{
    return m_children.get();
}

void Children ( winrt::IInspectable const & value )

Definition at line 42 of file SelectionModelChildrenRequestedEventArgs.cpp.

{
    m_children.set(value);
}

void Initialize | ( | const winrt::IInspectable & | source,
 |  | const winrt::IndexPath & | sourceIndexPath,
 |  | bool | throwOnAccess
 | ) |  |

Definition at line 49 of file SelectionModelChildrenRequestedEventArgs.cpp.

{
    m_source.set(source);
    m_sourceIndexPath.set(sourceIndexPath);
    m_throwOnAccess = throwOnAccess;
    m_children.set(nullptr);
}

winrt::IInspectable Source ( )

Definition at line 17 of file SelectionModelChildrenRequestedEventArgs.cpp.

{
    if (m_throwOnAccess)
    {
        throw winrt::hresult_error(E_FAIL, L"Source can only be accesed in the ChildrenRequested event handler.");
    }

    return m_source.get();
}

winrt::IndexPath SourceIndex ( )

Definition at line 27 of file SelectionModelChildrenRequestedEventArgs.cpp.

{
    if (m_throwOnAccess)
    {
        throw winrt::hresult_error(E_FAIL, L"SourceIndex can only be accesed in the ChildrenRequested event handler.");
    }

    return m_sourceIndexPath.get();
}

The documentation for this class was generated from the following files:
  • Repeater/SelectionModelChildrenRequestedEventArgs.h
  • Repeater/SelectionModelChildrenRequestedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModelProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

SelectionModelProperties Class Reference

#include "SelectionModel.properties.h"

Inherited by SelectionModel.

List of all members.

Public Member Functions

SelectionModelProperties ()
winrt::event_token | ChildrenRequested (winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelChildrenRequestedEventArgs > const &value)
void | ChildrenRequested (winrt::event_token const &token)
void | PropertyChanged (winrt::event_token const &token)
winrt::event_token | PropertyChanged (winrt::PropertyChangedEventHandler const &value)
winrt::event_token | SelectionChanged (winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelSelectionChangedEventArgs > const &value)
void | SelectionChanged (winrt::event_token const &token)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::SelectionModel,
winrt::SelectionModelChildrenRequestedEventArgs > > 		m_childrenRequestedEventSource
event_source
< winrt::PropertyChangedEventHandler > 		m_propertyChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::SelectionModel,
winrt::SelectionModelSelectionChangedEventArgs > > 		m_selectionChangedEventSource

Detailed Description

Definition at line 7 of file SelectionModel.properties.h.

Constructor & Destructor Documentation

SelectionModelProperties ( )

Definition at line 17 of file SelectionModel.properties.cpp.

    : m_childrenRequestedEventSource{static_cast<SelectionModel*>(this)}

Member Function Documentation

winrt::event_token ChildrenRequested ( winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelChildrenRequestedEventArgs > const & value )
void ChildrenRequested ( winrt::event_token const & token )
static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::event_token PropertyChanged ( winrt::PropertyChangedEventHandler const & value )

Reimplemented in SelectionModel.

void PropertyChanged ( winrt::event_token const & token )

Reimplemented in SelectionModel.

void SelectionChanged ( winrt::event_token const & token )
winrt::event_token SelectionChanged ( winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelSelectionChangedEventArgs > const & value )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::SelectionModel, winrt::SelectionModelChildrenRequestedEventArgs> > m_childrenRequestedEventSource

Definition at line 21 of file SelectionModel.properties.h.

event_source<winrt::PropertyChangedEventHandler> m_propertyChangedEventSource

Definition at line 22 of file SelectionModel.properties.h.

event_source<winrt::TypedEventHandler<winrt::SelectionModel, winrt::SelectionModelSelectionChangedEventArgs> > m_selectionChangedEventSource

Definition at line 23 of file SelectionModel.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SelectionModel.properties.h
  • Generated/SelectionModel.properties.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModelSelectionChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionModelSelectionChangedEventArgs Class Reference

#include "SelectionModelSelectionChangedEventArgs.h"

Detailed Description

Definition at line 8 of file SelectionModelSelectionChangedEventArgs.h.

The documentation for this class was generated from the following file:
  • Repeater/SelectionModelSelectionChangedEventArgs.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionTreeHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Static Public Member Functions | Static Private Member Functions

SelectionTreeHelper Class Reference

#include "SelectionTreeHelper.h"

List of all members.

Classes

struct | TreeWalkNodeInfo

Static Public Member Functions

static void | Traverse (std::shared_ptr< SelectionNode > root, bool realizeChildren, std::function< void(const TreeWalkNodeInfo &)> nodeAction)
static void | TraverseIndexPath (std::shared_ptr< SelectionNode > root, const winrt::IndexPath &path, bool realizeChildren, std::function< void(std::shared_ptr< SelectionNode >, const winrt::IndexPath &, int, int)> nodeAction)
static void | TraverseRangeRealizeChildren (std::shared_ptr< SelectionNode > root, const winrt::IndexPath &start, const winrt::IndexPath &end, std::function< void(const TreeWalkNodeInfo &)> nodeAction)

Static Private Member Functions

static bool | IsSubSet (const winrt::IndexPath &path, const winrt::IndexPath &subset)
static winrt::IndexPath | StartPath (const winrt::IndexPath &path, int length)

Detailed Description

Definition at line 6 of file SelectionTreeHelper.h.

Member Function Documentation

bool IsSubSet | ( | const winrt::IndexPath & | path,
 |  | const winrt::IndexPath & | subset |
 | ) |  |  | [static, private]

Definition at line 133 of file SelectionTreeHelper.cpp.

{
    const auto subsetSize = subset.GetSize();
    if (path.GetSize() < subsetSize)
    {
        return false;
    }

    for (int i = 0; i < subsetSize; i++)
    {
        if (path.GetAt(i) != subset.GetAt(i))
        {
            return false;
        }
    }

    return true;
}

winrt::IndexPath StartPath | ( | const winrt::IndexPath & | path,
 |  | int | length |
 | ) |  |  | [static, private]

Definition at line 153 of file SelectionTreeHelper.cpp.

{
    std::vector<int> subPath;
    for (int i = 0; i < length; i++)
    {
        subPath.emplace_back(path.GetAt(i));
    }

    return winrt::make<IndexPath>(subPath);
}

void Traverse | ( | std::shared_ptr< SelectionNode > | root,
 |  | bool | realizeChildren,
 |  | std::function< void(const TreeWalkNodeInfo &)> | nodeAction |
 | ) |  |  | [static]

Definition at line 32 of file SelectionTreeHelper.cpp.

{
    auto pendingNodes = std::vector<TreeWalkNodeInfo>();
    auto current = winrt::make<IndexPath>(nullptr);
    pendingNodes.push_back(TreeWalkNodeInfo(root, current));

    while (pendingNodes.size() > 0)
    {
        const auto nextNode = pendingNodes.back();
        pendingNodes.pop_back();
        const int count = realizeChildren ? nextNode.Node->DataCount() : nextNode.Node->ChildrenNodeCount();
        for (int i = count - 1; i >= 0; i--)
        {
            std::shared_ptr<SelectionNode> child = nextNode.Node->GetAt(i, realizeChildren);
            auto childPath = winrt::get_self<IndexPath>(nextNode.Path)->CloneWithChildIndex(i);
            if (child != nullptr)
            {
                pendingNodes.push_back(TreeWalkNodeInfo(child, childPath, nextNode.Node));
            }
        }

        // Queue the children first and then perform the action. This way
        // the action can remove the children in the action if necessary
        nodeAction(nextNode);
    }
}

void TraverseIndexPath | ( | std::shared_ptr< SelectionNode > | root,
 |  | const winrt::IndexPath & | path,
 |  | bool | realizeChildren,
 |  | std::function< void(std::shared_ptr< SelectionNode >, const winrt::IndexPath &, int, int)> | nodeAction |
 | ) |  |  | [static]

Definition at line 12 of file SelectionTreeHelper.cpp.

{
    auto node = root;
    for (int depth = 0; depth < path.GetSize(); depth++)
    {
        const int childIndex = path.GetAt(depth);
        nodeAction(node, path, depth, childIndex);

        if (depth < path.GetSize() - 1)
        {
            node = node->GetAt(childIndex, realizeChildren);
        }
    }
}

void TraverseRangeRealizeChildren | ( | std::shared_ptr< SelectionNode > | root,
 |  | const winrt::IndexPath & | start,
 |  | const winrt::IndexPath & | end,
 |  | std::function< void(const TreeWalkNodeInfo &)> | nodeAction |
 | ) |  |  | [static]

Definition at line 64 of file SelectionTreeHelper.cpp.

{
    MUX_ASSERT(start.CompareTo(end) == -1);

    auto pendingNodes = std::vector<TreeWalkNodeInfo>();
    winrt::IndexPath current = start;

    // Build up the stack to account for the depth first walk up to the
    // start index path.
    TraverseIndexPath(
        root,
        start,
        true, /* realizeChildren */
        [&start, &end, &pendingNodes](std::shared_ptr<SelectionNode> node, const winrt::IndexPath& path, int depth, int childIndex)
    {
        const auto currentPath = StartPath(path, depth);
        const bool isStartPath = IsSubSet(start, currentPath);
        const bool isEndPath = IsSubSet(end, currentPath);

        const int startIndex = depth < start.GetSize() && isStartPath ? std::max(0, start.GetAt(depth)) : 0;
        const int endIndex = depth < end.GetSize() && isEndPath ? std::min(node->DataCount() - 1, end.GetAt(depth)) : node->DataCount() - 1;

        for (int i = endIndex; i >= startIndex; i--)
        {
            auto child = node->GetAt(i, true /* realizeChild */);
            if (child)
            {
                auto childPath = winrt::get_self<IndexPath>(currentPath)->CloneWithChildIndex(i);
                pendingNodes.push_back(TreeWalkNodeInfo(child, childPath, node));
            }
        }
    });

    // From the start index path, do a depth first walk as long as the
    // current path is less than the end path.
    while (pendingNodes.size() > 0)
    {
        const auto info = pendingNodes.back();
        pendingNodes.pop_back();
        const int depth = info.Path.GetSize();
        const bool isStartPath = IsSubSet(start, info.Path);
        const bool isEndPath = IsSubSet(end, info.Path);
        const int startIndex = depth < start.GetSize() && isStartPath ? start.GetAt(depth) : 0;
        const int endIndex = depth < end.GetSize() && isEndPath ? end.GetAt(depth) : info.Node->DataCount() - 1;
        for (int i = endIndex; i >= startIndex; i--)
        {
            const auto child = info.Node->GetAt(i, true /* realizeChild */);
            if (child)
            {
                auto childPath = winrt::get_self<IndexPath>(info.Path)->CloneWithChildIndex(i);
                pendingNodes.push_back(TreeWalkNodeInfo(child, childPath, info.Node));
            }
        }

        nodeAction(info);

        if (info.Path.CompareTo(end) == 0)
        {
            // We reached the end index path. stop iterating.
            break;
        }
    }
}

The documentation for this class was generated from the following files:
  • Repeater/SelectionTreeHelper.h
  • Repeater/SelectionTreeHelper.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionTreeHelper::TreeWalkNodeInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • SelectionTreeHelper
  • SelectionTreeHelper::TreeWalkNodeInfo
Public Member Functions | Public Attributes

SelectionTreeHelper::TreeWalkNodeInfo Struct Reference

#include "SelectionTreeHelper.h"

List of all members.

Public Member Functions

TreeWalkNodeInfo (std::shared_ptr< SelectionNode > node, const winrt::IndexPath &indexPath, std::shared_ptr< SelectionNode > parent)
TreeWalkNodeInfo (std::shared_ptr< SelectionNode > node, const winrt::IndexPath &indexPath)

Public Attributes

std::shared_ptr< SelectionNode > | Node
std::shared_ptr< SelectionNode > | ParentNode
winrt::IndexPath | Path

Detailed Description

Definition at line 9 of file SelectionTreeHelper.h.

Constructor & Destructor Documentation

TreeWalkNodeInfo | ( | std::shared_ptr< SelectionNode > | node,
 |  | const winrt::IndexPath & | indexPath,
 |  | std::shared_ptr< SelectionNode > | parent |
 | ) |  |  | [inline]

Definition at line 11 of file SelectionTreeHelper.h.

            : Node(node), Path(indexPath), ParentNode(parent) {}

TreeWalkNodeInfo | ( | std::shared_ptr< SelectionNode > | node,
 |  | const winrt::IndexPath & | indexPath |
 | ) |  |  | [inline]

Definition at line 13 of file SelectionTreeHelper.h.

            : Node(node), Path(indexPath), ParentNode(nullptr) {}

Member Data Documentation

std::shared_ptr<SelectionNode> Node

Definition at line 16 of file SelectionTreeHelper.h.

std::shared_ptr<SelectionNode> ParentNode

Definition at line 18 of file SelectionTreeHelper.h.

winrt::IndexPath Path

Definition at line 17 of file SelectionTreeHelper.h.

The documentation for this struct was generated from the following file:
  • Repeater/SelectionTreeHelper.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

SelectorBar Class Reference

#include "SelectorBar.h"

Inherits ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT >, and SelectorBarProperties.

List of all members.

Public Member Functions

SelectorBar ()
~SelectorBar ()
winrt::ItemsView | GetItemsViewPart () const
void | OnApplyTemplate ()
void | OnGotFocus (const winrt::RoutedEventArgs &args)
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)

Private Member Functions

void | OnItemsViewSelectedItemPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | RaiseSelectionChanged ()
void | SelectFirstFocusableItem ()
void | UpdateItemsViewSelectionFromSelectedItem ()
void | UpdateSelectedItemFromItemsView ()
void | ValidateSelectedItem ()

Detailed Description

Definition at line 12 of file SelectorBar.h.

Constructor & Destructor Documentation

SelectorBar ( )

Definition at line 18 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    __RP_Marker_ClassById(RuntimeProfiler::ProfId_SelectorBar);

    EnsureProperties();
    SetDefaultStyleKey(this);

    auto items = winrt::make<ObservableVector<winrt::SelectorBarItem>>();
    SetValue(s_ItemsProperty, items);

    m_loadedRevoker = Loaded(winrt::auto_revoke, { this, &SelectorBar::OnLoaded });
}

~SelectorBar ( )

Definition at line 33 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

winrt::ItemsView GetItemsViewPart ( ) const

Definition at line 39 of file SelectorBar.cpp.

{
    return m_itemsView.get();
}

void OnApplyTemplate ( )

Definition at line 44 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_itemsViewSelectedItemPropertyChangedRevoker.revoke();

    __super::OnApplyTemplate();

    winrt::IControlProtected controlProtected{ *this };

    m_itemsView.set(GetTemplateChildT<winrt::ItemsView>(s_itemsViewPartName, controlProtected));

    if (const auto& itemsView = m_itemsView.get())
    {
        m_itemsViewSelectedItemPropertyChangedRevoker = RegisterPropertyChanged(itemsView, winrt::ItemsView::SelectedItemProperty(), { this, &SelectorBar::OnItemsViewSelectedItemPropertyChanged });

        if (auto scrollView = itemsView.ScrollView())
        {
            // Allow the items to scroll horizontally if the SelectorBar is sized too small horizontally (the default
            // ScrollView ContentOrientation is Vertical for vertical scrolling which is not useful for the SelectorBar).
            scrollView.ContentOrientation(winrt::ScrollingContentOrientation::Horizontal);
        }
    }

    if (SelectedItem() != nullptr)
    {
        ValidateSelectedItem();
        UpdateItemsViewSelectionFromSelectedItem();
    }
}

void OnGotFocus ( const winrt::RoutedEventArgs & args )

Definition at line 98 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    __super::OnGotFocus(args);

    const auto selectedItem = SelectedItem();
    const auto selectedItemIsFocusable = selectedItem == nullptr ? false : SharedHelpers::IsFocusableElement(selectedItem);

    if (selectedItem == nullptr || !selectedItemIsFocusable)
    {
        // Automatically attempt to select an item when the SelectorBar got focus without any selection.
        if (const auto& itemsView = m_itemsView.get())
        {
            const int currentItemIndex = itemsView.CurrentItemIndex();

            if (currentItemIndex != -1)
            {
                // Select the current item index
                itemsView.Select(currentItemIndex);
            }
        }

        if (SelectedItem() == nullptr)
        {
            SelectFirstFocusableItem();
        }
    }
}

void OnItemsViewSelectedItemPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 89 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    UpdateSelectedItemFromItemsView();
}

void OnLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 129 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (SelectedItem() == nullptr)
    {
        UpdateSelectedItemFromItemsView();
    }
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 75 of file SelectorBar.cpp.

{
    const auto dependencyProperty = args.Property();

    if (dependencyProperty == s_SelectedItemProperty)
    {
        SELECTORBAR_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, "SelectedItem property changed");

        ValidateSelectedItem();
        UpdateItemsViewSelectionFromSelectedItem();
        RaiseSelectionChanged();
    }
}

void RaiseSelectionChanged ( ) [private]

Definition at line 141 of file SelectorBar.cpp.

{
    if (m_selectionChangedEventSource)
    {
        SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

        auto selectorBarSelectionChangedEventArgs = winrt::make_self<SelectorBarSelectionChangedEventArgs>();

        m_selectionChangedEventSource(*this, *selectorBarSelectionChangedEventArgs);
    }
}

void SelectFirstFocusableItem ( ) [private]

Definition at line 153 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    MUX_ASSERT(SelectedItem() == nullptr);

    const auto items = Items();
    const auto itemsCount = items.Size();

    for (uint32_t itemIndex = 0; itemIndex < itemsCount; itemIndex++)
    {
        const auto item = items.GetAt(itemIndex);

        if (item != nullptr && SharedHelpers::IsFocusableElement(item))
        {
            SelectedItem(item);
            break;
        }
    }
}

void UpdateItemsViewSelectionFromSelectedItem ( ) [private]

Definition at line 174 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (const auto& itemsView = m_itemsView.get())
    {
        const auto selectedItem = SelectedItem();

        if (selectedItem == nullptr)
        {
            itemsView.DeselectAll();
        }
        else
        {
            uint32_t selectedIndex{};
            const bool result = Items().IndexOf(selectedItem, selectedIndex);
            MUX_ASSERT(result);
            itemsView.Select(selectedIndex);
        }
    }
}

void UpdateSelectedItemFromItemsView ( ) [private]

Definition at line 196 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (const auto& itemsView = m_itemsView.get())
    {
        const auto selectedItem = SelectedItem();
        const auto itemsViewSelectedItem = itemsView.SelectedItem().as<winrt::SelectorBarItem>();

        if (selectedItem != itemsViewSelectedItem)
        {
            SelectedItem(itemsViewSelectedItem);
        }
    }
}

void ValidateSelectedItem ( ) [private]

Definition at line 212 of file SelectorBar.cpp.

{
    SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    const auto selectedItem = SelectedItem();

    if (selectedItem)
    {
        uint32_t selectedIndex{};
        const bool result = Items().IndexOf(selectedItem, selectedIndex);

        if (!result)
        {
            throw winrt::hresult_invalid_argument(L"SelectedItem must be an element of Items.");
        }
    }
}

The documentation for this class was generated from the following files:
  • SelectorBar/SelectorBar.h
  • SelectorBar/SelectorBar.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

SelectorBarItem Class Reference

#include "SelectorBarItem.h"

Inherits SelectorBarItemProperties.

List of all members.

Public Member Functions

~SelectorBarItem ()
ForwardRefToBaseReferenceTracker (ItemContainer) SelectorBarItem()
void | OnApplyTemplate () override
winrt::AutomationPeer | OnCreateAutomationPeer () override
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)

Private Member Functions

void | UpdatePartsVisibility (bool isForIcon, bool isForText)

Detailed Description

Definition at line 12 of file SelectorBarItem.h.

Constructor & Destructor Documentation

~SelectorBarItem ( )

Definition at line 18 of file SelectorBarItem.cpp.

{
    SELECTORBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

ForwardRefToBaseReferenceTracker ( ItemContainer )
void OnApplyTemplate ( ) [override]

Definition at line 28 of file SelectorBarItem.cpp.

{
    SELECTORBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    ItemContainer::OnApplyTemplate();

    winrt::IControlProtected controlProtected{ *this };

    m_iconVisual.set(GetTemplateChildT<winrt::ContentPresenter>(s_iconVisualPartName, controlProtected));
    m_textVisual.set(GetTemplateChildT<winrt::TextBlock>(s_textVisualPartName, controlProtected));

    UpdatePartsVisibility(true /*isForIcon*/, true /*isForText*/);
}

winrt::AutomationPeer OnCreateAutomationPeer ( ) [override]

Definition at line 23 of file SelectorBarItem.cpp.

{
    return winrt::make<SelectorBarItemAutomationPeer>(*this);
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 42 of file SelectorBarItem.cpp.

{
    const auto dependencyProperty = args.Property();
    const bool isForIcon = dependencyProperty == s_IconProperty;
    const bool isForText = dependencyProperty == s_TextProperty;

#ifdef DBG
    SELECTORBAR_TRACE_VERBOSE(nullptr, L"%s[%p](property: %s)\n", METH_NAME, this, DependencyPropertyToString(dependencyProperty).c_str());
#endif

    if (isForIcon || isForText)
    {
        UpdatePartsVisibility(isForIcon, isForText);
    }
}

void UpdatePartsVisibility | ( | bool | isForIcon,
 |  | bool | isForText |
 | ) |  |  | [private]

Definition at line 58 of file SelectorBarItem.cpp.

{
    MUX_ASSERT(isForIcon || isForText);

    SELECTORBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, isForIcon, isForText);

    winrt::UIElement iconParent{ nullptr }, textParent{ nullptr };
    bool hasIcon{}, hasText{};

    if (auto&& iconVisual = m_iconVisual.get())
    {
        iconParent = winrt::VisualTreeHelper::GetParent(iconVisual).as<winrt::UIElement>();
        hasIcon = Icon() != nullptr;

        if (isForIcon)
        {
            iconVisual.Visibility(hasIcon ? winrt::Visibility::Visible : winrt::Visibility::Collapsed);
        }
    }

    if (auto&& textVisual = m_textVisual.get())
    {
        textParent = winrt::VisualTreeHelper::GetParent(textVisual).as<winrt::UIElement>();
        hasText = !(Text().empty());

        if (isForText)
        {
            textVisual.Visibility(hasText ? winrt::Visibility::Visible : winrt::Visibility::Collapsed);
        }
    }

    if (iconParent && iconParent == textParent)
    {
        // When there is no icon and no text, and the PART_IconVisual / PART_TextVisual have a common parent (an unnamed
        // StackPanel by default), that common parent is collapsed so it does not take any real estate because of its Margin.
        textParent.Visibility((hasIcon || hasText) ? winrt::Visibility::Visible : winrt::Visibility::Collapsed);
    }
}

The documentation for this class was generated from the following files:
  • SelectorBar/SelectorBarItem.h
  • SelectorBar/SelectorBarItem.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

SelectorBarItemAutomationPeer Class Reference

#include "SelectorBarItemAutomationPeer.h"

List of all members.

Public Member Functions

winrt::hstring | GetClassNameCore () override
winrt::hstring | GetLocalizedControlTypeCore () override

Detailed Description

Definition at line 10 of file SelectorBarItemAutomationPeer.h.

Member Function Documentation

winrt::hstring GetClassNameCore ( ) [override]

Definition at line 55 of file SelectorBarItemAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::SelectorBarItem>();
}

winrt::hstring GetLocalizedControlTypeCore ( ) [override]

Definition at line 50 of file SelectorBarItemAutomationPeer.cpp.

{
    return ResourceAccessor::GetLocalizedStringResource(SR_SelectorBarItemDefaultControlName);
}

The documentation for this class was generated from the following files:
  • SelectorBar/SelectorBarItemAutomationPeer.h
  • SelectorBar/SelectorBarItemAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

SelectorBarItemProperties Class Reference

#include "SelectorBarItem.properties.h"

Inherited by SelectorBarItem.

List of all members.

Public Member Functions

SelectorBarItemProperties ()
void | Icon (winrt::IconElement const &value)
winrt::IconElement | Icon ()
void | Text (winrt::hstring const &value)
winrt::hstring | Text ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconProperty ()
static void | OnIconPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTextPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TextProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconProperty
static GlobalDependencyProperty | s_TextProperty

Detailed Description

Definition at line 7 of file SelectorBarItem.properties.h.

Constructor & Destructor Documentation

SelectorBarItemProperties ( )

Definition at line 19 of file SelectorBarItem.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 51 of file SelectorBarItem.properties.cpp.

{
    s_IconProperty = nullptr;
    s_TextProperty = nullptr;
    ItemContainer::ClearProperties();
}

void EnsureProperties ( ) [static]

Definition at line 24 of file SelectorBarItem.properties.cpp.

{
    ItemContainer::EnsureProperties();
    if (!s_IconProperty)
    {
        s_IconProperty =
            InitializeDependencyProperty(
                L"Icon",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::SelectorBarItem>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIconPropertyChanged));
    }
    if (!s_TextProperty)
    {
        s_TextProperty =
            InitializeDependencyProperty(
                L"Text",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::SelectorBarItem>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnTextPropertyChanged));
    }
}

winrt::IconElement Icon ( )

Definition at line 82 of file SelectorBarItem.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<SelectorBarItem*>(this)->GetValue(s_IconProperty));
}

void Icon ( winrt::IconElement const & value )

Definition at line 74 of file SelectorBarItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SelectorBarItem*>(this)->SetValue(s_IconProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconProperty ( ) [inline, static]

Definition at line 18 of file SelectorBarItem.properties.h.

{ return s_IconProperty; }

void OnIconPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 58 of file SelectorBarItem.properties.cpp.

{
    auto owner = sender.as<winrt::SelectorBarItem>();
    winrt::get_self<SelectorBarItem>(owner)->OnPropertyChanged(args);
}

void OnTextPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 66 of file SelectorBarItem.properties.cpp.

{
    auto owner = sender.as<winrt::SelectorBarItem>();
    winrt::get_self<SelectorBarItem>(owner)->OnPropertyChanged(args);
}

void Text ( winrt::hstring const & value )

Definition at line 87 of file SelectorBarItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SelectorBarItem*>(this)->SetValue(s_TextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

winrt::hstring Text ( )

Definition at line 95 of file SelectorBarItem.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<SelectorBarItem*>(this)->GetValue(s_TextProperty));
}

static winrt::DependencyProperty TextProperty ( ) [inline, static]

Definition at line 19 of file SelectorBarItem.properties.h.

{ return s_TextProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconProperty [static]

Definition at line 21 of file SelectorBarItem.properties.h.

GlobalDependencyProperty s_TextProperty [static]

Definition at line 22 of file SelectorBarItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SelectorBarItem.properties.h
  • Generated/SelectorBarItem.properties.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

SelectorBarProperties Class Reference

#include "SelectorBar.properties.h"

Inherited by SelectorBar.

List of all members.

Public Member Functions

SelectorBarProperties ()
void | Items (winrt::IVector< winrt::SelectorBarItem > const &value)
winrt::IVector
< winrt::SelectorBarItem > 		Items ()
winrt::SelectorBarItem | SelectedItem ()
void | SelectedItem (winrt::SelectorBarItem const &value)
winrt::event_token | SelectionChanged (winrt::TypedEventHandler< winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs > const &value)
void | SelectionChanged (winrt::event_token const &token)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ItemsProperty ()
static void | OnItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedItemPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SelectedItemProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::SelectorBar,
winrt::SelectorBarSelectionChangedEventArgs > > 		m_selectionChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ItemsProperty
static GlobalDependencyProperty | s_SelectedItemProperty

Detailed Description

Definition at line 7 of file SelectorBar.properties.h.

Constructor & Destructor Documentation

SelectorBarProperties ( )

Definition at line 19 of file SelectorBar.properties.cpp.

    : m_selectionChangedEventSource{static_cast<SelectorBar*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::IVector<winrt::SelectorBarItem> Items ( )
void Items ( winrt::IVector< winrt::SelectorBarItem > const & value )
static winrt::DependencyProperty ItemsProperty ( ) [inline, static]

Definition at line 18 of file SelectorBar.properties.h.

{ return s_ItemsProperty; }

static void OnItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedItemPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::SelectorBarItem SelectedItem ( )
void SelectedItem ( winrt::SelectorBarItem const & value )
static winrt::DependencyProperty SelectedItemProperty ( ) [inline, static]

Definition at line 19 of file SelectorBar.properties.h.

{ return s_SelectedItemProperty; }

winrt::event_token SelectionChanged ( winrt::TypedEventHandler< winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs > const & value )
void SelectionChanged ( winrt::event_token const & token )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs> > m_selectionChangedEventSource

Definition at line 27 of file SelectorBar.properties.h.

GlobalDependencyProperty s_ItemsProperty [static]

Definition at line 21 of file SelectorBar.properties.h.

GlobalDependencyProperty s_SelectedItemProperty [static]

Definition at line 22 of file SelectorBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SelectorBar.properties.h
  • Generated/SelectorBar.properties.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarSelectionChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarSelectionChangedEventArgs Class Reference

#include "SelectorBarSelectionChangedEventArgs.h"

Detailed Description

Definition at line 8 of file SelectorBarSelectionChangedEventArgs.h.

The documentation for this class was generated from the following file:
  • SelectorBar/SelectorBarSelectionChangedEventArgs.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

SelectorBarTestHooks Class Reference

#include "SelectorBarTestHooks.h"

List of all members.

Static Public Member Functions

static winrt::ItemsView GetItemsViewPart (const winrt::SelectorBar &selectorBar)

Detailed Description

Definition at line 9 of file SelectorBarTestHooks.h.

Member Function Documentation

winrt::ItemsView GetItemsViewPart ( const winrt::SelectorBar & selectorBar ) [static]

Definition at line 8 of file SelectorBarTestHooks.cpp.

{
    if (selectorBar)
    {
        return winrt::get_self<SelectorBar>(selectorBar)->GetItemsViewPart();
    }

    return nullptr;
}

The documentation for this class was generated from the following files:
  • SelectorBar/SelectorBarTestHooks.h
  • SelectorBar/SelectorBarTestHooks.cpp
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

SelectorBarTrace Class Reference

#include "SelectorBarTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file SelectorBarTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file SelectorBarTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "SelectorBarInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_SELECTORBAR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"SelectorBar") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 152 of file SelectorBarTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "SelectorBarPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_SELECTORBAR),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file SelectorBarTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "SelectorBarVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_SELECTORBAR),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"SelectorBar") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file SelectorBarTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file SelectorBarTrace.h.

The documentation for this class was generated from the following file:
  • SelectorBar/SelectorBarTrace.h
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

SelectorBase Class Reference

#include "SelectorBase.h"

Inherited by ExtendedSelector, MultipleSelector, NullSelector, and SingleSelector.

List of all members.

Public Member Functions

SelectorBase ()
~SelectorBase ()
virtual void | Clear ()
void | DeselectWithAnchorPreservation (int index)
virtual void | OnFocusedAction (winrt::IndexPath const &index, bool ctrl, bool shift)
virtual void | OnInteractedAction (winrt::IndexPath const &index, bool ctrl, bool shift)
virtual void | SelectAll ()
void | SetSelectionModel (winrt::SelectionModel const &selectionModel)

Protected Member Functions

virtual bool | CanSelect (winrt::IndexPath const &index)
winrt::SelectionModel | GetSelectionModel ()
bool | IsSelected (winrt::IndexPath const &index)

Detailed Description

Definition at line 8 of file SelectorBase.h.

Constructor & Destructor Documentation

SelectorBase ( )

Definition at line 8 of file SelectorBase.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~SelectorBase ( )

Definition at line 13 of file SelectorBase.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

bool CanSelect ( winrt::IndexPath const & index ) [protected, virtual]

Definition at line 63 of file SelectorBase.cpp.

{
    return m_selectionModel != nullptr;
}

void Clear ( ) [virtual]

Definition at line 78 of file SelectorBase.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (m_selectionModel != nullptr)
    {
        m_selectionModel.ClearSelection();
    }
}

void DeselectWithAnchorPreservation ( int index )

Definition at line 25 of file SelectorBase.cpp.

{
    MUX_ASSERT(index != -1);

    if (m_selectionModel != nullptr)
    {
        auto const& anchorIndexPath = m_selectionModel.AnchorIndex();

        MUX_ASSERT(anchorIndexPath == nullptr || anchorIndexPath.GetSize() == 1);

        const int anchorIndex = anchorIndexPath == nullptr ? -1 : anchorIndexPath.GetAt(0);

        m_selectionModel.Deselect(index);

        if (anchorIndex != -1)
        {
            m_selectionModel.SetAnchorIndex(anchorIndex);
        }
    }
}

winrt::SelectionModel GetSelectionModel ( ) [inline, protected]

Definition at line 23 of file SelectorBase.h.

    {
        return m_selectionModel;
    }

bool IsSelected ( winrt::IndexPath const & index ) [protected]

Definition at line 46 of file SelectorBase.cpp.

{
    bool isSelected = false;

    if (m_selectionModel != nullptr)
    {
        winrt::IReference<bool> isSelectedNullable = m_selectionModel.IsSelectedAt(index);

        if (isSelectedNullable != nullptr)
        {
            isSelected = isSelectedNullable.Value();
        }
    }

    return isSelected;
}

virtual void OnFocusedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [inline, virtual]

Reimplemented in ExtendedSelector, MultipleSelector, and SingleSelector.

Definition at line 20 of file SelectorBase.h.

{ };

virtual void OnInteractedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [inline, virtual]

Reimplemented in ExtendedSelector, MultipleSelector, and SingleSelector.

Definition at line 19 of file SelectorBase.h.

{ };

void SelectAll ( ) [virtual]

Definition at line 68 of file SelectorBase.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (m_selectionModel != nullptr)
    {
        m_selectionModel.SelectAll();
    }
}

void SetSelectionModel ( winrt::SelectionModel const & selectionModel )

Definition at line 18 of file SelectorBase.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, selectionModel);

    m_selectionModel = selectionModel;
}

The documentation for this class was generated from the following files:
  • ItemsView/SelectorBase.h
  • ItemsView/SelectorBase.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectTemplateEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

SelectTemplateEventArgs Class Reference

#include "SelectTemplateEventArgs.h"

Inherits ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

winrt::IInspectable | DataContext ()
void | DataContext (winrt::IInspectable const &value)
winrt::UIElement | Owner ()
void | Owner (const winrt::UIElement &value)
void | TemplateKey (winrt::hstring const &value)
winrt::hstring | TemplateKey ()

Detailed Description

Definition at line 8 of file SelectTemplateEventArgs.h.

Member Function Documentation

winrt::IInspectable DataContext ( )
void DataContext ( winrt::IInspectable const & value )
winrt::UIElement Owner ( )
void Owner ( const winrt::UIElement & value )
void TemplateKey ( winrt::hstring const & value )
winrt::hstring TemplateKey ( )
The documentation for this class was generated from the following file:
  • Repeater/SelectTemplateEventArgs.h
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SharedHelpers Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Member Functions | Static Private Attributes

SharedHelpers Class Reference

#include "SharedHelpers.h"

List of all members.

Static Public Member Functions

static winrt::Rect | ConvertDipsToPhysical (winrt::UIElement const &xamlRootReference, const winrt::Rect &dipsRect)
template<class ElementType >
static void | CopyVector (winrt::IObservableVector< ElementType > const &source, winrt::IObservableVector< ElementType > const &destination)
static
winrt::InMemoryRandomAccessStream 		CreateStreamFromBytes (const winrt::array_view< const byte > &bytes)
static bool | DoesRectContainPoint (const winrt::RectInt32 &rect, const winrt::PointInt32 &point)
static bool | DoesRectContainPoint (const winrt::Rect &rect, const winrt::Point &point)
static bool | DoRectsIntersect (const winrt::Rect &rect1, const winrt::Rect &rect2)
template<typename IndexType , typename ElementType >
static void | EraseIfExists (std::map< IndexType, ElementType > &map, IndexType const &index)
static winrt::IInspectable | FindInApplicationResources (const std::wstring_view &resource, const winrt::IInspectable &defaultValue=nullptr)
static winrt::FrameworkElement | FindInVisualTree (winrt::FrameworkElement const &parent, std::function< bool(winrt::FrameworkElement element)> const &isMatch)
static winrt::FrameworkElement | FindInVisualTreeByName (winrt::FrameworkElement const &parent, std::wstring_view const &name)
template<typename ElementType >
static ElementType | FindInVisualTreeByType (winrt::FrameworkElement const &parent)
static winrt::IInspectable | FindResource (const std::wstring_view &resource, const winrt::ResourceDictionary &resources, const winrt::IInspectable &defaultValue=nullptr)
template<class ElementType >
static void | ForwardVectorChange (winrt::IObservableVector< ElementType > const &source, winrt::IObservableVector< ElementType > const &destination, winrt::IVectorChangedEventArgs const &args)
template<typename AncestorType >
static AncestorType | GetAncestorOfType (winrt::DependencyObject const &firstGuess)
static winrt::ITextSelection | GetRichTextSelection (winrt::RichEditBox const &richEditBox)
static winrt::VirtualKey | GetVirtualKeyFromChar (WCHAR c)
static bool | IsAncestor (const winrt::DependencyObject &child, const winrt::DependencyObject &parent, bool checkVisibility=false)
static bool | IsAnimationsEnabled ()
static bool | IsApplicationViewGetDisplayRegionsAvailable ()
static bool | IsBringIntoViewOptionsVerticalAlignmentRatioAvailable ()
static bool | IsCoreWindowActivationModeAvailable ()
static bool | IsFocusableElement (winrt::UIElement const &element)
static bool | IsInDesignMode ()
static bool | IsInDesignModeV1 ()
static bool | IsInDesignModeV2 ()
static bool | IsInFrameworkPackage (winrt::hstring &frameworkPackageInstallLocation)
static bool | IsInFrameworkPackage ()
static bool | IsMouseModeEnabled ()
static bool | IsOnXbox ()
static bool | IsTrue (winrt::IReference< bool > const &nullableBool)
static void | QueueCallbackForCompositionRendering (std::function< void()> callback)
template<typename ParameterType >
static void | RaiseAutomationPropertyChangedEvent (winrt::UIElement const &element, ParameterType oldValue, ParameterType newValue)
static winrt::float4 | RgbaColor (winrt::Color const &color)
static void | ScheduleActionAfterWait (std::function< void()> const &action, unsigned int millisecondWait)
static void | SetBinding (winrt::IInspectable const &source, std::wstring_view const &pathString, winrt::DependencyObject const &target, winrt::DependencyProperty const &targetProperty, winrt::IValueConverter const &converter=nullptr, winrt::BindingMode mode=winrt::BindingMode::OneWay)
static void | SetBinding (std::wstring_view const &pathString, winrt::DependencyObject const &target, winrt::DependencyProperty const &targetProperty)
template<typename T >
static T | SyncWait (winrt::IAsyncOperation< T > asyncOperation)
static void | SyncWait (const winrt::IAsyncAction &asyncAction)
static winrt::CoreApplicationView | TryGetCurrentCoreApplicationView ()
static winrt::hstring | TryGetStringRepresentationFromObject (winrt::IInspectable obj)

Private Member Functions

SharedHelpers ()

Static Private Attributes

static bool | s_isMouseModeEnabled
static bool | s_isMouseModeEnabledInitialized
static bool | s_isOnXbox
static bool | s_isOnXboxInitialized

Detailed Description

Definition at line 9 of file SharedHelpers.h.

Constructor & Destructor Documentation

SharedHelpers ( ) [private]

Member Function Documentation

winrt::Rect ConvertDipsToPhysical | ( | winrt::UIElement const & | xamlRootReference,
 |  | const winrt::Rect & | dipsRect |
 | ) |  |  | [static]

Definition at line 170 of file SharedHelpers.cpp.

{
    try
    {
        const auto scaleFactor = static_cast<float>(xamlRootReference.XamlRoot().RasterizationScale());
        return winrt::Rect
        {
            dipsRect.X * scaleFactor,
            dipsRect.Y * scaleFactor,
            dipsRect.Width * scaleFactor,
            dipsRect.Height * scaleFactor
        };
    }
    catch (winrt::hresult_error)
    {
        // Calling GetForCurrentView on threads without a CoreWindow throws an error. This comes up in places like LogonUI.
        // In this circumstance, we'll just always expand down, since we can't get bounds information.
    }

    return dipsRect;
}

static void CopyVector | ( | winrt::IObservableVector< ElementType > const & | source,
 |  | winrt::IObservableVector< ElementType > const & | destination |
 | ) |  |  | [inline, static]

Definition at line 196 of file SharedHelpers.h.

    {
        destination.Clear();

        for (auto const& element : source)
        {
            destination.Append(element);
        }
    }

winrt::InMemoryRandomAccessStream CreateStreamFromBytes ( const winrt::array_view< const byte > & bytes ) [static]

Definition at line 235 of file SharedHelpers.cpp.

{
    winrt::InMemoryRandomAccessStream stream;
    winrt::DataWriter writer(stream);

    writer.WriteBytes(winrt::array_view<const byte>(bytes));
    SyncWait(writer.StoreAsync());
    SyncWait(writer.FlushAsync());
    auto detachedStream = writer.DetachStream();
    writer.Close();

    stream.Seek(0);

    return stream;
}

bool DoesRectContainPoint | ( | const winrt::RectInt32 & | rect,
 |  | const winrt::PointInt32 & | point |
 | ) |  |  | [static]

Definition at line 282 of file SharedHelpers.cpp.

{
    const auto doesContain =
        rect.X <= point.X &&
        rect.X + rect.Width >= point.X &&
        rect.Y <= point.Y &&
        rect.Y + rect.Height >= point.Y;
    return doesContain;
}

bool DoesRectContainPoint | ( | const winrt::Rect & | rect,
 |  | const winrt::Point & | point |
 | ) |  |  | [static]

Definition at line 275 of file SharedHelpers.cpp.

{
    return winrt::RectHelper::Contains(rect, point);
}

bool DoRectsIntersect | ( | const winrt::Rect & | rect1,
 |  | const winrt::Rect & | rect2 |
 | ) |  |  | [static]

Definition at line 296 of file SharedHelpers.cpp.

{
    const auto doIntersect =
        !(rect1.Width <= 0 || rect1.Height <= 0 || rect2.Width <= 0 || rect2.Height <= 0) &&
        (rect2.X <= rect1.X + rect1.Width) &&
        (rect2.X + rect2.Width >= rect1.X) &&
        (rect2.Y <= rect1.Y + rect1.Height) &&
        (rect2.Y + rect2.Height >= rect1.Y);
    return doIntersect;
}

static void EraseIfExists | ( | std::map< IndexType, ElementType > & | map,
 |  | IndexType const & | index |
 | ) |  |  | [inline, static]

Definition at line 240 of file SharedHelpers.h.

    {
        const auto it = map.find(index);
        if (it != map.end())
        {
            map.erase(it);
        }
    }

winrt::IInspectable FindInApplicationResources | ( | const std::wstring_view & | resource,
 |  | const winrt::IInspectable & | defaultValue = nullptr |
 | ) |  |  | [static]

Definition at line 315 of file SharedHelpers.cpp.

{
    return SharedHelpers::FindResource(resource, winrt::Application::Current().Resources(), defaultValue);
}

static winrt::FrameworkElement FindInVisualTree | ( | winrt::FrameworkElement const & | parent,
 |  | std::function< bool(winrt::FrameworkElement element)> const & | isMatch |
 | ) |  |  | [inline, static]

Definition at line 118 of file SharedHelpers.h.

    {
        int numChildren = winrt::VisualTreeHelper::GetChildrenCount(parent);

        winrt::FrameworkElement foundElement = parent;
        if (isMatch(foundElement))
        {
            return foundElement;
        }

        for (int i = 0; i < numChildren; i++)
        {
            if (auto dp = winrt::VisualTreeHelper::GetChild(parent, i))
            {
                if (auto fe = dp.as<winrt::FrameworkElement>())
                {
                    foundElement = FindInVisualTree(fe, isMatch);
                    if (foundElement)
                    {
                        return foundElement;
                    }
                }
            }
        }

        return nullptr;
    }

static winrt::FrameworkElement FindInVisualTreeByName | ( | winrt::FrameworkElement const & | parent,
 |  | std::wstring_view const & | name |
 | ) |  |  | [inline, static]

Definition at line 98 of file SharedHelpers.h.

    {
        return FindInVisualTree(parent,
            [name](const winrt::FrameworkElement& element)
            {
                return (element.Name() == name);
            });
    }

static ElementType FindInVisualTreeByType ( winrt::FrameworkElement const & parent ) [inline, static]

Definition at line 108 of file SharedHelpers.h.

    {
        auto element = FindInVisualTree(parent,
            [](const winrt::FrameworkElement& element)
            {
                return (element.try_as<ElementType>() != nullptr);
            });
        return element.as<ElementType>();
    }

winrt::IInspectable FindResource | ( | const std::wstring_view & | resource,
 |  | const winrt::ResourceDictionary & | resources,
 |  | const winrt::IInspectable & | defaultValue = nullptr |
 | ) |  |  | [static]

Definition at line 309 of file SharedHelpers.cpp.

{
    auto boxedResource = box_value(resource);
    return resources.HasKey(boxedResource) ? resources.Lookup(boxedResource) : defaultValue;
}

static void ForwardVectorChange | ( | winrt::IObservableVector< ElementType > const & | source,
 |  | winrt::IObservableVector< ElementType > const & | destination,
 |  | winrt::IVectorChangedEventArgs const & | args |
 | ) |  |  | [inline, static]

Definition at line 209 of file SharedHelpers.h.

    {
        const uint32_t index = args.Index();

        switch (args.CollectionChange())
        {
        case winrt::CollectionChange::ItemChanged:
            destination.SetAt(index, source.GetAt(index));
            break;
        case winrt::CollectionChange::ItemInserted:
            destination.InsertAt(index, source.GetAt(index));
            break;
        case winrt::CollectionChange::ItemRemoved:
            destination.RemoveAt(index);
            break;
        case winrt::CollectionChange::Reset:
            CopyVector(source, destination);
            break;
        default:
            MUX_ASSERT(false);
        }
    }

static AncestorType GetAncestorOfType ( winrt::DependencyObject const & firstGuess ) [inline, static]

Definition at line 156 of file SharedHelpers.h.

    {
        auto obj = firstGuess;
        AncestorType matchedAncestor{ nullptr };
        while (obj && !matchedAncestor)
        {
            matchedAncestor = obj.try_as<AncestorType>();
            obj = winrt::VisualTreeHelper::GetParent(obj);
        }

        if (matchedAncestor)
        {
            return matchedAncestor.as<AncestorType>();
        }
        else
        {
            return nullptr;
        }
    }

winrt::ITextSelection GetRichTextSelection ( winrt::RichEditBox const & richEditBox ) [static]

Definition at line 544 of file SharedHelpers.cpp.

{
    return richEditBox.Document() ? richEditBox.Document().Selection() : nullptr;
}

winrt::VirtualKey GetVirtualKeyFromChar ( WCHAR c ) [static]

Definition at line 549 of file SharedHelpers.cpp.

{
    switch (c)
    {
    case L'A':
    case L'a':
        return winrt::VirtualKey::A;
    case L'B':
    case L'b':
        return winrt::VirtualKey::B;
    case L'C':
    case L'c':
        return winrt::VirtualKey::C;
    case L'D':
    case L'd':
        return winrt::VirtualKey::D;
    case L'E':
    case L'e':
        return winrt::VirtualKey::E;
    case L'F':
    case L'f':
        return winrt::VirtualKey::F;
    case L'G':
    case L'g':
        return winrt::VirtualKey::G;
    case L'H':
    case L'h':
        return winrt::VirtualKey::H;
    case L'I':
    case L'i':
        return winrt::VirtualKey::I;
    case L'J':
    case L'j':
        return winrt::VirtualKey::J;
    case L'K':
    case L'k':
        return winrt::VirtualKey::K;
    case L'L':
    case L'l':
        return winrt::VirtualKey::L;
    case L'M':
    case L'm':
        return winrt::VirtualKey::M;
    case L'N':
    case L'n':
        return winrt::VirtualKey::N;
    case L'O':
    case L'o':
        return winrt::VirtualKey::O;
    case L'P':
    case L'p':
        return winrt::VirtualKey::P;
    case L'Q':
    case L'q':
        return winrt::VirtualKey::Q;
    case L'R':
    case L'r':
        return winrt::VirtualKey::R;
    case L'S':
    case L's':
        return winrt::VirtualKey::S;
    case L'T':
    case L't':
        return winrt::VirtualKey::T;
    case L'U':
    case L'u':
        return winrt::VirtualKey::U;
    case L'V':
    case L'v':
        return winrt::VirtualKey::V;
    case L'W':
    case L'w':
        return winrt::VirtualKey::W;
    case L'X':
    case L'x':
        return winrt::VirtualKey::X;
    case L'Y':
    case L'y':
        return winrt::VirtualKey::Y;
    case L'Z':
    case L'z':
        return winrt::VirtualKey::Z;
    default:
        return winrt::VirtualKey::None;
    }
}

bool IsAncestor | ( | const winrt::DependencyObject & | child,
 |  | const winrt::DependencyObject & | parent,
 |  | bool | checkVisibility = false |
 | ) |  |  | [static]

Definition at line 322 of file SharedHelpers.cpp.

{
    if (!child || !parent || child == parent)
    {
        return false;
    }

    if (checkVisibility)
    {
        winrt::IUIElement parentAsUIE = parent.as<winrt::IUIElement>();

        if (parentAsUIE && parentAsUIE.Visibility() == winrt::Visibility::Collapsed)
        {
            return false;
        }

        winrt::IUIElement childAsUIE = child.as<winrt::IUIElement>();

        if (childAsUIE && childAsUIE.Visibility() == winrt::Visibility::Collapsed)
        {
            return false;
        }
    }

    winrt::DependencyObject parentTemp = winrt::VisualTreeHelper::GetParent(child);
    while (parentTemp)
    {
        if (checkVisibility)
        {
            winrt::IUIElement parentTempAsUIE = parentTemp.as<winrt::IUIElement>();

            if (parentTempAsUIE && parentTempAsUIE.Visibility() == winrt::Visibility::Collapsed)
            {
                return false;
            }
        }

        if (parentTemp == parent)
        {
            return true;
        }

        parentTemp = winrt::VisualTreeHelper::GetParent(parentTemp);
    }

    return false;
}

bool IsAnimationsEnabled ( ) [static]

Definition at line 29 of file SharedHelpers.cpp.

{
    winrt::UISettings uiSettings = winrt::UISettings();
    return uiSettings.AnimationsEnabled();
}

bool IsApplicationViewGetDisplayRegionsAvailable ( ) [static]

Definition at line 62 of file SharedHelpers.cpp.

{
    static bool s_isApplicationViewGetDisplayRegionsAvailable =
        winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 8) ||
        winrt::ApiInformation::IsMethodPresent(L"Windows.UI.ViewManagement.ApplicationView", L"GetDisplayRegions");
    return s_isApplicationViewGetDisplayRegionsAvailable;
}

static bool IsBringIntoViewOptionsVerticalAlignmentRatioAvailable ( ) [static]
bool IsCoreWindowActivationModeAvailable ( ) [static]

Definition at line 54 of file SharedHelpers.cpp.

{
    // In RS3 we got CoreWindow.ActivationMode API which can be queried for window activation state,
    // and particularly in a Component UI host appto check if the compoenent is active (while host isn't).
    static bool s_isAvailable = winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 5);
    return s_isAvailable;
}

bool IsFocusableElement ( winrt::UIElement const & element ) [static]

Definition at line 373 of file SharedHelpers.cpp.

{
    if (element.Visibility() == winrt::Visibility::Collapsed)
    {
        return false;
    }

    auto const& control = element.try_as<winrt::Control>();

    return control && (control.IsEnabled() || control.AllowFocusWhenDisabled()) && control.IsTabStop();
}

bool IsInDesignMode ( ) [static]

Definition at line 35 of file SharedHelpers.cpp.

{
    // Design mode V2 can do many things that V1 could not do. Codepaths that were checking for design mode should generally be
    // let through if V2 is enabled.
    return IsInDesignModeV1();
}

bool IsInDesignModeV1 ( ) [static]

Definition at line 42 of file SharedHelpers.cpp.

{
    static bool s_isInDesignModeV1 = winrt::Windows::ApplicationModel::DesignMode::DesignModeEnabled() && !IsInDesignModeV2();
    return s_isInDesignModeV1;
}

bool IsInDesignModeV2 ( ) [static]

Definition at line 48 of file SharedHelpers.cpp.

{
    static bool s_isInDesignModeV2 = winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 5) && winrt::Windows::ApplicationModel::DesignMode::DesignMode2Enabled();
    return s_isInDesignModeV2;
}

bool IsInFrameworkPackage ( winrt::hstring & frameworkPackageInstallLocation ) [static]

Definition at line 160 of file SharedHelpers.cpp.

{
    static winrt::hstring s_frameworkInstallLocation;
    static bool isInFrameworkPackage = IsInFrameworkPackageImpl(s_frameworkInstallLocation);
    frameworkPackageInstallLocation = s_frameworkInstallLocation;

    return isInFrameworkPackage;
}

bool IsInFrameworkPackage ( ) [static]

Definition at line 153 of file SharedHelpers.cpp.

{
    //unused l-value
    static winrt::hstring s;
    return IsInFrameworkPackageImpl(s);
}

bool IsMouseModeEnabled ( ) [static]

Definition at line 205 of file SharedHelpers.cpp.

{
    if (!s_isMouseModeEnabledInitialized)
    {
        s_isMouseModeEnabled = winrt::Application::Current().RequiresPointerMode() == winrt::ApplicationRequiresPointerMode::Auto;
        s_isMouseModeEnabledInitialized = true;
    }
    return s_isMouseModeEnabled;
}

bool IsOnXbox ( ) [static]

Definition at line 192 of file SharedHelpers.cpp.

{
    if (!s_isOnXboxInitialized)
    {
        auto deviceFamily = winrt::AnalyticsInfo::VersionInfo().DeviceFamily();
        s_isOnXbox = (deviceFamily == L"Windows.Xbox")
            || (deviceFamily == L"Windows.XBoxSRA")
            || (deviceFamily == L"Windows.XBoxERA");
        s_isOnXboxInitialized = true;
    }
    return s_isOnXbox;
}

static bool IsTrue ( winrt::IReference< bool > const & nullableBool ) [inline, static]

Definition at line 146 of file SharedHelpers.h.

    {
        if (nullableBool)
        {
            return nullableBool.GetBoolean();
        }
        return false;
    }

void QueueCallbackForCompositionRendering ( std::function< void()> callback ) [static]

Definition at line 251 of file SharedHelpers.cpp.

{
    try
    {
        auto renderingEventToken = std::make_shared<winrt::event_token>();
        *renderingEventToken = winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering([renderingEventToken, callback](auto&, auto&) {

            // Detach event or Rendering will keep calling us back.
            winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering(*renderingEventToken);

            callback();
        });
    }
    catch (const winrt::hresult_error &e)
    {
        // DirectUI::CompositionTarget::add_Rendering can fail with RPC_E_WRONG_THREAD if called while the Xaml Core is being shutdown,
        // and there is evidence from Watson that such calls are made in real apps (see Bug 13554197).
        // Since the core is being shutdown, we no longer care about whatever work we wanted to defer to CT.Rendering, so ignore this error.
        if (e.to_abi() != RPC_E_WRONG_THREAD) { throw; }
    }
}

static void RaiseAutomationPropertyChangedEvent | ( | winrt::UIElement const & | element,
 |  | ParameterType | oldValue,
 |  | ParameterType | newValue |
 | ) |  |  | [inline, static]

Definition at line 250 of file SharedHelpers.h.

    {
        if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(element))
        {
            peer.RaisePropertyChangedEvent(
                winrt::ExpandCollapsePatternIdentifiers::ExpandCollapseStateProperty(),
                winrt::box_value(oldValue),
                winrt::box_value(newValue));
        }
    }

winrt::float4 RgbaColor ( winrt::Color const & color ) [static]

Definition at line 659 of file SharedHelpers.cpp.

{
    return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
}

void ScheduleActionAfterWait | ( | std::function< void()> const & | action,
 |  | unsigned int | millisecondWait |
 | ) |  |  | [static]

Definition at line 215 of file SharedHelpers.cpp.

{
    if(auto dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread())
    {
        // The callback that is given to CreateTimer is called off of the UI thread.
        // In order to make this useful by making it so we can interact with XAML objects,
        // we'll use the dispatcher to first post our work to the UI thread before executing it.
        auto timer = winrt::ThreadPoolTimer::CreateTimer(winrt::TimerElapsedHandler(
            [action, dispatcherQueue](auto const&)
            {
                dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler(action));
            }),
            std::chrono::milliseconds{ millisecondWait });
    }
}

void SetBinding | ( | winrt::IInspectable const & | source,
 |  | std::wstring_view const & | pathString,
 |  | winrt::DependencyObject const & | target,
 |  | winrt::DependencyProperty const & | targetProperty,
 |  | winrt::IValueConverter const & | converter = nullptr,
 |  | winrt::BindingMode | mode = winrt::BindingMode::OneWay |
 | ) |  |  | [static]

Definition at line 522 of file SharedHelpers.cpp.

{
    winrt::Binding binding;
    binding.Source(source);

    binding.Path(winrt::PropertyPath(pathString));
    binding.Mode(mode);

    if (converter)
    {
        binding.Converter(converter);
    }

    winrt::BindingOperations::SetBinding(target, targetProperty, binding);
}

void SetBinding | ( | std::wstring_view const & | pathString,
 |  | winrt::DependencyObject const & | target,
 |  | winrt::DependencyProperty const & | targetProperty |
 | ) |  |  | [static]

Definition at line 500 of file SharedHelpers.cpp.

{
    winrt::Binding binding;
    winrt::RelativeSource relativeSource;
    relativeSource.Mode(winrt::RelativeSourceMode::TemplatedParent);
    binding.RelativeSource(relativeSource);

    binding.Path(winrt::PropertyPath(pathString));

    winrt::BindingOperations::SetBinding(target, targetProperty, binding);
}

static T SyncWait ( winrt::IAsyncOperation< T > asyncOperation ) [inline, static]

Definition at line 67 of file SharedHelpers.h.

    {
        T returnValue{};
        MUXControls::Common::Handle synchronizationHandle(::CreateEvent(nullptr, FALSE, FALSE, nullptr));

        asyncOperation.Completed(winrt::AsyncOperationCompletedHandler<T>(
            [&synchronizationHandle, &returnValue](winrt::IAsyncOperation<T> asyncOperation, winrt::AsyncStatus asyncStatus)
        {
            if (asyncStatus == winrt::AsyncStatus::Completed)
            {
                SetEvent(synchronizationHandle);
                returnValue = asyncOperation.GetResults();
            }
            else if (asyncStatus == winrt::AsyncStatus::Error)
            {
                throw winrt::hresult_error(E_FAIL, L"Async operation failed!");
            }
        }));

        WaitForSingleObject(synchronizationHandle, INFINITE);
        return returnValue;
    }

static void SyncWait ( const winrt::IAsyncAction & asyncAction ) [inline, static]

Definition at line 46 of file SharedHelpers.h.

    {
        MUXControls::Common::Handle synchronizationHandle(::CreateEvent(nullptr, FALSE, FALSE, nullptr));

        asyncAction.Completed(winrt::AsyncActionCompletedHandler(
            [&synchronizationHandle](winrt::IAsyncAction asyncAction, winrt::AsyncStatus asyncStatus)
        {
            if (asyncStatus == winrt::AsyncStatus::Completed)
            {
                SetEvent(synchronizationHandle);
            }
            else if (asyncStatus == winrt::AsyncStatus::Error)
            {
                throw winrt::hresult_error(E_FAIL, L"Async operation failed!");
            }
        }));

        WaitForSingleObject(synchronizationHandle, INFINITE);
    }

winrt::CoreApplicationView TryGetCurrentCoreApplicationView ( ) [static]

Definition at line 686 of file SharedHelpers.cpp.

{
    winrt::CoreApplicationView view{ nullptr };

    // We could call winrt::CoreApplication::GetCurrentView() here, but that can throw in some cases. Even if we catch, it will still
    // generate exception noise in the debugger.
    // Check if we have a CoreWindow to avoid throwing and catching an exception which can be annoying during debugging.
    if (winrt::CoreWindow::GetForCurrentThread())
    {
        auto coreApplication = winrt::get_activation_factory<winrt::CoreApplication, ABI::Windows::ApplicationModel::Core::ICoreApplication>();
        auto ignorehr = coreApplication->GetCurrentView(winrt::put_abi(view));
    }

    return view;
}

winrt::hstring TryGetStringRepresentationFromObject ( winrt::IInspectable obj ) [static]

Definition at line 639 of file SharedHelpers.cpp.

{
    winrt::hstring returnHString;

    if(obj)
    {
        if (auto stringable = obj.try_as<winrt::IStringable>())
        {
            returnHString = stringable.ToString();
        }
        if(returnHString.empty())
        {
            returnHString = winrt::unbox_value_or<winrt::hstring>(obj, returnHString);
        }
    }

    return returnHString;
}

Member Data Documentation

bool s_isMouseModeEnabled [static, private]

Definition at line 271 of file SharedHelpers.h.

bool s_isMouseModeEnabledInitialized [static, private]

Definition at line 270 of file SharedHelpers.h.

bool s_isOnXbox [static, private]

Definition at line 269 of file SharedHelpers.h.

bool s_isOnXboxInitialized [static, private]

Definition at line 268 of file SharedHelpers.h.

The documentation for this class was generated from the following files:
  • inc/SharedHelpers.h
  • dll/SharedHelpers.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SimpleXamlStartStopEvent_RAII Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes

SimpleXamlStartStopEvent_RAII Struct Reference

#include "MuxcTraceLogging.h"

Inherited by WebView2_TryCompleteInitialization_RAII.

List of all members.

Public Member Functions

SimpleXamlStartStopEvent_RAII (const SimpleXamlStartStopEvent_RAII &)
SimpleXamlStartStopEvent_RAII (SimpleXamlStartStopEvent_RAII &&)
SimpleXamlStartStopEvent_RAII & | operator= (const SimpleXamlStartStopEvent_RAII &)
SimpleXamlStartStopEvent_RAII & operator= (SimpleXamlStartStopEvent_RAII &&)

Protected Member Functions

SimpleXamlStartStopEvent_RAII (uint64_t objectPointer)

Protected Attributes

uint64_t | m_objectPointer

Detailed Description

Definition at line 230 of file MuxcTraceLogging.h.

Constructor & Destructor Documentation

SimpleXamlStartStopEvent_RAII ( const SimpleXamlStartStopEvent_RAII & )
SimpleXamlStartStopEvent_RAII ( SimpleXamlStartStopEvent_RAII && )
SimpleXamlStartStopEvent_RAII ( uint64_t objectPointer ) [inline, protected]

Definition at line 240 of file MuxcTraceLogging.h.

        : m_objectPointer(objectPointer)
    {
    }

Member Function Documentation

SimpleXamlStartStopEvent_RAII& operator= ( const SimpleXamlStartStopEvent_RAII & )
SimpleXamlStartStopEvent_RAII& operator= ( SimpleXamlStartStopEvent_RAII && )

Member Data Documentation

uint64_t m_objectPointer [protected]

Definition at line 245 of file MuxcTraceLogging.h.

The documentation for this struct was generated from the following file:
  • Telemetry/MuxcTraceLogging.h
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SingleSelector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

SingleSelector Class Reference

#include "SingleSelector.h"

Inherits SelectorBase.

List of all members.

Public Member Functions

SingleSelector ()
~SingleSelector ()
void | FollowFocus (bool followFocus)
void | OnFocusedAction (winrt::IndexPath const &index, bool ctrl, bool shift) override
void | OnInteractedAction (winrt::IndexPath const &index, bool ctrl, bool shift) override

Detailed Description

Definition at line 8 of file SingleSelector.h.

Constructor & Destructor Documentation

SingleSelector ( )

Definition at line 8 of file SingleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

~SingleSelector ( )

Definition at line 13 of file SingleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

void FollowFocus ( bool followFocus )

Definition at line 18 of file SingleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, followFocus);

    m_followFocus = followFocus;
}

void OnFocusedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [override, virtual]

Reimplemented from SelectorBase.

Definition at line 46 of file SingleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, ctrl, shift);

    auto selectionModel = GetSelectionModel();
    selectionModel.SingleSelect(true);

    if (!ctrl && m_followFocus)
    {
        selectionModel.SelectAt(index);
    }
}

void OnInteractedAction | ( | winrt::IndexPath const & | index,
 |  | bool | ctrl,
 |  | bool | shift |
 | ) |  |  | [override, virtual]

Reimplemented from SelectorBase.

Definition at line 25 of file SingleSelector.cpp.

{
    ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, ctrl, shift);

    auto selectionModel = GetSelectionModel();
    selectionModel.SingleSelect(true);

    if (!ctrl)
    {
        selectionModel.SelectAt(index);
    }
    else if (!IsSelected(index))
    {
        selectionModel.SelectAt(index);
    }
    else
    {
        selectionModel.DeselectAt(index);
    }
}

The documentation for this class was generated from the following files:
  • ItemsView/SingleSelector.h
  • ItemsView/SingleSelector.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderInteraction Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

SliderInteraction Class Reference

#include "SliderInteraction.h"

Inherits ReferenceTracker< SliderInteraction, winrt::implementation::SliderInteractionT >, and SliderInteractionProperties.

List of all members.

Public Member Functions

winrt::IVectorView
< winrt::RoutedEvent > 		GetSupportedEventsCore ()
void | LargeChange (double value)
double | LargeChange ()
double | Maximum ()
void | Maximum (double value)
void | Minimum (double value)
double | Minimum ()
void | OnKeyDown (winrt::UIElement const &sender, winrt::KeyRoutedEventArgs const &args)
void | OnPointerCanceled (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerCaptureLost (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerMoved (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerPressed (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | OnPointerReleased (winrt::UIElement const &sender, winrt::PointerRoutedEventArgs const &args)
void | Orientation (winrt::Orientation const &value)
winrt::Orientation | Orientation ()
double | Position ()
void | PropertyChanged (winrt::event_token const &token)
winrt::event_token | PropertyChanged (winrt::PropertyChangedEventHandler const &value)
void | SmallChange (double value)
double | SmallChange ()

Private Member Functions

void | ConfigureTargetElement (const winrt::UIElement &target)
void | UpdatePosition (double delta)
void | UpdateTransform ()

Detailed Description

Definition at line 9 of file SliderInteraction.h.

Member Function Documentation

void ConfigureTargetElement ( const winrt::UIElement & target ) [private]

Definition at line 232 of file SliderInteraction.cpp.

{
    if (!m_translateTransform)
    {
        winrt::TranslateTransform translateTransform;

        if (m_orientation == winrt::Orientation::Horizontal)
        {
            translateTransform.X(m_position);
            translateTransform.Y(0.0);
        }
        else
        {
            translateTransform.X(0.0);
            translateTransform.Y(m_position);
        }

        target.RenderTransform(translateTransform);

        m_translateTransform.set(translateTransform);
    }
}

winrt::IVectorView< winrt::RoutedEvent > GetSupportedEventsCore ( )

Definition at line 127 of file SliderInteraction.cpp.

{
    std::vector<winrt::RoutedEvent> supportedEvents;

    // Build the list of events that we'll respond to.
    supportedEvents.push_back(winrt::UIElement::KeyDownEvent());
    supportedEvents.push_back(winrt::UIElement::PointerMovedEvent());
    supportedEvents.push_back(winrt::UIElement::PointerPressedEvent());
    supportedEvents.push_back(winrt::UIElement::PointerReleasedEvent());
    supportedEvents.push_back(winrt::UIElement::PointerCanceledEvent());
    supportedEvents.push_back(winrt::UIElement::PointerCaptureLostEvent());

    return winrt::single_threaded_vector(std::move(supportedEvents)).GetView();
}

void LargeChange ( double value )

Definition at line 97 of file SliderInteraction.cpp.

{

    if (value < m_smallChange)
    {
        throw winrt::hresult_invalid_argument(L"LargeChange value cannot be smaller than SmallChange value.");
    }

    if (value != m_largeChange)
    {
        m_largeChange = value;
        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"LargeChange"));
    }
}

double LargeChange ( )

Definition at line 112 of file SliderInteraction.cpp.

{
    return m_largeChange;
}

double Maximum ( )

Definition at line 50 of file SliderInteraction.cpp.

{
    return m_maximum;
}

void Maximum ( double value )

Definition at line 55 of file SliderInteraction.cpp.

{

    if (value < m_minimum)
    {
        throw winrt::hresult_invalid_argument(L"Maximum cannot be smaller than Minimum.");
    }

    if (value != m_maximum)
    {
        m_maximum = value;
        UpdatePosition(std::min(m_maximum, m_position) - m_position);

        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"Maximum"));
    }
}

void Minimum ( double value )

Definition at line 33 of file SliderInteraction.cpp.

{

    if (value > m_maximum)
    {
        throw winrt::hresult_invalid_argument(L"Minimum cannot be larger than Maximum.");
    }

    if (value != m_minimum)
    {
        m_minimum = value;
        UpdatePosition(std::max(m_minimum, m_position) - m_position);

        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"Minimum"));
    }
}

double Minimum ( )

Definition at line 28 of file SliderInteraction.cpp.

{
    return m_minimum;
}

void OnKeyDown | ( | winrt::UIElement const & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args
 | ) |  |

Definition at line 142 of file SliderInteraction.cpp.

{
    const auto& target = sender;
    const auto& keyArgs = args;

    ConfigureTargetElement(target);

    switch (keyArgs.Key())
    {
    case winrt::VirtualKey::Left:
    case winrt::VirtualKey::Up:
        UpdatePosition(-m_smallChange);
        break;

    case winrt::VirtualKey::Right:
    case winrt::VirtualKey::Down:
        UpdatePosition(m_smallChange);
        break;

    case winrt::VirtualKey::PageUp:
        UpdatePosition(-m_largeChange);
        break;

    case winrt::VirtualKey::PageDown:
        UpdatePosition(m_largeChange);
        break;

    case winrt::VirtualKey::Home:
        UpdatePosition(m_minimum - m_position);
        break;

    case winrt::VirtualKey::End:
        UpdatePosition(m_maximum - m_position);
        break;
    }
}

void OnPointerCanceled | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 215 of file SliderInteraction.cpp.

{
    const auto& target = sender;
    const auto& pointerArgs = args;

    if (m_hasPointerCapture)
    {
        target.ReleasePointerCapture(pointerArgs.Pointer());
    }
}

void OnPointerCaptureLost | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 226 of file SliderInteraction.cpp.

{
    m_hasPointerCapture = false;
    m_capturePosition = winrt::Point();
}

void OnPointerMoved | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 179 of file SliderInteraction.cpp.

{
    if (m_hasPointerCapture)
    {
        const auto& target = sender;
        const auto& pointerArgs = args;
        const auto position = pointerArgs.GetCurrentPoint(target).Position();

        const winrt::Point delta(m_capturePosition.X - position.X, m_capturePosition.Y - position.Y);

        UpdatePosition(m_orientation == winrt::Orientation::Horizontal ? -delta.X : -delta.Y);
    }
}

void OnPointerPressed | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 193 of file SliderInteraction.cpp.

{
    const auto& target = sender;
    const auto& pointerArgs = args;

    ConfigureTargetElement(target);

    m_hasPointerCapture = target.CapturePointer(pointerArgs.Pointer());
    m_capturePosition = pointerArgs.GetCurrentPoint(target).Position();
}

void OnPointerReleased | ( | winrt::UIElement const & | sender,
 |  | winrt::PointerRoutedEventArgs const & | args
 | ) |  |

Definition at line 204 of file SliderInteraction.cpp.

{
    const auto& target = sender;
    const auto& pointerArgs = args;

    if (m_hasPointerCapture)
    {
        target.ReleasePointerCapture(pointerArgs.Pointer());
    }
}

void Orientation ( winrt::Orientation const & value )

Definition at line 16 of file SliderInteraction.cpp.

{
    const auto orientation = value;
    if (orientation != m_orientation)
    {
        m_orientation = orientation;
        UpdateTransform();

        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"Orientation"));
    }
}

winrt::Orientation Orientation ( )

Definition at line 11 of file SliderInteraction.cpp.

{
    return m_orientation;
}

double Position ( )

Definition at line 72 of file SliderInteraction.cpp.

{
    return m_position;
}

winrt::event_token PropertyChanged ( winrt::PropertyChangedEventHandler const & value )

Reimplemented from SliderInteractionProperties.

Definition at line 117 of file SliderInteraction.cpp.

{
    return m_propertyChangedEventSource.add(value);
}

void PropertyChanged ( winrt::event_token const & token )

Reimplemented from SliderInteractionProperties.

Definition at line 122 of file SliderInteraction.cpp.

{
    m_propertyChangedEventSource.remove(token);
}

void SmallChange ( double value )

Definition at line 77 of file SliderInteraction.cpp.

{

    if (value > m_largeChange)
    {
        throw winrt::hresult_invalid_argument(L"SmallChange value cannot be larger than LargeChange value.");
    }

    if (value != m_smallChange)
    {
        m_smallChange = value;
        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"SmallChange"));
    }
}

double SmallChange ( )

Definition at line 92 of file SliderInteraction.cpp.

{
    return m_smallChange;
}

void UpdatePosition ( double delta ) [private]

Definition at line 255 of file SliderInteraction.cpp.

{
    auto position = std::clamp(m_position + delta, m_minimum, m_maximum);
    if (position != m_position)
    {
        m_position = position;

        UpdateTransform();

        m_propertyChangedEventSource(*this, winrt::PropertyChangedEventArgs(L"Position"));
    }
}

void UpdateTransform ( ) [private]

Definition at line 268 of file SliderInteraction.cpp.

{
    if (m_translateTransform)
    {
        if (m_orientation == winrt::Orientation::Horizontal)
        {
            m_translateTransform.get().X(m_position);
            m_translateTransform.get().Y(0.0);
        }
        else
        {
            m_translateTransform.get().X(0.0);
            m_translateTransform.get().Y(m_position);
        }
    }
}

The documentation for this class was generated from the following files:
  • Interactions/SliderInteraction/SliderInteraction.h
  • Interactions/SliderInteraction/SliderInteraction.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderInteractionProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes

SliderInteractionProperties Class Reference

#include "SliderInteraction.properties.h"

Inherited by SliderInteraction.

List of all members.

Public Member Functions

SliderInteractionProperties ()
void | PropertyChanged (winrt::event_token const &token)
winrt::event_token | PropertyChanged (winrt::PropertyChangedEventHandler const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()

Public Attributes

event_source
< winrt::PropertyChangedEventHandler > 		m_propertyChangedEventSource

Detailed Description

Definition at line 7 of file SliderInteraction.properties.h.

Constructor & Destructor Documentation

SliderInteractionProperties ( )

Definition at line 17 of file SliderInteraction.properties.cpp.

    : m_propertyChangedEventSource{static_cast<SliderInteraction*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
winrt::event_token PropertyChanged ( winrt::PropertyChangedEventHandler const & value )

Reimplemented in SliderInteraction.

void PropertyChanged ( winrt::event_token const & token )

Reimplemented in SliderInteraction.

Member Data Documentation

event_source<winrt::PropertyChangedEventHandler> m_propertyChangedEventSource

Definition at line 17 of file SliderInteraction.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SliderInteraction.properties.h
  • Generated/SliderInteraction.properties.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SnapPointBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions

SnapPointBase Class Reference

#include "SnapPoint.h"

Inherits ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

virtual void | Combine (int &combinationCount, winrt::SnapPointBase const &snapPoint) const =0
virtual winrt::ExpressionAnimation | CreateConditionalExpression (std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)=0
virtual winrt::ExpressionAnimation | CreateRestingPointExpression (double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)=0
virtual std::tuple< double,
double > 		DetermineActualApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint)=0
virtual std::tuple< double,
double > 		DetermineActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue)=0
virtual double | Evaluate (std::tuple< double, double > actualApplicableZone, double value) const =0
virtual double | ImpulseInfluence (double edgeOfMidpoint, double ignoredValue) const =0
virtual double | Influence (double edgeOfMidpoint) const =0
virtual bool | OnUpdateViewport (double newViewport)=0
bool | operator< (const SnapPointBase *snapPoint)
bool | operator== (const SnapPointBase *snapPoint)
void | SetBooleanParameter (winrt::ExpressionAnimation const &expressionAnimation, wstring_view const &booleanName, bool booleanValue) const
void | SetScalarParameter (winrt::ExpressionAnimation const &expressionAnimation, wstring_view const &scalarName, float scalarValue) const
virtual int | SnapCount () const =0
bool | SnapsAt (std::tuple< double, double > actualApplicableZone, double value) const
virtual SnapPointSortPredicate | SortPredicate () const =0
virtual void | UpdateConditionalExpressionAnimationForImpulse (winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const =0
virtual void | UpdateRestingPointExpressionAnimationForImpulse (winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const =0

Protected Member Functions

winrt::hstring | GetIsInertiaFromImpulseExpression (winrt::hstring const &target) const
winrt::hstring | GetTargetExpression (winrt::hstring const &target) const

Detailed Description

Definition at line 31 of file SnapPoint.h.

Member Function Documentation

virtual void Combine | ( | int & | combinationCount,
 |  | winrt::SnapPointBase const & | snapPoint |
 | ) |  |  | const [pure virtual]
virtual winrt::ExpressionAnimation CreateConditionalExpression | ( | std::tuple< double, double > | actualApplicableZone,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse |
 | ) |  |  | [pure virtual]
virtual winrt::ExpressionAnimation CreateRestingPointExpression | ( | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse |
 | ) |  |  | [pure virtual]
virtual std::tuple<double, double> DetermineActualApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint |
 | ) |  |  | [pure virtual]
virtual std::tuple<double, double> DetermineActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue,
 |  | double | nextIgnoredValue |
 | ) |  |  | [pure virtual]
virtual double Evaluate | ( | std::tuple< double, double > | actualApplicableZone,
 |  | double | value |
 | ) |  |  | const [pure virtual]
winrt::hstring GetIsInertiaFromImpulseExpression ( winrt::hstring const & target ) const [protected]

Definition at line 15 of file SnapPoint.cpp.

{
    // Returns 't.IsInertiaFromImpulse' or 'this.Target.IsInertiaFromImpulse'.
    return StringUtil::FormatString(L"%1!s!.IsInertiaFromImpulse", target.data());
}

winrt::hstring GetTargetExpression ( winrt::hstring const & target ) const [protected]

Definition at line 10 of file SnapPoint.cpp.

{
    return StringUtil::FormatString(L"this.Target.%1!s!", target.data());
}

virtual double ImpulseInfluence | ( | double | edgeOfMidpoint,
 |  | double | ignoredValue |
 | ) |  |  | const [pure virtual]
virtual double Influence ( double edgeOfMidpoint ) const [pure virtual]
virtual bool OnUpdateViewport ( double newViewport ) [pure virtual]
bool operator< ( const SnapPointBase * snapPoint )

Definition at line 21 of file SnapPoint.cpp.

{
    const SnapPointSortPredicate mySortPredicate = SortPredicate();
    const SnapPointSortPredicate theirSortPredicate = snapPoint->SortPredicate();
    if (mySortPredicate.primary < theirSortPredicate.primary)
    {
        return true;
    }
    if (theirSortPredicate.primary < mySortPredicate.primary)
    {
        return false;
    }

    if (mySortPredicate.secondary < theirSortPredicate.secondary)
    {
        return true;
    }
    if (theirSortPredicate.secondary < mySortPredicate.secondary)
    {
        return false;
    }

    if (mySortPredicate.tertiary < theirSortPredicate.tertiary)
    {
        return true;
    }
    return false;
}

bool operator== ( const SnapPointBase * snapPoint )

Definition at line 50 of file SnapPoint.cpp.

{
    const SnapPointSortPredicate mySortPredicate = SortPredicate();
    const SnapPointSortPredicate theirSortPredicate = snapPoint->SortPredicate();
    if (std::abs(mySortPredicate.primary - theirSortPredicate.primary) < s_equalityEpsilon
        && std::abs(mySortPredicate.secondary - theirSortPredicate.secondary) < s_equalityEpsilon
        && mySortPredicate.tertiary == theirSortPredicate.tertiary)
    {
        return true;
    }
    return false;
}

void SetBooleanParameter | ( | winrt::ExpressionAnimation const & | expressionAnimation,
 |  | wstring_view const & | booleanName,
 |  | bool | booleanValue |
 | ) |  |  | const

Definition at line 103 of file SnapPoint.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, booleanName, booleanValue);

    expressionAnimation.SetBooleanParameter(booleanName, booleanValue);
}

void SetScalarParameter | ( | winrt::ExpressionAnimation const & | expressionAnimation,
 |  | wstring_view const & | scalarName,
 |  | float | scalarValue |
 | ) |  |  | const

Definition at line 113 of file SnapPoint.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, scalarName, scalarValue);

    expressionAnimation.SetScalarParameter(scalarName, scalarValue);
}

virtual int SnapCount ( ) const [pure virtual]
bool SnapsAt | ( | std::tuple< double, double > | actualApplicableZone,
 |  | double | value |
 | ) |  |  | const

Definition at line 88 of file SnapPoint.cpp.

{
    if (std::get<0>(actualApplicableZone) <= value &&
        std::get<1>(actualApplicableZone) >= value)
    {
        const double snappedValue = Evaluate(actualApplicableZone, static_cast<float>(value));

        return std::abs(value - snappedValue) < s_equalityEpsilon;
    }

    return false;
}

virtual SnapPointSortPredicate SortPredicate ( ) const [pure virtual]
virtual void UpdateConditionalExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | conditionExpressionAnimation,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const [pure virtual]
virtual void UpdateRestingPointExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | restingValueExpressionAnimation,
 |  | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const [pure virtual]
The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPoint.h
  • ScrollPresenter/SnapPoint.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SnapPointSortPredicate Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

SnapPointSortPredicate Struct Reference

#include "SnapPoint.h"

List of all members.

Public Attributes

double | primary
double | secondary
short | tertiary

Detailed Description

Definition at line 14 of file SnapPoint.h.

Member Data Documentation

double primary

Definition at line 26 of file SnapPoint.h.

double secondary

Definition at line 27 of file SnapPoint.h.

short tertiary

Definition at line 28 of file SnapPoint.h.

The documentation for this struct was generated from the following file:
  • ScrollPresenter/SnapPoint.h
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SnapPointWrapper< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes

SnapPointWrapper< T > Class Template Reference

#include "SnapPointWrapper.h"

List of all members.

Public Member Functions

SnapPointWrapper (T const &snapPoint)
std::tuple< double, double > | ActualApplicableZone () const
int | CombinationCount () const
void | Combine (const SnapPointWrapper< T > *snapPointWrapper)
winrt::ExpressionAnimation | CreateConditionalExpression (winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
winrt::ExpressionAnimation | CreateRestingPointExpression (winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
void | DetermineActualApplicableZone (const SnapPointWrapper< T > *previousSnapPointWrapper, const SnapPointWrapper< T > *nextSnapPointWrapper, bool forImpulseOnly)
double | Evaluate (double value) const
std::tuple
< winrt::ExpressionAnimation,
winrt::ExpressionAnimation > 		GetUpdatedExpressionAnimationsForImpulse ()
bool | ResetIgnoredValue ()
void | SetIgnoredValue (double ignoredValue)
T | SnapPoint () const
bool | SnapsAt (double value) const

Static Public Member Functions

static SnapPointBase * | GetSnapPointFromWrapper (std::shared_ptr< SnapPointWrapper< T >> snapPointWrapper)

Static Private Member Functions

static SnapPointBase * | GetSnapPointFromWrapper (const SnapPointWrapper< T > *snapPointWrapper)

Private Attributes

T | m_snapPoint

Detailed Description

template<typename T>
class SnapPointWrapper< T >

Definition at line 13 of file SnapPointWrapper.h.

Constructor & Destructor Documentation

SnapPointWrapper ( T const & snapPoint )

Definition at line 9 of file SnapPointWrapper.cpp.

    : m_snapPoint(snapPoint)
{
}

Member Function Documentation

template std::tuple< double, double > ActualApplicableZone ( ) const

Definition at line 28 of file SnapPointWrapper.cpp.

{
    return m_actualApplicableZone;
}

template int CombinationCount ( ) const

Definition at line 34 of file SnapPointWrapper.cpp.

{
    return m_combinationCount;
}

void Combine ( const SnapPointWrapper< T > * snapPointWrapper )

Definition at line 140 of file SnapPointWrapper.cpp.

{
    GetSnapPointFromWrapper(this)->Combine(m_combinationCount, snapPointWrapper->SnapPoint());
}

template winrt::ExpressionAnimation CreateConditionalExpression | ( | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 78 of file SnapPointWrapper.cpp.

{
    m_conditionExpressionAnimation = GetSnapPointFromWrapper(this)->CreateConditionalExpression(
        m_actualApplicableZone,
        m_actualImpulseApplicableZone,
        interactionTracker,
        target,
        scale,
        isInertiaFromImpulse);

    return m_conditionExpressionAnimation;
}

template winrt::ExpressionAnimation CreateRestingPointExpression | ( | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 60 of file SnapPointWrapper.cpp.

{
    m_restingValueExpressionAnimation = GetSnapPointFromWrapper(this)->CreateRestingPointExpression(
        m_ignoredValue,
        m_actualImpulseApplicableZone,
        interactionTracker,
        target,
        scale,
        isInertiaFromImpulse);

    return m_restingValueExpressionAnimation;
}

void DetermineActualApplicableZone | ( | const SnapPointWrapper< T > * | previousSnapPointWrapper,
 |  | const SnapPointWrapper< T > * | nextSnapPointWrapper,
 |  | bool | forImpulseOnly
 | ) |  |

Definition at line 113 of file SnapPointWrapper.cpp.

{
    SnapPointBase* snapPoint = GetSnapPointFromWrapper(this);
    const SnapPointBase* previousSnapPoint = GetSnapPointFromWrapper(previousSnapPointWrapper);
    const SnapPointBase* nextSnapPoint = GetSnapPointFromWrapper(nextSnapPointWrapper);
    const double previousIgnoredValue = previousSnapPointWrapper ? previousSnapPointWrapper->m_ignoredValue : NAN;
    const double nextIgnoredValue = nextSnapPointWrapper ? nextSnapPointWrapper->m_ignoredValue : NAN;

    if (!forImpulseOnly)
    {
        m_actualApplicableZone = snapPoint->DetermineActualApplicableZone(
            previousSnapPoint,
            nextSnapPoint);
    }

    m_actualImpulseApplicableZone = snapPoint->DetermineActualImpulseApplicableZone(
        previousSnapPoint,
        nextSnapPoint,
        m_ignoredValue,
        previousIgnoredValue,
        nextIgnoredValue);
}

template double Evaluate ( double value ) const

Definition at line 146 of file SnapPointWrapper.cpp.

{
    return GetSnapPointFromWrapper(this)->Evaluate(m_actualApplicableZone, value);
}

SnapPointBase * GetSnapPointFromWrapper ( std::shared_ptr< SnapPointWrapper< T >> snapPointWrapper ) [static]

Definition at line 158 of file SnapPointWrapper.cpp.

{
    return GetSnapPointFromWrapper(snapPointWrapper.get());
}

SnapPointBase * GetSnapPointFromWrapper ( const SnapPointWrapper< T > * snapPointWrapper ) [static, private]

Definition at line 164 of file SnapPointWrapper.cpp.

{
    if (snapPointWrapper)
    {
        winrt::SnapPointBase winrtPreviousSnapPoint = snapPointWrapper->SnapPoint().as<winrt::SnapPointBase>();
        return winrt::get_self<SnapPointBase>(winrtPreviousSnapPoint);
    }
    return nullptr;
}

template std::tuple< winrt::ExpressionAnimation, winrt::ExpressionAnimation > GetUpdatedExpressionAnimationsForImpulse ( )

Definition at line 97 of file SnapPointWrapper.cpp.

{
    const SnapPointBase* snapPoint = GetSnapPointFromWrapper(this);

    snapPoint->UpdateConditionalExpressionAnimationForImpulse(
        m_conditionExpressionAnimation,
        m_actualImpulseApplicableZone);
    snapPoint->UpdateRestingPointExpressionAnimationForImpulse(
        m_restingValueExpressionAnimation,
        m_ignoredValue,
        m_actualImpulseApplicableZone);

    return std::make_tuple(m_conditionExpressionAnimation, m_restingValueExpressionAnimation);
}

template bool ResetIgnoredValue ( )

Definition at line 40 of file SnapPointWrapper.cpp.

{
    if (!isnan(m_ignoredValue))
    {
        m_ignoredValue = NAN;
        return true;
    }

    return false;
}

template void SetIgnoredValue ( double ignoredValue )

Definition at line 52 of file SnapPointWrapper.cpp.

{
    MUX_ASSERT(!isnan(ignoredValue));

    m_ignoredValue = ignoredValue;
}

template winrt::ZoomSnapPointBase SnapPoint ( ) const

Definition at line 22 of file SnapPointWrapper.cpp.

{
    return m_snapPoint;
}

template bool SnapsAt ( double value ) const

Definition at line 152 of file SnapPointWrapper.cpp.

{
    return GetSnapPointFromWrapper(this)->SnapsAt(m_actualApplicableZone, value);
}

Member Data Documentation

T m_snapPoint [private]

Definition at line 52 of file SnapPointWrapper.h.

The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPointWrapper.h
  • ScrollPresenter/SnapPointWrapper.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SnapPointWrapperComparator< T > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

SnapPointWrapperComparator< T > Struct Template Reference

#include "SnapPointWrapper.h"

List of all members.

Public Member Functions

bool operator() (std::shared_ptr< SnapPointWrapper< T >> left, std::shared_ptr< SnapPointWrapper< T >> right) const

Detailed Description

template<typename T>
struct SnapPointWrapperComparator< T >

Definition at line 62 of file SnapPointWrapper.h.

Member Function Documentation

bool operator() | ( | std::shared_ptr< SnapPointWrapper< T >> | left,
 |  | std::shared_ptr< SnapPointWrapper< T >> | right |
 | ) |  |  | const [inline]

Definition at line 64 of file SnapPointWrapper.h.

    {
        winrt::SnapPointBase winrtLeftSnapPoint = left->SnapPoint().as<winrt::SnapPointBase>();
        winrt::SnapPointBase winrtRightSnapPoint = right->SnapPoint().as<winrt::SnapPointBase>();
        SnapPointBase* leftSnapPoint = winrt::get_self<SnapPointBase>(winrtLeftSnapPoint);
        const SnapPointBase* rightSnapPoint = winrt::get_self<SnapPointBase>(winrtRightSnapPoint);

        return *leftSnapPoint < rightSnapPoint;
    }

The documentation for this struct was generated from the following file:
  • ScrollPresenter/SnapPointWrapper.h
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpectrumBrush Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

SpectrumBrush Class Reference

#include "SpectrumBrush.h"

Inherits ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable >, and SpectrumBrushProperties.

List of all members.

Public Member Functions

void | OnConnected ()
void | OnDisconnected ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | CreateSpectrumBrush ()
void | UpdateSpectrumBrush ()

Detailed Description

Definition at line 17 of file SpectrumBrush.h.

Member Function Documentation

void CreateSpectrumBrush ( ) [private]

Definition at line 51 of file SpectrumBrush.cpp.

{
    winrt::Compositor compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

    m_brushEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CrossFadeEffect>();
    m_brushEffect->Source1(winrt::CompositionEffectSourceParameter{ L"MinSurface" });
    m_brushEffect->Source2(winrt::CompositionEffectSourceParameter{ L"MaxSurface" });
    m_brushEffect->Weight(static_cast<float>(MaxSurfaceOpacity()));

    winrt::CompositionEffectFactory effectFactory = compositor.CreateEffectFactory(*m_brushEffect);
    m_brush = effectFactory.CreateBrush();

    CompositionBrush(m_brush);
}

void OnConnected ( )

Definition at line 9 of file SpectrumBrush.cpp.

{
    m_isConnected = true;
    UpdateSpectrumBrush();
}

void OnDisconnected ( )

Definition at line 15 of file SpectrumBrush.cpp.

{
    m_isConnected = false;

    if (m_brush)
    {
        m_brush.Close();
        m_brush = nullptr;
        CompositionBrush(nullptr);
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 27 of file SpectrumBrush.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    winrt::Compositor compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

    if (property == s_MinSurfaceProperty)
    {
        m_minSurfaceBrush = compositor.CreateSurfaceBrush(MinSurface());
        UpdateSpectrumBrush();
    }
    else if (property == s_MaxSurfaceProperty)
    {
        m_maxSurfaceBrush = compositor.CreateSurfaceBrush(MaxSurface());
        UpdateSpectrumBrush();
    }
    else if (property == s_MaxSurfaceOpacityProperty)
    {
        if (m_brushEffect)
        {
            m_brushEffect->Weight(static_cast<float>(MaxSurfaceOpacity()));
        }
    }
}

void UpdateSpectrumBrush ( ) [private]

Definition at line 66 of file SpectrumBrush.cpp.

{
    if (m_isConnected)
    {
        if (!m_brush)
        {
            CreateSpectrumBrush();
        }

        m_brush.SetSourceParameter(L"MinSurface", m_minSurfaceBrush);
        m_brush.SetSourceParameter(L"MaxSurface", m_maxSurfaceBrush);
    }
}

The documentation for this class was generated from the following files:
  • ColorPicker/SpectrumBrush.h
  • ColorPicker/SpectrumBrush.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpectrumBrushProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

SpectrumBrushProperties Class Reference

#include "SpectrumBrush.properties.h"

Inherited by SpectrumBrush.

List of all members.

Public Member Functions

SpectrumBrushProperties ()
void | MaxSurface (winrt::LoadedImageSurface const &value)
winrt::LoadedImageSurface | MaxSurface ()
double | MaxSurfaceOpacity ()
void | MaxSurfaceOpacity (double value)
void | MinSurface (winrt::LoadedImageSurface const &value)
winrt::LoadedImageSurface | MinSurface ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MaxSurfaceOpacityProperty ()
static winrt::DependencyProperty | MaxSurfaceProperty ()
static winrt::DependencyProperty | MinSurfaceProperty ()
static void | OnMaxSurfaceOpacityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaxSurfacePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinSurfacePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Static Public Attributes

static GlobalDependencyProperty | s_MaxSurfaceOpacityProperty
static GlobalDependencyProperty | s_MaxSurfaceProperty
static GlobalDependencyProperty | s_MinSurfaceProperty

Detailed Description

Definition at line 7 of file SpectrumBrush.properties.h.

Constructor & Destructor Documentation

SpectrumBrushProperties ( )

Definition at line 20 of file SpectrumBrush.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 62 of file SpectrumBrush.properties.cpp.

{
    s_MaxSurfaceProperty = nullptr;
    s_MaxSurfaceOpacityProperty = nullptr;
    s_MinSurfaceProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 25 of file SpectrumBrush.properties.cpp.

{
    if (!s_MaxSurfaceProperty)
    {
        s_MaxSurfaceProperty =
            InitializeDependencyProperty(
                L"MaxSurface",
                winrt::name_of<winrt::LoadedImageSurface>(),
                winrt::name_of<winrt::SpectrumBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::LoadedImageSurface>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnMaxSurfacePropertyChanged));
    }
    if (!s_MaxSurfaceOpacityProperty)
    {
        s_MaxSurfaceOpacityProperty =
            InitializeDependencyProperty(
                L"MaxSurfaceOpacity",
                winrt::name_of<double>(),
                winrt::name_of<winrt::SpectrumBrush>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(1.0),
                winrt::PropertyChangedCallback(&OnMaxSurfaceOpacityPropertyChanged));
    }
    if (!s_MinSurfaceProperty)
    {
        s_MinSurfaceProperty =
            InitializeDependencyProperty(
                L"MinSurface",
                winrt::name_of<winrt::LoadedImageSurface>(),
                winrt::name_of<winrt::SpectrumBrush>(),
                false /* isAttached */,
                ValueHelper<winrt::LoadedImageSurface>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnMinSurfacePropertyChanged));
    }
}

void MaxSurface ( winrt::LoadedImageSurface const & value )

Definition at line 93 of file SpectrumBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SpectrumBrush*>(this)->SetValue(s_MaxSurfaceProperty, ValueHelper<winrt::LoadedImageSurface>::BoxValueIfNecessary(value));
    }
}

winrt::LoadedImageSurface MaxSurface ( )

Definition at line 101 of file SpectrumBrush.properties.cpp.

{
    return ValueHelper<winrt::LoadedImageSurface>::CastOrUnbox(static_cast<SpectrumBrush*>(this)->GetValue(s_MaxSurfaceProperty));
}

double MaxSurfaceOpacity ( )

Definition at line 114 of file SpectrumBrush.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<SpectrumBrush*>(this)->GetValue(s_MaxSurfaceOpacityProperty));
}

void MaxSurfaceOpacity ( double value )

Definition at line 106 of file SpectrumBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SpectrumBrush*>(this)->SetValue(s_MaxSurfaceOpacityProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MaxSurfaceOpacityProperty ( ) [inline, static]

Definition at line 22 of file SpectrumBrush.properties.h.

{ return s_MaxSurfaceOpacityProperty; }

static winrt::DependencyProperty MaxSurfaceProperty ( ) [inline, static]

Definition at line 21 of file SpectrumBrush.properties.h.

{ return s_MaxSurfaceProperty; }

void MinSurface ( winrt::LoadedImageSurface const & value )

Definition at line 119 of file SpectrumBrush.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SpectrumBrush*>(this)->SetValue(s_MinSurfaceProperty, ValueHelper<winrt::LoadedImageSurface>::BoxValueIfNecessary(value));
    }
}

winrt::LoadedImageSurface MinSurface ( )

Definition at line 127 of file SpectrumBrush.properties.cpp.

{
    return ValueHelper<winrt::LoadedImageSurface>::CastOrUnbox(static_cast<SpectrumBrush*>(this)->GetValue(s_MinSurfaceProperty));
}

static winrt::DependencyProperty MinSurfaceProperty ( ) [inline, static]

Definition at line 23 of file SpectrumBrush.properties.h.

{ return s_MinSurfaceProperty; }

void OnMaxSurfaceOpacityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 77 of file SpectrumBrush.properties.cpp.

{
    auto owner = sender.as<winrt::SpectrumBrush>();
    winrt::get_self<SpectrumBrush>(owner)->OnPropertyChanged(args);
}

void OnMaxSurfacePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 69 of file SpectrumBrush.properties.cpp.

{
    auto owner = sender.as<winrt::SpectrumBrush>();
    winrt::get_self<SpectrumBrush>(owner)->OnPropertyChanged(args);
}

void OnMinSurfacePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 85 of file SpectrumBrush.properties.cpp.

{
    auto owner = sender.as<winrt::SpectrumBrush>();
    winrt::get_self<SpectrumBrush>(owner)->OnPropertyChanged(args);
}

Member Data Documentation

GlobalDependencyProperty s_MaxSurfaceOpacityProperty [static]

Definition at line 26 of file SpectrumBrush.properties.h.

GlobalDependencyProperty s_MaxSurfaceProperty [static]

Definition at line 25 of file SpectrumBrush.properties.h.

GlobalDependencyProperty s_MinSurfaceProperty [static]

Definition at line 27 of file SpectrumBrush.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SpectrumBrush.properties.h
  • Generated/SpectrumBrush.properties.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions

SplitButton Class Reference

#include "SplitButton.h"

Inherits ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT >, and SplitButtonProperties.

List of all members.

Public Member Functions

SplitButton ()
void | CloseFlyout ()
virtual bool | InternalIsChecked ()
void | Invoke ()
bool | IsFlyoutOpen ()
void | OnApplyTemplate ()
virtual winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OpenFlyout ()
void | UpdateVisualStates (bool useTransitions=true)

Protected Member Functions

virtual void | OnClickPrimary (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)

Private Member Functions

void | ExecuteCommand ()
void | OnClickSecondary (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnFlyoutChanged ()
void | OnFlyoutClosed (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnFlyoutOpened (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnFlyoutPlacementChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnPointerEvent (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnSplitButtonKeyDown (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | OnSplitButtonKeyUp (const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args)
void | OnVisualPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | RegisterFlyoutEvents ()
void | UnregisterEvents ()

Detailed Description

Definition at line 12 of file SplitButton.h.

Constructor & Destructor Documentation

SplitButton ( )

Definition at line 13 of file SplitButton.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_SplitButton);

    SetDefaultStyleKey(this);

    m_keyDownRevoker = KeyDown(winrt::auto_revoke, { this, &SplitButton::OnSplitButtonKeyDown });
    m_keyUpRevoker = KeyUp(winrt::auto_revoke, { this, &SplitButton::OnSplitButtonKeyUp });
}

Member Function Documentation

void CloseFlyout ( )

Definition at line 231 of file SplitButton.cpp.

{
    if (auto flyout = Flyout())
    {
        flyout.Hide();
    }
}

void ExecuteCommand ( ) [private]

Definition at line 239 of file SplitButton.cpp.

{
    if (const auto& command = Command())
    {
        const auto& commandParameter = CommandParameter();

        if (command.CanExecute(commandParameter))
        {
            command.Execute(commandParameter);
        }
    }
}

virtual bool InternalIsChecked ( ) [inline, virtual]

Definition at line 30 of file SplitButton.h.

{ return false; }

void Invoke ( )

Definition at line 287 of file SplitButton.cpp.

{
    bool invoked = false;

    if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(m_primaryButton.get()))
    {
        if (winrt::IInvokeProvider invokeProvider = peer.GetPattern(winrt::PatternInterface::Invoke).try_as<winrt::IInvokeProvider>())
        {
            invokeProvider.Invoke();
            invoked = true;
        }
    }

    // If we don't have a primary button that provides an invoke provider, we'll fall back to calling OnClickPrimary manually.
    if (!invoked)
    {
        OnClickPrimary(nullptr, nullptr);
    }
}

bool IsFlyoutOpen ( ) [inline]

Definition at line 27 of file SplitButton.h.

{ return m_isFlyoutOpen; };

void OnApplyTemplate ( )

Definition at line 23 of file SplitButton.cpp.

{
    UnregisterEvents();

    winrt::IControlProtected controlProtected{ *this };
    m_primaryButton.set(GetTemplateChildT<winrt::Button>(L"PrimaryButton", controlProtected));
    m_secondaryButton.set(GetTemplateChildT<winrt::Button>(L"SecondaryButton", controlProtected));

    if (auto primaryButton = m_primaryButton.get())
    {
        m_clickPrimaryRevoker = primaryButton.Click(winrt::auto_revoke, { this, &SplitButton::OnClickPrimary });

        m_pressedPrimaryRevoker = RegisterPropertyChanged(primaryButton, winrt::ButtonBase::IsPressedProperty(), { this, &SplitButton::OnVisualPropertyChanged });
        m_pointerOverPrimaryRevoker = RegisterPropertyChanged(primaryButton, winrt::ButtonBase::IsPointerOverProperty(), { this, &SplitButton::OnVisualPropertyChanged });

        // Register for pointer events so we can keep track of the last used pointer type
        m_pointerEnteredPrimaryRevoker = primaryButton.PointerEntered(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerExitedPrimaryRevoker = primaryButton.PointerExited(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerPressedPrimaryRevoker = primaryButton.PointerPressed(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerReleasedPrimaryRevoker = primaryButton.PointerReleased(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerCanceledPrimaryRevoker = primaryButton.PointerCanceled(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerCaptureLostPrimaryRevoker = primaryButton.PointerCaptureLost(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
    }

    if (auto secondaryButton = m_secondaryButton.get())
    {
        // Do localization for the secondary button
        auto secondaryName = ResourceAccessor::GetLocalizedStringResource(SR_SplitButtonSecondaryButtonName);
        winrt::AutomationProperties::SetName(secondaryButton, secondaryName);

        m_clickSecondaryRevoker = secondaryButton.Click(winrt::auto_revoke, { this, &SplitButton::OnClickSecondary });

        m_pressedSecondaryRevoker = RegisterPropertyChanged(secondaryButton, winrt::ButtonBase::IsPressedProperty(), { this, &SplitButton::OnVisualPropertyChanged });
        m_pointerOverSecondaryRevoker = RegisterPropertyChanged(secondaryButton, winrt::ButtonBase::IsPointerOverProperty(), { this, &SplitButton::OnVisualPropertyChanged });

        // Register for pointer events so we can keep track of the last used pointer type
        m_pointerEnteredSecondaryRevoker = secondaryButton.PointerEntered(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerExitedSecondaryRevoker = secondaryButton.PointerExited(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerPressedSecondaryRevoker = secondaryButton.PointerPressed(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerReleasedSecondaryRevoker = secondaryButton.PointerReleased(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerCanceledSecondaryRevoker = secondaryButton.PointerCanceled(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
        m_pointerCaptureLostSecondaryRevoker = secondaryButton.PointerCaptureLost(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
    }

    // Register events on flyout
    RegisterFlyoutEvents();

    UpdateVisualStates();

    m_hasLoaded = true;
}

void OnClickPrimary | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [protected, virtual]

Definition at line 271 of file SplitButton.cpp.

{
    auto eventArgs = winrt::make_self<SplitButtonClickEventArgs>();
    m_clickEventSource(*this, *eventArgs);

    if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
    {
        peer.RaiseAutomationEvent(winrt::AutomationEvents::InvokePatternOnInvoked);
    }
}

void OnClickSecondary | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 282 of file SplitButton.cpp.

{
    OpenFlyout();
}

winrt::AutomationPeer OnCreateAutomationPeer ( ) [virtual]

Definition at line 85 of file SplitButton.cpp.

{
    return winrt::make<SplitButtonAutomationPeer>(*this);
}

void OnFlyoutChanged ( ) [private]

Definition at line 90 of file SplitButton.cpp.

{
    RegisterFlyoutEvents();

    UpdateVisualStates();
}

void OnFlyoutClosed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 259 of file SplitButton.cpp.

{
    m_isFlyoutOpen = false;
    UpdateVisualStates();
    SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Expanded, winrt::ExpandCollapseState::Collapsed);
}

void OnFlyoutOpened | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 252 of file SplitButton.cpp.

{
    m_isFlyoutOpen = true;
    UpdateVisualStates();
    SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Collapsed, winrt::ExpandCollapseState::Expanded);
}

void OnFlyoutPlacementChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 266 of file SplitButton.cpp.

{
    UpdateVisualStates();
}

void OnPointerEvent | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 307 of file SplitButton.cpp.

{
    winrt::PointerDeviceType pointerDeviceType = args.Pointer().PointerDeviceType();

    // Allows the test app to simulate how the control responds to touch input.
    if (SplitButtonTestHelper::SimulateTouch())
    {
        pointerDeviceType = winrt::PointerDeviceType::Touch;
    }

    if (m_lastPointerDeviceType != pointerDeviceType)
    {
        m_lastPointerDeviceType = pointerDeviceType;
        UpdateVisualStates();
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 75 of file SplitButton.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_FlyoutProperty)
    {
        OnFlyoutChanged();
    }
}

void OnSplitButtonKeyDown | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 324 of file SplitButton.cpp.

{
    const winrt::VirtualKey key = args.Key();
    if (key == winrt::VirtualKey::Space || key == winrt::VirtualKey::Enter || key == winrt::VirtualKey::GamepadA)
    {
        m_isKeyDown = true;
        UpdateVisualStates();
    }
}

void OnSplitButtonKeyUp | ( | const winrt::IInspectable & | sender,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 334 of file SplitButton.cpp.

{
    const winrt::VirtualKey key = args.Key();
    if (key == winrt::VirtualKey::Space || key == winrt::VirtualKey::Enter || key == winrt::VirtualKey::GamepadA)
    {
        m_isKeyDown = false;
        UpdateVisualStates();

        // Consider this a click on the primary button
        if (IsEnabled())
        {
            OnClickPrimary(nullptr, nullptr);
            ExecuteCommand();
            args.Handled(true);
        }
    }
    else if (key == winrt::VirtualKey::Down)
    {
        const winrt::CoreVirtualKeyStates menuState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu);
        const bool menuKeyDown = (menuState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

        if (IsEnabled() && menuKeyDown)
        {
            // Open the menu on alt-down
            OpenFlyout();
            args.Handled(true);
        }
    }
    else if (key == winrt::VirtualKey::F4 && IsEnabled())
    {
        // Open the menu on F4
        OpenFlyout();
        args.Handled(true);
    }
}

void OnVisualPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 113 of file SplitButton.cpp.

{
    UpdateVisualStates();
}

void OpenFlyout ( )

Definition at line 221 of file SplitButton.cpp.

{
    if (auto flyout = Flyout())
    {
        winrt::FlyoutShowOptions options{};
        options.Placement(winrt::FlyoutPlacementMode::BottomEdgeAlignedLeft);
        flyout.ShowAt(*this, options);
    }
}

void RegisterFlyoutEvents ( ) [private]

Definition at line 97 of file SplitButton.cpp.

{
    m_flyoutOpenedRevoker.revoke();
    m_flyoutClosedRevoker.revoke();
    m_flyoutPlacementChangedRevoker.revoke();

    if (Flyout())
    {
        m_flyoutOpenedRevoker = Flyout().Opened(winrt::auto_revoke, { this, &SplitButton::OnFlyoutOpened });

        m_flyoutClosedRevoker = Flyout().Closed(winrt::auto_revoke, { this, &SplitButton::OnFlyoutClosed });

        m_flyoutPlacementChangedRevoker = RegisterPropertyChanged(Flyout(), winrt::FlyoutBase::PlacementProperty(), { this, &SplitButton::OnFlyoutPlacementChanged });
    }
}

void UnregisterEvents ( ) [private]

Definition at line 370 of file SplitButton.cpp.

{
    // This explicitly unregisters all events related to the two buttons in OnApplyTemplate
    // in case the new template doesn't have all the expected elements.

    m_clickPrimaryRevoker.revoke();
    m_pressedPrimaryRevoker.revoke();
    m_pointerOverPrimaryRevoker.revoke();

    m_pointerEnteredPrimaryRevoker.revoke();
    m_pointerExitedPrimaryRevoker.revoke();
    m_pointerPressedPrimaryRevoker.revoke();
    m_pointerReleasedPrimaryRevoker.revoke();
    m_pointerCanceledPrimaryRevoker.revoke();
    m_pointerCaptureLostPrimaryRevoker.revoke();

    m_clickSecondaryRevoker.revoke();
    m_pressedSecondaryRevoker.revoke();
    m_pointerOverSecondaryRevoker.revoke();

    m_pointerEnteredSecondaryRevoker.revoke();
    m_pointerExitedSecondaryRevoker.revoke();
    m_pointerPressedSecondaryRevoker.revoke();
    m_pointerReleasedSecondaryRevoker.revoke();
    m_pointerCanceledSecondaryRevoker.revoke();
    m_pointerCaptureLostSecondaryRevoker.revoke();
}

void UpdateVisualStates ( bool useTransitions = true )

Definition at line 118 of file SplitButton.cpp.

{
    // place the secondary button
    if (m_lastPointerDeviceType == winrt::PointerDeviceType::Touch || m_isKeyDown)
    {
        winrt::VisualStateManager::GoToState(*this, L"SecondaryButtonSpan", useTransitions);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"SecondaryButtonRight", useTransitions);
    }

    // change visual state
    auto primaryButton = m_primaryButton.get();
    auto secondaryButton = m_secondaryButton.get();
    if (!IsEnabled()) {
        winrt::VisualStateManager::GoToState(*this, L"Disabled", useTransitions);
    }
    else if (primaryButton && secondaryButton)
    {
        if (m_isFlyoutOpen)
        {
            if (InternalIsChecked())
            {
                winrt::VisualStateManager::GoToState(*this, L"CheckedFlyoutOpen", useTransitions);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, L"FlyoutOpen", useTransitions);
            }
        }
        // SplitButton and ToggleSplitButton share a template -- this section is driving the checked states for ToggleSplitButton.
        else if (InternalIsChecked())
        {
            if (m_lastPointerDeviceType == winrt::PointerDeviceType::Touch || m_isKeyDown)
            {
                if (primaryButton.IsPressed() || secondaryButton.IsPressed() || m_isKeyDown)
                {
                    winrt::VisualStateManager::GoToState(*this, L"CheckedTouchPressed", useTransitions);
                }
                else
                {
                    winrt::VisualStateManager::GoToState(*this, L"Checked", useTransitions);
                }
            }
            else if (primaryButton.IsPressed())
            {
                winrt::VisualStateManager::GoToState(*this, L"CheckedPrimaryPressed", useTransitions);
            }
            else if (primaryButton.IsPointerOver())
            {
                winrt::VisualStateManager::GoToState(*this, L"CheckedPrimaryPointerOver", useTransitions);
            }
            else if (secondaryButton.IsPressed())
            {
                winrt::VisualStateManager::GoToState(*this, L"CheckedSecondaryPressed", useTransitions);
            }
            else if (secondaryButton.IsPointerOver())
            {
                winrt::VisualStateManager::GoToState(*this, L"CheckedSecondaryPointerOver", useTransitions);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, L"Checked", useTransitions);
            }
        }
        else
        {
            if (m_lastPointerDeviceType == winrt::PointerDeviceType::Touch || m_isKeyDown)
            {
                if (primaryButton.IsPressed() || secondaryButton.IsPressed() || m_isKeyDown)
                {
                    winrt::VisualStateManager::GoToState(*this, L"TouchPressed", useTransitions);
                }
                else
                {
                    winrt::VisualStateManager::GoToState(*this, L"Normal", useTransitions);
                }
            }
            else if (primaryButton.IsPressed())
            {
                winrt::VisualStateManager::GoToState(*this, L"PrimaryPressed", useTransitions);
            }
            else if (primaryButton.IsPointerOver())
            {
                winrt::VisualStateManager::GoToState(*this, L"PrimaryPointerOver", useTransitions);
            }
            else if (secondaryButton.IsPressed())
            {
                winrt::VisualStateManager::GoToState(*this, L"SecondaryPressed", useTransitions);
            }
            else if (secondaryButton.IsPointerOver())
            {
                winrt::VisualStateManager::GoToState(*this, L"SecondaryPointerOver", useTransitions);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, L"Normal", useTransitions);
            }
        }
    }
}

The documentation for this class was generated from the following files:
  • SplitButton/SplitButton.h
  • SplitButton/SplitButton.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

SplitButtonAutomationPeer Class Reference

#include "SplitButtonAutomationPeer.h"

Inherits ReferenceTracker< SplitButtonAutomationPeer, winrt::implementation::SplitButtonAutomationPeerT >.

List of all members.

Public Member Functions

SplitButtonAutomationPeer (winrt::SplitButton const &owner)
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
void | Invoke ()

Private Member Functions

com_ptr< SplitButton > | GetImpl ()

Detailed Description

Definition at line 9 of file SplitButtonAutomationPeer.h.

Constructor & Destructor Documentation

SplitButtonAutomationPeer ( winrt::SplitButton const & owner )

Definition at line 13 of file SplitButtonAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

void Collapse ( )

Definition at line 76 of file SplitButtonAutomationPeer.cpp.

{
    if (auto splitButton = GetImpl())
    {
        splitButton->CloseFlyout();
    }
}

void Expand ( )

Definition at line 68 of file SplitButtonAutomationPeer.cpp.

{
    if (auto splitButton = GetImpl())
    {
        splitButton->OpenFlyout();
    }
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 53 of file SplitButtonAutomationPeer.cpp.

{
    winrt::ExpandCollapseState currentState = winrt::ExpandCollapseState::Collapsed;

    if (auto splitButton = GetImpl())
    {
        if (splitButton->IsFlyoutOpen())
        {
            currentState = winrt::ExpandCollapseState::Expanded;
        }
    }

    return currentState;
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 35 of file SplitButtonAutomationPeer.cpp.

{
    return winrt::AutomationControlType::SplitButton;
}

hstring GetClassNameCore ( )

Definition at line 30 of file SplitButtonAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::SplitButton>();
}

com_ptr< SplitButton > GetImpl ( ) [private]

Definition at line 40 of file SplitButtonAutomationPeer.cpp.

{
    com_ptr<SplitButton> impl = nullptr;

    if (auto splitButton = Owner().try_as<winrt::SplitButton>())
    {
        impl = winrt::get_self<SplitButton>(splitButton)->get_strong();
    }

    return impl;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file SplitButtonAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::ExpandCollapse ||
        patternInterface == winrt::PatternInterface::Invoke)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

void Invoke ( )

Definition at line 85 of file SplitButtonAutomationPeer.cpp.

{
    if (auto splitButton = GetImpl())
    {
        splitButton->Invoke();
    }
}

The documentation for this class was generated from the following files:
  • SplitButton/SplitButtonAutomationPeer.h
  • SplitButton/SplitButtonAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonClickEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonClickEventArgs Class Reference

#include "SplitButtonEventArgs.h"

Detailed Description

Definition at line 9 of file SplitButtonEventArgs.h.

The documentation for this class was generated from the following file:
  • SplitButton/SplitButtonEventArgs.h
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

SplitButtonProperties Class Reference

#include "SplitButton.properties.h"

Inherited by SplitButton.

List of all members.

Public Member Functions

SplitButtonProperties ()
winrt::event_token | Click (winrt::TypedEventHandler< winrt::SplitButton, winrt::SplitButtonClickEventArgs > const &value)
void | Click (winrt::event_token const &token)
void | Command (winrt::ICommand const &value)
winrt::ICommand | Command ()
winrt::IInspectable | CommandParameter ()
void | CommandParameter (winrt::IInspectable const &value)
void | Flyout (winrt::FlyoutBase const &value)
winrt::FlyoutBase | Flyout ()

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | CommandParameterProperty ()
static winrt::DependencyProperty | CommandProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FlyoutProperty ()
static void | OnCommandParameterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFlyoutPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::SplitButton,
winrt::SplitButtonClickEventArgs > > 		m_clickEventSource

Static Public Attributes

static GlobalDependencyProperty | s_CommandParameterProperty
static GlobalDependencyProperty | s_CommandProperty
static GlobalDependencyProperty | s_FlyoutProperty

Detailed Description

Definition at line 7 of file SplitButton.properties.h.

Constructor & Destructor Documentation

SplitButtonProperties ( )

Definition at line 20 of file SplitButton.properties.cpp.

    : m_clickEventSource{static_cast<SplitButton*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
void Click ( winrt::event_token const & token )
winrt::event_token Click ( winrt::TypedEventHandler< winrt::SplitButton, winrt::SplitButtonClickEventArgs > const & value )
void Command ( winrt::ICommand const & value )
winrt::ICommand Command ( )
winrt::IInspectable CommandParameter ( )
void CommandParameter ( winrt::IInspectable const & value )
static winrt::DependencyProperty CommandParameterProperty ( ) [inline, static]

Definition at line 22 of file SplitButton.properties.h.

{ return s_CommandParameterProperty; }

static winrt::DependencyProperty CommandProperty ( ) [inline, static]

Definition at line 21 of file SplitButton.properties.h.

{ return s_CommandProperty; }

static void EnsureProperties ( ) [static]
winrt::FlyoutBase Flyout ( )
void Flyout ( winrt::FlyoutBase const & value )
static winrt::DependencyProperty FlyoutProperty ( ) [inline, static]

Definition at line 23 of file SplitButton.properties.h.

{ return s_FlyoutProperty; }

static void OnCommandParameterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnFlyoutPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::SplitButton, winrt::SplitButtonClickEventArgs> > m_clickEventSource

Definition at line 32 of file SplitButton.properties.h.

GlobalDependencyProperty s_CommandParameterProperty [static]

Definition at line 26 of file SplitButton.properties.h.

GlobalDependencyProperty s_CommandProperty [static]

Definition at line 25 of file SplitButton.properties.h.

GlobalDependencyProperty s_FlyoutProperty [static]

Definition at line 27 of file SplitButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SplitButton.properties.h
  • Generated/SplitButton.properties.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonTestApi Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

SplitButtonTestApi Class Reference

#include "SplitButtonTestApi.h"

List of all members.

Static Public Member Functions

static bool | SimulateTouch ()
static void | SimulateTouch (bool value)

Detailed Description

Definition at line 8 of file SplitButtonTestApi.h.

Member Function Documentation

bool SimulateTouch ( ) [static]

Definition at line 11 of file SplitButtonTestApi.cpp.

{
    return SplitButtonTestHelper::SimulateTouch();
}

void SimulateTouch ( bool value ) [static]

Definition at line 16 of file SplitButtonTestApi.cpp.

{
    SplitButtonTestHelper::SimulateTouch(value);
}

The documentation for this class was generated from the following files:
  • SplitButton/SplitButtonTestApi.h
  • SplitButton/SplitButtonTestApi.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonTestHelper Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Private Member Functions | Static Private Attributes

SplitButtonTestHelper Class Reference

#include "SplitButtonTestHelper.h"

List of all members.

Static Public Member Functions

static void | SimulateTouch (bool value)
static bool | SimulateTouch ()

Static Private Member Functions

static com_ptr
< SplitButtonTestHelper > 		EnsureInstance ()

Static Private Attributes

static thread_local com_ptr
< SplitButtonTestHelper > 		s_instance

Detailed Description

Definition at line 6 of file SplitButtonTestHelper.h.

Member Function Documentation

com_ptr< SplitButtonTestHelper > EnsureInstance ( ) [static, private]

Definition at line 11 of file SplitButtonTestHelper.cpp.

{
    if (!s_instance)
    {
        s_instance = winrt::make_self<SplitButtonTestHelper>();
    }

    return s_instance;
}

void SimulateTouch ( bool value ) [static]

Definition at line 21 of file SplitButtonTestHelper.cpp.

{
    auto instance = EnsureInstance();
    instance->m_simulateTouch = value;
}

bool SimulateTouch ( ) [static]

Definition at line 27 of file SplitButtonTestHelper.cpp.

{
    auto instance = EnsureInstance();
    return instance->m_simulateTouch;
}

Member Data Documentation

thread_local com_ptr< SplitButtonTestHelper > s_instance [static, private]

Definition at line 16 of file SplitButtonTestHelper.h.

The documentation for this class was generated from the following files:
  • SplitButton/SplitButtonTestHelper.h
  • SplitButton/SplitButtonTestHelper.cpp
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions

SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > Class Template Reference

#include "SplitDataSourceBase.h"

List of all members.

Public Member Functions

AttachedDataType | AttachedData (int index)
void | AttachedData (int index, typename AttachedDataType attachedData)
std::shared_ptr< SplitVectorType > | GetVectorForItem (int index)
SplitVectorID | GetVectorIDForItem (int index)
void | MoveItemsToVector (int start, int end, typename SplitVectorID newVectorID)
void | MoveItemsToVector (typename SplitVectorID newVectorID)
void | MoveItemToVector (int index, typename SplitVectorID newVectorID)
void | ResetAttachedData (typename AttachedDataType attachedData)
void | ResetAttachedData ()

Protected Member Functions

void | Clear ()
virtual AttachedDataType | DefaultAttachedData ()=0
virtual SplitVectorID | DefaultVectorIDOnInsert ()=0
virtual T | GetAt (int index)=0
std::shared_ptr< SplitVectorType > | GetVector (SplitVectorID vectorID)
virtual int | IndexOf (const typename T &value)=0
int | IndexOfImpl (const typename T &value, typename SplitVectorID vectorID)
void | InitializeSplitVectors (std::vector< std::shared_ptr< SplitVectorType >> vectors)
void | OnClear ()
void | OnInsertAt (int startIndex, int count)
void | OnRemoveAt (int startIndex, int count)
int | RawDataSize ()
virtual int | Size ()=0
void | SyncAndInitVectorFlagsWithID (SplitVectorID defaultID, typename AttachedDataType defaultAttachedData)

Private Member Functions

int | GetPreferIndex (int index, SplitVectorID vectorID)
void | OnInsertAt (int index)
void | OnRemoveAt (int index)
void | OnReplace (int index)
int | RangeCount (int start, int end, SplitVectorID vectorID)

Detailed Description

template<typename T, typename SplitVectorID, typename AttachedDataType, int SplitVectorSize = static_cast<int>(SplitVectorID::Size)>
class SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >

Definition at line 139 of file SplitDataSourceBase.h.

Member Function Documentation

AttachedDataType AttachedData ( int index ) [inline]

Definition at line 149 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(index >= 0 && index < RawDataSize());
        return m_attachedData[index];
    }

void AttachedData | ( | int | index,
 |  | typename AttachedDataType | attachedData |
 | ) |  |  | [inline]

Definition at line 155 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(index >= 0 && index < RawDataSize());
        m_attachedData[index] = attachedData;
    }

void Clear ( ) [inline, protected]

Definition at line 305 of file SplitDataSourceBase.h.

    {
        OnClear();
    }

virtual AttachedDataType DefaultAttachedData ( ) [protected, pure virtual]
virtual SplitVectorID DefaultVectorIDOnInsert ( ) [protected, pure virtual]
virtual T GetAt ( int index ) [protected, pure virtual]
int GetPreferIndex | ( | int | index,
 |  | SplitVectorID | vectorID |
 | ) |  |  | [inline, private]

Definition at line 357 of file SplitDataSourceBase.h.

    {
        return RangeCount(0, index, vectorID);
    }

std::shared_ptr<SplitVectorType> GetVector ( SplitVectorID vectorID ) [inline, protected]

Definition at line 253 of file SplitDataSourceBase.h.

    {
        return m_splitVectors[static_cast<int>(vectorID)];
    }

std::shared_ptr<SplitVectorType> GetVectorForItem ( int index ) [inline]

Definition at line 174 of file SplitDataSourceBase.h.

    {
        if (index >= 0 && index < RawDataSize())
        {
            return m_splitVectors[static_cast<int>(m_flags[index])];
        }
        return nullptr;
    }

SplitVectorID GetVectorIDForItem ( int index ) [inline]

Definition at line 143 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(index >= 0 && index < RawDataSize());
        return m_flags[index];
    }

virtual int IndexOf ( const typename T & value ) [protected, pure virtual]
int IndexOfImpl | ( | const typename T & | value,
 |  | typename SplitVectorID | vectorID |
 | ) |  |  | [inline, protected]

Definition at line 230 of file SplitDataSourceBase.h.

    {
        const int indexInOriginalVector = IndexOf(value);
        int index = -1;
        if (indexInOriginalVector != -1)
        {
            auto vector = GetVectorForItem(indexInOriginalVector);
            if (vector && vector->GetVectorIDForItem() == vectorID)
            {
                index = vector->IndexFromIndexInOriginalVector(indexInOriginalVector);
            }
        }
        return index;
    }

void InitializeSplitVectors ( std::vector< std::shared_ptr< SplitVectorType >> vectors ) [inline, protected]

Definition at line 245 of file SplitDataSourceBase.h.

    {
        for (auto &vector: vectors)
        {
            m_splitVectors[static_cast<int>(vector->GetVectorIDForItem())] = vector;
        }
    }

void MoveItemsToVector | ( | int | start,
 |  | int | end,
 |  | typename SplitVectorID | newVectorID |
 | ) |  |  | [inline]

Definition at line 188 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(start >= 0 && end <= RawDataSize());
        for (int i = start; i < end; i++)
        {
            MoveItemToVector(i, newVectorID);
        }
    }

void MoveItemsToVector ( typename SplitVectorID newVectorID ) [inline]

Definition at line 183 of file SplitDataSourceBase.h.

    {
        MoveItemsToVector(0, RawDataSize(), newVectorID);
    }

void MoveItemToVector | ( | int | index,
 |  | typename SplitVectorID | newVectorID |
 | ) |  |  | [inline]

Definition at line 197 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(index >= 0 && index < RawDataSize());

        if (m_flags[index] != newVectorID)
        {
            // remove from the old vector
            if (auto splitVector = GetVectorForItem(index))
            {
                splitVector->RemoveAt(index);
            }

            // change flag
            m_flags[index] = newVectorID;

            // insert item to vector which matches with the newVectorID
            if (auto &toVector = m_splitVectors[static_cast<int>(newVectorID)])
            {
                const int pos = GetPreferIndex(index, newVectorID);

                const auto value = GetAt(index);
                toVector->InsertAt(pos, index, value);
            }
        }
    }

void OnClear ( ) [inline, protected]

Definition at line 259 of file SplitDataSourceBase.h.

    {
        // Clear all vectors
        for (auto &vector: m_splitVectors)
        {
            if (vector)
            {
                vector->Clear();
            }
        }

        m_flags.clear();
        m_attachedData.clear();
    }

void OnInsertAt | ( | int | startIndex,
 |  | int | count |
 | ) |  |  | [inline, protected]

Definition at line 282 of file SplitDataSourceBase.h.

    {
        for (int i = startIndex; i < startIndex + count; i++)
        {
            OnInsertAt(i);
        }
    }

void OnInsertAt ( int index ) [inline, private]

Definition at line 337 of file SplitDataSourceBase.h.

    {
        const auto vectorID = DefaultVectorIDOnInsert();
        const auto defaultAttachedData = DefaultAttachedData();
        const auto preferIndex = GetPreferIndex(index, vectorID);
        const auto data = GetAt(index);

        // Update mapping on all Vectors and Insert Item on vectorID vector;
        for (auto &vector: m_splitVectors)
        {
            if (vector)
            {
                vector->OnRawDataInsert(preferIndex, index, data, vectorID);
            }
        }

        m_flags.insert(m_flags.begin() + index, vectorID);
        m_attachedData.insert(m_attachedData.begin() + index, defaultAttachedData);
    }

void OnRemoveAt ( int index ) [inline, private]

Definition at line 311 of file SplitDataSourceBase.h.

    {
        auto vectorID = m_flags[index];

        // Update mapping on all Vectors and Remove Item on vectorID vector;
        for (auto &vector : m_splitVectors)
        {
            if (vector)
            {
                vector->OnRawDataRemove(index, vectorID);
            }
        }

        m_flags.erase(m_flags.begin() + index);
        m_attachedData.erase(m_attachedData.begin() + index);
    }

void OnRemoveAt | ( | int | startIndex,
 |  | int | count |
 | ) |  |  | [inline, protected]

Definition at line 274 of file SplitDataSourceBase.h.

    {
        for (int i = startIndex + count-1; i >= startIndex; i--)
        {
            OnRemoveAt(i);
        }
    }

void OnReplace ( int index ) [inline, private]

Definition at line 328 of file SplitDataSourceBase.h.

    {
        if (auto splitVector = GetVectorForItem(index))
        {
            auto value = GetAt(index);
            splitVector->Replace(index, value);
        }
    }

int RangeCount | ( | int | start,
 |  | int | end,
 |  | SplitVectorID | vectorID |
 | ) |  |  | [inline, private]

Definition at line 362 of file SplitDataSourceBase.h.

    {
        int count = 0;
        for (int i = start; i < end; i++)
        {
            if (m_flags[i] == vectorID)
            {
                count++;
            }
        }
        return count;
    }

int RawDataSize ( ) [inline, protected]

Definition at line 290 of file SplitDataSourceBase.h.

    {
        return static_cast<int>(m_flags.size());
    }

void ResetAttachedData ( typename AttachedDataType attachedData ) [inline]

Definition at line 166 of file SplitDataSourceBase.h.

    {
        for (int i = 0; i < RawDataSize(); i++)
        {
            m_attachedData[i] = attachedData;
        }
    }

void ResetAttachedData ( ) [inline]

Definition at line 161 of file SplitDataSourceBase.h.

    {
        ResetAttachedData(DefaultAttachedData());
    }

virtual int Size ( ) [protected, pure virtual]
void SyncAndInitVectorFlagsWithID | ( | SplitVectorID | defaultID,
 |  | typename AttachedDataType | defaultAttachedData |
 | ) |  |  | [inline, protected]

Definition at line 295 of file SplitDataSourceBase.h.

    {
        // Initialize the flags
        for (int i = 0; i < Size(); i++)
        {
            m_flags.push_back(defaultID);
            m_attachedData.push_back(defaultAttachedData);
        }
    }

The documentation for this class was generated from the following file:
  • NavigationView/SplitDataSourceBase.h
Generated on Sun Dec 1 2024 20:53:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitVector< T, SplitVectorID > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

SplitVector< T, SplitVectorID > Class Template Reference

#include "SplitDataSourceBase.h"

List of all members.

Public Member Functions

SplitVector (const ITrackerHandleManager *owner, typename SplitVectorID id, std::function< int(typename T const &value)> indexOfFunction)
void | Clear ()
winrt::IVector
< winrt::IInspectable > 		GetVector ()
SplitVectorID | GetVectorIDForItem ()
int | IndexFromIndexInOriginalVector (int indexInOriginalVector)
int | IndexOf (const typename T &value)
int | IndexToIndexInOriginalVector (int index)
void | InsertAt (int preferIndex, int indexInOriginalVector, typename T const &value)
void | OnRawDataInsert (int preferIndex, int indexInOriginalVector, typename T const &value, SplitVectorID vectorID)
void | OnRawDataRemove (int indexInOriginalVector, SplitVectorID vectorID)
void | RemoveAt (int indexInOriginalVector)
void | Replace (int indexInOriginalVector, typename T const &value)

Private Member Functions

int | Size ()

Private Attributes

tracker_ref< winrt::IVector
< typename T > > 		m_vector
SplitVectorID | m_vectorID

Detailed Description

template<typename T, typename SplitVectorID>
class SplitVector< T, SplitVectorID >

Definition at line 21 of file SplitDataSourceBase.h.

Constructor & Destructor Documentation

SplitVector | ( | const ITrackerHandleManager * | owner,
 |  | typename SplitVectorID | id,
 |  | std::function< int(typename T const &value)> | indexOfFunction |
 | ) |  |  | [inline]

Definition at line 24 of file SplitDataSourceBase.h.

        :m_vectorID(id)
        , m_vector(owner)
    {
        m_indexFunctionFromDataSource = indexOfFunction;

        m_vector.set(winrt::make<Vector<T, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()>>(
            [this](const T& value)
               {
                    return IndexOf(value);
               }));
    }

Member Function Documentation

void Clear ( ) [inline]

Definition at line 92 of file SplitDataSourceBase.h.

    {
        m_vector.get().Clear();
        m_indexesInOriginalVector.clear();
    }

winrt::IVector<winrt::IInspectable> GetVector ( ) [inline]

Definition at line 39 of file SplitDataSourceBase.h.

{ return m_vector.get(); }

SplitVectorID GetVectorIDForItem ( ) [inline]

Definition at line 37 of file SplitDataSourceBase.h.

{ return m_vectorID; }

int IndexFromIndexInOriginalVector ( int indexInOriginalVector ) [inline]

Definition at line 119 of file SplitDataSourceBase.h.

    {
        auto pos = std::find(m_indexesInOriginalVector.begin(), m_indexesInOriginalVector.end(), indexInOriginalVector);
        if (pos != m_indexesInOriginalVector.end())
        {
            return static_cast<int>(std::distance(m_indexesInOriginalVector.begin(), pos));
        }
        return -1;
    }

int IndexOf ( const typename T & value ) [inline]

Definition at line 107 of file SplitDataSourceBase.h.

    {
        const int indexInOriginalVector = m_indexFunctionFromDataSource(value);
        return IndexFromIndexInOriginalVector(indexInOriginalVector);
    }

int IndexToIndexInOriginalVector ( int index ) [inline]

Definition at line 113 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(index >= 0 && index < Size());
        return m_indexesInOriginalVector[index];
    }

void InsertAt | ( | int | preferIndex,
 |  | int | indexInOriginalVector,
 |  | typename T const & | value |
 | ) |  |  | [inline]

Definition at line 74 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(preferIndex >= 0);
        MUX_ASSERT(indexInOriginalVector >= 0);
        m_vector.get().InsertAt(preferIndex, value);
        m_indexesInOriginalVector.insert(m_indexesInOriginalVector.begin()+preferIndex, indexInOriginalVector);
    }

void OnRawDataInsert | ( | int | preferIndex,
 |  | int | indexInOriginalVector,
 |  | typename T const & | value,
 |  | SplitVectorID | vectorID |
 | ) |  |  | [inline]

Definition at line 58 of file SplitDataSourceBase.h.

    {
        for (auto& v : m_indexesInOriginalVector)
        {
            if (v >= indexInOriginalVector)
            {
                v++;
            }
        };

        if (m_vectorID == vectorID)
        {
            InsertAt(preferIndex, indexInOriginalVector, value);
        }
    }

void OnRawDataRemove | ( | int | indexInOriginalVector,
 |  | SplitVectorID | vectorID |
 | ) |  |  | [inline]

Definition at line 41 of file SplitDataSourceBase.h.

    {
        if (m_vectorID == vectorID)
        {
            RemoveAt(indexInOriginalVector);
        }

        for (auto& v : m_indexesInOriginalVector)
        {
            if (v > indexInOriginalVector)
            {
                v--;
            }
        };

    }

void RemoveAt ( int indexInOriginalVector ) [inline]

Definition at line 98 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(indexInOriginalVector >= 0);
        const auto index = static_cast<uint32_t>(IndexFromIndexInOriginalVector(indexInOriginalVector));
        MUX_ASSERT(index < m_indexesInOriginalVector.size());
        m_vector.get().RemoveAt(index);
        m_indexesInOriginalVector.erase(m_indexesInOriginalVector.begin() + index);
    }

void Replace | ( | int | indexInOriginalVector,
 |  | typename T const & | value |
 | ) |  |  | [inline]

Definition at line 82 of file SplitDataSourceBase.h.

    {
        MUX_ASSERT(indexInOriginalVector >= 0);

        auto index = IndexFromIndexInOriginalVector(indexInOriginalVector);
        auto vector = m_vector.get();
        vector.RemoveAt(index);
        vector.InsertAt(index, value);
    }

int Size ( ) [inline, private]

Definition at line 129 of file SplitDataSourceBase.h.

{ return  static_cast<int>(m_indexesInOriginalVector.size()); }

Member Data Documentation

tracker_ref<winrt::IVector<typename T> > m_vector [private]

Definition at line 133 of file SplitDataSourceBase.h.

SplitVectorID m_vectorID [private]

Definition at line 132 of file SplitDataSourceBase.h.

The documentation for this class was generated from the following file:
  • NavigationView/SplitDataSourceBase.h
Generated on Sun Dec 1 2024 20:53:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StackLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

StackLayout Class Reference

#include "StackLayout.h"

Inherits ReferenceTracker< StackLayout, winrt::implementation::StackLayoutT, VirtualizingLayout >, IFlowLayoutAlgorithmDelegates, OrientationBasedMeasures, and StackLayoutProperties.

List of all members.

Public Member Functions

StackLayout ()
winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForRealizationRect (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForTargetElement (int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::Rect | Algorithm_GetExtent (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds) override
winrt::Size | Algorithm_GetMeasureSize (int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::Size | Algorithm_GetProvisionalArrangeSize (int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context) override
void | Algorithm_OnElementMeasured (const winrt::UIElement &element, int index, const winrt::Size &availableSize, const winrt::Size &measureSize, const winrt::Size &desiredSize, const winrt::Size &provisionalArrangeSize, const winrt::VirtualizingLayoutContext &context) override
void | Algorithm_OnLineArranged (int, int, double, const winrt::VirtualizingLayoutContext &) override
bool | Algorithm_ShouldBreakLine (int index, double remainingSpace) override
winrt::Size | ArrangeOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize)
winrt::FlowLayoutAnchorInfo | GetAnchorForRealizationRect (winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context)
winrt::Rect | GetExtent (winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context, winrt::UIElement const &firstRealized, int firstRealizedItemIndex, winrt::Rect const &firstRealizedLayoutBounds, winrt::UIElement const &lastRealized, int lastRealizedItemIndex, winrt::Rect const &lastRealizedLayoutBounds)
void | InitializeForContextCore (winrt::VirtualizingLayoutContext const &context)
winrt::Size | MeasureOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize)
void | OnElementMeasured (winrt::UIElement const &element, int index, winrt::Size const &availableSize, winrt::Size const &measureSize, winrt::Size const &desiredSize, winrt::Size const &provisionalArrangeSize, winrt::VirtualizingLayoutContext const &context)
void | OnItemsChangedCore (winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | UninitializeForContextCore (winrt::VirtualizingLayoutContext const &context)

Private Member Functions

winrt::com_ptr< StackLayoutState > | GetAsStackState (const winrt::IInspectable &state)
double | GetAverageElementSize (winrt::Size availableSize, winrt::VirtualizingLayoutContext context, const winrt::com_ptr< StackLayoutState > &layoutState)
::FlowLayoutAlgorithm & | GetFlowAlgorithm (const winrt::VirtualizingLayoutContext &context)
void | InvalidateLayout ()
void | UpdateIndexBasedLayoutOrientation (const winrt::Orientation &orientation)

Detailed Description

Definition at line 13 of file StackLayout.h.

Constructor & Destructor Documentation

StackLayout ( )

Member Function Documentation

winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForRealizationRect | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForTargetElement | ( | int | targetIndex,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
winrt::Rect Algorithm_GetExtent | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | const winrt::UIElement & | firstRealized,
 |  | int | firstRealizedItemIndex,
 |  | const winrt::Rect & | firstRealizedLayoutBounds,
 |  | const winrt::UIElement & | lastRealized,
 |  | int | lastRealizedItemIndex,
 |  | const winrt::Rect & | lastRealizedLayoutBounds |
 | ) |  |  | [override]
winrt::Size Algorithm_GetMeasureSize | ( | int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
winrt::Size Algorithm_GetProvisionalArrangeSize | ( | int | index,
 |  | const winrt::Size & | measureSize,
 |  | winrt::Size const & | desiredSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
void Algorithm_OnElementMeasured | ( | const winrt::UIElement & | element,
 |  | int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::Size & | measureSize,
 |  | const winrt::Size & | desiredSize,
 |  | const winrt::Size & | provisionalArrangeSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
void Algorithm_OnLineArranged | ( | int | ,
 |  | int | ,
 |  | double | ,
 |  | const winrt::VirtualizingLayoutContext & |  |
 | ) |  |  | [inline, override]

Definition at line 89 of file StackLayout.h.

                                                                    {}

bool Algorithm_ShouldBreakLine | ( | int | index,
 |  | double | remainingSpace |
 | ) |  |  | [override]
winrt::Size ArrangeOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize
 | ) |  |
winrt::FlowLayoutAnchorInfo GetAnchorForRealizationRect | ( | winrt::Size const & | availableSize,
 |  | winrt::VirtualizingLayoutContext const & | context
 | ) |  |
winrt::com_ptr<StackLayoutState> GetAsStackState ( const winrt::IInspectable & state ) [inline, private]

Definition at line 104 of file StackLayout.h.

    {
        return winrt::get_self<StackLayoutState>(state.as<winrt::StackLayoutState>())->get_strong();
    }

double GetAverageElementSize | ( | winrt::Size | availableSize,
 |  | winrt::VirtualizingLayoutContext | context,
 |  | const winrt::com_ptr< StackLayoutState > & | layoutState |
 | ) |  |  | [private]
winrt::Rect GetExtent | ( | winrt::Size const & | availableSize,
 |  | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::UIElement const & | firstRealized,
 |  | int | firstRealizedItemIndex,
 |  | winrt::Rect const & | firstRealizedLayoutBounds,
 |  | winrt::UIElement const & | lastRealized,
 |  | int | lastRealizedItemIndex,
 |  | winrt::Rect const & | lastRealizedLayoutBounds
 | ) |  |
::FlowLayoutAlgorithm& GetFlowAlgorithm ( const winrt::VirtualizingLayoutContext & context ) [inline, private]

Definition at line 114 of file StackLayout.h.

    {
        return GetAsStackState(context.LayoutState())->FlowAlgorithm();
    }

void InitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )
void InvalidateLayout ( ) [inline, private]

Definition at line 109 of file StackLayout.h.

    {
        __super::InvalidateMeasure();
    }

winrt::Size MeasureOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize
 | ) |  |
void OnElementMeasured | ( | winrt::UIElement const & | element,
 |  | int | index,
 |  | winrt::Size const & | availableSize,
 |  | winrt::Size const & | measureSize,
 |  | winrt::Size const & | desiredSize,
 |  | winrt::Size const & | provisionalArrangeSize,
 |  | winrt::VirtualizingLayoutContext const & | context
 | ) |  |
void OnItemsChangedCore | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::IInspectable const & | source,
 |  | winrt::NotifyCollectionChangedEventArgs const & | args
 | ) |  |
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void UninitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )
void UpdateIndexBasedLayoutOrientation ( const winrt::Orientation & orientation ) [private]
The documentation for this class was generated from the following file:
  • Repeater/StackLayout.h
Generated on Sun Dec 1 2024 20:53:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StackLayoutProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

StackLayoutProperties Class Reference

#include "StackLayout.properties.h"

Inherited by StackLayout.

List of all members.

Public Member Functions

StackLayoutProperties ()
void | IsVirtualizationEnabled (bool value)
bool | IsVirtualizationEnabled ()
winrt::Orientation | Orientation ()
void | Orientation (winrt::Orientation const &value)
void | Spacing (double value)
double | Spacing ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsVirtualizationEnabledProperty ()
static void | OnIsVirtualizationEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | OrientationProperty ()
static winrt::DependencyProperty | SpacingProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IsVirtualizationEnabledProperty
static GlobalDependencyProperty | s_OrientationProperty
static GlobalDependencyProperty | s_SpacingProperty

Detailed Description

Definition at line 7 of file StackLayout.properties.h.

Constructor & Destructor Documentation

StackLayoutProperties ( )

Definition at line 20 of file StackLayout.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 62 of file StackLayout.properties.cpp.

{
    s_IsVirtualizationEnabledProperty = nullptr;
    s_OrientationProperty = nullptr;
    s_SpacingProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 25 of file StackLayout.properties.cpp.

{
    if (!s_IsVirtualizationEnabledProperty)
    {
        s_IsVirtualizationEnabledProperty =
            InitializeDependencyProperty(
                L"IsVirtualizationEnabled",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::StackLayout>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsVirtualizationEnabledPropertyChanged));
    }
    if (!s_OrientationProperty)
    {
        s_OrientationProperty =
            InitializeDependencyProperty(
                L"Orientation",
                winrt::name_of<winrt::Orientation>(),
                winrt::name_of<winrt::StackLayout>(),
                false /* isAttached */,
                ValueHelper<winrt::Orientation>::BoxValueIfNecessary(winrt::Orientation::Vertical),
                winrt::PropertyChangedCallback(&OnOrientationPropertyChanged));
    }
    if (!s_SpacingProperty)
    {
        s_SpacingProperty =
            InitializeDependencyProperty(
                L"Spacing",
                winrt::name_of<double>(),
                winrt::name_of<winrt::StackLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnSpacingPropertyChanged));
    }
}

void IsVirtualizationEnabled ( bool value )

Definition at line 93 of file StackLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<StackLayout*>(this)->SetValue(s_IsVirtualizationEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsVirtualizationEnabled ( )

Definition at line 101 of file StackLayout.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<StackLayout*>(this)->GetValue(s_IsVirtualizationEnabledProperty));
}

static winrt::DependencyProperty IsVirtualizationEnabledProperty ( ) [inline, static]

Definition at line 21 of file StackLayout.properties.h.

{ return s_IsVirtualizationEnabledProperty; }

void OnIsVirtualizationEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 69 of file StackLayout.properties.cpp.

{
    auto owner = sender.as<winrt::StackLayout>();
    winrt::get_self<StackLayout>(owner)->OnPropertyChanged(args);
}

void OnOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 77 of file StackLayout.properties.cpp.

{
    auto owner = sender.as<winrt::StackLayout>();
    winrt::get_self<StackLayout>(owner)->OnPropertyChanged(args);
}

void OnSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 85 of file StackLayout.properties.cpp.

{
    auto owner = sender.as<winrt::StackLayout>();
    winrt::get_self<StackLayout>(owner)->OnPropertyChanged(args);
}

winrt::Orientation Orientation ( )

Definition at line 114 of file StackLayout.properties.cpp.

{
    return ValueHelper<winrt::Orientation>::CastOrUnbox(static_cast<StackLayout*>(this)->GetValue(s_OrientationProperty));
}

void Orientation ( winrt::Orientation const & value )

Definition at line 106 of file StackLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<StackLayout*>(this)->SetValue(s_OrientationProperty, ValueHelper<winrt::Orientation>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty OrientationProperty ( ) [inline, static]

Definition at line 22 of file StackLayout.properties.h.

{ return s_OrientationProperty; }

void Spacing ( double value )

Definition at line 119 of file StackLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<StackLayout*>(this)->SetValue(s_SpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double Spacing ( )

Definition at line 127 of file StackLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<StackLayout*>(this)->GetValue(s_SpacingProperty));
}

static winrt::DependencyProperty SpacingProperty ( ) [inline, static]

Definition at line 23 of file StackLayout.properties.h.

{ return s_SpacingProperty; }

Member Data Documentation

GlobalDependencyProperty s_IsVirtualizationEnabledProperty [static]

Definition at line 25 of file StackLayout.properties.h.

GlobalDependencyProperty s_OrientationProperty [static]

Definition at line 26 of file StackLayout.properties.h.

GlobalDependencyProperty s_SpacingProperty [static]

Definition at line 27 of file StackLayout.properties.h.

The documentation for this class was generated from the following files:
  • Generated/StackLayout.properties.h
  • Generated/StackLayout.properties.cpp
Generated on Sun Dec 1 2024 20:53:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StackLayoutState Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Private Attributes

StackLayoutState Class Reference

#include "StackLayoutState.h"

Inherits ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing >.

List of all members.

Public Member Functions

::FlowLayoutAlgorithm & FlowAlgorithm ()
void | InitializeForContext (const winrt::VirtualizingLayoutContext &context, IFlowLayoutAlgorithmDelegates *callbacks)
double | MaxArrangeBounds () const
void | OnElementMeasured (int elementIndex, double majorSize, double minorSize)
void | OnMeasureStart ()
double | TotalElementSize () const
int | TotalElementsMeasured () const
void | UninitializeForContext (const winrt::VirtualizingLayoutContext &context)

Static Private Attributes

static const int | BufferSize = 100

Detailed Description

Definition at line 9 of file StackLayoutState.h.

Member Function Documentation

::FlowLayoutAlgorithm& FlowAlgorithm ( ) [inline]

Definition at line 20 of file StackLayoutState.h.

{ return m_flowAlgorithm; }

void InitializeForContext | ( | const winrt::VirtualizingLayoutContext & | context,
 |  | IFlowLayoutAlgorithmDelegates * | callbacks
 | ) |  |

Definition at line 12 of file StackLayoutState.cpp.

{
    m_flowAlgorithm.InitializeForContext(context, callbacks);
    if (m_estimationBuffer.size() == 0)
    {
        m_estimationBuffer.resize(BufferSize, 0.0f);
    }

    context.LayoutStateCore(*this);
}

double MaxArrangeBounds ( ) const [inline]

Definition at line 22 of file StackLayoutState.h.

{ return m_maxArrangeBounds; }

void OnElementMeasured | ( | int | elementIndex,
 |  | double | majorSize,
 |  | double | minorSize
 | ) |  |

Definition at line 30 of file StackLayoutState.cpp.

{
    const int estimationBufferIndex = elementIndex % m_estimationBuffer.size();
    const bool alreadyMeasured = m_estimationBuffer[estimationBufferIndex] != 0;
    if (!alreadyMeasured)
    {
        m_totalElementsMeasured++;
    }

    m_totalElementSize -= m_estimationBuffer[estimationBufferIndex];
    m_totalElementSize += majorSize;
    m_estimationBuffer[estimationBufferIndex] = majorSize;

    m_maxArrangeBounds = std::max(m_maxArrangeBounds, minorSize);
}

void OnMeasureStart ( )

Definition at line 46 of file StackLayoutState.cpp.

{
    m_maxArrangeBounds = 0.0;
}

double TotalElementSize ( ) const [inline]

Definition at line 21 of file StackLayoutState.h.

{ return m_totalElementSize; }

int TotalElementsMeasured ( ) const [inline]

Definition at line 23 of file StackLayoutState.h.

{ return m_totalElementsMeasured; }

void UninitializeForContext ( const winrt::VirtualizingLayoutContext & context )

Definition at line 25 of file StackLayoutState.cpp.

{
    m_flowAlgorithm.UninitializeForContext(context);
}

Member Data Documentation

const int BufferSize = 100 [static, private]

Definition at line 34 of file StackLayoutState.h.

The documentation for this class was generated from the following files:
  • Repeater/StackLayoutState.h
  • Repeater/StackLayoutState.cpp
Generated on Sun Dec 1 2024 20:53:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

SwipeControl Class Reference

#include "SwipeControl.h"

Inherits ReferenceTracker< SwipeControl, winrt::implementation::SwipeControlT >, and SwipeControlProperties.

List of all members.

Public Member Functions

SwipeControl ()
virtual | ~SwipeControl ()
void | Close ()
void | CustomAnimationStateEntered (winrt::InteractionTrackerCustomAnimationStateEnteredArgs const &args)
winrt::SwipeItems | GetCurrentItems ()
bool | GetIsIdle ()
bool | GetIsOpen ()
void | IdleStateEntered (winrt::InteractionTrackerIdleStateEnteredArgs const &args)
void | InertiaStateEntered (winrt::InteractionTrackerInertiaStateEnteredArgs const &args)
void | InteractingStateEntered (winrt::InteractionTrackerInteractingStateEnteredArgs const &args)
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | OnApplyTemplate ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RequestIgnored (winrt::InteractionTrackerRequestIgnoredArgs const &args)
void | ValuesChanged (winrt::InteractionTrackerValuesChangedArgs const &args)

Static Public Member Functions

static winrt::SwipeControl | GetLastInteractedWithSwipeControl ()

Private Member Functions

void | AlignStackPanel ()
void | AttachDismissingHandlers ()
void | AttachEventHandlers ()
void | CloseIfNotRemainOpenExecuteItem ()
void | CloseWithoutAnimation ()
void | ConfigurePositionInertiaRestingValues ()
void | CreateBottomContent ()
void | CreateContent (const winrt::SwipeItems &items)
void | CreateLeftContent ()
void | CreateRightContent ()
void | CreateTopContent ()
void | CurrentXamlRootChanged (const winrt::XamlRoot &sender, const winrt::XamlRootChangedEventArgs &args)
void | DetachDismissingHandlers ()
void | DetachEventHandlers (bool useSafeGet)
void | DismissSwipeOnAcceleratorKeyActivator (const winrt::Windows::UI::Core::CoreDispatcher &sender, const winrt::AcceleratorKeyEventArgs &args)
void | DismissSwipeOnAnExternalTap (winrt::Point const &tapPoint)
void | EnsureClip ()
winrt::Visual | FindVisualInteractionSourceVisual ()
std::wstring | GetAnimationTarget (winrt::UIElement child)
winrt::AppBarButton | GetSwipeItemButton (const winrt::SwipeItem &swipeItem)
void | GetTemplateParts ()
winrt::SwipeControl | GetThis ()
void | InitializeInteractionTracker ()
void | InputEaterGridTapped (const winrt::IInspectable &, const winrt::TappedRoutedEventArgs &args)
void | OnBottomItemsChanged (const winrt::IObservableVector< winrt::SwipeItem > &sender, const winrt::IVectorChangedEventArgs args)
void | OnBottomItemsCollectionChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnLeftItemsChanged (const winrt::IObservableVector< winrt::SwipeItem > &sender, const winrt::IVectorChangedEventArgs args)
void | OnLeftItemsCollectionChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnLoaded (const winrt::IInspectable &, const winrt::RoutedEventArgs &)
void | OnPointerPressedEvent (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnRightItemsChanged (const winrt::IObservableVector< winrt::SwipeItem > &sender, const winrt::IVectorChangedEventArgs args)
void | OnRightItemsCollectionChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | OnSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnSwipeContentStackPanelSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnTopItemsChanged (const winrt::IObservableVector< winrt::SwipeItem > &sender, const winrt::IVectorChangedEventArgs args)
void | OnTopItemsCollectionChanged (const winrt::DependencyPropertyChangedEventArgs &)
void | PopulateContentItems ()
void | SetupClipAnimation ()
void | SetupExecuteExpressionAnimation ()
void | ThrowIfHasVerticalAndHorizontalContent (bool IsHorizontal=false)
void | TryGetSwipeVisuals ()
void | UpdateColors ()
void | UpdateColorsIfExecuteItem ()
void | UpdateColorsIfRevealItems ()
void | UpdateExecuteBackgroundColor (const winrt::SwipeItem &swipeItem)
void | UpdateExecuteForegroundColor (const winrt::SwipeItem &swipeItem)
void | UpdateIsOpen (bool isOpen)
void | UpdateThresholdReached (float value)

Static Private Member Functions

static const std::wstring | blockFarContentPropertyName ()
static const std::wstring | blockNearContentPropertyName ()
static wstring_view | DirectionToInset (const CreatedContent &createdContent)
static const std::wstring | foregroundVisualPropertyName ()
static const std::wstring | hasBottomContentPropertyName ()
static const std::wstring | hasLeftContentPropertyName ()
static const std::wstring | hasRightContentPropertyName ()
static const std::wstring | hasTopContentPropertyName ()
static const std::wstring | isFarOpenPropertyName ()
static const std::wstring | isHorizontalPropertyName ()
static const std::wstring | isNearContentPropertyName ()
static const std::wstring | isNearOpenPropertyName ()
static bool | IsTranslationFacadeAvailableForSwipeControl (const winrt::UIElement &element)
static const std::wstring | maxThresholdPropertyName ()
static const std::wstring | swipeContentSizeParameterName ()
static const std::wstring | swipeContentVisualPropertyName ()
static const std::wstring | swipeRootVisualPropertyName ()
static const std::wstring | trackerPropertyName ()

Private Attributes

winrt::CoreAcceleratorKeys::AcceleratorKeyActivated_revoker | m_acceleratorKeyActivatedRevoker

Detailed Description

Definition at line 13 of file SwipeControl.h.

Constructor & Destructor Documentation

SwipeControl ( )

Definition at line 24 of file SwipeControl.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_SwipeControl);
    SetDefaultStyleKey(this);
}

~SwipeControl ( ) [virtual]

Definition at line 30 of file SwipeControl.cpp.

{
    DetachEventHandlers(true /*useSafeGet*/);

    if (auto lastInteractedWithSwipeControl = s_lastInteractedWithSwipeControl.get())
    {
        if (lastInteractedWithSwipeControl.get() == this)
        {
            s_lastInteractedWithSwipeControl = nullptr;
            if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
            {
                globalTestHooks->NotifyLastInteractedWithSwipeControlChanged();
            }
        }
    }
}

Member Function Documentation

void AlignStackPanel ( ) [private]

Definition at line 1086 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_currentItems.get().Size() > 0)
    {
        switch (m_currentItems.get().Mode())
        {
        case winrt::SwipeMode::Execute:
        {
            if (m_isHorizontal)
            {
                m_swipeContentStackPanel.get().HorizontalAlignment(winrt::HorizontalAlignment::Stretch);
                m_swipeContentStackPanel.get().VerticalAlignment(winrt::VerticalAlignment::Center);
            }
            else
            {
                m_swipeContentStackPanel.get().HorizontalAlignment(winrt::HorizontalAlignment::Center);
                m_swipeContentStackPanel.get().VerticalAlignment(winrt::VerticalAlignment::Stretch);
            }
            break;
        }
        case winrt::SwipeMode::Reveal:
        {
            if (m_isHorizontal)
            {
                const auto swipeContentStackPanelHorizontalAlignment = m_createdContent == CreatedContent::Left ? winrt::HorizontalAlignment::Left :
                    m_createdContent == CreatedContent::Right ? winrt::HorizontalAlignment::Right :
                    winrt::HorizontalAlignment::Stretch;

                m_swipeContentStackPanel.get().HorizontalAlignment(swipeContentStackPanelHorizontalAlignment);
                m_swipeContentStackPanel.get().VerticalAlignment(winrt::VerticalAlignment::Center);
            }
            else
            {
                const auto swipeContentStackPanelVerticalAlignment = m_createdContent == CreatedContent::Top ? winrt::VerticalAlignment::Top :
                    m_createdContent == CreatedContent::Bottom ? winrt::VerticalAlignment::Bottom :
                    winrt::VerticalAlignment::Stretch;

                m_swipeContentStackPanel.get().HorizontalAlignment(winrt::HorizontalAlignment::Center);
                m_swipeContentStackPanel.get().VerticalAlignment(swipeContentStackPanelVerticalAlignment);
            }
            break;
        }
        default:
            assert(false);
            break;
        }
    }
}

void AttachDismissingHandlers ( ) [private]

Definition at line 673 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    DetachDismissingHandlers();

    if (auto xamlRoot = this->XamlRoot())
    {
        if (const auto xamlRootContent = xamlRoot.Content())
        {
            m_xamlRootPointerPressedEventRevoker = AddRoutedEventHandler<RoutedEventType::PointerPressed>(
                xamlRootContent,
                [this](auto const&, auto const& args)
                {
                    DismissSwipeOnAnExternalTap(args.GetCurrentPoint(nullptr).Position());
                },
                true /*handledEventsToo*/);

            m_xamlRootKeyDownEventRevoker = AddRoutedEventHandler<RoutedEventType::KeyDown>(
                xamlRootContent,
                [this](auto const&, auto const& args)
                {
                    CloseIfNotRemainOpenExecuteItem();
                },
                true /*handledEventsToo*/);
        }

        m_xamlRootChangedRevoker = xamlRoot.Changed(winrt::auto_revoke, { this, &SwipeControl::CurrentXamlRootChanged });
    }

    // TODO: We do not have direct analogue for AcceleratorKeyActivated with DispatcherQueue in Islands/ win32. Please refer Task# 30013704 for  more details.
    if (auto coreWindow = winrt::CoreWindow::GetForCurrentThread())
    {
        if (auto dispatcher = coreWindow.Dispatcher())
        {
            m_acceleratorKeyActivatedRevoker = dispatcher.AcceleratorKeyActivated(winrt::auto_revoke, { this, &SwipeControl::DismissSwipeOnAcceleratorKeyActivator });
        }
    }
}

void AttachEventHandlers ( ) [private]

Definition at line 521 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    MUX_ASSERT(m_loadedToken.value == 0);
    m_loadedToken = Loaded({ this, &SwipeControl::OnLoaded });
    m_hasInitialLoadedEventFired = false;

    MUX_ASSERT(m_onSizeChangedToken.value == 0);
    m_onSizeChangedToken = SizeChanged({ this, &SwipeControl::OnSizeChanged });

    MUX_ASSERT(m_onSwipeContentStackPanelSizeChangedToken.value == 0);
    m_onSwipeContentStackPanelSizeChangedToken = m_swipeContentStackPanel.get().SizeChanged({ this, &SwipeControl::OnSwipeContentStackPanelSizeChanged });

    // also get any action from any inside button, or a clickable/tappable control
    if (!m_onPointerPressedEventHandler)
    {
        m_onPointerPressedEventHandler.set(winrt::box_value<winrt::PointerEventHandler>({ this, &SwipeControl::OnPointerPressedEvent }));
        AddHandler(winrt::UIElement::PointerPressedEvent(), m_onPointerPressedEventHandler.get(), true);
    }

    MUX_ASSERT(m_inputEaterTappedToken.value == 0);
    m_inputEaterTappedToken = m_inputEater.get().Tapped({ this, &SwipeControl::InputEaterGridTapped });
}

static const std::wstring blockFarContentPropertyName ( ) [inline, static, private]

Definition at line 198 of file SwipeControl.h.

{ return s_blockFarContentPropertyName.data(); }

static const std::wstring blockNearContentPropertyName ( ) [inline, static, private]

Definition at line 196 of file SwipeControl.h.

{ return s_blockNearContentPropertyName.data(); }

void Close ( )

Definition at line 49 of file SwipeControl.cpp.

{
    CheckThread();

    if (m_isOpen && !m_lastActionWasClosing && !m_isInteracting)
    {
        m_lastActionWasClosing = true;
        if (!m_isIdle)
        {
            winrt::float3 initialPosition{ 0.0f };
            switch (m_createdContent)
            {
            case CreatedContent::Left:
                initialPosition.x = static_cast<float>(-m_swipeContentStackPanel.get().ActualWidth());
                break;
            case CreatedContent::Top:
                initialPosition.y = static_cast<float>(-m_swipeContentStackPanel.get().ActualHeight());
                break;
            case CreatedContent::Right:
                initialPosition.x = static_cast<float>(m_swipeContentStackPanel.get().ActualWidth());
                break;
            case CreatedContent::Bottom:
                initialPosition.y = static_cast<float>(m_swipeContentStackPanel.get().ActualHeight());
                break;
            case CreatedContent::None:
                break;
            default:
                assert(false);
            }
            m_interactionTracker.get().TryUpdatePosition(initialPosition);
        }

        winrt::float3 addedVelocity{ 0.0f };
        switch (m_createdContent)
        {
        case CreatedContent::Left:
            addedVelocity.x = c_MinimumCloseVelocity;
            break;
        case CreatedContent::Top:
            addedVelocity.y = c_MinimumCloseVelocity;
            break;
        case CreatedContent::Right:
            addedVelocity.x = -c_MinimumCloseVelocity;
            break;
        case CreatedContent::Bottom:
            addedVelocity.y = -c_MinimumCloseVelocity;
            break;
        case CreatedContent::None:
            break;
        default:
            assert(false);
        }
        m_interactionTracker.get().TryUpdatePositionWithAdditionalVelocity(addedVelocity);
    }
}

void CloseIfNotRemainOpenExecuteItem ( ) [private]

Definition at line 1016 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_currentItems &&
        m_currentItems.get().Mode() == winrt::SwipeMode::Execute &&
        m_currentItems.get().Size() > 0 &&
        m_currentItems.get().GetAt(0).BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::RemainOpen &&
        m_isOpen)
    {
        //If we have a Mode set to Execute, and an item with BehaviorOnInvoked set to RemainOpen, we do not want to close, so no-op
        return;
    }
    Close();
}

void CloseWithoutAnimation ( ) [private]

Definition at line 1004 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    const bool wasIdle = m_isIdle;
    m_interactionTracker.get().TryUpdatePosition({ 0.0f, 0.0f, 0.0f });
    if (wasIdle)
    {
        IdleStateEntered(nullptr);
    }
}

void ConfigurePositionInertiaRestingValues ( ) [private]

Definition at line 890 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_isHorizontal)
    {
        winrt::IVector<winrt::InteractionTrackerInertiaModifier> xModifiers = winrt::make<Vector<winrt::InteractionTrackerInertiaModifier>>();

        winrt::ExpressionAnimation leftCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasLeftContentPropertyName() + L" && !this.Target." + isFarOpenPropertyName() + L" && this.Target.NaturalRestingPosition.x <= -1 * (this.Target." + isNearOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
        leftCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
        leftCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
        winrt::ExpressionAnimation leftRestingPoint = m_compositor.get().CreateExpressionAnimation(L"-" + swipeContentSizeParameterName());
        leftRestingPoint.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
        winrt::InteractionTrackerInertiaRestingValue leftOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
        leftOpen.Condition(leftCondition);
        leftOpen.RestingValue(leftRestingPoint);
        xModifiers.Append(leftOpen);

        winrt::ExpressionAnimation rightCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasRightContentPropertyName() + L" && !this.Target." + isNearOpenPropertyName() + L" && this.Target.NaturalRestingPosition.x >= (this.Target." + isFarOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
        rightCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
        rightCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
        winrt::ExpressionAnimation rightRestingValue = m_compositor.get().CreateExpressionAnimation(s_swipeContentSizeParameterName);
        rightRestingValue.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
        winrt::InteractionTrackerInertiaRestingValue rightOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
        rightOpen.Condition(rightCondition);
        rightOpen.RestingValue(rightRestingValue);
        xModifiers.Append(rightOpen);

        winrt::ExpressionAnimation condition = m_compositor.get().CreateExpressionAnimation(L"true");
        winrt::ExpressionAnimation restingValue = m_compositor.get().CreateExpressionAnimation(L"0");
        winrt::InteractionTrackerInertiaRestingValue neutralX = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
        neutralX.Condition(condition);
        neutralX.RestingValue(restingValue);
        xModifiers.Append(neutralX);

        m_interactionTracker.get().ConfigurePositionXInertiaModifiers(xModifiers);
    }
    else
    {
        winrt::IVector<winrt::InteractionTrackerInertiaModifier> yModifiers = winrt::make<Vector<winrt::InteractionTrackerInertiaModifier>>();

        winrt::ExpressionAnimation topCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasTopContentPropertyName() + L" && !this.Target." + isFarOpenPropertyName() + L" && this.Target.NaturalRestingPosition.y <= -1 * (this.Target." + isNearOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
        topCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
        topCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
        winrt::ExpressionAnimation topRestingValue = m_compositor.get().CreateExpressionAnimation(L"-" + swipeContentSizeParameterName());
        topRestingValue.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
        winrt::InteractionTrackerInertiaRestingValue topOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
        topOpen.Condition(topCondition);
        topOpen.RestingValue(topRestingValue);
        yModifiers.Append(topOpen);

        winrt::ExpressionAnimation bottomCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasBottomContentPropertyName() + L" && !this.Target." + isNearOpenPropertyName() + L" && this.Target.NaturalRestingPosition.y >= (this.Target." + isFarOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
        bottomCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
        bottomCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
        winrt::ExpressionAnimation bottomRestingValue = m_compositor.get().CreateExpressionAnimation(s_swipeContentSizeParameterName);
        bottomRestingValue.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
        winrt::InteractionTrackerInertiaRestingValue bottomOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
        bottomOpen.Condition(bottomCondition);
        bottomOpen.RestingValue(bottomRestingValue);
        yModifiers.Append(bottomOpen);

        winrt::ExpressionAnimation condition = m_compositor.get().CreateExpressionAnimation(L"true");
        winrt::ExpressionAnimation restingValue = m_compositor.get().CreateExpressionAnimation(L"0");
        winrt::InteractionTrackerInertiaRestingValue neutralY = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
        neutralY.Condition(condition);
        neutralY.RestingValue(restingValue);
        yModifiers.Append(neutralY);

        m_interactionTracker.get().ConfigurePositionYInertiaModifiers(yModifiers);
    }
}

void CreateBottomContent ( ) [private]

Definition at line 1050 of file SwipeControl.cpp.

{
    if (auto items = BottomItems())
    {
        m_createdContent = CreatedContent::Bottom;
        CreateContent(items);
    }
}

void CreateContent ( const winrt::SwipeItems & items ) [private]

Definition at line 1068 of file SwipeControl.cpp.

{
    if (m_swipeContentStackPanel && m_swipeContentStackPanel.get().Children())
    {
        m_swipeContentStackPanel.get().Children().Clear();
    }

    m_currentItems.set(items);
    if (m_currentItems)
    {
        AlignStackPanel();
        PopulateContentItems();
        SetupExecuteExpressionAnimation();
        SetupClipAnimation();
        UpdateColors();
    }
}

void CreateLeftContent ( ) [private]

Definition at line 1032 of file SwipeControl.cpp.

{
    if (auto items = LeftItems())
    {
        m_createdContent = CreatedContent::Left;
        CreateContent(items);
    }
}

void CreateRightContent ( ) [private]

Definition at line 1041 of file SwipeControl.cpp.

{
    if (auto items = RightItems())
    {
        m_createdContent = CreatedContent::Right;
        CreateContent(items);
    }
}

void CreateTopContent ( ) [private]

Definition at line 1059 of file SwipeControl.cpp.

{
    if (auto items = TopItems())
    {
        m_createdContent = CreatedContent::Top;
        CreateContent(items);
    }
}

void CurrentXamlRootChanged | ( | const winrt::XamlRoot & | sender,
 |  | const winrt::XamlRootChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 729 of file SwipeControl.cpp.

{
    CloseIfNotRemainOpenExecuteItem();
}

void CustomAnimationStateEntered ( winrt::InteractionTrackerCustomAnimationStateEnteredArgs const & args )

Definition at line 161 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_isInteracting = true;

    if (m_isIdle)
    {
        m_isIdle = false;
        if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
        {
            globalTestHooks->NotifyIdleStatusChanged(*this);
        }
    }
}

void DetachDismissingHandlers ( ) [private]

Definition at line 713 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_xamlRootPointerPressedEventRevoker.revoke();
    m_xamlRootKeyDownEventRevoker.revoke();
    m_xamlRootChangedRevoker.revoke();

    m_acceleratorKeyActivatedRevoker.revoke();
}

void DetachEventHandlers ( bool useSafeGet ) [private]

Definition at line 546 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);

    if (m_loadedToken.value != 0)
    {
        Loaded(m_loadedToken);
        m_loadedToken.value = 0;
    }

    if (m_onSizeChangedToken.value != 0)
    {
        SizeChanged(m_onSizeChangedToken);
        m_onSizeChangedToken.value = 0;
    }

    if (m_onSwipeContentStackPanelSizeChangedToken.value != 0)
    {
        if (auto swipeContentStackPanel = useSafeGet ? m_swipeContentStackPanel.safe_get() : m_swipeContentStackPanel.get())
        {
            swipeContentStackPanel.SizeChanged(m_onSwipeContentStackPanelSizeChangedToken);
        }
        m_onSwipeContentStackPanelSizeChangedToken.value = 0;
    }

    if (m_onPointerPressedEventHandler)
    {
        RemoveHandler(winrt::UIElement::PointerPressedEvent(), m_onPointerPressedEventHandler.get());
        m_onPointerPressedEventHandler.set(nullptr);
    }

    if (m_inputEaterTappedToken.value != 0)
    {
        if (auto inputEater = useSafeGet ? m_inputEater.safe_get() : m_inputEater.get())
        {
            inputEater.Tapped(m_inputEaterTappedToken);
        }
        m_inputEaterTappedToken.value = 0;
    }

    DetachDismissingHandlers();
}

wstring_view DirectionToInset ( const CreatedContent & createdContent ) [static, private]

Definition at line 1656 of file SwipeControl.cpp.

{
    switch (createdContent)
    {
    case CreatedContent::Right:
        return s_leftInsetTargetName;
    case CreatedContent::Left:
        return s_rightInsetTargetName;
    case CreatedContent::Bottom:
        return s_topInsetTargetName;
    case CreatedContent::Top:
        return s_bottomInsetTargetName;
    case CreatedContent::None:
        return L"";
    default:
        assert(false);
        return L"";
    }
}

void DismissSwipeOnAcceleratorKeyActivator | ( | const winrt::Windows::UI::Core::CoreDispatcher & | sender,
 |  | const winrt::AcceleratorKeyEventArgs & | args |
 | ) |  |  | [private]

Definition at line 724 of file SwipeControl.cpp.

{
    CloseIfNotRemainOpenExecuteItem();
}

void DismissSwipeOnAnExternalTap ( winrt::Point const & tapPoint ) [private]

Definition at line 734 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    const winrt::GeneralTransform transform = TransformToVisual(nullptr);
    const winrt::Point p(0, 0);

    // start of the swipe control
    const auto transformedElementOrigin = transform.TransformPoint(p);

    // If point is not within the item's bounds, close it.
    if (*this && tapPoint.X < transformedElementOrigin.X || tapPoint.Y < transformedElementOrigin.Y ||
        (static_cast<double>(tapPoint.X) - transformedElementOrigin.X) > ActualWidth() ||
        (static_cast<double>(tapPoint.Y) - transformedElementOrigin.Y) > ActualHeight())
    {
        CloseIfNotRemainOpenExecuteItem();
    }
}

void EnsureClip ( ) [private]

Definition at line 994 of file SwipeControl.cpp.

{
    const float width = static_cast<float>(ActualWidth());
    const float height = static_cast<float>(ActualHeight());
    const winrt::Rect rect = { 0.0f, 0.0f, width, height };
    winrt::Microsoft::UI::Xaml::Media::RectangleGeometry rectangleGeometry;
    rectangleGeometry.Rect(rect);
    Clip(rectangleGeometry);
}

winrt::Visual FindVisualInteractionSourceVisual ( ) [private]

Definition at line 962 of file SwipeControl.cpp.

{
    winrt::Visual visualInteractionSource = nullptr;

    // Don't walk up the tree too far largely as an optimization for when SwipeControl isn't used
    // with a list.  The general-case when using swipe with a ListView will probably have the
    // LVIP as the visual parent of the SwipeControl but enabling checking for a few more
    // levels above that could enable more complex list item templates where SwipeControl
    // isn't the root element.
    const int maxSteps = 5;
    int steps = 0;
    auto current = winrt::VisualTreeHelper::GetParent(*this);
    while (current && steps < maxSteps)
    {
        if (auto lvip = current.try_as<winrt::ListViewItemPresenter>())
        {
            visualInteractionSource = winrt::ElementCompositionPreview::GetElementVisual(lvip);
            break;
        }

        current = winrt::VisualTreeHelper::GetParent(current);
        ++steps;
    }

    if (!visualInteractionSource)
    {
        visualInteractionSource = winrt::ElementCompositionPreview::GetElementVisual(*this);
    }

    return visualInteractionSource;
}

static const std::wstring foregroundVisualPropertyName ( ) [inline, static, private]

Definition at line 214 of file SwipeControl.h.

{ return s_foregroundVisualPropertyName.data(); }

std::wstring GetAnimationTarget ( winrt::UIElement child ) [private]

Definition at line 1634 of file SwipeControl.cpp.

{
    return s_translationPropertyName.data();
}

winrt::SwipeItems GetCurrentItems ( ) [inline]

Definition at line 52 of file SwipeControl.h.

{ return m_currentItems.get(); }

bool GetIsIdle ( )

Definition at line 384 of file SwipeControl.cpp.

{
    return m_isIdle;
}

bool GetIsOpen ( )

Definition at line 379 of file SwipeControl.cpp.

{
    return m_isOpen;
}

winrt::SwipeControl GetLastInteractedWithSwipeControl ( ) [static]

Definition at line 370 of file SwipeControl.cpp.

{
    if (auto lastInteractedWithSwipeControl = s_lastInteractedWithSwipeControl.get())
    {
        return *lastInteractedWithSwipeControl;
    }
    return nullptr;
}

winrt::AppBarButton GetSwipeItemButton ( const winrt::SwipeItem & swipeItem ) [private]

Definition at line 1225 of file SwipeControl.cpp.

{
    winrt::AppBarButton itemAsButton;
    winrt::get_self<SwipeItem>(swipeItem)->GenerateControl(itemAsButton, m_swipeItemStyle.get());

    if (!swipeItem.Background())
    {
        if (auto lookedUpBrush = SharedHelpers::FindInApplicationResources(m_currentItems.get().Mode() == winrt::SwipeMode::Reveal ? s_swipeItemBackgroundResourceName : m_thresholdReached ? s_executeSwipeItemPostThresholdBackgroundResourceName : s_executeSwipeItemPreThresholdBackgroundResourceName))
        {
            itemAsButton.Background(lookedUpBrush.try_as<winrt::Brush>());
        }
    }

    if (!swipeItem.Foreground())
    {
        if (auto lookedUpBrush = SharedHelpers::FindInApplicationResources(m_currentItems.get().Mode() == winrt::SwipeMode::Reveal ? s_swipeItemForegroundResourceName : m_thresholdReached ? s_executeSwipeItemPostThresholdForegroundResourceName : s_executeSwipeItemPreThresholdForegroundResourceName))
        {
            itemAsButton.Foreground(lookedUpBrush.try_as<winrt::Brush>());
        }
    }

    if (m_isHorizontal)
    {
        itemAsButton.Height(ActualHeight());
        if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
        {
            itemAsButton.Width(ActualWidth());
        }
    }
    else
    {
        itemAsButton.Width(ActualWidth());
        if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
        {
            itemAsButton.Height(ActualHeight());
        }
    }
    return itemAsButton;
}

void GetTemplateParts ( ) [private]

Definition at line 753 of file SwipeControl.cpp.

{
    winrt::IControlProtected thisAsControlProtected = *this;
    m_rootGrid.set(GetTemplateChildT<winrt::Grid>(s_rootGridName, thisAsControlProtected));
    m_inputEater.set(GetTemplateChildT<winrt::Grid>(s_inputEaterName, thisAsControlProtected));
    m_content.set(GetTemplateChildT<winrt::Grid>(s_ContentRootName, thisAsControlProtected));
    m_swipeContentRoot.set(GetTemplateChildT<winrt::Grid>(s_swipeContentRootName, thisAsControlProtected));
    m_swipeContentStackPanel.set(GetTemplateChildT<winrt::StackPanel>(s_swipeContentStackPanelName, thisAsControlProtected));

    //Before RS5 these elements were not in the template but were instead created in code behind when the swipe content was created.
    //Post RS5 the code behind expects these elements to always be in the tree.
    if (!m_swipeContentRoot)
    {
        winrt::Grid swipeContentRoot;
        swipeContentRoot.Name(L"SwipeContentRoot");
        m_swipeContentRoot.set(swipeContentRoot);
        m_rootGrid.get().Children().InsertAt(0, swipeContentRoot);
    }
    if (!m_swipeContentStackPanel)
    {
        winrt::StackPanel swipeContentStackPanel;
        swipeContentStackPanel.Name(L"SwipeContentStackPanel");
        m_swipeContentStackPanel.set(swipeContentStackPanel);
        m_swipeContentRoot.get().Children().Append(swipeContentStackPanel);
    }
    m_swipeContentStackPanel.get().Orientation(m_isHorizontal ? winrt::Orientation::Horizontal : winrt::Orientation::Vertical);

    if (auto lookedUpStyle = SharedHelpers::FindInApplicationResources(s_swipeItemStyleName))
    {
        m_swipeItemStyle.set(lookedUpStyle.try_as<winrt::Style>());
    }
}

winrt::SwipeControl GetThis ( ) [private]

Definition at line 1639 of file SwipeControl.cpp.

{
    return *this;
}

static const std::wstring hasBottomContentPropertyName ( ) [inline, static, private]

Definition at line 207 of file SwipeControl.h.

{ return s_hasBottomContentPropertyName.data(); }

static const std::wstring hasLeftContentPropertyName ( ) [inline, static, private]

Definition at line 201 of file SwipeControl.h.

{ return s_hasLeftContentPropertyName.data(); }

static const std::wstring hasRightContentPropertyName ( ) [inline, static, private]

Definition at line 203 of file SwipeControl.h.

{ return s_hasRightContentPropertyName.data(); }

static const std::wstring hasTopContentPropertyName ( ) [inline, static, private]

Definition at line 205 of file SwipeControl.h.

{ return s_hasTopContentPropertyName.data(); }

void IdleStateEntered ( winrt::InteractionTrackerIdleStateEnteredArgs const & args )

Definition at line 184 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_isInteracting = false;
    UpdateIsOpen(m_interactionTracker.get().Position() != winrt::float3::zero());

    if (m_isOpen)
    {
        if (m_currentItems && m_currentItems.get().Mode() == winrt::SwipeMode::Execute && m_currentItems.get().Size() > 0)
        {
            auto swipeItem = static_cast<winrt::SwipeItem>(m_currentItems.get().GetAt(0));
            winrt::get_self<SwipeItem>(swipeItem)->InvokeSwipe(*this);
        }
    }
    else
    {
        if (auto swipeContentStackPanel = m_swipeContentStackPanel.get())
        {
            swipeContentStackPanel.Background(nullptr);
            if (auto swipeContentStackPanelChildren = swipeContentStackPanel.Children())
            {
                swipeContentStackPanelChildren.Clear();
            }
        }
        if (auto swipeContentRoot = m_swipeContentRoot.get())
        {
            swipeContentRoot.Background(nullptr);
        }

        m_currentItems.set(nullptr);
        m_createdContent = CreatedContent::None;
    }

    if (!m_isIdle)
    {
        m_isIdle = true;
        if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
        {
            globalTestHooks->NotifyIdleStatusChanged(*this);
        }
    }
}

void InertiaStateEntered ( winrt::InteractionTrackerInertiaStateEnteredArgs const & args )

Definition at line 258 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    m_isInteracting = false;

    if (m_isIdle)
    {
        m_isIdle = false;
        if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
        {
            globalTestHooks->NotifyIdleStatusChanged(*this);
        }
    }

    //It is possible that the user has flicked from a negative position to a position that would result in the interaction
    //tracker coming to rest at the positive open position (or vise versa). The != zero check does not account for this.
    //Instead we check to ensure that the current position and the ModifiedRestingPosition have the same sign (multiply to a positive number)
    //If they do not then we are in this situation and want the end result of the interaction to be the closed state, so close without any animation and return
    //to prevent further processing of this inertia state.
    const auto flickToOppositeSideCheck = m_interactionTracker.get().Position() * args.ModifiedRestingPosition().Value();
    if (m_isHorizontal ? flickToOppositeSideCheck.x < 0 : flickToOppositeSideCheck.y < 0)
    {
        CloseWithoutAnimation();
        return;
    }

    UpdateIsOpen(args.ModifiedRestingPosition().Value() != winrt::float3::zero());
    // If the user has panned the interaction tracker past 0 in the opposite direction of the previously
    // opened swipe items then when we set m_isOpen to true the animations will snap to that value.
    // To avoid this we block that side of the animation until the interacting state is entered.
    if (m_isOpen)
    {
        switch (m_createdContent)
        {
        case CreatedContent::Bottom:
        case CreatedContent::Right:
            m_blockNearContent = true;
            m_blockFarContent = false;
            m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, true);
            m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
            break;
        case CreatedContent::Top:
        case CreatedContent::Left:
            m_blockNearContent = false;
            m_blockFarContent = true;
            m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
            m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, true);
            break;
        case CreatedContent::None:
            m_blockNearContent = false;
            m_blockFarContent = false;
            m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
            m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
            break;
        default:
            assert(false);
        }
    }
}

void InitializeInteractionTracker ( ) [private]

Definition at line 786 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!m_interactionTrackerOwner)
    {
        m_interactionTrackerOwner = winrt::make_self<SwipeControlInteractionTrackerOwner>(*this).try_as<winrt::IInteractionTrackerOwner>();
    }

    if (!m_compositor)
    {
        m_compositor.set(winrt::ElementCompositionPreview::GetElementVisual(m_rootGrid.get()).Compositor());
    }

    m_visualInteractionSource.set(winrt::VisualInteractionSource::Create(FindVisualInteractionSourceVisual()));
    m_visualInteractionSource.get().IsPositionXRailsEnabled(m_isHorizontal);
    m_visualInteractionSource.get().IsPositionYRailsEnabled(!m_isHorizontal);
    m_visualInteractionSource.get().ManipulationRedirectionMode(winrt::VisualInteractionSourceRedirectionMode::CapableTouchpadOnly);
    m_visualInteractionSource.get().PositionXSourceMode(m_isHorizontal ? winrt::InteractionSourceMode::EnabledWithInertia : winrt::InteractionSourceMode::Disabled);
    m_visualInteractionSource.get().PositionYSourceMode(!m_isHorizontal ? winrt::InteractionSourceMode::EnabledWithInertia : winrt::InteractionSourceMode::Disabled);
    if (m_isHorizontal)
    {
        m_visualInteractionSource.get().PositionXChainingMode(winrt::InteractionChainingMode::Never);
    }
    else
    {
        m_visualInteractionSource.get().PositionYChainingMode(winrt::InteractionChainingMode::Never);
    }

    m_interactionTracker.set(winrt::InteractionTracker::CreateWithOwner(m_compositor.get(), m_interactionTrackerOwner));
    m_interactionTracker.get().InteractionSources().Add(m_visualInteractionSource.get());
    m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
    m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);
    m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
    m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
    m_interactionTracker.get().Properties().InsertBoolean(s_hasLeftContentPropertyName, LeftItems() && LeftItems().Size() > 0);
    m_interactionTracker.get().Properties().InsertBoolean(s_hasRightContentPropertyName, RightItems() && RightItems().Size() > 0);
    m_interactionTracker.get().Properties().InsertBoolean(s_hasTopContentPropertyName, TopItems() && TopItems().Size() > 0);
    m_interactionTracker.get().Properties().InsertBoolean(s_hasBottomContentPropertyName, BottomItems() && BottomItems().Size() > 0);
    m_interactionTracker.get().MaxPosition({ std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity(), 0.0f });
    m_interactionTracker.get().MinPosition({ -1.0f * std::numeric_limits<float>::infinity(), -1.0f * std::numeric_limits<float>::infinity(), 0.0f });

    // Create and initialize the Swipe animations:
    // If the swipe control is already opened it should not be possible to open the opposite side's items, without first closing the swipe control.
    // This prevents the user from flicking the swipe control closed and accidently opening the other due to inertia.
    // To acheive this we insert the isFarOpen and isNearOpen boolean properties on the interaction tracker and alter the expression output based on these.
    // The opened state is maintained in the interaction trackers IdleStateEntered handler, this means we need to ensure this state is entered each time the swipe control
    // is opened or closed.

    // A more readable version of the expression:

    /*m_swipeAnimation.set(m_compositor.get().CreateExpressionAnimation(L"isHorizontal ?"
        "Vector3(tracker.isFarOpen || tracker.blockNearContent ? Clamp(-tracker.Position.X, -this.Target.Size.X, 0) :"
                "tracker.isNearOpen  || tracker.blockFarContent ? Clamp(-tracker.Position.X,  0, this.Target.Size.X) :"
                "Clamp(-tracker.Position.X, (tracker.hasRightContent ? -10000 : 0), (tracker.hasLeftContent ? 10000 : 0)), 0, 0) :"
        "Vector3(0, tracker.isFarOpen  || tracker.blockNearContent ? Clamp(-tracker.Position.Y, -this.Target.Size.Y, 0) :"
                   "tracker.isNearOpen || tracker.blockFarContent ? Clamp(-tracker.Position.Y, 0,  this.Target.Size.Y) :"
                   "Clamp(-tracker.Position.Y, (tracker.hasBottomContent ? -10000 : 0), (tracker.hasTopContent ? 10000 : 0)), 0)"));*/

    m_swipeAnimation.set(m_compositor.get().CreateExpressionAnimation(isHorizontalPropertyName() + L" ?"
        "Vector3(" + trackerPropertyName() + L"." + isFarOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockNearContentPropertyName() + L" ? Clamp(-" + trackerPropertyName() + L".Position.X, -this.Target.Size.X, 0) :"
        + trackerPropertyName() + L"." + isNearOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockFarContentPropertyName() + L" ? Clamp(-" + trackerPropertyName() + L".Position.X,  0, this.Target.Size.X) :"
        "Clamp(-" + trackerPropertyName() + L".Position.X, (" + trackerPropertyName() + L"." + hasRightContentPropertyName() + L" ? -10000 : 0), (" + trackerPropertyName() + L"." + hasLeftContentPropertyName() + L" ? 10000 : 0)), 0, 0) :"
        "Vector3(0, " + trackerPropertyName() + L"." + isFarOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockNearContentPropertyName() + L"  ? Clamp(-" + trackerPropertyName() + L".Position.Y, -this.Target.Size.Y, 0) :"
        + trackerPropertyName() + L"." + isNearOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockFarContentPropertyName() + L" ? Clamp(-" + trackerPropertyName() + L".Position.Y, 0,  this.Target.Size.Y) :"
        "Clamp(-" + trackerPropertyName() + L".Position.Y, (" + trackerPropertyName() + L"." + hasBottomContentPropertyName() + L" ? -10000 : 0), (" + trackerPropertyName() + L"." + hasTopContentPropertyName() + L" ? 10000 : 0)), 0)"));

    m_swipeAnimation.get().SetReferenceParameter(s_trackerPropertyName, m_interactionTracker.get());
    m_swipeAnimation.get().SetBooleanParameter(s_isHorizontalPropertyName, m_isHorizontal);
    if (IsTranslationFacadeAvailableForSwipeControl(m_content.get()))
    {
        m_swipeAnimation.get().Target(s_translationPropertyName);
    }

    //A more readable version of the expression:

    /*m_executeExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(L"(foregroundVisual." + GetAnimationTarget() + L" * 0.5) + (isHorizontal ?"
        "Vector3((isNearContent ? -0.5, 0.5) * this.Target.Size.X, 0, 0) : "
        "Vector3(0, (isNearContent ? -0.5, 0.5) * this.Target.Size.Y, 0))"));*/

    m_executeExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(L"(" + foregroundVisualPropertyName() + L"." + GetAnimationTarget(m_swipeContentStackPanel.get()) + L" * 0.5) + (" + isHorizontalPropertyName() + L" ? "
        "Vector3((" + isNearContentPropertyName() + L" ? -0.5 : 0.5) * this.Target.Size.X, 0, 0) : "
        "Vector3(0, (" + isNearContentPropertyName() + L" ? -0.5 : 0.5) * this.Target.Size.Y, 0))"));

    m_executeExpressionAnimation.get().SetBooleanParameter(s_isHorizontalPropertyName, m_isHorizontal);
    if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
    {
        m_executeExpressionAnimation.get().Target(s_translationPropertyName);
    }

    //A more readable version of the expression:

    /*m_clipExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(L"isHorizontal ?
        Max(swipeRootVisual.Size.X + (isNearContent ? tracker.Position.X : -tracker.Position.X) , 0) :
        Max(swipeRootVisual.Size.Y + (isNearContent ? tracker.Position.Y : -tracker.Position.Y) , 0)"));*/

    m_clipExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(isHorizontalPropertyName() + L" ? "
        "Max(" + swipeRootVisualPropertyName() + L".Size.X + (" + isNearContentPropertyName() + L" ? " + trackerPropertyName() + L".Position.X : -" + trackerPropertyName() + L".Position.X) , 0) : "
        "Max(" + swipeRootVisualPropertyName() + L".Size.Y + (" + isNearContentPropertyName() + L" ? " + trackerPropertyName() + L".Position.Y : -" + trackerPropertyName() + L".Position.Y) , 0)"));

    m_clipExpressionAnimation.get().SetReferenceParameter(s_trackerPropertyName, m_interactionTracker.get());
    m_clipExpressionAnimation.get().SetBooleanParameter(s_isHorizontalPropertyName, m_isHorizontal);
}

void InputEaterGridTapped | ( | const winrt::IInspectable & | ,
 |  | const winrt::TappedRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 662 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_isOpen)
    {
        CloseIfNotRemainOpenExecuteItem();
        args.Handled(true);
    }
}

void InteractingStateEntered ( winrt::InteractionTrackerInteractingStateEnteredArgs const & args )

Definition at line 229 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_isIdle)
    {
        m_isIdle = false;
        if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
        {
            globalTestHooks->NotifyIdleStatusChanged(*this);
        }
    }

    m_lastActionWasClosing = false;
    m_lastActionWasOpening = false;
    m_isInteracting = true;

    //Once the user has started interacting with a SwipeControl in the closed state we are free to unblock contents.
    //Contents of items opposite the currently opened ones will not be created.
    if (!m_isOpen)
    {
        m_blockNearContent = false;
        m_blockFarContent = false;
        m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
        m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
    }
}

static const std::wstring isFarOpenPropertyName ( ) [inline, static, private]

Definition at line 192 of file SwipeControl.h.

{ return s_isFarOpenPropertyName.data(); }

static const std::wstring isHorizontalPropertyName ( ) [inline, static, private]

Definition at line 209 of file SwipeControl.h.

{ return s_isHorizontalPropertyName.data(); }

static const std::wstring isNearContentPropertyName ( ) [inline, static, private]

Definition at line 194 of file SwipeControl.h.

{ return s_isNearContentPropertyName.data(); }

static const std::wstring isNearOpenPropertyName ( ) [inline, static, private]

Definition at line 190 of file SwipeControl.h.

{ return s_isNearOpenPropertyName.data(); }

bool IsTranslationFacadeAvailableForSwipeControl ( const winrt::UIElement & element ) [static, private]

Definition at line 1644 of file SwipeControl.cpp.

{
    //For now Facade's are causing more issues than they are worth for swipe control. Revist this
    //when we have a little more time.

    //There are concerns about swipe consumers having taken a dependency on the ElementCompositionPreview
    //Api's that this is exclusive with and also the target property of the swipe expression animations
    //is not resolving with the use of Facade's
    return false;
    //return SharedHelpers::IsTranslationFacadeAvailable(element);
}

static const std::wstring maxThresholdPropertyName ( ) [inline, static, private]

Definition at line 222 of file SwipeControl.h.

{ return s_maxThresholdPropertyName.data(); }

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 145 of file SwipeControl.cpp.

{
    m_rootGrid.get().Measure(availableSize);
    winrt::Size contentDesiredSize = m_rootGrid.get().DesiredSize();
    if (availableSize.Width != std::numeric_limits<float>::infinity())
    {
        contentDesiredSize.Width = availableSize.Width;
    }
    if (availableSize.Height != std::numeric_limits<float>::infinity())
    {
        contentDesiredSize.Height = availableSize.Height;
    }
    return contentDesiredSize;
}

void OnApplyTemplate ( )

Definition at line 107 of file SwipeControl.cpp.

{
    ThrowIfHasVerticalAndHorizontalContent(/*setIsHorizontal*/ true);

    DetachEventHandlers(false /*useSafeGet*/);
    GetTemplateParts();
    EnsureClip();
    AttachEventHandlers();
}

void OnBottomItemsChanged | ( | const winrt::IObservableVector< winrt::SwipeItem > & | sender,
 |  | const winrt::IVectorChangedEventArgs | args |
 | ) |  |  | [private]

Definition at line 1451 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    ThrowIfHasVerticalAndHorizontalContent();
    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasBottomContentPropertyName, sender.Size() > 0);
    }

    if (m_createdContent == CreatedContent::Bottom)
    {
        CreateBottomContent();
    }
}

void OnBottomItemsCollectionChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 477 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_bottomItemsChangedToken.value != 0)
    {
        auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        observableVector.VectorChanged(m_bottomItemsChangedToken);
        m_bottomItemsChangedToken.value = 0;
    }

    if (args.NewValue())
    {
        ThrowIfHasVerticalAndHorizontalContent();
        auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        m_bottomItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnBottomItemsChanged });
    }

    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasBottomContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
    }

    if (m_createdContent == CreatedContent::Bottom)
    {
        CreateBottomContent();
    }
}

void OnLeftItemsChanged | ( | const winrt::IObservableVector< winrt::SwipeItem > & | sender,
 |  | const winrt::IVectorChangedEventArgs | args |
 | ) |  |  | [private]

Definition at line 1402 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    ThrowIfHasVerticalAndHorizontalContent();
    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasLeftContentPropertyName, sender.Size() > 0);
    }

    if (m_createdContent == CreatedContent::Left)
    {
        CreateLeftContent();
    }
}

void OnLeftItemsCollectionChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 390 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_leftItemsChangedToken.value != 0)
    {
        auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        observableVector.VectorChanged(m_leftItemsChangedToken);
        m_leftItemsChangedToken.value = 0;
    }

    if (args.NewValue())
    {
        ThrowIfHasVerticalAndHorizontalContent();
        auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        m_leftItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnLeftItemsChanged });
    }

    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasLeftContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
    }

    if (m_createdContent == CreatedContent::Left)
    {
        CreateLeftContent();
    }
}

void OnLoaded | ( | const winrt::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]

Definition at line 506 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!m_hasInitialLoadedEventFired)
    {
        m_hasInitialLoadedEventFired = true;
        InitializeInteractionTracker();
        TryGetSwipeVisuals();
    }
    //If the swipe control has been added to the tree for a subsequent time, for instance when a list view item has been recycled,
    //Ensure that we are in the closed interaction tracker state.
    CloseWithoutAnimation();
}

void OnPointerPressedEvent | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 627 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch && m_visualInteractionSource)
    {
        if (m_currentItems &&
            m_currentItems.get().Mode() == winrt::SwipeMode::Execute &&
            m_currentItems.get().Size() > 0 &&
            m_currentItems.get().GetAt(0).BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::RemainOpen &&
            m_isOpen)
        {
            //If the swipe control is currently open on an Execute item's who's behaviorOnInvoked property is set to RemainOpen
            //we don't want to allow the user interaction to effect the swipe control anymore, so don't redirect the manipulation
            //to the interaction tracker.
            return;
        }
        try
        {
            m_visualInteractionSource.get().TryRedirectForManipulation(args.GetCurrentPoint(*this));
        }
        catch (const winrt::hresult_error& e)
        {
            // Swallowing Access Denied error because of InteractionTracker bug 17434718 which has been
            // causing crashes at least in RS3, RS4 and RS5.
            if (e.to_abi() != E_ACCESSDENIED)
            {
                throw;
            }
        }
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 117 of file SwipeControl.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    if (property == s_LeftItemsProperty)
    {
        OnLeftItemsCollectionChanged(args);
    }
    if (property == s_RightItemsProperty)
    {
        OnRightItemsCollectionChanged(args);
    }
    if (property == s_TopItemsProperty)
    {
        OnTopItemsCollectionChanged(args);
    }
    if (property == s_BottomItemsProperty)
    {
        OnBottomItemsCollectionChanged(args);
    }
}

void OnRightItemsChanged | ( | const winrt::IObservableVector< winrt::SwipeItem > & | sender,
 |  | const winrt::IVectorChangedEventArgs | args |
 | ) |  |  | [private]

Definition at line 1418 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    ThrowIfHasVerticalAndHorizontalContent();

    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasRightContentPropertyName, sender.Size() > 0);
    }

    if (m_createdContent == CreatedContent::Right)
    {
        CreateRightContent();
    }
}

void OnRightItemsCollectionChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 419 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_rightItemsChangedToken.value != 0)
    {
        auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        observableVector.VectorChanged(m_rightItemsChangedToken);
        m_rightItemsChangedToken.value = 0;
    }

    if (args.NewValue())
    {
        ThrowIfHasVerticalAndHorizontalContent();
        auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        m_rightItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnRightItemsChanged });
    }

    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasRightContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
    }

    if (m_createdContent == CreatedContent::Right)
    {
        CreateRightContent();
    }
}

void OnSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 589 of file SwipeControl.cpp.

{
    EnsureClip();
    for (winrt::UIElement uiElement : m_swipeContentStackPanel.get().Children())
    {
        winrt::AppBarButton appBarButton = uiElement.try_as<winrt::AppBarButton>();
        if (appBarButton)
        {
            if (m_isHorizontal)
            {
                appBarButton.Height(ActualHeight());
                if (m_currentItems && m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
                {
                    appBarButton.Width(ActualWidth());
                }
            }
            else
            {
                appBarButton.Width(ActualWidth());
                if (m_currentItems && m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
                {
                    appBarButton.Height(ActualHeight());
                }
            }
        }
    }
}

void OnSwipeContentStackPanelSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 617 of file SwipeControl.cpp.

{
    if (m_interactionTracker)
    {
        m_interactionTracker.get().MinPosition({ -args.NewSize().Width, -args.NewSize().Height, 0.0f });
        m_interactionTracker.get().MaxPosition({ args.NewSize().Width, args.NewSize().Height, 0.0f });
        ConfigurePositionInertiaRestingValues();
    }
}

void OnTopItemsChanged | ( | const winrt::IObservableVector< winrt::SwipeItem > & | sender,
 |  | const winrt::IVectorChangedEventArgs | args |
 | ) |  |  | [private]

Definition at line 1435 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    ThrowIfHasVerticalAndHorizontalContent();
    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasTopContentPropertyName, sender.Size() > 0);
    }

    if (m_createdContent == CreatedContent::Top)
    {
        CreateTopContent();
    }
}

void OnTopItemsCollectionChanged ( const winrt::DependencyPropertyChangedEventArgs & args ) [private]

Definition at line 448 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_topItemsChangedToken.value != 0)
    {
        auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        observableVector.VectorChanged(m_topItemsChangedToken);
        m_topItemsChangedToken.value = 0;
    }

    if (args.NewValue())
    {
        ThrowIfHasVerticalAndHorizontalContent();
        auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
        m_topItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnTopItemsChanged });
    }

    if (m_interactionTracker)
    {
        m_interactionTracker.get().Properties().InsertBoolean(s_hasTopContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
    }

    if (m_createdContent == CreatedContent::Top)
    {
        CreateTopContent();
    }
}

void PopulateContentItems ( ) [private]

Definition at line 1137 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    for (winrt::SwipeItem swipeItem : m_currentItems.get())
    {
        m_swipeContentStackPanel.get().Children().Append(GetSwipeItemButton(swipeItem));
    }

    TryGetSwipeVisuals();
}

void RequestIgnored ( winrt::InteractionTrackerRequestIgnoredArgs const & args )

Definition at line 178 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
}

void SetupClipAnimation ( ) [private]

Definition at line 1179 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!m_insetClip)
    {
        m_insetClip.set(m_compositor.get().CreateInsetClip());
        m_swipeContentRootVisual.get().Clip(m_insetClip.get());
    }
    else
    {
        m_insetClip.get().StopAnimation(s_leftInsetTargetName);
        m_insetClip.get().StopAnimation(s_rightInsetTargetName);
        m_insetClip.get().StopAnimation(s_topInsetTargetName);
        m_insetClip.get().StopAnimation(s_bottomInsetTargetName);
        m_insetClip.get().LeftInset(0.0f);
        m_insetClip.get().RightInset(0.0f);
        m_insetClip.get().TopInset(0.0f);
        m_insetClip.get().BottomInset(0.0f);
    }

    m_clipExpressionAnimation.get().SetBooleanParameter(s_isNearContentPropertyName, m_createdContent == CreatedContent::Left || m_createdContent == CreatedContent::Top);

    if (m_createdContent == CreatedContent::None)
    {
        //If we have no created content then we don't need to start the clip animation yet.
        return;
    }

    m_insetClip.get().StartAnimation(DirectionToInset(m_createdContent), m_clipExpressionAnimation.get());
}

void SetupExecuteExpressionAnimation ( ) [private]

Definition at line 1149 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
    {
        m_swipeContentStackPanel.get().StopAnimation(m_executeExpressionAnimation.get());
        m_swipeContentStackPanel.get().Translation({ 0.0f, 0.0f, 0.0f });
    }
    else if (m_swipeContentVisual)
    {
        m_swipeContentVisual.get().StopAnimation(GetAnimationTarget(m_swipeContentStackPanel.get()));
        m_swipeContentVisual.get().Properties().InsertVector3(GetAnimationTarget(m_swipeContentStackPanel.get()), { 0.0f, 0.0f, 0.0f });
    }

    if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
    {
        assert(m_createdContent != CreatedContent::None);
        m_executeExpressionAnimation.get().SetBooleanParameter(s_isNearContentPropertyName, m_createdContent == CreatedContent::Left || m_createdContent == CreatedContent::Top);
        if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
        {
            m_swipeContentStackPanel.get().StartAnimation(m_executeExpressionAnimation.get());
        }
        if (m_swipeContentVisual)
        {
            m_swipeContentVisual.get().StartAnimation(GetAnimationTarget(m_swipeContentStackPanel.get()), m_executeExpressionAnimation.get());
        }
    }
}

static const std::wstring swipeContentSizeParameterName ( ) [inline, static, private]

Definition at line 218 of file SwipeControl.h.

{ return s_swipeContentSizeParameterName.data(); }

static const std::wstring swipeContentVisualPropertyName ( ) [inline, static, private]

Definition at line 216 of file SwipeControl.h.

{ return s_swipeContentVisualPropertyName.data(); }

static const std::wstring swipeRootVisualPropertyName ( ) [inline, static, private]

Definition at line 220 of file SwipeControl.h.

{ return s_swipeRootVisualPropertyName.data(); }

void ThrowIfHasVerticalAndHorizontalContent ( bool IsHorizontal = false ) [private]

Definition at line 1603 of file SwipeControl.cpp.

{
    bool hasLeftContent = LeftItems() && LeftItems().Size() > 0;
    bool hasRightContent = RightItems() && RightItems().Size() > 0;
    bool hasTopContent = TopItems() && TopItems().Size() > 0;
    bool hasBottomContent = BottomItems() && BottomItems().Size() > 0;
    if (setIsHorizontal)
    {
        m_isHorizontal = hasLeftContent || hasRightContent || !(hasTopContent || hasBottomContent);
    }

    if (this->Template())
    {
        if (m_isHorizontal && (hasTopContent || hasBottomContent))
        {
            throw winrt::hresult_invalid_argument(L"This SwipeControl is horizontal and can not have vertical items.");
        }
        if (!m_isHorizontal && (hasLeftContent || hasRightContent))
        {
            throw winrt::hresult_invalid_argument(L"This SwipeControl is vertical and can not have horizontal items.");
        }
    }
    else
    {
        if ((hasLeftContent || hasRightContent) && (hasTopContent || hasBottomContent))
        {
            throw winrt::hresult_invalid_argument(L"SwipeControl can't have both horizontal items and vertical items set at the same time.");
        }
    }
}

static const std::wstring trackerPropertyName ( ) [inline, static, private]

Definition at line 212 of file SwipeControl.h.

{ return s_trackerPropertyName.data(); }

void TryGetSwipeVisuals ( ) [private]

Definition at line 1467 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (IsTranslationFacadeAvailableForSwipeControl(m_content.get()))
    {
        m_swipeAnimation.get().Target(GetAnimationTarget(m_content.get()));
        m_content.get().StartAnimation(m_swipeAnimation.get());
    }
    else
    {
        auto mainContentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_content.get());
        if (mainContentVisual && m_mainContentVisual.get() != mainContentVisual)
        {
            m_mainContentVisual.set(mainContentVisual);

            winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_content.get(), true);
            mainContentVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });

            mainContentVisual.StartAnimation(GetAnimationTarget(m_content.get()), m_swipeAnimation.get());

            m_executeExpressionAnimation.get().SetReferenceParameter(s_foregroundVisualPropertyName, mainContentVisual);
        }
    }

    if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
    {
        m_swipeAnimation.get().Target(GetAnimationTarget(m_swipeContentStackPanel.get()));
    }
    else
    {
        auto swipeContentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_swipeContentStackPanel.get());
        if (swipeContentVisual && m_swipeContentVisual.get() != swipeContentVisual)
        {
            m_swipeContentVisual.set(swipeContentVisual);

            winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_swipeContentStackPanel.get(), true);
            swipeContentVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });

            ConfigurePositionInertiaRestingValues();
        }
    }

    auto swipeContentRootVisual = winrt::ElementCompositionPreview::GetElementVisual(m_swipeContentRoot.get());
    if (swipeContentRootVisual && m_swipeContentRootVisual.get() != swipeContentRootVisual)
    {
        m_swipeContentRootVisual.set(swipeContentRootVisual);
        m_clipExpressionAnimation.get().SetReferenceParameter(s_swipeRootVisualPropertyName, swipeContentRootVisual);
        if (m_insetClip)
        {
            swipeContentRootVisual.Clip(m_insetClip.get());
        }
    }
}

void UpdateColors ( ) [private]

Definition at line 1211 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
    {
        UpdateColorsIfExecuteItem();
    }
    else
    {
        UpdateColorsIfRevealItems();
    }
}

void UpdateColorsIfExecuteItem ( ) [private]

Definition at line 1265 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (!m_currentItems || m_currentItems.get().Mode() != winrt::SwipeMode::Execute)
    {
        return;
    }

    winrt::SwipeItem swipeItem = nullptr;
    if (m_currentItems.get().Size() > 0)
    {
        swipeItem = m_currentItems.get().GetAt(0);
    }
    UpdateExecuteBackgroundColor(swipeItem);
    UpdateExecuteForegroundColor(swipeItem);
}

void UpdateColorsIfRevealItems ( ) [private]

Definition at line 1349 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_currentItems.get().Mode() != winrt::SwipeMode::Reveal)
    {
        return;
    }

    winrt::Brush rootGridBackground = nullptr;

    if (auto lookedUpBrush = SharedHelpers::FindInApplicationResources(s_swipeItemBackgroundResourceName))
    {
        rootGridBackground = lookedUpBrush.try_as<winrt::Brush>();
    }
    if (m_currentItems.get().Size() > 0)
    {
        switch (m_createdContent)
        {
        case CreatedContent::Left:
        case CreatedContent::Top:
        {
            auto itemBackground = m_currentItems.get().GetAt(m_swipeContentStackPanel.get().Children().Size() - 1).Background();
            if (itemBackground != nullptr)
            {
                rootGridBackground = itemBackground;
            }
            break;
        }
        case CreatedContent::Right:
        case CreatedContent::Bottom:
        {
            auto itemBackground = m_currentItems.get().GetAt(0).Background();
            if (itemBackground != nullptr)
            {
                rootGridBackground = itemBackground;
            }
            break;
        }
        case CreatedContent::None:
        {
            break;
        }
        default:
            assert(false);
            break;
        }
    }

    m_swipeContentRoot.get().Background(rootGridBackground);
    m_swipeContentStackPanel.get().Background(nullptr);
}

void UpdateExecuteBackgroundColor ( const winrt::SwipeItem & swipeItem ) [private]

Definition at line 1283 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    winrt::Brush background = nullptr;

    if (!m_thresholdReached)
    {
        if (auto lookedUpBackgroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPreThresholdBackgroundResourceName))
        {
            background = lookedUpBackgroundBrush.try_as<winrt::Brush>();
        }
    }
    else
    {
        if (auto lookedUpBackgroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPostThresholdBackgroundResourceName))
        {
            background = lookedUpBackgroundBrush.try_as<winrt::Brush>();
        }
    }

    if (swipeItem && swipeItem.Background())
    {
        background = swipeItem.Background();
    }

    m_swipeContentStackPanel.get().Background(background);
    m_swipeContentRoot.get().Background(nullptr);
}

void UpdateExecuteForegroundColor ( const winrt::SwipeItem & swipeItem ) [private]

Definition at line 1313 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (m_swipeContentStackPanel.get().Children().Size() > 0)
    {
        if (auto appBarButton = m_swipeContentStackPanel.get().Children().GetAt(0).as<winrt::AppBarButton>())
        {
            winrt::Brush foreground = nullptr;

            if (!m_thresholdReached)
            {
                if (auto lookedUpForegroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPreThresholdForegroundResourceName))
                {
                    foreground = lookedUpForegroundBrush.try_as<winrt::Brush>();
                }
            }
            else
            {
                if (auto lookedUpForegroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPostThresholdForegroundResourceName))
                {
                    foreground = lookedUpForegroundBrush.try_as<winrt::Brush>();
                }
            }

            if (swipeItem && swipeItem.Foreground())
            {
                foreground = swipeItem.Foreground();
            }

            appBarButton.Foreground(foreground);
            appBarButton.Background(winrt::SolidColorBrush(winrt::Colors::Transparent()));
        }
    }
}

void UpdateIsOpen ( bool isOpen ) [private]

Definition at line 1522 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);

    if (isOpen)
    {
        if (!m_isOpen)
        {
            m_isOpen = true;
            m_lastActionWasOpening = true;
            switch (m_createdContent)
            {
            case CreatedContent::Right:
            case CreatedContent::Bottom:
                m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, true);
                m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);
                break;
            case CreatedContent::Left:
            case CreatedContent::Top:
                m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
                m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, true);
                break;
            case CreatedContent::None:
                m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
                m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);
                break;
            default:
                assert(false);
            }

            if (m_currentItems.get().Mode() != winrt::SwipeMode::Execute)
            {
                AttachDismissingHandlers();
            }

            if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
            {
                globalTestHooks->NotifyOpenedStatusChanged(*this);
            }
        }
    }
    else
    {
        if (m_isOpen)
        {
            m_isOpen = false;
            m_lastActionWasClosing = true;
            DetachDismissingHandlers();
            m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
            m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);

            if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
            {
                globalTestHooks->NotifyOpenedStatusChanged(*this);
            }
        }
    }
}

void UpdateThresholdReached ( float value ) [private]

Definition at line 1581 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    const bool oldValue = m_thresholdReached;
    const float effectiveStackPanelSize = static_cast<float>((m_isHorizontal ? m_swipeContentStackPanel.get().ActualWidth() : m_swipeContentStackPanel.get().ActualHeight()) - 1);
    if (!m_isOpen || m_lastActionWasOpening)
    {
        //If we are opening new swipe items then we need to scroll open c_ThresholdValue
        m_thresholdReached = abs(value) > std::min(effectiveStackPanelSize, c_ThresholdValue);
    }
    else
    {
        //If we already have an open swipe item then swiping it closed by any amount will close it.
        m_thresholdReached = abs(value) < effectiveStackPanelSize;
    }
    if (m_thresholdReached != oldValue)
    {
        UpdateColorsIfExecuteItem();
    }
}

void ValuesChanged ( winrt::InteractionTrackerValuesChangedArgs const & args )

Definition at line 320 of file SwipeControl.cpp.

{
    SWIPECONTROL_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);

    auto lastInteractedWithSwipeControl = s_lastInteractedWithSwipeControl.get();
    if (m_isInteracting && (!lastInteractedWithSwipeControl || lastInteractedWithSwipeControl.get() != this))
    {
        if (lastInteractedWithSwipeControl)
        {
            lastInteractedWithSwipeControl->CloseIfNotRemainOpenExecuteItem();
        }
        s_lastInteractedWithSwipeControl = get_weak();

        if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
        {
            globalTestHooks->NotifyLastInteractedWithSwipeControlChanged();
        }
    }

    float value = 0.0f;

    if (m_isHorizontal)
    {
        value = args.Position().x;
        if (!m_blockNearContent && m_createdContent != CreatedContent::Left && value < -c_epsilon)
        {
            CreateLeftContent();
        }
        else if (!m_blockFarContent && m_createdContent != CreatedContent::Right && value > c_epsilon)
        {
            CreateRightContent();
        }
    }
    else
    {
        value = args.Position().y;
        if (!m_blockNearContent && m_createdContent != CreatedContent::Top && value < -c_epsilon)
        {
            CreateTopContent();
        }
        else if (!m_blockFarContent && m_createdContent != CreatedContent::Bottom && value > c_epsilon)
        {
            CreateBottomContent();
        }
    }
    UpdateThresholdReached(value);
}

Member Data Documentation

winrt::CoreAcceleratorKeys::AcceleratorKeyActivated_revoker m_acceleratorKeyActivatedRevoker [private]

Definition at line 127 of file SwipeControl.h.

The documentation for this class was generated from the following files:
  • SwipeControl/SwipeControl.h
  • SwipeControl/SwipeControl.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestCommand Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • SwipeControl_TestUI
  • TestCommand
Public Member Functions | Events | Private Attributes

TestCommand Class Reference

List of all members.

Public Member Functions

TestCommand (SwipeControlPage page)
bool | CanExecute (object parameter)
void | Execute (object parameter)

Events

EventHandler | CanExecuteChanged

Private Attributes

SwipeControlPage page

Detailed Description

Definition at line 12 of file TestCommand.cs.

Constructor & Destructor Documentation

TestCommand ( SwipeControlPage page ) [inline]

Definition at line 15 of file TestCommand.cs.

        {
            this.page = page;
        }

Member Function Documentation

bool CanExecute ( object parameter ) [inline]

Definition at line 22 of file TestCommand.cs.

        {
            return (parameter as String).Equals("command's text");
        }

void Execute ( object parameter ) [inline]

Definition at line 27 of file TestCommand.cs.

        {
            page.ChangeText(parameter as String);

            if(CanExecuteChanged != null)
            {
                // do nothing
            }
        }

Member Data Documentation

SwipeControlPage page [private]

Definition at line 14 of file TestCommand.cs.

Event Documentation

EventHandler CanExecuteChanged

Definition at line 20 of file TestCommand.cs.

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControl_TestUI/TestCommand.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlInteractionTrackerOwner Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

SwipeControlInteractionTrackerOwner Class Reference

#include "SwipeControlInteractionTrackerOwner.h"

List of all members.

Public Member Functions

SwipeControlInteractionTrackerOwner (const winrt::SwipeControl &swipeControl)
~SwipeControlInteractionTrackerOwner ()
void | CustomAnimationStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs &args)
void | IdleStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerIdleStateEnteredArgs &args)
void | InertiaStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInertiaStateEnteredArgs &args)
void | InteractingStateEntered (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInteractingStateEnteredArgs &args)
void | RequestIgnored (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerRequestIgnoredArgs &args)
void | ValuesChanged (const winrt::InteractionTracker &sender, const winrt::InteractionTrackerValuesChangedArgs &args)

Detailed Description

Definition at line 10 of file SwipeControlInteractionTrackerOwner.h.

Constructor & Destructor Documentation

SwipeControlInteractionTrackerOwner ( const winrt::SwipeControl & swipeControl )

Definition at line 9 of file SwipeControlInteractionTrackerOwner.cpp.

{
    SWIPECONTROL_TRACE_VERBOSE(swipeControl, TRACE_MSG_METH_PTR, METH_NAME, this, swipeControl);

    m_owner = swipeControl;
}

~SwipeControlInteractionTrackerOwner ( )

Definition at line 16 of file SwipeControlInteractionTrackerOwner.cpp.

{
    SWIPECONTROL_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    m_owner = nullptr;
}

Member Function Documentation

void CustomAnimationStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerCustomAnimationStateEnteredArgs & | args
 | ) |  |

Definition at line 114 of file SwipeControlInteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto swipeControl = winrt::get_self<SwipeControl>(rawOwner);
        if (swipeControl)
        {
            swipeControl->CustomAnimationStateEntered(args);
        }
    }
}

void IdleStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerIdleStateEnteredArgs & | args
 | ) |  |

Definition at line 96 of file SwipeControlInteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto swipeControl = winrt::get_self<SwipeControl>(rawOwner);
        if (swipeControl)
        {
            swipeControl->IdleStateEntered(args);
        }
    }
}

void InertiaStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerInertiaStateEnteredArgs & | args
 | ) |  |

Definition at line 78 of file SwipeControlInteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto swipeControl = winrt::get_self<SwipeControl>(rawOwner);
        if (swipeControl)
        {
            swipeControl->InertiaStateEntered(args);
        }
    }
}

void InteractingStateEntered | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerInteractingStateEnteredArgs & | args
 | ) |  |

Definition at line 60 of file SwipeControlInteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto swipeControl = winrt::get_self<SwipeControl>(rawOwner);
        if (swipeControl)
        {
            swipeControl->InteractingStateEntered(args);
        }
    }
}

void RequestIgnored | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerRequestIgnoredArgs & | args
 | ) |  |

Definition at line 42 of file SwipeControlInteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto swipeControl = winrt::get_self<SwipeControl>(rawOwner);
        if (swipeControl)
        {
            swipeControl->RequestIgnored(args);
        }
    }
}

void ValuesChanged | ( | const winrt::InteractionTracker & | sender,
 |  | const winrt::InteractionTrackerValuesChangedArgs & | args
 | ) |  |

Definition at line 24 of file SwipeControlInteractionTrackerOwner.cpp.

{
    if (!m_owner)
    {
        return;
    }

    if (auto rawOwner = m_owner.get())
    {
        auto swipeControl = winrt::get_self<SwipeControl>(rawOwner);
        if (swipeControl)
        {
            swipeControl->ValuesChanged(args);
        }
    }
}

The documentation for this class was generated from the following files:
  • SwipeControl/SwipeControlInteractionTrackerOwner.h
  • SwipeControl/SwipeControlInteractionTrackerOwner.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

SwipeControlProperties Class Reference

#include "SwipeControl.properties.h"

Inherited by SwipeControl.

List of all members.

Public Member Functions

SwipeControlProperties ()
void | BottomItems (winrt::SwipeItems const &value)
winrt::SwipeItems | BottomItems ()
void | LeftItems (winrt::SwipeItems const &value)
winrt::SwipeItems | LeftItems ()
winrt::SwipeItems | RightItems ()
void | RightItems (winrt::SwipeItems const &value)
winrt::SwipeItems | TopItems ()
void | TopItems (winrt::SwipeItems const &value)

Static Public Member Functions

static winrt::DependencyProperty | BottomItemsProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | LeftItemsProperty ()
static void | OnBottomItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnLeftItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnRightItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTopItemsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | RightItemsProperty ()
static winrt::DependencyProperty | TopItemsProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_BottomItemsProperty
static GlobalDependencyProperty | s_LeftItemsProperty
static GlobalDependencyProperty | s_RightItemsProperty
static GlobalDependencyProperty | s_TopItemsProperty

Detailed Description

Definition at line 7 of file SwipeControl.properties.h.

Constructor & Destructor Documentation

SwipeControlProperties ( )

Definition at line 21 of file SwipeControl.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void BottomItems ( winrt::SwipeItems const & value )

Definition at line 114 of file SwipeControl.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SwipeControl*>(this)->SetValue(s_BottomItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
    }
}

winrt::SwipeItems BottomItems ( )

Definition at line 122 of file SwipeControl.properties.cpp.

{
    return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_BottomItemsProperty));
}

static winrt::DependencyProperty BottomItemsProperty ( ) [inline, static]

Definition at line 24 of file SwipeControl.properties.h.

{ return s_BottomItemsProperty; }

void ClearProperties ( ) [static]

Definition at line 74 of file SwipeControl.properties.cpp.

{
    s_BottomItemsProperty = nullptr;
    s_LeftItemsProperty = nullptr;
    s_RightItemsProperty = nullptr;
    s_TopItemsProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 26 of file SwipeControl.properties.cpp.

{
    if (!s_BottomItemsProperty)
    {
        s_BottomItemsProperty =
            InitializeDependencyProperty(
                L"BottomItems",
                winrt::name_of<winrt::SwipeItems>(),
                winrt::name_of<winrt::SwipeControl>(),
                false /* isAttached */,
                ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnBottomItemsPropertyChanged));
    }
    if (!s_LeftItemsProperty)
    {
        s_LeftItemsProperty =
            InitializeDependencyProperty(
                L"LeftItems",
                winrt::name_of<winrt::SwipeItems>(),
                winrt::name_of<winrt::SwipeControl>(),
                false /* isAttached */,
                ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnLeftItemsPropertyChanged));
    }
    if (!s_RightItemsProperty)
    {
        s_RightItemsProperty =
            InitializeDependencyProperty(
                L"RightItems",
                winrt::name_of<winrt::SwipeItems>(),
                winrt::name_of<winrt::SwipeControl>(),
                false /* isAttached */,
                ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnRightItemsPropertyChanged));
    }
    if (!s_TopItemsProperty)
    {
        s_TopItemsProperty =
            InitializeDependencyProperty(
                L"TopItems",
                winrt::name_of<winrt::SwipeItems>(),
                winrt::name_of<winrt::SwipeControl>(),
                false /* isAttached */,
                ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnTopItemsPropertyChanged));
    }
}

winrt::SwipeItems LeftItems ( )

Definition at line 135 of file SwipeControl.properties.cpp.

{
    return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_LeftItemsProperty));
}

void LeftItems ( winrt::SwipeItems const & value )

Definition at line 127 of file SwipeControl.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SwipeControl*>(this)->SetValue(s_LeftItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty LeftItemsProperty ( ) [inline, static]

Definition at line 25 of file SwipeControl.properties.h.

{ return s_LeftItemsProperty; }

void OnBottomItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 82 of file SwipeControl.properties.cpp.

{
    auto owner = sender.as<winrt::SwipeControl>();
    winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
}

void OnLeftItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 90 of file SwipeControl.properties.cpp.

{
    auto owner = sender.as<winrt::SwipeControl>();
    winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
}

void OnRightItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 98 of file SwipeControl.properties.cpp.

{
    auto owner = sender.as<winrt::SwipeControl>();
    winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
}

void OnTopItemsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 106 of file SwipeControl.properties.cpp.

{
    auto owner = sender.as<winrt::SwipeControl>();
    winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
}

void RightItems ( winrt::SwipeItems const & value )

Definition at line 140 of file SwipeControl.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SwipeControl*>(this)->SetValue(s_RightItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
    }
}

winrt::SwipeItems RightItems ( )

Definition at line 148 of file SwipeControl.properties.cpp.

{
    return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_RightItemsProperty));
}

static winrt::DependencyProperty RightItemsProperty ( ) [inline, static]

Definition at line 26 of file SwipeControl.properties.h.

{ return s_RightItemsProperty; }

void TopItems ( winrt::SwipeItems const & value )

Definition at line 153 of file SwipeControl.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SwipeControl*>(this)->SetValue(s_TopItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
    }
}

winrt::SwipeItems TopItems ( )

Definition at line 161 of file SwipeControl.properties.cpp.

{
    return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_TopItemsProperty));
}

static winrt::DependencyProperty TopItemsProperty ( ) [inline, static]

Definition at line 27 of file SwipeControl.properties.h.

{ return s_TopItemsProperty; }

Member Data Documentation

GlobalDependencyProperty s_BottomItemsProperty [static]

Definition at line 29 of file SwipeControl.properties.h.

GlobalDependencyProperty s_LeftItemsProperty [static]

Definition at line 30 of file SwipeControl.properties.h.

GlobalDependencyProperty s_RightItemsProperty [static]

Definition at line 31 of file SwipeControl.properties.h.

GlobalDependencyProperty s_TopItemsProperty [static]

Definition at line 32 of file SwipeControl.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SwipeControl.properties.h
  • Generated/SwipeControl.properties.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

SwipeControlTrace Class Reference

#include "SwipeControlTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file SwipeControlTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file SwipeControlTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "SwipeControlInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_SWIPECONTROL),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"SwipeControl") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 152 of file SwipeControlTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "SwipeControlPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_SWIPECONTROL),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file SwipeControlTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[256]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "SwipeControlVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_SWIPECONTROL),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"SwipeControl") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file SwipeControlTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file SwipeControlTrace.h.

The documentation for this class was generated from the following file:
  • SwipeControl/SwipeControlTrace.h
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

SwipeItem Class Reference

#include "SwipeItem.h"

Inherits ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT >, and SwipeItemProperties.

List of all members.

Public Member Functions

SwipeItem ()
void | GenerateControl (const winrt::AppBarButton &appBarButton, const winrt::Style &swipeItemStyle)
void | InvokeSwipe (const winrt::SwipeControl &content)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)

Private Member Functions

void | AttachEventHandlers (const winrt::AppBarButton &appBarButton)
void | OnCommandChanged (const winrt::ICommand &oldCommand, const winrt::ICommand &newCommand)
void | OnItemTapped (const winrt::IInspectable &sender, const winrt::TappedRoutedEventArgs &args)
void | OnPointerPressed (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)

Detailed Description

Definition at line 9 of file SwipeItem.h.

Constructor & Destructor Documentation

SwipeItem ( )

Definition at line 16 of file SwipeItem.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_SwipeItem);
}

Member Function Documentation

void AttachEventHandlers ( const winrt::AppBarButton & appBarButton ) [private]

Definition at line 88 of file SwipeItem.cpp.

{
    auto weakThis = get_weak();
    appBarButton.Tapped({ [weakThis](auto& sender, auto& args) {
        if (auto temp = weakThis.get()) temp->OnItemTapped(sender, args);
    } });
    appBarButton.PointerPressed({ [weakThis](auto& sender, auto& args) {
        if (auto temp = weakThis.get()) temp->OnPointerPressed(sender, args);
    } });
}

void GenerateControl | ( | const winrt::AppBarButton & | appBarButton,
 |  | const winrt::Style & | swipeItemStyle
 | ) |  |

Definition at line 65 of file SwipeItem.cpp.

{
    appBarButton.Style(swipeItemStyle);
    if (Background())
    {
        appBarButton.Background(Background());
    }

    if (Foreground())
    {
        appBarButton.Foreground(Foreground());
    }

    if (auto const source = IconSource())
    {
        appBarButton.Icon(SharedHelpers::MakeIconElementFrom(source));
    }

    appBarButton.Label(Text());
    AttachEventHandlers(appBarButton);
}

void InvokeSwipe ( const winrt::SwipeControl & content )

Definition at line 24 of file SwipeItem.cpp.

{
    auto eventArgs = winrt::make_self<SwipeItemInvokedEventArgs>();
    eventArgs->SwipeControl(swipeControl);
    m_invokedEventSource(*this, *eventArgs);

    if (s_CommandProperty)
    {
        auto command = Command().as<winrt::ICommand>();
        auto param = CommandParameter();

        if (command && command.CanExecute(param))
        {
            command.Execute(param);
        }
    }
    // It stays open when onInvoked is expand.
    if (BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::Close ||
        BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::Auto)
    {
        swipeControl.Close();
    }
}

void OnCommandChanged | ( | const winrt::ICommand & | oldCommand,
 |  | const winrt::ICommand & | newCommand |
 | ) |  |  | [private]

Definition at line 56 of file SwipeItem.cpp.

{
    if (auto newUICommand = newCommand.try_as<winrt::XamlUICommand>())
    {
        CommandingHelpers::BindToLabelPropertyIfUnset(newUICommand, *this, winrt::SwipeItem::TextProperty());
        CommandingHelpers::BindToIconSourcePropertyIfUnset(newUICommand, *this, winrt::SwipeItem::IconSourceProperty());
    }
}

void OnItemTapped | ( | const winrt::IInspectable & | sender,
 |  | const winrt::TappedRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 99 of file SwipeItem.cpp.

{
    auto current = winrt::VisualTreeHelper::GetParent(sender.try_as<winrt::DependencyObject>());
    while (current)
    {
        auto control = current.try_as<winrt::SwipeControl>();
        if (control)
        {
            InvokeSwipe(control);
            args.Handled(true);
        }
        current = winrt::VisualTreeHelper::GetParent(current);
    }
}

void OnPointerPressed | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 116 of file SwipeItem.cpp.

{
    if (args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch)
    {
        // if we press an item, we want to handle it and not let the parent SwipeControl receive the input
        args.Handled(true);
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 48 of file SwipeItem.cpp.

{
    if (args.Property() == winrt::SwipeItem::CommandProperty())
    {
        OnCommandChanged(args.OldValue().as<winrt::ICommand>(), args.NewValue().as<winrt::ICommand>());
    }
}

The documentation for this class was generated from the following files:
  • SwipeControl/SwipeItem.h
  • SwipeControl/SwipeItem.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeItemInvokedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

SwipeItemInvokedEventArgs Class Reference

#include "SwipeItemInvokedEventArgs.h"

List of all members.

Public Member Functions

winrt::SwipeControl | SwipeControl ()
void | SwipeControl (const winrt::SwipeControl &value)

Private Attributes

winrt::SwipeControl | m_swipeControl

Detailed Description

Definition at line 8 of file SwipeItemInvokedEventArgs.h.

Member Function Documentation

winrt::SwipeControl SwipeControl ( )

Definition at line 11 of file SwipeItemInvokedEventArgs.cpp.

{
    return m_swipeControl;
}

void SwipeControl ( const winrt::SwipeControl & value )

Definition at line 17 of file SwipeItemInvokedEventArgs.cpp.

{
    m_swipeControl = value;
}

Member Data Documentation

winrt::SwipeControl m_swipeControl [private]

Definition at line 18 of file SwipeItemInvokedEventArgs.h.

The documentation for this class was generated from the following files:
  • SwipeControl/SwipeItemInvokedEventArgs.h
  • SwipeControl/SwipeItemInvokedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

SwipeItemProperties Class Reference

#include "SwipeItem.properties.h"

Inherited by SwipeItem.

List of all members.

Public Member Functions

SwipeItemProperties ()
void | Background (winrt::Brush const &value)
winrt::Brush | Background ()
void | BehaviorOnInvoked (winrt::SwipeBehaviorOnInvoked const &value)
winrt::SwipeBehaviorOnInvoked | BehaviorOnInvoked ()
void | Command (winrt::ICommand const &value)
winrt::ICommand | Command ()
void | CommandParameter (winrt::IInspectable const &value)
winrt::IInspectable | CommandParameter ()
winrt::Brush | Foreground ()
void | Foreground (winrt::Brush const &value)
winrt::IconSource | IconSource ()
void | IconSource (winrt::IconSource const &value)
void | Invoked (winrt::event_token const &token)
winrt::event_token | Invoked (winrt::TypedEventHandler< winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs > const &value)
winrt::hstring | Text ()
void | Text (winrt::hstring const &value)

Static Public Member Functions

static winrt::DependencyProperty | BackgroundProperty ()
static winrt::DependencyProperty | BehaviorOnInvokedProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | CommandParameterProperty ()
static winrt::DependencyProperty | CommandProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ForegroundProperty ()
static winrt::DependencyProperty | IconSourceProperty ()
static void | OnBackgroundPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnBehaviorOnInvokedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCommandParameterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnForegroundPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIconSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTextPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TextProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::SwipeItem,
winrt::SwipeItemInvokedEventArgs > > 		m_invokedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_BackgroundProperty
static GlobalDependencyProperty | s_BehaviorOnInvokedProperty
static GlobalDependencyProperty | s_CommandParameterProperty
static GlobalDependencyProperty | s_CommandProperty
static GlobalDependencyProperty | s_ForegroundProperty
static GlobalDependencyProperty | s_IconSourceProperty
static GlobalDependencyProperty | s_TextProperty

Detailed Description

Definition at line 7 of file SwipeItem.properties.h.

Constructor & Destructor Documentation

SwipeItemProperties ( )

Definition at line 24 of file SwipeItem.properties.cpp.

    : m_invokedEventSource{static_cast<SwipeItem*>(this)}

Member Function Documentation

void Background ( winrt::Brush const & value )
winrt::Brush Background ( )
static winrt::DependencyProperty BackgroundProperty ( ) [inline, static]

Definition at line 33 of file SwipeItem.properties.h.

{ return s_BackgroundProperty; }

winrt::SwipeBehaviorOnInvoked BehaviorOnInvoked ( )
void BehaviorOnInvoked ( winrt::SwipeBehaviorOnInvoked const & value )
static winrt::DependencyProperty BehaviorOnInvokedProperty ( ) [inline, static]

Definition at line 34 of file SwipeItem.properties.h.

{ return s_BehaviorOnInvokedProperty; }

static void ClearProperties ( ) [static]
void Command ( winrt::ICommand const & value )
winrt::ICommand Command ( )
winrt::IInspectable CommandParameter ( )
void CommandParameter ( winrt::IInspectable const & value )
static winrt::DependencyProperty CommandParameterProperty ( ) [inline, static]

Definition at line 36 of file SwipeItem.properties.h.

{ return s_CommandParameterProperty; }

static winrt::DependencyProperty CommandProperty ( ) [inline, static]

Definition at line 35 of file SwipeItem.properties.h.

{ return s_CommandProperty; }

static void EnsureProperties ( ) [static]
void Foreground ( winrt::Brush const & value )
winrt::Brush Foreground ( )
static winrt::DependencyProperty ForegroundProperty ( ) [inline, static]

Definition at line 37 of file SwipeItem.properties.h.

{ return s_ForegroundProperty; }

void IconSource ( winrt::IconSource const & value )
winrt::IconSource IconSource ( )
static winrt::DependencyProperty IconSourceProperty ( ) [inline, static]

Definition at line 38 of file SwipeItem.properties.h.

{ return s_IconSourceProperty; }

winrt::event_token Invoked ( winrt::TypedEventHandler< winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs > const & value )
void Invoked ( winrt::event_token const & token )
static void OnBackgroundPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnBehaviorOnInvokedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCommandParameterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnForegroundPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIconSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTextPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::hstring Text ( )
void Text ( winrt::hstring const & value )
static winrt::DependencyProperty TextProperty ( ) [inline, static]

Definition at line 39 of file SwipeItem.properties.h.

{ return s_TextProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs> > m_invokedEventSource

Definition at line 52 of file SwipeItem.properties.h.

GlobalDependencyProperty s_BackgroundProperty [static]

Definition at line 41 of file SwipeItem.properties.h.

GlobalDependencyProperty s_BehaviorOnInvokedProperty [static]

Definition at line 42 of file SwipeItem.properties.h.

GlobalDependencyProperty s_CommandParameterProperty [static]

Definition at line 44 of file SwipeItem.properties.h.

GlobalDependencyProperty s_CommandProperty [static]

Definition at line 43 of file SwipeItem.properties.h.

GlobalDependencyProperty s_ForegroundProperty [static]

Definition at line 45 of file SwipeItem.properties.h.

GlobalDependencyProperty s_IconSourceProperty [static]

Definition at line 46 of file SwipeItem.properties.h.

GlobalDependencyProperty s_TextProperty [static]

Definition at line 47 of file SwipeItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SwipeItem.properties.h
  • Generated/SwipeItem.properties.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeItems Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

SwipeItems Class Reference

#include "SwipeItems.h"

Inherits ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > >, and SwipeItemsProperties.

List of all members.

Public Member Functions

SwipeItems ()
void | Append (winrt::SwipeItem const &value)
void | Clear ()
winrt::IIterator
< winrt::SwipeItem > 		First ()
winrt::SwipeItem | GetAt (uint32_t index)
uint32_t | GetMany (uint32_t startIndex, winrt::array_view< winrt::SwipeItem > items)
winrt::IVectorView
< winrt::SwipeItem > 		GetView ()
bool | IndexOf (winrt::SwipeItem const &value, uint32_t &index)
void | InsertAt (uint32_t index, winrt::SwipeItem const &value)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RemoveAt (uint32_t index)
void | RemoveAtEnd ()
void | ReplaceAll (winrt::array_view< winrt::SwipeItem const > items)
void | SetAt (uint32_t index, winrt::SwipeItem const &value)
uint32_t | Size ()
winrt::event_token | VectorChanged (winrt::VectorChangedEventHandler< winrt::SwipeItem > const &handler)
void | VectorChanged (winrt::event_token const token)

Private Member Functions

void | put_Items (const winrt::Collections::IVector< winrt::SwipeItem > &value)

Detailed Description

Definition at line 9 of file SwipeItems.h.

Constructor & Destructor Documentation

SwipeItems ( )

Definition at line 12 of file SwipeItems.cpp.

{
    // create the Collection
    auto collection = winrt::make<Vector<winrt::SwipeItem, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>();

    put_Items(collection);
}

Member Function Documentation

void Append ( winrt::SwipeItem const & value )

Definition at line 101 of file SwipeItems.cpp.

{
    if (Mode() == winrt::SwipeMode::Execute && m_items.get().Size() > 0)
    {
        throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
    }

    m_items.get().Append(value);
    m_vectorChangedEventSource(*this, nullptr);
}

void Clear ( )

Definition at line 118 of file SwipeItems.cpp.

{
    m_items.get().Clear();
    m_vectorChangedEventSource(*this, nullptr);
}

winrt::IIterator<winrt::SwipeItem> First ( ) [inline]

Definition at line 29 of file SwipeItems.h.

{ throw winrt::hresult_not_implemented(); }

winrt::SwipeItem GetAt ( uint32_t index )

Definition at line 43 of file SwipeItems.cpp.

{
    if (index >= m_items.get().Size())
    {
        throw winrt::hresult_out_of_bounds();
    }
    return m_items.get().GetAt(index);
}

uint32_t GetMany | ( | uint32_t | startIndex,
 |  | winrt::array_view< winrt::SwipeItem > | items |
 | ) |  |  | [inline]

Definition at line 30 of file SwipeItems.h.

{ throw winrt::hresult_not_implemented(); }

winrt::IVectorView< winrt::SwipeItem > GetView ( )

Definition at line 124 of file SwipeItems.cpp.

{
    return m_items.get().GetView();
}

bool IndexOf | ( | winrt::SwipeItem const & | value,
 |  | uint32_t & | index
 | ) |  |

Definition at line 57 of file SwipeItems.cpp.

{
    if (index >= m_items.get().Size())
    {
        throw winrt::hresult_out_of_bounds();
    }
    return m_items.get().IndexOf(value, index);
}

void InsertAt | ( | uint32_t | index,
 |  | winrt::SwipeItem const & | value
 | ) |  |

Definition at line 76 of file SwipeItems.cpp.

{
    if (Mode() == winrt::SwipeMode::Execute && m_items.get().Size() > 0)
    {
        throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
    }
    if (index > m_items.get().Size())
    {
        throw winrt::hresult_out_of_bounds();
    }

    m_items.get().InsertAt(index, value);
    m_vectorChangedEventSource(*this, nullptr);
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 20 of file SwipeItems.cpp.

{
    if (args.Property() == s_ModeProperty)
    {
        if (winrt::unbox_value<winrt::SwipeMode>(args.NewValue()) == winrt::SwipeMode::Execute && m_items.get().Size() > 1)
        {
            throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
        }
    }
}

void put_Items ( const winrt::Collections::IVector< winrt::SwipeItem > & value ) [private]

Definition at line 31 of file SwipeItems.cpp.

{
    if (Mode() == winrt::SwipeMode::Execute && value.Size() > 1)
    {
        throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
    }

    m_items.set(value);
    m_vectorChangedEventSource(*this, nullptr);
}

void RemoveAt ( uint32_t index )

Definition at line 91 of file SwipeItems.cpp.

{
    if (index >= m_items.get().Size())
    {
        throw winrt::hresult_out_of_bounds();
    }
    m_items.get().RemoveAt(index);
    m_vectorChangedEventSource(*this, nullptr);
}

void RemoveAtEnd ( )

Definition at line 112 of file SwipeItems.cpp.

{
    m_items.get().RemoveAtEnd();
    m_vectorChangedEventSource(*this, nullptr);
}

void ReplaceAll ( winrt::array_view< winrt::SwipeItem const > items ) [inline]

Definition at line 31 of file SwipeItems.h.

{ throw winrt::hresult_not_implemented(); }

void SetAt | ( | uint32_t | index,
 |  | winrt::SwipeItem const & | value
 | ) |  |

Definition at line 66 of file SwipeItems.cpp.

{
    if (index >= m_items.get().Size())
    {
        throw winrt::hresult_out_of_bounds();
    }
    m_items.get().SetAt(index, value);
    m_vectorChangedEventSource(*this, nullptr);
}

uint32_t Size ( )

Definition at line 52 of file SwipeItems.cpp.

{
    return m_items.get().Size();
}

void VectorChanged ( winrt::event_token const token )

Definition at line 134 of file SwipeItems.cpp.

{
    m_vectorChangedEventSource.remove(token);
}

winrt::event_token VectorChanged ( winrt::VectorChangedEventHandler< winrt::SwipeItem > const & handler )

Definition at line 129 of file SwipeItems.cpp.

{
    return m_vectorChangedEventSource.add(handler);
}

The documentation for this class was generated from the following files:
  • SwipeControl/SwipeItems.h
  • SwipeControl/SwipeItems.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeItemsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

SwipeItemsProperties Class Reference

#include "SwipeItems.properties.h"

Inherited by SwipeItems.

List of all members.

Public Member Functions

SwipeItemsProperties ()
winrt::SwipeMode | Mode ()
void | Mode (winrt::SwipeMode const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ModeProperty ()
static void | OnModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Static Public Attributes

static GlobalDependencyProperty | s_ModeProperty

Detailed Description

Definition at line 7 of file SwipeItems.properties.h.

Constructor & Destructor Documentation

SwipeItemsProperties ( )

Definition at line 18 of file SwipeItems.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file SwipeItems.properties.cpp.

{
    s_ModeProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file SwipeItems.properties.cpp.

{
    if (!s_ModeProperty)
    {
        s_ModeProperty =
            InitializeDependencyProperty(
                L"Mode",
                winrt::name_of<winrt::SwipeMode>(),
                winrt::name_of<winrt::SwipeItems>(),
                false /* isAttached */,
                ValueHelper<winrt::SwipeMode>::BoxValueIfNecessary(winrt::SwipeMode::Reveal),
                winrt::PropertyChangedCallback(&OnModePropertyChanged));
    }
}

void Mode ( winrt::SwipeMode const & value )

Definition at line 51 of file SwipeItems.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<SwipeItems*>(this)->SetValue(s_ModeProperty, ValueHelper<winrt::SwipeMode>::BoxValueIfNecessary(value));
    }
}

winrt::SwipeMode Mode ( )

Definition at line 59 of file SwipeItems.properties.cpp.

{
    return ValueHelper<winrt::SwipeMode>::CastOrUnbox(static_cast<SwipeItems*>(this)->GetValue(s_ModeProperty));
}

static winrt::DependencyProperty ModeProperty ( ) [inline, static]

Definition at line 15 of file SwipeItems.properties.h.

{ return s_ModeProperty; }

void OnModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 43 of file SwipeItems.properties.cpp.

{
    auto owner = sender.as<winrt::SwipeItems>();
    winrt::get_self<SwipeItems>(owner)->OnPropertyChanged(args);
}

Member Data Documentation

GlobalDependencyProperty s_ModeProperty [static]

Definition at line 17 of file SwipeItems.properties.h.

The documentation for this class was generated from the following files:
  • Generated/SwipeItems.properties.h
  • Generated/SwipeItems.properties.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Attributes | Static Private Attributes

SwipeTestHooks Class Reference

#include "SwipeTestHooks.h"

List of all members.

Static Public Member Functions

static com_ptr< SwipeTestHooks > | EnsureGlobalTestHooks ()
static com_ptr< SwipeTestHooks > | GetGlobalTestHooks ()
static bool | GetIsIdle (const winrt::SwipeControl &swipeControl)
static bool | GetIsOpen (const winrt::SwipeControl &swipeControl)
static winrt::SwipeControl | GetLastInteractedWithSwipeControl ()
static winrt::event_token | IdleStatusChanged (winrt::TypedEventHandler< winrt::SwipeControl, winrt::IInspectable > const &value)
static void | IdleStatusChanged (winrt::event_token const &token)
static void | LastInteractedWithSwipeControlChanged (winrt::event_token const &token)
static winrt::event_token | LastInteractedWithSwipeControlChanged (winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value)
static void | NotifyIdleStatusChanged (const winrt::SwipeControl &sender)
static void | NotifyLastInteractedWithSwipeControlChanged ()
static void | NotifyOpenedStatusChanged (const winrt::SwipeControl &sender)
static winrt::event_token | OpenedStatusChanged (winrt::TypedEventHandler< winrt::SwipeControl, winrt::IInspectable > const &value)
static void | OpenedStatusChanged (winrt::event_token const &token)

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::SwipeControl,
winrt::IInspectable > > 		m_idleStatusChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::IInspectable,
winrt::IInspectable > > 		m_lastInteractedWithSwipeControlChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::SwipeControl,
winrt::IInspectable > > 		m_openedStatusChangedEventSource

Static Private Attributes

static com_ptr< SwipeTestHooks > | s_testHooks

Detailed Description

Definition at line 10 of file SwipeTestHooks.h.

Member Function Documentation

com_ptr< SwipeTestHooks > EnsureGlobalTestHooks ( ) [static]

Definition at line 10 of file SwipeTestHooks.cpp.

{
    static bool s_initialized = []() {
        s_testHooks = winrt::make_self<SwipeTestHooks>();
        return true;
    }();
    return s_testHooks;
}

static com_ptr<SwipeTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 14 of file SwipeTestHooks.h.

    {
        return s_testHooks;
    }

bool GetIsIdle ( const winrt::SwipeControl & swipeControl ) [static]

Definition at line 40 of file SwipeTestHooks.cpp.

{
    if (swipeControl)
    {
        return winrt::get_self<SwipeControl>(swipeControl)->GetIsIdle();
    }
    else
    {
        if (auto lastInteractedWithSwipeControl = SwipeControl::GetLastInteractedWithSwipeControl())
        {
            return winrt::get_self<SwipeControl>(lastInteractedWithSwipeControl)->GetIsIdle();
        }
        return false;
    }
}

bool GetIsOpen ( const winrt::SwipeControl & swipeControl ) [static]

Definition at line 24 of file SwipeTestHooks.cpp.

{
    if (swipeControl)
    {
        return winrt::get_self<SwipeControl>(swipeControl)->GetIsOpen();
    }
    else
    {
        if (auto lastInteractedWithSwipeControl = SwipeControl::GetLastInteractedWithSwipeControl())
        {
            return winrt::get_self<SwipeControl>(lastInteractedWithSwipeControl)->GetIsOpen();
        }
        return false;
    }
}

winrt::SwipeControl GetLastInteractedWithSwipeControl ( ) [static]

Definition at line 19 of file SwipeTestHooks.cpp.

{
    return SwipeControl::GetLastInteractedWithSwipeControl();
}

winrt::event_token IdleStatusChanged ( winrt::TypedEventHandler< winrt::SwipeControl, winrt::IInspectable > const & value ) [static]

Definition at line 107 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_idleStatusChangedEventSource.add(value);
}

void IdleStatusChanged ( winrt::event_token const & token ) [static]

Definition at line 113 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_idleStatusChangedEventSource.remove(token);
}

void LastInteractedWithSwipeControlChanged ( winrt::event_token const & token ) [static]

Definition at line 71 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_lastInteractedWithSwipeControlChangedEventSource.remove(token);
}

winrt::event_token LastInteractedWithSwipeControlChanged ( winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const & value ) [static]

Definition at line 65 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_lastInteractedWithSwipeControlChangedEventSource.add(value);
}

void NotifyIdleStatusChanged ( const winrt::SwipeControl & sender ) [static]

Definition at line 98 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_idleStatusChangedEventSource)
    {
        hooks->m_idleStatusChangedEventSource(sender, nullptr);
    }
}

void NotifyLastInteractedWithSwipeControlChanged ( ) [static]

Definition at line 56 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_lastInteractedWithSwipeControlChangedEventSource)
    {
        hooks->m_lastInteractedWithSwipeControlChangedEventSource(nullptr, nullptr);
    }
}

void NotifyOpenedStatusChanged ( const winrt::SwipeControl & sender ) [static]

Definition at line 77 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_openedStatusChangedEventSource)
    {
        hooks->m_openedStatusChangedEventSource(sender, nullptr);
    }
}

winrt::event_token OpenedStatusChanged ( winrt::TypedEventHandler< winrt::SwipeControl, winrt::IInspectable > const & value ) [static]

Definition at line 86 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_openedStatusChangedEventSource.add(value);
}

void OpenedStatusChanged ( winrt::event_token const & token ) [static]

Definition at line 92 of file SwipeTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_openedStatusChangedEventSource.remove(token);
}

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::SwipeControl, winrt::IInspectable> > m_idleStatusChangedEventSource [private]

Definition at line 41 of file SwipeTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> > m_lastInteractedWithSwipeControlChangedEventSource [private]

Definition at line 39 of file SwipeTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::SwipeControl, winrt::IInspectable> > m_openedStatusChangedEventSource [private]

Definition at line 40 of file SwipeTestHooks.h.

com_ptr<SwipeTestHooks> s_testHooks [static, private]

Definition at line 38 of file SwipeTestHooks.h.

The documentation for this class was generated from the following files:
  • SwipeControl/SwipeTestHooks.h
  • SwipeControl/SwipeTestHooks.cpp
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

TabView Class Reference

#include "TabView.h"

Inherits ReferenceTracker< TabView, winrt::implementation::TabViewT >, and TabViewProperties.

List of all members.

Public Member Functions

TabView ()
~TabView ()
void | AttachMoveSizeLoopEvents ()
winrt::DependencyObject | ContainerFromIndex (int index)
winrt::DependencyObject | ContainerFromItem (winrt::IInspectable const &item)
winrt::ContentCoordinateConverter
const & 		GetAppWindowCoordinateConverter ()
winrt::InputNonClientPointerSource
const & 		GetInputNonClientPointerSource ()
int | GetItemCount ()
winrt::hstring | GetTabCloseButtonTooltipText ()
int | IndexFromContainer (winrt::DependencyObject const &container)
winrt::IInspectable | ItemFromContainer (winrt::DependencyObject const &container)
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
bool | MoveFocus (bool moveForward)
void | OnApplyTemplate ()
void | OnCanTearOutTabsPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnCloseButtonOverlayModePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnItemsChanged (winrt::IInspectable const &item)
void | OnSelectedIndexPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnSelectedItemPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnTabItemsSourcePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnTabWidthModePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RequestCloseTab (winrt::TabViewItem const &item, bool updateTabWidths)
void | SetTabSeparatorOpacity (int index)
void | SetTabSeparatorOpacity (int index, int opacityValue)
void | UpdateTabContent ()
void | UpdateTabViewWithTearOutList ()
void | UpdateTabWidths (bool shouldUpdateWidths=true, bool fillAllAvailableSpace=true)

Static Public Member Functions

static MutexLockedResource
< std::list< winrt::weak_ref
< winrt::TabView > > > 		GetTabViewWithTearOutList ()

Private Member Functions

void | BringSelectedTabIntoView ()
void | DragTabWithinTabView (const winrt::WindowRectChangingEventArgs &args)
void | DragTornOutTab (const winrt::WindowRectChangingEventArgs &args)
winrt::TabViewItem | FindTabViewItemFromDragItem (const winrt::IInspectable &item)
winrt::WindowId | GetAppWindowId ()
winrt::TabViewItem | GetTabAtPoint (const winrt::Point &point)
int | GetTabInsertionIndex (winrt::TabView const &otherTabView, winrt::PointInt32 const &screenPosition)
bool | MoveSelection (bool moveForward)
void | OnAddButtonClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnAddButtonKeyDown (const winrt::IInspectable &sender, winrt::KeyRoutedEventArgs const &args)
void | OnCtrlF4Invoked (const winrt::KeyboardAccelerator &sender, const winrt::KeyboardAcceleratorInvokedEventArgs &args)
void | OnCtrlShiftTabInvoked (const winrt::KeyboardAccelerator &sender, const winrt::KeyboardAcceleratorInvokedEventArgs &args)
void | OnCtrlTabInvoked (const winrt::KeyboardAccelerator &sender, const winrt::KeyboardAcceleratorInvokedEventArgs &args)
void | OnEnteredMoveSize (const winrt::InputNonClientPointerSource &sender, const winrt::EnteredMoveSizeEventArgs &args)
void | OnEnteringMoveSize (const winrt::InputNonClientPointerSource &sender, const winrt::EnteringMoveSizeEventArgs &args)
void | OnExitedMoveSize (const winrt::InputNonClientPointerSource &sender, const winrt::ExitedMoveSizeEventArgs &args)
void | OnItemsPresenterSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnListViewDragEnter (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnListViewDraggingPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnListViewDragItemsCompleted (const winrt::IInspectable &sender, const winrt::DragItemsCompletedEventArgs &args)
void | OnListViewDragItemsStarting (const winrt::IInspectable &sender, const winrt::DragItemsStartingEventArgs &args)
void | OnListViewDragLeave (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnListViewDragOver (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnListViewDrop (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnListViewGettingFocus (const winrt::IInspectable &sender, const winrt::GettingFocusEventArgs &args)
void | OnListViewLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnListViewSelectionChanged (const winrt::IInspectable &sender, const winrt::SelectionChangedEventArgs &args)
void | OnListViewSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnScrollDecreaseClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnScrollIncreaseClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnScrollViewerLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnScrollViewerViewChanged (winrt::IInspectable const &sender, winrt::ScrollViewerViewChangedEventArgs const &args)
void | OnTabStripPointerEntered (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnTabStripPointerExited (const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args)
void | OnUnloaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnWindowRectChanging (const winrt::InputNonClientPointerSource &sender, const winrt::WindowRectChangingEventArgs &args)
void | PopulateTabViewList ()
bool | RequestCloseCurrentTab ()
void | TearOutTab (winrt::TabViewItem const &tabBeingDragged, winrt::Point const &pointerPosition)
void | UnhookEventsAndClearFields ()
void | UpdateBottomBorderLineVisualStates ()
void | UpdateIsItemDraggedOver (bool isItemDraggedOver)
void | UpdateListViewItemContainerTransitions ()
void | UpdateNonClientRegion ()
void | UpdateScrollViewerDecreaseAndIncreaseButtonsViewState ()
void | UpdateSelectedIndex ()
void | UpdateSelectedItem ()
void | UpdateTabBottomBorderLineVisualStates ()
void | UpdateTabIndex (winrt::TabViewItem const &tabBeingDragged, winrt::Point const &pointerPosition)

Static Private Member Functions

static bool | IsFocusable (winrt::DependencyObject const &object, bool checkTabStop=false)

Private Attributes

std::vector< std::tuple
< winrt::RectInt32,
winrt::TabView > > 		m_tabViewBoundsTuples

Static Private Attributes

static std::list
< winrt::weak_ref
< winrt::TabView > > 		s_tabViewWithTearOutList
static HANDLE | s_tabWithTearOutListMutex = ::CreateMutexW(nullptr, FALSE, nullptr)

Detailed Description

Definition at line 209 of file TabView.h.

Constructor & Destructor Documentation

TabView ( )

Definition at line 66 of file TabView.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_TabView);

    auto items = winrt::make<Vector<winrt::IInspectable, MakeVectorParam<VectorFlag::Observable>()>>();
    SetValue(s_TabItemsProperty, items);

    SetDefaultStyleKey(this);

    Loaded({ this, &TabView::OnLoaded });
    Unloaded({ this, &TabView::OnUnloaded });

    winrt::KeyboardAccelerator ctrlf4Accel;
    ctrlf4Accel.Key(winrt::VirtualKey::F4);
    ctrlf4Accel.Modifiers(winrt::VirtualKeyModifiers::Control);
    ctrlf4Accel.Invoked({ this, &TabView::OnCtrlF4Invoked });
    ctrlf4Accel.ScopeOwner(*this);
    KeyboardAccelerators().Append(ctrlf4Accel);

    m_tabCloseButtonTooltipText = ResourceAccessor::GetLocalizedStringResource(SR_TabViewCloseButtonTooltipWithKA);

    winrt::KeyboardAccelerator ctrlTabAccel;
    ctrlTabAccel.Key(winrt::VirtualKey::Tab);
    ctrlTabAccel.Modifiers(winrt::VirtualKeyModifiers::Control);
    ctrlTabAccel.Invoked({ this, &TabView::OnCtrlTabInvoked });
    ctrlTabAccel.ScopeOwner(*this);
    KeyboardAccelerators().Append(ctrlTabAccel);

    winrt::KeyboardAccelerator ctrlShiftTabAccel;
    ctrlShiftTabAccel.Key(winrt::VirtualKey::Tab);
    ctrlShiftTabAccel.Modifiers(winrt::VirtualKeyModifiers::Control | winrt::VirtualKeyModifiers::Shift);
    ctrlShiftTabAccel.Invoked({ this, &TabView::OnCtrlShiftTabInvoked });
    ctrlShiftTabAccel.ScopeOwner(*this);
    KeyboardAccelerators().Append(ctrlShiftTabAccel);
}

~TabView ( )

Definition at line 102 of file TabView.cpp.

{
    if (m_inputNonClientPointerSource)
    {
        m_inputNonClientPointerSource.EnteringMoveSize(m_enteringMoveSizeToken);
        m_inputNonClientPointerSource.EnteredMoveSize(m_enteredMoveSizeToken);
        m_inputNonClientPointerSource.WindowRectChanging(m_windowRectChangingToken);
        m_inputNonClientPointerSource.ExitedMoveSize(m_exitedMoveSizeToken);
    }
}

Member Function Documentation

void AttachMoveSizeLoopEvents ( )

Definition at line 1625 of file TabView.cpp.

{
    if (CanTearOutTabs())
    {
        if (IsLoaded() && m_enteringMoveSizeToken.value == 0)
        {
            auto& nonClientPointerSource = GetInputNonClientPointerSource();

            m_enteringMoveSizeToken = nonClientPointerSource.EnteringMoveSize({ this, &TabView::OnEnteringMoveSize });
            m_enteredMoveSizeToken = nonClientPointerSource.EnteredMoveSize({ this, &TabView::OnEnteredMoveSize });
            m_windowRectChangingToken = nonClientPointerSource.WindowRectChanging({ this, &TabView::OnWindowRectChanging });
            m_exitedMoveSizeToken = nonClientPointerSource.ExitedMoveSize({ this, &TabView::OnExitedMoveSize });
        }
    }
    else if (m_inputNonClientPointerSource)
    {
        m_inputNonClientPointerSource.EnteringMoveSize(m_enteringMoveSizeToken);
        m_inputNonClientPointerSource.EnteredMoveSize(m_enteredMoveSizeToken);
        m_inputNonClientPointerSource.WindowRectChanging(m_windowRectChangingToken);
        m_inputNonClientPointerSource.ExitedMoveSize(m_exitedMoveSizeToken);

        m_enteringMoveSizeToken.value = 0;
        m_enteredMoveSizeToken.value = 0;
        m_windowRectChangingToken.value = 0;
        m_exitedMoveSizeToken.value = 0;
    }
}

void BringSelectedTabIntoView ( ) [private]

Definition at line 740 of file TabView.cpp.

{
    if (SelectedItem())
    {
        auto tvi = SelectedItem().try_as<winrt::TabViewItem>();
        if (!tvi)
        {
            tvi = ContainerFromItem(SelectedItem()).try_as<winrt::TabViewItem>();
        }
        if (tvi)
        {
            winrt::get_self<TabViewItem>(tvi)->StartBringTabIntoView();
        }
    }
}

winrt::DependencyObject ContainerFromIndex ( int index )

Definition at line 1358 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        return listView.ContainerFromIndex(index);
    }
    return nullptr;
}

winrt::DependencyObject ContainerFromItem ( winrt::IInspectable const & item )

Definition at line 1349 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        return listView.ContainerFromItem(item);
    }
    return nullptr;
}

void DragTabWithinTabView ( const winrt::WindowRectChangingEventArgs & args ) [private]

Definition at line 1798 of file TabView.cpp.

{
    auto pointInIslandCoords = m_tabViewContainingTabBeingDragged.XamlRoot().CoordinateConverter().ConvertScreenToLocal(args.PointerScreenPoint());
    auto tabBeingDragged = m_tabViewContainingTabBeingDragged.ContainerFromItem(m_dataItemBeingDragged).try_as<winrt::TabViewItem>();

    if (tabBeingDragged)
    {
        if (auto& listView = winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged)->m_listView.get())
        {
            // We'll retrieve the bounds of the tab view's list view in which we're dragging the tab, in order to be able to tell whether the tab has been dragged out of it.
            auto bounds = listView.TransformToVisual(nullptr).TransformBounds({ 0, 0, static_cast<float>(listView.ActualWidth()), static_cast<float>(listView.ActualHeight()) });

            // We'll add a one-pixel margin to the bounds, since otherwise we could run into the situation where we immediately reattach after dragging out of a tab view,
            // depending on how sub-pixel rounding works out.
            bounds.X -= 1;
            bounds.Y -= 1;
            bounds.Width += 2;
            bounds.Height += 2;

            if (SharedHelpers::DoesRectContainPoint(bounds, pointInIslandCoords))
            {
                // If the tab view bounds contain the pointer point, then we'll update the index of the tab being dragged within its tab view.
                UpdateTabIndex(tabBeingDragged, pointInIslandCoords);
            }
            else
            {
                // Otherwise, we'll tear out the tab and show the window created to host the torn-out tab.
                TearOutTab(tabBeingDragged, pointInIslandCoords);
            }
        }
    }
}

void DragTornOutTab ( const winrt::WindowRectChangingEventArgs & args ) [private]

Definition at line 1902 of file TabView.cpp.

{
    // When we're dragging a torn-out tab, we want to check, as the window moves, whether the user has dragged the tab over a tab view that will allow it to be dropped into it.
    // We'll iterate through the list of tab views and their bounds and check each of their screen positions against the screen position of the pointer.
    for (auto iterator = m_tabViewBoundsTuples.begin(); iterator != m_tabViewBoundsTuples.end(); iterator++)
    {
        auto& otherTabViewScreenBounds = std::get<winrt::RectInt32>(*iterator);

        if (SharedHelpers::DoesRectContainPoint(otherTabViewScreenBounds, args.PointerScreenPoint()))
        {
            auto& otherTabView = std::get<winrt::TabView>(*iterator);

            // We'll check which index we need to insert the tab at.
            int insertionIndex = GetTabInsertionIndex(otherTabView, args.PointerScreenPoint());

            // If we got a valid index, we'll begin attempting to merge the tab into this tab view.
            if (insertionIndex >= 0)
            {
                // First, we'll raise the ExternalTornOutTabsDropping event, which asks the app whether this tab view should accept the tab being dropped into it.
                auto tabsDroppingArgs = winrt::make<TabViewExternalTornOutTabsDroppingEventArgs>(m_dataItemBeingDragged, m_tabBeingDragged, insertionIndex);

                auto otherTabViewImpl = winrt::get_self<TabView>(otherTabView);
                otherTabViewImpl->m_externalTornOutTabsDroppingEventSource(otherTabView, tabsDroppingArgs);

                // If the response was yes, then we'll raise the ExternalTornOutTabsDropped event, which prompts the app to actually move the tab's data item
                // to the new tab view; we'll flag the new tab view as the one containing the tab we're dragging; we'll move to the dragging tab within a tab view state;
                // and finally we'll then hide the torn-out tab window.
                if (tabsDroppingArgs.AllowDrop())
                {
                    // We're about to merge the tab into the other tab view, so we'll retrieve and save off the tab view that currently holds the tab being dragged.
                    // We'll need to remove it from the list of tab views with CanTearOutTabs set to true if its window is destroyed.
                    m_tabViewInNewAppWindow = m_tabViewContainingTabBeingDragged;

                    otherTabViewImpl->m_externalTornOutTabsDroppedEventSource(otherTabView, winrt::make<TabViewExternalTornOutTabsDroppedEventArgs>(m_dataItemBeingDragged, m_tabBeingDragged, insertionIndex));
                    otherTabView.SelectedItem(m_dataItemBeingDragged);

                    // If the other tab view's app window is a different app window than the one being dragged, bring it to the front beneath the one being dragged.
                    auto otherTabViewAppWindow = winrt::AppWindow::GetFromWindowId(otherTabView.XamlRoot().ContentIslandEnvironment().AppWindowId());
                    otherTabViewAppWindow.MoveInZOrderAtTop();

                    m_tabViewContainingTabBeingDragged = otherTabView;
                    m_dragPositionOffset = {};
                    m_tabTearOutDraggingState = TabTearOutDraggingState::DraggingTabWithinTabView;
                    m_tabTearOutNewAppWindow.Hide();

                    break;
                }
            }
        }
    }
}

winrt::TabViewItem FindTabViewItemFromDragItem ( const winrt::IInspectable & item ) [private]

Definition at line 844 of file TabView.cpp.

{
    auto tab = ContainerFromItem(item).try_as<winrt::TabViewItem>();

    if (!tab)
    {
        if (auto fe = item.try_as<winrt::FrameworkElement>())
        {
            tab = winrt::VisualTreeHelper::GetParent(fe).try_as<winrt::TabViewItem>();
        }
    }

    if (!tab)
    {
        // This is a fallback scenario for tabs without a data context
        auto numItems = static_cast<int>(TabItems().Size());
        for (int i = 0; i < numItems; i++)
        {
            if (auto tabItem = ContainerFromIndex(i).try_as<winrt::TabViewItem>())
            {
                if (tabItem.Content() == item)
                {
                    tab = tabItem;
                    break;
                }
            }
        }
    }

    return tab;
}

winrt::ContentCoordinateConverter const& GetAppWindowCoordinateConverter ( )
winrt::WindowId GetAppWindowId ( ) [private]
winrt::InputNonClientPointerSource const& GetInputNonClientPointerSource ( )
int GetItemCount ( )

Definition at line 1384 of file TabView.cpp.

{
    if (auto itemsSource = TabItemsSource())
    {
        if (auto vector = itemsSource.try_as<winrt::IVector<winrt::IInspectable>>())
        {
            return static_cast<int>(vector.Size());
        }
        else if (auto iterable = itemsSource.try_as<winrt::IIterable<winrt::IInspectable>>())
        {
            int i = 0;

            for (auto const& o : iterable)
            {
                i++;
            }

            return i;
        }

        return 0;
    }
    else
    {
        return static_cast<int>(TabItems().Size());
    }
}

winrt::TabViewItem GetTabAtPoint ( const winrt::Point & point ) [private]

Definition at line 2064 of file TabView.cpp.

{
    // Convert the point to a point in the TabView's coordinate space
    // and then detect which TabViewItem is at that point.
    auto tabViewRect = TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight()) });

    if (SharedHelpers::DoesRectContainPoint(tabViewRect, point))
    {
        auto tabCount = GetItemCount();
        for (int i = 0; i < tabCount; i++)
        {
            auto tab = ContainerFromIndex(i).try_as<winrt::TabViewItem>();
            if (tab)
            {
                auto tabRect = tab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(tab.ActualWidth()), static_cast<float>(tab.ActualHeight()) });
                if (SharedHelpers::DoesRectContainPoint(tabRect, point))
                {
                    return tab;
                }
            }
        }
    }

    return nullptr;
}

winrt::hstring GetTabCloseButtonTooltipText ( ) [inline]

Definition at line 244 of file TabView.h.

{ return m_tabCloseButtonTooltipText; }

int GetTabInsertionIndex | ( | winrt::TabView const & | otherTabView,
 |  | winrt::PointInt32 const & | screenPosition |
 | ) |  |  | [private]

Definition at line 1954 of file TabView.cpp.

{
    int index = -1;

    // To get the insertion index, we'll first check what tab (if any) is beneath the screen position.
    auto otherTabViewImpl = winrt::get_self<TabView>(otherTabView);
    auto tab = otherTabViewImpl->GetTabAtPoint(otherTabView.XamlRoot().CoordinateConverter().ConvertScreenToLocal(screenPosition));

    if (tab)
    {
        // If there was a tab underneath the position, then we'll check whether the screen position is on its left side or its right side.
        // If it's on the left side, we'll set the insertion position to be before this tab. Otherwise, we'll set it to be after this tab.
        auto tabIndex = otherTabViewImpl->IndexFromContainer(tab);
        auto tabRect = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(tab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(tab.ActualWidth()), static_cast<float>(tab.ActualHeight()) }));

        if (screenPosition.X < tabRect.X + tabRect.Width / 2)
        {
            index = tabIndex;
        }
        else
        {
            index = tabIndex + 1;
        }
    }
    else if (otherTabViewImpl->GetItemCount() > 0)
    {
        // If there was no tab, under the cursor, then that suggests we want to insert the tab either at the very beginning or at the very end.
        // We'll first check whether the screen position is to the left of the bounds of the first tab.  If so, we'll set the insertion position
        // to be the start of the item list.
        auto firstTab = otherTabViewImpl->ContainerFromIndex(0).as<winrt::TabViewItem>();

        if (firstTab)
        {
            auto firstTabRect = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(firstTab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(firstTab.ActualWidth()), static_cast<float>(firstTab.ActualHeight()) }));

            if (screenPosition.X < firstTabRect.X)
            {
                index = 0;
            }
        }

        // If that wasn't the case, then next we'll check whether the screen position is to the right of the bounds of the last tab.
        // If so, we'll set the insertion position to be the end of the item list.
        if (index < 0)
        {
            auto lastTabIndex = otherTabViewImpl->GetItemCount() - 1;
            auto lastTab = otherTabViewImpl->ContainerFromIndex(lastTabIndex).as<winrt::TabViewItem>();

            if (lastTab)
            {
                auto lastTabRect = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(lastTab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(lastTab.ActualWidth()), static_cast<float>(lastTab.ActualHeight()) }));
                if (screenPosition.X > lastTabRect.X + lastTabRect.Width)
                {
                    index = otherTabViewImpl->GetItemCount();
                }
            }
        }
    }

    return index;
}

static MutexLockedResource<std::list<winrt::weak_ref<winrt::TabView> > > GetTabViewWithTearOutList ( ) [static]
int IndexFromContainer ( winrt::DependencyObject const & container )

Definition at line 1367 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        return listView.IndexFromContainer(container);
    }
    return -1;
}

bool IsFocusable | ( | winrt::DependencyObject const & | object,
 |  | bool | checkTabStop = false |
 | ) |  |  | [static, private]

Definition at line 1579 of file TabView.cpp.

{
    if (!object)
    {
        return false;
    }

    if (auto control = object.try_as<winrt::Control>())
    {
        return control &&
            control.Visibility() == winrt::Visibility::Visible &&
            (control.IsEnabled() || control.AllowFocusWhenDisabled()) &&
            (control.IsTabStop() || !checkTabStop);
    }
    else
    {
        return false;
    }
}

winrt::IInspectable ItemFromContainer ( winrt::DependencyObject const & container )

Definition at line 1375 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        return listView.ItemFromContainer(container);
    }
    return nullptr;
}

winrt::Size MeasureOverride ( winrt::Size const & availableSize )

Definition at line 1104 of file TabView.cpp.

{
    if (m_previousAvailableSize.Width != availableSize.Width)
    {
        m_previousAvailableSize = availableSize;
        UpdateTabWidths();
    }

    return __super::MeasureOverride(availableSize);
}

bool MoveFocus ( bool moveForward )

Definition at line 1412 of file TabView.cpp.

{
    auto focusedControl = winrt::FocusManager::GetFocusedElement() ? winrt::FocusManager::GetFocusedElement().try_as<winrt::Control>() : nullptr;

    // If there's no focused control, then we have nothing to do.
    if (!focusedControl)
    {
        return false;
    }

    // Focus goes in this order:
    //
    //    Tab 1 -> Tab 1 close button -> Tab 2 -> Tab 2 close button -> ... -> Tab N -> Tab N close button -> Add tab button -> Tab 1
    //
    // Any element that's not focusable is skipped.
    //
    std::vector<winrt::Control> focusOrderList;

    for (int i = 0; i < GetItemCount(); i++)
    {
        if (auto tab = ContainerFromIndex(i).try_as<winrt::TabViewItem>())
        {
            if (IsFocusable(tab, false /* checkTabStop */))
            {
                focusOrderList.push_back(tab);

                if (auto closeButton = winrt::get_self<TabViewItem>(tab)->GetCloseButton())
                {
                    if (IsFocusable(closeButton, false /* checkTabStop */))
                    {
                        focusOrderList.push_back(closeButton);
                    }
                }
            }
        }
    }

    if (auto&& addButton = m_addButton.get())
    {
        if (IsFocusable(addButton, false /* checkTabStop */))
        {
            focusOrderList.push_back(addButton);
        }
    }

    auto position = std::find(focusOrderList.begin(), focusOrderList.end(), focusedControl);

    // The focused control is not in the focus order list - nothing for us to do here either.
    if (position == focusOrderList.end())
    {
        return false;
    }

    // At this point, we know that the focused control is indeed in the focus list, so we'll move focus to the next or previous control in the list.

    const int sourceIndex = static_cast<int>(position - focusOrderList.begin());
    const int listSize = static_cast<int>(focusOrderList.size());
    const int increment = moveForward ? 1 : -1;
    int nextIndex = sourceIndex + increment;

    if (nextIndex < 0)
    {
        nextIndex = listSize - 1;
    }
    else if (nextIndex >= listSize)
    {
        nextIndex = 0;
    }

    // We have to do a bit of a dance for the close buttons - we don't want users to be able to give them focus when tabbing through an app,
    // since we only want to tab into the TabView once and then tab out on the next tab press.  However, IsTabStop also controls keyboard
    // focusability in general - we can't give keyboard focus to a control with IsTabStop = false.  To work around this, we'll temporarily set
    // IsTabStop = true before calling Focus(), and then set it back to false if it was previously false.

    auto&& control = focusOrderList[nextIndex];
    const bool originalIsTabStop = control.IsTabStop();

    auto scopeGuard = gsl::finally([control, originalIsTabStop]()
        {
            control.IsTabStop(originalIsTabStop);
        });

    control.IsTabStop(true);

    // We checked focusability above, so we should never be in a situation where Focus() returns false.
    MUX_ASSERT(control.Focus(winrt::FocusState::Keyboard));
    return true;
}

bool MoveSelection ( bool moveForward ) [private]

Definition at line 1501 of file TabView.cpp.

{
    const int originalIndex = SelectedIndex();
    const int increment = moveForward ? 1 : -1;
    int currentIndex = originalIndex + increment;
    const int itemCount = GetItemCount();

    while (currentIndex != originalIndex)
    {
        if (currentIndex < 0)
        {
            currentIndex = static_cast<int>(itemCount - 1);
        }
        else if (currentIndex >= itemCount)
        {
            currentIndex = 0;
        }

        if (IsFocusable(ContainerFromIndex(currentIndex)))
        {
            SelectedIndex(currentIndex);
            return true;
        }

        currentIndex += increment;
    }

    return false;
}

void OnAddButtonClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 515 of file TabView.cpp.

{
    m_addTabButtonClickEventSource(*this, args);
}

void OnAddButtonKeyDown | ( | const winrt::IInspectable & | sender,
 |  | winrt::KeyRoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 1562 of file TabView.cpp.

{
    if (auto&& addButton = m_addButton.get())
    {
        if (args.Key() == winrt::VirtualKey::Right)
        {
            args.Handled(MoveFocus(addButton.FlowDirection() == winrt::FlowDirection::LeftToRight));
        }
        else if (args.Key() == winrt::VirtualKey::Left)
        {
            args.Handled(MoveFocus(addButton.FlowDirection() != winrt::FlowDirection::LeftToRight));
        }
    }
}

void OnApplyTemplate ( )

Definition at line 113 of file TabView.cpp.

{
    UnhookEventsAndClearFields();

    m_isItemBeingDragged = false;
    m_isItemDraggedOver = false;
    m_expandedWidthForDragOver.reset();

    winrt::IControlProtected controlProtected{ *this };

    m_tabContentPresenter.set(GetTemplateChildT<winrt::ContentPresenter>(L"TabContentPresenter", controlProtected));
    m_rightContentPresenter.set(GetTemplateChildT<winrt::ContentPresenter>(L"RightContentPresenter", controlProtected));

    m_leftContentColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"LeftContentColumn", controlProtected));
    m_tabColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"TabColumn", controlProtected));
    m_addButtonColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"AddButtonColumn", controlProtected));
    m_rightContentColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"RightContentColumn", controlProtected));

    if (const auto& containerGrid = GetTemplateChildT<winrt::Grid>(L"TabContainerGrid", controlProtected))
    {
        m_tabContainerGrid.set(containerGrid);
        m_tabStripPointerExitedRevoker = containerGrid.PointerExited(winrt::auto_revoke, { this,&TabView::OnTabStripPointerExited });
        m_tabStripPointerEnteredRevoker = containerGrid.PointerEntered(winrt::auto_revoke, { this,&TabView::OnTabStripPointerEntered });
    }

    m_listView.set([this, controlProtected]() {
        auto listView = GetTemplateChildT<winrt::ListView>(L"TabListView", controlProtected);
        if (listView)
        {
            m_listViewLoadedRevoker = listView.Loaded(winrt::auto_revoke, { this, &TabView::OnListViewLoaded });
            m_listViewSelectionChangedRevoker = listView.SelectionChanged(winrt::auto_revoke, { this, &TabView::OnListViewSelectionChanged });
            m_listViewSizeChangedRevoker = listView.SizeChanged(winrt::auto_revoke, { this, &TabView::OnListViewSizeChanged });

            m_listViewDragItemsStartingRevoker = listView.DragItemsStarting(winrt::auto_revoke, { this, &TabView::OnListViewDragItemsStarting });
            m_listViewDragItemsCompletedRevoker = listView.DragItemsCompleted(winrt::auto_revoke, { this, &TabView::OnListViewDragItemsCompleted });
            m_listViewDragOverRevoker = listView.DragOver(winrt::auto_revoke, { this, &TabView::OnListViewDragOver });

            m_listViewDropRevoker = AddRoutedEventHandler<RoutedEventType::Drop>(
                listView,
                { this, &TabView::OnListViewDrop },
                true /* handledEventsToo */);
            m_listViewDragEnterRevoker = AddRoutedEventHandler<RoutedEventType::DragEnter>(
                listView,
                { this, &TabView::OnListViewDragEnter },
                true /* handledEventsToo */);
            m_listViewDragLeaveRevoker = AddRoutedEventHandler<RoutedEventType::DragLeave>(
                listView,
                { this, &TabView::OnListViewDragLeave },
                true /* handledEventsToo */);

            m_listViewGettingFocusRevoker = listView.GettingFocus(winrt::auto_revoke, { this, &TabView::OnListViewGettingFocus });

            m_listViewCanReorderItemsPropertyChangedRevoker = RegisterPropertyChanged(listView, winrt::ListViewBase::CanReorderItemsProperty(), { this, &TabView::OnListViewDraggingPropertyChanged });
            m_listViewAllowDropPropertyChangedRevoker = RegisterPropertyChanged(listView, winrt::UIElement::AllowDropProperty(), { this, &TabView::OnListViewDraggingPropertyChanged });
        }
        return listView;
    }());

    m_addButton.set([this, controlProtected]() {
        auto addButton = GetTemplateChildT<winrt::Button>(L"AddButton", controlProtected);
        if (addButton)
        {
            // Do localization for the add button
            if (winrt::AutomationProperties::GetName(addButton).empty())
            {
                auto addButtonName = ResourceAccessor::GetLocalizedStringResource(SR_TabViewAddButtonName);
                winrt::AutomationProperties::SetName(addButton, addButtonName);
            }

            auto toolTip = winrt::ToolTipService::GetToolTip(addButton);
            if (!toolTip)
            {
                winrt::ToolTip tooltip = winrt::ToolTip();
                tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TabViewAddButtonTooltip)));
                winrt::ToolTipService::SetToolTip(addButton, tooltip);
            }

            m_addButtonClickRevoker = addButton.Click(winrt::auto_revoke, { this, &TabView::OnAddButtonClick });
            m_addButtonKeyDownRevoker = addButton.KeyDown(winrt::auto_revoke, { this, &TabView::OnAddButtonKeyDown });
        }
        return addButton;
    }());

    UpdateListViewItemContainerTransitions();
}

void OnCanTearOutTabsPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 429 of file TabView.cpp.

{
    UpdateTabViewWithTearOutList();
    AttachMoveSizeLoopEvents();
    UpdateNonClientRegion();
}

void OnCloseButtonOverlayModePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 494 of file TabView.cpp.

{
    // Switch the visual states of all tab items to to the correct closebutton overlay mode
    for (auto&& item : TabItems())
    {
        auto const tvi = [item, this]()
        {
            if (auto tabViewItem = item.try_as<TabViewItem>())
            {
                return tabViewItem;
            }
            return ContainerFromItem(item).try_as<TabViewItem>();
        }();

        if (tvi)
        {
            tvi->OnCloseButtonOverlayModeChanged(CloseButtonOverlayMode());
        }
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 520 of file TabView.cpp.

{
    return winrt::make<TabViewAutomationPeer>(*this);
}

void OnCtrlF4Invoked | ( | const winrt::KeyboardAccelerator & | sender,
 |  | const winrt::KeyboardAcceleratorInvokedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1547 of file TabView.cpp.

{
    args.Handled(RequestCloseCurrentTab());
}

void OnCtrlShiftTabInvoked | ( | const winrt::KeyboardAccelerator & | sender,
 |  | const winrt::KeyboardAcceleratorInvokedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1557 of file TabView.cpp.

{
    args.Handled(MoveSelection(false /* moveForward */));
}

void OnCtrlTabInvoked | ( | const winrt::KeyboardAccelerator & | sender,
 |  | const winrt::KeyboardAcceleratorInvokedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1552 of file TabView.cpp.

{
    args.Handled(MoveSelection(true /* moveForward */));
}

void OnEnteredMoveSize | ( | const winrt::InputNonClientPointerSource & | sender,
 |  | const winrt::EnteredMoveSizeEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1734 of file TabView.cpp.

{
    if (!m_isInTabTearOutLoop)
    {
        return;
    }

    MUX_ASSERT(CanTearOutTabs() && m_tabTearOutDraggingState == TabTearOutDraggingState::Idle);
    m_tabTearOutDraggingState = GetItemCount() > 1 ? TabTearOutDraggingState::DraggingTabWithinTabView : TabTearOutDraggingState::DraggingTornOutTab;
    m_tabTearOutInitialPosition = args.PointerScreenPoint();
    m_dragPositionOffset = {};

    // If we're starting in the state of dragging a torn out tab, let's populate the list of tab views and their bounds now.
    if (m_tabTearOutDraggingState == TabTearOutDraggingState::DraggingTornOutTab)
    {
        PopulateTabViewList();
    }
}

void OnEnteringMoveSize | ( | const winrt::InputNonClientPointerSource & | sender,
 |  | const winrt::EnteringMoveSizeEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1666 of file TabView.cpp.

{
    // We only perform tab tear-out when a move is being performed.
    if (args.MoveSizeOperation() != winrt::MoveSizeOperation::Move)
    {
        return;
    }

    auto pointInIslandCoords = XamlRoot().CoordinateConverter().ConvertScreenToLocal(args.PointerScreenPoint());
    auto tab = GetTabAtPoint(pointInIslandCoords);

    // If there was no tab at the point where the user clicked and dragged, then we have nothing to do.
    if (!tab)
    {
        return;
    }

    auto dataItem = ItemFromContainer(tab);

    m_isInTabTearOutLoop = true;
    m_tabBeingDragged = tab;
    m_dataItemBeingDragged = dataItem;
    m_tabViewContainingTabBeingDragged = *this;
    m_originalTabBeingDraggedPoint = m_tabBeingDragged.TransformToVisual(nullptr).TransformPoint({ 0, 0 });

    SelectedItem(m_dataItemBeingDragged);

    // We don't want to create a new window for tearing out if every tab is being torn out -
    // in that case, we just want to drag the window.
    if (GetItemCount() > 1)
    {
        auto windowRequestedArgs = winrt::make<TabViewTabTearOutWindowRequestedEventArgs>(dataItem, tab);
        m_tabTearOutWindowRequestedEventSource(*this, windowRequestedArgs);

        args.MoveSizeWindowId(windowRequestedArgs.NewWindowId());

        HWND newWindow = winrt::Microsoft::UI::GetWindowFromWindowId(windowRequestedArgs.NewWindowId());
        m_tabTearOutNewAppWindow = winrt::AppWindow::GetFromWindowId(windowRequestedArgs.NewWindowId());
        HWND currentWindow = winrt::Microsoft::UI::GetWindowFromWindowId(XamlRoot().ContentIslandEnvironment().AppWindowId());

        WINDOWPLACEMENT wp{};
        wp.length = sizeof(wp);
        GetWindowPlacement(currentWindow, &wp);

        // We'll position the new window to be hidden at the same position as the current window and with the restored size of the current window.
        RECT windowRect;
        GetWindowRect(currentWindow, &windowRect);
        SetWindowPos(
            newWindow,
            currentWindow,
            windowRect.left,
            windowRect.top,
            wp.rcNormalPosition.right - wp.rcNormalPosition.left,
            wp.rcNormalPosition.bottom - wp.rcNormalPosition.top,
            SWP_SHOWWINDOW);

        // The move-size loop prevents the pumping of window messages, which includes WM_PAINT messages. This creates the problem that a window that is
        // initially shown will not have any ability to handle those WM_PAINT messages to initially display its contents.
        // To get around this limitation, we'll show the window to allow it to initially draw its content, and then immediately hide it.
        // This allows it to render its contents without actually visually appearing to users.
        DispatcherQueue().TryEnqueue(winrt::DispatcherQueueHandler([window = m_tabTearOutNewAppWindow]() { window.Hide(); }));
    }
    else
    {
        m_tabTearOutNewAppWindow = winrt::AppWindow::GetFromWindowId(XamlRoot().ContentIslandEnvironment().AppWindowId());
    }
}

void OnExitedMoveSize | ( | const winrt::InputNonClientPointerSource & | sender,
 |  | const winrt::ExitedMoveSizeEventArgs & | args |
 | ) |  |  | [private]

Definition at line 2020 of file TabView.cpp.

{
    if (!m_isInTabTearOutLoop)
    {
        return;
    }

    m_tabTearOutDraggingState = TabTearOutDraggingState::Idle;

    if (!m_tabTearOutNewAppWindow.IsVisible())
    {
        // We're about to close the window containing the tab view that had been holding the tab view,
        // so we'll remove it from the list of tab views with CanTearOutTabs set to true
        // This will ensure that it's immediately removed from the list rather than waiting for the
        // WM_CLOSE message to be handled.
        if (m_tabViewInNewAppWindow)
        {
            auto tabViewWithTearOutList = GetTabViewWithTearOutList();
            winrt::weak_ref<winrt::TabView> windowTabViewAsWeak = m_tabViewInNewAppWindow;
            auto existingIterator = std::find(tabViewWithTearOutList->begin(), tabViewWithTearOutList->end(), windowTabViewAsWeak);

            if (existingIterator != std::end((*tabViewWithTearOutList)))
            {
                tabViewWithTearOutList->erase(existingIterator);
            }
        }

        PostMessageW(winrt::Microsoft::UI::GetWindowFromWindowId(m_tabTearOutNewAppWindow.Id()), WM_CLOSE, 0, 0);
    }
    else if (m_tabViewContainingTabBeingDragged)
    {
        // Otherwise, if the window is still open, let's update its tab view's non-client region.
        winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged)->UpdateNonClientRegion();
    }

    // We'll also update this tab view's non-client region, now that it's stabilized.
    UpdateNonClientRegion();

    m_isInTabTearOutLoop = false;

    // We'll also update tab widths, since we ceased doing so while the move-size loop was underway.
    UpdateTabWidths();
}

void OnItemsChanged ( winrt::IInspectable const & item )

Definition at line 756 of file TabView.cpp.

{
    if (auto args = item.as<winrt::IVectorChangedEventArgs>())
    {
        m_tabItemsChangedEventSource(*this, args);

        int numItems = static_cast<int>(TabItems().Size());
        const auto listViewInnerSelectedIndex = m_listView.get().SelectedIndex();
        auto selectedIndex = SelectedIndex();

        if (selectedIndex != listViewInnerSelectedIndex && listViewInnerSelectedIndex != -1)
        {
            SelectedIndex(listViewInnerSelectedIndex);
            selectedIndex = listViewInnerSelectedIndex;
        }

        if (args.CollectionChange() == winrt::CollectionChange::ItemRemoved)
        {
            m_updateTabWidthOnPointerLeave = true;
            if (numItems > 0)
            {
                // SelectedIndex might also already be -1
                if (selectedIndex == -1 || selectedIndex == static_cast<int32_t>(args.Index()))
                {
                    // Find the closest tab to select instead.
                    int startIndex = static_cast<int>(args.Index());
                    if (startIndex >= numItems)
                    {
                        startIndex = numItems - 1;
                    }
                    int index = startIndex;

                    do
                    {
                        const auto nextItem = ContainerFromIndex(index).as<winrt::ListViewItem>();

                        if (nextItem && nextItem.IsEnabled() && nextItem.Visibility() == winrt::Visibility::Visible)
                        {
                            SelectedItem(TabItems().GetAt(index));
                            break;
                        }

                        // try the next item
                        index++;
                        if (index >= numItems)
                        {
                            index = 0;
                        }
                    } while (index != startIndex);
                }

            }
            if (TabWidthMode() == winrt::TabViewWidthMode::Equal)
            {
                if (!m_pointerInTabstrip || args.Index() == TabItems().Size())
                {
                    UpdateTabWidths(true, false);
                }
            }
        }
        else
        {
            UpdateTabWidths();
            SetTabSeparatorOpacity(numItems - 1);
        }
    }

    UpdateBottomBorderLineVisualStates();
}

void OnItemsPresenterSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 728 of file TabView.cpp.

{
    if (!m_updateTabWidthOnPointerLeave)
    {
        // Presenter size didn't change because of item being removed, so update manually
        UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
        UpdateTabWidths();
        // Make sure that the selected tab is fully in view and not cut off
        BringSelectedTabIntoView();
    }
}

void OnListViewDragEnter | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]

Definition at line 904 of file TabView.cpp.

{
    // DragEnter can occur when we're dragging an item from within this TabView,
    // which will be handled internally.  In that case, we don't want to do anything here.
    for (auto&& tabItem : TabItems())
    {
        if (auto tabViewItem = ContainerFromItem(tabItem).try_as<winrt::TabViewItem>())
        {
            if (winrt::get_self<TabViewItem>(tabViewItem)->IsBeingDragged())
            {
                return;
            }
        }
    }

    UpdateIsItemDraggedOver(true);
}

void OnListViewDraggingPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 235 of file TabView.cpp.

{
    UpdateListViewItemContainerTransitions();
}

void OnListViewDragItemsCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragItemsCompletedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 927 of file TabView.cpp.

{
    m_isItemBeingDragged = false;

    // Selection may have changed during drag if dragged outside, so we update SelectedIndex again.
    if (auto&& listView = m_listView.get())
    {
        SelectedIndex(listView.SelectedIndex());
        SelectedItem(listView.SelectedItem());

        BringSelectedTabIntoView();
    }

    auto item = args.Items().GetAt(0);
    auto tab = FindTabViewItemFromDragItem(item);
    auto myArgs = winrt::make_self<TabViewTabDragCompletedEventArgs>(args, item, tab);

    m_tabDragCompletedEventSource(*this, *myArgs);

    // None means it's outside of the tab strip area
    if (args.DropResult() == winrt::DataPackageOperation::None)
    {
        auto tabDroppedArgs = winrt::make_self<TabViewTabDroppedOutsideEventArgs>(item, tab);
        m_tabDroppedOutsideEventSource(*this, *tabDroppedArgs);
    }

    UpdateBottomBorderLineVisualStates();
}

void OnListViewDragItemsStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragItemsStartingEventArgs & | args |
 | ) |  |  | [private]

Definition at line 876 of file TabView.cpp.

{
    m_isItemBeingDragged = true;

    auto item = args.Items().GetAt(0);
    auto tab = FindTabViewItemFromDragItem(item);
    auto myArgs = winrt::make_self<TabViewTabDragStartingEventArgs>(args, item, tab);

    m_tabDragStartingEventSource(*this, *myArgs);

    UpdateBottomBorderLineVisualStates();
}

void OnListViewDragLeave | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]

Definition at line 922 of file TabView.cpp.

{
    UpdateIsItemDraggedOver(false);
}

void OnListViewDragOver | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]

Definition at line 889 of file TabView.cpp.

{
    m_tabStripDragOverEventSource(*this, args);
}

void OnListViewDrop | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]

Definition at line 894 of file TabView.cpp.

{
    if (!args.Handled())
    {
        m_tabStripDropEventSource(*this, args);
    }

    UpdateIsItemDraggedOver(false);
}

void OnListViewGettingFocus | ( | const winrt::IInspectable & | sender,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]

Definition at line 240 of file TabView.cpp.

{
    // TabViewItems overlap each other by one pixel in order to get the desired visuals for the separator.
    // This causes problems with 2d focus navigation. Because the items overlap, pressing Down or Up from a
    // TabViewItem navigates to the overlapping item which is not desired.
    //
    // To resolve this issue, we detect the case where Up or Down focus navigation moves from one TabViewItem
    // to another.
    // How we handle it, depends on the input device.
    // For GamePad, we want to move focus to something in the direction of movement (other than the overlapping item)
    // For Keyboard, we cancel the focus movement.

    const auto direction = args.Direction();
    if (direction == winrt::FocusNavigationDirection::Up || direction == winrt::FocusNavigationDirection::Down)
    {
        auto oldItem = args.OldFocusedElement().try_as<winrt::TabViewItem>();
        auto newItem = args.NewFocusedElement().try_as<winrt::TabViewItem>();
        if (oldItem && newItem)
        {
            if (auto&& listView = m_listView.get())
            {
                bool oldItemIsFromThisTabView = listView.IndexFromContainer(oldItem) != -1;
                bool newItemIsFromThisTabView = listView.IndexFromContainer(newItem) != -1;
                if (oldItemIsFromThisTabView && newItemIsFromThisTabView)
                {
                    const auto inputDevice = args.InputDevice();
                    if (inputDevice == winrt::FocusInputDeviceKind::GameController)
                    {
                        const auto listViewBoundsLocal = winrt::Rect{ 0, 0, static_cast<float>(listView.ActualWidth()), static_cast<float>(listView.ActualHeight()) };
                        const auto listViewBounds = listView.TransformToVisual(nullptr).TransformBounds(listViewBoundsLocal);
                        const winrt::FindNextElementOptions options;
                        options.ExclusionRect(listViewBounds);
                        options.SearchRoot(this->XamlRoot().Content());
                        const auto next = winrt::FocusManager::FindNextElement(direction, options);

                        args.TrySetNewFocusedElement(next);
                        args.Handled(true);
                    }
                    else
                    {
                        args.Cancel(true);
                        args.Handled(true);
                    }
                }
            }
        }
    }
}

void OnListViewLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 538 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        // Now that ListView exists, we can start using its Items collection.
        if (auto const lvItems = listView.Items())
        {
            if (!listView.ItemsSource())
            {
                // copy the list, because clearing lvItems may also clear TabItems
                winrt::IVector<winrt::IInspectable> const itemList{ winrt::single_threaded_vector<winrt::IInspectable>() };

                for (auto const item : TabItems())
                {
                    itemList.Append(item);
                }

                lvItems.Clear();

                for (auto const item : itemList)
                {
                    // App put items in our Items collection; copy them over to ListView.Items
                    if (item)
                    {
                        lvItems.Append(item);
                    }
                }
            }
            TabItems(lvItems);
        }

        if (ReadLocalValue(s_SelectedItemProperty) != winrt::DependencyProperty::UnsetValue())
        {
            UpdateSelectedItem();
        }
        else
        {
            // If SelectedItem wasn't set, default to selecting the first tab
            UpdateSelectedIndex();
        }

        SelectedIndex(listView.SelectedIndex());
        SelectedItem(listView.SelectedItem());

        // Find TabsItemsPresenter and listen for SizeChanged
        m_itemsPresenter.set([this, listView]() {
            auto itemsPresenter = SharedHelpers::FindInVisualTreeByName(listView, L"TabsItemsPresenter").as<winrt::ItemsPresenter>();
            if (itemsPresenter)
            {
                m_itemsPresenterSizeChangedRevoker = itemsPresenter.SizeChanged(winrt::auto_revoke, { this, &TabView::OnItemsPresenterSizeChanged });
            }
            return itemsPresenter;
            }());

        auto scrollViewer = SharedHelpers::FindInVisualTreeByName(listView, L"ScrollViewer").as<winrt::FxScrollViewer>();
        m_scrollViewer.set(scrollViewer);
        if (scrollViewer)
        {
            if (scrollViewer.IsLoaded())
            {
                // This scenario occurs reliably for Terminal in XAML islands
                OnScrollViewerLoaded(nullptr, nullptr);
            }
            else
            {
                m_scrollViewerLoadedRevoker = scrollViewer.Loaded(winrt::auto_revoke, { this, &TabView::OnScrollViewerLoaded });
            }
        }
    }

    UpdateBottomBorderLineVisualStates();
    UpdateNonClientRegion();
}

void OnListViewSelectionChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SelectionChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 826 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        SelectedIndex(listView.SelectedIndex());
        SelectedItem(listView.SelectedItem());
    }

    UpdateTabContent();

    m_selectionChangedEventSource(*this, args);
}

void OnListViewSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 839 of file TabView.cpp.

{
    UpdateNonClientRegion();
}

void OnLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 525 of file TabView.cpp.

{
    UpdateTabContent();
    UpdateTabViewWithTearOutList();
    AttachMoveSizeLoopEvents();
    UpdateNonClientRegion();
}

void OnScrollDecreaseClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1088 of file TabView.cpp.

{
    if (auto&& scrollViewer = m_scrollViewer.get())
    {
        scrollViewer.ChangeView(std::max(0.0, scrollViewer.HorizontalOffset() - c_scrollAmount), nullptr, nullptr);
    }
}

void OnScrollIncreaseClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1096 of file TabView.cpp.

{
    if (auto&& scrollViewer = m_scrollViewer.get())
    {
        scrollViewer.ChangeView(std::min(scrollViewer.ScrollableWidth(), scrollViewer.HorizontalOffset() + c_scrollAmount), nullptr, nullptr);
    }
}

void OnScrollViewerLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 630 of file TabView.cpp.

{
    if (auto&& scrollViewer = m_scrollViewer.get())
    {
        m_scrollDecreaseButton.set([this, scrollViewer]() {
            const auto decreaseButton = SharedHelpers::FindInVisualTreeByName(scrollViewer, L"ScrollDecreaseButton").as<winrt::RepeatButton>();
            if (decreaseButton)
            {
                // Do localization for the scroll decrease button
                const auto toolTip = winrt::ToolTipService::GetToolTip(decreaseButton);
                if (!toolTip)
                {
                    const auto tooltip = winrt::ToolTip();
                    tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TabViewScrollDecreaseButtonTooltip)));
                    winrt::ToolTipService::SetToolTip(decreaseButton, tooltip);
                }

                m_scrollDecreaseClickRevoker = decreaseButton.Click(winrt::auto_revoke, { this, &TabView::OnScrollDecreaseClick });
            }
            return decreaseButton;
        }());

        m_scrollIncreaseButton.set([this, scrollViewer]() {
            const auto increaseButton = SharedHelpers::FindInVisualTreeByName(scrollViewer, L"ScrollIncreaseButton").as<winrt::RepeatButton>();
            if (increaseButton)
            {
                // Do localization for the scroll increase button
                const auto toolTip = winrt::ToolTipService::GetToolTip(increaseButton);
                if (!toolTip)
                {
                    const auto tooltip = winrt::ToolTip();
                    tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TabViewScrollIncreaseButtonTooltip)));
                    winrt::ToolTipService::SetToolTip(increaseButton, tooltip);
                }

                m_scrollIncreaseClickRevoker = increaseButton.Click(winrt::auto_revoke, { this, &TabView::OnScrollIncreaseClick });
            }
            return increaseButton;
        }());

        m_scrollViewerViewChangedRevoker = scrollViewer.ViewChanged(winrt::auto_revoke, { this, &TabView::OnScrollViewerViewChanged });
    }

    UpdateTabWidths();
}

void OnScrollViewerViewChanged | ( | winrt::IInspectable const & | sender,
 |  | winrt::ScrollViewerViewChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 676 of file TabView.cpp.

{
    UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
}

void OnSelectedIndexPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 289 of file TabView.cpp.

{
    // We update previous selected and adjacent on the left tab
    // as well as current selected and adjacent on the left tab
    // to show/hide tabSeparator accordingly.
    UpdateSelectedIndex();
    SetTabSeparatorOpacity(winrt::unbox_value<int>(args.OldValue()));
    SetTabSeparatorOpacity(winrt::unbox_value<int>(args.OldValue()) - 1);
    SetTabSeparatorOpacity(SelectedIndex() - 1);
    SetTabSeparatorOpacity(SelectedIndex());

    UpdateBottomBorderLineVisualStates();
}

void OnSelectedItemPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 359 of file TabView.cpp.

{
    UpdateSelectedItem();
}

void OnTabItemsSourcePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 364 of file TabView.cpp.

{
    UpdateListViewItemContainerTransitions();
}

void OnTabStripPointerEntered | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 625 of file TabView.cpp.

{
    m_pointerInTabstrip = true;
}

void OnTabStripPointerExited | ( | const winrt::IInspectable & | sender,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 612 of file TabView.cpp.

{
    m_pointerInTabstrip = false;
    if (m_updateTabWidthOnPointerLeave)
    {
        auto scopeGuard = gsl::finally([this]()
        {
            m_updateTabWidthOnPointerLeave = false;
        });
        UpdateTabWidths();
    }
}

void OnTabWidthModePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 471 of file TabView.cpp.

{
    UpdateTabWidths();

    // Switch the visual states of all tab items to the correct TabViewWidthMode
    for (auto&& item : TabItems())
    {
        auto const tvi = [item, this]()
        {
            if (auto tabViewItem = item.try_as<TabViewItem>())
            {
                return tabViewItem;
            }
            return ContainerFromItem(item).try_as<TabViewItem>();
        }();

        if (tvi)
        {
            tvi->OnTabViewWidthModeChanged(TabWidthMode());
        }
    }
}

void OnUnloaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 533 of file TabView.cpp.

{
    UpdateTabViewWithTearOutList();
}

void OnWindowRectChanging | ( | const winrt::InputNonClientPointerSource & | sender,
 |  | const winrt::WindowRectChangingEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1774 of file TabView.cpp.

{
    if (!m_isInTabTearOutLoop)
    {
        return;
    }

    switch (m_tabTearOutDraggingState)
    {
    case TabTearOutDraggingState::DraggingTabWithinTabView:
        DragTabWithinTabView(args);
        break;
    case TabTearOutDraggingState::DraggingTornOutTab:
        DragTornOutTab(args);
        break;
    }

    auto newWindowRect = args.NewWindowRect();
    const auto rasterizationScale = XamlRoot().RasterizationScale();
    newWindowRect.X -= static_cast<int32_t>(m_dragPositionOffset.X * rasterizationScale);
    newWindowRect.Y -= static_cast<int32_t>(m_dragPositionOffset.Y * rasterizationScale);
    args.NewWindowRect(newWindowRect);
}

void PopulateTabViewList ( ) [private]

Definition at line 2090 of file TabView.cpp.

{
    // When we're dragging a torn-out tab, we want to check, as the window moves, whether the user has dragged the tab over a tab view that will allow it to be dropped into it.
    // We'll pre-fill a list of tab views and their screen bounds when we start dragging a torn-out tab, on the basis that they are unlikely to move while we're dragging the tab.
    m_tabViewBoundsTuples.clear();

    // We'll also track which tab view holds the torn-out tab.
    m_tabViewContainingTabBeingDragged = nullptr;

    auto tabViewWithTearOutList = TabView::GetTabViewWithTearOutList();

    auto iterator = tabViewWithTearOutList->begin();
    while (iterator != tabViewWithTearOutList->end())
    {
        auto otherTabView = (*iterator).get();

        if (!otherTabView)
        {
            iterator = tabViewWithTearOutList->erase(iterator);
        }
        else
        {
            // We only want to populate the tuple list with tab views that don't currently contain the item being dragged,
            // since this tuple list is used to detect tab views that the item being dragged can be dragged onto.
            bool otherTabViewContainsTab = false;
            uint32_t ignored;

            if (auto otherTabItemsSource = otherTabView.TabItemsSource())
            {
                if (auto tabItemsSourceVector = otherTabItemsSource.try_as<winrt::IVector<IInspectable>>())
                {
                    otherTabViewContainsTab = tabItemsSourceVector.IndexOf(m_dataItemBeingDragged, ignored);
                }
            }
            else
            {
                otherTabViewContainsTab = otherTabView.TabItems().IndexOf(m_tabBeingDragged, ignored);
            }

            if (otherTabViewContainsTab)
            {
                m_tabViewContainingTabBeingDragged = otherTabView;
            }
            else
            {
                auto otherTabViewImpl = winrt::get_self<TabView>(otherTabView);

                if (auto& otherTabViewListView = otherTabViewImpl->m_listView.get())
                {
                    auto dragBounds = otherTabViewListView.TransformToVisual(nullptr).TransformBounds(winrt::Rect(0, 0, static_cast<float>(otherTabViewListView.ActualWidth()), static_cast<float>(otherTabViewListView.ActualHeight())));

                    // We'll add the add button's bounds to the drag bounds, since it's also a valid element to drag a tab over, which will add the tab to the end of the tab view.
                    if (otherTabView.IsAddTabButtonVisible())
                    {
                        if (auto& otherTabViewAddButton = otherTabViewImpl->m_addButton.get())
                        {
                            auto addButtonBounds = otherTabViewAddButton.TransformToVisual(nullptr).TransformBounds(winrt::Rect(0, 0, static_cast<float>(otherTabViewAddButton.ActualWidth()), static_cast<float>(otherTabViewAddButton.ActualHeight())));

                            float dragBoundsRight = dragBounds.X + dragBounds.Width;
                            float dragBoundsBottom = dragBounds.Y + dragBounds.Height;
                            float addButtonBoundsRight = addButtonBounds.X + addButtonBounds.Width;
                            float addButtonBoundsBottom = addButtonBounds.Y + addButtonBounds.Height;

                            float minX = std::min(dragBounds.X, addButtonBounds.X);
                            float minY = std::min(dragBounds.Y, addButtonBounds.Y);

                            dragBounds = {
                                minX,
                                minY,
                                std::max(dragBoundsRight, addButtonBoundsRight) - minX,
                                std::max(dragBoundsBottom, addButtonBoundsBottom) - minY
                            };
                        }
                    }

                    auto dragScreenBounds = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(dragBounds);

                    m_tabViewBoundsTuples.push_back(std::make_tuple(dragScreenBounds, otherTabView));
                }
            }

            iterator++;
        }
    }
}

bool RequestCloseCurrentTab ( ) [private]

Definition at line 1531 of file TabView.cpp.

{
    bool handled = false;
    if (auto selectedTab = SelectedItem().try_as<winrt::TabViewItem>())
    {
        if (selectedTab.IsClosable())
        {
            // Close the tab on ctrl + F4
            RequestCloseTab(selectedTab, true);
            handled = true;
        }
    }

    return handled;
}

void RequestCloseTab | ( | winrt::TabViewItem const & | item,
 |  | bool | updateTabWidths
 | ) |  |

Definition at line 1009 of file TabView.cpp.

{
    // If the tab being closed is the currently focused tab, we'll move focus to the next tab
    // when the tab closes.
    bool tabIsFocused = false;
    auto focusedElement{ winrt::FocusManager::GetFocusedElement() ? winrt::FocusManager::GetFocusedElement().try_as<winrt::DependencyObject>() : nullptr };

    while (focusedElement)
    {
        if (focusedElement == container)
        {
            tabIsFocused = true;
            break;
        }

        focusedElement = winrt::VisualTreeHelper::GetParent(focusedElement);
    }

    winrt::UIElement::LosingFocus_revoker losingFocusRevoker{};

    if (tabIsFocused)
    {
        // If the tab specified both is focused and loses focus, then we'll move focus to an adjacent focusable tab, if one exists.
        losingFocusRevoker = container.LosingFocus(winrt::auto_revoke, [&](const winrt::IInspectable&, const winrt::LosingFocusEventArgs& args)
            {
                if (!args.Cancel() && !args.Handled())
                {
                    int focusedIndex = IndexFromContainer(container);
                    winrt::DependencyObject newFocusedElement{ nullptr };

                    for (int i = focusedIndex + 1; i < GetItemCount(); i++)
                    {
                        auto candidateElement = ContainerFromIndex(i);

                        if (IsFocusable(candidateElement))
                        {
                            newFocusedElement = candidateElement;
                            break;
                        }
                    }

                    if (!newFocusedElement)
                    {
                        for (int i = focusedIndex - 1; i >= 0; i--)
                        {
                            auto candidateElement = ContainerFromIndex(i);

                            if (IsFocusable(candidateElement))
                            {
                                newFocusedElement = candidateElement;
                                break;
                            }
                        }
                    }

                    if (!newFocusedElement)
                    {
                        newFocusedElement = m_addButton.get();
                    }

                    args.Handled(args.TrySetNewFocusedElement(newFocusedElement));
                }
            });
    }

    if (auto&& listView = m_listView.get())
    {
        auto args = winrt::make_self<TabViewTabCloseRequestedEventArgs>(listView.ItemFromContainer(container), container);

        m_tabCloseRequestedEventSource(*this, *args);

        if (auto internalTabViewItem = winrt::get_self<TabViewItem>(container))
        {
            internalTabViewItem->RaiseRequestClose(*args);
        }
    }
    UpdateTabWidths(updateTabWidths);
}

void SetTabSeparatorOpacity ( int index )

Definition at line 218 of file TabView.cpp.

{
    const auto selectedIndex = SelectedIndex();

    // If Tab is adjacent on the left to selected one or
    // it is selected tab - we hide the tabSeparator.
    if (index == selectedIndex || index + 1 == selectedIndex)
    {
        SetTabSeparatorOpacity(index, 0);
    }
    else
    {
        SetTabSeparatorOpacity(index, 1);
    }
}

void SetTabSeparatorOpacity | ( | int | index,
 |  | int | opacityValue
 | ) |  |

Definition at line 200 of file TabView.cpp.

{
    if (const auto tvi = ContainerFromIndex(index).try_as<winrt::TabViewItem>())
    {
        // The reason we set the opacity directly instead of using VisualState
        // is because we want to hide the separator on hover/pressed
        // but the tab adjacent on the left to the selected tab
        // must hide the tab separator at all times.
        // It causes two visual states to modify the same property
        // what leads to undesired behaviour.
        if (const auto tabSeparator = tvi.GetTemplateChild(L"TabSeparator").try_as<winrt::FrameworkElement>())
        {
            tabSeparator.Opacity(opacityValue);
        }
    }
}

void TearOutTab | ( | winrt::TabViewItem const & | tabBeingDragged,
 |  | winrt::Point const & | pointerPosition |
 | ) |  |  | [private]

Definition at line 1871 of file TabView.cpp.

{
    auto tabViewImpl = winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged);

    // We'll first raise the TabTearOutRequested event, which prompts the app to move the torn-out tab data item from its current tab view to the one in the new window.
    tabViewImpl->m_tabTearOutRequestedEventSource(m_tabViewContainingTabBeingDragged, winrt::make<TabViewTabTearOutRequestedEventArgs>(m_dataItemBeingDragged, tabBeingDragged));

    // We're now dragging a torn out tab, so let's populate the list of tab views.
    m_tabTearOutDraggingState = TabTearOutDraggingState::DraggingTornOutTab;
    PopulateTabViewList();

    // Now we'll show the window.
    m_tabTearOutNewAppWindow.Show();

    UpdateLayout();

    if (m_tabViewContainingTabBeingDragged)
    {
        m_tabViewContainingTabBeingDragged.UpdateLayout();

        // We want to keep the tab under the user's pointer, so we'll subtract off the difference from the XAML position of the tab in the original window,
        // in order to ensure we position the window such that the tab in the new window is in the same position as the tab in the old window.
        auto containingTabPosition = m_tabViewContainingTabBeingDragged.ContainerFromIndex(m_tabViewContainingTabBeingDragged.SelectedIndex()).as<winrt::TabViewItem>().TransformToVisual(nullptr).TransformPoint({ 0, 0 });
        m_dragPositionOffset = { containingTabPosition.X - m_originalTabBeingDraggedPoint.X, containingTabPosition.Y - m_originalTabBeingDraggedPoint.Y };
    }
    else
    {
        m_dragPositionOffset = {};
    }
}

void UnhookEventsAndClearFields ( ) [private]

Definition at line 436 of file TabView.cpp.

{
    m_listViewLoadedRevoker.revoke();
    m_listViewSelectionChangedRevoker.revoke();
    m_listViewDragItemsStartingRevoker.revoke();
    m_listViewDragItemsCompletedRevoker.revoke();
    m_listViewDragOverRevoker.revoke();
    m_listViewGettingFocusRevoker.revoke();
    m_listViewCanReorderItemsPropertyChangedRevoker.revoke();
    m_listViewAllowDropPropertyChangedRevoker.revoke();
    m_addButtonClickRevoker.revoke();
    m_itemsPresenterSizeChangedRevoker.revoke();
    m_tabStripPointerExitedRevoker.revoke();
    m_tabStripPointerEnteredRevoker.revoke();
    m_scrollViewerLoadedRevoker.revoke();
    m_scrollViewerViewChangedRevoker.revoke();
    m_scrollDecreaseClickRevoker.revoke();
    m_scrollIncreaseClickRevoker.revoke();
    m_addButtonKeyDownRevoker.revoke();

    m_tabContentPresenter.set(nullptr);
    m_rightContentPresenter.set(nullptr);
    m_leftContentColumn.set(nullptr);
    m_tabColumn.set(nullptr);
    m_addButtonColumn.set(nullptr);
    m_rightContentColumn.set(nullptr);
    m_tabContainerGrid.set(nullptr);
    m_listView.set(nullptr);
    m_addButton.set(nullptr);
    m_itemsPresenter.set(nullptr);
    m_scrollViewer.set(nullptr);
    m_scrollDecreaseButton.set(nullptr);
    m_scrollIncreaseButton.set(nullptr);
}

void UpdateBottomBorderLineVisualStates ( ) [private]

Definition at line 338 of file TabView.cpp.

{
    // Update border line on all tabs
    UpdateTabBottomBorderLineVisualStates();

    // Update border lines on the TabView
    winrt::VisualStateManager::GoToState(*this, m_isItemBeingDragged ? L"SingleBottomBorderLine" : L"NormalBottomBorderLine", false /*useTransitions*/);

    // Update border lines in the inner TabViewListView
    if (const auto lv = m_listView.get())
    {
        winrt::VisualStateManager::GoToState(lv, m_isItemBeingDragged ? L"NoBottomBorderLine" : L"NormalBottomBorderLine", false /*useTransitions*/);
    }

    // Update border lines in the ScrollViewer
    if (const auto scroller = m_scrollViewer.get())
    {
        winrt::VisualStateManager::GoToState(scroller, m_isItemBeingDragged ? L"NoBottomBorderLine" : L"NormalBottomBorderLine", false /*useTransitions*/);
    }
}

void UpdateIsItemDraggedOver ( bool isItemDraggedOver ) [private]

Definition at line 1599 of file TabView.cpp.

{
    if (m_isItemDraggedOver != isItemDraggedOver)
    {
        m_isItemDraggedOver = isItemDraggedOver;
        UpdateTabWidths();
    }
}

void UpdateListViewItemContainerTransitions ( ) [private]

Definition at line 369 of file TabView.cpp.

{
    if (TabItemsSource())
    {
        if (auto&& listView = m_listView.get())
        {
            if (listView.CanReorderItems() && listView.AllowDrop())
            {
                // Remove all the AddDeleteThemeTransition/ContentThemeTransition instances in the inner ListView's ItemContainerTransitions
                // collection to avoid attempting to reparent a tab's content while it is still parented during a tab reordering user gesture.
                // This is only required when:
                //  - the TabViewItem' contents are databound to UIElements (this condition is not being checked below though).
                //  - System animations turned on (this condition is not being checked below though to maximize behavior consistency).
                //  - TabViewItem reordering is turned on.
                // With all those conditions met, the databound UIElements are still parented to the old item container as the tab is being dropped in
                // its new location. Without animations, the old item container is already put into the recycling pool and picked as the new container.
                // Its ContentControl.Content is kept unchanged and no reparenting is attempted.
                // Because the default ItemContainerTransitions collection is defined in the TabViewListView style, all ListView instances share the same
                // collection by default. Thus to avoid one TabView affecting all other ones, a new ItemContainerTransitions collection is created
                // when the original one contains an AddDeleteThemeTransition or ContentThemeTransition instance.
                bool transitionCollectionHasAddDeleteOrContentThemeTransition = [listView]()
                {
                    if (auto itemContainerTransitions = listView.ItemContainerTransitions())
                    {
                        for (auto&& transition : itemContainerTransitions)
                        {
                            if (transition &&
                                (transition.try_as<winrt::AddDeleteThemeTransition>() || transition.try_as<winrt::ContentThemeTransition>()))
                            {
                                return true;
                            }
                        }
                    }
                    return false;
                }();

                if (transitionCollectionHasAddDeleteOrContentThemeTransition)
                {
                    auto const newItemContainerTransitions = winrt::TransitionCollection();
                    auto const oldItemContainerTransitions = listView.ItemContainerTransitions();

                    for (auto&& transition : oldItemContainerTransitions)
                    {
                        if (transition)
                        {
                            if (transition.try_as<winrt::AddDeleteThemeTransition>() || transition.try_as<winrt::ContentThemeTransition>())
                            {
                                continue;
                            }
                            newItemContainerTransitions.Append(transition);
                        }
                    }

                    listView.ItemContainerTransitions(newItemContainerTransitions);
                }
            }
        }
    }
}

void UpdateNonClientRegion ( ) [private]
void UpdateScrollViewerDecreaseAndIncreaseButtonsViewState ( ) [private]

Definition at line 681 of file TabView.cpp.

{
    if (auto&& scrollViewer = m_scrollViewer.get())
    {
        auto&& decreaseButton = m_scrollDecreaseButton.get();
        auto&& increaseButton = m_scrollIncreaseButton.get();

        constexpr auto minThreshold = 0.1;
        const auto horizontalOffset = scrollViewer.HorizontalOffset();
        const auto scrollableWidth = scrollViewer.ScrollableWidth();

        if (abs(horizontalOffset - scrollableWidth) < minThreshold)
        {
            if (decreaseButton)
            {
                decreaseButton.IsEnabled(true);
            }
            if (increaseButton)
            {
                increaseButton.IsEnabled(false);
            }
        }
        else if (abs(horizontalOffset) < minThreshold)
        {
            if (decreaseButton)
            {
                decreaseButton.IsEnabled(false);
            }
            if (increaseButton)
            {
                increaseButton.IsEnabled(true);
            }
        }
        else
        {
            if (decreaseButton)
            {
                decreaseButton.IsEnabled(true);
            }
            if (increaseButton)
            {
                increaseButton.IsEnabled(true);
            }
        }
    }
}

void UpdateSelectedIndex ( ) [private]

Definition at line 1336 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        const auto selectedIndex = SelectedIndex();
        // Ensure that the selected index is within range of the items
        if (selectedIndex < static_cast<int>(listView.Items().Size()))
        {
            listView.SelectedIndex(selectedIndex);
        }
    }
}

void UpdateSelectedItem ( ) [private]

Definition at line 1328 of file TabView.cpp.

{
    if (auto&& listView = m_listView.get())
    {
        listView.SelectedItem(SelectedItem());
    }
}

void UpdateTabBottomBorderLineVisualStates ( ) [private]

Definition at line 303 of file TabView.cpp.

{
    const int numItems = static_cast<int>(TabItems().Size());
    const int selectedIndex = SelectedIndex();

    for (int i = 0; i < numItems; i++)
    {
        auto state = L"NormalBottomBorderLine";
        if (m_isItemBeingDragged)
        {
            state = L"NoBottomBorderLine";
        }
        else if (selectedIndex != -1)
        {
            if (i == selectedIndex)
            {
                state = L"NoBottomBorderLine";
            }
            else if (i == selectedIndex - 1)
            {
                state = L"LeftOfSelectedTab";
            }
            else if (i == selectedIndex + 1)
            {
                state = L"RightOfSelectedTab";
            }
        }

        if (const auto tvi = ContainerFromIndex(i).try_as<winrt::Control>())
        {
            winrt::VisualStateManager::GoToState(tvi, state, false /*useTransitions*/);
        }
    }
}

void UpdateTabContent ( )

Definition at line 956 of file TabView.cpp.

{
    if (auto&& tabContentPresenter = m_tabContentPresenter.get())
    {
        if (!SelectedItem())
        {
            tabContentPresenter.Content(nullptr);
            tabContentPresenter.ContentTemplate(nullptr);
            tabContentPresenter.ContentTemplateSelector(nullptr);
        }
        else
        {
            auto tvi = SelectedItem().try_as<winrt::TabViewItem>();
            if (!tvi)
            {
                tvi = ContainerFromItem(SelectedItem()).try_as<winrt::TabViewItem>();
            }

            if (tvi)
            {
                // If the focus was in the old tab content, we will lose focus when it is removed from the visual tree.
                // We should move the focus to the new tab content.
                // The new tab content is not available at the time of the LosingFocus event, so we need to
                // move focus later.
                bool shouldMoveFocusToNewTab = false;
                auto revoker = tabContentPresenter.LosingFocus(winrt::auto_revoke, [&shouldMoveFocusToNewTab](const winrt::IInspectable&, const winrt::LosingFocusEventArgs& args)
                {
                    shouldMoveFocusToNewTab = true;
                });

                tabContentPresenter.Content(tvi.Content());
                tabContentPresenter.ContentTemplate(tvi.ContentTemplate());
                tabContentPresenter.ContentTemplateSelector(tvi.ContentTemplateSelector());

                if (shouldMoveFocusToNewTab)
                {
                    auto focusable = winrt::FocusManager::FindFirstFocusableElement(tabContentPresenter);
                    if (!focusable)
                    {
                        // If there is nothing focusable in the new tab, just move focus to the TabViewItem itself.
                        focusable = tvi;
                    }

                    if (focusable)
                    {
                        SetFocus(focusable, winrt::FocusState::Programmatic);
                    }
                }
            }
        }
    }
}

void UpdateTabIndex | ( | winrt::TabViewItem const & | tabBeingDragged,
 |  | winrt::Point const & | pointerPosition |
 | ) |  |  | [private]

Definition at line 1831 of file TabView.cpp.

{
    auto tabViewImpl = winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged);

    // We'll first figure out what tab is located at the position in question.  This may return null if, for example,
    // the user has dragged over the add-tab button, in which case we'll just early-out.
    if (auto tabAtPoint = tabViewImpl->GetTabAtPoint(pointerPosition))
    {
        // Now we'll retrieve the data item associated with that tab.  If it's the data item of the tab we're dragging,
        // then we know that the tab doesn't need to move - the pointer is still over the tab in question.
        // If it's *not* the data item of the tab we're dragging, then we'll swap the tab the pointer is over
        // with the tab we're dragging.
        auto dataItemAtPoint = tabViewImpl->ItemFromContainer(tabAtPoint);

        if (dataItemAtPoint != m_dataItemBeingDragged)
        {
            int newIndex = tabViewImpl->IndexFromContainer(tabAtPoint);

            // If this tab view has an items source set, we'll swap the items in the items source.
            // Otherwise, we'll swap the tab items themselves.
            if (auto tabItemsSource = m_tabViewContainingTabBeingDragged.TabItemsSource())
            {
                if (auto tabItemsSourceVector = tabItemsSource.try_as<winrt::IVector<IInspectable>>())
                {
                    tabItemsSourceVector.RemoveAt(tabViewImpl->IndexFromContainer(tabBeingDragged));
                    tabItemsSourceVector.InsertAt(newIndex, m_dataItemBeingDragged);
                }
            }
            else
            {
                m_tabViewContainingTabBeingDragged.TabItems().RemoveAt(tabViewImpl->IndexFromContainer(tabBeingDragged));
                m_tabViewContainingTabBeingDragged.TabItems().InsertAt(newIndex, tabBeingDragged);
            }

            // Finally, we'll re-select the tab being dragged, since it has changed positions.
            m_tabViewContainingTabBeingDragged.SelectedIndex(newIndex);
        }
    }
}

void UpdateTabViewWithTearOutList ( )

Definition at line 1608 of file TabView.cpp.

{
    auto tabViewWithTearOutList = GetTabViewWithTearOutList();

    winrt::weak_ref<winrt::TabView> thisAsWeak = *this;
    auto existingIterator = std::find(tabViewWithTearOutList->begin(), tabViewWithTearOutList->end(), thisAsWeak);

    if (CanTearOutTabs() && IsLoaded() && existingIterator == std::end((*tabViewWithTearOutList)))
    {
        tabViewWithTearOutList->push_back(*this);
    }
    else if ((!CanTearOutTabs() || !IsLoaded()) && existingIterator != std::end((*tabViewWithTearOutList)))
    {
        tabViewWithTearOutList->erase(existingIterator);
    }
}

void UpdateTabWidths | ( | bool | shouldUpdateWidths = true,
 |  | bool | fillAllAvailableSpace = true
 | ) |  |

Definition at line 1115 of file TabView.cpp.

{
    // Don't update any tab widths when we're in the middle of a tab tear-out loop -
    // we'll update tab widths when it's done.
    if (m_isInTabTearOutLoop)
    {
        return;
    }

    auto const maxTabWidth = unbox_value<double>(SharedHelpers::FindInApplicationResources(c_tabViewItemMaxWidthName, box_value(c_tabMaximumWidth)));
    double tabWidth = std::numeric_limits<double>::quiet_NaN();
    uint32_t tabCount = TabItems().Size();

    // If an item is being dragged over this TabView, then we'll want to act like there's an extra item
    // when updating tab widths, which will create a hole into which the item can be dragged.
    if (m_isItemDraggedOver)
    {
        tabCount++;
    }

    if (auto&& tabGrid = m_tabContainerGrid.get())
    {
        // Add up width taken by custom content and + button
        double widthTaken = 0.0;
        if (auto&& leftContentColumn = m_leftContentColumn.get())
        {
            widthTaken += leftContentColumn.ActualWidth();
        }
        if (auto&& addButtonColumn = m_addButtonColumn.get())
        {
            widthTaken += addButtonColumn.ActualWidth();
        }
        if (auto&& rightContentColumn = m_rightContentColumn.get())
        {
            if (auto&& rightContentPresenter = m_rightContentPresenter.get())
            {
                const winrt::Size rightContentSize = rightContentPresenter.DesiredSize();
                rightContentColumn.MinWidth(rightContentSize.Width);
                widthTaken += rightContentSize.Width;
            }
        }

        if (auto&& tabColumn = m_tabColumn.get())
        {
            // Note: can be infinite
            const auto availableWidth = m_previousAvailableSize.Width - widthTaken;

            // Size can be 0 when window is first created; in that case, skip calculations; we'll get a new size soon
            if (availableWidth > 0)
            {
                if (TabWidthMode() == winrt::TabViewWidthMode::Equal)
                {
                    auto const minTabWidth = unbox_value<double>(SharedHelpers::FindInApplicationResources(c_tabViewItemMinWidthName, box_value(c_tabMinimumWidth)));

                    // If we should fill all of the available space, use scrollviewer dimensions
                    auto const padding = Padding();

                    double headerWidth = 0.0;
                    double footerWidth = 0.0;
                    if (auto&& itemsPresenter = m_itemsPresenter.get())
                    {
                        if (auto const header = itemsPresenter.Header().try_as<winrt::FrameworkElement>())
                        {
                            headerWidth = header.ActualWidth();
                        }
                        if (auto const footer = itemsPresenter.Footer().try_as<winrt::FrameworkElement>())
                        {
                            footerWidth = footer.ActualWidth();
                        }
                    }

                    if (fillAllAvailableSpace)
                    {
                        // Calculate the proportional width of each tab given the width of the ScrollViewer.
                        auto const tabWidthForScroller = (availableWidth - (padding.Left + padding.Right + headerWidth + footerWidth)) / (double)(tabCount);
                        tabWidth = std::clamp(tabWidthForScroller, minTabWidth, maxTabWidth);
                    }
                    else
                    {
                        double availableTabViewSpace = (tabColumn.ActualWidth() - (padding.Left + padding.Right + headerWidth + footerWidth));
                        if (const auto increaseButton = m_scrollIncreaseButton.get())
                        {
                            if (increaseButton.Visibility() == winrt::Visibility::Visible)
                            {
                                availableTabViewSpace -= increaseButton.ActualWidth();
                            }
                        }

                        if (const auto decreaseButton = m_scrollDecreaseButton.get())
                        {
                            if (decreaseButton.Visibility() == winrt::Visibility::Visible)
                            {
                                availableTabViewSpace -= decreaseButton.ActualWidth();
                            }
                        }

                        // Use current size to update items to fill the currently occupied space
                        auto const tabWidthUnclamped = availableTabViewSpace / (double)(tabCount);
                        tabWidth = std::clamp(tabWidthUnclamped, minTabWidth, maxTabWidth);
                    }

                    // Size tab column to needed size
                    tabColumn.MaxWidth(availableWidth + headerWidth + footerWidth);
                    auto requiredWidth = tabWidth * tabCount + headerWidth + footerWidth + padding.Left + padding.Right;
                    if (requiredWidth > availableWidth)
                    {
                        tabColumn.Width(winrt::GridLengthHelper::FromPixels(availableWidth));
                        if (auto&& listview = m_listView.get())
                        {
                            winrt::FxScrollViewer::SetHorizontalScrollBarVisibility(listview, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Visible);
                            UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
                        }
                    }
                    else
                    {
                        // If we're dragging over the TabView, we need to set the width to a specific value,
                        // since we want it to be larger than the items actually in it in order to accommodate
                        // the item being dragged into the TabView.  Otherwise, we can just set its width to Auto.
                        tabColumn.Width(
                            m_isItemDraggedOver ?
                            winrt::GridLengthHelper::FromPixels(requiredWidth) :
                            winrt::GridLengthHelper::FromValueAndType(1.0, winrt::GridUnitType::Auto));

                        if (auto&& listview = m_listView.get())
                        {
                            if (shouldUpdateWidths && fillAllAvailableSpace)
                            {
                                winrt::FxScrollViewer::SetHorizontalScrollBarVisibility(listview, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Hidden);
                            }
                            else
                            {
                                if (auto&& decreaseButton = m_scrollDecreaseButton.get())
                                {
                                    decreaseButton.IsEnabled(false);
                                }
                                if (auto&& increaseButton = m_scrollIncreaseButton.get())
                                {
                                    increaseButton.IsEnabled(false);
                                }
                            }
                        }
                    }
                }
                else
                {
                    // Case: TabWidthMode "Compact" or "SizeToContent"
                    tabColumn.MaxWidth(availableWidth);

                    if (auto&& listview = m_listView.get())
                    {
                        // When an item is being dragged over, we need to reserve extra space for the potential new tab,
                        // so we can't rely on auto sizing in that case.  However, the ListView expands to the size of the column,
                        // so we need to store the value lest we keep expanding the width of the column every time we call this method.
                        if (m_isItemDraggedOver)
                        {
                            if (!m_expandedWidthForDragOver.has_value())
                            {
                                m_expandedWidthForDragOver = listview.ActualWidth() + maxTabWidth;
                            }

                            tabColumn.Width(winrt::GridLengthHelper::FromPixels(m_expandedWidthForDragOver.value()));
                        }
                        else
                        {
                            if (m_expandedWidthForDragOver.has_value())
                            {
                                m_expandedWidthForDragOver.reset();
                            }

                            tabColumn.Width(winrt::GridLengthHelper::FromValueAndType(1.0, winrt::GridUnitType::Auto));
                        }

                        listview.MaxWidth(availableWidth);

                        // Calculate if the scroll buttons should be visible.
                        if (auto&& itemsPresenter = m_itemsPresenter.get())
                        {
                            const auto visible = itemsPresenter.ActualWidth() > availableWidth;
                            winrt::FxScrollViewer::SetHorizontalScrollBarVisibility(listview, visible
                                ? winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Visible
                                : winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Hidden);
                            if (visible)
                            {
                                UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
                            }
                        }
                    }
                }
            }
        }
    }

    if (shouldUpdateWidths || TabWidthMode() != winrt::TabViewWidthMode::Equal)
    {
        for (auto item : TabItems())
        {
            // Set the calculated width on each tab.
            auto tvi = item.try_as<winrt::TabViewItem>();
            if (!tvi)
            {
                tvi = ContainerFromItem(item).as<winrt::TabViewItem>();
            }

            if (tvi)
            {
                tvi.Width(tabWidth);
            }
        }
    }
}

Member Data Documentation

std::vector<std::tuple<winrt::RectInt32, winrt::TabView> > m_tabViewBoundsTuples [private]

Definition at line 336 of file TabView.h.

std::list< winrt::weak_ref< winrt::TabView > > s_tabViewWithTearOutList [static, private]

Definition at line 333 of file TabView.h.

HANDLE s_tabWithTearOutListMutex = ::CreateMutexW(nullptr, FALSE, nullptr) [static, private]

Definition at line 334 of file TabView.h.

The documentation for this class was generated from the following files:
  • TabView/TabView.h
  • TabView/TabView.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TabViewAutomationPeer Class Reference

#include "TabViewAutomationPeer.h"

Inherits ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider >.

List of all members.

Public Member Functions

TabViewAutomationPeer (winrt::TabView const &owner)
bool | CanSelectMultiple ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
winrt::com_array
< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > 		GetSelection ()
bool | IsSelectionRequired ()

Detailed Description

Definition at line 9 of file TabViewAutomationPeer.h.

Constructor & Destructor Documentation

TabViewAutomationPeer ( winrt::TabView const & owner )

Definition at line 13 of file TabViewAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

bool CanSelectMultiple ( )

Definition at line 38 of file TabViewAutomationPeer.cpp.

{
    return false;
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 33 of file TabViewAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Tab;
}

hstring GetClassNameCore ( )

Definition at line 28 of file TabViewAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::TabView>();
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file TabViewAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::Selection)
    {
        return *this;
    }
    return __super::GetPatternCore(patternInterface);
}

winrt::com_array< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > GetSelection ( )

Definition at line 48 of file TabViewAutomationPeer.cpp.

{
    if (auto tabView = Owner().try_as<TabView>())
    {
        if (auto tabViewItem = tabView->ContainerFromIndex(tabView->SelectedIndex()).try_as<winrt::TabViewItem>())
        {
            if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(tabViewItem))
            {
                return { ProviderFromPeer(peer) };
            }
        }
    }
    return {};
}

bool IsSelectionRequired ( )

Definition at line 43 of file TabViewAutomationPeer.cpp.

{
    return true;
}

The documentation for this class was generated from the following files:
  • TabView/TabViewAutomationPeer.h
  • TabView/TabViewAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewExternalTornOutTabsDroppedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

TabViewExternalTornOutTabsDroppedEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewExternalTornOutTabsDroppedEventArgs (winrt::IInspectable const &item, winrt::UIElement const &tab, int dropIndex)
int DropIndex () const
winrt::com_array
< winrt::IInspectable > 		Items () const
winrt::com_array
< winrt::UIElement > 		Tabs () const

Private Attributes

winrt::com_array
< winrt::IInspectable > 		m_items
winrt::com_array
< winrt::UIElement > 		m_tabs

Detailed Description

Definition at line 152 of file TabView.h.

Constructor & Destructor Documentation

TabViewExternalTornOutTabsDroppedEventArgs | ( | winrt::IInspectable const & | item,
 |  | winrt::UIElement const & | tab,
 |  | int | dropIndex
 | ) |  |

Definition at line 59 of file TabView.cpp.

    : m_items({ item })

Member Function Documentation

int DropIndex ( ) const [inline]

Definition at line 161 of file TabView.h.

{ return m_dropIndex; }

winrt::com_array<winrt::IInspectable> Items ( ) const [inline]

Definition at line 158 of file TabView.h.

{ return CopyArray(m_items); }

winrt::com_array<winrt::UIElement> Tabs ( ) const [inline]

Definition at line 159 of file TabView.h.

{ return CopyArray(m_tabs); }

Member Data Documentation

winrt::com_array<winrt::IInspectable> m_items [private]

Definition at line 164 of file TabView.h.

winrt::com_array<winrt::UIElement> m_tabs [private]

Definition at line 165 of file TabView.h.

The documentation for this class was generated from the following files:
  • TabView/TabView.h
  • TabView/TabView.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewExternalTornOutTabsDroppingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

TabViewExternalTornOutTabsDroppingEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewExternalTornOutTabsDroppingEventArgs (winrt::IInspectable const &item, winrt::UIElement const &tab, int dropIndex)
bool | AllowDrop () const
void | AllowDrop (bool value)
int | DropIndex () const
winrt::com_array
< winrt::IInspectable > 		Items () const
winrt::com_array
< winrt::UIElement > 		Tabs () const

Private Attributes

winrt::com_array
< winrt::IInspectable > 		m_items
winrt::com_array
< winrt::UIElement > 		m_tabs

Detailed Description

Definition at line 131 of file TabView.h.

Constructor & Destructor Documentation

TabViewExternalTornOutTabsDroppingEventArgs | ( | winrt::IInspectable const & | item,
 |  | winrt::UIElement const & | tab,
 |  | int | dropIndex
 | ) |  |

Definition at line 52 of file TabView.cpp.

    : m_items({ item })

Member Function Documentation

bool AllowDrop ( ) const [inline]

Definition at line 141 of file TabView.h.

{ return m_allowDrop; }

void AllowDrop ( bool value ) [inline]

Definition at line 142 of file TabView.h.

{ m_allowDrop = value; }

int DropIndex ( ) const [inline]

Definition at line 140 of file TabView.h.

{ return m_dropIndex; }

winrt::com_array<winrt::IInspectable> Items ( ) const [inline]

Definition at line 137 of file TabView.h.

{ return CopyArray(m_items); }

winrt::com_array<winrt::UIElement> Tabs ( ) const [inline]

Definition at line 138 of file TabView.h.

{ return CopyArray(m_tabs); }

Member Data Documentation

winrt::com_array<winrt::IInspectable> m_items [private]

Definition at line 145 of file TabView.h.

winrt::com_array<winrt::UIElement> m_tabs [private]

Definition at line 146 of file TabView.h.

The documentation for this class was generated from the following files:
  • TabView/TabView.h
  • TabView/TabView.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

TabViewItem Class Reference

#include "TabViewItem.h"

Inherits ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT >, and TabViewItemProperties.

List of all members.

Public Member Functions

TabViewItem ()
winrt::Button | GetCloseButton () const
winrt::TabView | GetParentTabView ()
bool | IsBeingDragged () const
void | OnApplyTemplate ()
void | OnCloseButtonOverlayModeChanged (winrt::TabViewCloseButtonOverlayMode const &mode)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnHeaderPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIconSourcePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnIsClosablePropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnKeyDown (winrt::KeyRoutedEventArgs const &e)
void | OnLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnPointerCanceled (winrt::PointerRoutedEventArgs const &args)
void | OnPointerCaptureLost (winrt::PointerRoutedEventArgs const &args)
void | OnPointerEntered (winrt::PointerRoutedEventArgs const &args)
void | OnPointerExited (winrt::PointerRoutedEventArgs const &args)
void | OnPointerMoved (winrt::PointerRoutedEventArgs const &args)
void | OnPointerPressed (winrt::PointerRoutedEventArgs const &args)
void | OnPointerReleased (winrt::PointerRoutedEventArgs const &args)
void | OnTabViewWidthModeChanged (winrt::TabViewWidthMode const &mode)
void | RaiseRequestClose (TabViewTabCloseRequestedEventArgs const &args)
void | SetParentTabView (winrt::TabView const &tabView)
void | StartBringTabIntoView ()

Private Member Functions

void | BeginCheckingForDrag (const uint32_t &pointerId)
void | HideLeftAdjacentTabSeparator ()
bool | IsOutsideDragRectangle (const winrt::Point &testPoint, const winrt::Point &dragRectangleCenter)
void | OnCloseButtonClick (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnForegroundPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OnHeaderChanged ()
void | OnIconSourceChanged ()
void | OnIsSelectedPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | OnSizeChanged (const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args)
void | OnTabDragCompleted (const winrt::IInspectable &sender, const winrt::TabViewTabDragCompletedEventArgs &args)
void | OnTabDragStarting (const winrt::IInspectable &sender, const winrt::TabViewTabDragStartingEventArgs &args)
void | RequestClose ()
void | RestoreLeftAdjacentTabSeparatorVisibility ()
bool | ShouldStartDrag (winrt::PointerRoutedEventArgs const &args)
void | StopCheckingForDrag (const uint32_t &pointerId)
void | UpdateCloseButton ()
void | UpdateDragDropVisualState (bool isVisible)
void | UpdateForeground ()
void | UpdateSelectedBackgroundPathTranslateTransform ()
void | UpdateTabGeometry ()
void | UpdateWidthModeVisualState ()

Private Attributes

bool | m_hasPointerCapture = false
bool | m_isBeingDragged = false
bool | m_isCheckingforDrag = false
bool | m_isMiddlePointerButtonPressed = false
bool | m_isPointerOver = false

Static Private Attributes

static constexpr auto | c_overlayCornerRadiusKey = "OverlayCornerRadius"sv
static constexpr int | c_targetRectWidthIncrement = 2

Detailed Description

Definition at line 19 of file TabViewItem.h.

Constructor & Destructor Documentation

TabViewItem ( )

Definition at line 13 of file TabViewItem.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_TabViewItem);

    SetDefaultStyleKey(this);

    SetValue(s_TabViewTemplateSettingsProperty, winrt::make<TabViewItemTemplateSettings>());

    Loaded({ this, &TabViewItem::OnLoaded });
    SizeChanged({ this, &TabViewItem::OnSizeChanged });

    RegisterPropertyChangedCallback(winrt::SelectorItem::IsSelectedProperty(), { this, &TabViewItem::OnIsSelectedPropertyChanged });
    RegisterPropertyChangedCallback(winrt::Control::ForegroundProperty(), { this, &TabViewItem::OnForegroundPropertyChanged });
}

Member Function Documentation

void BeginCheckingForDrag ( const uint32_t & pointerId ) [private]

Definition at line 485 of file TabViewItem.cpp.

{
    m_dragPointerId = pointerId;
    m_isCheckingforDrag = true;
}

winrt::Button GetCloseButton ( ) const [inline]

Definition at line 57 of file TabViewItem.h.

{ return m_closeButton.get(); }

winrt::TabView GetParentTabView ( )

Definition at line 232 of file TabViewItem.cpp.

{
    return m_parentTabView.get();
}

void HideLeftAdjacentTabSeparator ( ) [private]

Definition at line 500 of file TabViewItem.cpp.

{
    if (const auto tabView = GetParentTabView())
    {
        const auto internalTabView = winrt::get_self<TabView>(tabView);
        const auto index = internalTabView->IndexFromContainer(*this);
        internalTabView->SetTabSeparatorOpacity(index - 1, 0);
    }
}

bool IsBeingDragged ( ) const [inline]

Definition at line 58 of file TabViewItem.h.

{ return m_isBeingDragged; }

bool IsOutsideDragRectangle | ( | const winrt::Point & | testPoint,
 |  | const winrt::Point & | dragRectangleCenter |
 | ) |  |  | [private]

Definition at line 463 of file TabViewItem.cpp.

{
    const double dx = abs(testPoint.X - dragRectangleCenter.X);
    const double dy = abs(testPoint.Y - dragRectangleCenter.Y);

    double maxDx = GetSystemMetrics(SM_CXDRAG);
    double maxDy = GetSystemMetrics(SM_CYDRAG);

    maxDx *= c_tabViewItemMouseDragThresholdMultiplier;
    maxDy *= c_tabViewItemMouseDragThresholdMultiplier;

    return (dx > maxDx || dy > maxDy);
}

void OnApplyTemplate ( )

Definition at line 28 of file TabViewItem.cpp.

{
    __super::OnApplyTemplate();

    winrt::IControlProtected controlProtected{ *this };

    m_selectedBackgroundPathSizeChangedRevoker.revoke();
    m_closeButtonClickRevoker.revoke();
    m_tabDragStartingRevoker.revoke();
    m_tabDragCompletedRevoker.revoke();

    m_selectedBackgroundPath.set(GetTemplateChildT<winrt::Path>(s_selectedBackgroundPathName, controlProtected));

    if (const auto selectedBackgroundPath = m_selectedBackgroundPath.get())
    {
        m_selectedBackgroundPathSizeChangedRevoker = selectedBackgroundPath.SizeChanged(winrt::auto_revoke,
        {
            [this](auto const&, auto const&)
            {
                UpdateSelectedBackgroundPathTranslateTransform();
            }
        });
    }

    m_headerContentPresenter.set(GetTemplateChildT<winrt::ContentPresenter>(s_contentPresenterName, controlProtected));

    auto tabView = SharedHelpers::GetAncestorOfType<winrt::TabView>(winrt::VisualTreeHelper::GetParent(*this));
    auto internalTabView = tabView
        ? winrt::get_self<TabView>(tabView)
        : nullptr;

    m_closeButton.set([this, controlProtected, internalTabView]() {
        auto closeButton = GetTemplateChildT<winrt::Button>(s_closeButtonName, controlProtected);
        if (closeButton)
        {
            // Do localization for the close button automation name
            if (winrt::AutomationProperties::GetName(closeButton).empty())
            {
                auto const closeButtonName = ResourceAccessor::GetLocalizedStringResource(SR_TabViewCloseButtonName);
                winrt::AutomationProperties::SetName(closeButton, closeButtonName);
            }

            if (internalTabView)
            {
                // Setup the tooltip for the close button
                auto tooltip = winrt::ToolTip();
                tooltip.Content(box_value(internalTabView->GetTabCloseButtonTooltipText()));
                winrt::ToolTipService::SetToolTip(closeButton, tooltip);
            }

            m_closeButtonClickRevoker = closeButton.Click(winrt::auto_revoke, { this, &TabViewItem::OnCloseButtonClick });
        }
        return closeButton;
        }());

    OnHeaderChanged();
    OnIconSourceChanged();

    if (tabView)
    {
        m_tabDragStartingRevoker = tabView.TabDragStarting(winrt::auto_revoke, { this, &TabViewItem::OnTabDragStarting });
        m_tabDragCompletedRevoker = tabView.TabDragCompleted(winrt::auto_revoke, { this, &TabViewItem::OnTabDragCompleted });
    }

    UpdateCloseButton();
    UpdateForeground();
    UpdateWidthModeVisualState();
    UpdateTabGeometry();
}

void OnCloseButtonClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 323 of file TabViewItem.cpp.

{
    RequestClose();
}

void OnCloseButtonOverlayModeChanged ( winrt::TabViewCloseButtonOverlayMode const & mode )

Definition at line 226 of file TabViewItem.cpp.

{
    m_closeButtonOverlayMode = mode;
    UpdateCloseButton();
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 221 of file TabViewItem.cpp.

{
    return winrt::make<TabViewItemAutomationPeer>(*this);
}

void OnForegroundPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |  |
 | ) |  |  | [private]

Definition at line 163 of file TabViewItem.cpp.

{
    UpdateForeground();
}

void OnHeaderChanged ( ) [private]

Definition at line 338 of file TabViewItem.cpp.

{
    if (const auto headerContentPresenter = m_headerContentPresenter.get())
    {
        headerContentPresenter.Content(Header());
    }

    if (m_firstTimeSettingToolTip)
    {
        m_firstTimeSettingToolTip = false;

        if (!winrt::ToolTipService::GetToolTip(*this))
        {
            // App author has not specified a tooltip; use our own
            m_toolTip.set([this]() {
                auto toolTip = winrt::ToolTip();
                toolTip.Placement(winrt::Controls::Primitives::PlacementMode::Mouse);
                winrt::ToolTipService::SetToolTip(*this, toolTip);
                return toolTip;
                }());
        }
    }

    if (auto&& toolTip = m_toolTip.get())
    {
        // Update tooltip text to new header text
        auto headerContent = Header();
        auto potentialString = headerContent.try_as<winrt::IPropertyValue>();

        // Only show tooltip if header is a non-empty string.
        if (potentialString && potentialString.Type() == winrt::PropertyType::String && !potentialString.GetString().empty())
        {
            toolTip.Content(headerContent);
            toolTip.IsEnabled(true);
        }
        else
        {
            toolTip.Content(nullptr);
            toolTip.IsEnabled(false);
        }
    }
}

void OnHeaderPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 333 of file TabViewItem.cpp.

{
    OnHeaderChanged();
}

void OnIconSourceChanged ( ) [private]

Definition at line 607 of file TabViewItem.cpp.

{
    auto const templateSettings = winrt::get_self<TabViewItemTemplateSettings>(TabViewTemplateSettings());
    if (auto const source = IconSource())
    {
        templateSettings->IconElement(SharedHelpers::MakeIconElementFrom(source));
        winrt::VisualStateManager::GoToState(*this, s_iconStateName, false);
    }
    else
    {
        templateSettings->IconElement(nullptr);
        winrt::VisualStateManager::GoToState(*this, s_noIconStateName, false);
    }
}

void OnIconSourcePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 602 of file TabViewItem.cpp.

{
    OnIconSourceChanged();
}

void OnIsClosablePropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 328 of file TabViewItem.cpp.

{
    UpdateCloseButton();
}

void OnIsSelectedPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 140 of file TabViewItem.cpp.

{

    if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(*this))
    {
        peer.RaiseAutomationEvent(winrt::AutomationEvents::SelectionItemPatternOnElementSelected);
    }

    if (IsSelected())
    {
        SetValue(winrt::Canvas::ZIndexProperty(), box_value(20));
        StartBringTabIntoView();
    }
    else
    {
        SetValue(winrt::Canvas::ZIndexProperty(), box_value(0));
    }

    UpdateWidthModeVisualState();
    UpdateCloseButton();
    UpdateForeground();
}

void OnKeyDown ( winrt::KeyRoutedEventArgs const & e )

Definition at line 575 of file TabViewItem.cpp.

{
    if (!args.Handled() && (args.Key() == winrt::VirtualKey::Left || args.Key() == winrt::VirtualKey::Right))
    {
        // Alt+Shift+Arrow reorders tabs, so we don't want to handle that combination.
        // ListView also handles Alt+Arrow  (no Shift) by just doing regular XY focus,
        // same as how it handles Arrow without any modifier keys, so in that case
        // we do want to handle things so we get the improved keyboarding experience.
        auto isAltDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
        auto isShiftDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Shift) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

        if (!isAltDown || !isShiftDown)
        {
            const bool moveForward =
                (FlowDirection() == winrt::FlowDirection::LeftToRight && args.Key() == winrt::VirtualKey::Right) ||
                (FlowDirection() == winrt::FlowDirection::RightToLeft && args.Key() == winrt::VirtualKey::Left);

            args.Handled(winrt::get_self<TabView>(GetParentTabView())->MoveFocus(moveForward));
        }
    }

    if (!args.Handled())
    {
        __super::OnKeyDown(args);
    }
}

void OnLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args
 | ) |  |

Definition at line 122 of file TabViewItem.cpp.

{
    if (const auto tabView = GetParentTabView())
    {
        const auto internalTabView = winrt::get_self<TabView>(tabView);
        const auto index = internalTabView->IndexFromContainer(*this);
        internalTabView->SetTabSeparatorOpacity(index);
    }
}

void OnPointerCanceled ( winrt::PointerRoutedEventArgs const & args )

Definition at line 547 of file TabViewItem.cpp.

{
    __super::OnPointerCanceled(args);

    const auto pointer = args.Pointer();

    StopCheckingForDrag(pointer.PointerId());

    if (m_hasPointerCapture)
    {
        ReleasePointerCapture(pointer);
        m_isMiddlePointerButtonPressed = false;
    }

    RestoreLeftAdjacentTabSeparatorVisibility();
}

void OnPointerCaptureLost ( winrt::PointerRoutedEventArgs const & args )

Definition at line 564 of file TabViewItem.cpp.

{
    __super::OnPointerCaptureLost(args);

    m_hasPointerCapture = false;
    m_isMiddlePointerButtonPressed = false;
    RestoreLeftAdjacentTabSeparatorVisibility();
}

void OnPointerEntered ( winrt::PointerRoutedEventArgs const & args )

Definition at line 520 of file TabViewItem.cpp.

{
    __super::OnPointerEntered(args);

    m_isPointerOver = true;

    if (m_hasPointerCapture)
    {
        m_isMiddlePointerButtonPressed = true;
    }

    UpdateCloseButton();
    HideLeftAdjacentTabSeparator();
}

void OnPointerExited ( winrt::PointerRoutedEventArgs const & args )

Definition at line 535 of file TabViewItem.cpp.

{
    __super::OnPointerExited(args);

    m_isPointerOver = false;
    m_isMiddlePointerButtonPressed = false;

    UpdateCloseButton();
    UpdateForeground();
    RestoreLeftAdjacentTabSeparatorVisibility();
}

void OnPointerMoved ( winrt::PointerRoutedEventArgs const & args )

Definition at line 425 of file TabViewItem.cpp.

{
    __super::OnPointerMoved(args);

    if (ShouldStartDrag(args))
    {
        UpdateDragDropVisualState(true);
    }
}

void OnPointerPressed ( winrt::PointerRoutedEventArgs const & args )

Definition at line 381 of file TabViewItem.cpp.

{
    const auto pointer = args.Pointer();
    const auto pointerDeviceType = pointer.PointerDeviceType();
    const auto pointerPoint = args.GetCurrentPoint(*this);

    if (pointerDeviceType == winrt::PointerDeviceType::Mouse || pointerDeviceType == winrt::PointerDeviceType::Pen)
    {
        if (pointerPoint.Properties().IsLeftButtonPressed())
        {
            m_lastPointerPressedPosition = pointerPoint.Position();

            BeginCheckingForDrag(pointer.PointerId());

            bool ctrlDown = (args.KeyModifiers() & winrt::VirtualKeyModifiers::Control) == winrt::VirtualKeyModifiers::Control;

            if (ctrlDown)
            {
                this->IsSelected(true);

                // Return here so the base class will not pick it up, but let it remain unhandled so someone else could handle it.
                return;
            }
        }
    }
    else if (pointerDeviceType == winrt::PointerDeviceType::Touch)
    {
        m_lastPointerPressedPosition = pointerPoint.Position();

        BeginCheckingForDrag(pointer.PointerId());
    }

    __super::OnPointerPressed(args);

    if (args.GetCurrentPoint(nullptr).Properties().PointerUpdateKind() == winrt::PointerUpdateKind::MiddleButtonPressed)
    {
        if (CapturePointer(pointer))
        {
            m_hasPointerCapture = true;
            m_isMiddlePointerButtonPressed = true;
        }
    }
}

void OnPointerReleased ( winrt::PointerRoutedEventArgs const & args )

Definition at line 435 of file TabViewItem.cpp.

{
    __super::OnPointerReleased(args);

    const auto pointer = args.Pointer();

    StopCheckingForDrag(pointer.PointerId());
    UpdateDragDropVisualState(false);

    if (m_hasPointerCapture)
    {
        if (args.GetCurrentPoint(nullptr).Properties().PointerUpdateKind() == winrt::PointerUpdateKind::MiddleButtonReleased)
        {
            const bool wasPressed = m_isMiddlePointerButtonPressed;
            m_isMiddlePointerButtonPressed = false;
            ReleasePointerCapture(pointer);

            if (wasPressed)
            {
                if (IsClosable())
                {
                    RequestClose();
                }
            }
        }
    }
}

void OnSizeChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 132 of file TabViewItem.cpp.

{
    m_dispatcherHelper.RunAsync([strongThis = get_strong()]()
    {
        strongThis->UpdateTabGeometry();
    });
}

void OnTabDragCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::TabViewTabDragCompletedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 212 of file TabViewItem.cpp.

{
    m_isBeingDragged = false;

    StopCheckingForDrag(m_dragPointerId);
    UpdateDragDropVisualState(false);
    UpdateForeground();
}

void OnTabDragStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::TabViewTabDragStartingEventArgs & | args |
 | ) |  |  | [private]

Definition at line 207 of file TabViewItem.cpp.

{
    m_isBeingDragged = true;
}

void OnTabViewWidthModeChanged ( winrt::TabViewWidthMode const & mode )

Definition at line 242 of file TabViewItem.cpp.

{
    m_tabViewWidthMode = mode;
    UpdateWidthModeVisualState();
}

void RaiseRequestClose ( TabViewTabCloseRequestedEventArgs const & args )

Definition at line 317 of file TabViewItem.cpp.

{
    // This should only be called from TabView, to ensure that both this event and the TabView TabRequestedClose event are raised
    m_closeRequestedEventSource(*this, args);
}

void RequestClose ( ) [private]

Definition at line 306 of file TabViewItem.cpp.

{
    if (auto tabView = SharedHelpers::GetAncestorOfType<winrt::TabView>(winrt::VisualTreeHelper::GetParent(*this)))
    {
        if (auto internalTabView = winrt::get_self<TabView>(tabView))
        {
            internalTabView->RequestCloseTab(*this, false);
        }
    }
}

void RestoreLeftAdjacentTabSeparatorVisibility ( ) [private]

Definition at line 510 of file TabViewItem.cpp.

{
    if (const auto tabView = GetParentTabView())
    {
        const auto internalTabView = winrt::get_self<TabView>(tabView);
        const auto index = internalTabView->IndexFromContainer(*this);
        internalTabView->SetTabSeparatorOpacity(index - 1);
    }
}

void SetParentTabView ( winrt::TabView const & tabView )

Definition at line 237 of file TabViewItem.cpp.

{
    m_parentTabView = winrt::make_weak(tabView);
}

bool ShouldStartDrag ( winrt::PointerRoutedEventArgs const & args ) [private]

Definition at line 477 of file TabViewItem.cpp.

{
    return
        m_isCheckingforDrag &&
        IsOutsideDragRectangle(args.GetCurrentPoint(*this).Position(), m_lastPointerPressedPosition) &&
        m_dragPointerId == args.Pointer().PointerId();
}

void StartBringTabIntoView ( )

Definition at line 622 of file TabViewItem.cpp.

{
    // we need to set the TargetRect to be slightly wider than the TabViewItem size in order to avoid cutting off the end of the Tab
    winrt::BringIntoViewOptions options;
    options.TargetRect(winrt::Rect{ 0, 0, DesiredSize().Width + c_targetRectWidthIncrement, DesiredSize().Height});
    StartBringIntoView(options);
}

void StopCheckingForDrag ( const uint32_t & pointerId ) [private]

Definition at line 491 of file TabViewItem.cpp.

{
    if (m_isCheckingforDrag && m_dragPointerId == pointerId)
    {
        m_dragPointerId = 0;
        m_isCheckingforDrag = false;
    }
}

void UpdateCloseButton ( ) [private]

Definition at line 248 of file TabViewItem.cpp.

{
    if (!IsClosable())
    {
        winrt::VisualStateManager::GoToState(*this, s_closeButtonCollapsedStateName, false);
    }
    else
    {
        switch (m_closeButtonOverlayMode)
        {
        case winrt::TabViewCloseButtonOverlayMode::OnPointerOver:
        {
            // If we only want to show the button on hover, we also show it when we are selected, otherwise hide it
            if (IsSelected() || m_isPointerOver)
            {
                winrt::VisualStateManager::GoToState(*this, s_closeButtonVisibleStateName, false);
            }
            else
            {
                winrt::VisualStateManager::GoToState(*this, s_closeButtonCollapsedStateName, false);
            }
            break;
        }
        default:
        {
            // Default, use "Auto"
            winrt::VisualStateManager::GoToState(*this, s_closeButtonVisibleStateName, false);
            break;
        }
        }
    }
}

void UpdateDragDropVisualState ( bool isVisible ) [private]

Definition at line 294 of file TabViewItem.cpp.

{
    if (isVisible)
    {
        winrt::VisualStateManager::GoToState(*this, s_dragDropVisualVisibleStateName, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, s_dragDropVisualNotVisibleStateName, false);
    }
}

void UpdateForeground ( ) [private]

Definition at line 168 of file TabViewItem.cpp.

{
    // We only need to set the foreground state when the TabViewItem is in rest state and not selected.
    if (!IsSelected() && !m_isPointerOver)
    {
        // If Foreground is set, then change icon and header foreground to match.
        winrt::VisualStateManager::GoToState(
            *this,
            ReadLocalValue(winrt::Control::ForegroundProperty()) == winrt::DependencyProperty::UnsetValue() ? s_foregroundSetStateName : s_foregroundNotSetStateName,
            false /*useTransitions*/);
    }
}

void UpdateSelectedBackgroundPathTranslateTransform ( ) [private]

Definition at line 181 of file TabViewItem.cpp.

{
    if (const auto selectedBackgroundPath = m_selectedBackgroundPath.get())
    {
        const auto selectedBackgroundPathActualOffset = selectedBackgroundPath.ActualOffset();
        const auto roundedSelectedBackgroundPathActualOffsetY = std::round(selectedBackgroundPathActualOffset.y);

        if (roundedSelectedBackgroundPathActualOffsetY > selectedBackgroundPathActualOffset.y)
        {
            // Move the SelectedBackgroundPath element down by a fraction of a pixel to avoid a faint gap line
            // between the selected TabViewItem and its content.
            winrt::TranslateTransform translateTransform;

            translateTransform.Y(static_cast<double>(roundedSelectedBackgroundPathActualOffsetY) - static_cast<double>(selectedBackgroundPathActualOffset.y));

            selectedBackgroundPath.RenderTransform(translateTransform);
        }
        else if (selectedBackgroundPath.RenderTransform())
        {
            // Reset any TranslateTransform that may have been set above.
            selectedBackgroundPath.RenderTransform(nullptr);
        }
    }
}

void UpdateTabGeometry ( ) [private]

Definition at line 98 of file TabViewItem.cpp.

{
    auto const templateSettings = winrt::get_self<TabViewItemTemplateSettings>(TabViewTemplateSettings());
    auto const height = ActualHeight();
    auto const popupRadius = unbox_value<winrt::CornerRadius>(ResourceAccessor::ResourceLookup(*this, box_value(c_overlayCornerRadiusKey)));
    auto const leftCorner = popupRadius.TopLeft;
    auto const rightCorner = popupRadius.TopRight;

    // Assumes 4px curving-out corners, which are hardcoded in the markup
    auto data = L"<Geometry xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>F1 M0,%f  a 4,4 0 0 0 4,-4  L 4,%f  a %f,%f 0 0 1 %f,-%f  l %f,0  a %f,%f 0 0 1 %f,%f  l 0,%f  a 4,4 0 0 0 4,4 Z</Geometry>";

    WCHAR strOut[1024];
    StringCchPrintf(strOut, ARRAYSIZE(strOut), data,
        height,
        leftCorner, leftCorner, leftCorner, leftCorner, leftCorner,
        ActualWidth() - (leftCorner + rightCorner),
        rightCorner, rightCorner, rightCorner, rightCorner,
        height - (4.0f + rightCorner));

    const auto geometry = winrt::XamlReader::Load(strOut).try_as<winrt::Geometry>();

    templateSettings->TabGeometry(geometry);
}

void UpdateWidthModeVisualState ( ) [private]

Definition at line 281 of file TabViewItem.cpp.

{
    // Handling compact/non compact width mode
    if (!IsSelected() && m_tabViewWidthMode == winrt::TabViewWidthMode::Compact)
    {
        winrt::VisualStateManager::GoToState(*this, s_compactStateName, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, s_standardWidthStateName, false);
    }
}

Member Data Documentation

constexpr auto c_overlayCornerRadiusKey = "OverlayCornerRadius"sv [static, private]

Definition at line 119 of file TabViewItem.h.

constexpr int c_targetRectWidthIncrement = 2 [static, private]

Definition at line 120 of file TabViewItem.h.

bool m_hasPointerCapture = false [private]

Definition at line 91 of file TabViewItem.h.

bool m_isBeingDragged = false [private]

Definition at line 93 of file TabViewItem.h.

bool m_isCheckingforDrag = false [private]

Definition at line 95 of file TabViewItem.h.

bool m_isMiddlePointerButtonPressed = false [private]

Definition at line 92 of file TabViewItem.h.

bool m_isPointerOver = false [private]

Definition at line 94 of file TabViewItem.h.

The documentation for this class was generated from the following files:
  • TabView/TabViewItem.h
  • TabView/TabViewItem.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TabViewItemAutomationPeer Class Reference

#include "TabViewItemAutomationPeer.h"

Inherits ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider >.

List of all members.

Public Member Functions

TabViewItemAutomationPeer (winrt::TabViewItem const &owner)
void | AddToSelection ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
bool | IsSelected ()
void | RemoveFromSelection ()
void | Select ()
winrt::IRawElementProviderSimple | SelectionContainer ()

Private Member Functions

winrt::TabView | GetParentTabView ()

Detailed Description

Definition at line 9 of file TabViewItemAutomationPeer.h.

Constructor & Destructor Documentation

TabViewItemAutomationPeer ( winrt::TabViewItem const & owner )

Definition at line 14 of file TabViewItemAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

void AddToSelection ( )

Definition at line 79 of file TabViewItemAutomationPeer.cpp.

{
    Select();
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 36 of file TabViewItemAutomationPeer.cpp.

{
    return winrt::AutomationControlType::TabItem;
}

hstring GetClassNameCore ( )

Definition at line 31 of file TabViewItemAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::TabViewItem>();
}

winrt::hstring GetNameCore ( )

Definition at line 41 of file TabViewItemAutomationPeer.cpp.

{
    winrt::hstring returnHString = __super::GetNameCore();

    // If a name hasn't been provided by AutomationProperties.Name in markup:
    if (returnHString.empty())
    {
        if (auto tvi = Owner().try_as<winrt::TabViewItem>())
        {
            returnHString = SharedHelpers::TryGetStringRepresentationFromObject(tvi.Header());
        }
    }

    return returnHString;
}

winrt::TabView GetParentTabView ( ) [private]

Definition at line 97 of file TabViewItemAutomationPeer.cpp.

{
    winrt::TabView parentTabView{ nullptr };

    winrt::TabViewItem tabViewItem = Owner().try_as<winrt::TabViewItem>();
    if (tabViewItem)
    {
        parentTabView = winrt::get_self<TabViewItem>(tabViewItem)->GetParentTabView();
    }
    return parentTabView;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 20 of file TabViewItemAutomationPeer.cpp.

{
    // We subclass from ListViewItemAutomationPeer without using everything from it,
    // so we need to make sure we are returning TabViewItem's AutomationPeer for selection and drag, and not the parent class version
    if (patternInterface == winrt::PatternInterface::SelectionItem || patternInterface == winrt::PatternInterface::Drag)
    {
        return *this;
    }
    return __super::GetPatternCore(patternInterface);
}

bool IsSelected ( )

Definition at line 58 of file TabViewItemAutomationPeer.cpp.

{
    if (auto tvi = Owner().try_as<TabViewItem>())
    {
        return tvi->IsSelected();
    }
    return false;
}

void RemoveFromSelection ( )

Definition at line 84 of file TabViewItemAutomationPeer.cpp.

{
    // Can't unselect in a TabView without knowing next selection
}

void Select ( )

Definition at line 89 of file TabViewItemAutomationPeer.cpp.

{
    if (auto owner = Owner().try_as<TabViewItem>().get())
    {
        owner->IsSelected(true);
    }
}

winrt::IRawElementProviderSimple SelectionContainer ( )

Definition at line 67 of file TabViewItemAutomationPeer.cpp.

{
    if (const auto parent = GetParentTabView())
    {
        if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(parent))
        {
            return ProviderFromPeer(peer);
        }
    }
    return nullptr;
}

The documentation for this class was generated from the following files:
  • TabView/TabViewItemAutomationPeer.h
  • TabView/TabViewItemAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

TabViewItemProperties Class Reference

#include "TabViewItem.properties.h"

Inherited by TabViewItem.

List of all members.

Public Member Functions

TabViewItemProperties ()
winrt::event_token | CloseRequested (winrt::TypedEventHandler< winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs > const &value)
void | CloseRequested (winrt::event_token const &token)
void | Header (winrt::IInspectable const &value)
winrt::IInspectable | Header ()
void | HeaderTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | HeaderTemplate ()
winrt::IconSource | IconSource ()
void | IconSource (winrt::IconSource const &value)
bool | IsClosable ()
void | IsClosable (bool value)
void | TabViewTemplateSettings (winrt::TabViewItemTemplateSettings const &value)
winrt::TabViewItemTemplateSettings | TabViewTemplateSettings ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HeaderProperty ()
static winrt::DependencyProperty | HeaderTemplateProperty ()
static winrt::DependencyProperty | IconSourceProperty ()
static winrt::DependencyProperty | IsClosableProperty ()
static void | OnHeaderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIconSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsClosablePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TabViewTemplateSettingsProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::TabViewItem,
winrt::TabViewTabCloseRequestedEventArgs > > 		m_closeRequestedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_HeaderProperty
static GlobalDependencyProperty | s_HeaderTemplateProperty
static GlobalDependencyProperty | s_IconSourceProperty
static GlobalDependencyProperty | s_IsClosableProperty
static GlobalDependencyProperty | s_TabViewTemplateSettingsProperty

Detailed Description

Definition at line 7 of file TabViewItem.properties.h.

Constructor & Destructor Documentation

TabViewItemProperties ( )

Definition at line 22 of file TabViewItem.properties.cpp.

    : m_closeRequestedEventSource{static_cast<TabViewItem*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
winrt::event_token CloseRequested ( winrt::TypedEventHandler< winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs > const & value )
void CloseRequested ( winrt::event_token const & token )
static void EnsureProperties ( ) [static]
winrt::IInspectable Header ( )
void Header ( winrt::IInspectable const & value )
static winrt::DependencyProperty HeaderProperty ( ) [inline, static]

Definition at line 27 of file TabViewItem.properties.h.

{ return s_HeaderProperty; }

winrt::DataTemplate HeaderTemplate ( )
void HeaderTemplate ( winrt::DataTemplate const & value )
static winrt::DependencyProperty HeaderTemplateProperty ( ) [inline, static]

Definition at line 28 of file TabViewItem.properties.h.

{ return s_HeaderTemplateProperty; }

void IconSource ( winrt::IconSource const & value )
winrt::IconSource IconSource ( )
static winrt::DependencyProperty IconSourceProperty ( ) [inline, static]

Definition at line 29 of file TabViewItem.properties.h.

{ return s_IconSourceProperty; }

bool IsClosable ( )
void IsClosable ( bool value )
static winrt::DependencyProperty IsClosableProperty ( ) [inline, static]

Definition at line 30 of file TabViewItem.properties.h.

{ return s_IsClosableProperty; }

static void OnHeaderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIconSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsClosablePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void TabViewTemplateSettings ( winrt::TabViewItemTemplateSettings const & value )
winrt::TabViewItemTemplateSettings TabViewTemplateSettings ( )
static winrt::DependencyProperty TabViewTemplateSettingsProperty ( ) [inline, static]

Definition at line 31 of file TabViewItem.properties.h.

{ return s_TabViewTemplateSettingsProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs> > m_closeRequestedEventSource

Definition at line 42 of file TabViewItem.properties.h.

GlobalDependencyProperty s_HeaderProperty [static]

Definition at line 33 of file TabViewItem.properties.h.

GlobalDependencyProperty s_HeaderTemplateProperty [static]

Definition at line 34 of file TabViewItem.properties.h.

GlobalDependencyProperty s_IconSourceProperty [static]

Definition at line 35 of file TabViewItem.properties.h.

GlobalDependencyProperty s_IsClosableProperty [static]

Definition at line 36 of file TabViewItem.properties.h.

GlobalDependencyProperty s_TabViewTemplateSettingsProperty [static]

Definition at line 37 of file TabViewItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TabViewItem.properties.h
  • Generated/TabViewItem.properties.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewItemTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TabViewItemTemplateSettings Class Reference

#include "TabViewItemTemplateSettings.h"

Inherits TabViewItemTemplateSettingsProperties.

List of all members.

Public Member Functions

TabViewItemTemplateSettings ()

Detailed Description

Definition at line 9 of file TabViewItemTemplateSettings.h.

Constructor & Destructor Documentation

TabViewItemTemplateSettings ( ) [inline]

Definition at line 14 of file TabViewItemTemplateSettings.h.

{ EnsureProperties();  }

The documentation for this class was generated from the following file:
  • TabView/TabViewItemTemplateSettings.h
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewItemTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

TabViewItemTemplateSettingsProperties Class Reference

#include "TabViewItemTemplateSettings.properties.h"

Inherited by TabViewItemTemplateSettings.

List of all members.

Public Member Functions

TabViewItemTemplateSettingsProperties ()
void | IconElement (winrt::IconElement const &value)
winrt::IconElement | IconElement ()
void | TabGeometry (winrt::Geometry const &value)
winrt::Geometry | TabGeometry ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconElementProperty ()
static winrt::DependencyProperty | TabGeometryProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconElementProperty
static GlobalDependencyProperty | s_TabGeometryProperty

Detailed Description

Definition at line 7 of file TabViewItemTemplateSettings.properties.h.

Constructor & Destructor Documentation

TabViewItemTemplateSettingsProperties ( )

Definition at line 19 of file TabViewItemTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file TabViewItemTemplateSettings.properties.cpp.

{
    s_IconElementProperty = nullptr;
    s_TabGeometryProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 24 of file TabViewItemTemplateSettings.properties.cpp.

{
    if (!s_IconElementProperty)
    {
        s_IconElementProperty =
            InitializeDependencyProperty(
                L"IconElement",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::TabViewItemTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_TabGeometryProperty)
    {
        s_TabGeometryProperty =
            InitializeDependencyProperty(
                L"TabGeometry",
                winrt::name_of<winrt::Geometry>(),
                winrt::name_of<winrt::TabViewItemTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Geometry>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IconElement IconElement ( )

Definition at line 64 of file TabViewItemTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<TabViewItemTemplateSettings*>(this)->GetValue(s_IconElementProperty));
}

void IconElement ( winrt::IconElement const & value )

Definition at line 56 of file TabViewItemTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TabViewItemTemplateSettings*>(this)->SetValue(s_IconElementProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconElementProperty ( ) [inline, static]

Definition at line 18 of file TabViewItemTemplateSettings.properties.h.

{ return s_IconElementProperty; }

winrt::Geometry TabGeometry ( )

Definition at line 77 of file TabViewItemTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Geometry>::CastOrUnbox(static_cast<TabViewItemTemplateSettings*>(this)->GetValue(s_TabGeometryProperty));
}

void TabGeometry ( winrt::Geometry const & value )

Definition at line 69 of file TabViewItemTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TabViewItemTemplateSettings*>(this)->SetValue(s_TabGeometryProperty, ValueHelper<winrt::Geometry>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TabGeometryProperty ( ) [inline, static]

Definition at line 19 of file TabViewItemTemplateSettings.properties.h.

{ return s_TabGeometryProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconElementProperty [static]

Definition at line 21 of file TabViewItemTemplateSettings.properties.h.

GlobalDependencyProperty s_TabGeometryProperty [static]

Definition at line 22 of file TabViewItemTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TabViewItemTemplateSettings.properties.h
  • Generated/TabViewItemTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewListView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TabViewListView Class Reference

#include "TabViewListView.h"

Inherits ReferenceTracker< TabViewListView, winrt::implementation::TabViewListViewT >.

List of all members.

Public Member Functions

TabViewListView ()
winrt::DependencyObject | GetContainerForItemOverride ()
bool | IsItemItsOwnContainerOverride (winrt::IInspectable const &item)
void | OnItemsChanged (winrt::IInspectable const &item)
void | PrepareContainerForItemOverride (const winrt::DependencyObject &element, const winrt::IInspectable &item)

Private Member Functions

void | OnContainerContentChanging (const winrt::IInspectable &sender, const winrt::ContainerContentChangingEventArgs &args)
void | OnSelectedIndexPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyProperty &args)
void | UpdateBottomBorderVisualState ()

Detailed Description

Definition at line 7 of file TabViewListView.h.

Constructor & Destructor Documentation

TabViewListView ( )

Definition at line 15 of file TabViewListView.cpp.

{
    SetDefaultStyleKey(this);

    ContainerContentChanging({ this, &TabViewListView::OnContainerContentChanging });

    RegisterPropertyChangedCallback(winrt::Selector::SelectedIndexProperty(), { this, &TabViewListView::OnSelectedIndexPropertyChanged });
}

Member Function Documentation

winrt::DependencyObject GetContainerForItemOverride ( )

Definition at line 31 of file TabViewListView.cpp.

{
    return winrt::make<TabViewItem>();
}

bool IsItemItsOwnContainerOverride ( winrt::IInspectable const & item )

Definition at line 36 of file TabViewListView.cpp.

{
    bool isItemItsOwnContainer = false;
    if (const auto item = args.try_as<winrt::TabViewItem>())
    {
        isItemItsOwnContainer = static_cast<bool>(item);
    }
    return isItemItsOwnContainer;
}

void OnContainerContentChanging | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ContainerContentChangingEventArgs & | args |
 | ) |  |  | [private]
void OnItemsChanged ( winrt::IInspectable const & item )

Definition at line 46 of file TabViewListView.cpp.

{
    __super::OnItemsChanged(item);

    if (const auto tabView = SharedHelpers::GetAncestorOfType<winrt::TabView>(winrt::VisualTreeHelper::GetParent(*this)))
    {
        const auto internalTabView = winrt::get_self<TabView>(tabView);
        internalTabView->OnItemsChanged(item);
    }
    UpdateBottomBorderVisualState();
}

void OnSelectedIndexPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 24 of file TabViewListView.cpp.

{
    UpdateBottomBorderVisualState();
}

void PrepareContainerForItemOverride | ( | const winrt::DependencyObject & | element,
 |  | const winrt::IInspectable & | item
 | ) |  |

Definition at line 58 of file TabViewListView.cpp.

{
    const auto itemContainer = element.as<winrt::TabViewItem>();
    const auto tvi = winrt::get_self<TabViewItem>(itemContainer);

    // Due to virtualization, a TabViewItem might be recycled to display a different tab data item.
    // In that case, there is no need to set the TabWidthMode of the TabViewItem or its parent TabView
    // as they are already set correctly here.
    //
    // We know we are currently looking at a TabViewItem being recycled if its parent TabView has already been set.
    auto parentTabView = tvi->GetParentTabView();

    if (!parentTabView)
    {
        if (const auto tabView = SharedHelpers::GetAncestorOfType<winrt::TabView>(winrt::VisualTreeHelper::GetParent(*this)))
        {
            tvi->OnTabViewWidthModeChanged(tabView.TabWidthMode());
            tvi->SetParentTabView(tabView);

            parentTabView = tabView;
        }
    }

    if (parentTabView)
    {
        auto parentTabViewImpl = winrt::get_self<TabView>(parentTabView);
        parentTabViewImpl->UpdateTabWidths();
    }

    __super::PrepareContainerForItemOverride(element, item);
}

void UpdateBottomBorderVisualState ( ) [private]

Definition at line 99 of file TabViewListView.cpp.

{
    winrt::VisualStateManager::GoToState(
        *this,
        (SelectedIndex() == 0) ? L"LeftBottomBorderLineShort" : L"LeftBottomBorderLineNormal",
        false /*useTransitions*/);

    winrt::VisualStateManager::GoToState(
        *this,
        (SelectedIndex() == (int)(Items().Size() - 1)) ? L"RightBottomBorderLineShort" : L"RightBottomBorderLineNormal",
        false /*useTransitions*/);
}

The documentation for this class was generated from the following files:
  • TabView/TabViewListView.h
  • TabView/TabViewListView.cpp
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

TabViewProperties Class Reference

#include "TabView.properties.h"

Inherited by TabView.

List of all members.

Public Member Functions

TabViewProperties ()
winrt::event_token | AddTabButtonClick (winrt::TypedEventHandler< winrt::TabView, winrt::IInspectable > const &value)
void | AddTabButtonClick (winrt::event_token const &token)
void | AddTabButtonCommand (winrt::ICommand const &value)
winrt::ICommand | AddTabButtonCommand ()
void | AddTabButtonCommandParameter (winrt::IInspectable const &value)
winrt::IInspectable | AddTabButtonCommandParameter ()
void | AllowDropTabs (bool value)
bool | AllowDropTabs ()
void | CanDragTabs (bool value)
bool | CanDragTabs ()
void | CanReorderTabs (bool value)
bool | CanReorderTabs ()
void | CanTearOutTabs (bool value)
bool | CanTearOutTabs ()
void | CloseButtonOverlayMode (winrt::TabViewCloseButtonOverlayMode const &value)
winrt::TabViewCloseButtonOverlayMode | CloseButtonOverlayMode ()
winrt::event_token | ExternalTornOutTabsDropped (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs > const &value)
void | ExternalTornOutTabsDropped (winrt::event_token const &token)
winrt::event_token | ExternalTornOutTabsDropping (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs > const &value)
void | ExternalTornOutTabsDropping (winrt::event_token const &token)
void | IsAddTabButtonVisible (bool value)
bool | IsAddTabButtonVisible ()
void | SelectedIndex (int value)
int | SelectedIndex ()
void | SelectedItem (winrt::IInspectable const &value)
winrt::IInspectable | SelectedItem ()
winrt::event_token | SelectionChanged (winrt::SelectionChangedEventHandler const &value)
void | SelectionChanged (winrt::event_token const &token)
winrt::event_token | TabCloseRequested (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs > const &value)
void | TabCloseRequested (winrt::event_token const &token)
winrt::event_token | TabDragCompleted (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragCompletedEventArgs > const &value)
void | TabDragCompleted (winrt::event_token const &token)
winrt::event_token | TabDragStarting (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragStartingEventArgs > const &value)
void | TabDragStarting (winrt::event_token const &token)
void | TabDroppedOutside (winrt::event_token const &token)
winrt::event_token | TabDroppedOutside (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs > const &value)
winrt::IVector
< winrt::IInspectable > 		TabItems ()
void | TabItems (winrt::IVector< winrt::IInspectable > const &value)
winrt::event_token | TabItemsChanged (winrt::TypedEventHandler< winrt::TabView, winrt::IVectorChangedEventArgs > const &value)
void | TabItemsChanged (winrt::event_token const &token)
void | TabItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | TabItemsSource ()
winrt::DataTemplate | TabItemTemplate ()
void | TabItemTemplate (winrt::DataTemplate const &value)
void | TabItemTemplateSelector (winrt::DataTemplateSelector const &value)
winrt::DataTemplateSelector | TabItemTemplateSelector ()
void | TabStripDragOver (winrt::event_token const &token)
winrt::event_token | TabStripDragOver (winrt::DragEventHandler const &value)
void | TabStripDrop (winrt::event_token const &token)
winrt::event_token | TabStripDrop (winrt::DragEventHandler const &value)
void | TabStripFooter (winrt::IInspectable const &value)
winrt::IInspectable | TabStripFooter ()
void | TabStripFooterTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | TabStripFooterTemplate ()
winrt::IInspectable | TabStripHeader ()
void | TabStripHeader (winrt::IInspectable const &value)
winrt::DataTemplate | TabStripHeaderTemplate ()
void | TabStripHeaderTemplate (winrt::DataTemplate const &value)
void | TabTearOutRequested (winrt::event_token const &token)
winrt::event_token | TabTearOutRequested (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs > const &value)
winrt::event_token | TabTearOutWindowRequested (winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs > const &value)
void | TabTearOutWindowRequested (winrt::event_token const &token)
void | TabWidthMode (winrt::TabViewWidthMode const &value)
winrt::TabViewWidthMode | TabWidthMode ()

Static Public Member Functions

static winrt::DependencyProperty | AddTabButtonCommandParameterProperty ()
static winrt::DependencyProperty | AddTabButtonCommandProperty ()
static winrt::DependencyProperty | AllowDropTabsProperty ()
static winrt::DependencyProperty | CanDragTabsProperty ()
static winrt::DependencyProperty | CanReorderTabsProperty ()
static winrt::DependencyProperty | CanTearOutTabsProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | CloseButtonOverlayModeProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsAddTabButtonVisibleProperty ()
static void | OnCanTearOutTabsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCloseButtonOverlayModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedIndexPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedItemPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTabItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTabWidthModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SelectedIndexProperty ()
static winrt::DependencyProperty | SelectedItemProperty ()
static winrt::DependencyProperty | TabItemsProperty ()
static winrt::DependencyProperty | TabItemsSourceProperty ()
static winrt::DependencyProperty | TabItemTemplateProperty ()
static winrt::DependencyProperty | TabItemTemplateSelectorProperty ()
static winrt::DependencyProperty | TabStripFooterProperty ()
static winrt::DependencyProperty | TabStripFooterTemplateProperty ()
static winrt::DependencyProperty | TabStripHeaderProperty ()
static winrt::DependencyProperty | TabStripHeaderTemplateProperty ()
static winrt::DependencyProperty | TabWidthModeProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::IInspectable > > 		m_addTabButtonClickEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewExternalTornOutTabsDroppedEventArgs > > 		m_externalTornOutTabsDroppedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewExternalTornOutTabsDroppingEventArgs > > 		m_externalTornOutTabsDroppingEventSource
event_source
< winrt::SelectionChangedEventHandler > 		m_selectionChangedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewTabCloseRequestedEventArgs > > 		m_tabCloseRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewTabDragCompletedEventArgs > > 		m_tabDragCompletedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewTabDragStartingEventArgs > > 		m_tabDragStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewTabDroppedOutsideEventArgs > > 		m_tabDroppedOutsideEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::IVectorChangedEventArgs > > 		m_tabItemsChangedEventSource
event_source
< winrt::DragEventHandler > 		m_tabStripDragOverEventSource
event_source
< winrt::DragEventHandler > 		m_tabStripDropEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewTabTearOutRequestedEventArgs > > 		m_tabTearOutRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TabView,
winrt::TabViewTabTearOutWindowRequestedEventArgs > > 		m_tabTearOutWindowRequestedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_AddTabButtonCommandParameterProperty
static GlobalDependencyProperty | s_AddTabButtonCommandProperty
static GlobalDependencyProperty | s_AllowDropTabsProperty
static GlobalDependencyProperty | s_CanDragTabsProperty
static GlobalDependencyProperty | s_CanReorderTabsProperty
static GlobalDependencyProperty | s_CanTearOutTabsProperty
static GlobalDependencyProperty | s_CloseButtonOverlayModeProperty
static GlobalDependencyProperty | s_IsAddTabButtonVisibleProperty
static GlobalDependencyProperty | s_SelectedIndexProperty
static GlobalDependencyProperty | s_SelectedItemProperty
static GlobalDependencyProperty | s_TabItemsProperty
static GlobalDependencyProperty | s_TabItemsSourceProperty
static GlobalDependencyProperty | s_TabItemTemplateProperty
static GlobalDependencyProperty | s_TabItemTemplateSelectorProperty
static GlobalDependencyProperty | s_TabStripFooterProperty
static GlobalDependencyProperty | s_TabStripFooterTemplateProperty
static GlobalDependencyProperty | s_TabStripHeaderProperty
static GlobalDependencyProperty | s_TabStripHeaderTemplateProperty
static GlobalDependencyProperty | s_TabWidthModeProperty

Detailed Description

Definition at line 7 of file TabView.properties.h.

Constructor & Destructor Documentation

TabViewProperties ( )

Definition at line 36 of file TabView.properties.cpp.

    : m_addTabButtonClickEventSource{static_cast<TabView*>(this)}

Member Function Documentation

winrt::event_token AddTabButtonClick ( winrt::TypedEventHandler< winrt::TabView, winrt::IInspectable > const & value )
void AddTabButtonClick ( winrt::event_token const & token )
winrt::ICommand AddTabButtonCommand ( )
void AddTabButtonCommand ( winrt::ICommand const & value )
winrt::IInspectable AddTabButtonCommandParameter ( )
void AddTabButtonCommandParameter ( winrt::IInspectable const & value )
static winrt::DependencyProperty AddTabButtonCommandParameterProperty ( ) [inline, static]

Definition at line 70 of file TabView.properties.h.

{ return s_AddTabButtonCommandParameterProperty; }

static winrt::DependencyProperty AddTabButtonCommandProperty ( ) [inline, static]

Definition at line 69 of file TabView.properties.h.

{ return s_AddTabButtonCommandProperty; }

void AllowDropTabs ( bool value )
bool AllowDropTabs ( )
static winrt::DependencyProperty AllowDropTabsProperty ( ) [inline, static]

Definition at line 71 of file TabView.properties.h.

{ return s_AllowDropTabsProperty; }

bool CanDragTabs ( )
void CanDragTabs ( bool value )
static winrt::DependencyProperty CanDragTabsProperty ( ) [inline, static]

Definition at line 72 of file TabView.properties.h.

{ return s_CanDragTabsProperty; }

void CanReorderTabs ( bool value )
bool CanReorderTabs ( )
static winrt::DependencyProperty CanReorderTabsProperty ( ) [inline, static]

Definition at line 73 of file TabView.properties.h.

{ return s_CanReorderTabsProperty; }

void CanTearOutTabs ( bool value )
bool CanTearOutTabs ( )
static winrt::DependencyProperty CanTearOutTabsProperty ( ) [inline, static]

Definition at line 74 of file TabView.properties.h.

{ return s_CanTearOutTabsProperty; }

static void ClearProperties ( ) [static]
void CloseButtonOverlayMode ( winrt::TabViewCloseButtonOverlayMode const & value )
winrt::TabViewCloseButtonOverlayMode CloseButtonOverlayMode ( )
static winrt::DependencyProperty CloseButtonOverlayModeProperty ( ) [inline, static]

Definition at line 75 of file TabView.properties.h.

{ return s_CloseButtonOverlayModeProperty; }

static void EnsureProperties ( ) [static]
winrt::event_token ExternalTornOutTabsDropped ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs > const & value )
void ExternalTornOutTabsDropped ( winrt::event_token const & token )
winrt::event_token ExternalTornOutTabsDropping ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs > const & value )
void ExternalTornOutTabsDropping ( winrt::event_token const & token )
bool IsAddTabButtonVisible ( )
void IsAddTabButtonVisible ( bool value )
static winrt::DependencyProperty IsAddTabButtonVisibleProperty ( ) [inline, static]

Definition at line 76 of file TabView.properties.h.

{ return s_IsAddTabButtonVisibleProperty; }

static void OnCanTearOutTabsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCloseButtonOverlayModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedIndexPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedItemPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTabItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTabWidthModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void SelectedIndex ( int value )
int SelectedIndex ( )
static winrt::DependencyProperty SelectedIndexProperty ( ) [inline, static]

Definition at line 77 of file TabView.properties.h.

{ return s_SelectedIndexProperty; }

void SelectedItem ( winrt::IInspectable const & value )
winrt::IInspectable SelectedItem ( )
static winrt::DependencyProperty SelectedItemProperty ( ) [inline, static]

Definition at line 78 of file TabView.properties.h.

{ return s_SelectedItemProperty; }

winrt::event_token SelectionChanged ( winrt::SelectionChangedEventHandler const & value )
void SelectionChanged ( winrt::event_token const & token )
winrt::event_token TabCloseRequested ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs > const & value )
void TabCloseRequested ( winrt::event_token const & token )
winrt::event_token TabDragCompleted ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragCompletedEventArgs > const & value )
void TabDragCompleted ( winrt::event_token const & token )
winrt::event_token TabDragStarting ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragStartingEventArgs > const & value )
void TabDragStarting ( winrt::event_token const & token )
winrt::event_token TabDroppedOutside ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs > const & value )
void TabDroppedOutside ( winrt::event_token const & token )
void TabItems ( winrt::IVector< winrt::IInspectable > const & value )
winrt::IVector<winrt::IInspectable> TabItems ( )
winrt::event_token TabItemsChanged ( winrt::TypedEventHandler< winrt::TabView, winrt::IVectorChangedEventArgs > const & value )
void TabItemsChanged ( winrt::event_token const & token )
static winrt::DependencyProperty TabItemsProperty ( ) [inline, static]

Definition at line 79 of file TabView.properties.h.

{ return s_TabItemsProperty; }

void TabItemsSource ( winrt::IInspectable const & value )
winrt::IInspectable TabItemsSource ( )
static winrt::DependencyProperty TabItemsSourceProperty ( ) [inline, static]

Definition at line 80 of file TabView.properties.h.

{ return s_TabItemsSourceProperty; }

void TabItemTemplate ( winrt::DataTemplate const & value )
winrt::DataTemplate TabItemTemplate ( )
static winrt::DependencyProperty TabItemTemplateProperty ( ) [inline, static]

Definition at line 81 of file TabView.properties.h.

{ return s_TabItemTemplateProperty; }

void TabItemTemplateSelector ( winrt::DataTemplateSelector const & value )
winrt::DataTemplateSelector TabItemTemplateSelector ( )
static winrt::DependencyProperty TabItemTemplateSelectorProperty ( ) [inline, static]

Definition at line 82 of file TabView.properties.h.

{ return s_TabItemTemplateSelectorProperty; }

winrt::event_token TabStripDragOver ( winrt::DragEventHandler const & value )
void TabStripDragOver ( winrt::event_token const & token )
winrt::event_token TabStripDrop ( winrt::DragEventHandler const & value )
void TabStripDrop ( winrt::event_token const & token )
void TabStripFooter ( winrt::IInspectable const & value )
winrt::IInspectable TabStripFooter ( )
static winrt::DependencyProperty TabStripFooterProperty ( ) [inline, static]

Definition at line 83 of file TabView.properties.h.

{ return s_TabStripFooterProperty; }

winrt::DataTemplate TabStripFooterTemplate ( )
void TabStripFooterTemplate ( winrt::DataTemplate const & value )
static winrt::DependencyProperty TabStripFooterTemplateProperty ( ) [inline, static]

Definition at line 84 of file TabView.properties.h.

{ return s_TabStripFooterTemplateProperty; }

winrt::IInspectable TabStripHeader ( )
void TabStripHeader ( winrt::IInspectable const & value )
static winrt::DependencyProperty TabStripHeaderProperty ( ) [inline, static]

Definition at line 85 of file TabView.properties.h.

{ return s_TabStripHeaderProperty; }

winrt::DataTemplate TabStripHeaderTemplate ( )
void TabStripHeaderTemplate ( winrt::DataTemplate const & value )
static winrt::DependencyProperty TabStripHeaderTemplateProperty ( ) [inline, static]

Definition at line 86 of file TabView.properties.h.

{ return s_TabStripHeaderTemplateProperty; }

winrt::event_token TabTearOutRequested ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs > const & value )
void TabTearOutRequested ( winrt::event_token const & token )
winrt::event_token TabTearOutWindowRequested ( winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs > const & value )
void TabTearOutWindowRequested ( winrt::event_token const & token )
void TabWidthMode ( winrt::TabViewWidthMode const & value )
winrt::TabViewWidthMode TabWidthMode ( )
static winrt::DependencyProperty TabWidthModeProperty ( ) [inline, static]

Definition at line 87 of file TabView.properties.h.

{ return s_TabWidthModeProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::IInspectable> > m_addTabButtonClickEventSource

Definition at line 136 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs> > m_externalTornOutTabsDroppedEventSource

Definition at line 137 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs> > m_externalTornOutTabsDroppingEventSource

Definition at line 138 of file TabView.properties.h.

event_source<winrt::SelectionChangedEventHandler> m_selectionChangedEventSource

Definition at line 139 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs> > m_tabCloseRequestedEventSource

Definition at line 140 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragCompletedEventArgs> > m_tabDragCompletedEventSource

Definition at line 141 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragStartingEventArgs> > m_tabDragStartingEventSource

Definition at line 142 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs> > m_tabDroppedOutsideEventSource

Definition at line 143 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::IVectorChangedEventArgs> > m_tabItemsChangedEventSource

Definition at line 144 of file TabView.properties.h.

event_source<winrt::DragEventHandler> m_tabStripDragOverEventSource

Definition at line 145 of file TabView.properties.h.

event_source<winrt::DragEventHandler> m_tabStripDropEventSource

Definition at line 146 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs> > m_tabTearOutRequestedEventSource

Definition at line 147 of file TabView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs> > m_tabTearOutWindowRequestedEventSource

Definition at line 148 of file TabView.properties.h.

GlobalDependencyProperty s_AddTabButtonCommandParameterProperty [static]

Definition at line 90 of file TabView.properties.h.

GlobalDependencyProperty s_AddTabButtonCommandProperty [static]

Definition at line 89 of file TabView.properties.h.

GlobalDependencyProperty s_AllowDropTabsProperty [static]

Definition at line 91 of file TabView.properties.h.

GlobalDependencyProperty s_CanDragTabsProperty [static]

Definition at line 92 of file TabView.properties.h.

GlobalDependencyProperty s_CanReorderTabsProperty [static]

Definition at line 93 of file TabView.properties.h.

GlobalDependencyProperty s_CanTearOutTabsProperty [static]

Definition at line 94 of file TabView.properties.h.

GlobalDependencyProperty s_CloseButtonOverlayModeProperty [static]

Definition at line 95 of file TabView.properties.h.

GlobalDependencyProperty s_IsAddTabButtonVisibleProperty [static]

Definition at line 96 of file TabView.properties.h.

GlobalDependencyProperty s_SelectedIndexProperty [static]

Definition at line 97 of file TabView.properties.h.

GlobalDependencyProperty s_SelectedItemProperty [static]

Definition at line 98 of file TabView.properties.h.

GlobalDependencyProperty s_TabItemsProperty [static]

Definition at line 99 of file TabView.properties.h.

GlobalDependencyProperty s_TabItemsSourceProperty [static]

Definition at line 100 of file TabView.properties.h.

GlobalDependencyProperty s_TabItemTemplateProperty [static]

Definition at line 101 of file TabView.properties.h.

GlobalDependencyProperty s_TabItemTemplateSelectorProperty [static]

Definition at line 102 of file TabView.properties.h.

GlobalDependencyProperty s_TabStripFooterProperty [static]

Definition at line 103 of file TabView.properties.h.

GlobalDependencyProperty s_TabStripFooterTemplateProperty [static]

Definition at line 104 of file TabView.properties.h.

GlobalDependencyProperty s_TabStripHeaderProperty [static]

Definition at line 105 of file TabView.properties.h.

GlobalDependencyProperty s_TabStripHeaderTemplateProperty [static]

Definition at line 106 of file TabView.properties.h.

GlobalDependencyProperty s_TabWidthModeProperty [static]

Definition at line 107 of file TabView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TabView.properties.h
  • Generated/TabView.properties.cpp
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabCloseRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TabViewTabCloseRequestedEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewTabCloseRequestedEventArgs (winrt::IInspectable const &item, winrt::TabViewItem tab)
winrt::IInspectable | Item ()
winrt::TabViewItem | Tab ()

Detailed Description

Definition at line 23 of file TabView.h.

Constructor & Destructor Documentation

TabViewTabCloseRequestedEventArgs | ( | winrt::IInspectable const & | item,
 |  | winrt::TabViewItem | tab |
 | ) |  |  | [inline]

Definition at line 27 of file TabView.h.

: m_item(item), m_tab(tab) {}

Member Function Documentation

winrt::IInspectable Item ( ) [inline]

Definition at line 29 of file TabView.h.

{ return m_item; }

winrt::TabViewItem Tab ( ) [inline]

Definition at line 30 of file TabView.h.

{ return m_tab; }

The documentation for this class was generated from the following file:
  • TabView/TabView.h
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabDragCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TabViewTabDragCompletedEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewTabDragCompletedEventArgs (winrt::DragItemsCompletedEventArgs const &args, winrt::IInspectable const &item, winrt::TabViewItem tab)
winrt::DataPackageOperation | DropResult ()
winrt::IInspectable | Item ()
winrt::TabViewItem | Tab ()

Detailed Description

Definition at line 70 of file TabView.h.

Constructor & Destructor Documentation

TabViewTabDragCompletedEventArgs | ( | winrt::DragItemsCompletedEventArgs const & | args,
 |  | winrt::IInspectable const & | item,
 |  | winrt::TabViewItem | tab |
 | ) |  |  | [inline]

Definition at line 74 of file TabView.h.

: m_args(args), m_item(item), m_tab(tab) {}

Member Function Documentation

winrt::DataPackageOperation DropResult ( ) [inline]

Definition at line 76 of file TabView.h.

{ return m_args.DropResult(); }

winrt::IInspectable Item ( ) [inline]

Definition at line 77 of file TabView.h.

{ return m_item; }

winrt::TabViewItem Tab ( ) [inline]

Definition at line 78 of file TabView.h.

{ return m_tab; }

The documentation for this class was generated from the following file:
  • TabView/TabView.h
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabDragStartingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TabViewTabDragStartingEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewTabDragStartingEventArgs (winrt::DragItemsStartingEventArgs const &args, winrt::IInspectable const &item, winrt::TabViewItem tab)
bool | Cancel ()
void | Cancel (bool value)
winrt::DataPackage | Data ()
winrt::IInspectable | Item ()
winrt::TabViewItem | Tab ()

Detailed Description

Definition at line 52 of file TabView.h.

Constructor & Destructor Documentation

TabViewTabDragStartingEventArgs | ( | winrt::DragItemsStartingEventArgs const & | args,
 |  | winrt::IInspectable const & | item,
 |  | winrt::TabViewItem | tab |
 | ) |  |  | [inline]

Definition at line 56 of file TabView.h.

: m_args(args), m_item(item), m_tab(tab) {}

Member Function Documentation

bool Cancel ( ) [inline]

Definition at line 58 of file TabView.h.

{ return m_args.Cancel(); }

void Cancel ( bool value ) [inline]

Definition at line 59 of file TabView.h.

{ m_args.Cancel(value); }

winrt::DataPackage Data ( ) [inline]

Definition at line 60 of file TabView.h.

{ return m_args.Data(); }

winrt::IInspectable Item ( ) [inline]

Definition at line 61 of file TabView.h.

{ return m_item; }

winrt::TabViewItem Tab ( ) [inline]

Definition at line 62 of file TabView.h.

{ return m_tab; }

The documentation for this class was generated from the following file:
  • TabView/TabView.h
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabDroppedOutsideEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TabViewTabDroppedOutsideEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewTabDroppedOutsideEventArgs (winrt::IInspectable const &item, winrt::TabViewItem tab)
winrt::IInspectable | Item ()
winrt::TabViewItem | Tab ()

Detailed Description

Definition at line 38 of file TabView.h.

Constructor & Destructor Documentation

TabViewTabDroppedOutsideEventArgs | ( | winrt::IInspectable const & | item,
 |  | winrt::TabViewItem | tab |
 | ) |  |  | [inline]

Definition at line 42 of file TabView.h.

: m_item(item), m_tab(tab) {}

Member Function Documentation

winrt::IInspectable Item ( ) [inline]

Definition at line 44 of file TabView.h.

{ return m_item; }

winrt::TabViewItem Tab ( ) [inline]

Definition at line 45 of file TabView.h.

{ return m_tab; }

The documentation for this class was generated from the following file:
  • TabView/TabView.h
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabTearOutRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

TabViewTabTearOutRequestedEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewTabTearOutRequestedEventArgs (winrt::IInspectable const &item, winrt::UIElement const &tab)
winrt::com_array
< winrt::IInspectable > 		Items () const
winrt::Microsoft::UI::WindowId NewWindowId () const
winrt::com_array
< winrt::UIElement > 		Tabs () const

Private Attributes

winrt::com_array
< winrt::IInspectable > 		m_items
winrt::com_array
< winrt::UIElement > 		m_tabs

Detailed Description

Definition at line 113 of file TabView.h.

Constructor & Destructor Documentation

TabViewTabTearOutRequestedEventArgs | ( | winrt::IInspectable const & | item,
 |  | winrt::UIElement const & | tab
 | ) |  |

Definition at line 46 of file TabView.cpp.

    : m_items({ item })

Member Function Documentation

winrt::com_array<winrt::IInspectable> Items ( ) const [inline]

Definition at line 119 of file TabView.h.

{ return CopyArray(m_items); }

winrt::Microsoft::UI::WindowId NewWindowId ( ) const [inline]

Definition at line 122 of file TabView.h.

{ return m_newWindowId; }

winrt::com_array<winrt::UIElement> Tabs ( ) const [inline]

Definition at line 120 of file TabView.h.

{ return CopyArray(m_tabs); }

Member Data Documentation

winrt::com_array<winrt::IInspectable> m_items [private]

Definition at line 125 of file TabView.h.

winrt::com_array<winrt::UIElement> m_tabs [private]

Definition at line 126 of file TabView.h.

The documentation for this class was generated from the following files:
  • TabView/TabView.h
  • TabView/TabView.cpp
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTabTearOutWindowRequestedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

TabViewTabTearOutWindowRequestedEventArgs Class Reference

#include "TabView.h"

List of all members.

Public Member Functions

TabViewTabTearOutWindowRequestedEventArgs (winrt::IInspectable const &item, winrt::UIElement const &tab)
winrt::com_array
< winrt::IInspectable > 		Items () const
winrt::Microsoft::UI::WindowId | NewWindowId () const
void | NewWindowId (winrt::Microsoft::UI::WindowId const &value)
winrt::com_array
< winrt::UIElement > 		Tabs () const

Private Attributes

winrt::com_array
< winrt::IInspectable > 		m_items
winrt::com_array
< winrt::UIElement > 		m_tabs

Detailed Description

Definition at line 94 of file TabView.h.

Constructor & Destructor Documentation

TabViewTabTearOutWindowRequestedEventArgs | ( | winrt::IInspectable const & | item,
 |  | winrt::UIElement const & | tab
 | ) |  |

Definition at line 40 of file TabView.cpp.

    : m_items({ item })

Member Function Documentation

winrt::com_array<winrt::IInspectable> Items ( ) const [inline]

Definition at line 100 of file TabView.h.

{ return CopyArray(m_items); }

void NewWindowId ( winrt::Microsoft::UI::WindowId const & value ) [inline]

Definition at line 104 of file TabView.h.

{ m_newWindowId = value; }

winrt::Microsoft::UI::WindowId NewWindowId ( ) const [inline]

Definition at line 103 of file TabView.h.

{ return m_newWindowId; }

winrt::com_array<winrt::UIElement> Tabs ( ) const [inline]

Definition at line 101 of file TabView.h.

{ return CopyArray(m_tabs); }

Member Data Documentation

winrt::com_array<winrt::IInspectable> m_items [private]

Definition at line 107 of file TabView.h.

winrt::com_array<winrt::UIElement> m_tabs [private]

Definition at line 108 of file TabView.h.

The documentation for this class was generated from the following files:
  • TabView/TabView.h
  • TabView/TabView.cpp
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewTrace Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Static Public Attributes

TabViewTrace Class Reference

#include "TabViewTrace.h"

List of all members.

Static Public Member Functions

static void | TraceInfo (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept
static void | TracePerfInfo (PCWSTR info) noexcept
static void | TraceVerbose (bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept

Static Public Attributes

static bool | s_IsDebugOutputEnabled
static bool | s_IsVerboseDebugOutputEnabled

Detailed Description

Definition at line 74 of file TabViewTrace.h.

Member Function Documentation

static void TraceInfo | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 80 of file TabViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[384]{};
        if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "TabViewInfo" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_INFO),
                    TraceLoggingKeyword(KEYWORD_TABVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"TabView") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
            {
                globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

static void TracePerfInfo ( PCWSTR info ) [inline, static]

Definition at line 153 of file TabViewTrace.h.

    {
        // TraceViewers
        // http://toolbox/pef
        // http://fastetw/index.aspx
        TraceLoggingWrite(
            g_hPerfProvider,
            "TabViewPerf" /* eventName */,
            TraceLoggingLevel(WINEVENT_LEVEL_INFO),
            TraceLoggingKeyword(KEYWORD_TABVIEW),
            TraceLoggingWideString(info, "Info"));
    }

static void TraceVerbose | ( | bool | includeTraceLogging,
 |  | const winrt::IInspectable & | sender,
 |  | PCWSTR | message,
 |  |  | ... |
 | ) |  |  | [inline, static]

Definition at line 116 of file TabViewTrace.h.

    {
        va_list args;
        va_start(args, message);
        WCHAR buffer[1024]{};
        const HRESULT hr = StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args);
        if (SUCCEEDED(hr) || hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
        {
            if (includeTraceLogging)
            {
                // TraceViewers
                // http://toolbox/pef
                // http://fastetw/index.aspx
                TraceLoggingWrite(
                    g_hLoggingProvider,
                    "TabViewVerbose" /* eventName */,
                    TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
                    TraceLoggingKeyword(KEYWORD_TABVIEW),
                    TraceLoggingWideString(buffer, "Message"));
            }

            if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
            {
                OutputDebugStringW(buffer);
            }

            com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();

            if (globalTestHooks &&
                (globalTestHooks->GetLoggingLevelForType(L"TabView") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
            {
                globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
            }
        }
        va_end(args);
    }

Member Data Documentation

bool s_IsDebugOutputEnabled [static]

Definition at line 77 of file TabViewTrace.h.

bool s_IsVerboseDebugOutputEnabled [static]

Definition at line 78 of file TabViewTrace.h.

The documentation for this class was generated from the following file:
  • TabView/TabViewTrace.h
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends

TeachingTip Class Reference

#include "TeachingTip.h"

Inherits ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT >, and TeachingTipProperties.

List of all members.

Public Member Functions

TeachingTip ()
winrt::TeachingTipHeroContentPlacementMode | GetEffectiveHeroContentPlacement ()
winrt::TeachingTipPlacementMode | GetEffectivePlacement ()
double | GetHorizontalOffset ()
bool | GetIsIdle ()
winrt::Visibility | GetSubtitleVisibility ()
winrt::Visibility | GetTitleVisibility ()
double | GetVerticalOffset ()
void | OnApplyTemplate ()
void | OnContentChanged (const winrt::IInspectable &oldContent, const winrt::IInspectable &newContent)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | SetContentElevation (float elevation)
void | SetContractAnimationDuration (const winrt::TimeSpan &contractAnimationDuration)
void | SetContractEasingFunction (const winrt::CompositionEasingFunction &easingFunction)
void | SetExpandAnimationDuration (const winrt::TimeSpan &expandAnimationDuration)
void | SetExpandEasingFunction (const winrt::CompositionEasingFunction &easingFunction)
void | SetIsIdle (bool isIdle)
void | SetReturnTopForOutOfWindowPlacement (bool useScreenBoundsForAutoPlacement)
void | SetTailElevation (float elevation)
void | SetTestScreenBounds (const winrt::Rect &testScreenBounds)
void | SetTestWindowBounds (const winrt::Rect &testWindowBounds)
void | SetTipFollowsTarget (bool tipFollowsTarget)
void | SetTipShouldHaveShadow (bool tipShadow)
void | SetUseTestScreenBounds (bool useTestScreenBounds)
void | SetUseTestWindowBounds (bool useTestWindowBounds)

Private Member Functions

winrt::Thickness | BottomLeftPlacementTopLeftHighlightMargin (double width, double height)
winrt::Thickness | BottomLeftPlacementTopRightHighlightMargin (double width, double height)
winrt::Thickness | BottomPlacementTopLeftHighlightMargin (double width, double height)
winrt::Thickness | BottomPlacementTopRightHighlightMargin (double width, double height)
winrt::Thickness | BottomRightPlacementTopLeftHighlightMargin (double width, double height)
winrt::Thickness | BottomRightPlacementTopRightHighlightMargin (double width, double height)
void | ClosePopup ()
void | ClosePopupOnUnloadEvent (winrt::IInspectable const &, winrt::RoutedEventArgs const &e)
void | ClosePopupWithAnimationIfAvailable ()
void | CreateContractAnimation ()
void | CreateExpandAnimation ()
void | CreateLightDismissIndicatorPopup ()
void | CreateNewPopup ()
std::tuple
< winrt::TeachingTipPlacementMode,
bool > 		DetermineEffectivePlacement ()
std::tuple
< winrt::TeachingTipPlacementMode,
bool > 		DetermineEffectivePlacementTargeted (double contentHight, double contentWidth)
std::tuple
< winrt::TeachingTipPlacementMode,
bool > 		DetermineEffectivePlacementUntargeted (double contentHight, double contentWidth)
std::tuple< winrt::Thickness,
winrt::Thickness > 		DetermineSpaceAroundTarget ()
void | EstablishShadows ()
winrt::Rect | GetEffectiveScreenBoundsInCoreWindowSpace (const winrt::Rect &windowBounds)
winrt::Rect | GetEffectiveWindowBoundsInCoreWindowSpace (const winrt::Rect &windowBounds)
winrt::TeachingTipPlacementMode | GetFlowDirectionAdjustedPlacement (const winrt::TeachingTipPlacementMode &placementMode)
winrt::CornerRadius | GetTeachingTipCornerRadius ()
winrt::Rect | GetWindowBounds ()
bool | HandleF6Clicked (bool fromPopup=false)
void | IsOpenChangedToClose ()
void | IsOpenChangedToOpen ()
winrt::Thickness | LeftEdgePlacementTopLeftHighlightMargin (double width, double height)
double | MinimumTipEdgeToTailCenter ()
double | MinimumTipEdgeToTailEdgeMargin ()
void | OnActionButtonClicked (const winrt::IInspectable &, const winrt::RoutedEventArgs &)
void | OnAutomationIdChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnAutomationNameChanged (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnCloseButtonClicked (const winrt::IInspectable &, const winrt::RoutedEventArgs &)
void | OnContentSizeChanged (const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args)
void | OnF6AcceleratorKeyClicked (const winrt::CoreDispatcher &, const winrt::AcceleratorKeyEventArgs &args)
void | OnF6PopupPreviewKeyDownClicked (const winrt::IInspectable &, const winrt::KeyRoutedEventArgs &args)
void | OnF6PreviewKeyDownClicked (const winrt::IInspectable &, const winrt::KeyRoutedEventArgs &args)
void | OnHeroContentPlacementChanged ()
void | OnIconSourceChanged ()
void | OnIsLightDismissEnabledChanged ()
void | OnIsOpenChanged ()
void | OnLightDismissIndicatorPopupClosed (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnPlacementMarginChanged ()
void | OnPopupClosed (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnPopupOpened (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnShouldConstrainToRootBoundsChanged ()
void | OnTailVisibilityChanged ()
void | OnTargetChanged ()
void | OnTargetLayoutUpdated (const winrt::IInspectable &, const winrt::IInspectable &)
void | OnTargetLoaded (const winrt::IInspectable &, const winrt::IInspectable &)
void | PositionPopup ()
bool | PositionTargetedPopup ()
bool | PositionUntargetedPopup ()
void | RaiseClosingEvent (bool attachDeferralCompletedHandler)
void | RepositionPopup ()
void | RevokeViewportChangedEvent ()
winrt::Thickness | RightEdgePlacementTopLeftHighlightMargin (double width, double height)
void | SetPopupAutomationProperties ()
void | SetViewportChangedEvent (const gsl::strict_not_null< winrt::FrameworkElement > &target)
void | StartContractToClose ()
void | StartExpandToOpen ()
double | TailLongSideActualLength ()
double | TailLongSideLength ()
double | TailShortSideLength ()
bool | ToggleVisibilityForEmptyContent (const wstring_view visibleStateName, const wstring_view collapsedStateName, const winrt::hstring &content)
winrt::Thickness | TopEdgePlacementTopLeftHighlightMargin (double width, double height)
double | TopLeftCornerRadius ()
double | TopRightCornerRadius ()
void | TrySetCenterPoint (const winrt::IUIElement &element, const winrt::float3 &centerPoint)
void | UpdateButtonAutomationProperties (const winrt::Button button, const winrt::IInspectable content)
void | UpdateButtonsState ()
void | UpdateDynamicHeroContentPlacementToBottom ()
void | UpdateDynamicHeroContentPlacementToBottomImpl ()
void | UpdateDynamicHeroContentPlacementToTop ()
void | UpdateDynamicHeroContentPlacementToTopImpl ()
void | UpdatePopupRequestedTheme ()
void | UpdateSizeBasedTemplateSettings ()
bool | UpdateTail ()
void | XamlRootChanged (const winrt::XamlRoot &, const winrt::XamlRootChangedEventArgs &)

Static Private Member Functions

static std::array
< winrt::TeachingTipPlacementMode, 13 > 		GetPlacementFallbackOrder (winrt::TeachingTipPlacementMode preferredPalcement)
static bool constexpr | IsPlacementBottom (winrt::TeachingTipPlacementMode placement)
static bool constexpr | IsPlacementLeft (winrt::TeachingTipPlacementMode placement)
static bool constexpr | IsPlacementRight (winrt::TeachingTipPlacementMode placement)
static bool constexpr | IsPlacementTop (winrt::TeachingTipPlacementMode placement)
static void | OnPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)
static winrt::Thickness constexpr | OtherPlacementTopRightHighlightMargin (double width, double height)
static double constexpr | UntargetedTipCenterPlacementOffset (float nearWindowCoordinateInCoreWindowSpace, float farWindowCoordinateInCoreWindowSpace, double tipSize, double nearOffset, double farOffset)
static double constexpr | UntargetedTipFarPlacementOffset (float farWindowCoordinateInCoreWindowSpace, double tipSize, double offset)
static double constexpr | UntargetedTipNearPlacementOffset (float nearWindowCoordinateInCoreWindowSpace, double offset)

Private Attributes

winrt::FrameworkElement::Unloaded_revoker | m_TargetUnloadedRevoker

Static Private Attributes

static constexpr float | s_defaultTipHeightAndWidth = 320
static constexpr float | s_tailOcclusionAmount = 2
static constexpr float | s_untargetedTipWindowEdgeMargin = 24

Friends

class | TeachingTipTestHooks

Detailed Description

Definition at line 14 of file TeachingTip.h.

Constructor & Destructor Documentation

TeachingTip ( )

Definition at line 23 of file TeachingTip.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_TeachingTip);
    SetDefaultStyleKey(this);
    EnsureProperties();
    Unloaded({ this, &TeachingTip::ClosePopupOnUnloadEvent });
    m_automationNameChangedRevoker = RegisterPropertyChanged(*this, winrt::AutomationProperties::NameProperty(), { this, &TeachingTip::OnAutomationNameChanged });
    m_automationIdChangedRevoker = RegisterPropertyChanged(*this, winrt::AutomationProperties::AutomationIdProperty(), { this, &TeachingTip::OnAutomationIdChanged });
    SetValue(s_TemplateSettingsProperty, winrt::make<::TeachingTipTemplateSettings>());
}

Member Function Documentation

winrt::Thickness BottomLeftPlacementTopLeftHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 268 of file TeachingTip.h.

{ return { (TopLeftCornerRadius() - 1.0), 0, MinimumTipEdgeToTailEdgeMargin() + TailLongSideLength() - 1.0, 0 }; }

winrt::Thickness BottomLeftPlacementTopRightHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 263 of file TeachingTip.h.

{ return { width - (MinimumTipEdgeToTailEdgeMargin() + 1.0), 0, (TopRightCornerRadius() - 1.0), 0 }; }

winrt::Thickness BottomPlacementTopLeftHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 266 of file TeachingTip.h.

{ return { (TopLeftCornerRadius() - 1.0), 0, (width / 2) + (TailShortSideLength() - 1.0), 0 }; }

winrt::Thickness BottomPlacementTopRightHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 261 of file TeachingTip.h.

{ return { (width / 2) + (TailShortSideLength() - 1.0), 0, (TopRightCornerRadius() - 1.0), 0 }; }

winrt::Thickness BottomRightPlacementTopLeftHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 267 of file TeachingTip.h.

{ return { (TopLeftCornerRadius() - 1.0), 0, width - (MinimumTipEdgeToTailEdgeMargin() + 1.0), 0 }; }

winrt::Thickness BottomRightPlacementTopRightHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 262 of file TeachingTip.h.

{ return { MinimumTipEdgeToTailEdgeMargin() + TailLongSideLength() - 1.0, 0, (TopRightCornerRadius() - 1.0), 0 }; }

void ClosePopup ( ) [private]

Definition at line 1418 of file TeachingTip.cpp.

{
    if (auto&& popup = m_popup.get())
    {
        popup.IsOpen(false);
    }
    if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
    {
        lightDismissIndicatorPopup.IsOpen(false);
    }

    if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
    {
        // A previous close animation may have left the rootGrid's scale at a very small value and if this teaching tip
        // is shown again then its text would be rasterized at this small scale and blown up ~20x. To fix this we have to
        // reset the scale after the popup has closed so that if the teaching tip is re-shown the render pass does not use the
        // small scale.
        tailOcclusionGrid.Scale({ 1.0f,1.0f,1.0f });
    }
}

void ClosePopupOnUnloadEvent | ( | winrt::IInspectable const & | ,
 |  | winrt::RoutedEventArgs const & | e |
 | ) |  |  | [private]

Definition at line 1345 of file TeachingTip.cpp.

{
    IsOpen(false);
    ClosePopup();
}

void ClosePopupWithAnimationIfAvailable ( ) [private]

Definition at line 1395 of file TeachingTip.cpp.

{
    if (m_popup && m_popup.get().IsOpen())
    {
        // Contract animation
        if (SharedHelpers::IsAnimationsEnabled())
        {
            StartContractToClose();
        }
        else
        {
            ClosePopup();
        }

        // Under normal circumstances we would have launched an animation just now, if we did not then we should make sure
        // that the idle state is correct.
        if (!m_isContractAnimationPlaying && !m_isExpandAnimationPlaying)
        {
            SetIsIdle(true);
        }
    }
}

void CreateContractAnimation ( ) [private]

Definition at line 1647 of file TeachingTip.cpp.

{
    auto const compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

    auto&& contractEasingFunction = [this, compositor]()
    {
        if (!m_contractEasingFunction)
        {
            auto const easingFunction = compositor.CreateCubicBezierEasingFunction(s_contractAnimationEasingCurveControlPoint1, s_contractAnimationEasingCurveControlPoint2);
            m_contractEasingFunction.set(easingFunction);
            return static_cast<winrt::CompositionEasingFunction>(easingFunction);
        }
        return m_contractEasingFunction.get();
    }();

    m_contractAnimation.set([this, compositor, contractEasingFunction]()
    {
        auto const contractAnimation = compositor.CreateVector3KeyFrameAnimation();
        if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
        {
            contractAnimation.SetScalarParameter(L"Width", static_cast<float>(tailOcclusionGrid.ActualWidth()));
            contractAnimation.SetScalarParameter(L"Height", static_cast<float>(tailOcclusionGrid.ActualHeight()));
        }
        else
        {
            contractAnimation.SetScalarParameter(L"Width", s_defaultTipHeightAndWidth);
            contractAnimation.SetScalarParameter(L"Height", s_defaultTipHeightAndWidth);
        }

        contractAnimation.InsertKeyFrame(0.0f, { 1.0f, 1.0f, 1.0f });
        contractAnimation.InsertExpressionKeyFrame(1.0f, L"Vector3(20.0 / Width, 20.0 / Height, 1.0)", contractEasingFunction);
        contractAnimation.Duration(m_contractAnimationDuration);
        contractAnimation.Target(s_scaleTargetName);
        return contractAnimation;
    }());

    m_contractElevationAnimation.set([this, compositor, contractEasingFunction]()
    {
        auto const contractElevationAnimation = compositor.CreateVector3KeyFrameAnimation();
        // animating to 0.01f instead of 0.0f as work around to internal issue 26001712 which was causing text clipping.
        contractElevationAnimation.InsertExpressionKeyFrame(1.0f, L"Vector3(this.Target.Translation.X, this.Target.Translation.Y, 0.01f)", contractEasingFunction);
        contractElevationAnimation.Duration(m_contractAnimationDuration);
        contractElevationAnimation.Target(s_translationTargetName);
        return contractElevationAnimation;
    }());
}

void CreateExpandAnimation ( ) [private]

Definition at line 1596 of file TeachingTip.cpp.

{
    auto const compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();

    auto&& expandEasingFunction = [this, compositor]()
    {
        if (!m_expandEasingFunction)
        {
            auto const easingFunction = compositor.CreateCubicBezierEasingFunction(s_expandAnimationEasingCurveControlPoint1, s_expandAnimationEasingCurveControlPoint2);
            m_expandEasingFunction.set(easingFunction);
            return static_cast<winrt::CompositionEasingFunction>(easingFunction);
        }
        return m_expandEasingFunction.get();
    }();

    m_expandAnimation.set([this, compositor, expandEasingFunction]()
    {
        auto const expandAnimation = compositor.CreateVector3KeyFrameAnimation();

        auto widthToUse = s_defaultTipHeightAndWidth;
        auto heightToUse = s_defaultTipHeightAndWidth;

        if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
        {
            if ((tailOcclusionGrid.ActualWidth() != 0) && (tailOcclusionGrid.ActualHeight() != 0))
            {
                widthToUse = static_cast<float>(tailOcclusionGrid.ActualWidth());
                heightToUse = static_cast<float>(tailOcclusionGrid.ActualHeight());
            }
        }
        expandAnimation.SetScalarParameter(L"Width", widthToUse);
        expandAnimation.SetScalarParameter(L"Height", heightToUse);

        expandAnimation.InsertExpressionKeyFrame(0.0f, L"Vector3(Min(0.01, 20.0 / Width), Min(0.01, 20.0 / Height), 1.0)");
        expandAnimation.InsertKeyFrame(1.0f, { 1.0f, 1.0f, 1.0f }, expandEasingFunction);
        expandAnimation.Duration(m_expandAnimationDuration);
        expandAnimation.Target(s_scaleTargetName);
        return expandAnimation;
    }());

    m_expandElevationAnimation.set([this, compositor, expandEasingFunction]()
    {
        auto const expandElevationAnimation = compositor.CreateVector3KeyFrameAnimation();
        expandElevationAnimation.InsertExpressionKeyFrame(1.0f, L"Vector3(this.Target.Translation.X, this.Target.Translation.Y, contentElevation)", expandEasingFunction);
        expandElevationAnimation.SetScalarParameter(L"contentElevation", m_contentElevation);
        expandElevationAnimation.Duration(m_expandAnimationDuration);
        expandElevationAnimation.Target(s_translationTargetName);
        return expandElevationAnimation;
    }());
}

void CreateLightDismissIndicatorPopup ( ) [private]

Definition at line 273 of file TeachingTip.cpp.

{
    auto const popup = winrt::Popup();
    // Set XamlRoot on the popup to handle XamlIsland/AppWindow scenarios.
    popup.XamlRoot(this->XamlRoot());
    // A Popup needs contents to open, so set a child that doesn't do anything.
    auto const grid = winrt::Grid();
    popup.Child(grid);

    m_lightDismissIndicatorPopup.set(popup);
}

void CreateNewPopup ( ) [private]

Definition at line 987 of file TeachingTip.cpp.

{
    m_popupOpenedRevoker.revoke();
    m_popupClosedRevoker.revoke();

    auto const popup = winrt::Popup();
    // Set XamlRoot on the popup to handle XamlIsland/AppWindow scenarios.
    popup.XamlRoot(this->XamlRoot());

    m_popupOpenedRevoker = popup.Opened(winrt::auto_revoke, { this, &TeachingTip::OnPopupOpened });
    m_popupClosedRevoker = popup.Closed(winrt::auto_revoke, { this, &TeachingTip::OnPopupClosed });
    popup.ShouldConstrainToRootBounds(ShouldConstrainToRootBounds());
    m_popup.set(popup);
    SetPopupAutomationProperties();
    m_createNewPopupOnOpen = false;
}

std::tuple< winrt::TeachingTipPlacementMode, bool > DetermineEffectivePlacement ( ) [private]

Definition at line 1792 of file TeachingTip.cpp.

{
    // Because we do not have access to APIs to give us details about multi monitor scenarios we do not have the ability to correctly
    // Place the tip in scenarios where we have an out of root bounds tip. Since this is the case we have decided to do no special
    // calculations and return the provided value or top if auto was set. This behavior can be removed via the
    // SetReturnTopForOutOfWindowBounds test hook.
    if (!ShouldConstrainToRootBounds() && m_returnTopForOutOfWindowPlacement)
    {
        auto const placement =  GetFlowDirectionAdjustedPlacement(PreferredPlacement());
        if (placement == winrt::TeachingTipPlacementMode::Auto)
        {
            return std::make_tuple(winrt::TeachingTipPlacementMode::Top, false);
        }
        return std::make_tuple(placement, false);
    }

    if (IsOpen() && m_currentEffectiveTipPlacementMode != winrt::TeachingTipPlacementMode::Auto)
    {
        return std::make_tuple(m_currentEffectiveTipPlacementMode, false);
    }

    auto const [contentHeight, contentWidth] = [this]()
    {
        if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
        {
            double contentHeight = tailOcclusionGrid.ActualHeight();
            double contentWidth = tailOcclusionGrid.ActualWidth();
            return std::make_tuple(contentHeight, contentWidth);
        }
        return std::make_tuple(0.0, 0.0);
    }();

    if (m_target)
    {
        return DetermineEffectivePlacementTargeted(contentHeight, contentWidth);
    }
    else
    {
        return DetermineEffectivePlacementUntargeted(contentHeight, contentWidth);
    }
}

std::tuple< winrt::TeachingTipPlacementMode, bool > DetermineEffectivePlacementTargeted | ( | double | contentHight,
 |  | double | contentWidth |
 | ) |  |  | [private]

Definition at line 1834 of file TeachingTip.cpp.

{
    // These variables will track which positions the tip will fit in. They all start true and are
    // flipped to false when we find a display condition that is not met.
    enum_array <winrt::TeachingTipPlacementMode, bool, 14> availability;
    availability[winrt::TeachingTipPlacementMode::Auto] = false;
    availability[winrt::TeachingTipPlacementMode::Top] = true;
    availability[winrt::TeachingTipPlacementMode::Bottom] = true;
    availability[winrt::TeachingTipPlacementMode::Right] = true;
    availability[winrt::TeachingTipPlacementMode::Left] = true;
    availability[winrt::TeachingTipPlacementMode::TopLeft] = true;
    availability[winrt::TeachingTipPlacementMode::TopRight] = true;
    availability[winrt::TeachingTipPlacementMode::BottomLeft] = true;
    availability[winrt::TeachingTipPlacementMode::BottomRight] = true;
    availability[winrt::TeachingTipPlacementMode::LeftTop] = true;
    availability[winrt::TeachingTipPlacementMode::LeftBottom] = true;
    availability[winrt::TeachingTipPlacementMode::RightTop] = true;
    availability[winrt::TeachingTipPlacementMode::RightBottom] = true;
    availability[winrt::TeachingTipPlacementMode::Center] = true;

    const double tipHeight = contentHeight + TailShortSideLength();
    const double tipWidth = contentWidth + TailShortSideLength();

    // We try to avoid having the tail touch the HeroContent so rule out positions where this would be required
    if (HeroContent())
    {
        if (auto&& heroContentBorder = m_heroContentBorder.get())
        {
            if (auto&& nonHeroContentRootGrid = m_nonHeroContentRootGrid.get())
            {
                if (heroContentBorder.ActualHeight() > nonHeroContentRootGrid.ActualHeight() - TailLongSideActualLength())
                {
                    availability[winrt::TeachingTipPlacementMode::Left] = false;
                    availability[winrt::TeachingTipPlacementMode::Right] = false;
                }
            }
        }

        switch (HeroContentPlacement())
        {
        case winrt::TeachingTipHeroContentPlacementMode::Bottom:
            availability[winrt::TeachingTipPlacementMode::Top] = false;
            availability[winrt::TeachingTipPlacementMode::TopRight] = false;
            availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
            availability[winrt::TeachingTipPlacementMode::RightTop] = false;
            availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
            availability[winrt::TeachingTipPlacementMode::Center] = false;
            break;
        case winrt::TeachingTipHeroContentPlacementMode::Top:
            availability[winrt::TeachingTipPlacementMode::Bottom] = false;
            availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
            availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
            availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
            availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
            break;
        }
    }

    // When ShouldConstrainToRootBounds is true clippedTargetBounds == availableBoundsAroundTarget
    // We have to separate them because there are checks which care about both.
    auto const [clippedTargetBounds, availableBoundsAroundTarget] = DetermineSpaceAroundTarget();

    // If the edge of the target isn't in the window.
    if (clippedTargetBounds.Left < 0)
    {
        availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
        availability[winrt::TeachingTipPlacementMode::Left] = false;
        availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
    }
    // If the right edge of the target isn't in the window.
    if (clippedTargetBounds.Right < 0)
    {
        availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
        availability[winrt::TeachingTipPlacementMode::Right] = false;
        availability[winrt::TeachingTipPlacementMode::RightTop] = false;
    }
    // If the top edge of the target isn't in the window.
    if (clippedTargetBounds.Top < 0)
    {
        availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
        availability[winrt::TeachingTipPlacementMode::Top] = false;
        availability[winrt::TeachingTipPlacementMode::TopRight] = false;
    }
    // If the bottom edge of the target isn't in the window
    if (clippedTargetBounds.Bottom < 0)
    {
        availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
        availability[winrt::TeachingTipPlacementMode::Bottom] = false;
        availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
    }

    // If the horizontal midpoint is out of the window.
    if (clippedTargetBounds.Left < -m_currentTargetBoundsInCoreWindowSpace.Width / 2 ||
        clippedTargetBounds.Right < -m_currentTargetBoundsInCoreWindowSpace.Width / 2)
    {
        availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
        availability[winrt::TeachingTipPlacementMode::Top] = false;
        availability[winrt::TeachingTipPlacementMode::TopRight] = false;
        availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
        availability[winrt::TeachingTipPlacementMode::Bottom] = false;
        availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
        availability[winrt::TeachingTipPlacementMode::Center] = false;
    }

    // If the vertical midpoint is out of the window.
    if (clippedTargetBounds.Top < -m_currentTargetBoundsInCoreWindowSpace.Height / 2 ||
        clippedTargetBounds.Bottom < -m_currentTargetBoundsInCoreWindowSpace.Height / 2)
    {
        availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
        availability[winrt::TeachingTipPlacementMode::Left] = false;
        availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
        availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
        availability[winrt::TeachingTipPlacementMode::Right] = false;
        availability[winrt::TeachingTipPlacementMode::RightTop] = false;
        availability[winrt::TeachingTipPlacementMode::Center] = false;
    }

    // If the tip is too tall to fit between the top of the target and the top edge of the window or screen.
    if (tipHeight > availableBoundsAroundTarget.Top)
    {
        availability[winrt::TeachingTipPlacementMode::Top] = false;
        availability[winrt::TeachingTipPlacementMode::TopRight] = false;
        availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
    }
    // If the total tip is too tall to fit between the center of the target and the top of the window.
    if (tipHeight > availableBoundsAroundTarget.Top + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
    {
        availability[winrt::TeachingTipPlacementMode::Center] = false;
    }
    // If the tip is too tall to fit between the center of the target and the top edge of the window.
    if (contentHeight - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Top + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
    {
        availability[winrt::TeachingTipPlacementMode::RightTop] = false;
        availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
    }
    // If the tip is too tall to fit in the window when the tail is centered vertically on the target and the tip.
    if (contentHeight / 2.0f > availableBoundsAroundTarget.Top + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f) ||
        contentHeight / 2.0f > availableBoundsAroundTarget.Bottom + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
    {
        availability[winrt::TeachingTipPlacementMode::Right] = false;
        availability[winrt::TeachingTipPlacementMode::Left] = false;
    }
    // If the tip is too tall to fit between the center of the target and the bottom edge of the window.
    if (contentHeight - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Bottom + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
    {
        availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
        availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
    }
    // If the tip is too tall to fit between the bottom of the target and the bottom edge of the window.
    if (tipHeight > availableBoundsAroundTarget.Bottom)
    {
        availability[winrt::TeachingTipPlacementMode::Bottom] = false;
        availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
        availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
    }

    // If the tip is too wide to fit between the left edge of the target and the left edge of the window.
    if (tipWidth > availableBoundsAroundTarget.Left)
    {
        availability[winrt::TeachingTipPlacementMode::Left] = false;
        availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
        availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
    }
    // If the tip is too wide to fit between the center of the target and the left edge of the window.
    if (contentWidth - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Left + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f))
    {
        availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
        availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
    }
    // If the tip is too wide to fit in the window when the tail is centered horizontally on the target and the tip.
    if (contentWidth / 2.0f > availableBoundsAroundTarget.Left + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f) ||
        contentWidth / 2.0f > availableBoundsAroundTarget.Right + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f))
    {
        availability[winrt::TeachingTipPlacementMode::Top] = false;
        availability[winrt::TeachingTipPlacementMode::Bottom] = false;
        availability[winrt::TeachingTipPlacementMode::Center] = false;
    }
    // If the tip is too wide to fit between the center of the target and the right edge of the window.
    if (contentWidth - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Right + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f))
    {
        availability[winrt::TeachingTipPlacementMode::TopRight] = false;
        availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
    }
    // If the tip is too wide to fit between the right edge of the target and the right edge of the window.
    if (tipWidth > availableBoundsAroundTarget.Right)
    {
        availability[winrt::TeachingTipPlacementMode::Right] = false;
        availability[winrt::TeachingTipPlacementMode::RightTop] = false;
        availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
    }

    auto const wantedDirection = GetFlowDirectionAdjustedPlacement(PreferredPlacement());
    auto const priorities = GetPlacementFallbackOrder(wantedDirection);

    for (auto const mode : priorities)
    {
        if (availability[mode])
        {
            return std::make_tuple(mode, false);
        }
    }
    // The teaching tip wont fit anywhere, set tipDoesNotFit to indicate that we should not open.
    return std::make_tuple(winrt::TeachingTipPlacementMode::Top, true);
}

std::tuple< winrt::TeachingTipPlacementMode, bool > DetermineEffectivePlacementUntargeted | ( | double | contentHight,
 |  | double | contentWidth |
 | ) |  |  | [private]

Definition at line 2039 of file TeachingTip.cpp.

{
    auto const windowBounds = GetWindowBounds();
    if (!ShouldConstrainToRootBounds())
    {
        auto const screenBoundsInCoreWindowSpace = GetEffectiveScreenBoundsInCoreWindowSpace(windowBounds);
        if (screenBoundsInCoreWindowSpace.Height > contentHeight && screenBoundsInCoreWindowSpace.Width > contentWidth)
        {
            return std::make_tuple(winrt::TeachingTipPlacementMode::Bottom, false);
        }
    }
    else
    {
        auto const windowBoundsInCoreWindowSpace = GetEffectiveWindowBoundsInCoreWindowSpace(windowBounds);
        if (windowBoundsInCoreWindowSpace.Height > contentHeight && windowBoundsInCoreWindowSpace.Width > contentWidth)
        {
            return std::make_tuple(winrt::TeachingTipPlacementMode::Bottom, false);
        }
    }

    // The teaching tip doesn't fit in the window/screen set tipDoesNotFit to indicate that we should not open.
    return std::make_tuple(winrt::TeachingTipPlacementMode::Top, true);
}

std::tuple< winrt::Thickness, winrt::Thickness > DetermineSpaceAroundTarget ( ) [private]

Definition at line 2063 of file TeachingTip.cpp.

{
    auto const shouldConstrainToRootBounds = ShouldConstrainToRootBounds();

    auto const [windowBoundsInCoreWindowSpace, screenBoundsInCoreWindowSpace] = [this]()
    {
        auto const windowBounds = GetWindowBounds();
        return std::make_tuple(GetEffectiveWindowBoundsInCoreWindowSpace(windowBounds),
                               GetEffectiveScreenBoundsInCoreWindowSpace(windowBounds));
    }();

    const winrt::Thickness windowSpaceAroundTarget{
        // Target.Left - Window.Left
        static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) - /* 0 except with test window bounds */ windowBoundsInCoreWindowSpace.X,
        // Target.Top - Window.Top
        static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) - /* 0 except with test window bounds */ windowBoundsInCoreWindowSpace.Y,
        // Window.Right - Target.Right
        (static_cast<double>(windowBoundsInCoreWindowSpace.X) + windowBoundsInCoreWindowSpace.Width) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width),
        // Screen.Right - Target.Right
        (static_cast<double>(windowBoundsInCoreWindowSpace.Y) + windowBoundsInCoreWindowSpace.Height) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height) };

    const winrt::Thickness screenSpaceAroundTarget = [this, screenBoundsInCoreWindowSpace, windowSpaceAroundTarget]()
    {
        if (!ShouldConstrainToRootBounds())
        {
            return winrt::Thickness{
                // Target.Left - Screen.Left
                static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) - screenBoundsInCoreWindowSpace.X,
                // Target.Top - Screen.Top
                static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) - screenBoundsInCoreWindowSpace.Y,
                // Screen.Right - Target.Right
                (static_cast<double>(screenBoundsInCoreWindowSpace.X) + screenBoundsInCoreWindowSpace.Width) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width),
                // Screen.Bottom - Target.Bottom
                (static_cast<double>(screenBoundsInCoreWindowSpace.Y) + screenBoundsInCoreWindowSpace.Height) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height) };
        }
        return windowSpaceAroundTarget;
    }();

    return std::make_tuple(windowSpaceAroundTarget, screenSpaceAroundTarget);
}

void EstablishShadows ( ) [private]

Definition at line 2208 of file TeachingTip.cpp.

{
#ifdef TAIL_SHADOW
#ifdef DBG
    if (m_tipShadow)
    {
        auto&& tailPolygon = m_tailPolygon.get()
        if (tailPolygon && !tailPolygon.Shadow())
        {
            // This facilitates an experiment around faking a proper tail shadow, shadows are expensive though so we don't want it present for release builds.
            auto const tailShadow = winrt::Microsoft::UI::Xaml::Media::ThemeShadow{};
            tailShadow.Receivers().Append(m_target.get());
            tailPolygon.Shadow(tailShadow);
            auto const tailPolygonTranslation = tailPolygon.Translation()
            tailPolygon.Translation({ tailPolygonTranslation.x, tailPolygonTranslation.y, m_tailElevation });
        }
    }
    else
    {
        m_tailPolygon.get().Shadow(nullptr);
    }
#endif
#endif
    if (m_tipShouldHaveShadow)
    {
        if (!m_contentRootGrid.get().Shadow())
        {
            m_contentRootGrid.get().Shadow(winrt::ThemeShadow{});
            if (auto&& contentRootGrid = m_contentRootGrid.get())
            {
                const auto contentRootGridTranslation = contentRootGrid.Translation();
                contentRootGrid.Translation({ contentRootGridTranslation.x, contentRootGridTranslation.y, m_contentElevation });
            }
        }
    }
    else
    {
        m_contentRootGrid.get().Shadow(nullptr);
    }
}

winrt::TeachingTipHeroContentPlacementMode GetEffectiveHeroContentPlacement ( )

Definition at line 2460 of file TeachingTip.cpp.

{
    return m_currentHeroContentEffectivePlacementMode;
}

winrt::TeachingTipPlacementMode GetEffectivePlacement ( )

Definition at line 2455 of file TeachingTip.cpp.

{
    return m_currentEffectiveTipPlacementMode;
}

winrt::Rect GetEffectiveScreenBoundsInCoreWindowSpace ( const winrt::Rect & windowBounds ) [private]

Definition at line 2119 of file TeachingTip.cpp.

{
    if (!m_useTestScreenBounds && !ShouldConstrainToRootBounds())
    {
        MUX_ASSERT_MSG(!m_returnTopForOutOfWindowPlacement, "When returnTopForOutOfWindowPlacement is true we will never need to get the screen bounds");
        auto const displayInfo = winrt::DisplayInformation::GetForCurrentView();
        auto const scaleFactor = displayInfo.RawPixelsPerViewPixel();
        return winrt::Rect(-windowBounds.X,
            -windowBounds.Y,
            displayInfo.ScreenHeightInRawPixels() / static_cast<float>(scaleFactor),
            displayInfo.ScreenWidthInRawPixels() / static_cast<float>(scaleFactor));
    }
    return m_testScreenBoundsInCoreWindowSpace;
}

winrt::Rect GetEffectiveWindowBoundsInCoreWindowSpace ( const winrt::Rect & windowBounds ) [private]

Definition at line 2106 of file TeachingTip.cpp.

{
    if (m_useTestWindowBounds)
    {
        return m_testWindowBoundsInCoreWindowSpace;
    }
    else
    {
        return winrt::Rect{ 0, 0, windowBounds.Width, windowBounds.Height };
    }

}

winrt::TeachingTipPlacementMode GetFlowDirectionAdjustedPlacement ( const winrt::TeachingTipPlacementMode & placementMode ) [private]

Definition at line 1439 of file TeachingTip.cpp.

{
    if (FlowDirection() == winrt::FlowDirection::LeftToRight)
    {
        return placementMode;
    }
    else
    {
        switch (placementMode)
        {
            case winrt::TeachingTipPlacementMode::Auto:
                return winrt::TeachingTipPlacementMode::Auto;
            case winrt::TeachingTipPlacementMode::Left:
                return winrt::TeachingTipPlacementMode::Right;
            case winrt::TeachingTipPlacementMode::Right:
                return winrt::TeachingTipPlacementMode::Left;
            case winrt::TeachingTipPlacementMode::Top:
                return winrt::TeachingTipPlacementMode::Top;
            case winrt::TeachingTipPlacementMode::Bottom:
                return winrt::TeachingTipPlacementMode::Bottom;
            case winrt::TeachingTipPlacementMode::LeftBottom:
                return winrt::TeachingTipPlacementMode::RightBottom;
            case winrt::TeachingTipPlacementMode::LeftTop:
                return winrt::TeachingTipPlacementMode::RightTop;
            case winrt::TeachingTipPlacementMode::TopLeft:
                return winrt::TeachingTipPlacementMode::TopRight;
            case winrt::TeachingTipPlacementMode::TopRight:
                return winrt::TeachingTipPlacementMode::TopLeft;
            case winrt::TeachingTipPlacementMode::RightTop:
                return winrt::TeachingTipPlacementMode::LeftTop;
            case winrt::TeachingTipPlacementMode::RightBottom:
                return winrt::TeachingTipPlacementMode::LeftBottom;
            case winrt::TeachingTipPlacementMode::BottomRight:
                return winrt::TeachingTipPlacementMode::BottomLeft;
            case winrt::TeachingTipPlacementMode::BottomLeft:
                return winrt::TeachingTipPlacementMode::BottomRight;
            case winrt::TeachingTipPlacementMode::Center:
                return winrt::TeachingTipPlacementMode::Center;
        }
    }
    return winrt::TeachingTipPlacementMode::Auto;
}

double GetHorizontalOffset ( )

Definition at line 2465 of file TeachingTip.cpp.

{
    if (auto&& popup = m_popup.get())
    {
        return popup.HorizontalOffset();
    }
    return 0.0;
}

bool GetIsIdle ( )

Definition at line 2441 of file TeachingTip.cpp.

{
    return m_isIdle;
}

std::array< winrt::TeachingTipPlacementMode, 13 > GetPlacementFallbackOrder ( winrt::TeachingTipPlacementMode preferredPalcement ) [static, private]

Definition at line 2143 of file TeachingTip.cpp.

{
    auto priorityList = std::array<winrt::TeachingTipPlacementMode, 13>();
    priorityList[0] = winrt::TeachingTipPlacementMode::Top;
    priorityList[1] = winrt::TeachingTipPlacementMode::Bottom;
    priorityList[2] = winrt::TeachingTipPlacementMode::Left;
    priorityList[3] = winrt::TeachingTipPlacementMode::Right;
    priorityList[4] = winrt::TeachingTipPlacementMode::TopLeft;
    priorityList[5] = winrt::TeachingTipPlacementMode::TopRight;
    priorityList[6] = winrt::TeachingTipPlacementMode::BottomLeft;
    priorityList[7] = winrt::TeachingTipPlacementMode::BottomRight;
    priorityList[8] = winrt::TeachingTipPlacementMode::LeftTop;
    priorityList[9] = winrt::TeachingTipPlacementMode::LeftBottom;
    priorityList[10] = winrt::TeachingTipPlacementMode::RightTop;
    priorityList[11] = winrt::TeachingTipPlacementMode::RightBottom;
    priorityList[12] = winrt::TeachingTipPlacementMode::Center;

    if (IsPlacementBottom(preferredPlacement))
    {
        // Swap to bottom > top
        std::swap(priorityList[0], priorityList[1]);
        std::swap(priorityList[4], priorityList[6]);
        std::swap(priorityList[5], priorityList[7]);
    }
    else if (IsPlacementLeft(preferredPlacement))
    {
        // swap to lateral > vertical
        std::swap(priorityList[0], priorityList[2]);
        std::swap(priorityList[1], priorityList[3]);
        std::swap(priorityList[4], priorityList[8]);
        std::swap(priorityList[5], priorityList[9]);
        std::swap(priorityList[6], priorityList[10]);
        std::swap(priorityList[7], priorityList[11]);
    }
    else if (IsPlacementRight(preferredPlacement))
    {
        // swap to lateral > vertical
        std::swap(priorityList[0], priorityList[2]);
        std::swap(priorityList[1], priorityList[3]);
        std::swap(priorityList[4], priorityList[8]);
        std::swap(priorityList[5], priorityList[9]);
        std::swap(priorityList[6], priorityList[10]);
        std::swap(priorityList[7], priorityList[11]);

        // swap to right > left
        std::swap(priorityList[0], priorityList[1]);
        std::swap(priorityList[4], priorityList[6]);
        std::swap(priorityList[5], priorityList[7]);
    }

    //Switch the preferred placement to first.
    auto const pivot = std::find_if(priorityList.begin(),
        priorityList.end(),
        [preferredPlacement](const winrt::TeachingTipPlacementMode mode) -> bool {
            return mode == preferredPlacement;
        });
    if (pivot != priorityList.end()) {
        std::rotate(priorityList.begin(), pivot, pivot + 1);
    }

    return priorityList;
}

winrt::Visibility GetSubtitleVisibility ( )

Definition at line 2492 of file TeachingTip.cpp.

{
    if (auto&& subtitleTextBox = GetTemplateChildT<winrt::UIElement>(s_subtitleTextBoxName, *this))
    {
        return subtitleTextBox.Visibility();
    }
    return winrt::Visibility::Collapsed;
}

winrt::CornerRadius GetTeachingTipCornerRadius ( ) [private]

Definition at line 2314 of file TeachingTip.cpp.

{
    return CornerRadius();
}

winrt::Visibility GetTitleVisibility ( )

Definition at line 2483 of file TeachingTip.cpp.

{
    if (auto&& titleTextBox = GetTemplateChildT<winrt::UIElement>(s_titleTextBoxName, *this))
    {
        return titleTextBox.Visibility();
    }
    return winrt::Visibility::Collapsed;
}

double GetVerticalOffset ( )

Definition at line 2474 of file TeachingTip.cpp.

{
    if (auto&& popup = m_popup.get())
    {
        return popup.VerticalOffset();
    }
    return 0.0;
}

winrt::Rect GetWindowBounds ( ) [private]

Definition at line 2134 of file TeachingTip.cpp.

{
    if (auto const xamlRoot = this->XamlRoot())
    {
        return winrt::Rect{ 0, 0, xamlRoot.Size().Width, xamlRoot.Size().Height };
    }
    return winrt::Rect{ 0, 0, 0, 0 };
}

bool HandleF6Clicked ( bool fromPopup = false ) [private]

Definition at line 1147 of file TeachingTip.cpp.

{
    //  Logging usage telemetry
    if (m_hasF6BeenInvoked)
    {
        __RP_Marker_ClassMemberById(RuntimeProfiler::ProfId_TeachingTip, RuntimeProfiler::ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation);
    }
    else
    {
        __RP_Marker_ClassMemberById(RuntimeProfiler::ProfId_TeachingTip, RuntimeProfiler::ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation);
        m_hasF6BeenInvoked = true;
    }

    auto const hasFocusInSubtree = [this]()
    {
        if (auto const rootElement = m_rootElement.get())
        {
            auto current = [rootElement]() {
                return winrt::FocusManager::GetFocusedElement(rootElement.XamlRoot()).try_as<winrt::DependencyObject>();
            }();

            while (current)
            {
                if (current.try_as<winrt::UIElement>() == rootElement)
                {
                    return true;
                }
                current = winrt::VisualTreeHelper::GetParent(current);
            }
        }
        return false;
    }();

    if (hasFocusInSubtree && fromPopup)
    {
        bool setFocus = SetFocus(m_previouslyFocusedElement.get(), winrt::FocusState::Programmatic);
        m_previouslyFocusedElement = nullptr;
        return setFocus;
    }
    else if (!hasFocusInSubtree && !fromPopup)
    {
        if (IsLightDismissEnabled())
        {
            auto focusable = winrt::FocusManager::FindFirstFocusableElement(m_rootElement.get());
            if (focusable)
            {
                SetFocus(focusable, winrt::FocusState::Keyboard);
                return true;
            }
        }

        const winrt::Button f6Button = [this]() -> winrt::Button
        {
            auto firstButton = m_closeButton.get();
            auto secondButton = m_alternateCloseButton.get();
            //Prefer the close button to the alternate, except when there is no content.
            if (!CloseButtonContent())
            {
                std::swap(firstButton, secondButton);
            }
            if (firstButton && firstButton.Visibility() == winrt::Visibility::Visible)
            {
                return firstButton;
            }
            else if (secondButton && secondButton.Visibility() == winrt::Visibility::Visible)
            {
                return secondButton;
            }
            return nullptr;
        }();

        if (f6Button)
        {
            auto const scopedRevoker = f6Button.GettingFocus(winrt::auto_revoke, [this](auto const&, auto const& args) {
                m_previouslyFocusedElement = winrt::make_weak(args.OldFocusedElement());
                });
            const bool setFocus = f6Button.Focus(winrt::FocusState::Keyboard);
            return setFocus;
        }
    }
    return false;
}

void IsOpenChangedToClose ( ) [private]

Definition at line 960 of file TeachingTip.cpp.

{
    if (auto&& popup = m_popup.get())
    {
        if (popup.IsOpen())
        {
            // We are about to begin the process of trying to close the teaching tip, so notify that we are no longer idle.
            SetIsIdle(false);
            RaiseClosingEvent(true);
        }
        else
        {
            // We have become not Open but our popup was already not open. Lets make sure the idle status is correct.
            if (!m_isExpandAnimationPlaying && !m_isContractAnimationPlaying)
            {
                SetIsIdle(true);
            }
        }
    }

    m_acceleratorKeyActivatedRevoker.revoke();
    m_previewKeyDownForF6Revoker.revoke();
    m_popupPreviewKeyDownForF6Revoker.revoke();
    m_currentEffectiveTipPlacementMode = winrt::TeachingTipPlacementMode::Auto;
    TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
}

void IsOpenChangedToOpen ( ) [private]

Definition at line 833 of file TeachingTip.cpp.

{
    //Reset the close reason to the default value of programmatic.
    m_lastCloseReason = winrt::TeachingTipCloseReason::Programmatic;

    m_currentBoundsInCoreWindowSpace = this->TransformToVisual(nullptr).TransformBounds({
        0.0,
        0.0,
        static_cast<float>(this->ActualWidth()),
        static_cast<float>(this->ActualHeight())
        });

    m_currentTargetBoundsInCoreWindowSpace = [this]()
    {
        if (auto&& target = m_target.get())
        {
            SetViewportChangedEvent(gsl::make_strict_not_null(target));
            return target.TransformToVisual(nullptr).TransformBounds({
                0.0,
                0.0,
                static_cast<float>(target.as<winrt::FrameworkElement>().ActualWidth()),
                static_cast<float>(target.as<winrt::FrameworkElement>().ActualHeight())
                });
        }
        return winrt::Rect{ 0,0,0,0 };
    }();

    if (!m_lightDismissIndicatorPopup)
    {
        CreateLightDismissIndicatorPopup();
    }
    OnIsLightDismissEnabledChanged();

    if (!m_contractAnimation)
    {
        CreateContractAnimation();
    }
    if (!m_expandAnimation)
    {
        CreateExpandAnimation();
    }

    //If the developer defines their TeachingTip in a resource dictionary it is possible that it's template will have never been applied
    if (!m_isTemplateApplied)
    {
        this->ApplyTemplate();
    }

    if (!m_popup || m_createNewPopupOnOpen)
    {
        CreateNewPopup();
    }

    // If the tip is not going to open because it does not fit we need to make sure that
    // the open, closing, closed life cycle still fires so that we don't cause apps to leak
    // that depend on this sequence.
    auto const [ignored, tipDoesNotFit] = DetermineEffectivePlacement();
    if (tipDoesNotFit)
    {
        __RP_Marker_ClassMemberById(RuntimeProfiler::ProfId_TeachingTip, RuntimeProfiler::ProfMemberId_TeachingTip_TipDidNotOpenDueToSize);
        RaiseClosingEvent(false);
        auto const closedArgs = winrt::make_self<TeachingTipClosedEventArgs>();
        closedArgs->Reason(m_lastCloseReason);
        m_closedEventSource(*this, *closedArgs);
        IsOpen(false);
    }
    else
    {
        if (auto&& popup = m_popup.get())
        {
            if (!popup.IsOpen())
            {
                // We are about to begin the process of trying to open the teaching tip, so notify that we are no longer idle.
                SetIsIdle(false);
                UpdatePopupRequestedTheme();
                popup.Child(m_rootElement.get());
                if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
                {
                    lightDismissIndicatorPopup.IsOpen(true);
                }
                popup.IsOpen(true);
                if (SharedHelpers::IsAnimationsEnabled())
                {
                    StartExpandToOpen();
                }
                else
                {
                    // We won't be playing an animation so we're immediately idle.
                    SetIsIdle(true);
                }
            }
            else
            {
                // We have become Open but our popup was already open. This can happen when a close is canceled by the closing event, so make sure the idle status is correct.
                if (!m_isExpandAnimationPlaying && !m_isContractAnimationPlaying)
                {
                    SetIsIdle(true);
                }
            }
        }
    }

    [this]()
    {
        if (auto const xamlRoot = XamlRoot())
        {
            if (auto const content = xamlRoot.Content())
            {
                m_previewKeyDownForF6Revoker = content.PreviewKeyDown(winrt::auto_revoke, { this, &TeachingTip::OnF6PreviewKeyDownClicked });
                return;
            }
        }

        // TODO: We do not have direct analogue for AcceleratorKeyActivated with DispatcherQueue in Islands/ win32. Please refer Task# 30013704 for  more details.
        if (auto coreWindow = winrt::CoreWindow::GetForCurrentThread())
        {
            m_acceleratorKeyActivatedRevoker = Dispatcher().AcceleratorKeyActivated(winrt::auto_revoke, { this, &TeachingTip::OnF6AcceleratorKeyClicked });
        }

        return;
    }();

    // Make sure we are in the correct VSM state after ApplyTemplate and moving the template content from the Control to the Popup:
    OnIsLightDismissEnabledChanged();
}

static bool constexpr IsPlacementBottom ( winrt::TeachingTipPlacementMode placement ) [inline, static, private]

Definition at line 244 of file TeachingTip.h.

                                                                                {
        return placement == winrt::TeachingTipPlacementMode::Bottom ||
            placement == winrt::TeachingTipPlacementMode::BottomLeft ||
            placement == winrt::TeachingTipPlacementMode::BottomRight;
    }

static bool constexpr IsPlacementLeft ( winrt::TeachingTipPlacementMode placement ) [inline, static, private]

Definition at line 249 of file TeachingTip.h.

                                                                                {
        return placement == winrt::TeachingTipPlacementMode::Left ||
            placement == winrt::TeachingTipPlacementMode::LeftTop ||
            placement == winrt::TeachingTipPlacementMode::LeftBottom;
    }

static bool constexpr IsPlacementRight ( winrt::TeachingTipPlacementMode placement ) [inline, static, private]

Definition at line 254 of file TeachingTip.h.

                                                                                {
        return placement == winrt::TeachingTipPlacementMode::Right ||
            placement == winrt::TeachingTipPlacementMode::RightTop ||
            placement == winrt::TeachingTipPlacementMode::RightBottom;
    }

static bool constexpr IsPlacementTop ( winrt::TeachingTipPlacementMode placement ) [inline, static, private]

Definition at line 239 of file TeachingTip.h.

                                                                                {
        return placement == winrt::TeachingTipPlacementMode::Top ||
            placement == winrt::TeachingTipPlacementMode::TopLeft ||
            placement == winrt::TeachingTipPlacementMode::TopRight;
    }

winrt::Thickness LeftEdgePlacementTopLeftHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 271 of file TeachingTip.h.

{ return { (TopLeftCornerRadius() - 1.0), 1, (TopRightCornerRadius() - 2.0), 0 }; }

double MinimumTipEdgeToTailCenter ( ) [private]

Definition at line 2298 of file TeachingTip.cpp.

{
    if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
    {
        if (auto&& tailPolygon = m_tailPolygon.get())
        {
            return tailOcclusionGrid.ColumnDefinitions().Size() > 1 ?
                tailOcclusionGrid.ColumnDefinitions().GetAt(0).ActualWidth() +
                tailOcclusionGrid.ColumnDefinitions().GetAt(1).ActualWidth() +
                (std::max(tailPolygon.ActualHeight(), tailPolygon.ActualWidth()) / 2)
                : 0.0;
        }
    }
    return 0;
}

double MinimumTipEdgeToTailEdgeMargin ( ) [private]

Definition at line 2287 of file TeachingTip.cpp.

{
    if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
    {
        return tailOcclusionGrid.ColumnDefinitions().Size() > 1 ?
            tailOcclusionGrid.ColumnDefinitions().GetAt(1).ActualWidth() + s_tailOcclusionAmount
            : 0.0;
    }
    return 0;
}

void OnActionButtonClicked | ( | const winrt::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]

Definition at line 1247 of file TeachingTip.cpp.

{
    m_actionButtonClickEventSource(*this, nullptr);
}

void OnApplyTemplate ( )

Definition at line 39 of file TeachingTip.cpp.

{
    base_type::OnApplyTemplate();

    m_acceleratorKeyActivatedRevoker.revoke();
    m_previewKeyDownForF6Revoker.revoke();
    m_effectiveViewportChangedRevoker.revoke();
    m_contentSizeChangedRevoker.revoke();
    m_closeButtonClickedRevoker.revoke();
    m_alternateCloseButtonClickedRevoker.revoke();
    m_actionButtonClickedRevoker.revoke();

    winrt::IControlProtected controlProtected{ *this };

    m_container.set(GetTemplateChildT<winrt::Border>(s_containerName, controlProtected));
    m_rootElement.set(m_container.get().Child());
    m_tailOcclusionGrid.set(GetTemplateChildT<winrt::Grid>(s_tailOcclusionGridName, controlProtected));
    m_contentRootGrid.set(GetTemplateChildT<winrt::Grid>(s_contentRootGridName, controlProtected));
    m_nonHeroContentRootGrid.set(GetTemplateChildT<winrt::Grid>(s_nonHeroContentRootGridName, controlProtected));
    m_heroContentBorder.set(GetTemplateChildT<winrt::Border>(s_heroContentBorderName, controlProtected));
    m_actionButton.set(GetTemplateChildT<winrt::Button>(s_actionButtonName, controlProtected));
    m_alternateCloseButton.set(GetTemplateChildT<winrt::Button>(s_alternateCloseButtonName, controlProtected));
    m_closeButton.set(GetTemplateChildT<winrt::Button>(s_closeButtonName, controlProtected));
    m_tailEdgeBorder.set(GetTemplateChildT<winrt::Grid>(s_tailEdgeBorderName, controlProtected));
    m_tailPolygon.set(GetTemplateChildT<winrt::Polygon>(s_tailPolygonName, controlProtected));
    ToggleVisibilityForEmptyContent(c_TitleTextBlockVisibleStateName, c_TitleTextBlockCollapsedStateName, Title());
    ToggleVisibilityForEmptyContent(c_SubtitleTextBlockVisibleStateName, c_SubtitleTextBlockCollapsedStateName, Subtitle());

    if (auto&& container = m_container.get())
    {
        container.Child(nullptr);
    }

    m_contentSizeChangedRevoker = [this]()
    {
        if (auto && tailOcclusionGrid = m_tailOcclusionGrid.get())
        {
            return tailOcclusionGrid.SizeChanged(winrt::auto_revoke, { this, &TeachingTip::OnContentSizeChanged });
        }
        return winrt::FrameworkElement::SizeChanged_revoker{};
    }();

    if (auto&& contentRootGrid = m_contentRootGrid.get())
    {
        winrt::AutomationProperties::SetLocalizedLandmarkType(contentRootGrid, ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipCustomLandmarkName));
    }

    m_closeButtonClickedRevoker = [this]()
    {
        if (auto&& closeButton = m_closeButton.get())
        {
            return closeButton.Click(winrt::auto_revoke, { this, &TeachingTip::OnCloseButtonClicked });
        }
        return winrt::Button::Click_revoker{};
    }();

    m_alternateCloseButtonClickedRevoker = [this]()
    {
        if (auto&& alternateCloseButton = m_alternateCloseButton.get())
        {
            winrt::AutomationProperties::SetName(alternateCloseButton, ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipAlternateCloseButtonName));
            winrt::ToolTip tooltip = winrt::ToolTip();
            tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipAlternateCloseButtonTooltip)));
            winrt::ToolTipService::SetToolTip(alternateCloseButton, tooltip);
            return alternateCloseButton.Click(winrt::auto_revoke, { this, &TeachingTip::OnCloseButtonClicked });
        }
        return winrt::Button::Click_revoker{};
    }();

    m_actionButtonClickedRevoker = [this]()
    {
        if (auto&& actionButton = m_actionButton.get())
        {
            return actionButton.Click(winrt::auto_revoke, { this, &TeachingTip::OnActionButtonClicked });
        }
        return winrt::Button::Click_revoker{};
    }();

    UpdateButtonsState();
    OnIsLightDismissEnabledChanged();
    OnIconSourceChanged();
    OnHeroContentPlacementChanged();

    UpdateButtonAutomationProperties(m_actionButton.get(), ActionButtonContent());
    UpdateButtonAutomationProperties(m_closeButton.get(), CloseButtonContent());

    EstablishShadows();

    m_isTemplateApplied = true;
}

void OnAutomationIdChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 1235 of file TeachingTip.cpp.

{
    SetPopupAutomationProperties();
}

void OnAutomationNameChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 1230 of file TeachingTip.cpp.

{
    SetPopupAutomationProperties();
}

void OnCloseButtonClicked | ( | const winrt::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]

Definition at line 1240 of file TeachingTip.cpp.

{
    m_closeButtonClickEventSource(*this, nullptr);
    m_lastCloseReason = winrt::TeachingTipCloseReason::CloseButton;
    IsOpen(false);
}

void OnContentChanged | ( | const winrt::IInspectable & | oldContent,
 |  | const winrt::IInspectable & | newContent
 | ) |  |

Definition at line 239 of file TeachingTip.cpp.

{
    if (newContent)
    {
        winrt::VisualStateManager::GoToState(*this, L"Content"sv, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"NoContent"sv, false);
    }
}

void OnContentSizeChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1094 of file TeachingTip.cpp.

{
    UpdateSizeBasedTemplateSettings();
    // Reset the currentEffectivePlacementMode so that the tail will be updated for the new size as well.
    m_currentEffectiveTipPlacementMode = winrt::TeachingTipPlacementMode::Auto;
    TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
    if (IsOpen())
    {
        PositionPopup();
    }
    if (auto&& expandAnimation = m_expandAnimation.get())
    {
        expandAnimation.SetScalarParameter(L"Width", args.NewSize().Width);
        expandAnimation.SetScalarParameter(L"Height", args.NewSize().Height);
    }
    if (auto&& contractAnimation = m_contractAnimation.get())
    {
        contractAnimation.SetScalarParameter(L"Width", args.NewSize().Width);
        contractAnimation.SetScalarParameter(L"Height", args.NewSize().Height);
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 34 of file TeachingTip.cpp.

{
    return winrt::make<TeachingTipAutomationPeer>(*this);
}

void OnF6AcceleratorKeyClicked | ( | const winrt::CoreDispatcher & | ,
 |  | const winrt::AcceleratorKeyEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1116 of file TeachingTip.cpp.

{
    if (!args.Handled() &&
        IsOpen() &&
        args.VirtualKey() == winrt::VirtualKey::F6 &&
        args.EventType() == winrt::CoreAcceleratorKeyEventType::KeyDown)
    {
        args.Handled(HandleF6Clicked());
    }
}

void OnF6PopupPreviewKeyDownClicked | ( | const winrt::IInspectable & | ,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1137 of file TeachingTip.cpp.

{
    if (!args.Handled() &&
        IsOpen() &&
        args.Key() == winrt::VirtualKey::F6)
    {
        args.Handled(HandleF6Clicked(/*fromPopup*/true));
    }
}

void OnF6PreviewKeyDownClicked | ( | const winrt::IInspectable & | ,
 |  | const winrt::KeyRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 1127 of file TeachingTip.cpp.

{
    if (!args.Handled() &&
        IsOpen() &&
        args.Key() == winrt::VirtualKey::F6)
    {
        args.Handled(HandleF6Clicked());
    }
}

void OnHeroContentPlacementChanged ( ) [private]

Definition at line 1069 of file TeachingTip.cpp.

{
    switch (HeroContentPlacement())
    {
    case winrt::TeachingTipHeroContentPlacementMode::Auto:
        break;
    case winrt::TeachingTipHeroContentPlacementMode::Top:
        UpdateDynamicHeroContentPlacementToTopImpl();
        break;
    case winrt::TeachingTipHeroContentPlacementMode::Bottom:
        UpdateDynamicHeroContentPlacementToBottomImpl();
        break;
    }

    // Setting m_currentEffectiveTipPlacementMode to auto ensures that the next time position popup is called we'll rerun the DetermineEffectivePlacement
    // algorithm. If we did not do this and the popup was opened the algorithm would maintain the current effective placement mode, which we don't want
    // since the hero content placement contributes to the choice of tip placement mode.
    m_currentEffectiveTipPlacementMode = winrt::TeachingTipPlacementMode::Auto;
    TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
    if (IsOpen())
    {
        PositionPopup();
    }
}

void OnIconSourceChanged ( ) [private]

Definition at line 1009 of file TeachingTip.cpp.

{
    auto const templateSettings = winrt::get_self<::TeachingTipTemplateSettings>(TemplateSettings());
    if (auto const source = IconSource())
    {
        templateSettings->IconElement(SharedHelpers::MakeIconElementFrom(source));
        winrt::VisualStateManager::GoToState(*this, L"Icon"sv, false);
    }
    else
    {
        templateSettings->IconElement(nullptr);
        winrt::VisualStateManager::GoToState(*this, L"NoIcon"sv, false);
    }
}

void OnIsLightDismissEnabledChanged ( ) [private]

Definition at line 1032 of file TeachingTip.cpp.

{
    if (IsLightDismissEnabled())
    {
        winrt::VisualStateManager::GoToState(*this, L"LightDismiss"sv, false);
        if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
        {
            lightDismissIndicatorPopup.IsLightDismissEnabled(true);
            m_lightDismissIndicatorPopupClosedRevoker = lightDismissIndicatorPopup.Closed(winrt::auto_revoke, { this, &TeachingTip::OnLightDismissIndicatorPopupClosed });
            m_lightDismissIndicatorPopupPreviewKeyDownForF6Revoker = lightDismissIndicatorPopup.PreviewKeyDown(winrt::auto_revoke, { this, &TeachingTip::OnF6PreviewKeyDownClicked });
        }
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"NormalDismiss"sv, false);
        if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
        {
            lightDismissIndicatorPopup.IsLightDismissEnabled(false);
        }
        m_lightDismissIndicatorPopupClosedRevoker.revoke();
        m_lightDismissIndicatorPopupPreviewKeyDownForF6Revoker.revoke();
    }
    UpdateButtonsState();
}

void OnIsOpenChanged ( ) [private]

Definition at line 804 of file TeachingTip.cpp.

{
    if (m_ignoreNextIsOpenChanged) {
        m_ignoreNextIsOpenChanged = false;
    }
    else
    {
        SharedHelpers::QueueCallbackForCompositionRendering([strongThis = get_strong()]()
        {
            if (strongThis->m_isIdle) {
                if (strongThis->IsOpen())
                {
                    strongThis->IsOpenChangedToOpen();
                }
                else
                {
                    strongThis->IsOpenChangedToClose();
                }
                TeachingTipTestHooks::NotifyOpenedStatusChanged(*strongThis);
            }
            else
            {
                strongThis->m_ignoreNextIsOpenChanged = true;
                strongThis->IsOpen(!strongThis->IsOpen());
            }
        });
    }
}

void OnLightDismissIndicatorPopupClosed | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 1351 of file TeachingTip.cpp.

{
    if (IsOpen())
    {
        m_lastCloseReason = winrt::TeachingTipCloseReason::LightDismiss;
    }
    IsOpen(false);
}

void OnPlacementMarginChanged ( ) [private]

Definition at line 1024 of file TeachingTip.cpp.

{
    if (IsOpen())
    {
        PositionPopup();
    }
}

void OnPopupClosed | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 1315 of file TeachingTip.cpp.

{
    m_xamlRootChangedRevoker.revoke();
    if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
    {
        lightDismissIndicatorPopup.IsOpen(false);
    }
    if (auto&& popup = m_popup.get())
    {
        popup.Child(nullptr);
    }
    auto const myArgs = winrt::make_self<TeachingTipClosedEventArgs>();

    myArgs->Reason(m_lastCloseReason);
    m_closedEventSource(*this, *myArgs);

    //If we were closed by the close button and we have tracked a previously focused element because F6 was used
    //To give the tip focus, then we return focus when the popup closes.
    if (m_lastCloseReason == winrt::TeachingTipCloseReason::CloseButton)
    {
        SetFocus(m_previouslyFocusedElement.get(), winrt::FocusState::Programmatic);
    }
    m_previouslyFocusedElement = nullptr;

    if (auto const teachingTipPeer = winrt::FrameworkElementAutomationPeer::FromElement(*this).try_as<winrt::TeachingTipAutomationPeer>())
    {
        winrt::get_self<TeachingTipAutomationPeer>(teachingTipPeer)->RaiseWindowClosedEvent();
    }
}

void OnPopupOpened | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 1252 of file TeachingTip.cpp.

{
    if (auto xamlRoot = this->XamlRoot())
    {
        m_currentXamlRootSize = xamlRoot.Size();
        m_xamlRootChangedRevoker = xamlRoot.Changed(winrt::auto_revoke, { this, &TeachingTip::XamlRootChanged });

        if (auto&& popup = m_popup.get())
        {
            if (auto const popupContent = popup.Child())
            {
                // This handler is not required for Winui3 because the framework bug this works around has been fixed.
                m_popupPreviewKeyDownForF6Revoker = popupContent.PreviewKeyDown(winrt::auto_revoke, { this, &TeachingTip::OnF6PopupPreviewKeyDownClicked });
            }
        }
    }

    if (auto const teachingTipPeer = winrt::FrameworkElementAutomationPeer::FromElement(*this).try_as<winrt::TeachingTipAutomationPeer>())
    {
        auto const notificationString = [this]()
        {
            auto const appName = []()
            {
                try
                {
                    if (const auto package = winrt::ApplicationModel::Package::Current())
                    {
                        return package.DisplayName();
                    }
                }
                catch (...) {}

                return winrt::hstring{};
            }();

            if (!appName.empty())
            {
                return StringUtil::FormatString(
                    ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipNotification),
                    appName.data(),
                    winrt::AutomationProperties::GetName(m_popup.get()).data());
            }
            else
            {
                return StringUtil::FormatString(
                    ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipNotificationWithoutAppName),
                    winrt::AutomationProperties::GetName(m_popup.get()).data());
            }
        }();

        winrt::get_self<TeachingTipAutomationPeer>(teachingTipPeer)->RaiseWindowOpenedEvent(notificationString);
    }

    if(IsLightDismissEnabled())
    {
        auto focusable = winrt::FocusManager::FindFirstFocusableElement(m_rootElement.get());
        if (focusable)
        {
            SetFocus(focusable, winrt::FocusState::Programmatic);
        }
    }
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 131 of file TeachingTip.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_IsOpenProperty)
    {
        OnIsOpenChanged();
    }
    else if (property == s_TargetProperty)
    {
        // Unregister from old target if it exists
        if (args.OldValue()) {
            m_TargetUnloadedRevoker.revoke();
        }

        // Register to new target if it exists
        if (const auto& value = args.NewValue()) {
            winrt::FrameworkElement newTarget = unbox_value<winrt::FrameworkElement >(value);
            m_TargetUnloadedRevoker = newTarget.Unloaded(winrt::auto_revoke, { this,&TeachingTip::ClosePopupOnUnloadEvent });
        }
        OnTargetChanged();
    }
    else if (property == s_PlacementMarginProperty)
    {
        OnPlacementMarginChanged();
    }
    else if (property == s_IsLightDismissEnabledProperty)
    {
        OnIsLightDismissEnabledChanged();
    }
    else if (property == s_ShouldConstrainToRootBoundsProperty)
    {
        OnShouldConstrainToRootBoundsChanged();
    }
    else if (property == s_TailVisibilityProperty)
    {
        OnTailVisibilityChanged();
    }
    else if (property == s_PreferredPlacementProperty)
    {
        if (IsOpen())
        {
            PositionPopup();
        }
    }
    else if (property == s_HeroContentPlacementProperty)
    {
        OnHeroContentPlacementChanged();
    }
    else if (property == s_IconSourceProperty)
    {
        OnIconSourceChanged();
    }
    else if (property == s_TitleProperty)
    {
        SetPopupAutomationProperties();
        if (ToggleVisibilityForEmptyContent(c_TitleTextBlockVisibleStateName, c_TitleTextBlockCollapsedStateName, Title()))
        {
            TeachingTipTestHooks::NotifyTitleVisibilityChanged(*this);
        }
    }
    else if (property == s_SubtitleProperty)
    {
        if (ToggleVisibilityForEmptyContent(c_SubtitleTextBlockVisibleStateName, c_SubtitleTextBlockCollapsedStateName, Subtitle()))
        {
            TeachingTipTestHooks::NotifySubtitleVisibilityChanged(*this);
        }
    }
    else if (property == s_ActionButtonContentProperty)
    {
        UpdateButtonsState();
        winrt::IInspectable value = args.NewValue();
        UpdateButtonAutomationProperties(m_actionButton.get(), value);
    }
    else if (property == s_CloseButtonContentProperty)
    {
        UpdateButtonsState();
        winrt::IInspectable value = args.NewValue();
        UpdateButtonAutomationProperties(m_closeButton.get(), value);
    }

}

void OnPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static, private]

Definition at line 2257 of file TeachingTip.cpp.

{
    winrt::get_self<TeachingTip>(sender.as<winrt::TeachingTip>())->OnPropertyChanged(args);
}

void OnShouldConstrainToRootBoundsChanged ( ) [private]

Definition at line 1057 of file TeachingTip.cpp.

{
    // ShouldConstrainToRootBounds is a property that can only be set on a popup before it is opened.
    // If we have opened the tip's popup and then this property changes we will need to discard the old popup
    // and replace it with a new popup.  This variable indicates this state.

    if (m_popup.get())
    {
        m_createNewPopupOnOpen = true;
    }
}

void OnTailVisibilityChanged ( ) [private]

Definition at line 1004 of file TeachingTip.cpp.

{
    UpdateTail();
}

void OnTargetChanged ( ) [private]

Definition at line 1482 of file TeachingTip.cpp.

{
    m_targetEffectiveViewportChangedRevoker.revoke();
    m_targetLoadedRevoker.revoke();

    auto const target = Target();
    m_target.set(target);

    bool isTargetLoaded = false;

    if (target)
    {
        // We need to check if the target is loaded before registering for its
        // loaded event. This is because the act of registering for the loaded event
        // will cause the target to report that it is not loaded.
        isTargetLoaded = target.IsLoaded();
        m_targetLoadedRevoker = target.Loaded(winrt::auto_revoke, { this, &TeachingTip::OnTargetLoaded });
    }

    if (IsOpen())
    {
        if (target && isTargetLoaded)
        {
            m_currentTargetBoundsInCoreWindowSpace = target.TransformToVisual(nullptr).TransformBounds({
                0.0,
                0.0,
                static_cast<float>(target.ActualWidth()),
                static_cast<float>(target.ActualHeight())
                });
            SetViewportChangedEvent(gsl::make_strict_not_null(target));
        }

        // if we have a target that is not yet loaded, skip positioning the flayout for now, that will happen once the target loads.
        if (!target || (target && isTargetLoaded))
        {
            PositionPopup();
        }
    }
}

void OnTargetLayoutUpdated | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 1591 of file TeachingTip.cpp.

{
    RepositionPopup();
}

void OnTargetLoaded | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]

Definition at line 1586 of file TeachingTip.cpp.

{
    RepositionPopup();
}

static winrt::Thickness constexpr OtherPlacementTopRightHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, static, private]

Definition at line 264 of file TeachingTip.h.

{ return { 0, 0, 0, 0 }; }

void PositionPopup ( ) [private]

Definition at line 444 of file TeachingTip.cpp.

{
    bool tipDoesNotFit = false;
    if (m_target)
    {
        tipDoesNotFit = PositionTargetedPopup();
    }
    else
    {
        tipDoesNotFit = PositionUntargetedPopup();
    }
    if (tipDoesNotFit)
    {
        IsOpen(false);
    }

    TeachingTipTestHooks::NotifyOffsetChanged(*this);
}

bool PositionTargetedPopup ( ) [private]

Definition at line 463 of file TeachingTip.cpp.

{
    const bool tipDoesNotFit = UpdateTail();
    auto const offset = PlacementMargin();

    auto const [tipHeight, tipWidth] = [this]()
    {
        if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
        {
            auto const tipHeight = tailOcclusionGrid.ActualHeight();
            auto const tipWidth = tailOcclusionGrid.ActualWidth();
            return std::make_tuple(tipHeight, tipWidth);
        }
        return std::make_tuple(0.0, 0.0);
    }();

    if (auto&& popup = m_popup.get())
    {
        // Depending on the effective placement mode of the tip we use a combination of the tip's size, the target's position within the app, the target's
        // size, and the target offset property to determine the appropriate vertical and horizontal offsets of the popup that the tip is contained in.
        switch (m_currentEffectiveTipPlacementMode)
        {
        case winrt::TeachingTipPlacementMode::Top:
            popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y - tipHeight - offset.Top);
            popup.HorizontalOffset((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width - tipWidth) / 2.0));
            break;

        case winrt::TeachingTipPlacementMode::Bottom:
            popup.VerticalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height + offset.Bottom);
            popup.HorizontalOffset((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width - tipWidth) / 2.0));
            break;

        case winrt::TeachingTipPlacementMode::Left:
            popup.VerticalOffset(((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height - tipHeight) / 2.0);
            popup.HorizontalOffset(m_currentTargetBoundsInCoreWindowSpace.X - tipWidth - offset.Left);
            break;

        case winrt::TeachingTipPlacementMode::Right:
            popup.VerticalOffset(((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height - tipHeight) / 2.0);
            popup.HorizontalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width + offset.Right);
            break;

        case winrt::TeachingTipPlacementMode::TopRight:
            popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y - tipHeight - offset.Top);
            popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - MinimumTipEdgeToTailCenter()));
            break;

        case winrt::TeachingTipPlacementMode::TopLeft:
            popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y - tipHeight - offset.Top);
            popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - tipWidth + MinimumTipEdgeToTailCenter()));
            break;

        case winrt::TeachingTipPlacementMode::BottomRight:
            popup.VerticalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height + offset.Bottom);
            popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - MinimumTipEdgeToTailCenter()));
            break;

        case winrt::TeachingTipPlacementMode::BottomLeft:
            popup.VerticalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height + offset.Bottom);
            popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - tipWidth + MinimumTipEdgeToTailCenter()));
            break;

        case winrt::TeachingTipPlacementMode::LeftTop:
            popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - tipHeight + MinimumTipEdgeToTailCenter());
            popup.HorizontalOffset(m_currentTargetBoundsInCoreWindowSpace.X - tipWidth - offset.Left);
            break;

        case winrt::TeachingTipPlacementMode::LeftBottom:
            popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - MinimumTipEdgeToTailCenter());
            popup.HorizontalOffset(m_currentTargetBoundsInCoreWindowSpace.X - tipWidth - offset.Left);
            break;

        case winrt::TeachingTipPlacementMode::RightTop:
            popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - tipHeight + MinimumTipEdgeToTailCenter());
            popup.HorizontalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width + offset.Right);
            break;

        case winrt::TeachingTipPlacementMode::RightBottom:
            popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - MinimumTipEdgeToTailCenter());
            popup.HorizontalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width + offset.Right);
            break;

        case winrt::TeachingTipPlacementMode::Center:
            popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0) - tipHeight - offset.Top);
            popup.HorizontalOffset((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width - tipWidth) / 2.0));
            break;

        default:
            MUX_FAIL_FAST();
        }
    }
    return tipDoesNotFit;
}

bool PositionUntargetedPopup ( ) [private]

Definition at line 557 of file TeachingTip.cpp.

{
    auto const windowBoundsInCoreWindowSpace = GetEffectiveWindowBoundsInCoreWindowSpace(GetWindowBounds());

    auto const [finalTipHeight, finalTipWidth] = [this]()
    {
        if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
        {
            auto const finalTipHeight = tailOcclusionGrid.ActualHeight();
            auto const finalTipWidth = tailOcclusionGrid.ActualWidth();
            return std::make_tuple(finalTipHeight, finalTipWidth);
        }
        return std::make_tuple(0.0, 0.0);
    }();

    const bool tipDoesNotFit = UpdateTail();

    auto const offset = PlacementMargin();

    // Depending on the effective placement mode of the tip we use a combination of the tip's size, the window's size, and the target
    // offset property to determine the appropriate vertical and horizontal offsets of the popup that the tip is contained in.
    if (auto&& popup = m_popup.get())
    {
        switch (GetFlowDirectionAdjustedPlacement(PreferredPlacement()))
        {
        case winrt::TeachingTipPlacementMode::Auto:
        case winrt::TeachingTipPlacementMode::Bottom:
            popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.X, windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Left, offset.Right));
            break;

        case winrt::TeachingTipPlacementMode::Top:
            popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
            popup.HorizontalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.X, windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Left, offset.Right));
            break;

        case winrt::TeachingTipPlacementMode::Left:
            popup.VerticalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.Y, windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Top, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
            break;

        case winrt::TeachingTipPlacementMode::Right:
            popup.VerticalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.Y, windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Top, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
            break;

        case winrt::TeachingTipPlacementMode::TopRight:
            popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
            popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
            break;

        case winrt::TeachingTipPlacementMode::TopLeft:
            popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
            popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
            break;

        case winrt::TeachingTipPlacementMode::BottomRight:
            popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
            break;

        case winrt::TeachingTipPlacementMode::BottomLeft:
            popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
            break;

        case winrt::TeachingTipPlacementMode::LeftTop:
            popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
            popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
            break;

        case winrt::TeachingTipPlacementMode::LeftBottom:
            popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
            break;

        case winrt::TeachingTipPlacementMode::RightTop:
            popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
            popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
            break;

        case winrt::TeachingTipPlacementMode::RightBottom:
            popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
            break;

        case winrt::TeachingTipPlacementMode::Center:
            popup.VerticalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.Y, windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Top, offset.Bottom));
            popup.HorizontalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.X, windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Left, offset.Right));
            break;

        default:
            MUX_FAIL_FAST();
        }
    }

    return tipDoesNotFit;
}

void RaiseClosingEvent ( bool attachDeferralCompletedHandler ) [private]

Definition at line 1360 of file TeachingTip.cpp.

{
    auto const args = winrt::make_self<TeachingTipClosingEventArgs>();
    args->Reason(m_lastCloseReason);

    if (attachDeferralCompletedHandler)
    {
        winrt::Deferral instance{ [strongThis = get_strong(), args]()
            {
                strongThis->CheckThread();
                if (!args->Cancel())
                {
                    strongThis->ClosePopupWithAnimationIfAvailable();
                }
                else
                {
                    // The developer has changed the Cancel property to true, indicating that they wish to Cancel the
                    // closing of this tip, so we need to revert the IsOpen property to true.
                    strongThis->IsOpen(true);
                }
            }
        };

        args->SetDeferral(instance);

        args->IncrementDeferralCount();
        m_closingEventSource(*this, *args);
        args->DecrementDeferralCount();
    }
    else
    {
        m_closingEventSource(*this, *args);
    }
}

void RepositionPopup ( ) [private]

Definition at line 1552 of file TeachingTip.cpp.

{
    if (IsOpen())
    {
        auto const newTargetBounds = [this]()
        {
            if (auto&& target = m_target.get())
            {
                return target.TransformToVisual(nullptr).TransformBounds({
                    0.0,
                    0.0,
                    static_cast<float>(target.as<winrt::FrameworkElement>().ActualWidth()),
                    static_cast<float>(target.as<winrt::FrameworkElement>().ActualHeight())
                    });
            }
            return winrt::Rect{};
        }();

        auto const newCurrentBounds = this->TransformToVisual(nullptr).TransformBounds({
            0.0,
            0.0,
            static_cast<float>(this->ActualWidth()),
            static_cast<float>(this->ActualHeight())
            });

        if (newTargetBounds != m_currentTargetBoundsInCoreWindowSpace || newCurrentBounds != m_currentBoundsInCoreWindowSpace)
        {
            m_currentBoundsInCoreWindowSpace = newCurrentBounds;
            m_currentTargetBoundsInCoreWindowSpace = newTargetBounds;
            PositionPopup();
        }
    }
}

void RevokeViewportChangedEvent ( ) [private]

Definition at line 1531 of file TeachingTip.cpp.

{
    m_targetEffectiveViewportChangedRevoker.revoke();
    m_effectiveViewportChangedRevoker.revoke();
}

winrt::Thickness RightEdgePlacementTopLeftHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 272 of file TeachingTip.h.

{ return { (TopLeftCornerRadius() - 2.0), 1, (TopRightCornerRadius() - 1.0), 0 }; }

void SetContentElevation ( float elevation )

Definition at line 2343 of file TeachingTip.cpp.

{
    m_contentElevation = elevation;

    if (auto&& contentRootGrid = m_contentRootGrid.get())
    {
        auto const contentRootGridTranslation = contentRootGrid.Translation();
        m_contentRootGrid.get().Translation({ contentRootGridTranslation.x, contentRootGridTranslation.y, m_contentElevation });
    }
    if (m_expandElevationAnimation)
    {
        m_expandElevationAnimation.get().SetScalarParameter(L"contentElevation", m_contentElevation);
    }
}

void SetContractAnimationDuration ( const winrt::TimeSpan & contractAnimationDuration )

Definition at line 2428 of file TeachingTip.cpp.

{
    m_contractAnimationDuration = contractAnimationDuration;
    if (auto&& contractAnimation = m_contractAnimation.get())
    {
        contractAnimation.Duration(m_contractAnimationDuration);
    }
    if (auto&& contractElevationAnimation = m_contractElevationAnimation.get())
    {
        contractElevationAnimation.Duration(m_contractAnimationDuration);
    }
}

void SetContractEasingFunction ( const winrt::CompositionEasingFunction & easingFunction )

Definition at line 2328 of file TeachingTip.cpp.

{
    m_contractEasingFunction.set(easingFunction);
    CreateContractAnimation();
}

void SetExpandAnimationDuration ( const winrt::TimeSpan & expandAnimationDuration )

Definition at line 2415 of file TeachingTip.cpp.

{
    m_expandAnimationDuration = expandAnimationDuration;
    if (auto&& expandAnimation = m_expandAnimation.get())
    {
        expandAnimation.Duration(m_expandAnimationDuration);
    }
    if (auto&& expandElevationAnimation = m_expandElevationAnimation.get())
    {
        expandElevationAnimation.Duration(m_expandAnimationDuration);
    }
}

void SetExpandEasingFunction ( const winrt::CompositionEasingFunction & easingFunction )

Definition at line 2322 of file TeachingTip.cpp.

{
    m_expandEasingFunction.set(easingFunction);
    CreateExpandAnimation();
}

void SetIsIdle ( bool isIdle )

Definition at line 2446 of file TeachingTip.cpp.

{
    if (m_isIdle != isIdle)
    {
        m_isIdle = isIdle;
        TeachingTipTestHooks::NotifyIdleStatusChanged(*this);
    }
}

void SetPopupAutomationProperties ( ) [private]

Definition at line 251 of file TeachingTip.cpp.

{
    if (auto&& popup = m_popup.get())
    {
        auto name = winrt::AutomationProperties::GetName(*this);
        if (name.empty())
        {
            name = Title();
        }
        winrt::AutomationProperties::SetName(popup, name);

        winrt::AutomationProperties::SetAutomationId(popup, winrt::AutomationProperties::GetAutomationId(*this));
    }
}

void SetReturnTopForOutOfWindowPlacement ( bool useScreenBoundsForAutoPlacement )

Definition at line 2410 of file TeachingTip.cpp.

{
    m_returnTopForOutOfWindowPlacement = returnTopForOutOfWindowPlacement;
}

void SetTailElevation ( float elevation )

Definition at line 2358 of file TeachingTip.cpp.

{
    m_tailElevation = elevation;
    if (m_tailPolygon)
    {
        if (auto&& tailPolygon = m_tailPolygon.get())
        {
            auto const tailPolygonTranslation = tailPolygon.Translation();
            tailPolygon.Translation({ tailPolygonTranslation.x, tailPolygonTranslation.y, m_tailElevation });
        }
    }
}

void SetTestScreenBounds ( const winrt::Rect & testScreenBounds )

Definition at line 2386 of file TeachingTip.cpp.

{
    m_testScreenBoundsInCoreWindowSpace = testScreenBounds;
}

void SetTestWindowBounds ( const winrt::Rect & testWindowBounds )

Definition at line 2376 of file TeachingTip.cpp.

{
    m_testWindowBoundsInCoreWindowSpace = testWindowBounds;
}

void SetTipFollowsTarget ( bool tipFollowsTarget )

Definition at line 2391 of file TeachingTip.cpp.

{
    if (m_tipFollowsTarget != tipFollowsTarget)
    {
        m_tipFollowsTarget = tipFollowsTarget;
        if (tipFollowsTarget)
        {
            if (auto&& target = m_target.get())
            {
                SetViewportChangedEvent(gsl::make_strict_not_null(target));
            }
        }
        else
        {
            RevokeViewportChangedEvent();
        }
    }
}

void SetTipShouldHaveShadow ( bool tipShadow )

Definition at line 2334 of file TeachingTip.cpp.

{
    if (m_tipShouldHaveShadow != tipShouldHaveShadow)
    {
        m_tipShouldHaveShadow = tipShouldHaveShadow;
        EstablishShadows();
    }
}

void SetUseTestScreenBounds ( bool useTestScreenBounds )

Definition at line 2381 of file TeachingTip.cpp.

{
    m_useTestScreenBounds = useTestScreenBounds;
}

void SetUseTestWindowBounds ( bool useTestWindowBounds )

Definition at line 2371 of file TeachingTip.cpp.

{
    m_useTestWindowBounds = useTestWindowBounds;
}

void SetViewportChangedEvent ( const gsl::strict_not_null< winrt::FrameworkElement > & target ) [private]

Definition at line 1522 of file TeachingTip.cpp.

{
    if (m_tipFollowsTarget)
    {
        m_targetEffectiveViewportChangedRevoker = target.get().EffectiveViewportChanged(winrt::auto_revoke, { this, &TeachingTip::OnTargetLayoutUpdated });
        m_effectiveViewportChangedRevoker = this->EffectiveViewportChanged(winrt::auto_revoke, { this, &TeachingTip::OnTargetLayoutUpdated });
    }
}

void StartContractToClose ( ) [private]

Definition at line 1746 of file TeachingTip.cpp.

{
    if (!m_contractAnimation)
    {
        CreateContractAnimation();
    }

    auto const scopedBatch = [this]()
    {
        auto const scopedBatch = winrt::CompositionTarget::GetCompositorForCurrentThread().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
        if (auto&& contractAnimation = m_contractAnimation.get())
        {
            if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
            {
                tailOcclusionGrid.StartAnimation(contractAnimation);
                m_isContractAnimationPlaying = true;
            }
            if (auto&& tailEdgeBorder = m_tailEdgeBorder.get())
            {
                tailEdgeBorder.StartAnimation(contractAnimation);
                m_isContractAnimationPlaying = true;
            }
        }
        if (auto&& contractElevationAnimation = m_contractElevationAnimation.get())
        {
            if (auto&& contentRootGrid = m_contentRootGrid.get())
            {
                contentRootGrid.StartAnimation(contractElevationAnimation);
                m_isContractAnimationPlaying = true;
            }
        }
        return scopedBatch;
    }();
    scopedBatch.End();

    scopedBatch.Completed([strongThis = get_strong()](auto, auto)
    {
        strongThis->m_isContractAnimationPlaying = false;
        strongThis->ClosePopup();
        if (!strongThis->m_isExpandAnimationPlaying)
        {
            strongThis->SetIsIdle(true);
        }
    });
}

void StartExpandToOpen ( ) [private]

Definition at line 1694 of file TeachingTip.cpp.

{
    if (!m_expandAnimation)
    {
        CreateExpandAnimation();
    }

    auto const scopedBatch = [this]()
    {
        auto const scopedBatch = winrt::CompositionTarget::GetCompositorForCurrentThread().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);

        if (auto&& expandAnimation = m_expandAnimation.get())
        {
            if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
            {
                tailOcclusionGrid.StartAnimation(expandAnimation);
                m_isExpandAnimationPlaying = true;
            }
            if (auto&& tailEdgeBorder = m_tailEdgeBorder.get())
            {
                tailEdgeBorder.StartAnimation(expandAnimation);
                m_isExpandAnimationPlaying = true;
            }
        }
        if (auto&& expandElevationAnimation = m_expandElevationAnimation.get())
        {
            if (auto&& contentRootGrid = m_contentRootGrid.get())
            {
                contentRootGrid.StartAnimation(expandElevationAnimation);
                m_isExpandAnimationPlaying = true;
            }
        }
        return scopedBatch;
    }();
    scopedBatch.End();

    scopedBatch.Completed([strongThis = get_strong()](auto, auto)
    {
        strongThis->m_isExpandAnimationPlaying = false;
        if (!strongThis->m_isContractAnimationPlaying)
        {
            strongThis->SetIsIdle(true);
        }
    });

    // Under normal circumstances we would have launched an animation just now, if we did not then we should make sure that the idle state is correct
    if (!m_isExpandAnimationPlaying && !m_isContractAnimationPlaying)
    {
        SetIsIdle(true);
    }
}

double TailLongSideActualLength ( ) [private]

Definition at line 2264 of file TeachingTip.cpp.

{
    if (auto&& tailPolygon = m_tailPolygon.get())
    {
        return std::max(tailPolygon.ActualHeight(), tailPolygon.ActualWidth());
    }
    return 0;
}

double TailLongSideLength ( ) [private]

Definition at line 2273 of file TeachingTip.cpp.

{
    return TailLongSideActualLength() - (2 * static_cast<double>(s_tailOcclusionAmount));
}

double TailShortSideLength ( ) [private]

Definition at line 2278 of file TeachingTip.cpp.

{
    if (auto&& tailPolygon = m_tailPolygon.get())
    {
        return std::min(tailPolygon.ActualHeight(), tailPolygon.ActualWidth()) - s_tailOcclusionAmount;
    }
    return 0;
}

bool ToggleVisibilityForEmptyContent | ( | const wstring_view | visibleStateName,
 |  | const wstring_view | collapsedStateName,
 |  | const winrt::hstring & | content |
 | ) |  |  | [private]

Definition at line 223 of file TeachingTip.cpp.

{

    if (content != L"")
    {
        winrt::VisualStateManager::GoToState(*this, visibleStateName, false);
        return true;
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, collapsedStateName, false);
        return true;
    }
    return false;
}

winrt::Thickness TopEdgePlacementTopLeftHighlightMargin | ( | double | width,
 |  | double | height |
 | ) |  |  | [inline, private]

Definition at line 269 of file TeachingTip.h.

{ return { (TopLeftCornerRadius() - 1.0), 1, (TopRightCornerRadius() - 1.0), 0 }; }

double TopLeftCornerRadius ( ) [inline, private]

Definition at line 171 of file TeachingTip.h.

{ return GetTeachingTipCornerRadius().TopLeft; }

double TopRightCornerRadius ( ) [inline, private]

Definition at line 172 of file TeachingTip.h.

{ return GetTeachingTipCornerRadius().TopRight; }

void TrySetCenterPoint | ( | const winrt::IUIElement & | element,
 |  | const winrt::float3 & | centerPoint |
 | ) |  |  | [private]

Definition at line 2249 of file TeachingTip.cpp.

{
    if (element)
    {
        element.CenterPoint(centerPoint);
    }
}

static double constexpr UntargetedTipCenterPlacementOffset | ( | float | nearWindowCoordinateInCoreWindowSpace,
 |  | float | farWindowCoordinateInCoreWindowSpace,
 |  | double | tipSize,
 |  | double | nearOffset,
 |  | double | farOffset |
 | ) |  |  | [inline, static, private]

Definition at line 275 of file TeachingTip.h.

{ return ((static_cast<double>(nearWindowCoordinateInCoreWindowSpace) + static_cast<double>(farWindowCoordinateInCoreWindowSpace)) / 2)  - (tipSize / 2) + nearOffset - farOffset; }

static double constexpr UntargetedTipFarPlacementOffset | ( | float | farWindowCoordinateInCoreWindowSpace,
 |  | double | tipSize,
 |  | double | offset |
 | ) |  |  | [inline, static, private]

Definition at line 274 of file TeachingTip.h.

{ return farWindowCoordinateInCoreWindowSpace - (tipSize + s_untargetedTipWindowEdgeMargin + offset); }

static double constexpr UntargetedTipNearPlacementOffset | ( | float | nearWindowCoordinateInCoreWindowSpace,
 |  | double | offset |
 | ) |  |  | [inline, static, private]

Definition at line 276 of file TeachingTip.h.

{ return static_cast<double>(s_untargetedTipWindowEdgeMargin) + nearWindowCoordinateInCoreWindowSpace + offset; }

void UpdateButtonAutomationProperties | ( | const winrt::Button | button,
 |  | const winrt::IInspectable | content |
 | ) |  |  | [private]

Definition at line 214 of file TeachingTip.cpp.

{
    if (button)
    {
        winrt::hstring nameHString = SharedHelpers::TryGetStringRepresentationFromObject(content);
        winrt::AutomationProperties::SetName(button, nameHString);
    }
}

void UpdateButtonsState ( ) [private]

Definition at line 731 of file TeachingTip.cpp.

{
    auto const actionContent = ActionButtonContent();
    auto const closeContent = CloseButtonContent();
    const bool isLightDismiss = IsLightDismissEnabled();
    if (actionContent && closeContent)
    {
        winrt::VisualStateManager::GoToState(*this, L"BothButtonsVisible"sv, false);
        winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
    }
    else if (actionContent && isLightDismiss)
    {
        winrt::VisualStateManager::GoToState(*this, L"ActionButtonVisible"sv, false);
        winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
    }
    else if (actionContent)
    {
        winrt::VisualStateManager::GoToState(*this, L"ActionButtonVisible"sv, false);
        winrt::VisualStateManager::GoToState(*this, L"HeaderCloseButton"sv, false);
    }
    else if (closeContent)
    {
        winrt::VisualStateManager::GoToState(*this, L"CloseButtonVisible"sv, false);
        winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
    }
    else if (isLightDismiss)
    {
        winrt::VisualStateManager::GoToState(*this, L"NoButtonsVisible"sv, false);
        winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"NoButtonsVisible"sv, false);
        winrt::VisualStateManager::GoToState(*this, L"HeaderCloseButton"sv, false);
    }
}

void UpdateDynamicHeroContentPlacementToBottom ( ) [private]

Definition at line 786 of file TeachingTip.cpp.

{
    if (HeroContentPlacement() == winrt::TeachingTipHeroContentPlacementMode::Auto)
    {
        UpdateDynamicHeroContentPlacementToBottomImpl();
    }
}

void UpdateDynamicHeroContentPlacementToBottomImpl ( ) [private]

Definition at line 794 of file TeachingTip.cpp.

{
    winrt::VisualStateManager::GoToState(*this, L"HeroContentBottom"sv, false);
    if (m_currentHeroContentEffectivePlacementMode != winrt::TeachingTipHeroContentPlacementMode::Bottom)
    {
        m_currentHeroContentEffectivePlacementMode = winrt::TeachingTipHeroContentPlacementMode::Bottom;
        TeachingTipTestHooks::NotifyEffectiveHeroContentPlacementChanged(*this);
    }
}

void UpdateDynamicHeroContentPlacementToTop ( ) [private]

Definition at line 768 of file TeachingTip.cpp.

{
    if (HeroContentPlacement() == winrt::TeachingTipHeroContentPlacementMode::Auto)
    {
        UpdateDynamicHeroContentPlacementToTopImpl();
    }
}

void UpdateDynamicHeroContentPlacementToTopImpl ( ) [private]

Definition at line 776 of file TeachingTip.cpp.

{
    winrt::VisualStateManager::GoToState(*this, L"HeroContentTop"sv, false);
    if (m_currentHeroContentEffectivePlacementMode != winrt::TeachingTipHeroContentPlacementMode::Top)
    {
        m_currentHeroContentEffectivePlacementMode = winrt::TeachingTipHeroContentPlacementMode::Top;
        TeachingTipTestHooks::NotifyEffectiveHeroContentPlacementChanged(*this);
    }
}

void UpdatePopupRequestedTheme ( ) [private]

Definition at line 2501 of file TeachingTip.cpp.

{
    // The way that TeachingTip reparents its content tree breaks ElementTheme calculations. Hook up a listener to
    // ActualTheme on the TeachingTip and then set the Popup's RequestedTheme to match when it changes.

    if (!m_actualThemeChangedRevoker)
    {
        m_actualThemeChangedRevoker = this->ActualThemeChanged(winrt::auto_revoke,
            [this](auto&&, auto&&) { UpdatePopupRequestedTheme(); });
    }

    if (auto && popup = m_popup.get())
    {
        popup.RequestedTheme(this->ActualTheme());
    }
}

void UpdateSizeBasedTemplateSettings ( ) [private]

Definition at line 656 of file TeachingTip.cpp.

{
    auto const templateSettings = winrt::get_self<::TeachingTipTemplateSettings>(TemplateSettings());
    auto const [width, height] = [this]()
    {
        if (auto&& contentRootGrid = m_contentRootGrid.get())
        {
            auto const width = contentRootGrid.ActualWidth();
            auto const height = contentRootGrid.ActualHeight();
            return std::make_tuple(width, height);
        }
        return std::make_tuple(0.0, 0.0);
    }();

    switch (m_currentEffectiveTailPlacementMode)
    {
    case winrt::TeachingTipPlacementMode::Top:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::Bottom:
        templateSettings->TopRightHighlightMargin(BottomPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(BottomPlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::Left:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(LeftEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::Right:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(RightEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::TopLeft:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::TopRight:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::BottomLeft:
        templateSettings->TopRightHighlightMargin(BottomLeftPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(BottomLeftPlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::BottomRight:
        templateSettings->TopRightHighlightMargin(BottomRightPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(BottomRightPlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::LeftTop:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(LeftEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::LeftBottom:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(LeftEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::RightTop:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(RightEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::RightBottom:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(RightEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::Auto:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    case winrt::TeachingTipPlacementMode::Center:
        templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
        templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
        break;
    }
}

bool UpdateTail ( ) [private]

Definition at line 285 of file TeachingTip.cpp.

{
    // An effective placement of auto indicates that no tail should be shown.
    auto const [placement, tipDoesNotFit] = DetermineEffectivePlacement();
    m_currentEffectiveTailPlacementMode = placement;
    const auto tailVisibility = TailVisibility();
    if (tailVisibility == winrt::TeachingTipTailVisibility::Collapsed || (!m_target && tailVisibility != winrt::TeachingTipTailVisibility::Visible))
    {
        m_currentEffectiveTailPlacementMode = winrt::TeachingTipPlacementMode::Auto;
    }

    if (placement != m_currentEffectiveTipPlacementMode)
    {
        m_currentEffectiveTipPlacementMode = placement;
        TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
    }

    auto&& nullableTailOcclusionGrid = m_tailOcclusionGrid.get();

    auto const height = nullableTailOcclusionGrid ? static_cast<float>(nullableTailOcclusionGrid.ActualHeight()) : 0;
    auto const width = nullableTailOcclusionGrid ? static_cast<float>(nullableTailOcclusionGrid.ActualWidth()) : 0;

    auto const [firstColumnWidth, secondColumnWidth, nextToLastColumnWidth, lastColumnWidth] = [this, nullableTailOcclusionGrid]()
    {
        if (auto const columnDefinitions = nullableTailOcclusionGrid ? nullableTailOcclusionGrid.ColumnDefinitions() : nullptr)
        {
            auto const firstColumnWidth = columnDefinitions.Size() > 0 ? static_cast<float>(columnDefinitions.GetAt(0).ActualWidth()) : 0.0f;
            auto const secondColumnWidth = columnDefinitions.Size() > 1 ? static_cast<float>(columnDefinitions.GetAt(1).ActualWidth()) : 0.0f;
            auto const nextToLastColumnWidth = columnDefinitions.Size() > 1 ? static_cast<float>(columnDefinitions.GetAt(columnDefinitions.Size() - 2).ActualWidth()) : 0.0f;
            auto const lastColumnWidth = columnDefinitions.Size() > 0 ? static_cast<float>(columnDefinitions.GetAt(columnDefinitions.Size() - 1).ActualWidth()) : 0.0f;

            return std::make_tuple(firstColumnWidth, secondColumnWidth, nextToLastColumnWidth, lastColumnWidth);
        }
        return std::make_tuple(0.0f, 0.0f, 0.0f, 0.0f);
    }();

    auto const [firstRowHeight, secondRowHeight, nextToLastRowHeight, lastRowHeight] = [this, nullableTailOcclusionGrid]()
    {
        if (auto const rowDefinitions = nullableTailOcclusionGrid ? nullableTailOcclusionGrid.RowDefinitions() : nullptr)
        {
            auto const firstRowHeight = rowDefinitions.Size() > 0 ? static_cast<float>(rowDefinitions.GetAt(0).ActualHeight()) : 0.0f;
            auto const secondRowHeight = rowDefinitions.Size() > 1 ? static_cast<float>(rowDefinitions.GetAt(1).ActualHeight()) : 0.0f;
            auto const nextToLastRowHeight = rowDefinitions.Size() > 1 ? static_cast<float>(rowDefinitions.GetAt(rowDefinitions.Size() - 2).ActualHeight()) : 0.0f;
            auto const lastRowHeight = rowDefinitions.Size() > 0 ? static_cast<float>(rowDefinitions.GetAt(rowDefinitions.Size() - 1).ActualHeight()) : 0.0f;

            return std::make_tuple(firstRowHeight, secondRowHeight, nextToLastRowHeight, lastRowHeight);
        }
        return std::make_tuple(0.0f, 0.0f, 0.0f, 0.0f);
    }();

    UpdateSizeBasedTemplateSettings();

    switch (m_currentEffectiveTailPlacementMode)
    {
    // An effective placement of auto means the tip should not display a tail.
    case winrt::TeachingTipPlacementMode::Auto:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, height / 2, 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"Untargeted"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::Top:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, height - lastRowHeight, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { (width / 2) - firstColumnWidth, 0.0f, 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"Top"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::Bottom:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, firstRowHeight, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { (width / 2) - firstColumnWidth, 0.0f, 0.0f });
        UpdateDynamicHeroContentPlacementToBottom();
        winrt::VisualStateManager::GoToState(*this, L"Bottom"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::Left:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width - lastColumnWidth, (height / 2), 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, (height / 2) - firstRowHeight, 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"Left"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::Right:
        TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth, height / 2, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, (height / 2) - firstRowHeight, 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"Right"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::TopRight:
        TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth + secondColumnWidth + 1, height - lastRowHeight, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { secondColumnWidth, 0.0f, 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"TopRight"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::TopLeft:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width - (nextToLastColumnWidth + lastColumnWidth + 1), height - lastRowHeight, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { width - (nextToLastColumnWidth + firstColumnWidth + lastColumnWidth), 0.0f, 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"TopLeft"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::BottomRight:
        TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth + secondColumnWidth + 1, firstRowHeight, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { secondColumnWidth, 0.0f, 0.0f });
        UpdateDynamicHeroContentPlacementToBottom();
        winrt::VisualStateManager::GoToState(*this, L"BottomRight"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::BottomLeft:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width - (nextToLastColumnWidth + lastColumnWidth + 1), firstRowHeight, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { width - (nextToLastColumnWidth + firstColumnWidth + lastColumnWidth), 0.0f, 0.0f });
        UpdateDynamicHeroContentPlacementToBottom();
        winrt::VisualStateManager::GoToState(*this, L"BottomLeft"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::LeftTop:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width - lastColumnWidth,  height - (nextToLastRowHeight + lastRowHeight + 1), 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f,  height - (nextToLastRowHeight + firstRowHeight + lastRowHeight), 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"LeftTop"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::LeftBottom:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width - lastColumnWidth, (firstRowHeight + secondRowHeight + 1), 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, secondRowHeight, 0.0f });
        UpdateDynamicHeroContentPlacementToBottom();
        winrt::VisualStateManager::GoToState(*this, L"LeftBottom"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::RightTop:
        TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth, height - (nextToLastRowHeight + lastRowHeight + 1), 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, height - (nextToLastRowHeight + firstRowHeight + lastRowHeight), 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"RightTop"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::RightBottom:
        TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth, (firstRowHeight + secondRowHeight + 1), 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, secondRowHeight, 0.0f });
        UpdateDynamicHeroContentPlacementToBottom();
        winrt::VisualStateManager::GoToState(*this, L"RightBottom"sv, false);
        break;

    case winrt::TeachingTipPlacementMode::Center:
        TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, height - lastRowHeight, 0.0f });
        TrySetCenterPoint(m_tailEdgeBorder.get(), { (width / 2) - firstColumnWidth, 0.0f, 0.0f });
        UpdateDynamicHeroContentPlacementToTop();
        winrt::VisualStateManager::GoToState(*this, L"Center"sv, false);
        break;

    default:
        break;
    }

    return tipDoesNotFit;
}

void XamlRootChanged | ( | const winrt::XamlRoot & | xamlRoot,
 |  | const winrt::XamlRootChangedEventArgs & |  |
 | ) |  |  | [private]

Definition at line 1537 of file TeachingTip.cpp.

{
    // Reposition popup when target has finished determining its own position.
    SharedHelpers::QueueCallbackForCompositionRendering(
        [strongThis = get_strong(),xamlRootSize = xamlRoot.Size()](){
            if (xamlRootSize != strongThis->m_currentXamlRootSize)
            {
                strongThis->m_currentXamlRootSize = xamlRootSize;
                strongThis->RepositionPopup();
            }
        }
    );

}

Friends And Related Function Documentation

friend class TeachingTipTestHooks [friend]

Definition at line 57 of file TeachingTip.h.

Member Data Documentation

winrt::FrameworkElement::Unloaded_revoker m_TargetUnloadedRevoker [private]

Definition at line 139 of file TeachingTip.h.

constexpr float s_defaultTipHeightAndWidth = 320 [static, private]

Definition at line 311 of file TeachingTip.h.

constexpr float s_tailOcclusionAmount = 2 [static, private]

Definition at line 314 of file TeachingTip.h.

constexpr float s_untargetedTipWindowEdgeMargin = 24 [static, private]

Definition at line 310 of file TeachingTip.h.

The documentation for this class was generated from the following files:
  • TeachingTip/TeachingTip.h
  • TeachingTip/TeachingTip.cpp
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TeachingTipAutomationPeer Class Reference

#include "TeachingTipAutomationPeer.h"

Inherits ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider >.

List of all members.

Public Member Functions

TeachingTipAutomationPeer (winrt::TeachingTip const &owner)
void | Close ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
winrt::WindowInteractionState | InteractionState ()
bool | IsModal ()
bool | IsTopmost ()
bool | Maximizable ()
bool | Minimizable ()
void | RaiseWindowClosedEvent ()
void | RaiseWindowOpenedEvent (wstring_view const &displayString)
void | SetVisualState (winrt::WindowVisualState state)
winrt::WindowVisualState | VisualState ()
bool | WaitForInputIdle (int32_t milliseconds)

Private Member Functions

winrt::TeachingTip | GetTeachingTip ()

Detailed Description

Definition at line 8 of file TeachingTipAutomationPeer.h.

Constructor & Destructor Documentation

TeachingTipAutomationPeer ( winrt::TeachingTip const & owner )

Definition at line 13 of file TeachingTipAutomationPeer.cpp.

                                                                                : ReferenceTracker(owner)
{
}

Member Function Documentation

void Close ( )

Definition at line 80 of file TeachingTipAutomationPeer.cpp.

{
    winrt::get_self<TeachingTip>(GetTeachingTip())->IsOpen(false);
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 17 of file TeachingTipAutomationPeer.cpp.

{
    if (winrt::get_self<TeachingTip>(GetTeachingTip())->IsLightDismissEnabled())
    {
        return winrt::AutomationControlType::Window;
    }
    else
    {
        return winrt::AutomationControlType::Pane;
    }
}

winrt::hstring GetClassNameCore ( )

Definition at line 29 of file TeachingTipAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::TeachingTip>();
}

winrt::TeachingTip GetTeachingTip ( ) [private]

Definition at line 123 of file TeachingTipAutomationPeer.cpp.

{
    winrt::UIElement owner = Owner();
    return owner.as<winrt::TeachingTip>();
}

winrt::WindowInteractionState InteractionState ( )

Definition at line 34 of file TeachingTipAutomationPeer.cpp.

{
    auto teachingTip = winrt::get_self<TeachingTip>(GetTeachingTip());
    if (teachingTip->m_isIdle && teachingTip->IsOpen())
    {
        return winrt::WindowInteractionState::ReadyForUserInteraction;
    }
    else if (teachingTip->m_isIdle && !teachingTip->IsOpen())
    {
        return winrt::WindowInteractionState::BlockedByModalWindow;
    }
    else if (!teachingTip->m_isIdle && !teachingTip->IsOpen())
    {
        return winrt::WindowInteractionState::Closing;
    }
    else
    {
        return winrt::WindowInteractionState::Running;
    }
}

bool IsModal ( )

Definition at line 55 of file TeachingTipAutomationPeer.cpp.

{
    return winrt::get_self<TeachingTip>(GetTeachingTip())->IsLightDismissEnabled();
}

bool IsTopmost ( )

Definition at line 60 of file TeachingTipAutomationPeer.cpp.

{
    return winrt::get_self<TeachingTip>(GetTeachingTip())->IsOpen();
}

bool Maximizable ( )

Definition at line 65 of file TeachingTipAutomationPeer.cpp.

{
    return false;
}

bool Minimizable ( )

Definition at line 70 of file TeachingTipAutomationPeer.cpp.

{
    return false;
}

void RaiseWindowClosedEvent ( )

Definition at line 95 of file TeachingTipAutomationPeer.cpp.

{
    // We only report as a window when light dismiss is enabled.
    if (winrt::get_self<TeachingTip>(GetTeachingTip())->IsLightDismissEnabled() &&
        winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::WindowClosed))
    {
        RaiseAutomationEvent(winrt::AutomationEvents::WindowClosed);
    }
}

void RaiseWindowOpenedEvent ( wstring_view const & displayString )

Definition at line 105 of file TeachingTipAutomationPeer.cpp.

{
    if (winrt::IAutomationPeer automationPeer = *this)
    {
        automationPeer.RaiseNotificationEvent(winrt::Automation::Peers::AutomationNotificationKind::Other,
            winrt::Peers::AutomationNotificationProcessing::CurrentThenMostRecent,
            displayString,
            L"TeachingTipOpenedActivityId");
    }

    // We only report as a window when light dismiss is enabled.
    if (winrt::get_self<TeachingTip>(GetTeachingTip())->IsLightDismissEnabled() &&
        winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::WindowOpened))
    {
        RaiseAutomationEvent(winrt::AutomationEvents::WindowOpened);
    }
}

void SetVisualState ( winrt::WindowVisualState state )

Definition at line 85 of file TeachingTipAutomationPeer.cpp.

{

}

winrt::WindowVisualState VisualState ( )

Definition at line 75 of file TeachingTipAutomationPeer.cpp.

{
    return winrt::WindowVisualState::Normal;
}

bool WaitForInputIdle ( int32_t milliseconds )

Definition at line 90 of file TeachingTipAutomationPeer.cpp.

{
    return true;
}

The documentation for this class was generated from the following files:
  • TeachingTip/TeachingTipAutomationPeer.h
  • TeachingTip/TeachingTipAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipClosedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TeachingTipClosedEventArgs Class Reference

#include "TeachingTipClosedEventArgs.h"

List of all members.

Public Member Functions

winrt::TeachingTipCloseReason | Reason ()
void | Reason (const winrt::TeachingTipCloseReason &reason)

Detailed Description

Definition at line 8 of file TeachingTipClosedEventArgs.h.

Member Function Documentation

winrt::TeachingTipCloseReason Reason ( )

Definition at line 8 of file TeachingTipClosedEventArgs.cpp.

{
    return m_reason;
}

void Reason ( const winrt::TeachingTipCloseReason & reason )

Definition at line 13 of file TeachingTipClosedEventArgs.cpp.

{
    m_reason = reason;
}

The documentation for this class was generated from the following files:
  • TeachingTip/TeachingTipClosedEventArgs.h
  • TeachingTip/TeachingTipClosedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipClosingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TeachingTipClosingEventArgs Class Reference

#include "TeachingTipClosingEventArgs.h"

Inherits ReferenceTracker< TeachingTipClosingEventArgs, winrt::implementation::TeachingTipClosingEventArgsT, winrt::composable, winrt::composing >.

List of all members.

Public Member Functions

bool | Cancel ()
void | Cancel (const bool cancel)
void | DecrementDeferralCount ()
winrt::Deferral | GetDeferral ()
void | IncrementDeferralCount ()
void | Reason (const winrt::TeachingTipCloseReason &reason)
winrt::TeachingTipCloseReason | Reason ()
void | SetDeferral (const winrt::Deferral &deferral)

Detailed Description

Definition at line 9 of file TeachingTipClosingEventArgs.h.

Member Function Documentation

bool Cancel ( )

Definition at line 18 of file TeachingTipClosingEventArgs.cpp.

{
    return m_cancel;
}

void Cancel ( const bool cancel )

Definition at line 23 of file TeachingTipClosingEventArgs.cpp.

{
    m_cancel = cancel;
}

void DecrementDeferralCount ( )

Definition at line 48 of file TeachingTipClosingEventArgs.cpp.

{
    MUX_ASSERT(m_deferralCount > 0);
    m_deferralCount--;
    if (m_deferralCount == 0)
    {
        m_deferral.get().Complete();
    }
}

winrt::Deferral GetDeferral ( )

Definition at line 28 of file TeachingTipClosingEventArgs.cpp.

{
    m_deferralCount++;

    com_ptr<TeachingTipClosingEventArgs> strongThis = get_strong();

    winrt::Deferral instance{ [strongThis]()
    {
        strongThis->CheckThread();
        strongThis->DecrementDeferralCount();
    }
    };
    return instance;
}

void IncrementDeferralCount ( )

Definition at line 58 of file TeachingTipClosingEventArgs.cpp.

{
    m_deferralCount++;
}

void Reason ( const winrt::TeachingTipCloseReason & reason )

Definition at line 13 of file TeachingTipClosingEventArgs.cpp.

{
    m_reason = reason;
}

winrt::TeachingTipCloseReason Reason ( )

Definition at line 8 of file TeachingTipClosingEventArgs.cpp.

{
    return m_reason;
}

void SetDeferral ( const winrt::Deferral & deferral )

Definition at line 43 of file TeachingTipClosingEventArgs.cpp.

{
    m_deferral.set(deferral);
}

The documentation for this class was generated from the following files:
  • TeachingTip/TeachingTipClosingEventArgs.h
  • TeachingTip/TeachingTipClosingEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

TeachingTipProperties Class Reference

#include "TeachingTip.properties.h"

Inherited by TeachingTip.

List of all members.

Public Member Functions

TeachingTipProperties ()
winrt::event_token | ActionButtonClick (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
void | ActionButtonClick (winrt::event_token const &token)
void | ActionButtonCommand (winrt::ICommand const &value)
winrt::ICommand | ActionButtonCommand ()
void | ActionButtonCommandParameter (winrt::IInspectable const &value)
winrt::IInspectable | ActionButtonCommandParameter ()
void | ActionButtonContent (winrt::IInspectable const &value)
winrt::IInspectable | ActionButtonContent ()
void | ActionButtonStyle (winrt::Style const &value)
winrt::Style | ActionButtonStyle ()
winrt::event_token | CloseButtonClick (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
void | CloseButtonClick (winrt::event_token const &token)
void | CloseButtonCommand (winrt::ICommand const &value)
winrt::ICommand | CloseButtonCommand ()
void | CloseButtonCommandParameter (winrt::IInspectable const &value)
winrt::IInspectable | CloseButtonCommandParameter ()
void | CloseButtonContent (winrt::IInspectable const &value)
winrt::IInspectable | CloseButtonContent ()
void | CloseButtonStyle (winrt::Style const &value)
winrt::Style | CloseButtonStyle ()
void | Closed (winrt::event_token const &token)
winrt::event_token | Closed (winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosedEventArgs > const &value)
winrt::event_token | Closing (winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosingEventArgs > const &value)
void | Closing (winrt::event_token const &token)
void | HeroContent (winrt::UIElement const &value)
winrt::UIElement | HeroContent ()
void | HeroContentPlacement (winrt::TeachingTipHeroContentPlacementMode const &value)
winrt::TeachingTipHeroContentPlacementMode | HeroContentPlacement ()
winrt::IconSource | IconSource ()
void | IconSource (winrt::IconSource const &value)
bool | IsLightDismissEnabled ()
void | IsLightDismissEnabled (bool value)
bool | IsOpen ()
void | IsOpen (bool value)
winrt::Thickness | PlacementMargin ()
void | PlacementMargin (winrt::Thickness const &value)
winrt::TeachingTipPlacementMode | PreferredPlacement ()
void | PreferredPlacement (winrt::TeachingTipPlacementMode const &value)
bool | ShouldConstrainToRootBounds ()
void | ShouldConstrainToRootBounds (bool value)
winrt::hstring | Subtitle ()
void | Subtitle (winrt::hstring const &value)
void | TailVisibility (winrt::TeachingTipTailVisibility const &value)
winrt::TeachingTipTailVisibility | TailVisibility ()
void | Target (winrt::FrameworkElement const &value)
winrt::FrameworkElement | Target ()
winrt::TeachingTipTemplateSettings | TemplateSettings ()
void | TemplateSettings (winrt::TeachingTipTemplateSettings const &value)
winrt::hstring | Title ()
void | Title (winrt::hstring const &value)

Static Public Member Functions

static winrt::DependencyProperty | ActionButtonCommandParameterProperty ()
static winrt::DependencyProperty | ActionButtonCommandProperty ()
static winrt::DependencyProperty | ActionButtonContentProperty ()
static winrt::DependencyProperty | ActionButtonStyleProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | CloseButtonCommandParameterProperty ()
static winrt::DependencyProperty | CloseButtonCommandProperty ()
static winrt::DependencyProperty | CloseButtonContentProperty ()
static winrt::DependencyProperty | CloseButtonStyleProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HeroContentPlacementProperty ()
static winrt::DependencyProperty | HeroContentProperty ()
static winrt::DependencyProperty | IconSourceProperty ()
static winrt::DependencyProperty | IsLightDismissEnabledProperty ()
static winrt::DependencyProperty | IsOpenProperty ()
static void | OnActionButtonCommandParameterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnActionButtonCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnActionButtonContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnActionButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCloseButtonCommandParameterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCloseButtonCommandPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCloseButtonContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCloseButtonStylePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHeroContentPlacementPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHeroContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIconSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsLightDismissEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsOpenPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPlacementMarginPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPreferredPlacementPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnShouldConstrainToRootBoundsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSubtitlePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTailVisibilityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTargetPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTemplateSettingsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTitlePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | PlacementMarginProperty ()
static winrt::DependencyProperty | PreferredPlacementProperty ()
static winrt::DependencyProperty | ShouldConstrainToRootBoundsProperty ()
static winrt::DependencyProperty | SubtitleProperty ()
static winrt::DependencyProperty | TailVisibilityProperty ()
static winrt::DependencyProperty | TargetProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()
static winrt::DependencyProperty | TitleProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_actionButtonClickEventSource
event_source
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_closeButtonClickEventSource
event_source
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::TeachingTipClosedEventArgs > > 		m_closedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::TeachingTipClosingEventArgs > > 		m_closingEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ActionButtonCommandParameterProperty
static GlobalDependencyProperty | s_ActionButtonCommandProperty
static GlobalDependencyProperty | s_ActionButtonContentProperty
static GlobalDependencyProperty | s_ActionButtonStyleProperty
static GlobalDependencyProperty | s_CloseButtonCommandParameterProperty
static GlobalDependencyProperty | s_CloseButtonCommandProperty
static GlobalDependencyProperty | s_CloseButtonContentProperty
static GlobalDependencyProperty | s_CloseButtonStyleProperty
static GlobalDependencyProperty | s_HeroContentPlacementProperty
static GlobalDependencyProperty | s_HeroContentProperty
static GlobalDependencyProperty | s_IconSourceProperty
static GlobalDependencyProperty | s_IsLightDismissEnabledProperty
static GlobalDependencyProperty | s_IsOpenProperty
static GlobalDependencyProperty | s_PlacementMarginProperty
static GlobalDependencyProperty | s_PreferredPlacementProperty
static GlobalDependencyProperty | s_ShouldConstrainToRootBoundsProperty
static GlobalDependencyProperty | s_SubtitleProperty
static GlobalDependencyProperty | s_TailVisibilityProperty
static GlobalDependencyProperty | s_TargetProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty
static GlobalDependencyProperty | s_TitleProperty

Detailed Description

Definition at line 7 of file TeachingTip.properties.h.

Constructor & Destructor Documentation

TeachingTipProperties ( )

Definition at line 38 of file TeachingTip.properties.cpp.

    : m_actionButtonClickEventSource{static_cast<TeachingTip*>(this)}

Member Function Documentation

winrt::event_token ActionButtonClick ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value )
void ActionButtonClick ( winrt::event_token const & token )
void ActionButtonCommand ( winrt::ICommand const & value )
winrt::ICommand ActionButtonCommand ( )
winrt::IInspectable ActionButtonCommandParameter ( )
void ActionButtonCommandParameter ( winrt::IInspectable const & value )
static winrt::DependencyProperty ActionButtonCommandParameterProperty ( ) [inline, static]

Definition at line 76 of file TeachingTip.properties.h.

{ return s_ActionButtonCommandParameterProperty; }

static winrt::DependencyProperty ActionButtonCommandProperty ( ) [inline, static]

Definition at line 75 of file TeachingTip.properties.h.

{ return s_ActionButtonCommandProperty; }

void ActionButtonContent ( winrt::IInspectable const & value )
winrt::IInspectable ActionButtonContent ( )
static winrt::DependencyProperty ActionButtonContentProperty ( ) [inline, static]

Definition at line 77 of file TeachingTip.properties.h.

{ return s_ActionButtonContentProperty; }

winrt::Style ActionButtonStyle ( )
void ActionButtonStyle ( winrt::Style const & value )
static winrt::DependencyProperty ActionButtonStyleProperty ( ) [inline, static]

Definition at line 78 of file TeachingTip.properties.h.

{ return s_ActionButtonStyleProperty; }

static void ClearProperties ( ) [static]
winrt::event_token CloseButtonClick ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value )
void CloseButtonClick ( winrt::event_token const & token )
void CloseButtonCommand ( winrt::ICommand const & value )
winrt::ICommand CloseButtonCommand ( )
void CloseButtonCommandParameter ( winrt::IInspectable const & value )
winrt::IInspectable CloseButtonCommandParameter ( )
static winrt::DependencyProperty CloseButtonCommandParameterProperty ( ) [inline, static]

Definition at line 80 of file TeachingTip.properties.h.

{ return s_CloseButtonCommandParameterProperty; }

static winrt::DependencyProperty CloseButtonCommandProperty ( ) [inline, static]

Definition at line 79 of file TeachingTip.properties.h.

{ return s_CloseButtonCommandProperty; }

void CloseButtonContent ( winrt::IInspectable const & value )
winrt::IInspectable CloseButtonContent ( )
static winrt::DependencyProperty CloseButtonContentProperty ( ) [inline, static]

Definition at line 81 of file TeachingTip.properties.h.

{ return s_CloseButtonContentProperty; }

winrt::Style CloseButtonStyle ( )
void CloseButtonStyle ( winrt::Style const & value )
static winrt::DependencyProperty CloseButtonStyleProperty ( ) [inline, static]

Definition at line 82 of file TeachingTip.properties.h.

{ return s_CloseButtonStyleProperty; }

winrt::event_token Closed ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosedEventArgs > const & value )
void Closed ( winrt::event_token const & token )
winrt::event_token Closing ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosingEventArgs > const & value )
void Closing ( winrt::event_token const & token )
static void EnsureProperties ( ) [static]
void HeroContent ( winrt::UIElement const & value )
winrt::UIElement HeroContent ( )
void HeroContentPlacement ( winrt::TeachingTipHeroContentPlacementMode const & value )
winrt::TeachingTipHeroContentPlacementMode HeroContentPlacement ( )
static winrt::DependencyProperty HeroContentPlacementProperty ( ) [inline, static]

Definition at line 84 of file TeachingTip.properties.h.

{ return s_HeroContentPlacementProperty; }

static winrt::DependencyProperty HeroContentProperty ( ) [inline, static]

Definition at line 83 of file TeachingTip.properties.h.

{ return s_HeroContentProperty; }

void IconSource ( winrt::IconSource const & value )
winrt::IconSource IconSource ( )
static winrt::DependencyProperty IconSourceProperty ( ) [inline, static]

Definition at line 85 of file TeachingTip.properties.h.

{ return s_IconSourceProperty; }

void IsLightDismissEnabled ( bool value )
bool IsLightDismissEnabled ( )
static winrt::DependencyProperty IsLightDismissEnabledProperty ( ) [inline, static]

Definition at line 86 of file TeachingTip.properties.h.

{ return s_IsLightDismissEnabledProperty; }

void IsOpen ( bool value )
bool IsOpen ( )
static winrt::DependencyProperty IsOpenProperty ( ) [inline, static]

Definition at line 87 of file TeachingTip.properties.h.

{ return s_IsOpenProperty; }

static void OnActionButtonCommandParameterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnActionButtonCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnActionButtonContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnActionButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCloseButtonCommandParameterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCloseButtonCommandPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCloseButtonContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCloseButtonStylePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHeroContentPlacementPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHeroContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIconSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsLightDismissEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsOpenPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPlacementMarginPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPreferredPlacementPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnShouldConstrainToRootBoundsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSubtitlePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTailVisibilityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTargetPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTemplateSettingsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTitlePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void PlacementMargin ( winrt::Thickness const & value )
winrt::Thickness PlacementMargin ( )
static winrt::DependencyProperty PlacementMarginProperty ( ) [inline, static]

Definition at line 88 of file TeachingTip.properties.h.

{ return s_PlacementMarginProperty; }

void PreferredPlacement ( winrt::TeachingTipPlacementMode const & value )
winrt::TeachingTipPlacementMode PreferredPlacement ( )
static winrt::DependencyProperty PreferredPlacementProperty ( ) [inline, static]

Definition at line 89 of file TeachingTip.properties.h.

{ return s_PreferredPlacementProperty; }

bool ShouldConstrainToRootBounds ( )
void ShouldConstrainToRootBounds ( bool value )
static winrt::DependencyProperty ShouldConstrainToRootBoundsProperty ( ) [inline, static]

Definition at line 90 of file TeachingTip.properties.h.

{ return s_ShouldConstrainToRootBoundsProperty; }

void Subtitle ( winrt::hstring const & value )
winrt::hstring Subtitle ( )
static winrt::DependencyProperty SubtitleProperty ( ) [inline, static]

Definition at line 91 of file TeachingTip.properties.h.

{ return s_SubtitleProperty; }

winrt::TeachingTipTailVisibility TailVisibility ( )
void TailVisibility ( winrt::TeachingTipTailVisibility const & value )
static winrt::DependencyProperty TailVisibilityProperty ( ) [inline, static]

Definition at line 92 of file TeachingTip.properties.h.

{ return s_TailVisibilityProperty; }

winrt::FrameworkElement Target ( )
void Target ( winrt::FrameworkElement const & value )
static winrt::DependencyProperty TargetProperty ( ) [inline, static]

Definition at line 93 of file TeachingTip.properties.h.

{ return s_TargetProperty; }

winrt::TeachingTipTemplateSettings TemplateSettings ( )
void TemplateSettings ( winrt::TeachingTipTemplateSettings const & value )
static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 94 of file TeachingTip.properties.h.

{ return s_TemplateSettingsProperty; }

winrt::hstring Title ( )
void Title ( winrt::hstring const & value )
static winrt::DependencyProperty TitleProperty ( ) [inline, static]

Definition at line 95 of file TeachingTip.properties.h.

{ return s_TitleProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_actionButtonClickEventSource

Definition at line 128 of file TeachingTip.properties.h.

event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_closeButtonClickEventSource

Definition at line 129 of file TeachingTip.properties.h.

event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosedEventArgs> > m_closedEventSource

Definition at line 130 of file TeachingTip.properties.h.

event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosingEventArgs> > m_closingEventSource

Definition at line 131 of file TeachingTip.properties.h.

GlobalDependencyProperty s_ActionButtonCommandParameterProperty [static]

Definition at line 98 of file TeachingTip.properties.h.

GlobalDependencyProperty s_ActionButtonCommandProperty [static]

Definition at line 97 of file TeachingTip.properties.h.

GlobalDependencyProperty s_ActionButtonContentProperty [static]

Definition at line 99 of file TeachingTip.properties.h.

GlobalDependencyProperty s_ActionButtonStyleProperty [static]

Definition at line 100 of file TeachingTip.properties.h.

GlobalDependencyProperty s_CloseButtonCommandParameterProperty [static]

Definition at line 102 of file TeachingTip.properties.h.

GlobalDependencyProperty s_CloseButtonCommandProperty [static]

Definition at line 101 of file TeachingTip.properties.h.

GlobalDependencyProperty s_CloseButtonContentProperty [static]

Definition at line 103 of file TeachingTip.properties.h.

GlobalDependencyProperty s_CloseButtonStyleProperty [static]

Definition at line 104 of file TeachingTip.properties.h.

GlobalDependencyProperty s_HeroContentPlacementProperty [static]

Definition at line 106 of file TeachingTip.properties.h.

GlobalDependencyProperty s_HeroContentProperty [static]

Definition at line 105 of file TeachingTip.properties.h.

GlobalDependencyProperty s_IconSourceProperty [static]

Definition at line 107 of file TeachingTip.properties.h.

GlobalDependencyProperty s_IsLightDismissEnabledProperty [static]

Definition at line 108 of file TeachingTip.properties.h.

GlobalDependencyProperty s_IsOpenProperty [static]

Definition at line 109 of file TeachingTip.properties.h.

GlobalDependencyProperty s_PlacementMarginProperty [static]

Definition at line 110 of file TeachingTip.properties.h.

GlobalDependencyProperty s_PreferredPlacementProperty [static]

Definition at line 111 of file TeachingTip.properties.h.

GlobalDependencyProperty s_ShouldConstrainToRootBoundsProperty [static]

Definition at line 112 of file TeachingTip.properties.h.

GlobalDependencyProperty s_SubtitleProperty [static]

Definition at line 113 of file TeachingTip.properties.h.

GlobalDependencyProperty s_TailVisibilityProperty [static]

Definition at line 114 of file TeachingTip.properties.h.

GlobalDependencyProperty s_TargetProperty [static]

Definition at line 115 of file TeachingTip.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 116 of file TeachingTip.properties.h.

GlobalDependencyProperty s_TitleProperty [static]

Definition at line 117 of file TeachingTip.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TeachingTip.properties.h
  • Generated/TeachingTip.properties.cpp
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TeachingTipTemplateSettings Class Reference

#include "TeachingTipTemplateSettings.h"

Inherits TeachingTipTemplateSettingsProperties.

List of all members.

Public Member Functions

TeachingTipTemplateSettings ()

Detailed Description

Definition at line 9 of file TeachingTipTemplateSettings.h.

Constructor & Destructor Documentation

TeachingTipTemplateSettings ( )

Definition at line 8 of file TeachingTipTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • TeachingTip/TeachingTipTemplateSettings.h
  • TeachingTip/TeachingTipTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

TeachingTipTemplateSettingsProperties Class Reference

#include "TeachingTipTemplateSettings.properties.h"

Inherited by TeachingTipTemplateSettings.

List of all members.

Public Member Functions

TeachingTipTemplateSettingsProperties ()
void | IconElement (winrt::IconElement const &value)
winrt::IconElement | IconElement ()
winrt::Thickness | TopLeftHighlightMargin ()
void | TopLeftHighlightMargin (winrt::Thickness const &value)
void | TopRightHighlightMargin (winrt::Thickness const &value)
winrt::Thickness | TopRightHighlightMargin ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconElementProperty ()
static winrt::DependencyProperty | TopLeftHighlightMarginProperty ()
static winrt::DependencyProperty | TopRightHighlightMarginProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconElementProperty
static GlobalDependencyProperty | s_TopLeftHighlightMarginProperty
static GlobalDependencyProperty | s_TopRightHighlightMarginProperty

Detailed Description

Definition at line 7 of file TeachingTipTemplateSettings.properties.h.

Constructor & Destructor Documentation

TeachingTipTemplateSettingsProperties ( )

Definition at line 20 of file TeachingTipTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 62 of file TeachingTipTemplateSettings.properties.cpp.

{
    s_IconElementProperty = nullptr;
    s_TopLeftHighlightMarginProperty = nullptr;
    s_TopRightHighlightMarginProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 25 of file TeachingTipTemplateSettings.properties.cpp.

{
    if (!s_IconElementProperty)
    {
        s_IconElementProperty =
            InitializeDependencyProperty(
                L"IconElement",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::TeachingTipTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_TopLeftHighlightMarginProperty)
    {
        s_TopLeftHighlightMarginProperty =
            InitializeDependencyProperty(
                L"TopLeftHighlightMargin",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::TeachingTipTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_TopRightHighlightMarginProperty)
    {
        s_TopRightHighlightMarginProperty =
            InitializeDependencyProperty(
                L"TopRightHighlightMargin",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::TeachingTipTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IconElement IconElement ( )

Definition at line 77 of file TeachingTipTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<TeachingTipTemplateSettings*>(this)->GetValue(s_IconElementProperty));
}

void IconElement ( winrt::IconElement const & value )

Definition at line 69 of file TeachingTipTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TeachingTipTemplateSettings*>(this)->SetValue(s_IconElementProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconElementProperty ( ) [inline, static]

Definition at line 21 of file TeachingTipTemplateSettings.properties.h.

{ return s_IconElementProperty; }

winrt::Thickness TopLeftHighlightMargin ( )

Definition at line 90 of file TeachingTipTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<TeachingTipTemplateSettings*>(this)->GetValue(s_TopLeftHighlightMarginProperty));
}

void TopLeftHighlightMargin ( winrt::Thickness const & value )

Definition at line 82 of file TeachingTipTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TeachingTipTemplateSettings*>(this)->SetValue(s_TopLeftHighlightMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TopLeftHighlightMarginProperty ( ) [inline, static]

Definition at line 22 of file TeachingTipTemplateSettings.properties.h.

{ return s_TopLeftHighlightMarginProperty; }

void TopRightHighlightMargin ( winrt::Thickness const & value )

Definition at line 95 of file TeachingTipTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TeachingTipTemplateSettings*>(this)->SetValue(s_TopRightHighlightMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

winrt::Thickness TopRightHighlightMargin ( )

Definition at line 103 of file TeachingTipTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<TeachingTipTemplateSettings*>(this)->GetValue(s_TopRightHighlightMarginProperty));
}

static winrt::DependencyProperty TopRightHighlightMarginProperty ( ) [inline, static]

Definition at line 23 of file TeachingTipTemplateSettings.properties.h.

{ return s_TopRightHighlightMarginProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconElementProperty [static]

Definition at line 25 of file TeachingTipTemplateSettings.properties.h.

GlobalDependencyProperty s_TopLeftHighlightMarginProperty [static]

Definition at line 26 of file TeachingTipTemplateSettings.properties.h.

GlobalDependencyProperty s_TopRightHighlightMarginProperty [static]

Definition at line 27 of file TeachingTipTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TeachingTipTemplateSettings.properties.h
  • Generated/TeachingTipTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipTestHooks Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions | Private Attributes | Static Private Attributes

TeachingTipTestHooks Class Reference

#include "TeachingTipTestHooks.h"

List of all members.

Static Public Member Functions

static winrt::event_token | EffectiveHeroContentPlacementChanged (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
static void | EffectiveHeroContentPlacementChanged (winrt::event_token const &token)
static winrt::event_token | EffectivePlacementChanged (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
static void | EffectivePlacementChanged (winrt::event_token const &token)
static com_ptr
< TeachingTipTestHooks > 		EnsureGlobalTestHooks ()
static
winrt::TeachingTipHeroContentPlacementMode 		GetEffectiveHeroContentPlacement (const winrt::TeachingTip &teachingTip)
static
winrt::TeachingTipPlacementMode 		GetEffectivePlacement (const winrt::TeachingTip &teachingTip)
static com_ptr
< TeachingTipTestHooks > 		GetGlobalTestHooks ()
static double | GetHorizontalOffset (const winrt::TeachingTip &teachingTip)
static bool | GetIsIdle (const winrt::TeachingTip &teachingTip)
static winrt::Popup | GetPopup (const winrt::TeachingTip &teachingTip)
static winrt::Visibility | GetSubtitleVisibility (const winrt::TeachingTip &teachingTip)
static winrt::Visibility | GetTitleVisibility (const winrt::TeachingTip &teachingTip)
static double | GetVerticalOffset (const winrt::TeachingTip &teachingTip)
static winrt::event_token | IdleStatusChanged (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
static void | IdleStatusChanged (winrt::event_token const &token)
static void | NotifyEffectiveHeroContentPlacementChanged (const winrt::TeachingTip &sender)
static void | NotifyEffectivePlacementChanged (const winrt::TeachingTip &sender)
static void | NotifyIdleStatusChanged (const winrt::TeachingTip &sender)
static void | NotifyOffsetChanged (const winrt::TeachingTip &sender)
static void | NotifyOpenedStatusChanged (const winrt::TeachingTip &sender)
static void | NotifySubtitleVisibilityChanged (const winrt::TeachingTip &sender)
static void | NotifyTitleVisibilityChanged (const winrt::TeachingTip &sender)
static winrt::event_token | OffsetChanged (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
static void | OffsetChanged (winrt::event_token const &token)
static winrt::event_token | OpenedStatusChanged (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
static void | OpenedStatusChanged (winrt::event_token const &token)
static void | SetContentElevation (const winrt::TeachingTip &teachingTip, float elevation)
static void | SetContractAnimationDuration (const winrt::TeachingTip &teachingTip, const winrt::TimeSpan &contractAnimationDuration)
static void | SetContractEasingFunction (const winrt::TeachingTip &teachingTip, const winrt::CompositionEasingFunction &easingFunction)
static void | SetExpandAnimationDuration (const winrt::TeachingTip &teachingTip, const winrt::TimeSpan &expandAnimationDuration)
static void | SetExpandEasingFunction (const winrt::TeachingTip &teachingTip, const winrt::CompositionEasingFunction &easingFunction)
static void | SetReturnTopForOutOfWindowPlacement (const winrt::TeachingTip &teachingTip, bool returnTopForOutOfWindowPlacement)
static void | SetTailElevation (const winrt::TeachingTip &teachingTip, float elevation)
static void | SetTestScreenBounds (const winrt::TeachingTip &teachingTip, const winrt::Rect &testScreenBounds)
static void | SetTestWindowBounds (const winrt::TeachingTip &teachingTip, const winrt::Rect &testWindowBounds)
static void | SetTipFollowsTarget (const winrt::TeachingTip &teachingTip, bool tipFollowsTarget)
static void | SetTipShouldHaveShadow (const winrt::TeachingTip &teachingTip, bool tipShadow)
static void | SetUseTestScreenBounds (const winrt::TeachingTip &teachingTip, bool useTestScreenBounds)
static void | SetUseTestWindowBounds (const winrt::TeachingTip &teachingTip, bool useTestWindowBounds)
static void | SubtitleVisibilityChanged (winrt::event_token const &token)
static winrt::event_token | SubtitleVisibilityChanged (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
static winrt::event_token | TitleVisibilityChanged (winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value)
static void | TitleVisibilityChanged (winrt::event_token const &token)

Private Attributes

winrt::event
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_effectiveHeroContentPlacementChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_effectivePlacementChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_idleStatusChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_offsetChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_openedStatusChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_subtitleVisibilityChangedEventSource
winrt::event
< winrt::TypedEventHandler
< winrt::TeachingTip,
winrt::IInspectable > > 		m_titleVisibilityChangedEventSource

Static Private Attributes

static com_ptr
< TeachingTipTestHooks > 		s_testHooks

Detailed Description

Definition at line 10 of file TeachingTipTestHooks.h.

Member Function Documentation

winrt::event_token EffectiveHeroContentPlacementChanged ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value ) [static]

Definition at line 216 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_effectiveHeroContentPlacementChangedEventSource.add(value);
}

void EffectiveHeroContentPlacementChanged ( winrt::event_token const & token ) [static]

Definition at line 222 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_effectiveHeroContentPlacementChangedEventSource.remove(token);
}

winrt::event_token EffectivePlacementChanged ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value ) [static]

Definition at line 186 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_effectivePlacementChangedEventSource.add(value);
}

void EffectivePlacementChanged ( winrt::event_token const & token ) [static]

Definition at line 192 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_effectivePlacementChangedEventSource.remove(token);
}

com_ptr< TeachingTipTestHooks > EnsureGlobalTestHooks ( ) [static]

Definition at line 12 of file TeachingTipTestHooks.cpp.

{
    static bool s_initialized = []() {
        s_testHooks = winrt::make_self<TeachingTipTestHooks>();
        return true;
    }();
    return s_testHooks;
}

winrt::TeachingTipHeroContentPlacementMode GetEffectiveHeroContentPlacement ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 228 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->GetEffectiveHeroContentPlacement();
    }
    return winrt::TeachingTipHeroContentPlacementMode::Auto;
}

winrt::TeachingTipPlacementMode GetEffectivePlacement ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 198 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->GetEffectivePlacement();
    }
    return winrt::TeachingTipPlacementMode::Auto;
}

static com_ptr<TeachingTipTestHooks> GetGlobalTestHooks ( ) [inline, static]

Definition at line 14 of file TeachingTipTestHooks.h.

    {
        return s_testHooks;
    }

double GetHorizontalOffset ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 309 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->GetHorizontalOffset();
    }
    return 0.0;
}

bool GetIsIdle ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 168 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->GetIsIdle();
    }
    return true;
}

winrt::Popup GetPopup ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 336 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->m_popup.get();
    }
    return nullptr;
}

winrt::Visibility GetSubtitleVisibility ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 327 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->GetSubtitleVisibility();
    }
    return winrt::Visibility::Collapsed;
}

winrt::Visibility GetTitleVisibility ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 318 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->GetTitleVisibility();
    }
    return winrt::Visibility::Collapsed;
}

double GetVerticalOffset ( const winrt::TeachingTip & teachingTip ) [static]

Definition at line 300 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        return winrt::get_self<TeachingTip>(teachingTip)->GetVerticalOffset();
    }
    return 0.0;
}

winrt::event_token IdleStatusChanged ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value ) [static]

Definition at line 155 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_idleStatusChangedEventSource.add(value);
}

void IdleStatusChanged ( winrt::event_token const & token ) [static]

Definition at line 161 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_idleStatusChangedEventSource.remove(token);
}

void NotifyEffectiveHeroContentPlacementChanged ( const winrt::TeachingTip & sender ) [static]

Definition at line 207 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_effectiveHeroContentPlacementChangedEventSource)
    {
        hooks->m_effectiveHeroContentPlacementChangedEventSource(sender, nullptr);
    }
}

void NotifyEffectivePlacementChanged ( const winrt::TeachingTip & sender ) [static]

Definition at line 177 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_effectivePlacementChangedEventSource)
    {
        hooks->m_effectivePlacementChangedEventSource(sender, nullptr);
    }
}

void NotifyIdleStatusChanged ( const winrt::TeachingTip & sender ) [static]

Definition at line 146 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_idleStatusChangedEventSource)
    {
        hooks->m_idleStatusChangedEventSource(sender, nullptr);
    }
}

void NotifyOffsetChanged ( const winrt::TeachingTip & sender ) [static]

Definition at line 237 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_offsetChangedEventSource)
    {
        hooks->m_offsetChangedEventSource(sender, nullptr);
    }
}

void NotifyOpenedStatusChanged ( const winrt::TeachingTip & sender ) [static]

Definition at line 125 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_openedStatusChangedEventSource)
    {
        hooks->m_openedStatusChangedEventSource(sender, nullptr);
    }
}

void NotifySubtitleVisibilityChanged ( const winrt::TeachingTip & sender ) [static]

Definition at line 279 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_subtitleVisibilityChangedEventSource)
    {
        hooks->m_subtitleVisibilityChangedEventSource(sender, nullptr);
    }
}

void NotifyTitleVisibilityChanged ( const winrt::TeachingTip & sender ) [static]

Definition at line 258 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    if (hooks->m_titleVisibilityChangedEventSource)
    {
        hooks->m_titleVisibilityChangedEventSource(sender, nullptr);
    }
}

winrt::event_token OffsetChanged ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value ) [static]

Definition at line 246 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_offsetChangedEventSource.add(value);
}

void OffsetChanged ( winrt::event_token const & token ) [static]

Definition at line 252 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_offsetChangedEventSource.remove(token);
}

winrt::event_token OpenedStatusChanged ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value ) [static]

Definition at line 134 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_openedStatusChangedEventSource.add(value);
}

void OpenedStatusChanged ( winrt::event_token const & token ) [static]

Definition at line 140 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_openedStatusChangedEventSource.remove(token);
}

void SetContentElevation | ( | const winrt::TeachingTip & | teachingTip,
 |  | float | elevation |
 | ) |  |  | [static]

Definition at line 45 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetContentElevation(elevation);
    }
}

void SetContractAnimationDuration | ( | const winrt::TeachingTip & | teachingTip,
 |  | const winrt::TimeSpan & | contractAnimationDuration |
 | ) |  |  | [static]

Definition at line 117 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetContractAnimationDuration(contractAnimationDuration);
    }
}

void SetContractEasingFunction | ( | const winrt::TeachingTip & | teachingTip,
 |  | const winrt::CompositionEasingFunction & | easingFunction |
 | ) |  |  | [static]

Definition at line 29 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip && easingFunction)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetContractEasingFunction(easingFunction);
    }
}

void SetExpandAnimationDuration | ( | const winrt::TeachingTip & | teachingTip,
 |  | const winrt::TimeSpan & | expandAnimationDuration |
 | ) |  |  | [static]

Definition at line 109 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetExpandAnimationDuration(expandAnimationDuration);
    }
}

void SetExpandEasingFunction | ( | const winrt::TeachingTip & | teachingTip,
 |  | const winrt::CompositionEasingFunction & | easingFunction |
 | ) |  |  | [static]

Definition at line 21 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip && easingFunction)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetExpandEasingFunction(easingFunction);
    }
}

void SetReturnTopForOutOfWindowPlacement | ( | const winrt::TeachingTip & | teachingTip,
 |  | bool | returnTopForOutOfWindowPlacement |
 | ) |  |  | [static]

Definition at line 101 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetReturnTopForOutOfWindowPlacement(returnTopForOutOfWindowPlacement);
    }
}

void SetTailElevation | ( | const winrt::TeachingTip & | teachingTip,
 |  | float | elevation |
 | ) |  |  | [static]

Definition at line 53 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetTailElevation(elevation);
    }
}

void SetTestScreenBounds | ( | const winrt::TeachingTip & | teachingTip,
 |  | const winrt::Rect & | testScreenBounds |
 | ) |  |  | [static]

Definition at line 85 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetTestScreenBounds(testScreenBounds);
    }
}

void SetTestWindowBounds | ( | const winrt::TeachingTip & | teachingTip,
 |  | const winrt::Rect & | testWindowBounds |
 | ) |  |  | [static]

Definition at line 69 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetTestWindowBounds(testWindowBounds);
    }
}

void SetTipFollowsTarget | ( | const winrt::TeachingTip & | teachingTip,
 |  | bool | tipFollowsTarget |
 | ) |  |  | [static]

Definition at line 93 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetTipFollowsTarget(tipFollowsTarget);
    }
}

void SetTipShouldHaveShadow | ( | const winrt::TeachingTip & | teachingTip,
 |  | bool | tipShadow |
 | ) |  |  | [static]

Definition at line 37 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetTipShouldHaveShadow(tipShouldHaveShadow);
    }
}

void SetUseTestScreenBounds | ( | const winrt::TeachingTip & | teachingTip,
 |  | bool | useTestScreenBounds |
 | ) |  |  | [static]

Definition at line 77 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetUseTestScreenBounds(useTestScreenBounds);
    }
}

void SetUseTestWindowBounds | ( | const winrt::TeachingTip & | teachingTip,
 |  | bool | useTestWindowBounds |
 | ) |  |  | [static]

Definition at line 61 of file TeachingTipTestHooks.cpp.

{
    if (teachingTip)
    {
        winrt::get_self<TeachingTip>(teachingTip)->SetUseTestWindowBounds(useTestWindowBounds);
    }
}

void SubtitleVisibilityChanged ( winrt::event_token const & token ) [static]

Definition at line 294 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_subtitleVisibilityChangedEventSource.remove(token);
}

winrt::event_token SubtitleVisibilityChanged ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value ) [static]

Definition at line 288 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_subtitleVisibilityChangedEventSource.add(value);
}

winrt::event_token TitleVisibilityChanged ( winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const & value ) [static]

Definition at line 267 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    return hooks->m_titleVisibilityChangedEventSource.add(value);
}

void TitleVisibilityChanged ( winrt::event_token const & token ) [static]

Definition at line 273 of file TeachingTipTestHooks.cpp.

{
    auto hooks = EnsureGlobalTestHooks();
    hooks->m_titleVisibilityChangedEventSource.remove(token);
}

Member Data Documentation

winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_effectiveHeroContentPlacementChangedEventSource [private]

Definition at line 78 of file TeachingTipTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_effectivePlacementChangedEventSource [private]

Definition at line 77 of file TeachingTipTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_idleStatusChangedEventSource [private]

Definition at line 76 of file TeachingTipTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_offsetChangedEventSource [private]

Definition at line 79 of file TeachingTipTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_openedStatusChangedEventSource [private]

Definition at line 75 of file TeachingTipTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_subtitleVisibilityChangedEventSource [private]

Definition at line 81 of file TeachingTipTestHooks.h.

winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> > m_titleVisibilityChangedEventSource [private]

Definition at line 80 of file TeachingTipTestHooks.h.

com_ptr<TeachingTipTestHooks> s_testHooks [static, private]

Definition at line 74 of file TeachingTipTestHooks.h.

The documentation for this class was generated from the following files:
  • TeachingTip/TeachingTipTestHooks.h
  • TeachingTip/TeachingTipTestHooks.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TextCommandBarFlyout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

TextCommandBarFlyout Class Reference

#include "TextCommandBarFlyout.h"

List of all members.

Public Member Functions

ForwardRefToBaseReferenceTracker (CommandBarFlyout) TextCommandBarFlyout()

Private Member Functions

void | ExecuteBoldCommand ()
void | ExecuteCopyCommand ()
void | ExecuteCutCommand ()
void | ExecuteItalicCommand ()
void | ExecutePasteCommand ()
void | ExecuteRedoCommand ()
void | ExecuteSelectAllCommand ()
void | ExecuteUnderlineCommand ()
void | ExecuteUndoCommand ()
winrt::ICommandBarElement | GetButton (TextControlButtons button)
TextControlButtons GetButtonsToAdd ()
void | InitializeButtonWithProperties (winrt::ButtonBase const &button, ResourceIdType labelResourceId, winrt::Symbol const &symbol, ResourceIdType acceleratorKeyResourceId, ResourceIdType descriptionResourceId, std::function< void()> const &executeFunc)
void | InitializeButtonWithProperties (winrt::ButtonBase const &button, ResourceIdType labelResourceId, ResourceIdType acceleratorKeyResourceId, ResourceIdType descriptionResourceId, std::function< void()> const &executeFunc)
void | InitializeButtonWithUICommand (winrt::ButtonBase const &button, winrt::XamlUICommand const &uiCommand, std::function< void()> const &executeFunc)
bool | IsButtonInPrimaryCommands (TextControlButtons button)
void | UpdateButtons ()

Static Private Member Functions

static TextControlButtons | GetPasswordBoxButtonsToAdd (winrt::PasswordBox const &passwordBox)
static TextControlButtons | GetRichEditBoxButtonsToAdd (winrt::RichEditBox const &richEditBox)
static TextControlButtons | GetRichTextBlockButtonsToAdd (winrt::RichTextBlock const &richTextBlock)
static TextControlButtons | GetTextBlockButtonsToAdd (winrt::TextBlock const &textBlock)
static TextControlButtons | GetTextBoxButtonsToAdd (winrt::TextBox const &textBox)

Private Attributes

std::vector
< winrt::ButtonBase::Click_revoker > 		m_buttonClickRevokers
std::vector
< winrt::XamlUICommand::ExecuteRequested_revoker > 		m_buttonCommandRevokers
std::map< TextControlButtons,
winrt::ICommandBarElement > 		m_buttons
bool | m_isSettingToggleButtonState = false
std::vector
< winrt::MenuFlyoutItem::Click_revoker > 		m_proofingMenuItemClickRevokers
std::vector
< winrt::ToggleMenuFlyoutItem::Click_revoker > 		m_proofingMenuToggleItemClickRevokers
std::vector
< winrt::ToggleButton::Checked_revoker > 		m_toggleButtonCheckedRevokers
std::vector
< winrt::ToggleButton::Unchecked_revoker > 		m_toggleButtonUncheckedRevokers

Detailed Description

Definition at line 25 of file TextCommandBarFlyout.h.

Member Function Documentation

void ExecuteBoldCommand ( ) [private]

Definition at line 654 of file TextCommandBarFlyout.cpp.

{
    if (!m_isSettingToggleButtonState)
    {
        auto target = Target();

        if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
        {
            auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

            if (selection)
            {
                auto characterFormat = selection.CharacterFormat();
                if (characterFormat.Bold() == winrt::FormatEffect::On)
                {
                    characterFormat.Bold(winrt::FormatEffect::Off);
                }
                else
                {
                    characterFormat.Bold(winrt::FormatEffect::On);
                }
            }
        }
    }
}

void ExecuteCopyCommand ( ) [private]

Definition at line 557 of file TextCommandBarFlyout.cpp.

{
    auto target = Target();

    try
    {
        const auto executeRichTextBlockCopyCommand =
            [this](winrt::RichTextBlock const& richTextBlockTarget)
        {
            richTextBlockTarget.CopySelectionToClipboard();
        };

        if (auto textBoxTarget = target.try_as<winrt::TextBox>())
        {
            textBoxTarget.CopySelectionToClipboard();
        }
        else if (auto textBlockTarget = target.try_as<winrt::TextBlock>())
        {
            textBlockTarget.CopySelectionToClipboard();
        }
        else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
        {
            auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

            if (selection)
            {
                selection.Copy();
            }
        }
        else if (auto richTextBlockTarget = target.try_as<winrt::RichTextBlock>())
        {
            executeRichTextBlockCopyCommand(richTextBlockTarget);
        }
        else if (auto richTextBlockOverflowTarget = target.try_as<winrt::RichTextBlockOverflow>())
        {
            if (auto richTextBoxSource = richTextBlockOverflowTarget.ContentSource())
            {
                executeRichTextBlockCopyCommand(richTextBoxSource);
            }
        }
    }
    catch (winrt::hresult_error e)
    {
        // If we got a clipboard error, we don't want to crash as a result of that - that can happen (e.g.)
        // if the app isn't the foreground window when we try to execute a clipboard operation.
        if (e.code().value < CLIPBRD_E_FIRST || e.code().value > CLIPBRD_E_LAST)
        {
            throw;
        }
    }

    if (IsButtonInPrimaryCommands(TextControlButtons::Copy))
    {
        UpdateButtons();
    }
}

void ExecuteCutCommand ( ) [private]

Definition at line 521 of file TextCommandBarFlyout.cpp.

{
    auto target = Target();

    try
    {
        if (auto textBoxTarget = target.try_as<winrt::TextBox>())
        {
            textBoxTarget.CutSelectionToClipboard();
        }
        else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
        {
            auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

            if (selection)
            {
                selection.Cut();
            }
        }
    }
    catch (winrt::hresult_error e)
    {
        // If we got a clipboard error, we don't want to crash as a result of that - that can happen (e.g.)
        // if the app isn't the foreground window when we try to execute a clipboard operation.
        if (e.code().value < CLIPBRD_E_FIRST || e.code().value > CLIPBRD_E_LAST)
        {
            throw;
        }
    }

    if (IsButtonInPrimaryCommands(TextControlButtons::Cut))
    {
        UpdateButtons();
    }
}

void ExecuteItalicCommand ( ) [private]

Definition at line 680 of file TextCommandBarFlyout.cpp.

{
    if (!m_isSettingToggleButtonState)
    {
        auto target = Target();

        if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
        {
            auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

            if (selection)
            {
                auto characterFormat = selection.CharacterFormat();
                if (characterFormat.Italic() == winrt::FormatEffect::On)
                {
                    characterFormat.Italic(winrt::FormatEffect::Off);
                }
                else
                {
                    characterFormat.Italic(winrt::FormatEffect::On);
                }
            }
        }
    }
}

void ExecutePasteCommand ( ) [private]

Definition at line 614 of file TextCommandBarFlyout.cpp.

{
    auto target = Target();

    try
    {
        if (auto textBoxTarget = target.try_as<winrt::TextBox>())
        {
            textBoxTarget.PasteFromClipboard();
        }
        else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
        {
            auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

            if (selection)
            {
                selection.Paste(0);
            }
        }
        else if (auto passwordBoxTarget = target.try_as<winrt::PasswordBox>())
        {
            passwordBoxTarget.PasteFromClipboard();
        }
    }
    catch (winrt::hresult_error e)
    {
        // If we got a clipboard error, we don't want to crash as a result of that - that can happen (e.g.)
        // if the app isn't the foreground window when we try to execute a clipboard operation.
        if (e.code().value < CLIPBRD_E_FIRST || e.code().value > CLIPBRD_E_LAST)
        {
            throw;
        }
    }

    if (IsButtonInPrimaryCommands(TextControlButtons::Paste))
    {
        UpdateButtons();
    }
}

void ExecuteRedoCommand ( ) [private]

Definition at line 751 of file TextCommandBarFlyout.cpp.

{
    auto target = Target();

    if (auto textBoxTarget = target.try_as<winrt::TextBox>())
    {
        textBoxTarget.Redo();
    }
    else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
    {
        richEditBoxTarget.Document().Redo();
    }

    if (IsButtonInPrimaryCommands(TextControlButtons::Redo))
    {
        UpdateButtons();
    }
}

void ExecuteSelectAllCommand ( ) [private]

Definition at line 770 of file TextCommandBarFlyout.cpp.

{
    auto target = Target();

    if (auto textBoxTarget = target.try_as<winrt::TextBox>())
    {
        textBoxTarget.SelectAll();
    }
    else if (auto textBlockTarget = target.try_as<winrt::TextBlock>())
    {
        textBlockTarget.SelectAll();
    }
    else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
    {
        auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

        if (selection)
        {
            selection.Expand(winrt::TextRangeUnit::Story);
        }
    }
    else if (auto richTextBlockTarget = target.try_as<winrt::RichTextBlock>())
    {
        richTextBlockTarget.SelectAll();
    }
    else if (auto richTextBlockOverflowTarget = target.try_as<winrt::RichTextBlockOverflow>())
    {
        if (auto richTextBlockSource = richTextBlockOverflowTarget.ContentSource())
        {
            richTextBlockSource.SelectAll();
        }
    }
    else if (auto passwordBoxTarget = target.try_as<winrt::PasswordBox>())
    {
        passwordBoxTarget.SelectAll();
    }

    if (IsButtonInPrimaryCommands(TextControlButtons::SelectAll))
    {
        UpdateButtons();
    }
}

void ExecuteUnderlineCommand ( ) [private]

Definition at line 706 of file TextCommandBarFlyout.cpp.

{
    if (!m_isSettingToggleButtonState)
    {
        auto target = Target();

        if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
        {
            auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

            if (selection)
            {
                auto characterFormat = selection.CharacterFormat();
                if (characterFormat.Underline() == winrt::UnderlineType::None || characterFormat.Underline() == winrt::UnderlineType::Undefined)
                {
                    characterFormat.Underline(winrt::UnderlineType::Single);
                }
                else
                {
                    characterFormat.Underline(winrt::UnderlineType::None);
                }
            }
        }
    }
}

void ExecuteUndoCommand ( ) [private]

Definition at line 732 of file TextCommandBarFlyout.cpp.

{
    auto target = Target();

    if (auto textBoxTarget = target.try_as<winrt::TextBox>())
    {
        textBoxTarget.Undo();
    }
    else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
    {
        richEditBoxTarget.Document().Undo();
    }

    if (IsButtonInPrimaryCommands(TextControlButtons::Undo))
    {
        UpdateButtons();
    }
}

ForwardRefToBaseReferenceTracker ( CommandBarFlyout )
winrt::ICommandBarElement GetButton ( TextControlButtons button ) [private]

Definition at line 813 of file TextCommandBarFlyout.cpp.

{
    const auto foundButton = m_buttons.find(textControlButton);

    if (foundButton != m_buttons.end())
    {
        return foundButton->second;
    }
    else
    {
        switch (textControlButton)
        {
        case TextControlButtons::Cut:
            {
                winrt::AppBarButton button;
                const auto executeFunc = [this]() { ExecuteCutCommand(); };
                InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Cut), executeFunc);
                m_buttons[TextControlButtons::Cut] = button;
                return button;
            }
        case TextControlButtons::Copy:
            {
                winrt::AppBarButton button;
                const auto executeFunc = [this]() { ExecuteCopyCommand(); };
                InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Copy), executeFunc);
                m_buttons[TextControlButtons::Copy] = button;
                return button;
            }
        case TextControlButtons::Paste:
            {
                winrt::AppBarButton button;
                const auto executeFunc = [this]() { ExecutePasteCommand(); };
                InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Paste), executeFunc);
                m_buttons[TextControlButtons::Paste] = button;
                return button;
            }
        // Bold, Italic, and Underline don't have command library commands associated with them,
        // so we'll just unconditionally initialize them with properties.
        case TextControlButtons::Bold:
            {
                winrt::AppBarToggleButton button;
                InitializeButtonWithProperties(
                    button,
                    SR_TextCommandLabelBold,
                    winrt::Symbol::Bold,
                    SR_TextCommandKeyboardAcceleratorKeyBold,
                    SR_TextCommandDescriptionBold,
                    [this]() { ExecuteBoldCommand(); });

                m_buttons[TextControlButtons::Bold] = button;
                return button;
            }
        case TextControlButtons::Italic:
            {
                winrt::AppBarToggleButton button;
                InitializeButtonWithProperties(
                    button,
                    SR_TextCommandLabelItalic,
                    winrt::Symbol::Italic,
                    SR_TextCommandKeyboardAcceleratorKeyItalic,
                    SR_TextCommandDescriptionItalic,
                    [this]() { ExecuteItalicCommand(); });

                m_buttons[TextControlButtons::Italic] = button;
                return button;
            }
        case TextControlButtons::Underline:
            {
                winrt::AppBarToggleButton button;
                InitializeButtonWithProperties(
                    button,
                    SR_TextCommandLabelUnderline,
                    winrt::Symbol::Underline,
                    SR_TextCommandKeyboardAcceleratorKeyUnderline,
                    SR_TextCommandDescriptionUnderline,
                    [this]() { ExecuteUnderlineCommand(); });

                m_buttons[TextControlButtons::Underline] = button;
                return button;
            }
        case TextControlButtons::Undo:
            {
                winrt::AppBarButton button;
                const auto executeFunc = [this]() { ExecuteUndoCommand(); };
                InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Undo), executeFunc);
                m_buttons[TextControlButtons::Undo] = button;
                return button;
            }
        case TextControlButtons::Redo:
            {
                winrt::AppBarButton button;
                const auto executeFunc = [this]() { ExecuteRedoCommand(); };
                InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Redo), executeFunc);
                m_buttons[TextControlButtons::Redo] = button;
                return button;
            }
        case TextControlButtons::SelectAll:
            {
                winrt::AppBarButton button;
                const auto executeFunc = [this]() { ExecuteSelectAllCommand(); };

                auto command = winrt::StandardUICommand(winrt::StandardUICommandKind::SelectAll);
                command.IconSource(nullptr);

                InitializeButtonWithUICommand(button, command, executeFunc);

                m_buttons[TextControlButtons::SelectAll] = button;
                return button;
            }
        default:
            MUX_ASSERT(false);
            return nullptr;
        }
    }
}

TextControlButtons GetButtonsToAdd ( ) [private]

Definition at line 322 of file TextCommandBarFlyout.cpp.

{
    TextControlButtons buttonsToAdd = TextControlButtons::None;
    auto target = Target();

    if (auto textBoxTarget = target.try_as<winrt::TextBox>())
    {
        buttonsToAdd = GetTextBoxButtonsToAdd(textBoxTarget);
    }
    else if (auto textBlockTarget = target.try_as<winrt::TextBlock>())
    {
        buttonsToAdd = GetTextBlockButtonsToAdd(textBlockTarget);
    }
    else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
    {
        buttonsToAdd = GetRichEditBoxButtonsToAdd(richEditBoxTarget);
    }
    else if (auto richTextBlockTarget = target.try_as<winrt::RichTextBlock>())
    {
        buttonsToAdd = GetRichTextBlockButtonsToAdd(richTextBlockTarget);
    }
    else if (auto richTextBlockOverflowTarget = target.try_as<winrt::RichTextBlockOverflow>())
    {
        if (auto richTextBlockSource = richTextBlockOverflowTarget.ContentSource())
        {
            buttonsToAdd = GetRichTextBlockButtonsToAdd(richTextBlockSource);
        }
    }
    else if (auto passwordBoxTarget = target.try_as<winrt::PasswordBox>())
    {
        buttonsToAdd = GetPasswordBoxButtonsToAdd(passwordBoxTarget);
    }

    return buttonsToAdd;
}

TextControlButtons GetPasswordBoxButtonsToAdd ( winrt::PasswordBox const & passwordBox ) [static, private]

Definition at line 497 of file TextCommandBarFlyout.cpp.

{
    TextControlButtons buttonsToAdd = TextControlButtons::None;

    if (passwordBox.CanPasteClipboardContent())
    {
        buttonsToAdd |= TextControlButtons::Paste;
    }

    if (passwordBox.Password().size() > 0)
    {
        buttonsToAdd |= TextControlButtons::SelectAll;
    }

    return buttonsToAdd;
}

TextControlButtons GetRichEditBoxButtonsToAdd ( winrt::RichEditBox const & richEditBox ) [static, private]

Definition at line 415 of file TextCommandBarFlyout.cpp.

{
    TextControlButtons buttonsToAdd = TextControlButtons::None;
    auto document{ richEditBox.Document() };
    auto selection{ document ? document.Selection() : nullptr };

    if (!richEditBox.IsReadOnly())
    {
        const auto disabledFormattingAccelerators = richEditBox.DisabledFormattingAccelerators();

        if ((disabledFormattingAccelerators & winrt::DisabledFormattingAccelerators::Bold) != winrt::DisabledFormattingAccelerators::Bold)
        {
            buttonsToAdd |= TextControlButtons::Bold;
        }

        if ((disabledFormattingAccelerators & winrt::DisabledFormattingAccelerators::Italic) != winrt::DisabledFormattingAccelerators::Italic)
        {
            buttonsToAdd |= TextControlButtons::Italic;
        }

        if ((disabledFormattingAccelerators & winrt::DisabledFormattingAccelerators::Underline) != winrt::DisabledFormattingAccelerators::Underline)
        {
            buttonsToAdd |= TextControlButtons::Underline;
        }

        if (document && document.CanCopy() && selection && selection.Length() != 0)
        {
            buttonsToAdd |= TextControlButtons::Cut;
        }

        if (selection && selection.CanPaste(0))
        {
            buttonsToAdd |= TextControlButtons::Paste;
        }

        if (document && document.CanUndo())
        {
            buttonsToAdd |= TextControlButtons::Undo;
        }

        if (document && document.CanRedo())
        {
            buttonsToAdd |= TextControlButtons::Redo;
        }
    }

    if (document && document.CanCopy() && selection && selection.Length() != 0)
    {
        buttonsToAdd |= TextControlButtons::Copy;
    }

    if (document)
    {
        winrt::hstring text;
        document.GetText(winrt::TextGetOptions::None, text);

        if (text.size() > 0)
        {
            buttonsToAdd |= TextControlButtons::SelectAll;
        }
    }

    return buttonsToAdd;
}

TextControlButtons GetRichTextBlockButtonsToAdd ( winrt::RichTextBlock const & richTextBlock ) [static, private]

Definition at line 480 of file TextCommandBarFlyout.cpp.

{
    TextControlButtons buttonsToAdd = TextControlButtons::None;

    if (richTextBlock.SelectedText().size() > 0)
    {
        buttonsToAdd |= TextControlButtons::Copy;
    }

    if (richTextBlock.Blocks().Size() > 0)
    {
        buttonsToAdd |= TextControlButtons::SelectAll;
    }

    return buttonsToAdd;
}

TextControlButtons GetTextBlockButtonsToAdd ( winrt::TextBlock const & textBlock ) [static, private]

Definition at line 398 of file TextCommandBarFlyout.cpp.

{
    TextControlButtons buttonsToAdd = TextControlButtons::None;

    if (textBlock.SelectedText().size() > 0)
    {
        buttonsToAdd |= TextControlButtons::Copy;
    }

    if (textBlock.Text().size() > 0)
    {
        buttonsToAdd |= TextControlButtons::SelectAll;
    }

    return buttonsToAdd;
}

TextControlButtons GetTextBoxButtonsToAdd ( winrt::TextBox const & textBox ) [static, private]

Definition at line 358 of file TextCommandBarFlyout.cpp.

{
    TextControlButtons buttonsToAdd = TextControlButtons::None;

    if (!textBox.IsReadOnly())
    {
        if (textBox.SelectionLength() > 0)
        {
            buttonsToAdd |= TextControlButtons::Cut;
        }

        if (textBox.CanPasteClipboardContent())
        {
            buttonsToAdd |= TextControlButtons::Paste;
        }

        if (textBox.CanUndo())
        {
            buttonsToAdd |= TextControlButtons::Undo;
        }

        if (textBox.CanRedo())
        {
            buttonsToAdd |= TextControlButtons::Redo;
        }
    }

    if (textBox.SelectionLength() > 0)
    {
        buttonsToAdd |= TextControlButtons::Copy;
    }

    if (textBox.Text().size() > 0)
    {
        buttonsToAdd |= TextControlButtons::SelectAll;
    }

    return buttonsToAdd;
}

void InitializeButtonWithProperties | ( | winrt::ButtonBase const & | button,
 |  | ResourceIdType | labelResourceId,
 |  | ResourceIdType | acceleratorKeyResourceId,
 |  | ResourceIdType | descriptionResourceId,
 |  | std::function< void()> const & | executeFunc |
 | ) |  |  | [private]

Definition at line 51 of file TextCommandBarFlyout.cpp.

{
    winrt::AppBarButton elementAsButton = button.try_as<winrt::AppBarButton>();
    winrt::AppBarToggleButton elementAsToggleButton = button.try_as<winrt::AppBarToggleButton>();

    MUX_ASSERT(elementAsButton || elementAsToggleButton);

    if (!ResourceAccessor::IsResourceIdNull(labelResourceId))
    {
        winrt::hstring label{ ResourceAccessor::GetLocalizedStringResource(labelResourceId) };

        if (elementAsButton)
        {
            elementAsButton.Label(label);
        }
        else
        {
            elementAsToggleButton.Label(label);
        }
    }

    if (!ResourceAccessor::IsResourceIdNull(descriptionResourceId))
    {
        winrt::hstring description{ ResourceAccessor::GetLocalizedStringResource(descriptionResourceId) };

        winrt::AutomationProperties::SetHelpText(button, description);
        winrt::ToolTipService::SetToolTip(button, box_value(description));
    }

    if (elementAsToggleButton)
    {
        m_toggleButtonCheckedRevokers.push_back(elementAsToggleButton.Checked(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
        m_toggleButtonUncheckedRevokers.push_back(elementAsToggleButton.Unchecked(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
    }
    else
    {
        m_buttonClickRevokers.push_back(button.Click(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
    }

    if (!ResourceAccessor::IsResourceIdNull(acceleratorKeyResourceId))
    {
        winrt::hstring acceleratorKeyString{ ResourceAccessor::GetLocalizedStringResource(acceleratorKeyResourceId) };

        if (acceleratorKeyString.size() > 0)
        {
            WCHAR acceleratorKeyChar = acceleratorKeyString[0];
            winrt::VirtualKey acceleratorKey = SharedHelpers::GetVirtualKeyFromChar(acceleratorKeyChar);

            if (acceleratorKey != winrt::VirtualKey::None)
            {
                winrt::KeyboardAccelerator keyboardAccelerator;
                keyboardAccelerator.Key(acceleratorKey);
                keyboardAccelerator.Modifiers(winrt::VirtualKeyModifiers::Control);

                button.KeyboardAccelerators().Append(keyboardAccelerator);
            }
        }
    }
}

void InitializeButtonWithProperties | ( | winrt::ButtonBase const & | button,
 |  | ResourceIdType | labelResourceId,
 |  | winrt::Symbol const & | symbol,
 |  | ResourceIdType | acceleratorKeyResourceId,
 |  | ResourceIdType | descriptionResourceId,
 |  | std::function< void()> const & | executeFunc |
 | ) |  |  | [private]

Definition at line 116 of file TextCommandBarFlyout.cpp.

{
    InitializeButtonWithProperties(
        button,
        labelResourceId,
        acceleratorKeyResourceId,
        descriptionResourceId,
        executeFunc);

    winrt::AppBarButton elementAsButton = button.try_as<winrt::AppBarButton>();
    winrt::AppBarToggleButton elementAsToggleButton = button.try_as<winrt::AppBarToggleButton>();

    MUX_ASSERT(elementAsButton || elementAsToggleButton);

    winrt::SymbolIcon symbolIcon{ winrt::SymbolIcon(symbol) };

    if (elementAsButton)
    {
        elementAsButton.Icon(symbolIcon);
    }
    else
    {
        elementAsToggleButton.Icon(symbolIcon);
    }
}

void InitializeButtonWithUICommand | ( | winrt::ButtonBase const & | button,
 |  | winrt::XamlUICommand const & | uiCommand,
 |  | std::function< void()> const & | executeFunc |
 | ) |  |  | [private]

Definition at line 42 of file TextCommandBarFlyout.cpp.

{
    m_buttonCommandRevokers.push_back(uiCommand.ExecuteRequested(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
    button.Command(uiCommand);
}

bool IsButtonInPrimaryCommands ( TextControlButtons button ) [private]

Definition at line 514 of file TextCommandBarFlyout.cpp.

{
    uint32_t buttonIndex = 0;
    bool wasFound = PrimaryCommands().IndexOf(GetButton(button), buttonIndex);
    return wasFound;
}

void UpdateButtons ( ) [private]

Definition at line 148 of file TextCommandBarFlyout.cpp.

{
    PrimaryCommands().Clear();
    SecondaryCommands().Clear();

    const auto buttonsToAdd = GetButtonsToAdd();
    const auto addButtonToCommandsIfPresent =
        [buttonsToAdd, this](auto buttonType, auto commandsList)
        {
            if ((buttonsToAdd & buttonType) != TextControlButtons::None)
            {
                commandsList.Append(GetButton(buttonType));
            }
        };
    const auto addRichEditButtonToCommandsIfPresent =
        [buttonsToAdd, this](auto buttonType, auto commandsList, auto getIsChecked)
        {
            if ((buttonsToAdd & buttonType) != TextControlButtons::None)
            {
                auto richEditBoxTarget = Target().try_as<winrt::RichEditBox>();
                auto toggleButton{ GetButton(buttonType).as<winrt::AppBarToggleButton>() };
                auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };

                if (selection)
                {
                    auto initializingButtons = gsl::finally([this]()
                    {
                        m_isSettingToggleButtonState = false;
                    });
                    m_isSettingToggleButtonState = true;
                    toggleButton.IsChecked(getIsChecked(selection));
                }

                commandsList.Append(toggleButton);
            }
        };

    winrt::FlyoutBase proofingFlyout{ nullptr };

    if (auto textBoxTarget = Target().try_as<winrt::ITextBox>())
    {
        proofingFlyout = textBoxTarget.ProofingMenuFlyout();
    }
    else if (auto richEditBoxTarget = Target().try_as<winrt::IRichEditBox>())
    {
        proofingFlyout = richEditBoxTarget.ProofingMenuFlyout();
    }

    winrt::MenuFlyout proofingMenuFlyout = proofingFlyout.try_as<winrt::MenuFlyout>();

    bool shouldIncludeProofingMenu =
        static_cast<bool>(proofingFlyout) &&
        (!proofingMenuFlyout || proofingMenuFlyout.Items().Size() > 0);

    if (shouldIncludeProofingMenu)
    {
        m_proofingButton = winrt::AppBarButton{};
        m_proofingButton.Label(ResourceAccessor::GetLocalizedStringResource(SR_ProofingMenuItemLabel));
        m_proofingButton.Flyout(proofingFlyout);

        m_proofingButtonLoadedRevoker = m_proofingButton.Loaded(winrt::auto_revoke,
            [this](auto const&, auto const&)
            {
                // If we have a proofing menu, we'll start with it open by invoking the button
                // as soon as the CommandBar opening animation completes.
                // We invoke the button instead of just showing the flyout to make the button
                // properly update its visual state as well.
                // If we have an open animation that we'll be executing, we'll postpone showing
                // the proofing menu until it's given a chance to get underway.
                // Otherwise, we'll just show the proofing menu immediately.
                if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
                {
                    auto strongThis = get_strong();
                    auto openProofingMenuAction = [strongThis]()
                    {
                        // There isn't likely to be any way that the proofing button was deleted
                        // between us scheduling this action and us actually executing it,
                        // but it doesn't hurt to be resilient when we're scheduling an action
                        // to occur in the future.
                        if (strongThis->m_proofingButton)
                        {
                            auto peer = strongThis->m_proofingButton.OnCreateAutomationPeer().as<winrt::ButtonAutomationPeer>();
                            peer.Invoke();
                        }
                    };

                    if (commandBar->HasOpenAnimation() && commandBar->IsOpen())
                    {
                        // Allowing 100 ms to elapse before we open the proofing menu gives the proofing menu enough time
                        // to be mostly open when the proofing menu opens (so the menu doesn't look detached from the CommandBarFlyout UI),
                        // but doesn't wait long enough that there's a noticeable pause in between the user feeling like
                        // the CommandBarFlyout is fully open and the proofing menu finally opening.
                        // The exact number comes from design.
                        SharedHelpers::ScheduleActionAfterWait(openProofingMenuAction, 100);
                    }
                    else
                    {
                        openProofingMenuAction();
                    }
                }
            });

        // We want interactions with any proofing menu element to close the entire flyout,
        // same as interactions with secondary commands, so we'll attach click event handlers
        // to the proofing menu items (if they exist) to handle that.
        if (proofingMenuFlyout)
        {
            m_proofingMenuItemClickRevokers.clear();
            m_proofingMenuToggleItemClickRevokers.clear();

            const auto closeFlyoutFunc = [this](auto const& sender, auto const& args) { Hide(); };

            // We might encounter MenuFlyoutSubItems, so we'll add them to this list
            // in order to ensure that we hook up handlers to their entries as well.
            std::list<winrt::IVector<winrt::MenuFlyoutItemBase>> itemsList;
            itemsList.push_back(proofingMenuFlyout.Items());

            while (!itemsList.empty())
            {
                auto currentItems = itemsList.front();
                itemsList.pop_front();

                for (uint32_t i = 0; i < currentItems.Size(); i++)
                {
                    if (auto menuFlyoutItem = currentItems.GetAt(i).try_as<winrt::MenuFlyoutItem>())
                    {
                        m_proofingMenuItemClickRevokers.push_back(menuFlyoutItem.Click(winrt::auto_revoke, closeFlyoutFunc));
                    }
                    else if (auto toggleMenuFlyoutItem = currentItems.GetAt(i).try_as<winrt::ToggleMenuFlyoutItem>())
                    {
                        m_proofingMenuToggleItemClickRevokers.push_back(toggleMenuFlyoutItem.Click(winrt::auto_revoke, closeFlyoutFunc));
                    }
                    else if (auto menuFlyoutSubItem = currentItems.GetAt(i).try_as<winrt::MenuFlyoutSubItem>())
                    {
                        itemsList.push_back(menuFlyoutSubItem.Items());
                    }
                }
            }
        }

        SecondaryCommands().Append(m_proofingButton);
    }
    else
    {
        m_proofingButton = nullptr;
    }

    winrt::IFlyoutBase thisAsFlyoutBase = *this;

    auto commandListForCutCopyPaste =
        thisAsFlyoutBase && thisAsFlyoutBase.InputDevicePrefersPrimaryCommands() ?
        PrimaryCommands() :
        SecondaryCommands();

    addButtonToCommandsIfPresent(TextControlButtons::Cut, commandListForCutCopyPaste);
    addButtonToCommandsIfPresent(TextControlButtons::Copy, commandListForCutCopyPaste);
    addButtonToCommandsIfPresent(TextControlButtons::Paste, commandListForCutCopyPaste);

    addRichEditButtonToCommandsIfPresent(TextControlButtons::Bold, PrimaryCommands(),
        [](winrt::ITextSelection textSelection) { return textSelection.CharacterFormat().Bold() == winrt::FormatEffect::On; });
    addRichEditButtonToCommandsIfPresent(TextControlButtons::Italic, PrimaryCommands(),
        [](winrt::ITextSelection textSelection) { return textSelection.CharacterFormat().Italic() == winrt::FormatEffect::On; });
    addRichEditButtonToCommandsIfPresent(TextControlButtons::Underline, PrimaryCommands(),
        [](winrt::ITextSelection textSelection)
    {
        auto underline = textSelection.CharacterFormat().Underline();
        return (underline != winrt::UnderlineType::None) && (underline != winrt::UnderlineType::Undefined);
    });

    addButtonToCommandsIfPresent(TextControlButtons::Undo, SecondaryCommands());
    addButtonToCommandsIfPresent(TextControlButtons::Redo, SecondaryCommands());
    addButtonToCommandsIfPresent(TextControlButtons::SelectAll, SecondaryCommands());
}

Member Data Documentation

std::vector<winrt::ButtonBase::Click_revoker> m_buttonClickRevokers [private]

Definition at line 81 of file TextCommandBarFlyout.h.

std::vector<winrt::XamlUICommand::ExecuteRequested_revoker> m_buttonCommandRevokers [private]

Definition at line 78 of file TextCommandBarFlyout.h.

std::map<TextControlButtons, winrt::ICommandBarElement> m_buttons [private]

Definition at line 77 of file TextCommandBarFlyout.h.

bool m_isSettingToggleButtonState = false [private]

Definition at line 90 of file TextCommandBarFlyout.h.

std::vector<winrt::MenuFlyoutItem::Click_revoker> m_proofingMenuItemClickRevokers [private]

Definition at line 85 of file TextCommandBarFlyout.h.

std::vector<winrt::ToggleMenuFlyoutItem::Click_revoker> m_proofingMenuToggleItemClickRevokers [private]

Definition at line 88 of file TextCommandBarFlyout.h.

std::vector<winrt::ToggleButton::Checked_revoker> m_toggleButtonCheckedRevokers [private]

Definition at line 82 of file TextCommandBarFlyout.h.

std::vector<winrt::ToggleButton::Unchecked_revoker> m_toggleButtonUncheckedRevokers [private]

Definition at line 83 of file TextCommandBarFlyout.h.

The documentation for this class was generated from the following files:
  • CommandBarFlyout/TextCommandBarFlyout.h
  • CommandBarFlyout/TextCommandBarFlyout.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ThreadData Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Attributes

ThreadData Struct Reference

List of all members.

Public Attributes

winrt::com_ptr
< IDCompositionDevice > 		m_compositionDevice
wil::unique_hmodule | m_hmodDComp
winrt::com_ptr< IInkDesktopHost > | m_inkHost

Detailed Description

Definition at line 32 of file InkCanvas.cpp.

Member Data Documentation

winrt::com_ptr<IDCompositionDevice> m_compositionDevice

Definition at line 35 of file InkCanvas.cpp.

wil::unique_hmodule m_hmodDComp

Definition at line 36 of file InkCanvas.cpp.

winrt::com_ptr<IInkDesktopHost> m_inkHost

Definition at line 34 of file InkCanvas.cpp.

The documentation for this struct was generated from the following file:
  • InkCanvas/InkCanvas.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

TitleBar Class Reference

#include "TitleBar.h"

Inherits ReferenceTracker< TitleBar, winrt::implementation::TitleBarT >, and TitleBarProperties.

List of all members.

Public Member Functions

TitleBar ()
virtual | ~TitleBar ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)

Private Member Functions

void | LoadBackButton ()
void | LoadPaneToggleButton ()
void | OnBackButtonClick (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnInputActivationChanged (const winrt::InputActivationListener &sender, const winrt::InputActivationListenerActivationChangedEventArgs &args)
void | OnLayoutUpdated (const winrt::IInspectable &sender, const winrt::IInspectable &args)
void | OnPaneToggleButtonClick (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | UpdateBackButton ()
void | UpdateContent ()
void | UpdateDragRegion ()
void | UpdateFooter ()
void | UpdateHeader ()
void | UpdateHeaderSpacing ()
void | UpdateHeight ()
void | UpdateIcon ()
void | UpdateInteractableElementsList ()
void | UpdatePadding ()
void | UpdatePaneToggleButton ()
void | UpdateSubtitle ()
void | UpdateTheme ()
void | UpdateTitle ()

Private Attributes

winrt::InputActivationListener | m_inputActivationListener = nullptr

Detailed Description

Definition at line 12 of file TitleBar.h.

Constructor & Destructor Documentation

TitleBar ( )

Definition at line 12 of file TitleBar.cpp.

{
    SetValue(s_TemplateSettingsProperty, winrt::make<::TitleBarTemplateSettings>());

    SetDefaultStyleKey(this);

    SizeChanged({ this, &TitleBar::OnSizeChanged });
    LayoutUpdated({ this, &TitleBar::OnLayoutUpdated });

    if (const winrt::IFrameworkElement frameworkElement = *this)
    {
        m_actualThemeChangedRevoker = frameworkElement.ActualThemeChanged(winrt::auto_revoke,
                [this](auto&&, auto&&) { UpdateTheme(); });
    }
}

~TitleBar ( ) [virtual]

Definition at line 28 of file TitleBar.cpp.

{
    if (m_inputActivationChangedToken.value)
    {
        m_inputActivationListener.InputActivationChanged(m_inputActivationChangedToken);
        m_inputActivationChangedToken.value = 0;
    }
}

Member Function Documentation

void LoadBackButton ( ) [private]

Definition at line 544 of file TitleBar.cpp.

{
    m_backButton.set(GetTemplateChildT<winrt::Button>(s_backButtonPartName, *this));

    if (const auto backButton = m_backButton.get())
    {
        m_backButtonClickRevoker = backButton.Click(winrt::auto_revoke, { this, &TitleBar::OnBackButtonClick });

        // Do localization for the back button
        if (winrt::AutomationProperties::GetName(backButton).empty())
        {
            const auto backButtonName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationBackButtonName);
            winrt::AutomationProperties::SetName(backButton, backButtonName);
        }

        // Setup the tooltip for the back button
        const auto tooltip = winrt::ToolTip();
        const auto backButtonTooltipText = ResourceAccessor::GetLocalizedStringResource(SR_NavigationBackButtonToolTip);
        tooltip.Content(box_value(backButtonTooltipText));
        winrt::ToolTipService::SetToolTip(backButton, tooltip);
    }
}

void LoadPaneToggleButton ( ) [private]

Definition at line 567 of file TitleBar.cpp.

{
    m_paneToggleButton.set(GetTemplateChildT<winrt::Button>(s_paneToggleButtonPartName, *this));

    if (const auto paneToggleButton = m_paneToggleButton.get())
    {
        m_paneToggleButtonClickRevoker = paneToggleButton.Click(winrt::auto_revoke, { this, &TitleBar::OnPaneToggleButtonClick });

        // Do localization for paneToggleButton
        if (winrt::AutomationProperties::GetName(paneToggleButton).empty())
        {
            const auto paneToggleButtonName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationButtonToggleName);
            winrt::AutomationProperties::SetName(paneToggleButton, paneToggleButtonName);
        }

        // Setup the tooltip for the paneToggleButton
        const auto tooltip = winrt::ToolTip();
        tooltip.Content(box_value(winrt::AutomationProperties::GetName(paneToggleButton)));
        winrt::ToolTipService::SetToolTip(paneToggleButton, tooltip);
    }
}

void OnApplyTemplate ( )

Definition at line 42 of file TitleBar.cpp.

{
    __super::OnApplyTemplate();

    winrt::IControlProtected controlProtected{ *this };

    m_leftPaddingColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(s_leftPaddingColumnName, controlProtected));
    m_rightPaddingColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(s_rightPaddingColumnName, controlProtected));

    if (const auto xamlRoot = XamlRoot())
    {
        if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
        {
            const auto appWindowId = contentIslandEnvironment.AppWindowId();

            if (appWindowId.Value != 0)
            {
                m_inputActivationListener = winrt::Microsoft::UI::Input::InputActivationListener::GetForWindowId(appWindowId);
                m_inputActivationChangedToken = m_inputActivationListener.InputActivationChanged({ this, &TitleBar::OnInputActivationChanged });
            }
        }
    }

    UpdateHeight();
    UpdatePadding();
    UpdateIcon();
    UpdateBackButton();
    UpdatePaneToggleButton();
    UpdateTheme();
    UpdateTitle();
    UpdateSubtitle();
    UpdateHeader();
    UpdateContent();
    UpdateFooter();
    UpdateInteractableElementsList();
}

void OnBackButtonClick | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 206 of file TitleBar.cpp.

{
    m_backRequestedEventSource(*this, nullptr);
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 37 of file TitleBar.cpp.

{
    return winrt::make<TitleBarAutomationPeer>(*this);
}

void OnInputActivationChanged | ( | const winrt::InputActivationListener & | sender,
 |  | const winrt::InputActivationListenerActivationChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 153 of file TitleBar.cpp.

{
    bool isDeactivated = sender.State() == winrt::InputActivationState::Deactivated;

    if (IsBackButtonVisible() && IsBackEnabled())
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_backButtonDeactivatedVisualStateName : s_backButtonVisibleVisualStateName, false);
    }

    if (IsPaneToggleButtonVisible())
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_paneToggleButtonDeactivatedVisualStateName : s_paneToggleButtonVisibleVisualStateName, false);
    }

    if (IconSource() != nullptr)
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_iconDeactivatedVisualStateName : s_iconVisibleVisualStateName, false);
    }

    if (!Title().empty())
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_titleTextDeactivatedVisualStateName : s_titleTextVisibleVisualStateName, false);
    }

    if (!Subtitle().empty())
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_subtitleTextDeactivatedVisualStateName : s_subtitleTextVisibleVisualStateName, false);
    }

    if (Header() != nullptr)
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_headerDeactivatedVisualStateName : s_headerVisibleVisualStateName, false);
    }

    if (Content() != nullptr)
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_contentDeactivatedVisualStateName : s_contentVisibleVisualStateName, false);
    }

    if (Footer() != nullptr)
    {
        winrt::VisualStateManager::GoToState(*this,
            isDeactivated ? s_footerDeactivatedVisualStateName : s_footerVisibleVisualStateName, false);
    }
}

void OnLayoutUpdated | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | args |
 | ) |  |  | [private]

Definition at line 148 of file TitleBar.cpp.

{
    UpdateDragRegion();
}

void OnPaneToggleButtonClick | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 211 of file TitleBar.cpp.

{
    m_paneToggleRequestedEventSource(*this, nullptr);
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 79 of file TitleBar.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_IsBackButtonVisibleProperty)
    {
        UpdateBackButton();
    }
    else if (property == s_IsBackEnabledProperty)
    {
        UpdateInteractableElementsList();
    }
    else if (property == s_IsPaneToggleButtonVisibleProperty)
    {
        UpdatePaneToggleButton();
    }
    if (property == s_IconSourceProperty)
    {
        UpdateIcon();
    }
    else if (property == s_TitleProperty)
    {
        UpdateTitle();
    }
    else if (property == s_SubtitleProperty)
    {
        UpdateSubtitle();
    }
    if (property == s_HeaderProperty)
    {
        UpdateHeader();
    }
    else if (property == s_ContentProperty)
    {
        UpdateContent();
    }
    else if (property == s_FooterProperty)
    {
        UpdateFooter();
    }
}

void OnSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 121 of file TitleBar.cpp.

{
    if (Content() != nullptr)
    {
        const auto contentArea = m_contentArea.get();
        const auto contentAreaGrid = m_contentAreaGrid.get();

        if (contentArea && contentAreaGrid)
        {
            if (!m_compactModeThresholdWidth && contentArea.DesiredSize().Width >= contentAreaGrid.ActualWidth())
            {
                m_compactModeThresholdWidth = args.NewSize().Width;
                winrt::VisualStateManager::GoToState(*this, s_compactVisualStateName, false);
            }
            else if (args.NewSize().Width >= m_compactModeThresholdWidth)
            {
                m_compactModeThresholdWidth = 0.0;
                winrt::VisualStateManager::GoToState(*this, s_expandedVisualStateName, false);
                UpdateTitle();
                UpdateSubtitle();
            }
        }
    }

    UpdateDragRegion();
}

void UpdateBackButton ( ) [private]

Definition at line 231 of file TitleBar.cpp.

{
    if (IsBackButtonVisible())
    {
        if (!m_backButton.get())
        {
            LoadBackButton();
        }

        winrt::VisualStateManager::GoToState(*this, s_backButtonVisibleVisualStateName, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, s_backButtonCollapsedVisualStateName, false);
    }

    UpdateInteractableElementsList();
    UpdateHeaderSpacing();
}

void UpdateContent ( ) [private]

Definition at line 393 of file TitleBar.cpp.

{
    if (Content() == nullptr)
    {
        winrt::VisualStateManager::GoToState(*this, s_contentCollapsedVisualStateName, false);
    }
    else
    {
        if (!m_contentArea.get())
        {
            winrt::IControlProtected controlProtected{ *this };

            m_contentAreaGrid.set(GetTemplateChildT<winrt::Grid>(s_contentPresenterGridPartName, controlProtected));
            m_contentArea.set(GetTemplateChildT<winrt::FrameworkElement>(s_contentPresenterPartName, controlProtected));
        }

        winrt::VisualStateManager::GoToState(*this, s_contentVisibleVisualStateName, false);
    }

    UpdateHeight();
    UpdateInteractableElementsList();
}

void UpdateDragRegion ( ) [private]

Definition at line 437 of file TitleBar.cpp.

{
    if (const auto xamlRoot = XamlRoot())
    {
        if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
        {
            auto appWindowId = contentIslandEnvironment.AppWindowId();
            winrt::InputNonClientPointerSource nonClientPointerSource = winrt::InputNonClientPointerSource::GetForWindowId(appWindowId);

            if (!m_interactableElementsList.empty())
            {
                std::vector<winrt::Windows::Graphics::RectInt32> passthroughRects;

                // Get rects for each interactable element in TitleBar.
                for (const auto frameworkElement : m_interactableElementsList)
                {
                    const auto transformBounds = frameworkElement.TransformToVisual(nullptr);
                    const auto width = frameworkElement.ActualWidth();
                    const auto height = frameworkElement.ActualHeight();
                    const auto bounds = transformBounds.TransformBounds(winrt::Rect{
                        0.0f,
                        0.0f,
                        static_cast<float>(width),
                        static_cast<float>(height) });

                    if (bounds.X < 0 || bounds.Y < 0)
                    {
                        continue;
                    }

                    const auto scale = xamlRoot.RasterizationScale();
                    const auto transparentRect = winrt::Windows::Graphics::RectInt32{
                        static_cast<int32_t>(bounds.X * scale),
                        static_cast<int32_t>(bounds.Y * scale),
                        static_cast<int32_t>(bounds.Width * scale),
                        static_cast<int32_t>(bounds.Height * scale),
                    };

                    passthroughRects.push_back(transparentRect);
                }

                // Set list of rects as passthrough regions for the non-client area.
                nonClientPointerSource.SetRegionRects(winrt::NonClientRegionKind::Passthrough, passthroughRects);
            }
            else
            {
                // There is no interactable areas. Clear previous passthrough rects.
                nonClientPointerSource.ClearRegionRects(winrt::NonClientRegionKind::Passthrough);
            }
        }
    }
}

void UpdateFooter ( ) [private]

Definition at line 416 of file TitleBar.cpp.

{
    if (Footer() == nullptr)
    {
        winrt::VisualStateManager::GoToState(*this, s_footerCollapsedVisualStateName, false);
    }
    else
    {
        if (!m_footerArea.get())
        {
            m_footerArea.set(GetTemplateChildT<winrt::FrameworkElement>(s_footerPresenterPartName, *this));
        }
        winrt::VisualStateManager::GoToState(*this, s_footerVisibleVisualStateName, false);
    }

    UpdateHeight();
    UpdateInteractableElementsList();
}

void UpdateHeader ( ) [private]

Definition at line 374 of file TitleBar.cpp.

{
    if (Header() == nullptr)
    {
        winrt::VisualStateManager::GoToState(*this, s_headerCollapsedVisualStateName, false);
    }
    else
    {
        if (!m_headerArea.get())
        {
            m_headerArea.set(GetTemplateChildT<winrt::FrameworkElement>(s_headerContentPresenterPartName, *this));
        }
        winrt::VisualStateManager::GoToState(*this, s_headerVisibleVisualStateName, false);
    }

    UpdateHeight();
    UpdateInteractableElementsList();
}

void UpdateHeaderSpacing ( ) [private]

Definition at line 535 of file TitleBar.cpp.

{
    winrt::VisualStateManager::GoToState(
        *this,
        IsBackButtonVisible() == IsPaneToggleButtonVisible() ?
        s_defaultSpacingVisualStateName : s_negativeInsetVisualStateName,
        false);
}

void UpdateHeight ( ) [private]

Definition at line 271 of file TitleBar.cpp.

{
    winrt::VisualStateManager::GoToState(*this,
        (Content() == nullptr && Header() == nullptr && Footer() == nullptr) ?
        s_compactHeightVisualStateName : s_expandedHeightVisualStateName,
        false);
}

void UpdateIcon ( ) [private]

Definition at line 216 of file TitleBar.cpp.

{
    auto const templateSettings = winrt::get_self<::TitleBarTemplateSettings>(TemplateSettings());
    if (auto const source = IconSource())
    {
        templateSettings->IconElement(SharedHelpers::MakeIconElementFrom(source));
        winrt::VisualStateManager::GoToState(*this, s_iconVisibleVisualStateName, false);
    }
    else
    {
        templateSettings->IconElement(nullptr);
        winrt::VisualStateManager::GoToState(*this, s_iconCollapsedVisualStateName, false);
    }
}

void UpdateInteractableElementsList ( ) [private]

Definition at line 490 of file TitleBar.cpp.

{
    m_interactableElementsList.clear();

    if (IsBackButtonVisible() && IsBackEnabled())
    {
        if (const auto backButton = m_backButton.get())
        {
            m_interactableElementsList.push_back(backButton);
        }
    }

    if (IsPaneToggleButtonVisible())
    {
        if (const auto paneToggleButton = m_paneToggleButton.get())
        {
            m_interactableElementsList.push_back(paneToggleButton);
        }
    }

    if (Header() != nullptr)
    {
        if (const auto headerArea = m_headerArea.get())
        {
            m_interactableElementsList.push_back(headerArea);
        }
    }

    if (Content() != nullptr)
    {
        if (const auto contentArea = m_contentArea.get())
        {
            m_interactableElementsList.push_back(contentArea);
        }
    }

    if (Footer() != nullptr)
    {
        if (const auto footerArea = m_footerArea.get())
        {
            m_interactableElementsList.push_back(footerArea);
        }
    }
}

void UpdatePadding ( ) [private]

Definition at line 279 of file TitleBar.cpp.

{
    if (const auto xamlRoot = XamlRoot())
    {
        if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
        {
            const auto appWindowId = contentIslandEnvironment.AppWindowId();
            const winrt::Microsoft::UI::Windowing::AppWindow appWindow = winrt::Microsoft::UI::Windowing::AppWindow::GetFromWindowId(appWindowId);

            if (const auto appTitleBar = appWindow.TitleBar())
            {
                // TODO 50724421: Bind to appTitleBar Left and Right inset changed event.
                if (const auto leftColumn = m_leftPaddingColumn.get())
                {
                    leftColumn.Width(winrt::GridLengthHelper::FromPixels(appTitleBar.LeftInset()));
                }

                if (const auto rightColumn = m_rightPaddingColumn.get())
                {
                    rightColumn.Width(winrt::GridLengthHelper::FromPixels(appTitleBar.RightInset()));
                }
            }
        }
    }
}

void UpdatePaneToggleButton ( ) [private]

Definition at line 251 of file TitleBar.cpp.

{
    if (IsPaneToggleButtonVisible())
    {
        if (!m_paneToggleButton.get())
        {
            LoadPaneToggleButton();
        }

        winrt::VisualStateManager::GoToState(*this, s_paneToggleButtonVisibleVisualStateName, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, s_paneToggleButtonCollapsedVisualStateName, false);
    }

    UpdateInteractableElementsList();
    UpdateHeaderSpacing();
}

void UpdateSubtitle ( ) [private]

Definition at line 361 of file TitleBar.cpp.

{
    const winrt::hstring titleText = Title();
    if (titleText.empty())
    {
        winrt::VisualStateManager::GoToState(*this, s_subtitleTextCollapsedVisualStateName, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, s_subtitleTextVisibleVisualStateName, false);
    }
}

void UpdateTheme ( ) [private]

Definition at line 305 of file TitleBar.cpp.

{
    if (const auto xamlRoot = XamlRoot())
    {
        if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
        {
            const auto appWindowId = contentIslandEnvironment.AppWindowId();
            const winrt::Microsoft::UI::Windowing::AppWindow appWindow = winrt::Microsoft::UI::Windowing::AppWindow::GetFromWindowId(appWindowId);

            // AppWindow TitleBar's caption buttons does not update colors with theme change.
            // We need to set them here.
            if (const auto appTitleBar = appWindow.TitleBar())
            {
                // Rest colors.
                const auto buttonForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonForegroundColorName)).as<winrt::Color>();
                appTitleBar.ButtonForegroundColor(buttonForegroundColor);

                const auto buttonBackgroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonBackgroundColorName)).as<winrt::Color>();
                appTitleBar.ButtonBackgroundColor(buttonBackgroundColor);
                appTitleBar.ButtonInactiveBackgroundColor(buttonBackgroundColor);

                // Hover colors.
                const auto buttonHoverForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonHoverForegroundColorName)).as<winrt::Color>();
                appTitleBar.ButtonHoverForegroundColor(buttonHoverForegroundColor);

                const auto buttonHoverBackgroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonHoverBackgroundColorName)).as<winrt::Color>();
                appTitleBar.ButtonHoverBackgroundColor(buttonHoverBackgroundColor);

                // Pressed colors.
                const auto buttonPressedForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonPressedForegroundColorName)).as<winrt::Color>();
                appTitleBar.ButtonPressedForegroundColor(buttonPressedForegroundColor);

                const auto buttonPressedBackgroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonPressedBackgroundColorName)).as<winrt::Color>();
                appTitleBar.ButtonPressedBackgroundColor(buttonPressedBackgroundColor);

                // Inactive foreground.
                const auto buttonInactiveForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonInactiveForegroundColorName)).as<winrt::Color>();
                appTitleBar.ButtonInactiveForegroundColor(buttonInactiveForegroundColor);
            }
        }
    }
}

void UpdateTitle ( ) [private]

Definition at line 348 of file TitleBar.cpp.

{
    const winrt::hstring titleText = Title();
    if (titleText.empty())
    {
        winrt::VisualStateManager::GoToState(*this, s_titleTextCollapsedVisualStateName, false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, s_titleTextVisibleVisualStateName, false);
    }
}

Member Data Documentation

winrt::InputActivationListener m_inputActivationListener = nullptr [private]

Definition at line 62 of file TitleBar.h.

The documentation for this class was generated from the following files:
  • TitleBar/TitleBar.h
  • TitleBar/TitleBar.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TitleBarAutomationPeer Class Reference

#include "TitleBarAutomationPeer.h"

Inherits ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT >.

List of all members.

Public Member Functions

TitleBarAutomationPeer (winrt::TitleBar const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
winrt::hstring | GetNameCore ()

Detailed Description

Definition at line 5 of file TitleBarAutomationPeer.h.

Constructor & Destructor Documentation

TitleBarAutomationPeer ( winrt::TitleBar const & owner )

Definition at line 9 of file TitleBarAutomationPeer.cpp.

                                                                         : ReferenceTracker(owner)
{
}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 13 of file TitleBarAutomationPeer.cpp.

{
    return winrt::AutomationControlType::TitleBar;
}

winrt::hstring GetClassNameCore ( )

Definition at line 18 of file TitleBarAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::TitleBar>();
}

winrt::hstring GetNameCore ( )

Definition at line 23 of file TitleBarAutomationPeer.cpp.

{
    winrt::hstring name = __super::GetNameCore();

    if (name.empty())
    {
        if (auto titleBar = Owner().try_as<winrt::TitleBar>())
        {
            name = titleBar.Title();
        }
    }

    return name;
}

The documentation for this class was generated from the following files:
  • TitleBar/TitleBarAutomationPeer.h
  • TitleBar/TitleBarAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

TitleBarProperties Class Reference

#include "TitleBar.properties.h"

Inherited by TitleBar.

List of all members.

Public Member Functions

TitleBarProperties ()
winrt::event_token | BackRequested (winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const &value)
void | BackRequested (winrt::event_token const &token)
void | Content (winrt::IInspectable const &value)
winrt::IInspectable | Content ()
void | Footer (winrt::IInspectable const &value)
winrt::IInspectable | Footer ()
void | Header (winrt::IInspectable const &value)
winrt::IInspectable | Header ()
void | IconSource (winrt::IconSource const &value)
winrt::IconSource | IconSource ()
void | IsBackButtonVisible (bool value)
bool | IsBackButtonVisible ()
void | IsBackEnabled (bool value)
bool | IsBackEnabled ()
bool | IsPaneToggleButtonVisible ()
void | IsPaneToggleButtonVisible (bool value)
void | PaneToggleRequested (winrt::event_token const &token)
winrt::event_token | PaneToggleRequested (winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const &value)
winrt::hstring | Subtitle ()
void | Subtitle (winrt::hstring const &value)
void | TemplateSettings (winrt::TitleBarTemplateSettings const &value)
winrt::TitleBarTemplateSettings | TemplateSettings ()
winrt::hstring | Title ()
void | Title (winrt::hstring const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ContentProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | FooterProperty ()
static winrt::DependencyProperty | HeaderProperty ()
static winrt::DependencyProperty | IconSourceProperty ()
static winrt::DependencyProperty | IsBackButtonVisibleProperty ()
static winrt::DependencyProperty | IsBackEnabledProperty ()
static winrt::DependencyProperty | IsPaneToggleButtonVisibleProperty ()
static void | OnContentPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnFooterPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnHeaderPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIconSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsBackButtonVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsBackEnabledPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsPaneToggleButtonVisiblePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSubtitlePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTemplateSettingsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTitlePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SubtitleProperty ()
static winrt::DependencyProperty | TemplateSettingsProperty ()
static winrt::DependencyProperty | TitleProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::TitleBar,
winrt::IInspectable > > 		m_backRequestedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TitleBar,
winrt::IInspectable > > 		m_paneToggleRequestedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_ContentProperty
static GlobalDependencyProperty | s_FooterProperty
static GlobalDependencyProperty | s_HeaderProperty
static GlobalDependencyProperty | s_IconSourceProperty
static GlobalDependencyProperty | s_IsBackButtonVisibleProperty
static GlobalDependencyProperty | s_IsBackEnabledProperty
static GlobalDependencyProperty | s_IsPaneToggleButtonVisibleProperty
static GlobalDependencyProperty | s_SubtitleProperty
static GlobalDependencyProperty | s_TemplateSettingsProperty
static GlobalDependencyProperty | s_TitleProperty

Detailed Description

Definition at line 7 of file TitleBar.properties.h.

Constructor & Destructor Documentation

TitleBarProperties ( )

Definition at line 27 of file TitleBar.properties.cpp.

    : m_backRequestedEventSource{static_cast<TitleBar*>(this)}

Member Function Documentation

winrt::event_token BackRequested ( winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const & value )
void BackRequested ( winrt::event_token const & token )
static void ClearProperties ( ) [static]
winrt::IInspectable Content ( )
void Content ( winrt::IInspectable const & value )
static winrt::DependencyProperty ContentProperty ( ) [inline, static]

Definition at line 42 of file TitleBar.properties.h.

{ return s_ContentProperty; }

static void EnsureProperties ( ) [static]
winrt::IInspectable Footer ( )
void Footer ( winrt::IInspectable const & value )
static winrt::DependencyProperty FooterProperty ( ) [inline, static]

Definition at line 43 of file TitleBar.properties.h.

{ return s_FooterProperty; }

void Header ( winrt::IInspectable const & value )
winrt::IInspectable Header ( )
static winrt::DependencyProperty HeaderProperty ( ) [inline, static]

Definition at line 44 of file TitleBar.properties.h.

{ return s_HeaderProperty; }

winrt::IconSource IconSource ( )
void IconSource ( winrt::IconSource const & value )
static winrt::DependencyProperty IconSourceProperty ( ) [inline, static]

Definition at line 45 of file TitleBar.properties.h.

{ return s_IconSourceProperty; }

void IsBackButtonVisible ( bool value )
bool IsBackButtonVisible ( )
static winrt::DependencyProperty IsBackButtonVisibleProperty ( ) [inline, static]

Definition at line 46 of file TitleBar.properties.h.

{ return s_IsBackButtonVisibleProperty; }

void IsBackEnabled ( bool value )
bool IsBackEnabled ( )
static winrt::DependencyProperty IsBackEnabledProperty ( ) [inline, static]

Definition at line 47 of file TitleBar.properties.h.

{ return s_IsBackEnabledProperty; }

void IsPaneToggleButtonVisible ( bool value )
bool IsPaneToggleButtonVisible ( )
static winrt::DependencyProperty IsPaneToggleButtonVisibleProperty ( ) [inline, static]

Definition at line 48 of file TitleBar.properties.h.

{ return s_IsPaneToggleButtonVisibleProperty; }

static void OnContentPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnFooterPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnHeaderPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIconSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsBackButtonVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsBackEnabledPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnIsPaneToggleButtonVisiblePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSubtitlePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTemplateSettingsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTitlePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void PaneToggleRequested ( winrt::event_token const & token )
winrt::event_token PaneToggleRequested ( winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const & value )
void Subtitle ( winrt::hstring const & value )
winrt::hstring Subtitle ( )
static winrt::DependencyProperty SubtitleProperty ( ) [inline, static]

Definition at line 49 of file TitleBar.properties.h.

{ return s_SubtitleProperty; }

winrt::TitleBarTemplateSettings TemplateSettings ( )
void TemplateSettings ( winrt::TitleBarTemplateSettings const & value )
static winrt::DependencyProperty TemplateSettingsProperty ( ) [inline, static]

Definition at line 50 of file TitleBar.properties.h.

{ return s_TemplateSettingsProperty; }

void Title ( winrt::hstring const & value )
winrt::hstring Title ( )
static winrt::DependencyProperty TitleProperty ( ) [inline, static]

Definition at line 51 of file TitleBar.properties.h.

{ return s_TitleProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable> > m_backRequestedEventSource

Definition at line 69 of file TitleBar.properties.h.

event_source<winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable> > m_paneToggleRequestedEventSource

Definition at line 70 of file TitleBar.properties.h.

GlobalDependencyProperty s_ContentProperty [static]

Definition at line 53 of file TitleBar.properties.h.

GlobalDependencyProperty s_FooterProperty [static]

Definition at line 54 of file TitleBar.properties.h.

GlobalDependencyProperty s_HeaderProperty [static]

Definition at line 55 of file TitleBar.properties.h.

GlobalDependencyProperty s_IconSourceProperty [static]

Definition at line 56 of file TitleBar.properties.h.

GlobalDependencyProperty s_IsBackButtonVisibleProperty [static]

Definition at line 57 of file TitleBar.properties.h.

GlobalDependencyProperty s_IsBackEnabledProperty [static]

Definition at line 58 of file TitleBar.properties.h.

GlobalDependencyProperty s_IsPaneToggleButtonVisibleProperty [static]

Definition at line 59 of file TitleBar.properties.h.

GlobalDependencyProperty s_SubtitleProperty [static]

Definition at line 60 of file TitleBar.properties.h.

GlobalDependencyProperty s_TemplateSettingsProperty [static]

Definition at line 61 of file TitleBar.properties.h.

GlobalDependencyProperty s_TitleProperty [static]

Definition at line 62 of file TitleBar.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TitleBar.properties.h
  • Generated/TitleBar.properties.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TitleBarTemplateSettings Class Reference

#include "TitleBarTemplateSettings.h"

Inherits TitleBarTemplateSettingsProperties.

List of all members.

Public Member Functions

TitleBarTemplateSettings ()

Detailed Description

Definition at line 9 of file TitleBarTemplateSettings.h.

Constructor & Destructor Documentation

TitleBarTemplateSettings ( )

Definition at line 8 of file TitleBarTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • TitleBar/TitleBarTemplateSettings.h
  • TitleBar/TitleBarTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

TitleBarTemplateSettingsProperties Class Reference

#include "TitleBarTemplateSettings.properties.h"

Inherited by TitleBarTemplateSettings.

List of all members.

Public Member Functions

TitleBarTemplateSettingsProperties ()
winrt::IconElement | IconElement ()
void | IconElement (winrt::IconElement const &value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IconElementProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_IconElementProperty

Detailed Description

Definition at line 7 of file TitleBarTemplateSettings.properties.h.

Constructor & Destructor Documentation

TitleBarTemplateSettingsProperties ( )

Definition at line 18 of file TitleBarTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file TitleBarTemplateSettings.properties.cpp.

{
    s_IconElementProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file TitleBarTemplateSettings.properties.cpp.

{
    if (!s_IconElementProperty)
    {
        s_IconElementProperty =
            InitializeDependencyProperty(
                L"IconElement",
                winrt::name_of<winrt::IconElement>(),
                winrt::name_of<winrt::TitleBarTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::IconElement IconElement ( )

Definition at line 51 of file TitleBarTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<TitleBarTemplateSettings*>(this)->GetValue(s_IconElementProperty));
}

void IconElement ( winrt::IconElement const & value )

Definition at line 43 of file TitleBarTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TitleBarTemplateSettings*>(this)->SetValue(s_IconElementProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IconElementProperty ( ) [inline, static]

Definition at line 15 of file TitleBarTemplateSettings.properties.h.

{ return s_IconElementProperty; }

Member Data Documentation

GlobalDependencyProperty s_IconElementProperty [static]

Definition at line 17 of file TitleBarTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TitleBarTemplateSettings.properties.h
  • Generated/TitleBarTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ToggleSplitButton Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ToggleSplitButton Class Reference

#include "ToggleSplitButton.h"

Inherits ToggleSplitButtonProperties.

List of all members.

Public Member Functions

ForwardRefToBaseReferenceTracker (SplitButton) ToggleSplitButton()
bool | InternalIsChecked () override
void | OnApplyTemplate ()
void | OnClickPrimary (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) override
winrt::AutomationPeer | OnCreateAutomationPeer () override
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | Toggle ()

Private Member Functions

void | OnIsCheckedChanged ()

Detailed Description

Definition at line 13 of file ToggleSplitButton.h.

Member Function Documentation

ForwardRefToBaseReferenceTracker ( SplitButton )
bool InternalIsChecked ( ) [override]

Definition at line 60 of file ToggleSplitButton.cpp.

{
    return IsChecked();
}

void OnApplyTemplate ( )
void OnClickPrimary | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [override]

Definition at line 53 of file ToggleSplitButton.cpp.

{
    Toggle();

    __super::OnClickPrimary(sender, args);
}

winrt::AutomationPeer OnCreateAutomationPeer ( ) [override]

Definition at line 30 of file ToggleSplitButton.cpp.

{
    return winrt::make<ToggleSplitButtonAutomationPeer>(*this);
}

void OnIsCheckedChanged ( ) [private]

Definition at line 35 of file ToggleSplitButton.cpp.

{
    if (m_hasLoaded)
    {
        auto eventArgs = winrt::make_self<ToggleSplitButtonIsCheckedChangedEventArgs>();
        m_isCheckedChangedEventSource(*this, *eventArgs);

        if (auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
        {
            const auto newValue = IsChecked() ? winrt::ToggleState::On : winrt::ToggleState::Off;
            const auto oldValue = (newValue == winrt::ToggleState::On) ? winrt::ToggleState::Off : winrt::ToggleState::On;
            peer.RaisePropertyChangedEvent(winrt::TogglePatternIdentifiers::ToggleStateProperty(), box_value(oldValue), box_value(newValue));
        }
    }

    UpdateVisualStates();
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 20 of file ToggleSplitButton.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_IsCheckedProperty)
    {
        OnIsCheckedChanged();
    }
}

void Toggle ( )

Definition at line 65 of file ToggleSplitButton.cpp.

{
    IsChecked(!IsChecked());
}

The documentation for this class was generated from the following files:
  • SplitButton/ToggleSplitButton.h
  • SplitButton/ToggleSplitButton.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ToggleSplitButtonAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ToggleSplitButtonAutomationPeer Class Reference

#include "ToggleSplitButtonAutomationPeer.h"

Inherits ReferenceTracker< ToggleSplitButtonAutomationPeer, winrt::implementation::ToggleSplitButtonAutomationPeerT >.

List of all members.

Public Member Functions

ToggleSplitButtonAutomationPeer (winrt::ToggleSplitButton const &owner)
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
hstring | GetClassNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
void | Toggle ()
winrt::ToggleState | ToggleState ()

Private Member Functions

com_ptr< ToggleSplitButton > | GetImpl ()

Detailed Description

Definition at line 9 of file ToggleSplitButtonAutomationPeer.h.

Constructor & Destructor Documentation

ToggleSplitButtonAutomationPeer ( winrt::ToggleSplitButton const & owner )

Definition at line 13 of file ToggleSplitButtonAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

void Collapse ( )

Definition at line 76 of file ToggleSplitButtonAutomationPeer.cpp.

{
    if (auto splitButton = GetImpl())
    {
        splitButton->CloseFlyout();
    }
}

void Expand ( )

Definition at line 68 of file ToggleSplitButtonAutomationPeer.cpp.

{
    if (auto splitButton = GetImpl())
    {
        splitButton->OpenFlyout();
    }
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 53 of file ToggleSplitButtonAutomationPeer.cpp.

{
    winrt::ExpandCollapseState currentState = winrt::ExpandCollapseState::Collapsed;

    if (auto splitButton = GetImpl())
    {
        if (splitButton->IsFlyoutOpen())
        {
            currentState = winrt::ExpandCollapseState::Expanded;
        }
    }

    return currentState;
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 35 of file ToggleSplitButtonAutomationPeer.cpp.

{
    return winrt::AutomationControlType::SplitButton;
}

hstring GetClassNameCore ( )

Definition at line 30 of file ToggleSplitButtonAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::ToggleSplitButton>();
}

com_ptr< ToggleSplitButton > GetImpl ( ) [private]

Definition at line 40 of file ToggleSplitButtonAutomationPeer.cpp.

{
    com_ptr<ToggleSplitButton> impl = nullptr;

    if (auto splitButton = Owner().try_as<winrt::ToggleSplitButton>())
    {
        impl = winrt::get_self<ToggleSplitButton>(splitButton)->get_strong();
    }

    return impl;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 19 of file ToggleSplitButtonAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::ExpandCollapse ||
        patternInterface == winrt::PatternInterface::Toggle)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

void Toggle ( )

Definition at line 100 of file ToggleSplitButtonAutomationPeer.cpp.

{
    if (auto splitButton = GetImpl())
    {
        splitButton->Toggle();
    }
}

winrt::ToggleState ToggleState ( )

Definition at line 85 of file ToggleSplitButtonAutomationPeer.cpp.

{
    winrt::ToggleState state = winrt::ToggleState::Off;

    if (auto splitButton = GetImpl())
    {
        if (splitButton->IsChecked())
        {
            state = winrt::ToggleState::On;
        }
    }

    return state;
}

The documentation for this class was generated from the following files:
  • SplitButton/ToggleSplitButtonAutomationPeer.h
  • SplitButton/ToggleSplitButtonAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ToggleSplitButtonIsCheckedChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ToggleSplitButtonIsCheckedChangedEventArgs Class Reference

#include "SplitButtonEventArgs.h"

Detailed Description

Definition at line 13 of file SplitButtonEventArgs.h.

The documentation for this class was generated from the following file:
  • SplitButton/SplitButtonEventArgs.h
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ToggleSplitButtonProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

ToggleSplitButtonProperties Class Reference

#include "ToggleSplitButton.properties.h"

Inherited by ToggleSplitButton.

List of all members.

Public Member Functions

ToggleSplitButtonProperties ()
void | IsChecked (bool value)
bool | IsChecked ()
winrt::event_token | IsCheckedChanged (winrt::TypedEventHandler< winrt::ToggleSplitButton, winrt::ToggleSplitButtonIsCheckedChangedEventArgs > const &value)
void | IsCheckedChanged (winrt::event_token const &token)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | IsCheckedProperty ()
static void | OnIsCheckedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::ToggleSplitButton,
winrt::ToggleSplitButtonIsCheckedChangedEventArgs > > 		m_isCheckedChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_IsCheckedProperty

Detailed Description

Definition at line 7 of file ToggleSplitButton.properties.h.

Constructor & Destructor Documentation

ToggleSplitButtonProperties ( )

Definition at line 18 of file ToggleSplitButton.properties.cpp.

    : m_isCheckedChangedEventSource{static_cast<ToggleSplitButton*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
bool IsChecked ( )
void IsChecked ( bool value )
void IsCheckedChanged ( winrt::event_token const & token )
winrt::event_token IsCheckedChanged ( winrt::TypedEventHandler< winrt::ToggleSplitButton, winrt::ToggleSplitButtonIsCheckedChangedEventArgs > const & value )
static winrt::DependencyProperty IsCheckedProperty ( ) [inline, static]

Definition at line 15 of file ToggleSplitButton.properties.h.

{ return s_IsCheckedProperty; }

static void OnIsCheckedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::ToggleSplitButton, winrt::ToggleSplitButtonIsCheckedChangedEventArgs> > m_isCheckedChangedEventSource

Definition at line 22 of file ToggleSplitButton.properties.h.

GlobalDependencyProperty s_IsCheckedProperty [static]

Definition at line 17 of file ToggleSplitButton.properties.h.

The documentation for this class was generated from the following files:
  • Generated/ToggleSplitButton.properties.h
  • Generated/ToggleSplitButton.properties.cpp
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TopNavigationViewDataProvider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

TopNavigationViewDataProvider Class Reference

#include "TopNavigationViewDataProvider.h"

Inherits SplitDataSourceT.

List of all members.

Public Member Functions

TopNavigationViewDataProvider (const ITrackerHandleManager *m_owner)
float | CalculateWidthForItems (std::vector< int > &items)
int | ConvertOriginalIndexToIndex (int originalIndex)
std::vector< int > | ConvertPrimaryIndexToIndex (std::vector< int > const &indexesInPrimary)
float | DefaultAttachedData () override
NavigationViewSplitVectorID | DefaultVectorIDOnInsert () override
winrt::IInspectable | GetAt (int index) override
int | GetNavigationViewItemCountInPrimaryList ()
int | GetNavigationViewItemCountInTopNav ()
winrt::IVector
< winrt::IInspectable > 		GetOverflowItems ()
winrt::IVector
< winrt::IInspectable > 		GetPrimaryItems ()
int | GetPrimaryListSize ()
float | GetWidthForItem (int index)
bool | HasInvalidWidth (std::vector< int > &items)
int | IndexOf (const winrt::IInspectable &value, NavigationViewSplitVectorID vectorID)
int | IndexOf (const winrt::IInspectable &value) override
void | InvalidWidthCache ()
bool | IsItemInPrimaryList (int index)
bool | IsItemSelectableInPrimaryList (const winrt::IInspectable &value)
bool | IsValidWidthForItem (int index)
void | MoveAllItemsToPrimaryList ()
void | MoveItemsOutOfPrimaryList (std::vector< int > const &indexes)
void | MoveItemsToList (std::vector< int > const &indexes, NavigationViewSplitVectorID vectorID)
void | MoveItemsToPrimaryList (std::vector< int > const &indexes)
void | OnRawDataChanged (std::function< void(winrt::NotifyCollectionChangedEventArgs const &args)> const &dataChangeCallback)
void | OverflowButtonWidth (float width)
float | OverflowButtonWidth ()
void | SetDataSource (const winrt::IInspectable &rawData)
bool | ShouldChangeDataSource (winrt::IInspectable const &rawData)
int | Size () override
void | UpdateWidthForPrimaryItem (int indexInPrimary, float width)
float | WidthRequiredToRecoveryAllItemsToPrimary ()

Protected Member Functions

void | OnDataSourceChanged (const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &args)

Private Member Functions

void | ChangeDataSource (winrt::ItemsSourceView dataSource)
bool | IsContainerNavigationViewHeader (int index)
bool | IsContainerNavigationViewItem (int index)
bool | IsValidWidth (float width)
void | SetWidthForItem (int index, float width)

Private Attributes

std::function< void(const
winrt::NotifyCollectionChangedEventArgs
&args)> 		m_dataChangeCallback
tracker_ref
< winrt::ItemsSourceView > 		m_dataSource
tracker_ref< winrt::IInspectable > | m_rawDataSource

Detailed Description

Definition at line 19 of file TopNavigationViewDataProvider.h.

Constructor & Destructor Documentation

TopNavigationViewDataProvider ( const ITrackerHandleManager * m_owner )

Definition at line 11 of file TopNavigationViewDataProvider.cpp.

    :SplitDataSourceT()
    , m_rawDataSource(m_owner)
    , m_dataSource(m_owner)
{
    auto lambda = [this](const winrt::IInspectable& value)
    {
        return IndexOf(value);
    };

    auto primaryVector = std::make_shared<SplitVectorT>(m_owner, NavigationViewSplitVectorID::PrimaryList, lambda);
    auto overflowVector = std::make_shared<SplitVectorT>(m_owner, NavigationViewSplitVectorID::OverflowList, lambda);

    InitializeSplitVectors({ primaryVector, overflowVector });
}

Member Function Documentation

float CalculateWidthForItems ( std::vector< int > & items )

Definition at line 234 of file TopNavigationViewDataProvider.cpp.

{
    float width = 0.f;
    for (auto &index : items)
    {
        width += GetWidthForItem(index);
    }
    return width;
}

void ChangeDataSource ( winrt::ItemsSourceView dataSource ) [private]

Definition at line 324 of file TopNavigationViewDataProvider.cpp.

{
    auto oldValue = m_dataSource.get();
    if (oldValue != newValue)
    {
        // update to the new datasource.

        if (oldValue)
        {
            oldValue.CollectionChanged(m_dataSourceChanged);
        }

        Clear();

        m_dataSource.set(newValue);
        SyncAndInitVectorFlagsWithID(NavigationViewSplitVectorID::NotInitialized, DefaultAttachedData());

        if (newValue)
        {
            m_dataSourceChanged = newValue.CollectionChanged({ this, &TopNavigationViewDataProvider::OnDataSourceChanged });
        }
    }

    // Move all to primary list
    MoveItemsToVector(NavigationViewSplitVectorID::NotInitialized);
}

int ConvertOriginalIndexToIndex ( int originalIndex )

Definition at line 131 of file TopNavigationViewDataProvider.cpp.

{
    auto const vector = GetVector(IsItemInPrimaryList(originalIndex) ? NavigationViewSplitVectorID::PrimaryList : NavigationViewSplitVectorID::OverflowList);
    return vector->IndexFromIndexInOriginalVector(originalIndex);
}

std::vector< int > ConvertPrimaryIndexToIndex ( std::vector< int > const & indexesInPrimary )

Definition at line 112 of file TopNavigationViewDataProvider.cpp.

{
    std::vector<int> indexes;
    if (!indexesInPrimary.empty())
    {
        auto vector = GetVector(NavigationViewSplitVectorID::PrimaryList);
        if (vector)
        {
            // transform PrimaryList index to OrignalVector index
            std::transform(indexesInPrimary.begin(), indexesInPrimary.end(), std::back_inserter(indexes),
                [&vector](int index) -> int
            {
                return vector->IndexToIndexInOriginalVector(index);
            });
        }
    }
    return indexes;
}

float DefaultAttachedData ( ) [override]

Definition at line 99 of file TopNavigationViewDataProvider.cpp.

{
    return std::numeric_limits<float>::min();
}

NavigationViewSplitVectorID DefaultVectorIDOnInsert ( ) [override]

Definition at line 94 of file TopNavigationViewDataProvider.cpp.

{
    return NavigationViewSplitVectorID::NotInitialized;
}

winrt::IInspectable GetAt ( int index ) [override]

Definition at line 76 of file TopNavigationViewDataProvider.cpp.

{
    if (auto dataSource = m_dataSource.get())
    {
        return dataSource.GetAt(index);
    }
    return nullptr;
}

int GetNavigationViewItemCountInPrimaryList ( )

Definition at line 160 of file TopNavigationViewDataProvider.cpp.

{
    int count = 0;
    for (int i = 0; i < Size(); i++)
    {
        if (IsItemInPrimaryList(i) && IsContainerNavigationViewItem(i))
        {
            count++;
        }
    }
    return count;
}

int GetNavigationViewItemCountInTopNav ( )

Definition at line 173 of file TopNavigationViewDataProvider.cpp.

{
    int count = 0;
    for (int i = 0; i < Size(); i++)
    {
        if (IsContainerNavigationViewItem(i))
        {
            count++;
        }
    }
    return count;
}

winrt::IVector< winrt::IInspectable > GetOverflowItems ( )

Definition at line 33 of file TopNavigationViewDataProvider.cpp.

{
    return GetVector(NavigationViewSplitVectorID::OverflowList)->GetVector();
}

winrt::IVector< winrt::IInspectable > GetPrimaryItems ( )

Definition at line 28 of file TopNavigationViewDataProvider.cpp.

{
    return GetVector(NavigationViewSplitVectorID::PrimaryList)->GetVector();
}

int GetPrimaryListSize ( )

Definition at line 155 of file TopNavigationViewDataProvider.cpp.

{
    return GetPrimaryItems().Size();
}

float GetWidthForItem ( int index )

Definition at line 224 of file TopNavigationViewDataProvider.cpp.

{
    auto width = AttachedData(index);
    if (!IsValidWidth(width))
    {
        width = 0;
    }
    return width;
}

bool HasInvalidWidth ( std::vector< int > & items )

Definition at line 210 of file TopNavigationViewDataProvider.cpp.

{
    bool hasInvalidWidth = false;
    for (auto &index : items)
    {
        if (!IsValidWidthForItem(index))
        {
            hasInvalidWidth = true;
            break;
        }
    }
    return hasInvalidWidth;
}

int IndexOf | ( | const winrt::IInspectable & | value,
 |  | NavigationViewSplitVectorID | vectorID
 | ) |  |

Definition at line 265 of file TopNavigationViewDataProvider.cpp.

{
    return IndexOfImpl(value, vectorID);
}

int IndexOf ( const winrt::IInspectable & value ) [override]

Definition at line 67 of file TopNavigationViewDataProvider.cpp.

{
    if (auto dataSource = m_dataSource.get())
    {
        return dataSource.IndexOf(value);
    }
    return -1;
}

void InvalidWidthCache ( )

Definition at line 244 of file TopNavigationViewDataProvider.cpp.

{
    ResetAttachedData(-1.0f);
}

bool IsContainerNavigationViewHeader ( int index ) [private]

Definition at line 368 of file TopNavigationViewDataProvider.cpp.

{
    bool isContainerNavigationViewHeader = false;

    auto item = GetAt(index);
    if (item && item.try_as<winrt::NavigationViewItemHeader>())
    {
        isContainerNavigationViewHeader = true;
    }
    return isContainerNavigationViewHeader;
}

bool IsContainerNavigationViewItem ( int index ) [private]

Definition at line 356 of file TopNavigationViewDataProvider.cpp.

{
    bool isContainerNavigationViewItem = true;

    auto item = GetAt(index);
    if (item && (item.try_as<winrt::NavigationViewItemHeader>() || item.try_as<winrt::NavigationViewItemSeparator>()))
    {
        isContainerNavigationViewItem = false;
    }
    return isContainerNavigationViewItem;
}

bool IsItemInPrimaryList ( int index )

Definition at line 351 of file TopNavigationViewDataProvider.cpp.

{
    return GetVectorIDForItem(index) == NavigationViewSplitVectorID::PrimaryList;
}

bool IsItemSelectableInPrimaryList ( const winrt::IInspectable & value )

Definition at line 259 of file TopNavigationViewDataProvider.cpp.

{
    const int index = IndexOf(value);
    return (index != -1);
}

bool IsValidWidth ( float width ) [private]

Definition at line 305 of file TopNavigationViewDataProvider.cpp.

{
    return (width >= 0) && (width < std::numeric_limits<float>::max());
}

bool IsValidWidthForItem ( int index )

Definition at line 310 of file TopNavigationViewDataProvider.cpp.

{
    auto width = AttachedData(index);
    return IsValidWidth(width);
}

void MoveAllItemsToPrimaryList ( )

Definition at line 104 of file TopNavigationViewDataProvider.cpp.

{
    for (int i = 0; i < Size(); i++)
    {
        MoveItemToVector(i, NavigationViewSplitVectorID::PrimaryList);
    }
}

void MoveItemsOutOfPrimaryList ( std::vector< int > const & indexes )

Definition at line 137 of file TopNavigationViewDataProvider.cpp.

{
    MoveItemsToList(indexes, NavigationViewSplitVectorID::OverflowList);
}

void MoveItemsToList | ( | std::vector< int > const & | indexes,
 |  | NavigationViewSplitVectorID | vectorID
 | ) |  |

Definition at line 147 of file TopNavigationViewDataProvider.cpp.

{
    for (auto &index : indexes)
    {
        MoveItemToVector(index, vectorID);
    };
}

void MoveItemsToPrimaryList ( std::vector< int > const & indexes )

Definition at line 142 of file TopNavigationViewDataProvider.cpp.

{
    MoveItemsToList(indexes, NavigationViewSplitVectorID::PrimaryList);
}

void OnDataSourceChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args |
 | ) |  |  | [protected]

Definition at line 270 of file TopNavigationViewDataProvider.cpp.

{
    switch (args.Action())
    {
        case winrt::NotifyCollectionChangedAction::Add:
        {
            OnInsertAt(args.NewStartingIndex(), args.NewItems().Size());
            break;
        }

        case winrt::NotifyCollectionChangedAction::Remove:
        {
            OnRemoveAt(args.OldStartingIndex(), args.OldItems().Size());
            break;
        }

        case winrt::NotifyCollectionChangedAction::Reset:
        {
            OnClear();
            break;
        }

        case winrt::NotifyCollectionChangedAction::Replace:
        {
            OnRemoveAt(args.OldStartingIndex(), args.OldItems().Size());
            OnInsertAt(args.NewStartingIndex(), args.NewItems().Size());
            break;
        }
    }
    if (m_dataChangeCallback)
    {
        m_dataChangeCallback(args);
    }
}

void OnRawDataChanged ( std::function< void(winrt::NotifyCollectionChangedEventArgs const &args)> const & dataChangeCallback )

Definition at line 62 of file TopNavigationViewDataProvider.cpp.

{
    m_dataChangeCallback = dataChangeCallback;
}

void OverflowButtonWidth ( float width )

Definition at line 254 of file TopNavigationViewDataProvider.cpp.

{
    m_overflowButtonCachedWidth = width;
}

float OverflowButtonWidth ( )

Definition at line 249 of file TopNavigationViewDataProvider.cpp.

{
    return m_overflowButtonCachedWidth;
}

void SetDataSource ( const winrt::IInspectable & rawData )

Definition at line 39 of file TopNavigationViewDataProvider.cpp.

{
    if (ShouldChangeDataSource(rawData)) // avoid to create multiple of datasource for the same raw data
    {
        winrt::ItemsSourceView dataSource = nullptr;
        if (rawData)
        {
            dataSource = winrt::ItemsSourceView(rawData);
        }
        ChangeDataSource(dataSource);
        m_rawDataSource.set(rawData);
        if (dataSource)
        {
            MoveAllItemsToPrimaryList();
        }
    }
}

void SetWidthForItem | ( | int | index,
 |  | float | width |
 | ) |  |  | [private]

Definition at line 316 of file TopNavigationViewDataProvider.cpp.

{
    if (IsValidWidth(width))
    {
        AttachedData(index, width);
    }
}

bool ShouldChangeDataSource ( winrt::IInspectable const & rawData )

Definition at line 57 of file TopNavigationViewDataProvider.cpp.

{
    return rawData != m_rawDataSource.get();
}

int Size ( ) [override]

Definition at line 85 of file TopNavigationViewDataProvider.cpp.

{
    if (auto dataSource = m_dataSource.get())
    {
        return static_cast<int>(dataSource.Count());
    }
    return 0;
}

void UpdateWidthForPrimaryItem | ( | int | indexInPrimary,
 |  | float | width
 | ) |  |

Definition at line 186 of file TopNavigationViewDataProvider.cpp.

{
    auto vector = GetVector(NavigationViewSplitVectorID::PrimaryList);
    if (vector)
    {
        const auto index = vector->IndexToIndexInOriginalVector(indexInPrimary);
        SetWidthForItem(index, width);
    }
}

float WidthRequiredToRecoveryAllItemsToPrimary ( )

Definition at line 196 of file TopNavigationViewDataProvider.cpp.

{
    auto width = 0.f;
    for (int i=0; i<Size(); i++)
    {
        if (!IsItemInPrimaryList(i))
        {
            width += GetWidthForItem(i);
        }
    }
    width -= m_overflowButtonCachedWidth;
    return std::max(0.f, width);
}

Member Data Documentation

std::function<void(const winrt::NotifyCollectionChangedEventArgs& args)> m_dataChangeCallback [private]

Definition at line 81 of file TopNavigationViewDataProvider.h.

tracker_ref<winrt::ItemsSourceView> m_dataSource [private]

Definition at line 77 of file TopNavigationViewDataProvider.h.

tracker_ref<winrt::IInspectable> m_rawDataSource [private]

Definition at line 79 of file TopNavigationViewDataProvider.h.

The documentation for this class was generated from the following files:
  • NavigationView/TopNavigationViewDataProvider.h
  • NavigationView/TopNavigationViewDataProvider.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > Struct Template Reference

#include "tracker_ref.h"

List of all members.

Public Member Functions

tracker_ref (const ITrackerHandleManager *)
tracker_ref (const ITrackerHandleManager *, const winrt::hstring &value)
const winrt::hstring & | get () const
const winrt::hstring & | safe_get (bool) const
void | set (const winrt::hstring &value)

Detailed Description

template<>
struct tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >

Definition at line 381 of file tracker_ref.h.

Constructor & Destructor Documentation

tracker_ref ( const ITrackerHandleManager * ) [inline, explicit]

Definition at line 383 of file tracker_ref.h.

    {
    }

tracker_ref | ( | const ITrackerHandleManager * | ,
 |  | const winrt::hstring & | value |
 | ) |  |  | [inline, explicit]

Definition at line 387 of file tracker_ref.h.

    {
        set(value);
    }

Member Function Documentation

const winrt::hstring& get ( ) const [inline]

Definition at line 397 of file tracker_ref.h.

    {
        return *this;
    }

const winrt::hstring& safe_get ( bool ) const [inline]

Definition at line 402 of file tracker_ref.h.

    {
        return *this;
    }

void set ( const winrt::hstring & value ) [inline]

Definition at line 392 of file tracker_ref.h.

    {
        winrt::hstring::operator=(value);
    }

The documentation for this struct was generated from the following file:
  • inc/tracker_ref.h
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions

TreeView Class Reference

#include "TreeView.h"

Inherits ReferenceTracker< TreeView, winrt::implementation::TreeViewT >, and TreeViewProperties.

Inherited by SpecialTreeView.

List of all members.

Public Member Functions

TreeView ()
void | Collapse (winrt::TreeViewNode const &value)
winrt::DependencyObject | ContainerFromItem (winrt::IInspectable const &item)
winrt::DependencyObject | ContainerFromNode (winrt::TreeViewNode const &node) const
void | Expand (winrt::TreeViewNode const &value)
winrt::TreeViewNode | GetAssociatedNode (winrt::IInspectable item)
winrt::IInspectable | ItemFromContainer (winrt::DependencyObject const &container)
const TreeViewList * | ListControl () const
TreeViewList * MutableListControl ()
winrt::TreeViewNode | NodeFromContainer (winrt::DependencyObject const &container) const
void | OnApplyTemplate ()
void | OnContainerContentChanging (const winrt::IInspectable &sender, const winrt::ContainerContentChangingEventArgs &args)
void | OnItemClick (const winrt::IInspectable &sender, const winrt::ItemClickEventArgs &args)
void | OnListControlDragItemsCompleted (const winrt::IInspectable &sender, const winrt::DragItemsCompletedEventArgs &args)
void | OnListControlDragItemsStarting (const winrt::IInspectable &sender, const winrt::DragItemsStartingEventArgs &args)
void | OnListControlSelectionChanged (const winrt::IInspectable &sender, const winrt::SelectionChangedEventArgs &args)
void | OnNodeCollapsed (const winrt::TreeViewNode &sender, const winrt::IInspectable &)
void | OnNodeExpanding (const winrt::TreeViewNode &sender, const winrt::IInspectable &)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | RaiseSelectionChanged (const winrt::IVector< winrt::IInspectable > addedItems, const winrt::IVector< winrt::IInspectable > removedItems)
winrt::IVector
< winrt::TreeViewNode > 		RootNodes ()
void | SelectAll ()
winrt::IVector
< winrt::IInspectable > 		SelectedItems ()
void | SelectedNode (winrt::TreeViewNode const &node)
winrt::TreeViewNode | SelectedNode ()
winrt::IVector
< winrt::TreeViewNode > 		SelectedNodes ()
void | UpdateItemsSelectionMode (bool isMultiSelect)
void | UpdateSelection (winrt::TreeViewNode const &node, bool isSelected)

Private Member Functions

winrt::TreeViewNode | GetAssociatedNodeImpl (winrt::IInspectable const &item, winrt::TreeViewNode const &node)
void | OnItemsAdded (int index, int count)
void | OnItemsRemoved (int index, int count)
void | OnItemsSourceChanged (const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &args)
void | SyncRootNodesWithItemsSource ()

Static Private Member Functions

static void | OnPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Detailed Description

Definition at line 17 of file TreeView.h.

Constructor & Destructor Documentation

TreeView ( )

Definition at line 18 of file TreeView.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_TreeView);

    SetDefaultStyleKey(this);

    m_rootNode.set(winrt::TreeViewNode());
    m_pendingSelectedNodes.set(winrt::make<Vector<winrt::TreeViewNode>>());
}

Member Function Documentation

void Collapse ( winrt::TreeViewNode const & value )

Definition at line 146 of file TreeView.cpp.

{
    const auto vm = ListControl()->ListViewModel();
    vm->CollapseNode(value);
}

winrt::DependencyObject ContainerFromItem ( winrt::IInspectable const & item )

Definition at line 52 of file TreeView.cpp.

{
    if (auto const listControl = ListControl())
    {
        return listControl->ContainerFromItem(item);
    }
    return nullptr;
}

winrt::DependencyObject ContainerFromNode ( winrt::TreeViewNode const & node ) const

Definition at line 70 of file TreeView.cpp.

{
    if (auto const listControl = ListControl())
    {
        return listControl->ContainerFromNode(node);
    }
    return nullptr;
}

void Expand ( winrt::TreeViewNode const & value )

Definition at line 140 of file TreeView.cpp.

{
    const auto vm = ListControl()->ListViewModel();
    vm->ExpandNode(value);
}

winrt::TreeViewNode GetAssociatedNode ( winrt::IInspectable item )

Definition at line 439 of file TreeView.cpp.

{
    return GetAssociatedNodeImpl(item, m_rootNode.get());
}

winrt::TreeViewNode GetAssociatedNodeImpl | ( | winrt::IInspectable const & | item,
 |  | winrt::TreeViewNode const & | node |
 | ) |  |  | [private]

Definition at line 444 of file TreeView.cpp.

{
    if (auto&& content = node.Content())
    {
        if (content == item)
        {
            return node;
        }
    }

    for (auto&& childNode : node.Children())
    {
        if (auto result = GetAssociatedNodeImpl(item, childNode))
        {
            return result;
        }
    }
    return nullptr;
}

winrt::IInspectable ItemFromContainer ( winrt::DependencyObject const & container )

Definition at line 43 of file TreeView.cpp.

{
    if (auto const listControl = ListControl())
    {
        return listControl->ItemFromContainer(container);
    }
    return nullptr;
}

const TreeViewList * ListControl ( ) const

Definition at line 33 of file TreeView.cpp.

{
    return winrt::get_self<TreeViewList>(m_listControl.get());
}

TreeViewList * MutableListControl ( )

Definition at line 38 of file TreeView.cpp.

{
    return winrt::get_self<TreeViewList>(m_listControl.get());
}

winrt::TreeViewNode NodeFromContainer ( winrt::DependencyObject const & container ) const

Definition at line 61 of file TreeView.cpp.

{
    if (auto const listControl = ListControl())
    {
        return listControl->NodeFromContainer(container);
    }
    return nullptr;
}

void OnApplyTemplate ( )

Definition at line 384 of file TreeView.cpp.

{
    winrt::IControlProtected controlProtected = *this;
    m_listControl.set(GetTemplateChildT<winrt::TreeViewList>(c_listControlName, controlProtected));

    if (const auto listControl = m_listControl.get())
    {
        const auto listPtr = winrt::get_self<TreeViewList>(m_listControl.get());
        const auto viewModel = listPtr->ListViewModel();
        if (!m_rootNode.get())
        {
            m_rootNode.set(winrt::TreeViewNode());
        }

        if (ItemsSource())
        {
            viewModel->IsContentMode(true);
        }
        viewModel->PrepareView(m_rootNode.get());
        viewModel->SetOwners(listControl, *this);
        viewModel->NodeExpanding({ this, &TreeView::OnNodeExpanding });
        viewModel->NodeCollapsed({ this, &TreeView::OnNodeCollapsed });

        const auto selectionMode = SelectionMode();
        if (selectionMode == winrt::TreeViewSelectionMode::Single)
        {
            listControl.SelectionMode(winrt::ListViewSelectionMode::Single);
        }
        else
        {
            listControl.SelectionMode(winrt::ListViewSelectionMode::None);
            if (selectionMode == winrt::TreeViewSelectionMode::Multiple)
            {
                UpdateItemsSelectionMode(true);
            }
        }

        m_itemClickRevoker = listControl.ItemClick(winrt::auto_revoke, { this, &TreeView::OnItemClick });
        m_containerContentChangingRevoker = listControl.ContainerContentChanging(winrt::auto_revoke, { this, &TreeView::OnContainerContentChanging });
        m_dragItemsStartingRevoker = listControl.DragItemsStarting(winrt::auto_revoke, { this, &TreeView::OnListControlDragItemsStarting });
        m_dragItemsCompletedRevoker = listControl.DragItemsCompleted(winrt::auto_revoke, { this, &TreeView::OnListControlDragItemsCompleted });
        m_selectionChangedRevoker = listControl.SelectionChanged(winrt::auto_revoke, { this, &TreeView::OnListControlSelectionChanged });

        if (m_pendingSelectedNodes && m_pendingSelectedNodes.get().Size() > 0)
        {
            const auto selectedNodes = viewModel->GetSelectedNodes();
            for (auto&& node : m_pendingSelectedNodes.get())
            {
                selectedNodes.Append(node);
            }
            m_pendingSelectedNodes.get().Clear();
        }
    }
}

void OnContainerContentChanging | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ContainerContentChangingEventArgs & | args
 | ) |  |
void OnItemClick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ItemClickEventArgs & | args
 | ) |  |
void OnItemsAdded | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]
void OnItemsRemoved | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]
void OnItemsSourceChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args |
 | ) |  |  | [private]
void OnListControlDragItemsCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragItemsCompletedEventArgs & | args
 | ) |  |

Definition at line 287 of file TreeView.cpp.

{
    const auto newParent = [items = args.Items(), listControl = ListControl(), rootNode = m_rootNode.get()]()
    {
        if (listControl && items && items.Size() > 0)
        {
            if (const auto draggedNode = listControl->NodeFromItem(items.GetAt(0)))
            {
                const auto parentNode = draggedNode.Parent();
                if (parentNode && parentNode != rootNode)
                {
                    return listControl->ItemFromNode(parentNode);
                }
            }
        }
        return static_cast<winrt::IInspectable>(nullptr);
    }();

    const auto treeViewArgs = winrt::make_self<TreeViewDragItemsCompletedEventArgs>(args, newParent);
    m_dragItemsCompletedEventSource(*this, *treeViewArgs);
}

void OnListControlDragItemsStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragItemsStartingEventArgs & | args
 | ) |  |

Definition at line 281 of file TreeView.cpp.

{
    const auto treeViewArgs = winrt::make_self<TreeViewDragItemsStartingEventArgs>(args);
    m_dragItemsStartingEventSource(*this, *treeViewArgs);
}

void OnListControlSelectionChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SelectionChangedEventArgs & | args
 | ) |  |

Definition at line 309 of file TreeView.cpp.

{
    if (SelectionMode() == winrt::TreeViewSelectionMode::Single)
    {
        RaiseSelectionChanged(args.AddedItems(), args.RemovedItems());

        const auto newSelectedItem = [args]() {
            if(const auto& newItems = args.AddedItems())
            {
                if (newItems.Size() > 0)
                {
                    return newItems.GetAt(0);
                }
                else
                {
                    return (winrt::IInspectable)nullptr;
                }
            }
            else
            {
                return (winrt::IInspectable)nullptr;
            }
        }();

        if (SelectedItem() != newSelectedItem)
        {
            SelectedItem(newSelectedItem);
        }
    }
}

void OnNodeCollapsed | ( | const winrt::TreeViewNode & | sender,
 |  | const winrt::IInspectable & |
 | ) |  |

Definition at line 194 of file TreeView.cpp.

{
    const auto treeViewCollapsedEventArgs = winrt::make_self<TreeViewCollapsedEventArgs>();
    treeViewCollapsedEventArgs->Node(sender);

    if (m_listControl)
    {
        if (const auto collapsedTVI = ContainerFromNode(sender).try_as<winrt::TreeViewItem>())
        {
            //Update TVI properties
            if (collapsedTVI.IsExpanded())
            {
                collapsedTVI.IsExpanded(false);
            }

            //Update TemplateSettings properties
            const auto templateSettings = winrt::get_self<TreeViewItemTemplateSettings>(collapsedTVI.TreeViewItemTemplateSettings());
            templateSettings->ExpandedGlyphVisibility(winrt::Visibility::Collapsed);
            templateSettings->CollapsedGlyphVisibility(winrt::Visibility::Visible);
        }
        m_collapsedEventSource(*this, *treeViewCollapsedEventArgs);
    }
}

void OnNodeExpanding | ( | const winrt::TreeViewNode & | sender,
 |  | const winrt::IInspectable & |
 | ) |  |

Definition at line 171 of file TreeView.cpp.

{
    const auto treeViewExpandingEventArgs = winrt::make_self<TreeViewExpandingEventArgs>();
    treeViewExpandingEventArgs->Node(sender);

    if (m_listControl)
    {
        if (const auto expandingTVI = ContainerFromNode(sender).try_as<winrt::TreeViewItem>())
        {
            //Update TVI properties
            if (!expandingTVI.IsExpanded())
            {
                expandingTVI.IsExpanded(true);
            }
            //Update TemplateSettings properties
            const auto templateSettings = winrt::get_self<TreeViewItemTemplateSettings>(expandingTVI.TreeViewItemTemplateSettings());
            templateSettings->ExpandedGlyphVisibility(winrt::Visibility::Visible);
            templateSettings->CollapsedGlyphVisibility(winrt::Visibility::Collapsed);
        }
        m_expandingEventSource(*this, *treeViewExpandingEventArgs);
    }
}

static void OnPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static, private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 218 of file TreeView.cpp.

{
    winrt::IDependencyProperty property = args.Property();

    if (property == s_SelectionModeProperty && m_listControl)
    {
        const winrt::TreeViewSelectionMode value = SelectionMode();
        switch (value)
        {
            case winrt::TreeViewSelectionMode::None:
            {
                m_listControl.get().SelectionMode(winrt::ListViewSelectionMode::None);
                UpdateItemsSelectionMode(false);
            }
            break;

            case winrt::TreeViewSelectionMode::Single:
            {
                m_listControl.get().SelectionMode(winrt::ListViewSelectionMode::Single);
                UpdateItemsSelectionMode(false);
            }
            break;

            case winrt::TreeViewSelectionMode::Multiple:
            {
                m_listControl.get().SelectionMode(winrt::ListViewSelectionMode::None);
                UpdateItemsSelectionMode(true);
            }
            break;

        }
    }
    else if (property == s_ItemsSourceProperty)
    {
        winrt::get_self<TreeViewNode>(m_rootNode.get())->IsContentMode(true);

        if (const auto listControl = ListControl())
        {
            const auto viewModel = listControl->ListViewModel();
            viewModel->IsContentMode(true);
        }

        winrt::get_self<TreeViewNode>(m_rootNode.get())->ItemsSource(ItemsSource());
    }
    else if (property == s_SelectedItemProperty)
    {

        const auto items = SelectedItems();
        const auto selected = (items != nullptr && items.Size() > 0) ? items.GetAt(0) : nullptr;
        // Checking if new value is different to the currently internally selected item
        if (args.NewValue() != selected)
        {
            if (const auto listControl = ListControl())
            {
                if (const auto viewModel = listControl->ListViewModel())
                {
                    viewModel->SelectSingleItem(args.NewValue());
                }
            }
        }
    }
}

void RaiseSelectionChanged | ( | const winrt::IVector< winrt::IInspectable > | addedItems,
 |  | const winrt::IVector< winrt::IInspectable > | removedItems
 | ) |  |

Definition at line 378 of file TreeView.cpp.

{
    const auto treeViewArgs = winrt::make_self<TreeViewSelectionChangedEventArgs>(addedItems, removedItems);
    m_selectionChangedEventSource(*this, *treeViewArgs);
}

winrt::IVector< winrt::TreeViewNode > RootNodes ( )

Definition at line 28 of file TreeView.cpp.

{
    return m_rootNode.get().Children();
}

void SelectAll ( )

Definition at line 152 of file TreeView.cpp.

{
    const auto vm = ListControl()->ListViewModel();
    vm->SelectAll();
}

winrt::IVector< winrt::IInspectable > SelectedItems ( )

Definition at line 113 of file TreeView.cpp.

{
    if (const auto listControl = ListControl())
    {
        if (const auto viewModel = listControl->ListViewModel())
        {
            return viewModel->GetSelectedItems();
        }
    }

    return nullptr;
}

void SelectedNode ( winrt::TreeViewNode const & node )

Definition at line 79 of file TreeView.cpp.

{
    const auto selectedNodes = SelectedNodes();
    if (selectedNodes.Size() > 0)
    {
        selectedNodes.Clear();
    }
    if (node)
    {
        selectedNodes.Append(node);
    }
}

winrt::TreeViewNode SelectedNode ( )

Definition at line 92 of file TreeView.cpp.

{
    const auto nodes = SelectedNodes();
    return nodes.Size() > 0 ? nodes.GetAt(0) : nullptr;
}

winrt::IVector< winrt::TreeViewNode > SelectedNodes ( )

Definition at line 99 of file TreeView.cpp.

{
    if (auto const listControl = ListControl())
    {
        if (const auto vm = listControl->ListViewModel())
        {
            return vm->GetSelectedNodes();
        }
    }

    // we'll treat the pending selected nodes as SelectedNodes value if we don't have a list control or a view model
    return m_pendingSelectedNodes.get();
}

void SyncRootNodesWithItemsSource ( ) [private]
void UpdateItemsSelectionMode ( bool isMultiSelect )

Definition at line 340 of file TreeView.cpp.

{
    const auto listControl = ListControl();
    if (listControl->IsMultiselect() != isMultiSelect)
    {
        winrt::get_self<TreeViewList>(m_listControl.get())->EnableMultiselect(isMultiSelect);
    }

    const auto viewModel = listControl->ListViewModel();
    const int size = viewModel->Size();

    for (int i = 0; i < size; i++)
    {
        const auto updateContainer = listControl->ContainerFromIndex(i).as<winrt::TreeViewItem>();
        if (updateContainer)
        {
            if (isMultiSelect)
            {
                if (const auto targetNode = viewModel->GetNodeAt(i))
                {
                    if (viewModel->IsNodeSelected(targetNode))
                    {
                        winrt::VisualStateManager::GoToState(updateContainer, L"TreeViewMultiSelectEnabledSelected", false);
                    }
                    else
                    {
                        winrt::VisualStateManager::GoToState(updateContainer, L"TreeViewMultiSelectEnabledUnselected", false);
                    }
                }
            }
            else
            {
                winrt::VisualStateManager::GoToState(updateContainer, L"TreeViewMultiSelectDisabled", false);
            }
        }
    }
}

void UpdateSelection | ( | winrt::TreeViewNode const & | node,
 |  | bool | isSelected
 | ) |  |

Definition at line 126 of file TreeView.cpp.

{
    if (const auto listControl = ListControl())
    {
        if (const auto viewModel = listControl->ListViewModel())
        {
            if (isSelected != viewModel->IsNodeSelected(node))
            {
                viewModel->SelectNode(node, isSelected);
            }
        }
    }
}

The documentation for this class was generated from the following files:
  • TreeView/TreeView.h
  • TreeView/TreeView.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewCollapsedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TreeViewCollapsedEventArgs Class Reference

#include "TreeViewCollapsedEventArgs.h"

Inherits ReferenceTracker< TreeViewCollapsedEventArgs, winrt::implementation::TreeViewCollapsedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

winrt::IInspectable | Item ()
winrt::TreeViewNode | Node ()
void | Node (const winrt::TreeViewNode &value)

Detailed Description

Definition at line 9 of file TreeViewCollapsedEventArgs.h.

Member Function Documentation

winrt::IInspectable Item ( )

Definition at line 18 of file TreeViewCollapsedEventArgs.cpp.

{
    return m_node.get().Content();
}

winrt::TreeViewNode Node ( )

Definition at line 8 of file TreeViewCollapsedEventArgs.cpp.

{
    return m_node.get();
}

void Node ( const winrt::TreeViewNode & value )

Definition at line 13 of file TreeViewCollapsedEventArgs.cpp.

{
    m_node.set(value);
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewCollapsedEventArgs.h
  • TreeView/TreeViewCollapsedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewDragItemsCompletedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

TreeViewDragItemsCompletedEventArgs Class Reference

#include "TreeViewDragItemsCompletedEventArgs.h"

Inherits ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

TreeViewDragItemsCompletedEventArgs (const winrt::DragItemsCompletedEventArgs &args, const winrt::IInspectable &newParent)
DataPackageOperation | DropResult () const
winrt::IVectorView
< winrt::IInspectable > 		Items ()
winrt::IInspectable | NewParentItem ()

Private Attributes

winrt::IInspectable | m_newParentItem

Detailed Description

Definition at line 9 of file TreeViewDragItemsCompletedEventArgs.h.

Constructor & Destructor Documentation

TreeViewDragItemsCompletedEventArgs | ( | const winrt::DragItemsCompletedEventArgs & | args,
 |  | const winrt::IInspectable & | newParent
 | ) |  |

Definition at line 9 of file TreeViewDragItemsCompletedEventArgs.cpp.

{
    m_dragItemsCompletedEventArgs = args;
    m_newParentItem = newParentItem;
}

Member Function Documentation

DataPackageOperation DropResult ( ) const

Definition at line 16 of file TreeViewDragItemsCompletedEventArgs.cpp.

{
    return m_dragItemsCompletedEventArgs.DropResult();
}

winrt::IVectorView< winrt::IInspectable > Items ( )

Definition at line 21 of file TreeViewDragItemsCompletedEventArgs.cpp.

{
    return m_dragItemsCompletedEventArgs.Items();
}

winrt::IInspectable NewParentItem ( )

Definition at line 26 of file TreeViewDragItemsCompletedEventArgs.cpp.

{
    return m_newParentItem;
}

Member Data Documentation

winrt::IInspectable m_newParentItem [private]

Definition at line 19 of file TreeViewDragItemsCompletedEventArgs.h.

The documentation for this class was generated from the following files:
  • TreeView/TreeViewDragItemsCompletedEventArgs.h
  • TreeView/TreeViewDragItemsCompletedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewDragItemsStartingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

TreeViewDragItemsStartingEventArgs Class Reference

#include "TreeViewDragItemsStartingEventArgs.h"

Inherits ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

TreeViewDragItemsStartingEventArgs (const winrt::DragItemsStartingEventArgs &args)
bool | Cancel () const
void | Cancel (const bool value)
DataPackage | Data () const
winrt::IVector
< winrt::IInspectable > 		Items ()

Private Attributes

winrt::DragItemsStartingEventArgs | m_dragItemsStartingEventArgs

Detailed Description

Definition at line 8 of file TreeViewDragItemsStartingEventArgs.h.

Constructor & Destructor Documentation

TreeViewDragItemsStartingEventArgs ( const winrt::DragItemsStartingEventArgs & args )

Definition at line 9 of file TreeViewDragItemsStartingEventArgs.cpp.

{
    m_dragItemsStartingEventArgs = args;
}

Member Function Documentation

bool Cancel ( ) const

Definition at line 14 of file TreeViewDragItemsStartingEventArgs.cpp.

{
    return m_dragItemsStartingEventArgs.Cancel();
}

void Cancel ( const bool value )

Definition at line 19 of file TreeViewDragItemsStartingEventArgs.cpp.

{
    m_dragItemsStartingEventArgs.Cancel(value);
}

DataPackage Data ( ) const

Definition at line 24 of file TreeViewDragItemsStartingEventArgs.cpp.

{
    return m_dragItemsStartingEventArgs.Data();
}

winrt::IVector< winrt::IInspectable > Items ( )

Definition at line 29 of file TreeViewDragItemsStartingEventArgs.cpp.

{
    return m_dragItemsStartingEventArgs.Items();
}

Member Data Documentation

winrt::DragItemsStartingEventArgs m_dragItemsStartingEventArgs [private]

Definition at line 19 of file TreeViewDragItemsStartingEventArgs.h.

The documentation for this class was generated from the following files:
  • TreeView/TreeViewDragItemsStartingEventArgs.h
  • TreeView/TreeViewDragItemsStartingEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewExpandingEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TreeViewExpandingEventArgs Class Reference

#include "TreeViewExpandingEventArgs.h"

Inherits ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

winrt::IInspectable | Item ()
winrt::TreeViewNode | Node ()
void | Node (const winrt::TreeViewNode &value)

Detailed Description

Definition at line 9 of file TreeViewExpandingEventArgs.h.

Member Function Documentation

winrt::IInspectable Item ( )

Definition at line 18 of file TreeViewExpandingEventArgs.cpp.

{
    return m_node.get().Content();
}

winrt::TreeViewNode Node ( )

Definition at line 8 of file TreeViewExpandingEventArgs.cpp.

{
    return m_node.get();
}

void Node ( const winrt::TreeViewNode & value )

Definition at line 13 of file TreeViewExpandingEventArgs.cpp.

{
    m_node.set(value);
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewExpandingEventArgs.h
  • TreeView/TreeViewExpandingEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItem Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes

TreeViewItem Class Reference

#include "TreeViewItem.h"

Inherits ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT >, and TreeViewItemProperties.

Inherited by SpecialTreeViewItem.

List of all members.

Public Member Functions

TreeViewItem ()
~TreeViewItem ()
bool | IsSelectedInternal ()
void | OnApplyTemplate ()
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnDragEnter (winrt::DragEventArgs const &e)
void | OnDragLeave (winrt::DragEventArgs const &e)
void | OnDragOver (winrt::DragEventArgs const &e)
void | OnDrop (winrt::DragEventArgs const &e)
void | OnKeyDown (winrt::KeyRoutedEventArgs const &e)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | SetItemsSource (winrt::TreeViewNode const &node, winrt::IInspectable const &value)
void | UpdateIndentation (int depth)
void | UpdateMultipleSelection (TreeNodeSelectionState const &state)
void | UpdateSelection (bool isSelected)
void | UpdateSelectionVisual (TreeNodeSelectionState const &state)

Private Member Functions

com_ptr< TreeView > | AncestorTreeView ()
TreeNodeSelectionState | CheckBoxSelectionState (winrt::CheckBox const &checkBox)
template<typename T >
T | GetAncestorView ()
bool | HandleExpandCollapse (winrt::VirtualKey key)
void | HandleGamepadAInMultiselectMode (const winrt::TreeViewNode &node)
void | HandleReorder (winrt::VirtualKey key)
bool | IsExpandCollapse (winrt::VirtualKey key)
bool | IsInContentMode ()
bool | IsInReorderMode (winrt::VirtualKey keys)
void | OnCheckToggle (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnExpandCollapseChevronPointerPressed (const winrt::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | OnExpandContentTimerTick (const winrt::IInspectable &sender, const winrt::IInspectable &e)
void | OnIsSelectedChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | RaiseExpandCollapseAutomationEvent (bool isExpanded)
void | RaiseSelectionChangeEvents (bool isSelected)
void | RecycleEvents (bool useSafeGet=false)
void | ReorderItems (const winrt::ListView &listControl, const winrt::TreeViewNode &targetNode, int position, int childIndex, bool isForwards)
bool | ToggleSelection ()
winrt::TreeViewNode | TreeNode ()
void | UpdateNodeIsExpandedAsync (winrt::TreeViewNode const &node, bool isExpanded)
void | UpdateTreeViewItemVisualState (TreeNodeSelectionState const &state)

Static Private Member Functions

static bool constexpr | IsDirectionalKey (winrt::VirtualKey key)

Static Private Attributes

static constexpr PCWSTR | c_expandCollapseChevronName = "ExpandCollapseChevron"
static constexpr PCWSTR | c_multiSelectCheckBoxName = "MultiSelectCheckBox"

Detailed Description

Definition at line 17 of file TreeViewItem.h.

Constructor & Destructor Documentation

TreeViewItem ( )

Definition at line 12 of file TreeViewItem.cpp.

{
    SetDefaultStyleKey(this);
    SetValue(s_TreeViewItemTemplateSettingsProperty, winrt::make<::TreeViewItemTemplateSettings>());
}

~TreeViewItem ( )

Definition at line 18 of file TreeViewItem.cpp.

{
    // We only need to use safe_get in the deconstruction loop
    RecycleEvents(true /* useSafeGet */);
}

Member Function Documentation

com_ptr< TreeView > AncestorTreeView ( ) [private]

Definition at line 301 of file TreeViewItem.cpp.

{
    if (!m_ancestorTreeView.get())
    {
        m_ancestorTreeView = winrt::make_weak<winrt::TreeView>(GetAncestorView<winrt::TreeView>());
    }
    return winrt::get_self<TreeView>(m_ancestorTreeView.get())->get_strong();
}

TreeNodeSelectionState CheckBoxSelectionState ( winrt::CheckBox const & checkBox ) [private]

Definition at line 759 of file TreeViewItem.cpp.

{
    winrt::IReference<bool> winrtBool = checkBox.IsChecked();
    if (winrtBool)
    {
        if (winrtBool.Value())
        {
            return TreeNodeSelectionState::Selected;
        }

        return TreeNodeSelectionState::UnSelected;
    }

    return TreeNodeSelectionState::PartialSelected;
}

T GetAncestorView ( ) [private]

Definition at line 289 of file TreeViewItem.cpp.

{
    winrt::DependencyObject treeViewItemAncestor = *this;
    T ancestorView = nullptr;
    while (treeViewItemAncestor && !ancestorView)
    {
        treeViewItemAncestor = winrt::VisualTreeHelper::GetParent(treeViewItemAncestor);
        ancestorView = treeViewItemAncestor.try_as<T>();
    }
    return ancestorView;
}

bool HandleExpandCollapse ( winrt::VirtualKey key ) [private]

Definition at line 636 of file TreeViewItem.cpp.

{
    const auto treeView = AncestorTreeView();
    const winrt::TreeViewNode targetNode = treeView->NodeFromContainer(*this);
    const auto flowDirectionReversed = (FlowDirection() == winrt::FlowDirection::RightToLeft);
    const bool isExpanded = targetNode.IsExpanded();
    bool handled = false;

    // Inputs for Collapse/Move to parent
    if ((key == winrt::VirtualKey::Left && !flowDirectionReversed) ||
        (key == winrt::VirtualKey::Right && flowDirectionReversed))
    {
        if (isExpanded)// Is expanded : need to collapse
        {
            targetNode.IsExpanded(false);
            const auto targetValue = treeView->ContainerFromNode(targetNode);
            if (targetValue)
            {
                const auto targetItem = targetValue.as<winrt::TreeViewItem>();
                targetItem.Focus(winrt::FocusState::Keyboard);
            }

            handled = true;
        }
        else // Is collapsed: need to select parent
        {
            if (auto parentNode = targetNode.Parent())
            {
                if (auto parentValue = treeView->ContainerFromNode(parentNode))
                {
                    const auto parentItem = parentValue.as<winrt::TreeViewItem>();
                    parentItem.Focus(winrt::FocusState::Keyboard);
                    handled = true;
                }
            }
        }
    }
    // Inputs for Expand/Move to first child
    else if ((key == winrt::VirtualKey::Right && !flowDirectionReversed) ||
             (key == winrt::VirtualKey::Left && flowDirectionReversed))
    {
        if (!isExpanded && targetNode.HasChildren()) // Is collapsed : need to expand
        {
            targetNode.IsExpanded(true);
            handled = true;
        }
        else if (targetNode.Children().Size() > 0) // Is expanded and has children: need to select first child (if applicable)
        {
            const auto childNode = targetNode.Children().GetAt(0).as<winrt::TreeViewNode>();
            const auto childValue = treeView->ContainerFromNode(childNode);
            if (childValue)
            {
                const auto childItem = childValue.as<winrt::TreeViewItem>();
                childItem.Focus(winrt::FocusState::Keyboard);
                handled = true;
            }
        }
    }

    return handled;
}

void HandleGamepadAInMultiselectMode ( const winrt::TreeViewNode & node ) [private]

Definition at line 568 of file TreeViewItem.cpp.

{
    if (node.HasChildren())
    {
        // Non-leaf node: cycle between selection and expansion
        if (!m_expansionCycled)
        {
            node.IsExpanded(!node.IsExpanded());
            m_expansionCycled = true;
        }
        else
        {
            m_expansionCycled = ToggleSelection();
        }
    }
    else
    {
        // Leaf node: toggle selection
        ToggleSelection();
    }
}

void HandleReorder ( winrt::VirtualKey key ) [private]

Definition at line 598 of file TreeViewItem.cpp.

{
    winrt::TreeViewNode targetNode = TreeNode();

    winrt::TreeViewNode parentNode = targetNode.Parent();
    const auto listControl = AncestorTreeView()->ListControl();
    unsigned int position = listControl->IndexFromContainer(*this);
    if (key == winrt::VirtualKey::Up || key == winrt::VirtualKey::Left && position != 0)
    {
        unsigned int childIndex;
        parentNode.Children().IndexOf(targetNode, childIndex);

        if (childIndex != 0)
        {
            if (targetNode.IsExpanded())
            {
                targetNode.IsExpanded(false);
            }

            ReorderItems(*listControl, targetNode, position, childIndex, false);
        }
    }
    else if ((key == winrt::VirtualKey::Down || key == winrt::VirtualKey::Right) && (position != listControl->Items().Size() - 1))
    {
        unsigned int childIndex;
        parentNode.Children().IndexOf(targetNode, childIndex);
        if (childIndex != parentNode.Children().Size() - 1)
        {
            if (targetNode.IsExpanded())
            {
                targetNode.IsExpanded(false);
            }

            ReorderItems(*listControl, targetNode, position, childIndex, true);
        }
    }
}

bool constexpr IsDirectionalKey ( winrt::VirtualKey key ) [static, private]

Definition at line 722 of file TreeViewItem.cpp.

{
    return
        key == winrt::VirtualKey::Up ||
        key == winrt::VirtualKey::Down ||
        key == winrt::VirtualKey::Left ||
        key == winrt::VirtualKey::Right;
}

bool IsExpandCollapse ( winrt::VirtualKey key ) [private]

Definition at line 527 of file TreeViewItem.cpp.

{
    const auto ctrlState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control);
    const bool isControlPressed = (ctrlState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    const auto altState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu);
    const bool isAltPressed = (altState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    const auto shiftState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Shift);
    const bool isShiftPressed = (shiftState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    const bool isDirectionPressed = IsDirectionalKey(key);

    return (isDirectionPressed && !isShiftPressed && !isAltPressed && !isControlPressed);
}

bool IsInContentMode ( ) [private]

Definition at line 752 of file TreeViewItem.cpp.

{
    const auto treeView = AncestorTreeView();
    const auto treeViewList = treeView->ListControl();
    return treeViewList->ListViewModel()->IsContentMode();
}

bool IsInReorderMode ( winrt::VirtualKey keys ) [private]

Definition at line 377 of file TreeViewItem.cpp.

{
    const auto ctrlState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control);
    const bool isControlPressed = (ctrlState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    const auto altState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu);
    const bool isAltPressed = (altState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    const auto shiftState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Shift);
    const bool isShiftPressed = (shiftState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

    const bool isDirectionPressed = IsDirectionalKey(key);

    bool canReorderItems = false;
    if (auto treeView = AncestorTreeView())
    {
        canReorderItems = treeView->CanReorderItems();
    }

    return canReorderItems && isDirectionPressed && isShiftPressed && isAltPressed && !isControlPressed;
}

bool IsSelectedInternal ( )

Definition at line 497 of file TreeViewItem.cpp.

{
    // Check Selector::IsChecked for single selection since we use
    // ListView's single selection. In multiple selection we roll our own.
    bool isSelected = IsSelected();
    if (const auto treeView = AncestorTreeView())
    {
        const auto listControl = treeView->ListControl();
        if (listControl && listControl->IsMultiselect())
        {
            const TreeNodeSelectionState state = CheckBoxSelectionState(m_selectionBox.get());
            isSelected = state == TreeNodeSelectionState::Selected;
        }
    }

    return isSelected;
}

void OnApplyTemplate ( )

Definition at line 258 of file TreeViewItem.cpp.

{
    RecycleEvents();

    winrt::IControlProtected controlProtected = *this;
    m_selectionBox.set(GetTemplateChildT<winrt::CheckBox>(c_multiSelectCheckBoxName, controlProtected));
    RegisterPropertyChangedCallback(winrt::SelectorItem::IsSelectedProperty(), { this, &TreeViewItem::OnIsSelectedChanged });

    if (m_selectionBox)
    {
        m_checkedEventRevoker = m_selectionBox.get().Checked(winrt::auto_revoke, { this, &TreeViewItem::OnCheckToggle });
        m_uncheckedEventRevoker = m_selectionBox.get().Unchecked(winrt::auto_revoke, { this, &TreeViewItem::OnCheckToggle });
    }

    const auto chevron = GetTemplateChildT<winrt::UIElement>(c_expandCollapseChevronName, controlProtected);
    if (chevron)
    {
        m_expandCollapseChevronPointerPressedToken = chevron.PointerPressed({ this, &TreeViewItem::OnExpandCollapseChevronPointerPressed });
        m_expandCollapseChevron.set(chevron);
    }
    const auto node = TreeNode();
    if (node && IsInContentMode())
    {
        UpdateNodeIsExpandedAsync(node, IsExpanded());
        node.HasUnrealizedChildren(HasUnrealizedChildren());
    }

    __super::OnApplyTemplate();
}

void OnCheckToggle | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 411 of file TreeViewItem.cpp.

{
    if (const auto treeView = AncestorTreeView())
    {
        const auto listControl = treeView->ListControl();
        const int index = listControl->IndexFromContainer(*this);
        const auto selectionState = CheckBoxSelectionState(sender.as<winrt::CheckBox>());
        listControl->ListViewModel()->SelectByIndex(index, selectionState);
        UpdateTreeViewItemVisualState(selectionState);
        RaiseSelectionChangeEvents(selectionState == TreeNodeSelectionState::Selected);
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 252 of file TreeViewItem.cpp.

{
    return winrt::make<TreeViewItemAutomationPeer>(*this);
}

void OnDragEnter ( winrt::DragEventArgs const & e )

Definition at line 176 of file TreeViewItem.cpp.

{
    winrt::TreeViewItem draggedOverItem = *this;

    args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
    args.DragUIOverride().IsGlyphVisible(true);

    const auto treeView = AncestorTreeView();
    if (treeView && treeView->CanReorderItems() && !args.Handled())
    {
        const auto treeViewList = treeView->ListControl();
        winrt::TreeViewNode draggedNode = treeViewList->DraggedTreeViewNode();
        if (draggedNode)
        {
            winrt::TreeViewNode draggedOverNode = treeView->NodeFromContainer(draggedOverItem);
            winrt::TreeViewNode walkNode = draggedOverNode.Parent();

            while (walkNode && walkNode != draggedNode)
            {
                walkNode = walkNode.Parent();
            }

            if (walkNode != draggedNode && draggedNode != draggedOverNode)
            {
                args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move);
            }

            winrt::TreeViewNode droppedOnNode = TreeNode();
            if (droppedOnNode != draggedNode) // Don't expand if drag hovering on itself.
            {
                // Set up timer.
                if (!draggedOverNode.IsExpanded() && draggedOverNode.HasChildren())
                {
                    if (m_expandContentTimer)
                    {
                        m_expandContentTimer.Stop();
                        m_expandContentTimer.Start();
                    }
                    else
                    {
                        // Initialize timer.
                        const winrt::TimeSpan interval = winrt::TimeSpan::duration(c_dragOverInterval);

                        m_expandContentTimer = winrt::DispatcherTimer();
                        m_expandContentTimer.Interval(interval);
                        m_expandContentTimer.Tick({ this, &TreeViewItem::OnExpandContentTimerTick });
                        m_expandContentTimer.Start();
                    }
                }
            }
        }
    }

    __super::OnDragEnter(args);
}

void OnDragLeave ( winrt::DragEventArgs const & e )

Definition at line 232 of file TreeViewItem.cpp.

{
    if (!args.Handled())
    {
        if (auto treeView = AncestorTreeView())
        {
            const auto mutableTreeViewList = treeView->MutableListControl();
            mutableTreeViewList->SetDraggedOverItem(nullptr);
        }

        if (m_expandContentTimer)
        {
            m_expandContentTimer.Stop();
        }
    }

    __super::OnDragLeave(args);
}

void OnDragOver ( winrt::DragEventArgs const & e )

Definition at line 128 of file TreeViewItem.cpp.

{
    const auto treeView = AncestorTreeView();
    if (treeView && !args.Handled())
    {
        const auto treeViewList = treeView->ListControl();
        winrt::TreeViewItem draggedOverItem = *this;
        winrt::TreeViewNode draggedOverNode = treeView->NodeFromContainer(draggedOverItem);
        winrt::TreeViewNode draggedNode = treeViewList->DraggedTreeViewNode();

        if (draggedNode && treeView->CanReorderItems())
        {
            if (treeViewList->IsMutiSelectWithSelectedItems())
            {
                if (treeViewList->IsSelected(draggedOverNode))
                {
                    args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
                    treeView->MutableListControl()->SetDraggedOverItem(nullptr);
                }
                else
                {
                    args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move);
                    treeView->MutableListControl()->SetDraggedOverItem(draggedOverItem);
                }
            }
            else
            {
                winrt::TreeViewNode walkNode = draggedOverNode.Parent();
                while (walkNode && walkNode != draggedNode)
                {
                    walkNode = walkNode.Parent();
                }

                const auto mutableTreeViewList = treeView->MutableListControl();
                if (walkNode != draggedNode && draggedNode != draggedOverNode)
                {
                    args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move);
                    mutableTreeViewList->SetDraggedOverItem(draggedOverItem);
                }

                mutableTreeViewList->UpdateDropTargetDropEffect(false, false, nullptr);
            }
        }
    }

    __super::OnDragOver(args);
}

void OnDrop ( winrt::DragEventArgs const & e )

Definition at line 68 of file TreeViewItem.cpp.

{
    if (!args.Handled() && args.AcceptedOperation() == winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move)
    {
        const winrt::TreeViewItem droppedOnItem = *this;
        const auto treeView = AncestorTreeView();
        if (treeView)
        {
            const auto treeViewList = treeView->ListControl();
            if (const auto droppedNode = treeViewList->DraggedTreeViewNode())
            {
                if (treeViewList->IsMutiSelectWithSelectedItems())
                {
                    const auto droppedOnNode = treeView->NodeFromContainer(droppedOnItem);
                    const auto selectedRoots = treeViewList->GetRootsOfSelectedSubtrees();
                    for (const auto node : selectedRoots)
                    {
                        const auto nodeIndex = treeViewList->FlatIndex(node);
                        if (treeViewList->IsFlatIndexValid(nodeIndex))
                        {
                            treeViewList->RemoveNodeFromParent(node);
                            winrt::get_self<TreeViewNodeVector>(droppedOnNode.Children())->Append(node);
                        }
                    }

                    args.Handled(true);
                    treeView->MutableListControl()->OnDrop(args);
                }
                else
                {
                    const auto droppedOnNode = treeView->NodeFromContainer(droppedOnItem);

                    // Remove the item that was dragged
                    unsigned int removeIndex;
                    droppedNode.Parent().Children().IndexOf(droppedNode, removeIndex);

                    if (droppedNode != droppedOnNode)
                    {
                        winrt::get_self<TreeViewNodeVector>(droppedNode.Parent().Children())->RemoveAt(removeIndex);

                        // Append the dragged dropped item as a child of the node it was dropped onto
                        winrt::get_self<TreeViewNodeVector>(droppedOnNode.Children())->Append(droppedNode);

                        // If not set to true then the Reorder code of listview will override what is being done here.
                        args.Handled(true);
                        treeView->MutableListControl()->OnDrop(args);
                    }
                    else
                    {
                        args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
                    }

                }
            }
        }
    }

    __super::OnDrop(args);
}

void OnExpandCollapseChevronPointerPressed | ( | const winrt::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 698 of file TreeViewItem.cpp.

{
    const winrt::TreeViewNode targetNode = TreeNode();
    const auto isExpanded = !targetNode.IsExpanded();
    targetNode.IsExpanded(isExpanded);

    args.Handled(true);
}

void OnExpandContentTimerTick | ( | const winrt::IInspectable & | sender,
 |  | const winrt::IInspectable & | e |
 | ) |  |  | [private]

Definition at line 348 of file TreeViewItem.cpp.

{
    if (m_expandContentTimer)
    {
        m_expandContentTimer.Stop();
    }

    if (auto draggedOverNode = TreeNode())
    {
        if (draggedOverNode && !draggedOverNode.IsExpanded())
        {
            draggedOverNode.IsExpanded(true);
        }
    }
}

void OnIsSelectedChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & | args |
 | ) |  |  | [private]

Definition at line 475 of file TreeViewItem.cpp.

{
    UpdateSelection(unbox_value<bool>(GetValue(args)));
}

void OnKeyDown ( winrt::KeyRoutedEventArgs const & e )

Definition at line 25 of file TreeViewItem.cpp.

{
    if (const auto targetNode = TreeNode())
    {
        const auto treeView = AncestorTreeView();
        const auto key = e.Key();
        const auto originalKey = e.OriginalKey();

        // If in multi-selection and gamepad a is pressed
        if (originalKey == winrt::VirtualKey::GamepadA &&
            treeView->ListControl()->IsMultiselect())
        {
            HandleGamepadAInMultiselectMode(targetNode);
            e.Handled(true);
        }
        else if (IsInReorderMode(key))
        {
            HandleReorder(key);
            e.Handled(true);
        }
        // Collapse/Expand
        else if (IsExpandCollapse(key))
        {
            const auto handled = HandleExpandCollapse(key);
            if (handled)
            {
                e.Handled(true);
            }
        }
        else if (key == winrt::VirtualKey::Space &&
                 treeView->ListControl()->IsMultiselect())
        {
            const auto selectionBox = m_selectionBox.get();
            const bool isSelected = CheckBoxSelectionState(selectionBox) == TreeNodeSelectionState::Selected;
            selectionBox.IsChecked(!isSelected);
            e.Handled(true);
        }
    }

    // Call to base for all other key presses
    __super::OnKeyDown(e);
}

void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 310 of file TreeViewItem.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    if (auto node = TreeNode())
    {
        if (property == s_IsExpandedProperty)
        {
            bool value = unbox_value<bool>(args.NewValue());
            if (node.IsExpanded() != value)
            {
                UpdateNodeIsExpandedAsync(node, value);
            }
            RaiseExpandCollapseAutomationEvent(value);
        }
        else if (property == s_ItemsSourceProperty)
        {
            SetItemsSource(node, args.NewValue());
        }
        else if (property == s_HasUnrealizedChildrenProperty)
        {
            bool value = unbox_value<bool>(args.NewValue());
            node.HasUnrealizedChildren(value);
        }
    }
}

void RaiseExpandCollapseAutomationEvent ( bool isExpanded ) [private]

Definition at line 364 of file TreeViewItem.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
    {
        const auto expandState = isExpanded ? winrt::ExpandCollapseState::Expanded : winrt::ExpandCollapseState::Collapsed;
        if (const auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
        {
            const auto treeViewItemPeer = peer.as<winrt::TreeViewItemAutomationPeer>();
            winrt::get_self<TreeViewItemAutomationPeer>(treeViewItemPeer)->RaiseExpandCollapseAutomationEvent(expandState);
        }
    }
}

void RaiseSelectionChangeEvents ( bool isSelected ) [private]

Definition at line 424 of file TreeViewItem.cpp.

{
    if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
    {
        const auto treeViewItemPeer = winrt::get_self<TreeViewItemAutomationPeer>(peer.as<winrt::TreeViewItemAutomationPeer>());

        const auto selectionEvent = isSelected ? winrt::AutomationEvents::SelectionItemPatternOnElementAddedToSelection : winrt::AutomationEvents::SelectionItemPatternOnElementRemovedFromSelection;
        treeViewItemPeer->RaiseAutomationEvent(selectionEvent);

        const auto isSelectedProperty = winrt::SelectionItemPatternIdentifiers::IsSelectedProperty();
        treeViewItemPeer->RaisePropertyChangedEvent(isSelectedProperty, box_value(!isSelected).as<winrt::IReference<bool>>(), box_value(isSelected).as<winrt::IReference<bool>>());
    }
}

void RecycleEvents ( bool useSafeGet = false ) [private]

Definition at line 709 of file TreeViewItem.cpp.

{
    if (auto chevron = useSafeGet ? m_expandCollapseChevron.safe_get() : m_expandCollapseChevron.get())
    {
        if (m_expandCollapseChevronPointerPressedToken.value)
        {
            chevron.PointerCanceled(m_expandCollapseChevronPointerPressedToken);
            m_expandCollapseChevronPointerPressedToken.value = 0;
        }
    }
}

void ReorderItems | ( | const winrt::ListView & | listControl,
 |  | const winrt::TreeViewNode & | targetNode,
 |  | int | position,
 |  | int | childIndex,
 |  | bool | isForwards |
 | ) |  |  | [private]

Definition at line 543 of file TreeViewItem.cpp.

{
    const int positionModifier = isForwards ? 1 : -1;
    if (auto skippedItem = listControl.ContainerFromIndex(position + positionModifier))
    {
        skippedItem.as<winrt::TreeViewItem>().Focus(winrt::FocusState::Keyboard);
    }

    const auto parentNode = targetNode.Parent();
    const auto children = winrt::get_self<TreeViewNodeVector>(parentNode.Children());
    children->RemoveAt(childIndex);
    children->InsertAt(childIndex + positionModifier, targetNode);
    listControl.UpdateLayout();

    const auto treeView = AncestorTreeView();
    if (const auto lvi = treeView->ContainerFromNode(targetNode))
    {
        const auto targetItem = lvi.as<winrt::TreeViewItem>();
        targetItem.Focus(winrt::FocusState::Keyboard);
        winrt::get_self<TreeViewList>(listControl.as<winrt::TreeViewList>())->UpdateDropTargetDropEffect(false, false, targetItem);
        winrt::AutomationPeer ancestorPeer = winrt::FrameworkElementAutomationPeer::FromElement(listControl);
        ancestorPeer.RaiseAutomationEvent(winrt::AutomationEvents::Dropped);
    }
}

void SetItemsSource | ( | winrt::TreeViewNode const & | node,
 |  | winrt::IInspectable const & | value
 | ) |  |

Definition at line 336 of file TreeViewItem.cpp.

{
    const auto treeViewNode = winrt::get_self<TreeViewNode>(node);
    treeViewNode->ItemsSource(value);
    if (IsInContentMode())
    {
        // The children have changed, validate and update GlyphOpacity
        const bool hasChildren = HasUnrealizedChildren() || treeViewNode->HasChildren();
        GlyphOpacity(hasChildren ? 1.0 : 0.0);
    }
}

bool ToggleSelection ( ) [private]

Definition at line 590 of file TreeViewItem.cpp.

{
    const auto currentState = CheckBoxSelectionState(m_selectionBox.get());
    const auto newState = currentState == TreeNodeSelectionState::Selected ? TreeNodeSelectionState::UnSelected : TreeNodeSelectionState::Selected;
    UpdateMultipleSelection(newState);
    return newState == TreeNodeSelectionState::Selected;
}

winrt::TreeViewNode TreeNode ( ) [private]

Definition at line 731 of file TreeViewItem.cpp.

{
    if (auto treeView = AncestorTreeView())
    {
        return treeView->NodeFromContainer(*this);
    }

    return nullptr;
}

void UpdateIndentation ( int depth )

Definition at line 515 of file TreeViewItem.cpp.

{
    winrt::Thickness thickness;
    thickness.Left = static_cast<double>(depth) * 16;
    thickness.Top = 0;
    thickness.Right = 0;
    thickness.Bottom = 0;

    const auto templateSettings = winrt::get_self<::TreeViewItemTemplateSettings>(TreeViewItemTemplateSettings());
    templateSettings->Indentation(thickness);
}

void UpdateMultipleSelection ( TreeNodeSelectionState const & state )

Definition at line 480 of file TreeViewItem.cpp.

{
    switch(state)
    {
    case TreeNodeSelectionState::Selected:
        m_selectionBox.get().IsChecked(true);
        break;
    case TreeNodeSelectionState::PartialSelected:
        m_selectionBox.get().IsChecked(nullptr);
        break;
    case TreeNodeSelectionState::UnSelected:
        m_selectionBox.get().IsChecked(false);
        break;
    }
    UpdateTreeViewItemVisualState(state);
}

void UpdateNodeIsExpandedAsync | ( | winrt::TreeViewNode const & | node,
 |  | bool | isExpanded |
 | ) |  |  | [private]

Definition at line 743 of file TreeViewItem.cpp.

{
    DispatcherQueue().TryEnqueue(
        winrt::Microsoft::UI::Dispatching::DispatcherQueueHandler([node, isExpanded]()
        {
            node.IsExpanded(isExpanded);
        }));
}

void UpdateSelection ( bool isSelected )

Definition at line 438 of file TreeViewItem.cpp.

{
    if (const auto treeView = AncestorTreeView())
    {
        if (const auto node = TreeNode())
        {
            treeView->UpdateSelection(node, isSelected);
        }
    }
}

void UpdateSelectionVisual ( TreeNodeSelectionState const & state )

Definition at line 449 of file TreeViewItem.cpp.

{
    if (const auto treeView = AncestorTreeView())
    {
        if (const auto listControl = treeView->ListControl())
        {
            if (listControl->IsMultiselect())
            {
                UpdateMultipleSelection(state);
            }
            else
            {
                if (const auto node = TreeNode())
                {
                    const auto viewModel = listControl->ListViewModel();
                    const auto isNodeSelected = viewModel->IsNodeSelected(node);
                    if (isNodeSelected != IsSelected())
                    {
                        IsSelected(isNodeSelected);
                    }
                }
            }
        }
    }
}

void UpdateTreeViewItemVisualState ( TreeNodeSelectionState const & state ) [private]

Definition at line 399 of file TreeViewItem.cpp.

{
    if (state == TreeNodeSelectionState::Selected)
    {
        winrt::VisualStateManager::GoToState(*this, L"TreeViewMultiSelectEnabledSelected", false);
    }
    else
    {
        winrt::VisualStateManager::GoToState(*this, L"TreeViewMultiSelectEnabledUnselected", false);
    }
}

Member Data Documentation

constexpr PCWSTR c_expandCollapseChevronName = "ExpandCollapseChevron" [static, private]

Definition at line 62 of file TreeViewItem.h.

constexpr PCWSTR c_multiSelectCheckBoxName = "MultiSelectCheckBox" [static, private]

Definition at line 61 of file TreeViewItem.h.

The documentation for this class was generated from the following files:
  • TreeView/TreeViewItem.h
  • TreeView/TreeViewItem.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TreeViewItemAutomationPeer Class Reference

#include "TreeViewItemAutomationPeer.h"

Inherits ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider >.

List of all members.

Public Member Functions

TreeViewItemAutomationPeer (winrt::TreeViewItem const &owner)
void | AddToSelection ()
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
int32_t | GetLevelCore ()
winrt::hstring | GetNameCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
int32_t | GetPositionInSetCore ()
int32_t | GetSizeOfSetCore ()
bool | IsSelected ()
void | RaiseExpandCollapseAutomationEvent (winrt::ExpandCollapseState newState)
void | RemoveFromSelection ()
void | Select ()
winrt::IRawElementProviderSimple | SelectionContainer ()

Private Member Functions

winrt::ListView | GetParentListView ()
winrt::TreeView | GetParentTreeView ()
winrt::TreeViewNode | GetTreeViewNode ()
void | UpdateSelection (bool select)

Detailed Description

Definition at line 8 of file TreeViewItemAutomationPeer.h.

Constructor & Destructor Documentation

TreeViewItemAutomationPeer ( winrt::TreeViewItem const & owner )

Definition at line 13 of file TreeViewItemAutomationPeer.cpp.

                                                                                :
    ReferenceTracker(owner)
{
}

Member Function Documentation

void AddToSelection ( )

Definition at line 206 of file TreeViewItemAutomationPeer.cpp.

{
    UpdateSelection(true);
}

void Collapse ( )

Definition at line 33 of file TreeViewItemAutomationPeer.cpp.

{
    if (auto ancestorTreeView = GetParentTreeView())
    {
        if (auto targetNode = GetTreeViewNode())
        {
            ancestorTreeView.Collapse(targetNode);
            RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Collapsed);
        }
    }
}

void Expand ( )

Definition at line 45 of file TreeViewItemAutomationPeer.cpp.

{
    if (auto ancestorTreeView = GetParentTreeView())
    {
        if (auto targetNode = GetTreeViewNode())
        {
            ancestorTreeView.Expand(targetNode);
            RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Expanded);
        }
    }
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 19 of file TreeViewItemAutomationPeer.cpp.

{
    auto targetNode = GetTreeViewNode();
    if (targetNode && targetNode.HasChildren())
    {
        if (targetNode.IsExpanded())
        {
            return winrt::ExpandCollapseState::Expanded;
        }
        return winrt::ExpandCollapseState::Collapsed;
    }
    return winrt::ExpandCollapseState::LeafNode;
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 77 of file TreeViewItemAutomationPeer.cpp.

{
    return winrt::AutomationControlType::TreeItem;
}

winrt::hstring GetClassNameCore ( )

Definition at line 104 of file TreeViewItemAutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::TreeViewItem>();
}

int32_t GetLevelCore ( )

Definition at line 149 of file TreeViewItemAutomationPeer.cpp.

{
    winrt::ListView ancestorListView = GetParentListView();
    auto targetNode = GetTreeViewNode();
    int level = -1;

    if (ancestorListView && targetNode)
    {
        level = targetNode.Depth();
        level++;
    }

    return level;
}

winrt::hstring GetNameCore ( )

Definition at line 82 of file TreeViewItemAutomationPeer.cpp.

{
    //Check to see if the item has a defined Automation Name
    winrt::hstring nameHString = __super::GetNameCore();

    if (nameHString.empty())
    {
        auto treeViewNode = GetTreeViewNode();
        if (treeViewNode)
        {
            nameHString = SharedHelpers::TryGetStringRepresentationFromObject(treeViewNode.Content());
        }

        if (nameHString.empty())
        {
            nameHString = L"TreeViewNode";
        }
    }

    return nameHString;
}

winrt::ListView GetParentListView ( ) [private]

Definition at line 221 of file TreeViewItemAutomationPeer.cpp.

{
    auto treeViewItemAncestor = Owner().as<winrt::DependencyObject>();
    winrt::ListView ancestorListView{ nullptr };

    while (treeViewItemAncestor && !ancestorListView)
    {
        treeViewItemAncestor = winrt::VisualTreeHelper::GetParent(treeViewItemAncestor);
        if (treeViewItemAncestor != nullptr)
        {
            ancestorListView = treeViewItemAncestor.try_as<winrt::ListView>();
        }
    }

    return ancestorListView;
}

winrt::TreeView GetParentTreeView ( ) [private]

Definition at line 238 of file TreeViewItemAutomationPeer.cpp.

{
    auto treeViewItemAncestor = static_cast<winrt::DependencyObject>(Owner());
    winrt::TreeView ancestorTreeView{ nullptr };

    while (treeViewItemAncestor && !ancestorTreeView)
    {
        treeViewItemAncestor = winrt::VisualTreeHelper::GetParent(treeViewItemAncestor);
        if (treeViewItemAncestor)
        {
            ancestorTreeView = treeViewItemAncestor.try_as<winrt::TreeView>();
        }
    }

    return ancestorTreeView;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 58 of file TreeViewItemAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::ExpandCollapse)
    {
        return *this;
    }

    if (auto treeView = GetParentTreeView())
    {
        if (patternInterface == winrt::PatternInterface::SelectionItem && treeView.SelectionMode() != winrt::TreeViewSelectionMode::None)
        {
            return *this;
        }
    }

    return __super::GetPatternCore(patternInterface);
}

int32_t GetPositionInSetCore ( )

Definition at line 110 of file TreeViewItemAutomationPeer.cpp.

{
    winrt::ListView ancestorListView = GetParentListView();
    auto targetNode = GetTreeViewNode();
    int positionInSet = 0;

    if (ancestorListView && targetNode)
    {
        if (const auto targetParentNode = targetNode.Parent())
        {
            UINT32 position = 0;
            if (targetParentNode.Children().IndexOf(targetNode, position))
            {
                positionInSet = static_cast<int>(position) + 1;
            }
        }
    }

    return positionInSet;
}

int32_t GetSizeOfSetCore ( )

Definition at line 131 of file TreeViewItemAutomationPeer.cpp.

{
    winrt::ListView ancestorListView = GetParentListView();
    auto targetNode = GetTreeViewNode();
    int setSize = 0;

    if (ancestorListView && targetNode)
    {
        if (const auto targetParentNode = targetNode.Parent())
        {
            UINT32 size = targetParentNode.Children().Size();
            setSize = static_cast<int>(size);
        }
    }

    return setSize;
}

winrt::TreeViewNode GetTreeViewNode ( ) [private]

Definition at line 255 of file TreeViewItemAutomationPeer.cpp.

{
    winrt::TreeViewNode targetNode{ nullptr };
    if (auto treeview = GetParentTreeView())
    {
        targetNode = treeview.NodeFromContainer(Owner());
    }
    return targetNode;
}

bool IsSelected ( )

Definition at line 186 of file TreeViewItemAutomationPeer.cpp.

{
    auto treeViewItem = winrt::get_self<TreeViewItem>(Owner().as<winrt::TreeViewItem>());
    return treeViewItem->IsSelectedInternal();
}

void RaiseExpandCollapseAutomationEvent ( winrt::ExpandCollapseState newState )

Definition at line 164 of file TreeViewItemAutomationPeer.cpp.

{
    if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
    {
        winrt::ExpandCollapseState oldState;
        auto expandCollapseStateProperty = winrt::ExpandCollapsePatternIdentifiers::ExpandCollapseStateProperty();

        if (newState == winrt::ExpandCollapseState::Expanded)
        {
            oldState = winrt::ExpandCollapseState::Collapsed;
        }
        else
        {
            oldState = winrt::ExpandCollapseState::Expanded;
        }

        // box_value(oldState) doesn't work here, use ReferenceWithABIRuntimeClassName to make Narrator can unbox it.
        RaisePropertyChangedEvent(expandCollapseStateProperty, box_value(oldState), box_value(newState));
    }
}

void RemoveFromSelection ( )

Definition at line 211 of file TreeViewItemAutomationPeer.cpp.

{
    UpdateSelection(false);
}

void Select ( )

Definition at line 216 of file TreeViewItemAutomationPeer.cpp.

{
    UpdateSelection(true);
}

winrt::IRawElementProviderSimple SelectionContainer ( )

Definition at line 192 of file TreeViewItemAutomationPeer.cpp.

{
    winrt::IRawElementProviderSimple provider{ nullptr };
    if (auto listView = GetParentListView())
    {
        if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(listView))
        {
            provider = ProviderFromPeer(peer);
        }
    }

    return provider;
}

void UpdateSelection ( bool select ) [private]

Definition at line 265 of file TreeViewItemAutomationPeer.cpp.

{
    if (auto treeItem = Owner().try_as<winrt::TreeViewItem>())
    {
        auto impl = winrt::get_self<TreeViewItem>(treeItem);
        impl->UpdateSelection(select);
    }
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewItemAutomationPeer.h
  • TreeView/TreeViewItemAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemDataAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TreeViewItemDataAutomationPeer Class Reference

#include "TreeViewItemDataAutomationPeer.h"

Inherits ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT >.

List of all members.

Public Member Functions

TreeViewItemDataAutomationPeer (winrt::IInspectable const &item, winrt::TreeViewListAutomationPeer const &parent)
void | Collapse ()
void | Expand ()
winrt::ExpandCollapseState | ExpandCollapseState ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)

Private Member Functions

winrt::TreeViewItemAutomationPeer | GetTreeViewItemAutomationPeer ()

Detailed Description

Definition at line 8 of file TreeViewItemDataAutomationPeer.h.

Constructor & Destructor Documentation

TreeViewItemDataAutomationPeer | ( | winrt::IInspectable const & | item,
 |  | winrt::TreeViewListAutomationPeer const & | parent
 | ) |  |

Definition at line 14 of file TreeViewItemDataAutomationPeer.cpp.

                                                                                :
    ReferenceTracker(item, parent)
{
}

Member Function Documentation

void Collapse ( )

Definition at line 29 of file TreeViewItemDataAutomationPeer.cpp.

{
    if (auto peer = GetTreeViewItemAutomationPeer())
    {
        return peer.Collapse();
    }
    throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
}

void Expand ( )

Definition at line 38 of file TreeViewItemDataAutomationPeer.cpp.

{
    if (auto peer = GetTreeViewItemAutomationPeer())
    {
        return peer.Expand();
    }
    throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
}

winrt::ExpandCollapseState ExpandCollapseState ( )

Definition at line 20 of file TreeViewItemDataAutomationPeer.cpp.

{
    if (auto peer = GetTreeViewItemAutomationPeer())
    {
        return peer.ExpandCollapseState();
    }
    throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 48 of file TreeViewItemDataAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::ExpandCollapse)
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::TreeViewItemAutomationPeer GetTreeViewItemAutomationPeer ( ) [private]

Definition at line 58 of file TreeViewItemDataAutomationPeer.cpp.

{
    // ItemsAutomationPeer hold ItemsControlAutomationPeer and Item properties.
    // ItemsControlAutomationPeer -> ItemsControl by ItemsControlAutomationPeer.Owner -> ItemsControl Look up Item to get TreeViewItem -> Get TreeViewItemAutomationPeer
    if (auto itemsControlAutomationPeer = ItemsControlAutomationPeer())
    {
        if (auto itemsControl = itemsControlAutomationPeer.Owner().try_as<winrt::ItemsControl>())
        {
            if (auto item = itemsControl.ContainerFromItem(Item()).try_as<winrt::UIElement>())
            {
                if (auto treeViewItemAutomationPeer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(item).try_as<winrt::TreeViewItemAutomationPeer>())
                {
                    return treeViewItemAutomationPeer;
                }
            }
        }
    }
    throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewItemDataAutomationPeer.h
  • TreeView/TreeViewItemDataAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemInvokedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TreeViewItemInvokedEventArgs Class Reference

#include "TreeViewItemInvokedEventArgs.h"

Inherits ReferenceTracker< TreeViewItemInvokedEventArgs, winrt::implementation::TreeViewItemInvokedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

bool | Handled ()
void | Handled (bool value)
void | InvokedItem (const winrt::IInspectable &invokedItem)
winrt::IInspectable | InvokedItem ()

Detailed Description

Definition at line 8 of file TreeViewItemInvokedEventArgs.h.

Member Function Documentation

bool Handled ( )

Definition at line 13 of file TreeViewItemInvokedEventArgs.cpp.

{
    return m_Handled;
}

void Handled ( bool value )

Definition at line 18 of file TreeViewItemInvokedEventArgs.cpp.

{
    m_Handled = value;
}

void InvokedItem ( const winrt::IInspectable & invokedItem )

Definition at line 23 of file TreeViewItemInvokedEventArgs.cpp.

{
    m_invokedItem.set(invokedItem);
}

winrt::IInspectable InvokedItem ( )

Definition at line 8 of file TreeViewItemInvokedEventArgs.cpp.

{
    return m_invokedItem.get();
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewItemInvokedEventArgs.h
  • TreeView/TreeViewItemInvokedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

TreeViewItemProperties Class Reference

#include "TreeViewItem.properties.h"

Inherited by TreeViewItem.

List of all members.

Public Member Functions

TreeViewItemProperties ()
void | CollapsedGlyph (winrt::hstring const &value)
winrt::hstring | CollapsedGlyph ()
void | ExpandedGlyph (winrt::hstring const &value)
winrt::hstring | ExpandedGlyph ()
void | GlyphBrush (winrt::Brush const &value)
winrt::Brush | GlyphBrush ()
void | GlyphOpacity (double value)
double | GlyphOpacity ()
void | GlyphSize (double value)
double | GlyphSize ()
void | HasUnrealizedChildren (bool value)
bool | HasUnrealizedChildren ()
void | IsExpanded (bool value)
bool | IsExpanded ()
winrt::IInspectable | ItemsSource ()
void | ItemsSource (winrt::IInspectable const &value)
winrt::TreeViewItemTemplateSettings | TreeViewItemTemplateSettings ()
void | TreeViewItemTemplateSettings (winrt::TreeViewItemTemplateSettings const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | CollapsedGlyphProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ExpandedGlyphProperty ()
static winrt::DependencyProperty | GlyphBrushProperty ()
static winrt::DependencyProperty | GlyphOpacityProperty ()
static winrt::DependencyProperty | GlyphSizeProperty ()
static winrt::DependencyProperty | HasUnrealizedChildrenProperty ()
static winrt::DependencyProperty | IsExpandedProperty ()
static winrt::DependencyProperty | ItemsSourceProperty ()
static void | OnHasUnrealizedChildrenPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsExpandedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | TreeViewItemTemplateSettingsProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_CollapsedGlyphProperty
static GlobalDependencyProperty | s_ExpandedGlyphProperty
static GlobalDependencyProperty | s_GlyphBrushProperty
static GlobalDependencyProperty | s_GlyphOpacityProperty
static GlobalDependencyProperty | s_GlyphSizeProperty
static GlobalDependencyProperty | s_HasUnrealizedChildrenProperty
static GlobalDependencyProperty | s_IsExpandedProperty
static GlobalDependencyProperty | s_ItemsSourceProperty
static GlobalDependencyProperty | s_TreeViewItemTemplateSettingsProperty

Detailed Description

Definition at line 7 of file TreeViewItem.properties.h.

Constructor & Destructor Documentation

TreeViewItemProperties ( )

Definition at line 26 of file TreeViewItem.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 134 of file TreeViewItem.properties.cpp.

{
    s_CollapsedGlyphProperty = nullptr;
    s_ExpandedGlyphProperty = nullptr;
    s_GlyphBrushProperty = nullptr;
    s_GlyphOpacityProperty = nullptr;
    s_GlyphSizeProperty = nullptr;
    s_HasUnrealizedChildrenProperty = nullptr;
    s_IsExpandedProperty = nullptr;
    s_ItemsSourceProperty = nullptr;
    s_TreeViewItemTemplateSettingsProperty = nullptr;
}

winrt::hstring CollapsedGlyph ( )

Definition at line 179 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_CollapsedGlyphProperty));
}

void CollapsedGlyph ( winrt::hstring const & value )

Definition at line 171 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_CollapsedGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty CollapsedGlyphProperty ( ) [inline, static]

Definition at line 39 of file TreeViewItem.properties.h.

{ return s_CollapsedGlyphProperty; }

void EnsureProperties ( ) [static]

Definition at line 31 of file TreeViewItem.properties.cpp.

{
    if (!s_CollapsedGlyphProperty)
    {
        s_CollapsedGlyphProperty =
            InitializeDependencyProperty(
                L"CollapsedGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxValueIfNecessary(L"\uE76C"),
                nullptr);
    }
    if (!s_ExpandedGlyphProperty)
    {
        s_ExpandedGlyphProperty =
            InitializeDependencyProperty(
                L"ExpandedGlyph",
                winrt::name_of<winrt::hstring>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::hstring>::BoxValueIfNecessary(L"\uE70D"),
                nullptr);
    }
    if (!s_GlyphBrushProperty)
    {
        s_GlyphBrushProperty =
            InitializeDependencyProperty(
                L"GlyphBrush",
                winrt::name_of<winrt::Brush>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::Brush>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_GlyphOpacityProperty)
    {
        s_GlyphOpacityProperty =
            InitializeDependencyProperty(
                L"GlyphOpacity",
                winrt::name_of<double>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(1.0),
                nullptr);
    }
    if (!s_GlyphSizeProperty)
    {
        s_GlyphSizeProperty =
            InitializeDependencyProperty(
                L"GlyphSize",
                winrt::name_of<double>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(8.0),
                nullptr);
    }
    if (!s_HasUnrealizedChildrenProperty)
    {
        s_HasUnrealizedChildrenProperty =
            InitializeDependencyProperty(
                L"HasUnrealizedChildren",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnHasUnrealizedChildrenPropertyChanged));
    }
    if (!s_IsExpandedProperty)
    {
        s_IsExpandedProperty =
            InitializeDependencyProperty(
                L"IsExpanded",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsExpandedPropertyChanged));
    }
    if (!s_ItemsSourceProperty)
    {
        s_ItemsSourceProperty =
            InitializeDependencyProperty(
                L"ItemsSource",
                winrt::name_of<winrt::IInspectable>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnItemsSourcePropertyChanged));
    }
    if (!s_TreeViewItemTemplateSettingsProperty)
    {
        s_TreeViewItemTemplateSettingsProperty =
            InitializeDependencyProperty(
                L"TreeViewItemTemplateSettings",
                winrt::name_of<winrt::TreeViewItemTemplateSettings>(),
                winrt::name_of<winrt::TreeViewItem>(),
                false /* isAttached */,
                ValueHelper<winrt::TreeViewItemTemplateSettings>::BoxedDefaultValue(),
                nullptr);
    }
}

winrt::hstring ExpandedGlyph ( )

Definition at line 192 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_ExpandedGlyphProperty));
}

void ExpandedGlyph ( winrt::hstring const & value )

Definition at line 184 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_ExpandedGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ExpandedGlyphProperty ( ) [inline, static]

Definition at line 40 of file TreeViewItem.properties.h.

{ return s_ExpandedGlyphProperty; }

void GlyphBrush ( winrt::Brush const & value )

Definition at line 197 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_GlyphBrushProperty, ValueHelper<winrt::Brush>::BoxValueIfNecessary(value));
    }
}

winrt::Brush GlyphBrush ( )

Definition at line 205 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_GlyphBrushProperty));
}

static winrt::DependencyProperty GlyphBrushProperty ( ) [inline, static]

Definition at line 41 of file TreeViewItem.properties.h.

{ return s_GlyphBrushProperty; }

double GlyphOpacity ( )

Definition at line 218 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_GlyphOpacityProperty));
}

void GlyphOpacity ( double value )

Definition at line 210 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_GlyphOpacityProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty GlyphOpacityProperty ( ) [inline, static]

Definition at line 42 of file TreeViewItem.properties.h.

{ return s_GlyphOpacityProperty; }

void GlyphSize ( double value )

Definition at line 223 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_GlyphSizeProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double GlyphSize ( )

Definition at line 231 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_GlyphSizeProperty));
}

static winrt::DependencyProperty GlyphSizeProperty ( ) [inline, static]

Definition at line 43 of file TreeViewItem.properties.h.

{ return s_GlyphSizeProperty; }

void HasUnrealizedChildren ( bool value )

Definition at line 236 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_HasUnrealizedChildrenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool HasUnrealizedChildren ( )

Definition at line 244 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_HasUnrealizedChildrenProperty));
}

static winrt::DependencyProperty HasUnrealizedChildrenProperty ( ) [inline, static]

Definition at line 44 of file TreeViewItem.properties.h.

{ return s_HasUnrealizedChildrenProperty; }

void IsExpanded ( bool value )

Definition at line 249 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_IsExpandedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

bool IsExpanded ( )

Definition at line 257 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_IsExpandedProperty));
}

static winrt::DependencyProperty IsExpandedProperty ( ) [inline, static]

Definition at line 45 of file TreeViewItem.properties.h.

{ return s_IsExpandedProperty; }

winrt::IInspectable ItemsSource ( )

Definition at line 270 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_ItemsSourceProperty));
}

void ItemsSource ( winrt::IInspectable const & value )

Definition at line 262 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_ItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ItemsSourceProperty ( ) [inline, static]

Definition at line 46 of file TreeViewItem.properties.h.

{ return s_ItemsSourceProperty; }

void OnHasUnrealizedChildrenPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 147 of file TreeViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::TreeViewItem>();
    winrt::get_self<TreeViewItem>(owner)->OnPropertyChanged(args);
}

void OnIsExpandedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 155 of file TreeViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::TreeViewItem>();
    winrt::get_self<TreeViewItem>(owner)->OnPropertyChanged(args);
}

void OnItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 163 of file TreeViewItem.properties.cpp.

{
    auto owner = sender.as<winrt::TreeViewItem>();
    winrt::get_self<TreeViewItem>(owner)->OnPropertyChanged(args);
}

winrt::TreeViewItemTemplateSettings TreeViewItemTemplateSettings ( )

Definition at line 283 of file TreeViewItem.properties.cpp.

{
    return ValueHelper<winrt::TreeViewItemTemplateSettings>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_TreeViewItemTemplateSettingsProperty));
}

void TreeViewItemTemplateSettings ( winrt::TreeViewItemTemplateSettings const & value )

Definition at line 275 of file TreeViewItem.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItem*>(this)->SetValue(s_TreeViewItemTemplateSettingsProperty, ValueHelper<winrt::TreeViewItemTemplateSettings>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty TreeViewItemTemplateSettingsProperty ( ) [inline, static]

Definition at line 47 of file TreeViewItem.properties.h.

{ return s_TreeViewItemTemplateSettingsProperty; }

Member Data Documentation

GlobalDependencyProperty s_CollapsedGlyphProperty [static]

Definition at line 49 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_ExpandedGlyphProperty [static]

Definition at line 50 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_GlyphBrushProperty [static]

Definition at line 51 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_GlyphOpacityProperty [static]

Definition at line 52 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_GlyphSizeProperty [static]

Definition at line 53 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_HasUnrealizedChildrenProperty [static]

Definition at line 54 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_IsExpandedProperty [static]

Definition at line 55 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_ItemsSourceProperty [static]

Definition at line 56 of file TreeViewItem.properties.h.

GlobalDependencyProperty s_TreeViewItemTemplateSettingsProperty [static]

Definition at line 57 of file TreeViewItem.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TreeViewItem.properties.h
  • Generated/TreeViewItem.properties.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemTemplateSettings Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TreeViewItemTemplateSettings Class Reference

#include "TreeViewItemTemplateSettings.h"

Inherits TreeViewItemTemplateSettingsProperties.

List of all members.

Public Member Functions

TreeViewItemTemplateSettings ()

Detailed Description

Definition at line 9 of file TreeViewItemTemplateSettings.h.

Constructor & Destructor Documentation

TreeViewItemTemplateSettings ( )

Definition at line 8 of file TreeViewItemTemplateSettings.cpp.

{
    EnsureProperties();
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewItemTemplateSettings.h
  • TreeView/TreeViewItemTemplateSettings.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemTemplateSettingsProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

TreeViewItemTemplateSettingsProperties Class Reference

#include "TreeViewItemTemplateSettings.properties.h"

Inherited by TreeViewItemTemplateSettings.

List of all members.

Public Member Functions

TreeViewItemTemplateSettingsProperties ()
void | CollapsedGlyphVisibility (winrt::Visibility const &value)
winrt::Visibility | CollapsedGlyphVisibility ()
void | DragItemsCount (int value)
int | DragItemsCount ()
winrt::Visibility | ExpandedGlyphVisibility ()
void | ExpandedGlyphVisibility (winrt::Visibility const &value)
winrt::Thickness | Indentation ()
void | Indentation (winrt::Thickness const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | CollapsedGlyphVisibilityProperty ()
static winrt::DependencyProperty | DragItemsCountProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ExpandedGlyphVisibilityProperty ()
static winrt::DependencyProperty | IndentationProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_CollapsedGlyphVisibilityProperty
static GlobalDependencyProperty | s_DragItemsCountProperty
static GlobalDependencyProperty | s_ExpandedGlyphVisibilityProperty
static GlobalDependencyProperty | s_IndentationProperty

Detailed Description

Definition at line 7 of file TreeViewItemTemplateSettings.properties.h.

Constructor & Destructor Documentation

TreeViewItemTemplateSettingsProperties ( )

Definition at line 21 of file TreeViewItemTemplateSettings.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 74 of file TreeViewItemTemplateSettings.properties.cpp.

{
    s_CollapsedGlyphVisibilityProperty = nullptr;
    s_DragItemsCountProperty = nullptr;
    s_ExpandedGlyphVisibilityProperty = nullptr;
    s_IndentationProperty = nullptr;
}

winrt::Visibility CollapsedGlyphVisibility ( )

Definition at line 90 of file TreeViewItemTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<TreeViewItemTemplateSettings*>(this)->GetValue(s_CollapsedGlyphVisibilityProperty));
}

void CollapsedGlyphVisibility ( winrt::Visibility const & value )

Definition at line 82 of file TreeViewItemTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItemTemplateSettings*>(this)->SetValue(s_CollapsedGlyphVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty CollapsedGlyphVisibilityProperty ( ) [inline, static]

Definition at line 24 of file TreeViewItemTemplateSettings.properties.h.

{ return s_CollapsedGlyphVisibilityProperty; }

int DragItemsCount ( )

Definition at line 103 of file TreeViewItemTemplateSettings.properties.cpp.

{
    return ValueHelper<int>::CastOrUnbox(static_cast<TreeViewItemTemplateSettings*>(this)->GetValue(s_DragItemsCountProperty));
}

void DragItemsCount ( int value )

Definition at line 95 of file TreeViewItemTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItemTemplateSettings*>(this)->SetValue(s_DragItemsCountProperty, ValueHelper<int>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty DragItemsCountProperty ( ) [inline, static]

Definition at line 25 of file TreeViewItemTemplateSettings.properties.h.

{ return s_DragItemsCountProperty; }

void EnsureProperties ( ) [static]

Definition at line 26 of file TreeViewItemTemplateSettings.properties.cpp.

{
    if (!s_CollapsedGlyphVisibilityProperty)
    {
        s_CollapsedGlyphVisibilityProperty =
            InitializeDependencyProperty(
                L"CollapsedGlyphVisibility",
                winrt::name_of<winrt::Visibility>(),
                winrt::name_of<winrt::TreeViewItemTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
                nullptr);
    }
    if (!s_DragItemsCountProperty)
    {
        s_DragItemsCountProperty =
            InitializeDependencyProperty(
                L"DragItemsCount",
                winrt::name_of<int>(),
                winrt::name_of<winrt::TreeViewItemTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<int>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_ExpandedGlyphVisibilityProperty)
    {
        s_ExpandedGlyphVisibilityProperty =
            InitializeDependencyProperty(
                L"ExpandedGlyphVisibility",
                winrt::name_of<winrt::Visibility>(),
                winrt::name_of<winrt::TreeViewItemTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
                nullptr);
    }
    if (!s_IndentationProperty)
    {
        s_IndentationProperty =
            InitializeDependencyProperty(
                L"Indentation",
                winrt::name_of<winrt::Thickness>(),
                winrt::name_of<winrt::TreeViewItemTemplateSettings>(),
                false /* isAttached */,
                ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
                nullptr);
    }
}

void ExpandedGlyphVisibility ( winrt::Visibility const & value )

Definition at line 108 of file TreeViewItemTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItemTemplateSettings*>(this)->SetValue(s_ExpandedGlyphVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
    }
}

winrt::Visibility ExpandedGlyphVisibility ( )

Definition at line 116 of file TreeViewItemTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<TreeViewItemTemplateSettings*>(this)->GetValue(s_ExpandedGlyphVisibilityProperty));
}

static winrt::DependencyProperty ExpandedGlyphVisibilityProperty ( ) [inline, static]

Definition at line 26 of file TreeViewItemTemplateSettings.properties.h.

{ return s_ExpandedGlyphVisibilityProperty; }

winrt::Thickness Indentation ( )

Definition at line 129 of file TreeViewItemTemplateSettings.properties.cpp.

{
    return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<TreeViewItemTemplateSettings*>(this)->GetValue(s_IndentationProperty));
}

void Indentation ( winrt::Thickness const & value )

Definition at line 121 of file TreeViewItemTemplateSettings.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewItemTemplateSettings*>(this)->SetValue(s_IndentationProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IndentationProperty ( ) [inline, static]

Definition at line 27 of file TreeViewItemTemplateSettings.properties.h.

{ return s_IndentationProperty; }

Member Data Documentation

GlobalDependencyProperty s_CollapsedGlyphVisibilityProperty [static]

Definition at line 29 of file TreeViewItemTemplateSettings.properties.h.

GlobalDependencyProperty s_DragItemsCountProperty [static]

Definition at line 30 of file TreeViewItemTemplateSettings.properties.h.

GlobalDependencyProperty s_ExpandedGlyphVisibilityProperty [static]

Definition at line 31 of file TreeViewItemTemplateSettings.properties.h.

GlobalDependencyProperty s_IndentationProperty [static]

Definition at line 32 of file TreeViewItemTemplateSettings.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TreeViewItemTemplateSettings.properties.h
  • Generated/TreeViewItemTemplateSettings.properties.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewList Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

TreeViewList Class Reference

#include "TreeViewList.h"

Inherits ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT >.

Inherited by SpecialTreeViewList.

List of all members.

Public Member Functions

TreeViewList ()
winrt::DependencyObject | ContainerFromNode (winrt::TreeViewNode const &node) const
winrt::TreeViewNode | DraggedTreeViewNode () const
void | DraggedTreeViewNode (winrt::TreeViewNode const &node)
void | EnableMultiselect (bool isEnabled)
int | FlatIndex (const winrt::TreeViewNode &node) const
winrt::DependencyObject | GetContainerForItemOverride ()
winrt::hstring | GetDropTargetDropEffect ()
std::vector< winrt::TreeViewNode > | GetRootsOfSelectedSubtrees () const
bool | IsContentMode () const
bool | IsFlatIndexValid (int index) const
bool | IsMultiselect () const
bool | IsMutiSelectWithSelectedItems () const
bool | IsSelected (const winrt::TreeViewNode &node) const
winrt::IInspectable | ItemFromNode (winrt::TreeViewNode const &node) const
void | ListViewModel (com_ptr< ViewModel > viewModel)
com_ptr< ViewModel > | ListViewModel () const
winrt::TreeViewNode | NodeFromContainer (winrt::DependencyObject const &container) const
winrt::TreeViewNode | NodeFromItem (winrt::IInspectable const &item) const
void | OnApplyTemplate ()
void | OnContainerContentChanging (const winrt::IInspectable &sender, const winrt::ContainerContentChangingEventArgs &args)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnDragEnter (winrt::DragEventArgs const &e)
void | OnDragItemsCompleted (const winrt::IInspectable &sender, const winrt::DragItemsCompletedEventArgs &args)
void | OnDragItemsStarting (const winrt::IInspectable &sender, const winrt::DragItemsStartingEventArgs &args)
void | OnDragLeave (winrt::DragEventArgs const &e)
void | OnDragOver (winrt::DragEventArgs const &e)
void | OnDrop (winrt::DragEventArgs const &e)
void | PrepareContainerForItemOverride (winrt::DependencyObject const &element, winrt::IInspectable const &item)
unsigned int | RemoveNodeFromParent (const winrt::TreeViewNode &node) const
void | SetDraggedOverItem (winrt::TreeViewItem newDraggedOverItem)
void | UpdateDropTargetDropEffect (bool forceUpdate, bool isLeaving, winrt::TreeViewItem keyboardReorderedContainer)

Private Member Functions

hstring | BuildEffectString (hstring priorString, hstring afterString, hstring dragString, hstring dragOverString) const
hstring | GetAutomationName (int index) const
winrt::TreeViewNode | GetRootOfSelection (const winrt::TreeViewNode &node) const
unsigned int | IndexInParent (const winrt::TreeViewNode &node) const
bool | IsIndexValid (int index) const
void | MoveNodeInto (winrt::TreeViewNode const &node, winrt::TreeViewNode const &insertAtNode) const
winrt::TreeViewNode | NodeAtFlatIndex (int index) const

Private Attributes

winrt::hstring | m_dropTargetDropEffectString

Detailed Description

Definition at line 9 of file TreeViewList.h.

Constructor & Destructor Documentation

TreeViewList ( )

Definition at line 13 of file TreeViewList.cpp.

{
    ListViewModel(winrt::make_self<ViewModel>());

    DragItemsStarting({ this, &TreeViewList::OnDragItemsStarting });
    DragItemsCompleted({ this, &TreeViewList::OnDragItemsCompleted });
    ContainerContentChanging({ this, &TreeViewList::OnContainerContentChanging });
}

Member Function Documentation

hstring BuildEffectString | ( | hstring | priorString,
 |  | hstring | afterString,
 |  | hstring | dragString,
 |  | hstring | dragOverString |
 | ) |  |  | const [private]

Definition at line 623 of file TreeViewList.cpp.

{
    hstring resultString;
    if (!priorString.empty() && !afterString.empty())
    {
        resultString = StringUtil::FormatString(
            ResourceAccessor::GetLocalizedStringResource(SR_PlaceBetweenString),
            dragString.data(), priorString.data(), afterString.data());
    }
    else if (!priorString.empty())
    {
        resultString = StringUtil::FormatString(
            ResourceAccessor::GetLocalizedStringResource(SR_PlaceAfterString),
            dragString.data(), priorString.data());
    }
    else if (!afterString.empty())
    {
        resultString = StringUtil::FormatString(
            ResourceAccessor::GetLocalizedStringResource(SR_PlaceBeforeString),
            dragString.data(), afterString.data());
    }
    else if (!dragOverString.empty())
    {
        resultString = StringUtil::FormatString(
            ResourceAccessor::GetLocalizedStringResource(SR_DropIntoNodeString),
            dragString.data(), dragOverString.data());
    }
    else
    {
        resultString = StringUtil::FormatString(
            ResourceAccessor::GetLocalizedStringResource(SR_FallBackPlaceString),
            dragString.data());
    }

    return resultString;
}

winrt::DependencyObject ContainerFromNode ( winrt::TreeViewNode const & node ) const

Definition at line 693 of file TreeViewList.cpp.

{
    if (!node)
    {
        return nullptr;
    }

    return IsContentMode() ? ContainerFromItem(node.Content()) : ContainerFromItem(node);
}

winrt::TreeViewNode DraggedTreeViewNode ( ) const

Definition at line 32 of file TreeViewList.cpp.

{
    return m_draggedTreeViewNode.get();
}

void DraggedTreeViewNode ( winrt::TreeViewNode const & node )

Definition at line 37 of file TreeViewList.cpp.

{
    m_draggedTreeViewNode.set(node);
}

void EnableMultiselect ( bool isEnabled )

Definition at line 515 of file TreeViewList.cpp.

{
    m_isMultiselectEnabled = isEnabled;
}

int FlatIndex ( const winrt::TreeViewNode & node ) const

Definition at line 567 of file TreeViewList.cpp.

{
    unsigned int flatIndex = 0;
    bool found = ListViewModel()->IndexOfNode(node, flatIndex);
    flatIndex = found ? flatIndex : -1;
    return flatIndex;
}

hstring GetAutomationName ( int index ) const [private]

Definition at line 597 of file TreeViewList.cpp.

{
    winrt::TreeViewItem item{ nullptr };
    hstring automationName = L"";

    if (IsIndexValid(index))
    {
        auto interim = ContainerFromIndex(index);
        if (interim)
        {
            item = interim.as<winrt::TreeViewItem>();
        }
    }

    if (item)
    {
        winrt::AutomationPeer itemPeer = winrt::FrameworkElementAutomationPeer::FromElement(item);
        if (itemPeer)
        {
            automationName = itemPeer.GetNameCore();
        }
    }

    return automationName;
}

winrt::DependencyObject GetContainerForItemOverride ( )

Reimplemented in SpecialTreeViewList.

Definition at line 372 of file TreeViewList.cpp.

{
    winrt::TreeViewItem targetItem = winrt::TreeViewItem();
    return targetItem;
}

winrt::hstring GetDropTargetDropEffect ( )

Definition at line 397 of file TreeViewList.cpp.

{
    if (m_dropTargetDropEffectString.empty())
    {
        UpdateDropTargetDropEffect(true, false, nullptr);
    }
    return m_dropTargetDropEffectString;
}

winrt::TreeViewNode GetRootOfSelection ( const winrt::TreeViewNode & node ) const [private]

Definition at line 672 of file TreeViewList.cpp.

{
    winrt::TreeViewNode current = node;
    while (current.Parent() && IsSelected(current.Parent()))
    {
        current = current.Parent();
    }

    return current;
}

std::vector< winrt::TreeViewNode > GetRootsOfSelectedSubtrees ( ) const

Definition at line 549 of file TreeViewList.cpp.

{
    std::vector<winrt::TreeViewNode> roots;
    auto selectedItems = ListViewModel()->GetSelectedNodes();
    for (unsigned int i = 0; i < selectedItems.Size(); i++)
    {
        auto item = selectedItems.GetAt(i);
        auto selectionRoot = GetRootOfSelection(item);
        auto it = std::find(roots.cbegin(), roots.cend(), selectionRoot);
        if (it == roots.cend())
        {
            roots.emplace_back(selectionRoot);
        }
    }

    return roots;
}

unsigned int IndexInParent ( const winrt::TreeViewNode & node ) const [private]

Definition at line 660 of file TreeViewList.cpp.

{
    unsigned int indexInParent;
    node.Parent().Children().IndexOf(node, indexInParent);
    return indexInParent;
}

bool IsContentMode ( ) const

Definition at line 715 of file TreeViewList.cpp.

{
    if (auto viewModel = ListViewModel())
    {
        return viewModel->IsContentMode();
    }

    return false;
}

bool IsFlatIndexValid ( int index ) const

Definition at line 575 of file TreeViewList.cpp.

{
    return index >= 0 && index < static_cast<int>(ListViewModel()->Size());
}

bool IsIndexValid ( int index ) const [private]

Definition at line 592 of file TreeViewList.cpp.

{
    return index >= 0 && index < (int)Items().Size();
}

bool IsMultiselect ( ) const

Definition at line 520 of file TreeViewList.cpp.

{
    return m_isMultiselectEnabled;
}

bool IsMutiSelectWithSelectedItems ( ) const

Definition at line 526 of file TreeViewList.cpp.

{
    auto selectedItems = ListViewModel()->GetSelectedNodes();
    const bool isMutiSelect = m_isMultiselectEnabled &&  selectedItems.Size() > 0;
    return isMutiSelect;
}

bool IsSelected ( const winrt::TreeViewNode & node ) const

Definition at line 533 of file TreeViewList.cpp.

{
    bool isSelected = false;
    auto selectedItems = ListViewModel()->GetSelectedNodes();
    for (unsigned int i = 0; i < selectedItems.Size(); i++)
    {
        if (selectedItems.GetAt(i) == node)
        {
            isSelected = true;
            break;
        }
    }

    return isSelected;
}

winrt::IInspectable ItemFromNode ( winrt::TreeViewNode const & node ) const

Definition at line 710 of file TreeViewList.cpp.

{
    return (IsContentMode() && node) ? node.Content() : static_cast<winrt::IInspectable>(node);
}

com_ptr< ViewModel > ListViewModel ( ) const

Definition at line 22 of file TreeViewList.cpp.

{
    return m_viewModel.get();
}

void ListViewModel ( com_ptr< ViewModel > viewModel )

Definition at line 27 of file TreeViewList.cpp.

{
    m_viewModel.set(viewModel);
}

void MoveNodeInto | ( | winrt::TreeViewNode const & | node,
 |  | winrt::TreeViewNode const & | insertAtNode |
 | ) |  |  | const [private]

Definition at line 157 of file TreeViewList.cpp.

{
    const int nodeFlatIndex = FlatIndex(node);
    if (insertAtNode != node && IsFlatIndexValid(nodeFlatIndex))
    {
        RemoveNodeFromParent(node);

        const int insertOffset = nodeFlatIndex < m_emptySlotIndex ? 1 : 0;
        // if the insertAtNode is a parent that is expanded
        // insert as the first child
        if (insertAtNode.IsExpanded() && insertOffset == 1)
        {
            winrt::get_self<TreeViewNodeVector>(insertAtNode.Children())->InsertAt(0, node);
        }
        else
        {
            // Add the item to the new parent (parent of the insertAtNode)
            auto children = winrt::get_self<TreeViewNodeVector>(insertAtNode.Parent().Children());
            const int insertNodeIndexInParent = IndexInParent(insertAtNode);
            children->InsertAt(insertNodeIndexInParent + insertOffset, node);
        }
    }
}

winrt::TreeViewNode NodeAtFlatIndex ( int index ) const [private]

Definition at line 667 of file TreeViewList.cpp.

{
    return ListViewModel()->GetNodeAt(index);
}

winrt::TreeViewNode NodeFromContainer ( winrt::DependencyObject const & container ) const

Definition at line 683 of file TreeViewList.cpp.

{
    const int index = container ? IndexFromContainer(container) : -1;
    if (index >= 0 && index < static_cast<int32_t>(ListViewModel()->Size()))
    {
        return NodeAtFlatIndex(index);
    }
    return nullptr;
}

winrt::TreeViewNode NodeFromItem ( winrt::IInspectable const & item ) const

Definition at line 703 of file TreeViewList.cpp.

{
    return IsContentMode() ?
        ListViewModel().get()->GetAssociatedNode(item) :
        item.try_as<winrt::TreeViewNode>();
}

void OnApplyTemplate ( )

Definition at line 379 of file TreeViewList.cpp.

{
    if (!m_itemsSourceAttached)
    {
        ItemsSource(*ListViewModel());
        IsItemClickEnabled(true);
        m_itemsSourceAttached = true;
    }

    __super::OnApplyTemplate();
}

void OnContainerContentChanging | ( | const winrt::IInspectable & | sender,
 |  | const winrt::ContainerContentChangingEventArgs & | args
 | ) |  |

Definition at line 95 of file TreeViewList.cpp.

{
    // Only need to update unrecycled on screen items.
    if (!args.InRecycleQueue())
    {
        auto targetItem = args.ItemContainer().as<winrt::TreeViewItem>();
        auto targetNode = NodeFromContainer(targetItem);

        auto treeViewItem = winrt::get_self<TreeViewItem>(targetItem);
        auto treeViewNode = winrt::get_self<TreeViewNode>(targetNode);

        if (auto itemsSource = targetItem.ItemsSource())
        {
            if (treeViewNode->ItemsSource() == nullptr)
            {
                treeViewItem->SetItemsSource(targetNode, itemsSource);
            }
        }

        treeViewItem->UpdateIndentation(targetNode.Depth());
        treeViewItem->UpdateSelectionVisual(winrt::get_self<TreeViewNode>(targetNode)->SelectionState());
    }
}

winrt::AutomationPeer OnCreateAutomationPeer ( )

Definition at line 392 of file TreeViewList.cpp.

{
    return winrt::make<TreeViewListAutomationPeer>(*this);
}

void OnDragEnter ( winrt::DragEventArgs const & e )

Definition at line 300 of file TreeViewList.cpp.

{
    if (!args.Handled())
    {
        UpdateDropTargetDropEffect(false, false, nullptr);
    }
    __super::OnDragEnter(args);
}

void OnDragItemsCompleted | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragItemsCompletedEventArgs & | args
 | ) |  |

Definition at line 89 of file TreeViewList.cpp.

{
    m_draggedTreeViewNode.set(nullptr);
    m_emptySlotIndex = -1;
}

void OnDragItemsStarting | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragItemsStartingEventArgs & | args
 | ) |  |

Definition at line 42 of file TreeViewList.cpp.

{
    auto dragItem = args.Items().GetAt(0);
    if (dragItem)
    {
        auto tvItem = ContainerFromItem(dragItem);
        m_draggedTreeViewNode.set(NodeFromContainer(tvItem));
        bool isMultipleDragging = false;
        if (IsMutiSelectWithSelectedItems())
        {
            int selectedCount = ListViewModel()->GetSelectedNodes().Size();
            if (selectedCount > 1)
            {
                auto settings = tvItem.as<winrt::TreeViewItem>().TreeViewItemTemplateSettings();
                winrt::get_self<TreeViewItemTemplateSettings>(settings)->DragItemsCount(selectedCount);
                isMultipleDragging = true;

                // TreeView items' selection states are maintained by ViewModel, not by TreeViewList.
                // When TreeView is set to multi-select mode, the underlying TreeViewList's selection mode is set to None (See OnPropertyChanged function in TreeView.cpp).
                // TreeViewList has no knowledge about item selections happened in TreeView, no matter how many items are actually selected, args.Items() always contains only one item that is currently being dragged by cursor.
                // Here, we manually add selected nodes to args.Items in order to expose all selected (and dragged) items to outside handlers.
                args.Items().Clear();

                for (auto const& node : ListViewModel()->GetSelectedNodes())
                {
                    if (IsContentMode())
                    {
                        args.Items().Append(node.Content());
                    }
                    else
                    {
                        args.Items().Append(node);
                    }
                }
            }
        }
        else
        {
            // If not in multi-select mode, collapse the dragged node.
            m_draggedTreeViewNode.get().IsExpanded(false);
        }

        winrt::VisualStateManager::GoToState(tvItem.as<winrt::TreeViewItem>(), isMultipleDragging ? L"MultipleDraggingPrimary" : L"Dragging", false);
        UpdateDropTargetDropEffect(false, false, nullptr);
    }
}

void OnDragLeave ( winrt::DragEventArgs const & e )

Definition at line 309 of file TreeViewList.cpp.

{
    m_emptySlotIndex = -1;
    __super::OnDragLeave(args);
    if (!args.Handled())
    {
        UpdateDropTargetDropEffect(false, true, nullptr);
    }
}

void OnDragOver ( winrt::DragEventArgs const & e )

Definition at line 181 of file TreeViewList.cpp.

{
    if (!args.Handled())
    {
        args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
        winrt::IInsertionPanel insertionPanel = ItemsPanelRoot().as<winrt::IInsertionPanel>();

        // reorder is only supported with panels that implement IInsertionPanel
        if (insertionPanel && m_draggedTreeViewNode && CanReorderItems())
        {
            int aboveIndex = -1;
            int belowIndex = -1;
            auto itemsSource = ListViewModel();
            const int size = itemsSource->Size();
            const auto point = args.GetPosition(insertionPanel.as<winrt::UIElement>());
            insertionPanel.GetInsertionIndexes(point, aboveIndex, belowIndex);

            // a value of -1 means we're inserting at the end of the list or before the last item
            if (belowIndex == -1)
            {
                // this allows the next part of this code to test if we're dropping before or after the last item
                belowIndex = static_cast<int>(size - 1);
            }

            // if we have an insertion point
            // a value of 0 means we're inserting at the beginning
            // a value greater than size - 1 means we're inserting at the end as items are collapsing
            if (belowIndex > static_cast<int>(size - 1))
            {
                // don't go out of bounds
                // since items might be collapsing as we're dragging
                m_emptySlotIndex = static_cast<int>(size - 1);
            }
            else if (belowIndex > 0 && m_draggedTreeViewNode)
            {
                m_emptySlotIndex = -1;
                unsigned int draggedIndex;
                winrt::TreeViewNode tvi = m_draggedTreeViewNode.get();
                if (ListViewModel()->IndexOfNode(tvi, draggedIndex))
                {
                    const int indexToUse = (static_cast<int>(draggedIndex) < belowIndex) ? belowIndex : (belowIndex - 1);
                    if (auto item = ContainerFromIndex(indexToUse))
                    {
                        const auto treeViewItem = item.as<winrt::TreeViewItem>();
                        const auto pointInsideItem = args.GetPosition(treeViewItem.as<winrt::UIElement>());

                        // if the point is in the top half of the item
                        // we need to insert before that item
                        if (pointInsideItem.Y < treeViewItem.ActualHeight() / 2)
                        {
                            m_emptySlotIndex = belowIndex - 1;
                        }
                        else
                        {
                            m_emptySlotIndex = belowIndex;
                        }
                    }
                }
            }
            else
            {
                // top of the list
                m_emptySlotIndex = 0;
            }

            bool allowReorder = true;
            if (IsFlatIndexValid(m_emptySlotIndex))
            {
                auto insertAtNode = NodeAtFlatIndex(m_emptySlotIndex);
                if (IsMultiselect())
                {
                    // If insertAtNode is in the selected items, then we do not want to allow a dropping.
                    auto selectedItems = ListViewModel()->GetSelectedNodes();
                    for (unsigned int i = 0; i < selectedItems.Size(); i++)
                    {
                        auto selectedNode = selectedItems.GetAt(i);
                        if (selectedNode == insertAtNode)
                        {
                            allowReorder = false;
                            break;
                        }
                    }
                }
                else
                {
                    if (m_draggedTreeViewNode && insertAtNode && insertAtNode.Parent())
                    {
                        auto insertContainer = ContainerFromNode(insertAtNode.Parent());
                        if (insertContainer)
                        {
                            allowReorder = insertContainer.as<winrt::TreeViewItem>().AllowDrop();
                        }
                    }
                }
            }
            else
            {
                // m_emptySlotIndex does not exist in the ViewModel - don't allow the reorder.
                allowReorder = false;
            }

            if (allowReorder)
            {
                args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move);
            }
            else
            {
                m_emptySlotIndex = -1;
                args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
                args.Handled(true);
            }
        }

        UpdateDropTargetDropEffect(false, false, nullptr);
    }

    __super::OnDragOver(args);
}

void OnDrop ( winrt::DragEventArgs const & e )

Definition at line 120 of file TreeViewList.cpp.

{
    winrt::DragEventArgs args = e;

    if (args.AcceptedOperation() == winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move && !args.Handled())
    {
        if (m_draggedTreeViewNode && IsIndexValid(m_emptySlotIndex))
        {
            // Get the node at which we will insert
            winrt::TreeViewNode insertAtNode = NodeAtFlatIndex(m_emptySlotIndex);

            if (IsMutiSelectWithSelectedItems())
            {
                // Multiselect drag and drop. In the selected items, find all the selected subtrees
                // and move each of those subtrees.
                const auto selectedRootNodes = GetRootsOfSelectedSubtrees();
                const auto selectionSize = selectedRootNodes.size();

                // Loop through in reverse order because we are inserting above the previous item to get the order correct.
                for (int i = static_cast<int>(selectedRootNodes.size()) - 1; i >= 0; --i)
                {
                    MoveNodeInto(selectedRootNodes[i], insertAtNode);
                }
            }
            else
            {
                MoveNodeInto(m_draggedTreeViewNode.get(), insertAtNode);
            }

            UpdateDropTargetDropEffect(false, false, nullptr);
            args.Handled(true);
        }
    }

    __super::OnDrop(e);
}

void PrepareContainerForItemOverride | ( | winrt::DependencyObject const & | element,
 |  | winrt::IInspectable const & | item
 | ) |  |

Definition at line 320 of file TreeViewList.cpp.

{
    auto itemNode = NodeFromContainer(element);
    TreeViewNode* itemNodeImplNoRef = winrt::get_self<TreeViewNode>(itemNode);
    winrt::TreeViewItem itemContainer = element.as<winrt::TreeViewItem>();

    const auto selectionState = itemNodeImplNoRef->SelectionState();

    //Set the expanded property to match that of the Node, and enable Drop by default
    itemContainer.AllowDrop(true);

    if (IsContentMode())
    {
        const bool hasChildren = itemContainer.HasUnrealizedChildren() || itemNode.HasChildren();
        itemContainer.GlyphOpacity(hasChildren ? 1.0 : 0.0);
        if (itemContainer.IsExpanded() != itemNode.IsExpanded()) {
            DispatcherQueue().TryEnqueue(winrt::DispatcherQueueHandler(
                [itemNode, itemContainer]()
            {
                if (itemContainer.GetBindingExpression(TreeViewItem::IsExpandedProperty()))
                {
                    itemNode.IsExpanded(itemContainer.IsExpanded());
                }
                else
                {
                    itemContainer.IsExpanded(itemNode.IsExpanded());
                }
            }));
        }
    }
    else
    {
        itemContainer.IsExpanded(itemNode.IsExpanded());
        itemContainer.GlyphOpacity(itemNode.HasChildren() ? 1.0 : 0.0);
    }

    //Set startup TemplateSettings properties
    auto templateSettings = winrt::get_self<TreeViewItemTemplateSettings>(itemContainer.TreeViewItemTemplateSettings());
    templateSettings->ExpandedGlyphVisibility(itemNode.IsExpanded() ? winrt::Visibility::Visible : winrt::Visibility::Collapsed);
    templateSettings->CollapsedGlyphVisibility(!itemNode.IsExpanded() ? winrt::Visibility::Visible : winrt::Visibility::Collapsed);

    __super::PrepareContainerForItemOverride(element, item);

    if (selectionState != itemNodeImplNoRef->SelectionState())
    {
        ListViewModel()->UpdateSelection(*itemNodeImplNoRef, selectionState);
    }
}

unsigned int RemoveNodeFromParent ( const winrt::TreeViewNode & node ) const

Definition at line 580 of file TreeViewList.cpp.

{
    unsigned int indexInParent = 0;
    auto children = winrt::get_self<TreeViewNodeVector>(node.Parent().Children());
    if (children->IndexOf(node, indexInParent))
    {
        children->RemoveAt(indexInParent);
    }

    return indexInParent;
}

void SetDraggedOverItem ( winrt::TreeViewItem newDraggedOverItem )

Definition at line 406 of file TreeViewList.cpp.

{
    m_draggedOverItem.set(newDraggedOverItem);
}

void UpdateDropTargetDropEffect | ( | bool | forceUpdate,
 |  | bool | isLeaving,
 |  | winrt::TreeViewItem | keyboardReorderedContainer
 | ) |  |

Definition at line 411 of file TreeViewList.cpp.

{
    //Preserve old value of string in case it's needed.
    winrt::hstring oldValue = m_dropTargetDropEffectString;

    winrt::TreeViewItem dragItem{ nullptr };
    winrt::AutomationPeer dragItemPeer{ nullptr };

    if (keyboardReorderedContainer)
    {
        dragItem = keyboardReorderedContainer;
    }
    else
    {
    auto listItem = ContainerFromItem(m_draggedOverItem.get());
        if (listItem)
        {
            dragItem = listItem.as<winrt::TreeViewItem>();
        }
    }

    if (dragItem)
    {
        winrt::hstring dragItemString = L"";
        winrt::hstring itemBeforeInsertPositionString = L"";
        winrt::hstring itemAfterInsertPositionString = L"";
        winrt::hstring draggedOverString = L"";

        dragItemPeer = winrt::FrameworkElementAutomationPeer::FromElement(dragItem);
        if (dragItemPeer)
        {
            dragItemString = dragItemPeer.GetNameCore();
        }

        if (dragItemString.empty())
        {
            dragItemString = ResourceAccessor::GetLocalizedStringResource(SR_DefaultItemString);
        }

        if (isLeaving)
        {
            m_dropTargetDropEffectString = StringUtil::FormatString(
                ResourceAccessor::GetLocalizedStringResource(SR_CancelDraggingString),
                dragItemString);
        }
        else
        {
            winrt::TreeViewItem itemAfterInsertPosition{ nullptr };
            winrt::TreeViewItem itemBeforeInsertPosition{ nullptr };

            if (m_draggedOverItem)
            {
                winrt::AutomationPeer draggedOverItemPeer = winrt::FrameworkElementAutomationPeer::FromElement(m_draggedOverItem.get());
                if (draggedOverItemPeer)
                {
                    draggedOverString = draggedOverItemPeer.GetNameCore();
                }
            }
            else
            {
                int insertIndex = -1;
                int afterInsertIndex = -1;
                int beforeInsertIndex = -1;
                auto dragItemIndex = IndexFromContainer(dragItem);

                if (keyboardReorderedContainer)
                {
                    insertIndex = dragItemIndex;
                }
                else
                {
                    insertIndex = m_emptySlotIndex;
                }

                if (insertIndex != -1)
                {
                    afterInsertIndex = insertIndex + 1;
                    beforeInsertIndex = insertIndex - 1;
                }

                if (insertIndex > dragItemIndex)
                {
                    beforeInsertIndex++;
                }
                else if (insertIndex < dragItemIndex)
                {
                    afterInsertIndex--;
                }

                itemBeforeInsertPositionString = GetAutomationName(beforeInsertIndex);
                itemAfterInsertPositionString = GetAutomationName(afterInsertIndex);
            }

            m_dropTargetDropEffectString = BuildEffectString(itemBeforeInsertPositionString, itemAfterInsertPositionString, dragItemString, draggedOverString);
        }

        if (!forceUpdate && oldValue != m_dropTargetDropEffectString)
        {
            winrt::AutomationPeer treePeer = winrt::FrameworkElementAutomationPeer::FromElement(*this);
            treePeer.RaisePropertyChangedEvent(winrt::DropTargetPatternIdentifiers::DropTargetEffectProperty(), box_value(oldValue.data()), box_value(m_dropTargetDropEffectString.data()));
        }
    }
}

Member Data Documentation

winrt::hstring m_dropTargetDropEffectString [private]

Definition at line 66 of file TreeViewList.h.

The documentation for this class was generated from the following files:
  • TreeView/TreeViewList.h
  • TreeView/TreeViewList.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewListAutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TreeViewListAutomationPeer Class Reference

#include "TreeViewListAutomationPeer.h"

Inherits ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider >.

List of all members.

Public Member Functions

TreeViewListAutomationPeer (winrt::TreeViewList const &owner)
bool | CanSelectMultiple ()
winrt::hstring | DropEffect ()
winrt::com_array< winrt::hstring > | DropEffects ()
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::IInspectable | GetPatternCore (winrt::PatternInterface const &patternInterface)
winrt::com_array
< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > 		GetSelection ()
bool | IsSelectionRequired ()
winrt::ItemAutomationPeer | OnCreateItemAutomationPeer (winrt::IInspectable const &item)

Private Member Functions

bool | IsMultiselect ()

Detailed Description

Definition at line 8 of file TreeViewListAutomationPeer.h.

Constructor & Destructor Documentation

TreeViewListAutomationPeer ( winrt::TreeViewList const & owner )

Definition at line 12 of file TreeViewListAutomationPeer.cpp.

    : ReferenceTracker(owner)
{
}

Member Function Documentation

bool CanSelectMultiple ( )

Definition at line 52 of file TreeViewListAutomationPeer.cpp.

{
    return IsMultiselect()? true: __super::CanSelectMultiple();
}

winrt::hstring DropEffect ( )

Definition at line 25 of file TreeViewListAutomationPeer.cpp.

{
    return winrt::get_self<TreeViewList>(Owner().as<winrt::TreeViewList>())->GetDropTargetDropEffect();
}

winrt::com_array< winrt::hstring > DropEffects ( )

Definition at line 30 of file TreeViewListAutomationPeer.cpp.

{
    throw winrt::hresult_not_implemented();
}

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 46 of file TreeViewListAutomationPeer.cpp.

{
    return winrt::AutomationControlType::Tree;
}

winrt::IInspectable GetPatternCore ( winrt::PatternInterface const & patternInterface )

Definition at line 35 of file TreeViewListAutomationPeer.cpp.

{
    if (patternInterface == winrt::PatternInterface::DropTarget ||
       (patternInterface == winrt::PatternInterface::Selection && IsMultiselect()))
    {
        return *this;
    }

    return __super::GetPatternCore(patternInterface);
}

winrt::com_array< winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple > GetSelection ( )

Definition at line 62 of file TreeViewListAutomationPeer.cpp.

{
    // The selected items might be collapsed, virtualized, so getting an accurate list of selected items is not possible.
    return {};
}

bool IsMultiselect ( ) [private]

Definition at line 68 of file TreeViewListAutomationPeer.cpp.

{
    return winrt::get_self<TreeViewList>(Owner().as<winrt::TreeViewList>())->IsMultiselect();
}

bool IsSelectionRequired ( )

Definition at line 57 of file TreeViewListAutomationPeer.cpp.

{
    return false;
}

winrt::ItemAutomationPeer OnCreateItemAutomationPeer ( winrt::IInspectable const & item )

Definition at line 18 of file TreeViewListAutomationPeer.cpp.

{
    winrt::TreeViewItemDataAutomationPeer itemPeer{ item, *this };
    return itemPeer;
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewListAutomationPeer.h
  • TreeView/TreeViewListAutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewNode Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Types | Public Member Functions | Private Member Functions

TreeViewNode Class Reference

#include "TreeViewNode.h"

Inherits ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable >, and TreeViewNodeProperties.

Inherited by SpecialTreeViewNode, and TreeViewNode2.

List of all members.

Public Types

enum | TreeNodeSelectionState { UnSelected, PartialSelected, Selected }

Public Member Functions

TreeViewNode ()
winrt::event_token | AddExpandedChanged (winrt::TypedEventHandler< winrt::TreeViewNode, winrt::DependencyPropertyChangedEventArgs > const &value)
winrt::IVector
< winrt::TreeViewNode > 		Children ()
winrt::event_token | ChildrenChanged (winrt::TypedEventHandler< winrt::TreeViewNode, winrt::IVectorChangedEventArgs > const &value)
void | ChildrenChanged (winrt::event_token)
void | ChildVectorChanged (winrt::IObservableVector< winrt::TreeViewNode > const &sender, winrt::IInspectable const &args)
winrt::TreeViewNode | get_ParentImpl ()
winrt::ICustomProperty | GetCustomProperty (hstring const &name)
winrt::ICustomProperty | GetIndexedProperty (hstring const &name, winrt::TypeName const &type)
hstring | GetStringRepresentation ()
void | HasUnrealizedChildren (bool value)
bool | HasUnrealizedChildren ()
bool | IsContentMode ()
void | IsContentMode (bool value)
void | ItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | ItemsSource ()
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)
winrt::TreeViewNode | Parent ()
void | put_ParentImpl (winrt::TreeViewNode const &value)
void | RaiseChildrenChanged (winrt::CollectionChange CC, unsigned int index)
void | RemoveExpandedChanged (winrt::event_token)
TreeNodeSelectionState SelectionState ()
void | SelectionState (TreeNodeSelectionState const &state)
hstring | ToString ()
winrt::TypeName | Type ()
void | UpdateDepth (int depth)
void | UpdateHasChildren ()

Private Member Functions

void | AddToChildrenNodes (int index, int count)
bool | AreChildrenNodesEqualToItemsSource ()
hstring | GetContentAsString ()
void | OnItemsSourceChanged (const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &args)
void | RemoveFromChildrenNodes (int index, int count)
void | SyncChildrenNodesWithItemsSource ()

Detailed Description

Definition at line 10 of file TreeViewNode.h.

Member Enumeration Documentation

enum TreeNodeSelectionState
Enumerator:
UnSelected
PartialSelected
Selected

Definition at line 16 of file TreeViewNode.h.

    {
        UnSelected,
        PartialSelected,
        Selected
    };

Constructor & Destructor Documentation

TreeViewNode ( )

Definition at line 12 of file TreeViewNode.cpp.

{
    EnsureProperties();
    auto collection = winrt::make_self<TreeViewNodeVector>();
    collection->SetParent(*this);
    m_children.set(*collection);
    m_children.get().as<winrt::IObservableVector<winrt::TreeViewNode>>().VectorChanged({ this, &TreeViewNode::ChildVectorChanged });
}

Member Function Documentation

winrt::event_token AddExpandedChanged ( winrt::TypedEventHandler< winrt::TreeViewNode, winrt::DependencyPropertyChangedEventArgs > const & value )

Definition at line 123 of file TreeViewNode.cpp.

{
    winrt::event_token token = m_propertyChangedEventSource.add(value);
    return token;
}

void AddToChildrenNodes | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]

Definition at line 220 of file TreeViewNode.cpp.

{
    for (int i = index + count - 1; i >= index; i--)
    {
        auto item = m_itemsDataSource.GetAt(i);
        auto node = winrt::make_self<TreeViewNode>();
        node->Content(item);
        winrt::get_self<TreeViewNodeVector>(Children())->InsertAt(index, *node, false /* updateItemsSource */);
    }
}

bool AreChildrenNodesEqualToItemsSource ( ) [private]

Definition at line 258 of file TreeViewNode.cpp.

{
    const auto children = Children();
    const UINT32 childrenCount = children ? children.Size() : 0;
    const UINT32 itemsSourceCount = m_itemsDataSource ? m_itemsDataSource.Count() : 0;

    if (childrenCount != itemsSourceCount)
    {
        return false;
    }

    // Compare the actual content in collections when counts are equal
    for (UINT32 i = 0; i < itemsSourceCount; i++)
    {
        if (children.GetAt(i).Content() != m_itemsDataSource.GetAt(i))
        {
            return false;
        }
    }

    return true;
}

winrt::IVector< winrt::TreeViewNode > Children ( )

Definition at line 58 of file TreeViewNode.cpp.

{
    auto x = m_children.get();
    return x;
}

winrt::event_token ChildrenChanged ( winrt::TypedEventHandler< winrt::TreeViewNode, winrt::IVectorChangedEventArgs > const & value )

Definition at line 134 of file TreeViewNode.cpp.

{
    winrt::event_token token = m_childrenChangedSource.add(value);
    return token;
}

void ChildrenChanged ( winrt::event_token token )

Definition at line 140 of file TreeViewNode.cpp.

{
    m_childrenChangedSource.remove(token);
}

void ChildVectorChanged | ( | winrt::IObservableVector< winrt::TreeViewNode > const & | sender,
 |  | winrt::IInspectable const & | args
 | ) |  |

Definition at line 103 of file TreeViewNode.cpp.

{
    // We can end up in a state where the TreeViewNode has not yet been destroyed but it is no longer 'reachable' via
    // tracker references. In this state tracker_refs do not resolve. So we check for this before handling the event.
    if(auto children = m_children.safe_get())
    {
        const auto wArgs = args.as<winrt::IVectorChangedEventArgs>();
        const winrt::CollectionChange collectionChange = wArgs.CollectionChange();
        const unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index();
        UpdateHasChildren();
        RaiseChildrenChanged(collectionChange, index);
    }
}

winrt::TreeViewNode get_ParentImpl ( )

Definition at line 26 of file TreeViewNode.cpp.

{
    return m_parentNode ? m_parentNode.get() : nullptr;
}

hstring GetContentAsString ( ) [private]

Definition at line 281 of file TreeViewNode.cpp.

{
    if (auto content = Content())
    {
        if (auto result = content.try_as<winrt::ICustomPropertyProvider>())
        {
            return result.GetStringRepresentation();
        }

        if (auto result = content.try_as<winrt::IStringable>())
        {
            return result.ToString();
        }

        return winrt::unbox_value_or<hstring>(content, Type().Name);
    }

    return Type().Name;
}

winrt::ICustomProperty GetCustomProperty ( hstring const & name )

Definition at line 312 of file TreeViewNode.cpp.

{
    return nullptr;
}

winrt::ICustomProperty GetIndexedProperty | ( | hstring const & | name,
 |  | winrt::TypeName const & | type
 | ) |  |

Definition at line 317 of file TreeViewNode.cpp.

{
    return nullptr;
}

hstring GetStringRepresentation ( )

Definition at line 322 of file TreeViewNode.cpp.

{
    return GetContentAsString();
}

bool HasUnrealizedChildren ( )

Definition at line 47 of file TreeViewNode.cpp.

{
    return m_HasUnrealizedChildren;
}

void HasUnrealizedChildren ( bool value )

Definition at line 52 of file TreeViewNode.cpp.

{
    m_HasUnrealizedChildren = value;
    UpdateHasChildren();
}

bool IsContentMode ( )

Definition at line 64 of file TreeViewNode.cpp.

{
    return m_isContentMode;
}

void IsContentMode ( bool value )

Definition at line 69 of file TreeViewNode.cpp.

{
    m_isContentMode = value;
}

void ItemsSource ( winrt::IInspectable const & value )

Definition at line 156 of file TreeViewNode.cpp.

{
    m_itemItemsSourceViewChangedRevoker.revoke();
    m_itemsSource.set(value);
    m_itemsDataSource = value ? winrt::ItemsSourceView(value) : nullptr;
    if (m_itemsDataSource)
    {
        m_itemItemsSourceViewChangedRevoker = m_itemsDataSource.CollectionChanged(winrt::auto_revoke, { this, &TreeViewNode::OnItemsSourceChanged });
    }
    SyncChildrenNodesWithItemsSource();
}

winrt::IInspectable ItemsSource ( )

Definition at line 151 of file TreeViewNode.cpp.

{
    return m_itemsSource.get();
}

void OnItemsSourceChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::NotifyCollectionChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 168 of file TreeViewNode.cpp.

{
    // We can end up in a state where the TreeViewNode has not yet been destroyed but it is no longer 'reachable' via
    // tracker references. In this state tracker_refs do not resolve. So we check for this before handling the event.
    if(auto children = m_children.safe_get())
    {
        switch (args.Action())
        {
        case winrt::NotifyCollectionChangedAction::Add:
        {
            // TreeViewNode and ItemsSource will update each other when data changes.
            // For ItemsSource -> TreeViewNode changes, m_itemsDataSource.Count() > Children().Size()
            // We'll add the new node to children collection.
            // For TreeViewNode -> ItemsSource changes, m_itemsDataSource.Count() == Children().Size()
            // the node is already in children collection, we don't want to update TreeViewNode again here.
            if (m_itemsDataSource.Count() != static_cast<int>(Children().Size()))
            {
                AddToChildrenNodes(args.NewStartingIndex(), args.NewItems().Size());
            }
            break;
        }

        case winrt::NotifyCollectionChangedAction::Remove:
        {
            // TreeViewNode and ItemsSource will update each other when data changes.
            // For ItemsSource -> TreeViewNode changes, m_itemsDataSource.Count() < Children().Size()
            // We'll remove the node from children collection.
            // For TreeViewNode -> ItemsSource changes, m_itemsDataSource.Count() == Children().Size()
            // the node is already removed, we don't want to update TreeViewNode again here.
            if (m_itemsDataSource.Count() != static_cast<int>(Children().Size()))
            {
                RemoveFromChildrenNodes(args.OldStartingIndex(), args.OldItems().Size());
            }
            break;
        }

        case winrt::NotifyCollectionChangedAction::Reset:
        {
            SyncChildrenNodesWithItemsSource();
            break;
        }

        case winrt::NotifyCollectionChangedAction::Replace:
        {
            RemoveFromChildrenNodes(args.OldStartingIndex(), args.OldItems().Size());
            AddToChildrenNodes(args.NewStartingIndex(), args.NewItems().Size());
            break;
        }
        }
    }
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 117 of file TreeViewNode.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    m_propertyChangedEventSource(*this, args);
}

winrt::TreeViewNode Parent ( )

Definition at line 21 of file TreeViewNode.cpp.

{
    return get_ParentImpl();
}

void put_ParentImpl ( winrt::TreeViewNode const & value )

Definition at line 31 of file TreeViewNode.cpp.

{
    if (value != nullptr)
    {
        m_parentNode = winrt::make_weak(value);
    }
    else
    {
        m_parentNode = nullptr;
    }

    //A parentless node has a depth of -1, and the first level of visible nodes in
    // the tree view will have a depth of 0 (-1 + 1);
    UpdateDepth(value ? value.Depth() + 1 : -1);
}

void RaiseChildrenChanged | ( | winrt::CollectionChange | CC,
 |  | unsigned int | index
 | ) |  |

Definition at line 145 of file TreeViewNode.cpp.

{
    auto args = winrt::make<VectorChangedEventArgs>(CC, index);
    m_childrenChangedSource(*this, args);
}

void RemoveExpandedChanged ( winrt::event_token token )

Definition at line 129 of file TreeViewNode.cpp.

{
    m_propertyChangedEventSource.remove(token);
}

void RemoveFromChildrenNodes | ( | int | index,
 |  | int | count |
 | ) |  |  | [private]

Definition at line 231 of file TreeViewNode.cpp.

{
    for (int i = 0; i < count; i++)
    {
        winrt::get_self<TreeViewNodeVector>(Children())->RemoveAt(index, false /* updateItemsSource */);
    }
}

TreeNodeSelectionState SelectionState ( )

Definition at line 74 of file TreeViewNode.cpp.

{
    return m_multiSelectionState;
}

void SelectionState ( TreeNodeSelectionState const & state )

Definition at line 79 of file TreeViewNode.cpp.

{
    m_multiSelectionState = state;
}

void SyncChildrenNodesWithItemsSource ( ) [private]

Definition at line 239 of file TreeViewNode.cpp.

{
    if (!AreChildrenNodesEqualToItemsSource())
    {
        const auto children = winrt::get_self<TreeViewNodeVector>(Children());
        children->Clear(false /* updateItemsSource */, false /* updateIsExpanded */);

        const auto size = m_itemsDataSource ? m_itemsDataSource.Count() : 0;
        for (auto i = 0; i < size; i++)
        {
            const auto item = m_itemsDataSource.GetAt(i);
            const auto node = winrt::make_self<TreeViewNode>();
            node->Content(item);
            node->IsContentMode(true);
            children->Append(*node, false /* updateItemsSource */);
        }
    }
}

hstring ToString ( )

Definition at line 330 of file TreeViewNode.cpp.

{
    return GetContentAsString();
}

winrt::TypeName Type ( )

Definition at line 303 of file TreeViewNode.cpp.

{
    auto outer = get_strong().as<winrt::IInspectable>();
    winrt::TypeName typeName;
    typeName.Kind = winrt::TypeKind::Metadata;
    typeName.Name = winrt::get_class_name(outer);
    return typeName;
}

void UpdateDepth ( int depth )

Definition at line 84 of file TreeViewNode.cpp.

{
    // Update our depth
    SetValue(s_DepthProperty, box_value(depth));

    // Update children's depth
    for (auto const& childInspectable : Children())
    {
        auto childNode = childInspectable.as<winrt::TreeViewNode>();
        winrt::get_self<TreeViewNode>(childNode)->UpdateDepth(depth + 1);
    }
}

void UpdateHasChildren ( )

Definition at line 97 of file TreeViewNode.cpp.

{
    bool hasChildren = ((Children().Size() != 0) || m_HasUnrealizedChildren);
    SetValue(s_HasChildrenProperty, box_value(hasChildren));
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewNode.h
  • TreeView/TreeViewNode.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewNodeProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

TreeViewNodeProperties Class Reference

#include "TreeViewNode.properties.h"

Inherited by TreeViewNode.

List of all members.

Public Member Functions

TreeViewNodeProperties ()
void | Content (winrt::IInspectable const &value)
winrt::IInspectable | Content ()
void | Depth (int value)
int | Depth ()
bool | HasChildren ()
void | HasChildren (bool value)
bool | IsExpanded ()
void | IsExpanded (bool value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ContentProperty ()
static winrt::DependencyProperty | DepthProperty ()
static void | EnsureProperties ()
static winrt::DependencyProperty | HasChildrenProperty ()
static winrt::DependencyProperty | IsExpandedProperty ()
static void | OnHasChildrenPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnIsExpandedPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)

Static Public Attributes

static GlobalDependencyProperty | s_ContentProperty
static GlobalDependencyProperty | s_DepthProperty
static GlobalDependencyProperty | s_HasChildrenProperty
static GlobalDependencyProperty | s_IsExpandedProperty

Detailed Description

Definition at line 7 of file TreeViewNode.properties.h.

Constructor & Destructor Documentation

TreeViewNodeProperties ( )

Definition at line 21 of file TreeViewNode.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 74 of file TreeViewNode.properties.cpp.

{
    s_ContentProperty = nullptr;
    s_DepthProperty = nullptr;
    s_HasChildrenProperty = nullptr;
    s_IsExpandedProperty = nullptr;
}

winrt::IInspectable Content ( )

Definition at line 106 of file TreeViewNode.properties.cpp.

{
    return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_ContentProperty));
}

void Content ( winrt::IInspectable const & value )

Definition at line 98 of file TreeViewNode.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewNode*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ContentProperty ( ) [inline, static]

Definition at line 24 of file TreeViewNode.properties.h.

{ return s_ContentProperty; }

int Depth ( )

Definition at line 119 of file TreeViewNode.properties.cpp.

{
    return ValueHelper<int>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_DepthProperty));
}

void Depth ( int value )

Definition at line 111 of file TreeViewNode.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewNode*>(this)->SetValue(s_DepthProperty, ValueHelper<int>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty DepthProperty ( ) [inline, static]

Definition at line 25 of file TreeViewNode.properties.h.

{ return s_DepthProperty; }

void EnsureProperties ( ) [static]

Definition at line 26 of file TreeViewNode.properties.cpp.

{
    if (!s_ContentProperty)
    {
        s_ContentProperty =
            InitializeDependencyProperty(
                L"Content",
                winrt::name_of<winrt::IInspectable>(),
                winrt::name_of<winrt::TreeViewNode>(),
                false /* isAttached */,
                ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
                nullptr);
    }
    if (!s_DepthProperty)
    {
        s_DepthProperty =
            InitializeDependencyProperty(
                L"Depth",
                winrt::name_of<int>(),
                winrt::name_of<winrt::TreeViewNode>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(-1),
                nullptr);
    }
    if (!s_HasChildrenProperty)
    {
        s_HasChildrenProperty =
            InitializeDependencyProperty(
                L"HasChildren",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::TreeViewNode>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnHasChildrenPropertyChanged));
    }
    if (!s_IsExpandedProperty)
    {
        s_IsExpandedProperty =
            InitializeDependencyProperty(
                L"IsExpanded",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::TreeViewNode>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsExpandedPropertyChanged));
    }
}

bool HasChildren ( )

Definition at line 132 of file TreeViewNode.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_HasChildrenProperty));
}

void HasChildren ( bool value )

Definition at line 124 of file TreeViewNode.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewNode*>(this)->SetValue(s_HasChildrenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty HasChildrenProperty ( ) [inline, static]

Definition at line 26 of file TreeViewNode.properties.h.

{ return s_HasChildrenProperty; }

bool IsExpanded ( )

Definition at line 145 of file TreeViewNode.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_IsExpandedProperty));
}

void IsExpanded ( bool value )

Definition at line 137 of file TreeViewNode.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<TreeViewNode*>(this)->SetValue(s_IsExpandedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty IsExpandedProperty ( ) [inline, static]

Definition at line 27 of file TreeViewNode.properties.h.

{ return s_IsExpandedProperty; }

void OnHasChildrenPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 82 of file TreeViewNode.properties.cpp.

{
    auto owner = sender.as<winrt::TreeViewNode>();
    winrt::get_self<TreeViewNode>(owner)->OnPropertyChanged(args);
}

void OnIsExpandedPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 90 of file TreeViewNode.properties.cpp.

{
    auto owner = sender.as<winrt::TreeViewNode>();
    winrt::get_self<TreeViewNode>(owner)->OnPropertyChanged(args);
}

Member Data Documentation

GlobalDependencyProperty s_ContentProperty [static]

Definition at line 29 of file TreeViewNode.properties.h.

GlobalDependencyProperty s_DepthProperty [static]

Definition at line 30 of file TreeViewNode.properties.h.

GlobalDependencyProperty s_HasChildrenProperty [static]

Definition at line 31 of file TreeViewNode.properties.h.

GlobalDependencyProperty s_IsExpandedProperty [static]

Definition at line 32 of file TreeViewNode.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TreeViewNode.properties.h
  • Generated/TreeViewNode.properties.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewNodeVector Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TreeViewNodeVector Class Reference

#include "TreeViewNode.h"

Inherits ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >.

List of all members.

Public Member Functions

TreeViewNodeVector ()
TreeViewNodeVector (unsigned int capacity)
void | Append (winrt::TreeViewNode const &item, bool updateItemsSource=true)
void | Clear (bool updateItemsSource=true, bool updateIsExpanded=true)
winrt::IBindableVector | GetWritableParentItemsSource ()
void | InsertAt (unsigned int index, winrt::TreeViewNode const &item, bool updateItemsSource=true)
TreeViewNode * Parent ()
void | RemoveAt (unsigned int index, bool updateItemsSource=true, bool updateIsExpanded=true)
void | RemoveAtEnd (bool updateItemsSource=true)
void | ReplaceAll (winrt::array_view< winrt::TreeViewNode const > values, bool updateItemsSource=true)
void | SetAt (unsigned int index, winrt::TreeViewNode const &item, bool updateItemsSource=true)
void | SetParent (winrt::TreeViewNode value)

Private Member Functions

Implement_Vector_Read (TreeViewNodeVectorOptions) private

Detailed Description

Definition at line 87 of file TreeViewNode.h.

Constructor & Destructor Documentation

TreeViewNodeVector ( )

Definition at line 338 of file TreeViewNode.cpp.

{
}

TreeViewNodeVector ( unsigned int capacity )

Definition at line 342 of file TreeViewNode.cpp.

{
    GetVectorInnerImpl()->reserve(capacity);
}

Member Function Documentation

void Append | ( | winrt::TreeViewNode const & | item,
 |  | bool | updateItemsSource = true
 | ) |  |

Definition at line 371 of file TreeViewNode.cpp.

{
    InsertAt(Size(), item, updateItemsSource);
}

void Clear | ( | bool | updateItemsSource = true,
 |  | bool | updateIsExpanded = true
 | ) |  |

Definition at line 461 of file TreeViewNode.cpp.

{
    const auto inner = GetVectorInnerImpl();
    const auto count = inner->Size();

    if (count > 0)
    {
        for (unsigned int i = 0; i < count; i++)
        {
            auto node = inner->GetAt(i);
            winrt::get_self<TreeViewNode>(node)->put_ParentImpl(nullptr);
        }

        inner->Clear();

        if (updateItemsSource)
        {
            if (auto itemsSource = GetWritableParentItemsSource())
            {
                itemsSource.Clear();
            }
        }
    }

    if (updateIsExpanded)
    {
        if(const auto& ownerNode = m_parent.get())
        {
            // Only set IsExpanded to false if we are not the root node
            if (const auto& ownerParent = ownerNode.Parent())
            {
                ownerNode.IsExpanded(false);
            }
        }
    }
}

winrt::IBindableVector GetWritableParentItemsSource ( )

Definition at line 357 of file TreeViewNode.cpp.

{
    winrt::IBindableVector parentItemsSource = nullptr;

    if (auto parent = Parent())
    {
        if (auto itemsSource = parent->ItemsSource())
        {
            parentItemsSource = itemsSource.try_as<winrt::IBindableVector>();
        }
    }
    return parentItemsSource;
}

Implement_Vector_Read ( TreeViewNodeVectorOptions ) [inline, private]

Definition at line 95 of file TreeViewNode.h.

       :
    winrt::weak_ref<winrt::TreeViewNode> m_parent{ nullptr };

void InsertAt | ( | unsigned int | index,
 |  | winrt::TreeViewNode const & | item,
 |  | bool | updateItemsSource = true
 | ) |  |

Definition at line 376 of file TreeViewNode.cpp.

{
    auto inner = GetVectorInnerImpl();
    MUX_ASSERT(m_parent.get());
    MUX_ASSERT(index <= inner->Size());
    winrt::get_self<TreeViewNode>(item)->put_ParentImpl(m_parent.get());

    inner->InsertAt(index, item);

    if (updateItemsSource)
    {
        if (auto itemsSource = GetWritableParentItemsSource())
        {
            itemsSource.InsertAt(index, item.Content());
        }
    }
}

TreeViewNode * Parent ( )

Definition at line 352 of file TreeViewNode.cpp.

{
    return winrt::get_self<TreeViewNode>(m_parent.get());
}

void RemoveAt | ( | unsigned int | index,
 |  | bool | updateItemsSource = true,
 |  | bool | updateIsExpanded = true
 | ) |  |

Definition at line 400 of file TreeViewNode.cpp.

{
    auto inner = GetVectorInnerImpl();
    auto targetNode = inner->GetAt(index);
    winrt::get_self<TreeViewNode>(targetNode)->put_ParentImpl(nullptr);

    inner->RemoveAt(index);

    if (updateItemsSource)
    {
        if (auto source = GetWritableParentItemsSource())
        {
            source.RemoveAt(index);
        }
    }

    // No children, so close parent if not requested otherwise
    if (updateIsExpanded && inner->Size() == 0)
    {
        if (const auto& ownerNode = m_parent.get())
        {
            // Only set IsExpanded to false if we are not the root node
            if (const auto& ownerParent = ownerNode.Parent())
            {
                ownerNode.IsExpanded(false);
            }
        }
    }
}

void RemoveAtEnd ( bool updateItemsSource = true )

Definition at line 430 of file TreeViewNode.cpp.

{
    const auto index = GetVectorInnerImpl()->Size() - 1;
    RemoveAt(updateItemsSource);
}

void ReplaceAll | ( | winrt::array_view< winrt::TreeViewNode const > | values,
 |  | bool | updateItemsSource = true
 | ) |  |

Definition at line 436 of file TreeViewNode.cpp.

{
    const auto inner = GetVectorInnerImpl();

    const auto count = inner->Size();
    if (count > 0)
    {
        Clear(updateItemsSource);

        auto itemsSource = GetWritableParentItemsSource();
        // Set parent on new elements
        MUX_ASSERT(m_parent.get());
        for (auto& value : values)
        {
            winrt::get_self<TreeViewNode>(value)->put_ParentImpl(m_parent.get());
            if (itemsSource)
            {
                itemsSource.Append(value.Content());
            }
        }

        inner->ReplaceAll(values);
    }
}

void SetAt | ( | unsigned int | index,
 |  | winrt::TreeViewNode const & | item,
 |  | bool | updateItemsSource = true
 | ) |  |

Definition at line 394 of file TreeViewNode.cpp.

{
    RemoveAt(index, updateItemsSource,false /* updateIsExpanded */);
    InsertAt(index, item, updateItemsSource);
}

void SetParent ( winrt::TreeViewNode value )

Definition at line 347 of file TreeViewNode.cpp.

{
    m_parent = winrt::make_weak(value);
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewNode.h
  • TreeView/TreeViewNode.cpp
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

TreeViewProperties Class Reference

#include "TreeView.properties.h"

Inherited by TreeView.

List of all members.

Public Member Functions

TreeViewProperties ()
void | CanDragItems (bool value)
bool | CanDragItems ()
void | CanReorderItems (bool value)
bool | CanReorderItems ()
winrt::event_token | Collapsed (winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewCollapsedEventArgs > const &value)
void | Collapsed (winrt::event_token const &token)
winrt::event_token | DragItemsCompleted (winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewDragItemsCompletedEventArgs > const &value)
void | DragItemsCompleted (winrt::event_token const &token)
void | DragItemsStarting (winrt::event_token const &token)
winrt::event_token | DragItemsStarting (winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewDragItemsStartingEventArgs > const &value)
winrt::event_token | Expanding (winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewExpandingEventArgs > const &value)
void | Expanding (winrt::event_token const &token)
winrt::Style | ItemContainerStyle ()
void | ItemContainerStyle (winrt::Style const &value)
void | ItemContainerStyleSelector (winrt::StyleSelector const &value)
winrt::StyleSelector | ItemContainerStyleSelector ()
void | ItemContainerTransitions (winrt::TransitionCollection const &value)
winrt::TransitionCollection | ItemContainerTransitions ()
void | ItemInvoked (winrt::event_token const &token)
winrt::event_token | ItemInvoked (winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewItemInvokedEventArgs > const &value)
void | ItemsSource (winrt::IInspectable const &value)
winrt::IInspectable | ItemsSource ()
void | ItemTemplate (winrt::DataTemplate const &value)
winrt::DataTemplate | ItemTemplate ()
void | ItemTemplateSelector (winrt::DataTemplateSelector const &value)
winrt::DataTemplateSelector | ItemTemplateSelector ()
void | SelectedItem (winrt::IInspectable const &value)
winrt::IInspectable | SelectedItem ()
winrt::event_token | SelectionChanged (winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewSelectionChangedEventArgs > const &value)
void | SelectionChanged (winrt::event_token const &token)
winrt::TreeViewSelectionMode | SelectionMode ()
void | SelectionMode (winrt::TreeViewSelectionMode const &value)

Static Public Member Functions

static winrt::DependencyProperty | CanDragItemsProperty ()
static winrt::DependencyProperty | CanReorderItemsProperty ()
static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ItemContainerStyleProperty ()
static winrt::DependencyProperty | ItemContainerStyleSelectorProperty ()
static winrt::DependencyProperty | ItemContainerTransitionsProperty ()
static winrt::DependencyProperty | ItemsSourceProperty ()
static winrt::DependencyProperty | ItemTemplateProperty ()
static winrt::DependencyProperty | ItemTemplateSelectorProperty ()
static void | OnItemsSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectedItemPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSelectionModePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SelectedItemProperty ()
static winrt::DependencyProperty | SelectionModeProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::TreeView,
winrt::TreeViewCollapsedEventArgs > > 		m_collapsedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TreeView,
winrt::TreeViewDragItemsCompletedEventArgs > > 		m_dragItemsCompletedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TreeView,
winrt::TreeViewDragItemsStartingEventArgs > > 		m_dragItemsStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::TreeView,
winrt::TreeViewExpandingEventArgs > > 		m_expandingEventSource
event_source
< winrt::TypedEventHandler
< winrt::TreeView,
winrt::TreeViewItemInvokedEventArgs > > 		m_itemInvokedEventSource
event_source
< winrt::TypedEventHandler
< winrt::TreeView,
winrt::TreeViewSelectionChangedEventArgs > > 		m_selectionChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_CanDragItemsProperty
static GlobalDependencyProperty | s_CanReorderItemsProperty
static GlobalDependencyProperty | s_ItemContainerStyleProperty
static GlobalDependencyProperty | s_ItemContainerStyleSelectorProperty
static GlobalDependencyProperty | s_ItemContainerTransitionsProperty
static GlobalDependencyProperty | s_ItemsSourceProperty
static GlobalDependencyProperty | s_ItemTemplateProperty
static GlobalDependencyProperty | s_ItemTemplateSelectorProperty
static GlobalDependencyProperty | s_SelectedItemProperty
static GlobalDependencyProperty | s_SelectionModeProperty

Detailed Description

Definition at line 7 of file TreeView.properties.h.

Constructor & Destructor Documentation

TreeViewProperties ( )

Definition at line 27 of file TreeView.properties.cpp.

    : m_collapsedEventSource{static_cast<TreeView*>(this)}

Member Function Documentation

void CanDragItems ( bool value )
bool CanDragItems ( )
static winrt::DependencyProperty CanDragItemsProperty ( ) [inline, static]

Definition at line 42 of file TreeView.properties.h.

{ return s_CanDragItemsProperty; }

bool CanReorderItems ( )
void CanReorderItems ( bool value )
static winrt::DependencyProperty CanReorderItemsProperty ( ) [inline, static]

Definition at line 43 of file TreeView.properties.h.

{ return s_CanReorderItemsProperty; }

static void ClearProperties ( ) [static]
void Collapsed ( winrt::event_token const & token )
winrt::event_token Collapsed ( winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewCollapsedEventArgs > const & value )
winrt::event_token DragItemsCompleted ( winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewDragItemsCompletedEventArgs > const & value )
void DragItemsCompleted ( winrt::event_token const & token )
winrt::event_token DragItemsStarting ( winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewDragItemsStartingEventArgs > const & value )
void DragItemsStarting ( winrt::event_token const & token )
static void EnsureProperties ( ) [static]
winrt::event_token Expanding ( winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewExpandingEventArgs > const & value )
void Expanding ( winrt::event_token const & token )
void ItemContainerStyle ( winrt::Style const & value )
winrt::Style ItemContainerStyle ( )
static winrt::DependencyProperty ItemContainerStyleProperty ( ) [inline, static]

Definition at line 44 of file TreeView.properties.h.

{ return s_ItemContainerStyleProperty; }

winrt::StyleSelector ItemContainerStyleSelector ( )
void ItemContainerStyleSelector ( winrt::StyleSelector const & value )
static winrt::DependencyProperty ItemContainerStyleSelectorProperty ( ) [inline, static]

Definition at line 45 of file TreeView.properties.h.

{ return s_ItemContainerStyleSelectorProperty; }

void ItemContainerTransitions ( winrt::TransitionCollection const & value )
winrt::TransitionCollection ItemContainerTransitions ( )
static winrt::DependencyProperty ItemContainerTransitionsProperty ( ) [inline, static]

Definition at line 46 of file TreeView.properties.h.

{ return s_ItemContainerTransitionsProperty; }

winrt::event_token ItemInvoked ( winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewItemInvokedEventArgs > const & value )
void ItemInvoked ( winrt::event_token const & token )
void ItemsSource ( winrt::IInspectable const & value )
winrt::IInspectable ItemsSource ( )
static winrt::DependencyProperty ItemsSourceProperty ( ) [inline, static]

Definition at line 47 of file TreeView.properties.h.

{ return s_ItemsSourceProperty; }

void ItemTemplate ( winrt::DataTemplate const & value )
winrt::DataTemplate ItemTemplate ( )
static winrt::DependencyProperty ItemTemplateProperty ( ) [inline, static]

Definition at line 48 of file TreeView.properties.h.

{ return s_ItemTemplateProperty; }

winrt::DataTemplateSelector ItemTemplateSelector ( )
void ItemTemplateSelector ( winrt::DataTemplateSelector const & value )
static winrt::DependencyProperty ItemTemplateSelectorProperty ( ) [inline, static]

Definition at line 49 of file TreeView.properties.h.

{ return s_ItemTemplateSelectorProperty; }

static void OnItemsSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectedItemPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSelectionModePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
void SelectedItem ( winrt::IInspectable const & value )
winrt::IInspectable SelectedItem ( )
static winrt::DependencyProperty SelectedItemProperty ( ) [inline, static]

Definition at line 50 of file TreeView.properties.h.

{ return s_SelectedItemProperty; }

void SelectionChanged ( winrt::event_token const & token )
winrt::event_token SelectionChanged ( winrt::TypedEventHandler< winrt::TreeView, winrt::TreeViewSelectionChangedEventArgs > const & value )
winrt::TreeViewSelectionMode SelectionMode ( )
void SelectionMode ( winrt::TreeViewSelectionMode const & value )
static winrt::DependencyProperty SelectionModeProperty ( ) [inline, static]

Definition at line 51 of file TreeView.properties.h.

{ return s_SelectionModeProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::TreeView, winrt::TreeViewCollapsedEventArgs> > m_collapsedEventSource

Definition at line 77 of file TreeView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TreeView, winrt::TreeViewDragItemsCompletedEventArgs> > m_dragItemsCompletedEventSource

Definition at line 78 of file TreeView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TreeView, winrt::TreeViewDragItemsStartingEventArgs> > m_dragItemsStartingEventSource

Definition at line 79 of file TreeView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TreeView, winrt::TreeViewExpandingEventArgs> > m_expandingEventSource

Definition at line 80 of file TreeView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TreeView, winrt::TreeViewItemInvokedEventArgs> > m_itemInvokedEventSource

Definition at line 81 of file TreeView.properties.h.

event_source<winrt::TypedEventHandler<winrt::TreeView, winrt::TreeViewSelectionChangedEventArgs> > m_selectionChangedEventSource

Definition at line 82 of file TreeView.properties.h.

GlobalDependencyProperty s_CanDragItemsProperty [static]

Definition at line 53 of file TreeView.properties.h.

GlobalDependencyProperty s_CanReorderItemsProperty [static]

Definition at line 54 of file TreeView.properties.h.

GlobalDependencyProperty s_ItemContainerStyleProperty [static]

Definition at line 55 of file TreeView.properties.h.

GlobalDependencyProperty s_ItemContainerStyleSelectorProperty [static]

Definition at line 56 of file TreeView.properties.h.

GlobalDependencyProperty s_ItemContainerTransitionsProperty [static]

Definition at line 57 of file TreeView.properties.h.

GlobalDependencyProperty s_ItemsSourceProperty [static]

Definition at line 58 of file TreeView.properties.h.

GlobalDependencyProperty s_ItemTemplateProperty [static]

Definition at line 59 of file TreeView.properties.h.

GlobalDependencyProperty s_ItemTemplateSelectorProperty [static]

Definition at line 60 of file TreeView.properties.h.

GlobalDependencyProperty s_SelectedItemProperty [static]

Definition at line 61 of file TreeView.properties.h.

GlobalDependencyProperty s_SelectionModeProperty [static]

Definition at line 62 of file TreeView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TreeView.properties.h
  • Generated/TreeView.properties.cpp
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewSelectionChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

TreeViewSelectionChangedEventArgs Class Reference

#include "TreeViewSelectionChangedEventArgs.h"

Inherits ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >.

List of all members.

Public Member Functions

TreeViewSelectionChangedEventArgs (const winrt::IVector< winrt::IInspectable > addedItems, const winrt::IVector< winrt::IInspectable > removedItems)
winrt::IVector
< winrt::IInspectable > 		AddedItems ()
winrt::IVector
< winrt::IInspectable > 		RemovedItems ()

Detailed Description

Definition at line 7 of file TreeViewSelectionChangedEventArgs.h.

Constructor & Destructor Documentation

TreeViewSelectionChangedEventArgs | ( | const winrt::IVector< winrt::IInspectable > | addedItems,
 |  | const winrt::IVector< winrt::IInspectable > | removedItems
 | ) |  |

Definition at line 9 of file TreeViewSelectionChangedEventArgs.cpp.

{
    m_addedItems.set(addedItems);
    m_removedItems.set(removedItems);
}

Member Function Documentation

winrt::IVector< winrt::IInspectable > AddedItems ( )

Definition at line 15 of file TreeViewSelectionChangedEventArgs.cpp.

{
    return m_addedItems.get();
}

winrt::IVector< winrt::IInspectable > RemovedItems ( )

Definition at line 20 of file TreeViewSelectionChangedEventArgs.cpp.

{
    return m_removedItems.get();
}

The documentation for this class was generated from the following files:
  • TreeView/TreeViewSelectionChangedEventArgs.h
  • TreeView/TreeViewSelectionChangedEventArgs.cpp
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TStorageWrapperImpl< T, isNoTrackerRef > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

TStorageWrapperImpl< T, isNoTrackerRef > Struct Template Reference

#include "Vector.h"

List of all members.

Static Public Member Functions

static T | unwrap (const Holder &holder, bool useSafeGet=false)
static Holder | wrap (const T &value, const ITrackerHandleManager *trackerHandleManager)

Detailed Description

template<typename T, bool isNoTrackerRef>
struct TStorageWrapperImpl< T, isNoTrackerRef >

Definition at line 56 of file Vector.h.

Member Function Documentation

static T unwrap | ( | const Holder & | holder,
 |  | bool | useSafeGet = false |
 | ) |  |  | [inline, static]

Definition at line 67 of file Vector.h.

    {
        return holder.safe_get(useSafeGet);
    }

static Holder wrap | ( | const T & | value,
 |  | const ITrackerHandleManager * | trackerHandleManager |
 | ) |  |  | [inline, static]

Definition at line 60 of file Vector.h.

    {
        Holder holder{ trackerHandleManager };
        holder.set(value);
        return holder;
    }

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TStorageWrapperImpl< T, true > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

TStorageWrapperImpl< T, true > Struct Template Reference

#include "Vector.h"

List of all members.

Static Public Member Functions

static T | unwrap (const Holder &holder, bool useSafeGet=false)
static Holder | wrap (const T &value, ITrackerHandleManager *trackerHandleManager)

Detailed Description

template<typename T>
struct TStorageWrapperImpl< T, true >

Definition at line 72 of file Vector.h.

Member Function Documentation

static T unwrap | ( | const Holder & | holder,
 |  | bool | useSafeGet = false |
 | ) |  |  | [inline, static]

Definition at line 81 of file Vector.h.

    {
        return holder;
    }

static Holder wrap | ( | const T & | value,
 |  | ITrackerHandleManager * | trackerHandleManager |
 | ) |  |  | [inline, static]

Definition at line 76 of file Vector.h.

    {
        return value;
    }

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

TwoPaneView Class Reference

#include "TwoPaneView.h"

Inherits ReferenceTracker< TwoPaneView, winrt::implementation::TwoPaneViewT >, and TwoPaneViewProperties.

List of all members.

Public Member Functions

TwoPaneView ()
void | OnApplyTemplate ()
void | OnPropertyChanged (winrt::DependencyPropertyChangedEventArgs const &args)

Private Member Functions

winrt::Rect | GetControlRect ()
bool | IsInMultipleRegions (DisplayRegionHelperInfo info, winrt::Rect rcControl)
void | OnScrollViewerLoaded (const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args)
void | OnSizeChanged (const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args)
void | OnXamlRootChanged (const winrt::IInspectable &sender, const winrt::Microsoft::UI::Xaml::XamlRootChangedEventArgs &args)
void | SetScrollViewerProperties (std::wstring_view const &scrollViewerName, winrt::Control::Loaded_revoker &revoker)
void | UpdateMode ()
void | UpdateRowsColumns (ViewMode newMode, DisplayRegionHelperInfo info, winrt::Rect rcControl)

Detailed Description

Definition at line 28 of file TwoPaneView.h.

Constructor & Destructor Documentation

TwoPaneView ( )

Definition at line 22 of file TwoPaneView.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_TwoPaneView);

    SetDefaultStyleKey(this);

    SizeChanged({ this, &TwoPaneView::OnSizeChanged });

    EnsureProperties();
}

Member Function Documentation

winrt::Rect GetControlRect ( ) [private]

Definition at line 237 of file TwoPaneView.cpp.

{
    // Find out where this control is in the window
    winrt::GeneralTransform transform = TransformToVisual(DisplayRegionHelper::WindowElement());
    return transform.TransformBounds({ 0, 0, (float)ActualWidth(), (float)ActualHeight() });
}

bool IsInMultipleRegions | ( | DisplayRegionHelperInfo | info,
 |  | winrt::Rect | rcControl |
 | ) |  |  | [private]

Definition at line 244 of file TwoPaneView.cpp.

{
    bool isInMultipleRegions = false;

    if (info.Mode != winrt::TwoPaneViewMode::SinglePane)
    {
        const winrt::Rect rc1 = info.Regions[0];
        const winrt::Rect rc2 = info.Regions[1];

        if (info.Mode == winrt::TwoPaneViewMode::Wide)
        {
            // Check that the control is over the split
            if (rcControl.X < rc1.Width && rcControl.X + rcControl.Width > rc2.X)
            {
                isInMultipleRegions = true;
            }
        }
        else if (info.Mode == winrt::TwoPaneViewMode::Tall)
        {
            // Check that the control is over the split
            if (rcControl.Y < rc1.Height && rcControl.Y + rcControl.Height > rc2.Y)
            {
                isInMultipleRegions = true;
            }
        }
    }

    return isInMultipleRegions;
}

void OnApplyTemplate ( )

Definition at line 33 of file TwoPaneView.cpp.

{
    m_loaded = true;

    m_xamlRootChangedRevoker = XamlRoot().Changed(winrt::auto_revoke, { this, &TwoPaneView::OnXamlRootChanged });

    winrt::IControlProtected controlProtected = *this;

    SetScrollViewerProperties(c_pane1ScrollViewerName, m_pane1LoadedRevoker);
    SetScrollViewerProperties(c_pane2ScrollViewerName, m_pane2LoadedRevoker);

    if (auto column = GetTemplateChildT<winrt::ColumnDefinition>(c_columnLeftName, controlProtected))
    {
        m_columnLeft.set(column);
    }
    if (auto column = GetTemplateChildT<winrt::ColumnDefinition>(c_columnMiddleName, controlProtected))
    {
        m_columnMiddle.set(column);
    }
    if (auto column = GetTemplateChildT<winrt::ColumnDefinition>(c_columnRightName, controlProtected))
    {
        m_columnRight.set(column);
    }
    if (auto row = GetTemplateChildT<winrt::RowDefinition>(c_rowTopName, controlProtected))
    {
        m_rowTop.set(row);
    }
    if (auto row = GetTemplateChildT<winrt::RowDefinition>(c_rowMiddleName, controlProtected))
    {
        m_rowMiddle.set(row);
    }
    if (auto row = GetTemplateChildT<winrt::RowDefinition>(c_rowBottomName, controlProtected))
    {
        m_rowBottom.set(row);
    }
}

void OnPropertyChanged ( winrt::DependencyPropertyChangedEventArgs const & args )

Definition at line 274 of file TwoPaneView.cpp.

{
    auto property = args.Property();

    // Clamp property values -- early return if the values were clamped as we'll come back with the new value.
    if (property == s_MinWideModeWidthProperty || property == s_MinTallModeHeightProperty)
    {
        auto value = winrt::unbox_value<double>(args.NewValue());
        auto clampedValue = std::max(0.0, value);
        if (clampedValue != value)
        {
            SetValue(property, winrt::box_value(clampedValue));
            return;
        }
    }

    if (property == s_PanePriorityProperty
        || property == s_Pane1LengthProperty
        || property == s_Pane2LengthProperty
        || property == s_WideModeConfigurationProperty
        || property == s_TallModeConfigurationProperty
        || property == s_MinWideModeWidthProperty
        || property == s_MinTallModeHeightProperty)
    {
        UpdateMode();
    }
}

void OnScrollViewerLoaded | ( | const winrt::IInspectable & | sender,
 |  | const winrt::RoutedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 78 of file TwoPaneView.cpp.

{
    if (auto scrollViewer = sender.as<winrt::FrameworkElement>())
    {
        auto scrollContentPresenterFE = SharedHelpers::FindInVisualTreeByName(scrollViewer, L"ScrollContentPresenter");
        if (scrollContentPresenterFE)
        {
            if (auto scrollContentPresenter = scrollContentPresenterFE.as<winrt::ScrollContentPresenter>())
            {
                scrollContentPresenter.SizesContentToTemplatedParent(true);
            }
        }
    }
}

void OnSizeChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 98 of file TwoPaneView.cpp.

{
    UpdateMode();
}

void OnXamlRootChanged | ( | const winrt::IInspectable & | sender,
 |  | const winrt::Microsoft::UI::Xaml::XamlRootChangedEventArgs & | args |
 | ) |  |  | [private]

Definition at line 93 of file TwoPaneView.cpp.

{
    UpdateMode();
}

void SetScrollViewerProperties | ( | std::wstring_view const & | scrollViewerName,
 |  | winrt::Control::Loaded_revoker & | revoker |
 | ) |  |  | [private]

Definition at line 70 of file TwoPaneView.cpp.

{
    if (auto scrollViewer = GetTemplateChildT<winrt::FxScrollViewer>(scrollViewerName, *this))
    {
        revoker = scrollViewer.Loaded(winrt::auto_revoke, { this, &TwoPaneView::OnScrollViewerLoaded });
    }
}

void UpdateMode ( ) [private]

Definition at line 103 of file TwoPaneView.cpp.

{
    // Don't bother running this logic until after we hit OnApplyTemplate.
    if (!m_loaded) return;

    const double controlWidth = ActualWidth();
    const double controlHeight = ActualHeight();

    ViewMode newMode = (PanePriority() == winrt::TwoPaneViewPriority::Pane1) ? ViewMode::Pane1Only : ViewMode::Pane2Only;

    // Calculate new mode
    const DisplayRegionHelperInfo info = DisplayRegionHelper::GetRegionInfo();
    const winrt::Rect rcControl = GetControlRect();
    const bool isInMultipleRegions = IsInMultipleRegions(info, rcControl);

    if (isInMultipleRegions)
    {
        if (info.Mode == winrt::TwoPaneViewMode::Wide)
        {
            // Regions are laid out horizontally
            if (WideModeConfiguration() != winrt::TwoPaneViewWideModeConfiguration::SinglePane)
            {
                newMode = (WideModeConfiguration() == winrt::TwoPaneViewWideModeConfiguration::LeftRight) ? ViewMode::LeftRight : ViewMode::RightLeft;
            }
        }
        else if (info.Mode == winrt::TwoPaneViewMode::Tall)
        {
            // Regions are laid out vertically
            if (TallModeConfiguration() != winrt::TwoPaneViewTallModeConfiguration::SinglePane)
            {
                newMode = (TallModeConfiguration() == winrt::TwoPaneViewTallModeConfiguration::TopBottom) ? ViewMode::TopBottom : ViewMode::BottomTop;
            }
        }
    }
    else
    {
        // One region
        if (controlWidth > MinWideModeWidth() && WideModeConfiguration() != winrt::TwoPaneViewWideModeConfiguration::SinglePane)
        {
            // Split horizontally
            newMode = (WideModeConfiguration() == winrt::TwoPaneViewWideModeConfiguration::LeftRight) ? ViewMode::LeftRight : ViewMode::RightLeft;
        }
        else if (controlHeight > MinTallModeHeight() && TallModeConfiguration() != winrt::TwoPaneViewTallModeConfiguration::SinglePane)
        {
            // Split vertically
            newMode = (TallModeConfiguration() == winrt::TwoPaneViewTallModeConfiguration::TopBottom) ? ViewMode::TopBottom : ViewMode::BottomTop;
        }
    }

    // Update row/column sizes (this may need to happen even if the mode doesn't change)
    UpdateRowsColumns(newMode, info, rcControl);

    // Update mode if necessary
    if (newMode != m_currentMode)
    {
        m_currentMode = newMode;

        winrt::TwoPaneViewMode newViewMode = winrt::TwoPaneViewMode::SinglePane;

        switch (m_currentMode)
        {
            case ViewMode::Pane1Only: winrt::VisualStateManager::GoToState(*this, L"ViewMode_OneOnly", true); break;
            case ViewMode::Pane2Only: winrt::VisualStateManager::GoToState(*this, L"ViewMode_TwoOnly", true); break;
            case ViewMode::LeftRight: winrt::VisualStateManager::GoToState(*this, L"ViewMode_LeftRight", true); newViewMode = winrt::TwoPaneViewMode::Wide; break;
            case ViewMode::RightLeft: winrt::VisualStateManager::GoToState(*this, L"ViewMode_RightLeft", true); newViewMode = winrt::TwoPaneViewMode::Wide; break;
            case ViewMode::TopBottom: winrt::VisualStateManager::GoToState(*this, L"ViewMode_TopBottom", true); newViewMode = winrt::TwoPaneViewMode::Tall; break;
            case ViewMode::BottomTop: winrt::VisualStateManager::GoToState(*this, L"ViewMode_BottomTop", true); newViewMode = winrt::TwoPaneViewMode::Tall; break;
        }

        if (newViewMode != Mode())
        {
            SetValue(s_ModeProperty, box_value(newViewMode));
            m_modeChangedEventSource(*this, *this);
        }
    }
}

void UpdateRowsColumns | ( | ViewMode | newMode,
 |  | DisplayRegionHelperInfo | info,
 |  | winrt::Rect | rcControl |
 | ) |  |  | [private]

Definition at line 180 of file TwoPaneView.cpp.

{
    if (m_columnLeft && m_columnMiddle && m_columnRight && m_rowTop && m_rowMiddle && m_rowBottom)
    {
        // Reset split lengths
        m_columnMiddle.get().Width({ 0, winrt::GridUnitType::Pixel });
        m_rowMiddle.get().Height({ 0, winrt::GridUnitType::Pixel });

        // Set columns lengths
        if (newMode == ViewMode::LeftRight || newMode == ViewMode::RightLeft)
        {
            m_columnLeft.get().Width((newMode == ViewMode::LeftRight) ? Pane1Length() : Pane2Length());
            m_columnRight.get().Width((newMode == ViewMode::LeftRight) ? Pane2Length() : Pane1Length());
        }
        else
        {
            m_columnLeft.get().Width({ 1, winrt::GridUnitType::Star });
            m_columnRight.get().Width({ 0, winrt::GridUnitType::Pixel });
        }

        // Set row lengths
        if (newMode == ViewMode::TopBottom || newMode == ViewMode::BottomTop)
        {
            m_rowTop.get().Height((newMode == ViewMode::TopBottom) ? Pane1Length() : Pane2Length());
            m_rowBottom.get().Height((newMode == ViewMode::TopBottom) ? Pane2Length() : Pane1Length());
        }
        else
        {
            m_rowTop.get().Height({ 1, winrt::GridUnitType::Star });
            m_rowBottom.get().Height({ 0, winrt::GridUnitType::Pixel });
        }

        // Handle regions
        if (IsInMultipleRegions(info, rcControl) && newMode != ViewMode::Pane1Only && newMode != ViewMode::Pane2Only)
        {
            const winrt::Rect rc1 = info.Regions[0];
            const winrt::Rect rc2 = info.Regions[1];
            const winrt::Rect rcWindow = DisplayRegionHelper::WindowRect();

            if (info.Mode == winrt::TwoPaneViewMode::Wide)
            {
                m_columnMiddle.get().Width({ static_cast<double>(rc2.X) - rc1.Width, winrt::GridUnitType::Pixel });

                m_columnLeft.get().Width({ static_cast<double>(rc1.Width) - rcControl.X , winrt::GridUnitType::Pixel });
                m_columnRight.get().Width({ static_cast<double>(rc2.Width) - ((static_cast<double>(rcWindow.Width) - rcControl.Width) - rcControl.X) , winrt::GridUnitType::Pixel });
            }
            else
            {
                m_rowMiddle.get().Height({ static_cast<double>(rc2.Y) - rc1.Height, winrt::GridUnitType::Pixel });

                m_rowTop.get().Height({ static_cast<double>(rc1.Height) - rcControl.Y , winrt::GridUnitType::Pixel });
                m_rowBottom.get().Height({ static_cast<double>(rc2.Height) - ((static_cast<double>(rcWindow.Height) - rcControl.Height) - rcControl.Y) , winrt::GridUnitType::Pixel });
            }
        }
    }
}

The documentation for this class was generated from the following files:
  • TwoPaneView/TwoPaneView.h
  • TwoPaneView/TwoPaneView.cpp
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneViewProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

TwoPaneViewProperties Class Reference

#include "TwoPaneView.properties.h"

Inherited by TwoPaneView.

List of all members.

Public Member Functions

TwoPaneViewProperties ()
void | MinTallModeHeight (double value)
double | MinTallModeHeight ()
void | MinWideModeWidth (double value)
double | MinWideModeWidth ()
void | Mode (winrt::TwoPaneViewMode const &value)
winrt::TwoPaneViewMode | Mode ()
void | ModeChanged (winrt::event_token const &token)
winrt::event_token | ModeChanged (winrt::TypedEventHandler< winrt::TwoPaneView, winrt::IInspectable > const &value)
void | Pane1 (winrt::UIElement const &value)
winrt::UIElement | Pane1 ()
void | Pane1Length (winrt::GridLength const &value)
winrt::GridLength | Pane1Length ()
winrt::UIElement | Pane2 ()
void | Pane2 (winrt::UIElement const &value)
winrt::GridLength | Pane2Length ()
void | Pane2Length (winrt::GridLength const &value)
void | PanePriority (winrt::TwoPaneViewPriority const &value)
winrt::TwoPaneViewPriority | PanePriority ()
winrt::TwoPaneViewTallModeConfiguration | TallModeConfiguration ()
void | TallModeConfiguration (winrt::TwoPaneViewTallModeConfiguration const &value)
void | WideModeConfiguration (winrt::TwoPaneViewWideModeConfiguration const &value)
winrt::TwoPaneViewWideModeConfiguration | WideModeConfiguration ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | MinTallModeHeightProperty ()
static winrt::DependencyProperty | MinWideModeWidthProperty ()
static winrt::DependencyProperty | ModeProperty ()
static void | OnMinTallModeHeightPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinWideModeWidthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPane1LengthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPane1PropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPane2LengthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPane2PropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnPanePriorityPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnTallModeConfigurationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnWideModeConfigurationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | Pane1LengthProperty ()
static winrt::DependencyProperty | Pane1Property ()
static winrt::DependencyProperty | Pane2LengthProperty ()
static winrt::DependencyProperty | Pane2Property ()
static winrt::DependencyProperty | PanePriorityProperty ()
static winrt::DependencyProperty | TallModeConfigurationProperty ()
static winrt::DependencyProperty | WideModeConfigurationProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::TwoPaneView,
winrt::IInspectable > > 		m_modeChangedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_MinTallModeHeightProperty
static GlobalDependencyProperty | s_MinWideModeWidthProperty
static GlobalDependencyProperty | s_ModeProperty
static GlobalDependencyProperty | s_Pane1LengthProperty
static GlobalDependencyProperty | s_Pane1Property
static GlobalDependencyProperty | s_Pane2LengthProperty
static GlobalDependencyProperty | s_Pane2Property
static GlobalDependencyProperty | s_PanePriorityProperty
static GlobalDependencyProperty | s_TallModeConfigurationProperty
static GlobalDependencyProperty | s_WideModeConfigurationProperty

Detailed Description

Definition at line 7 of file TwoPaneView.properties.h.

Constructor & Destructor Documentation

TwoPaneViewProperties ( )

Definition at line 27 of file TwoPaneView.properties.cpp.

    : m_modeChangedEventSource{static_cast<TwoPaneView*>(this)}

Member Function Documentation

static void ClearProperties ( ) [static]
static void EnsureProperties ( ) [static]
void MinTallModeHeight ( double value )
double MinTallModeHeight ( )
static winrt::DependencyProperty MinTallModeHeightProperty ( ) [inline, static]

Definition at line 42 of file TwoPaneView.properties.h.

{ return s_MinTallModeHeightProperty; }

double MinWideModeWidth ( )
void MinWideModeWidth ( double value )
static winrt::DependencyProperty MinWideModeWidthProperty ( ) [inline, static]

Definition at line 43 of file TwoPaneView.properties.h.

{ return s_MinWideModeWidthProperty; }

void Mode ( winrt::TwoPaneViewMode const & value )
winrt::TwoPaneViewMode Mode ( )
void ModeChanged ( winrt::event_token const & token )
winrt::event_token ModeChanged ( winrt::TypedEventHandler< winrt::TwoPaneView, winrt::IInspectable > const & value )
static winrt::DependencyProperty ModeProperty ( ) [inline, static]

Definition at line 44 of file TwoPaneView.properties.h.

{ return s_ModeProperty; }

static void OnMinTallModeHeightPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnMinWideModeWidthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPane1LengthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPane1PropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPane2LengthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPane2PropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnPanePriorityPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnTallModeConfigurationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnWideModeConfigurationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::UIElement Pane1 ( )
void Pane1 ( winrt::UIElement const & value )
void Pane1Length ( winrt::GridLength const & value )
winrt::GridLength Pane1Length ( )
static winrt::DependencyProperty Pane1LengthProperty ( ) [inline, static]

Definition at line 46 of file TwoPaneView.properties.h.

{ return s_Pane1LengthProperty; }

static winrt::DependencyProperty Pane1Property ( ) [inline, static]

Definition at line 45 of file TwoPaneView.properties.h.

{ return s_Pane1Property; }

winrt::UIElement Pane2 ( )
void Pane2 ( winrt::UIElement const & value )
void Pane2Length ( winrt::GridLength const & value )
winrt::GridLength Pane2Length ( )
static winrt::DependencyProperty Pane2LengthProperty ( ) [inline, static]

Definition at line 48 of file TwoPaneView.properties.h.

{ return s_Pane2LengthProperty; }

static winrt::DependencyProperty Pane2Property ( ) [inline, static]

Definition at line 47 of file TwoPaneView.properties.h.

{ return s_Pane2Property; }

void PanePriority ( winrt::TwoPaneViewPriority const & value )
winrt::TwoPaneViewPriority PanePriority ( )
static winrt::DependencyProperty PanePriorityProperty ( ) [inline, static]

Definition at line 49 of file TwoPaneView.properties.h.

{ return s_PanePriorityProperty; }

void TallModeConfiguration ( winrt::TwoPaneViewTallModeConfiguration const & value )
winrt::TwoPaneViewTallModeConfiguration TallModeConfiguration ( )
static winrt::DependencyProperty TallModeConfigurationProperty ( ) [inline, static]

Definition at line 50 of file TwoPaneView.properties.h.

{ return s_TallModeConfigurationProperty; }

void WideModeConfiguration ( winrt::TwoPaneViewWideModeConfiguration const & value )
winrt::TwoPaneViewWideModeConfiguration WideModeConfiguration ( )
static winrt::DependencyProperty WideModeConfigurationProperty ( ) [inline, static]

Definition at line 51 of file TwoPaneView.properties.h.

{ return s_WideModeConfigurationProperty; }

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::TwoPaneView, winrt::IInspectable> > m_modeChangedEventSource

Definition at line 67 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_MinTallModeHeightProperty [static]

Definition at line 53 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_MinWideModeWidthProperty [static]

Definition at line 54 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_ModeProperty [static]

Definition at line 55 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_Pane1LengthProperty [static]

Definition at line 57 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_Pane1Property [static]

Definition at line 56 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_Pane2LengthProperty [static]

Definition at line 59 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_Pane2Property [static]

Definition at line 58 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_PanePriorityProperty [static]

Definition at line 60 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_TallModeConfigurationProperty [static]

Definition at line 61 of file TwoPaneView.properties.h.

GlobalDependencyProperty s_WideModeConfigurationProperty [static]

Definition at line 62 of file TwoPaneView.properties.h.

The documentation for this class was generated from the following files:
  • Generated/TwoPaneView.properties.h
  • Generated/TwoPaneView.properties.cpp
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UniformGridLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

UniformGridLayout Class Reference

#include "UniformGridLayout.h"

Inherits ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout >, IFlowLayoutAlgorithmDelegates, OrientationBasedMeasures, and UniformGridLayoutProperties.

List of all members.

Public Member Functions

UniformGridLayout ()
winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForRealizationRect (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::FlowLayoutAnchorInfo | Algorithm_GetAnchorForTargetElement (int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::Rect | Algorithm_GetExtent (const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds) override
winrt::Size | Algorithm_GetMeasureSize (int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override
winrt::Size | Algorithm_GetProvisionalArrangeSize (int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context) override
void | Algorithm_OnElementMeasured (const winrt::UIElement &, int, const winrt::Size &, const winrt::Size &, const winrt::Size &, const winrt::Size &, const winrt::VirtualizingLayoutContext &) override
void | Algorithm_OnLineArranged (int, int, double, const winrt::VirtualizingLayoutContext &) override
bool | Algorithm_ShouldBreakLine (int index, double remainingSpace) override
winrt::Size | ArrangeOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize)
void | InitializeForContextCore (winrt::VirtualizingLayoutContext const &context)
winrt::Size | MeasureOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize)
void | OnItemsChangedCore (winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | UninitializeForContextCore (winrt::VirtualizingLayoutContext const &context)

Private Member Functions

winrt::com_ptr
< UniformGridLayoutState > 		GetAsGridState (const winrt::IInspectable &state)
::FlowLayoutAlgorithm & | GetFlowAlgorithm (const winrt::VirtualizingLayoutContext &context)
int | GetItemsPerLine (winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context)
winrt::Rect | GetLayoutRectForDataIndex (const winrt::Size &availableSize, int index, const winrt::Rect &lastExtent, const winrt::VirtualizingLayoutContext &context)
float | GetMajorSizeWithSpacing (winrt::VirtualizingLayoutContext const &context)
float | GetMinorSizeWithSpacing (winrt::VirtualizingLayoutContext const &context)
void | InvalidateLayout ()
double | LineSpacing ()
double | MinItemSpacing ()
void | UpdateIndexBasedLayoutOrientation (const winrt::Orientation &orientation)

Detailed Description

Definition at line 13 of file UniformGridLayout.h.

Constructor & Destructor Documentation

UniformGridLayout ( )

Member Function Documentation

winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForRealizationRect | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForTargetElement | ( | int | targetIndex,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
winrt::Rect Algorithm_GetExtent | ( | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | const winrt::UIElement & | firstRealized,
 |  | int | firstRealizedItemIndex,
 |  | const winrt::Rect & | firstRealizedLayoutBounds,
 |  | const winrt::UIElement & | lastRealized,
 |  | int | lastRealizedItemIndex,
 |  | const winrt::Rect & | lastRealizedLayoutBounds |
 | ) |  |  | [override]
winrt::Size Algorithm_GetMeasureSize | ( | int | index,
 |  | const winrt::Size & | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
winrt::Size Algorithm_GetProvisionalArrangeSize | ( | int | index,
 |  | const winrt::Size & | measureSize,
 |  | winrt::Size const & | desiredSize,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [override]
void Algorithm_OnElementMeasured | ( | const winrt::UIElement & | ,
 |  | int | ,
 |  | const winrt::Size & | ,
 |  | const winrt::Size & | ,
 |  | const winrt::Size & | ,
 |  | const winrt::Size & | ,
 |  | const winrt::VirtualizingLayoutContext & |  |
 | ) |  |  | [inline, override]

Definition at line 57 of file UniformGridLayout.h.

                                                                    {}

void Algorithm_OnLineArranged | ( | int | ,
 |  | int | ,
 |  | double | ,
 |  | const winrt::VirtualizingLayoutContext & |  |
 | ) |  |  | [inline, override]

Definition at line 65 of file UniformGridLayout.h.

                                                                    {}

bool Algorithm_ShouldBreakLine | ( | int | index,
 |  | double | remainingSpace |
 | ) |  |  | [override]
winrt::Size ArrangeOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize
 | ) |  |
winrt::com_ptr<UniformGridLayoutState> GetAsGridState ( const winrt::IInspectable & state ) [inline, private]

Definition at line 82 of file UniformGridLayout.h.

    {
        return winrt::get_self<UniformGridLayoutState>(state.as<winrt::UniformGridLayoutState>())->get_strong();
    }

::FlowLayoutAlgorithm& GetFlowAlgorithm ( const winrt::VirtualizingLayoutContext & context ) [inline, private]

Definition at line 87 of file UniformGridLayout.h.

    {
        return GetAsGridState(context.LayoutState())->FlowAlgorithm();
    }

int GetItemsPerLine | ( | winrt::Size const & | availableSize,
 |  | winrt::VirtualizingLayoutContext const & | context |
 | ) |  |  | [private]
winrt::Rect GetLayoutRectForDataIndex | ( | const winrt::Size & | availableSize,
 |  | int | index,
 |  | const winrt::Rect & | lastExtent,
 |  | const winrt::VirtualizingLayoutContext & | context |
 | ) |  |  | [private]
float GetMajorSizeWithSpacing ( winrt::VirtualizingLayoutContext const & context ) [private]
float GetMinorSizeWithSpacing ( winrt::VirtualizingLayoutContext const & context ) [private]
void InitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )
void InvalidateLayout ( ) [inline, private]

Definition at line 92 of file UniformGridLayout.h.

    {
        __super::InvalidateMeasure();
    }

double LineSpacing ( ) [inline, private]

Definition at line 97 of file UniformGridLayout.h.

    {
        return Orientation() == winrt::Orientation::Horizontal ? m_minRowSpacing: m_minColumnSpacing;
    }

winrt::Size MeasureOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize
 | ) |  |
double MinItemSpacing ( ) [inline, private]

Definition at line 102 of file UniformGridLayout.h.

    {
        return Orientation() == winrt::Orientation::Horizontal ? m_minColumnSpacing: m_minRowSpacing;
    }

void OnItemsChangedCore | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::IInspectable const & | source,
 |  | winrt::NotifyCollectionChangedEventArgs const & | args
 | ) |  |
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void UninitializeForContextCore ( winrt::VirtualizingLayoutContext const & context )
void UpdateIndexBasedLayoutOrientation ( const winrt::Orientation & orientation ) [private]
The documentation for this class was generated from the following file:
  • Repeater/UniformGridLayout.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UniformGridLayoutProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

UniformGridLayoutProperties Class Reference

#include "UniformGridLayout.properties.h"

Inherited by UniformGridLayout.

List of all members.

Public Member Functions

UniformGridLayoutProperties ()
void | ItemsJustification (winrt::UniformGridLayoutItemsJustification const &value)
winrt::UniformGridLayoutItemsJustification | ItemsJustification ()
void | ItemsStretch (winrt::UniformGridLayoutItemsStretch const &value)
winrt::UniformGridLayoutItemsStretch | ItemsStretch ()
void | MaximumRowsOrColumns (int value)
int | MaximumRowsOrColumns ()
void | MinColumnSpacing (double value)
double | MinColumnSpacing ()
double | MinItemHeight ()
void | MinItemHeight (double value)
double | MinItemWidth ()
void | MinItemWidth (double value)
void | MinRowSpacing (double value)
double | MinRowSpacing ()
void | Orientation (winrt::Orientation const &value)
winrt::Orientation | Orientation ()

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static winrt::DependencyProperty | ItemsJustificationProperty ()
static winrt::DependencyProperty | ItemsStretchProperty ()
static winrt::DependencyProperty | MaximumRowsOrColumnsProperty ()
static winrt::DependencyProperty | MinColumnSpacingProperty ()
static winrt::DependencyProperty | MinItemHeightProperty ()
static winrt::DependencyProperty | MinItemWidthProperty ()
static winrt::DependencyProperty | MinRowSpacingProperty ()
static void | OnItemsJustificationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnItemsStretchPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMaximumRowsOrColumnsPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinColumnSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinItemHeightPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinItemWidthPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnMinRowSpacingPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnOrientationPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | OrientationProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_ItemsJustificationProperty
static GlobalDependencyProperty | s_ItemsStretchProperty
static GlobalDependencyProperty | s_MaximumRowsOrColumnsProperty
static GlobalDependencyProperty | s_MinColumnSpacingProperty
static GlobalDependencyProperty | s_MinItemHeightProperty
static GlobalDependencyProperty | s_MinItemWidthProperty
static GlobalDependencyProperty | s_MinRowSpacingProperty
static GlobalDependencyProperty | s_OrientationProperty

Detailed Description

Definition at line 7 of file UniformGridLayout.properties.h.

Constructor & Destructor Documentation

UniformGridLayoutProperties ( )

Definition at line 25 of file UniformGridLayout.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 122 of file UniformGridLayout.properties.cpp.

{
    s_ItemsJustificationProperty = nullptr;
    s_ItemsStretchProperty = nullptr;
    s_MaximumRowsOrColumnsProperty = nullptr;
    s_MinColumnSpacingProperty = nullptr;
    s_MinItemHeightProperty = nullptr;
    s_MinItemWidthProperty = nullptr;
    s_MinRowSpacingProperty = nullptr;
    s_OrientationProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 30 of file UniformGridLayout.properties.cpp.

{
    if (!s_ItemsJustificationProperty)
    {
        s_ItemsJustificationProperty =
            InitializeDependencyProperty(
                L"ItemsJustification",
                winrt::name_of<winrt::UniformGridLayoutItemsJustification>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<winrt::UniformGridLayoutItemsJustification>::BoxValueIfNecessary(winrt::UniformGridLayoutItemsJustification::Start),
                winrt::PropertyChangedCallback(&OnItemsJustificationPropertyChanged));
    }
    if (!s_ItemsStretchProperty)
    {
        s_ItemsStretchProperty =
            InitializeDependencyProperty(
                L"ItemsStretch",
                winrt::name_of<winrt::UniformGridLayoutItemsStretch>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<winrt::UniformGridLayoutItemsStretch>::BoxValueIfNecessary(winrt::UniformGridLayoutItemsStretch::None),
                winrt::PropertyChangedCallback(&OnItemsStretchPropertyChanged));
    }
    if (!s_MaximumRowsOrColumnsProperty)
    {
        s_MaximumRowsOrColumnsProperty =
            InitializeDependencyProperty(
                L"MaximumRowsOrColumns",
                winrt::name_of<int>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(-1),
                winrt::PropertyChangedCallback(&OnMaximumRowsOrColumnsPropertyChanged));
    }
    if (!s_MinColumnSpacingProperty)
    {
        s_MinColumnSpacingProperty =
            InitializeDependencyProperty(
                L"MinColumnSpacing",
                winrt::name_of<double>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnMinColumnSpacingPropertyChanged));
    }
    if (!s_MinItemHeightProperty)
    {
        s_MinItemHeightProperty =
            InitializeDependencyProperty(
                L"MinItemHeight",
                winrt::name_of<double>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnMinItemHeightPropertyChanged));
    }
    if (!s_MinItemWidthProperty)
    {
        s_MinItemWidthProperty =
            InitializeDependencyProperty(
                L"MinItemWidth",
                winrt::name_of<double>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnMinItemWidthPropertyChanged));
    }
    if (!s_MinRowSpacingProperty)
    {
        s_MinRowSpacingProperty =
            InitializeDependencyProperty(
                L"MinRowSpacing",
                winrt::name_of<double>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<double>::BoxValueIfNecessary(0.0),
                winrt::PropertyChangedCallback(&OnMinRowSpacingPropertyChanged));
    }
    if (!s_OrientationProperty)
    {
        s_OrientationProperty =
            InitializeDependencyProperty(
                L"Orientation",
                winrt::name_of<winrt::Orientation>(),
                winrt::name_of<winrt::UniformGridLayout>(),
                false /* isAttached */,
                ValueHelper<winrt::Orientation>::BoxValueIfNecessary(winrt::Orientation::Horizontal),
                winrt::PropertyChangedCallback(&OnOrientationPropertyChanged));
    }
}

winrt::UniformGridLayoutItemsJustification ItemsJustification ( )

Definition at line 206 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<winrt::UniformGridLayoutItemsJustification>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_ItemsJustificationProperty));
}

void ItemsJustification ( winrt::UniformGridLayoutItemsJustification const & value )

Definition at line 198 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_ItemsJustificationProperty, ValueHelper<winrt::UniformGridLayoutItemsJustification>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ItemsJustificationProperty ( ) [inline, static]

Definition at line 36 of file UniformGridLayout.properties.h.

{ return s_ItemsJustificationProperty; }

winrt::UniformGridLayoutItemsStretch ItemsStretch ( )

Definition at line 219 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<winrt::UniformGridLayoutItemsStretch>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_ItemsStretchProperty));
}

void ItemsStretch ( winrt::UniformGridLayoutItemsStretch const & value )

Definition at line 211 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_ItemsStretchProperty, ValueHelper<winrt::UniformGridLayoutItemsStretch>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty ItemsStretchProperty ( ) [inline, static]

Definition at line 37 of file UniformGridLayout.properties.h.

{ return s_ItemsStretchProperty; }

void MaximumRowsOrColumns ( int value )

Definition at line 224 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_MaximumRowsOrColumnsProperty, ValueHelper<int>::BoxValueIfNecessary(value));
    }
}

int MaximumRowsOrColumns ( )

Definition at line 232 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<int>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_MaximumRowsOrColumnsProperty));
}

static winrt::DependencyProperty MaximumRowsOrColumnsProperty ( ) [inline, static]

Definition at line 38 of file UniformGridLayout.properties.h.

{ return s_MaximumRowsOrColumnsProperty; }

double MinColumnSpacing ( )

Definition at line 245 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_MinColumnSpacingProperty));
}

void MinColumnSpacing ( double value )

Definition at line 237 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_MinColumnSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty MinColumnSpacingProperty ( ) [inline, static]

Definition at line 39 of file UniformGridLayout.properties.h.

{ return s_MinColumnSpacingProperty; }

void MinItemHeight ( double value )

Definition at line 250 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_MinItemHeightProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double MinItemHeight ( )

Definition at line 258 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_MinItemHeightProperty));
}

static winrt::DependencyProperty MinItemHeightProperty ( ) [inline, static]

Definition at line 40 of file UniformGridLayout.properties.h.

{ return s_MinItemHeightProperty; }

void MinItemWidth ( double value )

Definition at line 263 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_MinItemWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double MinItemWidth ( )

Definition at line 271 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_MinItemWidthProperty));
}

static winrt::DependencyProperty MinItemWidthProperty ( ) [inline, static]

Definition at line 41 of file UniformGridLayout.properties.h.

{ return s_MinItemWidthProperty; }

void MinRowSpacing ( double value )

Definition at line 276 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_MinRowSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
    }
}

double MinRowSpacing ( )

Definition at line 284 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<double>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_MinRowSpacingProperty));
}

static winrt::DependencyProperty MinRowSpacingProperty ( ) [inline, static]

Definition at line 42 of file UniformGridLayout.properties.h.

{ return s_MinRowSpacingProperty; }

void OnItemsJustificationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 134 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

void OnItemsStretchPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 142 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

void OnMaximumRowsOrColumnsPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 150 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

void OnMinColumnSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 158 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

void OnMinItemHeightPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 166 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

void OnMinItemWidthPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 174 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

void OnMinRowSpacingPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 182 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

void OnOrientationPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 190 of file UniformGridLayout.properties.cpp.

{
    auto owner = sender.as<winrt::UniformGridLayout>();
    winrt::get_self<UniformGridLayout>(owner)->OnPropertyChanged(args);
}

winrt::Orientation Orientation ( )

Definition at line 297 of file UniformGridLayout.properties.cpp.

{
    return ValueHelper<winrt::Orientation>::CastOrUnbox(static_cast<UniformGridLayout*>(this)->GetValue(s_OrientationProperty));
}

void Orientation ( winrt::Orientation const & value )

Definition at line 289 of file UniformGridLayout.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<UniformGridLayout*>(this)->SetValue(s_OrientationProperty, ValueHelper<winrt::Orientation>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty OrientationProperty ( ) [inline, static]

Definition at line 43 of file UniformGridLayout.properties.h.

{ return s_OrientationProperty; }

Member Data Documentation

GlobalDependencyProperty s_ItemsJustificationProperty [static]

Definition at line 45 of file UniformGridLayout.properties.h.

GlobalDependencyProperty s_ItemsStretchProperty [static]

Definition at line 46 of file UniformGridLayout.properties.h.

GlobalDependencyProperty s_MaximumRowsOrColumnsProperty [static]

Definition at line 47 of file UniformGridLayout.properties.h.

GlobalDependencyProperty s_MinColumnSpacingProperty [static]

Definition at line 48 of file UniformGridLayout.properties.h.

GlobalDependencyProperty s_MinItemHeightProperty [static]

Definition at line 49 of file UniformGridLayout.properties.h.

GlobalDependencyProperty s_MinItemWidthProperty [static]

Definition at line 50 of file UniformGridLayout.properties.h.

GlobalDependencyProperty s_MinRowSpacingProperty [static]

Definition at line 51 of file UniformGridLayout.properties.h.

GlobalDependencyProperty s_OrientationProperty [static]

Definition at line 52 of file UniformGridLayout.properties.h.

The documentation for this class was generated from the following files:
  • Generated/UniformGridLayout.properties.h
  • Generated/UniformGridLayout.properties.cpp
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UniformGridLayoutState Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

UniformGridLayoutState Class Reference

#include "UniformGridLayoutState.h"

Inherits ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing >.

List of all members.

Public Member Functions

double | EffectiveItemHeight () const
double | EffectiveItemWidth () const
void | EnsureElementSize (const winrt::Size availableSize, const winrt::VirtualizingLayoutContext &context, const double itemWidth, const double itemHeight, const winrt::UniformGridLayoutItemsStretch &stretch, const winrt::Orientation &orientation, const double minRowSpacing, const double minColumnSpacing, unsigned int maxItemsPerLine)
::FlowLayoutAlgorithm & FlowAlgorithm ()
void | InitializeForContext (const winrt::VirtualizingLayoutContext &context, IFlowLayoutAlgorithmDelegates *callbacks)
void | InvalidateElementSize ()
void | UninitializeForContext (const winrt::VirtualizingLayoutContext &context)

Private Member Functions

winrt::Size | CalculateAvailableSize (const winrt::Size availableSize, const winrt::Orientation orientation, const winrt::UniformGridLayoutItemsStretch &stretch, const unsigned int maxItemsPerLine, const double itemWidth, const double itemHeight, const double minRowSpacing, const double minColumnSpacing) const
double | CalculateExtraPixelsInLine (const unsigned int maxItemsPerLine, const float availableSizeMinor, const double itemSizeMinor, const double minorItemSpacing) const
void | SetSize (const winrt::Size &desiredItemSize, const double itemWidth, const double itemHeight, const winrt::Size availableSize, const winrt::UniformGridLayoutItemsStretch &stretch, const winrt::Orientation &orientation, const double minRowSpacing, const double minColumnSpacing, unsigned int maxItemsPerLine)

Detailed Description

Definition at line 10 of file UniformGridLayoutState.h.

Member Function Documentation

winrt::Size CalculateAvailableSize | ( | const winrt::Size | availableSize,
 |  | const winrt::Orientation | orientation,
 |  | const winrt::UniformGridLayoutItemsStretch & | stretch,
 |  | const unsigned int | maxItemsPerLine,
 |  | const double | itemWidth,
 |  | const double | itemHeight,
 |  | const double | minRowSpacing,
 |  | const double | minColumnSpacing |
 | ) |  |  | const [private]

Definition at line 75 of file UniformGridLayoutState.cpp.

{
    // Since some controls might have certain requirements when rendering (e.g. maintaining an aspect ratio),
    // we will let elements know the actual size they will get within our layout and let them measure based on that assumption.
    // That way we ensure that no gaps will be created within our layout because of a control deciding it doesn't need as much height (or width)
    // for the column width (or row height) being provided.
    if (orientation == winrt::Orientation::Horizontal)
    {
        if (!isnan(itemWidth) && std::isfinite(availableSize.Width))
        {
            double allowedColumnWidth = itemWidth;
            if (stretch != winrt::UniformGridLayoutItemsStretch::None)
            {
                allowedColumnWidth += CalculateExtraPixelsInLine(maxItemsPerLine, availableSize.Width, itemWidth, minColumnSpacing);
            }
            return winrt::Size{ static_cast<float>(allowedColumnWidth), availableSize.Height };
        }
    }
    else
    {
        if (!isnan(itemHeight) && std::isfinite(availableSize.Height))
        {
            double allowedRowHeight = itemHeight;
            if (stretch != winrt::UniformGridLayoutItemsStretch::None)
            {
                allowedRowHeight += CalculateExtraPixelsInLine(maxItemsPerLine, availableSize.Height, itemHeight, minRowSpacing);
            }
            return winrt::Size{ availableSize.Width, static_cast<float>(allowedRowHeight) };
        }
    }
    return availableSize;
}

double CalculateExtraPixelsInLine | ( | const unsigned int | maxItemsPerLine,
 |  | const float | availableSizeMinor,
 |  | const double | itemSizeMinor,
 |  | const double | minorItemSpacing |
 | ) |  |  | const [private]

Definition at line 116 of file UniformGridLayoutState.cpp.

{
    const auto numItemsPerColumn = [](const unsigned int maxItemsPerLine, const float availableSizeMinor, const double itemSizeMinor, const double minorItemSpacing)
    {
        const unsigned int numItemsBasedOnSize = static_cast<unsigned int>(std::max(1.0, availableSizeMinor / (itemSizeMinor + minorItemSpacing)));
        if (numItemsBasedOnSize == 0)
        {
            return maxItemsPerLine;
        }
        else
        {
            return std::min(maxItemsPerLine, numItemsBasedOnSize);
        }
    }(maxItemsPerLine,availableSizeMinor,itemSizeMinor,minorItemSpacing);

    const auto usedSpace = (numItemsPerColumn * (itemSizeMinor + minorItemSpacing)) - minorItemSpacing;
    const auto remainingSpace = static_cast<int>(availableSizeMinor - usedSpace);
    return remainingSpace / static_cast<int>(numItemsPerColumn);
}

double EffectiveItemHeight ( ) const [inline]

Definition at line 21 of file UniformGridLayoutState.h.

{ return m_effectiveItemHeight; }

double EffectiveItemWidth ( ) const [inline]

Definition at line 20 of file UniformGridLayoutState.h.

{ return m_effectiveItemWidth; }

void EnsureElementSize | ( | const winrt::Size | availableSize,
 |  | const winrt::VirtualizingLayoutContext & | context,
 |  | const double | itemWidth,
 |  | const double | itemHeight,
 |  | const winrt::UniformGridLayoutItemsStretch & | stretch,
 |  | const winrt::Orientation & | orientation,
 |  | const double | minRowSpacing,
 |  | const double | minColumnSpacing,
 |  | unsigned int | maxItemsPerLine
 | ) |  |

Definition at line 26 of file UniformGridLayoutState.cpp.

{
    if (maxItemsPerLine == 0)
    {
        maxItemsPerLine = 1;
    }

    if (context.ItemCount() > 0)
    {
        // If the first element is realized we don't need to get it from the context.
        if (auto realizedElement = m_flowAlgorithm.GetElementIfRealized(0))
        {
            // This is relatively cheap, when item 0 is realized, always use it to find the size.
            realizedElement.Measure(CalculateAvailableSize(availableSize, orientation, stretch, maxItemsPerLine, layoutItemWidth, layoutItemHeight, minRowSpacing, minColumnSpacing));
            SetSize(realizedElement.DesiredSize(), layoutItemWidth, layoutItemHeight, availableSize, stretch, orientation, minRowSpacing, minColumnSpacing, maxItemsPerLine);
        }
        else
        {
            // Not realized by flowlayout, so do this now but just once per layout pass since this is expensive and
            // has the potential to repeatedly invalidate layout due to recycling causing layout cycles.
            if (!m_isEffectiveSizeValid)
            {
                if (const auto firstElement = context.GetOrCreateElementAt(0, winrt::ElementRealizationOptions::ForceCreate))
                {
                    firstElement.Measure(CalculateAvailableSize(availableSize, orientation, stretch, maxItemsPerLine, layoutItemWidth, layoutItemHeight, minRowSpacing, minColumnSpacing));
                    SetSize(firstElement.DesiredSize(), layoutItemWidth, layoutItemHeight, availableSize, stretch, orientation, minRowSpacing, minColumnSpacing, maxItemsPerLine);
                    context.RecycleElement(firstElement);
                }
            }
        }

        m_isEffectiveSizeValid = true;
    }
}

::FlowLayoutAlgorithm& FlowAlgorithm ( ) [inline]

Definition at line 19 of file UniformGridLayoutState.h.

{ return m_flowAlgorithm; }

void InitializeForContext | ( | const winrt::VirtualizingLayoutContext & | context,
 |  | IFlowLayoutAlgorithmDelegates * | callbacks
 | ) |  |

Definition at line 13 of file UniformGridLayoutState.cpp.

{
    m_flowAlgorithm.InitializeForContext(context, callbacks);
    context.LayoutStateCore(*this);
}

void InvalidateElementSize ( )

Definition at line 70 of file UniformGridLayoutState.cpp.

{
    m_isEffectiveSizeValid = false;
}

void SetSize | ( | const winrt::Size & | desiredItemSize,
 |  | const double | itemWidth,
 |  | const double | itemHeight,
 |  | const winrt::Size | availableSize,
 |  | const winrt::UniformGridLayoutItemsStretch & | stretch,
 |  | const winrt::Orientation & | orientation,
 |  | const double | minRowSpacing,
 |  | const double | minColumnSpacing,
 |  | unsigned int | maxItemsPerLine |
 | ) |  |  | [private]

Definition at line 140 of file UniformGridLayoutState.cpp.

{
    if (maxItemsPerLine == 0)
    {
        maxItemsPerLine = 1;
    }

    m_effectiveItemWidth = (std::isnan(layoutItemWidth) ? desiredItemSize.Width : layoutItemWidth);
    m_effectiveItemHeight = (std::isnan(layoutItemHeight) ? desiredItemSize.Height : layoutItemHeight);

    const auto availableSizeMinor = orientation == winrt::Orientation::Horizontal ? availableSize.Width : availableSize.Height;
    const auto minorItemSpacing = orientation == winrt::Orientation::Vertical ? minRowSpacing : minColumnSpacing;
    const auto itemSizeMinor = orientation == winrt::Orientation::Horizontal ? m_effectiveItemWidth : m_effectiveItemHeight;

    double extraMinorPixelsForEachItem = 0.0;
    if (std::isfinite(availableSizeMinor))
    {
        extraMinorPixelsForEachItem = CalculateExtraPixelsInLine(maxItemsPerLine, availableSizeMinor, itemSizeMinor, minorItemSpacing);
    }

    if (stretch == winrt::UniformGridLayoutItemsStretch::Fill)
    {
        if (orientation == winrt::Orientation::Horizontal)
        {
            m_effectiveItemWidth += extraMinorPixelsForEachItem;
        }
        else
        {
            m_effectiveItemHeight += extraMinorPixelsForEachItem;
        }
    }
    else if (stretch == winrt::UniformGridLayoutItemsStretch::Uniform)
    {
        const auto itemSizeMajor = orientation == winrt::Orientation::Horizontal ? m_effectiveItemHeight : m_effectiveItemWidth;
        const auto extraMajorPixelsForEachItem = itemSizeMajor * (extraMinorPixelsForEachItem / itemSizeMinor);

        if (orientation == winrt::Orientation::Horizontal)
        {
            m_effectiveItemWidth += extraMinorPixelsForEachItem;
            m_effectiveItemHeight += extraMajorPixelsForEachItem;
        }
        else
        {
            m_effectiveItemHeight += extraMinorPixelsForEachItem;
            m_effectiveItemWidth += extraMajorPixelsForEachItem;
        }
    }
}

void UninitializeForContext ( const winrt::VirtualizingLayoutContext & context )

Definition at line 21 of file UniformGridLayoutState.cpp.

{
    m_flowAlgorithm.UninitializeForContext(context);
}

The documentation for this class was generated from the following files:
  • Repeater/UniformGridLayoutState.h
  • Repeater/UniformGridLayoutState.cpp
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ValueHelper< T, Enable > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

ValueHelper< T, Enable > Struct Template Reference

#include "CppWinRTHelpers.h"

List of all members.

Static Public Member Functions

static winrt::IInspectable | BoxedDefaultValue ()
static winrt::IInspectable | BoxValueIfNecessary (T const &value)
static T | CastOrUnbox (winrt::IInspectable const &value)
static T | GetDefaultValue ()

Detailed Description

template<typename T, typename Enable = void>
struct ValueHelper< T, Enable >

Definition at line 54 of file CppWinRTHelpers.h.

Member Function Documentation

static winrt::IInspectable BoxedDefaultValue ( ) [inline, static]

Definition at line 72 of file CppWinRTHelpers.h.

    {
        return BoxValueIfNecessary(GetDefaultValue());
    }

static winrt::IInspectable BoxValueIfNecessary ( T const & value ) [inline, static]

Definition at line 62 of file CppWinRTHelpers.h.

    {
        return winrt::box_value(value);
    }

static T CastOrUnbox ( winrt::IInspectable const & value ) [inline, static]

Definition at line 67 of file CppWinRTHelpers.h.

    {
        return winrt::unbox_value<T>(value);
    }

static T GetDefaultValue ( ) [inline, static]

Definition at line 56 of file CppWinRTHelpers.h.

    {
        T defaultValue = T{};
        return defaultValue;
    }

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > Struct Template Reference

#include "CppWinRTHelpers.h"

List of all members.

Static Public Member Functions

static winrt::IInspectable | BoxedDefaultValue ()
static winrt::IInspectable | BoxValueIfNecessary (T const &value)
static T | CastOrUnbox (winrt::IInspectable const &value)
static T | GetDefaultValue ()

Detailed Description

template<typename T>
struct ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > >

Definition at line 79 of file CppWinRTHelpers.h.

Member Function Documentation

static winrt::IInspectable BoxedDefaultValue ( ) [inline, static]

Definition at line 96 of file CppWinRTHelpers.h.

    {
        return GetDefaultValue();
    }

static winrt::IInspectable BoxValueIfNecessary ( T const & value ) [inline, static]

Definition at line 86 of file CppWinRTHelpers.h.

    {
        return value;
    }

static T CastOrUnbox ( winrt::IInspectable const & value ) [inline, static]

Definition at line 91 of file CppWinRTHelpers.h.

    {
        return value.as<T>();
    }

static T GetDefaultValue ( ) [inline, static]

Definition at line 81 of file CppWinRTHelpers.h.

    {
        return T{ nullptr };
    }

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ValueHelper< winrt::hstring, void > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

ValueHelper< winrt::hstring, void > Struct Template Reference

#include "CppWinRTHelpers.h"

List of all members.

Static Public Member Functions

static winrt::IInspectable | BoxedDefaultValue ()
static winrt::IInspectable | BoxValueIfNecessary (winrt::hstring const &value)
static winrt::hstring | CastOrUnbox (winrt::IInspectable const &value)
static winrt::hstring | GetDefaultValue ()

Detailed Description

template<>
struct ValueHelper< winrt::hstring, void >

Definition at line 103 of file CppWinRTHelpers.h.

Member Function Documentation

static winrt::IInspectable BoxedDefaultValue ( ) [inline, static]

Definition at line 120 of file CppWinRTHelpers.h.

    {
        return winrt::box_value(L"");
    }

static winrt::IInspectable BoxValueIfNecessary ( winrt::hstring const & value ) [inline, static]

Definition at line 110 of file CppWinRTHelpers.h.

    {
        return winrt::box_value(value);
    }

static winrt::hstring CastOrUnbox ( winrt::IInspectable const & value ) [inline, static]

Definition at line 115 of file CppWinRTHelpers.h.

    {
        return winrt::unbox_value<winrt::hstring>(value);
    }

static winrt::hstring GetDefaultValue ( ) [inline, static]

Definition at line 105 of file CppWinRTHelpers.h.

    {
        return winrt::hstring{ L"" };
    }

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ValueProviderThunk< Owner > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ValueProviderThunk< Owner > Struct Template Reference

#include "RatingControlAutomationPeer.h"

List of all members.

Public Member Functions

bool | IsReadOnly ()
void | SetValue (hstring const &value)
hstring | Value ()

Detailed Description

template<typename Owner>
struct ValueProviderThunk< Owner >

Definition at line 12 of file RatingControlAutomationPeer.h.

Member Function Documentation

bool IsReadOnly ( ) [inline]

Definition at line 14 of file RatingControlAutomationPeer.h.

{ return static_cast<Owner*>(this)->IsReadOnly(); }

void SetValue ( hstring const & value ) [inline]

Definition at line 16 of file RatingControlAutomationPeer.h.

{ static_cast<Owner*>(this)->SetValue(value); }

hstring Value ( ) [inline]

Definition at line 15 of file RatingControlAutomationPeer.h.

{ return static_cast<Owner*>(this)->IValueProvider_Value(); }

The documentation for this struct was generated from the following file:
  • RatingControl/RatingControlAutomationPeer.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Vector< T, flags, Helper > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

Vector< T, flags, Helper > Class Template Reference

#include "Vector.h"

Inherits VectorBase< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >.

List of all members.

Public Member Functions

Vector ()
Vector (std::function< int(typename T const &value)> indexOfFunction)
Vector (uint32_t capacity)

Private Member Functions

bool CustomIndexOf (T const &value, uint32_t &index)

Detailed Description

template<typename T, int flags = MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>(), typename Helper = VectorFlagHelper<flags>>
class Vector< T, flags, Helper >

Definition at line 684 of file Vector.h.

Constructor & Destructor Documentation

Vector ( ) [inline]

Definition at line 688 of file Vector.h.

{}

Vector ( uint32_t capacity ) [inline]

Definition at line 689 of file Vector.h.

: VectorBase<T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef>(capacity) {}

Vector ( std::function< int(typename T const &value)> indexOfFunction ) [inline]

Definition at line 704 of file Vector.h.

                                                                      : m_indexOfFunction(indexOfFunction)
    {
        if (m_indexOfFunction)
        {
            this->SetCustomIndexOfFunction(
                [this](T const& value, uint32_t& index) {
                return CustomIndexOf(value, index);
            });
        }
    }

Member Function Documentation

bool CustomIndexOf | ( | T const & | value,
 |  | uint32_t & | index |
 | ) |  |  | [inline, private]

Definition at line 716 of file Vector.h.

    {
        if (m_indexOfFunction)
        {
            auto delegateIndex = m_indexOfFunction(value);
            if (delegateIndex != -1)
            {
                index = static_cast<uint32_t>(delegateIndex);
                return true;
            }
        }
        return false;
    }

The documentation for this class was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions | Protected Attributes | Private Member Functions

VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > Class Template Reference

#include "Vector.h"

Inherits ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > >.

List of all members.

Protected Member Functions

void SetCustomIndexOfFunction (std::function< bool(T const &value, uint32_t &index)> indexOfFunction)

Protected Attributes

virtual std::function< bool(T
const &value, uint32_t &index)> 		GetCustomIndexOfFunction ()

Private Member Functions

VectorBase (uint32_t capacity)
Implement_Vector (Options) public

Detailed Description

template<typename T, bool isObservable, bool isBindable, bool isDependencyObjectBase, bool isNoTrackerRef, typename Options = VectorOptions<T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef>>
class VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >

Definition at line 650 of file Vector.h.

Constructor & Destructor Documentation

VectorBase ( uint32_t capacity ) [inline, private]

Definition at line 665 of file Vector.h.

                                  : VectorBase()
    {
        GetVectorInnerImpl()->reserve(capacity);
    }

Member Function Documentation

Implement_Vector ( Options ) [inline, private]

Definition at line 658 of file Vector.h.

      :
    VectorBase()
    {
    }

void SetCustomIndexOfFunction ( std::function< bool(T const &value, uint32_t &index)> indexOfFunction ) [inline, protected]

Definition at line 671 of file Vector.h.

    {
        m_indexOfFunction = indexOfFunction;
    }

Member Data Documentation

virtual std::function<bool(T const& value, uint32_t& index)> GetCustomIndexOfFunction() [inline, protected]

Definition at line 675 of file Vector.h.

{ return m_indexOfFunction; };

The documentation for this class was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorChangedEventArgs Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

VectorChangedEventArgs Class Reference

#include "VectorChangedEventArgs.h"

List of all members.

Public Member Functions

VectorChangedEventArgs (winrt::CollectionChange action, unsigned int index)
winrt::CollectionChange | CollectionChange ()
uint32_t | Index ()

Private Attributes

winrt::CollectionChange | m_action
unsigned int | m_index

Detailed Description

Definition at line 5 of file VectorChangedEventArgs.h.

Constructor & Destructor Documentation

VectorChangedEventArgs | ( | winrt::CollectionChange | action,
 |  | unsigned int | index |
 | ) |  |  | [inline]

Definition at line 8 of file VectorChangedEventArgs.h.

    {
        m_action = action;
        m_index = index;
    }

Member Function Documentation

winrt::CollectionChange CollectionChange ( ) [inline]

Definition at line 14 of file VectorChangedEventArgs.h.

{ return m_action; }

uint32_t Index ( ) [inline]

Definition at line 15 of file VectorChangedEventArgs.h.

{ return m_index; }

Member Data Documentation

winrt::CollectionChange m_action [private]

Definition at line 18 of file VectorChangedEventArgs.h.

unsigned int m_index [private]

Definition at line 19 of file VectorChangedEventArgs.h.

The documentation for this class was generated from the following file:
  • Collections/VectorChangedEventArgs.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorFlagHelper< flag > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Attributes

VectorFlagHelper< flag > Struct Template Reference

#include "Vector.h"

List of all members.

Static Public Attributes

static constexpr bool | isBindable = !!(flag & static_cast<int>(VectorFlag::Bindable))
static constexpr bool | isDependencyObjectBase = !!(flag & static_cast<int>(VectorFlag::DependencyObjectBase))
static constexpr bool | isNoTrackerRef = !!(flag & static_cast<int>(VectorFlag::NoTrackerRef))
static constexpr bool | isObservable = !!(flag & static_cast<int>(VectorFlag::Observable))

Detailed Description

template<int flag>
struct VectorFlagHelper< flag >

Definition at line 43 of file Vector.h.

Member Data Documentation

constexpr bool isBindable = !!(flag & static_cast<int>(VectorFlag::Bindable)) [static]

Definition at line 47 of file Vector.h.

constexpr bool isDependencyObjectBase = !!(flag & static_cast<int>(VectorFlag::DependencyObjectBase)) [static]

Definition at line 46 of file Vector.h.

constexpr bool isNoTrackerRef = !!(flag & static_cast<int>(VectorFlag::NoTrackerRef)) [static]

Definition at line 48 of file Vector.h.

constexpr bool isObservable = !!(flag & static_cast<int>(VectorFlag::Observable)) [static]

Definition at line 45 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorInnerImpl< VectorOptions, Wrapper > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

VectorInnerImpl< VectorOptions, Wrapper > Struct Template Reference

#include "Vector.h"

Inherited by ObservableVectorInnerImpl< VectorOptions, Wrapper >.

List of all members.

Public Member Functions

VectorInnerImpl (ITrackerHandleManager *trackerHandleManager)
void | Append (typename T_type const &value)
void | Clear ()
T_type | GetAt (uint32_t const index)
uint32_t | GetMany (uint32_t const startIndex, winrt::array_view< T_type > values)
bool | IndexOf (typename T_type const &value, uint32_t &index)
bool | IndexOf_OptimizedForRemove (typename T_type const &value, uint32_t &index)
void | InsertAt (uint32_t const index, typename T_type const &value)
virtual void | RaiseChildrenChanged (winrt::CollectionChange collectionChange, unsigned int index)
void | RemoveAt (uint32_t const index)
void | RemoveAtEnd ()
void | ReplaceAll (winrt::array_view< T_type const > values)
void | reserve (unsigned int n)
T_type | SafeGetAt (uint32_t const index)
void | SetAt (uint32_t const index, typename T_type const &value)
uint32_t | Size ()

Protected Member Functions

ITrackerHandleManager * GetTrackerHandlerManager ()
T_type | unwrap (T_Storage const &hold, bool useSafeGet=false)
T_Storage | wrap (typename T_type value)

Protected Attributes

unsigned int | m_optimizedIndexOf_StartNextSearchAt = 0
std::vector< T_Storage > | m_vector

Private Member Functions

T_type | GetAt (uint32_t const index, bool useSafeGet)

Detailed Description

template<typename VectorOptions, typename Wrapper>
struct VectorInnerImpl< VectorOptions, Wrapper >

Definition at line 156 of file Vector.h.

Constructor & Destructor Documentation

VectorInnerImpl ( ITrackerHandleManager * trackerHandleManager ) [inline]

Definition at line 174 of file Vector.h.

    {
        m_trackerHandleManager = trackerHandleManager;
    }

Member Function Documentation

void Append ( typename T_type const & value ) [inline]

Definition at line 206 of file Vector.h.

    {
        m_vector.push_back(wrap(value));
        RaiseChildrenChanged(winrt::CollectionChange::ItemInserted, static_cast<uint32_t>(m_vector.size()) - 1);
    }

void Clear ( ) [inline]

Definition at line 330 of file Vector.h.

    {
        m_vector.clear();
        RaiseChildrenChanged(winrt::CollectionChange::Reset, 0u);
    }

T_type GetAt | ( | uint32_t const | index,
 |  | bool | useSafeGet |
 | ) |  |  | [inline, private]

Definition at line 161 of file Vector.h.

    {
        if (index < static_cast<uint32_t>(m_vector.size()))
        {
            return unwrap(m_vector[index], useSafeGet);
        }
        else
        {
            throw winrt::hresult_out_of_bounds();
        }
    }

T_type GetAt ( uint32_t const index ) [inline]

Definition at line 183 of file Vector.h.

    {
        return GetAt(index, false);
    }

uint32_t GetMany | ( | uint32_t const | startIndex,
 |  | winrt::array_view< T_type > | values |
 | ) |  |  | [inline]

Definition at line 273 of file Vector.h.

    {
        if (startIndex >= m_vector.size())
        {
            return 0;
        }

        uint32_t actual = static_cast<uint32_t>(m_vector.size() - startIndex);

        if (actual > values.size())
        {
            actual = values.size();
        }

        for (uint32_t i = 0; i < actual; i++)
        {
            values[i] = GetAt(startIndex + i);
        }
        return actual;
    }

ITrackerHandleManager* GetTrackerHandlerManager ( ) [inline, protected]

Definition at line 351 of file Vector.h.

{ return m_trackerHandleManager; }

bool IndexOf | ( | typename T_type const & | value,
 |  | uint32_t & | index |
 | ) |  |  | [inline]

Definition at line 212 of file Vector.h.

    {
        index = 0;

        auto it = std::find(m_vector.begin(), m_vector.end(), wrap(value));

        if (it != m_vector.end())
        {
            index = (uint32_t)(it - m_vector.begin());
            return true;
        }
        return false;
    }

bool IndexOf_OptimizedForRemove | ( | typename T_type const & | value,
 |  | uint32_t & | index |
 | ) |  |  | [inline]

Definition at line 226 of file Vector.h.

    {
        index = 0;

        if (m_optimizedIndexOf_StartNextSearchAt >= m_vector.size())
        {
            if (m_vector.size() == 0)
            {
                m_optimizedIndexOf_StartNextSearchAt = 0;
            }
            else
            {
                m_optimizedIndexOf_StartNextSearchAt = static_cast<unsigned int>(m_vector.size() - 1);
            }
        }

        const auto& searchFor = wrap(value);

        auto it = std::find(m_vector.begin() + m_optimizedIndexOf_StartNextSearchAt, m_vector.end(), searchFor);
        bool found = (it != m_vector.end());
        if (!found && m_optimizedIndexOf_StartNextSearchAt > 0)
        {
            // Note: if std::find fails, it returns the second iterator and not always the end of the vector.
            it = std::find(m_vector.begin(), m_vector.begin() + m_optimizedIndexOf_StartNextSearchAt, searchFor);
            found = (it != m_vector.begin() + m_optimizedIndexOf_StartNextSearchAt);
        }

        if (found)
        {
            index = (uint32_t)(it - m_vector.begin());
            if (index > 0)
            {
                // Next time we search start near this index. We assume that the remove is being processed from the end
                // of the vector towards index 0, so the next item being removed is probably at "index - 1". Start the
                // next search there.
                m_optimizedIndexOf_StartNextSearchAt = index - 1;
            }
            else
            {
                m_optimizedIndexOf_StartNextSearchAt = index;
            }
            return true;
        }

        return false;
    }

void InsertAt | ( | uint32_t const | index,
 |  | typename T_type const & | value |
 | ) |  |  | [inline]

Definition at line 294 of file Vector.h.

    {
        if (index <= static_cast<uint32_t>(m_vector.size()))
        {
            m_vector.insert(m_vector.begin() + index, wrap(value));
            RaiseChildrenChanged(winrt::CollectionChange::ItemInserted, index);
        }
        else
        {
            throw winrt::hresult_out_of_bounds();
        }

    }

virtual void RaiseChildrenChanged | ( | winrt::CollectionChange | collectionChange,
 |  | unsigned int | index |
 | ) |  |  | [inline, virtual]

Reimplemented in ObservableVectorInnerImpl< VectorOptions, Wrapper >.

Definition at line 345 of file Vector.h.

{};

void RemoveAt ( uint32_t const index ) [inline]

Definition at line 308 of file Vector.h.

    {
        if (index < static_cast<uint32_t>(m_vector.size()))
        {
            m_vector.erase(m_vector.begin() + index);
            RaiseChildrenChanged(winrt::CollectionChange::ItemRemoved, index);
        }
        else
        {
            throw winrt::hresult_out_of_bounds();
        }
    }

void RemoveAtEnd ( ) [inline]

Definition at line 321 of file Vector.h.

    {
        if (!m_vector.empty())
        {
            m_vector.pop_back();
            RaiseChildrenChanged(winrt::CollectionChange::ItemRemoved, static_cast<uint32_t>(m_vector.size()));
        }
    }

void ReplaceAll ( winrt::array_view< T_type const > values ) [inline]

Definition at line 336 of file Vector.h.

    {
        Clear();
        for (auto value : values)
        {
            Append(value);
        }
    }

void reserve ( unsigned int n ) [inline]

Definition at line 347 of file Vector.h.

{ m_vector.reserve(n); }

T_type SafeGetAt ( uint32_t const index ) [inline]

Definition at line 188 of file Vector.h.

    {
        return GetAt(index, true);
    }

void SetAt | ( | uint32_t const | index,
 |  | typename T_type const & | value |
 | ) |  |  | [inline]

Definition at line 193 of file Vector.h.

    {
        if (index < static_cast<uint32_t>(m_vector.size()))
        {
            m_vector[index] = wrap(value);
            RaiseChildrenChanged(winrt::CollectionChange::ItemChanged, index);
        }
        else
        {
            throw winrt::hresult_out_of_bounds();
        }
    }

uint32_t Size ( ) [inline]

Definition at line 178 of file Vector.h.

    {
        return static_cast<uint32_t>(m_vector.size());
    }

T_type unwrap | ( | T_Storage const & | hold,
 |  | bool | useSafeGet = false |
 | ) |  |  | [inline, protected]

Definition at line 356 of file Vector.h.

    {
        return Wrapper::unwrap(hold, useSafeGet);
    }

T_Storage wrap ( typename T_type value ) [inline, protected]

Definition at line 352 of file Vector.h.

    {
        return Wrapper::wrap(value, GetTrackerHandlerManager());
    }

Member Data Documentation

unsigned int m_optimizedIndexOf_StartNextSearchAt = 0 [protected]

Definition at line 391 of file Vector.h.

std::vector<T_Storage> m_vector [protected]

Definition at line 361 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorInterfaceHelper< T, isBindable > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorInterfaceHelper< T, isBindable > Struct Template Reference

#include "Vector.h"

Inherited by VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >.

Detailed Description

template<typename T, bool isBindable>
struct VectorInterfaceHelper< T, isBindable >

Definition at line 438 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorInterfaceHelper< T, true > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorInterfaceHelper< T, true > Struct Template Reference

#include "Vector.h"

Detailed Description

template<typename T>
struct VectorInterfaceHelper< T, true >

Definition at line 448 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorIterator< T, isBindable, isDependencyObjectBase, Traits > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

VectorIterator< T, isBindable, isDependencyObjectBase, Traits > Class Template Reference

#include "VectorIterator.h"

Inherits ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type >.

List of all members.

Public Member Functions

VectorIterator (typename Traits::VectorType const &vector)
T | Current ()
uint32_t | GetMany (winrt::array_view< T > values)
bool | HasCurrent ()
bool | MoveNext ()

Detailed Description

template<typename T, bool isBindable = false, bool isDependencyObjectBase = true, typename Traits = VectorIteratorTraits<T, isBindable, isDependencyObjectBase>>
class VectorIterator< T, isBindable, isDependencyObjectBase, Traits >

Definition at line 40 of file VectorIterator.h.

Constructor & Destructor Documentation

VectorIterator ( typename Traits::VectorType const & vector ) [inline]

Definition at line 46 of file VectorIterator.h.

    {
        m_vector.set(vector);
    }

Member Function Documentation

T Current ( ) [inline]

Definition at line 51 of file VectorIterator.h.

    {
        return m_vector.get().GetAt(m_currentIndex);
    }

uint32_t GetMany ( winrt::array_view< T > values ) [inline]

Definition at line 68 of file VectorIterator.h.

    {
        uint32_t howMany = 0;
        if (HasCurrent())
        {
            do
            {
                if (howMany >= values.size()) break;

                values[howMany] = Current();
                howMany++;
            } while (MoveNext());
        }

        return howMany;
    }

bool HasCurrent ( ) [inline]

Definition at line 56 of file VectorIterator.h.

    {
        const uint32_t size = m_vector.get().Size();
        return m_currentIndex < size;
    }

bool MoveNext ( ) [inline]

Definition at line 62 of file VectorIterator.h.

    {
        ++m_currentIndex;
        return HasCurrent();
    }

The documentation for this class was generated from the following file:
  • Collections/VectorIterator.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorIteratorTraits< T, isBindable, isDependencyObjectBase > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorIteratorTraits< T, isBindable, isDependencyObjectBase > Struct Template Reference

#include "VectorIterator.h"

Inherits ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase >.

Detailed Description

template<typename T, bool isBindable, bool isDependencyObjectBase>
struct VectorIteratorTraits< T, isBindable, isDependencyObjectBase >

Definition at line 22 of file VectorIterator.h.

The documentation for this struct was generated from the following file:
  • Collections/VectorIterator.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorIteratorTraits< T, true, isDependencyObjectBase > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorIteratorTraits< T, true, isDependencyObjectBase > Struct Template Reference

#include "VectorIterator.h"

Inherits ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase >.

Detailed Description

template<typename T, bool isDependencyObjectBase>
struct VectorIteratorTraits< T, true, isDependencyObjectBase >

Definition at line 30 of file VectorIterator.h.

The documentation for this struct was generated from the following file:
  • Collections/VectorIterator.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > Struct Template Reference

#include "Vector.h"

Inherits VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >.

List of all members.

Detailed Description

template<typename T, bool isObservable, bool isBindable, bool isDependencyObjectBase, bool isNoTrackerRef>
struct VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >

Definition at line 495 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IVectorOwner Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IVectorOwner Class Reference

Inherited by VectorBase< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >, and VectorBase< winrt::IInspectable, Helper::isObservable, true, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >.

The documentation for this class was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef > Struct Template Reference

#include "Vector.h"

Inherits VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef >.

List of all members.

Detailed Description

template<typename T, bool isObservable, bool isDependencyObjectBase, bool isNoTrackerRef>
struct VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef >

Definition at line 500 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Attributes

VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > Struct Template Reference

#include "Vector.h"

Inherits VectorInterfaceHelper< T, isBindable >, and ComposableBasePointersImplTType< isDependencyObjectBase >.

Inherited by VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >, and VectorOptions< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >.

List of all members.

Static Public Attributes

static constexpr bool | Bindable = isBindable
static constexpr bool | DependencyObjectBase = isDependencyObjectBase
static constexpr bool | NoTrackRef = isNoTrackerRef
static constexpr bool | Observable = isObservable

Detailed Description

template<typename T, bool isObservable, bool isBindable, bool isDependencyObjectBase, bool isNoTrackerRef = false>
struct VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >

Definition at line 477 of file Vector.h.

Member Data Documentation

constexpr bool Bindable = isBindable [static]

Definition at line 479 of file Vector.h.

constexpr bool DependencyObjectBase = isDependencyObjectBase [static]

Definition at line 481 of file Vector.h.

constexpr bool NoTrackRef = isNoTrackerRef [static]

Definition at line 482 of file Vector.h.

constexpr bool Observable = isObservable [static]

Definition at line 480 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VectorOptionsFromFlag< T, flag, Helper > Struct Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorOptionsFromFlag< T, flag, Helper > Struct Template Reference

#include "Vector.h"

Inherits VectorOptions< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >.

List of all members.

Detailed Description

template<typename T, int flag, typename Helper = VectorFlagHelper<flag>>
struct VectorOptionsFromFlag< T, flag, Helper >

Definition at line 506 of file Vector.h.

The documentation for this struct was generated from the following file:
  • Collections/Vector.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewChange Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ViewChange Class Reference

#include "ViewChange.h"

Inherits ViewChangeBase.

Inherited by OffsetsChange, and ZoomFactorChange.

List of all members.

Public Member Functions

ViewChange (ScrollPresenterViewKind viewKind, winrt::IInspectable const &options)
~ViewChange ()
winrt::IInspectable | Options () const
ScrollPresenterViewKind | ViewKind () const

Detailed Description

Definition at line 17 of file ViewChange.h.

Constructor & Destructor Documentation

ViewChange | ( | ScrollPresenterViewKind | viewKind,
 |  | winrt::IInspectable const & | options
 | ) |  |

Definition at line 10 of file ViewChange.cpp.

    : m_viewKind(viewKind)
    , m_options(options)
{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR_STR, METH_NAME, this,
        options,
        TypeLogging::ScrollPresenterViewKindToString(viewKind).c_str());
}

~ViewChange ( )

Definition at line 21 of file ViewChange.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

winrt::IInspectable Options ( ) const [inline]

Definition at line 30 of file ViewChange.h.

    {
        return m_options;
    }

ScrollPresenterViewKind ViewKind ( ) const [inline]

Definition at line 25 of file ViewChange.h.

    {
        return m_viewKind;
    }

The documentation for this class was generated from the following files:
  • ScrollPresenter/ViewChange.h
  • ScrollPresenter/ViewChange.cpp
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewChangeBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewChangeBase Class Reference

#include "ViewChangeBase.h"

Inherited by OffsetsChangeWithAdditionalVelocity, ViewChange, and ZoomFactorChangeWithAdditionalVelocity.

Detailed Description

Definition at line 13 of file ViewChangeBase.h.

The documentation for this class was generated from the following file:
  • ScrollPresenter/ViewChangeBase.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewModel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

ViewModel Class Reference

#include "ViewModel.h"

Inherits ReferenceTracker< ViewModel, reference_tracker_implements_t< ViewModelVectorOptions::VectorType >::type, ViewModelVectorOptions::IterableType, ViewModelVectorOptions::ObservableVectorType >.

List of all members.

Public Member Functions

void | Append (winrt::IInspectable const &value)
void | Clear ()
winrt::TreeViewNode | GetAssociatedNode (winrt::IInspectable item)
winrt::IInspectable | GetAt (uint32_t index)
uint32_t | GetMany (uint32_t const startIndex, winrt::array_view< winrt::IInspectable > values)
winrt::IVector
< winrt::IInspectable > 		GetSelectedItems ()
winrt::IVector
< winrt::TreeViewNode > 		GetSelectedNodes ()
winrt::IVectorView
< winrt::IInspectable > 		GetView ()
bool | IndexOf (winrt::IInspectable const &value, uint32_t &index)
void | InsertAt (uint32_t index, winrt::IInspectable const &value)
bool | IsInSingleSelectionMode ()
bool | IsNodeSelected (winrt::TreeViewNode const &targetNode)
winrt::TreeViewList | ListControl ()
TreeNodeSelectionState | NodeSelectionState (winrt::TreeViewNode const &targetNode)
void | NotifyContainerOfSelectionChange (winrt::TreeViewNode const &targetNode, TreeNodeSelectionState const &selectionState)
void | PrepareView (winrt::TreeViewNode const &originNode)
void | RemoveAt (uint32_t index)
void | RemoveAtEnd ()
void | ReplaceAll (winrt::array_view< winrt::IInspectable const > items)
void | SelectedNodeChildrenChanged (const winrt::TreeViewNode &sender, const winrt::IInspectable &args)
void | SetAt (uint32_t index, winrt::IInspectable const &value)
void | SetOwners (winrt::TreeViewList const &owningList, winrt::TreeView const &owningTreeView)
uint32_t | Size ()
void | TrackItemSelected (winrt::IInspectable item)
void | TrackItemUnselected (winrt::IInspectable item)
void | TreeViewNodeHasChildrenPropertyChanged (winrt::TreeViewNode const &sender, winrt::IDependencyPropertyChangedEventArgs const &args)
void | TreeViewNodeIsExpandedPropertyChanged (winrt::TreeViewNode const &sender, winrt::IDependencyPropertyChangedEventArgs const &args)
void | TreeViewNodePropertyChanged (winrt::TreeViewNode const &sender, winrt::IDependencyPropertyChangedEventArgs const &args)
void | TreeViewNodeVectorChanged (const winrt::TreeViewNode &sender, const winrt::IInspectable &args)
void | UpdateSelection (winrt::TreeViewNode const &selectNode, TreeNodeSelectionState const &selectionState)

Private Member Functions

Implement_IObservable(ViewModelVectorOptions)
Implement_Vector_External(ViewModelVectorOptions)
Implement_IIterator(ViewModelVectorOptions)
public 		~ViewModel ()
int | AddNodeDescendantsToView (const winrt::TreeViewNode &value, unsigned int index, int offset)
void | AddNodeToView (const winrt::TreeViewNode &value, unsigned int index)
void | BeginSelectionChanges ()
void | ClearEventTokenVectors ()
void | CollapseNode (const winrt::TreeViewNode &value)
int | CountDescendants (const winrt::TreeViewNode &value)
void | EndSelectionChanges ()
void | ExpandNode (const winrt::TreeViewNode &value)
unsigned int | GetExpandedDescendantCount (winrt::TreeViewNode const &parentNode)
int | GetNextIndexInFlatTree (winrt::TreeViewNode const &indexNode)
winrt::TreeViewNode | GetNodeAt (uint32_t index)
winrt::TreeViewNode | GetRemovedChildTreeViewNodeByIndex (winrt::TreeViewNode const &node, unsigned int childIndex)
unsigned int | IndexOfNextSibling (winrt::TreeViewNode const &childNode)
bool | IndexOfNode (winrt::TreeViewNode const &targetNode, uint32_t &index)
bool | IsContentMode ()
void | IsContentMode (const bool value)
winrt::event_token | NodeCollapsed (const winrt::TypedEventHandler< winrt::TreeViewNode, winrt::IInspectable > &handler)
void | NodeCollapsed (const winrt::event_token token)
winrt::event_token | NodeExpanding (const winrt::TypedEventHandler< winrt::TreeViewNode, winrt::IInspectable > &handler)
void | NodeExpanding (const winrt::event_token token)
void | RemoveNodeAndDescendantsFromView (const winrt::TreeViewNode &value)
void | RemoveNodesAndDescendentsWithFlatIndexRange (unsigned int startIndex, unsigned int stopIndex)
void | SelectAll ()
void | SelectByIndex (int index, TreeNodeSelectionState const &state)
TreeNodeSelectionState | SelectionStateBasedOnChildren (winrt::TreeViewNode const &node)
void | SelectNode (const winrt::TreeViewNode &node, bool isSelected)
void | SelectSingleItem (winrt::IInspectable const &item)
void | UpdateNodeSelection (winrt::TreeViewNode const &selectNode, TreeNodeSelectionState const &selectionState)
void | UpdateSelectionStateOfAncestors (winrt::TreeViewNode const &targetNode)
void | UpdateSelectionStateOfDescendants (winrt::TreeViewNode const &targetNode, TreeNodeSelectionState const &selectionState)

Private Attributes

std::vector< winrt::weak_ref
< winrt::IInspectable > > 		m_addedSelectedItems
std::vector< winrt::event_token > | m_collectionChangedEventTokenVector
std::vector< winrt::event_token > | m_IsExpandedChangedEventTokenVector
std::vector< winrt::IInspectable > | m_removedSelectedItems
winrt::event_token | m_rootNodeChildrenChangedEventToken
std::vector< winrt::event_token > | m_selectedNodeChildrenChangedEventTokenVector

Detailed Description

Definition at line 11 of file ViewModel.h.

Constructor & Destructor Documentation

~ViewModel ( ) [private]

Definition at line 251 of file ViewModel.cpp.

{
    if (m_rootNodeChildrenChangedEventToken.value != 0)
    {
        if (auto origin = m_originNode.safe_get())
        {
            winrt::get_self<TreeViewNode>(origin)->ChildrenChanged(m_rootNodeChildrenChangedEventToken);
        }

        ClearEventTokenVectors();
    }
}

Member Function Documentation

int AddNodeDescendantsToView | ( | const winrt::TreeViewNode & | value,
 |  | unsigned int | index,
 |  | int | offset |
 | ) |  |  | [private]

Definition at line 581 of file ViewModel.cpp.

{
    if (value.IsExpanded())
    {
        unsigned int size = value.Children().Size();
        for (unsigned int i = 0; i < size; i++)
        {
            auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>();
            offset++;
            AddNodeToView(childNode, offset + index);
            offset = AddNodeDescendantsToView(childNode, index, offset);
        }

        return offset;
    }

    return offset;
}

void AddNodeToView | ( | const winrt::TreeViewNode & | value,
 |  | unsigned int | index |
 | ) |  |  | [private]

Definition at line 576 of file ViewModel.cpp.

{
    InsertAt(index, value);
}

void Append ( winrt::IInspectable const & value )

Definition at line 483 of file ViewModel.cpp.

{
    GetVectorInnerImpl()->Append(value);
    winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>();

    // Hook up events and save tokens
    auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode);
    m_collectionChangedEventTokenVector.push_back(tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged }));
    m_IsExpandedChangedEventTokenVector.push_back(tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged }));
}

void BeginSelectionChanges ( ) [private]

Definition at line 351 of file ViewModel.cpp.

{
    if (!IsInSingleSelectionMode())
    {
        m_selectionTrackingCounter++;
        if (m_selectionTrackingCounter == 1) {
            m_addedSelectedItems.clear();
            m_removedSelectedItems.clear();
        }
    }
}

void Clear ( )

Definition at line 510 of file ViewModel.cpp.

{
    // Don't call GetVectorInnerImpl()->Clear() directly because we need to remove hooked events
    unsigned int count = Size();
    while (count != 0)
    {
        RemoveAtEnd();
        count--;
    }
}

void ClearEventTokenVectors ( ) [private]

Definition at line 1180 of file ViewModel.cpp.

{
    // Remove ChildrenChanged and ExpandedChanged events
    auto inner = GetVectorInnerImpl();
    for (uint32_t i =0 ; i < Size(); i++)
    {
        if (auto current = inner->SafeGetAt(i))
        {
            auto tvnCurrent = winrt::get_self<TreeViewNode>(current.as<winrt::TreeViewNode>());
            tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector.at(i));
            tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector.at(i));
        }
    }

    // Remove SelectedNodeChildrenChangedEvent
    if (auto selectedNodes = m_selectedNodes.safe_get())
    {
        for (uint32_t i = 0; i < selectedNodes.Size(); i++)
        {
            if (auto current = selectedNodes.GetAt(i))
            {
                auto node = winrt::get_self<TreeViewNode>(current.as<winrt::TreeViewNode>());
                node->ChildrenChanged(m_selectedNodeChildrenChangedEventTokenVector[i]);
            }
        }
    }

    // Clear token vectors
    m_collectionChangedEventTokenVector.clear();
    m_IsExpandedChangedEventTokenVector.clear();
    m_selectedNodeChildrenChangedEventTokenVector.clear();
}

void CollapseNode ( const winrt::TreeViewNode & value ) [private]

Definition at line 269 of file ViewModel.cpp.

{
    value.IsExpanded(false);
}

int CountDescendants ( const winrt::TreeViewNode & value ) [private]

Definition at line 668 of file ViewModel.cpp.

{
    int descendantCount = 0;
    unsigned int size = value.Children().Size();
    for (unsigned int i = 0; i < size; i++)
    {
        auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>();
        descendantCount++;
        if (childNode.IsExpanded())
        {
            descendantCount = descendantCount + CountDescendants(childNode);
        }
    }

    return descendantCount;
}

void EndSelectionChanges ( ) [private]

Definition at line 363 of file ViewModel.cpp.

{
    if (!IsInSingleSelectionMode())
    {
        m_selectionTrackingCounter--;
        if (m_selectionTrackingCounter == 0 && (m_addedSelectedItems.size() > 0 || m_removedSelectedItems.size() > 0)) {
            auto treeView = winrt::get_self<TreeView>(m_TreeView.get());

            auto added = winrt::make<Vector<winrt::IInspectable>>();
            for (unsigned int i = 0; i < m_addedSelectedItems.size(); i++)
            {
                added.Append(m_addedSelectedItems.at(i).get());
            }
            auto removed = winrt::make<Vector<winrt::IInspectable>>();
            for (unsigned int i = 0; i < m_removedSelectedItems.size(); i++)
            {
                removed.Append(m_removedSelectedItems.at(i));
            }
            treeView->RaiseSelectionChanged(added, removed);
        }
    }
}

void ExpandNode ( const winrt::TreeViewNode & value ) [private]

Definition at line 264 of file ViewModel.cpp.

{
    value.IsExpanded(true);
}

winrt::TreeViewNode GetAssociatedNode ( winrt::IInspectable item )

Definition at line 902 of file ViewModel.cpp.

{
    if(auto treeView = m_TreeView.get())
    {
        if(auto treeViewImpl = winrt::get_self<TreeView>(treeView))
        {
            return treeViewImpl->GetAssociatedNode(item);
        }
    }

    return nullptr;
}

winrt::IInspectable GetAt ( uint32_t index )

Definition at line 392 of file ViewModel.cpp.

{
    winrt::TreeViewNode node = GetNodeAt(index);
    return IsContentMode() ? node.Content() : node;
}

unsigned int GetExpandedDescendantCount ( winrt::TreeViewNode const & parentNode ) [private]

Definition at line 721 of file ViewModel.cpp.

{
    unsigned int allOpenedDescendantsCount = 0;
    for (unsigned int i = 0; i < parentNode.Children().Size(); i++)
    {
        auto childNode = parentNode.Children().GetAt(i).as<winrt::TreeViewNode>();
        allOpenedDescendantsCount++;
        if (childNode.IsExpanded())
        {
            allOpenedDescendantsCount += CountDescendants(childNode);
        }
    }
    return allOpenedDescendantsCount;
}

uint32_t GetMany | ( | uint32_t const | startIndex,
 |  | winrt::array_view< winrt::IInspectable > | values
 | ) |  |

Definition at line 411 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    if (IsContentMode())
    {
        auto vector = winrt::make<Vector<winrt::IInspectable>>();
        const int size = Size();
        for (int i = 0; i < size; i++)
        {
            vector.Append(GetNodeAt(i).Content());
        }
        return vector.GetMany(startIndex, values);
    }
    return inner->GetMany(startIndex, values);
}

int GetNextIndexInFlatTree ( winrt::TreeViewNode const & indexNode ) [private]

Definition at line 630 of file ViewModel.cpp.

{
    unsigned int index = 0;
    const bool isNodeInFlatList = IndexOfNode(node, index);

    if (isNodeInFlatList)
    {
        index++;
    }
    else
    {
        // node is Root node, so next index in flat tree is 0
        index = 0;
    }
    return index;
}

winrt::TreeViewNode GetNodeAt ( uint32_t index ) [private]

Definition at line 432 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    return inner->GetAt(index).as<winrt::TreeViewNode>();
}

winrt::TreeViewNode GetRemovedChildTreeViewNodeByIndex | ( | winrt::TreeViewNode const & | node,
 |  | unsigned int | childIndex |
 | ) |  |  | [private]

Definition at line 652 of file ViewModel.cpp.

{
    unsigned int allOpenedDescendantsCount = 0;
    for (unsigned int i = 0; i < childIndex; i++)
    {
        winrt::TreeViewNode calcNode = node.Children().GetAt(i).as<winrt::TreeViewNode>();
        if (calcNode.IsExpanded())
        {
            allOpenedDescendantsCount += GetExpandedDescendantCount(calcNode);
        }
    }

    const unsigned int childIndexInFlatTree = GetNextIndexInFlatTree(node) + childIndex + allOpenedDescendantsCount;
    return GetNodeAt(childIndexInFlatTree);
}

winrt::IVector< winrt::IInspectable > GetSelectedItems ( )

Definition at line 881 of file ViewModel.cpp.

{
    return m_selectedItems.get();
}

winrt::IVector< winrt::TreeViewNode > GetSelectedNodes ( )

Definition at line 876 of file ViewModel.cpp.

{
    return m_selectedNodes.get();
}

winrt::IVectorView< winrt::IInspectable > GetView ( )

Definition at line 427 of file ViewModel.cpp.

{
    throw winrt::hresult_not_implemented();
}

bool IndexOf | ( | winrt::IInspectable const & | value,
 |  | uint32_t & | index
 | ) |  |

Definition at line 398 of file ViewModel.cpp.

{
    if (auto indexOfFunction = GetCustomIndexOfFunction())
    {
        return indexOfFunction(value, index);
    }
    else
    {
        auto inner = GetVectorInnerImpl();
        return inner->IndexOf(value, index);
    }
}

unsigned int IndexOfNextSibling ( winrt::TreeViewNode const & childNode ) [private]

Definition at line 685 of file ViewModel.cpp.

{
    auto child = childNode;
    auto parentNode = child.Parent();
    unsigned int stopIndex;
    bool isLastRelativeChild = true;
    while (parentNode && isLastRelativeChild)
    {
        unsigned int relativeIndex;
        parentNode.Children().IndexOf(child, relativeIndex);
        if (parentNode.Children().Size() - 1 != relativeIndex)
        {
            isLastRelativeChild = false;
        }
        else
        {
            child = parentNode;
            parentNode = parentNode.Parent();
        }
    }

    if (parentNode)
    {
        unsigned int siblingIndex;
        parentNode.Children().IndexOf(child, siblingIndex);
        auto siblingNode = parentNode.Children().GetAt(siblingIndex + 1);
        IndexOfNode(siblingNode, stopIndex);
    }
    else
    {
        stopIndex = Size();
    }

    return stopIndex;
}

bool IndexOfNode | ( | winrt::TreeViewNode const & | targetNode,
 |  | uint32_t & | index |
 | ) |  |  | [private]

Definition at line 915 of file ViewModel.cpp.

{
    return GetVectorInnerImpl()->IndexOf(targetNode, index);
}

void InsertAt | ( | uint32_t | index,
 |  | winrt::IInspectable const & | value
 | ) |  |

Definition at line 456 of file ViewModel.cpp.

{
    GetVectorInnerImpl()->InsertAt(index, value);
    winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>();

    // Hook up events and save tokens
    auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode);
    m_collectionChangedEventTokenVector.insert(m_collectionChangedEventTokenVector.begin() + index, tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged }));
    m_IsExpandedChangedEventTokenVector.insert(m_IsExpandedChangedEventTokenVector.begin() + index, tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged }));
}

void IsContentMode ( const bool value ) [private]

Definition at line 1170 of file ViewModel.cpp.

{
    m_isContentMode = value;
}

bool IsContentMode ( ) [private]

Definition at line 1175 of file ViewModel.cpp.

{
    return m_isContentMode;
}

bool IsInSingleSelectionMode ( )

Definition at line 570 of file ViewModel.cpp.

{
    return m_TreeViewList.get().SelectionMode() == winrt::ListViewSelectionMode::Single;
}

bool IsNodeSelected ( winrt::TreeViewNode const & targetNode )

Definition at line 736 of file ViewModel.cpp.

{
    unsigned int index;
    return m_selectedNodes.get().IndexOf(targetNode, index);
}

winrt::TreeViewList ListControl ( )

Definition at line 565 of file ViewModel.cpp.

{
    return m_TreeViewList.get();
}

winrt::event_token NodeCollapsed ( const winrt::TypedEventHandler< winrt::TreeViewNode, winrt::IInspectable > & handler ) [private]

Definition at line 284 of file ViewModel.cpp.

{
    return m_nodeCollapsedEventSource.add(handler);
}

void NodeCollapsed ( const winrt::event_token token ) [private]

Definition at line 289 of file ViewModel.cpp.

{
    m_nodeCollapsedEventSource.remove(token);
}

void NodeExpanding ( const winrt::event_token token ) [private]

Definition at line 279 of file ViewModel.cpp.

{
    m_nodeExpandingEventSource.remove(token);
}

winrt::event_token NodeExpanding ( const winrt::TypedEventHandler< winrt::TreeViewNode, winrt::IInspectable > & handler ) [private]

Definition at line 274 of file ViewModel.cpp.

{
    return m_nodeExpandingEventSource.add(handler);
}

TreeNodeSelectionState NodeSelectionState ( winrt::TreeViewNode const & targetNode )

Definition at line 742 of file ViewModel.cpp.

{
    return winrt::get_self<TreeViewNode>(targetNode)->SelectionState();
}

void NotifyContainerOfSelectionChange | ( | winrt::TreeViewNode const & | targetNode,
 |  | TreeNodeSelectionState const & | selectionState
 | ) |  |

Definition at line 863 of file ViewModel.cpp.

{
    if (m_TreeViewList)
    {
        auto container = winrt::get_self<TreeViewList>(m_TreeViewList.get())->ContainerFromNode(targetNode);
        if (container)
        {
            winrt::TreeViewItem targetItem = container.as<winrt::TreeViewItem>();
            winrt::get_self<TreeViewItem>(targetItem)->UpdateSelectionVisual(selectionState);
        }
    }
}

void PrepareView ( winrt::TreeViewNode const & originNode )

Definition at line 528 of file ViewModel.cpp.

{
    // Remove any existing RootNode events/children
    if (auto existingOriginNode = m_originNode.get())
    {
        for (int i = (existingOriginNode.Children().Size() - 1); i >= 0; i--)
        {
            auto removeNode = existingOriginNode.Children().GetAt(i).as<winrt::TreeViewNode>();
            RemoveNodeAndDescendantsFromView(removeNode);
        }

        if (m_rootNodeChildrenChangedEventToken.value != 0)
        {
            existingOriginNode.Children().as<winrt::IObservableVector<winrt::TreeViewNode>>().VectorChanged(m_rootNodeChildrenChangedEventToken);
        }
    }

    // Add new RootNode & children
    m_originNode.set(originNode);
    m_rootNodeChildrenChangedEventToken = winrt::get_self<TreeViewNode>(originNode)->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged });
    originNode.IsExpanded(true);

    int allOpenedDescendantsCount = 0;
    for (unsigned int i = 0; i < originNode.Children().Size(); i++)
    {
        auto addNode = originNode.Children().GetAt(i).as<winrt::TreeViewNode>();
        AddNodeToView(addNode, i + allOpenedDescendantsCount);
        allOpenedDescendantsCount = AddNodeDescendantsToView(addNode, i, allOpenedDescendantsCount);
    }
}

void RemoveAt ( uint32_t index )

Definition at line 467 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    auto current = inner->GetAt(index).as<winrt::TreeViewNode>();
    inner->RemoveAt(index);

    // Unhook event handlers
    auto tvnCurrent = winrt::get_self<TreeViewNode>(current);
    tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector[index]);
    tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector[index]);

    // Remove tokens from vectors
    m_collectionChangedEventTokenVector.erase(m_collectionChangedEventTokenVector.begin() + index);
    m_IsExpandedChangedEventTokenVector.erase(m_IsExpandedChangedEventTokenVector.begin() + index);
}

void RemoveAtEnd ( )

Definition at line 494 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    auto current = inner->GetAt(Size() - 1).as<winrt::TreeViewNode>();
    inner->RemoveAtEnd();

    // Unhook events
    auto tvnCurrent = winrt::get_self<TreeViewNode>(current);
    tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector.back());
    tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector.back());

    // Remove tokens
    m_collectionChangedEventTokenVector.pop_back();
    m_IsExpandedChangedEventTokenVector.pop_back();
}

void RemoveNodeAndDescendantsFromView ( const winrt::TreeViewNode & value ) [private]

Definition at line 600 of file ViewModel.cpp.

{
    UINT32 valueIndex;
    if (value.IsExpanded())
    {
        unsigned int size = value.Children().Size();
        for (unsigned int i = 0; i < size; i++)
        {
            auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>();
            RemoveNodeAndDescendantsFromView(childNode);
        }
    }

    const bool containsValue = IndexOfNode(value, valueIndex);
    if (containsValue)
    {
        RemoveAt(valueIndex);
    }
}

void RemoveNodesAndDescendentsWithFlatIndexRange | ( | unsigned int | startIndex,
 |  | unsigned int | stopIndex |
 | ) |  |  | [private]

Definition at line 620 of file ViewModel.cpp.

{
    MUX_ASSERT(lowIndex <= highIndex);

    for (int i = static_cast<int>(highIndex); i >= static_cast<int>(lowIndex); i--)
    {
        RemoveNodeAndDescendantsFromView(GetNodeAt(i));
    }
}

void ReplaceAll ( winrt::array_view< winrt::IInspectable const > items )

Definition at line 521 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    return inner->ReplaceAll(items);
}

void SelectAll ( ) [private]

Definition at line 294 of file ViewModel.cpp.

{
    auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
    BeginSelectionChanges();

    UpdateSelection(m_originNode.get(), TreeNodeSelectionState::Selected);
}

void SelectByIndex | ( | int | index,
 |  | TreeNodeSelectionState const & | state |
 | ) |  |  | [private]

Definition at line 342 of file ViewModel.cpp.

{
    auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
    BeginSelectionChanges();

    auto targetNode = GetNodeAt(index);
    UpdateSelection(targetNode, state);
}

void SelectedNodeChildrenChanged | ( | const winrt::TreeViewNode & | sender,
 |  | const winrt::IInspectable & | args
 | ) |  |

Definition at line 1024 of file ViewModel.cpp.

{
    winrt::CollectionChange collectionChange = args.as<winrt::IVectorChangedEventArgs>().CollectionChange();
    unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index();
    auto changingChildrenNode = sender.as<winrt::TreeViewNode>();

    switch (collectionChange)
    {
    case (winrt::CollectionChange::ItemInserted):
    {
        auto newNode = changingChildrenNode.Children().GetAt(index);

        // If we are in multi select, we want the new child items to be also selected.
        if (!IsInSingleSelectionMode())
        {
            UpdateNodeSelection(newNode, NodeSelectionState(changingChildrenNode));
        }
        break;
    }

    case (winrt::CollectionChange::ItemChanged):
    {
        auto newNode = changingChildrenNode.Children().GetAt(index);
        UpdateNodeSelection(newNode, NodeSelectionState(changingChildrenNode));

        auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get());
        for (unsigned int i = 0; i < selectedNodes->Size(); i++)
        {
            auto selectNode = selectedNodes->GetAt(i);
            auto ancestorNode = selectNode.Parent();
            while (ancestorNode && ancestorNode.Parent())
            {
                ancestorNode = ancestorNode.Parent();
            }

            if (ancestorNode != m_originNode.get())
            {
                selectedNodes->RemoveAtCore(i);
                m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + i);
            }
        }
        break;
    }

    case (winrt::CollectionChange::ItemRemoved):
    case (winrt::CollectionChange::Reset):
    {
        //This checks if there are still children, then re-evaluates parents selection based on current state of remaining children
        //If a node has 2 children selected, and 1 unselected, and the unselected is removed, we then change the parent node to selected.
        //If the last child is removed, we preserve the current selection state of the parent, and this code need not execute.
        if (changingChildrenNode.Children().Size() > 0)
        {
            auto firstChildNode = changingChildrenNode.Children().GetAt(0);
            UpdateSelectionStateOfAncestors(firstChildNode);
        }

        auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get());
        for (unsigned int i = 0; i < selectedNodes->Size(); i++)
        {
            auto selectNode = selectedNodes->GetAt(i);
            auto ancestorNode = selectNode.Parent();
            while (ancestorNode && ancestorNode.Parent())
            {
                ancestorNode = ancestorNode.Parent();
            }

            if (ancestorNode != m_originNode.get())
            {
                selectedNodes->RemoveAtCore(i);
                m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + i);

                // We've removed the node at position i, so we should keep i at the same position
                // because the new node at position i is a different one.
                i--;
            }
        }
        break;
    }

    }
}

TreeNodeSelectionState SelectionStateBasedOnChildren ( winrt::TreeViewNode const & node ) [private]

Definition at line 836 of file ViewModel.cpp.

{
    bool hasSelectedChildren{ false };
    bool hasUnSelectedChildren{ false };

    for (auto const& childNode : node.Children())
    {
        const auto state = NodeSelectionState(childNode);
        if (state == TreeNodeSelectionState::Selected)
        {
            hasSelectedChildren = true;
        }
        else if (state == TreeNodeSelectionState::UnSelected)
        {
            hasUnSelectedChildren = true;
        }

        if ((hasSelectedChildren && hasUnSelectedChildren) ||
            state == TreeNodeSelectionState::PartialSelected)
        {
            return TreeNodeSelectionState::PartialSelected;
        }
    }

    return hasSelectedChildren ? TreeNodeSelectionState::Selected : TreeNodeSelectionState::UnSelected;
}

void SelectNode | ( | const winrt::TreeViewNode & | node,
 |  | bool | isSelected |
 | ) |  |  | [private]

Definition at line 318 of file ViewModel.cpp.

{
    auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
    BeginSelectionChanges();

    auto selectedNodes = GetSelectedNodes();
    if (isSelected)
    {
        if (IsInSingleSelectionMode() && selectedNodes.Size() > 0)
        {
            selectedNodes.Clear();
        }
        selectedNodes.Append(node);
    }
    else
    {
        unsigned int index;
        if (selectedNodes.IndexOf(node, index))
        {
            selectedNodes.RemoveAt(index);
        }
    }
}

void SelectSingleItem ( winrt::IInspectable const & item ) [private]

Definition at line 302 of file ViewModel.cpp.

{
    auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
    BeginSelectionChanges();

    auto selectedItems = GetSelectedItems();
    if (selectedItems.Size() > 0)
    {
        selectedItems.Clear();
    }
    if (item)
    {
        selectedItems.Append(item);
    }
}

void SetAt | ( | uint32_t | index,
 |  | winrt::IInspectable const & | value
 | ) |  |

Definition at line 438 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    auto current = inner->GetAt(index).as<winrt::TreeViewNode>();
    inner->SetAt(index, value);

    winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>();

    auto tvnCurrent = winrt::get_self<TreeViewNode>(current);
    tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector[index]);
    tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector[index]);

    // Hook up events and replace tokens
    auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode);
    m_collectionChangedEventTokenVector[index] = tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged });
    m_IsExpandedChangedEventTokenVector[index] = tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged });
}

void SetOwners | ( | winrt::TreeViewList const & | owningList,
 |  | winrt::TreeView const & | owningTreeView
 | ) |  |

Definition at line 559 of file ViewModel.cpp.

{
    m_TreeViewList = winrt::make_weak(owningList);
    m_TreeView = winrt::make_weak(owningTreeView);
}

uint32_t Size ( )

Definition at line 386 of file ViewModel.cpp.

{
    auto inner = GetVectorInnerImpl();
    return inner->Size();
}

void TrackItemSelected ( winrt::IInspectable item )

Definition at line 886 of file ViewModel.cpp.

{
    if (m_selectionTrackingCounter > 0 && item != m_originNode.safe_get())
    {
        m_addedSelectedItems.push_back(winrt::make_weak(item));
    }
}

void TrackItemUnselected ( winrt::IInspectable item )

Definition at line 894 of file ViewModel.cpp.

{
    if (m_selectionTrackingCounter > 0 && item != m_originNode.safe_get())
    {
        m_removedSelectedItems.push_back(item);
    }
}

void TreeViewNodeHasChildrenPropertyChanged | ( | winrt::TreeViewNode const & | sender,
 |  | winrt::IDependencyPropertyChangedEventArgs const & | args
 | ) |  |

Definition at line 1156 of file ViewModel.cpp.

{
    if (m_TreeViewList)
    {
        auto targetNode = sender.as<winrt::TreeViewNode>();
        auto container = winrt::get_self<TreeViewList>(m_TreeViewList.get())->ContainerFromNode(targetNode);
        if (container)
        {
            winrt::TreeViewItem targetItem = container.as<winrt::TreeViewItem>();
            targetItem.GlyphOpacity(targetNode.HasChildren() ? 1.0 : 0.0);
        }
    }
}

void TreeViewNodeIsExpandedPropertyChanged | ( | winrt::TreeViewNode const & | sender,
 |  | winrt::IDependencyPropertyChangedEventArgs const & | args
 | ) |  |

Definition at line 1119 of file ViewModel.cpp.

{
    auto targetNode = sender.as<winrt::TreeViewNode>();
    if (targetNode.IsExpanded())
    {
        if (targetNode.Children().Size() != 0)
        {
            int openedDescendantOffset = 0;
            unsigned int index;
            IndexOfNode(targetNode, index);
            index = index + 1;
            for (unsigned int i = 0; i < targetNode.Children().Size(); i++)
            {
                winrt::TreeViewNode childNode{ nullptr };
                childNode = targetNode.Children().GetAt(i).as<winrt::TreeViewNode>();
                AddNodeToView(childNode, index + i + openedDescendantOffset);
                openedDescendantOffset = AddNodeDescendantsToView(childNode, index + i, openedDescendantOffset);
            }
        }

        //Notify TreeView that a node is being expanded.
        m_nodeExpandingEventSource(targetNode, nullptr);
    }
    else
    {
        for (unsigned int i = 0; i < targetNode.Children().Size(); i++)
        {
            winrt::TreeViewNode childNode{ nullptr };
            childNode = targetNode.Children().GetAt(i).as<winrt::TreeViewNode>();
            RemoveNodeAndDescendantsFromView(childNode);
        }

        //Notify TreeView that a node is being collapsed
        m_nodeCollapsedEventSource(targetNode, nullptr);
    }
}

void TreeViewNodePropertyChanged | ( | winrt::TreeViewNode const & | sender,
 |  | winrt::IDependencyPropertyChangedEventArgs const & | args
 | ) |  |

Definition at line 1106 of file ViewModel.cpp.

{
    winrt::IDependencyProperty property = args.Property();
    if (property == TreeViewNode::s_IsExpandedProperty)
    {
        TreeViewNodeIsExpandedPropertyChanged(sender, args);
    }
    else if (property == TreeViewNode::s_HasChildrenProperty)
    {
        TreeViewNodeHasChildrenPropertyChanged(sender, args);
    }
}

void TreeViewNodeVectorChanged | ( | const winrt::TreeViewNode & | sender,
 |  | const winrt::IInspectable & | args
 | ) |  |

Definition at line 920 of file ViewModel.cpp.

{
    winrt::CollectionChange collectionChange = args.as<winrt::IVectorChangedEventArgs>().CollectionChange();
    unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index();

    switch (collectionChange)
    {
        // Reset case, commonly seen when a TreeNode is cleared.
        // removes all nodes that need removing then
        // toggles a collapse / expand to ensure order.
    case (winrt::CollectionChange::Reset):
    {
        auto resetNode = sender.as<winrt::TreeViewNode>();
        if (resetNode.IsExpanded())
        {
            //The lowIndex is the index of the first child, while the high index is the index of the last descendant in the list.
            const unsigned int lowIndex = GetNextIndexInFlatTree(resetNode);
            const unsigned int highIndex = IndexOfNextSibling(resetNode) - 1;
            RemoveNodesAndDescendentsWithFlatIndexRange(lowIndex, highIndex);

            // reset the status of resetNodes children
            CollapseNode(resetNode);
            ExpandNode(resetNode);
        }

        break;
    }

    // We will find the correct index of insertion by first checking if the
    // node we are inserting into is expanded. If it is we will start walking
    // down the tree and counting the open items. This is to ensure we place
    // the inserted item in the correct index. If along the way we bump into
    // the item being inserted, we insert there then return, because we don't
    // need to do anything further.
    case (winrt::CollectionChange::ItemInserted):
    {
        auto targetNode = sender.as<winrt::TreeViewNode>().Children().GetAt(index).as<winrt::TreeViewNode>();

        auto parentNode = targetNode.Parent();
        const unsigned int nextNodeIndex = GetNextIndexInFlatTree(parentNode);
        int allOpenedDescendantsCount = 0;

        if (parentNode.IsExpanded())
        {
            for (unsigned int i = 0; i < parentNode.Children().Size(); i++)
            {
                auto childNode = parentNode.Children().GetAt(i).as<winrt::TreeViewNode>();
                if (childNode == targetNode)
                {
                    AddNodeToView(targetNode, nextNodeIndex + i + allOpenedDescendantsCount);
                    if (targetNode.IsExpanded())
                    {
                        AddNodeDescendantsToView(targetNode, nextNodeIndex + i, allOpenedDescendantsCount);
                    }
                }
                else if (childNode.IsExpanded())
                {
                    allOpenedDescendantsCount += CountDescendants(childNode);
                }
            }
        }

        break;
    }

    // Removes a node from the ViewModel when a TreeNode
    // removes a child.
    case (winrt::CollectionChange::ItemRemoved):
    {
        auto removingNodeParent = sender.as<winrt::TreeViewNode>();
        if (removingNodeParent.IsExpanded())
        {
            auto removedNode = GetRemovedChildTreeViewNodeByIndex(removingNodeParent, index);
            RemoveNodeAndDescendantsFromView(removedNode);
        }

        break;
    }

    // Triggered by a replace such as SetAt.
    // Updates the TreeNode that changed in the ViewModel.
    case (winrt::CollectionChange::ItemChanged):
    {
        auto targetNode = sender.as<winrt::TreeViewNode>().Children().GetAt(index).as<winrt::TreeViewNode>();
        auto changingNodeParent = sender.as<winrt::TreeViewNode>();
        if (changingNodeParent.IsExpanded())
        {
            auto removedNode = GetRemovedChildTreeViewNodeByIndex(changingNodeParent, index);
            [[gsl::suppress(con)]]
            {
                unsigned int removedNodeIndex = 0;
                MUX_ASSERT(IndexOfNode(removedNode, removedNodeIndex));

                RemoveNodeAndDescendantsFromView(removedNode);
                InsertAt(removedNodeIndex, targetNode.as<winrt::IInspectable>());
            }

        }

        break;
    }
    }
}

void UpdateNodeSelection | ( | winrt::TreeViewNode const & | selectNode,
 |  | TreeNodeSelectionState const & | selectionState |
 | ) |  |  | [private]

Definition at line 747 of file ViewModel.cpp.

{
    auto node = winrt::get_self<TreeViewNode>(selectNode);
    if (selectionState != node->SelectionState())
    {
        node->SelectionState(selectionState);
        auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get());
        switch (selectionState)
        {
        case TreeNodeSelectionState::Selected:
            selectedNodes->InsertAtCore_NoContainsCheck(selectedNodes->Size(), selectNode);
            m_selectedNodeChildrenChangedEventTokenVector.push_back(winrt::get_self<TreeViewNode>(selectNode)->ChildrenChanged({ this, &ViewModel::SelectedNodeChildrenChanged }));
            break;

        case TreeNodeSelectionState::PartialSelected:
        case TreeNodeSelectionState::UnSelected:
            unsigned int index;
            if (selectedNodes->IndexOf(selectNode, index))
            {
                selectedNodes->RemoveAtCore(index);
                winrt::get_self<TreeViewNode>(selectNode)->ChildrenChanged(m_selectedNodeChildrenChangedEventTokenVector[index]);
                m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + index);
            }
            break;
        }
    }
}

void UpdateSelection | ( | winrt::TreeViewNode const & | selectNode,
 |  | TreeNodeSelectionState const & | selectionState
 | ) |  |

Definition at line 775 of file ViewModel.cpp.

{
    if(NodeSelectionState(selectNode) != selectionState)
    {
        UpdateNodeSelection(selectNode, selectionState);

        if (!IsInSingleSelectionMode())
        {
            UpdateSelectionStateOfDescendants(selectNode, selectionState);
            UpdateSelectionStateOfAncestors(selectNode);
        }
    }
}

void UpdateSelectionStateOfAncestors ( winrt::TreeViewNode const & targetNode ) [private]

Definition at line 816 of file ViewModel.cpp.

{
    if (auto parentNode = targetNode.Parent())
    {
        // no need to update m_originalNode since it's the logical root for TreeView and not accessible to users
        if (parentNode != m_originNode.safe_get())
        {
            const auto previousState = NodeSelectionState(parentNode);
            const auto selectionState = SelectionStateBasedOnChildren(parentNode);

            if (previousState != selectionState)
            {
                UpdateNodeSelection(parentNode, selectionState);
                NotifyContainerOfSelectionChange(parentNode, selectionState);
                UpdateSelectionStateOfAncestors(parentNode);
            }
        }
    }
}

void UpdateSelectionStateOfDescendants | ( | winrt::TreeViewNode const & | targetNode,
 |  | TreeNodeSelectionState const & | selectionState |
 | ) |  |  | [private]

Definition at line 789 of file ViewModel.cpp.

{
    if (selectionState == TreeNodeSelectionState::PartialSelected) return;

    // For unselecting items, we process the list backwards. This prevents an item from being repeatedly shuffled
    // towards the front of the list only to be removed at the end anyway.
    if (selectionState == TreeNodeSelectionState::UnSelected)
    {
        for (int i = targetNode.Children().Size() - 1; i >= 0; i--)
        {
            const auto& childNode = targetNode.Children().GetAt(i);
            UpdateSelectionStateOfDescendants(childNode, selectionState);
            UpdateNodeSelection(childNode, selectionState);
            NotifyContainerOfSelectionChange(childNode, selectionState);
        }
    }
    else
    {
        for (auto const& childNode : targetNode.Children())
        {
            UpdateNodeSelection(childNode, selectionState);
            UpdateSelectionStateOfDescendants(childNode, selectionState);
            NotifyContainerOfSelectionChange(childNode, selectionState);
        }
    }
}

Member Data Documentation

std::vector<winrt::weak_ref<winrt::IInspectable> > m_addedSelectedItems [private]

Definition at line 89 of file ViewModel.h.

std::vector<winrt::event_token> m_collectionChangedEventTokenVector [private]

Definition at line 82 of file ViewModel.h.

std::vector<winrt::event_token> m_IsExpandedChangedEventTokenVector [private]

Definition at line 87 of file ViewModel.h.

std::vector<winrt::IInspectable> m_removedSelectedItems [private]

Definition at line 95 of file ViewModel.h.

winrt::event_token m_rootNodeChildrenChangedEventToken [private]

Definition at line 88 of file ViewModel.h.

std::vector<winrt::event_token> m_selectedNodeChildrenChangedEventTokenVector [private]

Definition at line 86 of file ViewModel.h.

The documentation for this class was generated from the following files:
  • TreeView/ViewModel.h
  • TreeView/ViewModel.cpp
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportManager Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ViewportManager Class Reference

#include "ViewportManager.h"

Inherited by ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

List of all members.

Public Member Functions

virtual winrt::Rect | GetLayoutExtent () const =0
virtual winrt::Rect | GetLayoutRealizationWindow () const =0
virtual winrt::Rect | GetLayoutVisibleWindow () const =0
virtual winrt::Point | GetOrigin () const =0
virtual void | HorizontalCacheLength (double value)=0
virtual double | HorizontalCacheLength () const =0
virtual winrt::UIElement | MadeAnchor () const =0
virtual void | OnBringIntoViewRequested (const winrt::BringIntoViewRequestedEventArgs &args)=0
virtual void | OnElementCleared (const winrt::UIElement &element)=0
virtual void | OnElementPrepared (const winrt::UIElement &element)=0
virtual void | OnLayoutChanged (bool isVirtualizing)=0
virtual void | OnMakeAnchor (const winrt::UIElement &anchor, const bool isAnchorOutsideRealizedRange)=0
virtual void | OnOwnerArranged ()=0
virtual void | OnOwnerMeasuring ()=0
virtual void | ResetLayoutRealizationWindowCacheBuffer ()=0
virtual void | ResetScrollers ()=0
virtual void | SetLayoutExtent (const winrt::Rect &layoutExtent)=0
virtual winrt::UIElement | SuggestedAnchor () const =0
virtual double | VerticalCacheLength () const =0
virtual void | VerticalCacheLength (double value)=0

Detailed Description

Definition at line 3 of file ViewportManager.h.

Member Function Documentation

virtual winrt::Rect GetLayoutExtent ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual winrt::Rect GetLayoutRealizationWindow ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual winrt::Rect GetLayoutVisibleWindow ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual winrt::Point GetOrigin ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void HorizontalCacheLength ( double value ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual double HorizontalCacheLength ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual winrt::UIElement MadeAnchor ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void OnBringIntoViewRequested ( const winrt::BringIntoViewRequestedEventArgs & args ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void OnElementCleared ( const winrt::UIElement & element ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void OnElementPrepared ( const winrt::UIElement & element ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void OnLayoutChanged ( bool isVirtualizing ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void OnMakeAnchor | ( | const winrt::UIElement & | anchor,
 |  | const bool | isAnchorOutsideRealizedRange |
 | ) |  |  | [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void OnOwnerArranged ( ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void OnOwnerMeasuring ( ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void ResetLayoutRealizationWindowCacheBuffer ( ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void ResetScrollers ( ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void SetLayoutExtent ( const winrt::Rect & layoutExtent ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual winrt::UIElement SuggestedAnchor ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual double VerticalCacheLength ( ) const [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

virtual void VerticalCacheLength ( double value ) [pure virtual]

Implemented in ViewportManagerDownLevel, and ViewportManagerWithPlatformFeatures.

The documentation for this class was generated from the following file:
  • Repeater/ViewportManager.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportManagerDownLevel Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Private Member Functions | Private Attributes

ViewportManagerDownLevel Class Reference

#include "ViewportManagerDownlevel.h"

Inherits ViewportManager.

List of all members.

Classes

struct | ScrollerInfo

Public Member Functions

ViewportManagerDownLevel (ItemsRepeater *owner)
winrt::Rect | GetLayoutExtent () const override
winrt::Rect | GetLayoutRealizationWindow () const override
winrt::Rect | GetLayoutVisibleWindow () const override
winrt::Point | GetOrigin () const override
void | HorizontalCacheLength (double value) override
double | HorizontalCacheLength () const override
winrt::UIElement | MadeAnchor () const override
void | OnBringIntoViewRequested (const winrt::BringIntoViewRequestedEventArgs &args) override
void | OnElementCleared (const winrt::UIElement &element) override
void | OnElementPrepared (const winrt::UIElement &element) override
void | OnLayoutChanged (bool isVirtualizing) override
void | OnMakeAnchor (const winrt::UIElement &anchor, const bool isAnchorOutsideRealizedRange) override
void | OnOwnerArranged () override
void | OnOwnerMeasuring () override
void | ResetLayoutRealizationWindowCacheBuffer () override
void | ResetScrollers () override
void | SetLayoutExtent (const winrt::Rect &extent) override
winrt::UIElement | SuggestedAnchor () const override
void | VerticalCacheLength (double value) override
double | VerticalCacheLength () const override

Private Member Functions

bool | AddScroller (const winrt::IRepeaterScrollingSurface &scroller)
void | EnsureScrollers ()
winrt::hstring | GetLayoutId ()
winrt::IRepeaterScrollingSurface | GetOuterScroller () const
bool | HasScrollers () const
void | OnCacheBuildActionCompleted ()
void | OnConfigurationChanged (const winrt::IRepeaterScrollingSurface &sender)
void | OnPostArrange (const winrt::IRepeaterScrollingSurface &sender)
void | OnViewportChanged (const winrt::IRepeaterScrollingSurface &sender, const bool isFinal)
void | RegisterCacheBuildWork ()
void | ResetCacheBuffer (bool registerCacheBuildWork=true)
void | TryInvalidateMeasure ()
void | UpdateViewport ()
void | ValidateCacheLength (double cacheLength)

Private Attributes

tracker_ref< winrt::IAsyncAction > | m_cacheBuildAction
tracker_ref
< winrt::IRepeaterScrollingSurface > 		m_horizontalScroller
tracker_ref
< winrt::IRepeaterScrollingSurface > 		m_innerScrollableScroller
tracker_ref< winrt::UIElement > | m_makeAnchorElement
std::vector< ScrollerInfo > | m_parentScrollers
winrt::IRepeaterScrollingSurface::PostArrange_revoker | m_postArrangeToken
tracker_ref
< winrt::IRepeaterScrollingSurface > 		m_verticalScroller

Detailed Description

Definition at line 14 of file ViewportManagerDownlevel.h.

Constructor & Destructor Documentation

ViewportManagerDownLevel ( ItemsRepeater * owner )

Definition at line 17 of file ViewportManagerDownlevel.cpp.

                                                                       :
    m_owner(owner),
    m_horizontalScroller(owner),
    m_verticalScroller(owner),
    m_innerScrollableScroller(owner),
    m_makeAnchorElement(owner),
    m_cacheBuildAction(owner)
{
    // ItemsRepeater is not fully constructed yet. Don't interact with it.
}

Member Function Documentation

bool AddScroller ( const winrt::IRepeaterScrollingSurface & scroller ) [private]

Definition at line 355 of file ViewportManagerDownlevel.cpp.

{
    MUX_ASSERT(!(m_horizontalScroller && m_verticalScroller));

    const bool isHorizontallyScrollable = scroller.IsHorizontallyScrollable();
    const bool isVerticallyScrollable = scroller.IsVerticallyScrollable();
    const bool allScrollersSet = (m_horizontalScroller || isHorizontallyScrollable) && (m_verticalScroller || isVerticallyScrollable);
    const bool setHorizontalScroller = !m_horizontalScroller && isHorizontallyScrollable;
    const bool setVerticalScroller = !m_verticalScroller && isVerticallyScrollable;
    const bool setInnerScrollableScroller = !m_innerScrollableScroller && (setHorizontalScroller || setVerticalScroller);

    if (setHorizontalScroller) { m_horizontalScroller.set(scroller); }
    if (setVerticalScroller) { m_verticalScroller.set(scroller); }
    if (setInnerScrollableScroller) { m_innerScrollableScroller.set(scroller); }

    auto scrollerInfo = ScrollerInfo(
        m_owner,
        scroller);

    scrollerInfo.ConfigurationChangedToken = scroller.ConfigurationChanged(winrt::auto_revoke, { this, &ViewportManagerDownLevel::OnConfigurationChanged });
    if (setHorizontalScroller || setVerticalScroller)
    {
        scrollerInfo.ViewportChangedToken = scroller.ViewportChanged(winrt::auto_revoke, { this, &ViewportManagerDownLevel::OnViewportChanged });
    }

    m_parentScrollers.push_back(std::move(scrollerInfo));
    return allScrollersSet;
}

void EnsureScrollers ( ) [private]

Definition at line 321 of file ViewportManagerDownlevel.cpp.

{
    if (!m_ensuredScrollers)
    {
        ResetScrollers();

        auto parent = CachedVisualTreeHelpers::GetParent(*m_owner);
        while (parent)
        {
            const auto scroller = parent.try_as<winrt::IRepeaterScrollingSurface>();
            if (scroller && AddScroller(scroller))
            {
                break;
            }

            parent = CachedVisualTreeHelpers::GetParent(parent);
        }

        if (m_parentScrollers.empty())
        {
            // We usually update the viewport in the post arrange handler. But, since we don't have
            // a scroller, let's do it now.
            UpdateViewport();
        }
        else
        {
            auto& outerScrollerInfo = m_parentScrollers.back();
            outerScrollerInfo.PostArrangeToken = outerScrollerInfo.Scroller().PostArrange(winrt::auto_revoke, { this, &ViewportManagerDownLevel::OnPostArrange });
        }

        m_ensuredScrollers = true;
    }
}

winrt::Rect GetLayoutExtent ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 31 of file ViewportManagerDownlevel.h.

{ return m_layoutExtent; }

winrt::hstring GetLayoutId ( ) [private]

Definition at line 507 of file ViewportManagerDownlevel.cpp.

{
    winrt::hstring layoutId{};
    if (auto layout = m_owner->Layout())
    {
        layoutId = layout.as<Layout>()->LayoutId();
    }

    return layoutId;
}

winrt::Rect GetLayoutRealizationWindow ( ) const [override, virtual]

Implements ViewportManager.

Definition at line 116 of file ViewportManagerDownlevel.cpp.

{
    auto realizationWindow = GetLayoutVisibleWindow();
    if (HasScrollers())
    {
        realizationWindow.X -= static_cast<float>(m_horizontalCacheBufferPerSide);
        realizationWindow.Y -= static_cast<float>(m_verticalCacheBufferPerSide);
        realizationWindow.Width += static_cast<float>(m_horizontalCacheBufferPerSide) * 2.0f;
        realizationWindow.Height += static_cast<float>(m_verticalCacheBufferPerSide) * 2.0f;
    }

    return realizationWindow;
}

winrt::Rect GetLayoutVisibleWindow ( ) const [override, virtual]

Implements ViewportManager.

Definition at line 89 of file ViewportManagerDownlevel.cpp.

{
    auto visibleWindow = m_visibleWindow;

    if (m_makeAnchorElement && m_isAnchorOutsideRealizedRange)
    {
        // The anchor is not necessarily laid out yet. Its position should default
        // to zero and the layout origin is expected to change once layout is done.
        // Until then, we need a window that's going to protect the anchor from
        // getting recycled.

        // Also, we only want to mess with the realization rect iff the anchor is not inside it.
        // If we fiddle with an anchor that is already inside the realization rect,
        // shifting the realization rect results in repeater, layout and scroller thinking that it needs to act upon StartBringIntoView.
        // We do NOT want that!
        visibleWindow.X = 0.0f;
        visibleWindow.Y = 0.0f;
    }
    else if (HasScrollers())
    {
        visibleWindow.X += m_layoutExtent.X + m_expectedViewportShift.X;
        visibleWindow.Y += m_layoutExtent.Y + m_expectedViewportShift.Y;
    }

    return visibleWindow;
}

winrt::Point GetOrigin ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 32 of file ViewportManagerDownlevel.h.

{ return winrt::Point(m_layoutExtent.X, m_layoutExtent.Y); }

winrt::IRepeaterScrollingSurface GetOuterScroller ( ) const [private]

Definition at line 495 of file ViewportManagerDownlevel.cpp.

{
    winrt::IRepeaterScrollingSurface scroller = nullptr;

    if (!m_parentScrollers.empty())
    {
        scroller = m_parentScrollers.back().Scroller();
    }

    return scroller;
}

bool HasScrollers ( ) const [inline, private]

Definition at line 56 of file ViewportManagerDownlevel.h.

{ return !!m_horizontalScroller || !!m_verticalScroller; }

void HorizontalCacheLength ( double value ) [override, virtual]

Implements ViewportManager.

Definition at line 69 of file ViewportManagerDownlevel.cpp.

{
    if (m_maximumHorizontalCacheLength != value)
    {
        ValidateCacheLength(value);
        m_maximumHorizontalCacheLength = value;
        ResetCacheBuffer();
    }
}

double HorizontalCacheLength ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 21 of file ViewportManagerDownlevel.h.

{ return m_maximumHorizontalCacheLength; }

winrt::UIElement MadeAnchor ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 45 of file ViewportManagerDownlevel.h.

{ return m_makeAnchorElement.get(); }

void OnBringIntoViewRequested ( const winrt::BringIntoViewRequestedEventArgs & args ) [override, virtual]

Implements ViewportManager.

Definition at line 231 of file ViewportManagerDownlevel.cpp.

{
    if (!m_managingViewportDisabled)
    {
        // We do not animate bring-into-view operations where the anchor is disconnected because
        // it doesn't look good (the blank space is obvious because the layout can't keep track
        // of two realized ranges while the animation is going on).
        if (m_isAnchorOutsideRealizedRange)
        {
            args.AnimationDesired(false);
        }
    }
}

void OnCacheBuildActionCompleted ( ) [private]

Definition at line 255 of file ViewportManagerDownlevel.cpp.

{
    m_cacheBuildAction.set(nullptr);
    m_owner->InvalidateMeasure();
}

void OnConfigurationChanged ( const winrt::IRepeaterScrollingSurface & sender ) [private]

Definition at line 315 of file ViewportManagerDownlevel.cpp.

{
    m_ensuredScrollers = false;
    TryInvalidateMeasure();
}

void OnElementCleared ( const winrt::UIElement & element ) [override, virtual]

Implements ViewportManager.

Definition at line 160 of file ViewportManagerDownlevel.cpp.

{
    if (m_horizontalScroller)
    {
        m_horizontalScroller.get().UnregisterAnchorCandidate(element);
    }

    if (m_verticalScroller && m_verticalScroller != m_horizontalScroller)
    {
        m_verticalScroller.get().UnregisterAnchorCandidate(element);
    }
}

void OnElementPrepared ( const winrt::UIElement & element ) [inline, override, virtual]

Implements ViewportManager.

Definition at line 35 of file ViewportManagerDownlevel.h.

{}

void OnLayoutChanged ( bool isVirtualizing ) [override, virtual]

Implements ViewportManager.

Definition at line 152 of file ViewportManagerDownlevel.cpp.

{
    m_managingViewportDisabled = !isVirtualizing;
    m_layoutExtent = {};
    m_expectedViewportShift = {};
    ResetCacheBuffer();
}

void OnMakeAnchor | ( | const winrt::UIElement & | anchor,
 |  | const bool | isAnchorOutsideRealizedRange |
 | ) |  |  | [override, virtual]

Implements ViewportManager.

Definition at line 225 of file ViewportManagerDownlevel.cpp.

{
    m_makeAnchorElement.set(anchor);
    m_isAnchorOutsideRealizedRange = isAnchorOutsideRealizedRange;
}

void OnOwnerArranged ( ) [override, virtual]

Implements ViewportManager.

Definition at line 190 of file ViewportManagerDownlevel.cpp.

{
    if (m_managingViewportDisabled)
    {
        return;
    }

    m_expectedViewportShift = {};

    EnsureScrollers();

    if (HasScrollers())
    {
        const double maximumHorizontalCacheBufferPerSide = m_maximumHorizontalCacheLength * m_visibleWindow.Width / 2.0;
        const double maximumVerticalCacheBufferPerSide = m_maximumVerticalCacheLength * m_visibleWindow.Height / 2.0;

        const bool continueBuildingCache =
            m_horizontalCacheBufferPerSide < maximumHorizontalCacheBufferPerSide ||
            m_verticalCacheBufferPerSide < maximumVerticalCacheBufferPerSide;

        if (continueBuildingCache)
        {
            m_horizontalCacheBufferPerSide += CacheBufferPerSideInflationPixelDelta;
            m_verticalCacheBufferPerSide += CacheBufferPerSideInflationPixelDelta;

            m_horizontalCacheBufferPerSide = std::min(m_horizontalCacheBufferPerSide, maximumHorizontalCacheBufferPerSide);
            m_verticalCacheBufferPerSide = std::min(m_verticalCacheBufferPerSide, maximumVerticalCacheBufferPerSide);

            // Since we grow the cache buffer at the end of the arrange pass,
            // we need to register work even if we just reached cache potential.
            RegisterCacheBuildWork();
        }
    }
}

void OnOwnerMeasuring ( ) [override, virtual]

Implements ViewportManager.

Definition at line 173 of file ViewportManagerDownlevel.cpp.

{
    winrt::Rect currentLayoutRealizationWindow = GetLayoutRealizationWindow();

    if ((m_horizontalCacheBufferPerSide != 0.0 || m_verticalCacheBufferPerSide != 0.0) &&
        (m_lastLayoutRealizationWindow.Width <= 0.0f || m_lastLayoutRealizationWindow.Height <= 0.0f ||
            currentLayoutRealizationWindow.Width <= 0.0f || currentLayoutRealizationWindow.Height <= 0.0f ||
            !SharedHelpers::DoRectsIntersect(m_lastLayoutRealizationWindow, currentLayoutRealizationWindow)))
    {
        // Two consecutive measure passes use disconnected realization windows.
        // Reset the potential cache buffer so that it regrows from scratch.
        ResetLayoutRealizationWindowCacheBuffer();
    }

    m_lastLayoutRealizationWindow = currentLayoutRealizationWindow;
}

void OnPostArrange ( const winrt::IRepeaterScrollingSurface & sender ) [private]

Definition at line 276 of file ViewportManagerDownlevel.cpp.

{
    if (!m_managingViewportDisabled)
    {
        UpdateViewport();

        if (m_visibleWindow == winrt::Rect())
        {
            // We got cleared.
            m_layoutExtent = {};
        }
        else
        {
            // Register our non-recycled children as candidates for element tracking.
            if (m_horizontalScroller || m_verticalScroller)
            {
                auto children = m_owner->Children();
                for (unsigned i = 0u; i < children.Size(); ++i)
                {
                    const auto element = children.GetAt(i);
                    const auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
                    if (virtInfo->IsHeldByLayout())
                    {
                        if (m_horizontalScroller)
                        {
                            m_horizontalScroller.get().RegisterAnchorCandidate(element);
                        }

                        if (m_verticalScroller && m_verticalScroller != m_horizontalScroller)
                        {
                            m_verticalScroller.get().RegisterAnchorCandidate(element);
                        }
                    }
                }
            }
        }
    }
}

void OnViewportChanged | ( | const winrt::IRepeaterScrollingSurface & | sender,
 |  | const bool | isFinal |
 | ) |  |  | [private]

Definition at line 261 of file ViewportManagerDownlevel.cpp.

{
    if (!m_managingViewportDisabled)
    {
        if (isFinal)
        {
            // Note that isFinal will never be true for input based manipulations.
            m_makeAnchorElement.set(nullptr);
            m_isAnchorOutsideRealizedRange = false;
        }

        TryInvalidateMeasure();
    }
}

void RegisterCacheBuildWork ( ) [private]

Definition at line 462 of file ViewportManagerDownlevel.cpp.

{
    if (m_owner->Layout() &&
        !m_cacheBuildAction)
    {
        auto strongOwner = m_owner->get_strong();
        m_cacheBuildAction.set(m_owner
            ->Dispatcher()
            // We capture 'owner' (a strong refernce on ItemsRepeater) to make sure ItemsRepeater is still around
            // when the async action completes. By protecting ItemsRepeater, we also ensure that this instance
            // of ViewportManager (referenced by 'this' pointer) is valid because the lifetime of ItemsRepeater
            // and ViewportManager is the same (see ItemsRepeater::m_viewportManager).
            // We can't simply hold a strong reference on ViewportManager because it's not a COM object.
            .RunIdleAsync([this, strongOwner](const winrt::IdleDispatchedHandlerArgs&)
            {
                OnCacheBuildActionCompleted();
            }));
    }
}

void ResetCacheBuffer ( bool registerCacheBuildWork = true ) [private]

Definition at line 442 of file ViewportManagerDownlevel.cpp.

{
    m_horizontalCacheBufferPerSide = 0.0;
    m_verticalCacheBufferPerSide = 0.0;

    if (!m_managingViewportDisabled && registerCacheBuildWork)
    {
        // We need to start building the realization buffer again.
        RegisterCacheBuildWork();
    }
}

void ResetLayoutRealizationWindowCacheBuffer ( ) [override, virtual]

Implements ViewportManager.

Definition at line 437 of file ViewportManagerDownlevel.cpp.

{
    ResetCacheBuffer(false /*registerCacheBuildWork*/);
}

void ResetScrollers ( ) [override, virtual]

Implements ViewportManager.

Definition at line 245 of file ViewportManagerDownlevel.cpp.

{
    m_parentScrollers.clear();
    m_horizontalScroller.set(nullptr);
    m_verticalScroller.set(nullptr);
    m_innerScrollableScroller.set(nullptr);

    m_ensuredScrollers = false;
}

void SetLayoutExtent ( const winrt::Rect & extent ) [override, virtual]

Implements ViewportManager.

Definition at line 130 of file ViewportManagerDownlevel.cpp.

{
    m_expectedViewportShift.X += m_layoutExtent.X - extent.X;
    m_expectedViewportShift.Y += m_layoutExtent.Y - extent.Y;

    // We tolerate viewport imprecisions up to 1 pixel to avoid invaliding layout too much.
    if (std::abs(m_expectedViewportShift.X) > 1.f || std::abs(m_expectedViewportShift.Y) > 1.f)
    {
        REPEATER_TRACE_INFO(L"%ls: \tExpecting viewport shift of (%.0f,%.0f) \n",
            GetLayoutId().data(), m_expectedViewportShift.X, m_expectedViewportShift.Y);
    }

    m_layoutExtent = extent;

    // We just finished a measure pass and have a new extent.
    // Let's make sure the scrollers will run its arrange so that they track the anchor.
    const auto outerScroller = GetOuterScroller();
    if (outerScroller) { outerScroller.as<winrt::UIElement>().InvalidateArrange(); }
    if (m_horizontalScroller && m_horizontalScroller != outerScroller) { m_horizontalScroller.as<winrt::UIElement>().InvalidateArrange(); }
    if (m_verticalScroller && m_verticalScroller != outerScroller) { m_verticalScroller.as<winrt::UIElement>().InvalidateArrange(); }
}

winrt::UIElement SuggestedAnchor ( ) const [override, virtual]

Implements ViewportManager.

Definition at line 28 of file ViewportManagerDownlevel.cpp.

{
    // The element generated during the ItemsRepeater.MakeAnchor call has precedence over the next tick.
    winrt::UIElement suggestedAnchor = m_makeAnchorElement.get();
    winrt::UIElement owner = *m_owner;

    if (!suggestedAnchor)
    {
        // We only care about what the first scrollable scroller is tracking (i.e. inner most).
        // A scroller is considered scrollable if IRepeaterScrollingSurface.IsHorizontallyScrollable
        // or IsVerticallyScroller is true.
        const auto anchorElement =
            m_innerScrollableScroller ?
            m_innerScrollableScroller.get().AnchorElement() :
            nullptr;

        if (anchorElement)
        {
            // We can't simply return anchorElement because, in case of nested Repeaters, it may not
            // be a direct child of ours, or even an indirect child. We need to walk up the tree starting
            // from anchorElement to figure out what child of ours (if any) to use as the suggested element.

            auto child = anchorElement;
            auto parent = CachedVisualTreeHelpers::GetParent(child).as<winrt::UIElement>();
            while (parent)
            {
                if (parent == owner)
                {
                    suggestedAnchor = child;
                    break;
                }

                child = parent;
                parent = CachedVisualTreeHelpers::GetParent(parent).as<winrt::UIElement>();
            }
        }
    }

    return suggestedAnchor;
}

void TryInvalidateMeasure ( ) [private]

Definition at line 482 of file ViewportManagerDownlevel.cpp.

{
    // Don't invalidate measure if we have an invalid window.
    if (m_visibleWindow != winrt::Rect())
    {
        // We invalidate measure instead of just invalidating arrange because
        // we don't invalidate measure in UpdateViewport if the view is changing to
        // avoid layout cycles.
        REPEATER_TRACE_INFO(L"%ls: \tInvalidating measure due to viewport change. \n", GetLayoutId().data());
        m_owner->InvalidateMeasure();
    }
}

void UpdateViewport ( ) [private]

Definition at line 384 of file ViewportManagerDownlevel.cpp.

{
    assert(!m_managingViewportDisabled);

    const auto previousVisibleWindow = m_visibleWindow;
    const auto horizontalVisibleWindow =
        m_horizontalScroller ?
        m_horizontalScroller.get().GetRelativeViewport(*m_owner) :
        winrt::Rect();
    const auto verticalVisibleWindow =
        m_verticalScroller ?
        (m_verticalScroller.get() == m_horizontalScroller.get() ?
            horizontalVisibleWindow :
            m_verticalScroller.get().GetRelativeViewport(*m_owner)) :
        winrt::Rect();
    const auto currentVisibleWindow =
        HasScrollers() ?
        winrt::Rect
        {
            m_horizontalScroller ? horizontalVisibleWindow.X : verticalVisibleWindow.X,
            m_verticalScroller ? verticalVisibleWindow.Y : horizontalVisibleWindow.Y,
            m_horizontalScroller ? horizontalVisibleWindow.Width : verticalVisibleWindow.Width,
            m_verticalScroller ? verticalVisibleWindow.Height : horizontalVisibleWindow.Height
        } :
        winrt::Rect{ 0.0f, 0.0f, std::numeric_limits<float>::max(), std::numeric_limits<float>::max() };

    if (-currentVisibleWindow.X <= ItemsRepeater::ClearedElementsArrangePosition.X &&
        -currentVisibleWindow.Y <= ItemsRepeater::ClearedElementsArrangePosition.Y)
    {
        // We got cleared.
        m_visibleWindow = {};
    }
    else
    {
        REPEATER_TRACE_INFO(L"%ls: \tViewport: (%.0f,%.0f,%.0f,%.0f)->(%.0f,%.0f,%.0f,%.0f). \n",
            GetLayoutId().data(),
            previousVisibleWindow.X, previousVisibleWindow.Y, previousVisibleWindow.Width, previousVisibleWindow.Height,
            currentVisibleWindow.X, currentVisibleWindow.Y, currentVisibleWindow.Width, currentVisibleWindow.Height);
        m_visibleWindow = currentVisibleWindow;
    }

    const bool viewportChanged =
        std::abs(m_visibleWindow.X - previousVisibleWindow.X) > 1 ||
        std::abs(m_visibleWindow.Y - previousVisibleWindow.Y) > 1 ||
        m_visibleWindow.Width != previousVisibleWindow.Width ||
        m_visibleWindow.Height != previousVisibleWindow.Height;

    if (viewportChanged)
    {
        TryInvalidateMeasure();
    }
}

void ValidateCacheLength ( double cacheLength ) [private]

Definition at line 454 of file ViewportManagerDownlevel.cpp.

{
    if (cacheLength < 0.0 || std::isinf(cacheLength) || std::isnan(cacheLength))
    {
        throw winrt::hresult_invalid_argument(L"The maximum cache length must be equal or superior to zero.");
    }
}

double VerticalCacheLength ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 24 of file ViewportManagerDownlevel.h.

{ return m_maximumVerticalCacheLength; }

void VerticalCacheLength ( double value ) [override, virtual]

Implements ViewportManager.

Definition at line 79 of file ViewportManagerDownlevel.cpp.

{
    if (m_maximumVerticalCacheLength != value)
    {
        ValidateCacheLength(value);
        m_maximumVerticalCacheLength = value;
        ResetCacheBuffer();
    }
}

Member Data Documentation

tracker_ref<winrt::IAsyncAction> m_cacheBuildAction [private]

Definition at line 85 of file ViewportManagerDownlevel.h.

tracker_ref<winrt::IRepeaterScrollingSurface> m_horizontalScroller [private]

Definition at line 79 of file ViewportManagerDownlevel.h.

tracker_ref<winrt::IRepeaterScrollingSurface> m_innerScrollableScroller [private]

Definition at line 82 of file ViewportManagerDownlevel.h.

tracker_ref<winrt::UIElement> m_makeAnchorElement [private]

Definition at line 84 of file ViewportManagerDownlevel.h.

std::vector<ScrollerInfo> m_parentScrollers [private]

Definition at line 67 of file ViewportManagerDownlevel.h.

winrt::IRepeaterScrollingSurface::PostArrange_revoker m_postArrangeToken [private]

Definition at line 89 of file ViewportManagerDownlevel.h.

tracker_ref<winrt::IRepeaterScrollingSurface> m_verticalScroller [private]

Definition at line 80 of file ViewportManagerDownlevel.h.

The documentation for this class was generated from the following files:
  • Repeater/ViewportManagerDownlevel.h
  • Repeater/ViewportManagerDownlevel.cpp
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportManagerDownLevel::ScrollerInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • ViewportManagerDownLevel
  • ViewportManagerDownLevel::ScrollerInfo
Public Member Functions | Private Attributes

ViewportManagerDownLevel::ScrollerInfo Struct Reference

List of all members.

Public Member Functions

ScrollerInfo (const ITrackerHandleManager *owner, winrt::IRepeaterScrollingSurface scroller)
winrt::IRepeaterScrollingSurface Scroller () const

Private Attributes

tracker_ref
< winrt::IRepeaterScrollingSurface > 		m_scroller

Detailed Description

Definition at line 114 of file ViewportManagerDownlevel.h.

Constructor & Destructor Documentation

ScrollerInfo | ( | const ITrackerHandleManager * | owner,
 |  | winrt::IRepeaterScrollingSurface | scroller |
 | ) |  |  | [inline]

Definition at line 116 of file ViewportManagerDownlevel.h.

                                                     :
            m_scroller(owner, scroller)
        { }

Member Function Documentation

winrt::IRepeaterScrollingSurface Scroller ( ) const [inline]

Definition at line 122 of file ViewportManagerDownlevel.h.

        {
            return m_scroller.get();
        }

Member Data Documentation

tracker_ref<winrt::IRepeaterScrollingSurface> m_scroller [private]

Definition at line 127 of file ViewportManagerDownlevel.h.

The documentation for this struct was generated from the following file:
  • Repeater/ViewportManagerDownlevel.h
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ViewportManagerWithPlatformFeatures Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

ViewportManagerWithPlatformFeatures Class Reference

#include "ViewportManagerWithPlatformFeatures.h"

Inherits ViewportManager.

List of all members.

Public Member Functions

ViewportManagerWithPlatformFeatures (ItemsRepeater *owner)
winrt::Rect | GetLayoutExtent () const override
winrt::Rect | GetLayoutRealizationWindow () const override
winrt::Rect | GetLayoutVisibleWindow () const override
winrt::Point | GetOrigin () const override
void | HorizontalCacheLength (double value) override
double | HorizontalCacheLength () const override
winrt::UIElement | MadeAnchor () const override
void | OnBringIntoViewRequested (const winrt::BringIntoViewRequestedEventArgs &args) override
void | OnElementCleared (const winrt::UIElement &element) override
void | OnElementPrepared (const winrt::UIElement &element) override
void | OnLayoutChanged (bool isVirtualizing) override
void | OnMakeAnchor (const winrt::UIElement &anchor, const bool isAnchorOutsideRealizedRange) override
void | OnOwnerArranged () override
void | OnOwnerMeasuring () override
void | ResetLayoutRealizationWindowCacheBuffer () override
void | ResetScrollers () override
void | SetLayoutExtent (const winrt::Rect &layoutExtent) override
winrt::UIElement | SuggestedAnchor () const override
void | VerticalCacheLength (double value) override
double | VerticalCacheLength () const override

Private Member Functions

void | EnsureScroller ()
winrt::UIElement | GetImmediateChildOfRepeater (winrt::UIElement const &descendant)
winrt::hstring | GetLayoutId () const
winrt::Rect | GetLayoutVisibleWindowDiscardAnchor () const
bool | HasScroller () const
void | OnCacheBuildActionCompleted ()
void | OnCompositionTargetRendering (winrt::IInspectable const &sender, winrt::IInspectable const &args)
void | OnEffectiveViewportChanged (winrt::FrameworkElement const &sender, winrt::EffectiveViewportChangedEventArgs const &args)
void | OnLayoutUpdated (winrt::IInspectable const &sender, winrt::IInspectable const &args)
void | OnScrollPresenterScrollStarting (winrt::ScrollPresenter const &scrollPresenter, winrt::ScrollingScrollStartingEventArgs const &args)
void | OnScrollPresenterViewChangeStarting (winrt::ScrollPresenter const &scrollPresenter, double horizontalOffset, double verticalOffset, float zoomFactor)
void | OnScrollPresenterZoomStarting (winrt::ScrollPresenter const &scrollPresenter, winrt::ScrollingZoomStartingEventArgs const &args)
void | RegisterCacheBuildWork ()
void | RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates ()
void | RegisterPreparedElementsAsArranged ()
void | ResetCacheBuffer (bool registerCacheBuildWork=true)
void | ResetExpectedViewportShift ()
void | ResetLayoutExtent ()
void | ResetPendingViewportShift ()
void | ResetUnshiftableShift ()
void | ResetVisibleWindow ()
void | SetExpectedViewportShift (float expectedViewportShiftX, float expectedViewportShiftY)
void | SetPendingViewportShift (const winrt::Point &pendingViewportShift)
void | SetUnshiftableShift (float unshiftableShiftX, float unshiftableShiftY)
void | SetVisibleWindow (const winrt::Rect &visibleWindow)
void | TryInvalidateMeasure ()
void | UnregisterScrollAnchorCandidates (winrt::UIElement const &exceptionElement, bool registerAsPreparedAndArrangedElements)
bool | UpdateViewport (winrt::Rect const &effectiveViewport)
void | ValidateCacheLength (double cacheLength)

Private Attributes

tracker_ref< winrt::UIElement > | m_makeAnchorElement
std::vector< tracker_ref
< winrt::UIElement > > 		m_preparedAndArrangedElements
std::vector< tracker_ref
< winrt::UIElement > > 		m_preparedElements
tracker_ref
< winrt::Controls::IScrollAnchorProvider > 		m_scroller

Detailed Description

Definition at line 16 of file ViewportManagerWithPlatformFeatures.h.

Constructor & Destructor Documentation

ViewportManagerWithPlatformFeatures ( ItemsRepeater * owner )

Definition at line 17 of file ViewportManagerWithPlatformFeatures.cpp.

                                                                                :
    m_owner(owner),
    m_scroller(owner),
    m_makeAnchorElement(owner)
{
    // ItemsRepeater is not fully constructed yet. Don't interact with it.
}

Member Function Documentation

void EnsureScroller ( ) [private]

Definition at line 797 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (!m_ensuredScroller)
    {
        ResetScrollers();

        auto parent = CachedVisualTreeHelpers::GetParent(*m_owner);
        while (parent)
        {
            if (const auto scroller = parent.try_as<winrt::Controls::IScrollAnchorProvider>())
            {
                m_scroller.set(scroller);
                break;
            }

            parent = CachedVisualTreeHelpers::GetParent(parent);
        }

        if (!m_managingViewportDisabled)
        {
            // When the ItemsRepeater is hosted in a Popup, m_scroller is null, but ItemsRepeater::EffectiveViewportChanged will still get raised.
            m_effectiveViewportChangedRevoker = m_owner->EffectiveViewportChanged(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged });
        }

        if (const auto scrollPresenter2 = m_scroller.try_as<winrt::IScrollPresenter2>())
        {
            m_scrollPresenterScrollStartingRevoker = scrollPresenter2.ScrollStarting(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnScrollPresenterScrollStarting });
            m_scrollPresenterZoomStartingRevoker = scrollPresenter2.ZoomStarting(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnScrollPresenterZoomStarting });
        }

        m_ensuredScroller = true;
    }
}

winrt::UIElement GetImmediateChildOfRepeater ( winrt::UIElement const & descendant ) [private]

Definition at line 566 of file ViewportManagerWithPlatformFeatures.cpp.

{
    winrt::UIElement targetChild = descendant;
    winrt::UIElement parent = CachedVisualTreeHelpers::GetParent(descendant).as<winrt::UIElement>();
    while (parent != nullptr && parent != static_cast<winrt::DependencyObject>(*m_owner))
    {
        targetChild = parent;
        parent = CachedVisualTreeHelpers::GetParent(parent).as<winrt::UIElement>();
    }

    if (!parent)
    {
        throw winrt::hresult_error(E_FAIL, L"OnBringIntoViewRequested called with args.target element not under the ItemsRepeater that recieved the call");
    }

    return targetChild;
}

winrt::Rect GetLayoutExtent ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 33 of file ViewportManagerWithPlatformFeatures.h.

{ return m_layoutExtent; }

winrt::hstring GetLayoutId ( ) const [private]

Definition at line 1031 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (auto layout = m_owner->Layout())
    {
        return layout.as<Layout>()->LayoutId();
    }

    return winrt::hstring{};
}

winrt::Rect GetLayoutRealizationWindow ( ) const [override, virtual]

Implements ViewportManager.

Definition at line 137 of file ViewportManagerWithPlatformFeatures.cpp.

{
    auto realizationWindow = GetLayoutVisibleWindow();
    if (HasScroller())
    {
        realizationWindow.X -= static_cast<float>(m_horizontalCacheBufferPerSide);
        realizationWindow.Y -= static_cast<float>(m_verticalCacheBufferPerSide);
        realizationWindow.Width += static_cast<float>(m_horizontalCacheBufferPerSide) * 2.0f;
        realizationWindow.Height += static_cast<float>(m_verticalCacheBufferPerSide) * 2.0f;
    }

    return realizationWindow;
}

winrt::Rect GetLayoutVisibleWindow ( ) const [override, virtual]

Implements ViewportManager.

Definition at line 109 of file ViewportManagerWithPlatformFeatures.cpp.

{
    auto visibleWindow = m_visibleWindow;

    if (m_makeAnchorElement && m_isAnchorOutsideRealizedRange)
    {
        // The anchor is not necessarily laid out yet. Its position should default
        // to zero and the layout origin is expected to change once layout is done.
        // Until then, we need a window that's going to protect the anchor from
        // getting recycled.

        // Also, we only want to mess with the realization rect iff the anchor is not inside it.
        // If we fiddle with an anchor that is already inside the realization rect,
        // shifting the realization rect results in repeater, layout and scroller thinking that it needs to act upon StartBringIntoView.
        // We do NOT want that!

        visibleWindow.X = 0.0f;
        visibleWindow.Y = 0.0f;
    }
    else if (HasScroller())
    {
        visibleWindow.X += m_layoutExtent.X + m_expectedViewportShift.X + m_unshiftableShift.X;
        visibleWindow.Y += m_layoutExtent.Y + m_expectedViewportShift.Y + m_unshiftableShift.Y;
    }

    return visibleWindow;
}

winrt::Rect GetLayoutVisibleWindowDiscardAnchor ( ) const [private]

Definition at line 96 of file ViewportManagerWithPlatformFeatures.cpp.

{
    auto visibleWindow = m_visibleWindow;

    if (HasScroller())
    {
        visibleWindow.X += m_layoutExtent.X + m_expectedViewportShift.X + m_unshiftableShift.X;
        visibleWindow.Y += m_layoutExtent.Y + m_expectedViewportShift.Y + m_unshiftableShift.Y;
    }

    return visibleWindow;
}

winrt::Point GetOrigin ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 34 of file ViewportManagerWithPlatformFeatures.h.

{ return winrt::Point(m_layoutExtent.X, m_layoutExtent.Y); }

bool HasScroller ( ) const [inline, private]

Definition at line 71 of file ViewportManagerWithPlatformFeatures.h.

{ return m_scroller != nullptr; }

void HorizontalCacheLength ( double value ) [override, virtual]

Implements ViewportManager.

Definition at line 76 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_maximumHorizontalCacheLength != value)
    {
        ValidateCacheLength(value);
        m_maximumHorizontalCacheLength = value;
        ResetCacheBuffer();
    }
}

double HorizontalCacheLength ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 23 of file ViewportManagerWithPlatformFeatures.h.

{ return m_maximumHorizontalCacheLength; }

winrt::UIElement MadeAnchor ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 47 of file ViewportManagerWithPlatformFeatures.h.

{ return m_makeAnchorElement.get(); }

void OnBringIntoViewRequested ( const winrt::BringIntoViewRequestedEventArgs & args ) [override, virtual]

Implements ViewportManager.

Definition at line 528 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());

    if (!m_managingViewportDisabled)
    {
        // We do not animate bring-into-view operations where the anchor is disconnected because
        // it doesn't look good (the blank space is obvious because the layout can't keep track
        // of two realized ranges while the animation is going on).
        if (m_isAnchorOutsideRealizedRange)
        {
            args.AnimationDesired(false);
        }

        // During the time between a bring into view request and the element coming into view we do not
        // want the anchor provider to pick some anchor and jump to it. Instead we want to anchor on the
        // element that is being brought into view. We can do this by making just that element as a potential
        // anchor candidate and ensure no other element of this repeater is an anchor candidate.
        // Once the layout pass is done and we render the frame, the element will be in frame and we can
        // switch back to letting the anchor provider pick a suitable anchor.

        // get the targetChild - i.e the immediate child of this repeater that is being brought into view.
        // Note that the element being brought into view could be a descendant.
        const auto targetChild = GetImmediateChildOfRepeater(args.TargetElement());

        // Make sure that only the target child can be the anchor during the bring into view operation.
        UnregisterScrollAnchorCandidates(targetChild /*exceptionElement*/, false /*registerAsPreparedAndArrangedElements*/);

        // Register to rendering event to go back to how things were before where any child can be the anchor.
        m_isBringIntoViewInProgress = true;
        if (!m_renderingToken)
        {
            winrt::Microsoft::UI::Xaml::Media::CompositionTarget compositionTarget{ nullptr };
            m_renderingToken = compositionTarget.Rendering(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnCompositionTargetRendering });
        }
    }
}

void OnCacheBuildActionCompleted ( ) [private]

Definition at line 635 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_cacheBuildActionOutstanding)
    {
        ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"m_cacheBuildActionOutstanding reset.");

        m_cacheBuildActionOutstanding = false;
    }

    if (!m_managingViewportDisabled)
    {
        m_owner->InvalidateMeasure();
    }
}

void OnCompositionTargetRendering | ( | winrt::IInspectable const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]

Definition at line 584 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"Resets m_makeAnchorElement.", m_makeAnchorElement);

    MUX_ASSERT(!m_managingViewportDisabled);

    m_renderingToken.revoke();

    m_isBringIntoViewInProgress = false;

    if (m_makeAnchorElement)
    {
        m_makeAnchorElement.set(nullptr);

        if (m_isAnchorOutsideRealizedRange)
        {
            m_isAnchorOutsideRealizedRange = false;

            // During the bring-into-view operation, the layout anchor was positioned at the top/left
            // of the viewport (see ViewportManagerWithPlatformFeatures::GetLayoutVisibleWindow()).
            // Now it may move within the viewport and require different items to be generated given
            // its final position. Thus a new measure pass is requested.
            TryInvalidateMeasure();
        }
    }

    // Now that the item has been brought into view, we can let the anchor provider pick a new anchor.
    for (const auto& child : m_owner->Children())
    {
        if (!child.CanBeScrollAnchor())
        {
            auto info = ItemsRepeater::GetVirtualizationInfo(child);
            if (info->IsRealized() && info->IsHeldByLayout())
            {
                child.CanBeScrollAnchor(true);
            }
        }
    }
}

void OnEffectiveViewportChanged | ( | winrt::FrameworkElement const & | sender,
 |  | winrt::EffectiveViewportChangedEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 750 of file ViewportManagerWithPlatformFeatures.cpp.

{
    winrt::Rect effectiveViewport = args.EffectiveViewport();

#ifdef DBG
    MUX_ASSERT(!m_managingViewportDisabled);

    ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
        L"EffectiveViewport:", effectiveViewport.X, effectiveViewport.Y, effectiveViewport.Width, effectiveViewport.Height);

    TraceScrollerDbg();
#endif // DBG

    bool invalidateMeasure = false;
    const bool invalidatedMeasure = UpdateViewport(args.EffectiveViewport());
    const winrt::Point emptyPoint = {};
    const winrt::Rect emptyRect = {};

    if (m_pendingViewportShift != emptyPoint)
    {
        ResetPendingViewportShift();
        invalidateMeasure = true;
    }

    if (m_unshiftableShift != emptyPoint)
    {
        ResetUnshiftableShift();
        invalidateMeasure = true;
    }

    if (m_visibleWindow == emptyRect && m_layoutExtent != emptyRect)
    {
        // We got cleared.
        ResetLayoutExtent();
        invalidateMeasure = true;
    }

    if (invalidateMeasure && !invalidatedMeasure)
    {
        TryInvalidateMeasure();
    }

    // We got a new viewport, we don't need to wait for layout updated anymore to
    // see if our request for a pending shift was handled.
    m_layoutUpdatedRevoker.revoke();
}

void OnElementCleared ( const winrt::UIElement & element ) [override, virtual]

Implements ViewportManager.

Definition at line 354 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, element);

    // Remove the element from the prepared and prepared+arranged lists so it no longer gets registered as an anchor candidate for the scroller
    // after the next arrange pass.

    const auto itPreparedElement = std::find_if(m_preparedElements.cbegin(), m_preparedElements.cend(),
        [&element](const tracker_ref<winrt::UIElement>& preparedElement) { return preparedElement.get() == element; });

    if (itPreparedElement != m_preparedElements.cend())
    {
        m_preparedElements.erase(itPreparedElement);
    }

    const auto itPreparedAndArrangedElement = std::find_if(m_preparedAndArrangedElements.cbegin(), m_preparedAndArrangedElements.cend(),
        [&element](const tracker_ref<winrt::UIElement>& preparedAndArrangedElement) { return preparedAndArrangedElement.get() == element; });

    if (itPreparedAndArrangedElement != m_preparedAndArrangedElements.cend())
    {
        m_preparedAndArrangedElements.erase(itPreparedAndArrangedElement);
    }

    if (element.CanBeScrollAnchor())
    {
        // Unregister the element as an anchor candidate since it was already declared as such.
        element.CanBeScrollAnchor(false);
    }
}

void OnElementPrepared ( const winrt::UIElement & element ) [override, virtual]

Implements ViewportManager.

Definition at line 337 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, element);

    // The newly prepared element is not registered as an anchor candidate right away. It first needs to be arranged at least once so its position
    // tracked by the scroller is valid.
    // The element is first put into a list of prepared elements. Then once arranged it is put into a list of prepared+arranged elements. Then finally
    // at the beginning of the following measure pass, it is registered as an anchor candidate.

    const auto itPreparedElement = std::find_if(m_preparedElements.cbegin(), m_preparedElements.cend(), [&element](const tracker_ref<winrt::UIElement>& preparedElement) { return preparedElement.get() == element; });

    if (itPreparedElement == m_preparedElements.cend())
    {
        m_preparedElements.push_back(tracker_ref<winrt::UIElement>{ m_owner, element });
    }
}

void OnLayoutChanged ( bool isVirtualizing ) [override, virtual]

Implements ViewportManager.

Definition at line 313 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this,
        GetLayoutId().data(), isVirtualizing);

    m_managingViewportDisabled = !isVirtualizing;

    ResetLayoutExtent();
    ResetExpectedViewportShift();
    ResetPendingViewportShift();

    if (m_managingViewportDisabled)
    {
        m_effectiveViewportChangedRevoker.revoke();
    }
    else if (!m_effectiveViewportChangedRevoker)
    {
        m_effectiveViewportChangedRevoker = m_owner->EffectiveViewportChanged(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged });
    }

    ResetUnshiftableShift();
    ResetCacheBuffer();
}

void OnLayoutUpdated | ( | winrt::IInspectable const & | sender,
 |  | winrt::IInspectable const & | args |
 | ) |  |  | [private]

Definition at line 481 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());

    m_layoutUpdatedRevoker.revoke();
    if (m_managingViewportDisabled)
    {
        return;
    }

    // We were expecting a viewport shift but we never got one and we are not going to in this
    // layout pass. We likely will never get this shift, so lets assume that we are never going to get it and
    // adjust our expected shift to track that. One case where this can happen is when there is no scroller
    // that can scroll in the direction where the shift is expected.
    if (m_pendingViewportShift.X != 0.0f || m_pendingViewportShift.Y != 0.0f)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"Layout Updated with pending shift - invalidating measure",
            m_pendingViewportShift.X,
            m_pendingViewportShift.Y);

        // Assume this is never going to come.
        SetUnshiftableShift(m_unshiftableShift.X + m_pendingViewportShift.X, m_unshiftableShift.Y + m_pendingViewportShift.Y);
        ResetPendingViewportShift();
        ResetExpectedViewportShift();

        TryInvalidateMeasure();
    }
}

void OnMakeAnchor | ( | const winrt::UIElement & | anchor,
 |  | const bool | isAnchorOutsideRealizedRange |
 | ) |  |  | [override, virtual]

Implements ViewportManager.

Definition at line 511 of file ViewportManagerWithPlatformFeatures.cpp.

{
#ifdef DBG
    if (anchor == nullptr)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"Resets m_makeAnchorElement.", m_makeAnchorElement);
    }
    else
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"Sets m_makeAnchorElement.", anchor);
    }
#endif // DBG

    m_makeAnchorElement.set(anchor);
    m_isAnchorOutsideRealizedRange = isAnchorOutsideRealizedRange;
}

void OnOwnerArranged ( ) [override, virtual]

Implements ViewportManager.

Definition at line 422 of file ViewportManagerWithPlatformFeatures.cpp.

{
#ifdef DBG
    ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());

    TraceScrollerDbg();
    TraceFieldsDbg();
#endif // DBG

    if (!m_skipScrollAnchorRegistrationsDuringNextMeasurePass)
    {
        if (m_skipScrollAnchorRegistrationsDuringNextArrangePass)
        {
            ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"m_skipScrollAnchorRegistrationsDuringNextArrangePass reset.");

            m_skipScrollAnchorRegistrationsDuringNextArrangePass = false;
        }
        else
        {
            // Now that an arrange pass completed, register the prepared elements as arranged. They will be registered as anchor candidates
            // during the next measure pass.
            RegisterPreparedElementsAsArranged();
        }
    }

    ResetExpectedViewportShift();

    if (!m_managingViewportDisabled)
    {
        // This is because of a bug that causes effective viewport to not
        // fire if you register during arrange.
        // Bug 17411076: EffectiveViewport: registering for effective viewport in arrange should invalidate viewport
        // EnsureScroller();

        if (HasScroller())
        {
            const double maximumHorizontalCacheBufferPerSide = m_maximumHorizontalCacheLength * m_visibleWindow.Width / 2.0;
            const double maximumVerticalCacheBufferPerSide = m_maximumVerticalCacheLength * m_visibleWindow.Height / 2.0;

            const bool continueBuildingCache =
                m_horizontalCacheBufferPerSide < maximumHorizontalCacheBufferPerSide ||
                m_verticalCacheBufferPerSide < maximumVerticalCacheBufferPerSide;

            if (continueBuildingCache)
            {
                m_horizontalCacheBufferPerSide += CacheBufferPerSideInflationPixelDelta;
                m_verticalCacheBufferPerSide += CacheBufferPerSideInflationPixelDelta;

                m_horizontalCacheBufferPerSide = std::min(m_horizontalCacheBufferPerSide, maximumHorizontalCacheBufferPerSide);
                m_verticalCacheBufferPerSide = std::min(m_verticalCacheBufferPerSide, maximumVerticalCacheBufferPerSide);

                // Since we grow the cache buffer at the end of the arrange pass,
                // we need to register work even if we just reached cache potential.
                RegisterCacheBuildWork();
            }
        }
    }
}

void OnOwnerMeasuring ( ) [override, virtual]

Implements ViewportManager.

Definition at line 384 of file ViewportManagerWithPlatformFeatures.cpp.

{
    // This is because of a bug that causes effective viewport to not
    // fire if you register during arrange.
    // Bug 17411076: EffectiveViewport: registering for effective viewport in arrange should invalidate viewport
    EnsureScroller();

    winrt::Rect currentLayoutRealizationWindow = GetLayoutRealizationWindow();

    if ((m_horizontalCacheBufferPerSide != 0.0 || m_verticalCacheBufferPerSide != 0.0) &&
        (m_lastLayoutRealizationWindow.Width <= 0.0f || m_lastLayoutRealizationWindow.Height <= 0.0f ||
         currentLayoutRealizationWindow.Width <= 0.0f || currentLayoutRealizationWindow.Height <= 0.0f ||
         !SharedHelpers::DoRectsIntersect(m_lastLayoutRealizationWindow, currentLayoutRealizationWindow)))
    {
        // Two consecutive measure passes use disconnected realization windows.
        // Reset the potential cache buffer so that it regrows from scratch.
        ResetLayoutRealizationWindowCacheBuffer();
    }

    m_lastLayoutRealizationWindow = currentLayoutRealizationWindow;

    if (m_skipScrollAnchorRegistrationsDuringNextMeasurePass)
    {
        ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"m_skipScrollAnchorRegistrationsDuringNextMeasurePass reset.");

        m_skipScrollAnchorRegistrationsDuringNextMeasurePass = false;
    }
    else if (!m_skipScrollAnchorRegistrationsDuringNextArrangePass)
    {
        // Now that a new measure pass is starting, register the previously arranged elements as anchor candidates for the scroller.
        RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates();
    }

#ifdef DBG
    TraceScrollerDbg();
#endif // DBG
}

void OnScrollPresenterScrollStarting | ( | winrt::ScrollPresenter const & | scrollPresenter,
 |  | winrt::ScrollingScrollStartingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 656 of file ViewportManagerWithPlatformFeatures.cpp.

{
    OnScrollPresenterViewChangeStarting(scrollPresenter, args.HorizontalOffset(), args.VerticalOffset(), args.ZoomFactor());
}

void OnScrollPresenterViewChangeStarting | ( | winrt::ScrollPresenter const & | scrollPresenter,
 |  | double | horizontalOffset,
 |  | double | verticalOffset,
 |  | float | zoomFactor |
 | ) |  |  | [private]

Definition at line 666 of file ViewportManagerWithPlatformFeatures.cpp.

{
    const float blankViewportRatioTolerated = 0.05f;
    const float anticipatedHorizontalOffset = static_cast<float>(horizontalOffset);
    const float anticipatedVerticalOffset = static_cast<float>(verticalOffset);
    const float anticipatedZoomFactor = zoomFactor;
    const float anticipatedExtentWidth = static_cast<float>(scrollPresenter.ExtentWidth() * anticipatedZoomFactor);
    const float anticipatedExtentHeight = static_cast<float>(scrollPresenter.ExtentHeight() * anticipatedZoomFactor);
    const float viewportWidth = static_cast<float>(scrollPresenter.ViewportWidth());
    const float viewportHeight = static_cast<float>(scrollPresenter.ViewportHeight());
    const float unzoomedAnticipatedHorizontalOffset = anticipatedHorizontalOffset / anticipatedZoomFactor;
    const float unzoomedAnticipatedVerticalOffset = anticipatedVerticalOffset / anticipatedZoomFactor;
    const float scaledViewportWidth = viewportWidth / anticipatedZoomFactor;
    const float scaledViewportHeight = viewportHeight / anticipatedZoomFactor;
    const winrt::UIElement owner = *m_owner;
    const winrt::FrameworkElement ownerAsFE = owner.as<winrt::FrameworkElement>();

#ifdef DBG
    ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
        L"Anticipated HorizontalOffset, VerticalOffset:", anticipatedHorizontalOffset, anticipatedVerticalOffset);
    ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT, METH_NAME, this, GetLayoutId().data(),
        L"Anticipated ZoomFactor:", anticipatedZoomFactor);

    TraceFieldsDbg();
#endif // DBG

    winrt::Rect anticipatedLayoutRealizationWindow = {
        unzoomedAnticipatedHorizontalOffset,
        unzoomedAnticipatedVerticalOffset,
        scaledViewportWidth,
        scaledViewportHeight };

    if (anticipatedExtentWidth < viewportWidth)
    {
        const winrt::HorizontalAlignment horizontalAlignment = ownerAsFE.HorizontalAlignment();

        if (horizontalAlignment == winrt::HorizontalAlignment::Center || horizontalAlignment == winrt::HorizontalAlignment::Stretch)
        {
            anticipatedLayoutRealizationWindow.X -= (viewportWidth - anticipatedExtentWidth) / 2.0f / anticipatedZoomFactor;
        }
        else if (horizontalAlignment == winrt::HorizontalAlignment::Right)
        {
            anticipatedLayoutRealizationWindow.X -= (viewportWidth - anticipatedExtentWidth) / anticipatedZoomFactor;
        }
    }

    if (anticipatedExtentHeight < viewportHeight)
    {
        const winrt::VerticalAlignment verticalAlignment = ownerAsFE.VerticalAlignment();

        if (verticalAlignment == winrt::VerticalAlignment::Center || verticalAlignment == winrt::VerticalAlignment::Stretch)
        {
            anticipatedLayoutRealizationWindow.Y -= (viewportHeight - anticipatedExtentHeight) / 2.0f / anticipatedZoomFactor;
        }
        else if (verticalAlignment == winrt::VerticalAlignment::Bottom)
        {
            anticipatedLayoutRealizationWindow.Y -= (viewportHeight - anticipatedExtentHeight) / anticipatedZoomFactor;
        }
    }

    // No UI re-generation is performed if the last recorded realization window, m_lastLayoutRealizationWindow, is empty. This avoids UI generation when the actual effective viewport is empty.
    if (m_lastLayoutRealizationWindow.Width > 0.0f && m_lastLayoutRealizationWindow.Height > 0.0f &&
        m_unshiftableShift == winrt::Point() && // Do not affect start of a bring-into-view operation when the target layout anchor is realized and arranged, which results in m_unshiftableShift being set.
        (anticipatedLayoutRealizationWindow.X < m_lastLayoutRealizationWindow.X - blankViewportRatioTolerated * scaledViewportWidth ||
         anticipatedLayoutRealizationWindow.X > m_lastLayoutRealizationWindow.X + m_lastLayoutRealizationWindow.Width - (1.0f - blankViewportRatioTolerated) * scaledViewportWidth ||
         anticipatedLayoutRealizationWindow.Y < m_lastLayoutRealizationWindow.Y - blankViewportRatioTolerated * scaledViewportHeight ||
         anticipatedLayoutRealizationWindow.Y > m_lastLayoutRealizationWindow.Y + m_lastLayoutRealizationWindow.Height - (1.0f - blankViewportRatioTolerated) * scaledViewportHeight))
    {
        // Using the smallest effective viewport, viewportWidth x viewportHeight, to cover the ScrollPresenter's viewport. It may still be too large if a part of the scroller is not displayed on screen.
        const bool invalidatedMeasure = UpdateViewport(anticipatedLayoutRealizationWindow);

        if (invalidatedMeasure)
        {
            UnregisterScrollAnchorCandidates(nullptr /*exceptionElement*/, true /*registerAsPreparedAndArrangedElements*/);

            ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"m_skipScrollAnchorRegistrationsDuringNextMeasurePass/m_skipScrollAnchorRegistrationsDuringNextArrangePass set.");

            // During such a UI re-generation, scroll anchoring is momentarily turned off to avoid unwanted anchoring-driven scrolls.
            m_skipScrollAnchorRegistrationsDuringNextMeasurePass = true;
            m_skipScrollAnchorRegistrationsDuringNextArrangePass = true;
        }
    }
}

void OnScrollPresenterZoomStarting | ( | winrt::ScrollPresenter const & | scrollPresenter,
 |  | winrt::ScrollingZoomStartingEventArgs const & | args |
 | ) |  |  | [private]

Definition at line 661 of file ViewportManagerWithPlatformFeatures.cpp.

{
    OnScrollPresenterViewChangeStarting(scrollPresenter, args.HorizontalOffset(), args.VerticalOffset(), args.ZoomFactor());
}

void RegisterCacheBuildWork ( ) [private]

Definition at line 969 of file ViewportManagerWithPlatformFeatures.cpp.

{
    MUX_ASSERT(!m_managingViewportDisabled);

    if (!m_cacheBuildActionOutstanding)
    {
        // We capture 'owner' (a strong reference on ItemsRepeater) to make sure ItemsRepeater is still around
        // when the async action completes. By protecting ItemsRepeater, we also ensure that this instance
        // of ViewportManager (referenced by 'this' pointer) is valid because the lifetime of ItemsRepeater
        // and ViewportManager is the same (see ItemsRepeater::m_viewportManager).
        // We can't simply hold a strong reference on ViewportManager because it's not a COM object.
        auto strongOwner = m_owner->get_strong();
        m_cacheBuildActionOutstanding =
            m_owner->DispatcherQueue().TryEnqueue([this, strongOwner](auto&&...)
            {
                OnCacheBuildActionCompleted();
            });

        ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_STR_INT, METH_NAME, this,
            GetLayoutId().data(), L"m_cacheBuildActionOutstanding set:", m_cacheBuildActionOutstanding);
    }
#ifdef DBG
    else
    {
        ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this,
            GetLayoutId().data(), L"m_cacheBuildActionOutstanding already set.");
    }
#endif // DBG
}

void RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates ( ) [private]

Definition at line 942 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_preparedAndArrangedElements.size:", m_preparedAndArrangedElements.size());

    if (m_preparedAndArrangedElements.size() == 0)
    {
        return;
    }

    for (tracker_ref<winrt::UIElement> anchorCandidateTracker : m_preparedAndArrangedElements)
    {
        const winrt::UIElement anchorCandidate = anchorCandidateTracker.get();

        if (!anchorCandidate.CanBeScrollAnchor())
        {
            const auto info = ItemsRepeater::GetVirtualizationInfo(anchorCandidate);

            if (info->IsRealized() && info->IsHeldByLayout())
            {
                anchorCandidate.CanBeScrollAnchor(true);
            }
        }
    }

    m_preparedAndArrangedElements.clear();
}

void RegisterPreparedElementsAsArranged ( ) [private]

Definition at line 917 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_preparedElements.size:", m_preparedElements.size());

    if (m_preparedElements.size() == 0)
    {
        return;
    }

    for (tracker_ref<winrt::UIElement> preparedElementTracker : m_preparedElements)
    {
        const winrt::UIElement preparedElement = preparedElementTracker.get();

        const auto it = std::find_if(m_preparedAndArrangedElements.cbegin(), m_preparedAndArrangedElements.cend(),
            [&preparedElement](const tracker_ref<winrt::UIElement>& preparedAndArrangedElement) { return preparedAndArrangedElement.get() == preparedElement; });

        if (it == m_preparedAndArrangedElements.cend())
        {
            m_preparedAndArrangedElements.push_back(tracker_ref<winrt::UIElement>{ m_owner, preparedElement });
        }
    }

    m_preparedElements.clear();
}

void ResetCacheBuffer ( bool registerCacheBuildWork = true ) [private]

Definition at line 881 of file ViewportManagerWithPlatformFeatures.cpp.

{
#ifdef DBG
    ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_INT, METH_NAME, this,
        GetLayoutId().data(), L"registerCacheBuildWork:", registerCacheBuildWork);

    if (m_horizontalCacheBufferPerSide != 0.0)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL, METH_NAME, this,
            GetLayoutId().data(), L"m_horizontalCacheBufferPerSide reset:", m_horizontalCacheBufferPerSide);
    }
    if (m_verticalCacheBufferPerSide != 0.0)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL, METH_NAME, this,
            GetLayoutId().data(), L"m_verticalCacheBufferPerSide reset:", m_verticalCacheBufferPerSide);
    }
#endif // DBG

    m_horizontalCacheBufferPerSide = 0.0;
    m_verticalCacheBufferPerSide = 0.0;

    if (!m_managingViewportDisabled && registerCacheBuildWork)
    {
        // We need to start building the realization buffer again.
        RegisterCacheBuildWork();
    }
}

void ResetExpectedViewportShift ( ) [private]

Definition at line 277 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_expectedViewportShift.X != 0.0f || m_expectedViewportShift.Y != 0.0f)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_expectedViewportShift reset:",
            m_expectedViewportShift.X, m_expectedViewportShift.Y);

        m_expectedViewportShift = {};
    }
}

void ResetLayoutExtent ( ) [private]

Definition at line 251 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_layoutExtent.X != 0.0f || m_layoutExtent.Y != 0.0f ||
        m_layoutExtent.Width != 0.0f || m_layoutExtent.Height != 0.0f)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_layoutExtent reset:",
            m_layoutExtent.X, m_layoutExtent.Y, m_layoutExtent.Width, m_layoutExtent.Height);

        m_layoutExtent = {};
    }
}

void ResetLayoutRealizationWindowCacheBuffer ( ) [override, virtual]

Implements ViewportManager.

Definition at line 874 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());

    ResetCacheBuffer(false /*registerCacheBuildWork*/);
}

void ResetPendingViewportShift ( ) [private]

Definition at line 289 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_pendingViewportShift.X != 0.0f || m_pendingViewportShift.Y != 0.0f)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_pendingViewportShift reset:",
            m_pendingViewportShift.X, m_pendingViewportShift.Y);

        m_pendingViewportShift = {};
    }
}

void ResetScrollers ( ) [override, virtual]

Implements ViewportManager.

Definition at line 624 of file ViewportManagerWithPlatformFeatures.cpp.

{
    m_scroller.set(nullptr);
    m_scrollPresenterScrollStartingRevoker.revoke();
    m_scrollPresenterZoomStartingRevoker.revoke();
    m_effectiveViewportChangedRevoker.revoke();
    m_skipScrollAnchorRegistrationsDuringNextMeasurePass = false;
    m_skipScrollAnchorRegistrationsDuringNextArrangePass = false;
    m_ensuredScroller = false;
}

void ResetUnshiftableShift ( ) [private]

Definition at line 301 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_unshiftableShift.X != 0.0f || m_unshiftableShift.Y != 0.0f)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_unshiftableShift reset:",
            m_unshiftableShift.X, m_unshiftableShift.Y);

        m_unshiftableShift = {};
    }
}

void ResetVisibleWindow ( ) [private]

Definition at line 264 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_visibleWindow.X != 0.0f || m_visibleWindow.Y != 0.0f ||
        m_visibleWindow.Width != 0.0f || m_visibleWindow.Height != 0.0f)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_visibleWindow reset:",
            m_visibleWindow.X, m_visibleWindow.Y, m_visibleWindow.Width, m_visibleWindow.Height);

        m_visibleWindow = {};
    }
}

void SetExpectedViewportShift | ( | float | expectedViewportShiftX,
 |  | float | expectedViewportShiftY |
 | ) |  |  | [private]

Definition at line 176 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (expectedViewportShiftX != m_expectedViewportShift.X || expectedViewportShiftY != m_expectedViewportShift.Y)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_expectedViewportShift set:",
            expectedViewportShiftX, expectedViewportShiftY);

        m_expectedViewportShift.X = expectedViewportShiftX;
        m_expectedViewportShift.Y = expectedViewportShiftY;
    }
}

void SetLayoutExtent ( const winrt::Rect & layoutExtent ) [override, virtual]

Implements ViewportManager.

Definition at line 202 of file ViewportManagerWithPlatformFeatures.cpp.

{
#ifdef DBG
    ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
        GetLayoutId().data(), L"layoutExtent:", layoutExtent.X, layoutExtent.Y);

    TraceFieldsDbg();
#endif // DBG

    SetExpectedViewportShift(m_expectedViewportShift.X + m_layoutExtent.X - layoutExtent.X, m_expectedViewportShift.Y + m_layoutExtent.Y - layoutExtent.Y);

    // We tolerate viewport imprecisions up to 1 pixel to avoid invaliding layout too much.
    if (std::abs(m_expectedViewportShift.X) > 1.f || std::abs(m_expectedViewportShift.Y) > 1.f)
    {
        // There are cases where we might be expecting a shift but not get it. We will
        // be waiting for the effective viewport event but if the scroller is not able
        // to perform the shift (perhaps because it cannot scroll in negative offset),
        // then we will end up not realizing elements in the visible window.
        // To avoid this, we register to layout updated for this layout pass. If we
        // get an effective viewport, we know we have a new viewport and we unregister from
        // layout updated. If we get the layout updated handler, then we know that the
        // scroller was unable to perform the shift and we invalidate measure and unregister
        // from the layout updated event.
        if (!m_layoutUpdatedRevoker)
        {
            m_layoutUpdatedRevoker = m_owner->LayoutUpdated(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnLayoutUpdated });
        }
    }

    if (layoutExtent.X != m_layoutExtent.X || layoutExtent.Y != m_layoutExtent.Y ||
        layoutExtent.Width != m_layoutExtent.Width || layoutExtent.Height != m_layoutExtent.Height)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_layoutExtent set:",
            layoutExtent.X, layoutExtent.Y);

        m_layoutExtent = layoutExtent;
    }

    SetPendingViewportShift(m_expectedViewportShift);

    // We just finished a measure pass and have a new extent.
    // Let's make sure the scroller will run its arrange so that it tracks the anchor.
    if (m_scroller)
    {
        m_scroller.as<winrt::UIElement>().InvalidateArrange();
    }
}

void SetPendingViewportShift ( const winrt::Point & pendingViewportShift ) [private]

Definition at line 164 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (pendingViewportShift.X != m_pendingViewportShift.X || pendingViewportShift.Y != m_pendingViewportShift.Y)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_pendingViewportShift set:",
            pendingViewportShift.X, pendingViewportShift.Y);

        m_pendingViewportShift = pendingViewportShift;
    }
}

void SetUnshiftableShift | ( | float | unshiftableShiftX,
 |  | float | unshiftableShiftY |
 | ) |  |  | [private]

Definition at line 189 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (unshiftableShiftX != m_unshiftableShift.X || unshiftableShiftY != m_unshiftableShift.Y)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_unshiftableShift set:",
            unshiftableShiftX, unshiftableShiftY);

        m_unshiftableShift.X = unshiftableShiftX;
        m_unshiftableShift.Y = unshiftableShiftY;
    }
}

void SetVisibleWindow ( const winrt::Rect & visibleWindow ) [private]

Definition at line 151 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (visibleWindow.X != m_visibleWindow.X || visibleWindow.Y != m_visibleWindow.Y ||
        visibleWindow.Width != m_visibleWindow.Width || visibleWindow.Height != m_visibleWindow.Height)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
            GetLayoutId().data(), L"m_visibleWindow set:",
            visibleWindow.X, visibleWindow.Y, visibleWindow.Width, visibleWindow.Height);

        m_visibleWindow = visibleWindow;
    }
}

winrt::UIElement SuggestedAnchor ( ) const [override, virtual]

Implements ViewportManager.

Definition at line 25 of file ViewportManagerWithPlatformFeatures.cpp.

{
    // The element generated during the ItemsRepeater.MakeAnchor call has precedence over the next tick.
    winrt::UIElement suggestedAnchor = m_makeAnchorElement.get();

    if (!suggestedAnchor)
    {
        const auto anchorElement =
            m_scroller ?
            m_scroller.get().CurrentAnchor() :
            nullptr;

        if (anchorElement)
        {
            // We can't simply return anchorElement because, in case of nested ItemsRepeaters, it may not
            // be a direct child of ours, or even an indirect child. We need to walk up the tree starting
            // from anchorElement to figure out what child of ours (if any) to use as the suggested element.
            winrt::UIElement owner = *m_owner;
            auto child = anchorElement;
            auto parent = CachedVisualTreeHelpers::GetParent(child).as<winrt::UIElement>();
            while (parent)
            {
                if (parent == owner)
                {
                    suggestedAnchor = child;
                    break;
                }

                child = parent;
                parent = CachedVisualTreeHelpers::GetParent(parent).as<winrt::UIElement>();
            }

            ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"SuggestedAnchor returns IScrollAnchorProvider.CurrentAnchor.", suggestedAnchor);
        }
#ifdef DBG
        else
        {
            ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"SuggestedAnchor returns null.");
        }
#endif // DBG
    }
#ifdef DBG
    else
    {
        // Since we have an anchor element, we do not want the scroll anchor provider to start anchoring some other element.
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"SuggestedAnchor returns non-null m_makeAnchorElement.", m_makeAnchorElement);
    }
#endif // DBG
    return suggestedAnchor;
}

void TryInvalidateMeasure ( ) [private]

Definition at line 999 of file ViewportManagerWithPlatformFeatures.cpp.

{
    // Don't invalidate measure if we have an invalid window.
    if (m_visibleWindow != winrt::Rect())
    {
        // We invalidate measure instead of just invalidating arrange because
        // we don't invalidate measure in UpdateViewport if the view is changing to
        // avoid layout cycles.
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"Invalidating measure due to viewport change.");

        m_owner->InvalidateMeasure();
    }
}

void UnregisterScrollAnchorCandidates | ( | winrt::UIElement const & | exceptionElement,
 |  | bool | registerAsPreparedAndArrangedElements |
 | ) |  |  | [private]

Definition at line 1013 of file ViewportManagerWithPlatformFeatures.cpp.

{
    ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"registerAsPreparedAndArrangedElements:", registerAsPreparedAndArrangedElements);

    for (const winrt::UIElement& child : m_owner->Children())
    {
        if (child.CanBeScrollAnchor() && child != exceptionElement)
        {
            child.CanBeScrollAnchor(false);

            if (registerAsPreparedAndArrangedElements)
            {
                m_preparedAndArrangedElements.push_back(tracker_ref<winrt::UIElement>{ m_owner, child });
            }
        }
    }
}

bool UpdateViewport ( winrt::Rect const & effectiveViewport ) [private]

Definition at line 832 of file ViewportManagerWithPlatformFeatures.cpp.

{
#ifdef DBG
    MUX_ASSERT(!m_managingViewportDisabled);

    const auto previousVisibleWindowDbg = m_visibleWindow;

    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
        L"Previous Effective Viewport:", previousVisibleWindowDbg.X, previousVisibleWindowDbg.Y, previousVisibleWindowDbg.Width, previousVisibleWindowDbg.Height);
    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
        L"Current Effective Viewport:", effectiveViewport.X, effectiveViewport.Y, effectiveViewport.Width, effectiveViewport.Height);
    ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
        L"Effective Viewport shift:", effectiveViewport.X - previousVisibleWindowDbg.X, effectiveViewport.Y - previousVisibleWindowDbg.Y, effectiveViewport.Width - previousVisibleWindowDbg.Width, effectiveViewport.Height - previousVisibleWindowDbg.Height);
#endif // DBG

    if (-effectiveViewport.X <= ItemsRepeater::ClearedElementsArrangePosition.X &&
        -effectiveViewport.Y <= ItemsRepeater::ClearedElementsArrangePosition.Y)
    {
        ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"Viewport is invalid. Visible window cleared.");

        // We got cleared.
        ResetVisibleWindow();
    }
    else
    {
        const float roundingTolerance = 0.01f;

        if (std::abs(m_visibleWindow.X - effectiveViewport.X) > roundingTolerance ||
            std::abs(m_visibleWindow.Y - effectiveViewport.Y) > roundingTolerance ||
            std::abs(m_visibleWindow.Width - effectiveViewport.Width) > roundingTolerance ||
            std::abs(m_visibleWindow.Height - effectiveViewport.Height) > roundingTolerance)
        {
            SetVisibleWindow(effectiveViewport);

            TryInvalidateMeasure();
            return true;
        }
    }

    return false;
}

void ValidateCacheLength ( double cacheLength ) [private]

Definition at line 909 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (cacheLength < 0.0 || std::isinf(cacheLength) || std::isnan(cacheLength))
    {
        throw winrt::hresult_invalid_argument(L"The maximum cache length must be equal or superior to zero.");
    }
}

double VerticalCacheLength ( ) const [inline, override, virtual]

Implements ViewportManager.

Definition at line 26 of file ViewportManagerWithPlatformFeatures.h.

{ return m_maximumVerticalCacheLength; }

void VerticalCacheLength ( double value ) [override, virtual]

Implements ViewportManager.

Definition at line 86 of file ViewportManagerWithPlatformFeatures.cpp.

{
    if (m_maximumVerticalCacheLength != value)
    {
        ValidateCacheLength(value);
        m_maximumVerticalCacheLength = value;
        ResetCacheBuffer();
    }
}

Member Data Documentation

tracker_ref<winrt::UIElement> m_makeAnchorElement [private]

Definition at line 99 of file ViewportManagerWithPlatformFeatures.h.

std::vector<tracker_ref<winrt::UIElement> > m_preparedAndArrangedElements [private]

Definition at line 97 of file ViewportManagerWithPlatformFeatures.h.

std::vector<tracker_ref<winrt::UIElement> > m_preparedElements [private]

Definition at line 96 of file ViewportManagerWithPlatformFeatures.h.

tracker_ref<winrt::Controls::IScrollAnchorProvider> m_scroller [private]

Definition at line 91 of file ViewportManagerWithPlatformFeatures.h.

The documentation for this class was generated from the following files:
  • Repeater/ViewportManagerWithPlatformFeatures.h
  • Repeater/ViewportManagerWithPlatformFeatures.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizationInfo Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Attributes | Private Attributes

VirtualizationInfo Class Reference

#include "VirtualizationInfo.h"

List of all members.

Public Member Functions

VirtualizationInfo ()
unsigned | AddPin ()
winrt::Rect | ArrangeBounds () const
void | ArrangeBounds (winrt::Rect value)
void | AutoRecycleCandidate (bool value)
bool | AutoRecycleCandidate ()
winrt::IInspectable | Data () const
winrt::IDataTemplateComponent | DataTemplateComponent () const
int | Index () const
bool | IsHeldByLayout () const
bool | IsInPinnedPool () const
bool | IsInUniqueIdResetPool () const
bool | IsPinned () const
bool | IsRealized () const
void | KeepAlive (bool value)
bool | KeepAlive ()
void | MoveOwnershipToAnimator ()
void | MoveOwnershipToElementFactory ()
void | MoveOwnershipToLayoutFromElementFactory (int index, wstring_view uniqueId)
void | MoveOwnershipToLayoutFromPinnedPool ()
void | MoveOwnershipToLayoutFromUniqueIdResetPool ()
void | MoveOwnershipToPinnedPool ()
void | MoveOwnershipToUniqueIdResetPoolFromLayout ()
bool | MustClearDataContext () const
void | MustClearDataContext (bool mustClearDataContext)
ElementOwner | Owner () const
int | Phase () const
void | Phase (int phase)
unsigned | RemovePin ()
wstring_view | UniqueId () const
void | UpdateIndex (int newIndex)
void | UpdatePhasingInfo (int phase, const winrt::IInspectable &data, const winrt::IDataTemplateComponent &component)

Static Public Attributes

static constexpr int | PhaseNotSpecified = std::numeric_limits<int>::min()
static constexpr int | PhaseReachedEnd = -1

Private Attributes

winrt::Rect | m_arrangeBounds
weak_ref< winrt::IInspectable > | m_data
weak_ref
< winrt::IDataTemplateComponent > 		m_dataTemplateComponent
winrt::hstring | m_uniqueId

Detailed Description

Definition at line 26 of file VirtualizationInfo.h.

Constructor & Destructor Documentation

VirtualizationInfo ( )

Definition at line 14 of file VirtualizationInfo.cpp.

    : m_arrangeBounds(ItemsRepeater::InvalidRect)
{ }

Member Function Documentation

unsigned AddPin ( )

Definition at line 172 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    if (!IsRealized())
    {
        throw winrt::hresult_error(E_FAIL, L"You can't pin an unrealized element.");
    }

    return ++m_pinCounter;
}

winrt::Rect ArrangeBounds ( ) const [inline]

Definition at line 75 of file VirtualizationInfo.h.

{ return m_arrangeBounds; }

void ArrangeBounds ( winrt::Rect value ) [inline]

Definition at line 76 of file VirtualizationInfo.h.

{ m_arrangeBounds = value; }

bool AutoRecycleCandidate ( ) [inline]

Definition at line 85 of file VirtualizationInfo.h.

{ return m_autoRecycleCandidate; }

void AutoRecycleCandidate ( bool value ) [inline]

Definition at line 86 of file VirtualizationInfo.h.

{ m_autoRecycleCandidate = value; }

winrt::IInspectable Data ( ) const [inline]

Definition at line 49 of file VirtualizationInfo.h.

{ return m_data.get(); }

winrt::IDataTemplateComponent DataTemplateComponent ( ) const [inline]

Definition at line 50 of file VirtualizationInfo.h.

{ return m_dataTemplateComponent.get(); }

int Index ( ) const [inline]

Definition at line 32 of file VirtualizationInfo.h.

{ return m_index; }

bool IsHeldByLayout ( ) const

Definition at line 23 of file VirtualizationInfo.cpp.

{
    return m_owner == ElementOwner::Layout;
}

bool IsInPinnedPool ( ) const

Definition at line 28 of file VirtualizationInfo.cpp.

{
    return m_owner == ElementOwner::PinnedPool;
}

bool IsInUniqueIdResetPool ( ) const

Definition at line 33 of file VirtualizationInfo.cpp.

{
    return m_owner == ElementOwner::UniqueIdResetPool;
}

bool IsPinned ( ) const

Definition at line 18 of file VirtualizationInfo.cpp.

{
    return m_pinCounter > 0u;
}

bool IsRealized ( ) const

Definition at line 38 of file VirtualizationInfo.cpp.

{
    return IsHeldByLayout() || IsInPinnedPool();
}

void KeepAlive ( bool value ) [inline]

Definition at line 82 of file VirtualizationInfo.h.

{ m_keepAlive = value; }

bool KeepAlive ( ) [inline]

Definition at line 81 of file VirtualizationInfo.h.

{ return m_keepAlive; }

void MoveOwnershipToAnimator ( )

Definition at line 137 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    // During a unique id reset, some elements might get removed.
    // Their ownership will go from the UniqueIdResetPool to the Animator.
    // The common path though is for ownership to go from Layout to Animator.
    MUX_ASSERT(m_owner == ElementOwner::Layout || m_owner == ElementOwner::UniqueIdResetPool);
    m_owner = ElementOwner::Animator;
    m_index = -1;
    m_pinCounter = 0u;
}

void MoveOwnershipToElementFactory ( )

Definition at line 103 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg && !(m_owner == ElementOwner::Animator && m_index == -1))
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    MUX_ASSERT(m_owner != ElementOwner::ElementFactory);
    m_owner = ElementOwner::ElementFactory;
    m_pinCounter = 0u;
    m_index = -1;
    m_uniqueId.clear();
    m_arrangeBounds = ItemsRepeater::InvalidRect;
}

void MoveOwnershipToLayoutFromElementFactory | ( | int | index,
 |  | wstring_view | uniqueId
 | ) |  |

Definition at line 52 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index != index)
    {
        if (m_index != -1 && m_index == s_logItemIndexDbg)
        {
            ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Loses log index.", s_logItemIndexDbg);
        }
        else if (index != -1 && index == s_logItemIndexDbg)
        {
            ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Gains log index.", s_logItemIndexDbg);
        }
    }
#endif // DBG

    MUX_ASSERT(m_owner == ElementOwner::ElementFactory);
    m_owner = ElementOwner::Layout;
    m_index = index;
    m_uniqueId = uniqueId;
}

void MoveOwnershipToLayoutFromPinnedPool ( )

Definition at line 88 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    MUX_ASSERT(m_owner == ElementOwner::PinnedPool);
    MUX_ASSERT(IsPinned());
    m_owner = ElementOwner::Layout;
}

void MoveOwnershipToLayoutFromUniqueIdResetPool ( )

Definition at line 74 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    MUX_ASSERT(m_owner == ElementOwner::UniqueIdResetPool);
    m_owner = ElementOwner::Layout;
}

void MoveOwnershipToPinnedPool ( )

Definition at line 156 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    MUX_ASSERT(m_owner == ElementOwner::Layout);
    m_owner = ElementOwner::PinnedPool;
}

void MoveOwnershipToUniqueIdResetPoolFromLayout ( )

Definition at line 121 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    MUX_ASSERT(m_owner == ElementOwner::Layout);
    m_owner = ElementOwner::UniqueIdResetPool;
    // Keep the pinCounter the same. If the container survives the reset
    // it can go on being pinned as if nothing happened.
}

void MustClearDataContext ( bool mustClearDataContext ) [inline]

Definition at line 53 of file VirtualizationInfo.h.

{ m_mustClearDataContext = mustClearDataContext; }

bool MustClearDataContext ( ) const [inline]

Definition at line 52 of file VirtualizationInfo.h.

{ return m_mustClearDataContext; }

ElementOwner Owner ( ) const [inline]

Definition at line 31 of file VirtualizationInfo.h.

{ return m_owner; }

void Phase ( int phase ) [inline]

Definition at line 48 of file VirtualizationInfo.h.

{ m_phase = phase; }

int Phase ( ) const [inline]

Definition at line 47 of file VirtualizationInfo.h.

{ return m_phase; }

unsigned RemovePin ( )

Definition at line 190 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index == s_logItemIndexDbg)
    {
        ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
        MUX_ASSERT(s_logItemIndexDbg != -1);
    }
#endif // DBG

    if (!IsRealized())
    {
        throw winrt::hresult_error(E_FAIL, L"You can't unpin an unrealized element.");
    }

    if (!IsPinned())
    {
        throw winrt::hresult_error(E_FAIL, L"UnpinElement was called more often than PinElement.");
    }

    return --m_pinCounter;
}

wstring_view UniqueId ( ) const [inline]

Definition at line 78 of file VirtualizationInfo.h.

{ return m_uniqueId; }

void UpdateIndex ( int newIndex )

Definition at line 213 of file VirtualizationInfo.cpp.

{
#ifdef DBG
    if (m_index != newIndex)
    {
        if (m_index != -1 && m_index == s_logItemIndexDbg)
        {
            ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Loses log index.", s_logItemIndexDbg);
        }
        else if (newIndex != -1 && newIndex == s_logItemIndexDbg)
        {
            ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Gains log index.", s_logItemIndexDbg);
        }
    }
#endif // DBG

    MUX_ASSERT(IsRealized());
    m_index = newIndex;
}

void UpdatePhasingInfo | ( | int | phase,
 |  | const winrt::IInspectable & | data,
 |  | const winrt::IDataTemplateComponent & | component
 | ) |  |

Definition at line 43 of file VirtualizationInfo.cpp.

{
    m_phase = phase;
    m_data = winrt::make_weak(data);
    m_dataTemplateComponent = winrt::make_weak(component);
}

Member Data Documentation

winrt::Rect m_arrangeBounds [private]

Definition at line 104 of file VirtualizationInfo.h.

weak_ref<winrt::IInspectable> m_data [private]

Definition at line 106 of file VirtualizationInfo.h.

weak_ref<winrt::IDataTemplateComponent> m_dataTemplateComponent [private]

Definition at line 112 of file VirtualizationInfo.h.

winrt::hstring m_uniqueId [private]

Definition at line 101 of file VirtualizationInfo.h.

constexpr int PhaseNotSpecified = std::numeric_limits<int>::min() [static]

Definition at line 55 of file VirtualizationInfo.h.

constexpr int PhaseReachedEnd = -1 [static]

Definition at line 56 of file VirtualizationInfo.h.

The documentation for this class was generated from the following files:
  • Repeater/VirtualizationInfo.h
  • Repeater/VirtualizationInfo.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingLayout Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

VirtualizingLayout Class Reference

#include "VirtualizingLayout.h"

Inherited by UniformGrid2DLayout, VirtualizingUniformCarouselStackLayout, MockVirtualizingLayout, ActivityFeedLayout, CircleLayout, PinterestLayout, VirtualizingStackLayout, and VirtualizingUniformStackLayout.

List of all members.

Public Member Functions

VirtualizingLayout ()
virtual winrt::Size | ArrangeOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize)
virtual void | InitializeForContextCore (winrt::VirtualizingLayoutContext const &context)
virtual winrt::Size | MeasureOverride (winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize)
virtual void | OnItemsChangedCore (winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args)
virtual void | UninitializeForContextCore (winrt::VirtualizingLayoutContext const &context)

Detailed Description

Definition at line 9 of file VirtualizingLayout.h.

Constructor & Destructor Documentation

VirtualizingLayout ( )

Definition at line 14 of file VirtualizingLayout.cpp.

{
    __RP_Marker_ClassById(RuntimeProfiler::ProfId_VirtualizingLayout);
}

Member Function Documentation

winrt::Size ArrangeOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | finalSize |
 | ) |  |  | [virtual]

Definition at line 34 of file VirtualizingLayout.cpp.

{
    // Do not throw. If the layout decides to arrange its
    // children during measure, then an ArrangeOverride is not required.
    return finalSize;
}

void InitializeForContextCore ( winrt::VirtualizingLayoutContext const & context ) [virtual]

Definition at line 19 of file VirtualizingLayout.cpp.

{

}

winrt::Size MeasureOverride | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::Size const & | availableSize |
 | ) |  |  | [virtual]

Definition at line 29 of file VirtualizingLayout.cpp.

{
    throw winrt::hresult_not_implemented();
}

void OnItemsChangedCore | ( | winrt::VirtualizingLayoutContext const & | context,
 |  | winrt::IInspectable const & | source,
 |  | winrt::NotifyCollectionChangedEventArgs const & | args |
 | ) |  |  | [virtual]

Definition at line 41 of file VirtualizingLayout.cpp.

{
    InvalidateMeasure();
}

void UninitializeForContextCore ( winrt::VirtualizingLayoutContext const & context ) [virtual]

Definition at line 24 of file VirtualizingLayout.cpp.

{

}

The documentation for this class was generated from the following files:
  • Repeater/VirtualizingLayout.h
  • Repeater/VirtualizingLayout.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualizingLayoutContext Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

VirtualizingLayoutContext Class Reference

#include "VirtualizingLayoutContext.h"

List of all members.

Public Member Functions

winrt::IInspectable | GetItemAt (int index)
virtual winrt::IInspectable | GetItemAtCore (int index)
winrt::NonVirtualizingLayoutContext | GetNonVirtualizingContextAdapter ()
winrt::UIElement | GetOrCreateElementAt (int index, winrt::ElementRealizationOptions const &options)
winrt::UIElement | GetOrCreateElementAt (int index)
virtual winrt::UIElement | GetOrCreateElementAtCore (int index, winrt::ElementRealizationOptions const &options)
int32_t | ItemCount ()
virtual int32_t | ItemCountCore ()
winrt::Point | LayoutOrigin ()
void | LayoutOrigin (winrt::Point const &result)
virtual winrt::Point | LayoutOriginCore ()
virtual void | LayoutOriginCore (winrt::Point const &value)
winrt::Rect | RealizationRect ()
virtual winrt::Rect | RealizationRectCore ()
int32_t | RecommendedAnchorIndex ()
virtual int32_t | RecommendedAnchorIndexCore ()
void | RecycleElement (winrt::UIElement const &element)
virtual void | RecycleElementCore (winrt::UIElement const &element)
winrt::Rect | VisibleRect ()
virtual winrt::Rect | VisibleRectCore ()

Detailed Description

Definition at line 9 of file VirtualizingLayoutContext.h.

Member Function Documentation

winrt::IInspectable GetItemAt ( int index )
virtual winrt::IInspectable GetItemAtCore ( int index ) [virtual]
winrt::NonVirtualizingLayoutContext GetNonVirtualizingContextAdapter ( )
winrt::UIElement GetOrCreateElementAt | ( | int | index,
 |  | winrt::ElementRealizationOptions const & | options
 | ) |  |
winrt::UIElement GetOrCreateElementAt ( int index )
virtual winrt::UIElement GetOrCreateElementAtCore | ( | int | index,
 |  | winrt::ElementRealizationOptions const & | options |
 | ) |  |  | [virtual]
int32_t ItemCount ( )
virtual int32_t ItemCountCore ( ) [virtual]
winrt::Point LayoutOrigin ( )
void LayoutOrigin ( winrt::Point const & result )
virtual winrt::Point LayoutOriginCore ( ) [virtual]
virtual void LayoutOriginCore ( winrt::Point const & value ) [virtual]
winrt::Rect RealizationRect ( )
virtual winrt::Rect RealizationRectCore ( ) [virtual]
int32_t RecommendedAnchorIndex ( )
virtual int32_t RecommendedAnchorIndexCore ( ) [virtual]
void RecycleElement ( winrt::UIElement const & element )
virtual void RecycleElementCore ( winrt::UIElement const & element ) [virtual]
winrt::Rect VisibleRect ( )
virtual winrt::Rect VisibleRectCore ( ) [virtual]
The documentation for this class was generated from the following file:
  • Repeater/VirtualizingLayoutContext.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualLayoutContextAdapter Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions

VirtualLayoutContextAdapter Class Reference

#include "VirtualLayoutContextAdapter.h"

List of all members.

Classes

class | ChildrenCollection

Public Member Functions

VirtualLayoutContextAdapter (winrt::VirtualizingLayoutContext const &virtualizingContext)
winrt::IVectorView
< winrt::UIElement > 		ChildrenCore ()
void | LayoutStateCore (winrt::IInspectable const &state)
winrt::IInspectable | LayoutStateCore ()

Detailed Description

Definition at line 10 of file VirtualLayoutContextAdapter.h.

Constructor & Destructor Documentation

VirtualLayoutContextAdapter ( winrt::VirtualizingLayoutContext const & virtualizingContext )

Definition at line 10 of file VirtualLayoutContextAdapter.cpp.

{
    m_virtualizingContext = winrt::make_weak(virtualizingContext);
}

Member Function Documentation

winrt::IVectorView< winrt::UIElement > ChildrenCore ( )

Definition at line 38 of file VirtualLayoutContextAdapter.cpp.

{
    if (!m_children)
    {
        m_children = winrt::make<ChildrenCollection<winrt::UIElement>>(m_virtualizingContext.get());
    }

    return m_children;
}

winrt::IInspectable LayoutStateCore ( )

Definition at line 17 of file VirtualLayoutContextAdapter.cpp.

{
    if (auto context = m_virtualizingContext.get())
    {
        return context.LayoutState();
    }
    return nullptr;
}

void LayoutStateCore ( winrt::IInspectable const & state )

Definition at line 26 of file VirtualLayoutContextAdapter.cpp.

{
    if (auto context = m_virtualizingContext.get())
    {
        context.LayoutStateCore(state);
    }
}

The documentation for this class was generated from the following files:
  • Repeater/VirtualLayoutContextAdapter.h
  • Repeater/VirtualLayoutContextAdapter.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualLayoutContextAdapter::ChildrenCollection< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • VirtualLayoutContextAdapter
  • VirtualLayoutContextAdapter::ChildrenCollection< T >
Classes | Public Member Functions | Private Attributes

VirtualLayoutContextAdapter::ChildrenCollection< T > Class Template Reference

Inherits ReferenceTracker< ChildrenCollection< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >.

List of all members.

Classes

class | Iterator

Public Member Functions

ChildrenCollection (winrt::VirtualizingLayoutContext const &context)
winrt::IIterator< T > | First ()
T | GetAt (uint32_t index)
uint32_t | GetMany (uint32_t startIndex, winrt::array_view< T > const &values) noexcept
bool | IndexOf (T const &value, uint32_t &index) noexcept
uint32_t | Size ()

Private Attributes

winrt::VirtualizingLayoutContext | m_context

Detailed Description

template<typename T>
class VirtualLayoutContextAdapter::ChildrenCollection< T >

Definition at line 30 of file VirtualLayoutContextAdapter.h.

Constructor & Destructor Documentation

ChildrenCollection ( winrt::VirtualizingLayoutContext const & context ) [inline]

Definition at line 36 of file VirtualLayoutContextAdapter.h.

        {
            m_context = context;
        }

Member Function Documentation

winrt::IIterator<T> First ( ) [inline]

Definition at line 65 of file VirtualLayoutContextAdapter.h.

        {
            return winrt::make<ChildrenCollection<T>::Iterator>(*this);
        }

T GetAt ( uint32_t index ) [inline]

Definition at line 47 of file VirtualLayoutContextAdapter.h.

        {
            return m_context.GetOrCreateElementAt(index, winrt::ElementRealizationOptions::None);
        }

uint32_t GetMany | ( | uint32_t | startIndex,
 |  | winrt::array_view< T > const & | values |
 | ) |  |  | [inline]

Definition at line 57 of file VirtualLayoutContextAdapter.h.

        {
            winrt::throw_hresult(E_NOTIMPL);
        }

bool IndexOf | ( | T const & | value,
 |  | uint32_t & | index |
 | ) |  |  | [inline]

Definition at line 52 of file VirtualLayoutContextAdapter.h.

        {
            winrt::throw_hresult(E_NOTIMPL);
        }

uint32_t Size ( ) [inline]

Definition at line 42 of file VirtualLayoutContextAdapter.h.

        {
            return m_context.ItemCount();
        }

Member Data Documentation

winrt::VirtualizingLayoutContext m_context [private]

Definition at line 137 of file VirtualLayoutContextAdapter.h.

The documentation for this class was generated from the following file:
  • Repeater/VirtualLayoutContextAdapter.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • VirtualLayoutContextAdapter
  • VirtualLayoutContextAdapter::ChildrenCollection< T >
  • VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
Public Member Functions | Private Attributes

VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator Class Reference

Inherits ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type >.

List of all members.

Public Member Functions

Iterator (const winrt::IVectorView< T > &childCollection)
~Iterator ()
T | Current ()
uint32_t | GetMany (winrt::array_view< T > values)
bool | HasCurrent ()
bool | MoveNext ()

Private Attributes

unsigned int | m_currentIndex = 0

Detailed Description

template<typename T>
class VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator

Definition at line 72 of file VirtualLayoutContextAdapter.h.

Constructor & Destructor Documentation

Iterator ( const winrt::IVectorView< T > & childCollection ) [inline]

Definition at line 76 of file VirtualLayoutContextAdapter.h.

            {
                m_childCollection = childCollection;
            }

~Iterator ( ) [inline]

Definition at line 81 of file VirtualLayoutContextAdapter.h.

            {

            }

Member Function Documentation

T Current ( ) [inline]

Definition at line 86 of file VirtualLayoutContextAdapter.h.

            {
                if (m_currentIndex < m_childCollection.Size())
                {
                    return m_childCollection.GetAt(m_currentIndex);
                }
                else
                {
                    throw winrt::hresult_out_of_bounds();
                }
            }

uint32_t GetMany ( winrt::array_view< T > values ) [inline]

Definition at line 116 of file VirtualLayoutContextAdapter.h.

            {
                uint32_t howMany = 0;
                if (HasCurrent())
                {
                    do
                    {
                        if (howMany >= values.size()) break;
                        values[howMany] = Current();
                        howMany++;
                    } while (MoveNext());
                }

                return howMany;
            }

bool HasCurrent ( ) [inline]

Definition at line 98 of file VirtualLayoutContextAdapter.h.

            {
                return (m_currentIndex < m_childCollection.Size());
            }

bool MoveNext ( ) [inline]

Definition at line 103 of file VirtualLayoutContextAdapter.h.

            {
                if (m_currentIndex < m_childCollection.Size())
                {
                    ++m_currentIndex;
                    return (m_currentIndex < m_childCollection.Size());
                }
                else
                {
                    throw winrt::hresult_out_of_bounds();
                }
            }

Member Data Documentation

unsigned int m_currentIndex = 0 [private]

Definition at line 134 of file VirtualLayoutContextAdapter.h.

The documentation for this class was generated from the following file:
  • Repeater/VirtualLayoutContextAdapter.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: VisualStateUtil Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Static Public Member Functions

VisualStateUtil Class Reference

#include "Utils.h"

List of all members.

Static Public Member Functions

static winrt::VisualStateGroup | GetVisualStateGroup (const winrt::FrameworkElement &control, const std::wstring_view &groupName)
static void | GoToStateIfGroupExists (const winrt::Control &control, const std::wstring_view &groupName, const std::wstring_view &stateName, bool useTransitions)
static bool | VisualStateGroupExists (const winrt::FrameworkElement &control, const std::wstring_view &groupName)

Detailed Description

Definition at line 23 of file Utils.h.

Member Function Documentation

winrt::VisualStateGroup GetVisualStateGroup | ( | const winrt::FrameworkElement & | control,
 |  | const std::wstring_view & | groupName |
 | ) |  |  | [static]

Definition at line 79 of file Utils.cpp.

{
    winrt::VisualStateGroup group{};
    auto visualStateGroups = winrt::VisualStateManager::GetVisualStateGroups(control);
    for (auto const& visualStateGroup : visualStateGroups)
    {
        if (visualStateGroup.Name() == groupName)
        {
            group = visualStateGroup;
            return group;
        }
    }
    return group;
}

void GoToStateIfGroupExists | ( | const winrt::Control & | control,
 |  | const std::wstring_view & | groupName,
 |  | const std::wstring_view & | stateName,
 |  | bool | useTransitions |
 | ) |  |  | [static]

Definition at line 99 of file Utils.cpp.

{
    auto visualStateGroup = GetVisualStateGroup(control, groupName);
    if (visualStateGroup)
    {
        winrt::VisualStateManager::GoToState(control, stateName, useTransitions);
    }
}

bool VisualStateGroupExists | ( | const winrt::FrameworkElement & | control,
 |  | const std::wstring_view & | groupName |
 | ) |  |  | [static]

Definition at line 94 of file Utils.cpp.

{
    return static_cast<bool>(GetVisualStateGroup(control, groupName));
}

The documentation for this class was generated from the following files:
  • ResourceHelper/Utils.h
  • ResourceHelper/Utils.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

WebView2 Class Reference

#include "WebView2.h"

Inherits ReferenceTracker< WebView2, DeriveFromPanelHelper_base, winrt::WebView2, winrt::IWebView22, IHwndComponentHost >, and WebView2Properties.

List of all members.

Classes

struct | XamlFocusChangeInfo

Public Member Functions

WebView2 ()
virtual | ~WebView2 ()
winrt::Size | ArrangeOverride (winrt::Size const &finalSize)
void | Close ()
winrt::CoreWebView2 | CoreWebView2 ()
template<typename Delegate >
void | CoreWebView2RunIgnoreInvalidStateSync (Delegate delegate)
winrt::IAsyncAction | EnsureCoreWebView2Async ()
winrt::IAsyncAction | EnsureCoreWebView2Async (winrt::CoreWebView2Environment environment)
winrt::IAsyncAction | EnsureCoreWebView2Async (winrt::CoreWebView2Environment environment, winrt::CoreWebView2ControllerOptions controllerOptions)
winrt::IAsyncOperation
< winrt::hstring > 		ExecuteScriptAsync (winrt::hstring javascriptCode)
winrt::IUnknown | GetProviderForHwnd (HWND hwnd)
winrt::IUnknown | GetWebView2Provider ()
void | GoBack ()
void | GoForward ()
winrt::Size | MeasureOverride (winrt::Size const &availableSize)
void | NavigateToString (winrt::hstring htmlContent)
winrt::AutomationPeer | OnCreateAutomationPeer ()
void | OnLoaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnUnloaded (winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args)
void | Reload ()
void | UpdateCoreWebViewScale ()

Static Public Attributes

static const winrt::Color | sc_controllerDefaultBackgroundColor

Private Member Functions

bool | AreAllAncestorsVisible ()
void | CheckAndUpdateVisibility (bool force=false)
void | CheckAndUpdateWebViewPosition ()
void | CheckAndUpdateWindowPosition ()
void | CloseInternal (bool inShutdownPath)
void | ConvertXamlArgsToOle32Args (const winrt::DragEventArgs &args, DWORD &keyState, POINT &cursorPosition, DWORD &dropEffect, IDataObject **dataObject)
bool | CoreWebView2HasInvalidState ()
template<typename Delegate >
void | CoreWebView2RunIgnoreInvalidStateSync (Delegate delegate)
void | CreateAndSetVisual ()
winrt::IAsyncAction | CreateCoreObjects (winrt::CoreWebView2Environment environment=nullptr, winrt::CoreWebView2ControllerOptions controllerOptions=nullptr)
winrt::IAsyncAction | CreateCoreWebViewFromEnvironment (HWND hwndParent, winrt::CoreWebView2ControllerOptions controllerOptions=nullptr)
winrt::IAsyncOperation
< winrt::CoreWebView2Environment > 		CreateDefaultCoreEnvironment () noexcept
void | CreateMissingAnaheimWarning ()
winrt::DataPackageOperation | DataPackageOperationFromDropEffect (DWORD dropEffect)
void | DisconnectFromRootVisualTarget ()
HWND | EnsureTemporaryHostHwnd ()
void | FillPointerInfo (const winrt::PointerPoint &inputPt, winrt::CoreWebView2PointerInfo outputPt, const winrt::PointerRoutedEventArgs &args)
void | FillPointerPenInfo (const winrt::PointerPoint &inputPt, winrt::CoreWebView2PointerInfo outputPt)
void | FillPointerTouchInfo (const winrt::PointerPoint &inputPt, winrt::CoreWebView2PointerInfo outputPt)
void | FireCoreProcessFailedEvent (const winrt::CoreWebView2ProcessFailedEventArgs &args)
void | FireCoreWebView2Initialized (winrt::hresult exception)
void | FireNavigationCompleted (const winrt::CoreWebView2NavigationCompletedEventArgs &args)
void | FireNavigationStarting (const winrt::CoreWebView2NavigationStartingEventArgs &args)
void | FireWebMessageReceived (const winrt::CoreWebView2WebMessageReceivedEventArgs &args)
winrt::AccessibilitySettings | GetAccessibilitySettings ()
HWND STDMETHODCALLTYPE | GetComponentHwnd ()
HWND | GetHostHwnd () noexcept
uint32_t | GetPointerFlags (const winrt::PointerPoint &inputPt)
winrt::Color | GetThemeBackgroundColor ()
winrt::UISettings | GetUISettings ()
void | HandleGettingFocus (const winrt::Windows::Foundation::IInspectable &, const winrt::GettingFocusEventArgs &args) noexcept
void | HandleGotFocus (const winrt::Windows::Foundation::IInspectable &, const winrt::RoutedEventArgs &) noexcept
void | HandleLosingFocus (const winrt::Windows::Foundation::IInspectable &, const winrt::RoutedEventArgs &) noexcept
void | HandlePointerCanceled (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandlePointerCaptureLost (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandlePointerEntered (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandlePointerExited (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandlePointerMoved (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandlePointerPressed (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandlePointerReleased (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandlePointerWheelChanged (const winrt::Windows::Foundation::IInspectable &, const winrt::PointerRoutedEventArgs &args)
void | HandleRendered (const winrt::IInspectable &, const winrt::IInspectable &)
void | HandleSizeChanged (const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args)
void | HandleXamlRootChanged ()
void | MoveFocusIntoCoreWebView2 (winrt::CoreWebView2MoveFocusReason reason)
void | OnAppWindowPositionChanged (const winrt::Microsoft::UI::Windowing::AppWindow &sender, const winrt::Microsoft::UI::Windowing::AppWindowChangedEventArgs &args)
void | OnDragEnter (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnDragLeave (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnDragOver (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnDrop (const winrt::IInspectable &sender, const winrt::DragEventArgs &args)
void | OnManipulationModePropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
winrt::IAsyncAction | OnSourceChanged (winrt::Uri providedUri)
void | OnVisibilityPropertyChanged (const winrt::DependencyObject &, const winrt::DependencyProperty &)
void | OnXamlPointerMessage (UINT message, const winrt::PointerRoutedEventArgs &args) noexcept
void | RegisterCoreEventHandlers ()
void | RegisterXamlEventHandlers ()
void | ResetMouseInputState ()
void | ResetPointerHelper (const winrt::PointerRoutedEventArgs &args)
void | ResetProperties ()
winrt::Point | ScalePointToPhysicalPixels (winrt::Point inputPoint)
winrt::Rect | ScaleRectToPhysicalPixels (winrt::Rect inputRect)
void | SendMouseLeave ()
void | SetCanGoBack (bool canGoBack)
void | SetCanGoForward (bool canGoForward)
void | SetControllerDefaultBackgroundColor ()
void | SetCoreWebViewAndVisualSize (const float width, const float height)
bool | ShouldNavigate (const winrt::Uri &uri)
void | TryCompleteInitialization ()
void | UnregisterCoreEventHandlers ()
void | UnregisterXamlEventHandlers ()
void | UpdateCoreWebViewVisibility ()
void | UpdateDefaultVisualBackgroundColor ()
void | UpdateParentWindow (HWND newParentWindow)
void | UpdateRenderedSubscriptionAndVisibility ()
void | UpdateSourceInternal ()
void | XamlRootChangedHelper (bool forceUpdate)

Private Attributes

winrt::CoreDispatcher::AcceleratorKeyActivated_revoker | m_acceleratorKeyActivatedRevoker
winrt::AccessibilitySettings | m_accessibilitySettings
winrt::CoreWebView2Controller::MoveFocusRequested_revoker | m_coreMoveFocusRequestedRevoker
winrt::CoreWebView2::NavigationCompleted_revoker | m_coreNavigationCompletedRevoker
winrt::CoreWebView2::NavigationStarting_revoker | m_coreNavigationStartingRevoker
winrt::CoreWebView2::ProcessFailed_revoker | m_coreProcessFailedRevoker
winrt::CoreWebView2::SourceChanged_revoker | m_coreSourceChangedRevoker
winrt::CoreWebView2::WebMessageReceived_revoker | m_coreWebMessageReceivedRevoker
winrt::CoreWebView2CompositionController::CursorChanged_revoker | m_cursorChangedRevoker
winrt::UIElement::GettingFocus_revoker | m_gettingFocusRevoker
winrt::UIElement::GotFocus_revoker | m_gotFocusRevoker
bool | m_isExplicitControllerOptions = false
bool | m_isExplicitEnvironment = false
winrt::UIElement::KeyDown_revoker | m_keyDownRevoker
winrt::UIElement::LosingFocus_revoker | m_losingFocusRevoker
winrt::UIElement::PointerCanceled_revoker | m_pointerCanceledRevoker
winrt::UIElement::PointerCaptureLost_revoker | m_pointerCaptureLostRevoker
winrt::UIElement::PointerEntered_revoker | m_pointerEnteredRevoker
winrt::UIElement::PointerExited_revoker | m_pointerExitedRevoker
winrt::UIElement::PointerMoved_revoker | m_pointerMovedRevoker
winrt::UIElement::PointerPressed_revoker | m_pointerPressedRevoker
winrt::UIElement::PointerReleased_revoker | m_pointerReleasedRevoker
winrt::UIElement::PointerWheelChanged_revoker | m_pointerWheelChangedRevoker
winrt::FrameworkElement::SizeChanged_revoker | m_sizeChangedRevoker
winrt::IContentExternalOutputLink | m_systemVisualBridge
winrt::UISettings | m_uiSettings

Detailed Description

Definition at line 56 of file WebView2.h.

Constructor & Destructor Documentation

WebView2 ( )
virtual ~WebView2 ( ) [virtual]

Member Function Documentation

bool AreAllAncestorsVisible ( ) [private]
winrt::Size ArrangeOverride ( winrt::Size const & finalSize )
void CheckAndUpdateVisibility ( bool force = false ) [private]
void CheckAndUpdateWebViewPosition ( ) [private]
void CheckAndUpdateWindowPosition ( ) [private]
void Close ( )
void CloseInternal ( bool inShutdownPath ) [private]
void ConvertXamlArgsToOle32Args | ( | const winrt::DragEventArgs & | args,
 |  | DWORD & | keyState,
 |  | POINT & | cursorPosition,
 |  | DWORD & | dropEffect,
 |  | IDataObject ** | dataObject |
 | ) |  |  | [private]
winrt::CoreWebView2 CoreWebView2 ( )
bool CoreWebView2HasInvalidState ( ) [private]
void CoreWebView2RunIgnoreInvalidStateSync ( Delegate delegate ) [private]
void CoreWebView2RunIgnoreInvalidStateSync ( Delegate delegate )

Definition at line 57 of file WebView2.cpp.

{
    try
    {
        delegate();
    }
    catch (winrt::hresult_error e)
    {
        if (e.code().value != HRESULT_FROM_WIN32(ERROR_INVALID_STATE))
        {
            throw;
        }
    }
}

void CreateAndSetVisual ( ) [private]
winrt::IAsyncAction CreateCoreObjects | ( | winrt::CoreWebView2Environment | environment = nullptr,
 |  | winrt::CoreWebView2ControllerOptions | controllerOptions = nullptr |
 | ) |  |  | [private]
winrt::IAsyncAction CreateCoreWebViewFromEnvironment | ( | HWND | hwndParent,
 |  | winrt::CoreWebView2ControllerOptions | controllerOptions = nullptr |
 | ) |  |  | [private]
winrt::IAsyncOperation<winrt::CoreWebView2Environment> CreateDefaultCoreEnvironment ( ) [private]
void CreateMissingAnaheimWarning ( ) [private]
winrt::DataPackageOperation DataPackageOperationFromDropEffect ( DWORD dropEffect ) [private]
void DisconnectFromRootVisualTarget ( ) [private]
winrt::IAsyncAction EnsureCoreWebView2Async ( )
winrt::IAsyncAction EnsureCoreWebView2Async ( winrt::CoreWebView2Environment environment )
winrt::IAsyncAction EnsureCoreWebView2Async | ( | winrt::CoreWebView2Environment | environment,
 |  | winrt::CoreWebView2ControllerOptions | controllerOptions
 | ) |  |
HWND EnsureTemporaryHostHwnd ( ) [private]
winrt::IAsyncOperation<winrt::hstring> ExecuteScriptAsync ( winrt::hstring javascriptCode )
void FillPointerInfo | ( | const winrt::PointerPoint & | inputPt,
 |  | winrt::CoreWebView2PointerInfo | outputPt,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void FillPointerPenInfo | ( | const winrt::PointerPoint & | inputPt,
 |  | winrt::CoreWebView2PointerInfo | outputPt |
 | ) |  |  | [private]
void FillPointerTouchInfo | ( | const winrt::PointerPoint & | inputPt,
 |  | winrt::CoreWebView2PointerInfo | outputPt |
 | ) |  |  | [private]
void FireCoreProcessFailedEvent ( const winrt::CoreWebView2ProcessFailedEventArgs & args ) [private]
void FireCoreWebView2Initialized ( winrt::hresult exception ) [private]
void FireNavigationCompleted ( const winrt::CoreWebView2NavigationCompletedEventArgs & args ) [private]
void FireNavigationStarting ( const winrt::CoreWebView2NavigationStartingEventArgs & args ) [private]
void FireWebMessageReceived ( const winrt::CoreWebView2WebMessageReceivedEventArgs & args ) [private]
winrt::AccessibilitySettings GetAccessibilitySettings ( ) [private]
HWND STDMETHODCALLTYPE GetComponentHwnd ( ) [private]
HWND GetHostHwnd ( ) [private]
uint32_t GetPointerFlags ( const winrt::PointerPoint & inputPt ) [private]
winrt::IUnknown GetProviderForHwnd ( HWND hwnd )
winrt::Color GetThemeBackgroundColor ( ) [private]
winrt::UISettings GetUISettings ( ) [private]
winrt::IUnknown GetWebView2Provider ( )
void GoBack ( )
void GoForward ( )
void HandleGettingFocus | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::GettingFocusEventArgs & | args |
 | ) |  |  | [private]
void HandleGotFocus | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]
void HandleLosingFocus | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::RoutedEventArgs & |  |
 | ) |  |  | [private]
void HandlePointerCanceled | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandlePointerCaptureLost | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandlePointerEntered | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandlePointerExited | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandlePointerMoved | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandlePointerPressed | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandlePointerReleased | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandlePointerWheelChanged | ( | const winrt::Windows::Foundation::IInspectable & | ,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void HandleRendered | ( | const winrt::IInspectable & | ,
 |  | const winrt::IInspectable & |  |
 | ) |  |  | [private]
void HandleSizeChanged | ( | const winrt::IInspectable & | ,
 |  | const winrt::SizeChangedEventArgs & | args |
 | ) |  |  | [private]
void HandleXamlRootChanged ( ) [private]
winrt::Size MeasureOverride ( winrt::Size const & availableSize )
void MoveFocusIntoCoreWebView2 ( winrt::CoreWebView2MoveFocusReason reason ) [private]
void NavigateToString ( winrt::hstring htmlContent )
void OnAppWindowPositionChanged | ( | const winrt::Microsoft::UI::Windowing::AppWindow & | sender,
 |  | const winrt::Microsoft::UI::Windowing::AppWindowChangedEventArgs & | args |
 | ) |  |  | [private]
winrt::AutomationPeer OnCreateAutomationPeer ( )
void OnDragEnter | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]
void OnDragLeave | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]
void OnDragOver | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]
void OnDrop | ( | const winrt::IInspectable & | sender,
 |  | const winrt::DragEventArgs & | args |
 | ) |  |  | [private]
void OnLoaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args
 | ) |  |
void OnManipulationModePropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |  |
 | ) |  |  | [private]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
winrt::IAsyncAction OnSourceChanged ( winrt::Uri providedUri ) [private]
void OnUnloaded | ( | winrt::IInspectable const & | sender,
 |  | winrt::RoutedEventArgs const & | args
 | ) |  |
void OnVisibilityPropertyChanged | ( | const winrt::DependencyObject & | ,
 |  | const winrt::DependencyProperty & |  |
 | ) |  |  | [private]
void OnXamlPointerMessage | ( | UINT | message,
 |  | const winrt::PointerRoutedEventArgs & | args |
 | ) |  |  | [private]
void RegisterCoreEventHandlers ( ) [private]
void RegisterXamlEventHandlers ( ) [private]
void Reload ( )
void ResetMouseInputState ( ) [private]
void ResetPointerHelper ( const winrt::PointerRoutedEventArgs & args ) [private]
void ResetProperties ( ) [private]
winrt::Point ScalePointToPhysicalPixels ( winrt::Point inputPoint ) [private]
winrt::Rect ScaleRectToPhysicalPixels ( winrt::Rect inputRect ) [private]
void SendMouseLeave ( ) [private]
void SetCanGoBack ( bool canGoBack ) [private]
void SetCanGoForward ( bool canGoForward ) [private]
void SetControllerDefaultBackgroundColor ( ) [private]
void SetCoreWebViewAndVisualSize | ( | const float | width,
 |  | const float | height |
 | ) |  |  | [private]
bool ShouldNavigate ( const winrt::Uri & uri ) [private]
void TryCompleteInitialization ( ) [private]
void UnregisterCoreEventHandlers ( ) [private]
void UnregisterXamlEventHandlers ( ) [private]
void UpdateCoreWebViewScale ( )
void UpdateCoreWebViewVisibility ( ) [private]
void UpdateDefaultVisualBackgroundColor ( ) [private]
void UpdateParentWindow ( HWND newParentWindow ) [private]
void UpdateRenderedSubscriptionAndVisibility ( ) [private]
void UpdateSourceInternal ( ) [private]
void XamlRootChangedHelper ( bool forceUpdate ) [private]

Member Data Documentation

winrt::CoreDispatcher::AcceleratorKeyActivated_revoker m_acceleratorKeyActivatedRevoker [private]

Definition at line 234 of file WebView2.h.

winrt::AccessibilitySettings m_accessibilitySettings [private]

Definition at line 251 of file WebView2.h.

winrt::CoreWebView2Controller::MoveFocusRequested_revoker m_coreMoveFocusRequestedRevoker [private]

Definition at line 248 of file WebView2.h.

winrt::CoreWebView2::NavigationCompleted_revoker m_coreNavigationCompletedRevoker [private]

Definition at line 245 of file WebView2.h.

winrt::CoreWebView2::NavigationStarting_revoker m_coreNavigationStartingRevoker [private]

Definition at line 238 of file WebView2.h.

winrt::CoreWebView2::ProcessFailed_revoker m_coreProcessFailedRevoker [private]

Definition at line 247 of file WebView2.h.

winrt::CoreWebView2::SourceChanged_revoker m_coreSourceChangedRevoker [private]

Definition at line 244 of file WebView2.h.

winrt::CoreWebView2::WebMessageReceived_revoker m_coreWebMessageReceivedRevoker [private]

Definition at line 246 of file WebView2.h.

winrt::CoreWebView2CompositionController::CursorChanged_revoker m_cursorChangedRevoker [private]

Definition at line 249 of file WebView2.h.

winrt::UIElement::GettingFocus_revoker m_gettingFocusRevoker [private]

Definition at line 222 of file WebView2.h.

winrt::UIElement::GotFocus_revoker m_gotFocusRevoker [private]

Definition at line 223 of file WebView2.h.

bool m_isExplicitControllerOptions = false [private]

Definition at line 199 of file WebView2.h.

bool m_isExplicitEnvironment = false [private]

Definition at line 198 of file WebView2.h.

winrt::UIElement::KeyDown_revoker m_keyDownRevoker [private]

Definition at line 233 of file WebView2.h.

winrt::UIElement::LosingFocus_revoker m_losingFocusRevoker [private]

Definition at line 224 of file WebView2.h.

winrt::UIElement::PointerCanceled_revoker m_pointerCanceledRevoker [private]

Definition at line 231 of file WebView2.h.

winrt::UIElement::PointerCaptureLost_revoker m_pointerCaptureLostRevoker [private]

Definition at line 232 of file WebView2.h.

winrt::UIElement::PointerEntered_revoker m_pointerEnteredRevoker [private]

Definition at line 230 of file WebView2.h.

winrt::UIElement::PointerExited_revoker m_pointerExitedRevoker [private]

Definition at line 229 of file WebView2.h.

winrt::UIElement::PointerMoved_revoker m_pointerMovedRevoker [private]

Definition at line 227 of file WebView2.h.

winrt::UIElement::PointerPressed_revoker m_pointerPressedRevoker [private]

Definition at line 225 of file WebView2.h.

winrt::UIElement::PointerReleased_revoker m_pointerReleasedRevoker [private]

Definition at line 226 of file WebView2.h.

winrt::UIElement::PointerWheelChanged_revoker m_pointerWheelChangedRevoker [private]

Definition at line 228 of file WebView2.h.

winrt::FrameworkElement::SizeChanged_revoker m_sizeChangedRevoker [private]

Definition at line 235 of file WebView2.h.

winrt::IContentExternalOutputLink m_systemVisualBridge [private]

Definition at line 200 of file WebView2.h.

winrt::UISettings m_uiSettings [private]

Definition at line 267 of file WebView2.h.

const winrt::Color sc_controllerDefaultBackgroundColor [static]

Definition at line 95 of file WebView2.h.

The documentation for this class was generated from the following files:
  • WebView2/WebView2.h
  • WebView2/WebView2.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2::XamlFocusChangeInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • WebView2
  • WebView2::XamlFocusChangeInfo

WebView2::XamlFocusChangeInfo Struct Reference

Detailed Description

Definition at line 190 of file WebView2.h.

The documentation for this struct was generated from the following file:
  • WebView2/WebView2.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2_TryCompleteInitialization_RAII Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

WebView2_TryCompleteInitialization_RAII Struct Reference

Inherits SimpleXamlStartStopEvent_RAII.

List of all members.

Public Member Functions

WebView2_TryCompleteInitialization_RAII (uint64_t objectPointer)
~WebView2_TryCompleteInitialization_RAII ()

Detailed Description

Definition at line 1513 of file WebView2.cpp.

Constructor & Destructor Documentation

WebView2_TryCompleteInitialization_RAII ( uint64_t objectPointer ) [inline]

Definition at line 1516 of file WebView2.cpp.

                                                                    : SimpleXamlStartStopEvent_RAII(objectPointer)
        { XamlTelemetry::WebView2_TryCompleteInitialization(true, m_objectPointer); }

~WebView2_TryCompleteInitialization_RAII ( ) [inline]

Definition at line 1518 of file WebView2.cpp.

        { XamlTelemetry::WebView2_TryCompleteInitialization(false, m_objectPointer); }

The documentation for this struct was generated from the following file:
  • WebView2/WebView2.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2AutomationPeer Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions | Private Attributes

WebView2AutomationPeer Class Reference

#include "WebView2AutomationPeer.h"

Inherits ReferenceTracker< WebView2AutomationPeer, winrt::implementation::WebView2AutomationPeerT, IAutomationPeerHwndInterop >.

List of all members.

Public Member Functions

WebView2AutomationPeer (winrt::WebView2 const &owner)
winrt::AutomationControlType | GetAutomationControlTypeCore ()
winrt::hstring | GetClassNameCore ()
HRESULT STDMETHODCALLTYPE | GetRawElementProviderSimple (_Outptr_opt_ IRawElementProviderSimple **value)
HRESULT STDMETHODCALLTYPE | IsCorrectPeerForHwnd (HWND hwnd, _Out_ bool *value)

Private Member Functions

com_ptr< WebView2 > | GetImpl ()
bool | InitProvider ()

Private Attributes

com_ptr
< IRawElementProviderSimple > 		m_provider

Detailed Description

Definition at line 23 of file WebView2AutomationPeer.h.

Constructor & Destructor Documentation

WebView2AutomationPeer ( winrt::WebView2 const & owner )

Definition at line 8 of file WebView2AutomationPeer.cpp.

    : ReferenceTracker(owner)
{}

Member Function Documentation

winrt::AutomationControlType GetAutomationControlTypeCore ( )

Definition at line 30 of file WebView2AutomationPeer.cpp.

{
    return winrt::AutomationControlType::Pane;
}

hstring GetClassNameCore ( )

Definition at line 25 of file WebView2AutomationPeer.cpp.

{
    return winrt::hstring_name_of<winrt::WebView2>();
}

com_ptr< WebView2 > GetImpl ( ) [private]

Definition at line 12 of file WebView2AutomationPeer.cpp.

{
    com_ptr<WebView2> impl;
    winrt::WebView2 webview = Owner().try_as<winrt::WebView2>();

    if (webview)
    {
        impl = winrt::get_self<WebView2>(webview)->get_strong();
    }

    return impl;
}

HRESULT GetRawElementProviderSimple ( _Outptr_opt_ IRawElementProviderSimple ** value )

Definition at line 35 of file WebView2AutomationPeer.cpp.

{
    InitProvider();
    m_provider.copy_to(value);
    return S_OK;
}

bool InitProvider ( ) [private]

Definition at line 58 of file WebView2AutomationPeer.cpp.

{
    if (!m_provider)
    {
        m_provider = GetImpl()->GetWebView2Provider().try_as<IRawElementProviderSimple>();
    }
    return !!m_provider;
}

HRESULT IsCorrectPeerForHwnd | ( | HWND | hwnd,
 |  | _Out_ bool * | value
 | ) |  |

Definition at line 42 of file WebView2AutomationPeer.cpp.

{
    *value = false;
    if (!InitProvider())
    {
        return S_OK;
    }

    auto hwndProvider = GetImpl()->GetProviderForHwnd(hwnd).try_as<IRawElementProviderSimple>();
    if (hwndProvider && hwndProvider == m_provider)
    {
        *value = true;
    }
    return S_OK;
}

Member Data Documentation

com_ptr<IRawElementProviderSimple> m_provider [private]

Definition at line 41 of file WebView2AutomationPeer.h.

The documentation for this class was generated from the following files:
  • WebView2/WebView2AutomationPeer.h
  • WebView2/WebView2AutomationPeer.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2Properties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

WebView2Properties Class Reference

#include "WebView2.properties.h"

Inherited by WebView2.

List of all members.

Public Member Functions

WebView2Properties ()
void | CanGoBack (bool value)
bool | CanGoBack ()
void | CanGoForward (bool value)
bool | CanGoForward ()
winrt::event_token | CoreProcessFailed (winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2ProcessFailedEventArgs > const &value)
void | CoreProcessFailed (winrt::event_token const &token)
winrt::event_token | CoreWebView2Initialized (winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2InitializedEventArgs > const &value)
void | CoreWebView2Initialized (winrt::event_token const &token)
void | DefaultBackgroundColor (winrt::Color const &value)
winrt::Color | DefaultBackgroundColor ()
winrt::event_token | NavigationCompleted (winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationCompletedEventArgs > const &value)
void | NavigationCompleted (winrt::event_token const &token)
void | NavigationStarting (winrt::event_token const &token)
winrt::event_token | NavigationStarting (winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationStartingEventArgs > const &value)
winrt::Uri | Source ()
void | Source (winrt::Uri const &value)
void | WebMessageReceived (winrt::event_token const &token)
winrt::event_token | WebMessageReceived (winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2WebMessageReceivedEventArgs > const &value)

Static Public Member Functions

static winrt::DependencyProperty | CanGoBackProperty ()
static winrt::DependencyProperty | CanGoForwardProperty ()
static void | ClearProperties ()
static winrt::DependencyProperty | DefaultBackgroundColorProperty ()
static void | EnsureProperties ()
static void | OnCanGoBackPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnCanGoForwardPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnDefaultBackgroundColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | OnSourcePropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | SourceProperty ()

Public Attributes

event_source
< winrt::TypedEventHandler
< winrt::WebView2,
winrt::CoreWebView2ProcessFailedEventArgs > > 		m_coreProcessFailedEventSource
event_source
< winrt::TypedEventHandler
< winrt::WebView2,
winrt::CoreWebView2InitializedEventArgs > > 		m_coreWebView2InitializedEventSource
event_source
< winrt::TypedEventHandler
< winrt::WebView2,
winrt::CoreWebView2NavigationCompletedEventArgs > > 		m_navigationCompletedEventSource
event_source
< winrt::TypedEventHandler
< winrt::WebView2,
winrt::CoreWebView2NavigationStartingEventArgs > > 		m_navigationStartingEventSource
event_source
< winrt::TypedEventHandler
< winrt::WebView2,
winrt::CoreWebView2WebMessageReceivedEventArgs > > 		m_webMessageReceivedEventSource

Static Public Attributes

static GlobalDependencyProperty | s_CanGoBackProperty
static GlobalDependencyProperty | s_CanGoForwardProperty
static GlobalDependencyProperty | s_DefaultBackgroundColorProperty
static GlobalDependencyProperty | s_SourceProperty

Detailed Description

Definition at line 7 of file WebView2.properties.h.

Constructor & Destructor Documentation

WebView2Properties ( )

Definition at line 21 of file WebView2.properties.cpp.

    : m_coreProcessFailedEventSource{static_cast<WebView2*>(this)}

Member Function Documentation

void CanGoBack ( bool value )
bool CanGoBack ( )
static winrt::DependencyProperty CanGoBackProperty ( ) [inline, static]

Definition at line 24 of file WebView2.properties.h.

{ return s_CanGoBackProperty; }

bool CanGoForward ( )
void CanGoForward ( bool value )
static winrt::DependencyProperty CanGoForwardProperty ( ) [inline, static]

Definition at line 25 of file WebView2.properties.h.

{ return s_CanGoForwardProperty; }

static void ClearProperties ( ) [static]
winrt::event_token CoreProcessFailed ( winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2ProcessFailedEventArgs > const & value )
void CoreProcessFailed ( winrt::event_token const & token )
void CoreWebView2Initialized ( winrt::event_token const & token )
winrt::event_token CoreWebView2Initialized ( winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2InitializedEventArgs > const & value )
void DefaultBackgroundColor ( winrt::Color const & value )
winrt::Color DefaultBackgroundColor ( )
static winrt::DependencyProperty DefaultBackgroundColorProperty ( ) [inline, static]

Definition at line 26 of file WebView2.properties.h.

{ return s_DefaultBackgroundColorProperty; }

static void EnsureProperties ( ) [static]
winrt::event_token NavigationCompleted ( winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationCompletedEventArgs > const & value )
void NavigationCompleted ( winrt::event_token const & token )
void NavigationStarting ( winrt::event_token const & token )
winrt::event_token NavigationStarting ( winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationStartingEventArgs > const & value )
static void OnCanGoBackPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnCanGoForwardPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnDefaultBackgroundColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
static void OnSourcePropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]
winrt::Uri Source ( )
void Source ( winrt::Uri const & value )
static winrt::DependencyProperty SourceProperty ( ) [inline, static]

Definition at line 27 of file WebView2.properties.h.

{ return s_SourceProperty; }

winrt::event_token WebMessageReceived ( winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2WebMessageReceivedEventArgs > const & value )
void WebMessageReceived ( winrt::event_token const & token )

Member Data Documentation

event_source<winrt::TypedEventHandler<winrt::WebView2, winrt::CoreWebView2ProcessFailedEventArgs> > m_coreProcessFailedEventSource

Definition at line 45 of file WebView2.properties.h.

event_source<winrt::TypedEventHandler<winrt::WebView2, winrt::CoreWebView2InitializedEventArgs> > m_coreWebView2InitializedEventSource

Definition at line 46 of file WebView2.properties.h.

event_source<winrt::TypedEventHandler<winrt::WebView2, winrt::CoreWebView2NavigationCompletedEventArgs> > m_navigationCompletedEventSource

Definition at line 47 of file WebView2.properties.h.

event_source<winrt::TypedEventHandler<winrt::WebView2, winrt::CoreWebView2NavigationStartingEventArgs> > m_navigationStartingEventSource

Definition at line 48 of file WebView2.properties.h.

event_source<winrt::TypedEventHandler<winrt::WebView2, winrt::CoreWebView2WebMessageReceivedEventArgs> > m_webMessageReceivedEventSource

Definition at line 49 of file WebView2.properties.h.

GlobalDependencyProperty s_CanGoBackProperty [static]

Definition at line 29 of file WebView2.properties.h.

GlobalDependencyProperty s_CanGoForwardProperty [static]

Definition at line 30 of file WebView2.properties.h.

GlobalDependencyProperty s_DefaultBackgroundColorProperty [static]

Definition at line 31 of file WebView2.properties.h.

GlobalDependencyProperty s_SourceProperty [static]

Definition at line 32 of file WebView2.properties.h.

The documentation for this class was generated from the following files:
  • Generated/WebView2.properties.h
  • Generated/WebView2.properties.cpp
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2RenderingVerifier Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • WebView2Temporary
  • WebView2RenderingVerifier
Classes | Static Public Member Functions | Static Private Member Functions

WebView2RenderingVerifier Class Reference

List of all members.

Classes

class | NativeMethods

Static Public Member Functions

static void | VerifyInstances (string testName)

Static Private Member Functions

static void | CheckWebViewPixel (string webViewName, double scale, uint targetPixelColor, IntPtr memoryHdc)
static void | CheckWindowPixel (IntPtr targetHwnd, string testName)

Detailed Description

Definition at line 2933 of file WebView2Tests.cs.

Member Function Documentation

static void CheckWebViewPixel | ( | string | webViewName,
 |  | double | scale,
 |  | uint | targetPixelColor,
 |  | IntPtr | memoryHdc |
 | ) |  |  | [inline, static, private]

Definition at line 3034 of file WebView2Tests.cs.

        {
            var webview = FindElement.ById(webViewName);
            Rectangle bounds = webview.BoundingRectangle;

            int xPosition = Convert.ToInt32(50 + (bounds.X * scale));
            int yPosition = Convert.ToInt32(50 + (bounds.Y * scale));
            uint pixelColor = NativeMethods.GetPixel(memoryHdc, xPosition, yPosition);

            Verify.AreEqual<UInt32>(
                pixelColor, targetPixelColor,
                string.Format("Pixel at {0},{1}(actual color is 0x{2:x6}) should match target color of orange (0x{3:x6})",
                    xPosition, yPosition, pixelColor, targetPixelColor));
        }

static void CheckWindowPixel | ( | IntPtr | targetHwnd,
 |  | string | testName |
 | ) |  |  | [inline, static, private]

Definition at line 2971 of file WebView2Tests.cs.

        {
            Log.Comment("Checking hwnd 0x{0:x6} for rendering.", targetHwnd);

            var targetRect = new NativeMethods.RECT();
            _ = NativeMethods.GetWindowRect(targetHwnd, ref targetRect);

            // Create a device context and bitmap consistent with the target hwnd and check the pixel.
            IntPtr targetHdc = NativeMethods.GetDC(targetHwnd);
            if (targetHdc == IntPtr.Zero)
            {
                Log.Warning(string.Format("Test:{0}: Unable to get chrome hdc", testName));
            }
            Verify.AreNotEqual(targetHdc, IntPtr.Zero);
            if (targetHdc != IntPtr.Zero)
            {
                IntPtr memoryHdc = NativeMethods.CreateCompatibleDC(targetHdc);
                if (memoryHdc == IntPtr.Zero)
                {
                    Log.Warning(string.Format("Test:{0}: Failed to create memory DC", testName));
                }
                Verify.AreNotEqual(memoryHdc, IntPtr.Zero);
                if (memoryHdc != IntPtr.Zero)
                {
                    var width = targetRect.Right - targetRect.Left;
                    var height = targetRect.Bottom - targetRect.Top;

                    IntPtr memoryBitmap = NativeMethods.CreateCompatibleBitmap(targetHdc, width, height);
                    if (memoryBitmap == IntPtr.Zero)
                    {
                        Log.Warning(string.Format("Test:{0}: Failed to create bitmap", testName));
                    }
                    Verify.AreNotEqual(memoryBitmap, IntPtr.Zero);
                    if (memoryBitmap != IntPtr.Zero)
                    {
                        NativeMethods.SelectObject(memoryHdc, memoryBitmap);

                        // Print the window into the memory Hdc.
                        NativeMethods.PrintWindow(targetHwnd, memoryHdc, NativeMethods.PW_RENDERFULLCONTENT);

                        var dpi = NativeMethods.GetDpiForWindow(targetHwnd);
                        var scale = dpi / 96.0;

                        // Look at the pixel.
                        const uint targetPixelColor = 0x0080ff; // Orange

                        // The tests that use this verification may not always pass locally, depending on the DPI.
                        // All pass at 100% DPI, and BasicRenderingTest and ReparentElementTest will also pass at 150%.
                        // When we complete Task 25907893 - Adding WebView tests for DPI changes, we will want to ensure that these tests are consistent in either passing or failing at high DPI.
                        Log.Warning(string.Format("These tests may fail locally if monitor DPI is not set to 100%. However, they pass in the lab."));
                        CheckWebViewPixel("MyWebView2", scale, targetPixelColor, memoryHdc);

                        if (testName == "MultipleWebviews_BasicRenderingTest")
                        {
                            CheckWebViewPixel("MyWebView2B", scale, targetPixelColor, memoryHdc);
                            CheckWebViewPixel("MyWebView2C", scale, targetPixelColor, memoryHdc);
                        }
                    }
                    NativeMethods.DeleteDC(memoryHdc);
                }
                NativeMethods.ReleaseDC(targetHwnd, targetHdc);
            }
        }

static void VerifyInstances ( string testName ) [inline, static]

Definition at line 2962 of file WebView2Tests.cs.

        {
            // Get HWND of application window
            UIObject root = TestEnvironment.Application.ApplicationFrameWindow ?? TestEnvironment.Application.CoreWindow;
            var windowHandle = root.NativeWindowHandle;

            CheckWindowPixel(windowHandle, testName);
        }

The documentation for this class was generated from the following file:
  • WebView2/InteractionTests/WebView2Tests.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2RenderingVerifier::NativeMethods::RECT Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • WebView2Temporary
  • WebView2RenderingVerifier
  • NativeMethods
  • WebView2RenderingVerifier::NativeMethods::RECT
Public Attributes

WebView2RenderingVerifier::NativeMethods::RECT Struct Reference

List of all members.

Public Attributes

int | Bottom
int | Left
int | Right
int | Top

Detailed Description

Definition at line 2946 of file WebView2Tests.cs.

Member Data Documentation

int Bottom

Definition at line 2951 of file WebView2Tests.cs.

int Left

Definition at line 2948 of file WebView2Tests.cs.

int Right

Definition at line 2950 of file WebView2Tests.cs.

int Top

Definition at line 2949 of file WebView2Tests.cs.

The documentation for this struct was generated from the following file:
  • WebView2/InteractionTests/WebView2Tests.cs
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicBrushT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushT Class Reference

Inherited by ReferenceTracker< AcrylicBrush, winrt::implementation::AcrylicBrushT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AcrylicTestApiT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicTestApiT Class Reference

Inherited by ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayerAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedVisualPlayerAutomationPeerT Class Reference

Inherited by ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarDetailLabelRequestedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarDetailLabelRequestedEventArgsT Class Reference

Inherited by ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarLabelT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarLabelT Class Reference

Inherited by ReferenceTracker< AnnotatedScrollBarLabel, winrt::implementation::AnnotatedScrollBarLabelT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarScrollingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarScrollingEventArgsT Class Reference

Inherited by ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarT Class Reference

Inherited by ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarItemAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarItemAutomationPeerT Class Reference

Inherited by ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarItemT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarItemT Class Reference

Inherited by ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: BreadcrumbBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarT Class Reference

Inherited by ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteractionInvokedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ButtonInteractionInvokedEventArgsT Class Reference

Inherited by ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ButtonInteractionT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ButtonInteractionT Class Reference

Inherited by ReferenceTracker< ButtonInteraction, winrt::implementation::ButtonInteractionT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerSliderAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerSliderAutomationPeerT Class Reference

Inherited by ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerSliderT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerSliderT Class Reference

Inherited by ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPickerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerT Class Reference

Inherited by ReferenceTracker< ColorPicker, winrt::implementation::ColorPickerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSpectrumAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorSpectrumAutomationPeerT Class Reference

Inherited by ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorSpectrumT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorSpectrumT Class Reference

Inherited by ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColumnMajorUniformToLargestGridLayoutT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColumnMajorUniformToLargestGridLayoutT Class Reference

Inherited by ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutCommandBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutCommandBarT Class Reference

Inherited by ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyoutT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutT Class Reference

Inherited by ReferenceTracker< CommandBarFlyout, winrt::implementation::CommandBarFlyoutT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DesktopAcrylicBackdropT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DesktopAcrylicBackdropT Class Reference

Inherited by ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButtonAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DropDownButtonAutomationPeerT Class Reference

Inherited by ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButtonT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DropDownButtonT Class Reference

Inherited by ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderAutomationPeerT Class Reference

Inherited by ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ExpanderT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderT Class Reference

Inherited by ReferenceTracker< Expander, winrt::implementation::ExpanderT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutStateT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlowLayoutStateT Class Reference

Inherited by ReferenceTracker< FlowLayoutState, winrt::implementation::FlowLayoutStateT, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: FlowLayoutT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlowLayoutT Class Reference

Inherited by ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadgeT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBadgeT Class Reference

Inherited by ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBarAutomationPeerT Class Reference

Inherited by ReferenceTracker< InfoBarAutomationPeer, winrt::implementation::InfoBarAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarClosingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBarClosingEventArgsT Class Reference

Inherited by ReferenceTracker< InfoBarClosingEventArgs, winrt::implementation::InfoBarClosingEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarPanelT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBarPanelT Class Reference

Inherited by ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBarT Class Reference

Inherited by ReferenceTracker< InfoBar, winrt::implementation::InfoBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvasAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkCanvasAutomationPeerT Class Reference

Inherited by ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvasT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkCanvasT Class Reference

Inherited by ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarAutomationPeerT Class Reference

Inherited by ReferenceTracker< InkToolBarAutomationPeer, winrt::implementation::InkToolBarAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarCustomPenT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarCustomPenT Class Reference

Inherited by ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarEraserButtonInternalTundefined Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarEraserButtonInternalTundefined Class Reference

Inherited by ReferenceTracker< InkToolBarEraserButtonInternal, winrt::implementation::InkToolBarEraserButtonInternalTundefined >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarEraserFlyoutItemClickedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarEraserFlyoutItemClickedEventArgsT Class Reference

Inherited by ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarFlyoutItemAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarFlyoutItemAutomationPeerT Class Reference

Inherited by ReferenceTracker< InkToolBarFlyoutItemAutomationPeer, winrt::implementation::InkToolBarFlyoutItemAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarFlyoutItemT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarFlyoutItemT Class Reference

Inherited by ReferenceTracker< InkToolBarFlyoutItem, winrt::implementation::InkToolBarFlyoutItemT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarIsStencilButtonCheckedChangedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarIsStencilButtonCheckedChangedEventArgsT Class Reference

Inherited by ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarMenuButtonAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarMenuButtonAutomationPeerT Class Reference

Inherited by ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarMenuButtonT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarMenuButtonT Class Reference

Inherited by ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarPenConfigurationControlT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarPenConfigurationControlT Class Reference

Inherited by ReferenceTracker< InkToolBarPenConfigurationControl, winrt::implementation::InkToolBarPenConfigurationControlT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarT Class Reference

Inherited by ReferenceTracker< InkToolBar, winrt::implementation::InkToolBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarToggleButtonT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarToggleButtonT Class Reference

Inherited by ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarToolButtonAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarToolButtonAutomationPeerT Class Reference

Inherited by ReferenceTracker< InkToolBarToolButtonAutomationPeer, winrt::implementation::InkToolBarToolButtonAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBarToolButtonT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarToolButtonT Class Reference

Inherited by ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionCompletedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionCompletedEventArgsT Class Reference

Inherited by ReferenceTracker< ItemCollectionTransitionCompletedEventArgs, winrt::implementation::ItemCollectionTransitionCompletedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProgressT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionProgressT Class Reference

Inherited by ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionProviderT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionProviderT Class Reference

Inherited by ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemCollectionTransitionT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionT Class Reference

Inherited by ReferenceTracker< ItemCollectionTransition, winrt::implementation::ItemCollectionTransitionT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerAutomationPeerT Class Reference

Inherited by ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerInvokedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerInvokedEventArgsT Class Reference

Inherited by ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerT Class Reference

Inherited by ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterElementClearingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterElementClearingEventArgsT Class Reference

Inherited by ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterElementIndexChangedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterElementIndexChangedEventArgsT Class Reference

Inherited by ReferenceTracker< ItemsRepeaterElementIndexChangedEventArgs, winrt::implementation::ItemsRepeaterElementIndexChangedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsRepeaterElementPreparedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterElementPreparedEventArgsT Class Reference

Inherited by ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsSourceViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsSourceViewT Class Reference

Inherited by ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewAutomationPeerT Class Reference

Inherited by ReferenceTracker< ItemsViewAutomationPeer, winrt::implementation::ItemsViewAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewItemInvokedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewItemInvokedEventArgsT Class Reference

Inherited by ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewT Class Reference

Inherited by ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanelT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutPanelT Class Reference

Inherited by ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutItemsInfoRequestedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LinedFlowLayoutItemsInfoRequestedEventArgsT Class Reference

Inherited by ReferenceTracker< LinedFlowLayoutItemsInfoRequestedEventArgs, winrt::implementation::LinedFlowLayoutItemsInfoRequestedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LinedFlowLayoutT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LinedFlowLayoutT Class Reference

Inherited by ReferenceTracker< LinedFlowLayout, winrt::implementation::LinedFlowLayoutT, VirtualizingLayout >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControlT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapControlT Class Reference

Inherited by ReferenceTracker< MapControl, winrt::implementation::MapControlT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapElementsLayerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapElementsLayerT Class Reference

Inherited by ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapIconT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapIconT Class Reference

Inherited by ReferenceTracker< MapIcon, winrt::implementation::MapIconT, MapElement >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MaterialHelperTestApiT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MaterialHelperTestApiT Class Reference

Inherited by ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarAutomationPeerT Class Reference

Inherited by ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarItemAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarItemAutomationPeerT Class Reference

Inherited by ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarItemFlyoutT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarItemFlyoutT Class Reference

Inherited by ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarItemT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarItemT Class Reference

Inherited by ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarT Class Reference

Inherited by ReferenceTracker< MenuBar, winrt::implementation::MenuBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MicaBackdropT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MicaBackdropT Class Reference

Inherited by ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenterT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MonochromaticOverlayPresenterT Class Reference

Inherited by ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewAutomationPeerT Class Reference

Inherited by ReferenceTracker< NavigationViewAutomationPeer, winrt::implementation::NavigationViewAutomationPeerT, winrt::ISelectionProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemAutomationPeerT Class Reference

Inherited by ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemBaseT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemBaseT Class Reference

Inherited by ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemCollapsedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemCollapsedEventArgsT Class Reference

Inherited by ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemExpandingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemExpandingEventArgsT Class Reference

Inherited by ReferenceTracker< NavigationViewItemExpandingEventArgs, winrt::implementation::NavigationViewItemExpandingEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemInvokedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemInvokedEventArgsT Class Reference

Inherited by ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewItemPresenterT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemPresenterT Class Reference

Inherited by ReferenceTracker< NavigationViewItemPresenter, winrt::implementation::NavigationViewItemPresenterT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewPaneClosingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewPaneClosingEventArgsT Class Reference

Inherited by ReferenceTracker< NavigationViewPaneClosingEventArgs, winrt::implementation::NavigationViewPaneClosingEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewSelectionChangedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewSelectionChangedEventArgsT Class Reference

Inherited by ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewT Class Reference

Inherited by ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBoxAutomationPeerT Class Reference

Inherited by ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBoxT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBoxT Class Reference

Inherited by ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlAutomationPeerT Class Reference

Inherited by ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControlT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlT Class Reference

Inherited by ReferenceTracker< PagerControl, winrt::implementation::PagerControlT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPictureAutomationPeerT Class Reference

Inherited by ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPictureT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPictureT Class Reference

Inherited by ReferenceTracker< PersonPicture, winrt::implementation::PersonPictureT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerAutomationPeerT Class Reference

Inherited by ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPagerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerT Class Reference

Inherited by ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressBarAutomationPeerT Class Reference

Inherited by ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressBarT Class Reference

Inherited by ReferenceTracker< ProgressBar, winrt::implementation::ProgressBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingAutomationPeerT Class Reference

Inherited by ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRingT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingT Class Reference

Inherited by ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrushT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadialGradientBrushT Class Reference

Inherited by ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsAutomationPeerT Class Reference

Inherited by ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtonsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsT Class Reference

Inherited by ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControlAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingControlAutomationPeerT Class Reference

Inherited by ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControlT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingControlT Class Reference

Inherited by ReferenceTracker< RatingControl, winrt::implementation::RatingControlT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingItemInfoT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingItemInfoT Class Reference

Inherited by ReferenceTracker< RatingItemInfo, winrt::implementation::RatingItemInfoT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclePoolT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RecyclePoolT Class Reference

Inherited by ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RecyclingElementFactoryT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RecyclingElementFactoryT Class Reference

Inherited by ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshContainerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshContainerT Class Reference

Inherited by ReferenceTracker< RefreshContainer, winrt::implementation::RefreshContainerT, winrt::IRefreshContainerPrivate >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshRequestedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshRequestedEventArgsT Class Reference

Inherited by ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshVisualizerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshVisualizerT Class Reference

Inherited by ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RepeaterAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RepeaterAutomationPeerT Class Reference

Inherited by ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBackgroundBrushT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBackgroundBrushT Class Reference

Inherited by ReferenceTracker< RevealBackgroundBrush, winrt::implementation::RevealBackgroundBrushT, RevealBrush >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBorderBrushT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBorderBrushT Class Reference

Inherited by ReferenceTracker< RevealBorderBrush, winrt::implementation::RevealBorderBrushT, RevealBrush >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBorderLightT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBorderLightT Class Reference

Inherited by ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealBrushTestApiT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBrushTestApiT Class Reference

Inherited by ReferenceTracker< RevealBrushTestApi, winrt::implementation::RevealBrushTestApiT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealHoverLightT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealHoverLightT Class Reference

Inherited by ReferenceTracker< RevealHoverLight, winrt::implementation::RevealHoverLightT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealListViewItemPresenterT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealListViewItemPresenterT Class Reference

Inherited by ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RevealTestApiT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealTestApiT Class Reference

Inherited by ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollingAnchorRequestedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollingAnchorRequestedEventArgsT Class Reference

Inherited by ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenterAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterAutomationPeerT Class Reference

Inherited by ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewerIRefreshInfoProviderAdapterT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewerIRefreshInfoProviderAdapterT Class Reference

Inherited by ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewT Class Reference

Inherited by ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModelChildrenRequestedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionModelChildrenRequestedEventArgsT Class Reference

Inherited by ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectionModelT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionModelT Class Reference

Inherited by ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarT Class Reference

Inherited by ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectTemplateEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectTemplateEventArgsT Class Reference

Inherited by ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SliderInteractionT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SliderInteractionT Class Reference

Inherited by ReferenceTracker< SliderInteraction, winrt::implementation::SliderInteractionT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SnapPointBaseT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SnapPointBaseT Class Reference

Inherited by ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SpectrumBrushT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpectrumBrushT Class Reference

Inherited by ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonAutomationPeerT Class Reference

Inherited by ReferenceTracker< SplitButtonAutomationPeer, winrt::implementation::SplitButtonAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButtonT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonT Class Reference

Inherited by ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StackLayoutStateT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

StackLayoutStateT Class Reference

Inherited by ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StackLayoutT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

StackLayoutT Class Reference

Inherited by ReferenceTracker< StackLayout, winrt::implementation::StackLayoutT, VirtualizingLayout >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControlT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeControlT Class Reference

Inherited by ReferenceTracker< SwipeControl, winrt::implementation::SwipeControlT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeItemsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeItemsT Class Reference

Inherited by ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeItemT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeItemT Class Reference

Inherited by ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewAutomationPeerT Class Reference

Inherited by ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewItemAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewItemAutomationPeerT Class Reference

Inherited by ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewItemT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewItemT Class Reference

Inherited by ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewListViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewListViewT Class Reference

Inherited by ReferenceTracker< TabViewListView, winrt::implementation::TabViewListViewT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewT Class Reference

Inherited by ReferenceTracker< TabView, winrt::implementation::TabViewT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipAutomationPeerT Class Reference

Inherited by ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipClosingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipClosingEventArgsT Class Reference

Inherited by ReferenceTracker< TeachingTipClosingEventArgs, winrt::implementation::TeachingTipClosingEventArgsT, winrt::composable, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTipT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipT Class Reference

Inherited by ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBarAutomationPeerT Class Reference

Inherited by ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBarT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBarT Class Reference

Inherited by ReferenceTracker< TitleBar, winrt::implementation::TitleBarT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ToggleSplitButtonAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ToggleSplitButtonAutomationPeerT Class Reference

Inherited by ReferenceTracker< ToggleSplitButtonAutomationPeer, winrt::implementation::ToggleSplitButtonAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewCollapsedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewCollapsedEventArgsT Class Reference

Inherited by ReferenceTracker< TreeViewCollapsedEventArgs, winrt::implementation::TreeViewCollapsedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewDragItemsCompletedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewDragItemsCompletedEventArgsT Class Reference

Inherited by ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewDragItemsStartingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewDragItemsStartingEventArgsT Class Reference

Inherited by ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewExpandingEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewExpandingEventArgsT Class Reference

Inherited by ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemAutomationPeerT Class Reference

Inherited by ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemDataAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemDataAutomationPeerT Class Reference

Inherited by ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemInvokedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemInvokedEventArgsT Class Reference

Inherited by ReferenceTracker< TreeViewItemInvokedEventArgs, winrt::implementation::TreeViewItemInvokedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewItemT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemT Class Reference

Inherited by ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewListAutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewListAutomationPeerT Class Reference

Inherited by ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewListT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewListT Class Reference

Inherited by ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewNodeT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewNodeT Class Reference

Inherited by ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewSelectionChangedEventArgsT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewSelectionChangedEventArgsT Class Reference

Inherited by ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewT Class Reference

Inherited by ReferenceTracker< TreeView, winrt::implementation::TreeViewT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneViewT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TwoPaneViewT Class Reference

Inherited by ReferenceTracker< TwoPaneView, winrt::implementation::TwoPaneViewT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UniformGridLayoutStateT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UniformGridLayoutStateT Class Reference

Inherited by ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: UniformGridLayoutT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UniformGridLayoutT Class Reference

Inherited by ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2AutomationPeerT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2AutomationPeerT Class Reference

Inherited by ReferenceTracker< WebView2AutomationPeer, winrt::implementation::WebView2AutomationPeerT, IAutomationPeerHwndInterop >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlAmbientLightT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlAmbientLightT Class Reference

Inherited by ReferenceTracker< XamlAmbientLight, winrt::implementation::XamlAmbientLightT >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlControlsResourcesT Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlControlsResourcesT Class Reference

Inherited by ReferenceTracker< XamlControlsResources, winrt::implementation::XamlControlsResourcesT, winrt::composable >.

The documentation for this class was generated from the following file:
  • inc/RuntimeClassHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WorkInfo Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Attributes

WorkInfo Struct Reference

#include "BuildTreeScheduler.h"

List of all members.

Public Member Functions

WorkInfo (int priority, const std::function< void()> &workFunc)
void | InvokeWorkFunc () const
int | Priority () const

Private Attributes

int | m_priority
std::function< void()> | m_workFunc

Detailed Description

Definition at line 6 of file BuildTreeScheduler.h.

Constructor & Destructor Documentation

WorkInfo | ( | int | priority,
 |  | const std::function< void()> & | workFunc |
 | ) |  |  | [inline]

Definition at line 8 of file BuildTreeScheduler.h.

                                                                :
        m_priority(priority),
        m_workFunc(workFunc)
    {}

Member Function Documentation

void InvokeWorkFunc ( ) const [inline]

Definition at line 14 of file BuildTreeScheduler.h.

{ m_workFunc(); }

int Priority ( ) const [inline]

Definition at line 13 of file BuildTreeScheduler.h.

{ return m_priority; }

Member Data Documentation

int m_priority [private]

Definition at line 17 of file BuildTreeScheduler.h.

std::function<void()> m_workFunc [private]

Definition at line 18 of file BuildTreeScheduler.h.

The documentation for this struct was generated from the following file:
  • Repeater/BuildTreeScheduler.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlAmbientLight Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

XamlAmbientLight Class Reference

#include "XamlAmbientLight.h"

Inherits ReferenceTracker< XamlAmbientLight, winrt::implementation::XamlAmbientLightT >, and XamlAmbientLightProperties.

List of all members.

Public Member Functions

XamlAmbientLight ()
winrt::hstring | GetId ()
void | OnColorPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | OnConnected (winrt::UIElement const &newElement)
void | OnDisconnected (winrt::UIElement const &oldElement)
void | OnMaterialPolicyStatusChanged (const com_ptr< MaterialHelperBase > &sender, bool isDisabledByMaterialPolicy)

Static Public Member Functions

static winrt::hstring & | GetLightIdStatic ()
static void | OnIsTargetPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Static Public Attributes

static const winrt::Color | sc_defaultColor

Private Member Functions

void | EnsureCompositionResources ()
void | ReleaseCompositionResources ()

Private Attributes

friend | MaterialHelper
friend | MaterialHelperBase

Detailed Description

Definition at line 10 of file XamlAmbientLight.h.

Constructor & Destructor Documentation

XamlAmbientLight ( )

Definition at line 16 of file XamlAmbientLight.cpp.

{
    m_ambientLightColor = sc_defaultColor;
}

Member Function Documentation

void EnsureCompositionResources ( ) [private]

Definition at line 51 of file XamlAmbientLight.cpp.

{
    if (!m_compositionAmbientLight)
    {
        auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
        m_compositionAmbientLight = compositor.CreateAmbientLight();
        m_compositionAmbientLight.Color(m_ambientLightColor);
        CompositionLight(m_compositionAmbientLight);
    }
}

winrt::hstring GetId ( )

Definition at line 27 of file XamlAmbientLight.cpp.

{
    return GetLightIdStatic();
}

winrt::hstring & GetLightIdStatic ( ) [static]

Definition at line 21 of file XamlAmbientLight.cpp.

{
    static winrt::hstring s_XamlAmbientLightId{ MUXCONTROLSMEDIA_NAMESPACE_STR L".XamlAmbientLight" };
    return s_XamlAmbientLightId;
}

void OnColorPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )

Definition at line 77 of file XamlAmbientLight.cpp.

{
    m_ambientLightColor = unbox_value<winrt::Color>(args.NewValue());
    if (m_compositionAmbientLight)
    {
        m_compositionAmbientLight.Color(m_ambientLightColor);
    }
}

void OnConnected ( winrt::UIElement const & newElement )

Definition at line 32 of file XamlAmbientLight.cpp.

{
    m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });

    if (!m_isDisabledByMaterialPolicy)
    {
        EnsureCompositionResources();
    }

}

void OnDisconnected ( winrt::UIElement const & oldElement )

Definition at line 43 of file XamlAmbientLight.cpp.

{
    ReleaseCompositionResources();

    MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
    m_materialPolicyChangedToken.value = 0;
}

void OnIsTargetPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [static]

Definition at line 87 of file XamlAmbientLight.cpp.

{
    OnAttachedIsTargetPropertyChanged<XamlAmbientLight>(sender, args);
}

void OnMaterialPolicyStatusChanged | ( | const com_ptr< MaterialHelperBase > & | sender,
 |  | bool | isDisabledByMaterialPolicy
 | ) |  |

Definition at line 71 of file XamlAmbientLight.cpp.

{
    // MaterialHelper::LightPolicyChangedHelper<XamlAmbientLight>(this, isDisabledByMaterialPolicy); // Bug 24355584: DCPP: Reveal is disabled
    MaterialHelper::LightPolicyChangedHelper<XamlAmbientLight>(this, true);
}

void ReleaseCompositionResources ( ) [private]

Definition at line 62 of file XamlAmbientLight.cpp.

{
    if (m_compositionAmbientLight)
    {
        m_compositionAmbientLight = nullptr;
        CompositionLight(nullptr);
    }
}

Member Data Documentation

friend MaterialHelper [private]

Definition at line 15 of file XamlAmbientLight.h.

friend MaterialHelperBase [private]

Definition at line 14 of file XamlAmbientLight.h.

const winrt::Color sc_defaultColor [static]

Definition at line 35 of file XamlAmbientLight.h.

The documentation for this class was generated from the following files:
  • Lights/XamlAmbientLight.h
  • Lights/XamlAmbientLight.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlAmbientLightProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

XamlAmbientLightProperties Class Reference

#include "XamlAmbientLight.properties.h"

Inherited by XamlAmbientLight.

List of all members.

Public Member Functions

XamlAmbientLightProperties ()
winrt::Color | Color ()
void | Color (winrt::Color const &value)

Static Public Member Functions

static void | ClearProperties ()
static winrt::DependencyProperty | ColorProperty ()
static void | EnsureProperties ()
static bool | GetIsTarget (winrt::DependencyObject const &target)
static winrt::DependencyProperty | IsTargetProperty ()
static void | OnColorPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static void | SetIsTarget (winrt::DependencyObject const &target, bool value)

Static Public Attributes

static GlobalDependencyProperty | s_ColorProperty
static GlobalDependencyProperty | s_IsTargetProperty

Detailed Description

Definition at line 7 of file XamlAmbientLight.properties.h.

Constructor & Destructor Documentation

XamlAmbientLightProperties ( )

Definition at line 19 of file XamlAmbientLight.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 50 of file XamlAmbientLight.properties.cpp.

{
    s_ColorProperty = nullptr;
    s_IsTargetProperty = nullptr;
}

void Color ( winrt::Color const & value )

Definition at line 64 of file XamlAmbientLight.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<XamlAmbientLight*>(this)->SetValue(s_ColorProperty, ValueHelper<winrt::Color>::BoxValueIfNecessary(value));
    }
}

winrt::Color Color ( )

Definition at line 72 of file XamlAmbientLight.properties.cpp.

{
    return ValueHelper<winrt::Color>::CastOrUnbox(static_cast<XamlAmbientLight*>(this)->GetValue(s_ColorProperty));
}

static winrt::DependencyProperty ColorProperty ( ) [inline, static]

Definition at line 18 of file XamlAmbientLight.properties.h.

{ return s_ColorProperty; }

void EnsureProperties ( ) [static]

Definition at line 24 of file XamlAmbientLight.properties.cpp.

{
    if (!s_ColorProperty)
    {
        s_ColorProperty =
            InitializeDependencyProperty(
                L"Color",
                winrt::name_of<winrt::Color>(),
                winrt::name_of<winrt::XamlAmbientLight>(),
                false /* isAttached */,
                ValueHelper<winrt::Color>::BoxValueIfNecessary({ 255, 255, 255, 255 }),
                winrt::PropertyChangedCallback(&OnColorPropertyChanged));
    }
    if (!s_IsTargetProperty)
    {
        s_IsTargetProperty =
            InitializeDependencyProperty(
                L"IsTarget",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::XamlAmbientLight>(),
                true /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                &XamlAmbientLight::OnIsTargetPropertyChanged);
    }
}

bool GetIsTarget ( winrt::DependencyObject const & target ) [static]

Definition at line 83 of file XamlAmbientLight.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(target.GetValue(s_IsTargetProperty));
}

static winrt::DependencyProperty IsTargetProperty ( ) [inline, static]

Definition at line 19 of file XamlAmbientLight.properties.h.

{ return s_IsTargetProperty; }

void OnColorPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 56 of file XamlAmbientLight.properties.cpp.

{
    auto owner = sender.as<winrt::XamlAmbientLight>();
    winrt::get_self<XamlAmbientLight>(owner)->OnColorPropertyChanged(args);
}

void SetIsTarget | ( | winrt::DependencyObject const & | target,
 |  | bool | value |
 | ) |  |  | [static]

Definition at line 78 of file XamlAmbientLight.properties.cpp.

{
    target.SetValue(s_IsTargetProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
}

Member Data Documentation

GlobalDependencyProperty s_ColorProperty [static]

Definition at line 21 of file XamlAmbientLight.properties.h.

GlobalDependencyProperty s_IsTargetProperty [static]

Definition at line 22 of file XamlAmbientLight.properties.h.

The documentation for this class was generated from the following files:
  • Generated/XamlAmbientLight.properties.h
  • Generated/XamlAmbientLight.properties.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlCompBrush Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

XamlCompBrush Struct Reference

List of all members.

Public Member Functions

void SetCompositionBrush (winrt::CompositionBrush const &brush)

Detailed Description

Definition at line 10 of file MonochromaticOverlayPresenter.cpp.

Member Function Documentation

void SetCompositionBrush ( winrt::CompositionBrush const & brush ) [inline]

Definition at line 8 of file MonochromaticOverlayPresenter.cpp.

                     : winrt::Microsoft::UI::Xaml::Media::XamlCompositionBrushBaseT<XamlCompBrush>
{

The documentation for this struct was generated from the following file:
  • MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlControlsResources Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Private Member Functions

XamlControlsResources Class Reference

#include "XamlControlsResources.h"

Inherits ReferenceTracker< XamlControlsResources, winrt::implementation::XamlControlsResourcesT, winrt::composable >, and XamlControlsResourcesProperties.

List of all members.

Public Member Functions

XamlControlsResources ()
void | OnPropertyChanged (const winrt::DependencyPropertyChangedEventArgs &args)
void | UpdateAcrylicBrushesDarkTheme (const winrt::IInspectable themeDictionary)
void | UpdateAcrylicBrushesLightTheme (const winrt::IInspectable themeDictionary)

Static Public Member Functions

static void | EnsureRevealLights (winrt::UIElement const &element)

Private Member Functions

void | UpdateSource ()
void | UpdateTintLuminosityOpacity (winrt::Microsoft::UI::Xaml::Media::AcrylicBrush brush, double luminosityValue)

Detailed Description

Definition at line 9 of file XamlControlsResources.h.

Constructor & Destructor Documentation

XamlControlsResources ( )

Member Function Documentation

static void EnsureRevealLights ( winrt::UIElement const & element ) [static]
void OnPropertyChanged ( const winrt::DependencyPropertyChangedEventArgs & args )
void UpdateAcrylicBrushesDarkTheme ( const winrt::IInspectable themeDictionary )
void UpdateAcrylicBrushesLightTheme ( const winrt::IInspectable themeDictionary )
void UpdateSource ( ) [private]
void UpdateTintLuminosityOpacity | ( | winrt::Microsoft::UI::Xaml::Media::AcrylicBrush | brush,
 |  | double | luminosityValue |
 | ) |  |  | [private]
The documentation for this class was generated from the following file:
  • dll/XamlControlsResources.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlControlsResourcesProperties Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Public Attributes

XamlControlsResourcesProperties Class Reference

#include "XamlControlsResources.properties.h"

Inherited by XamlControlsResources.

List of all members.

Public Member Functions

XamlControlsResourcesProperties ()
bool | UseCompactResources ()
void | UseCompactResources (bool value)

Static Public Member Functions

static void | ClearProperties ()
static void | EnsureProperties ()
static void | OnUseCompactResourcesPropertyChanged (winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args)
static winrt::DependencyProperty | UseCompactResourcesProperty ()

Static Public Attributes

static GlobalDependencyProperty | s_UseCompactResourcesProperty

Detailed Description

Definition at line 7 of file XamlControlsResources.properties.h.

Constructor & Destructor Documentation

XamlControlsResourcesProperties ( )

Definition at line 18 of file XamlControlsResources.properties.cpp.

{
    EnsureProperties();
}

Member Function Documentation

void ClearProperties ( ) [static]

Definition at line 38 of file XamlControlsResources.properties.cpp.

{
    s_UseCompactResourcesProperty = nullptr;
}

void EnsureProperties ( ) [static]

Definition at line 23 of file XamlControlsResources.properties.cpp.

{
    if (!s_UseCompactResourcesProperty)
    {
        s_UseCompactResourcesProperty =
            InitializeDependencyProperty(
                L"UseCompactResources",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::XamlControlsResources>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(false),
                winrt::PropertyChangedCallback(&OnUseCompactResourcesPropertyChanged));
    }
}

void OnUseCompactResourcesPropertyChanged | ( | winrt::DependencyObject const & | sender,
 |  | winrt::DependencyPropertyChangedEventArgs const & | args |
 | ) |  |  | [static]

Definition at line 43 of file XamlControlsResources.properties.cpp.

{
    auto owner = sender.as<winrt::XamlControlsResources>();
    winrt::get_self<XamlControlsResources>(owner)->OnPropertyChanged(args);
}

bool UseCompactResources ( )

Definition at line 59 of file XamlControlsResources.properties.cpp.

{
    return ValueHelper<bool>::CastOrUnbox(static_cast<XamlControlsResources*>(this)->GetValue(s_UseCompactResourcesProperty));
}

void UseCompactResources ( bool value )

Definition at line 51 of file XamlControlsResources.properties.cpp.

{
    [[gsl::suppress(con)]]
    {
    static_cast<XamlControlsResources*>(this)->SetValue(s_UseCompactResourcesProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
    }
}

static winrt::DependencyProperty UseCompactResourcesProperty ( ) [inline, static]

Definition at line 15 of file XamlControlsResources.properties.h.

{ return s_UseCompactResourcesProperty; }

Member Data Documentation

GlobalDependencyProperty s_UseCompactResourcesProperty [static]

Definition at line 17 of file XamlControlsResources.properties.h.

The documentation for this class was generated from the following files:
  • Generated/XamlControlsResources.properties.h
  • Generated/XamlControlsResources.properties.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlMember Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

XamlMember Class Reference

#include "XamlMember.h"

List of all members.

Public Member Functions

XamlMember (wstring_view const &memberName, const winrt::IXamlType &type, std::function< winrt::IInspectable(const winrt::IInspectable &)> getter, std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> setter, bool isDependencyProperty, bool isAttachable)
winrt::IInspectable | GetValue (winrt::IInspectable const &instance)
bool | IsAttachable ()
bool | IsDependencyProperty ()
bool | IsReadOnly ()
winrt::hstring | Name ()
void | SetValue (winrt::IInspectable const &instance, winrt::IInspectable const &value)
winrt::IXamlType | TargetType ()
winrt::IXamlType | Type ()

Detailed Description

Definition at line 6 of file XamlMember.h.

Constructor & Destructor Documentation

XamlMember | ( | wstring_view const & | memberName,
 |  | const winrt::IXamlType & | type,
 |  | std::function< winrt::IInspectable(const winrt::IInspectable &)> | getter,
 |  | std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> | setter,
 |  | bool | isDependencyProperty,
 |  | bool | isAttachable
 | ) |  |

Definition at line 9 of file XamlMember.cpp.

{
    m_memberName = memberName;
    m_type = type;
    m_getter = getter;
    m_setter = setter;
    m_isDependencyProperty = isDependencyProperty;
    m_isAttachable = isAttachable;
}

Member Function Documentation

winrt::IInspectable GetValue ( winrt::IInspectable const & instance )

Definition at line 55 of file XamlMember.cpp.

{
    if (m_getter)
    {
        return m_getter(instance);
    }
    return nullptr;
}

bool IsAttachable ( )

Definition at line 25 of file XamlMember.cpp.

{
    return m_isAttachable;
}

bool IsDependencyProperty ( )

Definition at line 30 of file XamlMember.cpp.

{
    return m_isDependencyProperty;
}

bool IsReadOnly ( )

Definition at line 35 of file XamlMember.cpp.

{
    return !static_cast<bool>(m_setter);
}

winrt::hstring Name ( )

Definition at line 40 of file XamlMember.cpp.

{
    return m_memberName;
}

void SetValue | ( | winrt::IInspectable const & | instance,
 |  | winrt::IInspectable const & | value
 | ) |  |

Definition at line 64 of file XamlMember.cpp.

{
    if (m_setter)
    {
        m_setter(instance, value);
    }
}

winrt::IXamlType TargetType ( )

Definition at line 45 of file XamlMember.cpp.

{
    return m_type;
}

winrt::IXamlType Type ( )

Definition at line 50 of file XamlMember.cpp.

{
    return m_type;
}

The documentation for this class was generated from the following files:
  • dll/XamlMember.h
  • dll/XamlMember.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlMetadataProvider Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Static Public Member Functions | Static Private Attributes

XamlMetadataProvider Class Reference

#include "XamlMetadataProvider.h"

List of all members.

Public Member Functions

XamlMetadataProvider ()
winrt::IXamlType | GetXamlType (winrt::TypeName const &type)
winrt::IXamlType | GetXamlType (winrt::hstring const &fullName)
winrt::com_array
< winrt::XmlnsDefinition > 		GetXmlnsDefinitions ()

Static Public Member Functions

static void | ClearTypes ()
static void | Initialize ()
static winrt::IXamlType | LookupXamlType (const wstring_view &typeName)

Static Private Attributes

static std::recursive_mutex | s_typeEntriesMutex

Detailed Description

Definition at line 26 of file XamlMetadataProvider.h.

Constructor & Destructor Documentation

XamlMetadataProvider ( )

Member Function Documentation

void ClearTypes ( ) [static]

Definition at line 20 of file XamlMetadataProvider.cpp.

{
    std::lock_guard<std::recursive_mutex> lock(s_typeEntriesMutex);

    ClearTypeProperties();

    for (auto& entry : c_typeEntries)
    {
        entry.xamlType = nullptr;
    }
}

winrt::IXamlType GetXamlType ( winrt::TypeName const & type )

Definition at line 72 of file XamlMetadataProvider.cpp.

{
    return LookupXamlType(type.Name);
}

winrt::IXamlType GetXamlType ( winrt::hstring const & fullName )

Definition at line 77 of file XamlMetadataProvider.cpp.

{
    return LookupXamlType(fullName);
}

winrt::com_array< winrt::XmlnsDefinition > GetXmlnsDefinitions ( )

Definition at line 82 of file XamlMetadataProvider.cpp.

{
    return {};
}

void Initialize ( ) [static]

Definition at line 14 of file XamlMetadataProvider.cpp.

{
    MUXControlsFactory::EnsureInitialized();
}

winrt::IXamlType LookupXamlType ( const wstring_view & typeName ) [static]

Definition at line 33 of file XamlMetadataProvider.cpp.

{
    // Only typenames with a matching known namespace prefix, or those without
    // a namespace at all, are going to be found inside our type table.
    bool hasKnownNamespacePrefix = false;
    for (auto& knownNamespacePrefix : c_knownNamespacePrefixes)
    {
        if (typeName.starts_with(knownNamespacePrefix))
        {
            hasKnownNamespacePrefix = true;
            break;
        }
    }
    if (!hasKnownNamespacePrefix && typeName.find(L'.') == std::wstring::npos)
    {
        hasKnownNamespacePrefix = true;
    }

    if (hasKnownNamespacePrefix)
    {
        for (auto& entry : c_typeEntries)
        {
            if (typeName == entry.typeName)
            {
                std::lock_guard<std::recursive_mutex> lock(s_typeEntriesMutex);

                if (!entry.xamlType)
                {
                    entry.xamlType = entry.createXamlTypeCallback();
                }
                return entry.xamlType;
            }
        }
    }

    return nullptr;
}

Member Data Documentation

std::recursive_mutex s_typeEntriesMutex [static, private]

Definition at line 43 of file XamlMetadataProvider.h.

The documentation for this class was generated from the following files:
  • dll/XamlMetadataProvider.h
  • dll/XamlMetadataProvider.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlRootChanged_revoker Struct Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

XamlRootChanged_revoker Struct Reference

#include "CppWinRTHelpers.h"

List of all members.

Public Member Functions

XamlRootChanged_revoker () noexcept
XamlRootChanged_revoker (XamlRootChanged_revoker const &)
XamlRootChanged_revoker (XamlRootChanged_revoker &&other) noexcept
XamlRootChanged_revoker (winrt::XamlRoot const &object, winrt::event_token token)
~XamlRootChanged_revoker () noexcept
operator bool () const noexcept
XamlRootChanged_revoker & | operator= (XamlRootChanged_revoker &&other) noexcept
XamlRootChanged_revoker & | operator= (XamlRootChanged_revoker const &)
void | revoke () noexcept

Private Member Functions

void | move_from (XamlRootChanged_revoker &other)

Detailed Description

Definition at line 212 of file CppWinRTHelpers.h.

Constructor & Destructor Documentation

XamlRootChanged_revoker ( )
XamlRootChanged_revoker ( XamlRootChanged_revoker const & )
XamlRootChanged_revoker ( XamlRootChanged_revoker && other ) [inline]

Definition at line 217 of file CppWinRTHelpers.h.

    {
        move_from(other);
    }

XamlRootChanged_revoker | ( | winrt::XamlRoot const & | object,
 |  | winrt::event_token | token |
 | ) |  |  | [inline]

Definition at line 228 of file CppWinRTHelpers.h.

                                                                                :
        m_object(object),
        m_token(token)
    {}

~XamlRootChanged_revoker ( ) [inline]

Definition at line 233 of file CppWinRTHelpers.h.

    {
        revoke();
    }

Member Function Documentation

void move_from ( XamlRootChanged_revoker & other ) [inline, private]

Definition at line 254 of file CppWinRTHelpers.h.

    {
        if (this != &other)
        {
            revoke();
            m_object = other.m_object;
            m_token = other.m_token;
            other.m_object = nullptr;
            other.m_token.value = 0;
        }
    }

operator bool ( ) const [inline, explicit]

Definition at line 249 of file CppWinRTHelpers.h.

    {
        return static_cast<bool>(m_object);
    }

XamlRootChanged_revoker& operator= ( XamlRootChanged_revoker && other ) [inline]

Definition at line 222 of file CppWinRTHelpers.h.

    {
        move_from(other);
        return *this;
    }

XamlRootChanged_revoker& operator= ( XamlRootChanged_revoker const & )
void revoke ( ) [inline]

Definition at line 238 of file CppWinRTHelpers.h.

    {
        if (!m_object)
        {
            return;
        }

        m_object.Changed(m_token);
        m_object = nullptr;
    }

The documentation for this struct was generated from the following file:
  • inc/CppWinRTHelpers.h
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlType Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

XamlType Class Reference

#include "XamlType.h"

Inherits XamlTypeBase.

List of all members.

Public Member Functions

XamlType (wstring_view const &typeName, wstring_view const &baseTypeName, std::function< winrt::IInspectable()> activator, std::function< void(XamlTypeBase &)> populatePropertiesFunc)
void | SetAddToMapFunc (std::function< void(winrt::IInspectable const &, winrt::IInspectable const &, winrt::IInspectable const &)> addToMap)
void | SetCollectionAddFunc (std::function< void(winrt::IInspectable const &, winrt::IInspectable const &)> collectionAdd)
void | SetIsBindable (bool isBindable)

Detailed Description

Definition at line 64 of file XamlType.h.

Constructor & Destructor Documentation

XamlType | ( | wstring_view const & | typeName,
 |  | wstring_view const & | baseTypeName,
 |  | std::function< winrt::IInspectable()> | activator,
 |  | std::function< void(XamlTypeBase &)> | populatePropertiesFunc
 | ) |  |

Definition at line 190 of file XamlType.cpp.

{
    m_typeName = typeName;
    m_baseType = XamlMetadataProvider::LookupXamlType(baseTypeName);
    m_activator = activator;
    if (populatePropertiesFunc)
    {
        populatePropertiesFunc(*this);
    }
}

Member Function Documentation

void SetAddToMapFunc ( std::function< void(winrt::IInspectable const &, winrt::IInspectable const &, winrt::IInspectable const &)> addToMap )

Definition at line 211 of file XamlType.cpp.

{
    m_addToMap = addToMap;
}

void SetCollectionAddFunc ( std::function< void(winrt::IInspectable const &, winrt::IInspectable const &)> collectionAdd )

Definition at line 206 of file XamlType.cpp.

{
    m_collectionAdd = collectionAdd;
}

void SetIsBindable ( bool isBindable )

Definition at line 216 of file XamlType.cpp.

{
    m_isBindable = isBindable;
}

The documentation for this class was generated from the following files:
  • dll/XamlType.h
  • dll/XamlType.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: XamlTypeBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Protected Attributes

XamlTypeBase Class Reference

#include "XamlType.h"

Inherited by EnumXamlType, NullableXamlType, PrimitiveXamlType, and XamlType.

List of all members.

Public Member Functions

winrt::IInspectable | ActivateInstance ()
void | AddDPMember (wstring_view const &name, wstring_view const &memberTypeName, winrt::DependencyProperty const &dp, bool isContent)
void | AddMember (wstring_view const &name, wstring_view const &memberTypeName, std::function< winrt::IInspectable(const winrt::IInspectable &)> getter, std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> setter, bool isContent, bool isDependencyProperty, bool isAttachable)
void | AddToMap (winrt::IInspectable const &instance, winrt::IInspectable const &key, winrt::IInspectable const &value)
void | AddToVector (winrt::IInspectable const &instance, winrt::IInspectable const &value)
winrt::IXamlType | BaseType ()
winrt::IXamlType | BoxedType ()
winrt::IXamlMember | ContentProperty ()
winrt::IInspectable | CreateFromString (winrt::hstring const &value)
winrt::hstring | FullName ()
winrt::IXamlMember | GetMember (winrt::hstring const &name)
bool | IsArray ()
bool | IsBindable ()
bool | IsCollection ()
bool | IsConstructible ()
bool | IsDictionary ()
bool | IsMarkupExtension ()
winrt::IXamlType | ItemType ()
winrt::IXamlType | KeyType ()
void | RunInitializer ()
winrt::TypeName | UnderlyingType ()

Protected Attributes

std::function
< winrt::IInspectable()> 		m_activator
std::function< void(winrt::IInspectable
const &, winrt::IInspectable
const &, winrt::IInspectable
const &)> 		m_addToMap
std::function< void(winrt::IInspectable
const &, winrt::IInspectable
const &)> 		m_collectionAdd
winrt::IXamlMember | m_contentProperty
std::function
< winrt::IInspectable(hstring)> 		m_createFromString
bool | m_isBindable = false
bool | m_isSystemType = false
std::vector< winrt::IXamlMember > | m_members
hstring | m_typeName

Detailed Description

Definition at line 6 of file XamlType.h.

Member Function Documentation

winrt::IInspectable ActivateInstance ( )

Definition at line 105 of file XamlType.cpp.

{
    if (m_activator)
    {
        return m_activator();
    }

    return nullptr;
}

void AddDPMember | ( | wstring_view const & | name,
 |  | wstring_view const & | memberTypeName,
 |  | winrt::DependencyProperty const & | dp,
 |  | bool | isContent
 | ) |  |

Definition at line 10 of file XamlType.cpp.

{
    MUX_ASSERT(dp);
    AddMember(
        name,
        memberTypeName,
        [dp](winrt::IInspectable instance)
            {
                return instance.as<winrt::DependencyObject>().GetValue(dp);
            },
        [dp](winrt::IInspectable instance, winrt::IInspectable value)
            {
                return instance.as<winrt::DependencyObject>().SetValue(dp, value);
            },
        isContent,
        true /* isDependencyProperty */,
        false /* isAttachable */
         );
}

void AddMember | ( | wstring_view const & | name,
 |  | wstring_view const & | memberTypeName,
 |  | std::function< winrt::IInspectable(const winrt::IInspectable &)> | getter,
 |  | std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> | setter,
 |  | bool | isContent,
 |  | bool | isDependencyProperty,
 |  | bool | isAttachable
 | ) |  |

Definition at line 158 of file XamlType.cpp.

{
    auto memberType =
        (memberTypeName == m_typeName)
            ? *this
            : XamlMetadataProvider::LookupXamlType(memberTypeName);

    auto member =
        winrt::make<XamlMember>(
            name,
            memberType,
            getter,
            setter,
            isDependencyProperty,
            isAttachable);

    m_members.push_back(member);
    if (isContent)
    {
        MUX_ASSERT(!m_contentProperty);
        m_contentProperty = member;
    }
}

void AddToMap | ( | winrt::IInspectable const & | instance,
 |  | winrt::IInspectable const & | key,
 |  | winrt::IInspectable const & | value
 | ) |  |

Definition at line 146 of file XamlType.cpp.

{
    if (m_addToMap)
    {
        m_addToMap(instance, key, value);
    }
}

void AddToVector | ( | winrt::IInspectable const & | instance,
 |  | winrt::IInspectable const & | value
 | ) |  |

Definition at line 138 of file XamlType.cpp.

{
    if (m_collectionAdd)
    {
        m_collectionAdd(instance, value);
    }
}

winrt::IXamlType BaseType ( )

Definition at line 34 of file XamlType.cpp.

{
    return m_baseType;
}

winrt::IXamlType BoxedType ( )

Definition at line 89 of file XamlType.cpp.

{
    return m_boxedType;
}

winrt::IXamlMember ContentProperty ( )

Definition at line 39 of file XamlType.cpp.

{
    return m_contentProperty;
}

winrt::IInspectable CreateFromString ( winrt::hstring const & value )

Definition at line 115 of file XamlType.cpp.

{
    if (m_createFromString)
    {
        return m_createFromString(value);
    }

    return nullptr;
}

winrt::hstring FullName ( )

Definition at line 44 of file XamlType.cpp.

{
    return m_typeName;
}

winrt::IXamlMember GetMember ( winrt::hstring const & name )

Definition at line 125 of file XamlType.cpp.

{
    for (const auto& member : m_members)
    {
        if (member.Name() == name)
        {
            return member;
        }
    }

    return nullptr;
}

bool IsArray ( )

Definition at line 49 of file XamlType.cpp.

{
    return false;
}

bool IsBindable ( )

Definition at line 74 of file XamlType.cpp.

{
    return m_isBindable;
}

bool IsCollection ( )

Definition at line 54 of file XamlType.cpp.

{
    return static_cast<bool>(m_collectionAdd);
}

bool IsConstructible ( )

Definition at line 59 of file XamlType.cpp.

{
    return static_cast<bool>(m_activator);
}

bool IsDictionary ( )

Definition at line 64 of file XamlType.cpp.

{
    return static_cast<bool>(m_addToMap);
}

bool IsMarkupExtension ( )

Definition at line 69 of file XamlType.cpp.

{
    return false;
}

winrt::IXamlType ItemType ( )

Definition at line 79 of file XamlType.cpp.

{
    return nullptr;
}

winrt::IXamlType KeyType ( )

Definition at line 84 of file XamlType.cpp.

{
    return nullptr;
}

void RunInitializer ( )

Definition at line 154 of file XamlType.cpp.

{
}

winrt::TypeName UnderlyingType ( )

Definition at line 94 of file XamlType.cpp.

{
    winrt::TypeName typeName;
    typeName.Name = m_typeName;
    typeName.Kind =
        m_isSystemType ?
        winrt::TypeKind::Primitive:
        winrt::TypeKind::Metadata;
    return typeName;
}

Member Data Documentation

std::function<winrt::IInspectable()> m_activator [protected]

Definition at line 49 of file XamlType.h.

std::function<void(winrt::IInspectable const&, winrt::IInspectable const&, winrt::IInspectable const&)> m_addToMap [protected]

Definition at line 55 of file XamlType.h.

std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> m_collectionAdd [protected]

Definition at line 54 of file XamlType.h.

winrt::IXamlMember m_contentProperty [protected]

Definition at line 57 of file XamlType.h.

std::function<winrt::IInspectable(hstring)> m_createFromString [protected]

Definition at line 53 of file XamlType.h.

bool m_isBindable = false [protected]

Definition at line 61 of file XamlType.h.

bool m_isSystemType = false [protected]

Definition at line 60 of file XamlType.h.

std::vector<winrt::IXamlMember> m_members [protected]

Definition at line 58 of file XamlType.h.

hstring m_typeName [protected]

Definition at line 48 of file XamlType.h.

The documentation for this class was generated from the following files:
  • dll/XamlType.h
  • dll/XamlType.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ZoomFactorChange Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ZoomFactorChange Class Reference

#include "ZoomFactorChange.h"

Inherits ViewChange.

List of all members.

Public Member Functions

ZoomFactorChange (float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, ScrollPresenterViewKind zoomFactorKind, winrt::IInspectable const &options)
~ZoomFactorChange ()
winrt::IReference< winrt::float2 > | CenterPoint () const
float | ZoomFactor () const

Detailed Description

Definition at line 8 of file ZoomFactorChange.h.

Constructor & Destructor Documentation

ZoomFactorChange | ( | float | zoomFactor,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | ScrollPresenterViewKind | zoomFactorKind,
 |  | winrt::IInspectable const & | options
 | ) |  |

Definition at line 10 of file ZoomFactorChange.cpp.

                                      :
        m_zoomFactor(zoomFactor),
        m_centerPoint(centerPoint),
        ViewChange(zoomFactorKind, options)
{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this,
        TypeLogging::NullableFloat2ToString(centerPoint).c_str(), zoomFactor);
}

~ZoomFactorChange ( )

Definition at line 23 of file ZoomFactorChange.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

winrt::IReference<winrt::float2> CenterPoint ( ) const [inline]

Definition at line 23 of file ZoomFactorChange.h.

    {
        return m_centerPoint;
    }

float ZoomFactor ( ) const [inline]

Definition at line 18 of file ZoomFactorChange.h.

    {
        return m_zoomFactor;
    }

The documentation for this class was generated from the following files:
  • ScrollPresenter/ZoomFactorChange.h
  • ScrollPresenter/ZoomFactorChange.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ZoomFactorChangeWithAdditionalVelocity Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions

ZoomFactorChangeWithAdditionalVelocity Class Reference

#include "ZoomFactorChangeWithAdditionalVelocity.h"

Inherits ViewChangeBase.

List of all members.

Public Member Functions

ZoomFactorChangeWithAdditionalVelocity (float zoomFactorVelocity, float anticipatedZoomFactorChange, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate)
~ZoomFactorChangeWithAdditionalVelocity ()
float | AnticipatedZoomFactorChange () const
void | AnticipatedZoomFactorChange (float anticipatedZoomFactorChange)
winrt::IReference< winrt::float2 > | CenterPoint () const
winrt::IReference< float > | InertiaDecayRate () const
float | ZoomFactorVelocity () const
void | ZoomFactorVelocity (float zoomFactorVelocity)

Detailed Description

Definition at line 8 of file ZoomFactorChangeWithAdditionalVelocity.h.

Constructor & Destructor Documentation

ZoomFactorChangeWithAdditionalVelocity | ( | float | zoomFactorVelocity,
 |  | float | anticipatedZoomFactorChange,
 |  | winrt::IReference< winrt::float2 > | centerPoint,
 |  | winrt::IReference< float > | inertiaDecayRate
 | ) |  |

Definition at line 10 of file ZoomFactorChangeWithAdditionalVelocity.cpp.

                                             :
        m_zoomFactorVelocity(zoomFactorVelocity),
        m_anticipatedZoomFactorChange(anticipatedZoomFactorChange),
        m_centerPoint(centerPoint),
        m_inertiaDecayRate(inertiaDecayRate)
{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_FLT_FLT, METH_NAME, this,
        zoomFactorVelocity, anticipatedZoomFactorChange);
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this,
        TypeLogging::NullableFloat2ToString(centerPoint).c_str(), TypeLogging::NullableFloatToString(inertiaDecayRate).c_str());
}

~ZoomFactorChangeWithAdditionalVelocity ( )

Definition at line 26 of file ZoomFactorChangeWithAdditionalVelocity.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
}

Member Function Documentation

float AnticipatedZoomFactorChange ( ) const [inline]

Definition at line 25 of file ZoomFactorChangeWithAdditionalVelocity.h.

    {
        return m_anticipatedZoomFactorChange;
    }

void AnticipatedZoomFactorChange ( float anticipatedZoomFactorChange )

Definition at line 38 of file ZoomFactorChangeWithAdditionalVelocity.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_FLT, METH_NAME, this, anticipatedZoomFactorChange);

    m_anticipatedZoomFactorChange = anticipatedZoomFactorChange;
}

winrt::IReference<winrt::float2> CenterPoint ( ) const [inline]

Definition at line 32 of file ZoomFactorChangeWithAdditionalVelocity.h.

    {
        return m_centerPoint;
    }

winrt::IReference<float> InertiaDecayRate ( ) const [inline]

Definition at line 37 of file ZoomFactorChangeWithAdditionalVelocity.h.

    {
        return m_inertiaDecayRate;
    }

void ZoomFactorVelocity ( float zoomFactorVelocity )

Definition at line 31 of file ZoomFactorChangeWithAdditionalVelocity.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_FLT, METH_NAME, this, zoomFactorVelocity);

    m_zoomFactorVelocity = zoomFactorVelocity;
}

float ZoomFactorVelocity ( ) const [inline]

Definition at line 18 of file ZoomFactorChangeWithAdditionalVelocity.h.

    {
        return m_zoomFactorVelocity;
    }

The documentation for this class was generated from the following files:
  • ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.h
  • ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ZoomSnapPoint Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Public Member Functions | Private Member Functions

ZoomSnapPoint Class Reference

#include "SnapPoint.h"

List of all members.

Public Member Functions

ZoomSnapPoint (double snapPointValue)
void | Combine (int &combinationCount, winrt::SnapPointBase const &snapPoint) const
winrt::ExpressionAnimation | CreateConditionalExpression (std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
winrt::ExpressionAnimation | CreateRestingPointExpression (double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)
std::tuple< double, double > | DetermineActualApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint)
std::tuple< double, double > | DetermineActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue)
double | Evaluate (std::tuple< double, double > actualApplicableZone, double value) const
double | ImpulseInfluence (double edgeOfMidpoint, double ignoredValue) const
double | Influence (double edgeOfMidpoint) const
int | SnapCount () const
SnapPointSortPredicate | SortPredicate () const
void | UpdateConditionalExpressionAnimationForImpulse (winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const
void | UpdateRestingPointExpressionAnimationForImpulse (winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const
double | Value ()

Private Member Functions

double | DetermineMaxActualApplicableZone (const SnapPointBase *nextSnapPoint) const
double | DetermineMaxActualImpulseApplicableZone (const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double nextIgnoredValue) const
double | DetermineMinActualApplicableZone (const SnapPointBase *previousSnapPoint) const
double | DetermineMinActualImpulseApplicableZone (const SnapPointBase *previousSnapPoint, double currentIgnoredValue, double previousIgnoredValue) const

Detailed Description

Definition at line 347 of file SnapPoint.h.

Constructor & Destructor Documentation

ZoomSnapPoint ( double snapPointValue )

Definition at line 1081 of file SnapPoint.cpp.

{
    m_value = snapPointValue;
}

Member Function Documentation

void Combine | ( | int & | combinationCount,
 |  | winrt::SnapPointBase const & | snapPoint |
 | ) |  |  | const

Definition at line 1390 of file SnapPoint.cpp.

{
    auto snapPointAsIrregular = snapPoint.try_as<winrt::ZoomSnapPoint>();
    if (snapPointAsIrregular)
    {
#ifdef ApplicableRangeType
        //TODO: The m_specifiedApplicableRange field is never expected to change after creation. A correction will be needed here.
        m_specifiedApplicableRange = std::max(snapPointAsIrregular.ApplicableRange(), m_specifiedApplicableRange);
#else
        MUX_ASSERT(m_specifiedApplicableRange == INFINITY);
#endif
        combinationCount++;
    }
    else
    {
        // TODO: Provide custom error message
        throw winrt::hresult_error(E_INVALIDARG);
    }
}

winrt::ExpressionAnimation CreateConditionalExpression | ( | std::tuple< double, double > | actualApplicableZone,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 1128 of file SnapPoint.cpp.

{
    winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(L"this.Target");
    winrt::hstring targetExpression = GetTargetExpression(target);
    winrt::hstring expression = StringUtil::FormatString(
        L"%1!s!?(%2!s!>=%5!s!&&%2!s!<=%6!s!):(%2!s!>=%3!s!&&%2!s!<=%4!s!)",
        isInertiaFromImpulseExpression.data(),
        targetExpression.data(),
        s_minApplicableValue.data(),
        s_maxApplicableValue.data(),
        s_minImpulseApplicableValue.data(),
        s_maxImpulseApplicableValue.data());

    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());

    auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);

    SetScalarParameter(conditionExpressionAnimation, s_minApplicableValue, static_cast<float>(std::get<0>(actualApplicableZone)));
    SetScalarParameter(conditionExpressionAnimation, s_maxApplicableValue, static_cast<float>(std::get<1>(actualApplicableZone)));

    UpdateConditionalExpressionAnimationForImpulse(
        conditionExpressionAnimation,
        actualImpulseApplicableZone);

    return conditionExpressionAnimation;
}

winrt::ExpressionAnimation CreateRestingPointExpression | ( | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone,
 |  | winrt::InteractionTracker const & | interactionTracker,
 |  | winrt::hstring const & | target,
 |  | winrt::hstring const & | scale,
 |  | bool | isInertiaFromImpulse
 | ) |  |

Definition at line 1110 of file SnapPoint.cpp.

{
    SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);

    auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(s_snapPointValue);

    SetScalarParameter(restingPointExpressionAnimation, s_snapPointValue, static_cast<float>(m_value));

    return restingPointExpressionAnimation;
}

std::tuple< double, double > DetermineActualApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint
 | ) |  |

Definition at line 1185 of file SnapPoint.cpp.

{
    return std::make_tuple(
        DetermineMinActualApplicableZone(previousSnapPoint),
        DetermineMaxActualApplicableZone(nextSnapPoint));
}

std::tuple< double, double > DetermineActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue,
 |  | double | nextIgnoredValue
 | ) |  |

Definition at line 1194 of file SnapPoint.cpp.

{
    return std::make_tuple(
        DetermineMinActualImpulseApplicableZone(
            previousSnapPoint,
            currentIgnoredValue,
            previousIgnoredValue),
        DetermineMaxActualImpulseApplicableZone(
            nextSnapPoint,
            currentIgnoredValue,
            nextIgnoredValue));
}

double DetermineMaxActualApplicableZone ( const SnapPointBase * nextSnapPoint ) const [private]

Definition at line 1277 of file SnapPoint.cpp.

{
    // If we are not passed a nextSnapPoint it means we are the last in the list, see if we expand to Infinity or stay put.
    if (!nextSnapPoint)
    {
#ifdef ApplicableRangeType
        if (m_applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
        {
            return INFINITY;
        }
        else
        {
            return m_value + m_specifiedApplicableRange;
        }
#else
        return INFINITY;
#endif
    }
    // If we are passed a nextSnapPoint then we need to account for its influence on us.
    else
    {
        const double nextMinInfluence = nextSnapPoint->Influence(m_value);

#ifdef ApplicableRangeType
        switch (m_applicableRangeType)
        {
        case winrt::SnapPointApplicableRangeType::Optional:
            return std::min(m_value + m_specifiedApplicableRange, nextMinInfluence);
        case winrt::SnapPointApplicableRangeType::Mandatory:
            return nextMinInfluence;
        default:
            MUX_ASSERT(false);
            return 0.0;
        }
#else
        return nextMinInfluence;
#endif
    }
}

double DetermineMaxActualImpulseApplicableZone | ( | const SnapPointBase * | nextSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | nextIgnoredValue |
 | ) |  |  | const [private]

Definition at line 1318 of file SnapPoint.cpp.

{
    if (!nextSnapPoint)
    {
        return INFINITY;
    }
    else
    {
        const double nextMinInfluence = nextSnapPoint->ImpulseInfluence(m_value, nextIgnoredValue);

        if (isnan(currentIgnoredValue))
        {
            return nextMinInfluence;
        }
        else
        {
            return std::min(m_value, nextMinInfluence);
        }
    }
}

double DetermineMinActualApplicableZone ( const SnapPointBase * previousSnapPoint ) const [private]

Definition at line 1212 of file SnapPoint.cpp.

{
    // If we are not passed a previousSnapPoint it means we are the first in the list, see if we expand to negative Infinity or stay put.
    if (!previousSnapPoint)
    {
#ifdef ApplicableRangeType
        if (applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
        {
            return -INFINITY;
        }
        else
        {
            return m_value - m_specifiedApplicableRange;
        }
#else
        return -INFINITY;
#endif
    }
    // If we are passed a previousSnapPoint then we need to account for its influence on us.
    else
    {
        const double previousMaxInfluence = previousSnapPoint->Influence(m_value);

#ifdef ApplicableRangeType
        switch (m_applicableRangeType)
        {
        case winrt::SnapPointApplicableRangeType::Optional:
            return std::max(previousMaxInfluence, m_value - m_specifiedApplicableRange);
        case winrt::SnapPointApplicableRangeType::Mandatory:
            return previousMaxInfluence;
        default:
            MUX_ASSERT(false);
            return 0.0;
        }
#else
        return previousMaxInfluence;
#endif
    }
}

double DetermineMinActualImpulseApplicableZone | ( | const SnapPointBase * | previousSnapPoint,
 |  | double | currentIgnoredValue,
 |  | double | previousIgnoredValue |
 | ) |  |  | const [private]

Definition at line 1253 of file SnapPoint.cpp.

{
    if (!previousSnapPoint)
    {
        return -INFINITY;
    }
    else
    {
        const double previousMaxInfluence = previousSnapPoint->ImpulseInfluence(m_value, previousIgnoredValue);

        if (isnan(currentIgnoredValue))
        {
            return previousMaxInfluence;
        }
        else
        {
            return std::max(previousMaxInfluence, m_value);
        }
    }
}

double Evaluate | ( | std::tuple< double, double > | actualApplicableZone,
 |  | double | value |
 | ) |  |  | const

Definition at line 1417 of file SnapPoint.cpp.

{
    if (value >= std::get<0>(actualApplicableZone) && value <= std::get<1>(actualApplicableZone))
    {
        return m_value;
    }
    return value;
}

double ImpulseInfluence | ( | double | edgeOfMidpoint,
 |  | double | ignoredValue |
 | ) |  |  | const

Definition at line 1369 of file SnapPoint.cpp.

{
    const double midPoint = (m_value + edgeOfMidpoint) / 2.0;

    if (isnan(ignoredValue))
    {
        return midPoint;
    }
    else
    {
        if (m_value <= edgeOfMidpoint)
        {
            return std::min(m_value, midPoint);
        }
        else
        {
            return std::max(m_value, midPoint);
        }
    }
}

double Influence ( double edgeOfMidpoint ) const

Definition at line 1342 of file SnapPoint.cpp.

{
    const double midPoint = (m_value + edgeOfMidpoint) / 2;

#ifdef ApplicableRangeType
    switch (m_applicableRangeType)
    {
    case winrt::SnapPointApplicableRangeType::Optional:
        if (m_value <= edgeOfMidpoint)
        {
            return std::min(m_value + m_specifiedApplicableRange, midPoint);
        }
        else
        {
            return std::max(m_value - m_specifiedApplicableRange, midPoint);
        }
    case winrt::SnapPointApplicableRangeType::Mandatory:
        return midPoint;
    default:
        MUX_ASSERT(false);
        return 0.0;
    }
#else
    return midPoint;
#endif
}

int SnapCount ( ) const

Definition at line 1412 of file SnapPoint.cpp.

{
    return 1;
}

SnapPointSortPredicate SortPredicate ( ) const

Definition at line 1179 of file SnapPoint.cpp.

{
    // Irregular snap point should be sorted before repeated snap points so it gives a tertiary sort value of 0 (repeated snap points get 1)
    return SnapPointSortPredicate{ m_value, m_value, 0 };
}

void UpdateConditionalExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | conditionExpressionAnimation,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 1161 of file SnapPoint.cpp.

{
    SetScalarParameter(conditionExpressionAnimation, s_minImpulseApplicableValue, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
    SetScalarParameter(conditionExpressionAnimation, s_maxImpulseApplicableValue, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
}

void UpdateRestingPointExpressionAnimationForImpulse | ( | winrt::ExpressionAnimation const & | restingValueExpressionAnimation,
 |  | double | ignoredValue,
 |  | std::tuple< double, double > | actualImpulseApplicableZone |
 | ) |  |  | const

Definition at line 1169 of file SnapPoint.cpp.

{
    // An irregular snap point like ZoomSnapPoint is either completely ignored in impulse mode or not ignored at all, unlike repeated snap points
    // which can be partially ignored. Its conditional expression depends on the impulse mode, whereas its resting point expression does not,
    // thus this method has no job to do.
}

double Value ( )

Definition at line 1104 of file SnapPoint.cpp.

{
    return m_value;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPoint.h
  • ScrollPresenter/SnapPoint.cpp
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ZoomSnapPointBase Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Protected Member Functions | Private Member Functions

ZoomSnapPointBase Class Reference

#include "SnapPoint.h"

List of all members.

Protected Member Functions

ZoomSnapPointBase ()

Private Member Functions

bool OnUpdateViewport (double newViewport)

Detailed Description

Definition at line 337 of file SnapPoint.h.

Constructor & Destructor Documentation

ZoomSnapPointBase ( ) [protected]

Definition at line 1066 of file SnapPoint.cpp.

{
    // throw (ERROR_CALL_NOT_IMPLEMENTED);
}

Member Function Documentation

bool OnUpdateViewport ( double newViewport ) [private]

Definition at line 1071 of file SnapPoint.cpp.

{
    return false;
}

The documentation for this class was generated from the following files:
  • ScrollPresenter/SnapPoint.h
  • ScrollPresenter/SnapPoint.cpp
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Hierarchical Index

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
  • AcrylicBrushFactory
  • AcrylicBrushProperties
    • AcrylicBrush
  • AnimatedAcceptVisualSource
  • AnimatedAcceptVisualSource_AnimatedVisual
  • AnimatedBackVisualSource
  • AnimatedBackVisualSource_AnimatedVisual
  • AnimatedChevronDownSmallVisualSource
  • AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • AnimatedChevronRightDownSmallVisualSource
  • AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • AnimatedChevronUpDownSmallVisualSource
  • AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • AnimatedFindVisualSource
  • AnimatedFindVisualSource_AnimatedVisual
  • AnimatedGlobalNavigationButtonVisualSource
  • AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • AnimatedIconProperties
    • AnimatedIcon
  • AnimatedIconSourceProperties
    • AnimatedIconSource
  • AnimatedIconTestHooks
  • AnimatedSettingsVisualSource
  • AnimatedSettingsVisualSource_AnimatedVisual
  • AnimatedVisualPlayerProperties
    • AnimatedVisualPlayer
  • BrightnessSun
  • BrightnessSun::BrightnessSun_AnimatedVisual
  • LottieLogo
  • LottieLogo::LottieLogo_AnimatedVisual
  • Nullsource
  • ProgressRingDeterminate
  • ProgressRingDeterminate::AnimatedVisual
  • ProgressRingIndeterminate
  • AnnotatedScrollBarProperties
    • AnnotatedScrollBar
  • AnnotatedScrollBarTrace
  • AnimatedVisual
  • AnimatedVisual
  • Entry
  • auto_cast
  • auto_unbox
  • AutoSuggestBoxHelperProperties
    • AutoSuggestBoxHelper
  • AutoSuggestEventRevokers
  • Awaitable
    • AnimatedVisualPlayer::final
    • final
  • Awaitable::PTP_WAIT_traits
  • TreeNode
  • TreeStructure
  • BreadcrumbBarItemClickedEventArgs
  • BreadcrumbBarProperties
    • BreadcrumbBar
  • BreadcrumbElementFactory
  • BreadcrumbIterator
  • BreadcrumbLayout
  • ButtonInteractionProperties
    • ButtonInteraction
  • CachedVisualTreeHelpers
  • CanvasGeometry
  • ChildHandlers
  • ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
  • ColorChangedEventArgs
  • ColorPickerProperties
    • ColorPicker
  • ColorPickerSliderProperties
    • ColorPickerSlider
  • ColorSpectrumProperties
    • ColorSpectrum
      • MyColorSpectrum
  • ColumnMajorUniformToLargestGridLayoutProperties
    • ColumnMajorUniformToLargestGridLayout
  • ComboBoxDropDownEventRevokers
  • ComboBoxHelperProperties
    • ComboBoxHelper
  • CommandBarFlyoutCommandBarAutomationPropertiesFactory
  • CommandBarFlyoutCommandBarAutomationPropertiesProperties
    • CommandBarFlyoutCommandBarAutomationProperties
  • CommandBarFlyoutCommandBarProperties
    • CommandBarFlyoutCommandBar
  • CommandBarFlyoutCommandBarTemplateSettingsFactory
  • CommandBarFlyoutCommandBarTemplateSettingsProperties
    • CommandBarFlyoutCommandBarTemplateSettings
  • CommandBarFlyoutTrace
  • IconSourceToIconSourceElementConverter
  • PlatformConfiguration
  • ComposableBasePointersImplTType< isDependencyObjectBase >
    • VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
      • VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
      • VectorOptions< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >
        • VectorOptionsFromFlag< T, flag, Helper >
    • VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef >
      • VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef >
  • ComposableBasePointersImplTType< false >
  • ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase >
    • VectorIteratorTraits< T, isBindable, isDependencyObjectBase >
    • VectorIteratorTraits< T, true, isDependencyObjectBase >
  • ComposableBasePointersImplTTypeForIterator< false >
  • CoreWebView2InitializedEventArgs
  • CornerRadiusFilterConverterProperties
    • CornerRadiusFilterConverter
  • CornerRadiusToThicknessConverterProperties
    • CornerRadiusToThicknessConverter
  • CustomProperty
  • DeriveFromBitmapIconHelper_base
    • ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon >
      • ImageIcon
  • DeriveFromBitmapIconSourceHelper_base
    • ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource >
      • ImageIconSource
  • DeriveFromPanelHelper_base
    • ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 >
      • AnimatedVisualPlayer
    • ReferenceTracker< ItemsRepeater, DeriveFromPanelHelper_base, winrt::ItemsRepeater, winrt::IItemsRepeater2 >
      • ItemsRepeater
    • ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > >
      • ItemsRepeaterScrollHost
    • ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView >
      • ParallaxView
    • ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface >
      • ScrollPresenter
    • ReferenceTracker< WebView2, DeriveFromPanelHelper_base, winrt::WebView2, winrt::IWebView22, IHwndComponentHost >
      • WebView2
  • DeriveFromPathIconHelper_base
    • ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon >
      • AnimatedIcon
  • DeriveFromPathIconSourceHelper_base
    • ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource >
      • AnimatedIconSource
  • DeriveFromToggleMenuFlyoutItemHelper_base
    • ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem >
      • RadioMenuFlyoutItem
  • DesktopAcrylicBackdrop::ControllerEntry
  • CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>
  • CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
  • DispatcherHelper
  • DisplayRegionHelper
  • DisplayRegionHelperInfo
  • DisplayRegionHelperTestApi
  • DoubleUtil
  • EasingInfo
  • ElementFactory
  • ElementInfo
  • enum_array< E, T, N >
  • enum_vector< E, T >
  • event_base< ImplT, T, StorageT >
  • event_base< event< T >, T, T >
    • event< T >
  • event_base< event_source< T >, T, tracker_ref< T > >
    • event_source< T >
  • ExpanderProperties
    • Expander
  • ExpanderTemplateSettingsProperties
    • ExpanderTemplateSettings
  • final::PinnedElementInfo
  • Flex::FlexState
  • Flex::LineInfo
  • FloatUtil
  • FlowLayoutProperties
    • FlowLayout
      • FlowLayoutDerived
  • FocusHelper
  • GenericInkCallback
  • GlobalDependencyProperty
  • Hsv
  • IFlowLayoutAlgorithmDelegates
    • FlowLayout
    • StackLayout
    • UniformGridLayout
  • ImageIconProperties
    • ImageIcon
  • ImageIconSourceProperties
    • ImageIconSource
  • IndexPath
  • IndexRange
  • InfoBadgeProperties
    • InfoBadge
  • InfoBadgeTemplateSettingsProperties
    • InfoBadgeTemplateSettings
  • InfoBarClosedEventArgs
  • InfoBarPanelProperties
    • InfoBarPanel
  • InfoBarProperties
    • InfoBar
  • InfoBarTemplateSettingsProperties
    • InfoBarTemplateSettings
  • InitialsGenerator
  • InkCanvas::TargetData
  • InkCanvasProperties
    • InkCanvas
  • InkToolBarBallpointPenButton
  • InkToolBarCustomPenButtonProperties
    • InkToolBarCustomPenButton
  • InkToolBarCustomToggleButton
  • InkToolBarCustomToolButtonProperties
    • InkToolBarCustomToolButton
  • InkToolBarEraserButtonProperties
    • InkToolBarEraserButton
  • InkToolBarFlyoutItemProperties
    • InkToolBarFlyoutItem
  • InkToolBarHighlighterButton
  • InkToolBarMenuButtonProperties
    • InkToolBarMenuButton
  • InkToolBarPenButtonProperties
    • InkToolBarPenButton
  • InkToolBarPencilButton
  • InkToolBarPenConfigurationControlProperties
    • InkToolBarPenConfigurationControl
  • InkToolBarProperties
    • InkToolBar
  • InkToolBarStencilButtonProperties
    • InkToolBarStencilButton
  • InkToolBarToolButtonProperties
    • InkToolBarToolButton
  • InkToolBarTrace
  • InspectingDataSource
  • InteractionTrackerAsyncOperation
  • InteractionTrackerOwner
  • is_flags_enum< T >
  • is_flags_enum< PointerOverStatus >
  • is_flags_enum< PointerPressedStatus >
  • ItemCollectionTransitionProviderProperties
    • ItemCollectionTransitionProvider
      • ItemCollectionTransitionProviderDerived
      • RadialItemCollectionTransitionProvider
      • DefaultItemCollectionTransitionProvider
  • ItemContainerProperties
    • ItemContainer
  • ItemContainerRevokers
  • ItemContainerTrace
  • ItemsRepeaterProperties
    • ItemsRepeater
  • ItemsRepeaterScrollHost::BringIntoViewState
  • ItemsRepeaterScrollHost::CandidateInfo
  • ItemsRepeaterTrace
  • ItemsSourceViewFactory
  • ItemsSourceViewProperties
  • ItemsViewProperties
    • ItemsView
  • ItemsViewSelectionChangedEventArgs
  • ItemsViewTestHooks
  • ItemsViewTrace
  • ItemTemplateWrapper
  • ITrackerHandleManager
    • ReferenceTracker< D, ImplT, I >
    • ReferenceTracker< AcrylicBrush, winrt::implementation::AcrylicBrushT >
      • AcrylicBrush
    • ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable >
      • AcrylicTestApi
    • ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon >
    • ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource >
    • ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 >
    • ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT >
      • AnimatedVisualPlayerAutomationPeer
    • ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > >
      • AnnotatedScrollBar
    • ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing >
      • AnnotatedScrollBarDetailLabelRequestedEventArgs
    • ReferenceTracker< AnnotatedScrollBarLabel, winrt::implementation::AnnotatedScrollBarLabelT, winrt::composable, winrt::composing >
      • AnnotatedScrollBarLabel
    • ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type >
      • AnnotatedScrollBarPanningInfo
    • ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing >
      • AnnotatedScrollBarScrollingEventArgs
    • ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT >
      • BreadcrumbBar
    • ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT >
      • BreadcrumbBarItem
    • ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT >
      • BreadcrumbBarItemAutomationPeer
    • ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type >
      • BreadcrumbIterable
    • ReferenceTracker< ButtonInteraction, winrt::implementation::ButtonInteractionT >
      • ButtonInteraction
    • ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable >
      • ButtonInteractionInvokedEventArgs
    • ReferenceTracker< ChildrenCollection< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >
      • VirtualLayoutContextAdapter::ChildrenCollection< T >
    • ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type >
      • ChildrenInTabFocusOrderIterable
    • ReferenceTracker< ColorPicker, winrt::implementation::ColorPickerT >
      • ColorPicker
    • ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT >
      • ColorPickerSlider
    • ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider >
      • ColorPickerSliderAutomationPeer
    • ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT >
      • ColorSpectrum
    • ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider >
      • ColorSpectrumAutomationPeer
    • ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout >
      • ColumnMajorUniformToLargestGridLayout
    • ReferenceTracker< CommandBarFlyout, winrt::implementation::CommandBarFlyoutT >
      • CommandBarFlyout
    • ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT >
      • CommandBarFlyoutCommandBar
    • ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT >
      • DesktopAcrylicBackdrop
    • ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT >
      • DropDownButton
    • ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT >
      • DropDownButtonAutomationPeer
    • ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type >
      • ElementFactoryGetArgsDownlevel
    • ReferenceTracker< ElementFactoryRecycleArgsDownlevel, reference_tracker_implements_t< winrt::Microsoft::UI::Xaml::IElementFactoryRecycleArgs >::type >
      • ElementFactoryRecycleArgsDownlevel
    • ReferenceTracker< Expander, winrt::implementation::ExpanderT >
      • Expander
    • ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT >
      • ExpanderAutomationPeer
    • ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout >
      • FlowLayout
    • ReferenceTracker< FlowLayoutState, winrt::implementation::FlowLayoutStateT, winrt::composing >
      • FlowLayoutState
    • ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > >
      • HashMap< K, V >
    • ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon >
    • ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource >
    • ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT >
      • InfoBadge
    • ReferenceTracker< InfoBar, winrt::implementation::InfoBarT >
      • InfoBar
    • ReferenceTracker< InfoBarAutomationPeer, winrt::implementation::InfoBarAutomationPeerT >
      • InfoBarAutomationPeer
    • ReferenceTracker< InfoBarClosingEventArgs, winrt::implementation::InfoBarClosingEventArgsT, winrt::composable, winrt::composing >
      • InfoBarClosingEventArgs
    • ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT >
      • InfoBarPanel
    • ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT >
      • InkCanvas
    • ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT >
      • InkCanvasAutomationPeer
    • ReferenceTracker< InkToolBar, winrt::implementation::InkToolBarT >
      • InkToolBar
    • ReferenceTracker< InkToolBarAutomationPeer, winrt::implementation::InkToolBarAutomationPeerT >
      • InkToolBarAutomationPeer
    • ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT >
      • InkToolBarCustomPen
    • ReferenceTracker< InkToolBarEraserButtonInternal, winrt::implementation::InkToolBarEraserButtonInternalTundefined >
      • InkToolBarEraserButtonInternal
    • ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT >
      • InkToolBarEraserFlyoutItemClickedEventArgs
    • ReferenceTracker< InkToolBarFlyoutItem, winrt::implementation::InkToolBarFlyoutItemT >
      • InkToolBarFlyoutItem
    • ReferenceTracker< InkToolBarFlyoutItemAutomationPeer, winrt::implementation::InkToolBarFlyoutItemAutomationPeerT >
      • InkToolBarFlyoutItemAutomationPeer
    • ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT >
      • InkToolBarIsStencilButtonCheckedChangedEventArgs
    • ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable >
      • InkToolBarMenuButton
    • ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT >
      • InkToolBarMenuButtonAutomationPeer
    • ReferenceTracker< InkToolBarPenConfigurationControl, winrt::implementation::InkToolBarPenConfigurationControlT >
      • InkToolBarPenConfigurationControl
    • ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable >
      • InkToolBarToggleButton
    • ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable >
      • InkToolBarToolButton
    • ReferenceTracker< InkToolBarToolButtonAutomationPeer, winrt::implementation::InkToolBarToolButtonAutomationPeerT >
      • InkToolBarToolButtonAutomationPeer
    • ReferenceTracker< ItemCollectionTransition, winrt::implementation::ItemCollectionTransitionT, winrt::composing, winrt::composable >
      • ItemCollectionTransition
    • ReferenceTracker< ItemCollectionTransitionCompletedEventArgs, winrt::implementation::ItemCollectionTransitionCompletedEventArgsT, winrt::composing, winrt::composable >
      • ItemCollectionTransitionCompletedEventArgs
    • ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable >
      • ItemCollectionTransitionProgress
    • ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable >
      • ItemCollectionTransitionProvider
    • ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT >
      • ItemContainer
    • ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT >
      • ItemContainerAutomationPeer
    • ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing >
      • ItemContainerInvokedEventArgs
    • ReferenceTracker< ItemsRepeater, DeriveFromPanelHelper_base, winrt::ItemsRepeater, winrt::IItemsRepeater2 >
    • ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing >
      • ItemsRepeaterElementClearingEventArgs
    • ReferenceTracker< ItemsRepeaterElementIndexChangedEventArgs, winrt::implementation::ItemsRepeaterElementIndexChangedEventArgsT, winrt::composable, winrt::composing >
      • ItemsRepeaterElementIndexChangedEventArgs
    • ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing >
      • ItemsRepeaterElementPreparedEventArgs
    • ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > >
    • ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing >
      • ItemsSourceView
    • ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT >
      • ItemsView
    • ReferenceTracker< ItemsViewAutomationPeer, winrt::implementation::ItemsViewAutomationPeerT >
      • ItemsViewAutomationPeer
    • ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing >
      • ItemsViewItemInvokedEventArgs
    • ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type >
      • HashMap< K, V >::Iterator
    • ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type >
      • SelectedItems< T >::Iterator
      • VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
    • ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type >
      • HashMap< K, V >::Iterator::KeyValuePair
    • ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT >
      • LayoutPanel
    • ReferenceTracker< LinedFlowLayout, winrt::implementation::LinedFlowLayoutT, VirtualizingLayout >
      • LinedFlowLayout
    • ReferenceTracker< LinedFlowLayoutItemsInfoRequestedEventArgs, winrt::implementation::LinedFlowLayoutItemsInfoRequestedEventArgsT, winrt::composable, winrt::composing >
      • LinedFlowLayoutItemsInfoRequestedEventArgs
    • ReferenceTracker< MapControl, winrt::implementation::MapControlT >
      • MapControl
    • ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer >
      • MapElementsLayer
    • ReferenceTracker< MapIcon, winrt::implementation::MapIconT, MapElement >
      • MapIcon
    • ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable >
      • MaterialHelperTestApi
    • ReferenceTracker< MenuBar, winrt::implementation::MenuBarT >
      • MenuBar
    • ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT >
      • MenuBarAutomationPeer
    • ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT >
      • MenuBarItem
    • ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT >
      • MenuBarItemAutomationPeer
    • ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT >
      • MenuBarItemFlyout
    • ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT >
      • MicaBackdrop
    • ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT >
      • MonochromaticOverlayPresenter
    • ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT >
      • NavigationView
    • ReferenceTracker< NavigationViewAutomationPeer, winrt::implementation::NavigationViewAutomationPeerT, winrt::ISelectionProvider >
      • NavigationViewAutomationPeer
    • ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider >
      • NavigationViewItemAutomationPeer
    • ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable >
      • NavigationViewItemBase
    • ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable >
      • NavigationViewItemCollapsedEventArgs
    • ReferenceTracker< NavigationViewItemExpandingEventArgs, winrt::implementation::NavigationViewItemExpandingEventArgsT, winrt::composing, winrt::composable >
      • NavigationViewItemExpandingEventArgs
    • ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable >
      • NavigationViewItemInvokedEventArgs
    • ReferenceTracker< NavigationViewItemPresenter, winrt::implementation::NavigationViewItemPresenterT >
      • NavigationViewItemPresenter
    • ReferenceTracker< NavigationViewPaneClosingEventArgs, winrt::implementation::NavigationViewPaneClosingEventArgsT, winrt::composing, winrt::composable >
      • NavigationViewPaneClosingEventArgs
    • ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >
      • NavigationViewSelectionChangedEventArgs
    • ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT >
      • NumberBox
    • ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider >
      • NumberBoxAutomationPeer
    • ReferenceTracker< PagerControl, winrt::implementation::PagerControlT >
      • PagerControl
    • ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider >
      • PagerControlAutomationPeer
    • ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView >
    • ReferenceTracker< PersonPicture, winrt::implementation::PersonPictureT >
      • PersonPicture
    • ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT >
      • PersonPictureAutomationPeer
    • ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT >
      • PipsPager
    • ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider >
      • PipsPagerAutomationPeer
    • ReferenceTracker< ProgressBar, winrt::implementation::ProgressBarT >
      • ProgressBar
    • ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider >
      • ProgressBarAutomationPeer
    • ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT >
      • ProgressRing
    • ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT >
      • ProgressRingAutomationPeer
    • ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT >
      • RadialGradientBrush
    • ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT >
      • RadioButtons
    • ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT >
      • RadioButtonsAutomationPeer
    • ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem >
    • ReferenceTracker< RatingControl, winrt::implementation::RatingControlT >
      • RatingControl
    • ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider >
      • RatingControlAutomationPeer
    • ReferenceTracker< RatingItemInfo, winrt::implementation::RatingItemInfoT >
      • RatingItemInfo
    • ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing >
      • RecyclePool
    • ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory >
      • RecyclingElementFactory
    • ReferenceTracker< RefreshContainer, winrt::implementation::RefreshContainerT, winrt::IRefreshContainerPrivate >
      • RefreshContainer
    • ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner >
      • RefreshInfoProviderImpl
    • ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable >
      • RefreshRequestedEventArgs
    • ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate >
      • RefreshVisualizer
    • ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT >
      • RepeaterAutomationPeer
    • ReferenceTracker< RevealBackgroundBrush, winrt::implementation::RevealBackgroundBrushT, RevealBrush >
      • RevealBackgroundBrush
    • ReferenceTracker< RevealBorderBrush, winrt::implementation::RevealBorderBrushT, RevealBrush >
      • RevealBorderBrush
    • ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT >
      • RevealBorderLight
    • ReferenceTracker< RevealBrushTestApi, winrt::implementation::RevealBrushTestApiT, winrt::composable >
      • RevealBrushTestApi
    • ReferenceTracker< RevealHoverLight, winrt::implementation::RevealHoverLightT >
      • RevealHoverLight
    • ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT >
      • RevealListViewItemPresenter
    • ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable >
      • RevealTestApi
    • ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing >
      • ScrollingAnchorRequestedEventArgs
    • ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface >
    • ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider >
      • ScrollPresenterAutomationPeer
    • ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT >
      • ScrollView
    • ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing >
      • ScrollViewerIRefreshInfoProviderAdapter
    • ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type >
      • ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
    • ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >
      • SelectedItems< T >
    • ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType >
      • SelectedItemsVector
    • ReferenceTracker< SelectedTreeNodeVector, reference_tracker_implements_t< SelectedTreeNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >
      • SelectedTreeNodeVector
    • ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing >
      • SelectionModel
        • CustomSelectionModel
    • ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing >
      • SelectionModelChildrenRequestedEventArgs
    • ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT >
      • SelectorBar
    • ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing >
      • SelectTemplateEventArgs
    • ReferenceTracker< SliderInteraction, winrt::implementation::SliderInteractionT >
      • SliderInteraction
    • ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing >
      • SnapPointBase
    • ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable >
      • SpectrumBrush
    • ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT >
      • SplitButton
    • ReferenceTracker< SplitButtonAutomationPeer, winrt::implementation::SplitButtonAutomationPeerT >
      • SplitButtonAutomationPeer
    • ReferenceTracker< StackLayout, winrt::implementation::StackLayoutT, VirtualizingLayout >
      • StackLayout
    • ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing >
      • StackLayoutState
    • ReferenceTracker< SwipeControl, winrt::implementation::SwipeControlT >
      • SwipeControl
    • ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT >
      • SwipeItem
    • ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > >
      • SwipeItems
    • ReferenceTracker< TabView, winrt::implementation::TabViewT >
      • TabView
    • ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider >
      • TabViewAutomationPeer
    • ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT >
      • TabViewItem
    • ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider >
      • TabViewItemAutomationPeer
    • ReferenceTracker< TabViewListView, winrt::implementation::TabViewListViewT >
      • TabViewListView
    • ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT >
      • TeachingTip
    • ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider >
      • TeachingTipAutomationPeer
    • ReferenceTracker< TeachingTipClosingEventArgs, winrt::implementation::TeachingTipClosingEventArgsT, winrt::composable, winrt::composing >
      • TeachingTipClosingEventArgs
    • ReferenceTracker< TitleBar, winrt::implementation::TitleBarT >
      • TitleBar
    • ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT >
      • TitleBarAutomationPeer
    • ReferenceTracker< ToggleSplitButtonAutomationPeer, winrt::implementation::ToggleSplitButtonAutomationPeerT >
      • ToggleSplitButtonAutomationPeer
    • ReferenceTracker< TreeView, winrt::implementation::TreeViewT >
      • TreeView
        • SpecialTreeView
    • ReferenceTracker< TreeViewCollapsedEventArgs, winrt::implementation::TreeViewCollapsedEventArgsT, winrt::composing, winrt::composable >
      • TreeViewCollapsedEventArgs
    • ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable >
      • TreeViewDragItemsCompletedEventArgs
    • ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable >
      • TreeViewDragItemsStartingEventArgs
    • ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable >
      • TreeViewExpandingEventArgs
    • ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT >
      • TreeViewItem
        • SpecialTreeViewItem
    • ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider >
      • TreeViewItemAutomationPeer
    • ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT >
      • TreeViewItemDataAutomationPeer
    • ReferenceTracker< TreeViewItemInvokedEventArgs, winrt::implementation::TreeViewItemInvokedEventArgsT, winrt::composing, winrt::composable >
      • TreeViewItemInvokedEventArgs
    • ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT >
      • TreeViewList
        • SpecialTreeViewList
    • ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider >
      • TreeViewListAutomationPeer
    • ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable >
      • TreeViewNode
        • SpecialTreeViewNode
        • TreeViewNode2
    • ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >
      • TreeViewNodeVector
    • ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >
      • TreeViewSelectionChangedEventArgs
    • ReferenceTracker< TwoPaneView, winrt::implementation::TwoPaneViewT >
      • TwoPaneView
    • ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout >
      • UniformGridLayout
    • ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing >
      • UniformGridLayoutState
    • ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > >
      • VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
    • ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >
      • VectorBase< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >
        • Vector< T, flags, Helper >
    • ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >
      • VectorBase< winrt::IInspectable, Helper::isObservable, true, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >
        • BindableVector< flags, Helper >
    • ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type >
      • VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
    • ReferenceTracker< ViewModel, reference_tracker_implements_t< ViewModelVectorOptions::VectorType >::type, ViewModelVectorOptions::IterableType, ViewModelVectorOptions::ObservableVectorType >
      • ViewModel
    • ReferenceTracker< WebView2, DeriveFromPanelHelper_base, winrt::WebView2, winrt::IWebView22, IHwndComponentHost >
    • ReferenceTracker< WebView2AutomationPeer, winrt::implementation::WebView2AutomationPeerT, IAutomationPeerHwndInterop >
      • WebView2AutomationPeer
    • ReferenceTracker< XamlAmbientLight, winrt::implementation::XamlAmbientLightT >
      • XamlAmbientLight
    • ReferenceTracker< XamlControlsResources, winrt::implementation::XamlControlsResourcesT, winrt::composable >
      • XamlControlsResources
  • IUnknownAccessor< T, Enable >
  • IUnknownAccessor< com_ptr< T > >
  • IVectorOwner< EventSource, T >
  • Layout
  • LayoutContext
  • LayoutContextAdapter
  • LayoutPanelLayoutContext
  • LayoutPanelProperties
    • LayoutPanel
  • LayoutProperties
  • LayoutsTestHooks
  • LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
  • LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • LifetimeHandler
  • LinedFlowLayout::ItemsInfo
  • LinedFlowLayout::ItemsLayout
  • LinedFlowLayoutItemAspectRatios
  • LinedFlowLayoutItemAspectRatios::ItemAspectRatio
  • LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • LinedFlowLayoutItemCollectionTransitionProvider
  • LinedFlowLayoutProperties
    • LinedFlowLayout
  • LinedFlowLayoutTrace
  • MapControlMapServiceErrorOccurredEventArgs
  • MapControlProperties
    • MapControl
  • MapElement
  • MapElementClickEventArgs
  • MapElementsLayerProperties
    • MapElementsLayer
  • MapIconProperties
    • MapIcon
  • MapLayer
  • MaterialHelper
  • MaterialHelperBase
  • MathToken
  • MenuBarItemProperties
    • MenuBarItem
  • MenuBarProperties
    • MenuBar
  • MicaBackdrop::ControllerEntry
  • MicaBackdropProperties
    • MicaBackdrop
  • AlphaMaskEffect
  • ArithmeticCompositeEffect
  • BlendEffect
  • BorderEffect
  • ColorMatrixEffect
  • ColorSourceEffect
  • CompositeStepEffect
  • ContrastEffect
  • CrossFadeEffect
  • DistantDiffuseEffect
  • DistantSpecularEffect
  • EffectBase
  • EffectBase::NamedProperty
  • ExposureEffect
  • GammaTransferEffect
  • GaussianBlurEffect
  • GrayscaleEffect
  • HueRotationEffect
  • IAlphaMaskEffect
  • IArithmeticCompositeEffect
  • IBlendEffect
  • IBorderEffect
  • IColorMatrixEffect
  • IColorSourceEffect
  • ICompositeStepEffect
  • IContrastEffect
  • ICrossFadeEffect
  • IDistantDiffuseEffect
  • IDistantSpecularEffect
  • IExposureEffect
  • IGammaTransferEffect
  • IGaussianBlurEffect
  • IGrayscaleEffect
  • IHueRotationEffect
  • IInvertEffect
  • ILinearTransferEffect
  • ILuminanceToAlphaEffect
  • InvertEffect
  • IOpacityEffect
  • IPointDiffuseEffect
  • IPointSpecularEffect
  • IPosterizeEffect
  • IPremultiplyEffect
  • ISaturationEffect
  • ISepiaEffect
  • ISpotDiffuseEffect
  • ISpotSpecularEffect
  • ITemperatureAndTintEffect
  • ITintEffect
  • ITransform2DEffect
  • IUnPremultiplyEffect
  • LinearTransferEffect
  • LuminanceToAlphaEffect
  • Matrix5x4
  • OpacityEffect
  • PointDiffuseEffect
  • PointSpecularEffect
  • PosterizeEffect
  • PremultiplyEffect
  • SaturationEffect
  • SepiaEffect
  • SpotDiffuseEffect
  • SpotSpecularEffect
  • TemperatureAndTintEffect
  • TintEffect
  • Transform2DEffect
  • UnPremultiplyEffect
  • RegisterMetadata
  • AcrylicBrushTests
  • AnimatedIconTests
  • AnnotatedScrollBarTests
  • AutoSuggestBoxTests
  • BreadcrumbTests
  • BreadcrumbTests::MockClass
  • ButtonInteractionTests
  • CalendarViewTests
  • Category
  • ColorPickerTests
  • ComboBoxTests
  • CommandBarFlyoutTests
  • CommonStylesApiTests
  • CommonStylesVisualTreeTestSamples
  • CommonStylesVisualTreeTestSamples::CustomizedFilter
  • CommonStylesVisualTreeTestSamples::CustomizedTranslator
  • ControlVisualTreeTestFilter
  • ExpanderTests
  • IconSourceApiTests
  • ImageIconTests
  • InfoBadgeTests
  • ItemContainerTests
  • ItemsViewTests
  • LayoutPanelTests
  • LightConfigurationTests
  • MainWindowLightConfiguration
  • MapControlTests
  • NavigationViewTests
  • NumberBoxTests
  • PagerControlTests
  • ParallaxViewTests
  • PersonPictureTests
  • PipsPagerTests
  • ProgressBarTests
  • ProgressRingTests
  • RadioButtonsTests
  • RatingControlTests
  • RefreshInfoProviderImpl
  • RefreshVisualizerTests
  • AccessibilityTests
  • CustomItemsSourceView
    • CustomItemsSource
      • CustomItemsSourceWithUniqueId
    • CustomItemsSourceViewWithUniqueIdMapping
      • ScrollPresenterTests::TestDataSource
      • CollectionChangeDemo::MyDataSource
      • DelegatingItemsSource
      • PersonDataSource
      • ScrollPresenterBringIntoViewPage::SampleDataSource
      • ScrollPresenterRepeaterAnchoringPage::SampleDataSource
    • MockItemsSource
      • MockItemsSourceWithUniqueIdMapping
  • DataAsElementElementFactory
  • ElementFromElementElementFactory
  • MockElementFactory
  • MockElementFactory::GetElementCallInfo
  • MockElementFactory::RecycleElementCallInfo
  • MockItemsSource::GetAtCallInfo
  • MockItemsSource::KeyFromIndexCallInfo
  • MockStackLayout
  • NamedGroup-g< T >
  • OrientationBasedMeasures
  • ReadOnlyNotifyPropertyChangedCollection-g< T >
  • RecyclingElementFactoryDerived
  • WinRTCollection
  • WinRTCollection::VectorChangedEventArgs
  • EffectiveViewportScrollPresenterTests
  • EffectiveViewportTests
  • FlowLayoutCollectionChangeTests
  • FlowLayoutTests
  • IndexPathTests
  • InspectingDataSourceTests
  • InspectingDataSourceTests::CollectionChangeRecorder
  • InspectingDataSourceTests::CustomEnumerable
  • InspectingDataSourceTests::ObservableVectorWithUniqueIds
  • InspectingDataSourceTests::WinRTObservableVector
  • InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
  • ItemCollectionTransitionProviderTests
  • ItemCollectionTransitionProviderTests::CallInfo
  • ItemTemplateTests
  • LayoutTests
  • LinedFlowLayoutTests
  • MyContainerSelector
  • MySelector
  • PhasingTests
  • PhasingTests::CustomElementFactory
  • PhasingTests::ElementPhasingManager
  • RecyclePoolTests
  • RepeaterFocusTests
  • RepeaterTests
  • SelectionModelTests
  • SelectionModelTests::TreeWalkNodeInfo
  • ViewManagerTests
  • ViewportTests
  • ViewportTests::TestGridLayout
  • ViewportTests::TestScrollingSurface
  • ViewportTests::TestStackLayout
  • RevealTests
  • ScrollPresenterTests
  • ScrollPresenterTests::ScrollPresenterOperation
  • ScrollViewerAdapterTests
  • ScrollViewTests
  • ScrollViewVisualStateCounts
  • SecondaryWindowLightConfiguration
  • SelectorBarTests
  • SliderInteractionTests
  • SplitButtonTests
  • SwipeControlTests
  • TabViewTests
  • TeachingTipTests
  • TestCommand
  • TreeViewTests
  • TwoPaneViewTests
  • AcrylicBrushTests
  • AnimatedVisualPlayerTests
  • AnnotatedScrollBarInteractionTests
  • AutoSuggestBox
  • BreadcrumbBarItem
  • BreadcrumbBarItem::BreadcrumbBarItemFactory
  • BreadcrumbTests
  • ButtonInteractionTests
  • ColorChangedEventWaiter
  • ColorPickerSlider
  • ColorPickerSlider::ColorPickerSliderFactory
  • ColorPickerTests
  • ColorPickerTests::Color
  • ColorPickerTests::ColorPickerTestSetupHelper
  • ColorSpectrum
  • ColorSpectrum::ColorSpectrumFactory
  • CommandBarFlyoutTests
  • CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • CommonStylesTests
  • DropDownButton
  • DropDownButton::DropDownButtonFactory
  • DropDownButtonTests
  • Expander
  • Expander::ExpanderFactory
  • ExpanderTests
  • ImageIconTests
  • InfoBarTests
  • ItemContainerTests
  • ItemsViewTestsWithInputHelper
  • ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
  • ItemsViewTestsWithInputHelper::LoggingHelper
  • MapControlTests
  • MenuBarTests
  • NavigationViewTestsBase
    • CommonTests
    • EventTests
    • FocusBehaviorTests
    • PaneBehaviorTests
    • SelectionTests
    • TopModeTests
  • RegressionTestScenario
  • NumberBoxTests
  • PagerControlTestBase
    • PagerControlTests
  • PagerControlTestPageElements
  • ParallaxViewTests
  • PersonPictureTests
  • PipsPagerElements
  • PipsPagerTestBase
    • PipsPagerTests
  • ProgressBarTests
  • ProgressRingTests
  • RadialGradientBrushTests
  • RadioButtonsFocusTestPageElements
  • RadioButtonsTestPageElements
  • RadioButtonsTests
  • RadioMenuFlyoutItemTests
  • RatingControlTests
  • RefreshContainerTests
  • RepeaterTests
  • RevealBrushTests
  • ScrollPresenterTestsBase
    • ScrollPresenterTestsWithAutomationPeer
    • ScrollPresenterTestsWithInputHelper
  • ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • ScrollViewerAdapterTests
  • ScrollViewTestsWithInputHelper
  • ScrollViewTestsWithInputHelper::LoggingHelper
  • SelectorBarTests
  • SliderInteractionTests
  • SplitButtonTests
  • SwipeControlTests
  • TabViewTearOutTests
  • TabViewTests
  • TeachingTipFocusTestPageElements
  • TeachingTipTestPageElements
  • TeachingTipTests
  • TextCommandBarFlyoutTests
  • TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
  • TitleBarTests
  • TreeViewTests
  • TwoPaneViewTests
  • WebView2Tests
  • WebView2Tests::WebView2TestSetupHelper
  • MonochromaticOverlayPresenterProperties
    • MonochromaticOverlayPresenter
  • IAdapterAnimationHandler
  • IRefreshContainerPrivate
  • IRefreshInfoProvider
  • IRefreshInfoProviderAdapter
  • IRefreshVisualizerPrivate
  • IRepeaterScrollingSurface
  • IAcrylicBrushStaticsPrivate
  • IAnimatedVisual
  • IAnimatedVisualSource
  • IAnimatedVisualSource3
  • IApplicationViewSpanningRects
  • IClosable
  • IKeyIndexMapping
  • MutexLockedResource< T >
  • AspectRatioRespectingControl
  • AutoHandle< THandlePolicy >
  • HandlePolicy
  • MUXControlsFactory
  • AcrylicBrushBasicPage
  • AcrylicBrushLuminosityTestPage
  • AcrylicBrushPage
  • AcrylicBrushPage::WrapperEffectBrush
  • AcrylicColorPage
  • AcrylicMarkupPage
  • AcrylicPage
  • AcrylicRenderingPage
  • AcrylicRenderingPage::SampledColors
  • AnimatedIconHost
  • AnimatedIconPage
  • AnimatedVisualPlayerPage
  • AnimationHandler
  • AnnotatedScrollBarIScrollControllerPage
  • AnnotatedScrollBarPage
  • AnnotatedScrollBarRangeBasePage
  • AnnotatedScrollBarSummaryPage
  • AppBarPage
  • AutoSuggestBoxPage
  • BlankPage
  • BorderThicknessPage
  • BreadcrumbBarAxeTestPage
  • BreadcrumbBarFolder
  • BreadcrumbBarPage
  • Bridge
  • BridgeAnotherClass
  • ButtonInteractionPage
  • CalendarDatePickerPage
  • CalendarViewPage
  • CanvasScrollControllerConsumer
  • Category
  • CheckBoxPage
  • ColorItem
  • ColorPickerPage
  • ColorToSolidColorBrushConverter
  • ComboBoxPage
  • CommandBarCenterPage
  • CommandBarFlyoutMainPage
  • CommandBarFlyoutPage
  • CommandBarPage
  • CommandBarSummaryPage
  • CommonStylesPage
  • CompactPage
  • ContentDialogPage
  • CoreWindowEventsPage
  • CornerRadiusPage
  • CustomContent
  • Customer
  • Customers
  • CustomNavigationViewItem
  • DataItem
  • DataModelWithINPC
  • DatePickerPage
  • DialogWithNavView
  • DoubleToStringConverter
  • DropDownButtonPage
  • DynamicPage
  • EnumToStringConverter
  • ExpanderPage
  • ExtraCommandBarFlyoutPage
  • FallbackGrid
  • FlatItemsControlPage
  • FlipViewPage
  • GridViewPage
  • GroupedItemsControlGroupItem
  • GroupedItemsControlItem
  • GroupedItemsControlPage
  • GroupedItemsControlViewModel
  • GroupedListViewBaseGroupItem
  • GroupedListViewBaseItem
  • GroupedListViewBasePage
  • GroupedListViewBaseViewModel
  • HierarchicalNavigationViewDataBinding
  • HierarchicalNavigationViewMarkup
  • ICoreWebView2Interop
  • ImageIconPage
  • ImageIRefreshInfoProviderAdapter
  • ImagePage
  • InfoBadgePage
  • InfobarAxeTestage
  • InfoBarPage
  • Ingredient
  • InkToolbarPage
  • IScrollControllerAdapter
  • ItemContainerLayoutPage
  • ItemContainerPage
  • ItemContainerSummaryPage
  • ItemsControlPage
  • ItemsViewBlankPage
  • ItemsViewIntegrationPage
  • ItemsViewInteractiveTestsPage
  • ItemsViewPage
  • ItemsViewPictureLibraryPage
  • ItemsViewSummaryPage
  • ItemsViewSummaryPage::QueuedOperation
  • ItemsViewTransitionPage
  • ListViewAnchoringPage
  • ListViewBackgroundPage
  • ListViewBasePage
  • ListViewBasePage::QueuedOperation
  • ListViewElementNameBindingPage
  • ListViewHeaderPage
  • ListViewItemPage
  • ListViewPage
  • MapControlPage
  • MediaTransportControlsPage
  • MenuBarPage
  • MenuFlyoutPage
  • MockAnimatedIconSource
  • MockIAnimatedIconSource2
  • MonochromaticOverlayPresenterPage
  • MultipleTabViewPage
  • MyCommand
  • MyData
  • NavigationViewAnimationPage
  • NavigationViewAxeTestPage
  • NavigationViewBlankPage1
  • NavigationViewCaseBundle
  • NavigationViewCompactPaneLengthTestPage
  • NavigationViewCustomMenuItemPage
  • NavigationViewCustomThemeResourcesPage
  • NavigationViewInfoBadgeTestPage
  • NavigationViewInitPage
  • NavigationViewIsPaneOpenPage
  • NavigationViewItemTemplatePage
  • NavigationViewMenuItemsSourcePage
  • NavigationViewMenuItemStretchPage
  • NavigationViewMinimalPage
  • NavigationViewPage
  • NavigationViewPageDataContext
  • NavigationViewRS3Page
  • NavigationViewRS4Page
  • NavigationViewSelectedItemEdgeCasePage
  • NavigationViewStretchPage
  • NavigationViewTopNavOnlyPage
  • NavigationViewTopNavOverflowButtonPage
  • NavigationViewTopNavPage
  • NavigationViewTopNavStorePage
  • NavViewPageData
  • NestedGridViewsPage
  • NestedItemsControlsPage
  • NestedListViewsPage
  • NewWindowRootPage
  • NullableBooleanToBooleanConverter
  • NumberBoxAxeTestPage
  • NumberBoxPage
  • PageInfo
  • PagerControlAxeTestPage
  • PagerControlPage
  • PaneFooterTestPage
  • PaneLayoutTestPage
  • ParallaxViewPage
  • ParallaxViewStackPanelPage
  • PersonInfo
  • PersonPicturePage
  • PersonPicturePage::SportsGroup
  • PersonPicturePage::SportsPerson
  • Picture
  • PictureLibrary
  • PipsPagerAxeTestPage
  • PipsPagerExamples
  • PipsPagerPage
  • PivotPage
  • PrefixConverter
  • ProgressBarAxeTestPage
  • ProgressBarPage
  • ProgressBarReTemplatePage
  • ProgressRingAxeTestPage
  • ProgressRingCustomLottieSourcePage
  • ProgressRingPage
  • ProgressRingStoryboardAnimationPage
  • PTRPage
  • RadialGradientBrushPage
  • RadioButtonsPage
  • RadioMenuFlyoutItemPage
  • RatingControlPage
  • RefreshableCollection-g< T >
  • RefreshContainerOnImagePage
  • RefreshContainerPage
  • RefreshInfoProviderImplementation
  • RefreshVisualizerPage
  • RepeaterTestUIPage
  • RevealBackgroundItem
  • RevealBasicPage
  • RevealColorPage
  • RevealFallbackPage
  • RevealGridItem
  • RevealGridTypeItem
  • RevealItem
  • RevealListPage
  • RevealMarkupPage
  • RevealPage
  • RevealRegressionTestsPage
  • RevealScenarioColors
  • RevealScenarioGrid
  • RevealScenarioItem
  • RevealScenarioLights
  • RevealScenarioList
  • RevealScenarios
  • RevealScenarioSecondaryView
  • RevealSimpleListPage
  • RevealStatesPage
  • RevealThemeItem
  • ActivityFeedLayoutState
  • ActivityFeedSamplePage
  • AnimationsDemoPage
  • AnimationsDemoPage::AnimationElementFactory
  • BasicDemo
  • Category
  • CircleLayoutSamplePage
  • CollectionChangeDemo
  • Defaults
  • DisposableUserControl
  • ElementsInItemsSourcePage
  • FixedSizeItem
  • FlowLayoutDemoPage
  • Item
  • ItemsViewWithDataPage
  • ItemTemplateDemo
  • KeyboardNavigationSample
  • LinedFlowLayoutDemo
  • Recipe
  • RecipeGroup
  • Year
  • MyCollection
  • MyData
  • MyItem
  • MyItemsRepeater
  • MySelector
  • NonVirtualStackLayoutSamplePage
  • ObjectModelTestPage
  • Person
  • PersonElementFactory
  • PinterestLayoutSamplePage
  • RecipeElementFactory
  • ScaleAnimatedVerticalListDemo
  • BoolToBrushConverter
  • BoolToVisibilityConverter
  • Data
  • FlatSample
  • GroupedRepeaterItem
  • GroupedRepeaterItemAutomationPeer
  • GroupedSample
  • RepeaterItem
  • RepeaterItemAutomationPeer
  • SelectionContainer
  • SelectionContainerAutomationPeer
  • TreeViewItem
  • TreeViewItemAutomationPeer
  • TreeViewSample
  • SortingAndFilteringPage
  • StoreDemoPage
  • StoreMockData
  • UICollection
  • UniformGridLayoutDemo
  • VariableSizedItemsPage
  • VariableSizeItem
  • VirtualizingStackLayoutSamplePage
  • VirtualizingUniformStackLayoutSamplePage
  • SampleSuggestions
  • ScrollBarController
  • ScrollBarPage
  • ScrollPresenterAccessibilityPage
  • ScrollPresenterBringIntoViewPage
  • ScrollPresenterChainingAndRailingPage
  • ScrollPresenterDynamicPage
  • ScrollPresenterDynamicPage::QueuedOperation
  • ScrollPresenterExpressionAnimationSourcesPage
  • ScrollPresenterLeakDetectionPage
  • ScrollPresenterManipulationModePage
  • ScrollPresenterMousePanningPage
  • ScrollPresenterPage
  • ScrollPresenterRepeaterAnchoringPage
  • ScrollPresenterRepeaterAnchoringPage::QueuedOperation
  • ScrollPresenterScrollSnapPointsPage
  • ScrollPresenterStackPanelAnchoringPage
  • ScrollPresenterStackPanelAnchoringPage::QueuedOperation
  • ScrollPresentersWithSimpleContentsPage
  • ScrollPresenterWithBiDirectionalScrollControllerPage
  • ScrollPresenterWithCompositionScrollControllersPage
  • ScrollPresenterWithSimpleScrollControllersPage
  • ScrollPresenterZoomSnapPointsPage
  • ScrollViewBlankPage
  • ScrollViewBringIntoViewPage
  • ScrollViewDynamicPage
  • ScrollViewerAdapterPage
  • ScrollViewerPage
  • ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollViewPage
  • ScrollViewsWithSimpleContentsPage
  • ScrollViewWithRTLFlowDirectionPage
  • ScrollViewWithScrollControllersPage
  • SelectionModeItem
  • SelectorBarPage
  • SelectorBarSamplePage
  • SelectorBarSummaryPage
  • SimpleRectanglePage
  • SimpleVerify
  • SliderInteractionPage
  • SliderPage
  • SplitButtonPage
  • SplitViewPage
  • Square
  • SwipeControlClearPage
  • SwipeControlPage
  • SwipeControlPage2
  • SwipePage
  • TabDataItem
  • TabViewAxeTestPage
  • TabViewPage
  • TabViewSizingPage
  • TabViewTabClosingBehaviorPage
  • TabViewTabItemsSourcePage
  • TabViewTearOutWindowWithDataItems
  • TabViewTearOutWindowWithoutDataItems
  • TargetElement
  • TeachingTipCaseBundle
  • TeachingTipFocusPage
  • TeachingTipInXamlPage
  • TeachingTipPage
  • TestControl
  • TestControlAutomationPeer
  • TextCommandBarFlyoutPage
  • TextControlsPage
  • TextPage
  • TimePickerPage
  • TitleBarPage
  • TitleBarPageWindow
  • ToggleAnimatedIconHost
  • ToolTipPage
  • TreeViewItemSource
  • TreeViewItemsSourceTestPage
  • TreeViewItemStyleSelector
  • TreeViewItemTemplateSelector
  • TreeViewItemTemplateSelectorTestPage
  • TreeViewLateDataInitTest
  • TreeViewNodeInMarkupTestPage
  • TreeViewPage
  • TreeViewUnrealizedChildrenTestPage
  • TreeViewViewModel
  • TreeViewViewModelItem
  • TwoPaneViewPage
  • UriToStringConverter
  • BiDirectionalScrollController
  • BiDirectionalScrollController::OperationInfo
  • BiDirectionalScrollController::UniScrollController
  • BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs
  • BiDirectionalScrollControllerScrollingScrollCompletedEventArgs
  • CompositionScrollController
  • CompositionScrollController::OperationInfo
  • CompositionScrollControllerOffsetChangeCompletedEventArgs
  • CompositionScrollControllerPanningInfo
  • ExpressionAnimationStatusChange
  • ScrollPresenterTestHooksHelper
  • ScrollViewTestHooksHelper
  • ResetableCollection-g< T >
  • VirtualizingDataSource
  • VirtualizingStackPanelPage
  • VisualPropertiesPage
  • VisualStatesPage
  • WebView2BasicPage
  • WebView2Common
  • WebView2CoreObjectsPage
  • WebView2Page
  • WebView2WithCursor
  • WindowPage
  • MUXControlsTestHooks
  • MUXControlsTestHooksLoggingMessageEventArgs
  • NavigationViewBackRequestedEventArgs
  • NavigationViewDisplayModeChangedEventArgs
  • NavigationViewItemBaseProperties
    • NavigationViewItemBase
  • NavigationViewItemBaseRevokers
  • NavigationViewItemHeader
  • NavigationViewItemHelper< T >
  • NavigationViewItemPresenterProperties
    • NavigationViewItemPresenter
  • NavigationViewItemPresenterTemplateSettingsProperties
    • NavigationViewItemPresenterTemplateSettings
  • NavigationViewItemProperties
    • NavigationViewItem
  • NavigationViewItemSeparator
  • NavigationViewItemsFactory
  • NavigationViewProperties
    • NavigationView
  • NavigationViewTemplateSettingsProperties
    • NavigationViewTemplateSettings
  • NavigationViewTrace
  • NonReferenceTrackerStorageHelper< T >
    • event< T >
  • NonVirtualizingLayout
    • Flex
    • MyCustomNonVirtualizingStackLayout
    • MockNonVirtualizingLayout
    • NonVirtualStackLayout
    • NonVirtualStackLayout
  • NonVirtualizingLayoutContext
  • NumberBoxParser
  • NumberBoxProperties
    • NumberBox
  • NumberBoxValueChangedEventArgs
  • ObservableTraits< T, isObservable, isBindable >
  • ObservableTraits< T, isObservable, isBindable >::Dummy
  • ObservableTraits< T, true, isBindable >
  • ObservableVector< T >
  • ObservableVector< T >::Iterator
  • OrientationBasedMeasures
    • FlowLayout
    • FlowLayoutAlgorithm
    • StackLayout
    • UniformGridLayout
  • PagerControlProperties
    • PagerControl
  • PagerControlSelectedIndexChangedEventArgs
  • PagerControlTemplateSettingsProperties
    • PagerControlTemplateSettings
  • ParallaxViewProperties
    • ParallaxView
  • PerfXamlEvent_RAII
  • PersonPictureProperties
    • PersonPicture
  • PersonPictureTemplateSettingsProperties
    • PersonPictureTemplateSettings
  • PipsPagerProperties
    • PipsPager
  • PipsPagerSelectedIndexChangedEventArgs
  • PipsPagerTemplateSettingsProperties
    • PipsPagerTemplateSettings
  • PipsPagerViewItemRevokers
  • PointerInfo< T >
  • PointerInfoRevokers
  • ProgressBarProperties
    • ProgressBar
  • ProgressBarTemplateSettingsProperties
    • ProgressBarTemplateSettings
  • ProgressRingProperties
    • ProgressRing
  • ProgressRingTemplateSettingsProperties
    • ProgressRingTemplateSettings
  • PropertyChanged_revoker
  • PullToRefreshPage
  • PTRTrace
  • PullToRefreshHelperTestApi
  • RadialGradientBrushProperties
    • RadialGradientBrush
  • RadioButtonsCaseBundle
  • RadioButtonsFocusPage
  • RadioButtonsElementFactory
  • RadioButtonsProperties
    • RadioButtons
  • RadioButtonsTestHooks
  • RadioMenuFlyoutItemProperties
    • RadioMenuFlyoutItem
  • RatingControlProperties
    • RatingControl
  • RatingItemFontInfoProperties
    • RatingItemFontInfo
  • RatingItemImageInfoProperties
    • RatingItemImageInfo
  • RecyclePool::ElementInfo
  • RecyclePoolProperties
  • RecyclingElementFactoryProperties
    • RecyclingElementFactory
  • reference_tracker_custom_implements_t< WinRTClassType, ImplT >
  • reference_tracker_implements< D, WinRTClassType, ImplT, I >
  • reference_tracker_implements_t< WinRTClassType >
  • type< AnnotatedScrollBarPanningInfo, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type >
  • type< BreadcrumbIterable, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type >
  • type< ChildrenCollection< T >, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< ChildrenCollection< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >
  • type< ChildrenInTabFocusOrderIterable, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type >
  • type< ElementFactoryGetArgsDownlevel, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type >
  • type< ElementFactoryRecycleArgsDownlevel, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< ElementFactoryRecycleArgsDownlevel, reference_tracker_implements_t< winrt::Microsoft::UI::Xaml::IElementFactoryRecycleArgs >::type >
  • type< HashMap< K, V >, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > >
  • type< Iterator, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type >
    • ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type >
  • type< KeyValuePair, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type >
  • type< RefreshInfoProviderImpl, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner >
  • type< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type >
  • type< SelectedItems< T >, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > >
  • type< SelectedItemsVector, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType >
  • type< SelectedTreeNodeVector, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< SelectedTreeNodeVector, reference_tracker_implements_t< SelectedTreeNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >
  • type< TreeViewNodeVector, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType >
  • type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > >
  • type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >
  • type< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > >
  • type< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type >
  • type< ViewModel, I...,::IReferenceTrackerExtension >
    • ReferenceTracker< ViewModel, reference_tracker_implements_t< ViewModelVectorOptions::VectorType >::type, ViewModelVectorOptions::IterableType, ViewModelVectorOptions::ObservableVectorType >
  • ReferenceTrackerContainerBase
    • event_source< T >
  • ReferenceTrackerStorageHelper< ImplT, T >
  • ReferenceTrackerStorageHelper< event_source< T >, T >
    • event_source< T >
  • RefreshContainerProperties
    • RefreshContainer
  • RefreshInteractionRatioChangedEventArgs
  • RefreshStateChangedEventArgs
  • RefreshVisualizerProperties
    • RefreshVisualizer
  • RefreshInfoProviderImplementation
  • SliderRefreshInfoProviderAdapter
  • RegUtil
  • RepeatedScrollSnapPoint
  • RepeatedZoomSnapPoint
  • RepeaterLayoutContext
  • RepeaterTestHooks
  • RevealBorderSpotlightInfo< ValueType >
  • RevealBorderSpotlightStateDesc
  • RevealBrushProperties
    • RevealBrush
  • RevealHoverSpotlightAnimationInfo< ValueType >
  • RevealHoverSpotlightStateDesc
  • Rgb
  • RoutedEventHandler_revoker
  • RoutedEventTraits< eventType >
  • RoutedEventTraits< RoutedEventType::DragEnter >
  • RoutedEventTraits< RoutedEventType::DragLeave >
  • RoutedEventTraits< RoutedEventType::Drop >
  • RoutedEventTraits< RoutedEventType::GettingFocus >
  • RoutedEventTraits< RoutedEventType::KeyDown >
  • RoutedEventTraits< RoutedEventType::LosingFocus >
  • RoutedEventTraits< RoutedEventType::PointerCanceled >
  • RoutedEventTraits< RoutedEventType::PointerCaptureLost >
  • RoutedEventTraits< RoutedEventType::PointerExited >
  • RoutedEventTraits< RoutedEventType::PointerPressed >
  • RoutedEventTraits< RoutedEventType::PointerReleased >
  • CMethodProfileGroupBase
    • CMethodProfileGroup< size >
  • FunctionTelemetryCount
  • ProfileGroupInfo
  • ScopedBatchCompleted_revoker
  • ScrollBarController
  • ScrollControllerAddScrollVelocityRequestedEventArgs
  • ScrollControllerPanRequestedEventArgs
  • ScrollControllerScrollByRequestedEventArgs
  • ScrollControllerScrollToRequestedEventArgs
  • ScrollingBringingIntoViewEventArgs
  • ScrollingScrollAnimationStartingEventArgs
  • ScrollingScrollCompletedEventArgs
  • ScrollingScrollOptions
  • ScrollingScrollStartingEventArgs
  • ScrollingZoomAnimationStartingEventArgs
  • ScrollingZoomCompletedEventArgs
  • ScrollingZoomOptions
  • ScrollingZoomStartingEventArgs
  • ScrollInputHelper
  • ScrollPresenterProperties
    • ScrollPresenter
  • ScrollPresenterTestHooks
  • ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
  • ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
  • ScrollPresenterTrace
  • ScrollSnapPoint
  • ScrollSnapPointBase
  • ScrollView::AutoHideScrollBarsState
  • ScrollViewBringIntoViewOperation
  • ScrollViewProperties
    • ScrollView
  • ScrollViewTestHooks
  • ScrollViewTrace
  • sealed< T, fallback, RawStorageT >
  • SelectedItemInfo
  • SelectionModelProperties
    • SelectionModel
  • SelectionModelSelectionChangedEventArgs
  • SelectionTreeHelper
  • SelectionTreeHelper::TreeWalkNodeInfo
  • SelectorBarItemAutomationPeer
  • SelectorBarItemProperties
    • SelectorBarItem
  • SelectorBarProperties
    • SelectorBar
  • SelectorBarSelectionChangedEventArgs
  • SelectorBarTestHooks
  • SelectorBarTrace
  • SelectorBase
    • ExtendedSelector
    • MultipleSelector
    • NullSelector
    • SingleSelector
  • SharedHelpers
  • SimpleXamlStartStopEvent_RAII
    • WebView2_TryCompleteInitialization_RAII
  • SliderInteractionProperties
    • SliderInteraction
  • SnapPointSortPredicate
  • SnapPointWrapper< T >
  • SnapPointWrapperComparator< T >
  • SpectrumBrushProperties
    • SpectrumBrush
  • SplitButtonClickEventArgs
  • SplitButtonProperties
    • SplitButton
  • SplitButtonTestApi
  • SplitButtonTestHelper
  • SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • SplitVector< T, SplitVectorID >
  • StackLayoutProperties
    • StackLayout
  • TestCommand
  • SwipeControlInteractionTrackerOwner
  • SwipeControlProperties
    • SwipeControl
  • SwipeControlTrace
  • SwipeItemInvokedEventArgs
  • SwipeItemProperties
    • SwipeItem
  • SwipeItemsProperties
    • SwipeItems
  • SwipeTestHooks
  • TabViewExternalTornOutTabsDroppedEventArgs
  • TabViewExternalTornOutTabsDroppingEventArgs
  • TabViewItemProperties
    • TabViewItem
  • TabViewItemTemplateSettingsProperties
    • TabViewItemTemplateSettings
  • TabViewProperties
    • TabView
  • TabViewTabCloseRequestedEventArgs
  • TabViewTabDragCompletedEventArgs
  • TabViewTabDragStartingEventArgs
  • TabViewTabDroppedOutsideEventArgs
  • TabViewTabTearOutRequestedEventArgs
  • TabViewTabTearOutWindowRequestedEventArgs
  • TabViewTrace
  • TeachingTipClosedEventArgs
  • TeachingTipProperties
    • TeachingTip
  • TeachingTipTemplateSettingsProperties
    • TeachingTipTemplateSettings
  • TeachingTipTestHooks
  • TextCommandBarFlyout
  • ThreadData
  • TitleBarProperties
    • TitleBar
  • TitleBarTemplateSettingsProperties
    • TitleBarTemplateSettings
  • ToggleSplitButtonIsCheckedChangedEventArgs
  • ToggleSplitButtonProperties
    • ToggleSplitButton
  • TopNavigationViewDataProvider
  • tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • TreeViewItemProperties
    • TreeViewItem
  • TreeViewItemTemplateSettingsProperties
    • TreeViewItemTemplateSettings
  • TreeViewNodeProperties
    • TreeViewNode
  • TreeViewProperties
    • TreeView
  • TStorageWrapperImpl< T, isNoTrackerRef >
  • TStorageWrapperImpl< T, true >
  • TwoPaneViewProperties
    • TwoPaneView
  • UniformGridLayoutProperties
    • UniformGridLayout
  • ValueHelper< T, Enable >
  • ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > >
  • ValueHelper< winrt::hstring, void >
  • ValueProviderThunk< Owner >
  • VectorChangedEventArgs
  • VectorFlagHelper< flag >
  • VectorInnerImpl< VectorOptions, Wrapper >
    • ObservableVectorInnerImpl< VectorOptions, Wrapper >
  • VectorInterfaceHelper< T, isBindable >
    • VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • VectorInterfaceHelper< T, true >
  • VectorInterfaceHelper< winrt::IInspectable, isBindable >
    • VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef >
  • IVectorOwner
    • VectorBase< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >
    • VectorBase< winrt::IInspectable, Helper::isObservable, true, Helper::isDependencyObjectBase, Helper::isNoTrackerRef >
  • ViewChangeBase
    • OffsetsChangeWithAdditionalVelocity
    • ViewChange
      • OffsetsChange
        • BringIntoViewOffsetsChange
      • ZoomFactorChange
    • ZoomFactorChangeWithAdditionalVelocity
  • ViewportManager
    • ViewportManagerDownLevel
    • ViewportManagerWithPlatformFeatures
  • ViewportManagerDownLevel::ScrollerInfo
  • VirtualizationInfo
  • VirtualizingLayout
    • UniformGrid2DLayout
    • VirtualizingUniformCarouselStackLayout
    • MockVirtualizingLayout
    • ActivityFeedLayout
    • CircleLayout
    • PinterestLayout
    • VirtualizingStackLayout
    • VirtualizingUniformStackLayout
  • VirtualizingLayoutContext
  • VirtualLayoutContextAdapter
  • VisualStateUtil
  • WebView2::XamlFocusChangeInfo
  • WebView2Properties
    • WebView2
  • WebView2RenderingVerifier
  • WebView2RenderingVerifier::NativeMethods::RECT
  • AcrylicBrushT
    • ReferenceTracker< AcrylicBrush, winrt::implementation::AcrylicBrushT >
  • AcrylicTestApiT
    • ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable >
  • AnimatedVisualPlayerAutomationPeerT
    • ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT >
  • AnnotatedScrollBarDetailLabelRequestedEventArgsT
    • ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing >
  • AnnotatedScrollBarLabelT
    • ReferenceTracker< AnnotatedScrollBarLabel, winrt::implementation::AnnotatedScrollBarLabelT, winrt::composable, winrt::composing >
  • AnnotatedScrollBarScrollingEventArgsT
    • ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing >
  • AnnotatedScrollBarT
    • ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > >
  • BreadcrumbBarItemAutomationPeerT
    • ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT >
  • BreadcrumbBarItemT
    • ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT >
  • BreadcrumbBarT
    • ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT >
  • ButtonInteractionInvokedEventArgsT
    • ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable >
  • ButtonInteractionT
    • ReferenceTracker< ButtonInteraction, winrt::implementation::ButtonInteractionT >
  • ColorPickerSliderAutomationPeerT
    • ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider >
  • ColorPickerSliderT
    • ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT >
  • ColorPickerT
    • ReferenceTracker< ColorPicker, winrt::implementation::ColorPickerT >
  • ColorSpectrumAutomationPeerT
    • ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider >
  • ColorSpectrumT
    • ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT >
  • ColumnMajorUniformToLargestGridLayoutT
    • ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout >
  • CommandBarFlyoutCommandBarT
    • ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT >
  • CommandBarFlyoutT
    • ReferenceTracker< CommandBarFlyout, winrt::implementation::CommandBarFlyoutT >
  • DesktopAcrylicBackdropT
    • ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT >
  • DropDownButtonAutomationPeerT
    • ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT >
  • DropDownButtonT
    • ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT >
  • ExpanderAutomationPeerT
    • ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT >
  • ExpanderT
    • ReferenceTracker< Expander, winrt::implementation::ExpanderT >
  • FlowLayoutStateT
    • ReferenceTracker< FlowLayoutState, winrt::implementation::FlowLayoutStateT, winrt::composing >
  • FlowLayoutT
    • ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout >
  • InfoBadgeT
    • ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT >
  • InfoBarAutomationPeerT
    • ReferenceTracker< InfoBarAutomationPeer, winrt::implementation::InfoBarAutomationPeerT >
  • InfoBarClosingEventArgsT
    • ReferenceTracker< InfoBarClosingEventArgs, winrt::implementation::InfoBarClosingEventArgsT, winrt::composable, winrt::composing >
  • InfoBarPanelT
    • ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT >
  • InfoBarT
    • ReferenceTracker< InfoBar, winrt::implementation::InfoBarT >
  • InkCanvasAutomationPeerT
    • ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT >
  • InkCanvasT
    • ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT >
  • InkToolBarAutomationPeerT
    • ReferenceTracker< InkToolBarAutomationPeer, winrt::implementation::InkToolBarAutomationPeerT >
  • InkToolBarCustomPenT
    • ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT >
  • InkToolBarEraserButtonInternalTundefined
    • ReferenceTracker< InkToolBarEraserButtonInternal, winrt::implementation::InkToolBarEraserButtonInternalTundefined >
  • InkToolBarEraserFlyoutItemClickedEventArgsT
    • ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT >
  • InkToolBarFlyoutItemAutomationPeerT
    • ReferenceTracker< InkToolBarFlyoutItemAutomationPeer, winrt::implementation::InkToolBarFlyoutItemAutomationPeerT >
  • InkToolBarFlyoutItemT
    • ReferenceTracker< InkToolBarFlyoutItem, winrt::implementation::InkToolBarFlyoutItemT >
  • InkToolBarIsStencilButtonCheckedChangedEventArgsT
    • ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT >
  • InkToolBarMenuButtonAutomationPeerT
    • ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT >
  • InkToolBarMenuButtonT
    • ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable >
  • InkToolBarPenConfigurationControlT
    • ReferenceTracker< InkToolBarPenConfigurationControl, winrt::implementation::InkToolBarPenConfigurationControlT >
  • InkToolBarT
    • ReferenceTracker< InkToolBar, winrt::implementation::InkToolBarT >
  • InkToolBarToggleButtonT
    • ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable >
  • InkToolBarToolButtonAutomationPeerT
    • ReferenceTracker< InkToolBarToolButtonAutomationPeer, winrt::implementation::InkToolBarToolButtonAutomationPeerT >
  • InkToolBarToolButtonT
    • ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable >
  • ItemCollectionTransitionCompletedEventArgsT
    • ReferenceTracker< ItemCollectionTransitionCompletedEventArgs, winrt::implementation::ItemCollectionTransitionCompletedEventArgsT, winrt::composing, winrt::composable >
  • ItemCollectionTransitionProgressT
    • ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable >
  • ItemCollectionTransitionProviderT
    • ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable >
  • ItemCollectionTransitionT
    • ReferenceTracker< ItemCollectionTransition, winrt::implementation::ItemCollectionTransitionT, winrt::composing, winrt::composable >
  • ItemContainerAutomationPeerT
    • ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT >
  • ItemContainerInvokedEventArgsT
    • ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing >
  • ItemContainerT
    • ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT >
  • ItemsRepeaterElementClearingEventArgsT
    • ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing >
  • ItemsRepeaterElementIndexChangedEventArgsT
    • ReferenceTracker< ItemsRepeaterElementIndexChangedEventArgs, winrt::implementation::ItemsRepeaterElementIndexChangedEventArgsT, winrt::composable, winrt::composing >
  • ItemsRepeaterElementPreparedEventArgsT
    • ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing >
  • ItemsSourceViewT
    • ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing >
  • ItemsViewAutomationPeerT
    • ReferenceTracker< ItemsViewAutomationPeer, winrt::implementation::ItemsViewAutomationPeerT >
  • ItemsViewItemInvokedEventArgsT
    • ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing >
  • ItemsViewT
    • ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT >
  • LayoutPanelT
    • ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT >
  • LinedFlowLayoutItemsInfoRequestedEventArgsT
    • ReferenceTracker< LinedFlowLayoutItemsInfoRequestedEventArgs, winrt::implementation::LinedFlowLayoutItemsInfoRequestedEventArgsT, winrt::composable, winrt::composing >
  • LinedFlowLayoutT
    • ReferenceTracker< LinedFlowLayout, winrt::implementation::LinedFlowLayoutT, VirtualizingLayout >
  • MapControlT
    • ReferenceTracker< MapControl, winrt::implementation::MapControlT >
  • MapElementsLayerT
    • ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer >
  • MapIconT
    • ReferenceTracker< MapIcon, winrt::implementation::MapIconT, MapElement >
  • MaterialHelperTestApiT
    • ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable >
  • MenuBarAutomationPeerT
    • ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT >
  • MenuBarItemAutomationPeerT
    • ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT >
  • MenuBarItemFlyoutT
    • ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT >
  • MenuBarItemT
    • ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT >
  • MenuBarT
    • ReferenceTracker< MenuBar, winrt::implementation::MenuBarT >
  • MicaBackdropT
    • ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT >
  • MonochromaticOverlayPresenterT
    • ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT >
  • NavigationViewAutomationPeerT
    • ReferenceTracker< NavigationViewAutomationPeer, winrt::implementation::NavigationViewAutomationPeerT, winrt::ISelectionProvider >
  • NavigationViewItemAutomationPeerT
    • ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider >
  • NavigationViewItemBaseT
    • ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable >
  • NavigationViewItemCollapsedEventArgsT
    • ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable >
  • NavigationViewItemExpandingEventArgsT
    • ReferenceTracker< NavigationViewItemExpandingEventArgs, winrt::implementation::NavigationViewItemExpandingEventArgsT, winrt::composing, winrt::composable >
  • NavigationViewItemInvokedEventArgsT
    • ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable >
  • NavigationViewItemPresenterT
    • ReferenceTracker< NavigationViewItemPresenter, winrt::implementation::NavigationViewItemPresenterT >
  • NavigationViewPaneClosingEventArgsT
    • ReferenceTracker< NavigationViewPaneClosingEventArgs, winrt::implementation::NavigationViewPaneClosingEventArgsT, winrt::composing, winrt::composable >
  • NavigationViewSelectionChangedEventArgsT
    • ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >
  • NavigationViewT
    • ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT >
  • NumberBoxAutomationPeerT
    • ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider >
  • NumberBoxT
    • ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT >
  • PagerControlAutomationPeerT
    • ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider >
  • PagerControlT
    • ReferenceTracker< PagerControl, winrt::implementation::PagerControlT >
  • PersonPictureAutomationPeerT
    • ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT >
  • PersonPictureT
    • ReferenceTracker< PersonPicture, winrt::implementation::PersonPictureT >
  • PipsPagerAutomationPeerT
    • ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider >
  • PipsPagerT
    • ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT >
  • ProgressBarAutomationPeerT
    • ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider >
  • ProgressBarT
    • ReferenceTracker< ProgressBar, winrt::implementation::ProgressBarT >
  • ProgressRingAutomationPeerT
    • ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT >
  • ProgressRingT
    • ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT >
  • RadialGradientBrushT
    • ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT >
  • RadioButtonsAutomationPeerT
    • ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT >
  • RadioButtonsT
    • ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT >
  • RatingControlAutomationPeerT
    • ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider >
  • RatingControlT
    • ReferenceTracker< RatingControl, winrt::implementation::RatingControlT >
  • RatingItemInfoT
    • ReferenceTracker< RatingItemInfo, winrt::implementation::RatingItemInfoT >
  • RecyclePoolT
    • ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing >
  • RecyclingElementFactoryT
    • ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory >
  • RefreshContainerT
    • ReferenceTracker< RefreshContainer, winrt::implementation::RefreshContainerT, winrt::IRefreshContainerPrivate >
  • RefreshRequestedEventArgsT
    • ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable >
  • RefreshVisualizerT
    • ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate >
  • RepeaterAutomationPeerT
    • ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT >
  • RevealBackgroundBrushT
    • ReferenceTracker< RevealBackgroundBrush, winrt::implementation::RevealBackgroundBrushT, RevealBrush >
  • RevealBorderBrushT
    • ReferenceTracker< RevealBorderBrush, winrt::implementation::RevealBorderBrushT, RevealBrush >
  • RevealBorderLightT
    • ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT >
  • RevealBrushTestApiT
    • ReferenceTracker< RevealBrushTestApi, winrt::implementation::RevealBrushTestApiT, winrt::composable >
  • RevealHoverLightT
    • ReferenceTracker< RevealHoverLight, winrt::implementation::RevealHoverLightT >
  • RevealListViewItemPresenterT
    • ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT >
  • RevealTestApiT
    • ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable >
  • ScrollingAnchorRequestedEventArgsT
    • ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing >
  • ScrollPresenterAutomationPeerT
    • ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider >
  • ScrollViewerIRefreshInfoProviderAdapterT
    • ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing >
  • ScrollViewT
    • ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT >
  • SelectionModelChildrenRequestedEventArgsT
    • ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing >
  • SelectionModelT
    • ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing >
  • SelectorBarT
    • ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT >
  • SelectTemplateEventArgsT
    • ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing >
  • SliderInteractionT
    • ReferenceTracker< SliderInteraction, winrt::implementation::SliderInteractionT >
  • SnapPointBaseT
    • ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing >
  • SpectrumBrushT
    • ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable >
  • SplitButtonAutomationPeerT
    • ReferenceTracker< SplitButtonAutomationPeer, winrt::implementation::SplitButtonAutomationPeerT >
  • SplitButtonT
    • ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT >
  • StackLayoutStateT
    • ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing >
  • StackLayoutT
    • ReferenceTracker< StackLayout, winrt::implementation::StackLayoutT, VirtualizingLayout >
  • SwipeControlT
    • ReferenceTracker< SwipeControl, winrt::implementation::SwipeControlT >
  • SwipeItemsT
    • ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > >
  • SwipeItemT
    • ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT >
  • TabViewAutomationPeerT
    • ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider >
  • TabViewItemAutomationPeerT
    • ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider >
  • TabViewItemT
    • ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT >
  • TabViewListViewT
    • ReferenceTracker< TabViewListView, winrt::implementation::TabViewListViewT >
  • TabViewT
    • ReferenceTracker< TabView, winrt::implementation::TabViewT >
  • TeachingTipAutomationPeerT
    • ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider >
  • TeachingTipClosingEventArgsT
    • ReferenceTracker< TeachingTipClosingEventArgs, winrt::implementation::TeachingTipClosingEventArgsT, winrt::composable, winrt::composing >
  • TeachingTipT
    • ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT >
  • TitleBarAutomationPeerT
    • ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT >
  • TitleBarT
    • ReferenceTracker< TitleBar, winrt::implementation::TitleBarT >
  • ToggleSplitButtonAutomationPeerT
    • ReferenceTracker< ToggleSplitButtonAutomationPeer, winrt::implementation::ToggleSplitButtonAutomationPeerT >
  • TreeViewCollapsedEventArgsT
    • ReferenceTracker< TreeViewCollapsedEventArgs, winrt::implementation::TreeViewCollapsedEventArgsT, winrt::composing, winrt::composable >
  • TreeViewDragItemsCompletedEventArgsT
    • ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable >
  • TreeViewDragItemsStartingEventArgsT
    • ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable >
  • TreeViewExpandingEventArgsT
    • ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable >
  • TreeViewItemAutomationPeerT
    • ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider >
  • TreeViewItemDataAutomationPeerT
    • ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT >
  • TreeViewItemInvokedEventArgsT
    • ReferenceTracker< TreeViewItemInvokedEventArgs, winrt::implementation::TreeViewItemInvokedEventArgsT, winrt::composing, winrt::composable >
  • TreeViewItemT
    • ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT >
  • TreeViewListAutomationPeerT
    • ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider >
  • TreeViewListT
    • ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT >
  • TreeViewNodeT
    • ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable >
  • TreeViewSelectionChangedEventArgsT
    • ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable >
  • TreeViewT
    • ReferenceTracker< TreeView, winrt::implementation::TreeViewT >
  • TwoPaneViewT
    • ReferenceTracker< TwoPaneView, winrt::implementation::TwoPaneViewT >
  • UniformGridLayoutStateT
    • ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing >
  • UniformGridLayoutT
    • ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout >
  • WebView2AutomationPeerT
    • ReferenceTracker< WebView2AutomationPeer, winrt::implementation::WebView2AutomationPeerT, IAutomationPeerHwndInterop >
  • XamlAmbientLightT
    • ReferenceTracker< XamlAmbientLight, winrt::implementation::XamlAmbientLightT >
  • XamlControlsResourcesT
    • ReferenceTracker< XamlControlsResources, winrt::implementation::XamlControlsResourcesT, winrt::composable >
  • WorkInfo
  • XamlAmbientLightProperties
    • XamlAmbientLight
  • XamlCompBrush
  • XamlControlsResourcesProperties
    • XamlControlsResources
  • XamlMember
  • XamlMetadataProvider
  • XamlRootChanged_revoker
  • XamlTypeBase
    • EnumXamlType
    • NullableXamlType
    • PrimitiveXamlType
    • XamlType
  • ZoomSnapPoint
  • ZoomSnapPointBase
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- [ -

  • [instance initializer]()
: ColorPickerTests::ColorPickerTestSetupHelper
, TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
, CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Namespace Index

  • Namespace List
  • Namespace Members

Namespace List

Here is a list of all namespaces with brief descriptions:
abi |
ABI |
ABI::Windows |
ABI::Windows::ApplicationModel |
ABI::Windows::ApplicationModel::Core |
AnimatedVisualPlayerTests |
AnimatedVisuals |
anonymous_namespace{Layout.cpp} |
anonymous_namespace{ProgressRingDeterminate.cpp} |
anonymous_namespace{ProgressRingIndeterminate.cpp} |
anonymous_namespace{SharedHelpers.cpp} |
anonymous_namespace{XamlMetadataProviderGenerated.h} | WARNING: Generated File: Please do not modify manually ///
Breadcrumb_TestUI |
CollectionHelper |
CommandingHelpers |
Common |
details |
flags_enum |
Flick |
hsv |
LayoutUtils |
Microsoft |
Microsoft::UI |
Microsoft::UI::Private |
Microsoft::UI::Private::Composition |
Microsoft::UI::Private::Composition::Effects |
Microsoft::UI::Xaml |
Microsoft::UI::Xaml::Design |
Microsoft::UI::Xaml::Tests |
Microsoft::UI::Xaml::Tests::MUXControls |
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests |
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests |
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common |
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks |
Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests |
Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests |
MU_PRIVATE_CONTROLS_NAMESPACE |
MU_PRIVATE_MEDIA_NAMESPACE |
MU_XAP_NAMESPACE |
MU_XC_NAMESPACE |
MU_XCAV_NAMESPACE |
MU_XCP_NAMESPACE |
MU_XM_NAMESPACE |
MUXControls |
MUXControls::ApiTests |
MUXControls::ApiTests::RepeaterTests |
MUXControls::ApiTests::RepeaterTests::Common |
MUXControls::Common |
MUXControlsTestApp |
MUXControlsTestApp::Samples |
MUXControlsTestApp::Samples::Model |
MUXControlsTestApp::Samples::Selection |
MUXControlsTestApp::Utilities |
MUXControlsTestApp::Utils |
Private |
PTR_TestUI |
RadioButtons_TestUI |
RefreshVizualizer_TestUI |
RuntimeProfiler |
StringUtil |
SwipeControl_TestUI |
TypeLogging |
Util |
WebView2Temporary |
WebView2Utility |
winrt |
winrt::factory_implementation |
winrt::implementation |
winrt::Microsoft |
winrt::Microsoft::Experimental |
winrt::Microsoft::Experimental::UI |
winrt::Microsoft::Experimental::UI::Xaml |
winrt::Microsoft::Experimental::UI::Xaml::Automation |
winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers |
winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::factory_implementation |
winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::implementation |
winrt::Microsoft::Experimental::UI::Xaml::Controls |
winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals |
winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::factory_implementation |
winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::implementation |
winrt::Microsoft::Experimental::UI::Xaml::Controls::factory_implementation |
winrt::Microsoft::Experimental::UI::Xaml::Controls::implementation |
winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives |
winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::factory_implementation |
winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::implementation |
winrt::Microsoft::Experimental::UI::Xaml::Media |
winrt::Microsoft::Experimental::UI::Xaml::Media::factory_implementation |
winrt::Microsoft::Experimental::UI::Xaml::Media::implementation |
winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo |
winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::factory_implementation |
winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::implementation |
winrt::Microsoft::UI |
winrt::Microsoft::UI::Private |
winrt::Microsoft::UI::Private::Controls |
winrt::Microsoft::UI::Private::Controls::factory_implementation |
winrt::Microsoft::UI::Private::Controls::implementation |
winrt::Microsoft::UI::Private::Media |
winrt::Microsoft::UI::Private::Media::factory_implementation |
winrt::Microsoft::UI::Private::Media::implementation |
winrt::Microsoft::UI::Xaml |
winrt::Microsoft::UI::Xaml::Automation |
winrt::Microsoft::UI::Xaml::Automation::Peers |
winrt::Microsoft::UI::Xaml::Automation::Peers::factory_implementation |
winrt::Microsoft::UI::Xaml::Automation::Peers::implementation |
winrt::Microsoft::UI::Xaml::Controls |
winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals |
winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::factory_implementation |
winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::implementation |
winrt::Microsoft::UI::Xaml::Controls::factory_implementation |
winrt::Microsoft::UI::Xaml::Controls::implementation |
winrt::Microsoft::UI::Xaml::Controls::Primitives |
winrt::Microsoft::UI::Xaml::Controls::Primitives::factory_implementation |
winrt::Microsoft::UI::Xaml::Controls::Primitives::implementation |
winrt::Microsoft::UI::Xaml::Media |
winrt::Microsoft::UI::Xaml::Media::factory_implementation |
winrt::Microsoft::UI::Xaml::Media::implementation |
winrt::Microsoft::UI::Xaml::XamlTypeInfo |
winrt::Microsoft::UI::Xaml::XamlTypeInfo::factory_implementation |
winrt::Microsoft::UI::Xaml::XamlTypeInfo::implementation |
winrt::Windows |
winrt::Windows::UI |
winrt::Windows::UI::ViewManagement |
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: abi Namespace Reference

  • Namespace List
  • Namespace Members

abi Namespace Reference

Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ABI Namespace Reference

  • Namespace List
  • Namespace Members
Namespaces

ABI Namespace Reference

Namespaces

namespace Windows
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ABI::Windows Namespace Reference

  • Namespace List
  • Namespace Members
  • ABI
  • Windows
Namespaces

ABI::Windows Namespace Reference

Namespaces

namespace ApplicationModel
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ABI::Windows::ApplicationModel Namespace Reference

  • Namespace List
  • Namespace Members
  • ABI
  • Windows
  • ApplicationModel
Namespaces

ABI::Windows::ApplicationModel Namespace Reference

Namespaces

namespace Core
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ABI::Windows::ApplicationModel::Core Namespace Reference

  • Namespace List
  • Namespace Members
  • ABI
  • Windows
  • ApplicationModel
  • Core
Functions | Variables

ABI::Windows::ApplicationModel::Core Namespace Reference

Functions

virtual HRESULT STDMETHODCALLTYPE | add_Resuming (void *handler, EventRegistrationToken *token)=0
virtual HRESULT STDMETHODCALLTYPE | add_Suspending (void *handler, EventRegistrationToken *token)=0
virtual HRESULT STDMETHODCALLTYPE | get_Properties (void **value)=0
virtual HRESULT STDMETHODCALLTYPE | GetCurrentView (void **value)=0
virtual HRESULT STDMETHODCALLTYPE | remove_Resuming (EventRegistrationToken token)=0
virtual HRESULT STDMETHODCALLTYPE | remove_Suspending (EventRegistrationToken token)=0
virtual HRESULT STDMETHODCALLTYPE | Run (void *viewSource)=0
virtual HRESULT STDMETHODCALLTYPE | RunWithActivationFactories (void *activationFactoryCallback)=0

Variables

ICoreApplication | __pad0__

Function Documentation

virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::add_Resuming | ( | void * | handler,
 |  | EventRegistrationToken * | token |
 | ) |  |  | [pure virtual]
virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::add_Suspending | ( | void * | handler,
 |  | EventRegistrationToken * | token |
 | ) |  |  | [pure virtual]
virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::get_Properties ( void ** value ) [pure virtual]
virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::GetCurrentView ( void ** value ) [pure virtual]
virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::remove_Resuming ( EventRegistrationToken token ) [pure virtual]
virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::remove_Suspending ( EventRegistrationToken token ) [pure virtual]
virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::Run ( void * viewSource ) [pure virtual]
virtual HRESULT STDMETHODCALLTYPE ABI::Windows::ApplicationModel::Core::RunWithActivationFactories ( void * activationFactoryCallback ) [pure virtual]

Variable Documentation

ICoreApplication __pad0__

Definition at line 673 of file SharedHelpers.cpp.

Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayerTests Namespace Reference

  • Namespace List
  • Namespace Members
Classes

AnimatedVisualPlayerTests Namespace Reference

Classes

class Constants
Share these constants between the UI and the Interaction test that uses Accessibility to access them.
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisuals Namespace Reference

  • Namespace List
  • Namespace Members
Classes

AnimatedVisuals Namespace Reference

Classes

class | BrightnessSun
class | LottieLogo
class | Nullsource
class | ProgressRingDeterminate
class | ProgressRingIndeterminate
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: anonymous_namespace{Layout.cpp} Namespace Reference

  • Namespace List
  • Namespace Members
Functions

anonymous_namespace{Layout.cpp} Namespace Reference

Functions

winrt::NonVirtualizingLayoutContext | GetNonVirtualizingLayoutContext (winrt::LayoutContext const &context)
winrt::VirtualizingLayoutContext | GetVirtualizingLayoutContext (winrt::LayoutContext const &context)

Function Documentation

winrt::NonVirtualizingLayoutContext anonymous_namespace{Layout.cpp}::GetNonVirtualizingLayoutContext ( winrt::LayoutContext const & context )

Definition at line 65 of file Layout.cpp.

    {
        if (auto nonVirtualizingContext = context.try_as<winrt::NonVirtualizingLayoutContext>())
        {
            return nonVirtualizingContext;
        }
        else if (auto virtualizingContext = context.try_as<winrt::VirtualizingLayoutContext>())
        {
            auto adapter = winrt::get_self<VirtualizingLayoutContext>(virtualizingContext)->GetNonVirtualizingContextAdapter();
            return adapter;
        }
        else
        {
            throw winrt::hresult_not_implemented();
        }
    }

winrt::VirtualizingLayoutContext anonymous_namespace{Layout.cpp}::GetVirtualizingLayoutContext ( winrt::LayoutContext const & context )

Definition at line 48 of file Layout.cpp.

    {
        if (auto virtualizingContext = context.try_as<winrt::VirtualizingLayoutContext>())
        {
            return virtualizingContext;
        }
        else if (auto nonVirtualizingContext = context.try_as<winrt::NonVirtualizingLayoutContext>())
        {
            auto adapter = winrt::get_self<NonVirtualizingLayoutContext>(nonVirtualizingContext)->GetVirtualizingContextAdapter();
            return adapter;
        }
        else
        {
            throw winrt::hresult_not_implemented();
        }
    }

Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: anonymous_namespace{ProgressRingDeterminate.cpp} Namespace Reference

  • Namespace List
  • Namespace Members
Classes

anonymous_namespace{ProgressRingDeterminate.cpp} Namespace Reference

Classes

class AnimatedVisual
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: anonymous_namespace{ProgressRingIndeterminate.cpp} Namespace Reference

  • Namespace List
  • Namespace Members
Classes

anonymous_namespace{ProgressRingIndeterminate.cpp} Namespace Reference

Classes

class AnimatedVisual
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: anonymous_namespace{SharedHelpers.cpp} Namespace Reference

  • Namespace List
  • Namespace Members
Functions | Variables

anonymous_namespace{SharedHelpers.cpp} Namespace Reference

Functions

bool | IsInFrameworkPackageImpl (winrt::hstring &frameworkInstallLocation)
bool | TryGetCurrentPackageGraph (const std::uint32_t flags, std::uint32_t &packageCount, const PACKAGE_INFO *&packageGraph, std::unique_ptr< BYTE[]> &buffer)

Variables

constexpr wchar_t | c_reunionPackageNamePrefix [] = "Microsoft.WindowsAppRuntime"
constexpr int | c_reunionPackageNamePrefixLength = ARRAYSIZE(c_reunionPackageNamePrefix) - 1

Function Documentation

bool anonymous_namespace{SharedHelpers.cpp}::IsInFrameworkPackageImpl ( winrt::hstring & frameworkInstallLocation )

Definition at line 108 of file SharedHelpers.cpp.

    {
        // We could be running in an app that is using WinUI "In-App" (i.e. the WinUI dlls are deployed as part of the app).
        // Or we could be running in the Project Reunion Framework Package that an app takes a dependency on.
        // We determine if we are in a Framework Package by looking at the App's package dependencies. If the app has a Project Reunion dependency
        // then we must be running in a Framework Package.
        const UINT32 c_filter{ PACKAGE_FILTER_HEAD | PACKAGE_FILTER_DIRECT | PACKAGE_FILTER_STATIC | PACKAGE_FILTER_DYNAMIC | PACKAGE_INFORMATION_BASIC };
        std::uint32_t packageCount{};
        const PACKAGE_INFO* packageGraph{};
        std::unique_ptr<BYTE[]> packageBuffer;
        if (TryGetCurrentPackageGraph(c_filter, packageCount, packageGraph, packageBuffer))
        {
            if (packageGraph)
            {
                for (std::uint32_t index=0; index < packageCount; index++)
                {
                    const PACKAGE_INFO& packageInfo{ packageGraph[index] };

                    // We use FamilyName here and not DisplayName because DisplayName is a localized string, but FamilyName is a stable identifier.
                    auto packageFamilyName = packageInfo.packageFamilyName;
                    int nameLength{ static_cast<int>(wcslen(packageFamilyName)) };

                    if (nameLength < c_reunionPackageNamePrefixLength)
                    {
                        continue;
                    }

                    if (
                       CompareStringOrdinal(
                        packageFamilyName,
                        c_reunionPackageNamePrefixLength,
                        c_reunionPackageNamePrefix,
                        c_reunionPackageNamePrefixLength,
                        TRUE) == CSTR_EQUAL)
                    {
                        frameworkInstallLocation = winrt::hstring(packageInfo.path);
                        return true;
                    }
                }
            }
        }
        return false;
    }

bool anonymous_namespace{SharedHelpers.cpp}::TryGetCurrentPackageGraph | ( | const std::uint32_t | flags,
 |  | std::uint32_t & | packageCount,
 |  | const PACKAGE_INFO *& | packageGraph,
 |  | std::unique_ptr< BYTE[]> & | buffer
 | ) |  |

Definition at line 77 of file SharedHelpers.cpp.

    {
        std::uint32_t bufferLength{};
        LONG rc{ ::GetCurrentPackageInfo(flags, &bufferLength, nullptr, nullptr) };
        if ((rc == APPMODEL_ERROR_NO_PACKAGE) || (rc == ERROR_SUCCESS))
        {
            // No/empty package graph
            return false;
        }
        else if (rc != ERROR_INSUFFICIENT_BUFFER)
        {
            if (FAILED(HRESULT_FROM_WIN32(rc)))
            {
                return false;
            }
        }

        buffer = std::make_unique<BYTE[]>(bufferLength);
        if (SUCCEEDED(HRESULT_FROM_WIN32(::GetCurrentPackageInfo(flags, &bufferLength, buffer.get(), &packageCount))))
        {
            packageGraph = reinterpret_cast<PACKAGE_INFO*>(buffer.get());
            return true;
        }

        return false;
    }

Variable Documentation

constexpr wchar_t c_reunionPackageNamePrefix[] = "Microsoft.WindowsAppRuntime"

Definition at line 72 of file SharedHelpers.cpp.

constexpr int c_reunionPackageNamePrefixLength = ARRAYSIZE(c_reunionPackageNamePrefix) - 1

Definition at line 73 of file SharedHelpers.cpp.

Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: anonymous_namespace{XamlMetadataProviderGenerated.h} Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions | Variables

anonymous_namespace{XamlMetadataProviderGenerated.h} Namespace Reference

WARNING: Generated File: Please do not modify manually ///.

Classes

struct | Entry

Functions

winrt::IInspectable | ActivateInstance (_In_ PCWSTR typeName)
template<typename Factory >
winrt::IInspectable | ActivateInstanceWithFactory (_In_ PCWSTR typeName)
void | ClearTypeProperties ()
template<typename Factory >
Factory | GetFactory (_In_ PCWSTR typeName)

Variables

hstring | c_knownNamespacePrefixes []
Entry c_typeEntries []

Function Documentation

winrt::IInspectable anonymous_namespace{XamlMetadataProviderGenerated.h}::ActivateInstance ( _In_ PCWSTR typeName )

Definition at line 37 of file XamlMetadataProviderGenerated.h.

{
    winrt::IActivationFactory _activationFactory{ nullptr };
    winrt::hstring activatableClassId{ typeName };
    winrt::check_hresult(WINRT_GetActivationFactory(winrt::get_abi(activatableClassId), winrt::put_abi(_activationFactory)));

    return _activationFactory.ActivateInstance<winrt::IInspectable>();
}

winrt::IInspectable anonymous_namespace{XamlMetadataProviderGenerated.h}::ActivateInstanceWithFactory ( _In_ PCWSTR typeName )

Definition at line 14 of file XamlMetadataProviderGenerated.h.

{
    auto factory = GetFactory<Factory>(typeName);
    winrt::IInspectable inner;
    return factory.as<Factory>().CreateInstance(nullptr, inner);
}

void anonymous_namespace{XamlMetadataProviderGenerated.h}::ClearTypeProperties ( )

Definition at line 7973 of file XamlMetadataProviderGenerated.h.

{
    AcrylicBrushProperties::ClearProperties();
    AnimatedIconProperties::ClearProperties();
    AnimatedIconSourceProperties::ClearProperties();
    AnimatedVisualPlayerProperties::ClearProperties();
    AnnotatedScrollBarProperties::ClearProperties();
    AutoSuggestBoxHelperProperties::ClearProperties();
    BreadcrumbBarProperties::ClearProperties();
    ColorPickerProperties::ClearProperties();
    ColorPickerSliderProperties::ClearProperties();
    ColorSpectrumProperties::ClearProperties();
    ColumnMajorUniformToLargestGridLayoutProperties::ClearProperties();
    ComboBoxHelperProperties::ClearProperties();
    CommandBarFlyoutCommandBarProperties::ClearProperties();
    CommandBarFlyoutCommandBarAutomationPropertiesProperties::ClearProperties();
    CommandBarFlyoutCommandBarTemplateSettingsProperties::ClearProperties();
    CornerRadiusFilterConverterProperties::ClearProperties();
    CornerRadiusToThicknessConverterProperties::ClearProperties();
    ExpanderProperties::ClearProperties();
    FlowLayoutProperties::ClearProperties();
    ImageIconProperties::ClearProperties();
    ImageIconSourceProperties::ClearProperties();
    InfoBadgeProperties::ClearProperties();
    InfoBadgeTemplateSettingsProperties::ClearProperties();
    InfoBarProperties::ClearProperties();
    InfoBarPanelProperties::ClearProperties();
    InfoBarTemplateSettingsProperties::ClearProperties();
    InkCanvasProperties::ClearProperties();
    ItemContainerProperties::ClearProperties();
    ItemsRepeaterProperties::ClearProperties();
    ItemsViewProperties::ClearProperties();
    LayoutPanelProperties::ClearProperties();
    LinedFlowLayoutProperties::ClearProperties();
    MapControlProperties::ClearProperties();
    MapElementsLayerProperties::ClearProperties();
    MapIconProperties::ClearProperties();
    MenuBarProperties::ClearProperties();
    MenuBarItemProperties::ClearProperties();
    MicaBackdropProperties::ClearProperties();
    MonochromaticOverlayPresenterProperties::ClearProperties();
    NavigationViewProperties::ClearProperties();
    NavigationViewItemProperties::ClearProperties();
    NavigationViewItemBaseProperties::ClearProperties();
    NavigationViewItemPresenterProperties::ClearProperties();
    NavigationViewItemPresenterTemplateSettingsProperties::ClearProperties();
    NavigationViewTemplateSettingsProperties::ClearProperties();
    NumberBoxProperties::ClearProperties();
    PagerControlProperties::ClearProperties();
    ParallaxViewProperties::ClearProperties();
    PersonPictureProperties::ClearProperties();
    PipsPagerProperties::ClearProperties();
    ProgressBarProperties::ClearProperties();
    ProgressBarTemplateSettingsProperties::ClearProperties();
    ProgressRingProperties::ClearProperties();
    RadialGradientBrushProperties::ClearProperties();
    RadioButtonsProperties::ClearProperties();
    RadioMenuFlyoutItemProperties::ClearProperties();
    RatingControlProperties::ClearProperties();
    RatingItemFontInfoProperties::ClearProperties();
    RatingItemImageInfoProperties::ClearProperties();
    RecyclePoolProperties::ClearProperties();
    RefreshContainerProperties::ClearProperties();
    RefreshVisualizerProperties::ClearProperties();
    RevealBrushProperties::ClearProperties();
    ScrollPresenterProperties::ClearProperties();
    ScrollViewProperties::ClearProperties();
    SelectorBarProperties::ClearProperties();
    SelectorBarItemProperties::ClearProperties();
    SplitButtonProperties::ClearProperties();
    StackLayoutProperties::ClearProperties();
    SwipeControlProperties::ClearProperties();
    SwipeItemProperties::ClearProperties();
    SwipeItemsProperties::ClearProperties();
    TabViewProperties::ClearProperties();
    TabViewItemProperties::ClearProperties();
    TabViewItemTemplateSettingsProperties::ClearProperties();
    TeachingTipProperties::ClearProperties();
    TeachingTipTemplateSettingsProperties::ClearProperties();
    TitleBarProperties::ClearProperties();
    TitleBarTemplateSettingsProperties::ClearProperties();
    ToggleSplitButtonProperties::ClearProperties();
    TreeViewProperties::ClearProperties();
    TreeViewItemProperties::ClearProperties();
    TreeViewItemTemplateSettingsProperties::ClearProperties();
    TreeViewNodeProperties::ClearProperties();
    TwoPaneViewProperties::ClearProperties();
    UniformGridLayoutProperties::ClearProperties();
    WebView2Properties::ClearProperties();
    XamlControlsResourcesProperties::ClearProperties();
    AutoSuggestBoxHelper::ClearProperties();
    ComboBoxHelper::ClearProperties();
    RecyclePool::ClearProperties();
    RevealBrush::ClearProperties();
}

Factory anonymous_namespace{XamlMetadataProviderGenerated.h}::GetFactory ( _In_ PCWSTR typeName )

Definition at line 22 of file XamlMetadataProviderGenerated.h.

{
    winrt::IActivationFactory _activationFactory{ nullptr };
    winrt::hstring activatableClassId{ typeName };

    if (FAILED(WINRT_GetActivationFactory(winrt::get_abi(activatableClassId), winrt::put_abi(_activationFactory))))
    {
        return nullptr;
    }
    else
    {
        return _activationFactory.as<Factory>();
    }
}

Variable Documentation

hstring c_knownNamespacePrefixes[]
Initial value:
{
    L"Microsoft.UI.Composition.",
    L"Microsoft.UI.Xaml.",
    L"Microsoft.Web.WebView2.",
    L"Windows.ApplicationModel.Contacts.",
    L"Windows.Devices.Geolocation.",
    L"Windows.Foundation.",
    L"Windows.Foundation.Collections.",
    L"Windows.Foundation.Numerics.",
    L"Windows.Globalization.NumberFormatting.",
    L"Windows.UI.",
}

Definition at line 7863 of file XamlMetadataProviderGenerated.h.

Entry c_typeEntries[]

Definition at line 53 of file XamlMetadataProviderGenerated.h.

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb_TestUI Namespace Reference

  • Namespace List
  • Namespace Members
Classes

Breadcrumb_TestUI Namespace Reference

Classes

class | TreeNode
class | TreeStructure
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CollectionHelper Namespace Reference

  • Namespace List
  • Namespace Members
Functions

CollectionHelper Namespace Reference

Functions

template<class C , class T >
bool | contains (const C &c, const T &v)
template<class C , class T >
void | remove (C &c, const T &v)
template<class C , class T >
void | unique_push_back (C &c, T &v)

Function Documentation

bool CollectionHelper::contains | ( | const C & | c,
 |  | const T & | v |
 | ) |  |  | [inline]

Definition at line 9 of file CollectionHelper.h.

    {
        return end(c) != std::find(begin(c), end(c), v);
    }

void CollectionHelper::remove | ( | C & | c,
 |  | const T & | v |
 | ) |  |  | [inline]

Definition at line 15 of file CollectionHelper.h.

    {
        c.erase(std::remove(begin(c), end(c), v), end(c));
    }

void CollectionHelper::unique_push_back | ( | C & | c,
 |  | T & | v |
 | ) |  |  | [inline]

Definition at line 21 of file CollectionHelper.h.

    {
        if (end(c) == std::find(begin(c), end(c), v))
        {
            c.push_back(v);
        }
    }

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandingHelpers Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions

CommandingHelpers Namespace Reference

Classes

class | IconSourceToIconSourceElementConverter

Functions

void | BindToAccessKeyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::UIElement const &target)
void | BindToDescriptionPropertiesIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target)
void | BindToIconPropertyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target, winrt::DependencyProperty const &iconProperty)
void | BindToIconSourcePropertyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target, winrt::DependencyProperty const &iconSourceProperty)
void | BindToKeyboardAcceleratorsIfUnset (winrt::XamlUICommand const &uiCommand, winrt::UIElement const &target)
void | BindToLabelPropertyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target, winrt::DependencyProperty const &labelProperty)
void | ClearBindingIfSet (winrt::XamlUICommand const &uiCommand, winrt::FrameworkElement const &target, winrt::DependencyProperty const &targetProperty)

Function Documentation

void BindToAccessKeyIfUnset | ( | winrt::XamlUICommand const & | uiCommand,
 |  | winrt::UIElement const & | target
 | ) |  |

Definition at line 97 of file CommandingHelpers.cpp.

{
    if (target.AccessKey().empty())
    {
        SharedHelpers::SetBinding(uiCommand, L"AccessKey", target, winrt::UIElement::AccessKeyProperty());
    }
}

void BindToDescriptionPropertiesIfUnset | ( | winrt::XamlUICommand const & | uiCommand,
 |  | winrt::DependencyObject const & | target
 | ) |  |

Definition at line 107 of file CommandingHelpers.cpp.

{
    if (winrt::AutomationProperties::GetHelpText(target).empty())
    {
        SharedHelpers::SetBinding(uiCommand, L"Description", target, winrt::AutomationProperties::HelpTextProperty());
    }

    winrt::IInspectable localToolTipAsI = winrt::ToolTipService::GetToolTip(target);
    auto localToolTipAsString = localToolTipAsI.try_as<winrt::IReference<winrt::hstring>>();

    if ((!localToolTipAsString || localToolTipAsString.Value().empty()) && !localToolTipAsI.try_as<winrt::ToolTip>())
    {
        SharedHelpers::SetBinding(uiCommand, L"Description", target, winrt::ToolTipService::ToolTipProperty());
    }
}

void BindToIconPropertyIfUnset | ( | winrt::XamlUICommand const & | uiCommand,
 |  | winrt::DependencyObject const & | target,
 |  | winrt::DependencyProperty const & | iconProperty
 | ) |  |

Definition at line 48 of file CommandingHelpers.cpp.

{
    if (!target.ReadLocalValue(iconProperty).try_as<winrt::IconElement>())
    {
        SharedHelpers::SetBinding(uiCommand, L"Icon", target, iconProperty, winrt::make<IconSourceToIconSourceElementConverter>());
    }
}

void BindToIconSourcePropertyIfUnset | ( | winrt::XamlUICommand const & | uiCommand,
 |  | winrt::DependencyObject const & | target,
 |  | winrt::DependencyProperty const & | iconSourceProperty
 | ) |  |

Definition at line 35 of file CommandingHelpers.cpp.

{
    winrt::IconSource localIconSource = target.ReadLocalValue(iconSourceProperty).try_as<winrt::IconSource>();

    if (!localIconSource)
    {
        SharedHelpers::SetBinding(uiCommand, L"IconSource", target, iconSourceProperty);
    }
}

void BindToKeyboardAcceleratorsIfUnset | ( | winrt::XamlUICommand const & | uiCommand,
 |  | winrt::UIElement const & | target
 | ) |  |

Definition at line 74 of file CommandingHelpers.cpp.

{
    if (target.KeyboardAccelerators().Size() == 0)
    {
        // Keyboard accelerators can't have two parents, so we'll need to copy them
        // and bind to the original properties instead of assigning them.
        // We set up bindings so that modifications to the app-defined accelerators
        // will propagate to the accelerators that are used by the framework.
        for (winrt::KeyboardAccelerator keyboardAccelerator : uiCommand.KeyboardAccelerators())
        {
            winrt::KeyboardAccelerator keyboardAcceleratorCopy;

            SharedHelpers::SetBinding(keyboardAccelerator, L"IsEnabled", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::IsEnabledProperty());
            SharedHelpers::SetBinding(keyboardAccelerator, L"Key", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::KeyProperty());
            SharedHelpers::SetBinding(keyboardAccelerator, L"Modifiers", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::ModifiersProperty());
            SharedHelpers::SetBinding(keyboardAccelerator, L"ScopeOwner", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::ScopeOwnerProperty());
            target.KeyboardAccelerators().Append(keyboardAcceleratorCopy);
        }
    }
}

void BindToLabelPropertyIfUnset | ( | winrt::XamlUICommand const & | uiCommand,
 |  | winrt::DependencyObject const & | target,
 |  | winrt::DependencyProperty const & | labelProperty
 | ) |  |

Definition at line 59 of file CommandingHelpers.cpp.

{
    auto labelReference = target.ReadLocalValue(labelProperty).try_as<winrt::IReference<winrt::hstring>>();

    if (!labelReference || labelReference.Value().empty())
    {
        SharedHelpers::SetBinding(uiCommand, L"Label", target, labelProperty);
    }
}

void ClearBindingIfSet | ( | winrt::XamlUICommand const & | uiCommand,
 |  | winrt::FrameworkElement const & | target,
 |  | winrt::DependencyProperty const & | targetProperty
 | ) |  |

Definition at line 125 of file CommandingHelpers.cpp.

{
    if (auto bindingExpression = target.GetBindingExpression(targetProperty))
    {
        if (auto parentBinding = bindingExpression.ParentBinding())
        {
            if (auto source = parentBinding.Source())
            {
                if (source == uiCommand)
                {
                    target.ClearValue(targetProperty);
                }
            }
        }
    }
}

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Enumerations

Common Namespace Reference

Classes

class | PlatformConfiguration

Enumerations

enum | DeviceType { Desktop, Phone, OneCore }
enum OSVersion {
Threshold2 = 2, Redstone1 = 3, Redstone2 = 4, Redstone3 = 5,
Redstone4 = 6, Redstone5 = 7, NineteenH1 = 8, TwentyOneH1 = 14
}

Enumeration Type Documentation

enum DeviceType
Enumerator:
Desktop
Phone
OneCore

Definition at line 14 of file PlatformConfiguration.cs.

    {
        Desktop,
        Phone,
        OneCore
    }

enum OSVersion
Enumerator:
Threshold2
Redstone1
Redstone2
Redstone3
Redstone4
Redstone5
NineteenH1
TwentyOneH1

Definition at line 21 of file PlatformConfiguration.cs.

                          : ushort
    {
        Threshold2 = 2,
        Redstone1 = 3,
        Redstone2 = 4,
        Redstone3 = 5,
        Redstone4 = 6,
        Redstone5 = 7,
        NineteenH1 = 8,
        TwentyOneH1 = 14
    }

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: details Namespace Reference

  • Namespace List
  • Namespace Members
Classes

details Namespace Reference

Classes

struct CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: flags_enum Namespace Reference

  • Namespace List
  • Namespace Members
Functions

flags_enum Namespace Reference

Functions

template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr bool | are_all_set (T lhs, T value) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr bool | is_set (T lhs, T value) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | set (T lhs, T value) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr
std::underlying_type_t< T > 		underlying_type (T lhs) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | unset (T lhs, T value) noexcept

Function Documentation

constexpr bool flags_enum::are_all_set | ( | T | lhs,
 |  | T | value
 | ) |  |

Definition at line 70 of file Flags_Enum.h.

    {
        return (lhs & value) == value;
    }

constexpr bool flags_enum::is_set | ( | T | lhs,
 |  | T | value
 | ) |  |

Definition at line 62 of file Flags_Enum.h.

    {
        using type = std::underlying_type_t<T>;
        return static_cast<type>(lhs & value) != static_cast<type>(0);
    }

constexpr T flags_enum::set | ( | T | lhs,
 |  | T | value
 | ) |  |

Definition at line 76 of file Flags_Enum.h.

    {
        return lhs | value;
    }

constexpr std::underlying_type_t<T> flags_enum::underlying_type ( T lhs )

Definition at line 88 of file Flags_Enum.h.

    {
        return static_cast<std::underlying_type_t<T>>(lhs);
    }

constexpr T flags_enum::unset | ( | T | lhs,
 |  | T | value
 | ) |  |

Definition at line 82 of file Flags_Enum.h.

    {
        return lhs & (~value);
    }

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Flick Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Enumerations

Flick Namespace Reference

Classes

class | Flex
class | UniformGrid2DLayout
class | VirtualizingUniformCarouselStackLayout

Enumerations

enum AlignContent {
FlexStart, FlexEnd, Center, Stretch,
SpaceBetween, SpaceAround
}
enum AlignItems {
Auto, FlexStart, FlexEnd, Center,
Stretch
}
enum | FlexDirection { Row, RowReverse, Column, ColumnReverse }
enum | FlexWrap { NoWrap, Wrap }
enum JustifyContent {
FlexStart, FlexEnd, Center, SpaceBetween,
SpaceAround, SpaceEvenly
}

Enumeration Type Documentation

enum AlignContent
Enumerator:
FlexStart
FlexEnd
Center
Stretch
SpaceBetween
SpaceAround

Definition at line 547 of file Flex.cs.

    {
        FlexStart,
        FlexEnd,
        Center,
        Stretch,
        SpaceBetween,
        SpaceAround
    }

enum AlignItems
Enumerator:
Auto
FlexStart
FlexEnd
Center
Stretch

Definition at line 537 of file Flex.cs.

    {
        Auto,
        FlexStart,
        FlexEnd,
        Center,
        Stretch,
        // Baseline
    };

enum FlexDirection
Enumerator:
Row
RowReverse
Column
ColumnReverse

Definition at line 512 of file Flex.cs.

    {
        Row,
        RowReverse,
        Column,
        ColumnReverse
    };

enum FlexWrap
Enumerator:
NoWrap
Wrap

Definition at line 520 of file Flex.cs.

    {
        NoWrap,
        Wrap,
        // WrapReverse
    };

enum JustifyContent
Enumerator:
FlexStart
FlexEnd
Center
SpaceBetween
SpaceAround
SpaceEvenly

Definition at line 527 of file Flex.cs.

    {
        FlexStart,
        FlexEnd,
        Center,
        SpaceBetween,
        SpaceAround,
        SpaceEvenly
    };

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: hsv Namespace Reference

  • Namespace List
  • Namespace Members
Functions

hsv Namespace Reference

Functions

float | GetAlpha (const winrt::float4 &hsva)
float | GetHue (const winrt::float4 &hsva)
float | GetSaturation (const winrt::float4 &hsva)
float | GetValue (const winrt::float4 &hsva)
void | SetAlpha (winrt::float4 &hsva, float alpha)
void | SetHue (winrt::float4 &hsva, float hue)
void | SetSaturation (winrt::float4 &hsva, float saturation)
void | SetValue (winrt::float4 &hsva, float value)

Function Documentation

float hsv::GetAlpha ( const winrt::float4 & hsva ) [inline]

Definition at line 54 of file ColorConversion.h.

{ return hsva.w; }

float hsv::GetHue ( const winrt::float4 & hsva ) [inline]

Definition at line 48 of file ColorConversion.h.

{ return hsva.x; }

float hsv::GetSaturation ( const winrt::float4 & hsva ) [inline]

Definition at line 50 of file ColorConversion.h.

{ return hsva.y; }

float hsv::GetValue ( const winrt::float4 & hsva ) [inline]

Definition at line 52 of file ColorConversion.h.

{ return hsva.z; }

void hsv::SetAlpha | ( | winrt::float4 & | hsva,
 |  | float | alpha |
 | ) |  |  | [inline]

Definition at line 55 of file ColorConversion.h.

{ hsva.w = alpha; }

void hsv::SetHue | ( | winrt::float4 & | hsva,
 |  | float | hue |
 | ) |  |  | [inline]

Definition at line 49 of file ColorConversion.h.

{ hsva.x = hue; }

void hsv::SetSaturation | ( | winrt::float4 & | hsva,
 |  | float | saturation |
 | ) |  |  | [inline]

Definition at line 51 of file ColorConversion.h.

{ hsva.y = saturation; }

void hsv::SetValue | ( | winrt::float4 & | hsva,
 |  | float | value |
 | ) |  |  | [inline]

Definition at line 53 of file ColorConversion.h.

{ hsva.z = value; }

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutUtils Namespace Reference

  • Namespace List
  • Namespace Members
Functions

LayoutUtils Namespace Reference

Functions

template<class UIElementType >
double | GetActualWidthFor (UIElementType element)
template<class UIElementType >
float | MeasureAndGetDesiredHeightFor (UIElementType element, winrt::Size const &availableSize)
template<class UIElementType >
float | MeasureAndGetDesiredWidthFor (UIElementType element, winrt::Size const &availableSize)

Function Documentation

double LayoutUtils::GetActualWidthFor ( UIElementType element ) [inline]

Definition at line 58 of file Utils.h.

    {
        return (element ? element.ActualWidth() : 0);
    }

float LayoutUtils::MeasureAndGetDesiredHeightFor | ( | UIElementType | element,
 |  | winrt::Size const & | availableSize |
 | ) |  |  | [inline]

Definition at line 46 of file Utils.h.

    {
        float desiredHeight = 0;
        if (element)
        {
            element.Measure(availableSize);
            desiredHeight = element.DesiredSize().Height;
        }
        return desiredHeight;
    }

float LayoutUtils::MeasureAndGetDesiredWidthFor | ( | UIElementType | element,
 |  | winrt::Size const & | availableSize |
 | ) |  |  | [inline]

Definition at line 34 of file Utils.h.

    {
        float desiredWidth = 0;
        if (element)
        {
            element.Measure(availableSize);
            desiredWidth = element.DesiredSize().Width;
        }
        return desiredWidth;
    }

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft Namespace Reference

  • Namespace List
  • Namespace Members
Namespaces

Microsoft Namespace Reference

Namespaces

namespace UI
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
Namespaces

Microsoft::UI Namespace Reference

Namespaces

namespace | Private
namespace | Xaml
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Private Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Private
Namespaces

Microsoft::UI::Private Namespace Reference

Namespaces

namespace Composition
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Private::Composition Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Private
  • Composition
Namespaces

Microsoft::UI::Private::Composition Namespace Reference

Namespaces

namespace Effects
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Private::Composition::Effects Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Private
  • Composition
  • Effects
Classes | Typedefs | Enumerations | Variables

Microsoft::UI::Private::Composition::Effects Namespace Reference

Classes

class | AlphaMaskEffect
class | ArithmeticCompositeEffect
class | BlendEffect
class | BorderEffect
class | ColorMatrixEffect
class | ColorSourceEffect
class | CompositeStepEffect
class | ContrastEffect
class | CrossFadeEffect
class | DistantDiffuseEffect
class | DistantSpecularEffect
class | EffectBase
class | ExposureEffect
class | GammaTransferEffect
class | GaussianBlurEffect
class | GrayscaleEffect
class | HueRotationEffect
interface | IAlphaMaskEffect
interface | IArithmeticCompositeEffect
interface | IBlendEffect
interface | IBorderEffect
interface | IColorMatrixEffect
interface | IColorSourceEffect
interface | ICompositeStepEffect
interface | IContrastEffect
interface | ICrossFadeEffect
interface | IDistantDiffuseEffect
interface | IDistantSpecularEffect
interface | IExposureEffect
interface | IGammaTransferEffect
interface | IGaussianBlurEffect
interface | IGrayscaleEffect
interface | IHueRotationEffect
interface | IInvertEffect
interface | ILinearTransferEffect
interface | ILuminanceToAlphaEffect
class | InvertEffect
interface | IOpacityEffect
interface | IPointDiffuseEffect
interface | IPointSpecularEffect
interface | IPosterizeEffect
interface | IPremultiplyEffect
interface | ISaturationEffect
interface | ISepiaEffect
interface | ISpotDiffuseEffect
interface | ISpotSpecularEffect
interface | ITemperatureAndTintEffect
interface | ITintEffect
interface | ITransform2DEffect
interface | IUnPremultiplyEffect
class | LinearTransferEffect
class | LuminanceToAlphaEffect
struct | Matrix5x4
class | OpacityEffect
class | PointDiffuseEffect
class | PointSpecularEffect
class | PosterizeEffect
class | PremultiplyEffect
class | SaturationEffect
class | SepiaEffect
class | SpotDiffuseEffect
class | SpotSpecularEffect
class | TemperatureAndTintEffect
class | TintEffect
class | Transform2DEffect
class | UnPremultiplyEffect

Typedefs

typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasAlphaMode 		CanvasAlphaMode
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasBlend 		CanvasBlend
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasComposite 		CanvasComposite
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasEdgeBehavior 		CanvasEdgeBehavior
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasImageInterpolation 		CanvasImageInterpolation
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::EffectBorderMode 		EffectBorderMode
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::EffectChannelSelect 		EffectChannelSelect
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::EffectOptimization 		EffectOptimization
typedef
EFFECT_STRUCT_ATTRIBUTES
struct
Microsoft::UI::Private::Composition::Effects::Matrix5x4 		Matrix5x4

Enumerations

enum | CanvasAlphaMode { Premultiplied = (int)0, Straight = (int)1, Ignore = (int)2 }
enum | CanvasBlend { SourceOver = (int)0, Copy = (int)10, Min = (int)2, Add = (int)9 }
enum CanvasComposite {
SourceOver = (int)0, DestinationOver = (int)1, SourceIn = (int)2, DestinationIn = (int)3,
SourceOut = (int)4, DestinationOut = (int)5, SourceAtop = (int)6, DestinationAtop = (int)7,
Xor = (int)8, Add = (int)9, Copy = (int)10, BoundedCopy = (int)11,
MaskInvert = (int)12
}
enum | CanvasEdgeBehavior { Clamp = (int)0, Wrap = (int)1, Mirror = (int)2 }
enum CanvasImageInterpolation {
NearestNeighbor = (int)0, Linear = (int)1, Cubic = (int)2, MultiSampleLinear = (int)3,
Anisotropic = (int)4, HighQualityCubic = (int)5
}
enum | EffectBorderMode { Soft = 0, Hard = 1 }
enum | EffectChannelSelect { Red = 0, Green = 1, Blue = 2, Alpha = 3 }
enum | EffectOptimization { Speed = 0, Balanced = 1, Quality = 2 }

Variables

runtimeclass | AlphaMaskEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ArithmeticCompositeEffect
runtimeclass | BlendEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		BorderEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ColorMatrixEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ColorSourceEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		CompositeStepEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ContrastEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		CrossFadeEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		DistantDiffuseEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		DistantSpecularEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ExposureEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		GammaTransferEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		GaussianBlurEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		GrayscaleEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		HueRotationEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		InvertEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		LinearTransferEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		LuminanceToAlphaEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		OpacityEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PointDiffuseEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PointSpecularEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PosterizeEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PremultiplyEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SaturationEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SepiaEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SpotDiffuseEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SpotSpecularEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		TemperatureAndTintEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		TintEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		Transform2DEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		UnPremultiplyEffect

Typedef Documentation

typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::CanvasAlphaMode CanvasAlphaMode
typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::CanvasBlend CanvasBlend
typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::CanvasComposite CanvasComposite
typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::CanvasEdgeBehavior CanvasEdgeBehavior
typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::CanvasImageInterpolation CanvasImageInterpolation
typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::EffectBorderMode EffectBorderMode
typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::EffectChannelSelect EffectChannelSelect
typedef EFFECT_ENUM_ATTRIBUTES enum Microsoft::UI::Private::Composition::Effects::EffectOptimization EffectOptimization
typedef EFFECT_STRUCT_ATTRIBUTES struct Microsoft::UI::Private::Composition::Effects::Matrix5x4 Matrix5x4

Enumeration Type Documentation

enum CanvasAlphaMode
Enumerator:
Premultiplied
Straight
Ignore

Definition at line 29 of file microsoft.ui.private.composition.effects.idl.

    {
        Premultiplied = (int)0,
        Straight = (int)1,
        Ignore = (int)2
    } CanvasAlphaMode;

enum CanvasBlend
Enumerator:
SourceOver
Copy
Min
Add

Definition at line 74 of file microsoft.ui.private.composition.effects.idl.

    {
        SourceOver = (int)0,
        Copy = (int)1,
        Min = (int)2,
        Add = (int)3
    } CanvasBlend;

enum CanvasComposite
Enumerator:
SourceOver
DestinationOver
SourceIn
DestinationIn
SourceOut
DestinationOut
SourceAtop
DestinationAtop
Xor
Add
Copy
BoundedCopy
MaskInvert

Definition at line 45 of file microsoft.ui.private.composition.effects.idl.

    {
        SourceOver = (int)0,
        DestinationOver = (int)1,
        SourceIn = (int)2,
        DestinationIn = (int)3,
        SourceOut = (int)4,
        DestinationOut = (int)5,
        SourceAtop = (int)6,
        DestinationAtop = (int)7,
        Xor = (int)8,
        Add = (int)9,
        Copy = (int)10,
        BoundedCopy = (int)11,
        MaskInvert = (int)12
    } CanvasComposite;

enum CanvasEdgeBehavior
Enumerator:
Clamp
Wrap
Mirror

Definition at line 37 of file microsoft.ui.private.composition.effects.idl.

    {
        Clamp = (int)0,
        Wrap = (int)1,
        Mirror = (int)2
    } CanvasEdgeBehavior;

enum CanvasImageInterpolation
Enumerator:
NearestNeighbor
Linear
Cubic
MultiSampleLinear
Anisotropic
HighQualityCubic

Definition at line 63 of file microsoft.ui.private.composition.effects.idl.

    {
        NearestNeighbor = (int)0,
        Linear = (int)1,
        Cubic = (int)2,
        MultiSampleLinear = (int)3,
        Anisotropic = (int)4,
        HighQualityCubic = (int)5
    } CanvasImageInterpolation;

enum EffectBorderMode
Enumerator:
Soft
Hard

Definition at line 83 of file microsoft.ui.private.composition.effects.idl.

    {
        Soft = 0,
        Hard = 1
    } EffectBorderMode;

enum EffectChannelSelect
Enumerator:
Red
Green
Blue
Alpha

Definition at line 98 of file microsoft.ui.private.composition.effects.idl.

    {
        Red = 0,
        Green = 1,
        Blue = 2,
        Alpha = 3
    } EffectChannelSelect;

enum EffectOptimization
Enumerator:
Speed
Balanced
Quality

Definition at line 90 of file microsoft.ui.private.composition.effects.idl.

    {
        Speed = 0,
        Balanced = 1,
        Quality = 2
    } EffectOptimization;

Variable Documentation

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass AlphaMaskEffect

Definition at line 122 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass ArithmeticCompositeEffect

Definition at line 169 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass BlendEffect

Definition at line 169 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass BorderEffect

Definition at line 248 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass ColorMatrixEffect

Definition at line 275 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass ColorSourceEffect

Definition at line 293 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass CompositeStepEffect

Definition at line 318 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass ContrastEffect

Definition at line 342 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass CrossFadeEffect

Definition at line 366 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass DistantDiffuseEffect

Definition at line 405 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass DistantSpecularEffect

Definition at line 447 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass ExposureEffect

Definition at line 468 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass GammaTransferEffect

Definition at line 537 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass GaussianBlurEffect

Definition at line 564 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass GrayscaleEffect

Definition at line 582 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass HueRotationEffect

Definition at line 603 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass InvertEffect

Definition at line 621 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass LinearTransferEffect

Definition at line 678 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass LuminanceToAlphaEffect

Definition at line 696 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass OpacityEffect

Definition at line 717 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass PointDiffuseEffect

Definition at line 753 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass PointSpecularEffect

Definition at line 792 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass PosterizeEffect

Definition at line 819 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass PremultiplyEffect

Definition at line 837 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass SaturationEffect

Definition at line 858 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass SepiaEffect

Definition at line 882 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass SpotDiffuseEffect

Definition at line 927 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass SpotSpecularEffect

Definition at line 975 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass TemperatureAndTintEffect

Definition at line 999 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass TintEffect

Definition at line 1023 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass Transform2DEffect

Definition at line 1053 of file microsoft.ui.private.composition.effects.idl.

EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL runtimeclass UnPremultiplyEffect

Definition at line 1071 of file microsoft.ui.private.composition.effects.idl.

Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
Namespaces

Microsoft::UI::Xaml Namespace Reference

Namespaces

namespace | Design
namespace | Tests
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Design Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Design
Classes

Microsoft::UI::Xaml::Design Namespace Reference

Classes

class RegisterMetadata
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
Namespaces

Microsoft::UI::Xaml::Tests Namespace Reference

Namespaces

namespace MUXControls
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests::MUXControls Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
Namespaces

Microsoft::UI::Xaml::Tests::MUXControls Namespace Reference

Namespaces

namespace | ApiTests
namespace | InteractionTests
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests::MUXControls::ApiTests Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
Namespaces | Classes

Microsoft::UI::Xaml::Tests::MUXControls::ApiTests Namespace Reference

Namespaces

namespace | RepeaterTests

Classes

class | AcrylicBrushTests
class | AnimatedIconTests
class | AnnotatedScrollBarTests
class | AutoSuggestBoxTests
class | BaselineResources
class | BreadcrumbTests
class | ButtonInteractionTests
class | CalendarViewTests
class | Category
class | ColorPickerTests
class | ComboBoxTests
class | CommandBarFlyoutTests
class | CommonStylesApiTests
class | CommonStylesVisualTreeTestSamples
class | ControlVisualTreeTestFilter
class | ExpanderTests
class | IconSourceApiTests
class | ImageIconTests
class | InfoBadgeTests
class | ItemContainerTests
class | ItemsViewTests
class | LayoutPanelTests
class | LightConfigurationTests
class | MainWindowLightConfiguration
class | MapControlTests
class | MyCustomNonVirtualizingStackLayout
class | NavigationViewTests
class | NumberBoxTests
class | PagerControlTests
class | ParallaxViewTests
class | PersonPictureTests
class | PipsPagerTests
class | ProgressBarTests
class | ProgressRingTests
class | RadioButtonsTests
class | RatingControlTests
class | RefreshInfoProviderImpl
class | RefreshVisualizerTests
class | RevealTests
class | ScrollPresenterTests
class | ScrollViewerAdapterTests
class | ScrollViewTests
class | ScrollViewVisualStateCounts
class | SecondaryWindowLightConfiguration
class | SelectorBarTests
class | SliderInteractionTests
class | SpecialTreeView
class | SpecialTreeViewItem
class | SpecialTreeViewList
class | SpecialTreeViewNode
class | SplitButtonTests
class | SwipeControlTests
class | TabViewTests
class | TeachingTipTests
class | TestCommand
class | TreeViewTests
class | TwoPaneViewTests
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
Namespaces | Classes

Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests Namespace Reference

Namespaces

namespace | Common

Classes

class | AccessibilityTests
class | CustomSelectionModel
class | EffectiveViewportScrollPresenterTests
class | EffectiveViewportTests
class | FlowLayoutCollectionChangeTests
class | FlowLayoutTests
class | IndexPathTests
class | InspectingDataSourceTests
class | ItemCollectionTransitionProviderTests
class | ItemTemplateTests
class | LayoutTests
class | LinedFlowLayoutTests
class | MyContainerSelector
class | MySelector
class | PhasingTests
class | RecyclePoolTests
class | RepeaterFocusTests
class | RepeaterTests
class | SelectionModelTests
class | ViewManagerTests
class | ViewportTests
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
Namespaces | Classes | Enumerations

Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common Namespace Reference

Namespaces

namespace | Mocks

Classes

class | CollectionChangeEventArgsConverters
class | CustomItemsSource
class | CustomItemsSourceView
class | CustomItemsSourceViewWithUniqueIdMapping
class | CustomItemsSourceWithUniqueId
class | DataAsElementElementFactory
class | ElementFromElementElementFactory
class | FlowLayoutDerived
class | ItemCollectionTransitionProviderDerived
class | LayoutExtension
class | NamedGroup-g
class | NonVirtualStackLayout
class | OrientationBasedMeasures
class | ReadOnlyNotifyPropertyChangedCollection-g
class | RecyclingElementFactoryDerived
class | SharedHelpers
class | WinRTCollection

Enumerations

enum | ScrollOrientation { Vertical, Horizontal }

Enumeration Type Documentation

enum ScrollOrientation
Enumerator:
Vertical
Horizontal

Definition at line 14 of file SharedHelpers.cs.

    {
        Vertical,
        Horizontal
    }

Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
  • Mocks
Classes

Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks Namespace Reference

Classes

class | MockElementFactory
class | MockItemsSource
class | MockItemsSourceWithUniqueIdMapping
class | MockNonVirtualizingLayout
class | MockStackLayout
class | MockVirtualizingLayout
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
Namespaces | Classes | Enumerations

Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests Namespace Reference

Namespaces

namespace | NavigationViewTests

Classes

class | AcrylicBrushTests
class | AnimatedVisualPlayerTests
class | AnnotatedScrollBarInteractionTests
class | AutoSuggestBox
class | BreadcrumbBarItem
class | BreadcrumbTests
class | ButtonInteractionTests
class | ColorChangedEventWaiter
class | ColorPickerSlider
class | ColorPickerTests
class | ColorSpectrum
class | CommandBarFlyoutTests
class | CommonStylesTests
class | DropDownButton
class | DropDownButtonTests
class | Expander
class | ExpanderTests
class | ImageIconTests
class | InfoBarTests
class | ItemContainerTests
class | ItemsViewTestsWithInputHelper
class | MapControlTests
class | MenuBarTests
class | NumberBoxTests
class | PagerControlTestBase
class | PagerControlTestPageElements
class | PagerControlTests
class | ParallaxViewTests
class | PersonPictureTests
class | PipsPagerElements
class | PipsPagerTestBase
class | PipsPagerTests
class | ProgressBarTests
class | ProgressRingTests
class | RadialGradientBrushTests
class | RadioButtonsFocusTestPageElements
class | RadioButtonsTestPageElements
class | RadioButtonsTests
class | RadioMenuFlyoutItemTests
class | RatingControlTests
class | RefreshContainerTests
class | RepeaterTests
class | RevealBrushTests
class | ScrollPresenterTestsBase
class | ScrollPresenterTestsWithAutomationPeer
class | ScrollPresenterTestsWithInputHelper
class | ScrollViewerAdapterTests
class | ScrollViewTestsWithInputHelper
class | SelectorBarTests
class | SliderInteractionTests
class | SplitButtonTests
class | SwipeControlTests
class | TabViewTearOutTestHelpers
class | TabViewTearOutTests
class | TabViewTests
class | TeachingTipFocusTestPageElements
class | TeachingTipTestPageElements
class | TeachingTipTests
class | TextCommandBarFlyoutTests
class | TitleBarTests
class | TreeViewTests
class | TwoPaneViewTests
class | WebView2Tests

Enumerations

enum | ColorChannels { RGB, HSV }
enum | Visibility { Visible, Collapsed }

Enumeration Type Documentation

enum ColorChannels
Enumerator:
RGB
HSV

Definition at line 203 of file ColorPickerTests.cs.

    {
        RGB,
        HSV,
    }

enum Visibility
Enumerator:
Visible
Collapsed

Definition at line 19 of file PagerControlTestBase.cs.

    {
        Visible,
        Collapsed
    }

Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests Namespace Reference

  • Namespace List
  • Namespace Members
  • Microsoft
  • UI
  • Xaml
  • Tests
  • MUXControls
  • InteractionTests
  • NavigationViewTests
Classes | Enumerations

Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests Namespace Reference

Classes

class | CommonTests
class | EventTests
class | FocusBehaviorTests
class | NavigationViewTestsBase
class | PaneBehaviorTests
class | RegressionTestScenario
class | SelectionTests
class | TopModeTests

Enumerations

enum RegressionTestType {
LeftNav = 1, TopNav = 2, LeftNavRS4 = 4, HierarchyMarkup = 8,
HierarchyDatabinding = 16
}

Enumeration Type Documentation

enum RegressionTestType
Enumerator:
LeftNav
TopNav
LeftNavRS4
HierarchyMarkup
HierarchyDatabinding

Definition at line 405 of file NavigationViewTestsBase.cs.

    {
        LeftNav = 1,
        TopNav = 2,
        LeftNavRS4 = 4,
        HierarchyMarkup = 8,
        HierarchyDatabinding = 16
    }

Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MU_PRIVATE_CONTROLS_NAMESPACE Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Enumerations | Functions | Variables

MU_PRIVATE_CONTROLS_NAMESPACE Namespace Reference

Classes

interface | IAdapterAnimationHandler
interface | IRefreshContainerPrivate
interface | IRefreshInfoProvider
interface | IRefreshInfoProviderAdapter
interface | IRefreshVisualizerPrivate
interface | IRepeaterScrollingSurface

Enumerations

enum | AnimatedIconAnimationQueueBehavior { Cut, QueueOne, SpeedUpQueueOne }
enum | ButtonInteractionInvokeMode { Release = 0, Press = 1, Hover = 2 }
enum | LinedFlowLayoutInvalidationTrigger { InvalidateLayoutCall = 0, SnappedAverageItemsPerLineChange = 1, ItemDesiredWidthChange = 2 }
enum | ScrollPresenterViewChangeResult { Completed = 0, Interrupted = 1, Ignored = 2 }

Functions

IRefreshInfoProvider | Adapt (Microsoft.UI.Xaml.Controls.ScrollViewer adaptee, Windows.Foundation.Size visualizerSize)
delegate void | ConfigurationChangedEventHandler (IRepeaterScrollingSurface sender)
delegate void | PostArrangeEventHandler (IRepeaterScrollingSurface sender)
delegate void | ViewportChangedEventHandler (IRepeaterScrollingSurface sender, Boolean isFinal)

Variables

runtimeclass
IAdapterAnimationHandler 		animationHandler
runtimeclass | ScrollViewerIRefreshInfoProviderAdapter
unsealed runtimeclass | SliderInteraction
runtimeclass | SpectrumBrush

Enumeration Type Documentation

enum AnimatedIconAnimationQueueBehavior
Enumerator:
Cut
QueueOne
SpeedUpQueueOne

Definition at line 5 of file AnimatedIconTestHooks.idl.

{
    Cut,
    QueueOne,
    SpeedUpQueueOne,
};

enum ButtonInteractionInvokeMode
Enumerator:
Release
Press
Hover

Definition at line 5 of file ButtonInteraction.idl.

{
    Release = 0,
    Press = 1,
    Hover = 2,
};

enum LinedFlowLayoutInvalidationTrigger
Enumerator:
InvalidateLayoutCall
SnappedAverageItemsPerLineChange
ItemDesiredWidthChange

Definition at line 5 of file LayoutsTestHooks.idl.

{
    InvalidateLayoutCall = 0,
    SnappedAverageItemsPerLineChange = 1,
    ItemDesiredWidthChange = 2,
};

enum ScrollPresenterViewChangeResult
Enumerator:
Completed
Interrupted
Ignored

Definition at line 5 of file ScrollPresenterTestHooks.idl.

{
    Completed = 0,
    Interrupted = 1,
    Ignored = 2,
};

Function Documentation

IRefreshInfoProvider MU_PRIVATE_CONTROLS_NAMESPACE::Adapt | ( | Microsoft.UI.Xaml.Controls.ScrollViewer | adaptee,
 |  | Windows.Foundation.Size | visualizerSize
 | ) |  |
delegate void MU_PRIVATE_CONTROLS_NAMESPACE::ConfigurationChangedEventHandler ( IRepeaterScrollingSurface sender )
delegate void MU_PRIVATE_CONTROLS_NAMESPACE::PostArrangeEventHandler ( IRepeaterScrollingSurface sender )
delegate void MU_PRIVATE_CONTROLS_NAMESPACE::ViewportChangedEventHandler | ( | IRepeaterScrollingSurface | sender,
 |  | Boolean | isFinal
 | ) |  |

Variable Documentation

runtimeclass IAdapterAnimationHandler animationHandler

Definition at line 25 of file ScrollViewerIRefreshInfoProviderAdapter.idl.

runtimeclass ScrollViewerIRefreshInfoProviderAdapter

Definition at line 25 of file ScrollViewerIRefreshInfoProviderAdapter.idl.

unsealed runtimeclass SliderInteraction

Definition at line 10 of file SliderInteraction.idl.

runtimeclass SpectrumBrush

Definition at line 10 of file SpectrumBrush.idl.

Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MU_PRIVATE_MEDIA_NAMESPACE Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Functions | Variables

MU_PRIVATE_MEDIA_NAMESPACE Namespace Reference

Classes

interface | IAcrylicBrushStaticsPrivate

Functions

Boolean | BorderLight_ShouldBeOn (RevealBorderLight value)
void | ForceCreateAcrylicBrush (Boolean useCrossFadeEffect)
RevealBorderLight | GetAsRevealBorderLight (Microsoft.UI.Xaml.Media.XamlLight value)
RevealHoverLight | GetAsRevealHoverLight (Microsoft.UI.Xaml.Media.XamlLight value)
Microsoft UI Composition
ExpressionAnimation 		GetHoverLightOffsetExpression (RevealHoverLight value)
Microsoft UI Composition SpotLight | GetSpotLight (Microsoft.UI.Xaml.Media.XamlLight value)
Boolean | HoverLight_IsPointerOver (RevealHoverLight value)
Boolean | HoverLight_IsPressed (RevealHoverLight value)
Boolean | HoverLight_ShouldBeOn (RevealHoverLight value)

Variables

runtimeclass | AcrylicTestApi
runtimeclass | MaterialHelperTestApi
unsealed runtimeclass | RevealBorderLight
runtimeclass | RevealBrushTestApi
unsealed runtimeclass | RevealHoverLight
runtimeclass | RevealTestApi
unsealed runtimeclass | XamlAmbientLight

Function Documentation

Boolean MU_PRIVATE_MEDIA_NAMESPACE::BorderLight_ShouldBeOn ( RevealBorderLight value )
void MU_PRIVATE_MEDIA_NAMESPACE::ForceCreateAcrylicBrush ( Boolean useCrossFadeEffect )
RevealBorderLight MU_PRIVATE_MEDIA_NAMESPACE::GetAsRevealBorderLight ( Microsoft.UI.Xaml.Media.XamlLight value )
RevealHoverLight MU_PRIVATE_MEDIA_NAMESPACE::GetAsRevealHoverLight ( Microsoft.UI.Xaml.Media.XamlLight value )
Microsoft UI Composition ExpressionAnimation MU_PRIVATE_MEDIA_NAMESPACE::GetHoverLightOffsetExpression ( RevealHoverLight value )
Microsoft UI Composition SpotLight MU_PRIVATE_MEDIA_NAMESPACE::GetSpotLight ( Microsoft.UI.Xaml.Media.XamlLight value )
Boolean MU_PRIVATE_MEDIA_NAMESPACE::HoverLight_IsPointerOver ( RevealHoverLight value )
Boolean MU_PRIVATE_MEDIA_NAMESPACE::HoverLight_IsPressed ( RevealHoverLight value )
Boolean MU_PRIVATE_MEDIA_NAMESPACE::HoverLight_ShouldBeOn ( RevealHoverLight value )

Variable Documentation

runtimeclass AcrylicTestApi

Definition at line 8 of file AcrylicTestApi.idl.

runtimeclass MaterialHelperTestApi

Definition at line 9 of file MaterialHelperTestApi.idl.

unsealed runtimeclass RevealBorderLight

Definition at line 8 of file RevealBorderLight.idl.

runtimeclass RevealBrushTestApi

Definition at line 8 of file RevealBrushTestApi.idl.

unsealed runtimeclass RevealHoverLight

Definition at line 8 of file RevealHoverLight.idl.

runtimeclass RevealTestApi

Definition at line 8 of file RevealTestApi.idl.

unsealed runtimeclass XamlAmbientLight

Definition at line 8 of file XamlAmbientLight.idl.

Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MU_XAP_NAMESPACE Namespace Reference

  • Namespace List
  • Namespace Members
Variables

MU_XAP_NAMESPACE Namespace Reference

Variables

unsealed runtimeclass | AnimatedVisualPlayerAutomationPeer
unsealed runtimeclass | BreadcrumbBarItemAutomationPeer
unsealed runtimeclass | ColorPickerSliderAutomationPeer
unsealed runtimeclass | ColorSpectrumAutomationPeer
unsealed runtimeclass | DropDownButtonAutomationPeer
unsealed runtimeclass | ExpanderAutomationPeer
unsealed runtimeclass
Microsoft UI Xaml Automation
Provider 		IExpandCollapseProvider
unsealed runtimeclass | InfoBarAutomationPeer
unsealed runtimeclass | InkCanvasAutomationPeer
unsealed runtimeclass | InkToolBarAutomationPeer
unsealed runtimeclass | InkToolBarFlyoutItemAutomationPeer
unsealed runtimeclass | InkToolBarMenuButtonAutomationPeer
unsealed runtimeclass | InkToolBarToolButtonAutomationPeer
unsealed runtimeclass
Microsoft UI Xaml Automation
Provider 		ISelectionItemProvider
unsealed runtimeclass | ItemContainerAutomationPeer
unsealed runtimeclass | ItemsViewAutomationPeer
unsealed runtimeclass | MenuBarAutomationPeer
unsealed runtimeclass | MenuBarItemAutomationPeer
unsealed runtimeclass | NavigationViewItemAutomationPeer
unsealed runtimeclass | NumberBoxAutomationPeer
unsealed runtimeclass | PagerControlAutomationPeer
unsealed runtimeclass | PersonPictureAutomationPeer
unsealed runtimeclass | PipsPagerAutomationPeer
unsealed runtimeclass | ProgressBarAutomationPeer
unsealed runtimeclass | ProgressRingAutomationPeer
unsealed runtimeclass | RadioButtonsAutomationPeer
unsealed runtimeclass | RatingControlAutomationPeer
unsealed runtimeclass | RepeaterAutomationPeer
unsealed runtimeclass | ScrollPresenterAutomationPeer
unsealed runtimeclass | SelectorBarItemAutomationPeer
unsealed runtimeclass | SplitButtonAutomationPeer
unsealed runtimeclass | TabViewAutomationPeer
unsealed runtimeclass | TabViewItemAutomationPeer
unsealed runtimeclass | TeachingTipAutomationPeer
unsealed runtimeclass | TreeViewItemAutomationPeer
unsealed runtimeclass | TreeViewListAutomationPeer
unsealed runtimeclass | WebView2AutomationPeer

Variable Documentation

unsealed runtimeclass AnimatedVisualPlayerAutomationPeer

Definition at line 8 of file AnimatedVisualPlayerAutomationPeer.idl.

unsealed runtimeclass BreadcrumbBarItemAutomationPeer

Definition at line 6 of file BreadcrumbBarAutomationPeer.idl.

unsealed runtimeclass ColorPickerSliderAutomationPeer

Definition at line 8 of file ColorPickerSliderAutomationPeer.idl.

unsealed runtimeclass ColorSpectrumAutomationPeer

Definition at line 8 of file ColorSpectrumAutomationPeer.idl.

unsealed runtimeclass DropDownButtonAutomationPeer

Definition at line 6 of file DropDownButtonAutomationPeer.idl.

unsealed runtimeclass ExpanderAutomationPeer

Definition at line 6 of file ExpanderAutomationPeer.idl.

Microsoft UI Xaml Automation Provider IExpandCollapseProvider

Definition at line 15 of file MenuBarAutomationPeer.idl.

unsealed runtimeclass InfoBarAutomationPeer

Definition at line 149 of file InfoBar.idl.

unsealed runtimeclass InkCanvasAutomationPeer

Definition at line 7 of file InkCanvasAutomationPeer.idl.

unsealed runtimeclass InkToolBarAutomationPeer

Definition at line 6 of file InkToolBarAutomationPeer.idl.

unsealed runtimeclass InkToolBarFlyoutItemAutomationPeer

Definition at line 25 of file InkToolBarAutomationPeer.idl.

unsealed runtimeclass InkToolBarMenuButtonAutomationPeer

Definition at line 18 of file InkToolBarAutomationPeer.idl.

unsealed runtimeclass InkToolBarToolButtonAutomationPeer

Definition at line 12 of file InkToolBarAutomationPeer.idl.

unsealed runtimeclass Microsoft UI Xaml Automation Provider ISelectionItemProvider

Definition at line 100 of file ItemContainer.idl.

unsealed runtimeclass ItemContainerAutomationPeer

Definition at line 100 of file ItemContainer.idl.

unsealed runtimeclass ItemsViewAutomationPeer

Definition at line 82 of file ItemsView.idl.

unsealed runtimeclass MenuBarAutomationPeer

Definition at line 9 of file MenuBarAutomationPeer.idl.

unsealed runtimeclass MenuBarItemAutomationPeer

Definition at line 15 of file MenuBarAutomationPeer.idl.

unsealed runtimeclass NavigationViewItemAutomationPeer

Definition at line 6 of file NavigationViewItemAutomationPeer.idl.

unsealed runtimeclass NumberBoxAutomationPeer

Definition at line 147 of file NumberBox.idl.

unsealed runtimeclass PagerControlAutomationPeer

Definition at line 8 of file PagerControlAutomationPeer.idl.

unsealed runtimeclass PersonPictureAutomationPeer

Definition at line 8 of file PersonPictureAutomationPeer.idl.

unsealed runtimeclass PipsPagerAutomationPeer

Definition at line 8 of file PipsPagerAutomationPeer.idl.

unsealed runtimeclass ProgressBarAutomationPeer

Definition at line 56 of file ProgressBar.idl.

unsealed runtimeclass ProgressRingAutomationPeer

Definition at line 74 of file ProgressRing.idl.

unsealed runtimeclass RadioButtonsAutomationPeer

Definition at line 49 of file RadioButtons.idl.

unsealed runtimeclass RatingControlAutomationPeer

Definition at line 8 of file RatingControlAutomationPeer.idl.

unsealed runtimeclass RepeaterAutomationPeer

Definition at line 8 of file RepeaterAutomationPeer.idl.

unsealed runtimeclass ScrollPresenterAutomationPeer

Definition at line 8 of file ScrollPresenterAutomationPeer.idl.

unsealed runtimeclass SelectorBarItemAutomationPeer

Definition at line 54 of file SelectorBar.idl.

unsealed runtimeclass SplitButtonAutomationPeer

Definition at line 6 of file SplitButtonAutomationPeer.idl.

unsealed runtimeclass TabViewAutomationPeer

Definition at line 274 of file TabView.idl.

unsealed runtimeclass TabViewItemAutomationPeer

Definition at line 281 of file TabView.idl.

unsealed runtimeclass TeachingTipAutomationPeer

Definition at line 8 of file TeachingTipAutomationPeer.idl.

unsealed runtimeclass TreeViewItemAutomationPeer

Definition at line 13 of file TreeViewAutomationPeers.idl.

unsealed runtimeclass TreeViewListAutomationPeer

Definition at line 8 of file TreeViewAutomationPeers.idl.

unsealed runtimeclass WebView2AutomationPeer

Definition at line 8 of file WebView2AutomationPeer.idl.

Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MU_XC_NAMESPACE Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Enumerations | Functions | Variables

MU_XC_NAMESPACE Namespace Reference

Classes

interface | IAnimatedVisual
interface | IAnimatedVisualSource
interface | IAnimatedVisualSource3
interface | IApplicationViewSpanningRects
interface | IClosable
interface | IKeyIndexMapping

Enumerations

enum | AnnotatedScrollBarScrollingEventKind { Click = 0, Drag = 1, IncrementButton = 2, DecrementButton = 3 }
enum | ColorPickerHsvChannel { Hue = 0, Saturation = 1, Value = 2, Alpha = 3 }
enum ColorSpectrumComponents {
HueValue = 0, ValueHue = 1, HueSaturation = 2, SaturationHue = 3,
SaturationValue = 4, ValueSaturation = 5
}
enum | ColorSpectrumShape { Box = 0, Ring = 1 }
enum | ElementRealizationOptions { None = 0, ForceCreate = 1, SuppressAutoRecycle = 2 }
enum | ExpandDirection { Down = 0, Up = 1 }
enum FlowLayoutLineAlignment {
Start = 0, Center = 1, End = 2, SpaceAround = 3,
SpaceBetween = 4, SpaceEvenly = 5
}
enum | IndexBasedLayoutOrientation { None = 0, TopToBottom = 1, LeftToRight = 0 }
enum | InfoBarCloseReason { CloseButton = 0, Programmatic = 1 }
enum | InfoBarSeverity { Informational = 0, Success = 1, Warning = 2, Error = 3 }
enum InkToolBarButtonFlyoutPlacement {
Auto = 1, Top = 2, Bottom, Left = 1,
Right
}
enum | InkToolBarEraserFlyoutItemKind { StrokeEraser, PrecisionSmallEraser, PrecisionLargeEraser, ClearAll }
enum | InkToolBarEraserKind { Stroke, PrecisionSmall, PrecisionLarge }
enum | InkToolBarFlyoutItemKind { Simple, Radio, Check, RadioCheck }
enum | InkToolBarInitialControls { All = 255, None = 0, PensOnly, AllExceptPens }
enum | InkToolBarMenuKind { Stencil }
enum | InkToolBarStencilKind { Ruler, Protractor }
enum | InkToolBarToggle { Ruler, Custom }
enum InkToolBarTool {
BallpointPen, Pencil, Highlighter, Eraser,
CustomTool
}
enum | ItemCollectionTransitionOperation { Add = 0, Remove = 1, Move = 2 }
enum | ItemCollectionTransitionTriggers { CollectionChangeAdd = 1, CollectionChangeRemove = 2, CollectionChangeReset = 4, LayoutTransition = 8 }
enum ItemContainerInteractionTrigger {
PointerPressed, PointerReleased, Tap, DoubleTap,
EnterKey, SpaceKey, AutomationInvoke
}
enum | ItemContainerMultiSelectMode { Auto = 1, Single = 2, Extended = 4, Multiple = 8 }
enum | ItemContainerUserInvokeMode { Auto = 1, UserCanInvoke = 2, UserCannotInvoke = 4 }
enum | ItemContainerUserSelectMode { Auto = 1, UserCanSelect = 2, UserCannotSelect = 4 }
enum | ItemsViewSelectionMode { None = 0, Single = 2, Multiple = 8, Extended = 4 }
enum LinedFlowLayoutItemsJustification {
Start = 0, Center = 1, End = 2, SpaceAround = 3,
SpaceBetween = 4, SpaceEvenly = 5
}
enum | LinedFlowLayoutItemsStretch { None = 0, Fill = 1 }
enum | NavigationViewBackButtonVisible { Visible = 1, Auto = 1 }
enum | NavigationViewDisplayMode { Minimal = 0, Compact = 1, Expanded = 2 }
enum | NavigationViewOverflowLabelMode { MoreLabel = 0, NoLabel = 1 }
enum NavigationViewPaneDisplayMode {
Auto = 1, Left = 1, Top = 2, LeftCompact = 3,
LeftMinimal = 4
}
enum | NavigationViewSelectionFollowsFocus { Disabled = 0, Enabled = 1 }
enum | NavigationViewShoulderNavigationEnabled { WhenSelectionFollowsFocus = 0, Always = 1, Never = 2 }
enum | NumberBoxSpinButtonPlacementMode { Hidden = 2, Compact = 1, Inline }
enum | NumberBoxValidationMode { InvalidInputOverwritten, Disabled = 0 }
enum | PagerControlButtonVisibility { Visible = 1, HiddenOnEdge, Hidden = 2 }
enum | PagerControlDisplayMode { Auto = 1, ComboBox, ButtonPanel }
enum | ParallaxSourceOffsetKind { Absolute = 0, Relative = 1 }
enum | PipsPagerButtonVisibility { Visible = 1, VisibleOnPointerOver }
enum | PipsPagerWrapMode { None = 0, Wrap }
enum | PlayerAnimationOptimization { Latency, Resources }
enum | RefreshPullDirection { LeftToRight = 0, TopToBottom = 1, RightToLeft = 2, BottomToTop = 3 }
enum | RefreshVisualizerOrientation { Auto = 1, Normal = 1, Rotate90DegreesCounterclockwise = 2, Rotate270DegreesCounterclockwise = 3 }
enum RefreshVisualizerState {
Idle = 0, Peeking = 1, Interacting = 2, Pending = 3,
Refreshing = 4
}
enum | ScrollingAnimationMode { Disabled = 0, Enabled = 1, Auto = 1 }
enum | ScrollingChainMode { Auto = 1, Always = 1, Never = 2 }
enum | ScrollingContentOrientation { Vertical = 0, Horizontal = 1, None = 0, Both = 3 }
enum ScrollingInputKinds {
None = 0, Touch = 1, Pen = 2, MouseWheel = 4,
Keyboard = 8, Gamepad = 16, All = 255
}
enum | ScrollingInteractionState { Idle = 0, Interaction = 1, Inertia = 2, Animation = 3 }
enum | ScrollingRailMode { Enabled = 1, Disabled = 0 }
enum | ScrollingScrollBarVisibility { Auto = 1, Visible = 1, Hidden = 2 }
enum | ScrollingScrollMode { Enabled = 1, Disabled = 0, Auto = 1 }
enum | ScrollingSnapPointsMode { Default = 0, Ignore = 1 }
enum | ScrollingZoomMode { Enabled = 1, Disabled = 0 }
enum | SwipeBehaviorOnInvoked { Auto = 1, Close = 1, RemainOpen = 2 }
enum | SwipeMode { Reveal = 0, Execute = 1 }
enum | TabViewCloseButtonOverlayMode { Auto = 1, OnPointerOver = 1, Always = 1 }
enum | TabViewWidthMode { Equal = 0, SizeToContent = 1, Compact = 1 }
enum | TeachingTipCloseReason { CloseButton = 0, LightDismiss, Programmatic = 1 }
enum | TeachingTipHeroContentPlacementMode { Auto = 1, Top = 2, Bottom }
enum TeachingTipPlacementMode {
Auto = 1, Top = 2, Bottom, Left = 1,
Right, TopRight, TopLeft, BottomRight,
BottomLeft, LeftTop, LeftBottom, RightTop,
RightBottom, Center = 1
}
enum | TeachingTipTailVisibility { Auto = 1, Visible = 1 }
enum | TreeViewSelectionMode { None = 0, Single = 2, Multiple = 8 }
enum | TwoPaneViewMode { SinglePane = 0, Wide = 1, Tall = 2 }
enum | TwoPaneViewPriority { Pane1 = 0, Pane2 = 1 }
enum | TwoPaneViewTallModeConfiguration { SinglePane = 0, TopBottom = 1, BottomTop = 2 }
enum | TwoPaneViewWideModeConfiguration { SinglePane = 0, LeftRight = 1, RightLeft = 2 }
enum UniformGridLayoutItemsJustification {
Start = 0, Center = 1, End = 2, SpaceAround = 3,
SpaceBetween = 4, SpaceEvenly = 5
}
enum | UniformGridLayoutItemsStretch { None = 0, Fill = 1, Uniform = 2 }

Functions

Int32 | AddScrollVelocity (Windows.Foundation.Numerics.Vector2 offsetsVelocity, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > inertiaDecayRate)
Int32 | AddZoomVelocity (Single zoomFactorVelocity, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint, Windows.Foundation.IReference< Single > inertiaDecayRate)
Microsoft UI Xaml UIElement | ContainerFromIndex (Int32 index)
Microsoft UI Xaml DependencyObject | ContainerFromItem (Object item)
Windows UI Input Inking
InkDrawingAttributes 		CreateInkDrawingAttributes (Microsoft.UI.Xaml.Media.Brush brush, Double strokeWidth)
overridable Windows UI Input
Inking InkDrawingAttributes 		CreateInkDrawingAttributesCore (Microsoft.UI.Xaml.Media.Brush brush, Double strokeWidth)
delegate void | DoInkPresenterWork (Windows.UI.Input.Inking.InkPresenter presenter)
Object | GetAt (Int32 index)
Int32 | GetElementIndex (Microsoft.UI.Xaml.UIElement element)
Microsoft UI Xaml Controls
InkToolBarMenuButton 		GetMenuButton (Microsoft.UI.Xaml.Controls.InkToolBarMenuKind menu)
Microsoft UI Xaml UIElement | GetOrCreateElement (Int32 index)
Microsoft UI Xaml Controls
InkToolBarToggleButton 		GetToggleButton (Microsoft.UI.Xaml.Controls.InkToolBarToggle tool)
Microsoft UI Xaml Controls
InkToolBarToolButton 		GetToolButton (Microsoft.UI.Xaml.Controls.InkToolBarTool tool)
Int32 | IndexFromKey (String key)
Int32 | IndexOf (IInspectable item)
String | KeyFromIndex (Int32 index)
void | Pause ()
Windows Foundation IAsyncAction | PlayAsync (Double fromProgress, Double toProgress, Boolean looped)
Windows Foundation IAsyncAction | QueueInkPresenterWorkItem (DoInkPresenterWork workItem)
void | RefreshAutomaticHorizontalOffsets ()
void | RefreshAutomaticVerticalOffsets ()
void | RegisterAnchorCandidate (Microsoft.UI.Xaml.UIElement element)
void | RequestRefresh ()
void | Resume ()
Int32 | ScrollBy (Double horizontalOffsetDelta, Double verticalOffsetDelta, ScrollingScrollOptions options)
Int32 | ScrollBy (Double horizontalOffsetDelta, Double verticalOffsetDelta)
Int32 | ScrollTo (Double horizontalOffset, Double verticalOffset, ScrollingScrollOptions options)
Int32 | ScrollTo (Double horizontalOffset, Double verticalOffset)
void | SetProgress (Double progress)
void | Stop ()
Microsoft UI Xaml UIElement | TryGetElement (Int32 index)
void | UnregisterAnchorCandidate (Microsoft.UI.Xaml.UIElement element)
Int32 | ZoomBy (Single zoomFactorDelta, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint)
Int32 | ZoomBy (Single zoomFactorDelta, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint, ScrollingZoomOptions options)
Int32 | ZoomTo (Single zoomFactor, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint, ScrollingZoomOptions options)
Int32 | ZoomTo (Single zoomFactor, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint)

Variables

Boolean | AcceptsExpression
event Windows Foundation
TypedEventHandler< TeachingTip,
Object > 		ActionButtonClick
Microsoft UI Xaml Input ICommand | ActionButtonCommand
Object | ActionButtonCommandParameter
Object | ActionButtonContent
Microsoft UI Xaml Style | ActionButtonStyle
Microsoft UI Xaml Controls
InkToolBarToolButton 		ActiveTool
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Object > 		ActiveToolChanged
event Windows Foundation
TypedEventHandler< TabView,
Object > 		AddTabButtonClick
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingAnchorRequestedEventArgs > 		AnchorRequested
unsealed runtimeclass | AnimatedIcon
unsealed runtimeclass | AnimatedIconSource
unsealed runtimeclass | AnimatedVisualPlayer
Boolean | ArePrecisionErasersVisible
Boolean | AutoPlay
event Windows Foundation
TypedEventHandler< TitleBar,
Object > 		BackRequested
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingBringingIntoViewEventArgs > 		BringingIntoView
Microsoft UI Xaml Controls
InkToolBarButtonFlyoutPlacement 		ButtonFlyoutPlacement
Boolean | ButtonPanelAlwaysShowFirstLastPageIndex
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBarFlyoutItem,
Object > 		Checked
event Windows Foundation
TypedEventHandler< TeachingTip,
Object > 		CloseButtonClick
Microsoft UI Xaml Input ICommand | CloseButtonCommand
Object | CloseButtonCommandParameter
Object | CloseButtonContent
Microsoft UI Xaml Style | CloseButtonStyle
event Windows Foundation
TypedEventHandler< TeachingTip,
TeachingTipClosedEventArgs > 		Closed
event Windows Foundation
TypedEventHandler< TabViewItem,
TabViewTabCloseRequestedEventArgs > 		CloseRequested
event Windows Foundation
TypedEventHandler< TeachingTip,
TeachingTipClosingEventArgs > 		Closing
event Windows Foundation
TypedEventHandler< Expander,
ExpanderCollapsedEventArgs > 		Collapsed = 0
event Windows Foundation
TypedEventHandler< ColorPicker,
ColorChangedEventArgs > 		ColorChanged
unsealed runtimeclass | ColorPicker
unsealed runtimeclass | CommandBarFlyout
Microsoft UI Xaml UIElement | ConfigurationContent
Microsoft UI Xaml Controls
InkToolBarCustomPen 		CustomPen
Object | Description
PagerControlDisplayMode DisplayMode
unsealed runtimeclass | DropDownButton
event Windows Foundation
TypedEventHandler
< ItemsRepeater,
ItemsRepeaterElementClearingEventArgs > 		ElementClearing
runtimeclass | ElementFactory
event Windows Foundation
TypedEventHandler
< ItemsRepeater,
ItemsRepeaterElementIndexChangedEventArgs > 		ElementIndexChanged
event Windows Foundation
TypedEventHandler
< ItemsRepeater,
ItemsRepeaterElementPreparedEventArgs > 		ElementPrepared
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Object > 		EraseAllClicked
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBarEraserFlyoutItemClickedEventArgs,
Object > 		EraserFlyoutItemClicked
unsealed runtimeclass | Expander
runtimeclass | ExpanderTemplateSettings
event Windows Foundation
TypedEventHandler< Expander,
ExpanderExpandingEventArgs > 		Expanding
event Windows Foundation
TypedEventHandler< ScrollView,
Object > 		ExtentChanged
Microsoft UI Xaml DataTemplate | FallbackContent
Microsoft UI Xaml Input ICommand | FirstButtonCommand
Microsoft UI Xaml Style | FirstButtonStyle
PagerControlButtonVisibility FirstButtonVisibility
runtimeclass | FlowLayout
runtimeclass | FlowLayoutState
String | GroupName
Object | Header
Microsoft UI Xaml DataTemplate | HeaderTemplate
Microsoft UI Xaml UIElement | HeroContent
TeachingTipHeroContentPlacementMode HeroContentPlacement
Microsoft UI Xaml Controls
IconElement 		IconElement
IconSource IconSource
unsealed runtimeclass | ImageIcon
unsealed runtimeclass | ImageIconSource
runtimeclass | IndexPath
unsealed runtimeclass | InfoBadge
Microsoft UI Xaml CornerRadius | InfoBadgeCornerRadius
unsealed runtimeclass | InfoBadgeTemplateSettings
Microsoft UI Xaml Controls
InkToolBarInitialControls 		InitialControls
unsealed runtimeclass | InkCanvas
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Object > 		InkDrawingAttributesChanged
unsealed runtimeclass | InkToolBar
unsealed runtimeclass | InkToolBarBallpointPenButton
unsealed runtimeclass | InkToolBarCustomPen
unsealed runtimeclass | InkToolBarCustomPenButton
unsealed runtimeclass | InkToolBarCustomToggleButton
unsealed runtimeclass | InkToolBarCustomToolButton
unsealed runtimeclass | InkToolBarEraserButton
unsealed runtimeclass | InkToolBarFlyoutItem
unsealed runtimeclass | InkToolBarHighlighterButton
unsealed runtimeclass | InkToolBarMenuButton
unsealed runtimeclass | InkToolBarPenButton
unsealed runtimeclass | InkToolBarPencilButton
unsealed runtimeclass | InkToolBarPenConfigurationControl
unsealed runtimeclass | InkToolBarStencilButton
unsealed runtimeclass | InkToolBarToggleButton
unsealed runtimeclass | InkToolBarToolButton
Boolean | IsChecked
Boolean | IsClearAllVisible
Boolean | IsExtensionGlyphShown
Boolean | IsLightDismissEnabled
Boolean | IsOpen
Boolean | IsProtractorItemVisible
Boolean | IsRulerButtonChecked
Boolean | IsRulerItemVisible
Boolean | IsStencilButtonChecked
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Microsoft.UI.Xaml.Controls.InkToolBarIsStencilButtonCheckedChangedEventArgs > 		IsStencilButtonCheckedChanged
Boolean | IsStrokeEraserVisible
Boolean | IsWrapEnabled
runtimeclass | ItemCollectionTransition
runtimeclass | ItemCollectionTransitionProgress
runtimeclass | ItemCollectionTransitionProvider
runtimeclass | ItemsRepeater
runtimeclass | ItemsRepeaterElementClearingEventArgs
runtimeclass | ItemsRepeaterElementIndexChangedEventArgs
runtimeclass | ItemsRepeaterElementPreparedEventArgs
runtimeclass | ItemsRepeaterScrollHost
Object | ItemsSource
runtimeclass | ItemsSourceView
Object | ItemTemplate
Microsoft UI Xaml Controls
InkToolBarFlyoutItemKind 		Kind
Double | LargeChange
Microsoft UI Xaml Input ICommand | LastButtonCommand
Microsoft UI Xaml Style | LastButtonStyle
PagerControlButtonVisibility LastButtonVisibility
runtimeclass | Layout
runtimeclass | LayoutContext
unsealed runtimeclass | LayoutPanel
runtimeclass | LinedFlowLayout
runtimeclass | LinedFlowLayoutItemCollectionTransitionProvider
runtimeclass | LinedFlowLayoutItemsInfoRequestedEventArgs
unsealed runtimeclass | MapControl
unsealed runtimeclass | MapElement
event Windows Foundation
TypedEventHandler< MapControl,
MapElementClickEventArgs > 		MapElementClick
unsealed runtimeclass | MapLayer
event Windows Foundation
TypedEventHandler< MapControl,
MapControlMapServiceErrorOccurredEventArgs > 		MapServiceErrorOccurred
Int32 | MaxColumns
Double | Maximum
Double | MaxStrokeWidth
Int32 | MaxVisiblePips
unsealed runtimeclass | MenuBar
unsealed runtimeclass | MenuBarItem
unsealed runtimeclass | MenuBarItemFlyout
Double | Minimum
Double | MinStrokeWidth
event Windows Foundation
TypedEventHandler< TwoPaneView,
Object > 		ModeChanged
Microsoft UI Xaml Input ICommand | NextButtonCommand
Microsoft UI Xaml Style | NextButtonStyle
PagerControlButtonVisibility NextButtonVisibility
Microsoft UI Xaml Style | NormalPipStyle
unsealed runtimeclass | NumberBox
Windows Globalization
NumberFormatting
INumberFormatter2 		NumberFormatter
Int32 | NumberOfPages
Microsoft UI Xaml Controls
Orientation 		Orientation
unsealed runtimeclass | PagerControl
unsealed runtimeclass | PagerControlTemplateSettings
Microsoft UI Xaml Input ICommand | PagerInputCommand
event Windows Foundation
TypedEventHandler< TitleBar,
Object > 		PaneToggleRequested
unsealed runtimeclass | ParallaxView
unsealed runtimeclass | PersonPicture
runtimeclass | PersonPictureTemplateSettings
unsealed runtimeclass | PipsPager
runtimeclass | PipsPagerTemplateSettings
Microsoft UI Xaml Thickness | PlacementMargin
Double | PlaybackRate
TeachingTipPlacementMode PreferredPlacement
String | PrefixText
Boolean | PreventKeyboardDisplayOnProgrammaticFocus
Microsoft UI Xaml Input ICommand | PreviousButtonCommand
Microsoft UI Xaml Style | PreviousButtonStyle
PagerControlButtonVisibility PreviousButtonVisibility
unsealed runtimeclass | ProgressBar
runtimeclass | ProgressBarTemplateSettings
unsealed runtimeclass | ProgressRing
runtimeclass | ProgressRingTemplateSettings
unsealed runtimeclass | RadioButtons
unsealed runtimeclass | RadioMenuFlyoutItem
unsealed runtimeclass | RatingControl
unsealed runtimeclass | RatingItemFontInfo
unsealed runtimeclass | RatingItemImageInfo
unsealed runtimeclass | RatingItemInfo
runtimeclass | RecyclePool
runtimeclass | RecyclingElementFactory
unsealed runtimeclass | RefreshContainer
event Windows Foundation
TypedEventHandler
< RefreshContainer,
RefreshRequestedEventArgs > 		RefreshRequested
unsealed runtimeclass | RevealListViewItemPresenter
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingScrollAnimationStartingEventArgs > 		ScrollAnimationStarting
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingScrollCompletedEventArgs > 		ScrollCompleted
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingScrollStartingEventArgs > 		ScrollStarting
unsealed runtimeclass | ScrollView
Int32 | SelectedBrushIndex
Int32 | SelectedIndex
event Windows Foundation
TypedEventHandler
< PagerControl,
PagerControlSelectedIndexChangedEventArgs > 		SelectedIndexChanged
Object | SelectedItem
Int32 | SelectedPageIndex
Microsoft UI Xaml Style | SelectedPipStyle
Microsoft UI Xaml Controls
InkToolBarStencilKind 		SelectedStencil
Double | SelectedStrokeWidth
event Microsoft UI Xaml
Controls
SelectionChangedEventHandler 		SelectionChanged
Microsoft UI Xaml Controls
Primitives FlyoutBase 		SelectionFlyout
Microsoft UI Xaml Media
SolidColorBrush 		SelectionHighlightColor
runtimeclass | SelectionModel
runtimeclass | SelectionModelChildrenRequestedEventArgs
runtimeclass | SelectionModelSelectionChangedEventArgs
runtimeclass | SelectTemplateEventArgs
Boolean | ShouldConstrainToRootBounds
Double | SmallChange
IAnimatedVisualSource Source
runtimeclass | StackLayout
runtimeclass | StackLayoutState
event Windows Foundation
TypedEventHandler< ScrollView,
Object > 		StateChanged
Microsoft UI Xaml Media Stretch | Stretch
String | Subtitle
String | SuffixText
runtimeclass | SwipeControl
runtimeclass | SwipeItem
runtimeclass | SwipeItemInvokedEventArgs
runtimeclass | SwipeItems
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabCloseRequestedEventArgs > 		TabCloseRequested
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabDragCompletedEventArgs > 		TabDragCompleted
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabDragStartingEventArgs > 		TabDragStarting
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabDroppedOutsideEventArgs > 		TabDroppedOutside
event Windows Foundation
TypedEventHandler< TabView,
Windows.Foundation.Collections.IVectorChangedEventArgs > 		TabItemsChanged
Object | TabItemsSource
Microsoft UI Xaml DataTemplate | TabItemTemplate
event Microsoft UI Xaml
DragEventHandler 		TabStripDragOver
event Microsoft UI Xaml
DragEventHandler 		TabStripDrop
unsealed runtimeclass | TabView
unsealed runtimeclass | TabViewItem
unsealed runtimeclass | TabViewItemTemplateSettings
TeachingTipTailVisibility TailVisibility
Microsoft UI Xaml FrameworkElement | Target
Microsoft UI Xaml Controls
InkCanvas 		TargetInkCanvas
Object | TargetInkPresenter
unsealed runtimeclass | TeachingTip
unsealed runtimeclass | TeachingTipTemplateSettings
String | Text
unsealed runtimeclass | TextCommandBarFlyout
String | Title
unsealed runtimeclass | TitleBar
unsealed runtimeclass | TitleBarAutomationPeer
unsealed runtimeclass | TitleBarTemplateSettings
Microsoft UI Xaml Thickness | TopLeftHighlightMargin
Microsoft UI Xaml Thickness | TopRightHighlightMargin
unsealed runtimeclass | TwoPaneView
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBarFlyoutItem,
Object > 		Unchecked
runtimeclass | UniformGridLayout
runtimeclass | UniformGridLayoutState
NumberBoxValidationMode ValidationMode
event Windows Foundation
TypedEventHandler< NumberBox,
NumberBoxValueChangedEventArgs > 		ValueChanged
event Windows Foundation
TypedEventHandler< ScrollView,
Object > 		ViewChanged
runtimeclass | VirtualizingLayout
runtimeclass | VirtualizingLayoutContext
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingZoomAnimationStartingEventArgs > 		ZoomAnimationStarting
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingZoomCompletedEventArgs > 		ZoomCompleted
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingZoomStartingEventArgs > 		ZoomStarting

Enumeration Type Documentation

enum AnnotatedScrollBarScrollingEventKind
Enumerator:
Click
Drag
IncrementButton
DecrementButton

Definition at line 5 of file AnnotatedScrollBar.idl.

{
    Click = 0,
    Drag = 1,
    IncrementButton = 2,
    DecrementButton = 3,
};

enum ColorPickerHsvChannel
Enumerator:
Hue
Saturation
Value
Alpha

Definition at line 25 of file Common.idl.

{
    Hue = 0,
    Saturation = 1,
    Value = 2,
    Alpha = 3,
};

enum ColorSpectrumComponents
Enumerator:
HueValue
ValueHue
HueSaturation
SaturationHue
SaturationValue
ValueSaturation

Definition at line 13 of file Common.idl.

{
    HueValue = 0,
    ValueHue = 1,
    HueSaturation = 2,
    SaturationHue = 3,
    SaturationValue = 4,
    ValueSaturation = 5,
};

enum ColorSpectrumShape
Enumerator:
Box
Ring

Definition at line 5 of file Common.idl.

{
    Box = 0,
    Ring = 1,
};

enum ElementRealizationOptions
Enumerator:
None
ForceCreate
SuppressAutoRecycle

Definition at line 57 of file ItemsRepeater.idl.

{
    None = 0,
    ForceCreate = 1,
    SuppressAutoRecycle = 2
};

enum ExpandDirection
Enumerator:
Down
Up

Definition at line 45 of file Expander.idl.

{
    Down = 0,
    Up = 1
};

enum FlowLayoutLineAlignment
Enumerator:
Start
Center
End
SpaceAround
SpaceBetween
SpaceEvenly

Definition at line 75 of file ItemsRepeater.idl.

{
    Start = 0,
    Center = 1,
    End = 2,
    SpaceAround = 3,
    SpaceBetween = 4,
    SpaceEvenly = 5
};

enum IndexBasedLayoutOrientation
Enumerator:
None
TopToBottom
LeftToRight

Definition at line 66 of file ItemsRepeater.idl.

{
    None = 0,
    TopToBottom = 1,
    LeftToRight = 2,
};

enum InfoBarCloseReason
Enumerator:
CloseButton
Programmatic

Definition at line 5 of file InfoBar.idl.

{
    CloseButton = 0,
    Programmatic = 1
};

enum InfoBarSeverity
Enumerator:
Informational
Success
Warning
Error

Definition at line 13 of file InfoBar.idl.

{
    Informational = 0,
    Success = 1,
    Warning = 2,
    Error = 3,
};

enum InkToolBarButtonFlyoutPlacement
Enumerator:
Auto
Top
Bottom
Left
Right

Definition at line 3 of file InkToolBar.idl.

    {
        Auto,
        Top,
        Bottom,
        Left,
        Right,
    };

enum InkToolBarEraserFlyoutItemKind
Enumerator:
StrokeEraser
PrecisionSmallEraser
PrecisionLargeEraser
ClearAll

Definition at line 13 of file InkToolBar.idl.

    {
        StrokeEraser,
        PrecisionSmallEraser,
        PrecisionLargeEraser,
        ClearAll,
    };

enum InkToolBarEraserKind
Enumerator:
Stroke
PrecisionSmall
PrecisionLarge

Definition at line 22 of file InkToolBar.idl.

    {
        Stroke,
        PrecisionSmall,
        PrecisionLarge,
    };

enum InkToolBarFlyoutItemKind
Enumerator:
Simple
Radio
Check
RadioCheck

Definition at line 30 of file InkToolBar.idl.

    {
        Simple,
        Radio,
        Check,
        RadioCheck,
    };

enum InkToolBarInitialControls
Enumerator:
All
None
PensOnly
AllExceptPens

Definition at line 39 of file InkToolBar.idl.

    {
        All,
        None,
        PensOnly,
        AllExceptPens,
    };

enum InkToolBarMenuKind
Enumerator:
Stencil

Definition at line 48 of file InkToolBar.idl.

    {
        Stencil,
    };

enum InkToolBarStencilKind
Enumerator:
Ruler
Protractor

Definition at line 54 of file InkToolBar.idl.

    {
        Ruler,
        Protractor,
    };

enum InkToolBarToggle
Enumerator:
Ruler
Custom

Definition at line 61 of file InkToolBar.idl.

    {
        Ruler,
        Custom,
    };

enum InkToolBarTool
Enumerator:
BallpointPen
Pencil
Highlighter
Eraser
CustomTool

Definition at line 68 of file InkToolBar.idl.

    {
        BallpointPen,
        Pencil,
        Highlighter,
        Eraser,
        CustomPen,
        CustomTool,
    };

enum ItemCollectionTransitionOperation
Enumerator:
Add
Remove
Move

Definition at line 47 of file ItemsRepeater.idl.

{
    Add = 0,
    Remove = 1,
    Move = 2
};

enum ItemCollectionTransitionTriggers
Enumerator:
CollectionChangeAdd
CollectionChangeRemove
CollectionChangeReset
LayoutTransition

Definition at line 37 of file ItemsRepeater.idl.

{
    CollectionChangeAdd = 1,
    CollectionChangeRemove = 2,
    CollectionChangeReset = 4,
    LayoutTransition = 8,
};

enum ItemContainerInteractionTrigger
Enumerator:
PointerPressed
PointerReleased
Tap
DoubleTap
EnterKey
SpaceKey
AutomationInvoke

Definition at line 16 of file ItemContainer.idl.

{
    PointerPressed,
    PointerReleased,
    Tap,
    DoubleTap,
    EnterKey,
    SpaceKey,
    AutomationInvoke
};

enum ItemContainerMultiSelectMode
Enumerator:
Auto
Single
Extended
Multiple

Definition at line 6 of file ItemContainer.idl.

{
    Auto = 1,
    Single = 2,
    Extended = 4,
    Multiple = 8
};

enum ItemContainerUserInvokeMode
Enumerator:
Auto
UserCanInvoke
UserCannotInvoke

Definition at line 30 of file ItemContainer.idl.

{
    Auto = 1,
    UserCanInvoke = 2,
    UserCannotInvoke = 4,
};

enum ItemContainerUserSelectMode
Enumerator:
Auto
UserCanSelect
UserCannotSelect

Definition at line 40 of file ItemContainer.idl.

{
    Auto = 1,
    UserCanSelect = 2,
    UserCannotSelect = 4,
};

enum ItemsViewSelectionMode
Enumerator:
None
Single
Multiple
Extended

Definition at line 5 of file ItemsView.idl.

{
    None = 0,
    Single = 1,
    Multiple = 2,
    Extended = 3,
};

enum LinedFlowLayoutItemsJustification
Enumerator:
Start
Center
End
SpaceAround
SpaceBetween
SpaceEvenly

Definition at line 108 of file ItemsRepeater.idl.

{
    Start = 0,
    Center = 1,
    End = 2,
    SpaceAround = 3,
    SpaceBetween = 4,
    SpaceEvenly = 5
};

enum LinedFlowLayoutItemsStretch
Enumerator:
None
Fill

Definition at line 120 of file ItemsRepeater.idl.

{
    None = 0,
    Fill = 1
};

enum NavigationViewBackButtonVisible
Enumerator:
Visible
Auto

Definition at line 14 of file NavigationView.idl.

{
    Collapsed = 0,
    Visible = 1,
    Auto = 2,
};

enum NavigationViewDisplayMode
Enumerator:
Minimal
Compact
Expanded

Definition at line 5 of file NavigationView.idl.

{
    Minimal = 0,
    Compact = 1,
    Expanded = 2,
};

enum NavigationViewOverflowLabelMode
Enumerator:
MoreLabel
NoLabel

Definition at line 51 of file NavigationView.idl.

{
    MoreLabel = 0,
    NoLabel = 1
};

enum NavigationViewPaneDisplayMode
Enumerator:
Auto
Left
Top
LeftCompact
LeftMinimal

Definition at line 23 of file NavigationView.idl.

{
    Auto = 0,
    Left = 1,
    Top = 2,
    LeftCompact = 3,
    LeftMinimal = 4
};

enum NavigationViewSelectionFollowsFocus
Enumerator:
Disabled
Enabled

Definition at line 34 of file NavigationView.idl.

{
    Disabled = 0,
    Enabled = 1
};

enum NavigationViewShoulderNavigationEnabled
Enumerator:
WhenSelectionFollowsFocus
Always
Never

Definition at line 42 of file NavigationView.idl.

{
    WhenSelectionFollowsFocus = 0,
    Always = 1,
    Never = 2
};

enum NumberBoxSpinButtonPlacementMode
Enumerator:
Hidden
Compact
Inline

Definition at line 5 of file NumberBox.idl.

{
    Hidden,
    Compact,
    Inline
};

enum NumberBoxValidationMode
Enumerator:
InvalidInputOverwritten
Disabled

Definition at line 14 of file NumberBox.idl.

{
    InvalidInputOverwritten,
    Disabled
};

enum PagerControlButtonVisibility
Enumerator:
Visible
HiddenOnEdge
Hidden

Definition at line 14 of file PagerControl.idl.

{
    Visible,
    HiddenOnEdge,
    Hidden,
};

enum PagerControlDisplayMode
Enumerator:
Auto
ComboBox
ButtonPanel

Definition at line 4 of file PagerControl.idl.

{
    Auto,
    ComboBox,
    NumberBox,
    ButtonPanel,
};

enum ParallaxSourceOffsetKind
Enumerator:
Absolute
Relative

Definition at line 5 of file ParallaxView.idl.

{
    Absolute = 0,
    Relative = 1,
};

enum PipsPagerButtonVisibility
Enumerator:
Visible
VisibleOnPointerOver

Definition at line 5 of file PipsPager.idl.

{
    Visible,
    VisibleOnPointerOver,
    Collapsed
};

enum PipsPagerWrapMode
Enumerator:
None
Wrap

Definition at line 14 of file PipsPager.idl.

{
    None,
    Wrap
};

enum PlayerAnimationOptimization
Enumerator:
Latency
Resources

Definition at line 65 of file AnimatedVisualPlayer.idl.

{
    Latency,
    Resources
};

enum RefreshPullDirection
Enumerator:
LeftToRight
TopToBottom
RightToLeft
BottomToTop

Definition at line 5 of file RefreshContainer.idl.

{
    LeftToRight = 0,
    TopToBottom = 1,
    RightToLeft = 2,
    BottomToTop = 3,
};

enum RefreshVisualizerOrientation
Enumerator:
Auto
Normal
Rotate90DegreesCounterclockwise
Rotate270DegreesCounterclockwise

Definition at line 5 of file RefreshVisualizer.idl.

{
    Auto = 0,
    Normal = 1,
    Rotate90DegreesCounterclockwise = 2,
    Rotate270DegreesCounterclockwise = 3,
};

enum RefreshVisualizerState
Enumerator:
Idle
Peeking
Interacting
Pending
Refreshing

Definition at line 15 of file RefreshVisualizer.idl.

{
    Idle = 0,
    Peeking = 1,
    Interacting = 2,
    Pending = 3,
    Refreshing = 4,
};

enum ScrollingAnimationMode
Enumerator:
Disabled
Enabled
Auto

Definition at line 73 of file ScrollPresenter.idl.

{
   Disabled = 0,
   Enabled = 1,
   Auto = 2,
};

enum ScrollingChainMode
Enumerator:
Auto
Always
Never

Definition at line 42 of file ScrollPresenter.idl.

{
    Auto = 0,
    Always = 1,
    Never = 2,
};

enum ScrollingContentOrientation
Enumerator:
Vertical
Horizontal
None
Both

Definition at line 5 of file ScrollPresenter.idl.

{
    Vertical = 0,
    Horizontal = 1,
    None = 2,
    Both = 3,
};

enum ScrollingInputKinds
Enumerator:
None
Touch
Pen
MouseWheel
Keyboard
Gamepad
All

Definition at line 60 of file ScrollPresenter.idl.

{
    None = 0,
    Touch = 1,
    Pen = 2,
    MouseWheel = 4,
    Keyboard = 8,
    Gamepad = 16,
    All = 255,
};

enum ScrollingInteractionState
Enumerator:
Idle
Interaction
Inertia
Animation

Definition at line 15 of file ScrollPresenter.idl.

{
    Idle = 0,
    Interaction = 1,
    Inertia = 2,
    Animation = 3,
};

enum ScrollingRailMode
Enumerator:
Enabled
Disabled

Definition at line 51 of file ScrollPresenter.idl.

{
    Enabled = 0,
    Disabled = 1,
};

enum ScrollingScrollBarVisibility
Enumerator:
Auto
Visible
Hidden

Definition at line 5 of file ScrollView.idl.

{
    Auto = 0,
    Visible = 1,
    Hidden = 2,
};

enum ScrollingScrollMode
Enumerator:
Enabled
Disabled
Auto

Definition at line 25 of file ScrollPresenter.idl.

{
    Enabled = 0,
    Disabled = 1,
    Auto = 2,
};

enum ScrollingSnapPointsMode
Enumerator:
Default
Ignore

Definition at line 82 of file ScrollPresenter.idl.

{
    Default = 0,
    Ignore = 1,
};

enum ScrollingZoomMode
Enumerator:
Enabled
Disabled

Definition at line 34 of file ScrollPresenter.idl.

{
    Enabled = 0,
    Disabled = 1,
};

enum SwipeBehaviorOnInvoked
Enumerator:
Auto
Close
RemainOpen

Definition at line 10 of file SwipeControl.idl.

{
    Auto = 0,
    Close = 1,
    RemainOpen = 2,
};

enum SwipeMode
Enumerator:
Reveal
Execute

Definition at line 19 of file SwipeControl.idl.

{
    Reveal = 0,
    Execute = 1,
};

enum TabViewCloseButtonOverlayMode
Enumerator:
Auto
OnPointerOver
Always

Definition at line 14 of file TabView.idl.

{
    Auto = 0,
    OnPointerOver = 1,
    Always = 2,
};

enum TabViewWidthMode
Enumerator:
Equal
SizeToContent
Compact

Definition at line 5 of file TabView.idl.

{
    Equal = 0,
    SizeToContent = 1,
    Compact = 2,
};

enum TeachingTipCloseReason
Enumerator:
CloseButton
LightDismiss
Programmatic

Definition at line 14 of file TeachingTip.idl.

{
    CloseButton,
    LightDismiss,
    Programmatic,
};

enum TeachingTipHeroContentPlacementMode
Enumerator:
Auto
Top
Bottom

Definition at line 43 of file TeachingTip.idl.

{
    Auto,
    Top,
    Bottom,
};

enum TeachingTipPlacementMode
Enumerator:
Auto
Top
Bottom
Left
Right
TopRight
TopLeft
BottomRight
BottomLeft
LeftTop
LeftBottom
RightTop
RightBottom
Center

Definition at line 23 of file TeachingTip.idl.

{
    Auto,
    Top,
    Bottom,
    Left,
    Right,
    TopRight,
    TopLeft,
    BottomRight,
    BottomLeft,
    LeftTop,
    LeftBottom,
    RightTop,
    RightBottom,
    Center
};

enum TeachingTipTailVisibility
Enumerator:
Auto
Visible

Definition at line 5 of file TeachingTip.idl.

{
    Auto,
    Visible,
    Collapsed,
};

enum TreeViewSelectionMode
Enumerator:
None
Single
Multiple

Definition at line 5 of file TreeView.idl.

{
    None = 0,
    Single = 1,
    Multiple = 2,
};

enum TwoPaneViewMode
Enumerator:
SinglePane
Wide
Tall

Definition at line 13 of file TwoPaneView.idl.

{
    SinglePane = 0,
    Wide = 1,
    Tall = 2,
};

enum TwoPaneViewPriority
Enumerator:
Pane1
Pane2

Definition at line 5 of file TwoPaneView.idl.

{
    Pane1 = 0,
    Pane2 = 1,
};

enum TwoPaneViewTallModeConfiguration
Enumerator:
SinglePane
TopBottom
BottomTop

Definition at line 31 of file TwoPaneView.idl.

{
    SinglePane = 0,
    TopBottom = 1,
    BottomTop = 2,
};

enum TwoPaneViewWideModeConfiguration
Enumerator:
SinglePane
LeftRight
RightLeft

Definition at line 22 of file TwoPaneView.idl.

{
    SinglePane = 0,
    LeftRight = 1,
    RightLeft = 2,
};

enum UniformGridLayoutItemsJustification
Enumerator:
Start
Center
End
SpaceAround
SpaceBetween
SpaceEvenly

Definition at line 87 of file ItemsRepeater.idl.

{
    Start = 0,
    Center = 1,
    End = 2,
    SpaceAround = 3,
    SpaceBetween = 4,
    SpaceEvenly = 5
};

enum UniformGridLayoutItemsStretch
Enumerator:
None
Fill
Uniform

Definition at line 99 of file ItemsRepeater.idl.

{
    None = 0,
    Fill = 1,
    Uniform = 2
};

Function Documentation

Int32 MU_XC_NAMESPACE::AddScrollVelocity | ( | Windows.Foundation.Numerics.Vector2 | offsetsVelocity,
 |  | Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > | inertiaDecayRate
 | ) |  |
Int32 MU_XC_NAMESPACE::AddZoomVelocity | ( | Single | zoomFactorVelocity,
 |  | Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > | centerPoint,
 |  | Windows.Foundation.IReference< Single > | inertiaDecayRate
 | ) |  |
Microsoft UI Xaml DependencyObject ContainerFromIndex ( Int32 index )
Microsoft UI Xaml DependencyObject MU_XC_NAMESPACE::ContainerFromItem ( Object item )
Windows UI Input Inking InkDrawingAttributes MU_XC_NAMESPACE::CreateInkDrawingAttributes | ( | Microsoft.UI.Xaml.Media.Brush | brush,
 |  | Double | strokeWidth
 | ) |  |
overridable Windows UI Input Inking InkDrawingAttributes MU_XC_NAMESPACE::CreateInkDrawingAttributesCore | ( | Microsoft.UI.Xaml.Media.Brush | brush,
 |  | Double | strokeWidth
 | ) |  |
delegate void MU_XC_NAMESPACE::DoInkPresenterWork ( Windows.UI.Input.Inking.InkPresenter presenter )
Object MU_XC_NAMESPACE::GetAt ( Int32 index )
Int32 MU_XC_NAMESPACE::GetElementIndex ( Microsoft.UI.Xaml.UIElement element )
Microsoft UI Xaml Controls InkToolBarMenuButton MU_XC_NAMESPACE::GetMenuButton ( Microsoft.UI.Xaml.Controls.InkToolBarMenuKind menu )
Microsoft UI Xaml UIElement MU_XC_NAMESPACE::GetOrCreateElement ( Int32 index )
Microsoft UI Xaml Controls InkToolBarToggleButton MU_XC_NAMESPACE::GetToggleButton ( Microsoft.UI.Xaml.Controls.InkToolBarToggle tool )
Microsoft UI Xaml Controls InkToolBarToolButton MU_XC_NAMESPACE::GetToolButton ( Microsoft.UI.Xaml.Controls.InkToolBarTool tool )
Int32 MU_XC_NAMESPACE::IndexFromKey ( String key )
Int32 MU_XC_NAMESPACE::IndexOf ( IInspectable item )
String MU_XC_NAMESPACE::KeyFromIndex ( Int32 index )
void MU_XC_NAMESPACE::Pause ( )
Windows Foundation IAsyncAction MU_XC_NAMESPACE::PlayAsync | ( | Double | fromProgress,
 |  | Double | toProgress,
 |  | Boolean | looped
 | ) |  |
Windows Foundation IAsyncAction MU_XC_NAMESPACE::QueueInkPresenterWorkItem ( DoInkPresenterWork workItem )
void MU_XC_NAMESPACE::RefreshAutomaticHorizontalOffsets ( )
void MU_XC_NAMESPACE::RefreshAutomaticVerticalOffsets ( )
void MU_XC_NAMESPACE::RegisterAnchorCandidate ( Microsoft.UI.Xaml.UIElement element )
void MU_XC_NAMESPACE::RequestRefresh ( )
void MU_XC_NAMESPACE::Resume ( )
Int32 MU_XC_NAMESPACE::ScrollBy | ( | Double | horizontalOffsetDelta,
 |  | Double | verticalOffsetDelta,
 |  | ScrollingScrollOptions | options
 | ) |  |
Int32 MU_XC_NAMESPACE::ScrollBy | ( | Double | horizontalOffsetDelta,
 |  | Double | verticalOffsetDelta
 | ) |  |
Int32 MU_XC_NAMESPACE::ScrollTo | ( | Double | horizontalOffset,
 |  | Double | verticalOffset,
 |  | ScrollingScrollOptions | options
 | ) |  |
Int32 MU_XC_NAMESPACE::ScrollTo | ( | Double | horizontalOffset,
 |  | Double | verticalOffset
 | ) |  |
void MU_XC_NAMESPACE::SetProgress ( Double progress )
void MU_XC_NAMESPACE::Stop ( )
Microsoft UI Xaml UIElement MU_XC_NAMESPACE::TryGetElement ( Int32 index )
void MU_XC_NAMESPACE::UnregisterAnchorCandidate ( Microsoft.UI.Xaml.UIElement element )
Int32 MU_XC_NAMESPACE::ZoomBy | ( | Single | zoomFactorDelta,
 |  | Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > | centerPoint
 | ) |  |
Int32 MU_XC_NAMESPACE::ZoomBy | ( | Single | zoomFactorDelta,
 |  | Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > | centerPoint,
 |  | ScrollingZoomOptions | options
 | ) |  |
Int32 MU_XC_NAMESPACE::ZoomTo | ( | Single | zoomFactor,
 |  | Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > | centerPoint,
 |  | ScrollingZoomOptions | options
 | ) |  |
Int32 MU_XC_NAMESPACE::ZoomTo | ( | Single | zoomFactor,
 |  | Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > | centerPoint
 | ) |  |

Variable Documentation

Boolean AcceptsExpression

Definition at line 92 of file NumberBox.idl.

event Windows Foundation TypedEventHandler<TeachingTip, Object> ActionButtonClick

Definition at line 125 of file TeachingTip.idl.

Microsoft UI Xaml Input ICommand ActionButtonCommand

Definition at line 104 of file TeachingTip.idl.

Object ActionButtonCommandParameter

Definition at line 105 of file TeachingTip.idl.

Object ActionButtonContent

Definition at line 102 of file TeachingTip.idl.

Microsoft UI Xaml Style ActionButtonStyle

Definition at line 103 of file TeachingTip.idl.

Microsoft UI Xaml Controls InkToolBarToolButton ActiveTool

Definition at line 111 of file InkToolBar.idl.

event Windows Foundation TypedEventHandler<Microsoft.UI.Xaml.Controls.InkToolBar,Object> ActiveToolChanged

Definition at line 120 of file InkToolBar.idl.

event Windows Foundation TypedEventHandler<TabView, Object> AddTabButtonClick

Definition at line 128 of file TabView.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingAnchorRequestedEventArgs> AnchorRequested

Definition at line 134 of file ScrollView.idl.

unsealed runtimeclass AnimatedIcon

Definition at line 10 of file AnimatedIcon.idl.

unsealed runtimeclass AnimatedIconSource

Definition at line 10 of file IconSource.idl.

unsealed runtimeclass AnimatedVisualPlayer

Definition at line 78 of file AnimatedVisualPlayer.idl.

Boolean ArePrecisionErasersVisible

Definition at line 232 of file InkToolBar.idl.

Boolean AutoPlay

Definition at line 90 of file AnimatedVisualPlayer.idl.

event Windows Foundation TypedEventHandler<TitleBar, Object> BackRequested

Definition at line 13 of file TitleBar.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingBringingIntoViewEventArgs> BringingIntoView

Definition at line 133 of file ScrollView.idl.

Microsoft UI Xaml Controls InkToolBarButtonFlyoutPlacement ButtonFlyoutPlacement

Definition at line 117 of file InkToolBar.idl.

Boolean ButtonPanelAlwaysShowFirstLastPageIndex

Definition at line 71 of file PagerControl.idl.

event Windows Foundation TypedEventHandler<Microsoft.UI.Xaml.Controls.InkToolBarFlyoutItem,Object> Checked

Definition at line 156 of file InkToolBar.idl.

event Windows Foundation TypedEventHandler<TeachingTip, Object> CloseButtonClick

Definition at line 128 of file TeachingTip.idl.

Microsoft UI Xaml Input ICommand CloseButtonCommand

Definition at line 109 of file TeachingTip.idl.

Object CloseButtonCommandParameter

Definition at line 110 of file TeachingTip.idl.

Object CloseButtonContent

Definition at line 107 of file TeachingTip.idl.

Microsoft UI Xaml Style CloseButtonStyle

Definition at line 108 of file TeachingTip.idl.

event Windows Foundation TypedEventHandler<TeachingTip, TeachingTipClosedEventArgs> Closed

Definition at line 130 of file TeachingTip.idl.

event Windows Foundation TypedEventHandler<TabViewItem, TabViewTabCloseRequestedEventArgs> CloseRequested

Definition at line 210 of file TabView.idl.

event Windows Foundation TypedEventHandler<TeachingTip, TeachingTipClosingEventArgs> Closing

Definition at line 129 of file TeachingTip.idl.

Collapsed = 0

Definition at line 31 of file Expander.idl.

event Windows Foundation TypedEventHandler<ColorPicker, ColorChangedEventArgs> ColorChanged

Definition at line 13 of file ColorPicker.idl.

unsealed runtimeclass ColorPicker

Definition at line 10 of file ColorPicker.idl.

unsealed runtimeclass CommandBarFlyout

Definition at line 9 of file CommandBarFlyout.idl.

Microsoft UI Xaml UIElement ConfigurationContent

Definition at line 221 of file InkToolBar.idl.

CustomPen

Definition at line 271 of file InkToolBar.idl.

Object Description

Definition at line 78 of file NumberBox.idl.

PagerControlDisplayMode DisplayMode

Definition at line 49 of file PagerControl.idl.

unsealed runtimeclass DropDownButton

Definition at line 8 of file DropDownButton.idl.

event Windows Foundation TypedEventHandler<ItemsRepeater, ItemsRepeaterElementClearingEventArgs> ElementClearing

Definition at line 187 of file ItemsRepeater.idl.

unsealed runtimeclass ElementFactory

Definition at line 6 of file ItemsRepeater.idl.

event Windows Foundation TypedEventHandler<ItemsRepeater, ItemsRepeaterElementIndexChangedEventArgs> ElementIndexChanged

Definition at line 188 of file ItemsRepeater.idl.

event Windows Foundation TypedEventHandler<ItemsRepeater, ItemsRepeaterElementPreparedEventArgs> ElementPrepared

Definition at line 186 of file ItemsRepeater.idl.

event Windows Foundation TypedEventHandler<Microsoft.UI.Xaml.Controls.InkToolBar,Object> EraseAllClicked

Definition at line 122 of file InkToolBar.idl.

event Windows Foundation TypedEventHandler<Microsoft.UI.Xaml.Controls.InkToolBarEraserFlyoutItemClickedEventArgs,Object> EraserFlyoutItemClicked

Definition at line 123 of file InkToolBar.idl.

unsealed runtimeclass Expander

Definition at line 9 of file Expander.idl.

runtimeclass ExpanderTemplateSettings

Definition at line 9 of file Expander.idl.

event Windows Foundation TypedEventHandler<Expander, ExpanderExpandingEventArgs> Expanding

Definition at line 19 of file Expander.idl.

event Windows Foundation TypedEventHandler<ScrollView, Object> ExtentChanged

Definition at line 126 of file ScrollView.idl.

Microsoft UI Xaml DataTemplate FallbackContent

Definition at line 86 of file AnimatedVisualPlayer.idl.

Microsoft UI Xaml Input ICommand FirstButtonCommand

Definition at line 59 of file PagerControl.idl.

Microsoft UI Xaml Style FirstButtonStyle

Definition at line 65 of file PagerControl.idl.

PagerControlButtonVisibility FirstButtonVisibility

Definition at line 54 of file PagerControl.idl.

runtimeclass FlowLayout

Definition at line 26 of file ItemsRepeater.idl.

runtimeclass FlowLayoutState

Definition at line 25 of file ItemsRepeater.idl.

String GroupName

Definition at line 13 of file RadioMenuFlyoutItem.idl.

Object Header

Definition at line 58 of file NumberBox.idl.

Microsoft UI Xaml DataTemplate HeaderTemplate

Definition at line 59 of file NumberBox.idl.

Microsoft UI Xaml UIElement HeroContent

Definition at line 122 of file TeachingTip.idl.

TeachingTipHeroContentPlacementMode HeroContentPlacement

Definition at line 120 of file TeachingTip.idl.

Microsoft UI Xaml Controls IconElement IconElement

Definition at line 11 of file InfoBadge.idl.

IconSource IconSource

Definition at line 28 of file InfoBadge.idl.

unsealed runtimeclass ImageIcon

Definition at line 8 of file ImageIcon.idl.

unsealed runtimeclass ImageIconSource

Definition at line 8 of file IconSource.idl.

runtimeclass IndexPath

Definition at line 30 of file ItemsRepeater.idl.

unsealed runtimeclass InfoBadge

Definition at line 13 of file InfoBadge.idl.

Microsoft UI Xaml CornerRadius InfoBadgeCornerRadius

Definition at line 10 of file InfoBadge.idl.

unsealed runtimeclass InfoBadgeTemplateSettings

Definition at line 8 of file InfoBadge.idl.

Microsoft UI Xaml Controls InkToolBarInitialControls InitialControls

Definition at line 110 of file InkToolBar.idl.

unsealed runtimeclass InkCanvas

Definition at line 10 of file InkCanvas.idl.

event Windows Foundation TypedEventHandler<Microsoft.UI.Xaml.Controls.InkToolBar,Object> InkDrawingAttributesChanged

Definition at line 121 of file InkToolBar.idl.

unsealed runtimeclass InkToolBar

Definition at line 102 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarBallpointPenButton

Definition at line 250 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarCustomPen

Definition at line 85 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarCustomPenButton

Definition at line 264 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarCustomToggleButton

Definition at line 204 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarCustomToolButton

Definition at line 214 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarEraserButton

Definition at line 222 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarFlyoutItem

Definition at line 145 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarHighlighterButton

Definition at line 273 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarMenuButton

Definition at line 158 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarPenButton

Definition at line 233 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarPencilButton

Definition at line 283 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarPenConfigurationControl

Definition at line 128 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarStencilButton

Definition at line 169 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarToggleButton

Definition at line 182 of file InkToolBar.idl.

unsealed runtimeclass InkToolBarToolButton

Definition at line 194 of file InkToolBar.idl.

Boolean IsChecked

Definition at line 155 of file InkToolBar.idl.

Boolean IsClearAllVisible

Definition at line 230 of file InkToolBar.idl.

Boolean IsExtensionGlyphShown

Definition at line 167 of file InkToolBar.idl.

Boolean IsLightDismissEnabled

Definition at line 116 of file TeachingTip.idl.

Boolean IsOpen

Definition at line 95 of file TeachingTip.idl.

Boolean IsProtractorItemVisible

Definition at line 181 of file InkToolBar.idl.

Boolean IsRulerButtonChecked

Definition at line 113 of file InkToolBar.idl.

Boolean IsRulerItemVisible

Definition at line 180 of file InkToolBar.idl.

Boolean IsStencilButtonChecked

Definition at line 116 of file InkToolBar.idl.

event Windows Foundation TypedEventHandler<Microsoft.UI.Xaml.Controls.InkToolBar,Microsoft.UI.Xaml.Controls.InkToolBarIsStencilButtonCheckedChangedEventArgs> IsStencilButtonCheckedChanged

Definition at line 124 of file InkToolBar.idl.

Boolean IsStrokeEraserVisible

Definition at line 231 of file InkToolBar.idl.

Boolean IsWrapEnabled

Definition at line 85 of file NumberBox.idl.

runtimeclass ItemCollectionTransition

Definition at line 11 of file ItemsRepeater.idl.

runtimeclass ItemCollectionTransitionProgress

Definition at line 12 of file ItemsRepeater.idl.

runtimeclass ItemCollectionTransitionProvider

Definition at line 13 of file ItemsRepeater.idl.

unsealed runtimeclass ItemsRepeater

Definition at line 5 of file ItemsRepeater.idl.

runtimeclass ItemsRepeaterElementClearingEventArgs

Definition at line 17 of file ItemsRepeater.idl.

runtimeclass ItemsRepeaterElementIndexChangedEventArgs

Definition at line 18 of file ItemsRepeater.idl.

runtimeclass ItemsRepeaterElementPreparedEventArgs

Definition at line 16 of file ItemsRepeater.idl.

runtimeclass ItemsRepeaterScrollHost

Definition at line 15 of file ItemsRepeater.idl.

Object ItemsSource

Definition at line 13 of file RadioButtons.idl.

unsealed runtimeclass ItemsSourceView

Definition at line 4 of file ItemsRepeater.idl.

Object ItemTemplate

Definition at line 14 of file RadioButtons.idl.

Microsoft UI Xaml Controls InkToolBarFlyoutItemKind Kind

Definition at line 154 of file InkToolBar.idl.

Double LargeChange

Definition at line 52 of file NumberBox.idl.

Microsoft UI Xaml Input ICommand LastButtonCommand

Definition at line 62 of file PagerControl.idl.

Microsoft UI Xaml Style LastButtonStyle

Definition at line 68 of file PagerControl.idl.

PagerControlButtonVisibility LastButtonVisibility

Definition at line 57 of file PagerControl.idl.

runtimeclass Layout

Definition at line 9 of file ItemsRepeater.idl.

runtimeclass LayoutContext

Definition at line 7 of file ItemsRepeater.idl.

unsealed runtimeclass LayoutPanel

Definition at line 10 of file LayoutPanel.idl.

runtimeclass LinedFlowLayout

Definition at line 19 of file ItemsRepeater.idl.

runtimeclass LinedFlowLayoutItemCollectionTransitionProvider

Definition at line 14 of file ItemsRepeater.idl.

runtimeclass LinedFlowLayoutItemsInfoRequestedEventArgs

Definition at line 20 of file ItemsRepeater.idl.

unsealed runtimeclass MapControl

Definition at line 10 of file MapControl.idl.

unsealed runtimeclass MapElement

Definition at line 40 of file MapControl.idl.

event Windows Foundation TypedEventHandler< MapElementsLayer, MapElementClickEventArgs > MapElementClick

Definition at line 12 of file MapControl.idl.

unsealed runtimeclass MapLayer

Definition at line 41 of file MapControl.idl.

event Windows Foundation TypedEventHandler<MapControl, MapControlMapServiceErrorOccurredEventArgs> MapServiceErrorOccurred

Definition at line 25 of file MapControl.idl.

Int32 MaxColumns

Definition at line 25 of file RadioButtons.idl.

Double Maximum

Definition at line 41 of file NumberBox.idl.

Double MaxStrokeWidth

Definition at line 246 of file InkToolBar.idl.

Int32 MaxVisiblePips

Definition at line 51 of file PipsPager.idl.

unsealed runtimeclass MenuBar

Definition at line 18 of file MenuBar.idl.

unsealed runtimeclass MenuBarItem

Definition at line 16 of file MenuBar.idl.

unsealed runtimeclass MenuBarItemFlyout

Definition at line 8 of file MenuBar.idl.

Double Minimum

Definition at line 37 of file NumberBox.idl.

Double MinStrokeWidth

Definition at line 245 of file InkToolBar.idl.

event Windows Foundation TypedEventHandler<TwoPaneView, Object> ModeChanged

Definition at line 47 of file TwoPaneView.idl.

Microsoft UI Xaml Input ICommand NextButtonCommand

Definition at line 61 of file PagerControl.idl.

Microsoft UI Xaml Style NextButtonStyle

Definition at line 67 of file PagerControl.idl.

PipsPagerButtonVisibility NextButtonVisibility

Definition at line 56 of file PagerControl.idl.

Microsoft UI Xaml Style NormalPipStyle

Definition at line 65 of file PipsPager.idl.

NumberBox

Definition at line 27 of file NumberBox.idl.

Windows Globalization NumberFormatting INumberFormatter2 NumberFormatter

Definition at line 96 of file NumberBox.idl.

Int32 NumberOfPages

Definition at line 52 of file PagerControl.idl.

Microsoft UI Xaml Controls Orientation Orientation

Definition at line 118 of file InkToolBar.idl.

unsealed runtimeclass PagerControl

Definition at line 37 of file PagerControl.idl.

unsealed runtimeclass PagerControlTemplateSettings

Definition at line 28 of file PagerControl.idl.

Microsoft UI Xaml Input ICommand PagerInputCommand

Definition at line 63 of file PagerControl.idl.

event Windows Foundation TypedEventHandler<TitleBar, Object> PaneToggleRequested

Definition at line 37 of file TitleBar.idl.

unsealed runtimeclass ParallaxView

Definition at line 19 of file ParallaxView.idl.

unsealed runtimeclass PersonPicture

Definition at line 10 of file PersonPicture.idl.

runtimeclass PersonPictureTemplateSettings

Definition at line 12 of file PersonPicture.idl.

unsealed runtimeclass PipsPager

Definition at line 33 of file PipsPager.idl.

runtimeclass PipsPagerTemplateSettings

Definition at line 26 of file PipsPager.idl.

Microsoft UI Xaml Thickness PlacementMargin

Definition at line 112 of file TeachingTip.idl.

Double PlaybackRate

Definition at line 91 of file AnimatedVisualPlayer.idl.

TeachingTipPlacementMode PreferredPlacement

Definition at line 118 of file TeachingTip.idl.

String PrefixText

Definition at line 76 of file PagerControl.idl.

Boolean PreventKeyboardDisplayOnProgrammaticFocus

Definition at line 76 of file NumberBox.idl.

Microsoft UI Xaml Input ICommand PreviousButtonCommand

Definition at line 60 of file PagerControl.idl.

Microsoft UI Xaml Style PreviousButtonStyle

Definition at line 66 of file PagerControl.idl.

PipsPagerButtonVisibility PreviousButtonVisibility

Definition at line 55 of file PagerControl.idl.

unsealed runtimeclass ProgressBar

Definition at line 9 of file ProgressBar.idl.

runtimeclass ProgressBarTemplateSettings

Definition at line 9 of file ProgressBar.idl.

unsealed runtimeclass ProgressRing

Definition at line 10 of file ProgressRing.idl.

runtimeclass ProgressRingTemplateSettings

Definition at line 10 of file ProgressRing.idl.

unsealed runtimeclass RadioButtons

Definition at line 11 of file RadioButtons.idl.

unsealed runtimeclass RadioMenuFlyoutItem

Definition at line 10 of file RadioMenuFlyoutItem.idl.

unsealed runtimeclass RatingControl

Definition at line 38 of file RatingControl.idl.

unsealed runtimeclass RatingItemFontInfo

Definition at line 15 of file RatingControl.idl.

unsealed runtimeclass RatingItemImageInfo

Definition at line 17 of file RatingControl.idl.

unsealed runtimeclass RatingItemInfo

Definition at line 8 of file RatingControl.idl.

runtimeclass RecyclePool

Definition at line 27 of file ItemsRepeater.idl.

runtimeclass RecyclingElementFactory

Definition at line 29 of file ItemsRepeater.idl.

unsealed runtimeclass RefreshContainer

Definition at line 20 of file RefreshContainer.idl.

event Windows Foundation TypedEventHandler<RefreshContainer, RefreshRequestedEventArgs> RefreshRequested

Definition at line 22 of file RefreshContainer.idl.

unsealed runtimeclass RevealListViewItemPresenter

Definition at line 8 of file RevealControls.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingScrollAnimationStartingEventArgs> ScrollAnimationStarting

Definition at line 129 of file ScrollView.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingScrollCompletedEventArgs> ScrollCompleted

Definition at line 131 of file ScrollView.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingScrollStartingEventArgs> ScrollStarting

Definition at line 137 of file ScrollView.idl.

unsealed runtimeclass ScrollView

Definition at line 20 of file ScrollView.idl.

Int32 SelectedBrushIndex

Definition at line 247 of file InkToolBar.idl.

Int32 SelectedIndex

Definition at line 20 of file RadioButtons.idl.

event Windows Foundation TypedEventHandler< PipsPager, PipsPagerSelectedIndexChangedEventArgs > SelectedIndexChanged

Definition at line 79 of file PagerControl.idl.

Object SelectedItem

Definition at line 21 of file RadioButtons.idl.

Int32 SelectedPageIndex

Definition at line 74 of file PagerControl.idl.

Microsoft UI Xaml Style SelectedPipStyle

Definition at line 64 of file PipsPager.idl.

Microsoft UI Xaml Controls InkToolBarStencilKind SelectedStencil

Definition at line 177 of file InkToolBar.idl.

Double SelectedStrokeWidth

Definition at line 249 of file InkToolBar.idl.

event Microsoft UI Xaml Controls SelectionChangedEventHandler SelectionChanged

Definition at line 22 of file RadioButtons.idl.

Microsoft UI Xaml Controls Primitives FlyoutBase SelectionFlyout

Definition at line 66 of file NumberBox.idl.

Microsoft UI Xaml Media SolidColorBrush SelectionHighlightColor

Definition at line 68 of file NumberBox.idl.

runtimeclass SelectionModel

Definition at line 33 of file ItemsRepeater.idl.

runtimeclass SelectionModelChildrenRequestedEventArgs

Definition at line 32 of file ItemsRepeater.idl.

runtimeclass SelectionModelSelectionChangedEventArgs

Definition at line 31 of file ItemsRepeater.idl.

runtimeclass SelectTemplateEventArgs

Definition at line 28 of file ItemsRepeater.idl.

Boolean ShouldConstrainToRootBounds

Definition at line 114 of file TeachingTip.idl.

Double SmallChange

Definition at line 49 of file NumberBox.idl.

IAnimatedVisualSource Source

Definition at line 80 of file AnimatedVisualPlayer.idl.

runtimeclass StackLayout

Definition at line 24 of file ItemsRepeater.idl.

runtimeclass StackLayoutState

Definition at line 23 of file ItemsRepeater.idl.

event Windows Foundation TypedEventHandler<ScrollView, Object> StateChanged

Definition at line 127 of file ScrollView.idl.

Microsoft UI Xaml Media Stretch Stretch

Definition at line 104 of file AnimatedVisualPlayer.idl.

String Subtitle

Definition at line 92 of file TeachingTip.idl.

String SuffixText

Definition at line 77 of file PagerControl.idl.

runtimeclass SwipeControl

Definition at line 5 of file SwipeControl.idl.

runtimeclass SwipeItem

Definition at line 7 of file SwipeControl.idl.

runtimeclass SwipeItemInvokedEventArgs

Definition at line 6 of file SwipeControl.idl.

unsealed runtimeclass SwipeItems

Definition at line 4 of file SwipeControl.idl.

event Windows Foundation TypedEventHandler<TabView, TabViewTabCloseRequestedEventArgs> TabCloseRequested

Definition at line 107 of file TabView.idl.

event Windows Foundation TypedEventHandler<TabView, TabViewTabDragCompletedEventArgs> TabDragCompleted

Definition at line 172 of file TabView.idl.

event Windows Foundation TypedEventHandler<TabView, TabViewTabDragStartingEventArgs> TabDragStarting

Definition at line 171 of file TabView.idl.

event Windows Foundation TypedEventHandler<TabView, TabViewTabDroppedOutsideEventArgs> TabDroppedOutside

Definition at line 126 of file TabView.idl.

event Windows Foundation TypedEventHandler<TabView, Windows.Foundation.Collections.IVectorChangedEventArgs> TabItemsChanged

Definition at line 130 of file TabView.idl.

Object TabItemsSource

Definition at line 134 of file TabView.idl.

Microsoft UI Xaml DataTemplate TabItemTemplate

Definition at line 135 of file TabView.idl.

event Microsoft UI Xaml DragEventHandler TabStripDragOver

Definition at line 173 of file TabView.idl.

event Microsoft UI Xaml DragEventHandler TabStripDrop

Definition at line 174 of file TabView.idl.

unsealed runtimeclass TabView

Definition at line 65 of file TabView.idl.

unsealed runtimeclass TabViewItem

Definition at line 176 of file TabView.idl.

unsealed runtimeclass TabViewItemTemplateSettings

Definition at line 225 of file TabView.idl.

TeachingTipTailVisibility TailVisibility

Definition at line 100 of file TeachingTip.idl.

Microsoft UI Xaml FrameworkElement Target

Definition at line 97 of file TeachingTip.idl.

Microsoft UI Xaml Controls InkCanvas TargetInkCanvas

Definition at line 115 of file InkToolBar.idl.

Object TargetInkPresenter

Definition at line 119 of file InkToolBar.idl.

unsealed runtimeclass TeachingTip

Definition at line 78 of file TeachingTip.idl.

unsealed runtimeclass TeachingTipTemplateSettings

Definition at line 56 of file TeachingTip.idl.

String Text

Definition at line 55 of file NumberBox.idl.

unsealed runtimeclass TextCommandBarFlyout

Definition at line 16 of file CommandBarFlyout.idl.

String Title

Definition at line 91 of file TeachingTip.idl.

unsealed runtimeclass TitleBar

Definition at line 11 of file TitleBar.idl.

unsealed runtimeclass TitleBarAutomationPeer

Definition at line 60 of file TitleBar.idl.

unsealed runtimeclass TitleBarTemplateSettings

Definition at line 39 of file TitleBar.idl.

Microsoft UI Xaml Thickness TopLeftHighlightMargin

Definition at line 74 of file TeachingTip.idl.

Microsoft UI Xaml Thickness TopRightHighlightMargin

Definition at line 73 of file TeachingTip.idl.

unsealed runtimeclass TwoPaneView

Definition at line 45 of file TwoPaneView.idl.

event Windows Foundation TypedEventHandler<Microsoft.UI.Xaml.Controls.InkToolBarFlyoutItem,Object> Unchecked

Definition at line 157 of file InkToolBar.idl.

runtimeclass UniformGridLayout

Definition at line 22 of file ItemsRepeater.idl.

runtimeclass UniformGridLayoutState

Definition at line 21 of file ItemsRepeater.idl.

NumberBoxValidationMode ValidationMode

Definition at line 81 of file NumberBox.idl.

event Windows Foundation TypedEventHandler< RatingControl, Object > ValueChanged

Definition at line 98 of file NumberBox.idl.

event Windows Foundation TypedEventHandler<ScrollView, Object> ViewChanged

Definition at line 128 of file ScrollView.idl.

runtimeclass VirtualizingLayout

Definition at line 10 of file ItemsRepeater.idl.

runtimeclass VirtualizingLayoutContext

Definition at line 8 of file ItemsRepeater.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingZoomAnimationStartingEventArgs> ZoomAnimationStarting

Definition at line 130 of file ScrollView.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingZoomCompletedEventArgs> ZoomCompleted

Definition at line 132 of file ScrollView.idl.

event Windows Foundation TypedEventHandler<ScrollView, ScrollingZoomStartingEventArgs> ZoomStarting

Definition at line 139 of file ScrollView.idl.

Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MU_XCAV_NAMESPACE Namespace Reference

  • Namespace List
  • Namespace Members
Variables

MU_XCAV_NAMESPACE Namespace Reference

Variables

runtimeclass | AnimatedAcceptVisualSource
runtimeclass | AnimatedBackVisualSource
runtimeclass | AnimatedChevronDownSmallVisualSource
runtimeclass | AnimatedChevronRightDownSmallVisualSource
runtimeclass | AnimatedChevronUpDownSmallVisualSource
runtimeclass | AnimatedFindVisualSource
runtimeclass | AnimatedGlobalNavigationButtonVisualSource
runtimeclass | AnimatedSettingsVisualSource

Variable Documentation

runtimeclass AnimatedAcceptVisualSource

Definition at line 26 of file AnimatedAcceptVisualSource.idl.

runtimeclass AnimatedBackVisualSource

Definition at line 26 of file AnimatedBackVisualSource.idl.

runtimeclass AnimatedChevronDownSmallVisualSource

Definition at line 26 of file AnimatedChevronDownSmallVisualSource.idl.

runtimeclass AnimatedChevronRightDownSmallVisualSource

Definition at line 26 of file AnimatedChevronRightDownSmallVisualSource.idl.

runtimeclass AnimatedChevronUpDownSmallVisualSource

Definition at line 26 of file AnimatedChevronUpDownSmallVisualSource.idl.

runtimeclass AnimatedFindVisualSource

Definition at line 26 of file AnimatedFindVisualSource.idl.

runtimeclass AnimatedGlobalNavigationButtonVisualSource

Definition at line 26 of file AnimatedGlobalNavigationButtonVisualSource.idl.

runtimeclass AnimatedSettingsVisualSource

Definition at line 26 of file AnimatedSettingsVisualSource.idl.

Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MU_XCP_NAMESPACE Namespace Reference

  • Namespace List
  • Namespace Members
Enumerations | Variables

MU_XCP_NAMESPACE Namespace Reference

Enumerations

enum CornerRadiusFilterKind {
None, Top, Right, Bottom,
Left, TopLeftValue, BottomRightValue
}
enum CornerRadiusToThicknessConverterKind {
FilterTopAndBottomFromLeft, FilterTopAndBottomFromRight, FilterLeftAndRightFromTop, FilterLeftAndRightFromBottom,
FilterTopFromTopLeft, FilterTopFromTopRight, FilterRightFromTopRight, FilterRightFromBottomRight,
FilterBottomFromBottomRight, FilterBottomFromBottomLeft, FilterLeftFromBottomLeft, FilterLeftFromTopLeft
}
enum | ScrollSnapPointsAlignment { Near = 0, Center = 1, Far = 2 }

Variables

event Windows Foundation
TypedEventHandler
< ColorSpectrum,
MU_XC_NAMESPACE.ColorChangedEventArgs > 		ColorChanged
unsealed runtimeclass | ColorPickerSlider
unsealed runtimeclass | ColorSpectrum
unsealed runtimeclass | ColumnMajorUniformToLargestGridLayout
unsealed runtimeclass | CommandBarFlyoutCommandBar
runtimeclass | CommandBarFlyoutCommandBarTemplateSettings
runtimeclass | CornerRadiusFilterConverter
runtimeclass | CornerRadiusToThicknessConverter
Microsoft UI Xaml Thickness | HorizontalOrientationPadding
unsealed runtimeclass | InfoBarPanel
unsealed runtimeclass | MonochromaticOverlayPresenter
unsealed runtimeclass | NavigationViewItemPresenter
unsealed runtimeclass | TabViewListView
Microsoft UI Xaml Thickness | VerticalOrientationPadding

Enumeration Type Documentation

enum CornerRadiusFilterKind
Enumerator:
None
Top
Right
Bottom
Left
TopLeftValue
BottomRightValue

Definition at line 21 of file CornerRadiusFilterConverters.idl.

{
    None,
    Top,
    Right,
    Bottom,
    Left,
    TopLeftValue,
    BottomRightValue
};

enum CornerRadiusToThicknessConverterKind
Enumerator:
FilterTopAndBottomFromLeft
FilterTopAndBottomFromRight
FilterLeftAndRightFromTop
FilterLeftAndRightFromBottom
FilterTopFromTopLeft
FilterTopFromTopRight
FilterRightFromTopRight
FilterRightFromBottomRight
FilterBottomFromBottomRight
FilterBottomFromBottomLeft
FilterLeftFromBottomLeft
FilterLeftFromTopLeft

Definition at line 21 of file CornerRadiusToThicknessConverter.idl.

{
    FilterTopAndBottomFromLeft,
    FilterTopAndBottomFromRight,
    FilterLeftAndRightFromTop,
    FilterLeftAndRightFromBottom,
    FilterTopFromTopLeft,
    FilterTopFromTopRight,
    FilterRightFromTopRight,
    FilterRightFromBottomRight,
    FilterBottomFromBottomRight,
    FilterBottomFromBottomLeft,
    FilterLeftFromBottomLeft,
    FilterLeftFromTopLeft,
};

enum ScrollSnapPointsAlignment
Enumerator:
Near
Center
Far

Definition at line 15 of file ScrollPresenterPrimitives.idl.

{
    Near = 0,
    Center = 1,
    Far = 2,
};

Variable Documentation

event Windows Foundation TypedEventHandler<ColorSpectrum, MU_XC_NAMESPACE.ColorChangedEventArgs> ColorChanged

Definition at line 13 of file ColorSpectrum.idl.

unsealed runtimeclass ColorPickerSlider

Definition at line 8 of file ColorPickerSlider.idl.

unsealed runtimeclass ColorSpectrum

Definition at line 10 of file ColorSpectrum.idl.

unsealed runtimeclass ColumnMajorUniformToLargestGridLayout

Definition at line 9 of file RadioButtonsPrimitives.idl.

unsealed runtimeclass CommandBarFlyoutCommandBar

Definition at line 10 of file CommandBarFlyoutCommandBar.idl.

runtimeclass CommandBarFlyoutCommandBarTemplateSettings

Definition at line 10 of file CommandBarFlyoutCommandBar.idl.

runtimeclass CornerRadiusFilterConverter

Definition at line 7 of file CornerRadiusFilterConverters.idl.

runtimeclass CornerRadiusToThicknessConverter

Definition at line 7 of file CornerRadiusToThicknessConverter.idl.

Microsoft UI Xaml Thickness HorizontalOrientationPadding

Definition at line 124 of file InfoBar.idl.

unsealed runtimeclass InfoBarPanel

Definition at line 122 of file InfoBar.idl.

unsealed runtimeclass MonochromaticOverlayPresenter

Definition at line 10 of file MonochromaticOverlayPresenter.idl.

unsealed runtimeclass NavigationViewItemPresenter

Definition at line 8 of file NavigationViewItemPresenter.idl.

unsealed runtimeclass TabViewListView

Definition at line 262 of file TabView.idl.

Microsoft UI Xaml Thickness VerticalOrientationPadding

Definition at line 125 of file InfoBar.idl.

Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MU_XM_NAMESPACE Namespace Reference

  • Namespace List
  • Namespace Members
Enumerations | Variables

MU_XM_NAMESPACE Namespace Reference

Enumerations

enum | RevealBrushState { Normal = 0, PointerOver = 1, Pressed = 2 }

Variables

unsealed runtimeclass | AcrylicBrush
unsealed runtimeclass | DesktopAcrylicBackdrop
unsealed runtimeclass | MicaBackdrop
unsealed runtimeclass | RadialGradientBrush
unsealed runtimeclass | RevealBackgroundBrush
unsealed runtimeclass | RevealBorderBrush
unsealed runtimeclass | RevealBrush

Enumeration Type Documentation

enum RevealBrushState
Enumerator:
Normal
PointerOver
Pressed

Definition at line 5 of file RevealBrush.idl.

{
    Normal = 0,
    PointerOver = 1,
    Pressed = 2,
};

Variable Documentation

unsealed runtimeclass AcrylicBrush

Definition at line 11 of file AcrylicBrush.idl.

unsealed runtimeclass DesktopAcrylicBackdrop

Definition at line 8 of file DesktopAcrylicBackdrop.idl.

unsealed runtimeclass MicaBackdrop

Definition at line 9 of file MicaBackdrop.idl.

unsealed runtimeclass RadialGradientBrush

Definition at line 9 of file RadialGradientBrush.idl.

unsealed runtimeclass RevealBackgroundBrush

Definition at line 48 of file RevealBrush.idl.

unsealed runtimeclass RevealBorderBrush

Definition at line 41 of file RevealBrush.idl.

unsealed runtimeclass RevealBrush

Definition at line 19 of file RevealBrush.idl.

Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControls Namespace Reference

  • Namespace List
  • Namespace Members
Namespaces

MUXControls Namespace Reference

Namespaces

namespace | ApiTests
namespace | Common
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControls::ApiTests Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControls
  • ApiTests
Namespaces

MUXControls::ApiTests Namespace Reference

Namespaces

namespace RepeaterTests
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControls::ApiTests::RepeaterTests Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControls
  • ApiTests
  • RepeaterTests
Namespaces

MUXControls::ApiTests::RepeaterTests Namespace Reference

Namespaces

namespace Common
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControls::ApiTests::RepeaterTests::Common Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControls
  • ApiTests
  • RepeaterTests
  • Common
Classes

MUXControls::ApiTests::RepeaterTests::Common Namespace Reference

Classes

class AspectRatioRespectingControl
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControls::Common Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControls
  • Common
Classes | Functions

MUXControls::Common Namespace Reference

Classes

class | AutoHandle
class | HandlePolicy

Functions

DECLARE_AUTOHANDLE_CLASS (Handle, HandlePolicy)

Function Documentation

DECLARE_AUTOHANDLE_CLASS | ( | Handle | ,
 |  | HandlePolicy |
 | ) |  |
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestApp Namespace Reference

  • Namespace List
  • Namespace Members
Namespaces | Classes | Enumerations

MUXControlsTestApp Namespace Reference

Namespaces

namespace | Samples
namespace | Utilities
namespace | Utils

Classes

class | AcrylicBrushBasicPage
class | AcrylicBrushLuminosityTestPage
An empty page that can be used on its own or navigated to within a Frame. More...
class | AcrylicBrushPage
class | AcrylicColorPage
class | AcrylicMarkupPage
class | AcrylicPage
class | AcrylicRenderingPage
class | AnimatedIconHost
class | AnimatedIconPage
class | AnimatedVisualPlayerPage
class | AnimationHandler
class | AnnotatedScrollBarIScrollControllerPage
class | AnnotatedScrollBarPage
class | AnnotatedScrollBarRangeBasePage
class | AnnotatedScrollBarSummaryPage
class | AppBarPage
class | AutoSuggestBoxPage
class | BlankPage
class | BorderThicknessPage
class | BreadcrumbBarAxeTestPage
class | BreadcrumbBarFolder
class | BreadcrumbBarPage
class | Bridge
class | BridgeAnotherClass
class | ButtonInteractionPage
class | CalendarDatePickerPage
class | CalendarViewPage
class | CanvasScrollControllerConsumer
class | Category
class | CheckBoxPage
class | ColorItem
class | ColorPickerPage
class | ColorToSolidColorBrushConverter
class | ComboBoxPage
class | CommandBarCenterPage
class | CommandBarFlyoutMainPage
class | CommandBarFlyoutPage
class | CommandBarPage
class | CommandBarSummaryPage
class | CommonStylesPage
class | CompactPage
class | ContentDialogPage
class | CoreWindowEventsPage
class | CornerRadiusPage
class | CustomContent
class | Customer
class | Customers
class | CustomNavigationViewItem
class | DataItem
class | DataModelWithINPC
class | DatePickerPage
class | DialogWithNavView
class | DoubleToStringConverter
class | DropDownButtonPage
class | DynamicPage
class | EnumToStringConverter
class | ExpanderPage
class | ExtraCommandBarFlyoutPage
class | FallbackGrid
class | FlatItemsControlPage
class | FlipViewPage
class | GridViewPage
class | GroupedItemsControlGroupItem
class | GroupedItemsControlItem
class | GroupedItemsControlPage
class | GroupedItemsControlViewModel
class | GroupedListViewBaseGroupItem
class | GroupedListViewBaseItem
class | GroupedListViewBasePage
class | GroupedListViewBaseViewModel
class | HierarchicalNavigationViewDataBinding
class | HierarchicalNavigationViewMarkup
interface | ICoreWebView2Interop
class | ImageIconPage
class | ImageIRefreshInfoProviderAdapter
class | ImagePage
class | InfoBadgePage
class | InfobarAxeTestage
class | InfoBarPage
class | Ingredient
class | InkToolbarPage
class | IScrollControllerAdapter
class | ItemContainerLayoutPage
class | ItemContainerPage
class | ItemContainerSummaryPage
class | ItemsControlPage
class | ItemsViewBlankPage
class | ItemsViewIntegrationPage
class | ItemsViewInteractiveTestsPage
class | ItemsViewPage
class | ItemsViewPictureLibraryPage
class | ItemsViewSummaryPage
class | ItemsViewTransitionPage
class | ListViewAnchoringPage
class | ListViewBackgroundPage
class | ListViewBasePage
class | ListViewElementNameBindingPage
class | ListViewHeaderPage
class | ListViewItemPage
class | ListViewPage
class | MapControlApiKey
class | MapControlPage
class | MediaTransportControlsPage
class | MenuBarPage
class | MenuFlyoutPage
class | MockAnimatedIconSource
class | MockIAnimatedIconSource2
class | MonochromaticOverlayPresenterPage
class | MultipleTabViewPage
class | MyColorSpectrum
class | MyCommand
class | MyData
class | NavigationViewAnimationPage
class | NavigationViewAxeTestPage
class | NavigationViewBlankPage1
class | NavigationViewCaseBundle
class | NavigationViewCompactPaneLengthTestPage
class | NavigationViewCustomMenuItemPage
class | NavigationViewCustomThemeResourcesPage
class | NavigationViewInfoBadgeTestPage
An empty page that can be used on its own or navigated to within a Frame. More...
class | NavigationViewInitPage
class | NavigationViewIsPaneOpenPage
class | NavigationViewItemTemplatePage
class | NavigationViewMenuItemsSourcePage
class | NavigationViewMenuItemStretchPage
class | NavigationViewMinimalPage
class | NavigationViewPage
class | NavigationViewPageDataContext
class | NavigationViewRS3Page
Verify ShouldPreserveNavigationViewRS3Behavior. More...
class | NavigationViewRS4Page
class | NavigationViewSelectedItemEdgeCasePage
class | NavigationViewStretchPage
class | NavigationViewTopNavOnlyPage
class | NavigationViewTopNavOverflowButtonPage
class | NavigationViewTopNavPage
class | NavigationViewTopNavStorePage
class | NavViewPageData
class | NestedGridViewsPage
class | NestedItemsControlsPage
class | NestedListViewsPage
class | NewWindowRootPage
class | NullableBooleanToBooleanConverter
class | NumberBoxAxeTestPage
class | NumberBoxPage
class | PageInfo
class | PagerControlAxeTestPage
class | PagerControlPage
class | PaneFooterTestPage
An empty page that can be used on its own or navigated to within a Frame. More...
class | PaneLayoutTestPage
An empty page that can be used on its own or navigated to within a Frame. More...
class | ParallaxViewPage
class | ParallaxViewStackPanelPage
class | PersonInfo
class | PersonPicturePage
class | Picture
class | PictureLibrary
class | PipsPagerAxeTestPage
class | PipsPagerExamples
class | PipsPagerPage
class | PivotPage
class | PrefixConverter
class | ProgressBarAxeTestPage
class | ProgressBarPage
class | ProgressBarReTemplatePage
class | ProgressRingAxeTestPage
class | ProgressRingCustomLottieSourcePage
class | ProgressRingPage
class | ProgressRingStoryboardAnimationPage
class | PTRPage
class | RadialGradientBrushPage
class | RadioButtonsPage
class | RadioMenuFlyoutItemPage
class | RatingControlPage
class | RefreshableCollection-g
class | RefreshContainerOnImagePage
class | RefreshContainerPage
class | RefreshInfoProviderImplementation
class | RefreshVisualizerPage
class | RepeaterTestUIPage
class | RevealBackgroundItem
class | RevealBasicPage
class | RevealColorPage
class | RevealFallbackPage
class | RevealGridItem
class | RevealGridTypeItem
class | RevealItem
class | RevealListPage
class | RevealMarkupPage
class | RevealPage
class | RevealRegressionTestsPage
class | RevealScenarioColors
class | RevealScenarioGrid
class | RevealScenarioItem
class | RevealScenarioLights
class | RevealScenarioList
class | RevealScenarios
class | RevealScenarioSecondaryView
class | RevealSimpleListPage
class | RevealStatesPage
class | RevealThemeItem
class | SampleSuggestions
class | ScrollBarController
class | ScrollBarPage
class | ScrollPresenterAccessibilityPage
class | ScrollPresenterBringIntoViewPage
class | ScrollPresenterChainingAndRailingPage
class | ScrollPresenterDynamicPage
class | ScrollPresenterExpressionAnimationSourcesPage
class | ScrollPresenterLeakDetectionPage
class | ScrollPresenterManipulationModePage
class | ScrollPresenterMousePanningPage
class | ScrollPresenterPage
class | ScrollPresenterRepeaterAnchoringPage
class | ScrollPresenterScrollSnapPointsPage
class | ScrollPresenterStackPanelAnchoringPage
class | ScrollPresentersWithSimpleContentsPage
class | ScrollPresenterWithBiDirectionalScrollControllerPage
class | ScrollPresenterWithCompositionScrollControllersPage
class | ScrollPresenterWithSimpleScrollControllersPage
class | ScrollPresenterZoomSnapPointsPage
class | ScrollViewBlankPage
class | ScrollViewBringIntoViewPage
class | ScrollViewDynamicPage
class | ScrollViewerAdapterPage
class | ScrollViewerPage
class | ScrollViewKeyboardAndGamepadNavigationPage
class | ScrollViewPage
class | ScrollViewsWithSimpleContentsPage
class | ScrollViewWithRTLFlowDirectionPage
class | ScrollViewWithScrollControllersPage
class | SelectionModeItem
class | SelectorBarPage
class | SelectorBarSamplePage
class | SelectorBarSummaryPage
class | SimpleRectanglePage
class | SimpleVerify
class | SliderInteractionPage
class | SliderPage
class | SplitButtonPage
class | SplitViewPage
class | Square
class | SwipeControlClearPage
Test page used for clearing existing SwipeControls. More...
class | SwipeControlPage
class | SwipeControlPage2
class | SwipePage
class | TabDataItem
class | TabViewAxeTestPage
class | TabViewPage
class | TabViewSizingPage
class | TabViewTabClosingBehaviorPage
An empty page that can be used on its own or navigated to within a Frame. More...
class | TabViewTabItemsSourcePage
class | TabViewTearOutWindowWithDataItems
class | TabViewTearOutWindowWithoutDataItems
class | TargetElement
class | TeachingTipCaseBundle
class | TeachingTipFocusPage
class | TeachingTipInXamlPage
class | TeachingTipPage
class | TestControl
class | TestControlAutomationPeer
class | TextCommandBarFlyoutPage
class | TextControlsPage
class | TextPage
class | TimePickerPage
class | TitleBarPage
class | TitleBarPageWindow
class | ToggleAnimatedIconHost
class | ToolTipPage
class | TreeViewItemSource
class | TreeViewItemsSourceTestPage
class | TreeViewItemStyleSelector
class | TreeViewItemTemplateSelector
class | TreeViewItemTemplateSelectorTestPage
class | TreeViewLateDataInitTest
Test page for late initialization data binding. ItemsSource is null until we click the button to set it. More...
class | TreeViewNode2
class | TreeViewNodeInMarkupTestPage
class | TreeViewPage
class | TreeViewUnrealizedChildrenTestPage
An empty page that can be used on its own or navigated to within a Frame. More...
class | TreeViewViewModel
class | TreeViewViewModelItem
class | TwoPaneViewPage
class | UriToStringConverter
class | VirtualizingDataSource
class | VirtualizingStackPanelPage
class | VisualPropertiesPage
class | VisualStatesPage
class | WebView2BasicPage
class | WebView2Common
class | WebView2CoreObjectsPage
class | WebView2Extensions
class | WebView2Page
class | WebView2WithCursor
class | WindowPage

Enumerations

enum | Location { Seattle, Miami, LA }
enum | RevealGridItemTemplates { ImageWithText = 0, Image = 1, BaseLowItems = 2 }
enum | RevealTestBackgrounds { Default = 0, Acrylic = 1, Accent = 2 }
enum | TipLocation { VisualTree = 0, Resources = 1 }

Enumeration Type Documentation

enum Location
Enumerator:
Seattle
Miami
LA

Definition at line 496 of file ItemsViewPictureLibraryPage.xaml.cs.

    {
        Seattle,
        Miami,
        LA
    }

enum RevealGridItemTemplates
Enumerator:
ImageWithText
Image
BaseLowItems

Definition at line 170 of file RevealScenarioGrid.xaml.cs.

    {
        ImageWithText = 0,
        Image = 1,
        BaseLowItems = 2
    }

enum RevealTestBackgrounds
Enumerator:
Default
Acrylic
Accent

Definition at line 163 of file RevealScenarioGrid.xaml.cs.

    {
        Default = 0,
        Acrylic = 1,
        Accent = 2
    }

enum TipLocation
Enumerator:
VisualTree
Resources

Definition at line 23 of file TeachingTipPage.xaml.cs.

    {
        VisualTree = 0,
        Resources = 1
    }

Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestApp::Samples Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControlsTestApp
  • Samples
Namespaces | Classes

MUXControlsTestApp::Samples Namespace Reference

Namespaces

namespace | Model
namespace | Selection

Classes

class | ActivityFeedLayout
This is a custom layout that displays elements in two different sizes wide (w) and narrow (n). More...
class | ActivityFeedLayoutState
class | ActivityFeedSamplePage
class | AnimationsDemoPage
class | BasicDemo
class | Category
class | CircleLayout
class | CircleLayoutSamplePage
class | CollectionChangeDemo
class | Defaults
class | DelegatingItemsSource
class | DisposableUserControl
class | ElementsInItemsSourcePage
class | FixedSizeItem
class | FlowLayoutDemoPage
class | Item
class | ItemsViewWithDataPage
class | ItemTemplateDemo
class | KeyboardNavigationSample
class | LayoutHelper
class | LinedFlowLayoutDemo
class | MyCollection
class | MyData
class | MyItem
class | MyItemsRepeater
class | MySelector
class | NonVirtualStackLayout
class | NonVirtualStackLayoutSamplePage
class | ObjectModelTestPage
class | Person
class | PersonDataSource
class | PersonElementFactory
class | PinterestLayout
class | PinterestLayoutSamplePage
class | RadialItemCollectionTransitionProvider
class | RecipeElementFactory
class | ScaleAnimatedVerticalListDemo
class | SortingAndFilteringPage
class | StoreDemoPage
class | StoreMockData
class | UICollection
class | UniformGridLayoutDemo
class | VariableSizedItemsPage
class | VariableSizeItem
class | VirtualizingStackLayout
class | VirtualizingStackLayoutSamplePage
class | VirtualizingUniformStackLayout
class | VirtualizingUniformStackLayoutSamplePage
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestApp::Samples::Model Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControlsTestApp
  • Samples
  • Model
Classes

MUXControlsTestApp::Samples::Model Namespace Reference

Classes

class | Recipe
class | RecipeGroup
class | Year
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestApp::Samples::Selection Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControlsTestApp
  • Samples
  • Selection
Classes

MUXControlsTestApp::Samples::Selection Namespace Reference

Classes

class | BoolToBrushConverter
class | BoolToVisibilityConverter
class | Data
class | FlatSample
class | GroupedRepeaterItem
class | GroupedRepeaterItemAutomationPeer
class | GroupedSample
class | RepeaterItem
class | RepeaterItemAutomationPeer
class | SelectionContainer
class | SelectionContainerAutomationPeer
class | TreeViewItem
class | TreeViewItemAutomationPeer
class | TreeViewSample
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestApp::Utilities Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControlsTestApp
  • Utilities
Classes

MUXControlsTestApp::Utilities Namespace Reference

Classes

class | BiDirectionalScrollController
class | BiDirectionalScrollControllerScrollingScrollCompletedEventArgs
class | CompositionScrollController
class | CompositionScrollControllerOffsetChangeCompletedEventArgs
class | CompositionScrollControllerPanningInfo
class | ExpressionAnimationStatusChange
class | ScrollPresenterTestHooksHelper
class | ScrollViewTestHooksHelper
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MUXControlsTestApp::Utils Namespace Reference

  • Namespace List
  • Namespace Members
  • MUXControlsTestApp
  • Utils
Classes

MUXControlsTestApp::Utils Namespace Reference

Classes

class | DefaultItemCollectionTransitionProvider
class | ResetableCollection-g
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Private Namespace Reference

  • Namespace List
  • Namespace Members
Functions

Private Namespace Reference

Functions

PROVIDE_DEPENDENCY (XamlRuntimeType)

Function Documentation

Private::PROVIDE_DEPENDENCY ( XamlRuntimeType )
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PTR_TestUI Namespace Reference

  • Namespace List
  • Namespace Members
Classes

PTR_TestUI Namespace Reference

Classes

class PullToRefreshPage
An empty page that can be used on its own or navigated to within a Frame. More...
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons_TestUI Namespace Reference

  • Namespace List
  • Namespace Members
Classes

RadioButtons_TestUI Namespace Reference

Classes

class | RadioButtonsCaseBundle
class | RadioButtonsFocusPage
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RefreshVizualizer_TestUI Namespace Reference

  • Namespace List
  • Namespace Members
Classes

RefreshVizualizer_TestUI Namespace Reference

Classes

class | RefreshInfoProviderImplementation
class | SliderRefreshInfoProviderAdapter
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RuntimeProfiler Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Enumerations | Functions | Variables

RuntimeProfiler Namespace Reference

Classes

class | CMethodProfileGroup
class | CMethodProfileGroupBase
struct | FunctionTelemetryCount
struct | ProfileGroupInfo

Enumerations

enum | ProfileGroup { PG_Class = 0 }
enum ProfilerClassId {
ProfId_ColorPicker = 0, ProfId_NavigationView, ProfId_ParallaxView, ProfId_PersonPicture,
ProfId_RefreshContainer, ProfId_RefreshVisualizer, ProfId_RatingControl, ProfId_SwipeControl,
ProfId_SwipeItem, ProfId_TreeView, ProfId_TwoPaneView, ProfId_Reveal,
ProfId_Acrylic, ProfId_SplitButton, ProfId_DropDownButton, ProfId_CommandBarFlyout,
ProfId_TextCommandBarFlyout, ProfId_RadioButtons, ProfId_RadioMenuFlyoutItem, ProfId_ItemsRepeater,
ProfId_TeachingTip, ProfId_AnimatedVisualPlayer, ProfId_NonVirtualizingLayout, ProfId_StackLayout,
ProfId_UniformGridLayout, ProfId_VirtualizingLayout, ProfId_ItemsRepeaterScrollHost, ProfId_TabView,
ProfId_TabViewItem, ProfId_ProgressBar, ProfId_ProgressRing, ProfId_NumberBox,
ProfId_RadialGradientBrush, ProfId_InfoBar, ProfId_Expander, ProfId_PagerControl,
ProfId_BreadcrumbBar, ProfId_BreadcrumbBarItem, ProfId_PipsPager, ProfId_ImageIcon,
ProfId_AnimatedIcon, ProfId_InfoBadge, ProfId_WebView2, ProfId_MicaController,
ProfId_ScrollPresenter, ProfId_ScrollView, ProfId_ItemsView, ProfId_ItemContainer,
ProfId_LinedFlowLayout, ProfId_AnnotatedScrollBar, ProfId_MapControl, ProfId_SelectorBar,
ProfId_TitleBar, ProfId_InkCanvas, ProfId_Size
}
enum ProfilerMemberId {
ProfMemberId_Acrylic_TintLuminosityOpacity_Changed = 0, ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation, ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation, ProfMemberId_TeachingTip_TipDidNotOpenDueToSize,
ProfMemberId_Size
}

Functions

DEFINE_PROFILEGROUP (gGroupClasses, PG_Class, ProfId_Size+ProfMemberId_Size)
void | FireEvent (bool bSuspend) noexcept
void | InitializeRuntimeProfiler ()
void | RegisterMethod (ProfileGroup group, UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept
VOID CALLBACK | TPTimerCallback (PTP_CALLBACK_INSTANCE, PVOID, PTP_TIMER) noexcept
void | UninitializeRuntimeProfiler ()

Variables

constexpr auto | EventFrequency = 20min
struct
RuntimeProfiler::ProfileGroupInfo 		gProfileGroups []

Enumeration Type Documentation

enum ProfileGroup
Enumerator:
PG_Class

Definition at line 7 of file RuntimeProfiler.h.

    {
        PG_Class = 0
    } ProfileGroup;

enum ProfilerClassId
Enumerator:
ProfId_ColorPicker
ProfId_NavigationView
ProfId_ParallaxView
ProfId_PersonPicture
ProfId_RefreshContainer
ProfId_RefreshVisualizer
ProfId_RatingControl
ProfId_SwipeControl
ProfId_SwipeItem
ProfId_TreeView
ProfId_TwoPaneView
ProfId_Reveal
ProfId_Acrylic
ProfId_SplitButton
ProfId_DropDownButton
ProfId_CommandBarFlyout
ProfId_TextCommandBarFlyout
ProfId_RadioButtons
ProfId_RadioMenuFlyoutItem
ProfId_ItemsRepeater
ProfId_TeachingTip
ProfId_AnimatedVisualPlayer
ProfId_NonVirtualizingLayout
ProfId_StackLayout
ProfId_UniformGridLayout
ProfId_VirtualizingLayout
ProfId_ItemsRepeaterScrollHost
ProfId_TabView
ProfId_TabViewItem
ProfId_ProgressBar
ProfId_ProgressRing
ProfId_NumberBox
ProfId_RadialGradientBrush
ProfId_InfoBar
ProfId_Expander
ProfId_PagerControl
ProfId_BreadcrumbBar
ProfId_BreadcrumbBarItem
ProfId_PipsPager
ProfId_ImageIcon
ProfId_AnimatedIcon
ProfId_InfoBadge
ProfId_WebView2
ProfId_MicaController
ProfId_ScrollPresenter
ProfId_ScrollView
ProfId_ItemsView
ProfId_ItemContainer
ProfId_LinedFlowLayout
ProfId_AnnotatedScrollBar
ProfId_MapControl
ProfId_SelectorBar
ProfId_TitleBar
ProfId_InkCanvas
ProfId_Size

Definition at line 15 of file RuntimeProfiler.h.

    {
        ProfId_ColorPicker = 0,
        ProfId_NavigationView,
        ProfId_ParallaxView,
        ProfId_PersonPicture,
        ProfId_RefreshContainer,
        ProfId_RefreshVisualizer,
        ProfId_RatingControl,
        ProfId_SwipeControl,
        ProfId_SwipeItem,
        ProfId_TreeView,
        ProfId_TwoPaneView,
        ProfId_Reveal,
        ProfId_Acrylic,
        ProfId_SplitButton,
        ProfId_DropDownButton,
        ProfId_CommandBarFlyout,
        ProfId_TextCommandBarFlyout,
        ProfId_RadioButtons,
        ProfId_RadioMenuFlyoutItem,
        ProfId_ItemsRepeater,
        ProfId_TeachingTip,
        ProfId_AnimatedVisualPlayer,
        ProfId_NonVirtualizingLayout,
        ProfId_StackLayout,
        ProfId_UniformGridLayout,
        ProfId_VirtualizingLayout,
        ProfId_ItemsRepeaterScrollHost,
        ProfId_TabView,
        ProfId_TabViewItem,
        ProfId_ProgressBar,
        ProfId_ProgressRing,
        ProfId_NumberBox,
        ProfId_RadialGradientBrush,
        ProfId_InfoBar,
        ProfId_Expander,
        ProfId_PagerControl,
        ProfId_BreadcrumbBar,
        ProfId_BreadcrumbBarItem,
        ProfId_PipsPager,
        ProfId_ImageIcon,
        ProfId_AnimatedIcon,
        ProfId_InfoBadge,
        ProfId_WebView2,
        ProfId_MicaController,
        ProfId_ScrollPresenter,
        ProfId_ScrollView,
        ProfId_ItemsView,
        ProfId_ItemContainer,
        ProfId_LinedFlowLayout,
        ProfId_AnnotatedScrollBar,
        ProfId_MapControl,
        ProfId_SelectorBar,
        ProfId_TitleBar,
        ProfId_InkCanvas,
        ProfId_Size // ProfId_Size is the last always.
    } ProfilerClassId;

enum ProfilerMemberId
Enumerator:
ProfMemberId_Acrylic_TintLuminosityOpacity_Changed
ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation
ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation
ProfMemberId_TeachingTip_TipDidNotOpenDueToSize
ProfMemberId_Size

Definition at line 75 of file RuntimeProfiler.h.

    {
        ProfMemberId_Acrylic_TintLuminosityOpacity_Changed = 0,
        ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation,
        ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation,
        ProfMemberId_TeachingTip_TipDidNotOpenDueToSize,
        ProfMemberId_Size
    } ProfilerMemberId;

Function Documentation

RuntimeProfiler::DEFINE_PROFILEGROUP | ( | gGroupClasses | ,
 |  | PG_Class | ,
 |  | ProfId_Size+ | ProfMemberId_Size
 | ) |  |
void FireEvent ( bool bSuspend )
void RuntimeProfiler::InitializeRuntimeProfiler ( )

Definition at line 230 of file RuntimeProfiler.cpp.

    {
        g_pTimer = ::CreateThreadpoolTimer(TPTimerCallback, nullptr, nullptr);

        if (nullptr != g_pTimer)
        {
            LARGE_INTEGER   lidueTime;
            FILETIME        ftdueTime;

            //  Setting periodic timer.  Using negative time in 100 nanosecond
            //  intervals to indicate relative time.
            lidueTime.QuadPart = -10000 * (LONGLONG)(std::chrono::milliseconds(EventFrequency).count());

            ftdueTime.dwHighDateTime = (DWORD)(lidueTime.HighPart);
            ftdueTime.dwLowDateTime  = lidueTime.LowPart;

            //  Setting the callback window length to 60 seconds since the
            //  timing of the event is not critical
            SetThreadpoolTimer(g_pTimer, &ftdueTime, (DWORD)(std::chrono::milliseconds(EventFrequency).count()), 60 * 1000);
        }

        g_runtimeProfilerInitialized = g_pTimer != nullptr;
    }

void RegisterMethod | ( | ProfileGroup | group,
 |  | UINT16 | uTypeIndex,
 |  | UINT16 | uMethodIndex,
 |  | volatile LONG * | pCount
 | ) |  |
VOID CALLBACK RuntimeProfiler::TPTimerCallback | ( | PTP_CALLBACK_INSTANCE | ,
 |  | PVOID | ,
 |  | PTP_TIMER |
 | ) |  |

Definition at line 204 of file RuntimeProfiler.cpp.

    {
        FireEvent(false);
    }

void UninitializeRuntimeProfiler ( )

Variable Documentation

constexpr auto EventFrequency = 20min

Definition at line 194 of file RuntimeProfiler.cpp.

struct RuntimeProfiler::ProfileGroupInfo gProfileGroups[]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: StringUtil Namespace Reference

  • Namespace List
  • Namespace Members
Functions

StringUtil Namespace Reference

Functions

winrt::hstring | FormatString (std::wstring_view formatString,...)
std::string | Utf16ToUtf8 (const std::wstring_view &utf16Str)
std::wstring | Utf8ToUtf16 (const std::string_view &utf8Str)

Function Documentation

winrt::hstring FormatString | ( | std::wstring_view | formatString,
 |  |  | ...
 | ) |  |

Formats a given string with the desired parameter list.

Parameters:
formatString The format string.
... The parameter list of format args.
Returns:
The formatted string.

Definition at line 7 of file Utils.cpp.

{
    va_list pArgs;
    va_start(pArgs, formatString);

    LPVOID formattedString = nullptr;

    // Format the string
    FormatMessage(
        FORMAT_MESSAGE_ALLOCATE_BUFFER |
        FORMAT_MESSAGE_FROM_STRING,
        formatString.data(),
        0,
        0,
        (LPTSTR)&formattedString,
        0,
        &pArgs);

    va_end(pArgs);

    winrt::hstring result((LPTSTR)formattedString);
    LocalFree(formattedString);

    return result;
}

std::string Utf16ToUtf8 ( const std::wstring_view & utf16Str )

Definition at line 56 of file Utils.cpp.

{
    std::string converted;
    if (utf16Str.size() > 0)
    {
        const int length = WideCharToMultiByte(CP_UTF8, 0, utf16Str.data(), (int)utf16Str.size(), nullptr, 0, nullptr, nullptr);
        if (length > 0)
        {
            converted.resize(length);
            if (WideCharToMultiByte(CP_UTF8, 0, utf16Str.data(), (int)utf16Str.size(), converted.data(), (int)converted.size(), nullptr, nullptr) == 0)
            {
                winrt::throw_last_error();
            }
        }
        else
        {
            winrt::throw_last_error();
        }
    }

    return converted;
}

std::wstring Utf8ToUtf16 ( const std::string_view & utf8Str )

Definition at line 33 of file Utils.cpp.

{
    std::wstring converted;
    if (utf8Str.size() > 0)
    {
        const int length = MultiByteToWideChar(CP_UTF8, 0, utf8Str.data(), (int)utf8Str.size(), nullptr, 0);
        if (length > 0)
        {
            converted.resize(length);
            if (MultiByteToWideChar(CP_UTF8, 0, utf8Str.data(), (int)utf8Str.size(), converted.data(), (int)converted.size()) == 0)
            {
                winrt::throw_last_error();
            }
        }
        else
        {
            winrt::throw_last_error();
        }
    }

    return converted;
}

Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl_TestUI Namespace Reference

  • Namespace List
  • Namespace Members
Classes

SwipeControl_TestUI Namespace Reference

Classes

class TestCommand
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TypeLogging Namespace Reference

  • Namespace List
  • Namespace Members
Functions

TypeLogging Namespace Reference

Functions

winrt::hstring | AnimationModeToString (const winrt::ScrollingAnimationMode &animationMode)
winrt::hstring | ChainingModeToString (const winrt::ScrollingChainMode &chainingMode)
winrt::hstring | Float2ToString (const winrt::float2 &v2)
winrt::hstring | FocusStateToString (const winrt::FocusState &focusState)
winrt::hstring | InputKindToString (const winrt::ScrollingInputKinds &inputKind)
winrt::hstring | InteractionTrackerAsyncOperationTriggerToString (InteractionTrackerAsyncOperationTrigger operationTrigger)
winrt::hstring | InteractionTrackerAsyncOperationTypeToString (InteractionTrackerAsyncOperationType operationType)
winrt::hstring | ItemContainerInteractionTriggerToString (const winrt::ItemContainerInteractionTrigger &interactionTrigger)
winrt::hstring | ItemContainerMultiSelectModeToString (const winrt::ItemContainerMultiSelectMode &multiSelectMode)
winrt::hstring | KeyRoutedEventArgsToString (const winrt::KeyRoutedEventArgs &eventArgs)
winrt::hstring | NullableFloat2ToString (const winrt::IReference< winrt::float2 > &nv2)
winrt::hstring | NullableFloatToString (const winrt::IReference< float > &nf)
winrt::hstring | OrientationToString (const winrt::Orientation &orientation)
winrt::hstring | PointerDeviceTypeToString (const winrt::PointerDeviceType &pointerDeviceKind)
winrt::hstring | PointerPointToString (const winrt::PointerPoint &pointerPoint, bool verbose)
winrt::hstring | PointerUpdateKindToString (const winrt::PointerUpdateKind &pointerUpdateKind)
winrt::hstring | RailingModeToString (const winrt::ScrollingRailMode &railingMode)
winrt::hstring | RectToString (const winrt::Rect &rect)
winrt::hstring | ScrollAmountToString (const winrt::ScrollAmount &scrollAmount)
winrt::hstring | ScrollBarVisibilityToString (const winrt::ScrollingScrollBarVisibility &scrollBarVisibility)
winrt::hstring | ScrollEventTypeToString (const winrt::ScrollEventType &scrollEventType)
winrt::hstring | ScrollingIndicatorModeToString (const winrt::ScrollingIndicatorMode &indicatorMode)
winrt::hstring | ScrollModeToString (const winrt::ScrollingScrollMode &scrollMode)
winrt::hstring | ScrollOptionsToString (const winrt::ScrollingScrollOptions &options)
winrt::hstring | ScrollPresenterViewChangeResultToString (ScrollPresenterViewChangeResult result)
winrt::hstring | ScrollPresenterViewKindToString (ScrollPresenterViewKind viewKind)
winrt::hstring | SizeToString (const winrt::Size &size)
winrt::hstring | SnapPointsModeToString (const winrt::ScrollingSnapPointsMode &snapPointsMode)
winrt::hstring | ZoomModeToString (const winrt::ScrollingZoomMode &zoomMode)
winrt::hstring | ZoomOptionsToString (const winrt::ScrollingZoomOptions &options)

Function Documentation

winrt::hstring AnimationModeToString ( const winrt::ScrollingAnimationMode & animationMode )
winrt::hstring ChainingModeToString ( const winrt::ScrollingChainMode & chainingMode )
winrt::hstring Float2ToString ( const winrt::float2 & v2 )
winrt::hstring FocusStateToString ( const winrt::FocusState & focusState )
winrt::hstring InputKindToString ( const winrt::ScrollingInputKinds & inputKind )
winrt::hstring InteractionTrackerAsyncOperationTriggerToString ( InteractionTrackerAsyncOperationTrigger operationTrigger )
winrt::hstring InteractionTrackerAsyncOperationTypeToString ( InteractionTrackerAsyncOperationType operationType )
winrt::hstring ItemContainerInteractionTriggerToString ( const winrt::ItemContainerInteractionTrigger & interactionTrigger )
winrt::hstring ItemContainerMultiSelectModeToString ( const winrt::ItemContainerMultiSelectMode & multiSelectMode )
winrt::hstring KeyRoutedEventArgsToString ( const winrt::KeyRoutedEventArgs & eventArgs )
winrt::hstring NullableFloat2ToString ( const winrt::IReference< winrt::float2 > & nv2 )
winrt::hstring NullableFloatToString ( const winrt::IReference< float > & nf )
winrt::hstring OrientationToString ( const winrt::Orientation & orientation )
winrt::hstring PointerDeviceTypeToString ( const winrt::PointerDeviceType & pointerDeviceKind )
winrt::hstring PointerPointToString | ( | const winrt::PointerPoint & | pointerPoint,
 |  | bool | verbose
 | ) |  |
winrt::hstring PointerUpdateKindToString ( const winrt::PointerUpdateKind & pointerUpdateKind )
winrt::hstring RailingModeToString ( const winrt::ScrollingRailMode & railingMode )
winrt::hstring RectToString ( const winrt::Rect & rect )
winrt::hstring ScrollAmountToString ( const winrt::ScrollAmount & scrollAmount )
winrt::hstring ScrollBarVisibilityToString ( const winrt::ScrollingScrollBarVisibility & scrollBarVisibility )
winrt::hstring ScrollEventTypeToString ( const winrt::ScrollEventType & scrollEventType )

Definition at line 118 of file TypeLogging.cpp.

{
    switch (scrollEventType)
    {
    case winrt::ScrollEventType::First:
        return L"First";
    case winrt::ScrollEventType::Last:
        return L"Last";
    case winrt::ScrollEventType::SmallDecrement:
        return L"SmallDecrement";
    case winrt::ScrollEventType::SmallIncrement:
        return L"SmallIncrement";
    case winrt::ScrollEventType::LargeDecrement:
        return L"LargeDecrement";
    case winrt::ScrollEventType::LargeIncrement:
        return L"LargeIncrement";
    case winrt::ScrollEventType::ThumbPosition:
        return L"ThumbPosition";
    case winrt::ScrollEventType::ThumbTrack:
        return L"ThumbTrack";
    case winrt::ScrollEventType::EndScroll:
        return L"EndScroll";
    default:
        MUX_ASSERT(false);

winrt::hstring ScrollingIndicatorModeToString ( const winrt::ScrollingIndicatorMode & indicatorMode )

Definition at line 146 of file TypeLogging.cpp.

{
    switch (indicatorMode)
    {
    case winrt::ScrollingIndicatorMode::None:
        return L"None";
    case winrt::ScrollingIndicatorMode::MouseIndicator:
        return L"MouseIndicator";
    case winrt::ScrollingIndicatorMode::TouchIndicator:
        return L"TouchIndicator";
    default:
        MUX_ASSERT(false);

winrt::hstring ScrollModeToString ( const winrt::ScrollingScrollMode & scrollMode )
winrt::hstring ScrollOptionsToString ( const winrt::ScrollingScrollOptions & options )
winrt::hstring ScrollPresenterViewChangeResultToString ( ScrollPresenterViewChangeResult result )
winrt::hstring ScrollPresenterViewKindToString ( ScrollPresenterViewKind viewKind )
winrt::hstring SizeToString ( const winrt::Size & size )
winrt::hstring SnapPointsModeToString ( const winrt::ScrollingSnapPointsMode & snapPointsMode )
winrt::hstring ZoomModeToString ( const winrt::ScrollingZoomMode & zoomMode )
winrt::hstring ZoomOptionsToString ( const winrt::ScrollingZoomOptions & options )
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Util Namespace Reference

  • Namespace List
  • Namespace Members
Functions

Util Namespace Reference

Functions

winrt::Visibility constexpr VisibilityFromBool (bool visible)

Function Documentation

winrt::Visibility constexpr Util::VisibilityFromBool ( bool visible ) [inline]

Definition at line 66 of file Utils.h.

    {
        return visible ? winrt::Visibility::Visible : winrt::Visibility::Collapsed;
    }

Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2Temporary Namespace Reference

  • Namespace List
  • Namespace Members
Classes

WebView2Temporary Namespace Reference

Classes

class WebView2RenderingVerifier
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2Utility Namespace Reference

  • Namespace List
  • Namespace Members
Functions

WebView2Utility Namespace Reference

Functions

WPARAM | PackIntoWin32StyleMouseArgs_wparam (const UINT message, const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs &args, winrt::PointerPoint pointerPoint)
LPARAM | PackIntoWin32StylePointerArgs_lparam (const UINT message, const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs &args, winrt::Windows::Foundation::Point point)

Function Documentation

WPARAM WebView2Utility::PackIntoWin32StyleMouseArgs_wparam | ( | const UINT | message,
 |  | const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs & | args,
 |  | winrt::PointerPoint | pointerPoint
 | ) |  |

Definition at line 26 of file WebView2Utility.h.

    {
        WORD lowWord = 0x0;       // unsigned modifier flags
        short highWord = 0x0;     // signed wheel delta

        winrtsystem::VirtualKeyModifiers modifiers(args.KeyModifiers());

        // can support cases like Ctrl|Alt + Scroll where Alt will be ignored and it will be treated as Ctrl + Scroll
        if (static_cast<int>(modifiers) & static_cast<int>(winrtsystem::VirtualKeyModifiers::Control))
        {
            lowWord |= MK_CONTROL;
        }
        if (static_cast<int>(modifiers) & static_cast<int>(winrtsystem::VirtualKeyModifiers::Shift))
        {
            lowWord |= MK_SHIFT;
        }

        winrt::PointerPointProperties properties{ pointerPoint.Properties() };

        if (properties.IsLeftButtonPressed())
        {
            lowWord |= MK_LBUTTON;
        }
        if (properties.IsRightButtonPressed())
        {
            lowWord |= MK_RBUTTON;
        }
        if (properties.IsMiddleButtonPressed())
        {
            lowWord |= MK_MBUTTON;
        }
        if (properties.IsXButton1Pressed())
        {
            lowWord |= MK_XBUTTON1;
        }
        if (properties.IsXButton2Pressed())
        {
            lowWord |= MK_XBUTTON2;
        }

        // Mouse wheel : https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-mousewheel
        if (message == WM_MOUSEWHEEL || message == WM_MOUSEHWHEEL)
        {
            // TODO_WebView2 : See if this needs to be multiplied with scale for different dpi scenarios
            highWord = static_cast<short>(properties.MouseWheelDelta());
        }
        else if (message == WM_XBUTTONDOWN || message == WM_XBUTTONUP)
        {
            // highWord Specifies which of the two XButtons is referenced by the message
            winrt::PointerUpdateKind pointerUpdateKind{ properties.PointerUpdateKind() };
            if (pointerUpdateKind == winrt::PointerUpdateKind::XButton1Pressed ||
                pointerUpdateKind == winrt::PointerUpdateKind::XButton1Released)
            {
                highWord |= XBUTTON1;
            }
            else if (pointerUpdateKind == winrt::PointerUpdateKind::XButton2Pressed ||
                     pointerUpdateKind == winrt::PointerUpdateKind::XButton2Released)
            {
                highWord |= XBUTTON2;
            }
        }

        WPARAM wParam = MAKEWPARAM(lowWord, highWord);
        return wParam;
    }

LPARAM WebView2Utility::PackIntoWin32StylePointerArgs_lparam | ( | const UINT | message,
 |  | const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs & | args,
 |  | winrt::Windows::Foundation::Point | point
 | ) |  |

Definition at line 15 of file WebView2Utility.h.

    {
        // These are the same for WM_POINTER and WM_MOUSE based events
        // Pointer: https://msdn.microsoft.com/en-us/ie/hh454929(v=vs.80)
        // Mouse: https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-mousemove
        LPARAM lParam = MAKELPARAM((signed int)(point.X), (signed int)(point.Y));
        return lParam;
    }

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt Namespace Reference

  • Namespace List
  • Namespace Members
Namespaces | Functions

winrt Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
namespace | Microsoft
namespace | Windows

Functions

template<typename T >
hstring | hstring_name_of () noexcept

Function Documentation

hstring winrt::hstring_name_of ( ) [inline]

Definition at line 13 of file CppWinRTHelpers.h.

    {
        return hstring(winrt::name_of<T>());
    }

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • factory_implementation

winrt::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • implementation

winrt::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
Namespaces

winrt::Microsoft Namespace Reference

Namespaces

namespace | Experimental
namespace | UI
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
Namespaces

winrt::Microsoft::Experimental Namespace Reference

Namespaces

namespace UI
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
Namespaces

winrt::Microsoft::Experimental::UI Namespace Reference

Namespaces

namespace Xaml
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
Namespaces

winrt::Microsoft::Experimental::UI::Xaml Namespace Reference

Namespaces

namespace | Automation
namespace | Controls
namespace | Media
namespace | XamlTypeInfo
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Automation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Automation
Namespaces

winrt::Microsoft::Experimental::UI::Xaml::Automation Namespace Reference

Namespaces

namespace Peers
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Automation
  • Peers
Namespaces

winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Automation
  • Peers
  • factory_implementation

winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Automation
  • Peers
  • implementation

winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
Namespaces

winrt::Microsoft::Experimental::UI::Xaml::Controls Namespace Reference

Namespaces

namespace | AnimatedVisuals
namespace | factory_implementation
namespace | implementation
namespace | Primitives
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • AnimatedVisuals
Namespaces

winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • AnimatedVisuals
  • factory_implementation

winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • AnimatedVisuals
  • implementation

winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • factory_implementation

winrt::Microsoft::Experimental::UI::Xaml::Controls::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • implementation

winrt::Microsoft::Experimental::UI::Xaml::Controls::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • Primitives
Namespaces

winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • Primitives
  • factory_implementation

winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Controls
  • Primitives
  • implementation

winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Media Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Media
Namespaces

winrt::Microsoft::Experimental::UI::Xaml::Media Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Media::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Media
  • factory_implementation

winrt::Microsoft::Experimental::UI::Xaml::Media::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::Media::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • Media
  • implementation

winrt::Microsoft::Experimental::UI::Xaml::Media::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • XamlTypeInfo
Namespaces

winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • XamlTypeInfo
  • factory_implementation

winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • Experimental
  • UI
  • Xaml
  • XamlTypeInfo
  • implementation

winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
Namespaces

winrt::Microsoft::UI Namespace Reference

Namespaces

namespace | Private
namespace | Xaml
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Private Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Private
Namespaces

winrt::Microsoft::UI::Private Namespace Reference

Namespaces

namespace | Controls
namespace | Media
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Private::Controls Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Private
  • Controls
Namespaces

winrt::Microsoft::UI::Private::Controls Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Private::Controls::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Private
  • Controls
  • factory_implementation

winrt::Microsoft::UI::Private::Controls::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Private::Controls::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Private
  • Controls
  • implementation

winrt::Microsoft::UI::Private::Controls::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Private::Media Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Private
  • Media
Namespaces

winrt::Microsoft::UI::Private::Media Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Private::Media::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Private
  • Media
  • factory_implementation

winrt::Microsoft::UI::Private::Media::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Private::Media::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Private
  • Media
  • implementation

winrt::Microsoft::UI::Private::Media::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
Namespaces

winrt::Microsoft::UI::Xaml Namespace Reference

Namespaces

namespace | Automation
namespace | Controls
namespace | Media
namespace | XamlTypeInfo
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Automation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Automation
Namespaces

winrt::Microsoft::UI::Xaml::Automation Namespace Reference

Namespaces

namespace Peers
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Automation::Peers Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Automation
  • Peers
Namespaces

winrt::Microsoft::UI::Xaml::Automation::Peers Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Automation::Peers::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Automation
  • Peers
  • factory_implementation

winrt::Microsoft::UI::Xaml::Automation::Peers::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Automation::Peers::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Automation
  • Peers
  • implementation

winrt::Microsoft::UI::Xaml::Automation::Peers::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
Namespaces

winrt::Microsoft::UI::Xaml::Controls Namespace Reference

Namespaces

namespace | AnimatedVisuals
namespace | factory_implementation
namespace | implementation
namespace | Primitives
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • AnimatedVisuals
Namespaces

winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • AnimatedVisuals
  • factory_implementation

winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • AnimatedVisuals
  • implementation

winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • factory_implementation

winrt::Microsoft::UI::Xaml::Controls::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • implementation

winrt::Microsoft::UI::Xaml::Controls::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::Primitives Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • Primitives
Namespaces

winrt::Microsoft::UI::Xaml::Controls::Primitives Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::Primitives::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • Primitives
  • factory_implementation

winrt::Microsoft::UI::Xaml::Controls::Primitives::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Controls::Primitives::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Controls
  • Primitives
  • implementation

winrt::Microsoft::UI::Xaml::Controls::Primitives::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Media Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Media
Namespaces

winrt::Microsoft::UI::Xaml::Media Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Media::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Media
  • factory_implementation

winrt::Microsoft::UI::Xaml::Media::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::Media::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • Media
  • implementation

winrt::Microsoft::UI::Xaml::Media::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::XamlTypeInfo Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • XamlTypeInfo
Namespaces

winrt::Microsoft::UI::Xaml::XamlTypeInfo Namespace Reference

Namespaces

namespace | factory_implementation
namespace | implementation
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::XamlTypeInfo::factory_implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • XamlTypeInfo
  • factory_implementation

winrt::Microsoft::UI::Xaml::XamlTypeInfo::factory_implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Microsoft::UI::Xaml::XamlTypeInfo::implementation Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Microsoft
  • UI
  • Xaml
  • XamlTypeInfo
  • implementation

winrt::Microsoft::UI::Xaml::XamlTypeInfo::implementation Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Windows Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Windows
Namespaces

winrt::Windows Namespace Reference

Namespaces

namespace UI
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Windows::UI Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Windows
  • UI
Namespaces

winrt::Windows::UI Namespace Reference

Namespaces

namespace ViewManagement
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: winrt::Windows::UI::ViewManagement Namespace Reference

  • Namespace List
  • Namespace Members
  • winrt
  • Windows
  • UI
  • ViewManagement

winrt::Windows::UI::ViewManagement Namespace Reference

Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- _ -

  • __pad0__ : ABI::Windows::ApplicationModel::Core
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: File Index

  • File List
  • File Members

File List

Here is a list of all files with brief descriptions:
AnimatedIcon/AnimatedIcon.cpp [code]
AnimatedIcon/AnimatedIcon.h [code]
AnimatedIcon/AnimatedIcon.idl [code]
AnimatedIcon/AnimatedIconTestHooks.cpp [code]
AnimatedIcon/AnimatedIconTestHooks.h [code]
AnimatedIcon/AnimatedIconTestHooks.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.idl [code]
AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.cpp [code]
AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.h [code]
AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.idl [code]
AnimatedIcon/APITests/AnimatedIconTests.cs [code]
AnimatedIcon/APITests/MockAnimatedIconSource.cs [code]
AnimatedIcon/TestUI/AnimatedIconHost.cs [code]
AnimatedIcon/TestUI/AnimatedIconPage.xaml.cs [code]
AnimatedIcon/TestUI/BrightnessSun.cs [code]
AnimatedIcon/TestUI/ColorToSolidColorBrushConverter.cs [code]
AnimatedIcon/TestUI/DoubleToStringConverter.cs [code]
AnimatedIcon/TestUI/MockIRichAnimatedIconSource.cs [code]
AnimatedIcon/TestUI/ToggleAnimatedIconHost.cs [code]
AnimatedVisualPlayer/AnimatedVisualPlayer.cpp [code]
AnimatedVisualPlayer/AnimatedVisualPlayer.h [code]
AnimatedVisualPlayer/AnimatedVisualPlayer.idl [code]
AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.cpp [code]
AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.h [code]
AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.idl [code]
AnimatedVisualPlayer/inc/Constants.cs [code]
AnimatedVisualPlayer/InteractionTests/AnimatedVisualPlayerTests.cs [code]
AnimatedVisualPlayer/TestUI/AnimatedVisualPlayerPage.xaml.cs [code]
AnimatedVisualPlayer/TestUI/LottieLogo.cs [code]
AnimatedVisualPlayer/TestUI/nullsource.cs [code]
AnnotatedScrollBar/AnnotatedScrollBar.cpp [code]
AnnotatedScrollBar/AnnotatedScrollBar.h [code]
AnnotatedScrollBar/AnnotatedScrollBar.idl [code]
AnnotatedScrollBar/AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp [code]
AnnotatedScrollBar/AnnotatedScrollBarDetailLabelRequestedEventArgs.h [code]
AnnotatedScrollBar/AnnotatedScrollBarLabel.cpp [code]
AnnotatedScrollBar/AnnotatedScrollBarLabel.h [code]
AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.cpp [code]
AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.h [code]
AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.cpp [code]
AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.h [code]
AnnotatedScrollBar/AnnotatedScrollBarTrace.h [code]
AnnotatedScrollBar/APITests/AnnotatedScrollBarTests.cs [code]
AnnotatedScrollBar/InteractionTests/AnnotatedScrollBarInteractionTests.cs [code]
AnnotatedScrollBar/TestUI/AnnotatedScrollBarIScrollControllerPage.xaml.cs [code]
AnnotatedScrollBar/TestUI/AnnotatedScrollBarPage.xaml.cs [code]
AnnotatedScrollBar/TestUI/AnnotatedScrollBarRangeBasePage.xaml.cs [code]
AnnotatedScrollBar/TestUI/AnnotatedScrollBarSummaryPage.xaml.cs [code]
AutoSuggestBox/AutoSuggestBoxHelper.cpp [code]
AutoSuggestBox/AutoSuggestBoxHelper.h [code]
AutoSuggestBox/AutoSuggestBoxHelper.idl [code]
AutoSuggestBox/APITests/AutoSuggestBoxTests.cs [code]
AutoSuggestBox/InteractionTests/AutoSuggestBoxTests.cs [code]
AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml.cs [code]
Breadcrumb/BreadcrumbBar.cpp [code]
Breadcrumb/BreadcrumbBar.h [code]
Breadcrumb/BreadcrumbBar.idl [code]
Breadcrumb/BreadcrumbBarAutomationPeer.idl [code]
Breadcrumb/BreadcrumbBarElementFactory.cpp [code]
Breadcrumb/BreadcrumbBarElementFactory.h [code]
Breadcrumb/BreadcrumbBarItem.cpp [code]
Breadcrumb/BreadcrumbBarItem.h [code]
Breadcrumb/BreadcrumbBarItemAutomationPeer.cpp [code]
Breadcrumb/BreadcrumbBarItemAutomationPeer.h [code]
Breadcrumb/BreadcrumbBarItemClickedEventArgs.cpp [code]
Breadcrumb/BreadcrumbBarItemClickedEventArgs.h [code]
Breadcrumb/BreadcrumbItem.properties.cpp [code]
Breadcrumb/BreadcrumbItem.properties.h [code]
Breadcrumb/BreadcrumbIterable.cpp [code]
Breadcrumb/BreadcrumbIterable.h [code]
Breadcrumb/BreadcrumbIterator.cpp [code]
Breadcrumb/BreadcrumbIterator.h [code]
Breadcrumb/BreadcrumbLayout.cpp [code]
Breadcrumb/BreadcrumbLayout.h [code]
Breadcrumb/APITests/BreadcrumbTests.cs [code]
Breadcrumb/InteractionTests/BreadcrumbBarTests.cs [code]
Breadcrumb/TestUI/BreadcrumbBarAxeTestPage.xaml.cs [code]
Breadcrumb/TestUI/BreadcrumbBarPage.xaml.cs [code]
Breadcrumb/TestUI/TreeStructure.cs [code]
Collections/BindableVector.h [code]
Collections/HashMap.h [code]
Collections/Vector.h [code]
Collections/VectorChangedEventArgs.h [code]
Collections/VectorIterator.h [code]
ColorPicker/ColorChangedEventArgs.cpp [code]
ColorPicker/ColorChangedEventArgs.h [code]
ColorPicker/ColorHelpers.cpp [code]
ColorPicker/ColorHelpers.h [code]
ColorPicker/ColorPicker.cpp [code]
ColorPicker/ColorPicker.h [code]
ColorPicker/ColorPicker.idl [code]
ColorPicker/ColorPickerSlider.cpp [code]
ColorPicker/ColorPickerSlider.h [code]
ColorPicker/ColorPickerSlider.idl [code]
ColorPicker/ColorPickerSliderAutomationPeer.cpp [code]
ColorPicker/ColorPickerSliderAutomationPeer.h [code]
ColorPicker/ColorPickerSliderAutomationPeer.idl [code]
ColorPicker/ColorSpectrum.cpp [code]
ColorPicker/ColorSpectrum.h [code]
ColorPicker/ColorSpectrum.idl [code]
ColorPicker/ColorSpectrumAutomationPeer.cpp [code]
ColorPicker/ColorSpectrumAutomationPeer.h [code]
ColorPicker/ColorSpectrumAutomationPeer.idl [code]
ColorPicker/Common.idl [code]
ColorPicker/SpectrumBrush.cpp [code]
ColorPicker/SpectrumBrush.h [code]
ColorPicker/SpectrumBrush.idl [code]
ColorPicker/APITests/ColorPickerTests.cs [code]
ColorPicker/InteractionTests/ColorPickerTests.cs [code]
ColorPicker/TestUI/ColorPickerPage.xaml.cs [code]
ComboBox/ComboBoxHelper.cpp [code]
ComboBox/ComboBoxHelper.h [code]
ComboBox/ComboBoxHelper.idl [code]
ComboBox/APITests/ComboBoxTests.cs [code]
ComboBox/TestUI/ComboBoxPage.xaml.cs [code]
CommandBarFlyout/CommandBarFlyout.cpp [code]
CommandBarFlyout/CommandBarFlyout.h [code]
CommandBarFlyout/CommandBarFlyout.idl [code]
CommandBarFlyout/CommandBarFlyoutCommandBar.cpp [code]
CommandBarFlyout/CommandBarFlyoutCommandBar.h [code]
CommandBarFlyout/CommandBarFlyoutCommandBar.idl [code]
CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.cpp [code]
CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.h [code]
CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.cpp [code]
CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.h [code]
CommandBarFlyout/CommandBarFlyoutTrace.h [code]
CommandBarFlyout/TextCommandBarFlyout.cpp [code]
CommandBarFlyout/TextCommandBarFlyout.h [code]
CommandBarFlyout/APITests/CommandBarFlyoutTests.cs [code]
CommandBarFlyout/InteractionTests/CommandBarFlyoutTests.cs [code]
CommandBarFlyout/InteractionTests/TextCommandBarFlyoutTests.cs [code]
CommandBarFlyout/TestUI/CommandBarFlyoutMainPage.xaml.cs [code]
CommandBarFlyout/TestUI/CommandBarFlyoutPage.xaml.cs [code]
CommandBarFlyout/TestUI/ExtraCommandBarFlyoutPage.xaml.cs [code]
CommandBarFlyout/TestUI/TextCommandBarFlyoutPage.xaml.cs [code]
Common/AutoHandle.h [code]
Common/ColorConversion.cpp [code]
Common/ColorConversion.h [code]
Common/CornerRadiusFilterConverter.cpp [code]
Common/CornerRadiusFilterConverter.h [code]
Common/CornerRadiusFilterConverters.idl [code]
Common/CornerRadiusToThicknessConverter.cpp [code]
Common/CornerRadiusToThicknessConverter.h [code]
Common/CornerRadiusToThicknessConverter.idl [code]
Common/Flags_Enum.h [code]
Common/LifetimeHandler.cpp [code]
Common/LifetimeHandler.h [code]
Common/PointerInfo.h [code]
Common/PointerInfoRevokers.h [code]
Common/WinEventLogLevels.h [code]
CommonManaged/PlatformConfiguration.cs [code]
CommonStyles/APITests/BaselineResources2dot5stable.cs [code]
CommonStyles/APITests/CalendarViewTests.cs [code]
CommonStyles/APITests/CommonStylesTests.cs [code]
CommonStyles/InteractionTests/CommonStylesTests.cs [code]
CommonStyles/TestUI/AppBarPage.xaml.cs [code]
CommonStyles/TestUI/BlankPage.xaml.cs [code]
CommonStyles/TestUI/BorderThicknessPage.xaml.cs [code]
CommonStyles/TestUI/CalendarDatePickerPage.xaml.cs [code]
CommonStyles/TestUI/CalendarViewPage.xaml.cs [code]
CommonStyles/TestUI/CheckBoxPage.xaml.cs [code]
CommonStyles/TestUI/CommandBarCenterPage.xaml.cs [code]
CommonStyles/TestUI/CommandBarPage.xaml.cs [code]
CommonStyles/TestUI/CommandBarSummaryPage.xaml.cs [code]
CommonStyles/TestUI/CommonStylesPage.xaml.cs [code]
CommonStyles/TestUI/CompactPage.xaml.cs [code]
CommonStyles/TestUI/ContentDialogPage.xaml.cs [code]
CommonStyles/TestUI/CornerRadiusPage.xaml.cs [code]
CommonStyles/TestUI/DatePickerPage.xaml.cs [code]
CommonStyles/TestUI/FlatItemsControlPage.xaml.cs [code]
CommonStyles/TestUI/FlipViewPage.xaml.cs [code]
CommonStyles/TestUI/GridViewPage.xaml.cs [code]
CommonStyles/TestUI/GroupedItemsControlPage.xaml.cs [code]
CommonStyles/TestUI/GroupedListViewBasePage.xaml.cs [code]
CommonStyles/TestUI/ImagePage.xaml.cs [code]
CommonStyles/TestUI/InkToolbarPage.xaml.cs [code]
CommonStyles/TestUI/ItemsControlPage.xaml.cs [code]
CommonStyles/TestUI/ListViewAnchoringPage.xaml.cs [code]
CommonStyles/TestUI/ListViewBasePage.xaml.cs [code]
CommonStyles/TestUI/ListViewElementNameBindingPage.xaml.cs [code]
CommonStyles/TestUI/ListViewPage.xaml.cs [code]
CommonStyles/TestUI/MediaTransportControlsPage.xaml.cs [code]
CommonStyles/TestUI/MenuFlyoutPage.xaml.cs [code]
CommonStyles/TestUI/NestedGridViewsPage.xaml.cs [code]
CommonStyles/TestUI/NestedItemsControlsPage.xaml.cs [code]
CommonStyles/TestUI/NestedListViewsPage.xaml.cs [code]
CommonStyles/TestUI/NewWindowRootPage.xaml.cs [code]
CommonStyles/TestUI/PivotPage.xaml.cs [code]
CommonStyles/TestUI/ScrollBarPage.xaml.cs [code]
CommonStyles/TestUI/ScrollViewerPage.xaml.cs [code]
CommonStyles/TestUI/SliderPage.xaml.cs [code]
CommonStyles/TestUI/TextControlsPage.xaml.cs [code]
CommonStyles/TestUI/TimePickerPage.xaml.cs [code]
CommonStyles/TestUI/ToolTipPage.xaml.cs [code]
CommonStyles/TestUI/VisualPropertiesPage.xaml.cs [code]
CommonStyles/TestUI/VisualStatesPage.xaml.cs [code]
CommonStyles/TestUI/WindowPage.xaml.cs [code]
dll/CommandingHelpers.cpp [code]
dll/dllmain.cpp [code]
dll/DoubleUtil.cpp [code]
dll/FloatUtil.cpp [code]
dll/MUXControlsFactory.cpp [code]
dll/MUXControlsFactory.h [code]
dll/pch.cpp [code]
dll/pch.h [code]
dll/RegUtil.cpp [code]
dll/SharedHelpers.cpp [code]
dll/targetver.h [code]
dll/XamlControlsResources.cpp [code]
dll/XamlControlsResources.h [code]
dll/XamlMember.cpp [code]
dll/XamlMember.h [code]
dll/XamlMetadataDependencyLocator.cpp [code]
dll/XamlMetadataProvider.cpp [code]
dll/XamlMetadataProvider.h [code]
dll/XamlMetadataProviderGenerated.h [code]
dll/XamlType.cpp [code]
dll/XamlType.h [code]
DropDownButton/DropDownButton.cpp [code]
DropDownButton/DropDownButton.h [code]
DropDownButton/DropDownButton.idl [code]
DropDownButton/DropDownButtonAutomationPeer.cpp [code]
DropDownButton/DropDownButtonAutomationPeer.h [code]
DropDownButton/DropDownButtonAutomationPeer.idl [code]
DropDownButton/InteractionTests/DropDownButtonTests.cs [code]
DropDownButton/TestUI/DropDownButtonPage.xaml.cs [code]
Effects/microsoft.ui.private.composition.effects.idl [code]
Effects/microsoft.ui.private.composition.effects_impl.h [code]
Expander/Expander.cpp [code]
Expander/Expander.h [code]
Expander/Expander.idl [code]
Expander/ExpanderAutomationPeer.cpp [code]
Expander/ExpanderAutomationPeer.h [code]
Expander/ExpanderAutomationPeer.idl [code]
Expander/ExpanderTemplateSettings.cpp [code]
Expander/ExpanderTemplateSettings.h [code]
Expander/APITests/ExpanderTests.cs [code]
Expander/InteractionTests/ExpanderTests.cs [code]
Expander/TestUI/ExpanderPage.xaml.cs [code]
Generated/AcrylicBrush.properties.cpp [code]
Generated/AcrylicBrush.properties.h [code]
Generated/AcrylicTestApi.properties.cpp [code]
Generated/AnimatedAcceptVisualSource.properties.cpp [code]
Generated/AnimatedBackVisualSource.properties.cpp [code]
Generated/AnimatedChevronDownSmallVisualSource.properties.cpp [code]
Generated/AnimatedChevronRightDownSmallVisualSource.properties.cpp [code]
Generated/AnimatedChevronUpDownSmallVisualSource.properties.cpp [code]
Generated/AnimatedFindVisualSource.properties.cpp [code]
Generated/AnimatedGlobalNavigationButtonVisualSource.properties.cpp [code]
Generated/AnimatedIcon.properties.cpp [code]
Generated/AnimatedIcon.properties.h [code]
Generated/AnimatedIconSource.properties.cpp [code]
Generated/AnimatedIconSource.properties.h [code]
Generated/AnimatedIconTestHooks.properties.cpp [code]
Generated/AnimatedSettingsVisualSource.properties.cpp [code]
Generated/AnimatedVisualPlayer.properties.cpp [code]
Generated/AnimatedVisualPlayer.properties.h [code]
Generated/AnimatedVisualPlayerAutomationPeer.properties.cpp [code]
Generated/AnnotatedScrollBar.properties.cpp [code]
Generated/AnnotatedScrollBar.properties.h [code]
Generated/AnnotatedScrollBarLabel.properties.cpp [code]
Generated/AutoSuggestBoxHelper.properties.cpp [code]
Generated/AutoSuggestBoxHelper.properties.h [code]
Generated/BreadcrumbBar.properties.cpp [code]
Generated/BreadcrumbBar.properties.h [code]
Generated/BreadcrumbBarItem.properties.cpp [code]
Generated/BreadcrumbBarItemAutomationPeer.properties.cpp [code]
Generated/ButtonInteraction.properties.cpp [code]
Generated/ButtonInteraction.properties.h [code]
Generated/ColorPicker.properties.cpp [code]
Generated/ColorPicker.properties.h [code]
Generated/ColorPickerSlider.properties.cpp [code]
Generated/ColorPickerSlider.properties.h [code]
Generated/ColorPickerSliderAutomationPeer.properties.cpp [code]
Generated/ColorSpectrum.properties.cpp [code]
Generated/ColorSpectrum.properties.h [code]
Generated/ColorSpectrumAutomationPeer.properties.cpp [code]
Generated/ColumnMajorUniformToLargestGridLayout.properties.cpp [code]
Generated/ColumnMajorUniformToLargestGridLayout.properties.h [code]
Generated/ComboBoxHelper.properties.cpp [code]
Generated/ComboBoxHelper.properties.h [code]
Generated/CommandBarFlyout.properties.cpp [code]
Generated/CommandBarFlyoutCommandBar.properties.cpp [code]
Generated/CommandBarFlyoutCommandBar.properties.h [code]
Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.cpp [code]
Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.h [code]
Generated/CommandBarFlyoutCommandBarTemplateSettings.properties.cpp [code]
Generated/CommandBarFlyoutCommandBarTemplateSettings.properties.h [code]
Generated/CornerRadiusFilterConverter.properties.cpp [code]
Generated/CornerRadiusFilterConverter.properties.h [code]
Generated/CornerRadiusToThicknessConverter.properties.cpp [code]
Generated/CornerRadiusToThicknessConverter.properties.h [code]
Generated/DesktopAcrylicBackdrop.properties.cpp [code]
Generated/DisplayRegionHelperTestApi.properties.cpp [code]
Generated/DropDownButton.properties.cpp [code]
Generated/DropDownButtonAutomationPeer.properties.cpp [code]
Generated/ElementFactory.properties.cpp [code]
Generated/Expander.properties.cpp [code]
Generated/Expander.properties.h [code]
Generated/ExpanderAutomationPeer.properties.cpp [code]
Generated/ExpanderTemplateSettings.properties.cpp [code]
Generated/ExpanderTemplateSettings.properties.h [code]
Generated/FlowLayout.properties.cpp [code]
Generated/FlowLayout.properties.h [code]
Generated/FlowLayoutState.properties.cpp [code]
Generated/ImageIcon.properties.cpp [code]
Generated/ImageIcon.properties.h [code]
Generated/ImageIconSource.properties.cpp [code]
Generated/ImageIconSource.properties.h [code]
Generated/IndexPath.properties.cpp [code]
Generated/InfoBadge.properties.cpp [code]
Generated/InfoBadge.properties.h [code]
Generated/InfoBadgeTemplateSettings.properties.cpp [code]
Generated/InfoBadgeTemplateSettings.properties.h [code]
Generated/InfoBar.properties.cpp [code]
Generated/InfoBar.properties.h [code]
Generated/InfoBarAutomationPeer.properties.cpp [code]
Generated/InfoBarClosedEventArgs.properties.cpp [code]
Generated/InfoBarClosingEventArgs.properties.cpp [code]
Generated/InfoBarPanel.properties.cpp [code]
Generated/InfoBarPanel.properties.h [code]
Generated/InfoBarTemplateSettings.properties.cpp [code]
Generated/InfoBarTemplateSettings.properties.h [code]
Generated/InkCanvas.properties.cpp [code]
Generated/InkCanvas.properties.h [code]
Generated/InkCanvasAutomationPeer.properties.cpp [code]
Generated/InkToolBar.properties.cpp [code]
Generated/InkToolBar.properties.h [code]
Generated/InkToolBarAutomationPeer.properties.cpp [code]
Generated/InkToolBarBallpointPenButton.properties.cpp [code]
Generated/InkToolBarCustomPen.properties.cpp [code]
Generated/InkToolBarCustomPenButton.properties.cpp [code]
Generated/InkToolBarCustomPenButton.properties.h [code]
Generated/InkToolBarCustomToggleButton.properties.cpp [code]
Generated/InkToolBarCustomToolButton.properties.cpp [code]
Generated/InkToolBarCustomToolButton.properties.h [code]
Generated/InkToolBarEraserButton.properties.cpp [code]
Generated/InkToolBarEraserButton.properties.h [code]
Generated/InkToolBarFlyoutItem.properties.cpp [code]
Generated/InkToolBarFlyoutItem.properties.h [code]
Generated/InkToolBarFlyoutItemAutomationPeer.properties.cpp [code]
Generated/InkToolBarHighlighterButton.properties.cpp [code]
Generated/InkToolBarMenuButton.properties.cpp [code]
Generated/InkToolBarMenuButton.properties.h [code]
Generated/InkToolBarMenuButtonAutomationPeer.properties.cpp [code]
Generated/InkToolBarPenButton.properties.cpp [code]
Generated/InkToolBarPenButton.properties.h [code]
Generated/InkToolBarPencilButton.properties.cpp [code]
Generated/InkToolBarPenConfigurationControl.properties.cpp [code]
Generated/InkToolBarPenConfigurationControl.properties.h [code]
Generated/InkToolBarStencilButton.properties.cpp [code]
Generated/InkToolBarStencilButton.properties.h [code]
Generated/InkToolBarToggleButton.properties.cpp [code]
Generated/InkToolBarToolButton.properties.cpp [code]
Generated/InkToolBarToolButton.properties.h [code]
Generated/InkToolBarToolButtonAutomationPeer.properties.cpp [code]
Generated/ItemCollectionTransitionProvider.properties.cpp [code]
Generated/ItemCollectionTransitionProvider.properties.h [code]
Generated/ItemContainer.properties.cpp [code]
Generated/ItemContainer.properties.h [code]
Generated/ItemContainerAutomationPeer.properties.cpp [code]
Generated/ItemsRepeater.properties.cpp [code]
Generated/ItemsRepeater.properties.h [code]
Generated/ItemsRepeaterScrollHost.properties.cpp [code]
Generated/ItemsSourceView.properties.cpp [code]
Generated/ItemsSourceView.properties.h [code]
Generated/ItemsView.properties.cpp [code]
Generated/ItemsView.properties.h [code]
Generated/ItemsViewAutomationPeer.properties.cpp [code]
Generated/ItemsViewTestHooks.properties.cpp [code]
Generated/Layout.properties.cpp [code]
Generated/Layout.properties.h [code]
Generated/LayoutContext.properties.cpp [code]
Generated/LayoutPanel.properties.cpp [code]
Generated/LayoutPanel.properties.h [code]
Generated/LayoutsTestHooks.properties.cpp [code]
Generated/LinedFlowLayout.properties.cpp [code]
Generated/LinedFlowLayout.properties.h [code]
Generated/LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp [code]
Generated/MapControl.properties.cpp [code]
Generated/MapControl.properties.h [code]
Generated/MapElement.properties.cpp [code]
Generated/MapElementClickEventArgs.properties.cpp [code]
Generated/MapElementsLayer.properties.cpp [code]
Generated/MapElementsLayer.properties.h [code]
Generated/MapIcon.properties.cpp [code]
Generated/MapIcon.properties.h [code]
Generated/MapLayer.properties.cpp [code]
Generated/MaterialHelperTestApi.properties.cpp [code]
Generated/MenuBar.properties.cpp [code]
Generated/MenuBar.properties.h [code]
Generated/MenuBarAutomationPeer.properties.cpp [code]
Generated/MenuBarItem.properties.cpp [code]
Generated/MenuBarItem.properties.h [code]
Generated/MenuBarItemAutomationPeer.properties.cpp [code]
Generated/MenuBarItemFlyout.properties.cpp [code]
Generated/MicaBackdrop.properties.cpp [code]
Generated/MicaBackdrop.properties.h [code]
Generated/MonochromaticOverlayPresenter.properties.cpp [code]
Generated/MonochromaticOverlayPresenter.properties.h [code]
Generated/MUXControlsTestHooks.properties.cpp [code]
Generated/NavigationView.properties.cpp [code]
Generated/NavigationView.properties.h [code]
Generated/NavigationViewAutomationPeer.properties.cpp [code]
Generated/NavigationViewItem.properties.cpp [code]
Generated/NavigationViewItem.properties.h [code]
Generated/NavigationViewItemAutomationPeer.properties.cpp [code]
Generated/NavigationViewItemBase.properties.cpp [code]
Generated/NavigationViewItemBase.properties.h [code]
Generated/NavigationViewItemHeader.properties.cpp [code]
Generated/NavigationViewItemInvokedEventArgs.properties.cpp [code]
Generated/NavigationViewItemPresenter.properties.cpp [code]
Generated/NavigationViewItemPresenter.properties.h [code]
Generated/NavigationViewItemPresenterTemplateSettings.properties.cpp [code]
Generated/NavigationViewItemPresenterTemplateSettings.properties.h [code]
Generated/NavigationViewItemSeparator.properties.cpp [code]
Generated/NavigationViewTemplateSettings.properties.cpp [code]
Generated/NavigationViewTemplateSettings.properties.h [code]
Generated/NonVirtualizingLayout.properties.cpp [code]
Generated/NonVirtualizingLayoutContext.properties.cpp [code]
Generated/NumberBox.properties.cpp [code]
Generated/NumberBox.properties.h [code]
Generated/NumberBoxAutomationPeer.properties.cpp [code]
Generated/PagerControl.properties.cpp [code]
Generated/PagerControl.properties.h [code]
Generated/PagerControlAutomationPeer.properties.cpp [code]
Generated/PagerControlTemplateSettings.properties.cpp [code]
Generated/PagerControlTemplateSettings.properties.h [code]
Generated/ParallaxView.properties.cpp [code]
Generated/ParallaxView.properties.h [code]
Generated/PersonPicture.properties.cpp [code]
Generated/PersonPicture.properties.h [code]
Generated/PersonPictureAutomationPeer.properties.cpp [code]
Generated/PersonPictureTemplateSettings.properties.cpp [code]
Generated/PersonPictureTemplateSettings.properties.h [code]
Generated/PipsPager.properties.cpp [code]
Generated/PipsPager.properties.h [code]
Generated/PipsPagerAutomationPeer.properties.cpp [code]
Generated/PipsPagerTemplateSettings.properties.cpp [code]
Generated/PipsPagerTemplateSettings.properties.h [code]
Generated/ProgressBar.properties.cpp [code]
Generated/ProgressBar.properties.h [code]
Generated/ProgressBarAutomationPeer.properties.cpp [code]
Generated/ProgressBarTemplateSettings.properties.cpp [code]
Generated/ProgressBarTemplateSettings.properties.h [code]
Generated/ProgressRing.properties.cpp [code]
Generated/ProgressRing.properties.h [code]
Generated/ProgressRingAutomationPeer.properties.cpp [code]
Generated/ProgressRingTemplateSettings.properties.cpp [code]
Generated/ProgressRingTemplateSettings.properties.h [code]
Generated/PullToRefreshHelperTestApi.properties.cpp [code]
Generated/RadialGradientBrush.properties.cpp [code]
Generated/RadialGradientBrush.properties.h [code]
Generated/RadioButtons.properties.cpp [code]
Generated/RadioButtons.properties.h [code]
Generated/RadioButtonsAutomationPeer.properties.cpp [code]
Generated/RadioButtonsTestHooks.properties.cpp [code]
Generated/RadioMenuFlyoutItem.properties.cpp [code]
Generated/RadioMenuFlyoutItem.properties.h [code]
Generated/RatingControl.properties.cpp [code]
Generated/RatingControl.properties.h [code]
Generated/RatingControlAutomationPeer.properties.cpp [code]
Generated/RatingItemFontInfo.properties.cpp [code]
Generated/RatingItemFontInfo.properties.h [code]
Generated/RatingItemImageInfo.properties.cpp [code]
Generated/RatingItemImageInfo.properties.h [code]
Generated/RatingItemInfo.properties.cpp [code]
Generated/RecyclePool.properties.cpp [code]
Generated/RecyclePool.properties.h [code]
Generated/RecyclingElementFactory.properties.cpp [code]
Generated/RecyclingElementFactory.properties.h [code]
Generated/RefreshContainer.properties.cpp [code]
Generated/RefreshContainer.properties.h [code]
Generated/RefreshVisualizer.properties.cpp [code]
Generated/RefreshVisualizer.properties.h [code]
Generated/RepeatedScrollSnapPoint.properties.cpp [code]
Generated/RepeatedZoomSnapPoint.properties.cpp [code]
Generated/RepeaterAutomationPeer.properties.cpp [code]
Generated/RepeaterTestHooks.properties.cpp [code]
Generated/RevealBackgroundBrush.properties.cpp [code]
Generated/RevealBorderBrush.properties.cpp [code]
Generated/RevealBorderLight.properties.cpp [code]
Generated/RevealBrush.properties.cpp [code]
Generated/RevealBrush.properties.h [code]
Generated/RevealBrushTestApi.properties.cpp [code]
Generated/RevealHoverLight.properties.cpp [code]
Generated/RevealListViewItemPresenter.properties.cpp [code]
Generated/RevealTestApi.properties.cpp [code]
Generated/ScrollControllerAddScrollVelocityRequestedEventArgs.properties.cpp [code]
Generated/ScrollControllerPanRequestedEventArgs.properties.cpp [code]
Generated/ScrollControllerScrollByRequestedEventArgs.properties.cpp [code]
Generated/ScrollControllerScrollToRequestedEventArgs.properties.cpp [code]
Generated/ScrollingScrollOptions.properties.cpp [code]
Generated/ScrollingZoomOptions.properties.cpp [code]
Generated/ScrollPresenter.properties.cpp [code]
Generated/ScrollPresenter.properties.h [code]
Generated/ScrollPresenterAutomationPeer.properties.cpp [code]
Generated/ScrollPresenterTestHooks.properties.cpp [code]
Generated/ScrollSnapPoint.properties.cpp [code]
Generated/ScrollSnapPointBase.properties.cpp [code]
Generated/ScrollView.properties.cpp [code]
Generated/ScrollView.properties.h [code]
Generated/ScrollViewerIRefreshInfoProviderAdapter.properties.cpp [code]
Generated/ScrollViewTestHooks.properties.cpp [code]
Generated/SelectionModel.properties.cpp [code]
Generated/SelectionModel.properties.h [code]
Generated/SelectorBar.properties.cpp [code]
Generated/SelectorBar.properties.h [code]
Generated/SelectorBarItem.properties.cpp [code]
Generated/SelectorBarItem.properties.h [code]
Generated/SelectorBarItemAutomationPeer.properties.cpp [code]
Generated/SelectorBarTestHooks.properties.cpp [code]
Generated/SliderInteraction.properties.cpp [code]
Generated/SliderInteraction.properties.h [code]
Generated/SnapPointBase.properties.cpp [code]
Generated/SpectrumBrush.properties.cpp [code]
Generated/SpectrumBrush.properties.h [code]
Generated/SplitButton.properties.cpp [code]
Generated/SplitButton.properties.h [code]
Generated/SplitButtonAutomationPeer.properties.cpp [code]
Generated/SplitButtonTestApi.properties.cpp [code]
Generated/StackLayout.properties.cpp [code]
Generated/StackLayout.properties.h [code]
Generated/StackLayoutState.properties.cpp [code]
Generated/SwipeControl.properties.cpp [code]
Generated/SwipeControl.properties.h [code]
Generated/SwipeItem.properties.cpp [code]
Generated/SwipeItem.properties.h [code]
Generated/SwipeItems.properties.cpp [code]
Generated/SwipeItems.properties.h [code]
Generated/SwipeTestHooks.properties.cpp [code]
Generated/TabView.properties.cpp [code]
Generated/TabView.properties.h [code]
Generated/TabViewAutomationPeer.properties.cpp [code]
Generated/TabViewItem.properties.cpp [code]
Generated/TabViewItem.properties.h [code]
Generated/TabViewItemAutomationPeer.properties.cpp [code]
Generated/TabViewItemTemplateSettings.properties.cpp [code]
Generated/TabViewItemTemplateSettings.properties.h [code]
Generated/TabViewListView.properties.cpp [code]
Generated/TeachingTip.properties.cpp [code]
Generated/TeachingTip.properties.h [code]
Generated/TeachingTipAutomationPeer.properties.cpp [code]
Generated/TeachingTipTemplateSettings.properties.cpp [code]
Generated/TeachingTipTemplateSettings.properties.h [code]
Generated/TeachingTipTestHooks.properties.cpp [code]
Generated/TextCommandBarFlyout.properties.cpp [code]
Generated/TitleBar.properties.cpp [code]
Generated/TitleBar.properties.h [code]
Generated/TitleBarAutomationPeer.properties.cpp [code]
Generated/TitleBarTemplateSettings.properties.cpp [code]
Generated/TitleBarTemplateSettings.properties.h [code]
Generated/ToggleSplitButton.properties.cpp [code]
Generated/ToggleSplitButton.properties.h [code]
Generated/ToggleSplitButtonAutomationPeer.properties.cpp [code]
Generated/TreeView.properties.cpp [code]
Generated/TreeView.properties.h [code]
Generated/TreeViewItem.properties.cpp [code]
Generated/TreeViewItem.properties.h [code]
Generated/TreeViewItemAutomationPeer.properties.cpp [code]
Generated/TreeViewItemDataAutomationPeer.properties.cpp [code]
Generated/TreeViewItemTemplateSettings.properties.cpp [code]
Generated/TreeViewItemTemplateSettings.properties.h [code]
Generated/TreeViewList.properties.cpp [code]
Generated/TreeViewListAutomationPeer.properties.cpp [code]
Generated/TreeViewNode.properties.cpp [code]
Generated/TreeViewNode.properties.h [code]
Generated/TwoPaneView.properties.cpp [code]
Generated/TwoPaneView.properties.h [code]
Generated/UniformGridLayout.properties.cpp [code]
Generated/UniformGridLayout.properties.h [code]
Generated/UniformGridLayoutState.properties.cpp [code]
Generated/VirtualizingLayout.properties.cpp [code]
Generated/VirtualizingLayoutContext.properties.cpp [code]
Generated/WebView2.properties.cpp [code]
Generated/WebView2.properties.h [code]
Generated/WebView2AutomationPeer.properties.cpp [code]
Generated/XamlAmbientLight.properties.cpp [code]
Generated/XamlAmbientLight.properties.h [code]
Generated/XamlControlsResources.properties.cpp [code]
Generated/XamlControlsResources.properties.h [code]
Generated/XamlControlsXamlMetaDataProvider.properties.cpp [code]
Generated/ZoomSnapPoint.properties.cpp [code]
Generated/ZoomSnapPointBase.properties.cpp [code]
IconSource/AnimatedIconSource.cpp [code]
IconSource/AnimatedIconSource.h [code]
IconSource/IconSource.idl [code]
IconSource/ImageIconSource.cpp [code]
IconSource/ImageIconSource.h [code]
IconSource/APITests/IconSourceApiTests.cs [code]
ImageIcon/ImageIcon.cpp [code]
ImageIcon/ImageIcon.h [code]
ImageIcon/ImageIcon.idl [code]
ImageIcon/APITests/ImageIconTests.cs [code]
ImageIcon/InteractionTests/ImageIconTests.cs [code]
ImageIcon/TestUI/ImageIconPage.xaml.cs [code]
inc/AutoHandle.h [code]
inc/BoxHelpers.h [code]
inc/BuildMacros.h [code]
inc/CastHelpers.h [code]
inc/CollectionHelper.h [code]
inc/CommandingHelpers.h [code]
inc/common.h [code]
inc/CppWinRTHelpers.h [code]
inc/CppWinRTIncludes.h [code]
inc/DispatcherHelper.h [code]
inc/DoubleUtil.h [code]
inc/enum_array.h [code]
inc/enum_vector.h [code]
inc/ErrorHandling.h [code]
inc/event.h [code]
inc/FloatUtil.h [code]
inc/FocusHelper.h [code]
inc/GlobalDependencyProperty.h [code]
inc/RegUtil.h [code]
inc/RoutedEventHelpers.h [code]
inc/RuntimeClassHelpers.h [code]
inc/SharedHelpers.h [code]
inc/StaticAssertFalse.h [code]
inc/tracker_ref.h [code]
inc/velocity.h [code]
inc/WinEventLogLevels.h [code]
InfoBadge/InfoBadge.cpp [code]
InfoBadge/InfoBadge.h [code]
InfoBadge/InfoBadge.idl [code]
InfoBadge/InfoBadgeTemplateSettings.cpp [code]
InfoBadge/InfoBadgeTemplateSettings.h [code]
InfoBadge/APITests/InfoBadgeTests.cs [code]
InfoBadge/TestUI/InfoBadgePage.xaml.cs [code]
InfoBar/InfoBar.cpp [code]
InfoBar/InfoBar.h [code]
InfoBar/InfoBar.idl [code]
InfoBar/InfoBarAutomationPeer.cpp [code]
InfoBar/InfoBarAutomationPeer.h [code]
InfoBar/InfoBarClosedEventArgs.cpp [code]
InfoBar/InfoBarClosedEventArgs.h [code]
InfoBar/InfoBarClosingEventArgs.cpp [code]
InfoBar/InfoBarClosingEventArgs.h [code]
InfoBar/InfoBarPanel.cpp [code]
InfoBar/InfoBarPanel.h [code]
InfoBar/InfoBarTemplateSettings.cpp [code]
InfoBar/InfoBarTemplateSettings.h [code]
InfoBar/InteractionTests/InfoBarTests.cs [code]
InfoBar/TestUI/InfobarAxeTestage.xaml.cs [code]
InfoBar/TestUI/InfoBarPage.xaml.cs [code]
InkCanvas/InkCanvas.cpp [code]
InkCanvas/InkCanvas.h [code]
InkCanvas/InkCanvas.idl [code]
InkCanvas/InkCanvasAutomationPeer.cpp [code]
InkCanvas/InkCanvasAutomationPeer.h [code]
InkCanvas/InkCanvasAutomationPeer.idl [code]
InkToolBar/InkToolBar.h [code]
InkToolBar/InkToolBar.idl [code]
InkToolBar/InkToolbarAutomationPeer.h [code]
InkToolBar/InkToolBarAutomationPeer.idl [code]
InkToolBar/InkToolBarBallpointPenButton.h [code]
InkToolBar/InkToolBarCustomPen.h [code]
InkToolBar/InkToolBarCustomPenButton.h [code]
InkToolBar/InkToolBarCustomToggleButton.h [code]
InkToolBar/InkToolBarCustomToolButton.h [code]
InkToolBar/InkToolBarEraserButton.h [code]
InkToolBar/InkToolBarEraserButtonInternal.h [code]
InkToolBar/InkToolBarEraserFlyoutItemClickedEventArgs.h [code]
InkToolBar/InkToolBarFlyoutItem.h [code]
InkToolBar/InkToolBarFlyoutItemAutomationPeer.h [code]
InkToolBar/InkToolBarHighlighterButton.h [code]
InkToolBar/InkToolBarIsStencilButtonCheckedChangedEventArgs.h [code]
InkToolBar/InkToolBarMenuButton.h [code]
InkToolBar/InkToolBarMenuButtonAutomationPeer.h [code]
InkToolBar/InkToolBarPenButton.h [code]
InkToolBar/InktoolBarPencilButton.h [code]
InkToolBar/InkToolBarPenConfigurationControl.h [code]
InkToolBar/InkToolBarStencilButton.h [code]
InkToolBar/InkToolBarToggleButton.h [code]
InkToolBar/InkToolBarToolButton.h [code]
InkToolBar/InkToolBarToolButtonAutomationPeer.h [code]
InkToolBar/InkToolBarTrace.h [code]
Interactions/ButtonInteraction/ButtonInteraction.cpp [code]
Interactions/ButtonInteraction/ButtonInteraction.h [code]
Interactions/ButtonInteraction/ButtonInteraction.idl [code]
Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.cpp [code]
Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.h [code]
Interactions/ButtonInteraction/APITests/ButtonInteractionTests.cs [code]
Interactions/ButtonInteraction/InteractionTests/ButtonInteractionTests.cs [code]
Interactions/ButtonInteraction/TestUI/ButtonInteractionPage.xaml.cs [code]
Interactions/ButtonInteraction/TestUI/TargetElement.xaml.cs [code]
Interactions/SliderInteraction/SliderInteraction.cpp [code]
Interactions/SliderInteraction/SliderInteraction.h [code]
Interactions/SliderInteraction/SliderInteraction.idl [code]
Interactions/SliderInteraction/APITests/SliderInteractionTests.cs [code]
Interactions/SliderInteraction/InteractionTests/SliderInteractionTests.cs [code]
Interactions/SliderInteraction/TestUI/SliderInteractionPage.xaml.cs [code]
ItemContainer/ItemContainer.cpp [code]
ItemContainer/ItemContainer.h [code]
ItemContainer/ItemContainer.idl [code]
ItemContainer/ItemContainerAutomationPeer.cpp [code]
ItemContainer/ItemContainerAutomationPeer.h [code]
ItemContainer/ItemContainerInvokedEventArgs.cpp [code]
ItemContainer/ItemContainerInvokedEventArgs.h [code]
ItemContainer/ItemContainerRevokers.h [code]
ItemContainer/ItemContainerTrace.h [code]
ItemContainer/APITests/ItemContainerTests.cs [code]
ItemContainer/InteractionTests/ItemContainerTests.cs [code]
ItemContainer/TestUI/ItemContainerLayoutPage.xaml.cs [code]
ItemContainer/TestUI/ItemContainerPage.xaml.cs [code]
ItemContainer/TestUI/ItemContainerSummaryPage.xaml.cs [code]
ItemsView/ExtendedSelector.cpp [code]
ItemsView/ExtendedSelector.h [code]
ItemsView/ItemsView.cpp [code]
ItemsView/ItemsView.h [code]
ItemsView/ItemsView.idl [code]
ItemsView/ItemsViewAutomationPeer.cpp [code]
ItemsView/ItemsViewAutomationPeer.h [code]
ItemsView/ItemsViewInteractions.cpp [code]
ItemsView/ItemsViewItemInvokedEventArgs.cpp [code]
ItemsView/ItemsViewItemInvokedEventArgs.h [code]
ItemsView/ItemsViewSelectionChangedEventArgs.cpp [code]
ItemsView/ItemsViewSelectionChangedEventArgs.h [code]
ItemsView/ItemsViewTestHooks.cpp [code]
ItemsView/ItemsViewTestHooks.h [code]
ItemsView/ItemsViewTestHooks.idl [code]
ItemsView/ItemsViewTestHooksFactory.cpp [code]
ItemsView/ItemsViewTestHooksFactory.h [code]
ItemsView/ItemsViewTrace.h [code]
ItemsView/MultipleSelector.cpp [code]
ItemsView/MultipleSelector.h [code]
ItemsView/NullSelector.cpp [code]
ItemsView/NullSelector.h [code]
ItemsView/SelectorBase.cpp [code]
ItemsView/SelectorBase.h [code]
ItemsView/SingleSelector.cpp [code]
ItemsView/SingleSelector.h [code]
ItemsView/APITests/ItemsViewTests.cs [code]
ItemsView/InteractionTests/ItemsViewTestsWithInputHelper.cs [code]
ItemsView/TestUI/ItemsViewBlankPage.xaml.cs [code]
ItemsView/TestUI/ItemsViewIntegrationPage.xaml.cs [code]
ItemsView/TestUI/ItemsViewInteractiveTestsPage.xaml.cs [code]
ItemsView/TestUI/ItemsViewPage.xaml.cs [code]
ItemsView/TestUI/ItemsViewPictureLibraryPage.xaml.cs [code]
ItemsView/TestUI/ItemsViewSummaryPage.xaml.cs [code]
ItemsView/TestUI/ItemsViewTransitionPage.xaml.cs [code]
LayoutPanel/LayoutPanel.cpp [code]
LayoutPanel/LayoutPanel.h [code]
LayoutPanel/LayoutPanel.idl [code]
LayoutPanel/LayoutPanelLayoutContext.cpp [code]
LayoutPanel/LayoutPanelLayoutContext.h [code]
LayoutPanel/APITests/LayoutPanelTests.cs [code]
Lights/AnimationUtility.cpp [code]
Lights/AnimationUtility.h [code]
Lights/IsTargetDPHelper.h [code]
Lights/MaterialHelper.cpp [code]
Lights/MaterialHelper.h [code]
Lights/MaterialHelperTestApi.cpp [code]
Lights/MaterialHelperTestApi.h [code]
Lights/MaterialHelperTestApi.idl [code]
Lights/MaterialHelperTestApiFactory.cpp [code]
Lights/MaterialHelperTestApiFactory.h [code]
Lights/RevealBorderLight.cpp [code]
Lights/RevealBorderLight.h [code]
Lights/RevealBorderLight.idl [code]
Lights/RevealHoverLight.cpp [code]
Lights/RevealHoverLight.h [code]
Lights/RevealHoverLight.idl [code]
Lights/RevealTestApi.cpp [code]
Lights/RevealTestApi.h [code]
Lights/RevealTestApi.idl [code]
Lights/SpotLightStateHelper.cpp [code]
Lights/SpotLightStateHelper.h [code]
Lights/XamlAmbientLight.cpp [code]
Lights/XamlAmbientLight.h [code]
Lights/XamlAmbientLight.idl [code]
Lights/ApiTests/Lights_ApiTests/LightConfigurationTests.cs [code]
MapControl/MapControl.cpp [code]
MapControl/MapControl.h [code]
MapControl/MapControl.idl [code]
MapControl/MapControlMapServiceErrorOccurredEventArgs.cpp [code]
MapControl/MapControlMapServiceErrorOccurredEventArgs.h [code]
MapControl/MapElement.cpp [code]
MapControl/MapElement.h [code]
MapControl/MapElementClickEventArgs.cpp [code]
MapControl/MapElementClickEventArgs.h [code]
MapControl/MapElementsLayer.cpp [code]
MapControl/MapElementsLayer.h [code]
MapControl/MapIcon.cpp [code]
MapControl/MapIcon.h [code]
MapControl/MapLayer.cpp [code]
MapControl/MapLayer.h [code]
MapControl/APITests/MapControlTests.cs [code]
MapControl/InteractionTests/MapControlTests.cs [code]
MapControl/TestUI/MapControlApiKey.cs [code]
MapControl/TestUI/MapControlPage.xaml.cs [code]
Materials/Acrylic/AcrylicBrush.cpp [code]
Materials/Acrylic/AcrylicBrush.h [code]
Materials/Acrylic/AcrylicBrush.idl [code]
Materials/Acrylic/AcrylicBrushFactory.cpp [code]
Materials/Acrylic/AcrylicBrushFactory.h [code]
Materials/Acrylic/AcrylicTestApi.cpp [code]
Materials/Acrylic/AcrylicTestApi.h [code]
Materials/Acrylic/AcrylicTestApi.idl [code]
Materials/Acrylic/APITests/AcrylicBrushTests.cs [code]
Materials/Acrylic/InteractionTests/AcrylicBrushTests.cs [code]
Materials/Acrylic/TestUI/AcrylicBrushBasicPage.xaml.cs [code]
Materials/Acrylic/TestUI/AcrylicBrushLuminosityTestPage.xaml.cs [code]
Materials/Acrylic/TestUI/AcrylicBrushPage.xaml.cs [code]
Materials/Acrylic/TestUI/AcrylicColorPage.xaml.cs [code]
Materials/Acrylic/TestUI/AcrylicMarkupPage.xaml.cs [code]
Materials/Acrylic/TestUI/AcrylicPage.xaml.cs [code]
Materials/Acrylic/TestUI/AcrylicRenderingPage.xaml.cs [code]
Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.cpp [code]
Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.h [code]
Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.idl [code]
Materials/MicaBackdrop/MicaBackdrop.cpp [code]
Materials/MicaBackdrop/MicaBackdrop.h [code]
Materials/MicaBackdrop/MicaBackdrop.idl [code]
Materials/Reveal/RevealBackgroundBrush.h [code]
Materials/Reveal/RevealBorderBrush.h [code]
Materials/Reveal/RevealBrush.cpp [code]
Materials/Reveal/RevealBrush.h [code]
Materials/Reveal/RevealBrush.idl [code]
Materials/Reveal/RevealBrushTestApi.cpp [code]
Materials/Reveal/RevealBrushTestApi.h [code]
Materials/Reveal/RevealBrushTestApi.idl [code]
Materials/Reveal/RevealControls.idl [code]
Materials/Reveal/RevealListViewItemPresenter.cpp [code]
Materials/Reveal/RevealListViewItemPresenter.h [code]
Materials/Reveal/APITests/RevealTests.cs [code]
Materials/Reveal/InteractionTests/Reveal_InteractionTests/RevealBrushTests.cs [code]
Materials/Reveal/TestUI/CoreWindowEventsPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealBasicPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealColorPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealFallbackPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealListPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealMarkupPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealRegressionTestsPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealScenarioColors.xaml.cs [code]
Materials/Reveal/TestUI/RevealScenarioGrid.xaml.cs [code]
Materials/Reveal/TestUI/RevealScenarioLights.xaml.cs [code]
Materials/Reveal/TestUI/RevealScenarioList.xaml.cs [code]
Materials/Reveal/TestUI/RevealScenarios.xaml.cs [code]
Materials/Reveal/TestUI/RevealScenarioSecondaryView.xaml.cs [code]
Materials/Reveal/TestUI/RevealSimpleListPage.xaml.cs [code]
Materials/Reveal/TestUI/RevealStatesPage.xaml.cs [code]
MenuBar/MenuBar.cpp [code]
MenuBar/MenuBar.h [code]
MenuBar/MenuBar.idl [code]
MenuBar/MenuBarAutomationPeer.cpp [code]
MenuBar/MenuBarAutomationPeer.h [code]
MenuBar/MenuBarAutomationPeer.idl [code]
MenuBar/MenuBarItem.cpp [code]
MenuBar/MenuBarItem.h [code]
MenuBar/MenuBarItemAutomationPeer.cpp [code]
MenuBar/MenuBarItemAutomationPeer.h [code]
MenuBar/MenuBarItemFlyout.cpp [code]
MenuBar/MenuBarItemFlyout.h [code]
MenuBar/MenuBar_InteractionTests/MenuBarTests.cs [code]
MenuBar/MenuBar_TestUI/MenuBarPage.xaml.cs [code]
Microsoft.UI.Xaml.Design/RegisterMetadata.cs [code]
Microsoft.UI.Xaml.Design/Properties/AssemblyInfo.cs [code]
Microsoft.UI.Xaml.FrameworkPackagePRI/Properties/AssemblyInfo.cs [code]
MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.cpp [code]
MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.h [code]
MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.idl [code]
MonochromaticOverlayPresenter/TestUI/MonochromaticOverlayPresenterPage.xaml.cs [code]
NavigationView/NavigationView.cpp [code]
NavigationView/NavigationView.h [code]
NavigationView/NavigationView.idl [code]
NavigationView/NavigationViewAutomationPeer.cpp [code]
NavigationView/NavigationViewAutomationPeer.h [code]
NavigationView/NavigationViewBackRequestedEventArgs.cpp [code]
NavigationView/NavigationViewBackRequestedEventArgs.h [code]
NavigationView/NavigationViewDisplayModeChangedEventArgs.cpp [code]
NavigationView/NavigationViewDisplayModeChangedEventArgs.h [code]
NavigationView/NavigationViewHelper.h [code]
NavigationView/NavigationViewItem.cpp [code]
NavigationView/NavigationViewItem.h [code]
NavigationView/NavigationViewItemAutomationPeer.cpp [code]
NavigationView/NavigationViewItemAutomationPeer.h [code]
NavigationView/NavigationViewItemAutomationPeer.idl [code]
NavigationView/NavigationViewItemBase.cpp [code]
NavigationView/NavigationViewItemBase.h [code]
NavigationView/NavigationViewItemBaseRevokers.h [code]
NavigationView/NavigationViewItemCollapsedEventArgs.cpp [code]
NavigationView/NavigationViewItemCollapsedEventArgs.h [code]
NavigationView/NavigationViewItemExpandingEventArgs.cpp [code]
NavigationView/NavigationViewItemExpandingEventArgs.h [code]
NavigationView/NavigationViewItemHeader.cpp [code]
NavigationView/NavigationViewItemHeader.h [code]
NavigationView/NavigationViewItemInvokedEventArgs.cpp [code]
NavigationView/NavigationViewItemInvokedEventArgs.h [code]
NavigationView/NavigationViewItemPresenter.cpp [code]
NavigationView/NavigationViewItemPresenter.h [code]
NavigationView/NavigationViewItemPresenter.idl [code]
NavigationView/NavigationViewItemPresenterTemplateSettings.cpp [code]
NavigationView/NavigationViewItemPresenterTemplateSettings.h [code]
NavigationView/NavigationViewItemSeparator.cpp [code]
NavigationView/NavigationViewItemSeparator.h [code]
NavigationView/NavigationViewItemsFactory.cpp [code]
NavigationView/NavigationViewItemsFactory.h [code]
NavigationView/NavigationViewPaneClosingEventArgs.cpp [code]
NavigationView/NavigationViewPaneClosingEventArgs.h [code]
NavigationView/NavigationViewSelectionChangedEventArgs.cpp [code]
NavigationView/NavigationViewSelectionChangedEventArgs.h [code]
NavigationView/NavigationViewTemplateSettings.cpp [code]
NavigationView/NavigationViewTemplateSettings.h [code]
NavigationView/NavigationViewTrace.h [code]
NavigationView/SplitDataSourceBase.h [code]
NavigationView/TopNavigationViewDataProvider.cpp [code]
NavigationView/TopNavigationViewDataProvider.h [code]
NavigationView/NavigationView_ApiTests/NavigationViewTests.cs [code]
NavigationView/NavigationView_InteractionTests/CommonTests.cs [code]
NavigationView/NavigationView_InteractionTests/EventTests.cs [code]
NavigationView/NavigationView_InteractionTests/FocusBehaviorTests.cs [code]
NavigationView/NavigationView_InteractionTests/NavigationViewTestsBase.cs [code]
NavigationView/NavigationView_InteractionTests/PaneBehaviorTests.cs [code]
NavigationView/NavigationView_InteractionTests/SelectionTests.cs [code]
NavigationView/NavigationView_InteractionTests/TopModeTests.cs [code]
NavigationView/TestUI/DialogWithNavView.xaml.cs [code]
NavigationView/TestUI/NavigationViewAxeTestPage.xaml.cs [code]
NavigationView/TestUI/NavigationViewCaseBundle.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewAnimationPage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewBlankPage1.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewCompactPaneLengthTestPage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewInfoBadge.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewInitPage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewIsPaneOpenPage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewMenuItemsSourcePage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewMenuItemStretchPage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewMinimalPage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewPage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewPageDataContext.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewSelectedItemEdgeCasePage.xaml.cs [code]
NavigationView/TestUI/Common/NavigationViewStretchPage.xaml.cs [code]
NavigationView/TestUI/CustomResources/CustomNavigationViewItem.xaml.cs [code]
NavigationView/TestUI/CustomResources/NavigationViewCustomMenuItemPage.xaml.cs [code]
NavigationView/TestUI/CustomResources/NavigationViewCustomThemeResourcesPage.xaml.cs [code]
NavigationView/TestUI/CustomResources/NavigationViewItemTemplatePage.xaml.cs [code]
NavigationView/TestUI/Footer/PaneFooterTestPage.xaml.cs [code]
NavigationView/TestUI/Footer/PaneLayoutTestPage.xaml.cs [code]
NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewDataBinding.xaml.cs [code]
NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewMarkup.xaml.cs [code]
NavigationView/TestUI/Regression/NavigationViewRS3Page.xaml.cs [code]
NavigationView/TestUI/Regression/NavigationViewRS4Page.xaml.cs [code]
NavigationView/TestUI/TopMode/NavigationViewTopNavOnlyPage.xaml.cs [code]
NavigationView/TestUI/TopMode/NavigationViewTopNavOverflowButtonPage.xaml.cs [code]
NavigationView/TestUI/TopMode/NavigationViewTopNavPage.xaml.cs [code]
NavigationView/TestUI/TopMode/NavigationViewTopNavStorePage.xaml.cs [code]
NumberBox/NumberBox.cpp [code]
NumberBox/NumberBox.h [code]
NumberBox/NumberBox.idl [code]
NumberBox/NumberBoxAutomationPeer.cpp [code]
NumberBox/NumberBoxAutomationPeer.h [code]
NumberBox/NumberBoxParser.cpp [code]
NumberBox/NumberBoxParser.h [code]
NumberBox/APITests/NumberBoxTests.cs [code]
NumberBox/InteractionTests/NumberBoxTests.cs [code]
NumberBox/TestUI/NumberBoxAxeTestPage.xaml.cs [code]
NumberBox/TestUI/NumberBoxPage.xaml.cs [code]
PagerControl/PagerControl.cpp [code]
PagerControl/PagerControl.h [code]
PagerControl/PagerControl.idl [code]
PagerControl/PagerControlAutomationPeer.cpp [code]
PagerControl/PagerControlAutomationPeer.h [code]
PagerControl/PagerControlAutomationPeer.idl [code]
PagerControl/PagerControlSelectedIndexChangedEventArgs.h [code]
PagerControl/PagerControlTemplateSettings.cpp [code]
PagerControl/PagerControlTemplateSettings.h [code]
PagerControl/APITests/PagerControlTests.cs [code]
PagerControl/InteractionTests/PagerControlTestBase.cs [code]
PagerControl/InteractionTests/PagerControlTestPageElements.cs [code]
PagerControl/InteractionTests/PagerControlTests.cs [code]
PagerControl/TestUI/PagerControlAxeTestPage.xaml.cs [code]
PagerControl/TestUI/PagerControlPage.xaml.cs [code]
ParallaxView/ParallaxView.cpp [code]
ParallaxView/ParallaxView.h [code]
ParallaxView/ParallaxView.idl [code]
ParallaxView/ScrollInputHelper.cpp [code]
ParallaxView/ScrollInputHelper.h [code]
ParallaxView/APITests/ParallaxViewTests.cs [code]
ParallaxView/InteractionTests/ParallaxViewTests.cs [code]
ParallaxView/TestUI/DynamicPage.xaml.cs [code]
ParallaxView/TestUI/Ingredient.cs [code]
ParallaxView/TestUI/ListViewBackgroundPage.xaml.cs [code]
ParallaxView/TestUI/ListViewHeaderPage.xaml.cs [code]
ParallaxView/TestUI/ListViewItemPage.xaml.cs [code]
ParallaxView/TestUI/ParallaxViewPage.xaml.cs [code]
ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml.cs [code]
ParallaxView/TestUI/SimpleRectanglePage.xaml.cs [code]
ParallaxView/TestUI/TextPage.xaml.cs [code]
ParallaxView/TestUI/VirtualizingStackPanelPage.xaml.cs [code]
PersonPicture/InitialsGenerator.cpp [code]
PersonPicture/InitialsGenerator.h [code]
PersonPicture/PersonPicture.cpp [code]
PersonPicture/PersonPicture.h [code]
PersonPicture/PersonPicture.idl [code]
PersonPicture/PersonPictureAutomationPeer.cpp [code]
PersonPicture/PersonPictureAutomationPeer.h [code]
PersonPicture/PersonPictureAutomationPeer.idl [code]
PersonPicture/PersonPictureTemplateSettings.h [code]
PersonPicture/APITests/PersonPictureTests.cs [code]
PersonPicture/InteractionTests/PersonPictureTests.cs [code]
PersonPicture/TestUI/PersonPicturePage.xaml.cs [code]
PipsPager/PipsPager.cpp [code]
PipsPager/PipsPager.h [code]
PipsPager/PipsPager.idl [code]
PipsPager/PipsPagerAutomationPeer.cpp [code]
PipsPager/PipsPagerAutomationPeer.h [code]
PipsPager/PipsPagerAutomationPeer.idl [code]
PipsPager/PipsPagerSelectedIndexChangedEventArgs.h [code]
PipsPager/PipsPagerTemplateSettings.cpp [code]
PipsPager/PipsPagerTemplateSettings.h [code]
PipsPager/APITests/PipsPagerTests.cs [code]
PipsPager/InteractionTests/PipsPagerElements.cs [code]
PipsPager/InteractionTests/PipsPagerTestBase.cs [code]
PipsPager/InteractionTests/PipsPagerTests.cs [code]
PipsPager/TestUI/PipsPagerAxeTestPage.xaml.cs [code]
PipsPager/TestUI/PipsPagerExamples.xaml.cs [code]
PipsPager/TestUI/PipsPagerPage.xaml.cs [code]
ProgressBar/ProgressBar.cpp [code]
ProgressBar/ProgressBar.h [code]
ProgressBar/ProgressBar.idl [code]
ProgressBar/ProgressBarAutomationPeer.cpp [code]
ProgressBar/ProgressBarAutomationPeer.h [code]
ProgressBar/ProgressBarTemplateSettings.cpp [code]
ProgressBar/ProgressBarTemplateSettings.h [code]
ProgressBar/APITests/ProgressBarTests.cs [code]
ProgressBar/InteractionTests/ProgressBarTests.cs [code]
ProgressBar/TestUI/ProgressBarAxeTestPage.xaml.cs [code]
ProgressBar/TestUI/ProgressBarPage.xaml.cs [code]
ProgressBar/TestUI/ProgressBarReTemplatePage.xaml.cs [code]
ProgressRing/ProgressRing.cpp [code]
ProgressRing/ProgressRing.h [code]
ProgressRing/ProgressRing.idl [code]
ProgressRing/ProgressRingAutomationPeer.cpp [code]
ProgressRing/ProgressRingAutomationPeer.h [code]
ProgressRing/ProgressRingTemplateSettings.cpp [code]
ProgressRing/ProgressRingTemplateSettings.h [code]
ProgressRing/AnimatedVisuals/ProgressRingDeterminate.cpp [code]
ProgressRing/AnimatedVisuals/ProgressRingDeterminate.h [code]
ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.cpp [code]
ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.h [code]
ProgressRing/APITests/ProgressRingTests.cs [code]
ProgressRing/InteractionTests/ProgressRingTests.cs [code]
ProgressRing/TestUI/ProgressRingAxeTestPage.xaml.cs [code]
ProgressRing/TestUI/ProgressRingCustomLottieSourcePage.xaml.cs [code]
ProgressRing/TestUI/ProgressRingDeterminate.cs [code]
ProgressRing/TestUI/ProgressRingPage.xaml.cs [code]
ProgressRing/TestUI/ProgressRingStoryboardAnimationPage.xaml.cs [code]
PullToRefresh/PTRTracing/PTRTracing.h [code]
PullToRefresh/RefreshContainer/RefreshContainer.cpp [code]
PullToRefresh/RefreshContainer/RefreshContainer.h [code]
PullToRefresh/RefreshContainer/RefreshContainer.idl [code]
PullToRefresh/RefreshContainer/RefreshContainerPrivate.idl [code]
PullToRefresh/RefreshContainer/InteractionTests/RefreshContainerTests.cs [code]
PullToRefresh/RefreshContainer/TestUI/AnimationHandler.cs [code]
PullToRefresh/RefreshContainer/TestUI/ImageIRefreshInfoProviderAdapter.cs [code]
PullToRefresh/RefreshContainer/TestUI/RefreshContainerOnImagePage.xaml.cs [code]
PullToRefresh/RefreshContainer/TestUI/RefreshContainerPage.xaml.cs [code]
PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApi.cpp [code]
PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApi.h [code]
PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestAPI.idl [code]
PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApiFactory.cpp [code]
PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApiFactory.h [code]
PullToRefresh/RefreshVisualizer/RefreshInteractionRatioChangedEventArgs.cpp [code]
PullToRefresh/RefreshVisualizer/RefreshInteractionRatioChangedEventArgs.h [code]
PullToRefresh/RefreshVisualizer/RefreshVisualizer.cpp [code]
PullToRefresh/RefreshVisualizer/RefreshVisualizer.h [code]
PullToRefresh/RefreshVisualizer/RefreshVisualizer.idl [code]
PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.cpp [code]
PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.h [code]
PullToRefresh/RefreshVisualizer/RefreshVisualizerPrivate.idl [code]
PullToRefresh/RefreshVisualizer/APITests/RefreshVisualizerTests.cs [code]
PullToRefresh/RefreshVisualizer/TestUI/RefreshVisualizerPage.xaml.cs [code]
PullToRefresh/RefreshVisualizer/TestUI/SliderAsRefreshInfoProvider.cs [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.cpp [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.h [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.cpp [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.h [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.idl [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapterFactory.cpp [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapterFactory.h [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/APITests/ScrollViewerAdapterTests.cs [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/InteractionTests/ScrollViewerAdapterTests.cs [code]
PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/TestUI/ScrollViewerAdapterPage.xaml.cs [code]
PullToRefresh/TestUI/PTRPage.xaml.cs [code]
PullToRefresh/TestUI/PullToRefreshPage.xaml.cs [code]
RadialGradientBrush/RadialGradientBrush.cpp [code]
RadialGradientBrush/RadialGradientBrush.h [code]
RadialGradientBrush/RadialGradientBrush.idl [code]
RadialGradientBrush/InteractionTests/RadialGradientBrushTests.cs [code]
RadialGradientBrush/TestUI/RadialGradientBrushPage.xaml.cs [code]
RadioButtons/ColumnMajorUniformToLargestGridLayout.cpp [code]
RadioButtons/ColumnMajorUniformToLargestGridLayout.h [code]
RadioButtons/RadioButtons.cpp [code]
RadioButtons/RadioButtons.h [code]
RadioButtons/RadioButtons.idl [code]
RadioButtons/RadioButtonsAutomationPeer.cpp [code]
RadioButtons/RadioButtonsAutomationPeer.h [code]
RadioButtons/RadioButtonsElementFactory.cpp [code]
RadioButtons/RadioButtonsElementFactory.h [code]
RadioButtons/RadioButtonsPrimitives.idl [code]
RadioButtons/RadioButtonsTestHooks.cpp [code]
RadioButtons/RadioButtonsTestHooks.h [code]
RadioButtons/RadioButtonsTestHooks.idl [code]
RadioButtons/APITests/RadioButtonsTests.cs [code]
RadioButtons/InteractionTests/RadioButtonsFocusTestPageElements.cs [code]
RadioButtons/InteractionTests/RadioButtonsTestPageElements.cs [code]
RadioButtons/InteractionTests/RadioButtonsTests.cs [code]
RadioButtons/TestUI/RadioButtonsCaseBundle.xaml.cs [code]
RadioButtons/TestUI/RadioButtonsFocusPage.xaml.cs [code]
RadioButtons/TestUI/RadioButtonsPage.xaml.cs [code]
RadioMenuFlyoutItem/RadioMenuFlyoutItem.cpp [code]
RadioMenuFlyoutItem/RadioMenuFlyoutItem.h [code]
RadioMenuFlyoutItem/RadioMenuFlyoutItem.idl [code]
RadioMenuFlyoutItem/InteractionTests/RadioMenuFlyoutItemTests.cs [code]
RadioMenuFlyoutItem/TestUI/RadioMenuFlyoutItemPage.xaml.cs [code]
RatingControl/RatingControl.cpp [code]
RatingControl/RatingControl.h [code]
RatingControl/RatingControl.idl [code]
RatingControl/RatingControlAutomationPeer.cpp [code]
RatingControl/RatingControlAutomationPeer.h [code]
RatingControl/RatingControlAutomationPeer.idl [code]
RatingControl/RatingItemFontInfo.cpp [code]
RatingControl/RatingItemFontInfo.h [code]
RatingControl/RatingItemImageInfo.cpp [code]
RatingControl/RatingItemImageInfo.h [code]
RatingControl/RatingItemInfo.cpp [code]
RatingControl/RatingItemInfo.h [code]
RatingControl/APITests/RatingControlTests.cs [code]
RatingControl/InteractionTests/RatingControlTests.cs [code]
RatingControl/TestUI/RatingControlPage.xaml.cs [code]
Repeater/BuildTreeScheduler.cpp [code]
Repeater/BuildTreeScheduler.h [code]
Repeater/ChildrenInTabFocusOrderIterable.cpp [code]
Repeater/ChildrenInTabFocusOrderIterable.h [code]
Repeater/CustomProperty.cpp [code]
Repeater/CustomProperty.h [code]
Repeater/ElementFactory.cpp [code]
Repeater/ElementFactory.h [code]
Repeater/ElementFactoryGetArgsDownlevel.cpp [code]
Repeater/ElementFactoryGetArgsDownlevel.h [code]
Repeater/ElementFactoryRecycleArgsDownlevel.cpp [code]
Repeater/ElementFactoryRecycleArgsDownlevel.h [code]
Repeater/ElementManager.cpp [code]
Repeater/ElementManager.h [code]
Repeater/FlowLayout.cpp [code]
Repeater/FlowLayout.h [code]
Repeater/FlowLayoutAlgorithm.cpp [code]
Repeater/FlowLayoutAlgorithm.h [code]
Repeater/FlowLayoutState.cpp [code]
Repeater/FlowLayoutState.h [code]
Repeater/IFlowLayoutAlgorithmDelegates.h [code]
Repeater/IndexPath.cpp [code]
Repeater/IndexPath.h [code]
Repeater/IndexRange.cpp [code]
Repeater/IndexRange.h [code]
Repeater/InspectingDataSource.cpp [code]
Repeater/InspectingDataSource.h [code]
Repeater/ItemCollectionTransition.cpp [code]
Repeater/ItemCollectionTransition.h [code]
Repeater/ItemCollectionTransitionCompletedEventArgs.cpp [code]
Repeater/ItemCollectionTransitionCompletedEventArgs.h [code]
Repeater/ItemCollectionTransitionProgress.cpp [code]
Repeater/ItemCollectionTransitionProgress.h [code]
Repeater/ItemCollectionTransitionProvider.cpp [code]
Repeater/ItemCollectionTransitionProvider.h [code]
Repeater/ItemsRepeater.common.cpp [code]
Repeater/ItemsRepeater.common.h [code]
Repeater/ItemsRepeater.cpp [code]
Repeater/ItemsRepeater.h [code]
Repeater/ItemsRepeater.idl [code]
Repeater/ItemsRepeaterElementClearingEventArgs.cpp [code]
Repeater/ItemsRepeaterElementClearingEventArgs.h [code]
Repeater/ItemsRepeaterElementIndexChangedEventArgs.cpp [code]
Repeater/ItemsRepeaterElementIndexChangedEventArgs.h [code]
Repeater/ItemsRepeaterElementPreparedEventArgs.cpp [code]
Repeater/ItemsRepeaterElementPreparedEventArgs.h [code]
Repeater/ItemsRepeaterScrollHost.cpp [code]
Repeater/ItemsRepeaterScrollHost.h [code]
Repeater/ItemsRepeaterTrace.h [code]
Repeater/ItemsSourceView.cpp [code]
Repeater/ItemsSourceView.h [code]
Repeater/ItemsSourceViewFactory.cpp [code]
Repeater/ItemsSourceViewFactory.h [code]
Repeater/ItemTemplateWrapper.cpp [code]
Repeater/ItemTemplateWrapper.h [code]
Repeater/Layout.cpp [code]
Repeater/Layout.h [code]
Repeater/LayoutContext.cpp [code]
Repeater/LayoutContext.h [code]
Repeater/LayoutContextAdapter.cpp [code]
Repeater/LayoutContextAdapter.h [code]
Repeater/LayoutsTestHooks.cpp [code]
Repeater/LayoutsTestHooks.h [code]
Repeater/LayoutsTestHooks.idl [code]
Repeater/LayoutsTestHooksFactory.cpp [code]
Repeater/LayoutsTestHooksFactory.h [code]
Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp [code]
Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h [code]
Repeater/LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp [code]
Repeater/LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h [code]
Repeater/LinedFlowLayout.cpp [code]
Repeater/LinedFlowLayout.h [code]
Repeater/LinedFlowLayoutItemAspectRatios.cpp [code]
Repeater/LinedFlowLayoutItemAspectRatios.h [code]
Repeater/LinedFlowLayoutItemCollectionTransitionProvider.cpp [code]
Repeater/LinedFlowLayoutItemCollectionTransitionProvider.h [code]
Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.cpp [code]
Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.h [code]
Repeater/LinedFlowLayoutTrace.h [code]
Repeater/NonVirtualizingLayout.cpp [code]
Repeater/NonVirtualizingLayout.h [code]
Repeater/NonvirtualizingLayoutContext.cpp [code]
Repeater/NonvirtualizingLayoutContext.h [code]
Repeater/OrientationBasedMeasures.cpp [code]
Repeater/OrientationBasedMeasures.h [code]
Repeater/Phaser.cpp [code]
Repeater/Phaser.h [code]
Repeater/QPCTimer.cpp [code]
Repeater/QPCTimer.h [code]
Repeater/RecyclePool.cpp [code]
Repeater/RecyclePool.h [code]
Repeater/RecyclePoolFactory.cpp [code]
Repeater/RecyclePoolFactory.h [code]
Repeater/RecyclingElementFactory.cpp [code]
Repeater/RecyclingElementFactory.h [code]
Repeater/RepeaterAutomationPeer.cpp [code]
Repeater/RepeaterAutomationPeer.h [code]
Repeater/RepeaterAutomationPeer.idl [code]
Repeater/RepeaterLayoutContext.cpp [code]
Repeater/RepeaterLayoutContext.h [code]
Repeater/RepeaterPrivate.idl [code]
Repeater/RepeaterTestHooks.cpp [code]
Repeater/RepeaterTestHooks.h [code]
Repeater/RepeaterTestHooks.idl [code]
Repeater/RepeaterTestHooksFactory.cpp [code]
Repeater/RepeaterTestHooksFactory.h [code]
Repeater/SelectedItems.h [code]
Repeater/SelectionModel.cpp [code]
Repeater/SelectionModel.h [code]
Repeater/SelectionModelChildrenRequestedEventArgs.cpp [code]
Repeater/SelectionModelChildrenRequestedEventArgs.h [code]
Repeater/SelectionModelSelectionChangedEventArgs.cpp [code]
Repeater/SelectionModelSelectionChangedEventArgs.h [code]
Repeater/SelectionNode.cpp [code]
Repeater/SelectionNode.h [code]
Repeater/SelectionTreeHelper.cpp [code]
Repeater/SelectionTreeHelper.h [code]
Repeater/SelectTemplateEventArgs.cpp [code]
Repeater/SelectTemplateEventArgs.h [code]
Repeater/StackLayout.cpp [code]
Repeater/StackLayout.h [code]
Repeater/StackLayoutState.cpp [code]
Repeater/StackLayoutState.h [code]
Repeater/TransitionManager.cpp [code]
Repeater/TransitionManager.h [code]
Repeater/UniformGridLayout.cpp [code]
Repeater/UniformGridLayout.h [code]
Repeater/UniformGridLayoutState.cpp [code]
Repeater/UniformGridLayoutState.h [code]
Repeater/UniqueIdElementPool.cpp [code]
Repeater/UniqueIdElementPool.h [code]
Repeater/ViewManager.cpp [code]
Repeater/ViewManager.h [code]
Repeater/ViewportManager.h [code]
Repeater/ViewportManagerDownlevel.cpp [code]
Repeater/ViewportManagerDownlevel.h [code]
Repeater/ViewportManagerWithPlatformFeatures.cpp [code]
Repeater/ViewportManagerWithPlatformFeatures.h [code]
Repeater/VirtualizationInfo.cpp [code]
Repeater/VirtualizationInfo.h [code]
Repeater/VirtualizingLayout.cpp [code]
Repeater/VirtualizingLayout.h [code]
Repeater/VirtualizingLayoutContext.cpp [code]
Repeater/VirtualizingLayoutContext.h [code]
Repeater/VirtualLayoutContextAdapter.cpp [code]
Repeater/VirtualLayoutContextAdapter.h [code]
Repeater/APITests/AccessibilityTests.cs [code]
Repeater/APITests/EffectiveViewportScrollPresenterTests.cs [code]
Repeater/APITests/EffectiveViewportScrollViewerTests.cs [code]
Repeater/APITests/FlowLayoutCollectionChangeTests.cs [code]
Repeater/APITests/FlowLayoutTests.cs [code]
Repeater/APITests/IndexPathTests.cs [code]
Repeater/APITests/InspectingDataSourceTests.cs [code]
Repeater/APITests/ItemCollectionTransitionProviderTests.cs [code]
Repeater/APITests/ItemTemplateTests.cs [code]
Repeater/APITests/LayoutTests.cs [code]
Repeater/APITests/LinedFlowLayoutTests.cs [code]
Repeater/APITests/PhasingTests.cs [code]
Repeater/APITests/RecyclePoolTests.cs [code]
Repeater/APITests/RepeaterFocusTests.cs [code]
Repeater/APITests/RepeaterTests.cs [code]
Repeater/APITests/SelectionModelTests.cs [code]
Repeater/APITests/ViewManagerTests.cs [code]
Repeater/APITests/ViewportTests.cs [code]
Repeater/APITests/Common/AspectRatioRespectingControl.cs [code]
Repeater/APITests/Common/CollectionChangeEventArgsConverters.cs [code]
Repeater/APITests/Common/CustomItemsSource.cs [code]
Repeater/APITests/Common/CustomItemsSourceView.cs [code]
Repeater/APITests/Common/DataAsElementElementFactory.cs [code]
Repeater/APITests/Common/ElementFromElementElementFactory.cs [code]
Repeater/APITests/Common/FlowLayoutDerived.cs [code]
Repeater/APITests/Common/ItemCollectionTransitionProviderDerived.cs [code]
Repeater/APITests/Common/LayoutExtensions.cs [code]
Repeater/APITests/Common/NamedGroup.cs [code]
Repeater/APITests/Common/NonVirtualStackLayout.cs [code]
Repeater/APITests/Common/OrientationBasedMeasures.cs [code]
Repeater/APITests/Common/ReadOnlyNotifyPropertyChangedCollection.cs [code]
Repeater/APITests/Common/RecyclingViewGeneratorDerived.cs [code]
Repeater/APITests/Common/SharedHelpers.cs [code]
Repeater/APITests/Common/WinRTCollection.cs [code]
Repeater/APITests/Common/Mocks/MockItemsSource.cs [code]
Repeater/APITests/Common/Mocks/MockNonVirtualizingLayout.cs [code]
Repeater/APITests/Common/Mocks/MockStackLayout.cs [code]
Repeater/APITests/Common/Mocks/MockViewGenerator.cs [code]
Repeater/APITests/Common/Mocks/MockVirtualizingLayout.cs [code]
Repeater/InteractionTests/RepeaterTests.cs [code]
Repeater/TestUI/RepeaterTestUIPage.xaml.cs [code]
Repeater/TestUI/Samples/BasicDemo.xaml.cs [code]
Repeater/TestUI/Samples/Defaults.xaml.cs [code]
Repeater/TestUI/Samples/KeyboardNavigationSample.cs [code]
Repeater/TestUI/Samples/LinedFlowLayoutDemo.cs [code]
Repeater/TestUI/Samples/ObjectModelTestPage.xaml.cs [code]
Repeater/TestUI/Samples/UniformGridLayoutDemo.cs [code]
Repeater/TestUI/Samples/AnimationSamples/AnimationsDemoPage.xaml.cs [code]
Repeater/TestUI/Samples/AnimationSamples/DefaultElementAnimator.cs [code]
Repeater/TestUI/Samples/AnimationSamples/RadialElementAnimator.cs [code]
Repeater/TestUI/Samples/AnimationSamples/ScaleAnimatedVerticalListDemo.xaml.cs [code]
Repeater/TestUI/Samples/DataModel/Recipe.cs [code]
Repeater/TestUI/Samples/DataModel/RecipeGroup.cs [code]
Repeater/TestUI/Samples/DataModel/Year.cs [code]
Repeater/TestUI/Samples/ItemsSourceSamples/CollectionChangeDemo.xaml.cs [code]
Repeater/TestUI/Samples/ItemsSourceSamples/DelegatingItemsSource.cs [code]
Repeater/TestUI/Samples/ItemsSourceSamples/ElementsInItemsSourcePage.xaml.cs [code]
Repeater/TestUI/Samples/ItemsSourceSamples/RecipeViewGenerator.cs [code]
Repeater/TestUI/Samples/ItemsSourceSamples/ResetableCollection.cs [code]
Repeater/TestUI/Samples/ItemsSourceSamples/SortingAndFilteringPage.xaml.cs [code]
Repeater/TestUI/Samples/ItemsSourceSamples/VariableSizedItemsPage.xaml.cs [code]
Repeater/TestUI/Samples/ItemTemplateSamples/DisposableUserControl.xaml.cs [code]
Repeater/TestUI/Samples/ItemTemplateSamples/ItemTemplateDemo.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamplePages/NonVirtual/NonVirtualStackLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamplePages/Virtual/PinterestLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingStackLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingUniformStackLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/ItemsViewWithDataPage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/LayoutHelper.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreDemoPage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreMockData.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/Flex.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/FlowLayoutDemoPage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/UniformGrid2DLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingStackLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingStackLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformCarouselStackLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayout.cs [code]
Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayoutSamplePage.xaml.cs [code]
Repeater/TestUI/Samples/NestedLayoutSamples/ItemsViewWithDataPage.xaml.cs [code]
Repeater/TestUI/Samples/NestedLayoutSamples/LayoutHelper.cs [code]
Repeater/TestUI/Samples/NestedLayoutSamples/StoreDemoPage.xaml.cs [code]
Repeater/TestUI/Samples/NestedLayoutSamples/StoreMockData.cs [code]
Repeater/TestUI/Samples/SelectionSample/Common/BoolToBrushConverter.cs [code]
Repeater/TestUI/Samples/SelectionSample/Common/BoolToVisibilityConverter.cs [code]
Repeater/TestUI/Samples/SelectionSample/Common/Data.cs [code]
Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainer.cs [code]
Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainerAutomationPeer.cs [code]
Repeater/TestUI/Samples/SelectionSample/Flat/FlatSample.xaml.cs [code]
Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItem.cs [code]
Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItemAutomationPeer.cs [code]
Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItem.cs [code]
Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItemAutomationPeer.cs [code]
Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedSample.xaml.cs [code]
Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewItem.cs [code]
Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewItemAutomationPeer.cs [code]
Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewSample.xaml.cs [code]
ResourceHelper/ResourceAccessor.cpp [code]
ResourceHelper/ResourceAccessor.h [code]
ResourceHelper/Utils.cpp [code]
ResourceHelper/Utils.h [code]
ScrollPresenter/BringIntoViewOffsetsChange.cpp [code]
ScrollPresenter/BringIntoViewOffsetsChange.h [code]
ScrollPresenter/InteractionTrackerAsyncOperation.cpp [code]
ScrollPresenter/InteractionTrackerAsyncOperation.h [code]
ScrollPresenter/InteractionTrackerOwner.cpp [code]
ScrollPresenter/InteractionTrackerOwner.h [code]
ScrollPresenter/OffsetsChange.cpp [code]
ScrollPresenter/OffsetsChange.h [code]
ScrollPresenter/OffsetsChangeWithAdditionalVelocity.cpp [code]
ScrollPresenter/OffsetsChangeWithAdditionalVelocity.h [code]
ScrollPresenter/RepeatedScrollSnapPoint.h [code]
ScrollPresenter/RepeatedZoomSnapPoint.h [code]
ScrollPresenter/ScrollControllerAddScrollVelocityRequestedEventArgs.cpp [code]
ScrollPresenter/ScrollControllerAddScrollVelocityRequestedEventArgs.h [code]
ScrollPresenter/ScrollControllerPanRequestedEventArgs.cpp [code]
ScrollPresenter/ScrollControllerPanRequestedEventArgs.h [code]
ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.cpp [code]
ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.h [code]
ScrollPresenter/ScrollControllerScrollToRequestedEventArgs.cpp [code]
ScrollPresenter/ScrollControllerScrollToRequestedEventArgs.h [code]
ScrollPresenter/ScrollingAnchorRequestedEventArgs.cpp [code]
ScrollPresenter/ScrollingAnchorRequestedEventArgs.h [code]
ScrollPresenter/ScrollingBringingIntoViewEventArgs.cpp [code]
ScrollPresenter/ScrollingBringingIntoViewEventArgs.h [code]
ScrollPresenter/ScrollingScrollAnimationStartingEventArgs.cpp [code]
ScrollPresenter/ScrollingScrollAnimationStartingEventArgs.h [code]
ScrollPresenter/ScrollingScrollCompletedEventArgs.cpp [code]
ScrollPresenter/ScrollingScrollCompletedEventArgs.h [code]
ScrollPresenter/ScrollingScrollOptions.cpp [code]
ScrollPresenter/ScrollingScrollOptions.h [code]
ScrollPresenter/ScrollingScrollStartingEventArgs.cpp [code]
ScrollPresenter/ScrollingScrollStartingEventArgs.h [code]
ScrollPresenter/ScrollingZoomAnimationStartingEventArgs.cpp [code]
ScrollPresenter/ScrollingZoomAnimationStartingEventArgs.h [code]
ScrollPresenter/ScrollingZoomCompletedEventArgs.cpp [code]
ScrollPresenter/ScrollingZoomCompletedEventArgs.h [code]
ScrollPresenter/ScrollingZoomOptions.cpp [code]
ScrollPresenter/ScrollingZoomOptions.h [code]
ScrollPresenter/ScrollingZoomStartingEventArgs.cpp [code]
ScrollPresenter/ScrollingZoomStartingEventArgs.h [code]
ScrollPresenter/ScrollPresenter.cpp [code]
ScrollPresenter/ScrollPresenter.h [code]
ScrollPresenter/ScrollPresenter.idl [code]
ScrollPresenter/ScrollPresenterAnchoring.cpp [code]
ScrollPresenter/ScrollPresenterAutomationPeer.cpp [code]
ScrollPresenter/ScrollPresenterAutomationPeer.h [code]
ScrollPresenter/ScrollPresenterAutomationPeer.idl [code]
ScrollPresenter/ScrollPresenterPrimitives.idl [code]
ScrollPresenter/ScrollPresenterPrivate.cpp [code]
ScrollPresenter/ScrollPresenterTestHooks.cpp [code]
ScrollPresenter/ScrollPresenterTestHooks.h [code]
ScrollPresenter/ScrollPresenterTestHooks.idl [code]
ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp [code]
ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h [code]
ScrollPresenter/ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp [code]
ScrollPresenter/ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h [code]
ScrollPresenter/ScrollPresenterTestHooksFactory.cpp [code]
ScrollPresenter/ScrollPresenterTestHooksFactory.h [code]
ScrollPresenter/ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.cpp [code]
ScrollPresenter/ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h [code]
ScrollPresenter/ScrollPresenterTrace.h [code]
ScrollPresenter/ScrollPresenterTypeLogging.cpp [code]
ScrollPresenter/ScrollPresenterTypeLogging.h [code]
ScrollPresenter/ScrollSnapPoint.h [code]
ScrollPresenter/SnapPoint.cpp [code]
ScrollPresenter/SnapPoint.h [code]
ScrollPresenter/SnapPointWrapper.cpp [code]
ScrollPresenter/SnapPointWrapper.h [code]
ScrollPresenter/ViewChange.cpp [code]
ScrollPresenter/ViewChange.h [code]
ScrollPresenter/ViewChangeBase.h [code]
ScrollPresenter/ZoomFactorChange.cpp [code]
ScrollPresenter/ZoomFactorChange.h [code]
ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.cpp [code]
ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.h [code]
ScrollPresenter/ZoomSnapPoint.h [code]
ScrollPresenter/APITests/ScrollControllerTests.cs [code]
ScrollPresenter/APITests/ScrollPresenterAnchoringTests.cs [code]
ScrollPresenter/APITests/ScrollPresenterBringIntoViewTests.cs [code]
ScrollPresenter/APITests/ScrollPresenterLayoutTests.cs [code]
ScrollPresenter/APITests/ScrollPresenterSnapPointTests.cs [code]
ScrollPresenter/APITests/ScrollPresenterTests.cs [code]
ScrollPresenter/APITests/ScrollPresenterViewChangeTests.cs [code]
ScrollPresenter/InteractionTests/ScrollPresenterTestsBase.cs [code]
ScrollPresenter/InteractionTests/ScrollPresenterTestsWithAutomationPeer.cs [code]
ScrollPresenter/InteractionTests/ScrollPresenterTestsWithInputHelper.cs [code]
ScrollPresenter/TestUI/BiDirectionalScrollController.cs [code]
ScrollPresenter/TestUI/CompositionScrollController.cs [code]
ScrollPresenter/TestUI/ScrollPresenterAccessibilityPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterBringIntoViewPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterChainingAndRailingPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterDynamicPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterExpressionAnimationSourcesPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterLeakDetectionPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterManipulationModePage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterMousePanningPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterRepeaterAnchoringPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterScrollSnapPointsPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterStackPanelAnchoringPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresentersWithSimpleContentsPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterTestHooksHelper.cs [code]
ScrollPresenter/TestUI/ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterWithCompositionScrollControllersPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterWithSimpleScrollControllersPage.xaml.cs [code]
ScrollPresenter/TestUI/ScrollPresenterZoomSnapPointsPage.xaml.cs [code]
ScrollView/ScrollBarController.cpp [code]
ScrollView/ScrollBarController.h [code]
ScrollView/ScrollView.cpp [code]
ScrollView/ScrollView.h [code]
ScrollView/ScrollView.idl [code]
ScrollView/ScrollViewBringIntoViewOperation.cpp [code]
ScrollView/ScrollViewBringIntoViewOperation.h [code]
ScrollView/ScrollViewLightup.cpp [code]
ScrollView/ScrollViewTestHooks.cpp [code]
ScrollView/ScrollViewTestHooks.h [code]
ScrollView/ScrollViewTestHooks.idl [code]
ScrollView/ScrollViewTestHooksFactory.cpp [code]
ScrollView/ScrollViewTestHooksFactory.h [code]
ScrollView/ScrollViewTrace.h [code]
ScrollView/APITests/ScrollViewTests.cs [code]
ScrollView/InteractionTests/ScrollViewTestsWithInputHelper.cs [code]
ScrollView/TestUI/ScrollViewBlankPage.xaml.cs [code]
ScrollView/TestUI/ScrollViewBringIntoViewPage.xaml.cs [code]
ScrollView/TestUI/ScrollViewDynamicPage.xaml.cs [code]
ScrollView/TestUI/ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs [code]
ScrollView/TestUI/ScrollViewPage.xaml.cs [code]
ScrollView/TestUI/ScrollViewsWithSimpleContentsPage.xaml.cs [code]
ScrollView/TestUI/ScrollViewTestHooksHelper.cs [code]
ScrollView/TestUI/ScrollViewWithRTLFlowDirectionPage.xaml.cs [code]
ScrollView/TestUI/ScrollViewWithScrollControllersPage.xaml.cs [code]
SelectorBar/SelectorBar.cpp [code]
SelectorBar/SelectorBar.h [code]
SelectorBar/SelectorBar.idl [code]
SelectorBar/SelectorBarItem.cpp [code]
SelectorBar/SelectorBarItem.h [code]
SelectorBar/SelectorBarItemAutomationPeer.cpp [code]
SelectorBar/SelectorBarItemAutomationPeer.h [code]
SelectorBar/SelectorBarSelectionChangedEventArgs.cpp [code]
SelectorBar/SelectorBarSelectionChangedEventArgs.h [code]
SelectorBar/SelectorBarTestHooks.cpp [code]
SelectorBar/SelectorBarTestHooks.h [code]
SelectorBar/SelectorBarTestHooks.idl [code]
SelectorBar/SelectorBarTestHooksFactory.cpp [code]
SelectorBar/SelectorBarTestHooksFactory.h [code]
SelectorBar/SelectorBarTrace.h [code]
SelectorBar/APITests/SelectorBarTests.cs [code]
SelectorBar/InteractionTests/SelectorBarTests.cs [code]
SelectorBar/TestUI/SelectorBarPage.xaml.cs [code]
SelectorBar/TestUI/SelectorBarSamplePage.xaml.cs [code]
SelectorBar/TestUI/SelectorBarSummaryPage.xaml.cs [code]
SplitButton/SplitButton.cpp [code]
SplitButton/SplitButton.h [code]
SplitButton/SplitButton.idl [code]
SplitButton/SplitButtonAutomationPeer.cpp [code]
SplitButton/SplitButtonAutomationPeer.h [code]
SplitButton/SplitButtonAutomationPeer.idl [code]
SplitButton/SplitButtonEventArgs.h [code]
SplitButton/SplitButtonTestApi.cpp [code]
SplitButton/SplitButtonTestApi.h [code]
SplitButton/SplitButtonTestApi.idl [code]
SplitButton/SplitButtonTestApiFactory.cpp [code]
SplitButton/SplitButtonTestHelper.cpp [code]
SplitButton/SplitButtonTestHelper.h [code]
SplitButton/ToggleSplitButton.cpp [code]
SplitButton/ToggleSplitButton.h [code]
SplitButton/ToggleSplitButtonAutomationPeer.cpp [code]
SplitButton/ToggleSplitButtonAutomationPeer.h [code]
SplitButton/APITests/SplitButtonTests.cs [code]
SplitButton/InteractionTests/SplitButtonTests.cs [code]
SplitButton/TestUI/SplitButtonPage.xaml.cs [code]
SplitView/TestUI/SplitViewPage.xaml.cs [code]
SwipeControl/SwipeControl.cpp [code]
SwipeControl/SwipeControl.h [code]
SwipeControl/SwipeControl.idl [code]
SwipeControl/SwipeControlInteractionTrackerOwner.cpp [code]
SwipeControl/SwipeControlInteractionTrackerOwner.h [code]
SwipeControl/SwipeControlTrace.h [code]
SwipeControl/SwipeItem.cpp [code]
SwipeControl/SwipeItem.h [code]
SwipeControl/SwipeItemInvokedEventArgs.cpp [code]
SwipeControl/SwipeItemInvokedEventArgs.h [code]
SwipeControl/SwipeItems.cpp [code]
SwipeControl/SwipeItems.h [code]
SwipeControl/SwipeTestHooks.cpp [code]
SwipeControl/SwipeTestHooks.h [code]
SwipeControl/SwipeTestHooks.idl [code]
SwipeControl/SwipeTestHooksFactory.cpp [code]
SwipeControl/SwipeTestHooksFactory.h [code]
SwipeControl/SwipeControl_APITests/SwipeControlTests.cs [code]
SwipeControl/SwipeControl_InteractionTests/SwipeControlTests.cs [code]
SwipeControl/SwipeControl_TestUI/SwipeControlClearPage.xaml.cs [code]
SwipeControl/SwipeControl_TestUI/SwipeControlPage.xaml.cs [code]
SwipeControl/SwipeControl_TestUI/SwipeControlPage2.xaml.cs [code]
SwipeControl/SwipeControl_TestUI/SwipePage.xaml.cs [code]
SwipeControl/SwipeControl_TestUI/TestCommand.cs [code]
TabView/TabView.cpp [code]
TabView/TabView.h [code]
TabView/TabView.idl [code]
TabView/TabViewAutomationPeer.cpp [code]
TabView/TabViewAutomationPeer.h [code]
TabView/TabViewItem.cpp [code]
TabView/TabViewItem.h [code]
TabView/TabViewItemAutomationPeer.cpp [code]
TabView/TabViewItemAutomationPeer.h [code]
TabView/TabViewItemTemplateSettings.h [code]
TabView/TabViewListView.cpp [code]
TabView/TabViewListView.h [code]
TabView/TabViewTrace.h [code]
TabView/APITests/TabViewTests.cs [code]
TabView/InteractionTests/TabViewTearOutTests.cs [code]
TabView/InteractionTests/TabViewTests.cs [code]
TabView/TestUI/MultipleTabViewPage.xaml.cs [code]
TabView/TestUI/TabViewAxeTestPage.xaml.cs [code]
TabView/TestUI/TabViewPage.xaml.cs [code]
TabView/TestUI/TabViewSizingPage.xaml.cs [code]
TabView/TestUI/TabViewTabClosingBehaviorPage.xaml.cs [code]
TabView/TestUI/TabViewTabItemsSourcePage.xaml.cs [code]
TabView/TestUI/TabViewTearOutWindowWithDataItems.xaml.cs [code]
TabView/TestUI/TabViewTearOutWindowWithoutDataItems.xaml.cs [code]
TeachingTip/TeachingTip.cpp [code]
TeachingTip/TeachingTip.h [code]
TeachingTip/TeachingTip.idl [code]
TeachingTip/TeachingTipAutomationPeer.cpp [code]
TeachingTip/TeachingTipAutomationPeer.h [code]
TeachingTip/TeachingTipAutomationPeer.idl [code]
TeachingTip/TeachingTipClosedEventArgs.cpp [code]
TeachingTip/TeachingTipClosedEventArgs.h [code]
TeachingTip/TeachingTipClosingEventArgs.cpp [code]
TeachingTip/TeachingTipClosingEventArgs.h [code]
TeachingTip/TeachingTipTemplateSettings.cpp [code]
TeachingTip/TeachingTipTemplateSettings.h [code]
TeachingTip/TeachingTipTestHooks.cpp [code]
TeachingTip/TeachingTipTestHooks.h [code]
TeachingTip/TeachingTipTestHooks.idl [code]
TeachingTip/APITests/TeachingTipTests.cs [code]
TeachingTip/InteractionTests/TeachingTipFocusTestPageElements.cs [code]
TeachingTip/InteractionTests/TeachingTipTestPageElements.cs [code]
TeachingTip/InteractionTests/TeachingTipTests.cs [code]
TeachingTip/TestUI/TeachingTipCaseBundle.xaml.cs [code]
TeachingTip/TestUI/TeachingTipFocusPage.xaml.cs [code]
TeachingTip/TestUI/TeachingTipInXamlPage.xaml.cs [code]
TeachingTip/TestUI/TeachingTipPage.xaml.cs [code]
Telemetry/MicrosoftTelemetry.h [code]
Telemetry/MuxcTraceLogging.cpp [code]
Telemetry/MuxcTraceLogging.h [code]
Telemetry/RuntimeProfiler.cpp [code]
Telemetry/RuntimeProfiler.h [code]
Telemetry/TypeLogging.cpp [code]
Telemetry/TypeLogging.h [code]
TestHooks/MUXControlsTestHooks.cpp [code]
TestHooks/MUXControlsTestHooks.h [code]
TestHooks/MUXControlsTestHooks.idl [code]
TestHooks/MUXControlsTestHooksFactory.cpp [code]
TestHooks/MUXControlsTestHooksFactory.h [code]
TestHooks/MUXControlsTestHooksLoggingMessageEventArgs.cpp [code]
TestHooks/MUXControlsTestHooksLoggingMessageEventArgs.h [code]
TitleBar/TitleBar.cpp [code]
TitleBar/TitleBar.h [code]
TitleBar/TitleBar.idl [code]
TitleBar/TitleBarAutomationPeer.cpp [code]
TitleBar/TitleBarAutomationPeer.h [code]
TitleBar/TitleBarTemplateSettings.cpp [code]
TitleBar/TitleBarTemplateSettings.h [code]
TitleBar/InteractionTests/TitleBarTests.cs [code]
TitleBar/TestUI/TitleBarPage.xaml.cs [code]
TitleBar/TestUI/TitleBarPageWindow.xaml.cs [code]
TreeView/TreeView.cpp [code]
TreeView/TreeView.h [code]
TreeView/TreeView.idl [code]
TreeView/TreeViewAutomationPeers.idl [code]
TreeView/TreeViewCollapsedEventArgs.cpp [code]
TreeView/TreeViewCollapsedEventArgs.h [code]
TreeView/TreeViewDragItemsCompletedEventArgs.cpp [code]
TreeView/TreeViewDragItemsCompletedEventArgs.h [code]
TreeView/TreeViewDragItemsStartingEventArgs.cpp [code]
TreeView/TreeViewDragItemsStartingEventArgs.h [code]
TreeView/TreeViewExpandingEventArgs.cpp [code]
TreeView/TreeViewExpandingEventArgs.h [code]
TreeView/TreeViewItem.cpp [code]
TreeView/TreeViewItem.h [code]
TreeView/TreeViewItemAutomationPeer.cpp [code]
TreeView/TreeViewItemAutomationPeer.h [code]
TreeView/TreeViewItemDataAutomationPeer.cpp [code]
TreeView/TreeViewItemDataAutomationPeer.h [code]
TreeView/TreeViewItemInvokedEventArgs.cpp [code]
TreeView/TreeViewItemInvokedEventArgs.h [code]
TreeView/TreeViewItemTemplateSettings.cpp [code]
TreeView/TreeViewItemTemplateSettings.h [code]
TreeView/TreeViewList.cpp [code]
TreeView/TreeViewList.h [code]
TreeView/TreeViewListAutomationPeer.cpp [code]
TreeView/TreeViewListAutomationPeer.h [code]
TreeView/TreeViewNode.cpp [code]
TreeView/TreeViewNode.h [code]
TreeView/TreeViewSelectionChangedEventArgs.cpp [code]
TreeView/TreeViewSelectionChangedEventArgs.h [code]
TreeView/ViewModel.cpp [code]
TreeView/ViewModel.h [code]
TreeView/APITests/TreeViewTests.cs [code]
TreeView/InteractionTests/TreeViewTests.cs [code]
TreeView/TestUI/TreeViewItemSource.cs [code]
TreeView/TestUI/TreeViewItemsSourceTestPage.xaml.cs [code]
TreeView/TestUI/TreeViewItemTemplateSelectorTestPage.xaml.cs [code]
TreeView/TestUI/TreeViewLateDataInitTestPage.xaml.cs [code]
TreeView/TestUI/TreeViewNode2.cs [code]
TreeView/TestUI/TreeViewNodeInMarkupTestPage.xaml.cs [code]
TreeView/TestUI/TreeViewPage.xaml.cs [code]
TreeView/TestUI/TreeViewUnrealizedChildrenTestPage.xaml.cs [code]
TreeView/TestUI/TreeViewViewModel.cs [code]
TreeView/TestUI/VirtualizingDataSource.cs [code]
TwoPaneView/DisplayRegionHelper.cpp [code]
TwoPaneView/DisplayRegionHelper.h [code]
TwoPaneView/DisplayRegionHelperTestApi.cpp [code]
TwoPaneView/DisplayRegionHelperTestApi.h [code]
TwoPaneView/DisplayRegionHelperTestApi.idl [code]
TwoPaneView/DisplayRegionHelperTestApiFactory.cpp [code]
TwoPaneView/DisplayRegionHelperTestApiFactory.h [code]
TwoPaneView/TwoPaneView.cpp [code]
TwoPaneView/TwoPaneView.h [code]
TwoPaneView/TwoPaneView.idl [code]
TwoPaneView/APITests/TwoPaneViewTests.cs [code]
TwoPaneView/InteractionTests/TwoPaneViewTests.cs [code]
TwoPaneView/TestUI/TwoPaneViewPage.xaml.cs [code]
WebView2/InvokableCallbackHelper.h [code]
WebView2/WebView2.cpp [code]
WebView2/WebView2.h [code]
WebView2/WebView2.idl [code]
WebView2/WebView2AutomationPeer.cpp [code]
WebView2/WebView2AutomationPeer.h [code]
WebView2/WebView2AutomationPeer.idl [code]
WebView2/WebView2Utility.h [code]
WebView2/InteractionTests/WebView2Tests.cs [code]
WebView2/TestUI/WebView2BasicPage.xaml.cs [code]
WebView2/TestUI/WebView2Common.cs [code]
WebView2/TestUI/WebView2CoreObjectsPage.xaml.cs [code]
WebView2/TestUI/WebView2Page.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIcon.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon

AnimatedIcon.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedIcon.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include <AnimatedIconTestHooks.h>
#include "Utils.h"
#include <mutex>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIcon.h File Reference

  • File List
  • File Members
  • AnimatedIcon
Classes

AnimatedIcon.h File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedIcon.g.h"
#include "AnimatedIcon.properties.h"
#include <queue>

Go to the source code of this file.

Classes

class AnimatedIcon
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIcon.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
Classes | Namespaces | Variables

AnimatedIcon.idl File Reference

Go to the source code of this file.

Classes

interface | IAnimatedVisualSource

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | AnimatedIcon
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIconTestHooks.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon

AnimatedIconTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedIconTestHooks.h"
#include "AnimatedIconTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIconTestHooks.h File Reference

  • File List
  • File Members
  • AnimatedIcon
Classes

AnimatedIconTestHooks.h File Reference

#include "AnimatedIcon.h"
#include "AnimatedIconTestHooks.g.h"

Go to the source code of this file.

Classes

class AnimatedIconTestHooks
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIconTestHooks.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
Namespaces | Enumerations

AnimatedIconTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Enumerations

enum | AnimatedIconAnimationQueueBehavior { Cut, QueueOne, SpeedUpQueueOne }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedAcceptVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedAcceptVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <Windows.Graphics.Effects.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedAcceptVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedAcceptVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedAcceptVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedAcceptVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedAcceptVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedAcceptVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedAcceptVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedBackVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedBackVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <Windows.Graphics.Effects.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedBackVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedBackVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedBackVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedBackVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedBackVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedBackVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedBackVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedChevronDownSmallVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedChevronDownSmallVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <Windows.Graphics.Effects.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedChevronDownSmallVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedChevronDownSmallVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedChevronDownSmallVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedChevronDownSmallVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedChevronDownSmallVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedChevronDownSmallVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedChevronDownSmallVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedChevronRightDownSmallVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedChevronRightDownSmallVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedChevronRightDownSmallVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedChevronRightDownSmallVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedChevronRightDownSmallVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedChevronRightDownSmallVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedChevronRightDownSmallVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedChevronRightDownSmallVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedChevronUpDownSmallVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedChevronUpDownSmallVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <Windows.Graphics.Effects.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedChevronUpDownSmallVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedChevronUpDownSmallVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedChevronUpDownSmallVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedChevronUpDownSmallVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedChevronUpDownSmallVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedChevronUpDownSmallVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedFindVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedFindVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <Windows.Graphics.Effects.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedFindVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedFindVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedFindVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedFindVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedFindVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedFindVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedFindVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedGlobalNavigationButtonVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedGlobalNavigationButtonVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <Windows.Graphics.Effects.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedGlobalNavigationButtonVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedGlobalNavigationButtonVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedGlobalNavigationButtonVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedGlobalNavigationButtonVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedGlobalNavigationButtonVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedGlobalNavigationButtonVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.cpp File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes | Namespaces

AnimatedSettingsVisualSource.cpp File Reference

#include "pch.h"
#include "AnimatedVisuals\AnimatedSettingsVisualSource.h"
#include <winrt/Windows.Foundation.Metadata.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Microsoft.UI.Composition.h>
#include "d2d1.h"
#include <d2d1_1.h>
#include <d2d1helper.h>
#include <Windows.Graphics.Interop.h>
#include <Windows.Graphics.Effects.Interop.h>
#include <winrt/Windows.Graphics.Effects.h>
#include "AnimatedVisuals\AnimatedSettingsVisualSource.g.cpp"

Go to the source code of this file.

Classes

class | AnimatedSettingsVisualSource_AnimatedVisual
class | CanvasGeometry

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.h File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Classes

AnimatedSettingsVisualSource.h File Reference

#include "common.h"
#include "AnimatedVisuals\AnimatedSettingsVisualSource.g.h"

Go to the source code of this file.

Classes

class AnimatedSettingsVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.idl File Reference

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals
Namespaces | Variables

AnimatedSettingsVisualSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCAV_NAMESPACE

Variables

runtimeclass | AnimatedSettingsVisualSource
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/APITests/AnimatedIconTests.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • APITests
Classes | Namespaces

AnimatedIconTests.cs File Reference

Go to the source code of this file.

Classes

class | AnimatedIconTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/APITests/MockAnimatedIconSource.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • APITests
Classes | Namespaces

MockAnimatedIconSource.cs File Reference

Go to the source code of this file.

Classes

class | MockAnimatedIconSource

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/AnimatedIconHost.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • TestUI
Classes | Namespaces

AnimatedIconHost.cs File Reference

Go to the source code of this file.

Classes

class | AnimatedIconHost

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/AnimatedIconPage.xaml.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • TestUI
Classes | Namespaces

AnimatedIconPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AnimatedIconPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/BrightnessSun.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • TestUI
Classes | Namespaces

BrightnessSun.cs File Reference

Go to the source code of this file.

Classes

class | BrightnessSun
class | BrightnessSun::BrightnessSun_AnimatedVisual

Namespaces

namespace | AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/ColorToSolidColorBrushConverter.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • TestUI
Classes | Namespaces

ColorToSolidColorBrushConverter.cs File Reference

Go to the source code of this file.

Classes

class | ColorToSolidColorBrushConverter

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/DoubleToStringConverter.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • TestUI
Classes | Namespaces

DoubleToStringConverter.cs File Reference

Go to the source code of this file.

Classes

class | DoubleToStringConverter

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/MockIRichAnimatedIconSource.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • TestUI
Classes | Namespaces

MockIRichAnimatedIconSource.cs File Reference

Go to the source code of this file.

Classes

class | MockIAnimatedIconSource2

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/ToggleAnimatedIconHost.cs File Reference

  • File List
  • File Members
  • AnimatedIcon
  • TestUI
Classes | Namespaces

ToggleAnimatedIconHost.cs File Reference

Go to the source code of this file.

Classes

class | ToggleAnimatedIconHost

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayer.cpp File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
Functions

AnimatedVisualPlayer.cpp File Reference

#include "pch.h"
#include "AnimatedVisualPlayer.h"
#include "AnimatedVisualPlayerAutomationPeer.h"
#include "RuntimeProfiler.h"
#include <synchapi.h>
#include <winerror.h>
#include <math.h>

Go to the source code of this file.

Functions

m_fromProgress (fromProgress)
m_looped (looped)
m_toProgress (toProgress)

Function Documentation

m_fromProgress ( fromProgress )
m_looped ( looped )

Definition at line 20 of file AnimatedVisualPlayer.cpp.

{
    // Save the play duration as time.
    // If toProgress is less than fromProgress the animation will wrap around,
    // so the time is calculated as fromProgress..end + start..toProgress.
    const auto durationAsProgress = fromProgress > toProgress ? ((1 - fromProgress) + toProgress) : (toProgress - fromProgress);
    // NOTE: this relies on the Duration() being set on the owner.
    m_playDuration = std::chrono::duration_cast<winrt::TimeSpan>(m_owner->Duration() * durationAsProgress);
}

m_toProgress ( toProgress )
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayer.h File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
Classes

AnimatedVisualPlayer.h File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedVisualPlayer.g.h"
#include "AnimatedVisualPlayer.properties.h"

Go to the source code of this file.

Classes

struct | AnimatedVisualPlayer
struct | AnimatedVisualPlayer::final
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayer.idl File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
Classes | Namespaces | Enumerations | Functions | Variables

AnimatedVisualPlayer.idl File Reference

Go to the source code of this file.

Classes

interface | IAnimatedVisual
interface | IAnimatedVisual
interface | IAnimatedVisualSource
interface | IAnimatedVisualSource
interface | IAnimatedVisualSource3
interface | IClosable

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | PlayerAnimationOptimization { Latency, Resources }

Functions

void | Pause ()
Windows Foundation IAsyncAction | PlayAsync (Double fromProgress, Double toProgress, Boolean looped)
void | Resume ()
void | SetProgress (Double progress)
void | Stop ()

Variables

unsealed runtimeclass | AnimatedVisualPlayer
Boolean | AutoPlay
Microsoft UI Xaml DataTemplate | FallbackContent
Double | PlaybackRate
IAnimatedVisualSource | Source
Microsoft UI Xaml Media Stretch | Stretch
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.cpp File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer

AnimatedVisualPlayerAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedVisualPlayerAutomationPeer.h"
#include "AnimatedVisualPlayer.h"
#include "AnimatedVisualPlayerAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.h File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
Classes

AnimatedVisualPlayerAutomationPeer.h File Reference

#include "AnimatedVisualPlayer.h"
#include "AnimatedVisualPlayerAutomationPeer.g.h"

Go to the source code of this file.

Classes

class AnimatedVisualPlayerAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.idl File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
Namespaces | Variables

AnimatedVisualPlayerAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | AnimatedVisualPlayerAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/inc/Constants.cs File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
  • inc
Classes | Namespaces

Constants.cs File Reference

Go to the source code of this file.

Classes

class | Constants
Share these constants between the UI and the Interaction test that uses Accessibility to access them.

Namespaces

namespace | AnimatedVisualPlayerTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/InteractionTests/AnimatedVisualPlayerTests.cs File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
  • InteractionTests
Classes | Namespaces

AnimatedVisualPlayerTests.cs File Reference

Go to the source code of this file.

Classes

class | AnimatedVisualPlayerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/TestUI/AnimatedVisualPlayerPage.xaml.cs File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
  • TestUI
Classes | Namespaces

AnimatedVisualPlayerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AnimatedVisualPlayerPage
class | FallbackGrid

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/TestUI/LottieLogo.cs File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
  • TestUI
Classes | Namespaces

LottieLogo.cs File Reference

Go to the source code of this file.

Classes

class | LottieLogo
class | LottieLogo::LottieLogo_AnimatedVisual

Namespaces

namespace | AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/TestUI/nullsource.cs File Reference

  • File List
  • File Members
  • AnimatedVisualPlayer
  • TestUI
Classes | Namespaces

nullsource.cs File Reference

Go to the source code of this file.

Classes

class | Nullsource

Namespaces

namespace | AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBar.cpp File Reference

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnnotatedScrollBar.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollingScrollOptions.h"
#include "ScrollControllerScrollToRequestedEventArgs.h"
#include "ScrollControllerScrollByRequestedEventArgs.h"
#include "ScrollControllerAddScrollVelocityRequestedEventArgs.h"
#include "ScrollControllerPanRequestedEventArgs.h"
#include "AnnotatedScrollBarScrollingEventArgs.h"
#include "AnnotatedScrollBarDetailLabelRequestedEventArgs.h"
#include "Vector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBar.h File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
Classes

AnnotatedScrollBar.h File Reference

#include "AnnotatedScrollBarTrace.h"
#include "AnnotatedScrollBar.g.h"
#include "AnnotatedScrollBar.properties.h"
#include "AnnotatedScrollBarPanningInfo.h"

Go to the source code of this file.

Classes

class AnnotatedScrollBar
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBar.idl File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
Namespaces | Enumerations

AnnotatedScrollBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | AnnotatedScrollBarScrollingEventKind { Click = 0, Drag = 1, IncrementButton = 2, DecrementButton = 3 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnnotatedScrollBarDetailLabelRequestedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarDetailLabelRequestedEventArgs.h File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
Classes

AnnotatedScrollBarDetailLabelRequestedEventArgs.h File Reference

#include "AnnotatedScrollBarDetailLabelRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class AnnotatedScrollBarDetailLabelRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarLabel.cpp File Reference

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarLabel.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnnotatedScrollBarLabel.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarLabel.h File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
Classes

AnnotatedScrollBarLabel.h File Reference

#include "AnnotatedScrollBarLabel.g.h"

Go to the source code of this file.

Classes

class AnnotatedScrollBarLabel
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.cpp File Reference

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarPanningInfo.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnnotatedScrollBarPanningInfo.h"
#include "AnnotatedScrollBarTrace.h"
#include "ScrollControllerPanRequestedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.h File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
Classes

AnnotatedScrollBarPanningInfo.h File Reference

Go to the source code of this file.

Classes

class AnnotatedScrollBarPanningInfo
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.cpp File Reference

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarScrollingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnnotatedScrollBarScrollingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.h File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
Classes

AnnotatedScrollBarScrollingEventArgs.h File Reference

#include "AnnotatedScrollBarScrollingEventArgs.g.h"

Go to the source code of this file.

Classes

class AnnotatedScrollBarScrollingEventArgs
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarTrace.h File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
Classes | Defines | Functions

AnnotatedScrollBarTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | AnnotatedScrollBarTrace

Defines

#define | ANNOTATEDSCROLLBAR_TRACE_INFO(sender, message,...)
#define | ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(sender, message,...)
#define | ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) AnnotatedScrollBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | ANNOTATEDSCROLLBAR_TRACE_PERF(info)
#define | ANNOTATEDSCROLLBAR_TRACE_PERF_DBG(info)
#define | ANNOTATEDSCROLLBAR_TRACE_VERBOSE(sender, message,...)
#define | ANNOTATEDSCROLLBAR_TRACE_VERBOSE_DBG(sender, message,...)
#define | ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) AnnotatedScrollBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsAnnotatedScrollBarPerfTracingEnabled ()
bool | IsAnnotatedScrollBarTracingEnabled ()
bool | IsAnnotatedScrollBarVerboseTracingEnabled ()

Define Documentation

#define ANNOTATEDSCROLLBAR_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsAnnotatedScrollBarTracingEnabled()) \
{ \
    ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (AnnotatedScrollBarTrace::s_IsDebugOutputEnabled || AnnotatedScrollBarTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file AnnotatedScrollBarTrace.h.

#define ANNOTATEDSCROLLBAR_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file AnnotatedScrollBarTrace.h.

#define ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | AnnotatedScrollBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file AnnotatedScrollBarTrace.h.

#define ANNOTATEDSCROLLBAR_TRACE_PERF ( info )
Value:
if (IsAnnotatedScrollBarPerfTracingEnabled()) \
{ \
    AnnotatedScrollBarTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file AnnotatedScrollBarTrace.h.

#define ANNOTATEDSCROLLBAR_TRACE_PERF_DBG ( info )

Definition at line 71 of file AnnotatedScrollBarTrace.h.

#define ANNOTATEDSCROLLBAR_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsAnnotatedScrollBarVerboseTracingEnabled()) \
{ \
    ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (AnnotatedScrollBarTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file AnnotatedScrollBarTrace.h.

#define ANNOTATEDSCROLLBAR_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file AnnotatedScrollBarTrace.h.

#define ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | AnnotatedScrollBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file AnnotatedScrollBarTrace.h.

Function Documentation

bool IsAnnotatedScrollBarPerfTracingEnabled ( ) [inline]

Definition at line 25 of file AnnotatedScrollBarTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_ANNOTATEDSCROLLBAR || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsAnnotatedScrollBarTracingEnabled ( ) [inline]

Definition at line 11 of file AnnotatedScrollBarTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ANNOTATEDSCROLLBAR || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsAnnotatedScrollBarVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file AnnotatedScrollBarTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ANNOTATEDSCROLLBAR || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/APITests/AnnotatedScrollBarTests.cs File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
  • APITests
Classes | Namespaces

AnnotatedScrollBarTests.cs File Reference

Go to the source code of this file.

Classes

class | AnnotatedScrollBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/InteractionTests/AnnotatedScrollBarInteractionTests.cs File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
  • InteractionTests
Classes | Namespaces

AnnotatedScrollBarInteractionTests.cs File Reference

Go to the source code of this file.

Classes

class | AnnotatedScrollBarInteractionTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/AnnotatedScrollBarIScrollControllerPage.xaml.cs File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
  • TestUI
Classes | Namespaces

AnnotatedScrollBarIScrollControllerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AnnotatedScrollBarIScrollControllerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/AnnotatedScrollBarPage.xaml.cs File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
  • TestUI
Classes | Namespaces

AnnotatedScrollBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AnnotatedScrollBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/AnnotatedScrollBarRangeBasePage.xaml.cs File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
  • TestUI
Classes | Namespaces

AnnotatedScrollBarRangeBasePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AnnotatedScrollBarRangeBasePage
class | IScrollControllerAdapter

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/AnnotatedScrollBarSummaryPage.xaml.cs File Reference

  • File List
  • File Members
  • AnnotatedScrollBar
  • TestUI
Classes | Namespaces

AnnotatedScrollBarSummaryPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AnnotatedScrollBarSummaryPage
class | Square

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/AutoSuggestBoxHelper.cpp File Reference

  • File List
  • File Members
  • AutoSuggestBox

AutoSuggestBoxHelper.cpp File Reference

#include <pch.h>
#include <common.h>
#include "AutoSuggestBoxHelper.h"
#include "CornerRadiusFilterConverter.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/AutoSuggestBoxHelper.h File Reference

  • File List
  • File Members
  • AutoSuggestBox
Classes

AutoSuggestBoxHelper.h File Reference

#include "AutoSuggestBoxHelper.g.h"
#include "AutoSuggestBoxHelper.properties.h"

Go to the source code of this file.

Classes

class | AutoSuggestBoxHelper
class | AutoSuggestEventRevokers
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/AutoSuggestBoxHelper.idl File Reference

  • File List
  • File Members
  • AutoSuggestBox
Namespaces

AutoSuggestBoxHelper.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_XCP_NAMESPACE
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/APITests/AutoSuggestBoxTests.cs File Reference

  • File List
  • File Members
  • AutoSuggestBox
  • APITests
Classes | Namespaces

AutoSuggestBoxTests.cs File Reference

Go to the source code of this file.

Classes

class | AutoSuggestBoxTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/InteractionTests/AutoSuggestBoxTests.cs File Reference

  • File List
  • File Members
  • AutoSuggestBox
  • InteractionTests
Classes | Namespaces

AutoSuggestBoxTests.cs File Reference

Go to the source code of this file.

Classes

class | AutoSuggestBox

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml.cs File Reference

  • File List
  • File Members
  • AutoSuggestBox
  • TestUI
Classes | Namespaces

AutoSuggestBoxPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AutoSuggestBoxPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBar.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "BreadcrumbBar.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "BreadcrumbBarItem.h"
#include "BreadcrumbLayout.h"
#include "BreadcrumbBarItemClickedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBar.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbBar.h File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbBar.g.h"
#include "BreadcrumbBar.properties.h"
#include "SplitButton.h"
#include "BreadcrumbBarElementFactory.h"
#include "Vector.h"
#include "BreadcrumbIterable.h"
#include "BreadcrumbLayout.h"

Go to the source code of this file.

Classes

class BreadcrumbBar
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBar.idl File Reference

  • File List
  • File Members
  • Breadcrumb
Namespaces

BreadcrumbBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarAutomationPeer.idl File Reference

  • File List
  • File Members
  • Breadcrumb
Namespaces | Variables

BreadcrumbBarAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | BreadcrumbBarItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarElementFactory.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBarElementFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemTemplateWrapper.h"
#include "BreadcrumbBarElementFactory.h"
#include "BreadcrumbBarItem.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarElementFactory.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbBarElementFactory.h File Reference

#include "common.h"
#include "ElementFactory.h"

Go to the source code of this file.

Classes

class BreadcrumbElementFactory
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItem.cpp File Reference

  • File List
  • File Members
  • Breadcrumb
Namespaces

BreadcrumbBarItem.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbBarItem.h"
#include "RuntimeProfiler.h"
#include "ItemTemplateWrapper.h"
#include "BreadcrumbBar.h"
#include "BreadcrumbBarItemAutomationPeer.h"
#include "BreadcrumbBarItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItem.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbBarItem.h File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbBarElementFactory.h"
#include "BreadcrumbBarItem.g.h"

Go to the source code of this file.

Classes

class BreadcrumbBarItem
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItemAutomationPeer.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBarItemAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "BreadcrumbBarItem.h"
#include "BreadcrumbBarItemAutomationPeer.h"
#include "BreadcrumbBarItemAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItemAutomationPeer.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbBarItemAutomationPeer.h File Reference

#include "BreadcrumbBarItem.h"
#include "BreadcrumbBarItemAutomationPeer.g.h"

Go to the source code of this file.

Classes

class BreadcrumbBarItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItemClickedEventArgs.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBarItemClickedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbBarItemClickedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItemClickedEventArgs.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbBarItemClickedEventArgs.h File Reference

#include "BreadcrumbBarItemClickedEventArgs.g.h"

Go to the source code of this file.

Classes

class BreadcrumbBarItemClickedEventArgs
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbItem.properties.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadCrumbItem.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbItem.properties.h File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbItem.properties.h File Reference

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterable.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbIterable.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbIterable.h"
#include "BreadcrumbIterator.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterable.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbIterable.h File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"

Go to the source code of this file.

Classes

class BreadcrumbIterable
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterator.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbIterator.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbIterator.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterator.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbIterator.h File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbIterable.h"

Go to the source code of this file.

Classes

class BreadcrumbIterator
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbLayout.cpp File Reference

  • File List
  • File Members
  • Breadcrumb

BreadcrumbLayout.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbLayout.h"
#include "BreadcrumbBar.h"
#include "BreadcrumbBarItem.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbLayout.h File Reference

  • File List
  • File Members
  • Breadcrumb
Classes

BreadcrumbLayout.h File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "NonVirtualizingLayout.h"

Go to the source code of this file.

Classes

class BreadcrumbLayout
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/APITests/BreadcrumbTests.cs File Reference

  • File List
  • File Members
  • Breadcrumb
  • APITests
Classes | Namespaces

BreadcrumbTests.cs File Reference

Go to the source code of this file.

Classes

class | BreadcrumbTests
class | BreadcrumbTests::MockClass

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/InteractionTests/BreadcrumbBarTests.cs File Reference

  • File List
  • File Members
  • Breadcrumb
  • InteractionTests
Classes | Namespaces

BreadcrumbBarTests.cs File Reference

Go to the source code of this file.

Classes

class | BreadcrumbBarItem
class | BreadcrumbBarItem::BreadcrumbBarItemFactory
class | BreadcrumbTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/TestUI/BreadcrumbBarAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • Breadcrumb
  • TestUI
Classes | Namespaces

BreadcrumbBarAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | BreadcrumbBarAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/TestUI/BreadcrumbBarPage.xaml.cs File Reference

  • File List
  • File Members
  • Breadcrumb
  • TestUI
Classes | Namespaces

BreadcrumbBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | BreadcrumbBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/TestUI/TreeStructure.cs File Reference

  • File List
  • File Members
  • Breadcrumb
  • TestUI
Classes | Namespaces

TreeStructure.cs File Reference

Go to the source code of this file.

Classes

class | TreeNode
class | TreeStructure

Namespaces

namespace | Breadcrumb_TestUI
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/BindableVector.h File Reference

  • File List
  • File Members
  • Collections
Classes

BindableVector.h File Reference

#include "Vector.h"

Go to the source code of this file.

Classes

class BindableVector< flags, Helper >
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/HashMap.h File Reference

  • File List
  • File Members
  • Collections
Classes

HashMap.h File Reference

Go to the source code of this file.

Classes

class | HashMap< K, V >
class | HashMap< K, V >::Iterator
class | HashMap< K, V >::Iterator::KeyValuePair
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/Vector.h File Reference

  • File List
  • File Members
  • Collections
Classes | Defines | Enumerations | Functions

Vector.h File Reference

#include "VectorIterator.h"
#include "VectorChangedEventArgs.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct | ComposableBasePointersImplTType< isDependencyObjectBase >
struct | ComposableBasePointersImplTType< false >
struct | IVectorOwner< EventSource, T >
struct | ObservableTraits< T, isObservable, isBindable >
struct | ObservableTraits< T, isObservable, isBindable >::Dummy
struct | ObservableTraits< T, true, isBindable >
struct | ObservableVector< T >
struct | ObservableVector< T >::Iterator
struct | ObservableVectorInnerImpl< VectorOptions, Wrapper >
struct | TStorageWrapperImpl< T, isNoTrackerRef >
struct | TStorageWrapperImpl< T, true >
class | Vector< T, flags, Helper >
class | VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
struct | VectorFlagHelper< flag >
struct | VectorInnerImpl< VectorOptions, Wrapper >
struct | VectorInterfaceHelper< T, isBindable >
struct | VectorInterfaceHelper< T, true >
struct | VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
struct | VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef >
struct | VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
struct | VectorOptionsFromFlag< T, flag, Helper >

Defines

#define | Implement_IIterator(Options)
#define | Implement_IObservable(Options)
#define | Implement_IVector_Modify_Functions(Options)
#define | Implement_IVector_Read_Functions(Options)
#define | Implement_Vector(Options)
#define | Implement_Vector_External(Options)
#define | Implement_Vector_Read(Options)
#define | Implement_Vector_Read_NoObservable(Options)

Enumerations

enum VectorFlag {
None = 0, Observable = 1, DependencyObjectBase = 2, Bindable = 4,
NoTrackerRef = 8
}

Functions

template<VectorFlag... all>
constexpr int | MakeVectorParam ()
template<>
constexpr int | MakeVectorParam ()
template<VectorFlag first, VectorFlag... others>
constexpr int | MakeVectorParamImpl ()

Define Documentation

#define Implement_IIterator ( Options )
Value:
public: \
        typename Options##::IteratorType First() \
        { \
            return winrt::make<VectorIterator<typename Options##::T_type, Options##::Bindable, Options::DependencyObjectBase>>(*this); \
        } \
    private:

Definition at line 603 of file Vector.h.

#define Implement_IObservable ( Options )
Value:
public: \
        winrt::event_token VectorChanged(typename Options##::EventHandler const& value) \
        { \
            auto inner = this->GetVectorInnerImpl(); \
            return inner->AddEventHandler(value); \
        } \
        void VectorChanged(typename Options##::EventToken const& token) \
        { \
            auto inner = this->GetVectorInnerImpl(); \
            inner->RemoveEventHandler(token); \
        } \
    private:

Definition at line 512 of file Vector.h.

#define Implement_IVector_Modify_Functions ( Options )

Definition at line 563 of file Vector.h.

#define Implement_IVector_Read_Functions ( Options )

Definition at line 527 of file Vector.h.

#define Implement_Vector ( Options )
Value:
Implement_IVector_Read_Functions(##Options##) \
    Implement_IVector_Modify_Functions(##Options##) \
    Implement_IIterator(##Options##) \
    Implement_IObservable(##Options##) \
    Implement_Vector_External(##Options##)

Definition at line 626 of file Vector.h.

#define Implement_Vector_External ( Options )
Value:
private: \
        using VectorInnerType = ObservableVectorInnerImpl<##Options##>; \
    protected: \
        typename VectorInnerType *GetVectorInnerImpl() { return &m_vectorInnerImpl; } \
        ITrackerHandleManager* GetExternalTrackerHandleManager() { return this; }; \
        winrt::IInspectable GetVectorEventSender() { return *this; }; \
        typename Options##::EventSource *GetVectorEventSource() { return &m_vectorEventSource; }; \
    private: \
        typename VectorInnerType m_vectorInnerImpl{ this }; \
        typename Options##::EventSource m_vectorEventSource{ this }; \
    private:

Definition at line 612 of file Vector.h.

#define Implement_Vector_Read ( Options )
Value:
Implement_IVector_Read_Functions(##Options##) \
    Implement_IIterator(##Options##) \
    Implement_IObservable(##Options##) \
    Implement_Vector_External(##Options##)

Definition at line 635 of file Vector.h.

#define Implement_Vector_Read_NoObservable ( Options )
Value:
Implement_IVector_Read_Functions(##Options##) \
    Implement_IIterator(##Options##) \
    Implement_Vector_External(##Options##)

Definition at line 643 of file Vector.h.

Enumeration Type Documentation

enum VectorFlag
Enumerator:
None
Observable
DependencyObjectBase
Bindable
NoTrackerRef

Definition at line 14 of file Vector.h.

                      {
    None = 0, // not Observable, not Bindable and not DependencyObjectBase
    Observable = 1,
    DependencyObjectBase = 2,
    Bindable = 4,
    NoTrackerRef = 8
};

Function Documentation

constexpr int MakeVectorParam ( )

Definition at line 32 of file Vector.h.

{
    return MakeVectorParamImpl<all...>();
};

constexpr int MakeVectorParam ( )

Definition at line 38 of file Vector.h.

{
    return 0;
};

constexpr int MakeVectorParamImpl ( )

Definition at line 26 of file Vector.h.

{
    return static_cast<int>(first) | MakeVectorParam<others...>();
};

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/VectorChangedEventArgs.h File Reference

  • File List
  • File Members
  • Collections
Classes

VectorChangedEventArgs.h File Reference

Go to the source code of this file.

Classes

class VectorChangedEventArgs
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/VectorIterator.h File Reference

  • File List
  • File Members
  • Collections
Classes

VectorIterator.h File Reference

#include "VectorChangedEventArgs.h"

Go to the source code of this file.

Classes

struct | ComposableBasePointersImplTTypeForIterator< isDependencyObjectBase >
struct | ComposableBasePointersImplTTypeForIterator< false >
class | VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
struct | VectorIteratorTraits< T, isBindable, isDependencyObjectBase >
struct | VectorIteratorTraits< T, true, isDependencyObjectBase >
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • ColorPicker

ColorChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorChangedEventArgs.h File Reference

  • File List
  • File Members
  • ColorPicker
Classes

ColorChangedEventArgs.h File Reference

#include "ColorChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class ColorChangedEventArgs
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorHelpers.cpp File Reference

  • File List
  • File Members
  • ColorPicker
Functions | Variables

ColorHelpers.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorHelpers.h"
#include "SharedHelpers.h"

Go to the source code of this file.

Functions

void | CancelAsyncAction (winrt::IAsyncAction const &action)
winrt::WriteableBitmap | CreateBitmapFromPixelData (int pixelWidth, int pixelHeight, std::shared_ptr< std::vector< byte >> const &bgraPixelData)
void | CreateCheckeredBackgroundAsync (int width, int height, winrt::Color checkerColor, std::shared_ptr< std::vector< byte >> const &bgraCheckeredPixelData, winrt::IAsyncAction &asyncActionToAssign, winrt::DispatcherQueue &dispatcherQueue, std::function< void(winrt::WriteableBitmap)> completedFunction)
winrt::LoadedImageSurface | CreateSurfaceFromPixelData (int pixelWidth, int pixelHeight, std::shared_ptr< std::vector< byte >> const &bgraPixelData)
Hsv | FindNextNamedColor (const Hsv &originalHsv, winrt::ColorPickerHsvChannel channel, IncrementDirection direction, bool shouldWrap, double minBound, double maxBound)
double | IncrementAlphaChannel (double originalAlpha, IncrementDirection direction, IncrementAmount amount, bool shouldWrap, double minBound, double maxBound)
Hsv | IncrementColorChannel (const Hsv &originalHsv, winrt::ColorPickerHsvChannel channel, IncrementDirection direction, IncrementAmount amount, bool shouldWrap, double minBound, double maxBound)
template<typename T >
int | sgn (T val)

Variables

const int | CheckerSize = 4

Function Documentation

void CancelAsyncAction ( winrt::IAsyncAction const & action )

Definition at line 577 of file ColorHelpers.cpp.

{
    if (action && action.Status() == winrt::AsyncStatus::Started)
    {
        action.Cancel();
    }
}

winrt::WriteableBitmap CreateBitmapFromPixelData | ( | int | pixelWidth,
 |  | int | pixelHeight,
 |  | std::shared_ptr< std::vector< byte >> const & | bgraPixelData
 | ) |  |

Definition at line 434 of file ColorHelpers.cpp.

{
    // IBufferByteAccess isn't included in any WinMD file, because its sole method - Buffer() -
    // allows direct pointer access, which isn't applicable to C#.  In C#, there's a separate ToStream()
    // method that similarly allows read access.  As a result, we have no C++/WinMD projection for IBufferByteAccess;
    // we need to flip to ABI in this circumstance to do what this method requires.
    winrt::WriteableBitmap bitmap(pixelWidth, pixelHeight);

    byte *pixelBuffer = nullptr;
    winrt::check_hresult(bitmap.PixelBuffer().as<::Windows::Storage::Streams::IBufferByteAccess>()->Buffer(&pixelBuffer));

    std::memcpy(pixelBuffer, (*bgraPixelData).data(), (*bgraPixelData).size());
    bitmap.Invalidate();

    return bitmap;
}

void CreateCheckeredBackgroundAsync | ( | int | width,
 |  | int | height,
 |  | winrt::Color | checkerColor,
 |  | std::shared_ptr< std::vector< byte >> const & | bgraCheckeredPixelData,
 |  | winrt::IAsyncAction & | asyncActionToAssign,
 |  | winrt::DispatcherQueue & | dispatcherQueue,
 |  | std::function< void(winrt::WriteableBitmap)> | completedFunction
 | ) |  |

Definition at line 355 of file ColorHelpers.cpp.

{
    if (width == 0 || height == 0)
    {
        return;
    }

    bgraCheckeredPixelData->reserve(static_cast<size_t>(width) * height * 4);

    winrt::WorkItemHandler workItemHandler(
        [width, height, checkerColor, bgraCheckeredPixelData]
    (winrt::IAsyncAction workItem)
    {
        for (int y = 0; y < height; y++)
        {
            for (int x = 0; x < width; x++)
            {
                if (workItem.Status() == winrt::AsyncStatus::Canceled)
                {
                    break;
                }

                // We want the checkered pattern to alternate both vertically and horizontally.
                // In order to achieve that, we'll toggle visibility of the current pixel on or off
                // depending on both its x- and its y-position.  If x == CheckerSize, we'll turn visibility off,
                // but then if y == CheckerSize, we'll turn it back on.
                // The below is a shorthand for the above intent.
                const bool pixelShouldBeBlank = (x / CheckerSize + y / CheckerSize) % 2 == 0 ? 255 : 0;

                if (pixelShouldBeBlank)
                {
                    bgraCheckeredPixelData->push_back(0);
                    bgraCheckeredPixelData->push_back(0);
                    bgraCheckeredPixelData->push_back(0);
                    bgraCheckeredPixelData->push_back(0);
                }
                else
                {
                    bgraCheckeredPixelData->push_back(checkerColor.B * checkerColor.A / 255);
                    bgraCheckeredPixelData->push_back(checkerColor.G * checkerColor.A / 255);
                    bgraCheckeredPixelData->push_back(checkerColor.R * checkerColor.A / 255);
                    bgraCheckeredPixelData->push_back(checkerColor.A);
                }
            }
        }
    });

    if (asyncActionToAssign)
    {
        asyncActionToAssign.Cancel();
    }

    asyncActionToAssign = winrt::ThreadPool::RunAsync(workItemHandler);
    asyncActionToAssign.Completed(winrt::AsyncActionCompletedHandler(
        [width, height, bgraCheckeredPixelData, &asyncActionToAssign, completedFunction, dispatcherQueue]
    (winrt::IAsyncAction asyncInfo, winrt::AsyncStatus asyncStatus)
    {
        if (asyncStatus != winrt::AsyncStatus::Completed)
        {
            return;
        }

        asyncActionToAssign = nullptr;

        dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler([completedFunction, width, height, bgraCheckeredPixelData]()
        {
            winrt::WriteableBitmap checkeredBackgroundBitmap = CreateBitmapFromPixelData(width, height, bgraCheckeredPixelData);
            completedFunction(checkeredBackgroundBitmap);
        }));
    }));
}

winrt::LoadedImageSurface CreateSurfaceFromPixelData | ( | int | pixelWidth,
 |  | int | pixelHeight,
 |  | std::shared_ptr< std::vector< byte >> const & | bgraPixelData
 | ) |  |

Definition at line 454 of file ColorHelpers.cpp.

{
    // LoadedImageSurface uses WIC to load images, so we need to put the pixel data into an image format.
    // We'll use the BMP format, since it stores uncompressed pixel data.
    std::vector<byte> bmpData;

    // Size is header (14 bytes) + DIB header (40 bytes) + Pixel array (size of bgraPixelData).
    const size_t dibHeaderSize = 40;
    const size_t headerSize = 14 + dibHeaderSize;
    const size_t fileSize = headerSize + (*bgraPixelData).size();

    // Header field to identify as BMP.
    bmpData.push_back('B');
    bmpData.push_back('M');

    // File size.  Note that the BMP format is always little-endian.
    bmpData.push_back(static_cast<byte>(fileSize & 0x000000FF));
    bmpData.push_back(static_cast<byte>((fileSize & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((fileSize & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((fileSize & 0xFF000000) >> 24));

    // Reserved for application-specific usage.  We don't care about these bytes.
    bmpData.push_back(0);
    bmpData.push_back(0);
    bmpData.push_back(0);
    bmpData.push_back(0);

    // Offset of the pixel data from the start.  Since our header is 14 + 12 bytes long, it starts after that.
    const auto pixelDataOffset = static_cast<uint32_t>(headerSize);
    bmpData.push_back(static_cast<byte>(pixelDataOffset & 0x000000FF));
    bmpData.push_back(static_cast<byte>((pixelDataOffset & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((pixelDataOffset & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((pixelDataOffset & 0xFF000000) >> 24));

    // Beginning of DIB header.  First 4 bytes are the size of the header (12 bytes in our case).
    bmpData.push_back(static_cast<byte>(dibHeaderSize & 0x000000FF));
    bmpData.push_back(static_cast<byte>((dibHeaderSize & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((dibHeaderSize & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((dibHeaderSize & 0xFF000000) >> 24));

    // Bitmap width in pixels (32-bit).
    const auto bitmapWidth = static_cast<uint32_t>(pixelWidth);
    bmpData.push_back(static_cast<byte>(bitmapWidth & 0x000000FF));
    bmpData.push_back(static_cast<byte>((bitmapWidth & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((bitmapWidth & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((bitmapWidth & 0xFF000000) >> 24));

    // Bitmap height in pixels (32-bit).
    const auto bitmapHeight = static_cast<uint32_t>(pixelHeight);
    bmpData.push_back(static_cast<byte>(bitmapHeight & 0x000000FF));
    bmpData.push_back(static_cast<byte>((bitmapHeight & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((bitmapHeight & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((bitmapHeight & 0xFF000000) >> 24));

    // Color plane count.
    const uint16_t colorPlaneCount = 1;
    bmpData.push_back(static_cast<byte>(colorPlaneCount & 0x00FF));
    bmpData.push_back(static_cast<byte>((colorPlaneCount & 0xFF00) >> 8));

    // Bits per pixel.
    const uint16_t bitsPerPixel = 32;
    bmpData.push_back(static_cast<byte>(bitsPerPixel & 0x00FF));
    bmpData.push_back(static_cast<byte>((bitsPerPixel & 0xFF00) >> 8));

    // Compression method.  0 means uncompressed.
    const uint32_t compressionMethod = 0;
    bmpData.push_back(static_cast<byte>(compressionMethod & 0x000000FF));
    bmpData.push_back(static_cast<byte>((compressionMethod & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((compressionMethod & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((compressionMethod & 0xFF000000) >> 24));

    // Image size.  Not needed for uncompressed images.
    const uint32_t imageSize = 0;
    bmpData.push_back(static_cast<byte>(imageSize & 0x000000FF));
    bmpData.push_back(static_cast<byte>((imageSize & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((imageSize & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((imageSize & 0xFF000000) >> 24));

    // Horizontal resolution.  We don't care about this value.
    const uint32_t horizontalResolution = 1;
    bmpData.push_back(static_cast<byte>(horizontalResolution & 0x000000FF));
    bmpData.push_back(static_cast<byte>((horizontalResolution & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((horizontalResolution & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((horizontalResolution & 0xFF000000) >> 24));

    // Vertical resolution.  We don't care about this value.
    const uint32_t verticalResolution = 1;
    bmpData.push_back(static_cast<byte>(verticalResolution & 0x000000FF));
    bmpData.push_back(static_cast<byte>((verticalResolution & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((verticalResolution & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((verticalResolution & 0xFF000000) >> 24));

    // Number of colors in the palette.  0 means use the default.
    const uint32_t colorsInPalette = 0;
    bmpData.push_back(static_cast<byte>(colorsInPalette & 0x000000FF));
    bmpData.push_back(static_cast<byte>((colorsInPalette & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((colorsInPalette & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((colorsInPalette & 0xFF000000) >> 24));

    // Important colors.  0 means all colors are important.
    const uint32_t importantColors = 0;
    bmpData.push_back(static_cast<byte>(importantColors & 0x000000FF));
    bmpData.push_back(static_cast<byte>((importantColors & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((importantColors & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((importantColors & 0xFF000000) >> 24));

    // Pixel data.  BMP images are stored upside-down, so we need to copy the image data backwards.
    bmpData.resize(fileSize);
    uint32_t stride = pixelWidth * 4;

    for (int y = pixelHeight - 1; y >= 0; y--)
    {
        memcpy(bmpData.data() + (headerSize + (static_cast<size_t>(pixelHeight) - 1 - y) * stride), (*bgraPixelData).data() + (static_cast<size_t>(y) * stride), stride);
    }

    winrt::InMemoryRandomAccessStream stream = SharedHelpers::CreateStreamFromBytes(winrt::array_view<const byte>(bmpData));

    return winrt::LoadedImageSurface::StartLoadFromStream(stream);
}

Hsv FindNextNamedColor | ( | const Hsv & | originalHsv,
 |  | winrt::ColorPickerHsvChannel | channel,
 |  | IncrementDirection | direction,
 |  | bool | shouldWrap,
 |  | double | minBound,
 |  | double | maxBound
 | ) |  |

Definition at line 106 of file ColorHelpers.cpp.

{
    // There's no easy way to directly get the next named color, so what we'll do
    // is just iterate in the direction that we want to find it until we find a color
    // in that direction that has a color name different than our current color name.
    // Once we find a new color name, then we'll iterate across that color name until
    // we find its bounds on the other side, and then select the color that is exactly
    // in the middle of that color's bounds.
    Hsv newHsv = originalHsv;

    winrt::hstring originalColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(originalHsv)));
    winrt::hstring newColorName = originalColorName;

    double originalValue = 0;
    double *newValue = nullptr;
    double incrementAmount = 0;

    switch (channel)
    {
    case winrt::ColorPickerHsvChannel::Hue:
        originalValue = originalHsv.h;
        newValue = &(newHsv.h);
        incrementAmount = 1;
        break;

    case winrt::ColorPickerHsvChannel::Saturation:
        originalValue = originalHsv.s;
        newValue = &(newHsv.s);
        incrementAmount = 0.01;
        break;

    case winrt::ColorPickerHsvChannel::Value:
        originalValue = originalHsv.v;
        newValue = &(newHsv.v);
        incrementAmount = 0.01;
        break;

    default:
        throw winrt::hresult_error(E_FAIL);
    }

    bool shouldFindMidPoint = true;

    while (newColorName == originalColorName)
    {
        const double previousValue = *newValue;
        *newValue += (direction == IncrementDirection::Lower ? -1 : 1) * incrementAmount;

        bool justWrapped = false;

        // If we've hit a boundary, then either we should wrap or we shouldn't.
        // If we should, then we'll perform that wrapping if we were previously up against
        // the boundary that we've now hit.  Otherwise, we'll stop at that boundary.
        if (*newValue > maxBound)
        {
            if (shouldWrap)
            {
                *newValue = minBound;
                justWrapped = true;
            }
            else
            {
                *newValue = maxBound;
                shouldFindMidPoint = false;
                newColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(newHsv)));
                break;
            }
        }
        else if (*newValue < minBound)
        {
            if (shouldWrap)
            {
                *newValue = maxBound;
                justWrapped = true;
            }
            else
            {
                *newValue = minBound;
                shouldFindMidPoint = false;
                newColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(newHsv)));
                break;
            }
        }

        if (!justWrapped &&
            previousValue != originalValue &&
            sgn(*newValue - originalValue) != sgn(previousValue - originalValue))
        {
            // If we've wrapped all the way back to the start and have failed to find a new color name,
            // then we'll just quit - there isn't a new color name that we're going to find.
            shouldFindMidPoint = false;
            break;
        }

        newColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(newHsv)));
    }

    if (shouldFindMidPoint)
    {
        Hsv startHsv = newHsv;
        Hsv currentHsv = startHsv;
        double startEndOffset = 0;
        winrt::hstring currentColorName = newColorName;

        double *startValue = nullptr;
        double *currentValue = nullptr;
        double wrapIncrement = 0;

        switch (channel)
        {
        case winrt::ColorPickerHsvChannel::Hue:
            startValue = &(startHsv.h);
            currentValue = &(currentHsv.h);
            wrapIncrement = 360.0;
            break;

        case winrt::ColorPickerHsvChannel::Saturation:
            startValue = &(startHsv.s);
            currentValue = &(currentHsv.s);
            wrapIncrement = 1.0;
            break;

        case winrt::ColorPickerHsvChannel::Value:
            startValue = &(startHsv.v);
            currentValue = &(currentHsv.v);
            wrapIncrement = 1.0;
            break;

        default:
            throw winrt::hresult_error(E_FAIL);
        }

        while (newColorName == currentColorName)
        {
            *currentValue += (direction == IncrementDirection::Lower ? -1 : 1) * incrementAmount;

            // If we've hit a boundary, then either we should wrap or we shouldn't.
            // If we should, then we'll perform that wrapping if we were previously up against
            // the boundary that we've now hit.  Otherwise, we'll stop at that boundary.
            if (*currentValue > maxBound)
            {
                if (shouldWrap)
                {
                    *currentValue = minBound;
                    startEndOffset = maxBound - minBound;
                }
                else
                {
                    *currentValue = maxBound;
                    break;
                }
            }
            else if (*currentValue < minBound)
            {
                if (shouldWrap)
                {
                    *currentValue = maxBound;
                    startEndOffset = minBound - maxBound;
                }
                else
                {
                    *currentValue = minBound;
                    break;
                }
            }

            currentColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(currentHsv)));
        }

        *newValue = (*startValue + *currentValue + startEndOffset) / 2;

        // Dividing by 2 may have gotten us halfway through a single step, so we'll
        // remove that half-step if it exists.
        double leftoverValue = abs(*newValue);

        while (leftoverValue > incrementAmount)
        {
            leftoverValue -= incrementAmount;
        }

        *newValue -= leftoverValue;

        while (*newValue < minBound)
        {
            *newValue += wrapIncrement;
        }

        while (*newValue > maxBound)
        {
            *newValue -= wrapIncrement;
        }
    }

    return newHsv;
}

double IncrementAlphaChannel | ( | double | originalAlpha,
 |  | IncrementDirection | direction,
 |  | IncrementAmount | amount,
 |  | bool | shouldWrap,
 |  | double | minBound,
 |  | double | maxBound
 | ) |  |

Definition at line 308 of file ColorHelpers.cpp.

{
    // In order to avoid working with small values that can incur rounding issues,
    // we'll multiple alpha by 100 to put it in the range of 0-100 instead of 0-1.
    originalAlpha *= 100;

    const double smallIncrementAmount = 1;
    const double largeIncrementAmount = 10;

    if (amount == IncrementAmount::Small)
    {
        originalAlpha += (direction == IncrementDirection::Lower ? -1 : 1) * smallIncrementAmount;
    }
    else
    {
        if (direction == IncrementDirection::Lower)
        {
            originalAlpha = ceil((originalAlpha - largeIncrementAmount) / largeIncrementAmount) * largeIncrementAmount;
        }
        else
        {
            originalAlpha = floor((originalAlpha + largeIncrementAmount) / largeIncrementAmount) * largeIncrementAmount;
        }
    }

    // If the value has reached outside the bounds and we should wrap, then we'll place the selection
    // on the other side of the spectrum.  Otherwise, we'll place it on the boundary that was exceeded.
    if (originalAlpha < minBound)
    {
        originalAlpha = shouldWrap ? maxBound : minBound;
    }

    if (originalAlpha > maxBound)
    {
        originalAlpha = shouldWrap ? minBound : maxBound;
    }

    // We multiplied alpha by 100 previously, so now we want to put it back in the 0-1 range.
    return originalAlpha / 100;
}

Hsv IncrementColorChannel | ( | const Hsv & | originalHsv,
 |  | winrt::ColorPickerHsvChannel | channel,
 |  | IncrementDirection | direction,
 |  | IncrementAmount | amount,
 |  | bool | shouldWrap,
 |  | double | minBound,
 |  | double | maxBound
 | ) |  |

Definition at line 11 of file ColorHelpers.cpp.

{
    Hsv newHsv = originalHsv;

    if (amount == IncrementAmount::Small)
    {
        // In order to avoid working with small values that can incur rounding issues,
        // we'll multiple saturation and value by 100 to put them in the range of 0-100 instead of 0-1.
        newHsv.s *= 100;
        newHsv.v *= 100;

        double *valueToIncrement = nullptr;
        double incrementAmount = 0;

        // If we're adding a small increment, then we'll just add or subtract 1.
        // If we're adding a large increment, then we want to snap to the next
        // or previous major value - for hue, this is every increment of 30;
        // for saturation and value, this is every increment of 10.
        switch (channel)
        {
        case winrt::ColorPickerHsvChannel::Hue:
            valueToIncrement = &(newHsv.h);
            incrementAmount = amount == IncrementAmount::Small ? 1 : 30;
            break;

        case winrt::ColorPickerHsvChannel::Saturation:
            valueToIncrement = &(newHsv.s);
            incrementAmount = amount == IncrementAmount::Small ? 1 : 10;
            break;

        case winrt::ColorPickerHsvChannel::Value:
            valueToIncrement = &(newHsv.v);
            incrementAmount = amount == IncrementAmount::Small ? 1 : 10;
            break;

        default:
            throw winrt::hresult_error(E_FAIL);
        }

        const double previousValue = *valueToIncrement;

        *valueToIncrement += (direction == IncrementDirection::Lower ? -incrementAmount : incrementAmount);

        // If the value has reached outside the bounds, we were previous at the boundary, and we should wrap,
        // then we'll place the selection on the other side of the spectrum.
        // Otherwise, we'll place it on the boundary that was exceeded.
        if (*valueToIncrement < minBound)
        {
            *valueToIncrement = (shouldWrap && previousValue == minBound) ? maxBound : minBound;
        }

        if (*valueToIncrement > maxBound)
        {
            *valueToIncrement = (shouldWrap && previousValue == maxBound) ? minBound : maxBound;
        }

        // We multiplied saturation and value by 100 previously, so now we want to put them back in the 0-1 range.
        newHsv.s /= 100;
        newHsv.v /= 100;
    }
    else
    {
        // While working with named colors, we're going to need to be working in actual HSV units,
        // so we'll divide the min bound and max bound by 100 in the case of saturation or value,
        // since we'll have received units between 0-100 and we need them within 0-1.
        if (channel == winrt::ColorPickerHsvChannel::Saturation ||
            channel == winrt::ColorPickerHsvChannel::Value)
        {
            minBound /= 100;
            maxBound /= 100;
        }

        newHsv = FindNextNamedColor(originalHsv, channel, direction, shouldWrap, minBound, maxBound);
    }

    return newHsv;
}

int sgn ( T val )

Definition at line 98 of file ColorHelpers.cpp.

{
    const int first = (static_cast<T>(0) < val) ? 1 : 0;
    const int second = (static_cast<T>(0) > val) ? 1 : 0;

    return first - second;
}

Variable Documentation

const int CheckerSize = 4

Definition at line 9 of file ColorHelpers.cpp.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorHelpers.h File Reference

  • File List
  • File Members
  • ColorPicker
Enumerations | Functions

ColorHelpers.h File Reference

#include "CppWinRTHelpers.h"
#include "ColorConversion.h"

Go to the source code of this file.

Enumerations

enum | IncrementAmount { Small, Large }
enum | IncrementDirection { Lower, Higher }

Functions

void | CancelAsyncAction (winrt::IAsyncAction const &action)
winrt::WriteableBitmap | CreateBitmapFromPixelData (int pixelWidth, int pixelHeight, std::shared_ptr< std::vector< byte >> const &bgraPixelData)
void | CreateCheckeredBackgroundAsync (int width, int height, winrt::Color checkerColor, std::shared_ptr< std::vector< byte >> const &bgraCheckeredPixelData, winrt::IAsyncAction &asyncActionToAssign, winrt::DispatcherQueue &dispatcherQueue, std::function< void(winrt::WriteableBitmap)> completedFunction)
winrt::LoadedImageSurface | CreateSurfaceFromPixelData (int pixelWidth, int pixelHeight, std::shared_ptr< std::vector< byte >> const &bgraPixelData)
Hsv | FindNextNamedColor (const Hsv &originalHsv, winrt::ColorPickerHsvChannel channel, IncrementDirection direction, bool shouldWrap, double minBound, double maxBound)
double | IncrementAlphaChannel (double originalAlpha, IncrementDirection direction, IncrementAmount amount, bool shouldWrap, double minBound, double maxBound)
Hsv | IncrementColorChannel (const Hsv &originalHsv, winrt::ColorPickerHsvChannel channel, IncrementDirection direction, IncrementAmount amount, bool shouldWrap, double minBound, double maxBound)
template<typename T >
int | sgn (T val)

Enumeration Type Documentation

enum IncrementAmount
Enumerator:
Small
Large

Definition at line 15 of file ColorHelpers.h.

{
    Small,
    Large,
};

enum IncrementDirection
Enumerator:
Lower
Higher

Definition at line 9 of file ColorHelpers.h.

{
    Lower,
    Higher,
};

Function Documentation

void CancelAsyncAction ( winrt::IAsyncAction const & action )

Definition at line 577 of file ColorHelpers.cpp.

{
    if (action && action.Status() == winrt::AsyncStatus::Started)
    {
        action.Cancel();
    }
}

winrt::WriteableBitmap CreateBitmapFromPixelData | ( | int | pixelWidth,
 |  | int | pixelHeight,
 |  | std::shared_ptr< std::vector< byte >> const & | bgraPixelData
 | ) |  |

Definition at line 434 of file ColorHelpers.cpp.

{
    // IBufferByteAccess isn't included in any WinMD file, because its sole method - Buffer() -
    // allows direct pointer access, which isn't applicable to C#.  In C#, there's a separate ToStream()
    // method that similarly allows read access.  As a result, we have no C++/WinMD projection for IBufferByteAccess;
    // we need to flip to ABI in this circumstance to do what this method requires.
    winrt::WriteableBitmap bitmap(pixelWidth, pixelHeight);

    byte *pixelBuffer = nullptr;
    winrt::check_hresult(bitmap.PixelBuffer().as<::Windows::Storage::Streams::IBufferByteAccess>()->Buffer(&pixelBuffer));

    std::memcpy(pixelBuffer, (*bgraPixelData).data(), (*bgraPixelData).size());
    bitmap.Invalidate();

    return bitmap;
}

void CreateCheckeredBackgroundAsync | ( | int | width,
 |  | int | height,
 |  | winrt::Color | checkerColor,
 |  | std::shared_ptr< std::vector< byte >> const & | bgraCheckeredPixelData,
 |  | winrt::IAsyncAction & | asyncActionToAssign,
 |  | winrt::DispatcherQueue & | dispatcherQueue,
 |  | std::function< void(winrt::WriteableBitmap)> | completedFunction
 | ) |  |

Definition at line 355 of file ColorHelpers.cpp.

{
    if (width == 0 || height == 0)
    {
        return;
    }

    bgraCheckeredPixelData->reserve(static_cast<size_t>(width) * height * 4);

    winrt::WorkItemHandler workItemHandler(
        [width, height, checkerColor, bgraCheckeredPixelData]
    (winrt::IAsyncAction workItem)
    {
        for (int y = 0; y < height; y++)
        {
            for (int x = 0; x < width; x++)
            {
                if (workItem.Status() == winrt::AsyncStatus::Canceled)
                {
                    break;
                }

                // We want the checkered pattern to alternate both vertically and horizontally.
                // In order to achieve that, we'll toggle visibility of the current pixel on or off
                // depending on both its x- and its y-position.  If x == CheckerSize, we'll turn visibility off,
                // but then if y == CheckerSize, we'll turn it back on.
                // The below is a shorthand for the above intent.
                const bool pixelShouldBeBlank = (x / CheckerSize + y / CheckerSize) % 2 == 0 ? 255 : 0;

                if (pixelShouldBeBlank)
                {
                    bgraCheckeredPixelData->push_back(0);
                    bgraCheckeredPixelData->push_back(0);
                    bgraCheckeredPixelData->push_back(0);
                    bgraCheckeredPixelData->push_back(0);
                }
                else
                {
                    bgraCheckeredPixelData->push_back(checkerColor.B * checkerColor.A / 255);
                    bgraCheckeredPixelData->push_back(checkerColor.G * checkerColor.A / 255);
                    bgraCheckeredPixelData->push_back(checkerColor.R * checkerColor.A / 255);
                    bgraCheckeredPixelData->push_back(checkerColor.A);
                }
            }
        }
    });

    if (asyncActionToAssign)
    {
        asyncActionToAssign.Cancel();
    }

    asyncActionToAssign = winrt::ThreadPool::RunAsync(workItemHandler);
    asyncActionToAssign.Completed(winrt::AsyncActionCompletedHandler(
        [width, height, bgraCheckeredPixelData, &asyncActionToAssign, completedFunction, dispatcherQueue]
    (winrt::IAsyncAction asyncInfo, winrt::AsyncStatus asyncStatus)
    {
        if (asyncStatus != winrt::AsyncStatus::Completed)
        {
            return;
        }

        asyncActionToAssign = nullptr;

        dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler([completedFunction, width, height, bgraCheckeredPixelData]()
        {
            winrt::WriteableBitmap checkeredBackgroundBitmap = CreateBitmapFromPixelData(width, height, bgraCheckeredPixelData);
            completedFunction(checkeredBackgroundBitmap);
        }));
    }));
}

winrt::LoadedImageSurface CreateSurfaceFromPixelData | ( | int | pixelWidth,
 |  | int | pixelHeight,
 |  | std::shared_ptr< std::vector< byte >> const & | bgraPixelData
 | ) |  |

Definition at line 454 of file ColorHelpers.cpp.

{
    // LoadedImageSurface uses WIC to load images, so we need to put the pixel data into an image format.
    // We'll use the BMP format, since it stores uncompressed pixel data.
    std::vector<byte> bmpData;

    // Size is header (14 bytes) + DIB header (40 bytes) + Pixel array (size of bgraPixelData).
    const size_t dibHeaderSize = 40;
    const size_t headerSize = 14 + dibHeaderSize;
    const size_t fileSize = headerSize + (*bgraPixelData).size();

    // Header field to identify as BMP.
    bmpData.push_back('B');
    bmpData.push_back('M');

    // File size.  Note that the BMP format is always little-endian.
    bmpData.push_back(static_cast<byte>(fileSize & 0x000000FF));
    bmpData.push_back(static_cast<byte>((fileSize & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((fileSize & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((fileSize & 0xFF000000) >> 24));

    // Reserved for application-specific usage.  We don't care about these bytes.
    bmpData.push_back(0);
    bmpData.push_back(0);
    bmpData.push_back(0);
    bmpData.push_back(0);

    // Offset of the pixel data from the start.  Since our header is 14 + 12 bytes long, it starts after that.
    const auto pixelDataOffset = static_cast<uint32_t>(headerSize);
    bmpData.push_back(static_cast<byte>(pixelDataOffset & 0x000000FF));
    bmpData.push_back(static_cast<byte>((pixelDataOffset & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((pixelDataOffset & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((pixelDataOffset & 0xFF000000) >> 24));

    // Beginning of DIB header.  First 4 bytes are the size of the header (12 bytes in our case).
    bmpData.push_back(static_cast<byte>(dibHeaderSize & 0x000000FF));
    bmpData.push_back(static_cast<byte>((dibHeaderSize & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((dibHeaderSize & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((dibHeaderSize & 0xFF000000) >> 24));

    // Bitmap width in pixels (32-bit).
    const auto bitmapWidth = static_cast<uint32_t>(pixelWidth);
    bmpData.push_back(static_cast<byte>(bitmapWidth & 0x000000FF));
    bmpData.push_back(static_cast<byte>((bitmapWidth & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((bitmapWidth & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((bitmapWidth & 0xFF000000) >> 24));

    // Bitmap height in pixels (32-bit).
    const auto bitmapHeight = static_cast<uint32_t>(pixelHeight);
    bmpData.push_back(static_cast<byte>(bitmapHeight & 0x000000FF));
    bmpData.push_back(static_cast<byte>((bitmapHeight & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((bitmapHeight & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((bitmapHeight & 0xFF000000) >> 24));

    // Color plane count.
    const uint16_t colorPlaneCount = 1;
    bmpData.push_back(static_cast<byte>(colorPlaneCount & 0x00FF));
    bmpData.push_back(static_cast<byte>((colorPlaneCount & 0xFF00) >> 8));

    // Bits per pixel.
    const uint16_t bitsPerPixel = 32;
    bmpData.push_back(static_cast<byte>(bitsPerPixel & 0x00FF));
    bmpData.push_back(static_cast<byte>((bitsPerPixel & 0xFF00) >> 8));

    // Compression method.  0 means uncompressed.
    const uint32_t compressionMethod = 0;
    bmpData.push_back(static_cast<byte>(compressionMethod & 0x000000FF));
    bmpData.push_back(static_cast<byte>((compressionMethod & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((compressionMethod & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((compressionMethod & 0xFF000000) >> 24));

    // Image size.  Not needed for uncompressed images.
    const uint32_t imageSize = 0;
    bmpData.push_back(static_cast<byte>(imageSize & 0x000000FF));
    bmpData.push_back(static_cast<byte>((imageSize & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((imageSize & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((imageSize & 0xFF000000) >> 24));

    // Horizontal resolution.  We don't care about this value.
    const uint32_t horizontalResolution = 1;
    bmpData.push_back(static_cast<byte>(horizontalResolution & 0x000000FF));
    bmpData.push_back(static_cast<byte>((horizontalResolution & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((horizontalResolution & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((horizontalResolution & 0xFF000000) >> 24));

    // Vertical resolution.  We don't care about this value.
    const uint32_t verticalResolution = 1;
    bmpData.push_back(static_cast<byte>(verticalResolution & 0x000000FF));
    bmpData.push_back(static_cast<byte>((verticalResolution & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((verticalResolution & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((verticalResolution & 0xFF000000) >> 24));

    // Number of colors in the palette.  0 means use the default.
    const uint32_t colorsInPalette = 0;
    bmpData.push_back(static_cast<byte>(colorsInPalette & 0x000000FF));
    bmpData.push_back(static_cast<byte>((colorsInPalette & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((colorsInPalette & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((colorsInPalette & 0xFF000000) >> 24));

    // Important colors.  0 means all colors are important.
    const uint32_t importantColors = 0;
    bmpData.push_back(static_cast<byte>(importantColors & 0x000000FF));
    bmpData.push_back(static_cast<byte>((importantColors & 0x0000FF00) >> 8));
    bmpData.push_back(static_cast<byte>((importantColors & 0x00FF0000) >> 16));
    bmpData.push_back(static_cast<byte>((importantColors & 0xFF000000) >> 24));

    // Pixel data.  BMP images are stored upside-down, so we need to copy the image data backwards.
    bmpData.resize(fileSize);
    uint32_t stride = pixelWidth * 4;

    for (int y = pixelHeight - 1; y >= 0; y--)
    {
        memcpy(bmpData.data() + (headerSize + (static_cast<size_t>(pixelHeight) - 1 - y) * stride), (*bgraPixelData).data() + (static_cast<size_t>(y) * stride), stride);
    }

    winrt::InMemoryRandomAccessStream stream = SharedHelpers::CreateStreamFromBytes(winrt::array_view<const byte>(bmpData));

    return winrt::LoadedImageSurface::StartLoadFromStream(stream);
}

Hsv FindNextNamedColor | ( | const Hsv & | originalHsv,
 |  | winrt::ColorPickerHsvChannel | channel,
 |  | IncrementDirection | direction,
 |  | bool | shouldWrap,
 |  | double | minBound,
 |  | double | maxBound
 | ) |  |

Definition at line 106 of file ColorHelpers.cpp.

{
    // There's no easy way to directly get the next named color, so what we'll do
    // is just iterate in the direction that we want to find it until we find a color
    // in that direction that has a color name different than our current color name.
    // Once we find a new color name, then we'll iterate across that color name until
    // we find its bounds on the other side, and then select the color that is exactly
    // in the middle of that color's bounds.
    Hsv newHsv = originalHsv;

    winrt::hstring originalColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(originalHsv)));
    winrt::hstring newColorName = originalColorName;

    double originalValue = 0;
    double *newValue = nullptr;
    double incrementAmount = 0;

    switch (channel)
    {
    case winrt::ColorPickerHsvChannel::Hue:
        originalValue = originalHsv.h;
        newValue = &(newHsv.h);
        incrementAmount = 1;
        break;

    case winrt::ColorPickerHsvChannel::Saturation:
        originalValue = originalHsv.s;
        newValue = &(newHsv.s);
        incrementAmount = 0.01;
        break;

    case winrt::ColorPickerHsvChannel::Value:
        originalValue = originalHsv.v;
        newValue = &(newHsv.v);
        incrementAmount = 0.01;
        break;

    default:
        throw winrt::hresult_error(E_FAIL);
    }

    bool shouldFindMidPoint = true;

    while (newColorName == originalColorName)
    {
        const double previousValue = *newValue;
        *newValue += (direction == IncrementDirection::Lower ? -1 : 1) * incrementAmount;

        bool justWrapped = false;

        // If we've hit a boundary, then either we should wrap or we shouldn't.
        // If we should, then we'll perform that wrapping if we were previously up against
        // the boundary that we've now hit.  Otherwise, we'll stop at that boundary.
        if (*newValue > maxBound)
        {
            if (shouldWrap)
            {
                *newValue = minBound;
                justWrapped = true;
            }
            else
            {
                *newValue = maxBound;
                shouldFindMidPoint = false;
                newColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(newHsv)));
                break;
            }
        }
        else if (*newValue < minBound)
        {
            if (shouldWrap)
            {
                *newValue = maxBound;
                justWrapped = true;
            }
            else
            {
                *newValue = minBound;
                shouldFindMidPoint = false;
                newColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(newHsv)));
                break;
            }
        }

        if (!justWrapped &&
            previousValue != originalValue &&
            sgn(*newValue - originalValue) != sgn(previousValue - originalValue))
        {
            // If we've wrapped all the way back to the start and have failed to find a new color name,
            // then we'll just quit - there isn't a new color name that we're going to find.
            shouldFindMidPoint = false;
            break;
        }

        newColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(newHsv)));
    }

    if (shouldFindMidPoint)
    {
        Hsv startHsv = newHsv;
        Hsv currentHsv = startHsv;
        double startEndOffset = 0;
        winrt::hstring currentColorName = newColorName;

        double *startValue = nullptr;
        double *currentValue = nullptr;
        double wrapIncrement = 0;

        switch (channel)
        {
        case winrt::ColorPickerHsvChannel::Hue:
            startValue = &(startHsv.h);
            currentValue = &(currentHsv.h);
            wrapIncrement = 360.0;
            break;

        case winrt::ColorPickerHsvChannel::Saturation:
            startValue = &(startHsv.s);
            currentValue = &(currentHsv.s);
            wrapIncrement = 1.0;
            break;

        case winrt::ColorPickerHsvChannel::Value:
            startValue = &(startHsv.v);
            currentValue = &(currentHsv.v);
            wrapIncrement = 1.0;
            break;

        default:
            throw winrt::hresult_error(E_FAIL);
        }

        while (newColorName == currentColorName)
        {
            *currentValue += (direction == IncrementDirection::Lower ? -1 : 1) * incrementAmount;

            // If we've hit a boundary, then either we should wrap or we shouldn't.
            // If we should, then we'll perform that wrapping if we were previously up against
            // the boundary that we've now hit.  Otherwise, we'll stop at that boundary.
            if (*currentValue > maxBound)
            {
                if (shouldWrap)
                {
                    *currentValue = minBound;
                    startEndOffset = maxBound - minBound;
                }
                else
                {
                    *currentValue = maxBound;
                    break;
                }
            }
            else if (*currentValue < minBound)
            {
                if (shouldWrap)
                {
                    *currentValue = maxBound;
                    startEndOffset = minBound - maxBound;
                }
                else
                {
                    *currentValue = minBound;
                    break;
                }
            }

            currentColorName = winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(currentHsv)));
        }

        *newValue = (*startValue + *currentValue + startEndOffset) / 2;

        // Dividing by 2 may have gotten us halfway through a single step, so we'll
        // remove that half-step if it exists.
        double leftoverValue = abs(*newValue);

        while (leftoverValue > incrementAmount)
        {
            leftoverValue -= incrementAmount;
        }

        *newValue -= leftoverValue;

        while (*newValue < minBound)
        {
            *newValue += wrapIncrement;
        }

        while (*newValue > maxBound)
        {
            *newValue -= wrapIncrement;
        }
    }

    return newHsv;
}

double IncrementAlphaChannel | ( | double | originalAlpha,
 |  | IncrementDirection | direction,
 |  | IncrementAmount | amount,
 |  | bool | shouldWrap,
 |  | double | minBound,
 |  | double | maxBound
 | ) |  |

Definition at line 308 of file ColorHelpers.cpp.

{
    // In order to avoid working with small values that can incur rounding issues,
    // we'll multiple alpha by 100 to put it in the range of 0-100 instead of 0-1.
    originalAlpha *= 100;

    const double smallIncrementAmount = 1;
    const double largeIncrementAmount = 10;

    if (amount == IncrementAmount::Small)
    {
        originalAlpha += (direction == IncrementDirection::Lower ? -1 : 1) * smallIncrementAmount;
    }
    else
    {
        if (direction == IncrementDirection::Lower)
        {
            originalAlpha = ceil((originalAlpha - largeIncrementAmount) / largeIncrementAmount) * largeIncrementAmount;
        }
        else
        {
            originalAlpha = floor((originalAlpha + largeIncrementAmount) / largeIncrementAmount) * largeIncrementAmount;
        }
    }

    // If the value has reached outside the bounds and we should wrap, then we'll place the selection
    // on the other side of the spectrum.  Otherwise, we'll place it on the boundary that was exceeded.
    if (originalAlpha < minBound)
    {
        originalAlpha = shouldWrap ? maxBound : minBound;
    }

    if (originalAlpha > maxBound)
    {
        originalAlpha = shouldWrap ? minBound : maxBound;
    }

    // We multiplied alpha by 100 previously, so now we want to put it back in the 0-1 range.
    return originalAlpha / 100;
}

Hsv IncrementColorChannel | ( | const Hsv & | originalHsv,
 |  | winrt::ColorPickerHsvChannel | channel,
 |  | IncrementDirection | direction,
 |  | IncrementAmount | amount,
 |  | bool | shouldWrap,
 |  | double | minBound,
 |  | double | maxBound
 | ) |  |

Definition at line 11 of file ColorHelpers.cpp.

{
    Hsv newHsv = originalHsv;

    if (amount == IncrementAmount::Small)
    {
        // In order to avoid working with small values that can incur rounding issues,
        // we'll multiple saturation and value by 100 to put them in the range of 0-100 instead of 0-1.
        newHsv.s *= 100;
        newHsv.v *= 100;

        double *valueToIncrement = nullptr;
        double incrementAmount = 0;

        // If we're adding a small increment, then we'll just add or subtract 1.
        // If we're adding a large increment, then we want to snap to the next
        // or previous major value - for hue, this is every increment of 30;
        // for saturation and value, this is every increment of 10.
        switch (channel)
        {
        case winrt::ColorPickerHsvChannel::Hue:
            valueToIncrement = &(newHsv.h);
            incrementAmount = amount == IncrementAmount::Small ? 1 : 30;
            break;

        case winrt::ColorPickerHsvChannel::Saturation:
            valueToIncrement = &(newHsv.s);
            incrementAmount = amount == IncrementAmount::Small ? 1 : 10;
            break;

        case winrt::ColorPickerHsvChannel::Value:
            valueToIncrement = &(newHsv.v);
            incrementAmount = amount == IncrementAmount::Small ? 1 : 10;
            break;

        default:
            throw winrt::hresult_error(E_FAIL);
        }

        const double previousValue = *valueToIncrement;

        *valueToIncrement += (direction == IncrementDirection::Lower ? -incrementAmount : incrementAmount);

        // If the value has reached outside the bounds, we were previous at the boundary, and we should wrap,
        // then we'll place the selection on the other side of the spectrum.
        // Otherwise, we'll place it on the boundary that was exceeded.
        if (*valueToIncrement < minBound)
        {
            *valueToIncrement = (shouldWrap && previousValue == minBound) ? maxBound : minBound;
        }

        if (*valueToIncrement > maxBound)
        {
            *valueToIncrement = (shouldWrap && previousValue == maxBound) ? minBound : maxBound;
        }

        // We multiplied saturation and value by 100 previously, so now we want to put them back in the 0-1 range.
        newHsv.s /= 100;
        newHsv.v /= 100;
    }
    else
    {
        // While working with named colors, we're going to need to be working in actual HSV units,
        // so we'll divide the min bound and max bound by 100 in the case of saturation or value,
        // since we'll have received units between 0-100 and we need them within 0-1.
        if (channel == winrt::ColorPickerHsvChannel::Saturation ||
            channel == winrt::ColorPickerHsvChannel::Value)
        {
            minBound /= 100;
            maxBound /= 100;
        }

        newHsv = FindNextNamedColor(originalHsv, channel, direction, shouldWrap, minBound, maxBound);
    }

    return newHsv;
}

int sgn ( T val )

Definition at line 98 of file ColorHelpers.cpp.

{
    const int first = (static_cast<T>(0) < val) ? 1 : 0;
    const int second = (static_cast<T>(0) > val) ? 1 : 0;

    return first - second;
}

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPicker.cpp File Reference

  • File List
  • File Members
  • ColorPicker

ColorPicker.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SharedHelpers.h"
#include "ColorPicker.h"
#include "ColorSpectrum.h"
#include "ResourceAccessor.h"
#include "RuntimeProfiler.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPicker.h File Reference

  • File List
  • File Members
  • ColorPicker
Classes

ColorPicker.h File Reference

#include "ColorHelpers.h"
#include "ColorChangedEventArgs.h"
#include "ColorPicker.g.h"
#include "ColorPicker.properties.h"

Go to the source code of this file.

Classes

class ColorPicker
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPicker.idl File Reference

  • File List
  • File Members
  • ColorPicker
Namespaces | Variables

ColorPicker.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

event Windows Foundation
TypedEventHandler< ColorPicker,
ColorChangedEventArgs > 		ColorChanged
unsealed runtimeclass | ColorPicker
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSlider.cpp File Reference

  • File List
  • File Members
  • ColorPicker

ColorPickerSlider.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorPickerSlider.h"
#include "ColorPickerSliderAutomationPeer.h"
#include "ColorPicker.h"
#include "ResourceAccessor.h"
#include "Utils.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSlider.h File Reference

  • File List
  • File Members
  • ColorPicker
Classes

ColorPickerSlider.h File Reference

#include "ColorPickerSlider.g.h"
#include "ColorPickerSlider.properties.h"

Go to the source code of this file.

Classes

class ColorPickerSlider
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSlider.idl File Reference

  • File List
  • File Members
  • ColorPicker
Namespaces | Variables

ColorPickerSlider.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Variables

unsealed runtimeclass | ColorPickerSlider
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSliderAutomationPeer.cpp File Reference

  • File List
  • File Members
  • ColorPicker

ColorPickerSliderAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorPickerSliderAutomationPeer.h"
#include "ColorPicker.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "ColorPickerSliderAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSliderAutomationPeer.h File Reference

  • File List
  • File Members
  • ColorPicker
Classes

ColorPickerSliderAutomationPeer.h File Reference

#include "ColorPickerSlider.h"
#include "ColorPickerSliderAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ColorPickerSliderAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSliderAutomationPeer.idl File Reference

  • File List
  • File Members
  • ColorPicker
Namespaces | Variables

ColorPickerSliderAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | ColorPickerSliderAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrum.cpp File Reference

  • File List
  • File Members
  • ColorPicker

ColorSpectrum.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorSpectrum.h"
#include "ColorSpectrumAutomationPeer.h"
#include "SpectrumBrush.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrum.h File Reference

  • File List
  • File Members
  • ColorPicker
Classes

ColorSpectrum.h File Reference

#include "ColorHelpers.h"
#include "ColorChangedEventArgs.h"
#include "ColorSpectrum.g.h"
#include "ColorSpectrum.properties.h"

Go to the source code of this file.

Classes

class ColorSpectrum
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrum.idl File Reference

  • File List
  • File Members
  • ColorPicker
Namespaces | Variables

ColorSpectrum.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Variables

event Windows Foundation
TypedEventHandler
< ColorSpectrum,
MU_XC_NAMESPACE.ColorChangedEventArgs > 		ColorChanged
unsealed runtimeclass | ColorSpectrum
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrumAutomationPeer.cpp File Reference

  • File List
  • File Members
  • ColorPicker

ColorSpectrumAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorSpectrumAutomationPeer.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "ColorSpectrumAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrumAutomationPeer.h File Reference

  • File List
  • File Members
  • ColorPicker
Classes

ColorSpectrumAutomationPeer.h File Reference

#include "ColorSpectrum.h"
#include "ColorSpectrumAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ColorSpectrumAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrumAutomationPeer.idl File Reference

  • File List
  • File Members
  • ColorPicker
Namespaces | Variables

ColorSpectrumAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | ColorSpectrumAutomationPeer
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/Common.idl File Reference

  • File List
  • File Members
  • ColorPicker
Namespaces | Enumerations

Common.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | ColorPickerHsvChannel { Hue = 0, Saturation = 1, Value = 2, Alpha = 3 }
enum ColorSpectrumComponents {
HueValue = 0, ValueHue = 1, HueSaturation = 2, SaturationHue = 3,
SaturationValue = 4, ValueSaturation = 5
}
enum | ColorSpectrumShape { Box = 0, Ring = 1 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/SpectrumBrush.cpp File Reference

  • File List
  • File Members
  • ColorPicker

SpectrumBrush.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SpectrumBrush.h"
#include "Vector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/SpectrumBrush.h File Reference

  • File List
  • File Members
  • ColorPicker
Classes

SpectrumBrush.h File Reference

#include "MaterialHelper.h"
#include "SpectrumBrush.g.h"
#include "SpectrumBrush.properties.h"
#include <Microsoft.UI.Private.Composition.Effects_impl.h>

Go to the source code of this file.

Classes

class SpectrumBrush
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/SpectrumBrush.idl File Reference

  • File List
  • File Members
  • ColorPicker
Namespaces | Variables

SpectrumBrush.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Variables

runtimeclass | SpectrumBrush
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/APITests/ColorPickerTests.cs File Reference

  • File List
  • File Members
  • ColorPicker
  • APITests
Classes | Namespaces

ColorPickerTests.cs File Reference

Go to the source code of this file.

Classes

class | ColorPickerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/InteractionTests/ColorPickerTests.cs File Reference

  • File List
  • File Members
  • ColorPicker
  • InteractionTests
Classes | Namespaces | Enumerations

ColorPickerTests.cs File Reference

Go to the source code of this file.

Classes

class | ColorChangedEventWaiter
class | ColorPickerSlider
class | ColorPickerSlider::ColorPickerSliderFactory
class | ColorPickerTests
class | ColorPickerTests::Color
class | ColorPickerTests::ColorPickerTestSetupHelper
class | ColorSpectrum
class | ColorSpectrum::ColorSpectrumFactory

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests

Enumerations

enum | ColorChannels { RGB, HSV }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/TestUI/ColorPickerPage.xaml.cs File Reference

  • File List
  • File Members
  • ColorPicker
  • TestUI
Classes | Namespaces

ColorPickerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ColorPickerPage
class | MyColorSpectrum

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/ComboBoxHelper.cpp File Reference

  • File List
  • File Members
  • ComboBox

ComboBoxHelper.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ComboBoxHelper.h"
#include "CornerRadiusFilterConverter.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/ComboBoxHelper.h File Reference

  • File List
  • File Members
  • ComboBox
Classes

ComboBoxHelper.h File Reference

#include "ComboBoxHelper.g.h"
#include "ComboBoxHelper.properties.h"

Go to the source code of this file.

Classes

class | ComboBoxDropDownEventRevokers
class | ComboBoxHelper
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/ComboBoxHelper.idl File Reference

  • File List
  • File Members
  • ComboBox
Namespaces

ComboBoxHelper.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_XCP_NAMESPACE
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/APITests/ComboBoxTests.cs File Reference

  • File List
  • File Members
  • ComboBox
  • APITests
Classes | Namespaces

ComboBoxTests.cs File Reference

Go to the source code of this file.

Classes

class | ComboBoxTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/TestUI/ComboBoxPage.xaml.cs File Reference

  • File List
  • File Members
  • ComboBox
  • TestUI
Classes | Namespaces

ComboBoxPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ComboBoxPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyout.cpp File Reference

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyout.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyout.h"
#include "CommandBarFlyoutCommandBar.h"
#include "Vector.h"
#include "RuntimeProfiler.h"
#include "CommandBarFlyout.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyout.h File Reference

  • File List
  • File Members
  • CommandBarFlyout
Classes

CommandBarFlyout.h File Reference

#include "CommandBarFlyout.g.h"
#include "CommandBarFlyoutTrace.h"

Go to the source code of this file.

Classes

class CommandBarFlyout
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyout.idl File Reference

  • File List
  • File Members
  • CommandBarFlyout
Namespaces | Variables

CommandBarFlyout.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | CommandBarFlyout
unsealed runtimeclass | TextCommandBarFlyout
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBar.cpp File Reference

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutCommandBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyout.h"
#include "CommandBarFlyoutCommandBar.h"
#include "CommandBarFlyoutCommandBarTemplateSettings.h"
#include "ResourceAccessor.h"
#include "TypeLogging.h"
#include "Vector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBar.h File Reference

  • File List
  • File Members
  • CommandBarFlyout
Classes | Enumerations

CommandBarFlyoutCommandBar.h File Reference

#include "CommandBarFlyoutCommandBar.g.h"
#include "CommandBarFlyoutCommandBar.properties.h"
#include "CommandBarFlyoutTrace.h"

Go to the source code of this file.

Classes

class | CommandBarFlyoutCommandBar

Enumerations

enum | CommandBarFlyoutOpenCloseAnimationKind { Opacity, Clip }

Enumeration Type Documentation

enum CommandBarFlyoutOpenCloseAnimationKind
Enumerator:
Opacity
Clip

Definition at line 10 of file CommandBarFlyoutCommandBar.h.

{
    Opacity,
    Clip
};

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBar.idl File Reference

  • File List
  • File Members
  • CommandBarFlyout
Namespaces | Variables

CommandBarFlyoutCommandBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Variables

unsealed runtimeclass | CommandBarFlyoutCommandBar
runtimeclass | CommandBarFlyoutCommandBarTemplateSettings
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.cpp File Reference

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutCommandBarAutomationProperties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyoutCommandBarAutomationProperties.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.h File Reference

  • File List
  • File Members
  • CommandBarFlyout
Classes

CommandBarFlyoutCommandBarAutomationProperties.h File Reference

#include "CommandBarFlyoutCommandBarAutomationProperties.g.h"
#include "CommandBarFlyoutCommandBarAutomationProperties.properties.h"

Go to the source code of this file.

Classes

class | CommandBarFlyoutCommandBarAutomationProperties
class | CommandBarFlyoutCommandBarAutomationPropertiesFactory
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.cpp File Reference

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutCommandBarTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyoutCommandBarTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.h File Reference

  • File List
  • File Members
  • CommandBarFlyout
Classes

CommandBarFlyoutCommandBarTemplateSettings.h File Reference

#include "CommandBarFlyoutCommandBarTemplateSettings.g.h"
#include "CommandBarFlyoutCommandBarTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class | CommandBarFlyoutCommandBarTemplateSettings
struct | CommandBarFlyoutCommandBarTemplateSettingsFactory
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutTrace.h File Reference

  • File List
  • File Members
  • CommandBarFlyout
Classes | Defines | Functions

CommandBarFlyoutTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | CommandBarFlyoutTrace

Defines

#define | COMMANDBARFLYOUT_TRACE_INFO(sender, message,...)
#define | COMMANDBARFLYOUT_TRACE_INFO_DBG(sender, message,...)
#define | COMMANDBARFLYOUT_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) CommandBarFlyoutTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | COMMANDBARFLYOUT_TRACE_PERF(info)
#define | COMMANDBARFLYOUT_TRACE_PERF_DBG(info)
#define | COMMANDBARFLYOUT_TRACE_VERBOSE(sender, message,...)
#define | COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(sender, message,...)
#define | COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) CommandBarFlyoutTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsCommandBarFlyoutTracingEnabled ()
bool | IsCommandBarFlyoutVerboseTracingEnabled ()

Define Documentation

#define COMMANDBARFLYOUT_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsCommandBarFlyoutTracingEnabled()) \
{ \
    COMMANDBARFLYOUT_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (CommandBarFlyoutTrace::s_IsDebugOutputEnabled || CommandBarFlyoutTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    COMMANDBARFLYOUT_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 28 of file CommandBarFlyoutTrace.h.

#define COMMANDBARFLYOUT_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 62 of file CommandBarFlyoutTrace.h.

#define COMMANDBARFLYOUT_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | CommandBarFlyoutTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 25 of file CommandBarFlyoutTrace.h.

#define COMMANDBARFLYOUT_TRACE_PERF ( info )
Value:
if (IsCommandBarFlyoutPerfTracingEnabled()) \
{ \
    CommandBarFlyoutTrace::TracePerfInfo(info); \
} \

Definition at line 51 of file CommandBarFlyoutTrace.h.

#define COMMANDBARFLYOUT_TRACE_PERF_DBG ( info )

Definition at line 64 of file CommandBarFlyoutTrace.h.

#define COMMANDBARFLYOUT_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsCommandBarFlyoutVerboseTracingEnabled()) \
{ \
    COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (CommandBarFlyoutTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 41 of file CommandBarFlyoutTrace.h.

#define COMMANDBARFLYOUT_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 63 of file CommandBarFlyoutTrace.h.

#define COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | CommandBarFlyoutTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 38 of file CommandBarFlyoutTrace.h.

Function Documentation

bool IsCommandBarFlyoutTracingEnabled ( ) [inline]

Definition at line 11 of file CommandBarFlyoutTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_COMMANDBARFLYOUT || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsCommandBarFlyoutVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file CommandBarFlyoutTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_COMMANDBARFLYOUT || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TextCommandBarFlyout.cpp File Reference

  • File List
  • File Members
  • CommandBarFlyout

TextCommandBarFlyout.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TextCommandBarFlyout.h"
#include "CommandBarFlyoutCommandBar.h"
#include "ResourceAccessor.h"
#include "RuntimeProfiler.h"
#include "TextCommandBarFlyout.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TextCommandBarFlyout.h File Reference

  • File List
  • File Members
  • CommandBarFlyout
Classes | Enumerations | Functions

TextCommandBarFlyout.h File Reference

#include "TextCommandBarFlyout.g.h"
#include "CommandBarFlyout.h"

Go to the source code of this file.

Classes

class TextCommandBarFlyout

Enumerations

enum TextControlButtons {
None = 0x0000, Cut = 0x0001, Copy = 0x0002, Paste = 0x0004,
Bold = 0x0008, Italic = 0x0010, Underline = 0x0020, Undo = 0x0040,
Redo = 0x0080, SelectAll = 0x0100
}

Functions

DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS (TextControlButtons)

Enumeration Type Documentation

enum TextControlButtons
Enumerator:
None
Cut
Copy
Paste
Bold
Italic
Underline
Undo
Redo
SelectAll

Definition at line 9 of file TextCommandBarFlyout.h.

{
    None = 0x0000,
    Cut = 0x0001,
    Copy = 0x0002,
    Paste = 0x0004,
    Bold = 0x0008,
    Italic = 0x0010,
    Underline = 0x0020,
    Undo = 0x0040,
    Redo = 0x0080,
    SelectAll = 0x0100,
};

Function Documentation

DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS ( TextControlButtons )
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/APITests/CommandBarFlyoutTests.cs File Reference

  • File List
  • File Members
  • CommandBarFlyout
  • APITests
Classes | Namespaces

CommandBarFlyoutTests.cs File Reference

Go to the source code of this file.

Classes

class | CommandBarFlyoutTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/InteractionTests/CommandBarFlyoutTests.cs File Reference

  • File List
  • File Members
  • CommandBarFlyout
  • InteractionTests
Classes | Namespaces

CommandBarFlyoutTests.cs File Reference

Go to the source code of this file.

Classes

class | CommandBarFlyoutTests
class | CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/InteractionTests/TextCommandBarFlyoutTests.cs File Reference

  • File List
  • File Members
  • CommandBarFlyout
  • InteractionTests
Classes | Namespaces

TextCommandBarFlyoutTests.cs File Reference

Go to the source code of this file.

Classes

class | TextCommandBarFlyoutTests
class | TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TestUI/CommandBarFlyoutMainPage.xaml.cs File Reference

  • File List
  • File Members
  • CommandBarFlyout
  • TestUI
Classes | Namespaces

CommandBarFlyoutMainPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CommandBarFlyoutMainPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TestUI/CommandBarFlyoutPage.xaml.cs File Reference

  • File List
  • File Members
  • CommandBarFlyout
  • TestUI
Classes | Namespaces

CommandBarFlyoutPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CommandBarFlyoutPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TestUI/ExtraCommandBarFlyoutPage.xaml.cs File Reference

  • File List
  • File Members
  • CommandBarFlyout
  • TestUI
Classes | Namespaces

ExtraCommandBarFlyoutPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ExtraCommandBarFlyoutPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TestUI/TextCommandBarFlyoutPage.xaml.cs File Reference

  • File List
  • File Members
  • CommandBarFlyout
  • TestUI
Classes | Namespaces

TextCommandBarFlyoutPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TextCommandBarFlyoutPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/AutoHandle.h File Reference

  • File List
  • File Members
  • Common
Classes | Namespaces | Defines | Functions

AutoHandle.h File Reference

Go to the source code of this file.

Classes

class | AutoHandle< THandlePolicy >
class | HandlePolicy

Namespaces

namespace | MUXControls
namespace | MUXControls::Common

Defines

#define | DECLARE_AUTOHANDLE_CLASS(className, handlePolicy) typedef MUXControls::Common::AutoHandle<handlePolicy> className; \

Functions

DECLARE_AUTOHANDLE_CLASS (Handle, HandlePolicy)

Define Documentation

#define DECLARE_AUTOHANDLE_CLASS | ( | className,
 |  | handlePolicy |
 | ) |  | typedef MUXControls::Common::AutoHandle<handlePolicy> className; \

Definition at line 7 of file AutoHandle.h.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/ColorConversion.cpp File Reference

  • File List
  • File Members
  • Common
Functions

ColorConversion.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SharedHelpers.h"
#include "ColorConversion.h"

Go to the source code of this file.

Functions

winrt::Color | ColorFromRgba (const Rgb &rgb, double alpha)
double | HexToRgba (const wstring_view &input)
winrt::hstring | RgbaToHex (const Rgb &rgb, double alpha)
Rgb | RgbFromColor (const winrt::Color &color)

Function Documentation

winrt::Color ColorFromRgba | ( | const Rgb & | rgb,
 |  | double | alpha
 | ) |  |

Definition at line 310 of file ColorConversion.cpp.

{
    return winrt::ColorHelper::FromArgb(
        static_cast<byte>(round(alpha * 255)),
        static_cast<byte>(round(rgb.r * 255)),
        static_cast<byte>(round(rgb.g * 255)),
        static_cast<byte>(round(rgb.b * 255)));
}

double HexToRgba ( const wstring_view & input )

Definition at line 270 of file ColorConversion.cpp.

{
    // The input always begins with a #, so we'll move past that.
    auto ptr = input.data();
    ++ptr;

    const auto hexValue = TryParseInt(ptr, 16);

    // If we failed to parse the string into an integer, then we'll return all -1's.
    // ARGB values can never be negative, so this is a convenient error state to use
    // to indicate that this value should not actually be used.
    if (!hexValue.has_value())
    {
        return { Rgb(-1, -1, -1), -1 };
    }

    const auto hex = hexValue.value();
    const byte a = static_cast<byte>((hex & 0xff000000) >> 24);
    const byte r = static_cast<byte>((hex & 0x00ff0000) >> 16);
    const byte g = static_cast<byte>((hex & 0x0000ff00) >> 8);
    const byte b = static_cast<byte>(hex & 0x000000ff);

    return { Rgb(r / 255.0, g / 255.0, b / 255.0), a / 255.0 };
}

winrt::hstring RgbaToHex | ( | const Rgb & | rgb,
 |  | double | alpha
 | ) |  |

Definition at line 295 of file ColorConversion.cpp.

{
    const byte aByte = static_cast<byte>(round(alpha * 255.0));
    const byte rByte = static_cast<byte>(round(rgb.r * 255.0));
    const byte gByte = static_cast<byte>(round(rgb.g * 255.0));
    const byte bByte = static_cast<byte>(round(rgb.b * 255.0));

    const unsigned long hexValue = (aByte << 24) + (rByte << 16) + (gByte << 8) + (bByte & 0xff);

    // We'll size this string to accommodate "#XXXXXXXX" - i.e., a full ARGB number with a # sign.
    wchar_t hexString[10];
    winrt::check_hresult(StringCchPrintfW(&hexString[0], 10, L"#%08X", hexValue));
    return winrt::hstring(hexString);
}

Rgb RgbFromColor ( const winrt::Color & color )

Definition at line 319 of file ColorConversion.cpp.

{
    return Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0);
}

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/ColorConversion.h File Reference

  • File List
  • File Members
  • Common
Classes | Namespaces | Functions

ColorConversion.h File Reference

#include "CppWinRTHelpers.h"

Go to the source code of this file.

Classes

class | Hsv
class | Rgb

Namespaces

namespace | hsv

Functions

winrt::Color | ColorFromRgba (const Rgb &rgb, double alpha=1.0)
float | GetAlpha (const winrt::float4 &hsva)
float | GetHue (const winrt::float4 &hsva)
float | GetSaturation (const winrt::float4 &hsva)
float | GetValue (const winrt::float4 &hsva)
Rgb | HexToRgb (const wstring_view &input)
std::tuple< Rgb, double > | HexToRgba (const wstring_view &input)
Rgb | HsvToRgb (const Hsv &hsv)
winrt::hstring | RgbaToHex (const Rgb &rgb, double alpha)
Rgb | RgbFromColor (const winrt::Color &color)
winrt::hstring | RgbToHex (const Rgb &rgb)
Hsv | RgbToHsv (const Rgb &rgb)
void | SetAlpha (winrt::float4 &hsva, float alpha)
void | SetHue (winrt::float4 &hsva, float hue)
void | SetSaturation (winrt::float4 &hsva, float saturation)
void | SetValue (winrt::float4 &hsva, float value)
std::optional< unsigned long > | TryParseInt (const wstring_view &str, int base)
std::optional< unsigned long > | TryParseInt (const wstring_view &s)

Function Documentation

winrt::Color ColorFromRgba | ( | const Rgb & | rgb,
 |  | double | alpha = 1.0
 | ) |  |

Definition at line 310 of file ColorConversion.cpp.

{
    return winrt::ColorHelper::FromArgb(
        static_cast<byte>(round(alpha * 255)),
        static_cast<byte>(round(rgb.r * 255)),
        static_cast<byte>(round(rgb.g * 255)),
        static_cast<byte>(round(rgb.b * 255)));
}

Rgb HexToRgb ( const wstring_view & input )
std::tuple<Rgb, double> HexToRgba ( const wstring_view & input )

Definition at line 270 of file ColorConversion.cpp.

{
    // The input always begins with a #, so we'll move past that.
    auto ptr = input.data();
    ++ptr;

    const auto hexValue = TryParseInt(ptr, 16);

    // If we failed to parse the string into an integer, then we'll return all -1's.
    // ARGB values can never be negative, so this is a convenient error state to use
    // to indicate that this value should not actually be used.
    if (!hexValue.has_value())
    {
        return { Rgb(-1, -1, -1), -1 };
    }

    const auto hex = hexValue.value();
    const byte a = static_cast<byte>((hex & 0xff000000) >> 24);
    const byte r = static_cast<byte>((hex & 0x00ff0000) >> 16);
    const byte g = static_cast<byte>((hex & 0x0000ff00) >> 8);
    const byte b = static_cast<byte>(hex & 0x000000ff);

    return { Rgb(r / 255.0, g / 255.0, b / 255.0), a / 255.0 };
}

Rgb HsvToRgb ( const Hsv & hsv )
winrt::hstring RgbaToHex | ( | const Rgb & | rgb,
 |  | double | alpha
 | ) |  |

Definition at line 295 of file ColorConversion.cpp.

{
    const byte aByte = static_cast<byte>(round(alpha * 255.0));
    const byte rByte = static_cast<byte>(round(rgb.r * 255.0));
    const byte gByte = static_cast<byte>(round(rgb.g * 255.0));
    const byte bByte = static_cast<byte>(round(rgb.b * 255.0));

    const unsigned long hexValue = (aByte << 24) + (rByte << 16) + (gByte << 8) + (bByte & 0xff);

    // We'll size this string to accommodate "#XXXXXXXX" - i.e., a full ARGB number with a # sign.
    wchar_t hexString[10];
    winrt::check_hresult(StringCchPrintfW(&hexString[0], 10, L"#%08X", hexValue));
    return winrt::hstring(hexString);
}

Rgb RgbFromColor ( const winrt::Color & color )

Definition at line 319 of file ColorConversion.cpp.

{
    return Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0);
}

winrt::hstring RgbToHex ( const Rgb & rgb )
Hsv RgbToHsv ( const Rgb & rgb )
std::optional<unsigned long> TryParseInt | ( | const wstring_view & | str,
 |  | int | base
 | ) |  |
std::optional<unsigned long> TryParseInt ( const wstring_view & s )
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusFilterConverter.cpp File Reference

  • File List
  • File Members
  • Common

CornerRadiusFilterConverter.cpp File Reference

#include <pch.h>
#include <common.h>
#include "CornerRadiusFilterConverter.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusFilterConverter.h File Reference

  • File List
  • File Members
  • Common
Classes

CornerRadiusFilterConverter.h File Reference

#include "CornerRadiusFilterConverter.g.h"
#include "CornerRadiusFilterConverter.properties.h"

Go to the source code of this file.

Classes

class CornerRadiusFilterConverter
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusFilterConverters.idl File Reference

  • File List
  • File Members
  • Common
Namespaces | Enumerations | Variables

CornerRadiusFilterConverters.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Enumerations

enum CornerRadiusFilterKind {
None, Top, Right, Bottom,
Left, TopLeftValue, BottomRightValue
}

Variables

runtimeclass | CornerRadiusFilterConverter
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusToThicknessConverter.cpp File Reference

  • File List
  • File Members
  • Common

CornerRadiusToThicknessConverter.cpp File Reference

#include <pch.h>
#include <common.h>
#include "CornerRadiusToThicknessConverter.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusToThicknessConverter.h File Reference

  • File List
  • File Members
  • Common
Classes

CornerRadiusToThicknessConverter.h File Reference

#include "CornerRadiusToThicknessConverter.g.h"
#include "CornerRadiusToThicknessConverter.properties.h"

Go to the source code of this file.

Classes

class CornerRadiusToThicknessConverter
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusToThicknessConverter.idl File Reference

  • File List
  • File Members
  • Common
Namespaces | Enumerations | Variables

CornerRadiusToThicknessConverter.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Enumerations

enum CornerRadiusToThicknessConverterKind {
FilterTopAndBottomFromLeft, FilterTopAndBottomFromRight, FilterLeftAndRightFromTop, FilterLeftAndRightFromBottom,
FilterTopFromTopLeft, FilterTopFromTopRight, FilterRightFromTopRight, FilterRightFromBottomRight,
FilterBottomFromBottomRight, FilterBottomFromBottomLeft, FilterLeftFromBottomLeft, FilterLeftFromTopLeft
}

Variables

runtimeclass | CornerRadiusToThicknessConverter
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/Flags_Enum.h File Reference

  • File List
  • File Members
  • Common
Classes | Namespaces | Functions

Flags_Enum.h File Reference

#include <type_traits>

Go to the source code of this file.

Classes

struct | is_flags_enum< T >

Namespaces

namespace | flags_enum

Functions

template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr bool | are_all_set (T lhs, T value) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr bool | is_set (T lhs, T value) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | operator& (T lhs, T rhs) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | operator<< (T lhs, size_t shift) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | operator>> (T lhs, size_t shift) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | operator^ (T lhs, T rhs) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | operator| (T lhs, T rhs) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | operator~ (T lhs) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | set (T lhs, T value) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr
std::underlying_type_t< T > 		underlying_type (T lhs) noexcept
template<typename T , typename = std::enable_if_t<std::is_enum<T>::value && is_flags_enum<T>::value>>
constexpr T | unset (T lhs, T value) noexcept

Function Documentation

constexpr T operator& | ( | T | lhs,
 |  | T | rhs
 | ) |  |

Definition at line 24 of file Flags_Enum.h.

{
    using type = std::underlying_type_t<T>;
    return static_cast<T>(static_cast<type>(lhs) & static_cast<type>(rhs));
}

constexpr T operator<< | ( | T | lhs,
 |  | size_t | shift
 | ) |  |

Definition at line 38 of file Flags_Enum.h.

{
    using type = std::underlying_type_t<T>;
    return static_cast<T>(static_cast<type>(lhs) << shift);
}

constexpr T operator>> | ( | T | lhs,
 |  | size_t | shift
 | ) |  |

Definition at line 45 of file Flags_Enum.h.

{
    using type = std::underlying_type_t<T>;
    return static_cast<T>(static_cast<type>(lhs) >> shift);
}

constexpr T operator^ | ( | T | lhs,
 |  | T | rhs
 | ) |  |

Definition at line 31 of file Flags_Enum.h.

{
    using type = std::underlying_type_t<T>;
    return static_cast<T>(static_cast<type>(lhs) ^ static_cast<type>(rhs));
}

constexpr T operator| | ( | T | lhs,
 |  | T | rhs
 | ) |  |

Definition at line 17 of file Flags_Enum.h.

{
    using type = std::underlying_type_t<T>;
    return static_cast<T>(static_cast<type>(lhs) | static_cast<type>(rhs));
}

constexpr T operator~ ( T lhs )

Definition at line 52 of file Flags_Enum.h.

{
    using type = std::underlying_type_t<T>;
    return static_cast<T>(~static_cast<type>(lhs));
}

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/LifetimeHandler.cpp File Reference

  • File List
  • File Members
  • Common

LifetimeHandler.cpp File Reference

#include <pch.h>
#include <common.h>
#include "LifetimeHandler.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/LifetimeHandler.h File Reference

  • File List
  • File Members
  • Common
Classes

LifetimeHandler.h File Reference

#include <MaterialHelper.h>

Go to the source code of this file.

Classes

class LifetimeHandler
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/PointerInfo.h File Reference

  • File List
  • File Members
  • Common
Classes | Enumerations

PointerInfo.h File Reference

#include <Flags_Enum.h>

Go to the source code of this file.

Classes

struct | is_flags_enum< PointerOverStatus >
struct | is_flags_enum< PointerPressedStatus >
class | PointerInfo< T >

Enumerations

enum | PointerOverStatus { None = 0x00, Touch = 0x01, Pen = 0x02, Mouse = 0x04 }
enum | PointerPressedStatus { None = 0x00, LeftMouseButton = 0x01, RightMouseButton = 0x02, Pointer = 0x04 }

Enumeration Type Documentation

enum PointerOverStatus
Enumerator:
None
Touch
Pen
Mouse

Definition at line 8 of file PointerInfo.h.

{
    None  = 0x00,
    Touch = 0x01,
    Pen   = 0x02,
    Mouse = 0x04
};

enum PointerPressedStatus
Enumerator:
None
LeftMouseButton
RightMouseButton
Pointer

Definition at line 16 of file PointerInfo.h.

{
    None             = 0x00,
    LeftMouseButton  = 0x01,
    RightMouseButton = 0x02,
    Pointer          = 0x04
};

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/PointerInfoRevokers.h File Reference

  • File List
  • File Members
  • Common
Classes

PointerInfoRevokers.h File Reference

Go to the source code of this file.

Classes

class PointerInfoRevokers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/WinEventLogLevels.h File Reference

  • File List
  • File Members
  • Common
Defines

WinEventLogLevels.h File Reference

Go to the source code of this file.

Defines

#define | WINEVENT_LEVEL_CRITICAL 0x1
#define | WINEVENT_LEVEL_ERROR 0x2
#define | WINEVENT_LEVEL_INFO 0x4
#define | WINEVENT_LEVEL_LOG_ALWAYS 0x0
#define | WINEVENT_LEVEL_VERBOSE 0x5
#define | WINEVENT_LEVEL_WARNING 0x3

Define Documentation

#define WINEVENT_LEVEL_CRITICAL 0x1

Definition at line 7 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_ERROR 0x2

Definition at line 8 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_INFO 0x4

Definition at line 10 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_LOG_ALWAYS 0x0

Definition at line 6 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_VERBOSE 0x5

Definition at line 11 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_WARNING 0x3

Definition at line 9 of file WinEventLogLevels.h.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonManaged/PlatformConfiguration.cs File Reference

  • File List
  • File Members
  • CommonManaged
Classes | Namespaces | Enumerations

PlatformConfiguration.cs File Reference

Go to the source code of this file.

Classes

class | PlatformConfiguration

Namespaces

namespace | Common

Enumerations

enum | DeviceType { Desktop, Phone, OneCore }
enum OSVersion {
Threshold2 = 2, Redstone1 = 3, Redstone2 = 4, Redstone3 = 5,
Redstone4 = 6, Redstone5 = 7, NineteenH1 = 8, TwentyOneH1 = 14
}
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/APITests/BaselineResources2dot5stable.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • APITests
Classes | Namespaces

BaselineResources2dot5stable.cs File Reference

Go to the source code of this file.

Classes

class | BaselineResources

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/APITests/CalendarViewTests.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • APITests
Classes | Namespaces

CalendarViewTests.cs File Reference

Go to the source code of this file.

Classes

class | CalendarViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/APITests/CommonStylesTests.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • APITests
Classes | Namespaces

CommonStylesTests.cs File Reference

Go to the source code of this file.

Classes

class | CommonStylesApiTests
class | CommonStylesVisualTreeTestSamples
class | CommonStylesVisualTreeTestSamples::CustomizedFilter
class | CommonStylesVisualTreeTestSamples::CustomizedTranslator
class | ControlVisualTreeTestFilter

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/InteractionTests/CommonStylesTests.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • InteractionTests
Classes | Namespaces

CommonStylesTests.cs File Reference

Go to the source code of this file.

Classes

class | CommonStylesTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/AppBarPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

AppBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AppBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/BlankPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

BlankPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | BlankPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/BorderThicknessPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

BorderThicknessPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | BorderThicknessPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CalendarDatePickerPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CalendarDatePickerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CalendarDatePickerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CalendarViewPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CalendarViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CalendarViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CheckBoxPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CheckBoxPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CheckBoxPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CommandBarCenterPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CommandBarCenterPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CommandBarCenterPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CommandBarPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CommandBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CommandBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CommandBarSummaryPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CommandBarSummaryPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CommandBarSummaryPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CommonStylesPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CommonStylesPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CommonStylesPage
class | SimpleVerify

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CompactPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CompactPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CompactPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ContentDialogPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ContentDialogPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ContentDialogPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CornerRadiusPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

CornerRadiusPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CornerRadiusPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/DatePickerPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

DatePickerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | DatePickerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/FlatItemsControlPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

FlatItemsControlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | FlatItemsControlPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/FlipViewPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

FlipViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | FlipViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/GridViewPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

GridViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | GridViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/GroupedItemsControlPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

GroupedItemsControlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | GroupedItemsControlGroupItem
class | GroupedItemsControlItem
class | GroupedItemsControlPage
class | GroupedItemsControlViewModel

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/GroupedListViewBasePage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

GroupedListViewBasePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | GroupedListViewBaseGroupItem
class | GroupedListViewBaseItem
class | GroupedListViewBasePage
class | GroupedListViewBaseViewModel

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ImagePage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ImagePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ImagePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/InkToolbarPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

InkToolbarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | InkToolbarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ItemsControlPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ItemsControlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsControlPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ListViewAnchoringPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ListViewAnchoringPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ListViewAnchoringPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ListViewBasePage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ListViewBasePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ListViewBasePage
class | ListViewBasePage::QueuedOperation

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ListViewElementNameBindingPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ListViewElementNameBindingPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ListViewElementNameBindingPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ListViewPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ListViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ListViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/MediaTransportControlsPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

MediaTransportControlsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MediaTransportControlsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/MenuFlyoutPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

MenuFlyoutPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MenuFlyoutPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NestedGridViewsPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

NestedGridViewsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NestedGridViewsPage
class | PrefixConverter

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NestedItemsControlsPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

NestedItemsControlsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NestedItemsControlsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NestedListViewsPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

NestedListViewsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NestedListViewsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NewWindowRootPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

NewWindowRootPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NewWindowRootPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/PivotPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

PivotPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PivotPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ScrollBarPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ScrollBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ScrollViewerPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ScrollViewerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/SliderPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

SliderPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SliderPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/TextControlsPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

TextControlsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TextControlsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/TimePickerPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

TimePickerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TimePickerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ToolTipPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

ToolTipPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ToolTipPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/VisualPropertiesPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

VisualPropertiesPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | BreadcrumbBarFolder
class | VisualPropertiesPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/VisualStatesPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

VisualStatesPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | VisualStatesPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/WindowPage.xaml.cs File Reference

  • File List
  • File Members
  • CommonStyles
  • TestUI
Classes | Namespaces

WindowPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | WindowPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/CommandingHelpers.cpp File Reference

  • File List
  • File Members
  • dll

CommandingHelpers.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandingHelpers.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/dllmain.cpp File Reference

  • File List
  • File Members
  • dll
Functions | Variables

dllmain.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RuntimeProfiler.h"
#include "WinUIrc.ver"
#include <winstring.h>
#include <initguid.h>
#include <wrl\module.h>
#include "LifetimeHandler.h"
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Functions

STDAPI_ (void) SendTelemetryOnSuspend()
STDAPI_ (BOOL) DllMain(_In_ HINSTANCE hInstance

Variables

HINSTANCE | g_hInstance = nullptr
const char * | gFileVersion = (const char *)(VER_FILEVERSION_STR)
_In_ DWORD | reason

Function Documentation

STDAPI_ ( void )

Definition at line 268 of file RuntimeProfiler.cpp.

{
    RuntimeProfiler::FireEvent(true);
}

STDAPI_ ( BOOL )

Variable Documentation

HINSTANCE g_hInstance = nullptr

Definition at line 18 of file dllmain.cpp.

const char* gFileVersion = (const char *)(VER_FILEVERSION_STR)

Definition at line 21 of file dllmain.cpp.

_In_ DWORD reason

Definition at line 25 of file dllmain.cpp.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/DoubleUtil.cpp File Reference

  • File List
  • File Members
  • dll

DoubleUtil.cpp File Reference

#include <pch.h>
#include "DoubleUtil.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/FloatUtil.cpp File Reference

  • File List
  • File Members
  • dll

FloatUtil.cpp File Reference

#include <pch.h>
#include "FloatUtil.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/MUXControlsFactory.cpp File Reference

  • File List
  • File Members
  • dll

MUXControlsFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlMetadataProvider.h"
#include "MUXControlsFactory.h"
#include "XamlControlsXamlMetaDataProvider.g.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/MUXControlsFactory.h File Reference

  • File List
  • File Members
  • dll
Classes | Namespaces

MUXControlsFactory.h File Reference

#include "XamlMetadataProvider.h"
#include "XamlControlsXamlMetaDataProvider.g.h"

Go to the source code of this file.

Classes

class | MUXControlsFactory

Namespaces

namespace | winrt::Microsoft::UI::Xaml::XamlTypeInfo
namespace | winrt::Microsoft::UI::Xaml::XamlTypeInfo::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::XamlTypeInfo::implementation
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/pch.cpp File Reference

  • File List
  • File Members
  • dll

pch.cpp File Reference

#include "pch.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/pch.h File Reference

  • File List
  • File Members
  • dll
Defines | Functions

pch.h File Reference

#include "targetver.h"
#include "BuildMacros.h"
#include <windows.h>
#include <inspectable.h>
#include <hstring.h>
#include <eventtoken.h>
#include <activation.h>
#include <weakreference.h>
#include <guiddef.h>
#include "gsl/gsl"
#include <Microsoft.UI.Xaml.Hosting.ReferenceTracker.h>
#include <Windows.Foundation.h>
#include <WindowsNumerics.h>
#include <strsafe.h>
#include <robuffer.h>
#include <wil/common.h>
#include <vector>
#include <map>
#include <functional>
#include <cmath>
#include "CppWinRTIncludes.h"

Go to the source code of this file.

Defines

#define | _USE_MATH_DEFINES
#define | CREATE_XAML_UI_PRESENTER_API
#define | M_PI 3.14159265358979323846
#define | M_PI_2 1.57079632679489661923
#define | MUX_ASSERT(X)
#define | MUX_ASSERT_MSG(X, MSG)
#define | MUX_ASSERT_NOASSUME(X)
#define | MUX_FAIL_FAST() RaiseFailFastException(nullptr, nullptr, 0);
#define | MUX_FAIL_FAST_MSG(MSG) RaiseFailFastException(nullptr, nullptr, 0);
#define | NOMINMAX
#define | WI_IS_FEATURE_PRESENT(FeatureName) 1
#define | WIN32_LEAN_AND_MEAN
#define | WINRT_DISABLE_FACTORY_CACHE 1
#define | WINRT_NO_SOURCE_LOCATION

Functions

void constexpr | specialize_guids ()

Define Documentation

#define _USE_MATH_DEFINES

Definition at line 96 of file pch.h.

#define CREATE_XAML_UI_PRESENTER_API

Definition at line 80 of file pch.h.

#define M_PI 3.14159265358979323846

Definition at line 98 of file pch.h.

#define M_PI_2 1.57079632679489661923

Definition at line 99 of file pch.h.

#define MUX_ASSERT ( X )

Definition at line 67 of file pch.h.

#define MUX_ASSERT_MSG | ( | X,
 |  | MSG
 | ) |

Definition at line 68 of file pch.h.

#define MUX_ASSERT_NOASSUME ( X )

Definition at line 69 of file pch.h.

#define MUX_FAIL_FAST ( ) RaiseFailFastException(nullptr, nullptr, 0);

Definition at line 72 of file pch.h.

#define MUX_FAIL_FAST_MSG ( MSG ) RaiseFailFastException(nullptr, nullptr, 0);

Definition at line 73 of file pch.h.

#define NOMINMAX

Definition at line 6 of file pch.h.

#define WI_IS_FEATURE_PRESENT ( FeatureName ) 1

Definition at line 101 of file pch.h.

#define WIN32_LEAN_AND_MEAN

Definition at line 26 of file pch.h.

#define WINRT_DISABLE_FACTORY_CACHE 1

Definition at line 19 of file pch.h.

#define WINRT_NO_SOURCE_LOCATION

Definition at line 13 of file pch.h.

Function Documentation

void constexpr specialize_guids ( )

Definition at line 111 of file pch.h.

{
    winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<bool>>();
    winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<struct winrt::hstring>>();
    winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<struct winrt::Windows::Storage::Streams::IRandomAccessStreamWithContentType>>();
    winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<unsigned int>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::hstring>>();

#ifdef REPEATER_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::IndexPath>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionTriggers>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVectorView<struct winrt::Microsoft::UI::Xaml::Controls::IndexPath>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::IndexPath>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::IndexBasedLayoutOrientation>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::FlowLayoutLineAlignment>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsJustification>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsStretch>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsJustification>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsStretch>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Layout, struct winrt::Windows::Foundation::IInspectable>>();
#endif

#ifdef TREEVIEW_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode, struct winrt::Windows::Foundation::Collections::IVectorChangedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode, struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode, struct winrt::Microsoft::UI::Xaml::DependencyPropertyChangedEventArgs>>();
#endif

#ifdef MENUBAR_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
#endif

#ifdef SCROLLPRESENTER_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingInteractionState>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Private::Controls::ScrollPresenterTestHooksAnchorEvaluatedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Private::Controls::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingAnchorRequestedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingBringingIntoViewEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollAnimationStartingEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomAnimationStartingEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollCompletedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomCompletedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Windows::Foundation::IInspectable>>();
#endif

#ifdef SWIPECONTROL_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::SwipeBehaviorOnInvoked>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::SwipeMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SwipeControl, struct winrt::Windows::Foundation::IInspectable>>();
#endif

#ifdef COLORPICKER_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ColorPickerHsvChannel>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum, struct winrt::Microsoft::UI::Xaml::Controls::ColorChangedEventArgs>>();
#endif

#ifdef NAVIGATIONVIEW_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackButtonVisible>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewOverflowLabelMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneDisplayMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionFollowsFocus>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewShoulderNavigationEnabled>>();
#endif

#ifdef PARALLAXVIEW_INCUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind>>();
#endif

#ifdef PULLTOREFRESH_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::RefreshPullDirection>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerOrientation>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Private::Controls::IRefreshInfoProvider, struct winrt::Microsoft::UI::Xaml::Controls::RefreshInteractionRatioChangedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Private::Controls::IRefreshInfoProvider, struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, struct winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs>>();
#endif

#ifdef SELECTORBAR_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
#endif

#ifdef SCROLLVIEW_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode>>();
#endif

#ifdef ITEMSVIEW_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionMode>>();
#endif

#ifdef ITEMCONTAINER_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerMultiSelectMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerInteractionTrigger>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerUserSelectMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerUserInvokeMode>>();
#endif

#ifdef TWOPANEVIEW_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewPriority>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewTallModeConfiguration>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewWideModeConfiguration>>();
#endif

#ifdef MATERIALS_INCLUDED
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Media::RevealBrushState>>();
#endif

    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Foundation::IInspectable, struct winrt::Microsoft::UI::Private::Controls::MUXControlsTestHooksLoggingMessageEventArgs>>();

    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Windows::Foundation::Collections::IKeyValuePair<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate> >>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationPeer>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::DependencyObject>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::UIElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::hstring>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Windows::Foundation::Collections::IKeyValuePair<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate> >>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationPeer>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::DependencyObject>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::UIElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IKeyValuePair<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::hstring>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Windows::Graphics::Imaging::BitmapTypedValue>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Microsoft::UI::Composition::ICompositionAnimationBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::Windows::Foundation::IInspectable,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMapView<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<double>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::hstring>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Windows::Foundation::Point>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationPeer>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::ColorKeyFrame>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::DoubleKeyFrame>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::ObjectKeyFrame>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::PointKeyFrame>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::Timeline>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::Transition>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Brush>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Geometry>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::GradientStop>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::PathFigure>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::PathSegment>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Transform>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::TriggerAction>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::UIElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVectorView<struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVectorView<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
    winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
    winrt::guid_of<struct winrt::Windows::Foundation::EventHandler<struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::EventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::EventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<bool>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<winrt::TimeSpan>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<double>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Windows::UI::Text::FontStyle>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::ApplicationTheme>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Automation::ExpandCollapseState>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Orientation>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Symbol>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Visibility>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<float>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<int>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::hstring>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Numerics::float2>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Numerics::float3>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Numerics::float4>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Point>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Rect>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::UI::Color>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::UI::Text::FontWeight>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::CornerRadius>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::GridLength>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::Input::KeyEventHandler>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::Input::PointerEventHandler>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::UI::Xaml::Interop::TypeName>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::Thickness>>();
    winrt::guid_of<struct winrt::Windows::Foundation::IReference<unsigned int>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::ApplicationModel::Core::CoreApplicationViewTitleBar,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Foundation::IInspectable,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Foundation::IInspectable,struct winrt::Microsoft::UI::Composition::CompositionBatchCompletedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Graphics::Display::DisplayInformation,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Composition::CompositionCapabilities,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreDispatcher,struct winrt::Windows::UI::Core::AcceleratorKeyEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreWindow,struct winrt::Windows::UI::Core::KeyEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreWindow,struct winrt::Windows::UI::Core::PointerEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreWindow,struct winrt::Windows::UI::Core::VisibilityChangedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::ViewManagement::UISettings,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Control,struct winrt::Microsoft::UI::Xaml::Controls::FocusDisengagedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Control,struct winrt::Microsoft::UI::Xaml::Controls::FocusEngagedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ListViewBase,struct winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ListViewBase,struct winrt::Microsoft::UI::Xaml::Controls::DragItemsCompletedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase,struct winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBaseClosingEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SplitView,struct winrt::Windows::Foundation::IInspectable>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SplitView,struct winrt::Microsoft::UI::Xaml::Controls::SplitViewPaneClosingEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TextBox,struct winrt::Microsoft::UI::Xaml::Controls::TextBoxTextChangingEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::FrameworkElement,struct winrt::Microsoft::UI::Xaml::EffectiveViewportChangedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Input::XamlUICommand,struct winrt::Microsoft::UI::Xaml::Input::ExecuteRequestedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::UIElement,struct winrt::Microsoft::UI::Xaml::BringIntoViewRequestedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::UIElement,struct winrt::Microsoft::UI::Xaml::Input::AccessKeyInvokedEventArgs>>();
    winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::UIElement,struct winrt::Microsoft::UI::Xaml::Input::GettingFocusEventArgs>>();
}

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/RegUtil.cpp File Reference

  • File List
  • File Members
  • dll

RegUtil.cpp File Reference

#include <pch.h>
#include "RegUtil.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/SharedHelpers.cpp File Reference

  • File List
  • File Members
  • dll
Namespaces | Defines | Functions | Variables

SharedHelpers.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MUXControlsFactory.h"
#include "SharedHelpers.h"
#include <appmodel.h>
#include <roapi.h>
#include <winrt\Microsoft.UI.Interop.h>

Go to the source code of this file.

Namespaces

namespace | ABI::Windows::ApplicationModel::Core
namespace | anonymous_namespace{SharedHelpers.cpp}

Defines

#define | PACKAGE_FILTER_DYNAMIC PACKAGE_PROPERTY_DYNAMIC
#define | PACKAGE_FILTER_STATIC PACKAGE_PROPERTY_STATIC
#define | PACKAGE_PROPERTY_DYNAMIC 0x00100000
#define | PACKAGE_PROPERTY_STATIC 0x00080000

Functions

virtual HRESULT STDMETHODCALLTYPE | add_Resuming (void *handler, EventRegistrationToken *token)=0
virtual HRESULT STDMETHODCALLTYPE | add_Suspending (void *handler, EventRegistrationToken *token)=0
virtual HRESULT STDMETHODCALLTYPE | get_Properties (void **value)=0
virtual HRESULT STDMETHODCALLTYPE | GetCurrentView (void **value)=0
bool | IsInFrameworkPackageImpl (winrt::hstring &frameworkInstallLocation)
virtual HRESULT STDMETHODCALLTYPE | remove_Resuming (EventRegistrationToken token)=0
virtual HRESULT STDMETHODCALLTYPE | remove_Suspending (EventRegistrationToken token)=0
virtual HRESULT STDMETHODCALLTYPE | Run (void *viewSource)=0
virtual HRESULT STDMETHODCALLTYPE | RunWithActivationFactories (void *activationFactoryCallback)=0
bool | TryGetCurrentPackageGraph (const std::uint32_t flags, std::uint32_t &packageCount, const PACKAGE_INFO *&packageGraph, std::unique_ptr< BYTE[]> &buffer)

Variables

ICoreApplication | __pad0__
constexpr wchar_t | c_reunionPackageNamePrefix [] = "Microsoft.WindowsAppRuntime"
constexpr int | c_reunionPackageNamePrefixLength = ARRAYSIZE(c_reunionPackageNamePrefix) - 1

Define Documentation

#define PACKAGE_FILTER_DYNAMIC PACKAGE_PROPERTY_DYNAMIC

Definition at line 22 of file SharedHelpers.cpp.

#define PACKAGE_FILTER_STATIC PACKAGE_PROPERTY_STATIC

Definition at line 20 of file SharedHelpers.cpp.

#define PACKAGE_PROPERTY_DYNAMIC 0x00100000

Definition at line 21 of file SharedHelpers.cpp.

#define PACKAGE_PROPERTY_STATIC 0x00080000

Definition at line 19 of file SharedHelpers.cpp.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/targetver.h File Reference

  • File List
  • File Members
  • dll
Defines

targetver.h File Reference

#include <SDKDDKVer.h>

Go to the source code of this file.

Defines

#define NTDDI_VERSION NTDDI_WIN10_RS2

Define Documentation

#define NTDDI_VERSION NTDDI_WIN10_RS2

Definition at line 14 of file targetver.h.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlControlsResources.cpp File Reference

  • File List
  • File Members
  • dll
Functions

XamlControlsResources.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlControlsResources.h"
#include "RevealBrush.h"
#include "MUXControlsFactory.h"

Go to the source code of this file.

Functions

void SetDefaultStyleKeyWorker (winrt::IControlProtected const &controlProtected, std::wstring_view const &className)

Function Documentation

void SetDefaultStyleKeyWorker | ( | winrt::IControlProtected const & | controlProtected,
 |  | std::wstring_view const & | className
 | ) |  |

Definition at line 171 of file XamlControlsResources.cpp.

{
    controlProtected.DefaultStyleKey(box_value(className));

    if (auto control = controlProtected.try_as<winrt::IControl>())
    {
        winrt::Uri uri{L"ms-appx:///" MUXCONTROLSROOT_NAMESPACE_STR "/Themes/generic.xaml"};
        control.DefaultStyleResourceUri(uri);
    }
}

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlControlsResources.h File Reference

  • File List
  • File Members
  • dll
Classes

XamlControlsResources.h File Reference

#include "XamlControlsResources.g.h"
#include "XamlControlsResources.properties.h"

Go to the source code of this file.

Classes

class XamlControlsResources
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMember.cpp File Reference

  • File List
  • File Members
  • dll

XamlMember.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlMember.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMember.h File Reference

  • File List
  • File Members
  • dll
Classes

XamlMember.h File Reference

Go to the source code of this file.

Classes

class XamlMember
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMetadataDependencyLocator.cpp File Reference

  • File List
  • File Members
  • dll
Namespaces | Functions

XamlMetadataDependencyLocator.cpp File Reference

#include "pch.h"
#include "common.h"
#include <initguid.h>
#include <minerror.h>
#include <DependencyLocator.h>
#include "XamlTypeInfo.h"
#include "XamlTypeInfo.g.h"

Go to the source code of this file.

Namespaces

namespace Private

Functions

__declspec (dllexport) DependencyLocator
PROVIDE_DEPENDENCY (XamlRuntimeType)

Function Documentation

__declspec ( dllexport )

Definition at line 22 of file XamlMetadataDependencyLocator.cpp.

{
    return &(DependencyLocator::Internal::GetDependencyLocatorStorage().Get());
}

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMetadataProvider.cpp File Reference

  • File List
  • File Members
  • dll

XamlMetadataProvider.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlMetadataProvider.h"
#include "XamlMetadataProviderGenerated.h"
#include "XamlType.h"
#include "MUXControlsFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMetadataProvider.h File Reference

  • File List
  • File Members
  • dll
Classes

XamlMetadataProvider.h File Reference

#include <mutex>
#include "XamlType.h"
#include "XamlControlsXamlMetaDataProvider.g.h"

Go to the source code of this file.

Classes

class XamlMetadataProvider
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMetadataProviderGenerated.h File Reference

  • File List
  • File Members
  • dll
Classes | Namespaces | Functions | Variables

XamlMetadataProviderGenerated.h File Reference

#include "pch.h"
#include "common.h"
#include "XamlControlsResources.h"
#include "AcrylicBrush.properties.h"
#include "AnimatedIcon.properties.h"
#include "AnimatedIconSource.properties.h"
#include "AnimatedVisualPlayer.properties.h"
#include "AnnotatedScrollBar.properties.h"
#include "AutoSuggestBoxHelper.properties.h"
#include "BreadcrumbBar.properties.h"
#include "ColorPicker.properties.h"
#include "ColorPickerSlider.properties.h"
#include "ColorSpectrum.properties.h"
#include "ColumnMajorUniformToLargestGridLayout.properties.h"
#include "ComboBoxHelper.properties.h"
#include "CommandBarFlyoutCommandBar.properties.h"
#include "CommandBarFlyoutCommandBarAutomationProperties.properties.h"
#include "CommandBarFlyoutCommandBarTemplateSettings.properties.h"
#include "CornerRadiusFilterConverter.properties.h"
#include "CornerRadiusToThicknessConverter.properties.h"
#include "Expander.properties.h"
#include "FlowLayout.properties.h"
#include "ImageIcon.properties.h"
#include "ImageIconSource.properties.h"
#include "InfoBadge.properties.h"
#include "InfoBadgeTemplateSettings.properties.h"
#include "InfoBar.properties.h"
#include "InfoBarPanel.properties.h"
#include "InfoBarTemplateSettings.properties.h"
#include "InkCanvas.properties.h"
#include "ItemContainer.properties.h"
#include "ItemsRepeater.properties.h"
#include "ItemsView.properties.h"
#include "LayoutPanel.properties.h"
#include "LinedFlowLayout.properties.h"
#include "MapControl.properties.h"
#include "MapElementsLayer.properties.h"
#include "MapIcon.properties.h"
#include "MenuBar.properties.h"
#include "MenuBarItem.properties.h"
#include "MicaBackdrop.properties.h"
#include "MonochromaticOverlayPresenter.properties.h"
#include "NavigationView.properties.h"
#include "NavigationViewItem.properties.h"
#include "NavigationViewItemBase.properties.h"
#include "NavigationViewItemPresenter.properties.h"
#include "NavigationViewItemPresenterTemplateSettings.properties.h"
#include "NavigationViewTemplateSettings.properties.h"
#include "NumberBox.properties.h"
#include "PagerControl.properties.h"
#include "ParallaxView.properties.h"
#include "PersonPicture.properties.h"
#include "PipsPager.properties.h"
#include "ProgressBar.properties.h"
#include "ProgressBarTemplateSettings.properties.h"
#include "ProgressRing.properties.h"
#include "RadialGradientBrush.properties.h"
#include "RadioButtons.properties.h"
#include "RadioMenuFlyoutItem.properties.h"
#include "RatingControl.properties.h"
#include "RatingItemFontInfo.properties.h"
#include "RatingItemImageInfo.properties.h"
#include "RecyclePool.properties.h"
#include "RefreshContainer.properties.h"
#include "RefreshVisualizer.properties.h"
#include "RevealBrush.properties.h"
#include "ScrollPresenter.properties.h"
#include "ScrollView.properties.h"
#include "SelectorBar.properties.h"
#include "SelectorBarItem.properties.h"
#include "SplitButton.properties.h"
#include "StackLayout.properties.h"
#include "SwipeControl.properties.h"
#include "SwipeItem.properties.h"
#include "SwipeItems.properties.h"
#include "TabView.properties.h"
#include "TabViewItem.properties.h"
#include "TabViewItemTemplateSettings.properties.h"
#include "TeachingTip.properties.h"
#include "TeachingTipTemplateSettings.properties.h"
#include "TitleBar.properties.h"
#include "TitleBarTemplateSettings.properties.h"
#include "ToggleSplitButton.properties.h"
#include "TreeView.properties.h"
#include "TreeViewItem.properties.h"
#include "TreeViewItemTemplateSettings.properties.h"
#include "TreeViewNode.properties.h"
#include "TwoPaneView.properties.h"
#include "UniformGridLayout.properties.h"
#include "WebView2.properties.h"
#include "XamlControlsResources.properties.h"
#include "AutoSuggestBoxHelper.h"
#include "ComboBoxHelper.h"
#include "RecyclePool.h"
#include "RevealBrush.h"

Go to the source code of this file.

Classes

struct | Entry

Namespaces

namespace | anonymous_namespace{XamlMetadataProviderGenerated.h}

Functions

winrt::IInspectable | ActivateInstance (_In_ PCWSTR typeName)
template<typename Factory >
winrt::IInspectable | ActivateInstanceWithFactory (_In_ PCWSTR typeName)
void | ClearTypeProperties ()
template<typename Factory >
Factory | GetFactory (_In_ PCWSTR typeName)

Variables

hstring | c_knownNamespacePrefixes []
Entry | c_typeEntries []
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlType.cpp File Reference

  • File List
  • File Members
  • dll

XamlType.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlType.h"
#include "XamlMember.h"
#include "XamlMetadataProvider.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlType.h File Reference

  • File List
  • File Members
  • dll
Classes

XamlType.h File Reference

Go to the source code of this file.

Classes

class | EnumXamlType
class | NullableXamlType
class | PrimitiveXamlType
class | XamlType
class | XamlTypeBase
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButton.cpp File Reference

  • File List
  • File Members
  • DropDownButton

DropDownButton.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DropDownButton.h"
#include "DropDownButtonAutomationPeer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "DropDownButton.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButton.h File Reference

  • File List
  • File Members
  • DropDownButton
Classes

DropDownButton.h File Reference

#include "pch.h"
#include "common.h"
#include "DropDownButton.g.h"

Go to the source code of this file.

Classes

class DropDownButton
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButton.idl File Reference

  • File List
  • File Members
  • DropDownButton
Namespaces | Variables

DropDownButton.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | DropDownButton
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButtonAutomationPeer.cpp File Reference

  • File List
  • File Members
  • DropDownButton

DropDownButtonAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "DropDownButton.h"
#include "DropDownButtonAutomationPeer.h"
#include "Utils.h"
#include "DropDownButtonAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButtonAutomationPeer.h File Reference

  • File List
  • File Members
  • DropDownButton
Classes

DropDownButtonAutomationPeer.h File Reference

#include "DropDownButton.h"
#include "DropDownButtonAutomationPeer.g.h"

Go to the source code of this file.

Classes

class DropDownButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButtonAutomationPeer.idl File Reference

  • File List
  • File Members
  • DropDownButton
Namespaces | Variables

DropDownButtonAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | DropDownButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/InteractionTests/DropDownButtonTests.cs File Reference

  • File List
  • File Members
  • DropDownButton
  • InteractionTests
Classes | Namespaces

DropDownButtonTests.cs File Reference

Go to the source code of this file.

Classes

class | DropDownButton
class | DropDownButton::DropDownButtonFactory
class | DropDownButtonTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/TestUI/DropDownButtonPage.xaml.cs File Reference

  • File List
  • File Members
  • DropDownButton
  • TestUI
Classes | Namespaces

DropDownButtonPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | DropDownButtonPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Effects/microsoft.ui.private.composition.effects.idl File Reference

  • File List
  • File Members
  • Effects
Classes | Namespaces | Defines | Typedefs | Enumerations | Variables

microsoft.ui.private.composition.effects.idl File Reference

Go to the source code of this file.

Classes

interface | IAlphaMaskEffect
interface | IArithmeticCompositeEffect
interface | IBlendEffect
interface | IBorderEffect
interface | IColorMatrixEffect
interface | IColorSourceEffect
interface | ICompositeStepEffect
interface | IContrastEffect
interface | ICrossFadeEffect
interface | IDistantDiffuseEffect
interface | IDistantSpecularEffect
interface | IExposureEffect
interface | IGammaTransferEffect
interface | IGaussianBlurEffect
interface | IGrayscaleEffect
interface | IHueRotationEffect
interface | IInvertEffect
interface | ILinearTransferEffect
interface | ILuminanceToAlphaEffect
interface | IOpacityEffect
interface | IPointDiffuseEffect
interface | IPointSpecularEffect
interface | IPosterizeEffect
interface | IPremultiplyEffect
interface | ISaturationEffect
interface | ISepiaEffect
interface | ISpotDiffuseEffect
interface | ISpotSpecularEffect
interface | ITemperatureAndTintEffect
interface | ITintEffect
interface | ITransform2DEffect
interface | IUnPremultiplyEffect
struct | Matrix5x4

Namespaces

namespace | Microsoft::UI::Private::Composition::Effects

Defines

#define | EFFECT_ENUM_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \
#define | EFFECT_INTERFACE_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \
#define | EFFECT_RUNTIMECLASS_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \
#define | EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL [MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL] \
#define | EFFECT_STRUCT_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \
#define | MUXCONTROLS_VERSION_ATTRIBUTE version(MUXCONTROLS_VERSION_PARAM)
#define | MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL version(MUXCONTROLS_VERSION_PARAM)
#define | MUXCONTROLS_VERSION_PARAM 1.0

Typedefs

typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasAlphaMode 		CanvasAlphaMode
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasBlend 		CanvasBlend
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasComposite 		CanvasComposite
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasEdgeBehavior 		CanvasEdgeBehavior
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::CanvasImageInterpolation 		CanvasImageInterpolation
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::EffectBorderMode 		EffectBorderMode
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::EffectChannelSelect 		EffectChannelSelect
typedef EFFECT_ENUM_ATTRIBUTES
enum
Microsoft::UI::Private::Composition::Effects::EffectOptimization 		EffectOptimization
typedef
EFFECT_STRUCT_ATTRIBUTES
struct
Microsoft::UI::Private::Composition::Effects::Matrix5x4 		Matrix5x4

Enumerations

enum | CanvasAlphaMode { Premultiplied = (int)0, Straight = (int)1, Ignore = (int)2 }
enum | CanvasBlend { SourceOver = (int)0, Copy = (int)10, Min = (int)2, Add = (int)9 }
enum CanvasComposite {
SourceOver = (int)0, DestinationOver = (int)1, SourceIn = (int)2, DestinationIn = (int)3,
SourceOut = (int)4, DestinationOut = (int)5, SourceAtop = (int)6, DestinationAtop = (int)7,
Xor = (int)8, Add = (int)9, Copy = (int)10, BoundedCopy = (int)11,
MaskInvert = (int)12
}
enum | CanvasEdgeBehavior { Clamp = (int)0, Wrap = (int)1, Mirror = (int)2 }
enum CanvasImageInterpolation {
NearestNeighbor = (int)0, Linear = (int)1, Cubic = (int)2, MultiSampleLinear = (int)3,
Anisotropic = (int)4, HighQualityCubic = (int)5
}
enum | EffectBorderMode { Soft = 0, Hard = 1 }
enum | EffectChannelSelect { Red = 0, Green = 1, Blue = 2, Alpha = 3 }
enum | EffectOptimization { Speed = 0, Balanced = 1, Quality = 2 }

Variables

runtimeclass | AlphaMaskEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ArithmeticCompositeEffect
runtimeclass | BlendEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		BorderEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ColorMatrixEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ColorSourceEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		CompositeStepEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ContrastEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		CrossFadeEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		DistantDiffuseEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		DistantSpecularEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		ExposureEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		GammaTransferEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		GaussianBlurEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		GrayscaleEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		HueRotationEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		InvertEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		LinearTransferEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		LuminanceToAlphaEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		OpacityEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PointDiffuseEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PointSpecularEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PosterizeEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		PremultiplyEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SaturationEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SepiaEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SpotDiffuseEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		SpotSpecularEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		TemperatureAndTintEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		TintEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		Transform2DEffect
EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
runtimeclass 		UnPremultiplyEffect

Define Documentation

#define EFFECT_ENUM_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \

Definition at line 7 of file microsoft.ui.private.composition.effects.idl.

#define EFFECT_INTERFACE_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \

Definition at line 10 of file microsoft.ui.private.composition.effects.idl.

#define EFFECT_RUNTIMECLASS_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \

Definition at line 13 of file microsoft.ui.private.composition.effects.idl.

#define EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL [MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL] \

Definition at line 16 of file microsoft.ui.private.composition.effects.idl.

#define EFFECT_STRUCT_ATTRIBUTES [MUXCONTROLS_VERSION_ATTRIBUTE] \

Definition at line 19 of file microsoft.ui.private.composition.effects.idl.

#define MUXCONTROLS_VERSION_ATTRIBUTE version(MUXCONTROLS_VERSION_PARAM)

Definition at line 4 of file microsoft.ui.private.composition.effects.idl.

#define MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL version(MUXCONTROLS_VERSION_PARAM)

Definition at line 5 of file microsoft.ui.private.composition.effects.idl.

#define MUXCONTROLS_VERSION_PARAM 1.0

Definition at line 3 of file microsoft.ui.private.composition.effects.idl.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Effects/microsoft.ui.private.composition.effects_impl.h File Reference

  • File List
  • File Members
  • Effects
Classes | Namespaces | Defines | Typedefs | Enumerations | Functions

microsoft.ui.private.composition.effects_impl.h File Reference

#include <cstring>
#include <d2d1_1.h>
#include <d2d1effects_2.h>
#include <Windows.Graphics.Effects.h>
#include <winrt\Windows.Graphics.Effects.h>
#include "AlphaMaskEffect.g.h"
#include "ArithmeticCompositeEffect.g.h"
#include "BlendEffect.g.h"
#include "BorderEffect.g.h"
#include "ColorMatrixEffect.g.h"
#include "ColorSourceEffect.g.h"
#include "CompositeStepEffect.g.h"
#include "ContrastEffect.g.h"
#include "CrossFadeEffect.g.h"
#include "DistantDiffuseEffect.g.h"
#include "DistantSpecularEffect.g.h"
#include "ExposureEffect.g.h"
#include "GammaTransferEffect.g.h"
#include "GaussianBlurEffect.g.h"
#include "GrayscaleEffect.g.h"
#include "HueRotationEffect.g.h"
#include "InvertEffect.g.h"
#include "LinearTransferEffect.g.h"
#include "LuminanceToAlphaEffect.g.h"
#include "OpacityEffect.g.h"
#include "PointDiffuseEffect.g.h"
#include "PointSpecularEffect.g.h"
#include "PosterizeEffect.g.h"
#include "PremultiplyEffect.g.h"
#include "SaturationEffect.g.h"
#include "SepiaEffect.g.h"
#include "SpotDiffuseEffect.g.h"
#include "SpotSpecularEffect.g.h"
#include "TemperatureAndTintEffect.g.h"
#include "TintEffect.g.h"
#include "Transform2DEffect.g.h"
#include "UnPremultiplyEffect.g.h"

Go to the source code of this file.

Classes

class | AlphaMaskEffect
class | ArithmeticCompositeEffect
class | BlendEffect
class | BorderEffect
class | ColorMatrixEffect
class | ColorSourceEffect
class | CompositeStepEffect
class | ContrastEffect
class | CrossFadeEffect
class | DistantDiffuseEffect
class | DistantSpecularEffect
class | EffectBase
struct | EffectBase::NamedProperty
class | ExposureEffect
class | GammaTransferEffect
class | GaussianBlurEffect
class | GrayscaleEffect
class | HueRotationEffect
class | InvertEffect
class | LinearTransferEffect
class | LuminanceToAlphaEffect
class | OpacityEffect
class | PointDiffuseEffect
class | PointSpecularEffect
class | PosterizeEffect
class | PremultiplyEffect
class | SaturationEffect
class | SepiaEffect
class | SpotDiffuseEffect
class | SpotSpecularEffect
class | TemperatureAndTintEffect
class | TintEffect
class | Transform2DEffect
class | UnPremultiplyEffect

Namespaces

namespace | abi
namespace | Microsoft
namespace | Microsoft::UI
namespace | Microsoft::UI::Private
namespace | Microsoft::UI::Private::Composition
namespace | Microsoft::UI::Private::Composition::Effects

Defines

#define | DECLARE_D2D_GUID(Guid) IFACEMETHODIMP GetEffectId(_Out_ GUID * id) override { *id = Guid; return S_OK; }
#define | DECLARE_DUAL_SOURCES(Name1, Name2)
#define | DECLARE_NAMED_PROPERTY_MAPPING(...)
#define | DECLARE_POD_PROPERTY(Name, Type, InitialValue, Condition)
#define | DECLARE_SINGLE_SOURCE(Name)
#define | DECLARE_SOURCE(Name)

Typedefs

typedef enum
GRAPHICS_EFFECT_PROPERTY_MAPPING 		GRAPHICS_EFFECT_PROPERTY_MAPPING

Enumerations

enum GRAPHICS_EFFECT_PROPERTY_MAPPING {
GRAPHICS_EFFECT_PROPERTY_MAPPING_UNKNOWN, GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT, GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX, GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY,
GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ, GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW, GRAPHICS_EFFECT_PROPERTY_MAPPING_RECT_TO_VECTOR4, GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES,
GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE, GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3, GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4
}

Functions

DECLARE_INTERFACE_IID_ (IGraphicsEffectD2D1Interop, IUnknown,"2FC57384-A068-44D7-A331-30982FCF7177")
winrt::IPropertyValue & | to_winrt (abi::IPropertyValue *&instance)
winrt::IGraphicsEffectSource & | to_winrt (abi::IGraphicsEffectSource *&instance)

Define Documentation

#define DECLARE_D2D_GUID ( Guid ) IFACEMETHODIMP GetEffectId(_Out_ GUID * id) override { *id = Guid; return S_OK; }

Definition at line 221 of file microsoft.ui.private.composition.effects_impl.h.

#define DECLARE_DUAL_SOURCES | ( | Name1,
 |  | Name2
 | ) |
Value:
DECLARE_SOURCE(Name1) \
    DECLARE_SOURCE(Name2) \
    IFACEMETHODIMP GetSourceCount(_Out_ UINT * count) override { *count = 2; return S_OK; } \
    IFACEMETHODIMP GetSource(UINT index, _Outptr_ abi::IGraphicsEffectSource ** source) override try \
    { \
        if (index == 0) to_winrt(*source) = m_##Name1; \
        else if (index == 1) to_winrt(*source) = m_##Name2; \
        else throw winrt::hresult_invalid_argument(); \
        MUX_CATCH_RETURN; \
    }

Definition at line 258 of file microsoft.ui.private.composition.effects_impl.h.

#define DECLARE_NAMED_PROPERTY_MAPPING ( ... )
Value:
IFACEMETHODIMP GetNamedPropertyMapping(LPCWSTR name, _Out_ UINT * index, \
        _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING * mapping) override \
    { \
        static const NamedProperty s_Properties[] = { __VA_ARGS__ }; \
        return GetNamedPropertyMappingImpl(s_Properties, _countof(s_Properties), name, index, mapping); \
    }

Definition at line 272 of file microsoft.ui.private.composition.effects_impl.h.

#define DECLARE_POD_PROPERTY | ( | Name,
 |  | Type,
 |  | InitialValue,
 |  | Condition
 | ) |
Value:
private: \
    Type m_##Name = InitialValue; \
    public: \
    Type Name() { return m_##Name; } \
    void Name(Type const& value) \
    { \
        if (!(0, Condition)) { throw winrt::hresult_invalid_argument(); } \
        m_##Name = value; \
    }

Definition at line 226 of file microsoft.ui.private.composition.effects_impl.h.

#define DECLARE_SINGLE_SOURCE ( Name )
Value:
DECLARE_SOURCE(Name) \
    IFACEMETHODIMP GetSourceCount(_Out_ UINT * count) override { *count = 1; return S_OK; } \
    IFACEMETHODIMP GetSource(UINT index, _Outptr_ abi::IGraphicsEffectSource ** source) override try \
    { \
        if (index == 0) to_winrt(*source) = m_##Name; \
        else throw winrt::hresult_invalid_argument(); \
        MUX_CATCH_RETURN; \
    }

Definition at line 246 of file microsoft.ui.private.composition.effects_impl.h.

#define DECLARE_SOURCE ( Name )
Value:
winrt::IGraphicsEffectSource m_##Name; \
    winrt::IGraphicsEffectSource Name() { return m_##Name; } \
    void Name(winrt::IGraphicsEffectSource const& value) { m_##Name = value; }

Definition at line 239 of file microsoft.ui.private.composition.effects_impl.h.

Typedef Documentation

typedef enum GRAPHICS_EFFECT_PROPERTY_MAPPING GRAPHICS_EFFECT_PROPERTY_MAPPING

Enumeration Type Documentation

enum GRAPHICS_EFFECT_PROPERTY_MAPPING
Enumerator:
GRAPHICS_EFFECT_PROPERTY_MAPPING_UNKNOWN
GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT
GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX
GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY
GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ
GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW
GRAPHICS_EFFECT_PROPERTY_MAPPING_RECT_TO_VECTOR4
GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES
GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE
GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3
GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4

Definition at line 52 of file microsoft.ui.private.composition.effects_impl.h.

{
    GRAPHICS_EFFECT_PROPERTY_MAPPING_UNKNOWN,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_RECT_TO_VECTOR4,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3,
    GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4
} GRAPHICS_EFFECT_PROPERTY_MAPPING;

Function Documentation

DECLARE_INTERFACE_IID_ | ( | IGraphicsEffectD2D1Interop | ,
 |  | IUnknown | ,
 |  | "2FC57384-A068-44D7-A331-30982FCF7177" |
 | ) |  |

Definition at line 77 of file microsoft.ui.private.composition.effects_impl.h.

{
    STDMETHOD(GetEffectId)(
        _Out_ GUID * id
        ) PURE;

    STDMETHOD(GetNamedPropertyMapping)(
        LPCWSTR name,
        _Out_ UINT * index,
        _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING * mapping
        ) PURE;

    STDMETHOD(GetPropertyCount)(
        _Out_ UINT * count
        ) PURE;

    STDMETHOD(GetProperty)(
        UINT index,
        _Outptr_ abi::IPropertyValue ** value
        ) PURE;

    STDMETHOD(GetSource)(
        UINT index,
        _Outptr_ abi::IGraphicsEffectSource ** source
        ) PURE;

    STDMETHOD(GetSourceCount)(
        _Out_ UINT * count
        ) PURE;
};

winrt::IPropertyValue& to_winrt ( abi::IPropertyValue *& instance ) [inline]

Definition at line 113 of file microsoft.ui.private.composition.effects_impl.h.

{
    return reinterpret_cast<winrt::IPropertyValue&>(instance);
}

winrt::IGraphicsEffectSource& to_winrt ( abi::IGraphicsEffectSource *& instance ) [inline]

Definition at line 108 of file microsoft.ui.private.composition.effects_impl.h.

{
    return reinterpret_cast<winrt::IGraphicsEffectSource&>(instance);
}

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/Expander.cpp File Reference

  • File List
  • File Members
  • Expander

Expander.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Expander.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "ExpanderAutomationPeer.h"
#include "Utils.h"
#include "winnls.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/Expander.h File Reference

  • File List
  • File Members
  • Expander
Classes

Expander.h File Reference

#include "pch.h"
#include "common.h"
#include "ExpanderTemplateSettings.h"
#include "Expander.g.h"
#include "Expander.properties.h"

Go to the source code of this file.

Classes

class Expander
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/Expander.idl File Reference

  • File List
  • File Members
  • Expander
Namespaces | Enumerations | Variables

Expander.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | ExpandDirection { Down = 0, Up = 1 }

Variables

event Windows Foundation
TypedEventHandler< Expander,
ExpanderCollapsedEventArgs > 		Collapsed = 0
unsealed runtimeclass | Expander
runtimeclass | ExpanderTemplateSettings
event Windows Foundation
TypedEventHandler< Expander,
ExpanderExpandingEventArgs > 		Expanding
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderAutomationPeer.cpp File Reference

  • File List
  • File Members
  • Expander

ExpanderAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ExpanderAutomationPeer.h"
#include "Utils.h"
#include "ResourceAccessor.h"
#include <Vector.h>
#include "ExpanderAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderAutomationPeer.h File Reference

  • File List
  • File Members
  • Expander
Classes

ExpanderAutomationPeer.h File Reference

#include "Expander.h"
#include "ExpanderAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ExpanderAutomationPeer
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderAutomationPeer.idl File Reference

  • File List
  • File Members
  • Expander
Namespaces | Variables

ExpanderAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | ExpanderAutomationPeer
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderTemplateSettings.cpp File Reference

  • File List
  • File Members
  • Expander

ExpanderTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ExpanderTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderTemplateSettings.h File Reference

  • File List
  • File Members
  • Expander
Classes

ExpanderTemplateSettings.h File Reference

#include "ExpanderTemplateSettings.g.h"
#include "ExpanderTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class ExpanderTemplateSettings
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/APITests/ExpanderTests.cs File Reference

  • File List
  • File Members
  • Expander
  • APITests
Classes | Namespaces

ExpanderTests.cs File Reference

Go to the source code of this file.

Classes

class | ExpanderTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/InteractionTests/ExpanderTests.cs File Reference

  • File List
  • File Members
  • Expander
  • InteractionTests
Classes | Namespaces

ExpanderTests.cs File Reference

Go to the source code of this file.

Classes

class | Expander
class | Expander::ExpanderFactory
class | ExpanderTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/TestUI/ExpanderPage.xaml.cs File Reference

  • File List
  • File Members
  • Expander
  • TestUI
Classes | Namespaces

ExpanderPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ExpanderPage
class | TestControl
class | TestControlAutomationPeer

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AcrylicBrush.properties.cpp File Reference

  • File List
  • File Members
  • Generated

AcrylicBrush.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AcrylicBrush.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AcrylicBrush.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

AcrylicBrush.properties.h File Reference

Go to the source code of this file.

Classes

class AcrylicBrushProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AcrylicTestApi.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AcrylicTestApi.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AcrylicTestApi.h"
#include "AcrylicTestApi.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Media
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedAcceptVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedAcceptVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedAcceptVisualSource.h"
#include "AnimatedAcceptVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedBackVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedBackVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedBackVisualSource.h"
#include "AnimatedBackVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedChevronDownSmallVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedChevronDownSmallVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedChevronDownSmallVisualSource.h"
#include "AnimatedChevronDownSmallVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedChevronRightDownSmallVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedChevronRightDownSmallVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedChevronRightDownSmallVisualSource.h"
#include "AnimatedChevronRightDownSmallVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedChevronUpDownSmallVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedChevronUpDownSmallVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedChevronUpDownSmallVisualSource.h"
#include "AnimatedChevronUpDownSmallVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedFindVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedFindVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedFindVisualSource.h"
#include "AnimatedFindVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedGlobalNavigationButtonVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedGlobalNavigationButtonVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedGlobalNavigationButtonVisualSource.h"
#include "AnimatedGlobalNavigationButtonVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIcon.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedIcon.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedIcon.h"
#include "AnimatedIcon.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIcon.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

AnimatedIcon.properties.h File Reference

Go to the source code of this file.

Classes

class AnimatedIconProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIconSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedIconSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedIconSource.h"
#include "AnimatedIconSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIconSource.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

AnimatedIconSource.properties.h File Reference

Go to the source code of this file.

Classes

class AnimatedIconSourceProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIconTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedIconTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedIconTestHooks.h"
#include "AnimatedIconTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedSettingsVisualSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedSettingsVisualSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedSettingsVisualSource.h"
#include "AnimatedSettingsVisualSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedVisualPlayer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedVisualPlayer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedVisualPlayer.h"
#include "AnimatedVisualPlayer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedVisualPlayer.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

AnimatedVisualPlayer.properties.h File Reference

Go to the source code of this file.

Classes

class AnimatedVisualPlayerProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedVisualPlayerAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnimatedVisualPlayerAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedVisualPlayerAutomationPeer.h"
#include "AnimatedVisualPlayerAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnnotatedScrollBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnnotatedScrollBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnnotatedScrollBar.h"
#include "AnnotatedScrollBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnnotatedScrollBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

AnnotatedScrollBar.properties.h File Reference

Go to the source code of this file.

Classes

class AnnotatedScrollBarProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnnotatedScrollBarLabel.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AnnotatedScrollBarLabel.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnnotatedScrollBarLabel.h"
#include "AnnotatedScrollBarLabel.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AutoSuggestBoxHelper.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

AutoSuggestBoxHelper.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AutoSuggestBoxHelper.h"
#include "AutoSuggestBoxHelper.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AutoSuggestBoxHelper.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

AutoSuggestBoxHelper.properties.h File Reference

Go to the source code of this file.

Classes

class AutoSuggestBoxHelperProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/BreadcrumbBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

BreadcrumbBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbBar.h"
#include "BreadcrumbBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/BreadcrumbBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

BreadcrumbBar.properties.h File Reference

Go to the source code of this file.

Classes

class BreadcrumbBarProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/BreadcrumbBarItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

BreadcrumbBarItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbBarItem.h"
#include "BreadcrumbBarItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/BreadcrumbBarItemAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

BreadcrumbBarItemAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "BreadcrumbBarItemAutomationPeer.h"
#include "BreadcrumbBarItemAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ButtonInteraction.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ButtonInteraction.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ButtonInteraction.h"
#include "ButtonInteraction.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ButtonInteraction.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ButtonInteraction.properties.h File Reference

Go to the source code of this file.

Classes

class ButtonInteractionProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorPicker.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ColorPicker.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorPicker.h"
#include "ColorPicker.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorPicker.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ColorPicker.properties.h File Reference

Go to the source code of this file.

Classes

class ColorPickerProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorPickerSlider.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ColorPickerSlider.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorPickerSlider.h"
#include "ColorPickerSlider.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorPickerSlider.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ColorPickerSlider.properties.h File Reference

Go to the source code of this file.

Classes

class ColorPickerSliderProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorPickerSliderAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ColorPickerSliderAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorPickerSliderAutomationPeer.h"
#include "ColorPickerSliderAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorSpectrum.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ColorSpectrum.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorSpectrum.h"
#include "ColorSpectrum.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorSpectrum.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ColorSpectrum.properties.h File Reference

Go to the source code of this file.

Classes

class ColorSpectrumProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorSpectrumAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ColorSpectrumAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColorSpectrumAutomationPeer.h"
#include "ColorSpectrumAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColumnMajorUniformToLargestGridLayout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ColumnMajorUniformToLargestGridLayout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ColumnMajorUniformToLargestGridLayout.h"
#include "ColumnMajorUniformToLargestGridLayout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColumnMajorUniformToLargestGridLayout.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ColumnMajorUniformToLargestGridLayout.properties.h File Reference

Go to the source code of this file.

Classes

class ColumnMajorUniformToLargestGridLayoutProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ComboBoxHelper.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ComboBoxHelper.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ComboBoxHelper.h"
#include "ComboBoxHelper.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ComboBoxHelper.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ComboBoxHelper.properties.h File Reference

Go to the source code of this file.

Classes

class ComboBoxHelperProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

CommandBarFlyout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyout.h"
#include "CommandBarFlyout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

CommandBarFlyoutCommandBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyoutCommandBar.h"
#include "CommandBarFlyoutCommandBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

CommandBarFlyoutCommandBar.properties.h File Reference

Go to the source code of this file.

Classes

class CommandBarFlyoutCommandBarProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

CommandBarFlyoutCommandBarAutomationProperties.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyoutCommandBarAutomationProperties.h"
#include "CommandBarFlyoutCommandBarAutomationProperties.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

CommandBarFlyoutCommandBarAutomationProperties.properties.h File Reference

Go to the source code of this file.

Classes

class CommandBarFlyoutCommandBarAutomationPropertiesProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBarTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated

CommandBarFlyoutCommandBarTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CommandBarFlyoutCommandBarTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBarTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

CommandBarFlyoutCommandBarTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class CommandBarFlyoutCommandBarTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CornerRadiusFilterConverter.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

CornerRadiusFilterConverter.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CornerRadiusFilterConverter.h"
#include "CornerRadiusFilterConverter.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CornerRadiusFilterConverter.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

CornerRadiusFilterConverter.properties.h File Reference

Go to the source code of this file.

Classes

class CornerRadiusFilterConverterProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CornerRadiusToThicknessConverter.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

CornerRadiusToThicknessConverter.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "CornerRadiusToThicknessConverter.h"
#include "CornerRadiusToThicknessConverter.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CornerRadiusToThicknessConverter.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

CornerRadiusToThicknessConverter.properties.h File Reference

Go to the source code of this file.

Classes

class CornerRadiusToThicknessConverterProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/DesktopAcrylicBackdrop.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

DesktopAcrylicBackdrop.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DesktopAcrylicBackdrop.h"
#include "DesktopAcrylicBackdrop.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Media
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/DisplayRegionHelperTestApi.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

DisplayRegionHelperTestApi.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DisplayRegionHelperTestApi.h"
#include "DisplayRegionHelperTestApi.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/DropDownButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

DropDownButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DropDownButton.h"
#include "DropDownButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/DropDownButtonAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

DropDownButtonAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DropDownButtonAutomationPeer.h"
#include "DropDownButtonAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ElementFactory.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ElementFactory.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ElementFactory.h"
#include "ElementFactory.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/Expander.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

Expander.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Expander.h"
#include "Expander.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/Expander.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

Expander.properties.h File Reference

Go to the source code of this file.

Classes

class ExpanderProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ExpanderAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ExpanderAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ExpanderAutomationPeer.h"
#include "ExpanderAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ExpanderTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated

ExpanderTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ExpanderTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ExpanderTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ExpanderTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class ExpanderTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/FlowLayout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

FlowLayout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "FlowLayout.h"
#include "FlowLayout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/FlowLayout.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

FlowLayout.properties.h File Reference

Go to the source code of this file.

Classes

class FlowLayoutProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/FlowLayoutState.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

FlowLayoutState.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "FlowLayoutState.h"
#include "FlowLayoutState.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ImageIcon.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ImageIcon.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ImageIcon.h"
#include "ImageIcon.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ImageIcon.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ImageIcon.properties.h File Reference

Go to the source code of this file.

Classes

class ImageIconProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ImageIconSource.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ImageIconSource.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ImageIconSource.h"
#include "ImageIconSource.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ImageIconSource.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ImageIconSource.properties.h File Reference

Go to the source code of this file.

Classes

class ImageIconSourceProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/IndexPath.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

IndexPath.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "IndexPath.h"
#include "IndexPath.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBadge.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBadge.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBadge.h"
#include "InfoBadge.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBadge.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InfoBadge.properties.h File Reference

Go to the source code of this file.

Classes

class InfoBadgeProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBadgeTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBadgeTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBadgeTemplateSettings.h"
#include "InfoBadgeTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBadgeTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InfoBadgeTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class InfoBadgeTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBar.h"
#include "InfoBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InfoBar.properties.h File Reference

Go to the source code of this file.

Classes

class InfoBarProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBarAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarAutomationPeer.h"
#include "InfoBarAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarClosedEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBarClosedEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarClosedEventArgs.h"
#include "InfoBarClosedEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarClosingEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBarClosingEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarClosingEventArgs.h"
#include "InfoBarClosingEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarPanel.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBarPanel.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarPanel.h"
#include "InfoBarPanel.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarPanel.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InfoBarPanel.properties.h File Reference

Go to the source code of this file.

Classes

class InfoBarPanelProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InfoBarTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarTemplateSettings.h"
#include "InfoBarTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InfoBarTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class InfoBarTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkCanvas.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkCanvas.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkCanvas.h"
#include "InkCanvas.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkCanvas.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkCanvas.properties.h File Reference

Go to the source code of this file.

Classes

class InkCanvasProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkCanvasAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkCanvasAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkCanvasAutomationPeer.h"
#include "InkCanvasAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBar.h"
#include "InkToolBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBar.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarAutomationPeer.h"
#include "InkToolBarAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarBallpointPenButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarBallpointPenButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarBallpointPenButton.h"
#include "InkToolBarBallpointPenButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomPen.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarCustomPen.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomPen.h"
#include "InkToolBarCustomPen.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomPenButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarCustomPenButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomPenButton.h"
#include "InkToolBarCustomPenButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomPenButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarCustomPenButton.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarCustomPenButtonProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomToggleButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarCustomToggleButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomToggleButton.h"
#include "InkToolBarCustomToggleButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomToolButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarCustomToolButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomToolButton.h"
#include "InkToolBarCustomToolButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomToolButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarCustomToolButton.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarCustomToolButtonProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarEraserButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarEraserButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarEraserButton.h"
#include "InkToolBarEraserButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarEraserButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarEraserButton.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarEraserButtonProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarFlyoutItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarFlyoutItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarFlyoutItem.h"
#include "InkToolBarFlyoutItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarFlyoutItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarFlyoutItem.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarFlyoutItemProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarFlyoutItemAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarFlyoutItemAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarFlyoutItemAutomationPeer.h"
#include "InkToolBarFlyoutItemAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarHighlighterButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarHighlighterButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarHighlighterButton.h"
#include "InkToolBarHighlighterButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarMenuButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarMenuButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarMenuButton.h"
#include "InkToolBarMenuButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarMenuButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarMenuButton.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarMenuButtonProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarMenuButtonAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarMenuButtonAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarMenuButtonAutomationPeer.h"
#include "InkToolBarMenuButtonAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPenButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarPenButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarPenButton.h"
#include "InkToolBarPenButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPenButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarPenButton.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarPenButtonProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPencilButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarPencilButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarPencilButton.h"
#include "InkToolBarPencilButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPenConfigurationControl.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarPenConfigurationControl.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarPenConfigurationControl.h"
#include "InkToolBarPenConfigurationControl.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPenConfigurationControl.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarPenConfigurationControl.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarPenConfigurationControlProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarStencilButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarStencilButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarStencilButton.h"
#include "InkToolBarStencilButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarStencilButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarStencilButton.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarStencilButtonProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarToggleButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarToggleButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarToggleButton.h"
#include "InkToolBarToggleButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarToolButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarToolButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarToolButton.h"
#include "InkToolBarToolButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarToolButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

InkToolBarToolButton.properties.h File Reference

Go to the source code of this file.

Classes

class InkToolBarToolButtonProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarToolButtonAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

InkToolBarToolButtonAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarToolButtonAutomationPeer.h"
#include "InkToolBarToolButtonAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemCollectionTransitionProvider.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemCollectionTransitionProvider.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransitionProvider.h"
#include "ItemCollectionTransitionProvider.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemCollectionTransitionProvider.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ItemCollectionTransitionProvider.properties.h File Reference

Go to the source code of this file.

Classes

class ItemCollectionTransitionProviderProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemContainer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemContainer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemContainer.h"
#include "ItemContainer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemContainer.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ItemContainer.properties.h File Reference

Go to the source code of this file.

Classes

class ItemContainerProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemContainerAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemContainerAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemContainerAutomationPeer.h"
#include "ItemContainerAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsRepeater.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemsRepeater.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeater.h"
#include "ItemsRepeater.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsRepeater.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ItemsRepeater.properties.h File Reference

Go to the source code of this file.

Classes

class ItemsRepeaterProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsRepeaterScrollHost.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemsRepeaterScrollHost.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeaterScrollHost.h"
#include "ItemsRepeaterScrollHost.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsSourceView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemsSourceView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsSourceView.h"
#include "ItemsSourceView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsSourceView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ItemsSourceView.properties.h File Reference

Go to the source code of this file.

Classes

class ItemsSourceViewProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemsView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsView.h"
#include "ItemsView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ItemsView.properties.h File Reference

Go to the source code of this file.

Classes

class ItemsViewProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsViewAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemsViewAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsViewAutomationPeer.h"
#include "ItemsViewAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsViewTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ItemsViewTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsViewTestHooks.h"
#include "ItemsViewTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/Layout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

Layout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Layout.h"
#include "Layout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/Layout.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

Layout.properties.h File Reference

Go to the source code of this file.

Classes

class LayoutProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LayoutContext.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

LayoutContext.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LayoutContext.h"
#include "LayoutContext.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LayoutPanel.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

LayoutPanel.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LayoutPanel.h"
#include "LayoutPanel.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LayoutPanel.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

LayoutPanel.properties.h File Reference

Go to the source code of this file.

Classes

class LayoutPanelProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LayoutsTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

LayoutsTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LayoutsTestHooks.h"
#include "LayoutsTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LinedFlowLayout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

LinedFlowLayout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LinedFlowLayout.h"
#include "LinedFlowLayout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LinedFlowLayout.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

LinedFlowLayout.properties.h File Reference

Go to the source code of this file.

Classes

class LinedFlowLayoutProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LinedFlowLayoutItemCollectionTransitionProvider.h"
#include "LinedFlowLayoutItemCollectionTransitionProvider.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapControl.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MapControl.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapControl.h"
#include "MapControl.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapControl.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

MapControl.properties.h File Reference

Go to the source code of this file.

Classes

class MapControlProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapElement.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MapElement.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapElement.h"
#include "MapElement.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapElementClickEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MapElementClickEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapElementClickEventArgs.h"
#include "MapElementClickEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapElementsLayer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MapElementsLayer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapElementsLayer.h"
#include "MapElementsLayer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapElementsLayer.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

MapElementsLayer.properties.h File Reference

Go to the source code of this file.

Classes

class MapElementsLayerProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapIcon.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MapIcon.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapIcon.h"
#include "MapIcon.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapIcon.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

MapIcon.properties.h File Reference

Go to the source code of this file.

Classes

class MapIconProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapLayer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MapLayer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapLayer.h"
#include "MapLayer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MaterialHelperTestApi.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MaterialHelperTestApi.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MaterialHelperTestApi.h"
#include "MaterialHelperTestApi.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Media
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MenuBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBar.h"
#include "MenuBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

MenuBar.properties.h File Reference

Go to the source code of this file.

Classes

class MenuBarProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MenuBarAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBarAutomationPeer.h"
#include "MenuBarAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MenuBarItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBarItem.h"
#include "MenuBarItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

MenuBarItem.properties.h File Reference

Go to the source code of this file.

Classes

class MenuBarItemProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItemAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MenuBarItemAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBarItemAutomationPeer.h"
#include "MenuBarItemAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItemFlyout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MenuBarItemFlyout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBarItemFlyout.h"
#include "MenuBarItemFlyout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MicaBackdrop.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MicaBackdrop.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MicaBackdrop.h"
#include "MicaBackdrop.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Media
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MicaBackdrop.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

MicaBackdrop.properties.h File Reference

Go to the source code of this file.

Classes

class MicaBackdropProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MonochromaticOverlayPresenter.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MonochromaticOverlayPresenter.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MonochromaticOverlayPresenter.h"
#include "MonochromaticOverlayPresenter.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MonochromaticOverlayPresenter.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

MonochromaticOverlayPresenter.properties.h File Reference

Go to the source code of this file.

Classes

class MonochromaticOverlayPresenterProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MUXControlsTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

MUXControlsTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MUXControlsTestHooks.h"
#include "MUXControlsTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationView.h"
#include "NavigationView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

NavigationView.properties.h File Reference

Go to the source code of this file.

Classes

class NavigationViewProperties
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewAutomationPeer.h"
#include "NavigationViewAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItem.h"
#include "NavigationViewItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

NavigationViewItem.properties.h File Reference

Go to the source code of this file.

Classes

class NavigationViewItemProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItemAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemAutomationPeer.h"
#include "NavigationViewItemAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemBase.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItemBase.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemBase.h"
#include "NavigationViewItemBase.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemBase.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

NavigationViewItemBase.properties.h File Reference

Go to the source code of this file.

Classes

class NavigationViewItemBaseProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemHeader.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItemHeader.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemHeader.h"
#include "NavigationViewItemHeader.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemInvokedEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItemInvokedEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemInvokedEventArgs.h"
#include "NavigationViewItemInvokedEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemPresenter.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItemPresenter.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemPresenter.h"
#include "NavigationViewItemPresenter.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemPresenter.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

NavigationViewItemPresenter.properties.h File Reference

Go to the source code of this file.

Classes

class NavigationViewItemPresenterProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemPresenterTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItemPresenterTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemPresenterTemplateSettings.h"
#include "NavigationViewItemPresenterTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemPresenterTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

NavigationViewItemPresenterTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class NavigationViewItemPresenterTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemSeparator.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewItemSeparator.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemSeparator.h"
#include "NavigationViewItemSeparator.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NavigationViewTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewTemplateSettings.h"
#include "NavigationViewTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

NavigationViewTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class NavigationViewTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NonVirtualizingLayout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NonVirtualizingLayout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NonVirtualizingLayout.h"
#include "NonVirtualizingLayout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NonVirtualizingLayoutContext.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NonVirtualizingLayoutContext.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NonVirtualizingLayoutContext.h"
#include "NonVirtualizingLayoutContext.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NumberBox.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NumberBox.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NumberBox.h"
#include "NumberBox.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NumberBox.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

NumberBox.properties.h File Reference

Go to the source code of this file.

Classes

class NumberBoxProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NumberBoxAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

NumberBoxAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NumberBoxAutomationPeer.h"
#include "NumberBoxAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControl.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PagerControl.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PagerControl.h"
#include "PagerControl.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControl.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

PagerControl.properties.h File Reference

Go to the source code of this file.

Classes

class PagerControlProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControlAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PagerControlAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PagerControlAutomationPeer.h"
#include "PagerControlAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControlTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PagerControlTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PagerControlTemplateSettings.h"
#include "PagerControlTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControlTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

PagerControlTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class PagerControlTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ParallaxView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ParallaxView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ParallaxView.h"
#include "ParallaxView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ParallaxView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ParallaxView.properties.h File Reference

Go to the source code of this file.

Classes

class ParallaxViewProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPicture.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PersonPicture.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PersonPicture.h"
#include "PersonPicture.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPicture.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

PersonPicture.properties.h File Reference

Go to the source code of this file.

Classes

class PersonPictureProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPictureAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PersonPictureAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PersonPictureAutomationPeer.h"
#include "PersonPictureAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPictureTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated

PersonPictureTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PersonPictureTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPictureTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

PersonPictureTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class PersonPictureTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPager.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PipsPager.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PipsPager.h"
#include "PipsPager.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPager.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

PipsPager.properties.h File Reference

Go to the source code of this file.

Classes

class PipsPagerProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPagerAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PipsPagerAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PipsPagerAutomationPeer.h"
#include "PipsPagerAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPagerTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated

PipsPagerTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PipsPagerTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPagerTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

PipsPagerTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class PipsPagerTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ProgressBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressBar.h"
#include "ProgressBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ProgressBar.properties.h File Reference

Go to the source code of this file.

Classes

class ProgressBarProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBarAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ProgressBarAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressBarAutomationPeer.h"
#include "ProgressBarAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBarTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated

ProgressBarTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressBarTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBarTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ProgressBarTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class ProgressBarTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRing.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ProgressRing.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressRing.h"
#include "ProgressRing.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRing.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ProgressRing.properties.h File Reference

Go to the source code of this file.

Classes

class ProgressRingProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRingAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ProgressRingAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressRingAutomationPeer.h"
#include "ProgressRingAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRingTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated

ProgressRingTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressRingTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRingTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ProgressRingTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class ProgressRingTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PullToRefreshHelperTestApi.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

PullToRefreshHelperTestApi.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PullToRefreshHelperTestApi.h"
#include "PullToRefreshHelperTestApi.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadialGradientBrush.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RadialGradientBrush.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadialGradientBrush.h"
#include "RadialGradientBrush.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadialGradientBrush.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RadialGradientBrush.properties.h File Reference

Go to the source code of this file.

Classes

class RadialGradientBrushProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioButtons.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RadioButtons.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadioButtons.h"
#include "RadioButtons.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioButtons.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RadioButtons.properties.h File Reference

Go to the source code of this file.

Classes

class RadioButtonsProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioButtonsAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RadioButtonsAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadioButtonsAutomationPeer.h"
#include "RadioButtonsAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioButtonsTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RadioButtonsTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadioButtonsTestHooks.h"
#include "RadioButtonsTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioMenuFlyoutItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RadioMenuFlyoutItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadioMenuFlyoutItem.h"
#include "RadioMenuFlyoutItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioMenuFlyoutItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RadioMenuFlyoutItem.properties.h File Reference

Go to the source code of this file.

Classes

class RadioMenuFlyoutItemProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingControl.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RatingControl.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RatingControl.h"
#include "RatingControl.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingControl.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RatingControl.properties.h File Reference

Go to the source code of this file.

Classes

class RatingControlProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingControlAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RatingControlAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RatingControlAutomationPeer.h"
#include "RatingControlAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemFontInfo.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RatingItemFontInfo.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RatingItemFontInfo.h"
#include "RatingItemFontInfo.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemFontInfo.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RatingItemFontInfo.properties.h File Reference

Go to the source code of this file.

Classes

class RatingItemFontInfoProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemImageInfo.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RatingItemImageInfo.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RatingItemImageInfo.h"
#include "RatingItemImageInfo.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemImageInfo.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RatingItemImageInfo.properties.h File Reference

Go to the source code of this file.

Classes

class RatingItemImageInfoProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemInfo.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RatingItemInfo.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RatingItemInfo.h"
#include "RatingItemInfo.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RecyclePool.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RecyclePool.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RecyclePool.h"
#include "RecyclePool.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RecyclePool.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RecyclePool.properties.h File Reference

Go to the source code of this file.

Classes

class RecyclePoolProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RecyclingElementFactory.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RecyclingElementFactory.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RecyclingElementFactory.h"
#include "RecyclingElementFactory.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RecyclingElementFactory.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RecyclingElementFactory.properties.h File Reference

Go to the source code of this file.

Classes

class RecyclingElementFactoryProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RefreshContainer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RefreshContainer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshContainer.h"
#include "RefreshContainer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RefreshContainer.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RefreshContainer.properties.h File Reference

Go to the source code of this file.

Classes

class RefreshContainerProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RefreshVisualizer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RefreshVisualizer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshVisualizer.h"
#include "RefreshVisualizer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RefreshVisualizer.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RefreshVisualizer.properties.h File Reference

Go to the source code of this file.

Classes

class RefreshVisualizerProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RepeatedScrollSnapPoint.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RepeatedScrollSnapPoint.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RepeatedScrollSnapPoint.h"
#include "RepeatedScrollSnapPoint.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RepeatedZoomSnapPoint.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RepeatedZoomSnapPoint.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RepeatedZoomSnapPoint.h"
#include "RepeatedZoomSnapPoint.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RepeaterAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RepeaterAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RepeaterAutomationPeer.h"
#include "RepeaterAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RepeaterTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RepeaterTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RepeaterTestHooks.h"
#include "RepeaterTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBackgroundBrush.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealBackgroundBrush.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBackgroundBrush.h"
#include "RevealBackgroundBrush.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBorderBrush.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealBorderBrush.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBorderBrush.h"
#include "RevealBorderBrush.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBorderLight.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealBorderLight.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBorderLight.h"
#include "RevealBorderLight.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBrush.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealBrush.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBrush.h"
#include "RevealBrush.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBrush.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

RevealBrush.properties.h File Reference

Go to the source code of this file.

Classes

class RevealBrushProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBrushTestApi.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealBrushTestApi.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBrushTestApi.h"
#include "RevealBrushTestApi.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealHoverLight.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealHoverLight.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealHoverLight.h"
#include "RevealHoverLight.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealListViewItemPresenter.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealListViewItemPresenter.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealListViewItemPresenter.h"
#include "RevealListViewItemPresenter.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealTestApi.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

RevealTestApi.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealTestApi.h"
#include "RevealTestApi.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Media
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerAddScrollVelocityRequestedEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollControllerAddScrollVelocityRequestedEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollControllerAddScrollVelocityRequestedEventArgs.h"
#include "ScrollControllerAddScrollVelocityRequestedEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerPanRequestedEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollControllerPanRequestedEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollControllerPanRequestedEventArgs.h"
#include "ScrollControllerPanRequestedEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerScrollByRequestedEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollControllerScrollByRequestedEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollControllerScrollByRequestedEventArgs.h"
#include "ScrollControllerScrollByRequestedEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerScrollToRequestedEventArgs.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollControllerScrollToRequestedEventArgs.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollControllerScrollToRequestedEventArgs.h"
#include "ScrollControllerScrollToRequestedEventArgs.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollingScrollOptions.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollingScrollOptions.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollingScrollOptions.h"
#include "ScrollingScrollOptions.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollingZoomOptions.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollingZoomOptions.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollingZoomOptions.h"
#include "ScrollingZoomOptions.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollPresenter.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollPresenter.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenter.h"
#include "ScrollPresenter.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollPresenter.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ScrollPresenter.properties.h File Reference

Go to the source code of this file.

Classes

class ScrollPresenterProperties
Generated on Sun Dec 1 2024 20:52:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollPresenterAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollPresenterAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterAutomationPeer.h"
#include "ScrollPresenterAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollPresenterTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollPresenterTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterTestHooks.h"
#include "ScrollPresenterTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollSnapPoint.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollSnapPoint.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollSnapPoint.h"
#include "ScrollSnapPoint.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollSnapPointBase.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollSnapPointBase.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollSnapPointBase.h"
#include "ScrollSnapPointBase.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollView.h"
#include "ScrollView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ScrollView.properties.h File Reference

Go to the source code of this file.

Classes

class ScrollViewProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollViewerIRefreshInfoProviderAdapter.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollViewerIRefreshInfoProviderAdapter.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollViewTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ScrollViewTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollViewTestHooks.h"
#include "ScrollViewTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectionModel.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SelectionModel.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectionModel.h"
#include "SelectionModel.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectionModel.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SelectionModel.properties.h File Reference

Go to the source code of this file.

Classes

class SelectionModelProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SelectorBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBar.h"
#include "SelectorBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SelectorBar.properties.h File Reference

Go to the source code of this file.

Classes

class SelectorBarProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBarItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SelectorBarItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarItem.h"
#include "SelectorBarItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBarItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SelectorBarItem.properties.h File Reference

Go to the source code of this file.

Classes

class SelectorBarItemProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBarItemAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SelectorBarItemAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarItemAutomationPeer.h"
#include "SelectorBarItemAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBarTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SelectorBarTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarTestHooks.h"
#include "SelectorBarTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SliderInteraction.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SliderInteraction.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SliderInteraction.h"
#include "SliderInteraction.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SliderInteraction.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SliderInteraction.properties.h File Reference

Go to the source code of this file.

Classes

class SliderInteractionProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SnapPointBase.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SnapPointBase.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SnapPointBase.h"
#include "SnapPointBase.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SpectrumBrush.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SpectrumBrush.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SpectrumBrush.h"
#include "SpectrumBrush.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SpectrumBrush.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SpectrumBrush.properties.h File Reference

Go to the source code of this file.

Classes

class SpectrumBrushProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SplitButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SplitButton.h"
#include "SplitButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SplitButton.properties.h File Reference

Go to the source code of this file.

Classes

class SplitButtonProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButtonAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SplitButtonAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SplitButtonAutomationPeer.h"
#include "SplitButtonAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButtonTestApi.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SplitButtonTestApi.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SplitButtonTestApi.h"
#include "SplitButtonTestApi.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/StackLayout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

StackLayout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "StackLayout.h"
#include "StackLayout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/StackLayout.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

StackLayout.properties.h File Reference

Go to the source code of this file.

Classes

class StackLayoutProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/StackLayoutState.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

StackLayoutState.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "StackLayoutState.h"
#include "StackLayoutState.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeControl.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SwipeControl.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeControl.h"
#include "SwipeControl.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeControl.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SwipeControl.properties.h File Reference

Go to the source code of this file.

Classes

class SwipeControlProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SwipeItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeItem.h"
#include "SwipeItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SwipeItem.properties.h File Reference

Go to the source code of this file.

Classes

class SwipeItemProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeItems.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SwipeItems.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeItems.h"
#include "SwipeItems.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeItems.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

SwipeItems.properties.h File Reference

Go to the source code of this file.

Classes

class SwipeItemsProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

SwipeTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeTestHooks.h"
#include "SwipeTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TabView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabView.h"
#include "TabView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TabView.properties.h File Reference

Go to the source code of this file.

Classes

class TabViewProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TabViewAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabViewAutomationPeer.h"
#include "TabViewAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TabViewItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabViewItem.h"
#include "TabViewItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TabViewItem.properties.h File Reference

Go to the source code of this file.

Classes

class TabViewItemProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItemAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TabViewItemAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabViewItemAutomationPeer.h"
#include "TabViewItemAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItemTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TabViewItemTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabViewItemTemplateSettings.h"
#include "TabViewItemTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItemTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TabViewItemTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class TabViewItemTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewListView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TabViewListView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabViewListView.h"
#include "TabViewListView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTip.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TeachingTip.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTip.h"
#include "TeachingTip.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTip.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TeachingTip.properties.h File Reference

Go to the source code of this file.

Classes

class TeachingTipProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTipAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TeachingTipAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipAutomationPeer.h"
#include "TeachingTipAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTipTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TeachingTipTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipTemplateSettings.h"
#include "TeachingTipTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTipTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TeachingTipTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class TeachingTipTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTipTestHooks.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TeachingTipTestHooks.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipTestHooks.h"
#include "TeachingTipTestHooks.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TextCommandBarFlyout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TextCommandBarFlyout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TextCommandBarFlyout.h"
#include "TextCommandBarFlyout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBar.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TitleBar.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TitleBar.h"
#include "TitleBar.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBar.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TitleBar.properties.h File Reference

Go to the source code of this file.

Classes

class TitleBarProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBarAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TitleBarAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TitleBarAutomationPeer.h"
#include "TitleBarAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBarTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TitleBarTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TitleBarTemplateSettings.h"
#include "TitleBarTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBarTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TitleBarTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class TitleBarTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ToggleSplitButton.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ToggleSplitButton.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ToggleSplitButton.h"
#include "ToggleSplitButton.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ToggleSplitButton.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

ToggleSplitButton.properties.h File Reference

Go to the source code of this file.

Classes

class ToggleSplitButtonProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ToggleSplitButtonAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ToggleSplitButtonAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ToggleSplitButtonAutomationPeer.h"
#include "ToggleSplitButtonAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeView.h"
#include "TreeView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TreeView.properties.h File Reference

Go to the source code of this file.

Classes

class TreeViewProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItem.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeViewItem.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewItem.h"
#include "TreeViewItem.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItem.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TreeViewItem.properties.h File Reference

Go to the source code of this file.

Classes

class TreeViewItemProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItemAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeViewItemAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewItemAutomationPeer.h"
#include "TreeViewItemAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItemDataAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeViewItemDataAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewItemDataAutomationPeer.h"
#include "TreeViewItemDataAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItemTemplateSettings.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeViewItemTemplateSettings.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewItemTemplateSettings.h"
#include "TreeViewItemTemplateSettings.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItemTemplateSettings.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TreeViewItemTemplateSettings.properties.h File Reference

Go to the source code of this file.

Classes

class TreeViewItemTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewList.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeViewList.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewList.h"
#include "TreeViewList.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewListAutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeViewListAutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewListAutomationPeer.h"
#include "TreeViewListAutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewNode.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TreeViewNode.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewNode.h"
#include "TreeViewNode.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewNode.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TreeViewNode.properties.h File Reference

Go to the source code of this file.

Classes

class TreeViewNodeProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TwoPaneView.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

TwoPaneView.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TwoPaneView.h"
#include "TwoPaneView.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TwoPaneView.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

TwoPaneView.properties.h File Reference

Go to the source code of this file.

Classes

class TwoPaneViewProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/UniformGridLayout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

UniformGridLayout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "UniformGridLayout.h"
#include "UniformGridLayout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/UniformGridLayout.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

UniformGridLayout.properties.h File Reference

Go to the source code of this file.

Classes

class UniformGridLayoutProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/UniformGridLayoutState.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

UniformGridLayoutState.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "UniformGridLayoutState.h"
#include "UniformGridLayoutState.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/VirtualizingLayout.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

VirtualizingLayout.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "VirtualizingLayout.h"
#include "VirtualizingLayout.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/VirtualizingLayoutContext.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

VirtualizingLayoutContext.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "VirtualizingLayoutContext.h"
#include "VirtualizingLayoutContext.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/WebView2.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

WebView2.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "..\WebView2\WebView2.h"
#include "WebView2.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/WebView2.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

WebView2.properties.h File Reference

Go to the source code of this file.

Classes

class WebView2Properties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/WebView2AutomationPeer.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

WebView2AutomationPeer.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "WebView2AutomationPeer.h"
#include "WebView2AutomationPeer.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Automation::Peers
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/XamlAmbientLight.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

XamlAmbientLight.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlAmbientLight.h"
#include "XamlAmbientLight.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Private::Media
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/XamlAmbientLight.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

XamlAmbientLight.properties.h File Reference

Go to the source code of this file.

Classes

class XamlAmbientLightProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/XamlControlsResources.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

XamlControlsResources.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlControlsResources.h"
#include "XamlControlsResources.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/XamlControlsResources.properties.h File Reference

  • File List
  • File Members
  • Generated
Classes

XamlControlsResources.properties.h File Reference

Go to the source code of this file.

Classes

class XamlControlsResourcesProperties
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/XamlControlsXamlMetaDataProvider.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

XamlControlsXamlMetaDataProvider.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlControlsXamlMetaDataProvider.h"
#include "XamlControlsXamlMetaDataProvider.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::XamlTypeInfo
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ZoomSnapPoint.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ZoomSnapPoint.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ZoomSnapPoint.h"
#include "ZoomSnapPoint.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ZoomSnapPointBase.properties.cpp File Reference

  • File List
  • File Members
  • Generated
Namespaces

ZoomSnapPointBase.properties.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ZoomSnapPointBase.h"
#include "ZoomSnapPointBase.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/AnimatedIconSource.cpp File Reference

  • File List
  • File Members
  • IconSource

AnimatedIconSource.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedIconSource.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/AnimatedIconSource.h File Reference

  • File List
  • File Members
  • IconSource
Classes

AnimatedIconSource.h File Reference

#include "AnimatedIconSource.g.h"
#include "AnimatedIconSource.properties.h"

Go to the source code of this file.

Classes

class AnimatedIconSource
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/IconSource.idl File Reference

  • File List
  • File Members
  • IconSource
Namespaces | Variables

IconSource.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | AnimatedIconSource
unsealed runtimeclass | ImageIconSource
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/ImageIconSource.cpp File Reference

  • File List
  • File Members
  • IconSource

ImageIconSource.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ImageIconSource.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/ImageIconSource.h File Reference

  • File List
  • File Members
  • IconSource
Classes

ImageIconSource.h File Reference

#include "ImageIconSource.g.h"
#include "ImageIconSource.properties.h"

Go to the source code of this file.

Classes

class ImageIconSource
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/APITests/IconSourceApiTests.cs File Reference

  • File List
  • File Members
  • IconSource
  • APITests
Classes | Namespaces

IconSourceApiTests.cs File Reference

Go to the source code of this file.

Classes

class | IconSourceApiTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/ImageIcon.cpp File Reference

  • File List
  • File Members
  • ImageIcon

ImageIcon.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ImageIcon.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/ImageIcon.h File Reference

  • File List
  • File Members
  • ImageIcon
Classes

ImageIcon.h File Reference

#include "pch.h"
#include "common.h"
#include "ImageIcon.g.h"
#include "ImageIcon.properties.h"

Go to the source code of this file.

Classes

class ImageIcon
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/ImageIcon.idl File Reference

  • File List
  • File Members
  • ImageIcon
Namespaces | Variables

ImageIcon.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | ImageIcon
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/APITests/ImageIconTests.cs File Reference

  • File List
  • File Members
  • ImageIcon
  • APITests
Classes | Namespaces

ImageIconTests.cs File Reference

Go to the source code of this file.

Classes

class | ImageIconTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/InteractionTests/ImageIconTests.cs File Reference

  • File List
  • File Members
  • ImageIcon
  • InteractionTests
Classes | Namespaces

ImageIconTests.cs File Reference

Go to the source code of this file.

Classes

class | ImageIconTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/TestUI/ImageIconPage.xaml.cs File Reference

  • File List
  • File Members
  • ImageIcon
  • TestUI
Classes | Namespaces

ImageIconPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ImageIconPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/AutoHandle.h File Reference

  • File List
  • File Members
  • inc
Classes | Namespaces | Defines | Functions

AutoHandle.h File Reference

Go to the source code of this file.

Classes

class | AutoHandle< THandlePolicy >
class | HandlePolicy

Namespaces

namespace | MUXControls
namespace | MUXControls::Common

Defines

#define | DECLARE_AUTOHANDLE_CLASS(className, handlePolicy) typedef MUXControls::Common::AutoHandle<handlePolicy> className; \

Functions

DECLARE_AUTOHANDLE_CLASS (Handle, HandlePolicy)

Define Documentation

#define DECLARE_AUTOHANDLE_CLASS | ( | className,
 |  | handlePolicy |
 | ) |  | typedef MUXControls::Common::AutoHandle<handlePolicy> className; \

Definition at line 7 of file AutoHandle.h.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/BoxHelpers.h File Reference

  • File List
  • File Members
  • inc
Classes

BoxHelpers.h File Reference

#include "CppWinRTHelpers.h"

Go to the source code of this file.

Classes

struct auto_unbox
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/BuildMacros.h File Reference

  • File List
  • File Members
  • inc
Defines

BuildMacros.h File Reference

Go to the source code of this file.

Defines

#define | MUXCONTROLS_NAMESPACE Microsoft::UI::Xaml::Controls
#define | MUXCONTROLSMEDIA_NAMESPACE_STR L"Microsoft.UI.Xaml.Media"
#define | MUXCONTROLSROOT_NAMESPACE_STR L"Microsoft.UI.Xaml"
#define | WINRT_MUXC_NAMESPACE winrt::Microsoft::UI::Xaml::Controls
#define | WINRT_MUXM_NAMESPACE winrt::Microsoft::UI::Xaml::Media

Define Documentation

#define MUXCONTROLS_NAMESPACE Microsoft::UI::Xaml::Controls

Definition at line 6 of file BuildMacros.h.

#define MUXCONTROLSMEDIA_NAMESPACE_STR L"Microsoft.UI.Xaml.Media"

Definition at line 12 of file BuildMacros.h.

#define MUXCONTROLSROOT_NAMESPACE_STR L"Microsoft.UI.Xaml"

Definition at line 11 of file BuildMacros.h.

#define WINRT_MUXC_NAMESPACE winrt::Microsoft::UI::Xaml::Controls

Definition at line 7 of file BuildMacros.h.

#define WINRT_MUXM_NAMESPACE winrt::Microsoft::UI::Xaml::Media

Definition at line 8 of file BuildMacros.h.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/CastHelpers.h File Reference

  • File List
  • File Members
  • inc
Classes

CastHelpers.h File Reference

Go to the source code of this file.

Classes

struct auto_cast
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/CollectionHelper.h File Reference

  • File List
  • File Members
  • inc
Namespaces | Functions

CollectionHelper.h File Reference

Go to the source code of this file.

Namespaces

namespace | CollectionHelper

Functions

template<class C , class T >
bool | contains (const C &c, const T &v)
template<class C , class T >
void | remove (C &c, const T &v)
template<class C , class T >
void | unique_push_back (C &c, T &v)
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/CommandingHelpers.h File Reference

  • File List
  • File Members
  • inc
Classes | Namespaces | Functions

CommandingHelpers.h File Reference

Go to the source code of this file.

Classes

class | IconSourceToIconSourceElementConverter

Namespaces

namespace | CommandingHelpers

Functions

void | BindToAccessKeyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::UIElement const &target)
void | BindToDescriptionPropertiesIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target)
void | BindToIconPropertyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target, winrt::DependencyProperty const &iconProperty)
void | BindToIconSourcePropertyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target, winrt::DependencyProperty const &iconSourceProperty)
void | BindToKeyboardAcceleratorsIfUnset (winrt::XamlUICommand const &uiCommand, winrt::UIElement const &target)
void | BindToLabelPropertyIfUnset (winrt::XamlUICommand const &uiCommand, winrt::DependencyObject const &target, winrt::DependencyProperty const &labelProperty)
void | ClearBindingIfSet (winrt::XamlUICommand const &uiCommand, winrt::FrameworkElement const &target, winrt::DependencyProperty const &targetProperty)
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/common.h File Reference

  • File List
  • File Members
  • inc

common.h File Reference

#include "ErrorHandling.h"
#include "CppWinRTHelpers.h"
#include "RuntimeClassHelpers.h"
#include "SharedHelpers.h"
#include "BoxHelpers.h"
#include "CastHelpers.h"
#include "event.h"
#include "AutoHandle.h"
#include "GlobalDependencyProperty.h"
#include "CollectionHelper.h"
#include "RoutedEventHelpers.h"
#include "MUXControlsFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/CppWinRTHelpers.h File Reference

  • File List
  • File Members
  • inc
Classes | Namespaces | Functions

CppWinRTHelpers.h File Reference

Go to the source code of this file.

Classes

struct | Awaitable
struct | Awaitable::PTP_WAIT_traits
struct | PropertyChanged_revoker
struct | ScopedBatchCompleted_revoker
struct | ValueHelper< T, Enable >
struct | ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > >
struct | ValueHelper< winrt::hstring, void >
struct | XamlRootChanged_revoker

Namespaces

namespace | winrt

Functions

template<typename D , typename T , typename... I>
struct | __declspec (empty_bases) DeriveFromPanelHelper_base
template<typename WinRTReturn >
WinRTReturn | GetTemplateChildT (std::wstring_view const &childName, const winrt::IControlProtected &controlProtected)
template<typename T >
hstring | hstring_name_of () noexcept
winrt::DependencyProperty | InitializeDependencyProperty (wstring_view const &propertyNameString, wstring_view const &propertyTypeNameString, wstring_view const &ownerTypeNameString, bool isAttached, winrt::IInspectable const &defaultValue, winrt::PropertyChangedCallback const &propertyChangedCallback=nullptr)
PropertyChanged_revoker | RegisterPropertyChanged (winrt::DependencyObject const &object, winrt::DependencyProperty const &dp, winrt::DependencyPropertyChangedCallback const &callback)
ScopedBatchCompleted_revoker | RegisterScopedBatchCompleted (winrt::CompositionScopedBatch const &object, winrt::TypedEventHandler< winrt::IInspectable, winrt::CompositionBatchCompletedEventArgs > const &handler)
XamlRootChanged_revoker | RegisterXamlRootChanged (winrt::XamlRoot const &object, winrt::TypedEventHandler< winrt::XamlRoot, winrt::XamlRootChangedEventArgs > const &handler)
template<typename TThis >
void | SetDefaultStyleKey (TThis *pThis)
void | SetDefaultStyleKeyWorker (winrt::IControlProtected const &controlProtected, std::wstring_view const &className)
bool | SetFocus (winrt::DependencyObject const &object, winrt::FocusState focusState)
winrt::IInspectable & | to_winrt (::IInspectable *&instance)

Function Documentation

struct __declspec ( empty_bases ) [read]

Definition at line 462 of file CppWinRTHelpers.h.

                                                              : winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseT<D, winrt::default_interface<T>, winrt::composable, I...>
{
    using composable = T;
    using class_type = typename T;

    operator class_type() const noexcept
    {
        return static_cast<winrt::IInspectable>(*this).as<class_type>();
    }

    hstring GetRuntimeClassName() const
    {
        return hstring{ winrt::name_of<T>() };
    }
};

WinRTReturn GetTemplateChildT | ( | std::wstring_view const & | childName,
 |  | const winrt::IControlProtected & | controlProtected
 | ) |  |

Definition at line 135 of file CppWinRTHelpers.h.

{
    winrt::DependencyObject childAsDO(controlProtected.GetTemplateChild(childName));

    if (childAsDO)
    {
        return childAsDO.try_as<WinRTReturn>();
    }
    return nullptr;
}

winrt::DependencyProperty InitializeDependencyProperty | ( | wstring_view const & | propertyNameString,
 |  | wstring_view const & | propertyTypeNameString,
 |  | wstring_view const & | ownerTypeNameString,
 |  | bool | isAttached,
 |  | winrt::IInspectable const & | defaultValue,
 |  | winrt::PropertyChangedCallback const & | propertyChangedCallback = nullptr |
 | ) |  |  | [inline]

Definition at line 24 of file CppWinRTHelpers.h.

{
    auto propertyType = winrt::TypeName();
    propertyType.Name = propertyTypeNameString;
    propertyType.Kind = winrt::TypeKind::Metadata;

    auto ownerType = winrt::TypeName();
    ownerType.Name = ownerTypeNameString;
    ownerType.Kind = winrt::TypeKind::Metadata;

    auto propertyMetadata = winrt::PropertyMetadata(defaultValue, propertyChangedCallback);

    if (isAttached)
    {
        return winrt::DependencyProperty::RegisterAttached(propertyNameString, propertyType, ownerType, propertyMetadata);
    }
    else
    {
        return winrt::DependencyProperty::Register(propertyNameString, propertyType, ownerType, propertyMetadata);
    }
}

PropertyChanged_revoker RegisterPropertyChanged | ( | winrt::DependencyObject const & | object,
 |  | winrt::DependencyProperty const & | dp,
 |  | winrt::DependencyPropertyChangedCallback const & | callback |
 | ) |  |  | [inline]

Definition at line 344 of file CppWinRTHelpers.h.

{
    const auto value = object.RegisterPropertyChangedCallback(dp, callback);
    return { object, dp, value };
}

ScopedBatchCompleted_revoker RegisterScopedBatchCompleted | ( | winrt::CompositionScopedBatch const & | object,
 |  | winrt::TypedEventHandler< winrt::IInspectable, winrt::CompositionBatchCompletedEventArgs > const & | handler |
 | ) |  |  | [inline]

Definition at line 204 of file CppWinRTHelpers.h.

{
    const auto value = object.Completed(handler);
    return { object, value };
}

XamlRootChanged_revoker RegisterXamlRootChanged | ( | winrt::XamlRoot const & | object,
 |  | winrt::TypedEventHandler< winrt::XamlRoot, winrt::XamlRootChangedEventArgs > const & | handler |
 | ) |  |  | [inline]

Definition at line 270 of file CppWinRTHelpers.h.

{
    const auto value = object.Changed(handler);
    return { object, value };
}

void SetDefaultStyleKey ( TThis * pThis )

Definition at line 129 of file CppWinRTHelpers.h.

{
    SetDefaultStyleKeyWorker(*pThis, pThis->GetRuntimeClassName());
}

void SetDefaultStyleKeyWorker | ( | winrt::IControlProtected const & | controlProtected,
 |  | std::wstring_view const & | className
 | ) |  |

Definition at line 171 of file XamlControlsResources.cpp.

{
    controlProtected.DefaultStyleKey(box_value(className));

    if (auto control = controlProtected.try_as<winrt::IControl>())
    {
        winrt::Uri uri{L"ms-appx:///" MUXCONTROLSROOT_NAMESPACE_STR "/Themes/generic.xaml"};
        control.DefaultStyleResourceUri(uri);
    }
}

bool SetFocus | ( | winrt::DependencyObject const & | object,
 |  | winrt::FocusState | focusState |
 | ) |  |  | [inline]

Definition at line 351 of file CppWinRTHelpers.h.

{
    if (object)
    {
        auto result = winrt::FocusManager::TryFocusAsync(object, focusState);
        if (result.Status() == winrt::AsyncStatus::Completed)
        {
            return result.GetResults().Succeeded();
        }
        // Operation was async, let's assume it worked.
        return true;
    }

    return false;
}

winrt::IInspectable& to_winrt ( ::IInspectable *& instance ) [inline]

Definition at line 19 of file CppWinRTHelpers.h.

{
    return reinterpret_cast<winrt::IInspectable&>(instance);
}

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/CppWinRTIncludes.h File Reference

  • File List
  • File Members
  • inc
Namespaces

CppWinRTIncludes.h File Reference

#include <winrt\base.h>
#include <winrt\Windows.Foundation.h>
#include <winrt\Windows.Foundation.Collections.h>
#include <winrt\Windows.Foundation.Metadata.h>
#include <winrt\Windows.ApplicationModel.Activation.h>
#include <winrt\Windows.ApplicationModel.Contacts.h>
#include <winrt\Windows.ApplicationModel.Core.h>
#include <winrt\Windows.ApplicationModel.DataTransfer.h>
#include <winrt\Windows.ApplicationModel.DataTransfer.DragDrop.h>
#include <winrt\Windows.ApplicationModel.Resources.h>
#include <winrt\Windows.ApplicationModel.Resources.Core.h>
#include <winrt\Windows.Devices.Geolocation.h>
#include <winrt\Windows.Globalization.h>
#include <winrt\Windows.Globalization.NumberFormatting.h>
#include <winrt\Windows.Graphics.h>
#include <winrt\Windows.Graphics.Imaging.h>
#include <winrt\Windows.Graphics.Display.h>
#include <winrt\Windows.Graphics.Effects.h>
#include <winrt\Windows.Storage.h>
#include <winrt\Windows.Storage.Streams.h>
#include <winrt\Windows.System.h>
#include <winrt\Windows.System.Power.h>
#include <winrt\Windows.System.Profile.h>
#include <winrt\Windows.System.Threading.h>
#include <winrt\Windows.System.UserProfile.h>
#include <winrt\Windows.UI.h>
#include <winrt\Windows.UI.Core.h>
#include <winrt\Windows.UI.Input.h>
#include <winrt\Windows.UI.Input.Inking.h>
#include <winrt\Windows.UI.Text.h>
#include <winrt\Windows.UI.ViewManagement.h>
#include <winrt\Windows.UI.Xaml.Interop.h>
#include <winrt\Windows.Data.Json.h>
#include <winrt\Microsoft.Windows.ApplicationModel.Resources.h>
#include <winrt\Microsoft.UI.Dispatching.h>
#include <winrt\Microsoft.UI.Composition.h>
#include <winrt\Microsoft.UI.Composition.Effects.h>
#include <winrt\Microsoft.UI.Composition.Interactions.h>
#include <winrt\Microsoft.UI.Composition.SystemBackdrops.h>
#include <winrt\Microsoft.UI.Private.Composition.Effects.h>
#include <winrt\Microsoft.UI.Content.h>
#include <winrt\Microsoft.UI.Input.h>
#include <winrt\Microsoft.UI.Input.Experimental.h>
#include <winrt\Microsoft.UI.Text.h>
#include <winrt\Microsoft.UI.Windowing.h>
#include <winrt\Microsoft.UI.Xaml.h>
#include <winrt\Microsoft.UI.Xaml.Automation.Peers.h>
#include <winrt\Microsoft.UI.Xaml.Automation.Provider.h>
#include <winrt\Microsoft.UI.Xaml.Controls.h>
#include <winrt\Microsoft.UI.Xaml.Controls.AnimatedVisuals.h>
#include <winrt\Microsoft.UI.Xaml.Controls.Primitives.h>
#include <winrt\Microsoft.UI.Xaml.Data.h>
#include <winrt\Microsoft.UI.Xaml.Documents.h>
#include <winrt\Microsoft.UI.Xaml.Hosting.h>
#include <winrt\Microsoft.UI.Xaml.Input.h>
#include <winrt\Microsoft.UI.Xaml.Interop.h>
#include <winrt\Microsoft.UI.Xaml.Markup.h>
#include <winrt\Microsoft.UI.Xaml.Media.h>
#include <winrt\Microsoft.UI.Xaml.Media.Animation.h>
#include <winrt\Microsoft.UI.Xaml.Media.Imaging.h>
#include <winrt\Microsoft.UI.Xaml.Shapes.h>
#include <winrt\Microsoft.UI.Xaml.XamlTypeInfo.h>
#include <winrt\Microsoft.UI.Private.Controls.h>
#include <winrt\Microsoft.UI.Private.Media.h>
#include <winrt\Microsoft.Web.WebView2.core.h>

Go to the source code of this file.

Namespaces

namespace | winrt
namespace | winrt::factory_implementation
namespace | winrt::implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers
namespace | winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::factory_implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Automation::Peers::implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::factory_implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::AnimatedVisuals::implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::factory_implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::factory_implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Controls::Primitives::implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Media
namespace | winrt::Microsoft::Experimental::UI::Xaml::Media::factory_implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::Media::implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo
namespace | winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::factory_implementation
namespace | winrt::Microsoft::Experimental::UI::Xaml::XamlTypeInfo::implementation
namespace | winrt::Microsoft::UI::Private::Controls
namespace | winrt::Microsoft::UI::Private::Controls::factory_implementation
namespace | winrt::Microsoft::UI::Private::Controls::implementation
namespace | winrt::Microsoft::UI::Private::Media
namespace | winrt::Microsoft::UI::Private::Media::factory_implementation
namespace | winrt::Microsoft::UI::Private::Media::implementation
namespace | winrt::Microsoft::UI::Xaml::Automation::Peers
namespace | winrt::Microsoft::UI::Xaml::Automation::Peers::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::Automation::Peers::implementation
namespace | winrt::Microsoft::UI::Xaml::Controls
namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals::implementation
namespace | winrt::Microsoft::UI::Xaml::Controls::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::Controls::implementation
namespace | winrt::Microsoft::UI::Xaml::Controls::Primitives
namespace | winrt::Microsoft::UI::Xaml::Controls::Primitives::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::Controls::Primitives::implementation
namespace | winrt::Microsoft::UI::Xaml::Media
namespace | winrt::Microsoft::UI::Xaml::Media::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::Media::implementation
namespace | winrt::Microsoft::UI::Xaml::XamlTypeInfo
namespace | winrt::Microsoft::UI::Xaml::XamlTypeInfo::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::XamlTypeInfo::implementation
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/DispatcherHelper.h File Reference

  • File List
  • File Members
  • inc
Classes

DispatcherHelper.h File Reference

#include "SharedHelpers.h"

Go to the source code of this file.

Classes

class DispatcherHelper
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/DoubleUtil.h File Reference

  • File List
  • File Members
  • inc
Classes

DoubleUtil.h File Reference

Go to the source code of this file.

Classes

class DoubleUtil
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/enum_array.h File Reference

  • File List
  • File Members
  • inc
Classes

enum_array.h File Reference

#include <array>

Go to the source code of this file.

Classes

class enum_array< E, T, N >
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/enum_vector.h File Reference

  • File List
  • File Members
  • inc
Classes

enum_vector.h File Reference

Go to the source code of this file.

Classes

class enum_vector< E, T >
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/ErrorHandling.h File Reference

  • File List
  • File Members
  • inc
Defines

ErrorHandling.h File Reference

#include <windows.h>
#include <exception>

Go to the source code of this file.

Defines

#define | E_INVALID_OPERATION HRESULT_FROM_WIN32(ERROR_INVALID_OPERATION)
#define | MUX_CATCH_RETURN

Define Documentation

#define E_INVALID_OPERATION HRESULT_FROM_WIN32(ERROR_INVALID_OPERATION)

Definition at line 10 of file ErrorHandling.h.

#define MUX_CATCH_RETURN
Value:
return S_OK; \
    } catch (...) { \
        auto hr = winrt::to_hresult(); \
        __analysis_assume(FAILED(hr)); \
        return hr;

Definition at line 21 of file ErrorHandling.h.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/event.h File Reference

  • File List
  • File Members
  • inc
Classes | Functions

event.h File Reference

#include <set>

Go to the source code of this file.

Classes

class | event< T >
class | event_base< ImplT, T, StorageT >
class | event_source< T >

Functions

__declspec (selectany) int64_t s_eventHandlerId=0

Function Documentation

__declspec ( selectany ) [pure virtual]
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/FloatUtil.h File Reference

  • File List
  • File Members
  • inc
Classes

FloatUtil.h File Reference

Go to the source code of this file.

Classes

class FloatUtil
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/FocusHelper.h File Reference

  • File List
  • File Members
  • inc
Classes

FocusHelper.h File Reference

#include "pch.h"
#include "common.h"

Go to the source code of this file.

Classes

class FocusHelper
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/GlobalDependencyProperty.h File Reference

  • File List
  • File Members
  • inc
Classes

GlobalDependencyProperty.h File Reference

Go to the source code of this file.

Classes

struct GlobalDependencyProperty
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/RegUtil.h File Reference

  • File List
  • File Members
  • inc
Classes | Functions

RegUtil.h File Reference

#include <windows.h>

Go to the source code of this file.

Classes

class | RegUtil

Functions

WINADVAPI LSTATUS APIENTRY | RegGetValueW (_In_ HKEY hkey, _In_opt_ LPCWSTR lpSubKey, _In_opt_ LPCWSTR lpValue, _In_ DWORD dwFlags, _Out_opt_ LPDWORD pdwType, _When_((dwFlags &0x7F)==RRF_RT_REG_SZ||(dwFlags &0x7F)==RRF_RT_REG_EXPAND_SZ||(dwFlags &0x7F)==(RRF_RT_REG_SZ|RRF_RT_REG_EXPAND_SZ)||*pdwType==REG_SZ||*pdwType==REG_EXPAND_SZ, _Post_z_) _When_((dwFlags &0x7F)==RRF_RT_REG_MULTI_SZ||*pdwType==REG_MULTI_SZ, _Post_ _NullNull_terminated_) _Out_writes_bytes_to_opt_(*pcbData,*pcbData) PVOID pvData, _Inout_opt_ LPDWORD pcbData)

Function Documentation

WINADVAPI LSTATUS APIENTRY RegGetValueW | ( | _In_ HKEY | hkey,
 |  | _In_opt_ LPCWSTR | lpSubKey,
 |  | _In_opt_ LPCWSTR | lpValue,
 |  | _In_ DWORD | dwFlags,
 |  | _Out_opt_ LPDWORD | pdwType,
 |  | _When_((dwFlags &0x7F)==RRF_RT_REG_SZ||(dwFlags &0x7F)==RRF_RT_REG_EXPAND_SZ||(dwFlags &0x7F)==(RRF_RT_REG_SZ|RRF_RT_REG_EXPAND_SZ)||*pdwType==REG_SZ||*pdwType==REG_EXPAND_SZ, _Post_z_) _When_((dwFlags &0x7F)==RRF_RT_REG_MULTI_SZ||*pdwType==REG_MULTI_SZ, _Post_ _NullNull_terminated_) _Out_writes_bytes_to_opt_ *,*pcbData PVOID | pvData,
 |  | _Inout_opt_ LPDWORD | pcbData
 | ) |  |
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/RoutedEventHelpers.h File Reference

  • File List
  • File Members
  • inc
Classes | Enumerations | Functions

RoutedEventHelpers.h File Reference

Go to the source code of this file.

Classes

struct | RoutedEventHandler_revoker
struct | RoutedEventTraits< eventType >
struct | RoutedEventTraits< RoutedEventType::DragEnter >
struct | RoutedEventTraits< RoutedEventType::DragLeave >
struct | RoutedEventTraits< RoutedEventType::Drop >
struct | RoutedEventTraits< RoutedEventType::GettingFocus >
struct | RoutedEventTraits< RoutedEventType::KeyDown >
struct | RoutedEventTraits< RoutedEventType::LosingFocus >
struct | RoutedEventTraits< RoutedEventType::PointerCanceled >
struct | RoutedEventTraits< RoutedEventType::PointerCaptureLost >
struct | RoutedEventTraits< RoutedEventType::PointerExited >
struct | RoutedEventTraits< RoutedEventType::PointerPressed >
struct | RoutedEventTraits< RoutedEventType::PointerReleased >

Enumerations

enum RoutedEventType {
GettingFocus, LosingFocus, KeyDown, PointerPressed,
PointerReleased, PointerExited, PointerCanceled, PointerCaptureLost,
DragEnter, DragLeave, Drop
}

Functions

template<RoutedEventType eventType, typename traits = RoutedEventTraits<eventType>>
RoutedEventHandler_revoker | AddRoutedEventHandler (winrt::UIElement const &object, typename traits::HandlerT const &callback, bool handledEventsToo)

Enumeration Type Documentation

enum RoutedEventType
Enumerator:
GettingFocus
LosingFocus
KeyDown
PointerPressed
PointerReleased
PointerExited
PointerCanceled
PointerCaptureLost
DragEnter
DragLeave
Drop

Definition at line 79 of file RoutedEventHelpers.h.

{
    GettingFocus,
    LosingFocus,
    KeyDown,
    PointerPressed,
    PointerReleased,
    PointerExited,
    PointerCanceled,
    PointerCaptureLost,
    DragEnter,
    DragLeave,
    Drop
};

Function Documentation

RoutedEventHandler_revoker AddRoutedEventHandler | ( | winrt::UIElement const & | object,
 |  | typename traits::HandlerT const & | callback,
 |  | bool | handledEventsToo |
 | ) |  |  | [inline]

Definition at line 177 of file RoutedEventHelpers.h.

{
    auto handler = winrt::box_value<typename traits::HandlerT>(callback);
    auto event = traits::Event();
    object.AddHandler(event, handler, handledEventsToo);
    return { object, event, handler };
}

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/RuntimeClassHelpers.h File Reference

  • File List
  • File Members
  • inc
Classes | Defines

RuntimeClassHelpers.h File Reference

#include "tracker_ref.h"
#include <winrt\Microsoft.UI.Xaml.h>

Go to the source code of this file.

Classes

struct | reference_tracker_custom_implements_t< WinRTClassType, ImplT >
struct | reference_tracker_implements< D, WinRTClassType, ImplT, I >
struct | reference_tracker_implements_t< WinRTClassType >
struct | ReferenceTracker< D, ImplT, I >

Defines

#define | CppWinRTActivatableClass(className) CppWinRTActivatableClassWithFactory(className, className##Factory)
#define | CppWinRTActivatableClassWithBasicFactory(className)
#define | CppWinRTActivatableClassWithDPFactory(className)
#define | CppWinRTActivatableClassWithFactory(className, factory)
#define | ForwardRefToBaseReferenceTracker(baseClass)

Define Documentation

#define CppWinRTActivatableClass ( className ) CppWinRTActivatableClassWithFactory(className, className##Factory)

Definition at line 220 of file RuntimeClassHelpers.h.

#define CppWinRTActivatableClassWithBasicFactory ( className )
Value:
struct className##Factory : public winrt::factory_implementation::className##T<className##Factory, ::className> {}; \
    CppWinRTActivatableClassWithFactory(className, className##Factory)

Definition at line 223 of file RuntimeClassHelpers.h.

#define CppWinRTActivatableClassWithDPFactory ( className )
Value:
struct className##Factory : public winrt::factory_implementation::className##T<className##Factory, ::className> \
    { \
        className##Factory() { EnsureProperties(); } \
        static void ClearProperties() { ::className::ClearProperties(); }\
        static void EnsureProperties() { ::className::EnsureProperties(); }\
    }; \
    CppWinRTActivatableClassWithFactory(className, className##Factory)

Definition at line 227 of file RuntimeClassHelpers.h.

#define CppWinRTActivatableClassWithFactory | ( | className,
 |  | factory
 | ) |
Value:
namespace factory_implementation { using className = factory; }; \
    namespace implementation { using className = ::className; }; \

Definition at line 216 of file RuntimeClassHelpers.h.

#define ForwardRefToBaseReferenceTracker ( baseClass )
Value:
HRESULT __stdcall QueryInterface(GUID const& id, void** object) noexcept override \
    { \
        return baseClass##::QueryInterface(id, object); \
    } \

Definition at line 241 of file RuntimeClassHelpers.h.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/SharedHelpers.h File Reference

  • File List
  • File Members
  • inc
Classes | Defines

SharedHelpers.h File Reference

#include "AutoHandle.h"
#include "StaticAssertFalse.h"

Go to the source code of this file.

Classes

class | SharedHelpers

Defines

#define | DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS(EnumType)

Define Documentation

#define DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS ( EnumType )
Value:
inline EnumType operator | (EnumType lhs, EnumType rhs) \
{ \
    return static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) | static_cast<std::underlying_type_t<EnumType>>(rhs)); \
} \
 \
inline EnumType& operator |= (EnumType& lhs, EnumType rhs) \
{ \
    lhs = static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) | static_cast<std::underlying_type_t<EnumType>>(rhs)); \
    return lhs; \
} \
 \
inline EnumType operator & (EnumType lhs, EnumType rhs) \
{ \
    return static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) & static_cast<std::underlying_type_t<EnumType>>(rhs)); \
} \
\
inline EnumType& operator &= (EnumType& lhs, EnumType rhs) \
{ \
    lhs = static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) & static_cast<std::underlying_type_t<EnumType>>(rhs)); \
    return lhs; \
}

Definition at line 306 of file SharedHelpers.h.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/StaticAssertFalse.h File Reference

  • File List
  • File Members
  • inc
Namespaces | Defines

StaticAssertFalse.h File Reference

Go to the source code of this file.

Namespaces

namespace | details

Defines

#define | static_assert_false(message)

Define Documentation

#define static_assert_false ( message )
Value:
while(1){ \
struct nested{}; \
static_assert(::details::dependent_false_v<nested>, message); \
}

Definition at line 17 of file StaticAssertFalse.h.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/tracker_ref.h File Reference

  • File List
  • File Members
  • inc
Classes | Enumerations | Functions

tracker_ref.h File Reference

#include "SharedHelpers.h"

Go to the source code of this file.

Classes

struct | IUnknownAccessor< T, Enable >
struct | IUnknownAccessor< com_ptr< T > >
struct | NonReferenceTrackerStorageHelper< T >
class | ReferenceTrackerContainerBase
struct | ReferenceTrackerStorageHelper< ImplT, T >
class | sealed< T, fallback, RawStorageT >
Resource Accessor. More...
struct | tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >

Enumerations

enum | TrackerRefFallback { None, FallbackToComPtrBeforeRS4 }

Functions

struct | __declspec (novtable) ITrackerHandleManager
template<typename T >
bool | operator< (const tracker_ref< T > &lhs, const tracker_ref< T > &rhs)

Enumeration Type Documentation

enum TrackerRefFallback
Enumerator:
None
FallbackToComPtrBeforeRS4

Definition at line 120 of file tracker_ref.h.

{
    None,
    FallbackToComPtrBeforeRS4
};

Function Documentation

struct __declspec ( novtable ) [read]

Definition at line 8 of file tracker_ref.h.

{
    virtual ~ITrackerHandleManager() = default;

    const ITrackerHandleManager* GetTrackerHandleManager() const
    {
        return this;
    }

    //
    // ITrackerPtrWrapperManager interface
    //

    void NewTrackerHandle(::TrackerHandle &handle)  const try
    {
#ifdef DBG
        MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
#endif
        winrt::check_hresult(m_trackerOwnerInnerNoRef->CreateTrackerHandle(&handle));
    }
    catch (...) {}

    void DeleteTrackerHandle(::TrackerHandle handle) const try
    {
#ifdef DBG
        MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
#endif
        winrt::check_hresult(m_trackerOwnerInnerNoRef->DeleteTrackerHandle(handle));
    }
    catch (...) {}

    void SetTrackerValue(::TrackerHandle handle, IUnknown* value) const try
    {
#ifdef DBG
        MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
#endif
        winrt::check_hresult(m_trackerOwnerInnerNoRef->SetTrackerValue(handle, value));
    }
    catch (...) {}

    bool GetTrackerValue(::TrackerHandle handle, _Outptr_result_maybenull_ IUnknown** value) const try
    {
#ifdef DBG
        MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
#endif
        return !!m_trackerOwnerInnerNoRef->TryGetSafeTrackerValue(handle, value);
    }
    catch (...) { return false; }

    bool ShouldFallbackToComPointers() const
    {
        // If we are running on an older OS then we need to fall back to simple AddRef/Release tracking for tracker_refs
        // and we detect this scenario by just checking if we were able to acquire the ITrackerOwner interface.
#ifdef DBG
        MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
#endif
        return (m_trackerOwnerInnerNoRef == nullptr);
    }

#ifdef DBG
    void DEBUG_NotifyTrackerActive() const
    {
        _activeTrackerChildren++;
    }

    void DEBUG_NotifyTrackerInactive() const
    {
        MUX_ASSERT(_activeTrackerChildren > 0);
        _activeTrackerChildren--;
    }

    mutable int _activeTrackerChildren{};
    bool m_wasEnsureCalled{};
#endif

protected:
    ::ITrackerOwner* m_trackerOwnerInnerNoRef{ nullptr };
};

bool operator< | ( | const tracker_ref< T > & | lhs,
 |  | const tracker_ref< T > & | rhs
 | ) |  |

Definition at line 369 of file tracker_ref.h.

{
    return lhs.get() < rhs.get();
}

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/velocity.h File Reference

  • File List
  • File Members
  • inc
Defines | Functions

velocity.h File Reference

#include <wil/ResultMacros.h>
#include <wil/Staging.h>

Go to the source code of this file.

Defines

#define WIL_STAGING_DLL

Functions

WI_DEFINE_FEATURE (Feature_NWMTest1, 39145991, DisabledByDefault, WilStagingChangeTime(OnReboot), WilStagingGroup("", R"()"))
WI_DEFINE_FEATURE (Feature_Tabs, 37634385, DisabledByDefault, WilStagingChangeTime(OnReboot), WilStagingRequiresFeature(Feature_NWMTest1), WilStagingGroup("", R"()"))

Define Documentation

#define WIL_STAGING_DLL

Definition at line 6 of file velocity.h.

Function Documentation

WI_DEFINE_FEATURE | ( | Feature_NWMTest1 | ,
 |  | 39145991 | ,
 |  | DisabledByDefault | ,
 |  | WilStagingChangeTime(OnReboot) | ,
 |  | WilStagingGroup("", R"()") |
 | ) |  |
WI_DEFINE_FEATURE | ( | Feature_Tabs | ,
 |  | 37634385 | ,
 |  | DisabledByDefault | ,
 |  | WilStagingChangeTime(OnReboot) | ,
 |  | WilStagingRequiresFeature(Feature_NWMTest1) | ,
 |  | WilStagingGroup("", R"()") |
 | ) |  |
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/WinEventLogLevels.h File Reference

  • File List
  • File Members
  • inc
Defines

WinEventLogLevels.h File Reference

Go to the source code of this file.

Defines

#define | WINEVENT_LEVEL_CRITICAL 0x1
#define | WINEVENT_LEVEL_ERROR 0x2
#define | WINEVENT_LEVEL_INFO 0x4
#define | WINEVENT_LEVEL_LOG_ALWAYS 0x0
#define | WINEVENT_LEVEL_VERBOSE 0x5
#define | WINEVENT_LEVEL_WARNING 0x3

Define Documentation

#define WINEVENT_LEVEL_CRITICAL 0x1

Definition at line 7 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_ERROR 0x2

Definition at line 8 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_INFO 0x4

Definition at line 10 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_LOG_ALWAYS 0x0

Definition at line 6 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_VERBOSE 0x5

Definition at line 11 of file WinEventLogLevels.h.

#define WINEVENT_LEVEL_WARNING 0x3

Definition at line 9 of file WinEventLogLevels.h.

Generated on Sun Dec 1 2024 20:52:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/InfoBadge.cpp File Reference

  • File List
  • File Members
  • InfoBadge

InfoBadge.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBadge.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/InfoBadge.h File Reference

  • File List
  • File Members
  • InfoBadge
Classes

InfoBadge.h File Reference

#include "pch.h"
#include "common.h"
#include "InfoBadgeTemplateSettings.h"
#include "InfoBadge.g.h"
#include "InfoBadge.properties.h"

Go to the source code of this file.

Classes

class InfoBadge
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/InfoBadge.idl File Reference

  • File List
  • File Members
  • InfoBadge
Namespaces | Variables

InfoBadge.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

Microsoft UI Xaml Controls
IconElement 		IconElement
IconSource | IconSource
unsealed runtimeclass | InfoBadge
Microsoft UI Xaml CornerRadius | InfoBadgeCornerRadius
unsealed runtimeclass | InfoBadgeTemplateSettings
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/InfoBadgeTemplateSettings.cpp File Reference

  • File List
  • File Members
  • InfoBadge

InfoBadgeTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBadgeTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/InfoBadgeTemplateSettings.h File Reference

  • File List
  • File Members
  • InfoBadge
Classes

InfoBadgeTemplateSettings.h File Reference

#include "InfoBadgeTemplateSettings.g.h"
#include "InfoBadgeTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class InfoBadgeTemplateSettings
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/APITests/InfoBadgeTests.cs File Reference

  • File List
  • File Members
  • InfoBadge
  • APITests
Classes | Namespaces

InfoBadgeTests.cs File Reference

Go to the source code of this file.

Classes

class | InfoBadgeTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/TestUI/InfoBadgePage.xaml.cs File Reference

  • File List
  • File Members
  • InfoBadge
  • TestUI
Classes | Namespaces

InfoBadgePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | InfoBadgePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBar.cpp File Reference

  • File List
  • File Members
  • InfoBar

InfoBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBar.h"
#include "InfoBarClosingEventArgs.h"
#include "InfoBarClosedEventArgs.h"
#include "InfoBarTemplateSettings.h"
#include "InfoBarAutomationPeer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "../ResourceHelper/Utils.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBar.h File Reference

  • File List
  • File Members
  • InfoBar
Classes

InfoBar.h File Reference

#include "pch.h"
#include "common.h"
#include "InfoBar.g.h"
#include "InfoBar.properties.h"

Go to the source code of this file.

Classes

class InfoBar
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBar.idl File Reference

  • File List
  • File Members
  • InfoBar
Namespaces | Enumerations | Variables

InfoBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE
namespace | MU_XCP_NAMESPACE

Enumerations

enum | InfoBarCloseReason { CloseButton = 0, Programmatic = 1 }
enum | InfoBarSeverity { Informational = 0, Success = 1, Warning = 2, Error = 3 }

Variables

Microsoft UI Xaml Thickness | HorizontalOrientationPadding
unsealed runtimeclass | InfoBarAutomationPeer
unsealed runtimeclass | InfoBarPanel
Microsoft UI Xaml Thickness | VerticalOrientationPadding
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarAutomationPeer.cpp File Reference

  • File List
  • File Members
  • InfoBar

InfoBarAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "InfoBarAutomationPeer.h"
#include <UIAutomationCore.h>
#include <UIAutomationCoreApi.h>
#include "InfoBarAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarAutomationPeer.h File Reference

  • File List
  • File Members
  • InfoBar
Classes

InfoBarAutomationPeer.h File Reference

#include "InfoBar.h"
#include "InfoBarAutomationPeer.g.h"

Go to the source code of this file.

Classes

class InfoBarAutomationPeer
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarClosedEventArgs.cpp File Reference

  • File List
  • File Members
  • InfoBar

InfoBarClosedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarClosedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarClosedEventArgs.h File Reference

  • File List
  • File Members
  • InfoBar
Classes

InfoBarClosedEventArgs.h File Reference

#include "InfoBarClosedEventArgs.g.h"

Go to the source code of this file.

Classes

class InfoBarClosedEventArgs
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarClosingEventArgs.cpp File Reference

  • File List
  • File Members
  • InfoBar

InfoBarClosingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarClosingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarClosingEventArgs.h File Reference

  • File List
  • File Members
  • InfoBar
Classes

InfoBarClosingEventArgs.h File Reference

#include "InfoBarClosingEventArgs.g.h"

Go to the source code of this file.

Classes

class InfoBarClosingEventArgs
Generated on Sun Dec 1 2024 20:52:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarPanel.cpp File Reference

  • File List
  • File Members
  • InfoBar

InfoBarPanel.cpp File Reference

#include <pch.h>
#include <common.h>
#include "InfoBarPanel.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarPanel.h File Reference

  • File List
  • File Members
  • InfoBar
Classes

InfoBarPanel.h File Reference

#include "InfoBarPanel.g.h"
#include "InfoBarPanel.properties.h"

Go to the source code of this file.

Classes

class InfoBarPanel
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarTemplateSettings.cpp File Reference

  • File List
  • File Members
  • InfoBar

InfoBarTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InfoBarTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarTemplateSettings.h File Reference

  • File List
  • File Members
  • InfoBar
Classes

InfoBarTemplateSettings.h File Reference

#include "InfoBarTemplateSettings.g.h"
#include "InfoBarTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class InfoBarTemplateSettings
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InteractionTests/InfoBarTests.cs File Reference

  • File List
  • File Members
  • InfoBar
  • InteractionTests
Classes | Namespaces

InfoBarTests.cs File Reference

Go to the source code of this file.

Classes

class | InfoBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/TestUI/InfobarAxeTestage.xaml.cs File Reference

  • File List
  • File Members
  • InfoBar
  • TestUI
Classes | Namespaces

InfobarAxeTestage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | InfobarAxeTestage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/TestUI/InfoBarPage.xaml.cs File Reference

  • File List
  • File Members
  • InfoBar
  • TestUI
Classes | Namespaces

InfoBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | InfoBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvas.cpp File Reference

  • File List
  • File Members
  • InkCanvas
Classes | Variables

InkCanvas.cpp File Reference

#include <pch.h>
#include <common.h>
#include "InkCanvas.h"
#include "InkCanvasAutomationPeer.h"
#include "RuntimeProfiler.h"
#include "Microsoft.UI.Xaml.xamlroot.h"
#include "Microsoft.UI.Composition.h"
#include <pplawait.h>
#include <wil\resource.h>

Go to the source code of this file.

Classes

struct | GenericInkCallback
struct | ThreadData

Variables

thread_local std::weak_ptr
< ThreadData > 		s_tlsThreadData

Variable Documentation

thread_local std::weak_ptr<ThreadData> s_tlsThreadData

Definition at line 23 of file InkCanvas.cpp.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvas.h File Reference

  • File List
  • File Members
  • InkCanvas
Classes

InkCanvas.h File Reference

#include "InkCanvas.g.h"
#include "InkCanvas.properties.h"
#include "dcomp.h"
#include <windows.ui.input.inking.h>
#include <inkpresenterdesktop.h>

Go to the source code of this file.

Classes

class | InkCanvas
struct | InkCanvas::TargetData
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvas.idl File Reference

  • File List
  • File Members
  • InkCanvas
Namespaces | Functions | Variables

InkCanvas.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Functions

delegate void | DoInkPresenterWork (Windows.UI.Input.Inking.InkPresenter presenter)
Windows Foundation IAsyncAction | QueueInkPresenterWorkItem (DoInkPresenterWork workItem)

Variables

unsealed runtimeclass | InkCanvas
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvasAutomationPeer.cpp File Reference

  • File List
  • File Members
  • InkCanvas

InkCanvasAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InkCanvasAutomationPeer.h"
#include "InkCanvas.h"
#include "InkCanvasAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvasAutomationPeer.h File Reference

  • File List
  • File Members
  • InkCanvas
Classes

InkCanvasAutomationPeer.h File Reference

#include "InkCanvas.h"
#include "InkCanvasAutomationPeer.g.h"

Go to the source code of this file.

Classes

class InkCanvasAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvasAutomationPeer.idl File Reference

  • File List
  • File Members
  • InkCanvas
Namespaces | Variables

InkCanvasAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | InkCanvasAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBar.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBar.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBar.g.h"
#include "InkToolBar.properties.h"

Go to the source code of this file.

Classes

class InkToolBar
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBar.idl File Reference

  • File List
  • File Members
  • InkToolBar
Namespaces | Enumerations | Functions | Variables

InkToolBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum InkToolBarButtonFlyoutPlacement {
Auto = 1, Top = 2, Bottom, Left = 1,
Right
}
enum | InkToolBarEraserFlyoutItemKind { StrokeEraser, PrecisionSmallEraser, PrecisionLargeEraser, ClearAll }
enum | InkToolBarEraserKind { Stroke, PrecisionSmall, PrecisionLarge }
enum | InkToolBarFlyoutItemKind { Simple, Radio, Check, RadioCheck }
enum | InkToolBarInitialControls { All = 255, None = 0, PensOnly, AllExceptPens }
enum | InkToolBarMenuKind { Stencil }
enum | InkToolBarStencilKind { Ruler, Protractor }
enum | InkToolBarToggle { Ruler, Custom }
enum InkToolBarTool {
BallpointPen, Pencil, Highlighter, Eraser,
CustomTool
}

Functions

Windows UI Input Inking
InkDrawingAttributes 		CreateInkDrawingAttributes (Microsoft.UI.Xaml.Media.Brush brush, Double strokeWidth)
overridable Windows UI Input
Inking InkDrawingAttributes 		CreateInkDrawingAttributesCore (Microsoft.UI.Xaml.Media.Brush brush, Double strokeWidth)
Microsoft UI Xaml Controls
InkToolBarMenuButton 		GetMenuButton (Microsoft.UI.Xaml.Controls.InkToolBarMenuKind menu)
Microsoft UI Xaml Controls
InkToolBarToggleButton 		GetToggleButton (Microsoft.UI.Xaml.Controls.InkToolBarToggle tool)
Microsoft UI Xaml Controls
InkToolBarToolButton 		GetToolButton (Microsoft.UI.Xaml.Controls.InkToolBarTool tool)

Variables

Microsoft UI Xaml Controls
InkToolBarToolButton 		ActiveTool
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Object > 		ActiveToolChanged
Boolean | ArePrecisionErasersVisible
Microsoft UI Xaml Controls
InkToolBarButtonFlyoutPlacement 		ButtonFlyoutPlacement
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBarFlyoutItem,
Object > 		Checked
Microsoft UI Xaml UIElement | ConfigurationContent
Microsoft UI Xaml Controls
InkToolBarCustomPen 		CustomPen
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Object > 		EraseAllClicked
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBarEraserFlyoutItemClickedEventArgs,
Object > 		EraserFlyoutItemClicked
Microsoft UI Xaml Controls
InkToolBarInitialControls 		InitialControls
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Object > 		InkDrawingAttributesChanged
unsealed runtimeclass | InkToolBar
unsealed runtimeclass | InkToolBarBallpointPenButton
unsealed runtimeclass | InkToolBarCustomPen
unsealed runtimeclass | InkToolBarCustomPenButton
unsealed runtimeclass | InkToolBarCustomToggleButton
unsealed runtimeclass | InkToolBarCustomToolButton
unsealed runtimeclass | InkToolBarEraserButton
unsealed runtimeclass | InkToolBarFlyoutItem
unsealed runtimeclass | InkToolBarHighlighterButton
unsealed runtimeclass | InkToolBarMenuButton
unsealed runtimeclass | InkToolBarPenButton
unsealed runtimeclass | InkToolBarPencilButton
unsealed runtimeclass | InkToolBarPenConfigurationControl
unsealed runtimeclass | InkToolBarStencilButton
unsealed runtimeclass | InkToolBarToggleButton
unsealed runtimeclass | InkToolBarToolButton
Boolean | IsChecked
Boolean | IsClearAllVisible
Boolean | IsExtensionGlyphShown
Boolean | IsProtractorItemVisible
Boolean | IsRulerButtonChecked
Boolean | IsRulerItemVisible
Boolean | IsStencilButtonChecked
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBar,
Microsoft.UI.Xaml.Controls.InkToolBarIsStencilButtonCheckedChangedEventArgs > 		IsStencilButtonCheckedChanged
Boolean | IsStrokeEraserVisible
Microsoft UI Xaml Controls
InkToolBarFlyoutItemKind 		Kind
Double | MaxStrokeWidth
Double | MinStrokeWidth
Microsoft UI Xaml Controls
Orientation 		Orientation
Int32 | SelectedBrushIndex
Microsoft UI Xaml Controls
InkToolBarStencilKind 		SelectedStencil
Double | SelectedStrokeWidth
Microsoft UI Xaml Controls
InkCanvas 		TargetInkCanvas
Object | TargetInkPresenter
event Windows Foundation
TypedEventHandler
< Microsoft.UI.Xaml.Controls.InkToolBarFlyoutItem,
Object > 		Unchecked
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolbarAutomationPeer.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolbarAutomationPeer.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarAutomationPeer.g.h"

Go to the source code of this file.

Classes

class InkToolBarAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarAutomationPeer.idl File Reference

  • File List
  • File Members
  • InkToolBar
Namespaces | Variables

InkToolBarAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | InkToolBarAutomationPeer
unsealed runtimeclass | InkToolBarFlyoutItemAutomationPeer
unsealed runtimeclass | InkToolBarMenuButtonAutomationPeer
unsealed runtimeclass | InkToolBarToolButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarBallpointPenButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarBallpointPenButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarBallpointPenButton.g.h"
#include "InkToolBarPenButton.h"

Go to the source code of this file.

Classes

class InkToolBarBallpointPenButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarCustomPen.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarCustomPen.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomPen.g.h"

Go to the source code of this file.

Classes

class InkToolBarCustomPen
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarCustomPenButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarCustomPenButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomPenButton.g.h"
#include "InkToolBarCustomPenButton.properties.h"
#include "InkToolBarPenButton.h"

Go to the source code of this file.

Classes

class InkToolBarCustomPenButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarCustomToggleButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarCustomToggleButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomToggleButton.g.h"
#include "InkToolBarToggleButton.h"

Go to the source code of this file.

Classes

class InkToolBarCustomToggleButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarCustomToolButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarCustomToolButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarCustomToolButton.g.h"
#include "InkToolBarCustomToolButton.properties.h"
#include "InkToolBarToolButton.h"

Go to the source code of this file.

Classes

class InkToolBarCustomToolButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarEraserButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarEraserButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarEraserButton.g.h"
#include "InkToolBarEraserButton.properties.h"
#include "InkToolBarToolButton.h"

Go to the source code of this file.

Classes

class InkToolBarEraserButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarEraserButtonInternal.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarEraserButtonInternal.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarEraserButtonInternal.g.h"

Go to the source code of this file.

Classes

class InkToolBarEraserButtonInternal
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarEraserFlyoutItemClickedEventArgs.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarEraserFlyoutItemClickedEventArgs.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarEraserFlyoutItemClickedEventArgs.g.h"

Go to the source code of this file.

Classes

class InkToolBarEraserFlyoutItemClickedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarFlyoutItem.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarFlyoutItem.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarFlyoutItem.g.h"
#include "InkToolBarFlyoutItem.properties.h"

Go to the source code of this file.

Classes

class InkToolBarFlyoutItem
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarFlyoutItemAutomationPeer.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarFlyoutItemAutomationPeer.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarFlyoutItemAutomationPeer.g.h"

Go to the source code of this file.

Classes

class InkToolBarFlyoutItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarHighlighterButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarHighlighterButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarHighlighterButton.g.h"
#include "InkToolBarPenButton.h"

Go to the source code of this file.

Classes

class InkToolBarHighlighterButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarIsStencilButtonCheckedChangedEventArgs.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarIsStencilButtonCheckedChangedEventArgs.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarIsStencilButtonCheckedChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class InkToolBarIsStencilButtonCheckedChangedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarMenuButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarMenuButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarMenuButton.g.h"
#include "InkToolBarMenuButton.properties.h"

Go to the source code of this file.

Classes

class InkToolBarMenuButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarMenuButtonAutomationPeer.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarMenuButtonAutomationPeer.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarMenuButtonAutomationPeer.g.h"

Go to the source code of this file.

Classes

class InkToolBarMenuButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarPenButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarPenButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarPenButton.g.h"
#include "InkToolBarPenButton.properties.h"
#include "InkToolBarToolButton.h"

Go to the source code of this file.

Classes

class InkToolBarPenButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InktoolBarPencilButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InktoolBarPencilButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InktoolBarPencilButton.g.h"
#include "InkToolBarPenButton.h"

Go to the source code of this file.

Classes

class InkToolBarPencilButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarPenConfigurationControl.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarPenConfigurationControl.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarPenConfigurationControl.g.h"
#include "InkToolBarPenConfigurationControl.properties.h"

Go to the source code of this file.

Classes

class InkToolBarPenConfigurationControl
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarStencilButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarStencilButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarStencilButton.g.h"
#include "InkToolBarStencilButton.properties.h"
#include "InkToolBarMenuButton.h"

Go to the source code of this file.

Classes

class InkToolBarStencilButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarToggleButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarToggleButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarToggleButton.g.h"

Go to the source code of this file.

Classes

class InkToolBarToggleButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarToolButton.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarToolButton.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarToolButton.g.h"
#include "InkToolBarToolButton.properties.h"

Go to the source code of this file.

Classes

class InkToolBarToolButton
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarToolButtonAutomationPeer.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes

InkToolBarToolButtonAutomationPeer.h File Reference

#include "pch.h"
#include "common.h"
#include "InkToolBarToolButtonAutomationPeer.g.h"

Go to the source code of this file.

Classes

class InkToolBarToolButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarTrace.h File Reference

  • File List
  • File Members
  • InkToolBar
Classes | Defines | Functions

InkToolBarTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | InkToolBarTrace

Defines

#define | INKTOOLBAR_TRACE_ERROR INKTOOLBAR_TRACE_INFO
#define | INKTOOLBAR_TRACE_INFO(sender, message,...)
#define | INKTOOLBAR_TRACE_INFO_DBG(sender, message,...)
#define | INKTOOLBAR_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) InkToolBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | INKTOOLBAR_TRACE_PERF(info)
#define | INKTOOLBAR_TRACE_PERF_DBG(info)
#define | INKTOOLBAR_TRACE_VERBOSE(sender, message,...)
#define | INKTOOLBAR_TRACE_VERBOSE_DBG(sender, message,...)
#define | INKTOOLBAR_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) InkToolBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | INKTOOLBAR_TRACE_WARNING INKTOOLBAR_TRACE_INFO

Functions

bool | IsInkToolBarTracingEnabled ()
bool | IsInkToolBarVerboseTracingEnabled ()

Define Documentation

#define INKTOOLBAR_TRACE_ERROR INKTOOLBAR_TRACE_INFO

Definition at line 13 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsInkToolBarTracingEnabled()) \
{ \
    INKTOOLBAR_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (InkToolBarTrace::s_IsDebugOutputEnabled || InkToolBarTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    INKTOOLBAR_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 33 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 67 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | InkToolBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 30 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_PERF ( info )
Value:
if (IsInkToolBarPerfTracingEnabled()) \
{ \
    InkToolBarTrace::TracePerfInfo(info); \
} \

Definition at line 56 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_PERF_DBG ( info )

Definition at line 69 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsInkToolBarVerboseTracingEnabled()) \
{ \
    INKTOOLBAR_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (InkToolBarTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    INKTOOLBAR_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 46 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 68 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | InkToolBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 43 of file InkToolBarTrace.h.

#define INKTOOLBAR_TRACE_WARNING INKTOOLBAR_TRACE_INFO

Definition at line 14 of file InkToolBarTrace.h.

Function Documentation

bool IsInkToolBarTracingEnabled ( ) [inline]

Definition at line 16 of file InkToolBarTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_INKTOOLBAR || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsInkToolBarVerboseTracingEnabled ( ) [inline]

Definition at line 23 of file InkToolBarTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_INKTOOLBAR || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteraction.cpp File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction

ButtonInteraction.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ButtonInteraction.h"
#include "ButtonInteractionInvokedEventArgs.h"
#include "ButtonInteraction.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteraction.h File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
Classes

ButtonInteraction.h File Reference

#include "ButtonInteraction.g.h"
#include "ButtonInteraction.properties.h"

Go to the source code of this file.

Classes

class ButtonInteraction
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteraction.idl File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
Namespaces | Enumerations

ButtonInteraction.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Enumerations

enum | ButtonInteractionInvokeMode { Release = 0, Press = 1, Hover = 2 }
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.cpp File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction

ButtonInteractionInvokedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ButtonInteractionInvokedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.h File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
Classes

ButtonInteractionInvokedEventArgs.h File Reference

#include "ButtonInteractionInvokedEventArgs.g.h"

Go to the source code of this file.

Classes

class ButtonInteractionInvokedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/APITests/ButtonInteractionTests.cs File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
  • APITests
Classes | Namespaces

ButtonInteractionTests.cs File Reference

Go to the source code of this file.

Classes

class | ButtonInteractionTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/InteractionTests/ButtonInteractionTests.cs File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
  • InteractionTests
Classes | Namespaces

ButtonInteractionTests.cs File Reference

Go to the source code of this file.

Classes

class | ButtonInteractionTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/TestUI/ButtonInteractionPage.xaml.cs File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
  • TestUI
Classes | Namespaces

ButtonInteractionPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ButtonInteractionPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/TestUI/TargetElement.xaml.cs File Reference

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
  • TestUI
Classes | Namespaces

TargetElement.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TargetElement

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/SliderInteraction.cpp File Reference

  • File List
  • File Members
  • Interactions
  • SliderInteraction

SliderInteraction.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SliderInteraction.h"
#include "SliderInteraction.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/SliderInteraction.h File Reference

  • File List
  • File Members
  • Interactions
  • SliderInteraction
Classes

SliderInteraction.h File Reference

#include "SliderInteraction.g.h"
#include "SliderInteraction.properties.h"

Go to the source code of this file.

Classes

class SliderInteraction
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/SliderInteraction.idl File Reference

  • File List
  • File Members
  • Interactions
  • SliderInteraction
Namespaces | Variables

SliderInteraction.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Variables

unsealed runtimeclass | SliderInteraction
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/APITests/SliderInteractionTests.cs File Reference

  • File List
  • File Members
  • Interactions
  • SliderInteraction
  • APITests
Classes | Namespaces

SliderInteractionTests.cs File Reference

Go to the source code of this file.

Classes

class | SliderInteractionTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/InteractionTests/SliderInteractionTests.cs File Reference

  • File List
  • File Members
  • Interactions
  • SliderInteraction
  • InteractionTests
Classes | Namespaces

SliderInteractionTests.cs File Reference

Go to the source code of this file.

Classes

class | SliderInteractionTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/TestUI/SliderInteractionPage.xaml.cs File Reference

  • File List
  • File Members
  • Interactions
  • SliderInteraction
  • TestUI
Classes | Namespaces

SliderInteractionPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SliderInteractionPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainer.cpp File Reference

  • File List
  • File Members
  • ItemContainer

ItemContainer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ItemContainer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "PointerInfoRevokers.h"
#include "ItemContainerInvokedEventArgs.h"
#include "ItemContainerAutomationPeer.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainer.h File Reference

  • File List
  • File Members
  • ItemContainer
Classes

ItemContainer.h File Reference

#include "ItemContainerTrace.h"
#include "ItemContainer.g.h"
#include "ItemContainer.properties.h"
#include "PointerInfo.h"

Go to the source code of this file.

Classes

class ItemContainer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainer.idl File Reference

  • File List
  • File Members
  • ItemContainer
Namespaces | Enumerations | Variables

ItemContainer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE

Enumerations

enum ItemContainerInteractionTrigger {
PointerPressed, PointerReleased, Tap, DoubleTap,
EnterKey, SpaceKey, AutomationInvoke
}
enum | ItemContainerMultiSelectMode { Auto = 1, Single = 2, Extended = 4, Multiple = 8 }
enum | ItemContainerUserInvokeMode { Auto = 1, UserCanInvoke = 2, UserCannotInvoke = 4 }
enum | ItemContainerUserSelectMode { Auto = 1, UserCanSelect = 2, UserCannotSelect = 4 }

Variables

unsealed runtimeclass
Microsoft UI Xaml Automation
Provider 		ISelectionItemProvider
unsealed runtimeclass | ItemContainerAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerAutomationPeer.cpp File Reference

  • File List
  • File Members
  • ItemContainer

ItemContainerAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "ItemContainer.h"
#include "ItemContainerAutomationPeer.h"
#include "ItemContainerAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerAutomationPeer.h File Reference

  • File List
  • File Members
  • ItemContainer
Classes

ItemContainerAutomationPeer.h File Reference

#include "ItemContainer.h"
#include "ItemContainerAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ItemContainerAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerInvokedEventArgs.cpp File Reference

  • File List
  • File Members
  • ItemContainer

ItemContainerInvokedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemContainerInvokedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerInvokedEventArgs.h File Reference

  • File List
  • File Members
  • ItemContainer
Classes

ItemContainerInvokedEventArgs.h File Reference

#include "ItemContainerInvokedEventArgs.g.h"

Go to the source code of this file.

Classes

class ItemContainerInvokedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerRevokers.h File Reference

  • File List
  • File Members
  • ItemContainer
Classes

ItemContainerRevokers.h File Reference

Go to the source code of this file.

Classes

class ItemContainerRevokers
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerTrace.h File Reference

  • File List
  • File Members
  • ItemContainer
Classes | Defines | Functions

ItemContainerTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | ItemContainerTrace

Defines

#define | ITEMCONTAINER_TRACE_INFO(sender, message,...)
#define | ITEMCONTAINER_TRACE_INFO_DBG(sender, message,...)
#define | ITEMCONTAINER_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) ItemContainerTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | ITEMCONTAINER_TRACE_PERF(info)
#define | ITEMCONTAINER_TRACE_PERF_DBG(info)
#define | ITEMCONTAINER_TRACE_VERBOSE(sender, message,...)
#define | ITEMCONTAINER_TRACE_VERBOSE_DBG(sender, message,...)
#define | ITEMCONTAINER_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) ItemContainerTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsItemContainerPerfTracingEnabled ()
bool | IsItemContainerTracingEnabled ()
bool | IsItemContainerVerboseTracingEnabled ()

Define Documentation

#define ITEMCONTAINER_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsItemContainerTracingEnabled()) \
{ \
    ITEMCONTAINER_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ItemContainerTrace::s_IsDebugOutputEnabled || ItemContainerTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ITEMCONTAINER_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file ItemContainerTrace.h.

#define ITEMCONTAINER_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file ItemContainerTrace.h.

#define ITEMCONTAINER_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ItemContainerTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file ItemContainerTrace.h.

#define ITEMCONTAINER_TRACE_PERF ( info )
Value:
if (IsItemContainerPerfTracingEnabled()) \
{ \
    ItemContainerTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file ItemContainerTrace.h.

#define ITEMCONTAINER_TRACE_PERF_DBG ( info )

Definition at line 71 of file ItemContainerTrace.h.

#define ITEMCONTAINER_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsItemContainerVerboseTracingEnabled()) \
{ \
    ITEMCONTAINER_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ItemContainerTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ITEMCONTAINER_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file ItemContainerTrace.h.

#define ITEMCONTAINER_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file ItemContainerTrace.h.

#define ITEMCONTAINER_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ItemContainerTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file ItemContainerTrace.h.

Function Documentation

bool IsItemContainerPerfTracingEnabled ( ) [inline]

Definition at line 25 of file ItemContainerTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_ITEMCONTAINER || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsItemContainerTracingEnabled ( ) [inline]

Definition at line 11 of file ItemContainerTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMCONTAINER || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsItemContainerVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file ItemContainerTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMCONTAINER || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/APITests/ItemContainerTests.cs File Reference

  • File List
  • File Members
  • ItemContainer
  • APITests
Classes | Namespaces

ItemContainerTests.cs File Reference

Go to the source code of this file.

Classes

class | ItemContainerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/InteractionTests/ItemContainerTests.cs File Reference

  • File List
  • File Members
  • ItemContainer
  • InteractionTests
Classes | Namespaces

ItemContainerTests.cs File Reference

Go to the source code of this file.

Classes

class | ItemContainerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/TestUI/ItemContainerLayoutPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemContainer
  • TestUI
Classes | Namespaces

ItemContainerLayoutPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemContainerLayoutPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/TestUI/ItemContainerPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemContainer
  • TestUI
Classes | Namespaces

ItemContainerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemContainerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/TestUI/ItemContainerSummaryPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemContainer
  • TestUI
Classes | Namespaces

ItemContainerSummaryPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemContainerSummaryPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ExtendedSelector.cpp File Reference

  • File List
  • File Members
  • ItemsView

ExtendedSelector.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ExtendedSelector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ExtendedSelector.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

ExtendedSelector.h File Reference

#include "SelectorBase.h"

Go to the source code of this file.

Classes

class ExtendedSelector
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsView.cpp File Reference

  • File List
  • File Members
  • ItemsView
Variables

ItemsView.cpp File Reference

#include "pch.h"
#include "common.h"
#include <DoubleUtil.h>
#include "TypeLogging.h"
#include "ItemsView.h"
#include "RuntimeProfiler.h"
#include "ItemsViewTestHooks.h"
#include "ItemsViewItemInvokedEventArgs.h"
#include "ItemsViewSelectionChangedEventArgs.h"
#include "ItemsViewAutomationPeer.h"
#include "NullSelector.h"
#include "SingleSelector.h"
#include "MultipleSelector.h"
#include "ExtendedSelector.h"
#include "ItemContainer.h"
#include "ItemContainerRevokers.h"
#include "ScrollView.h"
#include "SelectionNode.h"
#include "SelectionModel.h"
#include "SharedHelpers.h"

Go to the source code of this file.

Variables

const uint8_t c_renderingEventsPostBringIntoView = 4

Variable Documentation

const uint8_t c_renderingEventsPostBringIntoView = 4

Definition at line 30 of file ItemsView.cpp.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsView.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

ItemsView.h File Reference

#include "ItemsViewTrace.h"
#include "ItemsView.g.h"
#include "ItemsView.properties.h"
#include "SelectorBase.h"
#include "PointerInfo.h"

Go to the source code of this file.

Classes

class ItemsView
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsView.idl File Reference

  • File List
  • File Members
  • ItemsView
Namespaces | Enumerations | Variables

ItemsView.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE

Enumerations

enum | ItemsViewSelectionMode { None = 0, Single = 2, Multiple = 8, Extended = 4 }

Variables

unsealed runtimeclass | ItemsViewAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewAutomationPeer.cpp File Reference

  • File List
  • File Members
  • ItemsView

ItemsViewAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "ItemsView.h"
#include "ItemsViewTestHooks.h"
#include "Utils.h"
#include "ItemsViewAutomationPeer.h"
#include "ItemsViewAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewAutomationPeer.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

ItemsViewAutomationPeer.h File Reference

#include "ItemsView.h"
#include "ItemsViewAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ItemsViewAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewInteractions.cpp File Reference

  • File List
  • File Members
  • ItemsView

ItemsViewInteractions.cpp File Reference

#include "pch.h"
#include "common.h"
#include <DoubleUtil.h>
#include "TypeLogging.h"
#include "ItemsView.h"
#include "RuntimeProfiler.h"
#include "ItemsViewTestHooks.h"
#include "ItemsViewItemInvokedEventArgs.h"
#include "NullSelector.h"
#include "SharedHelpers.h"
#include "SingleSelector.h"
#include "ItemContainerRevokers.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewItemInvokedEventArgs.cpp File Reference

  • File List
  • File Members
  • ItemsView

ItemsViewItemInvokedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsViewTrace.h"
#include "ItemsViewItemInvokedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewItemInvokedEventArgs.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

ItemsViewItemInvokedEventArgs.h File Reference

#include "ItemsViewItemInvokedEventArgs.g.h"

Go to the source code of this file.

Classes

class ItemsViewItemInvokedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewSelectionChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • ItemsView

ItemsViewSelectionChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsViewSelectionChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewSelectionChangedEventArgs.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

ItemsViewSelectionChangedEventArgs.h File Reference

#include "ItemsViewSelectionChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class ItemsViewSelectionChangedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooks.cpp File Reference

  • File List
  • File Members
  • ItemsView

ItemsViewTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsViewTestHooksFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooks.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

ItemsViewTestHooks.h File Reference

#include "ItemsView.h"
#include "ItemsViewTestHooks.g.h"

Go to the source code of this file.

Classes

class ItemsViewTestHooks
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooks.idl File Reference

  • File List
  • File Members
  • ItemsView
Namespaces

ItemsViewTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • ItemsView

ItemsViewTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsViewTestHooksFactory.h"
#include "ItemsViewTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooksFactory.h File Reference

  • File List
  • File Members
  • ItemsView

ItemsViewTestHooksFactory.h File Reference

#include "ItemsViewTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTrace.h File Reference

  • File List
  • File Members
  • ItemsView
Classes | Defines | Functions

ItemsViewTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | ItemsViewTrace

Defines

#define | ITEMSVIEW_TRACE_INFO(sender, message,...)
#define | ITEMSVIEW_TRACE_INFO_DBG(sender, message,...)
#define | ITEMSVIEW_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) ItemsViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | ITEMSVIEW_TRACE_PERF(info)
#define | ITEMSVIEW_TRACE_PERF_DBG(info)
#define | ITEMSVIEW_TRACE_VERBOSE(sender, message,...)
#define | ITEMSVIEW_TRACE_VERBOSE_DBG(sender, message,...)
#define | ITEMSVIEW_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) ItemsViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsItemsViewPerfTracingEnabled ()
bool | IsItemsViewTracingEnabled ()
bool | IsItemsViewVerboseTracingEnabled ()

Define Documentation

#define ITEMSVIEW_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsItemsViewTracingEnabled()) \
{ \
    ITEMSVIEW_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ItemsViewTrace::s_IsDebugOutputEnabled || ItemsViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ITEMSVIEW_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file ItemsViewTrace.h.

#define ITEMSVIEW_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file ItemsViewTrace.h.

#define ITEMSVIEW_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ItemsViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file ItemsViewTrace.h.

#define ITEMSVIEW_TRACE_PERF ( info )
Value:
if (IsItemsViewPerfTracingEnabled()) \
{ \
    ItemsViewTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file ItemsViewTrace.h.

#define ITEMSVIEW_TRACE_PERF_DBG ( info )

Definition at line 71 of file ItemsViewTrace.h.

#define ITEMSVIEW_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsItemsViewVerboseTracingEnabled()) \
{ \
    ITEMSVIEW_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ItemsViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ITEMSVIEW_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file ItemsViewTrace.h.

#define ITEMSVIEW_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file ItemsViewTrace.h.

#define ITEMSVIEW_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ItemsViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file ItemsViewTrace.h.

Function Documentation

bool IsItemsViewPerfTracingEnabled ( ) [inline]

Definition at line 25 of file ItemsViewTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_ITEMSVIEW || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsItemsViewTracingEnabled ( ) [inline]

Definition at line 11 of file ItemsViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMSVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsItemsViewVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file ItemsViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMSVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/MultipleSelector.cpp File Reference

  • File List
  • File Members
  • ItemsView

MultipleSelector.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MultipleSelector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/MultipleSelector.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

MultipleSelector.h File Reference

#include "SelectorBase.h"

Go to the source code of this file.

Classes

class MultipleSelector
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/NullSelector.cpp File Reference

  • File List
  • File Members
  • ItemsView

NullSelector.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NullSelector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/NullSelector.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

NullSelector.h File Reference

#include "SelectorBase.h"

Go to the source code of this file.

Classes

class NullSelector
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/SelectorBase.cpp File Reference

  • File List
  • File Members
  • ItemsView

SelectorBase.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBase.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/SelectorBase.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

SelectorBase.h File Reference

#include "ItemsViewTrace.h"

Go to the source code of this file.

Classes

class SelectorBase
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/SingleSelector.cpp File Reference

  • File List
  • File Members
  • ItemsView

SingleSelector.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SingleSelector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/SingleSelector.h File Reference

  • File List
  • File Members
  • ItemsView
Classes

SingleSelector.h File Reference

#include "SelectorBase.h"

Go to the source code of this file.

Classes

class SingleSelector
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/APITests/ItemsViewTests.cs File Reference

  • File List
  • File Members
  • ItemsView
  • APITests
Classes | Namespaces

ItemsViewTests.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/InteractionTests/ItemsViewTestsWithInputHelper.cs File Reference

  • File List
  • File Members
  • ItemsView
  • InteractionTests
Classes | Namespaces

ItemsViewTestsWithInputHelper.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewTestsWithInputHelper
class | ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
class | ItemsViewTestsWithInputHelper::LoggingHelper

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewBlankPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemsView
  • TestUI
Classes | Namespaces

ItemsViewBlankPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewBlankPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewIntegrationPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemsView
  • TestUI
Classes | Namespaces

ItemsViewIntegrationPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewIntegrationPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewInteractiveTestsPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemsView
  • TestUI
Classes | Namespaces

ItemsViewInteractiveTestsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewInteractiveTestsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemsView
  • TestUI
Classes | Namespaces

ItemsViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewPictureLibraryPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemsView
  • TestUI
Classes | Namespaces | Enumerations

ItemsViewPictureLibraryPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewPictureLibraryPage
class | Picture
class | PictureLibrary

Namespaces

namespace | MUXControlsTestApp

Enumerations

enum | Location { Seattle, Miami, LA }
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewSummaryPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemsView
  • TestUI
Classes | Namespaces

ItemsViewSummaryPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewSummaryPage
class | ItemsViewSummaryPage::QueuedOperation

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewTransitionPage.xaml.cs File Reference

  • File List
  • File Members
  • ItemsView
  • TestUI
Classes | Namespaces

ItemsViewTransitionPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewTransitionPage
class | RefreshableCollection-g< T >

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanel.cpp File Reference

  • File List
  • File Members
  • LayoutPanel

LayoutPanel.cpp File Reference

#include <pch.h>
#include <common.h>
#include "LayoutPanel.h"
#include "LayoutPanelLayoutContext.h"
#include "LayoutPanel.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanel.h File Reference

  • File List
  • File Members
  • LayoutPanel
Classes

LayoutPanel.h File Reference

#include "LayoutPanel.g.h"
#include "LayoutPanel.properties.h"

Go to the source code of this file.

Classes

class LayoutPanel
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanel.idl File Reference

  • File List
  • File Members
  • LayoutPanel
Namespaces | Variables

LayoutPanel.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | LayoutPanel
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanelLayoutContext.cpp File Reference

  • File List
  • File Members
  • LayoutPanel

LayoutPanelLayoutContext.cpp File Reference

#include <pch.h>
#include <common.h>
#include "LayoutPanel.h"
#include "LayoutPanelLayoutContext.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanelLayoutContext.h File Reference

  • File List
  • File Members
  • LayoutPanel
Classes

LayoutPanelLayoutContext.h File Reference

#include "NonvirtualizingLayoutContext.h"

Go to the source code of this file.

Classes

class LayoutPanelLayoutContext
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/APITests/LayoutPanelTests.cs File Reference

  • File List
  • File Members
  • LayoutPanel
  • APITests
Classes | Namespaces

LayoutPanelTests.cs File Reference

Go to the source code of this file.

Classes

class | LayoutPanelTests
class | MyCustomNonVirtualizingStackLayout

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/AnimationUtility.cpp File Reference

  • File List
  • File Members
  • Lights
Functions

AnimationUtility.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AnimationUtility.h"

Go to the source code of this file.

Functions

void | SetValueDirect (const winrt::CompositionPropertySet &target, std::wstring_view const &propName, const float value)
void | SetValueDirect (const winrt::CompositionPropertySet &target, const SpotlightProperty prop, const winrt::Color &value)
void | SetValueDirect (const winrt::SpotLight &target, const SpotlightProperty prop, const float value)
void | SetValueDirect (const winrt::SpotLight &target, const SpotlightProperty prop, const winrt::float3 &value)
void | SetValueDirect (const winrt::CompositionPropertySet &target, std::wstring_view const &propName, const winrt::Color &value)

Function Documentation

void SetValueDirect | ( | const winrt::CompositionPropertySet & | target,
 |  | std::wstring_view const & | propName,
 |  | const float | value
 | ) |  |

Definition at line 8 of file AnimationUtility.cpp.

{
    target.InsertScalar(propName, value);
}

void SetValueDirect | ( | const winrt::CompositionPropertySet & | target,
 |  | const SpotlightProperty | prop,
 |  | const winrt::Color & | value
 | ) |  |

Definition at line 65 of file AnimationUtility.cpp.

{
    switch (prop)
    {
    case SpotlightProperty::InnerConeColor:
        target.InsertColor(L"InnerConeColor", value);
        break;
    case SpotlightProperty::OuterConeColor:
        target.InsertColor(L"OuterConeColor", value);
        break;
    }
}

void SetValueDirect | ( | const winrt::SpotLight & | target,
 |  | const SpotlightProperty | prop,
 |  | const float | value
 | ) |  |

Definition at line 31 of file AnimationUtility.cpp.

{
    switch (prop)
    {
    case SpotlightProperty::ConstantAttenuation:
        target.ConstantAttenuation(value);
        break;
    case SpotlightProperty::LinearAttenuation:
        target.LinearAttenuation(value);
        break;
    case SpotlightProperty::QuadraticAttenuation:
        target.QuadraticAttenuation(value);
        break;
    case SpotlightProperty::InnerConeAngleInDegrees:
        target.InnerConeAngleInDegrees(value);
        break;
    case SpotlightProperty::InnerConeAngle:
        target.InnerConeAngle(value);
        break;
    case SpotlightProperty::InnerConeIntensity:
        target.InnerConeIntensity(value);
        break;
    case SpotlightProperty::OuterConeAngleInDegrees:
        target.OuterConeAngleInDegrees(value);
        break;
    case SpotlightProperty::OuterConeAngle:
        target.OuterConeAngle(value);
        break;
    case SpotlightProperty::OuterConeIntensity:
        target.OuterConeIntensity(value);
        break;
    }
}

void SetValueDirect | ( | const winrt::SpotLight & | target,
 |  | const SpotlightProperty | prop,
 |  | const winrt::float3 & | value
 | ) |  |

Definition at line 18 of file AnimationUtility.cpp.

{
    switch (prop)
    {
    case SpotlightProperty::Offset:
        target.Offset(value);
        break;
    case SpotlightProperty::Direction:
        target.Direction(value);
        break;
    }
}

void SetValueDirect | ( | const winrt::CompositionPropertySet & | target,
 |  | std::wstring_view const & | propName,
 |  | const winrt::Color & | value
 | ) |  |

Definition at line 13 of file AnimationUtility.cpp.

{
    target.InsertColor(propName, value);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/AnimationUtility.h File Reference

  • File List
  • File Members
  • Lights
Functions

AnimationUtility.h File Reference

#include "SpotLightStateHelper.h"

Go to the source code of this file.

Functions

template<typename ValueType >
void | AnimateTo (const winrt::SpotLight &target, const RevealHoverSpotlightAnimationInfo< ValueType > &targetFrame)
template<typename ValueType >
void | AnimateTo (const winrt::CompositionPropertySet &target, const RevealHoverSpotlightAnimationInfo< ValueType > &targetFrame)
template<typename ValueType >
auto | MakeAnimation (const winrt::Compositor &compositor)
template<>
auto | MakeAnimation< float > (const winrt::Compositor &compositor)
template<>
auto | MakeAnimation< winrt::Color > (const winrt::Compositor &compositor)
template<typename ValueType >
void | SetupAnimationAndStart (const winrt::CompositionObject &target, const RevealHoverSpotlightAnimationInfo< ValueType > &targetFrame)
void | SetValueDirect (const winrt::SpotLight &target, const SpotlightProperty prop, const float value)
void | SetValueDirect (const winrt::CompositionPropertySet &target, const SpotlightProperty prop, const winrt::Color &value)
void | SetValueDirect (const winrt::SpotLight &target, const SpotlightProperty prop, const winrt::float3 &value)
void | SetValueDirect (const winrt::CompositionPropertySet &target, std::wstring_view const &propName, const float value)
void | SetValueDirect (const winrt::SpotLight &target, const SpotlightProperty prop, const winrt::Color &value)
void | SetValueDirect (const winrt::CompositionPropertySet &target, std::wstring_view const &propName, const winrt::Color &value)

Function Documentation

void AnimateTo | ( | const winrt::SpotLight & | target,
 |  | const RevealHoverSpotlightAnimationInfo< ValueType > & | targetFrame |
 | ) |  |  | [inline]

Definition at line 30 of file AnimationUtility.h.

{
    if (IsIgnored(targetFrame))
    {
        return;
    }

    target.StopAnimation(targetFrame.PropertyName);
    if (!IsAnimated(targetFrame))
    {
        SetValueDirect(target, targetFrame.SpotlightProperty, targetFrame.Value);
    }
    else
    {
        SetupAnimationAndStart(target, targetFrame);
    }
}

void AnimateTo | ( | const winrt::CompositionPropertySet & | target,
 |  | const RevealHoverSpotlightAnimationInfo< ValueType > & | targetFrame |
 | ) |  |  | [inline]

Definition at line 51 of file AnimationUtility.h.

{
    if (IsIgnored(targetFrame))
    {
        return;
    }

    target.StopAnimation(targetFrame.PropertyName);
    if (!IsAnimated(targetFrame))
    {
        SetValueDirect(target, targetFrame.PropertyName, targetFrame.Value);
    }
    else
    {
        SetupAnimationAndStart(target, targetFrame);
    }
}

auto MakeAnimation ( const winrt::Compositor & compositor ) [inline]
auto MakeAnimation< float > ( const winrt::Compositor & compositor ) [inline]
auto MakeAnimation< winrt::Color > ( const winrt::Compositor & compositor ) [inline]
void SetupAnimationAndStart | ( | const winrt::CompositionObject & | target,
 |  | const RevealHoverSpotlightAnimationInfo< ValueType > & | targetFrame |
 | ) |  |  | [inline]

Definition at line 72 of file AnimationUtility.h.

{
    auto compositor = target.Compositor();
    auto animation = MakeAnimation<ValueType>(compositor);

    animation.Duration(targetFrame.Duration);
    animation.StopBehavior(winrt::AnimationStopBehavior::LeaveCurrentValue);

    if (targetFrame.EasingInfo.EasingType == EasingTypes::CubicBezier)
    {
        animation.InsertKeyFrame(1, targetFrame.Value, compositor.CreateCubicBezierEasingFunction(targetFrame.EasingInfo.EasingControlPoint1, targetFrame.EasingInfo.EasingControlPoint2));
    }
    else if (targetFrame.EasingInfo.EasingType == EasingTypes::Linear)
    {
        animation.InsertKeyFrame(1, targetFrame.Value, compositor.CreateLinearEasingFunction());
    }
    else
    {
        animation.InsertKeyFrame(1, targetFrame.Value);
    }

    target.StartAnimation(targetFrame.PropertyName, animation);
}

void SetValueDirect | ( | const winrt::SpotLight & | target,
 |  | const SpotlightProperty | prop,
 |  | const float | value
 | ) |  |

Definition at line 31 of file AnimationUtility.cpp.

{
    switch (prop)
    {
    case SpotlightProperty::ConstantAttenuation:
        target.ConstantAttenuation(value);
        break;
    case SpotlightProperty::LinearAttenuation:
        target.LinearAttenuation(value);
        break;
    case SpotlightProperty::QuadraticAttenuation:
        target.QuadraticAttenuation(value);
        break;
    case SpotlightProperty::InnerConeAngleInDegrees:
        target.InnerConeAngleInDegrees(value);
        break;
    case SpotlightProperty::InnerConeAngle:
        target.InnerConeAngle(value);
        break;
    case SpotlightProperty::InnerConeIntensity:
        target.InnerConeIntensity(value);
        break;
    case SpotlightProperty::OuterConeAngleInDegrees:
        target.OuterConeAngleInDegrees(value);
        break;
    case SpotlightProperty::OuterConeAngle:
        target.OuterConeAngle(value);
        break;
    case SpotlightProperty::OuterConeIntensity:
        target.OuterConeIntensity(value);
        break;
    }
}

void SetValueDirect | ( | const winrt::CompositionPropertySet & | target,
 |  | const SpotlightProperty | prop,
 |  | const winrt::Color & | value
 | ) |  |

Definition at line 65 of file AnimationUtility.cpp.

{
    switch (prop)
    {
    case SpotlightProperty::InnerConeColor:
        target.InsertColor(L"InnerConeColor", value);
        break;
    case SpotlightProperty::OuterConeColor:
        target.InsertColor(L"OuterConeColor", value);
        break;
    }
}

void SetValueDirect | ( | const winrt::SpotLight & | target,
 |  | const SpotlightProperty | prop,
 |  | const winrt::float3 & | value
 | ) |  |

Definition at line 18 of file AnimationUtility.cpp.

{
    switch (prop)
    {
    case SpotlightProperty::Offset:
        target.Offset(value);
        break;
    case SpotlightProperty::Direction:
        target.Direction(value);
        break;
    }
}

void SetValueDirect | ( | const winrt::CompositionPropertySet & | target,
 |  | std::wstring_view const & | propName,
 |  | const float | value
 | ) |  |

Definition at line 8 of file AnimationUtility.cpp.

{
    target.InsertScalar(propName, value);
}

void SetValueDirect | ( | const winrt::SpotLight & | target,
 |  | const SpotlightProperty | prop,
 |  | const winrt::Color & | value
 | ) |  |
void SetValueDirect | ( | const winrt::CompositionPropertySet & | target,
 |  | std::wstring_view const & | propName,
 |  | const winrt::Color & | value
 | ) |  |

Definition at line 13 of file AnimationUtility.cpp.

{
    target.InsertColor(propName, value);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/IsTargetDPHelper.h File Reference

  • File List
  • File Members
  • Lights
Functions

IsTargetDPHelper.h File Reference

Go to the source code of this file.

Functions

template<typename T >
auto | InitializeIsTargetDependencyProperty ()
template<typename T >
void | OnAttachedIsTargetPropertyChanged (const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args)

Function Documentation

auto InitializeIsTargetDependencyProperty ( ) [inline]

Definition at line 36 of file IsTargetDPHelper.h.

{
    return InitializeDependencyProperty(
        L"IsTarget",
        winrt::name_of<bool>(),
        winrt::name_of<winrt::DependencyObject>(),
        true /* isAttached */,
        box_value(false),
        &OnAttachedIsTargetPropertyChanged<T>);
}

void OnAttachedIsTargetPropertyChanged | ( | const winrt::DependencyObject & | sender,
 |  | const winrt::DependencyPropertyChangedEventArgs & | args |
 | ) |  |  | [inline]

Definition at line 7 of file IsTargetDPHelper.h.

{
    if (auto element = sender.try_as<winrt::UIElement>())
    {
        if (unbox_value<bool>(args.NewValue()))
        {
            winrt::XamlLight::AddTargetElement(T::GetLightIdStatic(), element);
        }
        else
        {
            winrt::XamlLight::RemoveTargetElement(T::GetLightIdStatic(), element);
        }
    }
    else if (auto brush = sender.try_as<winrt::Brush>())
    {
        if (unbox_value<bool>(args.NewValue()))
        {
            winrt::XamlLight::AddTargetBrush(T::GetLightIdStatic(), brush);
        }
        else
        {
            winrt::XamlLight::RemoveTargetBrush(T::GetLightIdStatic(), brush);
        }
    }
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelper.cpp File Reference

  • File List
  • File Members
  • Lights

MaterialHelper.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MaterialHelper.h"
#include "AcrylicBrush.h"
#include "RevealBrush.h"
#include "XamlAmbientLight.h"
#include "RevealBorderLight.h"
#include "RevealHoverLight.h"
#include "ResourceAccessor.h"
#include "LifetimeHandler.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelper.h File Reference

  • File List
  • File Members
  • Lights
Classes

MaterialHelper.h File Reference

#include "AcrylicTestApi.h"

Go to the source code of this file.

Classes

class | MaterialHelper
class | MaterialHelperBase
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApi.cpp File Reference

  • File List
  • File Members
  • Lights

MaterialHelperTestApi.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MaterialHelper.h"
#include "MaterialHelperTestApi.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApi.h File Reference

  • File List
  • File Members
  • Lights
Classes

MaterialHelperTestApi.h File Reference

#include "MaterialHelperTestApi.g.h"

Go to the source code of this file.

Classes

class MaterialHelperTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApi.idl File Reference

  • File List
  • File Members
  • Lights
Namespaces | Variables

MaterialHelperTestApi.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_MEDIA_NAMESPACE

Variables

runtimeclass | MaterialHelperTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApiFactory.cpp File Reference

  • File List
  • File Members
  • Lights

MaterialHelperTestApiFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MaterialHelper.h"
#include "MaterialHelperTestApiFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApiFactory.h File Reference

  • File List
  • File Members
  • Lights

MaterialHelperTestApiFactory.h File Reference

#include "MaterialHelperTestApi.h"
#include "MaterialHelperTestApi.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealBorderLight.cpp File Reference

  • File List
  • File Members
  • Lights

RevealBorderLight.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBorderLight.h"
#include "IsTargetDPHelper.h"
#include "SpotLightStateHelper.h"
#include "MaterialHelper.h"
#include <winrt/Windows.Devices.Input.h>
#include "Microsoft.UI.Private.Composition.Effects_impl.h"
#include "RevealBorderLight.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealBorderLight.h File Reference

  • File List
  • File Members
  • Lights
Classes

RevealBorderLight.h File Reference

#include "MaterialHelper.h"
#include "RevealTestApi.h"
#include "RevealBorderLight.g.h"

Go to the source code of this file.

Classes

class RevealBorderLight
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealBorderLight.idl File Reference

  • File List
  • File Members
  • Lights
Namespaces | Variables

RevealBorderLight.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_MEDIA_NAMESPACE

Variables

unsealed runtimeclass | RevealBorderLight
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealHoverLight.cpp File Reference

  • File List
  • File Members
  • Lights

RevealHoverLight.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealHoverLight.h"
#include "IsTargetDPHelper.h"
#include "SpotLightStateHelper.h"
#include "Microsoft.UI.Private.Composition.Effects_impl.h"
#include "RevealHoverLight.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealHoverLight.h File Reference

  • File List
  • File Members
  • Lights
Classes

RevealHoverLight.h File Reference

#include "MaterialHelper.h"
#include "SpotLightStateHelper.h"
#include "RevealTestApi.h"
#include "RevealHoverLight.g.h"

Go to the source code of this file.

Classes

class RevealHoverLight
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealHoverLight.idl File Reference

  • File List
  • File Members
  • Lights
Namespaces | Variables

RevealHoverLight.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_MEDIA_NAMESPACE

Variables

unsealed runtimeclass | RevealHoverLight
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealTestApi.cpp File Reference

  • File List
  • File Members
  • Lights

RevealTestApi.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealTestApi.h"
#include "RevealHoverLight.h"
#include "RevealBorderLight.h"
#include "RevealTestApi.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealTestApi.h File Reference

  • File List
  • File Members
  • Lights
Classes

RevealTestApi.h File Reference

#include "RevealTestApi.g.h"

Go to the source code of this file.

Classes

class RevealTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealTestApi.idl File Reference

  • File List
  • File Members
  • Lights
Namespaces | Functions | Variables

RevealTestApi.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_MEDIA_NAMESPACE

Functions

Boolean | BorderLight_ShouldBeOn (RevealBorderLight value)
RevealBorderLight | GetAsRevealBorderLight (Microsoft.UI.Xaml.Media.XamlLight value)
RevealHoverLight | GetAsRevealHoverLight (Microsoft.UI.Xaml.Media.XamlLight value)
Microsoft UI Composition
ExpressionAnimation 		GetHoverLightOffsetExpression (RevealHoverLight value)
Microsoft UI Composition SpotLight | GetSpotLight (Microsoft.UI.Xaml.Media.XamlLight value)
Boolean | HoverLight_IsPointerOver (RevealHoverLight value)
Boolean | HoverLight_IsPressed (RevealHoverLight value)
Boolean | HoverLight_ShouldBeOn (RevealHoverLight value)

Variables

runtimeclass | RevealTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/SpotLightStateHelper.cpp File Reference

  • File List
  • File Members
  • Lights
Functions

SpotLightStateHelper.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SpotLightStateHelper.h"
#include "AnimationUtility.h"

Go to the source code of this file.

Functions

winrt::CompositionPropertySet | CreateSpotLightColorsProxy (const winrt::SpotLight &compositionSpotLight)
bool | IsStateAnimated (const RevealHoverSpotlightStateDesc &state)
bool | IsStateIgnored (const RevealHoverSpotlightStateDesc &state)
void | PlaySpotLightStateAnimation (const winrt::SpotLight &compositionSpotLight, const winrt::CompositionPropertySet &colorsProxy, const winrt::CompositionPropertySet &offsetProps, const RevealHoverSpotlightStateDesc &targetState, std::function< void()> *cancelationFunction, std::function< void()> onComplete)
void | SetSpotLightStateImmediate (const winrt::SpotLight &compositionSpotLight, const winrt::CompositionPropertySet &colorsProxy, const winrt::CompositionPropertySet &offsetProps, const RevealHoverSpotlightStateDesc &targetState)
void | SetSpotLightStateImmediate (const winrt::SpotLight &compositionSpotLight, const winrt::CompositionPropertySet &colorsProxy, const winrt::CompositionPropertySet &offsetProps, const RevealBorderSpotlightStateDesc &targetState)

Function Documentation

winrt::CompositionPropertySet CreateSpotLightColorsProxy ( const winrt::SpotLight & compositionSpotLight )

Definition at line 140 of file SpotLightStateHelper.cpp.

{
    auto lightProperties = compositionSpotLight.Properties();
    auto compositor = compositionSpotLight.Compositor();

    lightProperties.InsertColor(L"InnerConeColor", { 255, 255, 255, 255 });
    lightProperties.InsertColor(L"OuterConeColor", { 255, 255, 255, 255 });
    lightProperties.InsertScalar(L"LightIntensity", 0);

    auto innerConeColorExpression = compositor.CreateExpressionAnimation(L"ColorLerp(ColorRgb(0,0,0,0), target.InnerConeColor, target.LightIntensity)");
    innerConeColorExpression.SetReferenceParameter(L"target", lightProperties);

    auto outerConeColorExpression = compositor.CreateExpressionAnimation(L"ColorLerp(ColorRgb(0,0,0,0), target.OuterConeColor, target.LightIntensity)");
    outerConeColorExpression.SetReferenceParameter(L"target", lightProperties);

    compositionSpotLight.StartAnimation(L"InnerConeColor", innerConeColorExpression);
    compositionSpotLight.StartAnimation(L"OuterConeColor", outerConeColorExpression);

    return lightProperties;
}

bool IsStateAnimated ( const RevealHoverSpotlightStateDesc & state ) [inline]

Definition at line 9 of file SpotLightStateHelper.cpp.

{
    bool isColorOrIntensityAnimated = (!IsIgnored(state.InnerConeIntensity) && IsAnimated(state.InnerConeIntensity)) ||
        (!IsIgnored(state.OuterConeIntensity) && IsAnimated(state.OuterConeIntensity));

    const bool isOuterAngleScaleAnimated = !IsIgnored(state.OuterAngleScale) && IsAnimated(state.OuterAngleScale);

    return isColorOrIntensityAnimated || isOuterAngleScaleAnimated;
}

bool IsStateIgnored ( const RevealHoverSpotlightStateDesc & state ) [inline]

Definition at line 19 of file SpotLightStateHelper.cpp.

{
    bool isColorOrIntensityIgnored = IsIgnored(state.InnerConeIntensity) && IsIgnored(state.OuterConeIntensity);
    const bool isOuterAngleScaleIgnored = IsIgnored(state.OuterAngleScale);

    return isColorOrIntensityIgnored && isOuterAngleScaleIgnored;
}

void PlaySpotLightStateAnimation | ( | const winrt::SpotLight & | compositionSpotLight,
 |  | const winrt::CompositionPropertySet & | colorsProxy,
 |  | const winrt::CompositionPropertySet & | offsetProps,
 |  | const RevealHoverSpotlightStateDesc & | targetState,
 |  | std::function< void()> * | cancelationFunction,
 |  | std::function< void()> | onComplete
 | ) |  |

Definition at line 29 of file SpotLightStateHelper.cpp.

{
    if (cancelationFunction) *cancelationFunction = nullptr;

    if (compositionSpotLight && colorsProxy && offsetProps)
    {
        if (!IsStateAnimated(targetState))
        {
            AnimateTo(compositionSpotLight, targetState.InnerConeIntensity);
            AnimateTo(compositionSpotLight, targetState.OuterConeIntensity);
            AnimateTo(offsetProps, targetState.OuterAngleScale);

            if (onComplete)
            {
                onComplete();
            }
        }
        else
        {
            winrt::CompositionScopedBatch scopedBatch = compositionSpotLight.Compositor().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);

            AnimateTo(compositionSpotLight, targetState.InnerConeIntensity);
            AnimateTo(compositionSpotLight, targetState.OuterConeIntensity);
            AnimateTo(offsetProps, targetState.OuterAngleScale);

            scopedBatch.End();

            if (onComplete)
            {
                const auto completedEventToken = scopedBatch.Completed([onComplete = std::move(onComplete)](auto&, auto&)
                {
                    onComplete();
                });

                if (cancelationFunction)
                {
                    *cancelationFunction = [scopedBatch, completedEventToken]
                    {
                        scopedBatch.Completed(completedEventToken);
                    };
                }
            }
        }
    }
    else
    {
        if (onComplete)
        {
            onComplete();
        }
    }
}

void SetSpotLightStateImmediate | ( | const winrt::SpotLight & | compositionSpotLight,
 |  | const winrt::CompositionPropertySet & | colorsProxy,
 |  | const winrt::CompositionPropertySet & | offsetProps,
 |  | const RevealHoverSpotlightStateDesc & | targetState
 | ) |  |

Definition at line 88 of file SpotLightStateHelper.cpp.

{
    if (!compositionSpotLight || IsStateIgnored(targetState))
    {
        return;
    }

    if (!IsIgnored(targetState.InnerConeIntensity))
    {
        SetValueDirect(compositionSpotLight, targetState.InnerConeIntensity.SpotlightProperty, targetState.InnerConeIntensity.Value);
    }

    if (!IsIgnored(targetState.OuterConeIntensity))
    {
        SetValueDirect(compositionSpotLight, targetState.OuterConeIntensity.SpotlightProperty, targetState.OuterConeIntensity.Value);
    }

    if (!IsIgnored(targetState.OuterAngleScale))
    {
        SetValueDirect(offsetProps, targetState.OuterAngleScale.PropertyName, targetState.OuterAngleScale.Value);
    }
}

void SetSpotLightStateImmediate | ( | const winrt::SpotLight & | compositionSpotLight,
 |  | const winrt::CompositionPropertySet & | colorsProxy,
 |  | const winrt::CompositionPropertySet & | offsetProps,
 |  | const RevealBorderSpotlightStateDesc & | targetState
 | ) |  |

Definition at line 114 of file SpotLightStateHelper.cpp.

{
    if (!compositionSpotLight)
    {
        return;
    }

    SetValueDirect(compositionSpotLight, targetState.ConstantAttenuation.SpotlightProperty, targetState.ConstantAttenuation.Value);
    SetValueDirect(compositionSpotLight, targetState.LinearAttenuation.SpotlightProperty, targetState.LinearAttenuation.Value);
    SetValueDirect(compositionSpotLight, targetState.InnerConeAngleInDegrees.SpotlightProperty, targetState.InnerConeAngleInDegrees.Value);
    SetValueDirect(colorsProxy, targetState.InnerConeColor.SpotlightProperty, targetState.InnerConeColor.Value);
    SetValueDirect(compositionSpotLight, targetState.OuterConeAngleInDegrees.SpotlightProperty, targetState.OuterConeAngleInDegrees.Value);
    SetValueDirect(colorsProxy, targetState.OuterConeColor.SpotlightProperty, targetState.OuterConeColor.Value);
    SetValueDirect(offsetProps, targetState.Height.PropertyName, targetState.Height.Value);
    SetValueDirect(offsetProps, targetState.OuterAngleScale.PropertyName, targetState.OuterAngleScale.Value);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/SpotLightStateHelper.h File Reference

  • File List
  • File Members
  • Lights
Classes | Enumerations | Functions

SpotLightStateHelper.h File Reference

#include "CppWinRTHelpers.h"

Go to the source code of this file.

Classes

struct | EasingInfo
struct | RevealBorderSpotlightInfo< ValueType >
struct | RevealBorderSpotlightStateDesc
struct | RevealHoverSpotlightAnimationInfo< ValueType >
struct | RevealHoverSpotlightStateDesc

Enumerations

enum | EasingTypes { Default, CubicBezier, Linear, Step }
enum | RevealHoverSpotlightFlags { None = 0x0, Ignore = 0x1, Animate = 0x2 }
enum RevealHoverSpotlightState {
RevealHoverSpotlightState_AnimToOff, RevealHoverSpotlightState_AnimToHover, RevealHoverSpotlightState_Pressing, RevealHoverSpotlightState_FastRelease,
RevealHoverSpotlightState_SlowRelease, RevealHoverSpotlightState_StateCount
}
enum SpotlightProperty {
None = 0x0, Offset, Direction, ConstantAttenuation,
LinearAttenuation, QuadraticAttenuation, InnerConeAngleInDegrees, InnerConeAngle,
InnerConeColor, InnerConeIntensity, OuterConeAngleInDegrees, OuterConeAngle,
OuterConeColor, OuterConeIntensity, Height, OuterAngleScale
}

Functions

winrt::CompositionPropertySet | CreateSpotLightColorsProxy (const winrt::SpotLight &compositionSpotLight)
template<typename ValueType >
bool | IsAnimated (const RevealHoverSpotlightAnimationInfo< ValueType > &info)
template<typename ValueType >
bool | IsIgnored (const RevealHoverSpotlightAnimationInfo< ValueType > &info)
bool | IsStateAnimated (const RevealHoverSpotlightStateDesc &state)
bool | IsStateIgnored (const RevealHoverSpotlightStateDesc &state)
void | PlaySpotLightStateAnimation (const winrt::SpotLight &compositionSpotLight, const winrt::CompositionPropertySet &colorsProxy, const winrt::CompositionPropertySet &offsetProps, const RevealHoverSpotlightStateDesc &targetState, std::function< void()> *cancelationFunction=nullptr, std::function< void()> onComplete=nullptr)
void | SetSpotLightStateImmediate (const winrt::SpotLight &compositionSpotLight, const winrt::CompositionPropertySet &colorsProxy, const winrt::CompositionPropertySet &offsetProps, const RevealHoverSpotlightStateDesc &targetState)
void | SetSpotLightStateImmediate (const winrt::SpotLight &compositionSpotLight, const winrt::CompositionPropertySet &colorsProxy, const winrt::CompositionPropertySet &offsetProps, const RevealBorderSpotlightStateDesc &targetState)

Enumeration Type Documentation

enum EasingTypes
Enumerator:
Default
CubicBezier
Linear
Step

Definition at line 8 of file SpotLightStateHelper.h.

{
    Default,
    CubicBezier,
    Linear,
    Step
};

enum RevealHoverSpotlightFlags
Enumerator:
None
Ignore
Animate

Definition at line 39 of file SpotLightStateHelper.h.

{
    None = 0x0,
    Ignore = 0x1,
    Animate = 0x2
};

enum RevealHoverSpotlightState
Enumerator:
RevealHoverSpotlightState_AnimToOff
RevealHoverSpotlightState_AnimToHover
RevealHoverSpotlightState_Pressing
RevealHoverSpotlightState_FastRelease
RevealHoverSpotlightState_SlowRelease
RevealHoverSpotlightState_StateCount

Definition at line 73 of file SpotLightStateHelper.h.

{
    RevealHoverSpotlightState_AnimToOff,
    RevealHoverSpotlightState_AnimToHover,
    RevealHoverSpotlightState_Pressing,
    RevealHoverSpotlightState_FastRelease,
    RevealHoverSpotlightState_SlowRelease,

    RevealHoverSpotlightState_StateCount
};

enum SpotlightProperty
Enumerator:
None
Offset
Direction
ConstantAttenuation
LinearAttenuation
QuadraticAttenuation
InnerConeAngleInDegrees
InnerConeAngle
InnerConeColor
InnerConeIntensity
OuterConeAngleInDegrees
OuterConeAngle
OuterConeColor
OuterConeIntensity
Height
OuterAngleScale

Definition at line 17 of file SpotLightStateHelper.h.

{
    None,
    Offset,
    Direction,
    ConstantAttenuation,
    LinearAttenuation,
    QuadraticAttenuation,
    InnerConeAngleInDegrees,
    InnerConeAngle,
    InnerConeColor,
    InnerConeIntensity,
    OuterConeAngleInDegrees,
    OuterConeAngle,
    OuterConeColor,
    OuterConeIntensity,
    Height,
    OuterAngleScale
};

Function Documentation

winrt::CompositionPropertySet CreateSpotLightColorsProxy ( const winrt::SpotLight & compositionSpotLight )

Definition at line 140 of file SpotLightStateHelper.cpp.

{
    auto lightProperties = compositionSpotLight.Properties();
    auto compositor = compositionSpotLight.Compositor();

    lightProperties.InsertColor(L"InnerConeColor", { 255, 255, 255, 255 });
    lightProperties.InsertColor(L"OuterConeColor", { 255, 255, 255, 255 });
    lightProperties.InsertScalar(L"LightIntensity", 0);

    auto innerConeColorExpression = compositor.CreateExpressionAnimation(L"ColorLerp(ColorRgb(0,0,0,0), target.InnerConeColor, target.LightIntensity)");
    innerConeColorExpression.SetReferenceParameter(L"target", lightProperties);

    auto outerConeColorExpression = compositor.CreateExpressionAnimation(L"ColorLerp(ColorRgb(0,0,0,0), target.OuterConeColor, target.LightIntensity)");
    outerConeColorExpression.SetReferenceParameter(L"target", lightProperties);

    compositionSpotLight.StartAnimation(L"InnerConeColor", innerConeColorExpression);
    compositionSpotLight.StartAnimation(L"OuterConeColor", outerConeColorExpression);

    return lightProperties;
}

bool IsAnimated ( const RevealHoverSpotlightAnimationInfo< ValueType > & info )

Definition at line 107 of file SpotLightStateHelper.h.

{
    return (int)RevealHoverSpotlightFlags::Animate & (int)info.Flags;
}

bool IsIgnored ( const RevealHoverSpotlightAnimationInfo< ValueType > & info )

Definition at line 113 of file SpotLightStateHelper.h.

{
    return (int)RevealHoverSpotlightFlags::Ignore & (int)info.Flags;
}

bool IsStateAnimated ( const RevealHoverSpotlightStateDesc & state ) [inline]

Definition at line 9 of file SpotLightStateHelper.cpp.

{
    bool isColorOrIntensityAnimated = (!IsIgnored(state.InnerConeIntensity) && IsAnimated(state.InnerConeIntensity)) ||
        (!IsIgnored(state.OuterConeIntensity) && IsAnimated(state.OuterConeIntensity));

    const bool isOuterAngleScaleAnimated = !IsIgnored(state.OuterAngleScale) && IsAnimated(state.OuterAngleScale);

    return isColorOrIntensityAnimated || isOuterAngleScaleAnimated;
}

bool IsStateIgnored ( const RevealHoverSpotlightStateDesc & state ) [inline]

Definition at line 19 of file SpotLightStateHelper.cpp.

{
    bool isColorOrIntensityIgnored = IsIgnored(state.InnerConeIntensity) && IsIgnored(state.OuterConeIntensity);
    const bool isOuterAngleScaleIgnored = IsIgnored(state.OuterAngleScale);

    return isColorOrIntensityIgnored && isOuterAngleScaleIgnored;
}

void PlaySpotLightStateAnimation | ( | const winrt::SpotLight & | compositionSpotLight,
 |  | const winrt::CompositionPropertySet & | colorsProxy,
 |  | const winrt::CompositionPropertySet & | offsetProps,
 |  | const RevealHoverSpotlightStateDesc & | targetState,
 |  | std::function< void()> * | cancelationFunction = nullptr,
 |  | std::function< void()> | onComplete = nullptr
 | ) |  |

Definition at line 29 of file SpotLightStateHelper.cpp.

{
    if (cancelationFunction) *cancelationFunction = nullptr;

    if (compositionSpotLight && colorsProxy && offsetProps)
    {
        if (!IsStateAnimated(targetState))
        {
            AnimateTo(compositionSpotLight, targetState.InnerConeIntensity);
            AnimateTo(compositionSpotLight, targetState.OuterConeIntensity);
            AnimateTo(offsetProps, targetState.OuterAngleScale);

            if (onComplete)
            {
                onComplete();
            }
        }
        else
        {
            winrt::CompositionScopedBatch scopedBatch = compositionSpotLight.Compositor().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);

            AnimateTo(compositionSpotLight, targetState.InnerConeIntensity);
            AnimateTo(compositionSpotLight, targetState.OuterConeIntensity);
            AnimateTo(offsetProps, targetState.OuterAngleScale);

            scopedBatch.End();

            if (onComplete)
            {
                const auto completedEventToken = scopedBatch.Completed([onComplete = std::move(onComplete)](auto&, auto&)
                {
                    onComplete();
                });

                if (cancelationFunction)
                {
                    *cancelationFunction = [scopedBatch, completedEventToken]
                    {
                        scopedBatch.Completed(completedEventToken);
                    };
                }
            }
        }
    }
    else
    {
        if (onComplete)
        {
            onComplete();
        }
    }
}

void SetSpotLightStateImmediate | ( | const winrt::SpotLight & | compositionSpotLight,
 |  | const winrt::CompositionPropertySet & | colorsProxy,
 |  | const winrt::CompositionPropertySet & | offsetProps,
 |  | const RevealHoverSpotlightStateDesc & | targetState
 | ) |  |

Definition at line 88 of file SpotLightStateHelper.cpp.

{
    if (!compositionSpotLight || IsStateIgnored(targetState))
    {
        return;
    }

    if (!IsIgnored(targetState.InnerConeIntensity))
    {
        SetValueDirect(compositionSpotLight, targetState.InnerConeIntensity.SpotlightProperty, targetState.InnerConeIntensity.Value);
    }

    if (!IsIgnored(targetState.OuterConeIntensity))
    {
        SetValueDirect(compositionSpotLight, targetState.OuterConeIntensity.SpotlightProperty, targetState.OuterConeIntensity.Value);
    }

    if (!IsIgnored(targetState.OuterAngleScale))
    {
        SetValueDirect(offsetProps, targetState.OuterAngleScale.PropertyName, targetState.OuterAngleScale.Value);
    }
}

void SetSpotLightStateImmediate | ( | const winrt::SpotLight & | compositionSpotLight,
 |  | const winrt::CompositionPropertySet & | colorsProxy,
 |  | const winrt::CompositionPropertySet & | offsetProps,
 |  | const RevealBorderSpotlightStateDesc & | targetState
 | ) |  |

Definition at line 114 of file SpotLightStateHelper.cpp.

{
    if (!compositionSpotLight)
    {
        return;
    }

    SetValueDirect(compositionSpotLight, targetState.ConstantAttenuation.SpotlightProperty, targetState.ConstantAttenuation.Value);
    SetValueDirect(compositionSpotLight, targetState.LinearAttenuation.SpotlightProperty, targetState.LinearAttenuation.Value);
    SetValueDirect(compositionSpotLight, targetState.InnerConeAngleInDegrees.SpotlightProperty, targetState.InnerConeAngleInDegrees.Value);
    SetValueDirect(colorsProxy, targetState.InnerConeColor.SpotlightProperty, targetState.InnerConeColor.Value);
    SetValueDirect(compositionSpotLight, targetState.OuterConeAngleInDegrees.SpotlightProperty, targetState.OuterConeAngleInDegrees.Value);
    SetValueDirect(colorsProxy, targetState.OuterConeColor.SpotlightProperty, targetState.OuterConeColor.Value);
    SetValueDirect(offsetProps, targetState.Height.PropertyName, targetState.Height.Value);
    SetValueDirect(offsetProps, targetState.OuterAngleScale.PropertyName, targetState.OuterAngleScale.Value);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/XamlAmbientLight.cpp File Reference

  • File List
  • File Members
  • Lights

XamlAmbientLight.cpp File Reference

#include "pch.h"
#include "common.h"
#include "XamlAmbientLight.h"
#include "IsTargetDPHelper.h"
#include "Microsoft.UI.Private.Composition.Effects_impl.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/XamlAmbientLight.h File Reference

  • File List
  • File Members
  • Lights
Classes

XamlAmbientLight.h File Reference

#include "MaterialHelper.h"
#include "XamlAmbientLight.g.h"
#include "XamlAmbientLight.properties.h"

Go to the source code of this file.

Classes

class XamlAmbientLight
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/XamlAmbientLight.idl File Reference

  • File List
  • File Members
  • Lights
Namespaces | Variables

XamlAmbientLight.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_MEDIA_NAMESPACE

Variables

unsealed runtimeclass | XamlAmbientLight
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/ApiTests/Lights_ApiTests/LightConfigurationTests.cs File Reference

  • File List
  • File Members
  • Lights
  • ApiTests
  • Lights_ApiTests
Classes | Namespaces

LightConfigurationTests.cs File Reference

Go to the source code of this file.

Classes

class | LightConfigurationTests
class | MainWindowLightConfiguration
class | SecondaryWindowLightConfiguration

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControl.cpp File Reference

  • File List
  • File Members
  • MapControl

MapControl.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapControl.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "WebView2.h"
#include <winrt/Microsoft.UI.Xaml.Controls.h>
#include <winrt/Windows.Devices.Geolocation.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/windows.data.json.h>
#include "MapElementClickEventArgs.h"
#include "MapControlMapServiceErrorOccurredEventArgs.h"
#include "MapElementsLayer.h"
#include "Vector.h"
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControl.h File Reference

  • File List
  • File Members
  • MapControl
Classes

MapControl.h File Reference

#include "pch.h"
#include "common.h"
#include "MapControl.g.h"
#include "MapControl.properties.h"
#include "WebView2.h"
#include "MapElementsLayer.h"
#include "winrt/Windows.Foundation.h"
#include <winrt/Windows.Devices.Geolocation.h>

Go to the source code of this file.

Classes

class MapControl
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControl.idl File Reference

  • File List
  • File Members
  • MapControl
Namespaces | Variables

MapControl.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | MapControl
unsealed runtimeclass | MapElement
event Windows Foundation
TypedEventHandler< MapControl,
MapElementClickEventArgs > 		MapElementClick
unsealed runtimeclass | MapLayer
event Windows Foundation
TypedEventHandler< MapControl,
MapControlMapServiceErrorOccurredEventArgs > 		MapServiceErrorOccurred
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControlMapServiceErrorOccurredEventArgs.cpp File Reference

  • File List
  • File Members
  • MapControl

MapControlMapServiceErrorOccurredEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapControlMapServiceErrorOccurredEventArgs.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControlMapServiceErrorOccurredEventArgs.h File Reference

  • File List
  • File Members
  • MapControl
Classes

MapControlMapServiceErrorOccurredEventArgs.h File Reference

#include "pch.h"
#include "common.h"
#include "MapControlMapServiceErrorOccurredEventArgs.g.h"

Go to the source code of this file.

Classes

class MapControlMapServiceErrorOccurredEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElement.cpp File Reference

  • File List
  • File Members
  • MapControl

MapElement.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapElement.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElement.h File Reference

  • File List
  • File Members
  • MapControl
Classes

MapElement.h File Reference

#include "pch.h"
#include "common.h"
#include "MapElement.g.h"

Go to the source code of this file.

Classes

class MapElement
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElementClickEventArgs.cpp File Reference

  • File List
  • File Members
  • MapControl

MapElementClickEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapElementClickEventArgs.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElementClickEventArgs.h File Reference

  • File List
  • File Members
  • MapControl
Classes

MapElementClickEventArgs.h File Reference

#include "pch.h"
#include "common.h"
#include "MapElement.h"
#include "MapElementClickEventArgs.g.h"
#include <winrt/Windows.Devices.Geolocation.h>

Go to the source code of this file.

Classes

class MapElementClickEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElementsLayer.cpp File Reference

  • File List
  • File Members
  • MapControl

MapElementsLayer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapElementsLayer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "MapElementClickEventArgs.h"
#include "MapControl.h"
#include "Vector.h"
#include "MapElement.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElementsLayer.h File Reference

  • File List
  • File Members
  • MapControl
Classes

MapElementsLayer.h File Reference

#include "pch.h"
#include "common.h"
#include "MapElementsLayer.g.h"
#include "MapElementsLayer.properties.h"
#include "MapLayer.h"
#include "MapElementClickEventArgs.h"
#include "MapElement.h"

Go to the source code of this file.

Classes

class MapElementsLayer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapIcon.cpp File Reference

  • File List
  • File Members
  • MapControl

MapIcon.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapIcon.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "MapControl.h"
#include "MapElementsLayer.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapIcon.h File Reference

  • File List
  • File Members
  • MapControl
Classes

MapIcon.h File Reference

#include "pch.h"
#include "common.h"
#include "MapIcon.g.h"
#include "MapIcon.properties.h"
#include "MapElement.h"

Go to the source code of this file.

Classes

class MapIcon
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapLayer.cpp File Reference

  • File List
  • File Members
  • MapControl

MapLayer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MapLayer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapLayer.h File Reference

  • File List
  • File Members
  • MapControl
Classes

MapLayer.h File Reference

#include "pch.h"
#include "common.h"
#include "MapLayer.g.h"

Go to the source code of this file.

Classes

class MapLayer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/APITests/MapControlTests.cs File Reference

  • File List
  • File Members
  • MapControl
  • APITests
Classes | Namespaces

MapControlTests.cs File Reference

Go to the source code of this file.

Classes

class | MapControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/InteractionTests/MapControlTests.cs File Reference

  • File List
  • File Members
  • MapControl
  • InteractionTests
Classes | Namespaces

MapControlTests.cs File Reference

Go to the source code of this file.

Classes

class | MapControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/TestUI/MapControlApiKey.cs File Reference

  • File List
  • File Members
  • MapControl
  • TestUI
Classes | Namespaces

MapControlApiKey.cs File Reference

Go to the source code of this file.

Classes

class | MapControlApiKey

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/TestUI/MapControlPage.xaml.cs File Reference

  • File List
  • File Members
  • MapControl
  • TestUI
Classes | Namespaces

MapControlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MapControlPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrush.cpp File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
Functions

AcrylicBrush.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AcrylicBrush.h"
#include "AcrylicBrushFactory.h"
#include "ColorConversion.h"
#include "ResourceAccessor.h"
#include "SharedHelpers.h"
#include "Vector.h"
#include "RuntimeProfiler.h"
#include "AcrylicBrush.g.cpp"

Go to the source code of this file.

Functions

winrt::Color | GetLuminosityColor (winrt::Color tintColor, winrt::IReference< double > luminosityOpacity)
double | GetTintOpacityModifier (winrt::Color tintColor)

Function Documentation

winrt::Color GetLuminosityColor | ( | winrt::Color | tintColor,
 |  | winrt::IReference< double > | luminosityOpacity
 | ) |  |

Definition at line 279 of file AcrylicBrush.cpp.

{
    const Rgb rgbTintColor = RgbFromColor(tintColor);

    // If luminosity opacity is specified, just use the values as is
    if (luminosityOpacity != nullptr)
    {
        return ColorFromRgba(rgbTintColor, std::clamp(luminosityOpacity.GetDouble(), 0.0, 1.0));
    }
    else
    {
        // To create the Luminosity blend input color without luminosity opacity,
        // we're taking the TintColor input, converting to HSV, and clamping the V between these values
        const double minHsvV = 0.125;
        const double maxHsvV = 0.965;

        const Hsv hsvTintColor = RgbToHsv(rgbTintColor);

        const auto clampedHsvV = std::clamp(hsvTintColor.v, minHsvV, maxHsvV);

        const Hsv hsvLuminosityColor = Hsv(hsvTintColor.h, hsvTintColor.s, clampedHsvV);
        const Rgb rgbLuminosityColor = HsvToRgb(hsvLuminosityColor);

        // Now figure out luminosity opacity
        // Map original *tint* opacity to this range
        const double minLuminosityOpacity = 0.15;
        const double maxLuminosityOpacity = 1.03;

        const double luminosityOpacityRangeMax = maxLuminosityOpacity - minLuminosityOpacity;
        const double mappedTintOpacity = ((tintColor.A / 255.0) * luminosityOpacityRangeMax) + minLuminosityOpacity;

        // Finally, combine the luminosity opacity and the HsvV-clamped tint color
        return ColorFromRgba(rgbLuminosityColor, std::min(mappedTintOpacity, 1.0));
    }

}

double GetTintOpacityModifier ( winrt::Color tintColor )

Definition at line 209 of file AcrylicBrush.cpp.

{
    // This method supresses the maximum allowable tint opacity depending on the luminosity and saturation of a color by
    // compressing the range of allowable values - for example, a user-defined value of 100% will be mapped to 45% for pure
    // white (100% luminosity), 85% for pure black (0% luminosity), and 90% for pure gray (50% luminosity).  The intensity of
    // the effect increases linearly as luminosity deviates from 50%.  After this effect is calculated, we cancel it out
    // linearly as saturation increases from zero.

    const double midPoint = 0.50; // Mid point of HsvV range that these calculations are based on. This is here for easy tuning.

    const double whiteMaxOpacity = 0.45; // 100% luminosity
    const double midPointMaxOpacity = 0.90; // 50% luminosity
    const double blackMaxOpacity = 0.85; // 0% luminosity

    const Rgb rgb = RgbFromColor(tintColor);
    const Hsv hsv = RgbToHsv(rgb);

    double opacityModifier = midPointMaxOpacity;

    if (hsv.v != midPoint)
    {
        // Determine maximum suppression amount
        double lowestMaxOpacity = midPointMaxOpacity;
        double maxDeviation = midPoint;

        if (hsv.v > midPoint)
        {
            lowestMaxOpacity = whiteMaxOpacity; // At white (100% hsvV)
            maxDeviation = 1 - maxDeviation;
        }
        else if (hsv.v < midPoint)
        {
            lowestMaxOpacity = blackMaxOpacity; // At black (0% hsvV)
        }

        double maxOpacitySuppression = midPointMaxOpacity - lowestMaxOpacity;

        // Determine normalized deviation from the midpoint
        const double deviation = abs(hsv.v - midPoint);
        const double normalizedDeviation = deviation / maxDeviation;

        // If we have saturation, reduce opacity suppression to allow that color to come through more
        if (hsv.s > 0)
        {
            // Dampen opacity suppression based on how much saturation there is
            maxOpacitySuppression *= std::max(1 - (hsv.s * 2), 0.0);
        }

        const double opacitySuppression = maxOpacitySuppression * normalizedDeviation;

        opacityModifier = midPointMaxOpacity - opacitySuppression;
    }

    return opacityModifier;
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrush.h File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
Classes | Functions

AcrylicBrush.h File Reference

#include "MaterialHelper.h"
#include "AcrylicTestApi.h"
#include "AcrylicBrush.g.h"
#include "AcrylicBrush.properties.h"
#include <limits>
#include "Microsoft.UI.Private.Composition.Effects_impl.h"

Go to the source code of this file.

Classes

class | AcrylicBrush

Functions

winrt::Color | GetLuminosityColor (winrt::Color tintColor, winrt::IReference< double > luminosityOpacity)
double | GetTintOpacityModifier (winrt::Color tintColor)

Function Documentation

winrt::Color GetLuminosityColor | ( | winrt::Color | tintColor,
 |  | winrt::IReference< double > | luminosityOpacity
 | ) |  |

Definition at line 279 of file AcrylicBrush.cpp.

{
    const Rgb rgbTintColor = RgbFromColor(tintColor);

    // If luminosity opacity is specified, just use the values as is
    if (luminosityOpacity != nullptr)
    {
        return ColorFromRgba(rgbTintColor, std::clamp(luminosityOpacity.GetDouble(), 0.0, 1.0));
    }
    else
    {
        // To create the Luminosity blend input color without luminosity opacity,
        // we're taking the TintColor input, converting to HSV, and clamping the V between these values
        const double minHsvV = 0.125;
        const double maxHsvV = 0.965;

        const Hsv hsvTintColor = RgbToHsv(rgbTintColor);

        const auto clampedHsvV = std::clamp(hsvTintColor.v, minHsvV, maxHsvV);

        const Hsv hsvLuminosityColor = Hsv(hsvTintColor.h, hsvTintColor.s, clampedHsvV);
        const Rgb rgbLuminosityColor = HsvToRgb(hsvLuminosityColor);

        // Now figure out luminosity opacity
        // Map original *tint* opacity to this range
        const double minLuminosityOpacity = 0.15;
        const double maxLuminosityOpacity = 1.03;

        const double luminosityOpacityRangeMax = maxLuminosityOpacity - minLuminosityOpacity;
        const double mappedTintOpacity = ((tintColor.A / 255.0) * luminosityOpacityRangeMax) + minLuminosityOpacity;

        // Finally, combine the luminosity opacity and the HsvV-clamped tint color
        return ColorFromRgba(rgbLuminosityColor, std::min(mappedTintOpacity, 1.0));
    }

}

double GetTintOpacityModifier ( winrt::Color tintColor )

Definition at line 209 of file AcrylicBrush.cpp.

{
    // This method supresses the maximum allowable tint opacity depending on the luminosity and saturation of a color by
    // compressing the range of allowable values - for example, a user-defined value of 100% will be mapped to 45% for pure
    // white (100% luminosity), 85% for pure black (0% luminosity), and 90% for pure gray (50% luminosity).  The intensity of
    // the effect increases linearly as luminosity deviates from 50%.  After this effect is calculated, we cancel it out
    // linearly as saturation increases from zero.

    const double midPoint = 0.50; // Mid point of HsvV range that these calculations are based on. This is here for easy tuning.

    const double whiteMaxOpacity = 0.45; // 100% luminosity
    const double midPointMaxOpacity = 0.90; // 50% luminosity
    const double blackMaxOpacity = 0.85; // 0% luminosity

    const Rgb rgb = RgbFromColor(tintColor);
    const Hsv hsv = RgbToHsv(rgb);

    double opacityModifier = midPointMaxOpacity;

    if (hsv.v != midPoint)
    {
        // Determine maximum suppression amount
        double lowestMaxOpacity = midPointMaxOpacity;
        double maxDeviation = midPoint;

        if (hsv.v > midPoint)
        {
            lowestMaxOpacity = whiteMaxOpacity; // At white (100% hsvV)
            maxDeviation = 1 - maxDeviation;
        }
        else if (hsv.v < midPoint)
        {
            lowestMaxOpacity = blackMaxOpacity; // At black (0% hsvV)
        }

        double maxOpacitySuppression = midPointMaxOpacity - lowestMaxOpacity;

        // Determine normalized deviation from the midpoint
        const double deviation = abs(hsv.v - midPoint);
        const double normalizedDeviation = deviation / maxDeviation;

        // If we have saturation, reduce opacity suppression to allow that color to come through more
        if (hsv.s > 0)
        {
            // Dampen opacity suppression based on how much saturation there is
            maxOpacitySuppression *= std::max(1 - (hsv.s * 2), 0.0);
        }

        const double opacitySuppression = maxOpacitySuppression * normalizedDeviation;

        opacityModifier = midPointMaxOpacity - opacitySuppression;
    }

    return opacityModifier;
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrush.idl File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
Namespaces | Variables

AcrylicBrush.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XM_NAMESPACE

Variables

unsealed runtimeclass | AcrylicBrush
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrushFactory.cpp File Reference

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicBrushFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AcrylicBrushFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrushFactory.h File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
Classes | Namespaces

AcrylicBrushFactory.h File Reference

#include "AcrylicBrush.h"

Go to the source code of this file.

Classes

class | AcrylicBrushFactory

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Media
namespace | winrt::Microsoft::UI::Xaml::Media::factory_implementation
namespace | winrt::Microsoft::UI::Xaml::Media::implementation
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicTestApi.cpp File Reference

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicTestApi.cpp File Reference

#include "pch.h"
#include "common.h"
#include "AcrylicTestApi.h"
#include "AcrylicBrush.h"
#include "AcrylicTestApi.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicTestApi.h File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
Classes

AcrylicTestApi.h File Reference

#include "AcrylicTestApi.g.h"

Go to the source code of this file.

Classes

class AcrylicTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicTestApi.idl File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
Classes | Namespaces | Functions | Variables

AcrylicTestApi.idl File Reference

Go to the source code of this file.

Classes

interface | IAcrylicBrushStaticsPrivate

Namespaces

namespace | MU_PRIVATE_MEDIA_NAMESPACE

Functions

void | ForceCreateAcrylicBrush (Boolean useCrossFadeEffect)

Variables

runtimeclass | AcrylicTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/APITests/AcrylicBrushTests.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • APITests
Classes | Namespaces

AcrylicBrushTests.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicBrushTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/InteractionTests/AcrylicBrushTests.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • InteractionTests
Classes | Namespaces

AcrylicBrushTests.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicBrushTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicBrushBasicPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI
Classes | Namespaces

AcrylicBrushBasicPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicBrushBasicPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicBrushLuminosityTestPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI
Classes | Namespaces

AcrylicBrushLuminosityTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicBrushLuminosityTestPage
An empty page that can be used on its own or navigated to within a Frame. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicBrushPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI
Classes | Namespaces

AcrylicBrushPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicBrushPage
class | AcrylicBrushPage::WrapperEffectBrush

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicColorPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI
Classes | Namespaces

AcrylicColorPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicColorPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicMarkupPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI
Classes | Namespaces

AcrylicMarkupPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicMarkupPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI
Classes | Namespaces

AcrylicPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicRenderingPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI
Classes | Namespaces

AcrylicRenderingPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AcrylicRenderingPage
struct | AcrylicRenderingPage::SampledColors

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.cpp File Reference

  • File List
  • File Members
  • Materials
  • DesktopAcrylicBackdrop

DesktopAcrylicBackdrop.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DesktopAcrylicBackdrop.h"
#include "DesktopAcrylicBackdrop.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.h File Reference

  • File List
  • File Members
  • Materials
  • DesktopAcrylicBackdrop
Classes

DesktopAcrylicBackdrop.h File Reference

#include "winrt/Microsoft.UI.Composition.SystemBackdrops.h"
#include <winrt/windows.system.h>
#include "DesktopAcrylicBackdrop.g.h"

Go to the source code of this file.

Classes

class | DesktopAcrylicBackdrop
class | DesktopAcrylicBackdrop::ControllerEntry
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.idl File Reference

  • File List
  • File Members
  • Materials
  • DesktopAcrylicBackdrop
Namespaces | Variables

DesktopAcrylicBackdrop.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XM_NAMESPACE

Variables

unsealed runtimeclass | DesktopAcrylicBackdrop
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/MicaBackdrop/MicaBackdrop.cpp File Reference

  • File List
  • File Members
  • Materials
  • MicaBackdrop

MicaBackdrop.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MicaBackdrop.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/MicaBackdrop/MicaBackdrop.h File Reference

  • File List
  • File Members
  • Materials
  • MicaBackdrop
Classes

MicaBackdrop.h File Reference

#include "winrt/Microsoft.UI.Composition.SystemBackdrops.h"
#include <winrt/windows.system.h>
#include "MicaBackdrop.g.h"
#include "MicaBackdrop.properties.h"

Go to the source code of this file.

Classes

class | MicaBackdrop
class | MicaBackdrop::ControllerEntry
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/MicaBackdrop/MicaBackdrop.idl File Reference

  • File List
  • File Members
  • Materials
  • MicaBackdrop
Namespaces | Variables

MicaBackdrop.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XM_NAMESPACE

Variables

unsealed runtimeclass | MicaBackdrop
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBackgroundBrush.h File Reference

  • File List
  • File Members
  • Materials
  • Reveal

RevealBackgroundBrush.h File Reference

#include "RevealBrush.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBorderBrush.h File Reference

  • File List
  • File Members
  • Materials
  • Reveal

RevealBorderBrush.h File Reference

#include "RevealBrush.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrush.cpp File Reference

  • File List
  • File Members
  • Materials
  • Reveal

RevealBrush.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBrush.h"
#include "Microsoft.UI.Private.Composition.Effects_impl.h"
#include "XamlAmbientLight.h"
#include "RevealHoverLight.h"
#include "RevealBorderLight.h"
#include "vector.h"
#include "RuntimeProfiler.h"
#include "RevealBorderBrush.properties.cpp"
#include "RevealBackgroundBrush.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrush.h File Reference

  • File List
  • File Members
  • Materials
  • Reveal
Classes

RevealBrush.h File Reference

#include "MaterialHelper.h"
#include "RevealBrushTestApi.h"
#include "RevealBrush.g.h"
#include "RevealBorderBrush.g.h"
#include "RevealBackgroundBrush.g.h"
#include "RevealBrush.properties.h"

Go to the source code of this file.

Classes

class | RevealBackgroundBrush
class | RevealBorderBrush
class | RevealBrush
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrush.idl File Reference

  • File List
  • File Members
  • Materials
  • Reveal
Namespaces | Enumerations | Variables

RevealBrush.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XM_NAMESPACE

Enumerations

enum | RevealBrushState { Normal = 0, PointerOver = 1, Pressed = 2 }

Variables

unsealed runtimeclass | RevealBackgroundBrush
unsealed runtimeclass | RevealBorderBrush
unsealed runtimeclass | RevealBrush
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrushTestApi.cpp File Reference

  • File List
  • File Members
  • Materials
  • Reveal

RevealBrushTestApi.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealBrushTestApi.h"
#include "RevealBrush.h"
#include "RevealBrushTestApi.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrushTestApi.h File Reference

  • File List
  • File Members
  • Materials
  • Reveal
Classes

RevealBrushTestApi.h File Reference

#include "RevealBrushTestApi.g.h"

Go to the source code of this file.

Classes

class RevealBrushTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrushTestApi.idl File Reference

  • File List
  • File Members
  • Materials
  • Reveal
Namespaces | Variables

RevealBrushTestApi.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_MEDIA_NAMESPACE

Variables

runtimeclass | RevealBrushTestApi
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealControls.idl File Reference

  • File List
  • File Members
  • Materials
  • Reveal
Namespaces | Variables

RevealControls.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | RevealListViewItemPresenter
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealListViewItemPresenter.cpp File Reference

  • File List
  • File Members
  • Materials
  • Reveal

RevealListViewItemPresenter.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RevealListViewItemPresenter.h"
#include "RevealBrush.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealListViewItemPresenter.h File Reference

  • File List
  • File Members
  • Materials
  • Reveal
Classes

RevealListViewItemPresenter.h File Reference

#include "RevealListViewItemPresenter.g.h"
#include "RevealListViewItemPresenter.properties.cpp"

Go to the source code of this file.

Classes

class RevealListViewItemPresenter
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/APITests/RevealTests.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • APITests
Classes | Namespaces

RevealTests.cs File Reference

Go to the source code of this file.

Classes

class | RevealTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/InteractionTests/Reveal_InteractionTests/RevealBrushTests.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • InteractionTests
  • Reveal_InteractionTests
Classes | Namespaces

RevealBrushTests.cs File Reference

Go to the source code of this file.

Classes

class | RevealBrushTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/CoreWindowEventsPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

CoreWindowEventsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CoreWindowEventsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealBasicPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealBasicPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealBasicPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealColorPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealColorPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealColorPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealFallbackPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealFallbackPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealFallbackPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealListPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealListPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealListPage
class | SampleSuggestions

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealMarkupPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealMarkupPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealMarkupPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealRegressionTestsPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealRegressionTestsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealRegressionTestsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioColors.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealScenarioColors.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ColorItem
class | RevealScenarioColors

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioGrid.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces | Enumerations

RevealScenarioGrid.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealBackgroundItem
class | RevealGridItem
class | RevealGridTypeItem
class | RevealScenarioGrid
class | SelectionModeItem

Namespaces

namespace | MUXControlsTestApp

Enumerations

enum | RevealGridItemTemplates { ImageWithText = 0, Image = 1, BaseLowItems = 2 }
enum | RevealTestBackgrounds { Default = 0, Acrylic = 1, Accent = 2 }
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioLights.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealScenarioLights.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealScenarioLights

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioList.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealScenarioList.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealScenarioList

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarios.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealScenarios.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealScenarioItem
class | RevealScenarios
class | RevealThemeItem

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioSecondaryView.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealScenarioSecondaryView.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealScenarioSecondaryView

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealSimpleListPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealSimpleListPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealItem
class | RevealSimpleListPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealStatesPage.xaml.cs File Reference

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI
Classes | Namespaces

RevealStatesPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RevealStatesPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar.cpp File Reference

  • File List
  • File Members
  • MenuBar

MenuBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBar.h"
#include "MenuBarItem.h"
#include "Vector.h"
#include "VectorIterator.h"
#include "MenuBarAutomationPeer.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar.h File Reference

  • File List
  • File Members
  • MenuBar
Classes

MenuBar.h File Reference

#include "MenuBar.g.h"
#include "MenuBar.properties.h"

Go to the source code of this file.

Classes

class MenuBar
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar.idl File Reference

  • File List
  • File Members
  • MenuBar
Namespaces | Variables

MenuBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | MenuBar
unsealed runtimeclass | MenuBarItem
unsealed runtimeclass | MenuBarItemFlyout
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarAutomationPeer.cpp File Reference

  • File List
  • File Members
  • MenuBar

MenuBarAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "MenuBarAutomationPeer.h"
#include "Utils.h"
#include "MenuBarAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarAutomationPeer.h File Reference

  • File List
  • File Members
  • MenuBar
Classes

MenuBarAutomationPeer.h File Reference

#include "MenuBar.h"
#include "MenuBarAutomationPeer.g.h"

Go to the source code of this file.

Classes

class MenuBarAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarAutomationPeer.idl File Reference

  • File List
  • File Members
  • MenuBar
Namespaces | Variables

MenuBarAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass
Microsoft UI Xaml Automation
Provider 		IExpandCollapseProvider
unsealed runtimeclass | MenuBarAutomationPeer
unsealed runtimeclass | MenuBarItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItem.cpp File Reference

  • File List
  • File Members
  • MenuBar

MenuBarItem.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBar.h"
#include "MenuBarItem.h"
#include "MenuBarItemFlyout.h"
#include "Vector.h"
#include "VectorIterator.h"
#include "MenuBarItemAutomationPeer.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItem.h File Reference

  • File List
  • File Members
  • MenuBar
Classes | Enumerations

MenuBarItem.h File Reference

#include "MenuBarItem.g.h"
#include "MenuBarItem.properties.h"

Go to the source code of this file.

Classes

class | MenuBarItem

Enumerations

enum | FlyoutLocation { Left, Right }

Enumeration Type Documentation

enum FlyoutLocation
Enumerator:
Left
Right

Definition at line 9 of file MenuBarItem.h.

{
    Left,
    Right
};

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItemAutomationPeer.cpp File Reference

  • File List
  • File Members
  • MenuBar

MenuBarItemAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBar.h"
#include "MenuBarItem.h"
#include "ResourceAccessor.h"
#include "MenuBarItemAutomationPeer.h"
#include "Utils.h"
#include "MenuBarItemAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItemAutomationPeer.h File Reference

  • File List
  • File Members
  • MenuBar
Classes

MenuBarItemAutomationPeer.h File Reference

#include "MenuBarItem.h"
#include "MenuBarItemAutomationPeer.g.h"

Go to the source code of this file.

Classes

class MenuBarItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItemFlyout.cpp File Reference

  • File List
  • File Members
  • MenuBar

MenuBarItemFlyout.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MenuBarItemFlyout.h"
#include "MenuBarItemFlyout.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItemFlyout.h File Reference

  • File List
  • File Members
  • MenuBar
Classes

MenuBarItemFlyout.h File Reference

#include "MenuBarItemFlyout.g.h"

Go to the source code of this file.

Classes

class MenuBarItemFlyout
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar_InteractionTests/MenuBarTests.cs File Reference

  • File List
  • File Members
  • MenuBar
  • MenuBar_InteractionTests
Classes | Namespaces

MenuBarTests.cs File Reference

Go to the source code of this file.

Classes

class | MenuBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar_TestUI/MenuBarPage.xaml.cs File Reference

  • File List
  • File Members
  • MenuBar
  • MenuBar_TestUI
Classes | Namespaces

MenuBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MenuBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.Design/RegisterMetadata.cs File Reference

  • File List
  • File Members
  • Microsoft.UI.Xaml.Design
Classes | Namespaces

RegisterMetadata.cs File Reference

Go to the source code of this file.

Classes

class | RegisterMetadata

Namespaces

namespace | Microsoft::UI::Xaml::Design
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.Design/Properties/AssemblyInfo.cs File Reference

  • File List
  • File Members
  • Microsoft.UI.Xaml.Design
  • Properties

AssemblyInfo.cs File Reference

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.FrameworkPackagePRI/Properties/AssemblyInfo.cs File Reference

  • File List
  • File Members
  • Microsoft.UI.Xaml.FrameworkPackagePRI
  • Properties

AssemblyInfo.cs File Reference

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.cpp File Reference

  • File List
  • File Members
  • MonochromaticOverlayPresenter
Classes

MonochromaticOverlayPresenter.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MonochromaticOverlayPresenter.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Classes

struct XamlCompBrush
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.h File Reference

  • File List
  • File Members
  • MonochromaticOverlayPresenter
Classes

MonochromaticOverlayPresenter.h File Reference

#include "pch.h"
#include "common.h"
#include "MonochromaticOverlayPresenter.g.h"
#include "MonochromaticOverlayPresenter.properties.h"
#include "microsoft.ui.private.composition.effects_impl.h"

Go to the source code of this file.

Classes

class MonochromaticOverlayPresenter
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.idl File Reference

  • File List
  • File Members
  • MonochromaticOverlayPresenter
Namespaces | Variables

MonochromaticOverlayPresenter.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Variables

unsealed runtimeclass | MonochromaticOverlayPresenter
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/TestUI/MonochromaticOverlayPresenterPage.xaml.cs File Reference

  • File List
  • File Members
  • MonochromaticOverlayPresenter
  • TestUI
Classes | Namespaces

MonochromaticOverlayPresenterPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MonochromaticOverlayPresenterPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView.cpp File Reference

  • File List
  • File Members
  • NavigationView
Variables

NavigationView.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationView.h"
#include "Vector.h"
#include "BindableVector.h"
#include "NavigationViewDisplayModeChangedEventArgs.h"
#include "NavigationViewPaneClosingEventArgs.h"
#include "NavigationViewBackRequestedEventArgs.h"
#include "ResourceAccessor.h"
#include "CppWinRTHelpers.h"
#include "NavigationViewItem.h"
#include "NavigationViewSelectionChangedEventArgs.h"
#include "NavigationViewItemInvokedEventArgs.h"
#include "RuntimeProfiler.h"
#include "Utils.h"
#include "MuxcTraceLogging.h"
#include "NavigationViewItemBaseRevokers.h"
#include "IndexPath.h"
#include "InspectingDataSource.h"
#include "NavigationViewAutomationPeer.h"
#include "StackLayout.h"
#include "ItemsRepeater.h"
#include <ItemsRepeater.common.h>
#include "NavigationViewItemExpandingEventArgs.h"
#include "NavigationViewItemCollapsedEventArgs.h"

Go to the source code of this file.

Variables

winrt::float2 | c_frame1point1 = winrt::float2(0.9f, 0.1f)
winrt::float2 | c_frame1point2 = winrt::float2(1.0f, 0.2f)
winrt::float2 | c_frame2point1 = winrt::float2(0.1f, 0.9f)
winrt::float2 | c_frame2point2 = winrt::float2(0.2f, 1.0f)

Variable Documentation

winrt::float2 c_frame1point1 = winrt::float2(0.9f, 0.1f)

Definition at line 1974 of file NavigationView.cpp.

winrt::float2 c_frame1point2 = winrt::float2(1.0f, 0.2f)

Definition at line 1975 of file NavigationView.cpp.

winrt::float2 c_frame2point1 = winrt::float2(0.1f, 0.9f)

Definition at line 1976 of file NavigationView.cpp.

winrt::float2 c_frame2point2 = winrt::float2(0.2f, 1.0f)

Definition at line 1977 of file NavigationView.cpp.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView.h File Reference

  • File List
  • File Members
  • NavigationView
Classes | Enumerations

NavigationView.h File Reference

#include "NavigationViewTemplateSettings.h"
#include "NavigationViewItem.h"
#include "NavigationView.g.h"
#include "TopNavigationViewDataProvider.h"
#include "NavigationViewHelper.h"
#include "NavigationView.properties.h"
#include "NavigationViewItemsFactory.h"
#include "NavigationViewTrace.h"

Go to the source code of this file.

Classes

class | NavigationView

Enumerations

enum | NavigationRecommendedTransitionDirection { FromOverflow, FromLeft, FromRight, Default }
enum | TopNavigationViewLayoutState { Uninitialized = 0, Initialized }

Enumeration Type Documentation

enum NavigationRecommendedTransitionDirection
Enumerator:
FromOverflow
FromLeft
FromRight
Default

Definition at line 24 of file NavigationView.h.

{
    FromOverflow, // mapping to SlideNavigationTransitionInfo FromLeft
    FromLeft, // SlideNavigationTransitionInfo
    FromRight, // SlideNavigationTransitionInfo
    Default // Currently it's mapping to EntranceNavigationTransitionInfo and is subject to change.
};

enum TopNavigationViewLayoutState
Enumerator:
Uninitialized
Initialized

Definition at line 18 of file NavigationView.h.

{
    Uninitialized = 0,
    Initialized
};

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView.idl File Reference

  • File List
  • File Members
  • NavigationView
Namespaces | Enumerations

NavigationView.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | NavigationViewBackButtonVisible { Visible = 1, Auto = 1 }
enum | NavigationViewDisplayMode { Minimal = 0, Compact = 1, Expanded = 2 }
enum | NavigationViewOverflowLabelMode { MoreLabel = 0, NoLabel = 1 }
enum NavigationViewPaneDisplayMode {
Auto = 1, Left = 1, Top = 2, LeftCompact = 3,
LeftMinimal = 4
}
enum | NavigationViewSelectionFollowsFocus { Disabled = 0, Enabled = 1 }
enum | NavigationViewShoulderNavigationEnabled { WhenSelectionFollowsFocus = 0, Always = 1, Never = 2 }
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewAutomationPeer.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "NavigationViewAutomationPeer.h"
#include "NavigationView.h"
#include "NavigationViewItemBase.h"
#include "SharedHelpers.h"
#include "NavigationViewAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewAutomationPeer.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewAutomationPeer.h File Reference

#include "NavigationView.h"
#include "NavigationViewAutomationPeer.g.h"

Go to the source code of this file.

Classes

class NavigationViewAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewBackRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewBackRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewBackRequestedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewBackRequestedEventArgs.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewBackRequestedEventArgs.h File Reference

#include "NavigationViewBackRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class NavigationViewBackRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewDisplayModeChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewDisplayModeChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewDisplayModeChangedEventArgs.h"
#include "NavigationView.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewDisplayModeChangedEventArgs.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewDisplayModeChangedEventArgs.h File Reference

#include "NavigationViewDisplayModeChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class NavigationViewDisplayModeChangedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewHelper.h File Reference

  • File List
  • File Members
  • NavigationView
Classes | Enumerations

NavigationViewHelper.h File Reference

Go to the source code of this file.

Classes

class | NavigationViewItemHelper< T >

Enumerations

enum | NavigationViewPropagateTarget { LeftListView, TopListView, OverflowListView, All }
enum NavigationViewRepeaterPosition {
LeftNav, TopPrimary, TopOverflow, LeftFooter,
TopFooter
}
enum | NavigationViewVisualStateDisplayMode { Compact, Expanded, Minimal, MinimalWithBackButton }

Enumeration Type Documentation

enum NavigationViewPropagateTarget
Enumerator:
LeftListView
TopListView
OverflowListView
All

Definition at line 23 of file NavigationViewHelper.h.

{
    LeftListView,
    TopListView,
    OverflowListView,
    All
};

enum NavigationViewRepeaterPosition
Enumerator:
LeftNav
TopPrimary
TopOverflow
LeftFooter
TopFooter

Definition at line 14 of file NavigationViewHelper.h.

{
    LeftNav,
    TopPrimary,
    TopOverflow,
    LeftFooter,
    TopFooter
};

enum NavigationViewVisualStateDisplayMode
Enumerator:
Compact
Expanded
Minimal
MinimalWithBackButton

Definition at line 6 of file NavigationViewHelper.h.

{
    Compact,
    Expanded,
    Minimal,
    MinimalWithBackButton
};

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItem.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItem.cpp File Reference

#include <pch.h>
#include <common.h>
#include "NavigationView.h"
#include "NavigationViewItem.h"
#include "NavigationViewItemAutomationPeer.h"
#include "StackLayout.h"
#include "Utils.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItem.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItem.h File Reference

#include "NavigationViewItemBase.h"
#include "NavigationViewItem.g.h"
#include "NavigationViewItemPresenter.h"
#include "NavigationViewItem.properties.h"
#include "NavigationViewTrace.h"

Go to the source code of this file.

Classes

class NavigationViewItem
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemAutomationPeer.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "NavigationViewItemAutomationPeer.h"
#include "NavigationView.h"
#include "NavigationViewItemBase.h"
#include "SharedHelpers.h"
#include "NavigationViewHelper.h"
#include "NavigationViewItemAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemAutomationPeer.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemAutomationPeer.h File Reference

#include "NavigationViewItem.h"
#include "NavigationViewItemAutomationPeer.g.h"

Go to the source code of this file.

Classes

class NavigationViewItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemAutomationPeer.idl File Reference

  • File List
  • File Members
  • NavigationView
Namespaces | Variables

NavigationViewItemAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | NavigationViewItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemBase.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemBase.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemBase.h"
#include "NavigationView.h"
#include "IndexPath.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemBase.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemBase.h File Reference

#include "NavigationViewItemBase.g.h"
#include "NavigationViewHelper.h"
#include "NavigationViewItemBase.properties.h"

Go to the source code of this file.

Classes

class NavigationViewItemBase
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemBaseRevokers.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemBaseRevokers.h File Reference

Go to the source code of this file.

Classes

class NavigationViewItemBaseRevokers
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemCollapsedEventArgs.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemCollapsedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemCollapsedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemCollapsedEventArgs.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemCollapsedEventArgs.h File Reference

#include "NavigationViewItemCollapsedEventArgs.g.h"

Go to the source code of this file.

Classes

class NavigationViewItemCollapsedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemExpandingEventArgs.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemExpandingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemExpandingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemExpandingEventArgs.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemExpandingEventArgs.h File Reference

#include "NavigationViewItemExpandingEventArgs.g.h"

Go to the source code of this file.

Classes

class NavigationViewItemExpandingEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemHeader.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemHeader.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemHeader.h"
#include "NavigationView.h"
#include "NavigationViewItemHeader.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemHeader.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemHeader.h File Reference

#include "NavigationViewItemBase.h"
#include "NavigationViewItemHeader.g.h"

Go to the source code of this file.

Classes

class NavigationViewItemHeader
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemInvokedEventArgs.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemInvokedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemInvokedEventArgs.h"
#include "NavigationView.h"
#include "NavigationViewItemInvokedEventArgs.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemInvokedEventArgs.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemInvokedEventArgs.h File Reference

#include "NavigationViewItemInvokedEventArgs.g.h"

Go to the source code of this file.

Classes

class NavigationViewItemInvokedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemPresenter.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemPresenter.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemPresenter.h"
#include "NavigationViewItem.h"
#include "SharedHelpers.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemPresenter.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemPresenter.h File Reference

#include "NavigationViewItemPresenterTemplateSettings.h"
#include "NavigationViewItemPresenter.g.h"
#include "NavigationViewHelper.h"
#include "NavigationViewItemPresenter.properties.h"

Go to the source code of this file.

Classes

class NavigationViewItemPresenter
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemPresenter.idl File Reference

  • File List
  • File Members
  • NavigationView
Namespaces | Variables

NavigationViewItemPresenter.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Variables

unsealed runtimeclass | NavigationViewItemPresenter
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemPresenterTemplateSettings.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemPresenterTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemPresenterTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemPresenterTemplateSettings.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemPresenterTemplateSettings.h File Reference

#include "NavigationViewItemPresenterTemplateSettings.g.h"
#include "NavigationViewItemPresenterTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class NavigationViewItemPresenterTemplateSettings
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemSeparator.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemSeparator.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewItemSeparator.h"
#include "Utils.h"
#include "NavigationViewItemSeparator.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemSeparator.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemSeparator.h File Reference

#include "NavigationViewItemBase.h"
#include "NavigationViewItemSeparator.g.h"

Go to the source code of this file.

Classes

class NavigationViewItemSeparator
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemsFactory.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewItemsFactory.cpp File Reference

#include "pch.h"
#include "NavigationViewItemsFactory.h"
#include "NavigationViewItemBase.h"
#include "NavigationViewItem.h"
#include "ItemTemplateWrapper.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemsFactory.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewItemsFactory.h File Reference

#include "common.h"
#include "ElementFactory.h"

Go to the source code of this file.

Classes

class NavigationViewItemsFactory
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewPaneClosingEventArgs.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewPaneClosingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewPaneClosingEventArgs.h"
#include "NavigationView.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewPaneClosingEventArgs.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewPaneClosingEventArgs.h File Reference

#include "NavigationViewPaneClosingEventArgs.g.h"

Go to the source code of this file.

Classes

class NavigationViewPaneClosingEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewSelectionChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewSelectionChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewSelectionChangedEventArgs.h"
#include "NavigationView.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewSelectionChangedEventArgs.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewSelectionChangedEventArgs.h File Reference

#include "NavigationViewSelectionChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class NavigationViewSelectionChangedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewTemplateSettings.cpp File Reference

  • File List
  • File Members
  • NavigationView

NavigationViewTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NavigationViewTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewTemplateSettings.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

NavigationViewTemplateSettings.h File Reference

#include "NavigationViewTemplateSettings.g.h"
#include "NavigationViewTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class NavigationViewTemplateSettings
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewTrace.h File Reference

  • File List
  • File Members
  • NavigationView
Classes | Defines | Functions

NavigationViewTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | NavigationViewTrace

Defines

#define | NAVIGATIONVIEW_TRACE_INFO(sender, message,...)
#define | NAVIGATIONVIEW_TRACE_INFO_DBG(sender, message,...)
#define | NAVIGATIONVIEW_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) NavigationViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | NAVIGATIONVIEW_TRACE_PERF(info)
#define | NAVIGATIONVIEW_TRACE_PERF_DBG(info)
#define | NAVIGATIONVIEW_TRACE_VERBOSE(sender, message,...)
#define | NAVIGATIONVIEW_TRACE_VERBOSE_DBG(sender, message,...)
#define | NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) NavigationViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsNavigationViewPerfTracingEnabled ()
bool | IsNavigationViewTracingEnabled ()
bool | IsNavigationViewVerboseTracingEnabled ()

Define Documentation

#define NAVIGATIONVIEW_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsNavigationViewTracingEnabled()) \
{ \
    NAVIGATIONVIEW_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (NavigationViewTrace::s_IsDebugOutputEnabled || NavigationViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    NAVIGATIONVIEW_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file NavigationViewTrace.h.

#define NAVIGATIONVIEW_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file NavigationViewTrace.h.

#define NAVIGATIONVIEW_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | NavigationViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file NavigationViewTrace.h.

#define NAVIGATIONVIEW_TRACE_PERF ( info )
Value:
if (IsNavigationViewPerfTracingEnabled()) \
{ \
    NavigationViewTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file NavigationViewTrace.h.

#define NAVIGATIONVIEW_TRACE_PERF_DBG ( info )

Definition at line 71 of file NavigationViewTrace.h.

#define NAVIGATIONVIEW_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsNavigationViewVerboseTracingEnabled()) \
{ \
    NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (NavigationViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file NavigationViewTrace.h.

#define NAVIGATIONVIEW_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file NavigationViewTrace.h.

#define NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | NavigationViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file NavigationViewTrace.h.

Function Documentation

bool IsNavigationViewPerfTracingEnabled ( ) [inline]

Definition at line 25 of file NavigationViewTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_NAVIGATIONVIEW || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsNavigationViewTracingEnabled ( ) [inline]

Definition at line 11 of file NavigationViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_NAVIGATIONVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsNavigationViewVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file NavigationViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_NAVIGATIONVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/SplitDataSourceBase.h File Reference

  • File List
  • File Members
  • NavigationView
Classes

SplitDataSourceBase.h File Reference

#include "Vector.h"

Go to the source code of this file.

Classes

class | SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
class | SplitVector< T, SplitVectorID >
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TopNavigationViewDataProvider.cpp File Reference

  • File List
  • File Members
  • NavigationView

TopNavigationViewDataProvider.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "SplitDataSourceBase.h"
#include "TopNavigationViewDataProvider.h"
#include "NavigationViewItem.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TopNavigationViewDataProvider.h File Reference

  • File List
  • File Members
  • NavigationView
Classes | Enumerations

TopNavigationViewDataProvider.h File Reference

#include "SplitDataSourceBase.h"

Go to the source code of this file.

Classes

class TopNavigationViewDataProvider

Enumerations

enum NavigationViewSplitVectorID {
NotInitialized = 0, PrimaryList = 1, OverflowList = 2, SkippedList = 3,
Size = 4
}

Enumeration Type Documentation

enum NavigationViewSplitVectorID
Enumerator:
NotInitialized
PrimaryList
OverflowList
SkippedList
Size

Definition at line 7 of file TopNavigationViewDataProvider.h.

{
    NotInitialized = 0,
    PrimaryList = 1,
    OverflowList = 2,
    SkippedList = 3,
    Size = 4
};

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_ApiTests/NavigationViewTests.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_ApiTests
Classes | Namespaces

NavigationViewTests.cs File Reference

Go to the source code of this file.

Classes

class | Category
class | NavigationViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/CommonTests.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests
Classes | Namespaces

CommonTests.cs File Reference

Go to the source code of this file.

Classes

class | CommonTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/EventTests.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests
Classes | Namespaces

EventTests.cs File Reference

Go to the source code of this file.

Classes

class | EventTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/FocusBehaviorTests.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests
Classes | Namespaces

FocusBehaviorTests.cs File Reference

Go to the source code of this file.

Classes

class | FocusBehaviorTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/NavigationViewTestsBase.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests
Classes | Namespaces | Enumerations

NavigationViewTestsBase.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewTestsBase
class | RegressionTestScenario

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests

Enumerations

enum RegressionTestType {
LeftNav = 1, TopNav = 2, LeftNavRS4 = 4, HierarchyMarkup = 8,
HierarchyDatabinding = 16
}
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/PaneBehaviorTests.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests
Classes | Namespaces

PaneBehaviorTests.cs File Reference

Go to the source code of this file.

Classes

class | PaneBehaviorTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/SelectionTests.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests
Classes | Namespaces

SelectionTests.cs File Reference

Go to the source code of this file.

Classes

class | SelectionTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/TopModeTests.cs File Reference

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests
Classes | Namespaces

TopModeTests.cs File Reference

Go to the source code of this file.

Classes

class | TopModeTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/DialogWithNavView.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
Classes | Namespaces

DialogWithNavView.xaml.cs File Reference

Go to the source code of this file.

Classes

class | DialogWithNavView

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/NavigationViewAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
Classes | Namespaces

NavigationViewAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/NavigationViewCaseBundle.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
Classes | Namespaces

NavigationViewCaseBundle.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewCaseBundle

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewAnimationPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewAnimationPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewAnimationPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewBlankPage1.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewBlankPage1.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewBlankPage1

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewCompactPaneLengthTestPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewCompactPaneLengthTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewCompactPaneLengthTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewInfoBadge.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewInfoBadge.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewInfoBadgeTestPage
An empty page that can be used on its own or navigated to within a Frame. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewInitPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewInitPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewInitPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewIsPaneOpenPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewIsPaneOpenPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewIsPaneOpenPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewMenuItemsSourcePage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewMenuItemsSourcePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewMenuItemsSourcePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewMenuItemStretchPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewMenuItemStretchPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewMenuItemStretchPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewMinimalPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewMinimalPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewMinimalPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewPageDataContext.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewPageDataContext.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewPageDataContext
class | NavViewPageData

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewSelectedItemEdgeCasePage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewSelectedItemEdgeCasePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewSelectedItemEdgeCasePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewStretchPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common
Classes | Namespaces

NavigationViewStretchPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewStretchPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/CustomNavigationViewItem.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • CustomResources
Classes | Namespaces

CustomNavigationViewItem.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CustomNavigationViewItem

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/NavigationViewCustomMenuItemPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • CustomResources
Classes | Namespaces

NavigationViewCustomMenuItemPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewCustomMenuItemPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/NavigationViewCustomThemeResourcesPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • CustomResources
Classes | Namespaces

NavigationViewCustomThemeResourcesPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewCustomThemeResourcesPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/NavigationViewItemTemplatePage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • CustomResources
Classes | Namespaces

NavigationViewItemTemplatePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | Customer
class | Customers
class | NavigationViewItemTemplatePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Footer/PaneFooterTestPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Footer
Classes | Namespaces

PaneFooterTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PaneFooterTestPage
An empty page that can be used on its own or navigated to within a Frame. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Footer/PaneLayoutTestPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Footer
Classes | Namespaces

PaneLayoutTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PaneLayoutTestPage
An empty page that can be used on its own or navigated to within a Frame. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewDataBinding.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Hierarchical
Classes | Namespaces

HierarchicalNavigationViewDataBinding.xaml.cs File Reference

Go to the source code of this file.

Classes

class | Category
class | HierarchicalNavigationViewDataBinding

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewMarkup.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Hierarchical
Classes | Namespaces

HierarchicalNavigationViewMarkup.xaml.cs File Reference

Go to the source code of this file.

Classes

class | HierarchicalNavigationViewMarkup

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Regression/NavigationViewRS3Page.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Regression
Classes | Namespaces

NavigationViewRS3Page.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewRS3Page
Verify ShouldPreserveNavigationViewRS3Behavior. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Regression/NavigationViewRS4Page.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Regression
Classes | Namespaces

NavigationViewRS4Page.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewRS4Page

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/NavigationViewTopNavOnlyPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • TopMode
Classes | Namespaces

NavigationViewTopNavOnlyPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewTopNavOnlyPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/NavigationViewTopNavOverflowButtonPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • TopMode
Classes | Namespaces

NavigationViewTopNavOverflowButtonPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewTopNavOverflowButtonPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/NavigationViewTopNavPage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • TopMode
Classes | Namespaces

NavigationViewTopNavPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewTopNavPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/NavigationViewTopNavStorePage.xaml.cs File Reference

  • File List
  • File Members
  • NavigationView
  • TestUI
  • TopMode
Classes | Namespaces

NavigationViewTopNavStorePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NavigationViewTopNavStorePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBox.cpp File Reference

  • File List
  • File Members
  • NumberBox
Functions | Variables

NumberBox.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NumberBox.h"
#include "NumberBoxAutomationPeer.h"
#include "NumberBoxParser.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "winnls.h"

Go to the source code of this file.

Functions

std::wstring | trim (const std::wstring &s)

Variables

const std::wstring | c_whitespace = " \n\r\t\f\v"

Function Documentation

std::wstring trim ( const std::wstring & s )

Definition at line 28 of file NumberBox.cpp.

{
    const size_t start = s.find_first_not_of(c_whitespace);
    const size_t end = s.find_last_not_of(c_whitespace);
    return (start == std::wstring::npos || end == std::wstring::npos) ? L"" : s.substr(start, end - start + 1);
}

Variable Documentation

const std::wstring c_whitespace = " \n\r\t\f\v"

Definition at line 27 of file NumberBox.cpp.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBox.h File Reference

  • File List
  • File Members
  • NumberBox
Classes

NumberBox.h File Reference

#include "pch.h"
#include "common.h"
#include "NumberBox.g.h"
#include "NumberBoxValueChangedEventArgs.g.h"
#include "NumberBox.properties.h"
#include "Windows.Globalization.NumberFormatting.h"

Go to the source code of this file.

Classes

class | NumberBox
class | NumberBoxValueChangedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBox.idl File Reference

  • File List
  • File Members
  • NumberBox
Namespaces | Enumerations | Variables

NumberBox.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE

Enumerations

enum | NumberBoxSpinButtonPlacementMode { Hidden = 2, Compact = 1, Inline }
enum | NumberBoxValidationMode { InvalidInputOverwritten, Disabled = 0 }

Variables

Boolean | AcceptsExpression
Object | Description
Object | Header
Microsoft UI Xaml DataTemplate | HeaderTemplate
Boolean | IsWrapEnabled
Double | LargeChange
Double | Maximum
Double | Minimum
unsealed runtimeclass | NumberBox
unsealed runtimeclass | NumberBoxAutomationPeer
Windows Globalization
NumberFormatting
INumberFormatter2 		NumberFormatter
Boolean | PreventKeyboardDisplayOnProgrammaticFocus
Microsoft UI Xaml Controls
Primitives FlyoutBase 		SelectionFlyout
Microsoft UI Xaml Media
SolidColorBrush 		SelectionHighlightColor
Double | SmallChange
String | Text
NumberBoxValidationMode | ValidationMode
event Windows Foundation
TypedEventHandler< NumberBox,
NumberBoxValueChangedEventArgs > 		ValueChanged
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBoxAutomationPeer.cpp File Reference

  • File List
  • File Members
  • NumberBox

NumberBoxAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "NumberBox.h"
#include "NumberBoxAutomationPeer.h"
#include "Utils.h"
#include "NumberBoxAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBoxAutomationPeer.h File Reference

  • File List
  • File Members
  • NumberBox
Classes

NumberBoxAutomationPeer.h File Reference

#include "NumberBox.h"
#include "NumberBoxAutomationPeer.g.h"

Go to the source code of this file.

Classes

class NumberBoxAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBoxParser.cpp File Reference

  • File List
  • File Members
  • NumberBox

NumberBoxParser.cpp File Reference

#include "pch.h"
#include "common.h"
#include "NumberBoxParser.h"
#include "Utils.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBoxParser.h File Reference

  • File List
  • File Members
  • NumberBox
Classes | Enumerations

NumberBoxParser.h File Reference

#include "pch.h"
#include "common.h"
#include <regex>
#include <stack>

Go to the source code of this file.

Classes

struct | MathToken
class | NumberBoxParser

Enumerations

enum | MathTokenType { Numeric, Operator, Parenthesis }

Enumeration Type Documentation

enum MathTokenType
Enumerator:
Numeric
Operator
Parenthesis

Definition at line 11 of file NumberBoxParser.h.

{
    Numeric,
    Operator,
    Parenthesis,
};

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/APITests/NumberBoxTests.cs File Reference

  • File List
  • File Members
  • NumberBox
  • APITests
Classes | Namespaces

NumberBoxTests.cs File Reference

Go to the source code of this file.

Classes

class | NumberBoxTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/InteractionTests/NumberBoxTests.cs File Reference

  • File List
  • File Members
  • NumberBox
  • InteractionTests
Classes | Namespaces

NumberBoxTests.cs File Reference

Go to the source code of this file.

Classes

class | NumberBoxTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/TestUI/NumberBoxAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • NumberBox
  • TestUI
Classes | Namespaces

NumberBoxAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NumberBoxAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/TestUI/NumberBoxPage.xaml.cs File Reference

  • File List
  • File Members
  • NumberBox
  • TestUI
Classes | Namespaces

NumberBoxPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | DataModelWithINPC
class | NumberBoxPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControl.cpp File Reference

  • File List
  • File Members
  • PagerControl
Variables

PagerControl.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "PagerControl.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "PagerControlSelectedIndexChangedEventArgs.h"
#include "PagerControlTemplateSettings.h"
#include <PagerControlAutomationPeer.h>

Go to the source code of this file.

Variables

const int | c_AutoDisplayModeNumberOfPagesThreshold = 10
constexpr auto | c_comboBoxName = "ComboBoxDisplay"sv
constexpr auto | c_comboBoxVisibleVisualState = "ComboBoxVisible"sv
constexpr auto | c_finiteItemsModeState = "FiniteItems"sv
constexpr auto | c_firstPageButtonDisabledVisualState = "FirstPageButtonDisabled"sv
constexpr auto | c_firstPageButtonEnabledVisualState = "FirstPageButtonEnabled"sv
constexpr auto | c_firstPageButtonHiddenVisualState = "FirstPageButtonHidden"sv
constexpr auto | c_firstPageButtonName = "FirstPageButton"sv
constexpr auto | c_firstPageButtonNotVisibleVisualState = "FirstPageButtonCollapsed"sv
constexpr auto | c_firstPageButtonVisibleVisualState = "FirstPageButtonVisible"sv
constexpr auto | c_infiniteItemsModeState = "InfiniteItems"sv
const int | c_infiniteModeComboBoxItemsIncrement = 100
constexpr auto | c_lastPageButtonDisabledVisualState = "LastPageButtonDisabled"sv
constexpr auto | c_lastPageButtonEnabledVisualState = "LastPageButtonEnabled"sv
constexpr auto | c_lastPageButtonHiddenVisualState = "LastPageButtonHidden"sv
constexpr auto | c_lastPageButtonName = "LastPageButton"sv
constexpr auto | c_lastPageButtonNotVisibleVisualState = "LastPageButtonCollapsed"sv
constexpr auto | c_lastPageButtonVisibleVisualState = "LastPageButtonVisible"sv
constexpr auto | c_nextPageButtonDisabledVisualState = "NextPageButtonDisabled"sv
constexpr auto | c_nextPageButtonEnabledVisualState = "NextPageButtonEnabled"sv
constexpr auto | c_nextPageButtonHiddenVisualState = "NextPageButtonHidden"sv
constexpr auto | c_nextPageButtonName = "NextPageButton"sv
constexpr auto | c_nextPageButtonNotVisibleVisualState = "NextPageButtonCollapsed"sv
constexpr auto | c_nextPageButtonVisibleVisualState = "NextPageButtonVisible"sv
constexpr auto | c_numberBoxName = "NumberBoxDisplay"sv
constexpr auto | c_numberBoxVisibleVisualState = "NumberBoxVisible"sv
constexpr auto | c_numberPanelIndicatorName = "NumberPanelCurrentPageIndicator"sv
constexpr auto | c_numberPanelRepeaterName = "NumberPanelItemsRepeater"sv
constexpr auto | c_numberPanelVisibleVisualState = "NumberPanelVisible"sv
constexpr auto | c_previousPageButtonDisabledVisualState = "PreviousPageButtonDisabled"sv
constexpr auto | c_previousPageButtonEnabledVisualState = "PreviousPageButtonEnabled"sv
constexpr auto | c_previousPageButtonHiddenVisualState = "PreviousPageButtonHidden"sv
constexpr auto | c_previousPageButtonName = "PreviousPageButton"sv
constexpr auto | c_previousPageButtonNotVisibleVisualState = "PreviousPageButtonCollapsed"sv
constexpr auto | c_previousPageButtonVisibleVisualState = "PreviousPageButtonVisible"sv
constexpr auto | c_rootGridName = "RootGrid"sv

Variable Documentation

const int c_AutoDisplayModeNumberOfPagesThreshold = 10

Definition at line 57 of file PagerControl.cpp.

constexpr auto c_comboBoxName = "ComboBoxDisplay"sv

Definition at line 46 of file PagerControl.cpp.

constexpr auto c_comboBoxVisibleVisualState = "ComboBoxVisible"sv

Definition at line 15 of file PagerControl.cpp.

constexpr auto c_finiteItemsModeState = "FiniteItems"sv

Definition at line 42 of file PagerControl.cpp.

constexpr auto c_firstPageButtonDisabledVisualState = "FirstPageButtonDisabled"sv

Definition at line 22 of file PagerControl.cpp.

constexpr auto c_firstPageButtonEnabledVisualState = "FirstPageButtonEnabled"sv

Definition at line 21 of file PagerControl.cpp.

constexpr auto c_firstPageButtonHiddenVisualState = "FirstPageButtonHidden"sv

Definition at line 20 of file PagerControl.cpp.

constexpr auto c_firstPageButtonName = "FirstPageButton"sv

Definition at line 51 of file PagerControl.cpp.

constexpr auto c_firstPageButtonNotVisibleVisualState = "FirstPageButtonCollapsed"sv

Definition at line 19 of file PagerControl.cpp.

constexpr auto c_firstPageButtonVisibleVisualState = "FirstPageButtonVisible"sv

Definition at line 18 of file PagerControl.cpp.

constexpr auto c_infiniteItemsModeState = "InfiniteItems"sv

Definition at line 43 of file PagerControl.cpp.

const int c_infiniteModeComboBoxItemsIncrement = 100

Definition at line 58 of file PagerControl.cpp.

constexpr auto c_lastPageButtonDisabledVisualState = "LastPageButtonDisabled"sv

Definition at line 40 of file PagerControl.cpp.

constexpr auto c_lastPageButtonEnabledVisualState = "LastPageButtonEnabled"sv

Definition at line 39 of file PagerControl.cpp.

constexpr auto c_lastPageButtonHiddenVisualState = "LastPageButtonHidden"sv

Definition at line 38 of file PagerControl.cpp.

constexpr auto c_lastPageButtonName = "LastPageButton"sv

Definition at line 54 of file PagerControl.cpp.

constexpr auto c_lastPageButtonNotVisibleVisualState = "LastPageButtonCollapsed"sv

Definition at line 37 of file PagerControl.cpp.

constexpr auto c_lastPageButtonVisibleVisualState = "LastPageButtonVisible"sv

Definition at line 36 of file PagerControl.cpp.

constexpr auto c_nextPageButtonDisabledVisualState = "NextPageButtonDisabled"sv

Definition at line 34 of file PagerControl.cpp.

constexpr auto c_nextPageButtonEnabledVisualState = "NextPageButtonEnabled"sv

Definition at line 33 of file PagerControl.cpp.

constexpr auto c_nextPageButtonHiddenVisualState = "NextPageButtonHidden"sv

Definition at line 32 of file PagerControl.cpp.

constexpr auto c_nextPageButtonName = "NextPageButton"sv

Definition at line 53 of file PagerControl.cpp.

constexpr auto c_nextPageButtonNotVisibleVisualState = "NextPageButtonCollapsed"sv

Definition at line 31 of file PagerControl.cpp.

constexpr auto c_nextPageButtonVisibleVisualState = "NextPageButtonVisible"sv

Definition at line 30 of file PagerControl.cpp.

constexpr auto c_numberBoxName = "NumberBoxDisplay"sv

Definition at line 47 of file PagerControl.cpp.

constexpr auto c_numberBoxVisibleVisualState = "NumberBoxVisible"sv

Definition at line 14 of file PagerControl.cpp.

constexpr auto c_numberPanelIndicatorName = "NumberPanelCurrentPageIndicator"sv

Definition at line 50 of file PagerControl.cpp.

constexpr auto c_numberPanelRepeaterName = "NumberPanelItemsRepeater"sv

Definition at line 49 of file PagerControl.cpp.

constexpr auto c_numberPanelVisibleVisualState = "NumberPanelVisible"sv

Definition at line 16 of file PagerControl.cpp.

constexpr auto c_previousPageButtonDisabledVisualState = "PreviousPageButtonDisabled"sv

Definition at line 28 of file PagerControl.cpp.

constexpr auto c_previousPageButtonEnabledVisualState = "PreviousPageButtonEnabled"sv

Definition at line 27 of file PagerControl.cpp.

constexpr auto c_previousPageButtonHiddenVisualState = "PreviousPageButtonHidden"sv

Definition at line 26 of file PagerControl.cpp.

constexpr auto c_previousPageButtonName = "PreviousPageButton"sv

Definition at line 52 of file PagerControl.cpp.

constexpr auto c_previousPageButtonNotVisibleVisualState = "PreviousPageButtonCollapsed"sv

Definition at line 25 of file PagerControl.cpp.

constexpr auto c_previousPageButtonVisibleVisualState = "PreviousPageButtonVisible"sv

Definition at line 24 of file PagerControl.cpp.

constexpr auto c_rootGridName = "RootGrid"sv

Definition at line 45 of file PagerControl.cpp.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControl.h File Reference

  • File List
  • File Members
  • PagerControl
Classes

PagerControl.h File Reference

#include "pch.h"
#include "common.h"
#include "PagerControl.g.h"
#include "PagerControl.properties.h"

Go to the source code of this file.

Classes

class PagerControl
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControl.idl File Reference

  • File List
  • File Members
  • PagerControl
Namespaces | Enumerations | Variables

PagerControl.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | PagerControlButtonVisibility { Visible = 1, HiddenOnEdge, Hidden = 2 }
enum | PagerControlDisplayMode { Auto = 1, ComboBox, ButtonPanel }

Variables

Boolean | ButtonPanelAlwaysShowFirstLastPageIndex
PagerControlDisplayMode | DisplayMode
Microsoft UI Xaml Input ICommand | FirstButtonCommand
Microsoft UI Xaml Style | FirstButtonStyle
PagerControlButtonVisibility | FirstButtonVisibility
Microsoft UI Xaml Input ICommand | LastButtonCommand
Microsoft UI Xaml Style | LastButtonStyle
PagerControlButtonVisibility | LastButtonVisibility
Microsoft UI Xaml Input ICommand | NextButtonCommand
Microsoft UI Xaml Style | NextButtonStyle
PagerControlButtonVisibility | NextButtonVisibility
Int32 | NumberOfPages
unsealed runtimeclass | PagerControl
unsealed runtimeclass | PagerControlTemplateSettings
Microsoft UI Xaml Input ICommand | PagerInputCommand
String | PrefixText
Microsoft UI Xaml Input ICommand | PreviousButtonCommand
Microsoft UI Xaml Style | PreviousButtonStyle
PagerControlButtonVisibility | PreviousButtonVisibility
event Windows Foundation
TypedEventHandler
< PagerControl,
PagerControlSelectedIndexChangedEventArgs > 		SelectedIndexChanged
Int32 | SelectedPageIndex
String | SuffixText
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlAutomationPeer.cpp File Reference

  • File List
  • File Members
  • PagerControl

PagerControlAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "PagerControl.h"
#include "PagerControlAutomationPeer.h"
#include "Utils.h"
#include "PagerControlAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlAutomationPeer.h File Reference

  • File List
  • File Members
  • PagerControl
Classes

PagerControlAutomationPeer.h File Reference

#include "PagerControl.h"
#include "PagerControlAutomationPeer.g.h"

Go to the source code of this file.

Classes

class PagerControlAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlAutomationPeer.idl File Reference

  • File List
  • File Members
  • PagerControl
Namespaces | Variables

PagerControlAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | PagerControlAutomationPeer
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlSelectedIndexChangedEventArgs.h File Reference

  • File List
  • File Members
  • PagerControl
Classes

PagerControlSelectedIndexChangedEventArgs.h File Reference

#include "PagerControlSelectedIndexChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class PagerControlSelectedIndexChangedEventArgs
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlTemplateSettings.cpp File Reference

  • File List
  • File Members
  • PagerControl

PagerControlTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PagerControlTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlTemplateSettings.h File Reference

  • File List
  • File Members
  • PagerControl
Classes

PagerControlTemplateSettings.h File Reference

#include "PagerControlTemplateSettings.g.h"
#include "PagerControlTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class PagerControlTemplateSettings
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/APITests/PagerControlTests.cs File Reference

  • File List
  • File Members
  • PagerControl
  • APITests
Classes | Namespaces

PagerControlTests.cs File Reference

Go to the source code of this file.

Classes

class | PagerControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/InteractionTests/PagerControlTestBase.cs File Reference

  • File List
  • File Members
  • PagerControl
  • InteractionTests
Classes | Namespaces | Enumerations

PagerControlTestBase.cs File Reference

Go to the source code of this file.

Classes

class | PagerControlTestBase

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests

Enumerations

enum | Visibility { Visible, Collapsed }
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/InteractionTests/PagerControlTestPageElements.cs File Reference

  • File List
  • File Members
  • PagerControl
  • InteractionTests
Classes | Namespaces

PagerControlTestPageElements.cs File Reference

Go to the source code of this file.

Classes

class | PagerControlTestPageElements

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/InteractionTests/PagerControlTests.cs File Reference

  • File List
  • File Members
  • PagerControl
  • InteractionTests
Classes | Namespaces

PagerControlTests.cs File Reference

Go to the source code of this file.

Classes

class | PagerControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/TestUI/PagerControlAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • PagerControl
  • TestUI
Classes | Namespaces

PagerControlAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PagerControlAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/TestUI/PagerControlPage.xaml.cs File Reference

  • File List
  • File Members
  • PagerControl
  • TestUI
Classes | Namespaces

PagerControlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PagerControlPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ParallaxView.cpp File Reference

  • File List
  • File Members
  • ParallaxView

ParallaxView.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ParallaxView.h"
#include "RuntimeProfiler.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ParallaxView.h File Reference

  • File List
  • File Members
  • ParallaxView
Classes

ParallaxView.h File Reference

#include "ScrollInputHelper.h"
#include "ParallaxView.g.h"
#include "ParallaxView.properties.h"

Go to the source code of this file.

Classes

class ParallaxView
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ParallaxView.idl File Reference

  • File List
  • File Members
  • ParallaxView
Namespaces | Enumerations | Functions | Variables

ParallaxView.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | ParallaxSourceOffsetKind { Absolute = 0, Relative = 1 }

Functions

void | RefreshAutomaticHorizontalOffsets ()
void | RefreshAutomaticVerticalOffsets ()

Variables

unsealed runtimeclass | ParallaxView
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ScrollInputHelper.cpp File Reference

  • File List
  • File Members
  • ParallaxView

ScrollInputHelper.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollInputHelper.h"
#include "ScrollPresenter.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ScrollInputHelper.h File Reference

  • File List
  • File Members
  • ParallaxView
Classes

ScrollInputHelper.h File Reference

Go to the source code of this file.

Classes

class ScrollInputHelper
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/APITests/ParallaxViewTests.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • APITests
Classes | Namespaces

ParallaxViewTests.cs File Reference

Go to the source code of this file.

Classes

class | ParallaxViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/InteractionTests/ParallaxViewTests.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • InteractionTests
Classes | Namespaces

ParallaxViewTests.cs File Reference

Go to the source code of this file.

Classes

class | ParallaxViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/DynamicPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

DynamicPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | DynamicPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/Ingredient.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

Ingredient.cs File Reference

Go to the source code of this file.

Classes

class | Ingredient

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ListViewBackgroundPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

ListViewBackgroundPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ListViewBackgroundPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ListViewHeaderPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

ListViewHeaderPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ListViewHeaderPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ListViewItemPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

ListViewItemPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ListViewItemPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ParallaxViewPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

ParallaxViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ParallaxViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

ParallaxViewStackPanelPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ParallaxViewStackPanelPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/SimpleRectanglePage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

SimpleRectanglePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SimpleRectanglePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/TextPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

TextPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TextPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/VirtualizingStackPanelPage.xaml.cs File Reference

  • File List
  • File Members
  • ParallaxView
  • TestUI
Classes | Namespaces

VirtualizingStackPanelPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingStackPanelPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/InitialsGenerator.cpp File Reference

  • File List
  • File Members
  • PersonPicture

InitialsGenerator.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InitialsGenerator.h"
#include <cwctype>
#include <sstream>
#include <algorithm>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/InitialsGenerator.h File Reference

  • File List
  • File Members
  • PersonPicture
Classes | Enumerations

InitialsGenerator.h File Reference

Go to the source code of this file.

Classes

class | InitialsGenerator
PersonPicture Control. More...

Enumerations

enum | CharacterType { Other = 0, Standard = 1, Symbolic = 2, Glyph = 3 }

Enumeration Type Documentation

enum CharacterType

Value indicating the general character set for a given character.

Enumerator:
Other

Indicates we could not match the character set.

Standard

Member of the Latin character set.

Symbolic

Member of a symbolic character set.

Glyph

Member of a character set which supports glyphs.

Definition at line 9 of file InitialsGenerator.h.

{
    /// <summary>
    /// Indicates we could not match the character set.
    /// </summary>
    Other = 0,

    /// <summary>
    /// Member of the Latin character set.
    /// </summary>
    Standard = 1,

    /// <summary>
    /// Member of a symbolic character set.
    /// </summary>
    Symbolic = 2,

    /// <summary>
    /// Member of a character set which supports glyphs.
    /// </summary>
    Glyph = 3
};

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPicture.cpp File Reference

  • File List
  • File Members
  • PersonPicture

PersonPicture.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InitialsGenerator.h"
#include "PersonPicture.h"
#include "PersonPictureAutomationPeer.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "RuntimeProfiler.h"
#include "PersonPictureTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPicture.h File Reference

  • File List
  • File Members
  • PersonPicture
Classes

PersonPicture.h File Reference

#include "PersonPicture.g.h"
#include "PersonPicture.properties.h"

Go to the source code of this file.

Classes

class PersonPicture
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPicture.idl File Reference

  • File List
  • File Members
  • PersonPicture
Namespaces | Variables

PersonPicture.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | PersonPicture
runtimeclass | PersonPictureTemplateSettings
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPictureAutomationPeer.cpp File Reference

  • File List
  • File Members
  • PersonPicture

PersonPictureAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PersonPicture.h"
#include "PersonPictureAutomationPeer.h"
#include "PersonPictureAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPictureAutomationPeer.h File Reference

  • File List
  • File Members
  • PersonPicture
Classes

PersonPictureAutomationPeer.h File Reference

#include "PersonPicture.h"
#include "PersonPictureAutomationPeer.g.h"

Go to the source code of this file.

Classes

class PersonPictureAutomationPeer
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPictureAutomationPeer.idl File Reference

  • File List
  • File Members
  • PersonPicture
Namespaces | Variables

PersonPictureAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | PersonPictureAutomationPeer
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPictureTemplateSettings.h File Reference

  • File List
  • File Members
  • PersonPicture
Classes

PersonPictureTemplateSettings.h File Reference

#include "PersonPictureTemplateSettings.g.h"
#include "PersonPictureTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class PersonPictureTemplateSettings
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/APITests/PersonPictureTests.cs File Reference

  • File List
  • File Members
  • PersonPicture
  • APITests
Classes | Namespaces

PersonPictureTests.cs File Reference

Go to the source code of this file.

Classes

class | PersonPictureTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/InteractionTests/PersonPictureTests.cs File Reference

  • File List
  • File Members
  • PersonPicture
  • InteractionTests
Classes | Namespaces

PersonPictureTests.cs File Reference

Go to the source code of this file.

Classes

class | PersonPictureTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/TestUI/PersonPicturePage.xaml.cs File Reference

  • File List
  • File Members
  • PersonPicture
  • TestUI
Classes | Namespaces

PersonPicturePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PersonPicturePage
class | PersonPicturePage::SportsGroup
class | PersonPicturePage::SportsPerson

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPager.cpp File Reference

  • File List
  • File Members
  • PipsPager
Typedefs | Variables

PipsPager.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "PipsPager.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "PipsPagerTemplateSettings.h"
#include "PipsPagerSelectedIndexChangedEventArgs.h"
#include "PipsPagerAutomationPeer.h"
#include "StackLayout.h"

Go to the source code of this file.

Typedefs

typedef
winrt::PipsPagerButtonVisibility 		ButtonVisibility

Variables

constexpr auto | c_nextPageButtonCollapsedVisualState = "NextPageButtonCollapsed"sv
constexpr auto | c_nextPageButtonDisabledVisualState = "NextPageButtonDisabled"sv
constexpr auto | c_nextPageButtonEnabledVisualState = "NextPageButtonEnabled"sv
constexpr auto | c_nextPageButtonHiddenVisualState = "NextPageButtonHidden"sv
constexpr auto | c_nextPageButtonName = "NextPageButton"sv
constexpr auto | c_nextPageButtonVisibleVisualState = "NextPageButtonVisible"sv
constexpr auto | c_pipsPagerButtonHorizontalOrientationVisualState = "HorizontalOrientation"sv
constexpr auto | c_pipsPagerButtonVerticalOrientationVisualState = "VerticalOrientation"sv
constexpr auto | c_pipsPagerHorizontalOrientationButtonHeightPropertyName = "PipsPagerHorizontalOrientationButtonHeight"sv
constexpr auto | c_pipsPagerHorizontalOrientationButtonWidthPropertyName = "PipsPagerHorizontalOrientationButtonWidth"sv
constexpr auto | c_pipsPagerHorizontalOrientationVisualState = "HorizontalOrientationView"sv
constexpr auto | c_pipsPagerRepeaterName = "PipsPagerItemsRepeater"sv
constexpr auto | c_pipsPagerScrollViewerName = "PipsPagerScrollViewer"sv
constexpr auto | c_pipsPagerVerticalOrientationButtonHeightPropertyName = "PipsPagerVerticalOrientationButtonHeight"sv
constexpr auto | c_pipsPagerVerticalOrientationButtonWidthPropertyName = "PipsPagerVerticalOrientationButtonWidth"sv
constexpr auto | c_pipsPagerVerticalOrientationVisualState = "VerticalOrientationView"sv
constexpr auto | c_previousPageButtonCollapsedVisualState = "PreviousPageButtonCollapsed"sv
constexpr auto | c_previousPageButtonDisabledVisualState = "PreviousPageButtonDisabled"sv
constexpr auto | c_previousPageButtonEnabledVisualState = "PreviousPageButtonEnabled"sv
constexpr auto | c_previousPageButtonHiddenVisualState = "PreviousPageButtonHidden"sv
constexpr auto | c_previousPageButtonName = "PreviousPageButton"sv
constexpr auto | c_previousPageButtonVisibleVisualState = "PreviousPageButtonVisible"sv

Typedef Documentation

typedef winrt::PipsPagerButtonVisibility ButtonVisibility

Definition at line 15 of file PipsPager.cpp.

Variable Documentation

constexpr auto c_nextPageButtonCollapsedVisualState = "NextPageButtonCollapsed"sv

Definition at line 28 of file PipsPager.cpp.

constexpr auto c_nextPageButtonDisabledVisualState = "NextPageButtonDisabled"sv

Definition at line 31 of file PipsPager.cpp.

constexpr auto c_nextPageButtonEnabledVisualState = "NextPageButtonEnabled"sv

Definition at line 30 of file PipsPager.cpp.

constexpr auto c_nextPageButtonHiddenVisualState = "NextPageButtonHidden"sv

Definition at line 27 of file PipsPager.cpp.

constexpr auto c_nextPageButtonName = "NextPageButton"sv

Definition at line 34 of file PipsPager.cpp.

constexpr auto c_nextPageButtonVisibleVisualState = "NextPageButtonVisible"sv

Definition at line 26 of file PipsPager.cpp.

constexpr auto c_pipsPagerButtonHorizontalOrientationVisualState = "HorizontalOrientation"sv

Definition at line 49 of file PipsPager.cpp.

constexpr auto c_pipsPagerButtonVerticalOrientationVisualState = "VerticalOrientation"sv

Definition at line 48 of file PipsPager.cpp.

constexpr auto c_pipsPagerHorizontalOrientationButtonHeightPropertyName = "PipsPagerHorizontalOrientationButtonHeight"sv

Definition at line 43 of file PipsPager.cpp.

constexpr auto c_pipsPagerHorizontalOrientationButtonWidthPropertyName = "PipsPagerHorizontalOrientationButtonWidth"sv

Definition at line 42 of file PipsPager.cpp.

constexpr auto c_pipsPagerHorizontalOrientationVisualState = "HorizontalOrientationView"sv

Definition at line 45 of file PipsPager.cpp.

constexpr auto c_pipsPagerRepeaterName = "PipsPagerItemsRepeater"sv

Definition at line 36 of file PipsPager.cpp.

constexpr auto c_pipsPagerScrollViewerName = "PipsPagerScrollViewer"sv

Definition at line 37 of file PipsPager.cpp.

constexpr auto c_pipsPagerVerticalOrientationButtonHeightPropertyName = "PipsPagerVerticalOrientationButtonHeight"sv

Definition at line 40 of file PipsPager.cpp.

constexpr auto c_pipsPagerVerticalOrientationButtonWidthPropertyName = "PipsPagerVerticalOrientationButtonWidth"sv

Definition at line 39 of file PipsPager.cpp.

constexpr auto c_pipsPagerVerticalOrientationVisualState = "VerticalOrientationView"sv

Definition at line 46 of file PipsPager.cpp.

constexpr auto c_previousPageButtonCollapsedVisualState = "PreviousPageButtonCollapsed"sv

Definition at line 21 of file PipsPager.cpp.

constexpr auto c_previousPageButtonDisabledVisualState = "PreviousPageButtonDisabled"sv

Definition at line 24 of file PipsPager.cpp.

constexpr auto c_previousPageButtonEnabledVisualState = "PreviousPageButtonEnabled"sv

Definition at line 23 of file PipsPager.cpp.

constexpr auto c_previousPageButtonHiddenVisualState = "PreviousPageButtonHidden"sv

Definition at line 20 of file PipsPager.cpp.

constexpr auto c_previousPageButtonName = "PreviousPageButton"sv

Definition at line 33 of file PipsPager.cpp.

constexpr auto c_previousPageButtonVisibleVisualState = "PreviousPageButtonVisible"sv

Definition at line 19 of file PipsPager.cpp.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPager.h File Reference

  • File List
  • File Members
  • PipsPager
Classes

PipsPager.h File Reference

#include "pch.h"
#include "common.h"
#include "PipsPager.g.h"
#include "PipsPager.properties.h"

Go to the source code of this file.

Classes

class | PipsPager
class | PipsPagerViewItemRevokers
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPager.idl File Reference

  • File List
  • File Members
  • PipsPager
Namespaces | Enumerations | Variables

PipsPager.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | PipsPagerButtonVisibility { Visible = 1, VisibleOnPointerOver }
enum | PipsPagerWrapMode { None = 0, Wrap }

Variables

Int32 | MaxVisiblePips
Microsoft UI Xaml Style | NormalPipStyle
unsealed runtimeclass | PipsPager
runtimeclass | PipsPagerTemplateSettings
Microsoft UI Xaml Style | SelectedPipStyle
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerAutomationPeer.cpp File Reference

  • File List
  • File Members
  • PipsPager

PipsPagerAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "PipsPager.h"
#include "PipsPagerAutomationPeer.h"
#include "Utils.h"
#include "PipsPagerAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerAutomationPeer.h File Reference

  • File List
  • File Members
  • PipsPager
Classes

PipsPagerAutomationPeer.h File Reference

#include "PipsPager.h"
#include "PipsPagerAutomationPeer.g.h"

Go to the source code of this file.

Classes

class PipsPagerAutomationPeer
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerAutomationPeer.idl File Reference

  • File List
  • File Members
  • PipsPager
Namespaces | Variables

PipsPagerAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | PipsPagerAutomationPeer
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerSelectedIndexChangedEventArgs.h File Reference

  • File List
  • File Members
  • PipsPager
Classes

PipsPagerSelectedIndexChangedEventArgs.h File Reference

#include "PipsPagerSelectedIndexChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class PipsPagerSelectedIndexChangedEventArgs
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerTemplateSettings.cpp File Reference

  • File List
  • File Members
  • PipsPager

PipsPagerTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PipsPagerTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerTemplateSettings.h File Reference

  • File List
  • File Members
  • PipsPager
Classes

PipsPagerTemplateSettings.h File Reference

#include "PipsPagerTemplateSettings.g.h"
#include "PipsPagerTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class PipsPagerTemplateSettings
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/APITests/PipsPagerTests.cs File Reference

  • File List
  • File Members
  • PipsPager
  • APITests
Classes | Namespaces

PipsPagerTests.cs File Reference

Go to the source code of this file.

Classes

class | PipsPagerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/InteractionTests/PipsPagerElements.cs File Reference

  • File List
  • File Members
  • PipsPager
  • InteractionTests
Classes | Namespaces

PipsPagerElements.cs File Reference

Go to the source code of this file.

Classes

class | PipsPagerElements

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/InteractionTests/PipsPagerTestBase.cs File Reference

  • File List
  • File Members
  • PipsPager
  • InteractionTests
Classes | Namespaces

PipsPagerTestBase.cs File Reference

Go to the source code of this file.

Classes

class | PipsPagerTestBase

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/InteractionTests/PipsPagerTests.cs File Reference

  • File List
  • File Members
  • PipsPager
  • InteractionTests
Classes | Namespaces

PipsPagerTests.cs File Reference

Go to the source code of this file.

Classes

class | PipsPagerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/TestUI/PipsPagerAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • PipsPager
  • TestUI
Classes | Namespaces

PipsPagerAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PipsPagerAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/TestUI/PipsPagerExamples.xaml.cs File Reference

  • File List
  • File Members
  • PipsPager
  • TestUI
Classes | Namespaces

PipsPagerExamples.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PersonInfo
class | PipsPagerExamples

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/TestUI/PipsPagerPage.xaml.cs File Reference

  • File List
  • File Members
  • PipsPager
  • TestUI
Classes | Namespaces

PipsPagerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PipsPagerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBar.cpp File Reference

  • File List
  • File Members
  • ProgressBar
Functions

ProgressBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressBar.h"
#include "ProgressBarAutomationPeer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Functions

double LayoutRound (const double value, const double scaleFactor)

Function Documentation

double LayoutRound | ( | const double | value,
 |  | const double | scaleFactor
 | ) |  |

Definition at line 123 of file ProgressBar.cpp.

{
    return round(value * scaleFactor) / scaleFactor;
}

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBar.h File Reference

  • File List
  • File Members
  • ProgressBar
Classes

ProgressBar.h File Reference

#include "pch.h"
#include "common.h"
#include "ProgressBarTemplateSettings.h"
#include "ProgressBar.g.h"
#include "ProgressBar.properties.h"

Go to the source code of this file.

Classes

class ProgressBar
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBar.idl File Reference

  • File List
  • File Members
  • ProgressBar
Namespaces | Variables

ProgressBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | ProgressBar
unsealed runtimeclass | ProgressBarAutomationPeer
runtimeclass | ProgressBarTemplateSettings
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBarAutomationPeer.cpp File Reference

  • File List
  • File Members
  • ProgressBar

ProgressBarAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "ProgressBar.h"
#include "ProgressBarAutomationPeer.h"
#include "Utils.h"
#include "ProgressBarAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBarAutomationPeer.h File Reference

  • File List
  • File Members
  • ProgressBar
Classes

ProgressBarAutomationPeer.h File Reference

#include "ProgressBar.h"
#include "ProgressBarAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ProgressBarAutomationPeer
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBarTemplateSettings.cpp File Reference

  • File List
  • File Members
  • ProgressBar

ProgressBarTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressBarTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBarTemplateSettings.h File Reference

  • File List
  • File Members
  • ProgressBar
Classes

ProgressBarTemplateSettings.h File Reference

#include "ProgressBarTemplateSettings.g.h"
#include "ProgressBarTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class ProgressBarTemplateSettings
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/APITests/ProgressBarTests.cs File Reference

  • File List
  • File Members
  • ProgressBar
  • APITests
Classes | Namespaces

ProgressBarTests.cs File Reference

Go to the source code of this file.

Classes

class | ProgressBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/InteractionTests/ProgressBarTests.cs File Reference

  • File List
  • File Members
  • ProgressBar
  • InteractionTests
Classes | Namespaces

ProgressBarTests.cs File Reference

Go to the source code of this file.

Classes

class | ProgressBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/TestUI/ProgressBarAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • ProgressBar
  • TestUI
Classes | Namespaces

ProgressBarAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ProgressBarAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/TestUI/ProgressBarPage.xaml.cs File Reference

  • File List
  • File Members
  • ProgressBar
  • TestUI
Classes | Namespaces

ProgressBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NullableBooleanToBooleanConverter
class | ProgressBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/TestUI/ProgressBarReTemplatePage.xaml.cs File Reference

  • File List
  • File Members
  • ProgressBar
  • TestUI
Classes | Namespaces

ProgressBarReTemplatePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ProgressBarReTemplatePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRing.cpp File Reference

  • File List
  • File Members
  • ProgressRing

ProgressRing.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressRing.h"
#include "ProgressRingAutomationPeer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "math.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRing.h File Reference

  • File List
  • File Members
  • ProgressRing
Classes

ProgressRing.h File Reference

#include "pch.h"
#include "common.h"
#include "AnimatedVisuals/ProgressRingIndeterminate.h"
#include "AnimatedVisuals/ProgressRingDeterminate.h"
#include "ProgressRingTemplateSettings.h"
#include "ProgressRing.g.h"
#include "ProgressRing.properties.h"

Go to the source code of this file.

Classes

class ProgressRing
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRing.idl File Reference

  • File List
  • File Members
  • ProgressRing
Namespaces | Variables

ProgressRing.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | ProgressRing
unsealed runtimeclass | ProgressRingAutomationPeer
runtimeclass | ProgressRingTemplateSettings
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRingAutomationPeer.cpp File Reference

  • File List
  • File Members
  • ProgressRing

ProgressRingAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "ProgressRing.h"
#include "ProgressRingAutomationPeer.h"
#include "Utils.h"
#include "ProgressRingAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRingAutomationPeer.h File Reference

  • File List
  • File Members
  • ProgressRing
Classes

ProgressRingAutomationPeer.h File Reference

#include "ProgressRing.h"
#include "ProgressRingAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ProgressRingAutomationPeer
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRingTemplateSettings.cpp File Reference

  • File List
  • File Members
  • ProgressRing

ProgressRingTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ProgressRingTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRingTemplateSettings.h File Reference

  • File List
  • File Members
  • ProgressRing
Classes

ProgressRingTemplateSettings.h File Reference

#include "ProgressRingTemplateSettings.g.h"
#include "ProgressRingTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class ProgressRingTemplateSettings
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ProgressRingDeterminate.cpp File Reference

  • File List
  • File Members
  • ProgressRing
  • AnimatedVisuals
Classes | Namespaces

ProgressRingDeterminate.cpp File Reference

#include "pch.h"
#include "ProgressRingDeterminate.h"
#include "WindowsNumerics.h"

Go to the source code of this file.

Classes

class | AnimatedVisual

Namespaces

namespace | anonymous_namespace{ProgressRingDeterminate.cpp}
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ProgressRingDeterminate.h File Reference

  • File List
  • File Members
  • ProgressRing
  • AnimatedVisuals
Classes | Namespaces

ProgressRingDeterminate.h File Reference

Go to the source code of this file.

Classes

class | ProgressRingDeterminate

Namespaces

namespace | AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.cpp File Reference

  • File List
  • File Members
  • ProgressRing
  • AnimatedVisuals
Classes | Namespaces

ProgressRingIndeterminate.cpp File Reference

#include "pch.h"
#include "ProgressRingIndeterminate.h"
#include "WindowsNumerics.h"

Go to the source code of this file.

Classes

class | AnimatedVisual

Namespaces

namespace | anonymous_namespace{ProgressRingIndeterminate.cpp}
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.h File Reference

  • File List
  • File Members
  • ProgressRing
  • AnimatedVisuals
Classes | Namespaces

ProgressRingIndeterminate.h File Reference

Go to the source code of this file.

Classes

class | ProgressRingIndeterminate

Namespaces

namespace | AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/APITests/ProgressRingTests.cs File Reference

  • File List
  • File Members
  • ProgressRing
  • APITests
Classes | Namespaces

ProgressRingTests.cs File Reference

Go to the source code of this file.

Classes

class | ProgressRingTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/InteractionTests/ProgressRingTests.cs File Reference

  • File List
  • File Members
  • ProgressRing
  • InteractionTests
Classes | Namespaces

ProgressRingTests.cs File Reference

Go to the source code of this file.

Classes

class | ProgressRingTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ProgressRingAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • ProgressRing
  • TestUI
Classes | Namespaces

ProgressRingAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ProgressRingAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ProgressRingCustomLottieSourcePage.xaml.cs File Reference

  • File List
  • File Members
  • ProgressRing
  • TestUI
Classes | Namespaces

ProgressRingCustomLottieSourcePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ProgressRingCustomLottieSourcePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:27 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ProgressRingDeterminate.cs File Reference

  • File List
  • File Members
  • ProgressRing
  • TestUI
Classes | Namespaces

ProgressRingDeterminate.cs File Reference

Go to the source code of this file.

Classes

class | ProgressRingDeterminate
class | ProgressRingDeterminate::AnimatedVisual

Namespaces

namespace | AnimatedVisuals
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ProgressRingPage.xaml.cs File Reference

  • File List
  • File Members
  • ProgressRing
  • TestUI
Classes | Namespaces

ProgressRingPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ProgressRingPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ProgressRingStoryboardAnimationPage.xaml.cs File Reference

  • File List
  • File Members
  • ProgressRing
  • TestUI
Classes | Namespaces

ProgressRingStoryboardAnimationPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ProgressRingStoryboardAnimationPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/PTRTracing/PTRTracing.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • PTRTracing
Classes | Defines | Functions

PTRTracing.h File Reference

#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | PTRTrace

Defines

#define | PTR_TRACE_INFO(sender, message,...)
#define | PTR_TRACE_INFO_DBG(sender, message,...)
#define | PTR_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) PTRTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | PTR_TRACE_PERF(info)
#define | PTR_TRACE_PERF_DBG(info)
#define | PTR_TRACE_VERBOSE(sender, message,...)
#define | PTR_TRACE_VERBOSE_DBG(sender, message,...)
#define | PTR_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) PTRTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsPTRPerfTracingEnabled ()
bool | IsPTRTracingEnabled ()
bool | IsPTRVerboseTracingEnabled ()

Define Documentation

#define PTR_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsPTRTracingEnabled()) \
{ \
    PTR_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (PTRTrace::s_IsDebugOutputEnabled || PTRTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    PTR_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 33 of file PTRTracing.h.

#define PTR_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 67 of file PTRTracing.h.

#define PTR_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | PTRTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 30 of file PTRTracing.h.

#define PTR_TRACE_PERF ( info )
Value:
if (IsPTRPerfTracingEnabled()) \
{ \
    PTRTrace::TracePerfInfo(info); \
} \

Definition at line 56 of file PTRTracing.h.

#define PTR_TRACE_PERF_DBG ( info )

Definition at line 69 of file PTRTracing.h.

#define PTR_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsPTRVerboseTracingEnabled()) \
{ \
    PTR_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (PTRTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    PTR_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 46 of file PTRTracing.h.

#define PTR_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 68 of file PTRTracing.h.

#define PTR_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | PTRTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 43 of file PTRTracing.h.

Function Documentation

bool IsPTRPerfTracingEnabled ( ) [inline]

Definition at line 23 of file PTRTracing.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_PTR || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsPTRTracingEnabled ( ) [inline]

Definition at line 9 of file PTRTracing.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_PTR || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsPTRVerboseTracingEnabled ( ) [inline]

Definition at line 16 of file PTRTracing.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_PTR || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/RefreshContainer.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
Defines

RefreshContainer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshContainer.h"
#include "RefreshVisualizer.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.h"
#include "RefreshVisualizerEventArgs.h"
#include "RuntimeProfiler.h"
#include "PTRTracing.h"
#include <DoubleUtil.h>

Go to the source code of this file.

Defines

#define | DEFAULT_PULL_DIMENSION_SIZE 100
#define | MAX_BFS_DEPTH 10

Define Documentation

#define DEFAULT_PULL_DIMENSION_SIZE 100

Definition at line 17 of file RefreshContainer.cpp.

#define MAX_BFS_DEPTH 10

Definition at line 16 of file RefreshContainer.cpp.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/RefreshContainer.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
Classes

RefreshContainer.h File Reference

#include "RefreshContainer.g.h"
#include "RefreshContainer.properties.h"

Go to the source code of this file.

Classes

class RefreshContainer
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/RefreshContainer.idl File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
Namespaces | Enumerations | Functions | Variables

RefreshContainer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | RefreshPullDirection { LeftToRight = 0, TopToBottom = 1, RightToLeft = 2, BottomToTop = 3 }

Functions

void | RequestRefresh ()

Variables

unsealed runtimeclass | RefreshContainer
event Windows Foundation
TypedEventHandler
< RefreshContainer,
RefreshRequestedEventArgs > 		RefreshRequested
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/RefreshContainerPrivate.idl File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
Classes | Namespaces

RefreshContainerPrivate.idl File Reference

Go to the source code of this file.

Classes

interface | IRefreshContainerPrivate

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/InteractionTests/RefreshContainerTests.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • InteractionTests
Classes | Namespaces

RefreshContainerTests.cs File Reference

Go to the source code of this file.

Classes

class | RefreshContainerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/AnimationHandler.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • TestUI
Classes | Namespaces

AnimationHandler.cs File Reference

Go to the source code of this file.

Classes

class | AnimationHandler

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/ImageIRefreshInfoProviderAdapter.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • TestUI
Classes | Namespaces

ImageIRefreshInfoProviderAdapter.cs File Reference

Go to the source code of this file.

Classes

class | ImageIRefreshInfoProviderAdapter
class | RefreshInfoProviderImplementation

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/RefreshContainerOnImagePage.xaml.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • TestUI
Classes | Namespaces

RefreshContainerOnImagePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RefreshContainerOnImagePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/RefreshContainerPage.xaml.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • TestUI
Classes | Namespaces

RefreshContainerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RefreshContainerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApi.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

PullToRefreshHelperTestApi.cpp File Reference

#include "pch.h"
#include "common.h"
#include "PullToRefreshHelperTestApi.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApi.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Classes

PullToRefreshHelperTestApi.h File Reference

#include "PullToRefreshHelperTestApi.g.h"

Go to the source code of this file.

Classes

class PullToRefreshHelperTestApi
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestAPI.idl File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Namespaces

PullToRefreshHelperTestAPI.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApiFactory.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

PullToRefreshHelperTestApiFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshVisualizerEventArgs.h"
#include "RefreshInteractionRatioChangedEventArgs.h"
#include "PullToRefreshHelperTestApi.h"
#include "PullToRefreshHelperTestApiFactory.h"
#include "PullToRefreshHelperTestApi.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApiFactory.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

PullToRefreshHelperTestApiFactory.h File Reference

#include "PullToRefreshHelperTestApi.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshInteractionRatioChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

RefreshInteractionRatioChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshInteractionRatioChangedEventArgs.h"
#include "PTRTracing.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshInteractionRatioChangedEventArgs.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Classes

RefreshInteractionRatioChangedEventArgs.h File Reference

#include "RefreshInteractionRatioChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class RefreshInteractionRatioChangedEventArgs
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizer.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Defines

RefreshVisualizer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshVisualizer.h"
#include "RefreshVisualizerEventArgs.h"
#include "RuntimeProfiler.h"
#include "PTRTracing.h"

Go to the source code of this file.

Defines

#define | DEFAULT_INDICATOR_SIZE 30
#define | MINIMUM_INDICATOR_OPACITY 0.4f
#define | PARALLAX_POSITION_RATIO 0.5f

Define Documentation

#define DEFAULT_INDICATOR_SIZE 30

Definition at line 17 of file RefreshVisualizer.cpp.

#define MINIMUM_INDICATOR_OPACITY 0.4f

Definition at line 14 of file RefreshVisualizer.cpp.

#define PARALLAX_POSITION_RATIO 0.5f

Definition at line 20 of file RefreshVisualizer.cpp.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizer.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Classes

RefreshVisualizer.h File Reference

#include "RefreshVisualizer.g.h"
#include "RefreshVisualizer.properties.h"

Go to the source code of this file.

Classes

class RefreshVisualizer
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizer.idl File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Namespaces | Enumerations

RefreshVisualizer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | RefreshVisualizerOrientation { Auto = 1, Normal = 1, Rotate90DegreesCounterclockwise = 2, Rotate270DegreesCounterclockwise = 3 }
enum RefreshVisualizerState {
Idle = 0, Peeking = 1, Interacting = 2, Pending = 3,
Refreshing = 4
}
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

RefreshVisualizerEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshVisualizer.h"
#include "RefreshVisualizerEventArgs.h"
#include "PTRTracing.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Classes

RefreshVisualizerEventArgs.h File Reference

#include "RefreshVisualizer.h"
#include "RefreshStateChangedEventArgs.g.h"
#include "RefreshRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class | RefreshRequestedEventArgs
class | RefreshStateChangedEventArgs
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizerPrivate.idl File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
Classes | Namespaces

RefreshVisualizerPrivate.idl File Reference

Go to the source code of this file.

Classes

interface | IRefreshInfoProvider
interface | IRefreshVisualizerPrivate

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/APITests/RefreshVisualizerTests.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
  • APITests
Classes | Namespaces

RefreshVisualizerTests.cs File Reference

Go to the source code of this file.

Classes

class | RefreshInfoProviderImpl
class | RefreshVisualizerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/TestUI/RefreshVisualizerPage.xaml.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
  • TestUI
Classes | Namespaces

RefreshVisualizerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RefreshVisualizerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/TestUI/SliderAsRefreshInfoProvider.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
  • TestUI
Classes | Namespaces

SliderAsRefreshInfoProvider.cs File Reference

Go to the source code of this file.

Classes

class | RefreshInfoProviderImplementation
class | SliderRefreshInfoProviderAdapter

Namespaces

namespace | RefreshVizualizer_TestUI
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
Defines

RefreshInfoProviderImpl.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RefreshInfoProviderImpl.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.h"
#include "RefreshInteractionRatioChangedEventArgs.h"
#include "PTRTracing.h"

Go to the source code of this file.

Defines

#define | ALWAYS_RAISE_INTERACTION_RATIO_TOLERANCE 0.05
#define | RAISE_INTERACTION_RATIO_CHANGED_FREQUENCY 5

Define Documentation

#define ALWAYS_RAISE_INTERACTION_RATIO_TOLERANCE 0.05

Definition at line 18 of file RefreshInfoProviderImpl.cpp.

#define RAISE_INTERACTION_RATIO_CHANGED_FREQUENCY 5

Definition at line 14 of file RefreshInfoProviderImpl.cpp.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
Classes | Defines

RefreshInfoProviderImpl.h File Reference

Go to the source code of this file.

Classes

class | RefreshInfoProviderImpl

Defines

#define | DEFAULT_EXECUTION_RATIO 0.8

Define Documentation

#define DEFAULT_EXECUTION_RATIO 0.8

Definition at line 6 of file RefreshInfoProviderImpl.h.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
Defines

ScrollViewerIRefreshInfoProviderAdapter.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.h"
#include "ScrollViewerIRefreshInfoProviderAdapterFactory.h"
#include "RefreshInteractionRatioChangedEventArgs.h"
#include "RefreshVisualizer.h"
#include "ResourceAccessor.h"
#include "PTRTracing.h"

Go to the source code of this file.

Defines

#define | FALLBACK_EXECUTION_RATIO 0.8
#define | INITIAL_OFFSET_THRESHOLD 1.0f
#define | MAX_BFS_DEPTH 10

Define Documentation

#define FALLBACK_EXECUTION_RATIO 0.8

Definition at line 21 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

#define INITIAL_OFFSET_THRESHOLD 1.0f

Definition at line 14 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

#define MAX_BFS_DEPTH 10

Definition at line 17 of file ScrollViewerIRefreshInfoProviderAdapter.cpp.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
Classes

ScrollViewerIRefreshInfoProviderAdapter.h File Reference

#include "RefreshInfoProviderImpl.h"
#include "ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.g.h"

Go to the source code of this file.

Classes

class ScrollViewerIRefreshInfoProviderAdapter
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapter.idl File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
Classes | Namespaces | Functions | Variables

ScrollViewerIRefreshInfoProviderAdapter.idl File Reference

Go to the source code of this file.

Classes

interface | IAdapterAnimationHandler
interface | IRefreshInfoProviderAdapter

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Functions

IRefreshInfoProvider | Adapt (Microsoft.UI.Xaml.Controls.ScrollViewer adaptee, Windows.Foundation.Size visualizerSize)

Variables

runtimeclass
IAdapterAnimationHandler 		animationHandler
runtimeclass | ScrollViewerIRefreshInfoProviderAdapter
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapterFactory.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

ScrollViewerIRefreshInfoProviderAdapterFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollViewerIRefreshInfoProviderAdapterFactory.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapterFactory.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

ScrollViewerIRefreshInfoProviderAdapterFactory.h File Reference

#include "ScrollViewerIRefreshInfoProviderAdapter.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
Defines

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ViewModel.h"
#include "TreeViewNode.h"
#include "VectorChangedEventArgs.h"
#include "ScrollViewerIRefreshInfoProviderAdapter.h"
#include "PTRTracing.h"

Go to the source code of this file.

Defines

#define | REFRESH_ANIMATION_DURATION 100ms
#define | REFRESH_VISUALIZER_OVERPAN_RATIO 0.4

Define Documentation

#define REFRESH_ANIMATION_DURATION 100ms

Definition at line 12 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

#define REFRESH_VISUALIZER_OVERPAN_RATIO 0.4

Definition at line 13 of file ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
Classes

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h File Reference

#include "CppWinRTHelpers.h"

Go to the source code of this file.

Classes

class ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/APITests/ScrollViewerAdapterTests.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • APITests
Classes | Namespaces

ScrollViewerAdapterTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewerAdapterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/InteractionTests/ScrollViewerAdapterTests.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • InteractionTests
Classes | Namespaces

ScrollViewerAdapterTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewerAdapterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/TestUI/ScrollViewerAdapterPage.xaml.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • TestUI
Classes | Namespaces

ScrollViewerAdapterPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewerAdapterPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/TestUI/PTRPage.xaml.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • TestUI
Classes | Namespaces

PTRPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PTRPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/TestUI/PullToRefreshPage.xaml.cs File Reference

  • File List
  • File Members
  • PullToRefresh
  • TestUI
Classes | Namespaces

PullToRefreshPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PullToRefreshPage
An empty page that can be used on its own or navigated to within a Frame. More...

Namespaces

namespace | PTR_TestUI
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/RadialGradientBrush.cpp File Reference

  • File List
  • File Members
  • RadialGradientBrush

RadialGradientBrush.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "SharedHelpers.h"
#include "RadialGradientBrush.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/RadialGradientBrush.h File Reference

  • File List
  • File Members
  • RadialGradientBrush
Classes

RadialGradientBrush.h File Reference

#include "pch.h"
#include "common.h"
#include "RadialGradientBrush.g.h"
#include "RadialGradientBrush.properties.h"

Go to the source code of this file.

Classes

class RadialGradientBrush
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/RadialGradientBrush.idl File Reference

  • File List
  • File Members
  • RadialGradientBrush
Namespaces | Variables

RadialGradientBrush.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XM_NAMESPACE

Variables

unsealed runtimeclass | RadialGradientBrush
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/InteractionTests/RadialGradientBrushTests.cs File Reference

  • File List
  • File Members
  • RadialGradientBrush
  • InteractionTests
Classes | Namespaces

RadialGradientBrushTests.cs File Reference

Go to the source code of this file.

Classes

class | RadialGradientBrushTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/TestUI/RadialGradientBrushPage.xaml.cs File Reference

  • File List
  • File Members
  • RadialGradientBrush
  • TestUI
Classes | Namespaces

RadialGradientBrushPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RadialGradientBrushPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/ColumnMajorUniformToLargestGridLayout.cpp File Reference

  • File List
  • File Members
  • RadioButtons

ColumnMajorUniformToLargestGridLayout.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "ColumnMajorUniformToLargestGridLayout.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/ColumnMajorUniformToLargestGridLayout.h File Reference

  • File List
  • File Members
  • RadioButtons
Classes

ColumnMajorUniformToLargestGridLayout.h File Reference

#include "common.h"
#include "ColumnMajorUniformToLargestGridLayout.g.h"
#include "ColumnMajorUniformToLargestGridLayout.properties.h"
#include "Layout.h"
#include "NonVirtualizingLayout.h"

Go to the source code of this file.

Classes

class ColumnMajorUniformToLargestGridLayout
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtons.cpp File Reference

  • File List
  • File Members
  • RadioButtons

RadioButtons.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadioButtons.h"
#include "RadioButtonsAutomationPeer.h"
#include "Vector.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "RadioButtonsTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtons.h File Reference

  • File List
  • File Members
  • RadioButtons
Classes

RadioButtons.h File Reference

#include "common.h"
#include "RadioButtonsElementFactory.h"
#include "RadioButtons.g.h"
#include "RadioButtons.properties.h"
#include "ColumnMajorUniformToLargestGridLayout.h"

Go to the source code of this file.

Classes

class | ChildHandlers
class | RadioButtons
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtons.idl File Reference

  • File List
  • File Members
  • RadioButtons
Namespaces | Functions | Variables

RadioButtons.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE

Functions

Microsoft UI Xaml UIElement | ContainerFromIndex (Int32 index)

Variables

Object | ItemsSource
Object | ItemTemplate
Int32 | MaxColumns
unsealed runtimeclass | RadioButtons
unsealed runtimeclass | RadioButtonsAutomationPeer
Int32 | SelectedIndex
Object | SelectedItem
event Microsoft UI Xaml
Controls
SelectionChangedEventHandler 		SelectionChanged
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsAutomationPeer.cpp File Reference

  • File List
  • File Members
  • RadioButtons

RadioButtonsAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "RadioButtons.h"
#include "RadioButtonsAutomationPeer.h"
#include "Utils.h"
#include "RadioButtonsAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsAutomationPeer.h File Reference

  • File List
  • File Members
  • RadioButtons
Classes

RadioButtonsAutomationPeer.h File Reference

#include "RadioButtons.h"
#include "RadioButtonsAutomationPeer.g.h"

Go to the source code of this file.

Classes

class RadioButtonsAutomationPeer
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsElementFactory.cpp File Reference

  • File List
  • File Members
  • RadioButtons

RadioButtonsElementFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemTemplateWrapper.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "RadioButtonsElementFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsElementFactory.h File Reference

  • File List
  • File Members
  • RadioButtons
Classes

RadioButtonsElementFactory.h File Reference

#include "common.h"
#include "ElementFactory.h"

Go to the source code of this file.

Classes

class RadioButtonsElementFactory
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsPrimitives.idl File Reference

  • File List
  • File Members
  • RadioButtons
Namespaces | Variables

RadioButtonsPrimitives.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Variables

unsealed runtimeclass | ColumnMajorUniformToLargestGridLayout
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsTestHooks.cpp File Reference

  • File List
  • File Members
  • RadioButtons

RadioButtonsTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadioButtonsTestHooks.h"
#include "RadioButtonsTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsTestHooks.h File Reference

  • File List
  • File Members
  • RadioButtons
Classes

RadioButtonsTestHooks.h File Reference

#include "RadioButtons.h"
#include "RadioButtonsTestHooks.g.h"

Go to the source code of this file.

Classes

class RadioButtonsTestHooks
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsTestHooks.idl File Reference

  • File List
  • File Members
  • RadioButtons
Namespaces

RadioButtonsTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/APITests/RadioButtonsTests.cs File Reference

  • File List
  • File Members
  • RadioButtons
  • APITests
Classes | Namespaces

RadioButtonsTests.cs File Reference

Go to the source code of this file.

Classes

class | RadioButtonsTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/InteractionTests/RadioButtonsFocusTestPageElements.cs File Reference

  • File List
  • File Members
  • RadioButtons
  • InteractionTests
Classes | Namespaces

RadioButtonsFocusTestPageElements.cs File Reference

Go to the source code of this file.

Classes

class | RadioButtonsFocusTestPageElements

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/InteractionTests/RadioButtonsTestPageElements.cs File Reference

  • File List
  • File Members
  • RadioButtons
  • InteractionTests
Classes | Namespaces

RadioButtonsTestPageElements.cs File Reference

Go to the source code of this file.

Classes

class | RadioButtonsTestPageElements

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/InteractionTests/RadioButtonsTests.cs File Reference

  • File List
  • File Members
  • RadioButtons
  • InteractionTests
Classes | Namespaces

RadioButtonsTests.cs File Reference

Go to the source code of this file.

Classes

class | RadioButtonsTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:28 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/TestUI/RadioButtonsCaseBundle.xaml.cs File Reference

  • File List
  • File Members
  • RadioButtons
  • TestUI
Classes | Namespaces

RadioButtonsCaseBundle.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RadioButtonsCaseBundle

Namespaces

namespace | RadioButtons_TestUI
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/TestUI/RadioButtonsFocusPage.xaml.cs File Reference

  • File List
  • File Members
  • RadioButtons
  • TestUI
Classes | Namespaces

RadioButtonsFocusPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RadioButtonsFocusPage

Namespaces

namespace | RadioButtons_TestUI
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/TestUI/RadioButtonsPage.xaml.cs File Reference

  • File List
  • File Members
  • RadioButtons
  • TestUI
Classes | Namespaces

RadioButtonsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RadioButtonsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/RadioMenuFlyoutItem.cpp File Reference

  • File List
  • File Members
  • RadioMenuFlyoutItem

RadioMenuFlyoutItem.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RadioMenuFlyoutItem.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/RadioMenuFlyoutItem.h File Reference

  • File List
  • File Members
  • RadioMenuFlyoutItem
Classes | Functions

RadioMenuFlyoutItem.h File Reference

#include "pch.h"
#include "common.h"
#include "RadioMenuFlyoutItem.g.h"
#include "RadioMenuFlyoutItem.properties.h"

Go to the source code of this file.

Classes

class | RadioMenuFlyoutItem

Functions

template<typename D , typename T , typename... I>
struct | __declspec (empty_bases) DeriveFromToggleMenuFlyoutItemHelper_base

Function Documentation

struct __declspec ( empty_bases ) [read]

Definition at line 15 of file RadioMenuFlyoutItem.h.

                                                                         : winrt::Microsoft::UI::Xaml::Controls::ToggleMenuFlyoutItemT<D, winrt::default_interface<T>, winrt::composable, I...>
{
    using composable = T;
    using class_type = typename T;

    operator class_type() const noexcept
    {
        return static_cast<winrt::IInspectable>(*this).as<class_type>();
    }

    hstring GetRuntimeClassName() const
    {
        return hstring{ winrt::name_of<T>() };
    }

    bool InternalIsChecked()
    {
        return this->IsChecked();
    }

    void InternalIsChecked(bool value)
    {
        this->IsChecked(value);
    }
};

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/RadioMenuFlyoutItem.idl File Reference

  • File List
  • File Members
  • RadioMenuFlyoutItem
Namespaces | Variables

RadioMenuFlyoutItem.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

String | GroupName
unsealed runtimeclass | RadioMenuFlyoutItem
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/InteractionTests/RadioMenuFlyoutItemTests.cs File Reference

  • File List
  • File Members
  • RadioMenuFlyoutItem
  • InteractionTests
Classes | Namespaces | Variables

RadioMenuFlyoutItemTests.cs File Reference

Go to the source code of this file.

Classes

class | RadioMenuFlyoutItemTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests

Variables

﻿using | System

Variable Documentation

﻿using System

Definition at line 3 of file RadioMenuFlyoutItemTests.cs.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/TestUI/RadioMenuFlyoutItemPage.xaml.cs File Reference

  • File List
  • File Members
  • RadioMenuFlyoutItem
  • TestUI
Classes | Namespaces

RadioMenuFlyoutItemPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RadioMenuFlyoutItemPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControl.cpp File Reference

  • File List
  • File Members
  • RatingControl
Variables

RatingControl.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RatingControl.h"
#include "RatingControlAutomationPeer.h"
#include "RuntimeProfiler.h"
#include "XamlControlsResources.h"
#include <RatingItemFontInfo.h>
#include <RatingItemImageInfo.h>

Go to the source code of this file.

Variables

const float | c_captionTopMarginIntercept = -20.4f
const float | c_captionTopMarginSlope = 0.3f
const wchar_t | c_fontSizeForRenderingKey [] = "RatingControlFontSizeForRendering"
const float | c_horizontalScaleAnimationCenterPoint = 0.5f
const wchar_t | c_itemSpacingKey [] = "RatingControlItemSpacing"
const float | c_mouseOverScale = 0.8f
const float | c_noPointerOverMagicNumber = -100
const int | c_noValueSetSentinel = -1
const float | c_touchOverScale = 1.0f
const float | c_verticalScaleAnimationCenterPoint = 0.8f

Variable Documentation

const float c_captionTopMarginIntercept = -20.4f

Definition at line 18 of file RatingControl.cpp.

const float c_captionTopMarginSlope = 0.3f

Definition at line 17 of file RatingControl.cpp.

const wchar_t c_fontSizeForRenderingKey[] = "RatingControlFontSizeForRendering"

Definition at line 26 of file RatingControl.cpp.

const float c_horizontalScaleAnimationCenterPoint = 0.5f

Definition at line 14 of file RatingControl.cpp.

const wchar_t c_itemSpacingKey[] = "RatingControlItemSpacing"

Definition at line 27 of file RatingControl.cpp.

const float c_mouseOverScale = 0.8f

Definition at line 20 of file RatingControl.cpp.

const float c_noPointerOverMagicNumber = -100

Definition at line 22 of file RatingControl.cpp.

const int c_noValueSetSentinel = -1

Definition at line 24 of file RatingControl.cpp.

const float c_touchOverScale = 1.0f

Definition at line 21 of file RatingControl.cpp.

const float c_verticalScaleAnimationCenterPoint = 0.8f

Definition at line 15 of file RatingControl.cpp.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControl.h File Reference

  • File List
  • File Members
  • RatingControl
Classes | Enumerations

RatingControl.h File Reference

#include <RatingItemInfo.h>
#include "RatingControl.g.h"
#include "RatingControl.properties.h"
#include "DispatcherHelper.h"

Go to the source code of this file.

Classes

class | RatingControl

Enumerations

enum RatingControlStates {
Disabled = 0, Set = 1, PointerOverSet = 2, PointerOverPlaceholder = 3,
Placeholder = 4, Unset = 5, Null = 6
}
enum | RatingInfoType { None, Font, Image }

Enumeration Type Documentation

enum RatingControlStates
Enumerator:
Disabled
Set
PointerOverSet
PointerOverPlaceholder
Placeholder
Unset
Null

Definition at line 12 of file RatingControl.h.

{
    Disabled = 0,
    Set = 1,
    PointerOverSet = 2,
    PointerOverPlaceholder = 3, // Also functions as the pointer over unset state at the moment
    Placeholder = 4,
    Unset = 5,
    Null = 6
};

enum RatingInfoType
Enumerator:
None
Font
Image

Definition at line 23 of file RatingControl.h.

{
    None,
    Font,
    Image
};

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControl.idl File Reference

  • File List
  • File Members
  • RatingControl
Namespaces | Variables

RatingControl.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | RatingControl
unsealed runtimeclass | RatingItemFontInfo
unsealed runtimeclass | RatingItemImageInfo
unsealed runtimeclass | RatingItemInfo
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControlAutomationPeer.cpp File Reference

  • File List
  • File Members
  • RatingControl

RatingControlAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "RatingControlAutomationPeer.h"
#include "Utils.h"
#include "RatingControlAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControlAutomationPeer.h File Reference

  • File List
  • File Members
  • RatingControl
Classes

RatingControlAutomationPeer.h File Reference

#include "RatingControl.h"
#include "RatingControlAutomationPeer.g.h"

Go to the source code of this file.

Classes

class | RatingControlAutomationPeer
struct | ValueProviderThunk< Owner >
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControlAutomationPeer.idl File Reference

  • File List
  • File Members
  • RatingControl
Namespaces | Variables

RatingControlAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | RatingControlAutomationPeer
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemFontInfo.cpp File Reference

  • File List
  • File Members
  • RatingControl

RatingItemFontInfo.cpp File Reference

#include "pch.h"
#include "common.h"
#include <RatingItemFontInfo.h>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemFontInfo.h File Reference

  • File List
  • File Members
  • RatingControl
Classes

RatingItemFontInfo.h File Reference

#include "RatingItemInfo.h"
#include "RatingItemFontInfo.g.h"
#include "RatingItemFontInfo.properties.h"

Go to the source code of this file.

Classes

class RatingItemFontInfo
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemImageInfo.cpp File Reference

  • File List
  • File Members
  • RatingControl

RatingItemImageInfo.cpp File Reference

#include "pch.h"
#include "common.h"
#include <RatingItemImageInfo.h>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemImageInfo.h File Reference

  • File List
  • File Members
  • RatingControl
Classes

RatingItemImageInfo.h File Reference

#include "RatingItemInfo.h"
#include "RatingItemImageInfo.g.h"
#include "RatingItemImageInfo.properties.h"

Go to the source code of this file.

Classes

class RatingItemImageInfo
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemInfo.cpp File Reference

  • File List
  • File Members
  • RatingControl

RatingItemInfo.cpp File Reference

#include "pch.h"
#include "common.h"
#include <RatingItemInfo.h>
#include "RatingItemInfo.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemInfo.h File Reference

  • File List
  • File Members
  • RatingControl
Classes

RatingItemInfo.h File Reference

#include "RatingItemInfo.g.h"

Go to the source code of this file.

Classes

class RatingItemInfo
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/APITests/RatingControlTests.cs File Reference

  • File List
  • File Members
  • RatingControl
  • APITests
Classes | Namespaces

RatingControlTests.cs File Reference

Go to the source code of this file.

Classes

class | RatingControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/InteractionTests/RatingControlTests.cs File Reference

  • File List
  • File Members
  • RatingControl
  • InteractionTests
Classes | Namespaces

RatingControlTests.cs File Reference

Go to the source code of this file.

Classes

class | RatingControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/TestUI/RatingControlPage.xaml.cs File Reference

  • File List
  • File Members
  • RatingControl
  • TestUI
Classes | Namespaces

RatingControlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | RatingControlPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/BuildTreeScheduler.cpp File Reference

  • File List
  • File Members
  • Repeater

BuildTreeScheduler.cpp File Reference

#include "pch.h"
#include "common.h"
#include "QPCTimer.h"
#include "BuildTreeScheduler.h"
#include "RepeaterTestHooks.h"
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/BuildTreeScheduler.h File Reference

  • File List
  • File Members
  • Repeater
Classes

BuildTreeScheduler.h File Reference

Go to the source code of this file.

Classes

struct | final
struct | WorkInfo
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ChildrenInTabFocusOrderIterable.cpp File Reference

  • File List
  • File Members
  • Repeater

ChildrenInTabFocusOrderIterable.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ChildrenInTabFocusOrderIterable.h"
#include "ItemsRepeater.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ChildrenInTabFocusOrderIterable.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ChildrenInTabFocusOrderIterable.h File Reference

Go to the source code of this file.

Classes

class | ChildrenInTabFocusOrderIterable
class | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/CustomProperty.cpp File Reference

  • File List
  • File Members
  • Repeater

CustomProperty.cpp File Reference

#include "pch.h"
#include "CustomProperty.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/CustomProperty.h File Reference

  • File List
  • File Members
  • Repeater
Classes

CustomProperty.h File Reference

#include "common.h"

Go to the source code of this file.

Classes

class CustomProperty
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactory.cpp File Reference

  • File List
  • File Members
  • Repeater

ElementFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ElementFactory.h"
#include "ElementFactory.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactory.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ElementFactory.h File Reference

#include "ElementFactory.g.h"

Go to the source code of this file.

Classes

class ElementFactory
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactoryGetArgsDownlevel.cpp File Reference

  • File List
  • File Members
  • Repeater

ElementFactoryGetArgsDownlevel.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ElementFactoryGetArgsDownLevel.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactoryGetArgsDownlevel.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ElementFactoryGetArgsDownlevel.h File Reference

Go to the source code of this file.

Classes

class ElementFactoryGetArgsDownlevel
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactoryRecycleArgsDownlevel.cpp File Reference

  • File List
  • File Members
  • Repeater

ElementFactoryRecycleArgsDownlevel.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ElementFactoryRecycleArgsDownLevel.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactoryRecycleArgsDownlevel.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ElementFactoryRecycleArgsDownlevel.h File Reference

Go to the source code of this file.

Classes

class ElementFactoryRecycleArgsDownlevel
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementManager.cpp File Reference

  • File List
  • File Members
  • Repeater

ElementManager.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ElementManager.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementManager.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ElementManager.h File Reference

#include "OrientationBasedMeasures.h"

Go to the source code of this file.

Classes

struct final
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayout.cpp File Reference

  • File List
  • File Members
  • Repeater

FlowLayout.cpp File Reference

#include <pch.h>
#include <common.h>
#include <DoubleUtil.h>
#include "ItemsRepeater.common.h"
#include "FlowLayoutAlgorithm.h"
#include "FlowLayoutState.h"
#include "FlowLayout.h"
#include "VirtualizingLayoutContext.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayout.h File Reference

  • File List
  • File Members
  • Repeater
Classes

FlowLayout.h File Reference

#include "VirtualizingLayout.h"
#include "FlowLayout.g.h"
#include "FlowLayout.properties.h"
#include "IFlowLayoutAlgorithmDelegates.h"
#include "OrientationBasedMeasures.h"
#include "FlowLayoutState.h"

Go to the source code of this file.

Classes

class FlowLayout
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayoutAlgorithm.cpp File Reference

  • File List
  • File Members
  • Repeater

FlowLayoutAlgorithm.cpp File Reference

#include <pch.h>
#include <common.h>
#include <ItemsRepeater.common.h>
#include "FlowLayoutAlgorithm.h"
#include "VirtualizingLayoutContext.h"
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayoutAlgorithm.h File Reference

  • File List
  • File Members
  • Repeater
Classes

FlowLayoutAlgorithm.h File Reference

#include "ElementManager.h"
#include "IFlowLayoutAlgorithmDelegates.h"
#include "OrientationBasedMeasures.h"

Go to the source code of this file.

Classes

class FlowLayoutAlgorithm
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayoutState.cpp File Reference

  • File List
  • File Members
  • Repeater

FlowLayoutState.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "FlowLayoutAlgorithm.h"
#include "FlowLayoutState.h"
#include "FlowLayoutState.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayoutState.h File Reference

  • File List
  • File Members
  • Repeater
Classes

FlowLayoutState.h File Reference

#include "FlowLayoutState.g.h"
#include "FlowLayoutAlgorithm.h"

Go to the source code of this file.

Classes

class FlowLayoutState
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IFlowLayoutAlgorithmDelegates.h File Reference

  • File List
  • File Members
  • Repeater
Classes

IFlowLayoutAlgorithmDelegates.h File Reference

Go to the source code of this file.

Classes

class IFlowLayoutAlgorithmDelegates
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IndexPath.cpp File Reference

  • File List
  • File Members
  • Repeater

IndexPath.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "IndexPath.h"
#include "IndexPath.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IndexPath.h File Reference

  • File List
  • File Members
  • Repeater
Classes

IndexPath.h File Reference

#include "IndexPath.g.h"

Go to the source code of this file.

Classes

class IndexPath
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IndexRange.cpp File Reference

  • File List
  • File Members
  • Repeater

IndexRange.cpp File Reference

#include "pch.h"
#include "IndexRange.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IndexRange.h File Reference

  • File List
  • File Members
  • Repeater
Classes

IndexRange.h File Reference

Go to the source code of this file.

Classes

struct IndexRange
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/InspectingDataSource.cpp File Reference

  • File List
  • File Members
  • Repeater

InspectingDataSource.cpp File Reference

#include <pch.h>
#include <common.h>
#include <BindableVector.h>
#include "ItemsRepeater.common.h"
#include "InspectingDataSource.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/InspectingDataSource.h File Reference

  • File List
  • File Members
  • Repeater
Classes

InspectingDataSource.h File Reference

#include "ItemsSourceView.h"

Go to the source code of this file.

Classes

class InspectingDataSource
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransition.cpp File Reference

  • File List
  • File Members
  • Repeater
Functions

ItemCollectionTransition.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransition.h"
#include "ItemCollectionTransitionProgress.h"

Go to the source code of this file.

Functions

m_newBounds (newBounds)
m_oldBounds (oldBounds)
m_triggers (triggers)

Function Documentation

m_newBounds ( newBounds )

Definition at line 51 of file ItemCollectionTransition.cpp.

{
    m_owningProvider = owningProvider;
    m_element.set(element);
}

m_oldBounds ( oldBounds )
m_triggers ( triggers )
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransition.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemCollectionTransition.h File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransition.g.h"

Go to the source code of this file.

Classes

class ItemCollectionTransition
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionCompletedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemCollectionTransitionCompletedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransitionCompletedEventArgs.h"
#include "ItemCollectionTransition.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionCompletedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemCollectionTransitionCompletedEventArgs.h File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransitionCompletedEventArgs.g.h"

Go to the source code of this file.

Classes

class ItemCollectionTransitionCompletedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionProgress.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemCollectionTransitionProgress.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransitionProgress.h"
#include "ItemCollectionTransition.h"
#include "ItemCollectionTransitionProvider.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionProgress.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemCollectionTransitionProgress.h File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransitionProgress.g.h"

Go to the source code of this file.

Classes

class ItemCollectionTransitionProgress
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionProvider.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemCollectionTransitionProvider.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ItemCollectionTransitionProvider.h"
#include "ItemCollectionTransitionCompletedEventArgs.h"
#include "ItemCollectionTransitionProvider.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionProvider.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemCollectionTransitionProvider.h File Reference

#include "ItemCollectionTransitionProvider.g.h"
#include "ItemCollectionTransitionProvider.properties.h"

Go to the source code of this file.

Classes

class ItemCollectionTransitionProvider
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.common.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemsRepeater.common.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "LifetimeHandler.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.common.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsRepeater.common.h File Reference

#include "ItemsRepeaterTrace.h"

Go to the source code of this file.

Classes

class CachedVisualTreeHelpers
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemsRepeater.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ItemsRepeater.h"
#include "RepeaterLayoutContext.h"
#include "ChildrenInTabFocusOrderIterable.h"
#include "SharedHelpers.h"
#include "RepeaterAutomationPeer.h"
#include "ViewportManagerWithPlatformFeatures.h"
#include "RuntimeProfiler.h"
#include "ItemTemplateWrapper.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsRepeater.h File Reference

#include "TransitionManager.h"
#include "ViewManager.h"
#include "VirtualizationInfo.h"
#include "ItemsRepeaterElementPreparedEventArgs.h"
#include "ItemsRepeaterElementClearingEventArgs.h"
#include "ItemsRepeaterElementIndexChangedEventArgs.h"
#include "ItemsRepeater.g.h"
#include "ItemsRepeater.properties.h"
#include "ViewportManager.h"

Go to the source code of this file.

Classes

class ItemsRepeater
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.idl File Reference

  • File List
  • File Members
  • Repeater
Classes | Namespaces | Enumerations | Functions | Variables

ItemsRepeater.idl File Reference

Go to the source code of this file.

Classes

interface | IKeyIndexMapping

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | ElementRealizationOptions { None = 0, ForceCreate = 1, SuppressAutoRecycle = 2 }
enum FlowLayoutLineAlignment {
Start = 0, Center = 1, End = 2, SpaceAround = 3,
SpaceBetween = 4, SpaceEvenly = 5
}
enum | IndexBasedLayoutOrientation { None = 0, TopToBottom = 1, LeftToRight = 0 }
enum | ItemCollectionTransitionOperation { Add = 0, Remove = 1, Move = 2 }
enum | ItemCollectionTransitionTriggers { CollectionChangeAdd = 1, CollectionChangeRemove = 2, CollectionChangeReset = 4, LayoutTransition = 8 }
enum LinedFlowLayoutItemsJustification {
Start = 0, Center = 1, End = 2, SpaceAround = 3,
SpaceBetween = 4, SpaceEvenly = 5
}
enum | LinedFlowLayoutItemsStretch { None = 0, Fill = 1 }
enum UniformGridLayoutItemsJustification {
Start = 0, Center = 1, End = 2, SpaceAround = 3,
SpaceBetween = 4, SpaceEvenly = 5
}
enum | UniformGridLayoutItemsStretch { None = 0, Fill = 1, Uniform = 2 }

Functions

Object | GetAt (Int32 index)
Int32 | GetElementIndex (Microsoft.UI.Xaml.UIElement element)
Microsoft UI Xaml UIElement | GetOrCreateElement (Int32 index)
Int32 | IndexFromKey (String key)
Int32 | IndexOf (IInspectable item)
String | KeyFromIndex (Int32 index)
Microsoft UI Xaml UIElement | TryGetElement (Int32 index)

Variables

event Windows Foundation
TypedEventHandler
< ItemsRepeater,
ItemsRepeaterElementClearingEventArgs > 		ElementClearing
runtimeclass | ElementFactory
event Windows Foundation
TypedEventHandler
< ItemsRepeater,
ItemsRepeaterElementIndexChangedEventArgs > 		ElementIndexChanged
event Windows Foundation
TypedEventHandler
< ItemsRepeater,
ItemsRepeaterElementPreparedEventArgs > 		ElementPrepared
runtimeclass | FlowLayout
runtimeclass | FlowLayoutState
runtimeclass | IndexPath
runtimeclass | ItemCollectionTransition
runtimeclass | ItemCollectionTransitionProgress
runtimeclass | ItemCollectionTransitionProvider
runtimeclass | ItemsRepeater
runtimeclass | ItemsRepeaterElementClearingEventArgs
runtimeclass | ItemsRepeaterElementIndexChangedEventArgs
runtimeclass | ItemsRepeaterElementPreparedEventArgs
runtimeclass | ItemsRepeaterScrollHost
runtimeclass | ItemsSourceView
runtimeclass | Layout
runtimeclass | LayoutContext
runtimeclass | LinedFlowLayout
runtimeclass | LinedFlowLayoutItemCollectionTransitionProvider
runtimeclass | LinedFlowLayoutItemsInfoRequestedEventArgs
runtimeclass | RecyclePool
runtimeclass | RecyclingElementFactory
runtimeclass | SelectionModel
runtimeclass | SelectionModelChildrenRequestedEventArgs
runtimeclass | SelectionModelSelectionChangedEventArgs
runtimeclass | SelectTemplateEventArgs
runtimeclass | StackLayout
runtimeclass | StackLayoutState
runtimeclass | UniformGridLayout
runtimeclass | UniformGridLayoutState
runtimeclass | VirtualizingLayout
runtimeclass | VirtualizingLayoutContext
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementClearingEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemsRepeaterElementClearingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeater.common.h"
#include "ItemsRepeaterElementClearingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementClearingEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsRepeaterElementClearingEventArgs.h File Reference

#include "ItemsRepeaterElementClearingEventArgs.g.h"

Go to the source code of this file.

Classes

class ItemsRepeaterElementClearingEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementIndexChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemsRepeaterElementIndexChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeater.common.h"
#include "ItemsRepeaterElementIndexChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementIndexChangedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsRepeaterElementIndexChangedEventArgs.h File Reference

#include "ItemsRepeaterElementIndexChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class ItemsRepeaterElementIndexChangedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementPreparedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemsRepeaterElementPreparedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeater.common.h"
#include "ItemsRepeaterElementPreparedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementPreparedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsRepeaterElementPreparedEventArgs.h File Reference

#include "ItemsRepeaterElementPreparedEventArgs.g.h"

Go to the source code of this file.

Classes

class ItemsRepeaterElementPreparedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterScrollHost.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemsRepeaterScrollHost.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ItemsRepeaterScrollHost.h"
#include "DoubleUtil.h"
#include "RuntimeProfiler.h"
#include "ItemsRepeaterScrollHost.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterScrollHost.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsRepeaterScrollHost.h File Reference

#include "ItemsRepeaterScrollHost.g.h"

Go to the source code of this file.

Classes

class | ItemsRepeaterScrollHost
struct | ItemsRepeaterScrollHost::BringIntoViewState
struct | ItemsRepeaterScrollHost::CandidateInfo
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterTrace.h File Reference

  • File List
  • File Members
  • Repeater
Classes | Defines | Functions

ItemsRepeaterTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | ItemsRepeaterTrace

Defines

#define | ITEMSREPEATER_TRACE_INFO(sender, message,...)
#define | ITEMSREPEATER_TRACE_INFO_DBG(sender, message,...)
#define | ITEMSREPEATER_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) ItemsRepeaterTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | ITEMSREPEATER_TRACE_PERF(info)
#define | ITEMSREPEATER_TRACE_PERF_DBG(info)
#define | ITEMSREPEATER_TRACE_VERBOSE(sender, message,...)
#define | ITEMSREPEATER_TRACE_VERBOSE_DBG(sender, message,...)
#define | ITEMSREPEATER_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) ItemsRepeaterTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsItemsRepeaterPerfTracingEnabled ()
bool | IsItemsRepeaterTracingEnabled ()
bool | IsItemsRepeaterVerboseTracingEnabled ()

Define Documentation

#define ITEMSREPEATER_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsItemsRepeaterTracingEnabled()) \
{ \
    ITEMSREPEATER_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ItemsRepeaterTrace::s_IsDebugOutputEnabled || ItemsRepeaterTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ITEMSREPEATER_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file ItemsRepeaterTrace.h.

#define ITEMSREPEATER_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file ItemsRepeaterTrace.h.

#define ITEMSREPEATER_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ItemsRepeaterTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file ItemsRepeaterTrace.h.

#define ITEMSREPEATER_TRACE_PERF ( info )
Value:
if (IsItemsRepeaterPerfTracingEnabled()) \
{ \
    ItemsRepeaterTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file ItemsRepeaterTrace.h.

#define ITEMSREPEATER_TRACE_PERF_DBG ( info )

Definition at line 71 of file ItemsRepeaterTrace.h.

#define ITEMSREPEATER_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsItemsRepeaterVerboseTracingEnabled()) \
{ \
    ITEMSREPEATER_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ItemsRepeaterTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    ITEMSREPEATER_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file ItemsRepeaterTrace.h.

#define ITEMSREPEATER_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file ItemsRepeaterTrace.h.

#define ITEMSREPEATER_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ItemsRepeaterTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file ItemsRepeaterTrace.h.

Function Documentation

bool IsItemsRepeaterPerfTracingEnabled ( ) [inline]

Definition at line 25 of file ItemsRepeaterTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_ITEMSREPEATER || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsItemsRepeaterTracingEnabled ( ) [inline]

Definition at line 11 of file ItemsRepeaterTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMSREPEATER || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsItemsRepeaterVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file ItemsRepeaterTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMSREPEATER || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsSourceView.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemsSourceView.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ItemsSourceView.h"
#include "InspectingDataSource.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsSourceView.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsSourceView.h File Reference

#include "ItemsSourceView.g.h"

Go to the source code of this file.

Classes

class ItemsSourceView
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsSourceViewFactory.cpp File Reference

  • File List
  • File Members
  • Repeater
Namespaces | Functions

ItemsSourceViewFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsSourceViewFactory.h"

Go to the source code of this file.

Namespaces

namespace | winrt::Microsoft::UI::Xaml::Controls

Functions

void * | winrt_make_Microsoft_UI_Xaml_Controls_ItemsSourceView ()

Function Documentation

void* winrt_make_Microsoft_UI_Xaml_Controls_ItemsSourceView ( )

Definition at line 13 of file ItemsSourceViewFactory.cpp.

{
    return winrt::detach_abi(winrt::make<winrt::Microsoft::UI::Xaml::Controls::factory_implementation::ItemsSourceView>());
}

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsSourceViewFactory.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemsSourceViewFactory.h File Reference

#include "ItemsSourceView.h"
#include "InspectingDataSource.h"

Go to the source code of this file.

Classes

class ItemsSourceViewFactory
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemTemplateWrapper.cpp File Reference

  • File List
  • File Members
  • Repeater

ItemTemplateWrapper.cpp File Reference

#include "pch.h"
#include "ItemTemplateWrapper.h"
#include "RecyclePool.h"
#include "ItemsRepeater.common.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemTemplateWrapper.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ItemTemplateWrapper.h File Reference

#include "common.h"

Go to the source code of this file.

Classes

class ItemTemplateWrapper
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/Layout.cpp File Reference

  • File List
  • File Members
  • Repeater
Namespaces | Functions

Layout.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "Layout.h"
#include "VirtualizingLayoutContext.h"
#include "LayoutContextAdapter.h"

Go to the source code of this file.

Namespaces

namespace | anonymous_namespace{Layout.cpp}

Functions

winrt::NonVirtualizingLayoutContext | GetNonVirtualizingLayoutContext (winrt::LayoutContext const &context)
winrt::VirtualizingLayoutContext | GetVirtualizingLayoutContext (winrt::LayoutContext const &context)
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/Layout.h File Reference

  • File List
  • File Members
  • Repeater
Classes

Layout.h File Reference

#include "Layout.g.h"
#include "NonVirtualizingLayout.g.h"

Go to the source code of this file.

Classes

class Layout
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutContext.cpp File Reference

  • File List
  • File Members
  • Repeater

LayoutContext.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "LayoutContext.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutContext.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LayoutContext.h File Reference

#include "LayoutContext.g.h"

Go to the source code of this file.

Classes

class LayoutContext
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutContextAdapter.cpp File Reference

  • File List
  • File Members
  • Repeater

LayoutContextAdapter.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "VirtualizingLayoutContext.h"
#include "LayoutContextAdapter.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutContextAdapter.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LayoutContextAdapter.h File Reference

#include "LayoutContext.h"
#include "VirtualizingLayoutContext.h"
#include "NonvirtualizingLayoutContext.h"

Go to the source code of this file.

Classes

class LayoutContextAdapter
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooks.cpp File Reference

  • File List
  • File Members
  • Repeater

LayoutsTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LayoutsTestHooksFactory.h"
#include "LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h"
#include "LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h"
#include "LinedFlowLayout.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooks.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LayoutsTestHooks.h File Reference

#include "WinEventLogLevels.h"
#include "LayoutsTestHooks.g.h"

Go to the source code of this file.

Classes

class LayoutsTestHooks
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooks.idl File Reference

  • File List
  • File Members
  • Repeater
Namespaces | Enumerations

LayoutsTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Enumerations

enum | LinedFlowLayoutInvalidationTrigger { InvalidateLayoutCall = 0, SnappedAverageItemsPerLineChange = 1, ItemDesiredWidthChange = 2 }
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • Repeater

LayoutsTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LayoutsTestHooksFactory.h"
#include "LayoutsTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksFactory.h File Reference

  • File List
  • File Members
  • Repeater

LayoutsTestHooksFactory.h File Reference

#include "LayoutsTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h File Reference

#include "LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.g.h"

Go to the source code of this file.

Classes

class LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h File Reference

#include "LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.g.h"

Go to the source code of this file.

Classes

class LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayout.cpp File Reference

  • File List
  • File Members
  • Repeater

LinedFlowLayout.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "LinedFlowLayout.h"
#include "LinedFlowLayoutItemsInfoRequestedEventArgs.h"
#include "LinedFlowLayoutItemCollectionTransitionProvider.h"
#include "RuntimeProfiler.h"
#include "VirtualizingLayoutContext.h"
#include "LayoutsTestHooks.h"
#include "SharedHelpers.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayout.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LinedFlowLayout.h File Reference

#include "ElementManager.h"
#include "VirtualizingLayout.h"
#include "LinedFlowLayoutTrace.h"
#include "LinedFlowLayout.g.h"
#include "LinedFlowLayout.properties.h"
#include "LinedFlowLayoutItemAspectRatios.h"

Go to the source code of this file.

Classes

class | LinedFlowLayout
struct | LinedFlowLayout::ItemsInfo
struct | LinedFlowLayout::ItemsLayout
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemAspectRatios.cpp File Reference

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemAspectRatios.cpp File Reference

#include <pch.h>
#include <common.h>
#include "LinedFlowLayoutItemAspectRatios.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemAspectRatios.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LinedFlowLayoutItemAspectRatios.h File Reference

#include "LinedFlowLayoutTrace.h"

Go to the source code of this file.

Classes

class | LinedFlowLayoutItemAspectRatios
struct | LinedFlowLayoutItemAspectRatios::ItemAspectRatio
class | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemCollectionTransitionProvider.cpp File Reference

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemCollectionTransitionProvider.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LinedFlowLayoutItemCollectionTransitionProvider.h"
#include "LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemCollectionTransitionProvider.h File Reference

  • File List
  • File Members
  • Repeater
Classes | Functions | Variables

LinedFlowLayoutItemCollectionTransitionProvider.h File Reference

#include "pch.h"
#include "common.h"
#include "ItemCollectionTransitionProvider.h"
#include "LinedFlowLayoutItemCollectionTransitionProvider.g.h"

Go to the source code of this file.

Classes

class | LinedFlowLayoutItemCollectionTransitionProvider

Functions

static_assert (DebugSlowDownFactor >=1,"DebugSlowDownFactor must be at least 1.")

Variables

const uint32_t | DebugSlowDownFactor = 1

Function Documentation

static_assert | ( | DebugSlowDownFactor >= | 1,
 |  | "DebugSlowDownFactor must be at least 1." |
 | ) |  |

Variable Documentation

const uint32_t DebugSlowDownFactor = 1

Definition at line 12 of file LinedFlowLayoutItemCollectionTransitionProvider.h.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemsInfoRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "LinedFlowLayout.h"
#include "LinedFlowLayoutItemsInfoRequestedEventArgs.h"
#include "LinedFlowLayoutTrace.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

LinedFlowLayoutItemsInfoRequestedEventArgs.h File Reference

#include "LinedFlowLayoutItemsInfoRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class LinedFlowLayoutItemsInfoRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutTrace.h File Reference

  • File List
  • File Members
  • Repeater
Classes | Defines | Functions

LinedFlowLayoutTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | LinedFlowLayoutTrace

Defines

#define | LINEDFLOWLAYOUT_TRACE_INFO(sender, message,...)
#define | LINEDFLOWLAYOUT_TRACE_INFO_DBG(sender, message,...)
#define | LINEDFLOWLAYOUT_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) LinedFlowLayoutTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | LINEDFLOWLAYOUT_TRACE_PERF(info)
#define | LINEDFLOWLAYOUT_TRACE_PERF_DBG(info)
#define | LINEDFLOWLAYOUT_TRACE_VERBOSE(sender, message,...)
#define | LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(sender, message,...)
#define | LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) LinedFlowLayoutTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsLinedFlowLayoutPerfTracingEnabled ()
bool | IsLinedFlowLayoutTracingEnabled ()
bool | IsLinedFlowLayoutVerboseTracingEnabled ()

Define Documentation

#define LINEDFLOWLAYOUT_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsLinedFlowLayoutTracingEnabled()) \
{ \
    LINEDFLOWLAYOUT_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (LinedFlowLayoutTrace::s_IsDebugOutputEnabled || LinedFlowLayoutTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    LINEDFLOWLAYOUT_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file LinedFlowLayoutTrace.h.

#define LINEDFLOWLAYOUT_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file LinedFlowLayoutTrace.h.

#define LINEDFLOWLAYOUT_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | LinedFlowLayoutTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file LinedFlowLayoutTrace.h.

#define LINEDFLOWLAYOUT_TRACE_PERF ( info )
Value:
if (IsLinedFlowLayoutPerfTracingEnabled()) \
{ \
    LINEDFLOWLAYOUTTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file LinedFlowLayoutTrace.h.

#define LINEDFLOWLAYOUT_TRACE_PERF_DBG ( info )

Definition at line 71 of file LinedFlowLayoutTrace.h.

#define LINEDFLOWLAYOUT_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsLinedFlowLayoutVerboseTracingEnabled()) \
{ \
    LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (LinedFlowLayoutTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file LinedFlowLayoutTrace.h.

#define LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file LinedFlowLayoutTrace.h.

#define LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | LinedFlowLayoutTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file LinedFlowLayoutTrace.h.

Function Documentation

bool IsLinedFlowLayoutPerfTracingEnabled ( ) [inline]

Definition at line 25 of file LinedFlowLayoutTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_LINEDFLOWLAYOUT || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsLinedFlowLayoutTracingEnabled ( ) [inline]

Definition at line 11 of file LinedFlowLayoutTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_LINEDFLOWLAYOUT || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsLinedFlowLayoutVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file LinedFlowLayoutTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_LINEDFLOWLAYOUT || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/NonVirtualizingLayout.cpp File Reference

  • File List
  • File Members
  • Repeater

NonVirtualizingLayout.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "Layout.h"
#include "NonVirtualizingLayout.h"
#include "RuntimeProfiler.h"
#include "NonVirtualizingLayout.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/NonVirtualizingLayout.h File Reference

  • File List
  • File Members
  • Repeater
Classes

NonVirtualizingLayout.h File Reference

#include "Layout.h"
#include "NonVirtualizingLayout.g.h"

Go to the source code of this file.

Classes

class NonVirtualizingLayout
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/NonvirtualizingLayoutContext.cpp File Reference

  • File List
  • File Members
  • Repeater

NonvirtualizingLayoutContext.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "NonVirtualizingLayoutContext.h"
#include "LayoutContextAdapter.h"
#include "NonVirtualizingLayoutContext.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/NonvirtualizingLayoutContext.h File Reference

  • File List
  • File Members
  • Repeater
Classes

NonvirtualizingLayoutContext.h File Reference

#include "LayoutContext.h"
#include "NonVirtualizingLayoutContext.g.h"

Go to the source code of this file.

Classes

class NonVirtualizingLayoutContext
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/OrientationBasedMeasures.cpp File Reference

  • File List
  • File Members
  • Repeater

OrientationBasedMeasures.cpp File Reference

#include <pch.h>
#include "OrientationBasedMeasures.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/OrientationBasedMeasures.h File Reference

  • File List
  • File Members
  • Repeater
Classes | Enumerations

OrientationBasedMeasures.h File Reference

Go to the source code of this file.

Classes

class | OrientationBasedMeasures

Enumerations

enum | ScrollOrientation { Vertical, Horizontal }

Enumeration Type Documentation

enum ScrollOrientation
Enumerator:
Vertical
Horizontal

Definition at line 6 of file OrientationBasedMeasures.h.

{
    Vertical,
    Horizontal
};

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/Phaser.cpp File Reference

  • File List
  • File Members
  • Repeater

Phaser.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeater.common.h"
#include "QPCTimer.h"
#include "BuildTreeScheduler.h"
#include "VirtualizationInfo.h"
#include "ItemsRepeater.h"
#include "Phaser.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/Phaser.h File Reference

  • File List
  • File Members
  • Repeater
Classes

Phaser.h File Reference

Go to the source code of this file.

Classes

struct | ElementInfo
struct | final
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/QPCTimer.cpp File Reference

  • File List
  • File Members
  • Repeater

QPCTimer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "QPCTimer.h"
#include <windows.h>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/QPCTimer.h File Reference

  • File List
  • File Members
  • Repeater
Classes

QPCTimer.h File Reference

Go to the source code of this file.

Classes

struct final
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclePool.cpp File Reference

  • File List
  • File Members
  • Repeater

RecyclePool.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "RecyclePool.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclePool.h File Reference

  • File List
  • File Members
  • Repeater
Classes

RecyclePool.h File Reference

#include "RecyclePool.g.h"

Go to the source code of this file.

Classes

class | RecyclePool
struct | RecyclePool::ElementInfo
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclePoolFactory.cpp File Reference

  • File List
  • File Members
  • Repeater

RecyclePoolFactory.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "RecyclePoolFactory.h"
#include "RecyclePool.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclePoolFactory.h File Reference

  • File List
  • File Members
  • Repeater
Namespaces

RecyclePoolFactory.h File Reference

#include "RecyclePool.h"
#include "RecyclePool.g.cpp"

Go to the source code of this file.

Namespaces

namespace winrt::Microsoft::UI::Xaml::Controls
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclingElementFactory.cpp File Reference

  • File List
  • File Members
  • Repeater

RecyclingElementFactory.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include <HashMap.h>
#include "SelectTemplateEventArgs.h"
#include "RecyclingElementFactory.h"
#include "ItemsRepeater.h"
#include "RecyclePool.h"
#include "RecyclingElementFactory.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclingElementFactory.h File Reference

  • File List
  • File Members
  • Repeater
Classes

RecyclingElementFactory.h File Reference

#include "ElementFactory.h"
#include "RecyclingElementFactory.g.h"
#include "RecyclingElementFactory.properties.h"

Go to the source code of this file.

Classes

class RecyclingElementFactory
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterAutomationPeer.cpp File Reference

  • File List
  • File Members
  • Repeater

RepeaterAutomationPeer.cpp File Reference

#include <pch.h>
#include <common.h>
#include <UIAutomationCore.h>
#include <UIAutomationCoreApi.h>
#include <Vector.h>
#include "ItemsRepeater.common.h"
#include "RepeaterAutomationPeer.h"
#include "ItemsRepeater.h"
#include "RepeaterAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterAutomationPeer.h File Reference

  • File List
  • File Members
  • Repeater
Classes

RepeaterAutomationPeer.h File Reference

#include "RepeaterAutomationPeer.g.h"

Go to the source code of this file.

Classes

class RepeaterAutomationPeer
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterAutomationPeer.idl File Reference

  • File List
  • File Members
  • Repeater
Namespaces | Variables

RepeaterAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | RepeaterAutomationPeer
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterLayoutContext.cpp File Reference

  • File List
  • File Members
  • Repeater

RepeaterLayoutContext.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "RepeaterLayoutContext.h"
#include "ItemsRepeater.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterLayoutContext.h File Reference

  • File List
  • File Members
  • Repeater
Classes

RepeaterLayoutContext.h File Reference

#include "VirtualizingLayoutContext.h"

Go to the source code of this file.

Classes

class RepeaterLayoutContext
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterPrivate.idl File Reference

  • File List
  • File Members
  • Repeater
Classes | Namespaces | Functions

RepeaterPrivate.idl File Reference

Go to the source code of this file.

Classes

interface | IRepeaterScrollingSurface

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Functions

delegate void | ConfigurationChangedEventHandler (IRepeaterScrollingSurface sender)
delegate void | PostArrangeEventHandler (IRepeaterScrollingSurface sender)
delegate void | ViewportChangedEventHandler (IRepeaterScrollingSurface sender, Boolean isFinal)
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooks.cpp File Reference

  • File List
  • File Members
  • Repeater

RepeaterTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RepeaterTestHooksFactory.h"
#include "layout.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooks.h File Reference

  • File List
  • File Members
  • Repeater
Classes

RepeaterTestHooks.h File Reference

#include "ItemsRepeater.h"
#include "WinEventLogLevels.h"
#include "RepeaterTestHooks.g.h"

Go to the source code of this file.

Classes

class RepeaterTestHooks
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooks.idl File Reference

  • File List
  • File Members
  • Repeater
Namespaces

RepeaterTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • Repeater

RepeaterTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "RepeaterTestHooksFactory.h"
#include "RepeaterTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooksFactory.h File Reference

  • File List
  • File Members
  • Repeater

RepeaterTestHooksFactory.h File Reference

#include "RepeaterTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectedItems.h File Reference

  • File List
  • File Members
  • Repeater
Classes

SelectedItems.h File Reference

Go to the source code of this file.

Classes

class | SelectedItems< T >
class | SelectedItems< T >::Iterator
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModel.cpp File Reference

  • File List
  • File Members
  • Repeater

SelectionModel.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "SelectionNode.h"
#include "SelectionModel.h"
#include "SelectionTreeHelper.h"
#include "IndexPath.h"
#include "SelectionModelSelectionChangedEventArgs.h"
#include "SelectionModelChildrenRequestedEventArgs.h"
#include "Vector.h"
#include "SelectedItems.h"
#include "CustomProperty.h"
#include "SelectionModel.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModel.h File Reference

  • File List
  • File Members
  • Repeater
Classes

SelectionModel.h File Reference

#include "SelectionModel.g.h"
#include "SelectionModel.properties.h"

Go to the source code of this file.

Classes

struct | SelectedItemInfo
class | SelectionModel
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModelChildrenRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

SelectionModelChildrenRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeater.common.h"
#include "SelectionNode.h"
#include "SelectionModelChildrenRequestedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModelChildrenRequestedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

SelectionModelChildrenRequestedEventArgs.h File Reference

#include "SelectionModelChildrenRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class SelectionModelChildrenRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModelSelectionChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

SelectionModelSelectionChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ItemsRepeater.common.h"
#include "SelectionModelSelectionChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModelSelectionChangedEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

SelectionModelSelectionChangedEventArgs.h File Reference

#include "SelectionModelSelectionChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class SelectionModelSelectionChangedEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionNode.cpp File Reference

  • File List
  • File Members
  • Repeater

SelectionNode.cpp File Reference

#include "pch.h"
#include <common.h>
#include "ItemsRepeater.common.h"
#include "SelectionNode.h"
#include "SelectionModel.h"
#include "IndexPath.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionNode.h File Reference

  • File List
  • File Members
  • Repeater
Classes | Enumerations

SelectionNode.h File Reference

#include "IndexRange.h"

Go to the source code of this file.

Classes

struct | final

Enumerations

enum | SelectionState { Selected, NotSelected, PartiallySelected }

Enumeration Type Documentation

enum SelectionState
Enumerator:
Selected
NotSelected
PartiallySelected

Definition at line 9 of file SelectionNode.h.

{
    Selected,
    NotSelected,
    PartiallySelected
};

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionTreeHelper.cpp File Reference

  • File List
  • File Members
  • Repeater

SelectionTreeHelper.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "SelectionNode.h"
#include "SelectionTreeHelper.h"
#include "IndexPath.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionTreeHelper.h File Reference

  • File List
  • File Members
  • Repeater
Classes

SelectionTreeHelper.h File Reference

Go to the source code of this file.

Classes

class | SelectionTreeHelper
struct | SelectionTreeHelper::TreeWalkNodeInfo
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectTemplateEventArgs.cpp File Reference

  • File List
  • File Members
  • Repeater

SelectTemplateEventArgs.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "SelectTemplateEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectTemplateEventArgs.h File Reference

  • File List
  • File Members
  • Repeater
Classes

SelectTemplateEventArgs.h File Reference

#include "SelectTemplateEventArgs.g.h"

Go to the source code of this file.

Classes

class SelectTemplateEventArgs
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/StackLayout.cpp File Reference

  • File List
  • File Members
  • Repeater

StackLayout.cpp File Reference

#include <pch.h>
#include <common.h>
#include <DoubleUtil.h>
#include "ItemsRepeater.common.h"
#include "FlowLayoutAlgorithm.h"
#include "StackLayoutState.h"
#include "StackLayout.h"
#include "RuntimeProfiler.h"
#include "VirtualizingLayoutContext.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/StackLayout.h File Reference

  • File List
  • File Members
  • Repeater
Classes

StackLayout.h File Reference

#include "VirtualizingLayout.h"
#include "StackLayout.g.h"
#include "StackLayout.properties.h"
#include "IFlowLayoutAlgorithmDelegates.h"
#include "OrientationBasedMeasures.h"
#include "StackLayoutState.h"

Go to the source code of this file.

Classes

class StackLayout
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/StackLayoutState.cpp File Reference

  • File List
  • File Members
  • Repeater

StackLayoutState.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "FlowLayoutAlgorithm.h"
#include "StackLayoutState.h"
#include "StackLayoutState.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/StackLayoutState.h File Reference

  • File List
  • File Members
  • Repeater
Classes

StackLayoutState.h File Reference

#include "StackLayoutState.g.h"
#include "FlowLayoutAlgorithm.h"

Go to the source code of this file.

Classes

class StackLayoutState
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TransitionManager.cpp File Reference

  • File List
  • File Members
  • Repeater

TransitionManager.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "TransitionManager.h"
#include "ItemsRepeater.h"
#include "ItemCollectionTransition.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TransitionManager.h File Reference

  • File List
  • File Members
  • Repeater
Classes

TransitionManager.h File Reference

Go to the source code of this file.

Classes

struct final
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayout.cpp File Reference

  • File List
  • File Members
  • Repeater

UniformGridLayout.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "FlowLayoutAlgorithm.h"
#include "UniformGridLayoutState.h"
#include "UniformGridLayout.h"
#include "RuntimeProfiler.h"
#include "VirtualizingLayoutContext.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayout.h File Reference

  • File List
  • File Members
  • Repeater
Classes

UniformGridLayout.h File Reference

#include "VirtualizingLayout.h"
#include "UniformGridLayout.g.h"
#include "UniformGridLayout.properties.h"
#include "IFlowLayoutAlgorithmDelegates.h"
#include "OrientationBasedMeasures.h"
#include "UniformGridLayoutState.h"

Go to the source code of this file.

Classes

class UniformGridLayout
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayoutState.cpp File Reference

  • File List
  • File Members
  • Repeater

UniformGridLayoutState.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "IFlowLayoutAlgorithmDelegates.h"
#include "FlowLayoutAlgorithm.h"
#include "UniformGridLayoutState.h"
#include "UniformGridLayoutState.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayoutState.h File Reference

  • File List
  • File Members
  • Repeater
Classes

UniformGridLayoutState.h File Reference

#include "ElementManager.h"
#include "UniformGridLayoutState.g.h"
#include "FlowLayoutAlgorithm.h"

Go to the source code of this file.

Classes

class UniformGridLayoutState
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniqueIdElementPool.cpp File Reference

  • File List
  • File Members
  • Repeater

UniqueIdElementPool.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "UniqueIdElementPool.h"
#include "ItemsRepeater.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniqueIdElementPool.h File Reference

  • File List
  • File Members
  • Repeater
Classes

UniqueIdElementPool.h File Reference

Go to the source code of this file.

Classes

struct final
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewManager.cpp File Reference

  • File List
  • File Members
  • Repeater

ViewManager.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ViewManager.h"
#include "ItemsRepeater.h"
#include "RepeaterTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewManager.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ViewManager.h File Reference

#include "UniqueIdElementPool.h"
#include "VirtualizationInfo.h"
#include "Phaser.h"

Go to the source code of this file.

Classes

struct | final
struct | final::PinnedElementInfo
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManager.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ViewportManager.h File Reference

Go to the source code of this file.

Classes

class ViewportManager
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManagerDownlevel.cpp File Reference

  • File List
  • File Members
  • Repeater

ViewportManagerDownlevel.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ViewportManagerDownLevel.h"
#include "ItemsRepeater.h"
#include "layout.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManagerDownlevel.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ViewportManagerDownlevel.h File Reference

#include "ViewportManager.h"

Go to the source code of this file.

Classes

class | ViewportManagerDownLevel
struct | ViewportManagerDownLevel::ScrollerInfo
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManagerWithPlatformFeatures.cpp File Reference

  • File List
  • File Members
  • Repeater
Variables

ViewportManagerWithPlatformFeatures.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "ViewportManagerWithPlatformFeatures.h"
#include "ItemsRepeater.h"
#include "Layout.h"

Go to the source code of this file.

Variables

constexpr double CacheBufferPerSideInflationPixelDelta = 40.0

Variable Documentation

constexpr double CacheBufferPerSideInflationPixelDelta = 40.0

Definition at line 15 of file ViewportManagerWithPlatformFeatures.cpp.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManagerWithPlatformFeatures.h File Reference

  • File List
  • File Members
  • Repeater
Classes

ViewportManagerWithPlatformFeatures.h File Reference

#include "ViewportManager.h"
#include "ScrollingScrollStartingEventArgs.h"
#include "ScrollingZoomStartingEventArgs.h"

Go to the source code of this file.

Classes

class ViewportManagerWithPlatformFeatures
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizationInfo.cpp File Reference

  • File List
  • File Members
  • Repeater

VirtualizationInfo.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "VirtualizationInfo.h"
#include "ItemsRepeater.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizationInfo.h File Reference

  • File List
  • File Members
  • Repeater
Classes | Enumerations

VirtualizationInfo.h File Reference

#include <limits>

Go to the source code of this file.

Classes

class VirtualizationInfo

Enumerations

enum ElementOwner {
ElementFactory, Layout, PinnedPool, UniqueIdResetPool,
Animator
}

Enumeration Type Documentation

enum ElementOwner
Enumerator:
ElementFactory
Layout
PinnedPool
UniqueIdResetPool
Animator

Definition at line 7 of file VirtualizationInfo.h.

{
    // All elements are originally owned by the view generator.
    ElementFactory,
    // Ownership is transferred to the layout when it calls GetElement.
    Layout,
    // Ownership is transferred to the pinned pool if the element is cleared (outside of
    // a 'remove' collection change of course).
    PinnedPool,
    // Ownership is transfered to the reset pool if the element is cleared by a reset and
    // the data source supports unique ids.
    UniqueIdResetPool,
    // Ownership is transfered to the animator if the element is cleared due to a
    // 'remove'-like collection change.
    Animator
};

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizingLayout.cpp File Reference

  • File List
  • File Members
  • Repeater

VirtualizingLayout.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "VirtualizingLayout.h"
#include "RuntimeProfiler.h"
#include "VirtualizingLayout.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizingLayout.h File Reference

  • File List
  • File Members
  • Repeater
Classes

VirtualizingLayout.h File Reference

#include "Layout.h"
#include "VirtualizingLayout.g.h"

Go to the source code of this file.

Classes

class VirtualizingLayout
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizingLayoutContext.cpp File Reference

  • File List
  • File Members
  • Repeater

VirtualizingLayoutContext.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "VirtualizingLayoutContext.h"
#include "VirtualLayoutContextAdapter.h"
#include "VirtualizingLayoutContext.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizingLayoutContext.h File Reference

  • File List
  • File Members
  • Repeater
Classes

VirtualizingLayoutContext.h File Reference

#include "LayoutContext.h"
#include "VirtualizingLayoutContext.g.h"

Go to the source code of this file.

Classes

class VirtualizingLayoutContext
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualLayoutContextAdapter.cpp File Reference

  • File List
  • File Members
  • Repeater

VirtualLayoutContextAdapter.cpp File Reference

#include <pch.h>
#include <common.h>
#include "ItemsRepeater.common.h"
#include "VirtualizingLayoutContext.h"
#include "VirtualLayoutContextAdapter.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualLayoutContextAdapter.h File Reference

  • File List
  • File Members
  • Repeater
Classes

VirtualLayoutContextAdapter.h File Reference

#include "LayoutContext.h"
#include "VirtualizingLayoutContext.h"
#include "NonvirtualizingLayoutContext.h"

Go to the source code of this file.

Classes

class | VirtualLayoutContextAdapter
class | VirtualLayoutContextAdapter::ChildrenCollection< T >
class | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/AccessibilityTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

AccessibilityTests.cs File Reference

Go to the source code of this file.

Classes

class | AccessibilityTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/EffectiveViewportScrollPresenterTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

EffectiveViewportScrollPresenterTests.cs File Reference

Go to the source code of this file.

Classes

class | EffectiveViewportScrollPresenterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/EffectiveViewportScrollViewerTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

EffectiveViewportScrollViewerTests.cs File Reference

Go to the source code of this file.

Classes

class | EffectiveViewportTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/FlowLayoutCollectionChangeTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

FlowLayoutCollectionChangeTests.cs File Reference

Go to the source code of this file.

Classes

class | FlowLayoutCollectionChangeTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/FlowLayoutTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

FlowLayoutTests.cs File Reference

Go to the source code of this file.

Classes

class | FlowLayoutTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/IndexPathTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

IndexPathTests.cs File Reference

Go to the source code of this file.

Classes

class | IndexPathTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/InspectingDataSourceTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

InspectingDataSourceTests.cs File Reference

Go to the source code of this file.

Classes

class | InspectingDataSourceTests
class | InspectingDataSourceTests::CollectionChangeRecorder
class | InspectingDataSourceTests::CustomEnumerable
class | InspectingDataSourceTests::ObservableVectorWithUniqueIds
class | InspectingDataSourceTests::WinRTObservableVector
class | InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ItemCollectionTransitionProviderTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

ItemCollectionTransitionProviderTests.cs File Reference

Go to the source code of this file.

Classes

class | ItemCollectionTransitionProviderTests
struct | ItemCollectionTransitionProviderTests::CallInfo

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ItemTemplateTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

ItemTemplateTests.cs File Reference

Go to the source code of this file.

Classes

class | ItemTemplateTests
class | MyContainerSelector
class | MySelector

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/LayoutTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

LayoutTests.cs File Reference

Go to the source code of this file.

Classes

class | LayoutTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/LinedFlowLayoutTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

LinedFlowLayoutTests.cs File Reference

Go to the source code of this file.

Classes

class | LinedFlowLayoutTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/PhasingTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

PhasingTests.cs File Reference

Go to the source code of this file.

Classes

class | PhasingTests
class | PhasingTests::CustomElementFactory
class | PhasingTests::ElementPhasingManager

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/RecyclePoolTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

RecyclePoolTests.cs File Reference

Go to the source code of this file.

Classes

class | RecyclePoolTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/RepeaterFocusTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

RepeaterFocusTests.cs File Reference

Go to the source code of this file.

Classes

class | RepeaterFocusTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/RepeaterTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

RepeaterTests.cs File Reference

Go to the source code of this file.

Classes

class | RepeaterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/SelectionModelTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

SelectionModelTests.cs File Reference

Go to the source code of this file.

Classes

class | CustomSelectionModel
class | SelectionModelTests
struct | SelectionModelTests::TreeWalkNodeInfo

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ViewManagerTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

ViewManagerTests.cs File Reference

Go to the source code of this file.

Classes

class | ViewManagerTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ViewportTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
Classes | Namespaces

ViewportTests.cs File Reference

Go to the source code of this file.

Classes

class | ViewportTests
class | ViewportTests::TestGridLayout
class | ViewportTests::TestScrollingSurface
class | ViewportTests::TestStackLayout

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/AspectRatioRespectingControl.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

AspectRatioRespectingControl.cs File Reference

Go to the source code of this file.

Classes

class | AspectRatioRespectingControl

Namespaces

namespace | MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/CollectionChangeEventArgsConverters.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

CollectionChangeEventArgsConverters.cs File Reference

Go to the source code of this file.

Classes

class | CollectionChangeEventArgsConverters

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/CustomItemsSource.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

CustomItemsSource.cs File Reference

Go to the source code of this file.

Classes

class | CustomItemsSource
class | CustomItemsSourceWithUniqueId

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/CustomItemsSourceView.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

CustomItemsSourceView.cs File Reference

Go to the source code of this file.

Classes

class | CustomItemsSourceView
class | CustomItemsSourceViewWithUniqueIdMapping

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/DataAsElementElementFactory.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

DataAsElementElementFactory.cs File Reference

Go to the source code of this file.

Classes

class | DataAsElementElementFactory

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/ElementFromElementElementFactory.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

ElementFromElementElementFactory.cs File Reference

Go to the source code of this file.

Classes

class | ElementFromElementElementFactory

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/FlowLayoutDerived.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

FlowLayoutDerived.cs File Reference

Go to the source code of this file.

Classes

class | FlowLayoutDerived

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/ItemCollectionTransitionProviderDerived.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

ItemCollectionTransitionProviderDerived.cs File Reference

Go to the source code of this file.

Classes

class | ItemCollectionTransitionProviderDerived

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/LayoutExtensions.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

LayoutExtensions.cs File Reference

Go to the source code of this file.

Classes

class | LayoutExtension

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/NamedGroup.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

NamedGroup.cs File Reference

Go to the source code of this file.

Classes

class | NamedGroup-g< T >

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/NonVirtualStackLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

NonVirtualStackLayout.cs File Reference

Go to the source code of this file.

Classes

class | NonVirtualStackLayout

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/OrientationBasedMeasures.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

OrientationBasedMeasures.cs File Reference

Go to the source code of this file.

Classes

class | OrientationBasedMeasures

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/ReadOnlyNotifyPropertyChangedCollection.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

ReadOnlyNotifyPropertyChangedCollection.cs File Reference

Go to the source code of this file.

Classes

class | ReadOnlyNotifyPropertyChangedCollection-g< T >

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/RecyclingViewGeneratorDerived.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

RecyclingViewGeneratorDerived.cs File Reference

Go to the source code of this file.

Classes

class | RecyclingElementFactoryDerived

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/SharedHelpers.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces | Enumerations

SharedHelpers.cs File Reference

Go to the source code of this file.

Classes

class | SharedHelpers

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common

Enumerations

enum | ScrollOrientation { Vertical, Horizontal }
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/WinRTCollection.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
Classes | Namespaces

WinRTCollection.cs File Reference

Go to the source code of this file.

Classes

class | WinRTCollection
class | WinRTCollection::VectorChangedEventArgs

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockItemsSource.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks
Classes | Namespaces

MockItemsSource.cs File Reference

Go to the source code of this file.

Classes

class | MockItemsSource
class | MockItemsSource::GetAtCallInfo
class | MockItemsSource::KeyFromIndexCallInfo
class | MockItemsSourceWithUniqueIdMapping

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockNonVirtualizingLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks
Classes | Namespaces

MockNonVirtualizingLayout.cs File Reference

Go to the source code of this file.

Classes

class | MockNonVirtualizingLayout

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockStackLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks
Classes | Namespaces

MockStackLayout.cs File Reference

Go to the source code of this file.

Classes

class | MockStackLayout

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockViewGenerator.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks
Classes | Namespaces

MockViewGenerator.cs File Reference

Go to the source code of this file.

Classes

class | MockElementFactory
class | MockElementFactory::GetElementCallInfo
class | MockElementFactory::RecycleElementCallInfo

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockVirtualizingLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks
Classes | Namespaces

MockVirtualizingLayout.cs File Reference

Go to the source code of this file.

Classes

class | MockVirtualizingLayout

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/InteractionTests/RepeaterTests.cs File Reference

  • File List
  • File Members
  • Repeater
  • InteractionTests
Classes | Namespaces

RepeaterTests.cs File Reference

Go to the source code of this file.

Classes

class | RepeaterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/RepeaterTestUIPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
Classes | Namespaces

RepeaterTestUIPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PageInfo
class | RepeaterTestUIPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/BasicDemo.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
Classes | Namespaces

BasicDemo.xaml.cs File Reference

Go to the source code of this file.

Classes

class | BasicDemo

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/Defaults.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
Classes | Namespaces

Defaults.xaml.cs File Reference

Go to the source code of this file.

Classes

class | Defaults

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/KeyboardNavigationSample.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
Classes | Namespaces

KeyboardNavigationSample.cs File Reference

Go to the source code of this file.

Classes

class | KeyboardNavigationSample

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LinedFlowLayoutDemo.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
Classes | Namespaces

LinedFlowLayoutDemo.cs File Reference

Go to the source code of this file.

Classes

class | LinedFlowLayoutDemo

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ObjectModelTestPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
Classes | Namespaces

ObjectModelTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ObjectModelTestPage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/UniformGridLayoutDemo.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
Classes | Namespaces

UniformGridLayoutDemo.cs File Reference

Go to the source code of this file.

Classes

class | UniformGridLayoutDemo

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/AnimationSamples/AnimationsDemoPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • AnimationSamples
Classes | Namespaces

AnimationsDemoPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | AnimationsDemoPage
class | AnimationsDemoPage::AnimationElementFactory

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/AnimationSamples/DefaultElementAnimator.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • AnimationSamples
Classes | Namespaces

DefaultElementAnimator.cs File Reference

Go to the source code of this file.

Classes

class | DefaultItemCollectionTransitionProvider

Namespaces

namespace | MUXControlsTestApp::Utils
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/AnimationSamples/RadialElementAnimator.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • AnimationSamples
Classes | Namespaces

RadialElementAnimator.cs File Reference

Go to the source code of this file.

Classes

class | RadialItemCollectionTransitionProvider

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/AnimationSamples/ScaleAnimatedVerticalListDemo.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • AnimationSamples
Classes | Namespaces

ScaleAnimatedVerticalListDemo.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScaleAnimatedVerticalListDemo

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/DataModel/Recipe.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • DataModel
Classes | Namespaces

Recipe.cs File Reference

Go to the source code of this file.

Classes

class | Recipe

Namespaces

namespace | MUXControlsTestApp::Samples::Model
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/DataModel/RecipeGroup.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • DataModel
Classes | Namespaces

RecipeGroup.cs File Reference

Go to the source code of this file.

Classes

class | RecipeGroup

Namespaces

namespace | MUXControlsTestApp::Samples::Model
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/DataModel/Year.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • DataModel
Classes | Namespaces

Year.cs File Reference

Go to the source code of this file.

Classes

class | Year

Namespaces

namespace | MUXControlsTestApp::Samples::Model
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/CollectionChangeDemo.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples
Classes | Namespaces

CollectionChangeDemo.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CollectionChangeDemo
class | CollectionChangeDemo::MyDataSource

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/DelegatingItemsSource.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples
Classes | Namespaces

DelegatingItemsSource.cs File Reference

Go to the source code of this file.

Classes

class | DelegatingItemsSource

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/ElementsInItemsSourcePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples
Classes | Namespaces

ElementsInItemsSourcePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ElementsInItemsSourcePage
class | UICollection

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/RecipeViewGenerator.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples
Classes | Namespaces

RecipeViewGenerator.cs File Reference

Go to the source code of this file.

Classes

class | RecipeElementFactory

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/ResetableCollection.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples
Classes | Namespaces

ResetableCollection.cs File Reference

Go to the source code of this file.

Classes

class | ResetableCollection-g< T >

Namespaces

namespace | MUXControlsTestApp::Utils
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/SortingAndFilteringPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples
Classes | Namespaces

SortingAndFilteringPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MyCollection
class | SortingAndFilteringPage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/VariableSizedItemsPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples
Classes | Namespaces

VariableSizedItemsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | FixedSizeItem
class | VariableSizedItemsPage
class | VariableSizeItem

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemTemplateSamples/DisposableUserControl.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemTemplateSamples
Classes | Namespaces

DisposableUserControl.xaml.cs File Reference

Go to the source code of this file.

Classes

class | DisposableUserControl

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemTemplateSamples/ItemTemplateDemo.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemTemplateSamples
Classes | Namespaces

ItemTemplateDemo.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemTemplateDemo
class | MyData
class | MyItemsRepeater
class | MySelector

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/NonVirtual/NonVirtualStackLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • NonVirtual
Classes | Namespaces

NonVirtualStackLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NonVirtualStackLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/Virtual/PinterestLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • Virtual
Classes | Namespaces

PinterestLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PinterestLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingStackLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • Virtual
Classes | Namespaces

VirtualizingStackLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingStackLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingUniformStackLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • Virtual
Classes | Namespaces

VirtualizingUniformStackLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingUniformStackLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/ItemsViewWithDataPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples
Classes | Namespaces

ItemsViewWithDataPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewWithDataPage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/LayoutHelper.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples
Classes | Namespaces

LayoutHelper.cs File Reference

Go to the source code of this file.

Classes

class | LayoutHelper

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreDemoPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples
Classes | Namespaces

StoreDemoPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | StoreDemoPage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreMockData.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples
Classes | Namespaces

StoreMockData.cs File Reference

Go to the source code of this file.

Classes

class | Category
class | Item
class | StoreMockData

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages
Classes | Namespaces

CircleLayout.cs File Reference

Go to the source code of this file.

Classes

class | CircleLayout

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages
Classes | Namespaces

CircleLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CircleLayoutSamplePage
class | Person
class | PersonDataSource
class | PersonElementFactory

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/Flex.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages
Classes | Namespaces | Enumerations

Flex.cs File Reference

Go to the source code of this file.

Classes

class | Flex
class | Flex::FlexState
class | Flex::LineInfo

Namespaces

namespace | Flick

Enumerations

enum AlignContent {
FlexStart, FlexEnd, Center, Stretch,
SpaceBetween, SpaceAround
}
enum AlignItems {
Auto, FlexStart, FlexEnd, Center,
Stretch
}
enum | FlexDirection { Row, RowReverse, Column, ColumnReverse }
enum | FlexWrap { NoWrap, Wrap }
enum JustifyContent {
FlexStart, FlexEnd, Center, SpaceBetween,
SpaceAround, SpaceEvenly
}
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages
Classes | Namespaces

NonVirtualStackLayout.cs File Reference

Go to the source code of this file.

Classes

class | NonVirtualStackLayout

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages
Classes | Namespaces

NonVirtualStackLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | NonVirtualStackLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

ActivityFeedLayout.cs File Reference

Go to the source code of this file.

Classes

class | ActivityFeedLayout
This is a custom layout that displays elements in two different sizes wide (w) and narrow (n). More...
class | ActivityFeedLayoutState

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

ActivityFeedSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ActivityFeedSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/FlowLayoutDemoPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

FlowLayoutDemoPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | FlowLayoutDemoPage
class | MyItem

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

PinterestLayout.cs File Reference

Go to the source code of this file.

Classes

class | PinterestLayout

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

PinterestLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | PinterestLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/UniformGrid2DLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

UniformGrid2DLayout.cs File Reference

Go to the source code of this file.

Classes

class | UniformGrid2DLayout

Namespaces

namespace | Flick
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingStackLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

VirtualizingStackLayout.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingStackLayout

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingStackLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

VirtualizingStackLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingStackLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformCarouselStackLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

VirtualizingUniformCarouselStackLayout.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingUniformCarouselStackLayout

Namespaces

namespace | Flick
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayout.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

VirtualizingUniformStackLayout.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingUniformStackLayout

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayoutSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages
Classes | Namespaces

VirtualizingUniformStackLayoutSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | VirtualizingUniformStackLayoutSamplePage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/NestedLayoutSamples/ItemsViewWithDataPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • NestedLayoutSamples
Classes | Namespaces

ItemsViewWithDataPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ItemsViewWithDataPage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/NestedLayoutSamples/LayoutHelper.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • NestedLayoutSamples
Classes | Namespaces

LayoutHelper.cs File Reference

Go to the source code of this file.

Classes

class | LayoutHelper

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/NestedLayoutSamples/StoreDemoPage.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • NestedLayoutSamples
Classes | Namespaces

StoreDemoPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | StoreDemoPage

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/NestedLayoutSamples/StoreMockData.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • NestedLayoutSamples
Classes | Namespaces

StoreMockData.cs File Reference

Go to the source code of this file.

Classes

class | Category
class | Item
class | StoreMockData

Namespaces

namespace | MUXControlsTestApp::Samples
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/BoolToBrushConverter.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common
Classes | Namespaces

BoolToBrushConverter.cs File Reference

Go to the source code of this file.

Classes

class | BoolToBrushConverter

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/BoolToVisibilityConverter.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common
Classes | Namespaces

BoolToVisibilityConverter.cs File Reference

Go to the source code of this file.

Classes

class | BoolToVisibilityConverter

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/Data.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common
Classes | Namespaces

Data.cs File Reference

Go to the source code of this file.

Classes

class | Data

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainer.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common
Classes | Namespaces

SelectionContainer.cs File Reference

Go to the source code of this file.

Classes

class | SelectionContainer

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainerAutomationPeer.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common
Classes | Namespaces

SelectionContainerAutomationPeer.cs File Reference

Go to the source code of this file.

Classes

class | SelectionContainerAutomationPeer

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Flat/FlatSample.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Flat
Classes | Namespaces

FlatSample.xaml.cs File Reference

Go to the source code of this file.

Classes

class | FlatSample

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItem.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Flat
Classes | Namespaces

RepeaterItem.cs File Reference

Go to the source code of this file.

Classes

class | RepeaterItem

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItemAutomationPeer.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Flat
Classes | Namespaces

RepeaterItemAutomationPeer.cs File Reference

Go to the source code of this file.

Classes

class | RepeaterItemAutomationPeer

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItem.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Grouped
Classes | Namespaces

GroupedRepeaterItem.cs File Reference

Go to the source code of this file.

Classes

class | GroupedRepeaterItem

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItemAutomationPeer.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Grouped
Classes | Namespaces

GroupedRepeaterItemAutomationPeer.cs File Reference

Go to the source code of this file.

Classes

class | GroupedRepeaterItemAutomationPeer

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedSample.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Grouped
Classes | Namespaces

GroupedSample.xaml.cs File Reference

Go to the source code of this file.

Classes

class | GroupedSample

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewItem.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • TreeView
Classes | Namespaces

TreeViewItem.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewItem

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewItemAutomationPeer.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • TreeView
Classes | Namespaces

TreeViewItemAutomationPeer.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewItemAutomationPeer

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewSample.xaml.cs File Reference

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • TreeView
Classes | Namespaces

TreeViewSample.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewSample

Namespaces

namespace | MUXControlsTestApp::Samples::Selection
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/ResourceAccessor.cpp File Reference

  • File List
  • File Members
  • ResourceHelper
Defines

ResourceAccessor.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Defines

#define | LOC_PREFIX L"Microsoft.UI.Xaml"
#define | LOC_PREFIX_WINUI L"Microsoft.UI.Xaml"

Define Documentation

#define LOC_PREFIX L"Microsoft.UI.Xaml"

Definition at line 8 of file ResourceAccessor.cpp.

#define LOC_PREFIX_WINUI L"Microsoft.UI.Xaml"

Definition at line 9 of file ResourceAccessor.cpp.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/ResourceAccessor.h File Reference

  • File List
  • File Members
  • ResourceHelper
Classes | Defines

ResourceAccessor.h File Reference

#include "pch.h"

Go to the source code of this file.

Classes

class | sealed< T, fallback, RawStorageT >
Resource Accessor. More...

Defines

#define | FR_Map_Html L"map.html"
#define | IR_NoiseAsset_256X256_PNG L"NoiseAsset_256X256_PNG"
#define | SR_AutomationNameAlphaSlider L"AutomationNameAlphaSlider"
#define | SR_AutomationNameAlphaTextBox L"AutomationNameAlphaTextBox"
#define | SR_AutomationNameBlueTextBox L"AutomationNameBlueTextBox"
#define | SR_AutomationNameColorModelComboBox L"AutomationNameColorModelComboBox"
#define | SR_AutomationNameColorSpectrum L"AutomationNameColorSpectrum"
#define | SR_AutomationNameEllipsisBreadcrumbBarItem L"AutomationNameEllipsisBreadcrumbBarItem"
#define | SR_AutomationNameGreenTextBox L"AutomationNameGreenTextBox"
#define | SR_AutomationNameHSVHexTextBox L"AutomationNameHSVHexTextBox"
#define | SR_AutomationNameHueSlider L"AutomationNameHueSlider"
#define | SR_AutomationNameHueTextBox L"AutomationNameHueTextBox"
#define | SR_AutomationNameMoreButtonCollapsed L"AutomationNameMoreButtonCollapsed"
#define | SR_AutomationNameMoreButtonExpanded L"AutomationNameMoreButtonExpanded"
#define | SR_AutomationNameRedTextBox L"AutomationNameRedTextBox"
#define | SR_AutomationNameRGBHexTextBox L"AutomationNameRGBHexTextBox"
#define | SR_AutomationNameSaturationSlider L"AutomationNameSaturationSlider"
#define | SR_AutomationNameSaturationTextBox L"AutomationNameSaturationTextBox"
#define | SR_AutomationNameValueSlider L"AutomationNameValueSlider"
#define | SR_AutomationNameValueTextBox L"AutomationNameValueTextBox"
#define | SR_BadgeIcon L"BadgeIcon"
#define | SR_BadgeIconTextOverride L"BadgeIconTextOverride"
#define | SR_BadgeItemPlural1 L"BadgeItemPlural1"
#define | SR_BadgeItemPlural2 L"BadgeItemPlural2"
#define | SR_BadgeItemPlural3 L"BadgeItemPlural3"
#define | SR_BadgeItemPlural4 L"BadgeItemPlural4"
#define | SR_BadgeItemPlural5 L"BadgeItemPlural5"
#define | SR_BadgeItemPlural6 L"BadgeItemPlural6"
#define | SR_BadgeItemPlural7 L"BadgeItemPlural7"
#define | SR_BadgeItemSingular L"BadgeItemSingular"
#define | SR_BadgeItemTextOverride L"BadgeItemTextOverride"
#define | SR_BasicRatingString L"BasicRatingString"
#define | SR_BreadcrumbBarItemLocalizedControlType L"BreadcrumbBarItemLocalizedControlType"
#define | SR_CancelDraggingString L"CancelDraggingString"
#define | SR_CommandBarFlyoutAppBarButtonLocalizedControlType L"CommandBarFlyoutAppBarButtonLocalizedControlType"
#define | SR_CommandBarFlyoutAppBarToggleButtonLocalizedControlType L"CommandBarFlyoutAppBarToggleButtonLocalizedControlType"
#define | SR_CommandBarFlyoutCommandBarLocalizedControlType L"CommandBarFlyoutCommandBarLocalizedControlType"
#define | SR_CommunityRatingString L"CommunityRatingString"
#define | SR_ContentHSVComboBoxItem L"ContentHSVComboBoxItem"
#define | SR_ContentRGBComboBoxItem L"ContentRGBComboBoxItem"
#define | SR_DefaultItemString L"DefaultItemString"
#define | SR_DownloadWebView2Runtime L"DownloadWebView2Runtime"
#define | SR_DropIntoNodeString L"DropIntoNodeString"
#define | SR_ExpanderDefaultControlName L"ExpanderDefaultControlName"
#define | SR_FallBackPlaceString L"FallBackPlaceString"
#define | SR_GroupName L"GroupName"
#define | SR_HelpTextColorSpectrum L"HelpTextColorSpectrum"
#define | SR_HelpTextMoreButton L"HelpTextMoreButton"
#define | SR_InfoBarCloseButtonName L"InfoBarCloseButtonName"
#define | SR_InfoBarCloseButtonTooltip L"InfoBarCloseButtonTooltip"
#define | SR_InfoBarClosedNotification L"InfoBarClosedNotification"
#define | SR_InfoBarCustomLandmarkName L"InfoBarCustomLandmarkName"
#define | SR_InfoBarIconSeverityErrorName L"InfoBarIconSeverityErrorName"
#define | SR_InfoBarIconSeverityInformationalName L"InfoBarIconSeverityInformationalName"
#define | SR_InfoBarIconSeveritySuccessName L"InfoBarIconSeveritySuccessName"
#define | SR_InfoBarIconSeverityWarningName L"InfoBarIconSeverityWarningName"
#define | SR_InfoBarOpenedNotification L"InfoBarOpenedNotification"
#define | SR_InfoBarSeverityErrorName L"InfoBarSeverityErrorName"
#define | SR_InfoBarSeverityInformationalName L"InfoBarSeverityInformationalName"
#define | SR_InfoBarSeveritySuccessName L"InfoBarSeveritySuccessName"
#define | SR_InfoBarSeverityWarningName L"InfoBarSeverityWarningName"
#define | SR_ItemContainerDefaultControlName L"ItemContainerDefaultControlName"
#define | SR_LocalizedControlTypeColorSpectrum L"LocalizedControlTypeColorSpectrum"
#define | SR_NavigationBackButtonName L"NavigationBackButtonName"
#define | SR_NavigationBackButtonToolTip L"NavigationBackButtonToolTip"
#define | SR_NavigationButtonClosedName L"NavigationButtonClosedName"
#define | SR_NavigationButtonOpenName L"NavigationButtonOpenName"
#define | SR_NavigationButtonToggleName L"NavigationButtonToggleName"
#define | SR_NavigationCloseButtonName L"NavigationCloseButtonName"
#define | SR_NavigationOverflowButtonName L"NavigationOverflowButtonName"
#define | SR_NavigationOverflowButtonText L"NavigationOverflowButtonText"
#define | SR_NavigationOverflowButtonToolTip L"NavigationOverflowButtonToolTip"
#define | SR_NavigationViewItemDefaultControlName L"NavigationViewItemDefaultControlName"
#define | SR_NavigationViewSearchButtonName L"NavigationViewSearchButtonName"
#define | SR_NumberBoxDownSpinButtonName L"NumberBoxDownSpinButtonName"
#define | SR_NumberBoxMaximumValueStatus L"NumberBoxMaximumValueStatus"
#define | SR_NumberBoxMinimumValueStatus L"NumberBoxMinimumValueStatus"
#define | SR_NumberBoxUpSpinButtonName L"NumberBoxUpSpinButtonName"
#define | SR_PagerControlFirstPageButtonTextName L"PagerControlFirstPageButtonText"
#define | SR_PagerControlLastPageButtonTextName L"PagerControlLastPageButtonText"
#define | SR_PagerControlNextPageButtonTextName L"PagerControlNextPageButtonText"
#define | SR_PagerControlPageTextName L"PagerControlPageText"
#define | SR_PagerControlPrefixTextName L"PagerControlPrefixText"
#define | SR_PagerControlPreviousPageButtonTextName L"PagerControlPreviousPageButtonText"
#define | SR_PagerControlSuffixTextName L"PagerControlSuffixText"
#define | SR_PersonName L"PersonName"
#define | SR_PipsPagerNameText L"PipsPagerNameText"
#define | SR_PipsPagerNextPageButtonText L"PipsPagerNextPageButtonText"
#define | SR_PipsPagerPageText L"PipsPagerPageText"
#define | SR_PipsPagerPreviousPageButtonText L"PipsPagerPreviousPageButtonText"
#define | SR_PlaceAfterString L"PlaceAfterString"
#define | SR_PlaceBeforeString L"PlaceBeforeString"
#define | SR_PlaceBetweenString L"PlaceBetweenString"
#define | SR_ProgressBarErrorStatus L"ProgressBarErrorStatus"
#define | SR_ProgressBarIndeterminateStatus L"ProgressBarIndeterminateStatus"
#define | SR_ProgressBarPausedStatus L"ProgressBarPausedStatus"
#define | SR_ProgressRingIndeterminateStatus L"ProgressRingIndeterminateStatus"
#define | SR_ProgressRingName L"ProgressRingName"
#define | SR_ProofingMenuItemLabel L"ProofingMenuItemLabel"
#define | SR_RatingControlName L"RatingControlName"
#define | SR_RatingLocalizedControlType L"RatingLocalizedControlType"
#define | SR_RatingsControlName L"RatingsControlName"
#define | SR_RatingUnset L"RatingUnset"
#define | SR_SelectorBarItemDefaultControlName L"SelectorBarItemDefaultControlName"
#define | SR_SettingsButtonName L"SettingsButtonName"
#define | SR_SplitButtonSecondaryButtonName L"SplitButtonSecondaryButtonName"
#define | SR_TabViewAddButtonName L"TabViewAddButtonName"
#define | SR_TabViewAddButtonTooltip L"TabViewAddButtonTooltip"
#define | SR_TabViewCloseButtonName L"TabViewCloseButtonName"
#define | SR_TabViewCloseButtonTooltip L"TabViewCloseButtonTooltip"
#define | SR_TabViewCloseButtonTooltipWithKA L"TabViewCloseButtonTooltipWithKA"
#define | SR_TabViewScrollDecreaseButtonTooltip L"TabViewScrollDecreaseButtonTooltip"
#define | SR_TabViewScrollIncreaseButtonTooltip L"TabViewScrollIncreaseButtonTooltip"
#define | SR_TeachingTipAlternateCloseButtonName L"TeachingTipAlternateCloseButtonName"
#define | SR_TeachingTipAlternateCloseButtonTooltip L"TeachingTipAlternateCloseButtonTooltip"
#define | SR_TeachingTipCustomLandmarkName L"TeachingTipCustomLandmarkName"
#define | SR_TeachingTipNotification L"TeachingTipNotification"
#define | SR_TeachingTipNotificationWithoutAppName L"TeachingTipNotificationWithoutAppName"
#define | SR_TextAlphaLabel L"TextAlphaLabel"
#define | SR_TextBlueLabel L"TextBlueLabel"
#define | SR_TextCommandDescriptionBold L"TextCommandDescriptionBold"
#define | SR_TextCommandDescriptionCopy L"TextCommandDescriptionCopy"
#define | SR_TextCommandDescriptionCut L"TextCommandDescriptionCut"
#define | SR_TextCommandDescriptionItalic L"TextCommandDescriptionItalic"
#define | SR_TextCommandDescriptionPaste L"TextCommandDescriptionPaste"
#define | SR_TextCommandDescriptionRedo L"TextCommandDescriptionRedo"
#define | SR_TextCommandDescriptionSelectAll L"TextCommandDescriptionSelectAll"
#define | SR_TextCommandDescriptionUnderline L"TextCommandDescriptionUnderline"
#define | SR_TextCommandDescriptionUndo L"TextCommandDescriptionUndo"
#define | SR_TextCommandKeyboardAcceleratorKeyBold L"TextCommandKeyboardAcceleratorKeyBold"
#define | SR_TextCommandKeyboardAcceleratorKeyCopy L"TextCommandKeyboardAcceleratorKeyCopy"
#define | SR_TextCommandKeyboardAcceleratorKeyCut L"TextCommandKeyboardAcceleratorKeyCut"
#define | SR_TextCommandKeyboardAcceleratorKeyItalic L"TextCommandKeyboardAcceleratorKeyItalic"
#define | SR_TextCommandKeyboardAcceleratorKeyPaste L"TextCommandKeyboardAcceleratorKeyPaste"
#define | SR_TextCommandKeyboardAcceleratorKeyRedo L"TextCommandKeyboardAcceleratorKeyRedo"
#define | SR_TextCommandKeyboardAcceleratorKeySelectAll L"TextCommandKeyboardAcceleratorKeySelectAll"
#define | SR_TextCommandKeyboardAcceleratorKeyUnderline L"TextCommandKeyboardAcceleratorKeyUnderline"
#define | SR_TextCommandKeyboardAcceleratorKeyUndo L"TextCommandKeyboardAcceleratorKeyUndo"
#define | SR_TextCommandLabelBold L"TextCommandLabelBold"
#define | SR_TextCommandLabelCopy L"TextCommandLabelCopy"
#define | SR_TextCommandLabelCut L"TextCommandLabelCut"
#define | SR_TextCommandLabelItalic L"TextCommandLabelItalic"
#define | SR_TextCommandLabelPaste L"TextCommandLabelPaste"
#define | SR_TextCommandLabelRedo L"TextCommandLabelRedo"
#define | SR_TextCommandLabelSelectAll L"TextCommandLabelSelectAll"
#define | SR_TextCommandLabelUnderline L"TextCommandLabelUnderline"
#define | SR_TextCommandLabelUndo L"TextCommandLabelUndo"
#define | SR_TextGreenLabel L"TextGreenLabel"
#define | SR_TextHueLabel L"TextHueLabel"
#define | SR_TextMoreButtonLabelCollapsed L"TextMoreButtonLabelCollapsed"
#define | SR_TextMoreButtonLabelExpanded L"TextMoreButtonLabelExpanded"
#define | SR_TextRedLabel L"TextRedLabel"
#define | SR_TextSaturationLabel L"TextSaturationLabel"
#define | SR_TextValueLabel L"TextValueLabel"
#define | SR_ToolTipStringAlphaSlider L"ToolTipStringAlphaSlider"
#define | SR_ToolTipStringHueSliderWithColorName L"ToolTipStringHueSliderWithColorName"
#define | SR_ToolTipStringHueSliderWithoutColorName L"ToolTipStringHueSliderWithoutColorName"
#define | SR_ToolTipStringSaturationSliderWithColorName L"ToolTipStringSaturationSliderWithColorName"
#define | SR_ToolTipStringSaturationSliderWithoutColorName L"ToolTipStringSaturationSliderWithoutColorName"
#define | SR_ToolTipStringValueSliderWithColorName L"ToolTipStringValueSliderWithColorName"
#define | SR_ToolTipStringValueSliderWithoutColorName L"ToolTipStringValueSliderWithoutColorName"
#define | SR_ValueStringColorSpectrumWithColorName L"ValueStringColorSpectrumWithColorName"
#define | SR_ValueStringColorSpectrumWithoutColorName L"ValueStringColorSpectrumWithoutColorName"
#define | SR_ValueStringHueSliderWithColorName L"ValueStringHueSliderWithColorName"
#define | SR_ValueStringHueSliderWithoutColorName L"ValueStringHueSliderWithoutColorName"
#define | SR_ValueStringSaturationSliderWithColorName L"ValueStringSaturationSliderWithColorName"
#define | SR_ValueStringSaturationSliderWithoutColorName L"ValueStringSaturationSliderWithoutColorName"
#define | SR_ValueStringValueSliderWithColorName L"ValueStringValueSliderWithColorName"
#define | SR_ValueStringValueSliderWithoutColorName L"ValueStringValueSliderWithoutColorName"
#define | SR_WarningSuitableWebView2NotFound L"WarningSuitableWebView2NotFound"

Define Documentation

#define FR_Map_Html L"map.html"

Definition at line 219 of file ResourceAccessor.h.

#define IR_NoiseAsset_256X256_PNG L"NoiseAsset_256X256_PNG"

Definition at line 217 of file ResourceAccessor.h.

#define SR_AutomationNameAlphaSlider L"AutomationNameAlphaSlider"

Definition at line 62 of file ResourceAccessor.h.

#define SR_AutomationNameAlphaTextBox L"AutomationNameAlphaTextBox"

Definition at line 63 of file ResourceAccessor.h.

#define SR_AutomationNameBlueTextBox L"AutomationNameBlueTextBox"

Definition at line 68 of file ResourceAccessor.h.

#define SR_AutomationNameColorModelComboBox L"AutomationNameColorModelComboBox"

Definition at line 69 of file ResourceAccessor.h.

#define SR_AutomationNameColorSpectrum L"AutomationNameColorSpectrum"

Definition at line 70 of file ResourceAccessor.h.

#define SR_AutomationNameEllipsisBreadcrumbBarItem L"AutomationNameEllipsisBreadcrumbBarItem"

Definition at line 208 of file ResourceAccessor.h.

#define SR_AutomationNameGreenTextBox L"AutomationNameGreenTextBox"

Definition at line 72 of file ResourceAccessor.h.

#define SR_AutomationNameHSVHexTextBox L"AutomationNameHSVHexTextBox"

Definition at line 75 of file ResourceAccessor.h.

#define SR_AutomationNameHueSlider L"AutomationNameHueSlider"

Definition at line 64 of file ResourceAccessor.h.

#define SR_AutomationNameHueTextBox L"AutomationNameHueTextBox"

Definition at line 78 of file ResourceAccessor.h.

#define SR_AutomationNameMoreButtonCollapsed L"AutomationNameMoreButtonCollapsed"

Definition at line 102 of file ResourceAccessor.h.

#define SR_AutomationNameMoreButtonExpanded L"AutomationNameMoreButtonExpanded"

Definition at line 103 of file ResourceAccessor.h.

#define SR_AutomationNameRedTextBox L"AutomationNameRedTextBox"

Definition at line 81 of file ResourceAccessor.h.

#define SR_AutomationNameRGBHexTextBox L"AutomationNameRGBHexTextBox"

Definition at line 74 of file ResourceAccessor.h.

#define SR_AutomationNameSaturationSlider L"AutomationNameSaturationSlider"

Definition at line 65 of file ResourceAccessor.h.

#define SR_AutomationNameSaturationTextBox L"AutomationNameSaturationTextBox"

Definition at line 84 of file ResourceAccessor.h.

#define SR_AutomationNameValueSlider L"AutomationNameValueSlider"

Definition at line 66 of file ResourceAccessor.h.

#define SR_AutomationNameValueTextBox L"AutomationNameValueTextBox"

Definition at line 94 of file ResourceAccessor.h.

#define SR_BadgeIcon L"BadgeIcon"

Definition at line 116 of file ResourceAccessor.h.

#define SR_BadgeIconTextOverride L"BadgeIconTextOverride"

Definition at line 117 of file ResourceAccessor.h.

#define SR_BadgeItemPlural1 L"BadgeItemPlural1"

Definition at line 107 of file ResourceAccessor.h.

#define SR_BadgeItemPlural2 L"BadgeItemPlural2"

Definition at line 108 of file ResourceAccessor.h.

#define SR_BadgeItemPlural3 L"BadgeItemPlural3"

Definition at line 109 of file ResourceAccessor.h.

#define SR_BadgeItemPlural4 L"BadgeItemPlural4"

Definition at line 110 of file ResourceAccessor.h.

#define SR_BadgeItemPlural5 L"BadgeItemPlural5"

Definition at line 111 of file ResourceAccessor.h.

#define SR_BadgeItemPlural6 L"BadgeItemPlural6"

Definition at line 112 of file ResourceAccessor.h.

#define SR_BadgeItemPlural7 L"BadgeItemPlural7"

Definition at line 113 of file ResourceAccessor.h.

#define SR_BadgeItemSingular L"BadgeItemSingular"

Definition at line 114 of file ResourceAccessor.h.

#define SR_BadgeItemTextOverride L"BadgeItemTextOverride"

Definition at line 115 of file ResourceAccessor.h.

#define SR_BasicRatingString L"BasicRatingString"

Definition at line 44 of file ResourceAccessor.h.

#define SR_BreadcrumbBarItemLocalizedControlType L"BreadcrumbBarItemLocalizedControlType"

Definition at line 144 of file ResourceAccessor.h.

#define SR_CancelDraggingString L"CancelDraggingString"

Definition at line 120 of file ResourceAccessor.h.

#define SR_CommandBarFlyoutAppBarButtonLocalizedControlType L"CommandBarFlyoutAppBarButtonLocalizedControlType"

Definition at line 211 of file ResourceAccessor.h.

#define SR_CommandBarFlyoutAppBarToggleButtonLocalizedControlType L"CommandBarFlyoutAppBarToggleButtonLocalizedControlType"

Definition at line 212 of file ResourceAccessor.h.

#define SR_CommandBarFlyoutCommandBarLocalizedControlType L"CommandBarFlyoutCommandBarLocalizedControlType"

Definition at line 210 of file ResourceAccessor.h.

#define SR_CommunityRatingString L"CommunityRatingString"

Definition at line 45 of file ResourceAccessor.h.

#define SR_ContentHSVComboBoxItem L"ContentHSVComboBoxItem"

Definition at line 76 of file ResourceAccessor.h.

#define SR_ContentRGBComboBoxItem L"ContentRGBComboBoxItem"

Definition at line 82 of file ResourceAccessor.h.

#define SR_DefaultItemString L"DefaultItemString"

Definition at line 121 of file ResourceAccessor.h.

#define SR_DownloadWebView2Runtime L"DownloadWebView2Runtime"

Definition at line 215 of file ResourceAccessor.h.

#define SR_DropIntoNodeString L"DropIntoNodeString"

Definition at line 122 of file ResourceAccessor.h.

#define SR_ExpanderDefaultControlName L"ExpanderDefaultControlName"

Definition at line 190 of file ResourceAccessor.h.

#define SR_FallBackPlaceString L"FallBackPlaceString"

Definition at line 123 of file ResourceAccessor.h.

#define SR_GroupName L"GroupName"

Definition at line 119 of file ResourceAccessor.h.

#define SR_HelpTextColorSpectrum L"HelpTextColorSpectrum"

Definition at line 73 of file ResourceAccessor.h.

#define SR_HelpTextMoreButton L"HelpTextMoreButton"

Definition at line 104 of file ResourceAccessor.h.

#define SR_InfoBarCloseButtonName L"InfoBarCloseButtonName"

Definition at line 194 of file ResourceAccessor.h.

#define SR_InfoBarCloseButtonTooltip L"InfoBarCloseButtonTooltip"

Definition at line 198 of file ResourceAccessor.h.

#define SR_InfoBarClosedNotification L"InfoBarClosedNotification"

Definition at line 196 of file ResourceAccessor.h.

#define SR_InfoBarCustomLandmarkName L"InfoBarCustomLandmarkName"

Definition at line 197 of file ResourceAccessor.h.

#define SR_InfoBarIconSeverityErrorName L"InfoBarIconSeverityErrorName"

Definition at line 206 of file ResourceAccessor.h.

#define SR_InfoBarIconSeverityInformationalName L"InfoBarIconSeverityInformationalName"

Definition at line 203 of file ResourceAccessor.h.

#define SR_InfoBarIconSeveritySuccessName L"InfoBarIconSeveritySuccessName"

Definition at line 204 of file ResourceAccessor.h.

#define SR_InfoBarIconSeverityWarningName L"InfoBarIconSeverityWarningName"

Definition at line 205 of file ResourceAccessor.h.

#define SR_InfoBarOpenedNotification L"InfoBarOpenedNotification"

Definition at line 195 of file ResourceAccessor.h.

#define SR_InfoBarSeverityErrorName L"InfoBarSeverityErrorName"

Definition at line 202 of file ResourceAccessor.h.

#define SR_InfoBarSeverityInformationalName L"InfoBarSeverityInformationalName"

Definition at line 199 of file ResourceAccessor.h.

#define SR_InfoBarSeveritySuccessName L"InfoBarSeveritySuccessName"

Definition at line 200 of file ResourceAccessor.h.

#define SR_InfoBarSeverityWarningName L"InfoBarSeverityWarningName"

Definition at line 201 of file ResourceAccessor.h.

#define SR_ItemContainerDefaultControlName L"ItemContainerDefaultControlName"

Definition at line 191 of file ResourceAccessor.h.

#define SR_LocalizedControlTypeColorSpectrum L"LocalizedControlTypeColorSpectrum"

Definition at line 79 of file ResourceAccessor.h.

#define SR_NavigationBackButtonName L"NavigationBackButtonName"

Definition at line 53 of file ResourceAccessor.h.

#define SR_NavigationBackButtonToolTip L"NavigationBackButtonToolTip"

Definition at line 54 of file ResourceAccessor.h.

#define SR_NavigationButtonClosedName L"NavigationButtonClosedName"

Definition at line 50 of file ResourceAccessor.h.

#define SR_NavigationButtonOpenName L"NavigationButtonOpenName"

Definition at line 51 of file ResourceAccessor.h.

#define SR_NavigationButtonToggleName L"NavigationButtonToggleName"

Definition at line 49 of file ResourceAccessor.h.

#define SR_NavigationCloseButtonName L"NavigationCloseButtonName"

Definition at line 55 of file ResourceAccessor.h.

#define SR_NavigationOverflowButtonName L"NavigationOverflowButtonName"

Definition at line 56 of file ResourceAccessor.h.

#define SR_NavigationOverflowButtonText L"NavigationOverflowButtonText"

Definition at line 57 of file ResourceAccessor.h.

#define SR_NavigationOverflowButtonToolTip L"NavigationOverflowButtonToolTip"

Definition at line 58 of file ResourceAccessor.h.

#define SR_NavigationViewItemDefaultControlName L"NavigationViewItemDefaultControlName"

Definition at line 52 of file ResourceAccessor.h.

#define SR_NavigationViewSearchButtonName L"NavigationViewSearchButtonName"

Definition at line 60 of file ResourceAccessor.h.

#define SR_NumberBoxDownSpinButtonName L"NumberBoxDownSpinButtonName"

Definition at line 187 of file ResourceAccessor.h.

#define SR_NumberBoxMaximumValueStatus L"NumberBoxMaximumValueStatus"

Definition at line 188 of file ResourceAccessor.h.

#define SR_NumberBoxMinimumValueStatus L"NumberBoxMinimumValueStatus"

Definition at line 189 of file ResourceAccessor.h.

#define SR_NumberBoxUpSpinButtonName L"NumberBoxUpSpinButtonName"

Definition at line 186 of file ResourceAccessor.h.

#define SR_PagerControlFirstPageButtonTextName L"PagerControlFirstPageButtonText"

Definition at line 127 of file ResourceAccessor.h.

#define SR_PagerControlLastPageButtonTextName L"PagerControlLastPageButtonText"

Definition at line 130 of file ResourceAccessor.h.

#define SR_PagerControlNextPageButtonTextName L"PagerControlNextPageButtonText"

Definition at line 129 of file ResourceAccessor.h.

#define SR_PagerControlPageTextName L"PagerControlPageText"

Definition at line 124 of file ResourceAccessor.h.

#define SR_PagerControlPrefixTextName L"PagerControlPrefixText"

Definition at line 125 of file ResourceAccessor.h.

#define SR_PagerControlPreviousPageButtonTextName L"PagerControlPreviousPageButtonText"

Definition at line 128 of file ResourceAccessor.h.

#define SR_PagerControlSuffixTextName L"PagerControlSuffixText"

Definition at line 126 of file ResourceAccessor.h.

#define SR_PersonName L"PersonName"

Definition at line 118 of file ResourceAccessor.h.

#define SR_PipsPagerNameText L"PipsPagerNameText"

Definition at line 131 of file ResourceAccessor.h.

#define SR_PipsPagerNextPageButtonText L"PipsPagerNextPageButtonText"

Definition at line 132 of file ResourceAccessor.h.

#define SR_PipsPagerPageText L"PipsPagerPageText"

Definition at line 134 of file ResourceAccessor.h.

#define SR_PipsPagerPreviousPageButtonText L"PipsPagerPreviousPageButtonText"

Definition at line 133 of file ResourceAccessor.h.

#define SR_PlaceAfterString L"PlaceAfterString"

Definition at line 135 of file ResourceAccessor.h.

#define SR_PlaceBeforeString L"PlaceBeforeString"

Definition at line 136 of file ResourceAccessor.h.

#define SR_PlaceBetweenString L"PlaceBetweenString"

Definition at line 137 of file ResourceAccessor.h.

#define SR_ProgressBarErrorStatus L"ProgressBarErrorStatus"

Definition at line 142 of file ResourceAccessor.h.

#define SR_ProgressBarIndeterminateStatus L"ProgressBarIndeterminateStatus"

Definition at line 140 of file ResourceAccessor.h.

#define SR_ProgressBarPausedStatus L"ProgressBarPausedStatus"

Definition at line 141 of file ResourceAccessor.h.

#define SR_ProgressRingIndeterminateStatus L"ProgressRingIndeterminateStatus"

Definition at line 139 of file ResourceAccessor.h.

#define SR_ProgressRingName L"ProgressRingName"

Definition at line 138 of file ResourceAccessor.h.

#define SR_ProofingMenuItemLabel L"ProofingMenuItemLabel"

Definition at line 146 of file ResourceAccessor.h.

#define SR_RatingControlName L"RatingControlName"

Definition at line 47 of file ResourceAccessor.h.

#define SR_RatingLocalizedControlType L"RatingLocalizedControlType"

Definition at line 143 of file ResourceAccessor.h.

#define SR_RatingsControlName L"RatingsControlName"

Definition at line 46 of file ResourceAccessor.h.

#define SR_RatingUnset L"RatingUnset"

Definition at line 48 of file ResourceAccessor.h.

#define SR_SelectorBarItemDefaultControlName L"SelectorBarItemDefaultControlName"

Definition at line 192 of file ResourceAccessor.h.

#define SR_SettingsButtonName L"SettingsButtonName"

Definition at line 59 of file ResourceAccessor.h.

#define SR_SplitButtonSecondaryButtonName L"SplitButtonSecondaryButtonName"

Definition at line 145 of file ResourceAccessor.h.

#define SR_TabViewAddButtonName L"TabViewAddButtonName"

Definition at line 179 of file ResourceAccessor.h.

#define SR_TabViewAddButtonTooltip L"TabViewAddButtonTooltip"

Definition at line 180 of file ResourceAccessor.h.

#define SR_TabViewCloseButtonName L"TabViewCloseButtonName"

Definition at line 181 of file ResourceAccessor.h.

#define SR_TabViewCloseButtonTooltip L"TabViewCloseButtonTooltip"

Definition at line 182 of file ResourceAccessor.h.

#define SR_TabViewCloseButtonTooltipWithKA L"TabViewCloseButtonTooltipWithKA"

Definition at line 183 of file ResourceAccessor.h.

#define SR_TabViewScrollDecreaseButtonTooltip L"TabViewScrollDecreaseButtonTooltip"

Definition at line 184 of file ResourceAccessor.h.

#define SR_TabViewScrollIncreaseButtonTooltip L"TabViewScrollIncreaseButtonTooltip"

Definition at line 185 of file ResourceAccessor.h.

#define SR_TeachingTipAlternateCloseButtonName L"TeachingTipAlternateCloseButtonName"

Definition at line 174 of file ResourceAccessor.h.

#define SR_TeachingTipAlternateCloseButtonTooltip L"TeachingTipAlternateCloseButtonTooltip"

Definition at line 175 of file ResourceAccessor.h.

#define SR_TeachingTipCustomLandmarkName L"TeachingTipCustomLandmarkName"

Definition at line 176 of file ResourceAccessor.h.

#define SR_TeachingTipNotification L"TeachingTipNotification"

Definition at line 177 of file ResourceAccessor.h.

#define SR_TeachingTipNotificationWithoutAppName L"TeachingTipNotificationWithoutAppName"

Definition at line 178 of file ResourceAccessor.h.

#define SR_TextAlphaLabel L"TextAlphaLabel"

Definition at line 61 of file ResourceAccessor.h.

#define SR_TextBlueLabel L"TextBlueLabel"

Definition at line 67 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionBold L"TextCommandDescriptionBold"

Definition at line 160 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionCopy L"TextCommandDescriptionCopy"

Definition at line 157 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionCut L"TextCommandDescriptionCut"

Definition at line 156 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionItalic L"TextCommandDescriptionItalic"

Definition at line 161 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionPaste L"TextCommandDescriptionPaste"

Definition at line 158 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionRedo L"TextCommandDescriptionRedo"

Definition at line 164 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionSelectAll L"TextCommandDescriptionSelectAll"

Definition at line 159 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionUnderline L"TextCommandDescriptionUnderline"

Definition at line 162 of file ResourceAccessor.h.

#define SR_TextCommandDescriptionUndo L"TextCommandDescriptionUndo"

Definition at line 163 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyBold L"TextCommandKeyboardAcceleratorKeyBold"

Definition at line 169 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyCopy L"TextCommandKeyboardAcceleratorKeyCopy"

Definition at line 166 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyCut L"TextCommandKeyboardAcceleratorKeyCut"

Definition at line 165 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyItalic L"TextCommandKeyboardAcceleratorKeyItalic"

Definition at line 170 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyPaste L"TextCommandKeyboardAcceleratorKeyPaste"

Definition at line 167 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyRedo L"TextCommandKeyboardAcceleratorKeyRedo"

Definition at line 173 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeySelectAll L"TextCommandKeyboardAcceleratorKeySelectAll"

Definition at line 168 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyUnderline L"TextCommandKeyboardAcceleratorKeyUnderline"

Definition at line 171 of file ResourceAccessor.h.

#define SR_TextCommandKeyboardAcceleratorKeyUndo L"TextCommandKeyboardAcceleratorKeyUndo"

Definition at line 172 of file ResourceAccessor.h.

#define SR_TextCommandLabelBold L"TextCommandLabelBold"

Definition at line 151 of file ResourceAccessor.h.

#define SR_TextCommandLabelCopy L"TextCommandLabelCopy"

Definition at line 148 of file ResourceAccessor.h.

#define SR_TextCommandLabelCut L"TextCommandLabelCut"

Definition at line 147 of file ResourceAccessor.h.

#define SR_TextCommandLabelItalic L"TextCommandLabelItalic"

Definition at line 152 of file ResourceAccessor.h.

#define SR_TextCommandLabelPaste L"TextCommandLabelPaste"

Definition at line 149 of file ResourceAccessor.h.

#define SR_TextCommandLabelRedo L"TextCommandLabelRedo"

Definition at line 155 of file ResourceAccessor.h.

#define SR_TextCommandLabelSelectAll L"TextCommandLabelSelectAll"

Definition at line 150 of file ResourceAccessor.h.

#define SR_TextCommandLabelUnderline L"TextCommandLabelUnderline"

Definition at line 153 of file ResourceAccessor.h.

#define SR_TextCommandLabelUndo L"TextCommandLabelUndo"

Definition at line 154 of file ResourceAccessor.h.

#define SR_TextGreenLabel L"TextGreenLabel"

Definition at line 71 of file ResourceAccessor.h.

#define SR_TextHueLabel L"TextHueLabel"

Definition at line 77 of file ResourceAccessor.h.

#define SR_TextMoreButtonLabelCollapsed L"TextMoreButtonLabelCollapsed"

Definition at line 105 of file ResourceAccessor.h.

#define SR_TextMoreButtonLabelExpanded L"TextMoreButtonLabelExpanded"

Definition at line 106 of file ResourceAccessor.h.

#define SR_TextRedLabel L"TextRedLabel"

Definition at line 80 of file ResourceAccessor.h.

#define SR_TextSaturationLabel L"TextSaturationLabel"

Definition at line 83 of file ResourceAccessor.h.

#define SR_TextValueLabel L"TextValueLabel"

Definition at line 85 of file ResourceAccessor.h.

#define SR_ToolTipStringAlphaSlider L"ToolTipStringAlphaSlider"

Definition at line 95 of file ResourceAccessor.h.

#define SR_ToolTipStringHueSliderWithColorName L"ToolTipStringHueSliderWithColorName"

Definition at line 96 of file ResourceAccessor.h.

#define SR_ToolTipStringHueSliderWithoutColorName L"ToolTipStringHueSliderWithoutColorName"

Definition at line 97 of file ResourceAccessor.h.

#define SR_ToolTipStringSaturationSliderWithColorName L"ToolTipStringSaturationSliderWithColorName"

Definition at line 98 of file ResourceAccessor.h.

#define SR_ToolTipStringSaturationSliderWithoutColorName L"ToolTipStringSaturationSliderWithoutColorName"

Definition at line 99 of file ResourceAccessor.h.

#define SR_ToolTipStringValueSliderWithColorName L"ToolTipStringValueSliderWithColorName"

Definition at line 100 of file ResourceAccessor.h.

#define SR_ToolTipStringValueSliderWithoutColorName L"ToolTipStringValueSliderWithoutColorName"

Definition at line 101 of file ResourceAccessor.h.

#define SR_ValueStringColorSpectrumWithColorName L"ValueStringColorSpectrumWithColorName"

Definition at line 86 of file ResourceAccessor.h.

#define SR_ValueStringColorSpectrumWithoutColorName L"ValueStringColorSpectrumWithoutColorName"

Definition at line 87 of file ResourceAccessor.h.

#define SR_ValueStringHueSliderWithColorName L"ValueStringHueSliderWithColorName"

Definition at line 88 of file ResourceAccessor.h.

#define SR_ValueStringHueSliderWithoutColorName L"ValueStringHueSliderWithoutColorName"

Definition at line 89 of file ResourceAccessor.h.

#define SR_ValueStringSaturationSliderWithColorName L"ValueStringSaturationSliderWithColorName"

Definition at line 90 of file ResourceAccessor.h.

#define SR_ValueStringSaturationSliderWithoutColorName L"ValueStringSaturationSliderWithoutColorName"

Definition at line 91 of file ResourceAccessor.h.

#define SR_ValueStringValueSliderWithColorName L"ValueStringValueSliderWithColorName"

Definition at line 92 of file ResourceAccessor.h.

#define SR_ValueStringValueSliderWithoutColorName L"ValueStringValueSliderWithoutColorName"

Definition at line 93 of file ResourceAccessor.h.

#define SR_WarningSuitableWebView2NotFound L"WarningSuitableWebView2NotFound"

Definition at line 214 of file ResourceAccessor.h.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/Utils.cpp File Reference

  • File List
  • File Members
  • ResourceHelper

Utils.cpp File Reference

#include "pch.h"
#include "Utils.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/Utils.h File Reference

  • File List
  • File Members
  • ResourceHelper
Classes | Namespaces | Functions

Utils.h File Reference

#include <codecvt>
#include <string>

Go to the source code of this file.

Classes

class | VisualStateUtil

Namespaces

namespace | LayoutUtils
namespace | StringUtil
namespace | Util

Functions

winrt::hstring | FormatString (std::wstring_view formatString,...)
template<class UIElementType >
double | GetActualWidthFor (UIElementType element)
template<class UIElementType >
float | MeasureAndGetDesiredHeightFor (UIElementType element, winrt::Size const &availableSize)
template<class UIElementType >
float | MeasureAndGetDesiredWidthFor (UIElementType element, winrt::Size const &availableSize)
std::string | Utf16ToUtf8 (const std::wstring_view &utf16Str)
std::wstring | Utf8ToUtf16 (const std::string_view &utf8Str)
winrt::Visibility constexpr | VisibilityFromBool (bool visible)
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/BringIntoViewOffsetsChange.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

BringIntoViewOffsetsChange.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTrace.h"
#include "BringIntoViewOffsetsChange.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/BringIntoViewOffsetsChange.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

BringIntoViewOffsetsChange.h File Reference

#include "OffsetsChange.h"

Go to the source code of this file.

Classes

class BringIntoViewOffsetsChange
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTrackerAsyncOperation.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

InteractionTrackerAsyncOperation.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "InteractionTrackerAsyncOperation.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTrackerAsyncOperation.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes | Enumerations | Variables

InteractionTrackerAsyncOperation.h File Reference

#include "ViewChangeBase.h"
#include "ScrollPresenterTrace.h"

Go to the source code of this file.

Classes

class | InteractionTrackerAsyncOperation

Enumerations

enum | InteractionTrackerAsyncOperationTrigger { DirectViewChange = 0x01, HorizontalScrollControllerRequest = 0x02, VerticalScrollControllerRequest = 0x04, BringIntoViewRequest = 0x08 }
enum InteractionTrackerAsyncOperationType {
None, TryUpdatePosition, TryUpdatePositionBy, TryUpdatePositionWithAnimation,
TryUpdatePositionWithAdditionalVelocity, TryUpdateScale, TryUpdateScaleWithAnimation, TryUpdateScaleWithAdditionalVelocity
}

Variables

const int | c_maxNonAnimatedOperationTicks = 10
const int | c_queuedOperationTicks = 3

Enumeration Type Documentation

enum InteractionTrackerAsyncOperationTrigger
Enumerator:
DirectViewChange
HorizontalScrollControllerRequest
VerticalScrollControllerRequest
BringIntoViewRequest

Definition at line 21 of file InteractionTrackerAsyncOperation.h.

{
    // Operation is triggered by a direct call to ScrollPresenter's ScrollTo/ScrollBy/AddScrollVelocity or ZoomTo/ZoomBy/AddZoomVelocity
    DirectViewChange = 0x01,
    // Operation is triggered by the horizontal IScrollController.
    HorizontalScrollControllerRequest = 0x02,
    // Operation is triggered by the vertical IScrollController.
    VerticalScrollControllerRequest = 0x04,
    // Operation is triggered by the UIElement.BringIntoViewRequested event handler.
    BringIntoViewRequest = 0x08
};

enum InteractionTrackerAsyncOperationType
Enumerator:
None
TryUpdatePosition
TryUpdatePositionBy
TryUpdatePositionWithAnimation
TryUpdatePositionWithAdditionalVelocity
TryUpdateScale
TryUpdateScaleWithAnimation
TryUpdateScaleWithAdditionalVelocity

Definition at line 9 of file InteractionTrackerAsyncOperation.h.

{
    None,
    TryUpdatePosition,
    TryUpdatePositionBy,
    TryUpdatePositionWithAnimation,
    TryUpdatePositionWithAdditionalVelocity,
    TryUpdateScale,
    TryUpdateScaleWithAnimation,
    TryUpdateScaleWithAdditionalVelocity,
};

Variable Documentation

const int c_maxNonAnimatedOperationTicks = 10

Definition at line 35 of file InteractionTrackerAsyncOperation.h.

const int c_queuedOperationTicks = 3

Definition at line 39 of file InteractionTrackerAsyncOperation.h.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTrackerOwner.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

InteractionTrackerOwner.cpp File Reference

#include "pch.h"
#include "common.h"
#include "InteractionTrackerOwner.h"
#include "ScrollPresenter.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTrackerOwner.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

InteractionTrackerOwner.h File Reference

#include "common.h"

Go to the source code of this file.

Classes

class InteractionTrackerOwner
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/OffsetsChange.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

OffsetsChange.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTrace.h"
#include "OffsetsChange.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/OffsetsChange.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

OffsetsChange.h File Reference

#include "ViewChange.h"

Go to the source code of this file.

Classes

class OffsetsChange
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/OffsetsChangeWithAdditionalVelocity.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

OffsetsChangeWithAdditionalVelocity.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "OffsetsChangeWithAdditionalVelocity.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/OffsetsChangeWithAdditionalVelocity.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

OffsetsChangeWithAdditionalVelocity.h File Reference

#include "ViewChangeBase.h"

Go to the source code of this file.

Classes

class OffsetsChangeWithAdditionalVelocity
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/RepeatedScrollSnapPoint.h File Reference

  • File List
  • File Members
  • ScrollPresenter

RepeatedScrollSnapPoint.h File Reference

#include "SnapPoint.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/RepeatedZoomSnapPoint.h File Reference

  • File List
  • File Members
  • ScrollPresenter

RepeatedZoomSnapPoint.h File Reference

#include "SnapPoint.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerAddScrollVelocityRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerAddScrollVelocityRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenter.h"
#include "ScrollControllerAddScrollVelocityRequestedEventArgs.h"
#include "ScrollControllerAddScrollVelocityRequestedEventArgs.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerAddScrollVelocityRequestedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollControllerAddScrollVelocityRequestedEventArgs.h File Reference

#include "ScrollControllerAddScrollVelocityRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollControllerAddScrollVelocityRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerPanRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerPanRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTrace.h"
#include "ScrollControllerPanRequestedEventArgs.h"
#include "ScrollControllerPanRequestedEventArgs.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerPanRequestedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollControllerPanRequestedEventArgs.h File Reference

#include "pch.h"
#include "ScrollControllerPanRequestedEventArgs.g.h"
#include "ScrollPresenterTrace.h"

Go to the source code of this file.

Classes

class ScrollControllerPanRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerScrollByRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollControllerScrollByRequestedEventArgs.h"
#include "ScrollControllerScrollByRequestedEventArgs.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollControllerScrollByRequestedEventArgs.h File Reference

#include "ScrollControllerScrollByRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollControllerScrollByRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerScrollToRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerScrollToRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollPresenter.h"
#include "ScrollControllerScrollToRequestedEventArgs.h"
#include "ScrollControllerScrollToRequestedEventArgs.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerScrollToRequestedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollControllerScrollToRequestedEventArgs.h File Reference

#include "ScrollControllerScrollToRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollControllerScrollToRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingAnchorRequestedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingAnchorRequestedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "ScrollPresenter.h"
#include "ScrollPresenterTrace.h"
#include "ScrollingAnchorRequestedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingAnchorRequestedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingAnchorRequestedEventArgs.h File Reference

#include "ScrollingAnchorRequestedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingAnchorRequestedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingBringingIntoViewEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingBringingIntoViewEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterTrace.h"
#include "ScrollingBringingIntoViewEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingBringingIntoViewEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingBringingIntoViewEventArgs.h File Reference

#include "ScrollingBringingIntoViewEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingBringingIntoViewEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollAnimationStartingEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollAnimationStartingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "ScrollPresenterTrace.h"
#include "ScrollingScrollAnimationStartingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollAnimationStartingEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingScrollAnimationStartingEventArgs.h File Reference

#include "ScrollPresenterTrace.h"
#include "ScrollingScrollAnimationStartingEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingScrollAnimationStartingEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollCompletedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollCompletedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollingScrollCompletedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollCompletedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingScrollCompletedEventArgs.h File Reference

#include "ScrollPresenter.h"
#include "ScrollingScrollCompletedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingScrollCompletedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollOptions.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollOptions.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollingScrollOptions.h"
#include "ScrollingScrollOptions.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollOptions.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingScrollOptions.h File Reference

#include "ScrollPresenter.h"
#include "ScrollingScrollOptions.g.h"

Go to the source code of this file.

Classes

class ScrollingScrollOptions
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollStartingEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollStartingEventArgs.cpp File Reference

#include "pch.h"
#include "ScrollingScrollStartingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollStartingEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingScrollStartingEventArgs.h File Reference

#include "ScrollPresenter.h"
#include "ScrollingScrollStartingEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingScrollStartingEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomAnimationStartingEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomAnimationStartingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "ScrollPresenterTrace.h"
#include "ScrollingZoomAnimationStartingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomAnimationStartingEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingZoomAnimationStartingEventArgs.h File Reference

#include "ScrollingZoomAnimationStartingEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingZoomAnimationStartingEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomCompletedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomCompletedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollingZoomCompletedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomCompletedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingZoomCompletedEventArgs.h File Reference

#include "ScrollPresenter.h"
#include "ScrollingZoomCompletedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingZoomCompletedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomOptions.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomOptions.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollingZoomOptions.h"
#include "ScrollingZoomOptions.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomOptions.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingZoomOptions.h File Reference

#include "ScrollPresenter.h"
#include "ScrollingZoomOptions.g.h"

Go to the source code of this file.

Classes

class ScrollingZoomOptions
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomStartingEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomStartingEventArgs.cpp File Reference

#include "pch.h"
#include "ScrollingZoomStartingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomStartingEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollingZoomStartingEventArgs.h File Reference

#include "ScrollPresenter.h"
#include "ScrollingZoomStartingEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollingZoomStartingEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenter.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter
Variables

ScrollPresenter.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ResourceAccessor.h"
#include "RuntimeProfiler.h"
#include "InteractionTrackerOwner.h"
#include "ScrollPresenter.h"
#include "ScrollingScrollOptions.h"
#include "ScrollingZoomOptions.h"
#include "ScrollPresenterAutomationPeer.h"
#include "ScrollPresenterTestHooks.h"
#include "Vector.h"
#include "RegUtil.h"
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Variables

const float | c_scrollPresenterDefaultInertiaDecayRate = 0.95f
const double | c_scrollPresenterLineDelta = 16.0

Variable Documentation

const float c_scrollPresenterDefaultInertiaDecayRate = 0.95f

Definition at line 29 of file ScrollPresenter.cpp.

const double c_scrollPresenterLineDelta = 16.0

Definition at line 25 of file ScrollPresenter.cpp.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenter.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollPresenter.h File Reference

#include "DoubleUtil.h"
#include "FloatUtil.h"
#include "InteractionTrackerAsyncOperation.h"
#include "ScrollingScrollAnimationStartingEventArgs.h"
#include "ScrollingZoomAnimationStartingEventArgs.h"
#include "ScrollingScrollCompletedEventArgs.h"
#include "ScrollingZoomCompletedEventArgs.h"
#include "ScrollingBringingIntoViewEventArgs.h"
#include "ScrollingAnchorRequestedEventArgs.h"
#include "ScrollingScrollStartingEventArgs.h"
#include "ScrollingZoomStartingEventArgs.h"
#include "SnapPointWrapper.h"
#include "ScrollPresenterTrace.h"
#include "ViewChange.h"
#include "BringIntoViewOffsetsChange.h"
#include "OffsetsChange.h"
#include "OffsetsChangeWithAdditionalVelocity.h"
#include "ZoomFactorChange.h"
#include "ZoomFactorChangeWithAdditionalVelocity.h"
#include "ScrollPresenter.g.h"
#include "ScrollPresenter.properties.h"

Go to the source code of this file.

Classes

class ScrollPresenter
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenter.idl File Reference

  • File List
  • File Members
  • ScrollPresenter
Namespaces | Enumerations

ScrollPresenter.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | ScrollingAnimationMode { Disabled = 0, Enabled = 1, Auto = 1 }
enum | ScrollingChainMode { Auto = 1, Always = 1, Never = 2 }
enum | ScrollingContentOrientation { Vertical = 0, Horizontal = 1, None = 0, Both = 3 }
enum ScrollingInputKinds {
None = 0, Touch = 1, Pen = 2, MouseWheel = 4,
Keyboard = 8, Gamepad = 16, All = 255
}
enum | ScrollingInteractionState { Idle = 0, Interaction = 1, Inertia = 2, Animation = 3 }
enum | ScrollingRailMode { Enabled = 1, Disabled = 0 }
enum | ScrollingScrollMode { Enabled = 1, Disabled = 0, Auto = 1 }
enum | ScrollingSnapPointsMode { Default = 0, Ignore = 1 }
enum | ScrollingZoomMode { Enabled = 1, Disabled = 0 }
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterAnchoring.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter
Variables

ScrollPresenterAnchoring.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollPresenter.h"
#include "DoubleUtil.h"
#include "ScrollPresenterTestHooks.h"

Go to the source code of this file.

Variables

const double c_edgeDetectionTolerance = 0.1

Variable Documentation

const double c_edgeDetectionTolerance = 0.1

Definition at line 14 of file ScrollPresenterAnchoring.cpp.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterAutomationPeer.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollPresenterAutomationPeer.h"
#include "ResourceAccessor.h"
#include <UIAutomationCore.h>
#include <UIAutomationCoreApi.h>
#include "ScrollPresenterAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterAutomationPeer.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollPresenterAutomationPeer.h File Reference

#include "ScrollPresenter.h"
#include "ScrollPresenterAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ScrollPresenterAutomationPeer
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterAutomationPeer.idl File Reference

  • File List
  • File Members
  • ScrollPresenter
Namespaces | Variables

ScrollPresenterAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | ScrollPresenterAutomationPeer
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterPrimitives.idl File Reference

  • File List
  • File Members
  • ScrollPresenter
Namespaces | Enumerations

ScrollPresenterPrimitives.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XCP_NAMESPACE

Enumerations

enum | ScrollSnapPointsAlignment { Near = 0, Center = 1, Far = 2 }
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterPrivate.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterPrivate.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenter.h"
#include "DoubleUtil.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooks.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterTestHooksFactory.h"
#include "Vector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooks.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollPresenterTestHooks.h File Reference

#include "ScrollPresenter.h"
#include "ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h"
#include "ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h"
#include "ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h"
#include "ScrollPresenterTestHooks.g.h"
#include "RegUtil.h"

Go to the source code of this file.

Classes

class ScrollPresenterTestHooks
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooks.idl File Reference

  • File List
  • File Members
  • ScrollPresenter
Namespaces | Enumerations

ScrollPresenterTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_PRIVATE_CONTROLS_NAMESPACE

Enumerations

enum | ScrollPresenterViewChangeResult { Completed = 0, Interrupted = 1, Ignored = 2 }
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h File Reference

#include "ScrollPresenterTestHooksAnchorEvaluatedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollPresenterTestHooksAnchorEvaluatedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h File Reference

#include "ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterTestHooksFactory.h"
#include "ScrollPresenterTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksFactory.h File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksFactory.h File Reference

#include "ScrollPresenterTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h File Reference

#include "ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTrace.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes | Defines | Functions

ScrollPresenterTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | ScrollPresenterTrace

Defines

#define | SCROLLPRESENTER_TRACE_INFO(sender, message,...)
#define | SCROLLPRESENTER_TRACE_INFO_DBG(sender, message,...)
#define | SCROLLPRESENTER_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) ScrollPresenterTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | SCROLLPRESENTER_TRACE_PERF(info)
#define | SCROLLPRESENTER_TRACE_PERF_DBG(info)
#define | SCROLLPRESENTER_TRACE_VERBOSE(sender, message,...)
#define | SCROLLPRESENTER_TRACE_VERBOSE_DBG(sender, message,...)
#define | SCROLLPRESENTER_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) ScrollPresenterTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsScrollPresenterPerfTracingEnabled ()
bool | IsScrollPresenterTracingEnabled ()
bool | IsScrollPresenterVerboseTracingEnabled ()

Define Documentation

#define SCROLLPRESENTER_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsScrollPresenterTracingEnabled()) \
{ \
    SCROLLPRESENTER_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ScrollPresenterTrace::s_IsDebugOutputEnabled || ScrollPresenterTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SCROLLPRESENTER_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file ScrollPresenterTrace.h.

#define SCROLLPRESENTER_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file ScrollPresenterTrace.h.

#define SCROLLPRESENTER_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ScrollPresenterTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file ScrollPresenterTrace.h.

#define SCROLLPRESENTER_TRACE_PERF ( info )
Value:
if (IsScrollPresenterPerfTracingEnabled()) \
{ \
    ScrollPresenterTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file ScrollPresenterTrace.h.

#define SCROLLPRESENTER_TRACE_PERF_DBG ( info )

Definition at line 71 of file ScrollPresenterTrace.h.

#define SCROLLPRESENTER_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsScrollPresenterVerboseTracingEnabled()) \
{ \
    SCROLLPRESENTER_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ScrollPresenterTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SCROLLPRESENTER_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file ScrollPresenterTrace.h.

#define SCROLLPRESENTER_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file ScrollPresenterTrace.h.

#define SCROLLPRESENTER_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ScrollPresenterTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file ScrollPresenterTrace.h.

Function Documentation

bool IsScrollPresenterPerfTracingEnabled ( ) [inline]

Definition at line 25 of file ScrollPresenterTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_SCROLLPRESENTER || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsScrollPresenterTracingEnabled ( ) [inline]

Definition at line 11 of file ScrollPresenterTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SCROLLPRESENTER || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsScrollPresenterVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file ScrollPresenterTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SCROLLPRESENTER || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTypeLogging.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter
Namespaces | Functions

ScrollPresenterTypeLogging.cpp File Reference

#include "pch.h"
#include "ScrollPresenterTypeLogging.h"
#include "Utils.h"

Go to the source code of this file.

Namespaces

namespace | TypeLogging

Functions

winrt::hstring | AnimationModeToString (const winrt::ScrollingAnimationMode &animationMode)
winrt::hstring | ChainingModeToString (const winrt::ScrollingChainMode &chainingMode)
winrt::hstring | InputKindToString (const winrt::ScrollingInputKinds &inputKind)
winrt::hstring | InteractionTrackerAsyncOperationTriggerToString (InteractionTrackerAsyncOperationTrigger operationTrigger)
winrt::hstring | InteractionTrackerAsyncOperationTypeToString (InteractionTrackerAsyncOperationType operationType)
winrt::hstring | RailingModeToString (const winrt::ScrollingRailMode &railingMode)
winrt::hstring | ScrollAmountToString (const winrt::ScrollAmount &scrollAmount)
winrt::hstring | ScrollBarVisibilityToString (const winrt::ScrollingScrollBarVisibility &scrollBarVisibility)
winrt::hstring | ScrollModeToString (const winrt::ScrollingScrollMode &scrollMode)
winrt::hstring | ScrollOptionsToString (const winrt::ScrollingScrollOptions &options)
winrt::hstring | ScrollPresenterViewChangeResultToString (ScrollPresenterViewChangeResult result)
winrt::hstring | ScrollPresenterViewKindToString (ScrollPresenterViewKind viewKind)
winrt::hstring | SnapPointsModeToString (const winrt::ScrollingSnapPointsMode &snapPointsMode)
winrt::hstring | ZoomModeToString (const winrt::ScrollingZoomMode &zoomMode)
winrt::hstring | ZoomOptionsToString (const winrt::ScrollingZoomOptions &options)
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTypeLogging.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Namespaces | Functions

ScrollPresenterTypeLogging.h File Reference

#include "ViewChange.h"
#include "InteractionTrackerAsyncOperation.h"
#include "ScrollPresenter.h"

Go to the source code of this file.

Namespaces

namespace | TypeLogging

Functions

winrt::hstring | AnimationModeToString (const winrt::ScrollingAnimationMode &animationMode)
winrt::hstring | ChainingModeToString (const winrt::ScrollingChainMode &chainingMode)
winrt::hstring | InputKindToString (const winrt::ScrollingInputKinds &inputKind)
winrt::hstring | InteractionTrackerAsyncOperationTriggerToString (InteractionTrackerAsyncOperationTrigger operationTrigger)
winrt::hstring | InteractionTrackerAsyncOperationTypeToString (InteractionTrackerAsyncOperationType operationType)
winrt::hstring | RailingModeToString (const winrt::ScrollingRailMode &railingMode)
winrt::hstring | ScrollAmountToString (const winrt::ScrollAmount &scrollAmount)
winrt::hstring | ScrollBarVisibilityToString (const winrt::ScrollingScrollBarVisibility &scrollBarVisibility)
winrt::hstring | ScrollEventTypeToString (const winrt::ScrollEventType &scrollEventType)
winrt::hstring | ScrollingIndicatorModeToString (const winrt::ScrollingIndicatorMode &indicatorMode)
winrt::hstring | ScrollModeToString (const winrt::ScrollingScrollMode &scrollMode)
winrt::hstring | ScrollOptionsToString (const winrt::ScrollingScrollOptions &options)
winrt::hstring | ScrollPresenterViewChangeResultToString (ScrollPresenterViewChangeResult result)
winrt::hstring | ScrollPresenterViewKindToString (ScrollPresenterViewKind viewKind)
winrt::hstring | SnapPointsModeToString (const winrt::ScrollingSnapPointsMode &snapPointsMode)
winrt::hstring | ZoomModeToString (const winrt::ScrollingZoomMode &zoomMode)
winrt::hstring | ZoomOptionsToString (const winrt::ScrollingZoomOptions &options)
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollSnapPoint.h File Reference

  • File List
  • File Members
  • ScrollPresenter

ScrollSnapPoint.h File Reference

#include "SnapPoint.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/SnapPoint.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

SnapPoint.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "SnapPoint.h"
#include "ScrollSnapPoint.properties.cpp"
#include "RepeatedScrollSnapPoint.properties.cpp"
#include "ZoomSnapPoint.properties.cpp"
#include "RepeatedZoomSnapPoint.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/SnapPoint.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

SnapPoint.h File Reference

#include "SnapPointBase.g.h"
#include "ScrollSnapPointBase.g.h"
#include "ScrollSnapPoint.g.h"
#include "RepeatedScrollSnapPoint.g.h"
#include "ZoomSnapPointBase.g.h"
#include "ZoomSnapPoint.g.h"
#include "RepeatedZoomSnapPoint.g.h"

Go to the source code of this file.

Classes

class | RepeatedScrollSnapPoint
class | RepeatedZoomSnapPoint
class | ScrollSnapPoint
class | ScrollSnapPointBase
class | SnapPointBase
struct | SnapPointSortPredicate
class | ZoomSnapPoint
class | ZoomSnapPointBase
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/SnapPointWrapper.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

SnapPointWrapper.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SnapPointWrapper.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/SnapPointWrapper.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

SnapPointWrapper.h File Reference

#include "SnapPoint.h"

Go to the source code of this file.

Classes

class | SnapPointWrapper< T >
struct | SnapPointWrapperComparator< T >
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ViewChange.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ViewChange.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ViewChange.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ViewChange.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes | Enumerations

ViewChange.h File Reference

#include "ViewChangeBase.h"

Go to the source code of this file.

Classes

class | ViewChange

Enumerations

enum | ScrollPresenterViewKind { Absolute, RelativeToCurrentView }

Enumeration Type Documentation

enum ScrollPresenterViewKind
Enumerator:
Absolute
RelativeToCurrentView

Definition at line 8 of file ViewChange.h.

{
    Absolute,
    RelativeToCurrentView,
#ifdef ScrollPresenterViewKind_RelativeToEndOfInertiaView
    RelativeToEndOfInertiaView,
#endif
};

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ViewChangeBase.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes | Enumerations

ViewChangeBase.h File Reference

Go to the source code of this file.

Classes

class | ViewChangeBase

Enumerations

enum | ScrollPresenterViewChangeResult { Completed = 0, Interrupted = 1, Ignored = 2 }

Enumeration Type Documentation

enum ScrollPresenterViewChangeResult
Enumerator:
Completed
Interrupted
Ignored

Definition at line 6 of file ViewChangeBase.h.

{
    Completed = 0,
    Interrupted = 1,
    Ignored = 2,
};

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomFactorChange.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ZoomFactorChange.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ZoomFactorChange.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomFactorChange.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ZoomFactorChange.h File Reference

#include "ViewChange.h"

Go to the source code of this file.

Classes

class ZoomFactorChange
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.cpp File Reference

  • File List
  • File Members
  • ScrollPresenter

ZoomFactorChangeWithAdditionalVelocity.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ZoomFactorChangeWithAdditionalVelocity.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.h File Reference

  • File List
  • File Members
  • ScrollPresenter
Classes

ZoomFactorChangeWithAdditionalVelocity.h File Reference

#include "ViewChangeBase.h"

Go to the source code of this file.

Classes

class ZoomFactorChangeWithAdditionalVelocity
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomSnapPoint.h File Reference

  • File List
  • File Members
  • ScrollPresenter

ZoomSnapPoint.h File Reference

#include "SnapPoint.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollControllerTests.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • APITests
Classes | Namespaces

ScrollControllerTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterAnchoringTests.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • APITests
Classes | Namespaces

ScrollPresenterAnchoringTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTests
class | ScrollPresenterTests::TestDataSource

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterBringIntoViewTests.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • APITests
Classes | Namespaces

ScrollPresenterBringIntoViewTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterLayoutTests.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • APITests
Classes | Namespaces

ScrollPresenterLayoutTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterSnapPointTests.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • APITests
Classes | Namespaces

ScrollPresenterSnapPointTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterTests.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • APITests
Classes | Namespaces

ScrollPresenterTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterViewChangeTests.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • APITests
Classes | Namespaces

ScrollPresenterViewChangeTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTests
class | ScrollPresenterTests::ScrollPresenterOperation

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTests/ScrollPresenterTestsBase.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • InteractionTests
Classes | Namespaces

ScrollPresenterTestsBase.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTestsBase

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTests/ScrollPresenterTestsWithAutomationPeer.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • InteractionTests
Classes | Namespaces

ScrollPresenterTestsWithAutomationPeer.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTestsWithAutomationPeer

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTests/ScrollPresenterTestsWithInputHelper.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • InteractionTests
Classes | Namespaces

ScrollPresenterTestsWithInputHelper.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterTestsWithInputHelper
struct | ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/BiDirectionalScrollController.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

BiDirectionalScrollController.cs File Reference

Go to the source code of this file.

Classes

class | BiDirectionalScrollController
struct | BiDirectionalScrollController::OperationInfo
class | BiDirectionalScrollController::UniScrollController
class | BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs
class | BiDirectionalScrollControllerScrollingScrollCompletedEventArgs

Namespaces

namespace | MUXControlsTestApp::Utilities
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/CompositionScrollController.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

CompositionScrollController.cs File Reference

Go to the source code of this file.

Classes

class | CompositionScrollController
struct | CompositionScrollController::OperationInfo
class | CompositionScrollControllerOffsetChangeCompletedEventArgs
class | CompositionScrollControllerPanningInfo

Namespaces

namespace | MUXControlsTestApp::Utilities
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterAccessibilityPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterAccessibilityPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterAccessibilityPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterBringIntoViewPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterBringIntoViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterBringIntoViewPage
class | ScrollPresenterBringIntoViewPage::SampleDataSource

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterChainingAndRailingPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterChainingAndRailingPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterChainingAndRailingPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterDynamicPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterDynamicPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterDynamicPage
class | ScrollPresenterDynamicPage::QueuedOperation

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterExpressionAnimationSourcesPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterExpressionAnimationSourcesPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterExpressionAnimationSourcesPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterLeakDetectionPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterLeakDetectionPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterLeakDetectionPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterManipulationModePage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterManipulationModePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterManipulationModePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterMousePanningPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterMousePanningPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterMousePanningPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterRepeaterAnchoringPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterRepeaterAnchoringPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | DataItem
class | ScrollPresenterRepeaterAnchoringPage
class | ScrollPresenterRepeaterAnchoringPage::QueuedOperation
class | ScrollPresenterRepeaterAnchoringPage::SampleDataSource

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterScrollSnapPointsPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterScrollSnapPointsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterScrollSnapPointsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterStackPanelAnchoringPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterStackPanelAnchoringPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterStackPanelAnchoringPage
class | ScrollPresenterStackPanelAnchoringPage::QueuedOperation

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresentersWithSimpleContentsPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresentersWithSimpleContentsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresentersWithSimpleContentsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterTestHooksHelper.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterTestHooksHelper.cs File Reference

Go to the source code of this file.

Classes

class | ExpressionAnimationStatusChange
class | ScrollPresenterTestHooksHelper

Namespaces

namespace | MUXControlsTestApp::Utilities
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterWithBiDirectionalScrollControllerPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterWithCompositionScrollControllersPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterWithCompositionScrollControllersPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterWithCompositionScrollControllersPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterWithSimpleScrollControllersPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterWithSimpleScrollControllersPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | CanvasScrollControllerConsumer
class | ScrollBarController
class | ScrollPresenterWithSimpleScrollControllersPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterZoomSnapPointsPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollPresenter
  • TestUI
Classes | Namespaces

ScrollPresenterZoomSnapPointsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollPresenterZoomSnapPointsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollBarController.cpp File Reference

  • File List
  • File Members
  • ScrollView

ScrollBarController.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollingScrollOptions.h"
#include "ScrollBarController.h"
#include "ScrollView.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollControllerScrollToRequestedEventArgs.h"
#include "ScrollControllerScrollByRequestedEventArgs.h"
#include "ScrollControllerAddScrollVelocityRequestedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollBarController.h File Reference

  • File List
  • File Members
  • ScrollView
Classes

ScrollBarController.h File Reference

#include "common.h"

Go to the source code of this file.

Classes

class ScrollBarController
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollView.cpp File Reference

  • File List
  • File Members
  • ScrollView

ScrollView.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollPresenter.h"
#include "ScrollView.h"
#include "RuntimeProfiler.h"
#include "FocusHelper.h"
#include "RegUtil.h"
#include "ScrollViewTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollView.h File Reference

  • File List
  • File Members
  • ScrollView
Classes | Namespaces

ScrollView.h File Reference

#include "ScrollBarController.h"
#include "ScrollViewTrace.h"
#include "ScrollView.g.h"
#include "ScrollView.properties.h"
#include "ScrollViewBringIntoViewOperation.h"

Go to the source code of this file.

Classes

class | ScrollView

Namespaces

namespace | winrt::Windows::UI::ViewManagement
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollView.idl File Reference

  • File List
  • File Members
  • ScrollView
Namespaces | Enumerations | Functions | Variables

ScrollView.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | ScrollingScrollBarVisibility { Auto = 1, Visible = 1, Hidden = 2 }

Functions

Int32 | AddScrollVelocity (Windows.Foundation.Numerics.Vector2 offsetsVelocity, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > inertiaDecayRate)
Int32 | AddZoomVelocity (Single zoomFactorVelocity, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint, Windows.Foundation.IReference< Single > inertiaDecayRate)
void | RegisterAnchorCandidate (Microsoft.UI.Xaml.UIElement element)
Int32 | ScrollBy (Double horizontalOffsetDelta, Double verticalOffsetDelta)
Int32 | ScrollBy (Double horizontalOffsetDelta, Double verticalOffsetDelta, ScrollingScrollOptions options)
Int32 | ScrollTo (Double horizontalOffset, Double verticalOffset, ScrollingScrollOptions options)
Int32 | ScrollTo (Double horizontalOffset, Double verticalOffset)
void | UnregisterAnchorCandidate (Microsoft.UI.Xaml.UIElement element)
Int32 | ZoomBy (Single zoomFactorDelta, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint)
Int32 | ZoomBy (Single zoomFactorDelta, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint, ScrollingZoomOptions options)
Int32 | ZoomTo (Single zoomFactor, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint)
Int32 | ZoomTo (Single zoomFactor, Windows.Foundation.IReference< Windows.Foundation.Numerics.Vector2 > centerPoint, ScrollingZoomOptions options)

Variables

event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingAnchorRequestedEventArgs > 		AnchorRequested
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingBringingIntoViewEventArgs > 		BringingIntoView
event Windows Foundation
TypedEventHandler< ScrollView,
Object > 		ExtentChanged
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingScrollAnimationStartingEventArgs > 		ScrollAnimationStarting
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingScrollCompletedEventArgs > 		ScrollCompleted
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingScrollStartingEventArgs > 		ScrollStarting
unsealed runtimeclass | ScrollView
event Windows Foundation
TypedEventHandler< ScrollView,
Object > 		StateChanged
event Windows Foundation
TypedEventHandler< ScrollView,
Object > 		ViewChanged
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingZoomAnimationStartingEventArgs > 		ZoomAnimationStarting
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingZoomCompletedEventArgs > 		ZoomCompleted
event Windows Foundation
TypedEventHandler< ScrollView,
ScrollingZoomStartingEventArgs > 		ZoomStarting
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewBringIntoViewOperation.cpp File Reference

  • File List
  • File Members
  • ScrollView

ScrollViewBringIntoViewOperation.cpp File Reference

#include "pch.h"
#include "ScrollViewBringIntoViewOperation.h"
#include "ScrollViewTrace.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewBringIntoViewOperation.h File Reference

  • File List
  • File Members
  • ScrollView
Classes

ScrollViewBringIntoViewOperation.h File Reference

#include "common.h"

Go to the source code of this file.

Classes

class ScrollViewBringIntoViewOperation
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewLightup.cpp File Reference

  • File List
  • File Members
  • ScrollView
Classes

ScrollViewLightup.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TypeLogging.h"
#include "ScrollPresenterTypeLogging.h"
#include "ScrollPresenter.h"
#include "ScrollView.h"
#include "RuntimeProfiler.h"
#include "FocusHelper.h"
#include "RegUtil.h"
#include "ScrollViewTestHooks.h"

Go to the source code of this file.

Classes

struct ScrollView::AutoHideScrollBarsState
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooks.cpp File Reference

  • File List
  • File Members
  • ScrollView

ScrollViewTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollViewTestHooksFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooks.h File Reference

  • File List
  • File Members
  • ScrollView
Classes

ScrollViewTestHooks.h File Reference

#include "ScrollView.h"
#include "ScrollViewTestHooks.g.h"

Go to the source code of this file.

Classes

class ScrollViewTestHooks
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooks.idl File Reference

  • File List
  • File Members
  • ScrollView
Namespaces

ScrollViewTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • ScrollView

ScrollViewTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ScrollViewTestHooksFactory.h"
#include "ScrollViewTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooksFactory.h File Reference

  • File List
  • File Members
  • ScrollView

ScrollViewTestHooksFactory.h File Reference

#include "ScrollViewTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTrace.h File Reference

  • File List
  • File Members
  • ScrollView
Classes | Defines | Functions

ScrollViewTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | ScrollViewTrace

Defines

#define | SCROLLVIEW_TRACE_INFO(sender, message,...)
#define | SCROLLVIEW_TRACE_INFO_DBG(sender, message,...)
#define | SCROLLVIEW_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) ScrollViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | SCROLLVIEW_TRACE_PERF(info)
#define | SCROLLVIEW_TRACE_PERF_DBG(info)
#define | SCROLLVIEW_TRACE_VERBOSE(sender, message,...)
#define | SCROLLVIEW_TRACE_VERBOSE_DBG(sender, message,...)
#define | SCROLLVIEW_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) ScrollViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsScrollViewPerfTracingEnabled ()
bool | IsScrollViewTracingEnabled ()
bool | IsScrollViewVerboseTracingEnabled ()

Define Documentation

#define SCROLLVIEW_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsScrollViewTracingEnabled()) \
{ \
    SCROLLVIEW_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ScrollViewTrace::s_IsDebugOutputEnabled || ScrollViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SCROLLVIEW_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file ScrollViewTrace.h.

#define SCROLLVIEW_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file ScrollViewTrace.h.

#define SCROLLVIEW_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ScrollViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file ScrollViewTrace.h.

#define SCROLLVIEW_TRACE_PERF ( info )
Value:
if (IsScrollViewPerfTracingEnabled()) \
{ \
    ScrollViewTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file ScrollViewTrace.h.

#define SCROLLVIEW_TRACE_PERF_DBG ( info )

Definition at line 71 of file ScrollViewTrace.h.

#define SCROLLVIEW_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsScrollViewVerboseTracingEnabled()) \
{ \
    SCROLLVIEW_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (ScrollViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SCROLLVIEW_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file ScrollViewTrace.h.

#define SCROLLVIEW_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file ScrollViewTrace.h.

#define SCROLLVIEW_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | ScrollViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file ScrollViewTrace.h.

Function Documentation

bool IsScrollViewPerfTracingEnabled ( ) [inline]

Definition at line 25 of file ScrollViewTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_SCROLLVIEW || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsScrollViewTracingEnabled ( ) [inline]

Definition at line 11 of file ScrollViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SCROLLVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsScrollViewVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file ScrollViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SCROLLVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/APITests/ScrollViewTests.cs File Reference

  • File List
  • File Members
  • ScrollView
  • APITests
Classes | Namespaces

ScrollViewTests.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewTests
class | ScrollViewVisualStateCounts

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/InteractionTests/ScrollViewTestsWithInputHelper.cs File Reference

  • File List
  • File Members
  • ScrollView
  • InteractionTests
Classes | Namespaces

ScrollViewTestsWithInputHelper.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewTestsWithInputHelper
class | ScrollViewTestsWithInputHelper::LoggingHelper

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewBlankPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewBlankPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewBlankPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewBringIntoViewPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewBringIntoViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewBringIntoViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewDynamicPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewDynamicPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewDynamicPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewKeyboardAndGamepadNavigationPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewsWithSimpleContentsPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewsWithSimpleContentsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewsWithSimpleContentsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewTestHooksHelper.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewTestHooksHelper.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewTestHooksHelper

Namespaces

namespace | MUXControlsTestApp::Utilities
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewWithRTLFlowDirectionPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewWithRTLFlowDirectionPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewWithRTLFlowDirectionPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewWithScrollControllersPage.xaml.cs File Reference

  • File List
  • File Members
  • ScrollView
  • TestUI
Classes | Namespaces

ScrollViewWithScrollControllersPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | ScrollViewWithScrollControllersPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBar.cpp File Reference

  • File List
  • File Members
  • SelectorBar

SelectorBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBar.h"
#include "SelectorBarItem.h"
#include "SelectorBarTestHooks.h"
#include "SelectorBarSelectionChangedEventArgs.h"
#include "RuntimeProfiler.h"
#include "SharedHelpers.h"
#include "Vector.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBar.h File Reference

  • File List
  • File Members
  • SelectorBar
Classes

SelectorBar.h File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarTrace.h"
#include "SelectorBar.g.h"
#include "SelectorBar.properties.h"

Go to the source code of this file.

Classes

class SelectorBar
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBar.idl File Reference

  • File List
  • File Members
  • SelectorBar
Namespaces | Variables

SelectorBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE

Variables

unsealed runtimeclass | SelectorBarItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarItem.cpp File Reference

  • File List
  • File Members
  • SelectorBar

SelectorBarItem.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarItem.h"
#include "SelectorBarItemAutomationPeer.h"
#include "SelectorBarTrace.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarItem.h File Reference

  • File List
  • File Members
  • SelectorBar
Classes

SelectorBarItem.h File Reference

#include "pch.h"
#include "common.h"
#include "ItemContainer.h"
#include "SelectorBarItem.g.h"
#include "SelectorBarItem.properties.h"

Go to the source code of this file.

Classes

class SelectorBarItem
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarItemAutomationPeer.cpp File Reference

  • File List
  • File Members
  • SelectorBar

SelectorBarItemAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "SelectorBarItem.h"
#include "SelectorBarItemAutomationPeer.h"
#include "SelectorBarItemAutomationPeer.properties.cpp"
#include "../ResourceHelper/ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarItemAutomationPeer.h File Reference

  • File List
  • File Members
  • SelectorBar
Classes

SelectorBarItemAutomationPeer.h File Reference

#include "SelectorBarItem.h"
#include "ItemContainerAutomationPeer.h"
#include "SelectorBarItemAutomationPeer.g.h"

Go to the source code of this file.

Classes

class SelectorBarItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarSelectionChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • SelectorBar

SelectorBarSelectionChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarSelectionChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarSelectionChangedEventArgs.h File Reference

  • File List
  • File Members
  • SelectorBar
Classes

SelectorBarSelectionChangedEventArgs.h File Reference

#include "SelectorBarSelectionChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class SelectorBarSelectionChangedEventArgs
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooks.cpp File Reference

  • File List
  • File Members
  • SelectorBar

SelectorBarTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarTestHooksFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooks.h File Reference

  • File List
  • File Members
  • SelectorBar
Classes

SelectorBarTestHooks.h File Reference

#include "SelectorBar.h"
#include "SelectorBarTestHooks.g.h"

Go to the source code of this file.

Classes

class SelectorBarTestHooks
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooks.idl File Reference

  • File List
  • File Members
  • SelectorBar
Namespaces

SelectorBarTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • SelectorBar

SelectorBarTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SelectorBarTestHooksFactory.h"
#include "SelectorBarTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooksFactory.h File Reference

  • File List
  • File Members
  • SelectorBar

SelectorBarTestHooksFactory.h File Reference

#include "SelectorBarTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTrace.h File Reference

  • File List
  • File Members
  • SelectorBar
Classes | Defines | Functions

SelectorBarTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | SelectorBarTrace

Defines

#define | SELECTORBAR_TRACE_INFO(sender, message,...)
#define | SELECTORBAR_TRACE_INFO_DBG(sender, message,...)
#define | SELECTORBAR_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) SelectorBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | SELECTORBAR_TRACE_PERF(info)
#define | SELECTORBAR_TRACE_PERF_DBG(info)
#define | SELECTORBAR_TRACE_VERBOSE(sender, message,...)
#define | SELECTORBAR_TRACE_VERBOSE_DBG(sender, message,...)
#define | SELECTORBAR_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) SelectorBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsSelectorBarPerfTracingEnabled ()
bool | IsSelectorBarTracingEnabled ()
bool | IsSelectorBarVerboseTracingEnabled ()

Define Documentation

#define SELECTORBAR_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsSelectorBarTracingEnabled()) \
{ \
    SELECTORBAR_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (SelectorBarTrace::s_IsDebugOutputEnabled || SelectorBarTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SELECTORBAR_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file SelectorBarTrace.h.

#define SELECTORBAR_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file SelectorBarTrace.h.

#define SELECTORBAR_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | SelectorBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file SelectorBarTrace.h.

#define SELECTORBAR_TRACE_PERF ( info )
Value:
if (IsSelectorBarPerfTracingEnabled()) \
{ \
    SelectorBarTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file SelectorBarTrace.h.

#define SELECTORBAR_TRACE_PERF_DBG ( info )

Definition at line 71 of file SelectorBarTrace.h.

#define SELECTORBAR_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsSelectorBarVerboseTracingEnabled()) \
{ \
    SELECTORBAR_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (SelectorBarTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SELECTORBAR_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file SelectorBarTrace.h.

#define SELECTORBAR_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file SelectorBarTrace.h.

#define SELECTORBAR_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | SelectorBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file SelectorBarTrace.h.

Function Documentation

bool IsSelectorBarPerfTracingEnabled ( ) [inline]

Definition at line 25 of file SelectorBarTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_SELECTORBAR || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsSelectorBarTracingEnabled ( ) [inline]

Definition at line 11 of file SelectorBarTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SELECTORBAR || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsSelectorBarVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file SelectorBarTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SELECTORBAR || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/APITests/SelectorBarTests.cs File Reference

  • File List
  • File Members
  • SelectorBar
  • APITests
Classes | Namespaces

SelectorBarTests.cs File Reference

Go to the source code of this file.

Classes

class | SelectorBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/InteractionTests/SelectorBarTests.cs File Reference

  • File List
  • File Members
  • SelectorBar
  • InteractionTests
Classes | Namespaces

SelectorBarTests.cs File Reference

Go to the source code of this file.

Classes

class | SelectorBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/TestUI/SelectorBarPage.xaml.cs File Reference

  • File List
  • File Members
  • SelectorBar
  • TestUI
Classes | Namespaces

SelectorBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SelectorBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/TestUI/SelectorBarSamplePage.xaml.cs File Reference

  • File List
  • File Members
  • SelectorBar
  • TestUI
Classes | Namespaces

SelectorBarSamplePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SelectorBarSamplePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/TestUI/SelectorBarSummaryPage.xaml.cs File Reference

  • File List
  • File Members
  • SelectorBar
  • TestUI
Classes | Namespaces

SelectorBarSummaryPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SelectorBarSummaryPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButton.cpp File Reference

  • File List
  • File Members
  • SplitButton

SplitButton.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SplitButton.h"
#include "SplitButtonAutomationPeer.h"
#include "SplitButtonTestHelper.h"
#include "SplitButtonEventArgs.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButton.h File Reference

  • File List
  • File Members
  • SplitButton
Classes

SplitButton.h File Reference

#include "pch.h"
#include "common.h"
#include "SplitButton.g.h"
#include "SplitButton.properties.h"

Go to the source code of this file.

Classes

class SplitButton
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButton.idl File Reference

  • File List
  • File Members
  • SplitButton
Namespaces

SplitButton.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonAutomationPeer.cpp File Reference

  • File List
  • File Members
  • SplitButton

SplitButtonAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "SplitButton.h"
#include "SplitButtonAutomationPeer.h"
#include "Utils.h"
#include "SplitButtonAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonAutomationPeer.h File Reference

  • File List
  • File Members
  • SplitButton
Classes

SplitButtonAutomationPeer.h File Reference

#include "SplitButton.h"
#include "SplitButtonAutomationPeer.g.h"

Go to the source code of this file.

Classes

class SplitButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonAutomationPeer.idl File Reference

  • File List
  • File Members
  • SplitButton
Namespaces | Variables

SplitButtonAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | SplitButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonEventArgs.h File Reference

  • File List
  • File Members
  • SplitButton
Classes

SplitButtonEventArgs.h File Reference

#include "SplitButtonClickEventArgs.g.h"
#include "ToggleSplitButtonIsCheckedChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class | SplitButtonClickEventArgs
class | ToggleSplitButtonIsCheckedChangedEventArgs
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestApi.cpp File Reference

  • File List
  • File Members
  • SplitButton

SplitButtonTestApi.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SplitButtonTestHelper.h"
#include "SplitButtonTestApi.h"
#include "SplitButtonTestApi.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestApi.h File Reference

  • File List
  • File Members
  • SplitButton
Classes

SplitButtonTestApi.h File Reference

#include "SplitButtonTestApi.g.h"

Go to the source code of this file.

Classes

class SplitButtonTestApi
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestApi.idl File Reference

  • File List
  • File Members
  • SplitButton
Namespaces

SplitButtonTestApi.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestApiFactory.cpp File Reference

  • File List
  • File Members
  • SplitButton

SplitButtonTestApiFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DisplayRegionHelper.h"
#include "DisplayRegionHelperTestApiFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestHelper.cpp File Reference

  • File List
  • File Members
  • SplitButton

SplitButtonTestHelper.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SharedHelpers.h"
#include "SplitButtonTestHelper.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestHelper.h File Reference

  • File List
  • File Members
  • SplitButton
Classes

SplitButtonTestHelper.h File Reference

Go to the source code of this file.

Classes

class SplitButtonTestHelper
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ToggleSplitButton.cpp File Reference

  • File List
  • File Members
  • SplitButton

ToggleSplitButton.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ToggleSplitButton.h"
#include "SplitButton.h"
#include "SplitButtonEventArgs.h"
#include "ToggleSplitButtonAutomationPeer.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ToggleSplitButton.h File Reference

  • File List
  • File Members
  • SplitButton
Classes

ToggleSplitButton.h File Reference

#include "pch.h"
#include "common.h"
#include "ToggleSplitButton.g.h"
#include "SplitButton.h"
#include "ToggleSplitButton.properties.h"

Go to the source code of this file.

Classes

class ToggleSplitButton
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ToggleSplitButtonAutomationPeer.cpp File Reference

  • File List
  • File Members
  • SplitButton

ToggleSplitButtonAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "ToggleSplitButton.h"
#include "ToggleSplitButtonAutomationPeer.h"
#include "Utils.h"
#include "ToggleSplitButtonAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ToggleSplitButtonAutomationPeer.h File Reference

  • File List
  • File Members
  • SplitButton
Classes

ToggleSplitButtonAutomationPeer.h File Reference

#include "ToggleSplitButton.h"
#include "ToggleSplitButtonAutomationPeer.g.h"

Go to the source code of this file.

Classes

class ToggleSplitButtonAutomationPeer
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/APITests/SplitButtonTests.cs File Reference

  • File List
  • File Members
  • SplitButton
  • APITests
Classes | Namespaces

SplitButtonTests.cs File Reference

Go to the source code of this file.

Classes

class | SplitButtonTests
class | TestCommand

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/InteractionTests/SplitButtonTests.cs File Reference

  • File List
  • File Members
  • SplitButton
  • InteractionTests
Classes | Namespaces

SplitButtonTests.cs File Reference

Go to the source code of this file.

Classes

class | SplitButtonTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/TestUI/SplitButtonPage.xaml.cs File Reference

  • File List
  • File Members
  • SplitButton
  • TestUI
Classes | Namespaces

SplitButtonPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MyCommand
class | SplitButtonPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitView/TestUI/SplitViewPage.xaml.cs File Reference

  • File List
  • File Members
  • SplitView
  • TestUI
Classes | Namespaces

SplitViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SplitViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl.cpp File Reference

  • File List
  • File Members
  • SwipeControl

SwipeControl.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeControl.h"
#include "SwipeControlInteractionTrackerOwner.h"
#include "SwipeItems.h"
#include "Vector.h"
#include "SwipeItem.h"
#include "RuntimeProfiler.h"
#include "SwipeTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl.h File Reference

  • File List
  • File Members
  • SwipeControl
Classes | Enumerations

SwipeControl.h File Reference

#include "SwipeControlTrace.h"
#include "SwipeControl.g.h"
#include "SwipeControl.properties.h"

Go to the source code of this file.

Classes

class SwipeControl

Enumerations

enum CreatedContent {
Left, Top, Bottom, Right,
None
}

Enumeration Type Documentation

enum CreatedContent
Enumerator:
Left
Top
Bottom
Right
None

Definition at line 11 of file SwipeControl.h.

{ Left, Top, Bottom, Right, None };

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl.idl File Reference

  • File List
  • File Members
  • SwipeControl
Namespaces | Enumerations | Variables

SwipeControl.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | SwipeBehaviorOnInvoked { Auto = 1, Close = 1, RemainOpen = 2 }
enum | SwipeMode { Reveal = 0, Execute = 1 }

Variables

runtimeclass | SwipeControl
runtimeclass | SwipeItem
runtimeclass | SwipeItemInvokedEventArgs
runtimeclass | SwipeItems
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControlInteractionTrackerOwner.cpp File Reference

  • File List
  • File Members
  • SwipeControl

SwipeControlInteractionTrackerOwner.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeControlInteractionTrackerOwner.h"
#include "SwipeControl.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControlInteractionTrackerOwner.h File Reference

  • File List
  • File Members
  • SwipeControl
Classes

SwipeControlInteractionTrackerOwner.h File Reference

#include "common.h"

Go to the source code of this file.

Classes

class SwipeControlInteractionTrackerOwner
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControlTrace.h File Reference

  • File List
  • File Members
  • SwipeControl
Classes | Defines | Functions

SwipeControlTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | SwipeControlTrace

Defines

#define | SWIPECONTROL_TRACE_INFO(sender, message,...)
#define | SWIPECONTROL_TRACE_INFO_DBG(sender, message,...)
#define | SWIPECONTROL_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) SwipeControlTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | SWIPECONTROL_TRACE_PERF(info)
#define | SWIPECONTROL_TRACE_PERF_DBG(info)
#define | SWIPECONTROL_TRACE_VERBOSE(sender, message,...)
#define | SWIPECONTROL_TRACE_VERBOSE_DBG(sender, message,...)
#define | SWIPECONTROL_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) SwipeControlTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsSwipeControlPerfTracingEnabled ()
bool | IsSwipeControlTracingEnabled ()
bool | IsSwipeControlVerboseTracingEnabled ()

Define Documentation

#define SWIPECONTROL_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsSwipeControlTracingEnabled()) \
{ \
    SWIPECONTROL_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (SwipeControlTrace::s_IsDebugOutputEnabled || SwipeControlTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SWIPECONTROL_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file SwipeControlTrace.h.

#define SWIPECONTROL_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file SwipeControlTrace.h.

#define SWIPECONTROL_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | SwipeControlTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file SwipeControlTrace.h.

#define SWIPECONTROL_TRACE_PERF ( info )
Value:
if (IsSwipeControlPerfTracingEnabled()) \
{ \
    SwipeControlTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file SwipeControlTrace.h.

#define SWIPECONTROL_TRACE_PERF_DBG ( info )

Definition at line 71 of file SwipeControlTrace.h.

#define SWIPECONTROL_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsSwipeControlVerboseTracingEnabled()) \
{ \
    SWIPECONTROL_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (SwipeControlTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    SWIPECONTROL_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file SwipeControlTrace.h.

#define SWIPECONTROL_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file SwipeControlTrace.h.

#define SWIPECONTROL_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | SwipeControlTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file SwipeControlTrace.h.

Function Documentation

bool IsSwipeControlPerfTracingEnabled ( ) [inline]

Definition at line 25 of file SwipeControlTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_SWIPECONTROL || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsSwipeControlTracingEnabled ( ) [inline]

Definition at line 11 of file SwipeControlTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SWIPECONTROL || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsSwipeControlVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file SwipeControlTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_SWIPECONTROL || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItem.cpp File Reference

  • File List
  • File Members
  • SwipeControl

SwipeItem.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeControl.h"
#include "SwipeItems.h"
#include "SwipeItemInvokedEventArgs.h"
#include "SwipeItem.h"
#include "RuntimeProfiler.h"
#include "CommandingHelpers.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItem.h File Reference

  • File List
  • File Members
  • SwipeControl
Classes

SwipeItem.h File Reference

#include "SwipeItem.g.h"
#include "SwipeItem.properties.h"

Go to the source code of this file.

Classes

class SwipeItem
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItemInvokedEventArgs.cpp File Reference

  • File List
  • File Members
  • SwipeControl

SwipeItemInvokedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeItem.h"
#include "SwipeControl.h"
#include "SwipeItemInvokedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItemInvokedEventArgs.h File Reference

  • File List
  • File Members
  • SwipeControl
Classes

SwipeItemInvokedEventArgs.h File Reference

#include "SwipeItemInvokedEventArgs.g.h"

Go to the source code of this file.

Classes

class SwipeItemInvokedEventArgs
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItems.cpp File Reference

  • File List
  • File Members
  • SwipeControl

SwipeItems.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeItems.h"
#include "SwipeItem.h"
#include "SwipeControl.h"
#include "Vector.h"
#include "VectorIterator.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItems.h File Reference

  • File List
  • File Members
  • SwipeControl
Classes

SwipeItems.h File Reference

#include "SwipeItems.g.h"
#include "SwipeItems.properties.h"

Go to the source code of this file.

Classes

class SwipeItems
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooks.cpp File Reference

  • File List
  • File Members
  • SwipeControl

SwipeTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeTestHooksFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooks.h File Reference

  • File List
  • File Members
  • SwipeControl
Classes

SwipeTestHooks.h File Reference

#include "SwipeControl.h"
#include "SwipeTestHooks.g.h"

Go to the source code of this file.

Classes

class SwipeTestHooks
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooks.idl File Reference

  • File List
  • File Members
  • SwipeControl
Namespaces

SwipeTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • SwipeControl

SwipeTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SwipeTestHooksFactory.h"
#include "SwipeTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooksFactory.h File Reference

  • File List
  • File Members
  • SwipeControl

SwipeTestHooksFactory.h File Reference

#include "SwipeTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_APITests/SwipeControlTests.cs File Reference

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_APITests
Classes | Namespaces

SwipeControlTests.cs File Reference

Go to the source code of this file.

Classes

class | SwipeControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_InteractionTests/SwipeControlTests.cs File Reference

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_InteractionTests
Classes | Namespaces

SwipeControlTests.cs File Reference

Go to the source code of this file.

Classes

class | SwipeControlTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/SwipeControlClearPage.xaml.cs File Reference

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI
Classes | Namespaces

SwipeControlClearPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SwipeControlClearPage
Test page used for clearing existing SwipeControls. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/SwipeControlPage.xaml.cs File Reference

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI
Classes | Namespaces

SwipeControlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SwipeControlPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/SwipeControlPage2.xaml.cs File Reference

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI
Classes | Namespaces

SwipeControlPage2.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SwipeControlPage2

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/SwipePage.xaml.cs File Reference

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI
Classes | Namespaces

SwipePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | SwipePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/TestCommand.cs File Reference

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI
Classes | Namespaces

TestCommand.cs File Reference

Go to the source code of this file.

Classes

class | TestCommand

Namespaces

namespace | SwipeControl_TestUI
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabView.cpp File Reference

  • File List
  • File Members
  • TabView
Functions

TabView.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabView.h"
#include "TabViewItem.h"
#include "TabViewAutomationPeer.h"
#include "DoubleUtil.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "SharedHelpers.h"
#include <Vector.h>
#include "velocity.h"
#include <algorithm>
#include <Windowsx.h>
#include <winuser.h>
#include <winrt\Microsoft.UI.Interop.h>

Go to the source code of this file.

Functions

m_dropIndex (dropIndex)
m_tabs ({tab})

Function Documentation

m_dropIndex ( dropIndex )

Definition at line 62 of file TabView.cpp.

{
}

m_tabs ( )

Definition at line 48 of file TabView.cpp.

             { tab })
{
}

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabView.h File Reference

  • File List
  • File Members
  • TabView
Classes | Enumerations | Functions

TabView.h File Reference

#include "pch.h"
#include "common.h"
#include "TabView.g.h"
#include "TabView.properties.h"
#include "TabViewTabCloseRequestedEventArgs.g.h"
#include "TabViewTabDroppedOutsideEventArgs.g.h"
#include "TabViewTabDragStartingEventArgs.g.h"
#include "TabViewTabDragCompletedEventArgs.g.h"
#include "TabViewTabTearOutWindowRequestedEventArgs.g.h"
#include "TabViewTabTearOutRequestedEventArgs.g.h"
#include "TabViewExternalTornOutTabsDroppingEventArgs.g.h"
#include "TabViewExternalTornOutTabsDroppedEventArgs.g.h"
#include "TabViewTrace.h"
#include <wil/resource.h>

Go to the source code of this file.

Classes

class | MutexLockedResource< T >
class | TabView
class | TabViewExternalTornOutTabsDroppedEventArgs
class | TabViewExternalTornOutTabsDroppingEventArgs
class | TabViewTabCloseRequestedEventArgs
class | TabViewTabDragCompletedEventArgs
class | TabViewTabDragStartingEventArgs
class | TabViewTabDroppedOutsideEventArgs
class | TabViewTabTearOutRequestedEventArgs
class | TabViewTabTearOutWindowRequestedEventArgs

Enumerations

enum | TabTearOutDraggingState { Idle, DraggingTabWithinTabView, DraggingTornOutTab }

Functions

template<class T >
winrt::com_array< T > | CopyArray (winrt::com_array< T > const &a)

Enumeration Type Documentation

enum TabTearOutDraggingState
Enumerator:
Idle
DraggingTabWithinTabView
DraggingTornOutTab

Definition at line 202 of file TabView.h.

{
    Idle,
    DraggingTabWithinTabView,
    DraggingTornOutTab,
};

Function Documentation

winrt::com_array<T> CopyArray ( winrt::com_array< T > const & a )

Definition at line 89 of file TabView.h.

{
    return std::move(winrt::com_array<T>{ a.begin(), a.end()});
}

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabView.idl File Reference

  • File List
  • File Members
  • TabView
Namespaces | Enumerations | Functions | Variables

TabView.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE
namespace | MU_XC_NAMESPACE
namespace | MU_XCP_NAMESPACE

Enumerations

enum | TabViewCloseButtonOverlayMode { Auto = 1, OnPointerOver = 1, Always = 1 }
enum | TabViewWidthMode { Equal = 0, SizeToContent = 1, Compact = 1 }

Functions

Microsoft UI Xaml UIElement | ContainerFromIndex (Int32 index)
Microsoft UI Xaml DependencyObject | ContainerFromItem (Object item)

Variables

event Windows Foundation
TypedEventHandler< TabView,
Object > 		AddTabButtonClick
event Windows Foundation
TypedEventHandler< TabViewItem,
TabViewTabCloseRequestedEventArgs > 		CloseRequested
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabCloseRequestedEventArgs > 		TabCloseRequested
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabDragCompletedEventArgs > 		TabDragCompleted
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabDragStartingEventArgs > 		TabDragStarting
event Windows Foundation
TypedEventHandler< TabView,
TabViewTabDroppedOutsideEventArgs > 		TabDroppedOutside
event Windows Foundation
TypedEventHandler< TabView,
Windows.Foundation.Collections.IVectorChangedEventArgs > 		TabItemsChanged
Object | TabItemsSource
Microsoft UI Xaml DataTemplate | TabItemTemplate
event Microsoft UI Xaml
DragEventHandler 		TabStripDragOver
event Microsoft UI Xaml
DragEventHandler 		TabStripDrop
unsealed runtimeclass | TabView
unsealed runtimeclass | TabViewAutomationPeer
unsealed runtimeclass | TabViewItem
unsealed runtimeclass | TabViewItemAutomationPeer
unsealed runtimeclass | TabViewItemTemplateSettings
unsealed runtimeclass | TabViewListView
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewAutomationPeer.cpp File Reference

  • File List
  • File Members
  • TabView

TabViewAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "TabView.h"
#include "TabViewAutomationPeer.h"
#include "Utils.h"
#include "TabViewAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewAutomationPeer.h File Reference

  • File List
  • File Members
  • TabView
Classes

TabViewAutomationPeer.h File Reference

#include "TabView.h"
#include "TabViewAutomationPeer.g.h"

Go to the source code of this file.

Classes

class TabViewAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItem.cpp File Reference

  • File List
  • File Members
  • TabView

TabViewItem.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TabView.h"
#include "TabViewItem.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "XamlControlsResources.h"
#include "SharedHelpers.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItem.h File Reference

  • File List
  • File Members
  • TabView
Classes

TabViewItem.h File Reference

#include "pch.h"
#include "common.h"
#include "TabView.h"
#include "TabViewItem.g.h"
#include "TabViewItem.properties.h"
#include "TabViewItemAutomationPeer.h"
#include "TabViewItemTemplateSettings.h"
#include "TabViewTrace.h"
#include "PointerInfo.h"
#include "DispatcherHelper.h"

Go to the source code of this file.

Classes

class TabViewItem
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItemAutomationPeer.cpp File Reference

  • File List
  • File Members
  • TabView

TabViewItemAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "TabViewItem.h"
#include "TabViewItemAutomationPeer.h"
#include "Utils.h"
#include "SharedHelpers.h"
#include "TabViewItemAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItemAutomationPeer.h File Reference

  • File List
  • File Members
  • TabView
Classes

TabViewItemAutomationPeer.h File Reference

#include "TabViewItem.h"
#include "TabViewItemAutomationPeer.g.h"

Go to the source code of this file.

Classes

class TabViewItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItemTemplateSettings.h File Reference

  • File List
  • File Members
  • TabView
Classes

TabViewItemTemplateSettings.h File Reference

#include "TabViewItemTemplateSettings.g.h"
#include "TabViewItemTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class TabViewItemTemplateSettings
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewListView.cpp File Reference

  • File List
  • File Members
  • TabView

TabViewListView.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "TabViewListView.h"
#include "TabViewItem.h"
#include "TabView.h"
#include "SharedHelpers.h"
#include "TabViewListView.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewListView.h File Reference

  • File List
  • File Members
  • TabView
Classes

TabViewListView.h File Reference

#include "TabViewListView.g.h"

Go to the source code of this file.

Classes

class TabViewListView
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewTrace.h File Reference

  • File List
  • File Members
  • TabView
Classes | Defines | Functions

TabViewTrace.h File Reference

#include "common.h"
#include "MuxcTraceLogging.h"
#include "Utils.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Classes

class | TabViewTrace

Defines

#define | TABVIEW_TRACE_INFO(sender, message,...)
#define | TABVIEW_TRACE_INFO_DBG(sender, message,...)
#define | TABVIEW_TRACE_INFO_ENABLED(includeTraceLogging, sender, message,...) TabViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
#define | TABVIEW_TRACE_PERF(info)
#define | TABVIEW_TRACE_PERF_DBG(info)
#define | TABVIEW_TRACE_VERBOSE(sender, message,...)
#define | TABVIEW_TRACE_VERBOSE_DBG(sender, message,...)
#define | TABVIEW_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message,...) TabViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Functions

bool | IsTabViewPerfTracingEnabled ()
bool | IsTabViewTracingEnabled ()
bool | IsTabViewVerboseTracingEnabled ()

Define Documentation

#define TABVIEW_TRACE_INFO | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsTabViewTracingEnabled()) \
{ \
    TABVIEW_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (TabViewTrace::s_IsDebugOutputEnabled || TabViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    TABVIEW_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 35 of file TabViewTrace.h.

#define TABVIEW_TRACE_INFO_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 69 of file TabViewTrace.h.

#define TABVIEW_TRACE_INFO_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | TabViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 32 of file TabViewTrace.h.

#define TABVIEW_TRACE_PERF ( info )
Value:
if (IsTabViewPerfTracingEnabled()) \
{ \
    TabViewTrace::TracePerfInfo(info); \
} \

Definition at line 58 of file TabViewTrace.h.

#define TABVIEW_TRACE_PERF_DBG ( info )

Definition at line 71 of file TabViewTrace.h.

#define TABVIEW_TRACE_VERBOSE | ( | sender,
 |  | message,
 |  | ...
 | ) |
Value:
if (IsTabViewVerboseTracingEnabled()) \
{ \
    TABVIEW_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \
else if (TabViewTrace::s_IsVerboseDebugOutputEnabled) \
{ \
    TABVIEW_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
} \

Definition at line 48 of file TabViewTrace.h.

#define TABVIEW_TRACE_VERBOSE_DBG | ( | sender,
 |  | message,
 |  | ...
 | ) |

Definition at line 70 of file TabViewTrace.h.

#define TABVIEW_TRACE_VERBOSE_ENABLED | ( | includeTraceLogging,
 |  | sender,
 |  | message,
 |  | ... |
 | ) |  | TabViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \

Definition at line 45 of file TabViewTrace.h.

Function Documentation

bool IsTabViewPerfTracingEnabled ( ) [inline]

Definition at line 25 of file TabViewTrace.h.

{
    return g_IsPerfProviderEnabled &&
        g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_PerfProviderMatchAnyKeyword & KEYWORD_TABVIEW || g_PerfProviderMatchAnyKeyword == 0);
}

bool IsTabViewTracingEnabled ( ) [inline]

Definition at line 11 of file TabViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_TABVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

bool IsTabViewVerboseTracingEnabled ( ) [inline]

Definition at line 18 of file TabViewTrace.h.

{
    return g_IsLoggingProviderEnabled &&
        g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
        (g_LoggingProviderMatchAnyKeyword & KEYWORD_TABVIEW || g_LoggingProviderMatchAnyKeyword == 0);
}

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/APITests/TabViewTests.cs File Reference

  • File List
  • File Members
  • TabView
  • APITests
Classes | Namespaces

TabViewTests.cs File Reference

Go to the source code of this file.

Classes

class | TabViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/InteractionTests/TabViewTearOutTests.cs File Reference

  • File List
  • File Members
  • TabView
  • InteractionTests
Classes | Namespaces

TabViewTearOutTests.cs File Reference

Go to the source code of this file.

Classes

class | TabViewTearOutTestHelpers
class | TabViewTearOutTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/InteractionTests/TabViewTests.cs File Reference

  • File List
  • File Members
  • TabView
  • InteractionTests
Classes | Namespaces

TabViewTests.cs File Reference

Go to the source code of this file.

Classes

class | TabViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/MultipleTabViewPage.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

MultipleTabViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MultipleTabViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewAxeTestPage.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

TabViewAxeTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TabViewAxeTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewPage.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

TabViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TabDataItem
class | TabViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewSizingPage.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

TabViewSizingPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TabViewSizingPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTabClosingBehaviorPage.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

TabViewTabClosingBehaviorPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TabViewTabClosingBehaviorPage
An empty page that can be used on its own or navigated to within a Frame. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTabItemsSourcePage.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

TabViewTabItemsSourcePage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | MyData
class | TabViewTabItemsSourcePage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTearOutWindowWithDataItems.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

TabViewTearOutWindowWithDataItems.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TabViewTearOutWindowWithDataItems

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTearOutWindowWithoutDataItems.xaml.cs File Reference

  • File List
  • File Members
  • TabView
  • TestUI
Classes | Namespaces

TabViewTearOutWindowWithoutDataItems.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TabViewTearOutWindowWithoutDataItems

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTip.cpp File Reference

  • File List
  • File Members
  • TeachingTip

TeachingTip.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTip.h"
#include "RuntimeProfiler.h"
#include "ResourceAccessor.h"
#include "TeachingTipClosingEventArgs.h"
#include "TeachingTipClosedEventArgs.h"
#include "TeachingTipTestHooks.h"
#include "TeachingTipAutomationPeer.h"
#include "../ResourceHelper/Utils.h"
#include <enum_array.h>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTip.h File Reference

  • File List
  • File Members
  • TeachingTip
Classes

TeachingTip.h File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipTemplateSettings.h"
#include "TeachingTip.g.h"
#include "TeachingTip.properties.h"

Go to the source code of this file.

Classes

class TeachingTip
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTip.idl File Reference

  • File List
  • File Members
  • TeachingTip
Namespaces | Enumerations | Variables

TeachingTip.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | TeachingTipCloseReason { CloseButton = 0, LightDismiss, Programmatic = 1 }
enum | TeachingTipHeroContentPlacementMode { Auto = 1, Top = 2, Bottom }
enum TeachingTipPlacementMode {
Auto = 1, Top = 2, Bottom, Left = 1,
Right, TopRight, TopLeft, BottomRight,
BottomLeft, LeftTop, LeftBottom, RightTop,
RightBottom, Center = 1
}
enum | TeachingTipTailVisibility { Auto = 1, Visible = 1 }

Variables

event Windows Foundation
TypedEventHandler< TeachingTip,
Object > 		ActionButtonClick
Microsoft UI Xaml Input ICommand | ActionButtonCommand
Object | ActionButtonCommandParameter
Object | ActionButtonContent
Microsoft UI Xaml Style | ActionButtonStyle
event Windows Foundation
TypedEventHandler< TeachingTip,
Object > 		CloseButtonClick
Microsoft UI Xaml Input ICommand | CloseButtonCommand
Object | CloseButtonCommandParameter
Object | CloseButtonContent
Microsoft UI Xaml Style | CloseButtonStyle
event Windows Foundation
TypedEventHandler< TeachingTip,
TeachingTipClosedEventArgs > 		Closed
event Windows Foundation
TypedEventHandler< TeachingTip,
TeachingTipClosingEventArgs > 		Closing
Microsoft UI Xaml UIElement | HeroContent
TeachingTipHeroContentPlacementMode | HeroContentPlacement
Boolean | IsLightDismissEnabled
Boolean | IsOpen
Microsoft UI Xaml Thickness | PlacementMargin
TeachingTipPlacementMode | PreferredPlacement
Boolean | ShouldConstrainToRootBounds
String | Subtitle
TeachingTipTailVisibility | TailVisibility
Microsoft UI Xaml FrameworkElement | Target
unsealed runtimeclass | TeachingTip
unsealed runtimeclass | TeachingTipTemplateSettings
String | Title
Microsoft UI Xaml Thickness | TopLeftHighlightMargin
Microsoft UI Xaml Thickness | TopRightHighlightMargin
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipAutomationPeer.cpp File Reference

  • File List
  • File Members
  • TeachingTip

TeachingTipAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "TeachingTipAutomationPeer.h"
#include <UIAutomationCore.h>
#include <UIAutomationCoreApi.h>
#include "TeachingTipAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipAutomationPeer.h File Reference

  • File List
  • File Members
  • TeachingTip
Classes

TeachingTipAutomationPeer.h File Reference

#include "TeachingTip.h"
#include "TeachingTipAutomationPeer.g.h"

Go to the source code of this file.

Classes

class TeachingTipAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipAutomationPeer.idl File Reference

  • File List
  • File Members
  • TeachingTip
Namespaces | Variables

TeachingTipAutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | TeachingTipAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipClosedEventArgs.cpp File Reference

  • File List
  • File Members
  • TeachingTip

TeachingTipClosedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipClosedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipClosedEventArgs.h File Reference

  • File List
  • File Members
  • TeachingTip
Classes

TeachingTipClosedEventArgs.h File Reference

#include "TeachingTipClosedEventArgs.g.h"

Go to the source code of this file.

Classes

class TeachingTipClosedEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipClosingEventArgs.cpp File Reference

  • File List
  • File Members
  • TeachingTip

TeachingTipClosingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipClosingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipClosingEventArgs.h File Reference

  • File List
  • File Members
  • TeachingTip
Classes

TeachingTipClosingEventArgs.h File Reference

#include "TeachingTipClosingEventArgs.g.h"

Go to the source code of this file.

Classes

class TeachingTipClosingEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTemplateSettings.cpp File Reference

  • File List
  • File Members
  • TeachingTip

TeachingTipTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTemplateSettings.h File Reference

  • File List
  • File Members
  • TeachingTip
Classes

TeachingTipTemplateSettings.h File Reference

#include "TeachingTipTemplateSettings.g.h"
#include "TeachingTipTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class TeachingTipTemplateSettings
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTestHooks.cpp File Reference

  • File List
  • File Members
  • TeachingTip

TeachingTipTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TeachingTipTestHooks.h"
#include "TeachingTipTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTestHooks.h File Reference

  • File List
  • File Members
  • TeachingTip
Classes

TeachingTipTestHooks.h File Reference

#include "TeachingTip.h"
#include "TeachingTipTestHooks.g.h"

Go to the source code of this file.

Classes

class TeachingTipTestHooks
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTestHooks.idl File Reference

  • File List
  • File Members
  • TeachingTip
Namespaces

TeachingTipTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/APITests/TeachingTipTests.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • APITests
Classes | Namespaces

TeachingTipTests.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/InteractionTests/TeachingTipFocusTestPageElements.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • InteractionTests
Classes | Namespaces

TeachingTipFocusTestPageElements.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipFocusTestPageElements

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/InteractionTests/TeachingTipTestPageElements.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • InteractionTests
Classes | Namespaces

TeachingTipTestPageElements.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipTestPageElements

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/InteractionTests/TeachingTipTests.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • InteractionTests
Classes | Namespaces

TeachingTipTests.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TestUI/TeachingTipCaseBundle.xaml.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • TestUI
Classes | Namespaces

TeachingTipCaseBundle.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipCaseBundle

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TestUI/TeachingTipFocusPage.xaml.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • TestUI
Classes | Namespaces

TeachingTipFocusPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipFocusPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TestUI/TeachingTipInXamlPage.xaml.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • TestUI
Classes | Namespaces

TeachingTipInXamlPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipInXamlPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TestUI/TeachingTipPage.xaml.cs File Reference

  • File List
  • File Members
  • TeachingTip
  • TestUI
Classes | Namespaces | Enumerations

TeachingTipPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TeachingTipPage

Namespaces

namespace | MUXControlsTestApp

Enumerations

enum | TipLocation { VisualTree = 0, Resources = 1 }
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/MicrosoftTelemetry.h File Reference

  • File List
  • File Members
  • Telemetry
Defines

MicrosoftTelemetry.h File Reference

Go to the source code of this file.

Defines

#define | MICROSOFT_EVENTTAG_AGGREGATE 0x00010000
#define | MICROSOFT_EVENTTAG_CORE_DATA 0x00080000
#define | MICROSOFT_EVENTTAG_COSTDEFERRED_LATENCY 0x00040000
#define | MICROSOFT_EVENTTAG_CRITICAL_PERSISTENCE 0x00800000
#define | MICROSOFT_EVENTTAG_DROP_PII 0x02000000
#define | MICROSOFT_EVENTTAG_DROP_PII_EXCEPT_IP 0x00020000
#define | MICROSOFT_EVENTTAG_DROP_USER_IDS 0x00008000
#define | MICROSOFT_EVENTTAG_HASH_PII 0x04000000
#define | MICROSOFT_EVENTTAG_INJECT_XTOKEN 0x00100000
#define | MICROSOFT_EVENTTAG_MARK_PII 0x08000000
#define | MICROSOFT_EVENTTAG_NORMAL_LATENCY 0x00400000
#define | MICROSOFT_EVENTTAG_NORMAL_PERSISTENCE 0x01000000
#define | MICROSOFT_EVENTTAG_REALTIME_LATENCY 0x00200000
#define | MICROSOFT_FIELDTAG_DROP_PII 0x04000000
#define | MICROSOFT_FIELDTAG_HASH_PII 0x08000000
#define | MICROSOFT_KEYWORD_CRITICAL_DATA 0x0000800000000000
#define | MICROSOFT_KEYWORD_MEASURES 0x0000400000000000
#define | MICROSOFT_KEYWORD_RESERVED_44 0x0000100000000000
#define | MICROSOFT_KEYWORD_TELEMETRY 0x0000200000000000
#define | PDT_BrowsingHistory 0x0000000000000002u
#define | PDT_DeviceConnectivityAndConfiguration 0x0000000000000800u
#define | PDT_InkingTypingAndSpeechUtterance 0x0000000000020000u
#define | PDT_ProductAndServicePerformance 0x0000000001000000u
#define | PDT_ProductAndServiceUsage 0x0000000002000000u
#define | PDT_SoftwareSetupAndInventory 0x0000000080000000u
#define | TelemetryPrivacyDataTag(tag) TraceLoggingUInt64((tag), "PartA_PrivTags")

Define Documentation

#define MICROSOFT_EVENTTAG_AGGREGATE 0x00010000

Definition at line 59 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_CORE_DATA 0x00080000

Definition at line 62 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_COSTDEFERRED_LATENCY 0x00040000

Definition at line 61 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_CRITICAL_PERSISTENCE 0x00800000

Definition at line 66 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_DROP_PII 0x02000000

Definition at line 68 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_DROP_PII_EXCEPT_IP 0x00020000

Definition at line 60 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_DROP_USER_IDS 0x00008000

Definition at line 58 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_HASH_PII 0x04000000

Definition at line 69 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_INJECT_XTOKEN 0x00100000

Definition at line 63 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_MARK_PII 0x08000000

Definition at line 70 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_NORMAL_LATENCY 0x00400000

Definition at line 65 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_NORMAL_PERSISTENCE 0x01000000

Definition at line 67 of file MicrosoftTelemetry.h.

#define MICROSOFT_EVENTTAG_REALTIME_LATENCY 0x00200000

Definition at line 64 of file MicrosoftTelemetry.h.

#define MICROSOFT_FIELDTAG_DROP_PII 0x04000000

Definition at line 76 of file MicrosoftTelemetry.h.

#define MICROSOFT_FIELDTAG_HASH_PII 0x08000000

Definition at line 77 of file MicrosoftTelemetry.h.

#define MICROSOFT_KEYWORD_CRITICAL_DATA 0x0000800000000000

Definition at line 49 of file MicrosoftTelemetry.h.

#define MICROSOFT_KEYWORD_MEASURES 0x0000400000000000

Definition at line 50 of file MicrosoftTelemetry.h.

#define MICROSOFT_KEYWORD_RESERVED_44 0x0000100000000000

Definition at line 52 of file MicrosoftTelemetry.h.

#define MICROSOFT_KEYWORD_TELEMETRY 0x0000200000000000

Definition at line 51 of file MicrosoftTelemetry.h.

#define PDT_BrowsingHistory 0x0000000000000002u

Definition at line 38 of file MicrosoftTelemetry.h.

#define PDT_DeviceConnectivityAndConfiguration 0x0000000000000800u

Definition at line 39 of file MicrosoftTelemetry.h.

#define PDT_InkingTypingAndSpeechUtterance 0x0000000000020000u

Definition at line 40 of file MicrosoftTelemetry.h.

#define PDT_ProductAndServicePerformance 0x0000000001000000u

Definition at line 41 of file MicrosoftTelemetry.h.

#define PDT_ProductAndServiceUsage 0x0000000002000000u

Definition at line 42 of file MicrosoftTelemetry.h.

#define PDT_SoftwareSetupAndInventory 0x0000000080000000u

Definition at line 43 of file MicrosoftTelemetry.h.

#define TelemetryPrivacyDataTag ( tag ) TraceLoggingUInt64((tag), "PartA_PrivTags")

Definition at line 37 of file MicrosoftTelemetry.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/MuxcTraceLogging.cpp File Reference

  • File List
  • File Members
  • Telemetry
Functions

MuxcTraceLogging.cpp File Reference

#include <pch.h>
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Functions

void WINAPI | LoggingProviderEnabledCallback (_In_ LPCGUID, _In_ ULONG isEnabled, _In_ UCHAR level, _In_ ULONGLONG matchAnyKeyword, _In_ ULONGLONG, _In_opt_ PEVENT_FILTER_DESCRIPTOR, _In_opt_ PVOID)
void WINAPI | PerfProviderEnabledCallback (_In_ LPCGUID, _In_ ULONG isEnabled, _In_ UCHAR level, _In_ ULONGLONG matchAnyKeyword, _In_ ULONGLONG, _In_opt_ PEVENT_FILTER_DESCRIPTOR, _In_opt_ PVOID)
void | RegisterTraceLogging ()
void WINAPI | TelemetryProviderEnabledCallback (_In_ LPCGUID, _In_ ULONG isEnabled, _In_ UCHAR level, _In_ ULONGLONG matchAnyKeyword, _In_ ULONGLONG, _In_opt_ PEVENT_FILTER_DESCRIPTOR, _In_opt_ PVOID)
TRACELOGGING_DEFINE_PROVIDER (g_hLoggingProvider, DEBUG_PROVIDER_NAME,(0xafe0ae07, 0x66a7, 0x55bb, 0x12, 0xff, 0x01, 0x11, 0x6b, 0xc0, 0x8c, 0x1a))
TRACELOGGING_DEFINE_PROVIDER (g_hTelemetryProvider, TELEMETRY_PROVIDER_NAME,(0x21e0ae07, 0x56a7, 0x55b5, 0x12, 0xf9, 0x01, 0x1e, 0x6b, 0xc0, 0x8c, 0xca))
TRACELOGGING_DEFINE_PROVIDER (g_hPerfProvider, PERF_PROVIDER_NAME,(0xf55f7011, 0x988d, 0x4674, 0xa7, 0x24, 0xe0, 0x1b, 0x39, 0xdc, 0x7a, 0xf6))
void | UnRegisterTraceLogging ()

Function Documentation

void WINAPI LoggingProviderEnabledCallback | ( | _In_ | LPCGUID,
 |  | _In_ ULONG | isEnabled,
 |  | _In_ UCHAR | level,
 |  | _In_ ULONGLONG | matchAnyKeyword,
 |  | _In_ | ULONGLONG,
 |  | _In_opt_ | PEVENT_FILTER_DESCRIPTOR,
 |  | _In_opt_ | PVOID
 | ) |  |

Definition at line 71 of file MuxcTraceLogging.cpp.

{
    g_IsLoggingProviderEnabled = !!isEnabled;
    g_LoggingProviderLevel = level;
    g_LoggingProviderMatchAnyKeyword = matchAnyKeyword;
}

void WINAPI PerfProviderEnabledCallback | ( | _In_ | LPCGUID,
 |  | _In_ ULONG | isEnabled,
 |  | _In_ UCHAR | level,
 |  | _In_ ULONGLONG | matchAnyKeyword,
 |  | _In_ | ULONGLONG,
 |  | _In_opt_ | PEVENT_FILTER_DESCRIPTOR,
 |  | _In_opt_ | PVOID
 | ) |  |

Definition at line 45 of file MuxcTraceLogging.cpp.

{
    g_IsPerfProviderEnabled = !!isEnabled;
    g_PerfProviderLevel = level;
    g_PerfProviderMatchAnyKeyword = matchAnyKeyword;
}

void RegisterTraceLogging ( )

Definition at line 85 of file MuxcTraceLogging.cpp.

{
    HRESULT hr = S_OK;

    TraceLoggingRegisterEx(g_hTelemetryProvider, TelemetryProviderEnabledCallback, nullptr);
    //Generate the ActivityId used to track the session
    hr = CoCreateGuid(&g_TelemetryProviderActivityId);
    if (FAILED(hr))
    {
        TraceLoggingWriteActivity(
            g_hTelemetryProvider,
            "CreateGuidError",
            nullptr,
            nullptr,
            TraceLoggingHResult(hr),
            TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
            TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));

        g_TelemetryProviderActivityId = GUID_NULL;
    };

    TraceLoggingRegisterEx(g_hPerfProvider, PerfProviderEnabledCallback, nullptr);
    //Generate the ActivityId used to track the session
    hr = CoCreateGuid(&g_PerfProviderActivityId);
    if (FAILED(hr))
    {
        TraceLoggingWriteActivity(
            g_hPerfProvider,
            "CreateGuidError",
            nullptr,
            nullptr,
            TraceLoggingHResult(hr));

        g_PerfProviderActivityId = GUID_NULL;
    };

    TraceLoggingRegisterEx(g_hLoggingProvider, LoggingProviderEnabledCallback, nullptr);
    //Generate the ActivityId used to track the session
    hr = CoCreateGuid(&g_LoggingProviderActivityId);
    if (FAILED(hr))
    {
        TraceLoggingWriteActivity(
            g_hLoggingProvider,
            "CreateGuidError",
            nullptr,
            nullptr,
            TraceLoggingHResult(hr));

        g_LoggingProviderActivityId = GUID_NULL;
    };
}

void WINAPI TelemetryProviderEnabledCallback | ( | _In_ | LPCGUID,
 |  | _In_ ULONG | isEnabled,
 |  | _In_ UCHAR | level,
 |  | _In_ ULONGLONG | matchAnyKeyword,
 |  | _In_ | ULONGLONG,
 |  | _In_opt_ | PEVENT_FILTER_DESCRIPTOR,
 |  | _In_opt_ | PVOID
 | ) |  |

Definition at line 19 of file MuxcTraceLogging.cpp.

{
    g_IsTelemetryProviderEnabled = !!isEnabled;
    g_TelemetryProviderLevel = level;
    g_TelemetryProviderMatchAnyKeyword = matchAnyKeyword;
}

TRACELOGGING_DEFINE_PROVIDER | ( | g_hLoggingProvider | ,
 |  | DEBUG_PROVIDER_NAME | ,
 |  | (0xafe0ae07, 0x66a7, 0x55bb, 0x12, 0xff, 0x01, 0x11, 0x6b, 0xc0, 0x8c, 0x1a) |
 | ) |  |
TRACELOGGING_DEFINE_PROVIDER | ( | g_hTelemetryProvider | ,
 |  | TELEMETRY_PROVIDER_NAME | ,
 |  | (0x21e0ae07, 0x56a7, 0x55b5, 0x12, 0xf9, 0x01, 0x1e, 0x6b, 0xc0, 0x8c, 0xca) |
 | ) |  |
TRACELOGGING_DEFINE_PROVIDER | ( | g_hPerfProvider | ,
 |  | PERF_PROVIDER_NAME | ,
 |  | (0xf55f7011, 0x988d, 0x4674, 0xa7, 0x24, 0xe0, 0x1b, 0x39, 0xdc, 0x7a, 0xf6) |
 | ) |  |
void UnRegisterTraceLogging ( )

Definition at line 137 of file MuxcTraceLogging.cpp.

{
    TraceLoggingUnregister(g_hTelemetryProvider);

    TraceLoggingUnregister(g_hPerfProvider);
    TraceLoggingUnregister(g_hLoggingProvider);
}

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/MuxcTraceLogging.h File Reference

  • File List
  • File Members
  • Telemetry
Classes | Defines | Functions | Variables

MuxcTraceLogging.h File Reference

#include "WinEventLogLevels.h"
#include <TraceLoggingProvider.h>
#include <MicrosoftTelemetry.h>
#include <wil/TraceLogging.h>

Go to the source code of this file.

Classes

struct | final
struct | PerfXamlEvent_RAII
struct | SimpleXamlStartStopEvent_RAII

Defines

#define | DEBUG_PROVIDER_NAME "Microsoft.UI.Xaml.Controls.Debug"
#define | KEYWORD_ANNOTATEDSCROLLBAR 0x0000000000000800
#define | KEYWORD_COMMANDBARFLYOUT 0x0000000000000020
#define | KEYWORD_INKTOOLBAR 0x0000000000004000
#define | KEYWORD_ITEMCONTAINER 0x0000000000000200
#define | KEYWORD_ITEMSREPEATER 0x0000000000000001
#define | KEYWORD_ITEMSVIEW 0x0000000000000100
#define | KEYWORD_LINEDFLOWLAYOUT 0x0000000000000400
#define | KEYWORD_NAVIGATIONVIEW 0x0000000000002000
#define | KEYWORD_PTR 0x0000000000000004
#define | KEYWORD_SCROLLPRESENTER 0x0000000000000002
#define | KEYWORD_SCROLLVIEW 0x0000000000000008
#define | KEYWORD_SELECTORBAR 0x0000000000001000
#define | KEYWORD_SWIPECONTROL 0x0000000000000010
#define | KEYWORD_TABVIEW 0x0000000000000080
#define | KEYWORD_WEBVIEW2 0x0000000000000040
#define | METH_NAME StringUtil::Utf8ToUtf16(__FUNCTION__).c_str()
#define | PERF_PROVIDER_NAME "Microsoft.UI.Xaml.Controls.Perf"
#define | TELEMETRY_PROVIDER_NAME "Microsoft.UI.Xaml.Controls"
#define | TRACE_MSG_METH L"%s[0x%p]()\n"
#define | TRACE_MSG_METH_DBL L"%s[0x%p](%lf)\n"
#define | TRACE_MSG_METH_DBL_DBL L"%s[0x%p](%lf, %lf)\n"
#define | TRACE_MSG_METH_DBL_DBL_FLT L"%s[0x%p](%lf, %lf, %f)\n"
#define | TRACE_MSG_METH_DBL_DBL_INT L"%s[0x%p](%lf, %lf, %d)\n"
#define | TRACE_MSG_METH_DBL_DBL_STR L"%s[0x%p](%lf, %lf, %s)\n"
#define | TRACE_MSG_METH_DBL_INT L"%s[0x%p](%lf, %d)\n"
#define | TRACE_MSG_METH_FLT L"%s[0x%p](%f)\n"
#define | TRACE_MSG_METH_FLT_FLT L"%s[0x%p](%f, %f)\n"
#define | TRACE_MSG_METH_FLT_FLT_FLT L"%s[0x%p](%f, %f, %f)\n"
#define | TRACE_MSG_METH_FLT_FLT_FLT_FLT L"%s[0x%p](%f, %f, %f, %f)\n"
#define | TRACE_MSG_METH_FLT_FLT_STR_INT L"%s[0x%p](%f, %f, %s, %d)\n"
#define | TRACE_MSG_METH_IND_STR L"%s[0x%p](%*s)\n"
#define | TRACE_MSG_METH_IND_STR_STR L"%s[0x%p](%*s, %s)\n"
#define | TRACE_MSG_METH_IND_STR_STR_FLT L"%s[0x%p](%*s, %s, %f)\n"
#define | TRACE_MSG_METH_IND_STR_STR_FLT_FLT L"%s[0x%p](%*s, %s, %f, %f)\n"
#define | TRACE_MSG_METH_IND_STR_STR_FLT_FLT_FLT_FLT L"%s[0x%p](%*s, %s, %f, %f, %f, %f)\n"
#define | TRACE_MSG_METH_IND_STR_STR_INT L"%s[0x%p](%*s, %s, %d)\n"
#define | TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT L"%s[0x%p](%*s, %s, %d, %f, %f, %f, %f)\n"
#define | TRACE_MSG_METH_INT L"%s[0x%p](%d)\n"
#define | TRACE_MSG_METH_INT_INT L"%s[0x%p](%d, %d)\n"
#define | TRACE_MSG_METH_METH L"%s[0x%p] - calls %s()\n"
#define | TRACE_MSG_METH_METH_FLT_FLT_FLT L"%s[0x%p] - calls %s(%f, %f, %f)\n"
#define | TRACE_MSG_METH_METH_FLT_STR L"%s[0x%p] - calls %s(%f, %s)\n"
#define | TRACE_MSG_METH_METH_INT L"%s[0x%p] - calls %s(%d)\n"
#define | TRACE_MSG_METH_METH_STR L"%s[0x%p] - calls %s(%s)\n"
#define | TRACE_MSG_METH_METH_STR_STR L"%s[0x%p] - calls %s(%s, %s)\n"
#define | TRACE_MSG_METH_PTR L"%s[0x%p](0x%p)\n"
#define | TRACE_MSG_METH_PTR_DBL L"%s[0x%p](0x%p, %lf)\n"
#define | TRACE_MSG_METH_PTR_INT L"%s[0x%p](0x%p, %d)\n"
#define | TRACE_MSG_METH_PTR_PTR L"%s[0x%p](0x%p, 0x%p)\n"
#define | TRACE_MSG_METH_PTR_STR L"%s[0x%p](0x%p, %s)\n"
#define | TRACE_MSG_METH_STR L"%s[0x%p](%s)\n"
#define | TRACE_MSG_METH_STR_DBL L"%s[0x%p](%s, %lf)\n"
#define | TRACE_MSG_METH_STR_DBL_DBL L"%s[0x%p](%s, %lf, %lf)\n"
#define | TRACE_MSG_METH_STR_FLT L"%s[0x%p](%s, %f)\n"
#define | TRACE_MSG_METH_STR_FLT_FLT L"%s[0x%p](%s, %f, %f)\n"
#define | TRACE_MSG_METH_STR_INT L"%s[0x%p](%s, %d)\n"
#define | TRACE_MSG_METH_STR_INT_INT L"%s[0x%p](%s, %d, %d)\n"
#define | TRACE_MSG_METH_STR_STR L"%s[0x%p](%s, %s)\n"
#define | TRACE_MSG_METH_STR_STR_DBL L"%s[0x%p](%s, %s, %lf)\n"
#define | TRACE_MSG_METH_STR_STR_DBL_DBL L"%s[0x%p](%s, %s, %lf, %lf)\n"
#define | TRACE_MSG_METH_STR_STR_FLT L"%s[0x%p](%s, %s, %f)\n"
#define | TRACE_MSG_METH_STR_STR_FLT_FLT L"%s[0x%p](%s, %s, %f, %f)\n"
#define | TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT L"%s[0x%p](%s, %s, %f, %f, %f, %f)\n"
#define | TRACE_MSG_METH_STR_STR_INT L"%s[0x%p](%s, %s, %d)\n"
#define | TRACE_MSG_METH_STR_STR_INT_INT L"%s[0x%p](%s, %s, %d, %d)\n"
#define | TRACE_MSG_METH_STR_STR_PTR L"%s[0x%p](%s, %s, 0x%p)\n"
#define | TRACE_MSG_METH_STR_STR_STR L"%s[0x%p](%s, %s, %s)\n"

Functions

DECLARE_TRACELOGGING_CLASS (XamlTelemetryLogging,"Microsoft-Windows-XAML",(0x531a35ab, 0x63ce, 0x4bcf, 0xaa, 0x98, 0xf8, 0x8c, 0x7a, 0x89, 0xe4, 0x55))
void | RegisterTraceLogging ()
TRACELOGGING_DECLARE_PROVIDER (g_hTelemetryProvider)
TRACELOGGING_DECLARE_PROVIDER (g_hPerfProvider)
TRACELOGGING_DECLARE_PROVIDER (g_hLoggingProvider)
void | UnRegisterTraceLogging ()

Variables

bool | g_IsLoggingProviderEnabled
bool | g_IsPerfProviderEnabled
bool | g_IsTelemetryProviderEnabled
GUID | g_LoggingProviderActivityId
UCHAR | g_LoggingProviderLevel
ULONGLONG | g_LoggingProviderMatchAnyKeyword
GUID | g_PerfProviderActivityId
UCHAR | g_PerfProviderLevel
ULONGLONG | g_PerfProviderMatchAnyKeyword
GUID | g_TelemetryProviderActivityId
UCHAR | g_TelemetryProviderLevel
ULONGLONG | g_TelemetryProviderMatchAnyKeyword

Define Documentation

#define DEBUG_PROVIDER_NAME "Microsoft.UI.Xaml.Controls.Debug"

Definition at line 110 of file MuxcTraceLogging.h.

#define KEYWORD_ANNOTATEDSCROLLBAR 0x0000000000000800

Definition at line 31 of file MuxcTraceLogging.h.

#define KEYWORD_COMMANDBARFLYOUT 0x0000000000000020

Definition at line 25 of file MuxcTraceLogging.h.

#define KEYWORD_INKTOOLBAR 0x0000000000004000

Definition at line 34 of file MuxcTraceLogging.h.

#define KEYWORD_ITEMCONTAINER 0x0000000000000200

Definition at line 29 of file MuxcTraceLogging.h.

#define KEYWORD_ITEMSREPEATER 0x0000000000000001

Definition at line 20 of file MuxcTraceLogging.h.

#define KEYWORD_ITEMSVIEW 0x0000000000000100

Definition at line 28 of file MuxcTraceLogging.h.

#define KEYWORD_LINEDFLOWLAYOUT 0x0000000000000400

Definition at line 30 of file MuxcTraceLogging.h.

#define KEYWORD_NAVIGATIONVIEW 0x0000000000002000

Definition at line 33 of file MuxcTraceLogging.h.

#define KEYWORD_PTR 0x0000000000000004

Definition at line 22 of file MuxcTraceLogging.h.

#define KEYWORD_SCROLLPRESENTER 0x0000000000000002

Definition at line 21 of file MuxcTraceLogging.h.

#define KEYWORD_SCROLLVIEW 0x0000000000000008

Definition at line 23 of file MuxcTraceLogging.h.

#define KEYWORD_SELECTORBAR 0x0000000000001000

Definition at line 32 of file MuxcTraceLogging.h.

#define KEYWORD_SWIPECONTROL 0x0000000000000010

Definition at line 24 of file MuxcTraceLogging.h.

#define KEYWORD_TABVIEW 0x0000000000000080

Definition at line 27 of file MuxcTraceLogging.h.

#define KEYWORD_WEBVIEW2 0x0000000000000040

Definition at line 26 of file MuxcTraceLogging.h.

#define METH_NAME StringUtil::Utf8ToUtf16(__FUNCTION__).c_str()

Definition at line 89 of file MuxcTraceLogging.h.

#define PERF_PROVIDER_NAME "Microsoft.UI.Xaml.Controls.Perf"

Definition at line 101 of file MuxcTraceLogging.h.

#define TELEMETRY_PROVIDER_NAME "Microsoft.UI.Xaml.Controls"

Definition at line 92 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH L"%s[0x%p]()\n"

Definition at line 37 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_DBL L"%s[0x%p](%lf)\n"

Definition at line 38 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_DBL_DBL L"%s[0x%p](%lf, %lf)\n"

Definition at line 39 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_DBL_DBL_FLT L"%s[0x%p](%lf, %lf, %f)\n"

Definition at line 42 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_DBL_DBL_INT L"%s[0x%p](%lf, %lf, %d)\n"

Definition at line 41 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_DBL_DBL_STR L"%s[0x%p](%lf, %lf, %s)\n"

Definition at line 43 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_DBL_INT L"%s[0x%p](%lf, %d)\n"

Definition at line 40 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_FLT L"%s[0x%p](%f)\n"

Definition at line 44 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_FLT_FLT L"%s[0x%p](%f, %f)\n"

Definition at line 45 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_FLT_FLT_FLT L"%s[0x%p](%f, %f, %f)\n"

Definition at line 46 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_FLT_FLT_FLT_FLT L"%s[0x%p](%f, %f, %f, %f)\n"

Definition at line 47 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_FLT_FLT_STR_INT L"%s[0x%p](%f, %f, %s, %d)\n"

Definition at line 48 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_IND_STR L"%s[0x%p](%*s)\n"

Definition at line 57 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_IND_STR_STR L"%s[0x%p](%*s, %s)\n"

Definition at line 58 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_IND_STR_STR_FLT L"%s[0x%p](%*s, %s, %f)\n"

Definition at line 60 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_IND_STR_STR_FLT_FLT L"%s[0x%p](%*s, %s, %f, %f)\n"

Definition at line 61 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_IND_STR_STR_FLT_FLT_FLT_FLT L"%s[0x%p](%*s, %s, %f, %f, %f, %f)\n"

Definition at line 62 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_IND_STR_STR_INT L"%s[0x%p](%*s, %s, %d)\n"

Definition at line 59 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT L"%s[0x%p](%*s, %s, %d, %f, %f, %f, %f)\n"

Definition at line 63 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_INT L"%s[0x%p](%d)\n"

Definition at line 49 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_INT_INT L"%s[0x%p](%d, %d)\n"

Definition at line 50 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_METH L"%s[0x%p] - calls %s()\n"

Definition at line 81 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_METH_FLT_FLT_FLT L"%s[0x%p] - calls %s(%f, %f, %f)\n"

Definition at line 86 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_METH_FLT_STR L"%s[0x%p] - calls %s(%f, %s)\n"

Definition at line 85 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_METH_INT L"%s[0x%p] - calls %s(%d)\n"

Definition at line 82 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_METH_STR L"%s[0x%p] - calls %s(%s)\n"

Definition at line 83 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_METH_STR_STR L"%s[0x%p] - calls %s(%s, %s)\n"

Definition at line 84 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_PTR L"%s[0x%p](0x%p)\n"

Definition at line 51 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_PTR_DBL L"%s[0x%p](0x%p, %lf)\n"

Definition at line 53 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_PTR_INT L"%s[0x%p](0x%p, %d)\n"

Definition at line 54 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_PTR_PTR L"%s[0x%p](0x%p, 0x%p)\n"

Definition at line 52 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_PTR_STR L"%s[0x%p](0x%p, %s)\n"

Definition at line 55 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR L"%s[0x%p](%s)\n"

Definition at line 56 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_DBL L"%s[0x%p](%s, %lf)\n"

Definition at line 65 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_DBL_DBL L"%s[0x%p](%s, %lf, %lf)\n"

Definition at line 66 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_FLT L"%s[0x%p](%s, %f)\n"

Definition at line 67 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_FLT_FLT L"%s[0x%p](%s, %f, %f)\n"

Definition at line 74 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_INT L"%s[0x%p](%s, %d)\n"

Definition at line 68 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_INT_INT L"%s[0x%p](%s, %d, %d)\n"

Definition at line 73 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR L"%s[0x%p](%s, %s)\n"

Definition at line 64 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_DBL L"%s[0x%p](%s, %s, %lf)\n"

Definition at line 70 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_DBL_DBL L"%s[0x%p](%s, %s, %lf, %lf)\n"

Definition at line 79 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_FLT L"%s[0x%p](%s, %s, %f)\n"

Definition at line 77 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_FLT_FLT L"%s[0x%p](%s, %s, %f, %f)\n"

Definition at line 75 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT L"%s[0x%p](%s, %s, %f, %f, %f, %f)\n"

Definition at line 76 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_INT L"%s[0x%p](%s, %s, %d)\n"

Definition at line 71 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_INT_INT L"%s[0x%p](%s, %s, %d, %d)\n"

Definition at line 78 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_PTR L"%s[0x%p](%s, %s, 0x%p)\n"

Definition at line 69 of file MuxcTraceLogging.h.

#define TRACE_MSG_METH_STR_STR_STR L"%s[0x%p](%s, %s, %s)\n"

Definition at line 72 of file MuxcTraceLogging.h.

Function Documentation

DECLARE_TRACELOGGING_CLASS | ( | XamlTelemetryLogging | ,
 |  | "Microsoft-Windows-XAML" | ,
 |  | (0x531a35ab, 0x63ce, 0x4bcf, 0xaa, 0x98, 0xf8, 0x8c, 0x7a, 0x89, 0xe4, 0x55) |
 | ) |  |
void RegisterTraceLogging ( )

Definition at line 85 of file MuxcTraceLogging.cpp.

{
    HRESULT hr = S_OK;

    TraceLoggingRegisterEx(g_hTelemetryProvider, TelemetryProviderEnabledCallback, nullptr);
    //Generate the ActivityId used to track the session
    hr = CoCreateGuid(&g_TelemetryProviderActivityId);
    if (FAILED(hr))
    {
        TraceLoggingWriteActivity(
            g_hTelemetryProvider,
            "CreateGuidError",
            nullptr,
            nullptr,
            TraceLoggingHResult(hr),
            TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
            TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));

        g_TelemetryProviderActivityId = GUID_NULL;
    };

    TraceLoggingRegisterEx(g_hPerfProvider, PerfProviderEnabledCallback, nullptr);
    //Generate the ActivityId used to track the session
    hr = CoCreateGuid(&g_PerfProviderActivityId);
    if (FAILED(hr))
    {
        TraceLoggingWriteActivity(
            g_hPerfProvider,
            "CreateGuidError",
            nullptr,
            nullptr,
            TraceLoggingHResult(hr));

        g_PerfProviderActivityId = GUID_NULL;
    };

    TraceLoggingRegisterEx(g_hLoggingProvider, LoggingProviderEnabledCallback, nullptr);
    //Generate the ActivityId used to track the session
    hr = CoCreateGuid(&g_LoggingProviderActivityId);
    if (FAILED(hr))
    {
        TraceLoggingWriteActivity(
            g_hLoggingProvider,
            "CreateGuidError",
            nullptr,
            nullptr,
            TraceLoggingHResult(hr));

        g_LoggingProviderActivityId = GUID_NULL;
    };
}

TRACELOGGING_DECLARE_PROVIDER ( g_hTelemetryProvider )
TRACELOGGING_DECLARE_PROVIDER ( g_hPerfProvider )
TRACELOGGING_DECLARE_PROVIDER ( g_hLoggingProvider )
void UnRegisterTraceLogging ( )

Definition at line 137 of file MuxcTraceLogging.cpp.

{
    TraceLoggingUnregister(g_hTelemetryProvider);

    TraceLoggingUnregister(g_hPerfProvider);
    TraceLoggingUnregister(g_hLoggingProvider);
}

Variable Documentation

bool g_IsLoggingProviderEnabled
bool g_IsPerfProviderEnabled
bool g_IsTelemetryProviderEnabled
GUID g_LoggingProviderActivityId
UCHAR g_LoggingProviderLevel
ULONGLONG g_LoggingProviderMatchAnyKeyword
GUID g_PerfProviderActivityId
UCHAR g_PerfProviderLevel
ULONGLONG g_PerfProviderMatchAnyKeyword
GUID g_TelemetryProviderActivityId
UCHAR g_TelemetryProviderLevel
ULONGLONG g_TelemetryProviderMatchAnyKeyword
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/RuntimeProfiler.cpp File Reference

  • File List
  • File Members
  • Telemetry
Classes | Namespaces | Defines | Functions | Variables

RuntimeProfiler.cpp File Reference

#include <pch.h>
#include "RuntimeProfiler.h"
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Classes

class | CMethodProfileGroup< size >
class | CMethodProfileGroupBase
struct | FunctionTelemetryCount
struct | ProfileGroupInfo

Namespaces

namespace | RuntimeProfiler

Defines

#define | DEFINE_PROFILEGROUP(name, group, size) CMethodProfileGroup<size> name(group)

Functions

DEFINE_PROFILEGROUP (gGroupClasses, PG_Class, ProfId_Size+ProfMemberId_Size)
void | FireEvent (bool bSuspend) noexcept
void | InitializeRuntimeProfiler ()
void | RegisterMethod (ProfileGroup group, UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept
STDAPI_ (void) SendTelemetryOnSuspend() noexcept
VOID CALLBACK | TPTimerCallback (PTP_CALLBACK_INSTANCE, PVOID, PTP_TIMER) noexcept
void | UninitializeRuntimeProfiler ()

Variables

constexpr auto | EventFrequency = 20min
const char * | gFileVersion
struct
RuntimeProfiler::ProfileGroupInfo 		gProfileGroups []

Define Documentation

#define DEFINE_PROFILEGROUP | ( | name,
 |  | group,
 |  | size |
 | ) |  | CMethodProfileGroup<size> name(group)

Definition at line 11 of file RuntimeProfiler.cpp.

Function Documentation

STDAPI_ ( void )

Definition at line 268 of file RuntimeProfiler.cpp.

{
    RuntimeProfiler::FireEvent(true);
}

Variable Documentation

const char* gFileVersion

Definition at line 21 of file dllmain.cpp.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/RuntimeProfiler.h File Reference

  • File List
  • File Members
  • Telemetry
Namespaces | Defines | Enumerations | Functions

RuntimeProfiler.h File Reference

Go to the source code of this file.

Namespaces

namespace | RuntimeProfiler

Defines

#define | __RP_Marker_ClassById(typeindex)
#define | __RP_Marker_ClassMemberById(typeindex, memberindex)

Enumerations

enum | ProfileGroup { PG_Class = 0 }
enum ProfilerClassId {
ProfId_ColorPicker = 0, ProfId_NavigationView, ProfId_ParallaxView, ProfId_PersonPicture,
ProfId_RefreshContainer, ProfId_RefreshVisualizer, ProfId_RatingControl, ProfId_SwipeControl,
ProfId_SwipeItem, ProfId_TreeView, ProfId_TwoPaneView, ProfId_Reveal,
ProfId_Acrylic, ProfId_SplitButton, ProfId_DropDownButton, ProfId_CommandBarFlyout,
ProfId_TextCommandBarFlyout, ProfId_RadioButtons, ProfId_RadioMenuFlyoutItem, ProfId_ItemsRepeater,
ProfId_TeachingTip, ProfId_AnimatedVisualPlayer, ProfId_NonVirtualizingLayout, ProfId_StackLayout,
ProfId_UniformGridLayout, ProfId_VirtualizingLayout, ProfId_ItemsRepeaterScrollHost, ProfId_TabView,
ProfId_TabViewItem, ProfId_ProgressBar, ProfId_ProgressRing, ProfId_NumberBox,
ProfId_RadialGradientBrush, ProfId_InfoBar, ProfId_Expander, ProfId_PagerControl,
ProfId_BreadcrumbBar, ProfId_BreadcrumbBarItem, ProfId_PipsPager, ProfId_ImageIcon,
ProfId_AnimatedIcon, ProfId_InfoBadge, ProfId_WebView2, ProfId_MicaController,
ProfId_ScrollPresenter, ProfId_ScrollView, ProfId_ItemsView, ProfId_ItemContainer,
ProfId_LinedFlowLayout, ProfId_AnnotatedScrollBar, ProfId_MapControl, ProfId_SelectorBar,
ProfId_TitleBar, ProfId_InkCanvas, ProfId_Size
}
enum ProfilerMemberId {
ProfMemberId_Acrylic_TintLuminosityOpacity_Changed = 0, ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation, ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation, ProfMemberId_TeachingTip_TipDidNotOpenDueToSize,
ProfMemberId_Size
}

Functions

void | FireEvent (bool bSuspend) noexcept
void | RegisterMethod (ProfileGroup group, UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept
void | UninitializeRuntimeProfiler ()

Define Documentation

#define __RP_Marker_ClassById ( typeindex )
Value:
{ \
        __pragma (warning ( suppress : 28112)) \
        static volatile LONG __RuntimeProfiler_Counter = -1; \
        if (0 == ::InterlockedIncrement(&__RuntimeProfiler_Counter)) \
        { \
            RuntimeProfiler::RegisterMethod(RuntimeProfiler::PG_Class, (UINT16)typeindex, 9999, &__RuntimeProfiler_Counter); \
        } \
    }

Definition at line 89 of file RuntimeProfiler.h.

#define __RP_Marker_ClassMemberById | ( | typeindex,
 |  | memberindex
 | ) |
Value:
{ \
        __pragma (warning ( suppress : 28112)) \
        static volatile LONG __RuntimeProfiler_Counter = -1; \
        if (0 == ::InterlockedIncrement(&__RuntimeProfiler_Counter)) \
        { \
            RuntimeProfiler::RegisterMethod(RuntimeProfiler::PG_Class, (UINT16)typeindex, (UINT16)memberindex, &__RuntimeProfiler_Counter); \
        } \
    }

Definition at line 99 of file RuntimeProfiler.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/TypeLogging.cpp File Reference

  • File List
  • File Members
  • Telemetry
Namespaces | Functions

TypeLogging.cpp File Reference

#include "pch.h"
#include "TypeLogging.h"
#include "Utils.h"

Go to the source code of this file.

Namespaces

namespace | TypeLogging

Functions

winrt::hstring | Float2ToString (const winrt::float2 &v2)
winrt::hstring | FocusStateToString (const winrt::FocusState &focusState)
winrt::hstring | ItemContainerInteractionTriggerToString (const winrt::ItemContainerInteractionTrigger &interactionTrigger)
winrt::hstring | ItemContainerMultiSelectModeToString (const winrt::ItemContainerMultiSelectMode &multiSelectMode)
winrt::hstring | KeyRoutedEventArgsToString (const winrt::KeyRoutedEventArgs &eventArgs)
winrt::hstring | NullableFloat2ToString (const winrt::IReference< winrt::float2 > &nv2)
winrt::hstring | NullableFloatToString (const winrt::IReference< float > &nf)
winrt::hstring | OrientationToString (const winrt::Orientation &orientation)
winrt::hstring | PointerDeviceTypeToString (const winrt::PointerDeviceType &pointerDeviceKind)
winrt::hstring | PointerPointToString (const winrt::PointerPoint &pointerPoint, bool verbose)
winrt::hstring | PointerUpdateKindToString (const winrt::PointerUpdateKind &pointerUpdateKind)
winrt::hstring | RectToString (const winrt::Rect &rect)
winrt::hstring | ScrollEventTypeToString (const winrt::ScrollEventType &scrollEventType)
winrt::hstring | ScrollingIndicatorModeToString (const winrt::ScrollingIndicatorMode &indicatorMode)
winrt::hstring | SizeToString (const winrt::Size &size)
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/TypeLogging.h File Reference

  • File List
  • File Members
  • Telemetry
Namespaces | Functions

TypeLogging.h File Reference

Go to the source code of this file.

Namespaces

namespace | TypeLogging

Functions

winrt::hstring | Float2ToString (const winrt::float2 &v2)
winrt::hstring | FocusStateToString (const winrt::FocusState &focusState)
winrt::hstring | ItemContainerInteractionTriggerToString (const winrt::ItemContainerInteractionTrigger &interactionTrigger)
winrt::hstring | ItemContainerMultiSelectModeToString (const winrt::ItemContainerMultiSelectMode &multiSelectMode)
winrt::hstring | KeyRoutedEventArgsToString (const winrt::KeyRoutedEventArgs &eventArgs)
winrt::hstring | NullableFloat2ToString (const winrt::IReference< winrt::float2 > &nv2)
winrt::hstring | NullableFloatToString (const winrt::IReference< float > &nf)
winrt::hstring | OrientationToString (const winrt::Orientation &orientation)
winrt::hstring | PointerDeviceTypeToString (const winrt::PointerDeviceType &pointerDeviceKind)
winrt::hstring | PointerPointToString (const winrt::PointerPoint &pointerPoint, bool verbose)
winrt::hstring | PointerUpdateKindToString (const winrt::PointerUpdateKind &pointerUpdateKind)
winrt::hstring | RectToString (const winrt::Rect &rect)
winrt::hstring | ScrollEventTypeToString (const winrt::ScrollEventType &scrollEventType)
winrt::hstring | ScrollingIndicatorModeToString (const winrt::ScrollingIndicatorMode &indicatorMode)
winrt::hstring | SizeToString (const winrt::Size &size)
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooks.cpp File Reference

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooks.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MUXControlsTestHooksFactory.h"
#include "TabViewTrace.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooks.h File Reference

  • File List
  • File Members
  • TestHooks
Classes | Defines

MUXControlsTestHooks.h File Reference

#include "WinEventLogLevels.h"
#include "MUXControlsTestHooksLoggingMessageEventArgs.h"
#include "MUXControlsTestHooks.g.h"

Go to the source code of this file.

Classes

class | MUXControlsTestHooks

Defines

#define | WINEVENT_LEVEL_NONE 0x0

Define Documentation

#define WINEVENT_LEVEL_NONE 0x0

Definition at line 10 of file MUXControlsTestHooks.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooks.idl File Reference

  • File List
  • File Members
  • TestHooks
Namespaces

MUXControlsTestHooks.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksFactory.cpp File Reference

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooksFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MUXControlsTestHooks.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksFactory.h File Reference

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooksFactory.h File Reference

#include "MUXControlsTestHooks.h"
#include "MUXControlsTestHooks.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksLoggingMessageEventArgs.cpp File Reference

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooksLoggingMessageEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "MUXControlsTestHooksLoggingMessageEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksLoggingMessageEventArgs.h File Reference

  • File List
  • File Members
  • TestHooks
Classes

MUXControlsTestHooksLoggingMessageEventArgs.h File Reference

#include "MUXControlsTestHooksLoggingMessageEventArgs.g.h"

Go to the source code of this file.

Classes

class MUXControlsTestHooksLoggingMessageEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBar.cpp File Reference

  • File List
  • File Members
  • TitleBar

TitleBar.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TitleBar.h"
#include "TitleBarTemplateSettings.h"
#include "TitleBarAutomationPeer.h"
#include "ResourceAccessor.h"
#include <winrt/Microsoft.UI.Windowing.h>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBar.h File Reference

  • File List
  • File Members
  • TitleBar
Classes

TitleBar.h File Reference

#include "pch.h"
#include "common.h"
#include "TitleBar.g.h"
#include "TitleBar.properties.h"

Go to the source code of this file.

Classes

class TitleBar
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBar.idl File Reference

  • File List
  • File Members
  • TitleBar
Namespaces | Variables

TitleBar.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Variables

event Windows Foundation
TypedEventHandler< TitleBar,
Object > 		BackRequested
event Windows Foundation
TypedEventHandler< TitleBar,
Object > 		PaneToggleRequested
unsealed runtimeclass | TitleBar
unsealed runtimeclass | TitleBarAutomationPeer
unsealed runtimeclass | TitleBarTemplateSettings
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBarAutomationPeer.cpp File Reference

  • File List
  • File Members
  • TitleBar

TitleBarAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "TitleBarAutomationPeer.h"
#include <UIAutomationCore.h>
#include <UIAutomationCoreApi.h>
#include "TitleBarAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBarAutomationPeer.h File Reference

  • File List
  • File Members
  • TitleBar
Classes

TitleBarAutomationPeer.h File Reference

#include "TitleBar.h"
#include "TitleBarAutomationPeer.g.h"

Go to the source code of this file.

Classes

class TitleBarAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBarTemplateSettings.cpp File Reference

  • File List
  • File Members
  • TitleBar

TitleBarTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TitleBarTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBarTemplateSettings.h File Reference

  • File List
  • File Members
  • TitleBar
Classes

TitleBarTemplateSettings.h File Reference

#include "TitleBarTemplateSettings.g.h"
#include "TitleBarTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class TitleBarTemplateSettings
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/InteractionTests/TitleBarTests.cs File Reference

  • File List
  • File Members
  • TitleBar
  • InteractionTests
Classes | Namespaces

TitleBarTests.cs File Reference

Go to the source code of this file.

Classes

class | TitleBarTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TestUI/TitleBarPage.xaml.cs File Reference

  • File List
  • File Members
  • TitleBar
  • TestUI
Classes | Namespaces

TitleBarPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TitleBarPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TestUI/TitleBarPageWindow.xaml.cs File Reference

  • File List
  • File Members
  • TitleBar
  • TestUI
Classes | Namespaces

TitleBarPageWindow.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TitleBarPageWindow

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeView.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeView.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewNode.h"
#include "TreeView.h"
#include "TreeViewList.h"
#include "TreeViewItem.h"
#include "TreeViewItemAutomationPeer.h"
#include "ViewModel.h"
#include "RuntimeProfiler.h"
#include "InspectingDataSource.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeView.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeView.h File Reference

#include "TreeViewList.h"
#include "TreeViewNode.h"
#include "TreeViewItemInvokedEventArgs.h"
#include "TreeViewExpandingEventArgs.h"
#include "TreeViewCollapsedEventArgs.h"
#include "TreeViewDragItemsStartingEventArgs.h"
#include "TreeViewDragItemsCompletedEventArgs.h"
#include "TreeViewSelectionChangedEventArgs.h"
#include "TreeView.g.h"
#include "TreeView.properties.h"

Go to the source code of this file.

Classes

class TreeView
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeView.idl File Reference

  • File List
  • File Members
  • TreeView
Namespaces | Enumerations

TreeView.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | TreeViewSelectionMode { None = 0, Single = 2, Multiple = 8 }
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewAutomationPeers.idl File Reference

  • File List
  • File Members
  • TreeView
Namespaces | Variables

TreeViewAutomationPeers.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | TreeViewItemAutomationPeer
unsealed runtimeclass | TreeViewListAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewCollapsedEventArgs.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewCollapsedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewCollapsedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewCollapsedEventArgs.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewCollapsedEventArgs.h File Reference

#include "TreeViewNode.h"
#include "TreeViewCollapsedEventArgs.g.h"

Go to the source code of this file.

Classes

class TreeViewCollapsedEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewDragItemsCompletedEventArgs.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewDragItemsCompletedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "TreeViewDragItemsCompletedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewDragItemsCompletedEventArgs.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewDragItemsCompletedEventArgs.h File Reference

#include "TreeViewDragItemsCompletedEventArgs.g.h"

Go to the source code of this file.

Classes

class TreeViewDragItemsCompletedEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewDragItemsStartingEventArgs.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewDragItemsStartingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "TreeViewDragItemsStartingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewDragItemsStartingEventArgs.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewDragItemsStartingEventArgs.h File Reference

#include "TreeViewDragItemsStartingEventArgs.g.h"

Go to the source code of this file.

Classes

class TreeViewDragItemsStartingEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewExpandingEventArgs.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewExpandingEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewExpandingEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewExpandingEventArgs.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewExpandingEventArgs.h File Reference

#include "TreeViewNode.h"
#include "TreeViewExpandingEventArgs.g.h"

Go to the source code of this file.

Classes

class TreeViewExpandingEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItem.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewItem.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewItem.h"
#include "TreeViewItemAutomationPeer.h"
#include "TreeViewList.h"
#include "TreeViewItemTemplateSettings.h"
#include <winrt/Microsoft.UI.Dispatching.h>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItem.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewItem.h File Reference

#include "TreeViewItemTemplateSettings.h"
#include "TreeView.h"
#include "TreeViewNode.h"
#include "TreeViewItem.g.h"
#include "TreeViewItem.properties.h"

Go to the source code of this file.

Classes

class TreeViewItem
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemAutomationPeer.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewItemAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeView.h"
#include "TreeViewItem.h"
#include "TreeViewItemAutomationPeer.h"
#include "SharedHelpers.h"
#include "TreeViewItemAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemAutomationPeer.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewItemAutomationPeer.h File Reference

#include "TreeViewItemAutomationPeer.g.h"

Go to the source code of this file.

Classes

class TreeViewItemAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemDataAutomationPeer.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewItemDataAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeView.h"
#include "TreeViewItem.h"
#include "TreeViewItemDataAutomationPeer.h"
#include <UIAutomationCore.h>
#include <UIAutomationCoreApi.h>
#include "TreeViewItemDataAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemDataAutomationPeer.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewItemDataAutomationPeer.h File Reference

#include "TreeViewItemDataAutomationPeer.g.h"

Go to the source code of this file.

Classes

class TreeViewItemDataAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemInvokedEventArgs.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewItemInvokedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewItemInvokedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemInvokedEventArgs.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewItemInvokedEventArgs.h File Reference

#include "TreeViewItemInvokedEventArgs.g.h"

Go to the source code of this file.

Classes

class TreeViewItemInvokedEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemTemplateSettings.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewItemTemplateSettings.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewItemTemplateSettings.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemTemplateSettings.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewItemTemplateSettings.h File Reference

#include "TreeViewItemTemplateSettings.g.h"
#include "TreeViewItemTemplateSettings.properties.h"

Go to the source code of this file.

Classes

class TreeViewItemTemplateSettings
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewList.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewList.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ResourceAccessor.h"
#include "Utils.h"
#include "TreeViewList.h"
#include "TreeViewListAutomationPeer.h"
#include "TreeViewItem.h"
#include "TreeViewList.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewList.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewList.h File Reference

#include "ViewModel.h"
#include "TreeViewList.g.h"

Go to the source code of this file.

Classes

class TreeViewList
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewListAutomationPeer.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewListAutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewList.h"
#include "TreeViewListAutomationPeer.h"
#include "TreeViewItemDataAutomationPeer.h"
#include "TreeViewListAutomationPeer.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewListAutomationPeer.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewListAutomationPeer.h File Reference

#include "TreeViewListAutomationPeer.g.h"

Go to the source code of this file.

Classes

class TreeViewListAutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewNode.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewNode.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TreeViewNode.h"
#include "Vector.h"
#include "VectorChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewNode.h File Reference

  • File List
  • File Members
  • TreeView
Classes | Typedefs

TreeViewNode.h File Reference

#include "Vector.h"
#include "TreeViewNode.g.h"
#include "TreeViewNode.properties.h"

Go to the source code of this file.

Classes

class | TreeViewNode
class | TreeViewNodeVector

Typedefs

typedef VectorOptionsFromFlag
< winrt::TreeViewNode,
MakeVectorParam
< VectorFlag::Observable,
VectorFlag::DependencyObjectBase >)> 		TreeViewNodeVectorOptions

Typedef Documentation

typedef VectorOptionsFromFlag<winrt::TreeViewNode, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>)> TreeViewNodeVectorOptions

Definition at line 85 of file TreeViewNode.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewSelectionChangedEventArgs.cpp File Reference

  • File List
  • File Members
  • TreeView

TreeViewSelectionChangedEventArgs.cpp File Reference

#include "pch.h"
#include "common.h"
#include "Vector.h"
#include "TreeViewSelectionChangedEventArgs.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewSelectionChangedEventArgs.h File Reference

  • File List
  • File Members
  • TreeView
Classes

TreeViewSelectionChangedEventArgs.h File Reference

#include "TreeViewSelectionChangedEventArgs.g.h"

Go to the source code of this file.

Classes

class TreeViewSelectionChangedEventArgs
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/ViewModel.cpp File Reference

  • File List
  • File Members
  • TreeView

ViewModel.cpp File Reference

#include "pch.h"
#include "common.h"
#include "ViewModel.h"
#include "TreeView.h"
#include "TreeViewItem.h"
#include "VectorChangedEventArgs.h"
#include "TreeViewList.h"
#include <HashMap.h>

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/ViewModel.h File Reference

  • File List
  • File Members
  • TreeView
Classes | Typedefs

ViewModel.h File Reference

#include <Vector.h>
#include "TreeViewNode.h"

Go to the source code of this file.

Classes

class | SelectedItemsVector
class | SelectedTreeNodeVector
class | ViewModel

Typedefs

typedef VectorOptionsFromFlag
< winrt::IInspectable,
MakeVectorParam
< VectorFlag::Observable,
VectorFlag::DependencyObjectBase >)> 		SelectedItemsVectorOptions
typedef VectorOptionsFromFlag
< winrt::TreeViewNode,
MakeVectorParam
< VectorFlag::Observable,
VectorFlag::DependencyObjectBase >)> 		SelectedTreeNodeVectorOptions

Typedef Documentation

typedef VectorOptionsFromFlag<winrt::IInspectable, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>)> SelectedItemsVectorOptions

Definition at line 166 of file ViewModel.h.

typedef VectorOptionsFromFlag<winrt::TreeViewNode, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>)> SelectedTreeNodeVectorOptions

Definition at line 123 of file ViewModel.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/APITests/TreeViewTests.cs File Reference

  • File List
  • File Members
  • TreeView
  • APITests
Classes | Namespaces

TreeViewTests.cs File Reference

Go to the source code of this file.

Classes

class | SpecialTreeView
class | SpecialTreeViewItem
class | SpecialTreeViewList
class | SpecialTreeViewNode
class | TreeViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/InteractionTests/TreeViewTests.cs File Reference

  • File List
  • File Members
  • TreeView
  • InteractionTests
Classes | Namespaces

TreeViewTests.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewItemSource.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewItemSource.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewItemSource

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewItemsSourceTestPage.xaml.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewItemsSourceTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewItemsSourceTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewItemTemplateSelectorTestPage.xaml.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewItemTemplateSelectorTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewItemStyleSelector
class | TreeViewItemTemplateSelector
class | TreeViewItemTemplateSelectorTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewLateDataInitTestPage.xaml.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewLateDataInitTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewLateDataInitTest
Test page for late initialization data binding. ItemsSource is null until we click the button to set it. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewNode2.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewNode2.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewNode2

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewNodeInMarkupTestPage.xaml.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewNodeInMarkupTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewNodeInMarkupTestPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewPage.xaml.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewUnrealizedChildrenTestPage.xaml.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewUnrealizedChildrenTestPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewUnrealizedChildrenTestPage
An empty page that can be used on its own or navigated to within a Frame. More...

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewViewModel.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

TreeViewViewModel.cs File Reference

Go to the source code of this file.

Classes

class | TreeViewViewModel
class | TreeViewViewModelItem

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/VirtualizingDataSource.cs File Reference

  • File List
  • File Members
  • TreeView
  • TestUI
Classes | Namespaces

VirtualizingDataSource.cs File Reference

Go to the source code of this file.

Classes

class | CustomContent
class | VirtualizingDataSource

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelper.cpp File Reference

  • File List
  • File Members
  • TwoPaneView
Variables

DisplayRegionHelper.cpp File Reference

#include "pch.h"
#include "common.h"
#include "SharedHelpers.h"
#include "Vector.h"
#include "DisplayRegionHelper.h"
#include "LifetimeHandler.h"

Go to the source code of this file.

Variables

const int c_ApplicationViewModeSpanning = 2

Variable Documentation

const int c_ApplicationViewModeSpanning = 2

Definition at line 12 of file DisplayRegionHelper.cpp.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelper.h File Reference

  • File List
  • File Members
  • TwoPaneView
Classes | Variables

DisplayRegionHelper.h File Reference

Go to the source code of this file.

Classes

class | DisplayRegionHelper
struct | DisplayRegionHelperInfo

Variables

const uint32_t | c_maxRegions = 2

Variable Documentation

const uint32_t c_maxRegions = 2

Definition at line 6 of file DisplayRegionHelper.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApi.cpp File Reference

  • File List
  • File Members
  • TwoPaneView

DisplayRegionHelperTestApi.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DisplayRegionHelper.h"
#include "DisplayRegionHelperTestApi.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApi.h File Reference

  • File List
  • File Members
  • TwoPaneView
Classes

DisplayRegionHelperTestApi.h File Reference

#include "DisplayRegionHelperTestApi.g.h"

Go to the source code of this file.

Classes

class DisplayRegionHelperTestApi
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApi.idl File Reference

  • File List
  • File Members
  • TwoPaneView
Namespaces

DisplayRegionHelperTestApi.idl File Reference

Go to the source code of this file.

Namespaces

namespace MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApiFactory.cpp File Reference

  • File List
  • File Members
  • TwoPaneView

DisplayRegionHelperTestApiFactory.cpp File Reference

#include "pch.h"
#include "common.h"
#include "DisplayRegionHelper.h"
#include "DisplayRegionHelperTestApiFactory.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApiFactory.h File Reference

  • File List
  • File Members
  • TwoPaneView

DisplayRegionHelperTestApiFactory.h File Reference

#include "DisplayRegionHelperTestApi.h"
#include "DisplayRegionHelperTestApi.properties.cpp"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/TwoPaneView.cpp File Reference

  • File List
  • File Members
  • TwoPaneView

TwoPaneView.cpp File Reference

#include "pch.h"
#include "common.h"
#include "TwoPaneView.h"
#include "DisplayRegionHelperTestApi.h"
#include "RuntimeProfiler.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/TwoPaneView.h File Reference

  • File List
  • File Members
  • TwoPaneView
Classes | Enumerations

TwoPaneView.h File Reference

#include "DisplayRegionHelper.h"
#include "TwoPaneView.g.h"
#include "TwoPaneView.properties.h"

Go to the source code of this file.

Classes

class TwoPaneView

Enumerations

enum ViewMode {
Pane1Only, Pane2Only, LeftRight, RightLeft,
TopBottom, BottomTop, None
}

Enumeration Type Documentation

enum ViewMode
Enumerator:
Pane1Only
Pane2Only
LeftRight
RightLeft
TopBottom
BottomTop
None

Definition at line 17 of file TwoPaneView.h.

{
    Pane1Only,
    Pane2Only,
    LeftRight,
    RightLeft,
    TopBottom,
    BottomTop,
    None
};

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/TwoPaneView.idl File Reference

  • File List
  • File Members
  • TwoPaneView
Classes | Namespaces | Enumerations | Variables

TwoPaneView.idl File Reference

Go to the source code of this file.

Classes

interface | IApplicationViewSpanningRects

Namespaces

namespace | MU_XC_NAMESPACE

Enumerations

enum | TwoPaneViewMode { SinglePane = 0, Wide = 1, Tall = 2 }
enum | TwoPaneViewPriority { Pane1 = 0, Pane2 = 1 }
enum | TwoPaneViewTallModeConfiguration { SinglePane = 0, TopBottom = 1, BottomTop = 2 }
enum | TwoPaneViewWideModeConfiguration { SinglePane = 0, LeftRight = 1, RightLeft = 2 }

Variables

event Windows Foundation
TypedEventHandler< TwoPaneView,
Object > 		ModeChanged
unsealed runtimeclass | TwoPaneView
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/APITests/TwoPaneViewTests.cs File Reference

  • File List
  • File Members
  • TwoPaneView
  • APITests
Classes | Namespaces

TwoPaneViewTests.cs File Reference

Go to the source code of this file.

Classes

class | TwoPaneViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::ApiTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/InteractionTests/TwoPaneViewTests.cs File Reference

  • File List
  • File Members
  • TwoPaneView
  • InteractionTests
Classes | Namespaces

TwoPaneViewTests.cs File Reference

Go to the source code of this file.

Classes

class | TwoPaneViewTests

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/TestUI/TwoPaneViewPage.xaml.cs File Reference

  • File List
  • File Members
  • TwoPaneView
  • TestUI
Classes | Namespaces

TwoPaneViewPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | TwoPaneViewPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/InvokableCallbackHelper.h File Reference

  • File List
  • File Members
  • WebView2
Classes | Namespaces | Functions

InvokableCallbackHelper.h File Reference

Go to the source code of this file.

Classes

struct | CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>
struct | CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >

Namespaces

namespace | details

Functions

template<typename TDelegateInterface , typename TLambda >
auto | InvokableCallback (TLambda &&callback)

Function Documentation

auto InvokableCallback ( TLambda && callback )

Definition at line 38 of file InvokableCallbackHelper.h.

{
    using InvokeSignature = decltype(&TDelegateInterface::Invoke);
    using CallbackType = typename details::CallbackTraits<InvokeSignature>::template InvokeCallback<TDelegateInterface>;
    return winrt::make<CallbackType>(std::forward<TLambda>(callback));
}

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2.cpp File Reference

  • File List
  • File Members
  • WebView2
Classes

WebView2.cpp File Reference

#include "pch.h"
#include "common.h"
#include <corewindow.h>
#include "dcomp.h"
#include "InvokableCallbackHelper.h"
#include "math.h"
#include "Microsoft.UI.Xaml.xamlroot.h"
#include "ResourceAccessor.h"
#include "RuntimeProfiler.h"
#include "UIAutomationCore.h"
#include "UIAutomationCoreApi.h"
#include "WebView2.h"
#include "WebView2AutomationPeer.h"
#include <WebView2Interop.h>
#include "WebView2Utility.h"
#include "Windows.Globalization.h"
#include <wrl\event.h>
#include "MuxcTraceLogging.h"

Go to the source code of this file.

Classes

struct WebView2_TryCompleteInitialization_RAII
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2.h File Reference

  • File List
  • File Members
  • WebView2
Classes | Variables

WebView2.h File Reference

#include "pch.h"
#include "common.h"
#include "CoreWebView2InitializedEventArgs.g.h"
#include "DispatcherHelper.h"
#include <Microsoft.UI.Content.h>
#include "WebView2.g.h"
#include "WebView2.properties.h"
#include <webview2.h>
#include <WebView2EnvironmentOptions.h>

Go to the source code of this file.

Classes

class | CoreWebView2InitializedEventArgs
struct | final
class | WebView2
struct | WebView2::XamlFocusChangeInfo

Variables

IHwndComponentHost | __pad0__

Variable Documentation

IHwndComponentHost __pad0__

Definition at line 27 of file WebView2.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2.idl File Reference

  • File List
  • File Members
  • WebView2
Functions

WebView2.idl File Reference

Go to the source code of this file.

Functions

midl_pragma warning (disable:5135) namespace MU_XC_NAMESPACE

Function Documentation

midl_pragma warning ( disable:5135 )

Definition at line 1 of file WebView2.idl.

                               : 5135 ) // a type that is not marked [experimental] cannot reference a type that is marked [experimental]

namespace MU_XC_NAMESPACE
{

[webhosthidden]
[MUX_PUBLIC]
runtimeclass CoreWebView2InitializedEventArgs
{
    HRESULT Exception{ get; };
}

[webhosthidden]
[MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
[MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
[MUX_PUBLIC]
unsealed runtimeclass WebView2 : Microsoft.UI.Xaml.FrameworkElement
{
    WebView2();
    Microsoft.Web.WebView2.Core.CoreWebView2 CoreWebView2{ get; };

    Windows.Foundation.IAsyncAction EnsureCoreWebView2Async();
    [MUX_PUBLIC_V6]
    [overload("EnsureCoreWebView2Async")] Windows.Foundation.IAsyncAction EnsureCoreWebView2WithEnvironmentAsync(Microsoft.Web.WebView2.Core.CoreWebView2Environment environment);
    [MUX_PUBLIC_V6]
    [overload("EnsureCoreWebView2Async")] Windows.Foundation.IAsyncAction EnsureCoreWebView2WithEnvironmentAndOptionsAsync(Microsoft.Web.WebView2.Core.CoreWebView2Environment environment, Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions controllerOptions);

    Windows.Foundation.IAsyncOperation<String> ExecuteScriptAsync(String javascriptCode);
    Windows.Foundation.Uri Source{ get; set; };
    Boolean CanGoForward{ get; set; };
    Boolean CanGoBack{ get; set; };

    [MUX_DEFAULT_VALUE("WebView2::sc_controllerDefaultBackgroundColor")]
    Windows.UI.Color DefaultBackgroundColor{ get; set; };

    void Reload();
    void GoForward();
    void GoBack();
    void NavigateToString(String htmlContent);
    void Close();

    static Microsoft.UI.Xaml.DependencyProperty SourceProperty{ get; };
    static Microsoft.UI.Xaml.DependencyProperty CanGoForwardProperty{ get; };
    static Microsoft.UI.Xaml.DependencyProperty CanGoBackProperty{ get; };
    static Microsoft.UI.Xaml.DependencyProperty DefaultBackgroundColorProperty{ get; };

    event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2NavigationCompletedEventArgs> NavigationCompleted;
    event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2WebMessageReceivedEventArgs> WebMessageReceived;
    event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2NavigationStartingEventArgs> NavigationStarting;
    event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2ProcessFailedEventArgs> CoreProcessFailed;
    event Windows.Foundation.TypedEventHandler<WebView2, CoreWebView2InitializedEventArgs> CoreWebView2Initialized;
}

}

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2AutomationPeer.cpp File Reference

  • File List
  • File Members
  • WebView2

WebView2AutomationPeer.cpp File Reference

#include "pch.h"
#include "common.h"
#include "WebView2AutomationPeer.h"

Go to the source code of this file.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2AutomationPeer.h File Reference

  • File List
  • File Members
  • WebView2
Classes | Functions | Variables

WebView2AutomationPeer.h File Reference

#include "WebView2AutomationPeer.g.h"
#include "WebView2.h"
#include "UIAutomationCore.h"

Go to the source code of this file.

Classes

class | WebView2AutomationPeer

Functions

virtual HRESULT STDMETHODCALLTYPE | IsCorrectPeerForHwnd (HWND hwnd, _Out_ bool *value)=0

Variables

IAutomationPeerHwndInterop | __pad0__

Function Documentation

virtual HRESULT STDMETHODCALLTYPE IsCorrectPeerForHwnd | ( | HWND | hwnd,
 |  | _Out_ bool * | value |
 | ) |  |  | [pure virtual]

Variable Documentation

IAutomationPeerHwndInterop __pad0__

Definition at line 15 of file WebView2AutomationPeer.h.

Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2AutomationPeer.idl File Reference

  • File List
  • File Members
  • WebView2
Namespaces | Variables

WebView2AutomationPeer.idl File Reference

Go to the source code of this file.

Namespaces

namespace | MU_XAP_NAMESPACE

Variables

unsealed runtimeclass | WebView2AutomationPeer
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2Utility.h File Reference

  • File List
  • File Members
  • WebView2
Namespaces | Functions

WebView2Utility.h File Reference

#include "pch.h"

Go to the source code of this file.

Namespaces

namespace | WebView2Utility

Functions

WPARAM | PackIntoWin32StyleMouseArgs_wparam (const UINT message, const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs &args, winrt::PointerPoint pointerPoint)
LPARAM | PackIntoWin32StylePointerArgs_lparam (const UINT message, const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs &args, winrt::Windows::Foundation::Point point)
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/InteractionTests/WebView2Tests.cs File Reference

  • File List
  • File Members
  • WebView2
  • InteractionTests
Classes | Namespaces

WebView2Tests.cs File Reference

Go to the source code of this file.

Classes

class | WebView2Tests
class | WebView2Tests::NativeMethods
class | WebView2Tests::WebView2TestSetupHelper
class | WebView2RenderingVerifier
class | WebView2RenderingVerifier::NativeMethods
struct | WebView2RenderingVerifier::NativeMethods::RECT

Namespaces

namespace | Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
namespace | WebView2Temporary
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2BasicPage.xaml.cs File Reference

  • File List
  • File Members
  • WebView2
  • TestUI
Classes | Namespaces

WebView2BasicPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | Bridge
class | BridgeAnotherClass
class | EnumToStringConverter
interface | ICoreWebView2Interop
class | UriToStringConverter
class | WebView2BasicPage
class | WebView2Extensions
class | WebView2WithCursor

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2Common.cs File Reference

  • File List
  • File Members
  • WebView2
  • TestUI
Classes | Namespaces

WebView2Common.cs File Reference

Go to the source code of this file.

Classes

class | WebView2Common

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2CoreObjectsPage.xaml.cs File Reference

  • File List
  • File Members
  • WebView2
  • TestUI
Classes | Namespaces

WebView2CoreObjectsPage.xaml.cs File Reference

Go to the source code of this file.

Classes

class | WebView2CoreObjectsPage

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2Page.xaml.cs File Reference

  • File List
  • File Members
  • WebView2
  • TestUI
Classes | Namespaces

WebView2Page.xaml.cs File Reference

Go to the source code of this file.

Classes

class | WebView2Page

Namespaces

namespace | MUXControlsTestApp
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Directory Hierarchy

Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • AnimatedIcon
    • AnimatedVisuals
    • APITests
    • TestUI
  • AnimatedVisualPlayer
    • inc
    • InteractionTests
    • TestUI
  • AnnotatedScrollBar
    • APITests
    • InteractionTests
    • TestUI
  • AutoSuggestBox
    • APITests
    • InteractionTests
    • TestUI
  • Breadcrumb
    • APITests
    • InteractionTests
    • TestUI
  • Collections
  • ColorPicker
    • APITests
    • InteractionTests
    • TestUI
  • ComboBox
    • APITests
    • TestUI
  • CommandBarFlyout
    • APITests
    • InteractionTests
    • TestUI
  • Common
  • CommonManaged
  • CommonStyles
    • APITests
    • InteractionTests
    • TestUI
  • dll
  • DropDownButton
    • InteractionTests
    • TestUI
  • Effects
  • Expander
    • APITests
    • InteractionTests
    • TestUI
  • Generated
  • IconSource
    • APITests
  • ImageIcon
    • APITests
    • InteractionTests
    • TestUI
  • inc
  • InfoBadge
    • APITests
    • TestUI
  • InfoBar
    • InteractionTests
    • TestUI
  • InkCanvas
  • InkToolBar
  • Interactions
    • ButtonInteraction
      • APITests
      • InteractionTests
      • TestUI
    • SliderInteraction
      • APITests
      • InteractionTests
      • TestUI
  • ItemContainer
    • APITests
    • InteractionTests
    • TestUI
  • ItemsView
    • APITests
    • InteractionTests
    • TestUI
  • LayoutPanel
    • APITests
  • Lights
    • ApiTests
      • Lights_ApiTests
  • MapControl
    • APITests
    • InteractionTests
    • TestUI
  • Materials
    • Acrylic
      • APITests
      • InteractionTests
      • TestUI
    • DesktopAcrylicBackdrop
    • MicaBackdrop
    • Reveal
      • APITests
      • InteractionTests
        • Reveal_InteractionTests
      • TestUI
  • MenuBar
    • MenuBar_InteractionTests
    • MenuBar_TestUI
  • Microsoft.UI.Xaml.Design
    • Properties
  • Microsoft.UI.Xaml.FrameworkPackagePRI
    • Properties
  • MonochromaticOverlayPresenter
    • TestUI
  • NavigationView
    • NavigationView_ApiTests
    • NavigationView_InteractionTests
    • TestUI
      • Common
      • CustomResources
      • Footer
      • Hierarchical
      • Regression
      • TopMode
  • NumberBox
    • APITests
    • InteractionTests
    • TestUI
  • PagerControl
    • APITests
    • InteractionTests
    • TestUI
  • ParallaxView
    • APITests
    • InteractionTests
    • TestUI
  • PersonPicture
    • APITests
    • InteractionTests
    • TestUI
  • PipsPager
    • APITests
    • InteractionTests
    • TestUI
  • ProgressBar
    • APITests
    • InteractionTests
    • TestUI
  • ProgressRing
    • AnimatedVisuals
    • APITests
    • InteractionTests
    • TestUI
  • PullToRefresh
    • PTRTracing
    • RefreshContainer
      • InteractionTests
      • TestUI
    • RefreshVisualizer
      • APITests
      • TestUI
    • ScrollViewerIRefreshInfoProviderAdapter
      • APITests
      • InteractionTests
      • TestUI
    • TestUI
  • RadialGradientBrush
    • InteractionTests
    • TestUI
  • RadioButtons
    • APITests
    • InteractionTests
    • TestUI
  • RadioMenuFlyoutItem
    • InteractionTests
    • TestUI
  • RatingControl
    • APITests
    • InteractionTests
    • TestUI
  • Repeater
    • APITests
      • Common
        • Mocks
    • InteractionTests
    • TestUI
      • Samples
        • AnimationSamples
        • DataModel
        • ItemsSourceSamples
        • ItemTemplateSamples
        • LayoutSamplePages
          • NonVirtual
          • Virtual
        • LayoutSamples
          • NestedLayoutSamples
          • NonVirtualLayoutPages
          • VirtualLayoutPages
        • NestedLayoutSamples
        • SelectionSample
          • Common
          • Flat
          • Grouped
          • TreeView
  • ResourceHelper
  • ScrollPresenter
    • APITests
    • InteractionTests
    • TestUI
  • ScrollView
    • APITests
    • InteractionTests
    • TestUI
  • SelectorBar
    • APITests
    • InteractionTests
    • TestUI
  • SplitButton
    • APITests
    • InteractionTests
    • TestUI
  • SplitView
    • TestUI
  • SwipeControl
    • SwipeControl_APITests
    • SwipeControl_InteractionTests
    • SwipeControl_TestUI
  • TabView
    • APITests
    • InteractionTests
    • TestUI
  • TeachingTip
    • APITests
    • InteractionTests
    • TestUI
  • Telemetry
  • TestHooks
  • TitleBar
    • InteractionTests
    • TestUI
  • TreeView
    • APITests
    • InteractionTests
    • TestUI
  • TwoPaneView
    • APITests
    • InteractionTests
    • TestUI
  • WebView2
    • InteractionTests
    • TestUI
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/ Directory Reference

  • AnimatedIcon

AnimatedIcon Directory Reference

Directories

directory | AnimatedVisuals
directory | APITests
directory | TestUI

Files

file | AnimatedIcon.cpp [code]
file | AnimatedIcon.h [code]
file | AnimatedIcon.idl [code]
file | AnimatedIconTestHooks.cpp [code]
file | AnimatedIconTestHooks.h [code]
file | AnimatedIconTestHooks.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/ Directory Reference

  • AnimatedIcon
  • AnimatedVisuals

AnimatedVisuals Directory Reference

Files

file | AnimatedAcceptVisualSource.cpp [code]
file | AnimatedAcceptVisualSource.h [code]
file | AnimatedAcceptVisualSource.idl [code]
file | AnimatedBackVisualSource.cpp [code]
file | AnimatedBackVisualSource.h [code]
file | AnimatedBackVisualSource.idl [code]
file | AnimatedChevronDownSmallVisualSource.cpp [code]
file | AnimatedChevronDownSmallVisualSource.h [code]
file | AnimatedChevronDownSmallVisualSource.idl [code]
file | AnimatedChevronRightDownSmallVisualSource.cpp [code]
file | AnimatedChevronRightDownSmallVisualSource.h [code]
file | AnimatedChevronRightDownSmallVisualSource.idl [code]
file | AnimatedChevronUpDownSmallVisualSource.cpp [code]
file | AnimatedChevronUpDownSmallVisualSource.h [code]
file | AnimatedChevronUpDownSmallVisualSource.idl [code]
file | AnimatedFindVisualSource.cpp [code]
file | AnimatedFindVisualSource.h [code]
file | AnimatedFindVisualSource.idl [code]
file | AnimatedGlobalNavigationButtonVisualSource.cpp [code]
file | AnimatedGlobalNavigationButtonVisualSource.h [code]
file | AnimatedGlobalNavigationButtonVisualSource.idl [code]
file | AnimatedSettingsVisualSource.cpp [code]
file | AnimatedSettingsVisualSource.h [code]
file | AnimatedSettingsVisualSource.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/APITests/ Directory Reference

  • AnimatedIcon
  • APITests

APITests Directory Reference

Files

file | AnimatedIconTests.cs [code]
file | MockAnimatedIconSource.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/ Directory Reference

  • AnimatedIcon
  • TestUI

TestUI Directory Reference

Files

file | AnimatedIconHost.cs [code]
file | AnimatedIconPage.xaml.cs [code]
file | BrightnessSun.cs [code]
file | ColorToSolidColorBrushConverter.cs [code]
file | DoubleToStringConverter.cs [code]
file | MockIRichAnimatedIconSource.cs [code]
file | ToggleAnimatedIconHost.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/ Directory Reference

  • AnimatedVisualPlayer

AnimatedVisualPlayer Directory Reference

Directories

directory | inc
directory | InteractionTests
directory | TestUI

Files

file | AnimatedVisualPlayer.cpp [code]
file | AnimatedVisualPlayer.h [code]
file | AnimatedVisualPlayer.idl [code]
file | AnimatedVisualPlayerAutomationPeer.cpp [code]
file | AnimatedVisualPlayerAutomationPeer.h [code]
file | AnimatedVisualPlayerAutomationPeer.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/inc/ Directory Reference

  • AnimatedVisualPlayer
  • inc

inc Directory Reference

Files

file Constants.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/InteractionTests/ Directory Reference

  • AnimatedVisualPlayer
  • InteractionTests

InteractionTests Directory Reference

Files

file AnimatedVisualPlayerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/TestUI/ Directory Reference

  • AnimatedVisualPlayer
  • TestUI

TestUI Directory Reference

Files

file | AnimatedVisualPlayerPage.xaml.cs [code]
file | LottieLogo.cs [code]
file | nullsource.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/ Directory Reference

  • AnnotatedScrollBar

AnnotatedScrollBar Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | AnnotatedScrollBar.cpp [code]
file | AnnotatedScrollBar.h [code]
file | AnnotatedScrollBar.idl [code]
file | AnnotatedScrollBarDetailLabelRequestedEventArgs.cpp [code]
file | AnnotatedScrollBarDetailLabelRequestedEventArgs.h [code]
file | AnnotatedScrollBarLabel.cpp [code]
file | AnnotatedScrollBarLabel.h [code]
file | AnnotatedScrollBarPanningInfo.cpp [code]
file | AnnotatedScrollBarPanningInfo.h [code]
file | AnnotatedScrollBarScrollingEventArgs.cpp [code]
file | AnnotatedScrollBarScrollingEventArgs.h [code]
file | AnnotatedScrollBarTrace.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/APITests/ Directory Reference

  • AnnotatedScrollBar
  • APITests

APITests Directory Reference

Files

file AnnotatedScrollBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/InteractionTests/ Directory Reference

  • AnnotatedScrollBar
  • InteractionTests

InteractionTests Directory Reference

Files

file AnnotatedScrollBarInteractionTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/ Directory Reference

  • AnnotatedScrollBar
  • TestUI

TestUI Directory Reference

Files

file | AnnotatedScrollBarIScrollControllerPage.xaml.cs [code]
file | AnnotatedScrollBarPage.xaml.cs [code]
file | AnnotatedScrollBarRangeBasePage.xaml.cs [code]
file | AnnotatedScrollBarSummaryPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/ Directory Reference

  • AutoSuggestBox

AutoSuggestBox Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | AutoSuggestBoxHelper.cpp [code]
file | AutoSuggestBoxHelper.h [code]
file | AutoSuggestBoxHelper.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/APITests/ Directory Reference

  • AutoSuggestBox
  • APITests

APITests Directory Reference

Files

file AutoSuggestBoxTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/InteractionTests/ Directory Reference

  • AutoSuggestBox
  • InteractionTests

InteractionTests Directory Reference

Files

file AutoSuggestBoxTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/TestUI/ Directory Reference

  • AutoSuggestBox
  • TestUI

TestUI Directory Reference

Files

file AutoSuggestBoxPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/ Directory Reference

  • Breadcrumb

Breadcrumb Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | BreadcrumbBar.cpp [code]
file | BreadcrumbBar.h [code]
file | BreadcrumbBar.idl [code]
file | BreadcrumbBarAutomationPeer.idl [code]
file | BreadcrumbBarElementFactory.cpp [code]
file | BreadcrumbBarElementFactory.h [code]
file | BreadcrumbBarItem.cpp [code]
file | BreadcrumbBarItem.h [code]
file | BreadcrumbBarItemAutomationPeer.cpp [code]
file | BreadcrumbBarItemAutomationPeer.h [code]
file | BreadcrumbBarItemClickedEventArgs.cpp [code]
file | BreadcrumbBarItemClickedEventArgs.h [code]
file | BreadcrumbItem.properties.cpp [code]
file | BreadcrumbItem.properties.h [code]
file | BreadcrumbIterable.cpp [code]
file | BreadcrumbIterable.h [code]
file | BreadcrumbIterator.cpp [code]
file | BreadcrumbIterator.h [code]
file | BreadcrumbLayout.cpp [code]
file | BreadcrumbLayout.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/APITests/ Directory Reference

  • Breadcrumb
  • APITests

APITests Directory Reference

Files

file BreadcrumbTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/InteractionTests/ Directory Reference

  • Breadcrumb
  • InteractionTests

InteractionTests Directory Reference

Files

file BreadcrumbBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/TestUI/ Directory Reference

  • Breadcrumb
  • TestUI

TestUI Directory Reference

Files

file | BreadcrumbBarAxeTestPage.xaml.cs [code]
file | BreadcrumbBarPage.xaml.cs [code]
file | TreeStructure.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/ Directory Reference

  • Collections

Collections Directory Reference

Files

file | BindableVector.h [code]
file | HashMap.h [code]
file | Vector.h [code]
file | VectorChangedEventArgs.h [code]
file | VectorIterator.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ Directory Reference

  • ColorPicker

ColorPicker Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ColorChangedEventArgs.cpp [code]
file | ColorChangedEventArgs.h [code]
file | ColorHelpers.cpp [code]
file | ColorHelpers.h [code]
file | ColorPicker.cpp [code]
file | ColorPicker.h [code]
file | ColorPicker.idl [code]
file | ColorPickerSlider.cpp [code]
file | ColorPickerSlider.h [code]
file | ColorPickerSlider.idl [code]
file | ColorPickerSliderAutomationPeer.cpp [code]
file | ColorPickerSliderAutomationPeer.h [code]
file | ColorPickerSliderAutomationPeer.idl [code]
file | ColorSpectrum.cpp [code]
file | ColorSpectrum.h [code]
file | ColorSpectrum.idl [code]
file | ColorSpectrumAutomationPeer.cpp [code]
file | ColorSpectrumAutomationPeer.h [code]
file | ColorSpectrumAutomationPeer.idl [code]
file | Common.idl [code]
file | SpectrumBrush.cpp [code]
file | SpectrumBrush.h [code]
file | SpectrumBrush.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/APITests/ Directory Reference

  • ColorPicker
  • APITests

APITests Directory Reference

Files

file ColorPickerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/InteractionTests/ Directory Reference

  • ColorPicker
  • InteractionTests

InteractionTests Directory Reference

Files

file ColorPickerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/TestUI/ Directory Reference

  • ColorPicker
  • TestUI

TestUI Directory Reference

Files

file ColorPickerPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/ Directory Reference

  • ComboBox

ComboBox Directory Reference

Directories

directory | APITests
directory | TestUI

Files

file | ComboBoxHelper.cpp [code]
file | ComboBoxHelper.h [code]
file | ComboBoxHelper.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/APITests/ Directory Reference

  • ComboBox
  • APITests

APITests Directory Reference

Files

file ComboBoxTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/TestUI/ Directory Reference

  • ComboBox
  • TestUI

TestUI Directory Reference

Files

file ComboBoxPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/ Directory Reference

  • CommandBarFlyout

CommandBarFlyout Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | CommandBarFlyout.cpp [code]
file | CommandBarFlyout.h [code]
file | CommandBarFlyout.idl [code]
file | CommandBarFlyoutCommandBar.cpp [code]
file | CommandBarFlyoutCommandBar.h [code]
file | CommandBarFlyoutCommandBar.idl [code]
file | CommandBarFlyoutCommandBarAutomationProperties.cpp [code]
file | CommandBarFlyoutCommandBarAutomationProperties.h [code]
file | CommandBarFlyoutCommandBarTemplateSettings.cpp [code]
file | CommandBarFlyoutCommandBarTemplateSettings.h [code]
file | CommandBarFlyoutTrace.h [code]
file | TextCommandBarFlyout.cpp [code]
file | TextCommandBarFlyout.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/APITests/ Directory Reference

  • CommandBarFlyout
  • APITests

APITests Directory Reference

Files

file CommandBarFlyoutTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/InteractionTests/ Directory Reference

  • CommandBarFlyout
  • InteractionTests

InteractionTests Directory Reference

Files

file | CommandBarFlyoutTests.cs [code]
file | TextCommandBarFlyoutTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TestUI/ Directory Reference

  • CommandBarFlyout
  • TestUI

TestUI Directory Reference

Files

file | CommandBarFlyoutMainPage.xaml.cs [code]
file | CommandBarFlyoutPage.xaml.cs [code]
file | ExtraCommandBarFlyoutPage.xaml.cs [code]
file | TextCommandBarFlyoutPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/ Directory Reference

  • Common

Common Directory Reference

Files

file | AutoHandle.h [code]
file | ColorConversion.cpp [code]
file | ColorConversion.h [code]
file | CornerRadiusFilterConverter.cpp [code]
file | CornerRadiusFilterConverter.h [code]
file | CornerRadiusFilterConverters.idl [code]
file | CornerRadiusToThicknessConverter.cpp [code]
file | CornerRadiusToThicknessConverter.h [code]
file | CornerRadiusToThicknessConverter.idl [code]
file | Flags_Enum.h [code]
file | LifetimeHandler.cpp [code]
file | LifetimeHandler.h [code]
file | PointerInfo.h [code]
file | PointerInfoRevokers.h [code]
file | WinEventLogLevels.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonManaged/ Directory Reference

  • CommonManaged

CommonManaged Directory Reference

Files

file PlatformConfiguration.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/ Directory Reference

  • CommonStyles

CommonStyles Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/APITests/ Directory Reference

  • CommonStyles
  • APITests

APITests Directory Reference

Files

file | BaselineResources2dot5stable.cs [code]
file | CalendarViewTests.cs [code]
file | CommonStylesTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/InteractionTests/ Directory Reference

  • CommonStyles
  • InteractionTests

InteractionTests Directory Reference

Files

file CommonStylesTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ Directory Reference

  • CommonStyles
  • TestUI

TestUI Directory Reference

Files

file | AppBarPage.xaml.cs [code]
file | BlankPage.xaml.cs [code]
file | BorderThicknessPage.xaml.cs [code]
file | CalendarDatePickerPage.xaml.cs [code]
file | CalendarViewPage.xaml.cs [code]
file | CheckBoxPage.xaml.cs [code]
file | CommandBarCenterPage.xaml.cs [code]
file | CommandBarPage.xaml.cs [code]
file | CommandBarSummaryPage.xaml.cs [code]
file | CommonStylesPage.xaml.cs [code]
file | CompactPage.xaml.cs [code]
file | ContentDialogPage.xaml.cs [code]
file | CornerRadiusPage.xaml.cs [code]
file | DatePickerPage.xaml.cs [code]
file | FlatItemsControlPage.xaml.cs [code]
file | FlipViewPage.xaml.cs [code]
file | GridViewPage.xaml.cs [code]
file | GroupedItemsControlPage.xaml.cs [code]
file | GroupedListViewBasePage.xaml.cs [code]
file | ImagePage.xaml.cs [code]
file | InkToolbarPage.xaml.cs [code]
file | ItemsControlPage.xaml.cs [code]
file | ListViewAnchoringPage.xaml.cs [code]
file | ListViewBasePage.xaml.cs [code]
file | ListViewElementNameBindingPage.xaml.cs [code]
file | ListViewPage.xaml.cs [code]
file | MediaTransportControlsPage.xaml.cs [code]
file | MenuFlyoutPage.xaml.cs [code]
file | NestedGridViewsPage.xaml.cs [code]
file | NestedItemsControlsPage.xaml.cs [code]
file | NestedListViewsPage.xaml.cs [code]
file | NewWindowRootPage.xaml.cs [code]
file | PivotPage.xaml.cs [code]
file | ScrollBarPage.xaml.cs [code]
file | ScrollViewerPage.xaml.cs [code]
file | SliderPage.xaml.cs [code]
file | TextControlsPage.xaml.cs [code]
file | TimePickerPage.xaml.cs [code]
file | ToolTipPage.xaml.cs [code]
file | VisualPropertiesPage.xaml.cs [code]
file | VisualStatesPage.xaml.cs [code]
file | WindowPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/ Directory Reference

  • dll

dll Directory Reference

Files

file | CommandingHelpers.cpp [code]
file | dllmain.cpp [code]
file | DoubleUtil.cpp [code]
file | FloatUtil.cpp [code]
file | MUXControlsFactory.cpp [code]
file | MUXControlsFactory.h [code]
file | pch.cpp [code]
file | pch.h [code]
file | RegUtil.cpp [code]
file | SharedHelpers.cpp [code]
file | targetver.h [code]
file | XamlControlsResources.cpp [code]
file | XamlControlsResources.h [code]
file | XamlMember.cpp [code]
file | XamlMember.h [code]
file | XamlMetadataDependencyLocator.cpp [code]
file | XamlMetadataProvider.cpp [code]
file | XamlMetadataProvider.h [code]
file | XamlMetadataProviderGenerated.h [code]
file | XamlType.cpp [code]
file | XamlType.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/ Directory Reference

  • DropDownButton

DropDownButton Directory Reference

Directories

directory | InteractionTests
directory | TestUI

Files

file | DropDownButton.cpp [code]
file | DropDownButton.h [code]
file | DropDownButton.idl [code]
file | DropDownButtonAutomationPeer.cpp [code]
file | DropDownButtonAutomationPeer.h [code]
file | DropDownButtonAutomationPeer.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/InteractionTests/ Directory Reference

  • DropDownButton
  • InteractionTests

InteractionTests Directory Reference

Files

file DropDownButtonTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/TestUI/ Directory Reference

  • DropDownButton
  • TestUI

TestUI Directory Reference

Files

file DropDownButtonPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Effects/ Directory Reference

  • Effects

Effects Directory Reference

Files

file | microsoft.ui.private.composition.effects.idl [code]
file | microsoft.ui.private.composition.effects_impl.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ Directory Reference

  • Expander

Expander Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | Expander.cpp [code]
file | Expander.h [code]
file | Expander.idl [code]
file | ExpanderAutomationPeer.cpp [code]
file | ExpanderAutomationPeer.h [code]
file | ExpanderAutomationPeer.idl [code]
file | ExpanderTemplateSettings.cpp [code]
file | ExpanderTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/APITests/ Directory Reference

  • Expander
  • APITests

APITests Directory Reference

Files

file ExpanderTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/InteractionTests/ Directory Reference

  • Expander
  • InteractionTests

InteractionTests Directory Reference

Files

file ExpanderTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/TestUI/ Directory Reference

  • Expander
  • TestUI

TestUI Directory Reference

Files

file ExpanderPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ Directory Reference

  • Generated

Generated Directory Reference

Files

file | AcrylicBrush.properties.cpp [code]
file | AcrylicBrush.properties.h [code]
file | AcrylicTestApi.properties.cpp [code]
file | AnimatedAcceptVisualSource.properties.cpp [code]
file | AnimatedBackVisualSource.properties.cpp [code]
file | AnimatedChevronDownSmallVisualSource.properties.cpp [code]
file | AnimatedChevronRightDownSmallVisualSource.properties.cpp [code]
file | AnimatedChevronUpDownSmallVisualSource.properties.cpp [code]
file | AnimatedFindVisualSource.properties.cpp [code]
file | AnimatedGlobalNavigationButtonVisualSource.properties.cpp [code]
file | AnimatedIcon.properties.cpp [code]
file | AnimatedIcon.properties.h [code]
file | AnimatedIconSource.properties.cpp [code]
file | AnimatedIconSource.properties.h [code]
file | AnimatedIconTestHooks.properties.cpp [code]
file | AnimatedSettingsVisualSource.properties.cpp [code]
file | AnimatedVisualPlayer.properties.cpp [code]
file | AnimatedVisualPlayer.properties.h [code]
file | AnimatedVisualPlayerAutomationPeer.properties.cpp [code]
file | AnnotatedScrollBar.properties.cpp [code]
file | AnnotatedScrollBar.properties.h [code]
file | AnnotatedScrollBarLabel.properties.cpp [code]
file | AutoSuggestBoxHelper.properties.cpp [code]
file | AutoSuggestBoxHelper.properties.h [code]
file | BreadcrumbBar.properties.cpp [code]
file | BreadcrumbBar.properties.h [code]
file | BreadcrumbBarItem.properties.cpp [code]
file | BreadcrumbBarItemAutomationPeer.properties.cpp [code]
file | ButtonInteraction.properties.cpp [code]
file | ButtonInteraction.properties.h [code]
file | ColorPicker.properties.cpp [code]
file | ColorPicker.properties.h [code]
file | ColorPickerSlider.properties.cpp [code]
file | ColorPickerSlider.properties.h [code]
file | ColorPickerSliderAutomationPeer.properties.cpp [code]
file | ColorSpectrum.properties.cpp [code]
file | ColorSpectrum.properties.h [code]
file | ColorSpectrumAutomationPeer.properties.cpp [code]
file | ColumnMajorUniformToLargestGridLayout.properties.cpp [code]
file | ColumnMajorUniformToLargestGridLayout.properties.h [code]
file | ComboBoxHelper.properties.cpp [code]
file | ComboBoxHelper.properties.h [code]
file | CommandBarFlyout.properties.cpp [code]
file | CommandBarFlyoutCommandBar.properties.cpp [code]
file | CommandBarFlyoutCommandBar.properties.h [code]
file | CommandBarFlyoutCommandBarAutomationProperties.properties.cpp [code]
file | CommandBarFlyoutCommandBarAutomationProperties.properties.h [code]
file | CommandBarFlyoutCommandBarTemplateSettings.properties.cpp [code]
file | CommandBarFlyoutCommandBarTemplateSettings.properties.h [code]
file | CornerRadiusFilterConverter.properties.cpp [code]
file | CornerRadiusFilterConverter.properties.h [code]
file | CornerRadiusToThicknessConverter.properties.cpp [code]
file | CornerRadiusToThicknessConverter.properties.h [code]
file | DesktopAcrylicBackdrop.properties.cpp [code]
file | DisplayRegionHelperTestApi.properties.cpp [code]
file | DropDownButton.properties.cpp [code]
file | DropDownButtonAutomationPeer.properties.cpp [code]
file | ElementFactory.properties.cpp [code]
file | Expander.properties.cpp [code]
file | Expander.properties.h [code]
file | ExpanderAutomationPeer.properties.cpp [code]
file | ExpanderTemplateSettings.properties.cpp [code]
file | ExpanderTemplateSettings.properties.h [code]
file | FlowLayout.properties.cpp [code]
file | FlowLayout.properties.h [code]
file | FlowLayoutState.properties.cpp [code]
file | ImageIcon.properties.cpp [code]
file | ImageIcon.properties.h [code]
file | ImageIconSource.properties.cpp [code]
file | ImageIconSource.properties.h [code]
file | IndexPath.properties.cpp [code]
file | InfoBadge.properties.cpp [code]
file | InfoBadge.properties.h [code]
file | InfoBadgeTemplateSettings.properties.cpp [code]
file | InfoBadgeTemplateSettings.properties.h [code]
file | InfoBar.properties.cpp [code]
file | InfoBar.properties.h [code]
file | InfoBarAutomationPeer.properties.cpp [code]
file | InfoBarClosedEventArgs.properties.cpp [code]
file | InfoBarClosingEventArgs.properties.cpp [code]
file | InfoBarPanel.properties.cpp [code]
file | InfoBarPanel.properties.h [code]
file | InfoBarTemplateSettings.properties.cpp [code]
file | InfoBarTemplateSettings.properties.h [code]
file | InkCanvas.properties.cpp [code]
file | InkCanvas.properties.h [code]
file | InkCanvasAutomationPeer.properties.cpp [code]
file | InkToolBar.properties.cpp [code]
file | InkToolBar.properties.h [code]
file | InkToolBarAutomationPeer.properties.cpp [code]
file | InkToolBarBallpointPenButton.properties.cpp [code]
file | InkToolBarCustomPen.properties.cpp [code]
file | InkToolBarCustomPenButton.properties.cpp [code]
file | InkToolBarCustomPenButton.properties.h [code]
file | InkToolBarCustomToggleButton.properties.cpp [code]
file | InkToolBarCustomToolButton.properties.cpp [code]
file | InkToolBarCustomToolButton.properties.h [code]
file | InkToolBarEraserButton.properties.cpp [code]
file | InkToolBarEraserButton.properties.h [code]
file | InkToolBarFlyoutItem.properties.cpp [code]
file | InkToolBarFlyoutItem.properties.h [code]
file | InkToolBarFlyoutItemAutomationPeer.properties.cpp [code]
file | InkToolBarHighlighterButton.properties.cpp [code]
file | InkToolBarMenuButton.properties.cpp [code]
file | InkToolBarMenuButton.properties.h [code]
file | InkToolBarMenuButtonAutomationPeer.properties.cpp [code]
file | InkToolBarPenButton.properties.cpp [code]
file | InkToolBarPenButton.properties.h [code]
file | InkToolBarPencilButton.properties.cpp [code]
file | InkToolBarPenConfigurationControl.properties.cpp [code]
file | InkToolBarPenConfigurationControl.properties.h [code]
file | InkToolBarStencilButton.properties.cpp [code]
file | InkToolBarStencilButton.properties.h [code]
file | InkToolBarToggleButton.properties.cpp [code]
file | InkToolBarToolButton.properties.cpp [code]
file | InkToolBarToolButton.properties.h [code]
file | InkToolBarToolButtonAutomationPeer.properties.cpp [code]
file | ItemCollectionTransitionProvider.properties.cpp [code]
file | ItemCollectionTransitionProvider.properties.h [code]
file | ItemContainer.properties.cpp [code]
file | ItemContainer.properties.h [code]
file | ItemContainerAutomationPeer.properties.cpp [code]
file | ItemsRepeater.properties.cpp [code]
file | ItemsRepeater.properties.h [code]
file | ItemsRepeaterScrollHost.properties.cpp [code]
file | ItemsSourceView.properties.cpp [code]
file | ItemsSourceView.properties.h [code]
file | ItemsView.properties.cpp [code]
file | ItemsView.properties.h [code]
file | ItemsViewAutomationPeer.properties.cpp [code]
file | ItemsViewTestHooks.properties.cpp [code]
file | Layout.properties.cpp [code]
file | Layout.properties.h [code]
file | LayoutContext.properties.cpp [code]
file | LayoutPanel.properties.cpp [code]
file | LayoutPanel.properties.h [code]
file | LayoutsTestHooks.properties.cpp [code]
file | LinedFlowLayout.properties.cpp [code]
file | LinedFlowLayout.properties.h [code]
file | LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp [code]
file | MapControl.properties.cpp [code]
file | MapControl.properties.h [code]
file | MapElement.properties.cpp [code]
file | MapElementClickEventArgs.properties.cpp [code]
file | MapElementsLayer.properties.cpp [code]
file | MapElementsLayer.properties.h [code]
file | MapIcon.properties.cpp [code]
file | MapIcon.properties.h [code]
file | MapLayer.properties.cpp [code]
file | MaterialHelperTestApi.properties.cpp [code]
file | MenuBar.properties.cpp [code]
file | MenuBar.properties.h [code]
file | MenuBarAutomationPeer.properties.cpp [code]
file | MenuBarItem.properties.cpp [code]
file | MenuBarItem.properties.h [code]
file | MenuBarItemAutomationPeer.properties.cpp [code]
file | MenuBarItemFlyout.properties.cpp [code]
file | MicaBackdrop.properties.cpp [code]
file | MicaBackdrop.properties.h [code]
file | MonochromaticOverlayPresenter.properties.cpp [code]
file | MonochromaticOverlayPresenter.properties.h [code]
file | MUXControlsTestHooks.properties.cpp [code]
file | NavigationView.properties.cpp [code]
file | NavigationView.properties.h [code]
file | NavigationViewAutomationPeer.properties.cpp [code]
file | NavigationViewItem.properties.cpp [code]
file | NavigationViewItem.properties.h [code]
file | NavigationViewItemAutomationPeer.properties.cpp [code]
file | NavigationViewItemBase.properties.cpp [code]
file | NavigationViewItemBase.properties.h [code]
file | NavigationViewItemHeader.properties.cpp [code]
file | NavigationViewItemInvokedEventArgs.properties.cpp [code]
file | NavigationViewItemPresenter.properties.cpp [code]
file | NavigationViewItemPresenter.properties.h [code]
file | NavigationViewItemPresenterTemplateSettings.properties.cpp [code]
file | NavigationViewItemPresenterTemplateSettings.properties.h [code]
file | NavigationViewItemSeparator.properties.cpp [code]
file | NavigationViewTemplateSettings.properties.cpp [code]
file | NavigationViewTemplateSettings.properties.h [code]
file | NonVirtualizingLayout.properties.cpp [code]
file | NonVirtualizingLayoutContext.properties.cpp [code]
file | NumberBox.properties.cpp [code]
file | NumberBox.properties.h [code]
file | NumberBoxAutomationPeer.properties.cpp [code]
file | PagerControl.properties.cpp [code]
file | PagerControl.properties.h [code]
file | PagerControlAutomationPeer.properties.cpp [code]
file | PagerControlTemplateSettings.properties.cpp [code]
file | PagerControlTemplateSettings.properties.h [code]
file | ParallaxView.properties.cpp [code]
file | ParallaxView.properties.h [code]
file | PersonPicture.properties.cpp [code]
file | PersonPicture.properties.h [code]
file | PersonPictureAutomationPeer.properties.cpp [code]
file | PersonPictureTemplateSettings.properties.cpp [code]
file | PersonPictureTemplateSettings.properties.h [code]
file | PipsPager.properties.cpp [code]
file | PipsPager.properties.h [code]
file | PipsPagerAutomationPeer.properties.cpp [code]
file | PipsPagerTemplateSettings.properties.cpp [code]
file | PipsPagerTemplateSettings.properties.h [code]
file | ProgressBar.properties.cpp [code]
file | ProgressBar.properties.h [code]
file | ProgressBarAutomationPeer.properties.cpp [code]
file | ProgressBarTemplateSettings.properties.cpp [code]
file | ProgressBarTemplateSettings.properties.h [code]
file | ProgressRing.properties.cpp [code]
file | ProgressRing.properties.h [code]
file | ProgressRingAutomationPeer.properties.cpp [code]
file | ProgressRingTemplateSettings.properties.cpp [code]
file | ProgressRingTemplateSettings.properties.h [code]
file | PullToRefreshHelperTestApi.properties.cpp [code]
file | RadialGradientBrush.properties.cpp [code]
file | RadialGradientBrush.properties.h [code]
file | RadioButtons.properties.cpp [code]
file | RadioButtons.properties.h [code]
file | RadioButtonsAutomationPeer.properties.cpp [code]
file | RadioButtonsTestHooks.properties.cpp [code]
file | RadioMenuFlyoutItem.properties.cpp [code]
file | RadioMenuFlyoutItem.properties.h [code]
file | RatingControl.properties.cpp [code]
file | RatingControl.properties.h [code]
file | RatingControlAutomationPeer.properties.cpp [code]
file | RatingItemFontInfo.properties.cpp [code]
file | RatingItemFontInfo.properties.h [code]
file | RatingItemImageInfo.properties.cpp [code]
file | RatingItemImageInfo.properties.h [code]
file | RatingItemInfo.properties.cpp [code]
file | RecyclePool.properties.cpp [code]
file | RecyclePool.properties.h [code]
file | RecyclingElementFactory.properties.cpp [code]
file | RecyclingElementFactory.properties.h [code]
file | RefreshContainer.properties.cpp [code]
file | RefreshContainer.properties.h [code]
file | RefreshVisualizer.properties.cpp [code]
file | RefreshVisualizer.properties.h [code]
file | RepeatedScrollSnapPoint.properties.cpp [code]
file | RepeatedZoomSnapPoint.properties.cpp [code]
file | RepeaterAutomationPeer.properties.cpp [code]
file | RepeaterTestHooks.properties.cpp [code]
file | RevealBackgroundBrush.properties.cpp [code]
file | RevealBorderBrush.properties.cpp [code]
file | RevealBorderLight.properties.cpp [code]
file | RevealBrush.properties.cpp [code]
file | RevealBrush.properties.h [code]
file | RevealBrushTestApi.properties.cpp [code]
file | RevealHoverLight.properties.cpp [code]
file | RevealListViewItemPresenter.properties.cpp [code]
file | RevealTestApi.properties.cpp [code]
file | ScrollControllerAddScrollVelocityRequestedEventArgs.properties.cpp [code]
file | ScrollControllerPanRequestedEventArgs.properties.cpp [code]
file | ScrollControllerScrollByRequestedEventArgs.properties.cpp [code]
file | ScrollControllerScrollToRequestedEventArgs.properties.cpp [code]
file | ScrollingScrollOptions.properties.cpp [code]
file | ScrollingZoomOptions.properties.cpp [code]
file | ScrollPresenter.properties.cpp [code]
file | ScrollPresenter.properties.h [code]
file | ScrollPresenterAutomationPeer.properties.cpp [code]
file | ScrollPresenterTestHooks.properties.cpp [code]
file | ScrollSnapPoint.properties.cpp [code]
file | ScrollSnapPointBase.properties.cpp [code]
file | ScrollView.properties.cpp [code]
file | ScrollView.properties.h [code]
file | ScrollViewerIRefreshInfoProviderAdapter.properties.cpp [code]
file | ScrollViewTestHooks.properties.cpp [code]
file | SelectionModel.properties.cpp [code]
file | SelectionModel.properties.h [code]
file | SelectorBar.properties.cpp [code]
file | SelectorBar.properties.h [code]
file | SelectorBarItem.properties.cpp [code]
file | SelectorBarItem.properties.h [code]
file | SelectorBarItemAutomationPeer.properties.cpp [code]
file | SelectorBarTestHooks.properties.cpp [code]
file | SliderInteraction.properties.cpp [code]
file | SliderInteraction.properties.h [code]
file | SnapPointBase.properties.cpp [code]
file | SpectrumBrush.properties.cpp [code]
file | SpectrumBrush.properties.h [code]
file | SplitButton.properties.cpp [code]
file | SplitButton.properties.h [code]
file | SplitButtonAutomationPeer.properties.cpp [code]
file | SplitButtonTestApi.properties.cpp [code]
file | StackLayout.properties.cpp [code]
file | StackLayout.properties.h [code]
file | StackLayoutState.properties.cpp [code]
file | SwipeControl.properties.cpp [code]
file | SwipeControl.properties.h [code]
file | SwipeItem.properties.cpp [code]
file | SwipeItem.properties.h [code]
file | SwipeItems.properties.cpp [code]
file | SwipeItems.properties.h [code]
file | SwipeTestHooks.properties.cpp [code]
file | TabView.properties.cpp [code]
file | TabView.properties.h [code]
file | TabViewAutomationPeer.properties.cpp [code]
file | TabViewItem.properties.cpp [code]
file | TabViewItem.properties.h [code]
file | TabViewItemAutomationPeer.properties.cpp [code]
file | TabViewItemTemplateSettings.properties.cpp [code]
file | TabViewItemTemplateSettings.properties.h [code]
file | TabViewListView.properties.cpp [code]
file | TeachingTip.properties.cpp [code]
file | TeachingTip.properties.h [code]
file | TeachingTipAutomationPeer.properties.cpp [code]
file | TeachingTipTemplateSettings.properties.cpp [code]
file | TeachingTipTemplateSettings.properties.h [code]
file | TeachingTipTestHooks.properties.cpp [code]
file | TextCommandBarFlyout.properties.cpp [code]
file | TitleBar.properties.cpp [code]
file | TitleBar.properties.h [code]
file | TitleBarAutomationPeer.properties.cpp [code]
file | TitleBarTemplateSettings.properties.cpp [code]
file | TitleBarTemplateSettings.properties.h [code]
file | ToggleSplitButton.properties.cpp [code]
file | ToggleSplitButton.properties.h [code]
file | ToggleSplitButtonAutomationPeer.properties.cpp [code]
file | TreeView.properties.cpp [code]
file | TreeView.properties.h [code]
file | TreeViewItem.properties.cpp [code]
file | TreeViewItem.properties.h [code]
file | TreeViewItemAutomationPeer.properties.cpp [code]
file | TreeViewItemDataAutomationPeer.properties.cpp [code]
file | TreeViewItemTemplateSettings.properties.cpp [code]
file | TreeViewItemTemplateSettings.properties.h [code]
file | TreeViewList.properties.cpp [code]
file | TreeViewListAutomationPeer.properties.cpp [code]
file | TreeViewNode.properties.cpp [code]
file | TreeViewNode.properties.h [code]
file | TwoPaneView.properties.cpp [code]
file | TwoPaneView.properties.h [code]
file | UniformGridLayout.properties.cpp [code]
file | UniformGridLayout.properties.h [code]
file | UniformGridLayoutState.properties.cpp [code]
file | VirtualizingLayout.properties.cpp [code]
file | VirtualizingLayoutContext.properties.cpp [code]
file | WebView2.properties.cpp [code]
file | WebView2.properties.h [code]
file | WebView2AutomationPeer.properties.cpp [code]
file | XamlAmbientLight.properties.cpp [code]
file | XamlAmbientLight.properties.h [code]
file | XamlControlsResources.properties.cpp [code]
file | XamlControlsResources.properties.h [code]
file | XamlControlsXamlMetaDataProvider.properties.cpp [code]
file | ZoomSnapPoint.properties.cpp [code]
file | ZoomSnapPointBase.properties.cpp [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/ Directory Reference

  • IconSource

IconSource Directory Reference

Directories

directory | APITests

Files

file | AnimatedIconSource.cpp [code]
file | AnimatedIconSource.h [code]
file | IconSource.idl [code]
file | ImageIconSource.cpp [code]
file | ImageIconSource.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/APITests/ Directory Reference

  • IconSource
  • APITests

APITests Directory Reference

Files

file IconSourceApiTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/ Directory Reference

  • ImageIcon

ImageIcon Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ImageIcon.cpp [code]
file | ImageIcon.h [code]
file | ImageIcon.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/APITests/ Directory Reference

  • ImageIcon
  • APITests

APITests Directory Reference

Files

file ImageIconTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/InteractionTests/ Directory Reference

  • ImageIcon
  • InteractionTests

InteractionTests Directory Reference

Files

file ImageIconTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/TestUI/ Directory Reference

  • ImageIcon
  • TestUI

TestUI Directory Reference

Files

file ImageIconPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/ Directory Reference

  • inc

inc Directory Reference

Files

file | AutoHandle.h [code]
file | BoxHelpers.h [code]
file | BuildMacros.h [code]
file | CastHelpers.h [code]
file | CollectionHelper.h [code]
file | CommandingHelpers.h [code]
file | common.h [code]
file | CppWinRTHelpers.h [code]
file | CppWinRTIncludes.h [code]
file | DispatcherHelper.h [code]
file | DoubleUtil.h [code]
file | enum_array.h [code]
file | enum_vector.h [code]
file | ErrorHandling.h [code]
file | event.h [code]
file | FloatUtil.h [code]
file | FocusHelper.h [code]
file | GlobalDependencyProperty.h [code]
file | RegUtil.h [code]
file | RoutedEventHelpers.h [code]
file | RuntimeClassHelpers.h [code]
file | SharedHelpers.h [code]
file | StaticAssertFalse.h [code]
file | tracker_ref.h [code]
file | velocity.h [code]
file | WinEventLogLevels.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/ Directory Reference

  • InfoBadge

InfoBadge Directory Reference

Directories

directory | APITests
directory | TestUI

Files

file | InfoBadge.cpp [code]
file | InfoBadge.h [code]
file | InfoBadge.idl [code]
file | InfoBadgeTemplateSettings.cpp [code]
file | InfoBadgeTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/APITests/ Directory Reference

  • InfoBadge
  • APITests

APITests Directory Reference

Files

file InfoBadgeTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/TestUI/ Directory Reference

  • InfoBadge
  • TestUI

TestUI Directory Reference

Files

file InfoBadgePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/ Directory Reference

  • InfoBar

InfoBar Directory Reference

Directories

directory | InteractionTests
directory | TestUI

Files

file | InfoBar.cpp [code]
file | InfoBar.h [code]
file | InfoBar.idl [code]
file | InfoBarAutomationPeer.cpp [code]
file | InfoBarAutomationPeer.h [code]
file | InfoBarClosedEventArgs.cpp [code]
file | InfoBarClosedEventArgs.h [code]
file | InfoBarClosingEventArgs.cpp [code]
file | InfoBarClosingEventArgs.h [code]
file | InfoBarPanel.cpp [code]
file | InfoBarPanel.h [code]
file | InfoBarTemplateSettings.cpp [code]
file | InfoBarTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InteractionTests/ Directory Reference

  • InfoBar
  • InteractionTests

InteractionTests Directory Reference

Files

file InfoBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/TestUI/ Directory Reference

  • InfoBar
  • TestUI

TestUI Directory Reference

Files

file | InfobarAxeTestage.xaml.cs [code]
file | InfoBarPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/ Directory Reference

  • InkCanvas

InkCanvas Directory Reference

Files

file | InkCanvas.cpp [code]
file | InkCanvas.h [code]
file | InkCanvas.idl [code]
file | InkCanvasAutomationPeer.cpp [code]
file | InkCanvasAutomationPeer.h [code]
file | InkCanvasAutomationPeer.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/ Directory Reference

  • InkToolBar

InkToolBar Directory Reference

Files

file | InkToolBar.h [code]
file | InkToolBar.idl [code]
file | InkToolbarAutomationPeer.h [code]
file | InkToolBarAutomationPeer.idl [code]
file | InkToolBarBallpointPenButton.h [code]
file | InkToolBarCustomPen.h [code]
file | InkToolBarCustomPenButton.h [code]
file | InkToolBarCustomToggleButton.h [code]
file | InkToolBarCustomToolButton.h [code]
file | InkToolBarEraserButton.h [code]
file | InkToolBarEraserButtonInternal.h [code]
file | InkToolBarEraserFlyoutItemClickedEventArgs.h [code]
file | InkToolBarFlyoutItem.h [code]
file | InkToolBarFlyoutItemAutomationPeer.h [code]
file | InkToolBarHighlighterButton.h [code]
file | InkToolBarIsStencilButtonCheckedChangedEventArgs.h [code]
file | InkToolBarMenuButton.h [code]
file | InkToolBarMenuButtonAutomationPeer.h [code]
file | InkToolBarPenButton.h [code]
file | InktoolBarPencilButton.h [code]
file | InkToolBarPenConfigurationControl.h [code]
file | InkToolBarStencilButton.h [code]
file | InkToolBarToggleButton.h [code]
file | InkToolBarToolButton.h [code]
file | InkToolBarToolButtonAutomationPeer.h [code]
file | InkToolBarTrace.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ Directory Reference

  • Interactions

Interactions Directory Reference

Directories

directory | ButtonInteraction
directory | SliderInteraction
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ Directory Reference

  • Interactions
  • ButtonInteraction

ButtonInteraction Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ButtonInteraction.cpp [code]
file | ButtonInteraction.h [code]
file | ButtonInteraction.idl [code]
file | ButtonInteractionInvokedEventArgs.cpp [code]
file | ButtonInteractionInvokedEventArgs.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/APITests/ Directory Reference

  • Interactions
  • ButtonInteraction
  • APITests

APITests Directory Reference

Files

file ButtonInteractionTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/InteractionTests/ Directory Reference

  • Interactions
  • ButtonInteraction
  • InteractionTests

InteractionTests Directory Reference

Files

file ButtonInteractionTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/TestUI/ Directory Reference

  • Interactions
  • ButtonInteraction
  • TestUI

TestUI Directory Reference

Files

file | ButtonInteractionPage.xaml.cs [code]
file | TargetElement.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/ Directory Reference

  • Interactions
  • SliderInteraction

SliderInteraction Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | SliderInteraction.cpp [code]
file | SliderInteraction.h [code]
file | SliderInteraction.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/APITests/ Directory Reference

  • Interactions
  • SliderInteraction
  • APITests

APITests Directory Reference

Files

file SliderInteractionTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/InteractionTests/ Directory Reference

  • Interactions
  • SliderInteraction
  • InteractionTests

InteractionTests Directory Reference

Files

file SliderInteractionTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/TestUI/ Directory Reference

  • Interactions
  • SliderInteraction
  • TestUI

TestUI Directory Reference

Files

file SliderInteractionPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ Directory Reference

  • ItemContainer

ItemContainer Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ItemContainer.cpp [code]
file | ItemContainer.h [code]
file | ItemContainer.idl [code]
file | ItemContainerAutomationPeer.cpp [code]
file | ItemContainerAutomationPeer.h [code]
file | ItemContainerInvokedEventArgs.cpp [code]
file | ItemContainerInvokedEventArgs.h [code]
file | ItemContainerRevokers.h [code]
file | ItemContainerTrace.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/APITests/ Directory Reference

  • ItemContainer
  • APITests

APITests Directory Reference

Files

file ItemContainerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/InteractionTests/ Directory Reference

  • ItemContainer
  • InteractionTests

InteractionTests Directory Reference

Files

file ItemContainerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/TestUI/ Directory Reference

  • ItemContainer
  • TestUI

TestUI Directory Reference

Files

file | ItemContainerLayoutPage.xaml.cs [code]
file | ItemContainerPage.xaml.cs [code]
file | ItemContainerSummaryPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ Directory Reference

  • ItemsView

ItemsView Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ExtendedSelector.cpp [code]
file | ExtendedSelector.h [code]
file | ItemsView.cpp [code]
file | ItemsView.h [code]
file | ItemsView.idl [code]
file | ItemsViewAutomationPeer.cpp [code]
file | ItemsViewAutomationPeer.h [code]
file | ItemsViewInteractions.cpp [code]
file | ItemsViewItemInvokedEventArgs.cpp [code]
file | ItemsViewItemInvokedEventArgs.h [code]
file | ItemsViewSelectionChangedEventArgs.cpp [code]
file | ItemsViewSelectionChangedEventArgs.h [code]
file | ItemsViewTestHooks.cpp [code]
file | ItemsViewTestHooks.h [code]
file | ItemsViewTestHooks.idl [code]
file | ItemsViewTestHooksFactory.cpp [code]
file | ItemsViewTestHooksFactory.h [code]
file | ItemsViewTrace.h [code]
file | MultipleSelector.cpp [code]
file | MultipleSelector.h [code]
file | NullSelector.cpp [code]
file | NullSelector.h [code]
file | SelectorBase.cpp [code]
file | SelectorBase.h [code]
file | SingleSelector.cpp [code]
file | SingleSelector.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/APITests/ Directory Reference

  • ItemsView
  • APITests

APITests Directory Reference

Files

file ItemsViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/InteractionTests/ Directory Reference

  • ItemsView
  • InteractionTests

InteractionTests Directory Reference

Files

file ItemsViewTestsWithInputHelper.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ Directory Reference

  • ItemsView
  • TestUI

TestUI Directory Reference

Files

file | ItemsViewBlankPage.xaml.cs [code]
file | ItemsViewIntegrationPage.xaml.cs [code]
file | ItemsViewInteractiveTestsPage.xaml.cs [code]
file | ItemsViewPage.xaml.cs [code]
file | ItemsViewPictureLibraryPage.xaml.cs [code]
file | ItemsViewSummaryPage.xaml.cs [code]
file | ItemsViewTransitionPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/ Directory Reference

  • LayoutPanel

LayoutPanel Directory Reference

Directories

directory | APITests

Files

file | LayoutPanel.cpp [code]
file | LayoutPanel.h [code]
file | LayoutPanel.idl [code]
file | LayoutPanelLayoutContext.cpp [code]
file | LayoutPanelLayoutContext.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/APITests/ Directory Reference

  • LayoutPanel
  • APITests

APITests Directory Reference

Files

file LayoutPanelTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/ Directory Reference

  • Lights

Lights Directory Reference

Directories

directory | ApiTests

Files

file | AnimationUtility.cpp [code]
file | AnimationUtility.h [code]
file | IsTargetDPHelper.h [code]
file | MaterialHelper.cpp [code]
file | MaterialHelper.h [code]
file | MaterialHelperTestApi.cpp [code]
file | MaterialHelperTestApi.h [code]
file | MaterialHelperTestApi.idl [code]
file | MaterialHelperTestApiFactory.cpp [code]
file | MaterialHelperTestApiFactory.h [code]
file | RevealBorderLight.cpp [code]
file | RevealBorderLight.h [code]
file | RevealBorderLight.idl [code]
file | RevealHoverLight.cpp [code]
file | RevealHoverLight.h [code]
file | RevealHoverLight.idl [code]
file | RevealTestApi.cpp [code]
file | RevealTestApi.h [code]
file | RevealTestApi.idl [code]
file | SpotLightStateHelper.cpp [code]
file | SpotLightStateHelper.h [code]
file | XamlAmbientLight.cpp [code]
file | XamlAmbientLight.h [code]
file | XamlAmbientLight.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/ApiTests/ Directory Reference

  • Lights
  • ApiTests

ApiTests Directory Reference

Directories

directory Lights_ApiTests
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/ApiTests/Lights_ApiTests/ Directory Reference

  • Lights
  • ApiTests
  • Lights_ApiTests

Lights_ApiTests Directory Reference

Files

file LightConfigurationTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/ Directory Reference

  • MapControl

MapControl Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | MapControl.cpp [code]
file | MapControl.h [code]
file | MapControl.idl [code]
file | MapControlMapServiceErrorOccurredEventArgs.cpp [code]
file | MapControlMapServiceErrorOccurredEventArgs.h [code]
file | MapElement.cpp [code]
file | MapElement.h [code]
file | MapElementClickEventArgs.cpp [code]
file | MapElementClickEventArgs.h [code]
file | MapElementsLayer.cpp [code]
file | MapElementsLayer.h [code]
file | MapIcon.cpp [code]
file | MapIcon.h [code]
file | MapLayer.cpp [code]
file | MapLayer.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/APITests/ Directory Reference

  • MapControl
  • APITests

APITests Directory Reference

Files

file MapControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/InteractionTests/ Directory Reference

  • MapControl
  • InteractionTests

InteractionTests Directory Reference

Files

file MapControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/TestUI/ Directory Reference

  • MapControl
  • TestUI

TestUI Directory Reference

Files

file | MapControlApiKey.cs [code]
file | MapControlPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/ Directory Reference

  • Materials

Materials Directory Reference

Directories

directory | Acrylic
directory | DesktopAcrylicBackdrop
directory | MicaBackdrop
directory | Reveal
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/ Directory Reference

  • Materials
  • Acrylic

Acrylic Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | AcrylicBrush.cpp [code]
file | AcrylicBrush.h [code]
file | AcrylicBrush.idl [code]
file | AcrylicBrushFactory.cpp [code]
file | AcrylicBrushFactory.h [code]
file | AcrylicTestApi.cpp [code]
file | AcrylicTestApi.h [code]
file | AcrylicTestApi.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/APITests/ Directory Reference

  • Materials
  • Acrylic
  • APITests

APITests Directory Reference

Files

file AcrylicBrushTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/InteractionTests/ Directory Reference

  • Materials
  • Acrylic
  • InteractionTests

InteractionTests Directory Reference

Files

file AcrylicBrushTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/ Directory Reference

  • Materials
  • Acrylic
  • TestUI

TestUI Directory Reference

Files

file | AcrylicBrushBasicPage.xaml.cs [code]
file | AcrylicBrushLuminosityTestPage.xaml.cs [code]
file | AcrylicBrushPage.xaml.cs [code]
file | AcrylicColorPage.xaml.cs [code]
file | AcrylicMarkupPage.xaml.cs [code]
file | AcrylicPage.xaml.cs [code]
file | AcrylicRenderingPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/DesktopAcrylicBackdrop/ Directory Reference

  • Materials
  • DesktopAcrylicBackdrop

DesktopAcrylicBackdrop Directory Reference

Files

file | DesktopAcrylicBackdrop.cpp [code]
file | DesktopAcrylicBackdrop.h [code]
file | DesktopAcrylicBackdrop.idl [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/MicaBackdrop/ Directory Reference

  • Materials
  • MicaBackdrop

MicaBackdrop Directory Reference

Files

file | MicaBackdrop.cpp [code]
file | MicaBackdrop.h [code]
file | MicaBackdrop.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/ Directory Reference

  • Materials
  • Reveal

Reveal Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | RevealBackgroundBrush.h [code]
file | RevealBorderBrush.h [code]
file | RevealBrush.cpp [code]
file | RevealBrush.h [code]
file | RevealBrush.idl [code]
file | RevealBrushTestApi.cpp [code]
file | RevealBrushTestApi.h [code]
file | RevealBrushTestApi.idl [code]
file | RevealControls.idl [code]
file | RevealListViewItemPresenter.cpp [code]
file | RevealListViewItemPresenter.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/APITests/ Directory Reference

  • Materials
  • Reveal
  • APITests

APITests Directory Reference

Files

file RevealTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/InteractionTests/ Directory Reference

  • Materials
  • Reveal
  • InteractionTests

InteractionTests Directory Reference

Directories

directory Reveal_InteractionTests
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/InteractionTests/Reveal_InteractionTests/ Directory Reference

  • Materials
  • Reveal
  • InteractionTests
  • Reveal_InteractionTests

Reveal_InteractionTests Directory Reference

Files

file RevealBrushTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/ Directory Reference

  • Materials
  • Reveal
  • TestUI

TestUI Directory Reference

Files

file | CoreWindowEventsPage.xaml.cs [code]
file | RevealBasicPage.xaml.cs [code]
file | RevealColorPage.xaml.cs [code]
file | RevealFallbackPage.xaml.cs [code]
file | RevealListPage.xaml.cs [code]
file | RevealMarkupPage.xaml.cs [code]
file | RevealPage.xaml.cs [code]
file | RevealRegressionTestsPage.xaml.cs [code]
file | RevealScenarioColors.xaml.cs [code]
file | RevealScenarioGrid.xaml.cs [code]
file | RevealScenarioLights.xaml.cs [code]
file | RevealScenarioList.xaml.cs [code]
file | RevealScenarios.xaml.cs [code]
file | RevealScenarioSecondaryView.xaml.cs [code]
file | RevealSimpleListPage.xaml.cs [code]
file | RevealStatesPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/ Directory Reference

  • MenuBar

MenuBar Directory Reference

Directories

directory | MenuBar_InteractionTests
directory | MenuBar_TestUI

Files

file | MenuBar.cpp [code]
file | MenuBar.h [code]
file | MenuBar.idl [code]
file | MenuBarAutomationPeer.cpp [code]
file | MenuBarAutomationPeer.h [code]
file | MenuBarAutomationPeer.idl [code]
file | MenuBarItem.cpp [code]
file | MenuBarItem.h [code]
file | MenuBarItemAutomationPeer.cpp [code]
file | MenuBarItemAutomationPeer.h [code]
file | MenuBarItemFlyout.cpp [code]
file | MenuBarItemFlyout.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar_InteractionTests/ Directory Reference

  • MenuBar
  • MenuBar_InteractionTests

MenuBar_InteractionTests Directory Reference

Files

file MenuBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar_TestUI/ Directory Reference

  • MenuBar
  • MenuBar_TestUI

MenuBar_TestUI Directory Reference

Files

file MenuBarPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.Design/ Directory Reference

  • Microsoft.UI.Xaml.Design

Microsoft.UI.Xaml.Design Directory Reference

Directories

directory | Properties

Files

file | RegisterMetadata.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.Design/Properties/ Directory Reference

  • Microsoft.UI.Xaml.Design
  • Properties

Properties Directory Reference

Files

file AssemblyInfo.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.FrameworkPackagePRI/ Directory Reference

  • Microsoft.UI.Xaml.FrameworkPackagePRI

Microsoft.UI.Xaml.FrameworkPackagePRI Directory Reference

Directories

directory Properties
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.FrameworkPackagePRI/Properties/ Directory Reference

  • Microsoft.UI.Xaml.FrameworkPackagePRI
  • Properties

Properties Directory Reference

Files

file AssemblyInfo.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/ Directory Reference

  • MonochromaticOverlayPresenter

MonochromaticOverlayPresenter Directory Reference

Directories

directory | TestUI

Files

file | MonochromaticOverlayPresenter.cpp [code]
file | MonochromaticOverlayPresenter.h [code]
file | MonochromaticOverlayPresenter.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/TestUI/ Directory Reference

  • MonochromaticOverlayPresenter
  • TestUI

TestUI Directory Reference

Files

file MonochromaticOverlayPresenterPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/ Directory Reference

  • NavigationView

NavigationView Directory Reference

Directories

directory | NavigationView_ApiTests
directory | NavigationView_InteractionTests
directory | TestUI

Files

file | NavigationView.cpp [code]
file | NavigationView.h [code]
file | NavigationView.idl [code]
file | NavigationViewAutomationPeer.cpp [code]
file | NavigationViewAutomationPeer.h [code]
file | NavigationViewBackRequestedEventArgs.cpp [code]
file | NavigationViewBackRequestedEventArgs.h [code]
file | NavigationViewDisplayModeChangedEventArgs.cpp [code]
file | NavigationViewDisplayModeChangedEventArgs.h [code]
file | NavigationViewHelper.h [code]
file | NavigationViewItem.cpp [code]
file | NavigationViewItem.h [code]
file | NavigationViewItemAutomationPeer.cpp [code]
file | NavigationViewItemAutomationPeer.h [code]
file | NavigationViewItemAutomationPeer.idl [code]
file | NavigationViewItemBase.cpp [code]
file | NavigationViewItemBase.h [code]
file | NavigationViewItemBaseRevokers.h [code]
file | NavigationViewItemCollapsedEventArgs.cpp [code]
file | NavigationViewItemCollapsedEventArgs.h [code]
file | NavigationViewItemExpandingEventArgs.cpp [code]
file | NavigationViewItemExpandingEventArgs.h [code]
file | NavigationViewItemHeader.cpp [code]
file | NavigationViewItemHeader.h [code]
file | NavigationViewItemInvokedEventArgs.cpp [code]
file | NavigationViewItemInvokedEventArgs.h [code]
file | NavigationViewItemPresenter.cpp [code]
file | NavigationViewItemPresenter.h [code]
file | NavigationViewItemPresenter.idl [code]
file | NavigationViewItemPresenterTemplateSettings.cpp [code]
file | NavigationViewItemPresenterTemplateSettings.h [code]
file | NavigationViewItemSeparator.cpp [code]
file | NavigationViewItemSeparator.h [code]
file | NavigationViewItemsFactory.cpp [code]
file | NavigationViewItemsFactory.h [code]
file | NavigationViewPaneClosingEventArgs.cpp [code]
file | NavigationViewPaneClosingEventArgs.h [code]
file | NavigationViewSelectionChangedEventArgs.cpp [code]
file | NavigationViewSelectionChangedEventArgs.h [code]
file | NavigationViewTemplateSettings.cpp [code]
file | NavigationViewTemplateSettings.h [code]
file | NavigationViewTrace.h [code]
file | SplitDataSourceBase.h [code]
file | TopNavigationViewDataProvider.cpp [code]
file | TopNavigationViewDataProvider.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_ApiTests/ Directory Reference

  • NavigationView
  • NavigationView_ApiTests

NavigationView_ApiTests Directory Reference

Files

file NavigationViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/ Directory Reference

  • NavigationView
  • NavigationView_InteractionTests

NavigationView_InteractionTests Directory Reference

Files

file | CommonTests.cs [code]
file | EventTests.cs [code]
file | FocusBehaviorTests.cs [code]
file | NavigationViewTestsBase.cs [code]
file | PaneBehaviorTests.cs [code]
file | SelectionTests.cs [code]
file | TopModeTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/ Directory Reference

  • NavigationView
  • TestUI

TestUI Directory Reference

Directories

directory | Common
directory | CustomResources
directory | Footer
directory | Hierarchical
directory | Regression
directory | TopMode

Files

file | DialogWithNavView.xaml.cs [code]
file | NavigationViewAxeTestPage.xaml.cs [code]
file | NavigationViewCaseBundle.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/ Directory Reference

  • NavigationView
  • TestUI
  • Common

Common Directory Reference

Files

file | NavigationViewAnimationPage.xaml.cs [code]
file | NavigationViewBlankPage1.xaml.cs [code]
file | NavigationViewCompactPaneLengthTestPage.xaml.cs [code]
file | NavigationViewInfoBadge.xaml.cs [code]
file | NavigationViewInitPage.xaml.cs [code]
file | NavigationViewIsPaneOpenPage.xaml.cs [code]
file | NavigationViewMenuItemsSourcePage.xaml.cs [code]
file | NavigationViewMenuItemStretchPage.xaml.cs [code]
file | NavigationViewMinimalPage.xaml.cs [code]
file | NavigationViewPage.xaml.cs [code]
file | NavigationViewPageDataContext.xaml.cs [code]
file | NavigationViewSelectedItemEdgeCasePage.xaml.cs [code]
file | NavigationViewStretchPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/ Directory Reference

  • NavigationView
  • TestUI
  • CustomResources

CustomResources Directory Reference

Files

file | CustomNavigationViewItem.xaml.cs [code]
file | NavigationViewCustomMenuItemPage.xaml.cs [code]
file | NavigationViewCustomThemeResourcesPage.xaml.cs [code]
file | NavigationViewItemTemplatePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Footer/ Directory Reference

  • NavigationView
  • TestUI
  • Footer

Footer Directory Reference

Files

file | PaneFooterTestPage.xaml.cs [code]
file | PaneLayoutTestPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Hierarchical/ Directory Reference

  • NavigationView
  • TestUI
  • Hierarchical

Hierarchical Directory Reference

Files

file | HierarchicalNavigationViewDataBinding.xaml.cs [code]
file | HierarchicalNavigationViewMarkup.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Regression/ Directory Reference

  • NavigationView
  • TestUI
  • Regression

Regression Directory Reference

Files

file | NavigationViewRS3Page.xaml.cs [code]
file | NavigationViewRS4Page.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/ Directory Reference

  • NavigationView
  • TestUI
  • TopMode

TopMode Directory Reference

Files

file | NavigationViewTopNavOnlyPage.xaml.cs [code]
file | NavigationViewTopNavOverflowButtonPage.xaml.cs [code]
file | NavigationViewTopNavPage.xaml.cs [code]
file | NavigationViewTopNavStorePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/ Directory Reference

  • NumberBox

NumberBox Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | NumberBox.cpp [code]
file | NumberBox.h [code]
file | NumberBox.idl [code]
file | NumberBoxAutomationPeer.cpp [code]
file | NumberBoxAutomationPeer.h [code]
file | NumberBoxParser.cpp [code]
file | NumberBoxParser.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/APITests/ Directory Reference

  • NumberBox
  • APITests

APITests Directory Reference

Files

file NumberBoxTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/InteractionTests/ Directory Reference

  • NumberBox
  • InteractionTests

InteractionTests Directory Reference

Files

file NumberBoxTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/TestUI/ Directory Reference

  • NumberBox
  • TestUI

TestUI Directory Reference

Files

file | NumberBoxAxeTestPage.xaml.cs [code]
file | NumberBoxPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/ Directory Reference

  • PagerControl

PagerControl Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | PagerControl.cpp [code]
file | PagerControl.h [code]
file | PagerControl.idl [code]
file | PagerControlAutomationPeer.cpp [code]
file | PagerControlAutomationPeer.h [code]
file | PagerControlAutomationPeer.idl [code]
file | PagerControlSelectedIndexChangedEventArgs.h [code]
file | PagerControlTemplateSettings.cpp [code]
file | PagerControlTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/APITests/ Directory Reference

  • PagerControl
  • APITests

APITests Directory Reference

Files

file PagerControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/InteractionTests/ Directory Reference

  • PagerControl
  • InteractionTests

InteractionTests Directory Reference

Files

file | PagerControlTestBase.cs [code]
file | PagerControlTestPageElements.cs [code]
file | PagerControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/TestUI/ Directory Reference

  • PagerControl
  • TestUI

TestUI Directory Reference

Files

file | PagerControlAxeTestPage.xaml.cs [code]
file | PagerControlPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ Directory Reference

  • ParallaxView

ParallaxView Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ParallaxView.cpp [code]
file | ParallaxView.h [code]
file | ParallaxView.idl [code]
file | ScrollInputHelper.cpp [code]
file | ScrollInputHelper.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/APITests/ Directory Reference

  • ParallaxView
  • APITests

APITests Directory Reference

Files

file ParallaxViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/InteractionTests/ Directory Reference

  • ParallaxView
  • InteractionTests

InteractionTests Directory Reference

Files

file ParallaxViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ Directory Reference

  • ParallaxView
  • TestUI

TestUI Directory Reference

Files

file | DynamicPage.xaml.cs [code]
file | Ingredient.cs [code]
file | ListViewBackgroundPage.xaml.cs [code]
file | ListViewHeaderPage.xaml.cs [code]
file | ListViewItemPage.xaml.cs [code]
file | ParallaxViewPage.xaml.cs [code]
file | ParallaxViewStackPanelPage.xaml.cs [code]
file | SimpleRectanglePage.xaml.cs [code]
file | TextPage.xaml.cs [code]
file | VirtualizingStackPanelPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/ Directory Reference

  • PersonPicture

PersonPicture Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | InitialsGenerator.cpp [code]
file | InitialsGenerator.h [code]
file | PersonPicture.cpp [code]
file | PersonPicture.h [code]
file | PersonPicture.idl [code]
file | PersonPictureAutomationPeer.cpp [code]
file | PersonPictureAutomationPeer.h [code]
file | PersonPictureAutomationPeer.idl [code]
file | PersonPictureTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/APITests/ Directory Reference

  • PersonPicture
  • APITests

APITests Directory Reference

Files

file PersonPictureTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/InteractionTests/ Directory Reference

  • PersonPicture
  • InteractionTests

InteractionTests Directory Reference

Files

file PersonPictureTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/TestUI/ Directory Reference

  • PersonPicture
  • TestUI

TestUI Directory Reference

Files

file PersonPicturePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/ Directory Reference

  • PipsPager

PipsPager Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | PipsPager.cpp [code]
file | PipsPager.h [code]
file | PipsPager.idl [code]
file | PipsPagerAutomationPeer.cpp [code]
file | PipsPagerAutomationPeer.h [code]
file | PipsPagerAutomationPeer.idl [code]
file | PipsPagerSelectedIndexChangedEventArgs.h [code]
file | PipsPagerTemplateSettings.cpp [code]
file | PipsPagerTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/APITests/ Directory Reference

  • PipsPager
  • APITests

APITests Directory Reference

Files

file PipsPagerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/InteractionTests/ Directory Reference

  • PipsPager
  • InteractionTests

InteractionTests Directory Reference

Files

file | PipsPagerElements.cs [code]
file | PipsPagerTestBase.cs [code]
file | PipsPagerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/TestUI/ Directory Reference

  • PipsPager
  • TestUI

TestUI Directory Reference

Files

file | PipsPagerAxeTestPage.xaml.cs [code]
file | PipsPagerExamples.xaml.cs [code]
file | PipsPagerPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ Directory Reference

  • ProgressBar

ProgressBar Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ProgressBar.cpp [code]
file | ProgressBar.h [code]
file | ProgressBar.idl [code]
file | ProgressBarAutomationPeer.cpp [code]
file | ProgressBarAutomationPeer.h [code]
file | ProgressBarTemplateSettings.cpp [code]
file | ProgressBarTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/APITests/ Directory Reference

  • ProgressBar
  • APITests

APITests Directory Reference

Files

file ProgressBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/InteractionTests/ Directory Reference

  • ProgressBar
  • InteractionTests

InteractionTests Directory Reference

Files

file ProgressBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/TestUI/ Directory Reference

  • ProgressBar
  • TestUI

TestUI Directory Reference

Files

file | ProgressBarAxeTestPage.xaml.cs [code]
file | ProgressBarPage.xaml.cs [code]
file | ProgressBarReTemplatePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ Directory Reference

  • ProgressRing

ProgressRing Directory Reference

Directories

directory | AnimatedVisuals
directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ProgressRing.cpp [code]
file | ProgressRing.h [code]
file | ProgressRing.idl [code]
file | ProgressRingAutomationPeer.cpp [code]
file | ProgressRingAutomationPeer.h [code]
file | ProgressRingTemplateSettings.cpp [code]
file | ProgressRingTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ Directory Reference

  • ProgressRing
  • AnimatedVisuals

AnimatedVisuals Directory Reference

Files

file | ProgressRingDeterminate.cpp [code]
file | ProgressRingDeterminate.h [code]
file | ProgressRingIndeterminate.cpp [code]
file | ProgressRingIndeterminate.h [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/APITests/ Directory Reference

  • ProgressRing
  • APITests

APITests Directory Reference

Files

file ProgressRingTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/InteractionTests/ Directory Reference

  • ProgressRing
  • InteractionTests

InteractionTests Directory Reference

Files

file ProgressRingTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ Directory Reference

  • ProgressRing
  • TestUI

TestUI Directory Reference

Files

file | ProgressRingAxeTestPage.xaml.cs [code]
file | ProgressRingCustomLottieSourcePage.xaml.cs [code]
file | ProgressRingDeterminate.cs [code]
file | ProgressRingPage.xaml.cs [code]
file | ProgressRingStoryboardAnimationPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ Directory Reference

  • PullToRefresh

PullToRefresh Directory Reference

Directories

directory | PTRTracing
directory | RefreshContainer
directory | RefreshVisualizer
directory | ScrollViewerIRefreshInfoProviderAdapter
directory | TestUI
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/PTRTracing/ Directory Reference

  • PullToRefresh
  • PTRTracing

PTRTracing Directory Reference

Files

file PTRTracing.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/ Directory Reference

  • PullToRefresh
  • RefreshContainer

RefreshContainer Directory Reference

Directories

directory | InteractionTests
directory | TestUI

Files

file | RefreshContainer.cpp [code]
file | RefreshContainer.h [code]
file | RefreshContainer.idl [code]
file | RefreshContainerPrivate.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/InteractionTests/ Directory Reference

  • PullToRefresh
  • RefreshContainer
  • InteractionTests

InteractionTests Directory Reference

Files

file RefreshContainerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/ Directory Reference

  • PullToRefresh
  • RefreshContainer
  • TestUI

TestUI Directory Reference

Files

file | AnimationHandler.cs [code]
file | ImageIRefreshInfoProviderAdapter.cs [code]
file | RefreshContainerOnImagePage.xaml.cs [code]
file | RefreshContainerPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/ Directory Reference

  • PullToRefresh
  • RefreshVisualizer

RefreshVisualizer Directory Reference

Directories

directory | APITests
directory | TestUI

Files

file | PullToRefreshHelperTestApi.cpp [code]
file | PullToRefreshHelperTestApi.h [code]
file | PullToRefreshHelperTestAPI.idl [code]
file | PullToRefreshHelperTestApiFactory.cpp [code]
file | PullToRefreshHelperTestApiFactory.h [code]
file | RefreshInteractionRatioChangedEventArgs.cpp [code]
file | RefreshInteractionRatioChangedEventArgs.h [code]
file | RefreshVisualizer.cpp [code]
file | RefreshVisualizer.h [code]
file | RefreshVisualizer.idl [code]
file | RefreshVisualizerEventArgs.cpp [code]
file | RefreshVisualizerEventArgs.h [code]
file | RefreshVisualizerPrivate.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/APITests/ Directory Reference

  • PullToRefresh
  • RefreshVisualizer
  • APITests

APITests Directory Reference

Files

file RefreshVisualizerTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/TestUI/ Directory Reference

  • PullToRefresh
  • RefreshVisualizer
  • TestUI

TestUI Directory Reference

Files

file | RefreshVisualizerPage.xaml.cs [code]
file | SliderAsRefreshInfoProvider.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ Directory Reference

  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

ScrollViewerIRefreshInfoProviderAdapter Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | RefreshInfoProviderImpl.cpp [code]
file | RefreshInfoProviderImpl.h [code]
file | ScrollViewerIRefreshInfoProviderAdapter.cpp [code]
file | ScrollViewerIRefreshInfoProviderAdapter.h [code]
file | ScrollViewerIRefreshInfoProviderAdapter.idl [code]
file | ScrollViewerIRefreshInfoProviderAdapterFactory.cpp [code]
file | ScrollViewerIRefreshInfoProviderAdapterFactory.h [code]
file | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp [code]
file | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/APITests/ Directory Reference

  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • APITests

APITests Directory Reference

Files

file ScrollViewerAdapterTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/InteractionTests/ Directory Reference

  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • InteractionTests

InteractionTests Directory Reference

Files

file ScrollViewerAdapterTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/TestUI/ Directory Reference

  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • TestUI

TestUI Directory Reference

Files

file ScrollViewerAdapterPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/TestUI/ Directory Reference

  • PullToRefresh
  • TestUI

TestUI Directory Reference

Files

file | PTRPage.xaml.cs [code]
file | PullToRefreshPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/ Directory Reference

  • RadialGradientBrush

RadialGradientBrush Directory Reference

Directories

directory | InteractionTests
directory | TestUI

Files

file | RadialGradientBrush.cpp [code]
file | RadialGradientBrush.h [code]
file | RadialGradientBrush.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/InteractionTests/ Directory Reference

  • RadialGradientBrush
  • InteractionTests

InteractionTests Directory Reference

Files

file RadialGradientBrushTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/TestUI/ Directory Reference

  • RadialGradientBrush
  • TestUI

TestUI Directory Reference

Files

file RadialGradientBrushPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/ Directory Reference

  • RadioButtons

RadioButtons Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ColumnMajorUniformToLargestGridLayout.cpp [code]
file | ColumnMajorUniformToLargestGridLayout.h [code]
file | RadioButtons.cpp [code]
file | RadioButtons.h [code]
file | RadioButtons.idl [code]
file | RadioButtonsAutomationPeer.cpp [code]
file | RadioButtonsAutomationPeer.h [code]
file | RadioButtonsElementFactory.cpp [code]
file | RadioButtonsElementFactory.h [code]
file | RadioButtonsPrimitives.idl [code]
file | RadioButtonsTestHooks.cpp [code]
file | RadioButtonsTestHooks.h [code]
file | RadioButtonsTestHooks.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/APITests/ Directory Reference

  • RadioButtons
  • APITests

APITests Directory Reference

Files

file RadioButtonsTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/InteractionTests/ Directory Reference

  • RadioButtons
  • InteractionTests

InteractionTests Directory Reference

Files

file | RadioButtonsFocusTestPageElements.cs [code]
file | RadioButtonsTestPageElements.cs [code]
file | RadioButtonsTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/TestUI/ Directory Reference

  • RadioButtons
  • TestUI

TestUI Directory Reference

Files

file | RadioButtonsCaseBundle.xaml.cs [code]
file | RadioButtonsFocusPage.xaml.cs [code]
file | RadioButtonsPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/ Directory Reference

  • RadioMenuFlyoutItem

RadioMenuFlyoutItem Directory Reference

Directories

directory | InteractionTests
directory | TestUI

Files

file | RadioMenuFlyoutItem.cpp [code]
file | RadioMenuFlyoutItem.h [code]
file | RadioMenuFlyoutItem.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/InteractionTests/ Directory Reference

  • RadioMenuFlyoutItem
  • InteractionTests

InteractionTests Directory Reference

Files

file RadioMenuFlyoutItemTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/TestUI/ Directory Reference

  • RadioMenuFlyoutItem
  • TestUI

TestUI Directory Reference

Files

file RadioMenuFlyoutItemPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/ Directory Reference

  • RatingControl

RatingControl Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | RatingControl.cpp [code]
file | RatingControl.h [code]
file | RatingControl.idl [code]
file | RatingControlAutomationPeer.cpp [code]
file | RatingControlAutomationPeer.h [code]
file | RatingControlAutomationPeer.idl [code]
file | RatingItemFontInfo.cpp [code]
file | RatingItemFontInfo.h [code]
file | RatingItemImageInfo.cpp [code]
file | RatingItemImageInfo.h [code]
file | RatingItemInfo.cpp [code]
file | RatingItemInfo.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/APITests/ Directory Reference

  • RatingControl
  • APITests

APITests Directory Reference

Files

file RatingControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/InteractionTests/ Directory Reference

  • RatingControl
  • InteractionTests

InteractionTests Directory Reference

Files

file RatingControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/TestUI/ Directory Reference

  • RatingControl
  • TestUI

TestUI Directory Reference

Files

file RatingControlPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ Directory Reference

  • Repeater

Repeater Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | BuildTreeScheduler.cpp [code]
file | BuildTreeScheduler.h [code]
file | ChildrenInTabFocusOrderIterable.cpp [code]
file | ChildrenInTabFocusOrderIterable.h [code]
file | CustomProperty.cpp [code]
file | CustomProperty.h [code]
file | ElementFactory.cpp [code]
file | ElementFactory.h [code]
file | ElementFactoryGetArgsDownlevel.cpp [code]
file | ElementFactoryGetArgsDownlevel.h [code]
file | ElementFactoryRecycleArgsDownlevel.cpp [code]
file | ElementFactoryRecycleArgsDownlevel.h [code]
file | ElementManager.cpp [code]
file | ElementManager.h [code]
file | FlowLayout.cpp [code]
file | FlowLayout.h [code]
file | FlowLayoutAlgorithm.cpp [code]
file | FlowLayoutAlgorithm.h [code]
file | FlowLayoutState.cpp [code]
file | FlowLayoutState.h [code]
file | IFlowLayoutAlgorithmDelegates.h [code]
file | IndexPath.cpp [code]
file | IndexPath.h [code]
file | IndexRange.cpp [code]
file | IndexRange.h [code]
file | InspectingDataSource.cpp [code]
file | InspectingDataSource.h [code]
file | ItemCollectionTransition.cpp [code]
file | ItemCollectionTransition.h [code]
file | ItemCollectionTransitionCompletedEventArgs.cpp [code]
file | ItemCollectionTransitionCompletedEventArgs.h [code]
file | ItemCollectionTransitionProgress.cpp [code]
file | ItemCollectionTransitionProgress.h [code]
file | ItemCollectionTransitionProvider.cpp [code]
file | ItemCollectionTransitionProvider.h [code]
file | ItemsRepeater.common.cpp [code]
file | ItemsRepeater.common.h [code]
file | ItemsRepeater.cpp [code]
file | ItemsRepeater.h [code]
file | ItemsRepeater.idl [code]
file | ItemsRepeaterElementClearingEventArgs.cpp [code]
file | ItemsRepeaterElementClearingEventArgs.h [code]
file | ItemsRepeaterElementIndexChangedEventArgs.cpp [code]
file | ItemsRepeaterElementIndexChangedEventArgs.h [code]
file | ItemsRepeaterElementPreparedEventArgs.cpp [code]
file | ItemsRepeaterElementPreparedEventArgs.h [code]
file | ItemsRepeaterScrollHost.cpp [code]
file | ItemsRepeaterScrollHost.h [code]
file | ItemsRepeaterTrace.h [code]
file | ItemsSourceView.cpp [code]
file | ItemsSourceView.h [code]
file | ItemsSourceViewFactory.cpp [code]
file | ItemsSourceViewFactory.h [code]
file | ItemTemplateWrapper.cpp [code]
file | ItemTemplateWrapper.h [code]
file | Layout.cpp [code]
file | Layout.h [code]
file | LayoutContext.cpp [code]
file | LayoutContext.h [code]
file | LayoutContextAdapter.cpp [code]
file | LayoutContextAdapter.h [code]
file | LayoutsTestHooks.cpp [code]
file | LayoutsTestHooks.h [code]
file | LayoutsTestHooks.idl [code]
file | LayoutsTestHooksFactory.cpp [code]
file | LayoutsTestHooksFactory.h [code]
file | LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp [code]
file | LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h [code]
file | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp [code]
file | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h [code]
file | LinedFlowLayout.cpp [code]
file | LinedFlowLayout.h [code]
file | LinedFlowLayoutItemAspectRatios.cpp [code]
file | LinedFlowLayoutItemAspectRatios.h [code]
file | LinedFlowLayoutItemCollectionTransitionProvider.cpp [code]
file | LinedFlowLayoutItemCollectionTransitionProvider.h [code]
file | LinedFlowLayoutItemsInfoRequestedEventArgs.cpp [code]
file | LinedFlowLayoutItemsInfoRequestedEventArgs.h [code]
file | LinedFlowLayoutTrace.h [code]
file | NonVirtualizingLayout.cpp [code]
file | NonVirtualizingLayout.h [code]
file | NonvirtualizingLayoutContext.cpp [code]
file | NonvirtualizingLayoutContext.h [code]
file | OrientationBasedMeasures.cpp [code]
file | OrientationBasedMeasures.h [code]
file | Phaser.cpp [code]
file | Phaser.h [code]
file | QPCTimer.cpp [code]
file | QPCTimer.h [code]
file | RecyclePool.cpp [code]
file | RecyclePool.h [code]
file | RecyclePoolFactory.cpp [code]
file | RecyclePoolFactory.h [code]
file | RecyclingElementFactory.cpp [code]
file | RecyclingElementFactory.h [code]
file | RepeaterAutomationPeer.cpp [code]
file | RepeaterAutomationPeer.h [code]
file | RepeaterAutomationPeer.idl [code]
file | RepeaterLayoutContext.cpp [code]
file | RepeaterLayoutContext.h [code]
file | RepeaterPrivate.idl [code]
file | RepeaterTestHooks.cpp [code]
file | RepeaterTestHooks.h [code]
file | RepeaterTestHooks.idl [code]
file | RepeaterTestHooksFactory.cpp [code]
file | RepeaterTestHooksFactory.h [code]
file | SelectedItems.h [code]
file | SelectionModel.cpp [code]
file | SelectionModel.h [code]
file | SelectionModelChildrenRequestedEventArgs.cpp [code]
file | SelectionModelChildrenRequestedEventArgs.h [code]
file | SelectionModelSelectionChangedEventArgs.cpp [code]
file | SelectionModelSelectionChangedEventArgs.h [code]
file | SelectionNode.cpp [code]
file | SelectionNode.h [code]
file | SelectionTreeHelper.cpp [code]
file | SelectionTreeHelper.h [code]
file | SelectTemplateEventArgs.cpp [code]
file | SelectTemplateEventArgs.h [code]
file | StackLayout.cpp [code]
file | StackLayout.h [code]
file | StackLayoutState.cpp [code]
file | StackLayoutState.h [code]
file | TransitionManager.cpp [code]
file | TransitionManager.h [code]
file | UniformGridLayout.cpp [code]
file | UniformGridLayout.h [code]
file | UniformGridLayoutState.cpp [code]
file | UniformGridLayoutState.h [code]
file | UniqueIdElementPool.cpp [code]
file | UniqueIdElementPool.h [code]
file | ViewManager.cpp [code]
file | ViewManager.h [code]
file | ViewportManager.h [code]
file | ViewportManagerDownlevel.cpp [code]
file | ViewportManagerDownlevel.h [code]
file | ViewportManagerWithPlatformFeatures.cpp [code]
file | ViewportManagerWithPlatformFeatures.h [code]
file | VirtualizationInfo.cpp [code]
file | VirtualizationInfo.h [code]
file | VirtualizingLayout.cpp [code]
file | VirtualizingLayout.h [code]
file | VirtualizingLayoutContext.cpp [code]
file | VirtualizingLayoutContext.h [code]
file | VirtualLayoutContextAdapter.cpp [code]
file | VirtualLayoutContextAdapter.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ Directory Reference

  • Repeater
  • APITests

APITests Directory Reference

Directories

directory | Common

Files

file | AccessibilityTests.cs [code]
file | EffectiveViewportScrollPresenterTests.cs [code]
file | EffectiveViewportScrollViewerTests.cs [code]
file | FlowLayoutCollectionChangeTests.cs [code]
file | FlowLayoutTests.cs [code]
file | IndexPathTests.cs [code]
file | InspectingDataSourceTests.cs [code]
file | ItemCollectionTransitionProviderTests.cs [code]
file | ItemTemplateTests.cs [code]
file | LayoutTests.cs [code]
file | LinedFlowLayoutTests.cs [code]
file | PhasingTests.cs [code]
file | RecyclePoolTests.cs [code]
file | RepeaterFocusTests.cs [code]
file | RepeaterTests.cs [code]
file | SelectionModelTests.cs [code]
file | ViewManagerTests.cs [code]
file | ViewportTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/ Directory Reference

  • Repeater
  • APITests
  • Common

Common Directory Reference

Directories

directory | Mocks

Files

file | AspectRatioRespectingControl.cs [code]
file | CollectionChangeEventArgsConverters.cs [code]
file | CustomItemsSource.cs [code]
file | CustomItemsSourceView.cs [code]
file | DataAsElementElementFactory.cs [code]
file | ElementFromElementElementFactory.cs [code]
file | FlowLayoutDerived.cs [code]
file | ItemCollectionTransitionProviderDerived.cs [code]
file | LayoutExtensions.cs [code]
file | NamedGroup.cs [code]
file | NonVirtualStackLayout.cs [code]
file | OrientationBasedMeasures.cs [code]
file | ReadOnlyNotifyPropertyChangedCollection.cs [code]
file | RecyclingViewGeneratorDerived.cs [code]
file | SharedHelpers.cs [code]
file | WinRTCollection.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/ Directory Reference

  • Repeater
  • APITests
  • Common
  • Mocks

Mocks Directory Reference

Files

file | MockItemsSource.cs [code]
file | MockNonVirtualizingLayout.cs [code]
file | MockStackLayout.cs [code]
file | MockViewGenerator.cs [code]
file | MockVirtualizingLayout.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/InteractionTests/ Directory Reference

  • Repeater
  • InteractionTests

InteractionTests Directory Reference

Files

file RepeaterTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/ Directory Reference

  • Repeater
  • TestUI

TestUI Directory Reference

Directories

directory | Samples

Files

file | RepeaterTestUIPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ Directory Reference

  • Repeater
  • TestUI
  • Samples

Samples Directory Reference

Directories

directory | AnimationSamples
directory | DataModel
directory | ItemsSourceSamples
directory | ItemTemplateSamples
directory | LayoutSamplePages
directory | LayoutSamples
directory | NestedLayoutSamples
directory | SelectionSample

Files

file | BasicDemo.xaml.cs [code]
file | Defaults.xaml.cs [code]
file | KeyboardNavigationSample.cs [code]
file | LinedFlowLayoutDemo.cs [code]
file | ObjectModelTestPage.xaml.cs [code]
file | UniformGridLayoutDemo.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/AnimationSamples/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • AnimationSamples

AnimationSamples Directory Reference

Files

file | AnimationsDemoPage.xaml.cs [code]
file | DefaultElementAnimator.cs [code]
file | RadialElementAnimator.cs [code]
file | ScaleAnimatedVerticalListDemo.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/DataModel/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • DataModel

DataModel Directory Reference

Files

file | Recipe.cs [code]
file | RecipeGroup.cs [code]
file | Year.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples

ItemsSourceSamples Directory Reference

Files

file | CollectionChangeDemo.xaml.cs [code]
file | DelegatingItemsSource.cs [code]
file | ElementsInItemsSourcePage.xaml.cs [code]
file | RecipeViewGenerator.cs [code]
file | ResetableCollection.cs [code]
file | SortingAndFilteringPage.xaml.cs [code]
file | VariableSizedItemsPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemTemplateSamples/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • ItemTemplateSamples

ItemTemplateSamples Directory Reference

Files

file | DisposableUserControl.xaml.cs [code]
file | ItemTemplateDemo.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages

LayoutSamplePages Directory Reference

Directories

directory | NonVirtual
directory | Virtual
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/NonVirtual/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • NonVirtual

NonVirtual Directory Reference

Files

file NonVirtualStackLayoutSamplePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/Virtual/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • Virtual

Virtual Directory Reference

Files

file | PinterestLayoutSamplePage.xaml.cs [code]
file | VirtualizingStackLayoutSamplePage.xaml.cs [code]
file | VirtualizingUniformStackLayoutSamplePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • LayoutSamples

LayoutSamples Directory Reference

Directories

directory | NestedLayoutSamples
directory | NonVirtualLayoutPages
directory | VirtualLayoutPages
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples

NestedLayoutSamples Directory Reference

Files

file | ItemsViewWithDataPage.xaml.cs [code]
file | LayoutHelper.cs [code]
file | StoreDemoPage.xaml.cs [code]
file | StoreMockData.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages

NonVirtualLayoutPages Directory Reference

Files

file | CircleLayout.cs [code]
file | CircleLayoutSamplePage.xaml.cs [code]
file | Flex.cs [code]
file | NonVirtualStackLayout.cs [code]
file | NonVirtualStackLayoutSamplePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

VirtualLayoutPages Directory Reference

Files

file | ActivityFeedLayout.cs [code]
file | ActivityFeedSamplePage.xaml.cs [code]
file | FlowLayoutDemoPage.xaml.cs [code]
file | PinterestLayout.cs [code]
file | PinterestLayoutSamplePage.xaml.cs [code]
file | UniformGrid2DLayout.cs [code]
file | VirtualizingStackLayout.cs [code]
file | VirtualizingStackLayoutSamplePage.xaml.cs [code]
file | VirtualizingUniformCarouselStackLayout.cs [code]
file | VirtualizingUniformStackLayout.cs [code]
file | VirtualizingUniformStackLayoutSamplePage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/NestedLayoutSamples/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • NestedLayoutSamples

NestedLayoutSamples Directory Reference

Files

file | ItemsViewWithDataPage.xaml.cs [code]
file | LayoutHelper.cs [code]
file | StoreDemoPage.xaml.cs [code]
file | StoreMockData.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • SelectionSample

SelectionSample Directory Reference

Directories

directory | Common
directory | Flat
directory | Grouped
directory | TreeView
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common

Common Directory Reference

Files

file | BoolToBrushConverter.cs [code]
file | BoolToVisibilityConverter.cs [code]
file | Data.cs [code]
file | SelectionContainer.cs [code]
file | SelectionContainerAutomationPeer.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Flat/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Flat

Flat Directory Reference

Files

file | FlatSample.xaml.cs [code]
file | RepeaterItem.cs [code]
file | RepeaterItemAutomationPeer.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Grouped/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Grouped

Grouped Directory Reference

Files

file | GroupedRepeaterItem.cs [code]
file | GroupedRepeaterItemAutomationPeer.cs [code]
file | GroupedSample.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/TreeView/ Directory Reference

  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • TreeView

TreeView Directory Reference

Files

file | TreeViewItem.cs [code]
file | TreeViewItemAutomationPeer.cs [code]
file | TreeViewSample.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/ Directory Reference

  • ResourceHelper

ResourceHelper Directory Reference

Files

file | ResourceAccessor.cpp [code]
file | ResourceAccessor.h [code]
file | Utils.cpp [code]
file | Utils.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ Directory Reference

  • ScrollPresenter

ScrollPresenter Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | BringIntoViewOffsetsChange.cpp [code]
file | BringIntoViewOffsetsChange.h [code]
file | InteractionTrackerAsyncOperation.cpp [code]
file | InteractionTrackerAsyncOperation.h [code]
file | InteractionTrackerOwner.cpp [code]
file | InteractionTrackerOwner.h [code]
file | OffsetsChange.cpp [code]
file | OffsetsChange.h [code]
file | OffsetsChangeWithAdditionalVelocity.cpp [code]
file | OffsetsChangeWithAdditionalVelocity.h [code]
file | RepeatedScrollSnapPoint.h [code]
file | RepeatedZoomSnapPoint.h [code]
file | ScrollControllerAddScrollVelocityRequestedEventArgs.cpp [code]
file | ScrollControllerAddScrollVelocityRequestedEventArgs.h [code]
file | ScrollControllerPanRequestedEventArgs.cpp [code]
file | ScrollControllerPanRequestedEventArgs.h [code]
file | ScrollControllerScrollByRequestedEventArgs.cpp [code]
file | ScrollControllerScrollByRequestedEventArgs.h [code]
file | ScrollControllerScrollToRequestedEventArgs.cpp [code]
file | ScrollControllerScrollToRequestedEventArgs.h [code]
file | ScrollingAnchorRequestedEventArgs.cpp [code]
file | ScrollingAnchorRequestedEventArgs.h [code]
file | ScrollingBringingIntoViewEventArgs.cpp [code]
file | ScrollingBringingIntoViewEventArgs.h [code]
file | ScrollingScrollAnimationStartingEventArgs.cpp [code]
file | ScrollingScrollAnimationStartingEventArgs.h [code]
file | ScrollingScrollCompletedEventArgs.cpp [code]
file | ScrollingScrollCompletedEventArgs.h [code]
file | ScrollingScrollOptions.cpp [code]
file | ScrollingScrollOptions.h [code]
file | ScrollingScrollStartingEventArgs.cpp [code]
file | ScrollingScrollStartingEventArgs.h [code]
file | ScrollingZoomAnimationStartingEventArgs.cpp [code]
file | ScrollingZoomAnimationStartingEventArgs.h [code]
file | ScrollingZoomCompletedEventArgs.cpp [code]
file | ScrollingZoomCompletedEventArgs.h [code]
file | ScrollingZoomOptions.cpp [code]
file | ScrollingZoomOptions.h [code]
file | ScrollingZoomStartingEventArgs.cpp [code]
file | ScrollingZoomStartingEventArgs.h [code]
file | ScrollPresenter.cpp [code]
file | ScrollPresenter.h [code]
file | ScrollPresenter.idl [code]
file | ScrollPresenterAnchoring.cpp [code]
file | ScrollPresenterAutomationPeer.cpp [code]
file | ScrollPresenterAutomationPeer.h [code]
file | ScrollPresenterAutomationPeer.idl [code]
file | ScrollPresenterPrimitives.idl [code]
file | ScrollPresenterPrivate.cpp [code]
file | ScrollPresenterTestHooks.cpp [code]
file | ScrollPresenterTestHooks.h [code]
file | ScrollPresenterTestHooks.idl [code]
file | ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp [code]
file | ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h [code]
file | ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp [code]
file | ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h [code]
file | ScrollPresenterTestHooksFactory.cpp [code]
file | ScrollPresenterTestHooksFactory.h [code]
file | ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.cpp [code]
file | ScrollPresenterTestHooksInteractionSourcesChangedEventArgs.h [code]
file | ScrollPresenterTrace.h [code]
file | ScrollPresenterTypeLogging.cpp [code]
file | ScrollPresenterTypeLogging.h [code]
file | ScrollSnapPoint.h [code]
file | SnapPoint.cpp [code]
file | SnapPoint.h [code]
file | SnapPointWrapper.cpp [code]
file | SnapPointWrapper.h [code]
file | ViewChange.cpp [code]
file | ViewChange.h [code]
file | ViewChangeBase.h [code]
file | ZoomFactorChange.cpp [code]
file | ZoomFactorChange.h [code]
file | ZoomFactorChangeWithAdditionalVelocity.cpp [code]
file | ZoomFactorChangeWithAdditionalVelocity.h [code]
file | ZoomSnapPoint.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ Directory Reference

  • ScrollPresenter
  • APITests

APITests Directory Reference

Files

file | ScrollControllerTests.cs [code]
file | ScrollPresenterAnchoringTests.cs [code]
file | ScrollPresenterBringIntoViewTests.cs [code]
file | ScrollPresenterLayoutTests.cs [code]
file | ScrollPresenterSnapPointTests.cs [code]
file | ScrollPresenterTests.cs [code]
file | ScrollPresenterViewChangeTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTests/ Directory Reference

  • ScrollPresenter
  • InteractionTests

InteractionTests Directory Reference

Files

file | ScrollPresenterTestsBase.cs [code]
file | ScrollPresenterTestsWithAutomationPeer.cs [code]
file | ScrollPresenterTestsWithInputHelper.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ Directory Reference

  • ScrollPresenter
  • TestUI

TestUI Directory Reference

Files

file | BiDirectionalScrollController.cs [code]
file | CompositionScrollController.cs [code]
file | ScrollPresenterAccessibilityPage.xaml.cs [code]
file | ScrollPresenterBringIntoViewPage.xaml.cs [code]
file | ScrollPresenterChainingAndRailingPage.xaml.cs [code]
file | ScrollPresenterDynamicPage.xaml.cs [code]
file | ScrollPresenterExpressionAnimationSourcesPage.xaml.cs [code]
file | ScrollPresenterLeakDetectionPage.xaml.cs [code]
file | ScrollPresenterManipulationModePage.xaml.cs [code]
file | ScrollPresenterMousePanningPage.xaml.cs [code]
file | ScrollPresenterPage.xaml.cs [code]
file | ScrollPresenterRepeaterAnchoringPage.xaml.cs [code]
file | ScrollPresenterScrollSnapPointsPage.xaml.cs [code]
file | ScrollPresenterStackPanelAnchoringPage.xaml.cs [code]
file | ScrollPresentersWithSimpleContentsPage.xaml.cs [code]
file | ScrollPresenterTestHooksHelper.cs [code]
file | ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs [code]
file | ScrollPresenterWithCompositionScrollControllersPage.xaml.cs [code]
file | ScrollPresenterWithSimpleScrollControllersPage.xaml.cs [code]
file | ScrollPresenterZoomSnapPointsPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ Directory Reference

  • ScrollView

ScrollView Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | ScrollBarController.cpp [code]
file | ScrollBarController.h [code]
file | ScrollView.cpp [code]
file | ScrollView.h [code]
file | ScrollView.idl [code]
file | ScrollViewBringIntoViewOperation.cpp [code]
file | ScrollViewBringIntoViewOperation.h [code]
file | ScrollViewLightup.cpp [code]
file | ScrollViewTestHooks.cpp [code]
file | ScrollViewTestHooks.h [code]
file | ScrollViewTestHooks.idl [code]
file | ScrollViewTestHooksFactory.cpp [code]
file | ScrollViewTestHooksFactory.h [code]
file | ScrollViewTrace.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/APITests/ Directory Reference

  • ScrollView
  • APITests

APITests Directory Reference

Files

file ScrollViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/InteractionTests/ Directory Reference

  • ScrollView
  • InteractionTests

InteractionTests Directory Reference

Files

file ScrollViewTestsWithInputHelper.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ Directory Reference

  • ScrollView
  • TestUI

TestUI Directory Reference

Files

file | ScrollViewBlankPage.xaml.cs [code]
file | ScrollViewBringIntoViewPage.xaml.cs [code]
file | ScrollViewDynamicPage.xaml.cs [code]
file | ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs [code]
file | ScrollViewPage.xaml.cs [code]
file | ScrollViewsWithSimpleContentsPage.xaml.cs [code]
file | ScrollViewTestHooksHelper.cs [code]
file | ScrollViewWithRTLFlowDirectionPage.xaml.cs [code]
file | ScrollViewWithScrollControllersPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/ Directory Reference

  • SelectorBar

SelectorBar Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | SelectorBar.cpp [code]
file | SelectorBar.h [code]
file | SelectorBar.idl [code]
file | SelectorBarItem.cpp [code]
file | SelectorBarItem.h [code]
file | SelectorBarItemAutomationPeer.cpp [code]
file | SelectorBarItemAutomationPeer.h [code]
file | SelectorBarSelectionChangedEventArgs.cpp [code]
file | SelectorBarSelectionChangedEventArgs.h [code]
file | SelectorBarTestHooks.cpp [code]
file | SelectorBarTestHooks.h [code]
file | SelectorBarTestHooks.idl [code]
file | SelectorBarTestHooksFactory.cpp [code]
file | SelectorBarTestHooksFactory.h [code]
file | SelectorBarTrace.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/APITests/ Directory Reference

  • SelectorBar
  • APITests

APITests Directory Reference

Files

file SelectorBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/InteractionTests/ Directory Reference

  • SelectorBar
  • InteractionTests

InteractionTests Directory Reference

Files

file SelectorBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/TestUI/ Directory Reference

  • SelectorBar
  • TestUI

TestUI Directory Reference

Files

file | SelectorBarPage.xaml.cs [code]
file | SelectorBarSamplePage.xaml.cs [code]
file | SelectorBarSummaryPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ Directory Reference

  • SplitButton

SplitButton Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | SplitButton.cpp [code]
file | SplitButton.h [code]
file | SplitButton.idl [code]
file | SplitButtonAutomationPeer.cpp [code]
file | SplitButtonAutomationPeer.h [code]
file | SplitButtonAutomationPeer.idl [code]
file | SplitButtonEventArgs.h [code]
file | SplitButtonTestApi.cpp [code]
file | SplitButtonTestApi.h [code]
file | SplitButtonTestApi.idl [code]
file | SplitButtonTestApiFactory.cpp [code]
file | SplitButtonTestHelper.cpp [code]
file | SplitButtonTestHelper.h [code]
file | ToggleSplitButton.cpp [code]
file | ToggleSplitButton.h [code]
file | ToggleSplitButtonAutomationPeer.cpp [code]
file | ToggleSplitButtonAutomationPeer.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/APITests/ Directory Reference

  • SplitButton
  • APITests

APITests Directory Reference

Files

file SplitButtonTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/InteractionTests/ Directory Reference

  • SplitButton
  • InteractionTests

InteractionTests Directory Reference

Files

file SplitButtonTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/TestUI/ Directory Reference

  • SplitButton
  • TestUI

TestUI Directory Reference

Files

file SplitButtonPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitView/ Directory Reference

  • SplitView

SplitView Directory Reference

Directories

directory TestUI
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitView/TestUI/ Directory Reference

  • SplitView
  • TestUI

TestUI Directory Reference

Files

file SplitViewPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/ Directory Reference

  • SwipeControl

SwipeControl Directory Reference

Directories

directory | SwipeControl_APITests
directory | SwipeControl_InteractionTests
directory | SwipeControl_TestUI

Files

file | SwipeControl.cpp [code]
file | SwipeControl.h [code]
file | SwipeControl.idl [code]
file | SwipeControlInteractionTrackerOwner.cpp [code]
file | SwipeControlInteractionTrackerOwner.h [code]
file | SwipeControlTrace.h [code]
file | SwipeItem.cpp [code]
file | SwipeItem.h [code]
file | SwipeItemInvokedEventArgs.cpp [code]
file | SwipeItemInvokedEventArgs.h [code]
file | SwipeItems.cpp [code]
file | SwipeItems.h [code]
file | SwipeTestHooks.cpp [code]
file | SwipeTestHooks.h [code]
file | SwipeTestHooks.idl [code]
file | SwipeTestHooksFactory.cpp [code]
file | SwipeTestHooksFactory.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_APITests/ Directory Reference

  • SwipeControl
  • SwipeControl_APITests

SwipeControl_APITests Directory Reference

Files

file SwipeControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_InteractionTests/ Directory Reference

  • SwipeControl
  • SwipeControl_InteractionTests

SwipeControl_InteractionTests Directory Reference

Files

file SwipeControlTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/ Directory Reference

  • SwipeControl
  • SwipeControl_TestUI

SwipeControl_TestUI Directory Reference

Files

file | SwipeControlClearPage.xaml.cs [code]
file | SwipeControlPage.xaml.cs [code]
file | SwipeControlPage2.xaml.cs [code]
file | SwipePage.xaml.cs [code]
file | TestCommand.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/ Directory Reference

  • TabView

TabView Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | TabView.cpp [code]
file | TabView.h [code]
file | TabView.idl [code]
file | TabViewAutomationPeer.cpp [code]
file | TabViewAutomationPeer.h [code]
file | TabViewItem.cpp [code]
file | TabViewItem.h [code]
file | TabViewItemAutomationPeer.cpp [code]
file | TabViewItemAutomationPeer.h [code]
file | TabViewItemTemplateSettings.h [code]
file | TabViewListView.cpp [code]
file | TabViewListView.h [code]
file | TabViewTrace.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/APITests/ Directory Reference

  • TabView
  • APITests

APITests Directory Reference

Files

file TabViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/InteractionTests/ Directory Reference

  • TabView
  • InteractionTests

InteractionTests Directory Reference

Files

file | TabViewTearOutTests.cs [code]
file | TabViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/ Directory Reference

  • TabView
  • TestUI

TestUI Directory Reference

Files

file | MultipleTabViewPage.xaml.cs [code]
file | TabViewAxeTestPage.xaml.cs [code]
file | TabViewPage.xaml.cs [code]
file | TabViewSizingPage.xaml.cs [code]
file | TabViewTabClosingBehaviorPage.xaml.cs [code]
file | TabViewTabItemsSourcePage.xaml.cs [code]
file | TabViewTearOutWindowWithDataItems.xaml.cs [code]
file | TabViewTearOutWindowWithoutDataItems.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/ Directory Reference

  • TeachingTip

TeachingTip Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | TeachingTip.cpp [code]
file | TeachingTip.h [code]
file | TeachingTip.idl [code]
file | TeachingTipAutomationPeer.cpp [code]
file | TeachingTipAutomationPeer.h [code]
file | TeachingTipAutomationPeer.idl [code]
file | TeachingTipClosedEventArgs.cpp [code]
file | TeachingTipClosedEventArgs.h [code]
file | TeachingTipClosingEventArgs.cpp [code]
file | TeachingTipClosingEventArgs.h [code]
file | TeachingTipTemplateSettings.cpp [code]
file | TeachingTipTemplateSettings.h [code]
file | TeachingTipTestHooks.cpp [code]
file | TeachingTipTestHooks.h [code]
file | TeachingTipTestHooks.idl [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/APITests/ Directory Reference

  • TeachingTip
  • APITests

APITests Directory Reference

Files

file TeachingTipTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/InteractionTests/ Directory Reference

  • TeachingTip
  • InteractionTests

InteractionTests Directory Reference

Files

file | TeachingTipFocusTestPageElements.cs [code]
file | TeachingTipTestPageElements.cs [code]
file | TeachingTipTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TestUI/ Directory Reference

  • TeachingTip
  • TestUI

TestUI Directory Reference

Files

file | TeachingTipCaseBundle.xaml.cs [code]
file | TeachingTipFocusPage.xaml.cs [code]
file | TeachingTipInXamlPage.xaml.cs [code]
file | TeachingTipPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/ Directory Reference

  • Telemetry

Telemetry Directory Reference

Files

file | MicrosoftTelemetry.h [code]
file | MuxcTraceLogging.cpp [code]
file | MuxcTraceLogging.h [code]
file | RuntimeProfiler.cpp [code]
file | RuntimeProfiler.h [code]
file | TypeLogging.cpp [code]
file | TypeLogging.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/ Directory Reference

  • TestHooks

TestHooks Directory Reference

Files

file | MUXControlsTestHooks.cpp [code]
file | MUXControlsTestHooks.h [code]
file | MUXControlsTestHooks.idl [code]
file | MUXControlsTestHooksFactory.cpp [code]
file | MUXControlsTestHooksFactory.h [code]
file | MUXControlsTestHooksLoggingMessageEventArgs.cpp [code]
file | MUXControlsTestHooksLoggingMessageEventArgs.h [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/ Directory Reference

  • TitleBar

TitleBar Directory Reference

Directories

directory | InteractionTests
directory | TestUI

Files

file | TitleBar.cpp [code]
file | TitleBar.h [code]
file | TitleBar.idl [code]
file | TitleBarAutomationPeer.cpp [code]
file | TitleBarAutomationPeer.h [code]
file | TitleBarTemplateSettings.cpp [code]
file | TitleBarTemplateSettings.h [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/InteractionTests/ Directory Reference

  • TitleBar
  • InteractionTests

InteractionTests Directory Reference

Files

file TitleBarTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TestUI/ Directory Reference

  • TitleBar
  • TestUI

TestUI Directory Reference

Files

file | TitleBarPage.xaml.cs [code]
file | TitleBarPageWindow.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/ Directory Reference

  • TreeView

TreeView Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | TreeView.cpp [code]
file | TreeView.h [code]
file | TreeView.idl [code]
file | TreeViewAutomationPeers.idl [code]
file | TreeViewCollapsedEventArgs.cpp [code]
file | TreeViewCollapsedEventArgs.h [code]
file | TreeViewDragItemsCompletedEventArgs.cpp [code]
file | TreeViewDragItemsCompletedEventArgs.h [code]
file | TreeViewDragItemsStartingEventArgs.cpp [code]
file | TreeViewDragItemsStartingEventArgs.h [code]
file | TreeViewExpandingEventArgs.cpp [code]
file | TreeViewExpandingEventArgs.h [code]
file | TreeViewItem.cpp [code]
file | TreeViewItem.h [code]
file | TreeViewItemAutomationPeer.cpp [code]
file | TreeViewItemAutomationPeer.h [code]
file | TreeViewItemDataAutomationPeer.cpp [code]
file | TreeViewItemDataAutomationPeer.h [code]
file | TreeViewItemInvokedEventArgs.cpp [code]
file | TreeViewItemInvokedEventArgs.h [code]
file | TreeViewItemTemplateSettings.cpp [code]
file | TreeViewItemTemplateSettings.h [code]
file | TreeViewList.cpp [code]
file | TreeViewList.h [code]
file | TreeViewListAutomationPeer.cpp [code]
file | TreeViewListAutomationPeer.h [code]
file | TreeViewNode.cpp [code]
file | TreeViewNode.h [code]
file | TreeViewSelectionChangedEventArgs.cpp [code]
file | TreeViewSelectionChangedEventArgs.h [code]
file | ViewModel.cpp [code]
file | ViewModel.h [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/APITests/ Directory Reference

  • TreeView
  • APITests

APITests Directory Reference

Files

file TreeViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/InteractionTests/ Directory Reference

  • TreeView
  • InteractionTests

InteractionTests Directory Reference

Files

file TreeViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/ Directory Reference

  • TreeView
  • TestUI

TestUI Directory Reference

Files

file | TreeViewItemSource.cs [code]
file | TreeViewItemsSourceTestPage.xaml.cs [code]
file | TreeViewItemTemplateSelectorTestPage.xaml.cs [code]
file | TreeViewLateDataInitTestPage.xaml.cs [code]
file | TreeViewNode2.cs [code]
file | TreeViewNodeInMarkupTestPage.xaml.cs [code]
file | TreeViewPage.xaml.cs [code]
file | TreeViewUnrealizedChildrenTestPage.xaml.cs [code]
file | TreeViewViewModel.cs [code]
file | VirtualizingDataSource.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/ Directory Reference

  • TwoPaneView

TwoPaneView Directory Reference

Directories

directory | APITests
directory | InteractionTests
directory | TestUI

Files

file | DisplayRegionHelper.cpp [code]
file | DisplayRegionHelper.h [code]
file | DisplayRegionHelperTestApi.cpp [code]
file | DisplayRegionHelperTestApi.h [code]
file | DisplayRegionHelperTestApi.idl [code]
file | DisplayRegionHelperTestApiFactory.cpp [code]
file | DisplayRegionHelperTestApiFactory.h [code]
file | TwoPaneView.cpp [code]
file | TwoPaneView.h [code]
file | TwoPaneView.idl [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/APITests/ Directory Reference

  • TwoPaneView
  • APITests

APITests Directory Reference

Files

file TwoPaneViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/InteractionTests/ Directory Reference

  • TwoPaneView
  • InteractionTests

InteractionTests Directory Reference

Files

file TwoPaneViewTests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/TestUI/ Directory Reference

  • TwoPaneView
  • TestUI

TestUI Directory Reference

Files

file TwoPaneViewPage.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/ Directory Reference

  • WebView2

WebView2 Directory Reference

Directories

directory | InteractionTests
directory | TestUI

Files

file | InvokableCallbackHelper.h [code]
file | WebView2.cpp [code]
file | WebView2.h [code]
file | WebView2.idl [code]
file | WebView2AutomationPeer.cpp [code]
file | WebView2AutomationPeer.h [code]
file | WebView2AutomationPeer.idl [code]
file | WebView2Utility.h [code]
Generated on Sun Dec 1 2024 20:54:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/InteractionTests/ Directory Reference

  • WebView2
  • InteractionTests

InteractionTests Directory Reference

Files

file WebView2Tests.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/ Directory Reference

  • WebView2
  • TestUI

TestUI Directory Reference

Files

file | WebView2BasicPage.xaml.cs [code]
file | WebView2Common.cs [code]
file | WebView2CoreObjectsPage.xaml.cs [code]
file | WebView2Page.xaml.cs [code]
Generated on Sun Dec 1 2024 20:54:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- _ -

  • __declspec() : XamlMetadataDependencyLocator.cpp , CppWinRTHelpers.h , tracker_ref.h , RadioMenuFlyoutItem.h , event.h
  • __pad0__ : WebView2.h , WebView2AutomationPeer.h
  • __RP_Marker_ClassById : RuntimeProfiler.h
  • __RP_Marker_ClassMemberById : RuntimeProfiler.h
  • _USE_MATH_DEFINES : pch.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Alphabetical List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Class Index

A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
A
IScrollControllerAdapter (MUXControlsTestApp) RevealBorderBrushT (winrt::implementation)
AccessibilityTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) ISepiaEffect (Microsoft::UI::Private::Composition::Effects) RevealBorderLight
AcrylicBrush ISpotDiffuseEffect (Microsoft::UI::Private::Composition::Effects) RevealBorderLightT (winrt::implementation)
AcrylicBrushBasicPage (MUXControlsTestApp) ISpotSpecularEffect (Microsoft::UI::Private::Composition::Effects) RevealBorderSpotlightInfo
AcrylicBrushFactory Item (MUXControlsTestApp::Samples) RevealBorderSpotlightStateDesc
AcrylicBrushLuminosityTestPage (MUXControlsTestApp) LinedFlowLayoutItemAspectRatios::ItemAspectRatio RevealBrush
AcrylicBrushPage (MUXControlsTestApp) LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock RevealBrushProperties
AcrylicBrushProperties ItemCollectionTransition RevealBrushTestApi
AcrylicBrushT (winrt::implementation) ItemCollectionTransitionCompletedEventArgs RevealBrushTestApiT (winrt::implementation)
AcrylicBrushTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ItemCollectionTransitionCompletedEventArgsT (winrt::implementation) RevealBrushTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
AcrylicBrushTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ItemCollectionTransitionProgress RevealColorPage (MUXControlsTestApp)
AcrylicColorPage (MUXControlsTestApp) ItemCollectionTransitionProgressT (winrt::implementation) RevealFallbackPage (MUXControlsTestApp)
AcrylicMarkupPage (MUXControlsTestApp) ItemCollectionTransitionProvider RevealGridItem (MUXControlsTestApp)
AcrylicPage (MUXControlsTestApp) ItemCollectionTransitionProviderDerived (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) RevealGridTypeItem (MUXControlsTestApp)
AcrylicRenderingPage (MUXControlsTestApp) ItemCollectionTransitionProviderProperties RevealHoverLight
AcrylicTestApi ItemCollectionTransitionProviderT (winrt::implementation) RevealHoverLightT (winrt::implementation)
AcrylicTestApiT (winrt::implementation) ItemCollectionTransitionProviderTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) RevealHoverSpotlightAnimationInfo
ActivityFeedLayout (MUXControlsTestApp::Samples) ItemCollectionTransitionT (winrt::implementation) RevealHoverSpotlightStateDesc
ActivityFeedLayoutState (MUXControlsTestApp::Samples) ItemContainer RevealItem (MUXControlsTestApp)
ActivityFeedSamplePage (MUXControlsTestApp::Samples) ItemContainerAutomationPeer RevealListPage (MUXControlsTestApp)
AlphaMaskEffect (Microsoft::UI::Private::Composition::Effects) ItemContainerAutomationPeerT (winrt::implementation) RevealListViewItemPresenter
AnimatedAcceptVisualSource ItemContainerInvokedEventArgs RevealListViewItemPresenterT (winrt::implementation)
AnimatedAcceptVisualSource_AnimatedVisual ItemContainerInvokedEventArgsT (winrt::implementation) RevealMarkupPage (MUXControlsTestApp)
AnimatedBackVisualSource ItemContainerLayoutPage (MUXControlsTestApp) RevealPage (MUXControlsTestApp)
AnimatedBackVisualSource_AnimatedVisual ItemContainerPage (MUXControlsTestApp) RevealRegressionTestsPage (MUXControlsTestApp)
AnimatedChevronDownSmallVisualSource ItemContainerProperties RevealScenarioColors (MUXControlsTestApp)
AnimatedChevronDownSmallVisualSource_AnimatedVisual ItemContainerRevokers RevealScenarioGrid (MUXControlsTestApp)
AnimatedChevronRightDownSmallVisualSource ItemContainerSummaryPage (MUXControlsTestApp) RevealScenarioItem (MUXControlsTestApp)
AnimatedChevronRightDownSmallVisualSource_AnimatedVisual ItemContainerT (winrt::implementation) RevealScenarioLights (MUXControlsTestApp)
AnimatedChevronUpDownSmallVisualSource ItemContainerTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) RevealScenarioList (MUXControlsTestApp)
AnimatedChevronUpDownSmallVisualSource_AnimatedVisual ItemContainerTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) RevealScenarios (MUXControlsTestApp)
AnimatedFindVisualSource ItemContainerTrace RevealScenarioSecondaryView (MUXControlsTestApp)
AnimatedFindVisualSource_AnimatedVisual ITemperatureAndTintEffect (Microsoft::UI::Private::Composition::Effects) RevealSimpleListPage (MUXControlsTestApp)
AnimatedGlobalNavigationButtonVisualSource ItemsControlPage (MUXControlsTestApp) RevealStatesPage (MUXControlsTestApp)
AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual LinedFlowLayout::ItemsInfo RevealTestApi
AnimatedIcon LinedFlowLayout::ItemsLayout RevealTestApiT (winrt::implementation)
AnimatedIconHost (MUXControlsTestApp) ItemsRepeater RevealTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
AnimatedIconPage (MUXControlsTestApp) ItemsRepeaterElementClearingEventArgs RevealThemeItem (MUXControlsTestApp)
AnimatedIconProperties ItemsRepeaterElementClearingEventArgsT (winrt::implementation) Rgb
AnimatedIconSource ItemsRepeaterElementIndexChangedEventArgs RoutedEventHandler_revoker
AnimatedIconSourceProperties ItemsRepeaterElementIndexChangedEventArgsT (winrt::implementation) RoutedEventTraits
AnimatedIconTestHooks ItemsRepeaterElementPreparedEventArgs RoutedEventTraits< RoutedEventType::DragEnter >
AnimatedIconTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ItemsRepeaterElementPreparedEventArgsT (winrt::implementation) RoutedEventTraits< RoutedEventType::DragLeave >
AnimatedSettingsVisualSource ItemsRepeaterProperties RoutedEventTraits< RoutedEventType::Drop >
AnimatedSettingsVisualSource_AnimatedVisual ItemsRepeaterScrollHost RoutedEventTraits< RoutedEventType::GettingFocus >
AnimatedVisual (anonymous_namespace{ProgressRingIndeterminate.cpp}) ItemsRepeaterTrace RoutedEventTraits< RoutedEventType::KeyDown >
AnimatedVisual (anonymous_namespace{ProgressRingDeterminate.cpp}) ItemsSourceView RoutedEventTraits< RoutedEventType::LosingFocus >
ProgressRingDeterminate::AnimatedVisual (AnimatedVisuals) ItemsSourceViewFactory RoutedEventTraits< RoutedEventType::PointerCanceled >
AnimatedVisualPlayer ItemsSourceViewProperties RoutedEventTraits< RoutedEventType::PointerCaptureLost >
AnimatedVisualPlayerAutomationPeer ItemsSourceViewT (winrt::implementation) RoutedEventTraits< RoutedEventType::PointerExited >
AnimatedVisualPlayerAutomationPeerT (winrt::implementation) ItemsView RoutedEventTraits< RoutedEventType::PointerPressed >
AnimatedVisualPlayerPage (MUXControlsTestApp) ItemsViewAutomationPeer RoutedEventTraits< RoutedEventType::PointerReleased >
AnimatedVisualPlayerProperties ItemsViewAutomationPeerT (winrt::implementation)
S
AnimatedVisualPlayerTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ItemsViewBlankPage (MUXControlsTestApp) ScrollPresenterRepeaterAnchoringPage::SampleDataSource (MUXControlsTestApp)
AnimationsDemoPage::AnimationElementFactory (MUXControlsTestApp::Samples) ItemsViewIntegrationPage (MUXControlsTestApp) ScrollPresenterBringIntoViewPage::SampleDataSource (MUXControlsTestApp)
AnimationHandler (MUXControlsTestApp) ItemsViewInteractiveTestsPage (MUXControlsTestApp) AcrylicRenderingPage::SampledColors (MUXControlsTestApp)
AnimationsDemoPage (MUXControlsTestApp::Samples) ItemsViewItemInvokedEventArgs SampleSuggestions (MUXControlsTestApp)
AnnotatedScrollBar ItemsViewItemInvokedEventArgsT (winrt::implementation) SaturationEffect (Microsoft::UI::Private::Composition::Effects)
AnnotatedScrollBarDetailLabelRequestedEventArgs ItemsViewPage (MUXControlsTestApp) ScaleAnimatedVerticalListDemo (MUXControlsTestApp::Samples)
AnnotatedScrollBarDetailLabelRequestedEventArgsT (winrt::implementation) ItemsViewPictureLibraryPage (MUXControlsTestApp) ScopedBatchCompleted_revoker
AnnotatedScrollBarInteractionTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ItemsViewProperties ScrollBarController
AnnotatedScrollBarIScrollControllerPage (MUXControlsTestApp) ItemsViewSelectionChangedEventArgs ScrollBarController (MUXControlsTestApp)
AnnotatedScrollBarLabel ItemsViewSummaryPage (MUXControlsTestApp) ScrollBarPage (MUXControlsTestApp)
AnnotatedScrollBarLabelT (winrt::implementation) ItemsViewT (winrt::implementation) ScrollControllerAddScrollVelocityRequestedEventArgs
AnnotatedScrollBarPage (MUXControlsTestApp) ItemsViewTestHooks ScrollControllerPanRequestedEventArgs
AnnotatedScrollBarPanningInfo ItemsViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ScrollControllerScrollByRequestedEventArgs
AnnotatedScrollBarProperties ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ScrollControllerScrollToRequestedEventArgs
AnnotatedScrollBarRangeBasePage (MUXControlsTestApp) ItemsViewTestsWithInputHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ViewportManagerDownLevel::ScrollerInfo
AnnotatedScrollBarScrollingEventArgs ItemsViewTrace ScrollingAnchorRequestedEventArgs
AnnotatedScrollBarScrollingEventArgsT (winrt::implementation) ItemsViewTransitionPage (MUXControlsTestApp) ScrollingAnchorRequestedEventArgsT (winrt::implementation)
AnnotatedScrollBarSummaryPage (MUXControlsTestApp) ItemsViewWithDataPage (MUXControlsTestApp::Samples) ScrollingBringingIntoViewEventArgs
AnnotatedScrollBarT (winrt::implementation) ItemTemplateDemo (MUXControlsTestApp::Samples) ScrollingScrollAnimationStartingEventArgs
AnnotatedScrollBarTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ItemTemplateTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) ScrollingScrollCompletedEventArgs
AnnotatedScrollBarTrace ItemTemplateWrapper ScrollingScrollOptions
AppBarPage (MUXControlsTestApp) VirtualLayoutContextAdapter::ChildrenCollection::Iterator ScrollingScrollStartingEventArgs
ArithmeticCompositeEffect (Microsoft::UI::Private::Composition::Effects) SelectedItems::Iterator ScrollingZoomAnimationStartingEventArgs
AspectRatioRespectingControl (MUXControls::ApiTests::RepeaterTests::Common) ObservableVector::Iterator ScrollingZoomCompletedEventArgs
auto_cast HashMap::Iterator ScrollingZoomOptions
auto_unbox ITintEffect (Microsoft::UI::Private::Composition::Effects) ScrollingZoomStartingEventArgs
AutoHandle (MUXControls::Common) ITrackerHandleManager ScrollInputHelper
ScrollView::AutoHideScrollBarsState ITransform2DEffect (Microsoft::UI::Private::Composition::Effects) ScrollPresenter
AutoSuggestBox (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) IUnknownAccessor ScrollPresenterAccessibilityPage (MUXControlsTestApp)
AutoSuggestBoxHelper IUnknownAccessor< com_ptr< T > > ScrollPresenterAutomationPeer
AutoSuggestBoxHelperProperties IUnPremultiplyEffect (Microsoft::UI::Private::Composition::Effects) ScrollPresenterAutomationPeerT (winrt::implementation)
AutoSuggestBoxPage (MUXControlsTestApp) VectorOptions::IVectorOwner ScrollPresenterBringIntoViewPage (MUXControlsTestApp)
AutoSuggestBoxTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) IVectorOwner ScrollPresenterChainingAndRailingPage (MUXControlsTestApp)
AutoSuggestEventRevokers
K
ScrollPresenterDynamicPage (MUXControlsTestApp)
Awaitable KeyboardNavigationSample (MUXControlsTestApp::Samples) ScrollPresenterExpressionAnimationSourcesPage (MUXControlsTestApp)
B
MockItemsSource::KeyFromIndexCallInfo (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) ScrollPresenterLeakDetectionPage (MUXControlsTestApp)
BasicDemo (MUXControlsTestApp::Samples) HashMap::Iterator::KeyValuePair ScrollPresenterManipulationModePage (MUXControlsTestApp)
BiDirectionalScrollController (MUXControlsTestApp::Utilities)
L
ScrollPresenterMousePanningPage (MUXControlsTestApp)
BiDirectionalScrollControllerScrollingScrollCompletedEventArgs (MUXControlsTestApp::Utilities) Layout ScrollPresenterTests::ScrollPresenterOperation (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
BindableVector LayoutContext ScrollPresenterPage (MUXControlsTestApp)
BlankPage (MUXControlsTestApp) LayoutContextAdapter ScrollPresenterProperties
BlendEffect (Microsoft::UI::Private::Composition::Effects) LayoutPanel ScrollPresenterRepeaterAnchoringPage (MUXControlsTestApp)
BoolToBrushConverter (MUXControlsTestApp::Samples::Selection) LayoutPanelLayoutContext ScrollPresenterScrollSnapPointsPage (MUXControlsTestApp)
BoolToVisibilityConverter (MUXControlsTestApp::Samples::Selection) LayoutPanelProperties ScrollPresenterStackPanelAnchoringPage (MUXControlsTestApp)
BorderEffect (Microsoft::UI::Private::Composition::Effects) LayoutPanelT (winrt::implementation) ScrollPresentersWithSimpleContentsPage (MUXControlsTestApp)
BorderThicknessPage (MUXControlsTestApp) LayoutPanelTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ScrollPresenterTestHooks
BreadcrumbBar LayoutProperties ScrollPresenterTestHooksAnchorEvaluatedEventArgs
BreadcrumbBarAxeTestPage (MUXControlsTestApp) LayoutsTestHooks ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
BreadcrumbBarFolder (MUXControlsTestApp) LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs ScrollPresenterTestHooksHelper (MUXControlsTestApp::Utilities)
BreadcrumbBarItem (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
BreadcrumbBarItem LayoutTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) ScrollPresenterTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
BreadcrumbBarItemAutomationPeer LifetimeHandler ScrollPresenterTestsBase (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
BreadcrumbBarItemAutomationPeerT (winrt::implementation) LightConfigurationTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ScrollPresenterTestsWithAutomationPeer (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
BreadcrumbBarItemClickedEventArgs LinearTransferEffect (Microsoft::UI::Private::Composition::Effects) ScrollPresenterTestsWithInputHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
BreadcrumbBarItem::BreadcrumbBarItemFactory (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) LinedFlowLayout ScrollPresenterTrace
BreadcrumbBarItemT (winrt::implementation) LinedFlowLayoutDemo (MUXControlsTestApp::Samples) ScrollPresenterWithBiDirectionalScrollControllerPage (MUXControlsTestApp)
BreadcrumbBarPage (MUXControlsTestApp) LinedFlowLayoutItemAspectRatios ScrollPresenterWithCompositionScrollControllersPage (MUXControlsTestApp)
BreadcrumbBarProperties LinedFlowLayoutItemCollectionTransitionProvider ScrollPresenterWithSimpleScrollControllersPage (MUXControlsTestApp)
BreadcrumbBarT (winrt::implementation) LinedFlowLayoutItemsInfoRequestedEventArgs ScrollPresenterZoomSnapPointsPage (MUXControlsTestApp)
BreadcrumbElementFactory LinedFlowLayoutItemsInfoRequestedEventArgsT (winrt::implementation) ScrollSnapPoint
BreadcrumbIterable LinedFlowLayoutProperties ScrollSnapPointBase
BreadcrumbIterator LinedFlowLayoutT (winrt::implementation) ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
BreadcrumbLayout LinedFlowLayoutTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) ScrollView
BreadcrumbTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) LinedFlowLayoutTrace ScrollViewBlankPage (MUXControlsTestApp)
BreadcrumbTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) Flex::LineInfo (Flick) ScrollViewBringIntoViewOperation
Bridge (MUXControlsTestApp) ListViewAnchoringPage (MUXControlsTestApp) ScrollViewBringIntoViewPage (MUXControlsTestApp)
BridgeAnotherClass (MUXControlsTestApp) ListViewBackgroundPage (MUXControlsTestApp) ScrollViewDynamicPage (MUXControlsTestApp)
BrightnessSun (AnimatedVisuals) ListViewBasePage (MUXControlsTestApp) ScrollViewerAdapterPage (MUXControlsTestApp)
BrightnessSun::BrightnessSun_AnimatedVisual (AnimatedVisuals) ListViewElementNameBindingPage (MUXControlsTestApp) ScrollViewerAdapterTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
BringIntoViewOffsetsChange ListViewHeaderPage (MUXControlsTestApp) ScrollViewerAdapterTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
ItemsRepeaterScrollHost::BringIntoViewState ListViewItemPage (MUXControlsTestApp) ScrollViewerIRefreshInfoProviderAdapter
ButtonInteraction ListViewPage (MUXControlsTestApp) ScrollViewerIRefreshInfoProviderAdapterT (winrt::implementation)
ButtonInteractionInvokedEventArgs ScrollViewTestsWithInputHelper::LoggingHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
ButtonInteractionInvokedEventArgsT (winrt::implementation) ItemsViewTestsWithInputHelper::LoggingHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ScrollViewerPage (MUXControlsTestApp)
ButtonInteractionPage (MUXControlsTestApp) LottieLogo (AnimatedVisuals) ScrollViewKeyboardAndGamepadNavigationPage (MUXControlsTestApp)
ButtonInteractionProperties LottieLogo::LottieLogo_AnimatedVisual (AnimatedVisuals) ScrollViewPage (MUXControlsTestApp)
ButtonInteractionT (winrt::implementation) LuminanceToAlphaEffect (Microsoft::UI::Private::Composition::Effects) ScrollViewProperties
ButtonInteractionTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
M
ScrollViewsWithSimpleContentsPage (MUXControlsTestApp)
ButtonInteractionTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) MainWindowLightConfiguration (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ScrollViewT (winrt::implementation)
C
MapControl ScrollViewTestHooks
CachedVisualTreeHelpers MapControlMapServiceErrorOccurredEventArgs ScrollViewTestHooksHelper (MUXControlsTestApp::Utilities)
CalendarDatePickerPage (MUXControlsTestApp) MapControlPage (MUXControlsTestApp) ScrollViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
CalendarViewPage (MUXControlsTestApp) MapControlProperties ScrollViewTestsWithInputHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
CalendarViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) MapControlT (winrt::implementation) ScrollViewTrace
CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)> (details) MapControlTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ScrollViewVisualStateCounts (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
ItemCollectionTransitionProviderTests::CallInfo (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) MapControlTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ScrollViewWithRTLFlowDirectionPage (MUXControlsTestApp)
ItemsRepeaterScrollHost::CandidateInfo MapElement ScrollViewWithScrollControllersPage (MUXControlsTestApp)
CanvasGeometry MapElementClickEventArgs sealed
CanvasScrollControllerConsumer (MUXControlsTestApp) MapElementsLayer SecondaryWindowLightConfiguration (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
Category (MUXControlsTestApp::Samples) MapElementsLayerProperties SelectedItemInfo
Category (MUXControlsTestApp) MapElementsLayerT (winrt::implementation) SelectedItems
Category (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) MapIcon SelectedItemsVector
CheckBoxPage (MUXControlsTestApp) MapIconProperties SelectedTreeNodeVector
ChildHandlers MapIconT (winrt::implementation) SelectionContainer (MUXControlsTestApp::Samples::Selection)
VirtualLayoutContextAdapter::ChildrenCollection MapLayer SelectionContainerAutomationPeer (MUXControlsTestApp::Samples::Selection)
ChildrenInTabFocusOrderIterable MaterialHelper SelectionModeItem (MUXControlsTestApp)
ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator MaterialHelperBase SelectionModel
CircleLayout (MUXControlsTestApp::Samples) MaterialHelperTestApi SelectionModelChildrenRequestedEventArgs
CircleLayoutSamplePage (MUXControlsTestApp::Samples) MaterialHelperTestApiT (winrt::implementation) SelectionModelChildrenRequestedEventArgsT (winrt::implementation)
CMethodProfileGroup (RuntimeProfiler) MathToken SelectionModelProperties
CMethodProfileGroupBase (RuntimeProfiler) Matrix5x4 (Microsoft::UI::Private::Composition::Effects) SelectionModelSelectionChangedEventArgs
CollectionChangeDemo (MUXControlsTestApp::Samples) MediaTransportControlsPage (MUXControlsTestApp) SelectionModelT (winrt::implementation)
InspectingDataSourceTests::CollectionChangeRecorder (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) MenuBar SelectionModelTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
ColorPickerTests::Color (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) MenuBarAutomationPeer SelectionTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests)
ColorChangedEventArgs MenuBarAutomationPeerT (winrt::implementation) SelectionTreeHelper
ColorChangedEventWaiter (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) MenuBarItem SelectorBar
ColorItem (MUXControlsTestApp) MenuBarItemAutomationPeer SelectorBarItem
ColorMatrixEffect (Microsoft::UI::Private::Composition::Effects) MenuBarItemAutomationPeerT (winrt::implementation) SelectorBarItemAutomationPeer
ColorPicker MenuBarItemFlyout SelectorBarItemProperties
ColorPickerPage (MUXControlsTestApp) MenuBarItemFlyoutT (winrt::implementation) SelectorBarPage (MUXControlsTestApp)
ColorPickerProperties MenuBarItemProperties SelectorBarProperties
ColorPickerSlider (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) MenuBarItemT (winrt::implementation) SelectorBarSamplePage (MUXControlsTestApp)
ColorPickerSlider MenuBarPage (MUXControlsTestApp) SelectorBarSelectionChangedEventArgs
ColorPickerSliderAutomationPeer MenuBarProperties SelectorBarSummaryPage (MUXControlsTestApp)
ColorPickerSliderAutomationPeerT (winrt::implementation) MenuBarT (winrt::implementation) SelectorBarT (winrt::implementation)
ColorPickerSlider::ColorPickerSliderFactory (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) MenuBarTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) SelectorBarTestHooks
ColorPickerSliderProperties MenuFlyoutPage (MUXControlsTestApp) SelectorBarTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
ColorPickerSliderT (winrt::implementation) MicaBackdrop SelectorBarTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
ColorPickerT (winrt::implementation) MicaBackdropProperties SelectorBarTrace
ColorPickerTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) MicaBackdropT (winrt::implementation) SelectorBase
ColorPickerTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) MockAnimatedIconSource (MUXControlsTestApp) SelectTemplateEventArgs
ColorPickerTests::ColorPickerTestSetupHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) BreadcrumbTests::MockClass (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) SelectTemplateEventArgsT (winrt::implementation)
ColorSourceEffect (Microsoft::UI::Private::Composition::Effects) MockElementFactory (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) SepiaEffect (Microsoft::UI::Private::Composition::Effects)
ColorSpectrum (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) MockIAnimatedIconSource2 (MUXControlsTestApp) SharedHelpers
ColorSpectrum MockItemsSource (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) SimpleRectanglePage (MUXControlsTestApp)
ColorSpectrumAutomationPeer MockItemsSourceWithUniqueIdMapping (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) SimpleVerify (MUXControlsTestApp)
ColorSpectrumAutomationPeerT (winrt::implementation) MockNonVirtualizingLayout (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) SimpleXamlStartStopEvent_RAII
ColorSpectrum::ColorSpectrumFactory (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) MockStackLayout (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) SingleSelector
ColorSpectrumProperties MockVirtualizingLayout (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) SliderInteraction
ColorSpectrumT (winrt::implementation) MonochromaticOverlayPresenter SliderInteractionPage (MUXControlsTestApp)
ColorToSolidColorBrushConverter (MUXControlsTestApp) MonochromaticOverlayPresenterPage (MUXControlsTestApp) SliderInteractionProperties
ColumnMajorUniformToLargestGridLayout MonochromaticOverlayPresenterProperties SliderInteractionT (winrt::implementation)
ColumnMajorUniformToLargestGridLayoutProperties MonochromaticOverlayPresenterT (winrt::implementation) SliderInteractionTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
ColumnMajorUniformToLargestGridLayoutT (winrt::implementation) MultipleSelector SliderInteractionTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
ComboBoxDropDownEventRevokers MultipleTabViewPage (MUXControlsTestApp) SliderPage (MUXControlsTestApp)
ComboBoxHelper MutexLockedResource SliderRefreshInfoProviderAdapter (RefreshVizualizer_TestUI)
ComboBoxHelperProperties MUXControlsFactory SnapPointBase
ComboBoxPage (MUXControlsTestApp) MUXControlsTestHooks SnapPointBaseT (winrt::implementation)
ComboBoxTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) MUXControlsTestHooksLoggingMessageEventArgs SnapPointSortPredicate
CommandBarCenterPage (MUXControlsTestApp) MyCollection (MUXControlsTestApp::Samples) SnapPointWrapper
CommandBarFlyout MyColorSpectrum (MUXControlsTestApp) SnapPointWrapperComparator
CommandBarFlyoutCommandBar MyCommand (MUXControlsTestApp) SortingAndFilteringPage (MUXControlsTestApp::Samples)
CommandBarFlyoutCommandBarAutomationProperties MyContainerSelector (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) SpecialTreeView (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
CommandBarFlyoutCommandBarAutomationPropertiesFactory MyCustomNonVirtualizingStackLayout (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) SpecialTreeViewItem (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
CommandBarFlyoutCommandBarAutomationPropertiesProperties MyData (MUXControlsTestApp::Samples) SpecialTreeViewList (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
CommandBarFlyoutCommandBarProperties MyData (MUXControlsTestApp) SpecialTreeViewNode (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
CommandBarFlyoutCommandBarT (winrt::implementation) CollectionChangeDemo::MyDataSource (MUXControlsTestApp::Samples) SpectrumBrush
CommandBarFlyoutCommandBarTemplateSettings MyItem (MUXControlsTestApp::Samples) SpectrumBrushProperties
CommandBarFlyoutCommandBarTemplateSettingsFactory MyItemsRepeater (MUXControlsTestApp::Samples) SpectrumBrushT (winrt::implementation)
CommandBarFlyoutCommandBarTemplateSettingsProperties MySelector (MUXControlsTestApp::Samples) SplitButton
CommandBarFlyoutMainPage (MUXControlsTestApp) MySelector (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) SplitButtonAutomationPeer
CommandBarFlyoutPage (MUXControlsTestApp)
N
SplitButtonAutomationPeerT (winrt::implementation)
CommandBarFlyoutT (winrt::implementation) NamedGroup-g (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) SplitButtonClickEventArgs
CommandBarFlyoutTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) EffectBase::NamedProperty (Microsoft::UI::Private::Composition::Effects) SplitButtonPage (MUXControlsTestApp)
CommandBarFlyoutTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) NavigationView SplitButtonProperties
CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) NavigationViewAnimationPage (MUXControlsTestApp) SplitButtonT (winrt::implementation)
CommandBarFlyoutTrace NavigationViewAutomationPeer SplitButtonTestApi
CommandBarPage (MUXControlsTestApp) NavigationViewAutomationPeerT (winrt::implementation) SplitButtonTestHelper
CommandBarSummaryPage (MUXControlsTestApp) NavigationViewAxeTestPage (MUXControlsTestApp) SplitButtonTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
CommonStylesApiTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) NavigationViewBackRequestedEventArgs SplitButtonTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
CommonStylesPage (MUXControlsTestApp) NavigationViewBlankPage1 (MUXControlsTestApp) SplitDataSourceBase
CommonStylesTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) NavigationViewCaseBundle (MUXControlsTestApp) SplitVector
CommonStylesVisualTreeTestSamples (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) NavigationViewCompactPaneLengthTestPage (MUXControlsTestApp) SplitViewPage (MUXControlsTestApp)
CommonTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests) NavigationViewCustomMenuItemPage (MUXControlsTestApp) PersonPicturePage::SportsGroup (MUXControlsTestApp)
CompactPage (MUXControlsTestApp) NavigationViewCustomThemeResourcesPage (MUXControlsTestApp) PersonPicturePage::SportsPerson (MUXControlsTestApp)
ComposableBasePointersImplTType NavigationViewDisplayModeChangedEventArgs SpotDiffuseEffect (Microsoft::UI::Private::Composition::Effects)
ComposableBasePointersImplTType< false > NavigationViewInfoBadgeTestPage (MUXControlsTestApp) SpotSpecularEffect (Microsoft::UI::Private::Composition::Effects)
ComposableBasePointersImplTTypeForIterator NavigationViewInitPage (MUXControlsTestApp) Square (MUXControlsTestApp)
ComposableBasePointersImplTTypeForIterator< false > NavigationViewIsPaneOpenPage (MUXControlsTestApp) StackLayout
CompositeStepEffect (Microsoft::UI::Private::Composition::Effects) NavigationViewItem StackLayoutProperties
CompositionScrollController (MUXControlsTestApp::Utilities) NavigationViewItemAutomationPeer StackLayoutState
CompositionScrollControllerOffsetChangeCompletedEventArgs (MUXControlsTestApp::Utilities) NavigationViewItemAutomationPeerT (winrt::implementation) StackLayoutStateT (winrt::implementation)
CompositionScrollControllerPanningInfo (MUXControlsTestApp::Utilities) NavigationViewItemBase StackLayoutT (winrt::implementation)
ContentDialogPage (MUXControlsTestApp) NavigationViewItemBaseProperties StoreDemoPage (MUXControlsTestApp::Samples)
ContrastEffect (Microsoft::UI::Private::Composition::Effects) NavigationViewItemBaseRevokers StoreMockData (MUXControlsTestApp::Samples)
MicaBackdrop::ControllerEntry NavigationViewItemBaseT (winrt::implementation) SwipeControl
DesktopAcrylicBackdrop::ControllerEntry NavigationViewItemCollapsedEventArgs SwipeControlClearPage (MUXControlsTestApp)
ControlVisualTreeTestFilter (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) NavigationViewItemCollapsedEventArgsT (winrt::implementation) SwipeControlInteractionTrackerOwner
CoreWebView2InitializedEventArgs NavigationViewItemExpandingEventArgs SwipeControlPage (MUXControlsTestApp)
CoreWindowEventsPage (MUXControlsTestApp) NavigationViewItemExpandingEventArgsT (winrt::implementation) SwipeControlPage2 (MUXControlsTestApp)
CornerRadiusFilterConverter NavigationViewItemHeader SwipeControlProperties
CornerRadiusFilterConverterProperties NavigationViewItemHelper SwipeControlT (winrt::implementation)
CornerRadiusPage (MUXControlsTestApp) NavigationViewItemInvokedEventArgs SwipeControlTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
CornerRadiusToThicknessConverter NavigationViewItemInvokedEventArgsT (winrt::implementation) SwipeControlTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
CornerRadiusToThicknessConverterProperties NavigationViewItemPresenter SwipeControlTrace
CrossFadeEffect (Microsoft::UI::Private::Composition::Effects) NavigationViewItemPresenterProperties SwipeItem
CustomContent (MUXControlsTestApp) NavigationViewItemPresenterT (winrt::implementation) SwipeItemInvokedEventArgs
PhasingTests::CustomElementFactory (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) NavigationViewItemPresenterTemplateSettings SwipeItemProperties
InspectingDataSourceTests::CustomEnumerable (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) NavigationViewItemPresenterTemplateSettingsProperties SwipeItems
Customer (MUXControlsTestApp) NavigationViewItemProperties SwipeItemsProperties
Customers (MUXControlsTestApp) NavigationViewItemSeparator SwipeItemsT (winrt::implementation)
CustomItemsSource (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) NavigationViewItemsFactory SwipeItemT (winrt::implementation)
CustomItemsSourceView (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) NavigationViewItemTemplatePage (MUXControlsTestApp) SwipePage (MUXControlsTestApp)
CustomItemsSourceViewWithUniqueIdMapping (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) NavigationViewMenuItemsSourcePage (MUXControlsTestApp) SwipeTestHooks
CustomItemsSourceWithUniqueId (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) NavigationViewMenuItemStretchPage (MUXControlsTestApp)
T
CommonStylesVisualTreeTestSamples::CustomizedFilter (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) NavigationViewMinimalPage (MUXControlsTestApp) TabDataItem (MUXControlsTestApp)
CommonStylesVisualTreeTestSamples::CustomizedTranslator (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) NavigationViewPage (MUXControlsTestApp) TabView
CustomNavigationViewItem (MUXControlsTestApp) NavigationViewPageDataContext (MUXControlsTestApp) TabViewAutomationPeer
CustomProperty NavigationViewPaneClosingEventArgs TabViewAutomationPeerT (winrt::implementation)
CustomSelectionModel (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) NavigationViewPaneClosingEventArgsT (winrt::implementation) TabViewAxeTestPage (MUXControlsTestApp)
D
NavigationViewProperties TabViewExternalTornOutTabsDroppedEventArgs
Data (MUXControlsTestApp::Samples::Selection) NavigationViewRS3Page (MUXControlsTestApp) TabViewExternalTornOutTabsDroppingEventArgs
DataAsElementElementFactory (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) NavigationViewRS4Page (MUXControlsTestApp) TabViewItem
DataItem (MUXControlsTestApp) NavigationViewSelectedItemEdgeCasePage (MUXControlsTestApp) TabViewItemAutomationPeer
DataModelWithINPC (MUXControlsTestApp) NavigationViewSelectionChangedEventArgs TabViewItemAutomationPeerT (winrt::implementation)
DatePickerPage (MUXControlsTestApp) NavigationViewSelectionChangedEventArgsT (winrt::implementation) TabViewItemProperties
DefaultItemCollectionTransitionProvider (MUXControlsTestApp::Utils) NavigationViewStretchPage (MUXControlsTestApp) TabViewItemT (winrt::implementation)
Defaults (MUXControlsTestApp::Samples) NavigationViewT (winrt::implementation) TabViewItemTemplateSettings
DelegatingItemsSource (MUXControlsTestApp::Samples) NavigationViewTemplateSettings TabViewItemTemplateSettingsProperties
DeriveFromBitmapIconHelper_base NavigationViewTemplateSettingsProperties TabViewListView
DeriveFromBitmapIconSourceHelper_base NavigationViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) TabViewListViewT (winrt::implementation)
DeriveFromPanelHelper_base NavigationViewTestsBase (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests) TabViewPage (MUXControlsTestApp)
DeriveFromPathIconHelper_base NavigationViewTopNavOnlyPage (MUXControlsTestApp) TabViewProperties
DeriveFromPathIconSourceHelper_base NavigationViewTopNavOverflowButtonPage (MUXControlsTestApp) TabViewSizingPage (MUXControlsTestApp)
DeriveFromToggleMenuFlyoutItemHelper_base NavigationViewTopNavPage (MUXControlsTestApp) TabViewT (winrt::implementation)
DesktopAcrylicBackdrop NavigationViewTopNavStorePage (MUXControlsTestApp) TabViewTabCloseRequestedEventArgs
DesktopAcrylicBackdropT (winrt::implementation) NavigationViewTrace TabViewTabClosingBehaviorPage (MUXControlsTestApp)
DialogWithNavView (MUXControlsTestApp) NavViewPageData (MUXControlsTestApp) TabViewTabDragCompletedEventArgs
DispatcherHelper NestedGridViewsPage (MUXControlsTestApp) TabViewTabDragStartingEventArgs
DisplayRegionHelper NestedItemsControlsPage (MUXControlsTestApp) TabViewTabDroppedOutsideEventArgs
DisplayRegionHelperInfo NestedListViewsPage (MUXControlsTestApp) TabViewTabItemsSourcePage (MUXControlsTestApp)
DisplayRegionHelperTestApi NewWindowRootPage (MUXControlsTestApp) TabViewTabTearOutRequestedEventArgs
DisposableUserControl (MUXControlsTestApp::Samples) NonReferenceTrackerStorageHelper TabViewTabTearOutWindowRequestedEventArgs
DistantDiffuseEffect (Microsoft::UI::Private::Composition::Effects) NonVirtualizingLayout TabViewTearOutTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
DistantSpecularEffect (Microsoft::UI::Private::Composition::Effects) NonVirtualizingLayoutContext TabViewTearOutWindowWithDataItems (MUXControlsTestApp)
DoubleToStringConverter (MUXControlsTestApp) NonVirtualStackLayout (MUXControlsTestApp::Samples) TabViewTearOutWindowWithoutDataItems (MUXControlsTestApp)
DoubleUtil NonVirtualStackLayout (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) TabViewTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
DropDownButton (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) NonVirtualStackLayoutSamplePage (MUXControlsTestApp::Samples) TabViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
DropDownButton NullableBooleanToBooleanConverter (MUXControlsTestApp) TabViewTrace
DropDownButtonAutomationPeer NullableXamlType InkCanvas::TargetData
DropDownButtonAutomationPeerT (winrt::implementation) NullSelector TargetElement (MUXControlsTestApp)
DropDownButton::DropDownButtonFactory (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) Nullsource (AnimatedVisuals) TeachingTip
DropDownButtonPage (MUXControlsTestApp) NumberBox TeachingTipAutomationPeer
DropDownButtonT (winrt::implementation) NumberBoxAutomationPeer TeachingTipAutomationPeerT (winrt::implementation)
DropDownButtonTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) NumberBoxAutomationPeerT (winrt::implementation) TeachingTipCaseBundle (MUXControlsTestApp)
ObservableTraits::Dummy NumberBoxAxeTestPage (MUXControlsTestApp) TeachingTipClosedEventArgs
DynamicPage (MUXControlsTestApp) NumberBoxPage (MUXControlsTestApp) TeachingTipClosingEventArgs
E
NumberBoxParser TeachingTipClosingEventArgsT (winrt::implementation)
EasingInfo NumberBoxProperties TeachingTipFocusPage (MUXControlsTestApp)
EffectBase (Microsoft::UI::Private::Composition::Effects) NumberBoxT (winrt::implementation) TeachingTipFocusTestPageElements (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
EffectiveViewportScrollPresenterTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) NumberBoxTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TeachingTipInXamlPage (MUXControlsTestApp)
EffectiveViewportTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) NumberBoxTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) TeachingTipPage (MUXControlsTestApp)
ElementFactory NumberBoxValueChangedEventArgs TeachingTipProperties
ElementFactoryGetArgsDownlevel
O
TeachingTipT (winrt::implementation)
ElementFactoryRecycleArgsDownlevel ObjectModelTestPage (MUXControlsTestApp::Samples) TeachingTipTemplateSettings
ElementFromElementElementFactory (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) ObservableTraits TeachingTipTemplateSettingsProperties
RecyclePool::ElementInfo ObservableTraits< T, true, isBindable > TeachingTipTestHooks
ElementInfo ObservableVector TeachingTipTestPageElements (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
PhasingTests::ElementPhasingManager (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) ObservableVectorInnerImpl TeachingTipTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
ElementsInItemsSourcePage (MUXControlsTestApp::Samples) InspectingDataSourceTests::ObservableVectorWithUniqueIds (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) TeachingTipTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
Entry (anonymous_namespace{XamlMetadataProviderGenerated.h}) OffsetsChange TemperatureAndTintEffect (Microsoft::UI::Private::Composition::Effects)
enum_array OffsetsChangeWithAdditionalVelocity TestCommand (SwipeControl_TestUI)
enum_vector OpacityEffect (Microsoft::UI::Private::Composition::Effects) TestCommand (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
EnumToStringConverter (MUXControlsTestApp) CompositionScrollController::OperationInfo (MUXControlsTestApp::Utilities) TestControl (MUXControlsTestApp)
EnumXamlType BiDirectionalScrollController::OperationInfo (MUXControlsTestApp::Utilities) TestControlAutomationPeer (MUXControlsTestApp)
event OrientationBasedMeasures ScrollPresenterTests::TestDataSource (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
event_base OrientationBasedMeasures (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) ViewportTests::TestGridLayout (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
event_source
P
ViewportTests::TestScrollingSurface (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
EventTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests) PageInfo (MUXControlsTestApp) ViewportTests::TestStackLayout (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
Expander (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) PagerControl TextCommandBarFlyout
Expander PagerControlAutomationPeer TextCommandBarFlyoutPage (MUXControlsTestApp)
ExpanderAutomationPeer PagerControlAutomationPeerT (winrt::implementation) TextCommandBarFlyoutTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
ExpanderAutomationPeerT (winrt::implementation) PagerControlAxeTestPage (MUXControlsTestApp) TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
Expander::ExpanderFactory (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) PagerControlPage (MUXControlsTestApp) TextControlsPage (MUXControlsTestApp)
ExpanderPage (MUXControlsTestApp) PagerControlProperties TextPage (MUXControlsTestApp)
ExpanderProperties PagerControlSelectedIndexChangedEventArgs ThreadData
ExpanderT (winrt::implementation) PagerControlT (winrt::implementation) TimePickerPage (MUXControlsTestApp)
ExpanderTemplateSettings PagerControlTemplateSettings TintEffect (Microsoft::UI::Private::Composition::Effects)
ExpanderTemplateSettingsProperties PagerControlTemplateSettingsProperties TitleBar
ExpanderTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) PagerControlTestBase (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TitleBarAutomationPeer
ExpanderTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) PagerControlTestPageElements (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TitleBarAutomationPeerT (winrt::implementation)
ExposureEffect (Microsoft::UI::Private::Composition::Effects) PagerControlTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TitleBarPage (MUXControlsTestApp)
ExpressionAnimationStatusChange (MUXControlsTestApp::Utilities) PagerControlTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) TitleBarPageWindow (MUXControlsTestApp)
ExtendedSelector PaneBehaviorTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests) TitleBarProperties
ExtraCommandBarFlyoutPage (MUXControlsTestApp) PaneFooterTestPage (MUXControlsTestApp) TitleBarT (winrt::implementation)
F
PaneLayoutTestPage (MUXControlsTestApp) TitleBarTemplateSettings
FallbackGrid (MUXControlsTestApp) ParallaxView TitleBarTemplateSettingsProperties
final ParallaxViewPage (MUXControlsTestApp) TitleBarTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
AnimatedVisualPlayer::final ParallaxViewProperties ToggleAnimatedIconHost (MUXControlsTestApp)
FixedSizeItem (MUXControlsTestApp::Samples) ParallaxViewStackPanelPage (MUXControlsTestApp) ToggleSplitButton
FlatItemsControlPage (MUXControlsTestApp) ParallaxViewTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ToggleSplitButtonAutomationPeer
FlatSample (MUXControlsTestApp::Samples::Selection) ParallaxViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ToggleSplitButtonAutomationPeerT (winrt::implementation)
Flex (Flick) PerfXamlEvent_RAII ToggleSplitButtonIsCheckedChangedEventArgs
Flex::FlexState (Flick) Person (MUXControlsTestApp::Samples) ToggleSplitButtonProperties
FlipViewPage (MUXControlsTestApp) PersonDataSource (MUXControlsTestApp::Samples) ToolTipPage (MUXControlsTestApp)
FloatUtil PersonElementFactory (MUXControlsTestApp::Samples) TopModeTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests)
FlowLayout PersonInfo (MUXControlsTestApp) TopNavigationViewDataProvider
FlowLayoutAlgorithm PersonPicture tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
FlowLayoutCollectionChangeTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) PersonPictureAutomationPeer Transform2DEffect (Microsoft::UI::Private::Composition::Effects)
FlowLayoutDemoPage (MUXControlsTestApp::Samples) PersonPictureAutomationPeerT (winrt::implementation) TreeNode (Breadcrumb_TestUI)
FlowLayoutDerived (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) PersonPicturePage (MUXControlsTestApp) TreeStructure (Breadcrumb_TestUI)
FlowLayoutProperties PersonPictureProperties TreeView
FlowLayoutState PersonPictureT (winrt::implementation) TreeViewCollapsedEventArgs
FlowLayoutStateT (winrt::implementation) PersonPictureTemplateSettings TreeViewCollapsedEventArgsT (winrt::implementation)
FlowLayoutT (winrt::implementation) PersonPictureTemplateSettingsProperties TreeViewDragItemsCompletedEventArgs
FlowLayoutTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) PersonPictureTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TreeViewDragItemsCompletedEventArgsT (winrt::implementation)
FocusBehaviorTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests) PersonPictureTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) TreeViewDragItemsStartingEventArgs
FocusHelper PhasingTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) TreeViewDragItemsStartingEventArgsT (winrt::implementation)
FunctionTelemetryCount (RuntimeProfiler) Picture (MUXControlsTestApp) TreeViewExpandingEventArgs
G
PictureLibrary (MUXControlsTestApp) TreeViewExpandingEventArgsT (winrt::implementation)
GammaTransferEffect (Microsoft::UI::Private::Composition::Effects) final::PinnedElementInfo TreeViewItem
GaussianBlurEffect (Microsoft::UI::Private::Composition::Effects) PinterestLayout (MUXControlsTestApp::Samples) TreeViewItem (MUXControlsTestApp::Samples::Selection)
GenericInkCallback PinterestLayoutSamplePage (MUXControlsTestApp::Samples) TreeViewItemAutomationPeer
MockItemsSource::GetAtCallInfo (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) PipsPager TreeViewItemAutomationPeer (MUXControlsTestApp::Samples::Selection)
MockElementFactory::GetElementCallInfo (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) PipsPagerAutomationPeer TreeViewItemAutomationPeerT (winrt::implementation)
GlobalDependencyProperty PipsPagerAutomationPeerT (winrt::implementation) TreeViewItemDataAutomationPeer
GrayscaleEffect (Microsoft::UI::Private::Composition::Effects) PipsPagerAxeTestPage (MUXControlsTestApp) TreeViewItemDataAutomationPeerT (winrt::implementation)
GridViewPage (MUXControlsTestApp) PipsPagerElements (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TreeViewItemInvokedEventArgs
GroupedItemsControlGroupItem (MUXControlsTestApp) PipsPagerExamples (MUXControlsTestApp) TreeViewItemInvokedEventArgsT (winrt::implementation)
GroupedItemsControlItem (MUXControlsTestApp) PipsPagerPage (MUXControlsTestApp) TreeViewItemProperties
GroupedItemsControlPage (MUXControlsTestApp) PipsPagerProperties TreeViewItemSource (MUXControlsTestApp)
GroupedItemsControlViewModel (MUXControlsTestApp) PipsPagerSelectedIndexChangedEventArgs TreeViewItemsSourceTestPage (MUXControlsTestApp)
GroupedListViewBaseGroupItem (MUXControlsTestApp) PipsPagerT (winrt::implementation) TreeViewItemStyleSelector (MUXControlsTestApp)
GroupedListViewBaseItem (MUXControlsTestApp) PipsPagerTemplateSettings TreeViewItemT (winrt::implementation)
GroupedListViewBasePage (MUXControlsTestApp) PipsPagerTemplateSettingsProperties TreeViewItemTemplateSelector (MUXControlsTestApp)
GroupedListViewBaseViewModel (MUXControlsTestApp) PipsPagerTestBase (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TreeViewItemTemplateSelectorTestPage (MUXControlsTestApp)
GroupedRepeaterItem (MUXControlsTestApp::Samples::Selection) PipsPagerTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) TreeViewItemTemplateSettings
GroupedRepeaterItemAutomationPeer (MUXControlsTestApp::Samples::Selection) PipsPagerTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) TreeViewItemTemplateSettingsProperties
GroupedSample (MUXControlsTestApp::Samples::Selection) PipsPagerViewItemRevokers TreeViewLateDataInitTest (MUXControlsTestApp)
H
PivotPage (MUXControlsTestApp) TreeViewList
HandlePolicy (MUXControls::Common) PlatformConfiguration (Common) TreeViewListAutomationPeer
HashMap PointDiffuseEffect (Microsoft::UI::Private::Composition::Effects) TreeViewListAutomationPeerT (winrt::implementation)
HierarchicalNavigationViewDataBinding (MUXControlsTestApp) PointerInfo TreeViewListT (winrt::implementation)
HierarchicalNavigationViewMarkup (MUXControlsTestApp) PointerInfoRevokers TreeViewNode
Hsv PointSpecularEffect (Microsoft::UI::Private::Composition::Effects) TreeViewNode2 (MUXControlsTestApp)
HueRotationEffect (Microsoft::UI::Private::Composition::Effects) PosterizeEffect (Microsoft::UI::Private::Composition::Effects) TreeViewNodeInMarkupTestPage (MUXControlsTestApp)
I
PrefixConverter (MUXControlsTestApp) TreeViewNodeProperties
IAcrylicBrushStaticsPrivate (MU_PRIVATE_MEDIA_NAMESPACE) PremultiplyEffect (Microsoft::UI::Private::Composition::Effects) TreeViewNodeT (winrt::implementation)
IAdapterAnimationHandler (MU_PRIVATE_CONTROLS_NAMESPACE) PrimitiveXamlType TreeViewNodeVector
IAlphaMaskEffect (Microsoft::UI::Private::Composition::Effects) ProfileGroupInfo (RuntimeProfiler) TreeViewPage (MUXControlsTestApp)
IAnimatedVisual (MU_XC_NAMESPACE) ProgressBar TreeViewProperties
IAnimatedVisualSource (MU_XC_NAMESPACE) ProgressBarAutomationPeer TreeViewSample (MUXControlsTestApp::Samples::Selection)
IAnimatedVisualSource3 (MU_XC_NAMESPACE) ProgressBarAutomationPeerT (winrt::implementation) TreeViewSelectionChangedEventArgs
IApplicationViewSpanningRects (MU_XC_NAMESPACE) ProgressBarAxeTestPage (MUXControlsTestApp) TreeViewSelectionChangedEventArgsT (winrt::implementation)
IArithmeticCompositeEffect (Microsoft::UI::Private::Composition::Effects) ProgressBarPage (MUXControlsTestApp) TreeViewT (winrt::implementation)
IBlendEffect (Microsoft::UI::Private::Composition::Effects) ProgressBarProperties TreeViewTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
IBorderEffect (Microsoft::UI::Private::Composition::Effects) ProgressBarReTemplatePage (MUXControlsTestApp) TreeViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
IClosable (MU_XC_NAMESPACE) ProgressBarT (winrt::implementation) TreeViewUnrealizedChildrenTestPage (MUXControlsTestApp)
IColorMatrixEffect (Microsoft::UI::Private::Composition::Effects) ProgressBarTemplateSettings TreeViewViewModel (MUXControlsTestApp)
IColorSourceEffect (Microsoft::UI::Private::Composition::Effects) ProgressBarTemplateSettingsProperties TreeViewViewModelItem (MUXControlsTestApp)
ICompositeStepEffect (Microsoft::UI::Private::Composition::Effects) ProgressBarTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) SelectionTreeHelper::TreeWalkNodeInfo
IconSourceApiTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ProgressBarTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) SelectionModelTests::TreeWalkNodeInfo (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
IconSourceToIconSourceElementConverter (CommandingHelpers) ProgressRing TStorageWrapperImpl
IContrastEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingAutomationPeer TStorageWrapperImpl< T, true >
ICoreWebView2Interop (MUXControlsTestApp) ProgressRingAutomationPeerT (winrt::implementation) TwoPaneView
ICrossFadeEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingAxeTestPage (MUXControlsTestApp) TwoPaneViewPage (MUXControlsTestApp)
IDistantDiffuseEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingCustomLottieSourcePage (MUXControlsTestApp) TwoPaneViewProperties
IDistantSpecularEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingDeterminate (AnimatedVisuals) TwoPaneViewT (winrt::implementation)
IExposureEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingIndeterminate (AnimatedVisuals) TwoPaneViewTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
IFlowLayoutAlgorithmDelegates ProgressRingPage (MUXControlsTestApp) TwoPaneViewTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
IGammaTransferEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingProperties reference_tracker_implements_t::type< AnnotatedScrollBarPanningInfo, I...,::IReferenceTrackerExtension >
IGaussianBlurEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingStoryboardAnimationPage (MUXControlsTestApp) reference_tracker_implements_t::type< BreadcrumbIterable, I...,::IReferenceTrackerExtension >
IGrayscaleEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingT (winrt::implementation) reference_tracker_implements_t::type< ChildrenCollection< T >, I...,::IReferenceTrackerExtension >
IHueRotationEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingTemplateSettings reference_tracker_implements_t::type< ChildrenInTabFocusOrderIterable, I...,::IReferenceTrackerExtension >
IInvertEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingTemplateSettingsProperties reference_tracker_implements_t::type< ElementFactoryGetArgsDownlevel, I...,::IReferenceTrackerExtension >
IKeyIndexMapping (MU_XC_NAMESPACE) ProgressRingTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) reference_tracker_implements_t::type< ElementFactoryRecycleArgsDownlevel, I...,::IReferenceTrackerExtension >
ILinearTransferEffect (Microsoft::UI::Private::Composition::Effects) ProgressRingTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) reference_tracker_implements_t::type< HashMap< K, V >, I...,::IReferenceTrackerExtension >
ILuminanceToAlphaEffect (Microsoft::UI::Private::Composition::Effects) PropertyChanged_revoker reference_tracker_implements_t::type< Iterator, I...,::IReferenceTrackerExtension >
ImageIcon Awaitable::PTP_WAIT_traits reference_tracker_implements_t::type< KeyValuePair, I...,::IReferenceTrackerExtension >
ImageIconPage (MUXControlsTestApp) PTRPage (MUXControlsTestApp) reference_tracker_implements_t::type< RefreshInfoProviderImpl, I...,::IReferenceTrackerExtension >
ImageIconProperties PTRTrace reference_tracker_implements_t::type< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, I...,::IReferenceTrackerExtension >
ImageIconSource PullToRefreshHelperTestApi reference_tracker_implements_t::type< SelectedItems< T >, I...,::IReferenceTrackerExtension >
ImageIconSourceProperties PullToRefreshPage (PTR_TestUI) reference_tracker_implements_t::type< SelectedItemsVector, I...,::IReferenceTrackerExtension >
ImageIconTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
Q
reference_tracker_implements_t::type< SelectedTreeNodeVector, I...,::IReferenceTrackerExtension >
ImageIconTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) ScrollPresenterStackPanelAnchoringPage::QueuedOperation (MUXControlsTestApp) reference_tracker_implements_t::type< TreeViewNodeVector, I...,::IReferenceTrackerExtension >
ImageIRefreshInfoProviderAdapter (MUXControlsTestApp) ScrollPresenterRepeaterAnchoringPage::QueuedOperation (MUXControlsTestApp) reference_tracker_implements_t::type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, I...,::IReferenceTrackerExtension >
ImagePage (MUXControlsTestApp) ScrollPresenterDynamicPage::QueuedOperation (MUXControlsTestApp) reference_tracker_implements_t::type< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension >
IndexPath ListViewBasePage::QueuedOperation (MUXControlsTestApp) reference_tracker_implements_t::type< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, I...,::IReferenceTrackerExtension >
IndexPathTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) ItemsViewSummaryPage::QueuedOperation (MUXControlsTestApp) reference_tracker_implements_t::type< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, I...,::IReferenceTrackerExtension >
IndexRange
R
reference_tracker_implements_t::type< ViewModel, I...,::IReferenceTrackerExtension >
InfoBadge RadialGradientBrush
U
InfoBadgePage (MUXControlsTestApp) RadialGradientBrushPage (MUXControlsTestApp) UICollection (MUXControlsTestApp::Samples)
InfoBadgeProperties RadialGradientBrushProperties UniformGrid2DLayout (Flick)
InfoBadgeT (winrt::implementation) RadialGradientBrushT (winrt::implementation) UniformGridLayout
InfoBadgeTemplateSettings RadialGradientBrushTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) UniformGridLayoutDemo (MUXControlsTestApp::Samples)
InfoBadgeTemplateSettingsProperties RadialItemCollectionTransitionProvider (MUXControlsTestApp::Samples) UniformGridLayoutProperties
InfoBadgeTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) RadioButtons UniformGridLayoutState
InfoBar RadioButtonsAutomationPeer UniformGridLayoutStateT (winrt::implementation)
InfoBarAutomationPeer RadioButtonsAutomationPeerT (winrt::implementation) UniformGridLayoutT (winrt::implementation)
InfoBarAutomationPeerT (winrt::implementation) RadioButtonsCaseBundle (RadioButtons_TestUI) BiDirectionalScrollController::UniScrollController (MUXControlsTestApp::Utilities)
InfobarAxeTestage (MUXControlsTestApp) RadioButtonsElementFactory BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs (MUXControlsTestApp::Utilities)
InfoBarClosedEventArgs RadioButtonsFocusPage (RadioButtons_TestUI) UnPremultiplyEffect (Microsoft::UI::Private::Composition::Effects)
InfoBarClosingEventArgs RadioButtonsFocusTestPageElements (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) UriToStringConverter (MUXControlsTestApp)
InfoBarClosingEventArgsT (winrt::implementation) RadioButtonsPage (MUXControlsTestApp)
V
InfoBarPage (MUXControlsTestApp) RadioButtonsProperties ValueHelper
InfoBarPanel RadioButtonsT (winrt::implementation) ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > >
InfoBarPanelProperties RadioButtonsTestHooks ValueHelper< winrt::hstring, void >
InfoBarPanelT (winrt::implementation) RadioButtonsTestPageElements (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) ValueProviderThunk
InfoBarProperties RadioButtonsTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) VariableSizedItemsPage (MUXControlsTestApp::Samples)
InfoBarT (winrt::implementation) RadioButtonsTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) VariableSizeItem (MUXControlsTestApp::Samples)
InfoBarTemplateSettings RadioMenuFlyoutItem Vector
InfoBarTemplateSettingsProperties RadioMenuFlyoutItemPage (MUXControlsTestApp) VectorBase
InfoBarTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) RadioMenuFlyoutItemProperties VectorChangedEventArgs
Ingredient (MUXControlsTestApp) RadioMenuFlyoutItemTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) WinRTCollection::VectorChangedEventArgs (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common)
InitialsGenerator RatingControl VectorFlagHelper
InkCanvas RatingControlAutomationPeer VectorInnerImpl
InkCanvasAutomationPeer RatingControlAutomationPeerT (winrt::implementation) VectorInterfaceHelper
InkCanvasAutomationPeerT (winrt::implementation) RatingControlPage (MUXControlsTestApp) VectorInterfaceHelper< T, true >
InkCanvasProperties RatingControlProperties VectorIterator
InkCanvasT (winrt::implementation) RatingControlT (winrt::implementation) VectorIteratorTraits
InkToolBar RatingControlTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) VectorIteratorTraits< T, true, isDependencyObjectBase >
InkToolBarAutomationPeer RatingControlTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) VectorOptions
InkToolBarAutomationPeerT (winrt::implementation) RatingItemFontInfo VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef >
InkToolBarBallpointPenButton RatingItemFontInfoProperties VectorOptionsBase
InkToolBarCustomPen RatingItemImageInfo VectorOptionsFromFlag
InkToolBarCustomPenButton RatingItemImageInfoProperties ViewChange
InkToolBarCustomPenButtonProperties RatingItemInfo ViewChangeBase
InkToolBarCustomPenT (winrt::implementation) RatingItemInfoT (winrt::implementation) ViewManagerTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
InkToolBarCustomToggleButton ReadOnlyNotifyPropertyChangedCollection-g (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) ViewModel
InkToolBarCustomToolButton Recipe (MUXControlsTestApp::Samples::Model) ViewportManager
InkToolBarCustomToolButtonProperties RecipeElementFactory (MUXControlsTestApp::Samples) ViewportManagerDownLevel
InkToolBarEraserButton RecipeGroup (MUXControlsTestApp::Samples::Model) ViewportManagerWithPlatformFeatures
InkToolBarEraserButtonInternal WebView2RenderingVerifier::NativeMethods::RECT (WebView2Temporary) ViewportTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
InkToolBarEraserButtonInternalTundefined (winrt::implementation) MockElementFactory::RecycleElementCallInfo (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::Mocks) VirtualizationInfo
InkToolBarEraserButtonProperties RecyclePool VirtualizingDataSource (MUXControlsTestApp)
InkToolBarEraserFlyoutItemClickedEventArgs RecyclePoolProperties VirtualizingLayout
InkToolBarEraserFlyoutItemClickedEventArgsT (winrt::implementation) RecyclePoolT (winrt::implementation) VirtualizingLayoutContext
InkToolBarFlyoutItem RecyclePoolTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) VirtualizingStackLayout (MUXControlsTestApp::Samples)
InkToolBarFlyoutItemAutomationPeer RecyclingElementFactory VirtualizingStackLayoutSamplePage (MUXControlsTestApp::Samples)
InkToolBarFlyoutItemAutomationPeerT (winrt::implementation) RecyclingElementFactoryDerived (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common) VirtualizingStackPanelPage (MUXControlsTestApp)
InkToolBarFlyoutItemProperties RecyclingElementFactoryProperties VirtualizingUniformCarouselStackLayout (Flick)
InkToolBarFlyoutItemT (winrt::implementation) RecyclingElementFactoryT (winrt::implementation) VirtualizingUniformStackLayout (MUXControlsTestApp::Samples)
InkToolBarHighlighterButton reference_tracker_custom_implements_t VirtualizingUniformStackLayoutSamplePage (MUXControlsTestApp::Samples)
InkToolBarIsStencilButtonCheckedChangedEventArgs reference_tracker_implements VirtualLayoutContextAdapter
InkToolBarIsStencilButtonCheckedChangedEventArgsT (winrt::implementation) reference_tracker_implements_t VisualPropertiesPage (MUXControlsTestApp)
InkToolBarMenuButton ReferenceTracker VisualStatesPage (MUXControlsTestApp)
InkToolBarMenuButtonAutomationPeer ReferenceTrackerContainerBase VisualStateUtil
InkToolBarMenuButtonAutomationPeerT (winrt::implementation) ReferenceTrackerStorageHelper
W
InkToolBarMenuButtonProperties RefreshableCollection-g (MUXControlsTestApp) WebView2
InkToolBarMenuButtonT (winrt::implementation) RefreshContainer WebView2_TryCompleteInitialization_RAII
InkToolbarPage (MUXControlsTestApp) RefreshContainerOnImagePage (MUXControlsTestApp) WebView2AutomationPeer
InkToolBarPenButton RefreshContainerPage (MUXControlsTestApp) WebView2AutomationPeerT (winrt::implementation)
InkToolBarPenButtonProperties RefreshContainerProperties WebView2BasicPage (MUXControlsTestApp)
InkToolBarPencilButton RefreshContainerT (winrt::implementation) WebView2Common (MUXControlsTestApp)
InkToolBarPenConfigurationControl RefreshContainerTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) WebView2CoreObjectsPage (MUXControlsTestApp)
InkToolBarPenConfigurationControlProperties RefreshInfoProviderImpl WebView2Page (MUXControlsTestApp)
InkToolBarPenConfigurationControlT (winrt::implementation) RefreshInfoProviderImpl (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests) WebView2Properties
InkToolBarProperties RefreshInfoProviderImplementation (RefreshVizualizer_TestUI) WebView2RenderingVerifier (WebView2Temporary)
InkToolBarStencilButton RefreshInfoProviderImplementation (MUXControlsTestApp) WebView2Tests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
InkToolBarStencilButtonProperties RefreshInteractionRatioChangedEventArgs WebView2Tests::WebView2TestSetupHelper (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests)
InkToolBarT (winrt::implementation) RefreshRequestedEventArgs WebView2WithCursor (MUXControlsTestApp)
InkToolBarToggleButton RefreshRequestedEventArgsT (winrt::implementation) WindowPage (MUXControlsTestApp)
InkToolBarToggleButtonT (winrt::implementation) RefreshStateChangedEventArgs WinRTCollection (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common)
InkToolBarToolButton RefreshVisualizer InspectingDataSourceTests::WinRTObservableVector (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
InkToolBarToolButtonAutomationPeer RefreshVisualizerPage (MUXControlsTestApp) InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
InkToolBarToolButtonAutomationPeerT (winrt::implementation) RefreshVisualizerProperties WorkInfo
InkToolBarToolButtonProperties RefreshVisualizerT (winrt::implementation) AcrylicBrushPage::WrapperEffectBrush (MUXControlsTestApp)
InkToolBarToolButtonT (winrt::implementation) RefreshVisualizerTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests)
X
InkToolBarTrace RegisterMetadata (Microsoft::UI::Xaml::Design) XamlAmbientLight
InspectingDataSource RegressionTestScenario (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests) XamlAmbientLightProperties
InspectingDataSourceTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) RegUtil XamlAmbientLightT (winrt::implementation)
InteractionTrackerAsyncOperation RepeatedScrollSnapPoint XamlCompBrush
InteractionTrackerOwner RepeatedZoomSnapPoint XamlControlsResources
InvertEffect (Microsoft::UI::Private::Composition::Effects) RepeaterAutomationPeer XamlControlsResourcesProperties
CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback (details) RepeaterAutomationPeerT (winrt::implementation) XamlControlsResourcesT (winrt::implementation)
IOpacityEffect (Microsoft::UI::Private::Composition::Effects) RepeaterFocusTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests) WebView2::XamlFocusChangeInfo
IPointDiffuseEffect (Microsoft::UI::Private::Composition::Effects) RepeaterItem (MUXControlsTestApp::Samples::Selection) XamlMember
IPointSpecularEffect (Microsoft::UI::Private::Composition::Effects) RepeaterItemAutomationPeer (MUXControlsTestApp::Samples::Selection) XamlMetadataProvider
IPosterizeEffect (Microsoft::UI::Private::Composition::Effects) RepeaterLayoutContext XamlRootChanged_revoker
IPremultiplyEffect (Microsoft::UI::Private::Composition::Effects) RepeaterTestHooks XamlType
IRefreshContainerPrivate (MU_PRIVATE_CONTROLS_NAMESPACE) RepeaterTests (Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests) XamlTypeBase
IRefreshInfoProvider (MU_PRIVATE_CONTROLS_NAMESPACE) RepeaterTests (Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests)
Y
IRefreshInfoProviderAdapter (MU_PRIVATE_CONTROLS_NAMESPACE) RepeaterTestUIPage (MUXControlsTestApp) Year (MUXControlsTestApp::Samples::Model)
IRefreshVisualizerPrivate (MU_PRIVATE_CONTROLS_NAMESPACE) ResetableCollection-g (MUXControlsTestApp::Utils)
Z
IRepeaterScrollingSurface (MU_PRIVATE_CONTROLS_NAMESPACE) RevealBackgroundBrush ZoomFactorChange
is_flags_enum RevealBackgroundBrushT (winrt::implementation) ZoomFactorChangeWithAdditionalVelocity
is_flags_enum< PointerOverStatus > RevealBackgroundItem (MUXControlsTestApp) ZoomSnapPoint
is_flags_enum< PointerPressedStatus > RevealBasicPage (MUXControlsTestApp) ZoomSnapPointBase
ISaturationEffect (Microsoft::UI::Private::Composition::Effects) RevealBorderBrush
A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Generated on Sun Dec 1 2024 20:52:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- _ -

  • _acrylicBrush : AcrylicBrushPage , AcrylicMarkupPage
  • _acrylicTestApi : AcrylicMarkupPage , AcrylicBrushPage
  • _actionButton : InfoBarPage
  • _animationSlowdownFactor : RadialItemCollectionTransitionProvider
  • _aqua : RatingControlPage
  • _areWebviewElementsCleanedUp : WebView2BasicPage , WebView2CoreObjectsPage
  • _asyncEventReportingLock : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • _averageMonthCount : ItemsViewIntegrationPage
  • _backgroundLight : RevealScenarioLights
  • _bitmapImage : Recipe
  • _borderLight : RevealScenarioLights
  • _borderWideLight : RevealScenarioLights
  • _bringIntoViewOptions : ItemsViewIntegrationPage
  • _c
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, ProgressRingDeterminate::AnimatedVisual
  • _cancelScrolling : AnnotatedScrollBarSummaryPage
  • _canExecute : MyCommand
  • _checkBrushResult : RevealColorPage
  • _cleanupVerified : LightConfigurationTests
  • _clickCount : DropDownButtonPage , SplitButtonPage
  • _closedExceptionCount : WebView2CoreObjectsPage
  • _colEntities : ItemsViewSummaryPage , FlatItemsControlPage , ListViewBasePage , ItemsViewInteractiveTestsPage
  • _colFavoritePhotos : SelectorBarSamplePage
  • _collapsedElements : ObjectModelTestPage
  • _colorBrush_AlmostGoldenrod_FFE4950C : BrightnessSun::BrightnessSun_AnimatedVisual
  • _colorBrush_AlmostTeal_FF007A87 : LottieLogo::LottieLogo_AnimatedVisual
  • _colorBrush_White : LottieLogo::LottieLogo_AnimatedVisual
  • _colPhotos : ItemsViewIntegrationPage
  • _colRemotePhotos : SelectorBarSamplePage
  • _colSharedPhotos : SelectorBarSamplePage
  • _colSmallEntities : ItemsViewSummaryPage
  • _colSmallImages : ItemsViewSummaryPage
  • _colSmallItemContainers : ItemsViewSummaryPage
  • _colSmallUniformEntities : ItemsViewSummaryPage
  • _colStrings : ObjectModelTestPage
  • _commandExecuteCount : SplitButtonPage
  • _compositionPropertyLogger : RevealStatesPage
  • _configurationChanged : ViewportTests::TestScrollingSurface
  • _containerShape_00 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_01 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_05 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_07 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_08 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_09 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_10 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_12 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_14 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_15 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_16 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_17 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_18 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_19 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_20 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_21 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_22 : LottieLogo::LottieLogo_AnimatedVisual
  • _controlCornerRadius : CornerRadiusPage
  • _coreProcessFailedCount : WebView2CoreObjectsPage
  • _coreWebView2InitializedCount : WebView2CoreObjectsPage
  • _cornerRadiusFour : LinedFlowLayoutDemo
  • _counter : DisposableUserControl
  • _cubicBezierEasingFunction_0 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_1 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_2 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_3 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_4 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_5 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_6 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_7 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_8 : LottieLogo::LottieLogo_AnimatedVisual
  • _currentAPIVersion : PlatformConfiguration
  • _currentItemIndexChangedToken : ItemsViewSummaryPage
  • _customUserDataFolder : WebView2BasicPage
  • _cvs : GroupedItemsControlPage , GroupedListViewBasePage , ListViewAnchoringPage
  • _data : ReadOnlyNotifyPropertyChangedCollection-g< T > , PhasingTests::ElementPhasingManager , DelegatingItemsSource , CircleLayoutSamplePage , PersonDataSource , FlatSample , TreeViewSample
  • _dataSource : AnimationsDemoPage , CollectionChangeDemo
  • _defaultBrushColors : CalendarViewPage
  • _description : Recipe
  • _detailLabelContent : AnnotatedScrollBarSummaryPage
  • _disableClickToExpand : TreeViewPage
  • _dt : RatingControlPage , SwipeControlPage
  • _dynamicItemsView : ItemsViewSummaryPage
  • _ellipse_0_0 : LottieLogo::LottieLogo_AnimatedVisual
  • _ellipse_0_1 : LottieLogo::LottieLogo_AnimatedVisual
  • _ellipse_4p7 : LottieLogo::LottieLogo_AnimatedVisual
  • _ensureCoreWebView2CompletionCount : WebView2CoreObjectsPage
  • _entityTemplates : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • _errors : SimpleVerify
  • _expandCollapsePattern : DropDownButton , Expander
  • _factory : BreadcrumbBarItem , ColorSpectrum , ColorPickerSlider , DropDownButton , Expander
  • _flatData : ItemsViewWithDataPage
  • _flowLayout : ItemsViewSummaryPage , RepeaterTestUIPage
  • _flyout : DropDownButtonPage
  • _flyoutClosedCount : SplitButtonPage , DropDownButtonPage
  • _flyoutOpenedCount : DropDownButtonPage , SplitButtonPage
  • _fullLogs : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • _fullWindowMediaRoot : LightConfigurationTests
  • _getSizeCallsCount : MockItemsSource
  • _grayBrush : LinedFlowLayoutDemo
  • _gridLayout : RepeaterTestUIPage
  • _groupedData : GroupedSample
  • _groupedItemsControlViewModel : GroupedItemsControlPage
  • _groupedListViewBaseViewModel : GroupedListViewBasePage , ListViewAnchoringPage
  • _groups : AnimationsDemoPage
  • _groupTemplate : AnimationsDemoPage::AnimationElementFactory , RecipeElementFactory
  • _headerTemplates : GroupedItemsControlPage
  • _helpers : WebView2BasicPage , WebView2CoreObjectsPage
  • _holdThenStepEasingFunction : BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • _hoverSpotlight : RevealStatesPage
  • _iconSource : TabViewPage
  • _id : Recipe , Person
  • _imageUri : Recipe
  • _index : InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
  • _inkPresenter : InkToolbarPage
  • _inner
: CustomItemsSource
, CollectionChangeDemo::MyDataSource
, ScrollPresenterBringIntoViewPage::SampleDataSource
, ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • _innerRepeaters : AnimationsDemoPage::AnimationElementFactory
  • _intProperty : CustomSelectionModel
  • _invokeCount : ButtonInteractionPage
  • _invokePattern : BreadcrumbBarItem
  • _isApplicationLanguageOverrideSet : WebView2BasicPage
  • _isHorizontallyScrollable : ViewportTests::TestScrollingSurface
  • _isInConstantVelocityPan : ScrollPresenterMousePanningPage
  • _isInMousePan : ScrollPresenterMousePanningPage
  • _isInnerLayoutGrid : AnimationsDemoPage::AnimationElementFactory
  • _isMiddleButtonPressed : ScrollPresenterMousePanningPage
  • _isRedirected : WebView2BasicPage
  • _isUserInitiated : WebView2BasicPage
  • _isVerticallyScrollable : ViewportTests::TestScrollingSurface
  • _itemInvokedEventsFired : NavigationViewPage
  • _items : InspectingDataSourceTests::WinRTObservableVector
  • _itemSpacing : ActivityFeedLayout
  • _itemsStackPanelTemplate : ListViewAnchoringPage
  • _itemsView : ItemsViewSummaryPage
  • _itemsViewPointerWheelChangedEventHandler : ItemsViewSummaryPage
  • _itemTemplate : RecipeElementFactory
  • _itemTemplates : FlatItemsControlPage , GroupedItemsControlPage
  • _iteration_TintTransitionDuration : AcrylicBrushPage
  • _KeyFromIndexFunc : AnimationsDemoPage::AnimationElementFactory
  • _knownPropertyValueDict : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • _lastId : CircleLayoutSamplePage
  • _lastRequestedDetailLabelOffset : AnnotatedScrollBarSummaryPage
  • _lastScrollOffset : AnnotatedScrollBarSummaryPage
  • _layout : LinedFlowLayoutDemo , GroupedSample
  • _layoutRects : ActivityFeedLayoutState
  • _lightValidationTimer : LightConfigurationTests
  • _linedFlowLayout : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • _linedFlowLayoutItemCollectionTransitionProvider : ItemsViewInteractiveTestsPage
  • _listViewBase : GroupedListViewBasePage , ListViewBasePage
  • _listViewIem1 : CoreWindowEventsPage
  • _loadedCount : WebView2CoreObjectsPage
  • _lorem : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , AnimationsDemoPage , PinterestLayoutSamplePage , VirtualizingStackLayoutSamplePage , ItemsViewWithDataPage
  • _lstAsyncEventMessage : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • _lstEntities : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • _lstLargeEntities : ItemsViewInteractiveTestsPage
  • _lstLinedFlowLayoutLockedItemIndexes : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • _lstQueuedOperations : ListViewBasePage , ItemsViewSummaryPage
  • _luminosityBlendResults : AcrylicRenderingPage
  • _mediaFullScreened : LightConfigurationTests
  • _minItemSize : ActivityFeedLayout
  • _modernPanelTemplate : FlatItemsControlPage , ListViewBasePage
  • _monthPhotoCounts : ItemsViewIntegrationPage
  • _months : ItemsViewIntegrationPage
  • _mpe : LightConfigurationTests
  • _navigationCompletedCount : WebView2CoreObjectsPage
  • _navigationStartingCount : WebView2CoreObjectsPage
  • _newTabNumber : TabViewPage , TabViewSizingPage , TabViewTabClosingBehaviorPage
  • _next : Data
  • _nextData : SelectionModelTests
  • _normalStateCheckNumber : RevealStatesPage
  • _numbers : NonVirtualStackLayoutSamplePage
  • _numLabels : AnnotatedScrollBarSummaryPage
  • _numPhases : PhasingTests::CustomElementFactory , PhasingTests::ElementPhasingManager
  • _offsetBetweenLabels : AnnotatedScrollBarSummaryPage
  • _offsetVector2Animation_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_05 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _oldFocusedElement : ItemsViewInteractiveTestsPage
  • _oneLevelNestedData : ItemsViewWithDataPage
  • _originalHeight : WebView2BasicPage
  • _originalWidth : WebView2BasicPage
  • _otherSelectorBarItem : SelectorBarSummaryPage
  • _outerItemsControl : NestedItemsControlsPage
  • _outerListView : NestedListViewsPage
  • _overlayCornerRadius : CornerRadiusPage
  • _owner : TreeViewItemAutomationPeer , SelectionContainerAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer
  • _pageInfo : RecipeElementFactory , ItemsViewWithDataPage
  • _pageOperationCount : ListViewAnchoringPage
  • _pageOperations : ListViewAnchoringPage
  • _pageOperationTimer : ListViewAnchoringPage
  • _pages : NavigationViewPageDataContext
  • _parentPage : MyCommand
  • _path : BrightnessSun::BrightnessSun_AnimatedVisual
  • _path_0 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_1 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_2 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_3 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_4 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_5 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_6 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_7 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_8 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_00 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_01 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_05 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_07 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_08 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_09 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_10 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_12 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_14 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_15 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_16 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_17 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_18 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_19 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_20 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_21 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_22 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_23 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_24 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_25 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_26 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_27 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_28 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_29 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_30 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_31 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_32 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_33 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_34 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_35 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_36 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_37 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_38 : LottieLogo::LottieLogo_AnimatedVisual
  • _personTemplate : PersonElementFactory
  • _photoTemplates : ItemsViewIntegrationPage
  • _placementFlyout : SplitButtonPage
  • _pollInterval : LightConfigurationTests
  • _pollMaxRetries : LightConfigurationTests
  • _pollRetry : LightConfigurationTests
  • _populateAnnotatedScrollBar : ItemsViewIntegrationPage
  • _populateAnnotatedScrollBarPending : ItemsViewIntegrationPage
  • _populateHeaderPending : ItemsViewIntegrationPage
  • _popupRoot : LightConfigurationTests
  • _preConstantVelocityPanPosition : ScrollPresenterMousePanningPage
  • _preMousePanHorizontalOffset : ScrollPresenterMousePanningPage
  • _preMousePanPosition : ScrollPresenterMousePanningPage
  • _preMousePanVerticalOffset : ScrollPresenterMousePanningPage
  • _pressSpotlight : RevealStatesPage
  • _primaryWindowCondition : TabViewTests
  • _propertyNameBlockList : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • _propertyNamePostfixBlockList : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • _queuedOperationsTimer : ListViewBasePage , ItemsViewSummaryPage
  • _radiusVector2Animation : LottieLogo::LottieLogo_AnimatedVisual
  • _random : RadialGradientBrushPage
  • _realizedElementIndices : RecyclingElementFactoryDerived
  • _realizedElements : RecyclingElementFactoryDerived
  • _recipeTemplate : AnimationsDemoPage::AnimationElementFactory
  • _recordedArgs : InspectingDataSourceTests::CollectionChangeRecorder
  • _recordedGetAtCalls : MockItemsSource
  • _recordedGetElementCalls : MockElementFactory
  • _recordedKeyFromIndexCalls : MockItemsSource
  • _recordedRecycleElementCalls : MockElementFactory
  • _rectangle1 : AcrylicBrushTests
  • _recyclePool : AnimationsDemoPage::AnimationElementFactory , PhasingTests::CustomElementFactory
  • _redBrush : ItemsViewSummaryPage , ItemsViewIntegrationPage
  • _requestedDetailLabelPhotoInYearIndex : ItemsViewIntegrationPage
  • _requestedDetailLabelYearIndex : ItemsViewIntegrationPage
  • _resourceButtonRevealBackgroundBrush : RevealFallbackPage
  • _resourceButtonRevealBackgroundPointerOver : RevealFallbackPage
  • _resourceButtonRevealBackgroundPressed : RevealFallbackPage
  • _resourceButtonRevealBorderBrush : RevealFallbackPage
  • _resourceButtonRevealBorderBrushPointerOver : RevealFallbackPage
  • _resourceButtonRevealBorderBrushPressed : RevealFallbackPage
  • _reusableExpressionAnimation() : AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • _revealAddedCount : CoreWindowEventsPage
  • _revealBrushTestApi : RevealStatesPage , RevealFallbackPage
  • _revealState : RevealColorPage
  • _revealTest : RevealScenarioLights
  • _revealTestApi : RevealStatesPage , RevealFallbackPage
  • _reverse_order_items : NavigationViewMenuItemsSourcePage
  • _rnd : AnimationsDemoPage , CircleLayoutSamplePage , GroupedSample , ResetableCollection-g< T >
  • _root
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, ProgressRingDeterminate::AnimatedVisual
  • _rootProgress : LottieLogo::LottieLogo_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • _rootSP : AcrylicBrushTests
  • _rowSpacing : ActivityFeedLayout
  • _scrollController : IScrollControllerAdapter
  • _scrollController_AddScrollVelocityRequested() : IScrollControllerAdapter
  • _scrollController_ScrollByRequested() : IScrollControllerAdapter
  • _scrollController_ScrollToRequested() : IScrollControllerAdapter
  • _scrollView : ItemsViewIntegrationPage
  • _scrollViewer : GroupedListViewBasePage , ListViewBasePage , IScrollControllerAdapter
  • _scrollViewOffsetChangeCorrelationId : ItemsViewInteractiveTestsPage
  • _scrollViewPointerWheelChangedEventHandler : ItemsViewSummaryPage
  • _scrollViewResetCorrelationId : ItemsViewInteractiveTestsPage
  • _scrollViewZoomFactorChangeCorrelationId : ItemsViewInteractiveTestsPage
  • _secondaryWindowCondition : TabViewTests
  • _secondTextBlockUI : RatingControlPage
  • _selectionChangedEventsFired : NavigationViewPage
  • _shapeVisibilityAnimation_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _sharedRecyclePool : RecipeElementFactory
  • _solidColorBrushGreen : NonVirtualStackLayoutSamplePage
  • _solidColorBrushRed : NonVirtualStackLayoutSamplePage
  • _spriteShape_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_12 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_14 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_15 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_19 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_22 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_23 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_36 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_37 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_38 : LottieLogo::LottieLogo_AnimatedVisual
  • _stackLayout : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , RepeaterTestUIPage
  • _stepThenHoldEasingFunction : LottieLogo::LottieLogo_AnimatedVisual
  • _tabCondition : TabViewTests , TabViewTearOutTests
  • _tabViewCondition : TabViewTests , TabViewTearOutTests
  • _tabViewTearOutApp : TabViewTearOutTests
  • _tEndScalarAnimation_1_to_0 : BrightnessSun::BrightnessSun_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _test1_RevealButton : RevealRegressionTestsPage
  • _test1_RevealButton_Click() : RevealRegressionTestsPage
  • _testPage : WebView2Common
  • _thicknessFour : LinedFlowLayoutDemo
  • _timer : InfoBarPage
  • _timerAction : InfoBarPage
  • _tomato : RatingControlPage
  • _transitionProvider : AnimationsDemoPage::AnimationElementFactory
  • _tStartScalarAnimation_0_to_0p249 : LottieLogo::LottieLogo_AnimatedVisual
  • _tStartScalarAnimation_0p87_to_0_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _tStartScalarAnimation_1_to_0 : BrightnessSun::BrightnessSun_AnimatedVisual
  • _twoLevelNestedData : ItemsViewWithDataPage
  • _uiElements : NonVirtualStackLayoutSamplePage
  • _uniformGridLayout : ItemsViewSummaryPage , ItemsViewInteractiveTestsPage
  • _unloadedCount : WebView2CoreObjectsPage
  • _useLongLabels : AnnotatedScrollBarSummaryPage
  • _validationCompleted : LightConfigurationTests
  • _value : DataModelWithINPC
  • _valuePattern : ColorPickerSlider , ColorSpectrum
  • _virtualizedNode : TreeViewPage
  • _visualRoot : LightConfigurationTests , TreeViewPage
  • _whiteBrush : LinedFlowLayoutDemo , ItemsViewSummaryPage , ItemsViewIntegrationPage
  • _windowCondition : TabViewTearOutTests
  • _wv2_ConcurrentCreation : WebView2CoreObjectsPage
  • _wv2_CoreProcessFailed : WebView2CoreObjectsPage
  • _wv2_Markup : WebView2CoreObjectsPage
  • _wv2_Programmatic_Live : WebView2CoreObjectsPage
  • _wv2_Programmatic_Offline : WebView2CoreObjectsPage
  • _yearCount : ItemsViewIntegrationPage
  • _yearPhotoCounts : ItemsViewIntegrationPage
  • _yearTemplate : RecipeElementFactory
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- j -

  • JustifyContent : Flex
  • JustifyContentProperty : Flex
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- k -

  • k_DegreesPerRadian : EffectBase
  • k_PI : EffectBase
  • KeepAlive() : VirtualizationInfo
  • KeepAtLeastOneItemInPrimaryList() : NavigationView
  • KeepInteriorCornersSquareProperty() : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • key : PhasingTests::CustomElementFactory
  • Key() : HashMap< K, V >::Iterator::KeyValuePair
  • KeyboardAcceleratorsTest() : MenuBarTests
  • KeyboardAcceleratorTest() : WebView2Tests
  • KeyboardFocusFirstItemFromItem() : NavigationView
  • KeyboardFocusLastItemFromItem() : NavigationView
  • KeyboardFocusToolTipTest() : CommonTests
  • KeyboardNavigationDropDownItemInvokationTest() : BreadcrumbTests
  • KeyboardNavigationFlyoutItemsTest() : BreadcrumbTests
  • KeyboardNavigationForCrumbledLeftToRightTest() : BreadcrumbTests
  • KeyboardNavigationForCrumbledRightToLeftTest() : BreadcrumbTests
  • KeyboardNavigationInItemsViewWithLinedFlowLayout() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationInItemsViewWithLinedFlowLayoutAndInnerFocusableControl() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationInItemsViewWithStackLayout() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationInItemsViewWithUniformGridLayout() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationItemInvokationTest() : BreadcrumbTests
  • KeyboardNavigationLeftToRightTest() : BreadcrumbTests
  • KeyboardNavigationReferenceOffsetChanged() : ItemsViewTestHooks
  • KeyboardNavigationRightToLeftTest() : BreadcrumbTests
  • KeyboardNavigationSample() : KeyboardNavigationSample
  • KeyboardNavigationSample_GotFocus() : KeyboardNavigationSample
  • KeyboardNavigationWithAccessKeysTest() : MenuBarTests
  • KeyboardNavigationWithArrowKeysTest() : MenuBarTests
  • KeyboardNavigationWithArrowKeysWithDisabledItemTest() : MenuBarTests
  • KeyboardNavigationWithArrowKeysWithOnlyOneItemWorks() : MenuBarTests
  • KeyboardNavigationWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationWithLayout() : ItemsViewTestsWithInputHelper
  • KeyboardPageSelectTest() : PipsPagerTests
  • KeyboardTest() : SplitButtonTests , TabViewTests
  • KeyDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyDownInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyFromIndex() : MockItemsSourceWithUniqueIdMapping , CustomItemsSourceWithUniqueId , CustomItemsSourceViewWithUniqueIdMapping , ReadOnlyNotifyPropertyChangedCollection-g< T > , InspectingDataSourceTests::ObservableVectorWithUniqueIds , IKeyIndexMapping , ItemsSourceView , MyCollection
  • KeyFromIndexCallInfo() : MockItemsSource::KeyFromIndexCallInfo
  • KeyFromIndexCore() : ScrollPresenterBringIntoViewPage::SampleDataSource , DelegatingItemsSource , ItemsSourceView , PersonDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , CustomItemsSourceViewWithUniqueIdMapping , CollectionChangeDemo::MyDataSource , InspectingDataSource , ScrollPresenterTests::TestDataSource
  • KeyFromIndexFunc : DelegatingItemsSource
  • KeyPageDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyPageDownInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyPageUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyPageUpInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyType() : XamlTypeBase
  • KeyUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyUpInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyValuePair() : HashMap< K, V >::Iterator::KeyValuePair
  • Kind() : InkToolBarFlyoutItem , MicaBackdropProperties , InkToolBarFlyoutItemProperties , MicaBackdropProperties , InkToolBarFlyoutItemProperties
  • KindProperty() : InkToolBarFlyoutItemProperties , MicaBackdropProperties
  • KVP : HashMap< K, V >
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- l -

  • Label : MyItem
  • LabelCollection : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarSummaryPage , AnnotatedScrollBarRangeBasePage
  • LabelFirstItem() : TreeViewTests
  • LabelItems_Click() : TreeViewPage
  • Labels() : AnnotatedScrollBarProperties
  • LabelsGrowToAccomodateLongText() : AnnotatedScrollBarInteractionTests
  • LabelsProperty() : AnnotatedScrollBarProperties
  • LabelTemplate() : AnnotatedScrollBarProperties
  • LabelTemplateProperty() : AnnotatedScrollBarProperties
  • Language_SelectionChanged() : CalendarViewPage
  • LargeButton_Click() : RevealStatesPage
  • LargeChange() : NumberBoxProperties , SliderInteraction , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer
  • LargeChangeProperty() : NumberBoxProperties
  • largeImg : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • LastAnimationSegmentChanged() : AnimatedIconTestHooks
  • LastButtonClicked() : PagerControl
  • LastButtonCommand() : PagerControlProperties
  • LastButtonCommandProperty() : PagerControlProperties
  • LastButtonStyle() : PagerControlProperties
  • LastButtonStyleProperty() : PagerControlProperties
  • LastButtonVisibility() : PagerControlProperties
  • LastButtonVisibilityProperty() : PagerControlProperties
  • LastExtent : Flex::FlexState , FlowLayoutAlgorithm
  • LastFrozenItemIndexDbg() : LinedFlowLayout
  • LastInteractedWithSwipeControlChanged() : SwipeTestHooks
  • lastInteractedWithSwipeControlContentContainer : SwipeControlPage
  • lastInteractedWithSwipeControlContentRoot : SwipeControlPage
  • LastInteractedWithSwipeControlSwipeContentElement_SizeChanged() : SwipeControlPage
  • LastName : Customer
  • lastOffsetsChangeCorrelationId : ScrollPresenterDynamicPage
  • lastOffsetsChangeWithAdditionalVelocityCorrelationId : ScrollPresenterDynamicPage
  • LastPageButton : PagerControlTestPageElements
  • lastPageButton : PagerControlPage
  • LastPageButtonChangingPageTest() : PagerControlTests
  • LastPageButtonIsEnabledCheckBox : PagerControlTestPageElements
  • LastPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • LastPageButtonVisibilityComboBox : PagerControlTestPageElements
  • LastPageButtonVisibilityOptionsTest() : PagerControlTests
  • LastRealizedColumnIndexInRect() : UniformGrid2DLayout
  • LastRealizedElementIndexDefault : final
  • LastRealizedIndexInRect() : VirtualizingUniformCarouselStackLayout , VirtualizingUniformStackLayout
  • LastRealizedItemIndexDbg() : LinedFlowLayout
  • LastRealizedRowIndexInRect() : UniformGrid2DLayout
  • lastScrollPresenterOffset : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • lastZoomFactorChangeCorrelationId : ScrollPresenterDynamicPage
  • lastZoomFactorChangeWithAdditionalVelocityCorrelationId : ScrollPresenterDynamicPage
  • Latest : FallbackGrid
  • Layer_MapElementClick() : MapControlPage
  • LayerElementsChanged() : MapControl
  • Layers() : MapControlProperties
  • LayersProperty() : MapControlProperties
  • Layout() : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • LayoutChanged() : ColumnMajorUniformToLargestGridLayout , RadioButtonsTestHooks
  • LayoutChoice : FlowLayoutTests
  • layoutCompletedCount : ScrollPresenterExpressionAnimationSourcesPage
  • LayoutContextAdapter() : LayoutContextAdapter
  • LayoutId() : Layout
  • LayoutInvalidateMeasure() : LayoutsTestHooks
  • LayoutLabels() : AnnotatedScrollBar
  • LayoutNumberOfColumnsTextBlock : RadioButtonsTestPageElements
  • LayoutNumberOfLargerColumnsTextBlock : RadioButtonsTestPageElements
  • LayoutNumberOfRowsTextBlock : RadioButtonsTestPageElements
  • LayoutOrigin() : ItemsRepeater , VirtualizingLayoutContext
  • LayoutOriginCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • LayoutPanelLayoutContext() : LayoutPanelLayoutContext
  • LayoutPanelProperties() : LayoutPanelProperties
  • LayoutProperties() : LayoutProperties
  • LayoutProperty() : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • LayoutRects : ActivityFeedLayoutState
  • LayoutState() : LayoutPanel , ItemsRepeater , LayoutContext
  • LayoutStateCore() : LayoutPanelLayoutContext , LayoutContext , LayoutContextAdapter , RepeaterLayoutContext , VirtualLayoutContextAdapter
  • LayoutsTestHooks_LinedFlowLayoutInvalidated() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • LayoutsTestHooks_LinedFlowLayoutItemLocked() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LayoutsTestHooks_LinedFlowLayoutItemLocked2() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs() : LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
  • LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs() : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • LayoutTest() : InfoBarTests
  • Left : WebView2RenderingVerifier::NativeMethods::RECT
  • LeftEdgePlacementTopLeftHighlightMargin() : TeachingTip
  • LeftItems() : SwipeControlProperties
  • LeftItemsProperty() : SwipeControlProperties
  • LeftNavigationFocusKindRevealTest() : CommonTests
  • LeftNavigationWithAccessKeysTest() : CommonTests
  • LeftNavRepeater() : NavigationView
  • LeftPaneVisibility() : NavigationViewTemplateSettingsProperties
  • LeftPaneVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • Level0Layout : PageInfo
  • Level1Layout : PageInfo
  • Level2Layout : PageInfo
  • LifetimeHandler() : LifetimeHandler
  • LifetimeTabTest() : WebView2Tests
  • lightBorderColor : RevealScenarioColors
  • LightBorderColor : RevealScenarioColors
  • LightColor() : IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • LightDismissTest() : PaneBehaviorTests
  • LightEvents : RevealHoverLight
  • lightHoverPlateColor : RevealScenarioColors
  • LightHoverPlateColor : RevealScenarioColors
  • LightPolicyChangedHelper() : MaterialHelperBase
  • LightPosition() : IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • LightStates : RevealHoverLight
  • LightTarget() : ISpotDiffuseEffect , ISpotSpecularEffect
  • LimitingConeAngle() : ISpotDiffuseEffect , ISpotSpecularEffect
  • LineAlignment : FlowLayoutAlgorithm , FlowLayoutProperties
  • LineAlignmentComboBox_SelectionChanged() : ItemsViewWithDataPage
  • LineAlignmentProperty() : FlowLayoutProperties
  • LinearAttenuation : RevealBorderSpotlightStateDesc
  • LinedFlowLayout() : LinedFlowLayout
  • LinedFlowLayout_ArrangeInvalidatedLog() : ItemsViewIntegrationPage
  • LinedFlowLayout_ItemsInfoRequested() : ItemsViewTests , ItemsViewSummaryPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , LinedFlowLayoutDemo
  • LinedFlowLayout_ItemsUnlocked() : LinedFlowLayoutDemo , ItemsViewIntegrationPage , ItemsViewSummaryPage
  • LinedFlowLayout_ItemsUnlockedLog() : ItemsViewIntegrationPage
  • LinedFlowLayout_MeasureInvalidatedLog() : ItemsViewIntegrationPage
  • LinedFlowLayoutDemo() : LinedFlowLayoutDemo
  • LinedFlowLayoutDemo_Loaded() : LinedFlowLayoutDemo
  • LinedFlowLayoutInvalidated() : LayoutsTestHooks
  • LinedFlowLayoutItemAspectRatios() : LinedFlowLayoutItemAspectRatios
  • LinedFlowLayoutItemLocked() : LayoutsTestHooks
  • LinedFlowLayoutItemsInfoRequestedEventArgs() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger : ItemsViewTests
  • LinedFlowLayoutProperties() : LinedFlowLayoutProperties
  • LinedFlowLayoutSnappedAverageItemsPerLineChanged() : LayoutsTestHooks
  • LineDown() : ScrollPresenter
  • LineHasInternalLockedItem() : LinedFlowLayout
  • LineHasLockedItem() : LinedFlowLayout
  • LineHeight() : LinedFlowLayoutProperties
  • LineHeightProperty() : LinedFlowLayoutProperties
  • LineIndex() : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • LineItemsCountTotal() : LinedFlowLayout
  • LineLeft() : ScrollPresenter
  • LineRight() : ScrollPresenter
  • Lines : Flex::FlexState
  • LineSpacing() : FlowLayout , LinedFlowLayoutProperties , UniformGridLayout
  • LineSpacingProperty() : LinedFlowLayoutProperties
  • LineUp() : ScrollPresenter
  • ListControl() : TreeView , ViewModel
  • ListenToCollectionChanges() : InspectingDataSource
  • ListenToContentEffectiveViewportChanged() : ScrollPresenterTests
  • listSource : RevealScenarioList , RevealScenarios
  • ListView_ItemClick() : ListViewElementNameBindingPage
  • ListViewAnchoringPage() : ListViewAnchoringPage
  • ListViewAnchoringPage_Loaded() : ListViewAnchoringPage
  • ListViewBackgroundPage() : ListViewBackgroundPage
  • ListViewBase_ItemClick() : GroupedListViewBasePage , ListViewBasePage
  • ListViewBaseItemPageNavigationTest() : CommonStylesTests
  • ListViewBasePage() : ListViewBasePage
  • ListViewBasePage_Loaded() : ListViewBasePage
  • ListViewElementNameBindingPage() : ListViewElementNameBindingPage
  • ListViewHeaderPage() : ListViewHeaderPage
  • ListViewItemDensityTest() : CommonStylesTests
  • ListViewItemDensityTest_Click() : CommonStylesPage
  • ListViewItemPage() : ListViewItemPage
  • ListViewModel() : TreeViewList
  • ListViewPage() : ListViewPage
  • LoadBackButton() : TitleBar
  • LoadChevron() : NavigationViewItemPresenter
  • LoadElementsForDisplayingChildren() : NavigationViewItem
  • LoadFallbackContent() : AnimatedVisualPlayer
  • LoadImageAsync() : PersonPicture
  • LoadMenuItemsHost() : NavigationViewItem
  • LoadPaneToggleButton() : TitleBar
  • LoadPerfTreeView_Click() : TreeViewPage
  • LoadSelectionCheckbox() : ItemContainer
  • LoadWebPage() : WebView2Common
  • Location : Picture , MapIconProperties , MapElementClickEventArgs , MapIconProperties
  • LocationProperty() : MapIconProperties
  • LockItemToLine() : LinedFlowLayout
  • LockItemToLineInternal() : LinedFlowLayout
  • lockObject : ColorPickerTests::ColorPickerTestSetupHelper
  • LogAcrylicRecipeVersion() : AcrylicRenderingPage
  • LogAndClearTraces() : ScrollPresenterTestsBase , ScrollViewTestsWithInputHelper , ScrollPresenterTestsBase , SwipeControlTests , ItemsViewTestsWithInputHelper
  • LogAnnotatedScrollBarProperties() : AnnotatedScrollBarTests
  • LogBrushSate() : AcrylicBrushTests
  • LogEditValue() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper , ItemsViewTestsWithInputHelper
  • LogEvent() : ScrollPresenterMousePanningPage
  • LogExpressionAnimationStatusChanges() : ScrollPresenterTestHooksHelper
  • LogFailure() : WebView2BasicPage
  • LogFailure_Exception() : WebView2BasicPage
  • LoggingHelper()
: ScrollViewTestsWithInputHelper::LoggingHelper
, ItemsViewTestsWithInputHelper::LoggingHelper
  • LoggingMessage() : MUXControlsTestHooks
  • LoggingMessageImpl() : MUXControlsTestHooks
  • LogHeader() : WebView2BasicPage
  • LogInteractionRatios() : RefreshContainerTests
  • LogInteractionSources() : ScrollPresenterTestHooksHelper
  • LogItemIndexDbg() : LinedFlowLayout
  • LogItemsRepeaterInfo() : ItemsViewBlankPage , SelectorBarSummaryPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage
  • LogItemsViewInfo() : ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewBlankPage , ItemsViewSummaryPage
  • LogItemsViewProperties() : SelectorBarTests , ItemsViewTests
  • LogMessage() : CanvasScrollControllerConsumer , CompositionScrollControllerPanningInfo , MUXControlsTestHooks , ScrollPresenterWithCompositionScrollControllersPage , BiDirectionalScrollController , ScrollBarController , ScrollPresenterWithSimpleScrollControllersPage , CompositionScrollController , ScrollPresenterWithBiDirectionalScrollControllerPage
  • LogRealizedIndices() : ViewManagerTests
  • LogRefreshVisualizerStates() : RefreshContainerTests
  • LogResult() : RevealBrushTests , AcrylicBrushTests
  • LogScrollPresenterInfo() : ScrollViewBringIntoViewPage , ScrollViewBlankPage
  • LogScrollViewInfo() : ItemsViewPictureLibraryPage , ScrollViewBlankPage , ItemsViewIntegrationPage , ObjectModelTestPage , ScrollViewBringIntoViewPage , ItemsViewBlankPage , ItemsViewSummaryPage , ItemsViewTestsWithInputHelper
  • LogSelectorBarProperties() : SelectorBarTests
  • LogSuccess() : WebView2BasicPage
  • LogTraces() : SwipeControlTests , ScrollPresenterTestsBase , ScrollViewTestsWithInputHelper , ScrollPresenterTestsBase , ItemsViewTestsWithInputHelper , SwipeControlTests
  • Lookup() : HashMap< K, V >
  • LookupXamlType() : XamlMetadataProvider
  • LosingFocus() : PipsPager
  • LottieCustomSourceTest() : ProgressRingTests
  • LottieLogo_AnimatedVisual() : LottieLogo::LottieLogo_AnimatedVisual
  • lstAddScrollVelocityCorrelationIds : CompositionScrollController , ScrollBarController , BiDirectionalScrollController
  • lstAsyncEventMessage : ScrollViewBringIntoViewPage , CompositionScrollController , ScrollViewDynamicPage , BiDirectionalScrollController , ScrollViewWithScrollControllersPage , ScrollPresenterBringIntoViewPage , ScrollViewBlankPage , SwipeControlPage , ImagePage , ScrollBarController , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ItemsViewBlankPage
  • lstEventMessage : ItemsViewPictureLibraryPage
  • lstLog : CanvasScrollControllerConsumer , ScrollBarController
  • lstOffsetChangeCorrelationIds : CompositionScrollController
  • lstQueuedOperations : ScrollPresenterStackPanelAnchoringPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage
  • lstScrollByCorrelationIds : BiDirectionalScrollController , ScrollBarController
  • lstScrollToCorrelationIds : ScrollBarController , BiDirectionalScrollController
  • lstTeachingTipEvents : TeachingTipTestPageElements
  • lstTriggeredOperations : ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage
  • lstViewChangeCorrelationIds : BiDirectionalScrollController
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- m -

  • M11 : Matrix5x4
  • M12 : Matrix5x4
  • M13 : Matrix5x4
  • M14 : Matrix5x4
  • M21 : Matrix5x4
  • M22 : Matrix5x4
  • M23 : Matrix5x4
  • M24 : Matrix5x4
  • M31 : Matrix5x4
  • M32 : Matrix5x4
  • M33 : Matrix5x4
  • M34 : Matrix5x4
  • M41 : Matrix5x4
  • M42 : Matrix5x4
  • M43 : Matrix5x4
  • M44 : Matrix5x4
  • M51 : Matrix5x4
  • M52 : Matrix5x4
  • M53 : Matrix5x4
  • M54 : Matrix5x4
  • m_acceleratorKeyActivatedRevoker : SwipeControl , WebView2
  • m_accessibilitySettings : WebView2
  • m_acrylicBrushCompositionEffectFactoryCache : MaterialHelperBase
  • m_action : VectorChangedEventArgs
  • m_actionButtonClickEventSource : TeachingTipProperties
  • m_activator : XamlTypeBase
  • m_activeToolChangedEventSource : InkToolBarProperties
  • m_addedSelectedItems : ViewModel
  • m_addTabButtonClickEventSource : TabViewProperties
  • m_addToMap : XamlTypeBase
  • m_anchorCandidates : ScrollPresenter
  • m_anchorElement : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • m_anchorEvaluatedEventSource : ScrollPresenterTestHooks
  • m_anchorRequestedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_arrangeBounds : VirtualizationInfo
  • m_arrangeInvalidatedEventSource : LayoutProperties
  • m_aspectRatios : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • m_autoHideScrollBarsState : ScrollView
  • m_autoHideScrollControllersMap : ScrollViewTestHooks
  • m_autoSuggestBoxLoadedRevoker : AutoSuggestEventRevokers
  • m_averageItemsPerLine : LinedFlowLayout
  • m_backRequestedEventSource : NavigationViewProperties , TitleBarProperties
  • m_begin : IndexRange
  • m_bringingIntoViewEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_budgetInMs : final
  • m_buildTreeCompleted : RepeaterTestHooks , MUXControlsTestHooks
  • m_buttonClickRevokers : TextCommandBarFlyout
  • m_buttonCommandRevokers : TextCommandBarFlyout
  • m_buttons : TextCommandBarFlyout
  • m_cacheBuildAction : ViewportManagerDownLevel
  • m_cachedBounds : PinterestLayout
  • m_cancelBringIntoView : ScrollViewBringIntoViewOperation
  • m_cancelCurrentPressStateContinuation : RevealHoverLight
  • m_candidates : ItemsRepeaterScrollHost
  • m_changed : ObservableVector< T >
  • m_changeViewToVerticalOffsetWithAnimationCorrelationId : VariableSizedItemsPage
  • m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId : VariableSizedItemsPage
  • m_checkedEventSource : InkToolBarFlyoutItemProperties
  • m_childrenNodes : final
  • m_childrenRequestedEventSource : SelectionModelProperties
  • m_clickEventSource : SplitButtonProperties
  • m_closeButtonClickEventSource : InfoBarProperties , TeachingTipProperties
  • m_closedEventsFired : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • m_closedEventSource : InfoBarProperties , TeachingTipProperties
  • m_closeRequestedEventSource : TabViewItemProperties
  • m_closingEventsFired : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • m_closingEventSource : InfoBarProperties , TeachingTipProperties
  • m_cMethods : CMethodProfileGroup< size >
  • m_collapsedEventSource : ExpanderProperties , NavigationViewProperties , TreeViewProperties
  • m_collectionAdd : XamlTypeBase
  • m_collectionChangedEventSource : ItemsSourceViewProperties
  • m_collectionChangedEventTokenVector : ViewModel
  • m_colorChangedEventSource : ColorPickerProperties , ColorSpectrumProperties
  • m_columnOffsets : PinterestLayout
  • m_componentTypes : ItemsViewTestsWithInputHelper::LoggingHelper
  • m_compositionDevice : ThreadData
  • m_compositionTarget : InkCanvas::TargetData
  • m_contentLayoutOffsetXChangedEventSource : ScrollPresenterTestHooks
  • m_contentLayoutOffsetYChangedEventSource : ScrollPresenterTestHooks
  • m_contentProperty : XamlTypeBase
  • m_context : FlowLayoutAlgorithm , VirtualLayoutContextAdapter::ChildrenCollection< T >
  • m_controller : DesktopAcrylicBackdrop::ControllerEntry , MicaBackdrop::ControllerEntry
  • m_controllers : DesktopAcrylicBackdrop , MicaBackdrop
  • m_coreMoveFocusRequestedRevoker : WebView2
  • m_coreNavigationCompletedRevoker : WebView2
  • m_coreNavigationStartingRevoker : WebView2
  • m_coreProcessFailedEventSource : WebView2Properties
  • m_coreProcessFailedRevoker : WebView2
  • m_coreSourceChangedRevoker : WebView2
  • m_coreWebMessageReceivedRevoker : WebView2
  • m_coreWebView2InitializedEventSource : WebView2Properties
  • m_Counts : CMethodProfileGroup< size >
  • m_createAnimationsCounter : AnimatedVisualPlayer
  • m_createFromString : XamlTypeBase
  • m_currentIndex : SelectedItems< T >::Iterator , VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
  • m_cursorChangedRevoker : WebView2
  • m_data : WinRTCollection , VirtualizationInfo
  • m_dataChangeCallback : TopNavigationViewDataProvider
  • m_dataSource : TopNavigationViewDataProvider , final
  • m_dataTemplateComponent : VirtualizationInfo
  • m_detailLabelRequestedEventSource : AnnotatedScrollBarProperties
  • m_diagnosticMessage : MapControlMapServiceErrorOccurredEventArgs
  • m_dictionary : Bridge
  • m_displayModeChangedEventSource : NavigationViewProperties
  • m_dragItemsCompletedEventSource : TreeViewProperties
  • m_dragItemsStartingEventArgs : TreeViewDragItemsStartingEventArgs
  • m_dragItemsStartingEventSource : TreeViewProperties
  • m_dropDownClosedRevoker : ComboBoxDropDownEventRevokers
  • m_dropDownOpenedRevoker : ComboBoxDropDownEventRevokers
  • m_dropTargetDropEffectString : TreeViewList
  • m_effectiveHeroContentPlacementChangedEventSource : TeachingTipTestHooks
  • m_effectivePlacementChangedEventSource : TeachingTipTestHooks
  • m_element : MapElementClickEventArgs , ItemsRepeaterScrollHost::CandidateInfo , RecyclePool::ElementInfo
  • m_elementAvailableWidths : LinedFlowLayout
  • m_elementClearingEventSource : ItemsRepeaterProperties
  • m_elementDesiredWidths : LinedFlowLayout
  • m_ElementFactoryGetArgs : final
  • m_ElementFactoryRecycleArgs : final
  • m_elementIds : MapElementsLayer
  • m_elementIndexChangedEventSource : ItemsRepeaterProperties
  • m_elementManager : FlowLayoutAlgorithm
  • m_elementMap : final
  • m_elementPreparedEventSource : ItemsRepeaterProperties
  • m_elementRect : BringIntoViewOffsetsChange
  • m_elements : RecyclePool
  • m_end : IndexRange
  • m_eraseAllClickedEventSource : InkToolBarProperties
  • m_eraserFlyoutItemClickedEventSource : InkToolBarProperties
  • m_estimationBuffer : VirtualizingStackLayout
  • m_eventName : PerfXamlEvent_RAII
  • m_expandingEventSource : ExpanderProperties , NavigationViewProperties , TreeViewProperties
  • m_expectedMutationCount : HashMap< K, V >::Iterator
  • m_expectNullSelectedItemInNextInvoke : NavigationViewTopNavOnlyPage
  • m_expressionAnimationStatusChangedEventSource : ScrollPresenterTestHooks
  • m_expressionAnimationStatusChanges : ScrollPresenterTestHooksHelper
  • m_extentChangedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_extentHeight : VariableSizedItemsPage
  • m_externalTornOutTabsDroppedEventSource : TabViewProperties
  • m_externalTornOutTabsDroppingEventSource : TabViewProperties
  • m_firstIndex : PinterestLayout
  • m_firstRealizedDataIndex : VirtualizingStackLayout
  • m_focusVisualKind : NavigationViewPage
  • m_footerItems : NavigationViewInitPage
  • m_frequency : final
  • m_func : GenericInkCallback
  • m_getAtImpl : SelectedItems< T >
  • m_getter : CustomProperty
  • m_gettingFocusRevoker : WebView2
  • m_gotFocusRevoker : WebView2
  • m_group : CMethodProfileGroup< size >
  • m_handle : AutoHandle< THandlePolicy >
  • m_handlers : event_base< ImplT, T, StorageT >
  • m_hasPointerCapture : TabViewItem
  • m_hasUnrealizedChildren : TreeViewItemSource
  • m_hmodDComp : ThreadData
  • m_horizontalAlignmentRatio : BringIntoViewOffsetsChange
  • m_horizontalOffset : BringIntoViewOffsetsChange
  • m_horizontalScroller : ViewportManagerDownLevel
  • m_hostHwnd : InkCanvas
  • m_hsvValues : ColorSpectrum
  • m_hwnd : InkCanvas::TargetData
  • m_iconPresenter : AnimatedIconHost , ToggleAnimatedIconHost
  • m_idleStatusChangedEventSource : SwipeTestHooks , TeachingTipTestHooks
  • m_index : VectorChangedEventArgs , ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator , ItemsRepeaterElementPreparedEventArgs
  • m_infoChangedFunction : ScrollInputHelper
  • m_infos : SelectedItems< T >
  • m_initializeComponentComplete : NavigationViewTopNavPage
  • m_inkDrawingAttributesChangedEventSource : InkToolBarProperties
  • m_inkHost : ThreadData
  • m_inkRootVisual : InkCanvas
  • m_inner : ObservableVector< T >::Iterator
  • m_innerChangedRevoker : ObservableVector< T >
  • m_innerScrollableScroller : ViewportManagerDownLevel
  • m_inputActivationListener : TitleBar
  • m_instanceLoggingLevels : MUXControlsTestHooks
  • m_interactionRatioCompositionProperty : RefreshInfoProviderImpl
  • m_interactionSources : ScrollPresenterTestHooksHelper
  • m_interactionSourcesChangedEventSource : ScrollPresenterTestHooks
  • m_interactionTrackerAsyncOperations : ScrollPresenter
  • m_invalidationTrigger : LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
  • m_invokedEventSource : ButtonInteractionProperties , SwipeItemProperties
  • m_invokeFunction : CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
  • m_isBeingDragged : TabViewItem
  • m_isBindable : XamlTypeBase
  • m_isCheckedChangedEventSource : ToggleSplitButtonProperties
  • m_isCheckingforDrag : TabViewItem
  • m_isExpanded : TreeViewItemSource
  • m_IsExpandedChangedEventTokenVector : ViewModel
  • m_isExplicitControllerOptions : WebView2
  • m_isExplicitEnvironment : WebView2
  • m_isInteresting : PerfXamlEvent_RAII
  • m_isMiddlePointerButtonPressed : TabViewItem
  • m_isPointerOver : ColorSpectrum , TabViewItem
  • m_isPointerPressed : ColorSpectrum
  • m_isSelected : TreeViewItemSource
  • m_isSettingToggleButtonState : TextCommandBarFlyout
  • m_isStencilButtonCheckedChangedEventSource : InkToolBarProperties
  • m_isSystemType : XamlTypeBase
  • m_itemClickedEventSource : BreadcrumbBarProperties
  • m_itemContainersPointerInfos : ItemsView
  • m_itemContainersWithRevokers : ItemsView
  • m_itemIndex : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • m_itemInvokedEventsFired : NavigationViewPage
  • m_itemInvokedEventSource : ItemContainerProperties , ItemsViewProperties , NavigationViewProperties , TreeViewProperties
  • m_items : TabViewTabTearOutWindowRequestedEventArgs , TabViewTabTearOutRequestedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs , TabViewExternalTornOutTabsDroppedEventArgs
  • m_itemsInfoArrangeWidths : LinedFlowLayout
  • m_itemsInfoDesiredAspectRatiosForRegularPath : LinedFlowLayout
  • m_itemsInfoMaxWidthsForRegularPath : LinedFlowLayout
  • m_itemsInfoMinWidthsForRegularPath : LinedFlowLayout
  • m_itemsInfoRequestedEventSource : LinedFlowLayoutProperties
  • m_itemsUnlockedEventSource : LinedFlowLayoutProperties
  • m_itemsWithRevokerObjects : NavigationView
  • m_iterator : HashMap< K, V >::Iterator
  • m_keepAliveTimersMap : ItemCollectionTransitionProvider
  • m_keyboardNavigationReferenceOffsetChangedEventSource : ItemsViewTestHooks
  • m_keyDownRevoker : WebView2
  • m_lastAnimationSegmentChangedEventSource : AnimatedIconTestHooks
  • m_lastAvailableWidth : PinterestLayout
  • m_lastExtent : VirtualizingStackLayout
  • m_lastFocusedElement : final
  • m_lastIndex : PinterestLayout
  • m_lastInteractedWithSwipeControlChangedEventSource : SwipeTestHooks
  • m_lastNumberOfPagesCount : PagerControl
  • m_lastSelectedPageIndex : PagerControl
  • m_layoutChangedEventSource : ColumnMajorUniformToLargestGridLayout , RadioButtonsTestHooks
  • m_layoutId : Layout
  • m_layoutInfo : CachedVisualTreeHelpers
  • m_layoutUpdatedRevoker : InkCanvas
  • m_leafNode : SelectionModel
  • m_linedFlowLayoutInvalidatedEventSource : LayoutsTestHooks
  • m_linedFlowLayoutItemLockedEventSource : LayoutsTestHooks
  • m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource : LayoutsTestHooks
  • m_lineIndex : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • m_lineItemCounts : LinedFlowLayout
  • m_loaded : RadioButtonsPage
  • m_location : MapElementClickEventArgs
  • m_lockedItemIndexes : LinedFlowLayout
  • m_loggingMessageEventSource : MUXControlsTestHooks
  • m_losingFocusRevoker : WebView2
  • m_makeAnchorElement : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • m_manager : final
  • m_map : HashMap< K, V >
  • m_mapElementClickEventSource : MapControlProperties , MapElementsLayerProperties
  • m_mapServiceErrorOccurredEventSource : MapControlProperties
  • m_materialHelper : LifetimeHandler
  • m_measureInvalidatedEventSource : LayoutProperties
  • m_members : XamlTypeBase
  • m_menuBar : MenuBarItem
  • m_menuItems : NavigationViewInitPage , NavigationViewTopNavStorePage
  • m_menuItemsEnumerable : NavigationViewInitPage
  • m_modeChangedEventSource : TwoPaneViewProperties
  • m_mutationCount : HashMap< K, V >
  • m_mutex : MutexLockedResource< T >
  • m_Name : EffectBase
  • m_navigationCompletedEventSource : WebView2Properties
  • m_navigationKeysToProcess : ItemsView
  • m_navigationStartingEventSource : WebView2Properties
  • m_newFooterItemIndex : NavigationViewPage , NavigationViewTopNavPage
  • m_newIndex : ItemsRepeaterElementIndexChangedEventArgs
  • m_newItemIndex : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • m_newPageIndex : PagerControlSelectedIndexChangedEventArgs
  • m_newParentItem : TreeViewDragItemsCompletedEventArgs
  • m_newValue : NumberBoxValueChangedEventArgs
  • m_noiseChangedListeners : MaterialHelper
  • m_numberOfItemAdded : NavigationViewTopNavOnlyPage
  • m_numItemsUsedForEstimation : VirtualizingStackLayout
  • m_object : PropertyChanged_revoker , RoutedEventHandler_revoker
  • m_objectPointer : PerfXamlEvent_RAII , SimpleXamlStartStopEvent_RAII
  • m_offsetChangedEventSource : TeachingTipTestHooks
  • m_oldIndex : ItemsRepeaterElementIndexChangedEventArgs
  • m_oldValue : NumberBoxValueChangedEventArgs
  • m_openedStatusChangedEventSource : SwipeTestHooks , TeachingTipTestHooks
  • m_optimizedIndexOf_StartNextSearchAt : VectorInnerImpl< VectorOptions, Wrapper >
  • m_owner : AnimatedVisualPlayer::final , ItemsViewTestsWithInputHelper::LoggingHelper , LayoutPanelLayoutContext , NavigationViewItemHelper< T > , ScrollInputHelper , final , FlowLayoutAlgorithm , RecyclePool::ElementInfo , RepeaterLayoutContext , final , BringIntoViewOffsetsChange , ScrollViewTestsWithInputHelper::LoggingHelper
  • m_paneClosedEventSource : NavigationViewProperties
  • m_paneClosingEventSource : NavigationViewProperties
  • m_paneOpenedEventSource : NavigationViewProperties
  • m_paneOpeningEventSource : NavigationViewProperties
  • m_paneToggleRequestedEventSource : TitleBarProperties
  • m_parentScrollers : ViewportManagerDownLevel
  • m_passThroughElement : MenuBarItem
  • m_path : IndexPath
  • m_pendingWork : final
  • m_phaser : final
  • m_pinnedElement : final::PinnedElementInfo
  • m_pinnedPool : final
  • m_pointerCanceledRevoker : WebView2
  • m_pointerCaptureLostRevoker : WebView2
  • m_pointerEnteredRevoker : WebView2
  • m_pointerExitedRevoker : WebView2
  • m_pointerMovedRevoker : WebView2
  • m_pointerPressedRevoker : WebView2
  • m_pointerReleasedRevoker : WebView2
  • m_pointerWheelChangedRevoker : WebView2
  • m_policyChangedListeners : MaterialHelper
  • m_popupClosedRevoker : AutoSuggestEventRevokers
  • m_popupOpenedRevoker : AutoSuggestEventRevokers
  • m_postArrangeToken : ViewportManagerDownLevel
  • m_preparedAndArrangedElements : ViewportManagerWithPlatformFeatures
  • m_preparedElements : ViewportManagerWithPlatformFeatures
  • m_previousPageIndex : PagerControlSelectedIndexChangedEventArgs
  • m_priority : WorkInfo
  • m_proofingMenuItemClickRevokers : TextCommandBarFlyout
  • m_proofingMenuToggleItemClickRevokers : TextCommandBarFlyout
  • m_propertyChangedEventSource : ButtonInteractionProperties , SelectionModelProperties , SliderInteractionProperties
  • m_propertyChangedRevokersByIndexMap : CommandBarFlyout
  • m_provider : WebView2AutomationPeer
  • m_radioButtonItemCollection : RadioButtonsPage
  • m_rawDataSource : TopNavigationViewDataProvider
  • m_rawPixelsPerViewPixel : OrientationBasedMeasures
  • m_realizedChildren : ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
  • m_realizedElementBounds : VirtualizingStackLayout
  • m_realizedElementLayoutBounds : final
  • m_realizedElements : final
  • m_refreshPullDirection : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • m_refreshRequestedEventSource : RefreshContainerProperties , RefreshVisualizerProperties
  • m_refreshStateChangedEventSource : RefreshVisualizerProperties
  • m_removedSelectedItems : ViewModel
  • m_renderingToken : final
  • m_resetPool : final
  • m_resource : MutexLockedResource< T >
  • m_resourceManagerWinRT : sealed< T, fallback, RawStorageT >
  • m_revealBrushCompositionEffectFactoryCache : MaterialHelperBase
  • m_revealLightsToRemove : MaterialHelperBase
  • m_rootNodeChildrenChangedEventToken : ViewModel
  • m_scrollAnimationStartingEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_scrollBar : ScrollBarController
  • m_scrollCompletedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_scroller : ViewportManagerDownLevel::ScrollerInfo , ViewportManagerWithPlatformFeatures
  • m_scrollingEventKind : AnnotatedScrollBarScrollingEventArgs
  • m_scrollingEventSource : AnnotatedScrollBarProperties
  • m_scrollStartingEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_scrollViewVisualStateCounts : ScrollViewTests
  • m_secondaryButtonClickRevokerByIndexMap : CommandBarFlyout
  • m_secondaryToggleButtonCheckedRevokerByIndexMap : CommandBarFlyout
  • m_secondaryToggleButtonUncheckedRevokerByIndexMap : CommandBarFlyout
  • m_selected : final
  • m_selectedIndexChangedEventSource : PagerControlProperties , PipsPagerProperties
  • m_selectedIndicesCached : final
  • m_selectedIndicesCacheIsValid : final
  • m_selectedNodeChildrenChangedEventTokenVector : ViewModel
  • m_selectionChangedEventsFired : NavigationViewPage
  • m_selectionChangedEventSource : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectionModelProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties
  • m_selector : ItemsView
  • m_selectTemplateKeyEventSource : RecyclingElementFactoryProperties
  • m_setter : CustomProperty
  • m_shouldShowLargeSelection : ColorSpectrum
  • m_signal : Awaitable
  • m_sizeChanged_revoker : InkCanvas
  • m_sizeChangedRevoker : WebView2
  • m_snapPoint : SnapPointWrapper< T >
  • m_source : final
  • m_start : final
  • m_stateChangedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_stringItemCollection : RadioButtonsPage
  • m_subtitleVisibilityChangedEventSource : TeachingTipTestHooks
  • m_swipeControl : SwipeItemInvokedEventArgs
  • m_systemVisualBridge : WebView2
  • m_tabCloseRequestedEventSource : TabViewProperties
  • m_tabDragCompletedEventSource : TabViewProperties
  • m_tabDragStartingEventSource : TabViewProperties
  • m_tabDroppedOutsideEventSource : TabViewProperties
  • m_tabItemsChangedEventSource : TabViewProperties
  • m_tabs : TabViewTabTearOutWindowRequestedEventArgs , TabViewTabTearOutRequestedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs , TabViewExternalTornOutTabsDroppedEventArgs
  • m_tabStripDragOverEventSource : TabViewProperties
  • m_tabStripDropEventSource : TabViewProperties
  • m_tabTearOutRequestedEventSource : TabViewProperties
  • m_tabTearOutWindowRequestedEventSource : TabViewProperties
  • m_tabViewBoundsTuples : TabView
  • m_target : DesktopAcrylicBackdrop::ControllerEntry , MicaBackdrop::ControllerEntry
  • m_targetData : InkCanvas
  • m_targetElement : ItemsRepeaterScrollHost::BringIntoViewState , ScrollViewBringIntoViewOperation
  • m_targetRootVisual : InkCanvas::TargetData
  • m_TargetUnloadedRevoker : TeachingTip
  • m_testTreeViewItemsSource : TreeViewLateDataInitTest
  • m_threadData : InkCanvas
  • m_timer : final
  • m_titleVisibilityChangedEventSource : TeachingTipTestHooks
  • m_tlsMap : InkCanvas::TargetData
  • m_toggleButtonCheckedRevokers : TextCommandBarFlyout
  • m_toggleButtonUncheckedRevokers : TextCommandBarFlyout
  • m_totalHeightForEstimation : VirtualizingStackLayout
  • m_trackScrollViewStateChanges : ScrollViewTests
  • m_transitionCompletedEventSource : ItemCollectionTransitionProviderProperties
  • m_transitionProvider : final
  • m_transitionsMap : ItemCollectionTransitionProvider
  • m_transitionsWithAnimationsMap : ItemCollectionTransitionProvider
  • m_transitionTextBlock : AnimatedIconHost , ToggleAnimatedIconHost
  • m_typeLoggingLevels : MUXControlsTestHooks
  • m_typeName : XamlTypeBase
  • m_uiSettings : WebView2
  • m_uncheckedEventSource : InkToolBarFlyoutItemProperties
  • m_uniqueId : VirtualizationInfo
  • m_updatingColor : ColorSpectrum
  • m_updatingHsvColor : ColorSpectrum
  • m_useFocusVisualKindReveal : NavigationViewPage
  • m_useLayoutRounding : OrientationBasedMeasures
  • m_value : auto_unbox , auto_cast
  • m_valueChangedEventSource : NumberBoxProperties , RatingControlProperties
  • m_vector : VectorInnerImpl< VectorOptions, Wrapper > , SplitVector< T, SplitVectorID >
  • m_vectorID : SplitVector< T, SplitVectorID >
  • m_verticalAlignmentRatio : BringIntoViewOffsetsChange
  • m_verticalOffset : BringIntoViewOffsetsChange
  • m_verticalScroller : ViewportManagerDownLevel
  • m_viewChangeBase : InteractionTrackerAsyncOperation
  • m_viewChangedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_viewType : ItemsRepeaterElementPreparedEventArgs
  • m_virtInfo : final::PinnedElementInfo
  • m_visibilityChangedRevoker : MaterialHelper
  • m_visualTreeHelper : CachedVisualTreeHelpers
  • m_wait : Awaitable
  • m_webMessageReceivedEventSource : WebView2Properties
  • m_workFunc : WorkInfo
  • m_xamlBindingHelperStatics : CachedVisualTreeHelpers
  • m_zoomAnimationStartingEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_zoomCompletedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_zoomStartingEventSource : ScrollPresenterProperties , ScrollViewProperties
  • MadeAnchor() : ItemsRepeater , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • MagicDisengager_ValueChanged() : RatingControlPage
  • Main() : Flex
  • MainPageLoaded() : RefreshVisualizerPage
  • MainSize : Flex::LineInfo
  • MainWindowLightConfiguration() : MainWindowLightConfiguration
  • Major() : OrientationBasedMeasures
  • MajorEnd() : OrientationBasedMeasures
  • MajorSize() : OrientationBasedMeasures
  • MajorStart() : OrientationBasedMeasures
  • MakeAnchor() : FlowLayoutAlgorithm
  • MakeAnimatedIcon() : InfoBadgePage
  • MakeAutoHideScrollBarsState() : ScrollView
  • MakeBitmapIcon() : InfoBadgePage
  • MakeColorAnimation() : AcrylicBrush
  • MakeFloatAnimation() : AcrylicBrush
  • MakeFontIcon() : InfoBadgePage
  • MakeImageIcon() : InfoBadgePage
  • MakeInteractionSource() : ScrollViewerIRefreshInfoProviderAdapter
  • MakePathIcon() : InfoBadgePage
  • MakeSymbolIcon() : InfoBadgePage
  • MakeTheAboveRatingSquares_Click() : RatingControlPage
  • ManipulationModeFromIndex() : ScrollPresenterManipulationModePage
  • Map_MapElementClick() : MapControlPage
  • Map_MapServiceErrorOccurred() : MapControlPage
  • MapControl() : MapControl
  • MapControlMapServiceErrorOccurredEventArgs() : MapControlMapServiceErrorOccurredEventArgs
  • MapControlPage() : MapControlPage
  • MapControlProperties() : MapControlProperties
  • MapElement() : MapElement
  • MapElementClick() : MapControlProperties , MapElementsLayerProperties
  • MapElementClickEventArgs() : MapElementClickEventArgs
  • MapElements() : MapElementsLayerProperties
  • MapElementsLayer() : MapElementsLayer
  • MapElementsLayerProperties() : MapElementsLayerProperties
  • MapElementsProperty() : MapElementsLayerProperties
  • MapIcon() : MapIcon
  • MapIconProperties() : MapIconProperties
  • MapLayer() : MapLayer
  • Mapping : EffectBase::NamedProperty
  • MappingMode() : RadialGradientBrushProperties
  • MappingModeProperty() : RadialGradientBrushProperties
  • MapServiceErrorOccurred() : MapControlProperties
  • MapServiceToken() : MapControlProperties
  • MapServiceTokenProperty() : MapControlProperties
  • MarginValueChanged() : RefreshVisualizerPage
  • MarkCallbackRecieved() : final
  • markers : MockIAnimatedIconSource2 , MockAnimatedIconSource
  • Markers : MockAnimatedIconSource , BrightnessSun , MockIAnimatedIconSource2 , AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , LottieLogo , AnimatedChevronRightDownSmallVisualSource
  • MarkupDefinedSwipeItemDoesNotCrash() : SwipeControlTests
  • MarkupScrollPresenter_StateChanged() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • MarkupScrollPresenter_ViewChanged() : ScrollPresenterZoomSnapPointsPage , ScrollPresenterScrollSnapPointsPage
  • Mask() : IAlphaMaskEffect
  • MaterialHelper : RevealHoverLight , XamlAmbientLight , AcrylicBrush , MaterialHelper , RevealBorderLight , RevealBrush
  • MaterialHelperBase : RevealBorderLight , RevealHoverLight , XamlAmbientLight
  • MaterialHelperTestApiSetup() : SwipeControlPage
  • MathToken() : MathToken
  • MaxArrangeBounds() : StackLayoutState
  • MaxCacheSize : MaterialHelperBase
  • MaxCheckBox_CheckChanged() : NumberBoxPage
  • MaxColumns() : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties , ColumnMajorUniformToLargestGridLayoutProperties
  • MaxColumnsProperty() : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties
  • MaxColumnsTextBlock : RadioButtonsTestPageElements
  • maxDepth : BreadcrumbBarPage
  • MaxHorizontalShiftRatio() : ParallaxViewProperties
  • MaxHorizontalShiftRatioProperty() : ParallaxViewProperties
  • MaxHue() : ColorPickerProperties , ColorSpectrumProperties
  • MaxHueProperty() : ColorPickerProperties , ColorSpectrumProperties
  • Maximizable() : TeachingTipAutomationPeer
  • MaximizeInteractionTrackerOperationsTicksCountdown() : ScrollPresenter
  • Maximum() : AnnotatedScrollBar , NumberBoxProperties , ProgressRingProperties , SliderInteraction , NumberBoxAutomationPeer , ProgressBarAutomationPeer , RatingControlAutomationPeer , ProgressRingAutomationPeer , NumberBoxProperties
  • MaximumProperty() : NumberBoxProperties , ProgressRingProperties
  • MaximumRowsOrColumns() : UniformGridLayoutProperties
  • MaximumRowsOrColumnsProperty() : UniformGridLayoutProperties
  • MaxOffset : BiDirectionalScrollController::UniScrollController
  • maxOffset : CompositionScrollController , CompositionScrollControllerPanningInfo
  • maxOffsetPropertyName : CompositionScrollControllerPanningInfo
  • MaxRating() : RatingControlProperties
  • MaxRating9Unset_ValueChanged() : RatingControlPage
  • MaxRatingProperty() : RatingControlProperties
  • MaxRatingTest() : RatingControlTests
  • MaxSaturation() : ColorPickerProperties , ColorSpectrumProperties , ColorPickerProperties
  • MaxSaturationProperty() : ColorSpectrumProperties , ColorPickerProperties
  • MaxSideLength() : ProgressRingTemplateSettingsProperties
  • MaxSideLengthProperty() : ProgressRingTemplateSettingsProperties
  • MaxStrokeWidth() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • MaxStrokeWidthProperty() : InkToolBarPenButtonProperties
  • MaxSurface() : SpectrumBrushProperties
  • MaxSurfaceOpacity() : SpectrumBrushProperties
  • MaxSurfaceOpacityProperty() : SpectrumBrushProperties
  • MaxSurfaceProperty() : SpectrumBrushProperties
  • maxThresholdPropertyName() : SwipeControl
  • MaxThumbOffset() : BiDirectionalScrollController
  • MaxValue() : ColorPickerProperties , ColorSpectrumProperties
  • MaxValueChanged() : NumberBoxPage
  • MaxValueProperty() : ColorPickerProperties , ColorSpectrumProperties
  • MaxVerticalShiftRatio() : ParallaxViewProperties
  • MaxVerticalShiftRatioProperty() : ParallaxViewProperties
  • MaxVisiblePips() : PipsPagerProperties
  • MaxVisiblePipsProperty() : PipsPagerProperties
  • MaxVisualIndicatorsComboBox : PipsPagerElements
  • MaxWidth() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • MaxZoomFactor() : ScrollPresenterProperties , ScrollViewProperties
  • MaxZoomFactorProperty() : ScrollPresenterProperties , ScrollViewProperties
  • Measure() : FlowLayoutAlgorithm , Layout
  • MeasureConstrainedLines() : LinedFlowLayout
  • MeasureConstrainedLinesFastPath() : LinedFlowLayout
  • MeasureConstrainedLinesRegularPath() : LinedFlowLayout
  • MeasureElement() : FlowLayoutAlgorithm , VirtualizingStackLayout
  • MeasureInvalidated() : LayoutProperties , Layout , LayoutProperties
  • MeasureItemRange() : LinedFlowLayout
  • MeasureItemRangeRegularPath() : LinedFlowLayout
  • MeasureLayoutFunc : FlowLayoutDerived , MockNonVirtualizingLayout , MockStackLayout , MockVirtualizingLayout
  • MeasureOverride() : UniformGridLayout , WebView2 , SwipeControl , NonVirtualizingLayout , FlowLayoutDerived , StackLayout , LinedFlowLayout , VirtualizingUniformStackLayout , NonVirtualStackLayout , CircleLayout , ItemsRepeaterScrollHost , NavigationView , FlowLayout , ParallaxView , AnimatedIcon , AnimatedVisualPlayer , BreadcrumbLayout , ViewportTests::TestStackLayout , InfoBarPanel , MyCustomNonVirtualizingStackLayout , LayoutPanel , ViewportTests::TestGridLayout , MockNonVirtualizingLayout , MockStackLayout , MockVirtualizingLayout , ViewportTests::TestScrollingSurface , ColumnMajorUniformToLargestGridLayout , ItemsRepeater , AspectRatioRespectingControl , ActivityFeedLayout , PinterestLayout , UniformGrid2DLayout , VirtualizingUniformCarouselStackLayout , ScrollPresenter , TabView , InfoBadge , Flex , NonVirtualStackLayout , VirtualizingStackLayout , VirtualizingLayout
  • MeasureTopNavigationViewDesiredWidth() : NavigationView
  • MeasureTopNavMenuItemsHostDesiredWidth() : NavigationView
  • MeasureUnconstrainedLine() : LinedFlowLayout
  • MediaTransportControlsPage() : MediaTransportControlsPage
  • MenuBar() : MenuBar
  • MenuBarAutomationPeer() : MenuBarAutomationPeer
  • MenuBarHeightTest() : MenuBarTests
  • MenuBarItem() : MenuBarItem
  • MenuBarItemAutomationPeer() : MenuBarItemAutomationPeer
  • MenuBarItemProperties() : MenuBarItemProperties
  • MenuBarPage() : MenuBarPage
  • MenuBarProperties() : MenuBarProperties
  • MenuFlyoutItemSizeTest() : CommonStylesTests
  • MenuFlyoutPage() : MenuFlyoutPage
  • MenuItemAutomationSelectionTest() : SelectionTests
  • MenuItemContainerStyle() : NavigationViewProperties
  • MenuItemContainerStyleProperty() : NavigationViewProperties
  • MenuItemContainerStyleSelector() : NavigationViewProperties
  • MenuItemContainerStyleSelectorProperty() : NavigationViewProperties
  • MenuItemFromContainer() : NavigationView
  • MenuItemInvokedTest() : EventTests
  • MenuItemKeyboardInvokeTest() : CommonTests
  • MenuItems() : NavigationViewItemProperties , NavigationViewProperties
  • menuItems : PaneLayoutTestPage
  • MenuItems() : NavigationViewItemProperties
  • MenuItemsProperty() : NavigationViewItemProperties , NavigationViewProperties
  • MenuItemsSource() : NavigationViewProperties , NavigationViewItemProperties , NavigationViewProperties , NavigationViewItemProperties
  • MenuItemsSourceProperty() : NavigationViewItemProperties , NavigationViewProperties
  • MenuItemTemplate() : NavigationViewProperties
  • MenuItemTemplateProperty() : NavigationViewProperties
  • MenuItemTemplateSelector() : NavigationViewProperties
  • MenuItemTemplateSelectorProperty() : NavigationViewProperties
  • MenuKind() : InkToolBarMenuButton , InkToolBarMenuButtonProperties
  • MenuKindProperty() : InkToolBarMenuButtonProperties
  • Message() : InfoBarProperties , MUXControlsTestHooksLoggingMessageEventArgs , InfoBarProperties
  • MessageLog : WebView2Common
  • MessageProperty() : InfoBarProperties
  • MicaBackdrop() : MicaBackdrop
  • MicaBackdropProperties() : MicaBackdropProperties
  • MinCheckBox_CheckChanged() : NumberBoxPage
  • MinColumnSpacing() : FlowLayoutProperties , UniformGridLayoutProperties , FlowLayoutProperties
  • MinColumnSpacingProperty() : FlowLayoutProperties , UniformGridLayoutProperties
  • MinHue() : ColorSpectrumProperties , ColorPickerProperties , ColorSpectrumProperties
  • MinHueProperty() : ColorPickerProperties , ColorSpectrumProperties
  • minimal : NavigationViewTestsBase
  • Minimizable() : TeachingTipAutomationPeer
  • Minimum() : ProgressRingProperties , SliderInteraction , NumberBoxProperties , AnnotatedScrollBar , NumberBoxProperties , SliderInteraction , ProgressBarAutomationPeer , RatingControlAutomationPeer , NumberBoxAutomationPeer , ProgressRingAutomationPeer
  • MinimumProperty() : NumberBoxProperties , ProgressRingProperties
  • MinimumTipEdgeToTailCenter() : TeachingTip
  • MinimumTipEdgeToTailEdgeMargin() : TeachingTip
  • MinItemHeight() : UniformGridLayoutProperties
  • MinItemHeightProperty() : UniformGridLayoutProperties
  • MinItemSize : ActivityFeedLayout
  • MinItemSizeProperty : ActivityFeedLayout
  • MinItemSpacing() : LinedFlowLayoutProperties , FlowLayout , UniformGridLayout , LinedFlowLayoutProperties
  • MinItemSpacingProperty() : LinedFlowLayoutProperties
  • MinItemWidth() : UniformGridLayoutProperties
  • MinItemWidthProperty() : UniformGridLayoutProperties
  • MinMaxTest() : NumberBoxTests
  • minOffset : CompositionScrollControllerPanningInfo , CompositionScrollController
  • MinOffset : BiDirectionalScrollController::UniScrollController
  • minOffsetPropertyName : CompositionScrollControllerPanningInfo
  • Minor() : OrientationBasedMeasures
  • MinorEnd() : OrientationBasedMeasures
  • MinorMajorPoint() : OrientationBasedMeasures
  • MinorMajorRect() : OrientationBasedMeasures
  • MinorMajorSize() : OrientationBasedMeasures
  • MinorSize() : OrientationBasedMeasures
  • MinorStart() : OrientationBasedMeasures
  • MinRowSpacing : PipsPagerExamples , FlowLayoutProperties , UniformGridLayoutProperties , FlowLayoutProperties , UniformGridLayoutProperties
  • MinRowSpacingProperty() : UniformGridLayoutProperties , FlowLayoutProperties
  • MinSaturation() : ColorSpectrumProperties , ColorPickerProperties , ColorSpectrumProperties , ColorPickerProperties
  • MinSaturationProperty() : ColorSpectrumProperties , ColorPickerProperties
  • MinStrokeWidth() : InkToolBarPenButton , InkToolBarPenButtonProperties
  • MinStrokeWidthProperty() : InkToolBarPenButtonProperties
  • MinSurface() : SpectrumBrushProperties
  • MinSurfaceProperty() : SpectrumBrushProperties
  • MinTallModeHeight() : TwoPaneViewProperties
  • MinTallModeHeightProperty() : TwoPaneViewProperties
  • MinTallModeHeightTextBox_TextChanged() : TwoPaneViewPage
  • MinValue() : ColorPickerProperties , ColorSpectrumProperties , ColorPickerProperties , ColorSpectrumProperties
  • MinValueChanged() : NumberBoxPage
  • MinValueProperty() : ColorSpectrumProperties , ColorPickerProperties
  • MinWideModeWidth() : TwoPaneViewProperties
  • MinWideModeWidthProperty() : TwoPaneViewProperties
  • MinWideModeWidthTextBox_TextChanged() : TwoPaneViewPage
  • MinWidth() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • MinZoomFactor() : ScrollPresenterProperties , ScrollViewProperties
  • MinZoomFactorProperty() : ScrollViewProperties , ScrollPresenterProperties
  • MirroredWhenRightToLeft() : AnimatedIconSourceProperties , AnimatedIconProperties , AnimatedIconSourceProperties , AnimatedIconProperties
  • MirroredWhenRightToLeftProperty() : AnimatedIconSourceProperties , AnimatedIconProperties
  • miscellaneousGridViewSource : CommonStylesPage
  • MOCK_GetItemsPerRow() : AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarIScrollControllerPage
  • MOCK_GetStaticRowHeight() : AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarIScrollControllerPage
  • MockAnimatedIconSource() : MockAnimatedIconSource
  • MockClass() : BreadcrumbTests::MockClass
  • MockIAnimatedIconSource2() : MockIAnimatedIconSource2
  • MockProperty : BreadcrumbTests::MockClass
  • Mode() : IBlendEffect , ICompositeStepEffect , IBlendEffect , SwipeItemsProperties , TwoPaneViewProperties , SelectionModeItem , TwoPaneViewProperties
  • ModeChanged() : TwoPaneViewProperties
  • ModeProperty() : SwipeItemsProperties , TwoPaneViewProperties
  • ModifyCollectionOnItemInvokeTest() : SelectionTests
  • ModifyElementSize() : FlowLayoutTests
  • ModifySecondLevelOfNode_Click() : TreeViewPage
  • MonochromaticOverlayPresenter() : MonochromaticOverlayPresenter
  • MonochromaticOverlayPresenterPage() : MonochromaticOverlayPresenterPage
  • MonochromaticOverlayPresenterProperties() : MonochromaticOverlayPresenterProperties
  • moreButton : ColorPickerPage
  • MoreButtonAutomationId : ColorPickerTests
  • MoreButtonLabelAutomationId : ColorPickerTests
  • MouseCaptureTest() : WebView2Tests
  • MouseClickTestCommon() : WebView2Tests
  • MouseIndicatorStateCount : ScrollViewVisualStateCounts
  • MouseLeftClickTest() : WebView2Tests
  • MouseMiddleClickTest() : WebView2Tests
  • MouseRightClickTest() : WebView2Tests
  • mouseWheelDeltaForVelocityUnit : ScrollPresenterTestsWithInputHelper
  • MouseWheelScrollTest() : WebView2Tests
  • MouseXButton1ClickTest() : WebView2Tests
  • MouseXButton2ClickTest() : WebView2Tests
  • Move() : CustomItemsSource , CollectionChangeDemo::MyDataSource
  • move_from() : PropertyChanged_revoker , XamlRootChanged_revoker , RoutedEventHandler_revoker , ScopedBatchCompleted_revoker
  • MoveAllItemsToPrimaryList() : TopNavigationViewDataProvider
  • MoveCaretToTextEnd() : NumberBox
  • MoveContentUnderTopnav_Click() : NavigationViewTopNavStorePage
  • MoveContentUnderTopnavTitleBar_Click() : NavigationViewTopNavStorePage
  • MoveFocus() : BreadcrumbBar , TabView , RadioButtons
  • MoveFocusFromClearedIndex() : final
  • MoveFocusIntoCoreWebView2() : WebView2
  • MoveFocusNext() : BreadcrumbBar , RadioButtons
  • MoveFocusPrevious() : RadioButtons , BreadcrumbBar
  • MoveFocusTo() : MenuBarItem
  • MoveFocusToIndex() : ViewManagerTests
  • MoveIdentifierToElement() : PagerControl
  • MoveItemsOutOfPrimaryList() : TopNavigationViewDataProvider
  • MoveItemsToList() : TopNavigationViewDataProvider
  • MoveItemsToPrimaryList() : TopNavigationViewDataProvider
  • MoveItemsToVector() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • MoveItemToVector() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • MoveNext()
: HashMap< K, V >::Iterator
, ObservableVector< T >::Iterator
, BreadcrumbIterator
, VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
, ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
, SelectedItems< T >::Iterator
  • MoveNodeInto() : TreeViewList
  • MoveNodesToNewTreeView_Click() : TreeViewPage
  • MoveOwnershipToAnimator() : VirtualizationInfo
  • MoveOwnershipToElementFactory() : VirtualizationInfo
  • MoveOwnershipToLayoutFromElementFactory() : VirtualizationInfo
  • MoveOwnershipToLayoutFromPinnedPool() : VirtualizationInfo
  • MoveOwnershipToLayoutFromUniqueIdResetPool() : VirtualizationInfo
  • MoveOwnershipToPinnedPool() : VirtualizationInfo
  • MoveOwnershipToUniqueIdResetPoolFromLayout() : VirtualizationInfo
  • MoveSelection() : TabView
  • MoveTest() : WebView2Tests
  • MoveTowardsTwoManditoryIrregularSnapPoint() : ScrollPresenterTestsWithInputHelper
  • MoveWebViewControl() : WebView2BasicPage
  • MoveWithinARepeatedMandatorySnapPoint() : ScrollPresenterTestsWithInputHelper
  • Movies_Click() : NavigationViewSelectedItemEdgeCasePage
  • Movies_Click2() : NavigationViewSelectedItemEdgeCasePage
  • MoviesEnabledCheckbox_Checked() : NavigationViewTopNavPage , NavigationViewRS4Page , NavigationViewPage
  • MoviesEnabledCheckbox_Unchecked() : NavigationViewPage , NavigationViewTopNavPage , NavigationViewRS4Page
  • MultiColumnKeyboardTest() : RadioButtonsTests
  • MultipleSelector() : MultipleSelector
  • MultipleTabViewPage() : MultipleTabViewPage
  • MultipleTabViewPageButton_Click() : TabViewPage
  • MultipleWebviews_BasicRenderingTest() : WebView2Tests
  • MultipleWebviews_FocusTest() : WebView2Tests
  • MultipleWebviews_LanguageTest() : WebView2Tests
  • Multiplier() : CornerRadiusToThicknessConverterProperties
  • MultiplierProperty() : CornerRadiusToThicknessConverterProperties
  • multiplierPropertyName : CompositionScrollControllerPanningInfo
  • MultiplyAmount() : IArithmeticCompositeEffect
  • MultiSelectMode() : ItemContainerProperties
  • MultiSelectModeInternal() : ItemContainer
  • MultiSelectModeProperty() : ItemContainerProperties
  • MustClearDataContext() : VirtualizationInfo
  • MutableListControl() : TreeView
  • MutexLockedResource() : MutexLockedResource< T >
  • MUXControlsTestHooks_LoggingMessage() : ItemsViewPictureLibraryPage , ItemsViewIntegrationPage , ScrollViewBlankPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewWithScrollControllersPage , ScrollViewBringIntoViewPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterBringIntoViewPage , ObjectModelTestPage , ScrollPresenterChainingAndRailingPage , ParallaxViewTests , ItemsViewInteractiveTestsPage , ItemsViewBlankPage , ScrollPresenterZoomSnapPointsPage , ScrollViewDynamicPage , ScrollPresenterDynamicPage , ScrollPresenterManipulationModePage , ItemsViewSummaryPage , ScrollViewsWithSimpleContentsPage , SelectorBarSummaryPage , ScrollPresentersWithSimpleContentsPage , SwipeControlPage , ScrollPresenterRepeaterAnchoringPage , LinedFlowLayoutDemo , ScrollPresenterScrollSnapPointsPage
  • MUXControlsTestHooks_LoggingMessageForVisualStateChange() : ScrollViewTests
  • MuxRailModeToWuxRailMode() : ScrollViewDynamicPage
  • MuxScrollBarVisibilityToWuxScrollBarVisibility() : ScrollViewDynamicPage
  • MuxScrollModeToWuxScrollMode() : ScrollViewDynamicPage
  • MuxZoomModeToWuxZoomMode() : ScrollViewDynamicPage
  • myAcrylicBrush : AcrylicBrushBasicPage
  • MyCollection() : MyCollection
  • MyCommand() : MyCommand
  • MyData() : MyData
  • myDatas : TabViewTabItemsSourcePage
  • MyDataSource() : CollectionChangeDemo::MyDataSource
  • MyItemsRepeater() : MyItemsRepeater
  • myList : InspectingDataSourceTests::CustomEnumerable
  • MyRatingIsClearEnabled_ValueChanged() : RatingControlPage
  • MyRatingReadOnly_ValueChanged() : RatingControlPage
  • mySlider : SliderRefreshInfoProviderAdapter
  • myTimer : SliderRefreshInfoProviderAdapter
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- n -

  • Name : Square , TreeNode , GroupedListViewBaseGroupItem , RevealGridTypeItem , NamedGroup-g< T > , RecipeGroup , SelectionModeItem , Category , Item , BreadcrumbBarFolder , RevealThemeItem , TreeViewViewModelItem , XamlMember , Category , EffectBase , GroupedItemsControlGroupItem , EffectBase::NamedProperty , NavViewPageData , CustomProperty , Category , RevealBackgroundItem , Ingredient , PersonPicturePage::SportsGroup
  • NamedGroup() : NamedGroup-g< T >
  • NaN : DoubleUtil , FloatUtil
  • NarrowButton_Holding() : RevealStatesPage
  • NavigateToLocalImageTest() : WebView2Tests
  • NavigateToNewPageButton_Click() : CommonStylesPage
  • NavigateToPage() : NavigationViewAnimationPage
  • NavigateToString() : WebView2
  • NavigateToStringMessage() : WebView2Common
  • NavigateToStringTest() : WebView2Tests
  • NavigateToUri() : WebView2Common
  • NavigateToVideo() : WebView2BasicPage
  • NavigateToVideoTest() : WebView2Tests
  • NavigationCompleted() : WebView2Properties
  • NavigationErrorTest() : WebView2Tests
  • NavigationStarting() : WebView2Properties
  • NavigationStartingInvalidTest() : WebView2Tests
  • NavigationStartingTest() : WebView2Tests
  • NavigationView() : NavigationView
  • NavigationView_ItemInvoked() : NavigationViewIsPaneOpenPage , NavigationViewMenuItemsSourcePage , NavigationViewPageDataContext
  • NavigationViewAnimationPage() : NavigationViewAnimationPage
  • NavigationViewAutomationPeer() : NavigationViewAutomationPeer
  • NavigationViewAxeTestPage() : NavigationViewAxeTestPage
  • NavigationViewBlankPage1() : NavigationViewBlankPage1
  • NavigationViewCaseBundle() : NavigationViewCaseBundle
  • NavigationViewCompactPaneLengthTestPage() : NavigationViewCompactPaneLengthTestPage
  • NavigationViewCustomMenuItemPage() : NavigationViewCustomMenuItemPage
  • NavigationViewCustomThemeResourcesPage() : NavigationViewCustomThemeResourcesPage
  • NavigationViewDensityChange() : CommonTests
  • NavigationViewInfoBadgeTestPage() : NavigationViewInfoBadgeTestPage
  • NavigationViewInitPage() : NavigationViewInitPage
  • NavigationViewIsPaneOpenPage() : NavigationViewIsPaneOpenPage
  • NavigationViewItemAutomationPeer() : NavigationViewItemAutomationPeer
  • NavigationViewItemBase() : NavigationViewItemBase
  • NavigationViewItemBaseOrSettingsContentFromData() : NavigationView
  • NavigationViewItemBaseProperties() : NavigationViewItemBaseProperties
  • NavigationViewItemCollapsedEventArgs() : NavigationViewItemCollapsedEventArgs
  • NavigationViewItemExpandingEventArgs() : NavigationViewItemExpandingEventArgs
  • NavigationViewItemHelper() : NavigationViewItemHelper< T >
  • NavigationViewItemOrSettingsContentFromData() : NavigationView
  • navigationViewItemPool : NavigationViewItemsFactory
  • NavigationViewItemPresenter() : NavigationViewItemPresenter
  • NavigationViewItemPresenterProperties() : NavigationViewItemPresenterProperties
  • NavigationViewItemPresenterTemplateSettingsProperties() : NavigationViewItemPresenterTemplateSettingsProperties
  • NavigationViewItemProperties() : NavigationViewItemProperties
  • NavigationViewItemTemplatePage() : NavigationViewItemTemplatePage
  • NavigationViewMenuItemsSourcePage() : NavigationViewMenuItemsSourcePage
  • NavigationViewMenuItemStretchPage() : NavigationViewMenuItemStretchPage
  • NavigationViewMinimalPage() : NavigationViewMinimalPage
  • NavigationViewPage() : NavigationViewPage
  • NavigationViewPage_Loaded() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • NavigationViewPage_Unloaded() : NavigationViewPage
  • NavigationViewPageDataContext() : NavigationViewPageDataContext
  • NavigationViewProperties() : NavigationViewProperties
  • NavigationViewRS3Page() : NavigationViewRS3Page
  • NavigationViewRS4Page() : NavigationViewRS4Page
  • NavigationViewRS4Page_Loaded() : NavigationViewRS4Page
  • NavigationViewSelectedItemEdgeCasePage() : NavigationViewSelectedItemEdgeCasePage
  • NavigationViewStretchPage() : NavigationViewStretchPage
  • NavigationViewTemplateSettingsProperties() : NavigationViewTemplateSettingsProperties
  • NavigationViewTopNavOnlyPage() : NavigationViewTopNavOnlyPage
  • NavigationViewTopNavOverflowButtonPage() : NavigationViewTopNavOverflowButtonPage
  • NavigationViewTopNavPage() : NavigationViewTopNavPage
  • NavigationViewTopNavPage_Loaded() : NavigationViewTopNavPage
  • NavigationViewTopNavStorePage() : NavigationViewTopNavStorePage
  • NavInvalidateMeasure_Click() : NavigationViewTopNavOnlyPage
  • NavView2_ItemInvoked() : NavigationViewInitPage
  • NavView_BackRequested() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_DisplayModeChanged() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_ItemInvoked() : NavigationViewCompactPaneLengthTestPage , NavigationViewInitPage , NavigationViewPage , NavigationViewItemTemplatePage , NavigationViewTopNavOnlyPage
  • NavView_OnItemInvoked() : NavigationViewAnimationPage
  • NavView_PaneClosed() : NavigationViewPage , HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_PaneClosing() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_PaneOpened() : NavigationViewPage , HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_PaneOpening() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_SelectionChanged() : NavigationViewPageDataContext , NavigationViewSelectedItemEdgeCasePage , NavigationViewItemTemplatePage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage , NavigationViewInitPage , NavigationViewPage
  • NavViewPageData() : NavViewPageData
  • NbItemsWrapGridMaximumRowsOrColumns_ValueChanged() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • NeedRearrangeOfTopElementsAfterOverflowSelectionChanged() : NavigationView
  • NeedTopPaddingForRS5OrHigher() : NavigationView
  • NegativeContentHeight() : ExpanderTemplateSettingsProperties
  • NegativeContentHeightProperty() : ExpanderTemplateSettingsProperties
  • NestedGridViewsPage() : NestedGridViewsPage
  • NestedItemsControlsPage() : NestedItemsControlsPage
  • NestedItemsControlsPage_Loaded() : NestedItemsControlsPage
  • NestedListViewsPage() : NestedListViewsPage
  • NestedListViewsPage_Loaded() : NestedListViewsPage
  • NestedRepeaterWithDataTemplateScenario() : RepeaterTests
  • nestingLevel : CustomContent
  • NewBounds() : ItemCollectionTransition
  • NewColor() : ColorChangedEventArgs
  • NewCount : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , ScrollPresenterStackPanelAnchoringPage::QueuedOperation
  • NewIndex : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , ScrollPresenterStackPanelAnchoringPage::QueuedOperation , ItemsRepeaterElementIndexChangedEventArgs
  • NewItem_Click() : MenuBarPage
  • NewPageIndex() : PagerControlSelectedIndexChangedEventArgs
  • NewParentItem() : TreeViewDragItemsCompletedEventArgs
  • NewPerson() : CircleLayoutSamplePage
  • NewState() : RefreshStateChangedEventArgs
  • NewValue() : NumberBoxValueChangedEventArgs
  • NewWindowId() : TabViewTabTearOutWindowRequestedEventArgs , TabViewTabTearOutRequestedEventArgs
  • NewWindowRootPage() : NewWindowRootPage
  • NextButtonClicked() : PagerControl
  • NextButtonCommand() : PagerControlProperties
  • NextButtonCommandProperty() : PagerControlProperties
  • NextButtonStyle() : PagerControlProperties , PipsPagerProperties
  • NextButtonStyleProperty() : PagerControlProperties , PipsPagerProperties
  • NextButtonVisibility() : PipsPagerProperties , PagerControlProperties , PipsPagerProperties
  • NextButtonVisibilityProperty() : PagerControlProperties , PipsPagerProperties
  • nextIndex : HierarchicalNavigationViewDataBinding
  • NextPageButton : PagerControlTestPageElements , PipsPagerElements
  • nextPageButton : PagerControlPage , PipsPagerPage
  • NextPageButtonChangingPageTest() : PagerControlTests , PipsPagerTests
  • NextPageButtonIsEnabledCheckBox : PagerControlTestPageElements , PipsPagerElements
  • NextPageButtonIsVisibleCheckBox : PipsPagerElements
  • NextPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • NextPageButtonVisibilityComboBox : PagerControlTestPageElements , PipsPagerElements
  • NextPageButtonVisibilityOptionsTest() : PipsPagerTests , PagerControlTests
  • Node : SelectedItemInfo , SelectionTreeHelper::TreeWalkNodeInfo , TreeViewCollapsedEventArgs , TreeViewExpandingEventArgs , TreeViewCollapsedEventArgs
  • NodeAtFlatIndex() : TreeViewList
  • NodeCollapsed() : ViewModel
  • NodeExpanding() : ViewModel
  • NodeFromContainer() : TreeView , TreeViewList
  • NodeFromItem() : TreeViewList
  • NodeSelectionState() : ViewModel
  • NoFallbackRating_Loaded() : RatingControlPage
  • NoIconDoesNotCrash() : TeachingTipTests
  • NoIndicatorStateCount : ScrollViewVisualStateCounts
  • NoInteractionTest() : BreadcrumbTests
  • NoiseBrush() : AcrylicTestApi , RevealBrushTestApi
  • NoiseChanged() : MaterialHelper
  • NonAsciiUriTest() : WebView2Tests
  • NonDelegatingAddRef() : ElementFactory
  • NonDelegatingQueryInterface() : ElementFactory , ReferenceTracker< D, ImplT, I >
  • NonDelegatingRelease() : ElementFactory
  • NonVirtualizingLayout() : NonVirtualizingLayout
  • NonVirtualStackLayoutSamplePage() : NonVirtualStackLayoutSamplePage
  • NormalPipStyle() : PipsPagerProperties
  • NormalPipStyleProperty() : PipsPagerProperties
  • NotificationsTestButton_Click() : RevealStatesPage
  • NotifyAnchorEvaluated() : ScrollPresenterTestHooks
  • NotifyBuildTreeCompleted() : RepeaterTestHooks , MUXControlsTestHooks
  • NotifyBuildTreeCompletedImpl() : RepeaterTestHooks , MUXControlsTestHooks
  • NotifyContainerOfSelectionChange() : ViewModel
  • NotifyContentLayoutOffsetXChanged() : ScrollPresenterTestHooks
  • NotifyContentLayoutOffsetYChanged() : ScrollPresenterTestHooks
  • NotifyEffectiveHeroContentPlacementChanged() : TeachingTipTestHooks
  • NotifyEffectivePlacementChanged() : TeachingTipTestHooks
  • NotifyExpressionAnimationStatusChanged() : ScrollPresenterTestHooks
  • NotifyIdleStatusChanged() : SwipeTestHooks , TeachingTipTestHooks
  • NotifyInteractionSourcesChanged() : ScrollPresenterTestHooks
  • NotifyKeyboardNavigationReferenceOffsetChanged() : ItemsViewTestHooks
  • NotifyLastAnimationSegmentChanged() : AnimatedIconTestHooks
  • NotifyLastInteractedWithSwipeControlChanged() : SwipeTestHooks
  • NotifyLayoutChanged() : RadioButtonsTestHooks
  • NotifyLinedFlowLayoutInvalidated() : LayoutsTestHooks
  • NotifyLinedFlowLayoutInvalidatedDbg() : LinedFlowLayout
  • NotifyLinedFlowLayoutItemLocked() : LayoutsTestHooks
  • NotifyLinedFlowLayoutItemLockedDbg() : LinedFlowLayout
  • NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged() : LayoutsTestHooks
  • NotifyOffsetChanged() : TeachingTipTestHooks
  • NotifyOpenedStatusChanged() : SwipeTestHooks , TeachingTipTestHooks
  • NotifyPropertyChanged() : TreeViewItemSource , TreeViewLateDataInitTest , TeachingTipPage , NavigationViewPageDataContext
  • NotifyRequestedScrollCompleted() : CompositionScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController , BiDirectionalScrollController::UniScrollController
  • NotifySubtitleVisibilityChanged() : TeachingTipTestHooks
  • NotifyTitleVisibilityChanged() : TeachingTipTestHooks
  • NotifyTransitionCompleted() : ItemCollectionTransitionProvider
  • NoTrackRef : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • NullableXamlType() : NullableXamlType
  • NullContentDoesNotCrash() : RefreshVisualizerTests
  • NullInfoProviderDoesNotCrash() : RefreshVisualizerTests
  • nullptr : RoutedEventHandler_revoker
  • NullSelector() : NullSelector
  • Number : DataItem
  • number : MyData
  • Number : DisposableUserControl
  • NumberBox() : NumberBox
  • NumberBoxAutomationPeer() : NumberBoxAutomationPeer
  • NumberBoxAxeTestPage() : NumberBoxAxeTestPage
  • NumberBoxDisplayChangingPageTest() : PagerControlTests
  • NumberBoxInfinityModeTest() : PagerControlTests
  • NumberBoxIsEnabledCheckBox : PagerControlTestPageElements
  • NumberBoxPage() : NumberBoxPage
  • NumberBoxProperties() : NumberBoxProperties
  • NumberBoxValueChanged() : NumberBoxPage , PagerControl
  • NumberBoxValueChangedEventArgs() : NumberBoxValueChangedEventArgs
  • NumberBoxVisibilityCheckBox : PagerControlTestPageElements
  • NumberFormatter() : NumberBoxProperties
  • NumberFormatterProperty() : NumberBoxProperties
  • NumberOfItemsTextBlock : RadioButtonsTestPageElements
  • NumberOfPages() : PipsPagerProperties , PagerControlProperties , PipsPagerProperties
  • NumberOfPagesComboBox : PipsPagerElements
  • NumberOfPagesInfinityButtonClicked() : PagerControlPage
  • NumberOfPagesOptions : PipsPagerTestBase
  • NumberOfPagesProperty() : PipsPagerProperties , PagerControlProperties
  • NumberOfPagesSetterButton : PagerControlTestPageElements
  • NumberOfPagesSetterButtonClicked() : PagerControlPage
  • NumberOfPagesTextBlock : PagerControlTestPageElements
  • NumberPanelChangingPageTest() : PagerControlTests
  • NumberPanelChangingPageTest2() : PagerControlTests
  • NumberPanelContentTextBlock : PagerControlTestPageElements
  • NumberPanelInfiniteItemsTest() : PagerControlTests
  • NumberPanelItems() : PagerControlTemplateSettingsProperties
  • NumberPanelItemsProperty() : PagerControlTemplateSettingsProperties
  • NumberPanelVisibilityCheckBox : PagerControlTestPageElements
  • NumberProperty : DisposableUserControl
  • Numbers : ListViewElementNameBindingPage , ItemTemplateDemo
  • NumLevels : PageInfo
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- o -

  • ObjectModelTestPage() : ObjectModelTestPage
  • objects : ScrollViewerAdapterPage
  • Observable : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • ObservableVectorInnerImpl() : ObservableVectorInnerImpl< VectorOptions, Wrapper >
  • ObservableVectorWithUniqueIds() : InspectingDataSourceTests::ObservableVectorWithUniqueIds
  • Off : RevealHoverLight
  • Offset() : IArithmeticCompositeEffect , ScrollControllerScrollToRequestedEventArgs , RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • offset : CompositionScrollController
  • Offset : BiDirectionalScrollController::UniScrollController
  • OffsetChangeAnimationType : CompositionScrollController
  • OffsetChangeCompleted : CompositionScrollController
  • OffsetChangeCorrelationId : BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs , CompositionScrollControllerOffsetChangeCompletedEventArgs
  • OffsetChanged() : TeachingTipTestHooks
  • offsetCoordinateTolerance : RevealStatesPage
  • OffsetDelta() : ScrollControllerScrollByRequestedEventArgs
  • OffsetJumpAfterContentResizing() : ScrollPresenterTests
  • offsetPropertyName : CompositionScrollControllerPanningInfo
  • OffsetsChange() : OffsetsChange
  • OffsetsChangeCorrelationId : BiDirectionalScrollControllerScrollingScrollCompletedEventArgs , ScrollingBringingIntoViewEventArgs , ScrollingScrollCompletedEventArgs
  • OffsetsChangeWithAdditionalVelocity() : OffsetsChangeWithAdditionalVelocity
  • OffsetsChangeWithCustomDuration() : ScrollPresenterTests
  • OffsetsChangeWithNoContent() : ScrollPresenterTests
  • OffsetsVelocity() : OffsetsChangeWithAdditionalVelocity
  • OffsetTarget : BiDirectionalScrollController::OperationInfo , BiDirectionalScrollController , CompositionScrollController::OperationInfo
  • offsetTarget : CompositionScrollController
  • OffsetVector2Animation() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • OffsetVector2Animation_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OffsetVector2Animation_00() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_01() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_02() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_03() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_04() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_05() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_06() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_07() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_08() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_09() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OffsetVector2Animation_10() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVelocity() : ScrollControllerAddScrollVelocityRequestedEventArgs
  • OffsetX() : ItemsRepeaterScrollHost::BringIntoViewState
  • OffsetY() : ItemsRepeaterScrollHost::BringIntoViewState
  • OffTreeWebViewInputTest() : WebView2Tests
  • OldBounds() : ItemCollectionTransition
  • OldColor() : ColorChangedEventArgs
  • OldCount : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , ScrollPresenterStackPanelAnchoringPage::QueuedOperation
  • OldIndex : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , ScrollPresenterStackPanelAnchoringPage::QueuedOperation , ItemsRepeaterElementIndexChangedEventArgs
  • OldState() : RefreshStateChangedEventArgs
  • OldValue() : NumberBoxValueChangedEventArgs
  • OnAccessKeyInvoked() : BreadcrumbBar , NavigationView , RadioButtons
  • OnActionButtonClicked() : TeachingTip
  • OnActionButtonCommandParameterPropertyChanged() : TeachingTipProperties
  • OnActionButtonCommandPropertyChanged() : TeachingTipProperties
  • OnActionButtonContentPropertyChanged() : TeachingTipProperties
  • OnActionButtonPropertyChanged() : InfoBarProperties , InfoBar
  • OnActionButtonStylePropertyChanged() : TeachingTipProperties
  • OnActualLineHeightPropertyChanged() : LinedFlowLayoutProperties
  • OnAdd_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnAddButtonClick() : ItemsViewTransitionPage , TabView
  • OnAddButtonKeyDown() : TabView
  • OnAddRecipeButton_Click() : BasicDemo
  • OnAddScrollVelocityRequested() : CanvasScrollControllerConsumer
  • OnAddWebviewButtonClicked() : WebView2BasicPage
  • OnAlphaSliderBackgroundRectangleSizeChanged() : ColorPicker
  • OnAlphaSliderValueChanged() : ColorPicker
  • OnAlphaTextChanging() : ColorPicker
  • OnAlwaysShowHeaderPropertyChanged() : NavigationViewProperties
  • OnAlwaysUseFallbackPropertyChanged() : AcrylicBrushProperties , RevealBrushProperties
  • OnAncestorAnimatedIconStatePropertyChanged() : AnimatedIcon
  • OnAnimatedIconStatePropertyChanged() : AnimatedIcon
  • OnAnimationComplete() : NavigationView
  • OnAnimationCompleted() : AnimatedIcon
  • OnAnimationOptimizationPropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnApplyTemplate() : NumberBox , PagerControl , PersonPicture , PipsPager , ProgressBar , ProgressRing , RefreshContainer , RefreshVisualizer , RadioButtons , RatingControl , BiDirectionalScrollController , CompositionScrollController , ScrollView , SelectorBar , SelectorBarItem , SplitButton , ToggleSplitButton , SwipeControl , TabView , TabViewItem , TeachingTip , TitleBar , TreeView , TreeViewItem , TreeViewList , TwoPaneView , AnimatedIcon , AnimatedIconHost , ToggleAnimatedIconHost , AnnotatedScrollBar , BreadcrumbBar , BreadcrumbBarItem , ColorPicker , ColorPickerSlider , ColorSpectrum , MyColorSpectrum , CommandBarFlyoutCommandBar , DropDownButton , Expander , ImageIcon , InfoBadge , InfoBar , ItemContainer , ItemsView , MapControl , MenuBar , MenuBarItem , NavigationView , NavigationViewItem , NavigationViewItemBase , NavigationViewItemHeader , NavigationViewItemPresenter , NavigationViewItemSeparator
  • OnAppWindowPositionChanged() : WebView2
  • OnAreCheckStatesEnabledPropertyChanged() : RadioMenuFlyoutItem
  • OnAttachedFunc : FlowLayoutDerived
  • OnAutoHideScrollBarsChanged() : ScrollView
  • OnAutomationIdChanged() : TeachingTip
  • OnAutomationNameChanged() : TeachingTip
  • OnAutomationPropertiesLabeledByPropertyChanged() : NumberBox
  • OnAutomationPropertiesNamePropertyChanged() : NumberBox
  • OnAutoPlayPropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnAutoSuggestBoxLoaded() : AutoSuggestBoxHelper
  • OnAutoSuggestBoxPropertyChanged() : NavigationViewProperties
  • OnAutoSuggestBoxQuerySubmitted() : NavigationView
  • OnBackButtonClick() : TitleBar
  • OnBackButtonClicked() : NavigationView
  • OnBackClicked() : FlatSample , GroupedSample , TreeViewSample
  • OnBackgroundColorButtonClick() : RevealBasicPage , RevealListPage
  • OnBackgroundColorPropertyChanged() : ProgressRing
  • OnBackgroundPropertyChanged() : ScrollPresenterProperties , SwipeItemProperties , ProgressRing
  • OnBad_Source_Browser_ButtonClicked() : WebView2CoreObjectsPage
  • OnBad_Source_Render_ButtonClicked() : WebView2CoreObjectsPage
  • OnBadgeGlyphPropertyChanged() : PersonPictureProperties
  • OnBadgeImageSourcePropertyChanged() : PersonPictureProperties
  • OnBadgeNumberPropertyChanged() : PersonPictureProperties
  • OnBadgeTextPropertyChanged() : PersonPictureProperties
  • OnBadSourceButtonClickedHelper() : WebView2CoreObjectsPage
  • OnBeginMeasure() : final
  • OnBehaviorOnInvokedPropertyChanged() : SwipeItemProperties
  • OnBindableVectorChanged() : InspectingDataSource
  • OnBorderBrushPropertyChanged() : LayoutPanelProperties
  • OnBorderColorButtonClick() : RevealListPage
  • OnBorderThicknessPropertyChanged() : LayoutPanelProperties
  • OnBottomItemsChanged() : SwipeControl
  • OnBottomItemsCollectionChanged() : SwipeControl
  • OnBottomItemsPropertyChanged() : SwipeControlProperties
  • OnBreadcrumbBarItemClick() : BreadcrumbBarItem
  • OnBreadcrumbBarItemsRepeaterLoaded() : BreadcrumbBar
  • OnBreadcrumbBarItemsSourceCollectionChanged() : BreadcrumbBar
  • OnBringIntoViewRequested() : ItemsRepeater , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnBringIntoViewRequestedHandler() : ScrollPresenter
  • OnBringTargetIntoViewButtonClicked() : TeachingTipPage
  • OnButtonEnabledChanged() : PipsPagerPage
  • OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged() : PagerControlProperties
  • OnButtonVisibilityChanged() : PagerControl
  • OnCacheBuildActionCompleted() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnCanGoBackPropertyChanged() : WebView2Properties
  • OnCanGoForwardPropertyChanged() : WebView2Properties
  • OnCanScrollChanged() : CanvasScrollControllerConsumer
  • OnCanTearOutTabsPropertyChanged() : TabViewProperties , TabView
  • OnCanUserInvokePropertyChanged() : ItemContainerProperties
  • OnCanUserSelectPropertyChanged() : ItemContainerProperties
  • OnCaptionChanged() : RatingControl
  • OnCaptionPropertyChanged() : RatingControlProperties
  • OnCaptionSizeChanged() : RatingControl
  • OnCenterPropertyChanged() : MapControlProperties , RadialGradientBrushProperties , RadialGradientBrush
  • OnChangeDefaultPositionClick() : RevealBasicPage
  • OnCheckBrushResourcesClicked() : RevealColorPage
  • OnCheckedIsSettingsVisible() : HierarchicalNavigationViewMarkup
  • OnCheckerColorChanged() : ColorPicker
  • OnCheckToggle() : ItemContainer , TreeViewItem
  • OnChildChecked() : RadioButtons
  • OnChildPreviewKeyDown() : BreadcrumbBar , BreadcrumbBarItem , RadioButtons
  • OnChildPropertyChanged() : ItemContainerProperties , ParallaxViewProperties , ParallaxView
  • OnChildUnchecked() : RadioButtons
  • OnClear() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnClearClipboardContentsClicked() : ExtraCommandBarFlyoutPage , TextCommandBarFlyoutPage
  • OnClearForegroundButtonClicked() : InfoBadgePage
  • OnClearHistoryButtonClick() : ItemsViewTransitionPage
  • OnClickEvent() : BreadcrumbBarItem
  • OnClickPrimary() : SplitButton , ToggleSplitButton
  • OnClickSecondary() : SplitButton
  • OnClipboardContentChanged() : TextCommandBarFlyoutPage
  • OnClose_ConcurrentCreationElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnClose_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnClose_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnClose_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCloseButtonClick() : InfoBar , InfoBarPage , TabViewItem
  • OnCloseButtonClicked() : TeachingTip , TeachingTipPage
  • OnCloseButtonCommandParameterPropertyChanged() : TeachingTipProperties
  • OnCloseButtonCommandPropertyChanged() : TeachingTipProperties
  • OnCloseButtonContentPropertyChanged() : TeachingTipProperties
  • OnCloseButtonOverlayModeChanged() : TabViewItem
  • OnCloseButtonOverlayModePropertyChanged() : TabViewProperties , TabView
  • OnCloseButtonStylePropertyChanged() : TeachingTipProperties
  • OnClosed() : InfoBarPage
  • OnClosing() : InfoBarPage
  • OnCollectionChanged() : ReadOnlyNotifyPropertyChangedCollection-g< T > , InspectingDataSource , DelegatingItemsSource , PersonDataSource
  • OnColorChanged() : ColorPicker , ColorSpectrum , RevealBrush
  • OnColorPreviewRectangleGridSizeChanged() : ColorPicker
  • OnColorPropertyChanged() : ColorPickerProperties , ColorSpectrumProperties , RevealBrushProperties , XamlAmbientLightProperties , XamlAmbientLight
  • OnColorRepresentationComboBoxSelectionChanged() : ColorPicker
  • OnColorSpectrumColorChanged() : ColorPicker
  • OnColorSpectrumComponentsChanged() : ColorPicker
  • OnColorSpectrumComponentsPropertyChanged() : ColorPickerProperties
  • OnColorSpectrumShapePropertyChanged() : ColorPickerProperties
  • OnColorSpectrumSizeChanged() : ColorPicker
  • OnColorValuesChanged() : RevealSimpleListPage
  • OnColumnSpacingPropertyChanged() : ColumnMajorUniformToLargestGridLayoutProperties , ColumnMajorUniformToLargestGridLayout
  • OnColumnSpacingSliderValueChanged() : ItemsViewWithDataPage
  • OnCommandBarElementDependencyPropertyChanged() : CommandBarFlyout , CommandBarFlyoutCommandBar
  • OnCommandBarFlyoutTestsClicked() : CommandBarFlyoutMainPage
  • OnCommandChanged() : SwipeItem
  • OnCommandParameterPropertyChanged() : SplitButtonProperties , SwipeItemProperties
  • OnCommandPropertyChanged() : SplitButtonProperties , SwipeItemProperties
  • OnCompactModeThresholdWidthPropertyChanged() : NavigationViewProperties
  • OnCompactPaneLengthPropertyChanged() : NavigationViewProperties
  • OnComponentsChanged() : ColorSpectrum
  • OnComponentsPropertyChanged() : ColorSpectrumProperties
  • OnCompositionCapabilitiesChanged() : MaterialHelper
  • OnCompositionTargetRendering() : ItemsView , ScrollInputHelper , ViewportManagerWithPlatformFeatures , ScrollPresenter , ScrollView
  • OnComputedHorizontalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnComputedHorizontalScrollModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnComputedVerticalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnComputedVerticalScrollModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnConfigurationChanged() : ViewportManagerDownLevel
  • OnConnected() : SpectrumBrush , RevealBorderLight , RevealHoverLight , XamlAmbientLight , AcrylicBrush , RevealBrush , RadialGradientBrush
  • OnContactChanged() : PersonPicture
  • OnContactPropertyChanged() : PersonPictureProperties
  • OnContainerContentChanging() : TabViewListView , TreeView , TreeViewList
  • OnContentChanged() : NavigationViewItem , NavigationViewItemBase , RefreshVisualizer , TeachingTip
  • OnContentChangedImpl() : RefreshVisualizer
  • OnContentLayoutOffsetChanged() : ScrollPresenter
  • OnContentOrientationPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnContentPropertyChanged() : RefreshVisualizerProperties , ScrollPresenterProperties , ScrollViewProperties , TitleBarProperties , ScrollPresenter
  • OnContentSizeChanged() : Expander , ScrollPresenter , TeachingTip
  • OnControlTypePropertyChanged() : CommandBarFlyoutCommandBarAutomationProperties
  • OnCoreProcessFailed() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnCoreWebView2Initialized() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnCoreWebView2Initialized_Ensure() : WebView2CoreObjectsPage
  • OnCoreWebView2Initialized_Source() : WebView2CoreObjectsPage
  • OnCornerRadiusPropertyChanged() : LayoutPanelProperties
  • OnCountPopupsClicked() : ExtraCommandBarFlyoutPage
  • OnCreate_ConcurrentCreationElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_CoreProcessFailed_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_MarkupElement_Blank_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_MarkupElement_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreateAutomationPeer() : AnimatedVisualPlayer , BreadcrumbBarItem , ColorPickerSlider , ColorSpectrum , DropDownButton , Expander , TestControl , InfoBar , InkCanvas , TargetElement , ItemContainer , ItemsView , AcrylicBrushPage , MenuBar , MenuBarItem , NavigationView , NavigationViewItem , NavigationViewItemBase , NumberBox , PagerControl , PersonPicture , PipsPager , ProgressBar , ProgressRing , RadioButtons , RatingControl , ItemsRepeater , SelectionContainer , RepeaterItem , GroupedRepeaterItem , TreeViewItem , ScrollPresenter , SelectorBarItem , SplitButton , ToggleSplitButton , TabView , TabViewItem , TeachingTip , TitleBar , TreeViewItem , TreeViewList , WebView2
  • OnCreateItemAutomationPeer() : TreeViewListAutomationPeer
  • OnCtrlF4Invoked() : TabView
  • OnCtrlShiftTabInvoked() : TabView
  • OnCtrlTabInvoked() : TabView
  • OnCurrentElementSelectionModelSelectionChanged() : ItemsView
  • OnCurrentItemIndexPropertyChanged() : ItemsViewProperties
  • OnCurrentThemeChanged() : RevealScenarioLights
  • OnDataSourceChanged() : TopNavigationViewDataProvider
  • OnDataSourcePropertyChanged() : ItemsRepeater
  • OnDecrementRepeatButtonClick() : AnnotatedScrollBar
  • OnDefaultBackgroundColorPropertyChanged() : WebView2Properties
  • OnDeleteButtonClick() : ItemsViewTransitionPage
  • OnDetailLabelTemplatePropertyChanged() : AnnotatedScrollBarProperties
  • OnDetailLabelToolTipOpened() : AnnotatedScrollBar
  • OnDetatchedFunc : FlowLayoutDerived
  • OnDeterminateSourcePropertyChanged() : ProgressRingProperties , ProgressRing
  • OnDisconnected() : SpectrumBrush , RevealBorderLight , RevealHoverLight , XamlAmbientLight , AcrylicBrush , RevealBrush , RadialGradientBrush
  • OnDisplayKindPropertiesChanged() : InfoBadge
  • OnDisplayModeChanged() : PagerControl , PagerControlPage , DisplayRegionHelper
  • OnDisplayModePropertyChanged() : NavigationViewProperties , PagerControlProperties
  • OnDisplayNameChanged() : PersonPicture
  • OnDisplayNamePropertyChanged() : PersonPictureProperties
  • OnDoubleTapped() : ItemContainer
  • OnDpiChanged() : MaterialHelper
  • OnDragEnter() : TreeViewItem , TreeViewList , WebView2
  • OnDragItemsCompleted() : TreeViewList
  • OnDragItemsStarting() : TreeViewList
  • OnDragLeave() : TreeViewItem , TreeViewList , WebView2
  • OnDragOver() : TreeViewItem , TreeViewList , WebView2
  • OnDrop() : TreeViewItem , TreeViewList , WebView2
  • OnDropDownClosed() : ComboBoxHelper
  • OnDropDownOpened() : ComboBoxHelper
  • OnEditCommandCount6Click() : CommandBarFlyoutPage
  • OnEffectiveViewportChanged() : ViewportManagerWithPlatformFeatures
  • OnElementBoundsChanged() : final
  • OnElementChecked() : CommandBarFlyoutPage
  • OnElementCleared() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnElementClearing() : ItemsRepeater
  • OnElementClearingEvent() : BreadcrumbBar
  • OnElementClicked() : CommandBarFlyoutPage
  • OnElementIndexChanged() : PipsPager , ItemsRepeater , TreeViewSample
  • OnElementIndexChangedEvent() : BreadcrumbBar
  • OnElementMeasured() : FlowLayoutDerived , FlowLayout , StackLayout , StackLayoutState
  • OnElementMeasuredFunc : FlowLayoutDerived
  • OnElementPrepared() : PipsPager , ItemsRepeater , ScaleAnimatedVerticalListDemo , final , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnElementPreparedEvent() : BreadcrumbBar
  • OnElementUnchecked() : CommandBarFlyoutPage
  • OnEllipsisItemClick() : BreadcrumbBarItem
  • OneMoreListViewItem_Holding() : RevealStatesPage
  • OnEnergySaverStatusChanged() : MaterialHelper
  • OnEnsure_Ensure_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsure_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCoreWebView2_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCoreWebView2_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCoreWebView2_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCWV2ButtonClicked() : WebView2BasicPage
  • OnEnteredMoveSize() : TabView
  • OnEnteringMoveSize() : TabView
  • OneSideCheckBox_Checked() : TwoPaneViewPage
  • OneSideCheckBox_Unchecked() : TwoPaneViewPage
  • OnExistingItemTapped() : CircleLayoutSamplePage
  • OnExitedMoveSize() : TabView
  • OnExpandCollapseChevronPointerCanceled() : NavigationViewItemPresenter
  • OnExpandCollapseChevronPointerCaptureLost() : NavigationViewItemPresenter
  • OnExpandCollapseChevronPointerExited() : NavigationViewItemPresenter
  • OnExpandCollapseChevronPointerPressed() : NavigationViewItemPresenter , TreeViewItem
  • OnExpandCollapseChevronPointerReleased() : NavigationViewItem , NavigationViewItemPresenter
  • OnExpandContentTimerTick() : TreeViewItem
  • OnExpandDirectionPropertyChanged() : Expander , ExpanderProperties
  • OnExpandedModeThresholdWidthPropertyChanged() : NavigationViewProperties
  • OnExternalTornOutTabsDropped() : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • OnExternalTornOutTabsDropping() : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • OnExtraCommandBarFlyoutTestsClicked() : CommandBarFlyoutMainPage
  • OnF6AcceleratorKeyClicked() : TeachingTip
  • OnF6PopupPreviewKeyDownClicked() : TeachingTip
  • OnF6PreviewKeyDownClicked() : TeachingTip
  • OnFallbackColorChanged() : AcrylicBrush , RevealBrush , RadialGradientBrush
  • OnFallbackContentPropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnFallbackIconSourcePropertyChanged() : AnimatedIcon , AnimatedIconProperties
  • OnFirstButtonCommandPropertyChanged() : PagerControlProperties
  • OnFirstButtonStylePropertyChanged() : PagerControlProperties
  • OnFirstButtonVisibilityChanged() : PagerControlPage
  • OnFirstButtonVisibilityPropertyChanged() : PagerControlProperties
  • OnFlowDirectionChanged() : BreadcrumbBar , BreadcrumbBarItem , ScrollPresenter
  • OnFlowDirectionPropertyChanged() : AnimatedIcon
  • OnFlyoutChanged() : SplitButton
  • OnFlyoutClosed() : CommandBarFlyoutPage , DropDownButton , MenuBarItem , SplitButton
  • OnFlyoutClosing() : NavigationView , NavigationViewItem
  • OnFlyoutElementIndexChangedEvent() : BreadcrumbBarItem
  • OnFlyoutElementPreparedEvent() : BreadcrumbBarItem
  • OnFlyoutOpened() : CommandBarFlyoutPage , DropDownButton , SplitButton
  • OnFlyoutOpening() : MenuBarItem
  • OnFlyoutPlacementChanged() : SplitButton
  • OnFlyoutPropertyChanged() : DropDownButton , SplitButtonProperties
  • OnFlyoutTarget10Click() : CommandBarFlyoutPage
  • OnFlyoutTarget11Click() : CommandBarFlyoutPage
  • OnFlyoutTarget12Click() : CommandBarFlyoutPage
  • OnFlyoutTarget13Click() : CommandBarFlyoutPage
  • OnFlyoutTarget14Click() : CommandBarFlyoutPage
  • OnFlyoutTarget15Click() : CommandBarFlyoutPage
  • OnFlyoutTarget16Click() : CommandBarFlyoutPage
  • OnFlyoutTarget1Click() : CommandBarFlyoutPage
  • OnFlyoutTarget2Click() : CommandBarFlyoutPage
  • OnFlyoutTarget3Click() : CommandBarFlyoutPage
  • OnFlyoutTarget4Click() : CommandBarFlyoutPage
  • OnFlyoutTarget5Click() : CommandBarFlyoutPage
  • OnFlyoutTarget6Click() : CommandBarFlyoutPage
  • OnFlyoutTarget7Click() : CommandBarFlyoutPage
  • OnFlyoutTarget8Click() : CommandBarFlyoutPage
  • OnFlyoutTarget9Click() : CommandBarFlyoutPage
  • OnFocusChanged() : final
  • OnFocusDisengaged() : RatingControl
  • OnFocusedAction() : ExtendedSelector , MultipleSelector , SelectorBase , SingleSelector
  • OnFocusEngaged() : RatingControl
  • OnFontFamilyChanged() : RatingControl
  • OnFooterItemsSourceCollectionChanged() : NavigationView
  • OnFooterMenuItemsPropertyChanged() : NavigationViewProperties
  • OnFooterMenuItemsSourcePropertyChanged() : NavigationViewProperties
  • OnFooterPropertyChanged() : TitleBarProperties
  • OnForegroundBrushColorPropertyChanged() : AnimatedIcon
  • OnForegroundChanged() : InfoBar
  • OnForegroundColorPropertyChanged() : ProgressRing
  • OnForegroundPropertyChanged() : AnimatedIcon , SwipeItemProperties , ProgressRing , TabViewItem
  • OnForegroundToNullButtonClicked() : InfoBadgePage
  • OnGetDocumentTitleButtonClicked() : WebView2BasicPage
  • OnGetPipsPagerButtonSizesClicked() : PipsPagerPage
  • OnGetRichEditBoxRtfContentClicked() : TextCommandBarFlyoutPage
  • OnGetTargetBoundsButtonClicked() : TeachingTipPage
  • OnGettingFocus() : BreadcrumbBar , RadioButtons
  • OnGoBackButtonClicked() : WebView2BasicPage
  • OnGoForwardButtonClicked() : WebView2BasicPage
  • OnGood_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnGotFocus() : ColorPickerSlider , ColorSpectrum , NavigationViewItem , NavigationViewItemBase , PipsPager , ScrollView , SelectorBar
  • OnGradientOriginPropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnGradientStopsVectorChanged() : RadialGradientBrush
  • OnGroupedClicked() : FlatSample
  • OnGroupNamePropertyChanged() : RadioMenuFlyoutItemProperties
  • OnHasChildrenPropertyChanged() : TreeViewNodeProperties
  • OnHasUnrealizedChildrenPropertyChanged() : NavigationViewItemProperties , TreeViewItemProperties , NavigationViewItem
  • OnHeaderChanged() : TabViewItem
  • OnHeaderPropertyChanged() : NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties , NumberBox , TabViewItem
  • OnHeaderTemplatePropertyChanged() : NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , NumberBox
  • OnHeroContentPlacementChanged() : TeachingTip
  • OnHeroContentPlacementPropertyChanged() : TeachingTipProperties
  • OnHeroContentPropertyChanged() : TeachingTipProperties
  • OnHexTextChanging() : ColorPicker
  • OnHideIndicatorsTimerTick() : ScrollView
  • OnHiding() : AnimatedVisualPlayer::final , AnimatedVisualPlayer
  • OnHorizontalAnchorRatioPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalCacheLengthPropertyChanged() : ItemsRepeaterProperties
  • OnHorizontalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnHorizontalScrollChainModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalScrollControllerPointerEntered() : ScrollView
  • OnHorizontalScrollControllerPointerExited() : ScrollView
  • OnHorizontalScrollModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalScrollRailModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalShiftPropertyChanged() : ParallaxViewProperties
  • OnHorizontalSnapPointsVectorChanged() : ScrollPresenter
  • OnHorizontalSourceEndOffsetPropertyChanged() : ParallaxViewProperties
  • OnHorizontalSourceOffsetKindPropertyChanged() : ParallaxViewProperties
  • OnHorizontalSourceStartOffsetPropertyChanged() : ParallaxViewProperties
  • OnHsvColorChanged() : ColorSpectrum
  • OnHsvColorPropertyChanged() : ColorSpectrumProperties
  • OnHueTextChanging() : ColorPicker
  • OnIconForegroundColorPickerColorChanged() : InfoBadgePage
  • OnIconPropertyChanged() : NavigationViewItemProperties , SelectorBarItemProperties , NavigationViewItem
  • OnIconSourceChanged() : AnimatedIconHost , ToggleAnimatedIconHost , TabViewItem , TeachingTip
  • OnIconSourcePropertyChanged() : InfoBadgeProperties , InfoBarProperties , SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties , InfoBar , TabViewItem
  • OnIgnoredInputKindsPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnImagePointerPressed() : ImageIRefreshInfoProviderAdapter
  • OnIncrementRepeatButtonClick() : AnnotatedScrollBar
  • OnIndeterminateSourcePropertyChanged() : ProgressRingProperties , ProgressRing
  • OnIndicatorStateStoryboardCompleted() : ScrollView
  • OnIndicatorWidthComponentChanged() : ProgressBar
  • OnInfoBadgePropertyChanged() : NavigationViewItemProperties , NavigationViewItem
  • OnInfoProviderPropertyChanged() : RefreshVisualizerProperties
  • OnInitialSetValueChanged() : RatingControl
  • OnInitialSetValuePropertyChanged() : RatingControlProperties
  • OnInitialsPropertyChanged() : PersonPictureProperties
  • OnInputActivationChanged() : TitleBar
  • OnInputTargetPointerEntered() : ColorSpectrum
  • OnInputTargetPointerExited() : ColorSpectrum
  • OnInputTargetPointerMoved() : ColorSpectrum
  • OnInputTargetPointerPressed() : ColorSpectrum
  • OnInputTargetPointerReleased() : ColorSpectrum
  • OnInsertAt() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnInteractedAction() : ExtendedSelector , MultipleSelector , SelectorBase , SingleSelector
  • OnInteractionPropertyChanged() : ButtonInteractionPage
  • OnInteractiveControlsVisiblePropertyChanged() : MapControlProperties
  • OnInternalIsCheckedChanged() : RadioMenuFlyoutItem
  • OnInterpolationSpacePropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnInvokeModeChanged() : ButtonInteractionPage
  • OnIsActivePropertyChanged() : ProgressRingProperties , ProgressRing
  • OnIsAlphaEnabledChanged() : ColorPicker
  • OnIsAlphaEnabledPropertyChanged() : ColorPickerProperties
  • OnIsAlphaSliderVisiblePropertyChanged() : ColorPickerProperties
  • OnIsAlphaTextInputVisiblePropertyChanged() : ColorPickerProperties
  • OnIsBackButtonVisiblePropertyChanged() : NavigationViewProperties , TitleBarProperties
  • OnIsBackEnabledPropertyChanged() : NavigationViewProperties , TitleBarProperties
  • OnIsCheckedChanged() : ToggleSplitButton
  • OnIsCheckedPropertyChanged() : RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties
  • OnIsClearEnabledChanged() : RatingControl
  • OnIsClearEnabledPropertyChanged() : RatingControlProperties
  • OnIsClosablePropertyChanged() : InfoBarProperties , TabViewItemProperties , InfoBar , TabViewItem
  • OnIsColorChannelTextInputVisiblePropertyChanged() : ColorPickerProperties
  • OnIsColorPreviewVisiblePropertyChanged() : ColorPickerProperties
  • OnIsColorSliderVisiblePropertyChanged() : ColorPickerProperties
  • OnIsColorSpectrumVisiblePropertyChanged() : ColorPickerProperties
  • OnIsContainerPropertyChanged() : RevealBrush
  • OnIsEnabledChanged() : AnnotatedScrollBar , BreadcrumbBarItem , ItemContainer , NavigationViewItem , NumberBox , RadioButtons , RatingControl
  • OnIsEnabledPropertyChanged() : InkCanvasProperties , InkCanvas
  • OnIsExpandedPropertyChanged() : Expander , ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties , NavigationViewItem
  • OnIsGroupPropertyChanged() : PersonPictureProperties
  • OnIsHexInputVisiblePropertyChanged() : ColorPickerProperties
  • OnIsHorizontalShiftClampedPropertyChanged() : ParallaxViewProperties
  • OnIsIconVisiblePropertyChanged() : InfoBarProperties , InfoBar
  • OnIsIndeterminatePropertyChanged() : ProgressBarProperties , ProgressRingProperties , ProgressBar , ProgressRing
  • OnIsItemInvokedEnabledChanged() : ItemsView
  • OnIsItemInvokedEnabledPropertyChanged() : ItemsViewProperties
  • OnIsLightDismissEnabledChanged() : TeachingTip
  • OnIsLightDismissEnabledPropertyChanged() : TeachingTipProperties
  • OnIsMoreButtonVisiblePropertyChanged() : ColorPickerProperties
  • OnIsOpenChanged() : TeachingTip
  • OnIsOpenPropertyChanged() : InfoBarProperties , TeachingTipProperties , InfoBar
  • OnIsPaneOpenChanged() : NavigationView
  • OnIsPaneOpenPropertyChanged() : NavigationViewProperties
  • OnIsPaneToggleButtonVisiblePropertyChanged() : NavigationViewProperties , TitleBarProperties
  • OnIsPaneVisiblePropertyChanged() : NavigationViewProperties
  • OnIsReadOnlyChanged() : RatingControl
  • OnIsReadOnlyPropertyChanged() : RatingControlProperties
  • OnIsScrollingWithMouseChanged() : CanvasScrollControllerConsumer
  • OnIsSelectedChanged() : TreeViewItem
  • OnIsSelectedPropertyChanged() : ItemContainerProperties , NavigationViewItemBaseProperties , TabViewItem
  • OnIsSettingsVisiblePropertyChanged() : NavigationViewProperties
  • OnIsTargetPropertyChanged() : XamlAmbientLight
  • OnIsTitleBarAutoPaddingEnabledPropertyChanged() : NavigationViewProperties
  • OnIsVerticalShiftClampedPropertyChanged() : ParallaxViewProperties
  • OnIsVirtualizationEnabledPropertyChanged() : StackLayoutProperties
  • OnIsWrapEnabledPropertyChanged() : NumberBoxProperties , NumberBox
  • OnItemClick() : TreeView
  • OnItemClicked() : ScaleAnimatedVerticalListDemo , CollectionChangeDemo
  • OnItemCollapsed() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • OnItemExpanding() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • OnItemGotFocus() : ScaleAnimatedVerticalListDemo
  • OnItemInfoChanged() : RatingControl
  • OnItemInfoPropertyChanged() : RatingControlProperties
  • OnItemsAdded() : final , VirtualizingStackLayout , TreeView
  • OnItemsChanged() : TabView , TabViewListView
  • OnItemsChangedCore() : FlowLayout , LinedFlowLayout , StackLayout , VirtualizingStackLayout , UniformGridLayout , VirtualizingLayout
  • OnItemsContainerSizeChanged() : NavigationView
  • OnItemsJustificationPropertyChanged() : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • OnItemsPresenterSizeChanged() : TabView
  • OnItemsPropertyChanged() : RadioButtonsProperties , SelectorBarProperties
  • OnItemsRemoved() : final , VirtualizingStackLayout , TreeView
  • OnItemsRepeaterElementClearing() : ItemsView
  • OnItemsRepeaterElementIndexChanged() : ItemsView
  • OnItemsRepeaterElementPrepared() : ItemsView
  • OnItemsRepeaterItemsSourceChanged() : ItemsView
  • OnItemsRepeaterLayoutChanged() : PipsPager
  • OnItemsRepeaterLayoutUpdated() : ItemsView
  • OnItemsRepeaterSizeChanged() : ItemsView
  • OnItemsSourceChanged() : ItemsView , CustomItemsSourceView , MockItemsSource , FlowLayoutAlgorithm , ItemsSourceView , final , TreeView , TreeViewNode
  • OnItemsSourcePropertyChanged() : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties , TreeViewProperties , TreeViewItemProperties
  • OnItemsSourceViewChanged() : NavigationViewItem , ItemsRepeater
  • OnItemsStretchPropertyChanged() : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • OnItemsVectorChanged() : MenuBarItem
  • OnItemsViewElementGettingFocus() : ItemsView
  • OnItemsViewElementKeyDown() : ItemsView
  • OnItemsViewItemContainerIsSelectedChanged() : ItemsView
  • OnItemsViewItemContainerItemInvoked() : ItemsView
  • OnItemsViewKeyDown() : ItemsViewTransitionPage
  • OnItemsViewSelectedItemPropertyChanged() : SelectorBar
  • OnItemTapped() : SwipeItem
  • OnItemTemplateChanged() : ItemsView , ItemsRepeater
  • OnItemTemplatePropertyChanged() : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties
  • OnItemTransitionProviderPropertyChanged() : ItemsRepeaterProperties , ItemsViewProperties
  • OnKeepAliveTimerTick() : ItemCollectionTransitionProvider
  • OnKeepInteriorCornersSquarePropertyChanged() : AutoSuggestBoxHelper , ComboBoxHelper
  • OnKeyDown() : ColorPickerSlider , ColorSpectrum , CommandBarFlyoutCommandBar , ButtonInteraction , SliderInteraction , ItemContainer , ItemsView , NavigationView , PipsPager , RatingControl , ScrollView , TabViewItem , TreeViewItem
  • OnKeyUp() : ButtonInteraction , RepeaterItem , GroupedRepeaterItem , TreeViewItem
  • OnKindPropertyChanged() : MicaBackdropProperties
  • OnLabelsCollectionChanged() : AnnotatedScrollBar
  • OnLabelsGridSizeChanged() : AnnotatedScrollBar
  • OnLabelsPropertyChanged() : AnnotatedScrollBarProperties
  • OnLabelTemplatePropertyChanged() : AnnotatedScrollBarProperties
  • OnLastButtonCommandPropertyChanged() : PagerControlProperties
  • OnLastButtonStylePropertyChanged() : PagerControlProperties
  • OnLastButtonVisibilityChanged() : PagerControlPage
  • OnLastButtonVisibilityPropertyChanged() : PagerControlProperties
  • OnLayerAdded() : MapControl
  • OnLayersPropertyChanged() : MapControlProperties
  • OnLayersVectorChanged() : MapControl
  • OnLayoutChanged() : LayoutPanel , RadioButtons , ItemsRepeater , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnLayoutChanging() : final
  • OnLayoutPropertyChanged() : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • OnLayoutRootSizeChanged() : ColorSpectrum
  • OnLayoutSelectionChanged() : ItemsViewTransitionPage
  • OnLayoutUpdated() : NavigationView , ItemsRepeater , ItemsViewWithDataPage , ViewportManagerWithPlatformFeatures , TitleBar
  • OnLayoutUpdatedAfterStateChanged() : AnimatedIcon
  • OnLeftItemsChanged() : SwipeControl
  • OnLeftItemsCollectionChanged() : SwipeControl
  • OnLeftItemsPropertyChanged() : SwipeControlProperties
  • OnLightDismissIndicatorPopupClosed() : TeachingTip
  • OnLineAlignmentPropertyChanged() : FlowLayoutProperties
  • OnLineArranged() : FlowLayoutDerived , FlowLayout , FlowLayoutState
  • OnLineArrangedFunc : FlowLayoutDerived
  • OnLineHeightPropertyChanged() : LinedFlowLayoutProperties
  • OnLineSpacingPropertyChanged() : LinedFlowLayoutProperties
  • OnListControlDragItemsCompleted() : TreeView
  • OnListControlDragItemsStarting() : TreeView
  • OnListControlSelectionChanged() : TreeView
  • OnListViewDragEnter() : TabView
  • OnListViewDraggingPropertyChanged() : TabView
  • OnListViewDragItemsCompleted() : TabView
  • OnListViewDragItemsStarting() : TabView
  • OnListViewDragLeave() : TabView
  • OnListViewDragOver() : TabView
  • OnListViewDrop() : TabView
  • OnListViewGettingFocus() : TabView
  • OnListViewLoaded() : TabView
  • OnListViewSelectionChanged() : TabView
  • OnListViewSizeChanged() : TabView
  • OnLoad() : PagerControlPage , PipsPagerPage
  • OnLoaded() : AnimatedIcon , AnimatedVisualPlayer , InkCanvas , ItemsView , NavigationView , NavigationViewItem , NavigationViewItemBase , NavigationViewRS3Page , ParallaxView , PipsPagerExamples , ProgressRing , RadioButtonsFocusPage , RadioMenuFlyoutItem , ItemsRepeater , ScrollPresenter , SelectorBar , SwipeControl , TabView , TabViewItem , TeachingTipFocusPage , WebView2CoreObjectsPage , WebView2
  • OnLoadedEvent() : BreadcrumbBarItem
  • OnLocationPropertyChanged() : MapIconProperties
  • OnLostFocus() : ColorPickerSlider , ColorSpectrum , NavigationViewItem , NavigationViewItemBase , PipsPager
  • OnlyProgramaticCloseWillCloseRemainOpenExecuteItems() : SwipeControlTests
  • OnMainPageLoaded() : RefreshContainerOnImagePage , RefreshContainerPage
  • OnMaintainViewportSliderValueChanged() : ItemsViewWithDataPage
  • OnMakeAnchor() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnManipulationModePropertyChanged() : WebView2
  • OnMapElementsPropertyChanged() : MapElementsLayerProperties
  • OnMapElementsVectorChanged() : MapElementsLayer
  • OnMappingModePropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnMapServiceTokenPropertyChanged() : MapControlProperties
  • OnMaterialPolicyStatusChanged() : RevealBorderLight , RevealHoverLight , XamlAmbientLight , AcrylicBrush , RevealBrush
  • OnMaxColumnsPropertyChanged() : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties , ColumnMajorUniformToLargestGridLayout
  • OnMaxHorizontalShiftRatioPropertyChanged() : ParallaxViewProperties
  • OnMaxHuePropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMaximumPropertyChanged() : NumberBoxProperties , ProgressRingProperties , NumberBox , ProgressRing
  • OnMaximumRowsOrColumnsPropertyChanged() : UniformGridLayoutProperties
  • OnMaxRatingChanged() : RatingControl
  • OnMaxRatingPropertyChanged() : RatingControlProperties
  • OnMaxRowsOrColumnsSliderValueChanged() : ItemsViewWithDataPage
  • OnMaxSaturationPropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMaxSurfaceOpacityPropertyChanged() : SpectrumBrushProperties
  • OnMaxSurfacePropertyChanged() : SpectrumBrushProperties
  • OnMaxValuePropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMaxVerticalShiftRatioPropertyChanged() : ParallaxViewProperties
  • OnMaxVisiblePipsChanged() : PipsPager , PipsPagerPage
  • OnMaxVisiblePipsPropertyChanged() : PipsPagerProperties
  • OnMaxZoomFactorPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnMeasureStart() : StackLayoutState
  • OnMenuBarItemAccessKeyInvoked() : MenuBarItem
  • OnMenuBarItemKeyDown() : MenuBarItem
  • OnMenuBarItemPointerEntered() : MenuBarItem
  • OnMenuBarItemPointerPressed() : MenuBarItem
  • OnMenuFlyoutChangingItemsClosed() : MenuFlyoutPage
  • OnMenuFlyoutChangingItemsOpened() : MenuFlyoutPage
  • OnMenuFlyoutChangingSubItemsClosed() : MenuFlyoutPage
  • OnMenuFlyoutChangingSubItemsOpened() : MenuFlyoutPage
  • OnMenuItemContainerStylePropertyChanged() : NavigationViewProperties
  • OnMenuItemContainerStyleSelectorPropertyChanged() : NavigationViewProperties
  • OnMenuItemsPropertyChanged() : NavigationViewProperties , NavigationViewItemProperties , NavigationViewItem
  • OnMenuItemsSourceCollectionChanged() : NavigationView
  • OnMenuItemsSourcePropertyChanged() : NavigationViewProperties , NavigationViewItemProperties , NavigationViewItem
  • OnMenuItemsVectorChanged() : NavigationViewItem
  • OnMenuItemTemplatePropertyChanged() : NavigationViewProperties
  • OnMenuItemTemplateSelectorPropertyChanged() : NavigationViewProperties
  • OnMessagePropertyChanged() : InfoBarProperties , InfoBar
  • OnMinColumnSpacingPropertyChanged() : FlowLayoutProperties , UniformGridLayoutProperties
  • OnMinHuePropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMinimumPropertyChanged() : NumberBoxProperties , ProgressRingProperties , NumberBox , ProgressRing
  • OnMinItemHeightPropertyChanged() : UniformGridLayoutProperties
  • OnMinItemSpacingPropertyChanged() : LinedFlowLayoutProperties
  • OnMinItemWidthPropertyChanged() : UniformGridLayoutProperties
  • OnMinMaxHueChanged() : ColorPicker , ColorSpectrum
  • OnMinMaxSaturationChanged() : ColorPicker , ColorSpectrum
  • OnMinMaxValueChanged() : ColorPicker , ColorSpectrum
  • OnMinRowSpacingPropertyChanged() : FlowLayoutProperties , UniformGridLayoutProperties
  • OnMinSaturationPropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMinSurfacePropertyChanged() : SpectrumBrushProperties
  • OnMinTallModeHeightPropertyChanged() : TwoPaneViewProperties
  • OnMinValuePropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMinWideModeWidthPropertyChanged() : TwoPaneViewProperties
  • OnMinZoomFactorPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnMirroredWhenRightToLeftPropertyChanged() : AnimatedIcon , AnimatedIconProperties
  • OnModePropertyChanged() : SwipeItemsProperties
  • OnMoreButtonChecked() : ColorPicker
  • OnMoreButtonClicked() : ColorPicker
  • OnMoreButtonUnchecked() : ColorPicker
  • OnMoveButtonClick() : ItemsViewTransitionPage
  • OnMultipleSelectionClicked() : FlatSample , TreeViewSample , GroupedSample
  • OnMultiSelectModePropertyChanged() : ItemContainerProperties
  • OnNavigatedFrom() : ItemsViewIntegrationPage , AcrylicBrushPage , AcrylicMarkupPage , AcrylicRenderingPage , CoreWindowEventsPage , RevealMarkupPage , RevealRegressionTestsPage , RevealStatesPage , NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage , RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizerPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollPresenterBringIntoViewPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage , SwipeControlPage , TeachingTipPage , TreeViewPage , ScrollPresenterRepeaterAnchoringPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollPresenterZoomSnapPointsPage , VariableSizedItemsPage , NavigationViewTopNavStorePage , NavigationViewInitPage , ItemsViewSummaryPage
  • OnNavigatedTo() : GroupedItemsControlPage , ListViewBasePage , AcrylicBrushPage , CoreWindowEventsPage , ItemsViewWithDataPage , TabViewPage , ItemsViewWithDataPage , GroupedListViewBasePage
  • OnNavigateToStringButtonClicked() : WebView2BasicPage
  • OnNavigatingFrom() : SwipeControlPage , WebView2BasicPage , WebView2CoreObjectsPage , RatingControlPage
  • OnNavigationButtonVisibilityChanged() : PipsPager
  • OnNavigationCompleted() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnNavigationStarting() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnNavigationViewItemBaseDepthChanged() : NavigationViewItem , NavigationViewItemBase , NavigationViewItemHeader , NavigationViewItemSeparator
  • OnNavigationViewItemBaseIsSelectedChanged() : NavigationViewItem , NavigationViewItemBase
  • OnNavigationViewItemBasePositionChanged() : NavigationViewItem , NavigationViewItemSeparator , NavigationViewItemBase
  • OnNavigationViewItemBaseVisibilityPropertyChanged() : NavigationView
  • OnNavigationViewItemClicked() : NavigationView
  • OnNavigationViewItemExpandedPropertyChanged() : NavigationView
  • OnNavigationViewItemInvoked() : NavigationView
  • OnNavigationViewItemIsSelectedPropertyChanged() : NavigationView
  • OnNavigationViewItemKeyDown() : NavigationView
  • OnNavigationViewItemOnGotFocus() : NavigationView
  • OnNavItemInvoked() : NavigationViewTopNavStorePage
  • OnNewItemTapped() : CircleLayoutSamplePage
  • OnNextButtonClicked() : PipsPager
  • OnNextButtonCommandPropertyChanged() : PagerControlProperties
  • OnNextButtonStylePropertyChanged() : PagerControlProperties , PipsPagerProperties
  • OnNextButtonVisibilityChanged() : PagerControlPage
  • OnNextButtonVisibilityPropertyChanged() : PipsPagerProperties , PagerControlProperties
  • OnNextPageButtonVisibilityChanged() : PipsPagerPage
  • OnNodeCollapsed() : TreeView
  • OnNodeExpanding() : TreeView
  • OnNoIndicatorStateStoryboardCompleted() : ScrollView
  • OnNoiseChanged() : AcrylicBrush , RevealBrush
  • OnNormalPipStylePropertyChanged() : PipsPagerProperties
  • OnNumberBoxGotFocus() : NumberBox
  • OnNumberBoxKeyDown() : NumberBox
  • OnNumberBoxKeyUp() : NumberBox
  • OnNumberBoxLostFocus() : NumberBox
  • OnNumberBoxScroll() : NumberBox
  • OnNumberFormatterPropertyChanged() : NumberBoxProperties , NumberBox
  • OnNumberOfPagesChanged() : PipsPager , PipsPagerPage , PagerControl
  • OnNumberOfPagesPropertyChanged() : PagerControlProperties , PipsPagerProperties
  • OnOpenPaneLengthPropertyChanged() : NavigationViewProperties
  • OnOrientationChanged() : ColorPicker , PipsPager , RefreshVisualizer , PipsPagerPage
  • OnOrientationChangedImpl() : RefreshVisualizer
  • OnOrientationPropertyChanged() : ColorPickerProperties , PipsPagerProperties , RefreshVisualizerProperties , StackLayoutProperties , UniformGridLayoutProperties , FlowLayoutProperties
  • OnOverflowItemsSourceCollectionChanged() : NavigationView
  • OnOverflowLabelModePropertyChanged() : NavigationViewProperties
  • OnOwnerArranged() : final , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnOwnerMeasuring() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , ViewportManager
  • OnPaddingPropertyChanged() : LayoutPanelProperties
  • OnPagerInputCommandPropertyChanged() : PagerControlProperties
  • OnPageThemeComboBoxSelectionChanged() : TeachingTipPage
  • OnPane1LengthPropertyChanged() : TwoPaneViewProperties
  • OnPane1PropertyChanged() : TwoPaneViewProperties
  • OnPane2LengthPropertyChanged() : TwoPaneViewProperties
  • OnPane2PropertyChanged() : TwoPaneViewProperties
  • OnPaneDisplayModePropertyChanged() : NavigationViewProperties
  • OnPaneFooterPropertyChanged() : NavigationViewProperties
  • OnPanePriorityPropertyChanged() : TwoPaneViewProperties
  • OnPaneSearchButtonClick() : NavigationView
  • OnPaneTitleHolderSizeChanged() : NavigationView
  • OnPaneTitlePropertyChanged() : NavigationViewProperties
  • OnPaneToggleButtonClick() : TitleBar , NavigationView
  • OnPaneToggleButtonStylePropertyChanged() : NavigationViewProperties
  • OnPartVisibilityChanged() : ColorPicker
  • OnPipsAreaBringIntoViewRequested() : PipsPager
  • OnPipsAreaGettingFocus() : PipsPager
  • OnPlaceholderValueChanged() : RatingControl
  • OnPlaceholderValuePropertyChanged() : RatingControlProperties
  • OnPlacementMarginChanged() : TeachingTip
  • OnPlacementMarginPropertyChanged() : TeachingTipProperties
  • OnPlaybackRatePropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnPointerCanceled() : BreadcrumbBarItem , ButtonInteraction , SliderInteraction , ItemContainer , TabViewItem , PipsPager
  • OnPointerCancelledBackgroundStackPanel() : RatingControl
  • OnPointerCaptureLost() : BreadcrumbBarItem , SliderInteraction , ItemContainer , TabViewItem , ButtonInteraction
  • OnPointerCaptureLostBackgroundStackPanel() : RatingControl
  • OnPointerEntered() : BreadcrumbBarItem , ButtonInteraction , ItemContainer , PipsPager , TabViewItem
  • OnPointerEnteredBackgroundStackPanel() : RatingControl
  • OnPointerEvent() : SplitButton
  • OnPointerExited() : ButtonInteraction , ItemContainer , PipsPager , TabViewItem , BreadcrumbBarItem
  • OnPointerExitedBackgroundStackPanel() : RatingControl
  • OnPointerMoved() : BreadcrumbBarItem , SliderInteraction , TabViewItem , ItemContainer
  • OnPointerMovedOverBackgroundStackPanel() : RatingControl
  • OnPointerPressed() : BreadcrumbBarItem , ButtonInteraction , SliderInteraction , ItemContainer , RevealHoverLight , GroupedRepeaterItem , TreeViewItem , ScrollPresenter , TabViewItem , RepeaterItem , SwipeItem
  • OnPointerPressedBackgroundStackPanel() : RatingControl
  • OnPointerPressedEvent() : SwipeControl
  • OnPointerReleased() : ButtonInteraction , SliderInteraction , ItemContainer , TabViewItem , BreadcrumbBarItem
  • OnPointerReleasedBackgroundStackPanel() : RatingControl
  • OnPopupClosed() : TeachingTip
  • OnPopupOpened() : TeachingTip
  • OnPostArrange() : ViewportManagerDownLevel
  • OnPreferredPlacementPropertyChanged() : TeachingTipProperties
  • OnPreferSmallImagePropertyChanged() : PersonPictureProperties
  • OnPrefixTextPropertyChanged() : PagerControlProperties
  • OnPresenterKeyDown() : MenuBarItem
  • OnPresenterPointerCanceled() : NavigationViewItem
  • OnPresenterPointerCaptureLost() : NavigationViewItem
  • OnPresenterPointerEntered() : NavigationViewItem
  • OnPresenterPointerExited() : NavigationViewItem
  • OnPresenterPointerMoved() : NavigationViewItem
  • OnPresenterPointerPressed() : NavigationViewItem
  • OnPresenterPointerReleased() : NavigationViewItem
  • OnPreviewKeyDown() : NavigationView , RatingControl
  • OnPreviewKeyUp() : RatingControl
  • OnPreviousButtonClicked() : PipsPager
  • OnPreviousButtonCommandPropertyChanged() : PagerControlProperties
  • OnPreviousButtonStylePropertyChanged() : PagerControlProperties , PipsPagerProperties
  • OnPreviousButtonVisibilityChanged() : PagerControlPage
  • OnPreviousButtonVisibilityPropertyChanged() : PipsPagerProperties , PagerControlProperties
  • OnPreviousColorChanged() : ColorPicker
  • OnPreviousColorPropertyChanged() : ColorPickerProperties
  • OnPreviousPageButtonVisibilityChanged() : PipsPagerPage
  • OnProfilePicturePropertyChanged() : PersonPictureProperties
  • OnPropertyChanged() : AnnotatedScrollBar , BreadcrumbBar , ColorPicker , ColorSpectrum , SpectrumBrush , CommandBarFlyoutCommandBar , InfoBadge , ItemContainer , ItemsView , MapControl , MapElementsLayer , MapIcon , MicaBackdrop , RevealBrush , MenuBarItemFlyout , MonochromaticOverlayPresenter , NavigationView , NavigationViewItemBase , DataModelWithINPC , ParallaxView , PersonPicture , PipsPager , RefreshContainer , RefreshVisualizer , RadioButtons , RatingControl , FlowLayout , ItemsRepeater , LinedFlowLayout , SelectionModel , StackLayout , Recipe , ActivityFeedLayout , RepeaterItem , GroupedRepeaterItem , UniformGridLayout , ScrollPresenter , ScrollView , SelectorBarItem , SplitButton , ToggleSplitButton , SwipeControl , SwipeItem , SwipeItems , TeachingTip , TitleBar , TreeView , TreeViewNode , TwoPaneView , WebView2 , TeachingTip , TreeViewItem , PagerControl , SelectorBar , TreeViewItem , Flex , RadioMenuFlyoutItem , RefreshContainer , AcrylicBrush , LayoutPanel , XamlControlsResources
  • OnPullDirectionChanged() : RefreshContainer
  • OnPullDirectionChangedImpl() : RefreshContainer
  • OnPullDirectionPropertyChanged() : RefreshContainerProperties
  • OnRadiusXPropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnRadiusYPropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnRawDataChanged() : TopNavigationViewDataProvider
  • OnRawDataInsert() : SplitVector< T, SplitVectorID >
  • OnRawDataRemove() : SplitVector< T, SplitVectorID >
  • OnRecipeDeleted() : ItemsViewWithDataPage
  • OnRecipeInserted() : ItemsViewWithDataPage
  • OnRefreshButtonClick() : ItemsViewTransitionPage
  • OnRefreshCompleted() : RefreshInfoProviderImplementation , IRefreshInfoProvider , RefreshInfoProviderImplementation , RefreshInfoProviderImpl , ScrollViewerIRefreshInfoProviderAdapter
  • OnRefreshCompletedCalls : RefreshInfoProviderImpl
  • OnRefreshInfoProviderAdapterChanged() : RefreshContainer
  • OnRefreshInfoProviderAdapterChangedImpl() : RefreshContainer
  • OnRefreshInfoProviderChanged() : RefreshVisualizer
  • OnRefreshStarted() : ScrollViewerIRefreshInfoProviderAdapter , IRefreshInfoProvider , RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • OnRefreshStartedCalls : RefreshInfoProviderImpl
  • OnRefreshVisualizerChanged() : RefreshContainer
  • OnRefreshVisualizerChangedImpl() : RefreshContainer
  • OnReleaseReference_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnReleaseReference_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnReloadButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_ConcurrentCreationElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemoveAt() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnRendering() : ItemsViewWithDataPage , final , ItemsViewWithDataPage , ItemCollectionTransitionProvider
  • OnRepeaterCollectionChanged() : RadioButtons
  • OnRepeaterElementClearing() : RadioButtons , NavigationView
  • OnRepeaterElementIndexChanged() : RadioButtons
  • OnRepeaterElementPrepared() : RadioButtons , NavigationView
  • OnRepeaterGettingFocus() : NavigationView
  • OnRepeaterGotFocus() : PipsPagerPage
  • OnRepeaterLoaded() : NavigationView , RadioButtons
  • OnReplace() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnReplacementColorPropertyChanged() : MonochromaticOverlayPresenterProperties
  • OnResetClick() : SwipeControlPage
  • OnResetCounts_ButtonClicked() : WebView2CoreObjectsPage
  • OnResetInvokeCountClick() : ButtonInteractionPage
  • OnResetItemTransitionProviderButtonClick() : ItemsViewTransitionPage
  • OnResizeMeButtonClick() : ItemsViewWithDataPage
  • OnResizeWebViewVisualButtonClicked() : WebView2BasicPage
  • OnReturnTopForOutOfWindowPlacementCheckBoxChecked() : TeachingTipPage
  • OnReturnTopForOutOfWindowPlacementCheckBoxUnchecked() : TeachingTipPage
  • OnRevealBrushConnected() : MaterialHelperBase
  • OnRevealBrushDisconnected() : MaterialHelperBase
  • OnReverseButtonClicked() : CheckBoxPage
  • OnRgbTextChanging() : ColorPicker
  • OnRichEditBoxClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnRichEditBoxFillWithTextClicked() : TextCommandBarFlyoutPage
  • OnRichEditBoxSelectAllClicked() : TextCommandBarFlyoutPage
  • OnRichEditBoxTextChanged() : ScrollInputHelper
  • OnRichTextBlockClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnRichTextBlockSelectAllClicked() : TextCommandBarFlyoutPage
  • OnRightItemsChanged() : SwipeControl
  • OnRightItemsCollectionChanged() : SwipeControl
  • OnRightItemsPropertyChanged() : SwipeControlProperties
  • OnRootGridKeyDown() : PagerControl
  • OnRowSpacingPropertyChanged() : ColumnMajorUniformToLargestGridLayout , ColumnMajorUniformToLargestGridLayoutProperties
  • OnRowSpacingSliderValueChanged() : ItemsViewWithDataPage
  • OnSaturationTextChanging() : ColorPicker
  • OnScroll() : ScrollBarController
  • OnScrollAnimationStarting() : ScrollView
  • OnScrollBarPropertyChanged() : ScrollBarController
  • OnScrollButtonClicked() : ItemsViewWithDataPage
  • OnScrollByRequested() : CanvasScrollControllerConsumer
  • OnScrollControllerAddScrollVelocityRequested() : ScrollPresenter
  • OnScrollControllerCanScrollChanged() : ScrollView
  • OnScrollControllerIsScrollingWithMouseChanged() : ScrollView
  • OnScrollControllerPanningInfoChanged() : ScrollPresenter
  • OnScrollControllerPanningInfoPanRequested() : ScrollPresenter
  • OnScrollControllerScrollByRequested() : ScrollPresenter
  • OnScrollControllerScrollToRequested() : ScrollPresenter
  • OnScrollDecreaseClick() : TabView
  • OnScrollIncreaseClick() : TabView
  • OnScrollInputHelperInfoChanged() : ParallaxView
  • OnScrollPresenterAnchorRequested() : ScrollView
  • OnScrollPresenterBringingIntoView() : ScrollView
  • OnScrollPresenterExtentChanged() : ScrollView
  • OnScrollPresenterPropertyChanged() : ScrollInputHelper , ScrollView , ScrollViewProperties
  • OnScrollPresenterScrollCompleted() : ScrollView
  • OnScrollPresenterScrollStarting() : ScrollView , ViewportManagerWithPlatformFeatures
  • OnScrollPresenterStateChanged() : ScrollView
  • OnScrollPresenterViewChanged() : ScrollView
  • OnScrollPresenterViewChangeStarting() : ViewportManagerWithPlatformFeatures
  • OnScrollPresenterZoomCompleted() : ScrollView
  • OnScrollPresenterZoomStarting() : ScrollView , ViewportManagerWithPlatformFeatures
  • OnScrollToRequested() : CanvasScrollControllerConsumer
  • OnScrollViewAnchorRequested() : ItemsView
  • OnScrollViewBringingIntoView() : ItemsView
  • OnScrollViewerBringIntoViewRequested() : PipsPager
  • OnScrollViewerContentPropertyChanged() : ScrollInputHelper
  • OnScrollViewerDirectManipulationCompleted() : ScrollInputHelper , ScrollViewerIRefreshInfoProviderAdapter
  • OnScrollViewerDirectManipulationStarted() : ScrollInputHelper
  • OnScrollViewerLoaded() : TabView , ScrollViewerIRefreshInfoProviderAdapter , TwoPaneView
  • OnScrollViewerPropertyChanged() : ScrollInputHelper
  • OnScrollViewerSizeChanged() : ItemsRepeaterScrollHost
  • OnScrollViewerViewChanged() : ItemsRepeaterScrollHost , TabView
  • OnScrollViewerViewChanging() : ItemsRepeaterScrollHost , ScrollViewerIRefreshInfoProviderAdapter
  • OnScrollViewGettingFocus() : ScrollView
  • OnScrollViewIsEnabledChanged() : ScrollView
  • OnScrollViewPointerCanceled() : ScrollView
  • OnScrollViewPointerEntered() : ScrollView
  • OnScrollViewPointerExited() : ScrollView
  • OnScrollViewPointerMoved() : ScrollView
  • OnScrollViewPointerPressed() : ScrollView
  • OnScrollViewPointerReleased() : ScrollView
  • OnScrollViewPropertyChanged() : ItemsViewProperties
  • OnScrollViewScrollCompleted() : ItemsView
  • OnScrollViewUnloaded() : ScrollView
  • OnSecondTabDragStarting() : TabViewPage
  • OnSelectedIndexChanged() : PagerControlPage , PipsPagerPage
  • OnSelectedIndexPropertyChanged() : TabViewListView , TabView , TabViewProperties , RadioButtonsProperties
  • OnSelectedItemLayoutUpdated() : NavigationView
  • OnSelectedItemPropertyChanged() : TreeViewProperties , TabViewProperties , NavigationViewProperties , SelectorBarProperties , TabView , RadioButtonsProperties , NavigationView , ItemsViewProperties
  • OnSelectedPageIndexChange() : PagerControl
  • OnSelectedPageIndexChanged() : PipsPager
  • OnSelectedPageIndexPropertyChanged() : PipsPagerProperties , PagerControlProperties
  • OnSelectedPipStylePropertyChanged() : PipsPagerProperties
  • OnSelectionChanged() : HierarchicalNavigationViewDataBinding , final , SelectionModel , SelectionContainer
  • OnSelectionEllipseFlowDirectionChanged() : ColorSpectrum
  • OnSelectionFollowsFocusPropertyChanged() : NavigationViewProperties
  • OnSelectionInvalidatedDueToCollectionChange() : SelectionModel
  • OnSelectionModeChanged() : ItemsView
  • OnSelectionModelChanged() : SelectionContainer
  • OnselectionModelChanged() : GroupedRepeaterItem , TreeViewItem , RepeaterItem
  • OnSelectionModelChildrenRequested() : NavigationView
  • OnSelectionModelSelectionChanged() : NavigationView , ItemsView
  • OnSelectionModePropertyChanged() : ItemsViewProperties , TreeViewProperties
  • OnSelectTemplateKey() : CollectionChangeDemo , StoreDemoPage , GroupedSample , BasicDemo , ItemTemplateDemo , StoreDemoPage
  • OnSelectTemplateKeyCore() : RecyclingElementFactoryDerived , RecyclingElementFactory
  • OnSetActionButtonContentButtonClicked() : TeachingTipPage
  • OnSetAnimationDurationsButtonClicked() : TeachingTipPage
  • OnSetAnimationParametersButtonClicked() : TeachingTipPage
  • OnSetAutomationNameButtonClicked() : TeachingTipPage
  • OnSetBleeingImagePlacementButtonClicked() : TeachingTipPage
  • OnSetClipboardContentsClicked() : TextCommandBarFlyoutPage
  • OnSetCloseButtonContentButtonClicked() : TeachingTipPage
  • OnSetContentButtonClicked() : TeachingTipPage
  • OnSetCustomSource_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetCustomSource_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetCustomSource_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetHeroContentButtonClicked() : TeachingTipPage
  • OnSetIconButtonClicked() : TeachingTipPage
  • OnSetIsLightDismissEnabledButtonClicked() : TeachingTipPage
  • OnSetPlacementMarginButtonClicked() : TeachingTipPage
  • OnSetPreferredPlacementButtonClicked() : TeachingTipPage
  • OnSetScrollViewerOffsetButtonClicked() : TeachingTipPage
  • OnSetShouldConstrainToRootBoundsButtonClicked() : TeachingTipPage
  • OnSetSource_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetSource_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetSource_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetSourceButtonClicked() : WebView2BasicPage
  • OnSetSubtitleButtonClicked() : TeachingTipPage
  • OnSetTailVisibilityButtonClicked() : TeachingTipPage
  • OnSetTargetButtonClicked() : TeachingTipPage
  • OnSetTargetHorizontalAlignmentButtonClicked() : TeachingTipPage
  • OnSetTargetVerticalAlignmentButtonClicked() : TeachingTipPage
  • OnSettingsInvoked() : NavigationView
  • OnSettingsItemPropertyChanged() : NavigationViewProperties
  • OnSetTipLocationButton() : TeachingTipPage
  • OnSetTitleButtonClicked() : TeachingTipPage
  • OnSeverityPropertyChanged() : InfoBarProperties , InfoBar
  • OnShapeChanged() : ColorSpectrum
  • OnShapePropertyChanged() : ColorSpectrumProperties
  • OnShouldConstrainToRootBoundsChanged() : TeachingTip
  • OnShouldConstrainToRootBoundsPropertyChanged() : TeachingTipProperties
  • OnShoulderNavigationEnabledPropertyChanged() : NavigationViewProperties
  • OnShowAfterDelayButtonClicked() : TeachingTipPage
  • OnShowButtonClicked() : TeachingTipPage
  • OnShowButtonClickedRightEdge() : TeachingTipPage
  • OnShowErrorPropertyChanged() : ProgressBarProperties , ProgressBar
  • OnShowPausedPropertyChanged() : ProgressBarProperties , ProgressBar
  • OnShowStandardTextControlFlyoutOnPasswordBoxClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnRichEditBoxClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnRichTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnTextBoxClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnPasswordBoxClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnRichEditBoxClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnRichTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnTextBoxClicked() : TextCommandBarFlyoutPage
  • OnSizeChanged() : NavigationView , PersonPicture , ProgressRing , TwoPaneView , AnnotatedScrollBar , InfoBadge , SwipeControl , TabViewItem , TitleBar , ParallaxView , ProgressBar
  • onSliderPointerPressed() : RefreshInfoProviderImplementation
  • onSliderPointerReleased() : RefreshInfoProviderImplementation
  • onSliderValueChanged() : RefreshInfoProviderImplementation
  • OnSmallChangePropertyChanged() : NumberBoxProperties , NumberBox , AnnotatedScrollBarProperties
  • OnSortAscClick() : SortingAndFilteringPage
  • OnSortDesClick() : SortingAndFilteringPage
  • OnSource_Ensure_ButtonClicked() : WebView2CoreObjectsPage
  • OnSource_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnSourceChanged() : WebView2
  • OnSourceContentSizeChanged() : ScrollInputHelper
  • OnSourceElementChanged() : ScrollInputHelper
  • OnSourceElementLoaded() : ScrollInputHelper
  • OnSourceElementPropertyChanged() : ScrollInputHelper , MonochromaticOverlayPresenterProperties
  • OnSourceInfoChanged() : ScrollInputHelper
  • OnSourceListChanged() : ItemsView , final
  • OnSourcePropertyChanged() : AnimatedIconProperties , AnimatedIcon , ImageIconProperties , WebView2Properties , ParallaxViewProperties , ImageIcon , AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnSourceSizeChanged() : ScrollInputHelper
  • OnSpacingPropertyChanged() : StackLayoutProperties
  • OnSpinButtonPlacementModePropertyChanged() : NumberBoxProperties , NumberBox
  • OnSpinDownClick() : NumberBox
  • OnSpinUpClick() : NumberBox
  • OnSplitButtonKeyDown() : SplitButton
  • OnSplitButtonKeyUp() : SplitButton
  • OnSplitViewClosedCompactChanged() : NavigationView
  • OnSplitViewPaneClosed() : NavigationView
  • OnSplitViewPaneClosing() : NavigationView
  • OnSplitViewPaneOpened() : NavigationView
  • OnSplitViewPaneOpening() : NavigationView
  • OnSplitViewPropertyChanged() : NavigationViewItemHeader , NavigationViewItemSeparator , NavigationViewItem
  • OnSpreadMethodPropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnStateChanged() : RefreshVisualizer
  • OnStatePropertyChanged() : RefreshVisualizerProperties , AnimatedIcon , RevealBrush
  • OnStretchPropertyChanged() : AnimatedVisualPlayerProperties , AnimatedVisualPlayer
  • OnSubtitlePropertyChanged() : TitleBarProperties , TeachingTipProperties
  • OnSuffixTextPropertyChanged() : PagerControlProperties
  • OnSwipeContentStackPanelSizeChanged() : SwipeControl
  • OnSwitchTargetButtonClicked() : TeachingTipPage
  • OnSystemBackdropPropertyChanged() : CommandBarFlyoutCommandBarProperties
  • OnTabDragCompleted() : TabViewItem
  • OnTabDragStarting() : TabViewPage , TabViewItem
  • OnTabItemsSourcePropertyChanged() : TabViewProperties , TabView
  • OnTabStripDragOver() : TabViewPage
  • OnTabStripDrop() : TabViewPage
  • OnTabStripPointerEntered() : TabView
  • OnTabStripPointerExited() : TabView
  • OnTabTearOutRequested() : TabViewTearOutWindowWithoutDataItems , TabViewTearOutWindowWithDataItems
  • OnTabTearOutWindowRequested() : TabViewTearOutWindowWithoutDataItems , TabViewTearOutWindowWithDataItems
  • OnTabViewWidthModeChanged() : TabViewItem
  • OnTabWidthModePropertyChanged() : TabView , TabViewProperties
  • OnTailVisibilityChanged() : TeachingTip
  • OnTailVisibilityPropertyChanged() : TeachingTipProperties
  • OnTallModeConfigurationPropertyChanged() : TwoPaneViewProperties
  • OnTapped() : ItemContainer
  • OnTargetChanged() : TeachingTip
  • OnTargetConnected() : MicaBackdrop , DesktopAcrylicBackdrop
  • OnTargetDisconnected() : MicaBackdrop , DesktopAcrylicBackdrop
  • OnTargetElementChanged() : ScrollInputHelper
  • OnTargetElementInvoked() : ButtonInteractionPage
  • OnTargetElementLoaded() : ScrollInputHelper
  • OnTargetLayoutUpdated() : TeachingTip
  • OnTargetLoaded() : TeachingTip
  • OnTargetPropertyChanged() : TeachingTipProperties
  • OnTargetThemeChanged() : RevealBrush
  • OnTargetThemePropertyChanged() : RevealBrushProperties
  • OnTeachingTipActionButtonClicked() : TeachingTipPage
  • OnTeachingTipCloseButtonClicked() : TeachingTipPage
  • OnTeachingTipClosed() : TeachingTipPage
  • OnTeachingTipClosing() : TeachingTipPage
  • OnTemplateSettingsPropertyChanged() : PersonPictureProperties , InfoBadgeProperties , TeachingTipProperties , TitleBarProperties , PagerControlProperties , PipsPagerProperties
  • OnTextBlockClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnTextBlockSelectAllClicked() : TextCommandBarFlyoutPage
  • OnTextBoxClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnTextBoxFillWithTextClicked() : TextCommandBarFlyoutPage
  • OnTextBoxGotFocus() : ColorPicker
  • OnTextBoxLoaded() : NumberBox
  • OnTextBoxLostFocus() : ColorPicker
  • OnTextBoxSelectAllClicked() : TextCommandBarFlyoutPage
  • OnTextCommandBarFlyoutTestsClicked() : CommandBarFlyoutMainPage
  • OnTextPropertyChanged() : SelectorBarItemProperties , NumberBoxProperties , NumberBox , SwipeItemProperties
  • OnTextScaleFactorChanged() : RatingControl
  • OnThirdDimensionSliderValueChanged() : ColorPicker
  • OnTintColorPropertyChanged() : AcrylicBrushProperties
  • OnTintLuminosityOpacityPropertyChanged() : AcrylicBrushProperties
  • OnTintOpacityPropertyChanged() : AcrylicBrushProperties
  • OnTintTransitionDurationPropertyChanged() : AcrylicBrushProperties
  • OnTipFollowsTargetCheckBoxChecked() : TeachingTipPage
  • OnTipFollowsTargetCheckBoxUnchecked() : TeachingTipPage
  • OnTipShadowChecked() : TeachingTipPage
  • OnTipShadowUnchecked() : TeachingTipPage
  • OnTitleBarIsVisibleChanged() : NavigationView
  • OnTitleBarMetricsChanged() : NavigationView
  • OnTitlePropertyChanged() : TeachingTipProperties , InfoBar , InfoBarProperties , TitleBarProperties
  • OnToggleWebViewVisibilityButtonClicked() : WebView2BasicPage
  • OnTopItemsChanged() : SwipeControl
  • OnTopItemsCollectionChanged() : SwipeControl
  • OnTopItemsPropertyChanged() : SwipeControlProperties
  • OnTopNavDataSourceChanged() : NavigationView
  • OnTransitionProviderChanged() : final , ItemsRepeater
  • OnTransitionProviderTransitionCompleted() : ItemsViewTransitionPage , final
  • OnTreeViewClicked() : GroupedSample
  • OnUISettingsChanged() : MaterialHelper
  • OnUncheckedIsSettingsVisible() : HierarchicalNavigationViewMarkup
  • OnUnhiding() : AnimatedVisualPlayer::final , AnimatedVisualPlayer
  • OnUnloaded() : PersonPicture , WebView2CoreObjectsPage , InkCanvas , ColorSpectrum , ColorPicker , ItemsView , AnimatedVisualPlayer , ItemsRepeater , NavigationView , ScrollPresenter , WebView2 , RadioMenuFlyoutItem , TabView
  • OnUntargetButtonClicked() : TeachingTipPage
  • OnUpdateViewport() : ScrollSnapPointBase , ZoomSnapPointBase , SnapPointBase
  • OnUseCompactResourcesPropertyChanged() : XamlControlsResourcesProperties
  • OnUseTestScreenBoundsCheckBoxUnchecked() : TeachingTipPage
  • OnUseTestSreenBoundsCheckBoxChecked() : TeachingTipPage
  • OnUseTestWindowBoundsCheckBoxChecked() : TeachingTipPage
  • OnUseTestWindowBoundsCheckBoxUnchecked() : TeachingTipPage
  • OnValidationModePropertyChanged() : NumberBoxProperties , NumberBox
  • OnValueChanged() : RatingControl
  • OnValueChangedEvent() : ColorPickerSlider
  • OnValuePropertyChanged() : RatingControlProperties , ProgressRing , NumberBoxProperties , InfoBadgeProperties , ProgressRingProperties , NumberBox
  • OnValueTextChanging() : ColorPicker
  • OnVectorChanged() : InspectingDataSource
  • OnVerticalAnchorRatioPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnVerticalCacheLengthPropertyChanged() : ItemsRepeaterProperties
  • OnVerticalGridPointerCanceled() : AnnotatedScrollBar
  • OnVerticalGridPointerCaptureLost() : AnnotatedScrollBar
  • OnVerticalGridPointerEntered() : AnnotatedScrollBar
  • OnVerticalGridPointerExited() : AnnotatedScrollBar
  • OnVerticalGridPointerMoved() : AnnotatedScrollBar
  • OnVerticalGridPointerPressed() : AnnotatedScrollBar
  • OnVerticalGridPointerReleased() : AnnotatedScrollBar
  • OnVerticalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnVerticalScrollChainModePropertyChanged() : ScrollViewProperties , ScrollPresenterProperties
  • OnVerticalScrollControllerChanged() : ItemsView
  • OnVerticalScrollControllerPointerEntered() : ScrollView
  • OnVerticalScrollControllerPointerExited() : ScrollView
  • OnVerticalScrollControllerPropertyChanged() : ItemsViewProperties
  • OnVerticalScrollModePropertyChanged() : ScrollViewProperties , ScrollPresenterProperties
  • OnVerticalScrollRailModePropertyChanged() : ScrollViewProperties , ScrollPresenterProperties
  • OnVerticalShiftPropertyChanged() : ParallaxViewProperties
  • OnVerticalSnapPointsVectorChanged() : ScrollPresenter
  • OnVerticalSourceEndOffsetPropertyChanged() : ParallaxViewProperties
  • OnVerticalSourceOffsetKindPropertyChanged() : ParallaxViewProperties
  • OnVerticalSourceStartOffsetPropertyChanged() : ParallaxViewProperties
  • OnVideoButtonClicked() : WebView2BasicPage
  • OnViewChanged() : PipsPagerExamples , ScrollPresenter
  • OnViewportChanged() : ViewportManagerDownLevel
  • OnVisibilityPropertyChanged() : WebView2 , ProgressBar
  • OnVisualizerPropertyChanged() : RefreshContainerProperties
  • OnVisualizerRefreshRequested() : RefreshContainer
  • OnVisualizerSizeChanged() : RefreshContainer
  • OnVisualPropertyChanged() : SplitButton , MenuBarItem , BreadcrumbBarItem
  • OnWebMessageReceived() : WebView2BasicPage
  • OnWideModeConfigurationPropertyChanged() : TwoPaneViewProperties
  • OnWindowRectChanging() : TabView
  • OnWrapModeChanged() : PipsPagerPage , PipsPager
  • OnWrapModePropertyChanged() : PipsPagerProperties
  • OnXamlPointerMessage() : WebView2
  • OnXamlRootChanged() : TwoPaneView
  • OnZoomAnimationStarting() : ScrollView
  • OnZoomChainModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnZoomLevelPropertyChanged() : MapControlProperties
  • OnZoomModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnZoomSnapPointsVectorChanged() : ScrollPresenter
  • Opacity() : IOpacityEffect
  • Opacity0ScalarAnimation_0_to_1() : AnimatedVisual
  • Opacity0ScalarAnimation_1_to_0() : AnimatedVisual
  • OpacityScalarAnimation_1_to_1_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OpacityScalarAnimation_1_to_1_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OpenAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OpenAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OpenAnimationKind() : CommandBarFlyoutCommandBar
  • OpenAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OpenAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • openButton : TeachingTipFocusTestPageElements
  • OpenCloseAppBarsButton_Click() : CommandBarPage
  • OpenedStatusChanged() : TeachingTipTestHooks , SwipeTestHooks , TeachingTipTestHooks
  • OpenFlyout() : DropDownButton , CommandBarFlyoutTests , BreadcrumbBarItem , SplitButton
  • OpenFlyoutFrom() : MenuBarItem
  • OpenFlyoutOn() : TextCommandBarFlyoutTests
  • OpenItems : DisposableUserControl
  • OpenOverflowMenuAndInvokeItem() : NavigationViewTestsBase
  • OpenPane() : NavigationView
  • OpenPaneButton_Click() : NavigationViewRS4Page , NavigationViewCustomThemeResourcesPage , NavigationViewPage , NavigationViewTopNavPage
  • OpenPaneLength() : NavigationViewProperties , NavigationViewTemplateSettingsProperties , NavigationViewProperties
  • OpenPaneLength_SelectionChanged() : NavigationViewRS4Page , NavigationViewPage , NavigationViewTopNavPage , NavigationViewCompactPaneLengthTestPage , NavigationViewCustomThemeResourcesPage
  • OpenPaneLengthProperty() : NavigationViewTemplateSettingsProperties , NavigationViewProperties
  • OpenTeachingTip() : TeachingTipTests
  • OpenTeachingTipButton_Click() : TeachingTipFocusPage , TeachingTipInXamlPage
  • Operation() : ItemCollectionTransition
  • operationCount : ScrollPresenterStackPanelAnchoringPage
  • OperationInfo()
: CompositionScrollController::OperationInfo
, BiDirectionalScrollController::OperationInfo
  • operations : CompositionScrollController , BiDirectionalScrollController
  • OperationsCount : BiDirectionalScrollController
  • operationsCount : ScrollBarController
  • operator bool() : GlobalDependencyProperty , sealed< T, fallback, RawStorageT > , event_base< ImplT, T, StorageT > , PropertyChanged_revoker , ScopedBatchCompleted_revoker , RoutedEventHandler_revoker , XamlRootChanged_revoker
  • operator class_type() : ElementFactoryGetArgsDownlevel , ElementFactoryRecycleArgsDownlevel
  • operator T() : auto_unbox , auto_cast
  • operator THandleType() : AutoHandle< THandlePolicy >
  • operator winrt::DependencyProperty() : GlobalDependencyProperty
  • operator!=() : AutoHandle< THandlePolicy > , sealed< T, fallback, RawStorageT >
  • operator&() : AutoHandle< THandlePolicy >
  • operator()() : event_base< ImplT, T, StorageT > , SnapPointWrapperComparator< T >
  • operator*() : MutexLockedResource< T >
  • operator->() : MutexLockedResource< T >
  • operator<() : SnapPointBase
  • operator=() : DesktopAcrylicBackdrop::ControllerEntry , sealed< T, fallback, RawStorageT > , XamlRootChanged_revoker , ScopedBatchCompleted_revoker , AutoHandle< THandlePolicy > , RoutedEventHandler_revoker , AutoHandle< THandlePolicy > , sealed< T, fallback, RawStorageT > , ScopedBatchCompleted_revoker , GlobalDependencyProperty , AutoHandle< THandlePolicy > , GlobalDependencyProperty , PropertyChanged_revoker , PerfXamlEvent_RAII , RoutedEventHandler_revoker , event_base< ImplT, T, StorageT > , XamlRootChanged_revoker , SimpleXamlStartStopEvent_RAII , AutoHandle< THandlePolicy > , PerfXamlEvent_RAII , MicaBackdrop::ControllerEntry , GlobalDependencyProperty , PropertyChanged_revoker , SimpleXamlStartStopEvent_RAII
  • operator==() : IndexRange , sealed< T, fallback, RawStorageT > , GlobalDependencyProperty , SnapPointBase , sealed< T, fallback, RawStorageT > , AutoHandle< THandlePolicy > , GlobalDependencyProperty , AutoHandle< THandlePolicy >
  • operator[]() : enum_array< E, T, N > , enum_vector< E, T > , enum_array< E, T, N > , enum_vector< E, T >
  • Optimization() : IGaussianBlurEffect
  • Options() : ViewChange , ScrollControllerScrollToRequestedEventArgs , ScrollControllerScrollByRequestedEventArgs
  • orangeBrush : ScrollPresenterStackPanelAnchoringPage
  • Orientation() : FlowLayoutProperties , InkToolBar , UniformGridLayoutProperties , BiDirectionalScrollController::UniScrollController , InkToolBarProperties , CompositionScrollController , ScrollBarController , ColorPickerProperties
  • orientation : CompositionScrollController
  • Orientation() : SliderInteraction , InkToolBarProperties , InkToolBar , ColorPickerProperties , PipsPagerProperties , PageInfo , UniformGridLayoutProperties , PipsPagerProperties , RefreshVisualizerProperties , StackLayoutProperties , SliderInteraction , StackLayoutProperties
  • OrientationBasedMeasures() : OrientationBasedMeasures
  • OrientationChangeTest() : PipsPagerTests
  • OrientationComboBox : PipsPagerElements
  • OrientationComboBox_SelectionChanged() : ColorPickerPage , RefreshVisualizerPage
  • OrientationProperty() : PipsPagerProperties , RefreshVisualizerProperties , InkToolBarProperties , UniformGridLayoutProperties , ColorPickerProperties , StackLayoutProperties , FlowLayoutProperties
  • originalLabelSecondaryCommand : CommandBarFlyoutPage
  • OriginalSource() : ItemContainerInvokedEventArgs
  • originalVisibilitySecondaryCommand : CommandBarFlyoutPage
  • originalWidthOverflowContentRoot : CommandBarFlyoutPage
  • originatingTabViewIdentifier : MultipleTabViewPage
  • OtherPlacementTopRightHighlightMargin() : TeachingTip
  • OuterAngleScale : RevealHoverSpotlightStateDesc , RevealBorderSpotlightStateDesc
  • OuterConeAngleInDegrees : RevealBorderSpotlightStateDesc
  • OuterConeColor : RevealHoverSpotlightStateDesc , RevealBorderSpotlightStateDesc
  • OuterConeIntensity : RevealHoverSpotlightStateDesc
  • OverflowButtonVisibility() : NavigationViewTemplateSettingsProperties
  • OverflowButtonVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • OverflowButtonWidth() : TopNavigationViewDataProvider
  • OverflowContentClipRect() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OverflowContentClipRectProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OverflowContentRoot_SizeChanged() : CommandBarFlyoutPage
  • OverflowLabelMode() : NavigationViewProperties
  • OverflowLabelModeProperty() : NavigationViewProperties
  • OverlappingRepeatedSnapPointsThrow() : ScrollPresenterTests
  • Overlay_PointerPressed() : AcrylicBrushPage
  • OverlayCornerRadius : CornerRadiusPage
  • OverlayCornerRadiusProperty : CornerRadiusPage
  • OverlayCornerRadiusSize : CornerRadiusPage
  • OverpanWithAnchoredSkrinkingContent() : ScrollPresenterTestsWithInputHelper
  • OverpanWithAnchoredSkrinkingContentVert() : ScrollPresenterTestsWithInputHelper
  • OverriddenOffsetChangeDuration : CompositionScrollController
  • Owner
: ScrollPresenterRepeaterAnchoringPage::SampleDataSource
, VirtualizationInfo
, SelectTemplateEventArgs
, MockElementFactory::GetElementCallInfo
, RecyclePool::ElementInfo
, BiDirectionalScrollController::UniScrollController
, ScrollPresenterBringIntoViewPage::SampleDataSource
, SelectTemplateEventArgs
, MockElementFactory::RecycleElementCallInfo
  • OwningProvider() : ItemCollectionTransition
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- z -

  • Zoom() : ScrollPresenterDynamicPage
  • ZoomAnimationStarting() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • ZoomBy() : ScrollPresenter , ScrollView , ScrollPresenterTests , ScrollPresenter
  • ZoomChainMode() : ScrollPresenterProperties , ScrollViewProperties
  • ZoomChainModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • ZoomCompleted() : ScrollPresenterProperties , ScrollViewProperties
  • ZoomedHorizontalOffset() : OffsetsChange
  • ZoomedVerticalOffset() : OffsetsChange
  • ZoomFactor : ScrollPresenter , ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs , ScrollPresenter , ZoomFactorChange , ScrollView
  • ZoomFactorChange() : ZoomFactorChange
  • ZoomFactorChangeCorrelationId() : ScrollingZoomCompletedEventArgs
  • ZoomFactorChangeWithAdditionalVelocity() : ZoomFactorChangeWithAdditionalVelocity
  • ZoomFactorChangeWithCustomDuration() : ScrollPresenterTests
  • ZoomFactorChangeWithNoContent() : ScrollPresenterTests
  • ZoomFactorVelocity() : ZoomFactorChangeWithAdditionalVelocity
  • ZoomLevel() : MapControlProperties
  • ZoomLevelProperty() : MapControlProperties
  • ZoomMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • ZoomModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • ZoomSnapPoint() : ZoomSnapPoint
  • ZoomSnapPointBase() : ZoomSnapPointBase
  • ZoomSnapPoints() : ScrollPresenter
  • ZoomStarting() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • zoomStartingCount : ScrollPresenterTests
  • ZoomTo() : ScrollView , ScrollPresenter , ScrollPresenterTests
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- ~ -

  • ~AcrylicBrush() : AcrylicBrush
  • ~AnimatedIcon() : AnimatedIcon
  • ~AnimatedVisualPlayer() : AnimatedVisualPlayer
  • ~AnnotatedScrollBar() : AnnotatedScrollBar
  • ~AnnotatedScrollBarIScrollControllerPage() : AnnotatedScrollBarIScrollControllerPage
  • ~AnnotatedScrollBarPanningInfo() : AnnotatedScrollBarPanningInfo
  • ~AnnotatedScrollBarRangeBasePage() : AnnotatedScrollBarRangeBasePage
  • ~AnnotatedScrollBarSummaryPage() : AnnotatedScrollBarSummaryPage
  • ~AutoHandle() : AutoHandle< THandlePolicy >
  • ~BreadcrumbBar() : BreadcrumbBar
  • ~BreadcrumbBarItem() : BreadcrumbBarItem
  • ~BreadcrumbLayout() : BreadcrumbLayout
  • ~BringIntoViewOffsetsChange() : BringIntoViewOffsetsChange
  • ~CMethodProfileGroup() : CMethodProfileGroup< size >
  • ~CommandBarFlyout() : CommandBarFlyout
  • ~CommandBarFlyoutCommandBar() : CommandBarFlyoutCommandBar
  • ~ControllerEntry()
: DesktopAcrylicBackdrop::ControllerEntry
, MicaBackdrop::ControllerEntry
  • ~DesktopAcrylicBackdrop() : DesktopAcrylicBackdrop
  • ~DisposableUserControl() : DisposableUserControl
  • ~event_base() : event_base< ImplT, T, StorageT >
  • ~Expander() : Expander
  • ~ExtendedSelector() : ExtendedSelector
  • ~IFlowLayoutAlgorithmDelegates() : IFlowLayoutAlgorithmDelegates
  • ~ImageIcon() : ImageIcon
  • ~InfoBadge() : InfoBadge
  • ~InfoBar() : InfoBar
  • ~InkCanvas() : InkCanvas
  • ~InteractionTrackerAsyncOperation() : InteractionTrackerAsyncOperation
  • ~InteractionTrackerOwner() : InteractionTrackerOwner
  • ~ItemCollectionTransitionProvider() : ItemCollectionTransitionProvider
  • ~ItemContainer() : ItemContainer
  • ~ItemsView() : ItemsView
  • ~ItemsViewIntegrationPage() : ItemsViewIntegrationPage
  • ~ItemsViewItemInvokedEventArgs() : ItemsViewItemInvokedEventArgs
  • ~ItemsViewSummaryPage() : ItemsViewSummaryPage
  • ~Iterator()
: SelectedItems< T >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
  • ~KeyboardNavigationSample() : KeyboardNavigationSample
  • ~LifetimeHandler() : LifetimeHandler
  • ~LinedFlowLayout() : LinedFlowLayout
  • ~LinedFlowLayoutDemo() : LinedFlowLayoutDemo
  • ~LinedFlowLayoutItemsInfoRequestedEventArgs() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ~MaterialHelper() : MaterialHelper
  • ~MenuBarItem() : MenuBarItem
  • ~MicaBackdrop() : MicaBackdrop
  • ~MonochromaticOverlayPresenter() : MonochromaticOverlayPresenter
  • ~MultipleSelector() : MultipleSelector
  • ~MutexLockedResource() : MutexLockedResource< T >
  • ~NavigationView() : NavigationView
  • ~NullSelector() : NullSelector
  • ~ObjectModelTestPage() : ObjectModelTestPage
  • ~OffsetsChange() : OffsetsChange
  • ~OffsetsChangeWithAdditionalVelocity() : OffsetsChangeWithAdditionalVelocity
  • ~PagerControl() : PagerControl
  • ~ParallaxView() : ParallaxView
  • ~PerfXamlEvent_RAII() : PerfXamlEvent_RAII
  • ~PointerInfo() : PointerInfo< T >
  • ~PropertyChanged_revoker() : PropertyChanged_revoker
  • ~RadialGradientBrush() : RadialGradientBrush
  • ~RadioButtons() : RadioButtons
  • ~RatingControl() : RatingControl
  • ~RefreshContainer() : RefreshContainer
  • ~RefreshInfoProviderImpl() : RefreshInfoProviderImpl
  • ~RefreshVisualizer() : RefreshVisualizer
  • ~RevealBrush() : RevealBrush
  • ~RoutedEventHandler_revoker() : RoutedEventHandler_revoker
  • ~ScopedBatchCompleted_revoker() : ScopedBatchCompleted_revoker
  • ~ScrollBarController() : ScrollBarController
  • ~ScrollControllerAddScrollVelocityRequestedEventArgs() : ScrollControllerAddScrollVelocityRequestedEventArgs
  • ~ScrollControllerPanRequestedEventArgs() : ScrollControllerPanRequestedEventArgs
  • ~ScrollControllerScrollByRequestedEventArgs() : ScrollControllerScrollByRequestedEventArgs
  • ~ScrollControllerScrollToRequestedEventArgs() : ScrollControllerScrollToRequestedEventArgs
  • ~ScrollingAnchorRequestedEventArgs() : ScrollingAnchorRequestedEventArgs
  • ~ScrollingBringingIntoViewEventArgs() : ScrollingBringingIntoViewEventArgs
  • ~ScrollingScrollAnimationStartingEventArgs() : ScrollingScrollAnimationStartingEventArgs
  • ~ScrollingScrollCompletedEventArgs() : ScrollingScrollCompletedEventArgs
  • ~ScrollingScrollOptions() : ScrollingScrollOptions
  • ~ScrollingScrollStartingEventArgs() : ScrollingScrollStartingEventArgs
  • ~ScrollingZoomAnimationStartingEventArgs() : ScrollingZoomAnimationStartingEventArgs
  • ~ScrollingZoomCompletedEventArgs() : ScrollingZoomCompletedEventArgs
  • ~ScrollingZoomOptions() : ScrollingZoomOptions
  • ~ScrollingZoomStartingEventArgs() : ScrollingZoomStartingEventArgs
  • ~ScrollInputHelper() : ScrollInputHelper
  • ~ScrollPresenter() : ScrollPresenter
  • ~ScrollPresenterAutomationPeer() : ScrollPresenterAutomationPeer
  • ~ScrollPresenterChainingAndRailingPage() : ScrollPresenterChainingAndRailingPage
  • ~ScrollPresenterDynamicPage() : ScrollPresenterDynamicPage
  • ~ScrollPresenterExpressionAnimationSourcesPage() : ScrollPresenterExpressionAnimationSourcesPage
  • ~ScrollPresenterManipulationModePage() : ScrollPresenterManipulationModePage
  • ~ScrollPresentersWithSimpleContentsPage() : ScrollPresentersWithSimpleContentsPage
  • ~ScrollView() : ScrollView
  • ~ScrollViewBlankPage() : ScrollViewBlankPage
  • ~ScrollViewBringIntoViewOperation() : ScrollViewBringIntoViewOperation
  • ~ScrollViewBringIntoViewPage() : ScrollViewBringIntoViewPage
  • ~ScrollViewDynamicPage() : ScrollViewDynamicPage
  • ~ScrollViewerIRefreshInfoProviderAdapter() : ScrollViewerIRefreshInfoProviderAdapter
  • ~ScrollViewerIRefreshInfoProviderDefaultAnimationHandler() : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • ~ScrollViewerPage() : ScrollViewerPage
  • ~ScrollViewKeyboardAndGamepadNavigationPage() : ScrollViewKeyboardAndGamepadNavigationPage
  • ~ScrollViewsWithSimpleContentsPage() : ScrollViewsWithSimpleContentsPage
  • ~ScrollViewWithScrollControllersPage() : ScrollViewWithScrollControllersPage
  • ~SelectedItems() : SelectedItems< T >
  • ~SelectionModel() : SelectionModel
  • ~SelectionNode() : final
  • ~SelectorBar() : SelectorBar
  • ~SelectorBarItem() : SelectorBarItem
  • ~SelectorBarSamplePage() : SelectorBarSamplePage
  • ~SelectorBarSummaryPage() : SelectorBarSummaryPage
  • ~SelectorBase() : SelectorBase
  • ~SingleSelector() : SingleSelector
  • ~SwipeControl() : SwipeControl
  • ~SwipeControlInteractionTrackerOwner() : SwipeControlInteractionTrackerOwner
  • ~TabView() : TabView
  • ~TargetData() : InkCanvas::TargetData
  • ~TitleBar() : TitleBar
  • ~tracker_ref() : sealed< T, fallback, RawStorageT >
  • ~TreeViewItem() : TreeViewItem
  • ~UniformGridLayoutDemo() : UniformGridLayoutDemo
  • ~VariableSizedItemsPage() : VariableSizedItemsPage
  • ~ViewChange() : ViewChange
  • ~ViewModel() : ViewModel
  • ~WebView2() : WebView2
  • ~WebView2_TryCompleteInitialization_RAII() : WebView2_TryCompleteInitialization_RAII
  • ~XamlRootChanged_revoker() : XamlRootChanged_revoker
  • ~ZoomFactorChange() : ZoomFactorChange
  • ~ZoomFactorChangeWithAdditionalVelocity() : ZoomFactorChangeWithAdditionalVelocity
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- a -

  • A : ColorPickerTests::Color
  • abi_enter() : ReferenceTracker< D, ImplT, I >
  • accent : RevealSimpleListPage
  • accentColor : RevealSimpleListPage
  • AcceptsExpression() : NumberBoxProperties
  • AcceptsExpressionProperty() : NumberBoxProperties
  • AccessibilityTest() : AnimatedVisualPlayerTests , DropDownButtonTests , SplitButtonTests
  • AccessibilityViewTest() : InfoBarTests
  • AccessKeys() : RadioButtonsTests
  • AccessKeyTest() : WebView2Tests
  • AccTypeTest() : CommonTests
  • AcrylicAlwaysUseFallback() : AcrylicBrushTests
  • AcrylicBrush() : AcrylicBrush , AcrylicTestApi
  • AcrylicBrushBasicPage() : AcrylicBrushBasicPage
  • AcrylicBrushCacheHelperParam : MaterialHelperBase
  • AcrylicBrushFactory() : AcrylicBrushFactory
  • AcrylicBrushLuminosityTestPage() : AcrylicBrushLuminosityTestPage
  • AcrylicBrushNames : AcrylicColorPage
  • AcrylicBrushPage() : AcrylicBrushPage
  • AcrylicBrushProperties() : AcrylicBrushProperties
  • AcrylicColorPage() : AcrylicColorPage
  • AcrylicCreatedInFallbackMode() : AcrylicBrushTests
  • AcrylicFromMarkup() : AcrylicBrushTests
  • AcrylicMarkupPage() : AcrylicMarkupPage
  • AcrylicNoiseCache() : AcrylicBrushTests
  • AcrylicPage() : AcrylicPage
  • AcrylicPropertyChanges() : AcrylicBrushTests
  • AcrylicRectangleName : AcrylicBrushTests , RevealBrushTests
  • AcrylicRendering() : AcrylicBrushTests
  • AcrylicRendering_AcrylicOnComplexTransparentBG() : AcrylicBrushTests
  • AcrylicRendering_LuminosityBlend() : AcrylicBrushTests
  • AcrylicRenderingPage() : AcrylicRenderingPage
  • AcrylicTestApi : AcrylicBrush
  • ActionButton : TeachingTipPage , InfoBarProperties
  • ActionButton_Click() : InfoBarPage
  • ActionButtonClick() : TeachingTipProperties
  • ActionButtonComboBox_SelectionChanged() : InfoBarPage
  • ActionButtonCommand() : TeachingTipProperties
  • ActionButtonCommandParameter() : TeachingTipProperties
  • ActionButtonCommandParameterProperty() : TeachingTipProperties
  • ActionButtonCommandProperty() : TeachingTipProperties
  • ActionButtonContent() : TeachingTipProperties
  • actionButtonContentComboBox : TeachingTipTestPageElements
  • ActionButtonContentProperty() : TeachingTipProperties
  • ActionButtonProperty() : InfoBarProperties
  • ActionButtonStyle() : TeachingTipProperties
  • ActionButtonStyleProperty() : TeachingTipProperties
  • ActivateInstance() : XamlTypeBase , ItemsSourceViewFactory
  • activeTabContentBackgroundBrushCache : TabViewPage
  • activeTabSelectedBackgroundPathBrushCache : TabViewPage
  • ActiveTool() : InkToolBarProperties , InkToolBar
  • ActiveToolChanged() : InkToolBarProperties
  • ActiveToolProperty() : InkToolBarProperties
  • ActivityFeedSamplePage() : ActivityFeedSamplePage
  • ActualApplicableZone() : SnapPointWrapper< T >
  • ActualEnd() : RepeatedScrollSnapPoint
  • ActualImageBrush() : PersonPictureTemplateSettingsProperties
  • ActualImageBrushProperty() : PersonPictureTemplateSettingsProperties
  • ActualInitials() : PersonPictureTemplateSettingsProperties
  • ActualInitialsProperty() : PersonPictureTemplateSettingsProperties
  • ActualLineHeight() : LinedFlowLayoutProperties
  • ActualLineHeightProperty() : LinedFlowLayoutProperties
  • ActualOffset() : RepeatedScrollSnapPoint
  • ActualRatingFontSize() : RatingControl
  • ActualStart() : RepeatedScrollSnapPoint
  • ActualValue() : ScrollSnapPoint
  • Adapt() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter
  • adapt() : SliderRefreshInfoProviderAdapter
  • AdaptButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • adapter : AnnotatedScrollBarRangeBasePage
  • adapterTimer : RefreshVisualizerPage
  • AdaptFromTree() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter , IRefreshInfoProviderAdapter
  • AdaptFromTreeRecursiveHelper() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter
  • AdaptOnNullThrows() : ScrollViewerAdapterTests
  • AdaptOnSV() : ScrollViewerAdapterTests
  • AdaptOnSVWithNonUIElementContentThrows() : ScrollViewerAdapterTests
  • AdaptOnSVWithoutContentThrows() : ScrollViewerAdapterTests
  • AdaptOnSVWithoutWaitingForLoaded() : ScrollViewerAdapterTests
  • AdaptOnSVWithoutWaitingForLoaded_Click() : ScrollViewerAdapterPage
  • Add() : CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , final , MyCollection , final
  • add() : event_base< ImplT, T, StorageT >
  • AddAndSelectSubMenuItem() : HierarchicalNavigationViewDataBinding
  • AddBackRevealButton_Click() : RevealRegressionTestsPage
  • AddButton_Click() : NavigationViewInitPage , NavigationViewTopNavStorePage
  • AddButtonClick() : TabViewPage , TabViewTabClosingBehaviorPage
  • AddButtonSuppressSelection_Click() : NavigationViewTopNavStorePage
  • AddButtonTest() : TabViewTests
  • AddChild() : LinedFlowLayoutDemo
  • AddChildItemToMI19() : HierarchicalNavigationViewMarkup
  • AddDPMember() : XamlTypeBase
  • AddDropShadow() : CommandBarFlyout
  • AddedItems() : TreeViewSelectionChangedEventArgs
  • AddEventHandler() : ObservableTraits< T, true, isBindable > , ObservableVectorInnerImpl< VectorOptions, Wrapper >
  • AddExpandedChanged() : TreeViewNode
  • AddExtraNodes_Click() : TreeViewPage
  • AddFlyoutItem_Click() : MenuBarPage
  • addFlyoutTimer : CommandBarFlyoutPage
  • AddFlyoutTimer_Tick() : CommandBarFlyoutPage
  • AddFooterButton_Click() : NavigationViewInitPage
  • AddFooterItemButton_Click() : NavigationViewPage , PaneLayoutTestPage , NavigationViewTopNavPage
  • AddGradientStop() : ColorPicker
  • AddGradientStopButton_Click() : RadialGradientBrushPage
  • AddGradientStopTest() : RadialGradientBrushTests
  • AddHostObjectToScript() : ICoreWebView2Interop
  • AddHostObjectToScriptTest() : WebView2Tests
  • AddInfoBarClick() : InfoBarPage
  • AddingAnimatedIconToGridWithoutAStateDoesNotPropogateState() : AnimatedIconTests
  • AddInheritedTreeViewNode_Click() : TreeViewPage
  • AddItem4Button_Click() : NavigationViewTopNavOverflowButtonPage
  • AddItemButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • AddItemsAndCompressBreadcrumbTest() : BreadcrumbTests
  • AddItemsAndInvokeBreadcrumbBarItemTest() : BreadcrumbTests
  • AdditionalGridDoesntOverExtendHorizontal() : SwipeControlTests
  • AddLayer_Click() : MapControlPage
  • AddLongNavItem_Click() : NavigationViewTopNavOnlyPage
  • AddMapIcon() : MapControl
  • AddMarginCheckBox_Checked() : TwoPaneViewPage
  • AddMarginCheckBox_Unchecked() : TwoPaneViewPage
  • AddMember() : XamlTypeBase
  • AddMenuBarItem_Click() : MenuBarPage
  • AddMenuBarToEmptyMenuBarItem_Click() : MenuBarPage
  • AddMenuItem() : HierarchicalNavigationViewDataBinding
  • AddMenuItemButton_Click() : PaneLayoutTestPage
  • AddMultipleElementsOnMap() : MapControlTests
  • AddNewTab() : MultipleTabViewPage
  • AddNodeDescendantsToView() : ViewModel
  • AddNodeToView() : ViewModel
  • AddNodeWithEmpyUnrealizedChildren_Click() : TreeViewPage
  • AddOrRemoveRefreshDelayButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • AddPassThroughElement() : MenuBarItem
  • AddPin() : VirtualizationInfo
  • AddPin_Click() : MapControlPage
  • AddRandomGradientStop() : RadialGradientBrushPage
  • AddRange() : final
  • AddRemoveContentOverlay_Click() : NavigationViewTopNavOnlyPage , NavigationViewTopNavStorePage
  • AddRemoveFooterItemTest() : CommonTests
  • AddRemoveItemTest() : CommonTests
  • AddRemoveMenuBarItemTest() : MenuBarTests
  • AddRemoveMenuFlyoutItemTest() : MenuBarTests
  • AddRemoveOriginalItemTest() : CommonTests
  • AddRemoveTest() : TabViewTests
  • Address : Customer
  • AddReveal_Click() : CoreWindowEventsPage
  • AddRevealButton_Click() : RevealRegressionTestsPage
  • AddRootNode_Click() : TreeViewPage
  • AddScroller() : ViewportManagerDownLevel
  • AddScrollVelocity() : ScrollPresenterTests , ScrollPresenter , BiDirectionalScrollController , CompositionScrollController , ScrollView
  • AddScrollVelocityRequested : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController
  • AddSecondLevelOfNodes_Click() : TreeViewPage
  • AddShowAndSelectSubMenuItem() : HierarchicalNavigationViewDataBinding
  • AddSnapPoints() : ScrollPresenterTests
  • AddSwipeItemsButton_Click() : SwipeControlClearPage
  • AddTabButtonClick() : TabViewProperties
  • AddTabButtonCommand() : TabViewProperties
  • AddTabButtonCommandParameter() : TabViewProperties
  • AddTabButtonCommandParameterProperty() : TabViewProperties
  • AddTabButtonCommandProperty() : TabViewProperties
  • AddTenItems_Click() : NavigationViewTopNavOnlyPage
  • AddToChildrenNodes() : TreeViewNode
  • AddToMap() : XamlTypeBase
  • AddToSelection() : ItemContainerAutomationPeer , NavigationViewItemAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer
  • AddToVector() : XamlTypeBase
  • AddWebViewControl() : WebView2BasicPage
  • AddWebViewEventHandlers() : WebView2BasicPage , WebView2CoreObjectsPage
  • AddZoomVelocity() : ScrollPresenterTests , ScrollPresenter , ScrollView
  • Algorithm_GetAnchorForRealizationRect() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetAnchorForTargetElement() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetExtent() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetMeasureSize() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetProvisionalArrangeSize() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_OnElementMeasured() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_OnLineArranged() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_ShouldBreakLine() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • AlignContent : Flex
  • AlignContentProperty : Flex
  • AlignItems : Flex
  • AlignItemsProperty : Flex
  • Alignment() : ScrollSnapPointBase
  • AlignmentX() : ItemsRepeaterScrollHost::BringIntoViewState
  • AlignmentY() : ItemsRepeaterScrollHost::BringIntoViewState
  • AlignSelfProperty : Flex
  • AlignStackPanel() : SwipeControl
  • AllowDrop() : TabViewExternalTornOutTabsDroppingEventArgs
  • AllowDropTabs() : TabViewProperties
  • AllowDropTabsProperty() : TabViewProperties
  • AllTypes : SortingAndFilteringPage
  • AlphaAmplitude() : IGammaTransferEffect
  • AlphaDisable() : IGammaTransferEffect , ILinearTransferEffect
  • alphaEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • AlphaExponent() : IGammaTransferEffect
  • AlphaLabelAutomationId : ColorPickerTests
  • AlphaMode() : IColorMatrixEffect , ISepiaEffect
  • AlphaOffset() : IGammaTransferEffect , ILinearTransferEffect
  • AlphaSliderAutomationId : ColorPickerTests
  • AlphaSliderChanged : ColorPicker
  • AlphaSlope() : ILinearTransferEffect
  • AlphaTextBoxAutomationId : ColorPickerTests
  • AlphaTextBoxChanged : ColorPicker
  • AlreadyDeselectedDoesNotRaiseEvent() : SelectionModelTests
  • AlreadySelectedDoesNotRaiseEvent() : SelectionModelTests
  • AlternateLayoutPaths() : ItemsViewTests
  • AlternateLayoutPathsByUnhookingItemsInfoRequested() : ItemsViewTests
  • AlternateLayoutPathsWithSizeArrays() : ItemsViewTests
  • AlternateLayoutPathsWithUniformSizes() : ItemsViewTests
  • AlwaysExpanded() : CommandBarFlyout
  • AlwaysShowHeader() : NavigationViewProperties
  • AlwaysShowHeaderProperty() : NavigationViewProperties
  • AlwaysShowHeaderTest() : CommonTests
  • AlwaysUseFallback() : AcrylicBrushProperties , RevealBrushProperties
  • AlwaysUseFallbackButton_Checked() : AcrylicBrushPage , RevealFallbackPage
  • AlwaysUseFallbackButton_Unchecked() : AcrylicBrushPage , RevealFallbackPage
  • AlwaysUseFallbackHelper() : RevealFallbackPage
  • AlwaysUseFallbackProperty() : AcrylicBrushProperties , RevealBrushProperties
  • Amount : Ingredient
  • AncestorTreeView() : TreeViewItem
  • AnchorCandidates() : ScrollingAnchorRequestedEventArgs
  • anchorElement : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • AnchorElement : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , ScrollingAnchorRequestedEventArgs , ScrollPresenter , ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • AnchorEvaluated() : ScrollPresenterTestHooks
  • AnchorIndex() : SelectionModel , final
  • AnchoringAtAlmostBottomEdge() : ScrollPresenterTests
  • AnchoringAtAlmostFarEdge() : ScrollPresenterTests
  • AnchoringAtAlmostLeftEdge() : ScrollPresenterTests
  • AnchoringAtAlmostNearEdge() : ScrollPresenterTests
  • AnchoringAtAlmostRightEdge() : ScrollPresenterTests
  • AnchoringAtAlmostTopEdge() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileDecreasingViewportHeight() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileIncreasingContentAndDecreasingViewportHeight() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileIncreasingContentAndViewportHeight() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileIncreasingContentHeight() : ScrollPresenterTests
  • AnchoringAtFarEdgeWhileDecreasingViewport() : ScrollPresenterTests
  • AnchoringAtFarEdgeWhileIncreasingContent() : ScrollPresenterTests
  • AnchoringAtLeftEdge() : ScrollPresenterTests
  • AnchoringAtNearEdge() : ScrollPresenterTests
  • AnchoringAtRepeaterMiddle() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileDecreasingViewportWidth() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileIncreasingContentAndDecreasingViewportWidth() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileIncreasingContentAndViewportWidth() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileIncreasingContentWidth() : ScrollPresenterTests
  • AnchoringAtTopEdge() : ScrollPresenterTests
  • AnchoringElementWithGrowningViewport() : ScrollPresenterTests
  • AnchoringElementWithResizedViewport() : ScrollPresenterTests
  • AnchoringElementWithShrinkingViewport() : ScrollPresenterTests
  • AnchoringWithOffsetCoercion() : ScrollPresenterTests
  • AnchoringWithReducedExtent() : ScrollPresenterTests
  • AnchoringWithReducedExtentAndAnchorOffset() : ScrollPresenterTests
  • AnchorRequested() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • Angle() : IHueRotationEffect
  • angleInRadiansTolerance : RevealStatesPage
  • Animate() : ItemsRepeaterScrollHost::BringIntoViewState
  • AnimateBackgroundButton_Checked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • AnimateBackgroundButton_Unchecked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • AnimatedAcceptVisualSource_AnimatedVisual() : AnimatedAcceptVisualSource_AnimatedVisual
  • AnimatedBackVisualSource_AnimatedVisual() : AnimatedBackVisualSource_AnimatedVisual
  • AnimatedChevronDownSmallVisualSource_AnimatedVisual() : AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • AnimatedChevronRightDownSmallVisualSource_AnimatedVisual() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • AnimatedChevronUpDownSmallVisualSource_AnimatedVisual() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • animatedCommandBarFlyoutCommandBarStyle : CommandBarFlyoutPage
  • AnimatedFindVisualSource_AnimatedVisual() : AnimatedFindVisualSource_AnimatedVisual
  • AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • AnimatedIcon() : AnimatedIcon
  • AnimatedIconHost() : AnimatedIconHost
  • AnimatedIconPage() : AnimatedIconPage
  • AnimatedIconPage_Loaded() : AnimatedIconPage
  • AnimatedIconProperties() : AnimatedIconProperties
  • AnimatedIconSourceProperties() : AnimatedIconSourceProperties
  • AnimatedIconSourceTest() : IconSourceApiTests
  • AnimatedIconStateProperty() : AnimatedIcon
  • AnimatedIconTestHooks_LastAnimationSegmentChanged() : ToggleAnimatedIconHost , AnimatedIconHost , AnimatedIconPage
  • AnimatedSettingsVisualSource_AnimatedVisual() : AnimatedSettingsVisualSource_AnimatedVisual
  • animatedSwipe : SwipeControlPage
  • AnimatedValuesSpy : SimpleRectanglePage , DynamicPage , RatingControlPage , SwipeControlPage
  • AnimatedVisual() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • AnimatedVisualInvalidated : IAnimatedVisualSource
  • AnimatedVisualPlayer() : AnimatedVisualPlayer
  • AnimatedVisualPlayerAutomationPeer() : AnimatedVisualPlayerAutomationPeer
  • AnimatedVisualPlayerPage() : AnimatedVisualPlayerPage
  • AnimatedVisualPlayerProperties : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • AnimateOffset() : DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • AnimateOffsetsBeforeLoading() : ScrollPresenterTests
  • AnimateSelectionChanged() : NavigationView
  • AnimateSelectionChangedToItem() : NavigationView
  • AnimateTo() : RevealScenarioLights
  • AnimateZoomFactorBeforeLoading() : ScrollPresenterTests
  • Animation() : ScrollingScrollAnimationStartingEventArgs , ScrollingZoomAnimationStartingEventArgs
  • AnimationComplete : RevealHoverLight
  • AnimationElementFactory() : AnimationsDemoPage::AnimationElementFactory
  • AnimationHandler() : AnimationHandler
  • animationHandler : ImageIRefreshInfoProviderAdapter
  • AnimationMode() : ScrollingScrollOptions , ScrollingZoomOptions
  • AnimationOptimization() : AnimatedVisualPlayerProperties
  • AnimationOptimizationProperty() : AnimatedVisualPlayerProperties
  • AnimationPlay() : AnimatedVisualPlayer::final
  • AnimationsDemoPage() : AnimationsDemoPage
  • AnimationSlowdownFactor : DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • AnimationType : CompositionScrollController
  • AnimToHover : RevealHoverLight
  • AnimToOff : RevealHoverLight
  • AnnotatedScrollBar() : AnnotatedScrollBar
  • AnnotatedScrollBar_DetailLabelRequested() : AnnotatedScrollBarSummaryPage , AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage , ItemsViewIntegrationPage
  • AnnotatedScrollBar_DetailLabelRequestedLog() : ItemsViewIntegrationPage
  • AnnotatedScrollBar_Scrolling() : ItemsViewIntegrationPage
  • AnnotatedScrollbar_Scrolling() : AnnotatedScrollBarSummaryPage
  • AnnotatedScrollBar_ScrollingLog() : ItemsViewIntegrationPage
  • AnnotatedScrollBar_SizeChanged() : ItemsViewIntegrationPage
  • AnnotatedScrollBarDetailLabelRequestedEventArgs() : AnnotatedScrollBarDetailLabelRequestedEventArgs
  • AnnotatedScrollBarIScrollControllerPage() : AnnotatedScrollBarIScrollControllerPage
  • AnnotatedScrollBarLabel() : AnnotatedScrollBarLabel
  • AnnotatedScrollBarPage() : AnnotatedScrollBarPage
  • AnnotatedScrollBarPage_Loaded() : AnnotatedScrollBarSummaryPage , AnnotatedScrollBarIScrollControllerPage
  • AnnotatedScrollBarPanningInfo() : AnnotatedScrollBarPanningInfo
  • AnnotatedScrollBarProperties() : AnnotatedScrollBarProperties
  • AnnotatedScrollBarRangeBasePage() : AnnotatedScrollBarRangeBasePage
  • AnnotatedScrollBarRangeBasePage_Loaded() : AnnotatedScrollBarRangeBasePage
  • AnnotatedScrollBarScrollingEventArgs() : AnnotatedScrollBarScrollingEventArgs
  • AnnotatedScrollBarSummaryPage() : AnnotatedScrollBarSummaryPage
  • AnotherButton_Click() : RevealStatesPage
  • AnotherListViewItem_Holding() : RevealStatesPage
  • AnotherObject : Bridge
  • AnticipatedOffsetsChange() : OffsetsChangeWithAdditionalVelocity
  • AnticipatedScrollableHeight() : ScrollPresenter
  • AnticipatedScrollableWidth() : ScrollPresenter
  • AnticipatedZoomedHorizontalOffset() : ScrollPresenter
  • AnticipatedZoomedVerticalOffset() : ScrollPresenter
  • AnticipatedZoomFactor() : ScrollPresenter
  • AnticipatedZoomFactorChange() : ZoomFactorChangeWithAdditionalVelocity
  • AppBarButton_Click() : NavigationViewTopNavStorePage
  • AppBarButtonDensityTest() : CommonStylesTests
  • AppBarButtonDensityTest_Click() : CommonStylesPage
  • AppBarPage() : AppBarPage
  • AppBarToggleButtonDensityTest() : CommonStylesTests
  • AppBarToggleButtonDensityTest_Click() : CommonStylesPage
  • Append() : SelectedItemsVector , SelectedTreeNodeVector , TreeViewNodeVector , VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SwipeItems , ViewModel
  • AppendAsyncEventMessage() : ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewWithScrollControllersPage , SwipeControlPage , ScrollViewBlankPage , ScrollViewDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollViewDynamicPage , SwipeControlPage , ScrollPresenterRepeaterAnchoringPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewBringIntoViewPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterDynamicPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ItemsViewIntegrationPage , ImagePage , ScrollPresenterBringIntoViewPage , ItemsViewBlankPage , ImagePage , ItemsViewIntegrationPage , ScrollViewBlankPage , LinedFlowLayoutDemo , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ItemsViewSummaryPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBringIntoViewPage
  • AppendButtonToNumberPanelList() : PagerControl
  • AppendEllipsisIconToNumberPanelList() : PagerControl
  • AppendEventMessage() : FlatItemsControlPage , GroupedListViewBasePage , ListViewBasePage , ItemsViewPictureLibraryPage , ObjectModelTestPage , SelectorBarSummaryPage , ItemsViewSummaryPage , VariableSizedItemsPage , LinedFlowLayoutDemo , ItemsViewPictureLibraryPage , GroupedItemsControlPage , ScrollViewerPage
  • AppendLog() : KeyboardNavigationSample
  • AppendMessage() : WebView2BasicPage , WebView2Common
  • ApplyConstraintsToRgbColor() : ColorPicker
  • ApplyCustomMenuItemContainerStyling() : NavigationView
  • ApplyPendingChangeView() : ItemsRepeaterScrollHost
  • ApplyScaleExpressionAnimation() : RatingControl
  • ApplySelectionModelSelectionChange() : ItemsView
  • ApplyStyleToPipAndUpdateOrientation() : PipsPager
  • ApplyTemplateSettings() : ProgressRing
  • ApplyVerticalScrollController() : ItemsView
  • APPROXIMATE_MARGIN : RatingControlTests
  • AreAllAncestorsVisible() : WebView2
  • AreAllScrollControllersCollapsed() : ScrollView
  • AreAnchorNotificationsRaised() : ScrollPresenterTestHooks
  • AreBothScrollControllersVisible() : ScrollView
  • AreCheckStatesEnabledProperty() : RadioMenuFlyoutItemProperties
  • AreChildrenNodesEqualToItemsSource() : TreeViewNode
  • AreClose() : ScrollViewTestsWithInputHelper , RefreshInfoProviderImpl , AcrylicRenderingPage
  • AreEqual() : SelectionModelTests
  • AreEqualIgnoringSpace() : WebView2BasicPage
  • AreExpressionAnimationStatusNotificationsRaised() : ScrollPresenterTestHooks
  • AreInteractionSourcesNotificationsRaised() : ScrollPresenterTestHooks
  • AreKeysFromExpectedInActualDictionary() : CommonStylesApiTests
  • AreNavigationKeysOpposite() : ItemsView
  • ArePrecisionErasersVisible() : InkToolBarEraserButtonProperties , InkToolBarEraserButton
  • ArePrecisionErasersVisibleProperty() : InkToolBarEraserButtonProperties
  • AreScrollButtonsVisible() : TabViewTests
  • AreScrollControllersAutoHiding() : ScrollView
  • AroundTheEndAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • AroundTheEndAnimationTest() : AnimatedVisualPlayerTests
  • Arrange() : FlowLayoutAlgorithm , Layout
  • ArrangeBounds() : VirtualizationInfo
  • ArrangeConstrainedLines() : LinedFlowLayout
  • ArrangeContent() : ScrollPresenter
  • ArrangeInvalidated() : Layout , LayoutProperties , Layout
  • ArrangeItem() : BreadcrumbLayout
  • ArrangeLayoutFunc : MockStackLayout , MockVirtualizingLayout , MockNonVirtualizingLayout , FlowLayoutDerived
  • ArrangeOverride() : StackLayout , NonVirtualStackLayout , UniformGrid2DLayout , MockNonVirtualizingLayout , ViewportTests::TestScrollingSurface , VirtualizingUniformStackLayout , ParallaxView , VirtualizingUniformCarouselStackLayout , VirtualizingStackLayout , Flex , WebView2 , MockVirtualizingLayout , MyCustomNonVirtualizingStackLayout , LayoutPanel , AnimatedIcon , AspectRatioRespectingControl , InfoBarPanel , CircleLayout , ColumnMajorUniformToLargestGridLayout , AnimatedVisualPlayer , FlowLayoutDerived , MockStackLayout , ScrollPresenter , ActivityFeedLayout , VirtualizingLayout , BreadcrumbLayout , NonVirtualStackLayout , UniformGridLayout , ItemsRepeaterScrollHost , FlowLayout , NonVirtualizingLayout , ItemsRepeater , LinedFlowLayout
  • ArrangeTopNavItems() : NavigationView
  • ArrangeUnconstrainedLine() : LinedFlowLayout
  • ArrangeVirtualizingLayout() : FlowLayoutAlgorithm
  • ArrowKeyHierarchicalNavigationTest() : FocusBehaviorTests
  • ArrowKeyNavigationTest() : FocusBehaviorTests
  • as() : sealed< T, fallback, RawStorageT >
  • AspectRatio : Recipe , Picture
  • aspectRatios : ItemsViewPictureLibraryPage
  • AssertUniqueCompositorOrUpdate() : MaterialHelperBase
  • asyncEventReportingLock : ScrollPresenterDynamicPage , SwipeControlPage , ScrollBarController , ScrollViewBlankPage , ScrollViewWithScrollControllersPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ImagePage , ItemsViewBlankPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterBringIntoViewPage , ScrollViewBringIntoViewPage
  • AsyncWebViewOperations() : final
  • Attach() : AutoHandle< THandlePolicy >
  • AttachControlEventHandlers() : CommandBarFlyoutCommandBar
  • AttachDismissingHandlers() : SwipeControl
  • AttachedData() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • AttachEventHandlers() : MenuBarItem , SwipeControl , SwipeItem
  • AttachEventsToSecondaryStoryboards() : CommandBarFlyoutCommandBar
  • AttachItemEventHandlers() : CommandBarFlyoutCommandBar
  • AttachLights() : RevealBrush
  • AttachLightsImpl() : RevealBrush
  • AttachLightsToAncestor() : RevealBrush
  • AttachLightsToElement() : RevealBrush
  • AttachMoveSizeLoopEvents() : TabView
  • AttachToCompositionTarget() : InkCanvas
  • AttachToLayoutChanged() : RadioButtons
  • AttachToVisualLink() : InkCanvas
  • AttemptClosePaneLightly() : NavigationView
  • AttributeTable : RegisterMetadata
  • auto_cast() : auto_cast
  • auto_unbox() : auto_unbox
  • AutoDisplayChangingPageTest() : PagerControlTests
  • AutoDisplayModeThresholdValue : PagerControlTestBase
  • AutoHandle() : AutoHandle< THandlePolicy >
  • AutoHideScrollControllers : ScrollViewTestHooksHelper
  • automationNameComboBox : TeachingTipTestPageElements
  • AutomationNameIsForwardedToPopup() : TeachingTipTests
  • AutomationNameOptions : TeachingTipTestPageElements
  • AutomationOutput : NavigationViewItemAutomationPeer
  • AutomationPeerTest() : ExpanderTests , MenuBarTests
  • AutoPlacement() : TeachingTipTests
  • AutoPlay() : AnimatedVisualPlayerProperties
  • AutoPlayProperty() : AnimatedVisualPlayerProperties
  • AutoRecycleCandidate() : VirtualizationInfo
  • AutoSuggestBox() : NavigationViewProperties
  • AutoSuggestBox_QuerySubmitted() : AutoSuggestBoxPage
  • AutoSuggestBox_TextChanged() : NavigationViewPage , CompactPage , CommonStylesPage
  • AutoSuggestBoxDensityTest() : CommonStylesTests
  • AutoSuggestBoxDensityTest_Click() : CommonStylesPage
  • AutoSuggestBoxHelper() : AutoSuggestBoxHelper
  • AutoSuggestBoxHelperProperties() : AutoSuggestBoxHelperProperties
  • AutoSuggestBoxOnTopNavTest() : CommonTests
  • AutoSuggestBoxPage() : AutoSuggestBoxPage
  • AutoSuggestBoxProperty() : NavigationViewProperties
  • AutoSuggestBoxTest() : CommonTests
  • AutoSuggestCheckbox_Checked() : NavigationViewTopNavPage , NavigationViewRS4Page , NavigationViewPage
  • AutoSuggestCheckbox_Unchecked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • AutoSuggestEventRevokersProperty() : AutoSuggestBoxHelper
  • AutoSuggestSource : CornerRadiusPage
  • AutoTintLuminosityOpacity_IsCheckedChanged() : AcrylicBrushPage
  • AverageItemAspectRatioDbg() : LinedFlowLayout
  • await_ready() : Awaitable
  • await_resume() : Awaitable
  • await_suspend() : Awaitable
  • Awaitable() : Awaitable
  • Azimuth() : IDistantSpecularEffect , IDistantDiffuseEffect , IDistantSpecularEffect , IDistantDiffuseEffect
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- b -

  • B : ColorPickerTests::Color
  • BackButtonEnabledCheckbox_Checked() : NavigationViewCompactPaneLengthTestPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewPage , NavigationViewTopNavPage
  • BackButtonEnabledCheckbox_Unchecked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewCompactPaneLengthTestPage
  • BackButtonPlaceHolderOnTopNavTest() : CommonTests
  • BackButtonVisibility() : NavigationViewTemplateSettingsProperties
  • BackButtonVisibilityCheckbox_Checked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage , NavigationViewCompactPaneLengthTestPage
  • BackButtonVisibilityCheckbox_Unchecked() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage
  • BackButtonVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • Background() : ItemsRepeaterProperties , ScrollPresenterProperties , SwipeItemProperties , ProgressRingDeterminate , ProgressRingIndeterminate , BreadcrumbBarFolder , IBlendEffect , ItemsRepeaterProperties
  • BackgroundBrushNames : LightConfigurationTests , RevealColorPage
  • BackgroundColorButton_Click() : RevealSimpleListPage
  • backgroundColorCache : TabViewPage
  • BackgroundColorCounter : RefreshVisualizerPage
  • BackgroundComboBoxChanged() : RevealScenarioGrid , RevealScenarioList
  • BackgroundLight() : RevealTestApi
  • BackgroundLightMaxSize() : RevealTestApi
  • BackgroundLightMinSize() : RevealTestApi
  • BackgroundProperty() : ItemsRepeaterProperties , ScrollPresenterProperties , SwipeItemProperties
  • BackgroundPropertyComboBox_SelectionChanged() : VisualPropertiesPage
  • backgroundTypeSource : RevealScenarioGrid , RevealScenarioList
  • BackRequested() : NavigationViewProperties , TitleBarProperties
  • backRequestedCount : TitleBarPageWindow
  • BackRequestedStateResetButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • BackRequestedTest() : EventTests
  • BackToolTipTest() : CommonTests
  • BackupTap() : RadioButtonsTests
  • Backward : FlowLayoutAlgorithm
  • BadgeGlyph() : PersonPictureProperties
  • BadgeGlyphProperty() : PersonPictureProperties
  • BadgeGlyphTextBox_TextChanged() : PersonPicturePage
  • BadgeImageSource() : PersonPictureProperties
  • BadgeImageSourceProperty() : PersonPictureProperties
  • BadgeNumber : PersonPicturePage::SportsPerson , PersonPictureProperties
  • BadgeNumberProperty() : PersonPictureProperties
  • BadgeNumberTextBox_TextChanged() : PersonPicturePage
  • BadgeText() : PersonPictureProperties
  • BadgeTextProperty() : PersonPictureProperties
  • BaseType() : XamlTypeBase
  • BasicAcrylicOnRectangle() : AcrylicBrushTests
  • BasicAlignment() : ScrollPresenterTests
  • BasicCoreObjectCreationAndDestructionTest() : WebView2Tests
  • BasicDemo() : BasicDemo
  • BasicExpressionTest() : NumberBoxTests
  • BasicFlingTouchTest() : WebView2Tests
  • BasicImageWithConstrainedHeight() : ScrollPresenterTests
  • BasicImageWithConstrainedWidth() : ScrollPresenterTests
  • BasicInteractionTest() : PersonPictureTests , RefreshContainerTests , RatingControlTests , SplitButtonTests
  • BasicKeyboardTest() : NumberBoxTests , RadioButtonsTests , WebView2Tests
  • BasicLongPressTouchTest() : WebView2Tests
  • BasicMargin() : ScrollPresenterTests
  • BasicMarginAndAlignment() : ScrollPresenterTests
  • BasicMouseInteractionTest() : MenuBarTests
  • BasicOffsetChanges() : ScrollPresenterTests
  • BasicOffsetsChangeCancelation() : ScrollPresenterTests
  • BasicPadding() : ScrollPresenterTests
  • BasicPanTouchTest() : WebView2Tests
  • BasicRenderingTest() : WebView2Tests
  • BasicStretchTouchTest() : WebView2Tests
  • BasicTapTouchTest() : WebView2Tests
  • BasicTest() : ImageIconTests , RadioMenuFlyoutItemTests , TitleBarTests
  • BasicZoomFactorChangeCancelation() : ScrollPresenterTests
  • BasicZoomFactorChanges() : ScrollPresenterTests
  • begin() : final
  • Begin() : HashMap< K, V > , IndexRange
  • BeginCheckingForDrag() : TabViewItem
  • BeginSelectionChanges() : ViewModel
  • BeginSubTest() : WebView2Tests
  • BehaviorOnInvoked() : SwipeItemProperties
  • BehaviorOnInvokedProperty() : SwipeItemProperties
  • biDecrementRepeatButton : BiDirectionalScrollController
  • BiDecrementRepeatButton_Click() : BiDirectionalScrollController
  • BiDirectionalAlignment : ScrollPresenterTests
  • BiDirectionalAlignmentFromHorizontalAlignment() : ScrollPresenterTests
  • BiDirectionalAlignmentFromVerticalAlignment() : ScrollPresenterTests
  • BiDirectionalScrollController() : BiDirectionalScrollController
  • BiDirectionalScrollController_IsEnabledChanged() : BiDirectionalScrollController
  • BiDirectionalScrollController_LogMessage() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • BiDirectionalScrollController_SizeChanged() : BiDirectionalScrollController
  • BiDirectionalScrollControllerScrollingScrollCompletedEventArgs() : BiDirectionalScrollControllerScrollingScrollCompletedEventArgs
  • biIncrementRepeatButton : BiDirectionalScrollController
  • BiIncrementRepeatButton_Click() : BiDirectionalScrollController
  • Bindable : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • BindOwningFlyoutPresenterToCornerRadius() : CommandBarFlyoutCommandBar
  • BindProperty() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual
  • BindProperty2() : AnimatedVisual
  • BitmapImage : Recipe
  • Blah : RevealColorPage
  • blanchedAlmondBrush : ScrollPresenterStackPanelAnchoringPage
  • BlankPage() : BlankPage
  • blockFarContentPropertyName() : SwipeControl
  • blockNearContentPropertyName() : SwipeControl
  • BlockSize() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • BlueAmplitude() : IGammaTransferEffect
  • BlueBackground_Click() : CommonStylesPage
  • BlueDisable() : IGammaTransferEffect , ILinearTransferEffect
  • blueEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • BlueExponent() : IGammaTransferEffect
  • BlueLabelAutomationId : ColorPickerTests
  • BlueOffset() : IGammaTransferEffect , ILinearTransferEffect
  • blueOrValueChangedWaiter : ColorChangedEventWaiter
  • BlueSlope() : ILinearTransferEffect
  • BlueTextBoxAutomationId : ColorPickerTests
  • BlueValueCount() : IPosterizeEffect
  • BlurAmount() : IGaussianBlurEffect
  • border : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BorderBrush() : LayoutPanelProperties
  • BorderBrushNames : RevealColorPage
  • BorderBrushProperty() : LayoutPanelProperties
  • BorderColorButton_Click() : RevealSimpleListPage
  • BorderLight() : RevealTestApi
  • BorderLight_ShouldBeOn() : RevealTestApi
  • BorderLight_ValidateBorderLightPanAway() : RevealStatesPage
  • BorderMode() : IGaussianBlurEffect , ITransform2DEffect
  • BorderSpotlightAttenuationValue : RevealScenarioLights
  • BorderSpotlightInnerConeValue : RevealScenarioLights
  • BorderSpotlightOuterConeValue : RevealScenarioLights
  • BorderThickness() : LayoutPanelProperties
  • BorderThicknessPage() : BorderThicknessPage
  • BorderThicknessProperty() : LayoutPanelProperties
  • BorderWideLight() : RevealTestApi
  • BorderWidthTextBox : RadioButtonsTestPageElements
  • Bottom : WebView2RenderingVerifier::NativeMethods::RECT
  • BottomAppBarButton_Click() : CommandBarPage
  • BottomItems() : SwipeControlProperties
  • BottomItemsProperty() : SwipeControlProperties
  • BottomLeftPlacementTopLeftHighlightMargin() : TeachingTip
  • BottomLeftPlacementTopRightHighlightMargin() : TeachingTip
  • BottomPlacementTopLeftHighlightMargin() : TeachingTip
  • BottomPlacementTopRightHighlightMargin() : TeachingTip
  • BottomRightPlacementTopLeftHighlightMargin() : TeachingTip
  • BottomRightPlacementTopRightHighlightMargin() : TeachingTip
  • BoundsRegex() : CommandBarFlyoutTests
  • BoxedDefaultValue() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • BoxedType() : XamlTypeBase
  • BoxValueIfNecessary() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • BreadcrumbBar() : BreadcrumbBar
  • BreadcrumbBarAxeTestPage() : BreadcrumbBarAxeTestPage
  • BreadcrumbBarItem() : BreadcrumbBarItem
  • BreadcrumbBarItemAutomationPeer() : BreadcrumbBarItemAutomationPeer
  • BreadcrumbBarPage() : BreadcrumbBarPage
  • BreadcrumbBarProperties() : BreadcrumbBarProperties
  • BreadcrumbControl_ItemClicked() : BreadcrumbBarPage
  • BreadcrumbElementFactory() : BreadcrumbElementFactory
  • BreadcrumbIterable() : BreadcrumbIterable
  • BreadcrumbIterator() : BreadcrumbIterator
  • BreadcrumbLayout() : BreadcrumbLayout
  • breadCrumbList : BreadcrumbBarAxeTestPage , BreadcrumbBarPage
  • BrightnessSun_AnimatedVisual() : BrightnessSun::BrightnessSun_AnimatedVisual
  • BringContentWithMarginIntoView() : ScrollPresenterTests
  • BringElementInNestedScrollPresentersIntoView() : ScrollPresenterTests
  • BringElementInNestedScrollViewersIntoView() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewFromNearEdge() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithFarAlignment() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithMiddleAlignment() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithNearAlignment() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithOffsetFromFarEdge() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithSnapPoints() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewFromNearEdge() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithFarAlignment() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithMiddleAlignment() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithNearAlignment() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithOffsetFromFarEdge() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithSnapPoints() : ScrollPresenterTests
  • BringElementIntoView() : ScrollPresenterTests
  • BringElementIntoViewWithAdjustmentInBringingIntoViewHandler() : ScrollPresenterTests
  • BringElementIntoViewWithAlignment() : ScrollPresenterTests
  • BringElementIntoViewWithOffset() : ScrollPresenterTests
  • BringElementIntoViewWithTargetRect() : ScrollPresenterTests
  • BringFocusedItemIntoView() : ItemsViewTestsWithInputHelper
  • BringingIntoView() : ScrollPresenterProperties , ScrollViewProperties
  • BringIntoView_Click() : PinterestLayoutSamplePage , VirtualizingStackLayoutSamplePage , VirtualizingUniformStackLayoutSamplePage , PinterestLayoutSamplePage , VirtualizingStackLayoutSamplePage , VirtualizingUniformStackLayoutSamplePage
  • BringIntoViewOfExistingItemsDoesNotChangeScrollOffset() : RepeaterTests
  • BringIntoViewOffsetsChange() : BringIntoViewOffsetsChange
  • BringIntoViewState() : ItemsRepeaterScrollHost::BringIntoViewState
  • BringItemIntoView() : ItemsViewTests
  • BringNestedElementIntoHorizontalScrollPresenterView() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewWithNearAlignment() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewWithSnapPoints() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollViewerView() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollViewerViewWithNearAlignment() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollViewerViewWithOffset() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterView() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterViewWithMiddleAlignment() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollViewerView() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollViewerViewWithMiddleAlignment() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollViewerViewWithOffset() : ScrollPresenterTests
  • BringSelectedTabIntoView() : TabView
  • BringSettingsIntoViewButton_Click() : NavigationViewPage
  • bringTargetIntoViewButton : TeachingTipTestPageElements
  • BrushCheckFailed() : RevealColorPage
  • BrushToString() : TeachingTipPage
  • BtnAddChild_Click() : LinedFlowLayoutDemo
  • BtnAddIrregularSnapPoint_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnAddItem_Click() : SwipeControlPage2
  • BtnAddItemsSourceItem_Click() : ItemsViewIntegrationPage
  • btnAddMISnapPointUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • btnAddMRSnapPointUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • BtnAddRepeatedSnapPoint_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnAddScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnAddScrollVelocity_Click() : ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage
  • BtnAddSelectorBarItem_Click() : SelectorBarSummaryPage
  • BtnAddZoomVelocity_Click() : ScrollPresenterDynamicPage
  • BtnApplyAverageMonthCount_Click() : ItemsViewIntegrationPage
  • BtnApplyYearCount_Click() : ItemsViewIntegrationPage
  • BtnCancel_Click() : SwipeControlPage2
  • BtnCancelAddScrollVelocity_Click() : ScrollPresenterDynamicPage
  • BtnCancelAddZoomVelocity_Click() : ScrollPresenterDynamicPage
  • BtnCancelScroll_Click() : ScrollPresenterDynamicPage
  • BtnCancelZoom_Click() : ScrollPresenterDynamicPage
  • BtnChangeEvenItemsVisibility_Click() : ObjectModelTestPage
  • btnChangeListViewStyle_Click() : ListViewBackgroundPage
  • BtnChangeOddItemsVisibility_Click() : ObjectModelTestPage
  • BtnChangeView_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnClear1_Click() : NonVirtualStackLayoutSamplePage
  • BtnClear2_Click() : NonVirtualStackLayoutSamplePage
  • BtnClearEvents_Click() : VariableSizedItemsPage , LinedFlowLayoutDemo , ScrollPresenterMousePanningPage
  • BtnClearExceptionReport_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewAnchoringPage , ListViewBasePage , ScrollViewerPage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterZoomSnapPointsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • btnClearFullLog_Click() : ScrollPresenterChainingAndRailingPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterScrollSnapPointsPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewsWithSimpleContentsPage
  • BtnClearFullLog_Click() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , SelectorBarSummaryPage , SwipeControlPage
  • BtnClearItemsSource_Click() : ItemsViewIntegrationPage
  • BtnClearListViewItemsSource_Click() : ListViewAnchoringPage
  • BtnClearLog_Click() : ScrollPresenterWithBiDirectionalScrollControllerPage , ScrollPresenterWithCompositionScrollControllersPage , ScrollPresenterWithSimpleScrollControllersPage
  • BtnClearLogs_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewBasePage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , KeyboardNavigationSample , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • BtnClearScrollPresenterEvents_Click() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnClearScrollViewerEvents_Click() : ScrollViewerPage
  • BtnClearSnapPoints_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnClearSwipeControlEvents_Click() : SwipeControlPage
  • btnClearTeachingTipEvents : TeachingTipTestPageElements
  • BtnClearTeachingTipEvents_Click() : TeachingTipPage
  • BtnClose_Click() : SwipeControlPage2
  • BtnCollectionViewMoveCurrentToPosition_Click() : GroupedListViewBasePage
  • BtnCopyEvents_Click() : LinedFlowLayoutDemo , SelectorBarSummaryPage
  • BtnCopyItemsViewEvents_Click() : ItemsViewSummaryPage
  • BtnCopyScrollPresenterEvents_Click() : ScrollPresenterDynamicPage
  • BtnCreateDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnCreateDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • btnCreateParallaxView_Click() : DynamicPage
  • BtnCreateScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnDataSourceAddItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceGetItemCount_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceInsertItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceRaiseResetNotification_Click() : ListViewBasePage
  • BtnDataSourceRemoveAllItems_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceRemoveItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceReplaceItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceReplaceItemContent_Click() : ItemsViewSummaryPage
  • BtnDataSourceSetItemCount_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDeleteScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnDeselect_Click() : ItemsViewSummaryPage
  • BtnDeselectAll_Click() : ItemsViewSummaryPage
  • BtnDiscardQueuedOperations_Click() : ItemsViewSummaryPage , ScrollPresenterDynamicPage
  • BtnExecuteQueuedOperations_Click() : ItemsViewSummaryPage , ScrollPresenterDynamicPage
  • BtnExpand_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnExpandMore_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnFocusManagerCollectionViewCurrentItemProgrammaticFocus_Click() : GroupedListViewBasePage
  • BtnForcePopulateHeader_Click() : ItemsViewIntegrationPage
  • BtnGarbageCollect_Click() : ScrollPresenterLeakDetectionPage
  • BtnGetActualHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetActualWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetAnchorElement_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnGetArrangeRenderSizesDelta_Click() : ScrollPresenterDynamicPage
  • BtnGetAverageMonthCount_Click() : ItemsViewIntegrationPage
  • BtnGetBitmapImageDecodePixelHeight_Click() : ImagePage
  • BtnGetBitmapImageDecodePixelWidth_Click() : ImagePage
  • BtnGetBitmapImageUriSource_Click() : ImagePage
  • BtnGetBorderThickness_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnGetBottomItems_Click() : SwipeControlPage2
  • BtnGetChildrenCount_Click() : LinedFlowLayoutDemo
  • BtnGetCollectionViewCurrentItem_Click() : GroupedListViewBasePage
  • BtnGetCollectionViewCurrentPosition_Click() : GroupedListViewBasePage
  • BtnGetComputedHorizontalScrollMode_Click() : ScrollViewDynamicPage
  • BtnGetComputedVerticalScrollMode_Click() : ScrollViewDynamicPage
  • BtnGetContentActualHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentActualWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentDesiredSize_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetContentLayoutOffsetX_Click() : ScrollPresenterDynamicPage
  • BtnGetContentLayoutOffsetY_Click() : ScrollPresenterDynamicPage
  • BtnGetContentMargin_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetContentMaxHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentMaxWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentMinHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentMinWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentOrientation_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetContentPadding_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentRenderSize_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetCornerRadius_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnGetCurrentAnchor_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • BtnGetCurrentItemIndex_Click() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • BtnGetCurrentItemIndex_GettingFocus() : ItemsViewInteractiveTestsPage
  • BtnGetDetailLabelContent_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetExtentHeight_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetExtentWidth_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • btnGetFullLog_Click() : ScrollPresenterChainingAndRailingPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterScrollSnapPointsPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewsWithSimpleContentsPage
  • BtnGetFullLog_Click() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , SelectorBarSummaryPage , SwipeControlPage
  • btnGetHeight_Click() : DynamicPage
  • BtnGetHeight_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetHorizontalAnchorRatio_Click() : ItemsViewSummaryPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • btnGetHorizontalOffset_Click() : DynamicPage
  • BtnGetHorizontalOffset_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetHorizontalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnGetHorizontalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnGetHorizontalScrollMode_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetHorizontalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnGetHorizontalShift_Click() : DynamicPage
  • btnGetHorizontalSourceEndOffset_Click() : DynamicPage
  • btnGetHorizontalSourceStartOffset_Click() : DynamicPage
  • BtnGetIgnoredInputKinds_Click() : ScrollViewDynamicPage
  • BtnGetImageActualHeight_Click() : ImagePage
  • BtnGetImageActualWidth_Click() : ImagePage
  • BtnGetImageDesiredHeight_Click() : ImagePage
  • BtnGetImageDesiredWidth_Click() : ImagePage
  • BtnGetImageHeight_Click() : ImagePage
  • BtnGetImageHorizontalAlignment_Click() : ImagePage
  • BtnGetImageMargin_Click() : ImagePage
  • BtnGetImageMaxHeight_Click() : ImagePage
  • BtnGetImageMaxWidth_Click() : ImagePage
  • BtnGetImageMinHeight_Click() : ImagePage
  • BtnGetImageMinWidth_Click() : ImagePage
  • BtnGetImageParentHeight_Click() : ImagePage
  • BtnGetImageParentWidth_Click() : ImagePage
  • BtnGetImageRenderHeight_Click() : ImagePage
  • BtnGetImageRenderWidth_Click() : ImagePage
  • BtnGetImageStretch_Click() : ImagePage
  • BtnGetImageVerticalAlignment_Click() : ImagePage
  • BtnGetImageWidth_Click() : ImagePage
  • BtnGetIsSelected_Click() : ItemContainerSummaryPage
  • BtnGetItemsControlTabNavigation_Click() : FlatItemsControlPage , GroupedItemsControlPage
  • BtnGetItemsControlXYFocusKeyboardNavigation_Click() : FlatItemsControlPage , GroupedItemsControlPage
  • BtnGetItemsPanelCacheLength_Click() : GroupedListViewBasePage
  • BtnGetItemsPanelGroupHeaderPlacement_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetItemsPanelGroupPadding_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetItemsPanelMargin_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • BtnGetItemsPanelOrientation_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • BtnGetItemsRepeaterChildrenCount_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementActualHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementActualWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementDesiredSize_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementIsEnabled_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMaxHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMaxWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMinHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMinWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementRenderSize_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterHorizontalAlignment_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterHorizontalCacheLength_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterItemContainerCanUserInvoke_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterItemContainerCanUserSelect_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterItemContainerIsSelected_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterLogItemIndexDbg_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterVerticalAlignment_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterVerticalCacheLength_Click() : ItemsViewSummaryPage , VariableSizedItemsPage
  • BtnGetItemsStackPanelCacheLength_Click() : NestedGridViewsPage
  • BtnGetItemsStackPanelItemsUpdatingScrollMode_Click() : ListViewAnchoringPage
  • BtnGetItemsWrapGridCacheLength_Click() : GroupedItemsControlPage
  • BtnGetItemsWrapGridItemHeight_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetItemsWrapGridItemWidth_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetLastRequestedDetailLabelOffset_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetLayoutForcedIndexBasedLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnGetLayoutPanelBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementActualHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementActualWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementIsEnabled_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMinHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMinWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelHorizontalAlignment_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelMargin_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelPadding_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelVerticalAlignment_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLeftItems_Click() : SwipeControlPage2
  • BtnGetLinedFlowLayoutActualLineHeight_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutLineHeight_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutLineSpacing_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutLogItemIndexDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutMinItemSpacing_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutRequestedRangeLength_Click() : ItemsViewSummaryPage
  • BtnGetLinedFlowLayoutRequestedRangeStartIndex_Click() : ItemsViewSummaryPage
  • BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetListViewBaseReorderMode_Click() : ListViewBasePage
  • BtnGetListViewBaseSelectionMode_Click() : ListViewBasePage , GroupedListViewBasePage
  • BtnGetListViewBaseTabNavigation_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetListViewItemActualHeight_Click() : ListViewAnchoringPage
  • BtnGetListViewItemHeight_Click() : ListViewAnchoringPage
  • BtnGetListViewSize_Click() : ListViewAnchoringPage
  • BtnGetMargin_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollViewDynamicPage , SelectorBarSummaryPage
  • BtnGetMaxHeight_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • btnGetMaxHorizontalShiftRatio_Click() : DynamicPage
  • BtnGetMaximum_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetMaxPosition_Click() : ScrollPresenterDynamicPage
  • BtnGetMaxPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • btnGetMaxVerticalShiftRatio_Click() : DynamicPage
  • BtnGetMaxWidth_Click() : ItemsViewSummaryPage , ScrollViewerPage , ScrollPresenterDynamicPage , SelectorBarSummaryPage
  • BtnGetMaxZoomFactor_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetMinimum_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetMinPosition_Click() : ScrollPresenterDynamicPage
  • BtnGetMinPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • BtnGetMinZoomFactor_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetModernCollectionBasePanelGroupHeaderPlacement_Click() : ListViewAnchoringPage
  • BtnGetModernCollectionBasePanelGroupPadding_Click() : ListViewAnchoringPage
  • BtnGetModernCollectionBasePanelVerticalAlignment_Click() : ListViewAnchoringPage
  • BtnGetNumLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetOffsetBetweenLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetPadding_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • BtnGetPageSize_Click() : ListViewAnchoringPage
  • BtnGetPosition_Click() : ScrollPresenterDynamicPage
  • BtnGetPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • BtnGetRightItems_Click() : SwipeControlPage2
  • btnGetSCHeight_Click() : DynamicPage
  • BtnGetScrollerChangeViewVerticalOffset_Click() : VariableSizedItemsPage
  • BtnGetScrollerChangeViewVerticalScrollPercentage_Click() : VariableSizedItemsPage
  • BtnGetScrollerExtentHeight_Click() : VariableSizedItemsPage
  • BtnGetScrollerScrollableHeight_Click() : VariableSizedItemsPage
  • BtnGetScrollerVerticalAnchorRatio_Click() : VariableSizedItemsPage
  • BtnGetScrollerVerticalOffset_Click() : VariableSizedItemsPage
  • BtnGetScrollerVerticalScrollPercentage_Click() : VariableSizedItemsPage
  • BtnGetScrollerZoomFactor_Click() : VariableSizedItemsPage
  • BtnGetScrollViewBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewContentOrientation_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewerExtentHeight_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerExtentWidth_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerHorizontalOffset_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerHorizontalScrollMode_Click() : GroupedListViewBasePage
  • BtnGetScrollViewerVerticalAnchorRatio_Click() : ListViewAnchoringPage
  • BtnGetScrollViewerVerticalOffset_Click() : ListViewBasePage , GroupedListViewBasePage , ListViewAnchoringPage
  • BtnGetScrollViewerVerticalScrollMode_Click() : GroupedListViewBasePage
  • BtnGetScrollViewerViewportHeight_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerViewportWidth_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewExtentHeight_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewExtentWidth_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHeight_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalOffset_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewMargin_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewPadding_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewState_Click() : ItemsViewIntegrationPage
  • BtnGetScrollViewVerticalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewVerticalOffset_Click() : ItemsViewIntegrationPage , LinedFlowLayoutDemo
  • BtnGetScrollViewVerticalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewVerticalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewWidth_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewZoomMode_Click() : LinedFlowLayoutDemo
  • btnGetSCWidth_Click() : DynamicPage
  • BtnGetSelectedItem_Click() : ItemsViewSummaryPage
  • BtnGetSelectedItems_Click() : ItemsViewSummaryPage
  • BtnGetSelectorBarItemChild_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemForeground_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemIcon_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemIsEnabled_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemIsSelected_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemMargin_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemPadding_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemsCount_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemText_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemVisibility_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarSelectedItem_Click() : SelectorBarSummaryPage
  • BtnGetSmallChange_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetStackLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnGetStackLayoutSpacing_Click() : ItemsViewSummaryPage
  • BtnGetStackPanelVerticalAlignment_Click() : ListViewAnchoringPage
  • BtnGetState_Click() : ScrollPresenterDynamicPage
  • btnGetTEActualHeight_Click() : DynamicPage
  • btnGetTEActualWidth_Click() : DynamicPage
  • btnGetTEHeight_Click() : DynamicPage
  • btnGetTEMargin_Click() : DynamicPage
  • btnGetTEMaxHeight_Click() : DynamicPage
  • btnGetTEMaxWidth_Click() : DynamicPage
  • btnGetTEWidth_Click() : DynamicPage
  • BtnGetTopItems_Click() : SwipeControlPage2
  • BtnGetUniformGridLayoutMaximumRowsOrColumns_Click() : ItemsViewSummaryPage
  • BtnGetUniformGridLayoutMinColumnSpacing_Click() : ItemsViewSummaryPage
  • BtnGetUniformGridLayoutMinRowSpacing_Click() : ItemsViewSummaryPage
  • BtnGetUniformGridLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnGetValue_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetVerticalAnchorRatio_Click() : ScrollViewDynamicPage , ItemsViewSummaryPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnGetVerticalOffset_Click() : ScrollPresenterDynamicPage
  • btnGetVerticalOffset_Click() : DynamicPage
  • BtnGetVerticalOffset_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollViewDynamicPage
  • BtnGetVerticalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnGetVerticalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnGetVerticalScrollMode_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetVerticalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnGetVerticalShift_Click() : DynamicPage
  • btnGetVerticalSourceEndOffset_Click() : DynamicPage
  • btnGetVerticalSourceStartOffset_Click() : DynamicPage
  • BtnGetViewportHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetViewportSize_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetViewportWidth_Click() : ScrollPresenterDynamicPage , ScrollViewerPage
  • btnGetWidth_Click() : DynamicPage
  • BtnGetWidth_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetYearCount_Click() : ItemsViewIntegrationPage
  • BtnGetZoomChainMode_Click() : ScrollViewDynamicPage
  • btnGetZoomFactor_Click() : DynamicPage
  • BtnGetZoomFactor_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ItemsViewSummaryPage
  • BtnGetZoomMode_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage , ScrollViewDynamicPage
  • BtnInsert1_Click() : NonVirtualStackLayoutSamplePage
  • BtnInsert2_Click() : NonVirtualStackLayoutSamplePage
  • BtnInsert_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnInsertChild_Click() : LinedFlowLayoutDemo
  • BtnInsertItems_Click() : ItemsViewInteractiveTestsPage
  • BtnInsertItemsFromBeginning_Click() : NavigationViewMenuItemsSourcePage
  • BtnInsertSelectorBarItem_Click() : SelectorBarSummaryPage
  • BtnInvalidateArrange_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnInvertSelection_Click() : ItemsViewSummaryPage
  • BtnIsSelected_Click() : ItemsViewSummaryPage
  • BtnItemsRepeaterElementInvalidateArrange_Click() : ItemsViewSummaryPage
  • BtnItemsRepeaterElementInvalidateMeasure_Click() : ItemsViewSummaryPage
  • BtnItemsViewStartBringItemIntoView_Click() : ItemsViewSummaryPage
  • BtnItemsViewStartBringItemIntoViewAsync_Click() : ItemsViewSummaryPage
  • BtnItemsViewTryGetItemIndex_Click() : ItemsViewSummaryPage
  • BtnLayoutInvalidateItemsInfo_Click() : LinedFlowLayoutDemo
  • BtnLayoutInvalidateMeasure_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnLayoutPanelResetLayout_Click() : LinedFlowLayoutDemo
  • BtnLayoutPanelSetLayout_Click() : LinedFlowLayoutDemo
  • BtnLinedFlowLayoutClearItemAspectRatios_Click() : ItemsViewSummaryPage
  • BtnLinedFlowLayoutGetLineIndex_Click() : ItemsViewSummaryPage
  • BtnLinedFlowLayoutInvalidateItemsInfo_Click() : ItemsViewSummaryPage
  • BtnLinedFlowLayoutLockItemToLine_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnLinedFlowLayoutUnlockItems_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnMIAddSnapPoint_Click() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • BtnMRAddSnapPoint_Click() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • BtnOffsetPlus10With_Click() : ScrollPresenterScrollSnapPointsPage
  • BtnOffsetPlus10Without_Click() : ScrollPresenterScrollSnapPointsPage
  • BtnOpenNewMainPage_Click() : WindowPage
  • BtnOpenNewWindowRootPage_Click() : WindowPage
  • BtnPageShrinkSize_Click() : ListViewAnchoringPage
  • BtnParentDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnParentDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnParentItemsView_Click() : ItemsViewIntegrationPage
  • BtnParentMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnParentMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnPrePopulateLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnQueueContentHeight_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMargin_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMaxHeight_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMaxWidth_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMinHeight_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMinWidth_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentPadding_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentWidth_Click() : ScrollPresenterDynamicPage
  • BtnQueueDataSourceAddItem_Click() : ItemsViewSummaryPage , ListViewBasePage
  • BtnQueueDataSourceInsertItem_Click() : ListViewBasePage , ItemsViewSummaryPage
  • BtnQueueDataSourceRaiseResetNotification_Click() : ListViewBasePage
  • BtnQueueDataSourceRemoveAllItems_Click() : ItemsViewSummaryPage , ListViewBasePage
  • BtnQueueDataSourceRemoveItem_Click() : ListViewBasePage , ItemsViewSummaryPage
  • BtnQueueDataSourceReplaceItem_Click() : ItemsViewSummaryPage , ListViewBasePage
  • BtnQueueHeight_Click() : ItemsViewSummaryPage , ScrollPresenterDynamicPage
  • BtnQueueMaxZoomFactor_Click() : ScrollPresenterDynamicPage
  • BtnQueueMinZoomFactor_Click() : ScrollPresenterDynamicPage
  • BtnQueueWidth_Click() : ItemsViewSummaryPage , ScrollPresenterDynamicPage
  • btnRefreshAutomaticHorizontalOffsets_Click() : DynamicPage
  • btnRefreshAutomaticVerticalOffsets_Click() : DynamicPage
  • BtnReleaseDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnReleaseDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • btnReleaseParallaxView_Click() : DynamicPage
  • BtnRemove_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnRemoveAll_Click() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • BtnRemoveAllChildren_Click() : LinedFlowLayoutDemo
  • BtnRemoveAllSelectorBarItems_Click() : SelectorBarSummaryPage
  • BtnRemoveAt1_Click() : NonVirtualStackLayoutSamplePage
  • BtnRemoveAt2_Click() : NonVirtualStackLayoutSamplePage
  • BtnRemoveChild_Click() : LinedFlowLayoutDemo
  • BtnRemoveFirst_Click() : ScrollPresenterZoomSnapPointsPage , ScrollPresenterScrollSnapPointsPage
  • BtnRemoveItems_Click() : ItemsViewInteractiveTestsPage
  • BtnRemoveLastItemsSourceItem_Click() : ItemsViewIntegrationPage
  • BtnRemoveScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnRemoveSelectorBarItem_Click() : SelectorBarSummaryPage
  • btnReparentSource_Click() : DynamicPage
  • BtnReplace1_Click() : NonVirtualStackLayoutSamplePage
  • BtnReplace2_Click() : NonVirtualStackLayoutSamplePage
  • BtnReplace_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnReplaceChild_Click() : LinedFlowLayoutDemo
  • BtnReplaceSelectorBarItem_Click() : SelectorBarSummaryPage
  • BtnReset_Click() : ScrollPresenterRepeaterAnchoringPage
  • BtnResetHorizontalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • BtnResetItemsSource_Click() : ItemsViewIntegrationPage , KeyboardNavigationSample , GroupedItemsControlPage , GroupedListViewBasePage
  • BtnResetLayoutForcedIndexBasedLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnResetListViewItemsSource_Click() : ListViewAnchoringPage
  • BtnResetScrollPresenterScrollControllers_Click() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • BtnResetScrollView_Click() : ItemsViewInteractiveTestsPage
  • BtnResetVerticalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • btnResetViews_Click() : ScrollPresentersWithSimpleContentsPage , ScrollViewsWithSimpleContentsPage , ScrollPresenterChainingAndRailingPage
  • BtnScrollBy_Click() : ScrollPresenterDynamicPage
  • BtnScrollerChangeViewToVerticalOffset_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToVerticalOffsetWithAnimation_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToVerticalScrollPercentage_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToZoomFactor_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToZoomFactorWithAnimation_Click() : VariableSizedItemsPage
  • BtnScrollIntoView_Click() : GroupedListViewBasePage
  • BtnScrollPresenterOffsetChange_Click() : ScrollPresenterScrollSnapPointsPage
  • BtnScrollPresenterZoomFactorChange_Click() : ScrollPresenterZoomSnapPointsPage
  • BtnScrollTo_Click() : ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage
  • BtnScrollViewScrollTo_Click() : ItemsViewInteractiveTestsPage
  • BtnScrollViewZoomTo_Click() : ItemsViewInteractiveTestsPage
  • BtnSelect_Click() : ItemsViewSummaryPage
  • BtnSelectAll_Click() : ItemsViewSummaryPage
  • BtnSetAnchorElement_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnSetAverageMonthCount_Click() : ItemsViewIntegrationPage
  • BtnSetBitmapImageDecodePixelHeight_Click() : ImagePage
  • BtnSetBitmapImageDecodePixelWidth_Click() : ImagePage
  • BtnSetBitmapImageUriSource_Click() : ImagePage
  • BtnSetBorderThickness_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnSetChildrenCount_Click() : LinedFlowLayoutDemo
  • BtnSetContentHeight_Click() : ScrollPresenterDynamicPage , ScrollViewWithScrollControllersPage , ScrollViewDynamicPage , ScrollViewerPage
  • BtnSetContentLayoutOffsetX_Click() : ScrollPresenterDynamicPage
  • BtnSetContentLayoutOffsetY_Click() : ScrollPresenterDynamicPage
  • BtnSetContentMargin_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnSetContentMaxHeight_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ScrollViewDynamicPage
  • BtnSetContentMaxWidth_Click() : ScrollViewerPage , ScrollViewDynamicPage , ScrollPresenterDynamicPage
  • BtnSetContentMinHeight_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ScrollViewDynamicPage
  • BtnSetContentMinWidth_Click() : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnSetContentOrientation_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnSetContentPadding_Click() : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnSetContentWidth_Click() : ScrollViewWithScrollControllersPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewerPage
  • BtnSetCornerRadius_Click() : SelectorBarSummaryPage , ItemsViewSummaryPage
  • BtnSetDetailLabelContent_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetHeight_Click() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • btnSetHeight_Click() : DynamicPage
  • BtnSetHeight_Click() : ScrollPresenterStackPanelAnchoringPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewerPage
  • BtnSetHorizontalAnchorRatio_Click() : ItemsViewSummaryPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage , ScrollViewDynamicPage
  • BtnSetHorizontalOffset_Click() : ItemsViewSummaryPage
  • btnSetHorizontalOffset_Click() : DynamicPage
  • BtnSetHorizontalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnSetHorizontalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnSetHorizontalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • BtnSetHorizontalScrollMode_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnSetHorizontalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnSetHorizontalShift_Click() : DynamicPage
  • btnSetHorizontalSourceEndOffset_Click() : DynamicPage
  • btnSetHorizontalSourceStartOffset_Click() : DynamicPage
  • BtnSetIgnoredInputKinds_Click() : ScrollViewDynamicPage
  • BtnSetImageHeight_Click() : ImagePage
  • BtnSetImageHorizontalAlignment_Click() : ImagePage
  • BtnSetImageMargin_Click() : ImagePage
  • BtnSetImageMaxHeight_Click() : ImagePage
  • BtnSetImageMaxWidth_Click() : ImagePage
  • BtnSetImageMinHeight_Click() : ImagePage
  • BtnSetImageMinWidth_Click() : ImagePage
  • BtnSetImageParentHeight_Click() : ImagePage
  • BtnSetImageParentWidth_Click() : ImagePage
  • BtnSetImageStretch_Click() : ImagePage
  • BtnSetImageVerticalAlignment_Click() : ImagePage
  • BtnSetImageWidth_Click() : ImagePage
  • BtnSetItemsControlTabNavigation_Click() : FlatItemsControlPage , GroupedItemsControlPage
  • BtnSetItemsControlXYFocusKeyboardNavigation_Click() : GroupedItemsControlPage , FlatItemsControlPage
  • BtnSetItemsPanelCacheLength_Click() : GroupedListViewBasePage
  • BtnSetItemsPanelGroupHeaderPlacement_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnSetItemsPanelGroupPadding_Click() : GroupedListViewBasePage , GroupedItemsControlPage
  • BtnSetItemsPanelMargin_Click() : GroupedItemsControlPage , ListViewBasePage , GroupedListViewBasePage , FlatItemsControlPage
  • BtnSetItemsPanelOrientation_Click() : ListViewBasePage , GroupedListViewBasePage , FlatItemsControlPage , GroupedItemsControlPage
  • BtnSetItemsRepeaterElementHeight_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementIsEnabled_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMaxHeight_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMaxWidth_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMinHeight_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMinWidth_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementWidth_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterHorizontalAlignment_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterHorizontalCacheLength_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterItemContainerCanUserInvoke_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterItemContainerCanUserSelect_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterItemContainerIsSelected_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterLogItemIndexDbg_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterVerticalAlignment_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterVerticalCacheLength_Click() : VariableSizedItemsPage , ItemsViewSummaryPage
  • BtnSetItemsSource_Click() : KeyboardNavigationSample , GroupedItemsControlPage , ItemsViewIntegrationPage , GroupedListViewBasePage
  • BtnSetItemsStackPanelCacheLength_Click() : NestedGridViewsPage
  • BtnSetItemsStackPanelItemsUpdatingScrollMode_Click() : ListViewAnchoringPage
  • BtnSetItemsWrapGridCacheLength_Click() : GroupedItemsControlPage
  • BtnSetItemsWrapGridItemHeight_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnSetItemsWrapGridItemWidth_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnSetLayoutForcedIndexBasedLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnSetLayoutPanelBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementIsEnabled_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMinHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMinWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelHorizontalAlignment_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelMargin_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelPadding_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelVerticalAlignment_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnSetLinedFlowLayoutLineHeight_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnSetLinedFlowLayoutLineSpacing_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnSetLinedFlowLayoutLogItemIndexDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutMinItemSpacing_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnSetListViewBaseReorderMode_Click() : ListViewBasePage
  • BtnSetListViewBaseSelectionMode_Click() : ListViewBasePage , GroupedListViewBasePage
  • BtnSetListViewBaseTabNavigation_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnSetListViewFlatItemsSource_Click() : ListViewAnchoringPage
  • BtnSetListViewGroupedItemsSource_Click() : ListViewAnchoringPage
  • BtnSetListViewItemHeight_Click() : ListViewAnchoringPage
  • BtnSetMargin_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage , ScrollViewDynamicPage , ScrollViewerPage
  • BtnSetMaxHeight_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • btnSetMaxHorizontalShiftRatio_Click() : DynamicPage
  • BtnSetMaximum_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetMaxPosition_Click() : ScrollPresenterDynamicPage
  • BtnSetMaxPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • btnSetMaxVerticalShiftRatio_Click() : DynamicPage
  • BtnSetMaxWidth_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnSetMaxZoomFactor_Click() : ScrollViewerPage , ScrollViewDynamicPage , ScrollPresenterDynamicPage
  • BtnSetMinimum_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetMinPosition_Click() : ScrollPresenterDynamicPage
  • BtnSetMinPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • BtnSetMinZoomFactor_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewerPage
  • BtnSetModernCollectionBasePanelGroupHeaderPlacement_Click() : ListViewAnchoringPage
  • BtnSetModernCollectionBasePanelGroupPadding_Click() : ListViewAnchoringPage
  • BtnSetModernCollectionBasePanelVerticalAlignment_Click() : ListViewAnchoringPage
  • BtnSetNumLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetOffsetBetweenLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetOffsetsChangeVelocityParameters_Click() : ScrollPresenterPage
  • BtnSetPadding_Click() : ScrollViewerPage , ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , SelectorBarSummaryPage , ScrollViewDynamicPage
  • BtnSetPageSize_Click() : ListViewAnchoringPage
  • BtnSetPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • btnSetSCHeight_Click() : DynamicPage
  • BtnSetScrollerVerticalAnchorRatio_Click() : VariableSizedItemsPage
  • BtnSetScrollPercent_Click() : ScrollPresenterAccessibilityPage
  • BtnSetScrollPresenterScrollControllers_Click() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • BtnSetScrollViewBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewContentOrientation_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewerHorizontalScrollMode_Click() : GroupedListViewBasePage
  • BtnSetScrollViewerVerticalAnchorRatio_Click() : ListViewAnchoringPage
  • BtnSetScrollViewerVerticalOffset_Click() : ListViewAnchoringPage
  • BtnSetScrollViewerVerticalScrollMode_Click() : GroupedListViewBasePage
  • BtnSetScrollViewHeight_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalOffset_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewMargin_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewPadding_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalConstantVelocity_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalOffset_Click() : ItemsViewIntegrationPage , LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewWidth_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewZoomMode_Click() : LinedFlowLayoutDemo
  • btnSetSCWidth_Click() : DynamicPage
  • BtnSetSelectorBarItemChild_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemForeground_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemIcon_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemIsEnabled_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemIsSelected_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemMargin_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemPadding_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemText_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemVisibility_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarSelectedItem_Click() : SelectorBarSummaryPage
  • BtnSetSmallChange_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetStackLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnSetStackLayoutSpacing_Click() : ItemsViewSummaryPage
  • BtnSetStackPanelVerticalAlignment_Click() : ListViewAnchoringPage
  • btnSetTEHeight_Click() : DynamicPage
  • btnSetTEMargin_Click() : DynamicPage
  • btnSetTEMaxHeight_Click() : DynamicPage
  • btnSetTEMaxWidth_Click() : DynamicPage
  • btnSetTEWidth_Click() : DynamicPage
  • BtnSetUniformGridLayoutMaximumRowsOrColumns_Click() : ItemsViewSummaryPage
  • BtnSetUniformGridLayoutMinColumnSpacing_Click() : ItemsViewSummaryPage
  • BtnSetUniformGridLayoutMinRowSpacing_Click() : ItemsViewSummaryPage
  • BtnSetUniformGridLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnSetVerticalAnchorRatio_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage
  • BtnSetVerticalConstantVelocity_Click() : ItemsViewSummaryPage
  • btnSetVerticalOffset_Click() : DynamicPage
  • BtnSetVerticalOffset_Click() : ItemsViewSummaryPage
  • BtnSetVerticalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnSetVerticalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnSetVerticalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • BtnSetVerticalScrollMode_Click() : ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , ScrollViewDynamicPage
  • BtnSetVerticalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnSetVerticalShift_Click() : DynamicPage
  • btnSetVerticalSourceEndOffset_Click() : DynamicPage
  • btnSetVerticalSourceStartOffset_Click() : DynamicPage
  • BtnSetViewportSize_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetWidth_Click() : ScrollPresenterStackPanelAnchoringPage , ItemsViewSummaryPage
  • btnSetWidth_Click() : DynamicPage
  • BtnSetWidth_Click() : ScrollViewerPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , ScrollPresenterDynamicPage
  • BtnSetYearCount_Click() : ItemsViewIntegrationPage
  • BtnSetZoomChainMode_Click() : ScrollViewDynamicPage
  • btnSetZoomFactor_Click() : DynamicPage
  • BtnSetZoomFactor_Click() : ItemsViewSummaryPage
  • BtnSetZoomFactorChangeVelocityParameters_Click() : ScrollPresenterPage
  • BtnSetZoomMode_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnShareLinedFlowLayout_Click() : ItemsViewSummaryPage
  • BtnShrink_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnShrinkMore_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnSourceAppendItem_Click() : ListViewAnchoringPage
  • BtnSourceInsertItem_Click() : ListViewAnchoringPage
  • BtnSourceRemoveFirstItem_Click() : ListViewAnchoringPage
  • BtnSourceRemoveLastItem_Click() : ListViewAnchoringPage
  • BtnStartBringIntoView_Click() : ScrollViewBringIntoViewPage , ScrollPresenterBringIntoViewPage
  • BtnSwitchOuterListViewVisibility_Click() : NestedGridViewsPage
  • BtnSwitchScroller_Click() : VariableSizedItemsPage
  • BtnSwitchVariability_Click() : VariableSizedItemsPage
  • BtnUnparentDiscardItemsView_Click() : ItemsViewIntegrationPage
  • BtnUnparentDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnUnparentDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnUnparentItemsView_Click() : ItemsViewIntegrationPage
  • BtnUnparentMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnUnparentMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnUnparentReparentItemsView_Click() : ItemsViewIntegrationPage
  • BtnUnparentReparentMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnUnparentReparentMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • btnUnparentSource_Click() : DynamicPage
  • BtnUseDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnUseDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnUseMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnUseMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnZoomBy_Click() : ScrollPresenterDynamicPage
  • BtnZoomFactorPlus1With_Click() : ScrollPresenterZoomSnapPointsPage
  • BtnZoomFactorPlus1Without_Click() : ScrollPresenterZoomSnapPointsPage
  • BtnZoomTo_Click() : ScrollPresenterDynamicPage
  • BufferSize : StackLayoutState , FlowLayoutState
  • BuildAcrylicBrushCompositionEffectFactoryKey() : MaterialHelperBase
  • BuildAllRegressionTestScenarios() : RegressionTestScenario
  • BuildEffectString() : TreeViewList
  • BuildHierarchicalNavRegressionTestScenarios() : RegressionTestScenario
  • BuildIsChildSelectedString() : HierarchicalNavigationViewMarkup
  • BuildLeftNavRegressionTestScenarios() : RegressionTestScenario
  • BuildTestScenarios() : RegressionTestScenario
  • BuildTopNavRegressionTestScenarios() : RegressionTestScenario
  • BuildTreeCompleted() : RepeaterTestHooks , MUXControlsTestHooks
  • BuildTreeCompletedImpl() : RepeaterTestHooks , MUXControlsTestHooks , RepeaterTestHooks , MUXControlsTestHooks
  • BumperNavigation() : NavigationView
  • button : ScrollViewDynamicPage , ScrollPresenterDynamicPage
  • Button() : AnimatedVisualPlayerTests
  • button : ScrollViewerPage
  • Button_click() : NavigationViewSelectedItemEdgeCasePage
  • Button_Click() : RatingControlPage , TreeViewSample
  • ButtonFlyoutPlacement() : InkToolBarProperties , InkToolBar , InkToolBarProperties
  • ButtonFlyoutPlacementProperty() : InkToolBarProperties
  • ButtonInteractionInvokedEventArgs() : ButtonInteractionInvokedEventArgs
  • ButtonInteractionPage() : ButtonInteractionPage
  • ButtonInteractionProperties() : ButtonInteractionProperties
  • ButtonInteractionTestSetup() : ButtonInteractionTests
  • ButtonListPager_SelectedIndexChanged() : PipsPagerExamples
  • ButtonListPreviousOffset : PipsPagerExamples
  • ButtonListScrollViewer_ViewChanged() : PipsPagerExamples
  • ButtonPanelAlwaysShowFirstLastPageIndex() : PagerControlProperties
  • ButtonPanelAlwaysShowFirstLastPageIndexProperty() : PagerControlProperties
  • ButtonType : PipsPagerTestBase
  • ButtonVisibilityMode : PipsPagerTestBase
  • ButtonVisibilityModes : PagerControlTestBase
  • ButtonVisibilityOptionsTest() : PagerControlTestBase
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- c -

  • c1 : AcrylicRenderingPage::SampledColors
  • c2 : AcrylicRenderingPage::SampledColors
  • c3 : AcrylicRenderingPage::SampledColors
  • c4 : AcrylicRenderingPage::SampledColors
  • c_assetLoc : sealed< T, fallback, RawStorageT >
  • c_controlMargin : TwoPaneViewPage
  • c_controlMargin_bottom : TwoPaneViewTests
  • c_controlMargin_left : TwoPaneViewTests
  • c_controlMargin_right : TwoPaneViewTests
  • c_controlMargin_top : TwoPaneViewTests
  • c_defaultAnchoringUIRepeaterChildrenCount : ScrollPresenterTests
  • c_defaultAnchoringUIScrollPresenterConstrainedSize : ScrollPresenterTests
  • c_defaultAnchoringUIScrollPresenterNonConstrainedSize : ScrollPresenterTests
  • c_defaultAnchoringUIStackPanelChildrenCount : ScrollPresenterTests
  • c_defaultAnchorRatio : ScrollViewTests , ScrollPresenterTests
  • c_defaultBringIntoViewUIScrollPresenterConstrainedSize : ScrollPresenterTests
  • c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize : ScrollPresenterTests
  • c_defaultBringIntoViewUIStackPanelChildrenCount : ScrollPresenterTests
  • c_defaultComputedHorizontalScrollMode : ScrollViewTests
  • c_defaultComputedVerticalScrollMode : ScrollViewTests
  • c_defaultContentOrientation : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalOffset : ScrollPresenterTests
  • c_defaultHorizontalScrollChainMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalScrollMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalScrollRailMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalShift : ParallaxViewTests
  • c_defaultHorizontalSourceEndOffset : ParallaxViewTests
  • c_defaultHorizontalSourceOffsetKind : ParallaxViewTests
  • c_defaultHorizontalSourceStartOffset : ParallaxViewTests
  • c_defaultIgnoredInputKinds : ScrollPresenterTests , ScrollViewTests
  • c_defaultIsHorizontalShiftClamped : ParallaxViewTests
  • c_defaultIsVerticalShiftClamped : ParallaxViewTests
  • c_defaultMaxHorizontalShiftRatio : ParallaxViewTests
  • c_defaultMaxVerticalShiftRatio : ParallaxViewTests
  • c_defaultMaxZoomFactor : ScrollPresenterTests , ScrollViewTests
  • c_defaultMinTallModeHeight : TwoPaneViewTests , TwoPaneViewPage
  • c_defaultMinWideModeWidth : TwoPaneViewTests , TwoPaneViewPage
  • c_defaultMinZoomFactor : ScrollPresenterTests , ScrollViewTests
  • c_defaultOffsetResultTolerance : ScrollPresenterTests
  • c_defaultState : ScrollPresenterTests
  • c_defaultUIFinalScrollPresenterHorizontalOffset : ParallaxViewTests
  • c_defaultUIFinalScrollPresenterVerticalOffset : ParallaxViewTests
  • c_defaultUIFinalScrollViewerHorizontalOffset : ParallaxViewTests
  • c_defaultUIFinalScrollViewerVerticalOffset : ParallaxViewTests
  • c_defaultUIHorizontalShift : ParallaxViewTests
  • c_defaultUIItemsViewHeight : ItemsViewTests
  • c_defaultUIItemsViewWidth : ItemsViewTests
  • c_defaultUIScrollControllerThickness : ScrollPresenterTests
  • c_defaultUIScrollPresenterContentHeight : ParallaxViewTests , ScrollPresenterTests
  • c_defaultUIScrollPresenterContentWidth : ScrollPresenterTests , ParallaxViewTests
  • c_defaultUIScrollPresenterHeight : ParallaxViewTests , ScrollPresenterTests
  • c_defaultUIScrollPresenterWidth : ParallaxViewTests , ScrollPresenterTests
  • c_defaultUIScrollViewContentHeight : ScrollViewTests
  • c_defaultUIScrollViewContentWidth : ScrollViewTests
  • c_defaultUIScrollViewerContentHeight : ParallaxViewTests
  • c_defaultUIScrollViewerContentWidth : ParallaxViewTests
  • c_defaultUIScrollViewerHeight : ParallaxViewTests
  • c_defaultUIScrollViewerWidth : ParallaxViewTests
  • c_defaultUIScrollViewHeight : ScrollViewTests
  • c_defaultUIScrollViewWidth : ScrollViewTests
  • c_defaultUISelectorBarParentHeight : SelectorBarTests
  • c_defaultUISelectorBarParentWidth : SelectorBarTests
  • c_defaultUIVerticalShift : ParallaxViewTests
  • c_defaultVerticalOffset : ScrollPresenterTests
  • c_defaultVerticalScrollChainMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultVerticalScrollMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultVerticalScrollRailMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultVerticalShift : ParallaxViewTests
  • c_defaultVerticalSourceEndOffset : ParallaxViewTests
  • c_defaultVerticalSourceOffsetKind : ParallaxViewTests
  • c_defaultVerticalSourceStartOffset : ParallaxViewTests
  • c_defaultZoomChainMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultZoomFactor : ScrollPresenterTests
  • c_defaultZoomMode : ScrollPresenterTests , ScrollViewTests
  • c_durationTicks : BrightnessSun , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo , LottieLogo::LottieLogo_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • c_epsilon : ScrollViewTests
  • c_expandCollapseChevronName : TreeViewItem
  • c_expressionAnimationSourcesExtentPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesMaxPositionPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesMinPositionPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesOffsetPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesPositionPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesViewportPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesZoomFactorPropertyName : ScrollPresenterTests
  • c_hoverLight_OuterConeAngle_Expected : RevealStatesPage
  • c_itemIndentation : NavigationViewItemBase
  • c_MaxStockOffsetsChangeDuration : ScrollPresenterTests
  • c_MaxStockZoomFactorChangeDuration : ScrollPresenterTests
  • c_MaxWaitDuration : ItemsViewTests , ParallaxViewTests , RefreshVisualizerTests , ScrollPresenterTests , ScrollViewTests , SelectorBarTests
  • c_multiSelectCheckBoxName : TreeViewItem
  • c_overlayCornerRadiusKey : TabViewItem
  • c_resourceLoc : sealed< T, fallback, RawStorageT >
  • c_resourceLocWinUI : sealed< T, fallback, RawStorageT >
  • c_scrollPresenterMaxOverpanRatio : ParallaxViewTests
  • c_scrollViewerMaxOverpanRatio : ParallaxViewTests
  • c_scrollViewerMaxOverpanRatioWithZoom : ParallaxViewTests
  • c_selectionIndicatorName : NavigationViewItemHelper< T >
  • c_shiftTolerance : ParallaxViewTests
  • c_simulatedMiddle : TwoPaneViewTests , TwoPaneViewPage
  • c_simulatedPaneHeight : TwoPaneViewTests , TwoPaneViewPage
  • c_simulatedPaneWidth : TwoPaneViewTests , TwoPaneViewPage
  • c_SquareWidth : AnnotatedScrollBarIScrollControllerPage
  • c_targetRectWidthIncrement : TabViewItem
  • c_visualHorizontalOffsetTargetedPropertyName : ScrollPresenterTests
  • c_visualScaleTargetedPropertyName : ScrollPresenterTests
  • c_visualVerticalOffsetTargetedPropertyName : ScrollPresenterTests
  • CacheFirstTabSelectedBackgroundPathFill() : TabViewPage
  • CacheLocalizedStringResources() : CommandBarFlyoutCommandBar
  • CacheOriginalVerticalScrollControllerAndVisibility() : ItemsView
  • CalculateActualRatingWidth() : RatingControl
  • CalculateAvailableSize() : UniformGridLayoutState
  • CalculateColumns() : ColumnMajorUniformToLargestGridLayout
  • CalculateExtraPixelsInLine() : UniformGridLayoutState
  • CalculateLayoutBoundsForRow() : ActivityFeedLayout
  • CalculateScrollViewerSize() : PipsPager
  • CalculateStarCenter() : RatingControl
  • CalculateTotalRatingControlWidth() : RatingControl
  • CalculateWidthForItems() : TopNavigationViewDataProvider
  • CalendarDatePickerPage() : CalendarDatePickerPage
  • CalendarView_CalendarViewDayItemChanging() : CalendarViewPage
  • CalendarViewPage() : CalendarViewPage
  • CallInfo() : ItemCollectionTransitionProviderTests::CallInfo
  • CanAddAndRemoveSnapPointsFromAScrollPresenter() : ScrollPresenterTests
  • CanAddSameSwipeItemsInBothSidesHorizontal() : SwipeControlTests
  • CanAddScrollSnapPointsWithMixedAlignments() : ScrollPresenterTests
  • CanBindSelectedItem() : ItemsViewTests
  • CanBoldTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanBringIntoViewElements() : EffectiveViewportScrollPresenterTests , EffectiveViewportTests , ViewportTests
  • CanBringItemIntoView() : ItemsViewTests
  • Cancel() : AnnotatedScrollBarScrollingEventArgs , InfoBarClosingEventArgs , NavigationViewPaneClosingEventArgs , ScrollingBringingIntoViewEventArgs , TabViewTabDragStartingEventArgs , TeachingTipClosingEventArgs , TreeViewDragItemsStartingEventArgs
  • CancelCurrentPressStateContinuation() : RevealHoverLight
  • CancelFallbackAnimationCompleteWait() : AcrylicBrush
  • cancelScrollingEvent_Checked() : AnnotatedScrollBarSummaryPage
  • cancelScrollingEvent_Unchecked() : AnnotatedScrollBarSummaryPage
  • CanChangeColorThroughHexTextEntry() : ColorPickerTests
  • CanChangeColorThroughHsvTextEntry() : ColorPickerTests
  • CanChangeColorThroughOpacityTextEntry() : ColorPickerTests
  • CanChangeColorThroughRgbTextEntry() : ColorPickerTests
  • CanChangeFocusAfterUniqueIdReset() : ViewManagerTests
  • CanChangeLayoutProperty() : ItemsViewTests
  • CanChangeSelectionModeProperty() : ItemsViewTests
  • CanChangeSourceAfterState() : AnimatedIconTests
  • CanClearEveryValueTest() : RatingControlTests
  • CanClearItemsWithoutCrashing() : SwipeControlTests
  • CanCopyTextFromRichEditBox() : TextCommandBarFlyoutTests
  • CanCopyTextFromRichTextBlock() : TextCommandBarFlyoutTests
  • CanCopyTextFromTextBlock() : TextCommandBarFlyoutTests
  • CanCopyTextFromTextBox() : TextCommandBarFlyoutTests
  • CanCreateFromIBindableIterable() : InspectingDataSourceTests
  • CanCreateFromInccIBindableVector() : InspectingDataSourceTests
  • CanCreateFromIObservableVector() : InspectingDataSourceTests
  • CanCutCopyTextFrom() : TextCommandBarFlyoutTests
  • CanCutTextFromRichEditBox() : TextCommandBarFlyoutTests
  • CanCutTextFromTextBox() : TextCommandBarFlyoutTests
  • CandidateInfo() : ItemsRepeaterScrollHost::CandidateInfo
  • CanDoSelectionChangedOfItemTemplate() : FocusBehaviorTests
  • CanDragItemContainerAfterPan() : ItemsViewTestsWithInputHelper
  • CanDragItems() : TreeViewProperties
  • CanDragItemsProperty() : TreeViewProperties
  • CanDragTabs() : TabViewProperties
  • CanDragTabsProperty() : TabViewProperties
  • CanExecute() : TestCommand , MyCommand , TestCommand
  • CanExecuteChanged : TestCommand , MyCommand , TestCommand
  • CanExecuteCheckBox_Checked() : SplitButtonPage
  • CanExecuteCheckBox_Unchecked() : SplitButtonPage
  • CanExpandTreeViewItemWithItemSourceSet() : TreeViewTests
  • CanExtendSelectionModelINPC() : SelectionModelTests
  • CanGoBack() : WebView2Properties
  • CanGoBackProperty() : WebView2Properties
  • CanGoForward() : WebView2Properties
  • CanGoForwardProperty() : WebView2Properties
  • CanGrowCacheBuffer() : EffectiveViewportScrollPresenterTests , ViewportTests
  • CanGrowCacheBufferWithScrollViewer() : EffectiveViewportTests
  • CanHideCommandBarFlyoutInFlyoutClosedHandler() : CommandBarFlyoutTests
  • CanInstantiate() : RefreshVisualizerTests , ScrollViewerAdapterTests
  • CanItalicizeTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanMoveItem() : FlowLayoutCollectionChangeTests
  • CanPasteTextTo() : TextCommandBarFlyoutTests
  • CanPasteTextToPasswordBox() : TextCommandBarFlyoutTests
  • CanPasteTextToRichEditBox() : TextCommandBarFlyoutTests
  • CanPasteTextToTextBox() : TextCommandBarFlyoutTests
  • CanPinFocusedElements() : ViewManagerTests
  • CanQueryElementFactory() : ViewManagerTests
  • CanRaiseItemInvoked() : ItemContainer , ItemsView
  • CanRead() : CustomProperty
  • CanReadSelectedItemViaICustomPropertyProvider() : SelectionModelTests
  • CanRemoveAndInsertItemsInRealizedRange() : FlowLayoutCollectionChangeTests
  • CanRemoveItemsAfterRealizedRange() : FlowLayoutCollectionChangeTests
  • CanRemoveItemsStartingBeforeRealizedRange() : FlowLayoutCollectionChangeTests
  • CanRemoveItemsStartingInRealizedRange() : FlowLayoutCollectionChangeTests
  • CanReorderItems() : TreeViewProperties
  • CanReorderItemsProperty() : TreeViewProperties
  • CanReorderTabs() : TabViewProperties , TabViewTearOutTests
  • CanReorderTabsProperty() : TabViewProperties
  • CanReorderTabsWithTabTearOutWithDataItems() : TabViewTests
  • CanReorderTabsWithTabTearOutWithoutDataItems() : TabViewTests
  • CanReplaceItem() : SelectionModelTests
  • CanReplaceSingleItem() : FlowLayoutCollectionChangeTests
  • CanReuseElementsDuringUniqueIdReset() : ViewManagerTests
  • CanScroll : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController
  • CanScrollChanged : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController
  • CanScrollDown() : ScrollView
  • CanScrollHorizontallyInDirection() : ScrollView
  • CanScrollInDirection() : ScrollView
  • CanScrollLeft() : ScrollView
  • canScrollPresenter51ContentShrink : ScrollPresentersWithSimpleContentsPage
  • CanScrollRight() : ScrollView
  • CanScrollUp() : ScrollView
  • CanScrollVertically() : ItemsView
  • CanScrollVerticallyInDirection() : ScrollView
  • CanSelect() : SelectorBase
  • CanSelectAllIn() : TextCommandBarFlyoutTests
  • CanSelectAllInPasswordBox() : TextCommandBarFlyoutTests
  • CanSelectAllInRichEditBox() : TextCommandBarFlyoutTests
  • CanSelectAllInRichTextBlock() : TextCommandBarFlyoutTests
  • CanSelectAllInTextBlock() : TextCommandBarFlyoutTests
  • CanSelectAllInTextBox() : TextCommandBarFlyoutTests
  • CanSelectColorFromSpectrum() : ColorPickerTests
  • CanSelectColorFromSpectrumLTR() : ColorPickerTests
  • CanSelectColorFromSpectrumRTL() : ColorPickerTests
  • CanSelectItemInFlyoutAndNVIGetsCollapsedOnFlyoutClose() : SelectionTests
  • CanSelectMultiple : SelectionContainerAutomationPeer , ItemsViewAutomationPeer , NavigationViewAutomationPeer , PagerControlAutomationPeer , PipsPagerAutomationPeer , TabViewAutomationPeer , TreeViewListAutomationPeer
  • CanSelectNavigationViewItemWithChildren() : SelectionTests
  • CanSelectPreviousColor() : ColorPickerTests
  • CanSelectSuggestion() : AutoSuggestBox
  • CanSelectTabs() : TabViewTearOutTests
  • CanSelectTabsWithTabTearOutWithDataItems() : TabViewTests
  • CanSelectTabsWithTabTearOutWithoutDataItems() : TabViewTests
  • CanSetItemContainerIsSelectedProperty() : ItemsViewTests
  • CanSetItemsSource() : RepeaterTests
  • CanSetItemTemplateAfterItemsSourceProperty() : ItemsViewTests
  • CanSetStateOnAnimatedIconDirectlyWithoutPropagationToChild() : AnimatedIconTests
  • CanShareSnapPointsInMultipleCollections() : ScrollPresenterTests
  • CanSlideHorizontally() : SliderInteractionTests
  • CanSlideHorizontallyWithKeyboard() : SliderInteractionTests
  • CanSlideVertically() : SliderInteractionTests
  • CanSlideVerticallyWithKeyboard() : SliderInteractionTests
  • CanStyleTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanSwipeAndTapBothItemsHorizontal() : SwipeControlTests
  • CanSwipeAndTapFirstRevealedItemHorizontal() : SwipeControlTests
  • CanSwipeAndTapFirstRevealedItemVertical() : SwipeControlTests
  • CanSwipeAndTapSecondRevealedItemVertical() : SwipeControlTests
  • CanSwipeAndTapSecondtRevealedItemHorizontal() : SwipeControlTests
  • CanSwipeBackFromAnOpenedSwipe() : SwipeControlTests
  • CanSwipeMultipleItemsWithSameSwipeService() : SwipeControlTests
  • CanSwipeOtherDirectionAfterClosingAnOpenedSwipe() : SwipeControlTests
  • CanSwipeToExecuteHorizontal() : SwipeControlTests
  • CanSwipeToExecuteVertical() : SwipeControlTests
  • CanSwitchShouldConstrainToRootBounds() : TeachingTipTests
  • CanTapOnPrimaryItems() : CommandBarFlyoutTests
  • CanTapOnSecondaryItems() : CommandBarFlyoutTests
  • CanTapOnSecondaryItemWithFlyoutWithoutClosing() : CommandBarFlyoutTests
  • CanTearOutAndRejoinTabs() : TabViewTearOutTests
  • CanTearOutAndRejoinTabsWithDataItems() : TabViewTests
  • CanTearOutAndRejoinTabsWithoutDataItems() : TabViewTests
  • CanTearOutTabs() : TabViewProperties
  • CanTearOutTabsProperty() : TabViewProperties
  • CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedHorizontal() : SwipeControlTests
  • CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedVertical() : SwipeControlTests
  • CanUnderlineTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanUndoAndRedoIn() : TextCommandBarFlyoutTests
  • CanUndoAndRedoInRichEditBox() : TextCommandBarFlyoutTests
  • CanUndoAndRedoInTextBox() : TextCommandBarFlyoutTests
  • CanUseItemsSourceWithItemContainers() : ItemsViewTests
  • CanUseKeyboardToInteractColorSpectrumRTL() : ColorPickerTests
  • CanUseKeyboardToInteractSlidersRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithColorSpectrum() : ColorPickerTests
  • CanUseKeyboardToInteractWithColorSpectrumLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithSliders() : ColorPickerTests
  • CanUseKeyboardToInteractWithSlidersLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithSlidersLTRHorizontalOrientation() : ColorPickerTests
  • CanUseKeyboardToInteractWithSlidersRTLHorizontalOrientation() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForAlpha() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForAlphaLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForAlphaRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHex() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHexLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHexRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHSV() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHSVLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHSVRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForRGB() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForRGBLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForRGBRTL() : ColorPickerTests
  • CanUserInvoke() : ItemContainerProperties
  • CanUserInvokeComboBox_SelectionChanged() : ItemContainerSummaryPage
  • CanUserInvokeInternal() : ItemContainer
  • CanUserInvokeProperty() : ItemContainerProperties
  • CanUserSelect() : ItemContainerProperties
  • CanUserSelectComboBox_SelectionChanged() : ItemContainerSummaryPage
  • CanUserSelectInternal() : ItemContainer
  • CanUserSelectProperty() : ItemContainerProperties
  • canvas : CanvasScrollControllerConsumer
  • CanvasGeometry() : CanvasGeometry
  • CanvasGeometryToIGeometrySource2D() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • canvasScrollControllerConsumer : ScrollPresenterWithSimpleScrollControllersPage
  • CanvasScrollControllerConsumer() : CanvasScrollControllerConsumer
  • CanWrite() : CustomProperty
  • Caption() : RatingControlProperties
  • CaptionProperty() : RatingControlProperties
  • CastOrUnbox() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • categories : HierarchicalNavigationViewDataBinding
  • categories11 : HierarchicalNavigationViewDataBinding
  • Category() : Category
  • CB_Closed() : CommandBarSummaryPage
  • CB_Opened() : CommandBarSummaryPage
  • cbComplexBackground_Toggled() : AcrylicRenderingPage
  • cbToggleFallbackColor_Toggled() : AcrylicRenderingPage
  • Center : FlowLayoutAlgorithm , MapControlProperties , RadialGradientBrushProperties
  • CenterButton_Click() : MapControlPage
  • CenterPoint() : ScrollingZoomAnimationStartingEventArgs , ZoomFactorChange , ZoomFactorChangeWithAdditionalVelocity
  • CenterProperty() : MapControlProperties , RadialGradientBrushProperties
  • ChainedHoverLightStateValuesValidationHelper() : RevealStatesPage
  • ChangeAlignmentButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • ChangeAlignmentOfDisconnectedParallaxViewChild() : ParallaxViewTests
  • ChangeBackgroundClick() : RefreshVisualizerPage
  • ChangeContent_Click() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ChangeContentOverlayVisibility_Click() : NavigationViewTopNavStorePage
  • ChangeCustomImagesTwoType_Click() : RatingControlPage
  • Changed : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • ChangeDataSource() : TopNavigationViewDataProvider
  • ChangeDataSource_Click() : NavigationViewTopNavOnlyPage
  • ChangeFallbackGlyphButton_Click() : AnimatedIconPage
  • ChangeFlowDirection_Click() : TreeViewPage
  • ChangeFocusVisualKind_Click() : NavigationViewPage
  • ChangeForegroundClick() : RefreshVisualizerPage
  • ChangeGamesContent_Click() : NavigationViewTopNavOnlyPage
  • ChangeHeaderButton_Click() : NavigationViewCustomThemeResourcesPage
  • ChangeIsExpandedNavigationViewItem() : NavigationView
  • ChangeNumberOfPages() : PagerControlTestBase , PipsPagerTestBase
  • ChangeOffsetsBeforeLoading() : ScrollPresenterTests
  • ChangeOffsetsPrivate() : ScrollPresenter
  • ChangeOffsetsWhileBiDirectionalScrollControllerIsAttached() : ScrollPresenterTests
  • ChangeOffsetsWhileScrollControllersAreAttached() : ScrollPresenterTests
  • ChangeOffsetsWithAdditionalVelocityAndAttachedBiDirectionalScrollController() : ScrollPresenterTests
  • ChangeOffsetsWithAdditionalVelocityAndAttachedScrollControllers() : ScrollPresenterTests
  • ChangeOffsetsWithAdditionalVelocityPrivate() : ScrollPresenter
  • ChangeOffsetsWithAttachedBiDirectionalScrollController() : ScrollPresenterTests
  • ChangeOffsetsWithAttachedScrollControllers() : ScrollPresenterTests
  • ChangeOverflowLabelVisibility_Checked() : NavigationViewTopNavOnlyPage
  • ChangeOverflowLabelVisibility_Unchecked() : NavigationViewTopNavOnlyPage
  • ChangePaneHeader_Click() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • ChangePaneTitle_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ChangePaneTitleStyle_Click() : NavigationViewCustomThemeResourcesPage
  • ChangePaneTitleText_Click() : NavigationViewCustomThemeResourcesPage
  • ChangePaneVisibleButton_Click() : NavigationViewInitPage
  • ChangePropertyAfterParallaxViewDisposal() : ParallaxViewTests
  • ChangeRatingBy() : RatingControl
  • ChangeRefreshRequestedButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • changeScrollPresenterOffset : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • ChangeScrollPresenterView() : ParallaxViewTests
  • ChangeScrollViewerView() : ParallaxViewTests
  • ChangeSelection() : NavigationView , NavigationViewItemAutomationPeer
  • ChangeSelectionAfterFlyout_Click() : TreeViewPage
  • ChangeSelectionInCode_Click() : NavigationViewTopNavStorePage
  • ChangeSelectStatusForItem() : NavigationView
  • ChangeShopTextButton_Click() : TabViewPage
  • ChangeSizeOfDisconnectedScrollViewerContent() : ParallaxViewTests
  • ChangeSourceAndTargetProperties() : ParallaxViewTests
  • ChangeSourceAndTargetPropertiesUsingScrollPresenter() : ParallaxViewTests
  • ChangeSourceAndTargetPropertiesUsingScrollViewer() : ParallaxViewTests
  • ChangeStateTest() : ProgressBarTests , ProgressRingTests
  • ChangeTestFrameVisibility() : NavigationViewRS3Page , RadioButtonsFocusPage , TeachingTipFocusPage
  • ChangeText() : SwipeControlPage
  • ChangeToIEnumerableButton_Clicks() : NavigationViewInitPage , NavigationViewTopNavStorePage
  • ChangeTopNavVisibility_Click() : NavigationViewTopNavOnlyPage , NavigationViewTopNavStorePage
  • ChangeValue_Click() : ProgressBarPage , ProgressBarReTemplatePage , ProgressRingCustomLottieSourcePage , ProgressRingPage
  • ChangeValueTest() : ProgressBarTests , ProgressRingTests
  • ChangeView() : ScrollPresenterDynamicPage
  • ChangeViewCalled() : ItemsRepeaterScrollHost::BringIntoViewState
  • ChangeViewOffset() : ItemsRepeaterScrollHost::BringIntoViewState
  • ChangeZoomFactorBeforeLoading() : ScrollPresenterTests
  • ChangeZoomFactorPrivate() : ScrollPresenter
  • ChangeZoomFactorWithAdditionalVelocityPrivate() : ScrollPresenter
  • ChangingDisplayModeTest() : PagerControlTests
  • ChangingSourcePropertyChangesRenderSize() : AnimatedIconTests
  • ChangingVisualTrees() : AnimatedIconTests
  • Char : MathToken
  • chartreuseBrush : ScrollPresenterStackPanelAnchoringPage
  • Check() : InfoBarTests , NumberBoxTests
  • CheckAndUpdateVisibility() : WebView2
  • CheckAndUpdateWebViewPosition() : WebView2
  • CheckAndUpdateWindowPosition() : WebView2
  • CheckBoxPage() : CheckBoxPage
  • CheckBoxSelectionState() : TreeViewItem
  • CheckCurrentItemDoesNotRaiseInvokeEvent() : BreadcrumbTests
  • Checked() : InkToolBarFlyoutItemProperties
  • checkedRevoker : ChildHandlers
  • CheckIfButtonsHiddenButton : PagerControlTestPageElements
  • CheckIfButtonsHiddenButtonClicked() : PagerControlPage
  • CheckIfButtonsHiddenLabel : PagerControlTestPageElements
  • CheckLeaks() : ScrollViewerAdapterTests , ScrollViewerAdapterPage
  • CheckLeaks_Click() : ScrollViewerAdapterPage
  • CheckMenuItemsOffset_Click() : NavigationViewCompactPaneLengthTestPage
  • CheckMutationCount() : HashMap< K, V >::Iterator
  • CheckSelectedItemEdgeCase() : SelectionTests
  • CheckSpyingTicksRequirement() : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • CheckThread() : ReferenceTracker< D, ImplT, I >
  • CheckWebViewPixel() : WebView2RenderingVerifier
  • CheckWindowPixel() : WebView2RenderingVerifier
  • Child() : ItemContainerProperties , ParallaxViewProperties
  • Child_ElementPrepared() : BreadcrumbBarPage
  • ChildProperty() : ItemContainerProperties , ParallaxViewProperties
  • Children : TreeNode , Category , TreeViewItemSource , CustomContent , InkToolBarProperties , InkToolBar , NonVirtualizingLayoutContext , SelectionModelChildrenRequestedEventArgs , TreeViewNode
  • ChildrenChanged() : TreeViewNode
  • ChildrenCollection() : VirtualLayoutContextAdapter::ChildrenCollection< T >
  • ChildrenCore() : LayoutPanelLayoutContext , NonVirtualizingLayoutContext , VirtualLayoutContextAdapter
  • ChildrenInTabFocusOrderIterable() : ChildrenInTabFocusOrderIterable
  • ChildrenInTabFocusOrderIterator() : ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
  • ChildrenNodeCount() : final
  • ChildrenProperty() : InkToolBarProperties
  • ChildrenRequested() : SelectionModelProperties
  • ChildVectorChanged() : TreeViewNode
  • ChkAllowDrop_Checked() : TabViewTabItemsSourcePage
  • ChkAllowDrop_Unchecked() : TabViewTabItemsSourcePage
  • ChkAnnotatedScrollBarIsEnabled_IsCheckedChanged() : ItemsViewIntegrationPage
  • chkAreHorizontalSourceOffsetsRelative_Checked() : DynamicPage
  • chkAreHorizontalSourceOffsetsRelative_Unchecked() : DynamicPage
  • chkAreVerticalSourceOffsetsRelative_Checked() : DynamicPage
  • chkAreVerticalSourceOffsetsRelative_Unchecked() : DynamicPage
  • ChkAutoHideScrollControllers_Checked() : ScrollViewDynamicPage
  • ChkAutoHideScrollControllers_Indeterminate() : ScrollViewDynamicPage
  • ChkAutoHideScrollControllers_Unchecked() : ScrollViewDynamicPage
  • ChkBringIntoViewUI_Checked() : ScrollViewBringIntoViewPage
  • ChkBringIntoViewUI_Unchecked() : ScrollViewBringIntoViewPage
  • ChkCanDrag_Checked() : TabViewTabItemsSourcePage
  • ChkCanDrag_Unchecked() : TabViewTabItemsSourcePage
  • ChkCanDragItems_Checked() : TabViewTabItemsSourcePage
  • ChkCanDragItems_Unchecked() : TabViewTabItemsSourcePage
  • ChkCanReorderItems_Checked() : TabViewTabItemsSourcePage
  • ChkCanReorderItems_Unchecked() : TabViewTabItemsSourcePage
  • ChkChildrenProperties_Checked() : ItemsViewSummaryPage
  • ChkChildrenProperties_Unchecked() : ItemsViewSummaryPage
  • ChkContentProperties_Checked() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkContentProperties_Unchecked() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkCustomUI_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ScrollViewBlankPage
  • ChkCustomUI_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ScrollViewBlankPage
  • ChkDataSource_Checked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • ChkDataSource_Unchecked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • ChkEvents_Checked() : LinedFlowLayoutDemo
  • ChkEvents_Unchecked() : LinedFlowLayoutDemo
  • ChkGridViewIsEnabled_Checked() : CommonStylesPage
  • ChkGridViewIsEnabled_Unchecked() : CommonStylesPage
  • ChkHandleItemsInfoRequested_IsCheckedChanged() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage
  • ChkHorizontalOrientation_Checked() : ScrollPresenterStackPanelAnchoringPage
  • ChkHorizontalOrientation_Unchecked() : ScrollPresenterStackPanelAnchoringPage
  • ChkImageParentProperties_Checked() : ImagePage
  • ChkImageParentProperties_Unchecked() : ImagePage
  • ChkImageProperties_Checked() : ImagePage
  • ChkImageProperties_Unchecked() : ImagePage
  • ChkIsAnimatingThumbOffset_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsAnimatingThumbOffset_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsBiDirectionalScrollControllerRailEnabled_Checked() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • ChkIsBiDirectionalScrollControllerRailEnabled_Unchecked() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • ChkIsContentEnabled_Checked() : ScrollViewWithScrollControllersPage
  • ChkIsContentEnabled_Unchecked() : ScrollViewWithScrollControllersPage
  • ChkIsContentTabStop_Checked() : ScrollViewWithScrollControllersPage
  • ChkIsContentTabStop_Unchecked() : ScrollViewWithScrollControllersPage
  • ChkIsEnabled_Checked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsEnabled_CheckedChanged() : SelectorBarSummaryPage
  • ChkIsEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkIsEnabled_Unchecked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsHorizontallyScrollable_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsHorizontallyScrollable_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsHorizontalRailEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkIsHorizontalScrollChainingEnabled_IsCheckedChanged() : ScrollViewerPage
  • chkIsHorizontalShiftClamped_Checked() : DynamicPage
  • chkIsHorizontalShiftClamped_Unchecked() : DynamicPage
  • ChkIsItemInvokedEnabled_Checked() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • ChkIsItemInvokedEnabled_Unchecked() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • chkIsRTL_Checked() : DynamicPage
  • chkIsRTL_Unchecked() : DynamicPage
  • ChkIsTabStop_Checked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsTabStop_CheckedChanged() : SelectorBarSummaryPage
  • ChkIsTabStop_IsCheckedChanged() : ScrollViewerPage
  • ChkIsTabStop_Unchecked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsThumbPannable_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsThumbPannable_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsThumbPositionMirrored_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsThumbPositionMirrored_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVerticallyScrollable_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVerticallyScrollable_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVerticalRailEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkIsVerticalScrollChainingEnabled_IsCheckedChanged() : ScrollViewerPage
  • chkIsVerticalShiftClamped_Checked() : DynamicPage
  • chkIsVerticalShiftClamped_Unchecked() : DynamicPage
  • ChkIsVisible_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVisible_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsZoomChainingEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkItemsControlIsTabStop_IsCheckedChanged() : FlatItemsControlPage , GroupedItemsControlPage
  • ChkItemsControlProperties_Checked() : FlatItemsControlPage
  • ChkItemsControlProperties_Unchecked() : FlatItemsControlPage
  • ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged() : GroupedItemsControlPage , GroupedListViewBasePage
  • ChkItemsRepeaterProperties_IsCheckedChanged() : ObjectModelTestPage
  • ChkItemsViewDataSource_Checked() : ItemsViewSummaryPage
  • ChkItemsViewDataSource_Unchecked() : ItemsViewSummaryPage
  • ChkItemsViewMethods_Checked() : ItemsViewSummaryPage
  • ChkItemsViewMethods_Unchecked() : ItemsViewSummaryPage
  • ChkItemsViewProperties_Checked() : ItemsViewSummaryPage
  • ChkItemsViewProperties_Unchecked() : ItemsViewSummaryPage
  • ChkLayoutPanel_Checked() : LinedFlowLayoutDemo
  • ChkLayoutPanel_Unchecked() : LinedFlowLayoutDemo
  • ChkLinedFlowLayout_Checked() : LinedFlowLayoutDemo
  • ChkLinedFlowLayout_Unchecked() : LinedFlowLayoutDemo
  • ChkLinedFlowLayoutHandleItemsInfoRequested_IsCheckedChanged() : LinedFlowLayoutDemo
  • ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLinedFlowLayoutShowLockedItems_Checked() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLinedFlowLayoutShowLockedItems_Unchecked() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkListViewBaseAllowDrop_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseCanDragItems_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseCanReorderItems_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseIsItemClickEnabled_IsCheckedChanged() : GroupedListViewBasePage , ListViewBasePage
  • ChkListViewBaseIsSwipeEnabled_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseProperties_Checked() : ListViewBasePage
  • ChkListViewBaseProperties_Unchecked() : ListViewBasePage
  • ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged() : GroupedListViewBasePage , ListViewBasePage
  • ChkListViewIsEnabled_Checked() : CommonStylesPage
  • ChkListViewIsEnabled_Unchecked() : CommonStylesPage
  • ChkLog_Checked() : ScrollPresenterWithSimpleScrollControllersPage
  • ChkLog_Unchecked() : ScrollPresenterWithSimpleScrollControllersPage
  • ChkLogAnnotatedScrollBarEvents_Checked() : ItemsViewIntegrationPage
  • ChkLogAnnotatedScrollBarEvents_Unchecked() : ItemsViewIntegrationPage
  • ChkLogAnnotatedScrollBarMessages_Checked() : ItemsViewIntegrationPage
  • ChkLogAnnotatedScrollBarMessages_Unchecked() : ItemsViewIntegrationPage
  • ChkLogBringIntoViewRequestedEvents_Checked() : ScrollPresenterBringIntoViewPage
  • ChkLogBringIntoViewRequestedEvents_Unchecked() : ScrollPresenterBringIntoViewPage
  • ChkLogContentEffectiveViewportChangedEvent_Checked() : ScrollPresenterDynamicPage
  • ChkLogContentEffectiveViewportChangedEvent_Unchecked() : ScrollPresenterDynamicPage
  • ChkLogContentEvents_Checked() : ScrollViewDynamicPage
  • ChkLogContentEvents_Unchecked() : ScrollViewDynamicPage
  • ChkLogContentPointerEvents_Checked() : ScrollPresenterDynamicPage
  • ChkLogContentPointerEvents_Unchecked() : ScrollPresenterDynamicPage
  • ChkLogItemContainerMessages_Checked() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemContainerMessages_Unchecked() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterEvents_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterEvents_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterMessages_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterMessages_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsViewEvents_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsViewEvents_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsViewMessages_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsViewMessages_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogLinedFlowLayoutEvents_Checked() : ItemsViewIntegrationPage
  • ChkLogLinedFlowLayoutEvents_Unchecked() : ItemsViewIntegrationPage
  • ChkLogLinedFlowLayoutMessages_Checked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLogLinedFlowLayoutMessages_Unchecked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLogs_Checked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewBasePage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • ChkLogs_IsCheckedChanged() : ObjectModelTestPage
  • ChkLogs_Unchecked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewBasePage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • ChkLogScrollPresenterEvents_Checked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollPresenterEvents_Unchecked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollPresenterMessages_Checked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogScrollPresenterMessages_Unchecked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogScrollViewEvents_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollViewEvents_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollViewMessages_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogScrollViewMessages_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogSelectorBarEvents_Checked() : SelectorBarSummaryPage
  • ChkLogSelectorBarEvents_Unchecked() : SelectorBarSummaryPage
  • ChkLogSelectorBarMessages_Checked() : SelectorBarSummaryPage
  • ChkLogSelectorBarMessages_Unchecked() : SelectorBarSummaryPage
  • ChkLogSwipeControlMessages_Checked() : SwipeControlPage
  • ChkLogSwipeControlMessages_Unchecked() : SwipeControlPage
  • ChkMethods_Checked() : GroupedListViewBasePage
  • ChkMethods_Unchecked() : GroupedListViewBasePage
  • ChkModernCollectionBasePanelAreStickyGroupHeadersEnabled_IsCheckedChanged() : ListViewAnchoringPage
  • ChkOuterItemsControlIsTabStop_IsCheckedChanged() : NestedItemsControlsPage
  • ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged() : NestedGridViewsPage , NestedListViewsPage
  • ChkPageMethods_Checked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , SwipeControlPage2
  • ChkPageMethods_Unchecked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , SwipeControlPage2
  • ChkProperties_Checked() : GroupedItemsControlPage , GroupedListViewBasePage
  • ChkProperties_Unchecked() : GroupedItemsControlPage , GroupedListViewBasePage
  • ChkSample_CheckedChanged() : ListViewElementNameBindingPage , ItemTemplateDemo
  • ChkScrollPresenterAttachedProperties_Checked() : ScrollViewWithScrollControllersPage
  • ChkScrollPresenterAttachedProperties_Unchecked() : ScrollViewWithScrollControllersPage
  • ChkScrollPresenterClonedProperties_Checked() : ScrollViewDynamicPage
  • ChkScrollPresenterClonedProperties_Unchecked() : ScrollViewDynamicPage
  • ChkScrollPresenterEvents_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterEvents_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterMethods_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterMethods_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterProperties_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterProperties_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterTestHooks_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterTestHooks_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollView_Checked() : LinedFlowLayoutDemo
  • ChkScrollView_Unchecked() : LinedFlowLayoutDemo
  • ChkScrollViewContentFlowDirection_Checked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewContentFlowDirection_Unchecked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewerEvents_Checked() : ScrollViewerPage
  • ChkScrollViewerEvents_Unchecked() : ScrollViewerPage
  • ChkScrollViewerMethods_Checked() : ScrollViewerPage
  • ChkScrollViewerMethods_Unchecked() : ScrollViewerPage
  • ChkScrollViewerProperties_Checked() : ScrollViewerPage
  • ChkScrollViewerProperties_Unchecked() : ScrollViewerPage
  • ChkScrollViewFlowDirection_Checked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewFlowDirection_Unchecked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewIsEnabled_Checked() : LinedFlowLayoutDemo
  • ChkScrollViewIsEnabled_Unchecked() : LinedFlowLayoutDemo
  • ChkScrollViewIsTabStop_Checked() : LinedFlowLayoutDemo
  • ChkScrollViewIsTabStop_Unchecked() : LinedFlowLayoutDemo
  • ChkScrollViewProperties_Checked() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkScrollViewProperties_Unchecked() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkSelectorBarItems_Checked() : SelectorBarSummaryPage
  • ChkSelectorBarItems_Unchecked() : SelectorBarSummaryPage
  • ChkSelectorBarProperties_Checked() : SelectorBarSummaryPage
  • ChkSelectorBarProperties_Unchecked() : SelectorBarSummaryPage
  • ChkShowCurrentElement_Checked() : ItemsViewSummaryPage
  • ChkShowCurrentElement_Unchecked() : ItemsViewSummaryPage
  • ChkShowKeyboardNavigationReferenceOffset_Checked() : ItemsViewSummaryPage
  • ChkShowKeyboardNavigationReferenceOffset_Unchecked() : ItemsViewSummaryPage
  • ChkSwipeControlProperties_Checked() : SwipeControlPage2
  • ChkSwipeControlProperties_Unchecked() : SwipeControlPage2
  • ChkSwipeEvents_Checked() : SwipeControlPage2
  • ChkSwipeEvents_Unchecked() : SwipeControlPage2
  • ChkSwipeItemProperties_Checked() : SwipeControlPage2
  • ChkSwipeItemProperties_Unchecked() : SwipeControlPage2
  • ChkSwipeMethods_Checked() : SwipeControlPage2
  • ChkSwipeMethods_Unchecked() : SwipeControlPage2
  • ChkSwipeTestHooks_Checked() : SwipeControlPage2
  • ChkSwipeTestHooks_Unchecked() : SwipeControlPage2
  • ChkUseAnimator_Checked() : ScrollPresenterRepeaterAnchoringPage
  • ChkUseAnimator_Unchecked() : ScrollPresenterRepeaterAnchoringPage
  • ChkUseAppAnimator_IsCheckedChanged() : ItemsViewInteractiveTestsPage
  • ChkUseConstantMonthCount_IsCheckedChanged() : ItemsViewIntegrationPage
  • ChkUseFastPath_IsCheckedChanged() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage
  • ChkUseLeftHeader_IsCheckedChanged() : ScrollViewerPage
  • ChkUseTopHeader_IsCheckedChanged() : ScrollViewerPage
  • ChkUseTopLeftHeader_IsCheckedChanged() : ScrollViewerPage
  • ChooseFromComboBox() : AcrylicBrushTests , RevealBrushTests
  • ChooseTest() : WebView2Tests
  • CircleLayoutSamplePage() : CircleLayoutSamplePage
  • Clamp() : UniformGrid2DLayout
  • ClampOutput() : IArithmeticCompositeEffect , IColorMatrixEffect , IGammaTransferEffect , ILinearTransferEffect , ITintEffect
  • ClampSource() : IContrastEffect
  • ClassCleanup() : TabViewTearOutTests
  • ClassInitialize() : DropDownButtonTests , ExpanderTests , ImageIconTests , InfoBarTests , ButtonInteractionTests , SliderInteractionTests , ItemContainerTests , ItemsViewTestsWithInputHelper , LayoutPanelTests , MapControlTests , AcrylicBrushTests , RevealBrushTests , MenuBarTests , CommonTests , EventTests , FocusBehaviorTests , PaneBehaviorTests , SelectionTests , TopModeTests , NumberBoxTests , PagerControlTests , ParallaxViewTests , PersonPictureTests , PipsPagerTests , ProgressBarTests , ProgressRingTests , RefreshContainerTests , ScrollViewerAdapterTests , RadialGradientBrushTests , RadioButtonsTests , RadioMenuFlyoutItemTests , RatingControlTests , RepeaterTests , ScrollPresenterTestsWithAutomationPeer , ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper , SelectorBarTests , SplitButtonTests , SwipeControlTests , TabViewTearOutTests , TabViewTests , TeachingTipTests , TitleBarTests , TreeViewTests , TwoPaneViewTests , WebView2Tests , AnimatedVisualPlayerTests , AnnotatedScrollBarInteractionTests , AutoSuggestBox , BreadcrumbTests , ColorPickerTests , CommandBarFlyoutTests , TextCommandBarFlyoutTests , CommonStylesTests
  • CleanTransitionsBatch() : ItemCollectionTransitionProvider
  • CleanupCurrentTest() : WebView2BasicPage , WebView2CoreObjectsPage
  • CleanupIRefreshInfoProvider() : ScrollViewerIRefreshInfoProviderAdapter
  • CleanupScrollViewer() : ScrollViewerIRefreshInfoProviderAdapter
  • CleanupWebViewElements() : WebView2BasicPage , WebView2CoreObjectsPage
  • Clear() : HashMap< K, V > , VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SelectorBase , SplitVector< T, SplitVectorID > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , CustomItemsSource , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock , final , MyCollection , final , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • clear_Click() : FlatSample , TreeViewSample
  • ClearAllItemsViewItemContainerRevokers() : ItemsView
  • ClearAllNavigationViewItemBaseRevokers() : NavigationView
  • ClearAnchorCandidates() : ScrollPresenter
  • ClearButtonClick() : InfoBarPage
  • ClearCollectionsButton_Click() : PaneLayoutTestPage
  • ClearColorsButton_Click() : TabViewPage
  • ClearContactBtn_Click() : PersonPicturePage
  • ClearedElementsArrangePosition : ItemsRepeater
  • ClearElement() : final
  • ClearElementFunc : MockElementFactory , RecyclingElementFactoryDerived
  • ClearElementImpl() : ItemsRepeater
  • ClearElementToAnimator() : final
  • ClearElementToElementFactory() : final
  • ClearElementToPinnedPool() : final
  • ClearElementToUniqueIdResetPool() : final
  • ClearEventTokenVectors() : ViewModel
  • ClearException_Click() : TreeViewPage
  • ClearFullLog() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ScrollViewsWithSimpleContentsPage , SelectorBarSummaryPage
  • ClearHeaderButton_Click() : NavigationViewRS4Page
  • ClearImageBtn_Click() : PersonPicturePage
  • ClearItemAspectRatios() : LinedFlowLayout
  • ClearItemInvokedTextButton_Click() : NavigationViewTopNavStorePage
  • ClearItemsViewItemContainerRevokers() : ItemsView
  • ClearLayer() : MapControl
  • ClearLinedFlowLayoutItemAspectRatios() : LayoutsTestHooks
  • ClearLocalizedStringResourceCache() : CommandBarFlyoutCommandBar
  • ClearMaterialHelperInstance() : LifetimeHandler
  • ClearMenuButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ClearNavigationViewItemBaseRevokers() : NavigationView
  • ClearNavItemContent_Click() : NavigationViewTopNavOnlyPage
  • ClearNodes_Click() : TreeViewPage
  • ClearOverlapCheck_Click() : TabViewPage
  • clearPrimaryCommandsFlyout : CommandBarFlyoutPage
  • clearPrimaryCommandsTimer : CommandBarFlyoutPage
  • ClearPrimaryCommandsTimer_Tick() : CommandBarFlyoutPage
  • ClearProperties() : AutoSuggestBoxHelper , ComboBoxHelper , CommandBarFlyoutCommandBarTemplateSettingsFactory , AcrylicBrushProperties , AnimatedIconProperties , AnimatedIconSourceProperties , AnimatedVisualPlayerProperties , AnnotatedScrollBarProperties , AutoSuggestBoxHelperProperties , BreadcrumbBarProperties , ButtonInteractionProperties , ColorPickerProperties , ColorPickerSliderProperties , ColorSpectrumProperties , ColumnMajorUniformToLargestGridLayoutProperties , ComboBoxHelperProperties , CommandBarFlyoutCommandBarProperties , CommandBarFlyoutCommandBarAutomationPropertiesProperties , CommandBarFlyoutCommandBarTemplateSettingsProperties , CornerRadiusFilterConverterProperties , CornerRadiusToThicknessConverterProperties , ExpanderProperties , ExpanderTemplateSettingsProperties , FlowLayoutProperties , ImageIconProperties , ImageIconSourceProperties , InfoBadgeProperties , InfoBadgeTemplateSettingsProperties , InfoBarProperties , InfoBarPanelProperties , InfoBarTemplateSettingsProperties , InkCanvasProperties , InkToolBarProperties , InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties , InkToolBarEraserButtonProperties , InkToolBarFlyoutItemProperties , InkToolBarMenuButtonProperties , InkToolBarPenButtonProperties , InkToolBarPenConfigurationControlProperties , InkToolBarStencilButtonProperties , InkToolBarToolButtonProperties , ItemCollectionTransitionProviderProperties , ItemContainerProperties , ItemsRepeaterProperties , ItemsSourceViewProperties , ItemsViewProperties , LayoutProperties , LayoutPanelProperties , LinedFlowLayoutProperties , MapControlProperties , MapElementsLayerProperties , MapIconProperties , MenuBarProperties , MenuBarItemProperties , MicaBackdropProperties , MonochromaticOverlayPresenterProperties , NavigationViewProperties , NavigationViewItemProperties , NavigationViewItemBaseProperties , NavigationViewItemPresenterProperties , NavigationViewItemPresenterTemplateSettingsProperties , NavigationViewTemplateSettingsProperties , NumberBoxProperties , PagerControlProperties , PagerControlTemplateSettingsProperties , ParallaxViewProperties , PersonPictureProperties , PersonPictureTemplateSettingsProperties , PipsPagerProperties , PipsPagerTemplateSettingsProperties , ProgressBarProperties , ProgressBarTemplateSettingsProperties , ProgressRingProperties , ProgressRingTemplateSettingsProperties , RadialGradientBrushProperties , RadioButtonsProperties , RadioMenuFlyoutItemProperties , RatingControlProperties , RatingItemFontInfoProperties , RatingItemImageInfoProperties , RecyclePoolProperties , RecyclingElementFactoryProperties , RefreshContainerProperties , RefreshVisualizerProperties , RevealBrushProperties , ScrollPresenterProperties , ScrollViewProperties , SelectionModelProperties , SelectorBarProperties , SelectorBarItemProperties , SliderInteractionProperties , SpectrumBrushProperties , SplitButtonProperties , StackLayoutProperties , SwipeControlProperties , SwipeItemProperties , SwipeItemsProperties , TabViewProperties , TabViewItemProperties , TabViewItemTemplateSettingsProperties , TeachingTipProperties , TeachingTipTemplateSettingsProperties , TitleBarProperties , TitleBarTemplateSettingsProperties , ToggleSplitButtonProperties , TreeViewProperties , TreeViewItemProperties , TreeViewItemTemplateSettingsProperties , TreeViewNodeProperties , TwoPaneViewProperties , UniformGridLayoutProperties , WebView2Properties , XamlAmbientLightProperties , XamlControlsResourcesProperties , RevealBrush , RecyclePool
  • ClearRadioButtonsEventsButton : RadioButtonsTestPageElements
  • ClearRadioButtonsEventsButton_Click() : RadioButtonsPage
  • ClearRealizedRange() : VirtualizingStackLayout , final , VirtualizingStackLayout
  • clearSecondaryCommandsFlyout : CommandBarFlyoutPage
  • clearSecondaryCommandsTimer : CommandBarFlyoutPage
  • ClearSecondaryCommandsTimer_Tick() : CommandBarFlyoutPage
  • ClearSelectedItem_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ClearSelection() : SelectionModelTests , SelectionModel , final
  • ClearSelectionChangeBlock() : NavigationViewPage
  • ClearShadow() : CommandBarFlyoutCommandBar
  • ClearStatus() : WebView2BasicPage , WebView2Common
  • ClearSwipeItemsButton_Click() : SwipeControlClearPage
  • ClearTeachingTipDebugMessages() : TeachingTipTests
  • ClearTraces() : ItemsViewTestsWithInputHelper , ScrollPresenterTestsBase , ScrollViewTestsWithInputHelper , SwipeControlTests
  • ClearTypes() : XamlMetadataProvider
  • Click() : SplitButtonProperties
  • ClickButton() : TreeViewTests
  • ClickClearSelectionButton() : NavigationViewTestsBase
  • ClickedItem() : HierarchicalNavigationViewMarkup , HierarchicalNavigationViewDataBinding
  • ClickedItemBroughtIntoView() : ItemsViewTestsWithInputHelper
  • ClickingOutsideARevealedSwipeDismissesIt() : SwipeControlTests
  • ClickOnElements() : BreadcrumbTests
  • ClickOnItem() : RadioButtonsTests
  • ClickOnNavigationViewItemChevron() : TopModeTests
  • ClickPrimaryButton() : SplitButtonTests
  • ClickPrimaryButtonWithKey() : SplitButtonTests
  • ClickSecondaryButton() : SplitButtonTests
  • ClickWaitAndVerifyText() : AnimatedVisualPlayerTests
  • ClipRect() : ProgressBarTemplateSettingsProperties
  • ClipRectProperty() : ProgressBarTemplateSettingsProperties
  • Clone() : InspectingDataSourceTests::CollectionChangeRecorder
  • CloneEllipsisItemSource() : BreadcrumbBarItem
  • CloneWithChildIndex() : IndexPath
  • Close() : SwipeControl , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , HandlePolicy , AnimatedVisual , TeachingTipAutomationPeer , WebView2
  • close() : Awaitable::PTP_WAIT_traits
  • CloseAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CloseAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • closeButton : TeachingTipTestPageElements , TeachingTipFocusTestPageElements
  • CloseButtonClick() : InfoBarProperties , TeachingTipProperties
  • CloseButtonCommand() : TeachingTipProperties , InfoBarProperties , TeachingTipProperties
  • CloseButtonCommandParameter() : TeachingTipProperties , InfoBarProperties , TeachingTipProperties
  • CloseButtonCommandParameterProperty() : InfoBarProperties , TeachingTipProperties
  • CloseButtonCommandProperty() : TeachingTipProperties , InfoBarProperties
  • CloseButtonContent() : TeachingTipProperties
  • closeButtonContentComboBox : TeachingTipTestPageElements
  • CloseButtonContentOptions : TeachingTipTestPageElements
  • CloseButtonContentProperty() : TeachingTipProperties
  • CloseButtonDoesNotShowWhenVisibilityIsToggled() : TabViewTests
  • CloseButtonOverlayMode() : TabViewProperties
  • CloseButtonOverlayModeCombobox_SelectionChanged() : TabViewPage
  • CloseButtonOverlayModeProperty() : TabViewProperties
  • CloseButtonOverlayModeTests() : TabViewTests
  • CloseButtonStyle() : InfoBarProperties , TeachingTipProperties
  • CloseButtonStyleProperty() : InfoBarProperties , TeachingTipProperties
  • Closed() : InfoBarProperties , TeachingTipProperties
  • CloseFlyout() : DropDownButton , BreadcrumbBarItem , CommandBarFlyoutTests , SplitButton
  • CloseFlyoutIfRequired() : NavigationView
  • CloseIfNotRemainOpenExecuteItem() : SwipeControl
  • CloseInternal() : WebView2
  • CloseMenuFlyout() : MenuBarItem
  • CloseOnOpenedAndClosedSwipeItemsWorks() : SwipeControlTests
  • CloseOpenAndCloseWithJustKeyboardViaF6() : TeachingTipTests
  • ClosePane() : NavigationView
  • ClosePaneIfNeccessaryAfterItemIsClicked() : NavigationView
  • ClosePopup() : TeachingTip
  • ClosePopupOnUnloadEvent() : TeachingTip
  • ClosePopupWithAnimationIfAvailable() : TeachingTip
  • ClosePrimaryWindow() : TabViewTests
  • CloseReasonIsAccurate() : TeachingTipTests
  • CloseRequested() : TabViewItemProperties
  • CloseSelectionTest() : TabViewTests
  • CloseStyleChanged() : InfoBarPage
  • CloseTeachingTipButton_Click() : TeachingTipInXamlPage , TeachingTipFocusPage
  • CloseTeachingTipByLightDismiss() : TeachingTipTests
  • CloseTeachingTipProgrammatically() : TeachingTipTests
  • CloseTest() : InfoBarTests
  • CloseThenDPIChangeTest() : WebView2Tests
  • CloseToolTipTest() : CommonTests
  • CloseTopNavigationViewFlyout() : NavigationView
  • CloseWithoutAnimation() : SwipeControl
  • Closing() : InfoBarProperties , TeachingTipProperties
  • ClosingEventCountResetButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • CmbAnchorElement_SelectionChanged() : ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage
  • CmbAnnotatedScrollBarOutputDebugStringLevel_SelectionChanged() : AnnotatedScrollBarPage
  • CmbBackground_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewerPage , ItemsViewSummaryPage , ScrollViewDynamicPage , SelectorBarSummaryPage
  • CmbBorderBrush_SelectionChanged() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • CmbClosedDisplayMode_SelectionChanged() : AppBarPage , CommandBarSummaryPage
  • CmbCommandBarFlyoutOutputDebugStringLevel_SelectionChanged() : CommandBarFlyoutMainPage
  • CmbContent_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • CmbContentHorizontalAlignment_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewerPage , ScrollViewDynamicPage
  • CmbContentManipulationMode_SelectionChanged() : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • CmbContentOrientation_SelectionChanged() : ScrollPresenterDynamicPage
  • CmbContentVerticalAlignment_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • CmbDefaultLabelPosition_SelectionChanged() : CommandBarSummaryPage
  • CmbDetailLabelTemplate_SelectionChanged() : AnnotatedScrollBarSummaryPage
  • CmbFontSize_SelectionChanged() : CommandBarSummaryPage
  • CmbGridViewSelectionMode_SelectionChanged() : CommonStylesPage
  • CmbHasSecondaryCommand_SelectionChanged() : CommandBarSummaryPage
  • CmbHasSplitButton_SelectionChanged() : CommandBarSummaryPage
  • CmbHasToggleSplitButton_SelectionChanged() : CommandBarSummaryPage
  • cmbHorizontalContentAlignment_SelectionChanged() : DynamicPage
  • cmbHorizontalOverriddenOffsetsChangeAnimation_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • CmbHorizontalScrollBarVisibility_SelectionChanged() : ScrollViewerPage , ScrollViewDynamicPage
  • CmbHorizontalScrollChainMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • CmbHorizontalScrollController_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • cmbHorizontalScrollMode_SelectionChanged() : DynamicPage
  • CmbHorizontalScrollMode_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage
  • CmbHorizontalScrollRailMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • CmbIgnoredInputKinds_SelectionChanged() : ScrollViewsWithSimpleContentsPage , ScrollPresenterDynamicPage
  • CmbIScrollControllerConsumer_SelectionChanged() : ScrollPresenterWithSimpleScrollControllersPage
  • CmbIsDynamicOverflowEnabled_SelectionChanged() : CommandBarSummaryPage
  • CmbIsOpen_SelectionChanged() : AppBarPage , CommandBarSummaryPage
  • CmbItemContainerOutputDebugStringLevel_SelectionChanged() : ItemContainerPage
  • CmbItemHeightMode_SelectionChanged() : ScrollPresenterRepeaterAnchoringPage
  • CmbItemsControlHeaderTemplate_SelectionChanged() : GroupedItemsControlPage
  • CmbItemsControlItemsPanelType_SelectionChanged() : FlatItemsControlPage , GroupedItemsControlPage
  • CmbItemsControlItemTemplate_SelectionChanged() : FlatItemsControlPage , GroupedItemsControlPage
  • CmbItemsPresenterFooter_SelectionChanged() : FlatItemsControlPage , GroupedItemsControlPage
  • CmbItemsPresenterHeader_SelectionChanged() : GroupedItemsControlPage , FlatItemsControlPage
  • CmbItemsRepeaterHorizontalAlignment_SelectionChanged() : VariableSizedItemsPage
  • CmbItemsRepeaterTabFocusNavigation_SelectionChanged() : KeyboardNavigationSample
  • CmbItemsRepeaterVerticalAlignment_SelectionChanged() : VariableSizedItemsPage
  • CmbItemsSource_SelectionChanged() : AnnotatedScrollBarSummaryPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ObjectModelTestPage
  • CmbItemsViewOutputDebugStringLevel_SelectionChanged() : ItemsViewPage
  • CmbItemTemplate_SelectionChanged() : AnnotatedScrollBarSummaryPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ObjectModelTestPage
  • CmbLabelLength_SelectionChanged() : CommandBarSummaryPage
  • CmbLabelPosition_SelectionChanged() : AppBarPage
  • CmbLabelTemplate_SelectionChanged() : AnnotatedScrollBarSummaryPage
  • CmbLayout_SelectionChanged() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ObjectModelTestPage
  • CmbLayoutPanelBackground_SelectionChanged() : LinedFlowLayoutDemo
  • CmbLayoutPanelBorderBrush_SelectionChanged() : LinedFlowLayoutDemo
  • CmbLinedFlowLayoutItemsJustification_SelectionChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • CmbLinedFlowLayoutItemsStretch_SelectionChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • CmbListViewBaseFooter_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbListViewBaseHeader_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbListViewBaseItemsPanelType_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbListViewItemsPanelType_SelectionChanged() : ListViewAnchoringPage
  • CmbListViewSelectionMode_SelectionChanged() : CommonStylesPage
  • CmbManipulationMode_SelectionChanged() : ScrollPresenterManipulationModePage
  • cmbMISnapPointAlignment : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • cmbMRSnapPointAlignment : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • CmbNavigationViewOutputDebugStringLevel_SelectionChanged() : NavigationViewCaseBundle
  • CmbNestingCombination_SelectionChanged() : ScrollPresenterBringIntoViewPage
  • CmbOuterItemsControlTabNavigation_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterItemsPresenterFooter_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterItemsPresenterHeader_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterListViewFooter_SelectionChanged() : NestedListViewsPage
  • CmbOuterListViewHeader_SelectionChanged() : NestedListViewsPage
  • CmbOuterListViewSelectionMode_SelectionChanged() : NestedGridViewsPage , NestedListViewsPage
  • CmbOuterListViewTabNavigation_SelectionChanged() : NestedGridViewsPage , NestedListViewsPage
  • CmbOutputDebugStringLevels_SelectionChanged() : RepeaterTestUIPage
  • cmbParallaxView_SelectionChanged() : DynamicPage
  • cmbSCHorizontalAlignment_SelectionChanged() : DynamicPage
  • CmbScrollPresenterManipulationMode_SelectionChanged() : ScrollPresenterDynamicPage
  • CmbScrollPresenterOutputDebugStringLevel_SelectionChanged() : ScrollPresenterPage
  • CmbScrollViewBackground_SelectionChanged() : LinedFlowLayoutDemo
  • CmbScrollViewBorderBrush_SelectionChanged() : LinedFlowLayoutDemo
  • CmbScrollViewerHorizontalScrollBarVisibility_SelectionChanged() : UniformGridLayoutDemo
  • CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbScrollViewerHorizontalSnapPointsType_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbScrollViewerManipulationMode_SelectionChanged() : ScrollViewerPage
  • CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbScrollViewerVerticalSnapPointsType_SelectionChanged() : ListViewBasePage , GroupedListViewBasePage
  • CmbScrollViewOutputDebugStringLevel_SelectionChanged() : ScrollViewPage
  • CmbScrollViewTabNavigation_SelectionChanged() : KeyboardNavigationSample
  • cmbSCVerticalAlignment_SelectionChanged() : DynamicPage
  • CmbSelectionMode_SelectionChanged() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • CmbSelectorBarOutputDebugStringLevel_SelectionChanged() : SelectorBarPage
  • CmbShowScrollPresenter_SelectionChanged() : ScrollPresentersWithSimpleContentsPage
  • CmbShowScrollView_SelectionChanged() : ScrollViewsWithSimpleContentsPage
  • CmbSnapPointKind_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • cmbSource_SelectionChanged() : DynamicPage
  • cmbSourceContent_SelectionChanged() : DynamicPage
  • CmbSwipeControlOutputDebugStringLevel_SelectionChanged() : SwipePage
  • CmbTabNavigation_SelectionChanged() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • cmbTargetElement_SelectionChanged() : DynamicPage
  • cmbTEHorizontalAlignment_SelectionChanged() : DynamicPage
  • cmbTEVerticalAlignment_SelectionChanged() : DynamicPage
  • CmbUniformGridLayoutItemsJustification_SelectionChanged() : ItemsViewSummaryPage , UniformGridLayoutDemo
  • CmbUniformGridLayoutItemsStretch_SelectionChanged() : ItemsViewSummaryPage , UniformGridLayoutDemo
  • CmbUniformGridLayoutOrientation_SelectionChanged() : UniformGridLayoutDemo
  • CmbUseOuterItemsControl_SelectionChanged() : NestedItemsControlsPage
  • CmbUseOuterListView_SelectionChanged() : NestedListViewsPage
  • cmbVerticalContentAlignment_SelectionChanged() : DynamicPage
  • cmbVerticalOverriddenOffsetsChangeAnimation_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • CmbVerticalScrollBarVisibility_SelectionChanged() : ScrollViewerPage , ScrollViewDynamicPage
  • CmbVerticalScrollChainMode_SelectionChanged() : ScrollPresenterDynamicPage , ScrollPresenterChainingAndRailingPage
  • CmbVerticalScrollController_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • cmbVerticalScrollMode_SelectionChanged() : DynamicPage
  • CmbVerticalScrollMode_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewerPage
  • CmbVerticalScrollRailMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • CmbXYFocusKeyboardNavigation_SelectionChanged() : ItemsViewSummaryPage , ScrollViewDynamicPage , SelectorBarSummaryPage , ScrollViewerPage
  • CmbZoomChainMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • cmbZoomMode_SelectionChanged() : DynamicPage
  • CmbZoomMode_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage
  • CMethodProfileGroup() : CMethodProfileGroup< size >
  • CoerceMaximum() : NumberBox , ProgressRing
  • CoerceMinimum() : ProgressRing , NumberBox
  • CoerceToGreaterThanZero() : NavigationView
  • CoerceToZeroOneRange() : AcrylicBrush
  • CoerceToZeroOneRange_Nullable() : AcrylicBrush
  • CoerceValue() : NumberBox , ProgressRing
  • CoerceValueBetweenMinAndMax() : RatingControl
  • Collapse() : DropDownButtonAutomationPeer , DropDownButton , ExpanderAutomationPeer , Expander , NavigationView , NavigationViewItemAutomationPeer , SplitButtonAutomationPeer , TreeView , TreeViewItemAutomationPeer , TreeViewItemDataAutomationPeer , ToggleSplitButtonAutomationPeer , MenuBarItemAutomationPeer
  • CollapseActionButtonAsynchronouslyClick() : InfoBarPage
  • CollapseActionButtonProperty() : InfoBarPage
  • CollapseAndWait() : DropDownButton , Expander
  • CollapseCollidingAndOutOfBoundsLabels() : AnnotatedScrollBar
  • Collapsed() : ExpanderProperties , NavigationViewProperties , TreeViewProperties , NavigationViewProperties
  • CollapsedGlyph() : TreeViewItemProperties
  • CollapsedGlyphProperty() : TreeViewItemProperties
  • CollapsedGlyphVisibility() : TreeViewItemTemplateSettingsProperties
  • CollapsedGlyphVisibilityProperty() : TreeViewItemTemplateSettingsProperties
  • CollapsedItem() : NavigationViewItemCollapsedEventArgs
  • CollapsedItemContainer() : NavigationViewItemCollapsedEventArgs
  • CollapsedRatingControlButton_Click() : RatingControlPage
  • CollapseNode() : ViewModel
  • CollapseSelectedItem() : HierarchicalNavigationViewMarkup
  • collection : UniformGridLayoutDemo
  • CollectionChange : InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs , VectorChangedEventArgs , WinRTCollection::VectorChangedEventArgs
  • CollectionChanged : CustomItemsSourceView , MyCollection , ItemsSourceViewProperties , ItemsSourceView , ReadOnlyNotifyPropertyChangedCollection-g< T >
  • CollectionChangeDemo() : CollectionChangeDemo
  • CollectionChangeRecorder() : InspectingDataSourceTests::CollectionChangeRecorder
  • CollidingLabelsAreRemoved() : AnnotatedScrollBarInteractionTests
  • Color : Square , ColorPickerTests::ColorPickerTestSetupHelper , IColorSourceEffect , ITintEffect , ColorPickerProperties , ColorSpectrumProperties , RevealBrushProperties , XamlAmbientLightProperties , RevealBrushProperties , ColorPickerProperties , IColorSourceEffect
  • ColorAsVector4() : AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , ProgressRingDeterminate , ProgressRingIndeterminate , AnimatedFindVisualSource
  • ColorBlueButton_Click() : ColorPickerPage
  • colorBrush : ColorItem
  • ColorBrush : ColorItem
  • ColorBrush_AlmostDarkOrange_FFF18F13() : BrightnessSun::BrightnessSun_AnimatedVisual
  • ColorBrush_AlmostDarkTurquoise_FF00D1C1() : LottieLogo::LottieLogo_AnimatedVisual
  • ColorBrush_AlmostDodgerBlue_FF0078D7() : ProgressRingDeterminate::AnimatedVisual
  • ColorBrush_AlmostGoldenrod_FFE4950C() : BrightnessSun::BrightnessSun_AnimatedVisual
  • ColorBrush_AlmostTeal_FF007A87() : LottieLogo::LottieLogo_AnimatedVisual
  • ColorBrush_LightGray() : ProgressRingDeterminate::AnimatedVisual
  • ColorBrush_SemiTransparentWhite() : BrightnessSun::BrightnessSun_AnimatedVisual
  • ColorBrush_White() : LottieLogo::LottieLogo_AnimatedVisual
  • ColorChanged() : ColorPickerProperties , ColorSpectrumProperties , ColorPickerProperties
  • colorChangedEvent : ColorPickerTests::ColorPickerTestSetupHelper
  • ColorChangedEventWaiter() : ColorChangedEventWaiter
  • ColorChannel() : ColorPickerSliderProperties
  • ColorChannelProperty() : ColorPickerSliderProperties
  • ColorFlipButton_Click() : RatingControlPage
  • ColorGreenButton_Click() : ColorPickerPage
  • colorIndex : ScrollPresenterScrollSnapPointsPage
  • ColorList_SelectionChanged() : RevealScenarioColors
  • ColorMatrix() : IColorMatrixEffect
  • colorNameToolTip : ColorPickerPage
  • ColorNameToolTipContentChanged() : ColorPickerPage
  • ColorPicker() : ColorPicker
  • ColorPicker_ColorChanged() : AcrylicBrushPage , AcrylicBrushBasicPage , RevealScenarioColors , ColorPickerPage
  • ColorPicker_Loaded() : ColorPickerPage
  • ColorPickerDerivationTest() : ColorPickerTests
  • ColorPickerEventsTest() : ColorPickerTests
  • ColorPickerPage() : ColorPickerPage
  • ColorPickerProperties() : ColorPickerProperties
  • ColorPickerSlider() : ColorPickerSlider
  • ColorPickerSliderAutomationPeer() : ColorPickerSliderAutomationPeer
  • ColorPickerSliderProperties() : ColorPickerSliderProperties
  • ColorPickerTest() : ColorPickerTests
  • ColorPickerTestSetupHelper() : ColorPickerTests::ColorPickerTestSetupHelper
  • ColorProperty() : XamlAmbientLightProperties , ColorPickerProperties , RevealBrushProperties , ColorSpectrumProperties
  • ColorPropertyChanged : ColorPicker
  • ColorRedButton_Click() : ColorPickerPage
  • ColorRepresentationComboBoxAutomationId : ColorPickerTests
  • ColorSpectrum() : ColorSpectrum
  • ColorSpectrumAutomationId : ColorPickerTests
  • ColorSpectrumAutomationPeer() : ColorSpectrumAutomationPeer
  • ColorSpectrumColorChanged : ColorPicker
  • ColorSpectrumComponents() : ColorPickerProperties
  • ColorSpectrumComponentsComboBox_SelectionChanged() : ColorPickerPage
  • ColorSpectrumComponentsProperty() : ColorPickerProperties
  • ColorSpectrumEventsTest() : ColorPickerTests
  • ColorSpectrumImage_SizeChanged() : ColorPickerPage
  • colorSpectrumInputTarget : ColorPickerPage
  • ColorSpectrumProperties() : ColorSpectrumProperties
  • ColorSpectrumShape() : ColorPickerProperties
  • ColorSpectrumShapeComboBox_SelectionChanged() : ColorPickerPage
  • ColorSpectrumShapeProperty() : ColorPickerProperties
  • ColorSpectrumTest() : ColorPickerTests
  • ColorUpdateReason : ColorPicker
  • ColorWhiteButton_Click() : ColorPickerPage
  • ColumnMajorUniformToLargestGridLayout() : ColumnMajorUniformToLargestGridLayout
  • ColumnMajorUniformToLargestGridLayoutProperties() : ColumnMajorUniformToLargestGridLayoutProperties
  • ColumnSpacing() : ColumnMajorUniformToLargestGridLayoutProperties
  • ColumnSpacingProperty() : ColumnMajorUniformToLargestGridLayoutProperties
  • ColumnsTest() : RadioButtonsTests
  • CombinationCount() : SnapPointWrapper< T >
  • Combine() : RepeatedZoomSnapPoint , SnapPointWrapper< T > , ScrollSnapPoint , SnapPointBase , RepeatedScrollSnapPoint , ZoomSnapPoint
  • CombineNoiseWithTintEffect_Luminosity() : AcrylicBrush
  • ComboBox_SelectionChanged() : RevealScenarioGrid , RevealScenarios
  • ComboBox_SelectionChanged_1() : RevealScenarioGrid
  • ComboBoxDensityTest() : CommonStylesTests
  • ComboBoxDensityTest_Click() : CommonStylesPage
  • ComboBoxDisplayChangingPageTest() : PagerControlTests
  • ComboBoxHelper() : ComboBoxHelper
  • ComboBoxHelperProperties() : ComboBoxHelperProperties
  • ComboBoxIsEnabledCheckBox : PagerControlTestPageElements
  • ComboBoxName : NavigationViewTestsBase
  • ComboBoxPage() : ComboBoxPage
  • ComboBoxSelectionChanged() : PagerControl
  • ComboBoxVisibilityCheckBox : PagerControlTestPageElements
  • Command() : SplitButtonProperties , SwipeItemProperties , SplitButtonProperties
  • CommandBarCenterPage() : CommandBarCenterPage
  • CommandBarFlyout() : CommandBarFlyout
  • CommandBarFlyoutCommandBar() : CommandBarFlyoutCommandBar
  • CommandBarFlyoutCommandBarAutomationPropertiesProperties() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • CommandBarFlyoutCommandBarProperties() : CommandBarFlyoutCommandBarProperties
  • CommandBarFlyoutCommandBarTemplateSettingsProperties() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CommandBarFlyoutCommandBecomingVisibleHasCorrectVisuals() : CommandBarFlyoutTests
  • CommandBarFlyoutMainPage() : CommandBarFlyoutMainPage
  • CommandBarFlyoutPage() : CommandBarFlyoutPage
  • CommandBarFlyoutTestSetupHelper() : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • CommandBarPage() : CommandBarPage
  • CommandBarSizingOptions : CommandBarFlyoutTests
  • CommandBarSummaryPage() : CommandBarSummaryPage
  • CommandExecute() : SplitButtonPage
  • CommandParameter() : SwipeItemProperties , SplitButtonProperties
  • CommandParameterProperty() : SwipeItemProperties , SplitButtonProperties
  • CommandProperty() : SplitButtonProperties , SwipeItemProperties
  • CommandTest() : SplitButtonTests
  • CommonStylesPage() : CommonStylesPage
  • compact : NavigationViewTestsBase
  • CompactModeAutoPaneClosingTest() : PaneBehaviorTests
  • CompactModeCombobox_SelectionChanged() : NavigationViewCustomThemeResourcesPage , NavigationViewTopNavPage , NavigationViewPage , NavigationViewRS4Page
  • CompactModeThresholdWidth() : NavigationViewProperties
  • CompactModeThresholdWidthProperty() : NavigationViewProperties
  • CompactPage() : CompactPage
  • CompactPaneLength() : NavigationViewItemProperties , NavigationViewProperties
  • CompactPaneLength_SelectionChanged() : NavigationViewTopNavPage , PaneFooterTestPage , NavigationViewCustomThemeResourcesPage , NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewRS4Page
  • CompactPaneLengthProperty() : NavigationViewProperties , NavigationViewItemProperties
  • CompactTabViewItems : MultipleTabViewPage
  • CompareTo() : IndexPath
  • Complete() : ItemCollectionTransitionProgress , AnimatedVisualPlayer::final
  • CompleteAwaits() : Awaitable
  • CompleteCurrentTest() : WebView2BasicPage
  • CompleteDelayedOperations() : ScrollPresenter
  • CompleteInteractionTrackerOperations() : ScrollPresenter
  • CompletePendingSelectionChange() : NavigationView
  • CompleteStartBringItemIntoView() : ItemsView
  • CompleteTestAndWaitForResult() : WebView2Tests
  • CompleteTestAndWaitForWebMessageResult() : WebView2Tests
  • CompleteViewChange() : ScrollPresenter
  • Components() : ColorSpectrumProperties
  • ComponentsProperty() : ColorSpectrumProperties
  • CompositionBrush() : AcrylicTestApi , RevealBrushTestApi
  • CompositionProperties : RefreshInfoProviderImplementation
  • compositionProperties : RefreshInfoProviderImpl
  • CompositionProperties : RefreshInfoProviderImpl
  • compositionProperties : RefreshInfoProviderImplementation
  • CompositionProperties() : RefreshInfoProviderImpl
  • CompositionScrollController() : CompositionScrollController
  • CompositionScrollController_IsEnabledChanged() : CompositionScrollController
  • CompositionScrollController_LogMessage() : ScrollPresenterWithCompositionScrollControllersPage
  • CompositionScrollController_SizeChanged() : CompositionScrollController
  • CompositionScrollControllerOffsetChangeCompletedEventArgs() : CompositionScrollControllerOffsetChangeCompletedEventArgs
  • CompositionScrollControllerPanningInfo() : CompositionScrollControllerPanningInfo
  • CompositionTarget_Rendering() : SwipeControlPage , LightConfigurationTests , RatingControlPage , DynamicPage , SimpleRectanglePage
  • compositor : AnimationHandler
  • Compute() : NumberBoxParser
  • ComputeAnchorPoint() : ScrollPresenter
  • ComputeBringIntoViewTargetOffsets() : ScrollPresenter
  • ComputeBringIntoViewTargetOffsetsFromRequestEventArgs() : ScrollPresenter
  • ComputeBringIntoViewUpdatedTargetOffsets() : ScrollPresenter
  • ComputeContentLayoutOffsetDelta() : ScrollPresenter
  • ComputedHorizontalScrollBarVisibility() : ScrollViewProperties
  • ComputedHorizontalScrollBarVisibilityProperty() : ScrollViewProperties
  • ComputedHorizontalScrollMode() : ScrollPresenterProperties , ScrollViewProperties
  • ComputedHorizontalScrollModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • ComputedVerticalScrollBarVisibility() : ScrollViewProperties
  • ComputedVerticalScrollBarVisibilityProperty() : ScrollViewProperties
  • ComputedVerticalScrollMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • ComputedVerticalScrollModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • ComputeElementAnchorPoint() : ScrollPresenter
  • ComputeEndOfInertiaZoomFactor() : ScrollPresenter
  • ComputeFrozenItemsAndLayout() : LinedFlowLayout
  • ComputeFrozenItemsRange() : LinedFlowLayout
  • ComputeHorizontalContentAlignment() : ScrollInputHelper
  • ComputeHorizontalPositionFromOffset() : ScrollPresenterDynamicPage
  • ComputeItemsLayoutDrawback() : LinedFlowLayout
  • ComputeItemsLayoutFastPath() : LinedFlowLayout
  • ComputeItemsLayoutRegularPath() : LinedFlowLayout
  • ComputeItemsLayoutWithLockedItems() : LinedFlowLayout
  • ComputeLineExpandFactor() : LinedFlowLayout
  • ComputeLineShrinkFactor() : LinedFlowLayout
  • ComputeMinHorizontalPosition() : ScrollPresenterDynamicPage
  • ComputeMinMaxPositions() : ScrollPresenter
  • ComputeMinVerticalPosition() : ScrollPresenterDynamicPage
  • ComputePositionFromOffsets() : ScrollPresenter
  • ComputePostfixExpression() : NumberBoxParser
  • ComputeValueAfterSnapPoints() : ScrollPresenter
  • ComputeVerticalContentAlignment() : ScrollInputHelper
  • ComputeVerticalPositionFromOffset() : ScrollPresenterDynamicPage
  • ComputeViewportAnchorPoint() : ScrollPresenter
  • ComputeViewportToElementAnchorPointsDistance() : ScrollPresenter
  • ComputeZoomedOffsetWithMinimalChange() : ScrollPresenter
  • ComputeZoomMode() : ScrollInputHelper
  • ConcurrentCreationRequestsTest() : WebView2Tests
  • coneAngleTolerance : RevealStatesPage
  • coneIntensityTolerance : RevealStatesPage
  • ConfigurationChanged() : ScrollPresenter , ItemsRepeaterScrollHost , ScrollPresenter , ViewportTests::TestScrollingSurface , IRepeaterScrollingSurface , ItemsRepeaterScrollHost
  • ConfigurationChangedAddFunc : ViewportTests::TestScrollingSurface
  • ConfigurationChangedRemoveFunc : ViewportTests::TestScrollingSurface
  • ConfigurationContent() : InkToolBarCustomPenButton , InkToolBarCustomToolButton , InkToolBarCustomToolButtonProperties , InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties , InkToolBarCustomToolButton
  • ConfigurationContentProperty() : InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties
  • ConfigurePositionInertiaRestingValues() : SwipeControl
  • ConfigureTargetElement() : SliderInteraction
  • ConsecutiveOffsetJumps() : ScrollPresenterTests
  • ConsecutiveScrollAndZoomJumps() : ScrollPresenterTests
  • ConsecutiveZoomAndScrollJumps() : ScrollPresenterTests
  • ConsecutiveZoomFactorJumps() : ScrollPresenterTests
  • ConstantAttenuation : RevealBorderSpotlightStateDesc
  • ConstructVisual() : AnimatedIcon
  • Contact() : PersonPictureProperties
  • ContactBtn_Click() : PersonPicturePage
  • ContactImageBtn_Click() : PersonPicturePage
  • ContactProperty() : PersonPictureProperties
  • Container2AnimationEndPosition() : ProgressBarTemplateSettingsProperties
  • Container2AnimationEndPositionProperty() : ProgressBarTemplateSettingsProperties
  • Container2AnimationStartPosition() : ProgressBarTemplateSettingsProperties
  • Container2AnimationStartPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationEndPosition() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationEndPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationMidPosition() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationMidPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationStartPosition() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationStartPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerFromIndex() : RadioButtons , TabView
  • ContainerFromItem() : TreeView , TabView
  • ContainerFromMenuItem() : NavigationView
  • ContainerFromNode() : TreeView , TreeViewList
  • containerHasHandler : RefreshContainerPage , RefreshContainerOnImagePage
  • ContainerRefreshCompletionDeferral : RefreshContainerPage
  • ContainerShape() : AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedVisual
  • ContainerShape_0() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ContainerShape_00() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_01() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_02() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_03() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_04() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_05() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_06() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_07() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_08() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_09() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_1() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ContainerShape_10() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_11() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_12() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_13() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_14() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_15() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_16() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_17() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_18() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_19() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_2() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ContainerShape_20() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_21() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_22() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerSizeChangedHandler() : SwipeControlPage
  • containerTimer : RefreshContainerPage
  • containerTimer_Tick() : RefreshContainerPage
  • containerTimer_TickImpl() : RefreshContainerPage
  • ContainerVisual_0() : AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • ContainerVisual_00() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_01() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_02() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_03() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_04() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_05() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_06() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_07() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_08() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_09() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_1() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • ContainerVisual_10() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_11() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_12() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_13() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_14() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_15() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_16() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_17() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_18() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_19() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_2() : AnimatedSettingsVisualSource_AnimatedVisual
  • ContainerVisual_20() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_21() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_22() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_23() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_24() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_25() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_26() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_27() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_28() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_29() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_30() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_31() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_32() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_33() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_34() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_35() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_36() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_37() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_38() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_39() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_40() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_41() : AnimatedAcceptVisualSource_AnimatedVisual
  • Contains() : InspectingDataSourceTests::WinRTObservableVector , SelectionModelTests , SelectedTreeNodeVector , SelectedItemsVector , CustomItemsSourceView , WinRTCollection , MyCollection , IndexRange
  • Content() : ScrollViewProperties , TabDataItem , TitleBarProperties , RefreshVisualizerProperties , TitleBarProperties , TreeViewNodeProperties , InfoBarProperties , ScrollPresenterProperties , RefreshVisualizerProperties , Category , TreeViewItemSource , Category , AnnotatedScrollBarDetailLabelRequestedEventArgs , ScrollPresenterProperties , ScrollViewProperties , AnnotatedScrollBarLabel , AnnotatedScrollBarDetailLabelRequestedEventArgs
  • Content_EffectiveViewportChanged() : ScrollPresenterDynamicPage
  • Content_PointerCanceled() : ScrollPresenterDynamicPage
  • Content_PointerCaptureLost() : ScrollPresenterDynamicPage
  • Content_PointerPressed() : ScrollPresenterDynamicPage
  • Content_PointerReleased() : ScrollPresenterDynamicPage
  • Content_PointerWheelChanged() : ScrollViewDynamicPage
  • ContentClipRect() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ContentClipRectProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ContentDialog_PrimaryButtonClick() : DialogWithNavView
  • ContentDialog_SecondaryButtonClick() : DialogWithNavView
  • ContentDialogNavViewButton_Click() : NavigationViewPage
  • ContentDialogPage() : ContentDialogPage
  • ContentElevationSliderChanged() : TeachingTipPage
  • ContentGridDoesntOverExtendHorizontal() : SwipeControlTests
  • ContentHeight() : ExpanderTemplateSettingsProperties
  • ContentHeightProperty() : ExpanderTemplateSettingsProperties
  • ContentIsUpdatable() : RefreshVisualizerTests
  • ContentLayoutOffsetXChanged() : ScrollPresenterTestHooks
  • ContentLayoutOffsetYChanged() : ScrollPresenterTestHooks
  • ContentModeTestTreeView_Expanding() : TreeViewPage
  • ContentOrientation() : ScrollViewProperties , ScrollPresenterProperties
  • ContentOrientationProperty() : ScrollViewProperties , ScrollPresenterProperties
  • contentOverlay : NavigationViewTopNavStorePage , NavigationViewTopNavOnlyPage
  • ContentOverlay() : NavigationViewProperties
  • ContentOverlayProperty() : NavigationViewProperties
  • ContentOverlayTest() : CommonTests
  • contentPointerCanceledEventHandler : ScrollPresenterDynamicPage
  • contentPointerCaptureLostEventHandler : ScrollPresenterDynamicPage
  • contentPointerPressedEventHandler : ScrollPresenterDynamicPage
  • contentPointerReleasedEventHandler : ScrollPresenterDynamicPage
  • contentPointerWheelChangedEventHandler : ScrollViewDynamicPage
  • ContentProperty() : RefreshVisualizerProperties , TreeViewNodeProperties , XamlTypeBase , ScrollPresenterProperties , ScrollViewProperties , TitleBarProperties , InfoBarProperties
  • ContentScrollViewer_ViewChanged() : TeachingTipPage
  • ContentTemplate() : InfoBarProperties
  • ContentTemplateProperty() : InfoBarProperties
  • ContextFlyout_Closed() : ExtraCommandBarFlyoutPage
  • ContextFlyout_Opening() : ExtraCommandBarFlyoutPage
  • Contrast() : IContrastEffect
  • ControlCornerRadius : CornerRadiusPage
  • ControlCornerRadiusProperty : CornerRadiusPage
  • ControlCornerRadiusSize : CornerRadiusPage
  • ControlHeight : NavigationViewTestsBase , TwoPaneViewTests
  • ControlKeyKeyboardTest() : RadioButtonsTests
  • ControllerEntry()
: DesktopAcrylicBackdrop::ControllerEntry
, MicaBackdrop::ControllerEntry
  • ControlSizing() : PersonPictureTests
  • ControlTypeProperty() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • ControlWidth : NavigationViewTestsBase , TwoPaneViewTests
  • ConversionKind() : CornerRadiusToThicknessConverterProperties
  • ConversionKindProperty() : CornerRadiusToThicknessConverterProperties
  • Convert() : BoolToVisibilityConverter , CornerRadiusToThicknessConverter , PrefixConverter , NullableBooleanToBooleanConverter , UriToStringConverter , EnumToStringConverter , ColorToSolidColorBrushConverter , DoubleToStringConverter , IconSourceToIconSourceElementConverter , CornerRadiusToThicknessConverter , CornerRadiusFilterConverter , BoolToBrushConverter , CornerRadiusFilterConverter
  • ConvertBack() : EnumToStringConverter , CornerRadiusToThicknessConverter , BoolToBrushConverter , UriToStringConverter , NullableBooleanToBooleanConverter , PrefixConverter , BoolToVisibilityConverter , DoubleToStringConverter , CornerRadiusFilterConverter , ColorToSolidColorBrushConverter , IconSourceToIconSourceElementConverter
  • ConvertComboBoxItemToNumberOfPages() : PipsPagerPage
  • ConvertComboBoxItemToVisibilityEnum() : PipsPagerPage
  • ConvertDipsToPhysical() : SharedHelpers
  • ConvertFromStringToVector2() : ScrollPresenterDynamicPage , VariableSizedItemsPage
  • ConvertInfixToPostfix() : NumberBoxParser
  • ConvertOriginalIndexToIndex() : TopNavigationViewDataProvider
  • ConvertPrimaryIndexToIndex() : TopNavigationViewDataProvider
  • ConvertTo< T >() : BreadcrumbTests
  • ConvertToNullableBool() : final
  • ConvertXamlArgsToOle32Args() : WebView2
  • CopyGamesLabelButton_Click() : NavigationViewRS4Page , NavigationViewPage , NavigationViewTopNavPage
  • CopyIsSelected_Click() : NavigationViewSelectedItemEdgeCasePage
  • CopyItemsInfo() : LinedFlowLayout
  • CopyPasteTest() : WebView2Tests
  • CopySelected() : WebView2Tests
  • CopyTestPagesLocally() : WebView2Common
  • CopyTo() : CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , MyCollection
  • CopyVector() : SharedHelpers
  • CopyVolumeToolTipButton_Click() : NavigationViewTopNavPage , NavigationViewRS4Page , NavigationViewPage
  • CoreProcessFailed() : WebView2Properties
  • CoreWebView2() : WebView2
  • CoreWebView2HasInvalidState() : WebView2
  • CoreWebView2Initialized() : WebView2Properties
  • CoreWebView2Initialized_FailedTest() : WebView2Tests
  • CoreWebView2InitializedEventArgs() : CoreWebView2InitializedEventArgs
  • CoreWebView2InitializedTest() : WebView2Tests
  • CoreWebView2RunIgnoreInvalidStateSync() : WebView2
  • CoreWindow_PointerExited() : CoreWindowEventsPage
  • CoreWindowEventsPage() : CoreWindowEventsPage
  • CoreWindowEventsTests() : RevealBrushTests
  • CornerRadius() : LayoutPanelProperties
  • CornerRadiusFilterConverterProperties() : CornerRadiusFilterConverterProperties
  • CornerRadiusFilterConverterTest() : CommonStylesApiTests
  • CornerRadiusPage() : CornerRadiusPage
  • CornerRadiusProperty() : LayoutPanelProperties
  • CornerRadiusTest() : CommonStylesTests
  • CornerRadiusToThicknessConverterProperties() : CornerRadiusToThicknessConverterProperties
  • CoroutineCompletedCallback() : Awaitable
  • CorrelationId() : ScrollingZoomCompletedEventArgs , ScrollingZoomStartingEventArgs , ScrollingZoomAnimationStartingEventArgs , ScrollingScrollCompletedEventArgs , CompositionScrollController::OperationInfo , ScrollControllerScrollByRequestedEventArgs , ScrollControllerAddScrollVelocityRequestedEventArgs , BiDirectionalScrollController::OperationInfo , ScrollPresenterTests::ScrollPresenterOperation , ScrollingScrollAnimationStartingEventArgs , ScrollingBringingIntoViewEventArgs , ScrollControllerAddScrollVelocityRequestedEventArgs , ScrollControllerScrollToRequestedEventArgs , ScrollControllerScrollByRequestedEventArgs , ScrollControllerScrollToRequestedEventArgs , ScrollingScrollStartingEventArgs
  • Count : CustomItemsSourceView , InspectingDataSourceTests::WinRTObservableVector , WinRTCollection , MyCollection , ItemsSourceView , ReadOnlyNotifyPropertyChangedCollection-g< T >
  • CountDescendants() : ViewModel
  • CountInLine : Flex::LineInfo
  • Create()
: Expander::ExpanderFactory
, BreadcrumbBarItem::BreadcrumbBarItemFactory
, DropDownButton::DropDownButtonFactory
, StoreMockData
, ColorSpectrum::ColorSpectrumFactory
, ColorPickerSlider::ColorPickerSliderFactory
  • CreateAcrylicBrush() : AcrylicBrush
  • CreateAcrylicBrushCompositionEffectFactory() : AcrylicBrush
  • CreateAcrylicBrushWorker() : AcrylicBrush
  • CreateAlphaSliderCheckeredBackground() : ColorPicker
  • CreateAndAttachHeaderAnimation() : NavigationView
  • CreateAndHookEventsToSettings() : NavigationView
  • CreateAndInitializeRepeater() : RepeaterFocusTests , FlowLayoutTests , LayoutTests , ItemTemplateTests
  • CreateAndInitializeVirtualizationInfo() : ItemsRepeater
  • CreateAndSetVisual() : WebView2
  • CreateAnimation() : AcrylicBrush
  • CreateAnimations() : IAnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisualPlayer
  • CreateBackdropAcrylicEffectBrush() : IAcrylicBrushStaticsPrivate
  • CreateBackdropAcrylicEffectBrushWithLuminosity() : IAcrylicBrushStaticsPrivate
  • CreateBitmapsAndColorMap() : ColorSpectrum
  • CreateBooleanKeyFrameAnimation() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual
  • CreateBottomContent() : SwipeControl
  • CreateButtonListItems() : PipsPagerExamples
  • CreateCategory() : StoreMockData
  • CreateChild() : LinedFlowLayoutDemo
  • CreateChildren() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • CreateChildrenForNode() : BreadcrumbBarPage
  • CreateChildrenInTabFocusOrderIterable() : ItemsRepeater
  • CreateColor() : EffectBase
  • CreateColorPreviewCheckeredBackground() : ColorPicker
  • CreateConditionalExpression() : SnapPointBase , ScrollSnapPoint , SnapPointWrapper< T > , RepeatedZoomSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint
  • CreateContainer() : RecipeElementFactory
  • CreateContent() : SwipeControl
  • CreateContentDialog() : ContentDialogPage
  • CreateContractAnimation() : TeachingTip
  • CreateCoreObjects() : WebView2
  • CreateCoreWebViewFromEnvironment() : WebView2
  • CreateDataSource() : MockItemsSource
  • CreateDataSource< T >() : MockItemsSource
  • CreateDataTemplateWithContent() : RepeaterTests
  • CreatedByNavigationViewItemsFactory() : NavigationViewItemBase
  • CreateDefaultCoreEnvironment() : WebView2
  • CreateDefaultItemTransitionProvider() : LinedFlowLayout , Layout
  • CreateElementFactory< T >() : MockElementFactory
  • CreateExpandAnimation() : TeachingTip
  • CreateFrom() : IndexPath
  • CreateFromIndices() : IndexPath
  • CreateFromString() : XamlTypeBase
  • CreateIconElementCore() : ImageIconSource , AnimatedIconSource
  • CreateInkDrawingAttributes() : InkToolBarCustomPen
  • CreateInkDrawingAttributesCore() : InkToolBarCustomPen
  • CreateInkPresenter() : InkCanvas
  • CreateInstance() : ItemsSourceViewFactory
  • CreateItems() : TreeViewTests
  • CreateItemsImpl() : TreeViewTests
  • CreateLabelContainers() : AnnotatedScrollBar
  • CreateLarge() : PictureLibrary
  • CreateLayout() : ViewManagerTests , AccessibilityTests
  • CreateLeftContent() : SwipeControl
  • CreateLightDismissIndicatorPopup() : TeachingTip
  • CreateMenuItem() : HierarchicalNavigationViewMarkup
  • CreateMissingAnaheimWarning() : WebView2
  • CreateNavigationTransitionInfo() : NavigationView
  • CreateNested() : Data
  • CreateNestedData() : SelectionModelTests
  • CreateNewMyData() : TabViewTabItemsSourcePage
  • CreateNewPopup() : TeachingTip
  • CreateNewView() : RevealScenarioSecondaryView
  • CreatePersonInfoList() : PipsPagerExamples
  • CreatePresenter() : MenuBarItemFlyout , CommandBarFlyout
  • CreateRecipe() : AnimationsDemoPage
  • CreateRefreshInteractionRatioChangedEventArgsInstance() : PullToRefreshHelperTestApi
  • CreateRefreshRequestedEventArgsInstance() : PullToRefreshHelperTestApi
  • CreateRefreshStateChangedEventArgsInstance() : PullToRefreshHelperTestApi
  • CreateRepeater() : ViewManagerTests , AccessibilityTests
  • CreateRestingPointExpression() : RepeatedScrollSnapPoint , SnapPointBase , SnapPointWrapper< T > , RepeatedZoomSnapPoint , ScrollSnapPoint , ZoomSnapPoint
  • CreateRevealBorderEffect() : RevealBrush
  • CreateRevealBrush() : RevealBrush
  • CreateRevealHoverEffect() : RevealBrush
  • CreateRightContent() : SwipeControl
  • CreateScalarKeyFrameAnimation() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual
  • CreateScaledBrush() : MaterialHelperBase
  • CreateSmall() : PictureLibrary
  • CreateSpectrumBrush() : SpectrumBrush
  • CreateSpriteShape() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • CreateStreamFromBytes() : SharedHelpers
  • CreateTabViewItem() : TabViewTests
  • CreateTopContent() : SwipeControl
  • CreateTree() : TreeViewPage
  • CreateTreeViewItemsSource() : TreeViewTests
  • CreateVector2KeyFrameAnimation() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • createXamlTypeCallback : Entry
  • Cross() : Flex
  • CrossPosition : Flex::LineInfo
  • CrossSize : Flex::LineInfo
  • CTR_CheckCleanup() : LightConfigurationTests
  • CubicBezierEasingFunction() : ProgressRingDeterminate::AnimatedVisual
  • CubicBezierEasingFunction_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_1() : AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_2() : AnimatedFindVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_3() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_4() : AnimatedFindVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • CubicBezierEasingFunction_5() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_6() : LottieLogo::LottieLogo_AnimatedVisual
  • CubicBezierEasingFunction_7() : LottieLogo::LottieLogo_AnimatedVisual
  • CubicBezierEasingFunction_8() : LottieLogo::LottieLogo_AnimatedVisual
  • Current()
: SelectedItems< T >::Iterator
, BreadcrumbIterator
, SelectionModelTests::TreeWalkNodeInfo
, HashMap< K, V >::Iterator
, ObservableVector< T >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
, ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
, ColorPickerTests::ColorPickerTestSetupHelper
, VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
  • CurrentAnchor() : ScrollPresenter , ItemsRepeaterScrollHost
  • currentAnchor : ScrollPresenterStackPanelAnchoringPage
  • CurrentAnchor() : ScrollView
  • currentAnchor : ScrollPresenterRepeaterAnchoringPage
  • CurrentCancelClosesCheckBox : TeachingTipPage
  • CurrentItemIndex() : ItemsViewProperties
  • CurrentItemIndexProperty() : ItemsViewProperties
  • CurrentMaxVisualIndicatorsTextBlock : PipsPagerElements
  • currentNodeChildrenList : BreadcrumbBarPage
  • CurrentNumberOfPagesTextBlock : PipsPagerElements
  • CurrentOrientationTextBlock : PipsPagerElements
  • CurrentPageIdentifierLeftMarginTextBlock : PagerControlTestPageElements
  • CurrentPageTextBlock : PipsPagerElements , PagerControlTestPageElements
  • currentSelectedItem : NavigationViewTopNavStorePage
  • CurrentWidth() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CurrentWidthProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CurrentXamlRootChanged() : SwipeControl
  • CursorClickUpdateTest() : WebView2Tests
  • CursorUpdateTest() : WebView2Tests
  • CustomAnimationStateEntered() : ScrollPresenter , InteractionTrackerOwner , SwipeControlInteractionTrackerOwner , RefreshInfoProviderImpl , RefreshInfoProviderImplementation , SwipeControl
  • CustomAutomationName : TreeNode
  • CustomBackgroundChanged() : InfoBarPage
  • customButtonsFlyoutOpenCount : ExtraCommandBarFlyoutPage
  • CustomCheckedCheckBox : RadioButtonsTestPageElements
  • CustomConfiguration_BasicTest() : WebView2Tests
  • CustomConfiguration_EnsureAgainAfterCustomTest() : WebView2Tests
  • CustomConfiguration_EnsureAgainAfterDefaultTest() : WebView2Tests
  • CustomContent() : CustomContent
  • CustomContentCheckBox_CheckedChanged() : TitleBarPageWindow
  • CustomContentRootNode : TreeViewUnrealizedChildrenTestPage
  • CustomContentTextBox : RadioButtonsTestPageElements
  • CustomDisabledCheckBox : RadioButtonsTestPageElements
  • CustomElementFactory() : PhasingTests::CustomElementFactory
  • CustomEnumerable() : InspectingDataSourceTests::CustomEnumerable
  • Customer() : Customer
  • Customers() : Customers
  • CustomFormatterButton_Click() : NumberBoxPage
  • CustomFormatterTest() : NumberBoxTests
  • CustomImages_Loaded() : RatingControlPage
  • CustomImagesTwo_Loaded() : RatingControlPage
  • CustomIndexOf() : Vector< T, flags, Helper >
  • CustomIndexTextBox : RadioButtonsTestPageElements
  • CustomItemsSource() : CustomItemsSource
  • CustomItemsSourceWithUniqueId() : CustomItemsSourceWithUniqueId
  • CustomizeRatingItem() : RatingControl
  • CustomizeStackPanel() : RatingControl
  • CustomListViewStyle : ListViewBackgroundPage
  • CustomNavigationViewItem() : CustomNavigationViewItem
  • CustomPen() : InkToolBarCustomPenButton , InkToolBarCustomPenButtonProperties , InkToolBarCustomPenButton
  • CustomPenProperty() : InkToolBarCustomPenButtonProperties
  • CustomProperty() : CustomProperty
  • CustomTooltipButton_Click() : TabViewPage
  • CutCommand_ExecuteRequested() : MenuBarPage
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- d -

  • darkBorderColor : RevealScenarioColors
  • DarkBorderColor : RevealScenarioColors
  • DarkHoverPlateColor : RevealScenarioColors
  • darkHoverPlateColor : RevealScenarioColors
  • Data : ItemTemplateDemo , ElementFactoryGetArgsDownlevel , ReadOnlyNotifyPropertyChangedCollection-g< T > , ElementFactoryGetArgsDownlevel , VirtualizationInfo , PhasingTests::ElementPhasingManager , TabViewTabDragStartingEventArgs , TreeViewDragItemsStartingEventArgs , Defaults
  • data : VirtualizingUniformStackLayoutSamplePage
  • DataContent : MyData
  • DataContext() : SelectTemplateEventArgs
  • DataCount() : final
  • DataHeader : MyData
  • DataIconSource : MyData
  • DataIdentifier : TabViewPage
  • DataItem() : DataItem
  • dataItemToTabItemDictionary : MultipleTabViewPage
  • DataModelWithINPC : NumberBoxPage
  • DataPackageOperationFromDropEffect() : WebView2
  • dataSource : ScrollPresenterBringIntoViewPage , ScrollPresenterRepeaterAnchoringPage
  • DataSourceAddItem() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceChanged() : final
  • DataSourceInsertItem() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceRaiseResetNotification() : ListViewBasePage
  • DataSourceRemoveAllItems() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceRemoveItem() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceReplaceItem() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceReplaceItemContent() : ItemsViewSummaryPage
  • DataTabView : TabViewPage
  • DataTemplateComponent() : VirtualizationInfo
  • DataTemplateList : RevealListPage
  • DatePickerDensityTest() : CommonStylesTests
  • DatePickerDensityTest_Click() : CommonStylesPage
  • DatePickerPage() : DatePickerPage
  • DebugTrace() : VirtualizingStackLayout
  • DECLARE_D2D_GUID() : DistantSpecularEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , GrayscaleEffect , HueRotationEffect , InvertEffect , LinearTransferEffect , LuminanceToAlphaEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , PremultiplyEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect , Transform2DEffect , UnPremultiplyEffect , AlphaMaskEffect , ArithmeticCompositeEffect , BlendEffect , BorderEffect , ColorMatrixEffect , ColorSourceEffect , CompositeStepEffect , ContrastEffect , CrossFadeEffect , DistantDiffuseEffect
  • DECLARE_DUAL_SOURCES() : AlphaMaskEffect , ArithmeticCompositeEffect , BlendEffect , CompositeStepEffect , CrossFadeEffect
  • DECLARE_NAMED_PROPERTY_MAPPING() : ArithmeticCompositeEffect , BlendEffect , BorderEffect , ColorMatrixEffect , ColorSourceEffect , CompositeStepEffect , ContrastEffect , CrossFadeEffect , DistantDiffuseEffect , DistantSpecularEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , HueRotationEffect , LinearTransferEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect , Transform2DEffect
  • DECLARE_POD_PROPERTY() : ColorSourceEffect , CompositeStepEffect , ContrastEffect , CrossFadeEffect , DistantDiffuseEffect , DistantSpecularEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , HueRotationEffect , LinearTransferEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect , Transform2DEffect , ArithmeticCompositeEffect , BlendEffect , BorderEffect , ColorMatrixEffect
  • DECLARE_SINGLE_SOURCE() : BorderEffect , ColorMatrixEffect , ContrastEffect , DistantDiffuseEffect , DistantSpecularEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , GrayscaleEffect , HueRotationEffect , InvertEffect , LinearTransferEffect , LuminanceToAlphaEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , PremultiplyEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect , Transform2DEffect , UnPremultiplyEffect
  • DeconstructionHandlesCorrectlyTest() : ScrollViewerAdapterTests
  • DecrementDeferralCount() : RefreshRequestedEventArgs , TeachingTipClosingEventArgs
  • DecrementRepeatButton_Click() : CompositionScrollController
  • defaultAnimatedViewChangeTimeout : ScrollPresenterTestsWithInputHelper , TeachingTipTests
  • DefaultAnimationDuration : LinedFlowLayoutItemCollectionTransitionProvider
  • DefaultAnimationDurationInMs : DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • DefaultAttachedData() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider
  • DefaultBackgroundColor() : WebView2Properties
  • DefaultBackgroundColorProperty() : WebView2Properties
  • DefaultItemCollectionTransitionProvider() : DefaultItemCollectionTransitionProvider
  • defaultPaneTitleTextBlockStyle : NavigationViewCustomThemeResourcesPage
  • Defaults() : Defaults
  • DefaultVectorIDOnInsert() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider
  • DefaultWaitTime : FlowLayoutCollectionChangeTests , FlowLayoutTests , ViewManagerTests
  • DefaultWindowSize : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • deferral : TeachingTipPage
  • DEFINE_TRACELOGGING_EVENT_PARAM1() : final
  • DEFINE_TRACELOGGING_EVENT_PARAM2() : final
  • DEFINE_TRACELOGGING_EVENT_PARAM4() : final
  • DegreesToRadians() : RevealStatesPage
  • Deinitialize() : MUXControlsFactory
  • DelayForHalfAnimationDurationThenReverse() : AnimatedVisualPlayerPage
  • delayRefresh : RefreshContainerOnImagePage , RefreshContainerPage
  • DelegatingItemsSource() : DelegatingItemsSource
  • DeleteInstanceOnUIThread() : ReferenceTracker< D, ImplT, I >
  • DeleteSelectedItem() : ItemsViewTransitionPage
  • DependencyObjectBase : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • DependencyPropertyOrdering() : PersonPictureTests
  • Depth() : TreeViewNodeProperties , NavigationViewItemBase
  • DepthProperty() : TreeViewNodeProperties
  • Description : Recipe , NumberBoxProperties
  • DescriptionProperty() : NumberBoxProperties
  • Deselect() : GroupedRepeaterItem , ItemsView , SelectionModel
  • DeselectAll() : ItemsView
  • DeselectAt() : SelectionModel
  • DeselectRange() : SelectionModel
  • DeselectRangeFromAnchor() : SelectionModel
  • DeselectRangeFromAnchorTo() : SelectionModel
  • DeselectWithAnchorPreservation() : SelectorBase
  • DesktopAcrylicBackdrop() : DesktopAcrylicBackdrop
  • Destination() : ICompositeStepEffect
  • DestroyAnimations() : AnimatedVisualPlayer , IAnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Detach() : AutoHandle< THandlePolicy >
  • DetachDismissingHandlers() : SwipeControl
  • DetachEventHandlers() : CommandBarFlyoutCommandBar , MenuBarItem , SwipeControl
  • DetachFromCompositionTarget() : InkCanvas
  • DetachFromVisualLink() : InkCanvas
  • DetailLabelDoesNotShowWhenDataFieldIsEmpty() : AnnotatedScrollBarInteractionTests
  • DetailLabelRequested() : AnnotatedScrollBarProperties
  • DetailLabelRequestedOffsetDoesNotExceedMaxPossibleValue() : AnnotatedScrollBarInteractionTests
  • DetailLabelTemplate() : AnnotatedScrollBarProperties
  • DetailLabelTemplateProperty() : AnnotatedScrollBarProperties
  • DetatchFromLayoutChanged() : RadioButtons
  • DeterminateSource() : ProgressRingProperties
  • DeterminateSourceProperty() : ProgressRingProperties
  • DetermineActualApplicableZone() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , RepeatedZoomSnapPoint , SnapPointWrapper< T > , ZoomSnapPoint
  • DetermineActualImpulseApplicableZone() : SnapPointBase , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineEffectivePlacement() : TeachingTip
  • DetermineEffectivePlacementTargeted() : TeachingTip
  • DetermineEffectivePlacementUntargeted() : TeachingTip
  • DetermineFirstRepeatedSnapPointValue() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • DetermineFractionDigits() : RatingControlAutomationPeer
  • DetermineLastRepeatedSnapPointValue() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • DetermineMaxActualApplicableZone() : RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineMaxActualImpulseApplicableZone() : RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineMinActualApplicableZone() : ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • DetermineMinActualImpulseApplicableZone() : RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineSignificantDigits() : RatingControlAutomationPeer
  • DetermineSpaceAroundTarget() : TeachingTip
  • DiagnosticMessage() : MapControlMapServiceErrorOccurredEventArgs
  • Diagnostics() : AnimatedVisualPlayerProperties
  • DiagnosticsProperty() : AnimatedVisualPlayerProperties
  • DialogWithNavView() : DialogWithNavView
  • DiffuseAmount() : ISpotDiffuseEffect , IDistantDiffuseEffect , IPointDiffuseEffect , IDistantDiffuseEffect , IPointDiffuseEffect , ISpotDiffuseEffect
  • Digits : ItemsViewTests
  • DimensionChoice : FlowLayoutTests
  • DirectionToInset() : SwipeControl
  • DisableActionButtonAsynchronouslyClick() : InfoBarPage
  • DisableActionButtonProperty() : InfoBarPage
  • DisableClickToExpand_Click() : TreeViewPage
  • DisabledFallbackRating_Loaded() : RatingControlPage
  • DisabledGlyph() : RatingItemFontInfoProperties
  • DisabledGlyphProperty() : RatingItemFontInfoProperties
  • DisabledImage() : RatingItemImageInfoProperties
  • DisabledImageFallbackRating_Loaded() : RatingControlPage
  • DisabledImageProperty() : RatingItemImageInfoProperties
  • DisabledItemsAtTopOfColumnKeyboardTest() : RadioButtonsTests
  • DisabledItemsKeyboardTest() : RadioButtonsTests
  • DisabledItemTest() : CommonTests
  • DisableHoverAnimation() : RevealHoverLight
  • DisableItemDrag_Click() : TreeViewPage
  • DisableItemReorder_Click() : TreeViewPage
  • DiscardActionButton() : InfoBarPage
  • DiscardElementsOutsideWindow() : final
  • DisconnectFromRootVisualTarget() : WebView2
  • DismissFlyout() : TextCommandBarFlyoutTests
  • DismissRevealedSwipe() : SwipeControlTests
  • DismissSwipeOnAcceleratorKeyActivator() : SwipeControl
  • DismissSwipeOnAnExternalTap() : SwipeControl
  • DispatcherHelper() : DispatcherHelper
  • dispatcherQueue : CompositionScrollControllerPanningInfo
  • DispatcherTimer_Tick() : SwipeControlPage , RatingControlPage
  • DisplayMode() : NavigationViewProperties , PagerControlProperties , NavigationViewProperties , NavigationViewDisplayModeChangedEventArgs
  • DisplayModeChanged() : NavigationViewProperties
  • DisplayModeChangeSelectionEventTest() : SelectionTests
  • DisplayModeComboBox : PagerControlTestPageElements
  • DisplayModeCombobox_SelectionChanged() : SplitViewPage
  • DisplayModeProperty() : NavigationViewProperties , PagerControlProperties
  • DisplayModes : PagerControlTestBase
  • DisplayModeTest() : CommonTests
  • DisplayName() : PersonPictureProperties , PersonPicturePage::SportsPerson , PersonPictureProperties
  • DisplayNameProperty() : PersonPictureProperties
  • DisplayNameTextBox_TextChanged() : PersonPicturePage
  • DisposableUserControl() : DisposableUserControl
  • Dispose()
: SecondaryWindowLightConfiguration
, ScrollViewTestHooksHelper
, ColorChangedEventWaiter
, BrightnessSun::BrightnessSun_AnimatedVisual
, MainWindowLightConfiguration
, ScrollPresenterTestHooksHelper
, ScrollViewTestsWithInputHelper::LoggingHelper
, LottieLogo::LottieLogo_AnimatedVisual
, ColorPickerTests::ColorPickerTestSetupHelper
, ItemsViewTestsWithInputHelper::LoggingHelper
, ProgressRingDeterminate::AnimatedVisual
, WebView2Tests::WebView2TestSetupHelper
  • DoesAdvertiseSupportedEvents() : ButtonInteractionTests , SliderInteractionTests
  • DoesInvokeWithKeyboard() : ButtonInteractionTests
  • DoesNavigationViewItemHaveChildren() : NavigationView
  • DoesNotInvokeWhenClickIsDraggedOffBeforeRelease() : ButtonInteractionTests
  • DoesNotSlidePastMaximum() : SliderInteractionTests
  • DoesNotSlidePastMinimum() : SliderInteractionTests
  • DoesRealizationWindowOverlapExtent() : FlowLayout
  • DoesRectContainPoint() : SharedHelpers
  • DoesRepeaterHaveRealizedContainers() : NavigationView
  • DontCrashWhenRecyclingTest() : RatingControlTests
  • DoPhasedWorkCallback() : final
  • DoRectsIntersect() : SharedHelpers
  • DoScroll() : ScrollView
  • DoScrollForKey() : ScrollView
  • DoSelectAllByKeyboard() : WebView2Tests
  • double : BrightnessSun , LottieLogo
  • DoubleValue
: ItemsViewSummaryPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ScrollPresenterDynamicPage::QueuedOperation
  • DragBetweenTabViewsTest() : TabViewTests
  • DragDropIntoWebView2Test() : WebView2Tests
  • DragEnterForApiTest() : TreeViewPage
  • Draggable_DragStarting() : TreeViewPage
  • DraggableText_DragStarting() : WebView2BasicPage
  • DraggedTreeViewNode() : TreeViewList
  • DragItemOntoTreeView() : TreeViewTests
  • DragItemOntoTreeView_ContentMode() : TreeViewTests
  • DragItemOntoTreeView_NodeMode() : TreeViewTests
  • DragItemOutOfTreeView() : TreeViewTests
  • DragItemOutOfTreeView_ContentMode() : TreeViewTests
  • DragItemOutOfTreeView_NodeMode() : TreeViewTests
  • DragItemsCompleted() : TreeViewProperties
  • DragItemsCompletedForApiTest() : TreeViewPage
  • DragItemsCount() : TreeViewItemTemplateSettingsProperties
  • DragItemsCountProperty() : TreeViewItemTemplateSettingsProperties
  • DragItemsStarting() : TreeViewProperties
  • DragItemsStartingForApiTest() : TreeViewPage
  • DragLeaveForApiTest() : TreeViewPage
  • DragOutsideTest() : TabViewTests
  • DragOverForApiTest() : TreeViewPage
  • DragTabWithinTabView() : TabView
  • DragTornOutTab() : TabView
  • DropDownButton() : DropDownButton
  • DropDownButtonAutomationPeer() : DropDownButtonAutomationPeer
  • DropDownButtonPage() : DropDownButtonPage
  • DropDownEventRevokersProperty() : ComboBoxHelper
  • DropEffect() : TreeViewListAutomationPeer
  • DropEffects() : TreeViewListAutomationPeer
  • DropForApiTest() : TreeViewPage
  • DropIndex() : TabViewExternalTornOutTabsDroppedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs
  • DropResult() : TreeViewDragItemsCompletedEventArgs , TabViewTabDragCompletedEventArgs
  • DropTarget_DragOver() : TreeViewPage
  • DropTarget_Drop() : TreeViewPage
  • Dummy() : ObservableTraits< T, isObservable, isBindable >::Dummy
  • DummyControlAutomationId : ButtonInteractionTests
  • DumpThemeResources() : CommonStylesApiTests
  • Duration() : AnimatedGlobalNavigationButtonVisualSource , LottieLogo , BrightnessSun , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedVisualPlayerProperties , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedFindVisualSource , AnimatedVisual , AnimatedChevronUpDownSmallVisualSource , AnimatedSettingsVisualSource , AnimatedVisualPlayerProperties , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource , AnimatedVisual , ProgressRingDeterminate::AnimatedVisual , AnimatedAcceptVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • DurationInMilliSeconds() : final
  • DurationProperty() : AnimatedVisualPlayerProperties
  • dynamicCommandBarFlyout : CommandBarFlyoutPage
  • dynamicCommandTimer : CommandBarFlyoutPage
  • DynamicCommandTimer_Tick() : CommandBarFlyoutPage
  • DynamicGradientBrush : RadialGradientBrushPage
  • DynamicGradientBrushInterpolationSpace : RadialGradientBrushPage
  • DynamicGradientBrushSpreadMethod : RadialGradientBrushPage
  • dynamicLabelChangeCount : CommandBarFlyoutPage
  • dynamicLabelSecondaryCommand : CommandBarFlyoutPage
  • dynamicLabelTimer : CommandBarFlyoutPage
  • DynamicLabelTimer_Tick() : CommandBarFlyoutPage
  • DynamicPage() : DynamicPage
  • DynamicParallaxView : DynamicPage
  • dynamicScrollPresenter : ScrollPresenterDynamicPage
  • dynamicVisibilityChangeCount : CommandBarFlyoutPage
  • dynamicVisibilitySecondaryCommand : CommandBarFlyoutPage
  • dynamicVisibilityTimer : CommandBarFlyoutPage
  • DynamicVisibilityTimer_Tick() : CommandBarFlyoutPage
  • dynamicWidthChangeCount : CommandBarFlyoutPage
  • dynamicWidthOverflowContentRoot : CommandBarFlyoutPage
  • dynamicWidthTimer : CommandBarFlyoutPage
  • DynamicWidthTimer_Tick() : CommandBarFlyoutPage
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- e -

  • EdgeProcessFailedTest() : WebView2Tests
  • Edit() : AnimatedVisualPlayerTests
  • effectiveForegroundOfTeachingTipButtonTextBlock : TeachingTipTestPageElements
  • effectiveForegroundOfTeachingTipContentTextBlock : TeachingTipTestPageElements
  • EffectiveHeroContentPlacementChanged() : TeachingTipTestHooks
  • EffectiveItemHeight() : UniformGridLayoutState
  • EffectiveItemWidth() : UniformGridLayoutState
  • effectiveOpenTeachingTipOnEdgeButton : TeachingTipTestPageElements
  • effectivePageRTLCheckbox : TeachingTipTestPageElements
  • EffectivePlacementChanged() : TeachingTipTestHooks
  • effectivePlacementTextBlock : TeachingTipTestPageElements
  • effectiveRemoveOpenButton : TeachingTipTestPageElements
  • effectiveRemoveTeachingTipButton : TeachingTipTestPageElements
  • effectiveTeachingTipContent : TeachingTipTestPageElements
  • effectiveTeachingTipContentUnloadedCheckbox : TeachingTipTestPageElements
  • effectiveTeachingTipOnEdgeOffsetButton : TeachingTipTestPageElements
  • effectiveTeachingTipOnEdgeOffsetTextblock : TeachingTipTestPageElements
  • Element() : RecyclePool::ElementInfo , BringIntoViewOffsetsChange , MockElementFactory::RecycleElementCallInfo , MapElementClickEventArgs , ElementFactoryRecycleArgsDownlevel , ItemCollectionTransition , ItemCollectionTransitionCompletedEventArgs , ItemCollectionTransitionProgress , ItemsRepeaterElementClearingEventArgs , ItemsRepeaterElementIndexChangedEventArgs , ItemsRepeaterElementPreparedEventArgs , ItemsRepeaterScrollHost::CandidateInfo , ElementInfo
  • ElementClearing() : ItemsRepeaterProperties
  • ElementFactory_SelectTemplateKey() : TreeViewSample
  • ElementIndexChanged() : ItemsRepeaterProperties
  • ElementInfo() : ElementInfo , RecyclePool::ElementInfo
  • ElementManager() : final
  • ElementManager::operator=() : final
  • ElementPhasingManager() : PhasingTests::ElementPhasingManager
  • ElementPrepared() : ItemsRepeaterProperties
  • ElementRect() : BringIntoViewOffsetsChange
  • elements : PagerControlTestBase , PipsPagerTestBase , RadioButtonsTests , TeachingTipTests
  • ElementsInItemsSourcePage() : ElementsInItemsSourcePage
  • ElementTheme_Changed() : RevealStatesPage
  • Elevation() : IDistantDiffuseEffect , IDistantSpecularEffect
  • Ellipse_0_0() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_0_1() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_14p188() : AnimatedFindVisualSource_AnimatedVisual
  • Ellipse_4p6() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_4p7() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_74p5() : BrightnessSun::BrightnessSun_AnimatedVisual
  • Ellipse_7_0() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • Ellipse_7_1() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • Ellipse_7_2() : AnimatedVisual
  • EllipseAnimationEndPosition() : ProgressBarTemplateSettingsProperties
  • EllipseAnimationEndPositionProperty() : ProgressBarTemplateSettingsProperties
  • EllipseAnimationWellPosition() : ProgressBarTemplateSettingsProperties
  • EllipseAnimationWellPositionProperty() : ProgressBarTemplateSettingsProperties
  • EllipseDiameter() : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • EllipseDiameterProperty() : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • EllipseOffset() : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • EllipseOffsetProperty() : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • EllipsisIsRendered() : BreadcrumbLayout
  • EmptyMenuBarItemNoPopupTest() : MenuBarTests
  • EmptyTreeNode() : VirtualizingDataSource
  • EnableCheckBox_Checked() : SplitButtonPage
  • EnableCheckBox_Unchecked() : SplitButtonPage
  • EnableHoverAnimation() : RevealHoverLight
  • EnableLightDismiss() : TeachingTipTests
  • EnableMultiselect() : TreeViewList
  • EnableSelectionFollowsFocus_Click() : NavigationViewTopNavStorePage
  • end() : final
  • End : FlowLayoutAlgorithm , HashMap< K, V > , IndexRange , RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • EndIndex() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • EndPosition() : ScrollingScrollAnimationStartingEventArgs
  • EndSelectionChanges() : ViewModel
  • EndSubTest() : WebView2Tests
  • EndZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • EnlargeFocusedItem : UniformGrid2DLayout
  • EnqueueOperation() : ListViewBasePage
  • EnsureAnchorElementSelection() : ScrollPresenter
  • EnsureAndMeasureItemRange() : LinedFlowLayout
  • EnsureAndResizeItemAspectRatios() : LinedFlowLayout
  • EnsureAnimatedVariables() : ParallaxView
  • EnsureAutomationPeer() : ScrollPresenterAccessibilityPage
  • EnsureAutomationSetCountAndPosition() : CommandBarFlyoutCommandBar
  • EnsureBrowser() : WebView2Tests
  • EnsureClearingListIsSafe() : CommonTests
  • EnsureClip() : SwipeControl
  • EnsureCompositionBrush() : RadialGradientBrush
  • EnsureCompositionCapabilities() : MaterialHelper
  • EnsureCompositionResources() : RevealBorderLight , RevealHoverLight , XamlAmbientLight
  • EnsureCoreWebView2Async() : WebView2
  • EnsureDefaultLayoutState() : ItemsRepeater
  • EnsureDisplayModeGroupUpdatesOnPaneClosedToMinimalWithBackButton() : CommonTests
  • EnsureDisplayModeGroupUpdatesWhenBackButtonVisibilityChanged() : CommonTests
  • EnsureDynamicSizeForPaneHeaderFooterAndCustomContent() : PaneBehaviorTests
  • EnsureElementAvailableWidths() : LinedFlowLayout
  • EnsureElementDesiredWidths() : LinedFlowLayout
  • EnsureElementRealized() : final , LinedFlowLayout
  • EnsureElementSize() : UniformGridLayoutState
  • EnsureEventSubscriptions() : final
  • EnsureExpressionAnimationSources() : ScrollPresenter
  • EnsureFirstLastRealizedIndices() : final
  • EnsureGlobalTestHooks() : AnimatedIconTestHooks , ItemsViewTestHooks , RadioButtonsTestHooks , ScrollPresenterTestHooks , ScrollViewTestHooks , SwipeTestHooks , TeachingTipTestHooks
  • EnsureHooks() : LayoutsTestHooks , RepeaterTestHooks , MUXControlsTestHooks
  • EnsureInitialized() : MUXControlsFactory
  • EnsureInstance() : SplitButtonTestHelper
  • EnsureInteractionTracker() : ScrollPresenter
  • EnsureInternalSourcePropertySetAndExpressionAnimations() : ScrollInputHelper
  • EnsureItemAspectRatios() : LinedFlowLayout
  • EnsureItemRange() : LinedFlowLayout
  • EnsureItemRangeFastPath() : LinedFlowLayout
  • EnsureItemsInfoArrangeWidths() : LinedFlowLayout
  • EnsureItemsInfoDesiredAspectRatios() : LinedFlowLayout
  • EnsureItemsInfoMaxWidths() : LinedFlowLayout
  • EnsureItemsInfoMinWidths() : LinedFlowLayout
  • EnsureItemTemplate() : ItemsView
  • EnsureLeftSettingsRetainsFocusAfterOrientationChanges() : FocusBehaviorTests
  • EnsureLineItemCounts() : LinedFlowLayout
  • EnsureLocalizedControlTypes() : CommandBarFlyoutCommandBar
  • EnsureLocalLight() : RevealBorderLight
  • EnsureNavViewClosed() : NavigationViewTestsBase
  • EnsureNoiseBrush() : AcrylicBrush , RevealBrush
  • EnsureNoMissingThemeResources() : CommonStylesApiTests
  • EnsureOwnerIsPanelOrNull() : RecyclePool
  • EnsurePaneCanBeHidden() : PaneBehaviorTests
  • EnsurePaneCanBeHiddenWithFixedWindowSize() : PaneBehaviorTests
  • EnsurePaneHeaderCanBeModifiedForLeftNav() : CommonTests
  • EnsurePaneHeaderCanBeModifiedForTopNav() : CommonTests
  • EnsurePaneHeaderCanBeModifiedHelper() : NavigationViewTestsBase
  • EnsurePanningInfo() : AnnotatedScrollBar
  • EnsurePositionBoundariesExpressionAnimations() : ScrollPresenter
  • EnsureProperties() : RadioButtonsProperties , RadioMenuFlyoutItemProperties , RatingControlProperties , RatingItemFontInfoProperties , RatingItemImageInfoProperties , RecyclePoolProperties , RecyclingElementFactoryProperties , RefreshContainerProperties , RefreshVisualizerProperties , RevealBrushProperties , ScrollPresenterProperties , ScrollViewProperties , SelectionModelProperties , SelectorBarProperties , SelectorBarItemProperties , SliderInteractionProperties , SpectrumBrushProperties , SplitButtonProperties , StackLayoutProperties , SwipeControlProperties , SwipeItemProperties , SwipeItemsProperties , TabViewProperties , TabViewItemProperties , TabViewItemTemplateSettingsProperties , TeachingTipProperties , TeachingTipTemplateSettingsProperties , TitleBarProperties , TitleBarTemplateSettingsProperties , ToggleSplitButtonProperties , TreeViewProperties , TreeViewItemProperties , TreeViewItemTemplateSettingsProperties , TreeViewNodeProperties , TwoPaneViewProperties , UniformGridLayoutProperties , WebView2Properties , XamlAmbientLightProperties , XamlControlsResourcesProperties , RevealBrush , RecyclePool , AutoSuggestBoxHelper , ComboBoxHelper , CommandBarFlyoutCommandBarTemplateSettingsFactory , AcrylicBrushProperties , AnimatedIconProperties , AnimatedIconSourceProperties , AnimatedVisualPlayerProperties , AnnotatedScrollBarProperties , AutoSuggestBoxHelperProperties , BreadcrumbBarProperties , ButtonInteractionProperties , ColorPickerProperties , ColorPickerSliderProperties , ColorSpectrumProperties , ColumnMajorUniformToLargestGridLayoutProperties , ComboBoxHelperProperties , CommandBarFlyoutCommandBarProperties , CommandBarFlyoutCommandBarAutomationPropertiesProperties , CommandBarFlyoutCommandBarTemplateSettingsProperties , CornerRadiusFilterConverterProperties , CornerRadiusToThicknessConverterProperties , ExpanderProperties , ExpanderTemplateSettingsProperties , FlowLayoutProperties , ImageIconProperties , ImageIconSourceProperties , InfoBadgeProperties , InfoBadgeTemplateSettingsProperties , InfoBarProperties , InfoBarPanelProperties , InfoBarTemplateSettingsProperties , InkCanvasProperties , InkToolBarProperties , InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties , InkToolBarEraserButtonProperties , InkToolBarFlyoutItemProperties , InkToolBarMenuButtonProperties , InkToolBarPenButtonProperties , InkToolBarPenConfigurationControlProperties , InkToolBarStencilButtonProperties , InkToolBarToolButtonProperties , ItemCollectionTransitionProviderProperties , ItemContainerProperties , ItemsRepeaterProperties , ItemsSourceViewProperties , ItemsViewProperties , LayoutProperties , LayoutPanelProperties , LinedFlowLayoutProperties , MapControlProperties , MapElementsLayerProperties , MapIconProperties , MenuBarProperties , MenuBarItemProperties , RadialGradientBrushProperties , MicaBackdropProperties , MonochromaticOverlayPresenterProperties , NavigationViewProperties , ProgressBarProperties , NavigationViewItemProperties , NavigationViewItemBaseProperties , NavigationViewItemPresenterProperties , PersonPictureProperties , NavigationViewItemPresenterTemplateSettingsProperties , NavigationViewTemplateSettingsProperties , NumberBoxProperties , PagerControlProperties , PagerControlTemplateSettingsProperties , ParallaxViewProperties , PersonPictureTemplateSettingsProperties , PipsPagerProperties , PipsPagerTemplateSettingsProperties , ProgressBarTemplateSettingsProperties , ProgressRingProperties , ProgressRingTemplateSettingsProperties
  • EnsureRealized() : VirtualizingStackLayout
  • EnsureReferenceTrackerInterfaces() : ReferenceTracker< D, ImplT, I >
  • EnsureReplaceOfAnchorDoesNotResetAllContainers() : FlowLayoutCollectionChangeTests
  • EnsureResourcesLoaded() : RatingControl
  • EnsureRevealLights() : XamlControlsResources
  • EnsureScaleMaintainedOnTap() : RatingControlTests
  • EnsureScrollControllerExpressionAnimationSources() : ScrollPresenter
  • EnsureScrollControllerVisualInteractionSource() : ScrollPresenter
  • EnsureScroller() : ViewportManagerWithPlatformFeatures
  • EnsureScrollers() : ViewportManagerDownLevel
  • EnsureScrollPresenterVisualInteractionSource() : ScrollPresenter
  • EnsureSmallChangeValue() : AnnotatedScrollBar
  • EnsureTabStopUniqueness() : CommandBarFlyoutCommandBar
  • EnsureTemporaryHostHwnd() : WebView2
  • EnsureThemeProperties() : ProgressRingDeterminate , AnimatedChevronUpDownSmallVisualSource , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedFindVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , ProgressRingIndeterminate , AnimatedAcceptVisualSource
  • EnsureThumbAnimation() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • EnsureTopSettingsRetainsFocusAfterOrientationChanges() : FocusBehaviorTests
  • EnsureTransformExpressionAnimations() : ScrollPresenter
  • EnterGamepadEngagementMode() : RatingControl
  • EnterInfinityModeButton : PagerControlTestPageElements
  • EnterText() : NumberBoxTests
  • EnumerateChildren() : TabViewTests
  • EnumerateDescendants() : TreeViewItemsSourceTestPage
  • EnumXamlType() : EnumXamlType
  • Epsilon : LinedFlowLayoutItemCollectionTransitionProvider
  • EraseAllClicked() : InkToolBarProperties
  • EraseIfExists() : SharedHelpers
  • EraserFlyoutItemClicked() : InkToolBarProperties
  • EraserFlyoutItemKind() : InkToolBarEraserFlyoutItemClickedEventArgs
  • EstablishShadows() : TeachingTip
  • EstimateExtent() : FlowLayoutAlgorithm , VirtualizingStackLayout
  • EstimateIndexForViewport() : VirtualizingStackLayout
  • Evaluate() : SnapPointWrapper< T > , ScrollSnapPoint , SnapPointBase , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • EvaluateIsSelectedBasedOnChildrenNodes() : final
  • Event()
: RoutedEventTraits< RoutedEventType::KeyDown >
, RoutedEventTraits< RoutedEventType::Drop >
, RoutedEventTraits< RoutedEventType::GettingFocus >
, RoutedEventTraits< RoutedEventType::DragLeave >
, RoutedEventTraits< RoutedEventType::LosingFocus >
, RoutedEventTraits< RoutedEventType::PointerPressed >
, RoutedEventTraits< RoutedEventType::PointerReleased >
, RoutedEventTraits< RoutedEventType::PointerExited >
, RoutedEventTraits< RoutedEventType::DragEnter >
, RoutedEventTraits< RoutedEventType::PointerCaptureLost >
, RoutedEventTraits< RoutedEventType::PointerCanceled >
  • event_base() : event_base< ImplT, T, StorageT >
  • event_source() : event_source< T >
  • EventSource : ObservableTraits< T, isObservable, isBindable >
  • Exception() : CoreWebView2InitializedEventArgs
  • Execute() : MyCommand , TestCommand
  • ExecuteAndWaitForColorChange() : ColorPickerTests::ColorPickerTestSetupHelper
  • ExecuteAndWaitForEvent() : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • ExecuteAndWaitForEvents() : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • ExecuteBoldCommand() : TextCommandBarFlyout
  • ExecuteCommand() : SplitButton
  • ExecuteCopyCommand() : TextCommandBarFlyout
  • ExecuteCutCommand() : TextCommandBarFlyout
  • ExecuteExecutingRotationAnimation() : RefreshVisualizer
  • ExecuteInteractingAnimations() : RefreshVisualizer
  • ExecuteItalicCommand() : TextCommandBarFlyout
  • ExecutePasteCommand() : TextCommandBarFlyout
  • ExecuteQueuedOperations() : ScrollPresenterRepeaterAnchoringPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ListViewBasePage , ScrollPresenterStackPanelAnchoringPage
  • ExecuteRedoCommand() : TextCommandBarFlyout
  • ExecuteRemainOpenInvoked() : SwipeControlPage
  • ExecuteScaleUpAnimation() : RefreshVisualizer
  • ExecuteScriptAsync() : WebView2
  • ExecuteScriptTest() : WebView2Tests
  • ExecuteSelectAllCommand() : TextCommandBarFlyout
  • ExecuteTriggerableOperations() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • ExecuteUnderlineCommand() : TextCommandBarFlyout
  • ExecuteUndoCommand() : TextCommandBarFlyout
  • ExecutionRatio : RefreshInfoProviderImpl
  • executionRatio : RefreshInfoProviderImplementation
  • ExecutionRatio : RefreshInfoProviderImplementation
  • executionRatio : RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • ExecutionRatio : RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • ExitGamepadEngagementMode() : RatingControl
  • ExitRegularPath() : LinedFlowLayout
  • Expand() : DropDownButtonAutomationPeer , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , SplitButtonAutomationPeer , TreeViewItemDataAutomationPeer , DropDownButton , TreeView , TreeViewItemAutomationPeer , NavigationView , ScrollPresenterStackPanelAnchoringPage , ExpanderAutomationPeer , ToggleSplitButtonAutomationPeer , Expander
  • ExpandAndWait() : DropDownButton , Expander
  • ExpandCollapseAutomationTests() : ExpanderTests
  • ExpandCollapseState : Expander , DropDownButtonAutomationPeer , DropDownButton , MenuBarItemAutomationPeer , TreeViewItemAutomationPeer , TreeViewItemDataAutomationPeer , ExpanderAutomationPeer , SplitButtonAutomationPeer , NavigationViewItemAutomationPeer , ToggleSplitButtonAutomationPeer
  • ExpandCollapseTest() : TreeViewTests
  • ExpandCollapseTest_ContentMode() : TreeViewTests
  • ExpandCollapseTest_NodeMode() : TreeViewTests
  • ExpandCollapseViaAutomationTest() : TreeViewTests
  • ExpandCollapseViaAutomationTest_ContentMode() : TreeViewTests
  • ExpandCollapseViaAutomationTest_NodeMode() : TreeViewTests
  • ExpandDirection() : ExpanderProperties
  • ExpandDirectionProperty() : ExpanderProperties
  • ExpandDownAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationHoldPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationHoldPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownOverflowVerticalPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownOverflowVerticalPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • expanded : NavigationViewTestsBase
  • ExpandedGlyph() : TreeViewItemProperties
  • ExpandedGlyphProperty() : TreeViewItemProperties
  • ExpandedGlyphVisibility() : TreeViewItemTemplateSettingsProperties
  • ExpandedGlyphVisibilityProperty() : TreeViewItemTemplateSettingsProperties
  • ExpandedModeCombobox_SelectionChanged() : NavigationViewCustomThemeResourcesPage , NavigationViewTopNavPage , NavigationViewPage , NavigationViewRS4Page
  • ExpandedModeThresholdWidth() : NavigationViewProperties
  • ExpandedModeThresholdWidthProperty() : NavigationViewProperties
  • ExpandedWidth() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandedWidthProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • Expander() : Expander
  • ExpanderAutomationPeer() : ExpanderAutomationPeer
  • ExpanderAutomationPeerTest() : ExpanderTests
  • ExpanderPage() : ExpanderPage
  • ExpanderProperties() : ExpanderProperties
  • ExpanderTemplateSettings() : ExpanderTemplateSettings
  • ExpanderTemplateSettingsProperties() : ExpanderTemplateSettingsProperties
  • Expanding() : NavigationViewProperties , ExpanderProperties , TreeViewProperties
  • ExpandingItem() : NavigationViewItemExpandingEventArgs
  • ExpandingItemContainer() : NavigationViewItemExpandingEventArgs
  • ExpandNode() : ViewModel
  • ExpandRootNode_Click() : TreeViewPage
  • ExpandSecondItem_Click() : TreeViewItemsSourceTestPage
  • ExpandUpAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationHoldPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationHoldPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpOverflowVerticalPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpOverflowVerticalPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • expectedLastRealizedIndex : PhasingTests
  • ExpectNullSelectedItemInItemInvoke_Click() : NavigationViewTopNavOnlyPage
  • Exposure() : IExposureEffect
  • ExprBind() : RevealScenarioLights
  • ExpressionAnimationSources() : ScrollPresenter , ScrollView
  • expressionAnimationSources : CompositionScrollControllerPanningInfo
  • ExpressionAnimationStatusChange() : ExpressionAnimationStatusChange
  • ExpressionAnimationStatusChanged() : ScrollPresenterTestHooks
  • ExtendedSelector() : ExtendedSelector
  • ExtendX() : IBorderEffect
  • ExtendY() : IBorderEffect
  • ExtentChanged() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • ExtentHeight() : ScrollView , ScrollPresenter
  • ExtentWidth() : ScrollView , ScrollPresenter
  • ExternalTornOutTabsDropped() : TabViewProperties
  • ExternalTornOutTabsDropping() : TabViewProperties
  • ExtraCommandBarFlyoutPage() : ExtraCommandBarFlyoutPage
  • ExtractNumberFromString() : PipsPagerTestBase
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- f -

  • F6PutsFocusOnCloseButton() : TeachingTipTests
  • Factory : BreadcrumbBarItem , ColorPickerSlider , DropDownButton , ColorSpectrum , Expander
  • FailedToAttachLights() : MaterialHelper
  • FallbackColorButton_Checked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • FallbackColorButton_Unchecked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • FallbackContent() : AnimatedVisualPlayerProperties
  • FallbackContentProperty() : AnimatedVisualPlayerProperties
  • FallbackGlyph : AnimatedIconHost
  • FallbackGlyphProperty : AnimatedIconHost
  • FallbackGrid() : FallbackGrid
  • FallbackIconSource() : AnimatedIconProperties , AnimatedIconSourceProperties
  • FallbackIconSourceProperty() : AnimatedIconProperties , AnimatedIconSourceProperties
  • FallenBackButton_ClickAsync() : AnimatedVisualPlayerPage
  • FallenBackTest() : AnimatedVisualPlayerTests
  • FastRelease : RevealHoverLight
  • FillComboBoxCollectionToSize() : PagerControl
  • FillPixelForBox() : ColorSpectrum
  • FillPixelForRing() : ColorSpectrum
  • FillPointerInfo() : WebView2
  • FillPointerPenInfo() : WebView2
  • FillPointerTouchInfo() : WebView2
  • FillSnapPoint() : ScrollPresenterScrollSnapPointsPage
  • FillTreeNode() : VirtualizingDataSource
  • Filter() : CornerRadiusFilterConverterProperties
  • FilterProperty() : CornerRadiusFilterConverterProperties
  • filterText_TextChanged() : SortingAndFilteringPage
  • final_release() : ReferenceTracker< D, ImplT, I >
  • FindAndGiveAutomationIdToVisualChild() : ColorPickerPage
  • FindAndGiveAutomationNameToVisualChild() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage , PersonPicturePage
  • FindButton() : NumberBoxTests
  • FindCloseButton() : InfoBarTests , TabViewTests
  • FindElementOfTypeInSubtree< T >() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewAnchoringPage , ListViewBasePage , NestedItemsControlsPage
  • FindFocusCandidate() : final
  • FindFrameworkElementWithName() : TabViewPage
  • FindInApplicationResources() : SharedHelpers
  • FindInnerScrollViewer() : ParallaxViewTests , PipsPagerExamples
  • FindInVisualTree() : SharedHelpers
  • FindInVisualTreeByName() : SharedHelpers
  • FindInVisualTreeByType() : SharedHelpers
  • FindKey() : HashMap< K, V >
  • FindLowestLevelContainerToDisplaySelectionIndicator() : NavigationView
  • FindMovableItemsBeyondAvailableWidth() : NavigationView
  • FindMovableItemsRecoverToPrimaryList() : NavigationView
  • FindMovableItemsToBeRemovedFromPrimaryList() : NavigationView
  • FindResource() : SharedHelpers
  • FindSelectionIndicator() : NavigationView
  • FindTabViewItemFromContent() : TabViewPage
  • FindTabViewItemFromDragItem() : TabView
  • FindTextBox() : NumberBoxTests , PagerControlTestBase
  • FindVisualInteractionSourceVisual() : SwipeControl
  • FireCoreProcessFailedEvent() : WebView2
  • FireCoreWebView2Initialized() : WebView2
  • FireEvent() : CMethodProfileGroupBase , CMethodProfileGroup< size >
  • FireNavigationCompleted() : WebView2
  • FireNavigationStarting() : WebView2
  • FireWebMessageReceived() : WebView2
  • First() : BreadcrumbIterable , HashMap< K, V > , ObservableVector< T > , ChildrenInTabFocusOrderIterable , SelectedItems< T > , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems
  • FirstButtonClicked() : PagerControl
  • FirstButtonCommand() : PagerControlProperties
  • FirstButtonCommandProperty() : PagerControlProperties
  • FirstButtonStyle() : PagerControlProperties
  • FirstButtonStyleProperty() : PagerControlProperties
  • FirstButtonVisibility() : PagerControlProperties
  • FirstButtonVisibilityProperty() : PagerControlProperties
  • FirstDayOfWeek_SelectionChanged() : CalendarViewPage
  • FirstFocusedPageTest() : PipsPagerTests
  • FirstFrozenItemIndexDbg() : LinedFlowLayout
  • FirstName : Customer
  • FirstPageButton : PagerControlTestPageElements
  • firstPageButton : PagerControlPage
  • FirstPageButtonChangingPageTest() : PagerControlTests
  • FirstPageButtonIsEnabledCheckBox : PagerControlTestPageElements
  • FirstPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • FirstPageButtonVisibilityComboBox : PagerControlTestPageElements
  • FirstPageButtonVisibilityOptionsTest() : PagerControlTests
  • FirstRealizedElementIndexDefault : final
  • FirstRealizedIndex : ActivityFeedLayoutState
  • FirstRealizedIndexInRect() : VirtualizingUniformCarouselStackLayout , VirtualizingUniformStackLayout
  • FirstRealizedItemIndexDbg() : LinedFlowLayout
  • FirstRealizedRowIndexInRect() : UniformGrid2DLayout
  • FirstRenderedItemIndexAfterEllipsis() : BreadcrumbLayout
  • FirstTab_CloseRequested() : TabViewPage
  • FirstTabViewItems : MultipleTabViewPage
  • FirsttRealizedColumnIndexInRect() : UniformGrid2DLayout
  • FixConsolidatedView() : ScrollPresenterScrollSnapPointsPage
  • FixedSizeItem() : FixedSizeItem
  • FlatIndex() : TreeViewList
  • FlatItemsControlPage() : FlatItemsControlPage
  • FlatItemsControlPage_Loaded() : FlatItemsControlPage
  • FlatSample() : FlatSample
  • FlexBasisProperty : Flex
  • FlexDirection : Flex
  • FlexDirectionProperty : Flex
  • FlexGrowProperty : Flex
  • FlexShrinkProperty : Flex
  • FlexWrap : Flex
  • FlexWrapProperty : Flex
  • FlipExtendViewIntoTitleBar_Click() : NavigationViewTopNavOnlyPage
  • FlipIsTitleBarAutoPaddingEnabledButton_Click() : NavigationViewTopNavStorePage
  • FlipOrientation_Click() : NavigationViewAnimationPage , NavigationViewInitPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewItemTemplatePage , PaneFooterTestPage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage , NavigationViewTopNavStorePage
  • FlipOrientationButton_Clicked() : NavigationViewInfoBadgeTestPage
  • FlipViewPage() : FlipViewPage
  • FlowAlgorithm() : FlowLayoutState , StackLayoutState , UniformGridLayoutState
  • FlowDirectionCheckbox_Checked() : NavigationViewPage
  • FlowDirectionCheckbox_Unchecked() : NavigationViewPage
  • FlowLayout() : FlowLayout
  • FlowLayoutAlgorithm() : FlowLayoutAlgorithm
  • FlowLayoutDemoPage() : FlowLayoutDemoPage
  • FlowLayoutProperties() : FlowLayoutProperties
  • Flyout() : SplitButtonProperties
  • FlyoutProperty() : SplitButtonProperties
  • FlyoutTemplateSettings() : CommandBarFlyoutCommandBarProperties
  • FlyoutTemplateSettingsProperty() : CommandBarFlyoutCommandBarProperties
  • flyoutToAdd : CommandBarFlyoutPage
  • FlyoutTreeViewItemClickTest() : TreeViewTests
  • FlyoutTreeViewItemTabTest() : TreeViewTests
  • FlyoutTreeViewSelectionChangedCrash() : TreeViewTests
  • flyoutTVI : TreeViewPage
  • Focus() : ISpotDiffuseEffect , ISpotSpecularEffect
  • Focus_BackAndForthTabTest() : WebView2Tests
  • Focus_BasicTabTest() : WebView2Tests
  • Focus_MouseActivateTest() : WebView2Tests
  • Focus_ReverseTabTest() : WebView2Tests
  • FocusAndReturnNextFocusableItem() : MenuBarItem
  • FocusAndSelectText() : TextCommandBarFlyoutTests
  • FocusComingFromAnotherRepeaterTest() : RadioButtonsTests
  • FocusCommand() : CommandBarFlyoutCommandBar
  • FocusControl() : CommandBarFlyoutCommandBar
  • FocusedIndexTextBlock : RadioButtonsTestPageElements
  • FocusedIndexTextBlock1 : RadioButtonsFocusTestPageElements
  • FocusedIndexTextBlock2 : RadioButtonsFocusTestPageElements
  • FocusedItemHeight : UniformGrid2DLayout
  • FocusedItemTextBlock : RadioButtonsTestPageElements
  • FocusedItemWidth : UniformGrid2DLayout
  • FocusedPageIndexTextBlock : PipsPagerElements
  • FocusElementAt() : BreadcrumbBar
  • FocusNextDownItem() : NavigationView
  • FocusNextUpItem() : NavigationView
  • FocusSelectedItemButton : RadioButtonsTestPageElements
  • FocusSelectedItemButton_Clicked() : RadioButtonsPage
  • FollowFocus() : SingleSelector
  • fonts : CommonStylesPage
  • Footer() : TitleBarProperties
  • FooterContentCheckBox_CheckedChanged() : TitleBarPageWindow
  • footerItems : PaneLayoutTestPage
  • FooterMenuItems() : NavigationViewProperties
  • FooterMenuItemsProperty() : NavigationViewProperties
  • FooterMenuItemsSource() : NavigationViewProperties
  • FooterMenuItemsSourceProperty() : NavigationViewProperties
  • FooterProperty() : TitleBarProperties
  • ForceCollapse() : NavigationViewItem
  • ForceCreateAcrylicBrush() : AcrylicTestApi
  • ForcedAverageItemAspectRatioDbg() : LinedFlowLayout
  • ForcedAverageItemsPerLineDividerDbg() : LinedFlowLayout
  • ForcedWrapMultiplierDbg() : LinedFlowLayout
  • ForceIsPaneOpenToFalseOnLeftNavTest() : PaneBehaviorTests
  • ForceUpdateLastElement() : BreadcrumbBar
  • Foreground() : ProgressRingDeterminate , AnimatedChevronRightDownSmallVisualSource , IBlendEffect , AnimatedChevronRightDownSmallVisualSource , SwipeItemProperties , AnimatedGlobalNavigationButtonVisualSource , AnimatedFindVisualSource , AnimatedSettingsVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedAcceptVisualSource , ProgressRingIndeterminate , AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedGlobalNavigationButtonVisualSource , IBlendEffect , SwipeItemProperties , ProgressRingDeterminate , AnimatedBackVisualSource , BreadcrumbBarFolder
  • ForegroundColorCounter : RefreshVisualizerPage
  • ForegroundInheritsFromParent() : AnimatedIconTests
  • ForegroundProperty() : SwipeItemProperties
  • ForegroundPropertyComboBox_SelectionChanged() : VisualPropertiesPage
  • foregroundVisualPropertyName() : SwipeControl
  • Forward : FlowLayoutAlgorithm
  • ForwardRefToBaseReferenceTracker() : SelectorBarItem , NavigationViewItemSeparator , TextCommandBarFlyout , ToggleSplitButton , NavigationViewItem , NavigationViewItemHeader
  • ForwardVectorChange() : SharedHelpers
  • FrameCount() : AnimatedBackVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedAcceptVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , LottieLogo , AnimatedChevronDownSmallVisualSource , BrightnessSun , AnimatedSettingsVisualSource , AnimatedChevronRightDownSmallVisualSource
  • Framerate : BrightnessSun , AnimatedGlobalNavigationButtonVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedBackVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedAcceptVisualSource , AnimatedFindVisualSource , LottieLogo , AnimatedSettingsVisualSource
  • FrameToProgress() : AnimatedFindVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedSettingsVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedBackVisualSource , BrightnessSun , AnimatedChevronDownSmallVisualSource , AnimatedAcceptVisualSource , LottieLogo , AnimatedGlobalNavigationButtonVisualSource
  • FrameworkElement_BringIntoViewRequested() : ScrollPresenterBringIntoViewPage , ScrollViewBringIntoViewPage
  • FromArgb() : ColorPickerTests::Color
  • FromOneKeyframeAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • FromOneKeyframeAnimationTest() : AnimatedVisualPlayerTests
  • FromProgress() : AnimatedVisualPlayer::final
  • fullLogs : ScrollPresenterZoomSnapPointsPage , SwipeControlPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterScrollSnapPointsPage , ScrollViewsWithSimpleContentsPage
  • FullName() : XamlTypeBase , PersonInfo
  • Func() : Bridge
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- g -

  • G : ColorPickerTests::Color
  • GamepadCanEscapeAndDoesNotSelectWithFocus() : RadioButtonsTests
  • GamepadTest() : NumberBoxTests , RatingControlTests
  • GamePadTest() : TabViewTests
  • GatherScrollSnapPointsTestPageElements() : ScrollPresenterTestsWithInputHelper
  • GC_Click() : ScrollViewerAdapterPage
  • Generate() : FlowLayoutAlgorithm , VirtualizingStackLayout
  • GenerateControl() : SwipeItem
  • GenerateDirection : FlowLayoutAlgorithm
  • GenerateRenderTargetBitmapButton_Click() : RadialGradientBrushPage
  • GenerateTree() : BreadcrumbBarPage
  • GenerateTreeDynamic() : BreadcrumbBarPage
  • GenerateValue_ValueString() : RatingControlAutomationPeer
  • GenericInkCallback() : GenericInkCallback
  • Geometry() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • Geometry_0() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • Geometry_00() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_01() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_02() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_03() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • Geometry_04() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_05() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_06() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_07() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_08() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_09() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_1() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • Geometry_10() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_11() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_12() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_13() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_14() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_15() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_16() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_17() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_18() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_19() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_2() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • Geometry_20() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_21() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_22() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_23() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_24() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_25() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_26() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_27() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_28() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_3() : AnimatedSettingsVisualSource_AnimatedVisual
  • Geometry_4() : AnimatedSettingsVisualSource_AnimatedVisual
  • get() : IUnknownAccessor< T, Enable > , IUnknownAccessor< com_ptr< T > > , sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • Get() : InkCanvas::TargetData
  • get_HorizontallyScrollableImpl() : ScrollPresenterAutomationPeer
  • get_HorizontalScrollPercentImpl() : ScrollPresenterAutomationPeer
  • get_HorizontalViewSizeImpl() : ScrollPresenterAutomationPeer
  • get_ParentImpl() : TreeViewNode
  • get_VerticallyScrollableImpl() : ScrollPresenterAutomationPeer
  • get_VerticalScrollPercentImpl() : ScrollPresenterAutomationPeer
  • get_VerticalViewSizeImpl() : ScrollPresenterAutomationPeer
  • GetAccessibilitySettings() : WebView2
  • GetAcrylicBrushFallbackColor() : AcrylicBrushTests
  • GetAcrylicBrushNames() : AcrylicBrushTests
  • GetActionButtonContentComboBox() : TeachingTipTestPageElements
  • GetActiveVisualState_Click() : NavigationViewTopNavOnlyPage , NavigationViewTopNavStorePage
  • GetActualWidthsButton_Click() : TabViewTabClosingBehaviorPage
  • GetAdjacentFocusableElementByDirection() : ItemsView
  • GetAdjacentFocusableElementByIndex() : ItemsView
  • GetAlignSelf() : Flex
  • GetAllElementsFromPool() : ItemTemplateTests
  • GetAncestor() : RevealBrush
  • GetAncestorOfType() : SharedHelpers
  • GetAncestorView() : TreeViewItem
  • GetAnchorCandidates() : ScrollingAnchorRequestedEventArgs
  • GetAnchorElement() : ItemsRepeaterScrollHost , ScrollingAnchorRequestedEventArgs
  • GetAnchorForRealizationRect() : FlowLayoutDerived , FlowLayout , StackLayout
  • GetAnchorForRealizationRectFunc : FlowLayoutDerived
  • GetAnchorForTargetElement() : FlowLayoutDerived , FlowLayout
  • GetAnchorForTargetElementFunc : FlowLayoutDerived
  • GetAnchorIndex() : FlowLayoutAlgorithm
  • GetAndVerifyTheContainer() : NavigationViewTopNavOnlyPage
  • GetAnimatedIcon() : AnimatedIconHost , ToggleAnimatedIconHost
  • GetAnimatedPropertyName() : AnimationHandler
  • getAnimatedPropertyName() : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • GetAnimation() : ScrollingScrollAnimationStartingEventArgs , ScrollingZoomAnimationStartingEventArgs
  • GetAnimationTarget() : SwipeControl
  • GetAppropriateGlyph() : RatingControl
  • GetAppropriateImageSource() : RatingControl
  • GetAppWindowCoordinateConverter() : TabView
  • GetAppWindowId() : TabView
  • GetAreCheckStatesEnabled() : RadioMenuFlyoutItemProperties
  • GetArrangeRenderSizesDelta() : ScrollPresenterTests , ScrollPresenter , ScrollPresenterTestHooks
  • GetArrangeRenderSizesDeltaDbg() : ScrollPresenter
  • GetArrangeWidth() : LinedFlowLayout
  • GetArrangeWidthFromItemsInfo() : LinedFlowLayout
  • GetAsFlowState() : FlowLayout
  • GetAsGridState() : UniformGridLayout
  • GetAspectRatios() : ItemsViewPictureLibraryPage
  • GetAsRevealBorderLight() : RevealTestApi
  • GetAsRevealHoverLight() : RevealTestApi
  • GetAssetMap() : sealed< T, fallback, RawStorageT >
  • GetAssociatedNode() : TreeView , ViewModel
  • GetAssociatedNodeImpl() : TreeView
  • GetAsStackState() : StackLayout
  • GetAt() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider , CustomItemsSource , final , IndexPath , ItemsSourceView , LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock , SelectedItems< T > , final , DelegatingItemsSource , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems , ViewModel
  • GetAtCallCount : CustomItemsSource
  • GetAtCallInfo() : MockItemsSource::GetAtCallInfo
  • GetAtCore() : CustomItemsSource , CustomItemsSourceView , MockItemsSource , InspectingDataSource , ItemsSourceView , CollectionChangeDemo::MyDataSource , DelegatingItemsSource , PersonDataSource , ScrollPresenterTests::TestDataSource , ScrollPresenterBringIntoViewPage::SampleDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • GetAtFunc : MockItemsSource
  • GetAutoHideScrollControllers() : ScrollViewTestHooks
  • GetAutomationControlTypeCore() : AnimatedVisualPlayerAutomationPeer , BreadcrumbBarItemAutomationPeer , ColorSpectrumAutomationPeer , ExpanderAutomationPeer , TestControlAutomationPeer , InfoBarAutomationPeer , InkCanvasAutomationPeer , ItemContainerAutomationPeer , ItemsViewAutomationPeer , MenuBarAutomationPeer , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , NumberBoxAutomationPeer , PagerControlAutomationPeer , PersonPictureAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RadioButtonsAutomationPeer , RatingControlAutomationPeer , RepeaterAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , ScrollPresenterAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , TabViewAutomationPeer , TabViewItemAutomationPeer , TeachingTipAutomationPeer , TitleBarAutomationPeer , TreeViewItemAutomationPeer , TreeViewListAutomationPeer , WebView2AutomationPeer
  • GetAutomationName() : TreeViewList
  • GetAutomationNameComboBox() : TeachingTipTestPageElements
  • GetAverageAspectRatio() : LinedFlowLayout , LinedFlowLayoutItemAspectRatios
  • GetAverageAspectRatioFromStorage() : LinedFlowLayout
  • GetAverageElementSize() : StackLayout
  • GetAverageItemsPerLine() : LinedFlowLayout
  • GetAverageLineInfo() : FlowLayout
  • GetBackgroundSpotlightProxy() : RevealTestApi
  • GetBase() : ReferenceTracker< D, ImplT, I >
  • GetBitmapImage() : FlatItemsControlPage , ListViewBasePage
  • GetBorderWidthTextBox() : RadioButtonsTestPageElements
  • GetBoundingRectangle() : ColorSpectrum
  • GetBoundingRectangleCore() : ColorSpectrumAutomationPeer
  • GetBreadcrumbBarItemsHeight() : BreadcrumbLayout
  • GetBreadCrumbPath() : TreeNode
  • GetBringTargetIntoViewButton() : TeachingTipTestPageElements
  • GetBrowserExecutableFolderKey() : WebView2Tests
  • GetBrushColor() : CalendarViewPage
  • GetBrushColor_Click() : CalendarViewPage
  • GetBrushColorString() : CalendarViewPage
  • GetBrushFromIndex() : CalendarViewPage
  • GetBrushName() : LightConfigurationTests , AcrylicColorPage , RevealColorPage
  • GetBtnClearTeachingTipEvents() : TeachingTipTestPageElements
  • GetButton() : TextCommandBarFlyout
  • GetButtonIsHiddenOnEdgeFunction() : PipsPagerTestBase
  • GetButtonsToAdd() : TextCommandBarFlyout
  • GetCachedBoundsForDataIndex() : VirtualizingStackLayout
  • GetCachedBoundsForRealizationIndex() : VirtualizingStackLayout
  • GetCalendarItemBorderThickness_Click() : CalendarViewPage
  • GetCalendarSize_Click() : CalendarViewPage
  • GetCancel() : ScrollingBringingIntoViewEventArgs
  • getCancelClosesInTeachingTip() : TeachingTipPage
  • GetCaptionText() : ItemsViewSummaryPage
  • GetCenterPoint() : LinedFlowLayoutItemCollectionTransitionProvider
  • GetCharacterType() : InitialsGenerator
  • GetCheckBoxStates() : TreeViewPage
  • GetCheckerColor() : ColorPicker
  • GetCheckIfButtonsHiddenButton() : PagerControlTestPageElements
  • GetCheckIfButtonsHiddenLabel() : PagerControlTestPageElements
  • GetChild() : CompactPage
  • GetChildNavViewItemContentPresenterMarginButton_Click() : NavigationViewPage
  • GetChildren() : NavigationView
  • GetChildrenCore() : ExpanderAutomationPeer , RepeaterAutomationPeer
  • GetChildrenForItemInIndexPath() : NavigationView
  • GetChildrenInTabFocusOrder() : ItemsRepeater
  • GetChildrenOrder_Click() : TreeViewPage
  • GetChildRepeaterForIndexPath() : NavigationView
  • GetChildScrollPresenterOrScrollViewer() : ScrollInputHelper
  • GetCircleRadius() : CircleLayout
  • GetClassNameCore() : AnimatedVisualPlayerAutomationPeer , BreadcrumbBarItemAutomationPeer , ColorSpectrumAutomationPeer , DropDownButtonAutomationPeer , ExpanderAutomationPeer , InfoBarAutomationPeer , InkCanvasAutomationPeer , ItemContainerAutomationPeer , ItemsViewAutomationPeer , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , NumberBoxAutomationPeer , PagerControlAutomationPeer , PersonPictureAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RadioButtonsAutomationPeer , SelectorBarItemAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , TabViewAutomationPeer , TabViewItemAutomationPeer , TeachingTipAutomationPeer , TitleBarAutomationPeer , TreeViewItemAutomationPeer , WebView2AutomationPeer
  • GetClearRadioButtonsEventsButton() : RadioButtonsTestPageElements
  • GetClickablePointCore() : ColorSpectrumAutomationPeer
  • GetCloseButton() : TabViewItem , TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetCloseButtonContentComboBox() : TeachingTipTestPageElements
  • GetCloseButtonResourceName() : InfoBar
  • GetCollapsedWaiter() : DropDownButton , Expander
  • GetColorByName() : AcrylicBrushTests
  • GetColorChangedWaiter() : ColorSpectrum , ColorPickerSlider
  • GetColorSpaceValueNames() : RadialGradientBrushPage
  • GetColumns() : ColumnMajorUniformToLargestGridLayout , RadioButtons , RadioButtonsTestHooks
  • GetComboBoxIsEnabledCheckBox() : PagerControlTestPageElements
  • GetComboBoxVisibilityCheckBox() : PagerControlTestPageElements
  • GetComponentHwnd() : WebView2
  • GetComputedAnimationMode() : ScrollPresenter
  • GetComputedMaxHeight() : ScrollPresenter
  • GetComputedMaxWidth() : ScrollPresenter
  • GetComputedScrollMode() : ScrollPresenter
  • GetConsolidatedHorizontalScrollSnapPoints() : ScrollPresenterTestHooks
  • GetConsolidatedHorizontalScrollSnapPointsDbg() : ScrollPresenter
  • GetConsolidatedScrollSnapPointsDbg() : ScrollPresenter
  • GetConsolidatedVerticalScrollSnapPoints() : ScrollPresenterTestHooks
  • GetConsolidatedVerticalScrollSnapPointsDbg() : ScrollPresenter
  • GetConsolidatedZoomSnapPoints() : ScrollPresenterTestHooks
  • GetConsolidatedZoomSnapPointsDbg() : ScrollPresenter
  • GetContainerCountInRepeater() : NavigationView
  • GetContainerForData() : NavigationView
  • GetContainerForIndex() : NavigationView
  • GetContainerForIndexPath() : NavigationView
  • GetContainerForItemOverride() : TabViewListView , SpecialTreeViewList , TreeViewList
  • GetContainerType() : RecipeElementFactory
  • GetContentAlignedCrossOffset() : Flex
  • GetContentAsString() : TreeViewNode
  • GetContentBox() : NavigationViewCompactPaneLengthTestPage
  • GetContentJustifiedMainOffset() : Flex
  • GetContentLayoutOffsetX() : ScrollPresenterTestHooks
  • GetContentLayoutOffsetXDbg() : ScrollPresenter
  • GetContentLayoutOffsetY() : ScrollPresenterTestHooks
  • GetContentLayoutOffsetYDbg() : ScrollPresenter
  • GetContentSize() : ScrollInputHelper
  • GetControlRect() : TwoPaneView
  • GetControlType() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • GetCoreWebView2() : MapControl
  • GetCornerFocusableItem() : ItemsView
  • GetCornerRadiusFromString() : ItemsViewSummaryPage , LinedFlowLayoutDemo , SelectorBarSummaryPage
  • GetCount() : InspectingDataSourceTests
  • GetCurrentAPIVersion() : PlatformConfiguration
  • GetCurrentElementIndex() : ItemsView
  • GetCurrentHexValue() : ColorPicker
  • GetCurrentHsv() : ColorPicker
  • GetCurrentItemIndex() : ItemsViewTestsWithInputHelper
  • GetCurrentItems() : SwipeControl
  • GetCurrentItemText() : BreadcrumbTests
  • GetCurrentlySelectedChannels() : ColorPickerTests
  • GetCurrentMaxVisualIndicatorsTextBlock() : PipsPagerElements
  • GetCurrentNumberOfPagesTextBlock() : PipsPagerElements
  • GetCurrentOrientation() : PipsPagerTestBase , PipsPagerPage
  • GetCurrentOrientationTextBlock() : PipsPagerElements
  • GetCurrentPage() : PagerControlTestBase , PipsPagerTestBase
  • GetCurrentPageAsInt() : PagerControlTestBase
  • GetCurrentPageAsInt32() : PipsPagerTestBase
  • GetCurrentPageIdentifierLeftMarginTextBlock() : PagerControlTestPageElements
  • GetCurrentPageTextBlock() : PagerControlTestPageElements , PipsPagerElements
  • GetCurrentTheme() : RevealHoverLight
  • GetCustomCheckedCheckBox() : RadioButtonsTestPageElements
  • GetCustomContentTextBox() : RadioButtonsTestPageElements
  • GetCustomDisabledCheckBox() : RadioButtonsTestPageElements
  • GetCustomIndexOfFunction : IVectorOwner< EventSource, T > , VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > , SelectedTreeNodeVector , SelectedItemsVector
  • GetCustomIndexTextBox() : RadioButtonsTestPageElements
  • GetCustomProperty() : SelectionModel , TreeViewNode
  • GetDarkThemeIdStatic() : RevealBorderLight
  • GetData() : SelectionModelTests , TreeViewSample
  • GetDataAtIndex() : RadioButtons
  • GetDataIndexFromRealizedRangeIndex() : final
  • GetDataSourceItemFromIndex() : GroupedListViewBasePage
  • GetDataTemplate() : FlowLayoutTests , LayoutTests
  • GetDataTemplateComponent() : CachedVisualTreeHelpers
  • GetDayItemFontSize_Click() : CalendarViewPage
  • GetDefaultLayout() : ItemsRepeater
  • GetDefaultValue() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • GetDeferral() : RefreshRequestedEventArgs , TeachingTipClosingEventArgs
  • GetDescendantBounds() : ScrollPresenter
  • GetDesiredAspectRatioFromItemsInfo() : LinedFlowLayout
  • GetDesiredPipSize() : PipsPager
  • GetDesiredSizeForAvailableSize() : LinedFlowLayout
  • GetDisplayModeComboBox() : PagerControlTestPageElements
  • GetDistanceToKeyboardNavigationReferenceOffset() : ItemsView
  • GetDocumentTitle() : WebView2BasicPage
  • GetDoubleValue() : CornerRadiusFilterConverter
  • GetDraggedItemsNames() : TreeViewPage
  • GetDropDownItemByName() : BreadcrumbTests
  • GetDropTargetDropEffect() : TreeViewList
  • GetEaseInFunction() : LinedFlowLayoutItemCollectionTransitionProvider
  • GetEaseOutFunction() : LinedFlowLayoutItemCollectionTransitionProvider
  • GetEdgeTeachingTipOffset_Clicked() : TeachingTipPage
  • GetEffectiveForegroundOfTeachingTipButtonTextBlock() : TeachingTipTestPageElements
  • GetEffectiveForegroundOfTeachingTipContentTextBlock() : TeachingTipTestPageElements
  • GetEffectiveHeroContentPlacement() : TeachingTip , TeachingTipTestHooks
  • GetEffectiveHorizontalAlignment() : ScrollInputHelper
  • GetEffectiveIsAnimationEnabled() : ScrollPresenterTests
  • GetEffectiveLayout() : ItemsRepeater
  • GetEffectiveLuminosityColor() : AcrylicBrush
  • GetEffectivePlacement() : TeachingTipTests , TeachingTip , TeachingTipTestHooks
  • GetEffectivePlacementTextBlock() : TeachingTipTestPageElements
  • GetEffectiveScreenBoundsInCoreWindowSpace() : TeachingTip
  • GetEffectiveTintColor() : AcrylicBrush
  • GetEffectiveVerticalAlignment() : ScrollInputHelper
  • GetEffectiveWindowBoundsInCoreWindowSpace() : TeachingTip
  • GetEffectiveZoomMode() : ScrollInputHelper
  • GetElement() : ElementFactory , ItemTemplateWrapper , RepeaterAutomationPeer , final
  • GetElement< T >() : MenuBarTests , PagerControlTestPageElements , PipsPagerElements , RadioButtonsFocusTestPageElements , RadioButtonsTestPageElements , TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetElementAt() : BreadcrumbLayout
  • GetElementCallInfo() : MockElementFactory::GetElementCallInfo
  • GetElementCore() : BreadcrumbElementFactory , NavigationViewItemsFactory , RadioButtonsElementFactory , DataAsElementElementFactory , ElementFromElementElementFactory , MockElementFactory , RecyclingElementFactoryDerived , PhasingTests::CustomElementFactory , ElementFactory , RecyclingElementFactory , AnimationsDemoPage::AnimationElementFactory , RecipeElementFactory , PersonElementFactory
  • GetElementDataIndex() : final
  • GetElementFactory() : FlowLayoutCollectionChangeTests
  • GetElementFactoryElementIndex() : RepeaterTestHooks
  • GetElementForHoverLight() : RevealRegressionTestsPage , RevealStatesPage
  • GetElementFromElementFactory() : final
  • GetElementFromIndexImpl() : ItemsRepeater
  • GetElementFromPinnedElements() : final
  • GetElementFromUniqueIdResetPool() : final
  • GetElementFunc : MockElementFactory , RecyclingElementFactoryDerived
  • GetElementIfAlreadyHeldByLayout() : final
  • GetElementIfRealized() : FlowLayoutAlgorithm
  • GetElementImpl() : ItemsRepeater
  • GetElementIndex() : ItemsView , ItemsRepeater , UniformGrid2DLayout , final
  • GetElementIndexCore() : LayoutContextAdapter
  • GetElementIndexImpl() : ItemsRepeater
  • GetElementIndexPath() : ItemsView
  • GetElementItem() : ItemsView
  • GetElementRect() : ItemsView
  • GetElementWithinPager< T >() : PagerControlTestPageElements , PipsPagerElements
  • GetEmptyOrFurthestBlock() : LinedFlowLayoutItemAspectRatios
  • GetEnterInfinityModeButton() : PagerControlTestPageElements
  • GetEnumerator() : CustomItemsSourceView , ReadOnlyNotifyPropertyChangedCollection-g< T > , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , InspectingDataSourceTests::CustomEnumerable , MyCollection
  • GetExpandedDescendantCount() : ViewModel
  • GetExpandedWaiter() : DropDownButton , Expander
  • GetExpanderToggleButtonPeer() : ExpanderAutomationPeer
  • GetExpressionAnimationStatusChanges() : ScrollPresenterTestHooksHelper
  • GetExtent() : FlowLayoutDerived , FlowLayout , StackLayout
  • GetExtentFunc : FlowLayoutDerived
  • GetExtentSize() : PinterestLayout
  • GetExternalTrackerHandleManager() : IVectorOwner< EventSource, T >
  • GetFallBackColorName() : AcrylicBrushTests
  • GetFileContents() : sealed< T, fallback, RawStorageT >
  • GetFindNextElementOptions() : BreadcrumbBar , RadioButtons
  • GetFirstAndLastDisplayedLineIndexes() : LinedFlowLayout
  • GetFirstBreadcrumbBarItemToArrange() : BreadcrumbLayout
  • GetFirstFullCharacter() : InitialsGenerator
  • GetFirstFullyRealizedLineIndex() : LinedFlowLayout
  • GetFirstItemIndexInLineIndex() : LinedFlowLayout
  • GetFirstItemWidthButton_Click() : TabViewTabClosingBehaviorPage
  • GetFirstOfMonthLabelFontSize_Click() : CalendarViewPage
  • GetFirstOfYearDecadeLabelFontSize_Click() : CalendarViewPage
  • GetFirstPageButton() : PagerControlTestPageElements
  • GetFirstPageButtonIsEnabledCheckBox() : PagerControlTestPageElements
  • GetFirstPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetFirstPageButtonVisibilityComboBox() : PagerControlTestPageElements
  • GetFirstRealizedDataIndex() : final
  • GetFirstRealizedDataIndexInViewport() : VirtualizingStackLayout
  • GetFirstRepeatedSnapPoint() : ScrollPresenterScrollSnapPointsPage
  • GetFirstTabLocationButton_Click() : TabViewPage
  • GetFirstTabStopControl() : CommandBarFlyoutCommandBar
  • GetFlexBasis() : Flex
  • GetFlexGrow() : Flex
  • GetFlexShrink() : Flex
  • GetFlowAlgorithm() : FlowLayout , StackLayout , UniformGridLayout
  • GetFlowDirectionAdjustedPlacement() : TeachingTip
  • GetFlowLayout() : RepeaterTestUIPage
  • GetFlyoutTreeViewItemCount_Click() : TreeViewPage
  • GetFocusedIndex() : RadioButtonsTests
  • GetFocusedIndexTextBlock() : RadioButtonsTestPageElements
  • GetFocusedIndexTextBlock1() : RadioButtonsFocusTestPageElements
  • GetFocusedIndexTextBlock2() : RadioButtonsFocusTestPageElements
  • GetFocusedItem() : RadioButtonsTests
  • GetFocusedItemTextBlock() : RadioButtonsTestPageElements
  • GetFocusedPage() : PipsPagerTestBase
  • GetFocusedPageAsInt32() : PipsPagerTestBase
  • GetFocusedPageIndexTextBlock() : PipsPagerElements
  • GetFocusSelectedItemButton() : RadioButtonsTestPageElements
  • GetForcedIndexBasedLayoutOrientation() : Layout
  • GetForeground() : SelectorBarSummaryPage
  • GetFrozenLineIndexFromFrozenItemIndex() : LinedFlowLayout
  • GetFullLog() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ScrollViewsWithSimpleContentsPage , SelectorBarSummaryPage
  • GetGlobalTestHooks() : AnimatedIconTestHooks , ItemsViewTestHooks , RadioButtonsTestHooks , LayoutsTestHooks , RepeaterTestHooks , ScrollPresenterTestHooks , ScrollViewTestHooks , SwipeTestHooks , TeachingTipTestHooks , MUXControlsTestHooks
  • GetGridLayout() : RepeaterTestUIPage
  • GetGroupedPeople() : PersonPicturePage
  • GetGroupIndex() : GroupedRepeaterItem
  • GetHasCompatibleRuntimeInstalled() : WebView2Tests
  • GetHeaderContentMargin_Click() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • GetHelpTextCore() : ColorSpectrumAutomationPeer
  • GetHeroContentComboBox() : TeachingTipTestPageElements
  • GetHiddenElementsList() : BreadcrumbBar
  • GetHomeItemRevealVisualState_Click() : NavigationViewPage
  • GetHorizontalMaxOffset() : CanvasScrollControllerConsumer
  • GetHorizontalOffset() : CanvasScrollControllerConsumer , TeachingTip , TeachingTipTestHooks
  • GetHorizontalOrientationMargin() : InfoBarPanelProperties
  • GetHorizontalOrientationPipsPagerButtonHeightTextBlock() : PipsPagerElements
  • GetHorizontalOrientationPipsPagerButtonWidthTextBlock() : PipsPagerElements
  • GetHorizontalSnapPointActualApplicableZone() : ScrollPresenterTestHooks
  • GetHorizontalSnapPointCombinationCount() : ScrollPresenterTestHooks
  • GetHorizontalSnapPointWrapperDbg() : ScrollPresenter
  • GetHorizontalViewportLength() : CanvasScrollControllerConsumer
  • GetHostHwnd() : WebView2
  • GetHoverLightOffsetExpression() : RevealTestApi
  • GetHsvColorFromTextBoxes() : ColorPicker
  • GetIconColumnWidth_Click() : PaneFooterTestPage
  • GetIconComboBox() : TeachingTipTestPageElements
  • GetIconElementFromString() : SelectorBarSummaryPage
  • GetIconElementPropertyCore() : AnimatedIconSource , ImageIconSource
  • GetIconSeverityLevelResourceName() : InfoBar
  • GetId() : RevealBorderLight , RevealHoverLight , XamlAmbientLight
  • GetImageAsItemsSourceItem() : ItemsViewSummaryPage
  • GetImageSource() : PersonPicture
  • GetImageSurface() : sealed< T, fallback, RawStorageT >
  • GetImmediateChildOfRepeater() : ViewportManagerWithPlatformFeatures
  • GetImpl() : BreadcrumbBarItemAutomationPeer , DropDownButtonAutomationPeer , ExpanderAutomationPeer , ItemContainerAutomationPeer , ItemsViewAutomationPeer , NumberBoxAutomationPeer , PagerControlAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , WebView2AutomationPeer
  • GetIncreaseNumberOfPagesButton() : PagerControlTestPageElements
  • GetIndexedProperty() : SelectionModel , TreeViewNode
  • GetIndexedValue() : CustomProperty
  • GetIndexFromItem() : NavigationView
  • GetIndexOfLowestColumn() : PinterestLayout
  • GetIndexPath() : TreeViewItem
  • GetIndexPathForContainer() : NavigationView
  • GetIndexPathOfItem() : NavigationView
  • GetIndexPathsInSource() : SelectionModelTests
  • getIndexToSelect() : RadioButtonsFocusPage , RadioButtonsPage
  • GetIndexToSelectTextBlock() : RadioButtonsTestPageElements
  • GetIndexToSelectTextBox1() : RadioButtonsFocusTestPageElements
  • GetIndexToSelectTextBox2() : RadioButtonsFocusTestPageElements
  • GetInertiaRestingValue() : ScrollPresenter
  • GetInfoBar() : InfoBarAutomationPeer
  • GetInitials() : PersonPicture
  • GetInner() : ReferenceTracker< D, ImplT, I >
  • GetInputNonClientPointerSource() : TabView
  • GetInsertDisplayRadioButtonButton() : RadioButtonsTestPageElements
  • GetInstalledBrowserVersion() : WebView2Tests
  • GetInt() : TwoPaneViewTests
  • GetInteractionSources() : ScrollPresenterTestHooksHelper
  • GetInteractionTrackerOperationFromKinds() : ScrollPresenter
  • GetInteractionTrackerOperationFromRequestId() : ScrollPresenter
  • GetInteractionTrackerOperationsCount() : ScrollPresenter
  • GetInteractionTrackerOperationsTicksCountdown() : ScrollPresenter
  • GetInteractionTrackerOperationWithAdditionalVelocity() : ScrollPresenter
  • GetIntFromSymbol() : SelectorBarSummaryPage
  • GetInvokedWaiter() : BreadcrumbBarItem
  • GetIsIdle() : SwipeControl , SwipeTestHooks , TeachingTip , TeachingTipTestHooks
  • GetIsIdleCheckBox() : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetIsInertiaFromImpulseExpression() : SnapPointBase
  • GetIsLightDismissEnabledButton() : TeachingTipTestPageElements
  • GetIsLightDismissEnabledCheckBox() : TeachingTipFocusTestPageElements
  • GetIsLightDismissEnabledComboBox() : TeachingTipTestPageElements
  • GetIsOpen() : SwipeControl , SwipeTestHooks
  • GetIsOpenCheckBox() : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetIsPlayingAsync() : AnimatedVisualPlayerPage
  • GetIsPressLight() : RevealHoverLight
  • GetIsRTL() : ColorPickerTests
  • GetIsTarget() : XamlAmbientLightProperties
  • GetItemAt() : VirtualizingLayoutContext
  • GetItemAtCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • GetItemCommonStates_Click() : TreeViewPage
  • GetItemContainerAsItemsSourceItem() : ItemsViewSummaryPage
  • GetItemCount() : BreadcrumbLayout , TabView
  • GetItemCount_Click() : TreeViewPage
  • GetItemDrawbackImprovement() : LinedFlowLayout
  • GetItemFromIndex() : NavigationView
  • GetItemIdFunc : MockItemsSource
  • GetItemIndexFromLastDetailLabelRequest() : ItemsViewIntegrationPage
  • GetItemInternal() : ItemsView
  • GetItemLineIndex() : LinedFlowLayout
  • GetItems() : RevealGridItem , RevealBackgroundItem , RevealGridTypeItem , SelectionModeItem
  • GetItemsAlignedCrossOffset() : Flex
  • GetItemsCollection() : RadioButtonsPage
  • GetItemsInfoRequestedRange() : LinedFlowLayout
  • GetItemsLayout() : LinedFlowLayout
  • GetItemsPerLine() : UniformGridLayout
  • GetItemsRangeArrangeWidth() : LinedFlowLayout
  • GetItemsRepeaterElement() : ItemsViewSummaryPage
  • GetItemsRepeaterElementIndex() : ItemsViewSummaryPage
  • GetItemsRepeaterMethodElement() : ItemsViewSummaryPage
  • GetItemsRepeaterPart() : ItemsView , ItemsViewTestHooks
  • GetItemsRepeaterPropertyElement() : ItemsViewSummaryPage
  • GetItemsSource() : RadioButtons
  • GetItemsSourceOrder() : TreeViewPage
  • GetItemsStackPanel() : ListViewAnchoringPage
  • GetItemsViewPart() : SelectorBar , SelectorBarTestHooks
  • GetItemsWrapGrid() : ListViewAnchoringPage
  • GetItemTypeComboBox() : RadioButtonsTestPageElements
  • GetItemWidthMultiplierThreshold() : LinedFlowLayout
  • GetKeepInteriorCornersSquare() : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • GetKeyboardNavigationReferenceOffset() : ItemsView , ItemsViewTestHooks
  • GetKnownAspectRatioFromImageName() : Recipe
  • GetKnownAspectRatioFromIndex() : Recipe
  • GetKnownAspectRatioFromLocalPath() : Recipe
  • GetLabelVerticalOffset() : AnnotatedScrollBar
  • GetLargerColumns() : ColumnMajorUniformToLargestGridLayout , RadioButtons , RadioButtonsTestHooks
  • GetLastAnimationSegment() : AnimatedIcon , AnimatedIconTestHooks
  • GetLastAnimationSegmentEnd() : AnimatedIcon , AnimatedIconTestHooks
  • GetLastAnimationSegmentStart() : AnimatedIcon , AnimatedIconTestHooks
  • GetLastClickedItem() : BreadcrumbTests
  • GetLastClickedItemIndex() : BreadcrumbTests
  • GetLastInteractedWithSwipeControl() : SwipeControl , SwipeTestHooks
  • GetLastItemIndexInLineIndex() : LinedFlowLayout
  • GetLastNonAnimatedInteractionTrackerOperation() : ScrollPresenter
  • GetLastPage() : PagerControlTestBase
  • GetLastPageAsInt() : PagerControlTestBase
  • GetLastPageButton() : PagerControlTestPageElements
  • GetLastPageButtonIsEnabledCheckBox() : PagerControlTestPageElements
  • GetLastPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetLastPageButtonVisibilityComboBox() : PagerControlTestPageElements
  • GetLayout() : RadioButtons
  • GetLayoutBoundsForDataIndex() : final
  • GetLayoutBoundsForRealizedIndex() : final
  • GetLayoutContext() : ItemsRepeater
  • GetLayoutData() : RadioButtonsTests
  • GetLayoutExtent() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutFirstRealizedItemIndex() : LayoutsTestHooks
  • GetLayoutForcedIndexBasedLayoutOrientation() : LayoutsTestHooks
  • GetLayoutHeightsButton_Click() : PaneLayoutTestPage
  • GetLayoutId() : RepeaterTestHooks , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutIndexBasedLayoutOrientation() : ItemsView
  • GetLayoutLastRealizedItemIndex() : LayoutsTestHooks
  • GetLayoutNumberOfColumnsTextBlock() : RadioButtonsTestPageElements
  • GetLayoutNumberOfLargerColumnsTextBlock() : RadioButtonsTestPageElements
  • GetLayoutNumberOfRowsTextBlock() : RadioButtonsTestPageElements
  • GetLayoutPanelElement() : LinedFlowLayoutDemo
  • GetLayoutRealizationWindow() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutRectForDataIndex() : UniformGridLayout
  • GetLayoutSlot() : CachedVisualTreeHelpers
  • GetLayoutVisibleWindow() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutVisibleWindowDiscardAnchor() : ViewportManagerWithPlatformFeatures
  • GetLeafIndex() : TreeViewSample
  • GetLevelCore() : NavigationViewItemAutomationPeer , TreeViewItemAutomationPeer
  • GetLight() : RevealBorderLight , RevealHoverLight
  • GetLightIdStatic() : RevealHoverLight , XamlAmbientLight
  • GetLightThemeIdStatic() : RevealBorderLight
  • GetLineCount() : LinedFlowLayout
  • GetLinedFlowLayoutAverageItemAspectRatio() : LayoutsTestHooks
  • GetLinedFlowLayoutFirstFrozenItemIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutForcedAverageItemAspectRatio() : LayoutsTestHooks
  • GetLinedFlowLayoutForcedAverageItemsPerLineDivider() : LayoutsTestHooks
  • GetLinedFlowLayoutForcedWrapMultiplier() : LayoutsTestHooks
  • GetLinedFlowLayoutIsFastPathSupported() : LayoutsTestHooks
  • GetLinedFlowLayoutLastFrozenItemIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutLineIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutLogItemIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutMethodElement() : ItemsViewSummaryPage
  • GetLinedFlowLayoutRawAverageItemsPerLine() : LayoutsTestHooks
  • GetLinedFlowLayoutSnappedAverageItemsPerLine() : LayoutsTestHooks
  • GetLineIndex() : LinedFlowLayout
  • GetLineIndexDbg() : LinedFlowLayout
  • GetLineIndexFromAverageItemsPerLine() : LinedFlowLayout
  • GetLinesDesiredWidth() : LinedFlowLayout
  • GetLocalizedControlTypeCore() : ItemContainerAutomationPeer , BreadcrumbBarItemAutomationPeer , ColorSpectrumAutomationPeer , TestControlAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , SelectorBarItemAutomationPeer
  • GetLocalizedPluralBadgeItemStringResource() : PersonPicture
  • GetLocalizedStringResource() : sealed< T, fallback, RawStorageT >
  • GetLocalizedText() : ColorPickerTests
  • GetLoggingLevelForInstance() : MUXControlsTestHooks
  • GetLoggingLevelForType() : MUXControlsTestHooks
  • GetLogItemIndex() : ItemsRepeater , RepeaterTestHooks
  • GetLstTeachingTipEvents() : TeachingTipTestPageElements
  • GetMajorSizeWithSpacing() : UniformGridLayout
  • GetMany() : ViewModel , SelectedItems< T >::Iterator , BreadcrumbIterator , HashMap< K, V >::Iterator , VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , ObservableVector< T >::Iterator , VectorIterator< T, isBindable, isDependencyObjectBase, Traits > , ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator , SelectedItems< T > , VirtualLayoutContextAdapter::ChildrenCollection< T > , VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator , SwipeItems
  • GetMapHtmlContent() : MapControl
  • GetMaterialHelperInstance() : LifetimeHandler
  • GetMaxColumnsTextBlock() : RadioButtonsTestPageElements
  • GetMaxOverpanOffset() : ScrollInputHelper
  • GetMaxPosition() : ScrollPresenterTestHooks
  • GetMaxPositionDbg() : ScrollPresenter
  • GetMaxPositionExpression() : ScrollPresenter
  • GetMaxPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • GetMaxPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • GetMaxPositionXExpression() : ScrollPresenter
  • GetMaxPositionYExpression() : ScrollPresenter
  • GetMaxUnderpanOffset() : ScrollInputHelper
  • GetMaxVisualIndicatorsComboBox() : PipsPagerElements
  • GetMaxWidthFromItemsInfo() : LinedFlowLayout
  • GetMeasureSize() : FlowLayout , FlowLayoutDerived
  • GetMeasureSizeFunc : FlowLayoutDerived
  • GetMember() : XamlTypeBase
  • GetMenuButton() : InkToolBar
  • GetMenuItem1ChildrenFlyoutCornerRadiusButton_Click() : HierarchicalNavigationViewMarkup
  • GetMinorSizeWithSpacing() : UniformGridLayout
  • GetMinPosition() : ScrollPresenterTestHooks
  • GetMinPositionDbg() : ScrollPresenter
  • GetMinPositionExpression() : ScrollPresenter
  • GetMinPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • GetMinPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • GetMinPositionXExpression() : ScrollPresenter
  • GetMinPositionYExpression() : ScrollPresenter
  • GetMinWidthFromItemsInfo() : LinedFlowLayout
  • GetMonitoringLayout() : ViewportTests , EffectiveViewportScrollPresenterTests , EffectiveViewportTests
  • GetMonthNameFromIndex() : ItemsViewIntegrationPage
  • GetMonthYearItemFontSize_Click() : CalendarViewPage
  • GetMultiSelectCheckBoxStates_Click() : TreeViewPage
  • GetMutationCount() : HashMap< K, V >
  • GetNameCore() : TabViewItemAutomationPeer , PipsPagerAutomationPeer , ColorSpectrumAutomationPeer , ExpanderAutomationPeer , ItemContainerAutomationPeer , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , NumberBoxAutomationPeer , PagerControlAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RadioButtonsAutomationPeer , TitleBarAutomationPeer , TreeViewItemAutomationPeer
  • GetNamedPropertyMapping() : EffectBase
  • GetNamedPropertyMappingImpl() : EffectBase
  • GetNavigationDirection() : FocusHelper
  • GetNavigationView() : NavigationViewItemBase
  • GetNavigationViewItem() : NavigationViewItemPresenter
  • GetNavigationViewItemCountInPrimaryList() : NavigationView , NavigationViewItemAutomationPeer , TopNavigationViewDataProvider
  • GetNavigationViewItemCountInTopNav() : NavigationViewItemAutomationPeer , NavigationView , TopNavigationViewDataProvider
  • GetNavigationViewItemsFactory() : NavigationView
  • GetNavigationViewRepeaterPosition() : NavigationViewItemAutomationPeer
  • GetNavItemActiveNavItemVisualState_Click() : NavigationViewTopNavStorePage
  • GetNavViewActiveVisualStates_Click() : NavigationViewCustomThemeResourcesPage , NavigationViewMinimalPage , NavigationViewPage , NavigationViewPageDataContext
  • GetNewColor() : ScrollPresenterScrollSnapPointsPage
  • GetNextFocusCandidate() : ScrollView
  • GetNextGlyphIfNull() : RatingControl
  • GetNextImageIfNull() : RatingControl
  • GetNextIndexInFlatTree() : ViewModel
  • GetNextLockedItem() : LinedFlowLayout
  • GetNextNumber() : NumberBoxParser
  • GetNextPageButton() : PagerControlTestPageElements , PipsPagerElements
  • GetNextPageButtonIsEnabledCheckBox() : PagerControlTestPageElements , PipsPagerElements
  • GetNextPageButtonIsVisibleCheckBox() : PipsPagerElements
  • GetNextPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetNextPageButtonVisibilityComboBox() : PagerControlTestPageElements , PipsPagerElements
  • GetNextViewChangeCorrelationId() : ScrollPresenter
  • GetNodeAt() : ViewModel
  • GetNodeContent() : TreeViewPage
  • GetNoiseBrush() : MaterialHelper
  • GetNoiseBrushImpl() : MaterialHelper
  • GetNonVirtualizingContextAdapter() : VirtualizingLayoutContext
  • GetNumberBoxIsEnabledCheckBox() : PagerControlTestPageElements
  • GetNumberBoxVisibilityCheckBox() : PagerControlTestPageElements
  • GetNumberOfItemsTextBlock() : RadioButtonsTestPageElements
  • GetNumberOfPages() : PipsPagerPage
  • GetNumberOfPagesComboBox() : PipsPagerElements
  • GetNumberOfPagesSetterButton() : PagerControlTestPageElements
  • GetNumberOfPagesTextBlock() : PagerControlTestPageElements
  • GetNumberOfWeeksInView_Click() : CalendarViewPage
  • GetNumberPanelButton() : PagerControlTestPageElements
  • GetNumberPanelContentTextBlock() : PagerControlTestPageElements
  • GetNumberPanelVisibilityCheckBox() : PagerControlTestPageElements
  • GetOffsetFromScrollContentElement() : ScrollInputHelper
  • GetOffsetLabel() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • GetOffsetOfItem() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • GetOffsetsChangeVelocityParameters() : ScrollPresenterTestHooks
  • GetOpenButton() : TeachingTipFocusTestPageElements
  • GetOpenTeachingTipOnEdgeButton() : TeachingTipTestPageElements
  • GetOperationTrigger() : InteractionTrackerAsyncOperation
  • GetOperationType() : InteractionTrackerAsyncOperation
  • GetOppositeDirection() : FocusHelper
  • GetOrCreateAcrylicBrushCompositionEffectFactory() : AcrylicBrush
  • GetOrCreateAcrylicBrushCompositionEffectFactoryFromCache() : MaterialHelperBase
  • GetOrCreateElement() : ItemsRepeater
  • GetOrCreateElementAt() : VirtualizingLayoutContext
  • GetOrCreateElementAtCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • GetOrCreateElementImpl() : ItemsRepeater
  • GetOrCreateRevealBrushCompositionEffectFactory() : RevealBrush
  • GetOrCreateRevealBrushCompositionEffectFactoryFromCache() : MaterialHelperBase
  • GetOrientationComboBox() : PipsPagerElements
  • GetOrigin() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetOriginTemplate() : RecyclePool
  • GetOuterScroller() : ViewportManagerDownLevel
  • GetOverflowItems() : TopNavigationViewDataProvider
  • GetOverflowMenuCornerRadiusButton_Click() : NavigationViewTopNavPage
  • GetOwner() : RepeaterLayoutContext , LayoutPanelLayoutContext
  • GetPageNavigationDirection() : FocusHelper
  • GetPagerComboBox() : PagerControlTestPageElements
  • GetPagerControl() : PagerControlTestPageElements
  • GetPagerNumberBox() : PagerControlTestPageElements
  • GetPageRTLCheckbox() : TeachingTipTestPageElements
  • GetPaneToggleButtonHeight() : NavigationView
  • GetPaneToggleButtonWidth() : NavigationView
  • GetParent() : CachedVisualTreeHelpers
  • GetParentColorPicker() : ColorPickerSlider
  • GetParentData() : TreeViewSample
  • GetParentItemsRepeater() : NavigationViewItemAutomationPeer
  • GetParentItemsRepeaterForContainer() : NavigationView
  • GetParentListView() : TreeViewItemAutomationPeer
  • GetParentNavigationView() : NavigationViewItemAutomationPeer
  • GetParentNavigationViewItemForContainer() : NavigationView
  • GetParentRootItemsRepeaterForContainer() : NavigationView
  • GetParentTabView() : TabViewItem , TabViewItemAutomationPeer
  • GetParentTreeView() : TreeViewItemAutomationPeer
  • GetPasswordBoxButtonsToAdd() : TextCommandBarFlyout
  • GetPatternCore() : TabViewAutomationPeer , TreeViewListAutomationPeer , MenuBarItemAutomationPeer , TreeViewItemAutomationPeer , PagerControlAutomationPeer , DropDownButtonAutomationPeer , BreadcrumbBarItemAutomationPeer , ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer , ExpanderAutomationPeer , ItemContainerAutomationPeer , ItemsViewAutomationPeer , NavigationViewAutomationPeer , NavigationViewItemAutomationPeer , NumberBoxAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , SelectionContainerAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , ScrollPresenterAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer , TreeViewItemDataAutomationPeer
  • GetPatternCoreImpl() : ScrollPresenterAutomationPeer
  • GetPeerFromPointCore() : ExpanderAutomationPeer
  • GetPipsPager() : PipsPagerElements
  • GetPipsPagerButtonSizesButton() : PipsPagerElements
  • GetPipWithPageNumber() : PipsPagerElements
  • GetPixelAtPoint() : AcrylicRenderingPage , RadialGradientBrushPage
  • GetPlacementFallbackOrder() : TeachingTip
  • GetPointerFlags() : WebView2
  • GetPoolInstance() : RecyclePoolProperties , RecyclePool
  • GetPopup() : TeachingTipTestHooks
  • GetPopupVerticalOffsetTextBlock() : TeachingTipTestPageElements
  • GetPosition() : ScrollPresenterTestHooks
  • GetPositionAnimation() : ScrollPresenter
  • GetPositionDbg() : ScrollPresenter
  • GetPositionInSetCore() : NavigationViewItemAutomationPeer , TreeViewItemAutomationPeer
  • GetPositionOrSetCountHelper() : NavigationViewItemAutomationPeer
  • GetPrecedenceValue() : NumberBoxParser
  • GetPreferIndex() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • GetPreferredPlacementComboBox() : TeachingTipTestPageElements
  • GetPresenter() : NavigationViewItem , CommandBarFlyout
  • GetPresenterOrItem() : NavigationViewItem
  • GetPreviousPage() : PagerControlTestBase
  • GetPreviousPageAsInt() : PagerControlTestBase
  • GetPreviousPageButton() : PagerControlTestPageElements , PipsPagerElements
  • GetPreviousPageButtonIsEnabledCheckBox() : PagerControlTestPageElements , PipsPagerElements
  • GetPreviousPageButtonIsVisibleCheckBox() : PipsPagerElements
  • GetPreviousPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetPreviousPageButtonVisibilityComboBox() : PagerControlTestPageElements , PipsPagerElements
  • GetPreviousPageTextBlock() : PagerControlTestPageElements
  • GetPrimaryItems() : TopNavigationViewDataProvider
  • GetPrimaryListSize() : TopNavigationViewDataProvider
  • GetPrimaryWindow() : TabViewTests
  • GetProcessingForSeverity() : InfoBarAutomationPeer
  • GetProperty() : ContrastEffect , PointSpecularEffect , BorderEffect , ExposureEffect , GaussianBlurEffect , EffectBase , ArithmeticCompositeEffect , BlendEffect , HueRotationEffect , ColorMatrixEffect , CompositeStepEffect , CrossFadeEffect , DistantDiffuseEffect , DistantSpecularEffect , GammaTransferEffect , ColorSourceEffect , OpacityEffect , SaturationEffect , TemperatureAndTintEffect , TintEffect , Transform2DEffect , SepiaEffect , SpotDiffuseEffect , PosterizeEffect , LinearTransferEffect , PointDiffuseEffect , SpotSpecularEffect
  • GetPropertyCount() : BorderEffect , ArithmeticCompositeEffect , ColorSourceEffect , ContrastEffect , DistantDiffuseEffect , GaussianBlurEffect , HueRotationEffect , PointDiffuseEffect , SepiaEffect , TintEffect , BlendEffect , CompositeStepEffect , DistantSpecularEffect , ExposureEffect , CrossFadeEffect , PointSpecularEffect , PosterizeEffect , Transform2DEffect , TemperatureAndTintEffect , SpotDiffuseEffect , OpacityEffect , SaturationEffect , GammaTransferEffect , LinearTransferEffect , EffectBase , ColorMatrixEffect , SpotSpecularEffect
  • GetProviderForHwnd() : WebView2
  • GetProvisionalArrangeSize() : FlowLayout , FlowLayoutDerived
  • GetProvisionalArrangeSizeFunc : FlowLayoutDerived
  • GetRadioButtons1HasFocusCheckBox() : RadioButtonsFocusTestPageElements
  • GetRadioButtons2HasFocusCheckBox() : RadioButtonsFocusTestPageElements
  • GetRadioButtonsEventsList() : RadioButtonsTestPageElements
  • GetRadioButtonsHasFocusCheckBox() : RadioButtonsTestPageElements
  • GetRatingControl() : RatingControlAutomationPeer
  • GetRawElementProviderSimple() : WebView2AutomationPeer
  • GetRealizationRectHeightDeficit() : LinedFlowLayout
  • GetRealizedElement() : final
  • GetRealizedElementCount() : final
  • GetRealizedItemsFromSizedItems() : LinedFlowLayout
  • GetRealizedRange() : RepeaterFocusTests
  • GetRealizedRangeIndexFromDataIndex() : final
  • GetRecommendedTransitionDirection() : NavigationView
  • GetRegionalSettingsAwareDecimalFormatter() : NumberBox
  • GetRegionInfo() : DisplayRegionHelper
  • GetRelativeViewport() : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , ScrollPresenter , IRepeaterScrollingSurface
  • GetRelativeViewportFunc : ViewportTests::TestScrollingSurface
  • GetRemovedChildTreeViewNodeByIndex() : ViewModel
  • GetRemoveOpenButtonFromVisualTreeButton() : TeachingTipTestPageElements
  • GetRemoveTargetButton() : TeachingTipTestPageElements
  • GetRemoveTeachingTipButton() : TeachingTipTestPageElements
  • GetRepeater() : NavigationViewTests , NavigationViewItem
  • GetRepeaterActualHeightButtonClick() : UniformGridLayoutDemo
  • GetReproTextBlock() : RadioButtonsTestPageElements
  • GetRequestId() : InteractionTrackerAsyncOperation
  • GetRequiredOperation() : InteractionTrackerAsyncOperation
  • GetResourceContext() : sealed< T, fallback, RawStorageT >
  • GetResourceManager() : sealed< T, fallback, RawStorageT >
  • GetResourceManagerImpl() : sealed< T, fallback, RawStorageT >
  • GetResourceMap() : sealed< T, fallback, RawStorageT >
  • GetReturnTopForOutOfWindowPlacementCheckBox() : TeachingTipTestPageElements
  • GetReuseKey() : RecyclePool
  • GetRgbColorFromTextBoxes() : ColorPicker
  • GetRichEditBoxButtonsToAdd() : TextCommandBarFlyout
  • GetRichEditBoxParent() : ScrollInputHelper
  • GetRichTextBlockButtonsToAdd() : TextCommandBarFlyout
  • GetRichTextSelection() : SharedHelpers
  • GetRootAsList() : TreeStructure
  • GetRootNodeChildrenOrder() : TreeViewPage
  • GetRootOfSelection() : TreeViewList
  • GetRootsOfSelectedSubtrees() : TreeViewList
  • GetRoundedDouble() : LinedFlowLayout
  • GetRoundedFloat() : LinedFlowLayout
  • GetRoundingScaleFactor() : ItemsView
  • GetRows() : RadioButtonsTestHooks , RadioButtons , ColumnMajorUniformToLargestGridLayout
  • GetRuntimeClassName() : RecyclePool , ElementFactoryGetArgsDownlevel , ElementFactoryRecycleArgsDownlevel , RepeaterLayoutContext , ItemsSourceViewFactory
  • GetScrollAnimation() : CompositionScrollController , ScrollBarController , BiDirectionalScrollController::UniScrollController , AnnotatedScrollBar
  • GetScrollButtonsVisible_Click() : TabViewPage
  • GetScrollCompletedResult() : ScrollPresenterTestHooks
  • GetScrollContent() : ScrollViewerIRefreshInfoProviderAdapter
  • GetScrollContentElement() : ScrollInputHelper
  • GetScrollDecreaseButtonEnabled_Click() : TabViewPage
  • GetScrollDecreaseButtonToolTipButton_Click() : TabViewPage
  • GetScrollIncreaseButtonEnabled_Click() : TabViewPage
  • GetScrollIncreaseButtonToolTipButton_Click() : TabViewPage
  • GetScrollOrientation() : OrientationBasedMeasures
  • GetScrollPercent() : ScrollPresenterAutomationPeer
  • GetScrollPresenter() : ScrollPresenterAutomationPeer
  • GetScrollPresenterContentLayoutOffset() : ScrollPresenterTestsWithInputHelper
  • GetScrollPresenterView() : ScrollViewTestsWithInputHelper , ScrollPresenterTestsWithInputHelper
  • GetScrollPresenterWithSuffix() : ScrollPresenterChainingAndRailingPage
  • GetScrollSnapPointWrapperDbg() : ScrollPresenter
  • GetScrollViewerHorizontalOffsetButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerMaxHeightButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerMaxWidthButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerOffsetButton() : TeachingTipTestPageElements
  • GetScrollViewerOffsetTextBox() : TeachingTipTestPageElements
  • GetScrollViewerStateTextBox() : TeachingTipTestPageElements
  • GetScrollViewerVerticalOffset() : TeachingTipTests
  • GetScrollViewerVerticalOffsetButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerWithSuffix() : ScrollPresenterChainingAndRailingPage
  • GetScrollViewPart() : ItemsView , ItemsViewTestHooks
  • GetScrollViewView() : ItemsViewTestsWithInputHelper
  • GetSdkBuildVersion() : WebView2Tests
  • GetSelectByIndexButton() : RadioButtonsTestPageElements
  • GetSelectByIndexButton1() : RadioButtonsFocusTestPageElements
  • GetSelectByIndexButton2() : RadioButtonsFocusTestPageElements
  • GetSelectByItemButton() : RadioButtonsTestPageElements
  • GetSelected_Click() : TreeViewPage
  • GetSelectedContainer() : NavigationView
  • GetSelectedIndex() : RadioButtonsTests
  • GetSelectedIndexTextBlock() : RadioButtonsTestPageElements
  • GetSelectedIndexTextBlock1() : RadioButtonsFocusTestPageElements
  • GetSelectedIndexTextBlock2() : RadioButtonsFocusTestPageElements
  • GetSelectedItem() : RadioButtonsTests , PipsPager
  • GetSelectedItemIndex() : NavigationView
  • GetSelectedItemName_Click() : TreeViewUnrealizedChildrenTestPage
  • GetSelectedItems() : ItemsViewTestsWithInputHelper , ViewModel
  • GetSelectedItemTextBlock() : RadioButtonsTestPageElements
  • GetSelectedNodes() : ViewModel
  • GetSelectedNumberOfPages() : PipsPagerTestBase
  • GetSelectedNumberOfPagesAsInt32() : PipsPagerTestBase
  • GetSelectedPositionInSetTextBlock() : RadioButtonsTestPageElements
  • GetSelectedSizeOfSetTextBlock() : RadioButtonsTestPageElements
  • GetSelection() : PagerControlAutomationPeer , TreeViewPage , TreeViewListAutomationPeer , NavigationViewAutomationPeer , TabViewAutomationPeer , PipsPagerAutomationPeer , SelectionContainerAutomationPeer , ItemsViewAutomationPeer
  • GetSelectionIndicator() : NavigationViewItemPresenter , NavigationViewItem , NavigationViewItemHelper< T >
  • GetSelectionModel() : SelectorBase , ItemsView , ItemsViewTestHooks
  • GetSelectorBarItem() : SelectorBarSummaryPage
  • GetSetActionButtonContentButton() : TeachingTipTestPageElements
  • GetSetAutomationNameButton() : TeachingTipTestPageElements
  • GetSetBorderWidthButton() : RadioButtonsTestPageElements
  • GetSetCloseButtonContentButton() : TeachingTipTestPageElements
  • GetSetHeroContentButton() : TeachingTipTestPageElements
  • GetSetIconButton() : TeachingTipTestPageElements
  • GetSetMaxColumnsButton() : RadioButtonsTestPageElements
  • GetSetNumberOfItemsButton() : RadioButtonsTestPageElements
  • GetSetPreferredPlacementButton() : TeachingTipTestPageElements
  • GetSetSubtitleButton() : TeachingTipTestPageElements
  • GetSetTargetButton() : TeachingTipTestPageElements
  • GetSetTipLocationButton() : TeachingTipTestPageElements
  • GetSetTitleButton() : TeachingTipTestPageElements
  • GetSeverityLevelResourceName() : InfoBar
  • GetShouldConstrainToRootBoundsButton() : TeachingTipTestPageElements
  • GetShouldConstrainToRootBoundsComboBox() : TeachingTipTestPageElements
  • GetShouldLightBeOn() : RevealBorderLight
  • GetShowButton() : TeachingTipTestPageElements
  • GetSize() : IndexPath
  • GetSizeCore() : CustomItemsSource , ItemsSourceView , DelegatingItemsSource , ScrollPresenterTests::TestDataSource , PersonDataSource , ScrollPresenterBringIntoViewPage::SampleDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , InspectingDataSource , CustomItemsSourceView , MockItemsSource , CollectionChangeDemo::MyDataSource
  • GetSizedItemsRectHeight() : LinedFlowLayout
  • GetSizeFunc : MockItemsSource
  • GetSizeOfSetCore() : TreeViewItemAutomationPeer , NavigationViewItemAutomationPeer
  • GetSnapPointFromWrapper() : SnapPointWrapper< T >
  • GetSnapPointVisualizationColor() : ScrollPresenterTestHooks
  • GetSolidColorBrush() : CalendarViewPage
  • GetSolidColorBrushColor() : AcrylicBrushTests
  • GetSource() : EffectBase
  • GetSourceComboBox() : RadioButtonsTestPageElements
  • GetSourceCount() : EffectBase
  • GetSourceOffsetPropertyName() : ScrollInputHelper
  • GetSourceScalePropertyName() : ScrollInputHelper
  • GetSpanningRects() : IApplicationViewSpanningRects
  • GetSplitView() : NavigationView , NavigationViewItemBase
  • GetSpotLight() : RevealTestApi
  • GetSpreadMethodValueNames() : RadialGradientBrushPage
  • GetSquareColor() : AnnotatedScrollBarSummaryPage , AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • GetStackLayout() : RepeaterTestUIPage
  • GetStackPanel() : ListViewAnchoringPage
  • GetStartIndex() : PinterestLayout , VirtualizingStackLayout
  • GetState() : AnimatedIconProperties , RevealBrushProperties
  • GetStringFromChild() : SelectorBarSummaryPage
  • GetStringFromIconElement() : SelectorBarSummaryPage
  • GetStringFromSelectorBarItem() : SelectorBarSummaryPage , SelectorBarTests
  • GetStringRepresentation() : TreeViewNode , SelectionModel
  • GetSubtitleComboBox() : TeachingTipTestPageElements
  • GetSubtitleVisibility() : TeachingTipTestHooks , TeachingTip
  • GetSubtitleVisibilityTextBlock() : TeachingTipTestPageElements
  • GetSupportedEventsCore() : SliderInteraction , ButtonInteraction
  • GetSwipeItemButton() : SwipeControl
  • GetSwitchTargetButton() : TeachingTipTestPageElements
  • GetSymbolFromInt() : SelectorBarSummaryPage
  • GetTab0ToolTipButton_Click() : TabViewPage
  • GetTab1ToolTipButton_Click() : TabViewPage
  • GetTabAtPoint() : TabView
  • GetTabCloseButtonTooltipText() : TabView
  • GetTabInsertionIndex() : TabView
  • GetTabsFromTabView() : TabViewTests , TabViewTearOutTests
  • GetTabViewFromWindow() : TabViewTests , TabViewTearOutTests
  • GetTabViewTearOutAppWindows() : TabViewTearOutTests , TabViewTests
  • GetTabViewWithTearOutList() : TabView
  • GetTargetBounds() : TeachingTipTests
  • GetTargetBoundsButton() : TeachingTipTestPageElements
  • GetTargetExpression() : SnapPointBase
  • GetTargetHeightTextBlock() : TeachingTipTestPageElements
  • GetTargetHorizontalOffset() : ScrollingBringingIntoViewEventArgs
  • GetTargetVerticalOffset() : ScrollingBringingIntoViewEventArgs
  • GetTargetWidthTextBlock() : TeachingTipTestPageElements
  • GetTargetXOffsetTextBlock() : TeachingTipTestPageElements
  • GetTargetYOffsetTextBlock() : TeachingTipTestPageElements
  • getTeachingTip() : TeachingTipPage
  • GetTeachingTip() : TeachingTipAutomationPeer
  • GetTeachingTipAlternateCloseButton() : TeachingTipTestPageElements
  • GetTeachingTipCloseButton() : TeachingTipTestPageElements , TeachingTipFocusTestPageElements
  • GetTeachingTipContent() : TeachingTipTestPageElements
  • GetTeachingTipContentUnloadedCheck() : TeachingTipTestPageElements
  • GetTeachingTipCornerRadius() : TeachingTip
  • GetTeachingTipDebugMessage() : TeachingTipTests
  • GetTeachingTipOnEdgeHorizontalOffset() : TeachingTipTestPageElements
  • GetTeachingTipOnEdgeOffsetButton() : TeachingTipTestPageElements
  • GetTeachingTipOnEdgeOffsetTextblock() : TeachingTipTestPageElements
  • GetTeachingTipOnEdgeVerticalOffset() : TeachingTipTestPageElements
  • getTeachingTipRoot() : TeachingTipPage
  • GetTemplateParts() : SwipeControl
  • GetTemplateSettings() : NavigationView
  • GetTestPageUri() : WebView2Common
  • GetTestRadioButtons() : RadioButtonsTestPageElements
  • GetTestRadioButtons1() : RadioButtonsFocusTestPageElements
  • GetTestRadioButtons2() : RadioButtonsFocusTestPageElements
  • GetTestScreenBoundsHeightTextBox() : TeachingTipTestPageElements
  • GetTestScreenBoundsWidthTextBox() : TeachingTipTestPageElements
  • GetTestScreenBoundsXTextBox() : TeachingTipTestPageElements
  • GetTestScreenBoundsYTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsHeightTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsWidthTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsXTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsYTextBox() : TeachingTipTestPageElements
  • GetTextBlockButtonsToAdd() : TextCommandBarFlyout
  • GetTextBlockChild() : SelectorBarSummaryPage
  • GetTextBoxButtonsToAdd() : TextCommandBarFlyout
  • GetTextBoxChild() : SelectorBarSummaryPage
  • GetThemeBackgroundColor() : WebView2
  • GetThemeProperties() : ProgressRingIndeterminate , ProgressRingDeterminate
  • GetThemingComboBox() : TeachingTipTestPageElements
  • GetThicknessFromString() : GroupedItemsControlPage , ImagePage , ScrollPresenterDynamicPage , ListViewBasePage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , ScrollViewerPage , SelectorBarSummaryPage , LinedFlowLayoutDemo , ListViewAnchoringPage , FlatItemsControlPage , GroupedListViewBasePage
  • GetThis() : SwipeControl
  • GetTicksCountdown() : InteractionTrackerAsyncOperation
  • GetTipFollowsTargetCheckBox() : TeachingTipTestPageElements
  • GetTipLocationComboBox() : TeachingTipTestPageElements
  • GetTipVerticalOffset() : TeachingTipTests
  • GetTipWidthTextBlock() : TeachingTipTestPageElements
  • GetTitleComboBox() : TeachingTipTestPageElements
  • GetTitleVisibility() : TeachingTip , TeachingTipTestHooks
  • GetTitleVisibilityTextBlock() : TeachingTipTestPageElements
  • GetToggleButton() : InkToolBar
  • GetToggleButtonRowHeight_Click() : NavigationViewRS3Page
  • GetTokens() : NumberBoxParser
  • GetToolButton() : InkToolBar
  • GetToolTipString() : ColorPickerSlider
  • GetToolTipStringForUIElement() : TabViewPage
  • GetTopDataProvider() : NavigationView
  • GetTopLevelNavViewItemContentPresenterMarginButton_Click() : NavigationViewPage
  • GetTopNavigationItems() : NavigationViewTestsBase
  • GetTopNavigationViewActualWidth() : NavigationView
  • GetTopPaddingHeight_Click() : NavigationViewRS3Page
  • GetTopPaddingHeightButton_Click() : NavigationViewTopNavStorePage
  • GetTopParent() : RevealMarkupPage , LightConfigurationTests
  • GetTotals() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • GetTrackerHandlerManager() : VectorInnerImpl< VectorOptions, Wrapper >
  • GetTrailingNavigationKeyCount() : ItemsView
  • GetTransformExpressionAnimationExpression() : ScrollPresenterTestHooks
  • GetTransformExpressionAnimationExpressionDbg() : ScrollPresenter
  • GetTree2ItemCount_Click() : TreeViewPage
  • GetTreeViewItemAutomationPeer() : TreeViewItemDataAutomationPeer
  • GetTreeViewNode() : CustomContent , TreeViewItemAutomationPeer
  • GetUIElementForFocusCandidate() : FocusHelper
  • GetUISettings() : RatingControl , WebView2
  • GetUniformGridLayoutMaximumRowsOrColumnsButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinColumnSpacingButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinItemHeightButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinItemWidthButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinRowSpacingButtonClick() : UniformGridLayoutDemo
  • GetUpdatedExpressionAnimationsForImpulse() : SnapPointWrapper< T >
  • GetUpdatedKeyboardNavigationReferenceOffset() : ItemsView
  • GetUpdateMarginTextBlockButton() : PagerControlTestPageElements
  • GetUseTestScreenBoundsCheckbox() : TeachingTipTestPageElements
  • GetUseTestWindowBoundsCheckbox() : TeachingTipTestPageElements
  • GetValue() : XamlMember , CustomProperty
  • GetValueString() : ColorSpectrumAutomationPeer , ColorPickerSliderAutomationPeer
  • GetVector() : SplitVector< T, SplitVectorID > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • GetVectorEventSender() : IVectorOwner< EventSource, T >
  • GetVectorEventSource() : IVectorOwner< EventSource, T >
  • GetVectorForItem() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • GetVectorIDForItem() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , SplitVector< T, SplitVectorID >
  • GetVerticalMaxOffset() : CanvasScrollControllerConsumer
  • GetVerticalOffset() : TeachingTip , TeachingTipTestHooks , CanvasScrollControllerConsumer
  • GetVerticalOrientationMargin() : InfoBarPanelProperties
  • GetVerticalOrientationPipsPagerButtonHeightTextBlock() : PipsPagerElements
  • GetVerticalOrientationPipsPagerButtonWidthTextBlock() : PipsPagerElements
  • GetVerticalSnapPointActualApplicableZone() : ScrollPresenterTestHooks
  • GetVerticalSnapPointCombinationCount() : ScrollPresenterTestHooks
  • GetVerticalSnapPointWrapperDbg() : ScrollPresenter
  • GetVerticalViewportLength() : CanvasScrollControllerConsumer
  • GetView() : SwipeItems , ObservableVector< T > , HashMap< K, V > , ViewModel
  • GetViewChangeBase() : InteractionTrackerAsyncOperation
  • GetViewChangeCorrelationId() : InteractionTrackerAsyncOperation
  • GetViewPercent() : ScrollPresenterAutomationPeer
  • GetViewportSize() : ScrollInputHelper
  • GetVirtualizationInfo() : ItemsRepeater
  • GetVirtualizationInfoProperty() : ItemsRepeater
  • GetVirtualizingContextAdapter() : NonVirtualizingLayoutContext
  • GetVirtualKeyFromChar() : SharedHelpers
  • GetVisibleItemsCount() : BreadcrumbLayout
  • GetVisualChildByName() : CommonStylesApiTests
  • GetVisualHorizontalTargetedPropertyName() : ParallaxViewTests
  • GetVisualStateDisplayMode() : NavigationView
  • GetVisualStateGroup() : VisualStateUtil
  • GetVisualTargetedPropertyName() : ScrollPresenter , ParallaxView
  • GetVisualVerticalTargetedPropertyName() : ParallaxViewTests
  • GetWebView2Provider() : WebView2
  • GetWidthForItem() : TopNavigationViewDataProvider
  • GetWidthsButton_Click() : TabViewSizingPage
  • GetWindowBounds() : TeachingTip
  • GetWindowLightAt() : RevealTestApi
  • GetWrapModeComboBox() : PipsPagerElements
  • GetWritableParentItemsSource() : TreeViewNodeVector
  • GetXamlType() : XamlMetadataProvider
  • GetXmlnsDefinitions() : XamlMetadataProvider
  • GetZoomCompletedResult() : ScrollPresenterTestHooks
  • GetZoomedExtentHeight() : ScrollPresenter
  • GetZoomedExtentWidth() : ScrollPresenter
  • GetZoomFactorAnimation() : ScrollPresenter
  • GetZoomFactorChangeVelocityParameters() : ScrollPresenterTestHooks
  • GetZoomSnapPointActualApplicableZone() : ScrollPresenterTestHooks
  • GetZoomSnapPointCombinationCount() : ScrollPresenterTestHooks
  • GetZoomSnapPointWrapperDbg() : ScrollPresenter
  • GlobalDependencyProperty() : GlobalDependencyProperty
  • Glyph() : RatingItemFontInfoProperties
  • GlyphBrush() : TreeViewItemProperties
  • GlyphBrushProperty() : TreeViewItemProperties
  • GlyphOpacity() : TreeViewItemProperties
  • GlyphOpacityProperty() : TreeViewItemProperties
  • GlyphProperty() : RatingItemFontInfoProperties
  • GlyphSize() : TreeViewItemProperties
  • GlyphSizeProperty() : TreeViewItemProperties
  • GoBack() : WebView2
  • GoBackAndForwardTest() : WebView2Tests
  • GoButton_Click() : MapControlPage
  • GoForward() : WebView2
  • GoToChainingAndRailingPage() : ScrollPresenterTestsWithInputHelper
  • GoToElementStateCore() : RevealListViewItemPresenter , NavigationViewItemPresenter
  • GoToExamplesPage() : PipsPagerPage
  • GotoLightState() : RevealHoverLight
  • GotoLightStateHelper() : RevealHoverLight
  • GoToManipulationModePage() : ScrollPresenterTestsWithInputHelper
  • GotoNormal : RevealHoverLight
  • GotoPointerOver : RevealHoverLight
  • GotoPressed : RevealHoverLight
  • GoToScrollSnapPointsPage() : ScrollPresenterTestsWithInputHelper
  • GoToSimpleContentsPage() : ScrollPresenterTestsWithInputHelper
  • GoToState() : ItemContainer , ScrollView , RevealHoverLight
  • GoToStateIfGroupExists() : VisualStateUtil
  • GradientOrigin() : RadialGradientBrushProperties
  • GradientOriginProperty() : RadialGradientBrushProperties
  • GradientRenderingTest() : RadialGradientBrushTests
  • GradientStops() : RadialGradientBrush
  • GreenAmplitude() : IGammaTransferEffect
  • GreenDisable() : IGammaTransferEffect , ILinearTransferEffect , IGammaTransferEffect , ILinearTransferEffect
  • greenEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • GreenExponent() : IGammaTransferEffect
  • GreenLabelAutomationId : ColorPickerTests
  • GreenOffset() : ILinearTransferEffect , IGammaTransferEffect , ILinearTransferEffect
  • greenOrSaturationChangedWaiter : ColorChangedEventWaiter
  • GreenSlope() : ILinearTransferEffect
  • GreenTextBoxAutomationId : ColorPickerTests
  • GreenValueCount() : IPosterizeEffect
  • grid : RefreshVisualizerPage
  • Grid_ContextRequested() : MenuFlyoutPage
  • gridItemTypeSource : RevealScenarioGrid
  • gridSource : RevealScenarioGrid
  • GridViewPage() : GridViewPage
  • GroupCheckBox_Checked() : PersonPicturePage
  • GroupCheckBox_Unchecked() : PersonPicturePage
  • GroupedItemsControlGroupItem() : GroupedItemsControlGroupItem
  • GroupedItemsControlItem() : GroupedItemsControlItem
  • GroupedItemsControlPage() : GroupedItemsControlPage
  • GroupedItemsControlPage_Loaded() : GroupedItemsControlPage
  • GroupedItemsControlViewModel() : GroupedItemsControlViewModel
  • GroupedListViewBaseGroupItem() : GroupedListViewBaseGroupItem
  • GroupedListViewBaseItem() : GroupedListViewBaseItem
  • GroupedListViewBasePage() : GroupedListViewBasePage
  • GroupedListViewBasePage_Loaded() : GroupedListViewBasePage
  • GroupedListViewBaseViewModel() : GroupedListViewBaseViewModel
  • GroupedRepeaterItem() : GroupedRepeaterItem
  • GroupedRepeaterItemAutomationPeer() : GroupedRepeaterItemAutomationPeer
  • GroupedSample() : GroupedSample
  • GroupName() : RadioMenuFlyoutItemProperties
  • GroupNameProperty() : RadioMenuFlyoutItemProperties
  • groupRepeater_ElementIndexChanged() : GroupedSample
  • groupRepeater_ElementPrepared() : GroupedSample
  • GrowLineIfNeeded() : Flex
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- h -

  • Handled() : InkToolBarEraserFlyoutItemClickedEventArgs , ItemContainerInvokedEventArgs , TreeViewItemInvokedEventArgs , ScrollControllerPanRequestedEventArgs , ItemContainerInvokedEventArgs , ScrollControllerPanRequestedEventArgs , TreeViewItemInvokedEventArgs
  • HandleEdgeCaseFocus() : RadioButtons
  • HandleExpandCollapse() : TreeViewItem
  • HandleExpansionStateMemory() : NavigationViewItem
  • HandleF6Clicked() : TeachingTip
  • HandleGamepadAInMultiselectMode() : TreeViewItem
  • HandleGettingFocus() : WebView2
  • HandleGotFocus() : WebView2
  • HandleItemCloseRequestedTest() : TabViewTests
  • HandleItemsInfoRequested() : ItemsViewTests
  • HandleItemsInfoRequestedWithExtraInfo() : ItemsViewTests
  • HandleItemsInfoRequestedWithSizeArrays() : ItemsViewTests
  • HandleItemsInfoRequestedWithSizeArraysAndExtraInfo() : ItemsViewTests
  • HandleItemsInfoRequestedWithTemporaryAndExtraInfo() : ItemsViewTests
  • HandleItemsInfoRequestedWithTemporaryInfo() : ItemsViewTests
  • HandleKeyDownForStandardScroll() : ScrollView
  • HandleKeyDownForXYNavigation() : ScrollView
  • HandleKeyEventForNavigationViewItem() : NavigationView
  • HandleLosingFocus() : WebView2
  • HandleMapElementsChanged() : MapElementsLayer
  • HandlePointerCanceled() : WebView2
  • HandlePointerCaptureLost() : WebView2
  • HandlePointerEntered() : WebView2
  • HandlePointerExited() : WebView2
  • HandlePointerMoved() : WebView2
  • HandlePointerPressed() : WebView2
  • HandlePointerReleased() : WebView2
  • HandlePointerWheelChanged() : WebView2
  • HandleRendered() : WebView2
  • HandleReorder() : TreeViewItem
  • HandleScrollControllerPointerEntered() : ScrollView
  • HandleScrollControllerPointerExited() : ScrollView
  • HandleSizeChanged() : WebView2
  • HandleTopNavigationMeasureOverride() : NavigationView
  • HandleTopNavigationMeasureOverrideNormal() : NavigationView
  • HandleTopNavigationMeasureOverrideOverflow() : NavigationView
  • HandleWebError() : WebView2BasicPage
  • HandleXamlRootChanged() : WebView2
  • HasBaseColor : MaterialHelperBase
  • hasBottomContentPropertyName() : SwipeControl
  • HasBringingIntoViewListener() : ScrollPresenter
  • HasChildren() : TreeViewNodeProperties , NavigationViewItem , NavigationViewItemAutomationPeer
  • HasChildrenProperty() : TreeViewNodeProperties
  • HasCloseAnimation() : CommandBarFlyoutCommandBar
  • HasCurrent()
: BreadcrumbIterator
, HashMap< K, V >::Iterator
, ObservableVector< T >::Iterator
, VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
, ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
, SelectedItems< T >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
  • HasCustomContentChanged() : InfoBarPage
  • HasDensityBars_Checked() : CalendarViewPage
  • HasDensityBars_Unchecked() : CalendarViewPage
  • HasDirectManipulation : DynamicPage , SimpleRectanglePage
  • HasInvalidWidth() : TopNavigationViewDataProvider
  • HasKey() : HashMap< K, V >
  • HasKeyboardFocusCore() : ExpanderAutomationPeer
  • HasKeyIndexMapping() : ItemsSourceView
  • HasKeyIndexMappingCore() : InspectingDataSource , ItemsSourceView
  • HasKeyIndexMappingFunc : MockItemsSource
  • hasLeftContentPropertyName() : SwipeControl
  • HasLowerWeight() : LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • HasMaxTicksCount() : ScrollViewBringIntoViewOperation
  • HasOpenAnimation() : CommandBarFlyoutCommandBar
  • HasPendingBringIntoView() : ItemsRepeaterScrollHost
  • HasPotentialChildren() : NavigationViewItem
  • hasRightContentPropertyName() : SwipeControl
  • HasScroller() : ViewportManagerWithPlatformFeatures
  • HasScrollers() : ViewportManagerDownLevel
  • HasSecondaryOpenCloseAnimations() : CommandBarFlyoutCommandBar
  • HasStarted() : ItemCollectionTransition
  • hasTopContentPropertyName() : SwipeControl
  • HasTopNavigationViewItemNotInPrimaryList() : NavigationView
  • HasUnrealizedChildren : TreeViewItemSource , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNode
  • HasUnrealizedChildrenProperty() : NavigationViewItemProperties , TreeViewItemProperties
  • HasVisibleLabel() : CommandBarFlyoutCommandBar
  • Header : RevealGridItem , RevealScenarioItem , RevealItem , TabDataItem , ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties
  • HeaderContentCheckBox_CheckedChanged() : TitleBarPageWindow
  • HeaderContentPresenterMarginTest() : CommonStylesPage
  • HeaderProperty() : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties
  • HeaderTemplate() : NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , ExpanderProperties , NavigationViewProperties , NumberBoxProperties
  • HeaderTemplateProperty() : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties
  • HeaderTemplateSelector() : ExpanderProperties
  • HeaderTemplateSelectorProperty() : ExpanderProperties
  • HeaderVisiblityCheckbox_Checked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • HeaderVisiblityCheckbox_Unchecked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • HeartButton_Click() : ItemContainerSummaryPage
  • Height : RevealBorderSpotlightStateDesc , MyItem
  • HeightComboBox_SelectionChanged() : TwoPaneViewPage
  • HeightCombobox_SelectionChanged() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • HeightMapInterpolationMode() : IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • HeightMapKernelSize() : IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • HeightMapScale() : IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • HeroContent() : TeachingTipProperties
  • heroContentComboBox : TeachingTipTestPageElements
  • HeroContentOptions : TeachingTipTestPageElements
  • HeroContentPlacement() : TeachingTipProperties
  • HeroContentPlacementProperty() : TeachingTipProperties
  • HeroContentProperty() : TeachingTipProperties
  • HexTextBoxAutomationId : ColorPickerTests
  • HexTextBoxChanged : ColorPicker
  • HiddenElements() : BreadcrumbBar
  • HiddenThenVisibleTest() : WebView2Tests
  • HideHoverVisuals() : AnnotatedScrollBar
  • HideIndicators() : ScrollView
  • HideIndicatorsAfterDelay() : ScrollView
  • HideItem() : BreadcrumbLayout
  • HideLeftAdjacentTabSeparator() : TabViewItem
  • HierarchicalNavigationViewDataBinding() : HierarchicalNavigationViewDataBinding
  • HierarchicalNavigationViewMarkup() : HierarchicalNavigationViewMarkup
  • HierarchyItemsAccessibilitySetAndLevelTest() : CommonTests
  • hIndicatorOffsetExpression : ScrollPresenterExpressionAnimationSourcesPage
  • hIndicatorWidthExpression : ScrollPresenterExpressionAnimationSourcesPage
  • HittestingTest() : AnimatedVisualPlayerTests
  • HoldThenStepEasingFunction() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • HomeEndNavigationTest() : FocusBehaviorTests
  • HomeTabOverlapCheck_Click() : TabViewPage
  • HookAllCommandBarElementDependencyPropertyChanges() : CommandBarFlyout
  • HookAnnotatedScrollBarEvents() : ItemsViewIntegrationPage
  • HookAppBarButtonDependencyPropertyChanges() : CommandBarFlyout
  • HookAppBarToggleButtonDependencyPropertyChanges() : CommandBarFlyout
  • HookBringIntoViewEvents() : ScrollPresenterBringIntoViewPage
  • HookChildPropertyChanged() : ParallaxView
  • HookCompositionTargetRendering() : ScrollInputHelper , ItemsView , ScrollPresenter , ScrollView
  • HookContentEffectiveViewportChanged() : ScrollPresenterDynamicPage
  • HookContentPointerEvents() : ScrollPresenterDynamicPage
  • HookContentPropertyChanged() : ScrollPresenter
  • HookHandlers() : BiDirectionalScrollController
  • HookHorizontalScrollControllerEvents() : ScrollView , ScrollPresenter
  • HookHorizontalScrollControllerInteractionSourceEvents() : ScrollPresenter
  • HookHorizontalScrollControllerPanningInfoEvents() : ScrollPresenter
  • HookInputEvents() : NavigationViewItem , AnnotatedScrollBar
  • HookItemsRepeaterEvents() : SelectorBarSummaryPage , ItemsView , ItemsViewSummaryPage , KeyboardNavigationSample
  • HookItemsSourceViewEvents() : ItemsView
  • HookItemsViewEvents() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • HookLinedFlowLayoutEvents() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • HookListeners() : BreadcrumbBarItem
  • HookLoaded() : ParallaxView
  • HookPhotosCollectionChanged() : ItemsViewIntegrationPage
  • HookRichEditBoxTextChanged() : ScrollInputHelper
  • HookScrollBarEvent() : ScrollBarController
  • HookScrollBarPropertyChanged() : ScrollBarController
  • HookScrollersEvents() : VariableSizedItemsPage
  • HookScrollPresenterContentPropertyChanged() : ScrollInputHelper
  • HookScrollPresenterEvents() : ScrollPresenter , ScrollView , ScrollPresenterBringIntoViewPage
  • HookScrollPresenterPropertyChanged() : ScrollInputHelper
  • HookScrollViewerContentPropertyChanged() : ScrollInputHelper
  • HookScrollViewerDirectManipulationCompleted() : ScrollInputHelper
  • HookScrollViewerDirectManipulationStarted() : ScrollInputHelper
  • HookScrollViewerEvents() : ScrollPresenterBringIntoViewPage
  • HookScrollViewerPropertyChanged() : ScrollInputHelper
  • HookScrollViewEvents() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ItemsView , ScrollView
  • HookSelectorBarEvents() : SelectorBarSummaryPage
  • HookSizeChanged() : ParallaxView
  • HookSourceControlTemplateChanged() : ScrollInputHelper
  • HookSourceElementLoaded() : ScrollInputHelper
  • HookTargetElementLoaded() : ScrollInputHelper
  • HookUISettingsEvent() : ScrollView , ScrollView::AutoHideScrollBarsState
  • HookupCollectionChangedHandler() : final
  • HookupDpiChangedHandler() : MaterialHelper
  • HookupWindowPointerHandlers() : RevealBorderLight
  • HookVerticalScrollControllerEvents() : ScrollView , ScrollPresenter
  • HookVerticalScrollControllerInteractionSourceEvents() : ScrollPresenter
  • HookVerticalScrollControllerPanningInfoEvents() : ScrollPresenter
  • HorizontalAlignmentRatio() : BringIntoViewOffsetsChange
  • HorizontalAnchorRatio() : ItemsRepeaterScrollHost , ScrollViewProperties , ScrollPresenterProperties , ItemsRepeaterScrollHost , ScrollPresenterProperties , ScrollViewProperties
  • HorizontalAnchorRatioProperty() : ScrollViewProperties , ScrollPresenterProperties
  • HorizontalCacheLength() : ViewportManager , ItemsRepeaterProperties , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , ViewportManager , ItemsRepeaterProperties
  • HorizontalCacheLengthProperty() : ItemsRepeaterProperties
  • horizontalDecrementRepeatButton : BiDirectionalScrollController , CompositionScrollController
  • HorizontalDecrementRepeatButton_Click() : BiDirectionalScrollController
  • horizontalDecrementVerticalIncrementRepeatButton : BiDirectionalScrollController
  • HorizontalDecrementVerticalIncrementRepeatButton_Click() : BiDirectionalScrollController
  • HorizontalElementAutomationId : SliderInteractionTests
  • horizontalGrid : CompositionScrollController
  • horizontalIncrementRepeatButton : CompositionScrollController , BiDirectionalScrollController
  • HorizontalIncrementRepeatButton_Click() : BiDirectionalScrollController
  • horizontalIncrementVerticalDecrementRepeatButton : BiDirectionalScrollController
  • HorizontalIncrementVerticalDecrementRepeatButton_Click() : BiDirectionalScrollController
  • HorizontalLargeChangeTextBlockAutomationId : SliderInteractionTests
  • HorizontallyScrollable() : ScrollPresenterAutomationPeer
  • HorizontalMaximumTextBlockAutomationId : SliderInteractionTests
  • HorizontalMinimumTextBlockAutomationId : SliderInteractionTests
  • HorizontalOffset() : BringIntoViewOffsetsChange , ScrollView , ScrollPresenter , ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs
  • HorizontalOffsetAnimation : DynamicPage
  • HorizontalOffsetAnimation1 : SimpleRectanglePage
  • HorizontalOffsetAnimation2 : SimpleRectanglePage
  • HorizontalOrientationMarginProperty() : InfoBarPanelProperties
  • HorizontalOrientationPadding() : InfoBarPanelProperties
  • HorizontalOrientationPaddingProperty() : InfoBarPanelProperties
  • HorizontalOrientationPipsPagerButtonHeightTextBlock : PipsPagerElements
  • HorizontalOrientationPipsPagerButtonWidthTextBlock : PipsPagerElements
  • HorizontalPositionTextBlockAutomationId : SliderInteractionTests
  • horizontalPS : CanvasScrollControllerConsumer
  • HorizontalScroll : ScrollPresenter
  • HorizontalScrollBarVisibility() : ScrollViewProperties
  • HorizontalScrollBarVisibilityProperty() : ScrollViewProperties
  • HorizontalScrollChainMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • HorizontalScrollChainModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • horizontalScrollController : BiDirectionalScrollController , ScrollPresenterWithSimpleScrollControllersPage
  • HorizontalScrollController() : ScrollPresenter
  • horizontalScrollController : CanvasScrollControllerConsumer
  • HorizontalScrollController : BiDirectionalScrollController , ScrollPresenter , CanvasScrollControllerConsumer
  • HorizontalScrollMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • HorizontalScrollModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • HorizontalScrollPercent() : ScrollPresenterAutomationPeer
  • HorizontalScrollRailMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • HorizontalScrollRailModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • HorizontalShift() : ParallaxViewProperties
  • HorizontalShiftProperty() : ParallaxViewProperties
  • HorizontalSliderInteraction : SliderInteractionPage
  • HorizontalSmallChangeTextBlockAutomationId : SliderInteractionTests
  • HorizontalSnapPoints() : ScrollPresenter
  • HorizontalSourceEndOffset() : ParallaxViewProperties
  • HorizontalSourceEndOffsetProperty() : ParallaxViewProperties
  • HorizontalSourceOffsetKind() : ParallaxViewProperties
  • HorizontalSourceOffsetKindProperty() : ParallaxViewProperties
  • HorizontalSourceStartOffset() : ParallaxViewProperties
  • HorizontalSourceStartOffsetProperty() : ParallaxViewProperties
  • horizontalStackPanel : ScrollPresenterDynamicPage , ScrollViewerPage
  • horizontalThumb : CompositionScrollController
  • HorizontalThumbOffset : CompositionScrollController , BiDirectionalScrollController
  • HorizontalViewSize() : ScrollPresenterAutomationPeer
  • HorizontalZoomFactor : ScrollPresenter
  • HostNameToFolderMappingTest() : WebView2Tests
  • Hover : RevealHoverLight
  • HoveringBehaviorTest() : MenuBarTests
  • HoverLight_IsPointerOver() : RevealTestApi
  • HoverLight_IsPressed() : RevealTestApi
  • HoverLight_ShouldBeOn() : RevealTestApi
  • HoverLight_ValidateFastRelease_Values() : RevealStatesPage
  • HoverLight_ValidateNormal() : RevealStatesPage
  • HoverLight_ValidateNormalState() : RevealStatesPage
  • HoverLight_ValidatePointerOver() : RevealStatesPage
  • HoverLight_ValidatePointerOverState() : RevealStatesPage
  • HoverLight_ValidatePointerOverState_Values() : RevealStatesPage
  • HoverLight_ValidatePosition_Offset1_Values() : RevealStatesPage
  • HoverLight_ValidatePosition_Offset2_Values() : RevealStatesPage
  • HoverLight_ValidatePosition_Offset3_Values() : RevealStatesPage
  • HoverLight_ValidatePressed() : RevealStatesPage
  • HoverLight_ValidatePressedState_Values() : RevealStatesPage
  • HoverLight_ValidateSlowRelease_Values() : RevealStatesPage
  • HoverLightPositionValuesValidationHelper() : RevealStatesPage
  • HoverLightStateValuesValidationHelper() : RevealStatesPage
  • HoverModeAutomationId : ButtonInteractionTests
  • hScrollBarVisual : ScrollPresenterExpressionAnimationSourcesPage
  • hScrollIndicatorSpriteVisual : ScrollPresenterExpressionAnimationSourcesPage
  • hScrollIndicatorVisual : ScrollPresenterExpressionAnimationSourcesPage
  • Hsv() : Hsv
  • HsvColor() : ColorSpectrumProperties
  • HsvColorProperty() : ColorSpectrumProperties
  • HSVComboBoxItemAutomationId : ColorPickerTests
  • HsvTextBoxChanged : ColorPicker
  • HtmlDropdownTest() : WebView2Tests
  • HueLabelAutomationId : ColorPickerTests
  • HueTextBoxAutomationId : ColorPickerTests
  • HyperlinkIsOffscreenTest() : CommonStylesTests
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- i -

  • Icon : RevealScenarioItem , RevealItem , Category , NavigationViewItemPresenterProperties , SelectorBarItemProperties , NavigationViewItemProperties , SelectorBarItemProperties
  • icon : RefreshVisualizerPage
  • Icon : Category , NavigationViewItemProperties , NavigationViewItemPresenterProperties
  • iconComboBox : TeachingTipTestPageElements
  • IconComboBox_SelectionChanged() : InfoBarPage
  • IconComboBoxSelectionChanged() : InfoBadgePage
  • IconElement() : InfoBadgeTemplateSettingsProperties , InfoBarTemplateSettingsProperties , TabViewItemTemplateSettingsProperties , TeachingTipTemplateSettingsProperties , TitleBarTemplateSettingsProperties , InfoBadgeTemplateSettingsProperties
  • IconElementProperty() : InfoBadgeTemplateSettingsProperties , InfoBarTemplateSettingsProperties , TabViewItemTemplateSettingsProperties , TeachingTipTemplateSettingsProperties , TitleBarTemplateSettingsProperties
  • iconForegroundBrush : InfoBadgePage
  • IconOptions : TeachingTipTestPageElements
  • IconProperty() : NavigationViewItemProperties , NavigationViewItemPresenterProperties , SelectorBarItemProperties
  • IconSource : AnimatedIconHost , ToggleAnimatedIconHost , TabDataItem , InfoBadgeProperties , InfoBarProperties , SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties
  • IconSourceChanged() : AnimatedIconHost , ToggleAnimatedIconHost
  • IconSourceProperty : AnimatedIconHost , ToggleAnimatedIconHost , InfoBadgeProperties , InfoBarProperties , SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties
  • IconWidth() : NavigationViewItemPresenterTemplateSettingsProperties
  • IconWidthProperty() : NavigationViewItemPresenterTemplateSettingsProperties
  • Id : GroupedListViewBaseItem , Picture , MapElement , MapLayer , Recipe , Person , GroupedItemsControlItem
  • IdleStateEntered() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • IdleStatusChanged() : SwipeTestHooks , TeachingTipTestHooks
  • IgnoreAreEffectsFast() : MaterialHelperBase , MaterialHelperTestApi
  • IgnoredInputKinds() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenter , ScrollView
  • IgnoredInputKindsProperty() : ScrollPresenterProperties , ScrollViewProperties
  • IgnorePointerId() : AnnotatedScrollBar , BreadcrumbBarItem , NavigationViewItem , NavigationViewItemPresenter
  • image : ImageIRefreshInfoProviderAdapter
  • Image() : RatingItemImageInfoProperties
  • Image_ImageFailed() : ImagePage , ItemsViewIntegrationPage , ItemsViewSummaryPage
  • Image_ImageOpened() : ImagePage , ItemsViewIntegrationPage , ItemsViewSummaryPage
  • ImageBtn_Click() : PersonPicturePage
  • ImageIcon() : ImageIcon
  • ImageIconPage() : ImageIconPage
  • ImageIconProperties() : ImageIconProperties
  • ImageIconSourceProperties() : ImageIconSourceProperties
  • ImageIconSourceTest() : IconSourceApiTests
  • ImageIconTest() : ImageIconTests
  • imageIndex : ImagePage
  • ImageInfoValidation() : RatingControlTests
  • ImageIRefreshInfoProviderAdapter() : ImageIRefreshInfoProviderAdapter
  • ImageLoading() : PersonPictureTests
  • ImagePage() : ImagePage
  • ImagePage_Loaded() : ImagePage
  • ImageProperty() : RatingItemImageInfoProperties
  • ImageSource : RevealGridItem , ImageIconSourceProperties
  • ImageSourceProperty() : ImageIconSourceProperties
  • imageUri : PersonPicturePage
  • ImageUri : Recipe
  • ImageWithConstrainedHeight() : ScrollPresenterTests
  • ImageWithConstrainedSize() : ScrollPresenterTests
  • ImageWithConstrainedWidth() : ScrollPresenterTests
  • ImageWithUnnaturalSize() : ScrollPresenterTests
  • Impl() : event_base< ImplT, T, StorageT > , ReferenceTrackerStorageHelper< ImplT, T >
  • IMPLEMENT_TELEMETRY_CLASS() : final
  • Implement_Vector() : VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
  • Implement_Vector_Read() : TreeViewNodeVector , SelectedTreeNodeVector , SelectedItemsVector
  • ImpulseInfluence() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • InArrange : ViewportTests::TestScrollingSurface
  • IncludesItemIndex() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • IncreaseNumberOfPagesButton : PagerControlTestPageElements
  • IncreaseNumberOfPagesButtonClicked() : PagerControlPage
  • IncreaseScrollButton_Click() : TabViewTabClosingBehaviorPage
  • IncrementAndCheckFailedToAttachLightsCount() : MaterialHelper
  • IncrementDeferralCount() : RefreshRequestedEventArgs , TeachingTipClosingEventArgs
  • IncrementNumberOfPages() : PagerControlTestBase
  • IncrementRepeatButton_Click() : CompositionScrollController
  • Indent() : ItemsRepeater , LayoutContext
  • Indentation() : TreeViewItemTemplateSettingsProperties
  • IndentationProperty() : TreeViewItemTemplateSettingsProperties
  • IndeterminateSource() : ProgressRingProperties
  • IndeterminateSourceProperty() : ProgressRingProperties
  • index : CustomContent
  • Index : EffectBase::NamedProperty , MockItemsSource::GetAtCallInfo , MockItemsSource::KeyFromIndexCallInfo , MockElementFactory::GetElementCallInfo , WinRTCollection::VectorChangedEventArgs , InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs , ItemCollectionTransitionProviderTests::CallInfo , BreadcrumbBarItemClickedEventArgs , VectorChangedEventArgs , ElementFactoryGetArgsDownlevel , ItemsRepeaterElementPreparedEventArgs , VirtualizationInfo
  • IndexBasedLayoutOrientation() : Layout
  • IndexFromContainer() : TabView
  • IndexFromIndexInOriginalVector() : SplitVector< T, SplitVectorID >
  • IndexFromKey() : CustomItemsSourceWithUniqueId , CustomItemsSourceViewWithUniqueIdMapping , MockItemsSourceWithUniqueIdMapping , ReadOnlyNotifyPropertyChangedCollection-g< T > , InspectingDataSourceTests::ObservableVectorWithUniqueIds , IKeyIndexMapping , ItemsSourceView , MyCollection
  • IndexFromKeyCore() : CustomItemsSourceViewWithUniqueIdMapping , InspectingDataSource , ItemsSourceView
  • IndexInParent() : TreeViewList
  • IndexOf() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitVector< T, SplitVectorID > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , ItemsSourceView , SelectedItems< T > , MyCollection , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems , ViewModel
  • IndexOf_OptimizedForRemove() : VectorInnerImpl< VectorOptions, Wrapper > , SelectedTreeNodeVector , SelectedItemsVector
  • IndexOfCore() : InspectingDataSource , ItemsSourceView
  • IndexOfImpl() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • IndexOfNextSibling() : ViewModel
  • IndexOfNode() : ViewModel
  • IndexPath() : IndexPath , final
  • IndexRange() : IndexRange
  • IndexToIndexInOriginalVector() : SplitVector< T, SplitVectorID >
  • IndexToSelectTextBlock : RadioButtonsTestPageElements
  • IndexToSelectTextBox1 : RadioButtonsFocusTestPageElements
  • IndexToSelectTextBox2 : RadioButtonsFocusTestPageElements
  • Indicator_SizeChanged() : ProgressBarPage , ProgressBarReTemplatePage
  • IndicatorLengthDelta() : ProgressBarTemplateSettingsProperties
  • IndicatorLengthDeltaProperty() : ProgressBarTemplateSettingsProperties
  • InertiaDecayRate() : OffsetsChangeWithAdditionalVelocity , ScrollControllerAddScrollVelocityRequestedEventArgs , ZoomFactorChangeWithAdditionalVelocity
  • InertiaStateEntered() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • Influence() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • InfoBadge() : NavigationViewItemProperties , NavigationViewItemPresenterProperties , InfoBadge
  • InfoBadgeCornerRadius() : InfoBadgeTemplateSettingsProperties
  • InfoBadgeCornerRadiusProperty() : InfoBadgeTemplateSettingsProperties
  • InfoBadgeDisplayKindTest() : InfoBadgeTests
  • InfoBadgePage() : InfoBadgePage
  • InfoBadgeProperties() : InfoBadgeProperties
  • InfoBadgeProperty() : NavigationViewItemProperties , NavigationViewItemPresenterProperties
  • InfoBadgeSupportsAllIconTypes() : InfoBadgeTests
  • InfoBadgeTemplateSettings() : InfoBadgeTemplateSettings
  • InfoBadgeTemplateSettingsProperties() : InfoBadgeTemplateSettingsProperties
  • InfoBadgeValueLessThanNegativeOneCrashes() : InfoBadgeTests
  • InfoBar() : InfoBar
  • InfoBarAutomationPeer() : InfoBarAutomationPeer
  • InfobarAxeTestage() : InfobarAxeTestage
  • InfoBarPage() : InfoBarPage
  • InfoBarPanelProperties() : InfoBarPanelProperties
  • InfoBarProperties() : InfoBarProperties
  • InfoBarTemplateSettings() : InfoBarTemplateSettings
  • InfoBarTemplateSettingsProperties() : InfoBarTemplateSettingsProperties
  • InfoProvider() : RefreshVisualizer
  • infoProvider : AnimationHandler , ImageIRefreshInfoProviderAdapter
  • InfoProvider_RefreshCompleted() : ImageIRefreshInfoProviderAdapter
  • InfoProvider_RefreshStarted() : ImageIRefreshInfoProviderAdapter
  • infoProviderOffsetAnimation : AnimationHandler
  • InfoProviderProperty() : RefreshVisualizerProperties
  • infoProviderRefreshCompletedAnimation : AnimationHandler
  • infoProviderRefreshRequestedAnimation : AnimationHandler
  • infoProviderVisual : AnimationHandler
  • Ingredient() : Ingredient
  • Ingredients : ListViewBackgroundPage , ListViewHeaderPage , ListViewItemPage , VirtualizingStackPanelPage
  • Init() : NavigationViewItemHelper< T >
  • InitialControls() : InkToolBarProperties , InkToolBar
  • InitialControlsProperty() : InkToolBarProperties
  • Initialize() : BreadcrumbBarItem , ColorSpectrum , ColorPickerSlider , XamlMetadataProvider , DropDownButton , Expander , SelectionModelChildrenRequestedEventArgs
  • InitializeBreadcrumbAndChildren() : BreadcrumbBarPage
  • InitializeButtonWithProperties() : TextCommandBarFlyout
  • InitializeButtonWithUICommand() : TextCommandBarFlyout
  • InitializeCollection() : MyCollection
  • InitializeColor() : ColorPicker
  • InitializeDataBindingSampleData() : TabViewTabItemsSourcePage
  • InitializeForContext() : FlowLayoutAlgorithm , FlowLayoutState , Layout , StackLayoutState , UniformGridLayoutState
  • InitializeForContextCore() : FlowLayoutDerived , FlowLayout , LinedFlowLayout , NonVirtualizingLayout , StackLayout , Flex , ActivityFeedLayout , UniformGridLayout , VirtualizingLayout
  • InitializeForRelayout() : LinedFlowLayout
  • InitializeImpl() : RevealHoverLight
  • InitializeInteractionTracker() : SwipeControl
  • InitializeItemsSource_Click() : TreeViewLateDataInitTest
  • InitializeSampleTreeView() : VisualPropertiesPage
  • InitializeSplitVectors() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • InitializeUIFromScrollPresenter() : ScrollPresenterChainingAndRailingPage
  • InitializeUIFromScrollViewer() : ScrollPresenterChainingAndRailingPage
  • InitializeWebMap() : MapControl
  • InitializingColor : ColorPicker
  • InitialPanePriorityTest() : TwoPaneViewTests
  • Initials : PersonPicturePage::SportsPerson , PersonInfo , PersonPictureProperties
  • InitialSetValue() : RatingControlProperties
  • InitialSetValueProperty() : RatingControlProperties
  • InitialsFromContactObject() : InitialsGenerator
  • InitialsFromDisplayName() : InitialsGenerator
  • InitialsProperty() : PersonPictureProperties
  • initialTabsCount : TabViewTabItemsSourcePage
  • InitialTextBox_TextChanged() : PersonPicturePage
  • InitProvider() : WebView2AutomationPeer
  • InkCanvas() : InkCanvas
  • InkCanvasAutomationPeer() : InkCanvasAutomationPeer
  • InkCanvasProperties() : InkCanvasProperties
  • InkDrawingAttributes() : InkToolBarProperties , InkToolBar
  • InkDrawingAttributesChanged() : InkToolBarProperties
  • InkDrawingAttributesProperty() : InkToolBarProperties
  • InkPresenter() : InkCanvas
  • InkToolBarAutomationPeer() : InkToolBarAutomationPeer
  • InkToolBarCustomPenButtonProperties() : InkToolBarCustomPenButtonProperties
  • InkToolBarCustomToolButtonProperties() : InkToolBarCustomToolButtonProperties
  • InkToolBarEraserButtonProperties() : InkToolBarEraserButtonProperties
  • InkToolBarFlyoutItemAutomationPeer() : InkToolBarFlyoutItemAutomationPeer
  • InkToolBarFlyoutItemProperties() : InkToolBarFlyoutItemProperties
  • InkToolBarMenuButtonAutomationPeer() : InkToolBarMenuButtonAutomationPeer
  • InkToolBarMenuButtonProperties() : InkToolBarMenuButtonProperties
  • InkToolbarPage() : InkToolbarPage
  • InkToolBarPenButtonProperties() : InkToolBarPenButtonProperties
  • InkToolBarPenConfigurationControlProperties() : InkToolBarPenConfigurationControlProperties
  • InkToolBarProperties() : InkToolBarProperties
  • InkToolBarStencilButtonProperties() : InkToolBarStencilButtonProperties
  • InkToolbarTest() : CommonStylesTests
  • InkToolBarToolButtonAutomationPeer() : InkToolBarToolButtonAutomationPeer
  • InkToolBarToolButtonProperties() : InkToolBarToolButtonProperties
  • InMeasure : ViewportTests::TestScrollingSurface
  • Inner
: CustomItemsSource
, CollectionChangeDemo::MyDataSource
, ScrollPresenterTests::TestDataSource
, ScrollPresenterBringIntoViewPage::SampleDataSource
, ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • inner : MyCollection
  • InnerConeAngleInDegrees : RevealBorderSpotlightStateDesc
  • InnerConeColor : RevealHoverSpotlightStateDesc , RevealBorderSpotlightStateDesc
  • InnerConeIntensity : RevealHoverSpotlightStateDesc
  • innerListView : TabViewTabItemsSourcePage
  • InPostArrange : ViewportTests::TestScrollingSurface
  • InputEaterGridTapped() : SwipeControl
  • InputScope() : NumberBoxProperties
  • InputScope_Changed() : NumberBoxPage
  • InputScopeProperty() : NumberBoxProperties
  • Insert() : HashMap< K, V > , CustomItemsSource , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , final , CollectionChangeDemo::MyDataSource , MyCollection , ScrollPresenterTests::TestDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ScrollPresenterStackPanelAnchoringPage
  • Insert_Click() : VirtualizingUniformStackLayoutSamplePage
  • insert_Click() : FlatSample , TreeViewSample
  • InsertAndRemoveItems() : ItemsViewTestsWithInputHelper
  • InsertAt() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitVector< T, SplitVectorID > , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • InsertAt_NoContainsCheck() : SelectedItemsVector
  • InsertAtCore_NoContainsCheck() : SelectedTreeNodeVector
  • InsertAtStartBehavior() : RepeaterTests
  • InsertButtonClick() : RefreshVisualizerPage
  • InsertChild() : LinedFlowLayoutDemo
  • InsertDisabledRadioButton() : RadioButtonsTests
  • InsertDisplayRadioButtonButton : RadioButtonsTestPageElements
  • InsertDisplayRadioButtonButton_Click() : RadioButtonsPage
  • InsertedCheckedRadioButtonGetsSelection() : RadioButtonsTests
  • InsertEnabledRadioButton() : RadioButtonsTests
  • InsertGridButtonClick() : RefreshVisualizerPage
  • InsertItem() : ItemsViewInteractiveTestsPage
  • InsertRadioButton() : RadioButtonsTests
  • InsertStackPanelChild() : ScrollPresenterTests
  • InsertVisual() : AnimatedIcon
  • InsetClip_0() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • Instance() : LifetimeHandler
  • InstantiateFlyout() : BreadcrumbBarItem
  • Intensity() : ISepiaEffect
  • InteractingStateEntered() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • Interaction : ButtonInteractionPage
  • interactionAnimationNeedsUpdating : AnimationHandler
  • InteractionChainingModeFromChainingMode() : ScrollPresenter
  • InteractionOnImageTest() : RefreshContainerTests
  • InteractionOnImageTestPrivate() : RefreshContainerTests
  • InteractionOnImageWithInfoProviderTest() : RefreshContainerTests
  • InteractionRatio() : RefreshInteractionRatioChangedEventArgs
  • InteractionRatioChanged : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , IRefreshInfoProvider , RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • interactionRatioChangedCount : RefreshInfoProviderImplementation
  • InteractionRatioCompositionProperty : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • interactionRatioName : RefreshInfoProviderImplementation
  • InteractionSourceModeFromScrollMode() : ScrollPresenter
  • InteractionSourceModeFromZoomMode() : ScrollPresenter
  • InteractionSources() : ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
  • InteractionSourcesChanged() : ScrollPresenterTestHooks
  • InteractionState() : TeachingTipAutomationPeer
  • interactionTracker : AnimationHandler , ImageIRefreshInfoProviderAdapter
  • InteractionTrackerAnimation() : AnimationHandler , IAdapterAnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • InteractionTrackerAsyncOperation() : InteractionTrackerAsyncOperation
  • InteractionTrackerOwner() : InteractionTrackerOwner
  • InteractionTrigger() : ItemContainerInvokedEventArgs
  • InteractiveControlsVisible() : MapControlProperties
  • InteractiveControlsVisibleProperty() : MapControlProperties
  • InternalIsChecked() : SplitButton , ToggleSplitButton
  • InterpolationMode() : ITransform2DEffect
  • InterpolationSpace() : RadialGradientBrushProperties
  • InterpolationSpaceProperty() : RadialGradientBrushProperties
  • InterruptOffsetsChangeWithOffsetsChange() : ScrollPresenterTests
  • InterruptOffsetsChangeWithZoomFactorChange() : ScrollPresenterTests
  • InterruptViewChange() : ScrollPresenterTests
  • InterruptViewChangeWithUnloading() : ScrollPresenterTests
  • InterruptZoomFactorChangeWithOffsetsChange() : ScrollPresenterTests
  • InterruptZoomFactorChangeWithZoomFactorChange() : ScrollPresenterTests
  • Intersects() : final , IndexRange , VirtualizingStackLayout
  • Interval() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • IntProperty : CustomSelectionModel
  • IntValue : ListViewBasePage::QueuedOperation , ItemsViewSummaryPage::QueuedOperation
  • invalid() : Awaitable::PTP_WAIT_traits
  • InvalidAPIVersion : PlatformConfiguration
  • Invalidate() : HandlePolicy
  • InvalidateArrange() : Layout
  • InvalidateArrangeForLayout() : LayoutPanel , ItemsRepeater
  • InvalidateBrush() : MonochromaticOverlayPresenter
  • InvalidateElementSize() : UniformGridLayoutState
  • InvalidateItemsInfo() : LinedFlowLayout
  • InvalidateLayout() : FlowLayout , LinedFlowLayout , StackLayout , UniformGridLayout
  • InvalidateMeasure() : MockNonVirtualizingLayout , MockStackLayout , MockVirtualizingLayout , Layout
  • InvalidateMeasureAsync() : LinedFlowLayout
  • InvalidateMeasureForLayout() : LayoutPanel , ItemsRepeater
  • InvalidateMeasureTimerStart() : LinedFlowLayout
  • InvalidateMeasureTimerStop() : LinedFlowLayout
  • InvalidateMeasureTimerTick() : LinedFlowLayout
  • InvalidateRealizedIndicesHeldByLayout() : final
  • InvalidateTopNavPrimaryLayout() : NavigationView
  • InvalidationTrigger() : LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
  • InvalidRect : ItemsRepeater
  • InvalidWidthCache() : TopNavigationViewDataProvider
  • InvertSelection() : ItemsView
  • Invoke() : BreadcrumbBarItemAutomationPeer , BreadcrumbBarItem , GenericInkCallback , ItemContainerAutomationPeer , MenuBarItem , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , SplitButton , SplitButtonAutomationPeer , CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
  • InvokeAndWait() : BreadcrumbBarItem
  • InvokeCallback() : CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
  • InvokeCountTextBlockAutomationId : ButtonInteractionTests
  • Invoked() : ButtonInteractionProperties , SwipeItemProperties
  • InvokedItem() : ItemsViewItemInvokedEventArgs , NavigationViewItemInvokedEventArgs , TreeViewItemInvokedEventArgs
  • InvokedItemContainer() : NavigationViewItemInvokedEventArgs
  • InvokeDropDownItemTest() : BreadcrumbTests
  • InvokeEllipsisItem() : BreadcrumbTests
  • InvokeEllipsisItemTest() : BreadcrumbTests
  • InvokeItem() : RadioMenuFlyoutItemTests
  • InvokeMode() : ButtonInteraction
  • InvokeModeComboBoxAutomationId : ButtonInteractionTests
  • InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement() : NavigationViewTestsBase
  • InvokeOverflowButton() : NavigationViewTestsBase
  • InvokeScrollViewScrollToButton() : ItemsViewTestsWithInputHelper
  • InvokeScrollViewZoomToButton() : ItemsViewTestsWithInputHelper
  • InvokeSubItem() : RadioMenuFlyoutItemTests
  • InvokeSwipe() : SwipeItem
  • InvokeWorkFunc() : WorkInfo
  • IsActive() : ProgressRingProperties
  • IsActiveProperty() : ProgressRingProperties
  • IsAddTabButtonVisible() : TabViewProperties
  • IsAddTabButtonVisibleProperty() : TabViewProperties
  • IsAlphaEnabled() : ColorPickerProperties
  • IsAlphaEnabledProperty() : ColorPickerProperties
  • IsAlphaSliderVisible() : ColorPickerProperties
  • IsAlphaSliderVisibleProperty() : ColorPickerProperties
  • IsAlphaTextInputVisible() : ColorPickerProperties
  • IsAlphaTextInputVisibleProperty() : ColorPickerProperties
  • IsAmbientLightSet() : RevealBrushTestApi
  • IsAncestor() : SharedHelpers
  • IsAnchoring() : ScrollPresenter
  • IsAnchorRatioValid() : ScrollPresenter
  • IsAnimated() : InteractionTrackerAsyncOperation
  • IsAnimatedVisualLoaded() : AnimatedVisualPlayerProperties
  • IsAnimatedVisualLoadedProperty() : AnimatedVisualPlayerProperties
  • isAnimatingThumbOffset : CompositionScrollControllerPanningInfo
  • IsAnimatingThumbOffset : CompositionScrollControllerPanningInfo , CompositionScrollController
  • IsAnimationsEnabled() : SharedHelpers
  • IsAnimationsEnabledOverride() : ScrollPresenterTestHooks
  • IsApiContractPresent() : PlatformConfiguration
  • IsApplicationViewGetDisplayRegionsAvailable() : SharedHelpers
  • IsArray() : XamlTypeBase
  • IsAttachable() : XamlMember
  • IsBackButtonVisible() : NavigationViewProperties , TitleBarProperties
  • IsBackButtonVisibleCheckBox_CheckedChanged() : TitleBarPageWindow
  • IsBackButtonVisibleProperty() : NavigationViewProperties , TitleBarProperties
  • IsBackEnabled() : NavigationViewProperties , TitleBarProperties
  • IsBackEnabledCheckBox_CheckedChanged() : TitleBarPageWindow
  • IsBackEnabledProperty() : NavigationViewProperties , TitleBarProperties
  • IsBeingDragged() : TabViewItem
  • IsBindable() : XamlTypeBase
  • isBindable : VectorFlagHelper< flag >
  • IsBorder : MaterialHelperBase
  • IsBorderLightSet() : RevealBrushTestApi
  • IsBringIntoViewOptionsVerticalAlignmentRatioAvailable() : SharedHelpers
  • IsButtonInPrimaryCommands() : TextCommandBarFlyout
  • IsButtonVisible() : PipsPagerPage
  • IsCanceled() : InteractionTrackerAsyncOperation
  • IsCancelingNavigationKey() : ItemsView
  • IsChecked() : InkToolBarFlyoutItemProperties , RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties , InkToolBarFlyoutItem
  • IsCheckedChanged() : ToggleSplitButtonProperties , RadioMenuFlyoutItemPage
  • IsCheckedProperty() : InkToolBarFlyoutItemProperties , RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties
  • IsChildSelected() : NavigationViewItemProperties
  • IsChildSelectedProperty() : NavigationViewItemProperties
  • IsClearAllVisible() : InkToolBarEraserButtonProperties , InkToolBarEraserButton
  • IsClearAllVisibleProperty() : InkToolBarEraserButtonProperties
  • IsCleared : PhasingTests::ElementPhasingManager
  • IsClearEnabled() : RatingControlProperties
  • IsClearEnabledProperty() : RatingControlProperties
  • IsClosable() : InfoBarProperties , TabViewItemProperties
  • IsClosableCheckBox_CheckChanged() : TabViewPage
  • IsClosableProperty() : InfoBarProperties , TabViewItemProperties
  • IsClosableTest() : InfoBarTests , TabViewTests
  • IsCollection() : XamlTypeBase
  • IsColorChannelTextInputVisible() : ColorPickerProperties
  • IsColorChannelTextInputVisibleProperty() : ColorPickerProperties
  • IsColorPreviewVisible() : ColorPickerProperties
  • IsColorPreviewVisibleProperty() : ColorPickerProperties
  • IsColorSliderVisible() : ColorPickerProperties
  • IsColorSliderVisibleProperty() : ColorPickerProperties
  • IsColorSpectrumVisible() : ColorPickerProperties
  • IsColorSpectrumVisibleProperty() : ColorPickerProperties
  • IsCompleted() : InteractionTrackerAsyncOperation
  • IsConstructible() : XamlTypeBase
  • IsContainerNavigationViewHeader() : TopNavigationViewDataProvider
  • IsContainerNavigationViewItem() : TopNavigationViewDataProvider
  • IsContainerTheSelectedItemInTheSelectionModel() : NavigationView
  • IsContentMode() : TreeViewList , TreeViewNode , ViewModel
  • IsControlFocusable() : CommandBarFlyoutCommandBar
  • IsCoreWindowActivationModeAvailable() : SharedHelpers
  • IsCorrectPeerForHwnd() : WebView2AutomationPeer
  • IScrollControllerAdapter() : IScrollControllerAdapter
  • IsCurrentPlay() : AnimatedVisualPlayer::final
  • IsDataIndexRealized() : final
  • IsDataIndexValid() : VirtualizingStackLayout
  • IsDebugBuildConfiguration() : PlatformConfiguration
  • IsDebuggerPresent() : ScrollViewTests
  • IsDelayed() : InteractionTrackerAsyncOperation
  • isDependencyObjectBase : VectorFlagHelper< flag >
  • IsDependencyProperty() : XamlMember
  • isDetailLabelEnabled_Checked() : AnnotatedScrollBarSummaryPage
  • isDetailLabelEnabled_Unchecked() : AnnotatedScrollBarSummaryPage
  • IsDevice() : PlatformConfiguration
  • IsDictionary() : XamlTypeBase
  • IsDirectionalKey() : TreeViewItem
  • IsDisabledTabVisibleCheckBox_CheckChanged() : TabViewPage
  • IsEdgeAlreadyInstalling() : WebView2Tests
  • IsElementValidAnchor() : ScrollPresenter
  • IsEllipsisDropDownItem() : BreadcrumbBarItem
  • IsEmpty() : LinedFlowLayoutItemAspectRatios
  • isEnabled : CanvasScrollControllerConsumer
  • IsEnabled : CanvasScrollControllerConsumer , ScrollBarController , InkCanvasProperties
  • IsEnabledComboBox_SelectionChanged() : ItemContainerSummaryPage
  • IsEnabledProperty() : InkCanvasProperties
  • IsEqual() : SimpleVerify
  • IsExpandCollapse() : TreeViewItem
  • IsExpanded : TreeViewItemSource , ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties
  • IsExpandedIsProperlyPreservedDuringItemRecycling() : TreeViewTests
  • IsExpandedProperty() : ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties
  • IsExpressionAnimationStarted : ExpressionAnimationStatusChange , ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
  • IsExtensionGlyphShown() : InkToolBarMenuButtonProperties , InkToolBarToolButtonProperties , InkToolBarMenuButton , InkToolBarToolButton
  • IsExtensionGlyphShownProperty() : InkToolBarMenuButtonProperties , InkToolBarToolButtonProperties
  • isFarOpenPropertyName() : SwipeControl
  • IsFastPathSupportedDbg() : LinedFlowLayout
  • IsFixedSize : CustomItemsSourceView , MyCollection
  • IsFlatIndexValid() : TreeViewList
  • IsFlyoutOpen() : DropDownButton , MenuBar , MenuBarItem , SplitButton
  • IsFocusable() : TabView
  • IsFocusableElement() : SharedHelpers
  • IsFocusMessage() : WebView2BasicPage
  • IsFullScreenOrTabletMode() : NavigationView
  • IsFullScreenOrTabletModeImpl() : MaterialHelper
  • IsGamepadNavigationDirection() : FocusHelper
  • IsGamepadPageNavigationDirection() : FocusHelper
  • IsGroup() : PersonPictureProperties
  • IsGroupProperty() : PersonPictureProperties
  • IsHeldByLayout() : VirtualizationInfo
  • IsHexInputVisible() : ColorPickerProperties
  • IsHexInputVisibleProperty() : ColorPickerProperties
  • IsHorizontallyScrollable : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , ScrollPresenter
  • isHorizontalPropertyName() : SwipeControl
  • IsHorizontalScrollControllerRequest() : InteractionTrackerAsyncOperation
  • IsHorizontalShiftClamped() : ParallaxViewProperties
  • IsHorizontalShiftClampedProperty() : ParallaxViewProperties
  • IsHovering() : ButtonInteraction
  • IsHoveringTextBlockAutomationId : ButtonInteractionTests
  • IsHoverLightSet() : RevealBrushTestApi
  • IsIconVisible() : InfoBarProperties
  • IsIconVisibleProperty() : InfoBarProperties
  • isIdleCheckBox : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • IsInBounds() : NumberBox , ProgressRing
  • IsInContentMode() : TreeViewPage , TreeViewItem
  • IsInDesignMode() : SharedHelpers
  • IsInDesignModeV1() : SharedHelpers
  • IsInDesignModeV2() : SharedHelpers
  • IsIndeterminate() : ProgressRingProperties , ProgressBarProperties , ProgressRingProperties
  • IsIndeterminateProperty() : ProgressBarProperties , ProgressRingProperties
  • IsIndexValid() : TreeViewList
  • IsIndexValidInData() : final
  • IsInertiaFromImpulse() : ScrollPresenter
  • IsInFallbackMode() : AcrylicBrush , RevealBrush , RevealBrushTestApi
  • IsInFrameworkPackage() : SharedHelpers
  • IsInitialized() : MUXControlsFactory
  • IsInMultipleRegions() : TwoPaneView
  • IsInNavigationViewOwnedRepeater() : NavigationViewItemBase
  • IsInnerLayoutGrid : AnimationsDemoPage::AnimationElementFactory
  • IsInPinnedPool() : VirtualizationInfo
  • IsInputKindIgnored() : ScrollPresenter , ScrollView
  • IsInReorderMode() : TreeViewItem
  • IsInSingleSelectionMode() : ViewModel
  • IsInteractingForRefresh() : RefreshInfoProviderImpl
  • isInteractingForRefresh : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • IsInteractingForRefresh : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • IsInteractingForRefreshChanged : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , IRefreshInfoProvider , RefreshInfoProviderImpl
  • IsInUniqueIdResetPool() : VirtualizationInfo
  • IsInverted : MaterialHelperBase
  • IsItemContainerSelected() : ItemContainerTests
  • IsItemInfoPresentAndFontInfo() : RatingControl
  • IsItemInfoPresentAndImageInfo() : RatingControl
  • IsItemInPrimaryList() : TopNavigationViewDataProvider
  • IsItemInTopNavPrimaryList() : NavigationViewTestsBase
  • IsItemInvokedEnabled() : ItemsViewProperties
  • IsItemInvokedEnabledProperty() : ItemsViewProperties
  • IsItemItsOwnContainerOverride() : TabViewListView
  • IsItemSelectableInPrimaryList() : TopNavigationViewDataProvider
  • IsItemsLayoutContractionWorthy() : LinedFlowLayout
  • IsItemsLayoutEqualizationWorthy() : LinedFlowLayout
  • IsItemsLayoutExpansionWorthy() : LinedFlowLayout
  • IsKeyboardFocusableCore() : ExpanderAutomationPeer
  • IsLayoutOrientationIndexBased() : ItemsView
  • IsLeftNavTest : RegressionTestScenario
  • IsLeftToRightChecked() : AnimatedIconPage
  • IsLeftToRightUnchecked() : AnimatedIconPage
  • IsLightDismissEnabled() : TeachingTipProperties
  • isLightDismissEnabledButton : TeachingTipTestPageElements
  • isLightDismissEnabledCheckBox : TeachingTipFocusTestPageElements
  • isLightDismissEnabledComboBox : TeachingTipTestPageElements
  • IsLightDismissEnabledProperty() : TeachingTipProperties
  • IsLightDismissible() : NavigationView
  • IsLoadedAndSetUp() : ScrollPresenter
  • IsLockedItem() : LinedFlowLayout
  • IsLogging : CanvasScrollControllerConsumer , ScrollBarController
  • isLoggingMessages : ScrollPresenterExpressionAnimationSourcesPage
  • IsMarkupExtension() : XamlTypeBase
  • IsModal() : TeachingTipAutomationPeer
  • IsMoreButtonVisible() : ColorPickerProperties
  • IsMoreButtonVisibleProperty() : ColorPickerProperties
  • IsMouseButtonPressed() : PointerInfo< T >
  • IsMouseModeEnabled() : SharedHelpers
  • IsMousePointerOver() : PointerInfo< T >
  • IsMultiselect() : TreeViewListAutomationPeer , TreeViewList
  • IsMultiSelectCheckBoxChecked() : TreeViewTests
  • IsMultiSelectComboBox_SelectionChanged() : ItemContainerSummaryPage
  • IsMutiSelectWithSelectedItems() : TreeViewList
  • IsNavigationKey() : ItemsView
  • IsNavigationViewListSingleSelectionFollowsFocus() : NavigationView
  • isNearContentPropertyName() : SwipeControl
  • isNearOpenPropertyName() : SwipeControl
  • IsNodeSelected() : ViewModel
  • isNoTrackerRef : VectorFlagHelper< flag >
  • isObservable : VectorFlagHelper< flag >
  • IsOnFooterNavigation() : NavigationViewItemAutomationPeer
  • IsOnLeftNav() : NavigationViewItem
  • IsOnThread() : ReferenceTracker< D, ImplT, I >
  • IsOnTopNavigation() : NavigationViewItemAutomationPeer
  • IsOnTopNavigationOverflow() : NavigationViewItemAutomationPeer
  • IsOnTopPrimary() : NavigationViewItem
  • IsOnXbox() : SharedHelpers
  • IsOnXboxAndNotMouseMode() : RevealBrush
  • IsOpen() : InfoBarProperties , TeachingTipProperties
  • IsOpenChangedToClose() : TeachingTip
  • IsOpenChangedToOpen() : TeachingTip
  • isOpenCheckBox : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • IsOpenProperty() : InfoBarProperties , TeachingTipProperties
  • IsOrientationVertical() : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler , AnimationHandler , ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter
  • IsOsVersion() : PlatformConfiguration
  • IsOsVersionGreaterThan() : PlatformConfiguration
  • IsOsVersionGreaterThanOrEqual() : PlatformConfiguration
  • IsOSVersionLessThan() : PlatformConfiguration
  • IsOutOfControlBounds() : NavigationViewItem , PipsPager
  • IsOutOfVerticalGridBounds() : AnnotatedScrollBar
  • IsOutsideDragRectangle() : TabViewItem
  • IsOverlay() : NavigationView
  • IsPageRTL : TeachingTipPage
  • IsPaneFooterVisibleCheckBox_CheckedChanged() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage
  • IsPaneOpen() : NavigationViewProperties
  • IsPaneOpenProperty() : NavigationViewProperties
  • IsPaneToggleButtonVisible() : NavigationViewProperties , TitleBarProperties
  • IsPaneToggleButtonVisibleCheckbox_CheckedChanged() : TitleBarPageWindow
  • IsPaneToggleButtonVisibleProperty() : NavigationViewProperties , TitleBarProperties
  • IsPaneToggleButtonVisibleTest() : CommonTests
  • IsPaneVisible() : NavigationViewProperties
  • IsPaneVisibleProperty() : NavigationViewProperties
  • IsPenPointerOver() : PointerInfo< T >
  • IsPhoneDevice() : TreeViewTests
  • IsPinned() : VirtualizationInfo
  • IsPlacementBottom() : TeachingTip
  • IsPlacementLeft() : TeachingTip
  • IsPlacementRight() : TeachingTip
  • IsPlacementTop() : TeachingTip
  • IsPlaying() : AnimatedVisualPlayerProperties
  • IsPlayingProperty() : AnimatedVisualPlayerProperties
  • IsPointerIdTracked() : PointerInfo< T >
  • IsPointerOver() : PointerInfo< T >
  • IsPopupOpenDown() : ComboBoxHelper , AutoSuggestBoxHelper
  • IsPressed() : PointerInfo< T >
  • IsPressing() : ButtonInteraction
  • IsPressingTextBlockAutomationId : ButtonInteractionTests
  • IsProcessingCollectionChange() : ItemsRepeater
  • IsProtractorItemVisible() : InkToolBarStencilButton , InkToolBarStencilButtonProperties , InkToolBarStencilButton
  • IsProtractorItemVisibleProperty() : InkToolBarStencilButtonProperties
  • IsPullDirectionFar() : RefreshVisualizer
  • IsPullDirectionVertical() : RefreshVisualizer
  • IsQueued() : InteractionTrackerAsyncOperation
  • IsRailEnabled() : AnnotatedScrollBarPanningInfo , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollControllerPanningInfo
  • isRailEnabled : BiDirectionalScrollController , CompositionScrollControllerPanningInfo
  • IsReadOnly() : RatingControlProperties , MyCollection , ProgressRingAutomationPeer , ColorSpectrum , ColorPickerSlider , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer , XamlMember , RatingControlProperties , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ValueProviderThunk< Owner > , RatingControlAutomationPeer
  • IsReadOnlyProperty() : RatingControlProperties
  • IsRealized() : VirtualizingStackLayout , TreeViewItem , VirtualizationInfo
  • IsReflowRequired() : FlowLayoutAlgorithm
  • IsRelativeBoundsSet() : ItemsRepeaterScrollHost::CandidateInfo
  • IsRenderingHooked : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • IsRepeaterVisible() : NavigationViewItem
  • IsResourceIdNull() : sealed< T, fallback, RawStorageT >
  • isRootGridDefaultSize : TextControlsPage
  • IsRootGridOfFlyout() : NavigationView
  • IsRootItemsRepeater() : NavigationView
  • IsRTLCheckBox_Checked() : CommandBarFlyoutPage
  • IsRTLCheckBox_Unchecked() : CommandBarFlyoutPage
  • IsRulerButtonChecked() : InkToolBar , InkToolBarProperties , InkToolBar , InkToolBarProperties
  • IsRulerButtonCheckedProperty() : InkToolBarProperties
  • IsRulerItemVisible() : InkToolBarStencilButton , InkToolBarStencilButtonProperties
  • IsRulerItemVisibleProperty() : InkToolBarStencilButtonProperties
  • IsRuntimeCompatible() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedVisual , ProgressRingDeterminate , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • IsScrollable : BiDirectionalScrollController::UniScrollController
  • isScrollable : CompositionScrollController
  • IsScrollContentPresenterIScrollInfoProvider() : ScrollInputHelper
  • IsScrollControllersSeparatorVisible() : ScrollView
  • IsScrollDecreaseButtonEnabled() : TabViewTests
  • IsScrollIncreaseButtonEnabled() : TabViewTests
  • IsScrollingWithMouse : ScrollBarController , AnnotatedScrollBar , ScrollBarController , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollController
  • IsScrollingWithMouseChanged : CompositionScrollController , ScrollBarController , BiDirectionalScrollController::UniScrollController , AnnotatedScrollBar , ScrollBarController
  • IsSelected : GroupedRepeaterItem , TreeViewItemSource , ItemContainerProperties , NavigationViewItemBaseProperties , NavigationViewItemAutomationPeer , SelectionModel , TabViewItemAutomationPeer , GroupedRepeaterItemAutomationPeer , ItemContainerAutomationPeer , ItemsView , NavigationViewItemBaseProperties , SelectionModel , TreeViewItemAutomationPeer , TreeViewList , final , SelectorBase , RepeaterItemAutomationPeer , TreeViewItemAutomationPeer , RepeaterItem , TreeViewItem
  • IsSelectedAt() : SelectionModel
  • IsSelectedComboBox_SelectionChanged() : ItemContainerSummaryPage
  • IsSelectedInternal() : TreeViewItem
  • IsSelectedProperty() : NavigationViewItemBaseProperties , TreeViewItem , ItemContainerProperties , GroupedRepeaterItem , RepeaterItem
  • IsSelectedWithPartial() : final
  • IsSelectionRequired() : ItemsViewAutomationPeer , PagerControlAutomationPeer , SelectionContainerAutomationPeer , PipsPagerAutomationPeer , TabViewAutomationPeer , NavigationViewAutomationPeer , TreeViewListAutomationPeer
  • IsSelectionSuppressed() : NavigationView
  • IsSettingsEnabledCheckbox_Checked() : PaneLayoutTestPage
  • IsSettingsEnabledCheckbox_UnChecked() : PaneLayoutTestPage
  • IsSettingsInvoked() : NavigationViewItemInvokedEventArgs
  • IsSettingsItem() : NavigationView , NavigationViewItemAutomationPeer
  • IsSettingsSelected() : NavigationViewSelectionChangedEventArgs
  • IsSettingsVisible() : NavigationViewProperties
  • IsSettingsVisibleCheckbox_CheckedChanged() : NavigationViewCompactPaneLengthTestPage
  • IsSettingsVisibleProperty() : NavigationViewProperties
  • IsSettingsVisibleTest() : CommonTests
  • IsSortDescending : SortingAndFilteringPage
  • IsStencilButtonChecked() : InkToolBarProperties , InkToolBar , InkToolBarProperties
  • IsStencilButtonCheckedChanged() : InkToolBarProperties
  • IsStencilButtonCheckedProperty() : InkToolBarProperties
  • IsStrokeEraserVisible() : InkToolBarEraserButton , InkToolBarEraserButtonProperties
  • IsStrokeEraserVisibleProperty() : InkToolBarEraserButtonProperties
  • IsSubSet() : SelectionTreeHelper
  • IsSundayBlackedOut_Checked() : CalendarViewPage
  • IsSundayBlackedOut_Unchecked() : CalendarViewPage
  • IsSynchronized : MyCollection , CustomItemsSourceView
  • IsTargetElementInSource() : ScrollInputHelper
  • IsTargetProperty() : XamlAmbientLightProperties
  • isThumbPannable : CompositionScrollControllerPanningInfo
  • IsThumbPannable : CompositionScrollController , CompositionScrollControllerPanningInfo
  • isThumbPositionMirrored : CompositionScrollControllerPanningInfo
  • IsThumbPositionMirrored : CompositionScrollControllerPanningInfo , CompositionScrollController
  • IsTitleBarAutoPaddingEnabled() : NavigationViewProperties
  • IsTitleBarAutoPaddingEnabledCheckbox_Checked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • IsTitleBarAutoPaddingEnabledCheckbox_Unchecked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • IsTitleBarAutoPaddingEnabledProperty() : NavigationViewProperties
  • IsTodayBlackedOut_Checked() : CalendarViewPage
  • IsTodayBlackedOut_Unchecked() : CalendarViewPage
  • IsTopLevelItem() : NavigationView , NavigationViewItemBase
  • IsTopmost() : TeachingTipAutomationPeer
  • IsTopNavigationView() : NavigationView
  • IsTopPrimaryListVisible() : NavigationView
  • IsTouchPointerOver() : PointerInfo< T >
  • IsTrackingPointer() : PointerInfo< T >
  • IsTransientTapTest() : WebView2BasicPage
  • IsTransientWebMessage() : WebView2BasicPage
  • IsTranslationFacadeAvailableForSwipeControl() : SwipeControl
  • IsTrue() : SimpleVerify , SharedHelpers
  • IsUnqueueing() : InteractionTrackerAsyncOperation
  • IsUsingAcrylicBrush() : AcrylicBrushTests , AcrylicTestApi
  • IsUsingRS4Style : RegressionTestScenario
  • IsValid() : AutoHandle< THandlePolicy > , HandlePolicy , IndexPath
  • IsValidIndex() : final
  • IsValidWidth() : TopNavigationViewDataProvider
  • IsValidWidthForItem() : TopNavigationViewDataProvider
  • IsVerboseLevel() : MUXControlsTestHooksLoggingMessageEventArgs
  • IsVertical : OrientationBasedMeasures
  • IsVerticallyScrollable : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , ScrollPresenter
  • IsVerticalScrollControllerRequest() : InteractionTrackerAsyncOperation
  • IsVerticalShiftClamped() : ParallaxViewProperties
  • IsVerticalShiftClampedProperty() : ParallaxViewProperties
  • IsVirtualizationEnabled() : StackLayoutProperties
  • IsVirtualizationEnabledProperty() : StackLayoutProperties
  • IsVirtualizingContext() : LinedFlowLayout , FlowLayoutAlgorithm , final
  • IsVisible() : NavigationView
  • IsVisibleBooleanAnimation_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_00() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_01() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_02() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_03() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_04() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_05() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_06() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_07() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_08() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_09() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_10() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_11() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_12() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_13() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_14() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_15() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_16() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_17() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_18() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_2() : AnimatedSettingsVisualSource_AnimatedVisual
  • IsVisibleCheckBox_CheckChanged() : ProgressBarPage
  • IsVisiblityTest() : WebView2BasicPage
  • IsW2CenterPointMessage() : WebView2BasicPage
  • IsWindowConnected() : final
  • IsWithinOffsetThreshold() : ScrollViewerIRefreshInfoProviderAdapter
  • IsWrapEnabled() : PipsPager , NumberBoxProperties
  • IsWrapEnabledProperty() : NumberBoxProperties
  • IsZoomFactorBoundaryValid() : ScrollPresenter
  • Item() : BreadcrumbBarItemClickedEventArgs , TabViewTabDragStartingEventArgs , TreeViewExpandingEventArgs , TreeViewCollapsedEventArgs , TabViewTabCloseRequestedEventArgs , TabViewTabDroppedOutsideEventArgs , TabViewTabDragCompletedEventArgs , BreadcrumbBarItemClickedEventArgs
  • Item_DragEnter() : TreeViewPage
  • ItemAspectRatioBlock() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • ItemChangedEventOnDragTest() : TabViewTests
  • itemChangeTimer : MenuFlyoutPage
  • ItemClicked() : BreadcrumbBarProperties
  • ItemCollectionTransition() : ItemCollectionTransition
  • ItemCollectionTransitionCompletedEventArgs() : ItemCollectionTransitionCompletedEventArgs
  • ItemCollectionTransitionProgress() : ItemCollectionTransitionProgress
  • ItemCollectionTransitionProviderProperties() : ItemCollectionTransitionProviderProperties
  • ItemContainer() : ItemContainer
  • ItemContainer_DragStartingLog() : ItemsViewIntegrationPage
  • ItemContainerAutomationPeer() : ItemContainerAutomationPeer
  • ItemContainerCanUserSelect() : ItemContainerTests
  • ItemContainerInvokedEventArgs() : ItemContainerInvokedEventArgs
  • ItemContainerLayoutPage() : ItemContainerLayoutPage
  • ItemContainerLayoutPage_Loaded() : ItemContainerLayoutPage
  • ItemContainerPage() : ItemContainerPage
  • ItemContainerProperties() : ItemContainerProperties
  • ItemContainerStyle() : TreeViewProperties
  • ItemContainerStyleProperty() : TreeViewProperties
  • ItemContainerStyleSelector() : TreeViewProperties
  • ItemContainerStyleSelectorProperty() : TreeViewProperties
  • ItemContainerSummaryPage() : ItemContainerSummaryPage
  • ItemContainerSummaryPage_Loaded() : ItemContainerSummaryPage
  • ItemContainerTransitions() : TreeViewProperties
  • ItemContainerTransitionsProperty() : TreeViewProperties
  • ItemCount() : VirtualizingLayoutContext
  • ItemCountCore() : LayoutContextAdapter , VirtualizingLayoutContext , RepeaterLayoutContext
  • ItemFromContainer() : TreeView , TabView
  • ItemFromNode() : TreeViewList
  • ItemHasSelectionIndicator() : NavigationViewTests
  • ItemHeight : VirtualizingUniformStackLayout , UniformGrid2DLayout , VirtualizingUniformCarouselStackLayout
  • ItemIndex() : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • ItemInfo() : RatingControlProperties
  • ItemInfoProperty() : RatingControlProperties
  • ItemInvoked() : TreeViewProperties , ItemContainerProperties , NavigationViewProperties , ItemsViewProperties , NavigationViewProperties , TreeViewProperties , ItemContainerProperties , ItemsViewProperties
  • ItemInvokedCount() : ItemsViewTestsWithInputHelper
  • ItemRangesHaveNewDesiredWidths() : LinedFlowLayout
  • Items : GroupedItemsControlViewModel
  • items : RevealGridTypeItem , RevealBackgroundItem
  • Items : GroupedListViewBaseViewModel , MenuBarItemProperties , TabViewExternalTornOutTabsDroppingEventArgs , MenuBarProperties , TreeViewViewModelItem
  • items : ItemsViewTransitionPage
  • Items() : SelectorBarProperties , TreeViewDragItemsCompletedEventArgs , TabViewTabTearOutWindowRequestedEventArgs , MenuBarItemProperties , TabViewExternalTornOutTabsDroppedEventArgs , TreeViewDragItemsStartingEventArgs , TabViewTabTearOutRequestedEventArgs , RadioButtonsProperties , MenuBarProperties , RadioMenuFlyoutItemTests , RadioButtonsProperties , TreeViewViewModel , GroupedItemsControlGroupItem , GroupedListViewBaseGroupItem
  • items : RevealGridItem , SwipeControlClearPage , SelectionModeItem
  • ItemsAccessibilitySetTest() : CommonTests
  • ItemsControlPage() : ItemsControlPage
  • ItemsInfoRequested() : LinedFlowLayoutProperties
  • ItemSize : CircleLayout
  • ItemsJustification() : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • ItemsJustificationProperty() : UniformGridLayoutProperties , LinedFlowLayoutProperties
  • ItemSourceTest() : CommonTests
  • ItemSpacing() : RatingControl , ActivityFeedLayout
  • ItemSpacingProperty : ActivityFeedLayout
  • ItemsProperty() : MenuBarItemProperties , SelectorBarProperties , MenuBarProperties , RadioButtonsProperties
  • ItemsRangeLength() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ItemsRangeRequestedLength() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ItemsRangeStartIndex() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ItemsRepeater() : ItemsRepeater
  • ItemsRepeater_ButtonClick() : BreadcrumbBarPage
  • ItemsRepeater_ElementClearing() : KeyboardNavigationSample , ObjectModelTestPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ItemsRepeater_ElementPrepared() : ItemsViewSummaryPage , ObjectModelTestPage , SelectorBarSummaryPage , ItemTemplateDemo , KeyboardNavigationSample
  • ItemsRepeater_LayoutUpdated() : ItemsViewSummaryPage
  • ItemsRepeater_LayoutUpdatedLog() : ItemsViewIntegrationPage
  • ItemsRepeater_Loaded() : ItemsViewSummaryPage , SelectorBarSummaryPage , ItemsViewPictureLibraryPage , ItemsViewBlankPage , ObjectModelTestPage
  • ItemsRepeater_LoadedLog() : ItemsViewIntegrationPage
  • ItemsRepeater_SizeChanged() : ItemsViewBlankPage , ItemsViewPictureLibraryPage , ObjectModelTestPage , ItemsViewSummaryPage
  • ItemsRepeater_SizeChangedLog() : ItemsViewIntegrationPage
  • ItemsRepeaterElementClearingEventArgs() : ItemsRepeaterElementClearingEventArgs
  • ItemsRepeaterElementIndexChangedEventArgs() : ItemsRepeaterElementIndexChangedEventArgs
  • ItemsRepeaterElementPreparedEventArgs() : ItemsRepeaterElementPreparedEventArgs
  • ItemsRepeaterProperties() : ItemsRepeaterProperties
  • ItemsRepeaterScrollHost() : ItemsRepeaterScrollHost
  • ItemsSource() : TreeViewNode , BreadcrumbBarProperties , ItemsViewProperties , TreeViewProperties , TreeViewNode , TreeViewItemProperties , RadioButtonsProperties , ItemsRepeaterProperties , TreeViewProperties , RadioButtonsProperties , ItemsViewProperties , ItemsRepeaterProperties , TreeViewItemProperties , BreadcrumbIterable , BreadcrumbBarProperties
  • ItemsSourceAccessibilitySetTest() : CommonTests
  • ItemsSourceProperty() : ItemsViewProperties , BreadcrumbBarProperties , TreeViewProperties , RadioButtonsProperties , TreeViewItemProperties , ItemsRepeaterProperties
  • ItemsSourceResyncTest() : TreeViewTests
  • ItemsSourceSwitchForthAndBackTest() : TreeViewTests
  • ItemsSourceView() : final , ItemsRepeater
  • ItemsSourceViewProperties() : ItemsSourceViewProperties
  • ItemsStretch() : LinedFlowLayoutProperties , UniformGridLayoutProperties , LinedFlowLayoutProperties
  • ItemsStretchComboBox_SelectionChanged() : ItemsViewWithDataPage
  • ItemsStretchProperty() : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • itemStates : RadioMenuFlyoutItemPage
  • itemsToToggle : MenuFlyoutPage
  • ItemsUnlocked() : LinedFlowLayoutProperties
  • ItemsView() : ItemsView
  • ItemsView_CurrentItemIndexChanged() : ItemsViewSummaryPage
  • ItemsView_GettingFocus() : SelectorBarSummaryPage , ItemsViewSummaryPage , ItemsViewBlankPage , ItemsViewPictureLibraryPage
  • ItemsView_GettingFocusLog() : ItemsViewIntegrationPage
  • ItemsView_GotFocus() : ItemsViewSummaryPage , SelectorBarSummaryPage , ItemsViewBlankPage , ItemsViewPictureLibraryPage
  • ItemsView_GotFocusLog() : ItemsViewIntegrationPage
  • ItemsView_ItemInvoked() : SelectorBarSummaryPage , ItemsViewSummaryPage , ItemsViewInteractiveTestsPage
  • ItemsView_Loaded() : ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage , ItemsViewBlankPage
  • ItemsView_LoadedLog() : ItemsViewIntegrationPage
  • ItemsView_LosingFocus() : ItemsViewSummaryPage , ItemsViewBlankPage , SelectorBarSummaryPage , ItemsViewPictureLibraryPage
  • ItemsView_LosingFocusLog() : ItemsViewIntegrationPage
  • ItemsView_LostFocus() : SelectorBarSummaryPage , ItemsViewSummaryPage , ItemsViewBlankPage , ItemsViewPictureLibraryPage
  • ItemsView_LostFocusLog() : ItemsViewIntegrationPage
  • ItemsView_PointerWheelChanged() : ItemsViewSummaryPage
  • ItemsView_SelectionChanged() : SelectorBarSummaryPage , ItemsViewSummaryPage
  • ItemsView_SizeChanged() : ItemsViewBlankPage , ItemsViewSummaryPage , ItemsViewPictureLibraryPage
  • ItemsView_SizeChangedLog() : ItemsViewIntegrationPage
  • ItemsViewAutomationPeer() : ItemsViewAutomationPeer
  • ItemsViewBlankPage() : ItemsViewBlankPage
  • ItemsViewExtendedSelectionMode() : ItemsViewTestsWithInputHelper
  • ItemsViewIntegrationPage() : ItemsViewIntegrationPage
  • ItemsViewIntegrationPage_KeyDown() : ItemsViewIntegrationPage
  • ItemsViewIntegrationPage_Loaded() : ItemsViewIntegrationPage
  • ItemsViewInteractiveTestsPage() : ItemsViewInteractiveTestsPage
  • ItemsViewInteractiveTestsPage_KeyDown() : ItemsViewInteractiveTestsPage
  • ItemsViewInteractiveTestsPage_Loaded() : ItemsViewInteractiveTestsPage
  • ItemsViewItemInvokedEventArgs() : ItemsViewItemInvokedEventArgs
  • ItemsViewItemsContainerDragStartingEventRaised() : ItemsViewTestsWithInputHelper
  • ItemsViewMultipleSelectionMode() : ItemsViewTestsWithInputHelper
  • ItemsViewPage() : ItemsViewPage
  • ItemsViewPictureLibraryPage() : ItemsViewPictureLibraryPage
  • ItemsViewProperties() : ItemsViewProperties
  • ItemsViewSetHeight() : ItemsViewSummaryPage
  • ItemsViewSetWidth() : ItemsViewSummaryPage
  • ItemsViewStartBringItemIntoView() : ItemsViewSummaryPage
  • ItemsViewSummaryPage() : ItemsViewSummaryPage
  • ItemsViewSummaryPage_KeyDown() : ItemsViewSummaryPage
  • ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged() : ItemsViewSummaryPage
  • ItemsViewTestSetupHelper() : ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
  • ItemsViewTransitionPage() : ItemsViewTransitionPage
  • ItemsViewWithDataPage() : ItemsViewWithDataPage
  • ItemTemplate() : TreeViewProperties , RadioButtonsProperties , BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , BreadcrumbBarProperties , ItemsViewProperties
  • ItemTemplateDemo() : ItemTemplateDemo
  • ItemTemplateProperty() : ItemsViewProperties , BreadcrumbBarProperties , RadioButtonsProperties , TreeViewProperties , ItemsRepeaterProperties
  • ItemTemplateSelector() : TreeViewProperties
  • ItemTemplateSelectorProperty() : TreeViewProperties
  • ItemTemplateSelectorTestPage_Click() : TreeViewPage
  • ItemTemplateShim() : ItemsRepeater
  • ItemTemplateWrapper() : ItemTemplateWrapper
  • ItemTransitionProvider() : ItemsViewProperties , ItemsRepeaterProperties
  • ItemTransitionProviderProperty() : ItemsRepeaterProperties , ItemsViewProperties
  • ItemType() : XamlTypeBase
  • ItemTypeComboBox : RadioButtonsTestPageElements
  • ItemTypeComboBoxSelectionChanged() : RadioButtonsPage
  • ItemWidth : VirtualizingUniformCarouselStackLayout , VirtualizingUniformStackLayout , UniformGrid2DLayout
  • Iterator()
: SelectedItems< T >::Iterator
, HashMap< K, V >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
, ObservableVector< T >::Iterator
  • IValueProvider_Value() : RatingControlAutomationPeer
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- p -

  • Padding() : LayoutPanelProperties
  • PaddingOffsetTest() : ProgressBarTests
  • PaddingProperty() : LayoutPanelProperties
  • Page : RevealScenarioItem
  • page : TestCommand
  • Page_Loaded() : WebView2CoreObjectsPage
  • PageAnnotatedScrollbar_Scrolling() : AnnotatedScrollBarIScrollControllerPage
  • PageContentRepeater_Loaded() : AnnotatedScrollBarIScrollControllerPage
  • PageDown() : ScrollPresenter
  • pageIconSource : InfoBadgePage
  • PageLeft() : ScrollPresenter
  • PageOperationTimer_Tick() : ListViewAnchoringPage
  • PagerComboBox : PagerControlTestPageElements
  • pagerComboBox : PagerControlPage
  • PagerControl : PagerControlTestPageElements , PagerControl
  • PagerControlAutomationPeer() : PagerControlAutomationPeer
  • PagerControlAxeTestPage() : PagerControlAxeTestPage
  • PagerControlPage() : PagerControlPage
  • PagerControlProperties() : PagerControlProperties
  • PagerControlSelectedIndexChangedEventArgs() : PagerControlSelectedIndexChangedEventArgs
  • PagerControlTemplateSettings() : PagerControlTemplateSettings
  • PagerControlTemplateSettingsProperties() : PagerControlTemplateSettingsProperties
  • PageRight() : ScrollPresenter
  • PagerInputCommand() : PagerControlProperties
  • PagerInputCommandProperty() : PagerControlProperties
  • pagerItemsRepeater : PagerControlPage
  • PagerNumberBox : PagerControlTestPageElements
  • pagerNumberBox : PagerControlPage
  • Pages : NavigationViewMenuItemsSourcePage , NavigationViewPageDataContext , PagerControlTemplateSettingsProperties
  • pageScrollViewer_SizeChanged() : IScrollControllerAdapter
  • pageScrollViewer_ViewChanged() : IScrollControllerAdapter
  • PagesProperty() : PagerControlTemplateSettingsProperties
  • PageUp() : ScrollPresenter
  • Palette() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • PaletteProperty() : InkToolBarPenButtonProperties
  • PanAnnotatedScrollBar() : ItemsViewTestsWithInputHelper
  • PanAnnotatedScrollBarWithItemsInfo() : ItemsViewTestsWithInputHelper
  • PanAnnotatedScrollBarWithoutItemsInfo() : ItemsViewTestsWithInputHelper
  • Pane1() : TwoPaneViewProperties
  • Pane1Length() : TwoPaneViewProperties
  • Pane1LengthComboBox_SelectionChanged() : TwoPaneViewPage
  • Pane1LengthProperty() : TwoPaneViewProperties
  • Pane1LengthTextBox_TextChanged() : TwoPaneViewPage
  • Pane1Property() : TwoPaneViewProperties
  • Pane2() : TwoPaneViewProperties
  • Pane2Length() : TwoPaneViewProperties
  • Pane2LengthComboBox_SelectionChanged() : TwoPaneViewPage
  • Pane2LengthProperty() : TwoPaneViewProperties
  • Pane2LengthTextBox_TextChanged() : TwoPaneViewPage
  • Pane2Property() : TwoPaneViewProperties
  • Pane_Closed() : SplitViewPage
  • Pane_Opened() : SplitViewPage
  • PaneAutoSuggestBox_SuggestionChosen() : NavigationViewPage
  • PaneClosed() : NavigationViewProperties
  • PaneClosedUponLaunch() : PaneBehaviorTests
  • PaneClosing() : NavigationViewProperties
  • PaneCustomContent() : NavigationViewProperties
  • PaneCustomContentProperty() : NavigationViewProperties
  • PaneDisplayMode() : NavigationViewProperties
  • PaneDisplayModeCombobox_SelectionChanged() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup , NavigationViewTopNavOnlyPage
  • PaneDisplayModeLeftLeftCompactLeftMinimalTest() : PaneBehaviorTests
  • PaneDisplayModeProperty() : NavigationViewProperties
  • PaneFooter() : NavigationViewProperties
  • PaneFooterContentTest() : PaneBehaviorTests
  • PaneFooterProperty() : NavigationViewProperties
  • PaneFooterTestPage() : PaneFooterTestPage
  • PaneHeader() : NavigationViewProperties
  • PaneHeaderProperty() : NavigationViewProperties
  • PaneLayoutTestPage() : PaneLayoutTestPage
  • PaneLengthTest() : TwoPaneViewTests
  • PaneNotOpeningTopMode() : PaneBehaviorTests
  • PaneOpenCheckbox_CheckChanged() : SplitViewPage
  • PaneOpenCloseEventsTest() : PaneBehaviorTests
  • PaneOpenCloseTest() : PaneBehaviorTests
  • PaneOpenCloseTestCaseRetry() : NavigationViewTestsBase
  • PaneOpenCloseTestPartTwo() : PaneBehaviorTests
  • PaneOpened() : NavigationViewProperties
  • PaneOpenForceCloseTest() : PaneBehaviorTests
  • PaneOpening() : NavigationViewProperties
  • PaneOpenStatus : NavigationViewTestsBase
  • PanePlacement_Toggled() : SplitViewPage
  • PanePriority : TwoPaneViewTests , TwoPaneViewProperties
  • PanePriorityComboBox_SelectionChanged() : TwoPaneViewPage
  • PanePriorityProperty() : TwoPaneViewProperties
  • PaneSizeChanged() : TwoPaneViewPage
  • PaneTabNavigationTest() : PaneBehaviorTests
  • PaneTitle() : NavigationViewProperties
  • PaneTitleProperty() : NavigationViewProperties
  • PaneToggleButtonStyle() : NavigationViewProperties
  • PaneToggleButtonStyleProperty() : NavigationViewProperties
  • PaneToggleButtonVisibility() : NavigationViewTemplateSettingsProperties
  • PaneToggleButtonVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • PaneToggleButtonVisiblityCheckbox_Checked() : NavigationViewTopNavPage , NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page
  • PaneToggleButtonVisiblityCheckbox_Unchecked() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • PaneToggleButtonWidth() : NavigationViewTemplateSettingsProperties
  • PaneToggleButtonWidthProperty() : NavigationViewTemplateSettingsProperties
  • PaneToggleRequested() : TitleBarProperties
  • paneToggleRequestedCount : TitleBarPageWindow
  • PanItemsView() : ItemsViewTestsWithInputHelper
  • panningElementAncestor : CompositionScrollControllerPanningInfo
  • PanningElementAncestor : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • PanningElementOffsetMultiplier : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • panningFrameworkElement : CompositionScrollControllerPanningInfo , CompositionScrollController
  • PanningFrameworkElement() : AnnotatedScrollBarPanningInfo
  • PanningFrameworkElement_ManipulationCompleted() : CompositionScrollController
  • PanningFrameworkElement_ManipulationDelta() : CompositionScrollController
  • PanningFrameworkElement_ManipulationStarting() : CompositionScrollController
  • PanningFrameworkElement_PointerPressed() : CompositionScrollController
  • panningInfo : BiDirectionalScrollController::UniScrollController , CompositionScrollController
  • PanningInfo : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController
  • PanningInfo_LogMessage() : CompositionScrollController
  • panningVisual : CompositionScrollControllerPanningInfo
  • PanningVisual : CompositionScrollControllerPanningInfo
  • PanOrientation : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • panOrientation : CompositionScrollControllerPanningInfo
  • PanRequested : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • PanScrollViewer() : ScrollViewTestsWithInputHelper
  • PanTowardsTwoManditoryIrregularSnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • PanTowardsTwoManditoryIrregularSnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • PanTowardsTwoManditoryIrregularSnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • PanToZero() : ScrollPresenterTestsWithInputHelper
  • PanUntilInputWorks() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollPresenterToScrollViewer() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollPresenterToScrollViewer_Auto() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollPresenterToScrollViewerWithChainingMode() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollViewerToScrollPresenter() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Center() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Far() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Near() : ScrollPresenterTestsWithInputHelper
  • PanWithoutRailing() : ScrollPresenterTestsWithInputHelper
  • PanWithRailing() : ScrollPresenterTestsWithInputHelper
  • ParallaxView : DynamicPage , ParallaxView
  • ParallaxViewPage() : ParallaxViewPage
  • ParallaxViewProperties() : ParallaxViewProperties
  • ParallaxViewStackPanelPage() : ParallaxViewStackPanelPage
  • Parent : TreeNode , ElementFactoryGetArgsDownlevel , ElementFactoryRecycleArgsDownlevel , ScrollPresenter , TreeViewNode , TreeViewNodeVector
  • Parent_PointerPressed() : BiDirectionalScrollController , CompositionScrollController
  • ParentHiddenThenVisibleTest() : WebView2Tests
  • ParentNode : SelectionTreeHelper::TreeWalkNodeInfo
  • ParentVisibilityHiddenTest() : WebView2Tests
  • ParentVisibilityTurnedOnTest() : WebView2Tests
  • ParseAlphaTextBoxValue() : ColorPickerTests::ColorPickerTestSetupHelper
  • PartialSelected : TreeViewNode
  • PasswordBoxDensityTest() : CommonStylesTests
  • PasswordBoxDensityTest_Click() : CommonStylesPage
  • PasteClipboard() : WebView2Tests
  • pastSender : SwipeControlPage , SwipeControlPage2
  • Path : Picture , SelectionModelTests::TreeWalkNodeInfo , SelectedItemInfo , SelectionTreeHelper::TreeWalkNodeInfo , AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , SelectionModelTests
  • Path_0() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_1() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_2() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_3() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_4() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_5() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_6() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_7() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_8() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • PathGeometry_0() : AnimatedBackVisualSource_AnimatedVisual
  • PathGeometry_00() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_01() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_02() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_03() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_04() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • PathGeometry_05() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_06() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_07() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_08() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_09() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_1() : AnimatedBackVisualSource_AnimatedVisual
  • PathGeometry_10() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_11() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_12() : AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_13()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_14()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_15() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_16() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_17() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_18() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_19() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_2() : AnimatedBackVisualSource_AnimatedVisual
  • PathGeometry_20() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_21() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_22() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_23() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_24() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_25() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_26() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_27() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_28() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_29() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_30() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_31() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_32() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_33() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_34() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_35() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_36() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_37() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_38() : LottieLogo::LottieLogo_AnimatedVisual
  • pattern : AcrylicBrushTests
  • Pause() : AnimatedVisualPlayer , AnimatedVisualPlayer::final , IAnimatedVisual
  • PenButton() : InkToolBarPenConfigurationControlProperties , InkToolBarPenConfigurationControl
  • PenButtonProperty() : InkToolBarPenConfigurationControlProperties
  • PerformGlyphVerification() : RatingControlPage
  • PerformImageVerification() : RatingControlPage
  • PerformLineAlignment() : FlowLayoutAlgorithm
  • PerformSwipe() : SwipeControlTests
  • PerfXamlEvent_RAII() : PerfXamlEvent_RAII
  • Person() : Person
  • PersonDataSource() : PersonDataSource
  • PersonElementFactory() : PersonElementFactory
  • PersonInfo() : PersonInfo
  • PersonInfoList_ViewChanged() : PipsPagerExamples
  • PersonInfoListPager_SelectedIndexChanged() : PipsPagerExamples
  • PersonInfoListPreviousOffset : PipsPagerExamples
  • PersonInfoListScrollViewer : PipsPagerExamples
  • PersonPicture() : PersonPicture
  • PersonPicture_LayoutUpdated() : PersonPicturePage
  • PersonPicture_Loaded() : PersonPicturePage
  • PersonPictureAutomationPeer() : PersonPictureAutomationPeer
  • PersonPicturePage() : PersonPicturePage
  • PersonPictureProperties() : PersonPictureProperties
  • PersonPictureTemplateSettingsProperties() : PersonPictureTemplateSettingsProperties
  • pGroup : ProfileGroupInfo
  • Phase() : VirtualizationInfo
  • PhaseElement() : final
  • PhaseNotSpecified : VirtualizationInfo
  • Phaser() : final
  • PhaseReachedEnd : VirtualizationInfo
  • Photo : Ingredient
  • Photos_CollectionChanged() : ItemsViewIntegrationPage
  • pictureLibrary : ItemsViewPictureLibraryPage
  • PictureLibrary() : PictureLibrary
  • Pictures : PipsPagerExamples , PipsPagerPage
  • PinchContentThroughMaxZoomFactor() : ScrollPresenterTests
  • PinchRectangle() : ScrollPresenterTestsWithInputHelper
  • PinchRectangleWithMouseWheel() : ScrollPresenterTestsWithInputHelper
  • PinElement() : ItemsRepeater
  • PinnedElement() : final::PinnedElementInfo
  • PinnedElementInfo() : final::PinnedElementInfo
  • PinterestLayout() : PinterestLayout
  • PinterestLayoutSamplePage() : PinterestLayoutSamplePage
  • PipSizeAfterOrientationChangeTest() : PipsPagerTests
  • PipSizeWithDifferentOrientationsTest() : PipsPagerTests
  • PipsPager : PipsPagerElements , PipsPager
  • PipsPagerAutomationPeer() : PipsPagerAutomationPeer
  • PipsPagerAxeTestPage() : PipsPagerAxeTestPage
  • PipsPagerChangingPageTest() : PipsPagerTests
  • PipsPagerExamples() : PipsPagerExamples
  • PipsPagerInfinitePagesTest() : PipsPagerTests
  • PipsPagerItems() : PipsPagerTemplateSettingsProperties
  • PipsPagerItemsProperty() : PipsPagerTemplateSettingsProperties
  • PipsPagerPage() : PipsPagerPage
  • PipsPagerProperties() : PipsPagerProperties
  • PipsPagerRTLDoesNotCrash() : PipsPagerTests
  • PipsPagerTemplateSettingsProperties() : PipsPagerTemplateSettingsProperties
  • PipsPagerWrapModeNavigation() : PipsPagerTests
  • PipsPagerWrapModeNavigationButtonsHiddenInOnePageScenario() : PipsPagerTests
  • PipsPagerWrapModeNavigationInfinitePages() : PipsPagerTests
  • PivotPage() : PivotPage
  • PlaceholderFallbackRating_Loaded() : RatingControlPage
  • PlaceholderGlyph() : RatingItemFontInfoProperties
  • PlaceholderGlyphProperty() : RatingItemFontInfoProperties
  • PlaceholderImage() : RatingItemImageInfoProperties
  • PlaceholderImageFallbackRating_Loaded() : RatingControlPage
  • PlaceholderImageProperty() : RatingItemImageInfoProperties
  • PlaceholderText() : NumberBoxProperties
  • PlaceholderTextProperty() : NumberBoxProperties
  • PlaceholderValue() : RatingControlProperties
  • PlaceholderValueProperty() : RatingControlProperties
  • PlacementMargin() : TeachingTipProperties
  • PlacementMarginProperty() : TeachingTipProperties
  • PlacementOptions : TeachingTipTestPageElements
  • Play() : AnimatedVisualPlayerPage
  • PlayAsync() : AnimatedVisualPlayer , IAnimatedVisual
  • PlaybackRate() : AnimatedVisualPlayerProperties
  • PlaybackRateProperty() : AnimatedVisualPlayerProperties
  • PlayButton_Click() : AnimatedVisualPlayerPage
  • PlayCloseAnimation() : CommandBarFlyoutCommandBar
  • PlayCrossFadeAnimation() : AcrylicBrush
  • Player_PointerMoved() : AnimatedVisualPlayerPage
  • PlayForward() : AnimatedVisualPlayerPage
  • PlayHalfButton_Click() : AnimatedVisualPlayerPage
  • PlayIndicatorAnimations() : NavigationView
  • PlayIndicatorNonSameLevelAnimations() : NavigationView
  • PlayIndicatorNonSameLevelTopPrimaryAnimation() : NavigationView
  • PlayOpenAnimation() : CommandBarFlyoutCommandBar
  • PlaySegment() : AnimatedIcon
  • PointerExitedImpl() : RatingControl
  • PointerInfo() : PointerInfo< T >
  • PointerOverFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverGlyph() : RatingItemFontInfoProperties
  • PointerOverGlyphProperty() : RatingItemFontInfoProperties
  • PointerOverImage() : RatingItemImageInfoProperties
  • PointerOverImageFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverImageProperty() : RatingItemImageInfoProperties
  • PointerOverPlaceholderFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverPlaceholderGlyph() : RatingItemFontInfoProperties
  • PointerOverPlaceholderGlyphProperty() : RatingItemFontInfoProperties
  • PointerOverPlaceholderImage() : RatingItemImageInfoProperties
  • PointerOverPlaceholderImageFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverPlaceholderImageProperty() : RatingItemImageInfoProperties
  • PointerPoint() : ScrollControllerPanRequestedEventArgs
  • PointerReleaseWithoutPressTest() : WebView2Tests
  • PolicyChanged() : MaterialHelper
  • PolicyStatusChangedHelper() : RevealBrush , AcrylicBrush
  • PollForEffectBrush() : AcrylicBrushPage
  • PollForFallbackBrush() : AcrylicBrushPage
  • PollTimer_Tick() : LightConfigurationTests
  • PoolInstanceProperty() : RecyclePoolProperties , RecyclePool
  • PopulateAccessibleControls() : CommandBarFlyoutCommandBar
  • PopulateAnnotatedScrollBar() : ItemsViewIntegrationPage
  • PopulateCmbSelectorBarSelectedItem() : SelectorBarSummaryPage
  • PopulateContent() : MenuBarItem
  • PopulateContentItems() : SwipeControl
  • PopulateData() : ListViewHeaderPage , ListViewItemPage , VirtualizingStackPanelPage , ListViewBackgroundPage
  • populatedBorder : ScrollViewerPage , ScrollPresenterDynamicPage
  • PopulateHeader() : ItemsViewIntegrationPage
  • PopulateHeaderAsync() : ItemsViewIntegrationPage
  • PopulateLabels() : AnnotatedScrollBarSummaryPage , AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarIScrollControllerPage
  • PopulatePanelWithButtons() : FlowLayoutTests
  • PopulatePhotosCollection() : ItemsViewIntegrationPage
  • PopulateSquares() : AnnotatedScrollBarSummaryPage , AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • PopulateStackPanelWithItems() : RatingControl
  • PopulateTabViewList() : TabView
  • popupVerticalOffsetTextBlock : TeachingTipTestPageElements
  • Position() : SliderInteraction , NavigationViewItemAutomationPeer , NavigationViewItemBase
  • PositionAnimation : SwipeControlPage
  • PositionInkVisual() : InkCanvas
  • PositionPopup() : TeachingTip
  • PositionTargetedPopup() : TeachingTip
  • PositionUntargetedPopup() : TeachingTip
  • PostArrange() : ItemsRepeaterScrollHost , ViewportTests::TestScrollingSurface , ScrollPresenter , IRepeaterScrollingSurface , ItemsRepeaterScrollHost , ScrollPresenter
  • PostProcessOffsetsChange() : ScrollPresenter
  • PostProcessZoomFactorChange() : ScrollPresenter
  • PreferredPlacement() : TeachingTipProperties
  • preferredPlacementComboBox : TeachingTipTestPageElements
  • PreferredPlacementProperty() : TeachingTipProperties
  • PreferSmallImage() : PersonPictureProperties
  • PreferSmallImageProperty() : PersonPictureProperties
  • PrefixText() : PagerControlProperties
  • PrefixTextProperty() : PagerControlProperties
  • preManipulationHorizontalOffset : CanvasScrollControllerConsumer
  • preManipulationThumbOffset : CompositionScrollController , BiDirectionalScrollController
  • preManipulationVerticalOffset : CanvasScrollControllerConsumer
  • PrepareContainer() : RecipeElementFactory
  • PrepareContainerForItemOverride() : TreeViewList , TabViewListView
  • PrepareForScrollPresenterManipulationStart() : ScrollPresenterTestsWithInputHelper
  • PrepareForScrollViewerManipulationStart() : ScrollPresenterTestsWithInputHelper
  • PrepareForScrollViewManipulationStart() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • PrepareItemsSource() : TreeViewLateDataInitTest , TreeViewPage
  • PrepareItemsSourceAsync() : TreeViewPage
  • PrepareItemsSourceForContainerReuseTest() : TreeViewItemsSourceTestPage
  • PrepareView() : ViewModel
  • PrepNavigationViewItem() : NavigationViewItem
  • PressButtonAndVerifyText() : TabViewTests
  • PressGamepadButtonAndVerifyOffsetAndFocus() : ScrollViewTestsWithInputHelper
  • Pressing : RevealHoverLight
  • PressingAnyKeyDismissesSwipe() : SwipeControlTests
  • PressKeyAndWaitForColorChange() : ColorPickerTests
  • PressModeAutomationId : ButtonInteractionTests
  • PressTipCloseButton() : TeachingTipTests
  • PressXCloseButton() : TeachingTipTests
  • PreventKeyboardDisplayOnProgrammaticFocus() : NumberBoxProperties
  • PreventKeyboardDisplayOnProgrammaticFocusProperty() : NumberBoxProperties
  • PreviousButtonClicked() : PagerControl
  • PreviousButtonCommand() : PagerControlProperties
  • PreviousButtonCommandProperty() : PagerControlProperties
  • PreviousButtonStyle() : PagerControlProperties , PipsPagerProperties , PagerControlProperties
  • PreviousButtonStyleProperty() : PagerControlProperties , PipsPagerProperties
  • PreviousButtonVisibility() : PagerControlProperties , PipsPagerProperties , PagerControlProperties
  • PreviousButtonVisibilityProperty() : PipsPagerProperties , PagerControlProperties
  • PreviousColor() : ColorPickerProperties
  • PreviousColorBlueButton_Click() : ColorPickerPage
  • PreviousColorCurrentColorButton_Click() : ColorPickerPage
  • PreviousColorGreenButton_Click() : ColorPickerPage
  • PreviousColorNullButton_Click() : ColorPickerPage
  • PreviousColorProperty() : ColorPickerProperties
  • previousColorRectangle : ColorPickerPage
  • PreviousColorRectangleFillChanged() : ColorPickerPage
  • PreviousColorRedButton_Click() : ColorPickerPage
  • PreviousPageButton : PipsPagerElements
  • previousPageButton : PagerControlPage
  • PreviousPageButton : PagerControlTestPageElements
  • previousPageButton : PipsPagerPage
  • PreviousPageButtonChangingPageTest() : PipsPagerTests , PagerControlTests
  • PreviousPageButtonIsEnabledCheckBox : PipsPagerElements , PagerControlTestPageElements
  • PreviousPageButtonIsVisibleCheckBox : PipsPagerElements
  • PreviousPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • PreviousPageButtonVisibilityComboBox : PipsPagerElements , PagerControlTestPageElements
  • PreviousPageButtonVisibilityOptionsTest() : PagerControlTests , PipsPagerTests
  • PreviousPageIndex() : PagerControlSelectedIndexChangedEventArgs
  • PreviousPageTextBlock : PagerControlTestPageElements
  • PreviousTargetUnloadingLeavesTeachingTipOpen() : TeachingTipTests
  • primary : SnapPointSortPredicate
  • PrimaryCommands() : CommandBarFlyout
  • PrimaryEllipseFillChanged() : PersonPicturePage
  • primaryEllipseLoaded : PersonPicturePage
  • PrimitiveXamlType() : PrimitiveXamlType
  • PrintGridWidth() : SwipeControlPage
  • PrintSelectedItem() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • PrintTopLevelIsChildSelectedItems() : HierarchicalNavigationViewMarkup
  • Priority() : WorkInfo
  • ProcessAddCommand() : AnimationsDemoPage
  • ProcessAnchorCandidate() : ScrollPresenter
  • ProcessBindings() : PhasingTests::ElementPhasingManager
  • ProcessClearCommand() : AnimationsDemoPage
  • ProcessCommand() : AnimationsDemoPage
  • ProcessCommands() : AnimationsDemoPage
  • ProcessContentSizeChange() : ScrollInputHelper
  • ProcessDequeuedViewChange() : ScrollPresenter
  • ProcessedCalls : PhasingTests::ElementPhasingManager
  • ProcessInteraction() : ItemsView
  • ProcessNavigationKeys() : ItemsView
  • ProcessOffsetsChange() : ScrollPresenter
  • ProcessPointerCanceled() : ItemContainer , BreadcrumbBarItem , NavigationViewItem
  • ProcessPointerOver() : NavigationViewItem , ItemContainer , BreadcrumbBarItem
  • ProcessRemoveCommand() : AnimationsDemoPage
  • ProcessResetCommand() : AnimationsDemoPage
  • ProcessScrollPresenterContentChange() : ScrollInputHelper
  • ProcessScrollViewerContentChange() : ScrollInputHelper
  • ProcessScrollViewerZoomModeChange() : ScrollInputHelper
  • ProcessSourceControlTemplateChange() : ScrollInputHelper
  • ProcessSourceElementChange() : ScrollInputHelper
  • ProcessTargetElementChange() : ScrollInputHelper
  • ProcessVerticalGridPointerCanceled() : AnnotatedScrollBar
  • ProcessZoomFactorChange() : ScrollPresenter
  • ProfilePicture() : PersonPictureProperties
  • ProfilePictureProperty() : PersonPictureProperties
  • ProgramaticallyCloseSwipeControl11() : SwipeControlPage
  • ProgramaticallyCloseSwipeControl3() : SwipeControlPage
  • ProgramaticallyCloseSwipeControl9() : SwipeControlPage
  • ProgressBar() : ProgressBar
  • ProgressBarAutomationPeer() : ProgressBarAutomationPeer
  • ProgressBarAxeTestPage() : ProgressBarAxeTestPage
  • ProgressBarPage() : ProgressBarPage
  • ProgressBarPage_CurrentStateChanged() : ProgressBarPage
  • ProgressBarPage_Loaded() : ProgressBarPage
  • ProgressBarProperties() : ProgressBarProperties
  • ProgressBarReTemplatePage() : ProgressBarReTemplatePage
  • ProgressBarReTemplatePage_CurrentStateChanged() : ProgressBarReTemplatePage
  • ProgressBarReTemplatePage_Loaded() : ProgressBarReTemplatePage
  • ProgressBarTemplateSettings() : ProgressBarTemplateSettings
  • ProgressBarTemplateSettingsProperties() : ProgressBarTemplateSettingsProperties
  • ProgressObject() : AnimatedVisualPlayer
  • ProgressRing() : ProgressRing
  • ProgressRingAutomationPeer() : ProgressRingAutomationPeer
  • ProgressRingAxeTestPage() : ProgressRingAxeTestPage
  • ProgressRingCustomLottieSourcePage() : ProgressRingCustomLottieSourcePage
  • ProgressRingCustomLottieSourcePage_CurrentStateChanged() : ProgressRingCustomLottieSourcePage
  • ProgressRingCustomLottieSourcePage_Loaded() : ProgressRingCustomLottieSourcePage
  • ProgressRingPage() : ProgressRingPage
  • ProgressRingPage_CurrentStateChanged() : ProgressRingPage
  • ProgressRingPage_Loaded() : ProgressRingPage
  • ProgressRingProperties() : ProgressRingProperties
  • ProgressRingStoryboardAnimationPage() : ProgressRingStoryboardAnimationPage
  • ProgressRingStoryboardAnimationPage_CurrentStateChanged() : ProgressRingStoryboardAnimationPage
  • ProgressRingStoryboardAnimationPage_Loaded() : ProgressRingStoryboardAnimationPage
  • ProgressRingTemplateSettings() : ProgressRingTemplateSettings
  • ProgressRingTemplateSettingsProperties() : ProgressRingTemplateSettingsProperties
  • Prop : BridgeAnotherClass
  • PropagateDepthToChildren() : NavigationViewItem
  • PropagatePropertiesDown() : TeachingTipTests
  • Property() : GlobalDependencyProperty
  • PropertyChanged() : SelectionModelProperties , DataModelWithINPC , SelectionModel , SliderInteraction , ButtonInteraction , ButtonInteractionProperties , SliderInteraction , SelectionModel , Recipe , SelectionModelProperties , SliderInteractionProperties , TreeViewItemSource , SliderInteractionProperties , ButtonInteractionProperties , TreeViewLateDataInitTest , NavigationViewPageDataContext , ButtonInteraction , TeachingTipPage
  • PropertyChanged_revoker() : PropertyChanged_revoker
  • PropertyId : ParallaxViewTests
  • PropertyName() : ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs , ExpressionAnimationStatusChange
  • PropertyValueToString() : CommonStylesVisualTreeTestSamples::CustomizedTranslator
  • Protractor() : InkToolBarStencilButtonProperties , InkToolBarStencilButton , InkToolBarStencilButtonProperties
  • ProtractorProperty() : InkToolBarStencilButtonProperties
  • PrunePinnedElements() : final
  • pszGroupName : ProfileGroupInfo
  • PTRPage() : PTRPage
  • PullDirection() : RefreshContainerProperties
  • PullDirectionProperty() : RefreshContainerProperties
  • PullToRefreshPage() : PullToRefreshPage
  • put_Items() : SwipeItems
  • put_ParentImpl() : TreeViewNode
  • put_State() : RefreshVisualizer
  • PutElement() : RecyclePool
  • PutElementCore() : RecyclePool
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- q -

  • QPCTimer() : final
  • QueryCoreWebView2BasicTest() : WebView2Tests
  • QueryInterface() : ReferenceTracker< D, ImplT, I >
  • QueueCallbackForCompositionRendering() : SharedHelpers
  • QueuedOperation()
: ListViewBasePage::QueuedOperation
, ScrollPresenterStackPanelAnchoringPage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ScrollPresenterDynamicPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ScrollPresenterDynamicPage::QueuedOperation
, ScrollPresenterRepeaterAnchoringPage::QueuedOperation
  • QueuedOperationsTimer_Tick() : ListViewBasePage , ItemsViewSummaryPage
  • QueuedOperationType : ScrollPresenterRepeaterAnchoringPage , ListViewBasePage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ListViewAnchoringPage
  • QueueInkPresenterWorkItem() : InkCanvas
  • QueueLayoutLabels() : AnnotatedScrollBar
  • QueueLengthSlider_ValueChanged() : AnimatedIconPage
  • QueueNavigationKey() : ItemsView
  • QueueTick() : final
  • QueueTransition() : ItemCollectionTransitionProvider
  • QuickAnimationDuration : LinedFlowLayoutItemCollectionTransitionProvider
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- r -

  • R : ColorPickerTests::Color
  • RadialGradientBrush() : RadialGradientBrush
  • RadialGradientBrushPage() : RadialGradientBrushPage
  • RadialGradientBrushProperties() : RadialGradientBrushProperties
  • RadiansToDegrees() : RevealStatesPage
  • RadioButtons() : RadioButtons
  • RadioButtons1HasFocusCheckBox : RadioButtonsFocusTestPageElements
  • RadioButtons2HasFocusCheckBox : RadioButtonsFocusTestPageElements
  • RadioButtonsAutomationPeer() : RadioButtonsAutomationPeer
  • RadioButtonsCaseBundle() : RadioButtonsCaseBundle
  • RadioButtonsElementFactory() : RadioButtonsElementFactory
  • RadioButtonsEventsList : RadioButtonsTestPageElements
  • RadioButtonsFocusPage() : RadioButtonsFocusPage
  • RadioButtonsHasFocusCheckBox : RadioButtonsTestPageElements
  • RadioButtonsPage() : RadioButtonsPage
  • RadioButtonsPage_Loaded() : RadioButtonsPage
  • RadioButtonsProperties() : RadioButtonsProperties
  • RadioButtonsSourceLocation : RadioButtonsTestPageElements
  • RadioButtonsSourceType : RadioButtonsTestPageElements
  • RadioButtonsTestHooks_LayoutChanged() : RadioButtonsPage
  • RadioMenuFlyoutItem() : RadioMenuFlyoutItem
  • RadioMenuFlyoutItemPage() : RadioMenuFlyoutItemPage
  • RadioMenuFlyoutItemProperties() : RadioMenuFlyoutItemProperties
  • RadiusVector2Animation() : LottieLogo::LottieLogo_AnimatedVisual
  • RadiusX() : RadialGradientBrushProperties
  • RadiusXProperty() : RadialGradientBrushProperties
  • RadiusY() : RadialGradientBrushProperties
  • RadiusYProperty() : RadialGradientBrushProperties
  • RaiseAddScrollVelocityRequested() : BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollController , ScrollBarController , AnnotatedScrollBar
  • RaiseAnchorRequested() : ScrollPresenter
  • RaiseAutomationPropertyChangedEvent() : SharedHelpers
  • RaiseBringingIntoView() : ScrollPresenter
  • RaiseCanScrollChanged() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • RaiseChanged() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • RaiseChildrenChanged() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVectorInnerImpl< VectorOptions, Wrapper > , TreeViewNode
  • RaiseClosedEvent() : InfoBar , InfoBarAutomationPeer
  • RaiseClosingEvent() : InfoBar , TeachingTip
  • RaiseCollapsedEvent() : Expander , NavigationView
  • RaiseColorChanged() : ColorSpectrum
  • RaiseConfigurationChanged() : ViewportTests::TestScrollingSurface , ScrollPresenter
  • RaiseDetailLabelRequested() : AnnotatedScrollBar
  • RaiseDisplayModeChanged() : NavigationView
  • RaiseEvent() : ObservableTraits< T, true, isBindable >
  • RaiseExpandCollapseAutomationEvent() : TreeViewItem , TreeViewItemAutomationPeer , ExpanderAutomationPeer , NavigationViewItemAutomationPeer
  • RaiseExpandingEvent() : Expander , NavigationView
  • RaiseExpressionAnimationStatusChanged() : ScrollPresenter
  • RaiseExtentChanged() : ScrollPresenter
  • RaiseInteractingForRefreshChanged() : RefreshInfoProviderImplementation
  • RaiseInteractionRatioChanged() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • RaiseInteractionRatioChangedEvent() : RefreshInfoProviderImpl
  • RaiseInteractionSourcesChanged() : ScrollPresenter
  • RaiseInvoked() : ButtonInteraction
  • RaiseIsInteractingForRefreshChanged() : RefreshInfoProviderImpl
  • RaiseIsInteractionForRefreshChangedEvent() : RefreshInfoProviderImpl
  • RaiseIsScrollingWithMouseChanged() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • RaiseItemClickedEvent() : BreadcrumbBar , BreadcrumbBarItem
  • RaiseItemInvoked() : ItemContainer , ItemsView , NavigationView
  • RaiseItemInvokedForNavigationViewItem() : NavigationView
  • RaiseItemsInfoRequested() : LinedFlowLayout
  • RaiseLineArranged() : FlowLayoutAlgorithm
  • RaiseLogMessage() : BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollControllerPanningInfo , CompositionScrollController
  • RaiseMapElementClick() : MapElementsLayer
  • RaiseOpenedEvent() : InfoBarAutomationPeer
  • RaisePanRequested() : AnnotatedScrollBarPanningInfo , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollControllerPanningInfo
  • RaisePostArrange() : ScrollPresenter
  • RaisePropertyChanged() : SelectionModel
  • RaisePropertyChangedEvent() : ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer , RatingControlAutomationPeer
  • RaiseRefreshCompleted() : RefreshInfoProviderImpl
  • RaiseRefreshRequested() : RefreshContainer , RefreshVisualizer
  • RaiseRefreshStarted() : RefreshInfoProviderImpl
  • RaiseRefreshStateChanged() : RefreshVisualizer
  • RaiseRequestClose() : TabViewItem
  • RaiseScrollAnimationStarting() : ScrollPresenter
  • RaiseScrollByRequested() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollController , ScrollBarController
  • RaiseScrollCompleted() : BiDirectionalScrollController
  • RaiseScrolling() : AnnotatedScrollBar
  • RaiseScrollStarting() : ScrollPresenter
  • RaiseScrollToRequested() : ScrollBarController , AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollController , ScrollBarController
  • RaiseSelectedIndexChanged() : PagerControl , PipsPager
  • RaiseSelectionChanged() : ItemsView , ItemsViewAutomationPeer , PagerControlAutomationPeer , PipsPagerAutomationPeer , SelectorBar , TreeView
  • RaiseSelectionChangedEvent() : NavigationView , NavigationViewAutomationPeer
  • RaiseSelectionChangeEvents() : TreeViewItem
  • RaiseStateChanged() : ScrollPresenter
  • RaiseValueChangedEvent() : NumberBoxAutomationPeer
  • RaiseViewChangeCompleted() : ScrollPresenter
  • RaiseViewChanged() : ScrollPresenter
  • RaiseViewportChanged() : ScrollPresenter
  • RaiseWindowClosedEvent() : TeachingTipAutomationPeer
  • RaiseWindowOpenedEvent() : TeachingTipAutomationPeer
  • RaiseZoomAnimationStarting() : ScrollPresenter
  • RaiseZoomStarting() : ScrollPresenter
  • RandomizeCenter() : RadialGradientBrushPage
  • RandomizeCenterButton_Click() : RadialGradientBrushPage
  • RandomizeGradientOrigin() : RadialGradientBrushPage
  • RandomizeGradientOriginButton_Click() : RadialGradientBrushPage
  • RandomizeRadius() : RadialGradientBrushPage
  • RandomizeRadiusButton_Click() : RadialGradientBrushPage
  • RangeCount() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • RATING_ITEM_HEIGHT : RatingControlTests
  • RATING_ITEM_WIDTH : RatingControlTests
  • RatingBindingSampleButton_Click() : RatingControlPage
  • RatingControl() : RatingControl
  • RatingControlAutomationPeer() : RatingControlAutomationPeer
  • RatingControlPage() : RatingControlPage
  • RatingControlPage_Loaded() : RatingControlPage
  • RatingControlProperties() : RatingControlProperties
  • RatingItemFontInfoProperties() : RatingItemFontInfoProperties
  • RatingItemImageInfoProperties() : RatingItemImageInfoProperties
  • RatingXBindSampleButton_Click() : RatingControlPage
  • RawAverageItemsPerLineDbg() : LinedFlowLayout
  • RawDataSize() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • RCRefreshRequestedComboBox_SelectionChanged() : RefreshContainerPage
  • RCRefreshRequestedComboBoxSwitcher_Click() : RefreshContainerPage
  • ReadBindingResult_Click() : TreeViewPage
  • ReadExpressionAnimationSources() : ScrollPresenterTests
  • ReadOnlyNotifyPropertyChangedCollection() : ReadOnlyNotifyPropertyChangedCollection-g< T >
  • ReadResult() : TreeViewTests
  • ReadSettingsSelected_Click() : NavigationViewPage
  • RealizationIndex() : VirtualizingStackLayout
  • RealizationRect() : FlowLayoutAlgorithm , VirtualizingLayoutContext
  • RealizationRectCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • RealizationWindow() : ItemsRepeater
  • RealizedChildrenNodeCount() : final
  • RealizedElementIndices : RecyclingElementFactoryDerived
  • Reason() : InfoBarClosedEventArgs , InfoBarClosingEventArgs , TeachingTipClosedEventArgs , TeachingTipClosingEventArgs
  • RecipeContainerType : RecipeElementFactory
  • RecipeElementFactory() : RecipeElementFactory
  • RecipeGroup() : RecipeGroup
  • RecipeGroupType : RecipeElementFactory
  • RecommendedAnchorIndex() : VirtualizingLayoutContext
  • RecommendedAnchorIndexCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • RecommendedNavigationTransitionInfo() : NavigationViewItemInvokedEventArgs , NavigationViewSelectionChangedEventArgs
  • RecommendedNavigationTransitionInfoToString() : NavigationViewTopNavOnlyPage
  • RecordedArgs : InspectingDataSourceTests::CollectionChangeRecorder
  • RecordEvent() : CommandBarFlyoutPage , TextCommandBarFlyoutPage
  • Rect() : Flex
  • rectangle : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • RectangleColor : FallbackGrid
  • RectangleHeight : FallbackGrid
  • rectangleLeftHeader : ScrollViewerPage
  • rectangleTopHeader : ScrollViewerPage
  • rectangleTopLeftHeader : ScrollViewerPage
  • RectangleWidth : FallbackGrid
  • rectSC : DynamicPage
  • Recycle() : PhasingTests::ElementPhasingManager
  • RecycleContainer() : NavigationView
  • RecycleElement() : ElementFactory , ItemTemplateWrapper , VirtualizingLayoutContext
  • RecycleElementCallInfo() : MockElementFactory::RecycleElementCallInfo
  • RecycleElementCore() : BreadcrumbElementFactory , NavigationViewItemsFactory , RadioButtonsElementFactory , DataAsElementElementFactory , ElementFromElementElementFactory , MockElementFactory , RecyclingElementFactoryDerived , PhasingTests::CustomElementFactory , ElementFactory , LayoutContextAdapter , RecyclingElementFactory , RepeaterLayoutContext , AnimationsDemoPage::AnimationElementFactory , RecipeElementFactory , PersonElementFactory , VirtualizingLayoutContext
  • RecycleEvents() : RatingControl , TreeViewItem
  • RecyclePool : RecipeElementFactory , RecyclePool , RecyclingElementFactory
  • RecyclePoolProperties() : RecyclePoolProperties
  • RecyclingElementFactory() : RecyclingElementFactory
  • RecyclingElementFactoryDerived() : RecyclingElementFactoryDerived
  • RecyclingElementFactoryProperties() : RecyclingElementFactoryProperties
  • RedAmplitude() : IGammaTransferEffect
  • RedDisable() : IGammaTransferEffect , ILinearTransferEffect
  • redEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • RedExponent() : IGammaTransferEffect
  • RedLabelAutomationId : ColorPickerTests
  • RedOffset() : IGammaTransferEffect , ILinearTransferEffect
  • redOrHueChangedWaiter : ColorChangedEventWaiter
  • RedSlope() : ILinearTransferEffect
  • RedTextBoxAutomationId : ColorPickerTests
  • RedValueCount() : IPosterizeEffect
  • ReevaluateForwardedUIAProperties() : NumberBox
  • reference_tracker_implements() : reference_tracker_implements< D, WinRTClassType, ImplT, I >
  • ReferenceTracker() : ReferenceTracker< D, ImplT, I >
  • ReferenceTrackerContainerBase() : ReferenceTrackerContainerBase
  • Refresh() : RefreshableCollection-g< T >
  • RefreshAutomaticHorizontalOffsets() : ParallaxView
  • RefreshAutomaticVerticalOffsets() : ParallaxView
  • RefreshButtonClick() : RefreshVisualizerPage
  • RefreshCompleted : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , IRefreshInfoProvider , RefreshInfoProviderImplementation , RefreshContainer , RefreshVisualizer , RefreshInfoProviderImpl
  • RefreshCompletedAnimation() : AnimationHandler , IAdapterAnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • refreshCompletedAnimationNeedsUpdating : AnimationHandler
  • RefreshCompletedBatchCompleted() : AnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • RefreshCompletedDeferralCompletedOffUIThread() : RefreshVisualizerTests
  • refreshCompletedScopedBatch : AnimationHandler
  • RefreshCompletionDeferral : RefreshContainerOnImagePage , RefreshVisualizerPage
  • RefreshContainer() : RefreshContainer
  • RefreshContainer_RefreshRequested() : RefreshContainerOnImagePage , RefreshContainerPage
  • RefreshContainerOnImagePage() : RefreshContainerOnImagePage
  • RefreshContainerPage() : RefreshContainerPage
  • RefreshContainerProperties() : RefreshContainerProperties
  • RefreshContentAlignments() : DynamicPage
  • refreshCount : RefreshContainerOnImagePage , RefreshContainerPage
  • RefreshHorizontalScrollMode() : DynamicPage
  • RefreshInfoProvider_InteractingForRefreshChanged() : RefreshVisualizer
  • RefreshInfoProvider_InteractionRatioChanged() : RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizer
  • RefreshInfoProviderAdapter() : RefreshContainer
  • RefreshInfoProviderImpl() : RefreshInfoProviderImpl
  • RefreshInfoProviderImplementation() : RefreshInfoProviderImplementation
  • RefreshInteractionRatioChangedEventArgs() : RefreshInteractionRatioChangedEventArgs
  • RefreshItems() : ItemsViewTransitionPage
  • RefreshOnContainerButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • RefreshOnVisualizerButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • RefreshPropagatesToInfoProvider() : RefreshVisualizerTests
  • refreshPullDirection : AnimationHandler , ImageIRefreshInfoProviderAdapter , RefreshInfoProviderImplementation
  • RefreshRequested() : RefreshContainerProperties , RefreshVisualizerProperties
  • RefreshRequestedAnimation() : AnimationHandler , IAdapterAnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • refreshRequestedAnimationNeedsUpdating : AnimationHandler
  • RefreshRequestedEventArgs() : RefreshRequestedEventArgs
  • RefreshRequestedEventFires() : RefreshVisualizerTests
  • RefreshRequestedHandlersWorkOnEitherContainerOrVisualizerOrBoth() : RefreshContainerTests
  • RefreshSnapPoints() : ScrollPresenterBringIntoViewPage
  • RefreshSourceContent() : DynamicPage
  • RefreshSourceContentSizes() : DynamicPage
  • RefreshStarted : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , IRefreshInfoProvider , RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • RefreshStateChanged() : RefreshVisualizerProperties
  • RefreshStateChangedEventArgs() : RefreshStateChangedEventArgs
  • RefreshStateChangedEventFires() : RefreshVisualizerTests
  • RefreshSVCAlignments() : DynamicPage
  • RefreshTEAlignments() : DynamicPage
  • RefreshTESizes() : DynamicPage
  • RefreshVerticalScrollMode() : DynamicPage
  • refreshVisualizer : AnimationHandler
  • RefreshVisualizer() : RefreshVisualizer
  • RefreshVisualizer_RefreshRequested() : RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizerPage
  • RefreshVisualizer_RefreshStateChanged() : RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizerPage
  • RefreshVisualizer_SizeChanged() : RefreshContainerOnImagePage
  • RefreshVisualizerPage() : RefreshVisualizerPage
  • RefreshVisualizerProperties() : RefreshVisualizerProperties
  • refreshVisualizerRefreshCompletedAnimation : AnimationHandler
  • refreshVisualizerRefreshRequestedAnimation : AnimationHandler
  • refreshVisualizerSize : RefreshInfoProviderImplementation
  • refreshVisualizerVisual : AnimationHandler
  • refreshVisualizerVisualOffsetAnimation : AnimationHandler
  • RefreshZoomMode() : DynamicPage
  • RegenerateSnapPointsSet() : ScrollPresenter
  • RegionOffsetTest() : TwoPaneViewTests
  • RegionTest() : TwoPaneViewTests
  • RegisterAnchorCandidate() : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , IRepeaterScrollingSurface , ScrollPresenter , ScrollView
  • RegisterAnchorCandidateFunc : ViewportTests::TestScrollingSurface
  • RegisterCacheBuildWork() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • RegisterCoreEventHandlers() : WebView2
  • RegisterFlyoutEvents() : DropDownButton , SplitButton
  • RegisterForCallback() : final
  • RegisterItem() : RadioMenuFlyoutItemPage
  • RegisterMethod() : CMethodProfileGroupBase , CMethodProfileGroup< size >
  • RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates() : ViewportManagerWithPlatformFeatures
  • RegisterPreparedElementsAsArranged() : ViewportManagerWithPlatformFeatures
  • RegisterWork() : final
  • RegisterXamlEventHandlers() : WebView2
  • RegressionTestScenario() : RegressionTestScenario
  • ReIndexVisibleElementsForAccessibility() : BreadcrumbBar
  • RelativeBounds() : ItemsRepeaterScrollHost::CandidateInfo
  • relativeChangeCorrelationIds : ScrollPresenterDynamicPage
  • RelativeOffsetChange : BiDirectionalScrollController::OperationInfo , CompositionScrollController::OperationInfo
  • Release() : AutoHandle< THandlePolicy >
  • ReleaseCompositionResources() : RevealBorderLight , RevealHoverLight , XamlAmbientLight
  • ReleaseLocalLight() : RevealBorderLight
  • ReleaseModeAutomationId : ButtonInteractionTests
  • Reload() : WebView2
  • ReloadTest() : WebView2Tests
  • remove() : event_base< ImplT, T, StorageT >
  • Remove() : HashMap< K, V > , CustomItemsSource , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , CollectionChangeDemo::MyDataSource , MyCollection , final , ScrollPresenterTests::TestDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ScrollPresenterStackPanelAnchoringPage
  • Remove_Click() : ScrollViewerAdapterPage
  • remove_Click() : FlatSample , TreeViewSample
  • RemoveAllChildren() : LinedFlowLayoutDemo
  • RemoveAllWebViewControls() : WebView2CoreObjectsPage
  • RemoveAt() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitVector< T, SplitVectorID > , SelectedTreeNodeVector , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , MyCollection , SwipeItems , TreeViewNodeVector , ViewModel , SelectedItemsVector
  • RemoveAtCore() : SelectedTreeNodeVector
  • RemoveAtEnd() : ObservableVector< T > , VectorInnerImpl< VectorOptions, Wrapper > , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • RemoveButton_Click() : NavigationViewInitPage , NavigationViewTopNavStorePage
  • RemoveCachedBoundsOutsideViewport() : VirtualizingStackLayout
  • RemoveChild() : LinedFlowLayoutDemo
  • RemovedItems() : TreeViewSelectionChangedEventArgs
  • RemoveDropShadow() : CommandBarFlyout
  • RemoveEventHandler() : ObservableTraits< T, true, isBindable > , ObservableVectorInnerImpl< VectorOptions, Wrapper >
  • RemoveExistingWebViewControl() : WebView2BasicPage
  • RemoveExpandedChanged() : TreeViewNode
  • RemoveFakeBrowserExecutableFolderKey() : WebView2Tests
  • RemoveFirstItemButton_Click() : NavigationViewTopNavOverflowButtonPage
  • RemoveFlyoutItem_Click() : MenuBarPage
  • RemoveFooterButton_Click() : NavigationViewInitPage
  • RemoveFooterItemButton_Click() : NavigationViewPage , NavigationViewTopNavPage
  • RemoveFromChildrenNodes() : TreeViewNode
  • RemoveFromSelection() : TabViewItemAutomationPeer , NavigationViewItemAutomationPeer , ItemContainerAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer
  • RemoveGradientStopButton_Click() : RadialGradientBrushPage
  • RemoveGradientStopTest() : RadialGradientBrushTests
  • RemoveInfoBarAsynchronouslyClick() : InfoBarPage
  • RemoveItem() : ItemsViewInteractiveTestsPage
  • RemoveItemButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • RemoveItemsFromOneChildrenItem_Click() : MenuBarPage
  • RemoveLastItem_Click() : TabViewTabClosingBehaviorPage
  • RemoveLastItemButton_Click() : NavigationViewTopNavOverflowButtonPage
  • RemoveMapIcon() : MapControl
  • RemoveMenuBarItem_Click() : MenuBarPage
  • RemoveMiddleItem_Click() : TabViewTabClosingBehaviorPage
  • RemoveNodeAndDescendantsFromView() : ViewModel
  • RemoveNodeFromParent() : TreeViewList
  • RemoveNodesAndDescendentsWithFlatIndexRange() : ViewModel
  • RemoveOpenButton_Click() : TeachingTipPage
  • RemovePin() : VirtualizationInfo
  • RemoveRandomGradientStop() : RadialGradientBrushPage
  • RemoveRange() : final
  • RemoveRevealButton_Click() : RevealRegressionTestsPage
  • RemoveSecondLevelOfNode_Click() : TreeViewPage
  • RemoveSecondMenuItem() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • RemoveTabButton_Click() : TabViewPage
  • RemoveTargetBrush() : RevealBrush
  • removeTargetButton : TeachingTipTestPageElements
  • RemoveTeachingTipButton_Click() : TeachingTipPage
  • RemoveTeachingTipTextBlockContent_Unloaded() : TeachingTipPage
  • RemoveWebViewControls() : WebView2BasicPage
  • RemoveWebViewEventHandlers() : WebView2BasicPage , WebView2CoreObjectsPage
  • RemoveWhitespace() : MultipleTabViewPage
  • RemovingLastChildrenSetsIsExpandedToFalse() : TreeViewTests
  • RenderingRatingFontSize() : RatingControl
  • ReorderItems() : TreeViewItem
  • ReorderItemsTest() : TabViewTests
  • ReparentElementTest() : WebView2Tests
  • ReparentRepeater() : NavigationViewItem
  • Repeat : VirtualizingUniformCarouselStackLayout
  • repeatButton : ScrollViewerPage
  • RepeatCount : VirtualizingUniformCarouselStackLayout
  • RepeatedIndex : GroupedRepeaterItem , TreeViewItem , RepeaterItem
  • RepeatedIndexProperty : RepeaterItem , TreeViewItem , GroupedRepeaterItem
  • RepeatedScrollSnapPoint() : RepeatedScrollSnapPoint
  • RepeatedZoomSnapPoint() : RepeatedZoomSnapPoint
  • repeater : PipsPagerPage
  • Repeater_ElementIndexChanged() : FlatSample
  • Repeater_ElementPrepared() : FlatSample , TreeViewSample , ScrollPresenterBringIntoViewPage
  • RepeaterAutomationPeer() : RepeaterAutomationPeer
  • RepeaterItem() : RepeaterItem
  • RepeaterItemAutomationPeer() : RepeaterItemAutomationPeer
  • RepeaterLayoutContext() : RepeaterLayoutContext
  • RepeaterTestUIPage() : RepeaterTestUIPage
  • Replace() : SplitVector< T, SplitVectorID > , CustomItemsSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ScrollPresenterStackPanelAnchoringPage , CollectionChangeDemo::MyDataSource
  • ReplaceAll() : VectorInnerImpl< VectorOptions, Wrapper > , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector , ObservableVector< T >
  • ReplaceChild() : LinedFlowLayoutDemo
  • ReplaceGradientButton_Click() : RadialGradientBrushPage
  • ReplaceList() : BreadcrumbBarPage
  • ReplacementColor() : MonochromaticOverlayPresenterProperties
  • ReplacementColorProperty() : MonochromaticOverlayPresenterProperties
  • ReplaceMultipleItems() : FlowLayoutCollectionChangeTests
  • RepopulateAndApplyPhotosCollection() : ItemsViewIntegrationPage
  • RepositionPopup() : TeachingTip
  • ReproTextBlock : RadioButtonsTestPageElements
  • RequestClose() : TabViewItem
  • RequestCloseCurrentTab() : TabView
  • RequestCloseTab() : TabView
  • RequestedRangeLength() : LinedFlowLayout
  • RequestedRangeStartIndex() : LinedFlowLayout
  • RequestEventArgs() : ScrollingBringingIntoViewEventArgs
  • RequestIgnored() : RefreshInfoProviderImplementation , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner , RefreshInfoProviderImpl
  • RequestItemsInfo() : LinedFlowLayout
  • RequestPassThroughElement() : MenuBar
  • RequestRefresh() : RefreshContainer , RefreshVisualizer
  • ReRenderCaption() : RatingControl
  • reserve() : VectorInnerImpl< VectorOptions, Wrapper >
  • Reset : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , CustomItemsSource , WinRTCollection , ItemsRepeaterScrollHost::BringIntoViewState , final , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , CollectionChangeDemo::MyDataSource
  • ResetableCollection() : ResetableCollection-g< T >
  • ResetActionButtonAsynchronouslyClick() : InfoBarPage
  • ResetActionButtonProperty() : InfoBarPage
  • ResetAll() : PointerInfo< T >
  • ResetAnchorElement() : ScrollPresenter
  • ResetAndRearrangeTopNavItems() : NavigationView
  • ResetAnticipatedView() : ScrollPresenter
  • ResetAttachedData() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • ResetCacheBuffer() : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • ResetCalendarItemCornerRadius_Click() : CalendarViewPage
  • ResetCollectionsButton_Click() : PaneLayoutTestPage
  • ResetContentMode_Click() : TreeViewPage
  • ResetControlWidth() : RatingControl
  • ResetCounts() : WebView2CoreObjectsPage
  • ResetElementAnimationProperties() : NavigationView
  • ResetEventCounters_Click() : NavigationViewPage
  • ResetExpectedViewportShift() : ViewportManagerWithPlatformFeatures
  • ResetExpressionAnimationStatusChanges() : ScrollPresenterTestHooksHelper
  • ResetFailedToAttachLightsCount() : MaterialHelper
  • ResetForcedIndexBasedLayoutOrientation() : Layout
  • ResetHideIndicatorsTimer() : ScrollView
  • ResetIgnoredValue() : SnapPointWrapper< T >
  • ResetInteractionRatios_Click() : RefreshContainerOnImagePage
  • ResetInteractionRatiosComboBox() : RefreshContainerOnImagePage
  • ResetIsAnimationsEnabledOverride() : ScrollPresenterTestHooksHelper
  • ResetIsMouseButtonPressed() : PointerInfo< T >
  • ResetIsMousePointerOver() : PointerInfo< T >
  • ResetIsPenPointerOver() : PointerInfo< T >
  • ResetIsTouchPointerOver() : PointerInfo< T >
  • ResetItemsInfo() : LinedFlowLayout
  • ResetItemsInfoForFastPath() : LinedFlowLayout
  • ResetItemsSource_Click() : TreeViewPage
  • ResetItemsSourceAsync_Click() : TreeViewPage
  • ResetItemsView() : ItemsViewTestsWithInputHelper
  • ResetLastBreadcrumbBarItem() : BreadcrumbBar
  • ResetLayerCollection() : MapControl
  • ResetLayoutExtent() : ViewportManagerWithPlatformFeatures
  • ResetLayoutForcedIndexBasedLayoutOrientation() : LayoutsTestHooks
  • ResetLayoutRealizationWindowCacheBuffer() : ViewportManagerDownLevel , ViewportManager , ViewportManagerWithPlatformFeatures
  • ResetLinedFlowLayout() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ResetLinesInfo() : LinedFlowLayout
  • ResetMouseInputState() : WebView2
  • ResetNoise() : MaterialHelper
  • ResetOffsetsInertiaDecayRate() : ScrollPresenter
  • ResetOwner() : AnimatedVisualPlayer::final
  • ResetPendingViewportShift() : ViewportManagerWithPlatformFeatures
  • ResetPointerHelper() : WebView2
  • ResetPointerPressed() : PointerInfo< T >
  • ResetProperties() : WebView2
  • ResetResult_Click() : NavigationViewTopNavOnlyPage
  • ResetScrollers() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , ViewportManager
  • ResetSizedLines() : LinedFlowLayout
  • ResetSpyOutput() : SwipeControlPage , RatingControlPage , DynamicPage
  • ResetStateCounts() : ScrollViewVisualStateCounts
  • ResetStates_Click() : RefreshContainerPage , RefreshContainerOnImagePage
  • ResetStatesComboBox() : RefreshContainerPage , RefreshContainerOnImagePage
  • resetSwipeItemChoices() : SwipeControlPage2
  • ResettingCollectionRemoveItemButton_ItemClick() : CollectionChangeDemo
  • ResettingListItems : CollectionChangeDemo
  • ResetTrackedPointerId() : PointerInfo< T > , NavigationViewItem , NavigationViewItemPresenter , AnnotatedScrollBar , BreadcrumbBarItem
  • ResetTransformWebView() : WebView2BasicPage
  • ResetUnshiftableShift() : ViewportManagerWithPlatformFeatures
  • ResetView() : ScrollPresenterChainingAndRailingPage , ScrollPresentersWithSimpleContentsPage , ScrollViewsWithSimpleContentsPage
  • ResetVisibleWindow() : ViewportManagerWithPlatformFeatures
  • ResetVisualProperties() : BreadcrumbBarItem
  • ResetWebViewVisibility() : WebView2BasicPage
  • ResetWebViewVisual() : WebView2BasicPage
  • ResetWith() : WinRTCollection
  • ResetZoomFactorInertiaDecayRate() : ScrollPresenter
  • Resize() : LinedFlowLayoutItemAspectRatios
  • ResizeRootGrid() : TextControlsPage
  • ResizeTest() : WebView2Tests
  • ResolveContainerForItem() : NavigationView
  • ResolvePath() : SelectionModel
  • ResourceAccessor() : sealed< T, fallback, RawStorageT >
  • ResourceLookup() : sealed< T, fallback, RawStorageT >
  • ResourceOverridablity() : ProgressBarTests
  • RestoreExpandedState() : NavigationViewItem
  • RestoreLayoutVirtualization() : PipsPager
  • RestoreLeftAdjacentTabSeparatorVisibility() : TabViewItem
  • RestoreOriginalVerticalScrollControllerAndVisibility() : ItemsView
  • RestoreScrollViewerWidth() : GroupedListViewBasePage , ListViewBasePage
  • Result : ScrollPresenterTests::ScrollPresenterOperation , ScrollingZoomCompletedEventArgs , ScrollingScrollCompletedEventArgs
  • Resume() : AnimatedVisualPlayer::final , AnimatedVisualPlayer , IAnimatedVisual
  • ReTemplateChangeStateTest() : ProgressBarTests
  • RetemplateUpdateIndicatorWidthTest() : ProgressBarTests
  • RetrieveBreadcrumbControl() : BreadcrumbTests
  • RetrievePipsPagerButtonSizesButton : PipsPagerElements
  • RetrieveRTLCheckBox() : BreadcrumbTests
  • RetrieveWidthSlider() : BreadcrumbTests
  • returnTopForOutOfWindowPlacementCheckBox : TeachingTipTestPageElements
  • ReuseKeyProperty() : RecyclePool
  • RevealAlwaysUseFallback() : RevealBrushTests
  • RevealBackgroundBrushes : LightConfigurationTests , RevealColorPage
  • RevealBasicPage() : RevealBasicPage
  • RevealBorderBrush() : RevealBorderBrush
  • RevealBorderBrushes : RevealColorPage
  • RevealBorderLightTouchTests() : RevealBrushTests
  • RevealBrush() : RevealBrushTestApi , RevealBrush
  • RevealBrushAudit() : RevealBrushTests
  • RevealBrushCacheFlags : MaterialHelperBase
  • RevealBrushFromMarkup() : RevealBrushTests
  • RevealBrushProperties() : RevealBrushProperties
  • RevealBrushTestApi : RevealBrush
  • RevealButton_Click() : RevealRegressionTestsPage
  • RevealButtonStates() : RevealBrushTests
  • RevealButtonStates_FastRelease_Values() : RevealBrushTests
  • RevealButtonStates_SlowRelease_Values() : RevealBrushTests
  • RevealButtonStates_Values() : RevealBrushTests
  • RevealColorPage() : RevealColorPage
  • RevealCreateThenEnableEffects() : RevealBrushTests
  • RevealFallbackPage() : RevealFallbackPage
  • revealHoverLightOffset_KeyboardExpression : RevealStatesPage
  • revealHoverLightOffset_PointerExpression : RevealStatesPage
  • RevealHoverLightPosition_Values() : RevealBrushTests
  • RevealHoverLightPositionTests() : RevealBrushTests
  • RevealList_SelectionChanged() : RevealScenarios
  • RevealListPage() : RevealListPage
  • RevealListViewItemStates() : RevealBrushTests
  • RevealMarkupPage() : RevealMarkupPage
  • RevealPage() : RevealPage
  • RevealRegressionTestsPage() : RevealRegressionTestsPage
  • RevealScenarioColors() : RevealScenarioColors
  • RevealScenarioGrid() : RevealScenarioGrid
  • RevealScenarioLights() : RevealScenarioLights
  • RevealScenarioList() : RevealScenarioList
  • RevealScenarios() : RevealScenarios
  • RevealScenarioSecondaryView() : RevealScenarioSecondaryView
  • RevealSetStateNoCrashWhenParentIsNotControl() : RevealBrushTests
  • RevealSimpleListPage() : RevealSimpleListPage
  • RevealState : RevealColorPage
  • RevealStatesHelper() : RevealBrushTests
  • RevealStatesPage() : RevealStatesPage
  • RevealTest : RevealScenarioLights
  • RevealTestApi : RevealHoverLight , RevealBorderLight , RevealTestApi
  • ReverseNegativePlaybackRateAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • ReverseNegativePlaybackRateAnimationTest() : AnimatedVisualPlayerTests
  • ReversePositivePlaybackRateAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • ReversePositivePlaybackRateAnimationTest() : AnimatedVisualPlayerTests
  • revoke() : RoutedEventHandler_revoker , ScopedBatchCompleted_revoker , XamlRootChanged_revoker , PropertyChanged_revoker
  • RevokeAll() : ItemContainerRevokers , NavigationViewItemBaseRevokers , PointerInfoRevokers , ComboBoxDropDownEventRevokers
  • RevokeItemsViewItemContainerRevokers() : ItemsView
  • RevokeListeners() : BreadcrumbBar , BreadcrumbBarItem
  • RevokeNavigationViewItemBaseRevokers() : NavigationView
  • RevokePartsListeners() : BreadcrumbBarItem
  • RevokeViewportChangedEvent() : TeachingTip
  • Rgb() : Rgb
  • RgbaColor() : SharedHelpers
  • RGBComboBoxItemAutomationId : ColorPickerTests
  • RgbTextBoxChanged : ColorPicker
  • rgx : AcrylicBrushTests
  • RichEditBoxDensityTest() : CommonStylesTests
  • RichEditBoxDensityTest_Click() : CommonStylesPage
  • Right : WebView2RenderingVerifier::NativeMethods::RECT
  • RightEdgePlacementTopLeftHighlightMargin() : TeachingTip
  • RightItems() : SwipeControlProperties
  • RightItemsProperty() : SwipeControlProperties
  • RightToLeftFlowDirection() : ScrollPresenterTests
  • Root() : AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , TreeStructure , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • RootGotFocus() : RadioButtonsPage
  • RootNodes() : TreeView
  • RootProgress() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • RootVisual() : AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • RotateButton_Click() : RefreshContainerPage , RefreshContainerOnImagePage
  • RotateExpandCollapseChevron() : NavigationViewItem , NavigationViewItemPresenter
  • RotationAngleInDegreesScalarAnimation_0_to_360_0() : AnimatedSettingsVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_0_to_360_1() : AnimatedSettingsVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_0_to_900() : AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_0_to_m20() : AnimatedSettingsVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_180_to_180() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_90_to_90() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • RoundedRectangle_375x667() : LottieLogo::LottieLogo_AnimatedVisual
  • RoundForLayout() : OrientationBasedMeasures
  • RoutedEventHandler_revoker() : RoutedEventHandler_revoker
  • RowSpacing() : ColumnMajorUniformToLargestGridLayoutProperties , ActivityFeedLayout
  • RowSpacingProperty : ActivityFeedLayout , ColumnMajorUniformToLargestGridLayoutProperties
  • RS2IsSafeToCreateNoise() : MaterialHelper
  • RS2MultiColumnKeyboardTest() : RadioButtonsTests
  • RTL_Checked() : BreadcrumbBarPage
  • RTL_Unchecked() : BreadcrumbBarPage
  • RTLCheckBox_Checked() : ColorPickerPage
  • RTLCheckBox_Unchecked() : ColorPickerPage
  • Ruler() : InkToolBarStencilButton , InkToolBarStencilButtonProperties
  • RulerProperty() : InkToolBarStencilButtonProperties
  • RunAcrylicAlwaysUseFallback() : AcrylicBrushPage
  • RunAcrylicCreatedInFallbackMode() : AcrylicBrushPage
  • RunAcrylicNoiseCache() : AcrylicBrushPage
  • RunAcrylicPropertyChanges() : AcrylicBrushPage
  • RunAsync() : DispatcherHelper
  • RunBasicAcrylicOnRectangle() : AcrylicBrushPage
  • RunCompactTests() : CommonStylesTests
  • RunDensityTests() : CommonStylesTests
  • RunElementTrackingTestRoutine() : ViewportTests
  • RunInitializer() : XamlTypeBase
  • RunRevealAlwaysUseFallback() : RevealFallbackPage
  • RunTest_Click() : CompactPage
  • RunTestButton_Clicked() : AcrylicRenderingPage , RevealMarkupPage , AcrylicBrushPage , AcrylicMarkupPage , RevealFallbackPage
  • RunTestWithComplexBackground() : AcrylicRenderingPage
  • RunTestWithRedBlueBackground() : AcrylicRenderingPage
  • RunTintTransitionDuration() : AcrylicBrushPage
  • RunVerifyAcrylicBrushEffect() : AcrylicBrushPage
  • RunVerifyDisconnectedState() : AcrylicBrushPage
  • RunVerifyDisconnectedState_AnimationCompleted() : AcrylicBrushPage
  • RunVerifyOpaqueTintOptimization() : AcrylicBrushPage
  • RVRefreshRequestedComboBox_SelectionChanged() : RefreshContainerPage
  • RVRefreshRequestedComboBoxSwitcher_Click() : RefreshContainerPage
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- s -

  • s_AcceptsExpressionProperty : NumberBoxProperties
  • s_ActionButtonCommandParameterProperty : TeachingTipProperties
  • s_ActionButtonCommandProperty : TeachingTipProperties
  • s_ActionButtonContentProperty : TeachingTipProperties
  • s_ActionButtonProperty : InfoBarProperties
  • s_ActionButtonStyleProperty : TeachingTipProperties
  • s_ActiveToolProperty : InkToolBarProperties
  • s_ActualImageBrushProperty : PersonPictureTemplateSettingsProperties
  • s_ActualInitialsProperty : PersonPictureTemplateSettingsProperties
  • s_ActualLineHeightProperty : LinedFlowLayoutProperties
  • s_AddTabButtonCommandParameterProperty : TabViewProperties
  • s_AddTabButtonCommandProperty : TabViewProperties
  • s_AllowDropTabsProperty : TabViewProperties
  • s_AlwaysShowHeaderProperty : NavigationViewProperties
  • s_AlwaysUseFallbackProperty : RevealBrushProperties , AcrylicBrushProperties
  • s_AnimationOptimizationProperty : AnimatedVisualPlayerProperties
  • s_appBarButtonDependencyProperties : CommandBarFlyout
  • s_appBarToggleButtonDependencyProperties : CommandBarFlyout
  • s_AreCheckStatesEnabledProperty : RadioMenuFlyoutItemProperties
  • s_ArePrecisionErasersVisibleProperty : InkToolBarEraserButtonProperties
  • s_AutoPlayProperty : AnimatedVisualPlayerProperties
  • s_AutoSuggestBoxProperty : NavigationViewProperties
  • s_AutoSuggestEventRevokersProperty : AutoSuggestBoxHelper
  • s_BackButtonVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_BackgroundProperty : ItemsRepeaterProperties , ScrollPresenterProperties , SwipeItemProperties
  • s_BadgeGlyphProperty : PersonPictureProperties
  • s_BadgeImageSourceProperty : PersonPictureProperties
  • s_BadgeNumberProperty : PersonPictureProperties
  • s_BadgeTextProperty : PersonPictureProperties
  • s_BehaviorOnInvokedProperty : SwipeItemProperties
  • s_BorderBrushProperty : LayoutPanelProperties
  • s_BorderThicknessProperty : LayoutPanelProperties
  • s_BottomItemsProperty : SwipeControlProperties
  • s_ButtonFlyoutPlacementProperty : InkToolBarProperties
  • s_ButtonPanelAlwaysShowFirstLastPageIndexProperty : PagerControlProperties
  • s_CanDragItemsProperty : TreeViewProperties
  • s_CanDragTabsProperty : TabViewProperties
  • s_CanGoBackProperty : WebView2Properties
  • s_CanGoForwardProperty : WebView2Properties
  • s_CanReorderItemsProperty : TreeViewProperties
  • s_CanReorderTabsProperty : TabViewProperties
  • s_CanTearOutTabsProperty : TabViewProperties
  • s_CanUserInvokeProperty : ItemContainerProperties
  • s_CanUserSelectProperty : ItemContainerProperties
  • s_CaptionProperty : RatingControlProperties
  • s_CenterProperty : MapControlProperties , RadialGradientBrushProperties
  • s_ChildProperty : ItemContainerProperties , ParallaxViewProperties
  • s_ChildrenProperty : InkToolBarProperties
  • s_ClipRectProperty : ProgressBarTemplateSettingsProperties
  • s_CloseAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_CloseButtonCommandParameterProperty : InfoBarProperties , TeachingTipProperties
  • s_CloseButtonCommandProperty : InfoBarProperties , TeachingTipProperties
  • s_CloseButtonContentProperty : TeachingTipProperties
  • s_CloseButtonOverlayModeProperty : TabViewProperties
  • s_CloseButtonStyleProperty : InfoBarProperties , TeachingTipProperties
  • s_CollapsedGlyphProperty : TreeViewItemProperties
  • s_CollapsedGlyphVisibilityProperty : TreeViewItemTemplateSettingsProperties
  • s_ColorChannelProperty : ColorPickerSliderProperties
  • s_ColorProperty : ColorPickerProperties , ColorSpectrumProperties , RevealBrushProperties , XamlAmbientLightProperties
  • s_ColorSpectrumComponentsProperty : ColorPickerProperties
  • s_ColorSpectrumShapeProperty : ColorPickerProperties
  • s_ColumnSpacingProperty : ColumnMajorUniformToLargestGridLayoutProperties
  • s_CommandParameterProperty : SplitButtonProperties , SwipeItemProperties
  • s_CommandProperty : SplitButtonProperties , SwipeItemProperties
  • s_CompactModeThresholdWidthProperty : NavigationViewProperties
  • s_CompactPaneLengthProperty : NavigationViewProperties , NavigationViewItemProperties
  • s_ComponentsProperty : ColorSpectrumProperties
  • s_ComputedHorizontalScrollBarVisibilityProperty : ScrollViewProperties
  • s_ComputedHorizontalScrollModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ComputedVerticalScrollBarVisibilityProperty : ScrollViewProperties
  • s_ComputedVerticalScrollModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ConfigurationContentProperty : InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties
  • s_constantAttenuation : RevealHoverLight
  • s_ContactProperty : PersonPictureProperties
  • s_Container2AnimationEndPositionProperty : ProgressBarTemplateSettingsProperties
  • s_Container2AnimationStartPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContainerAnimationEndPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContainerAnimationMidPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContainerAnimationStartPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContentClipRectProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ContentHeightProperty : ExpanderTemplateSettingsProperties
  • s_ContentOrientationProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ContentOverlayProperty : NavigationViewProperties
  • s_ContentProperty : InfoBarProperties , RefreshVisualizerProperties , ScrollPresenterProperties , ScrollViewProperties , TitleBarProperties , TreeViewNodeProperties
  • s_ContentTemplateProperty : InfoBarProperties
  • s_ControlTypeProperty : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • s_ConversionKindProperty : CornerRadiusToThicknessConverterProperties
  • s_CornerRadiusProperty : LayoutPanelProperties
  • s_CurrentItemIndexProperty : ItemsViewProperties
  • s_CurrentWidthProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_CustomPenProperty : InkToolBarCustomPenButtonProperties
  • s_DefaultBackgroundColorProperty : WebView2Properties
  • s_defaultTipHeightAndWidth : TeachingTip
  • s_DepthProperty : TreeViewNodeProperties
  • s_DescriptionProperty : NumberBoxProperties
  • s_DetailLabelTemplateProperty : AnnotatedScrollBarProperties
  • s_DeterminateSourceProperty : ProgressRingProperties
  • s_DiagnosticsProperty : AnimatedVisualPlayerProperties
  • s_DisabledGlyphProperty : RatingItemFontInfoProperties
  • s_DisabledImageProperty : RatingItemImageInfoProperties
  • s_DisplayModeProperty : NavigationViewProperties , PagerControlProperties
  • s_DisplayNameProperty : PersonPictureProperties
  • s_DragItemsCountProperty : TreeViewItemTemplateSettingsProperties
  • s_DropDownEventRevokersProperty : ComboBoxHelper
  • s_DurationProperty : AnimatedVisualPlayerProperties
  • s_elementFactoryElementIndex : RepeaterTestHooks
  • s_EllipseAnimationEndPositionProperty : ProgressBarTemplateSettingsProperties
  • s_EllipseAnimationWellPositionProperty : ProgressBarTemplateSettingsProperties
  • s_EllipseDiameterProperty : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • s_EllipseOffsetProperty : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • s_ExpandDirectionProperty : ExpanderProperties
  • s_ExpandDownAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandDownAnimationHoldPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandDownAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandDownOverflowVerticalPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandedGlyphProperty : TreeViewItemProperties
  • s_ExpandedGlyphVisibilityProperty : TreeViewItemTemplateSettingsProperties
  • s_ExpandedModeThresholdWidthProperty : NavigationViewProperties
  • s_ExpandedWidthProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpAnimationHoldPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpOverflowVerticalPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_FallbackContentProperty : AnimatedVisualPlayerProperties
  • s_FallbackIconSourceProperty : AnimatedIconProperties , AnimatedIconSourceProperties
  • s_FilterProperty : CornerRadiusFilterConverterProperties
  • s_FirstButtonCommandProperty : PagerControlProperties
  • s_FirstButtonStyleProperty : PagerControlProperties
  • s_FirstButtonVisibilityProperty : PagerControlProperties
  • s_FlyoutProperty : SplitButtonProperties
  • s_FlyoutTemplateSettingsProperty : CommandBarFlyoutCommandBarProperties
  • s_FooterMenuItemsProperty : NavigationViewProperties
  • s_FooterMenuItemsSourceProperty : NavigationViewProperties
  • s_FooterProperty : TitleBarProperties
  • s_ForegroundProperty : SwipeItemProperties
  • s_GlyphBrushProperty : TreeViewItemProperties
  • s_GlyphOpacityProperty : TreeViewItemProperties
  • s_GlyphProperty : RatingItemFontInfoProperties
  • s_GlyphSizeProperty : TreeViewItemProperties
  • s_GradientOriginProperty : RadialGradientBrushProperties
  • s_GroupNameProperty : RadioMenuFlyoutItemProperties
  • s_HasChildrenProperty : TreeViewNodeProperties
  • s_HasUnrealizedChildrenProperty : NavigationViewItemProperties , TreeViewItemProperties
  • s_HeaderProperty : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties
  • s_HeaderTemplateProperty : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties
  • s_HeaderTemplateSelectorProperty : ExpanderProperties
  • s_HeroContentPlacementProperty : TeachingTipProperties
  • s_HeroContentProperty : TeachingTipProperties
  • s_HorizontalAnchorRatioProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalCacheLengthProperty : ItemsRepeaterProperties
  • s_horizontalOffsetPropertyName : ScrollInputHelper
  • s_HorizontalOrientationMarginProperty : InfoBarPanelProperties
  • s_HorizontalOrientationPaddingProperty : InfoBarPanelProperties
  • s_HorizontalScrollBarVisibilityProperty : ScrollViewProperties
  • s_HorizontalScrollChainModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalScrollModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalScrollRailModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalShiftProperty : ParallaxViewProperties
  • s_HorizontalSourceEndOffsetProperty : ParallaxViewProperties
  • s_HorizontalSourceOffsetKindProperty : ParallaxViewProperties
  • s_HorizontalSourceStartOffsetProperty : ParallaxViewProperties
  • s_HsvColorProperty : ColorSpectrumProperties
  • s_IconElementProperty : InfoBadgeTemplateSettingsProperties , InfoBarTemplateSettingsProperties , TabViewItemTemplateSettingsProperties , TeachingTipTemplateSettingsProperties , TitleBarTemplateSettingsProperties
  • s_IconProperty : NavigationViewItemProperties , NavigationViewItemPresenterProperties , SelectorBarItemProperties
  • s_IconSourceProperty : InfoBadgeProperties , InfoBarProperties , SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties
  • s_IconWidthProperty : NavigationViewItemPresenterTemplateSettingsProperties
  • s_IgnoredInputKindsProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ImageProperty : RatingItemImageInfoProperties
  • s_ImageSourceProperty : ImageIconSourceProperties
  • s_IndentationProperty : TreeViewItemTemplateSettingsProperties
  • s_IndeterminateSourceProperty : ProgressRingProperties
  • s_IndicatorLengthDeltaProperty : ProgressBarTemplateSettingsProperties
  • s_inertiaDecayRate : ScrollBarController
  • s_InfoBadgeCornerRadiusProperty : InfoBadgeTemplateSettingsProperties
  • s_InfoBadgeProperty : NavigationViewItemProperties , NavigationViewItemPresenterProperties
  • s_InfoProviderProperty : RefreshVisualizerProperties
  • s_InitialControlsProperty : InkToolBarProperties
  • s_initialized : MUXControlsFactory
  • s_InitialSetValueProperty : RatingControlProperties
  • s_InitialsProperty : PersonPictureProperties
  • s_InkDrawingAttributesProperty : InkToolBarProperties
  • s_InputScopeProperty : NumberBoxProperties
  • s_instance : SplitButtonTestHelper
  • s_InteractiveControlsVisibleProperty : MapControlProperties
  • s_InterpolationSpaceProperty : RadialGradientBrushProperties
  • s_IsActiveProperty : ProgressRingProperties
  • s_IsAddTabButtonVisibleProperty : TabViewProperties
  • s_IsAlphaEnabledProperty : ColorPickerProperties
  • s_IsAlphaSliderVisibleProperty : ColorPickerProperties
  • s_IsAlphaTextInputVisibleProperty : ColorPickerProperties
  • s_IsAnimatedVisualLoadedProperty : AnimatedVisualPlayerProperties
  • s_IsBackButtonVisibleProperty : NavigationViewProperties , TitleBarProperties
  • s_IsBackEnabledProperty : NavigationViewProperties , TitleBarProperties
  • s_IsCheckedProperty : InkToolBarFlyoutItemProperties , RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties
  • s_IsChildSelectedProperty : NavigationViewItemProperties
  • s_IsClearAllVisibleProperty : InkToolBarEraserButtonProperties
  • s_IsClearEnabledProperty : RatingControlProperties
  • s_IsClosableProperty : InfoBarProperties , TabViewItemProperties
  • s_IsColorChannelTextInputVisibleProperty : ColorPickerProperties
  • s_IsColorPreviewVisibleProperty : ColorPickerProperties
  • s_IsColorSliderVisibleProperty : ColorPickerProperties
  • s_IsColorSpectrumVisibleProperty : ColorPickerProperties
  • s_IsContainerProperty : RevealBrush
  • s_IsDebugOutputEnabled : AnnotatedScrollBarTrace , CommandBarFlyoutTrace , InkToolBarTrace , ItemContainerTrace , ItemsViewTrace , NavigationViewTrace , PTRTrace , ItemsRepeaterTrace , LinedFlowLayoutTrace , ScrollPresenterTrace , CompositionScrollController , ScrollViewTrace , SelectorBarTrace , SwipeControlTrace , TabViewTrace
  • s_IsEnabledProperty : InkCanvasProperties
  • s_IsExpandedProperty : ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties
  • s_IsExtensionGlyphShownProperty : InkToolBarMenuButtonProperties , InkToolBarToolButtonProperties
  • s_IsGroupProperty : PersonPictureProperties
  • s_IsHexInputVisibleProperty : ColorPickerProperties
  • s_IsHorizontalShiftClampedProperty : ParallaxViewProperties
  • s_IsIconVisibleProperty : InfoBarProperties
  • s_IsIndeterminateProperty : ProgressBarProperties , ProgressRingProperties
  • s_IsItemInvokedEnabledProperty : ItemsViewProperties
  • s_IsLightDismissEnabledProperty : TeachingTipProperties
  • s_IsMoreButtonVisibleProperty : ColorPickerProperties
  • s_isMouseModeEnabled : SharedHelpers
  • s_isMouseModeEnabledInitialized : SharedHelpers
  • s_isOnXbox : SharedHelpers
  • s_isOnXboxInitialized : SharedHelpers
  • s_IsOpenProperty : InfoBarProperties , TeachingTipProperties
  • s_IsPaneOpenProperty : NavigationViewProperties
  • s_IsPaneToggleButtonVisibleProperty : NavigationViewProperties , TitleBarProperties
  • s_IsPaneVisibleProperty : NavigationViewProperties
  • s_IsPlayingProperty : AnimatedVisualPlayerProperties
  • s_IsProtractorItemVisibleProperty : InkToolBarStencilButtonProperties
  • s_IsReadOnlyProperty : RatingControlProperties
  • s_IsRulerButtonCheckedProperty : InkToolBarProperties
  • s_IsRulerItemVisibleProperty : InkToolBarStencilButtonProperties
  • s_IsSelectedProperty : ItemContainerProperties , NavigationViewItemBaseProperties
  • s_IsSettingsVisibleProperty : NavigationViewProperties
  • s_IsStencilButtonCheckedProperty : InkToolBarProperties
  • s_IsStrokeEraserVisibleProperty : InkToolBarEraserButtonProperties
  • s_IsTargetProperty : XamlAmbientLightProperties
  • s_IsTitleBarAutoPaddingEnabledProperty : NavigationViewProperties
  • s_IsVerboseDebugOutputEnabled : AnnotatedScrollBarTrace , CommandBarFlyoutTrace , InkToolBarTrace , ItemContainerTrace , ItemsViewTrace , NavigationViewTrace , PTRTrace , ItemsRepeaterTrace , LinedFlowLayoutTrace , ScrollPresenterTrace , ScrollViewTrace , SelectorBarTrace , SwipeControlTrace , TabViewTrace
  • s_IsVerticalShiftClampedProperty : ParallaxViewProperties
  • s_IsVirtualizationEnabledProperty : StackLayoutProperties
  • s_IsWrapEnabledProperty : NumberBoxProperties
  • s_ItemContainerStyleProperty : TreeViewProperties
  • s_ItemContainerStyleSelectorProperty : TreeViewProperties
  • s_ItemContainerTransitionsProperty : TreeViewProperties
  • s_ItemInfoProperty : RatingControlProperties
  • s_ItemsJustificationProperty : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • s_ItemsProperty : MenuBarProperties , MenuBarItemProperties , RadioButtonsProperties , SelectorBarProperties
  • s_ItemsSourceProperty : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties , TreeViewProperties , TreeViewItemProperties
  • s_ItemsStretchProperty : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • s_ItemTemplateProperty : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties , TreeViewProperties
  • s_ItemTemplateSelectorProperty : TreeViewProperties
  • s_ItemTransitionProviderProperty : ItemsRepeaterProperties , ItemsViewProperties
  • s_KeepInteriorCornersSquareProperty : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • s_KindProperty : InkToolBarFlyoutItemProperties , MicaBackdropProperties
  • s_LabelsProperty : AnnotatedScrollBarProperties
  • s_LabelTemplateProperty : AnnotatedScrollBarProperties
  • s_LargeChangeProperty : NumberBoxProperties
  • s_LargeLibrary : PictureLibrary
  • s_LastButtonCommandProperty : PagerControlProperties
  • s_LastButtonStyleProperty : PagerControlProperties
  • s_LastButtonVisibilityProperty : PagerControlProperties
  • s_LayersProperty : MapControlProperties
  • s_LayoutProperty : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • s_LeftItemsProperty : SwipeControlProperties
  • s_LeftPaneVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_LineAlignmentProperty : FlowLayoutProperties
  • s_linearAttenuation : RevealHoverLight
  • s_LineHeightProperty : LinedFlowLayoutProperties
  • s_LineSpacingProperty : LinedFlowLayoutProperties
  • s_LocationProperty : MapIconProperties
  • s_MapElementsProperty : MapElementsLayerProperties
  • s_mapHtmlContent : MapControl
  • s_MappingModeProperty : RadialGradientBrushProperties
  • s_MapServiceTokenProperty : MapControlProperties
  • s_MaxColumnsProperty : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties
  • s_MaxHorizontalShiftRatioProperty : ParallaxViewProperties
  • s_MaxHueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_maximumPercent : ScrollPresenterAutomationPeer
  • s_MaximumProperty : NumberBoxProperties , ProgressRingProperties
  • s_MaximumRowsOrColumnsProperty : UniformGridLayoutProperties
  • s_MaxRatingProperty : RatingControlProperties
  • s_MaxSaturationProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_MaxSideLengthProperty : ProgressRingTemplateSettingsProperties
  • s_maxStackLayoutIterations : ItemsRepeater
  • s_MaxStrokeWidthProperty : InkToolBarPenButtonProperties
  • s_MaxSurfaceOpacityProperty : SpectrumBrushProperties
  • s_MaxSurfaceProperty : SpectrumBrushProperties
  • s_MaxValueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_MaxVerticalShiftRatioProperty : ParallaxViewProperties
  • s_MaxVisiblePipsProperty : PipsPagerProperties
  • s_MaxZoomFactorProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_MenuItemContainerStyleProperty : NavigationViewProperties
  • s_MenuItemContainerStyleSelectorProperty : NavigationViewProperties
  • s_MenuItemsProperty : NavigationViewProperties , NavigationViewItemProperties
  • s_MenuItemsSourceProperty : NavigationViewProperties , NavigationViewItemProperties
  • s_MenuItemTemplateProperty : NavigationViewProperties
  • s_MenuItemTemplateSelectorProperty : NavigationViewProperties
  • s_MenuKindProperty : InkToolBarMenuButtonProperties
  • s_MessageProperty : InfoBarProperties
  • s_MinColumnSpacingProperty : FlowLayoutProperties , UniformGridLayoutProperties
  • s_MinHueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_minimumPercent : ScrollPresenterAutomationPeer
  • s_MinimumProperty : NumberBoxProperties , ProgressRingProperties
  • s_MinItemHeightProperty : UniformGridLayoutProperties
  • s_MinItemSpacingProperty : LinedFlowLayoutProperties
  • s_MinItemWidthProperty : UniformGridLayoutProperties
  • s_MinRowSpacingProperty : FlowLayoutProperties , UniformGridLayoutProperties
  • s_MinSaturationProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_MinStrokeWidthProperty : InkToolBarPenButtonProperties
  • s_MinSurfaceProperty : SpectrumBrushProperties
  • s_MinTallModeHeightProperty : TwoPaneViewProperties
  • s_MinValueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_MinWideModeWidthProperty : TwoPaneViewProperties
  • s_MinZoomFactorProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_MirroredWhenRightToLeftProperty : AnimatedIconProperties , AnimatedIconSourceProperties
  • s_ModeProperty : SwipeItemsProperties , TwoPaneViewProperties
  • s_MultiplierProperty : CornerRadiusToThicknessConverterProperties
  • s_MultiSelectModeProperty : ItemContainerProperties
  • s_NegativeContentHeightProperty : ExpanderTemplateSettingsProperties
  • s_NextButtonCommandProperty : PagerControlProperties
  • s_NextButtonStyleProperty : PagerControlProperties , PipsPagerProperties
  • s_NextButtonVisibilityProperty : PagerControlProperties , PipsPagerProperties
  • s_noOpCorrelationId : ScrollPresenter , ScrollView
  • s_NormalPipStyleProperty : PipsPagerProperties
  • s_noScroll : ScrollPresenterAutomationPeer
  • s_NumberFormatterProperty : NumberBoxProperties
  • s_NumberOfPagesProperty : PagerControlProperties , PipsPagerProperties
  • s_NumberPanelItemsProperty : PagerControlTemplateSettingsProperties
  • s_OpenAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_OpenAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_OpenPaneLengthProperty : NavigationViewProperties , NavigationViewTemplateSettingsProperties
  • s_OrientationProperty : ColorPickerProperties , FlowLayoutProperties , InkToolBarProperties , PipsPagerProperties , RefreshVisualizerProperties , StackLayoutProperties , UniformGridLayoutProperties
  • s_originTemplateProperty : RecyclePool
  • s_OverflowButtonVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_OverflowContentClipRectProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_OverflowLabelModeProperty : NavigationViewProperties
  • s_PaddingProperty : LayoutPanelProperties
  • s_PagerInputCommandProperty : PagerControlProperties
  • s_PagesProperty : PagerControlTemplateSettingsProperties
  • s_PaletteProperty : InkToolBarPenButtonProperties
  • s_Pane1LengthProperty : TwoPaneViewProperties
  • s_Pane1Property : TwoPaneViewProperties
  • s_Pane2LengthProperty : TwoPaneViewProperties
  • s_Pane2Property : TwoPaneViewProperties
  • s_PaneCustomContentProperty : NavigationViewProperties
  • s_PaneDisplayModeProperty : NavigationViewProperties
  • s_PaneFooterProperty : NavigationViewProperties
  • s_PaneHeaderProperty : NavigationViewProperties
  • s_PanePriorityProperty : TwoPaneViewProperties
  • s_PaneTitleProperty : NavigationViewProperties
  • s_PaneToggleButtonStyleProperty : NavigationViewProperties
  • s_PaneToggleButtonVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_PaneToggleButtonWidthProperty : NavigationViewTemplateSettingsProperties
  • s_PenButtonProperty : InkToolBarPenConfigurationControlProperties
  • s_pipButtonHandlersProperty : PipsPager
  • s_PipsPagerItemsProperty : PipsPagerTemplateSettingsProperties
  • s_PlaceholderGlyphProperty : RatingItemFontInfoProperties
  • s_PlaceholderImageProperty : RatingItemImageInfoProperties
  • s_PlaceholderTextProperty : NumberBoxProperties
  • s_PlaceholderValueProperty : RatingControlProperties
  • s_PlacementMarginProperty : TeachingTipProperties
  • s_PlaybackRateProperty : AnimatedVisualPlayerProperties
  • s_PointerOverGlyphProperty : RatingItemFontInfoProperties
  • s_PointerOverImageProperty : RatingItemImageInfoProperties
  • s_PointerOverPlaceholderGlyphProperty : RatingItemFontInfoProperties
  • s_PointerOverPlaceholderImageProperty : RatingItemImageInfoProperties
  • s_PoolInstanceProperty : RecyclePoolProperties , RecyclePool
  • s_PreferredPlacementProperty : TeachingTipProperties
  • s_PreferSmallImageProperty : PersonPictureProperties
  • s_PrefixTextProperty : PagerControlProperties
  • s_pressSpotLightStates : RevealHoverLight
  • s_PreventKeyboardDisplayOnProgrammaticFocusProperty : NumberBoxProperties
  • s_PreviousButtonCommandProperty : PagerControlProperties
  • s_PreviousButtonStyleProperty : PagerControlProperties , PipsPagerProperties
  • s_PreviousButtonVisibilityProperty : PagerControlProperties , PipsPagerProperties
  • s_PreviousColorProperty : ColorPickerProperties
  • s_ProfilePictureProperty : PersonPictureProperties
  • s_ProtractorProperty : InkToolBarStencilButtonProperties
  • s_PullDirectionProperty : RefreshContainerProperties
  • s_RadiusXProperty : RadialGradientBrushProperties
  • s_RadiusYProperty : RadialGradientBrushProperties
  • s_ReplacementColorProperty : MonochromaticOverlayPresenterProperties
  • s_reuseKeyProperty : RecyclePool
  • s_revealHoverSpotlightStates : RevealHoverLight
  • s_RightItemsProperty : SwipeControlProperties
  • s_RowSpacingProperty : ColumnMajorUniformToLargestGridLayoutProperties
  • s_RulerProperty : InkToolBarStencilButtonProperties
  • s_ScaleProperty : CornerRadiusFilterConverterProperties
  • s_scalePropertyName : ScrollInputHelper
  • s_ScrollPresenterProperty : ScrollViewProperties
  • s_ScrollViewProperty : ItemsViewProperties
  • s_SelectedBrushIndexProperty : InkToolBarPenButtonProperties
  • s_SelectedBrushProperty : InkToolBarPenButtonProperties
  • s_SelectedEraserProperty : InkToolBarEraserButtonProperties
  • s_SelectedIndexProperty : RadioButtonsProperties , TabViewProperties
  • s_SelectedItemProperty : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties
  • s_SelectedPageIndexProperty : PagerControlProperties , PipsPagerProperties
  • s_SelectedPipStyleProperty : PipsPagerProperties
  • s_SelectedStencilProperty : InkToolBarStencilButtonProperties
  • s_SelectedStrokeWidthProperty : InkToolBarPenButtonProperties
  • s_SelectionFlyoutProperty : NumberBoxProperties
  • s_SelectionFollowsFocusProperty : NavigationViewProperties
  • s_SelectionHighlightColorProperty : NumberBoxProperties
  • s_selectionMap : RadioMenuFlyoutItem
  • s_SelectionModeProperty : ItemsViewProperties , TreeViewProperties
  • s_SelectsOnInvokedProperty : NavigationViewItemProperties
  • s_SettingsItemProperty : NavigationViewProperties
  • s_SeverityProperty : InfoBarProperties
  • s_ShapeProperty : ColorSpectrumProperties
  • s_ShouldConstrainToRootBoundsProperty : TeachingTipProperties
  • s_ShoulderNavigationEnabledProperty : NavigationViewProperties
  • s_ShowErrorProperty : ProgressBarProperties
  • s_ShowPausedProperty : ProgressBarProperties
  • s_SingleSelectionFollowsFocusProperty : NavigationViewTemplateSettingsProperties
  • s_SmallChangeProperty : AnnotatedScrollBarProperties , NumberBoxProperties
  • s_SmallerIconWidthProperty : NavigationViewItemPresenterTemplateSettingsProperties
  • s_SmallerPaneToggleButtonWidthProperty : NavigationViewTemplateSettingsProperties
  • s_SmallLibrary : PictureLibrary
  • s_SourceElementProperty : MonochromaticOverlayPresenterProperties
  • s_SourceProperty : AnimatedIconProperties , AnimatedIconSourceProperties , AnimatedVisualPlayerProperties , ImageIconProperties , ParallaxViewProperties , WebView2Properties
  • s_SpacingProperty : StackLayoutProperties
  • s_SpinButtonPlacementModeProperty : NumberBoxProperties
  • s_SpreadMethodProperty : RadialGradientBrushProperties
  • s_StateProperty : AnimatedIconProperties , RefreshVisualizerProperties , RevealBrushProperties
  • s_StretchProperty : AnimatedVisualPlayerProperties
  • s_SubtitleProperty : TeachingTipProperties , TitleBarProperties
  • s_SuffixTextProperty : PagerControlProperties
  • s_SystemBackdropProperty : CommandBarFlyoutCommandBarProperties
  • s_TabGeometryProperty : TabViewItemTemplateSettingsProperties
  • s_TabItemsProperty : TabViewProperties
  • s_TabItemsSourceProperty : TabViewProperties
  • s_TabItemTemplateProperty : TabViewProperties
  • s_TabItemTemplateSelectorProperty : TabViewProperties
  • s_TabStripFooterProperty : TabViewProperties
  • s_TabStripFooterTemplateProperty : TabViewProperties
  • s_TabStripHeaderProperty : TabViewProperties
  • s_TabStripHeaderTemplateProperty : TabViewProperties
  • s_TabViewTemplateSettingsProperty : TabViewItemProperties
  • s_tabViewWithTearOutList : TabView
  • s_TabWidthModeProperty : TabViewProperties
  • s_tabWithTearOutListMutex : TabView
  • s_tailOcclusionAmount : TeachingTip
  • s_TailVisibilityProperty : TeachingTipProperties
  • s_TallModeConfigurationProperty : TwoPaneViewProperties
  • s_TargetInkCanvasProperty : InkToolBarProperties
  • s_TargetInkPresenterProperty : InkToolBarProperties
  • s_TargetProperty : TeachingTipProperties
  • s_TargetThemeProperty : RevealBrushProperties
  • s_TemplateSettingsProperty : ExpanderProperties , InfoBadgeProperties , InfoBarProperties , NavigationViewProperties , NavigationViewItemPresenterProperties , PagerControlProperties , PersonPictureProperties , PipsPagerProperties , ProgressBarProperties , ProgressRingProperties , TeachingTipProperties , TitleBarProperties
  • s_testHooks : AnimatedIconTestHooks , ItemsViewTestHooks , RadioButtonsTestHooks , LayoutsTestHooks , RepeaterTestHooks , ScrollPresenterTestHooks , ScrollViewTestHooks , SwipeTestHooks , TeachingTipTestHooks , MUXControlsTestHooks
  • s_TextAlignmentProperty : NumberBoxProperties
  • s_TextProperty : NumberBoxProperties , SelectorBarItemProperties , SwipeItemProperties
  • s_TextReadingOrderProperty : NumberBoxProperties
  • s_TintColorProperty : AcrylicBrushProperties
  • s_TintLuminosityOpacityProperty : AcrylicBrushProperties
  • s_TintOpacityProperty : AcrylicBrushProperties
  • s_TintTransitionDurationProperty : AcrylicBrushProperties
  • s_TitleProperty : InfoBarProperties , MenuBarItemProperties , TeachingTipProperties , TitleBarProperties
  • s_tlsInstanceNoRef : LifetimeHandler
  • s_TopItemsProperty : SwipeControlProperties
  • s_TopLeftHighlightMarginProperty : TeachingTipTemplateSettingsProperties
  • s_TopPaddingProperty : NavigationViewTemplateSettingsProperties
  • s_TopPaneVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_TopRightHighlightMarginProperty : TeachingTipTemplateSettingsProperties
  • s_translationAndZoomFactorAnimationsRestartTicks : ScrollPresenter
  • s_TreeViewItemTemplateSettingsProperty : TreeViewItemProperties
  • s_typeEntriesMutex : XamlMetadataProvider
  • s_UnsetGlyphProperty : RatingItemFontInfoProperties
  • s_UnsetImageProperty : RatingItemImageInfoProperties
  • s_untargetedTipWindowEdgeMargin : TeachingTip
  • s_UseCompactResourcesProperty : XamlControlsResourcesProperties
  • s_ValidationModeProperty : NumberBoxProperties
  • s_ValueProperty : InfoBadgeProperties , NumberBoxProperties , ProgressRingProperties , RatingControlProperties
  • s_velocityNeededPerPixel : IScrollControllerAdapter
  • s_VerticalAnchorRatioProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_VerticalCacheLengthProperty : ItemsRepeaterProperties
  • s_verticalOffsetPropertyName : ScrollInputHelper
  • s_VerticalOrientationMarginProperty : InfoBarPanelProperties
  • s_VerticalOrientationPaddingProperty : InfoBarPanelProperties
  • s_VerticalScrollBarVisibilityProperty : ScrollViewProperties
  • s_VerticalScrollChainModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_VerticalScrollControllerProperty : ItemsViewProperties
  • s_VerticalScrollModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_VerticalScrollRailModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_VerticalShiftProperty : ParallaxViewProperties
  • s_VerticalSourceEndOffsetProperty : ParallaxViewProperties
  • s_VerticalSourceOffsetKindProperty : ParallaxViewProperties
  • s_VerticalSourceStartOffsetProperty : ParallaxViewProperties
  • s_VisualizerProperty : RefreshContainerProperties
  • s_WideModeConfigurationProperty : TwoPaneViewProperties
  • s_WidthExpansionAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionDeltaProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionMoreButtonAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionMoreButtonAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WrapModeProperty : PipsPagerProperties
  • s_ZoomChainModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ZoomLevelProperty : MapControlProperties
  • s_ZoomModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • safe_get() : sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • SafeGetAt() : VectorInnerImpl< VectorOptions, Wrapper >
  • SampleDataSource()
: ScrollPresenterBringIntoViewPage::SampleDataSource
, ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • SamplePointColors() : AcrylicRenderingPage
  • Saturation() : ISaturationEffect
  • SaturationLabelAutomationId : ColorPickerTests
  • SaturationTextBoxAutomationId : ColorPickerTests
  • sc_ambientContributionColor : RevealBrush
  • sc_blurRadius : AcrylicBrush
  • sc_colorToAlphaMatrix : RevealBrush
  • sc_controllerDefaultBackgroundColor : WebView2
  • sc_defaultColor : XamlAmbientLight , RevealBrush
  • sc_diffuseAmount : RevealBrush
  • sc_diffuseAmountBorder : RevealBrush
  • sc_luminanceToAlphaMatrix : RevealBrush
  • sc_maxFailedToAttachLightsCount : MaterialHelper
  • sc_noiseOpacity : AcrylicBrush
  • sc_saturation : AcrylicBrush
  • sc_specularAmount : RevealBrush
  • sc_specularAmountBorder : RevealBrush
  • sc_specularShine : RevealBrush
  • sc_specularShineBorder : RevealBrush
  • ScalarAnimation_1_to_1() : AnimatedFindVisualSource_AnimatedVisual
  • Scale() : CornerRadiusFilterConverterProperties
  • ScaleAnimatedVerticalListDemo() : ScaleAnimatedVerticalListDemo
  • ScaleAnimation : RatingControlPage
  • ScaledTouchTest() : WebView2Tests
  • ScaleIn() : LinedFlowLayoutItemCollectionTransitionProvider
  • ScaleOut() : LinedFlowLayoutItemCollectionTransitionProvider
  • ScalePointToPhysicalPixels() : WebView2
  • ScaleProperty() : CornerRadiusFilterConverterProperties
  • ScaleRectToPhysicalPixels() : WebView2
  • ScaleXScalarAnimation_2p25_to_2p25() : AnimatedBackVisualSource_AnimatedVisual
  • ScaleXScalarAnimation_2p749_to_2p749() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ScaleYScalarAnimation_2p25_to_2p25() : AnimatedBackVisualSource_AnimatedVisual
  • ScaleYScalarAnimation_2p75_to_2p75() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ScheduleActionAfterWait() : SharedHelpers
  • ScopedBatchCompleted_revoker() : ScopedBatchCompleted_revoker
  • ScrambleButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • Scroll : ScrollPresenter , ScrollPresenterAutomationPeer , ScrollPresenterDynamicPage
  • ScrollableHeight() : ScrollPresenter , ScrollView
  • ScrollableWidth() : ScrollPresenter , ScrollView
  • ScrollAnimationStarting() : ScrollPresenterProperties , ScrollViewProperties
  • scrollBar : ScrollBarController
  • ScrollBarController() : ScrollBarController
  • ScrollBarPage() : ScrollBarPage
  • ScrollBarScroll() : ScrollBarController
  • ScrollBarsSeparatorCollapsedDisabledStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorCollapsedStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorCollapsedWithoutAnimationStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorDisplayedWithoutAnimationStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorExpandedStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorExpandedWithoutAnimationStateCount : ScrollViewVisualStateCounts
  • ScrollBarValueChanged() : ScrollBarController
  • ScrollButtonToolTipTest() : TabViewTests
  • ScrollBy() : ScrollPresenterTests , ScrollPresenter , BiDirectionalScrollController , CompositionScrollController , ScrollView , TeachingTipTests
  • ScrollByRequested : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController
  • ScrollCompleted : BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , ScrollPresenterProperties , ScrollViewProperties
  • ScrollController() : AnnotatedScrollBar
  • ScrollController_AddScrollVelocityRequestedLog() : ItemsViewIntegrationPage
  • ScrollController_ScrollByRequestedLog() : ItemsViewIntegrationPage
  • ScrollController_ScrollToRequestedLog() : ItemsViewIntegrationPage
  • ScrollControllerAddScrollVelocityRequestedEventArgs() : ScrollControllerAddScrollVelocityRequestedEventArgs
  • ScrollControllerPanRequestedEventArgs() : ScrollControllerPanRequestedEventArgs
  • ScrollControllersAutoHidingChangedDbg() : ScrollView
  • ScrollControllerScrollByRequestedEventArgs() : ScrollControllerScrollByRequestedEventArgs
  • ScrollControllerScrollToRequestedEventArgs() : ScrollControllerScrollToRequestedEventArgs
  • scrolledElement : CanvasScrollControllerConsumer
  • ScrolledElementManipulationCompleted() : CanvasScrollControllerConsumer
  • ScrolledElementManipulationDelta() : CanvasScrollControllerConsumer
  • ScrolledElementManipulationStarting() : CanvasScrollControllerConsumer
  • Scroller() : ViewportManagerDownLevel::ScrollerInfo
  • ScrollerInfo() : ViewportManagerDownLevel::ScrollerInfo
  • ScrollGroupedGridViewWithMandatorySnapPointsTest() : CommonStylesTests
  • ScrollHorizontally() : ScrollPresenterTestsWithAutomationPeer
  • ScrollHorizontallyWithEndHomeKeys() : ScrollViewTestsWithInputHelper
  • ScrollHorizontallyWithEndHomeKeysInRTL() : ScrollViewTestsWithInputHelper
  • Scrolling() : AnnotatedScrollBarProperties
  • ScrollingAnchorRequestedEventArgs() : ScrollingAnchorRequestedEventArgs
  • ScrollingBringingIntoViewEventArgs() : ScrollingBringingIntoViewEventArgs
  • ScrollingEventKind() : AnnotatedScrollBarScrollingEventArgs
  • ScrollingScrollAnimationStartingEventArgs() : ScrollingScrollAnimationStartingEventArgs
  • ScrollingScrollCompletedEventArgs() : ScrollingScrollCompletedEventArgs
  • ScrollingScrollOptions() : ScrollingScrollOptions
  • ScrollingScrollStartingEventArgs() : ScrollingScrollStartingEventArgs
  • ScrollingZoomAnimationStartingEventArgs() : ScrollingZoomAnimationStartingEventArgs
  • ScrollingZoomCompletedEventArgs() : ScrollingZoomCompletedEventArgs
  • ScrollingZoomOptions() : ScrollingZoomOptions
  • ScrollingZoomStartingEventArgs() : ScrollingZoomStartingEventArgs
  • ScrollInputHelper() : ScrollInputHelper
  • ScrollItemIntoViewButton_Click() : NavigationViewPage
  • ScrollOffset() : AnnotatedScrollBarDetailLabelRequestedEventArgs , AnnotatedScrollBarLabel , AnnotatedScrollBarScrollingEventArgs
  • ScrollOrientation : OrientationBasedMeasures
  • ScrollPeopleGroupedList() : PersonPictureTests
  • ScrollPeopleList() : PersonPictureTests
  • ScrollPeopleListPrivate() : PersonPictureTests
  • ScrollPresenter : DynamicPage , ScrollViewProperties , ScrollPresenter , ScrollView
  • scrollPresenter : DynamicPage , ScrollPresenterDynamicPage , ScrollPresenterLeakDetectionPage
  • scrollPresenter3ZoomFactorChangeCorrelationId : ScrollPresenterChainingAndRailingPage
  • scrollPresenter52ZoomFactorChangeCorrelationId : ScrollPresentersWithSimpleContentsPage
  • ScrollPresenter_AnchorRequested() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • ScrollPresenter_BringingIntoView() : ScrollPresenterBringIntoViewPage , ScrollViewBringIntoViewPage
  • ScrollPresenter_ExtentChanged() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollPresenter_ExtentChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_Loaded() : ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollPresenter_LoadedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_PointerCanceled() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerCaptureLost() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerMoved() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerPressed() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerReleased() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerWheelChanged() : ScrollViewDynamicPage
  • ScrollPresenter_ScrollAnimationStarting() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollPresenter_ScrollAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ScrollCompleted() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_ScrollCompletedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ScrollStarting() : ScrollPresenterDynamicPage , ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollPresenter_SizeChanged() : ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollPresenter_SizeChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_StateChanged() : ScrollPresenterBringIntoViewPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresenterManipulationModePage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_StateChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ViewChanged() : DynamicPage , SimpleRectanglePage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_ViewChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ZoomAnimationStarting() : ScrollPresenterDynamicPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollPresenter_ZoomAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ZoomCompleted() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_ZoomCompletedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ZoomStarting() : ScrollPresenterDynamicPage , ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollPresenterAccessibilityPage() : ScrollPresenterAccessibilityPage
  • scrollPresenterAutomationPeer : ScrollPresenterAccessibilityPage
  • ScrollPresenterAutomationPeer() : ScrollPresenterAutomationPeer
  • ScrollPresenterBringIntoViewPage() : ScrollPresenterBringIntoViewPage
  • ScrollPresenterBringIntoViewPage_Loaded() : ScrollPresenterBringIntoViewPage
  • ScrollPresenterChainingAndRailingPage() : ScrollPresenterChainingAndRailingPage
  • ScrollPresenterDimension : ScrollPresenter
  • ScrollPresenterDynamicPage() : ScrollPresenterDynamicPage
  • ScrollPresenterExpressionAnimationSourcesPage() : ScrollPresenterExpressionAnimationSourcesPage
  • ScrollPresenterExpressionAnimationSourcesPage_Loaded() : ScrollPresenterExpressionAnimationSourcesPage
  • ScrollPresenterLeakDetectionPage() : ScrollPresenterLeakDetectionPage
  • ScrollPresenterManipulationModePage() : ScrollPresenterManipulationModePage
  • ScrollPresenterMousePanningPage() : ScrollPresenterMousePanningPage
  • scrollPresenterOffset : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • scrollPresenterOffsetChangeAmount : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • ScrollPresenterOffsetFromThumbOffset() : BiDirectionalScrollController , CompositionScrollController
  • ScrollPresenterOperation() : ScrollPresenterTests::ScrollPresenterOperation
  • ScrollPresenterPage() : ScrollPresenterPage
  • scrollPresenterPointerWheelChangedEventHandler : ScrollViewDynamicPage
  • ScrollPresenterProperties() : ScrollPresenterProperties
  • ScrollPresenterProperty() : ScrollViewProperties
  • ScrollPresenterRepeaterAnchoringPage() : ScrollPresenterRepeaterAnchoringPage
  • ScrollPresenterRepeaterAnchoringPage_Loaded() : ScrollPresenterRepeaterAnchoringPage
  • ScrollPresenterScrollSnapPointsPage() : ScrollPresenterScrollSnapPointsPage
  • ScrollPresenterScrollSnapPointsPage_Loaded() : ScrollPresenterScrollSnapPointsPage
  • ScrollPresenterStackPanelAnchoringPage() : ScrollPresenterStackPanelAnchoringPage
  • ScrollPresenterStackPanelAnchoringPage_Loaded() : ScrollPresenterStackPanelAnchoringPage
  • ScrollPresentersWithSimpleContentsPage() : ScrollPresentersWithSimpleContentsPage
  • ScrollPresenterTestHooks() : ScrollPresenterTestHooks
  • ScrollPresenterTestHooks_AnchorEvaluated() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooks_ContentLayoutOffsetXChanged() : ScrollPresentersWithSimpleContentsPage
  • ScrollPresenterTestHooks_ContentLayoutOffsetYChanged() : ScrollPresentersWithSimpleContentsPage
  • ScrollPresenterTestHooks_ExpressionAnimationStatusChanged() : ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooks_InteractionSourcesChanged() : ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooksAnchorEvaluatedEventArgs() : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs() : ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
  • ScrollPresenterTestHooksHelper() : ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooksInteractionSourcesChangedEventArgs() : ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
  • scrollPresenterUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • ScrollPresenterWithBiDirectionalScrollControllerPage() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • ScrollPresenterWithCompositionScrollControllersPage() : ScrollPresenterWithCompositionScrollControllersPage
  • ScrollPresenterWithSimpleScrollControllersPage() : ScrollPresenterWithSimpleScrollControllersPage
  • ScrollPresenterWithSimpleScrollControllersPageOnLoaded() : ScrollPresenterWithSimpleScrollControllersPage
  • ScrollPresenterZoomSnapPointsPage() : ScrollPresenterZoomSnapPointsPage
  • ScrollPresenterZoomSnapPointsPage_Loaded() : ScrollPresenterZoomSnapPointsPage
  • ScrollSnapPoint() : ScrollSnapPoint
  • ScrollSnapPointBase() : ScrollSnapPointBase
  • ScrollSnapPointsAlignment : ScrollPresenterTestsWithInputHelper
  • ScrollStarting() : ScrollPresenterProperties , ScrollViewProperties
  • scrollStartingCount : ScrollPresenterTests
  • ScrollTargetIntoView() : TeachingTipTests
  • ScrollTest() : NumberBoxTests
  • ScrollThenPanScrollView() : ScrollViewTestsWithInputHelper
  • ScrollTo() : AnnotatedScrollBar , ScrollPresenterTests , ScrollPresenter , BiDirectionalScrollController , CompositionScrollController , ScrollView
  • ScrollToCenterOfViewport() : PipsPager , ScaleAnimatedVerticalListDemo
  • ScrollToEndOfContentTreeView_Click() : TreeViewItemsSourceTestPage
  • ScrollToHorizontalOffset() : ScrollPresenter
  • ScrollToMenuItemTest() : CommonTests
  • ScrollToOffsets() : ScrollPresenter
  • ScrollToRequested : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController
  • ScrollToTopOfContentTreeView_Click() : TreeViewItemsSourceTestPage
  • ScrollToVerticalOffset() : ScrollPresenter
  • ScrollTowardsTwoManditoryIrregularSnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • ScrollTowardsTwoManditoryIrregularSnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • ScrollTowardsTwoManditoryIrregularSnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • ScrollUsingArrowButtons() : AnnotatedScrollBarInteractionTests
  • ScrollUsingClick() : AnnotatedScrollBarInteractionTests
  • ScrollUsingTouchAndDrag() : AnnotatedScrollBarInteractionTests
  • ScrollVertically() : ScrollPresenterTestsWithAutomationPeer
  • scrollView : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ScrollView : ScrollViewTestHooksHelper , ItemsViewProperties , ItemsView , ScrollView
  • scrollView52ZoomFactorChangeCorrelationId : ScrollViewsWithSimpleContentsPage
  • ScrollView_BringingIntoView() : ItemsViewSummaryPage , ScrollViewBringIntoViewPage
  • ScrollView_ExtentChanged() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ExtentChangedLog() : ItemsViewIntegrationPage
  • ScrollView_GettingFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_GotFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_Loaded() : ItemsViewBlankPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_LoadedLog() : ItemsViewIntegrationPage
  • ScrollView_LosingFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_LostFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_PointerWheelChanged() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • ScrollView_ScrollAnimationStarting() : ItemsViewBlankPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , VariableSizedItemsPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ScrollAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollView_ScrollCompleted() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_ScrollCompletedLog() : ItemsViewIntegrationPage
  • ScrollView_ScrollStarting() : ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollView_SizeChanged() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_SizeChangedLog() : ItemsViewIntegrationPage
  • ScrollView_StateChanged() : ItemsViewBlankPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_StateChangedLog() : ItemsViewIntegrationPage
  • ScrollView_ViewChanged() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , VariableSizedItemsPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ViewChangedForCurrentElementVisual() : ItemsViewSummaryPage
  • ScrollView_ViewChangedForLockedItemsVisuals() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ScrollView_ViewChangedLog() : ItemsViewIntegrationPage
  • ScrollView_ZoomAnimationStarting() : ItemsViewBlankPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ZoomAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollView_ZoomCompleted() : ItemsViewBlankPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_ZoomCompletedLog() : ItemsViewIntegrationPage
  • ScrollView_ZoomStarting() : ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollViewBlankPage() : ScrollViewBlankPage
  • ScrollViewBringIntoViewOperation() : ScrollViewBringIntoViewOperation
  • ScrollViewBringIntoViewPage() : ScrollViewBringIntoViewPage
  • ScrollViewDynamicPage() : ScrollViewDynamicPage
  • ScrollViewDynamicPage_Loaded() : ScrollViewDynamicPage
  • ScrollViewer : DynamicPage , ItemsRepeaterScrollHost
  • ScrollViewer2_DirectManipulationCompleted() : ScrollPresenterChainingAndRailingPage
  • ScrollViewer2_DirectManipulationStarted() : ScrollPresenterChainingAndRailingPage
  • ScrollViewer_DirectManipulationCompleted() : DynamicPage , SimpleRectanglePage
  • ScrollViewer_DirectManipulationStarted() : DynamicPage , SimpleRectanglePage
  • ScrollViewer_ViewChanged() : GroupedListViewBasePage , ScrollViewerPage , DynamicPage , SimpleRectanglePage , VariableSizedItemsPage , ScrollPresenterBringIntoViewPage
  • ScrollViewer_ViewChanging() : ScrollViewerPage , VariableSizedItemsPage
  • ScrollViewerAdapterPage() : ScrollViewerAdapterPage
  • ScrollViewerIRefreshInfoProviderAdapter() : ScrollViewerIRefreshInfoProviderAdapter
  • ScrollViewerIRefreshInfoProviderDefaultAnimationHandler() : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • scrollViewerOffsetButton : TeachingTipTestPageElements
  • scrollViewerOffsetTextBox : TeachingTipTestPageElements
  • ScrollViewerPage() : ScrollViewerPage
  • ScrollViewerPage_Loaded() : ScrollViewerPage
  • ScrollViewerSettingSelectionDoesNotMoveFocus() : RadioButtonsTests
  • scrollViewerStateTextBox : TeachingTipTestPageElements
  • ScrollViewerViewToString() : ScrollViewerPage , VariableSizedItemsPage
  • ScrollviewerWithScroll_ViewChanged() : NumberBoxPage
  • ScrollViewKeyboardAndGamepadNavigationPage() : ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollViewPage() : ScrollViewPage
  • scrollViewPointerWheelChangedEventHandler : ScrollViewDynamicPage
  • ScrollViewProperties() : ScrollViewProperties
  • ScrollViewProperty() : ItemsViewProperties
  • ScrollViewsWithSimpleContentsPage() : ScrollViewsWithSimpleContentsPage
  • ScrollViewsWithSimpleContentsPage_KeyDown() : ScrollViewsWithSimpleContentsPage
  • ScrollViewsWithSimpleContentsPage_Loaded() : ScrollViewsWithSimpleContentsPage
  • ScrollViewTestHooksHelper() : ScrollViewTestHooksHelper
  • ScrollViewWithRTLFlowDirectionPage() : ScrollViewWithRTLFlowDirectionPage
  • ScrollViewWithScrollControllersPage() : ScrollViewWithScrollControllersPage
  • ScrollWhileUsingExpressionAnimationSources() : ScrollPresenterTestsWithAutomationPeer
  • ScrollWithinARepeatedMandatorySnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • ScrollWithinARepeatedMandatorySnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • ScrollWithinARepeatedMandatorySnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • ScrollWithMouseWheel() : ScrollPresenterTestsWithInputHelper
  • ScrollWithNonSystemManipulationMode() : ScrollPresenterTestsWithInputHelper
  • SearchEntireTreeForContainer() : NavigationView
  • SearchEntireTreeForIndexPath() : NavigationView
  • SearchTreeForIRefreshInfoProvider() : RefreshContainer
  • SearchTreeForIRefreshInfoProviderRecursiveHelper() : RefreshContainer
  • SearchVisualTree() : RatingControlPage
  • secondary : SnapPointSortPredicate
  • SecondaryCommandAsFE_Loaded() : CommandBarFlyoutPage
  • SecondaryCommands() : CommandBarFlyout
  • SecondaryWindowLightConfiguration() : SecondaryWindowLightConfiguration
  • SecondTabViewItems : MultipleTabViewPage
  • Select() : ItemContainerAutomationPeer , ItemsView , NavigationViewItemAutomationPeer , RadioButtons , SelectionModelTests , SelectionModel , final , RepeaterItemAutomationPeer , GroupedRepeaterItem , GroupedRepeaterItemAutomationPeer , TreeViewItem , TreeViewItemAutomationPeer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer
  • Select5ThenChangeSourceButton_Clicked() : RadioButtonsPage
  • SelectAll() : ItemsView , SelectorBase , SelectionModel , final , TreeView , ViewModel
  • SelectAllFlat() : SelectionModel
  • SelectandMoveOverflowItem() : NavigationView
  • SelectAt() : SelectionModel
  • SelectByIndex() : RadioButtonsTests , ViewModel
  • SelectByIndexButton : RadioButtonsFocusTestPageElements , RadioButtonsTestPageElements
  • SelectByIndexButton1_Click() : RadioButtonsFocusPage
  • SelectByIndexButton2 : RadioButtonsFocusTestPageElements
  • SelectByIndexButton2_Click() : RadioButtonsFocusPage
  • SelectByIndexButton_Click() : RadioButtonsPage
  • SelectByItem() : RadioButtonsTests
  • SelectByItemButton : RadioButtonsTestPageElements
  • SelectByItemButton_Click() : RadioButtonsPage
  • Selected : TreeViewNode
  • SelectedBrush() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • SelectedBrushIndex() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • SelectedBrushIndexProperty() : InkToolBarPenButtonProperties
  • SelectedBrushProperty() : InkToolBarPenButtonProperties
  • SelectedCount() : final
  • SelectedEraser() : InkToolBarEraserButtonProperties , InkToolBarEraserButton
  • SelectedEraserProperty() : InkToolBarEraserButtonProperties
  • SelectedIndex() : RadioButtonsProperties , TabViewProperties , SelectionModel , final
  • SelectedIndexChanged() : PagerControlProperties , PipsPagerProperties
  • SelectedIndexProperty() : RadioButtonsProperties , TabViewProperties
  • SelectedIndexTextBlock : RadioButtonsTestPageElements
  • SelectedIndexTextBlock1 : RadioButtonsFocusTestPageElements
  • SelectedIndexTextBlock2 : RadioButtonsFocusTestPageElements
  • SelectedIndices() : SelectionModel , final
  • SelectedItem() : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties , NavigationViewSelectionChangedEventArgs , SelectionModel
  • SelectedItemBindingsWork() : TreeViewTests
  • SelectedItemCombobox_SelectionChanged() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SelectedItemContainer() : NavigationViewSelectionChangedEventArgs
  • SelectedItemIsEnabledCheckbox_Checked() : NavigationViewPage
  • SelectedItemIsEnabledCheckbox_Unchecked() : NavigationViewPage
  • SelectedItemProperty() : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties
  • SelectedItems() : ItemsView , SelectedItems< T > , SelectionModel , TreeView
  • SelectedItemsTest() : TreeViewTests
  • SelectedItemTextBlock : RadioButtonsTestPageElements
  • SelectedNode() : TreeView
  • SelectedNodeChildrenChanged() : ViewModel
  • SelectedNodes() : TreeView
  • SelectedPageIndex() : PagerControlProperties , PipsPagerProperties
  • SelectedPageIndexProperty() : PagerControlProperties , PipsPagerProperties
  • SelectedPipStyle() : PipsPagerProperties
  • SelectedPipStyleProperty() : PipsPagerProperties
  • SelectedPositionInSetTextBlock : RadioButtonsTestPageElements
  • SelectedScrollView : ScrollViewsWithSimpleContentsPage
  • SelectedSizeOfSetTextBlock : RadioButtonsTestPageElements
  • SelectedStencil() : InkToolBarStencilButtonProperties , InkToolBarStencilButton
  • SelectedStencilProperty() : InkToolBarStencilButtonProperties
  • SelectedStrokeWidth() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • SelectedStrokeWidthProperty() : InkToolBarPenButtonProperties
  • SelectFirstFocusableItem() : SelectorBar
  • SelectImpl() : SelectionModel
  • SelectIndexButton_Click() : TabViewPage
  • SelectingAnItemInLeftCompactOrLeftMinimalClosesPane() : PaneBehaviorTests
  • SelectingNonTopLevelItemInOverflow() : SelectionTests
  • SelectionChanged() : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectionModelProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties , SelectionContainerAutomationPeer
  • SelectionContainer : RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , ItemContainerAutomationPeer , NavigationViewItemAutomationPeer , SelectionContainer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer
  • SelectionContainerAutomationPeer() : SelectionContainerAutomationPeer
  • selectionEllipse : ColorPickerPage
  • SelectionEllipseChangesColorAccordingToSelectedColor() : ColorPickerTests
  • selectionEllipsePanel : ColorPickerPage
  • SelectionEllipsePositionChanged() : ColorPickerPage
  • SelectionEllipseShouldBeLight() : ColorSpectrum
  • SelectionEllipseStrokeChanged() : ColorPickerPage
  • SelectionFlyout() : NumberBoxProperties
  • SelectionFlyoutProperty() : NumberBoxProperties
  • SelectionFollowFocus_Checked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SelectionFollowFocus_Unchecked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SelectionFollowFocusTest() : SelectionTests
  • SelectionFollowsFocus() : NavigationViewProperties
  • SelectionFollowsFocusProperty() : NavigationViewProperties
  • SelectionFollowsFocusSetter_SelectionChanged() : NavigationViewTopNavOnlyPage
  • SelectionHighlightColor() : NumberBoxProperties
  • SelectionHighlightColorProperty() : NumberBoxProperties
  • SelectionInvalidatedDueToCollectionChange() : SelectionModel
  • SelectionMode() : ItemsViewProperties , TreeViewProperties
  • SelectionMode_SelectionChanged() : CalendarViewPage
  • SelectionModel : SelectionContainer , RepeaterItem , GroupedRepeaterItem , TreeViewItem , SelectionModel
  • SelectionModel_PropertyChanged() : FlatSample , TreeViewSample
  • SelectionModelChildrenRequestedEventArgs() : SelectionModelChildrenRequestedEventArgs
  • SelectionModelProperties() : SelectionModelProperties
  • SelectionModelProperty : SelectionContainer , RepeaterItem , GroupedRepeaterItem , TreeViewItem
  • SelectionModeProperty() : ItemsViewProperties , TreeViewProperties
  • selectionModeSource : RevealScenarioGrid
  • SelectionNode() : final
  • SelectionState() : TreeViewNode
  • SelectionStateBasedOnChildren() : ViewModel
  • SelectionTest() : RadioButtonsTests , TabViewTests
  • SelectItem() : NavigationViewTests
  • SelectItemButton_Click() : TabViewPage
  • SelectItemUsingAPI() : HierarchicalNavigationViewDataBinding
  • SelectLastRootNode_Click() : TreeViewPage
  • SelectNode() : ViewModel
  • SelectorBar() : SelectorBar
  • SelectorBar_Loaded() : SelectorBarSummaryPage
  • SelectorBar_SelectionChanged() : SelectorBarSamplePage , SelectorBarSummaryPage
  • SelectorBarItemProperties() : SelectorBarItemProperties
  • SelectorBarItemSelection() : SelectorBarTests
  • SelectorBarPage() : SelectorBarPage
  • SelectorBarProperties() : SelectorBarProperties
  • SelectorBarSamplePage() : SelectorBarSamplePage
  • SelectorBarSelectedItem() : SelectorBarTests
  • SelectorBarSummaryPage() : SelectorBarSummaryPage
  • SelectorBase() : SelectorBase
  • SelectOverflowItem() : NavigationView
  • SelectPageInNumberPanel() : PagerControlTestBase
  • SelectPageInPager() : PipsPagerTestBase
  • SelectRange() : SelectionModel , final
  • SelectRangeFromAnchor() : SelectionModelTests , SelectionModel
  • SelectRangeFromAnchorImpl() : SelectionModel
  • SelectRangeFromAnchorTo() : SelectionModel
  • SelectRangeFromAnchorWithGroupImpl() : SelectionModel
  • SelectRangeImpl() : SelectionModel
  • SelectRangeRegressionTest() : SelectionModelTests
  • SelectRoot2Item_Click() : TreeViewPage
  • SelectSecondItem() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • SelectSelectableItemWithOffset() : NavigationView
  • SelectSingleItem() : ViewModel
  • SelectsOnInvoked() : NavigationViewItemProperties , Category , NavigationViewItemProperties
  • SelectsOnInvokedProperty() : NavigationViewItemProperties
  • SelectSource() : ParallaxViewTests
  • SelectStyleCore() : TreeViewItemStyleSelector
  • SelectSubMenuItem() : HierarchicalNavigationViewDataBinding
  • SelectTarget() : ParallaxViewTests
  • SelectTemplateCore() : MyContainerSelector , MySelector , TreeViewItemTemplateSelector
  • SelectTemplateIdFunc : RecyclingElementFactoryDerived
  • SelectTemplateKey() : RecyclingElementFactoryProperties
  • SelectTextBoxes() : ColorPickerTests
  • SelectValueInPagerComboBox() : PagerControlTestBase
  • SelectWithGroupImpl() : SelectionModel
  • SelectWithPathImpl() : SelectionModel
  • SendMouseLeave() : WebView2
  • SendValueToNumberBox() : PagerControlTestBase
  • set() : sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • SetAcrylicBrush() : AcrylicBrushPage
  • SetAcrylicBrushButton_Click() : AcrylicBrushPage
  • SetActionButtonContentTo() : TeachingTipTests
  • setActionContentButton : TeachingTipTestPageElements
  • SetActiveContentTransparent_Click() : TabViewPage
  • SetActiveTabTransparent_Click() : TabViewPage
  • SetAddToMapFunc() : XamlType
  • SetAlignSelf() : Flex
  • SetAnchorCandidates() : ScrollingAnchorRequestedEventArgs
  • SetAnchorElement() : ScrollingAnchorRequestedEventArgs
  • SetAnchorIndex() : SelectionModel , SelectionModelTests , SelectionModel
  • SetAnimatedVisualPlayerSource() : ProgressRing
  • SetAnimation() : ScrollingScrollAnimationStartingEventArgs , ScrollingZoomAnimationStartingEventArgs
  • SetAnimationQueueBehavior() : AnimatedIcon , AnimatedIconTestHooks
  • SetAnimations() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter , IRefreshInfoProviderAdapter
  • SetAreCheckStatesEnabled() : RadioMenuFlyoutItemProperties
  • SetArrangeWidthFromItemsInfo() : LinedFlowLayout
  • SetAsRootAndWaitForColorSpectrumFill() : ColorPickerTests
  • SetAt() : SelectedItemsVector , SwipeItems , VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector
  • SetAutoDisplayMode() : PagerControlTestBase
  • SetAutoHideScrollControllers() : ScrollViewTestHooks
  • SetAutomationIdForNodes() : TreeViewPage
  • SetAutomationName() : TeachingTipTests
  • setAutomationNameButton : TeachingTipTestPageElements
  • SetAutomationPeerNames() : AnimatedVisualPlayerPage
  • SetAverageItemsPerLine() : LinedFlowLayout
  • SetBackgrounds() : CalendarViewPage
  • SetBinding() : SharedHelpers
  • SetBlackout() : CalendarViewPage
  • SetBlackouts() : CalendarViewPage
  • SetBooleanParameter() : SnapPointBase
  • SetBorderWidth() : RadioButtonsTests
  • SetBorderWidthButton : RadioButtonsTestPageElements
  • SetBorderWidthButton_Click() : RadioButtonsPage
  • SetBorderWidthToInf() : RadioButtonsTests
  • SetBrushColor_Click() : CalendarViewPage
  • SetButtonListRepeaterSize() : PipsPagerExamples
  • SetButtonVisibilityModeFunction() : PagerControlTestBase , PipsPagerTestBase
  • SetCachedBoundsForDataIndex() : VirtualizingStackLayout
  • SetCalendarItemBorderThickness_Click() : CalendarViewPage
  • SetCalendarItemCornerRadius_Click() : CalendarViewPage
  • SetCalendarSize_Click() : CalendarViewPage
  • SetCanGoBack() : WebView2
  • SetCanGoForward() : WebView2
  • SetCaptionColor() : ItemsViewSummaryPage
  • SetCenterPoint() : ScrollingZoomAnimationStartingEventArgs
  • SetCheckBoxValue() : ItemsViewTestsWithInputHelper , ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
  • SetClearPrimaryCommandsFlyout() : CommandBarFlyoutPage
  • SetClearSecondaryCommandsFlyout() : CommandBarFlyoutPage
  • SetCloseButtonContent() : TeachingTipTests
  • setCloseButtonContentButton : TeachingTipTestPageElements
  • SetClosedExceptionCount() : WebView2CoreObjectsPage
  • SetCollectionAddFunc() : XamlType
  • SetColor() : ColorSpectrum
  • SetColorAndUpdateControls() : ColorPicker
  • SetColorProperty() : AnimatedSettingsVisualSource , AnimatedChevronRightDownSmallVisualSource , IAnimatedVisualSource , AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedGlobalNavigationButtonVisualSource , MockAnimatedIconSource , BrightnessSun , MockIAnimatedIconSource2 , LottieLogo
  • SetColorsButton_Click() : TabViewPage
  • SetColorSpectrumColor() : ColorPickerTests
  • SetComboBox() : TwoPaneViewTests
  • SetComboBoxDisplayMode() : PagerControlTestBase
  • SetCompositionBrush() : XamlCompBrush
  • SetContentElevation() : TeachingTip , TeachingTipTestHooks
  • SetContentLayoutOffsetX() : ScrollPresenterTestHooks
  • SetContentLayoutOffsetXDbg() : ScrollPresenter
  • SetContentLayoutOffsetY() : ScrollPresenterTestHooks
  • SetContentLayoutOffsetYDbg() : ScrollPresenter
  • SetContentMode() : TreeViewTests
  • SetContentMode_Click() : TreeViewPage
  • SetContext() : final
  • SetContractAnimationDuration() : TeachingTip , TeachingTipTestHooks
  • SetContractEasingFunction() : TeachingTip , TeachingTipTestHooks
  • SetControlHeight() : TwoPaneViewTests
  • SetControllerDefaultBackgroundColor() : WebView2
  • SetControlStackPanelBackground() : VisualPropertiesPage
  • SetControlStackPanelForeground() : VisualPropertiesPage
  • SetControlType() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • SetControlWidth() : TwoPaneViewTests
  • SetCoreProcessFailedCount() : WebView2CoreObjectsPage
  • SetCoreWebView2InitializedCount() : WebView2CoreObjectsPage
  • SetCoreWebViewAndVisualSize() : WebView2
  • SetCorrelationId() : ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs
  • SetCurrentElementIndex() : ItemsView
  • SetCustomIndexOfFunction() : VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
  • SetCustomInteractionRatio() : RefreshInfoProviderImpl
  • SetCustomIsInteractingForRefresh() : RefreshInfoProviderImpl
  • SetDataSource() : TopNavigationViewDataProvider
  • SetDayItemFontSize_Click() : CalendarViewPage
  • SetDayItemMargin_Click() : CalendarViewPage
  • SetDefaultInputScope() : NumberBox
  • SetDeferral() : TeachingTipClosingEventArgs
  • SetDensityColors() : CalendarViewPage
  • SetDesiredAspectRatioFromItemsInfo() : LinedFlowLayout
  • SetDesiredAspectRatios() : LinedFlowLayout , LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetDisplayMode() : NavigationView , PagerControlTestBase
  • SetDraggedOverItem() : TreeViewList
  • SetDropShadow() : NavigationView
  • SetDurationMultiplier() : AnimatedIcon , AnimatedIconTestHooks
  • SetDynamicLabelSecondaryCommand() : CommandBarFlyoutPage
  • SetDynamicOverflowContentRoot() : CommandBarFlyoutPage
  • SetDynamicPrimaryCommand() : CommandBarFlyoutPage
  • SetDynamicVisibilitySecondaryCommand() : CommandBarFlyoutPage
  • SetElementFactoryElementIndex() : RepeaterTestHooks
  • SetEllipsisDropDownItemDataTemplate() : BreadcrumbBarItem
  • SetEllipsisItem() : BreadcrumbBarItem
  • SetEndPosition() : ScrollingScrollAnimationStartingEventArgs
  • SetEndZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • SetEnsureCoreWebView2CompletionCount() : WebView2CoreObjectsPage
  • SetExpandAnimationDuration() : TeachingTip , TeachingTipTestHooks
  • SetExpandEasingFunction() : TeachingTip , TeachingTipTestHooks
  • SetExpectedViewportShift() : ViewportManagerWithPlatformFeatures
  • SetFallbackContent() : AnimatedVisualPlayer
  • SetFirstOfMonthLabelFontSize_Click() : CalendarViewPage
  • SetFirstOfMonthLabelMargin_Click() : CalendarViewPage
  • SetFirstOfYearDecadeLabelFontSize_Click() : CalendarViewPage
  • SetFirstOfYearDecadeLabelMargin_Click() : CalendarViewPage
  • SetFirstPageButtonVisibilityMode() : PagerControlTestBase
  • SetFirstTabSelectedBackgroundPathFill() : TabViewPage
  • SetFlexBasis() : Flex
  • SetFlexGrow() : Flex
  • SetFlexShrink() : Flex
  • SetFlyoutCheckBox_Checked() : SplitButtonPage
  • SetFlyoutCheckbox_Checked() : DropDownButtonPage
  • SetFlyoutCheckbox_Unchecked() : DropDownButtonPage
  • SetFlyoutCheckBox_Unchecked() : SplitButtonPage
  • SetFocusElementIndex() : ItemsView
  • SetFocusToFirstBreadcrumbBarItem() : BreadcrumbTests
  • SetForcedIndexBasedLayoutOrientation() : Layout
  • SetForegroundClick() : InfoBarPage
  • SetHeaderButton_Click() : NavigationViewRS4Page , NavigationViewPage , NavigationViewTopNavPage
  • SetHeroContent() : TeachingTipTests
  • setHeroContentButton : TeachingTipTestPageElements
  • SetHorizontalInfo() : CanvasScrollControllerConsumer
  • SetHorizontalOffset() : ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs , CanvasScrollControllerConsumer
  • SetHorizontalOrientationMargin() : InfoBarPanelProperties
  • SetIcon() : TeachingTipTests
  • setIconButton : TeachingTipTestPageElements
  • SetIconCheckBox_CheckedChanged() : TitleBarPageWindow
  • SetIgnoredValue() : SnapPointWrapper< T >
  • SetIndex() : BreadcrumbBarItem
  • SetIndexBasedLayoutOrientation() : Layout
  • SetIndexedValue() : CustomProperty
  • SetIndexToSelect() : RadioButtonsTests
  • SetInternalPullDirection() : RefreshVisualizer , IRefreshVisualizerPrivate
  • SetInvalidMaxZoomFactorValues() : ScrollPresenterTests
  • SetInvalidMinZoomFactorValues() : ScrollPresenterTests
  • SetInvalidSelectedItem_Click() : NavigationViewTopNavOnlyPage
  • SetIsAlphaEnabled() : ColorPickerTests
  • SetIsAnimationsEnabledOverride() : ScrollPresenterTestHooksHelper
  • SetIsBindable() : XamlType
  • SetIsCanceled() : InteractionTrackerAsyncOperation
  • SetIsCompleted() : InteractionTrackerAsyncOperation
  • SetIsDelayed() : InteractionTrackerAsyncOperation
  • SetIsEllipsisDropDownItem() : BreadcrumbBarItem
  • SetIsHorizontalOrientation() : ColorPickerTests
  • SetIsIdle() : TeachingTip
  • SetIsLightTheme() : RevealBorderLight
  • SetIsMoreButtonEnabled() : ColorPickerTests
  • SetIsMouseButtonPressed() : PointerInfo< T >
  • SetIsMousePointerOver() : PointerInfo< T >
  • SetIsPenPointerOver() : PointerInfo< T >
  • SetIsPressLight() : RevealHoverLight
  • SetIsRTL() : ColorPickerTests
  • SetIsScrollable() : CompositionScrollController , AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , ScrollBarController
  • SetIsScrollControllerRequest() : InteractionTrackerAsyncOperation
  • SetIsTarget() : XamlAmbientLightProperties
  • SetIsTouchPointerOver() : PointerInfo< T >
  • SetIsVerboseLevel() : MUXControlsTestHooksLoggingMessageEventArgs
  • SetIsWideLight() : RevealBorderLight
  • SetItemRangeArrangeWidth() : LinedFlowLayout
  • SetItemsRangeEstablishedLength() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetItemsSource() : TreeViewItem
  • SetItemsViewItemContainerRevokers() : ItemsView
  • SetItemType() : RadioButtonsTests
  • SetKeepInteriorCornersSquare() : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • SetKnownCommandLocalizedControlTypes() : CommandBarFlyoutCommandBar
  • SetLargeWidth_Click() : TabViewSizingPage
  • SetLastPageButtonVisibilityMode() : PagerControlTestBase
  • SetLayoutBoundsForDataIndex() : final
  • SetLayoutBoundsForRealizedIndex() : final
  • SetLayoutCompleted() : ScrollPresenterExpressionAnimationSourcesPage
  • SetLayoutExtent() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • SetLayoutForcedIndexBasedLayoutOrientation() : LayoutsTestHooks
  • SetLayoutId() : RepeaterTestHooks
  • SetLayoutOrigin() : FlowLayoutAlgorithm
  • SetLength() : TwoPaneViewTests
  • SetLinedFlowLayoutForcedAverageItemAspectRatio() : LayoutsTestHooks
  • SetLinedFlowLayoutForcedAverageItemsPerLineDivider() : LayoutsTestHooks
  • SetLinedFlowLayoutForcedWrapMultiplier() : LayoutsTestHooks
  • SetLinedFlowLayoutIsFastPathSupported() : LayoutsTestHooks
  • SetLinedFlowLayoutLogItemIndex() : LayoutsTestHooks
  • SetLoadedCount() : WebView2CoreObjectsPage
  • SetLoggingLevel() : ItemsViewTestsWithInputHelper::LoggingHelper , ScrollPresenterTestsBase , SwipeControlTests
  • SetLoggingLevelForInstance() : MUXControlsTestHooks
  • SetLoggingLevelForInstanceImpl() : MUXControlsTestHooks
  • SetLoggingLevelForType() : MUXControlsTestHooks
  • SetLoggingLevelForTypeImpl() : MUXControlsTestHooks
  • SetLogItemIndex() : ItemsRepeater , RepeaterTestHooks
  • SetLottieBackgroundColor() : ProgressRing
  • SetLottieForegroundColor() : ProgressRing
  • SetLuminosityButton_Clicked() : AcrylicRenderingPage
  • SetMajorSize() : OrientationBasedMeasures
  • SetMajorStart() : OrientationBasedMeasures
  • SetMaxColumnsButton : RadioButtonsTestPageElements
  • SetMaxColumnsButton_Click() : RadioButtonsPage
  • SetMaxPosition() : ScrollPresenterTestHooks
  • SetMaxPositionDbg() : ScrollPresenter
  • SetMaxPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • SetMaxPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • SetMaxSaturation() : ColorPickerTests
  • SetMaxTicksCountdown() : InteractionTrackerAsyncOperation
  • SetMaxValue() : ColorPickerTests
  • SetMaxWidths() : LinedFlowLayout , LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetMessage() : MUXControlsTestHooksLoggingMessageEventArgs
  • SetMinorStart() : OrientationBasedMeasures
  • SetMinPosition() : ScrollPresenterTestHooks
  • SetMinPositionDbg() : ScrollPresenter
  • SetMinPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • SetMinPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • SetMinSaturation() : ColorPickerTests
  • SetMinTallModeHeight() : TwoPaneViewTests
  • SetMinValue() : ColorPickerTests
  • SetMinWideModeWidth() : TwoPaneViewTests
  • SetMinWidths() : LinedFlowLayout , LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetMonthYearItemFontSize_Click() : CalendarViewPage
  • SetMonthYearItemMargin_Click() : CalendarViewPage
  • SetNaNButton_Click() : NumberBoxPage
  • SetNavigationCompletedCount() : WebView2CoreObjectsPage
  • SetNavigationStartingCount() : WebView2CoreObjectsPage
  • SetNavigationViewItemBaseRevokers() : NavigationView
  • SetNavigationViewItemRevokers() : NavigationView
  • SetNavigationViewParent() : NavigationViewItemBase
  • SetNavViewHeight() : NavigationViewTestsBase
  • SetNavViewWidth() : NavigationViewTestsBase
  • SetNextPageButtonVisibilityMode() : PagerControlTestBase , PipsPagerTestBase
  • SetNumberBoxDisplayMode() : PagerControlTestBase
  • SetNumberOfColumns() : RadioButtonsTests
  • SetNumberOfItems() : RadioButtonsTests
  • SetNumberOfItemsButton : RadioButtonsTestPageElements
  • SetNumberOfItemsButton_Click() : RadioButtonsPage
  • SetNumberOfWeeksInView_Click() : CalendarViewPage
  • SetNumberPanelDisplayMode() : PagerControlTestBase
  • SetOffsetsBeforeLoading() : ScrollPresenterTests
  • SetOffsetsChangeCorrelationId() : ScrollingScrollAnimationStartingEventArgs
  • SetOffsetsChangeVelocityParameters() : ScrollPresenterTestHooks
  • SetOrientation() : PipsPagerTestBase
  • SetOriginTemplate() : RecyclePool
  • SetOutputDebugStringLevel() : ScrollPresenterTestsBase , ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper , SwipeControlTests
  • SetOutputDebugStringLevelForType() : MUXControlsTestHooks
  • SetOutputDebugStringLevelForTypeImpl() : MUXControlsTestHooks
  • SetOverflowButtonVisibility() : NavigationView
  • SetOwner() : sealed< T, fallback, RawStorageT >
  • SetOwners() : ViewModel
  • SetOwningFlyout() : CommandBarFlyoutCommandBar
  • SetPanelMinorSize() : FlowLayoutTests
  • SetPanePriority() : TwoPaneViewTests
  • SetPaneTitleFrameworkElementParent() : NavigationView
  • SetPaneToggleButtonAutomationName() : NavigationView
  • SetPanningElementExpressionAnimationSources() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • SetPanningFrameworkElement() : BiDirectionalScrollController::UniScrollController , CompositionScrollControllerPanningInfo
  • SetParent() : TreeViewNodeVector
  • SetParentBreadcrumb() : BreadcrumbBarItem
  • SetParentMapControl() : MapElementsLayer
  • SetParentTabView() : TabViewItem
  • SetPeekingMode() : RefreshInfoProviderImpl
  • SetPendingViewportShift() : ViewportManagerWithPlatformFeatures
  • SetPlaybackRate() : AnimatedVisualPlayer::final , IAnimatedVisual
  • SetPointerPressed() : PointerInfo< T >
  • SetPoolInstance() : RecyclePoolProperties , RecyclePool
  • SetPopupAutomationProperties() : TeachingTip
  • SetPreferredPlacement() : TeachingTipTests
  • setPreferredPlacementButton : TeachingTipTestPageElements
  • SetPresenter() : CommandBarFlyoutCommandBar
  • SetPresenterName() : CommandBarFlyoutCommandBar
  • SetPreviousPageButtonVisibilityMode() : PagerControlTestBase , PipsPagerTestBase
  • SetProgress() : AnimatedVisualPlayer , IAnimatedVisual
  • SetProgressBarIndicatorWidth() : ProgressBar
  • SetProgressButton_Click() : AnimatedVisualPlayerPage
  • SetProgressObject() : IAnimatedVisual
  • SetPropertiesForEllipsisItem() : BreadcrumbBarItem
  • SetPropertiesForLastItem() : BreadcrumbBarItem
  • SetQueueLength() : AnimatedIcon , AnimatedIconTestHooks
  • SetRatingTo() : RatingControl
  • SetRequestId() : InteractionTrackerAsyncOperation
  • SetRequiredOperation() : InteractionTrackerAsyncOperation
  • SetReturnTopForOutOfWindowPlacement() : TeachingTipTestHooks , TeachingTipTests , TeachingTip
  • SetReuseKey() : RecyclePool
  • SetRoot1HasUnrealizedChildren_Click() : TreeViewPage
  • SetRootPanelChildToFallbackIcon() : AnimatedIcon
  • SetSaturation() : ColorPickerTests
  • SetScalarParameter() : SnapPointBase
  • SetScalarProperty() : AnimatedGlobalNavigationButtonVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedSettingsVisualSource , BrightnessSun , LottieLogo
  • SetScrollBar() : ScrollBarController
  • SetScrollOrientation() : OrientationBasedMeasures
  • SetScrollPercent() : ScrollPresenterAutomationPeer
  • SetScrollPresenter() : ScrollInputHelper
  • SetScrollPresenterLoggingLevel() : ScrollViewTestsWithInputHelper
  • SetScrollViewer() : ScrollInputHelper
  • SetScrollViewerHorizontalOffsetButtonClick() : UniformGridLayoutDemo
  • SetScrollViewerMaxHeightButtonClick() : UniformGridLayoutDemo
  • SetScrollViewerMaxSize() : PipsPager
  • SetScrollViewerMaxWidthButtonClick() : UniformGridLayoutDemo
  • SetScrollViewerProperties() : TwoPaneView
  • SetScrollViewerVerticalOffsetButtonClick() : UniformGridLayoutDemo
  • SetScrollViewLoggingLevel() : ScrollViewTestsWithInputHelper
  • SetSecondaryCommandsToCloseWhenExecuted() : CommandBarFlyout
  • SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI() : NavigationView
  • SetSelectionModel() : SelectorBase
  • SetShouldBeginAttachingLights() : MaterialHelper
  • SetShouldConstrainToRootBounds() : TeachingTipTests
  • SetShouldContinueAttachingLights() : MaterialHelper
  • SetSize() : IAnimatedVisual , UniformGridLayoutState
  • SetSmallWidth_Click() : TabViewSizingPage
  • SetSnapPointVisualizationColor() : ScrollPresenterTestHooks
  • SetSource() : RadioButtonsTests
  • SetSourceElement() : ScrollInputHelper
  • SetSpeedUpMultiplier() : AnimatedIcon , AnimatedIconTestHooks
  • SetStartPosition() : ScrollingScrollAnimationStartingEventArgs
  • SetStartZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • SetState() : AnimatedIconProperties , RevealBrushProperties
  • SetState_Click() : RevealStatesPage
  • SetSubtitle() : TeachingTipTests
  • setSubtitleButton : TeachingTipTestPageElements
  • SetSubtitleButton_Click() : TitleBarPageWindow
  • SetTabSeparatorOpacity() : TabView
  • SetTabViewWidth_Click() : TabViewPage
  • SetTailElevation() : TeachingTip , TeachingTipTestHooks
  • SetTallModeConfiguration() : TwoPaneViewTests
  • setTargetButton : TeachingTipTestPageElements
  • SetTargetElement() : ScrollInputHelper
  • SetTeachingTipLocation() : TeachingTipTests
  • SetTestHooksEnabled() : RadioButtons , RadioButtonsTestHooks , ColumnMajorUniformToLargestGridLayout
  • SetTestScreenBounds() : TeachingTip , TeachingTipTestHooks
  • SetTestWindowBounds() : TeachingTip , TeachingTipTestHooks
  • SetTextBoxTextToPlayerProgress() : AnimatedVisualPlayerPage
  • SetTextButton_Click() : NumberBoxPage
  • SetThirdDimensionSliderChannel() : ColorPicker
  • SetThreshold() : NavigationViewTestsBase
  • SetThumbGhostVisibility() : AnnotatedScrollBar
  • SetTicksCountdown() : InteractionTrackerAsyncOperation
  • SettingAnimationOptimizationDoesNotCrash() : AnimatedVisualPlayerTests
  • settings : RevealSimpleListPage
  • Settings_ColorValuesChanged() : RevealSimpleListPage
  • SettingsAccessibilitySetTest() : CommonTests
  • SettingsCanBeUnselected() : SelectionTests
  • SettingScrollControllerProperties() : ScrollPresenterTests
  • SettingsItem() : NavigationViewProperties , NavigationViewItemsFactory , NavigationViewProperties
  • SettingsItemClickTest() : EventTests
  • SettingsItemGamepadTest() : CommonTests
  • SettingsItemProperty() : NavigationViewProperties
  • SettingsItemVisibilityCheckbox_Checked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SettingsItemVisibilityCheckbox_Unchecked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SettingStateOnGrandParentPropagatesToGrandChildAnimatedIcon() : AnimatedIconTests
  • SettingStateOnParentDoesNotPropagateToChildNonAnimatedIcon() : AnimatedIconTests
  • SettingStateOnParentPropagatesToChildAnimatedIcon() : AnimatedIconTests
  • SettingTitleOrSubtitleToEmptyStringCollapsesTextBox() : TeachingTipTests
  • SetTipFollowsTarget() : TeachingTipTestHooks , TeachingTipTests , TeachingTip
  • SetTipIsTargeted() : TeachingTipTests
  • setTipLocationButton : TeachingTipTestPageElements
  • SetTipShouldHaveShadow() : TeachingTip , TeachingTipTestHooks
  • SetTitle() : TeachingTipTests
  • setTitleButton : TeachingTipTestPageElements
  • SetToolTipIsOpen() : AnnotatedScrollBar
  • SetTransformExpressionAnimationExpression() : ScrollPresenterTestHooks
  • SetTransformExpressionAnimationExpressionDbg() : ScrollPresenter
  • SetTwoWayBoundNaNButton_Click() : NumberBoxPage
  • SetUniformGridLayoutMaximumRowsOrColumnsButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinColumnSpacingButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinItemHeightButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinItemWidthButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinRowSpacingButtonClick() : UniformGridLayoutDemo
  • SetUnloadedCount() : WebView2CoreObjectsPage
  • SetUnshiftableShift() : ViewportManagerWithPlatformFeatures
  • SetupAnimatedValuesSpy() : SimpleRectanglePage , RatingControlPage , DynamicPage , SwipeControlPage
  • SetupAutoSuggestBox() : AutoSuggestBoxTests
  • SetUpBridge() : IScrollControllerAdapter
  • SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter() : ScrollPresenterTests
  • SetupBringIntoViewUIWithScrollViewerInsideScrollViewer() : ScrollPresenterTests
  • SetupClipAnimation() : SwipeControl
  • SetupColorPickerTest() : ColorPickerTests
  • SetupComboBox() : ComboBoxTests
  • SetupCommandBarFlyoutTest() : CommandBarFlyoutTests
  • SetUpContainerReuseTest_Click() : TreeViewItemsSourceTestPage
  • SetUpCrumbledTest() : BreadcrumbTests
  • SetupCustomDragUIOverride_Click() : TreeViewPage
  • SetupDefaultAnchoringUI() : ScrollPresenterTests
  • SetupDefaultBringIntoViewUI() : ScrollPresenterTests
  • SetupDefaultBringIntoViewUIWithScrollViewer() : ScrollPresenterTests
  • SetupDefaultUI() : ItemsViewTests , AcrylicBrushTests , ScrollViewTests , ScrollPresenterTests , SelectorBarTests
  • SetupDefaultUIWithListView() : ParallaxViewTests
  • SetupDefaultUIWithScrollPresenter() : ParallaxViewTests
  • SetupDefaultUIWithScrollViewer() : ParallaxViewTests
  • SetupDragDropHandlersForApiTest_Click() : TreeViewPage
  • SetupDragToDropTarget_Click() : TreeViewPage
  • SetupExecuteExpressionAnimation() : SwipeControl
  • SetupExpandingNodeEvent_Click() : TreeViewPage
  • SetUpInteractionElements() : AnnotatedScrollBar
  • SetupInteractionTrackerBoundaries() : ScrollPresenter
  • SetupInteractionTrackerZoomFactorBoundaries() : ScrollPresenter
  • SetUpItemsViewForSelectionTests() : ItemsViewTestsWithInputHelper
  • SetupNavigationView() : NavigationViewTests
  • SetupNavigationViewHierarchy() : NavigationViewTests
  • SetupNavigationViewPaneContent() : NavigationViewTests
  • SetupNavigationViewScrolling() : NavigationViewTests
  • SetupNoReorderNodes_Click() : TreeViewPage
  • SetupNumberBox() : NumberBoxTests
  • SetupPositionBoundariesExpressionAnimations() : ScrollPresenter
  • SetupRepeater() : FlowLayoutCollectionChangeTests , ViewManagerTests , FlowLayoutCollectionChangeTests , ViewManagerTests
  • SetupRepeaterAnchoringUI() : ScrollPresenterTests
  • SetupScrollbars() : ScrollPresenterExpressionAnimationSourcesPage
  • SetupScrollControllerVisualInterationSource() : ScrollPresenter
  • SetupScrollControllerVisualInterationSourcePositionModifiers() : ScrollPresenter
  • SetupScrollPresenter() : DynamicPage , SimpleRectanglePage
  • SetupScrollPresenterVisualInteractionSource() : ScrollPresenter
  • SetUpScrollViewerOrientation() : FlowLayoutTests
  • SetupScrollViewTestWithImage() : ScrollViewTestsWithInputHelper
  • SetupSimpleSingleScrollViewTest() : ScrollViewTestsWithInputHelper
  • SetupSnapPoints() : ScrollPresenter
  • SetUpTemplateParts() : MenuBar
  • SetUpTest() : BreadcrumbTests
  • SetupTransformExpressionAnimations() : ScrollPresenter
  • SetupUIWithBiDirectionalScrollController() : ScrollPresenterTests
  • SetupUIWithParallaxViewInsideScrollPresenter() : ParallaxViewTests
  • SetupUIWithParallaxViewInsideScrollViewer() : ParallaxViewTests
  • SetupUIWithScrollControllers() : ScrollPresenterTests
  • SetupVisualInteractionSourceCenterPointModifier() : ScrollPresenter
  • SetupVisualInteractionSourceChainingMode() : ScrollPresenter
  • SetupVisualInteractionSourceMode() : ScrollPresenter
  • SetupVisualInteractionSourceRailingMode() : ScrollPresenter
  • SetupVisualInteractionSourceRedirectionMode() : ScrollPresenter
  • SetUpWebView() : MapControl
  • SetUseTestScreenBounds() : TeachingTip , TeachingTipTestHooks
  • SetUseTestWindowBounds() : TeachingTipTestHooks , TeachingTip
  • SetValue() : ColorPickerSlider , ColorPickerTests , ProgressRingAutomationPeer , RatingControlAutomationPeer , CustomProperty , ColorPickerSliderAutomationPeer , RatingControlAutomationPeer , NumberBoxAutomationPeer , ColorSpectrum , ColorSpectrumAutomationPeer , XamlMember , ProgressBarAutomationPeer , ValueProviderThunk< Owner >
  • SetValueButton_Click() : NumberBoxPage
  • SetValues() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , ScrollBarController , CompositionScrollController , ScrollBarController
  • SetVerticalInfo() : CanvasScrollControllerConsumer
  • SetVerticalOffset() : ScrollingZoomStartingEventArgs , CanvasScrollControllerConsumer , ScrollingScrollStartingEventArgs
  • SetVerticalOrientationMargin() : InfoBarPanelProperties
  • SetVerticalScrollControllerOnLoaded() : ItemsView
  • SetViewChangeCorrelationId() : InteractionTrackerAsyncOperation
  • SetViewModel() : SelectedItemsVector , SelectedTreeNodeVector
  • SetViewportChangedEvent() : TeachingTip
  • SetVisibleWindow() : ViewportManagerWithPlatformFeatures
  • SetVisualState() : TeachingTipAutomationPeer
  • SetWebViewElementFocus() : WebView2Tests
  • SetWideModeConfiguration() : TwoPaneViewTests
  • SetWidthForItem() : TopNavigationViewDataProvider
  • SetWrapMode() : PipsPagerTestBase
  • SetZoom_Click() : MapControlPage
  • SetZoomFactor() : ScrollingZoomStartingEventArgs , ScrollingScrollStartingEventArgs
  • SetZoomFactorBeforeLoading() : ScrollPresenterTests
  • SetZoomFactorChangeCorrelationId() : ScrollingZoomAnimationStartingEventArgs
  • SetZoomFactorChangeVelocityParameters() : ScrollPresenterTestHooks
  • Severity() : InfoBarProperties
  • SeverityComboBox_SelectionChanged() : InfoBarPage
  • SeverityProperty() : InfoBarProperties
  • ShadowCasterEaseOutStoryboard_Completed() : NavigationView
  • Shape() : ColorSpectrumProperties
  • ShapeProperty() : ColorSpectrumProperties
  • ShapeVisibilityAnimation() : AnimatedVisual
  • ShapeVisibilityAnimation_00() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_01() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_02() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_03() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_04() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_05() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_06() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_07() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_08() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_09() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_10() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_11() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_12() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_13() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_14() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_15() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_16() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_17() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_18() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_19() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_20() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_21() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_22() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_23() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_24() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_25() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_26() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_27() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_28() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_29() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_30() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisual() : ProgressRingDeterminate::AnimatedVisual
  • ShapeVisual_0() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • ShapeVisual_00() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_01() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_02() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_03() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_04() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_05() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_06() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_07() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_08() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_09() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ShapeVisual_10() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_11() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_12() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_13() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_14() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_2() : AnimatedSettingsVisualSource_AnimatedVisual
  • sharedFlyout : MenuFlyoutPage
  • SharedHelpers() : SharedHelpers
  • SharedLeafNode() : SelectionModel
  • Sharpness() : ITransform2DEffect
  • ShiftTabIntoItemsViewWithoutCurrentItem() : ItemsViewTestsWithInputHelper
  • ShortLongTextButton_Click() : TabViewPage
  • ShouldAnimate() : ItemCollectionTransitionProvider
  • ShouldAnimateCore() : RadialItemCollectionTransitionProvider , ItemCollectionTransitionProvider , DefaultItemCollectionTransitionProvider , ItemCollectionTransitionProviderDerived
  • ShouldAnimateFunc : ItemCollectionTransitionProviderDerived
  • ShouldBeginAttachingLights() : MaterialHelper
  • ShouldBorderLightBeOn() : RevealStatesPage
  • ShouldBreakLine() : FlowLayoutDerived , FlowLayout
  • ShouldBreakLineFunc : FlowLayoutDerived
  • ShouldBrushBeOpaque : MaterialHelperBase
  • ShouldCancelBringIntoView() : ScrollViewBringIntoViewOperation
  • ShouldChangeDataSource() : TopNavigationViewDataProvider
  • ShouldConstrainToRootBounds() : TeachingTipProperties
  • shouldConstrainToRootBoundsButton : TeachingTipTestPageElements
  • shouldConstrainToRootBoundsComboBox : TeachingTipTestPageElements
  • ShouldConstrainToRootBoundsProperty() : TeachingTipProperties
  • ShouldContinueAttachingLights() : MaterialHelper
  • ShouldContinueFillingUpSpace() : FlowLayoutAlgorithm , VirtualizingStackLayout
  • ShouldEnableToolTip() : NavigationViewItem
  • ShoulderNavigationEnabled() : NavigationViewProperties
  • ShoulderNavigationEnabledProperty() : NavigationViewProperties
  • ShoulderNavigationEnabledSetter_SelectionChanged() : NavigationViewTopNavOnlyPage
  • ShouldFallbackToComPointers() : sealed< T, fallback, RawStorageT >
  • ShouldNavigate() : WebView2
  • ShouldRepeaterShowInFlyout() : NavigationViewItem
  • ShouldShowBackButton() : NavigationView
  • ShouldShowBackOrCloseButton() : NavigationView
  • ShouldShowCloseButton() : NavigationView
  • ShouldShowContent() : NavigationViewItem
  • ShouldShowIcon() : NavigationViewItem
  • ShouldShowInfoBadge() : NavigationViewItem
  • ShouldStartDrag() : TabViewItem
  • ShouldVisitElement() : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • ShouldVisitProperty() : ControlVisualTreeTestFilter , CommonStylesVisualTreeTestSamples::CustomizedFilter
  • ShouldVisitPropertyValuePair() : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • ShouldYield() : final
  • ShowBorderThickness_Click() : ContentDialogPage
  • showButton : TeachingTipTestPageElements
  • ShowDialog_Click() : ContentDialogPage , VisualPropertiesPage , CornerRadiusPage
  • ShowError() : ProgressBarProperties
  • ShowErrorProperty() : ProgressBarProperties
  • ShowFlyoutAt() : CommandBarFlyoutPage
  • ShowFooterItemButton_Click() : NavigationViewPage
  • ShowHideChildren() : NavigationViewItem
  • ShowHideChildrenItemsRepeater() : NavigationView
  • ShowHoverVisuals() : AnnotatedScrollBar
  • ShowInPlaceDialog_Click() : ContentDialogPage
  • ShowMenuFlyout() : MenuBarItem
  • ShowPaused() : ProgressBarProperties
  • ShowPausedProperty() : ProgressBarProperties
  • ShowRoundedDialog_Click() : CornerRadiusPage
  • ShowSelectionIndicator() : NavigationViewItem
  • ShowTextControlContextFlyoutStandard() : TextCommandBarFlyoutPage
  • ShowTextControlContextFlyoutTransient() : TextCommandBarFlyoutPage
  • ShowThumbGhostAtOffset() : AnnotatedScrollBar
  • showTimer : TeachingTipPage
  • ShowTimerTick() : TeachingTipPage
  • ShowToolTipAtOffset() : AnnotatedScrollBar
  • Shrink() : ScrollPresenterStackPanelAnchoringPage
  • ShrinkLineIfNeeded() : Flex
  • ShrinkTopNavigationSize() : NavigationView
  • ShuffleAndReset() : ResetableCollection-g< T >
  • SimluateDisabledByPolicyToggleButton_Checked() : RevealRegressionTestsPage
  • SimluateDisabledByPolicyToggleButton_Unchecked() : RevealRegressionTestsPage
  • SimpleRectanglePage() : SimpleRectanglePage
  • simpleStringsList : BasicDemo
  • SimpleXamlStartStopEvent_RAII() : SimpleXamlStartStopEvent_RAII
  • SimulateComboBox_SelectionChanged() : TwoPaneViewPage
  • SimulateDisabledByPolicy() : MaterialHelperBase , MaterialHelperTestApi
  • SimulateDisplayRegions() : DisplayRegionHelper , DisplayRegionHelperTestApi
  • SimulateMode() : DisplayRegionHelper , DisplayRegionHelperTestApi , DisplayRegionHelper , DisplayRegionHelperTestApi
  • SimulateTouch() : SplitButtonTestApi , SplitButtonTestHelper , SplitButtonTestApi , SplitButtonTestHelper
  • SimulateTouchCheckBox_Checked() : SplitButtonPage
  • SimulateTouchCheckBox_Unchecked() : SplitButtonPage
  • SingleRegionTest() : TwoPaneViewTests
  • SingleRowKeyboardTest() : RadioButtonsTests
  • SingleSelect() : SelectionModel
  • SingleSelectionFollowsFocus() : NavigationViewTemplateSettingsProperties
  • SingleSelectionFollowsFocusProperty() : NavigationViewTemplateSettingsProperties
  • SingleSelector() : SingleSelector
  • SingleSelectWithUnrealizedChildrenDoesNotMoveSelection() : TreeViewTests
  • SinkEvent() : ColorPickerTests::ColorPickerTestSetupHelper
  • Size : BrightnessSun::BrightnessSun_AnimatedVisual , NavigationViewItemAutomationPeer , FixedSizeItem , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , ObservableVector< T > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , AnimatedVisual , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , SelectedItems< T > , Flex , SplitVector< T, SplitVectorID > , TopNavigationViewDataProvider , AnimatedSettingsVisualSource_AnimatedVisual , VectorInnerImpl< VectorOptions, Wrapper > , VariableSizeItem , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual , ViewModel , HashMap< K, V >
  • SizeSliderName : RevealBrushTests , AcrylicBrushTests
  • SizeToContentTabViewItems : MultipleTabViewPage
  • SizeTreeViewsForDrags_Click() : TreeViewPage
  • SizeValueChanged() : RefreshVisualizerPage
  • SizingTest() : TabViewTests
  • SkipToFirstPage() : PipsPagerPage
  • SkipToLastPage() : PipsPagerPage
  • SlideIn() : LinedFlowLayoutItemCollectionTransitionProvider
  • SlideInDistance : LinedFlowLayoutItemCollectionTransitionProvider
  • slider : RefreshInfoProviderImplementation
  • Slider_ValueChanged() : AnimatedIconPage
  • SliderDensityTest() : CommonStylesTests
  • SliderDensityTest_Click() : CommonStylesPage
  • SliderInteractionPage() : SliderInteractionPage
  • SliderInteractionProperties() : SliderInteractionProperties
  • SliderPage() : SliderPage
  • SliderRefreshInfoProviderAdapter() : SliderRefreshInfoProviderAdapter
  • SlowRelease : RevealHoverLight
  • SmallChange() : NumberBoxProperties , SliderInteraction , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , NumberBoxProperties , SliderInteraction , AnnotatedScrollBarProperties
  • SmallChangeAdditionalVelocity : BiDirectionalScrollController , CompositionScrollController
  • SmallChangeInertiaDecayRate : CompositionScrollController , BiDirectionalScrollController
  • SmallChangeProperty() : AnnotatedScrollBarProperties , NumberBoxProperties
  • SmallerIconWidth() : NavigationViewItemPresenterTemplateSettingsProperties
  • SmallerIconWidthProperty() : NavigationViewItemPresenterTemplateSettingsProperties
  • SmallerPaneToggleButtonWidth() : NavigationViewTemplateSettingsProperties
  • SmallerPaneToggleButtonWidthProperty() : NavigationViewTemplateSettingsProperties
  • SnapAverageItemsPerLine() : LinedFlowLayout
  • SnapCount() : ZoomSnapPoint , RepeatedScrollSnapPoint , ScrollSnapPoint , RepeatedZoomSnapPoint , SnapPointBase
  • SnappedAverageItemsPerLineDbg() : LinedFlowLayout
  • SnapPoint() : SnapPointWrapper< T >
  • snapPointColumnHeight : ScrollPresenterScrollSnapPointsPage
  • snapPointColumns : ScrollPresenterScrollSnapPointsPage
  • snapPointColumnWidth : ScrollPresenterScrollSnapPointsPage
  • SnapPointsMode() : ScrollingBringingIntoViewEventArgs , ScrollingZoomOptions , ScrollingScrollOptions , ScrollingZoomOptions
  • SnapPointsPageChangeOffset() : ScrollPresenterTestsWithInputHelper
  • SnapPointsVectorChangedHelper() : ScrollPresenter
  • SnapPointsVectorItemInsertedHelper() : ScrollPresenter
  • SnapPointsViewportChangedHelper() : ScrollPresenter
  • SnapPointsWithInvalidArgsThrow() : ScrollPresenterTests
  • SnapPointWrapper() : SnapPointWrapper< T >
  • SnapsAt() : SnapPointBase , SnapPointWrapper< T >
  • SnapToFirstRepeatedScrollSnapPoint() : ScrollPresenterTests
  • SnapToFirstRepeatedZoomSnapPoint() : ScrollPresenterTests
  • SnapToPower() : ItemsViewTests , LinedFlowLayout
  • SortElements() : final
  • SortingAndFilteringPage() : SortingAndFilteringPage
  • SortPredicate() : RepeatedScrollSnapPoint , SnapPointBase , ScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • Source() : IGrayscaleEffect , IPointSpecularEffect , IDistantDiffuseEffect , IContrastEffect , IAlphaMaskEffect , IColorMatrixEffect , IDistantSpecularEffect , IGammaTransferEffect , IGaussianBlurEffect , ILuminanceToAlphaEffect , IOpacityEffect , ISpotDiffuseEffect , ITemperatureAndTintEffect , ITransform2DEffect , AnimatedVisualPlayerProperties , ParallaxViewProperties , SelectionModel , SelectionModelChildrenRequestedEventArgs , final , IBorderEffect , IDistantDiffuseEffect , IContrastEffect , IAlphaMaskEffect , ICompositeStepEffect , IColorMatrixEffect , IGaussianBlurEffect , IInvertEffect , ImageIconProperties
  • source : RevealSimpleListPage
  • Source() : IPosterizeEffect , IPointDiffuseEffect , IGammaTransferEffect , ILinearTransferEffect , IHueRotationEffect , IGrayscaleEffect , IExposureEffect , ILinearTransferEffect , IInvertEffect , final , ISpotDiffuseEffect , ISaturationEffect , ILuminanceToAlphaEffect , ITemperatureAndTintEffect , ITintEffect , IHueRotationEffect , IExposureEffect , ISepiaEffect , ImageIconProperties , IPointSpecularEffect , SelectionModel , AnimatedIconProperties , IOpacityEffect , WebView2Properties , ParallaxViewProperties , IUnPremultiplyEffect , IPremultiplyEffect , ISpotSpecularEffect , AnimatedVisualPlayerProperties , IPointDiffuseEffect , IPosterizeEffect , AnimatedIconSourceProperties , ITintEffect , ISpotSpecularEffect , IUnPremultiplyEffect , AnimatedIconProperties , ISaturationEffect , AnimatedIconSourceProperties , ITransform2DEffect , IDistantSpecularEffect , IPremultiplyEffect , ISepiaEffect
  • Source1() : IArithmeticCompositeEffect , ICrossFadeEffect , IArithmeticCompositeEffect
  • Source1Amount() : IArithmeticCompositeEffect
  • Source2() : IArithmeticCompositeEffect , ICrossFadeEffect
  • Source2Amount() : IArithmeticCompositeEffect
  • SourceBeforeLoadTest() : WebView2Tests
  • SourceBindingTest() : WebView2Tests
  • SourceComboBox : RadioButtonsTestPageElements
  • SourceComboBoxSelectionChanged() : RadioButtonsPage
  • SourceElement() : MonochromaticOverlayPresenterProperties
  • SourceElementProperty() : MonochromaticOverlayPresenterProperties
  • SourceForRepeater : SortingAndFilteringPage
  • SourceIndex() : SelectionModelChildrenRequestedEventArgs
  • SourceProperty() : WebView2Properties , AnimatedVisualPlayerProperties , AnimatedIconProperties , AnimatedIconSourceProperties , ParallaxViewProperties , ImageIconProperties
  • SourcePropertySet() : ScrollInputHelper
  • SourceType : ParallaxViewTests
  • sp1 : ScrollViewDynamicPage
  • sp2 : ScrollViewDynamicPage
  • SpaceAround : FlowLayoutAlgorithm
  • SpaceBetween : FlowLayoutAlgorithm
  • SpaceEvenly : FlowLayoutAlgorithm
  • Spacing : UniformGrid2DLayout , StackLayoutProperties , VirtualizingUniformCarouselStackLayout , StackLayoutProperties
  • SpacingProperty() : StackLayoutProperties
  • SpecialElementDesiredSize() : FlowLayoutState
  • SpecificTouchTest() : WebView2Tests
  • SpecifiedPlacement() : TeachingTipTests
  • SpecifiedPlacementRTL() : TeachingTipTests
  • SpectrumBrushProperties() : SpectrumBrushProperties
  • spectrumRectangle : ColorPickerPage
  • SpectrumRectangleFillChanged() : ColorPickerPage
  • SpecularAmount() : IPointSpecularEffect , IDistantSpecularEffect , ISpotSpecularEffect , IDistantSpecularEffect , ISpotSpecularEffect
  • SpecularExponent() : ISpotSpecularEffect , IPointSpecularEffect , IDistantSpecularEffect , IPointSpecularEffect , IDistantSpecularEffect
  • SpeedUpSlider_ValueChanged() : AnimatedIconPage
  • SpinButtonPlacementMode() : NumberBoxProperties
  • SpinButtonPlacementModeProperty() : NumberBoxProperties
  • SpinMode_Changed() : NumberBoxPage
  • Split() : InitialsGenerator , HashMap< K, V > , IndexRange
  • SplitButton() : SplitButton
  • SplitButtonAutomationPeer() : SplitButtonAutomationPeer
  • SplitButtonPage() : SplitButtonPage
  • SplitButtonProperties() : SplitButtonProperties
  • SplitVector() : SplitVector< T, SplitVectorID >
  • SplitViewClosingArgs() : NavigationViewPaneClosingEventArgs
  • SplitViewPage() : SplitViewPage
  • SportsGroup() : PersonPicturePage::SportsGroup
  • SportsPerson() : PersonPicturePage::SportsPerson
  • SpotlightAttenuationValue : RevealScenarioLights
  • SpotlightInnerConeAlphaValue : RevealScenarioLights
  • SpotlightInnerConeValue : RevealScenarioLights
  • SpotlightMaxSizeValue : RevealScenarioLights
  • SpotlightMinSizeValue : RevealScenarioLights
  • SpotlightOuterConeAlphaValue : RevealScenarioLights
  • SpotlightOuterConeValue : RevealScenarioLights
  • SpreadMethod() : RadialGradientBrushProperties
  • SpreadMethodProperty() : RadialGradientBrushProperties
  • SpriteShape() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • SpriteShape_0() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • SpriteShape_00() : AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • SpriteShape_01() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_02() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • SpriteShape_03()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_04()
: LottieLogo::LottieLogo_AnimatedVisual
, BrightnessSun::BrightnessSun_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_05()
: LottieLogo::LottieLogo_AnimatedVisual
, BrightnessSun::BrightnessSun_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • SpriteShape_06()
: LottieLogo::LottieLogo_AnimatedVisual
, BrightnessSun::BrightnessSun_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_07() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_08()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_09()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • SpriteShape_1() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • SpriteShape_10() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_11() : BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_12() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_13() : BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_14() : BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_15() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • SpriteShape_16() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_17() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_18() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_19() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_2() : AnimatedSettingsVisualSource_AnimatedVisual , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • SpriteShape_20() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_21() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_22() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_23() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_24() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_25() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_26() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_27() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_28() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_29() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_3() : AnimatedBackVisualSource_AnimatedVisual
  • SpriteShape_30() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_31() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_32() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_33() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_34() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_35() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_36() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_37() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_38() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_39() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_4() : AnimatedBackVisualSource_AnimatedVisual
  • SpriteShape_40() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_41() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_42() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_43() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_44() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_5() : AnimatedBackVisualSource_AnimatedVisual
  • SpyAnimatedValues() : SwipeControlPage , SimpleRectanglePage , RatingControlPage , DynamicPage
  • SpyTranslationAndScale() : ScrollPresenterTests
  • SquareCollection : AnnotatedScrollBarSummaryPage , AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarIScrollControllerPage
  • StackLayout() : StackLayout
  • StackLayoutProperties() : StackLayoutProperties
  • StampOutRatingItems() : RatingControl
  • StandardBackground_Click() : CommonStylesPage
  • Start() : RepeatedScrollSnapPoint , AnimatedVisualPlayer::final , ItemCollectionTransition , RepeatedZoomSnapPoint , FlowLayoutAlgorithm
  • StartAddScrollVelocity() : ScrollPresenterTests
  • StartAddTransitions() : RadialItemCollectionTransitionProvider , DefaultItemCollectionTransitionProvider , LinedFlowLayoutItemCollectionTransitionProvider
  • StartAddZoomVelocity() : ScrollPresenterTests
  • StartAnimatedValuesSpy() : DynamicPage , SimpleRectanglePage , SwipeControlPage , RatingControlPage
  • StartAnimationGroup() : LinedFlowLayoutItemCollectionTransitionProvider
  • StartAsynchronousAction() : InfoBarPage
  • StartBringIndexIntoView() : ViewManagerTests
  • StartBringIntoView() : ItemsRepeaterScrollHost
  • StartBringItemIntoView() : ItemsView , ItemsViewTestsWithInputHelper
  • StartBringItemIntoViewInternal() : ItemsView
  • StartBringTabIntoView() : TabViewItem
  • StartConstantVelocityPan() : ScrollPresenterMousePanningPage
  • StartContractToClose() : TeachingTip
  • StartExpandToOpen() : TeachingTip
  • StartExpressionAnimationSourcesAnimations() : ScrollPresenter
  • StartIndex : Flex::LineInfo , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • StartInternalExpressionAnimations() : ScrollInputHelper
  • StartLoggingValues_Click() : RevealStatesPage
  • StartMoveTransitions() : DefaultItemCollectionTransitionProvider , LinedFlowLayoutItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • StartNewKeepAliveTimer() : ItemCollectionTransitionProvider
  • StartPath() : SelectionTreeHelper
  • StartPosition() : ScrollingScrollAnimationStartingEventArgs
  • StartProgressBoundAnimation() : AnimatedBackVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • StartRemoveTransitions() : DefaultItemCollectionTransitionProvider , LinedFlowLayoutItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • StartScrollBy() : ScrollPresenterTests
  • StartScrollControllerExpressionAnimationSourcesAnimations() : ScrollPresenter
  • StartScrollTo() : ScrollPresenterTests
  • StartThumbAnimation() : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • StartTrackingColorChanges() : ColorPickerTests::ColorPickerTestSetupHelper
  • StartTransformExpressionAnimations() : ScrollPresenter
  • StartTransitions() : RadialItemCollectionTransitionProvider , DefaultItemCollectionTransitionProvider , ItemCollectionTransitionProviderDerived , ItemCollectionTransitionProvider
  • StartTransitionsFunc : ItemCollectionTransitionProviderDerived
  • StartTranslationAndZoomFactorExpressionAnimations() : ScrollPresenter
  • StartZoomBy() : ScrollPresenterTests
  • StartZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • StartZoomTo() : ScrollPresenterTests
  • State() : RefreshVisualizerProperties , ScrollPresenter , ScrollView , Flex
  • StateChanged() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • StateProperty() : RefreshVisualizerProperties , RevealBrushProperties , AnimatedIconProperties
  • Status1 : WebView2Common
  • Status2 : WebView2Common
  • Status3 : WebView2Common
  • statusReportingTextBox : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • StencilButton() : InkToolBarIsStencilButtonCheckedChangedEventArgs
  • StencilKind() : InkToolBarIsStencilButtonCheckedChangedEventArgs
  • StepThenHoldEasingFunction() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • StepValue() : NumberBox
  • StickyUnstickyAppBarsButton_Click() : CommandBarPage
  • StockOffsetChangeDuration : CompositionScrollController
  • Stop() : IAnimatedVisual , AnimatedVisualPlayer
  • StopAnimatedValuesSpy() : SwipeControlPage , SimpleRectanglePage , RatingControlPage , DynamicPage
  • StopAttachingLights() : RevealBrush
  • StopButton_Click() : AnimatedVisualPlayerPage
  • StopCheckingForDrag() : TabViewItem
  • StopConstantVelocityPan() : ScrollPresenterMousePanningPage
  • StopInternalExpressionAnimations() : ScrollInputHelper
  • StopMousePan() : ScrollPresenterMousePanningPage
  • StopPhasing() : final
  • StopScrollControllerExpressionAnimationSourcesAnimations() : ScrollPresenter
  • StopThumbAnimation() : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • StopTransformExpressionAnimations() : ScrollPresenter
  • StopTranslationAndZoomFactorExpressionAnimations() : ScrollPresenter
  • StopWaiting() : final
  • StoreDemoPage() : StoreDemoPage
  • StoryboardAnimationRetemplateTest() : ProgressRingTests
  • Stretch() : AnimatedVisualPlayerProperties
  • StretchAlignment() : ScrollPresenterTests
  • StretchContentThroughMinZoomFactor() : ScrollPresenterTests
  • StretchedImage() : ScrollPresenterTests
  • StretchImage() : ScrollPresenterTestsWithInputHelper
  • StretchImageWithMouseWheel() : ScrollPresenterTestsWithInputHelper
  • StretchProperty() : AnimatedVisualPlayerProperties
  • StringList : TabViewTearOutWindowWithDataItems
  • StringValue
: ScrollPresenterDynamicPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
  • StripTrailingBrackets() : InitialsGenerator
  • StrokeThicknessScalarAnimation_2p5_to_2p5() : AnimatedFindVisualSource_AnimatedVisual
  • Style1 : TreeViewItemStyleSelector
  • Style2 : TreeViewItemStyleSelector
  • StyleChooser_SelectionChanged() : RevealSimpleListPage
  • SubHeader : RevealGridItem , RevealItem , RevealScenarioItem
  • subItemChangeTimer : MenuFlyoutPage
  • subItemsToToggle : MenuFlyoutPage
  • SubMenuTest() : RadioMenuFlyoutItemTests
  • Subtitle() : TitleBarProperties , TeachingTipProperties , TitleBarProperties
  • subtitleComboBox : TeachingTipTestPageElements
  • SubtitleContentOptions : TeachingTipTestPageElements
  • SubtitleProperty() : TeachingTipProperties , TitleBarProperties
  • SubtitleVisibilityChanged() : TeachingTipTestHooks
  • subtitleVisibilityTextBlock : TeachingTipTestPageElements
  • SuccessiveAdditionalScrollVelocities() : ScrollPresenterTests
  • SuccessiveAdditionalZoomVelocities() : ScrollPresenterTests
  • SuffixText() : PagerControlProperties
  • SuffixTextProperty() : PagerControlProperties
  • SuggestedAnchor : ViewportTests::TestStackLayout , ItemsRepeater , ViewportManagerDownLevel , ViewportManager , ViewportTests::TestGridLayout , ViewportManagerWithPlatformFeatures
  • SuggestedToolTipChanged() : NavigationViewItem
  • Suggestions : SampleSuggestions
  • suggestions : AutoSuggestBoxPage
  • SumGrow : Flex::LineInfo
  • SumShrink : Flex::LineInfo
  • SuppressSelectionItemInvokeTest() : SelectionTests
  • suppressSelectionNextNumber : NavigationViewTopNavStorePage
  • Sv_ViewChanging() : RefreshContainerPage
  • Swap() : sealed< T, fallback, RawStorageT >
  • SwapItemsSource_Click() : TreeViewPage
  • SwapPaneHeaderContent() : NavigationView
  • SwipeContentBackgroundResetsOnClose() : SwipeControlTests
  • swipeContentSizeParameterName() : SwipeControl
  • swipeContentVisualPropertyName() : SwipeControl
  • SwipeControl() : SwipeItemInvokedEventArgs , SwipeControl
  • SwipeControlCanOnlyBeHorizontalOrVertical() : SwipeControlTests
  • SwipeControlCanOnlyBeHorizontalOrVerticalAfterRendering() : SwipeControlTests
  • SwipeControlClearPage() : SwipeControlClearPage
  • SwipeControlInteractionTrackerOwner() : SwipeControlInteractionTrackerOwner
  • SwipeControlPage() : SwipeControlPage
  • SwipeControlPage2() : SwipeControlPage2
  • SwipeControlProperties() : SwipeControlProperties
  • SwipeControlTest() : SwipeControlTests
  • SwipeDismissThenSwipe() : SwipeControlTests
  • SwipeDoesntJumpWhenItReverts() : SwipeControlTests
  • SwipeIsNotTabStop() : SwipeControlTests
  • SwipeItem() : SwipeItem
  • SwipeItemInheritsICommand2Properties() : SwipeControlTests
  • SwipeItemInvoked() : SwipeControlPage , SwipeControlPage2
  • SwipeItemInvokedAndResizeGrid() : SwipeControlPage
  • SwipeItemProperties() : SwipeItemProperties
  • SwipeItems() : SwipeItems
  • SwipeItemsAreNullifiedWhenTheAnimationIsDone() : SwipeControlTests
  • SwipeItemsExecuteThrowsExceptionWhenMoreThanOneItemAreAdded() : SwipeControlTests
  • SwipeItemsProperties() : SwipeItemsProperties
  • SwipeItemsTest() : SwipeControlTests
  • SwipeItemTest() : SwipeControlTests
  • SwipePage() : SwipePage
  • swipeRootVisualPropertyName() : SwipeControl
  • SwipeTestHooks_IdleStatusChanged() : SwipeControlPage
  • SwipeTestHooks_LastInteractedWithSwipeControlChanged() : SwipeControlPage
  • SwipeTestHooks_OpenedStatusChanged() : SwipeControlPage
  • SwipingDoesntChangeTheBoundsOfSwipeControl() : SwipeControlTests
  • SwipingDoesntModifyTheSizeOfSwipeControl() : SwipeControlTests
  • SwitchCacheModeButton_Click() : AnimatedVisualPlayerPage
  • SwitchFrame_Click() : NavigationViewInitPage
  • SwitchLight() : RevealHoverLight , RevealBorderLight
  • SwitchTargetButton : TeachingTipTestPageElements
  • symbolIconSource : MultipleTabViewPage
  • SyncAndInitVectorFlagsWithID() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • SyncChildrenNodesWithItemsSource() : TreeViewNode
  • SyncItemTemplates() : NavigationView
  • SyncRoot : CustomItemsSourceView , MyCollection
  • SyncRootNodesWithItemsSource() : TreeView
  • SyncWait() : SharedHelpers
  • SystemBackdrop() : CommandBarFlyoutCommandBarProperties
  • SystemBackdropProperty() : CommandBarFlyoutCommandBarProperties
  • SystemBackTest() : CommonTests
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- t -

  • t0ScalarAnimation_0_to_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • t1ScalarAnimation_0_to_1() : AnimatedFindVisualSource_AnimatedVisual
  • t2ScalarAnimation_0_to_1() : AnimatedFindVisualSource_AnimatedVisual
  • T_iterator : HashMap< K, V >
  • Tab() : TabViewTabDroppedOutsideEventArgs , TabViewTabDragStartingEventArgs , TabViewTabDragCompletedEventArgs , TabViewTabCloseRequestedEventArgs
  • TabCloseRequested() : TabViewProperties
  • tabCount : MultipleTabViewPage
  • tabDataItemIdentifier : MultipleTabViewPage
  • TabDragCompleted() : TabViewProperties
  • TabDragStarting() : TabViewProperties
  • TabDroppedOutside() : TabViewProperties
  • TabGeometry() : TabViewItemTemplateSettingsProperties
  • TabGeometryProperty() : TabViewItemTemplateSettingsProperties
  • TabIntoItemsViewWithoutCurrentItem() : ItemsViewTestsWithInputHelper
  • TabItems() : TabViewProperties
  • TabItemsChanged() : TabViewProperties
  • TabItemsProperty() : TabViewProperties
  • TabItemsSource() : TabViewProperties
  • TabItemsSourceProperty() : TabViewProperties
  • TabItemTemplate() : TabViewProperties
  • TabItemTemplateProperty() : TabViewProperties
  • TabItemTemplateSelector() : TabViewProperties
  • TabItemTemplateSelectorProperty() : TabViewProperties
  • TableSize : CMethodProfileGroup< size >
  • TabNavigationHierarchicalTest() : FocusBehaviorTests
  • TabNavigationTest() : FocusBehaviorTests
  • TabNavigationThroughItemsView() : ItemsViewTestsWithInputHelper
  • TabNavigationThroughItemsViewWithContentControlsAndSingleSelectionMode() : ItemsViewTestsWithInputHelper
  • TabNavigationThroughItemsViewWithItemContainersAndMultipleSelectionMode() : ItemsViewTestsWithInputHelper
  • TabNavigationThroughItemsViewWithItemContainersAndSingleSelectionMode() : ItemsViewTestsWithInputHelper
  • Tabs() : TabViewTabTearOutWindowRequestedEventArgs , TabViewTabTearOutRequestedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs , TabViewExternalTornOutTabsDroppedEventArgs
  • Tabs_TabCloseRequested() : TabViewSizingPage
  • Tabs_TabItemsChanged() : TabViewPage
  • TabSizeAndScrollButtonsTest() : TabViewTests
  • TabStripDragOver() : TabViewProperties
  • TabStripDrop() : TabViewProperties
  • TabStripFooter() : TabViewProperties
  • TabStripFooterProperty() : TabViewProperties
  • TabStripFooterTemplate() : TabViewProperties
  • TabStripFooterTemplateProperty() : TabViewProperties
  • TabStripHeader() : TabViewProperties
  • TabStripHeaderProperty() : TabViewProperties
  • TabStripHeaderTemplate() : TabViewProperties
  • TabStripHeaderTemplateProperty() : TabViewProperties
  • TabTearOutRequested() : TabViewProperties
  • TabTearOutWindowRequested() : TabViewProperties
  • TabTest() : MenuBarTests
  • TabTwicePastWebView2() : WebView2Tests
  • TabView() : TabView
  • TabView_AddButtonClick() : MultipleTabViewPage
  • Tabview_AddTabButtonClick() : TabViewSizingPage
  • TabView_DragEnter() : MultipleTabViewPage
  • TabView_Drop() : MultipleTabViewPage
  • TabView_TabCloseRequested() : MultipleTabViewPage
  • TabView_TabDragStarting() : MultipleTabViewPage
  • TabViewAutomationPeer() : TabViewAutomationPeer
  • TabViewAxeTestPage() : TabViewAxeTestPage
  • TabViewExternalTornOutTabsDroppedEventArgs() : TabViewExternalTornOutTabsDroppedEventArgs
  • TabViewExternalTornOutTabsDroppingEventArgs() : TabViewExternalTornOutTabsDroppingEventArgs
  • TabViewItem() : TabViewItem
  • TabViewItem_Loaded() : MultipleTabViewPage
  • TabViewItemAutomationPeer() : TabViewItemAutomationPeer
  • TabViewItemBackgroundTest() : TabViewTests
  • TabViewItemForegroundTest() : TabViewTests
  • TabViewItemHeaderTest() : TabViewTests
  • TabViewItemProperties() : TabViewItemProperties
  • TabViewItemsSourceSample_AddTabButtonClick() : TabViewTabItemsSourcePage
  • TabViewItemsSourceSample_TabCloseRequested() : TabViewTabItemsSourcePage
  • TabViewItemsSourceSample_TabItemsChanged() : TabViewTabItemsSourcePage
  • TabViewItemTemplateSettings() : TabViewItemTemplateSettings
  • TabViewItemTemplateSettingsProperties() : TabViewItemTemplateSettingsProperties
  • TabViewListView() : TabViewListView
  • TabViewPage() : TabViewPage
  • TabViewProperties() : TabViewProperties
  • TabViewScrollToTheLeftButton_Click() : TabViewPage
  • TabViewScrollToTheMiddleButton_Click() : TabViewPage
  • TabViewScrollToTheRightButton_Click() : TabViewPage
  • TabViewSelectionChanged() : TabViewPage
  • TabViewSizingPage() : TabViewSizingPage
  • TabViewSizingPageButton_Click() : TabViewPage
  • TabViewTabCloseRequested() : TabViewPage , TabViewTabClosingBehaviorPage
  • TabViewTabCloseRequestedEventArgs() : TabViewTabCloseRequestedEventArgs
  • TabViewTabClosingBehaviorButton_Click() : TabViewPage
  • TabViewTabClosingBehaviorPage() : TabViewTabClosingBehaviorPage
  • TabViewTabDragCompletedEventArgs() : TabViewTabDragCompletedEventArgs
  • TabViewTabDragStartingEventArgs() : TabViewTabDragStartingEventArgs
  • TabViewTabDroppedOutside() : TabViewPage
  • TabViewTabDroppedOutsideEventArgs() : TabViewTabDroppedOutsideEventArgs
  • TabViewTabItemsSourcePage() : TabViewTabItemsSourcePage
  • TabViewTabItemsSourcePage_Loaded() : TabViewTabItemsSourcePage
  • TabViewTabItemsSourcePageButton_Click() : TabViewPage
  • TabViewTabTearOutRequestedEventArgs() : TabViewTabTearOutRequestedEventArgs
  • TabViewTabTearOutWindowRequestedEventArgs() : TabViewTabTearOutWindowRequestedEventArgs
  • TabViewTearOutApp : TabViewTearOutTests
  • TabViewTearOutWindowWithDataItems() : TabViewTearOutWindowWithDataItems
  • TabViewTearOutWindowWithDataItemsButton_Click() : TabViewPage
  • TabViewTearOutWindowWithoutDataItems() : TabViewTearOutWindowWithoutDataItems
  • TabViewTearOutWindowWithoutDataItemsButton_Click() : TabViewPage
  • TabViewTemplateSettings() : TabViewItemProperties
  • TabViewTemplateSettingsProperty() : TabViewItemProperties
  • TabWidthComboBox_SelectionChanged() : TabViewPage
  • TabWidthMode() : TabViewProperties
  • TabWidthModeProperty() : TabViewProperties
  • TailElevationSliderChanged() : TeachingTipPage
  • TailLongSideActualLength() : TeachingTip
  • TailLongSideLength() : TeachingTip
  • TailShortSideLength() : TeachingTip
  • TailVisibility() : TeachingTipProperties
  • TailVisibilityProperty() : TeachingTipProperties
  • TallModeConfiguration : TwoPaneViewTests , TwoPaneViewProperties
  • TallModeConfigurationComboBox_SelectionChanged() : TwoPaneViewPage
  • TallModeConfigurationProperty() : TwoPaneViewProperties
  • TapItem() : SwipeControlTests
  • TapOnColorSpectrum() : ColorPickerTests
  • TapOnColorSpectrumAndWaitForColorChange() : ColorPickerTests
  • TapOnFlyoutTreeViewRootItemChevron() : TreeViewTests
  • TapOnItem() : RadioButtonsTests
  • TapOnTreeViewAt() : TreeViewTests
  • TappingOutsideARevealedSwipeDismissesIt() : SwipeControlTests
  • TapResetScrollViewButton() : ItemsViewTestsWithInputHelper
  • TapResetViewsButton() : ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • Target() : TeachingTipProperties , ButtonInteractionInvokedEventArgs
  • targetBoundsButton : TeachingTipTestPageElements
  • TargetData() : InkCanvas::TargetData
  • TargetElement : DynamicPage , TargetElement , ScrollInputHelper , ItemsRepeaterScrollHost::BringIntoViewState , ScrollViewBringIntoViewOperation
  • TargetElementAutomationId : ButtonInteractionTests
  • targetHeightTextBlock : TeachingTipTestPageElements
  • TargetHorizontalOffset() : ScrollingBringingIntoViewEventArgs
  • TargetInkCanvas() : InkToolBarProperties , InkToolBar
  • TargetInkCanvasProperty() : InkToolBarProperties
  • TargetInkPresenter() : InkToolBarProperties , InkToolBar
  • TargetInkPresenterProperty() : InkToolBarProperties
  • TargetListViewBackground() : ParallaxViewTests
  • TargetListViewHeader() : ParallaxViewTests
  • TargetListViewItem() : ParallaxViewTests
  • TargetOffsets() : ScrollingBringingIntoViewEventArgs
  • TargetProperty() : TeachingTipProperties
  • TargetTheme() : RevealBrushProperties , RevealTestApi
  • TargetThemeProperty() : RevealBrushProperties
  • TargetType() : XamlMember
  • TargetUnloadingClosesTeachingTip() : TeachingTipTests
  • TargetVerticalOffset() : ScrollingBringingIntoViewEventArgs
  • targetWidthTextBlock : TeachingTipTestPageElements
  • targetXOffsetTextBlock : TeachingTipTestPageElements
  • targetYOffsetTextBlock : TeachingTipTestPageElements
  • tbloaded() : ExtraCommandBarFlyoutPage
  • tbunloaded() : ExtraCommandBarFlyoutPage
  • TeachingTip() : TeachingTip
  • TeachingTip_SizeChanged() : TeachingTipPage
  • teachingTipAlternateCloseButton : TeachingTipTestPageElements
  • TeachingTipAutomationPeer() : TeachingTipAutomationPeer
  • TeachingTipBackgroundTest() : TeachingTipTests
  • TeachingTipCaseBundle() : TeachingTipCaseBundle
  • teachingTipCloseButton : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • TeachingTipFocusPage() : TeachingTipFocusPage
  • TeachingTipHeroContentPlacementTest() : TeachingTipTests
  • TeachingTipInResources_Closed() : TeachingTipPage
  • TeachingTipInResourcesOnEdge_Closed() : TeachingTipPage
  • TeachingTipInResourcesRoot : TeachingTipPage
  • TeachingTipInResourcesRoot_Loaded() : TeachingTipPage
  • TeachingTipInVisualTree_Closed() : TeachingTipPage
  • TeachingTipInVisualTreeRoot : TeachingTipPage
  • TeachingTipInVisualTreeRoot_Loaded() : TeachingTipPage
  • TeachingTipInXamlPage() : TeachingTipInXamlPage
  • TeachingTipPage() : TeachingTipPage
  • TeachingTipProperties() : TeachingTipProperties
  • TeachingTipRemovalClosesPopup() : TeachingTipTests
  • TeachingTipTemplateSettings() : TeachingTipTemplateSettings
  • TeachingTipTemplateSettingsProperties() : TeachingTipTemplateSettingsProperties
  • TeachingTipTestHooks : TeachingTip
  • TeachingTipTestHooks_EffectiveHeroContentPlacementChanged() : TeachingTipPage
  • TeachingTipTestHooks_EffectivePlacementChanged() : TeachingTipPage
  • TeachingTipTestHooks_IdleStatusChanged() : TeachingTipFocusPage , TeachingTipInXamlPage , TeachingTipPage
  • TeachingTipTestHooks_OffsetChanged() : TeachingTipPage
  • TeachingTipTestHooks_OpenedStatusChanged() : TeachingTipFocusPage , TeachingTipInXamlPage , TeachingTipPage
  • TeachingTipTestHooks_SubtitleVisibilityChanged() : TeachingTipPage
  • TeachingTipTestHooks_TitleVisibilityChanged() : TeachingTipPage
  • TeachingTipWithContentAndWithoutHeroContentDoesNotCrash() : TeachingTipTests
  • TeachingTipWithContentAndWithoutIconSourceDoesNotCrash() : TeachingTipTests
  • TearOutTab() : TabView
  • tearOutWindow : TabViewTearOutWindowWithoutDataItems
  • Temperature() : ITemperatureAndTintEffect
  • Template : RevealGridTypeItem , ItemTemplateWrapper
  • Template1 : TreeViewItemTemplateSelector
  • Template2 : TreeViewItemTemplateSelector
  • TemplateEven : MySelector , MyContainerSelector , MySelector
  • TemplateKey() : SelectTemplateEventArgs
  • TemplateOdd : MySelector , MyContainerSelector , MySelector
  • Templates() : RecyclingElementFactory
  • TemplateSelector() : ItemTemplateWrapper
  • TemplateSettings() : ExpanderProperties , InfoBadgeProperties , InfoBarProperties , NavigationViewProperties , NavigationViewItemPresenterProperties , PagerControlProperties , PersonPictureProperties , PipsPagerProperties , ProgressBarProperties , ProgressRingProperties , TeachingTipProperties , TitleBarProperties , ExpanderProperties
  • TemplateSettingsProperty() : ExpanderProperties , InfoBadgeProperties , InfoBarProperties , NavigationViewProperties , NavigationViewItemPresenterProperties , PagerControlProperties , PersonPictureProperties , PipsPagerProperties , ProgressBarProperties , ProgressRingProperties , TeachingTipProperties , TitleBarProperties
  • TEndScalarAnimation_0_to_1_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_0_to_1_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_0p81_to_0p734_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_0p81_to_0p734_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0() : BrightnessSun::BrightnessSun_AnimatedVisual
  • TEndScalarAnimation_1_to_0_00() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_01() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_02() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_03() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_04() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_05() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_06() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_07() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_08() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_09() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_10() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_11() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_12() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_13() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_14() : LottieLogo::LottieLogo_AnimatedVisual
  • tertiary : SnapPointSortPredicate
  • TestAutoPlacementForWindowOrScreenBounds() : TeachingTipTests
  • TestCaseSelectionChanged() : PaneLayoutTestPage
  • TestCleanup() : AnimatedVisualPlayerTests , AnnotatedScrollBarInteractionTests , AutoSuggestBox , BreadcrumbTests , ColorPickerTests , CommandBarFlyoutTests , TextCommandBarFlyoutTests , CommonStylesTests , DropDownButtonTests , ExpanderTests , ImageIconTests , InfoBarTests , ButtonInteractionTests , SliderInteractionTests , ItemContainerTests , ItemsViewTestsWithInputHelper , MapControlTests , AcrylicBrushTests , RevealBrushTests , MenuBarTests , NavigationViewTestsBase , NumberBoxTests , PagerControlTests , ParallaxViewTests , PersonPictureTests , PipsPagerTests , ProgressBarTests , ProgressRingTests , RefreshContainerTests , ScrollViewerAdapterTests , RadialGradientBrushTests , RadioButtonsTests , RadioMenuFlyoutItemTests , RatingControlTests , RepeaterTests , ScrollPresenterTestsWithAutomationPeer , ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper , SelectorBarTests , SplitButtonTests , SwipeControlTests , TabViewTearOutTests , TabViewTests , TeachingTipTests , TitleBarTests , TreeViewTests , TwoPaneViewTests , WebView2Tests
  • TestCommand() : TestCommand
  • TestContext : TeachingTipTests
  • TestControlAutomationPeer() : TestControlAutomationPeer
  • TestDataSource() : ScrollPresenterTests::TestDataSource
  • TestDropDownButton_Click() : DropDownButtonPage
  • TestDropDownButtonFlyout_Closed() : DropDownButtonPage
  • TestDropDownButtonFlyout_Opened() : DropDownButtonPage
  • TestExecuteCommand : SplitButtonPage
  • TestFrameCheckbox_Checked() : MenuBarPage , NavigationViewPage , NavigationViewRS3Page , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage
  • TestFrameCheckbox_Unchecked() : MenuBarPage , NavigationViewPage , NavigationViewRS3Page , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage
  • TestHooksViewChangeResult() : ScrollPresenterTestHooks
  • TestInfoDictionary : WebView2BasicPage
  • TestList : WebView2BasicPage , WebView2CoreObjectsPage
  • TestListView_ItemClick() : RevealStatesPage
  • TestMenuFlyoutItemClick() : MenuFlyoutPage
  • TestNameComboBox_SelectionChanged() : WebView2BasicPage , WebView2CoreObjectsPage
  • TestOptions : ColorPickerTests , ButtonInteractionTests
  • TestPage_GotFocus() : ColorPickerPage
  • TestPage_Loaded() : AcrylicBrushBasicPage , NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • TestPageLoaded() : ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
  • TestPageName : RegressionTestScenario
  • TestPageNames : WebView2BasicPage
  • TestPersonPicture_SizeChanged() : PersonPicturePage
  • TestPipsPager_GotFocus() : PipsPagerPage
  • TestPipsPager_LostFocus() : PipsPagerPage
  • TestPipsPager_PointerCanceled() : PipsPagerPage
  • TestPipsPager_PointerEntered() : PipsPagerPage
  • TestPipsPager_PointerExited() : PipsPagerPage
  • TestRadioButtons : RadioButtonsTestPageElements
  • TestRadioButtons1 : RadioButtonsFocusTestPageElements
  • TestRadioButtons2 : RadioButtonsFocusTestPageElements
  • TestRadioButtons2_GotFocus() : RadioButtonsFocusPage
  • TestRadioButtons2_LostFocus() : RadioButtonsFocusPage
  • TestRadioButtons2_SelectionChanged() : RadioButtonsFocusPage
  • TestRadioButtons_GotFocus() : RadioButtonsFocusPage , RadioButtonsPage
  • TestRadioButtons_LostFocus() : RadioButtonsFocusPage , RadioButtonsPage
  • TestRadioButtons_SelectionChanged() : RadioButtonsFocusPage , RadioButtonsPage
  • TestRatingControl_Loaded() : RatingControlPage
  • TestRatingControl_ValueChanged() : RatingControlPage
  • TestRatingControlButton_Click() : RatingControlPage
  • testScreenBounds : TeachingTipPage
  • testScreenBoundsHeightTextBox : TeachingTipTestPageElements
  • testScreenBoundsWidthTextBox : TeachingTipTestPageElements
  • testScreenBoundsXTextBox : TeachingTipTestPageElements
  • testScreenBoundsYTextBox : TeachingTipTestPageElements
  • TestSetupHelperOptions : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper , TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
  • TestSplitButton_Click() : SplitButtonPage
  • TestSplitButtonFlyout_Closed() : SplitButtonPage
  • TestSplitButtonFlyout_Opened() : SplitButtonPage
  • TestSwipeControl_Loaded() : SwipeControlPage
  • TestSwipeControl_Unloaded() : SwipeControlPage
  • TestTeachingTipInXamlPage() : TeachingTipTests
  • TestTreeView2ItemsSource : TreeViewPage
  • TestTreeView_DragItemsStarting() : TreeViewPage
  • TestTreeView_Expanding() : TreeViewPage
  • TestTreeView_ItemInvoked() : TreeViewPage
  • TestTreeViewContentMode_ItemInvoked() : TreeViewPage
  • TestTreeViewItemsSource : TreeViewLateDataInitTest , TreeViewPage
  • testWindowBounds : TeachingTipPage
  • testWindowBoundsHeightTextBox : TeachingTipTestPageElements
  • testWindowBoundsWidthTextBox : TeachingTipTestPageElements
  • testWindowBoundsXTextBox : TeachingTipTestPageElements
  • testWindowBoundsYTextBox : TeachingTipTestPageElements
  • Text : CustomNavigationViewItem , FixedSizeItem , VariableSizeItem , DataItem , NumberBoxProperties , SelectorBarItemProperties , SwipeItemProperties
  • TextAlignment() : NumberBoxProperties
  • TextAlignment_Changed() : NumberBoxPage
  • TextAlignmentProperty() : NumberBoxProperties
  • textBlock : ScrollViewerPage , ScrollPresenterDynamicPage
  • TextBoxDensityTest() : CommonStylesTests
  • TextBoxDensityTest_Click() : CommonStylesPage
  • TextCommandBarFlyoutPage() : TextCommandBarFlyoutPage
  • TextCommandBarFlyoutTestSetupHelper() : TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
  • TextControlsPage() : TextControlsPage
  • TextPage() : TextPage
  • TextProperty() : NumberBoxProperties , SelectorBarItemProperties , SwipeItemProperties
  • TextPropertyChanged() : NumberBoxPage
  • TextReadingOrder() : NumberBoxProperties
  • TextReadingOrderProperty() : NumberBoxProperties
  • Theme : RevealThemeItem
  • ThemeColor_Background() : AnimatedVisual
  • ThemeColor_Foreground() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • ThemeColor_Foreground_0() : AnimatedVisual
  • ThemeColor_Foreground_1() : AnimatedVisual
  • ThemeDarkButton_Click() : ColorPickerPage
  • ThemeLightButton_Click() : ColorPickerPage
  • ThemeResourceNameToColorBrush() : RatingControlPage
  • themeSource : RevealScenarios
  • themingComboBox : TeachingTipTestPageElements
  • ThirdDimensionAutomationId : ColorPickerTests
  • ThirdDimensionSliderChanged : ColorPicker
  • this : CustomItemsSourceView , ReadOnlyNotifyPropertyChangedCollection-g< T > , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , MyCollection , Bridge
  • Threshold : NavigationViewTestsBase
  • ThresholdTest() : TwoPaneViewTests
  • ThrowIfHasVerticalAndHorizontalContent() : SwipeControl
  • Thumb : BiDirectionalScrollController
  • Thumb_ManipulationCompleted() : BiDirectionalScrollController
  • Thumb_ManipulationDelta() : BiDirectionalScrollController
  • Thumb_ManipulationStarting() : BiDirectionalScrollController
  • Thumb_PointerPressed() : BiDirectionalScrollController
  • thumbOffsetAnimation : CompositionScrollControllerPanningInfo
  • TickForValuesSpy() : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • TickNonAnimatedOperation() : InteractionTrackerAsyncOperation
  • TickOperation() : ScrollViewBringIntoViewOperation
  • TickQueuedOperation() : InteractionTrackerAsyncOperation
  • TicksCount() : ScrollViewBringIntoViewOperation
  • tilePanel : ScrollViewerPage , ScrollPresenterDynamicPage
  • TimePickerDensityTest() : CommonStylesTests
  • TimePickerDensityTest_Click() : CommonStylesPage
  • TimePickerPage() : TimePickerPage
  • timer : RefreshContainerOnImagePage , RefreshVisualizerPage , RefreshInfoProviderImplementation , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , TeachingTipPage
  • Timer_Tick() : InfoBarPage , RefreshContainerOnImagePage , RefreshVisualizerPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , TeachingTipPage
  • timerTick() : RefreshInfoProviderImplementation
  • Tint() : ITemperatureAndTintEffect
  • TintColor() : AcrylicBrushProperties
  • TintColorButton_Checked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • TintColorButton_Unchecked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • TintColorProperty() : AcrylicBrushProperties
  • TintLuminosityOpacity() : AcrylicBrushProperties
  • TintLuminosityOpacity_ValueChanged() : AcrylicBrushPage
  • TintLuminosityOpacityProperty() : AcrylicBrushProperties
  • TintOpacity() : AcrylicBrushProperties
  • TintOpacity_ValueChanged() : AcrylicBrushBasicPage , AcrylicBrushPage
  • TintOpacityProperty() : AcrylicBrushProperties
  • TintOpacitySliderName : RevealBrushTests , AcrylicBrushTests
  • TintTransitionDuration() : AcrylicBrushProperties , AcrylicBrushTests
  • TintTransitionDurationProperty() : AcrylicBrushProperties
  • TipCanFollowTarget() : TeachingTipTests
  • tipFollowsTargetCheckBox : TeachingTipTestPageElements
  • TipFollowsTargetOnWindowResize() : TeachingTipTests
  • tipLocation : TeachingTipPage
  • tipLocationComboBox : TeachingTipTestPageElements
  • TipLocationOptions : TeachingTipTestPageElements
  • TipsWhichDoNotFitDoNotOpen() : TeachingTipTests
  • tipWidthTextBlock : TeachingTipTestPageElements
  • Title : PictureLibrary , TitleBarProperties , AnimatedIconHost , ToggleAnimatedIconHost , Picture , ColorItem , InfoBarProperties , MenuBarItemProperties , TeachingTipProperties , TitleBarProperties
  • title : ColorItem
  • TitleBar() : TitleBar
  • TitleBarAutomationPeer() : TitleBarAutomationPeer
  • TitleBarCheckbox_Checked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • TitleBarCheckbox_Unchecked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • TitleBarPage() : TitleBarPage
  • TitleBarPageWindow() : TitleBarPageWindow
  • TitleBarProperties() : TitleBarProperties
  • TitleBarTemplateSettings() : TitleBarTemplateSettings
  • TitleBarTemplateSettingsProperties() : TitleBarTemplateSettingsProperties
  • TitleBarTest() : CommonTests
  • TitleBarWindowingButton_Click() : TitleBarPage
  • TitleButton_Click() : TitleBarPageWindow
  • titleComboBox : TeachingTipTestPageElements
  • TitleContentOptions : TeachingTipTestPageElements
  • TitleProperty : AnimatedIconHost , InfoBarProperties , MenuBarItemProperties , TeachingTipProperties , TitleBarProperties , ToggleAnimatedIconHost
  • TitleVisibilityChanged() : TeachingTipTestHooks
  • titleVisibilityTextBlock : TeachingTipTestPageElements
  • Toggle() : ToggleSplitButtonAutomationPeer , ToggleSplitButton
  • ToggleAccessibilityTest() : SplitButtonTests
  • ToggleAnimatedIconHost() : ToggleAnimatedIconHost
  • ToggleBackgroundChanged() : NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewPage
  • ToggleButton_Checked() : ImageIconPage
  • ToggleButton_Unchecked() : ImageIconPage
  • ToggleButtonStyleCheckbox_Checked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ToggleButtonStyleCheckbox_Unchecked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ToggleCompactInAppLevel_Click() : CompactPage
  • ToggleHeaderTemplateValueButton_Click() : NumberBoxPage
  • ToggleHeaderValueButton_Click() : NumberBoxPage
  • ToggleIsExpandedNavigationViewItem() : NavigationView
  • ToggleKind() : InkToolBarToggleButton , InkToolBarToolButton
  • ToggleMappingMode() : RadialGradientBrushPage
  • ToggleMappingModeButton_Click() : RadialGradientBrushPage
  • TogglePaneOpenButton_Click() : NavigationViewMinimalPage
  • ToggleRoot0Selection_Click() : TreeViewPage
  • ToggleSelect() : final
  • ToggleSelectedNodes_Click() : TreeViewPage
  • ToggleSelection() : TreeViewItem
  • ToggleSelectionMode_Click() : TreeViewPage
  • ToggleSplitButton_Click() : SplitButtonPage
  • ToggleSplitButton_IsCheckedChanged() : SplitButtonPage
  • ToggleSplitButtonAutomationPeer() : ToggleSplitButtonAutomationPeer
  • ToggleSplitButtonProperties() : ToggleSplitButtonProperties
  • ToggleState() : ToggleSplitButtonAutomationPeer
  • ToggleSwitch_Toggled() : MapControlPage , RevealScenarios
  • ToggleSwitchDensityTest() : CommonStylesTests
  • ToggleSwitchDensityTest_Click() : CommonStylesPage
  • ToggleTest() : SplitButtonTests
  • ToggleTreeViewItemCheckBox() : TreeViewTests
  • ToggleVisibilityForEmptyContent() : TeachingTip
  • TogglingTheWindowStateDismissesSwipe() : SwipeControlTests
  • ToolKind() : InkToolBarToolButton
  • ToolTipCustomContentTest() : CommonTests
  • ToolTipDefaultTest() : TabViewTests
  • ToolTipPage() : ToolTipPage
  • ToolTipTest() : CommonTests
  • ToolTipUpdateTest() : TabViewTests
  • Top : WebView2RenderingVerifier::NativeMethods::RECT
  • TopAppBarButton_Click() : CommandBarPage
  • TopBottomAppBarTest() : CommonStylesTests
  • TopEdgePlacementTopLeftHighlightMargin() : TeachingTip
  • TopItems() : SwipeControlProperties
  • TopItemsProperty() : SwipeControlProperties
  • TopLeftCornerRadius() : TeachingTip
  • TopLeftHighlightMargin() : TeachingTipTemplateSettingsProperties
  • TopLeftHighlightMarginProperty() : TeachingTipTemplateSettingsProperties
  • TopNavigationChevronClickTest() : TopModeTests
  • TopNavigationHaveCorrectSelectionWhenChangingMenuItems() : TopModeTests
  • TopNavigationItemsAccessibilitySetTest() : TopModeTests
  • TopNavigationMenuItemTemplateBindingTest() : TopModeTests
  • TopNavigationOverflowButtonClickTest() : TopModeTests
  • TopNavigationOverflowButtonTest() : TopModeTests
  • TopNavigationOverflowWidthLongNavItemTest() : TopModeTests
  • TopNavigationSecondClickOnSuppressSelectionItemTest() : TopModeTests
  • TopNavigationSelectionTest() : TopModeTests
  • TopNavigationSetSelectedItemToNullInItemInvoke() : TopModeTests
  • TopNavigationViewDataProvider() : TopNavigationViewDataProvider
  • TopNavigationViewItemContentChanged() : NavigationView
  • TopNavigationWithAccessKeysTest() : TopModeTests
  • TopNavigationWithHierarchyOverflowButtonClickTest() : TopModeTests
  • TopNavPosition : NavigationViewTestsBase
  • TopPadding() : NavigationViewTemplateSettingsProperties
  • TopPaddingProperty() : NavigationViewTemplateSettingsProperties
  • TopPaddingTest() : TopModeTests
  • TopPaneVisibility() : NavigationViewTemplateSettingsProperties
  • TopPaneVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • TopRightCornerRadius() : TeachingTip
  • TopRightHighlightMargin() : TeachingTipTemplateSettingsProperties
  • TopRightHighlightMarginProperty() : TeachingTipTemplateSettingsProperties
  • ToString() : TreeNode , SimpleVerify , ItemCollectionTransitionProviderTests::CallInfo , Recipe , RecipeGroup , Year , Flex::LineInfo , CustomContent , TreeViewNode , IndexPath
  • TotalElementSize() : StackLayoutState
  • TotalElementsMeasured() : StackLayoutState
  • TotalItemsPerLine() : FlowLayoutState
  • TotalLineSize() : FlowLayoutState
  • TotalLinesMeasured() : FlowLayoutState
  • TotalNumberOfDisplayedObjects : PipsPagerExamples
  • TouchIndicatorStateCount : ScrollViewVisualStateCounts
  • TouchSelectionTest() : TabViewTests
  • TouchTest() : SplitButtonTests
  • ToZeroKeyframeAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • ToZeroKeyframeAnimationTest() : AnimatedVisualPlayerTests
  • TraceInfo() : AnnotatedScrollBarTrace , CommandBarFlyoutTrace , InkToolBarTrace , ItemContainerTrace , ItemsViewTrace , NavigationViewTrace , ItemsRepeaterTrace , LinedFlowLayoutTrace , ScrollPresenterTrace , SelectorBarTrace , SwipeControlTrace , TabViewTrace , PTRTrace , ScrollViewTrace
  • TracePerfInfo() : NavigationViewTrace , SwipeControlTrace , ScrollViewTrace , ScrollPresenterTrace , PTRTrace , ItemContainerTrace , ItemsViewTrace , ItemsRepeaterTrace , SelectorBarTrace , TabViewTrace , LinedFlowLayoutTrace , AnnotatedScrollBarTrace
  • TraceVerbose() : InkToolBarTrace , ItemContainerTrace , LinedFlowLayoutTrace , AnnotatedScrollBarTrace , ItemsRepeaterTrace , CommandBarFlyoutTrace , NavigationViewTrace , PTRTrace , ScrollPresenterTrace , TabViewTrace , ScrollViewTrace , SelectorBarTrace , ItemsViewTrace , SwipeControlTrace
  • TrackElement() : ItemsRepeaterScrollHost
  • tracker_ref() : sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > , sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • trackerPropertyName() : SwipeControl
  • TrackItemSelected() : ViewModel
  • TrackItemUnselected() : ViewModel
  • TrackPointerId() : PointerInfo< T >
  • TrackRevealLightsToRemove() : MaterialHelperBase
  • TransformMatrix() : ITransform2DEffect
  • TransformWebView() : WebView2BasicPage
  • Transition() : ItemCollectionTransitionProgress , ItemCollectionTransitionProviderTests::CallInfo , ItemCollectionTransitionCompletedEventArgs
  • TransitionAndUpdateStates() : AnimatedIcon
  • TransitionCompleted() : ItemCollectionTransitionProviderProperties
  • TransitionFallbackLogic() : AnimatedIconTests
  • TransitionManager() : ItemsRepeater , final
  • TransitionStates() : AnimatedIcon
  • Translate() : LinedFlowLayoutItemCollectionTransitionProvider
  • Traverse() : SelectionModelTests , SelectionTreeHelper
  • TraverseIndexPath() : SelectionTreeHelper
  • TraverseRangeRealizeChildren() : SelectionTreeHelper
  • Tree : BreadcrumbBarPage
  • TreeNode() : TreeViewItem
  • TreeNodeSelectionState : TreeViewNode
  • TreeView() : TreeView
  • TreeView_DragOver() : TreeViewPage
  • TreeView_Drop() : TreeViewPage
  • TreeViewBackgroundTest() : TreeViewTests
  • TreeViewClearAndSetAtTest() : TreeViewTests
  • TreeViewCollectionChangesEffectSelectedNodesTest() : TreeViewTests
  • TreeViewCollectionChangesEffectSelectedNodesTest_ContentMode() : TreeViewTests
  • TreeViewCollectionChangesEffectSelectedNodesTest_NodeMode() : TreeViewTests
  • TreeViewDataLateInitTest() : TreeViewTests
  • TreeViewDensityChange() : TreeViewTests
  • TreeViewDisableItemDragTest() : TreeViewTests
  • TreeViewDisableItemDragTest_ContentMode() : TreeViewTests
  • TreeViewDisableItemDragTest_NodeMode() : TreeViewTests
  • TreeViewDisableItemReorderKeyboardTest() : TreeViewTests
  • TreeViewDisableItemReorderTest() : TreeViewTests
  • TreeViewDisableItemReorderTest_ContentMode() : TreeViewTests
  • TreeViewDisableItemReorderTest_NodeMode() : TreeViewTests
  • TreeViewDragAndDropBetweenNodes() : TreeViewTests
  • TreeViewDragAndDropBetweenNodes_ContentMode() : TreeViewTests
  • TreeViewDragAndDropBetweenNodes_NodeMode() : TreeViewTests
  • TreeViewDragAndDropOnNode() : TreeViewTests
  • TreeViewDragAndDropOnNode_ContentMode() : TreeViewTests
  • TreeViewDragAndDropOnNode_NodeMode() : TreeViewTests
  • TreeViewDragCrash() : TreeViewTests
  • TreeViewDragCrash_ContentMode() : TreeViewTests
  • TreeViewDragCrash_NodeMode() : TreeViewTests
  • TreeViewDragEnterOverDropTest() : TreeViewTests
  • TreeViewDragEnterOverDropTest_ContentMode() : TreeViewTests
  • TreeViewDragEnterOverDropTest_NodeMode() : TreeViewTests
  • TreeViewDragEnterOverLeaveTest() : TreeViewTests
  • TreeViewDragEnterOverLeaveTest_ContentMode() : TreeViewTests
  • TreeViewDragEnterOverLeaveTest_NodeMode() : TreeViewTests
  • TreeViewDragItemsCompletedEventArgs() : TreeViewDragItemsCompletedEventArgs
  • TreeViewDragItemsStartingEventArgs() : TreeViewDragItemsStartingEventArgs
  • TreeViewDragItemTest() : TreeViewTests
  • TreeViewDragItemTest_ContentMode() : TreeViewTests
  • TreeViewDragItemTest_NodeMode() : TreeViewTests
  • TreeViewDragMultipleItemsTest() : TreeViewTests
  • TreeViewDragMultipleItemsTest_ContentMode() : TreeViewTests
  • TreeViewDragMultipleItemsTest_NodeMode() : TreeViewTests
  • TreeViewExpandingEventTest() : TreeViewTests
  • TreeViewExpandingEventTest_ContentMode() : TreeViewTests
  • TreeViewExpandingEventTest_NodeMode() : TreeViewTests
  • TreeViewExpandNodeWithUnrealizedChildrenCrash() : TreeViewTests
  • TreeViewFastReorderTest() : TreeViewTests
  • treeViewFolder : VisualPropertiesPage
  • TreeViewInFlyout_Click() : TreeViewPage
  • TreeViewInheritanceTest() : TreeViewTests
  • TreeViewItem() : TreeViewItem
  • TreeViewItemAutomationPeer() : TreeViewItemAutomationPeer
  • TreeViewItemAutomationPeerSelectionItemPatternTest() : TreeViewTests
  • TreeViewItemClickTest() : TreeViewTests
  • TreeViewItemClickTest_ContentMode() : TreeViewTests
  • TreeViewItemClickTest_NodeMode() : TreeViewTests
  • TreeViewItemContainerStyleTest() : TreeViewTests
  • TreeViewItemContainerTransitionTest() : TreeViewTests
  • TreeViewItemDataAutomationPeer() : TreeViewItemDataAutomationPeer
  • TreeViewItemProperties() : TreeViewItemProperties
  • TreeViewItemSource() : TreeViewItemSource
  • TreeViewItemSourceResetRecreateItems() : TreeViewTests
  • TreeViewItemsSourceTest() : TreeViewTests
  • TreeViewItemsSourceTestPage() : TreeViewItemsSourceTestPage
  • TreeViewItemsSourceTestPage_Click() : TreeViewPage
  • TreeViewItemsSourceUpdateTest() : TreeViewTests
  • TreeViewItemTemplateSelectorTest() : TreeViewTests
  • TreeViewItemTemplateSelectorTestPage() : TreeViewItemTemplateSelectorTestPage
  • TreeViewItemTemplateSettings() : TreeViewItemProperties , TreeViewItemTemplateSettings , TreeViewItemProperties
  • TreeViewItemTemplateSettingsProperties() : TreeViewItemTemplateSettingsProperties
  • TreeViewItemTemplateSettingsProperty() : TreeViewItemProperties
  • TreeViewItemTemplateTest() : TreeViewTests
  • TreeViewItemUIATest() : TreeViewTests
  • TreeViewItemUIATest_ContentMode() : TreeViewTests
  • TreeViewItemUIATest_NodeMode() : TreeViewTests
  • TreeViewKeyboardReorderTest() : TreeViewTests
  • TreeViewKeyboardReorderTest_ContentMode() : TreeViewTests
  • TreeViewKeyboardReorderTest_NodeMode() : TreeViewTests
  • TreeViewKeyDownLeftToRightTest() : TreeViewTests
  • TreeViewKeyDownLeftToRightTest_ContentMode() : TreeViewTests
  • TreeViewKeyDownLeftToRightTest_NodeMode() : TreeViewTests
  • TreeViewKeyDownRightToLeftTest() : TreeViewTests
  • TreeViewKeyDownRightToLeftTest_ContentMode() : TreeViewTests
  • TreeViewKeyDownRightToLeftTest_NodeMode() : TreeViewTests
  • TreeViewLateDataInitTest() : TreeViewLateDataInitTest
  • TreeViewLateDataInitTestPage_Click() : TreeViewPage
  • TreeViewList() : TreeViewList
  • TreeViewListAutomationPeer() : TreeViewListAutomationPeer
  • TreeViewListMultipleSelectionUIATest() : TreeViewTests
  • TreeViewMultiSelectDragAndDropBetweenNodes() : TreeViewTests
  • TreeViewMultiSelectDragAndDropBetweenNodes_ContentMode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropBetweenNodes_NodeMode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropOnNode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropOnNode_ContentMode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropOnNode_NodeMode() : TreeViewTests
  • TreeViewMultiSelectGamepadTest() : TreeViewTests
  • TreeViewMultiSelectGamepadTest_ContentMode() : TreeViewTests
  • TreeViewMultiSelectGamepadTest_NodeMode() : TreeViewTests
  • TreeViewMultiSelectItemTest() : TreeViewTests
  • TreeViewMultiSelectItemTest_ContentMode() : TreeViewTests
  • TreeViewMultiSelectItemTest_NodeMode() : TreeViewTests
  • TreeViewMultiSelectKeyboardingTest() : TreeViewTests
  • TreeViewMultiSelectKeyboardingTest_ContentMode() : TreeViewTests
  • TreeViewMultiSelectKeyboardingTest_NodeMode() : TreeViewTests
  • TreeViewNode() : TreeViewNode
  • TreeViewNodeDPTest() : TreeViewTests
  • TreeViewNodeHasChildrenPropertyChanged() : ViewModel
  • TreeViewNodeInheritenceTest() : TreeViewTests
  • TreeViewNodeInMarkupTest() : TreeViewTests
  • TreeViewNodeInMarkupTestPage() : TreeViewNodeInMarkupTestPage
  • TreeViewNodeInMarkupTestPage_Click() : TreeViewPage
  • TreeViewNodeIsExpandedPropertyChanged() : ViewModel
  • TreeViewNodeProperties() : TreeViewNodeProperties
  • TreeViewNodePropertyChanged() : ViewModel
  • TreeViewNodeStringableTest() : TreeViewTests
  • TreeViewNodeTest() : TreeViewTests
  • TreeViewNodeVector() : TreeViewNodeVector
  • TreeViewNodeVectorChanged() : ViewModel
  • TreeViewNonexistNodeAutomationPeerTest() : TreeViewTests
  • TreeViewNoReorderIntoChildren() : TreeViewTests
  • TreeViewNoReorderIntoChildren_ContentMode() : TreeViewTests
  • TreeViewNoReorderIntoChildren_NodeMode() : TreeViewTests
  • TreeViewPage() : TreeViewPage
  • TreeViewPartialSelectionTest() : TreeViewTests
  • TreeViewPartialSelectionTest_ContentMode() : TreeViewTests
  • TreeViewPartialSelectionTest_NodeMode() : TreeViewTests
  • TreeViewPendingSelectedNodesTest() : TreeViewTests
  • TreeViewProperties() : TreeViewProperties
  • TreeViewRootNodeBindingTest() : TreeViewTests
  • TreeViewSample() : TreeViewSample
  • TreeViewSelectedItemsTest() : TreeViewTests
  • TreeViewSelectedItemTest() : TreeViewTests
  • TreeViewSelectedNodesTest() : TreeViewTests
  • TreeViewSelectedNodeTest() : TreeViewTests
  • TreeViewSelectionChangedEventArgs() : TreeViewSelectionChangedEventArgs
  • TreeViewSelectionChangedMultipleMode() : TreeViewTests
  • TreeViewSelectionChangedSingleMode() : TreeViewTests
  • TreeViewSelectionChangeUIAEventsTest() : TreeViewTests
  • TreeViewSelectRegressionTest() : TreeViewTests
  • TreeViewSwappingNodesTest() : TreeViewTests
  • TreeViewSwappingNodesTest_ContentMode() : TreeViewTests
  • TreeViewSwappingNodesTest_NodeMode() : TreeViewTests
  • TreeViewUnrealizedChildrenTestPage() : TreeViewUnrealizedChildrenTestPage
  • TreeViewUnrealizedChildrenTestPage_Click() : TreeViewPage
  • TreeViewUpdateTest() : TreeViewTests
  • TreeViewViewModel() : TreeViewViewModel
  • TreeViewWithMultiLevelChildrenExpandCollapseTest() : TreeViewTests
  • TreeWalkNodeInfo() : SelectionTreeHelper::TreeWalkNodeInfo
  • TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException() : ItemsViewTests
  • TriggerLinedFlowLayoutItemsInfoRequestedEventArgsExceptions() : ItemsViewTests
  • Triggers() : ItemCollectionTransition
  • TrimEndScalarAnimation_0_to_0p316_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p316_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p375_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p375_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p43_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p43_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p457_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p457_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p5() : AnimatedVisual
  • TrimEndScalarAnimation_0_to_1() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_0() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_1() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_2() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_3() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_4() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0p117_to_1_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p117_to_1_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p249_to_0p891() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p411_to_0p665_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p411_to_0p665_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p5_to_1_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p5_to_1_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_1_to_0p88() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0_to_0p399() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0_to_0p5() : AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_0() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_1() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_2() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_3() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_4() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0p29_to_0_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0p29_to_0_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0p5_to_0_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0p5_to_0_1() : LottieLogo::LottieLogo_AnimatedVisual
  • try_as() : sealed< T, fallback, RawStorageT >
  • TryCompleteInitialization() : WebView2
  • TryConnectSystemBackdrop() : CommandBarFlyoutCommandBar
  • TryCreateAnimatedVisual() : AnimatedChevronUpDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedBackVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedChevronDownSmallVisualSource , ProgressRingDeterminate , BrightnessSun , AnimatedAcceptVisualSource , ProgressRingDeterminate , MockIAnimatedIconSource2 , IAnimatedVisualSource3 , Nullsource , BrightnessSun , LottieLogo , AnimatedSettingsVisualSource , AnimatedBackVisualSource , AnimatedFindVisualSource , LottieLogo , AnimatedSettingsVisualSource , IAnimatedVisualSource , ProgressRingIndeterminate , AnimatedGlobalNavigationButtonVisualSource , AnimatedAcceptVisualSource , MockAnimatedIconSource , AnimatedFindVisualSource , AnimatedChevronRightDownSmallVisualSource
  • TryGetCurrentCoreApplicationView() : SharedHelpers
  • TryGetElement() : RecyclePool , ItemsView , RecyclePool , ItemsRepeater
  • TryGetElementCore() : RecyclePool
  • TryGetFocusByPressingTab() : BreadcrumbTests
  • TryGetFocusForRs2() : BreadcrumbTests
  • TryGetFocusForRs3() : BreadcrumbTests
  • TryGetItemIndex() : ItemsView
  • TryGetMaterialHelperInstance() : LifetimeHandler
  • TryGetStringRepresentationFromObject() : SharedHelpers
  • TryGetSwipeVisuals() : SwipeControl
  • TryGetVirtualizationInfo() : ItemsRepeater
  • TryInstallingBrowser() : WebView2Tests
  • TryInvalidateMeasure() : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • TrySetCenterPoint() : TeachingTip
  • TrySetForegroundProperty() : AnimatedIcon
  • TryWait() : ColorChangedEventWaiter
  • TryWaitForEditValues() : CommonStylesTests
  • TryWaitForScrollPresenterManipulationEnd() : ScrollPresenterTestsWithInputHelper
  • TryWaitForScrollViewManipulationEnd() : ScrollViewTestsWithInputHelper
  • TStartScalarAnimation_0_to_0p249() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_00() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_01() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_02() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_03() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_04() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_05() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_06() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_07() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_08() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_09() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_10() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_11() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_12() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_13() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_14() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_15() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_16() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_17() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_18() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p8_to_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p8_to_0p3() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_1_to_0() : BrightnessSun::BrightnessSun_AnimatedVisual
  • TurnOffAnchorNotifications() : ScrollPresenterTestHooksHelper
  • TurnOffExpressionAnimationStatusNotifications() : ScrollPresenterTestHooksHelper
  • TurnOffInteractionSourcesNotifications() : ScrollPresenterTestHooksHelper
  • TurnOnAnchorNotifications() : ScrollPresenterTestHooksHelper
  • TurnOnExpressionAnimationStatusNotifications() : ScrollPresenterTestHooksHelper
  • TurnOnInteractionSourcesNotifications() : ScrollPresenterTestHooksHelper
  • TV_Click() : NavigationViewSelectedItemEdgeCasePage
  • TV_Click2() : NavigationViewSelectedItemEdgeCasePage
  • TwoByOneifySize() : AspectRatioRespectingControl
  • TwoPaneView() : TwoPaneView
  • TwoPaneView_ModeChanged() : TwoPaneViewPage
  • TwoPaneView_SizeChanged() : TwoPaneViewPage
  • TwoPaneViewMode : TwoPaneViewTests
  • TwoPaneViewPage() : TwoPaneViewPage
  • TwoPaneViewProperties() : TwoPaneViewProperties
  • TwoWayBoundButton_Click() : TreeViewPage
  • txtHorizontalOverriddenOffsetsChangeDuration_TextChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • txtMISnapPointValueUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointEndUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointIntervalUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointOffsetUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointStartUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtVerticalOverriddenOffsetsChangeDuration_TextChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • Type : ItemsViewSummaryPage::QueuedOperation , SelectionModel , ScrollPresenterStackPanelAnchoringPage::QueuedOperation , ScrollPresenterRepeaterAnchoringPage::QueuedOperation , TreeViewNode , XamlMember , MathToken , ScrollPresenterDynamicPage::QueuedOperation , CustomProperty , ListViewBasePage::QueuedOperation
  • typeName : Entry
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- u -

  • UIA_FlowsFromPropertyId : CommandBarFlyoutTests
  • UIA_FlowsToPropertyId : CommandBarFlyoutTests
  • UIA_PositionInSetPropertyId : CommandBarFlyoutTests
  • UIA_SizeOfSetPropertyId : CommandBarFlyoutTests
  • UIAProperties() : RadioButtonsTests
  • UIAValuePatternTest() : RatingControlTests
  • UICollection() : UICollection
  • UICommand_ExecuteRequested() : SwipeControlPage
  • UIElement_DragStarting() : ItemsViewSummaryPage
  • UIObjectContains() : NavigationViewTestsBase
  • UIObjectToString() : NavigationViewTestsBase
  • UIThreadTicksForValuesSpy : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • Uncheck() : InfoBarTests , NumberBoxTests
  • Unchecked() : InkToolBarFlyoutItemProperties
  • uncheckedRevoker : ChildHandlers
  • UnclearableIsUnclearableTest() : RatingControlTests
  • UnderlyingType() : XamlTypeBase
  • UndoButtonOverflow16_SizeChanged() : CommandBarFlyoutPage
  • UndoItem_Click() : MenuBarPage
  • UndoSelectionAndRevertSelectionTo() : NavigationView
  • UnhookAllCommandBarElementDependencyPropertyChanges() : CommandBarFlyout
  • UnhookAnnotatedScrollBarEvents() : ItemsViewIntegrationPage
  • UnhookBringIntoViewEvents() : ScrollPresenterBringIntoViewPage
  • UnhookChildPropertyChanged() : ParallaxView
  • UnhookCollectionChangedHandler() : final
  • UnhookCommandBarElementDependencyPropertyChanges() : CommandBarFlyout
  • UnhookCompositionTargetRendering() : ItemsView , ScrollInputHelper , ScrollPresenter , ScrollView
  • UnhookContentEffectiveViewportChanged() : ScrollPresenterDynamicPage
  • UnhookContentPointerEvents() : ScrollPresenterDynamicPage
  • UnhookContentPropertyChanged() : ScrollPresenter
  • UnhookEvents() : NumberBox
  • UnhookEventsAndClearFields() : NavigationView , NavigationViewItem , NavigationViewItemPresenter , TabView
  • UnhookHandlers() : AnnotatedScrollBar , BiDirectionalScrollController , CompositionScrollController
  • UnhookHorizontalScrollControllerEvents() : ScrollPresenter , ScrollView
  • UnhookHorizontalScrollControllerPanningInfoEvents() : ScrollPresenter
  • UnhookInputEvents() : NavigationViewItem
  • UnhookItemsRepeaterEvents() : ItemsView , ItemsViewSummaryPage , SelectorBarSummaryPage
  • UnhookItemsViewEvents() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UnhookLinedFlowLayoutEvents() : ItemsViewIntegrationPage , ItemsViewSummaryPage
  • UnhookPhotosCollectionChanged() : ItemsViewIntegrationPage
  • UnhookRichEditBoxTextChanged() : ScrollInputHelper
  • UnhookScrollBarEvent() : ScrollBarController
  • UnhookScrollBarPropertyChanged() : ScrollBarController
  • UnhookScrollersEvents() : VariableSizedItemsPage
  • UnhookScrollPresenterContentPropertyChanged() : ScrollInputHelper
  • UnhookScrollPresenterEvents() : ScrollPresenter , ScrollPresenterBringIntoViewPage , ScrollView
  • UnhookScrollPresenterPropertyChanged() : ScrollInputHelper
  • UnhookScrollViewerContentPropertyChanged() : ScrollInputHelper
  • UnhookScrollViewerDirectManipulationCompleted() : ScrollInputHelper
  • UnhookScrollViewerDirectManipulationStarted() : ScrollInputHelper
  • UnhookScrollViewerEvents() : ScrollPresenterBringIntoViewPage
  • UnhookScrollViewerPropertyChanged() : ScrollInputHelper
  • UnhookScrollViewEvents() : ItemsView , ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ScrollView
  • UnhookSelectorBarEvents() : SelectorBarSummaryPage
  • UnhookSourceControlTemplateChanged() : ScrollInputHelper
  • UnhookSourceElementLoaded() : ScrollInputHelper
  • UnhookTargetElementLoaded() : ScrollInputHelper
  • UnhookVerticalScrollControllerEvents() : ScrollPresenter , ScrollView
  • UnhookVerticalScrollControllerPanningInfoEvents() : ScrollPresenter
  • UnhookWindowPointerHandlers() : RevealBorderLight
  • UniformGridLayout() : UniformGridLayout
  • UniformGridLayoutDemo() : UniformGridLayoutDemo
  • UniformGridLayoutDemo_Loaded() : UniformGridLayoutDemo
  • UniformGridLayoutProperties() : UniformGridLayoutProperties
  • UninitializeForContext() : FlowLayoutAlgorithm , FlowLayoutState , Layout , StackLayoutState , UniformGridLayoutState
  • UninitializeForContextCore() : FlowLayoutDerived , FlowLayout , LinedFlowLayout , NonVirtualizingLayout , StackLayout , Flex , ActivityFeedLayout , UniformGridLayout , VirtualizingLayout
  • UniqueId() : VirtualizationInfo
  • UniqueIdElementPool() : final
  • UniScrollController() : BiDirectionalScrollController::UniScrollController
  • UniScrollController_ScrollCompleted() : BiDirectionalScrollController
  • UniScrollControllerScrollingScrollCompletedEventArgs() : BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs
  • unknownColor : AcrylicBrushTests
  • UnlinkElementFromParent() : NavigationViewItemsFactory
  • UnListenToCollectionChanges() : InspectingDataSource
  • UnloadContent() : AnimatedVisualPlayer
  • UnloadFallbackContent() : AnimatedVisualPlayer
  • UnlockItems() : LinedFlowLayout
  • UnlockLinedFlowLayoutItems() : LayoutsTestHooks
  • UnpinElement() : ItemsRepeater
  • UnrealizedTreeViewSelection_Collapsed() : TreeViewUnrealizedChildrenTestPage
  • UnrealizedTreeViewSelection_Expanding() : TreeViewUnrealizedChildrenTestPage
  • UnregisterAnchorCandidate() : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , IRepeaterScrollingSurface , ScrollPresenter , ScrollView
  • UnregisterAnchorCandidateFunc : ViewportTests::TestScrollingSurface
  • UnregisterCoreEventHandlers() : WebView2
  • UnregisterEvents() : SplitButton
  • UnregisterScrollAnchorCandidates() : ViewportManagerWithPlatformFeatures
  • UnregisterXamlEventHandlers() : WebView2
  • UnSelected : TreeViewNode
  • UnselectPrevItem() : NavigationView
  • UnsetDropShadow() : NavigationView
  • UnsetFallbackRating_Loaded() : RatingControlPage
  • UnsetGlyph() : RatingItemFontInfoProperties
  • UnsetGlyphProperty() : RatingItemFontInfoProperties
  • UnsetImage() : RatingItemImageInfoProperties
  • UnsetImageFallbackRating_Loaded() : RatingControlPage
  • UnsetImageProperty() : RatingItemImageInfoProperties
  • UnsetLuminosityButton_Clicked() : AcrylicRenderingPage
  • UntargetedTipCenterPlacementOffset() : TeachingTip
  • UntargetedTipFarPlacementOffset() : TeachingTip
  • UntargetedTipNearPlacementOffset() : TeachingTip
  • unwrap() : TStorageWrapperImpl< T, isNoTrackerRef > , TStorageWrapperImpl< T, true > , VectorInnerImpl< VectorOptions, Wrapper > , ReferenceTrackerStorageHelper< ImplT, T > , NonReferenceTrackerStorageHelper< T >
  • Update() : ItemsRepeaterElementClearingEventArgs , ItemsRepeaterElementIndexChangedEventArgs , ItemsRepeaterElementPreparedEventArgs
  • UpdateAcrylicBrush() : AcrylicBrush
  • UpdateAcrylicBrushesDarkTheme() : XamlControlsResources
  • UpdateAcrylicBrushesLightTheme() : XamlControlsResources
  • UpdateAcrylicStatus() : AcrylicBrush
  • UpdateActualLineHeight() : LinedFlowLayout
  • UpdateAdaptiveLayout() : NavigationView
  • UpdateAlphaSlider() : ColorPicker
  • UpdateAnticipatedOffset() : ScrollPresenter
  • UpdateAnticipatedZoomFactor() : ScrollPresenter
  • UpdateAppAnimator() : ItemsViewInteractiveTestsPage
  • UpdateAppAnimatorCheckBox() : ItemsViewInteractiveTestsPage
  • UpdateAppTitle() : NavigationViewTopNavOnlyPage
  • UpdateAspectRatiosWithItemsInfo() : LinedFlowLayout
  • UpdateAutomationName() : PersonPicture
  • UpdateAutomationSizeAndPosition() : MenuBar
  • UpdateBackAndCloseButtonsVisibility() : NavigationView
  • UpdateBackButton() : TitleBar
  • UpdateBackground() : ItemsViewSummaryPage , ScrollViewDynamicPage , SelectorBarSummaryPage
  • UpdateBadge() : PersonPicture
  • UpdateBadgeGlyph() : PersonPicture
  • UpdateBadgeImageSource() : PersonPicture
  • UpdateBadgeNumber() : PersonPicture
  • UpdateBitmapSources() : ColorSpectrum
  • UpdateBorderBrush() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateBorderThickness() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateBottomBorderLineVisualStates() : TabView
  • UpdateBottomBorderVisualState() : TabViewListView
  • UpdateBreadcrumbBarItemsFlowDirection() : BreadcrumbBar
  • UpdateBrush() : MonochromaticOverlayPresenter
  • UpdateButtonAutomationProperties() : TeachingTip
  • UpdateButtonCommonVisualState() : BreadcrumbBarItem
  • UpdateButtons() : TextCommandBarFlyout
  • UpdateButtonsState() : TeachingTip
  • UpdateButtonVisibilityCheckboxes() : PipsPagerPage
  • UpdateCachedBounds() : PinterestLayout
  • UpdateCanExecute() : MyCommand
  • UpdateCanScroll() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • UpdateCaptionMargins() : RatingControl
  • UpdateCenterInWebPage() : MapControl
  • UpdateCheckboxState() : ItemContainer
  • UpdateCheckedItemInGroup() : RadioMenuFlyoutItem
  • UpdateChild() : ParallaxView
  • UpdateChildrenCount() : LinedFlowLayoutDemo
  • UpdateChildrenList() : BreadcrumbBarPage
  • UpdateChkIsEnabled() : ScrollViewerPage
  • UpdateChkIsHorizontalRailEnabled() : ScrollViewerPage
  • UpdateChkIsHorizontalScrollChainingEnabled() : ScrollViewerPage
  • UpdateChkIsTabStop() : ScrollViewerPage
  • UpdateChkIsVerticalRailEnabled() : ScrollViewerPage
  • UpdateChkIsVerticalScrollChainingEnabled() : ScrollViewerPage
  • UpdateChkIsZoomChainingEnabled() : ScrollViewerPage
  • UpdateCloseButton() : InfoBar , TabViewItem
  • UpdateClosedCompactVisualState() : NavigationViewItemPresenter
  • UpdateCmbBackground() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbContent() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbContentHorizontalAlignment() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateCmbContentManipulationMode() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateCmbContentOrientation() : ScrollPresenterDynamicPage
  • UpdateCmbContentVerticalAlignment() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateCmbHorizontalScrollBarVisibility() : ScrollViewerPage , ScrollViewDynamicPage
  • UpdateCmbHorizontalScrollChainMode() : ScrollPresenterDynamicPage
  • UpdateCmbHorizontalScrollMode() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbHorizontalScrollRailMode() : ScrollPresenterDynamicPage
  • UpdateCmbIgnoredInputKinds() : ScrollPresenterDynamicPage
  • UpdateCmbItemsRepeaterHorizontalAlignment() : VariableSizedItemsPage
  • UpdateCmbItemsRepeaterVerticalAlignment() : VariableSizedItemsPage
  • UpdateCmbScrollPresenterManipulationMode() : ScrollPresenterDynamicPage
  • UpdateCmbScrollViewerManipulationMode() : ScrollViewerPage
  • UpdateCmbVerticalScrollBarVisibility() : ScrollViewerPage , ScrollViewDynamicPage
  • UpdateCmbVerticalScrollChainMode() : ScrollPresenterDynamicPage
  • UpdateCmbVerticalScrollMode() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbVerticalScrollRailMode() : ScrollPresenterDynamicPage
  • UpdateCmbXYFocusKeyboardNavigation() : ScrollViewerPage , ScrollViewDynamicPage
  • UpdateCmbZoomChainMode() : ScrollPresenterDynamicPage
  • UpdateCmbZoomMode() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateColor() : ColorPicker , ColorSpectrum
  • UpdateColorControls() : ColorPicker
  • UpdateColorFromPoint() : ColorSpectrum
  • UpdateColors() : SwipeControl
  • UpdateColorsIfExecuteItem() : SwipeControl
  • UpdateColorsIfRevealItems() : SwipeControl
  • UpdateCompactPaneLength() : NavigationViewItem , NavigationViewItemPresenter
  • UpdateCompositionBrush() : AcrylicBrushPage , AcrylicMarkupPage
  • UpdateCompositionExtendMode() : RadialGradientBrush
  • UpdateCompositionGradientCenter() : RadialGradientBrush
  • UpdateCompositionGradientMappingMode() : RadialGradientBrush
  • UpdateCompositionGradientOrigin() : RadialGradientBrush
  • UpdateCompositionGradientRadius() : RadialGradientBrush
  • UpdateCompositionGradientStops() : RadialGradientBrush
  • UpdateCompositionInterpolationSpace() : RadialGradientBrush
  • UpdateConditionalExpressionAnimationForImpulse() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • UpdateContent() : AnimatedVisualPlayer , RefreshVisualizer , ScrollPresenter , ScrollViewDynamicPage , TitleBar
  • UpdateContentBindingsForPaneDisplayMode() : NavigationView
  • UpdateContentHeight() : ScrollViewWithScrollControllersPage
  • UpdateContentLeftIndentation() : NavigationViewItemPresenter
  • UpdateContentMargin() : ScrollViewWithScrollControllersPage
  • UpdateContentOrientation() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • UpdateContentPosition() : InfoBar
  • UpdateContentSize() : ScrollInputHelper
  • UpdateContentWidth() : ScrollViewWithScrollControllersPage
  • UpdateControlForContact() : PersonPicture
  • UpdateControlsInWebPage() : MapControl
  • UpdateCoreWebViewScale() : WebView2
  • UpdateCoreWebViewVisibility() : WebView2
  • UpdateCornerRadius() : AutoSuggestBoxHelper , ComboBoxHelper , ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateCurrentItemIndex() : ItemsViewSummaryPage
  • UpdateDataSourceItemCount() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • UpdateDefaultVisualBackgroundColor() : WebView2
  • UpdateDepth() : TreeViewNode
  • UpdateDisplayModeAutoState() : PagerControl
  • UpdateDisplayRadioButton() : RadioButtonsPage
  • UpdateDisplayRadioButtonButton_Click() : RadioButtonsPage
  • UpdateDragDropVisualState() : TabViewItem
  • UpdateDragRegion() : TitleBar
  • UpdateDropTargetDropEffect() : TreeViewList
  • UpdateDynamicHeroContentPlacementToBottom() : TeachingTip
  • UpdateDynamicHeroContentPlacementToBottomImpl() : TeachingTip
  • UpdateDynamicHeroContentPlacementToTop() : TeachingTip
  • UpdateDynamicHeroContentPlacementToTopImpl() : TeachingTip
  • UpdateElementIndex() : final
  • UpdateEllipse() : ColorSpectrum
  • UpdateEllipsisBreadcrumbBarItemDropDownItemTemplate() : BreadcrumbBar
  • UpdateEllipsisDropDownItemCommonVisualState() : BreadcrumbBarItem
  • UpdateEndOffsetExpression() : ParallaxView
  • UpdateExecuteBackgroundColor() : SwipeControl
  • UpdateExecuteForegroundColor() : SwipeControl
  • UpdateExpandDirection() : Expander
  • UpdateExpandState() : Expander
  • UpdateExpressionAnimation() : ParallaxView
  • UpdateExpressionAnimationSources() : ScrollPresenter
  • UpdateExtentHeight() : ItemsViewSummaryPage , VariableSizedItemsPage , ScrollViewDynamicPage
  • UpdateExtentWidth() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • UpdateFallbackBrush() : RadialGradientBrush
  • UpdateFlowsFromAndFlowsTo() : CommandBarFlyoutCommandBar
  • UpdateFlyoutIndex() : BreadcrumbBarItem
  • UpdateFocusedElement() : final
  • UpdateFooter() : TitleBar
  • UpdateFooterRepeaterItemsSource() : NavigationView
  • UpdateForeground() : InfoBar , TabViewItem
  • UpdateHasChildren() : TreeViewNode
  • UpdateHeader() : TitleBar
  • UpdateHeaderPresenterState() : NumberBox
  • UpdateHeaderSizes() : ScrollViewerPage
  • UpdateHeaderSpacing() : TitleBar
  • UpdateHeaderVisibility() : NavigationView
  • UpdateHeight() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , TitleBar
  • UpdateHeightFromInputTarget() : ColorPickerPage
  • UpdateHorizontalAnchorRatio() : ItemsViewSummaryPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • UpdateHorizontalOffset() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • UpdateHorizontalScrollBarVisibility() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • UpdateHorizontalScrollChainMode() : ScrollViewDynamicPage
  • UpdateHorizontalScrollController() : ScrollView
  • UpdateHorizontalScrollMode() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • UpdateHorizontalScrollRailMode() : ScrollViewDynamicPage
  • UpdateIcon() : InfoBadgePage , InfoBar , TitleBar
  • UpdateIconVisibility() : InfoBar
  • UpdateIfReady() : PersonPicture
  • UpdateIgnoredInputKinds() : ScrollViewDynamicPage
  • UpdateImage() : ImagePage
  • UpdateIndentation() : TreeViewItem
  • UpdateIndex() : VirtualizationInfo
  • UpdateIndexBasedLayoutOrientation() : FlowLayout , StackLayout , UniformGridLayout
  • UpdateIndicatorWidthTest() : ProgressBarTests
  • UpdateIndividualNavigationButtonVisualState() : PipsPager
  • UpdateInkPresenterSize() : InkCanvas
  • UpdateInlineItemTypeVisualState() : BreadcrumbBarItem
  • UpdateInnerLayouts() : AnimationsDemoPage::AnimationElementFactory
  • UpdateInteractableElementsList() : TitleBar
  • UpdateInteractionRatiosComboBox() : RefreshContainerOnImagePage
  • UpdateInternalExpressionAnimations() : ScrollInputHelper
  • UpdateIsChildSelected() : NavigationView
  • UpdateIsChildSelectedForIndexPath() : NavigationView
  • UpdateIsClosedCompact() : NavigationView , NavigationViewItem , NavigationViewItemHeader , NavigationViewItemSeparator
  • UpdateIsEnabled() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateIsHovering() : ButtonInteraction
  • UpdateIsInteractingForRefresh() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • UpdateIsItemDraggedOver() : TabView
  • UpdateIsOpen() : SwipeControl
  • UpdateIsPressing() : ButtonInteraction
  • UpdateIsTabStop() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateIsTargetElementInSource() : ScrollInputHelper
  • UpdateIsUsingAcrylicBrush() : AcrylicBrushPage , AcrylicMarkupPage
  • UpdateItemIndentation() : NavigationViewItem , NavigationViewItemHeader , NavigationViewItemSeparator
  • UpdateItemsControlHeaderTemplate() : GroupedItemsControlPage
  • UpdateItemsControlIsTabStop() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsControlItemTemplate() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsControlProperties() : GroupedItemsControlPage
  • UpdateItemsControlTabNavigation() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsControlXYFocusKeyboardNavigation() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsCount() : SelectorBarSummaryPage
  • UpdateItemsInfo() : LinedFlowLayout
  • UpdateItemsInfoRequestedCheckBoxes() : ItemsViewInteractiveTestsPage
  • UpdateItemsInfoRequestedHandler() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage
  • UpdateItemsPanelAreStickyGroupHeadersEnabled() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsPanelCacheLength() : GroupedListViewBasePage
  • UpdateItemsPanelGroupHeaderPlacement() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsPanelGroupPadding() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsPanelMargin() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsPanelOrientation() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsPanelProperties() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsPanelType() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsRepeater() : ItemsView
  • UpdateItemsRepeaterChildrenCount() : ItemsViewSummaryPage
  • UpdateItemsRepeaterDefaultCacheLengths() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementActualHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementActualWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementDesiredSize() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementIsEnabled() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMaxHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMaxWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMinHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMinWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementRenderSize() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterFields() : ItemsViewSummaryPage
  • UpdateItemsRepeaterHorizontalAlignment() : ItemsViewSummaryPage
  • UpdateItemsRepeaterHorizontalCacheLength() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemContainerCanUserInvoke() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemContainerCanUserSelect() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemContainerIsSelected() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemsSource() : BreadcrumbBar , NavigationView
  • UpdateItemsRepeaterLogItemIndexDbg() : ItemsViewSummaryPage
  • UpdateItemsRepeaterVerticalAlignment() : ItemsViewSummaryPage
  • UpdateItemsRepeaterVerticalCacheLength() : ItemsViewSummaryPage , VariableSizedItemsPage
  • UpdateItemsSelectionMode() : TreeView
  • UpdateItemsSource() : RadioButtons
  • UpdateItemsViewCurrentElementVisual() : ItemsViewSummaryPage
  • UpdateItemsViewIsItemInvokedEnabled() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • UpdateItemsViewKeyboardNavigationReferenceOffsetVisual() : ItemsViewSummaryPage
  • UpdateItemsViewLayout() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • UpdateItemsViewSelectionFromSelectedItem() : SelectorBar
  • UpdateItemsViewSelectionMode() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • UpdateItemsWrapGridCacheLength() : GroupedItemsControlPage
  • UpdateItemsWrapGridItemHeight() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsWrapGridItemWidth() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsWrapGridMaximumRowsOrColumns() : ListViewBasePage , FlatItemsControlPage
  • UpdateItemsWrapGridUIVisibility() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemTemplate() : RadioButtons , BreadcrumbBar
  • UpdateItemTypeVisualState() : BreadcrumbBarItem
  • UpdateItemVisualState() : CommandBarFlyoutCommandBar
  • UpdateKeyboardNavigationReference() : ItemsView
  • UpdateLabelContainersOffsets() : AnnotatedScrollBar
  • UpdateLastElement() : BreadcrumbBar
  • UpdateLayoutPanelBackground() : LinedFlowLayoutDemo
  • UpdateLayoutPanelBorderBrush() : LinedFlowLayoutDemo
  • UpdateLayoutPanelBorderThickness() : LinedFlowLayoutDemo
  • UpdateLayoutPanelCornerRadius() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementActualHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementActualWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementCornerRadius() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementIsEnabled() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMaxHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMaxWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMinHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMinWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelHorizontalAlignment() : LinedFlowLayoutDemo
  • UpdateLayoutPanelMargin() : LinedFlowLayoutDemo
  • UpdateLayoutPanelMaxHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelMaxWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelPadding() : LinedFlowLayoutDemo
  • UpdateLayoutPanelVerticalAlignment() : LinedFlowLayoutDemo
  • UpdateLayoutPanelWidth() : LinedFlowLayoutDemo
  • UpdateLayoutVirtualization() : PipsPager
  • UpdateLeftNavigationOnlyVisualState() : NavigationView
  • UpdateLeftRepeaterItemSource() : NavigationView
  • UpdateLength() : TwoPaneViewPage
  • UpdateLightTargets() : RevealBrush
  • UpdateLinedFlowLayoutActualLineHeight() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutAverageItemAspectRatioDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutForcedWrapMultiplierDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutFrozenItemIndexes() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutIsFastPathSupportedDbg() : ItemsViewSummaryPage
  • UpdateLinedFlowLayoutItemsJustification() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutItemsStretch() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • UpdateLinedFlowLayoutLineHeight() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutLineSpacing() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutLockedItemsVisuals() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutLogItemIndexDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutMinItemSpacing() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutRealizedItemIndexes() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutRequestedRangeLength() : ItemsViewSummaryPage
  • UpdateLinedFlowLayoutRequestedRangeStartIndex() : ItemsViewSummaryPage
  • UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateListViewBaseProperties() : GroupedListViewBasePage
  • UpdateListViewBaseReorderMode() : ListViewBasePage
  • UpdateListViewBaseSelectionMode() : GroupedListViewBasePage , ListViewBasePage
  • UpdateListViewBaseSingleSelectionFollowsFocus() : GroupedListViewBasePage , ListViewBasePage
  • UpdateListViewBaseTabNavigation() : GroupedListViewBasePage , ListViewBasePage
  • UpdateListViewItemContainerTransitions() : TabView
  • UpdateLottieProgress() : ProgressRing
  • UpdateManipulationAlignments() : ScrollInputHelper
  • UpdateManipulationRedirectionMode() : ScrollPresenter
  • UpdateManipulationZoomMode() : ScrollInputHelper
  • UpdateMapIcon() : MapControl
  • UpdateMapServiceTokenInWebPage() : MapControl
  • UpdateMargin() : ItemsViewSummaryPage , NavigationViewItemPresenter , SelectorBarSummaryPage , ScrollViewDynamicPage
  • UpdateMarginTextBlockButton : PagerControlTestPageElements
  • UpdateMaxHeight() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateMaxWidth() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateMaxZoomFactor() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateMinMax_Click() : ProgressBarPage , ProgressBarReTemplatePage , ProgressRingCustomLottieSourcePage , ProgressRingPage
  • UpdateMinMaxTest() : ProgressBarTests , ProgressRingTests
  • UpdateMinZoomFactor() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateMirrorTransform() : AnimatedIcon
  • UpdateMode() : TwoPaneView
  • UpdateModernPanelUIVisibility() : FlatItemsControlPage , ListViewBasePage
  • UpdateMoreButton() : ColorPicker
  • UpdateMousePointerOverInstance() : ItemContainer
  • UpdateMultipleSelection() : TreeViewItem
  • UpdateMultiSelectState() : ItemContainer
  • UpdateNavigationButtonVisualStates() : PipsPager
  • UpdateNavigationViewItemsFactory() : NavigationView
  • UpdateNavigationViewItemToolTip() : NavigationViewItem
  • UpdateNodeIsExpandedAsync() : TreeViewItem
  • UpdateNodeSelection() : ViewModel
  • UpdateNoiseBrush() : AcrylicBrushPage , AcrylicMarkupPage
  • UpdateNonClientRegion() : TabView
  • UpdateNumberOfPanelCollectionInfiniteItems() : PagerControl
  • UpdateNumberPanel() : PagerControl
  • UpdateNumberPanelCollectionAllItems() : PagerControl
  • UpdateNumberPanelCollectionCenterWithEllipsis() : PagerControl
  • UpdateNumberPanelCollectionEndWithEllipsis() : PagerControl
  • UpdateNumberPanelCollectionStartWithEllipsis() : PagerControl
  • UpdateNumberPanelContentTextBlock() : PagerControlPage
  • UpdateOffset() : ScrollPresenter
  • UpdateOffsets() : CanvasScrollControllerConsumer
  • UpdateOnEdgeButtonVisualStates() : PagerControl
  • UpdateOpenPaneLength() : NavigationView
  • UpdateOrientation() : CompositionScrollController
  • UpdateOuterItemsControl() : NestedItemsControlsPage
  • UpdateOuterListView() : NestedListViewsPage
  • UpdateOutOfBoundsPanSize() : ScrollInputHelper
  • UpdatePadding() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage , TitleBar , ItemsViewSummaryPage
  • UpdatePadding_Click() : ProgressBarPage , ProgressBarReTemplatePage
  • UpdatePaneButtonsWidths() : NavigationView
  • UpdatePaneDisplayMode() : NavigationView
  • UpdatePaneLayout() : NavigationView
  • UpdatePaneOverlayGroup() : NavigationView
  • UpdatePaneTabFocusNavigation() : NavigationView
  • UpdatePaneTitleFrameworkElementParents() : NavigationView
  • UpdatePaneTitleMargins() : NavigationView
  • UpdatePaneToggleButton() : TitleBar
  • UpdatePaneToggleButtonVisibility() : NavigationView
  • UpdatePaneToggleSize() : NavigationView
  • UpdatePaneVisibility() : NavigationView
  • UpdatePanningElementOffsetMultiplier() : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • UpdatePanningFrameworkElementLength() : BiDirectionalScrollController::UniScrollController , CompositionScrollControllerPanningInfo
  • UpdatePanningFrameworkElementOffset() : CompositionScrollController
  • UpdateParents() : TreeNode , TreeStructure
  • UpdateParentWindow() : WebView2
  • UpdatePartsVisibility() : SelectorBarItem
  • UpdatePhasingInfo() : VirtualizationInfo
  • UpdatePin() : final
  • UpdatePipOrientation() : PipsPager
  • UpdatePipsItems() : PipsPager
  • UpdatePolicyStatus() : MaterialHelper
  • UpdatePopupRequestedTheme() : TeachingTip
  • UpdatePosition() : SliderInteraction
  • UpdatePositionBoundaries() : ScrollPresenter
  • UpdatePositionsOfAnchoredElements() : AnnotatedScrollBar
  • UpdatePreviousColorRectangle() : ColorPicker
  • UpdateRadioButtonsSource() : RadioButtonsPage
  • UpdateRaiseAnchorNotifications() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • UpdateRatingItemsAppearance() : RatingControl
  • UpdateRectVisualState() : ButtonInteractionPage
  • UpdateRefreshState() : RefreshVisualizer
  • UpdateRenderedSubscriptionAndVisibility() : WebView2
  • UpdateRepeaterItemsSource() : NavigationViewItem , NavigationView
  • UpdateRestingPointExpressionAnimationForImpulse() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • UpdateRevealBrush() : RevealBrush
  • UpdateRoundingScaleFactor() : LinedFlowLayout
  • UpdateRowsColumns() : TwoPaneView
  • UpdateScrollAutomationPatternProperties() : ScrollPresenter
  • UpdateScrollbars() : ScrollPresenterExpressionAnimationSourcesPage
  • UpdateScrollControllerIsScrollable() : ScrollPresenter
  • UpdateScrollControllersAutoHiding() : ScrollView
  • UpdateScrollControllersSeparator() : ScrollView
  • UpdateScrollControllersSeparatorVisualState() : ScrollView
  • UpdateScrollControllersVisibility() : ScrollView
  • UpdateScrollControllersVisualState() : ScrollView
  • UpdateScrollControllerValues() : ScrollPresenter
  • UpdateScrollerChangeViewVerticalScrollPercentage() : VariableSizedItemsPage
  • UpdateScrollerExtentHeight() : VariableSizedItemsPage
  • UpdateScrollerScrollableHeight() : VariableSizedItemsPage
  • UpdateScrollerVerticalAnchorRatio() : VariableSizedItemsPage
  • UpdateScrollerVerticalOffset() : VariableSizedItemsPage
  • UpdateScrollerVerticalScrollPercentage() : VariableSizedItemsPage
  • UpdateScrollerZoomFactor() : VariableSizedItemsPage
  • UpdateScrollOffsetToLabelOffsetFactor() : AnnotatedScrollBar
  • UpdateScrollPatternProperties() : ScrollPresenterAutomationPeer
  • UpdateScrollPresenter() : ScrollView
  • UpdateScrollPresenterHorizontalScrollController() : ScrollView
  • UpdateScrollPresenterVerticalScrollController() : ScrollView
  • UpdateScrollView() : ItemsView
  • UpdateScrollViewBackground() : LinedFlowLayoutDemo
  • UpdateScrollViewBorderBrush() : LinedFlowLayoutDemo
  • UpdateScrollViewBorderThickness() : LinedFlowLayoutDemo
  • UpdateScrollViewContentOrientation() : LinedFlowLayoutDemo
  • UpdateScrollViewCornerRadius() : LinedFlowLayoutDemo
  • UpdateScrollViewDefaultAnchorRatios() : ItemsViewSummaryPage
  • UpdateScrollViewerDecreaseAndIncreaseButtonsViewState() : TabView
  • UpdateScrollViewerExtentHeight() : ListViewBasePage , GroupedListViewBasePage
  • UpdateScrollViewerExtentWidth() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerHorizontalOffset() : ListViewBasePage , GroupedListViewBasePage
  • UpdateScrollViewerHorizontalScrollMode() : GroupedListViewBasePage
  • UpdateScrollViewerHorizontalSnapPointsType() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerProperties() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerScrollOrientation() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerSizeProperties() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerVerticalOffset() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerVerticalScrollMode() : GroupedListViewBasePage
  • UpdateScrollViewerVerticalSnapPointsType() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerViewportHeight() : ListViewBasePage , GroupedListViewBasePage
  • UpdateScrollViewerViewportWidth() : ListViewBasePage , GroupedListViewBasePage
  • UpdateScrollViewExtentHeight() : LinedFlowLayoutDemo
  • UpdateScrollViewExtentWidth() : LinedFlowLayoutDemo
  • UpdateScrollViewFields() : ItemsViewSummaryPage
  • UpdateScrollViewHeight() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalAnchorRatio() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalOffset() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalScrollBarVisibility() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalScrollMode() : LinedFlowLayoutDemo
  • UpdateScrollViewIsEnabled() : LinedFlowLayoutDemo
  • UpdateScrollViewIsTabStop() : LinedFlowLayoutDemo
  • UpdateScrollViewMargin() : LinedFlowLayoutDemo
  • UpdateScrollViewMaxHeight() : LinedFlowLayoutDemo
  • UpdateScrollViewMaxWidth() : LinedFlowLayoutDemo
  • UpdateScrollViewPadding() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalAnchorRatio() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalOffset() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalScrollBarVisibility() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalScrollMode() : LinedFlowLayoutDemo
  • UpdateScrollViewWidth() : LinedFlowLayoutDemo
  • UpdateScrollViewZoomMode() : LinedFlowLayoutDemo
  • UpdateSelectedBackgroundPathTranslateTransform() : TabViewItem
  • UpdateSelectedColorName() : ColorPickerPage
  • UpdateSelectedIndex() : TabView , RadioButtons
  • UpdateSelectedItem() : RadioButtons , SelectorBarSummaryPage , TabView , ItemsViewSummaryPage
  • UpdateSelectedItemFromItemsView() : SelectorBar
  • UpdateSelectedItemFromMenuItems() : NavigationView
  • UpdateSelectedItems() : ItemsViewSummaryPage
  • UpdateSelectedPip() : PipsPager
  • UpdateSelection() : TreeViewItem , TreeView , SelectedTreeNodeVector , ItemContainerAutomationPeer , ViewModel , TreeViewItemAutomationPeer
  • UpdateSelectionEllipseColor() : ColorPickerPage
  • UpdateSelectionEllipsePosition() : ColorPickerPage
  • UpdateSelectionForMenuItems() : NavigationView
  • UpdateSelectionModelSelection() : NavigationView
  • UpdateSelectionModelSelectionForSelectedItem() : NavigationView
  • UpdateSelectionStateOfAncestors() : ViewModel
  • UpdateSelectionStateOfDescendants() : ViewModel
  • UpdateSelectionVisual() : TreeViewItem
  • UpdateSelector() : ItemsView
  • UpdateSettingsItemToolTip() : NavigationView
  • UpdateSeverity() : InfoBar
  • UpdateSharedState() : AcrylicBrushPage
  • UpdateSingleSelectionFollowsFocusTemplateSetting() : NavigationView
  • UpdateSizeBasedTemplateSettings() : TeachingTip
  • UpdateSizeOfSetForElements() : PipsPager
  • UpdateSnapPointsIgnoredValue() : ScrollPresenter
  • UpdateSnapPointsRanges() : ScrollPresenter
  • UpdateSortAndFilter() : SortingAndFilteringPage
  • UpdateSource() : XamlControlsResources , ScrollInputHelper
  • UpdateSourceInternal() : WebView2
  • UpdateSourceOnEnter() : WebView2BasicPage
  • UpdateSpectrumBrush() : SpectrumBrush
  • UpdateSpinButtonEnabled() : NumberBox
  • UpdateSpinButtonPlacement() : NumberBox
  • UpdateStackLayoutOrientation() : ItemsViewSummaryPage
  • UpdateStackLayoutSpacing() : ItemsViewSummaryPage
  • UpdateStartOffsetExpression() : ParallaxView
  • UpdateState() : ScrollPresenter
  • UpdateStateButton_Click() : AcrylicBrushPage
  • UpdateStates() : ProgressBar , ProgressRing
  • UpdateStatesComboBox() : RefreshContainerPage , RefreshContainerOnImagePage
  • UpdateSubtitle() : TitleBar
  • UpdateTabBottomBorderLineVisualStates() : TabView
  • UpdateTabContent() : TabView
  • UpdateTabGeometry() : TabViewItem
  • UpdateTabIndex() : TabView
  • UpdateTabNavigation() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateTabViewWithTearOutList() : TabView
  • UpdateTabWidths() : TabView
  • UpdateTail() : TeachingTip
  • UpdateTblComputedHorizontalScrollMode() : ScrollViewDynamicPage
  • UpdateTblComputedVerticalScrollMode() : ScrollViewDynamicPage
  • UpdateTemplateSettingElementLists() : PagerControl
  • UpdateTemplateSettings() : CommandBarFlyoutCommandBar
  • UpdateTextState() : RadioMenuFlyoutItemPage
  • UpdateTextToValue() : NumberBox
  • UpdateTheme() : TitleBar
  • UpdateThirdDimensionSlider() : ColorPicker
  • UpdateThresholdReached() : SwipeControl
  • UpdateThumbExpression() : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • UpdateTintLuminosityOpacity() : XamlControlsResources
  • UpdateTitle() : TitleBar
  • UpdateTitleBarPadding() : NavigationView
  • UpdateToggleBackgroundColor() : NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewPage
  • UpdateTopNavigationWidthCache() : NavigationView
  • UpdateTopNavOverflowRepeaterItemsSource() : NavigationView
  • UpdateTopNavPrimaryRepeaterItemsSource() : NavigationView
  • UpdateTopNavRepeatersItemSource() : NavigationView
  • UpdateTraces() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • UpdateTransform() : SliderInteraction
  • UpdateTransformSource() : ScrollPresenter
  • UpdateTreeViewItemVisualState() : TreeViewItem
  • UpdateTxtMargin() : ScrollViewerPage
  • UpdateTxtMaxZoomFactor() : ScrollViewerPage
  • UpdateTxtMinZoomFactor() : ScrollViewerPage
  • UpdateTxtPadding() : ScrollViewerPage
  • UpdateUI() : CommandBarFlyoutCommandBar
  • UpdateUniformGridLayoutMaximumRowsOrColumns() : ItemsViewSummaryPage
  • UpdateUniformGridLayoutMinColumnSpacing() : ItemsViewSummaryPage
  • UpdateUniformGridLayoutMinRowSpacing() : ItemsViewSummaryPage
  • UpdateUniformGridLayoutOrientation() : ItemsViewSummaryPage
  • UpdateUnzoomedExtentAndViewport() : ScrollPresenter
  • UpdateValue_Click() : ProgressBarReTemplatePage , ProgressRingCustomLottieSourcePage , ProgressRingPage , ProgressBarPage
  • UpdateValueToText() : NumberBox
  • UpdateVerticalAnchorRatio() : ScrollPresenterRepeaterAnchoringPage , ScrollViewDynamicPage , ItemsViewSummaryPage , ScrollPresenterStackPanelAnchoringPage
  • UpdateVerticalOffset() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • UpdateVerticalScrollBarVisibility() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • UpdateVerticalScrollChainMode() : ScrollViewDynamicPage
  • UpdateVerticalScrollController() : ScrollView
  • UpdateVerticalScrollMode() : ScrollViewWithScrollControllersPage , ScrollViewDynamicPage , ItemsViewSummaryPage
  • UpdateVerticalScrollRailMode() : ScrollViewDynamicPage
  • UpdateViewport() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • UpdateViewportSize() : ScrollInputHelper
  • UpdateVisibility() : InfoBar
  • UpdateVisualInteractionSourceMode() : ScrollPresenter
  • UpdateVisualState() : NavigationView , NavigationViewItem , CommandBarFlyoutCommandBar , ColorSpectrum , NavigationViewItemSeparator , NavigationViewItemHeader , ColorPicker , ItemContainer
  • UpdateVisualStateForChevron() : NavigationViewItem
  • UpdateVisualStateForClosedCompact() : NavigationViewItem
  • UpdateVisualStateForDisplayModeGroup() : NavigationView
  • UpdateVisualStateForIconAndContent() : NavigationViewItem
  • UpdateVisualStateForInfoBadge() : NavigationViewItem
  • UpdateVisualStateForIsEnabledChange() : NumberBox , RadioButtons
  • UpdateVisualStateForKeyboardFocusedState() : NavigationViewItem
  • UpdateVisualStateForNavigationViewPositionChange() : NavigationViewItem
  • UpdateVisualStateForOverflowButton() : NavigationView
  • UpdateVisualStateForPointer() : NavigationViewItem
  • UpdateVisualStateForToolTip() : NavigationViewItem
  • UpdateVisualStateNoTransition() : NavigationViewItem
  • UpdateVisualStates() : ScrollView , SplitButton , MenuBarItem
  • UpdateWidth() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage , ScrollViewDynamicPage
  • UpdateWidth_Click() : ProgressBarReTemplatePage , ProgressBarPage , ProgressRingPage , ProgressRingStoryboardAnimationPage , ProgressRingCustomLottieSourcePage
  • UpdateWidthBasedTemplateSettings() : ProgressBar
  • UpdateWidthForPrimaryItem() : TopNavigationViewDataProvider
  • UpdateWidthModeVisualState() : TabViewItem
  • UpdateXYFocusKeyboardNavigation() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateZoomChainMode() : ScrollViewDynamicPage
  • UpdateZoomFactor() : ScrollViewDynamicPage , ItemsViewSummaryPage
  • UpdateZoomLevelInWebPage() : MapControl
  • UpdateZoomMode() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage , ScrollViewDynamicPage
  • UpDownEnabledTest() : NumberBoxTests
  • UpDownTest() : NumberBoxTests
  • UseAccessKey() : RadioButtonsTests
  • UseCompactResources() : XamlControlsResourcesProperties
  • UseCompactResourcesProperty() : XamlControlsResourcesProperties
  • UseCrossFadeEffect : MaterialHelperBase
  • UseDynamicScrollbars() : RegUtil
  • UseF6ToReturnToTestPageToCloseTip() : TeachingTipTests
  • UseItemsView() : ItemsViewSummaryPage
  • UseLinedFlowLayoutWithoutLineHeight() : ItemsViewTestsWithInputHelper
  • UseLinedFlowLayoutWithoutMinWidth() : ItemsViewTestsWithInputHelper
  • useLongLabelContent_Checked() : AnnotatedScrollBarSummaryPage
  • useLongLabelContent_Unchecked() : AnnotatedScrollBarSummaryPage
  • UsePropertyFactory() : EffectBase
  • UserAgentTest() : WebView2Tests
  • UserElementFactory() : NavigationViewItemsFactory , RadioButtonsElementFactory , BreadcrumbElementFactory
  • UsesArrangeWidthInfo() : LinedFlowLayout
  • UseScrollPresenter() : ScrollPresenterDynamicPage
  • UseScrollView() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • UseScrollViewer() : ScrollViewerPage
  • UsesFastPathLayout() : LinedFlowLayout
  • UseSystemVisualLink() : InkCanvas
  • UseTestBounds() : TeachingTipTests
  • UseTestScreenBounds() : TeachingTipTests
  • useTestScreenBoundsCheckbox : TeachingTipTestPageElements
  • UseTestWindowBounds() : TeachingTipTests
  • useTestWindowBoundsCheckbox : TeachingTipTestPageElements
  • UseTextControlSource() : ParallaxViewTests
  • UseVirtualizingStackPanelSource() : ParallaxViewTests
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- v -

  • ValidadePinClickEvent() : MapControlTests
  • ValidateAdaptabilityWhenChangingFirstElementHeightForGridLayout() : FlowLayoutTests
  • ValidateAdaptabilityWhenChangingFirstElementSizeForGridLayout() : FlowLayoutTests
  • ValidateAdaptabilityWhenChangingFirstElementWidthForGridLayout() : FlowLayoutTests
  • ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout() : FlowLayoutTests
  • ValidateAnchorRatio() : ScrollPresenter , ScrollView
  • ValidateAndStoreParameters() : AnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • ValidateAppBarButtonRevealStyles() : RevealTests
  • ValidateBasicScrollViewerScenario() : EffectiveViewportTests
  • ValidateBindingAndTemplateSelection() : ItemTemplateTests
  • ValidateBringIntoViewOperations() : ViewManagerTests
  • ValidateCacheLength() : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • ValidateCannotDragWithinSelectedSubtree() : TreeViewTests
  • ValidateCannotDragWithinSelectedSubtree_ContentMode() : TreeViewTests
  • ValidateCannotDragWithinSelectedSubtree_NodeMode() : TreeViewTests
  • ValidateCanSetSelectedIndex() : SelectionModelTests
  • ValidateChildBounds() : FlowLayoutTests
  • ValidateChildRemovedFromParentWhenOwnerIsDifferent() : RecyclePoolTests
  • ValidateChildrenPeers() : AccessibilityTests
  • ValidateClear() : FlowLayoutCollectionChangeTests , SelectionModelTests
  • ValidateConstructorParameters() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • ValidateContentWithConstrainedHeight() : ScrollPresenterTests
  • ValidateContentWithConstrainedSize() : ScrollPresenterTests
  • ValidateContentWithConstrainedWidth() : ScrollPresenterTests
  • ValidateCorrectSizeWhenEmptyDataTemplateInSelector() : ItemTemplateTests
  • ValidateCurrentFocus() : ViewManagerTests
  • ValidateCustomElementFactory() : ItemTemplateTests
  • ValidateCustomRecyclingElementFactory() : ItemTemplateTests
  • ValidateDataContextDoesNotGetOverwritten() : ViewManagerTests
  • ValidateDataContextGetsPropagated() : ViewManagerTests
  • ValidateDataTemplateAsItemTemplate() : ItemTemplateTests
  • ValidateDataTemplateSelectorAsItemTemplate() : ItemTemplateTests
  • ValidateDataTemplateWithElementNameBinding() : ItemTemplateTests
  • ValidateDataTemplateWithNestedElementNameBinding() : ItemTemplateTests
  • ValidateDefaultHeightForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateDefaultSizeForFirstItemDoesntOverridePresetOne() : FlowLayoutTests
  • ValidateDefaultSizeForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateDefaultValues() : ButtonInteractionTests , SliderInteractionTests
  • ValidateDefaultWidthForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateEffectsPresent() : RevealStatesPage
  • ValidateElementClearingClearsDataContext() : ViewManagerTests
  • ValidateElementClearingOrderFromFlowLayout() : ViewManagerTests
  • ValidateElementEvents() : ViewManagerTests
  • ValidateElementIndexChangedEventOnStableReset() : ViewManagerTests
  • ValidateElementIndices : RecyclingElementFactoryDerived
  • ValidateElementsHaveCorrectKeys() : RecyclePoolTests
  • ValidateElementsSizeInGridLayout() : FlowLayoutTests
  • ValidateElementToIndexMapping() : RepeaterTests
  • ValidateEstimations_Flow_Horizontal() : FlowLayoutTests
  • ValidateEstimations_Flow_Vertical() : FlowLayoutTests
  • ValidateEstimations_Grid_Horizontal() : FlowLayoutTests
  • ValidateEstimations_Grid_Vertical() : FlowLayoutTests
  • ValidateEstimations_Stack_Horizontal() : FlowLayoutTests
  • ValidateEstimations_Stack_Vertical() : FlowLayoutTests
  • ValidateEventCounts() : WebView2Tests
  • ValidateEventDetail() : WebView2Tests
  • ValidateEventWhenInnerNodeChangesSelectionState() : SelectionModelTests
  • ValidateExceptionCounts() : WebView2Tests
  • ValidateExpandingRaisedOnItemHavingUnrealizedChildren() : TreeViewTests
  • ValidateExpandingRaisedOnItemHavingUnrealizedChildren_ContentMode() : TreeViewTests
  • ValidateExpandingRaisedOnItemHavingUnrealizedChildren_NodeMode() : TreeViewTests
  • ValidateFlowLayout() : FlowLayoutTests
  • ValidateFlowLayoutChildrenLayoutBounds() : FlowLayoutTests
  • ValidateFlowLayoutLineAlignment() : FlowLayoutTests
  • ValidateFlowLayoutVaryingHeights() : FlowLayoutTests
  • ValidateFlowLayoutWithOneItemHasNonZeroExtent() : FlowLayoutTests
  • ValidateFocusMoveOnElementCleared() : ViewManagerTests
  • ValidateFocusMoveOnElementClearedWithUniqueIds() : ViewManagerTests
  • ValidateFractionalWidthDoesNotCrash() : ColorPickerTests
  • ValidateGetAtCalls() : MockItemsSource
  • ValidateGetElementAtCachingForLayout() : ViewManagerTests
  • ValidateGetElementCalls() : MockElementFactory
  • ValidateGetItemIdCalls() : MockItemsSource
  • ValidateGetSetBackground() : RepeaterTests
  • ValidateGetSetItemsSource() : RepeaterTests
  • ValidateGetSizeCalls() : MockItemsSource
  • ValidateGreaterThanZero() : ColumnMajorUniformToLargestGridLayout
  • ValidateGridLayout() : FlowLayoutTests
  • ValidateGridLayoutChildrenLayoutBounds() : FlowLayoutTests
  • ValidateGridLayoutDesiredSizingWithMaxRowsOrColumnsSet() : FlowLayoutTests
  • ValidateGridLayoutJustificationAndStretch() : FlowLayoutTests
  • ValidateGridLayoutMaximumRowsOrColumns() : FlowLayoutTests
  • ValidateGridLayoutWithSameOrientationAsScrolling() : FlowLayoutTests
  • ValidateGroupClear() : SelectionModelTests
  • ValidateGroupInserts() : SelectionModelTests
  • ValidateGroupRemoves() : SelectionModelTests
  • ValidateGroupReplaceLosesSelection() : SelectionModelTests
  • ValidateHueRange() : ColorPickerTests
  • ValidateIndexPath() : IndexPathTests
  • ValidateInput() : NumberBox
  • ValidateInserts() : FlowLayoutCollectionChangeTests , SelectionModelTests
  • ValidateIntersectionWithRealizationWindow() : FlowLayoutTests
  • ValidateInvokeWithHoverMode() : ButtonInteractionTests
  • ValidateInvokeWithPressMode() : ButtonInteractionTests
  • ValidateInvokeWithReleaseMode() : ButtonInteractionTests
  • ValidateItemCollectionTransitionProvider() : ItemCollectionTransitionProviderTests
  • ValidateItemIndex() : ItemsView
  • ValidateItemsLessThanThresholdDontRevertHorizontal() : SwipeControlTests
  • ValidateItemsRepeaterScrollHostScenario() : ViewportTests
  • ValidateKeyboarding() : TextCommandBarFlyoutTests
  • ValidateLayoutEstimations() : FlowLayoutTests
  • ValidateLayoutSharing() : FlowLayoutTests
  • ValidateLayoutWithInfiniteMeasureSizeInNonVirtualizingDirection() : FlowLayoutTests
  • ValidateLightsOnPressed() : RevealStatesPage
  • ValidateLoadedSource() : WebView2Tests
  • ValidateLoadUnload() : ViewportTests
  • ValidateMakeAnchor() : FlowLayoutTests
  • ValidateMappingAndAutoRecycling() : LayoutTests
  • ValidateMultiSelectDragDropRootsAndNonRoots() : TreeViewTests
  • ValidateMultiSelectDragDropRootsAndNonRoots_ContentMode() : TreeViewTests
  • ValidateMultiSelectDragDropRootsAndNonRoots_NodeMode() : TreeViewTests
  • ValidateNestedMultipleSelection() : SelectionModelTests
  • ValidateNestedSingleSelection() : SelectionModelTests
  • ValidateNoCrashWhenWhenColorSpectrumInvisibleAndColorChanged() : ColorPickerTests
  • ValidateNonVirtualLayoutDoesNotGetMeasuredForViewportChanges() : LayoutTests
  • ValidateNonVirtualLayoutWithItemsRepeater() : LayoutTests
  • ValidateNoScrollingSurfaceInPopupScenario() : ViewportTests
  • ValidateNoScrollingSurfaceScenario() : ViewportTests
  • ValidateNoSizeWhenEmptyDataTemplate() : ItemTemplateTests
  • ValidateNullItemsSource() : RepeaterTests
  • ValidateNullItemTemplateAndContainerInItems() : ItemTemplateTests
  • ValidateNumberFormatter() : NumberBox
  • ValidateOneLevelMultipleSelection() : SelectionModelTests
  • ValidateOneLevelSingleSelection() : SelectionModelTests
  • ValidateOneLevelSingleSelectionNoSource() : SelectionModelTests
  • ValidateOneScrollPresenterScenario() : EffectiveViewportScrollPresenterTests , ViewportTests
  • ValidateOneScrollViewerScenario() : EffectiveViewportTests
  • ValidateOwnershipWithStackPanel() : RecyclePoolTests
  • ValidatePhaseInvokeAndOrdering() : PhasingTests
  • ValidatePhaseOrdering() : final
  • ValidateProofingMenu() : TextCommandBarFlyoutTests
  • ValidatePropertyChangedEventIsRaised() : SelectionModelTests
  • ValidatePublicRootAncestor() : RevealBrush
  • ValidateRealizedRange() : EffectiveViewportScrollPresenterTests , EffectiveViewportTests , ViewportTests
  • ValidateRecycledElementOwnerAffinity() : RecyclePoolTests
  • ValidateRecycleElementCalls() : MockElementFactory
  • ValidateRecycling() : ItemTemplateTests
  • ValidateRecyclingElementFactoryWithSingleTemplate() : ItemTemplateTests
  • ValidateRegularResets() : FlowLayoutCollectionChangeTests
  • ValidateRemoves() : SelectionModelTests
  • ValidateRepeaterDefaults() : RepeaterTests
  • ValidateResizingFirstItemResizesOtherItemsInGridLayout() : FlowLayoutTests
  • ValidateReyclingElementFactoryWithNoTemplate() : ItemTemplateTests
  • ValidateRichTextBlockOverflowUsesSourceFlyouts() : TextCommandBarFlyoutTests
  • ValidateRightClickOnEmptyTextBoxDoesNotShowFlyout() : TextCommandBarFlyoutTests
  • ValidateScrollAnimationStartingAndZoomFactorEventArgsHaveValidStartAndEndPositions() : ScrollPresenterTests
  • ValidateSelectedItem() : SelectorBar
  • ValidateSelection() : SelectionModelTests
  • ValidateSelectionChangedEventMultipleSelection() : SelectionModelTests
  • ValidateSelectionChangedEventSingleSelection() : SelectionModelTests
  • ValidateSelectionFlyoutDoesNotTakeFocus() : TextCommandBarFlyoutTests
  • ValidateSelectionModeChangeFromMultipleToSingle() : SelectionModelTests
  • ValidateSelectionModeChangeFromMultipleToSingleSelectionChangedEvent() : SelectionModelTests
  • ValidateSentinelsDuringInserts() : FlowLayoutCollectionChangeTests
  • ValidateStableResets() : FlowLayoutCollectionChangeTests
  • ValidateStackLayout() : FlowLayoutTests
  • ValidateStackLayoutArrangeWithInsertion() : FlowLayoutTests
  • ValidateStackLayoutArrangeWithStretch() : FlowLayoutTests
  • ValidateStackLayoutChildrenLayoutBounds() : FlowLayoutTests
  • ValidateStackLayoutDisabledVirtualizationWithItemsRepeater() : LayoutTests
  • ValidateStackLayoutDoesNotRetainIncorrectMinorWidth() : LayoutTests
  • ValidateStretchedImageSize() : ScrollPresenterTests
  • ValidateSwipeCanHaveNoItemsOnASideHorizontal() : SwipeControlTests
  • ValidateSwipeDoesntCrashOnAddingMoreItemsThanItsSizeHorizontal() : SwipeControlTests
  • ValidateSwitchingItemInfo() : RatingControlTests
  • ValidateSwitchingItemsSourceRefreshesElements() : InspectingDataSourceTests
  • ValidateSwitchingItemsSourceRefreshesElementsNonVirtualLayout() : InspectingDataSourceTests
  • ValidateSwitchingItemsSourceRefreshesElementsVirtualLayout() : InspectingDataSourceTests
  • ValidateTabNavigation() : RepeaterFocusTests
  • ValidateTabNavigationOrder() : RepeaterFocusTests
  • ValidateTemplateSwitchingRefreshesElements() : ItemTemplateTests
  • ValidateTemplateSwitchingRefreshesElementsNonVirtualizingLayout() : ItemTemplateTests
  • ValidateTemplateSwitchingRefreshesElementsVirtualizingLayout() : ItemTemplateTests
  • ValidateTreeViewItemSourceChangeUpdatesChevronOpacity() : TreeViewTests
  • ValidateTwoLevelMultipleSelection() : SelectionModelTests
  • ValidateTwoLevelSingleSelection() : SelectionModelTests
  • ValidateTwoScrollPresentersScenario() : EffectiveViewportScrollPresenterTests , ViewportTests
  • ValidateTwoScrollViewerScenario() : EffectiveViewportTests
  • ValidateUnhandledKeysOnNonTransientFlyoutDoNotCloseFlyout() : TextCommandBarFlyoutTests
  • ValidateUniformGridWithItemsRelyingOnAspectRatio() : FlowLayoutTests
  • ValidateUniformGridWithNoItems() : FlowLayoutTests
  • ValidateXBindWithoutPhasing() : PhasingTests
  • ValidateXYFocusNavigation() : ScrollPresenterTests
  • ValidateZoomFactoryBoundary() : ScrollPresenter , ScrollView
  • Validation_Changed() : NumberBoxPage
  • ValidationActionsComboBox_SelectionChanged() : RevealStatesPage
  • ValidationDisabledTest() : NumberBoxTests
  • ValidationMode() : NumberBoxProperties
  • ValidationModeProperty() : NumberBoxProperties
  • value : is_flags_enum< T > , is_flags_enum< PointerOverStatus > , is_flags_enum< PointerPressedStatus >
  • Value : ColorSpectrum , ColorPickerSlider , RevealBackgroundItem , MathToken , DataModelWithINPC , Year , AnnotatedScrollBar , HashMap< K, V >::Iterator::KeyValuePair , ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer , InfoBadgeProperties , NumberBoxProperties , ProgressRingProperties , RatingControlProperties , NumberBox , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , ValueProviderThunk< Owner > , RatingControlAutomationPeer , ScrollSnapPoint , ZoomSnapPoint
  • ValueChanged() : NumberBoxProperties , RatingControlProperties
  • ValueChangedTest() : NumberBoxTests
  • ValueChangeInMarkup_ValueChanged() : RatingControlPage
  • ValueLabelAutomationId : ColorPickerTests
  • ValueProperty() : InfoBadgeProperties , NumberBoxProperties , ProgressRingProperties , RatingControlProperties
  • ValuesChanged() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • ValueTextBoxAutomationId : ColorPickerTests
  • ValueTextTest() : NumberBoxTests
  • VariableSizedItemsPage() : VariableSizedItemsPage
  • VariableSizedItemsPage_Loaded() : VariableSizedItemsPage
  • VariableSizeItem() : VariableSizeItem
  • Vector() : Vector< T, flags, Helper >
  • VectorBase() : VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
  • VectorChanged : WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , ObservableVector< T > , SwipeItems
  • VectorChangedEventArgs() : VectorChangedEventArgs , WinRTCollection::VectorChangedEventArgs
  • VectorInnerImpl() : VectorInnerImpl< VectorOptions, Wrapper >
  • VectorIterator() : VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
  • VerifyAccessibilityView() : ProgressRingTests
  • VerifyAcrylic() : AcrylicBrushPage , AcrylicMarkupPage
  • VerifyAcrylicBrushEffect() : AcrylicBrushTests
  • VerifyAcrylicBrushHasCorrectFallbackColor() : AcrylicBrushTests
  • VerifyAcrylicBrushHasCorrectFallbackColorOnTheme() : AcrylicBrushTests
  • VerifyAcrylicBrushNameRule() : AcrylicBrushTests
  • VerifyAcrylicWithPolling() : AcrylicBrushPage
  • VerifyAddingChildItemsToNavigationViewItem() : CommonTests
  • VerifyAddingNewItemsFromIndexZero() : CommonTests
  • VerifyAddPrimaryCommandsDynamically() : CommandBarFlyoutTests
  • VerifyAllThemesContainSameResourceKeys() : CommonStylesApiTests
  • VerifyAlwaysExpandedBehavior() : CommandBarFlyoutTests
  • VerifyAmbientLight() : RevealFallbackPage , RevealStatesPage
  • VerifyAnchorCandidateRegistration() : ScrollViewTests
  • VerifyAppBarButtonChevronMarginsDoNotCollide() : CommonStylesApiTests
  • VerifyAppBarButtonLightweightStyling() : CommonStylesApiTests
  • VerifyAreClose() : ScrollViewTestsWithInputHelper
  • VerifyAutoDisplayMode() : PagerControlTestBase
  • VerifyAutomationName() : PersonPictureTests
  • VerifyAutomationNamesAreCorrect() : ColorPickerTests
  • VerifyAutomationPeerBehavior() : PagerControlTests , PipsPagerTests
  • VerifyAutomationPeerExpandCollapsePatternBehavior() : NavigationViewTests
  • VerifyAutoSuggestBoxCornerRadius() : AutoSuggestBoxTests
  • VerifyAxeScanPasses() : AutoSuggestBox , BreadcrumbTests , ExpanderTests , InfoBarTests , MenuBarTests , CommonTests , NumberBoxTests , PagerControlTests , PipsPagerTests , ProgressBarTests , ProgressRingTests , TabViewTests
  • VerifyBackAndCloseButtonsVisibility() : NavigationViewTestsBase
  • VerifyBackAndCloseButtonsVisibilityInAutoPaneDisplayMode() : PaneBehaviorTests
  • VerifyBackAndCloseButtonsVisibilityInLeftMinimalPaneDisplayMode() : PaneBehaviorTests
  • VerifyBackButtonHidesWhenInMinimalOpenState() : CommonTests
  • VerifyBasicParallaxingInsideScroller() : ParallaxViewTests
  • VerifyBasicParallaxingInsideScrollViewer() : ParallaxViewTests
  • VerifyBasicParallaxingWithListView() : ParallaxViewTests
  • VerifyBasicParallaxingWithScroller() : ParallaxViewTests
  • VerifyBasicParallaxingWithScrollViewer() : ParallaxViewTests
  • VerifyBorderLight() : RevealFallbackPage , RevealStatesPage
  • VerifyBreadcrumbBarItemsContain() : BreadcrumbTests
  • VerifyBreadcrumbDefaultAPIValues() : BreadcrumbTests
  • VerifyButton() : PagerControlTestBase
  • VerifyButtonVisibilitySetInXAMLApplied() : PagerControlTests
  • VerifyCallingResetMultipleTimesOnUniqueIdItemsSource() : InspectingDataSourceTests
  • VerifyCanCancelClosing() : CommonTests
  • VerifyCanCancelScrolling() : AnnotatedScrollBarInteractionTests
  • VerifyCanChangeColorWithTouchWithoutPanning() : ColorPickerTests
  • VerifyCanInvertSelection() : ItemsViewTests
  • VerifyChangingFooterMenuItemVisibilityAdjustsPaneLayout() : PaneBehaviorTests
  • VerifyChildHeight() : CompactPage
  • VerifyClearingAlphaChannelInputFieldDoesNotCrash() : ColorPickerTests
  • VerifyClearingHexInputFieldDoesNotCrash() : ColorPickerTests
  • VerifyClearingItemsCollectionDoesNotCrashWhenItemSelectedOnTopNav() : NavigationViewTests
  • VerifyClearingItemsSourceClearsElements() : RepeaterTests
  • VerifyClearingNodeWithNoChildren() : TreeViewTests
  • VerifyClickingNavigationViewItemInPaneFooterDoesNotCrash() : CommonTests
  • VerifyClosedCompactVisualState() : NavigationViewTests
  • VerifyCollectionChangeGetsRespected() : BreadcrumbTests
  • VerifyColorIsSelected() : ColorPickerTests
  • VerifyColorIsSelectedCore() : ColorPickerTests
  • VerifyColorNameIsSelected() : ColorPickerTests
  • VerifyColorPropertyMetadata() : ColorPickerTests
  • VerifyColorSpectrumAutomationValuesAreCorrect() : ColorPickerTests
  • VerifyComboBoxDisabled() : PagerControlTestBase
  • VerifyComboBoxDisplayMode() : PagerControlTestBase
  • VerifyComboBoxEditModeCornerRadius() : ComboBoxTests
  • VerifyComboBoxEnabled() : PagerControlTestBase
  • VerifyComboBoxIsEnabled() : PagerControlTestBase
  • VerifyComboBoxItemsInfiniteItems() : PagerControlTests
  • VerifyComboBoxItemsListNormal() : PagerControlTests
  • VerifyComboBoxOverlayCornerRadius() : ComboBoxTests
  • VerifyComboBoxVisibility() : PagerControlTestBase
  • VerifyCommandBarSizing() : CommandBarFlyoutTests
  • VerifyCommandBarSizingPrimaryItemsLarger() : CommandBarFlyoutTests
  • VerifyCommandBarSizingSecondaryItemsLarger() : CommandBarFlyoutTests
  • VerifyCommandBarSizingSecondaryItemsMaxHeight() : CommandBarFlyoutTests
  • VerifyCommandBarSizingSecondaryItemsMaxWidth() : CommandBarFlyoutTests
  • VerifyCompactTabWidthVisualStates() : TabViewTests
  • VerifyCompactTabWidthVisualStates_ItemsMode() : TabViewTests
  • VerifyCompactTabWidthVisualStates_ItemsSourceMode() : TabViewTests
  • VerifyContactPropertyMetadata() : PersonPictureTests
  • VerifyContainerIsNonNullWhenSelectingANewlyAddedItem() : NavigationViewTests
  • VerifyCorrectionsInNonScrollableDirection() : RepeaterTests
  • VerifyCorrectNumberOfEventsRaised() : EventTests
  • VerifyCorrectVisualStateWhenChangingPaneDisplayMode() : PaneBehaviorTests
  • VerifyCorrectVisualStateWhenClosingPaneInLeftDisplayMode() : PaneBehaviorTests
  • VerifyCurrentAnchor() : RepeaterTests
  • VerifyCustomHeaderContentTest() : CommonTests
  • VerifyCustomItemTemplate() : BreadcrumbTests , RadioButtonsTests
  • VerifyCustomNonVirtualizingLayout() : LayoutPanelTests
  • VerifyDataContextCanBeUsedForNavigation() : SelectionTests
  • VerifyDefaultBreadcrumb() : BreadcrumbTests
  • VerifyDefaultPropertyValues() : AnnotatedScrollBarTests , ItemContainerTests , ItemsViewTests , AcrylicBrushTests , ParallaxViewTests , LinedFlowLayoutTests , ScrollPresenterTests , ScrollViewTests
  • VerifyDefaultsAndBasicSetting() : NavigationViewTests , PersonPictureTests , RatingControlTests , SplitButtonTests , TwoPaneViewTests
  • VerifyDefaultSelectorBarItemPropertyValues() : SelectorBarTests
  • VerifyDefaultSelectorBarPropertyValues() : SelectorBarTests
  • VerifyDependencyPropertyBinding() : RatingControlTests
  • VerifyDeselectionDisabled() : SelectionTests
  • VerifyDisconnected() : AcrylicBrushPage
  • VerifyDisconnectedFlyoutCommandBar() : CommandBarFlyoutTests
  • VerifyDisconnectedState() : AcrylicBrushTests
  • VerifyDisplayMode() : PagerControlTestBase
  • VerifyDontCrashWhenCollapsedAndValueSet() : RatingControlTests
  • VerifyDragStartedCalledOnItemDrag() : TabViewTests
  • VerifyDropDownItemContainsText() : BreadcrumbTests
  • VerifyDropdownItemTemplate() : BreadcrumbTests
  • VerifyDropdownItemTemplateWithNoControl() : BreadcrumbTests
  • VerifyDynamicOverflowContentRootWidth() : CommandBarFlyoutTests
  • VerifyDynamicSecondaryCommandLabel() : CommandBarFlyoutTests
  • VerifyDynamicSecondaryCommandVisibility() : CommandBarFlyoutTests
  • VerifyElement0OwnershipInUniformGridLayout() : FlowLayoutCollectionChangeTests
  • VerifyElementIsFocused() : ColorPickerTests
  • VerifyEllipsePositionIsClampedToSpectrumBounds() : ColorPickerTests
  • VerifyEmptyPagerDoesNotCrash() : PagerControlTests , PipsPagerTests
  • VerifyEventsReturnExpectedDataTypesItemTemplate() : EventTests
  • VerifyEventsReturnExpectedDataTypesMenuItems() : EventTests
  • VerifyEventsReturnExpectedDataTypesMenuItemsSource() : EventTests
  • VerifyExpandCollapseChevronVisibility() : NavigationViewTests
  • VerifyExpandCollapseFunctionality() : CommonTests
  • VerifyExpandCollapseFunctionalityUsingChevron() : CommonTests
  • VerifyExpandedItemsSaveStateWhenClosingAndOpeningPane() : PaneBehaviorTests
  • VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension() : ScrollPresenterTests
  • VerifyExtentAndViewportProperties() : ScrollPresenterTests
  • VerifyFallbackColor() : AcrylicBrushPage , AcrylicMarkupPage , RevealFallbackPage
  • VerifyFallbackColorWithPolling() : AcrylicBrushPage
  • VerifyFirstPageButtonIsEnabled() : PagerControlTestBase
  • VerifyFirstPageButtonVisibility() : PagerControlTestBase
  • VerifyFlowLayoutOnLineArranged() : FlowLayoutTests
  • VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommands() : CommandBarFlyoutTests
  • VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommandsWithAlwaysExpanded() : CommandBarFlyoutTests
  • VerifyFlowsToAndFromIsNotSetWithoutPrimaryCommands() : CommandBarFlyoutTests
  • VerifyFlyoutCloseKeyboardBehavior() : CommandBarFlyoutTests
  • VerifyFlyoutClosingBehavior() : CommandBarFlyoutTests
  • VerifyFlyoutCommandsArePropagatedToTheCommandBar() : CommandBarFlyoutTests
  • VerifyFlyoutDefaultPropertyValues() : CommandBarFlyoutTests
  • VerifyFlyoutOpenKeyboardBehavior() : CommandBarFlyoutTests
  • VerifyFlyoutRecycleCrash() : BreadcrumbTests
  • VerifyFocusedIndex() : RadioButtonsTests
  • VerifyFocusedItemIsRecycledOnCollectionReset() : RepeaterTests
  • VerifyFocusedPageIndex() : PipsPagerTestBase
  • VerifyFocusNotLostWhenTabbingWithBackButtonEnabled() : FocusBehaviorTests
  • VerifyGamepadAPress() : TreeViewTests
  • VerifyHeaderContentMargin() : NavigationViewTests
  • VerifyHeaderContentMarginOnMinimalNav() : NavigationViewTests
  • VerifyHeaderContentMarginOnTopNav() : NavigationViewTests
  • VerifyHeaderParallaxingInsideScrollViewer() : ParallaxViewTests
  • VerifyHeaderSizeWhenClosingLastTab() : TabViewTests
  • VerifyHeight() : CommonStylesPage , CompactPage
  • VerifyHexStringAndColorAreInSync() : ColorPickerTests
  • VerifyHierarchicalNavigationTopModeMenuItemsSourceDoesNotCrash() : NavigationViewTests
  • VerifyHoldingKeyOnlyInvokesOnce() : EventTests
  • VerifyHoverBrushTargeting() : RevealStatesPage
  • VerifyHoverLight() : RevealFallbackPage , RevealStatesPage
  • VerifyHsvUpdatesOnSpectrumSelection() : ColorPickerTests
  • VerifyIconsRespectCompactPaneLength() : PaneBehaviorTests
  • VerifyIndeterminateProgressRingDoesNotImplementRangeValuePattern() : ProgressRingTests
  • VerifyIndexOfBehavior() : InspectingDataSourceTests
  • VerifyInitialized() : MUXControlsFactory
  • VerifyInputScopePropogates() : NumberBoxTests
  • VerifyInstances() : WebView2RenderingVerifier
  • VerifyInteractionSourceSettings() : ScrollPresenterTests
  • VerifyInvalidTextEntryIsReverted() : ColorPickerTests
  • VerifyIsCheckedProperty() : SplitButtonTests
  • VerifyIsEnabledChangeUpdatesVisualState() : NumberBoxTests , RadioButtonsTests
  • VerifyIsFlyoutKeyboardAccessibleWithNoPrimaryCommands() : CommandBarFlyoutTests
  • VerifyIsPrettyClose() : TwoPaneViewTests , InfoBarTests
  • VerifyItemCollectionTransitionProviderAnimations() : ItemsViewTestsWithInputHelper
  • VerifyItemContainerUIASelectionBehavior() : ItemContainerTests
  • VerifyItemsGetFullSpaceInMajorDirectionWhenSmallerThanLineSize() : FlowLayoutTests
  • VerifyItemsRepeaterNullLayoutIsTreatedAsStackLayout() : LayoutTests
  • VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndMultipleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndNoSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndSingleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndMultipleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndNoSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndSingleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewItemInvokedEvent() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewUIABehavior() : ItemsViewTests
  • VerifyItemsViewUIASelectionProviderBehavior() : ItemsViewTests
  • VerifyLastClickedItemIndexIs() : BreadcrumbTests
  • VerifyLastClickedItemIs() : BreadcrumbTests
  • VerifyLastPageButtonIsEnabled() : PagerControlTestBase
  • VerifyLastPageButtonVisibility() : PagerControlTestBase
  • VerifyLayoutData() : RadioButtonsTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommands() : CommandBarFlyoutTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTL() : CommandBarFlyoutTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTLUpAndDown() : CommandBarFlyoutTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommandsUpAndDown() : CommandBarFlyoutTests
  • VerifyLightDismissDoesntSendDuplicateEvents() : EventTests
  • VerifyLights() : LightConfigurationTests
  • VerifyLightsAfterResettingContentOnMainWindow() : LightConfigurationTests
  • VerifyLightsAfterResettingContentOnSecondaryWindow() : LightConfigurationTests
  • VerifyLightsAttachedDuringLayoutOnSecondaryWindow() : LightConfigurationTests
  • VerifyLightsOnMainWindow() : LightConfigurationTests
  • VerifyLightsOnSecondaryWindow() : LightConfigurationTests
  • VerifyLinedFlowLayoutAverageItemsPerLineStability() : ItemsViewTests
  • VerifyMenuItemAndContainerMappingMenuItems() : NavigationViewTests
  • VerifyMenuItemAndContainerMappingMenuItemsSource() : NavigationViewTests
  • VerifyMoreButtonIsOnlyReadOnce() : TopModeTests
  • VerifyMoreButtonRespondsToThemeChanges() : ColorPickerTests
  • VerifyMoreButtonShowsAndHidesTextInputFields() : ColorPickerTests
  • VerifyMulticlickCrash() : BreadcrumbTests
  • VerifyNavigationItemUIAType() : NavigationViewTests
  • VerifyNavigationViewContentChangeOnTopNavImpactsLayout() : TopModeTests
  • VerifyNavigationViewItemChildrenFlyoutMenuCornerRadius() : CommonTests
  • VerifyNavigationViewItemContentPresenterMargin() : CommonTests
  • VerifyNavigationViewItemInFooterDoesNotCrash() : NavigationViewTests
  • VerifyNavigationViewItemInPaneFooterHasTemplateSettingBindings() : CommonTests
  • VerifyNavigationViewItemIsSelectedWorks() : SelectionTests
  • VerifyNavigationViewItemResponseToClickAfterBeingMovedBetweenFrames() : EventTests
  • VerifyNavigationViewItemToolTipCreation() : NavigationViewTests
  • VerifyNavigationViewItemToolTipPaneDisplayMode() : NavigationViewTests
  • VerifyNextPageButtonIsEnabled() : PagerControlTestBase
  • VerifyNextPageButtonVisibility() : PagerControlTestBase , PipsPagerTestBase
  • VerifyNoCrashWhenNavViewInContentDialog() : CommonTests
  • VerifyNoCrashWhenSelectedItemIsInvalidItem() : SelectionTests
  • VerifyNoCrashWhenSwitchingPaneDisplayModeWithAutoWrappedElements() : CommonTests
  • VerifyNoResourceKeysWereRemovedFromPreviousStableReleaseInV2Styles() : CommonStylesApiTests
  • VerifyNotifyCollectionChangeWithReadonlyListBehavior() : InspectingDataSourceTests
  • VerifyNotShouldPreserveNavigationViewRS3Behavior() : CommonTests
  • VerifyNullTemplateGivesMeaningfullError() : ItemTemplateTests
  • VerifyNumberBoxDisabled() : PagerControlTestBase
  • VerifyNumberBoxDisplayMode() : PagerControlTestBase
  • VerifyNumberBoxEnabled() : PagerControlTestBase
  • VerifyNumberBoxHeaderBehavior() : NumberBoxTests
  • VerifyNumberBoxIsEnabled() : PagerControlTestBase
  • VerifyNumberBoxVisibility() : PagerControlTestBase
  • VerifyNumberOfPages() : PipsPagerTestBase , PagerControlTestBase
  • VerifyNumberPanelButtonUIABehavior() : PagerControlTests
  • VerifyNumberPanelContent() : PagerControlTestBase
  • VerifyNumberPanelDisabled() : PagerControlTestBase
  • VerifyNumberPanelDisplayMode() : PagerControlTestBase
  • VerifyNumberPanelEnabled() : PagerControlTestBase
  • VerifyNumberPanelVisibility() : PagerControlTestBase
  • VerifyNumericItemsSource() : BreadcrumbTests
  • VerifyNVIItemsRepeaterIsLoadedAfterSelectionSetInMarkup() : SelectionTests
  • VerifyNVIOutlivingNVDoesNotCrash() : NavigationViewTests
  • VerifyObjectItemsSource() : BreadcrumbTests
  • VerifyOrientationChanged() : PipsPagerTestBase
  • VerifyOverflowButtonIsCollapsedWhenOverflowMenuIsEmpty() : TopModeTests
  • VerifyOverflowButtonToolTip() : NavigationViewTests
  • VerifyOverflowMenuCornerRadius() : TopModeTests
  • VerifyPaddingAndBorderThicknessLayoutOffset() : LayoutPanelTests
  • VerifyPaddingAndBorderThicknessLayoutOffset_StackLayout() : LayoutPanelTests
  • VerifyPageButtonWithVisibilityModeSet() : PipsPagerTestBase
  • VerifyPageChanged() : PagerControlTestBase
  • VerifyPaneDisplayModeAndDisplayModeMapping() : NavigationViewTests
  • VerifyPaneDisplayModeAndIsPaneOpenInterplayOnNavViewLaunch() : NavigationViewTests
  • VerifyPaneDisplayModeChangingPaneAccordingly() : NavigationViewTests
  • VerifyPaneIsClosedAfterSelectingItem() : PaneBehaviorTests
  • VerifyPaneIsClosedWhenClickingOnSelectedItem() : PaneBehaviorTests
  • VerifyPaneLayoutDynamicallyUpdatingCollections() : PaneBehaviorTests
  • VerifyPaneLayoutDynamicallyUpdatingCollectionsFooterPrecedence() : PaneBehaviorTests
  • VerifyPaneLayoutSettingsDisabledNoGapFooterItems() : PaneBehaviorTests
  • VerifyPaneLayoutSettingsDisabledNoGapMenuItems() : PaneBehaviorTests
  • VerifyPaneLayoutSwappingCollections() : PaneBehaviorTests
  • VerifyPaneProperties() : NavigationViewTests
  • VerifyPaneSize() : TwoPaneViewTests
  • VerifyPaneSpacing() : TwoPaneViewTests
  • VerifyPaneTitlePresentAndUpdates() : PaneBehaviorTests
  • VerifyPaneVisibleOnInit() : PaneBehaviorTests
  • VerifyParallaxingWithAbsoluteExtremes() : ParallaxViewTests
  • VerifyParallaxingWithClamping() : ParallaxViewTests
  • VerifyParallaxingWithDefaultSourceUI() : ParallaxViewTests
  • VerifyParallaxingWithMaxRatios() : ParallaxViewTests
  • VerifyParallaxingWithoutClamping() : ParallaxViewTests
  • VerifyParallaxingWithParallaxViewInsideScrollPresenter() : ParallaxViewTests
  • VerifyParallaxingWithParallaxViewInsideScrollViewer() : ParallaxViewTests
  • VerifyParallaxingWithSizeChanges() : ParallaxViewTests
  • VerifyParallaxingWithZooming() : ParallaxViewTests
  • VerifyParallaxViewOffsetChangeInsideScrollViewer() : ParallaxViewTests
  • VerifyPersonPictureVisualTree() : PersonPictureTests
  • VerifyPipsPagerButtonUIABehavior() : PipsPagerTests
  • VerifyPlacement() : TeachingTipTests
  • VerifyPreviousColorIsEqualTo() : ColorPickerTests
  • VerifyPreviousColorIsNull() : ColorPickerTests
  • VerifyPreviousPageButtonIsEnabled() : PagerControlTestBase
  • VerifyPreviousPageButtonVisibility() : PagerControlTestBase
  • VerifyPrimaryCommandLabelsAffectLayout() : CommandBarFlyoutTests
  • VerifyPrimaryCommandsAutomationSet() : CommandBarFlyoutTests
  • VerifyPrimaryCommandsAutomationSetWithAlwaysExpanded() : CommandBarFlyoutTests
  • VerifyPrimaryCommandsCanOverflowToSecondaryItemsControl() : CommandBarFlyoutTests
  • VerifyPropertyGettersAndSetters() : ScrollPresenterTests , ParallaxViewTests
  • VerifyPropertySetters() : ItemsViewTests
  • VerifyPropertyValuesAfterTemplateApplication() : ItemsViewTests , ScrollViewTests
  • VerifyRadioButtonsHasFocus() : RadioButtonsTests
  • VerifyRatingItemFallback() : RatingControlTests
  • VerifyReadOnlyIsntInteractive() : RatingControlTests
  • VerifyReadOnlyListCompatibility() : InspectingDataSourceTests
  • VerifyRealizedRange() : FlowLayoutCollectionChangeTests , FlowLayoutTests
  • VerifyRecordedCollectionChanges() : InspectingDataSourceTests
  • VerifyRepeaterDoesNotLeakItemContainers() : RepeaterTests
  • VerifyRevealBrush() : RevealFallbackPage
  • VerifyRichEditBoxHasContent() : TextCommandBarFlyoutTests
  • VerifyRightClickDoesNotSelectTab() : TabViewTests
  • VerifyRightClickForContextMenuDoesNotDeselectText() : NumberBoxTests
  • VerifyScrollPresenterAttachedProperties() : ScrollViewTests
  • VerifyScrollRepeatButtons() : TabViewTests
  • VerifyScrollViewGamePadBumperInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewGamePadHorizontalInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewGamePadInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewGamePadTriggerInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewIgnoresGamepadInput() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewIgnoresKeyboardInput() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewKeyboardInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewKeyboardInteractionWithXYFocusEnabled() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewRemainsAtView() : ScrollViewTestsWithInputHelper
  • VerifySelectedColorIsNear() : ColorPickerTests
  • VerifySelectedFocusedIndex() : PipsPagerTestBase , RadioButtonsTests
  • VerifySelectedIndex() : RadioButtonsTests
  • VerifySelectedIndexChangedEventArgs() : PipsPagerTests , PagerControlTests
  • VerifySelectedItemInInvokedItem() : SelectionTests
  • VerifySelectedItemIsNullWhenNoItemIsSelected() : NavigationViewTests
  • VerifySelectedItems() : RadioMenuFlyoutItemTests
  • VerifySelectedNodesAndSelectedItems() : TreeViewTests
  • VerifySelectedPageIndex() : PipsPagerTestBase
  • VerifySelectedPositionInSet() : RadioButtonsTests
  • VerifySelectedSizeOfSet() : RadioButtonsTests
  • VerifySelectingACollapsedItemShowsSelectionIndicator() : NavigationViewTests
  • VerifySelectingANewItemAfterExpandingShowsSelectionIndicatorInTheCorrectLocation() : NavigationViewTests
  • VerifySelectionEllipseColorIsEqualTo() : ColorPickerTests
  • VerifySelectionEllipseIsNear() : ColorPickerTests
  • VerifySelectionEllipsePosition() : ColorPickerTests
  • VerifySelectionEllipsePositionCore() : ColorPickerTests
  • VerifySelectionItemPatternDoesInvoke() : SelectionTests
  • VerifySelectionPersistsAfterRecycling() : ItemsViewTests
  • VerifySelectorBarItems() : SelectorBarTests
  • VerifySelectTemplateLayoutFallback() : ItemTemplateTests
  • VerifySettableAPIValues() : ItemContainerTests
  • VerifySettingCustomSelectedItemInConstructorWorks() : SelectionTests
  • VerifySettingSelectionDoesNotCrash() : TreeViewTests
  • VerifySettingsItemTag() : NavigationViewTests
  • VerifySettingsItemToolTip() : NavigationViewTests
  • VerifySettingsWidthOnLeftNavMediumMode() : PaneBehaviorTests
  • VerifyShoulderNavigationEnabledAlwaysIsConsistent() : FocusBehaviorTests
  • VerifyShoulderNavigationEnabledOnlySelectionFollowsFocusIsCorrect() : FocusBehaviorTests
  • VerifyShouldPreserveNavigationViewRS3Behavior() : CommonTests
  • VerifySingleSelection() : NavigationViewTests
  • VerifySizeIsChangeableFromResource() : RatingControlTests
  • VerifySizingBehaviorModifyingCollectionRemovingLastItem() : TabViewTests
  • VerifySizingBehaviorModifyingCollectionRemovingSecondItem() : TabViewTests
  • VerifySizingBehaviorOnTabCloseComingFromCtrlF4() : TabViewTests
  • VerifySizingBehaviorOnTabCloseComingFromNonScroll() : TabViewTests
  • VerifySizingBehaviorOnTabCloseComingFromScroll() : TabViewTests
  • VerifySmallWidthAndHeightDoNotCrash() : PersonPictureTests
  • VerifySpaceAllocatedWhenDraggingFromOutsideTabView() : TabViewTests
  • VerifySpectrumTakesFocusOnPointerPress() : ColorPickerTests
  • VerifyStackLayoutCycleShortcut() : LayoutTests
  • VerifyStoreScenarioCache() : RepeaterTests
  • VerifyStringsAreLocalizedCorrectly() : ColorPickerTests
  • VerifySubTitleBlockVisibilityOnInitialUnset() : TeachingTipTests
  • VerifySwitchingLayoutDynamically() : LayoutPanelTests
  • VerifyTabFocusOrder() : ColorPickerTests
  • VerifyTabKeyWorks() : TwoPaneViewTests , RatingControlTests
  • VerifyTabNavigationBetweenPrimaryAndSecondaryCommands() : CommandBarFlyoutTests
  • VerifyTabViewItemUIABehavior() : TabViewTests
  • VerifyTabViewUIABehavior() : TabViewTests
  • VerifyTabViewWithoutTabsDoesNotCrash() : TabViewTests
  • VerifyTabWidthVisualStates() : TabViewTests
  • VerifyTeachingTipButtonsNameAutomationProperty() : TeachingTipTests
  • VerifyTeachingTipGetsFocus() : TeachingTipTests
  • VerifyTeachingTipNotIncludedInTabOrder() : TeachingTipTests
  • VerifyTeachingTipTargetChange() : TeachingTipTests
  • VerifyTextAlignmentPropogates() : NumberBoxTests
  • VerifyTextCommandBarRemainsOpenWithItems() : TextCommandBarFlyoutTests
  • VerifyThatProgrammaticallyRemovingEngagementResetsValue() : RatingControlTests
  • VerifyTheming() : TeachingTipTests
  • VerifyThirdDimensionSliderAutomationValuesAreCorrect() : ColorPickerTests
  • VerifyTopNavigationItemFocusVisualKindRevealTest() : TopModeTests
  • VerifyTopNavigationMinimalVisualStateOnTopNav() : TopModeTests
  • VerifyTreeViewIsNotTabStop() : TreeViewTests
  • VerifyUIANameBehavior() : NumberBoxTests
  • VerifyUIAProperties() : RatingControlTests
  • VerifyUIElementsInItemsSource() : RepeaterTests
  • VerifyUnconstrainedUniformGridLayout() : FlowLayoutTests
  • VerifyUniformGridLayoutDoesNotCreateHoles() : RepeaterTests
  • VerifyUniformGridLayoutDoesntCrashWhenTryingToScrollToEnd() : LayoutTests
  • VerifyUniformGridLayoutScrolling() : RepeaterTests
  • VerifyUniqueIdMappingInterface() : InspectingDataSourceTests
  • VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommands() : CommandBarFlyoutTests
  • VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommandsWithAlwaysExpanded() : CommandBarFlyoutTests
  • VerifyValue_ValueEqualsOnAutomationElement() : RatingControlTests
  • VerifyValueIsApproximately() : RatingControlTests
  • VerifyValuesCoercion() : NavigationViewTests , RatingControlTests
  • VerifyViewMode() : TwoPaneViewTests
  • VerifyVisualStates() : ScrollViewTests
  • VerifyVisualTree() : TreeViewTests , AutoSuggestBoxTests , ColorPickerTests , ComboBoxTests , NavigationViewTests , CalendarViewTests
  • VerifyVisualTreeExampleForLightTheme() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleLoadAndVerifyForAllThemes() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleWithCustomerFilter() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleWithCustomerPropertyValueTranslator() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeForAppBarAndAppBarToggleButton() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeForCommandBarCornerRadius() : CommonStylesApiTests
  • VerifyVisualTreeForCommandBarOverflowMenu() : CommonStylesApiTests
  • VerifyVisualTreeForControlsInCommonStyles() : CommonStylesApiTests
  • VerifyVSMStatesForPhotosAndInitials() : PersonPictureTests
  • VerifyWebMessageBasedTest() : WebView2BasicPage
  • VerifyWithinTolerance() : FlowLayoutTests
  • VerticalAlignmentRatio() : BringIntoViewOffsetsChange
  • VerticalAnchorRatio() : ScrollPresenterProperties , ItemsRepeaterScrollHost , ScrollViewProperties , ItemsRepeaterScrollHost , ScrollViewProperties , ScrollPresenterProperties
  • VerticalAnchorRatioProperty() : ScrollViewProperties , ScrollPresenterProperties
  • VerticalCacheLength() : ItemsRepeaterProperties , ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel , ViewportManager , ItemsRepeaterProperties , ViewportManagerWithPlatformFeatures
  • VerticalCacheLengthProperty() : ItemsRepeaterProperties
  • verticalDecrementRepeatButton : BiDirectionalScrollController , CompositionScrollController
  • VerticalDecrementRepeatButton_Click() : BiDirectionalScrollController
  • VerticalElementAutomationId : SliderInteractionTests
  • verticalGrid : CompositionScrollController
  • verticalIncrementRepeatButton : CompositionScrollController , BiDirectionalScrollController
  • VerticalIncrementRepeatButton_Click() : BiDirectionalScrollController
  • VerticalLargeChangeTextBlockAutomationId : SliderInteractionTests
  • VerticallyScrollable() : ScrollPresenterAutomationPeer
  • VerticalMaximumTextBlockAutomationId : SliderInteractionTests
  • VerticalMinimumTextBlockAutomationId : SliderInteractionTests
  • VerticalOffset() : ScrollPresenter , ScrollingZoomStartingEventArgs , ScrollingScrollStartingEventArgs , BringIntoViewOffsetsChange , ScrollView
  • VerticalOffsetAnimation : DynamicPage
  • VerticalOffsetAnimation1 : SimpleRectanglePage
  • VerticalOffsetAnimation2 : SimpleRectanglePage
  • VerticalOrientationMarginProperty() : InfoBarPanelProperties
  • VerticalOrientationPadding() : InfoBarPanelProperties
  • VerticalOrientationPaddingProperty() : InfoBarPanelProperties
  • VerticalOrientationPipsPagerButtonHeightTextBlock : PipsPagerElements
  • VerticalOrientationPipsPagerButtonWidthTextBlock : PipsPagerElements
  • verticalOrientationPipsPagerRepeater : PipsPagerPage
  • VerticalPositionTextBlockAutomationId : SliderInteractionTests
  • verticalPS : CanvasScrollControllerConsumer
  • VerticalScroll : ScrollPresenter
  • VerticalScrollBarVisibility() : ScrollViewProperties
  • VerticalScrollBarVisibilityProperty() : ScrollViewProperties
  • VerticalScrollChainMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • VerticalScrollChainModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • VerticalScrollController() : ItemsViewProperties , BiDirectionalScrollController
  • verticalScrollController : ScrollPresenterWithSimpleScrollControllersPage
  • VerticalScrollController : CanvasScrollControllerConsumer , ItemsViewProperties
  • verticalScrollController : BiDirectionalScrollController
  • VerticalScrollController() : ScrollPresenter
  • verticalScrollController : CanvasScrollControllerConsumer
  • VerticalScrollControllerProperty() : ItemsViewProperties
  • VerticalScrollMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • VerticalScrollModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • VerticalScrollPercent() : ScrollPresenterAutomationPeer
  • VerticalScrollRailMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • VerticalScrollRailModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • VerticalShift() : ParallaxViewProperties
  • VerticalShiftProperty() : ParallaxViewProperties
  • VerticalSliderInteraction : SliderInteractionPage
  • VerticalSmallChangeTextBlockAutomationId : SliderInteractionTests
  • VerticalSnapPoints() : ScrollPresenter
  • VerticalSourceEndOffset() : ParallaxViewProperties
  • VerticalSourceEndOffsetProperty() : ParallaxViewProperties
  • VerticalSourceOffsetKind() : ParallaxViewProperties
  • VerticalSourceOffsetKindProperty() : ParallaxViewProperties
  • VerticalSourceStartOffset() : ParallaxViewProperties
  • VerticalSourceStartOffsetProperty() : ParallaxViewProperties
  • verticalStackPanel : ScrollPresenterDynamicPage , ScrollViewerPage
  • verticalThumb : CompositionScrollController
  • VerticalThumbOffset : CompositionScrollController , BiDirectionalScrollController
  • VerticalViewSize() : ScrollPresenterAutomationPeer
  • VerticalZoomFactor : ScrollPresenter
  • View : SecondaryWindowLightConfiguration , MainWindowLightConfiguration
  • viewbox : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • ViewChange() : ViewChange
  • ViewChangeCount() : ScrollViewTestsWithInputHelper
  • ViewChanged() : ScrollViewProperties , ScrollPresenterProperties
  • viewChangedCount : ScrollPresenterTests
  • ViewChangeInterruptionKind : ScrollPresenterTests
  • viewers : VisualStatesPage
  • ViewKind() : ViewChange
  • ViewManager() : ItemsRepeater , final
  • ViewMode : TwoPaneViewTests
  • viewModel : TreeViewItemsSourceTestPage
  • ViewModeTest() : TwoPaneViewTests
  • ViewModeToString() : TwoPaneViewPage
  • ViewportAnchorPointHorizontalOffset() : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • ViewportAnchorPointVerticalOffset() : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • ViewportChanged() : ScrollPresenter , ViewportTests::TestScrollingSurface , IRepeaterScrollingSurface , ItemsRepeaterScrollHost
  • ViewportHeight() : ScrollPresenterTests , ScrollView , ScrollPresenter
  • viewportLength : CompositionScrollController
  • ViewportLength : BiDirectionalScrollController::UniScrollController
  • ViewportManagerDownLevel() : ViewportManagerDownLevel
  • ViewportManagerWithPlatformFeatures() : ViewportManagerWithPlatformFeatures
  • ViewportSize() : AnnotatedScrollBar
  • ViewportWidth() : ScrollPresenter , ScrollView
  • vIndicatorHeightExpression : ScrollPresenterExpressionAnimationSourcesPage
  • vIndicatorOffsetExpression : ScrollPresenterExpressionAnimationSourcesPage
  • VirtInfo() : ElementInfo
  • VirtualizationInfo() : VirtualizationInfo , final::PinnedElementInfo
  • VirtualizingLayout() : VirtualizingLayout
  • VirtualizingStackLayoutSamplePage() : VirtualizingStackLayoutSamplePage
  • VirtualizingStackPanelPage() : VirtualizingStackPanelPage
  • VirtualizingTestRootNode : TreeViewUnrealizedChildrenTestPage
  • VirtualizingUniformStackLayoutSamplePage() : VirtualizingUniformStackLayoutSamplePage
  • VirtualLayoutContextAdapter() : VirtualLayoutContextAdapter
  • VisibilityHiddenTest() : WebView2Tests
  • VisibilityTurnedOnTest() : WebView2Tests
  • VisibleRect() : VirtualizingLayoutContext
  • VisibleRectCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • VisibleWindow() : ItemsRepeater
  • visual : MockIAnimatedIconSource2 , MockAnimatedIconSource
  • visualInteractionSource : ImageIRefreshInfoProviderAdapter
  • Visualizer() : RefreshContainerProperties
  • VisualizerProperty() : RefreshContainerProperties
  • VisualizerRefreshCompletionDeferral : RefreshContainerPage
  • visualizerTimer : RefreshContainerPage
  • visualizerTimer_Tick() : RefreshContainerPage
  • visualizerTimer_TickImpl() : RefreshContainerPage
  • VisualPropertiesPage() : VisualPropertiesPage
  • VisualPropertiesPage_Loaded() : VisualPropertiesPage
  • VisualState() : TeachingTipAutomationPeer
  • VisualStateGroupExists() : VisualStateUtil
  • VisualStatesPage() : VisualStatesPage
  • vScrollBarVisual : ScrollPresenterExpressionAnimationSourcesPage
  • vScrollIndicatorSpriteVisual : ScrollPresenterExpressionAnimationSourcesPage
  • vScrollIndicatorVisual : ScrollPresenterExpressionAnimationSourcesPage
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- w -

  • WaitAndAssertPaneStatus() : NavigationViewTestsBase
  • WaitForBoxChecked() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • WaitForCheckbox() : RatingControlTests
  • WaitForCheckBoxUpdated() : SwipeControlTests , TeachingTipTests
  • WaitForChecked() : TeachingTipTests , SwipeControlTests
  • WaitForCopyCompleted() : WebView2Tests
  • WaitForEdgeIfAlreadyInstalling() : WebView2Tests
  • WaitForEditValue() : ItemsViewTestsWithInputHelper , RefreshContainerTests , ScrollPresenterTestsBase , ScrollViewTestsWithInputHelper
  • WaitForEnsureCompleted() : WebView2Tests
  • WaitForEvent() : ItemsViewTests , ScrollPresenterTests , ScrollViewTests , SelectorBarTests
  • WaitForFocus() : WebView2Tests
  • WaitForInputIdle() : TeachingTipAutomationPeer
  • WaitForLoadCompleted() : WebView2Tests
  • WaitForManipulationEnd() : ItemsViewTestsWithInputHelper , ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • WaitForOffsetToSettle() : ScrollPresenterTestsWithInputHelper , TeachingTipTests
  • WaitForOffsetUpdated() : ScrollPresenterTestsWithInputHelper , TeachingTipTests
  • WaitForScrollPresenterFinalSize() : ScrollPresenterTestsWithInputHelper
  • WaitForScrollPresenterManipulationEnd() : ScrollPresenterTestsWithInputHelper
  • WaitForScrollViewerManipulationEnd() : ScrollPresenterTestsWithInputHelper
  • WaitForScrollViewFinalSize() : ScrollViewTestsWithInputHelper
  • WaitForScrollViewManipulationEnd() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • WaitForScrollViewOffsets() : ScrollViewTestsWithInputHelper
  • WaitForTextBoxValue() : WebView2Tests
  • WaitForTipClosed() : TeachingTipTests
  • WaitForTipOpened() : TeachingTipTests
  • WaitForUnchecked() : SwipeControlTests , TeachingTipTests
  • WaitForWebMessageResult() : WebView2Tests
  • waitingForColorChanged : ColorPickerTests::ColorPickerTestSetupHelper
  • WebMessageReceived() : WebView2Properties , MapControl
  • WebMessageReceivedTest() : WebView2Tests
  • WebView2() : WebView2
  • WebView2_TryCompleteInitialization_RAII() : WebView2_TryCompleteInitialization_RAII
  • WebView2AutomationPeer() : WebView2AutomationPeer
  • WebView2BasicPage() : WebView2BasicPage
  • WebView2CleanedUpTest() : WebView2Tests
  • WebView2Common() : WebView2Common
  • WebView2CoreObjectsPage() : WebView2CoreObjectsPage
  • WebView2Page() : WebView2Page
  • WebView2Properties() : WebView2Properties
  • WebView2TestSetupHelper() : WebView2Tests::WebView2TestSetupHelper
  • Weight() : ICrossFadeEffect
  • WideBorderSpotlightAttenuationValue : RevealScenarioLights
  • WideBorderSpotlightInnerConeValue : RevealScenarioLights
  • WideBorderSpotlightOuterConeValue : RevealScenarioLights
  • WideModeConfiguration : TwoPaneViewTests , TwoPaneViewProperties
  • WideModeConfigurationComboBox_SelectionChanged() : TwoPaneViewPage
  • WideModeConfigurationProperty() : TwoPaneViewProperties
  • Width : Square , PinterestLayout
  • WidthCombobox_SelectionChanged() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • WidthComboBox_SelectionChanged() : TwoPaneViewPage
  • WidthExpansionAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionDelta() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionDeltaProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthRequiredToRecoveryAllItemsToPrimary() : TopNavigationViewDataProvider
  • WidthSlider_ValueChanged() : BreadcrumbBarPage
  • WindowElement() : DisplayRegionHelper
  • WindowHiddenTest() : WebView2Tests
  • WindowingTitleBar_BackRequested() : TitleBarPageWindow
  • WindowingTitleBar_PaneToggleRequested() : TitleBarPageWindow
  • WindowlessPopupTest() : WebView2Tests
  • WindowPage() : WindowPage
  • WindowRect() : DisplayRegionHelper
  • WinRTCollection() : WinRTCollection
  • WinRTObservableVector() : InspectingDataSourceTests::WinRTObservableVector
  • WinRTVectorChangedEventArgs() : InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
  • WorkInfo() : WorkInfo
  • wrap() : TStorageWrapperImpl< T, true > , VectorInnerImpl< VectorOptions, Wrapper > , ReferenceTrackerStorageHelper< ImplT, T > , TStorageWrapperImpl< T, isNoTrackerRef > , NonReferenceTrackerStorageHelper< T >
  • WrapIterable() : InspectingDataSource
  • WrapMode : PipsPagerTestBase , PipsPagerProperties
  • WrapModeComboBox : PipsPagerElements
  • WrapModeProperty() : PipsPagerProperties
  • WrappedProtectedCursor : WebView2WithCursor
  • WrapperEffectBrush() : AcrylicBrushPage::WrapperEffectBrush
  • WriteInTextBox() : PersonPictureTests , ParallaxViewTests , ColorPickerTests
  • wuxBorder : ScrollViewDynamicPage
  • wuxButton : ScrollViewDynamicPage
  • wuxLargeImg : ScrollViewDynamicPage
  • wuxRectangle : ScrollViewDynamicPage
  • wuxSp1 : ScrollViewDynamicPage
  • wuxSp2 : ScrollViewDynamicPage
  • wuxViewbox : ScrollViewDynamicPage
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- x -

  • XamlAmbientLight() : XamlAmbientLight
  • XamlAmbientLightProperties() : XamlAmbientLightProperties
  • XamlControlsResources() : XamlControlsResources
  • XamlControlsResourcesProperties() : XamlControlsResourcesProperties
  • XamlMember() : XamlMember
  • XamlMetadataProvider() : XamlMetadataProvider
  • XamlRootChanged() : TeachingTip
  • XamlRootChanged_revoker() : XamlRootChanged_revoker
  • XamlRootChangedHelper() : WebView2
  • XamlStringForControl() : CommonStylesApiTests
  • xamlType : Entry
  • XamlType() : XamlType
  • XamlWindow_VisibilityChanged() : AcrylicBrushPage
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~
Here is a list of all class members with links to the classes they belong to:

- y -

  • Year() : Year
  • YearType : RecipeElementFactory
Generated on Sun Dec 1 2024 20:52:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Enumerations

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • n
  • p
  • q
  • r
  • s
  • t
  • v
  • w

- a -

  • AcrylicBrushCacheHelperParam : MaterialHelperBase
  • AnimationType : CompositionScrollController
  • AutomationNameOptions : TeachingTipTestPageElements
  • AutomationOutput : NavigationViewItemAutomationPeer

- b -

  • BiDirectionalAlignment : ScrollPresenterTests
  • ButtonType : PipsPagerTestBase
  • ButtonVisibilityMode : PipsPagerTestBase
  • ButtonVisibilityModes : PagerControlTestBase

- c -

  • CloseButtonContentOptions : TeachingTipTestPageElements
  • ColorUpdateReason : ColorPicker
  • ComboBoxName : NavigationViewTestsBase
  • CommandBarSizingOptions : CommandBarFlyoutTests
  • ControlHeight : NavigationViewTestsBase , TwoPaneViewTests
  • ControlWidth : TwoPaneViewTests , NavigationViewTestsBase

- d -

  • DimensionChoice : FlowLayoutTests
  • DisplayModes : PagerControlTestBase

- g -

  • GenerateDirection : FlowLayoutAlgorithm

- h -

  • HeroContentOptions : TeachingTipTestPageElements

- i -

  • IconOptions : TeachingTipTestPageElements

- l -

  • LayoutChoice : FlowLayoutTests
  • LightEvents : RevealHoverLight
  • LightStates : RevealHoverLight
  • LineAlignment : FlowLayoutAlgorithm
  • LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger : ItemsViewTests

- n -

  • NumberOfPagesOptions : PipsPagerTestBase

- p -

  • PaneOpenStatus : NavigationViewTestsBase
  • PanePriority : TwoPaneViewTests
  • PlacementOptions : TeachingTipTestPageElements
  • PropertyId : ParallaxViewTests

- q -

  • QueuedOperationType : ListViewAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterDynamicPage , ItemsViewSummaryPage , ListViewBasePage

- r -

  • RadioButtonsSourceLocation : RadioButtonsTestPageElements
  • RadioButtonsSourceType : RadioButtonsTestPageElements
  • RevealBrushCacheFlags : MaterialHelperBase

- s -

  • ScrollPresenterDimension : ScrollPresenter
  • ScrollSnapPointsAlignment : ScrollPresenterTestsWithInputHelper
  • SourceType : ParallaxViewTests
  • SubtitleContentOptions : TeachingTipTestPageElements

- t -

  • TallModeConfiguration : TwoPaneViewTests
  • TestList : WebView2BasicPage , WebView2CoreObjectsPage
  • TestOptions : ColorPickerTests , ButtonInteractionTests
  • Threshold : NavigationViewTestsBase
  • TipLocationOptions : TeachingTipTestPageElements
  • TitleContentOptions : TeachingTipTestPageElements
  • TopNavPosition : NavigationViewTestsBase
  • TreeNodeSelectionState : TreeViewNode
  • TwoPaneViewMode : TwoPaneViewTests

- v -

  • ViewChangeInterruptionKind : ScrollPresenterTests
  • ViewMode : TwoPaneViewTests

- w -

  • WideModeConfiguration : TwoPaneViewTests
  • WrapMode : PipsPagerTestBase
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Enumerator

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • z

- a -

  • AlphaSliderChanged : ColorPicker
  • AlphaTextBoxChanged : ColorPicker
  • AnimationComplete : RevealHoverLight
  • AnimToHover : RevealHoverLight
  • AnimToOff : RevealHoverLight

- b -

  • Backward : FlowLayoutAlgorithm

- c -

  • Center : FlowLayoutAlgorithm
  • ColorPropertyChanged : ColorPicker
  • ColorSpectrumColorChanged : ColorPicker

- e -

  • End : FlowLayoutAlgorithm

- f -

  • FastRelease : RevealHoverLight
  • Forward : FlowLayoutAlgorithm

- g -

  • GotoNormal : RevealHoverLight
  • GotoPointerOver : RevealHoverLight
  • GotoPressed : RevealHoverLight

- h -

  • HasBaseColor : MaterialHelperBase
  • HexTextBoxChanged : ColorPicker
  • HorizontalScroll : ScrollPresenter
  • HorizontalZoomFactor : ScrollPresenter
  • Hover : RevealHoverLight
  • HsvTextBoxChanged : ColorPicker

- i -

  • InitializingColor : ColorPicker
  • IsBorder : MaterialHelperBase
  • IsInverted : MaterialHelperBase

- m -

  • MaxCacheSize : MaterialHelperBase

- o -

  • Off : RevealHoverLight

- p -

  • PartialSelected : TreeViewNode
  • Position : NavigationViewItemAutomationPeer
  • Pressing : RevealHoverLight

- r -

  • RgbTextBoxChanged : ColorPicker

- s -

  • Scroll : ScrollPresenter
  • Selected : TreeViewNode
  • ShouldBrushBeOpaque : MaterialHelperBase
  • Size : NavigationViewItemAutomationPeer
  • SlowRelease : RevealHoverLight
  • SpaceAround : FlowLayoutAlgorithm
  • SpaceBetween : FlowLayoutAlgorithm
  • SpaceEvenly : FlowLayoutAlgorithm
  • Start : FlowLayoutAlgorithm

- t -

  • ThirdDimensionSliderChanged : ColorPicker

- u -

  • UnSelected : TreeViewNode
  • UseCrossFadeEffect : MaterialHelperBase

- v -

  • VerticalScroll : ScrollPresenter
  • VerticalZoomFactor : ScrollPresenter

- z -

  • ZoomFactor : ScrollPresenter
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Events

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • c
  • i
  • l
  • o
  • p
  • r
  • s
  • v

- _ -

  • _configurationChanged : ViewportTests::TestScrollingSurface

- a -

  • AddScrollVelocityRequested : BiDirectionalScrollController::UniScrollController , ScrollBarController , CompositionScrollController

- c -

  • CanExecuteChanged : TestCommand , MyCommand , TestCommand
  • CanScrollChanged : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • Changed : CompositionScrollControllerPanningInfo
  • CollectionChanged : MyCollection , ReadOnlyNotifyPropertyChangedCollection-g< T > , CustomItemsSourceView

- i -

  • InteractionRatioChanged : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • IsInteractingForRefreshChanged : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • IsScrollingWithMouseChanged : ScrollBarController , BiDirectionalScrollController::UniScrollController , CompositionScrollController

- l -

  • LogMessage : BiDirectionalScrollController , CompositionScrollController , CompositionScrollControllerPanningInfo

- o -

  • OffsetChangeCompleted : CompositionScrollController

- p -

  • PanRequested : CompositionScrollControllerPanningInfo
  • PostArrange : ViewportTests::TestScrollingSurface
  • PropertyChanged : TreeViewItemSource , TeachingTipPage , Recipe , DataModelWithINPC , NavigationViewPageDataContext , TreeViewLateDataInitTest

- r -

  • RefreshCompleted : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • RefreshStarted : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation

- s -

  • ScrollByRequested : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • ScrollCompleted : BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController
  • ScrollToRequested : ScrollBarController , CompositionScrollController , BiDirectionalScrollController::UniScrollController

- v -

  • VectorChanged : WinRTCollection , InspectingDataSourceTests::WinRTObservableVector
  • ViewportChanged : ViewportTests::TestScrollingSurface
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- [ -

  • [instance initializer]()
: ColorPickerTests::ColorPickerTestSetupHelper
, TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
, CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- _ -

  • _reusableExpressionAnimation() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • _scrollController_AddScrollVelocityRequested() : IScrollControllerAdapter
  • _scrollController_ScrollByRequested() : IScrollControllerAdapter
  • _scrollController_ScrollToRequested() : IScrollControllerAdapter
  • _test1_RevealButton_Click() : RevealRegressionTestsPage
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- k -

  • KeepAlive() : VirtualizationInfo
  • KeepAtLeastOneItemInPrimaryList() : NavigationView
  • KeepInteriorCornersSquareProperty() : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • Key() : HashMap< K, V >::Iterator::KeyValuePair
  • KeyboardAcceleratorsTest() : MenuBarTests
  • KeyboardAcceleratorTest() : WebView2Tests
  • KeyboardFocusFirstItemFromItem() : NavigationView
  • KeyboardFocusLastItemFromItem() : NavigationView
  • KeyboardFocusToolTipTest() : CommonTests
  • KeyboardNavigationDropDownItemInvokationTest() : BreadcrumbTests
  • KeyboardNavigationFlyoutItemsTest() : BreadcrumbTests
  • KeyboardNavigationForCrumbledLeftToRightTest() : BreadcrumbTests
  • KeyboardNavigationForCrumbledRightToLeftTest() : BreadcrumbTests
  • KeyboardNavigationInItemsViewWithLinedFlowLayout() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationInItemsViewWithLinedFlowLayoutAndInnerFocusableControl() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationInItemsViewWithStackLayout() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationInItemsViewWithUniformGridLayout() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationItemInvokationTest() : BreadcrumbTests
  • KeyboardNavigationLeftToRightTest() : BreadcrumbTests
  • KeyboardNavigationReferenceOffsetChanged() : ItemsViewTestHooks
  • KeyboardNavigationRightToLeftTest() : BreadcrumbTests
  • KeyboardNavigationSample() : KeyboardNavigationSample
  • KeyboardNavigationSample_GotFocus() : KeyboardNavigationSample
  • KeyboardNavigationWithAccessKeysTest() : MenuBarTests
  • KeyboardNavigationWithArrowKeysTest() : MenuBarTests
  • KeyboardNavigationWithArrowKeysWithDisabledItemTest() : MenuBarTests
  • KeyboardNavigationWithArrowKeysWithOnlyOneItemWorks() : MenuBarTests
  • KeyboardNavigationWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyboardNavigationWithLayout() : ItemsViewTestsWithInputHelper
  • KeyboardPageSelectTest() : PipsPagerTests
  • KeyboardTest() : SplitButtonTests , TabViewTests
  • KeyDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyDownInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyFromIndex() : CustomItemsSourceViewWithUniqueIdMapping , CustomItemsSourceWithUniqueId , MockItemsSourceWithUniqueIdMapping , ReadOnlyNotifyPropertyChangedCollection-g< T > , InspectingDataSourceTests::ObservableVectorWithUniqueIds , ItemsSourceView , MyCollection , IKeyIndexMapping
  • KeyFromIndexCallInfo() : MockItemsSource::KeyFromIndexCallInfo
  • KeyFromIndexCore() : ScrollPresenterRepeaterAnchoringPage::SampleDataSource , CollectionChangeDemo::MyDataSource , ScrollPresenterBringIntoViewPage::SampleDataSource , DelegatingItemsSource , CustomItemsSourceViewWithUniqueIdMapping , InspectingDataSource , ItemsSourceView , PersonDataSource , ScrollPresenterTests::TestDataSource
  • KeyPageDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyPageDownInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyPageUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyPageUpInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyType() : XamlTypeBase
  • KeyUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyUpInItemsViewAndStackLayoutWithFastKeystrokes() : ItemsViewTestsWithInputHelper
  • KeyValuePair() : HashMap< K, V >::Iterator::KeyValuePair
  • Kind() : MicaBackdropProperties , InkToolBarFlyoutItem , MicaBackdropProperties , InkToolBarFlyoutItem , InkToolBarFlyoutItemProperties
  • KindProperty() : MicaBackdropProperties , InkToolBarFlyoutItemProperties
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- l -

  • LabelFirstItem() : TreeViewTests
  • LabelItems_Click() : TreeViewPage
  • Labels() : AnnotatedScrollBarProperties
  • LabelsGrowToAccomodateLongText() : AnnotatedScrollBarInteractionTests
  • LabelsProperty() : AnnotatedScrollBarProperties
  • LabelTemplate() : AnnotatedScrollBarProperties
  • LabelTemplateProperty() : AnnotatedScrollBarProperties
  • Language_SelectionChanged() : CalendarViewPage
  • LargeButton_Click() : RevealStatesPage
  • LargeChange() : NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , NumberBoxProperties , SliderInteraction
  • LargeChangeProperty() : NumberBoxProperties
  • LastAnimationSegmentChanged() : AnimatedIconTestHooks
  • LastButtonClicked() : PagerControl
  • LastButtonCommand() : PagerControlProperties
  • LastButtonCommandProperty() : PagerControlProperties
  • LastButtonStyle() : PagerControlProperties
  • LastButtonStyleProperty() : PagerControlProperties
  • LastButtonVisibility() : PagerControlProperties
  • LastButtonVisibilityProperty() : PagerControlProperties
  • LastExtent() : FlowLayoutAlgorithm
  • LastFrozenItemIndexDbg() : LinedFlowLayout
  • LastInteractedWithSwipeControlChanged() : SwipeTestHooks
  • LastInteractedWithSwipeControlSwipeContentElement_SizeChanged() : SwipeControlPage
  • LastPageButtonChangingPageTest() : PagerControlTests
  • LastPageButtonVisibilityOptionsTest() : PagerControlTests
  • LastRealizedColumnIndexInRect() : UniformGrid2DLayout
  • LastRealizedIndexInRect() : VirtualizingUniformCarouselStackLayout , VirtualizingUniformStackLayout
  • LastRealizedItemIndexDbg() : LinedFlowLayout
  • LastRealizedRowIndexInRect() : UniformGrid2DLayout
  • Layer_MapElementClick() : MapControlPage
  • LayerElementsChanged() : MapControl
  • Layers() : MapControlProperties
  • LayersProperty() : MapControlProperties
  • Layout() : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • LayoutChanged() : ColumnMajorUniformToLargestGridLayout , RadioButtonsTestHooks
  • LayoutContextAdapter() : LayoutContextAdapter
  • LayoutId() : Layout
  • LayoutInvalidateMeasure() : LayoutsTestHooks
  • LayoutLabels() : AnnotatedScrollBar
  • LayoutOrigin() : ItemsRepeater , VirtualizingLayoutContext
  • LayoutOriginCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • LayoutPanelLayoutContext() : LayoutPanelLayoutContext
  • LayoutPanelProperties() : LayoutPanelProperties
  • LayoutProperties() : LayoutProperties
  • LayoutProperty() : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • LayoutState() : LayoutPanel , ItemsRepeater , LayoutContext
  • LayoutStateCore() : LayoutPanelLayoutContext , LayoutContext , LayoutContextAdapter , RepeaterLayoutContext , VirtualLayoutContextAdapter
  • LayoutsTestHooks_LinedFlowLayoutInvalidated() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LayoutsTestHooks_LinedFlowLayoutItemLocked() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LayoutsTestHooks_LinedFlowLayoutItemLocked2() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs() : LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
  • LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs() : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • LayoutTest() : InfoBarTests
  • LeftEdgePlacementTopLeftHighlightMargin() : TeachingTip
  • LeftItems() : SwipeControlProperties
  • LeftItemsProperty() : SwipeControlProperties
  • LeftNavigationFocusKindRevealTest() : CommonTests
  • LeftNavigationWithAccessKeysTest() : CommonTests
  • LeftNavRepeater() : NavigationView
  • LeftPaneVisibility() : NavigationViewTemplateSettingsProperties
  • LeftPaneVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • LifetimeHandler() : LifetimeHandler
  • LifetimeTabTest() : WebView2Tests
  • LightColor() : ISpotDiffuseEffect , ISpotSpecularEffect , IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect
  • LightDismissTest() : PaneBehaviorTests
  • LightPolicyChangedHelper() : MaterialHelperBase
  • LightPosition() : IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • LightTarget() : ISpotDiffuseEffect , ISpotSpecularEffect
  • LimitingConeAngle() : ISpotDiffuseEffect , ISpotSpecularEffect
  • LineAlignment() : FlowLayoutProperties
  • LineAlignmentComboBox_SelectionChanged() : ItemsViewWithDataPage
  • LineAlignmentProperty() : FlowLayoutProperties
  • LinedFlowLayout() : LinedFlowLayout
  • LinedFlowLayout_ArrangeInvalidatedLog() : ItemsViewIntegrationPage
  • LinedFlowLayout_ItemsInfoRequested() : ItemsViewInteractiveTestsPage , ItemsViewTests , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LinedFlowLayout_ItemsUnlocked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • LinedFlowLayout_ItemsUnlockedLog() : ItemsViewIntegrationPage
  • LinedFlowLayout_MeasureInvalidatedLog() : ItemsViewIntegrationPage
  • LinedFlowLayoutDemo() : LinedFlowLayoutDemo
  • LinedFlowLayoutDemo_Loaded() : LinedFlowLayoutDemo
  • LinedFlowLayoutInvalidated() : LayoutsTestHooks
  • LinedFlowLayoutItemAspectRatios() : LinedFlowLayoutItemAspectRatios
  • LinedFlowLayoutItemLocked() : LayoutsTestHooks
  • LinedFlowLayoutItemsInfoRequestedEventArgs() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • LinedFlowLayoutProperties() : LinedFlowLayoutProperties
  • LinedFlowLayoutSnappedAverageItemsPerLineChanged() : LayoutsTestHooks
  • LineDown() : ScrollPresenter
  • LineHasInternalLockedItem() : LinedFlowLayout
  • LineHasLockedItem() : LinedFlowLayout
  • LineHeight() : LinedFlowLayoutProperties
  • LineHeightProperty() : LinedFlowLayoutProperties
  • LineIndex() : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • LineItemsCountTotal() : LinedFlowLayout
  • LineLeft() : ScrollPresenter
  • LineRight() : ScrollPresenter
  • LineSpacing() : LinedFlowLayoutProperties , UniformGridLayout , FlowLayout
  • LineSpacingProperty() : LinedFlowLayoutProperties
  • LineUp() : ScrollPresenter
  • ListControl() : TreeView , ViewModel
  • ListenToCollectionChanges() : InspectingDataSource
  • ListenToContentEffectiveViewportChanged() : ScrollPresenterTests
  • ListView_ItemClick() : ListViewElementNameBindingPage
  • ListViewAnchoringPage() : ListViewAnchoringPage
  • ListViewAnchoringPage_Loaded() : ListViewAnchoringPage
  • ListViewBackgroundPage() : ListViewBackgroundPage
  • ListViewBase_ItemClick() : ListViewBasePage , GroupedListViewBasePage
  • ListViewBaseItemPageNavigationTest() : CommonStylesTests
  • ListViewBasePage() : ListViewBasePage
  • ListViewBasePage_Loaded() : ListViewBasePage
  • ListViewElementNameBindingPage() : ListViewElementNameBindingPage
  • ListViewHeaderPage() : ListViewHeaderPage
  • ListViewItemDensityTest() : CommonStylesTests
  • ListViewItemDensityTest_Click() : CommonStylesPage
  • ListViewItemPage() : ListViewItemPage
  • ListViewModel() : TreeViewList
  • ListViewPage() : ListViewPage
  • LoadBackButton() : TitleBar
  • LoadChevron() : NavigationViewItemPresenter
  • LoadElementsForDisplayingChildren() : NavigationViewItem
  • LoadFallbackContent() : AnimatedVisualPlayer
  • LoadImageAsync() : PersonPicture
  • LoadMenuItemsHost() : NavigationViewItem
  • LoadPaneToggleButton() : TitleBar
  • LoadPerfTreeView_Click() : TreeViewPage
  • LoadSelectionCheckbox() : ItemContainer
  • LoadWebPage() : WebView2Common
  • Location() : MapIconProperties , MapElementClickEventArgs
  • LocationProperty() : MapIconProperties
  • LockItemToLine() : LinedFlowLayout
  • LockItemToLineInternal() : LinedFlowLayout
  • LogAcrylicRecipeVersion() : AcrylicRenderingPage
  • LogAndClearTraces() : SwipeControlTests , ItemsViewTestsWithInputHelper , ScrollPresenterTestsBase , ScrollViewTestsWithInputHelper
  • LogAnnotatedScrollBarProperties() : AnnotatedScrollBarTests
  • LogBrushSate() : AcrylicBrushTests
  • LogEditValue() : ScrollViewTestsWithInputHelper , ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • LogEvent() : ScrollPresenterMousePanningPage
  • LogExpressionAnimationStatusChanges() : ScrollPresenterTestHooksHelper
  • LogFailure() : WebView2BasicPage
  • LogFailure_Exception() : WebView2BasicPage
  • LoggingHelper()
: ScrollViewTestsWithInputHelper::LoggingHelper
, ItemsViewTestsWithInputHelper::LoggingHelper
  • LoggingMessage() : MUXControlsTestHooks
  • LoggingMessageImpl() : MUXControlsTestHooks
  • LogHeader() : WebView2BasicPage
  • LogInteractionRatios() : RefreshContainerTests
  • LogInteractionSources() : ScrollPresenterTestHooksHelper
  • LogItemIndexDbg() : LinedFlowLayout
  • LogItemsRepeaterInfo() : ItemsViewSummaryPage , SelectorBarSummaryPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewBlankPage
  • LogItemsViewInfo() : ItemsViewBlankPage , ItemsViewSummaryPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage
  • LogItemsViewProperties() : ItemsViewTests , SelectorBarTests
  • LogMessage() : ScrollBarController , ScrollPresenterWithCompositionScrollControllersPage , ScrollPresenterWithBiDirectionalScrollControllerPage , ScrollPresenterWithSimpleScrollControllersPage , CanvasScrollControllerConsumer , MUXControlsTestHooks
  • LogRealizedIndices() : ViewManagerTests
  • LogRefreshVisualizerStates() : RefreshContainerTests
  • LogResult() : RevealBrushTests , AcrylicBrushTests
  • LogScrollPresenterInfo() : ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • LogScrollViewInfo() : ScrollViewBlankPage , ItemsViewTestsWithInputHelper , ItemsViewSummaryPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ScrollViewBringIntoViewPage , ItemsViewBlankPage , ObjectModelTestPage
  • LogSelectorBarProperties() : SelectorBarTests
  • LogSuccess() : WebView2BasicPage
  • LogTraces() : SwipeControlTests , ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper , ScrollPresenterTestsBase
  • Lookup() : HashMap< K, V >
  • LookupXamlType() : XamlMetadataProvider
  • LosingFocus() : PipsPager
  • LottieCustomSourceTest() : ProgressRingTests
  • LottieLogo_AnimatedVisual() : LottieLogo::LottieLogo_AnimatedVisual
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- m -

  • MadeAnchor() : ItemsRepeater , ViewportManager , ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • MagicDisengager_ValueChanged() : RatingControlPage
  • Main() : Flex
  • MainPageLoaded() : RefreshVisualizerPage
  • MainWindowLightConfiguration() : MainWindowLightConfiguration
  • Major() : OrientationBasedMeasures
  • MajorEnd() : OrientationBasedMeasures
  • MajorSize() : OrientationBasedMeasures
  • MajorStart() : OrientationBasedMeasures
  • MakeAnchor() : FlowLayoutAlgorithm
  • MakeAnimatedIcon() : InfoBadgePage
  • MakeAutoHideScrollBarsState() : ScrollView
  • MakeBitmapIcon() : InfoBadgePage
  • MakeColorAnimation() : AcrylicBrush
  • MakeFloatAnimation() : AcrylicBrush
  • MakeFontIcon() : InfoBadgePage
  • MakeImageIcon() : InfoBadgePage
  • MakeInteractionSource() : ScrollViewerIRefreshInfoProviderAdapter
  • MakePathIcon() : InfoBadgePage
  • MakeSymbolIcon() : InfoBadgePage
  • MakeTheAboveRatingSquares_Click() : RatingControlPage
  • ManipulationModeFromIndex() : ScrollPresenterManipulationModePage
  • Map_MapElementClick() : MapControlPage
  • Map_MapServiceErrorOccurred() : MapControlPage
  • MapControl() : MapControl
  • MapControlMapServiceErrorOccurredEventArgs() : MapControlMapServiceErrorOccurredEventArgs
  • MapControlPage() : MapControlPage
  • MapControlProperties() : MapControlProperties
  • MapElement() : MapElement
  • MapElementClick() : MapControlProperties , MapElementsLayerProperties
  • MapElementClickEventArgs() : MapElementClickEventArgs
  • MapElements() : MapElementsLayerProperties
  • MapElementsLayer() : MapElementsLayer
  • MapElementsLayerProperties() : MapElementsLayerProperties
  • MapElementsProperty() : MapElementsLayerProperties
  • MapIcon() : MapIcon
  • MapIconProperties() : MapIconProperties
  • MapLayer() : MapLayer
  • MappingMode() : RadialGradientBrushProperties
  • MappingModeProperty() : RadialGradientBrushProperties
  • MapServiceErrorOccurred() : MapControlProperties
  • MapServiceToken() : MapControlProperties
  • MapServiceTokenProperty() : MapControlProperties
  • MarginValueChanged() : RefreshVisualizerPage
  • MarkCallbackRecieved() : final
  • Markers() : AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource
  • MarkupDefinedSwipeItemDoesNotCrash() : SwipeControlTests
  • MarkupScrollPresenter_StateChanged() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • MarkupScrollPresenter_ViewChanged() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • Mask() : IAlphaMaskEffect
  • MaterialHelper() : MaterialHelper
  • MaterialHelperTestApiSetup() : SwipeControlPage
  • MathToken() : MathToken
  • MaxArrangeBounds() : StackLayoutState
  • MaxCheckBox_CheckChanged() : NumberBoxPage
  • MaxColumns() : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties
  • MaxColumnsProperty() : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties
  • MaxHorizontalShiftRatio() : ParallaxViewProperties
  • MaxHorizontalShiftRatioProperty() : ParallaxViewProperties
  • MaxHue() : ColorPickerProperties , ColorSpectrumProperties
  • MaxHueProperty() : ColorPickerProperties , ColorSpectrumProperties
  • Maximizable() : TeachingTipAutomationPeer
  • MaximizeInteractionTrackerOperationsTicksCountdown() : ScrollPresenter
  • Maximum() : AnnotatedScrollBar , NumberBoxProperties , ProgressRingProperties , SliderInteraction , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer
  • MaximumProperty() : NumberBoxProperties , ProgressRingProperties
  • MaximumRowsOrColumns() : UniformGridLayoutProperties
  • MaximumRowsOrColumnsProperty() : UniformGridLayoutProperties
  • MaxRating() : RatingControlProperties
  • MaxRating9Unset_ValueChanged() : RatingControlPage
  • MaxRatingProperty() : RatingControlProperties
  • MaxRatingTest() : RatingControlTests
  • MaxSaturation() : ColorPickerProperties , ColorSpectrumProperties
  • MaxSaturationProperty() : ColorPickerProperties , ColorSpectrumProperties
  • MaxSideLength() : ProgressRingTemplateSettingsProperties
  • MaxSideLengthProperty() : ProgressRingTemplateSettingsProperties
  • MaxStrokeWidth() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • MaxStrokeWidthProperty() : InkToolBarPenButtonProperties
  • MaxSurface() : SpectrumBrushProperties
  • MaxSurfaceOpacity() : SpectrumBrushProperties
  • MaxSurfaceOpacityProperty() : SpectrumBrushProperties
  • MaxSurfaceProperty() : SpectrumBrushProperties
  • maxThresholdPropertyName() : SwipeControl
  • MaxThumbOffset() : BiDirectionalScrollController
  • MaxValue() : ColorPickerProperties , ColorSpectrumProperties
  • MaxValueChanged() : NumberBoxPage
  • MaxValueProperty() : ColorPickerProperties , ColorSpectrumProperties
  • MaxVerticalShiftRatio() : ParallaxViewProperties
  • MaxVerticalShiftRatioProperty() : ParallaxViewProperties
  • MaxVisiblePips() : PipsPagerProperties
  • MaxVisiblePipsProperty() : PipsPagerProperties
  • MaxWidth() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • MaxZoomFactor() : ScrollPresenterProperties , ScrollViewProperties
  • MaxZoomFactorProperty() : ScrollPresenterProperties , ScrollViewProperties
  • Measure() : FlowLayoutAlgorithm , Layout
  • MeasureConstrainedLines() : LinedFlowLayout
  • MeasureConstrainedLinesFastPath() : LinedFlowLayout
  • MeasureConstrainedLinesRegularPath() : LinedFlowLayout
  • MeasureElement() : FlowLayoutAlgorithm , VirtualizingStackLayout
  • MeasureInvalidated() : LayoutProperties , Layout
  • MeasureItemRange() : LinedFlowLayout
  • MeasureItemRangeRegularPath() : LinedFlowLayout
  • MeasureOverride() : AnimatedIcon , AnimatedVisualPlayer , BreadcrumbLayout , InfoBadge , InfoBarPanel , MyCustomNonVirtualizingStackLayout , LayoutPanel , NavigationView , ParallaxView , ColumnMajorUniformToLargestGridLayout , AspectRatioRespectingControl , FlowLayoutDerived , MockNonVirtualizingLayout , MockStackLayout , MockVirtualizingLayout , NonVirtualStackLayout , ViewportTests::TestScrollingSurface , ViewportTests::TestStackLayout , ViewportTests::TestGridLayout , FlowLayout , ItemsRepeater , ItemsRepeaterScrollHost , LinedFlowLayout , NonVirtualizingLayout , StackLayout , CircleLayout , Flex , NonVirtualStackLayout , ActivityFeedLayout , PinterestLayout , UniformGrid2DLayout , VirtualizingStackLayout , VirtualizingUniformCarouselStackLayout , VirtualizingUniformStackLayout , UniformGridLayout , VirtualizingLayout , ScrollPresenter , SwipeControl , TabView , WebView2
  • MeasureTopNavigationViewDesiredWidth() : NavigationView
  • MeasureTopNavMenuItemsHostDesiredWidth() : NavigationView
  • MeasureUnconstrainedLine() : LinedFlowLayout
  • MediaTransportControlsPage() : MediaTransportControlsPage
  • MenuBar() : MenuBar
  • MenuBarAutomationPeer() : MenuBarAutomationPeer
  • MenuBarHeightTest() : MenuBarTests
  • MenuBarItem() : MenuBarItem
  • MenuBarItemAutomationPeer() : MenuBarItemAutomationPeer
  • MenuBarItemProperties() : MenuBarItemProperties
  • MenuBarPage() : MenuBarPage
  • MenuBarProperties() : MenuBarProperties
  • MenuFlyoutItemSizeTest() : CommonStylesTests
  • MenuFlyoutPage() : MenuFlyoutPage
  • MenuItemAutomationSelectionTest() : SelectionTests
  • MenuItemContainerStyle() : NavigationViewProperties
  • MenuItemContainerStyleProperty() : NavigationViewProperties
  • MenuItemContainerStyleSelector() : NavigationViewProperties
  • MenuItemContainerStyleSelectorProperty() : NavigationViewProperties
  • MenuItemFromContainer() : NavigationView
  • MenuItemInvokedTest() : EventTests
  • MenuItemKeyboardInvokeTest() : CommonTests
  • MenuItems() : NavigationViewProperties , NavigationViewItemProperties
  • MenuItemsProperty() : NavigationViewProperties , NavigationViewItemProperties
  • MenuItemsSource() : NavigationViewProperties , NavigationViewItemProperties
  • MenuItemsSourceProperty() : NavigationViewProperties , NavigationViewItemProperties
  • MenuItemTemplate() : NavigationViewProperties
  • MenuItemTemplateProperty() : NavigationViewProperties
  • MenuItemTemplateSelector() : NavigationViewProperties
  • MenuItemTemplateSelectorProperty() : NavigationViewProperties
  • MenuKind() : InkToolBarMenuButtonProperties , InkToolBarMenuButton
  • MenuKindProperty() : InkToolBarMenuButtonProperties
  • Message() : InfoBarProperties , MUXControlsTestHooksLoggingMessageEventArgs
  • MessageProperty() : InfoBarProperties
  • MicaBackdrop() : MicaBackdrop
  • MicaBackdropProperties() : MicaBackdropProperties
  • MinCheckBox_CheckChanged() : NumberBoxPage
  • MinColumnSpacing() : FlowLayoutProperties , UniformGridLayoutProperties
  • MinColumnSpacingProperty() : FlowLayoutProperties , UniformGridLayoutProperties
  • MinHue() : ColorPickerProperties , ColorSpectrumProperties
  • MinHueProperty() : ColorSpectrumProperties , ColorPickerProperties
  • Minimizable() : TeachingTipAutomationPeer
  • Minimum() : AnnotatedScrollBar , NumberBoxProperties , ProgressRingProperties , SliderInteraction , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , ProgressRingProperties , AnnotatedScrollBar
  • MinimumProperty() : NumberBoxProperties , ProgressRingProperties
  • MinimumTipEdgeToTailCenter() : TeachingTip
  • MinimumTipEdgeToTailEdgeMargin() : TeachingTip
  • MinItemHeight() : UniformGridLayoutProperties
  • MinItemHeightProperty() : UniformGridLayoutProperties
  • MinItemSpacing() : LinedFlowLayoutProperties , UniformGridLayout , FlowLayout
  • MinItemSpacingProperty() : LinedFlowLayoutProperties
  • MinItemWidth() : UniformGridLayoutProperties
  • MinItemWidthProperty() : UniformGridLayoutProperties
  • MinMaxTest() : NumberBoxTests
  • Minor() : OrientationBasedMeasures
  • MinorEnd() : OrientationBasedMeasures
  • MinorMajorPoint() : OrientationBasedMeasures
  • MinorMajorRect() : OrientationBasedMeasures
  • MinorMajorSize() : OrientationBasedMeasures
  • MinorSize() : OrientationBasedMeasures
  • MinorStart() : OrientationBasedMeasures
  • MinRowSpacing() : FlowLayoutProperties , UniformGridLayoutProperties
  • MinRowSpacingProperty() : UniformGridLayoutProperties , FlowLayoutProperties
  • MinSaturation() : ColorPickerProperties , ColorSpectrumProperties
  • MinSaturationProperty() : ColorPickerProperties , ColorSpectrumProperties
  • MinStrokeWidth() : InkToolBarPenButtonProperties , InkToolBarPenButton , InkToolBarPenButtonProperties
  • MinStrokeWidthProperty() : InkToolBarPenButtonProperties
  • MinSurface() : SpectrumBrushProperties
  • MinSurfaceProperty() : SpectrumBrushProperties
  • MinTallModeHeight() : TwoPaneViewProperties
  • MinTallModeHeightProperty() : TwoPaneViewProperties
  • MinTallModeHeightTextBox_TextChanged() : TwoPaneViewPage
  • MinValue() : ColorPickerProperties , ColorSpectrumProperties , ColorPickerProperties
  • MinValueChanged() : NumberBoxPage
  • MinValueProperty() : ColorPickerProperties , ColorSpectrumProperties
  • MinWideModeWidth() : TwoPaneViewProperties
  • MinWideModeWidthProperty() : TwoPaneViewProperties
  • MinWideModeWidthTextBox_TextChanged() : TwoPaneViewPage
  • MinWidth() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • MinZoomFactor() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • MinZoomFactorProperty() : ScrollViewProperties , ScrollPresenterProperties
  • MirroredWhenRightToLeft() : AnimatedIconProperties , AnimatedIconSourceProperties , AnimatedIconProperties
  • MirroredWhenRightToLeftProperty() : AnimatedIconSourceProperties , AnimatedIconProperties
  • MOCK_GetItemsPerRow() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • MOCK_GetStaticRowHeight() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • MockAnimatedIconSource() : MockAnimatedIconSource
  • MockClass() : BreadcrumbTests::MockClass
  • MockIAnimatedIconSource2() : MockIAnimatedIconSource2
  • Mode() : ICompositeStepEffect , IBlendEffect , SwipeItemsProperties , TwoPaneViewProperties , ICompositeStepEffect , SwipeItemsProperties
  • ModeChanged() : TwoPaneViewProperties
  • ModeProperty() : SwipeItemsProperties , TwoPaneViewProperties
  • ModifyCollectionOnItemInvokeTest() : SelectionTests
  • ModifyElementSize() : FlowLayoutTests
  • ModifySecondLevelOfNode_Click() : TreeViewPage
  • MonochromaticOverlayPresenter() : MonochromaticOverlayPresenter
  • MonochromaticOverlayPresenterPage() : MonochromaticOverlayPresenterPage
  • MonochromaticOverlayPresenterProperties() : MonochromaticOverlayPresenterProperties
  • MouseCaptureTest() : WebView2Tests
  • MouseClickTestCommon() : WebView2Tests
  • MouseLeftClickTest() : WebView2Tests
  • MouseMiddleClickTest() : WebView2Tests
  • MouseRightClickTest() : WebView2Tests
  • MouseWheelScrollTest() : WebView2Tests
  • MouseXButton1ClickTest() : WebView2Tests
  • MouseXButton2ClickTest() : WebView2Tests
  • Move() : CollectionChangeDemo::MyDataSource , CustomItemsSource
  • move_from() : XamlRootChanged_revoker , RoutedEventHandler_revoker , ScopedBatchCompleted_revoker , PropertyChanged_revoker
  • MoveAllItemsToPrimaryList() : TopNavigationViewDataProvider
  • MoveCaretToTextEnd() : NumberBox
  • MoveContentUnderTopnav_Click() : NavigationViewTopNavStorePage
  • MoveContentUnderTopnavTitleBar_Click() : NavigationViewTopNavStorePage
  • MoveFocus() : TabView , RadioButtons , BreadcrumbBar
  • MoveFocusFromClearedIndex() : final
  • MoveFocusIntoCoreWebView2() : WebView2
  • MoveFocusNext() : BreadcrumbBar , RadioButtons
  • MoveFocusPrevious() : BreadcrumbBar , RadioButtons
  • MoveFocusTo() : MenuBarItem
  • MoveFocusToIndex() : ViewManagerTests
  • MoveIdentifierToElement() : PagerControl
  • MoveItemsOutOfPrimaryList() : TopNavigationViewDataProvider
  • MoveItemsToList() : TopNavigationViewDataProvider
  • MoveItemsToPrimaryList() : TopNavigationViewDataProvider
  • MoveItemsToVector() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • MoveItemToVector() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • MoveNext()
: BreadcrumbIterator
, ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
, ObservableVector< T >::Iterator
, HashMap< K, V >::Iterator
, SelectedItems< T >::Iterator
, VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
  • MoveNodeInto() : TreeViewList
  • MoveNodesToNewTreeView_Click() : TreeViewPage
  • MoveOwnershipToAnimator() : VirtualizationInfo
  • MoveOwnershipToElementFactory() : VirtualizationInfo
  • MoveOwnershipToLayoutFromElementFactory() : VirtualizationInfo
  • MoveOwnershipToLayoutFromPinnedPool() : VirtualizationInfo
  • MoveOwnershipToLayoutFromUniqueIdResetPool() : VirtualizationInfo
  • MoveOwnershipToPinnedPool() : VirtualizationInfo
  • MoveOwnershipToUniqueIdResetPoolFromLayout() : VirtualizationInfo
  • MoveSelection() : TabView
  • MoveTest() : WebView2Tests
  • MoveTowardsTwoManditoryIrregularSnapPoint() : ScrollPresenterTestsWithInputHelper
  • MoveWebViewControl() : WebView2BasicPage
  • MoveWithinARepeatedMandatorySnapPoint() : ScrollPresenterTestsWithInputHelper
  • Movies_Click() : NavigationViewSelectedItemEdgeCasePage
  • Movies_Click2() : NavigationViewSelectedItemEdgeCasePage
  • MoviesEnabledCheckbox_Checked() : NavigationViewTopNavPage , NavigationViewRS4Page , NavigationViewPage
  • MoviesEnabledCheckbox_Unchecked() : NavigationViewPage , NavigationViewTopNavPage , NavigationViewRS4Page
  • MultiColumnKeyboardTest() : RadioButtonsTests
  • MultipleSelector() : MultipleSelector
  • MultipleTabViewPage() : MultipleTabViewPage
  • MultipleTabViewPageButton_Click() : TabViewPage
  • MultipleWebviews_BasicRenderingTest() : WebView2Tests
  • MultipleWebviews_FocusTest() : WebView2Tests
  • MultipleWebviews_LanguageTest() : WebView2Tests
  • Multiplier() : CornerRadiusToThicknessConverterProperties
  • MultiplierProperty() : CornerRadiusToThicknessConverterProperties
  • MultiplyAmount() : IArithmeticCompositeEffect
  • MultiSelectMode() : ItemContainerProperties
  • MultiSelectModeInternal() : ItemContainer
  • MultiSelectModeProperty() : ItemContainerProperties
  • MustClearDataContext() : VirtualizationInfo
  • MutableListControl() : TreeView
  • MutexLockedResource() : MutexLockedResource< T >
  • MUXControlsTestHooks_LoggingMessage() : ScrollViewsWithSimpleContentsPage , ScrollViewBlankPage , ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , SelectorBarSummaryPage , SwipeControlPage , ScrollPresenterDynamicPage , ObjectModelTestPage , ScrollPresenterManipulationModePage , ScrollPresenterRepeaterAnchoringPage , LinedFlowLayoutDemo , ItemsViewPictureLibraryPage , ScrollPresenterZoomSnapPointsPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBringIntoViewPage , ItemsViewSummaryPage , ItemsViewBlankPage , ParallaxViewTests , ScrollViewWithScrollControllersPage , ScrollPresenterScrollSnapPointsPage , ItemsViewInteractiveTestsPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollViewDynamicPage
  • MUXControlsTestHooks_LoggingMessageForVisualStateChange() : ScrollViewTests
  • MuxRailModeToWuxRailMode() : ScrollViewDynamicPage
  • MuxScrollBarVisibilityToWuxScrollBarVisibility() : ScrollViewDynamicPage
  • MuxScrollModeToWuxScrollMode() : ScrollViewDynamicPage
  • MuxZoomModeToWuxZoomMode() : ScrollViewDynamicPage
  • MyCollection() : MyCollection
  • MyCommand() : MyCommand
  • MyData() : MyData
  • MyDataSource() : CollectionChangeDemo::MyDataSource
  • MyItemsRepeater() : MyItemsRepeater
  • MyRatingIsClearEnabled_ValueChanged() : RatingControlPage
  • MyRatingReadOnly_ValueChanged() : RatingControlPage
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- n -

  • Name() : XamlMember , EffectBase , CustomProperty , EffectBase
  • NamedGroup() : NamedGroup-g< T >
  • NarrowButton_Holding() : RevealStatesPage
  • NavigateToLocalImageTest() : WebView2Tests
  • NavigateToNewPageButton_Click() : CommonStylesPage
  • NavigateToPage() : NavigationViewAnimationPage
  • NavigateToString() : WebView2
  • NavigateToStringMessage() : WebView2Common
  • NavigateToStringTest() : WebView2Tests
  • NavigateToUri() : WebView2Common
  • NavigateToVideo() : WebView2BasicPage
  • NavigateToVideoTest() : WebView2Tests
  • NavigationCompleted() : WebView2Properties
  • NavigationErrorTest() : WebView2Tests
  • NavigationStarting() : WebView2Properties
  • NavigationStartingInvalidTest() : WebView2Tests
  • NavigationStartingTest() : WebView2Tests
  • NavigationView() : NavigationView
  • NavigationView_ItemInvoked() : NavigationViewIsPaneOpenPage , NavigationViewMenuItemsSourcePage , NavigationViewPageDataContext
  • NavigationViewAnimationPage() : NavigationViewAnimationPage
  • NavigationViewAutomationPeer() : NavigationViewAutomationPeer
  • NavigationViewAxeTestPage() : NavigationViewAxeTestPage
  • NavigationViewBlankPage1() : NavigationViewBlankPage1
  • NavigationViewCaseBundle() : NavigationViewCaseBundle
  • NavigationViewCompactPaneLengthTestPage() : NavigationViewCompactPaneLengthTestPage
  • NavigationViewCustomMenuItemPage() : NavigationViewCustomMenuItemPage
  • NavigationViewCustomThemeResourcesPage() : NavigationViewCustomThemeResourcesPage
  • NavigationViewDensityChange() : CommonTests
  • NavigationViewInfoBadgeTestPage() : NavigationViewInfoBadgeTestPage
  • NavigationViewInitPage() : NavigationViewInitPage
  • NavigationViewIsPaneOpenPage() : NavigationViewIsPaneOpenPage
  • NavigationViewItemAutomationPeer() : NavigationViewItemAutomationPeer
  • NavigationViewItemBase() : NavigationViewItemBase
  • NavigationViewItemBaseOrSettingsContentFromData() : NavigationView
  • NavigationViewItemBaseProperties() : NavigationViewItemBaseProperties
  • NavigationViewItemCollapsedEventArgs() : NavigationViewItemCollapsedEventArgs
  • NavigationViewItemExpandingEventArgs() : NavigationViewItemExpandingEventArgs
  • NavigationViewItemHelper() : NavigationViewItemHelper< T >
  • NavigationViewItemOrSettingsContentFromData() : NavigationView
  • NavigationViewItemPresenter() : NavigationViewItemPresenter
  • NavigationViewItemPresenterProperties() : NavigationViewItemPresenterProperties
  • NavigationViewItemPresenterTemplateSettingsProperties() : NavigationViewItemPresenterTemplateSettingsProperties
  • NavigationViewItemProperties() : NavigationViewItemProperties
  • NavigationViewItemTemplatePage() : NavigationViewItemTemplatePage
  • NavigationViewMenuItemsSourcePage() : NavigationViewMenuItemsSourcePage
  • NavigationViewMenuItemStretchPage() : NavigationViewMenuItemStretchPage
  • NavigationViewMinimalPage() : NavigationViewMinimalPage
  • NavigationViewPage() : NavigationViewPage
  • NavigationViewPage_Loaded() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • NavigationViewPage_Unloaded() : NavigationViewPage
  • NavigationViewPageDataContext() : NavigationViewPageDataContext
  • NavigationViewProperties() : NavigationViewProperties
  • NavigationViewRS3Page() : NavigationViewRS3Page
  • NavigationViewRS4Page() : NavigationViewRS4Page
  • NavigationViewRS4Page_Loaded() : NavigationViewRS4Page
  • NavigationViewSelectedItemEdgeCasePage() : NavigationViewSelectedItemEdgeCasePage
  • NavigationViewStretchPage() : NavigationViewStretchPage
  • NavigationViewTemplateSettingsProperties() : NavigationViewTemplateSettingsProperties
  • NavigationViewTopNavOnlyPage() : NavigationViewTopNavOnlyPage
  • NavigationViewTopNavOverflowButtonPage() : NavigationViewTopNavOverflowButtonPage
  • NavigationViewTopNavPage() : NavigationViewTopNavPage
  • NavigationViewTopNavPage_Loaded() : NavigationViewTopNavPage
  • NavigationViewTopNavStorePage() : NavigationViewTopNavStorePage
  • NavInvalidateMeasure_Click() : NavigationViewTopNavOnlyPage
  • NavView2_ItemInvoked() : NavigationViewInitPage
  • NavView_BackRequested() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_DisplayModeChanged() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_ItemInvoked() : NavigationViewCompactPaneLengthTestPage , NavigationViewInitPage , NavigationViewPage , NavigationViewItemTemplatePage , NavigationViewTopNavOnlyPage
  • NavView_OnItemInvoked() : NavigationViewAnimationPage
  • NavView_PaneClosed() : NavigationViewPage , HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_PaneClosing() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_PaneOpened() : NavigationViewPage , HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_PaneOpening() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • NavView_SelectionChanged() : NavigationViewInitPage , NavigationViewPage , NavigationViewPageDataContext , NavigationViewSelectedItemEdgeCasePage , NavigationViewItemTemplatePage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage
  • NavViewPageData() : NavViewPageData
  • NbItemsWrapGridMaximumRowsOrColumns_ValueChanged() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • NeedRearrangeOfTopElementsAfterOverflowSelectionChanged() : NavigationView
  • NeedTopPaddingForRS5OrHigher() : NavigationView
  • NegativeContentHeight() : ExpanderTemplateSettingsProperties
  • NegativeContentHeightProperty() : ExpanderTemplateSettingsProperties
  • NestedGridViewsPage() : NestedGridViewsPage
  • NestedItemsControlsPage() : NestedItemsControlsPage
  • NestedItemsControlsPage_Loaded() : NestedItemsControlsPage
  • NestedListViewsPage() : NestedListViewsPage
  • NestedListViewsPage_Loaded() : NestedListViewsPage
  • NestedRepeaterWithDataTemplateScenario() : RepeaterTests
  • NewBounds() : ItemCollectionTransition
  • NewColor() : ColorChangedEventArgs
  • NewIndex() : ItemsRepeaterElementIndexChangedEventArgs
  • NewItem_Click() : MenuBarPage
  • NewPageIndex() : PagerControlSelectedIndexChangedEventArgs
  • NewParentItem() : TreeViewDragItemsCompletedEventArgs
  • NewPerson() : CircleLayoutSamplePage
  • NewState() : RefreshStateChangedEventArgs
  • NewValue() : NumberBoxValueChangedEventArgs
  • NewWindowId() : TabViewTabTearOutWindowRequestedEventArgs , TabViewTabTearOutRequestedEventArgs , TabViewTabTearOutWindowRequestedEventArgs
  • NewWindowRootPage() : NewWindowRootPage
  • NextButtonClicked() : PagerControl
  • NextButtonCommand() : PagerControlProperties
  • NextButtonCommandProperty() : PagerControlProperties
  • NextButtonStyle() : PagerControlProperties , PipsPagerProperties
  • NextButtonStyleProperty() : PagerControlProperties , PipsPagerProperties
  • NextButtonVisibility() : PagerControlProperties , PipsPagerProperties
  • NextButtonVisibilityProperty() : PagerControlProperties , PipsPagerProperties
  • NextPageButtonChangingPageTest() : PagerControlTests , PipsPagerTests
  • NextPageButtonVisibilityOptionsTest() : PagerControlTests , PipsPagerTests
  • Node() : TreeViewCollapsedEventArgs , TreeViewExpandingEventArgs
  • NodeAtFlatIndex() : TreeViewList
  • NodeCollapsed() : ViewModel
  • NodeExpanding() : ViewModel
  • NodeFromContainer() : TreeViewList , TreeView
  • NodeFromItem() : TreeViewList
  • NodeSelectionState() : ViewModel
  • NoFallbackRating_Loaded() : RatingControlPage
  • NoIconDoesNotCrash() : TeachingTipTests
  • NoInteractionTest() : BreadcrumbTests
  • NoiseBrush() : RevealBrushTestApi , AcrylicTestApi
  • NoiseChanged() : MaterialHelper
  • NonAsciiUriTest() : WebView2Tests
  • NonDelegatingAddRef() : ElementFactory
  • NonDelegatingQueryInterface() : ReferenceTracker< D, ImplT, I > , ElementFactory
  • NonDelegatingRelease() : ElementFactory
  • NonVirtualizingLayout() : NonVirtualizingLayout
  • NonVirtualStackLayoutSamplePage() : NonVirtualStackLayoutSamplePage
  • NormalPipStyle() : PipsPagerProperties
  • NormalPipStyleProperty() : PipsPagerProperties
  • NotificationsTestButton_Click() : RevealStatesPage
  • NotifyAnchorEvaluated() : ScrollPresenterTestHooks
  • NotifyBuildTreeCompleted() : RepeaterTestHooks , MUXControlsTestHooks
  • NotifyBuildTreeCompletedImpl() : MUXControlsTestHooks , RepeaterTestHooks
  • NotifyContainerOfSelectionChange() : ViewModel
  • NotifyContentLayoutOffsetXChanged() : ScrollPresenterTestHooks
  • NotifyContentLayoutOffsetYChanged() : ScrollPresenterTestHooks
  • NotifyEffectiveHeroContentPlacementChanged() : TeachingTipTestHooks
  • NotifyEffectivePlacementChanged() : TeachingTipTestHooks
  • NotifyExpressionAnimationStatusChanged() : ScrollPresenterTestHooks
  • NotifyIdleStatusChanged() : TeachingTipTestHooks , SwipeTestHooks
  • NotifyInteractionSourcesChanged() : ScrollPresenterTestHooks
  • NotifyKeyboardNavigationReferenceOffsetChanged() : ItemsViewTestHooks
  • NotifyLastAnimationSegmentChanged() : AnimatedIconTestHooks
  • NotifyLastInteractedWithSwipeControlChanged() : SwipeTestHooks
  • NotifyLayoutChanged() : RadioButtonsTestHooks
  • NotifyLinedFlowLayoutInvalidated() : LayoutsTestHooks
  • NotifyLinedFlowLayoutInvalidatedDbg() : LinedFlowLayout
  • NotifyLinedFlowLayoutItemLocked() : LayoutsTestHooks
  • NotifyLinedFlowLayoutItemLockedDbg() : LinedFlowLayout
  • NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged() : LayoutsTestHooks
  • NotifyOffsetChanged() : TeachingTipTestHooks
  • NotifyOpenedStatusChanged() : SwipeTestHooks , TeachingTipTestHooks
  • NotifyPropertyChanged() : NavigationViewPageDataContext , TreeViewLateDataInitTest , TreeViewItemSource , TeachingTipPage
  • NotifyRequestedScrollCompleted() : AnnotatedScrollBar , ScrollBarController , CompositionScrollController , BiDirectionalScrollController::UniScrollController , ScrollBarController
  • NotifySubtitleVisibilityChanged() : TeachingTipTestHooks
  • NotifyTitleVisibilityChanged() : TeachingTipTestHooks
  • NotifyTransitionCompleted() : ItemCollectionTransitionProvider
  • NullableXamlType() : NullableXamlType
  • NullContentDoesNotCrash() : RefreshVisualizerTests
  • NullInfoProviderDoesNotCrash() : RefreshVisualizerTests
  • NullSelector() : NullSelector
  • NumberBox() : NumberBox
  • NumberBoxAutomationPeer() : NumberBoxAutomationPeer
  • NumberBoxAxeTestPage() : NumberBoxAxeTestPage
  • NumberBoxDisplayChangingPageTest() : PagerControlTests
  • NumberBoxInfinityModeTest() : PagerControlTests
  • NumberBoxPage() : NumberBoxPage
  • NumberBoxProperties() : NumberBoxProperties
  • NumberBoxValueChanged() : NumberBoxPage , PagerControl
  • NumberBoxValueChangedEventArgs() : NumberBoxValueChangedEventArgs
  • NumberFormatter() : NumberBoxProperties
  • NumberFormatterProperty() : NumberBoxProperties
  • NumberOfPages() : PipsPagerProperties , PagerControlProperties , PipsPagerProperties
  • NumberOfPagesInfinityButtonClicked() : PagerControlPage
  • NumberOfPagesProperty() : PipsPagerProperties , PagerControlProperties
  • NumberOfPagesSetterButtonClicked() : PagerControlPage
  • NumberPanelChangingPageTest() : PagerControlTests
  • NumberPanelChangingPageTest2() : PagerControlTests
  • NumberPanelInfiniteItemsTest() : PagerControlTests
  • NumberPanelItems() : PagerControlTemplateSettingsProperties
  • NumberPanelItemsProperty() : PagerControlTemplateSettingsProperties
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- o -

  • ObjectModelTestPage() : ObjectModelTestPage
  • ObservableVectorInnerImpl() : ObservableVectorInnerImpl< VectorOptions, Wrapper >
  • ObservableVectorWithUniqueIds() : InspectingDataSourceTests::ObservableVectorWithUniqueIds
  • Offset() : IArithmeticCompositeEffect , RepeatedZoomSnapPoint , IArithmeticCompositeEffect , ScrollControllerScrollToRequestedEventArgs , RepeatedScrollSnapPoint
  • OffsetChanged() : TeachingTipTestHooks
  • OffsetDelta() : ScrollControllerScrollByRequestedEventArgs
  • OffsetJumpAfterContentResizing() : ScrollPresenterTests
  • OffsetsChange() : OffsetsChange
  • OffsetsChangeCorrelationId() : ScrollingBringingIntoViewEventArgs , ScrollingScrollCompletedEventArgs
  • OffsetsChangeWithAdditionalVelocity() : OffsetsChangeWithAdditionalVelocity
  • OffsetsChangeWithCustomDuration() : ScrollPresenterTests
  • OffsetsChangeWithNoContent() : ScrollPresenterTests
  • OffsetsVelocity() : OffsetsChangeWithAdditionalVelocity
  • OffsetVector2Animation() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • OffsetVector2Animation_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OffsetVector2Animation_00() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_01() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_02() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_03() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_04() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_05() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_06() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_07() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_08() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_09() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVector2Animation_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OffsetVector2Animation_10() : LottieLogo::LottieLogo_AnimatedVisual
  • OffsetVelocity() : ScrollControllerAddScrollVelocityRequestedEventArgs
  • OffsetX() : ItemsRepeaterScrollHost::BringIntoViewState
  • OffsetY() : ItemsRepeaterScrollHost::BringIntoViewState
  • OffTreeWebViewInputTest() : WebView2Tests
  • OldBounds() : ItemCollectionTransition
  • OldColor() : ColorChangedEventArgs
  • OldIndex() : ItemsRepeaterElementIndexChangedEventArgs
  • OldState() : RefreshStateChangedEventArgs
  • OldValue() : NumberBoxValueChangedEventArgs
  • OnAccessKeyInvoked() : BreadcrumbBar , NavigationView , RadioButtons
  • OnActionButtonClicked() : TeachingTip
  • OnActionButtonCommandParameterPropertyChanged() : TeachingTipProperties
  • OnActionButtonCommandPropertyChanged() : TeachingTipProperties
  • OnActionButtonContentPropertyChanged() : TeachingTipProperties
  • OnActionButtonPropertyChanged() : InfoBarProperties , InfoBar
  • OnActionButtonStylePropertyChanged() : TeachingTipProperties
  • OnActualLineHeightPropertyChanged() : LinedFlowLayoutProperties
  • OnAdd_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnAddButtonClick() : TabView , ItemsViewTransitionPage
  • OnAddButtonKeyDown() : TabView
  • OnAddRecipeButton_Click() : BasicDemo
  • OnAddScrollVelocityRequested() : CanvasScrollControllerConsumer
  • OnAddWebviewButtonClicked() : WebView2BasicPage
  • OnAlphaSliderBackgroundRectangleSizeChanged() : ColorPicker
  • OnAlphaSliderValueChanged() : ColorPicker
  • OnAlphaTextChanging() : ColorPicker
  • OnAlwaysShowHeaderPropertyChanged() : NavigationViewProperties
  • OnAlwaysUseFallbackPropertyChanged() : AcrylicBrushProperties , RevealBrushProperties
  • OnAncestorAnimatedIconStatePropertyChanged() : AnimatedIcon
  • OnAnimatedIconStatePropertyChanged() : AnimatedIcon
  • OnAnimationComplete() : NavigationView
  • OnAnimationCompleted() : AnimatedIcon
  • OnAnimationOptimizationPropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnApplyTemplate() : TeachingTip , TitleBar , TreeView , TreeViewItem , TreeViewList , TwoPaneView , AnimatedIcon , AnimatedIconHost , ToggleAnimatedIconHost , AnnotatedScrollBar , BreadcrumbBar , BreadcrumbBarItem , ColorPicker , ColorPickerSlider , ColorSpectrum , MyColorSpectrum , CommandBarFlyoutCommandBar , DropDownButton , Expander , ImageIcon , InfoBadge , InfoBar , ItemContainer , ItemsView , MapControl , MenuBar , MenuBarItem , NavigationView , NavigationViewItem , NavigationViewItemBase , NavigationViewItemHeader , NavigationViewItemPresenter , NavigationViewItemSeparator , NumberBox , PagerControl , PersonPicture , PipsPager , ProgressBar , ProgressRing , RefreshContainer , RefreshVisualizer , RadioButtons , RatingControl , BiDirectionalScrollController , CompositionScrollController , ScrollView , SelectorBar , SelectorBarItem , SplitButton , ToggleSplitButton , SwipeControl , TabView , TabViewItem
  • OnAppWindowPositionChanged() : WebView2
  • OnAreCheckStatesEnabledPropertyChanged() : RadioMenuFlyoutItem
  • OnAutoHideScrollBarsChanged() : ScrollView
  • OnAutomationIdChanged() : TeachingTip
  • OnAutomationNameChanged() : TeachingTip
  • OnAutomationPropertiesLabeledByPropertyChanged() : NumberBox
  • OnAutomationPropertiesNamePropertyChanged() : NumberBox
  • OnAutoPlayPropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnAutoSuggestBoxLoaded() : AutoSuggestBoxHelper
  • OnAutoSuggestBoxPropertyChanged() : NavigationViewProperties
  • OnAutoSuggestBoxQuerySubmitted() : NavigationView
  • OnBackButtonClick() : TitleBar
  • OnBackButtonClicked() : NavigationView
  • OnBackClicked() : FlatSample , GroupedSample , TreeViewSample
  • OnBackgroundColorButtonClick() : RevealBasicPage , RevealListPage
  • OnBackgroundColorPropertyChanged() : ProgressRing
  • OnBackgroundPropertyChanged() : ScrollPresenterProperties , SwipeItemProperties , ProgressRing
  • OnBad_Source_Browser_ButtonClicked() : WebView2CoreObjectsPage
  • OnBad_Source_Render_ButtonClicked() : WebView2CoreObjectsPage
  • OnBadgeGlyphPropertyChanged() : PersonPictureProperties
  • OnBadgeImageSourcePropertyChanged() : PersonPictureProperties
  • OnBadgeNumberPropertyChanged() : PersonPictureProperties
  • OnBadgeTextPropertyChanged() : PersonPictureProperties
  • OnBadSourceButtonClickedHelper() : WebView2CoreObjectsPage
  • OnBeginMeasure() : final
  • OnBehaviorOnInvokedPropertyChanged() : SwipeItemProperties
  • OnBindableVectorChanged() : InspectingDataSource
  • OnBorderBrushPropertyChanged() : LayoutPanelProperties
  • OnBorderColorButtonClick() : RevealListPage
  • OnBorderThicknessPropertyChanged() : LayoutPanelProperties
  • OnBottomItemsChanged() : SwipeControl
  • OnBottomItemsCollectionChanged() : SwipeControl
  • OnBottomItemsPropertyChanged() : SwipeControlProperties
  • OnBreadcrumbBarItemClick() : BreadcrumbBarItem
  • OnBreadcrumbBarItemsRepeaterLoaded() : BreadcrumbBar
  • OnBreadcrumbBarItemsSourceCollectionChanged() : BreadcrumbBar
  • OnBringIntoViewRequested() : ItemsRepeater , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnBringIntoViewRequestedHandler() : ScrollPresenter
  • OnBringTargetIntoViewButtonClicked() : TeachingTipPage
  • OnButtonEnabledChanged() : PipsPagerPage
  • OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged() : PagerControlProperties
  • OnButtonVisibilityChanged() : PagerControl
  • OnCacheBuildActionCompleted() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnCanGoBackPropertyChanged() : WebView2Properties
  • OnCanGoForwardPropertyChanged() : WebView2Properties
  • OnCanScrollChanged() : CanvasScrollControllerConsumer
  • OnCanTearOutTabsPropertyChanged() : TabViewProperties , TabView
  • OnCanUserInvokePropertyChanged() : ItemContainerProperties
  • OnCanUserSelectPropertyChanged() : ItemContainerProperties
  • OnCaptionChanged() : RatingControl
  • OnCaptionPropertyChanged() : RatingControlProperties
  • OnCaptionSizeChanged() : RatingControl
  • OnCenterPropertyChanged() : MapControlProperties , RadialGradientBrushProperties , RadialGradientBrush
  • OnChangeDefaultPositionClick() : RevealBasicPage
  • OnCheckBrushResourcesClicked() : RevealColorPage
  • OnCheckedIsSettingsVisible() : HierarchicalNavigationViewMarkup
  • OnCheckerColorChanged() : ColorPicker
  • OnCheckToggle() : ItemContainer , TreeViewItem
  • OnChildChecked() : RadioButtons
  • OnChildPreviewKeyDown() : BreadcrumbBar , BreadcrumbBarItem , RadioButtons
  • OnChildPropertyChanged() : ItemContainerProperties , ParallaxViewProperties , ParallaxView
  • OnChildUnchecked() : RadioButtons
  • OnClear() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnClearClipboardContentsClicked() : ExtraCommandBarFlyoutPage , TextCommandBarFlyoutPage
  • OnClearForegroundButtonClicked() : InfoBadgePage
  • OnClearHistoryButtonClick() : ItemsViewTransitionPage
  • OnClickEvent() : BreadcrumbBarItem
  • OnClickPrimary() : SplitButton , ToggleSplitButton
  • OnClickSecondary() : SplitButton
  • OnClipboardContentChanged() : TextCommandBarFlyoutPage
  • OnClose_ConcurrentCreationElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnClose_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnClose_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnClose_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCloseButtonClick() : InfoBar , InfoBarPage , TabViewItem
  • OnCloseButtonClicked() : TeachingTip , TeachingTipPage
  • OnCloseButtonCommandParameterPropertyChanged() : TeachingTipProperties
  • OnCloseButtonCommandPropertyChanged() : TeachingTipProperties
  • OnCloseButtonContentPropertyChanged() : TeachingTipProperties
  • OnCloseButtonOverlayModeChanged() : TabViewItem
  • OnCloseButtonOverlayModePropertyChanged() : TabViewProperties , TabView
  • OnCloseButtonStylePropertyChanged() : TeachingTipProperties
  • OnClosed() : InfoBarPage
  • OnClosing() : InfoBarPage
  • OnCollectionChanged() : ReadOnlyNotifyPropertyChangedCollection-g< T > , InspectingDataSource , DelegatingItemsSource , PersonDataSource
  • OnColorChanged() : ColorPicker , ColorSpectrum , RevealBrush
  • OnColorPreviewRectangleGridSizeChanged() : ColorPicker
  • OnColorPropertyChanged() : ColorPickerProperties , ColorSpectrumProperties , RevealBrushProperties , XamlAmbientLightProperties , XamlAmbientLight
  • OnColorRepresentationComboBoxSelectionChanged() : ColorPicker
  • OnColorSpectrumColorChanged() : ColorPicker
  • OnColorSpectrumComponentsChanged() : ColorPicker
  • OnColorSpectrumComponentsPropertyChanged() : ColorPickerProperties
  • OnColorSpectrumShapePropertyChanged() : ColorPickerProperties
  • OnColorSpectrumSizeChanged() : ColorPicker
  • OnColorValuesChanged() : RevealSimpleListPage
  • OnColumnSpacingPropertyChanged() : ColumnMajorUniformToLargestGridLayoutProperties , ColumnMajorUniformToLargestGridLayout
  • OnColumnSpacingSliderValueChanged() : ItemsViewWithDataPage
  • OnCommandBarElementDependencyPropertyChanged() : CommandBarFlyout , CommandBarFlyoutCommandBar
  • OnCommandBarFlyoutTestsClicked() : CommandBarFlyoutMainPage
  • OnCommandChanged() : SwipeItem
  • OnCommandParameterPropertyChanged() : SplitButtonProperties , SwipeItemProperties
  • OnCommandPropertyChanged() : SplitButtonProperties , SwipeItemProperties
  • OnCompactModeThresholdWidthPropertyChanged() : NavigationViewProperties
  • OnCompactPaneLengthPropertyChanged() : NavigationViewProperties
  • OnComponentsChanged() : ColorSpectrum
  • OnComponentsPropertyChanged() : ColorSpectrumProperties
  • OnCompositionCapabilitiesChanged() : MaterialHelper
  • OnCompositionTargetRendering() : ItemsView , ScrollInputHelper , ViewportManagerWithPlatformFeatures , ScrollPresenter , ScrollView
  • OnComputedHorizontalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnComputedHorizontalScrollModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnComputedVerticalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnComputedVerticalScrollModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnConfigurationChanged() : ViewportManagerDownLevel
  • OnConnected() : SpectrumBrush , RevealBorderLight , RevealHoverLight , XamlAmbientLight , AcrylicBrush , RevealBrush , RadialGradientBrush
  • OnContactChanged() : PersonPicture
  • OnContactPropertyChanged() : PersonPictureProperties
  • OnContainerContentChanging() : TabViewListView , TreeView , TreeViewList
  • OnContentChanged() : NavigationViewItem , NavigationViewItemBase , RefreshVisualizer , TeachingTip
  • OnContentChangedImpl() : RefreshVisualizer
  • OnContentLayoutOffsetChanged() : ScrollPresenter
  • OnContentOrientationPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnContentPropertyChanged() : RefreshVisualizerProperties , ScrollPresenterProperties , ScrollViewProperties , TitleBarProperties , ScrollPresenter
  • OnContentSizeChanged() : Expander , ScrollPresenter , TeachingTip
  • OnControlTypePropertyChanged() : CommandBarFlyoutCommandBarAutomationProperties
  • OnCoreProcessFailed() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnCoreWebView2Initialized() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnCoreWebView2Initialized_Ensure() : WebView2CoreObjectsPage
  • OnCoreWebView2Initialized_Source() : WebView2CoreObjectsPage
  • OnCornerRadiusPropertyChanged() : LayoutPanelProperties
  • OnCountPopupsClicked() : ExtraCommandBarFlyoutPage
  • OnCreate_ConcurrentCreationElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_CoreProcessFailed_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_MarkupElement_Blank_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_MarkupElement_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreate_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnCreateAutomationPeer() : AnimatedVisualPlayer , BreadcrumbBarItem , ColorPickerSlider , ColorSpectrum , DropDownButton , Expander , TestControl , InfoBar , InkCanvas , TargetElement , ItemContainer , ItemsView , AcrylicBrushPage , MenuBar , MenuBarItem , NavigationView , NavigationViewItem , NavigationViewItemBase , NumberBox , PagerControl , PersonPicture , PipsPager , ProgressBar , ProgressRing , RadioButtons , RatingControl , ItemsRepeater , SelectionContainer , RepeaterItem , GroupedRepeaterItem , TreeViewItem , ScrollPresenter , SelectorBarItem , SplitButton , ToggleSplitButton , TabView , TabViewItem , TeachingTip , TitleBar , TreeViewItem , TreeViewList , WebView2
  • OnCreateItemAutomationPeer() : TreeViewListAutomationPeer
  • OnCtrlF4Invoked() : TabView
  • OnCtrlShiftTabInvoked() : TabView
  • OnCtrlTabInvoked() : TabView
  • OnCurrentElementSelectionModelSelectionChanged() : ItemsView
  • OnCurrentItemIndexPropertyChanged() : ItemsViewProperties
  • OnCurrentThemeChanged() : RevealScenarioLights
  • OnDataSourceChanged() : TopNavigationViewDataProvider
  • OnDataSourcePropertyChanged() : ItemsRepeater
  • OnDecrementRepeatButtonClick() : AnnotatedScrollBar
  • OnDefaultBackgroundColorPropertyChanged() : WebView2Properties
  • OnDeleteButtonClick() : ItemsViewTransitionPage
  • OnDetailLabelTemplatePropertyChanged() : AnnotatedScrollBarProperties
  • OnDetailLabelToolTipOpened() : AnnotatedScrollBar
  • OnDeterminateSourcePropertyChanged() : ProgressRingProperties , ProgressRing
  • OnDisconnected() : SpectrumBrush , RevealBorderLight , RevealHoverLight , XamlAmbientLight , AcrylicBrush , RevealBrush , RadialGradientBrush
  • OnDisplayKindPropertiesChanged() : InfoBadge
  • OnDisplayModeChanged() : PagerControl , PagerControlPage , DisplayRegionHelper
  • OnDisplayModePropertyChanged() : NavigationViewProperties , PagerControlProperties
  • OnDisplayNameChanged() : PersonPicture
  • OnDisplayNamePropertyChanged() : PersonPictureProperties
  • OnDoubleTapped() : ItemContainer
  • OnDpiChanged() : MaterialHelper
  • OnDragEnter() : TreeViewItem , TreeViewList , WebView2
  • OnDragItemsCompleted() : TreeViewList
  • OnDragItemsStarting() : TreeViewList
  • OnDragLeave() : TreeViewItem , TreeViewList , WebView2
  • OnDragOver() : TreeViewItem , TreeViewList , WebView2
  • OnDrop() : TreeViewItem , TreeViewList , WebView2
  • OnDropDownClosed() : ComboBoxHelper
  • OnDropDownOpened() : ComboBoxHelper
  • OnEditCommandCount6Click() : CommandBarFlyoutPage
  • OnEffectiveViewportChanged() : ViewportManagerWithPlatformFeatures
  • OnElementBoundsChanged() : final
  • OnElementChecked() : CommandBarFlyoutPage
  • OnElementCleared() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnElementClearing() : ItemsRepeater
  • OnElementClearingEvent() : BreadcrumbBar
  • OnElementClicked() : CommandBarFlyoutPage
  • OnElementIndexChanged() : PipsPager , ItemsRepeater , TreeViewSample
  • OnElementIndexChangedEvent() : BreadcrumbBar
  • OnElementMeasured() : FlowLayoutDerived , FlowLayout , StackLayout , StackLayoutState
  • OnElementPrepared() : PipsPager , ItemsRepeater , ScaleAnimatedVerticalListDemo , final , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnElementPreparedEvent() : BreadcrumbBar
  • OnElementUnchecked() : CommandBarFlyoutPage
  • OnEllipsisItemClick() : BreadcrumbBarItem
  • OneMoreListViewItem_Holding() : RevealStatesPage
  • OnEnergySaverStatusChanged() : MaterialHelper
  • OnEnsure_Ensure_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsure_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCoreWebView2_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCoreWebView2_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCoreWebView2_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnEnsureCWV2ButtonClicked() : WebView2BasicPage
  • OnEnteredMoveSize() : TabView
  • OnEnteringMoveSize() : TabView
  • OneSideCheckBox_Checked() : TwoPaneViewPage
  • OneSideCheckBox_Unchecked() : TwoPaneViewPage
  • OnExistingItemTapped() : CircleLayoutSamplePage
  • OnExitedMoveSize() : TabView
  • OnExpandCollapseChevronPointerCanceled() : NavigationViewItemPresenter
  • OnExpandCollapseChevronPointerCaptureLost() : NavigationViewItemPresenter
  • OnExpandCollapseChevronPointerExited() : NavigationViewItemPresenter
  • OnExpandCollapseChevronPointerPressed() : NavigationViewItemPresenter , TreeViewItem
  • OnExpandCollapseChevronPointerReleased() : NavigationViewItem , NavigationViewItemPresenter
  • OnExpandContentTimerTick() : TreeViewItem
  • OnExpandDirectionPropertyChanged() : Expander , ExpanderProperties
  • OnExpandedModeThresholdWidthPropertyChanged() : NavigationViewProperties
  • OnExternalTornOutTabsDropped() : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • OnExternalTornOutTabsDropping() : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • OnExtraCommandBarFlyoutTestsClicked() : CommandBarFlyoutMainPage
  • OnF6AcceleratorKeyClicked() : TeachingTip
  • OnF6PopupPreviewKeyDownClicked() : TeachingTip
  • OnF6PreviewKeyDownClicked() : TeachingTip
  • OnFallbackColorChanged() : AcrylicBrush , RevealBrush , RadialGradientBrush
  • OnFallbackContentPropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnFallbackIconSourcePropertyChanged() : AnimatedIcon , AnimatedIconProperties
  • OnFirstButtonCommandPropertyChanged() : PagerControlProperties
  • OnFirstButtonStylePropertyChanged() : PagerControlProperties
  • OnFirstButtonVisibilityChanged() : PagerControlPage
  • OnFirstButtonVisibilityPropertyChanged() : PagerControlProperties
  • OnFlowDirectionChanged() : BreadcrumbBar , BreadcrumbBarItem , ScrollPresenter
  • OnFlowDirectionPropertyChanged() : AnimatedIcon
  • OnFlyoutChanged() : SplitButton
  • OnFlyoutClosed() : CommandBarFlyoutPage , DropDownButton , MenuBarItem , SplitButton
  • OnFlyoutClosing() : NavigationView , NavigationViewItem
  • OnFlyoutElementIndexChangedEvent() : BreadcrumbBarItem
  • OnFlyoutElementPreparedEvent() : BreadcrumbBarItem
  • OnFlyoutOpened() : SplitButton , CommandBarFlyoutPage , DropDownButton
  • OnFlyoutOpening() : MenuBarItem
  • OnFlyoutPlacementChanged() : SplitButton
  • OnFlyoutPropertyChanged() : DropDownButton , SplitButtonProperties
  • OnFlyoutTarget10Click() : CommandBarFlyoutPage
  • OnFlyoutTarget11Click() : CommandBarFlyoutPage
  • OnFlyoutTarget12Click() : CommandBarFlyoutPage
  • OnFlyoutTarget13Click() : CommandBarFlyoutPage
  • OnFlyoutTarget14Click() : CommandBarFlyoutPage
  • OnFlyoutTarget15Click() : CommandBarFlyoutPage
  • OnFlyoutTarget16Click() : CommandBarFlyoutPage
  • OnFlyoutTarget1Click() : CommandBarFlyoutPage
  • OnFlyoutTarget2Click() : CommandBarFlyoutPage
  • OnFlyoutTarget3Click() : CommandBarFlyoutPage
  • OnFlyoutTarget4Click() : CommandBarFlyoutPage
  • OnFlyoutTarget5Click() : CommandBarFlyoutPage
  • OnFlyoutTarget6Click() : CommandBarFlyoutPage
  • OnFlyoutTarget7Click() : CommandBarFlyoutPage
  • OnFlyoutTarget8Click() : CommandBarFlyoutPage
  • OnFlyoutTarget9Click() : CommandBarFlyoutPage
  • OnFocusChanged() : final
  • OnFocusDisengaged() : RatingControl
  • OnFocusedAction() : ExtendedSelector , MultipleSelector , SelectorBase , SingleSelector
  • OnFocusEngaged() : RatingControl
  • OnFontFamilyChanged() : RatingControl
  • OnFooterItemsSourceCollectionChanged() : NavigationView
  • OnFooterMenuItemsPropertyChanged() : NavigationViewProperties
  • OnFooterMenuItemsSourcePropertyChanged() : NavigationViewProperties
  • OnFooterPropertyChanged() : TitleBarProperties
  • OnForegroundBrushColorPropertyChanged() : AnimatedIcon
  • OnForegroundChanged() : InfoBar
  • OnForegroundColorPropertyChanged() : ProgressRing
  • OnForegroundPropertyChanged() : AnimatedIcon , SwipeItemProperties , ProgressRing , TabViewItem
  • OnForegroundToNullButtonClicked() : InfoBadgePage
  • OnGetDocumentTitleButtonClicked() : WebView2BasicPage
  • OnGetPipsPagerButtonSizesClicked() : PipsPagerPage
  • OnGetRichEditBoxRtfContentClicked() : TextCommandBarFlyoutPage
  • OnGetTargetBoundsButtonClicked() : TeachingTipPage
  • OnGettingFocus() : BreadcrumbBar , RadioButtons
  • OnGoBackButtonClicked() : WebView2BasicPage
  • OnGoForwardButtonClicked() : WebView2BasicPage
  • OnGood_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnGotFocus() : ColorPickerSlider , ColorSpectrum , NavigationViewItem , NavigationViewItemBase , PipsPager , ScrollView , SelectorBar
  • OnGradientOriginPropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnGradientStopsVectorChanged() : RadialGradientBrush
  • OnGroupedClicked() : FlatSample
  • OnGroupNamePropertyChanged() : RadioMenuFlyoutItemProperties
  • OnHasChildrenPropertyChanged() : TreeViewNodeProperties
  • OnHasUnrealizedChildrenPropertyChanged() : NavigationViewItemProperties , TreeViewItemProperties , NavigationViewItem
  • OnHeaderChanged() : TabViewItem
  • OnHeaderPropertyChanged() : NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties , NumberBox , TabViewItem
  • OnHeaderTemplatePropertyChanged() : NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , NumberBox
  • OnHeroContentPlacementChanged() : TeachingTip
  • OnHeroContentPlacementPropertyChanged() : TeachingTipProperties
  • OnHeroContentPropertyChanged() : TeachingTipProperties
  • OnHexTextChanging() : ColorPicker
  • OnHideIndicatorsTimerTick() : ScrollView
  • OnHiding() : AnimatedVisualPlayer::final , AnimatedVisualPlayer
  • OnHorizontalAnchorRatioPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalCacheLengthPropertyChanged() : ItemsRepeaterProperties
  • OnHorizontalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnHorizontalScrollChainModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalScrollControllerPointerEntered() : ScrollView
  • OnHorizontalScrollControllerPointerExited() : ScrollView
  • OnHorizontalScrollModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalScrollRailModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnHorizontalShiftPropertyChanged() : ParallaxViewProperties
  • OnHorizontalSnapPointsVectorChanged() : ScrollPresenter
  • OnHorizontalSourceEndOffsetPropertyChanged() : ParallaxViewProperties
  • OnHorizontalSourceOffsetKindPropertyChanged() : ParallaxViewProperties
  • OnHorizontalSourceStartOffsetPropertyChanged() : ParallaxViewProperties
  • OnHsvColorChanged() : ColorSpectrum
  • OnHsvColorPropertyChanged() : ColorSpectrumProperties
  • OnHueTextChanging() : ColorPicker
  • OnIconForegroundColorPickerColorChanged() : InfoBadgePage
  • OnIconPropertyChanged() : NavigationViewItemProperties , SelectorBarItemProperties , NavigationViewItem
  • OnIconSourceChanged() : AnimatedIconHost , ToggleAnimatedIconHost , TabViewItem , TeachingTip
  • OnIconSourcePropertyChanged() : InfoBadgeProperties , InfoBarProperties , SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties , InfoBar , TabViewItem
  • OnIgnoredInputKindsPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnImagePointerPressed() : ImageIRefreshInfoProviderAdapter
  • OnIncrementRepeatButtonClick() : AnnotatedScrollBar
  • OnIndeterminateSourcePropertyChanged() : ProgressRingProperties , ProgressRing
  • OnIndicatorStateStoryboardCompleted() : ScrollView
  • OnIndicatorWidthComponentChanged() : ProgressBar
  • OnInfoBadgePropertyChanged() : NavigationViewItemProperties , NavigationViewItem
  • OnInfoProviderPropertyChanged() : RefreshVisualizerProperties
  • OnInitialSetValueChanged() : RatingControl
  • OnInitialSetValuePropertyChanged() : RatingControlProperties
  • OnInitialsPropertyChanged() : PersonPictureProperties
  • OnInputActivationChanged() : TitleBar
  • OnInputTargetPointerEntered() : ColorSpectrum
  • OnInputTargetPointerExited() : ColorSpectrum
  • OnInputTargetPointerMoved() : ColorSpectrum
  • OnInputTargetPointerPressed() : ColorSpectrum
  • OnInputTargetPointerReleased() : ColorSpectrum
  • OnInsertAt() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnInteractedAction() : ExtendedSelector , MultipleSelector , SelectorBase , SingleSelector
  • OnInteractionPropertyChanged() : ButtonInteractionPage
  • OnInteractiveControlsVisiblePropertyChanged() : MapControlProperties
  • OnInternalIsCheckedChanged() : RadioMenuFlyoutItem
  • OnInterpolationSpacePropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnInvokeModeChanged() : ButtonInteractionPage
  • OnIsActivePropertyChanged() : ProgressRingProperties , ProgressRing
  • OnIsAlphaEnabledChanged() : ColorPicker
  • OnIsAlphaEnabledPropertyChanged() : ColorPickerProperties
  • OnIsAlphaSliderVisiblePropertyChanged() : ColorPickerProperties
  • OnIsAlphaTextInputVisiblePropertyChanged() : ColorPickerProperties
  • OnIsBackButtonVisiblePropertyChanged() : NavigationViewProperties , TitleBarProperties
  • OnIsBackEnabledPropertyChanged() : NavigationViewProperties , TitleBarProperties
  • OnIsCheckedChanged() : ToggleSplitButton
  • OnIsCheckedPropertyChanged() : RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties
  • OnIsClearEnabledChanged() : RatingControl
  • OnIsClearEnabledPropertyChanged() : RatingControlProperties
  • OnIsClosablePropertyChanged() : InfoBarProperties , TabViewItemProperties , InfoBar , TabViewItem
  • OnIsColorChannelTextInputVisiblePropertyChanged() : ColorPickerProperties
  • OnIsColorPreviewVisiblePropertyChanged() : ColorPickerProperties
  • OnIsColorSliderVisiblePropertyChanged() : ColorPickerProperties
  • OnIsColorSpectrumVisiblePropertyChanged() : ColorPickerProperties
  • OnIsContainerPropertyChanged() : RevealBrush
  • OnIsEnabledChanged() : AnnotatedScrollBar , BreadcrumbBarItem , ItemContainer , NavigationViewItem , NumberBox , RadioButtons , RatingControl
  • OnIsEnabledPropertyChanged() : InkCanvasProperties , InkCanvas
  • OnIsExpandedPropertyChanged() : Expander , ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties , NavigationViewItem
  • OnIsGroupPropertyChanged() : PersonPictureProperties
  • OnIsHexInputVisiblePropertyChanged() : ColorPickerProperties
  • OnIsHorizontalShiftClampedPropertyChanged() : ParallaxViewProperties
  • OnIsIconVisiblePropertyChanged() : InfoBarProperties , InfoBar
  • OnIsIndeterminatePropertyChanged() : ProgressBarProperties , ProgressRingProperties , ProgressBar , ProgressRing
  • OnIsItemInvokedEnabledChanged() : ItemsView
  • OnIsItemInvokedEnabledPropertyChanged() : ItemsViewProperties
  • OnIsLightDismissEnabledChanged() : TeachingTip
  • OnIsLightDismissEnabledPropertyChanged() : TeachingTipProperties
  • OnIsMoreButtonVisiblePropertyChanged() : ColorPickerProperties
  • OnIsOpenChanged() : TeachingTip
  • OnIsOpenPropertyChanged() : InfoBarProperties , TeachingTipProperties , InfoBar
  • OnIsPaneOpenChanged() : NavigationView
  • OnIsPaneOpenPropertyChanged() : NavigationViewProperties
  • OnIsPaneToggleButtonVisiblePropertyChanged() : NavigationViewProperties , TitleBarProperties
  • OnIsPaneVisiblePropertyChanged() : NavigationViewProperties
  • OnIsReadOnlyChanged() : RatingControl
  • OnIsReadOnlyPropertyChanged() : RatingControlProperties
  • OnIsScrollingWithMouseChanged() : CanvasScrollControllerConsumer
  • OnIsSelectedChanged() : TreeViewItem
  • OnIsSelectedPropertyChanged() : ItemContainerProperties , NavigationViewItemBaseProperties , TabViewItem
  • OnIsSettingsVisiblePropertyChanged() : NavigationViewProperties
  • OnIsTargetPropertyChanged() : XamlAmbientLight
  • OnIsTitleBarAutoPaddingEnabledPropertyChanged() : NavigationViewProperties
  • OnIsVerticalShiftClampedPropertyChanged() : ParallaxViewProperties
  • OnIsVirtualizationEnabledPropertyChanged() : StackLayoutProperties
  • OnIsWrapEnabledPropertyChanged() : NumberBoxProperties , NumberBox
  • OnItemClick() : TreeView
  • OnItemClicked() : ScaleAnimatedVerticalListDemo , CollectionChangeDemo
  • OnItemCollapsed() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • OnItemExpanding() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • OnItemGotFocus() : ScaleAnimatedVerticalListDemo
  • OnItemInfoChanged() : RatingControl
  • OnItemInfoPropertyChanged() : RatingControlProperties
  • OnItemsAdded() : final , VirtualizingStackLayout , TreeView
  • OnItemsChanged() : TabView , TabViewListView
  • OnItemsChangedCore() : FlowLayout , LinedFlowLayout , StackLayout , VirtualizingStackLayout , UniformGridLayout , VirtualizingLayout
  • OnItemsContainerSizeChanged() : NavigationView
  • OnItemsJustificationPropertyChanged() : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • OnItemsPresenterSizeChanged() : TabView
  • OnItemsPropertyChanged() : RadioButtonsProperties , SelectorBarProperties
  • OnItemsRemoved() : final , VirtualizingStackLayout , TreeView
  • OnItemsRepeaterElementClearing() : ItemsView
  • OnItemsRepeaterElementIndexChanged() : ItemsView
  • OnItemsRepeaterElementPrepared() : ItemsView
  • OnItemsRepeaterItemsSourceChanged() : ItemsView
  • OnItemsRepeaterLayoutChanged() : PipsPager
  • OnItemsRepeaterLayoutUpdated() : ItemsView
  • OnItemsRepeaterSizeChanged() : ItemsView
  • OnItemsSourceChanged() : ItemsView , CustomItemsSourceView , MockItemsSource , FlowLayoutAlgorithm , ItemsSourceView , final , TreeView , TreeViewNode
  • OnItemsSourcePropertyChanged() : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties , TreeViewProperties , TreeViewItemProperties
  • OnItemsSourceViewChanged() : NavigationViewItem , ItemsRepeater
  • OnItemsStretchPropertyChanged() : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • OnItemsVectorChanged() : MenuBarItem
  • OnItemsViewElementGettingFocus() : ItemsView
  • OnItemsViewElementKeyDown() : ItemsView
  • OnItemsViewItemContainerIsSelectedChanged() : ItemsView
  • OnItemsViewItemContainerItemInvoked() : ItemsView
  • OnItemsViewKeyDown() : ItemsViewTransitionPage
  • OnItemsViewSelectedItemPropertyChanged() : SelectorBar
  • OnItemTapped() : SwipeItem
  • OnItemTemplateChanged() : ItemsView , ItemsRepeater
  • OnItemTemplatePropertyChanged() : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties
  • OnItemTransitionProviderPropertyChanged() : ItemsRepeaterProperties , ItemsViewProperties
  • OnKeepAliveTimerTick() : ItemCollectionTransitionProvider
  • OnKeepInteriorCornersSquarePropertyChanged() : AutoSuggestBoxHelper , ComboBoxHelper
  • OnKeyDown() : ColorPickerSlider , ColorSpectrum , CommandBarFlyoutCommandBar , ButtonInteraction , SliderInteraction , ItemContainer , ItemsView , NavigationView , PipsPager , RatingControl , ScrollView , TabViewItem , TreeViewItem
  • OnKeyUp() : ButtonInteraction , RepeaterItem , GroupedRepeaterItem , TreeViewItem
  • OnKindPropertyChanged() : MicaBackdropProperties
  • OnLabelsCollectionChanged() : AnnotatedScrollBar
  • OnLabelsGridSizeChanged() : AnnotatedScrollBar
  • OnLabelsPropertyChanged() : AnnotatedScrollBarProperties
  • OnLabelTemplatePropertyChanged() : AnnotatedScrollBarProperties
  • OnLastButtonCommandPropertyChanged() : PagerControlProperties
  • OnLastButtonStylePropertyChanged() : PagerControlProperties
  • OnLastButtonVisibilityChanged() : PagerControlPage
  • OnLastButtonVisibilityPropertyChanged() : PagerControlProperties
  • OnLayerAdded() : MapControl
  • OnLayersPropertyChanged() : MapControlProperties
  • OnLayersVectorChanged() : MapControl
  • OnLayoutChanged() : LayoutPanel , RadioButtons , ItemsRepeater , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnLayoutChanging() : final
  • OnLayoutPropertyChanged() : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • OnLayoutRootSizeChanged() : ColorSpectrum
  • OnLayoutSelectionChanged() : ItemsViewTransitionPage
  • OnLayoutUpdated() : NavigationView , ItemsRepeater , ItemsViewWithDataPage , ViewportManagerWithPlatformFeatures , TitleBar
  • OnLayoutUpdatedAfterStateChanged() : AnimatedIcon
  • OnLeftItemsChanged() : SwipeControl
  • OnLeftItemsCollectionChanged() : SwipeControl
  • OnLeftItemsPropertyChanged() : SwipeControlProperties
  • OnLightDismissIndicatorPopupClosed() : TeachingTip
  • OnLineAlignmentPropertyChanged() : FlowLayoutProperties
  • OnLineArranged() : FlowLayoutDerived , FlowLayout , FlowLayoutState
  • OnLineHeightPropertyChanged() : LinedFlowLayoutProperties
  • OnLineSpacingPropertyChanged() : LinedFlowLayoutProperties
  • OnListControlDragItemsCompleted() : TreeView
  • OnListControlDragItemsStarting() : TreeView
  • OnListControlSelectionChanged() : TreeView
  • OnListViewDragEnter() : TabView
  • OnListViewDraggingPropertyChanged() : TabView
  • OnListViewDragItemsCompleted() : TabView
  • OnListViewDragItemsStarting() : TabView
  • OnListViewDragLeave() : TabView
  • OnListViewDragOver() : TabView
  • OnListViewDrop() : TabView
  • OnListViewGettingFocus() : TabView
  • OnListViewLoaded() : TabView
  • OnListViewSelectionChanged() : TabView
  • OnListViewSizeChanged() : TabView
  • OnLoad() : PagerControlPage , PipsPagerPage
  • OnLoaded() : AnimatedIcon , AnimatedVisualPlayer , InkCanvas , ItemsView , NavigationView , NavigationViewItem , NavigationViewItemBase , NavigationViewRS3Page , ParallaxView , PipsPagerExamples , ProgressRing , RadioButtonsFocusPage , RadioMenuFlyoutItem , ItemsRepeater , ScrollPresenter , SelectorBar , SwipeControl , TabView , TabViewItem , TeachingTipFocusPage , WebView2CoreObjectsPage , WebView2
  • OnLoadedEvent() : BreadcrumbBarItem
  • OnLocationPropertyChanged() : MapIconProperties
  • OnLostFocus() : ColorPickerSlider , ColorSpectrum , NavigationViewItem , NavigationViewItemBase , PipsPager
  • OnlyProgramaticCloseWillCloseRemainOpenExecuteItems() : SwipeControlTests
  • OnMainPageLoaded() : RefreshContainerOnImagePage , RefreshContainerPage
  • OnMaintainViewportSliderValueChanged() : ItemsViewWithDataPage
  • OnMakeAnchor() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • OnManipulationModePropertyChanged() : WebView2
  • OnMapElementsPropertyChanged() : MapElementsLayerProperties
  • OnMapElementsVectorChanged() : MapElementsLayer
  • OnMappingModePropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnMapServiceTokenPropertyChanged() : MapControlProperties
  • OnMaterialPolicyStatusChanged() : RevealBorderLight , RevealHoverLight , XamlAmbientLight , AcrylicBrush , RevealBrush
  • OnMaxColumnsPropertyChanged() : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties , ColumnMajorUniformToLargestGridLayout
  • OnMaxHorizontalShiftRatioPropertyChanged() : ParallaxViewProperties
  • OnMaxHuePropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMaximumPropertyChanged() : NumberBoxProperties , ProgressRingProperties , NumberBox , ProgressRing
  • OnMaximumRowsOrColumnsPropertyChanged() : UniformGridLayoutProperties
  • OnMaxRatingChanged() : RatingControl
  • OnMaxRatingPropertyChanged() : RatingControlProperties
  • OnMaxRowsOrColumnsSliderValueChanged() : ItemsViewWithDataPage
  • OnMaxSaturationPropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMaxSurfaceOpacityPropertyChanged() : SpectrumBrushProperties
  • OnMaxSurfacePropertyChanged() : SpectrumBrushProperties
  • OnMaxValuePropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMaxVerticalShiftRatioPropertyChanged() : ParallaxViewProperties
  • OnMaxVisiblePipsChanged() : PipsPager , PipsPagerPage
  • OnMaxVisiblePipsPropertyChanged() : PipsPagerProperties
  • OnMaxZoomFactorPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnMeasureStart() : StackLayoutState
  • OnMenuBarItemAccessKeyInvoked() : MenuBarItem
  • OnMenuBarItemKeyDown() : MenuBarItem
  • OnMenuBarItemPointerEntered() : MenuBarItem
  • OnMenuBarItemPointerPressed() : MenuBarItem
  • OnMenuFlyoutChangingItemsClosed() : MenuFlyoutPage
  • OnMenuFlyoutChangingItemsOpened() : MenuFlyoutPage
  • OnMenuFlyoutChangingSubItemsClosed() : MenuFlyoutPage
  • OnMenuFlyoutChangingSubItemsOpened() : MenuFlyoutPage
  • OnMenuItemContainerStylePropertyChanged() : NavigationViewProperties
  • OnMenuItemContainerStyleSelectorPropertyChanged() : NavigationViewProperties
  • OnMenuItemsPropertyChanged() : NavigationViewProperties , NavigationViewItemProperties , NavigationViewItem
  • OnMenuItemsSourceCollectionChanged() : NavigationView
  • OnMenuItemsSourcePropertyChanged() : NavigationViewProperties , NavigationViewItemProperties , NavigationViewItem
  • OnMenuItemsVectorChanged() : NavigationViewItem
  • OnMenuItemTemplatePropertyChanged() : NavigationViewProperties
  • OnMenuItemTemplateSelectorPropertyChanged() : NavigationViewProperties
  • OnMessagePropertyChanged() : InfoBarProperties , InfoBar
  • OnMinColumnSpacingPropertyChanged() : FlowLayoutProperties , UniformGridLayoutProperties
  • OnMinHuePropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMinimumPropertyChanged() : NumberBoxProperties , ProgressRingProperties , NumberBox , ProgressRing
  • OnMinItemHeightPropertyChanged() : UniformGridLayoutProperties
  • OnMinItemSpacingPropertyChanged() : LinedFlowLayoutProperties
  • OnMinItemWidthPropertyChanged() : UniformGridLayoutProperties
  • OnMinMaxHueChanged() : ColorSpectrum , ColorPicker
  • OnMinMaxSaturationChanged() : ColorPicker , ColorSpectrum
  • OnMinMaxValueChanged() : ColorSpectrum , ColorPicker
  • OnMinRowSpacingPropertyChanged() : FlowLayoutProperties , UniformGridLayoutProperties
  • OnMinSaturationPropertyChanged() : ColorPickerProperties , ColorSpectrumProperties
  • OnMinSurfacePropertyChanged() : SpectrumBrushProperties
  • OnMinTallModeHeightPropertyChanged() : TwoPaneViewProperties
  • OnMinValuePropertyChanged() : ColorSpectrumProperties , ColorPickerProperties
  • OnMinWideModeWidthPropertyChanged() : TwoPaneViewProperties
  • OnMinZoomFactorPropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnMirroredWhenRightToLeftPropertyChanged() : AnimatedIcon , AnimatedIconProperties
  • OnModePropertyChanged() : SwipeItemsProperties
  • OnMoreButtonChecked() : ColorPicker
  • OnMoreButtonClicked() : ColorPicker
  • OnMoreButtonUnchecked() : ColorPicker
  • OnMoveButtonClick() : ItemsViewTransitionPage
  • OnMultipleSelectionClicked() : FlatSample , GroupedSample , TreeViewSample
  • OnMultiSelectModePropertyChanged() : ItemContainerProperties
  • OnNavigatedFrom() : ItemsViewIntegrationPage , ItemsViewSummaryPage , AcrylicBrushPage , AcrylicMarkupPage , AcrylicRenderingPage , RevealMarkupPage , RevealRegressionTestsPage , RevealStatesPage , NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewTopNavStorePage , RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizerPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage , TeachingTipPage , TreeViewPage , SwipeControlPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterChainingAndRailingPage , VariableSizedItemsPage , NavigationViewInitPage , CoreWindowEventsPage
  • OnNavigatedTo() : GroupedItemsControlPage , ListViewBasePage , AcrylicBrushPage , CoreWindowEventsPage , ItemsViewWithDataPage , TabViewPage , GroupedListViewBasePage
  • OnNavigateToStringButtonClicked() : WebView2BasicPage
  • OnNavigatingFrom() : SwipeControlPage , WebView2BasicPage , WebView2CoreObjectsPage , RatingControlPage
  • OnNavigationButtonVisibilityChanged() : PipsPager
  • OnNavigationCompleted() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnNavigationStarting() : WebView2BasicPage , WebView2CoreObjectsPage
  • OnNavigationViewItemBaseDepthChanged() : NavigationViewItem , NavigationViewItemBase , NavigationViewItemHeader , NavigationViewItemSeparator
  • OnNavigationViewItemBaseIsSelectedChanged() : NavigationViewItem , NavigationViewItemBase
  • OnNavigationViewItemBasePositionChanged() : NavigationViewItem , NavigationViewItemSeparator , NavigationViewItemBase
  • OnNavigationViewItemBaseVisibilityPropertyChanged() : NavigationView
  • OnNavigationViewItemClicked() : NavigationView
  • OnNavigationViewItemExpandedPropertyChanged() : NavigationView
  • OnNavigationViewItemInvoked() : NavigationView
  • OnNavigationViewItemIsSelectedPropertyChanged() : NavigationView
  • OnNavigationViewItemKeyDown() : NavigationView
  • OnNavigationViewItemOnGotFocus() : NavigationView
  • OnNavItemInvoked() : NavigationViewTopNavStorePage
  • OnNewItemTapped() : CircleLayoutSamplePage
  • OnNextButtonClicked() : PipsPager
  • OnNextButtonCommandPropertyChanged() : PagerControlProperties
  • OnNextButtonStylePropertyChanged() : PagerControlProperties , PipsPagerProperties
  • OnNextButtonVisibilityChanged() : PagerControlPage
  • OnNextButtonVisibilityPropertyChanged() : PipsPagerProperties , PagerControlProperties
  • OnNextPageButtonVisibilityChanged() : PipsPagerPage
  • OnNodeCollapsed() : TreeView
  • OnNodeExpanding() : TreeView
  • OnNoIndicatorStateStoryboardCompleted() : ScrollView
  • OnNoiseChanged() : AcrylicBrush , RevealBrush
  • OnNormalPipStylePropertyChanged() : PipsPagerProperties
  • OnNumberBoxGotFocus() : NumberBox
  • OnNumberBoxKeyDown() : NumberBox
  • OnNumberBoxKeyUp() : NumberBox
  • OnNumberBoxLostFocus() : NumberBox
  • OnNumberBoxScroll() : NumberBox
  • OnNumberFormatterPropertyChanged() : NumberBoxProperties , NumberBox
  • OnNumberOfPagesChanged() : PipsPager , PipsPagerPage , PagerControl
  • OnNumberOfPagesPropertyChanged() : PagerControlProperties , PipsPagerProperties
  • OnOpenPaneLengthPropertyChanged() : NavigationViewProperties
  • OnOrientationChanged() : ColorPicker , PipsPager , RefreshVisualizer , PipsPagerPage
  • OnOrientationChangedImpl() : RefreshVisualizer
  • OnOrientationPropertyChanged() : ColorPickerProperties , FlowLayoutProperties , PipsPagerProperties , RefreshVisualizerProperties , StackLayoutProperties , UniformGridLayoutProperties
  • OnOverflowItemsSourceCollectionChanged() : NavigationView
  • OnOverflowLabelModePropertyChanged() : NavigationViewProperties
  • OnOwnerArranged() : final , ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , final
  • OnOwnerMeasuring() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , ViewportManager
  • OnPaddingPropertyChanged() : LayoutPanelProperties
  • OnPagerInputCommandPropertyChanged() : PagerControlProperties
  • OnPageThemeComboBoxSelectionChanged() : TeachingTipPage
  • OnPane1LengthPropertyChanged() : TwoPaneViewProperties
  • OnPane1PropertyChanged() : TwoPaneViewProperties
  • OnPane2LengthPropertyChanged() : TwoPaneViewProperties
  • OnPane2PropertyChanged() : TwoPaneViewProperties
  • OnPaneDisplayModePropertyChanged() : NavigationViewProperties
  • OnPaneFooterPropertyChanged() : NavigationViewProperties
  • OnPanePriorityPropertyChanged() : TwoPaneViewProperties
  • OnPaneSearchButtonClick() : NavigationView
  • OnPaneTitleHolderSizeChanged() : NavigationView
  • OnPaneTitlePropertyChanged() : NavigationViewProperties
  • OnPaneToggleButtonClick() : TitleBar , NavigationView
  • OnPaneToggleButtonStylePropertyChanged() : NavigationViewProperties
  • OnPartVisibilityChanged() : ColorPicker
  • OnPipsAreaBringIntoViewRequested() : PipsPager
  • OnPipsAreaGettingFocus() : PipsPager
  • OnPlaceholderValueChanged() : RatingControl
  • OnPlaceholderValuePropertyChanged() : RatingControlProperties
  • OnPlacementMarginChanged() : TeachingTip
  • OnPlacementMarginPropertyChanged() : TeachingTipProperties
  • OnPlaybackRatePropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnPointerCanceled() : ButtonInteraction , SliderInteraction , ItemContainer , TabViewItem , PipsPager , BreadcrumbBarItem
  • OnPointerCancelledBackgroundStackPanel() : RatingControl
  • OnPointerCaptureLost() : BreadcrumbBarItem , ButtonInteraction , SliderInteraction , ItemContainer , TabViewItem
  • OnPointerCaptureLostBackgroundStackPanel() : RatingControl
  • OnPointerEntered() : BreadcrumbBarItem , ButtonInteraction , ItemContainer , TabViewItem , PipsPager
  • OnPointerEnteredBackgroundStackPanel() : RatingControl
  • OnPointerEvent() : SplitButton
  • OnPointerExited() : ButtonInteraction , ItemContainer , PipsPager , TabViewItem , BreadcrumbBarItem
  • OnPointerExitedBackgroundStackPanel() : RatingControl
  • OnPointerMoved() : BreadcrumbBarItem , SliderInteraction , TabViewItem , ItemContainer
  • OnPointerMovedOverBackgroundStackPanel() : RatingControl
  • OnPointerPressed() : BreadcrumbBarItem , SliderInteraction , ItemContainer , RevealHoverLight , GroupedRepeaterItem , TreeViewItem , ScrollPresenter , SwipeItem , TabViewItem , ButtonInteraction , RepeaterItem
  • OnPointerPressedBackgroundStackPanel() : RatingControl
  • OnPointerPressedEvent() : SwipeControl
  • OnPointerReleased() : ButtonInteraction , SliderInteraction , ItemContainer , TabViewItem , BreadcrumbBarItem
  • OnPointerReleasedBackgroundStackPanel() : RatingControl
  • OnPopupClosed() : TeachingTip
  • OnPopupOpened() : TeachingTip
  • OnPostArrange() : ViewportManagerDownLevel
  • OnPreferredPlacementPropertyChanged() : TeachingTipProperties
  • OnPreferSmallImagePropertyChanged() : PersonPictureProperties
  • OnPrefixTextPropertyChanged() : PagerControlProperties
  • OnPresenterKeyDown() : MenuBarItem
  • OnPresenterPointerCanceled() : NavigationViewItem
  • OnPresenterPointerCaptureLost() : NavigationViewItem
  • OnPresenterPointerEntered() : NavigationViewItem
  • OnPresenterPointerExited() : NavigationViewItem
  • OnPresenterPointerMoved() : NavigationViewItem
  • OnPresenterPointerPressed() : NavigationViewItem
  • OnPresenterPointerReleased() : NavigationViewItem
  • OnPreviewKeyDown() : RatingControl , NavigationView
  • OnPreviewKeyUp() : RatingControl
  • OnPreviousButtonClicked() : PipsPager
  • OnPreviousButtonCommandPropertyChanged() : PagerControlProperties
  • OnPreviousButtonStylePropertyChanged() : PagerControlProperties , PipsPagerProperties
  • OnPreviousButtonVisibilityChanged() : PagerControlPage
  • OnPreviousButtonVisibilityPropertyChanged() : PagerControlProperties , PipsPagerProperties
  • OnPreviousColorChanged() : ColorPicker
  • OnPreviousColorPropertyChanged() : ColorPickerProperties
  • OnPreviousPageButtonVisibilityChanged() : PipsPagerPage
  • OnProfilePicturePropertyChanged() : PersonPictureProperties
  • OnPropertyChanged() : AnnotatedScrollBar , BreadcrumbBar , ColorSpectrum , SpectrumBrush , CommandBarFlyoutCommandBar , InfoBadge , ItemContainer , ItemsView , LayoutPanel , MapControl , MapElementsLayer , MapIcon , MicaBackdrop , RevealBrush , MenuBarItemFlyout , NavigationView , NavigationViewItemBase , DataModelWithINPC , MonochromaticOverlayPresenter , ParallaxView , PersonPicture , PipsPager , RefreshContainer , RefreshVisualizer , RadioButtons , RatingControl , FlowLayout , ItemsRepeater , SelectionModel , StackLayout , Recipe , ActivityFeedLayout , RepeaterItem , GroupedRepeaterItem , TreeViewItem , UniformGridLayout , ScrollPresenter , ScrollView , SelectorBarItem , SplitButton , ToggleSplitButton , SwipeItem , SwipeItems , TeachingTip , TitleBar , TreeView , TreeViewItem , TreeViewNode , TwoPaneView , WebView2 , TeachingTip , SwipeControl , SelectorBar , Flex , LinedFlowLayout , RadioMenuFlyoutItem , PagerControl , AcrylicBrush , XamlControlsResources , ColorPicker
  • OnPullDirectionChanged() : RefreshContainer
  • OnPullDirectionChangedImpl() : RefreshContainer
  • OnPullDirectionPropertyChanged() : RefreshContainerProperties
  • OnRadiusXPropertyChanged() : RadialGradientBrush , RadialGradientBrushProperties
  • OnRadiusYPropertyChanged() : RadialGradientBrush , RadialGradientBrushProperties
  • OnRawDataChanged() : TopNavigationViewDataProvider
  • OnRawDataInsert() : SplitVector< T, SplitVectorID >
  • OnRawDataRemove() : SplitVector< T, SplitVectorID >
  • OnRecipeDeleted() : ItemsViewWithDataPage
  • OnRecipeInserted() : ItemsViewWithDataPage
  • OnRefreshButtonClick() : ItemsViewTransitionPage
  • OnRefreshCompleted() : ScrollViewerIRefreshInfoProviderAdapter , RefreshInfoProviderImplementation , RefreshInfoProviderImpl , IRefreshInfoProvider , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • OnRefreshInfoProviderAdapterChanged() : RefreshContainer
  • OnRefreshInfoProviderAdapterChangedImpl() : RefreshContainer
  • OnRefreshInfoProviderChanged() : RefreshVisualizer
  • OnRefreshStarted() : RefreshInfoProviderImpl , RefreshInfoProviderImplementation , RefreshInfoProviderImpl , IRefreshInfoProvider , ScrollViewerIRefreshInfoProviderAdapter
  • OnRefreshVisualizerChanged() : RefreshContainer
  • OnRefreshVisualizerChangedImpl() : RefreshContainer
  • OnReleaseReference_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnReleaseReference_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnReloadButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_ConcurrentCreationElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemove_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnRemoveAt() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnRendering() : ItemsViewWithDataPage , ItemCollectionTransitionProvider , ItemsViewWithDataPage , final
  • OnRepeaterCollectionChanged() : RadioButtons
  • OnRepeaterElementClearing() : RadioButtons , NavigationView
  • OnRepeaterElementIndexChanged() : RadioButtons
  • OnRepeaterElementPrepared() : NavigationView , RadioButtons
  • OnRepeaterGettingFocus() : NavigationView
  • OnRepeaterGotFocus() : PipsPagerPage
  • OnRepeaterLoaded() : RadioButtons , NavigationView
  • OnReplace() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • OnReplacementColorPropertyChanged() : MonochromaticOverlayPresenterProperties
  • OnResetClick() : SwipeControlPage
  • OnResetCounts_ButtonClicked() : WebView2CoreObjectsPage
  • OnResetInvokeCountClick() : ButtonInteractionPage
  • OnResetItemTransitionProviderButtonClick() : ItemsViewTransitionPage
  • OnResizeMeButtonClick() : ItemsViewWithDataPage
  • OnResizeWebViewVisualButtonClicked() : WebView2BasicPage
  • OnReturnTopForOutOfWindowPlacementCheckBoxChecked() : TeachingTipPage
  • OnReturnTopForOutOfWindowPlacementCheckBoxUnchecked() : TeachingTipPage
  • OnRevealBrushConnected() : MaterialHelperBase
  • OnRevealBrushDisconnected() : MaterialHelperBase
  • OnReverseButtonClicked() : CheckBoxPage
  • OnRgbTextChanging() : ColorPicker
  • OnRichEditBoxClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnRichEditBoxFillWithTextClicked() : TextCommandBarFlyoutPage
  • OnRichEditBoxSelectAllClicked() : TextCommandBarFlyoutPage
  • OnRichEditBoxTextChanged() : ScrollInputHelper
  • OnRichTextBlockClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnRichTextBlockSelectAllClicked() : TextCommandBarFlyoutPage
  • OnRightItemsChanged() : SwipeControl
  • OnRightItemsCollectionChanged() : SwipeControl
  • OnRightItemsPropertyChanged() : SwipeControlProperties
  • OnRootGridKeyDown() : PagerControl
  • OnRowSpacingPropertyChanged() : ColumnMajorUniformToLargestGridLayoutProperties , ColumnMajorUniformToLargestGridLayout
  • OnRowSpacingSliderValueChanged() : ItemsViewWithDataPage
  • OnSaturationTextChanging() : ColorPicker
  • OnScroll() : ScrollBarController
  • OnScrollAnimationStarting() : ScrollView
  • OnScrollBarPropertyChanged() : ScrollBarController
  • OnScrollButtonClicked() : ItemsViewWithDataPage
  • OnScrollByRequested() : CanvasScrollControllerConsumer
  • OnScrollControllerAddScrollVelocityRequested() : ScrollPresenter
  • OnScrollControllerCanScrollChanged() : ScrollView
  • OnScrollControllerIsScrollingWithMouseChanged() : ScrollView
  • OnScrollControllerPanningInfoChanged() : ScrollPresenter
  • OnScrollControllerPanningInfoPanRequested() : ScrollPresenter
  • OnScrollControllerScrollByRequested() : ScrollPresenter
  • OnScrollControllerScrollToRequested() : ScrollPresenter
  • OnScrollDecreaseClick() : TabView
  • OnScrollIncreaseClick() : TabView
  • OnScrollInputHelperInfoChanged() : ParallaxView
  • OnScrollPresenterAnchorRequested() : ScrollView
  • OnScrollPresenterBringingIntoView() : ScrollView
  • OnScrollPresenterExtentChanged() : ScrollView
  • OnScrollPresenterPropertyChanged() : ScrollViewProperties , ScrollInputHelper , ScrollView
  • OnScrollPresenterScrollCompleted() : ScrollView
  • OnScrollPresenterScrollStarting() : ViewportManagerWithPlatformFeatures , ScrollView
  • OnScrollPresenterStateChanged() : ScrollView
  • OnScrollPresenterViewChanged() : ScrollView
  • OnScrollPresenterViewChangeStarting() : ViewportManagerWithPlatformFeatures
  • OnScrollPresenterZoomCompleted() : ScrollView
  • OnScrollPresenterZoomStarting() : ScrollView , ViewportManagerWithPlatformFeatures
  • OnScrollToRequested() : CanvasScrollControllerConsumer
  • OnScrollViewAnchorRequested() : ItemsView
  • OnScrollViewBringingIntoView() : ItemsView
  • OnScrollViewerBringIntoViewRequested() : PipsPager
  • OnScrollViewerContentPropertyChanged() : ScrollInputHelper
  • OnScrollViewerDirectManipulationCompleted() : ScrollInputHelper , ScrollViewerIRefreshInfoProviderAdapter
  • OnScrollViewerDirectManipulationStarted() : ScrollInputHelper
  • OnScrollViewerLoaded() : ScrollViewerIRefreshInfoProviderAdapter , TabView , TwoPaneView
  • OnScrollViewerPropertyChanged() : ScrollInputHelper
  • OnScrollViewerSizeChanged() : ItemsRepeaterScrollHost
  • OnScrollViewerViewChanged() : ItemsRepeaterScrollHost , TabView
  • OnScrollViewerViewChanging() : ItemsRepeaterScrollHost , ScrollViewerIRefreshInfoProviderAdapter
  • OnScrollViewGettingFocus() : ScrollView
  • OnScrollViewIsEnabledChanged() : ScrollView
  • OnScrollViewPointerCanceled() : ScrollView
  • OnScrollViewPointerEntered() : ScrollView
  • OnScrollViewPointerExited() : ScrollView
  • OnScrollViewPointerMoved() : ScrollView
  • OnScrollViewPointerPressed() : ScrollView
  • OnScrollViewPointerReleased() : ScrollView
  • OnScrollViewPropertyChanged() : ItemsViewProperties
  • OnScrollViewScrollCompleted() : ItemsView
  • OnScrollViewUnloaded() : ScrollView
  • OnSecondTabDragStarting() : TabViewPage
  • OnSelectedIndexChanged() : PagerControlPage , PipsPagerPage
  • OnSelectedIndexPropertyChanged() : RadioButtonsProperties , TabView , TabViewProperties , TabViewListView
  • OnSelectedItemLayoutUpdated() : NavigationView
  • OnSelectedItemPropertyChanged() : TabView , NavigationView , NavigationViewProperties , RadioButtonsProperties , SelectorBarProperties , TreeViewProperties , ItemsViewProperties , TabViewProperties
  • OnSelectedPageIndexChange() : PagerControl
  • OnSelectedPageIndexChanged() : PipsPager
  • OnSelectedPageIndexPropertyChanged() : PipsPagerProperties , PagerControlProperties
  • OnSelectedPipStylePropertyChanged() : PipsPagerProperties
  • OnSelectionChanged() : HierarchicalNavigationViewDataBinding , SelectionModel , final , SelectionContainer
  • OnSelectionEllipseFlowDirectionChanged() : ColorSpectrum
  • OnSelectionFollowsFocusPropertyChanged() : NavigationViewProperties
  • OnSelectionInvalidatedDueToCollectionChange() : SelectionModel
  • OnSelectionModeChanged() : ItemsView
  • OnSelectionModelChanged() : SelectionContainer
  • OnselectionModelChanged() : RepeaterItem , GroupedRepeaterItem , TreeViewItem
  • OnSelectionModelChildrenRequested() : NavigationView
  • OnSelectionModelSelectionChanged() : NavigationView , ItemsView
  • OnSelectionModePropertyChanged() : TreeViewProperties , ItemsViewProperties
  • OnSelectTemplateKey() : StoreDemoPage , GroupedSample , BasicDemo , CollectionChangeDemo , ItemTemplateDemo
  • OnSelectTemplateKeyCore() : RecyclingElementFactory , RecyclingElementFactoryDerived
  • OnSetActionButtonContentButtonClicked() : TeachingTipPage
  • OnSetAnimationDurationsButtonClicked() : TeachingTipPage
  • OnSetAnimationParametersButtonClicked() : TeachingTipPage
  • OnSetAutomationNameButtonClicked() : TeachingTipPage
  • OnSetBleeingImagePlacementButtonClicked() : TeachingTipPage
  • OnSetClipboardContentsClicked() : TextCommandBarFlyoutPage
  • OnSetCloseButtonContentButtonClicked() : TeachingTipPage
  • OnSetContentButtonClicked() : TeachingTipPage
  • OnSetCustomSource_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetCustomSource_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetCustomSource_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetHeroContentButtonClicked() : TeachingTipPage
  • OnSetIconButtonClicked() : TeachingTipPage
  • OnSetIsLightDismissEnabledButtonClicked() : TeachingTipPage
  • OnSetPlacementMarginButtonClicked() : TeachingTipPage
  • OnSetPreferredPlacementButtonClicked() : TeachingTipPage
  • OnSetScrollViewerOffsetButtonClicked() : TeachingTipPage
  • OnSetShouldConstrainToRootBoundsButtonClicked() : TeachingTipPage
  • OnSetSource_LiveElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetSource_MarkupElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetSource_OfflineElement_ButtonClicked() : WebView2CoreObjectsPage
  • OnSetSourceButtonClicked() : WebView2BasicPage
  • OnSetSubtitleButtonClicked() : TeachingTipPage
  • OnSetTailVisibilityButtonClicked() : TeachingTipPage
  • OnSetTargetButtonClicked() : TeachingTipPage
  • OnSetTargetHorizontalAlignmentButtonClicked() : TeachingTipPage
  • OnSetTargetVerticalAlignmentButtonClicked() : TeachingTipPage
  • OnSettingsInvoked() : NavigationView
  • OnSettingsItemPropertyChanged() : NavigationViewProperties
  • OnSetTipLocationButton() : TeachingTipPage
  • OnSetTitleButtonClicked() : TeachingTipPage
  • OnSeverityPropertyChanged() : InfoBar , InfoBarProperties
  • OnShapeChanged() : ColorSpectrum
  • OnShapePropertyChanged() : ColorSpectrumProperties
  • OnShouldConstrainToRootBoundsChanged() : TeachingTip
  • OnShouldConstrainToRootBoundsPropertyChanged() : TeachingTipProperties
  • OnShoulderNavigationEnabledPropertyChanged() : NavigationViewProperties
  • OnShowAfterDelayButtonClicked() : TeachingTipPage
  • OnShowButtonClicked() : TeachingTipPage
  • OnShowButtonClickedRightEdge() : TeachingTipPage
  • OnShowErrorPropertyChanged() : ProgressBarProperties , ProgressBar
  • OnShowPausedPropertyChanged() : ProgressBarProperties , ProgressBar
  • OnShowStandardTextControlFlyoutOnPasswordBoxClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnRichEditBoxClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnRichTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowStandardTextControlFlyoutOnTextBoxClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnPasswordBoxClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnRichEditBoxClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnRichTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnTextBlockClicked() : TextCommandBarFlyoutPage
  • OnShowTextControlFlyoutOnTextBoxClicked() : TextCommandBarFlyoutPage
  • OnSizeChanged() : TwoPaneView , AnnotatedScrollBar , PersonPicture , ProgressBar , ProgressRing , TabViewItem , TitleBar , InfoBadge , SwipeControl , NavigationView , ParallaxView
  • onSliderPointerPressed() : RefreshInfoProviderImplementation
  • onSliderPointerReleased() : RefreshInfoProviderImplementation
  • onSliderValueChanged() : RefreshInfoProviderImplementation
  • OnSmallChangePropertyChanged() : AnnotatedScrollBarProperties , NumberBox , NumberBoxProperties
  • OnSortAscClick() : SortingAndFilteringPage
  • OnSortDesClick() : SortingAndFilteringPage
  • OnSource_Ensure_ButtonClicked() : WebView2CoreObjectsPage
  • OnSource_Source_ButtonClicked() : WebView2CoreObjectsPage
  • OnSourceChanged() : WebView2
  • OnSourceContentSizeChanged() : ScrollInputHelper
  • OnSourceElementChanged() : ScrollInputHelper
  • OnSourceElementLoaded() : ScrollInputHelper
  • OnSourceElementPropertyChanged() : ScrollInputHelper , MonochromaticOverlayPresenterProperties
  • OnSourceInfoChanged() : ScrollInputHelper
  • OnSourceListChanged() : ItemsView , final
  • OnSourcePropertyChanged() : AnimatedVisualPlayerProperties , AnimatedVisualPlayer , ParallaxViewProperties , AnimatedIcon , WebView2Properties , ImageIcon , ImageIconProperties , AnimatedIconProperties
  • OnSourceSizeChanged() : ScrollInputHelper
  • OnSpacingPropertyChanged() : StackLayoutProperties
  • OnSpinButtonPlacementModePropertyChanged() : NumberBoxProperties , NumberBox
  • OnSpinDownClick() : NumberBox
  • OnSpinUpClick() : NumberBox
  • OnSplitButtonKeyDown() : SplitButton
  • OnSplitButtonKeyUp() : SplitButton
  • OnSplitViewClosedCompactChanged() : NavigationView
  • OnSplitViewPaneClosed() : NavigationView
  • OnSplitViewPaneClosing() : NavigationView
  • OnSplitViewPaneOpened() : NavigationView
  • OnSplitViewPaneOpening() : NavigationView
  • OnSplitViewPropertyChanged() : NavigationViewItemHeader , NavigationViewItemSeparator , NavigationViewItem
  • OnSpreadMethodPropertyChanged() : RadialGradientBrushProperties , RadialGradientBrush
  • OnStateChanged() : RefreshVisualizer
  • OnStatePropertyChanged() : AnimatedIcon , RefreshVisualizerProperties , RevealBrush
  • OnStretchPropertyChanged() : AnimatedVisualPlayer , AnimatedVisualPlayerProperties
  • OnSubtitlePropertyChanged() : TitleBarProperties , TeachingTipProperties
  • OnSuffixTextPropertyChanged() : PagerControlProperties
  • OnSwipeContentStackPanelSizeChanged() : SwipeControl
  • OnSwitchTargetButtonClicked() : TeachingTipPage
  • OnSystemBackdropPropertyChanged() : CommandBarFlyoutCommandBarProperties
  • OnTabDragCompleted() : TabViewItem
  • OnTabDragStarting() : TabViewItem , TabViewPage
  • OnTabItemsSourcePropertyChanged() : TabViewProperties , TabView
  • OnTabStripDragOver() : TabViewPage
  • OnTabStripDrop() : TabViewPage
  • OnTabStripPointerEntered() : TabView
  • OnTabStripPointerExited() : TabView
  • OnTabTearOutRequested() : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • OnTabTearOutWindowRequested() : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • OnTabViewWidthModeChanged() : TabViewItem
  • OnTabWidthModePropertyChanged() : TabView , TabViewProperties
  • OnTailVisibilityChanged() : TeachingTip
  • OnTailVisibilityPropertyChanged() : TeachingTipProperties
  • OnTallModeConfigurationPropertyChanged() : TwoPaneViewProperties
  • OnTapped() : ItemContainer
  • OnTargetChanged() : TeachingTip
  • OnTargetConnected() : DesktopAcrylicBackdrop , MicaBackdrop
  • OnTargetDisconnected() : MicaBackdrop , DesktopAcrylicBackdrop
  • OnTargetElementChanged() : ScrollInputHelper
  • OnTargetElementInvoked() : ButtonInteractionPage
  • OnTargetElementLoaded() : ScrollInputHelper
  • OnTargetLayoutUpdated() : TeachingTip
  • OnTargetLoaded() : TeachingTip
  • OnTargetPropertyChanged() : TeachingTipProperties
  • OnTargetThemeChanged() : RevealBrush
  • OnTargetThemePropertyChanged() : RevealBrushProperties
  • OnTeachingTipActionButtonClicked() : TeachingTipPage
  • OnTeachingTipCloseButtonClicked() : TeachingTipPage
  • OnTeachingTipClosed() : TeachingTipPage
  • OnTeachingTipClosing() : TeachingTipPage
  • OnTemplateSettingsPropertyChanged() : TeachingTipProperties , PagerControlProperties , PersonPictureProperties , InfoBadgeProperties , TitleBarProperties , PipsPagerProperties
  • OnTextBlockClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnTextBlockSelectAllClicked() : TextCommandBarFlyoutPage
  • OnTextBoxClearSelectionClicked() : TextCommandBarFlyoutPage
  • OnTextBoxFillWithTextClicked() : TextCommandBarFlyoutPage
  • OnTextBoxGotFocus() : ColorPicker
  • OnTextBoxLoaded() : NumberBox
  • OnTextBoxLostFocus() : ColorPicker
  • OnTextBoxSelectAllClicked() : TextCommandBarFlyoutPage
  • OnTextCommandBarFlyoutTestsClicked() : CommandBarFlyoutMainPage
  • OnTextPropertyChanged() : SelectorBarItemProperties , NumberBox , SwipeItemProperties , NumberBoxProperties
  • OnTextScaleFactorChanged() : RatingControl
  • OnThirdDimensionSliderValueChanged() : ColorPicker
  • OnTintColorPropertyChanged() : AcrylicBrushProperties
  • OnTintLuminosityOpacityPropertyChanged() : AcrylicBrushProperties
  • OnTintOpacityPropertyChanged() : AcrylicBrushProperties
  • OnTintTransitionDurationPropertyChanged() : AcrylicBrushProperties
  • OnTipFollowsTargetCheckBoxChecked() : TeachingTipPage
  • OnTipFollowsTargetCheckBoxUnchecked() : TeachingTipPage
  • OnTipShadowChecked() : TeachingTipPage
  • OnTipShadowUnchecked() : TeachingTipPage
  • OnTitleBarIsVisibleChanged() : NavigationView
  • OnTitleBarMetricsChanged() : NavigationView
  • OnTitlePropertyChanged() : InfoBarProperties , InfoBar , TitleBarProperties , TeachingTipProperties
  • OnToggleWebViewVisibilityButtonClicked() : WebView2BasicPage
  • OnTopItemsChanged() : SwipeControl
  • OnTopItemsCollectionChanged() : SwipeControl
  • OnTopItemsPropertyChanged() : SwipeControlProperties
  • OnTopNavDataSourceChanged() : NavigationView
  • OnTransitionProviderChanged() : final , ItemsRepeater
  • OnTransitionProviderTransitionCompleted() : final , ItemsViewTransitionPage
  • OnTreeViewClicked() : GroupedSample
  • OnUISettingsChanged() : MaterialHelper
  • OnUncheckedIsSettingsVisible() : HierarchicalNavigationViewMarkup
  • OnUnhiding() : AnimatedVisualPlayer::final , AnimatedVisualPlayer
  • OnUnloaded() : ColorPicker , ColorSpectrum , InkCanvas , WebView2 , TabView , ItemsView , AnimatedVisualPlayer , ScrollPresenter , ItemsRepeater , NavigationView , PersonPicture , WebView2CoreObjectsPage , RadioMenuFlyoutItem
  • OnUntargetButtonClicked() : TeachingTipPage
  • OnUpdateViewport() : ScrollSnapPointBase , SnapPointBase , ZoomSnapPointBase
  • OnUseCompactResourcesPropertyChanged() : XamlControlsResourcesProperties
  • OnUseTestScreenBoundsCheckBoxUnchecked() : TeachingTipPage
  • OnUseTestSreenBoundsCheckBoxChecked() : TeachingTipPage
  • OnUseTestWindowBoundsCheckBoxChecked() : TeachingTipPage
  • OnUseTestWindowBoundsCheckBoxUnchecked() : TeachingTipPage
  • OnValidationModePropertyChanged() : NumberBoxProperties , NumberBox
  • OnValueChanged() : RatingControl
  • OnValueChangedEvent() : ColorPickerSlider
  • OnValuePropertyChanged() : RatingControlProperties , NumberBoxProperties , InfoBadgeProperties , ProgressRingProperties , ProgressRing , NumberBox
  • OnValueTextChanging() : ColorPicker
  • OnVectorChanged() : InspectingDataSource
  • OnVerticalAnchorRatioPropertyChanged() : ScrollViewProperties , ScrollPresenterProperties
  • OnVerticalCacheLengthPropertyChanged() : ItemsRepeaterProperties
  • OnVerticalGridPointerCanceled() : AnnotatedScrollBar
  • OnVerticalGridPointerCaptureLost() : AnnotatedScrollBar
  • OnVerticalGridPointerEntered() : AnnotatedScrollBar
  • OnVerticalGridPointerExited() : AnnotatedScrollBar
  • OnVerticalGridPointerMoved() : AnnotatedScrollBar
  • OnVerticalGridPointerPressed() : AnnotatedScrollBar
  • OnVerticalGridPointerReleased() : AnnotatedScrollBar
  • OnVerticalScrollBarVisibilityPropertyChanged() : ScrollViewProperties
  • OnVerticalScrollChainModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnVerticalScrollControllerChanged() : ItemsView
  • OnVerticalScrollControllerPointerEntered() : ScrollView
  • OnVerticalScrollControllerPointerExited() : ScrollView
  • OnVerticalScrollControllerPropertyChanged() : ItemsViewProperties
  • OnVerticalScrollModePropertyChanged() : ScrollViewProperties , ScrollPresenterProperties
  • OnVerticalScrollRailModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnVerticalShiftPropertyChanged() : ParallaxViewProperties
  • OnVerticalSnapPointsVectorChanged() : ScrollPresenter
  • OnVerticalSourceEndOffsetPropertyChanged() : ParallaxViewProperties
  • OnVerticalSourceOffsetKindPropertyChanged() : ParallaxViewProperties
  • OnVerticalSourceStartOffsetPropertyChanged() : ParallaxViewProperties
  • OnVideoButtonClicked() : WebView2BasicPage
  • OnViewChanged() : ScrollPresenter , PipsPagerExamples
  • OnViewportChanged() : ViewportManagerDownLevel
  • OnVisibilityPropertyChanged() : ProgressBar , WebView2
  • OnVisualizerPropertyChanged() : RefreshContainerProperties
  • OnVisualizerRefreshRequested() : RefreshContainer
  • OnVisualizerSizeChanged() : RefreshContainer
  • OnVisualPropertyChanged() : SplitButton , MenuBarItem , BreadcrumbBarItem
  • OnWebMessageReceived() : WebView2BasicPage
  • OnWideModeConfigurationPropertyChanged() : TwoPaneViewProperties
  • OnWindowRectChanging() : TabView
  • OnWrapModeChanged() : PipsPager , PipsPagerPage
  • OnWrapModePropertyChanged() : PipsPagerProperties
  • OnXamlPointerMessage() : WebView2
  • OnXamlRootChanged() : TwoPaneView
  • OnZoomAnimationStarting() : ScrollView
  • OnZoomChainModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnZoomLevelPropertyChanged() : MapControlProperties
  • OnZoomModePropertyChanged() : ScrollPresenterProperties , ScrollViewProperties
  • OnZoomSnapPointsVectorChanged() : ScrollPresenter
  • Opacity() : IOpacityEffect
  • Opacity0ScalarAnimation_0_to_1() : AnimatedVisual
  • Opacity0ScalarAnimation_1_to_0() : AnimatedVisual
  • OpacityScalarAnimation_1_to_1_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OpacityScalarAnimation_1_to_1_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • OpenAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OpenAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OpenAnimationKind() : CommandBarFlyoutCommandBar
  • OpenAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OpenAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OpenCloseAppBarsButton_Click() : CommandBarPage
  • OpenedStatusChanged() : SwipeTestHooks , TeachingTipTestHooks , SwipeTestHooks , TeachingTipTestHooks
  • OpenFlyout() : DropDownButton , BreadcrumbBarItem , SplitButton , CommandBarFlyoutTests
  • OpenFlyoutFrom() : MenuBarItem
  • OpenFlyoutOn() : TextCommandBarFlyoutTests
  • OpenOverflowMenuAndInvokeItem() : NavigationViewTestsBase
  • OpenPane() : NavigationView
  • OpenPaneButton_Click() : NavigationViewRS4Page , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewTopNavPage
  • OpenPaneLength() : NavigationViewProperties , NavigationViewTemplateSettingsProperties
  • OpenPaneLength_SelectionChanged() : NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewCompactPaneLengthTestPage , NavigationViewTopNavPage , NavigationViewPage
  • OpenPaneLengthProperty() : NavigationViewProperties , NavigationViewTemplateSettingsProperties
  • OpenTeachingTip() : TeachingTipTests
  • OpenTeachingTipButton_Click() : TeachingTipFocusPage , TeachingTipInXamlPage
  • Operation() : ItemCollectionTransition
  • OperationInfo()
: CompositionScrollController::OperationInfo
, BiDirectionalScrollController::OperationInfo
  • operator bool() : PropertyChanged_revoker , event_base< ImplT, T, StorageT > , GlobalDependencyProperty , sealed< T, fallback, RawStorageT > , ScopedBatchCompleted_revoker , RoutedEventHandler_revoker , XamlRootChanged_revoker
  • operator class_type() : ElementFactoryRecycleArgsDownlevel , ElementFactoryGetArgsDownlevel
  • operator T() : auto_unbox , auto_cast
  • operator THandleType() : AutoHandle< THandlePolicy >
  • operator winrt::DependencyProperty() : GlobalDependencyProperty
  • operator!=() : sealed< T, fallback, RawStorageT > , AutoHandle< THandlePolicy >
  • operator&() : AutoHandle< THandlePolicy >
  • operator()() : SnapPointWrapperComparator< T > , event_base< ImplT, T, StorageT >
  • operator*() : MutexLockedResource< T >
  • operator->() : MutexLockedResource< T >
  • operator<() : SnapPointBase
  • operator=() : AutoHandle< THandlePolicy > , sealed< T, fallback, RawStorageT > , GlobalDependencyProperty , PerfXamlEvent_RAII , XamlRootChanged_revoker , PerfXamlEvent_RAII , ScopedBatchCompleted_revoker , RoutedEventHandler_revoker , AutoHandle< THandlePolicy > , PropertyChanged_revoker , ScopedBatchCompleted_revoker , DesktopAcrylicBackdrop::ControllerEntry , SimpleXamlStartStopEvent_RAII , sealed< T, fallback, RawStorageT > , event_base< ImplT, T, StorageT > , GlobalDependencyProperty , XamlRootChanged_revoker , GlobalDependencyProperty , SimpleXamlStartStopEvent_RAII , MicaBackdrop::ControllerEntry , AutoHandle< THandlePolicy > , PropertyChanged_revoker , AutoHandle< THandlePolicy > , RoutedEventHandler_revoker
  • operator==() : sealed< T, fallback, RawStorageT > , GlobalDependencyProperty , AutoHandle< THandlePolicy > , sealed< T, fallback, RawStorageT > , IndexRange , AutoHandle< THandlePolicy > , SnapPointBase , GlobalDependencyProperty
  • operator[]() : enum_vector< E, T > , enum_array< E, T, N > , enum_vector< E, T >
  • Optimization() : IGaussianBlurEffect
  • Options() : ScrollControllerScrollToRequestedEventArgs , ScrollControllerScrollByRequestedEventArgs , ViewChange
  • Orientation() : ColorPickerProperties , SliderInteraction , InkToolBarProperties , RefreshVisualizerProperties , StackLayoutProperties , InkToolBar , UniformGridLayoutProperties , PipsPagerProperties , UniformGridLayoutProperties , InkToolBarProperties , SliderInteraction , FlowLayoutProperties , RefreshVisualizerProperties , FlowLayoutProperties , PipsPagerProperties
  • OrientationBasedMeasures() : OrientationBasedMeasures
  • OrientationChangeTest() : PipsPagerTests
  • OrientationComboBox_SelectionChanged() : ColorPickerPage , RefreshVisualizerPage
  • OrientationProperty() : PipsPagerProperties , RefreshVisualizerProperties , FlowLayoutProperties , InkToolBarProperties , UniformGridLayoutProperties , StackLayoutProperties , ColorPickerProperties
  • OriginalSource() : ItemContainerInvokedEventArgs
  • OtherPlacementTopRightHighlightMargin() : TeachingTip
  • OverflowButtonVisibility() : NavigationViewTemplateSettingsProperties
  • OverflowButtonVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • OverflowButtonWidth() : TopNavigationViewDataProvider
  • OverflowContentClipRect() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OverflowContentClipRectProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • OverflowContentRoot_SizeChanged() : CommandBarFlyoutPage
  • OverflowLabelMode() : NavigationViewProperties
  • OverflowLabelModeProperty() : NavigationViewProperties
  • OverlappingRepeatedSnapPointsThrow() : ScrollPresenterTests
  • Overlay_PointerPressed() : AcrylicBrushPage
  • OverpanWithAnchoredSkrinkingContent() : ScrollPresenterTestsWithInputHelper
  • OverpanWithAnchoredSkrinkingContentVert() : ScrollPresenterTestsWithInputHelper
  • Owner() : SelectTemplateEventArgs , VirtualizationInfo , RecyclePool::ElementInfo
  • OwningProvider() : ItemCollectionTransition
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- z -

  • Zoom() : ScrollPresenterDynamicPage
  • ZoomAnimationStarting() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • ZoomBy() : ScrollPresenter , ScrollView , ScrollPresenterTests , ScrollPresenter
  • ZoomChainMode() : ScrollPresenterProperties , ScrollViewProperties
  • ZoomChainModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • ZoomCompleted() : ScrollPresenterProperties , ScrollViewProperties
  • ZoomedHorizontalOffset() : OffsetsChange
  • ZoomedVerticalOffset() : OffsetsChange
  • ZoomFactor() : ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs , ScrollPresenter , ZoomFactorChange , ScrollView
  • ZoomFactorChange() : ZoomFactorChange
  • ZoomFactorChangeCorrelationId() : ScrollingZoomCompletedEventArgs
  • ZoomFactorChangeWithAdditionalVelocity() : ZoomFactorChangeWithAdditionalVelocity
  • ZoomFactorChangeWithCustomDuration() : ScrollPresenterTests
  • ZoomFactorChangeWithNoContent() : ScrollPresenterTests
  • ZoomFactorVelocity() : ZoomFactorChangeWithAdditionalVelocity
  • ZoomLevel() : MapControlProperties
  • ZoomLevelProperty() : MapControlProperties
  • ZoomMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • ZoomModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • ZoomSnapPoint() : ZoomSnapPoint
  • ZoomSnapPointBase() : ZoomSnapPointBase
  • ZoomSnapPoints() : ScrollPresenter
  • ZoomStarting() : ScrollViewProperties , ScrollPresenterProperties
  • ZoomTo() : ScrollPresenter , ScrollView , ScrollPresenterTests
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- ~ -

  • ~AcrylicBrush() : AcrylicBrush
  • ~AnimatedIcon() : AnimatedIcon
  • ~AnimatedVisualPlayer() : AnimatedVisualPlayer
  • ~AnnotatedScrollBar() : AnnotatedScrollBar
  • ~AnnotatedScrollBarIScrollControllerPage() : AnnotatedScrollBarIScrollControllerPage
  • ~AnnotatedScrollBarPanningInfo() : AnnotatedScrollBarPanningInfo
  • ~AnnotatedScrollBarRangeBasePage() : AnnotatedScrollBarRangeBasePage
  • ~AnnotatedScrollBarSummaryPage() : AnnotatedScrollBarSummaryPage
  • ~AutoHandle() : AutoHandle< THandlePolicy >
  • ~BreadcrumbBar() : BreadcrumbBar
  • ~BreadcrumbBarItem() : BreadcrumbBarItem
  • ~BreadcrumbLayout() : BreadcrumbLayout
  • ~BringIntoViewOffsetsChange() : BringIntoViewOffsetsChange
  • ~CMethodProfileGroup() : CMethodProfileGroup< size >
  • ~CommandBarFlyout() : CommandBarFlyout
  • ~CommandBarFlyoutCommandBar() : CommandBarFlyoutCommandBar
  • ~ControllerEntry()
: DesktopAcrylicBackdrop::ControllerEntry
, MicaBackdrop::ControllerEntry
  • ~DesktopAcrylicBackdrop() : DesktopAcrylicBackdrop
  • ~DisposableUserControl() : DisposableUserControl
  • ~event_base() : event_base< ImplT, T, StorageT >
  • ~Expander() : Expander
  • ~ExtendedSelector() : ExtendedSelector
  • ~IFlowLayoutAlgorithmDelegates() : IFlowLayoutAlgorithmDelegates
  • ~ImageIcon() : ImageIcon
  • ~InfoBadge() : InfoBadge
  • ~InfoBar() : InfoBar
  • ~InkCanvas() : InkCanvas
  • ~InteractionTrackerAsyncOperation() : InteractionTrackerAsyncOperation
  • ~InteractionTrackerOwner() : InteractionTrackerOwner
  • ~ItemCollectionTransitionProvider() : ItemCollectionTransitionProvider
  • ~ItemContainer() : ItemContainer
  • ~ItemsView() : ItemsView
  • ~ItemsViewIntegrationPage() : ItemsViewIntegrationPage
  • ~ItemsViewItemInvokedEventArgs() : ItemsViewItemInvokedEventArgs
  • ~ItemsViewSummaryPage() : ItemsViewSummaryPage
  • ~Iterator()
: SelectedItems< T >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
  • ~KeyboardNavigationSample() : KeyboardNavigationSample
  • ~LifetimeHandler() : LifetimeHandler
  • ~LinedFlowLayout() : LinedFlowLayout
  • ~LinedFlowLayoutDemo() : LinedFlowLayoutDemo
  • ~LinedFlowLayoutItemsInfoRequestedEventArgs() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ~MaterialHelper() : MaterialHelper
  • ~MenuBarItem() : MenuBarItem
  • ~MicaBackdrop() : MicaBackdrop
  • ~MonochromaticOverlayPresenter() : MonochromaticOverlayPresenter
  • ~MultipleSelector() : MultipleSelector
  • ~MutexLockedResource() : MutexLockedResource< T >
  • ~NavigationView() : NavigationView
  • ~NullSelector() : NullSelector
  • ~ObjectModelTestPage() : ObjectModelTestPage
  • ~OffsetsChange() : OffsetsChange
  • ~OffsetsChangeWithAdditionalVelocity() : OffsetsChangeWithAdditionalVelocity
  • ~PagerControl() : PagerControl
  • ~ParallaxView() : ParallaxView
  • ~PerfXamlEvent_RAII() : PerfXamlEvent_RAII
  • ~PointerInfo() : PointerInfo< T >
  • ~PropertyChanged_revoker() : PropertyChanged_revoker
  • ~RadialGradientBrush() : RadialGradientBrush
  • ~RadioButtons() : RadioButtons
  • ~RatingControl() : RatingControl
  • ~RefreshContainer() : RefreshContainer
  • ~RefreshInfoProviderImpl() : RefreshInfoProviderImpl
  • ~RefreshVisualizer() : RefreshVisualizer
  • ~RevealBrush() : RevealBrush
  • ~RoutedEventHandler_revoker() : RoutedEventHandler_revoker
  • ~ScopedBatchCompleted_revoker() : ScopedBatchCompleted_revoker
  • ~ScrollBarController() : ScrollBarController
  • ~ScrollControllerAddScrollVelocityRequestedEventArgs() : ScrollControllerAddScrollVelocityRequestedEventArgs
  • ~ScrollControllerPanRequestedEventArgs() : ScrollControllerPanRequestedEventArgs
  • ~ScrollControllerScrollByRequestedEventArgs() : ScrollControllerScrollByRequestedEventArgs
  • ~ScrollControllerScrollToRequestedEventArgs() : ScrollControllerScrollToRequestedEventArgs
  • ~ScrollingAnchorRequestedEventArgs() : ScrollingAnchorRequestedEventArgs
  • ~ScrollingBringingIntoViewEventArgs() : ScrollingBringingIntoViewEventArgs
  • ~ScrollingScrollAnimationStartingEventArgs() : ScrollingScrollAnimationStartingEventArgs
  • ~ScrollingScrollCompletedEventArgs() : ScrollingScrollCompletedEventArgs
  • ~ScrollingScrollOptions() : ScrollingScrollOptions
  • ~ScrollingScrollStartingEventArgs() : ScrollingScrollStartingEventArgs
  • ~ScrollingZoomAnimationStartingEventArgs() : ScrollingZoomAnimationStartingEventArgs
  • ~ScrollingZoomCompletedEventArgs() : ScrollingZoomCompletedEventArgs
  • ~ScrollingZoomOptions() : ScrollingZoomOptions
  • ~ScrollingZoomStartingEventArgs() : ScrollingZoomStartingEventArgs
  • ~ScrollInputHelper() : ScrollInputHelper
  • ~ScrollPresenter() : ScrollPresenter
  • ~ScrollPresenterAutomationPeer() : ScrollPresenterAutomationPeer
  • ~ScrollPresenterChainingAndRailingPage() : ScrollPresenterChainingAndRailingPage
  • ~ScrollPresenterDynamicPage() : ScrollPresenterDynamicPage
  • ~ScrollPresenterExpressionAnimationSourcesPage() : ScrollPresenterExpressionAnimationSourcesPage
  • ~ScrollPresenterManipulationModePage() : ScrollPresenterManipulationModePage
  • ~ScrollPresentersWithSimpleContentsPage() : ScrollPresentersWithSimpleContentsPage
  • ~ScrollView() : ScrollView
  • ~ScrollViewBlankPage() : ScrollViewBlankPage
  • ~ScrollViewBringIntoViewOperation() : ScrollViewBringIntoViewOperation
  • ~ScrollViewBringIntoViewPage() : ScrollViewBringIntoViewPage
  • ~ScrollViewDynamicPage() : ScrollViewDynamicPage
  • ~ScrollViewerIRefreshInfoProviderAdapter() : ScrollViewerIRefreshInfoProviderAdapter
  • ~ScrollViewerIRefreshInfoProviderDefaultAnimationHandler() : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • ~ScrollViewerPage() : ScrollViewerPage
  • ~ScrollViewKeyboardAndGamepadNavigationPage() : ScrollViewKeyboardAndGamepadNavigationPage
  • ~ScrollViewsWithSimpleContentsPage() : ScrollViewsWithSimpleContentsPage
  • ~ScrollViewWithScrollControllersPage() : ScrollViewWithScrollControllersPage
  • ~SelectedItems() : SelectedItems< T >
  • ~SelectionModel() : SelectionModel
  • ~SelectionNode() : final
  • ~SelectorBar() : SelectorBar
  • ~SelectorBarItem() : SelectorBarItem
  • ~SelectorBarSamplePage() : SelectorBarSamplePage
  • ~SelectorBarSummaryPage() : SelectorBarSummaryPage
  • ~SelectorBase() : SelectorBase
  • ~SingleSelector() : SingleSelector
  • ~SwipeControl() : SwipeControl
  • ~SwipeControlInteractionTrackerOwner() : SwipeControlInteractionTrackerOwner
  • ~TabView() : TabView
  • ~TargetData() : InkCanvas::TargetData
  • ~TitleBar() : TitleBar
  • ~tracker_ref() : sealed< T, fallback, RawStorageT >
  • ~TreeViewItem() : TreeViewItem
  • ~UniformGridLayoutDemo() : UniformGridLayoutDemo
  • ~VariableSizedItemsPage() : VariableSizedItemsPage
  • ~ViewChange() : ViewChange
  • ~ViewModel() : ViewModel
  • ~WebView2() : WebView2
  • ~WebView2_TryCompleteInitialization_RAII() : WebView2_TryCompleteInitialization_RAII
  • ~XamlRootChanged_revoker() : XamlRootChanged_revoker
  • ~ZoomFactorChange() : ZoomFactorChange
  • ~ZoomFactorChangeWithAdditionalVelocity() : ZoomFactorChangeWithAdditionalVelocity
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- a -

  • abi_enter() : ReferenceTracker< D, ImplT, I >
  • AcceptsExpression() : NumberBoxProperties
  • AcceptsExpressionProperty() : NumberBoxProperties
  • AccessibilityTest() : AnimatedVisualPlayerTests , DropDownButtonTests , SplitButtonTests
  • AccessibilityViewTest() : InfoBarTests
  • AccessKeys() : RadioButtonsTests
  • AccessKeyTest() : WebView2Tests
  • AccTypeTest() : CommonTests
  • AcrylicAlwaysUseFallback() : AcrylicBrushTests
  • AcrylicBrush() : AcrylicBrush , AcrylicTestApi
  • AcrylicBrushBasicPage() : AcrylicBrushBasicPage
  • AcrylicBrushFactory() : AcrylicBrushFactory
  • AcrylicBrushLuminosityTestPage() : AcrylicBrushLuminosityTestPage
  • AcrylicBrushPage() : AcrylicBrushPage
  • AcrylicBrushProperties() : AcrylicBrushProperties
  • AcrylicColorPage() : AcrylicColorPage
  • AcrylicCreatedInFallbackMode() : AcrylicBrushTests
  • AcrylicFromMarkup() : AcrylicBrushTests
  • AcrylicMarkupPage() : AcrylicMarkupPage
  • AcrylicNoiseCache() : AcrylicBrushTests
  • AcrylicPage() : AcrylicPage
  • AcrylicPropertyChanges() : AcrylicBrushTests
  • AcrylicRendering() : AcrylicBrushTests
  • AcrylicRendering_AcrylicOnComplexTransparentBG() : AcrylicBrushTests
  • AcrylicRendering_LuminosityBlend() : AcrylicBrushTests
  • AcrylicRenderingPage() : AcrylicRenderingPage
  • ActionButton() : InfoBarProperties
  • ActionButton_Click() : InfoBarPage
  • ActionButtonClick() : TeachingTipProperties
  • ActionButtonComboBox_SelectionChanged() : InfoBarPage
  • ActionButtonCommand() : TeachingTipProperties
  • ActionButtonCommandParameter() : TeachingTipProperties
  • ActionButtonCommandParameterProperty() : TeachingTipProperties
  • ActionButtonCommandProperty() : TeachingTipProperties
  • ActionButtonContent() : TeachingTipProperties
  • ActionButtonContentProperty() : TeachingTipProperties
  • ActionButtonProperty() : InfoBarProperties
  • ActionButtonStyle() : TeachingTipProperties
  • ActionButtonStyleProperty() : TeachingTipProperties
  • ActivateInstance() : XamlTypeBase , ItemsSourceViewFactory
  • ActiveTool() : InkToolBarProperties , InkToolBar
  • ActiveToolChanged() : InkToolBarProperties
  • ActiveToolProperty() : InkToolBarProperties
  • ActivityFeedSamplePage() : ActivityFeedSamplePage
  • ActualApplicableZone() : SnapPointWrapper< T >
  • ActualEnd() : RepeatedScrollSnapPoint
  • ActualImageBrush() : PersonPictureTemplateSettingsProperties
  • ActualImageBrushProperty() : PersonPictureTemplateSettingsProperties
  • ActualInitials() : PersonPictureTemplateSettingsProperties
  • ActualInitialsProperty() : PersonPictureTemplateSettingsProperties
  • ActualLineHeight() : LinedFlowLayoutProperties
  • ActualLineHeightProperty() : LinedFlowLayoutProperties
  • ActualOffset() : RepeatedScrollSnapPoint
  • ActualRatingFontSize() : RatingControl
  • ActualStart() : RepeatedScrollSnapPoint
  • ActualValue() : ScrollSnapPoint
  • Adapt() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter
  • adapt() : SliderRefreshInfoProviderAdapter
  • AdaptButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • AdaptFromTree() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter , IRefreshInfoProviderAdapter
  • AdaptFromTreeRecursiveHelper() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter
  • AdaptOnNullThrows() : ScrollViewerAdapterTests
  • AdaptOnSV() : ScrollViewerAdapterTests
  • AdaptOnSVWithNonUIElementContentThrows() : ScrollViewerAdapterTests
  • AdaptOnSVWithoutContentThrows() : ScrollViewerAdapterTests
  • AdaptOnSVWithoutWaitingForLoaded() : ScrollViewerAdapterTests
  • AdaptOnSVWithoutWaitingForLoaded_Click() : ScrollViewerAdapterPage
  • Add() : CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , final , MyCollection , final
  • add() : event_base< ImplT, T, StorageT >
  • AddAndSelectSubMenuItem() : HierarchicalNavigationViewDataBinding
  • AddBackRevealButton_Click() : RevealRegressionTestsPage
  • AddButton_Click() : NavigationViewInitPage , NavigationViewTopNavStorePage
  • AddButtonClick() : TabViewPage , TabViewTabClosingBehaviorPage
  • AddButtonSuppressSelection_Click() : NavigationViewTopNavStorePage
  • AddButtonTest() : TabViewTests
  • AddChild() : LinedFlowLayoutDemo
  • AddChildItemToMI19() : HierarchicalNavigationViewMarkup
  • AddDPMember() : XamlTypeBase
  • AddDropShadow() : CommandBarFlyout
  • AddedItems() : TreeViewSelectionChangedEventArgs
  • AddEventHandler() : ObservableTraits< T, true, isBindable > , ObservableVectorInnerImpl< VectorOptions, Wrapper >
  • AddExpandedChanged() : TreeViewNode
  • AddExtraNodes_Click() : TreeViewPage
  • AddFlyoutItem_Click() : MenuBarPage
  • AddFlyoutTimer_Tick() : CommandBarFlyoutPage
  • AddFooterButton_Click() : NavigationViewInitPage
  • AddFooterItemButton_Click() : NavigationViewPage , PaneLayoutTestPage , NavigationViewTopNavPage
  • AddGradientStop() : ColorPicker
  • AddGradientStopButton_Click() : RadialGradientBrushPage
  • AddGradientStopTest() : RadialGradientBrushTests
  • AddHostObjectToScript() : ICoreWebView2Interop
  • AddHostObjectToScriptTest() : WebView2Tests
  • AddInfoBarClick() : InfoBarPage
  • AddingAnimatedIconToGridWithoutAStateDoesNotPropogateState() : AnimatedIconTests
  • AddInheritedTreeViewNode_Click() : TreeViewPage
  • AddItem4Button_Click() : NavigationViewTopNavOverflowButtonPage
  • AddItemButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • AddItemsAndCompressBreadcrumbTest() : BreadcrumbTests
  • AddItemsAndInvokeBreadcrumbBarItemTest() : BreadcrumbTests
  • AdditionalGridDoesntOverExtendHorizontal() : SwipeControlTests
  • AddLayer_Click() : MapControlPage
  • AddLongNavItem_Click() : NavigationViewTopNavOnlyPage
  • AddMapIcon() : MapControl
  • AddMarginCheckBox_Checked() : TwoPaneViewPage
  • AddMarginCheckBox_Unchecked() : TwoPaneViewPage
  • AddMember() : XamlTypeBase
  • AddMenuBarItem_Click() : MenuBarPage
  • AddMenuBarToEmptyMenuBarItem_Click() : MenuBarPage
  • AddMenuItem() : HierarchicalNavigationViewDataBinding
  • AddMenuItemButton_Click() : PaneLayoutTestPage
  • AddMultipleElementsOnMap() : MapControlTests
  • AddNewTab() : MultipleTabViewPage
  • AddNodeDescendantsToView() : ViewModel
  • AddNodeToView() : ViewModel
  • AddNodeWithEmpyUnrealizedChildren_Click() : TreeViewPage
  • AddOrRemoveRefreshDelayButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • AddPassThroughElement() : MenuBarItem
  • AddPin() : VirtualizationInfo
  • AddPin_Click() : MapControlPage
  • AddRandomGradientStop() : RadialGradientBrushPage
  • AddRange() : final
  • AddRemoveContentOverlay_Click() : NavigationViewTopNavOnlyPage , NavigationViewTopNavStorePage
  • AddRemoveFooterItemTest() : CommonTests
  • AddRemoveItemTest() : CommonTests
  • AddRemoveMenuBarItemTest() : MenuBarTests
  • AddRemoveMenuFlyoutItemTest() : MenuBarTests
  • AddRemoveOriginalItemTest() : CommonTests
  • AddRemoveTest() : TabViewTests
  • AddReveal_Click() : CoreWindowEventsPage
  • AddRevealButton_Click() : RevealRegressionTestsPage
  • AddRootNode_Click() : TreeViewPage
  • AddScroller() : ViewportManagerDownLevel
  • AddScrollVelocity() : ScrollPresenterTests , ScrollPresenter , BiDirectionalScrollController , CompositionScrollController , ScrollView
  • AddScrollVelocityRequested() : AnnotatedScrollBar , ScrollBarController
  • AddSecondLevelOfNodes_Click() : TreeViewPage
  • AddShowAndSelectSubMenuItem() : HierarchicalNavigationViewDataBinding
  • AddSnapPoints() : ScrollPresenterTests
  • AddSwipeItemsButton_Click() : SwipeControlClearPage
  • AddTabButtonClick() : TabViewProperties
  • AddTabButtonCommand() : TabViewProperties
  • AddTabButtonCommandParameter() : TabViewProperties
  • AddTabButtonCommandParameterProperty() : TabViewProperties
  • AddTabButtonCommandProperty() : TabViewProperties
  • AddTenItems_Click() : NavigationViewTopNavOnlyPage
  • AddToChildrenNodes() : TreeViewNode
  • AddToMap() : XamlTypeBase
  • AddToSelection() : ItemContainerAutomationPeer , NavigationViewItemAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer
  • AddToVector() : XamlTypeBase
  • AddWebViewControl() : WebView2BasicPage
  • AddWebViewEventHandlers() : WebView2BasicPage , WebView2CoreObjectsPage
  • AddZoomVelocity() : ScrollPresenterTests , ScrollPresenter , ScrollView
  • Algorithm_GetAnchorForRealizationRect() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetAnchorForTargetElement() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetExtent() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetMeasureSize() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_GetProvisionalArrangeSize() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_OnElementMeasured() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_OnLineArranged() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Algorithm_ShouldBreakLine() : FlowLayout , IFlowLayoutAlgorithmDelegates , StackLayout , UniformGridLayout
  • Alignment() : ScrollSnapPointBase
  • AlignmentX() : ItemsRepeaterScrollHost::BringIntoViewState
  • AlignmentY() : ItemsRepeaterScrollHost::BringIntoViewState
  • AlignStackPanel() : SwipeControl
  • AllowDrop() : TabViewExternalTornOutTabsDroppingEventArgs
  • AllowDropTabs() : TabViewProperties
  • AllowDropTabsProperty() : TabViewProperties
  • AlphaAmplitude() : IGammaTransferEffect
  • AlphaDisable() : IGammaTransferEffect , ILinearTransferEffect
  • AlphaExponent() : IGammaTransferEffect
  • AlphaMode() : IColorMatrixEffect , ISepiaEffect
  • AlphaOffset() : IGammaTransferEffect , ILinearTransferEffect
  • AlphaSlope() : ILinearTransferEffect
  • AlreadyDeselectedDoesNotRaiseEvent() : SelectionModelTests
  • AlreadySelectedDoesNotRaiseEvent() : SelectionModelTests
  • AlternateLayoutPaths() : ItemsViewTests
  • AlternateLayoutPathsByUnhookingItemsInfoRequested() : ItemsViewTests
  • AlternateLayoutPathsWithSizeArrays() : ItemsViewTests
  • AlternateLayoutPathsWithUniformSizes() : ItemsViewTests
  • AlwaysExpanded() : CommandBarFlyout
  • AlwaysShowHeader() : NavigationViewProperties
  • AlwaysShowHeaderProperty() : NavigationViewProperties
  • AlwaysShowHeaderTest() : CommonTests
  • AlwaysUseFallback() : AcrylicBrushProperties , RevealBrushProperties
  • AlwaysUseFallbackButton_Checked() : AcrylicBrushPage , RevealFallbackPage
  • AlwaysUseFallbackButton_Unchecked() : AcrylicBrushPage , RevealFallbackPage
  • AlwaysUseFallbackHelper() : RevealFallbackPage
  • AlwaysUseFallbackProperty() : AcrylicBrushProperties , RevealBrushProperties
  • AncestorTreeView() : TreeViewItem
  • AnchorCandidates() : ScrollingAnchorRequestedEventArgs
  • AnchorElement() : ItemsRepeaterScrollHost , ScrollingAnchorRequestedEventArgs , ScrollPresenter , ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • AnchorEvaluated() : ScrollPresenterTestHooks
  • AnchorIndex() : SelectionModel , final
  • AnchoringAtAlmostBottomEdge() : ScrollPresenterTests
  • AnchoringAtAlmostFarEdge() : ScrollPresenterTests
  • AnchoringAtAlmostLeftEdge() : ScrollPresenterTests
  • AnchoringAtAlmostNearEdge() : ScrollPresenterTests
  • AnchoringAtAlmostRightEdge() : ScrollPresenterTests
  • AnchoringAtAlmostTopEdge() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileDecreasingViewportHeight() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileIncreasingContentAndDecreasingViewportHeight() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileIncreasingContentAndViewportHeight() : ScrollPresenterTests
  • AnchoringAtBottomEdgeWhileIncreasingContentHeight() : ScrollPresenterTests
  • AnchoringAtFarEdgeWhileDecreasingViewport() : ScrollPresenterTests
  • AnchoringAtFarEdgeWhileIncreasingContent() : ScrollPresenterTests
  • AnchoringAtLeftEdge() : ScrollPresenterTests
  • AnchoringAtNearEdge() : ScrollPresenterTests
  • AnchoringAtRepeaterMiddle() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileDecreasingViewportWidth() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileIncreasingContentAndDecreasingViewportWidth() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileIncreasingContentAndViewportWidth() : ScrollPresenterTests
  • AnchoringAtRightEdgeWhileIncreasingContentWidth() : ScrollPresenterTests
  • AnchoringAtTopEdge() : ScrollPresenterTests
  • AnchoringElementWithGrowningViewport() : ScrollPresenterTests
  • AnchoringElementWithResizedViewport() : ScrollPresenterTests
  • AnchoringElementWithShrinkingViewport() : ScrollPresenterTests
  • AnchoringWithOffsetCoercion() : ScrollPresenterTests
  • AnchoringWithReducedExtent() : ScrollPresenterTests
  • AnchoringWithReducedExtentAndAnchorOffset() : ScrollPresenterTests
  • AnchorRequested() : ScrollPresenterProperties , ScrollViewProperties
  • Angle() : IHueRotationEffect
  • Animate() : ItemsRepeaterScrollHost::BringIntoViewState
  • AnimateBackgroundButton_Checked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • AnimateBackgroundButton_Unchecked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • AnimatedAcceptVisualSource_AnimatedVisual() : AnimatedAcceptVisualSource_AnimatedVisual
  • AnimatedBackVisualSource_AnimatedVisual() : AnimatedBackVisualSource_AnimatedVisual
  • AnimatedChevronDownSmallVisualSource_AnimatedVisual() : AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • AnimatedChevronRightDownSmallVisualSource_AnimatedVisual() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • AnimatedChevronUpDownSmallVisualSource_AnimatedVisual() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • AnimatedFindVisualSource_AnimatedVisual() : AnimatedFindVisualSource_AnimatedVisual
  • AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • AnimatedIcon() : AnimatedIcon
  • AnimatedIconHost() : AnimatedIconHost
  • AnimatedIconPage() : AnimatedIconPage
  • AnimatedIconPage_Loaded() : AnimatedIconPage
  • AnimatedIconProperties() : AnimatedIconProperties
  • AnimatedIconSourceProperties() : AnimatedIconSourceProperties
  • AnimatedIconSourceTest() : IconSourceApiTests
  • AnimatedIconStateProperty() : AnimatedIcon
  • AnimatedIconTestHooks_LastAnimationSegmentChanged() : AnimatedIconHost , AnimatedIconPage , ToggleAnimatedIconHost
  • AnimatedSettingsVisualSource_AnimatedVisual() : AnimatedSettingsVisualSource_AnimatedVisual
  • AnimatedVisual() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • AnimatedVisualPlayer() : AnimatedVisualPlayer
  • AnimatedVisualPlayerAutomationPeer() : AnimatedVisualPlayerAutomationPeer
  • AnimatedVisualPlayerPage() : AnimatedVisualPlayerPage
  • AnimatedVisualPlayerProperties() : AnimatedVisualPlayerProperties
  • AnimateOffset() : DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • AnimateOffsetsBeforeLoading() : ScrollPresenterTests
  • AnimateSelectionChanged() : NavigationView
  • AnimateSelectionChangedToItem() : NavigationView
  • AnimateTo() : RevealScenarioLights
  • AnimateZoomFactorBeforeLoading() : ScrollPresenterTests
  • Animation() : ScrollingScrollAnimationStartingEventArgs , ScrollingZoomAnimationStartingEventArgs
  • AnimationElementFactory() : AnimationsDemoPage::AnimationElementFactory
  • AnimationHandler() : AnimationHandler
  • AnimationMode() : ScrollingZoomOptions , ScrollingScrollOptions , ScrollingZoomOptions
  • AnimationOptimization() : AnimatedVisualPlayerProperties
  • AnimationOptimizationProperty() : AnimatedVisualPlayerProperties
  • AnimationPlay() : AnimatedVisualPlayer::final
  • AnimationsDemoPage() : AnimationsDemoPage
  • AnnotatedScrollBar() : AnnotatedScrollBar
  • AnnotatedScrollBar_DetailLabelRequested() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarSummaryPage , ItemsViewIntegrationPage , AnnotatedScrollBarRangeBasePage
  • AnnotatedScrollBar_DetailLabelRequestedLog() : ItemsViewIntegrationPage
  • AnnotatedScrollBar_Scrolling() : ItemsViewIntegrationPage
  • AnnotatedScrollbar_Scrolling() : AnnotatedScrollBarSummaryPage
  • AnnotatedScrollBar_ScrollingLog() : ItemsViewIntegrationPage
  • AnnotatedScrollBar_SizeChanged() : ItemsViewIntegrationPage
  • AnnotatedScrollBarDetailLabelRequestedEventArgs() : AnnotatedScrollBarDetailLabelRequestedEventArgs
  • AnnotatedScrollBarIScrollControllerPage() : AnnotatedScrollBarIScrollControllerPage
  • AnnotatedScrollBarLabel() : AnnotatedScrollBarLabel
  • AnnotatedScrollBarPage() : AnnotatedScrollBarPage
  • AnnotatedScrollBarPage_Loaded() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarSummaryPage
  • AnnotatedScrollBarPanningInfo() : AnnotatedScrollBarPanningInfo
  • AnnotatedScrollBarProperties() : AnnotatedScrollBarProperties
  • AnnotatedScrollBarRangeBasePage() : AnnotatedScrollBarRangeBasePage
  • AnnotatedScrollBarRangeBasePage_Loaded() : AnnotatedScrollBarRangeBasePage
  • AnnotatedScrollBarScrollingEventArgs() : AnnotatedScrollBarScrollingEventArgs
  • AnnotatedScrollBarSummaryPage() : AnnotatedScrollBarSummaryPage
  • AnotherButton_Click() : RevealStatesPage
  • AnotherListViewItem_Holding() : RevealStatesPage
  • AnticipatedOffsetsChange() : OffsetsChangeWithAdditionalVelocity
  • AnticipatedScrollableHeight() : ScrollPresenter
  • AnticipatedScrollableWidth() : ScrollPresenter
  • AnticipatedZoomedHorizontalOffset() : ScrollPresenter
  • AnticipatedZoomedVerticalOffset() : ScrollPresenter
  • AnticipatedZoomFactor() : ScrollPresenter
  • AnticipatedZoomFactorChange() : ZoomFactorChangeWithAdditionalVelocity
  • AppBarButton_Click() : NavigationViewTopNavStorePage
  • AppBarButtonDensityTest() : CommonStylesTests
  • AppBarButtonDensityTest_Click() : CommonStylesPage
  • AppBarPage() : AppBarPage
  • AppBarToggleButtonDensityTest() : CommonStylesTests
  • AppBarToggleButtonDensityTest_Click() : CommonStylesPage
  • Append() : TreeViewNodeVector , VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SwipeItems , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • AppendAsyncEventMessage() : ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SwipeControlPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewBringIntoViewPage , ItemsViewBlankPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , LinedFlowLayoutDemo , ItemsViewIntegrationPage , ScrollViewDynamicPage , ImagePage , ScrollViewBlankPage , ImagePage , ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ItemsViewSummaryPage , ScrollViewBringIntoViewPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollPresenterBringIntoViewPage , ItemsViewBlankPage
  • AppendButtonToNumberPanelList() : PagerControl
  • AppendEllipsisIconToNumberPanelList() : PagerControl
  • AppendEventMessage() : ItemsViewSummaryPage , ObjectModelTestPage , ScrollViewerPage , ListViewBasePage , SelectorBarSummaryPage , LinedFlowLayoutDemo , ItemsViewPictureLibraryPage , GroupedItemsControlPage , FlatItemsControlPage , GroupedListViewBasePage , ItemsViewPictureLibraryPage , VariableSizedItemsPage , ObjectModelTestPage
  • AppendLog() : KeyboardNavigationSample
  • AppendMessage() : WebView2BasicPage , WebView2Common
  • ApplyConstraintsToRgbColor() : ColorPicker
  • ApplyCustomMenuItemContainerStyling() : NavigationView
  • ApplyPendingChangeView() : ItemsRepeaterScrollHost
  • ApplyScaleExpressionAnimation() : RatingControl
  • ApplySelectionModelSelectionChange() : ItemsView
  • ApplyStyleToPipAndUpdateOrientation() : PipsPager
  • ApplyTemplateSettings() : ProgressRing
  • ApplyVerticalScrollController() : ItemsView
  • AreAllAncestorsVisible() : WebView2
  • AreAllScrollControllersCollapsed() : ScrollView
  • AreAnchorNotificationsRaised() : ScrollPresenterTestHooks
  • AreBothScrollControllersVisible() : ScrollView
  • AreCheckStatesEnabledProperty() : RadioMenuFlyoutItemProperties
  • AreChildrenNodesEqualToItemsSource() : TreeViewNode
  • AreClose() : ScrollViewTestsWithInputHelper , AcrylicRenderingPage , RefreshInfoProviderImpl
  • AreEqual() : SelectionModelTests
  • AreEqualIgnoringSpace() : WebView2BasicPage
  • AreExpressionAnimationStatusNotificationsRaised() : ScrollPresenterTestHooks
  • AreInteractionSourcesNotificationsRaised() : ScrollPresenterTestHooks
  • AreKeysFromExpectedInActualDictionary() : CommonStylesApiTests
  • AreNavigationKeysOpposite() : ItemsView
  • ArePrecisionErasersVisible() : InkToolBarEraserButton , InkToolBarEraserButtonProperties
  • ArePrecisionErasersVisibleProperty() : InkToolBarEraserButtonProperties
  • AreScrollButtonsVisible() : TabViewTests
  • AreScrollControllersAutoHiding() : ScrollView
  • AroundTheEndAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • AroundTheEndAnimationTest() : AnimatedVisualPlayerTests
  • Arrange() : Layout , FlowLayoutAlgorithm
  • ArrangeBounds() : VirtualizationInfo
  • ArrangeConstrainedLines() : LinedFlowLayout
  • ArrangeContent() : ScrollPresenter
  • ArrangeInvalidated() : LayoutProperties , Layout , LayoutProperties
  • ArrangeItem() : BreadcrumbLayout
  • ArrangeOverride() : InfoBarPanel , CircleLayout , ColumnMajorUniformToLargestGridLayout , FlowLayout , ScrollPresenter , BreadcrumbLayout , MockStackLayout , StackLayout , UniformGrid2DLayout , UniformGridLayout , VirtualizingUniformStackLayout , WebView2 , NonVirtualStackLayout , VirtualizingLayout , ActivityFeedLayout , NonVirtualStackLayout , VirtualizingUniformCarouselStackLayout , ParallaxView , LinedFlowLayout , Flex , MockVirtualizingLayout , AnimatedVisualPlayer , FlowLayoutDerived , ItemsRepeater , LayoutPanel , MockNonVirtualizingLayout , MyCustomNonVirtualizingStackLayout , AspectRatioRespectingControl , ItemsRepeaterScrollHost , ViewportTests::TestScrollingSurface , AnimatedIcon , NonVirtualizingLayout , VirtualizingStackLayout
  • ArrangeTopNavItems() : NavigationView
  • ArrangeUnconstrainedLine() : LinedFlowLayout
  • ArrangeVirtualizingLayout() : FlowLayoutAlgorithm
  • ArrowKeyHierarchicalNavigationTest() : FocusBehaviorTests
  • ArrowKeyNavigationTest() : FocusBehaviorTests
  • as() : sealed< T, fallback, RawStorageT >
  • AssertUniqueCompositorOrUpdate() : MaterialHelperBase
  • AsyncWebViewOperations() : final
  • Attach() : AutoHandle< THandlePolicy >
  • AttachControlEventHandlers() : CommandBarFlyoutCommandBar
  • AttachDismissingHandlers() : SwipeControl
  • AttachedData() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • AttachEventHandlers() : MenuBarItem , SwipeItem , SwipeControl
  • AttachEventsToSecondaryStoryboards() : CommandBarFlyoutCommandBar
  • AttachItemEventHandlers() : CommandBarFlyoutCommandBar
  • AttachLights() : RevealBrush
  • AttachLightsImpl() : RevealBrush
  • AttachLightsToAncestor() : RevealBrush
  • AttachLightsToElement() : RevealBrush
  • AttachMoveSizeLoopEvents() : TabView
  • AttachToCompositionTarget() : InkCanvas
  • AttachToLayoutChanged() : RadioButtons
  • AttachToVisualLink() : InkCanvas
  • AttemptClosePaneLightly() : NavigationView
  • auto_cast() : auto_cast
  • auto_unbox() : auto_unbox
  • AutoDisplayChangingPageTest() : PagerControlTests
  • AutoHandle() : AutoHandle< THandlePolicy >
  • AutomationNameIsForwardedToPopup() : TeachingTipTests
  • AutomationPeerTest() : MenuBarTests , ExpanderTests
  • AutoPlacement() : TeachingTipTests
  • AutoPlay() : AnimatedVisualPlayerProperties
  • AutoPlayProperty() : AnimatedVisualPlayerProperties
  • AutoRecycleCandidate() : VirtualizationInfo
  • AutoSuggestBox() : NavigationViewProperties
  • AutoSuggestBox_QuerySubmitted() : AutoSuggestBoxPage
  • AutoSuggestBox_TextChanged() : NavigationViewPage , CommonStylesPage , CompactPage
  • AutoSuggestBoxDensityTest() : CommonStylesTests
  • AutoSuggestBoxDensityTest_Click() : CommonStylesPage
  • AutoSuggestBoxHelper() : AutoSuggestBoxHelper
  • AutoSuggestBoxHelperProperties() : AutoSuggestBoxHelperProperties
  • AutoSuggestBoxOnTopNavTest() : CommonTests
  • AutoSuggestBoxPage() : AutoSuggestBoxPage
  • AutoSuggestBoxProperty() : NavigationViewProperties
  • AutoSuggestBoxTest() : CommonTests
  • AutoSuggestCheckbox_Checked() : NavigationViewPage , NavigationViewTopNavPage , NavigationViewRS4Page
  • AutoSuggestCheckbox_Unchecked() : NavigationViewTopNavPage , NavigationViewRS4Page , NavigationViewPage
  • AutoSuggestEventRevokersProperty() : AutoSuggestBoxHelper
  • AutoTintLuminosityOpacity_IsCheckedChanged() : AcrylicBrushPage
  • AverageItemAspectRatioDbg() : LinedFlowLayout
  • await_ready() : Awaitable
  • await_resume() : Awaitable
  • await_suspend() : Awaitable
  • Awaitable() : Awaitable
  • Azimuth() : IDistantDiffuseEffect , IDistantSpecularEffect , IDistantDiffuseEffect , IDistantSpecularEffect
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- b -

  • BackButtonEnabledCheckbox_Checked() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewCustomThemeResourcesPage
  • BackButtonEnabledCheckbox_Unchecked() : NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewCompactPaneLengthTestPage , NavigationViewPage
  • BackButtonPlaceHolderOnTopNavTest() : CommonTests
  • BackButtonVisibility() : NavigationViewTemplateSettingsProperties
  • BackButtonVisibilityCheckbox_Checked() : NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage , NavigationViewCompactPaneLengthTestPage , NavigationViewPage
  • BackButtonVisibilityCheckbox_Unchecked() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage
  • BackButtonVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • Background() : ScrollPresenterProperties , SwipeItemProperties , ProgressRingDeterminate , ProgressRingIndeterminate , IBlendEffect , ItemsRepeaterProperties , ScrollPresenterProperties
  • BackgroundColorButton_Click() : RevealSimpleListPage
  • BackgroundComboBoxChanged() : RevealScenarioGrid , RevealScenarioList
  • BackgroundLight() : RevealTestApi
  • BackgroundLightMaxSize() : RevealTestApi
  • BackgroundLightMinSize() : RevealTestApi
  • BackgroundProperty() : ItemsRepeaterProperties , ScrollPresenterProperties , SwipeItemProperties
  • BackgroundPropertyComboBox_SelectionChanged() : VisualPropertiesPage
  • BackRequested() : NavigationViewProperties , TitleBarProperties
  • BackRequestedStateResetButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • BackRequestedTest() : EventTests
  • BackToolTipTest() : CommonTests
  • BackupTap() : RadioButtonsTests
  • BadgeGlyph() : PersonPictureProperties
  • BadgeGlyphProperty() : PersonPictureProperties
  • BadgeGlyphTextBox_TextChanged() : PersonPicturePage
  • BadgeImageSource() : PersonPictureProperties
  • BadgeImageSourceProperty() : PersonPictureProperties
  • BadgeNumber() : PersonPictureProperties
  • BadgeNumberProperty() : PersonPictureProperties
  • BadgeNumberTextBox_TextChanged() : PersonPicturePage
  • BadgeText() : PersonPictureProperties
  • BadgeTextProperty() : PersonPictureProperties
  • BaseType() : XamlTypeBase
  • BasicAcrylicOnRectangle() : AcrylicBrushTests
  • BasicAlignment() : ScrollPresenterTests
  • BasicCoreObjectCreationAndDestructionTest() : WebView2Tests
  • BasicDemo() : BasicDemo
  • BasicExpressionTest() : NumberBoxTests
  • BasicFlingTouchTest() : WebView2Tests
  • BasicImageWithConstrainedHeight() : ScrollPresenterTests
  • BasicImageWithConstrainedWidth() : ScrollPresenterTests
  • BasicInteractionTest() : PersonPictureTests , RefreshContainerTests , RatingControlTests , SplitButtonTests
  • BasicKeyboardTest() : NumberBoxTests , RadioButtonsTests , WebView2Tests
  • BasicLongPressTouchTest() : WebView2Tests
  • BasicMargin() : ScrollPresenterTests
  • BasicMarginAndAlignment() : ScrollPresenterTests
  • BasicMouseInteractionTest() : MenuBarTests
  • BasicOffsetChanges() : ScrollPresenterTests
  • BasicOffsetsChangeCancelation() : ScrollPresenterTests
  • BasicPadding() : ScrollPresenterTests
  • BasicPanTouchTest() : WebView2Tests
  • BasicRenderingTest() : WebView2Tests
  • BasicStretchTouchTest() : WebView2Tests
  • BasicTapTouchTest() : WebView2Tests
  • BasicTest() : ImageIconTests , RadioMenuFlyoutItemTests , TitleBarTests
  • BasicZoomFactorChangeCancelation() : ScrollPresenterTests
  • BasicZoomFactorChanges() : ScrollPresenterTests
  • begin() : final
  • Begin() : HashMap< K, V > , IndexRange
  • BeginCheckingForDrag() : TabViewItem
  • BeginSelectionChanges() : ViewModel
  • BeginSubTest() : WebView2Tests
  • BehaviorOnInvoked() : SwipeItemProperties
  • BehaviorOnInvokedProperty() : SwipeItemProperties
  • BiDecrementRepeatButton_Click() : BiDirectionalScrollController
  • BiDirectionalAlignmentFromHorizontalAlignment() : ScrollPresenterTests
  • BiDirectionalAlignmentFromVerticalAlignment() : ScrollPresenterTests
  • BiDirectionalScrollController() : BiDirectionalScrollController
  • BiDirectionalScrollController_IsEnabledChanged() : BiDirectionalScrollController
  • BiDirectionalScrollController_LogMessage() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • BiDirectionalScrollController_SizeChanged() : BiDirectionalScrollController
  • BiDirectionalScrollControllerScrollingScrollCompletedEventArgs() : BiDirectionalScrollControllerScrollingScrollCompletedEventArgs
  • BiIncrementRepeatButton_Click() : BiDirectionalScrollController
  • BindOwningFlyoutPresenterToCornerRadius() : CommandBarFlyoutCommandBar
  • BindProperty() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • BindProperty2() : AnimatedVisual
  • BlankPage() : BlankPage
  • blockFarContentPropertyName() : SwipeControl
  • blockNearContentPropertyName() : SwipeControl
  • BlockSize() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • BlueAmplitude() : IGammaTransferEffect
  • BlueBackground_Click() : CommonStylesPage
  • BlueDisable() : IGammaTransferEffect , ILinearTransferEffect
  • BlueExponent() : IGammaTransferEffect
  • BlueOffset() : IGammaTransferEffect , ILinearTransferEffect
  • BlueSlope() : ILinearTransferEffect
  • BlueValueCount() : IPosterizeEffect
  • BlurAmount() : IGaussianBlurEffect
  • BorderBrush() : LayoutPanelProperties
  • BorderBrushProperty() : LayoutPanelProperties
  • BorderColorButton_Click() : RevealSimpleListPage
  • BorderLight() : RevealTestApi
  • BorderLight_ShouldBeOn() : RevealTestApi
  • BorderLight_ValidateBorderLightPanAway() : RevealStatesPage
  • BorderMode() : IGaussianBlurEffect , ITransform2DEffect
  • BorderThickness() : LayoutPanelProperties
  • BorderThicknessPage() : BorderThicknessPage
  • BorderThicknessProperty() : LayoutPanelProperties
  • BorderWideLight() : RevealTestApi
  • BottomAppBarButton_Click() : CommandBarPage
  • BottomItems() : SwipeControlProperties
  • BottomItemsProperty() : SwipeControlProperties
  • BottomLeftPlacementTopLeftHighlightMargin() : TeachingTip
  • BottomLeftPlacementTopRightHighlightMargin() : TeachingTip
  • BottomPlacementTopLeftHighlightMargin() : TeachingTip
  • BottomPlacementTopRightHighlightMargin() : TeachingTip
  • BottomRightPlacementTopLeftHighlightMargin() : TeachingTip
  • BottomRightPlacementTopRightHighlightMargin() : TeachingTip
  • BoundsRegex() : CommandBarFlyoutTests
  • BoxedDefaultValue() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • BoxedType() : XamlTypeBase
  • BoxValueIfNecessary() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • BreadcrumbBar() : BreadcrumbBar
  • BreadcrumbBarAxeTestPage() : BreadcrumbBarAxeTestPage
  • BreadcrumbBarItem() : BreadcrumbBarItem
  • BreadcrumbBarItemAutomationPeer() : BreadcrumbBarItemAutomationPeer
  • BreadcrumbBarPage() : BreadcrumbBarPage
  • BreadcrumbBarProperties() : BreadcrumbBarProperties
  • BreadcrumbControl_ItemClicked() : BreadcrumbBarPage
  • BreadcrumbElementFactory() : BreadcrumbElementFactory
  • BreadcrumbIterable() : BreadcrumbIterable
  • BreadcrumbIterator() : BreadcrumbIterator
  • BreadcrumbLayout() : BreadcrumbLayout
  • BrightnessSun_AnimatedVisual() : BrightnessSun::BrightnessSun_AnimatedVisual
  • BringContentWithMarginIntoView() : ScrollPresenterTests
  • BringElementInNestedScrollPresentersIntoView() : ScrollPresenterTests
  • BringElementInNestedScrollViewersIntoView() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewFromNearEdge() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithFarAlignment() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithMiddleAlignment() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithNearAlignment() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithOffsetFromFarEdge() : ScrollPresenterTests
  • BringElementIntoHorizontalScrollPresenterViewWithSnapPoints() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewFromNearEdge() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithFarAlignment() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithMiddleAlignment() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithNearAlignment() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithOffsetFromFarEdge() : ScrollPresenterTests
  • BringElementIntoVerticalScrollPresenterViewWithSnapPoints() : ScrollPresenterTests
  • BringElementIntoView() : ScrollPresenterTests
  • BringElementIntoViewWithAdjustmentInBringingIntoViewHandler() : ScrollPresenterTests
  • BringElementIntoViewWithAlignment() : ScrollPresenterTests
  • BringElementIntoViewWithOffset() : ScrollPresenterTests
  • BringElementIntoViewWithTargetRect() : ScrollPresenterTests
  • BringFocusedItemIntoView() : ItemsViewTestsWithInputHelper
  • BringingIntoView() : ScrollPresenterProperties , ScrollViewProperties
  • BringIntoView_Click() : PinterestLayoutSamplePage , VirtualizingStackLayoutSamplePage , VirtualizingUniformStackLayoutSamplePage , PinterestLayoutSamplePage , VirtualizingStackLayoutSamplePage , VirtualizingUniformStackLayoutSamplePage
  • BringIntoViewOfExistingItemsDoesNotChangeScrollOffset() : RepeaterTests
  • BringIntoViewOffsetsChange() : BringIntoViewOffsetsChange
  • BringIntoViewState() : ItemsRepeaterScrollHost::BringIntoViewState
  • BringItemIntoView() : ItemsViewTests
  • BringNestedElementIntoHorizontalScrollPresenterView() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewWithNearAlignment() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollPresenterViewWithSnapPoints() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollViewerView() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollViewerViewWithNearAlignment() : ScrollPresenterTests
  • BringNestedElementIntoHorizontalScrollViewerViewWithOffset() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterView() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterViewFromFarEdge() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterViewWithMiddleAlignment() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollPresenterViewWithOffset() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollViewerView() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollViewerViewWithMiddleAlignment() : ScrollPresenterTests
  • BringNestedElementIntoVerticalScrollViewerViewWithOffset() : ScrollPresenterTests
  • BringSelectedTabIntoView() : TabView
  • BringSettingsIntoViewButton_Click() : NavigationViewPage
  • BrushCheckFailed() : RevealColorPage
  • BrushToString() : TeachingTipPage
  • BtnAddChild_Click() : LinedFlowLayoutDemo
  • BtnAddIrregularSnapPoint_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnAddItem_Click() : SwipeControlPage2
  • BtnAddItemsSourceItem_Click() : ItemsViewIntegrationPage
  • BtnAddRepeatedSnapPoint_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnAddScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnAddScrollVelocity_Click() : ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage
  • BtnAddSelectorBarItem_Click() : SelectorBarSummaryPage
  • BtnAddZoomVelocity_Click() : ScrollPresenterDynamicPage
  • BtnApplyAverageMonthCount_Click() : ItemsViewIntegrationPage
  • BtnApplyYearCount_Click() : ItemsViewIntegrationPage
  • BtnCancel_Click() : SwipeControlPage2
  • BtnCancelAddScrollVelocity_Click() : ScrollPresenterDynamicPage
  • BtnCancelAddZoomVelocity_Click() : ScrollPresenterDynamicPage
  • BtnCancelScroll_Click() : ScrollPresenterDynamicPage
  • BtnCancelZoom_Click() : ScrollPresenterDynamicPage
  • BtnChangeEvenItemsVisibility_Click() : ObjectModelTestPage
  • btnChangeListViewStyle_Click() : ListViewBackgroundPage
  • BtnChangeOddItemsVisibility_Click() : ObjectModelTestPage
  • BtnChangeView_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnClear1_Click() : NonVirtualStackLayoutSamplePage
  • BtnClear2_Click() : NonVirtualStackLayoutSamplePage
  • BtnClearEvents_Click() : VariableSizedItemsPage , LinedFlowLayoutDemo , ScrollPresenterMousePanningPage
  • BtnClearExceptionReport_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewAnchoringPage , ListViewBasePage , ScrollViewerPage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterZoomSnapPointsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • btnClearFullLog_Click() : ScrollPresenterChainingAndRailingPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterScrollSnapPointsPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewsWithSimpleContentsPage
  • BtnClearFullLog_Click() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , SelectorBarSummaryPage , SwipeControlPage
  • BtnClearItemsSource_Click() : ItemsViewIntegrationPage
  • BtnClearListViewItemsSource_Click() : ListViewAnchoringPage
  • BtnClearLog_Click() : ScrollPresenterWithBiDirectionalScrollControllerPage , ScrollPresenterWithCompositionScrollControllersPage , ScrollPresenterWithSimpleScrollControllersPage
  • BtnClearLogs_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewBasePage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , KeyboardNavigationSample , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • BtnClearScrollPresenterEvents_Click() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnClearScrollViewerEvents_Click() : ScrollViewerPage
  • BtnClearSnapPoints_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnClearSwipeControlEvents_Click() : SwipeControlPage
  • BtnClearTeachingTipEvents_Click() : TeachingTipPage
  • BtnClose_Click() : SwipeControlPage2
  • BtnCollectionViewMoveCurrentToPosition_Click() : GroupedListViewBasePage
  • BtnCopyEvents_Click() : LinedFlowLayoutDemo , SelectorBarSummaryPage
  • BtnCopyItemsViewEvents_Click() : ItemsViewSummaryPage
  • BtnCopyScrollPresenterEvents_Click() : ScrollPresenterDynamicPage
  • BtnCreateDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnCreateDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • btnCreateParallaxView_Click() : DynamicPage
  • BtnCreateScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnDataSourceAddItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceGetItemCount_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceInsertItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceRaiseResetNotification_Click() : ListViewBasePage
  • BtnDataSourceRemoveAllItems_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceRemoveItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceReplaceItem_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDataSourceReplaceItemContent_Click() : ItemsViewSummaryPage
  • BtnDataSourceSetItemCount_Click() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • BtnDeleteScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnDeselect_Click() : ItemsViewSummaryPage
  • BtnDeselectAll_Click() : ItemsViewSummaryPage
  • BtnDiscardQueuedOperations_Click() : ItemsViewSummaryPage , ScrollPresenterDynamicPage
  • BtnExecuteQueuedOperations_Click() : ItemsViewSummaryPage , ScrollPresenterDynamicPage
  • BtnExpand_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnExpandMore_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnFocusManagerCollectionViewCurrentItemProgrammaticFocus_Click() : GroupedListViewBasePage
  • BtnForcePopulateHeader_Click() : ItemsViewIntegrationPage
  • BtnGarbageCollect_Click() : ScrollPresenterLeakDetectionPage
  • BtnGetActualHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetActualWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetAnchorElement_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnGetArrangeRenderSizesDelta_Click() : ScrollPresenterDynamicPage
  • BtnGetAverageMonthCount_Click() : ItemsViewIntegrationPage
  • BtnGetBitmapImageDecodePixelHeight_Click() : ImagePage
  • BtnGetBitmapImageDecodePixelWidth_Click() : ImagePage
  • BtnGetBitmapImageUriSource_Click() : ImagePage
  • BtnGetBorderThickness_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnGetBottomItems_Click() : SwipeControlPage2
  • BtnGetChildrenCount_Click() : LinedFlowLayoutDemo
  • BtnGetCollectionViewCurrentItem_Click() : GroupedListViewBasePage
  • BtnGetCollectionViewCurrentPosition_Click() : GroupedListViewBasePage
  • BtnGetComputedHorizontalScrollMode_Click() : ScrollViewDynamicPage
  • BtnGetComputedVerticalScrollMode_Click() : ScrollViewDynamicPage
  • BtnGetContentActualHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentActualWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentDesiredSize_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetContentLayoutOffsetX_Click() : ScrollPresenterDynamicPage
  • BtnGetContentLayoutOffsetY_Click() : ScrollPresenterDynamicPage
  • BtnGetContentMargin_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetContentMaxHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentMaxWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentMinHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentMinWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentOrientation_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetContentPadding_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentRenderSize_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetContentWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetCornerRadius_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnGetCurrentAnchor_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • BtnGetCurrentItemIndex_Click() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • BtnGetCurrentItemIndex_GettingFocus() : ItemsViewInteractiveTestsPage
  • BtnGetDetailLabelContent_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetExtentHeight_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetExtentWidth_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • btnGetFullLog_Click() : ScrollPresenterChainingAndRailingPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterScrollSnapPointsPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewsWithSimpleContentsPage
  • BtnGetFullLog_Click() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , SelectorBarSummaryPage , SwipeControlPage
  • btnGetHeight_Click() : DynamicPage
  • BtnGetHeight_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetHorizontalAnchorRatio_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage , ItemsViewSummaryPage
  • btnGetHorizontalOffset_Click() : DynamicPage
  • BtnGetHorizontalOffset_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetHorizontalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnGetHorizontalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnGetHorizontalScrollMode_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetHorizontalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnGetHorizontalShift_Click() : DynamicPage
  • btnGetHorizontalSourceEndOffset_Click() : DynamicPage
  • btnGetHorizontalSourceStartOffset_Click() : DynamicPage
  • BtnGetIgnoredInputKinds_Click() : ScrollViewDynamicPage
  • BtnGetImageActualHeight_Click() : ImagePage
  • BtnGetImageActualWidth_Click() : ImagePage
  • BtnGetImageDesiredHeight_Click() : ImagePage
  • BtnGetImageDesiredWidth_Click() : ImagePage
  • BtnGetImageHeight_Click() : ImagePage
  • BtnGetImageHorizontalAlignment_Click() : ImagePage
  • BtnGetImageMargin_Click() : ImagePage
  • BtnGetImageMaxHeight_Click() : ImagePage
  • BtnGetImageMaxWidth_Click() : ImagePage
  • BtnGetImageMinHeight_Click() : ImagePage
  • BtnGetImageMinWidth_Click() : ImagePage
  • BtnGetImageParentHeight_Click() : ImagePage
  • BtnGetImageParentWidth_Click() : ImagePage
  • BtnGetImageRenderHeight_Click() : ImagePage
  • BtnGetImageRenderWidth_Click() : ImagePage
  • BtnGetImageStretch_Click() : ImagePage
  • BtnGetImageVerticalAlignment_Click() : ImagePage
  • BtnGetImageWidth_Click() : ImagePage
  • BtnGetIsSelected_Click() : ItemContainerSummaryPage
  • BtnGetItemsControlTabNavigation_Click() : FlatItemsControlPage , GroupedItemsControlPage
  • BtnGetItemsControlXYFocusKeyboardNavigation_Click() : FlatItemsControlPage , GroupedItemsControlPage
  • BtnGetItemsPanelCacheLength_Click() : GroupedListViewBasePage
  • BtnGetItemsPanelGroupHeaderPlacement_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetItemsPanelGroupPadding_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetItemsPanelMargin_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • BtnGetItemsPanelOrientation_Click() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • BtnGetItemsRepeaterChildrenCount_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementActualHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementActualWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementDesiredSize_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementIsEnabled_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMaxHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMaxWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMinHeight_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementMinWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementRenderSize_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterElementWidth_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterHorizontalAlignment_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterHorizontalCacheLength_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterItemContainerCanUserInvoke_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterItemContainerCanUserSelect_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterItemContainerIsSelected_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterLogItemIndexDbg_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterVerticalAlignment_Click() : ItemsViewSummaryPage
  • BtnGetItemsRepeaterVerticalCacheLength_Click() : ItemsViewSummaryPage , VariableSizedItemsPage
  • BtnGetItemsStackPanelCacheLength_Click() : NestedGridViewsPage
  • BtnGetItemsStackPanelItemsUpdatingScrollMode_Click() : ListViewAnchoringPage
  • BtnGetItemsWrapGridCacheLength_Click() : GroupedItemsControlPage
  • BtnGetItemsWrapGridItemHeight_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetItemsWrapGridItemWidth_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnGetLastRequestedDetailLabelOffset_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetLayoutForcedIndexBasedLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnGetLayoutPanelBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementActualHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementActualWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementIsEnabled_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMinHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementMinWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelElementWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelHorizontalAlignment_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelMargin_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelPadding_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelVerticalAlignment_Click() : LinedFlowLayoutDemo
  • BtnGetLayoutPanelWidth_Click() : LinedFlowLayoutDemo
  • BtnGetLeftItems_Click() : SwipeControlPage2
  • BtnGetLinedFlowLayoutActualLineHeight_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutLineHeight_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutLineSpacing_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutLogItemIndexDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutMinItemSpacing_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetLinedFlowLayoutRequestedRangeLength_Click() : ItemsViewSummaryPage
  • BtnGetLinedFlowLayoutRequestedRangeStartIndex_Click() : ItemsViewSummaryPage
  • BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnGetListViewBaseReorderMode_Click() : ListViewBasePage
  • BtnGetListViewBaseSelectionMode_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetListViewBaseTabNavigation_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetListViewItemActualHeight_Click() : ListViewAnchoringPage
  • BtnGetListViewItemHeight_Click() : ListViewAnchoringPage
  • BtnGetListViewSize_Click() : ListViewAnchoringPage
  • BtnGetMargin_Click() : SelectorBarSummaryPage , ScrollViewerPage , ItemsViewSummaryPage , ScrollViewDynamicPage
  • BtnGetMaxHeight_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , SelectorBarSummaryPage
  • btnGetMaxHorizontalShiftRatio_Click() : DynamicPage
  • BtnGetMaximum_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetMaxPosition_Click() : ScrollPresenterDynamicPage
  • BtnGetMaxPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • btnGetMaxVerticalShiftRatio_Click() : DynamicPage
  • BtnGetMaxWidth_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnGetMaxZoomFactor_Click() : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetMinimum_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetMinPosition_Click() : ScrollPresenterDynamicPage
  • BtnGetMinPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • BtnGetMinZoomFactor_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnGetModernCollectionBasePanelGroupHeaderPlacement_Click() : ListViewAnchoringPage
  • BtnGetModernCollectionBasePanelGroupPadding_Click() : ListViewAnchoringPage
  • BtnGetModernCollectionBasePanelVerticalAlignment_Click() : ListViewAnchoringPage
  • BtnGetNumLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetOffsetBetweenLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetPadding_Click() : SelectorBarSummaryPage , ScrollViewerPage , ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetPageSize_Click() : ListViewAnchoringPage
  • BtnGetPosition_Click() : ScrollPresenterDynamicPage
  • BtnGetPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • BtnGetRightItems_Click() : SwipeControlPage2
  • btnGetSCHeight_Click() : DynamicPage
  • BtnGetScrollerChangeViewVerticalOffset_Click() : VariableSizedItemsPage
  • BtnGetScrollerChangeViewVerticalScrollPercentage_Click() : VariableSizedItemsPage
  • BtnGetScrollerExtentHeight_Click() : VariableSizedItemsPage
  • BtnGetScrollerScrollableHeight_Click() : VariableSizedItemsPage
  • BtnGetScrollerVerticalAnchorRatio_Click() : VariableSizedItemsPage
  • BtnGetScrollerVerticalOffset_Click() : VariableSizedItemsPage
  • BtnGetScrollerVerticalScrollPercentage_Click() : VariableSizedItemsPage
  • BtnGetScrollerZoomFactor_Click() : VariableSizedItemsPage
  • BtnGetScrollViewBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewContentOrientation_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewerExtentHeight_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerExtentWidth_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerHorizontalOffset_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerHorizontalScrollMode_Click() : GroupedListViewBasePage
  • BtnGetScrollViewerVerticalAnchorRatio_Click() : ListViewAnchoringPage
  • BtnGetScrollViewerVerticalOffset_Click() : GroupedListViewBasePage , ListViewAnchoringPage , ListViewBasePage
  • BtnGetScrollViewerVerticalScrollMode_Click() : GroupedListViewBasePage
  • BtnGetScrollViewerViewportHeight_Click() : GroupedListViewBasePage , ListViewBasePage
  • BtnGetScrollViewerViewportWidth_Click() : ListViewBasePage , GroupedListViewBasePage
  • BtnGetScrollViewExtentHeight_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewExtentWidth_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHeight_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalOffset_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewHorizontalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewMargin_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewPadding_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewState_Click() : ItemsViewIntegrationPage
  • BtnGetScrollViewVerticalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewVerticalOffset_Click() : ItemsViewIntegrationPage , LinedFlowLayoutDemo
  • BtnGetScrollViewVerticalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewVerticalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewWidth_Click() : LinedFlowLayoutDemo
  • BtnGetScrollViewZoomMode_Click() : LinedFlowLayoutDemo
  • btnGetSCWidth_Click() : DynamicPage
  • BtnGetSelectedItem_Click() : ItemsViewSummaryPage
  • BtnGetSelectedItems_Click() : ItemsViewSummaryPage
  • BtnGetSelectorBarItemChild_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemForeground_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemIcon_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemIsEnabled_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemIsSelected_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemMargin_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemPadding_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemsCount_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemText_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarItemVisibility_Click() : SelectorBarSummaryPage
  • BtnGetSelectorBarSelectedItem_Click() : SelectorBarSummaryPage
  • BtnGetSmallChange_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetStackLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnGetStackLayoutSpacing_Click() : ItemsViewSummaryPage
  • BtnGetStackPanelVerticalAlignment_Click() : ListViewAnchoringPage
  • BtnGetState_Click() : ScrollPresenterDynamicPage
  • btnGetTEActualHeight_Click() : DynamicPage
  • btnGetTEActualWidth_Click() : DynamicPage
  • btnGetTEHeight_Click() : DynamicPage
  • btnGetTEMargin_Click() : DynamicPage
  • btnGetTEMaxHeight_Click() : DynamicPage
  • btnGetTEMaxWidth_Click() : DynamicPage
  • btnGetTEWidth_Click() : DynamicPage
  • BtnGetTopItems_Click() : SwipeControlPage2
  • BtnGetUniformGridLayoutMaximumRowsOrColumns_Click() : ItemsViewSummaryPage
  • BtnGetUniformGridLayoutMinColumnSpacing_Click() : ItemsViewSummaryPage
  • BtnGetUniformGridLayoutMinRowSpacing_Click() : ItemsViewSummaryPage
  • BtnGetUniformGridLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnGetValue_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetVerticalAnchorRatio_Click() : ItemsViewSummaryPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • BtnGetVerticalOffset_Click() : ScrollViewDynamicPage
  • btnGetVerticalOffset_Click() : DynamicPage
  • BtnGetVerticalOffset_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage
  • BtnGetVerticalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnGetVerticalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnGetVerticalScrollMode_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnGetVerticalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnGetVerticalShift_Click() : DynamicPage
  • btnGetVerticalSourceEndOffset_Click() : DynamicPage
  • btnGetVerticalSourceStartOffset_Click() : DynamicPage
  • BtnGetViewportHeight_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetViewportSize_Click() : AnnotatedScrollBarSummaryPage
  • BtnGetViewportWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnGetWidth_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , ScrollPresenterStackPanelAnchoringPage
  • btnGetWidth_Click() : DynamicPage
  • BtnGetYearCount_Click() : ItemsViewIntegrationPage
  • BtnGetZoomChainMode_Click() : ScrollViewDynamicPage
  • btnGetZoomFactor_Click() : DynamicPage
  • BtnGetZoomFactor_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollPresenterDynamicPage
  • BtnGetZoomMode_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • BtnInsert1_Click() : NonVirtualStackLayoutSamplePage
  • BtnInsert2_Click() : NonVirtualStackLayoutSamplePage
  • BtnInsert_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnInsertChild_Click() : LinedFlowLayoutDemo
  • BtnInsertItems_Click() : ItemsViewInteractiveTestsPage
  • BtnInsertItemsFromBeginning_Click() : NavigationViewMenuItemsSourcePage
  • BtnInsertSelectorBarItem_Click() : SelectorBarSummaryPage
  • BtnInvalidateArrange_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnInvertSelection_Click() : ItemsViewSummaryPage
  • BtnIsSelected_Click() : ItemsViewSummaryPage
  • BtnItemsRepeaterElementInvalidateArrange_Click() : ItemsViewSummaryPage
  • BtnItemsRepeaterElementInvalidateMeasure_Click() : ItemsViewSummaryPage
  • BtnItemsViewStartBringItemIntoView_Click() : ItemsViewSummaryPage
  • BtnItemsViewStartBringItemIntoViewAsync_Click() : ItemsViewSummaryPage
  • BtnItemsViewTryGetItemIndex_Click() : ItemsViewSummaryPage
  • BtnLayoutInvalidateItemsInfo_Click() : LinedFlowLayoutDemo
  • BtnLayoutInvalidateMeasure_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnLayoutPanelResetLayout_Click() : LinedFlowLayoutDemo
  • BtnLayoutPanelSetLayout_Click() : LinedFlowLayoutDemo
  • BtnLinedFlowLayoutClearItemAspectRatios_Click() : ItemsViewSummaryPage
  • BtnLinedFlowLayoutGetLineIndex_Click() : ItemsViewSummaryPage
  • BtnLinedFlowLayoutInvalidateItemsInfo_Click() : ItemsViewSummaryPage
  • BtnLinedFlowLayoutLockItemToLine_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnLinedFlowLayoutUnlockItems_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnMIAddSnapPoint_Click() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • BtnMRAddSnapPoint_Click() : ScrollPresenterZoomSnapPointsPage , ScrollPresenterScrollSnapPointsPage
  • BtnOffsetPlus10With_Click() : ScrollPresenterScrollSnapPointsPage
  • BtnOffsetPlus10Without_Click() : ScrollPresenterScrollSnapPointsPage
  • BtnOpenNewMainPage_Click() : WindowPage
  • BtnOpenNewWindowRootPage_Click() : WindowPage
  • BtnPageShrinkSize_Click() : ListViewAnchoringPage
  • BtnParentDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnParentDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnParentItemsView_Click() : ItemsViewIntegrationPage
  • BtnParentMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnParentMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnPrePopulateLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnQueueContentHeight_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMargin_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMaxHeight_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMaxWidth_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMinHeight_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentMinWidth_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentPadding_Click() : ScrollPresenterDynamicPage
  • BtnQueueContentWidth_Click() : ScrollPresenterDynamicPage
  • BtnQueueDataSourceAddItem_Click() : ListViewBasePage , ItemsViewSummaryPage
  • BtnQueueDataSourceInsertItem_Click() : ListViewBasePage , ItemsViewSummaryPage
  • BtnQueueDataSourceRaiseResetNotification_Click() : ListViewBasePage
  • BtnQueueDataSourceRemoveAllItems_Click() : ListViewBasePage , ItemsViewSummaryPage
  • BtnQueueDataSourceRemoveItem_Click() : ListViewBasePage , ItemsViewSummaryPage
  • BtnQueueDataSourceReplaceItem_Click() : ItemsViewSummaryPage , ListViewBasePage
  • BtnQueueHeight_Click() : ScrollPresenterDynamicPage , ItemsViewSummaryPage
  • BtnQueueMaxZoomFactor_Click() : ScrollPresenterDynamicPage
  • BtnQueueMinZoomFactor_Click() : ScrollPresenterDynamicPage
  • BtnQueueWidth_Click() : ScrollPresenterDynamicPage , ItemsViewSummaryPage
  • btnRefreshAutomaticHorizontalOffsets_Click() : DynamicPage
  • btnRefreshAutomaticVerticalOffsets_Click() : DynamicPage
  • BtnReleaseDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnReleaseDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • btnReleaseParallaxView_Click() : DynamicPage
  • BtnRemove_Click() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnRemoveAll_Click() : ScrollPresenterScrollSnapPointsPage , ScrollPresenterZoomSnapPointsPage
  • BtnRemoveAllChildren_Click() : LinedFlowLayoutDemo
  • BtnRemoveAllSelectorBarItems_Click() : SelectorBarSummaryPage
  • BtnRemoveAt1_Click() : NonVirtualStackLayoutSamplePage
  • BtnRemoveAt2_Click() : NonVirtualStackLayoutSamplePage
  • BtnRemoveChild_Click() : LinedFlowLayoutDemo
  • BtnRemoveFirst_Click() : ScrollPresenterZoomSnapPointsPage , ScrollPresenterScrollSnapPointsPage
  • BtnRemoveItems_Click() : ItemsViewInteractiveTestsPage
  • BtnRemoveLastItemsSourceItem_Click() : ItemsViewIntegrationPage
  • BtnRemoveScrollPresenter_Click() : ScrollPresenterLeakDetectionPage
  • BtnRemoveSelectorBarItem_Click() : SelectorBarSummaryPage
  • btnReparentSource_Click() : DynamicPage
  • BtnReplace1_Click() : NonVirtualStackLayoutSamplePage
  • BtnReplace2_Click() : NonVirtualStackLayoutSamplePage
  • BtnReplace_Click() : ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage
  • BtnReplaceChild_Click() : LinedFlowLayoutDemo
  • BtnReplaceSelectorBarItem_Click() : SelectorBarSummaryPage
  • BtnReset_Click() : ScrollPresenterRepeaterAnchoringPage
  • BtnResetHorizontalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • BtnResetItemsSource_Click() : GroupedListViewBasePage , GroupedItemsControlPage , ItemsViewIntegrationPage , KeyboardNavigationSample
  • BtnResetLayoutForcedIndexBasedLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnResetListViewItemsSource_Click() : ListViewAnchoringPage
  • BtnResetScrollPresenterScrollControllers_Click() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • BtnResetScrollView_Click() : ItemsViewInteractiveTestsPage
  • BtnResetVerticalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • btnResetViews_Click() : ScrollPresenterChainingAndRailingPage , ScrollViewsWithSimpleContentsPage , ScrollPresentersWithSimpleContentsPage
  • BtnScrollBy_Click() : ScrollPresenterDynamicPage
  • BtnScrollerChangeViewToVerticalOffset_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToVerticalOffsetWithAnimation_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToVerticalScrollPercentage_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToZoomFactor_Click() : VariableSizedItemsPage
  • BtnScrollerChangeViewToZoomFactorWithAnimation_Click() : VariableSizedItemsPage
  • BtnScrollIntoView_Click() : GroupedListViewBasePage
  • BtnScrollPresenterOffsetChange_Click() : ScrollPresenterScrollSnapPointsPage
  • BtnScrollPresenterZoomFactorChange_Click() : ScrollPresenterZoomSnapPointsPage
  • BtnScrollTo_Click() : ScrollPresenterStackPanelAnchoringPage , ScrollPresenterDynamicPage
  • BtnScrollViewScrollTo_Click() : ItemsViewInteractiveTestsPage
  • BtnScrollViewZoomTo_Click() : ItemsViewInteractiveTestsPage
  • BtnSelect_Click() : ItemsViewSummaryPage
  • BtnSelectAll_Click() : ItemsViewSummaryPage
  • BtnSetAnchorElement_Click() : ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage
  • BtnSetAverageMonthCount_Click() : ItemsViewIntegrationPage
  • BtnSetBitmapImageDecodePixelHeight_Click() : ImagePage
  • BtnSetBitmapImageDecodePixelWidth_Click() : ImagePage
  • BtnSetBitmapImageUriSource_Click() : ImagePage
  • BtnSetBorderThickness_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnSetChildrenCount_Click() : LinedFlowLayoutDemo
  • BtnSetContentHeight_Click() : ScrollViewDynamicPage , ScrollViewerPage , ScrollViewWithScrollControllersPage , ScrollPresenterDynamicPage
  • BtnSetContentLayoutOffsetX_Click() : ScrollPresenterDynamicPage
  • BtnSetContentLayoutOffsetY_Click() : ScrollPresenterDynamicPage
  • BtnSetContentMargin_Click() : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewWithScrollControllersPage
  • BtnSetContentMaxHeight_Click() : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnSetContentMaxWidth_Click() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnSetContentMinHeight_Click() : ScrollViewerPage , ScrollViewDynamicPage , ScrollPresenterDynamicPage
  • BtnSetContentMinWidth_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ScrollViewDynamicPage
  • BtnSetContentOrientation_Click() : ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , ScrollViewDynamicPage
  • BtnSetContentPadding_Click() : ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewerPage
  • BtnSetContentWidth_Click() : ScrollViewerPage , ScrollViewWithScrollControllersPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • BtnSetCornerRadius_Click() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • BtnSetDetailLabelContent_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetHeight_Click() : ScrollViewDynamicPage
  • btnSetHeight_Click() : DynamicPage
  • BtnSetHeight_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewWithScrollControllersPage
  • BtnSetHorizontalAnchorRatio_Click() : ItemsViewSummaryPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • btnSetHorizontalOffset_Click() : DynamicPage
  • BtnSetHorizontalOffset_Click() : ItemsViewSummaryPage
  • BtnSetHorizontalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnSetHorizontalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnSetHorizontalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • BtnSetHorizontalScrollMode_Click() : ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , ScrollViewDynamicPage
  • BtnSetHorizontalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnSetHorizontalShift_Click() : DynamicPage
  • btnSetHorizontalSourceEndOffset_Click() : DynamicPage
  • btnSetHorizontalSourceStartOffset_Click() : DynamicPage
  • BtnSetIgnoredInputKinds_Click() : ScrollViewDynamicPage
  • BtnSetImageHeight_Click() : ImagePage
  • BtnSetImageHorizontalAlignment_Click() : ImagePage
  • BtnSetImageMargin_Click() : ImagePage
  • BtnSetImageMaxHeight_Click() : ImagePage
  • BtnSetImageMaxWidth_Click() : ImagePage
  • BtnSetImageMinHeight_Click() : ImagePage
  • BtnSetImageMinWidth_Click() : ImagePage
  • BtnSetImageParentHeight_Click() : ImagePage
  • BtnSetImageParentWidth_Click() : ImagePage
  • BtnSetImageStretch_Click() : ImagePage
  • BtnSetImageVerticalAlignment_Click() : ImagePage
  • BtnSetImageWidth_Click() : ImagePage
  • BtnSetItemsControlTabNavigation_Click() : FlatItemsControlPage , GroupedItemsControlPage
  • BtnSetItemsControlXYFocusKeyboardNavigation_Click() : FlatItemsControlPage , GroupedItemsControlPage
  • BtnSetItemsPanelCacheLength_Click() : GroupedListViewBasePage
  • BtnSetItemsPanelGroupHeaderPlacement_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnSetItemsPanelGroupPadding_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnSetItemsPanelMargin_Click() : FlatItemsControlPage , GroupedItemsControlPage , ListViewBasePage , GroupedListViewBasePage
  • BtnSetItemsPanelOrientation_Click() : FlatItemsControlPage , GroupedListViewBasePage , ListViewBasePage , GroupedItemsControlPage
  • BtnSetItemsRepeaterElementHeight_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementIsEnabled_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMaxHeight_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMaxWidth_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMinHeight_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementMinWidth_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterElementWidth_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterHorizontalAlignment_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterHorizontalCacheLength_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterItemContainerCanUserInvoke_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterItemContainerCanUserSelect_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterItemContainerIsSelected_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterLogItemIndexDbg_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterVerticalAlignment_Click() : ItemsViewSummaryPage
  • BtnSetItemsRepeaterVerticalCacheLength_Click() : ItemsViewSummaryPage , VariableSizedItemsPage
  • BtnSetItemsSource_Click() : ItemsViewIntegrationPage , KeyboardNavigationSample , GroupedItemsControlPage , GroupedListViewBasePage
  • BtnSetItemsStackPanelCacheLength_Click() : NestedGridViewsPage
  • BtnSetItemsStackPanelItemsUpdatingScrollMode_Click() : ListViewAnchoringPage
  • BtnSetItemsWrapGridCacheLength_Click() : GroupedItemsControlPage
  • BtnSetItemsWrapGridItemHeight_Click() : GroupedListViewBasePage , GroupedItemsControlPage
  • BtnSetItemsWrapGridItemWidth_Click() : GroupedItemsControlPage , GroupedListViewBasePage
  • BtnSetLayoutForcedIndexBasedLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnSetLayoutPanelBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementIsEnabled_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMinHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementMinWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelElementWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelHorizontalAlignment_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelMargin_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelPadding_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelVerticalAlignment_Click() : LinedFlowLayoutDemo
  • BtnSetLayoutPanelWidth_Click() : LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnSetLinedFlowLayoutLineHeight_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutLineSpacing_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutLogItemIndexDbg_Click() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • BtnSetLinedFlowLayoutMinItemSpacing_Click() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • BtnSetListViewBaseReorderMode_Click() : ListViewBasePage
  • BtnSetListViewBaseSelectionMode_Click() : ListViewBasePage , GroupedListViewBasePage
  • BtnSetListViewBaseTabNavigation_Click() : ListViewBasePage , GroupedListViewBasePage
  • BtnSetListViewFlatItemsSource_Click() : ListViewAnchoringPage
  • BtnSetListViewGroupedItemsSource_Click() : ListViewAnchoringPage
  • BtnSetListViewItemHeight_Click() : ListViewAnchoringPage
  • BtnSetMargin_Click() : ScrollViewerPage , SelectorBarSummaryPage , ScrollViewDynamicPage , ItemsViewSummaryPage
  • BtnSetMaxHeight_Click() : ScrollViewerPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , SelectorBarSummaryPage
  • btnSetMaxHorizontalShiftRatio_Click() : DynamicPage
  • BtnSetMaximum_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetMaxPosition_Click() : ScrollPresenterDynamicPage
  • BtnSetMaxPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • btnSetMaxVerticalShiftRatio_Click() : DynamicPage
  • BtnSetMaxWidth_Click() : SelectorBarSummaryPage , ScrollPresenterDynamicPage , ScrollViewerPage , ItemsViewSummaryPage
  • BtnSetMaxZoomFactor_Click() : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • BtnSetMinimum_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetMinPosition_Click() : ScrollPresenterDynamicPage
  • BtnSetMinPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • BtnSetMinZoomFactor_Click() : ScrollPresenterDynamicPage , ScrollViewerPage , ScrollViewDynamicPage
  • BtnSetModernCollectionBasePanelGroupHeaderPlacement_Click() : ListViewAnchoringPage
  • BtnSetModernCollectionBasePanelGroupPadding_Click() : ListViewAnchoringPage
  • BtnSetModernCollectionBasePanelVerticalAlignment_Click() : ListViewAnchoringPage
  • BtnSetNumLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetOffsetBetweenLabels_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetOffsetsChangeVelocityParameters_Click() : ScrollPresenterPage
  • BtnSetPadding_Click() : ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , ScrollViewerPage , SelectorBarSummaryPage , ScrollViewDynamicPage
  • BtnSetPageSize_Click() : ListViewAnchoringPage
  • BtnSetPositionExpressionAnimationExpression_Click() : ScrollPresenterDynamicPage
  • btnSetSCHeight_Click() : DynamicPage
  • BtnSetScrollerVerticalAnchorRatio_Click() : VariableSizedItemsPage
  • BtnSetScrollPercent_Click() : ScrollPresenterAccessibilityPage
  • BtnSetScrollPresenterScrollControllers_Click() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • BtnSetScrollViewBorderThickness_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewContentOrientation_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewCornerRadius_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewerHorizontalScrollMode_Click() : GroupedListViewBasePage
  • BtnSetScrollViewerVerticalAnchorRatio_Click() : ListViewAnchoringPage
  • BtnSetScrollViewerVerticalOffset_Click() : ListViewAnchoringPage
  • BtnSetScrollViewerVerticalScrollMode_Click() : GroupedListViewBasePage
  • BtnSetScrollViewHeight_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalOffset_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewHorizontalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewMargin_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewMaxHeight_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewMaxWidth_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewPadding_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalAnchorRatio_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalConstantVelocity_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalOffset_Click() : ItemsViewIntegrationPage , LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalScrollBarVisibility_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewVerticalScrollMode_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewWidth_Click() : LinedFlowLayoutDemo
  • BtnSetScrollViewZoomMode_Click() : LinedFlowLayoutDemo
  • btnSetSCWidth_Click() : DynamicPage
  • BtnSetSelectorBarItemChild_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemForeground_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemIcon_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemIsEnabled_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemIsSelected_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemMargin_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemPadding_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemText_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarItemVisibility_Click() : SelectorBarSummaryPage
  • BtnSetSelectorBarSelectedItem_Click() : SelectorBarSummaryPage
  • BtnSetSmallChange_Click() : AnnotatedScrollBarSummaryPage
  • BtnSetStackLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnSetStackLayoutSpacing_Click() : ItemsViewSummaryPage
  • BtnSetStackPanelVerticalAlignment_Click() : ListViewAnchoringPage
  • btnSetTEHeight_Click() : DynamicPage
  • btnSetTEMargin_Click() : DynamicPage
  • btnSetTEMaxHeight_Click() : DynamicPage
  • btnSetTEMaxWidth_Click() : DynamicPage
  • btnSetTEWidth_Click() : DynamicPage
  • BtnSetUniformGridLayoutMaximumRowsOrColumns_Click() : ItemsViewSummaryPage
  • BtnSetUniformGridLayoutMinColumnSpacing_Click() : ItemsViewSummaryPage
  • BtnSetUniformGridLayoutMinRowSpacing_Click() : ItemsViewSummaryPage
  • BtnSetUniformGridLayoutOrientation_Click() : ItemsViewSummaryPage
  • BtnSetVerticalAnchorRatio_Click() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • BtnSetVerticalConstantVelocity_Click() : ItemsViewSummaryPage
  • BtnSetVerticalOffset_Click() : ItemsViewSummaryPage
  • btnSetVerticalOffset_Click() : DynamicPage
  • BtnSetVerticalScrollBarVisibility_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • BtnSetVerticalScrollChainMode_Click() : ScrollViewDynamicPage
  • BtnSetVerticalScrollController_Click() : ScrollPresenterWithSimpleScrollControllersPage
  • BtnSetVerticalScrollMode_Click() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage , ScrollViewDynamicPage
  • BtnSetVerticalScrollRailMode_Click() : ScrollViewDynamicPage
  • btnSetVerticalShift_Click() : DynamicPage
  • btnSetVerticalSourceEndOffset_Click() : DynamicPage
  • btnSetVerticalSourceStartOffset_Click() : DynamicPage
  • BtnSetViewportSize_Click() : AnnotatedScrollBarSummaryPage
  • btnSetWidth_Click() : DynamicPage
  • BtnSetWidth_Click() : ScrollViewWithScrollControllersPage , ScrollViewerPage , ScrollPresenterDynamicPage , ItemsViewSummaryPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • BtnSetYearCount_Click() : ItemsViewIntegrationPage
  • BtnSetZoomChainMode_Click() : ScrollViewDynamicPage
  • BtnSetZoomFactor_Click() : ItemsViewSummaryPage
  • btnSetZoomFactor_Click() : DynamicPage
  • BtnSetZoomFactorChangeVelocityParameters_Click() : ScrollPresenterPage
  • BtnSetZoomMode_Click() : ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , ScrollViewDynamicPage
  • BtnShareLinedFlowLayout_Click() : ItemsViewSummaryPage
  • BtnShrink_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnShrinkMore_Click() : ScrollPresenterStackPanelAnchoringPage
  • BtnSourceAppendItem_Click() : ListViewAnchoringPage
  • BtnSourceInsertItem_Click() : ListViewAnchoringPage
  • BtnSourceRemoveFirstItem_Click() : ListViewAnchoringPage
  • BtnSourceRemoveLastItem_Click() : ListViewAnchoringPage
  • BtnStartBringIntoView_Click() : ScrollViewBringIntoViewPage , ScrollPresenterBringIntoViewPage
  • BtnSwitchOuterListViewVisibility_Click() : NestedGridViewsPage
  • BtnSwitchScroller_Click() : VariableSizedItemsPage
  • BtnSwitchVariability_Click() : VariableSizedItemsPage
  • BtnUnparentDiscardItemsView_Click() : ItemsViewIntegrationPage
  • BtnUnparentDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnUnparentDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnUnparentItemsView_Click() : ItemsViewIntegrationPage
  • BtnUnparentMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnUnparentMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnUnparentReparentItemsView_Click() : ItemsViewIntegrationPage
  • BtnUnparentReparentMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnUnparentReparentMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • btnUnparentSource_Click() : DynamicPage
  • BtnUseDynamicItemsView_Click() : ItemsViewSummaryPage
  • BtnUseDynamicScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnUseMarkupItemsView_Click() : ItemsViewSummaryPage
  • BtnUseMarkupScrollPresenter_Click() : ScrollPresenterDynamicPage
  • BtnZoomBy_Click() : ScrollPresenterDynamicPage
  • BtnZoomFactorPlus1With_Click() : ScrollPresenterZoomSnapPointsPage
  • BtnZoomFactorPlus1Without_Click() : ScrollPresenterZoomSnapPointsPage
  • BtnZoomTo_Click() : ScrollPresenterDynamicPage
  • BuildAcrylicBrushCompositionEffectFactoryKey() : MaterialHelperBase
  • BuildAllRegressionTestScenarios() : RegressionTestScenario
  • BuildEffectString() : TreeViewList
  • BuildHierarchicalNavRegressionTestScenarios() : RegressionTestScenario
  • BuildIsChildSelectedString() : HierarchicalNavigationViewMarkup
  • BuildLeftNavRegressionTestScenarios() : RegressionTestScenario
  • BuildTestScenarios() : RegressionTestScenario
  • BuildTopNavRegressionTestScenarios() : RegressionTestScenario
  • BuildTreeCompleted() : RepeaterTestHooks , MUXControlsTestHooks , RepeaterTestHooks
  • BuildTreeCompletedImpl() : MUXControlsTestHooks , RepeaterTestHooks , MUXControlsTestHooks , RepeaterTestHooks
  • BumperNavigation() : NavigationView
  • Button() : AnimatedVisualPlayerTests
  • Button_Click() : TreeViewSample , RatingControlPage
  • Button_click() : NavigationViewSelectedItemEdgeCasePage
  • ButtonFlyoutPlacement() : InkToolBar , InkToolBarProperties , InkToolBar , InkToolBarProperties
  • ButtonFlyoutPlacementProperty() : InkToolBarProperties
  • ButtonInteractionInvokedEventArgs() : ButtonInteractionInvokedEventArgs
  • ButtonInteractionPage() : ButtonInteractionPage
  • ButtonInteractionProperties() : ButtonInteractionProperties
  • ButtonInteractionTestSetup() : ButtonInteractionTests
  • ButtonListPager_SelectedIndexChanged() : PipsPagerExamples
  • ButtonListScrollViewer_ViewChanged() : PipsPagerExamples
  • ButtonPanelAlwaysShowFirstLastPageIndex() : PagerControlProperties
  • ButtonPanelAlwaysShowFirstLastPageIndexProperty() : PagerControlProperties
  • ButtonVisibilityOptionsTest() : PagerControlTestBase
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- c -

  • CacheFirstTabSelectedBackgroundPathFill() : TabViewPage
  • CacheLocalizedStringResources() : CommandBarFlyoutCommandBar
  • CacheOriginalVerticalScrollControllerAndVisibility() : ItemsView
  • CalculateActualRatingWidth() : RatingControl
  • CalculateAvailableSize() : UniformGridLayoutState
  • CalculateColumns() : ColumnMajorUniformToLargestGridLayout
  • CalculateExtraPixelsInLine() : UniformGridLayoutState
  • CalculateLayoutBoundsForRow() : ActivityFeedLayout
  • CalculateScrollViewerSize() : PipsPager
  • CalculateStarCenter() : RatingControl
  • CalculateTotalRatingControlWidth() : RatingControl
  • CalculateWidthForItems() : TopNavigationViewDataProvider
  • CalendarDatePickerPage() : CalendarDatePickerPage
  • CalendarView_CalendarViewDayItemChanging() : CalendarViewPage
  • CalendarViewPage() : CalendarViewPage
  • CallInfo() : ItemCollectionTransitionProviderTests::CallInfo
  • CanAddAndRemoveSnapPointsFromAScrollPresenter() : ScrollPresenterTests
  • CanAddSameSwipeItemsInBothSidesHorizontal() : SwipeControlTests
  • CanAddScrollSnapPointsWithMixedAlignments() : ScrollPresenterTests
  • CanBindSelectedItem() : ItemsViewTests
  • CanBoldTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanBringIntoViewElements() : EffectiveViewportScrollPresenterTests , EffectiveViewportTests , ViewportTests
  • CanBringItemIntoView() : ItemsViewTests
  • Cancel() : NavigationViewPaneClosingEventArgs , ScrollingBringingIntoViewEventArgs , TabViewTabDragStartingEventArgs , TeachingTipClosingEventArgs , TreeViewDragItemsStartingEventArgs , AnnotatedScrollBarScrollingEventArgs , InfoBarClosingEventArgs
  • CancelCurrentPressStateContinuation() : RevealHoverLight
  • CancelFallbackAnimationCompleteWait() : AcrylicBrush
  • cancelScrollingEvent_Checked() : AnnotatedScrollBarSummaryPage
  • cancelScrollingEvent_Unchecked() : AnnotatedScrollBarSummaryPage
  • CanChangeColorThroughHexTextEntry() : ColorPickerTests
  • CanChangeColorThroughHsvTextEntry() : ColorPickerTests
  • CanChangeColorThroughOpacityTextEntry() : ColorPickerTests
  • CanChangeColorThroughRgbTextEntry() : ColorPickerTests
  • CanChangeFocusAfterUniqueIdReset() : ViewManagerTests
  • CanChangeLayoutProperty() : ItemsViewTests
  • CanChangeSelectionModeProperty() : ItemsViewTests
  • CanChangeSourceAfterState() : AnimatedIconTests
  • CanClearEveryValueTest() : RatingControlTests
  • CanClearItemsWithoutCrashing() : SwipeControlTests
  • CanCopyTextFromRichEditBox() : TextCommandBarFlyoutTests
  • CanCopyTextFromRichTextBlock() : TextCommandBarFlyoutTests
  • CanCopyTextFromTextBlock() : TextCommandBarFlyoutTests
  • CanCopyTextFromTextBox() : TextCommandBarFlyoutTests
  • CanCreateFromIBindableIterable() : InspectingDataSourceTests
  • CanCreateFromInccIBindableVector() : InspectingDataSourceTests
  • CanCreateFromIObservableVector() : InspectingDataSourceTests
  • CanCutCopyTextFrom() : TextCommandBarFlyoutTests
  • CanCutTextFromRichEditBox() : TextCommandBarFlyoutTests
  • CanCutTextFromTextBox() : TextCommandBarFlyoutTests
  • CandidateInfo() : ItemsRepeaterScrollHost::CandidateInfo
  • CanDoSelectionChangedOfItemTemplate() : FocusBehaviorTests
  • CanDragItemContainerAfterPan() : ItemsViewTestsWithInputHelper
  • CanDragItems() : TreeViewProperties
  • CanDragItemsProperty() : TreeViewProperties
  • CanDragTabs() : TabViewProperties
  • CanDragTabsProperty() : TabViewProperties
  • CanExecute() : TestCommand , MyCommand , TestCommand
  • CanExecuteCheckBox_Checked() : SplitButtonPage
  • CanExecuteCheckBox_Unchecked() : SplitButtonPage
  • CanExpandTreeViewItemWithItemSourceSet() : TreeViewTests
  • CanExtendSelectionModelINPC() : SelectionModelTests
  • CanGoBack() : WebView2Properties
  • CanGoBackProperty() : WebView2Properties
  • CanGoForward() : WebView2Properties
  • CanGoForwardProperty() : WebView2Properties
  • CanGrowCacheBuffer() : EffectiveViewportScrollPresenterTests , ViewportTests
  • CanGrowCacheBufferWithScrollViewer() : EffectiveViewportTests
  • CanHideCommandBarFlyoutInFlyoutClosedHandler() : CommandBarFlyoutTests
  • CanInstantiate() : RefreshVisualizerTests , ScrollViewerAdapterTests
  • CanItalicizeTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanMoveItem() : FlowLayoutCollectionChangeTests
  • CanPasteTextTo() : TextCommandBarFlyoutTests
  • CanPasteTextToPasswordBox() : TextCommandBarFlyoutTests
  • CanPasteTextToRichEditBox() : TextCommandBarFlyoutTests
  • CanPasteTextToTextBox() : TextCommandBarFlyoutTests
  • CanPinFocusedElements() : ViewManagerTests
  • CanQueryElementFactory() : ViewManagerTests
  • CanRaiseItemInvoked() : ItemContainer , ItemsView
  • CanRead() : CustomProperty
  • CanReadSelectedItemViaICustomPropertyProvider() : SelectionModelTests
  • CanRemoveAndInsertItemsInRealizedRange() : FlowLayoutCollectionChangeTests
  • CanRemoveItemsAfterRealizedRange() : FlowLayoutCollectionChangeTests
  • CanRemoveItemsStartingBeforeRealizedRange() : FlowLayoutCollectionChangeTests
  • CanRemoveItemsStartingInRealizedRange() : FlowLayoutCollectionChangeTests
  • CanReorderItems() : TreeViewProperties
  • CanReorderItemsProperty() : TreeViewProperties
  • CanReorderTabs() : TabViewProperties , TabViewTearOutTests
  • CanReorderTabsProperty() : TabViewProperties
  • CanReorderTabsWithTabTearOutWithDataItems() : TabViewTests
  • CanReorderTabsWithTabTearOutWithoutDataItems() : TabViewTests
  • CanReplaceItem() : SelectionModelTests
  • CanReplaceSingleItem() : FlowLayoutCollectionChangeTests
  • CanReuseElementsDuringUniqueIdReset() : ViewManagerTests
  • CanScroll() : AnnotatedScrollBar , ScrollBarController
  • CanScrollChanged() : ScrollBarController , AnnotatedScrollBar , ScrollBarController
  • CanScrollDown() : ScrollView
  • CanScrollHorizontallyInDirection() : ScrollView
  • CanScrollInDirection() : ScrollView
  • CanScrollLeft() : ScrollView
  • CanScrollRight() : ScrollView
  • CanScrollUp() : ScrollView
  • CanScrollVertically() : ItemsView
  • CanScrollVerticallyInDirection() : ScrollView
  • CanSelect() : SelectorBase
  • CanSelectAllIn() : TextCommandBarFlyoutTests
  • CanSelectAllInPasswordBox() : TextCommandBarFlyoutTests
  • CanSelectAllInRichEditBox() : TextCommandBarFlyoutTests
  • CanSelectAllInRichTextBlock() : TextCommandBarFlyoutTests
  • CanSelectAllInTextBlock() : TextCommandBarFlyoutTests
  • CanSelectAllInTextBox() : TextCommandBarFlyoutTests
  • CanSelectColorFromSpectrum() : ColorPickerTests
  • CanSelectColorFromSpectrumLTR() : ColorPickerTests
  • CanSelectColorFromSpectrumRTL() : ColorPickerTests
  • CanSelectItemInFlyoutAndNVIGetsCollapsedOnFlyoutClose() : SelectionTests
  • CanSelectMultiple() : ItemsViewAutomationPeer , NavigationViewAutomationPeer , PagerControlAutomationPeer , PipsPagerAutomationPeer , TabViewAutomationPeer , TreeViewListAutomationPeer
  • CanSelectNavigationViewItemWithChildren() : SelectionTests
  • CanSelectPreviousColor() : ColorPickerTests
  • CanSelectSuggestion() : AutoSuggestBox
  • CanSelectTabs() : TabViewTearOutTests
  • CanSelectTabsWithTabTearOutWithDataItems() : TabViewTests
  • CanSelectTabsWithTabTearOutWithoutDataItems() : TabViewTests
  • CanSetItemContainerIsSelectedProperty() : ItemsViewTests
  • CanSetItemsSource() : RepeaterTests
  • CanSetItemTemplateAfterItemsSourceProperty() : ItemsViewTests
  • CanSetStateOnAnimatedIconDirectlyWithoutPropagationToChild() : AnimatedIconTests
  • CanShareSnapPointsInMultipleCollections() : ScrollPresenterTests
  • CanSlideHorizontally() : SliderInteractionTests
  • CanSlideHorizontallyWithKeyboard() : SliderInteractionTests
  • CanSlideVertically() : SliderInteractionTests
  • CanSlideVerticallyWithKeyboard() : SliderInteractionTests
  • CanStyleTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanSwipeAndTapBothItemsHorizontal() : SwipeControlTests
  • CanSwipeAndTapFirstRevealedItemHorizontal() : SwipeControlTests
  • CanSwipeAndTapFirstRevealedItemVertical() : SwipeControlTests
  • CanSwipeAndTapSecondRevealedItemVertical() : SwipeControlTests
  • CanSwipeAndTapSecondtRevealedItemHorizontal() : SwipeControlTests
  • CanSwipeBackFromAnOpenedSwipe() : SwipeControlTests
  • CanSwipeMultipleItemsWithSameSwipeService() : SwipeControlTests
  • CanSwipeOtherDirectionAfterClosingAnOpenedSwipe() : SwipeControlTests
  • CanSwipeToExecuteHorizontal() : SwipeControlTests
  • CanSwipeToExecuteVertical() : SwipeControlTests
  • CanSwitchShouldConstrainToRootBounds() : TeachingTipTests
  • CanTapOnPrimaryItems() : CommandBarFlyoutTests
  • CanTapOnSecondaryItems() : CommandBarFlyoutTests
  • CanTapOnSecondaryItemWithFlyoutWithoutClosing() : CommandBarFlyoutTests
  • CanTearOutAndRejoinTabs() : TabViewTearOutTests
  • CanTearOutAndRejoinTabsWithDataItems() : TabViewTests
  • CanTearOutAndRejoinTabsWithoutDataItems() : TabViewTests
  • CanTearOutTabs() : TabViewProperties
  • CanTearOutTabsProperty() : TabViewProperties
  • CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedHorizontal() : SwipeControlTests
  • CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedVertical() : SwipeControlTests
  • CanUnderlineTextInARichEditBox() : TextCommandBarFlyoutTests
  • CanUndoAndRedoIn() : TextCommandBarFlyoutTests
  • CanUndoAndRedoInRichEditBox() : TextCommandBarFlyoutTests
  • CanUndoAndRedoInTextBox() : TextCommandBarFlyoutTests
  • CanUseItemsSourceWithItemContainers() : ItemsViewTests
  • CanUseKeyboardToInteractColorSpectrumRTL() : ColorPickerTests
  • CanUseKeyboardToInteractSlidersRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithColorSpectrum() : ColorPickerTests
  • CanUseKeyboardToInteractWithColorSpectrumLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithSliders() : ColorPickerTests
  • CanUseKeyboardToInteractWithSlidersLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithSlidersLTRHorizontalOrientation() : ColorPickerTests
  • CanUseKeyboardToInteractWithSlidersRTLHorizontalOrientation() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForAlpha() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForAlphaLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForAlphaRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHex() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHexLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHexRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHSV() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHSVLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForHSVRTL() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForRGB() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForRGBLTR() : ColorPickerTests
  • CanUseKeyboardToInteractWithTextBoxesForRGBRTL() : ColorPickerTests
  • CanUserInvoke() : ItemContainerProperties
  • CanUserInvokeComboBox_SelectionChanged() : ItemContainerSummaryPage
  • CanUserInvokeInternal() : ItemContainer
  • CanUserInvokeProperty() : ItemContainerProperties
  • CanUserSelect() : ItemContainerProperties
  • CanUserSelectComboBox_SelectionChanged() : ItemContainerSummaryPage
  • CanUserSelectInternal() : ItemContainer
  • CanUserSelectProperty() : ItemContainerProperties
  • CanvasGeometry() : CanvasGeometry
  • CanvasGeometryToIGeometrySource2D() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • CanvasScrollControllerConsumer() : CanvasScrollControllerConsumer
  • CanWrite() : CustomProperty
  • Caption() : RatingControlProperties
  • CaptionProperty() : RatingControlProperties
  • CastOrUnbox() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • Category() : Category
  • CB_Closed() : CommandBarSummaryPage
  • CB_Opened() : CommandBarSummaryPage
  • cbComplexBackground_Toggled() : AcrylicRenderingPage
  • cbToggleFallbackColor_Toggled() : AcrylicRenderingPage
  • Center() : MapControlProperties , RadialGradientBrushProperties
  • CenterButton_Click() : MapControlPage
  • CenterPoint() : ScrollingZoomAnimationStartingEventArgs , ZoomFactorChange , ZoomFactorChangeWithAdditionalVelocity
  • CenterProperty() : MapControlProperties , RadialGradientBrushProperties
  • ChainedHoverLightStateValuesValidationHelper() : RevealStatesPage
  • ChangeAlignmentButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • ChangeAlignmentOfDisconnectedParallaxViewChild() : ParallaxViewTests
  • ChangeBackgroundClick() : RefreshVisualizerPage
  • ChangeContent_Click() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ChangeContentOverlayVisibility_Click() : NavigationViewTopNavStorePage
  • ChangeCustomImagesTwoType_Click() : RatingControlPage
  • Changed() : AnnotatedScrollBarPanningInfo
  • ChangeDataSource() : TopNavigationViewDataProvider
  • ChangeDataSource_Click() : NavigationViewTopNavOnlyPage
  • ChangeFallbackGlyphButton_Click() : AnimatedIconPage
  • ChangeFlowDirection_Click() : TreeViewPage
  • ChangeFocusVisualKind_Click() : NavigationViewPage
  • ChangeForegroundClick() : RefreshVisualizerPage
  • ChangeGamesContent_Click() : NavigationViewTopNavOnlyPage
  • ChangeHeaderButton_Click() : NavigationViewCustomThemeResourcesPage
  • ChangeIsExpandedNavigationViewItem() : NavigationView
  • ChangeNumberOfPages() : PagerControlTestBase , PipsPagerTestBase
  • ChangeOffsetsBeforeLoading() : ScrollPresenterTests
  • ChangeOffsetsPrivate() : ScrollPresenter
  • ChangeOffsetsWhileBiDirectionalScrollControllerIsAttached() : ScrollPresenterTests
  • ChangeOffsetsWhileScrollControllersAreAttached() : ScrollPresenterTests
  • ChangeOffsetsWithAdditionalVelocityAndAttachedBiDirectionalScrollController() : ScrollPresenterTests
  • ChangeOffsetsWithAdditionalVelocityAndAttachedScrollControllers() : ScrollPresenterTests
  • ChangeOffsetsWithAdditionalVelocityPrivate() : ScrollPresenter
  • ChangeOffsetsWithAttachedBiDirectionalScrollController() : ScrollPresenterTests
  • ChangeOffsetsWithAttachedScrollControllers() : ScrollPresenterTests
  • ChangeOverflowLabelVisibility_Checked() : NavigationViewTopNavOnlyPage
  • ChangeOverflowLabelVisibility_Unchecked() : NavigationViewTopNavOnlyPage
  • ChangePaneHeader_Click() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • ChangePaneTitle_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ChangePaneTitleStyle_Click() : NavigationViewCustomThemeResourcesPage
  • ChangePaneTitleText_Click() : NavigationViewCustomThemeResourcesPage
  • ChangePaneVisibleButton_Click() : NavigationViewInitPage
  • ChangePropertyAfterParallaxViewDisposal() : ParallaxViewTests
  • ChangeRatingBy() : RatingControl
  • ChangeRefreshRequestedButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • ChangeScrollPresenterView() : ParallaxViewTests
  • ChangeScrollViewerView() : ParallaxViewTests
  • ChangeSelection() : NavigationView , NavigationViewItemAutomationPeer
  • ChangeSelectionAfterFlyout_Click() : TreeViewPage
  • ChangeSelectionInCode_Click() : NavigationViewTopNavStorePage
  • ChangeSelectStatusForItem() : NavigationView
  • ChangeShopTextButton_Click() : TabViewPage
  • ChangeSizeOfDisconnectedScrollViewerContent() : ParallaxViewTests
  • ChangeSourceAndTargetProperties() : ParallaxViewTests
  • ChangeSourceAndTargetPropertiesUsingScrollPresenter() : ParallaxViewTests
  • ChangeSourceAndTargetPropertiesUsingScrollViewer() : ParallaxViewTests
  • ChangeStateTest() : ProgressBarTests , ProgressRingTests
  • ChangeTestFrameVisibility() : NavigationViewRS3Page , RadioButtonsFocusPage , TeachingTipFocusPage
  • ChangeText() : SwipeControlPage
  • ChangeToIEnumerableButton_Clicks() : NavigationViewInitPage , NavigationViewTopNavStorePage
  • ChangeTopNavVisibility_Click() : NavigationViewTopNavOnlyPage , NavigationViewTopNavStorePage
  • ChangeValue_Click() : ProgressBarPage , ProgressBarReTemplatePage , ProgressRingCustomLottieSourcePage , ProgressRingPage
  • ChangeValueTest() : ProgressBarTests , ProgressRingTests
  • ChangeView() : ScrollPresenterDynamicPage
  • ChangeViewCalled() : ItemsRepeaterScrollHost::BringIntoViewState
  • ChangeViewOffset() : ItemsRepeaterScrollHost::BringIntoViewState
  • ChangeZoomFactorBeforeLoading() : ScrollPresenterTests
  • ChangeZoomFactorPrivate() : ScrollPresenter
  • ChangeZoomFactorWithAdditionalVelocityPrivate() : ScrollPresenter
  • ChangingDisplayModeTest() : PagerControlTests
  • ChangingSourcePropertyChangesRenderSize() : AnimatedIconTests
  • ChangingVisualTrees() : AnimatedIconTests
  • Check() : InfoBarTests , NumberBoxTests
  • CheckAndUpdateVisibility() : WebView2
  • CheckAndUpdateWebViewPosition() : WebView2
  • CheckAndUpdateWindowPosition() : WebView2
  • CheckBoxPage() : CheckBoxPage
  • CheckBoxSelectionState() : TreeViewItem
  • CheckCurrentItemDoesNotRaiseInvokeEvent() : BreadcrumbTests
  • Checked() : InkToolBarFlyoutItemProperties
  • CheckIfButtonsHiddenButtonClicked() : PagerControlPage
  • CheckLeaks() : ScrollViewerAdapterTests , ScrollViewerAdapterPage
  • CheckLeaks_Click() : ScrollViewerAdapterPage
  • CheckMenuItemsOffset_Click() : NavigationViewCompactPaneLengthTestPage
  • CheckMutationCount() : HashMap< K, V >::Iterator
  • CheckSelectedItemEdgeCase() : SelectionTests
  • CheckSpyingTicksRequirement() : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • CheckThread() : ReferenceTracker< D, ImplT, I >
  • CheckWebViewPixel() : WebView2RenderingVerifier
  • CheckWindowPixel() : WebView2RenderingVerifier
  • Child() : ItemContainerProperties , ParallaxViewProperties
  • Child_ElementPrepared() : BreadcrumbBarPage
  • ChildProperty() : ItemContainerProperties , ParallaxViewProperties
  • Children() : InkToolBarProperties , InkToolBar , NonVirtualizingLayoutContext , SelectionModelChildrenRequestedEventArgs , TreeViewNode
  • ChildrenChanged() : TreeViewNode
  • ChildrenCollection() : VirtualLayoutContextAdapter::ChildrenCollection< T >
  • ChildrenCore() : LayoutPanelLayoutContext , NonVirtualizingLayoutContext , VirtualLayoutContextAdapter
  • ChildrenInTabFocusOrderIterable() : ChildrenInTabFocusOrderIterable
  • ChildrenInTabFocusOrderIterator() : ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
  • ChildrenNodeCount() : final
  • ChildrenProperty() : InkToolBarProperties
  • ChildrenRequested() : SelectionModelProperties
  • ChildVectorChanged() : TreeViewNode
  • ChkAllowDrop_Checked() : TabViewTabItemsSourcePage
  • ChkAllowDrop_Unchecked() : TabViewTabItemsSourcePage
  • ChkAnnotatedScrollBarIsEnabled_IsCheckedChanged() : ItemsViewIntegrationPage
  • chkAreHorizontalSourceOffsetsRelative_Checked() : DynamicPage
  • chkAreHorizontalSourceOffsetsRelative_Unchecked() : DynamicPage
  • chkAreVerticalSourceOffsetsRelative_Checked() : DynamicPage
  • chkAreVerticalSourceOffsetsRelative_Unchecked() : DynamicPage
  • ChkAutoHideScrollControllers_Checked() : ScrollViewDynamicPage
  • ChkAutoHideScrollControllers_Indeterminate() : ScrollViewDynamicPage
  • ChkAutoHideScrollControllers_Unchecked() : ScrollViewDynamicPage
  • ChkBringIntoViewUI_Checked() : ScrollViewBringIntoViewPage
  • ChkBringIntoViewUI_Unchecked() : ScrollViewBringIntoViewPage
  • ChkCanDrag_Checked() : TabViewTabItemsSourcePage
  • ChkCanDrag_Unchecked() : TabViewTabItemsSourcePage
  • ChkCanDragItems_Checked() : TabViewTabItemsSourcePage
  • ChkCanDragItems_Unchecked() : TabViewTabItemsSourcePage
  • ChkCanReorderItems_Checked() : TabViewTabItemsSourcePage
  • ChkCanReorderItems_Unchecked() : TabViewTabItemsSourcePage
  • ChkChildrenProperties_Checked() : ItemsViewSummaryPage
  • ChkChildrenProperties_Unchecked() : ItemsViewSummaryPage
  • ChkContentProperties_Checked() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkContentProperties_Unchecked() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkCustomUI_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ScrollViewBlankPage
  • ChkCustomUI_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ScrollViewBlankPage
  • ChkDataSource_Checked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • ChkDataSource_Unchecked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • ChkEvents_Checked() : LinedFlowLayoutDemo
  • ChkEvents_Unchecked() : LinedFlowLayoutDemo
  • ChkGridViewIsEnabled_Checked() : CommonStylesPage
  • ChkGridViewIsEnabled_Unchecked() : CommonStylesPage
  • ChkHandleItemsInfoRequested_IsCheckedChanged() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage
  • ChkHorizontalOrientation_Checked() : ScrollPresenterStackPanelAnchoringPage
  • ChkHorizontalOrientation_Unchecked() : ScrollPresenterStackPanelAnchoringPage
  • ChkImageParentProperties_Checked() : ImagePage
  • ChkImageParentProperties_Unchecked() : ImagePage
  • ChkImageProperties_Checked() : ImagePage
  • ChkImageProperties_Unchecked() : ImagePage
  • ChkIsAnimatingThumbOffset_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsAnimatingThumbOffset_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsBiDirectionalScrollControllerRailEnabled_Checked() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • ChkIsBiDirectionalScrollControllerRailEnabled_Unchecked() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • ChkIsContentEnabled_Checked() : ScrollViewWithScrollControllersPage
  • ChkIsContentEnabled_Unchecked() : ScrollViewWithScrollControllersPage
  • ChkIsContentTabStop_Checked() : ScrollViewWithScrollControllersPage
  • ChkIsContentTabStop_Unchecked() : ScrollViewWithScrollControllersPage
  • ChkIsEnabled_Checked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsEnabled_CheckedChanged() : SelectorBarSummaryPage
  • ChkIsEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkIsEnabled_Unchecked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsHorizontallyScrollable_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsHorizontallyScrollable_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsHorizontalRailEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkIsHorizontalScrollChainingEnabled_IsCheckedChanged() : ScrollViewerPage
  • chkIsHorizontalShiftClamped_Checked() : DynamicPage
  • chkIsHorizontalShiftClamped_Unchecked() : DynamicPage
  • ChkIsItemInvokedEnabled_Checked() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • ChkIsItemInvokedEnabled_Unchecked() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • chkIsRTL_Checked() : DynamicPage
  • chkIsRTL_Unchecked() : DynamicPage
  • ChkIsTabStop_Checked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsTabStop_CheckedChanged() : SelectorBarSummaryPage
  • ChkIsTabStop_IsCheckedChanged() : ScrollViewerPage
  • ChkIsTabStop_Unchecked() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkIsThumbPannable_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsThumbPannable_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsThumbPositionMirrored_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsThumbPositionMirrored_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVerticallyScrollable_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVerticallyScrollable_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVerticalRailEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkIsVerticalScrollChainingEnabled_IsCheckedChanged() : ScrollViewerPage
  • chkIsVerticalShiftClamped_Checked() : DynamicPage
  • chkIsVerticalShiftClamped_Unchecked() : DynamicPage
  • ChkIsVisible_Checked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsVisible_Unchecked() : ScrollPresenterWithCompositionScrollControllersPage
  • ChkIsZoomChainingEnabled_IsCheckedChanged() : ScrollViewerPage
  • ChkItemsControlIsTabStop_IsCheckedChanged() : GroupedItemsControlPage , FlatItemsControlPage
  • ChkItemsControlProperties_Checked() : FlatItemsControlPage
  • ChkItemsControlProperties_Unchecked() : FlatItemsControlPage
  • ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged() : GroupedItemsControlPage , GroupedListViewBasePage
  • ChkItemsRepeaterProperties_IsCheckedChanged() : ObjectModelTestPage
  • ChkItemsViewDataSource_Checked() : ItemsViewSummaryPage
  • ChkItemsViewDataSource_Unchecked() : ItemsViewSummaryPage
  • ChkItemsViewMethods_Checked() : ItemsViewSummaryPage
  • ChkItemsViewMethods_Unchecked() : ItemsViewSummaryPage
  • ChkItemsViewProperties_Checked() : ItemsViewSummaryPage
  • ChkItemsViewProperties_Unchecked() : ItemsViewSummaryPage
  • ChkLayoutPanel_Checked() : LinedFlowLayoutDemo
  • ChkLayoutPanel_Unchecked() : LinedFlowLayoutDemo
  • ChkLinedFlowLayout_Checked() : LinedFlowLayoutDemo
  • ChkLinedFlowLayout_Unchecked() : LinedFlowLayoutDemo
  • ChkLinedFlowLayoutHandleItemsInfoRequested_IsCheckedChanged() : LinedFlowLayoutDemo
  • ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLinedFlowLayoutShowLockedItems_Checked() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLinedFlowLayoutShowLockedItems_Unchecked() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkListViewBaseAllowDrop_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseCanDragItems_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseCanReorderItems_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseIsItemClickEnabled_IsCheckedChanged() : GroupedListViewBasePage , ListViewBasePage
  • ChkListViewBaseIsSwipeEnabled_IsCheckedChanged() : ListViewBasePage
  • ChkListViewBaseProperties_Checked() : ListViewBasePage
  • ChkListViewBaseProperties_Unchecked() : ListViewBasePage
  • ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged() : GroupedListViewBasePage , ListViewBasePage
  • ChkListViewIsEnabled_Checked() : CommonStylesPage
  • ChkListViewIsEnabled_Unchecked() : CommonStylesPage
  • ChkLog_Checked() : ScrollPresenterWithSimpleScrollControllersPage
  • ChkLog_Unchecked() : ScrollPresenterWithSimpleScrollControllersPage
  • ChkLogAnnotatedScrollBarEvents_Checked() : ItemsViewIntegrationPage
  • ChkLogAnnotatedScrollBarEvents_Unchecked() : ItemsViewIntegrationPage
  • ChkLogAnnotatedScrollBarMessages_Checked() : ItemsViewIntegrationPage
  • ChkLogAnnotatedScrollBarMessages_Unchecked() : ItemsViewIntegrationPage
  • ChkLogBringIntoViewRequestedEvents_Checked() : ScrollPresenterBringIntoViewPage
  • ChkLogBringIntoViewRequestedEvents_Unchecked() : ScrollPresenterBringIntoViewPage
  • ChkLogContentEffectiveViewportChangedEvent_Checked() : ScrollPresenterDynamicPage
  • ChkLogContentEffectiveViewportChangedEvent_Unchecked() : ScrollPresenterDynamicPage
  • ChkLogContentEvents_Checked() : ScrollViewDynamicPage
  • ChkLogContentEvents_Unchecked() : ScrollViewDynamicPage
  • ChkLogContentPointerEvents_Checked() : ScrollPresenterDynamicPage
  • ChkLogContentPointerEvents_Unchecked() : ScrollPresenterDynamicPage
  • ChkLogItemContainerMessages_Checked() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemContainerMessages_Unchecked() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterEvents_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterEvents_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterMessages_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsRepeaterMessages_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ObjectModelTestPage , SelectorBarSummaryPage
  • ChkLogItemsViewEvents_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsViewEvents_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsViewMessages_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogItemsViewMessages_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ChkLogLinedFlowLayoutEvents_Checked() : ItemsViewIntegrationPage
  • ChkLogLinedFlowLayoutEvents_Unchecked() : ItemsViewIntegrationPage
  • ChkLogLinedFlowLayoutMessages_Checked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLogLinedFlowLayoutMessages_Unchecked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ChkLogs_Checked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewBasePage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • ChkLogs_IsCheckedChanged() : ObjectModelTestPage
  • ChkLogs_Unchecked() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ImagePage , ListViewBasePage , ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage
  • ChkLogScrollPresenterEvents_Checked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollPresenterEvents_Unchecked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollPresenterMessages_Checked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogScrollPresenterMessages_Unchecked() : ItemsViewIntegrationPage , ScrollPresenterBringIntoViewPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterManipulationModePage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterScrollSnapPointsPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterZoomSnapPointsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogScrollViewEvents_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollViewEvents_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ChkLogScrollViewMessages_Checked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogScrollViewMessages_Unchecked() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage , ScrollViewWithScrollControllersPage
  • ChkLogSelectorBarEvents_Checked() : SelectorBarSummaryPage
  • ChkLogSelectorBarEvents_Unchecked() : SelectorBarSummaryPage
  • ChkLogSelectorBarMessages_Checked() : SelectorBarSummaryPage
  • ChkLogSelectorBarMessages_Unchecked() : SelectorBarSummaryPage
  • ChkLogSwipeControlMessages_Checked() : SwipeControlPage
  • ChkLogSwipeControlMessages_Unchecked() : SwipeControlPage
  • ChkMethods_Checked() : GroupedListViewBasePage
  • ChkMethods_Unchecked() : GroupedListViewBasePage
  • ChkModernCollectionBasePanelAreStickyGroupHeadersEnabled_IsCheckedChanged() : ListViewAnchoringPage
  • ChkOuterItemsControlIsTabStop_IsCheckedChanged() : NestedItemsControlsPage
  • ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged() : NestedGridViewsPage , NestedListViewsPage
  • ChkPageMethods_Checked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , SwipeControlPage2
  • ChkPageMethods_Unchecked() : ItemsViewIntegrationPage , ItemsViewSummaryPage , ScrollPresenterDynamicPage , SwipeControlPage2
  • ChkProperties_Checked() : GroupedItemsControlPage , GroupedListViewBasePage
  • ChkProperties_Unchecked() : GroupedItemsControlPage , GroupedListViewBasePage
  • ChkSample_CheckedChanged() : ListViewElementNameBindingPage , ItemTemplateDemo
  • ChkScrollPresenterAttachedProperties_Checked() : ScrollViewWithScrollControllersPage
  • ChkScrollPresenterAttachedProperties_Unchecked() : ScrollViewWithScrollControllersPage
  • ChkScrollPresenterClonedProperties_Checked() : ScrollViewDynamicPage
  • ChkScrollPresenterClonedProperties_Unchecked() : ScrollViewDynamicPage
  • ChkScrollPresenterEvents_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterEvents_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterMethods_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterMethods_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterProperties_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterProperties_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterTestHooks_Checked() : ScrollPresenterDynamicPage
  • ChkScrollPresenterTestHooks_Unchecked() : ScrollPresenterDynamicPage
  • ChkScrollView_Checked() : LinedFlowLayoutDemo
  • ChkScrollView_Unchecked() : LinedFlowLayoutDemo
  • ChkScrollViewContentFlowDirection_Checked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewContentFlowDirection_Unchecked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewerEvents_Checked() : ScrollViewerPage
  • ChkScrollViewerEvents_Unchecked() : ScrollViewerPage
  • ChkScrollViewerMethods_Checked() : ScrollViewerPage
  • ChkScrollViewerMethods_Unchecked() : ScrollViewerPage
  • ChkScrollViewerProperties_Checked() : ScrollViewerPage
  • ChkScrollViewerProperties_Unchecked() : ScrollViewerPage
  • ChkScrollViewFlowDirection_Checked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewFlowDirection_Unchecked() : ScrollViewWithRTLFlowDirectionPage
  • ChkScrollViewIsEnabled_Checked() : LinedFlowLayoutDemo
  • ChkScrollViewIsEnabled_Unchecked() : LinedFlowLayoutDemo
  • ChkScrollViewIsTabStop_Checked() : LinedFlowLayoutDemo
  • ChkScrollViewIsTabStop_Unchecked() : LinedFlowLayoutDemo
  • ChkScrollViewProperties_Checked() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkScrollViewProperties_Unchecked() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • ChkSelectorBarItems_Checked() : SelectorBarSummaryPage
  • ChkSelectorBarItems_Unchecked() : SelectorBarSummaryPage
  • ChkSelectorBarProperties_Checked() : SelectorBarSummaryPage
  • ChkSelectorBarProperties_Unchecked() : SelectorBarSummaryPage
  • ChkShowCurrentElement_Checked() : ItemsViewSummaryPage
  • ChkShowCurrentElement_Unchecked() : ItemsViewSummaryPage
  • ChkShowKeyboardNavigationReferenceOffset_Checked() : ItemsViewSummaryPage
  • ChkShowKeyboardNavigationReferenceOffset_Unchecked() : ItemsViewSummaryPage
  • ChkSwipeControlProperties_Checked() : SwipeControlPage2
  • ChkSwipeControlProperties_Unchecked() : SwipeControlPage2
  • ChkSwipeEvents_Checked() : SwipeControlPage2
  • ChkSwipeEvents_Unchecked() : SwipeControlPage2
  • ChkSwipeItemProperties_Checked() : SwipeControlPage2
  • ChkSwipeItemProperties_Unchecked() : SwipeControlPage2
  • ChkSwipeMethods_Checked() : SwipeControlPage2
  • ChkSwipeMethods_Unchecked() : SwipeControlPage2
  • ChkSwipeTestHooks_Checked() : SwipeControlPage2
  • ChkSwipeTestHooks_Unchecked() : SwipeControlPage2
  • ChkUseAnimator_Checked() : ScrollPresenterRepeaterAnchoringPage
  • ChkUseAnimator_Unchecked() : ScrollPresenterRepeaterAnchoringPage
  • ChkUseAppAnimator_IsCheckedChanged() : ItemsViewInteractiveTestsPage
  • ChkUseConstantMonthCount_IsCheckedChanged() : ItemsViewIntegrationPage
  • ChkUseFastPath_IsCheckedChanged() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage
  • ChkUseLeftHeader_IsCheckedChanged() : ScrollViewerPage
  • ChkUseTopHeader_IsCheckedChanged() : ScrollViewerPage
  • ChkUseTopLeftHeader_IsCheckedChanged() : ScrollViewerPage
  • ChooseFromComboBox() : AcrylicBrushTests , RevealBrushTests
  • ChooseTest() : WebView2Tests
  • CircleLayoutSamplePage() : CircleLayoutSamplePage
  • Clamp() : UniformGrid2DLayout
  • ClampOutput() : IArithmeticCompositeEffect , IColorMatrixEffect , IGammaTransferEffect , ILinearTransferEffect , ITintEffect
  • ClampSource() : IContrastEffect
  • ClassCleanup() : TabViewTearOutTests
  • ClassInitialize() : AnimatedVisualPlayerTests , AnnotatedScrollBarInteractionTests , AutoSuggestBox , BreadcrumbTests , ColorPickerTests , CommandBarFlyoutTests , TextCommandBarFlyoutTests , CommonStylesTests , DropDownButtonTests , ExpanderTests , ImageIconTests , InfoBarTests , ButtonInteractionTests , SliderInteractionTests , ItemContainerTests , ItemsViewTestsWithInputHelper , LayoutPanelTests , MapControlTests , AcrylicBrushTests , RevealBrushTests , MenuBarTests , CommonTests , EventTests , FocusBehaviorTests , PaneBehaviorTests , SelectionTests , TopModeTests , NumberBoxTests , PagerControlTests , ParallaxViewTests , PersonPictureTests , PipsPagerTests , ProgressBarTests , ProgressRingTests , RefreshContainerTests , ScrollViewerAdapterTests , RadialGradientBrushTests , RadioButtonsTests , RadioMenuFlyoutItemTests , RatingControlTests , RepeaterTests , ScrollPresenterTestsWithAutomationPeer , ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper , SelectorBarTests , SplitButtonTests , SwipeControlTests , TabViewTearOutTests , TabViewTests , TeachingTipTests , TitleBarTests , TreeViewTests , TwoPaneViewTests , WebView2Tests
  • CleanTransitionsBatch() : ItemCollectionTransitionProvider
  • CleanupCurrentTest() : WebView2BasicPage , WebView2CoreObjectsPage
  • CleanupIRefreshInfoProvider() : ScrollViewerIRefreshInfoProviderAdapter
  • CleanupScrollViewer() : ScrollViewerIRefreshInfoProviderAdapter
  • CleanupWebViewElements() : WebView2BasicPage , WebView2CoreObjectsPage
  • Clear() : HashMap< K, V > , VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SelectorBase , SplitVector< T, SplitVectorID > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , CustomItemsSource , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock , final , MyCollection , final , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • clear_Click() : FlatSample , TreeViewSample
  • ClearAllItemsViewItemContainerRevokers() : ItemsView
  • ClearAllNavigationViewItemBaseRevokers() : NavigationView
  • ClearAnchorCandidates() : ScrollPresenter
  • ClearButtonClick() : InfoBarPage
  • ClearCollectionsButton_Click() : PaneLayoutTestPage
  • ClearColorsButton_Click() : TabViewPage
  • ClearContactBtn_Click() : PersonPicturePage
  • ClearElement() : final
  • ClearElementImpl() : ItemsRepeater
  • ClearElementToAnimator() : final
  • ClearElementToElementFactory() : final
  • ClearElementToPinnedPool() : final
  • ClearElementToUniqueIdResetPool() : final
  • ClearEventTokenVectors() : ViewModel
  • ClearException_Click() : TreeViewPage
  • ClearFullLog() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ScrollViewsWithSimpleContentsPage , SelectorBarSummaryPage
  • ClearHeaderButton_Click() : NavigationViewRS4Page
  • ClearImageBtn_Click() : PersonPicturePage
  • ClearItemAspectRatios() : LinedFlowLayout
  • ClearItemInvokedTextButton_Click() : NavigationViewTopNavStorePage
  • ClearItemsViewItemContainerRevokers() : ItemsView
  • ClearLayer() : MapControl
  • ClearLinedFlowLayoutItemAspectRatios() : LayoutsTestHooks
  • ClearLocalizedStringResourceCache() : CommandBarFlyoutCommandBar
  • ClearMaterialHelperInstance() : LifetimeHandler
  • ClearMenuButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ClearNavigationViewItemBaseRevokers() : NavigationView
  • ClearNavItemContent_Click() : NavigationViewTopNavOnlyPage
  • ClearNodes_Click() : TreeViewPage
  • ClearOverlapCheck_Click() : TabViewPage
  • ClearPrimaryCommandsTimer_Tick() : CommandBarFlyoutPage
  • ClearProperties() : MenuBarItemProperties , MicaBackdropProperties , MonochromaticOverlayPresenterProperties , NavigationViewProperties , NavigationViewItemProperties , NavigationViewItemBaseProperties , NavigationViewItemPresenterProperties , NavigationViewItemPresenterTemplateSettingsProperties , NavigationViewTemplateSettingsProperties , NumberBoxProperties , PagerControlProperties , PagerControlTemplateSettingsProperties , ParallaxViewProperties , PersonPictureProperties , PersonPictureTemplateSettingsProperties , PipsPagerProperties , PipsPagerTemplateSettingsProperties , ProgressBarProperties , ProgressBarTemplateSettingsProperties , ProgressRingProperties , ProgressRingTemplateSettingsProperties , RadialGradientBrushProperties , RadioButtonsProperties , RadioMenuFlyoutItemProperties , RatingControlProperties , RatingItemFontInfoProperties , RatingItemImageInfoProperties , RecyclePoolProperties , RecyclingElementFactoryProperties , RefreshContainerProperties , RefreshVisualizerProperties , RevealBrushProperties , ScrollPresenterProperties , ScrollViewProperties , SelectionModelProperties , SelectorBarProperties , SelectorBarItemProperties , SliderInteractionProperties , SpectrumBrushProperties , SplitButtonProperties , StackLayoutProperties , SwipeControlProperties , SwipeItemProperties , SwipeItemsProperties , TabViewProperties , TabViewItemProperties , TabViewItemTemplateSettingsProperties , TeachingTipProperties , TeachingTipTemplateSettingsProperties , TitleBarProperties , TitleBarTemplateSettingsProperties , ToggleSplitButtonProperties , TreeViewProperties , TreeViewItemProperties , TreeViewItemTemplateSettingsProperties , TreeViewNodeProperties , TwoPaneViewProperties , UniformGridLayoutProperties , WebView2Properties , XamlAmbientLightProperties , XamlControlsResourcesProperties , RevealBrush , RecyclePool , AutoSuggestBoxHelper , ComboBoxHelper , CommandBarFlyoutCommandBarTemplateSettingsFactory , AcrylicBrushProperties , AnimatedIconProperties , AnimatedIconSourceProperties , AnimatedVisualPlayerProperties , AnnotatedScrollBarProperties , AutoSuggestBoxHelperProperties , BreadcrumbBarProperties , ButtonInteractionProperties , ColorPickerProperties , ColorPickerSliderProperties , ColorSpectrumProperties , ColumnMajorUniformToLargestGridLayoutProperties , ComboBoxHelperProperties , CommandBarFlyoutCommandBarProperties , CommandBarFlyoutCommandBarAutomationPropertiesProperties , CommandBarFlyoutCommandBarTemplateSettingsProperties , CornerRadiusFilterConverterProperties , CornerRadiusToThicknessConverterProperties , ExpanderProperties , ExpanderTemplateSettingsProperties , FlowLayoutProperties , ImageIconProperties , ImageIconSourceProperties , InfoBadgeProperties , InfoBadgeTemplateSettingsProperties , InfoBarProperties , InfoBarPanelProperties , InfoBarTemplateSettingsProperties , InkCanvasProperties , InkToolBarProperties , InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties , InkToolBarEraserButtonProperties , InkToolBarFlyoutItemProperties , InkToolBarMenuButtonProperties , InkToolBarPenButtonProperties , InkToolBarPenConfigurationControlProperties , InkToolBarStencilButtonProperties , InkToolBarToolButtonProperties , ItemCollectionTransitionProviderProperties , ItemContainerProperties , ItemsRepeaterProperties , ItemsSourceViewProperties , ItemsViewProperties , LayoutProperties , LayoutPanelProperties , LinedFlowLayoutProperties , MapControlProperties , MapElementsLayerProperties , MapIconProperties , MenuBarProperties
  • ClearRadioButtonsEventsButton_Click() : RadioButtonsPage
  • ClearRealizedRange() : final , VirtualizingStackLayout
  • ClearSecondaryCommandsTimer_Tick() : CommandBarFlyoutPage
  • ClearSelectedItem_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ClearSelection() : SelectionModelTests , SelectionModel , final
  • ClearSelectionChangeBlock() : NavigationViewPage
  • ClearShadow() : CommandBarFlyoutCommandBar
  • ClearStatus() : WebView2BasicPage , WebView2Common
  • ClearSwipeItemsButton_Click() : SwipeControlClearPage
  • ClearTeachingTipDebugMessages() : TeachingTipTests
  • ClearTraces() : ItemsViewTestsWithInputHelper , ScrollPresenterTestsBase , ScrollViewTestsWithInputHelper , SwipeControlTests
  • ClearTypes() : XamlMetadataProvider
  • Click() : SplitButtonProperties
  • ClickButton() : TreeViewTests
  • ClickClearSelectionButton() : NavigationViewTestsBase
  • ClickedItem() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • ClickedItemBroughtIntoView() : ItemsViewTestsWithInputHelper
  • ClickingOutsideARevealedSwipeDismissesIt() : SwipeControlTests
  • ClickOnElements() : BreadcrumbTests
  • ClickOnItem() : RadioButtonsTests
  • ClickOnNavigationViewItemChevron() : TopModeTests
  • ClickPrimaryButton() : SplitButtonTests
  • ClickPrimaryButtonWithKey() : SplitButtonTests
  • ClickSecondaryButton() : SplitButtonTests
  • ClickWaitAndVerifyText() : AnimatedVisualPlayerTests
  • ClipRect() : ProgressBarTemplateSettingsProperties
  • ClipRectProperty() : ProgressBarTemplateSettingsProperties
  • Clone() : InspectingDataSourceTests::CollectionChangeRecorder
  • CloneEllipsisItemSource() : BreadcrumbBarItem
  • CloneWithChildIndex() : IndexPath
  • close() : Awaitable::PTP_WAIT_traits
  • Close() : AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , HandlePolicy , AnimatedVisual , SwipeControl , TeachingTipAutomationPeer , WebView2
  • CloseAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CloseAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CloseButtonClick() : InfoBarProperties , TeachingTipProperties , InfoBarProperties
  • CloseButtonCommand() : InfoBarProperties , TeachingTipProperties
  • CloseButtonCommandParameter() : InfoBarProperties , TeachingTipProperties , InfoBarProperties
  • CloseButtonCommandParameterProperty() : TeachingTipProperties , InfoBarProperties
  • CloseButtonCommandProperty() : InfoBarProperties , TeachingTipProperties
  • CloseButtonContent() : TeachingTipProperties
  • CloseButtonContentProperty() : TeachingTipProperties
  • CloseButtonDoesNotShowWhenVisibilityIsToggled() : TabViewTests
  • CloseButtonOverlayMode() : TabViewProperties
  • CloseButtonOverlayModeCombobox_SelectionChanged() : TabViewPage
  • CloseButtonOverlayModeProperty() : TabViewProperties
  • CloseButtonOverlayModeTests() : TabViewTests
  • CloseButtonStyle() : InfoBarProperties , TeachingTipProperties
  • CloseButtonStyleProperty() : InfoBarProperties , TeachingTipProperties
  • Closed() : InfoBarProperties , TeachingTipProperties , InfoBarProperties
  • CloseFlyout() : BreadcrumbBarItem , CommandBarFlyoutTests , DropDownButton , SplitButton
  • CloseFlyoutIfRequired() : NavigationView
  • CloseIfNotRemainOpenExecuteItem() : SwipeControl
  • CloseInternal() : WebView2
  • CloseMenuFlyout() : MenuBarItem
  • CloseOnOpenedAndClosedSwipeItemsWorks() : SwipeControlTests
  • CloseOpenAndCloseWithJustKeyboardViaF6() : TeachingTipTests
  • ClosePane() : NavigationView
  • ClosePaneIfNeccessaryAfterItemIsClicked() : NavigationView
  • ClosePopup() : TeachingTip
  • ClosePopupOnUnloadEvent() : TeachingTip
  • ClosePopupWithAnimationIfAvailable() : TeachingTip
  • ClosePrimaryWindow() : TabViewTests
  • CloseReasonIsAccurate() : TeachingTipTests
  • CloseRequested() : TabViewItemProperties
  • CloseSelectionTest() : TabViewTests
  • CloseStyleChanged() : InfoBarPage
  • CloseTeachingTipButton_Click() : TeachingTipFocusPage , TeachingTipInXamlPage
  • CloseTeachingTipByLightDismiss() : TeachingTipTests
  • CloseTeachingTipProgrammatically() : TeachingTipTests
  • CloseTest() : InfoBarTests
  • CloseThenDPIChangeTest() : WebView2Tests
  • CloseToolTipTest() : CommonTests
  • CloseTopNavigationViewFlyout() : NavigationView
  • CloseWithoutAnimation() : SwipeControl
  • Closing() : InfoBarProperties , TeachingTipProperties
  • ClosingEventCountResetButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • CmbAnchorElement_SelectionChanged() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • CmbAnnotatedScrollBarOutputDebugStringLevel_SelectionChanged() : AnnotatedScrollBarPage
  • CmbBackground_SelectionChanged() : ItemsViewSummaryPage , ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage , SelectorBarSummaryPage
  • CmbBorderBrush_SelectionChanged() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • CmbClosedDisplayMode_SelectionChanged() : AppBarPage , CommandBarSummaryPage
  • CmbCommandBarFlyoutOutputDebugStringLevel_SelectionChanged() : CommandBarFlyoutMainPage
  • CmbContent_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • CmbContentHorizontalAlignment_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • CmbContentManipulationMode_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewerPage , ScrollViewDynamicPage
  • CmbContentOrientation_SelectionChanged() : ScrollPresenterDynamicPage
  • CmbContentVerticalAlignment_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewerPage , ScrollViewDynamicPage
  • CmbDefaultLabelPosition_SelectionChanged() : CommandBarSummaryPage
  • CmbDetailLabelTemplate_SelectionChanged() : AnnotatedScrollBarSummaryPage
  • CmbFontSize_SelectionChanged() : CommandBarSummaryPage
  • CmbGridViewSelectionMode_SelectionChanged() : CommonStylesPage
  • CmbHasSecondaryCommand_SelectionChanged() : CommandBarSummaryPage
  • CmbHasSplitButton_SelectionChanged() : CommandBarSummaryPage
  • CmbHasToggleSplitButton_SelectionChanged() : CommandBarSummaryPage
  • cmbHorizontalContentAlignment_SelectionChanged() : DynamicPage
  • cmbHorizontalOverriddenOffsetsChangeAnimation_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • CmbHorizontalScrollBarVisibility_SelectionChanged() : ScrollViewDynamicPage , ScrollViewerPage
  • CmbHorizontalScrollChainMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • CmbHorizontalScrollController_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • cmbHorizontalScrollMode_SelectionChanged() : DynamicPage
  • CmbHorizontalScrollMode_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage
  • CmbHorizontalScrollRailMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • CmbIgnoredInputKinds_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewsWithSimpleContentsPage
  • CmbIScrollControllerConsumer_SelectionChanged() : ScrollPresenterWithSimpleScrollControllersPage
  • CmbIsDynamicOverflowEnabled_SelectionChanged() : CommandBarSummaryPage
  • CmbIsOpen_SelectionChanged() : AppBarPage , CommandBarSummaryPage
  • CmbItemContainerOutputDebugStringLevel_SelectionChanged() : ItemContainerPage
  • CmbItemHeightMode_SelectionChanged() : ScrollPresenterRepeaterAnchoringPage
  • CmbItemsControlHeaderTemplate_SelectionChanged() : GroupedItemsControlPage
  • CmbItemsControlItemsPanelType_SelectionChanged() : FlatItemsControlPage , GroupedItemsControlPage
  • CmbItemsControlItemTemplate_SelectionChanged() : GroupedItemsControlPage , FlatItemsControlPage
  • CmbItemsPresenterFooter_SelectionChanged() : FlatItemsControlPage , GroupedItemsControlPage
  • CmbItemsPresenterHeader_SelectionChanged() : FlatItemsControlPage , GroupedItemsControlPage
  • CmbItemsRepeaterHorizontalAlignment_SelectionChanged() : VariableSizedItemsPage
  • CmbItemsRepeaterTabFocusNavigation_SelectionChanged() : KeyboardNavigationSample
  • CmbItemsRepeaterVerticalAlignment_SelectionChanged() : VariableSizedItemsPage
  • CmbItemsSource_SelectionChanged() : AnnotatedScrollBarSummaryPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ObjectModelTestPage
  • CmbItemsViewOutputDebugStringLevel_SelectionChanged() : ItemsViewPage
  • CmbItemTemplate_SelectionChanged() : AnnotatedScrollBarSummaryPage , ItemsViewIntegrationPage , ItemsViewSummaryPage , ObjectModelTestPage , ItemsViewInteractiveTestsPage
  • CmbLabelLength_SelectionChanged() : CommandBarSummaryPage
  • CmbLabelPosition_SelectionChanged() : AppBarPage
  • CmbLabelTemplate_SelectionChanged() : AnnotatedScrollBarSummaryPage
  • CmbLayout_SelectionChanged() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ObjectModelTestPage
  • CmbLayoutPanelBackground_SelectionChanged() : LinedFlowLayoutDemo
  • CmbLayoutPanelBorderBrush_SelectionChanged() : LinedFlowLayoutDemo
  • CmbLinedFlowLayoutItemsJustification_SelectionChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • CmbLinedFlowLayoutItemsStretch_SelectionChanged() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • CmbListViewBaseFooter_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbListViewBaseHeader_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbListViewBaseItemsPanelType_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbListViewItemsPanelType_SelectionChanged() : ListViewAnchoringPage
  • CmbListViewSelectionMode_SelectionChanged() : CommonStylesPage
  • CmbManipulationMode_SelectionChanged() : ScrollPresenterManipulationModePage
  • CmbNavigationViewOutputDebugStringLevel_SelectionChanged() : NavigationViewCaseBundle
  • CmbNestingCombination_SelectionChanged() : ScrollPresenterBringIntoViewPage
  • CmbOuterItemsControlTabNavigation_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterItemsPresenterFooter_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterItemsPresenterHeader_SelectionChanged() : NestedItemsControlsPage
  • CmbOuterListViewFooter_SelectionChanged() : NestedListViewsPage
  • CmbOuterListViewHeader_SelectionChanged() : NestedListViewsPage
  • CmbOuterListViewSelectionMode_SelectionChanged() : NestedListViewsPage , NestedGridViewsPage
  • CmbOuterListViewTabNavigation_SelectionChanged() : NestedGridViewsPage , NestedListViewsPage
  • CmbOutputDebugStringLevels_SelectionChanged() : RepeaterTestUIPage
  • cmbParallaxView_SelectionChanged() : DynamicPage
  • cmbSCHorizontalAlignment_SelectionChanged() : DynamicPage
  • CmbScrollPresenterManipulationMode_SelectionChanged() : ScrollPresenterDynamicPage
  • CmbScrollPresenterOutputDebugStringLevel_SelectionChanged() : ScrollPresenterPage
  • CmbScrollViewBackground_SelectionChanged() : LinedFlowLayoutDemo
  • CmbScrollViewBorderBrush_SelectionChanged() : LinedFlowLayoutDemo
  • CmbScrollViewerHorizontalScrollBarVisibility_SelectionChanged() : UniformGridLayoutDemo
  • CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged() : ListViewBasePage , GroupedListViewBasePage
  • CmbScrollViewerHorizontalSnapPointsType_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbScrollViewerManipulationMode_SelectionChanged() : ScrollViewerPage
  • CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbScrollViewerVerticalSnapPointsType_SelectionChanged() : GroupedListViewBasePage , ListViewBasePage
  • CmbScrollViewOutputDebugStringLevel_SelectionChanged() : ScrollViewPage
  • CmbScrollViewTabNavigation_SelectionChanged() : KeyboardNavigationSample
  • cmbSCVerticalAlignment_SelectionChanged() : DynamicPage
  • CmbSelectionMode_SelectionChanged() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ItemsViewIntegrationPage
  • CmbSelectorBarOutputDebugStringLevel_SelectionChanged() : SelectorBarPage
  • CmbShowScrollPresenter_SelectionChanged() : ScrollPresentersWithSimpleContentsPage
  • CmbShowScrollView_SelectionChanged() : ScrollViewsWithSimpleContentsPage
  • CmbSnapPointKind_SelectionChanged() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • cmbSource_SelectionChanged() : DynamicPage
  • cmbSourceContent_SelectionChanged() : DynamicPage
  • CmbSwipeControlOutputDebugStringLevel_SelectionChanged() : SwipePage
  • CmbTabNavigation_SelectionChanged() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • cmbTargetElement_SelectionChanged() : DynamicPage
  • cmbTEHorizontalAlignment_SelectionChanged() : DynamicPage
  • cmbTEVerticalAlignment_SelectionChanged() : DynamicPage
  • CmbUniformGridLayoutItemsJustification_SelectionChanged() : UniformGridLayoutDemo , ItemsViewSummaryPage
  • CmbUniformGridLayoutItemsStretch_SelectionChanged() : ItemsViewSummaryPage , UniformGridLayoutDemo
  • CmbUniformGridLayoutOrientation_SelectionChanged() : UniformGridLayoutDemo
  • CmbUseOuterItemsControl_SelectionChanged() : NestedItemsControlsPage
  • CmbUseOuterListView_SelectionChanged() : NestedListViewsPage
  • cmbVerticalContentAlignment_SelectionChanged() : DynamicPage
  • cmbVerticalOverriddenOffsetsChangeAnimation_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • CmbVerticalScrollBarVisibility_SelectionChanged() : ScrollViewerPage , ScrollViewDynamicPage
  • CmbVerticalScrollChainMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • CmbVerticalScrollController_SelectionChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • cmbVerticalScrollMode_SelectionChanged() : DynamicPage
  • CmbVerticalScrollMode_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage
  • CmbVerticalScrollRailMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • CmbXYFocusKeyboardNavigation_SelectionChanged() : ScrollViewerPage , ScrollViewDynamicPage , SelectorBarSummaryPage , ItemsViewSummaryPage
  • CmbZoomChainMode_SelectionChanged() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage
  • cmbZoomMode_SelectionChanged() : DynamicPage
  • CmbZoomMode_SelectionChanged() : ScrollViewerPage , ScrollPresenterDynamicPage
  • CMethodProfileGroup() : CMethodProfileGroup< size >
  • CoerceMaximum() : NumberBox , ProgressRing
  • CoerceMinimum() : NumberBox , ProgressRing
  • CoerceToGreaterThanZero() : NavigationView
  • CoerceToZeroOneRange() : AcrylicBrush
  • CoerceToZeroOneRange_Nullable() : AcrylicBrush
  • CoerceValue() : ProgressRing , NumberBox
  • CoerceValueBetweenMinAndMax() : RatingControl
  • Collapse() : DropDownButtonAutomationPeer , ExpanderAutomationPeer , Expander , MenuBarItemAutomationPeer , NavigationView , NavigationViewItemAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , TreeViewItemAutomationPeer , TreeViewItemDataAutomationPeer , TreeView , DropDownButton
  • CollapseActionButtonAsynchronouslyClick() : InfoBarPage
  • CollapseActionButtonProperty() : InfoBarPage
  • CollapseAndWait() : DropDownButton , Expander
  • CollapseCollidingAndOutOfBoundsLabels() : AnnotatedScrollBar
  • Collapsed() : ExpanderProperties , NavigationViewProperties , TreeViewProperties , ExpanderProperties
  • CollapsedGlyph() : TreeViewItemProperties
  • CollapsedGlyphProperty() : TreeViewItemProperties
  • CollapsedGlyphVisibility() : TreeViewItemTemplateSettingsProperties
  • CollapsedGlyphVisibilityProperty() : TreeViewItemTemplateSettingsProperties
  • CollapsedItem() : NavigationViewItemCollapsedEventArgs
  • CollapsedItemContainer() : NavigationViewItemCollapsedEventArgs
  • CollapsedRatingControlButton_Click() : RatingControlPage
  • CollapseNode() : ViewModel
  • CollapseSelectedItem() : HierarchicalNavigationViewMarkup
  • CollectionChange() : VectorChangedEventArgs
  • CollectionChanged() : ItemsSourceViewProperties , ItemsSourceView
  • CollectionChangeDemo() : CollectionChangeDemo
  • CollectionChangeRecorder() : InspectingDataSourceTests::CollectionChangeRecorder
  • CollidingLabelsAreRemoved() : AnnotatedScrollBarInteractionTests
  • Color() : IColorSourceEffect , ITintEffect , ColorPickerProperties , ColorSpectrumProperties , RevealBrushProperties , XamlAmbientLightProperties , ITintEffect , ColorSpectrumProperties
  • ColorAsVector4() : AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedSettingsVisualSource , ProgressRingDeterminate , ProgressRingIndeterminate , AnimatedGlobalNavigationButtonVisualSource , AnimatedChevronDownSmallVisualSource
  • ColorBlueButton_Click() : ColorPickerPage
  • ColorBrush_AlmostDarkOrange_FFF18F13() : BrightnessSun::BrightnessSun_AnimatedVisual
  • ColorBrush_AlmostDarkTurquoise_FF00D1C1() : LottieLogo::LottieLogo_AnimatedVisual
  • ColorBrush_AlmostDodgerBlue_FF0078D7() : ProgressRingDeterminate::AnimatedVisual
  • ColorBrush_AlmostGoldenrod_FFE4950C() : BrightnessSun::BrightnessSun_AnimatedVisual
  • ColorBrush_AlmostTeal_FF007A87() : LottieLogo::LottieLogo_AnimatedVisual
  • ColorBrush_LightGray() : ProgressRingDeterminate::AnimatedVisual
  • ColorBrush_SemiTransparentWhite() : BrightnessSun::BrightnessSun_AnimatedVisual
  • ColorBrush_White() : LottieLogo::LottieLogo_AnimatedVisual
  • ColorChanged() : ColorPickerProperties , ColorSpectrumProperties
  • ColorChangedEventWaiter() : ColorChangedEventWaiter
  • ColorChannel() : ColorPickerSliderProperties
  • ColorChannelProperty() : ColorPickerSliderProperties
  • ColorFlipButton_Click() : RatingControlPage
  • ColorGreenButton_Click() : ColorPickerPage
  • ColorList_SelectionChanged() : RevealScenarioColors
  • ColorMatrix() : IColorMatrixEffect
  • ColorNameToolTipContentChanged() : ColorPickerPage
  • ColorPicker() : ColorPicker
  • ColorPicker_ColorChanged() : RevealScenarioColors , ColorPickerPage , AcrylicBrushBasicPage , AcrylicBrushPage
  • ColorPicker_Loaded() : ColorPickerPage
  • ColorPickerDerivationTest() : ColorPickerTests
  • ColorPickerEventsTest() : ColorPickerTests
  • ColorPickerPage() : ColorPickerPage
  • ColorPickerProperties() : ColorPickerProperties
  • ColorPickerSlider() : ColorPickerSlider
  • ColorPickerSliderAutomationPeer() : ColorPickerSliderAutomationPeer
  • ColorPickerSliderProperties() : ColorPickerSliderProperties
  • ColorPickerTest() : ColorPickerTests
  • ColorPickerTestSetupHelper() : ColorPickerTests::ColorPickerTestSetupHelper
  • ColorProperty() : ColorSpectrumProperties , ColorPickerProperties , RevealBrushProperties , XamlAmbientLightProperties
  • ColorRedButton_Click() : ColorPickerPage
  • ColorSpectrum() : ColorSpectrum
  • ColorSpectrumAutomationPeer() : ColorSpectrumAutomationPeer
  • ColorSpectrumComponents() : ColorPickerProperties
  • ColorSpectrumComponentsComboBox_SelectionChanged() : ColorPickerPage
  • ColorSpectrumComponentsProperty() : ColorPickerProperties
  • ColorSpectrumEventsTest() : ColorPickerTests
  • ColorSpectrumImage_SizeChanged() : ColorPickerPage
  • ColorSpectrumProperties() : ColorSpectrumProperties
  • ColorSpectrumShape() : ColorPickerProperties
  • ColorSpectrumShapeComboBox_SelectionChanged() : ColorPickerPage
  • ColorSpectrumShapeProperty() : ColorPickerProperties
  • ColorSpectrumTest() : ColorPickerTests
  • ColorWhiteButton_Click() : ColorPickerPage
  • ColumnMajorUniformToLargestGridLayout() : ColumnMajorUniformToLargestGridLayout
  • ColumnMajorUniformToLargestGridLayoutProperties() : ColumnMajorUniformToLargestGridLayoutProperties
  • ColumnSpacing() : ColumnMajorUniformToLargestGridLayoutProperties
  • ColumnSpacingProperty() : ColumnMajorUniformToLargestGridLayoutProperties
  • ColumnsTest() : RadioButtonsTests
  • CombinationCount() : SnapPointWrapper< T >
  • Combine() : SnapPointWrapper< T > , RepeatedZoomSnapPoint , ZoomSnapPoint , SnapPointBase , RepeatedScrollSnapPoint , ScrollSnapPoint
  • CombineNoiseWithTintEffect_Luminosity() : AcrylicBrush
  • ComboBox_SelectionChanged() : RevealScenarios , RevealScenarioGrid
  • ComboBox_SelectionChanged_1() : RevealScenarioGrid
  • ComboBoxDensityTest() : CommonStylesTests
  • ComboBoxDensityTest_Click() : CommonStylesPage
  • ComboBoxDisplayChangingPageTest() : PagerControlTests
  • ComboBoxHelper() : ComboBoxHelper
  • ComboBoxHelperProperties() : ComboBoxHelperProperties
  • ComboBoxPage() : ComboBoxPage
  • ComboBoxSelectionChanged() : PagerControl
  • Command() : SplitButtonProperties , SwipeItemProperties , SplitButtonProperties
  • CommandBarCenterPage() : CommandBarCenterPage
  • CommandBarFlyout() : CommandBarFlyout
  • CommandBarFlyoutCommandBar() : CommandBarFlyoutCommandBar
  • CommandBarFlyoutCommandBarAutomationPropertiesProperties() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • CommandBarFlyoutCommandBarProperties() : CommandBarFlyoutCommandBarProperties
  • CommandBarFlyoutCommandBarTemplateSettingsProperties() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CommandBarFlyoutCommandBecomingVisibleHasCorrectVisuals() : CommandBarFlyoutTests
  • CommandBarFlyoutMainPage() : CommandBarFlyoutMainPage
  • CommandBarFlyoutPage() : CommandBarFlyoutPage
  • CommandBarFlyoutTestSetupHelper() : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • CommandBarPage() : CommandBarPage
  • CommandBarSummaryPage() : CommandBarSummaryPage
  • CommandExecute() : SplitButtonPage
  • CommandParameter() : SwipeItemProperties , SplitButtonProperties
  • CommandParameterProperty() : SplitButtonProperties , SwipeItemProperties
  • CommandProperty() : SwipeItemProperties , SplitButtonProperties
  • CommandTest() : SplitButtonTests
  • CommonStylesPage() : CommonStylesPage
  • CompactModeAutoPaneClosingTest() : PaneBehaviorTests
  • CompactModeCombobox_SelectionChanged() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • CompactModeThresholdWidth() : NavigationViewProperties
  • CompactModeThresholdWidthProperty() : NavigationViewProperties
  • CompactPage() : CompactPage
  • CompactPaneLength() : NavigationViewProperties , NavigationViewItemProperties
  • CompactPaneLength_SelectionChanged() : NavigationViewRS4Page , NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewTopNavPage , NavigationViewCustomThemeResourcesPage , PaneFooterTestPage
  • CompactPaneLengthProperty() : NavigationViewItemProperties , NavigationViewProperties
  • CompareTo() : IndexPath
  • Complete() : ItemCollectionTransitionProgress , AnimatedVisualPlayer::final
  • CompleteAwaits() : Awaitable
  • CompleteCurrentTest() : WebView2BasicPage
  • CompleteDelayedOperations() : ScrollPresenter
  • CompleteInteractionTrackerOperations() : ScrollPresenter
  • CompletePendingSelectionChange() : NavigationView
  • CompleteStartBringItemIntoView() : ItemsView
  • CompleteTestAndWaitForResult() : WebView2Tests
  • CompleteTestAndWaitForWebMessageResult() : WebView2Tests
  • CompleteViewChange() : ScrollPresenter
  • Components() : ColorSpectrumProperties
  • ComponentsProperty() : ColorSpectrumProperties
  • CompositionBrush() : RevealBrushTestApi , AcrylicTestApi
  • CompositionProperties() : RefreshInfoProviderImpl
  • CompositionScrollController() : CompositionScrollController
  • CompositionScrollController_IsEnabledChanged() : CompositionScrollController
  • CompositionScrollController_LogMessage() : ScrollPresenterWithCompositionScrollControllersPage
  • CompositionScrollController_SizeChanged() : CompositionScrollController
  • CompositionScrollControllerOffsetChangeCompletedEventArgs() : CompositionScrollControllerOffsetChangeCompletedEventArgs
  • CompositionScrollControllerPanningInfo() : CompositionScrollControllerPanningInfo
  • CompositionTarget_Rendering() : RatingControlPage , SimpleRectanglePage , LightConfigurationTests , SwipeControlPage , DynamicPage
  • Compute() : NumberBoxParser
  • ComputeAnchorPoint() : ScrollPresenter
  • ComputeBringIntoViewTargetOffsets() : ScrollPresenter
  • ComputeBringIntoViewTargetOffsetsFromRequestEventArgs() : ScrollPresenter
  • ComputeBringIntoViewUpdatedTargetOffsets() : ScrollPresenter
  • ComputeContentLayoutOffsetDelta() : ScrollPresenter
  • ComputedHorizontalScrollBarVisibility() : ScrollViewProperties
  • ComputedHorizontalScrollBarVisibilityProperty() : ScrollViewProperties
  • ComputedHorizontalScrollMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • ComputedHorizontalScrollModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • ComputedVerticalScrollBarVisibility() : ScrollViewProperties
  • ComputedVerticalScrollBarVisibilityProperty() : ScrollViewProperties
  • ComputedVerticalScrollMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • ComputedVerticalScrollModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • ComputeElementAnchorPoint() : ScrollPresenter
  • ComputeEndOfInertiaZoomFactor() : ScrollPresenter
  • ComputeFrozenItemsAndLayout() : LinedFlowLayout
  • ComputeFrozenItemsRange() : LinedFlowLayout
  • ComputeHorizontalContentAlignment() : ScrollInputHelper
  • ComputeHorizontalPositionFromOffset() : ScrollPresenterDynamicPage
  • ComputeItemsLayoutDrawback() : LinedFlowLayout
  • ComputeItemsLayoutFastPath() : LinedFlowLayout
  • ComputeItemsLayoutRegularPath() : LinedFlowLayout
  • ComputeItemsLayoutWithLockedItems() : LinedFlowLayout
  • ComputeLineExpandFactor() : LinedFlowLayout
  • ComputeLineShrinkFactor() : LinedFlowLayout
  • ComputeMinHorizontalPosition() : ScrollPresenterDynamicPage
  • ComputeMinMaxPositions() : ScrollPresenter
  • ComputeMinVerticalPosition() : ScrollPresenterDynamicPage
  • ComputePositionFromOffsets() : ScrollPresenter
  • ComputePostfixExpression() : NumberBoxParser
  • ComputeValueAfterSnapPoints() : ScrollPresenter
  • ComputeVerticalContentAlignment() : ScrollInputHelper
  • ComputeVerticalPositionFromOffset() : ScrollPresenterDynamicPage
  • ComputeViewportAnchorPoint() : ScrollPresenter
  • ComputeViewportToElementAnchorPointsDistance() : ScrollPresenter
  • ComputeZoomedOffsetWithMinimalChange() : ScrollPresenter
  • ComputeZoomMode() : ScrollInputHelper
  • ConcurrentCreationRequestsTest() : WebView2Tests
  • ConfigurationChanged() : ItemsRepeaterScrollHost , ScrollPresenter , ItemsRepeaterScrollHost , ScrollPresenter
  • ConfigurationContent() : InkToolBarCustomPenButton , InkToolBarCustomToolButton , InkToolBarCustomToolButtonProperties , InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties , InkToolBarCustomPenButton , InkToolBarCustomToolButton
  • ConfigurationContentProperty() : InkToolBarCustomToolButtonProperties , InkToolBarCustomPenButtonProperties
  • ConfigurePositionInertiaRestingValues() : SwipeControl
  • ConfigureTargetElement() : SliderInteraction
  • ConsecutiveOffsetJumps() : ScrollPresenterTests
  • ConsecutiveScrollAndZoomJumps() : ScrollPresenterTests
  • ConsecutiveZoomAndScrollJumps() : ScrollPresenterTests
  • ConsecutiveZoomFactorJumps() : ScrollPresenterTests
  • ConstructVisual() : AnimatedIcon
  • Contact() : PersonPictureProperties
  • ContactBtn_Click() : PersonPicturePage
  • ContactImageBtn_Click() : PersonPicturePage
  • ContactProperty() : PersonPictureProperties
  • Container2AnimationEndPosition() : ProgressBarTemplateSettingsProperties
  • Container2AnimationEndPositionProperty() : ProgressBarTemplateSettingsProperties
  • Container2AnimationStartPosition() : ProgressBarTemplateSettingsProperties
  • Container2AnimationStartPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationEndPosition() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationEndPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationMidPosition() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationMidPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationStartPosition() : ProgressBarTemplateSettingsProperties
  • ContainerAnimationStartPositionProperty() : ProgressBarTemplateSettingsProperties
  • ContainerFromIndex() : TabView , RadioButtons
  • ContainerFromItem() : TabView , TreeView
  • ContainerFromMenuItem() : NavigationView
  • ContainerFromNode() : TreeViewList , TreeView
  • ContainerShape() : AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedVisual
  • ContainerShape_0() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ContainerShape_00() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_01() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_02() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_03() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_04() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_05() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_06() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_07() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_08() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_09() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_1() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ContainerShape_10() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_11() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_12() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_13() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_14() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_15() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_16() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_17() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_18() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_19() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_2() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ContainerShape_20() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_21() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerShape_22() : LottieLogo::LottieLogo_AnimatedVisual
  • ContainerSizeChangedHandler() : SwipeControlPage
  • containerTimer_Tick() : RefreshContainerPage
  • containerTimer_TickImpl() : RefreshContainerPage
  • ContainerVisual_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • ContainerVisual_00() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_01() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_02() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_03() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_04() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_05() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_06() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_07() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_08() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_09() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_1() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • ContainerVisual_10() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_11() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_12() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_13() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_14() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_15() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_16() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_17() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_18() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_19() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_2() : AnimatedSettingsVisualSource_AnimatedVisual
  • ContainerVisual_20() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_21() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_22() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_23() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_24() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_25() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_26() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_27() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_28() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_29() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_30() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_31() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_32() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_33() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_34() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_35() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_36() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_37() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_38() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_39() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_40() : AnimatedAcceptVisualSource_AnimatedVisual
  • ContainerVisual_41() : AnimatedAcceptVisualSource_AnimatedVisual
  • Contains() : CustomItemsSourceView , IndexRange , SelectedTreeNodeVector , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , SelectionModelTests , MyCollection , SelectedItemsVector
  • Content() : RefreshVisualizerProperties , ScrollPresenterProperties , AnnotatedScrollBarDetailLabelRequestedEventArgs , RefreshVisualizerProperties , ScrollPresenterProperties , ScrollViewProperties , TitleBarProperties , AnnotatedScrollBarLabel , ScrollViewProperties , TreeViewNodeProperties , InfoBarProperties , AnnotatedScrollBarDetailLabelRequestedEventArgs
  • Content_EffectiveViewportChanged() : ScrollPresenterDynamicPage
  • Content_PointerCanceled() : ScrollPresenterDynamicPage
  • Content_PointerCaptureLost() : ScrollPresenterDynamicPage
  • Content_PointerPressed() : ScrollPresenterDynamicPage
  • Content_PointerReleased() : ScrollPresenterDynamicPage
  • Content_PointerWheelChanged() : ScrollViewDynamicPage
  • ContentClipRect() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ContentClipRectProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ContentDialog_PrimaryButtonClick() : DialogWithNavView
  • ContentDialog_SecondaryButtonClick() : DialogWithNavView
  • ContentDialogNavViewButton_Click() : NavigationViewPage
  • ContentDialogPage() : ContentDialogPage
  • ContentElevationSliderChanged() : TeachingTipPage
  • ContentGridDoesntOverExtendHorizontal() : SwipeControlTests
  • ContentHeight() : ExpanderTemplateSettingsProperties
  • ContentHeightProperty() : ExpanderTemplateSettingsProperties
  • ContentIsUpdatable() : RefreshVisualizerTests
  • ContentLayoutOffsetXChanged() : ScrollPresenterTestHooks
  • ContentLayoutOffsetYChanged() : ScrollPresenterTestHooks
  • ContentModeTestTreeView_Expanding() : TreeViewPage
  • ContentOrientation() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • ContentOrientationProperty() : ScrollPresenterProperties , ScrollViewProperties
  • ContentOverlay() : NavigationViewProperties
  • ContentOverlayProperty() : NavigationViewProperties
  • ContentOverlayTest() : CommonTests
  • ContentProperty() : TreeViewNodeProperties , TitleBarProperties , ScrollPresenterProperties , RefreshVisualizerProperties , XamlTypeBase , ScrollViewProperties , InfoBarProperties
  • ContentScrollViewer_ViewChanged() : TeachingTipPage
  • ContentTemplate() : InfoBarProperties
  • ContentTemplateProperty() : InfoBarProperties
  • ContextFlyout_Closed() : ExtraCommandBarFlyoutPage
  • ContextFlyout_Opening() : ExtraCommandBarFlyoutPage
  • Contrast() : IContrastEffect
  • ControlKeyKeyboardTest() : RadioButtonsTests
  • ControllerEntry()
: MicaBackdrop::ControllerEntry
, DesktopAcrylicBackdrop::ControllerEntry
  • ControlSizing() : PersonPictureTests
  • ControlTypeProperty() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • ConversionKind() : CornerRadiusToThicknessConverterProperties
  • ConversionKindProperty() : CornerRadiusToThicknessConverterProperties
  • Convert() : DoubleToStringConverter , BoolToVisibilityConverter , BoolToBrushConverter , EnumToStringConverter , UriToStringConverter , IconSourceToIconSourceElementConverter , CornerRadiusFilterConverter , CornerRadiusToThicknessConverter , ColorToSolidColorBrushConverter , PrefixConverter , NullableBooleanToBooleanConverter
  • ConvertBack() : EnumToStringConverter , CornerRadiusFilterConverter , PrefixConverter , IconSourceToIconSourceElementConverter , UriToStringConverter , NullableBooleanToBooleanConverter , ColorToSolidColorBrushConverter , DoubleToStringConverter , BoolToVisibilityConverter , CornerRadiusToThicknessConverter , BoolToBrushConverter
  • ConvertComboBoxItemToNumberOfPages() : PipsPagerPage
  • ConvertComboBoxItemToVisibilityEnum() : PipsPagerPage
  • ConvertDipsToPhysical() : SharedHelpers
  • ConvertFromStringToVector2() : VariableSizedItemsPage , ScrollPresenterDynamicPage
  • ConvertInfixToPostfix() : NumberBoxParser
  • ConvertOriginalIndexToIndex() : TopNavigationViewDataProvider
  • ConvertPrimaryIndexToIndex() : TopNavigationViewDataProvider
  • ConvertTo< T >() : BreadcrumbTests
  • ConvertToNullableBool() : final
  • ConvertXamlArgsToOle32Args() : WebView2
  • CopyGamesLabelButton_Click() : NavigationViewTopNavPage , NavigationViewPage , NavigationViewRS4Page
  • CopyIsSelected_Click() : NavigationViewSelectedItemEdgeCasePage
  • CopyItemsInfo() : LinedFlowLayout
  • CopyPasteTest() : WebView2Tests
  • CopySelected() : WebView2Tests
  • CopyTestPagesLocally() : WebView2Common
  • CopyTo() : CustomItemsSourceView , InspectingDataSourceTests::WinRTObservableVector , WinRTCollection , MyCollection
  • CopyVector() : SharedHelpers
  • CopyVolumeToolTipButton_Click() : NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewPage
  • CoreProcessFailed() : WebView2Properties
  • CoreWebView2() : WebView2
  • CoreWebView2HasInvalidState() : WebView2
  • CoreWebView2Initialized() : WebView2Properties
  • CoreWebView2Initialized_FailedTest() : WebView2Tests
  • CoreWebView2InitializedEventArgs() : CoreWebView2InitializedEventArgs
  • CoreWebView2InitializedTest() : WebView2Tests
  • CoreWebView2RunIgnoreInvalidStateSync() : WebView2
  • CoreWindow_PointerExited() : CoreWindowEventsPage
  • CoreWindowEventsPage() : CoreWindowEventsPage
  • CoreWindowEventsTests() : RevealBrushTests
  • CornerRadius() : LayoutPanelProperties
  • CornerRadiusFilterConverterProperties() : CornerRadiusFilterConverterProperties
  • CornerRadiusFilterConverterTest() : CommonStylesApiTests
  • CornerRadiusPage() : CornerRadiusPage
  • CornerRadiusProperty() : LayoutPanelProperties
  • CornerRadiusTest() : CommonStylesTests
  • CornerRadiusToThicknessConverterProperties() : CornerRadiusToThicknessConverterProperties
  • CoroutineCompletedCallback() : Awaitable
  • CorrelationId() : ScrollControllerAddScrollVelocityRequestedEventArgs , ScrollControllerScrollByRequestedEventArgs , ScrollControllerAddScrollVelocityRequestedEventArgs , ScrollingZoomCompletedEventArgs , ScrollingZoomAnimationStartingEventArgs , ScrollControllerScrollToRequestedEventArgs , ScrollControllerScrollByRequestedEventArgs , ScrollControllerScrollToRequestedEventArgs , ScrollingZoomStartingEventArgs , ScrollingBringingIntoViewEventArgs , ScrollingScrollAnimationStartingEventArgs , ScrollingScrollCompletedEventArgs , ScrollingScrollStartingEventArgs
  • Count() : ItemsSourceView
  • CountDescendants() : ViewModel
  • Create()
: StoreMockData
, DropDownButton::DropDownButtonFactory
, ColorPickerSlider::ColorPickerSliderFactory
, ColorSpectrum::ColorSpectrumFactory
, BreadcrumbBarItem::BreadcrumbBarItemFactory
, Expander::ExpanderFactory
, StoreMockData
  • CreateAcrylicBrush() : AcrylicBrush
  • CreateAcrylicBrushCompositionEffectFactory() : AcrylicBrush
  • CreateAcrylicBrushWorker() : AcrylicBrush
  • CreateAlphaSliderCheckeredBackground() : ColorPicker
  • CreateAndAttachHeaderAnimation() : NavigationView
  • CreateAndHookEventsToSettings() : NavigationView
  • CreateAndInitializeRepeater() : FlowLayoutTests , RepeaterFocusTests , LayoutTests , ItemTemplateTests
  • CreateAndInitializeVirtualizationInfo() : ItemsRepeater
  • CreateAndSetVisual() : WebView2
  • CreateAnimation() : AcrylicBrush
  • CreateAnimations() : IAnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisualPlayer
  • CreateBackdropAcrylicEffectBrush() : IAcrylicBrushStaticsPrivate
  • CreateBackdropAcrylicEffectBrushWithLuminosity() : IAcrylicBrushStaticsPrivate
  • CreateBitmapsAndColorMap() : ColorSpectrum
  • CreateBooleanKeyFrameAnimation() : AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual
  • CreateBottomContent() : SwipeControl
  • CreateButtonListItems() : PipsPagerExamples
  • CreateCategory() : StoreMockData
  • CreateChild() : LinedFlowLayoutDemo
  • CreateChildren() : ScrollViewDynamicPage , ScrollPresenterDynamicPage , ScrollViewerPage
  • CreateChildrenForNode() : BreadcrumbBarPage
  • CreateChildrenInTabFocusOrderIterable() : ItemsRepeater
  • CreateColor() : EffectBase
  • CreateColorPreviewCheckeredBackground() : ColorPicker
  • CreateConditionalExpression() : ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , SnapPointBase , SnapPointWrapper< T > , RepeatedZoomSnapPoint
  • CreateContainer() : RecipeElementFactory
  • CreateContent() : SwipeControl
  • CreateContentDialog() : ContentDialogPage
  • CreateContractAnimation() : TeachingTip
  • CreateCoreObjects() : WebView2
  • CreateCoreWebViewFromEnvironment() : WebView2
  • CreateDataSource() : MockItemsSource
  • CreateDataSource< T >() : MockItemsSource
  • CreateDataTemplateWithContent() : RepeaterTests
  • CreatedByNavigationViewItemsFactory() : NavigationViewItemBase
  • CreateDefaultCoreEnvironment() : WebView2
  • CreateDefaultItemTransitionProvider() : LinedFlowLayout , Layout
  • CreateElementFactory< T >() : MockElementFactory
  • CreateExpandAnimation() : TeachingTip
  • CreateFrom() : IndexPath
  • CreateFromIndices() : IndexPath
  • CreateFromString() : XamlTypeBase
  • CreateIconElementCore() : AnimatedIconSource , ImageIconSource
  • CreateInkDrawingAttributes() : InkToolBarCustomPen
  • CreateInkDrawingAttributesCore() : InkToolBarCustomPen
  • CreateInkPresenter() : InkCanvas
  • CreateInstance() : ItemsSourceViewFactory
  • CreateItems() : TreeViewTests
  • CreateItemsImpl() : TreeViewTests
  • CreateLabelContainers() : AnnotatedScrollBar
  • CreateLarge() : PictureLibrary
  • CreateLayout() : AccessibilityTests , ViewManagerTests
  • CreateLeftContent() : SwipeControl
  • CreateLightDismissIndicatorPopup() : TeachingTip
  • CreateMenuItem() : HierarchicalNavigationViewMarkup
  • CreateMissingAnaheimWarning() : WebView2
  • CreateNavigationTransitionInfo() : NavigationView
  • CreateNested() : Data
  • CreateNestedData() : SelectionModelTests
  • CreateNewMyData() : TabViewTabItemsSourcePage
  • CreateNewPopup() : TeachingTip
  • CreateNewView() : RevealScenarioSecondaryView
  • CreatePersonInfoList() : PipsPagerExamples
  • CreatePresenter() : CommandBarFlyout , MenuBarItemFlyout
  • CreateRecipe() : AnimationsDemoPage
  • CreateRefreshInteractionRatioChangedEventArgsInstance() : PullToRefreshHelperTestApi
  • CreateRefreshRequestedEventArgsInstance() : PullToRefreshHelperTestApi
  • CreateRefreshStateChangedEventArgsInstance() : PullToRefreshHelperTestApi
  • CreateRepeater() : ViewManagerTests , AccessibilityTests
  • CreateRestingPointExpression() : RepeatedZoomSnapPoint , ScrollSnapPoint , ZoomSnapPoint , SnapPointWrapper< T > , SnapPointBase , RepeatedScrollSnapPoint
  • CreateRevealBorderEffect() : RevealBrush
  • CreateRevealBrush() : RevealBrush
  • CreateRevealHoverEffect() : RevealBrush
  • CreateRightContent() : SwipeControl
  • CreateScalarKeyFrameAnimation() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • CreateScaledBrush() : MaterialHelperBase
  • CreateSmall() : PictureLibrary
  • CreateSpectrumBrush() : SpectrumBrush
  • CreateSpriteShape() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • CreateStreamFromBytes() : SharedHelpers
  • CreateTabViewItem() : TabViewTests
  • CreateTopContent() : SwipeControl
  • CreateTree() : TreeViewPage
  • CreateTreeViewItemsSource() : TreeViewTests
  • CreateVector2KeyFrameAnimation() : AnimatedFindVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • Cross() : Flex
  • CTR_CheckCleanup() : LightConfigurationTests
  • CubicBezierEasingFunction() : ProgressRingDeterminate::AnimatedVisual
  • CubicBezierEasingFunction_0() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_1() : AnimatedFindVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_2() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_3() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • CubicBezierEasingFunction_4() : AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • CubicBezierEasingFunction_5() : AnimatedFindVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • CubicBezierEasingFunction_6() : LottieLogo::LottieLogo_AnimatedVisual
  • CubicBezierEasingFunction_7() : LottieLogo::LottieLogo_AnimatedVisual
  • CubicBezierEasingFunction_8() : LottieLogo::LottieLogo_AnimatedVisual
  • Current()
: VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
, ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
, ObservableVector< T >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
, SelectedItems< T >::Iterator
, HashMap< K, V >::Iterator
, BreadcrumbIterator
  • CurrentAnchor() : ScrollPresenter , ItemsRepeaterScrollHost , ScrollView
  • CurrentItemIndex() : ItemsViewProperties
  • CurrentItemIndexProperty() : ItemsViewProperties
  • CurrentWidth() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CurrentWidthProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • CurrentXamlRootChanged() : SwipeControl
  • CursorClickUpdateTest() : WebView2Tests
  • CursorUpdateTest() : WebView2Tests
  • CustomAnimationStateEntered() : RefreshInfoProviderImpl , ScrollPresenter , SwipeControlInteractionTrackerOwner , SwipeControl , RefreshInfoProviderImplementation , InteractionTrackerOwner
  • CustomBackgroundChanged() : InfoBarPage
  • CustomConfiguration_BasicTest() : WebView2Tests
  • CustomConfiguration_EnsureAgainAfterCustomTest() : WebView2Tests
  • CustomConfiguration_EnsureAgainAfterDefaultTest() : WebView2Tests
  • CustomContent() : CustomContent
  • CustomContentCheckBox_CheckedChanged() : TitleBarPageWindow
  • CustomElementFactory() : PhasingTests::CustomElementFactory
  • CustomEnumerable() : InspectingDataSourceTests::CustomEnumerable
  • Customer() : Customer
  • Customers() : Customers
  • CustomFormatterButton_Click() : NumberBoxPage
  • CustomFormatterTest() : NumberBoxTests
  • CustomImages_Loaded() : RatingControlPage
  • CustomImagesTwo_Loaded() : RatingControlPage
  • CustomIndexOf() : Vector< T, flags, Helper >
  • CustomItemsSource() : CustomItemsSource
  • CustomItemsSourceWithUniqueId() : CustomItemsSourceWithUniqueId
  • CustomizeRatingItem() : RatingControl
  • CustomizeStackPanel() : RatingControl
  • CustomNavigationViewItem() : CustomNavigationViewItem
  • CustomPen() : InkToolBarCustomPenButton , InkToolBarCustomPenButtonProperties , InkToolBarCustomPenButton , InkToolBarCustomPenButtonProperties
  • CustomPenProperty() : InkToolBarCustomPenButtonProperties
  • CustomProperty() : CustomProperty
  • CustomTooltipButton_Click() : TabViewPage
  • CutCommand_ExecuteRequested() : MenuBarPage
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- d -

  • Data() : ElementFactoryGetArgsDownlevel , TabViewTabDragStartingEventArgs , TreeViewDragItemsStartingEventArgs , VirtualizationInfo
  • DataContext() : SelectTemplateEventArgs
  • DataCount() : final
  • DataItem() : DataItem
  • DataPackageOperationFromDropEffect() : WebView2
  • DataSourceAddItem() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceChanged() : final
  • DataSourceInsertItem() : ListViewBasePage , ItemsViewSummaryPage , FlatItemsControlPage
  • DataSourceRaiseResetNotification() : ListViewBasePage
  • DataSourceRemoveAllItems() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceRemoveItem() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceReplaceItem() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • DataSourceReplaceItemContent() : ItemsViewSummaryPage
  • DataTemplateComponent() : VirtualizationInfo
  • DatePickerDensityTest() : CommonStylesTests
  • DatePickerDensityTest_Click() : CommonStylesPage
  • DatePickerPage() : DatePickerPage
  • DebugTrace() : VirtualizingStackLayout
  • DECLARE_D2D_GUID() : Transform2DEffect , UnPremultiplyEffect , AlphaMaskEffect , ArithmeticCompositeEffect , BlendEffect , BorderEffect , ColorMatrixEffect , ColorSourceEffect , CompositeStepEffect , ContrastEffect , CrossFadeEffect , DistantDiffuseEffect , DistantSpecularEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , GrayscaleEffect , HueRotationEffect , InvertEffect , LinearTransferEffect , LuminanceToAlphaEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , PremultiplyEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect
  • DECLARE_DUAL_SOURCES() : AlphaMaskEffect , ArithmeticCompositeEffect , BlendEffect , CompositeStepEffect , CrossFadeEffect
  • DECLARE_NAMED_PROPERTY_MAPPING() : ArithmeticCompositeEffect , BlendEffect , BorderEffect , ColorMatrixEffect , ColorSourceEffect , CompositeStepEffect , ContrastEffect , CrossFadeEffect , DistantDiffuseEffect , DistantSpecularEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , HueRotationEffect , LinearTransferEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect , Transform2DEffect
  • DECLARE_POD_PROPERTY() : ExposureEffect , GammaTransferEffect , GaussianBlurEffect , HueRotationEffect , LinearTransferEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , ArithmeticCompositeEffect , SpotSpecularEffect , ArithmeticCompositeEffect , SpotSpecularEffect , ArithmeticCompositeEffect , SpotSpecularEffect , ArithmeticCompositeEffect , SpotSpecularEffect , ArithmeticCompositeEffect , TemperatureAndTintEffect , BlendEffect , TintEffect , BorderEffect , Transform2DEffect , BorderEffect , Transform2DEffect , ColorMatrixEffect , ColorSourceEffect , CompositeStepEffect , ContrastEffect , CrossFadeEffect , DistantDiffuseEffect , DistantSpecularEffect
  • DECLARE_SINGLE_SOURCE() : BorderEffect , ColorMatrixEffect , ContrastEffect , DistantDiffuseEffect , DistantSpecularEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , GrayscaleEffect , HueRotationEffect , InvertEffect , LinearTransferEffect , LuminanceToAlphaEffect , OpacityEffect , PointDiffuseEffect , PointSpecularEffect , PosterizeEffect , PremultiplyEffect , SaturationEffect , SepiaEffect , SpotDiffuseEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect , Transform2DEffect , UnPremultiplyEffect
  • DeconstructionHandlesCorrectlyTest() : ScrollViewerAdapterTests
  • DecrementDeferralCount() : RefreshRequestedEventArgs , TeachingTipClosingEventArgs
  • DecrementRepeatButton_Click() : CompositionScrollController
  • DefaultAttachedData() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider
  • DefaultBackgroundColor() : WebView2Properties
  • DefaultBackgroundColorProperty() : WebView2Properties
  • DefaultItemCollectionTransitionProvider() : DefaultItemCollectionTransitionProvider
  • Defaults() : Defaults
  • DefaultVectorIDOnInsert() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider
  • DEFINE_TRACELOGGING_EVENT_PARAM1() : final
  • DEFINE_TRACELOGGING_EVENT_PARAM2() : final
  • DEFINE_TRACELOGGING_EVENT_PARAM4() : final
  • DegreesToRadians() : RevealStatesPage
  • Deinitialize() : MUXControlsFactory
  • DelayForHalfAnimationDurationThenReverse() : AnimatedVisualPlayerPage
  • DelegatingItemsSource() : DelegatingItemsSource
  • DeleteInstanceOnUIThread() : ReferenceTracker< D, ImplT, I >
  • DeleteSelectedItem() : ItemsViewTransitionPage
  • DependencyPropertyOrdering() : PersonPictureTests
  • Depth() : TreeViewNodeProperties , NavigationViewItemBase
  • DepthProperty() : TreeViewNodeProperties
  • Description() : NumberBoxProperties
  • DescriptionProperty() : NumberBoxProperties
  • Deselect() : ItemsView , SelectionModel , GroupedRepeaterItem
  • DeselectAll() : ItemsView
  • DeselectAt() : SelectionModel
  • DeselectRange() : SelectionModel
  • DeselectRangeFromAnchor() : SelectionModel
  • DeselectRangeFromAnchorTo() : SelectionModel
  • DeselectWithAnchorPreservation() : SelectorBase
  • DesktopAcrylicBackdrop() : DesktopAcrylicBackdrop
  • Destination() : ICompositeStepEffect
  • DestroyAnimations() : AnimatedVisualPlayer , LottieLogo::LottieLogo_AnimatedVisual , IAnimatedVisual
  • Detach() : AutoHandle< THandlePolicy >
  • DetachDismissingHandlers() : SwipeControl
  • DetachEventHandlers() : CommandBarFlyoutCommandBar , MenuBarItem , SwipeControl
  • DetachFromCompositionTarget() : InkCanvas
  • DetachFromVisualLink() : InkCanvas
  • DetailLabelDoesNotShowWhenDataFieldIsEmpty() : AnnotatedScrollBarInteractionTests
  • DetailLabelRequested() : AnnotatedScrollBarProperties
  • DetailLabelRequestedOffsetDoesNotExceedMaxPossibleValue() : AnnotatedScrollBarInteractionTests
  • DetailLabelTemplate() : AnnotatedScrollBarProperties
  • DetailLabelTemplateProperty() : AnnotatedScrollBarProperties
  • DetatchFromLayoutChanged() : RadioButtons
  • DeterminateSource() : ProgressRingProperties
  • DeterminateSourceProperty() : ProgressRingProperties
  • DetermineActualApplicableZone() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , RepeatedZoomSnapPoint , SnapPointWrapper< T > , ZoomSnapPoint
  • DetermineActualImpulseApplicableZone() : SnapPointBase , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineEffectivePlacement() : TeachingTip
  • DetermineEffectivePlacementTargeted() : TeachingTip
  • DetermineEffectivePlacementUntargeted() : TeachingTip
  • DetermineFirstRepeatedSnapPointValue() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • DetermineFractionDigits() : RatingControlAutomationPeer
  • DetermineLastRepeatedSnapPointValue() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • DetermineMaxActualApplicableZone() : RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineMaxActualImpulseApplicableZone() : RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineMinActualApplicableZone() : RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint
  • DetermineMinActualImpulseApplicableZone() : ZoomSnapPoint , RepeatedZoomSnapPoint , ScrollSnapPoint , RepeatedScrollSnapPoint
  • DetermineSignificantDigits() : RatingControlAutomationPeer
  • DetermineSpaceAroundTarget() : TeachingTip
  • DiagnosticMessage() : MapControlMapServiceErrorOccurredEventArgs
  • Diagnostics() : AnimatedVisualPlayerProperties
  • DiagnosticsProperty() : AnimatedVisualPlayerProperties
  • DialogWithNavView() : DialogWithNavView
  • DiffuseAmount() : IDistantDiffuseEffect , IPointDiffuseEffect , ISpotDiffuseEffect , IDistantDiffuseEffect
  • DirectionToInset() : SwipeControl
  • DisableActionButtonAsynchronouslyClick() : InfoBarPage
  • DisableActionButtonProperty() : InfoBarPage
  • DisableClickToExpand_Click() : TreeViewPage
  • DisabledFallbackRating_Loaded() : RatingControlPage
  • DisabledGlyph() : RatingItemFontInfoProperties
  • DisabledGlyphProperty() : RatingItemFontInfoProperties
  • DisabledImage() : RatingItemImageInfoProperties
  • DisabledImageFallbackRating_Loaded() : RatingControlPage
  • DisabledImageProperty() : RatingItemImageInfoProperties
  • DisabledItemsAtTopOfColumnKeyboardTest() : RadioButtonsTests
  • DisabledItemsKeyboardTest() : RadioButtonsTests
  • DisabledItemTest() : CommonTests
  • DisableHoverAnimation() : RevealHoverLight
  • DisableItemDrag_Click() : TreeViewPage
  • DisableItemReorder_Click() : TreeViewPage
  • DiscardActionButton() : InfoBarPage
  • DiscardElementsOutsideWindow() : final
  • DisconnectFromRootVisualTarget() : WebView2
  • DismissFlyout() : TextCommandBarFlyoutTests
  • DismissRevealedSwipe() : SwipeControlTests
  • DismissSwipeOnAcceleratorKeyActivator() : SwipeControl
  • DismissSwipeOnAnExternalTap() : SwipeControl
  • DispatcherHelper() : DispatcherHelper
  • DispatcherTimer_Tick() : RatingControlPage , SwipeControlPage
  • DisplayMode() : PagerControlProperties , NavigationViewDisplayModeChangedEventArgs , NavigationViewProperties , PagerControlProperties
  • DisplayModeChanged() : NavigationViewProperties
  • DisplayModeChangeSelectionEventTest() : SelectionTests
  • DisplayModeCombobox_SelectionChanged() : SplitViewPage
  • DisplayModeProperty() : NavigationViewProperties , PagerControlProperties
  • DisplayModeTest() : CommonTests
  • DisplayName() : PersonPictureProperties
  • DisplayNameProperty() : PersonPictureProperties
  • DisplayNameTextBox_TextChanged() : PersonPicturePage
  • DisposableUserControl() : DisposableUserControl
  • Dispose()
: BrightnessSun::BrightnessSun_AnimatedVisual
, WebView2Tests::WebView2TestSetupHelper
, ScrollPresenterTestHooksHelper
, ColorChangedEventWaiter
, ProgressRingDeterminate::AnimatedVisual
, MainWindowLightConfiguration
, SecondaryWindowLightConfiguration
, ScrollViewTestHooksHelper
, LottieLogo::LottieLogo_AnimatedVisual
, ScrollViewTestsWithInputHelper::LoggingHelper
, ColorPickerTests::ColorPickerTestSetupHelper
, ItemsViewTestsWithInputHelper::LoggingHelper
  • DoesAdvertiseSupportedEvents() : ButtonInteractionTests , SliderInteractionTests
  • DoesInvokeWithKeyboard() : ButtonInteractionTests
  • DoesNavigationViewItemHaveChildren() : NavigationView
  • DoesNotInvokeWhenClickIsDraggedOffBeforeRelease() : ButtonInteractionTests
  • DoesNotSlidePastMaximum() : SliderInteractionTests
  • DoesNotSlidePastMinimum() : SliderInteractionTests
  • DoesRealizationWindowOverlapExtent() : FlowLayout
  • DoesRectContainPoint() : SharedHelpers
  • DoesRepeaterHaveRealizedContainers() : NavigationView
  • DontCrashWhenRecyclingTest() : RatingControlTests
  • DoPhasedWorkCallback() : final
  • DoRectsIntersect() : SharedHelpers
  • DoScroll() : ScrollView
  • DoScrollForKey() : ScrollView
  • DoSelectAllByKeyboard() : WebView2Tests
  • DragBetweenTabViewsTest() : TabViewTests
  • DragDropIntoWebView2Test() : WebView2Tests
  • DragEnterForApiTest() : TreeViewPage
  • Draggable_DragStarting() : TreeViewPage
  • DraggableText_DragStarting() : WebView2BasicPage
  • DraggedTreeViewNode() : TreeViewList
  • DragItemOntoTreeView() : TreeViewTests
  • DragItemOntoTreeView_ContentMode() : TreeViewTests
  • DragItemOntoTreeView_NodeMode() : TreeViewTests
  • DragItemOutOfTreeView() : TreeViewTests
  • DragItemOutOfTreeView_ContentMode() : TreeViewTests
  • DragItemOutOfTreeView_NodeMode() : TreeViewTests
  • DragItemsCompleted() : TreeViewProperties
  • DragItemsCompletedForApiTest() : TreeViewPage
  • DragItemsCount() : TreeViewItemTemplateSettingsProperties
  • DragItemsCountProperty() : TreeViewItemTemplateSettingsProperties
  • DragItemsStarting() : TreeViewProperties
  • DragItemsStartingForApiTest() : TreeViewPage
  • DragLeaveForApiTest() : TreeViewPage
  • DragOutsideTest() : TabViewTests
  • DragOverForApiTest() : TreeViewPage
  • DragTabWithinTabView() : TabView
  • DragTornOutTab() : TabView
  • DropDownButton() : DropDownButton
  • DropDownButtonAutomationPeer() : DropDownButtonAutomationPeer
  • DropDownButtonPage() : DropDownButtonPage
  • DropDownEventRevokersProperty() : ComboBoxHelper
  • DropEffect() : TreeViewListAutomationPeer
  • DropEffects() : TreeViewListAutomationPeer
  • DropForApiTest() : TreeViewPage
  • DropIndex() : TabViewExternalTornOutTabsDroppedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs
  • DropResult() : TreeViewDragItemsCompletedEventArgs , TabViewTabDragCompletedEventArgs
  • DropTarget_DragOver() : TreeViewPage
  • DropTarget_Drop() : TreeViewPage
  • Dummy() : ObservableTraits< T, isObservable, isBindable >::Dummy
  • DumpThemeResources() : CommonStylesApiTests
  • Duration() : AnimatedChevronRightDownSmallVisualSource , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource , AnimatedAcceptVisualSource , AnimatedVisualPlayerProperties , AnimatedFindVisualSource , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource , AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource , AnimatedVisualPlayerProperties , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedBackVisualSource , AnimatedVisual
  • DurationInMilliSeconds() : final
  • DurationProperty() : AnimatedVisualPlayerProperties
  • DynamicCommandTimer_Tick() : CommandBarFlyoutPage
  • DynamicLabelTimer_Tick() : CommandBarFlyoutPage
  • DynamicPage() : DynamicPage
  • DynamicVisibilityTimer_Tick() : CommandBarFlyoutPage
  • DynamicWidthTimer_Tick() : CommandBarFlyoutPage
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- e -

  • EdgeProcessFailedTest() : WebView2Tests
  • Edit() : AnimatedVisualPlayerTests
  • EffectiveHeroContentPlacementChanged() : TeachingTipTestHooks
  • EffectiveItemHeight() : UniformGridLayoutState
  • EffectiveItemWidth() : UniformGridLayoutState
  • EffectivePlacementChanged() : TeachingTipTestHooks
  • Element() : ItemsRepeaterElementIndexChangedEventArgs , ItemsRepeaterElementPreparedEventArgs , MapElementClickEventArgs , ItemsRepeaterScrollHost::CandidateInfo , ElementInfo , ElementFactoryRecycleArgsDownlevel , RecyclePool::ElementInfo , BringIntoViewOffsetsChange , ElementFactoryRecycleArgsDownlevel , ItemCollectionTransition , ItemCollectionTransitionCompletedEventArgs , ItemCollectionTransitionProgress , ItemsRepeaterElementClearingEventArgs
  • ElementClearing() : ItemsRepeaterProperties
  • ElementFactory_SelectTemplateKey() : TreeViewSample
  • ElementIndexChanged() : ItemsRepeaterProperties
  • ElementInfo() : ElementInfo , RecyclePool::ElementInfo
  • ElementManager() : final
  • ElementManager::operator=() : final
  • ElementPhasingManager() : PhasingTests::ElementPhasingManager
  • ElementPrepared() : ItemsRepeaterProperties
  • ElementRect() : BringIntoViewOffsetsChange
  • ElementsInItemsSourcePage() : ElementsInItemsSourcePage
  • ElementTheme_Changed() : RevealStatesPage
  • Elevation() : IDistantDiffuseEffect , IDistantSpecularEffect
  • Ellipse_0_0() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_0_1() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_14p188() : AnimatedFindVisualSource_AnimatedVisual
  • Ellipse_4p6() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_4p7() : LottieLogo::LottieLogo_AnimatedVisual
  • Ellipse_74p5() : BrightnessSun::BrightnessSun_AnimatedVisual
  • Ellipse_7_0() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • Ellipse_7_1() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • Ellipse_7_2() : AnimatedVisual
  • EllipseAnimationEndPosition() : ProgressBarTemplateSettingsProperties
  • EllipseAnimationEndPositionProperty() : ProgressBarTemplateSettingsProperties
  • EllipseAnimationWellPosition() : ProgressBarTemplateSettingsProperties
  • EllipseAnimationWellPositionProperty() : ProgressBarTemplateSettingsProperties
  • EllipseDiameter() : ProgressRingTemplateSettingsProperties , ProgressBarTemplateSettingsProperties
  • EllipseDiameterProperty() : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • EllipseOffset() : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • EllipseOffsetProperty() : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • EllipsisIsRendered() : BreadcrumbLayout
  • EmptyMenuBarItemNoPopupTest() : MenuBarTests
  • EmptyTreeNode() : VirtualizingDataSource
  • EnableCheckBox_Checked() : SplitButtonPage
  • EnableCheckBox_Unchecked() : SplitButtonPage
  • EnableHoverAnimation() : RevealHoverLight
  • EnableLightDismiss() : TeachingTipTests
  • EnableMultiselect() : TreeViewList
  • EnableSelectionFollowsFocus_Click() : NavigationViewTopNavStorePage
  • end() : final
  • End() : HashMap< K, V > , IndexRange , RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • EndIndex() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • EndPosition() : ScrollingScrollAnimationStartingEventArgs
  • EndSelectionChanges() : ViewModel
  • EndSubTest() : WebView2Tests
  • EndZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • EnqueueOperation() : ListViewBasePage
  • EnsureAnchorElementSelection() : ScrollPresenter
  • EnsureAndMeasureItemRange() : LinedFlowLayout
  • EnsureAndResizeItemAspectRatios() : LinedFlowLayout
  • EnsureAnimatedVariables() : ParallaxView
  • EnsureAutomationPeer() : ScrollPresenterAccessibilityPage
  • EnsureAutomationSetCountAndPosition() : CommandBarFlyoutCommandBar
  • EnsureBrowser() : WebView2Tests
  • EnsureClearingListIsSafe() : CommonTests
  • EnsureClip() : SwipeControl
  • EnsureCompositionBrush() : RadialGradientBrush
  • EnsureCompositionCapabilities() : MaterialHelper
  • EnsureCompositionResources() : RevealBorderLight , RevealHoverLight , XamlAmbientLight
  • EnsureCoreWebView2Async() : WebView2
  • EnsureDefaultLayoutState() : ItemsRepeater
  • EnsureDisplayModeGroupUpdatesOnPaneClosedToMinimalWithBackButton() : CommonTests
  • EnsureDisplayModeGroupUpdatesWhenBackButtonVisibilityChanged() : CommonTests
  • EnsureDynamicSizeForPaneHeaderFooterAndCustomContent() : PaneBehaviorTests
  • EnsureElementAvailableWidths() : LinedFlowLayout
  • EnsureElementDesiredWidths() : LinedFlowLayout
  • EnsureElementRealized() : final , LinedFlowLayout
  • EnsureElementSize() : UniformGridLayoutState
  • EnsureEventSubscriptions() : final
  • EnsureExpressionAnimationSources() : ScrollPresenter
  • EnsureFirstLastRealizedIndices() : final
  • EnsureGlobalTestHooks() : ScrollViewTestHooks , SwipeTestHooks , TeachingTipTestHooks , AnimatedIconTestHooks , ItemsViewTestHooks , RadioButtonsTestHooks , ScrollPresenterTestHooks
  • EnsureHooks() : LayoutsTestHooks , RepeaterTestHooks , MUXControlsTestHooks
  • EnsureInitialized() : MUXControlsFactory
  • EnsureInstance() : SplitButtonTestHelper
  • EnsureInteractionTracker() : ScrollPresenter
  • EnsureInternalSourcePropertySetAndExpressionAnimations() : ScrollInputHelper
  • EnsureItemAspectRatios() : LinedFlowLayout
  • EnsureItemRange() : LinedFlowLayout
  • EnsureItemRangeFastPath() : LinedFlowLayout
  • EnsureItemsInfoArrangeWidths() : LinedFlowLayout
  • EnsureItemsInfoDesiredAspectRatios() : LinedFlowLayout
  • EnsureItemsInfoMaxWidths() : LinedFlowLayout
  • EnsureItemsInfoMinWidths() : LinedFlowLayout
  • EnsureItemTemplate() : ItemsView
  • EnsureLeftSettingsRetainsFocusAfterOrientationChanges() : FocusBehaviorTests
  • EnsureLineItemCounts() : LinedFlowLayout
  • EnsureLocalizedControlTypes() : CommandBarFlyoutCommandBar
  • EnsureLocalLight() : RevealBorderLight
  • EnsureNavViewClosed() : NavigationViewTestsBase
  • EnsureNoiseBrush() : AcrylicBrush , RevealBrush
  • EnsureNoMissingThemeResources() : CommonStylesApiTests
  • EnsureOwnerIsPanelOrNull() : RecyclePool
  • EnsurePaneCanBeHidden() : PaneBehaviorTests
  • EnsurePaneCanBeHiddenWithFixedWindowSize() : PaneBehaviorTests
  • EnsurePaneHeaderCanBeModifiedForLeftNav() : CommonTests
  • EnsurePaneHeaderCanBeModifiedForTopNav() : CommonTests
  • EnsurePaneHeaderCanBeModifiedHelper() : NavigationViewTestsBase
  • EnsurePanningInfo() : AnnotatedScrollBar
  • EnsurePositionBoundariesExpressionAnimations() : ScrollPresenter
  • EnsureProperties() : StackLayoutProperties , SwipeControlProperties , SwipeItemProperties , SwipeItemsProperties , TabViewProperties , TabViewItemProperties , TabViewItemTemplateSettingsProperties , TeachingTipProperties , TeachingTipTemplateSettingsProperties , TitleBarProperties , TitleBarTemplateSettingsProperties , ToggleSplitButtonProperties , TreeViewProperties , TreeViewItemProperties , TreeViewItemTemplateSettingsProperties , TreeViewNodeProperties , TwoPaneViewProperties , UniformGridLayoutProperties , WebView2Properties , XamlAmbientLightProperties , XamlControlsResourcesProperties , RevealBrush , RecyclePool , AutoSuggestBoxHelper , ComboBoxHelper , CommandBarFlyoutCommandBarTemplateSettingsFactory , AcrylicBrushProperties , AnimatedIconProperties , AnimatedIconSourceProperties , AnimatedVisualPlayerProperties , AnnotatedScrollBarProperties , AutoSuggestBoxHelperProperties , BreadcrumbBarProperties , ButtonInteractionProperties , ColorPickerProperties , ColorPickerSliderProperties , ColorSpectrumProperties , ColumnMajorUniformToLargestGridLayoutProperties , ComboBoxHelperProperties , CommandBarFlyoutCommandBarProperties , CommandBarFlyoutCommandBarAutomationPropertiesProperties , CommandBarFlyoutCommandBarTemplateSettingsProperties , CornerRadiusFilterConverterProperties , CornerRadiusToThicknessConverterProperties , ExpanderProperties , ExpanderTemplateSettingsProperties , FlowLayoutProperties , ImageIconProperties , ImageIconSourceProperties , InfoBadgeProperties , InfoBadgeTemplateSettingsProperties , InfoBarProperties , InfoBarPanelProperties , InfoBarTemplateSettingsProperties , InkCanvasProperties , InkToolBarProperties , InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties , InkToolBarEraserButtonProperties , InkToolBarFlyoutItemProperties , InkToolBarMenuButtonProperties , InkToolBarPenButtonProperties , InkToolBarPenConfigurationControlProperties , InkToolBarStencilButtonProperties , InkToolBarToolButtonProperties , ItemCollectionTransitionProviderProperties , ItemContainerProperties , ItemsRepeaterProperties , ItemsSourceViewProperties , ItemsViewProperties , LayoutProperties , LayoutPanelProperties , LinedFlowLayoutProperties , MapControlProperties , MapElementsLayerProperties , MapIconProperties , MenuBarProperties , MenuBarItemProperties , MicaBackdropProperties , MonochromaticOverlayPresenterProperties , NavigationViewProperties , NavigationViewItemProperties , SplitButtonProperties , NavigationViewItemBaseProperties , NavigationViewItemPresenterProperties , NavigationViewItemPresenterTemplateSettingsProperties , SelectorBarProperties , NavigationViewTemplateSettingsProperties , NumberBoxProperties , PagerControlProperties , RevealBrushProperties , PagerControlTemplateSettingsProperties , ParallaxViewProperties , PersonPictureProperties , PersonPictureTemplateSettingsProperties , PipsPagerProperties , PipsPagerTemplateSettingsProperties , ProgressBarProperties , ProgressBarTemplateSettingsProperties , ProgressRingProperties , ProgressRingTemplateSettingsProperties , RadialGradientBrushProperties , RadioButtonsProperties , RadioMenuFlyoutItemProperties , RatingControlProperties , RatingItemFontInfoProperties , RatingItemImageInfoProperties , RecyclePoolProperties , RecyclingElementFactoryProperties , RefreshContainerProperties , RefreshVisualizerProperties , ScrollPresenterProperties , ScrollViewProperties , SelectionModelProperties , SelectorBarItemProperties , SliderInteractionProperties , SpectrumBrushProperties
  • EnsureRealized() : VirtualizingStackLayout
  • EnsureReferenceTrackerInterfaces() : ReferenceTracker< D, ImplT, I >
  • EnsureReplaceOfAnchorDoesNotResetAllContainers() : FlowLayoutCollectionChangeTests
  • EnsureResourcesLoaded() : RatingControl
  • EnsureRevealLights() : XamlControlsResources
  • EnsureScaleMaintainedOnTap() : RatingControlTests
  • EnsureScrollControllerExpressionAnimationSources() : ScrollPresenter
  • EnsureScrollControllerVisualInteractionSource() : ScrollPresenter
  • EnsureScroller() : ViewportManagerWithPlatformFeatures
  • EnsureScrollers() : ViewportManagerDownLevel
  • EnsureScrollPresenterVisualInteractionSource() : ScrollPresenter
  • EnsureSmallChangeValue() : AnnotatedScrollBar
  • EnsureTabStopUniqueness() : CommandBarFlyoutCommandBar
  • EnsureTemporaryHostHwnd() : WebView2
  • EnsureThemeProperties() : AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedSettingsVisualSource , ProgressRingDeterminate , ProgressRingIndeterminate , AnimatedGlobalNavigationButtonVisualSource , AnimatedChevronDownSmallVisualSource
  • EnsureThumbAnimation() : CompositionScrollControllerPanningInfo , AnnotatedScrollBarPanningInfo
  • EnsureTopSettingsRetainsFocusAfterOrientationChanges() : FocusBehaviorTests
  • EnsureTransformExpressionAnimations() : ScrollPresenter
  • EnterGamepadEngagementMode() : RatingControl
  • EnterText() : NumberBoxTests
  • EnumerateChildren() : TabViewTests
  • EnumerateDescendants() : TreeViewItemsSourceTestPage
  • EnumXamlType() : EnumXamlType
  • EraseAllClicked() : InkToolBarProperties
  • EraseIfExists() : SharedHelpers
  • EraserFlyoutItemClicked() : InkToolBarProperties
  • EraserFlyoutItemKind() : InkToolBarEraserFlyoutItemClickedEventArgs
  • EstablishShadows() : TeachingTip
  • EstimateExtent() : FlowLayoutAlgorithm , VirtualizingStackLayout
  • EstimateIndexForViewport() : VirtualizingStackLayout
  • Evaluate() : SnapPointWrapper< T > , ScrollSnapPoint , SnapPointBase , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • EvaluateIsSelectedBasedOnChildrenNodes() : final
  • Event()
: RoutedEventTraits< RoutedEventType::PointerExited >
, RoutedEventTraits< RoutedEventType::PointerCanceled >
, RoutedEventTraits< RoutedEventType::KeyDown >
, RoutedEventTraits< RoutedEventType::PointerReleased >
, RoutedEventTraits< RoutedEventType::GettingFocus >
, RoutedEventTraits< RoutedEventType::Drop >
, RoutedEventTraits< RoutedEventType::LosingFocus >
, RoutedEventTraits< RoutedEventType::PointerPressed >
, RoutedEventTraits< RoutedEventType::PointerCaptureLost >
, RoutedEventTraits< RoutedEventType::DragEnter >
, RoutedEventTraits< RoutedEventType::DragLeave >
  • event_base() : event_base< ImplT, T, StorageT >
  • event_source() : event_source< T >
  • Exception() : CoreWebView2InitializedEventArgs
  • Execute() : TestCommand , MyCommand
  • ExecuteAndWaitForColorChange() : ColorPickerTests::ColorPickerTestSetupHelper
  • ExecuteAndWaitForEvent() : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • ExecuteAndWaitForEvents() : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • ExecuteBoldCommand() : TextCommandBarFlyout
  • ExecuteCommand() : SplitButton
  • ExecuteCopyCommand() : TextCommandBarFlyout
  • ExecuteCutCommand() : TextCommandBarFlyout
  • ExecuteExecutingRotationAnimation() : RefreshVisualizer
  • ExecuteInteractingAnimations() : RefreshVisualizer
  • ExecuteItalicCommand() : TextCommandBarFlyout
  • ExecutePasteCommand() : TextCommandBarFlyout
  • ExecuteQueuedOperations() : ListViewBasePage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterDynamicPage , ItemsViewSummaryPage , ScrollPresenterRepeaterAnchoringPage
  • ExecuteRedoCommand() : TextCommandBarFlyout
  • ExecuteRemainOpenInvoked() : SwipeControlPage
  • ExecuteScaleUpAnimation() : RefreshVisualizer
  • ExecuteScriptAsync() : WebView2
  • ExecuteScriptTest() : WebView2Tests
  • ExecuteSelectAllCommand() : TextCommandBarFlyout
  • ExecuteTriggerableOperations() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • ExecuteUnderlineCommand() : TextCommandBarFlyout
  • ExecuteUndoCommand() : TextCommandBarFlyout
  • ExecutionRatio() : RefreshInfoProviderImpl
  • ExitGamepadEngagementMode() : RatingControl
  • ExitRegularPath() : LinedFlowLayout
  • Expand() : DropDownButton , Expander , ScrollPresenterStackPanelAnchoringPage , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , TreeViewItemDataAutomationPeer , TreeViewItemAutomationPeer , DropDownButtonAutomationPeer , TreeView , NavigationView , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , ExpanderAutomationPeer
  • ExpandAndWait() : DropDownButton , Expander
  • ExpandCollapseAutomationTests() : ExpanderTests
  • ExpandCollapseState() : ExpanderAutomationPeer , NavigationViewItemAutomationPeer , TreeViewItemAutomationPeer , TreeViewItemDataAutomationPeer , MenuBarItemAutomationPeer , ToggleSplitButtonAutomationPeer , SplitButtonAutomationPeer , DropDownButtonAutomationPeer
  • ExpandCollapseTest() : TreeViewTests
  • ExpandCollapseTest_ContentMode() : TreeViewTests
  • ExpandCollapseTest_NodeMode() : TreeViewTests
  • ExpandCollapseViaAutomationTest() : TreeViewTests
  • ExpandCollapseViaAutomationTest_ContentMode() : TreeViewTests
  • ExpandCollapseViaAutomationTest_NodeMode() : TreeViewTests
  • ExpandDirection() : ExpanderProperties
  • ExpandDirectionProperty() : ExpanderProperties
  • ExpandDownAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationHoldPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationHoldPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownOverflowVerticalPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandDownOverflowVerticalPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandedGlyph() : TreeViewItemProperties
  • ExpandedGlyphProperty() : TreeViewItemProperties
  • ExpandedGlyphVisibility() : TreeViewItemTemplateSettingsProperties
  • ExpandedGlyphVisibilityProperty() : TreeViewItemTemplateSettingsProperties
  • ExpandedModeCombobox_SelectionChanged() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewTopNavPage , NavigationViewRS4Page
  • ExpandedModeThresholdWidth() : NavigationViewProperties
  • ExpandedModeThresholdWidthProperty() : NavigationViewProperties
  • ExpandedWidth() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandedWidthProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • Expander() : Expander
  • ExpanderAutomationPeer() : ExpanderAutomationPeer
  • ExpanderAutomationPeerTest() : ExpanderTests
  • ExpanderPage() : ExpanderPage
  • ExpanderProperties() : ExpanderProperties
  • ExpanderTemplateSettings() : ExpanderTemplateSettings
  • ExpanderTemplateSettingsProperties() : ExpanderTemplateSettingsProperties
  • Expanding() : ExpanderProperties , NavigationViewProperties , ExpanderProperties , TreeViewProperties , NavigationViewProperties
  • ExpandingItem() : NavigationViewItemExpandingEventArgs
  • ExpandingItemContainer() : NavigationViewItemExpandingEventArgs
  • ExpandNode() : ViewModel
  • ExpandRootNode_Click() : TreeViewPage
  • ExpandSecondItem_Click() : TreeViewItemsSourceTestPage
  • ExpandUpAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationHoldPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationHoldPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpOverflowVerticalPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpandUpOverflowVerticalPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • ExpectNullSelectedItemInItemInvoke_Click() : NavigationViewTopNavOnlyPage
  • Exposure() : IExposureEffect
  • ExprBind() : RevealScenarioLights
  • ExpressionAnimationSources() : ScrollPresenter , ScrollView
  • ExpressionAnimationStatusChange() : ExpressionAnimationStatusChange
  • ExpressionAnimationStatusChanged() : ScrollPresenterTestHooks
  • ExtendedSelector() : ExtendedSelector
  • ExtendX() : IBorderEffect
  • ExtendY() : IBorderEffect
  • ExtentChanged() : ScrollPresenterProperties , ScrollViewProperties
  • ExtentHeight() : ScrollPresenter , ScrollView
  • ExtentWidth() : ScrollView , ScrollPresenter
  • ExternalTornOutTabsDropped() : TabViewProperties
  • ExternalTornOutTabsDropping() : TabViewProperties
  • ExtraCommandBarFlyoutPage() : ExtraCommandBarFlyoutPage
  • ExtractNumberFromString() : PipsPagerTestBase
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- f -

  • F6PutsFocusOnCloseButton() : TeachingTipTests
  • FailedToAttachLights() : MaterialHelper
  • FallbackColorButton_Checked() : AcrylicBrushPage , AcrylicBrushBasicPage
  • FallbackColorButton_Unchecked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • FallbackContent() : AnimatedVisualPlayerProperties
  • FallbackContentProperty() : AnimatedVisualPlayerProperties
  • FallbackGrid() : FallbackGrid
  • FallbackIconSource() : AnimatedIconProperties , AnimatedIconSourceProperties
  • FallbackIconSourceProperty() : AnimatedIconSourceProperties , AnimatedIconProperties
  • FallenBackButton_ClickAsync() : AnimatedVisualPlayerPage
  • FallenBackTest() : AnimatedVisualPlayerTests
  • FillComboBoxCollectionToSize() : PagerControl
  • FillPixelForBox() : ColorSpectrum
  • FillPixelForRing() : ColorSpectrum
  • FillPointerInfo() : WebView2
  • FillPointerPenInfo() : WebView2
  • FillPointerTouchInfo() : WebView2
  • FillSnapPoint() : ScrollPresenterScrollSnapPointsPage
  • FillTreeNode() : VirtualizingDataSource
  • Filter() : CornerRadiusFilterConverterProperties
  • FilterProperty() : CornerRadiusFilterConverterProperties
  • filterText_TextChanged() : SortingAndFilteringPage
  • final_release() : ReferenceTracker< D, ImplT, I >
  • FindAndGiveAutomationIdToVisualChild() : ColorPickerPage
  • FindAndGiveAutomationNameToVisualChild() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage , PersonPicturePage
  • FindButton() : NumberBoxTests
  • FindCloseButton() : InfoBarTests , TabViewTests
  • FindElementOfTypeInSubtree< T >() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewAnchoringPage , ListViewBasePage , NestedItemsControlsPage
  • FindFocusCandidate() : final
  • FindFrameworkElementWithName() : TabViewPage
  • FindInApplicationResources() : SharedHelpers
  • FindInnerScrollViewer() : ParallaxViewTests , PipsPagerExamples
  • FindInVisualTree() : SharedHelpers
  • FindInVisualTreeByName() : SharedHelpers
  • FindInVisualTreeByType() : SharedHelpers
  • FindKey() : HashMap< K, V >
  • FindLowestLevelContainerToDisplaySelectionIndicator() : NavigationView
  • FindMovableItemsBeyondAvailableWidth() : NavigationView
  • FindMovableItemsRecoverToPrimaryList() : NavigationView
  • FindMovableItemsToBeRemovedFromPrimaryList() : NavigationView
  • FindResource() : SharedHelpers
  • FindSelectionIndicator() : NavigationView
  • FindTabViewItemFromContent() : TabViewPage
  • FindTabViewItemFromDragItem() : TabView
  • FindTextBox() : NumberBoxTests , PagerControlTestBase
  • FindVisualInteractionSourceVisual() : SwipeControl
  • FireCoreProcessFailedEvent() : WebView2
  • FireCoreWebView2Initialized() : WebView2
  • FireEvent() : CMethodProfileGroupBase , CMethodProfileGroup< size >
  • FireNavigationCompleted() : WebView2
  • FireNavigationStarting() : WebView2
  • FireWebMessageReceived() : WebView2
  • First() : BreadcrumbIterable , HashMap< K, V > , ObservableVector< T > , ChildrenInTabFocusOrderIterable , SelectedItems< T > , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems
  • FirstButtonClicked() : PagerControl
  • FirstButtonCommand() : PagerControlProperties
  • FirstButtonCommandProperty() : PagerControlProperties
  • FirstButtonStyle() : PagerControlProperties
  • FirstButtonStyleProperty() : PagerControlProperties
  • FirstButtonVisibility() : PagerControlProperties
  • FirstButtonVisibilityProperty() : PagerControlProperties
  • FirstDayOfWeek_SelectionChanged() : CalendarViewPage
  • FirstFocusedPageTest() : PipsPagerTests
  • FirstFrozenItemIndexDbg() : LinedFlowLayout
  • FirstPageButtonChangingPageTest() : PagerControlTests
  • FirstPageButtonVisibilityOptionsTest() : PagerControlTests
  • FirstRealizedIndexInRect() : VirtualizingUniformCarouselStackLayout , VirtualizingUniformStackLayout
  • FirstRealizedItemIndexDbg() : LinedFlowLayout
  • FirstRealizedRowIndexInRect() : UniformGrid2DLayout
  • FirstRenderedItemIndexAfterEllipsis() : BreadcrumbLayout
  • FirstTab_CloseRequested() : TabViewPage
  • FirsttRealizedColumnIndexInRect() : UniformGrid2DLayout
  • FixConsolidatedView() : ScrollPresenterScrollSnapPointsPage
  • FixedSizeItem() : FixedSizeItem
  • FlatIndex() : TreeViewList
  • FlatItemsControlPage() : FlatItemsControlPage
  • FlatItemsControlPage_Loaded() : FlatItemsControlPage
  • FlatSample() : FlatSample
  • FlipExtendViewIntoTitleBar_Click() : NavigationViewTopNavOnlyPage
  • FlipIsTitleBarAutoPaddingEnabledButton_Click() : NavigationViewTopNavStorePage
  • FlipOrientation_Click() : NavigationViewAnimationPage , NavigationViewInitPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewItemTemplatePage , PaneFooterTestPage , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage , NavigationViewTopNavStorePage
  • FlipOrientationButton_Clicked() : NavigationViewInfoBadgeTestPage
  • FlipViewPage() : FlipViewPage
  • FlowAlgorithm() : FlowLayoutState , StackLayoutState , UniformGridLayoutState
  • FlowDirectionCheckbox_Checked() : NavigationViewPage
  • FlowDirectionCheckbox_Unchecked() : NavigationViewPage
  • FlowLayout() : FlowLayout
  • FlowLayoutAlgorithm() : FlowLayoutAlgorithm
  • FlowLayoutDemoPage() : FlowLayoutDemoPage
  • FlowLayoutProperties() : FlowLayoutProperties
  • Flyout() : SplitButtonProperties
  • FlyoutProperty() : SplitButtonProperties
  • FlyoutTemplateSettings() : CommandBarFlyoutCommandBarProperties
  • FlyoutTemplateSettingsProperty() : CommandBarFlyoutCommandBarProperties
  • FlyoutTreeViewItemClickTest() : TreeViewTests
  • FlyoutTreeViewItemTabTest() : TreeViewTests
  • FlyoutTreeViewSelectionChangedCrash() : TreeViewTests
  • Focus() : ISpotDiffuseEffect , ISpotSpecularEffect
  • Focus_BackAndForthTabTest() : WebView2Tests
  • Focus_BasicTabTest() : WebView2Tests
  • Focus_MouseActivateTest() : WebView2Tests
  • Focus_ReverseTabTest() : WebView2Tests
  • FocusAndReturnNextFocusableItem() : MenuBarItem
  • FocusAndSelectText() : TextCommandBarFlyoutTests
  • FocusComingFromAnotherRepeaterTest() : RadioButtonsTests
  • FocusCommand() : CommandBarFlyoutCommandBar
  • FocusControl() : CommandBarFlyoutCommandBar
  • FocusElementAt() : BreadcrumbBar
  • FocusNextDownItem() : NavigationView
  • FocusNextUpItem() : NavigationView
  • FocusSelectedItemButton_Clicked() : RadioButtonsPage
  • FollowFocus() : SingleSelector
  • Footer() : TitleBarProperties
  • FooterContentCheckBox_CheckedChanged() : TitleBarPageWindow
  • FooterMenuItems() : NavigationViewProperties
  • FooterMenuItemsProperty() : NavigationViewProperties
  • FooterMenuItemsSource() : NavigationViewProperties
  • FooterMenuItemsSourceProperty() : NavigationViewProperties
  • FooterProperty() : TitleBarProperties
  • ForceCollapse() : NavigationViewItem
  • ForceCreateAcrylicBrush() : AcrylicTestApi
  • ForcedAverageItemAspectRatioDbg() : LinedFlowLayout
  • ForcedAverageItemsPerLineDividerDbg() : LinedFlowLayout
  • ForcedWrapMultiplierDbg() : LinedFlowLayout
  • ForceIsPaneOpenToFalseOnLeftNavTest() : PaneBehaviorTests
  • ForceUpdateLastElement() : BreadcrumbBar
  • Foreground() : AnimatedChevronRightDownSmallVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedBackVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , IBlendEffect , AnimatedAcceptVisualSource , AnimatedFindVisualSource , AnimatedChevronDownSmallVisualSource , SwipeItemProperties , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , IBlendEffect , ProgressRingDeterminate , AnimatedBackVisualSource , ProgressRingIndeterminate , AnimatedAcceptVisualSource , ProgressRingDeterminate , SwipeItemProperties , AnimatedChevronUpDownSmallVisualSource , ProgressRingIndeterminate , AnimatedGlobalNavigationButtonVisualSource , AnimatedFindVisualSource
  • ForegroundInheritsFromParent() : AnimatedIconTests
  • ForegroundProperty() : SwipeItemProperties
  • ForegroundPropertyComboBox_SelectionChanged() : VisualPropertiesPage
  • foregroundVisualPropertyName() : SwipeControl
  • ForwardRefToBaseReferenceTracker() : NavigationViewItemSeparator , TextCommandBarFlyout , NavigationViewItemHeader , ToggleSplitButton , NavigationViewItem , SelectorBarItem
  • ForwardVectorChange() : SharedHelpers
  • FrameCount() : AnimatedSettingsVisualSource , AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedFindVisualSource
  • Framerate() : AnimatedSettingsVisualSource , AnimatedAcceptVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedBackVisualSource , AnimatedGlobalNavigationButtonVisualSource
  • FrameToProgress() : AnimatedChevronUpDownSmallVisualSource , LottieLogo , AnimatedBackVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , BrightnessSun , AnimatedChevronDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedAcceptVisualSource , AnimatedFindVisualSource
  • FrameworkElement_BringIntoViewRequested() : ScrollViewBringIntoViewPage , ScrollPresenterBringIntoViewPage
  • FromArgb() : ColorPickerTests::Color
  • FromOneKeyframeAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • FromOneKeyframeAnimationTest() : AnimatedVisualPlayerTests
  • FromProgress() : AnimatedVisualPlayer::final
  • FullName() : XamlTypeBase
  • Func() : Bridge
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- g -

  • GamepadCanEscapeAndDoesNotSelectWithFocus() : RadioButtonsTests
  • GamePadTest() : TabViewTests
  • GamepadTest() : RatingControlTests , NumberBoxTests
  • GatherScrollSnapPointsTestPageElements() : ScrollPresenterTestsWithInputHelper
  • GC_Click() : ScrollViewerAdapterPage
  • Generate() : VirtualizingStackLayout , FlowLayoutAlgorithm
  • GenerateControl() : SwipeItem
  • GenerateRenderTargetBitmapButton_Click() : RadialGradientBrushPage
  • GenerateTree() : BreadcrumbBarPage
  • GenerateTreeDynamic() : BreadcrumbBarPage
  • GenerateValue_ValueString() : RatingControlAutomationPeer
  • GenericInkCallback() : GenericInkCallback
  • Geometry() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • Geometry_0() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • Geometry_00() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_01() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_02() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_03() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_04() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • Geometry_05() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_06() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_07() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_08() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_09() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_1() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual
  • Geometry_10() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_11() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_12() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_13() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_14() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_15() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_16() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_17() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_18() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_19() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_2() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • Geometry_20() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_21() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_22() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_23() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_24() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_25() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_26() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_27() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_28() : LottieLogo::LottieLogo_AnimatedVisual
  • Geometry_3() : AnimatedSettingsVisualSource_AnimatedVisual
  • Geometry_4() : AnimatedSettingsVisualSource_AnimatedVisual
  • get() : IUnknownAccessor< T, Enable > , IUnknownAccessor< com_ptr< T > > , sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • Get() : InkCanvas::TargetData
  • get_HorizontallyScrollableImpl() : ScrollPresenterAutomationPeer
  • get_HorizontalScrollPercentImpl() : ScrollPresenterAutomationPeer
  • get_HorizontalViewSizeImpl() : ScrollPresenterAutomationPeer
  • get_ParentImpl() : TreeViewNode
  • get_VerticallyScrollableImpl() : ScrollPresenterAutomationPeer
  • get_VerticalScrollPercentImpl() : ScrollPresenterAutomationPeer
  • get_VerticalViewSizeImpl() : ScrollPresenterAutomationPeer
  • GetAccessibilitySettings() : WebView2
  • GetAcrylicBrushFallbackColor() : AcrylicBrushTests
  • GetAcrylicBrushNames() : AcrylicBrushTests
  • GetActionButtonContentComboBox() : TeachingTipTestPageElements
  • GetActiveVisualState_Click() : NavigationViewTopNavOnlyPage , NavigationViewTopNavStorePage
  • GetActualWidthsButton_Click() : TabViewTabClosingBehaviorPage
  • GetAdjacentFocusableElementByDirection() : ItemsView
  • GetAdjacentFocusableElementByIndex() : ItemsView
  • GetAlignSelf() : Flex
  • GetAllElementsFromPool() : ItemTemplateTests
  • GetAncestor() : RevealBrush
  • GetAncestorOfType() : SharedHelpers
  • GetAncestorView() : TreeViewItem
  • GetAnchorCandidates() : ScrollingAnchorRequestedEventArgs
  • GetAnchorElement() : ItemsRepeaterScrollHost , ScrollingAnchorRequestedEventArgs
  • GetAnchorForRealizationRect() : FlowLayoutDerived , FlowLayout , StackLayout
  • GetAnchorForTargetElement() : FlowLayoutDerived , FlowLayout
  • GetAnchorIndex() : FlowLayoutAlgorithm
  • GetAndVerifyTheContainer() : NavigationViewTopNavOnlyPage
  • GetAnimatedIcon() : AnimatedIconHost , ToggleAnimatedIconHost
  • GetAnimatedPropertyName() : AnimationHandler
  • getAnimatedPropertyName() : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • GetAnimation() : ScrollingScrollAnimationStartingEventArgs , ScrollingZoomAnimationStartingEventArgs
  • GetAnimationTarget() : SwipeControl
  • GetAppropriateGlyph() : RatingControl
  • GetAppropriateImageSource() : RatingControl
  • GetAppWindowCoordinateConverter() : TabView
  • GetAppWindowId() : TabView
  • GetAreCheckStatesEnabled() : RadioMenuFlyoutItemProperties
  • GetArrangeRenderSizesDelta() : ScrollPresenterTests , ScrollPresenter , ScrollPresenterTestHooks
  • GetArrangeRenderSizesDeltaDbg() : ScrollPresenter
  • GetArrangeWidth() : LinedFlowLayout
  • GetArrangeWidthFromItemsInfo() : LinedFlowLayout
  • GetAsFlowState() : FlowLayout
  • GetAsGridState() : UniformGridLayout
  • GetAspectRatios() : ItemsViewPictureLibraryPage
  • GetAsRevealBorderLight() : RevealTestApi
  • GetAsRevealHoverLight() : RevealTestApi
  • GetAssetMap() : sealed< T, fallback, RawStorageT >
  • GetAssociatedNode() : TreeView , ViewModel
  • GetAssociatedNodeImpl() : TreeView
  • GetAsStackState() : StackLayout
  • GetAt() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider , CustomItemsSource , final , IndexPath , ItemsSourceView , LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock , SelectedItems< T > , final , DelegatingItemsSource , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems , ViewModel
  • GetAtCallInfo() : MockItemsSource::GetAtCallInfo
  • GetAtCore() : CustomItemsSource , CustomItemsSourceView , MockItemsSource , InspectingDataSource , ItemsSourceView , CollectionChangeDemo::MyDataSource , DelegatingItemsSource , PersonDataSource , ScrollPresenterTests::TestDataSource , ScrollPresenterBringIntoViewPage::SampleDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • GetAutoHideScrollControllers() : ScrollViewTestHooks
  • GetAutomationControlTypeCore() : AnimatedVisualPlayerAutomationPeer , BreadcrumbBarItemAutomationPeer , ColorSpectrumAutomationPeer , ExpanderAutomationPeer , TestControlAutomationPeer , InfoBarAutomationPeer , InkCanvasAutomationPeer , ItemContainerAutomationPeer , ItemsViewAutomationPeer , MenuBarAutomationPeer , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , NumberBoxAutomationPeer , PagerControlAutomationPeer , PersonPictureAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RadioButtonsAutomationPeer , RatingControlAutomationPeer , RepeaterAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , ScrollPresenterAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , TabViewAutomationPeer , TabViewItemAutomationPeer , TeachingTipAutomationPeer , TitleBarAutomationPeer , TreeViewItemAutomationPeer , TreeViewListAutomationPeer , WebView2AutomationPeer
  • GetAutomationName() : TreeViewList
  • GetAutomationNameComboBox() : TeachingTipTestPageElements
  • GetAverageAspectRatio() : LinedFlowLayout , LinedFlowLayoutItemAspectRatios
  • GetAverageAspectRatioFromStorage() : LinedFlowLayout
  • GetAverageElementSize() : StackLayout
  • GetAverageItemsPerLine() : LinedFlowLayout
  • GetAverageLineInfo() : FlowLayout
  • GetBackgroundSpotlightProxy() : RevealTestApi
  • GetBase() : ReferenceTracker< D, ImplT, I >
  • GetBitmapImage() : FlatItemsControlPage , ListViewBasePage
  • GetBorderWidthTextBox() : RadioButtonsTestPageElements
  • GetBoundingRectangle() : ColorSpectrum
  • GetBoundingRectangleCore() : ColorSpectrumAutomationPeer
  • GetBreadcrumbBarItemsHeight() : BreadcrumbLayout
  • GetBreadCrumbPath() : TreeNode
  • GetBringTargetIntoViewButton() : TeachingTipTestPageElements
  • GetBrowserExecutableFolderKey() : WebView2Tests
  • GetBrushColor() : CalendarViewPage
  • GetBrushColor_Click() : CalendarViewPage
  • GetBrushColorString() : CalendarViewPage
  • GetBrushFromIndex() : CalendarViewPage
  • GetBrushName() : LightConfigurationTests , AcrylicColorPage , RevealColorPage
  • GetBtnClearTeachingTipEvents() : TeachingTipTestPageElements
  • GetButton() : TextCommandBarFlyout
  • GetButtonIsHiddenOnEdgeFunction() : PipsPagerTestBase
  • GetButtonsToAdd() : TextCommandBarFlyout
  • GetCachedBoundsForDataIndex() : VirtualizingStackLayout
  • GetCachedBoundsForRealizationIndex() : VirtualizingStackLayout
  • GetCalendarItemBorderThickness_Click() : CalendarViewPage
  • GetCalendarSize_Click() : CalendarViewPage
  • GetCancel() : ScrollingBringingIntoViewEventArgs
  • getCancelClosesInTeachingTip() : TeachingTipPage
  • GetCaptionText() : ItemsViewSummaryPage
  • GetCenterPoint() : LinedFlowLayoutItemCollectionTransitionProvider
  • GetCharacterType() : InitialsGenerator
  • GetCheckBoxStates() : TreeViewPage
  • GetCheckerColor() : ColorPicker
  • GetCheckIfButtonsHiddenButton() : PagerControlTestPageElements
  • GetCheckIfButtonsHiddenLabel() : PagerControlTestPageElements
  • GetChild() : CompactPage
  • GetChildNavViewItemContentPresenterMarginButton_Click() : NavigationViewPage
  • GetChildren() : NavigationView
  • GetChildrenCore() : ExpanderAutomationPeer , RepeaterAutomationPeer
  • GetChildrenForItemInIndexPath() : NavigationView
  • GetChildrenInTabFocusOrder() : ItemsRepeater
  • GetChildrenOrder_Click() : TreeViewPage
  • GetChildRepeaterForIndexPath() : NavigationView
  • GetChildScrollPresenterOrScrollViewer() : ScrollInputHelper
  • GetCircleRadius() : CircleLayout
  • GetClassNameCore() : AnimatedVisualPlayerAutomationPeer , BreadcrumbBarItemAutomationPeer , ColorSpectrumAutomationPeer , DropDownButtonAutomationPeer , ExpanderAutomationPeer , InfoBarAutomationPeer , InkCanvasAutomationPeer , ItemContainerAutomationPeer , ItemsViewAutomationPeer , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , NumberBoxAutomationPeer , PagerControlAutomationPeer , PersonPictureAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RadioButtonsAutomationPeer , SelectorBarItemAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , TabViewAutomationPeer , TabViewItemAutomationPeer , TeachingTipAutomationPeer , TitleBarAutomationPeer , TreeViewItemAutomationPeer , WebView2AutomationPeer
  • GetClearRadioButtonsEventsButton() : RadioButtonsTestPageElements
  • GetClickablePointCore() : ColorSpectrumAutomationPeer
  • GetCloseButton() : TabViewItem , TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetCloseButtonContentComboBox() : TeachingTipTestPageElements
  • GetCloseButtonResourceName() : InfoBar
  • GetCollapsedWaiter() : DropDownButton , Expander
  • GetColorByName() : AcrylicBrushTests
  • GetColorChangedWaiter() : ColorSpectrum , ColorPickerSlider
  • GetColorSpaceValueNames() : RadialGradientBrushPage
  • GetColumns() : ColumnMajorUniformToLargestGridLayout , RadioButtons , RadioButtonsTestHooks
  • GetComboBoxIsEnabledCheckBox() : PagerControlTestPageElements
  • GetComboBoxVisibilityCheckBox() : PagerControlTestPageElements
  • GetComponentHwnd() : WebView2
  • GetComputedAnimationMode() : ScrollPresenter
  • GetComputedMaxHeight() : ScrollPresenter
  • GetComputedMaxWidth() : ScrollPresenter
  • GetComputedScrollMode() : ScrollPresenter
  • GetConsolidatedHorizontalScrollSnapPoints() : ScrollPresenterTestHooks
  • GetConsolidatedHorizontalScrollSnapPointsDbg() : ScrollPresenter
  • GetConsolidatedScrollSnapPointsDbg() : ScrollPresenter
  • GetConsolidatedVerticalScrollSnapPoints() : ScrollPresenterTestHooks
  • GetConsolidatedVerticalScrollSnapPointsDbg() : ScrollPresenter
  • GetConsolidatedZoomSnapPoints() : ScrollPresenterTestHooks
  • GetConsolidatedZoomSnapPointsDbg() : ScrollPresenter
  • GetContainerCountInRepeater() : NavigationView
  • GetContainerForData() : NavigationView
  • GetContainerForIndex() : NavigationView
  • GetContainerForIndexPath() : NavigationView
  • GetContainerForItemOverride() : TabViewListView , SpecialTreeViewList , TreeViewList
  • GetContainerType() : RecipeElementFactory
  • GetContentAlignedCrossOffset() : Flex
  • GetContentAsString() : TreeViewNode
  • GetContentBox() : NavigationViewCompactPaneLengthTestPage
  • GetContentJustifiedMainOffset() : Flex
  • GetContentLayoutOffsetX() : ScrollPresenterTestHooks
  • GetContentLayoutOffsetXDbg() : ScrollPresenter
  • GetContentLayoutOffsetY() : ScrollPresenterTestHooks
  • GetContentLayoutOffsetYDbg() : ScrollPresenter
  • GetContentSize() : ScrollInputHelper
  • GetControlRect() : TwoPaneView
  • GetControlType() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • GetCoreWebView2() : MapControl
  • GetCornerFocusableItem() : ItemsView
  • GetCornerRadiusFromString() : ItemsViewSummaryPage , LinedFlowLayoutDemo , SelectorBarSummaryPage
  • GetCount() : InspectingDataSourceTests
  • GetCurrentAPIVersion() : PlatformConfiguration
  • GetCurrentElementIndex() : ItemsView
  • GetCurrentHexValue() : ColorPicker
  • GetCurrentHsv() : ColorPicker
  • GetCurrentItemIndex() : ItemsViewTestsWithInputHelper
  • GetCurrentItems() : SwipeControl
  • GetCurrentItemText() : BreadcrumbTests
  • GetCurrentlySelectedChannels() : ColorPickerTests
  • GetCurrentMaxVisualIndicatorsTextBlock() : PipsPagerElements
  • GetCurrentNumberOfPagesTextBlock() : PipsPagerElements
  • GetCurrentOrientation() : PipsPagerTestBase , PipsPagerPage
  • GetCurrentOrientationTextBlock() : PipsPagerElements
  • GetCurrentPage() : PagerControlTestBase , PipsPagerTestBase
  • GetCurrentPageAsInt() : PagerControlTestBase
  • GetCurrentPageAsInt32() : PipsPagerTestBase
  • GetCurrentPageIdentifierLeftMarginTextBlock() : PagerControlTestPageElements
  • GetCurrentPageTextBlock() : PagerControlTestPageElements , PipsPagerElements
  • GetCurrentTheme() : RevealHoverLight
  • GetCustomCheckedCheckBox() : RadioButtonsTestPageElements
  • GetCustomContentTextBox() : RadioButtonsTestPageElements
  • GetCustomDisabledCheckBox() : RadioButtonsTestPageElements
  • GetCustomIndexTextBox() : RadioButtonsTestPageElements
  • GetCustomProperty() : SelectionModel , TreeViewNode
  • GetDarkThemeIdStatic() : RevealBorderLight
  • GetData() : SelectionModelTests , TreeViewSample
  • GetDataAtIndex() : RadioButtons
  • GetDataIndexFromRealizedRangeIndex() : final
  • GetDataSourceItemFromIndex() : GroupedListViewBasePage
  • GetDataTemplate() : FlowLayoutTests , LayoutTests
  • GetDataTemplateComponent() : CachedVisualTreeHelpers
  • GetDayItemFontSize_Click() : CalendarViewPage
  • GetDefaultLayout() : ItemsRepeater
  • GetDefaultValue() : ValueHelper< T, Enable > , ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > , ValueHelper< winrt::hstring, void >
  • GetDeferral() : RefreshRequestedEventArgs , TeachingTipClosingEventArgs
  • GetDescendantBounds() : ScrollPresenter
  • GetDesiredAspectRatioFromItemsInfo() : LinedFlowLayout
  • GetDesiredPipSize() : PipsPager
  • GetDesiredSizeForAvailableSize() : LinedFlowLayout
  • GetDisplayModeComboBox() : PagerControlTestPageElements
  • GetDistanceToKeyboardNavigationReferenceOffset() : ItemsView
  • GetDocumentTitle() : WebView2BasicPage
  • GetDoubleValue() : CornerRadiusFilterConverter
  • GetDraggedItemsNames() : TreeViewPage
  • GetDropDownItemByName() : BreadcrumbTests
  • GetDropTargetDropEffect() : TreeViewList
  • GetEaseInFunction() : LinedFlowLayoutItemCollectionTransitionProvider
  • GetEaseOutFunction() : LinedFlowLayoutItemCollectionTransitionProvider
  • GetEdgeTeachingTipOffset_Clicked() : TeachingTipPage
  • GetEffectiveForegroundOfTeachingTipButtonTextBlock() : TeachingTipTestPageElements
  • GetEffectiveForegroundOfTeachingTipContentTextBlock() : TeachingTipTestPageElements
  • GetEffectiveHeroContentPlacement() : TeachingTip , TeachingTipTestHooks
  • GetEffectiveHorizontalAlignment() : ScrollInputHelper
  • GetEffectiveIsAnimationEnabled() : ScrollPresenterTests
  • GetEffectiveLayout() : ItemsRepeater
  • GetEffectiveLuminosityColor() : AcrylicBrush
  • GetEffectivePlacement() : TeachingTipTests , TeachingTip , TeachingTipTestHooks
  • GetEffectivePlacementTextBlock() : TeachingTipTestPageElements
  • GetEffectiveScreenBoundsInCoreWindowSpace() : TeachingTip
  • GetEffectiveTintColor() : AcrylicBrush
  • GetEffectiveVerticalAlignment() : ScrollInputHelper
  • GetEffectiveWindowBoundsInCoreWindowSpace() : TeachingTip
  • GetEffectiveZoomMode() : ScrollInputHelper
  • GetElement() : ElementFactory , ItemTemplateWrapper , RepeaterAutomationPeer , final
  • GetElement< T >() : MenuBarTests , PagerControlTestPageElements , PipsPagerElements , RadioButtonsFocusTestPageElements , RadioButtonsTestPageElements , TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetElementAt() : BreadcrumbLayout
  • GetElementCallInfo() : MockElementFactory::GetElementCallInfo
  • GetElementCore() : BreadcrumbElementFactory , NavigationViewItemsFactory , RadioButtonsElementFactory , DataAsElementElementFactory , ElementFromElementElementFactory , MockElementFactory , RecyclingElementFactoryDerived , PhasingTests::CustomElementFactory , ElementFactory , RecyclingElementFactory , AnimationsDemoPage::AnimationElementFactory , RecipeElementFactory , PersonElementFactory
  • GetElementDataIndex() : final
  • GetElementFactory() : FlowLayoutCollectionChangeTests
  • GetElementFactoryElementIndex() : RepeaterTestHooks
  • GetElementForHoverLight() : RevealRegressionTestsPage , RevealStatesPage
  • GetElementFromElementFactory() : final
  • GetElementFromIndexImpl() : ItemsRepeater
  • GetElementFromPinnedElements() : final
  • GetElementFromUniqueIdResetPool() : final
  • GetElementIfAlreadyHeldByLayout() : final
  • GetElementIfRealized() : FlowLayoutAlgorithm
  • GetElementImpl() : ItemsRepeater
  • GetElementIndex() : ItemsView , ItemsRepeater , UniformGrid2DLayout , final
  • GetElementIndexCore() : LayoutContextAdapter
  • GetElementIndexImpl() : ItemsRepeater
  • GetElementIndexPath() : ItemsView
  • GetElementItem() : ItemsView
  • GetElementRect() : ItemsView
  • GetElementWithinPager< T >() : PagerControlTestPageElements , PipsPagerElements
  • GetEmptyOrFurthestBlock() : LinedFlowLayoutItemAspectRatios
  • GetEnterInfinityModeButton() : PagerControlTestPageElements
  • GetEnumerator() : CustomItemsSourceView , ReadOnlyNotifyPropertyChangedCollection-g< T > , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , InspectingDataSourceTests::CustomEnumerable , MyCollection
  • GetExpandedDescendantCount() : ViewModel
  • GetExpandedWaiter() : DropDownButton , Expander
  • GetExpanderToggleButtonPeer() : ExpanderAutomationPeer
  • GetExpressionAnimationStatusChanges() : ScrollPresenterTestHooksHelper
  • GetExtent() : FlowLayoutDerived , FlowLayout , StackLayout
  • GetExtentSize() : PinterestLayout
  • GetExternalTrackerHandleManager() : IVectorOwner< EventSource, T >
  • GetFallBackColorName() : AcrylicBrushTests
  • GetFileContents() : sealed< T, fallback, RawStorageT >
  • GetFindNextElementOptions() : BreadcrumbBar , RadioButtons
  • GetFirstAndLastDisplayedLineIndexes() : LinedFlowLayout
  • GetFirstBreadcrumbBarItemToArrange() : BreadcrumbLayout
  • GetFirstFullCharacter() : InitialsGenerator
  • GetFirstFullyRealizedLineIndex() : LinedFlowLayout
  • GetFirstItemIndexInLineIndex() : LinedFlowLayout
  • GetFirstItemWidthButton_Click() : TabViewTabClosingBehaviorPage
  • GetFirstOfMonthLabelFontSize_Click() : CalendarViewPage
  • GetFirstOfYearDecadeLabelFontSize_Click() : CalendarViewPage
  • GetFirstPageButton() : PagerControlTestPageElements
  • GetFirstPageButtonIsEnabledCheckBox() : PagerControlTestPageElements
  • GetFirstPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetFirstPageButtonVisibilityComboBox() : PagerControlTestPageElements
  • GetFirstRealizedDataIndex() : final
  • GetFirstRealizedDataIndexInViewport() : VirtualizingStackLayout
  • GetFirstRepeatedSnapPoint() : ScrollPresenterScrollSnapPointsPage
  • GetFirstTabLocationButton_Click() : TabViewPage
  • GetFirstTabStopControl() : CommandBarFlyoutCommandBar
  • GetFlexBasis() : Flex
  • GetFlexGrow() : Flex
  • GetFlexShrink() : Flex
  • GetFlowAlgorithm() : StackLayout , UniformGridLayout , FlowLayout
  • GetFlowDirectionAdjustedPlacement() : TeachingTip
  • GetFlowLayout() : RepeaterTestUIPage
  • GetFlyoutTreeViewItemCount_Click() : TreeViewPage
  • GetFocusedIndex() : RadioButtonsTests
  • GetFocusedIndexTextBlock() : RadioButtonsTestPageElements
  • GetFocusedIndexTextBlock1() : RadioButtonsFocusTestPageElements
  • GetFocusedIndexTextBlock2() : RadioButtonsFocusTestPageElements
  • GetFocusedItem() : RadioButtonsTests
  • GetFocusedItemTextBlock() : RadioButtonsTestPageElements
  • GetFocusedPage() : PipsPagerTestBase
  • GetFocusedPageAsInt32() : PipsPagerTestBase
  • GetFocusedPageIndexTextBlock() : PipsPagerElements
  • GetFocusSelectedItemButton() : RadioButtonsTestPageElements
  • GetForcedIndexBasedLayoutOrientation() : Layout
  • GetForeground() : SelectorBarSummaryPage
  • GetFrozenLineIndexFromFrozenItemIndex() : LinedFlowLayout
  • GetFullLog() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , ScrollViewsWithSimpleContentsPage , SelectorBarSummaryPage
  • GetGlobalTestHooks() : AnimatedIconTestHooks , ItemsViewTestHooks , RadioButtonsTestHooks , LayoutsTestHooks , RepeaterTestHooks , ScrollPresenterTestHooks , ScrollViewTestHooks , SwipeTestHooks , TeachingTipTestHooks , MUXControlsTestHooks
  • GetGridLayout() : RepeaterTestUIPage
  • GetGroupedPeople() : PersonPicturePage
  • GetGroupIndex() : GroupedRepeaterItem
  • GetHasCompatibleRuntimeInstalled() : WebView2Tests
  • GetHeaderContentMargin_Click() : NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • GetHelpTextCore() : ColorSpectrumAutomationPeer
  • GetHeroContentComboBox() : TeachingTipTestPageElements
  • GetHiddenElementsList() : BreadcrumbBar
  • GetHomeItemRevealVisualState_Click() : NavigationViewPage
  • GetHorizontalMaxOffset() : CanvasScrollControllerConsumer
  • GetHorizontalOffset() : CanvasScrollControllerConsumer , TeachingTip , TeachingTipTestHooks
  • GetHorizontalOrientationMargin() : InfoBarPanelProperties
  • GetHorizontalOrientationPipsPagerButtonHeightTextBlock() : PipsPagerElements
  • GetHorizontalOrientationPipsPagerButtonWidthTextBlock() : PipsPagerElements
  • GetHorizontalSnapPointActualApplicableZone() : ScrollPresenterTestHooks
  • GetHorizontalSnapPointCombinationCount() : ScrollPresenterTestHooks
  • GetHorizontalSnapPointWrapperDbg() : ScrollPresenter
  • GetHorizontalViewportLength() : CanvasScrollControllerConsumer
  • GetHostHwnd() : WebView2
  • GetHoverLightOffsetExpression() : RevealTestApi
  • GetHsvColorFromTextBoxes() : ColorPicker
  • GetIconColumnWidth_Click() : PaneFooterTestPage
  • GetIconComboBox() : TeachingTipTestPageElements
  • GetIconElementFromString() : SelectorBarSummaryPage
  • GetIconElementPropertyCore() : AnimatedIconSource , ImageIconSource
  • GetIconSeverityLevelResourceName() : InfoBar
  • GetId() : RevealBorderLight , RevealHoverLight , XamlAmbientLight
  • GetImageAsItemsSourceItem() : ItemsViewSummaryPage
  • GetImageSource() : PersonPicture
  • GetImageSurface() : sealed< T, fallback, RawStorageT >
  • GetImmediateChildOfRepeater() : ViewportManagerWithPlatformFeatures
  • GetImpl() : BreadcrumbBarItemAutomationPeer , DropDownButtonAutomationPeer , ExpanderAutomationPeer , ItemContainerAutomationPeer , ItemsViewAutomationPeer , NumberBoxAutomationPeer , PagerControlAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , SplitButtonAutomationPeer , ToggleSplitButtonAutomationPeer , WebView2AutomationPeer
  • GetIncreaseNumberOfPagesButton() : PagerControlTestPageElements
  • GetIndexedProperty() : SelectionModel , TreeViewNode
  • GetIndexedValue() : CustomProperty
  • GetIndexFromItem() : NavigationView
  • GetIndexOfLowestColumn() : PinterestLayout
  • GetIndexPath() : TreeViewItem
  • GetIndexPathForContainer() : NavigationView
  • GetIndexPathOfItem() : NavigationView
  • GetIndexPathsInSource() : SelectionModelTests
  • getIndexToSelect() : RadioButtonsFocusPage , RadioButtonsPage
  • GetIndexToSelectTextBlock() : RadioButtonsTestPageElements
  • GetIndexToSelectTextBox1() : RadioButtonsFocusTestPageElements
  • GetIndexToSelectTextBox2() : RadioButtonsFocusTestPageElements
  • GetInertiaRestingValue() : ScrollPresenter
  • GetInfoBar() : InfoBarAutomationPeer
  • GetInitials() : PersonPicture
  • GetInner() : ReferenceTracker< D, ImplT, I >
  • GetInputNonClientPointerSource() : TabView
  • GetInsertDisplayRadioButtonButton() : RadioButtonsTestPageElements
  • GetInstalledBrowserVersion() : WebView2Tests
  • GetInt() : TwoPaneViewTests
  • GetInteractionSources() : ScrollPresenterTestHooksHelper
  • GetInteractionTrackerOperationFromKinds() : ScrollPresenter
  • GetInteractionTrackerOperationFromRequestId() : ScrollPresenter
  • GetInteractionTrackerOperationsCount() : ScrollPresenter
  • GetInteractionTrackerOperationsTicksCountdown() : ScrollPresenter
  • GetInteractionTrackerOperationWithAdditionalVelocity() : ScrollPresenter
  • GetIntFromSymbol() : SelectorBarSummaryPage
  • GetInvokedWaiter() : BreadcrumbBarItem
  • GetIsIdle() : SwipeControl , SwipeTestHooks , TeachingTip , TeachingTipTestHooks
  • GetIsIdleCheckBox() : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetIsInertiaFromImpulseExpression() : SnapPointBase
  • GetIsLightDismissEnabledButton() : TeachingTipTestPageElements
  • GetIsLightDismissEnabledCheckBox() : TeachingTipFocusTestPageElements
  • GetIsLightDismissEnabledComboBox() : TeachingTipTestPageElements
  • GetIsOpen() : SwipeControl , SwipeTestHooks
  • GetIsOpenCheckBox() : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetIsPlayingAsync() : AnimatedVisualPlayerPage
  • GetIsPressLight() : RevealHoverLight
  • GetIsRTL() : ColorPickerTests
  • GetIsTarget() : XamlAmbientLightProperties
  • GetItemAt() : VirtualizingLayoutContext
  • GetItemAtCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • GetItemCommonStates_Click() : TreeViewPage
  • GetItemContainerAsItemsSourceItem() : ItemsViewSummaryPage
  • GetItemCount() : BreadcrumbLayout , TabView
  • GetItemCount_Click() : TreeViewPage
  • GetItemDrawbackImprovement() : LinedFlowLayout
  • GetItemFromIndex() : NavigationView
  • GetItemIndexFromLastDetailLabelRequest() : ItemsViewIntegrationPage
  • GetItemInternal() : ItemsView
  • GetItemLineIndex() : LinedFlowLayout
  • GetItems() : RevealGridItem , RevealBackgroundItem , RevealGridTypeItem , SelectionModeItem
  • GetItemsAlignedCrossOffset() : Flex
  • GetItemsCollection() : RadioButtonsPage
  • GetItemsInfoRequestedRange() : LinedFlowLayout
  • GetItemsLayout() : LinedFlowLayout
  • GetItemsPerLine() : UniformGridLayout
  • GetItemsRangeArrangeWidth() : LinedFlowLayout
  • GetItemsRepeaterElement() : ItemsViewSummaryPage
  • GetItemsRepeaterElementIndex() : ItemsViewSummaryPage
  • GetItemsRepeaterMethodElement() : ItemsViewSummaryPage
  • GetItemsRepeaterPart() : ItemsView , ItemsViewTestHooks
  • GetItemsRepeaterPropertyElement() : ItemsViewSummaryPage
  • GetItemsSource() : RadioButtons
  • GetItemsSourceOrder() : TreeViewPage
  • GetItemsStackPanel() : ListViewAnchoringPage
  • GetItemsViewPart() : SelectorBar , SelectorBarTestHooks
  • GetItemsWrapGrid() : ListViewAnchoringPage
  • GetItemTypeComboBox() : RadioButtonsTestPageElements
  • GetItemWidthMultiplierThreshold() : LinedFlowLayout
  • GetKeepInteriorCornersSquare() : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • GetKeyboardNavigationReferenceOffset() : ItemsView , ItemsViewTestHooks
  • GetKnownAspectRatioFromImageName() : Recipe
  • GetKnownAspectRatioFromIndex() : Recipe
  • GetKnownAspectRatioFromLocalPath() : Recipe
  • GetLabelVerticalOffset() : AnnotatedScrollBar
  • GetLargerColumns() : ColumnMajorUniformToLargestGridLayout , RadioButtons , RadioButtonsTestHooks
  • GetLastAnimationSegment() : AnimatedIcon , AnimatedIconTestHooks
  • GetLastAnimationSegmentEnd() : AnimatedIcon , AnimatedIconTestHooks
  • GetLastAnimationSegmentStart() : AnimatedIcon , AnimatedIconTestHooks
  • GetLastClickedItem() : BreadcrumbTests
  • GetLastClickedItemIndex() : BreadcrumbTests
  • GetLastInteractedWithSwipeControl() : SwipeControl , SwipeTestHooks
  • GetLastItemIndexInLineIndex() : LinedFlowLayout
  • GetLastNonAnimatedInteractionTrackerOperation() : ScrollPresenter
  • GetLastPage() : PagerControlTestBase
  • GetLastPageAsInt() : PagerControlTestBase
  • GetLastPageButton() : PagerControlTestPageElements
  • GetLastPageButtonIsEnabledCheckBox() : PagerControlTestPageElements
  • GetLastPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetLastPageButtonVisibilityComboBox() : PagerControlTestPageElements
  • GetLayout() : RadioButtons
  • GetLayoutBoundsForDataIndex() : final
  • GetLayoutBoundsForRealizedIndex() : final
  • GetLayoutContext() : ItemsRepeater
  • GetLayoutData() : RadioButtonsTests
  • GetLayoutExtent() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutFirstRealizedItemIndex() : LayoutsTestHooks
  • GetLayoutForcedIndexBasedLayoutOrientation() : LayoutsTestHooks
  • GetLayoutHeightsButton_Click() : PaneLayoutTestPage
  • GetLayoutId() : RepeaterTestHooks , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutIndexBasedLayoutOrientation() : ItemsView
  • GetLayoutLastRealizedItemIndex() : LayoutsTestHooks
  • GetLayoutNumberOfColumnsTextBlock() : RadioButtonsTestPageElements
  • GetLayoutNumberOfLargerColumnsTextBlock() : RadioButtonsTestPageElements
  • GetLayoutNumberOfRowsTextBlock() : RadioButtonsTestPageElements
  • GetLayoutPanelElement() : LinedFlowLayoutDemo
  • GetLayoutRealizationWindow() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutRectForDataIndex() : UniformGridLayout
  • GetLayoutSlot() : CachedVisualTreeHelpers
  • GetLayoutVisibleWindow() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetLayoutVisibleWindowDiscardAnchor() : ViewportManagerWithPlatformFeatures
  • GetLeafIndex() : TreeViewSample
  • GetLevelCore() : NavigationViewItemAutomationPeer , TreeViewItemAutomationPeer
  • GetLight() : RevealBorderLight , RevealHoverLight
  • GetLightIdStatic() : RevealHoverLight , XamlAmbientLight
  • GetLightThemeIdStatic() : RevealBorderLight
  • GetLineCount() : LinedFlowLayout
  • GetLinedFlowLayoutAverageItemAspectRatio() : LayoutsTestHooks
  • GetLinedFlowLayoutFirstFrozenItemIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutForcedAverageItemAspectRatio() : LayoutsTestHooks
  • GetLinedFlowLayoutForcedAverageItemsPerLineDivider() : LayoutsTestHooks
  • GetLinedFlowLayoutForcedWrapMultiplier() : LayoutsTestHooks
  • GetLinedFlowLayoutIsFastPathSupported() : LayoutsTestHooks
  • GetLinedFlowLayoutLastFrozenItemIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutLineIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutLogItemIndex() : LayoutsTestHooks
  • GetLinedFlowLayoutMethodElement() : ItemsViewSummaryPage
  • GetLinedFlowLayoutRawAverageItemsPerLine() : LayoutsTestHooks
  • GetLinedFlowLayoutSnappedAverageItemsPerLine() : LayoutsTestHooks
  • GetLineIndex() : LinedFlowLayout
  • GetLineIndexDbg() : LinedFlowLayout
  • GetLineIndexFromAverageItemsPerLine() : LinedFlowLayout
  • GetLinesDesiredWidth() : LinedFlowLayout
  • GetLocalizedControlTypeCore() : BreadcrumbBarItemAutomationPeer , ColorSpectrumAutomationPeer , TestControlAutomationPeer , ItemContainerAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , SelectorBarItemAutomationPeer
  • GetLocalizedPluralBadgeItemStringResource() : PersonPicture
  • GetLocalizedStringResource() : sealed< T, fallback, RawStorageT >
  • GetLocalizedText() : ColorPickerTests
  • GetLoggingLevelForInstance() : MUXControlsTestHooks
  • GetLoggingLevelForType() : MUXControlsTestHooks
  • GetLogItemIndex() : ItemsRepeater , RepeaterTestHooks
  • GetLstTeachingTipEvents() : TeachingTipTestPageElements
  • GetMajorSizeWithSpacing() : UniformGridLayout
  • GetMany() : VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator , ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator , BreadcrumbIterator , HashMap< K, V >::Iterator , VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , ObservableVector< T >::Iterator , VectorIterator< T, isBindable, isDependencyObjectBase, Traits > , SelectedItems< T > , SelectedItems< T >::Iterator , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems , ViewModel
  • GetMapHtmlContent() : MapControl
  • GetMaterialHelperInstance() : LifetimeHandler
  • GetMaxColumnsTextBlock() : RadioButtonsTestPageElements
  • GetMaxOverpanOffset() : ScrollInputHelper
  • GetMaxPosition() : ScrollPresenterTestHooks
  • GetMaxPositionDbg() : ScrollPresenter
  • GetMaxPositionExpression() : ScrollPresenter
  • GetMaxPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • GetMaxPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • GetMaxPositionXExpression() : ScrollPresenter
  • GetMaxPositionYExpression() : ScrollPresenter
  • GetMaxUnderpanOffset() : ScrollInputHelper
  • GetMaxVisualIndicatorsComboBox() : PipsPagerElements
  • GetMaxWidthFromItemsInfo() : LinedFlowLayout
  • GetMeasureSize() : FlowLayoutDerived , FlowLayout
  • GetMember() : XamlTypeBase
  • GetMenuButton() : InkToolBar
  • GetMenuItem1ChildrenFlyoutCornerRadiusButton_Click() : HierarchicalNavigationViewMarkup
  • GetMinorSizeWithSpacing() : UniformGridLayout
  • GetMinPosition() : ScrollPresenterTestHooks
  • GetMinPositionDbg() : ScrollPresenter
  • GetMinPositionExpression() : ScrollPresenter
  • GetMinPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • GetMinPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • GetMinPositionXExpression() : ScrollPresenter
  • GetMinPositionYExpression() : ScrollPresenter
  • GetMinWidthFromItemsInfo() : LinedFlowLayout
  • GetMonitoringLayout() : EffectiveViewportTests , EffectiveViewportScrollPresenterTests , ViewportTests
  • GetMonthNameFromIndex() : ItemsViewIntegrationPage
  • GetMonthYearItemFontSize_Click() : CalendarViewPage
  • GetMultiSelectCheckBoxStates_Click() : TreeViewPage
  • GetMutationCount() : HashMap< K, V >
  • GetNameCore() : RadioButtonsAutomationPeer , PagerControlAutomationPeer , ColorSpectrumAutomationPeer , ExpanderAutomationPeer , ItemContainerAutomationPeer , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , NumberBoxAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , TabViewItemAutomationPeer , TitleBarAutomationPeer , TreeViewItemAutomationPeer
  • GetNamedPropertyMapping() : EffectBase
  • GetNamedPropertyMappingImpl() : EffectBase
  • GetNavigationDirection() : FocusHelper
  • GetNavigationView() : NavigationViewItemBase
  • GetNavigationViewItem() : NavigationViewItemPresenter
  • GetNavigationViewItemCountInPrimaryList() : NavigationView , NavigationViewItemAutomationPeer , TopNavigationViewDataProvider
  • GetNavigationViewItemCountInTopNav() : NavigationView , NavigationViewItemAutomationPeer , TopNavigationViewDataProvider
  • GetNavigationViewItemsFactory() : NavigationView
  • GetNavigationViewRepeaterPosition() : NavigationViewItemAutomationPeer
  • GetNavItemActiveNavItemVisualState_Click() : NavigationViewTopNavStorePage
  • GetNavViewActiveVisualStates_Click() : NavigationViewPageDataContext , NavigationViewMinimalPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage
  • GetNewColor() : ScrollPresenterScrollSnapPointsPage
  • GetNextFocusCandidate() : ScrollView
  • GetNextGlyphIfNull() : RatingControl
  • GetNextImageIfNull() : RatingControl
  • GetNextIndexInFlatTree() : ViewModel
  • GetNextLockedItem() : LinedFlowLayout
  • GetNextNumber() : NumberBoxParser
  • GetNextPageButton() : PagerControlTestPageElements , PipsPagerElements
  • GetNextPageButtonIsEnabledCheckBox() : PipsPagerElements , PagerControlTestPageElements
  • GetNextPageButtonIsVisibleCheckBox() : PipsPagerElements
  • GetNextPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetNextPageButtonVisibilityComboBox() : PipsPagerElements , PagerControlTestPageElements
  • GetNextViewChangeCorrelationId() : ScrollPresenter
  • GetNodeAt() : ViewModel
  • GetNodeContent() : TreeViewPage
  • GetNoiseBrush() : MaterialHelper
  • GetNoiseBrushImpl() : MaterialHelper
  • GetNonVirtualizingContextAdapter() : VirtualizingLayoutContext
  • GetNumberBoxIsEnabledCheckBox() : PagerControlTestPageElements
  • GetNumberBoxVisibilityCheckBox() : PagerControlTestPageElements
  • GetNumberOfItemsTextBlock() : RadioButtonsTestPageElements
  • GetNumberOfPages() : PipsPagerPage
  • GetNumberOfPagesComboBox() : PipsPagerElements
  • GetNumberOfPagesSetterButton() : PagerControlTestPageElements
  • GetNumberOfPagesTextBlock() : PagerControlTestPageElements
  • GetNumberOfWeeksInView_Click() : CalendarViewPage
  • GetNumberPanelButton() : PagerControlTestPageElements
  • GetNumberPanelContentTextBlock() : PagerControlTestPageElements
  • GetNumberPanelVisibilityCheckBox() : PagerControlTestPageElements
  • GetOffsetFromScrollContentElement() : ScrollInputHelper
  • GetOffsetLabel() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • GetOffsetOfItem() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage
  • GetOffsetsChangeVelocityParameters() : ScrollPresenterTestHooks
  • GetOpenButton() : TeachingTipFocusTestPageElements
  • GetOpenTeachingTipOnEdgeButton() : TeachingTipTestPageElements
  • GetOperationTrigger() : InteractionTrackerAsyncOperation
  • GetOperationType() : InteractionTrackerAsyncOperation
  • GetOppositeDirection() : FocusHelper
  • GetOrCreateAcrylicBrushCompositionEffectFactory() : AcrylicBrush
  • GetOrCreateAcrylicBrushCompositionEffectFactoryFromCache() : MaterialHelperBase
  • GetOrCreateElement() : ItemsRepeater
  • GetOrCreateElementAt() : VirtualizingLayoutContext
  • GetOrCreateElementAtCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • GetOrCreateElementImpl() : ItemsRepeater
  • GetOrCreateRevealBrushCompositionEffectFactory() : RevealBrush
  • GetOrCreateRevealBrushCompositionEffectFactoryFromCache() : MaterialHelperBase
  • GetOrientationComboBox() : PipsPagerElements
  • GetOrigin() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • GetOriginTemplate() : RecyclePool
  • GetOuterScroller() : ViewportManagerDownLevel
  • GetOverflowItems() : TopNavigationViewDataProvider
  • GetOverflowMenuCornerRadiusButton_Click() : NavigationViewTopNavPage
  • GetOwner() : LayoutPanelLayoutContext , RepeaterLayoutContext
  • GetPageNavigationDirection() : FocusHelper
  • GetPagerComboBox() : PagerControlTestPageElements
  • GetPagerControl() : PagerControlTestPageElements
  • GetPagerNumberBox() : PagerControlTestPageElements
  • GetPageRTLCheckbox() : TeachingTipTestPageElements
  • GetPaneToggleButtonHeight() : NavigationView
  • GetPaneToggleButtonWidth() : NavigationView
  • GetParent() : CachedVisualTreeHelpers
  • GetParentColorPicker() : ColorPickerSlider
  • GetParentData() : TreeViewSample
  • GetParentItemsRepeater() : NavigationViewItemAutomationPeer
  • GetParentItemsRepeaterForContainer() : NavigationView
  • GetParentListView() : TreeViewItemAutomationPeer
  • GetParentNavigationView() : NavigationViewItemAutomationPeer
  • GetParentNavigationViewItemForContainer() : NavigationView
  • GetParentRootItemsRepeaterForContainer() : NavigationView
  • GetParentTabView() : TabViewItem , TabViewItemAutomationPeer
  • GetParentTreeView() : TreeViewItemAutomationPeer
  • GetPasswordBoxButtonsToAdd() : TextCommandBarFlyout
  • GetPatternCore() : TreeViewItemDataAutomationPeer , NumberBoxAutomationPeer , ToggleSplitButtonAutomationPeer , GroupedRepeaterItemAutomationPeer , ItemsViewAutomationPeer , ColorSpectrumAutomationPeer , BreadcrumbBarItemAutomationPeer , ColorPickerSliderAutomationPeer , DropDownButtonAutomationPeer , ExpanderAutomationPeer , ItemContainerAutomationPeer , MenuBarItemAutomationPeer , NavigationViewAutomationPeer , NavigationViewItemAutomationPeer , PagerControlAutomationPeer , PipsPagerAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , SelectionContainerAutomationPeer , RepeaterItemAutomationPeer , TreeViewItemAutomationPeer , ScrollPresenterAutomationPeer , SplitButtonAutomationPeer , TabViewAutomationPeer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer , TreeViewListAutomationPeer
  • GetPatternCoreImpl() : ScrollPresenterAutomationPeer
  • GetPeerFromPointCore() : ExpanderAutomationPeer
  • GetPipsPager() : PipsPagerElements
  • GetPipsPagerButtonSizesButton() : PipsPagerElements
  • GetPipWithPageNumber() : PipsPagerElements
  • GetPixelAtPoint() : RadialGradientBrushPage , AcrylicRenderingPage
  • GetPlacementFallbackOrder() : TeachingTip
  • GetPointerFlags() : WebView2
  • GetPoolInstance() : RecyclePool , RecyclePoolProperties
  • GetPopup() : TeachingTipTestHooks
  • GetPopupVerticalOffsetTextBlock() : TeachingTipTestPageElements
  • GetPosition() : ScrollPresenterTestHooks
  • GetPositionAnimation() : ScrollPresenter
  • GetPositionDbg() : ScrollPresenter
  • GetPositionInSetCore() : NavigationViewItemAutomationPeer , TreeViewItemAutomationPeer
  • GetPositionOrSetCountHelper() : NavigationViewItemAutomationPeer
  • GetPrecedenceValue() : NumberBoxParser
  • GetPreferIndex() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • GetPreferredPlacementComboBox() : TeachingTipTestPageElements
  • GetPresenter() : CommandBarFlyout , NavigationViewItem
  • GetPresenterOrItem() : NavigationViewItem
  • GetPreviousPage() : PagerControlTestBase
  • GetPreviousPageAsInt() : PagerControlTestBase
  • GetPreviousPageButton() : PagerControlTestPageElements , PipsPagerElements
  • GetPreviousPageButtonIsEnabledCheckBox() : PipsPagerElements , PagerControlTestPageElements
  • GetPreviousPageButtonIsVisibleCheckBox() : PipsPagerElements
  • GetPreviousPageButtonVisibilityCheckBox() : PagerControlTestPageElements
  • GetPreviousPageButtonVisibilityComboBox() : PagerControlTestPageElements , PipsPagerElements
  • GetPreviousPageTextBlock() : PagerControlTestPageElements
  • GetPrimaryItems() : TopNavigationViewDataProvider
  • GetPrimaryListSize() : TopNavigationViewDataProvider
  • GetPrimaryWindow() : TabViewTests
  • GetProcessingForSeverity() : InfoBarAutomationPeer
  • GetProperty() : ContrastEffect , CrossFadeEffect , ColorSourceEffect , ColorMatrixEffect , ArithmeticCompositeEffect , DistantDiffuseEffect , ExposureEffect , GammaTransferEffect , GaussianBlurEffect , LinearTransferEffect , OpacityEffect , BlendEffect , SpotSpecularEffect , TemperatureAndTintEffect , TintEffect , CompositeStepEffect , SaturationEffect , SpotDiffuseEffect , PointDiffuseEffect , Transform2DEffect , PosterizeEffect , HueRotationEffect , PointSpecularEffect , SepiaEffect , DistantSpecularEffect , EffectBase , BorderEffect
  • GetPropertyCount() : PointSpecularEffect , EffectBase , ColorMatrixEffect , CrossFadeEffect , GammaTransferEffect , GaussianBlurEffect , HueRotationEffect , OpacityEffect , SaturationEffect , SpotDiffuseEffect , TemperatureAndTintEffect , ArithmeticCompositeEffect , BlendEffect , ColorSourceEffect , PointDiffuseEffect , ExposureEffect , SepiaEffect , TintEffect , PosterizeEffect , DistantDiffuseEffect , Transform2DEffect , DistantSpecularEffect , SpotSpecularEffect , LinearTransferEffect , BorderEffect , ContrastEffect , CompositeStepEffect
  • GetProviderForHwnd() : WebView2
  • GetProvisionalArrangeSize() : FlowLayoutDerived , FlowLayout
  • GetRadioButtons1HasFocusCheckBox() : RadioButtonsFocusTestPageElements
  • GetRadioButtons2HasFocusCheckBox() : RadioButtonsFocusTestPageElements
  • GetRadioButtonsEventsList() : RadioButtonsTestPageElements
  • GetRadioButtonsHasFocusCheckBox() : RadioButtonsTestPageElements
  • GetRatingControl() : RatingControlAutomationPeer
  • GetRawElementProviderSimple() : WebView2AutomationPeer
  • GetRealizationRectHeightDeficit() : LinedFlowLayout
  • GetRealizedElement() : final
  • GetRealizedElementCount() : final
  • GetRealizedItemsFromSizedItems() : LinedFlowLayout
  • GetRealizedRange() : RepeaterFocusTests
  • GetRealizedRangeIndexFromDataIndex() : final
  • GetRecommendedTransitionDirection() : NavigationView
  • GetRegionalSettingsAwareDecimalFormatter() : NumberBox
  • GetRegionInfo() : DisplayRegionHelper
  • GetRelativeViewport() : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , ScrollPresenter , IRepeaterScrollingSurface
  • GetRemovedChildTreeViewNodeByIndex() : ViewModel
  • GetRemoveOpenButtonFromVisualTreeButton() : TeachingTipTestPageElements
  • GetRemoveTargetButton() : TeachingTipTestPageElements
  • GetRemoveTeachingTipButton() : TeachingTipTestPageElements
  • GetRepeater() : NavigationViewItem , NavigationViewTests
  • GetRepeaterActualHeightButtonClick() : UniformGridLayoutDemo
  • GetReproTextBlock() : RadioButtonsTestPageElements
  • GetRequestId() : InteractionTrackerAsyncOperation
  • GetRequiredOperation() : InteractionTrackerAsyncOperation
  • GetResourceContext() : sealed< T, fallback, RawStorageT >
  • GetResourceManager() : sealed< T, fallback, RawStorageT >
  • GetResourceManagerImpl() : sealed< T, fallback, RawStorageT >
  • GetResourceMap() : sealed< T, fallback, RawStorageT >
  • GetReturnTopForOutOfWindowPlacementCheckBox() : TeachingTipTestPageElements
  • GetReuseKey() : RecyclePool
  • GetRgbColorFromTextBoxes() : ColorPicker
  • GetRichEditBoxButtonsToAdd() : TextCommandBarFlyout
  • GetRichEditBoxParent() : ScrollInputHelper
  • GetRichTextBlockButtonsToAdd() : TextCommandBarFlyout
  • GetRichTextSelection() : SharedHelpers
  • GetRootAsList() : TreeStructure
  • GetRootNodeChildrenOrder() : TreeViewPage
  • GetRootOfSelection() : TreeViewList
  • GetRootsOfSelectedSubtrees() : TreeViewList
  • GetRoundedDouble() : LinedFlowLayout
  • GetRoundedFloat() : LinedFlowLayout
  • GetRoundingScaleFactor() : ItemsView
  • GetRows() : ColumnMajorUniformToLargestGridLayout , RadioButtons , RadioButtonsTestHooks
  • GetRuntimeClassName() : ElementFactoryGetArgsDownlevel , RepeaterLayoutContext , ElementFactoryRecycleArgsDownlevel , RecyclePool , ItemsSourceViewFactory
  • GetScrollAnimation() : BiDirectionalScrollController::UniScrollController , ScrollBarController , AnnotatedScrollBar , ScrollBarController , CompositionScrollController
  • GetScrollButtonsVisible_Click() : TabViewPage
  • GetScrollCompletedResult() : ScrollPresenterTestHooks
  • GetScrollContent() : ScrollViewerIRefreshInfoProviderAdapter
  • GetScrollContentElement() : ScrollInputHelper
  • GetScrollDecreaseButtonEnabled_Click() : TabViewPage
  • GetScrollDecreaseButtonToolTipButton_Click() : TabViewPage
  • GetScrollIncreaseButtonEnabled_Click() : TabViewPage
  • GetScrollIncreaseButtonToolTipButton_Click() : TabViewPage
  • GetScrollOrientation() : OrientationBasedMeasures
  • GetScrollPercent() : ScrollPresenterAutomationPeer
  • GetScrollPresenter() : ScrollPresenterAutomationPeer
  • GetScrollPresenterContentLayoutOffset() : ScrollPresenterTestsWithInputHelper
  • GetScrollPresenterView() : ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • GetScrollPresenterWithSuffix() : ScrollPresenterChainingAndRailingPage
  • GetScrollSnapPointWrapperDbg() : ScrollPresenter
  • GetScrollViewerHorizontalOffsetButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerMaxHeightButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerMaxWidthButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerOffsetButton() : TeachingTipTestPageElements
  • GetScrollViewerOffsetTextBox() : TeachingTipTestPageElements
  • GetScrollViewerStateTextBox() : TeachingTipTestPageElements
  • GetScrollViewerVerticalOffset() : TeachingTipTests
  • GetScrollViewerVerticalOffsetButtonClick() : UniformGridLayoutDemo
  • GetScrollViewerWithSuffix() : ScrollPresenterChainingAndRailingPage
  • GetScrollViewPart() : ItemsViewTestHooks , ItemsView
  • GetScrollViewView() : ItemsViewTestsWithInputHelper
  • GetSdkBuildVersion() : WebView2Tests
  • GetSelectByIndexButton() : RadioButtonsTestPageElements
  • GetSelectByIndexButton1() : RadioButtonsFocusTestPageElements
  • GetSelectByIndexButton2() : RadioButtonsFocusTestPageElements
  • GetSelectByItemButton() : RadioButtonsTestPageElements
  • GetSelected_Click() : TreeViewPage
  • GetSelectedContainer() : NavigationView
  • GetSelectedIndex() : RadioButtonsTests
  • GetSelectedIndexTextBlock() : RadioButtonsTestPageElements
  • GetSelectedIndexTextBlock1() : RadioButtonsFocusTestPageElements
  • GetSelectedIndexTextBlock2() : RadioButtonsFocusTestPageElements
  • GetSelectedItem() : PipsPager , RadioButtonsTests
  • GetSelectedItemIndex() : NavigationView
  • GetSelectedItemName_Click() : TreeViewUnrealizedChildrenTestPage
  • GetSelectedItems() : ViewModel , ItemsViewTestsWithInputHelper
  • GetSelectedItemTextBlock() : RadioButtonsTestPageElements
  • GetSelectedNodes() : ViewModel
  • GetSelectedNumberOfPages() : PipsPagerTestBase
  • GetSelectedNumberOfPagesAsInt32() : PipsPagerTestBase
  • GetSelectedPositionInSetTextBlock() : RadioButtonsTestPageElements
  • GetSelectedSizeOfSetTextBlock() : RadioButtonsTestPageElements
  • GetSelection() : ItemsViewAutomationPeer , NavigationViewAutomationPeer , PipsPagerAutomationPeer , TreeViewListAutomationPeer , TreeViewPage , SelectionContainerAutomationPeer , PagerControlAutomationPeer , TabViewAutomationPeer
  • GetSelectionIndicator() : NavigationViewItem , NavigationViewItemPresenter , NavigationViewItemHelper< T >
  • GetSelectionModel() : ItemsView , SelectorBase , ItemsViewTestHooks
  • GetSelectorBarItem() : SelectorBarSummaryPage
  • GetSetActionButtonContentButton() : TeachingTipTestPageElements
  • GetSetAutomationNameButton() : TeachingTipTestPageElements
  • GetSetBorderWidthButton() : RadioButtonsTestPageElements
  • GetSetCloseButtonContentButton() : TeachingTipTestPageElements
  • GetSetHeroContentButton() : TeachingTipTestPageElements
  • GetSetIconButton() : TeachingTipTestPageElements
  • GetSetMaxColumnsButton() : RadioButtonsTestPageElements
  • GetSetNumberOfItemsButton() : RadioButtonsTestPageElements
  • GetSetPreferredPlacementButton() : TeachingTipTestPageElements
  • GetSetSubtitleButton() : TeachingTipTestPageElements
  • GetSetTargetButton() : TeachingTipTestPageElements
  • GetSetTipLocationButton() : TeachingTipTestPageElements
  • GetSetTitleButton() : TeachingTipTestPageElements
  • GetSeverityLevelResourceName() : InfoBar
  • GetShouldConstrainToRootBoundsButton() : TeachingTipTestPageElements
  • GetShouldConstrainToRootBoundsComboBox() : TeachingTipTestPageElements
  • GetShouldLightBeOn() : RevealBorderLight
  • GetShowButton() : TeachingTipTestPageElements
  • GetSize() : IndexPath
  • GetSizeCore() : CustomItemsSourceView , CollectionChangeDemo::MyDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ScrollPresenterBringIntoViewPage::SampleDataSource , ScrollPresenterTests::TestDataSource , DelegatingItemsSource , PersonDataSource , MockItemsSource , InspectingDataSource , CustomItemsSource , ItemsSourceView
  • GetSizedItemsRectHeight() : LinedFlowLayout
  • GetSizeOfSetCore() : TreeViewItemAutomationPeer , NavigationViewItemAutomationPeer
  • GetSnapPointFromWrapper() : SnapPointWrapper< T >
  • GetSnapPointVisualizationColor() : ScrollPresenterTestHooks
  • GetSolidColorBrush() : CalendarViewPage
  • GetSolidColorBrushColor() : AcrylicBrushTests
  • GetSource() : EffectBase
  • GetSourceComboBox() : RadioButtonsTestPageElements
  • GetSourceCount() : EffectBase
  • GetSourceOffsetPropertyName() : ScrollInputHelper
  • GetSourceScalePropertyName() : ScrollInputHelper
  • GetSpanningRects() : IApplicationViewSpanningRects
  • GetSplitView() : NavigationViewItemBase , NavigationView
  • GetSpotLight() : RevealTestApi
  • GetSpreadMethodValueNames() : RadialGradientBrushPage
  • GetSquareColor() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarSummaryPage
  • GetStackLayout() : RepeaterTestUIPage
  • GetStackPanel() : ListViewAnchoringPage
  • GetStartIndex() : PinterestLayout , VirtualizingStackLayout
  • GetState() : RevealBrushProperties , AnimatedIconProperties
  • GetStringFromChild() : SelectorBarSummaryPage
  • GetStringFromIconElement() : SelectorBarSummaryPage
  • GetStringFromSelectorBarItem() : SelectorBarTests , SelectorBarSummaryPage
  • GetStringRepresentation() : SelectionModel , TreeViewNode
  • GetSubtitleComboBox() : TeachingTipTestPageElements
  • GetSubtitleVisibility() : TeachingTip , TeachingTipTestHooks
  • GetSubtitleVisibilityTextBlock() : TeachingTipTestPageElements
  • GetSupportedEventsCore() : SliderInteraction , ButtonInteraction
  • GetSwipeItemButton() : SwipeControl
  • GetSwitchTargetButton() : TeachingTipTestPageElements
  • GetSymbolFromInt() : SelectorBarSummaryPage
  • GetTab0ToolTipButton_Click() : TabViewPage
  • GetTab1ToolTipButton_Click() : TabViewPage
  • GetTabAtPoint() : TabView
  • GetTabCloseButtonTooltipText() : TabView
  • GetTabInsertionIndex() : TabView
  • GetTabsFromTabView() : TabViewTests , TabViewTearOutTests
  • GetTabViewFromWindow() : TabViewTearOutTests , TabViewTests
  • GetTabViewTearOutAppWindows() : TabViewTearOutTests , TabViewTests
  • GetTabViewWithTearOutList() : TabView
  • GetTargetBounds() : TeachingTipTests
  • GetTargetBoundsButton() : TeachingTipTestPageElements
  • GetTargetExpression() : SnapPointBase
  • GetTargetHeightTextBlock() : TeachingTipTestPageElements
  • GetTargetHorizontalOffset() : ScrollingBringingIntoViewEventArgs
  • GetTargetVerticalOffset() : ScrollingBringingIntoViewEventArgs
  • GetTargetWidthTextBlock() : TeachingTipTestPageElements
  • GetTargetXOffsetTextBlock() : TeachingTipTestPageElements
  • GetTargetYOffsetTextBlock() : TeachingTipTestPageElements
  • getTeachingTip() : TeachingTipPage
  • GetTeachingTip() : TeachingTipAutomationPeer
  • GetTeachingTipAlternateCloseButton() : TeachingTipTestPageElements
  • GetTeachingTipCloseButton() : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • GetTeachingTipContent() : TeachingTipTestPageElements
  • GetTeachingTipContentUnloadedCheck() : TeachingTipTestPageElements
  • GetTeachingTipCornerRadius() : TeachingTip
  • GetTeachingTipDebugMessage() : TeachingTipTests
  • GetTeachingTipOnEdgeHorizontalOffset() : TeachingTipTestPageElements
  • GetTeachingTipOnEdgeOffsetButton() : TeachingTipTestPageElements
  • GetTeachingTipOnEdgeOffsetTextblock() : TeachingTipTestPageElements
  • GetTeachingTipOnEdgeVerticalOffset() : TeachingTipTestPageElements
  • getTeachingTipRoot() : TeachingTipPage
  • GetTemplateParts() : SwipeControl
  • GetTemplateSettings() : NavigationView
  • GetTestPageUri() : WebView2Common
  • GetTestRadioButtons() : RadioButtonsTestPageElements
  • GetTestRadioButtons1() : RadioButtonsFocusTestPageElements
  • GetTestRadioButtons2() : RadioButtonsFocusTestPageElements
  • GetTestScreenBoundsHeightTextBox() : TeachingTipTestPageElements
  • GetTestScreenBoundsWidthTextBox() : TeachingTipTestPageElements
  • GetTestScreenBoundsXTextBox() : TeachingTipTestPageElements
  • GetTestScreenBoundsYTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsHeightTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsWidthTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsXTextBox() : TeachingTipTestPageElements
  • GetTestWindowBoundsYTextBox() : TeachingTipTestPageElements
  • GetTextBlockButtonsToAdd() : TextCommandBarFlyout
  • GetTextBlockChild() : SelectorBarSummaryPage
  • GetTextBoxButtonsToAdd() : TextCommandBarFlyout
  • GetTextBoxChild() : SelectorBarSummaryPage
  • GetThemeBackgroundColor() : WebView2
  • GetThemeProperties() : ProgressRingDeterminate , ProgressRingIndeterminate
  • GetThemingComboBox() : TeachingTipTestPageElements
  • GetThicknessFromString() : ScrollViewWithScrollControllersPage , GroupedItemsControlPage , ItemsViewSummaryPage , FlatItemsControlPage , SelectorBarSummaryPage , ListViewAnchoringPage , LinedFlowLayoutDemo , ListViewBasePage , ScrollPresenterDynamicPage , ScrollViewerPage , GroupedListViewBasePage , ImagePage , ScrollViewDynamicPage
  • GetThis() : SwipeControl
  • GetTicksCountdown() : InteractionTrackerAsyncOperation
  • GetTipFollowsTargetCheckBox() : TeachingTipTestPageElements
  • GetTipLocationComboBox() : TeachingTipTestPageElements
  • GetTipVerticalOffset() : TeachingTipTests
  • GetTipWidthTextBlock() : TeachingTipTestPageElements
  • GetTitleComboBox() : TeachingTipTestPageElements
  • GetTitleVisibility() : TeachingTip , TeachingTipTestHooks
  • GetTitleVisibilityTextBlock() : TeachingTipTestPageElements
  • GetToggleButton() : InkToolBar
  • GetToggleButtonRowHeight_Click() : NavigationViewRS3Page
  • GetTokens() : NumberBoxParser
  • GetToolButton() : InkToolBar
  • GetToolTipString() : ColorPickerSlider
  • GetToolTipStringForUIElement() : TabViewPage
  • GetTopDataProvider() : NavigationView
  • GetTopLevelNavViewItemContentPresenterMarginButton_Click() : NavigationViewPage
  • GetTopNavigationItems() : NavigationViewTestsBase
  • GetTopNavigationViewActualWidth() : NavigationView
  • GetTopPaddingHeight_Click() : NavigationViewRS3Page
  • GetTopPaddingHeightButton_Click() : NavigationViewTopNavStorePage
  • GetTopParent() : LightConfigurationTests , RevealMarkupPage
  • GetTotals() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • GetTrackerHandlerManager() : VectorInnerImpl< VectorOptions, Wrapper >
  • GetTrailingNavigationKeyCount() : ItemsView
  • GetTransformExpressionAnimationExpression() : ScrollPresenterTestHooks
  • GetTransformExpressionAnimationExpressionDbg() : ScrollPresenter
  • GetTree2ItemCount_Click() : TreeViewPage
  • GetTreeViewItemAutomationPeer() : TreeViewItemDataAutomationPeer
  • GetTreeViewNode() : TreeViewItemAutomationPeer , CustomContent
  • GetUIElementForFocusCandidate() : FocusHelper
  • GetUISettings() : WebView2 , RatingControl
  • GetUniformGridLayoutMaximumRowsOrColumnsButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinColumnSpacingButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinItemHeightButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinItemWidthButtonClick() : UniformGridLayoutDemo
  • GetUniformGridLayoutMinRowSpacingButtonClick() : UniformGridLayoutDemo
  • GetUpdatedExpressionAnimationsForImpulse() : SnapPointWrapper< T >
  • GetUpdatedKeyboardNavigationReferenceOffset() : ItemsView
  • GetUpdateMarginTextBlockButton() : PagerControlTestPageElements
  • GetUseTestScreenBoundsCheckbox() : TeachingTipTestPageElements
  • GetUseTestWindowBoundsCheckbox() : TeachingTipTestPageElements
  • GetValue() : CustomProperty , XamlMember
  • GetValueString() : ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer
  • GetVector() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , SplitVector< T, SplitVectorID >
  • GetVectorEventSender() : IVectorOwner< EventSource, T >
  • GetVectorEventSource() : IVectorOwner< EventSource, T >
  • GetVectorForItem() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • GetVectorIDForItem() : SplitVector< T, SplitVectorID > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • GetVerticalMaxOffset() : CanvasScrollControllerConsumer
  • GetVerticalOffset() : TeachingTipTestHooks , TeachingTip , CanvasScrollControllerConsumer
  • GetVerticalOrientationMargin() : InfoBarPanelProperties
  • GetVerticalOrientationPipsPagerButtonHeightTextBlock() : PipsPagerElements
  • GetVerticalOrientationPipsPagerButtonWidthTextBlock() : PipsPagerElements
  • GetVerticalSnapPointActualApplicableZone() : ScrollPresenterTestHooks
  • GetVerticalSnapPointCombinationCount() : ScrollPresenterTestHooks
  • GetVerticalSnapPointWrapperDbg() : ScrollPresenter
  • GetVerticalViewportLength() : CanvasScrollControllerConsumer
  • GetView() : HashMap< K, V > , SwipeItems , ViewModel , ObservableVector< T >
  • GetViewChangeBase() : InteractionTrackerAsyncOperation
  • GetViewChangeCorrelationId() : InteractionTrackerAsyncOperation
  • GetViewPercent() : ScrollPresenterAutomationPeer
  • GetViewportSize() : ScrollInputHelper
  • GetVirtualizationInfo() : ItemsRepeater
  • GetVirtualizationInfoProperty() : ItemsRepeater
  • GetVirtualizingContextAdapter() : NonVirtualizingLayoutContext
  • GetVirtualKeyFromChar() : SharedHelpers
  • GetVisibleItemsCount() : BreadcrumbLayout
  • GetVisualChildByName() : CommonStylesApiTests
  • GetVisualHorizontalTargetedPropertyName() : ParallaxViewTests
  • GetVisualStateDisplayMode() : NavigationView
  • GetVisualStateGroup() : VisualStateUtil
  • GetVisualTargetedPropertyName() : ScrollPresenter , ParallaxView
  • GetVisualVerticalTargetedPropertyName() : ParallaxViewTests
  • GetWebView2Provider() : WebView2
  • GetWidthForItem() : TopNavigationViewDataProvider
  • GetWidthsButton_Click() : TabViewSizingPage
  • GetWindowBounds() : TeachingTip
  • GetWindowLightAt() : RevealTestApi
  • GetWrapModeComboBox() : PipsPagerElements
  • GetWritableParentItemsSource() : TreeViewNodeVector
  • GetXamlType() : XamlMetadataProvider
  • GetXmlnsDefinitions() : XamlMetadataProvider
  • GetZoomCompletedResult() : ScrollPresenterTestHooks
  • GetZoomedExtentHeight() : ScrollPresenter
  • GetZoomedExtentWidth() : ScrollPresenter
  • GetZoomFactorAnimation() : ScrollPresenter
  • GetZoomFactorChangeVelocityParameters() : ScrollPresenterTestHooks
  • GetZoomSnapPointActualApplicableZone() : ScrollPresenterTestHooks
  • GetZoomSnapPointCombinationCount() : ScrollPresenterTestHooks
  • GetZoomSnapPointWrapperDbg() : ScrollPresenter
  • GlobalDependencyProperty() : GlobalDependencyProperty
  • Glyph() : RatingItemFontInfoProperties
  • GlyphBrush() : TreeViewItemProperties
  • GlyphBrushProperty() : TreeViewItemProperties
  • GlyphOpacity() : TreeViewItemProperties
  • GlyphOpacityProperty() : TreeViewItemProperties
  • GlyphProperty() : RatingItemFontInfoProperties
  • GlyphSize() : TreeViewItemProperties
  • GlyphSizeProperty() : TreeViewItemProperties
  • GoBack() : WebView2
  • GoBackAndForwardTest() : WebView2Tests
  • GoButton_Click() : MapControlPage
  • GoForward() : WebView2
  • GoToChainingAndRailingPage() : ScrollPresenterTestsWithInputHelper
  • GoToElementStateCore() : NavigationViewItemPresenter , RevealListViewItemPresenter
  • GoToExamplesPage() : PipsPagerPage
  • GotoLightState() : RevealHoverLight
  • GotoLightStateHelper() : RevealHoverLight
  • GoToManipulationModePage() : ScrollPresenterTestsWithInputHelper
  • GoToScrollSnapPointsPage() : ScrollPresenterTestsWithInputHelper
  • GoToSimpleContentsPage() : ScrollPresenterTestsWithInputHelper
  • GoToState() : ItemContainer , ScrollView , RevealHoverLight
  • GoToStateIfGroupExists() : VisualStateUtil
  • GradientOrigin() : RadialGradientBrushProperties
  • GradientOriginProperty() : RadialGradientBrushProperties
  • GradientRenderingTest() : RadialGradientBrushTests
  • GradientStops() : RadialGradientBrush
  • GreenAmplitude() : IGammaTransferEffect
  • GreenDisable() : ILinearTransferEffect , IGammaTransferEffect , ILinearTransferEffect
  • GreenExponent() : IGammaTransferEffect
  • GreenOffset() : ILinearTransferEffect , IGammaTransferEffect , ILinearTransferEffect , IGammaTransferEffect
  • GreenSlope() : ILinearTransferEffect
  • GreenValueCount() : IPosterizeEffect
  • Grid_ContextRequested() : MenuFlyoutPage
  • GridViewPage() : GridViewPage
  • GroupCheckBox_Checked() : PersonPicturePage
  • GroupCheckBox_Unchecked() : PersonPicturePage
  • GroupedItemsControlGroupItem() : GroupedItemsControlGroupItem
  • GroupedItemsControlItem() : GroupedItemsControlItem
  • GroupedItemsControlPage() : GroupedItemsControlPage
  • GroupedItemsControlPage_Loaded() : GroupedItemsControlPage
  • GroupedItemsControlViewModel() : GroupedItemsControlViewModel
  • GroupedListViewBaseGroupItem() : GroupedListViewBaseGroupItem
  • GroupedListViewBaseItem() : GroupedListViewBaseItem
  • GroupedListViewBasePage() : GroupedListViewBasePage
  • GroupedListViewBasePage_Loaded() : GroupedListViewBasePage
  • GroupedListViewBaseViewModel() : GroupedListViewBaseViewModel
  • GroupedRepeaterItem() : GroupedRepeaterItem
  • GroupedRepeaterItemAutomationPeer() : GroupedRepeaterItemAutomationPeer
  • GroupedSample() : GroupedSample
  • GroupName() : RadioMenuFlyoutItemProperties
  • GroupNameProperty() : RadioMenuFlyoutItemProperties
  • groupRepeater_ElementIndexChanged() : GroupedSample
  • groupRepeater_ElementPrepared() : GroupedSample
  • GrowLineIfNeeded() : Flex
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- h -

  • Handled() : InkToolBarEraserFlyoutItemClickedEventArgs , ItemContainerInvokedEventArgs , TreeViewItemInvokedEventArgs , ScrollControllerPanRequestedEventArgs , ItemContainerInvokedEventArgs , ScrollControllerPanRequestedEventArgs , TreeViewItemInvokedEventArgs
  • HandleEdgeCaseFocus() : RadioButtons
  • HandleExpandCollapse() : TreeViewItem
  • HandleExpansionStateMemory() : NavigationViewItem
  • HandleF6Clicked() : TeachingTip
  • HandleGamepadAInMultiselectMode() : TreeViewItem
  • HandleGettingFocus() : WebView2
  • HandleGotFocus() : WebView2
  • HandleItemCloseRequestedTest() : TabViewTests
  • HandleItemsInfoRequested() : ItemsViewTests
  • HandleItemsInfoRequestedWithExtraInfo() : ItemsViewTests
  • HandleItemsInfoRequestedWithSizeArrays() : ItemsViewTests
  • HandleItemsInfoRequestedWithSizeArraysAndExtraInfo() : ItemsViewTests
  • HandleItemsInfoRequestedWithTemporaryAndExtraInfo() : ItemsViewTests
  • HandleItemsInfoRequestedWithTemporaryInfo() : ItemsViewTests
  • HandleKeyDownForStandardScroll() : ScrollView
  • HandleKeyDownForXYNavigation() : ScrollView
  • HandleKeyEventForNavigationViewItem() : NavigationView
  • HandleLosingFocus() : WebView2
  • HandleMapElementsChanged() : MapElementsLayer
  • HandlePointerCanceled() : WebView2
  • HandlePointerCaptureLost() : WebView2
  • HandlePointerEntered() : WebView2
  • HandlePointerExited() : WebView2
  • HandlePointerMoved() : WebView2
  • HandlePointerPressed() : WebView2
  • HandlePointerReleased() : WebView2
  • HandlePointerWheelChanged() : WebView2
  • HandleRendered() : WebView2
  • HandleReorder() : TreeViewItem
  • HandleScrollControllerPointerEntered() : ScrollView
  • HandleScrollControllerPointerExited() : ScrollView
  • HandleSizeChanged() : WebView2
  • HandleTopNavigationMeasureOverride() : NavigationView
  • HandleTopNavigationMeasureOverrideNormal() : NavigationView
  • HandleTopNavigationMeasureOverrideOverflow() : NavigationView
  • HandleWebError() : WebView2BasicPage
  • HandleXamlRootChanged() : WebView2
  • hasBottomContentPropertyName() : SwipeControl
  • HasBringingIntoViewListener() : ScrollPresenter
  • HasChildren() : TreeViewNodeProperties , NavigationViewItem , NavigationViewItemAutomationPeer
  • HasChildrenProperty() : TreeViewNodeProperties
  • HasCloseAnimation() : CommandBarFlyoutCommandBar
  • HasCurrent()
: BreadcrumbIterator
, HashMap< K, V >::Iterator
, ObservableVector< T >::Iterator
, VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
, ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
, SelectedItems< T >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
  • HasCustomContentChanged() : InfoBarPage
  • HasDensityBars_Checked() : CalendarViewPage
  • HasDensityBars_Unchecked() : CalendarViewPage
  • HasInvalidWidth() : TopNavigationViewDataProvider
  • HasKey() : HashMap< K, V >
  • HasKeyboardFocusCore() : ExpanderAutomationPeer
  • HasKeyIndexMapping() : ItemsSourceView
  • HasKeyIndexMappingCore() : InspectingDataSource , ItemsSourceView
  • hasLeftContentPropertyName() : SwipeControl
  • HasLowerWeight() : LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • HasMaxTicksCount() : ScrollViewBringIntoViewOperation
  • HasOpenAnimation() : CommandBarFlyoutCommandBar
  • HasPendingBringIntoView() : ItemsRepeaterScrollHost
  • HasPotentialChildren() : NavigationViewItem
  • hasRightContentPropertyName() : SwipeControl
  • HasScroller() : ViewportManagerWithPlatformFeatures
  • HasScrollers() : ViewportManagerDownLevel
  • HasSecondaryOpenCloseAnimations() : CommandBarFlyoutCommandBar
  • HasStarted() : ItemCollectionTransition
  • hasTopContentPropertyName() : SwipeControl
  • HasTopNavigationViewItemNotInPrimaryList() : NavigationView
  • HasUnrealizedChildren() : NavigationViewItemProperties , TreeViewItemProperties , TreeViewNode
  • HasUnrealizedChildrenProperty() : NavigationViewItemProperties , TreeViewItemProperties
  • HasVisibleLabel() : CommandBarFlyoutCommandBar
  • Header() : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties
  • HeaderContentCheckBox_CheckedChanged() : TitleBarPageWindow
  • HeaderContentPresenterMarginTest() : CommonStylesPage
  • HeaderProperty() : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties
  • HeaderTemplate() : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties
  • HeaderTemplateProperty() : TabViewItemProperties , ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties
  • HeaderTemplateSelector() : ExpanderProperties
  • HeaderTemplateSelectorProperty() : ExpanderProperties
  • HeaderVisiblityCheckbox_Checked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • HeaderVisiblityCheckbox_Unchecked() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • HeartButton_Click() : ItemContainerSummaryPage
  • HeightComboBox_SelectionChanged() : TwoPaneViewPage
  • HeightCombobox_SelectionChanged() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • HeightMapInterpolationMode() : IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • HeightMapKernelSize() : IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • HeightMapScale() : IDistantDiffuseEffect , IDistantSpecularEffect , IPointDiffuseEffect , IPointSpecularEffect , ISpotDiffuseEffect , ISpotSpecularEffect
  • HeroContent() : TeachingTipProperties
  • HeroContentPlacement() : TeachingTipProperties
  • HeroContentPlacementProperty() : TeachingTipProperties
  • HeroContentProperty() : TeachingTipProperties
  • HiddenElements() : BreadcrumbBar
  • HiddenThenVisibleTest() : WebView2Tests
  • HideHoverVisuals() : AnnotatedScrollBar
  • HideIndicators() : ScrollView
  • HideIndicatorsAfterDelay() : ScrollView
  • HideItem() : BreadcrumbLayout
  • HideLeftAdjacentTabSeparator() : TabViewItem
  • HierarchicalNavigationViewDataBinding() : HierarchicalNavigationViewDataBinding
  • HierarchicalNavigationViewMarkup() : HierarchicalNavigationViewMarkup
  • HierarchyItemsAccessibilitySetAndLevelTest() : CommonTests
  • HittestingTest() : AnimatedVisualPlayerTests
  • HoldThenStepEasingFunction() : AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • HomeEndNavigationTest() : FocusBehaviorTests
  • HomeTabOverlapCheck_Click() : TabViewPage
  • HookAllCommandBarElementDependencyPropertyChanges() : CommandBarFlyout
  • HookAnnotatedScrollBarEvents() : ItemsViewIntegrationPage
  • HookAppBarButtonDependencyPropertyChanges() : CommandBarFlyout
  • HookAppBarToggleButtonDependencyPropertyChanges() : CommandBarFlyout
  • HookBringIntoViewEvents() : ScrollPresenterBringIntoViewPage
  • HookChildPropertyChanged() : ParallaxView
  • HookCompositionTargetRendering() : ScrollPresenter , ItemsView , ScrollInputHelper , ScrollView
  • HookContentEffectiveViewportChanged() : ScrollPresenterDynamicPage
  • HookContentPointerEvents() : ScrollPresenterDynamicPage
  • HookContentPropertyChanged() : ScrollPresenter
  • HookHandlers() : BiDirectionalScrollController
  • HookHorizontalScrollControllerEvents() : ScrollPresenter , ScrollView
  • HookHorizontalScrollControllerInteractionSourceEvents() : ScrollPresenter
  • HookHorizontalScrollControllerPanningInfoEvents() : ScrollPresenter
  • HookInputEvents() : AnnotatedScrollBar , NavigationViewItem
  • HookItemsRepeaterEvents() : ItemsView , ItemsViewSummaryPage , KeyboardNavigationSample , SelectorBarSummaryPage
  • HookItemsSourceViewEvents() : ItemsView
  • HookItemsViewEvents() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • HookLinedFlowLayoutEvents() : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • HookListeners() : BreadcrumbBarItem
  • HookLoaded() : ParallaxView
  • HookPhotosCollectionChanged() : ItemsViewIntegrationPage
  • HookRichEditBoxTextChanged() : ScrollInputHelper
  • HookScrollBarEvent() : ScrollBarController
  • HookScrollBarPropertyChanged() : ScrollBarController
  • HookScrollersEvents() : VariableSizedItemsPage
  • HookScrollPresenterContentPropertyChanged() : ScrollInputHelper
  • HookScrollPresenterEvents() : ScrollPresenter , ScrollView , ScrollPresenterBringIntoViewPage
  • HookScrollPresenterPropertyChanged() : ScrollInputHelper
  • HookScrollViewerContentPropertyChanged() : ScrollInputHelper
  • HookScrollViewerDirectManipulationCompleted() : ScrollInputHelper
  • HookScrollViewerDirectManipulationStarted() : ScrollInputHelper
  • HookScrollViewerEvents() : ScrollPresenterBringIntoViewPage
  • HookScrollViewerPropertyChanged() : ScrollInputHelper
  • HookScrollViewEvents() : ItemsView , ItemsViewSummaryPage , ScrollView , ItemsViewIntegrationPage , LinedFlowLayoutDemo
  • HookSelectorBarEvents() : SelectorBarSummaryPage
  • HookSizeChanged() : ParallaxView
  • HookSourceControlTemplateChanged() : ScrollInputHelper
  • HookSourceElementLoaded() : ScrollInputHelper
  • HookTargetElementLoaded() : ScrollInputHelper
  • HookUISettingsEvent() : ScrollView , ScrollView::AutoHideScrollBarsState
  • HookupCollectionChangedHandler() : final
  • HookupDpiChangedHandler() : MaterialHelper
  • HookupWindowPointerHandlers() : RevealBorderLight
  • HookVerticalScrollControllerEvents() : ScrollPresenter , ScrollView
  • HookVerticalScrollControllerInteractionSourceEvents() : ScrollPresenter
  • HookVerticalScrollControllerPanningInfoEvents() : ScrollPresenter
  • HorizontalAlignmentRatio() : BringIntoViewOffsetsChange
  • HorizontalAnchorRatio() : ScrollPresenterProperties , ScrollViewProperties , ItemsRepeaterScrollHost
  • HorizontalAnchorRatioProperty() : ScrollPresenterProperties , ScrollViewProperties
  • HorizontalCacheLength() : ItemsRepeaterProperties , ViewportManager , ViewportManagerWithPlatformFeatures , ViewportManager , ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel , ItemsRepeaterProperties , ViewportManagerDownLevel
  • HorizontalCacheLengthProperty() : ItemsRepeaterProperties
  • HorizontalDecrementRepeatButton_Click() : BiDirectionalScrollController
  • HorizontalDecrementVerticalIncrementRepeatButton_Click() : BiDirectionalScrollController
  • HorizontalIncrementRepeatButton_Click() : BiDirectionalScrollController
  • HorizontalIncrementVerticalDecrementRepeatButton_Click() : BiDirectionalScrollController
  • HorizontallyScrollable() : ScrollPresenterAutomationPeer
  • HorizontalOffset() : BringIntoViewOffsetsChange , ScrollView , ScrollPresenter , ScrollingZoomStartingEventArgs , ScrollingScrollStartingEventArgs
  • HorizontalOrientationMarginProperty() : InfoBarPanelProperties
  • HorizontalOrientationPadding() : InfoBarPanelProperties
  • HorizontalOrientationPaddingProperty() : InfoBarPanelProperties
  • HorizontalScrollBarVisibility() : ScrollViewProperties
  • HorizontalScrollBarVisibilityProperty() : ScrollViewProperties
  • HorizontalScrollChainMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • HorizontalScrollChainModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • HorizontalScrollController() : ScrollPresenter
  • HorizontalScrollMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • HorizontalScrollModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • HorizontalScrollPercent() : ScrollPresenterAutomationPeer
  • HorizontalScrollRailMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • HorizontalScrollRailModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • HorizontalShift() : ParallaxViewProperties
  • HorizontalShiftProperty() : ParallaxViewProperties
  • HorizontalSnapPoints() : ScrollPresenter
  • HorizontalSourceEndOffset() : ParallaxViewProperties
  • HorizontalSourceEndOffsetProperty() : ParallaxViewProperties
  • HorizontalSourceOffsetKind() : ParallaxViewProperties
  • HorizontalSourceOffsetKindProperty() : ParallaxViewProperties
  • HorizontalSourceStartOffset() : ParallaxViewProperties
  • HorizontalSourceStartOffsetProperty() : ParallaxViewProperties
  • HorizontalViewSize() : ScrollPresenterAutomationPeer
  • HostNameToFolderMappingTest() : WebView2Tests
  • HoveringBehaviorTest() : MenuBarTests
  • HoverLight_IsPointerOver() : RevealTestApi
  • HoverLight_IsPressed() : RevealTestApi
  • HoverLight_ShouldBeOn() : RevealTestApi
  • HoverLight_ValidateFastRelease_Values() : RevealStatesPage
  • HoverLight_ValidateNormal() : RevealStatesPage
  • HoverLight_ValidateNormalState() : RevealStatesPage
  • HoverLight_ValidatePointerOver() : RevealStatesPage
  • HoverLight_ValidatePointerOverState() : RevealStatesPage
  • HoverLight_ValidatePointerOverState_Values() : RevealStatesPage
  • HoverLight_ValidatePosition_Offset1_Values() : RevealStatesPage
  • HoverLight_ValidatePosition_Offset2_Values() : RevealStatesPage
  • HoverLight_ValidatePosition_Offset3_Values() : RevealStatesPage
  • HoverLight_ValidatePressed() : RevealStatesPage
  • HoverLight_ValidatePressedState_Values() : RevealStatesPage
  • HoverLight_ValidateSlowRelease_Values() : RevealStatesPage
  • HoverLightPositionValuesValidationHelper() : RevealStatesPage
  • HoverLightStateValuesValidationHelper() : RevealStatesPage
  • Hsv() : Hsv
  • HsvColor() : ColorSpectrumProperties
  • HsvColorProperty() : ColorSpectrumProperties
  • HtmlDropdownTest() : WebView2Tests
  • HyperlinkIsOffscreenTest() : CommonStylesTests
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- i -

  • Icon() : NavigationViewItemProperties , NavigationViewItemPresenterProperties , SelectorBarItemProperties , NavigationViewItemPresenterProperties , SelectorBarItemProperties
  • IconComboBox_SelectionChanged() : InfoBarPage
  • IconComboBoxSelectionChanged() : InfoBadgePage
  • IconElement() : TeachingTipTemplateSettingsProperties , TitleBarTemplateSettingsProperties , InfoBadgeTemplateSettingsProperties , TitleBarTemplateSettingsProperties , InfoBadgeTemplateSettingsProperties , InfoBarTemplateSettingsProperties , TabViewItemTemplateSettingsProperties , TeachingTipTemplateSettingsProperties
  • IconElementProperty() : InfoBadgeTemplateSettingsProperties , InfoBarTemplateSettingsProperties , TabViewItemTemplateSettingsProperties , TeachingTipTemplateSettingsProperties , TitleBarTemplateSettingsProperties
  • IconProperty() : NavigationViewItemProperties , NavigationViewItemPresenterProperties , SelectorBarItemProperties
  • IconSource() : SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties , InfoBadgeProperties , InfoBarProperties , SwipeItemProperties
  • IconSourceChanged() : AnimatedIconHost , ToggleAnimatedIconHost
  • IconSourceProperty() : InfoBadgeProperties , InfoBarProperties , SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties
  • IconWidth() : NavigationViewItemPresenterTemplateSettingsProperties
  • IconWidthProperty() : NavigationViewItemPresenterTemplateSettingsProperties
  • IdleStateEntered() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • IdleStatusChanged() : SwipeTestHooks , TeachingTipTestHooks
  • IgnoreAreEffectsFast() : MaterialHelperBase , MaterialHelperTestApi
  • IgnoredInputKinds() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenter , ScrollView
  • IgnoredInputKindsProperty() : ScrollPresenterProperties , ScrollViewProperties
  • IgnorePointerId() : AnnotatedScrollBar , BreadcrumbBarItem , NavigationViewItem , NavigationViewItemPresenter
  • Image() : RatingItemImageInfoProperties
  • Image_ImageFailed() : ImagePage , ItemsViewIntegrationPage , ItemsViewSummaryPage
  • Image_ImageOpened() : ImagePage , ItemsViewIntegrationPage , ItemsViewSummaryPage
  • ImageBtn_Click() : PersonPicturePage
  • ImageIcon() : ImageIcon
  • ImageIconPage() : ImageIconPage
  • ImageIconProperties() : ImageIconProperties
  • ImageIconSourceProperties() : ImageIconSourceProperties
  • ImageIconSourceTest() : IconSourceApiTests
  • ImageIconTest() : ImageIconTests
  • ImageInfoValidation() : RatingControlTests
  • ImageIRefreshInfoProviderAdapter() : ImageIRefreshInfoProviderAdapter
  • ImageLoading() : PersonPictureTests
  • ImagePage() : ImagePage
  • ImagePage_Loaded() : ImagePage
  • ImageProperty() : RatingItemImageInfoProperties
  • ImageSource() : ImageIconSourceProperties
  • ImageSourceProperty() : ImageIconSourceProperties
  • ImageWithConstrainedHeight() : ScrollPresenterTests
  • ImageWithConstrainedSize() : ScrollPresenterTests
  • ImageWithConstrainedWidth() : ScrollPresenterTests
  • ImageWithUnnaturalSize() : ScrollPresenterTests
  • Impl() : event_base< ImplT, T, StorageT > , ReferenceTrackerStorageHelper< ImplT, T >
  • IMPLEMENT_TELEMETRY_CLASS() : final
  • Implement_Vector() : VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
  • Implement_Vector_Read() : TreeViewNodeVector , SelectedTreeNodeVector , SelectedItemsVector
  • ImpulseInfluence() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • IncludesItemIndex() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • IncreaseNumberOfPagesButtonClicked() : PagerControlPage
  • IncreaseScrollButton_Click() : TabViewTabClosingBehaviorPage
  • IncrementAndCheckFailedToAttachLightsCount() : MaterialHelper
  • IncrementDeferralCount() : RefreshRequestedEventArgs , TeachingTipClosingEventArgs
  • IncrementNumberOfPages() : PagerControlTestBase
  • IncrementRepeatButton_Click() : CompositionScrollController
  • Indent() : ItemsRepeater , LayoutContext
  • Indentation() : TreeViewItemTemplateSettingsProperties
  • IndentationProperty() : TreeViewItemTemplateSettingsProperties
  • IndeterminateSource() : ProgressRingProperties
  • IndeterminateSourceProperty() : ProgressRingProperties
  • Index() : BreadcrumbBarItemClickedEventArgs , VectorChangedEventArgs , ElementFactoryGetArgsDownlevel , ItemsRepeaterElementPreparedEventArgs , VirtualizationInfo
  • IndexBasedLayoutOrientation() : Layout
  • IndexFromContainer() : TabView
  • IndexFromIndexInOriginalVector() : SplitVector< T, SplitVectorID >
  • IndexFromKey() : CustomItemsSourceWithUniqueId , CustomItemsSourceViewWithUniqueIdMapping , MockItemsSourceWithUniqueIdMapping , ReadOnlyNotifyPropertyChangedCollection-g< T > , InspectingDataSourceTests::ObservableVectorWithUniqueIds , IKeyIndexMapping , ItemsSourceView , MyCollection
  • IndexFromKeyCore() : CustomItemsSourceViewWithUniqueIdMapping , InspectingDataSource , ItemsSourceView
  • IndexInParent() : TreeViewList
  • IndexOf() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitVector< T, SplitVectorID > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , TopNavigationViewDataProvider , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , ItemsSourceView , SelectedItems< T > , MyCollection , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems , ViewModel
  • IndexOf_OptimizedForRemove() : VectorInnerImpl< VectorOptions, Wrapper > , SelectedTreeNodeVector , SelectedItemsVector
  • IndexOfCore() : InspectingDataSource , ItemsSourceView
  • IndexOfImpl() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • IndexOfNextSibling() : ViewModel
  • IndexOfNode() : ViewModel
  • IndexPath() : IndexPath , final
  • IndexRange() : IndexRange
  • IndexToIndexInOriginalVector() : SplitVector< T, SplitVectorID >
  • Indicator_SizeChanged() : ProgressBarPage , ProgressBarReTemplatePage
  • IndicatorLengthDelta() : ProgressBarTemplateSettingsProperties
  • IndicatorLengthDeltaProperty() : ProgressBarTemplateSettingsProperties
  • InertiaDecayRate() : OffsetsChangeWithAdditionalVelocity , ScrollControllerAddScrollVelocityRequestedEventArgs , ZoomFactorChangeWithAdditionalVelocity
  • InertiaStateEntered() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • Influence() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • InfoBadge() : NavigationViewItemProperties , NavigationViewItemPresenterProperties , InfoBadge
  • InfoBadgeCornerRadius() : InfoBadgeTemplateSettingsProperties
  • InfoBadgeCornerRadiusProperty() : InfoBadgeTemplateSettingsProperties
  • InfoBadgeDisplayKindTest() : InfoBadgeTests
  • InfoBadgePage() : InfoBadgePage
  • InfoBadgeProperties() : InfoBadgeProperties
  • InfoBadgeProperty() : NavigationViewItemProperties , NavigationViewItemPresenterProperties
  • InfoBadgeSupportsAllIconTypes() : InfoBadgeTests
  • InfoBadgeTemplateSettings() : InfoBadgeTemplateSettings
  • InfoBadgeTemplateSettingsProperties() : InfoBadgeTemplateSettingsProperties
  • InfoBadgeValueLessThanNegativeOneCrashes() : InfoBadgeTests
  • InfoBar() : InfoBar
  • InfoBarAutomationPeer() : InfoBarAutomationPeer
  • InfobarAxeTestage() : InfobarAxeTestage
  • InfoBarPage() : InfoBarPage
  • InfoBarPanelProperties() : InfoBarPanelProperties
  • InfoBarProperties() : InfoBarProperties
  • InfoBarTemplateSettings() : InfoBarTemplateSettings
  • InfoBarTemplateSettingsProperties() : InfoBarTemplateSettingsProperties
  • InfoProvider() : RefreshVisualizer
  • InfoProvider_RefreshCompleted() : ImageIRefreshInfoProviderAdapter
  • InfoProvider_RefreshStarted() : ImageIRefreshInfoProviderAdapter
  • InfoProviderProperty() : RefreshVisualizerProperties
  • Ingredient() : Ingredient
  • Init() : NavigationViewItemHelper< T >
  • InitialControls() : InkToolBarProperties , InkToolBar
  • InitialControlsProperty() : InkToolBarProperties
  • Initialize() : BreadcrumbBarItem , ColorSpectrum , ColorPickerSlider , XamlMetadataProvider , DropDownButton , Expander , SelectionModelChildrenRequestedEventArgs
  • InitializeBreadcrumbAndChildren() : BreadcrumbBarPage
  • InitializeButtonWithProperties() : TextCommandBarFlyout
  • InitializeButtonWithUICommand() : TextCommandBarFlyout
  • InitializeCollection() : MyCollection
  • InitializeColor() : ColorPicker
  • InitializeDataBindingSampleData() : TabViewTabItemsSourcePage
  • InitializeForContext() : FlowLayoutAlgorithm , FlowLayoutState , Layout , StackLayoutState , UniformGridLayoutState
  • InitializeForContextCore() : FlowLayoutDerived , FlowLayout , LinedFlowLayout , NonVirtualizingLayout , StackLayout , Flex , ActivityFeedLayout , UniformGridLayout , VirtualizingLayout
  • InitializeForRelayout() : LinedFlowLayout
  • InitializeImpl() : RevealHoverLight
  • InitializeInteractionTracker() : SwipeControl
  • InitializeItemsSource_Click() : TreeViewLateDataInitTest
  • InitializeSampleTreeView() : VisualPropertiesPage
  • InitializeSplitVectors() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • InitializeUIFromScrollPresenter() : ScrollPresenterChainingAndRailingPage
  • InitializeUIFromScrollViewer() : ScrollPresenterChainingAndRailingPage
  • InitializeWebMap() : MapControl
  • InitialPanePriorityTest() : TwoPaneViewTests
  • Initials() : PersonPictureProperties
  • InitialSetValue() : RatingControlProperties
  • InitialSetValueProperty() : RatingControlProperties
  • InitialsFromContactObject() : InitialsGenerator
  • InitialsFromDisplayName() : InitialsGenerator
  • InitialsProperty() : PersonPictureProperties
  • InitialTextBox_TextChanged() : PersonPicturePage
  • InitProvider() : WebView2AutomationPeer
  • InkCanvas() : InkCanvas
  • InkCanvasAutomationPeer() : InkCanvasAutomationPeer
  • InkCanvasProperties() : InkCanvasProperties
  • InkDrawingAttributes() : InkToolBarProperties , InkToolBar
  • InkDrawingAttributesChanged() : InkToolBarProperties
  • InkDrawingAttributesProperty() : InkToolBarProperties
  • InkPresenter() : InkCanvas
  • InkToolBarAutomationPeer() : InkToolBarAutomationPeer
  • InkToolBarCustomPenButtonProperties() : InkToolBarCustomPenButtonProperties
  • InkToolBarCustomToolButtonProperties() : InkToolBarCustomToolButtonProperties
  • InkToolBarEraserButtonProperties() : InkToolBarEraserButtonProperties
  • InkToolBarFlyoutItemAutomationPeer() : InkToolBarFlyoutItemAutomationPeer
  • InkToolBarFlyoutItemProperties() : InkToolBarFlyoutItemProperties
  • InkToolBarMenuButtonAutomationPeer() : InkToolBarMenuButtonAutomationPeer
  • InkToolBarMenuButtonProperties() : InkToolBarMenuButtonProperties
  • InkToolbarPage() : InkToolbarPage
  • InkToolBarPenButtonProperties() : InkToolBarPenButtonProperties
  • InkToolBarPenConfigurationControlProperties() : InkToolBarPenConfigurationControlProperties
  • InkToolBarProperties() : InkToolBarProperties
  • InkToolBarStencilButtonProperties() : InkToolBarStencilButtonProperties
  • InkToolbarTest() : CommonStylesTests
  • InkToolBarToolButtonAutomationPeer() : InkToolBarToolButtonAutomationPeer
  • InkToolBarToolButtonProperties() : InkToolBarToolButtonProperties
  • InputEaterGridTapped() : SwipeControl
  • InputScope() : NumberBoxProperties
  • InputScope_Changed() : NumberBoxPage
  • InputScopeProperty() : NumberBoxProperties
  • Insert() : HashMap< K, V > , CustomItemsSource , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , final , CollectionChangeDemo::MyDataSource , MyCollection , ScrollPresenterTests::TestDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ScrollPresenterStackPanelAnchoringPage
  • Insert_Click() : VirtualizingUniformStackLayoutSamplePage
  • insert_Click() : FlatSample , TreeViewSample
  • InsertAndRemoveItems() : ItemsViewTestsWithInputHelper
  • InsertAt() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitVector< T, SplitVectorID > , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • InsertAt_NoContainsCheck() : SelectedItemsVector
  • InsertAtCore_NoContainsCheck() : SelectedTreeNodeVector
  • InsertAtStartBehavior() : RepeaterTests
  • InsertButtonClick() : RefreshVisualizerPage
  • InsertChild() : LinedFlowLayoutDemo
  • InsertDisabledRadioButton() : RadioButtonsTests
  • InsertDisplayRadioButtonButton_Click() : RadioButtonsPage
  • InsertedCheckedRadioButtonGetsSelection() : RadioButtonsTests
  • InsertEnabledRadioButton() : RadioButtonsTests
  • InsertGridButtonClick() : RefreshVisualizerPage
  • InsertItem() : ItemsViewInteractiveTestsPage
  • InsertRadioButton() : RadioButtonsTests
  • InsertStackPanelChild() : ScrollPresenterTests
  • InsertVisual() : AnimatedIcon
  • InsetClip_0() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • Instance() : LifetimeHandler
  • InstantiateFlyout() : BreadcrumbBarItem
  • Intensity() : ISepiaEffect
  • InteractingStateEntered() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • InteractionChainingModeFromChainingMode() : ScrollPresenter
  • InteractionOnImageTest() : RefreshContainerTests
  • InteractionOnImageTestPrivate() : RefreshContainerTests
  • InteractionOnImageWithInfoProviderTest() : RefreshContainerTests
  • InteractionRatio() : RefreshInteractionRatioChangedEventArgs
  • InteractionRatioChanged() : RefreshInfoProviderImpl
  • InteractionRatioCompositionProperty() : RefreshInfoProviderImpl
  • InteractionSourceModeFromScrollMode() : ScrollPresenter
  • InteractionSourceModeFromZoomMode() : ScrollPresenter
  • InteractionSources() : ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
  • InteractionSourcesChanged() : ScrollPresenterTestHooks
  • InteractionState() : TeachingTipAutomationPeer
  • InteractionTrackerAnimation() : AnimationHandler , IAdapterAnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • InteractionTrackerAsyncOperation() : InteractionTrackerAsyncOperation
  • InteractionTrackerOwner() : InteractionTrackerOwner
  • InteractionTrigger() : ItemContainerInvokedEventArgs
  • InteractiveControlsVisible() : MapControlProperties
  • InteractiveControlsVisibleProperty() : MapControlProperties
  • InternalIsChecked() : SplitButton , ToggleSplitButton
  • InterpolationMode() : ITransform2DEffect
  • InterpolationSpace() : RadialGradientBrushProperties
  • InterpolationSpaceProperty() : RadialGradientBrushProperties
  • InterruptOffsetsChangeWithOffsetsChange() : ScrollPresenterTests
  • InterruptOffsetsChangeWithZoomFactorChange() : ScrollPresenterTests
  • InterruptViewChange() : ScrollPresenterTests
  • InterruptViewChangeWithUnloading() : ScrollPresenterTests
  • InterruptZoomFactorChangeWithOffsetsChange() : ScrollPresenterTests
  • InterruptZoomFactorChangeWithZoomFactorChange() : ScrollPresenterTests
  • Intersects() : final , IndexRange , VirtualizingStackLayout
  • Interval() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • invalid() : Awaitable::PTP_WAIT_traits
  • Invalidate() : HandlePolicy
  • InvalidateArrange() : Layout
  • InvalidateArrangeForLayout() : LayoutPanel , ItemsRepeater
  • InvalidateBrush() : MonochromaticOverlayPresenter
  • InvalidateElementSize() : UniformGridLayoutState
  • InvalidateItemsInfo() : LinedFlowLayout
  • InvalidateLayout() : FlowLayout , LinedFlowLayout , StackLayout , UniformGridLayout
  • InvalidateMeasure() : MockNonVirtualizingLayout , MockStackLayout , MockVirtualizingLayout , Layout
  • InvalidateMeasureAsync() : LinedFlowLayout
  • InvalidateMeasureForLayout() : LayoutPanel , ItemsRepeater
  • InvalidateMeasureTimerStart() : LinedFlowLayout
  • InvalidateMeasureTimerStop() : LinedFlowLayout
  • InvalidateMeasureTimerTick() : LinedFlowLayout
  • InvalidateRealizedIndicesHeldByLayout() : final
  • InvalidateTopNavPrimaryLayout() : NavigationView
  • InvalidationTrigger() : LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
  • InvalidWidthCache() : TopNavigationViewDataProvider
  • InvertSelection() : ItemsView
  • Invoke() : BreadcrumbBarItemAutomationPeer , BreadcrumbBarItem , GenericInkCallback , ItemContainerAutomationPeer , MenuBarItem , MenuBarItemAutomationPeer , NavigationViewItemAutomationPeer , SplitButton , SplitButtonAutomationPeer , CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
  • InvokeAndWait() : BreadcrumbBarItem
  • InvokeCallback() : CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
  • Invoked() : ButtonInteractionProperties , SwipeItemProperties
  • InvokedItem() : ItemsViewItemInvokedEventArgs , NavigationViewItemInvokedEventArgs , TreeViewItemInvokedEventArgs
  • InvokedItemContainer() : NavigationViewItemInvokedEventArgs
  • InvokeDropDownItemTest() : BreadcrumbTests
  • InvokeEllipsisItem() : BreadcrumbTests
  • InvokeEllipsisItemTest() : BreadcrumbTests
  • InvokeItem() : RadioMenuFlyoutItemTests
  • InvokeMode() : ButtonInteraction
  • InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement() : NavigationViewTestsBase
  • InvokeOverflowButton() : NavigationViewTestsBase
  • InvokeScrollViewScrollToButton() : ItemsViewTestsWithInputHelper
  • InvokeScrollViewZoomToButton() : ItemsViewTestsWithInputHelper
  • InvokeSubItem() : RadioMenuFlyoutItemTests
  • InvokeSwipe() : SwipeItem
  • InvokeWorkFunc() : WorkInfo
  • IsActive() : ProgressRingProperties
  • IsActiveProperty() : ProgressRingProperties
  • IsAddTabButtonVisible() : TabViewProperties
  • IsAddTabButtonVisibleProperty() : TabViewProperties
  • IsAlphaEnabled() : ColorPickerProperties
  • IsAlphaEnabledProperty() : ColorPickerProperties
  • IsAlphaSliderVisible() : ColorPickerProperties
  • IsAlphaSliderVisibleProperty() : ColorPickerProperties
  • IsAlphaTextInputVisible() : ColorPickerProperties
  • IsAlphaTextInputVisibleProperty() : ColorPickerProperties
  • IsAmbientLightSet() : RevealBrushTestApi
  • IsAncestor() : SharedHelpers
  • IsAnchoring() : ScrollPresenter
  • IsAnchorRatioValid() : ScrollPresenter
  • IsAnimated() : InteractionTrackerAsyncOperation
  • IsAnimatedVisualLoaded() : AnimatedVisualPlayerProperties
  • IsAnimatedVisualLoadedProperty() : AnimatedVisualPlayerProperties
  • IsAnimationsEnabled() : SharedHelpers
  • IsAnimationsEnabledOverride() : ScrollPresenterTestHooks
  • IsApiContractPresent() : PlatformConfiguration
  • IsApplicationViewGetDisplayRegionsAvailable() : SharedHelpers
  • IsArray() : XamlTypeBase
  • IsAttachable() : XamlMember
  • IsBackButtonVisible() : NavigationViewProperties , TitleBarProperties
  • IsBackButtonVisibleCheckBox_CheckedChanged() : TitleBarPageWindow
  • IsBackButtonVisibleProperty() : NavigationViewProperties , TitleBarProperties
  • IsBackEnabled() : NavigationViewProperties , TitleBarProperties
  • IsBackEnabledCheckBox_CheckedChanged() : TitleBarPageWindow
  • IsBackEnabledProperty() : NavigationViewProperties , TitleBarProperties
  • IsBeingDragged() : TabViewItem
  • IsBindable() : XamlTypeBase
  • IsBorderLightSet() : RevealBrushTestApi
  • IsBringIntoViewOptionsVerticalAlignmentRatioAvailable() : SharedHelpers
  • IsButtonInPrimaryCommands() : TextCommandBarFlyout
  • IsButtonVisible() : PipsPagerPage
  • IsCanceled() : InteractionTrackerAsyncOperation
  • IsCancelingNavigationKey() : ItemsView
  • IsChecked() : InkToolBarFlyoutItemProperties , RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties , InkToolBarFlyoutItem
  • IsCheckedChanged() : ToggleSplitButtonProperties , RadioMenuFlyoutItemPage
  • IsCheckedProperty() : InkToolBarFlyoutItemProperties , RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties
  • IsChildSelected() : NavigationViewItemProperties
  • IsChildSelectedProperty() : NavigationViewItemProperties
  • IsClearAllVisible() : InkToolBarEraserButtonProperties , InkToolBarEraserButton
  • IsClearAllVisibleProperty() : InkToolBarEraserButtonProperties
  • IsClearEnabled() : RatingControlProperties
  • IsClearEnabledProperty() : RatingControlProperties
  • IsClosable() : InfoBarProperties , TabViewItemProperties
  • IsClosableCheckBox_CheckChanged() : TabViewPage
  • IsClosableProperty() : InfoBarProperties , TabViewItemProperties
  • IsClosableTest() : InfoBarTests , TabViewTests
  • IsCollection() : XamlTypeBase
  • IsColorChannelTextInputVisible() : ColorPickerProperties
  • IsColorChannelTextInputVisibleProperty() : ColorPickerProperties
  • IsColorPreviewVisible() : ColorPickerProperties
  • IsColorPreviewVisibleProperty() : ColorPickerProperties
  • IsColorSliderVisible() : ColorPickerProperties
  • IsColorSliderVisibleProperty() : ColorPickerProperties
  • IsColorSpectrumVisible() : ColorPickerProperties
  • IsColorSpectrumVisibleProperty() : ColorPickerProperties
  • IsCompleted() : InteractionTrackerAsyncOperation
  • IsConstructible() : XamlTypeBase
  • IsContainerNavigationViewHeader() : TopNavigationViewDataProvider
  • IsContainerNavigationViewItem() : TopNavigationViewDataProvider
  • IsContainerTheSelectedItemInTheSelectionModel() : NavigationView
  • IsContentMode() : TreeViewList , TreeViewNode , ViewModel
  • IsControlFocusable() : CommandBarFlyoutCommandBar
  • IsCoreWindowActivationModeAvailable() : SharedHelpers
  • IsCorrectPeerForHwnd() : WebView2AutomationPeer
  • IScrollControllerAdapter() : IScrollControllerAdapter
  • IsCurrentPlay() : AnimatedVisualPlayer::final
  • IsDataIndexRealized() : final
  • IsDataIndexValid() : VirtualizingStackLayout
  • IsDebugBuildConfiguration() : PlatformConfiguration
  • IsDebuggerPresent() : ScrollViewTests
  • IsDelayed() : InteractionTrackerAsyncOperation
  • IsDependencyProperty() : XamlMember
  • isDetailLabelEnabled_Checked() : AnnotatedScrollBarSummaryPage
  • isDetailLabelEnabled_Unchecked() : AnnotatedScrollBarSummaryPage
  • IsDevice() : PlatformConfiguration
  • IsDictionary() : XamlTypeBase
  • IsDirectionalKey() : TreeViewItem
  • IsDisabledTabVisibleCheckBox_CheckChanged() : TabViewPage
  • IsEdgeAlreadyInstalling() : WebView2Tests
  • IsElementValidAnchor() : ScrollPresenter
  • IsEllipsisDropDownItem() : BreadcrumbBarItem
  • IsEmpty() : LinedFlowLayoutItemAspectRatios
  • IsEnabled() : InkCanvasProperties
  • IsEnabledComboBox_SelectionChanged() : ItemContainerSummaryPage
  • IsEnabledProperty() : InkCanvasProperties
  • IsEqual() : SimpleVerify
  • IsExpandCollapse() : TreeViewItem
  • IsExpanded() : ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties
  • IsExpandedIsProperlyPreservedDuringItemRecycling() : TreeViewTests
  • IsExpandedProperty() : ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties
  • IsExpressionAnimationStarted() : ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
  • IsExtensionGlyphShown() : InkToolBarMenuButtonProperties , InkToolBarToolButtonProperties , InkToolBarMenuButton , InkToolBarToolButton
  • IsExtensionGlyphShownProperty() : InkToolBarMenuButtonProperties , InkToolBarToolButtonProperties
  • isFarOpenPropertyName() : SwipeControl
  • IsFastPathSupportedDbg() : LinedFlowLayout
  • IsFlatIndexValid() : TreeViewList
  • IsFlyoutOpen() : SplitButton , DropDownButton , MenuBar , MenuBarItem
  • IsFocusable() : TabView
  • IsFocusableElement() : SharedHelpers
  • IsFocusMessage() : WebView2BasicPage
  • IsFullScreenOrTabletMode() : NavigationView
  • IsFullScreenOrTabletModeImpl() : MaterialHelper
  • IsGamepadNavigationDirection() : FocusHelper
  • IsGamepadPageNavigationDirection() : FocusHelper
  • IsGroup() : PersonPictureProperties
  • IsGroupProperty() : PersonPictureProperties
  • IsHeldByLayout() : VirtualizationInfo
  • IsHexInputVisible() : ColorPickerProperties
  • IsHexInputVisibleProperty() : ColorPickerProperties
  • IsHorizontallyScrollable() : ScrollPresenter , ItemsRepeaterScrollHost
  • isHorizontalPropertyName() : SwipeControl
  • IsHorizontalScrollControllerRequest() : InteractionTrackerAsyncOperation
  • IsHorizontalShiftClamped() : ParallaxViewProperties
  • IsHorizontalShiftClampedProperty() : ParallaxViewProperties
  • IsHovering() : ButtonInteraction
  • IsHoverLightSet() : RevealBrushTestApi
  • IsIconVisible() : InfoBarProperties
  • IsIconVisibleProperty() : InfoBarProperties
  • IsInBounds() : ProgressRing , NumberBox
  • IsInContentMode() : TreeViewPage , TreeViewItem
  • IsInDesignMode() : SharedHelpers
  • IsInDesignModeV1() : SharedHelpers
  • IsInDesignModeV2() : SharedHelpers
  • IsIndeterminate() : ProgressBarProperties , ProgressRingProperties
  • IsIndeterminateProperty() : ProgressBarProperties , ProgressRingProperties
  • IsIndexValid() : TreeViewList
  • IsIndexValidInData() : final
  • IsInertiaFromImpulse() : ScrollPresenter
  • IsInFallbackMode() : RevealBrush , AcrylicBrush , RevealBrushTestApi
  • IsInFrameworkPackage() : SharedHelpers
  • IsInitialized() : MUXControlsFactory
  • IsInMultipleRegions() : TwoPaneView
  • IsInNavigationViewOwnedRepeater() : NavigationViewItemBase
  • IsInPinnedPool() : VirtualizationInfo
  • IsInputKindIgnored() : ScrollPresenter , ScrollView
  • IsInReorderMode() : TreeViewItem
  • IsInSingleSelectionMode() : ViewModel
  • IsInteractingForRefresh() : RefreshInfoProviderImpl
  • IsInteractingForRefreshChanged() : RefreshInfoProviderImpl
  • IsInUniqueIdResetPool() : VirtualizationInfo
  • IsItemContainerSelected() : ItemContainerTests
  • IsItemInfoPresentAndFontInfo() : RatingControl
  • IsItemInfoPresentAndImageInfo() : RatingControl
  • IsItemInPrimaryList() : TopNavigationViewDataProvider
  • IsItemInTopNavPrimaryList() : NavigationViewTestsBase
  • IsItemInvokedEnabled() : ItemsViewProperties
  • IsItemInvokedEnabledProperty() : ItemsViewProperties
  • IsItemItsOwnContainerOverride() : TabViewListView
  • IsItemSelectableInPrimaryList() : TopNavigationViewDataProvider
  • IsItemsLayoutContractionWorthy() : LinedFlowLayout
  • IsItemsLayoutEqualizationWorthy() : LinedFlowLayout
  • IsItemsLayoutExpansionWorthy() : LinedFlowLayout
  • IsKeyboardFocusableCore() : ExpanderAutomationPeer
  • IsLayoutOrientationIndexBased() : ItemsView
  • IsLeftToRightChecked() : AnimatedIconPage
  • IsLeftToRightUnchecked() : AnimatedIconPage
  • IsLightDismissEnabled() : TeachingTipProperties
  • IsLightDismissEnabledProperty() : TeachingTipProperties
  • IsLightDismissible() : NavigationView
  • IsLoadedAndSetUp() : ScrollPresenter
  • IsLockedItem() : LinedFlowLayout
  • IsMarkupExtension() : XamlTypeBase
  • IsModal() : TeachingTipAutomationPeer
  • IsMoreButtonVisible() : ColorPickerProperties
  • IsMoreButtonVisibleProperty() : ColorPickerProperties
  • IsMouseButtonPressed() : PointerInfo< T >
  • IsMouseModeEnabled() : SharedHelpers
  • IsMousePointerOver() : PointerInfo< T >
  • IsMultiselect() : TreeViewList , TreeViewListAutomationPeer
  • IsMultiSelectCheckBoxChecked() : TreeViewTests
  • IsMultiSelectComboBox_SelectionChanged() : ItemContainerSummaryPage
  • IsMutiSelectWithSelectedItems() : TreeViewList
  • IsNavigationKey() : ItemsView
  • IsNavigationViewListSingleSelectionFollowsFocus() : NavigationView
  • isNearContentPropertyName() : SwipeControl
  • isNearOpenPropertyName() : SwipeControl
  • IsNodeSelected() : ViewModel
  • IsOnFooterNavigation() : NavigationViewItemAutomationPeer
  • IsOnLeftNav() : NavigationViewItem
  • IsOnThread() : ReferenceTracker< D, ImplT, I >
  • IsOnTopNavigation() : NavigationViewItemAutomationPeer
  • IsOnTopNavigationOverflow() : NavigationViewItemAutomationPeer
  • IsOnTopPrimary() : NavigationViewItem
  • IsOnXbox() : SharedHelpers
  • IsOnXboxAndNotMouseMode() : RevealBrush
  • IsOpen() : TeachingTipProperties , InfoBarProperties , TeachingTipProperties
  • IsOpenChangedToClose() : TeachingTip
  • IsOpenChangedToOpen() : TeachingTip
  • IsOpenProperty() : InfoBarProperties , TeachingTipProperties
  • IsOrientationVertical() : AnimationHandler , ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler , ScrollViewerIRefreshInfoProviderAdapter
  • IsOsVersion() : PlatformConfiguration
  • IsOsVersionGreaterThan() : PlatformConfiguration
  • IsOsVersionGreaterThanOrEqual() : PlatformConfiguration
  • IsOSVersionLessThan() : PlatformConfiguration
  • IsOutOfControlBounds() : NavigationViewItem , PipsPager
  • IsOutOfVerticalGridBounds() : AnnotatedScrollBar
  • IsOutsideDragRectangle() : TabViewItem
  • IsOverlay() : NavigationView
  • IsPaneFooterVisibleCheckBox_CheckedChanged() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage
  • IsPaneOpen() : NavigationViewProperties
  • IsPaneOpenProperty() : NavigationViewProperties
  • IsPaneToggleButtonVisible() : NavigationViewProperties , TitleBarProperties , NavigationViewProperties
  • IsPaneToggleButtonVisibleCheckbox_CheckedChanged() : TitleBarPageWindow
  • IsPaneToggleButtonVisibleProperty() : NavigationViewProperties , TitleBarProperties
  • IsPaneToggleButtonVisibleTest() : CommonTests
  • IsPaneVisible() : NavigationViewProperties
  • IsPaneVisibleProperty() : NavigationViewProperties
  • IsPenPointerOver() : PointerInfo< T >
  • IsPhoneDevice() : TreeViewTests
  • IsPinned() : VirtualizationInfo
  • IsPlacementBottom() : TeachingTip
  • IsPlacementLeft() : TeachingTip
  • IsPlacementRight() : TeachingTip
  • IsPlacementTop() : TeachingTip
  • IsPlaying() : AnimatedVisualPlayerProperties
  • IsPlayingProperty() : AnimatedVisualPlayerProperties
  • IsPointerIdTracked() : PointerInfo< T >
  • IsPointerOver() : PointerInfo< T >
  • IsPopupOpenDown() : AutoSuggestBoxHelper , ComboBoxHelper
  • IsPressed() : PointerInfo< T >
  • IsPressing() : ButtonInteraction
  • IsProcessingCollectionChange() : ItemsRepeater
  • IsProtractorItemVisible() : InkToolBarStencilButtonProperties , InkToolBarStencilButton
  • IsProtractorItemVisibleProperty() : InkToolBarStencilButtonProperties
  • IsPullDirectionFar() : RefreshVisualizer
  • IsPullDirectionVertical() : RefreshVisualizer
  • IsQueued() : InteractionTrackerAsyncOperation
  • IsRailEnabled() : AnnotatedScrollBarPanningInfo
  • IsReadOnly() : ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer , XamlMember , RatingControlProperties , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , ValueProviderThunk< Owner > , RatingControlAutomationPeer , RatingControlProperties
  • IsReadOnlyProperty() : RatingControlProperties
  • IsRealized() : TreeViewItem , VirtualizationInfo , VirtualizingStackLayout
  • IsReflowRequired() : FlowLayoutAlgorithm
  • IsRelativeBoundsSet() : ItemsRepeaterScrollHost::CandidateInfo
  • IsRepeaterVisible() : NavigationViewItem
  • IsResourceIdNull() : sealed< T, fallback, RawStorageT >
  • IsRootGridOfFlyout() : NavigationView
  • IsRootItemsRepeater() : NavigationView
  • IsRTLCheckBox_Checked() : CommandBarFlyoutPage
  • IsRTLCheckBox_Unchecked() : CommandBarFlyoutPage
  • IsRulerButtonChecked() : InkToolBarProperties , InkToolBar
  • IsRulerButtonCheckedProperty() : InkToolBarProperties
  • IsRulerItemVisible() : InkToolBarStencilButtonProperties , InkToolBarStencilButton
  • IsRulerItemVisibleProperty() : InkToolBarStencilButtonProperties
  • IsRuntimeCompatible() : ProgressRingDeterminate , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • IsScrollContentPresenterIScrollInfoProvider() : ScrollInputHelper
  • IsScrollControllersSeparatorVisible() : ScrollView
  • IsScrollDecreaseButtonEnabled() : TabViewTests
  • IsScrollIncreaseButtonEnabled() : TabViewTests
  • IsScrollingWithMouse() : AnnotatedScrollBar , ScrollBarController
  • IsScrollingWithMouseChanged() : AnnotatedScrollBar , ScrollBarController
  • IsSelected() : NavigationViewItemAutomationPeer , TreeViewList , SelectionModel , ItemsView , NavigationViewItemBaseProperties , ItemContainerProperties , ItemContainerAutomationPeer , SelectionModel , final , TreeViewItemAutomationPeer , NavigationViewItemBaseProperties , SelectorBase , TabViewItemAutomationPeer
  • IsSelectedAt() : SelectionModel
  • IsSelectedComboBox_SelectionChanged() : ItemContainerSummaryPage
  • IsSelectedInternal() : TreeViewItem
  • IsSelectedProperty() : ItemContainerProperties , NavigationViewItemBaseProperties
  • IsSelectedWithPartial() : final
  • IsSelectionRequired() : PagerControlAutomationPeer , TabViewAutomationPeer , NavigationViewAutomationPeer , ItemsViewAutomationPeer , PipsPagerAutomationPeer , TreeViewListAutomationPeer
  • IsSelectionSuppressed() : NavigationView
  • IsSettingsEnabledCheckbox_Checked() : PaneLayoutTestPage
  • IsSettingsEnabledCheckbox_UnChecked() : PaneLayoutTestPage
  • IsSettingsInvoked() : NavigationViewItemInvokedEventArgs
  • IsSettingsItem() : NavigationView , NavigationViewItemAutomationPeer
  • IsSettingsSelected() : NavigationViewSelectionChangedEventArgs
  • IsSettingsVisible() : NavigationViewProperties
  • IsSettingsVisibleCheckbox_CheckedChanged() : NavigationViewCompactPaneLengthTestPage
  • IsSettingsVisibleProperty() : NavigationViewProperties
  • IsSettingsVisibleTest() : CommonTests
  • IsStencilButtonChecked() : InkToolBar , InkToolBarProperties , InkToolBar
  • IsStencilButtonCheckedChanged() : InkToolBarProperties
  • IsStencilButtonCheckedProperty() : InkToolBarProperties
  • IsStrokeEraserVisible() : InkToolBarEraserButton , InkToolBarEraserButtonProperties
  • IsStrokeEraserVisibleProperty() : InkToolBarEraserButtonProperties
  • IsSubSet() : SelectionTreeHelper
  • IsSundayBlackedOut_Checked() : CalendarViewPage
  • IsSundayBlackedOut_Unchecked() : CalendarViewPage
  • IsTargetElementInSource() : ScrollInputHelper
  • IsTargetProperty() : XamlAmbientLightProperties
  • IsTitleBarAutoPaddingEnabled() : NavigationViewProperties
  • IsTitleBarAutoPaddingEnabledCheckbox_Checked() : NavigationViewCustomThemeResourcesPage , NavigationViewPage
  • IsTitleBarAutoPaddingEnabledCheckbox_Unchecked() : NavigationViewCustomThemeResourcesPage , NavigationViewPage
  • IsTitleBarAutoPaddingEnabledProperty() : NavigationViewProperties
  • IsTodayBlackedOut_Checked() : CalendarViewPage
  • IsTodayBlackedOut_Unchecked() : CalendarViewPage
  • IsTopLevelItem() : NavigationView , NavigationViewItemBase
  • IsTopmost() : TeachingTipAutomationPeer
  • IsTopNavigationView() : NavigationView
  • IsTopPrimaryListVisible() : NavigationView
  • IsTouchPointerOver() : PointerInfo< T >
  • IsTrackingPointer() : PointerInfo< T >
  • IsTransientTapTest() : WebView2BasicPage
  • IsTransientWebMessage() : WebView2BasicPage
  • IsTranslationFacadeAvailableForSwipeControl() : SwipeControl
  • IsTrue() : SharedHelpers , SimpleVerify
  • IsUnqueueing() : InteractionTrackerAsyncOperation
  • IsUsingAcrylicBrush() : AcrylicTestApi , AcrylicBrushTests
  • IsValid() : IndexPath , AutoHandle< THandlePolicy > , HandlePolicy
  • IsValidIndex() : final
  • IsValidWidth() : TopNavigationViewDataProvider
  • IsValidWidthForItem() : TopNavigationViewDataProvider
  • IsVerboseLevel() : MUXControlsTestHooksLoggingMessageEventArgs
  • IsVerticallyScrollable() : ScrollPresenter , ItemsRepeaterScrollHost
  • IsVerticalScrollControllerRequest() : InteractionTrackerAsyncOperation
  • IsVerticalShiftClamped() : ParallaxViewProperties
  • IsVerticalShiftClampedProperty() : ParallaxViewProperties
  • IsVirtualizationEnabled() : StackLayoutProperties
  • IsVirtualizationEnabledProperty() : StackLayoutProperties
  • IsVirtualizingContext() : LinedFlowLayout , final , FlowLayoutAlgorithm
  • IsVisible() : NavigationView
  • IsVisibleBooleanAnimation_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_00() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_01() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_02() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_03() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_04() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_05() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_06() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_07() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_08() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_09() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_10() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_11() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_12() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_13() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_14() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_15() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_16() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_17() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_18() : AnimatedAcceptVisualSource_AnimatedVisual
  • IsVisibleBooleanAnimation_2() : AnimatedSettingsVisualSource_AnimatedVisual
  • IsVisibleCheckBox_CheckChanged() : ProgressBarPage
  • IsVisiblityTest() : WebView2BasicPage
  • IsW2CenterPointMessage() : WebView2BasicPage
  • IsWindowConnected() : final
  • IsWithinOffsetThreshold() : ScrollViewerIRefreshInfoProviderAdapter
  • IsWrapEnabled() : NumberBoxProperties , PipsPager
  • IsWrapEnabledProperty() : NumberBoxProperties
  • IsZoomFactorBoundaryValid() : ScrollPresenter
  • Item() : BreadcrumbBarItemClickedEventArgs , TabViewTabCloseRequestedEventArgs , TabViewTabDroppedOutsideEventArgs , TabViewTabDragCompletedEventArgs , TreeViewExpandingEventArgs , TabViewTabDragStartingEventArgs , BreadcrumbBarItemClickedEventArgs , TreeViewCollapsedEventArgs
  • Item_DragEnter() : TreeViewPage
  • ItemAspectRatioBlock() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • ItemChangedEventOnDragTest() : TabViewTests
  • ItemClicked() : BreadcrumbBarProperties
  • ItemCollectionTransition() : ItemCollectionTransition
  • ItemCollectionTransitionCompletedEventArgs() : ItemCollectionTransitionCompletedEventArgs
  • ItemCollectionTransitionProgress() : ItemCollectionTransitionProgress
  • ItemCollectionTransitionProviderProperties() : ItemCollectionTransitionProviderProperties
  • ItemContainer() : ItemContainer
  • ItemContainer_DragStartingLog() : ItemsViewIntegrationPage
  • ItemContainerAutomationPeer() : ItemContainerAutomationPeer
  • ItemContainerCanUserSelect() : ItemContainerTests
  • ItemContainerInvokedEventArgs() : ItemContainerInvokedEventArgs
  • ItemContainerLayoutPage() : ItemContainerLayoutPage
  • ItemContainerLayoutPage_Loaded() : ItemContainerLayoutPage
  • ItemContainerPage() : ItemContainerPage
  • ItemContainerProperties() : ItemContainerProperties
  • ItemContainerStyle() : TreeViewProperties
  • ItemContainerStyleProperty() : TreeViewProperties
  • ItemContainerStyleSelector() : TreeViewProperties
  • ItemContainerStyleSelectorProperty() : TreeViewProperties
  • ItemContainerSummaryPage() : ItemContainerSummaryPage
  • ItemContainerSummaryPage_Loaded() : ItemContainerSummaryPage
  • ItemContainerTransitions() : TreeViewProperties
  • ItemContainerTransitionsProperty() : TreeViewProperties
  • ItemCount() : VirtualizingLayoutContext
  • ItemCountCore() : RepeaterLayoutContext , LayoutContextAdapter , VirtualizingLayoutContext
  • ItemFromContainer() : TabView , TreeView
  • ItemFromNode() : TreeViewList
  • ItemHasSelectionIndicator() : NavigationViewTests
  • ItemIndex() : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • ItemInfo() : RatingControlProperties
  • ItemInfoProperty() : RatingControlProperties
  • ItemInvoked() : ItemsViewProperties , TreeViewProperties , NavigationViewProperties , ItemContainerProperties , TreeViewProperties , ItemsViewProperties
  • ItemInvokedCount() : ItemsViewTestsWithInputHelper
  • ItemRangesHaveNewDesiredWidths() : LinedFlowLayout
  • Items() : RadioButtonsProperties , TabViewExternalTornOutTabsDroppedEventArgs , TreeViewDragItemsCompletedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs , TabViewTabTearOutRequestedEventArgs , TabViewTabTearOutWindowRequestedEventArgs , SelectorBarProperties , RadioButtonsProperties , MenuBarProperties , MenuBarItemProperties , TreeViewDragItemsStartingEventArgs , MenuBarItemProperties , MenuBarProperties
  • ItemsAccessibilitySetTest() : CommonTests
  • ItemsControlPage() : ItemsControlPage
  • ItemsInfoRequested() : LinedFlowLayoutProperties
  • ItemsJustification() : UniformGridLayoutProperties , LinedFlowLayoutProperties , UniformGridLayoutProperties
  • ItemsJustificationProperty() : UniformGridLayoutProperties , LinedFlowLayoutProperties
  • ItemSourceTest() : CommonTests
  • ItemSpacing() : RatingControl
  • ItemsProperty() : MenuBarItemProperties , MenuBarProperties , SelectorBarProperties , RadioButtonsProperties
  • ItemsRangeLength() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ItemsRangeRequestedLength() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ItemsRangeStartIndex() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ItemsRepeater() : ItemsRepeater
  • ItemsRepeater_ButtonClick() : BreadcrumbBarPage
  • ItemsRepeater_ElementClearing() : ItemsViewSummaryPage , SelectorBarSummaryPage , KeyboardNavigationSample , ObjectModelTestPage
  • ItemsRepeater_ElementPrepared() : SelectorBarSummaryPage , ItemTemplateDemo , KeyboardNavigationSample , ObjectModelTestPage , ItemsViewSummaryPage
  • ItemsRepeater_LayoutUpdated() : ItemsViewSummaryPage
  • ItemsRepeater_LayoutUpdatedLog() : ItemsViewIntegrationPage
  • ItemsRepeater_Loaded() : ItemsViewSummaryPage , ItemsViewBlankPage , ObjectModelTestPage , ItemsViewPictureLibraryPage , SelectorBarSummaryPage
  • ItemsRepeater_LoadedLog() : ItemsViewIntegrationPage
  • ItemsRepeater_SizeChanged() : ObjectModelTestPage , ItemsViewSummaryPage , ItemsViewBlankPage , ItemsViewPictureLibraryPage
  • ItemsRepeater_SizeChangedLog() : ItemsViewIntegrationPage
  • ItemsRepeaterElementClearingEventArgs() : ItemsRepeaterElementClearingEventArgs
  • ItemsRepeaterElementIndexChangedEventArgs() : ItemsRepeaterElementIndexChangedEventArgs
  • ItemsRepeaterElementPreparedEventArgs() : ItemsRepeaterElementPreparedEventArgs
  • ItemsRepeaterProperties() : ItemsRepeaterProperties
  • ItemsRepeaterScrollHost() : ItemsRepeaterScrollHost
  • ItemsSource() : ItemsRepeaterProperties , BreadcrumbIterable , TreeViewNode , ItemsRepeaterProperties , TreeViewProperties , ItemsViewProperties , TreeViewNode , TreeViewProperties , RadioButtonsProperties , BreadcrumbBarProperties , ItemsViewProperties , RadioButtonsProperties , TreeViewItemProperties , BreadcrumbBarProperties
  • ItemsSourceAccessibilitySetTest() : CommonTests
  • ItemsSourceProperty() : TreeViewProperties , ItemsRepeaterProperties , BreadcrumbBarProperties , TreeViewItemProperties , ItemsViewProperties , RadioButtonsProperties
  • ItemsSourceResyncTest() : TreeViewTests
  • ItemsSourceSwitchForthAndBackTest() : TreeViewTests
  • ItemsSourceView() : final , ItemsRepeater
  • ItemsSourceViewProperties() : ItemsSourceViewProperties
  • ItemsStretch() : UniformGridLayoutProperties , LinedFlowLayoutProperties , UniformGridLayoutProperties
  • ItemsStretchComboBox_SelectionChanged() : ItemsViewWithDataPage
  • ItemsStretchProperty() : UniformGridLayoutProperties , LinedFlowLayoutProperties
  • ItemsUnlocked() : LinedFlowLayoutProperties
  • ItemsView() : ItemsView
  • ItemsView_CurrentItemIndexChanged() : ItemsViewSummaryPage
  • ItemsView_GettingFocus() : SelectorBarSummaryPage , ItemsViewPictureLibraryPage , ItemsViewBlankPage , ItemsViewSummaryPage
  • ItemsView_GettingFocusLog() : ItemsViewIntegrationPage
  • ItemsView_GotFocus() : SelectorBarSummaryPage , ItemsViewSummaryPage , ItemsViewBlankPage , ItemsViewPictureLibraryPage
  • ItemsView_GotFocusLog() : ItemsViewIntegrationPage
  • ItemsView_ItemInvoked() : SelectorBarSummaryPage , ItemsViewSummaryPage , ItemsViewInteractiveTestsPage
  • ItemsView_Loaded() : ItemsViewSummaryPage , ItemsViewPictureLibraryPage , SelectorBarSummaryPage , ItemsViewBlankPage
  • ItemsView_LoadedLog() : ItemsViewIntegrationPage
  • ItemsView_LosingFocus() : SelectorBarSummaryPage , ItemsViewSummaryPage , ItemsViewBlankPage , ItemsViewPictureLibraryPage
  • ItemsView_LosingFocusLog() : ItemsViewIntegrationPage
  • ItemsView_LostFocus() : ItemsViewPictureLibraryPage , ItemsViewBlankPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • ItemsView_LostFocusLog() : ItemsViewIntegrationPage
  • ItemsView_PointerWheelChanged() : ItemsViewSummaryPage
  • ItemsView_SelectionChanged() : SelectorBarSummaryPage , ItemsViewSummaryPage
  • ItemsView_SizeChanged() : ItemsViewSummaryPage , ItemsViewPictureLibraryPage , ItemsViewBlankPage
  • ItemsView_SizeChangedLog() : ItemsViewIntegrationPage
  • ItemsViewAutomationPeer() : ItemsViewAutomationPeer
  • ItemsViewBlankPage() : ItemsViewBlankPage
  • ItemsViewExtendedSelectionMode() : ItemsViewTestsWithInputHelper
  • ItemsViewIntegrationPage() : ItemsViewIntegrationPage
  • ItemsViewIntegrationPage_KeyDown() : ItemsViewIntegrationPage
  • ItemsViewIntegrationPage_Loaded() : ItemsViewIntegrationPage
  • ItemsViewInteractiveTestsPage() : ItemsViewInteractiveTestsPage
  • ItemsViewInteractiveTestsPage_KeyDown() : ItemsViewInteractiveTestsPage
  • ItemsViewInteractiveTestsPage_Loaded() : ItemsViewInteractiveTestsPage
  • ItemsViewItemInvokedEventArgs() : ItemsViewItemInvokedEventArgs
  • ItemsViewItemsContainerDragStartingEventRaised() : ItemsViewTestsWithInputHelper
  • ItemsViewMultipleSelectionMode() : ItemsViewTestsWithInputHelper
  • ItemsViewPage() : ItemsViewPage
  • ItemsViewPictureLibraryPage() : ItemsViewPictureLibraryPage
  • ItemsViewProperties() : ItemsViewProperties
  • ItemsViewSetHeight() : ItemsViewSummaryPage
  • ItemsViewSetWidth() : ItemsViewSummaryPage
  • ItemsViewStartBringItemIntoView() : ItemsViewSummaryPage
  • ItemsViewSummaryPage() : ItemsViewSummaryPage
  • ItemsViewSummaryPage_KeyDown() : ItemsViewSummaryPage
  • ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged() : ItemsViewSummaryPage
  • ItemsViewTestSetupHelper() : ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
  • ItemsViewTransitionPage() : ItemsViewTransitionPage
  • ItemsViewWithDataPage() : ItemsViewWithDataPage
  • ItemTemplate() : TreeViewProperties , RadioButtonsProperties , ItemsRepeaterProperties , RadioButtonsProperties , BreadcrumbBarProperties , ItemsRepeaterProperties , BreadcrumbBarProperties , ItemsViewProperties , TreeViewProperties
  • ItemTemplateDemo() : ItemTemplateDemo
  • ItemTemplateProperty() : ItemsViewProperties , ItemsRepeaterProperties , RadioButtonsProperties , TreeViewProperties , BreadcrumbBarProperties
  • ItemTemplateSelector() : TreeViewProperties
  • ItemTemplateSelectorProperty() : TreeViewProperties
  • ItemTemplateSelectorTestPage_Click() : TreeViewPage
  • ItemTemplateShim() : ItemsRepeater
  • ItemTemplateWrapper() : ItemTemplateWrapper
  • ItemTransitionProvider() : ItemsRepeaterProperties , ItemsViewProperties , ItemsRepeaterProperties
  • ItemTransitionProviderProperty() : ItemsRepeaterProperties , ItemsViewProperties
  • ItemType() : XamlTypeBase
  • ItemTypeComboBoxSelectionChanged() : RadioButtonsPage
  • Iterator()
: SelectedItems< T >::Iterator
, ObservableVector< T >::Iterator
, VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
, HashMap< K, V >::Iterator
  • IValueProvider_Value() : RatingControlAutomationPeer
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- p -

  • Padding() : LayoutPanelProperties
  • PaddingOffsetTest() : ProgressBarTests
  • PaddingProperty() : LayoutPanelProperties
  • Page_Loaded() : WebView2CoreObjectsPage
  • PageAnnotatedScrollbar_Scrolling() : AnnotatedScrollBarIScrollControllerPage
  • PageContentRepeater_Loaded() : AnnotatedScrollBarIScrollControllerPage
  • PageDown() : ScrollPresenter
  • PageLeft() : ScrollPresenter
  • PageOperationTimer_Tick() : ListViewAnchoringPage
  • PagerControl() : PagerControl
  • PagerControlAutomationPeer() : PagerControlAutomationPeer
  • PagerControlAxeTestPage() : PagerControlAxeTestPage
  • PagerControlPage() : PagerControlPage
  • PagerControlProperties() : PagerControlProperties
  • PagerControlSelectedIndexChangedEventArgs() : PagerControlSelectedIndexChangedEventArgs
  • PagerControlTemplateSettings() : PagerControlTemplateSettings
  • PagerControlTemplateSettingsProperties() : PagerControlTemplateSettingsProperties
  • PageRight() : ScrollPresenter
  • PagerInputCommand() : PagerControlProperties
  • PagerInputCommandProperty() : PagerControlProperties
  • Pages() : PagerControlTemplateSettingsProperties
  • pageScrollViewer_SizeChanged() : IScrollControllerAdapter
  • pageScrollViewer_ViewChanged() : IScrollControllerAdapter
  • PagesProperty() : PagerControlTemplateSettingsProperties
  • PageUp() : ScrollPresenter
  • Palette() : InkToolBarPenButton , InkToolBarPenButtonProperties , InkToolBarPenButton
  • PaletteProperty() : InkToolBarPenButtonProperties
  • PanAnnotatedScrollBar() : ItemsViewTestsWithInputHelper
  • PanAnnotatedScrollBarWithItemsInfo() : ItemsViewTestsWithInputHelper
  • PanAnnotatedScrollBarWithoutItemsInfo() : ItemsViewTestsWithInputHelper
  • Pane1() : TwoPaneViewProperties
  • Pane1Length() : TwoPaneViewProperties
  • Pane1LengthComboBox_SelectionChanged() : TwoPaneViewPage
  • Pane1LengthProperty() : TwoPaneViewProperties
  • Pane1LengthTextBox_TextChanged() : TwoPaneViewPage
  • Pane1Property() : TwoPaneViewProperties
  • Pane2() : TwoPaneViewProperties
  • Pane2Length() : TwoPaneViewProperties
  • Pane2LengthComboBox_SelectionChanged() : TwoPaneViewPage
  • Pane2LengthProperty() : TwoPaneViewProperties
  • Pane2LengthTextBox_TextChanged() : TwoPaneViewPage
  • Pane2Property() : TwoPaneViewProperties
  • Pane_Closed() : SplitViewPage
  • Pane_Opened() : SplitViewPage
  • PaneAutoSuggestBox_SuggestionChosen() : NavigationViewPage
  • PaneClosed() : NavigationViewProperties
  • PaneClosedUponLaunch() : PaneBehaviorTests
  • PaneClosing() : NavigationViewProperties
  • PaneCustomContent() : NavigationViewProperties
  • PaneCustomContentProperty() : NavigationViewProperties
  • PaneDisplayMode() : NavigationViewProperties
  • PaneDisplayModeCombobox_SelectionChanged() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup , NavigationViewTopNavOnlyPage
  • PaneDisplayModeLeftLeftCompactLeftMinimalTest() : PaneBehaviorTests
  • PaneDisplayModeProperty() : NavigationViewProperties
  • PaneFooter() : NavigationViewProperties
  • PaneFooterContentTest() : PaneBehaviorTests
  • PaneFooterProperty() : NavigationViewProperties
  • PaneFooterTestPage() : PaneFooterTestPage
  • PaneHeader() : NavigationViewProperties
  • PaneHeaderProperty() : NavigationViewProperties
  • PaneLayoutTestPage() : PaneLayoutTestPage
  • PaneLengthTest() : TwoPaneViewTests
  • PaneNotOpeningTopMode() : PaneBehaviorTests
  • PaneOpenCheckbox_CheckChanged() : SplitViewPage
  • PaneOpenCloseEventsTest() : PaneBehaviorTests
  • PaneOpenCloseTest() : PaneBehaviorTests
  • PaneOpenCloseTestCaseRetry() : NavigationViewTestsBase
  • PaneOpenCloseTestPartTwo() : PaneBehaviorTests
  • PaneOpened() : NavigationViewProperties
  • PaneOpenForceCloseTest() : PaneBehaviorTests
  • PaneOpening() : NavigationViewProperties
  • PanePlacement_Toggled() : SplitViewPage
  • PanePriority() : TwoPaneViewProperties
  • PanePriorityComboBox_SelectionChanged() : TwoPaneViewPage
  • PanePriorityProperty() : TwoPaneViewProperties
  • PaneSizeChanged() : TwoPaneViewPage
  • PaneTabNavigationTest() : PaneBehaviorTests
  • PaneTitle() : NavigationViewProperties
  • PaneTitleProperty() : NavigationViewProperties
  • PaneToggleButtonStyle() : NavigationViewProperties
  • PaneToggleButtonStyleProperty() : NavigationViewProperties
  • PaneToggleButtonVisibility() : NavigationViewTemplateSettingsProperties
  • PaneToggleButtonVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • PaneToggleButtonVisiblityCheckbox_Checked() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • PaneToggleButtonVisiblityCheckbox_Unchecked() : NavigationViewCompactPaneLengthTestPage , NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • PaneToggleButtonWidth() : NavigationViewTemplateSettingsProperties
  • PaneToggleButtonWidthProperty() : NavigationViewTemplateSettingsProperties
  • PaneToggleRequested() : TitleBarProperties
  • PanItemsView() : ItemsViewTestsWithInputHelper
  • PanningElementAncestor() : AnnotatedScrollBarPanningInfo
  • PanningElementOffsetMultiplier() : AnnotatedScrollBarPanningInfo
  • PanningFrameworkElement() : AnnotatedScrollBarPanningInfo
  • PanningFrameworkElement_ManipulationCompleted() : CompositionScrollController
  • PanningFrameworkElement_ManipulationDelta() : CompositionScrollController
  • PanningFrameworkElement_ManipulationStarting() : CompositionScrollController
  • PanningFrameworkElement_PointerPressed() : CompositionScrollController
  • PanningInfo() : AnnotatedScrollBar , ScrollBarController
  • PanningInfo_LogMessage() : CompositionScrollController
  • PanOrientation() : AnnotatedScrollBarPanningInfo
  • PanRequested() : AnnotatedScrollBarPanningInfo
  • PanScrollViewer() : ScrollViewTestsWithInputHelper
  • PanTowardsTwoManditoryIrregularSnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • PanTowardsTwoManditoryIrregularSnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • PanTowardsTwoManditoryIrregularSnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • PanToZero() : ScrollPresenterTestsWithInputHelper
  • PanUntilInputWorks() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollPresenterToScrollViewer() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollPresenterToScrollViewer_Auto() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollPresenterToScrollViewerWithChainingMode() : ScrollPresenterTestsWithInputHelper
  • PanWithChainingFromScrollViewerToScrollPresenter() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Center() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Far() : ScrollPresenterTestsWithInputHelper
  • PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Near() : ScrollPresenterTestsWithInputHelper
  • PanWithoutRailing() : ScrollPresenterTestsWithInputHelper
  • PanWithRailing() : ScrollPresenterTestsWithInputHelper
  • ParallaxView() : ParallaxView
  • ParallaxViewPage() : ParallaxViewPage
  • ParallaxViewProperties() : ParallaxViewProperties
  • ParallaxViewStackPanelPage() : ParallaxViewStackPanelPage
  • Parent() : ElementFactoryGetArgsDownlevel , ElementFactoryRecycleArgsDownlevel , ScrollPresenter , TreeViewNode , TreeViewNodeVector
  • Parent_PointerPressed() : BiDirectionalScrollController , CompositionScrollController
  • ParentHiddenThenVisibleTest() : WebView2Tests
  • ParentVisibilityHiddenTest() : WebView2Tests
  • ParentVisibilityTurnedOnTest() : WebView2Tests
  • ParseAlphaTextBoxValue() : ColorPickerTests::ColorPickerTestSetupHelper
  • PasswordBoxDensityTest() : CommonStylesTests
  • PasswordBoxDensityTest_Click() : CommonStylesPage
  • PasteClipboard() : WebView2Tests
  • Path() : AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , SelectionModelTests
  • Path_0() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_1() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_2() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_3() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_4() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_5() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_6() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_7() : LottieLogo::LottieLogo_AnimatedVisual
  • Path_8() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • PathGeometry_0() : AnimatedBackVisualSource_AnimatedVisual
  • PathGeometry_00() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_01() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_02() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_03() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_04() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_05() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_06() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_07() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_08() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_09() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_1() : AnimatedBackVisualSource_AnimatedVisual
  • PathGeometry_10() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_11() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_12() : AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_13()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_14()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_15() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_16() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_17() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_18() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_19() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_2() : AnimatedBackVisualSource_AnimatedVisual
  • PathGeometry_20() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_21() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_22() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_23() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_24() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_25() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_26() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_27() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_28() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_29() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_30() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_31() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_32() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_33() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_34() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_35() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_36() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_37() : LottieLogo::LottieLogo_AnimatedVisual
  • PathGeometry_38() : LottieLogo::LottieLogo_AnimatedVisual
  • Pause() : AnimatedVisualPlayer , AnimatedVisualPlayer::final , IAnimatedVisual
  • PenButton() : InkToolBarPenConfigurationControlProperties , InkToolBarPenConfigurationControl
  • PenButtonProperty() : InkToolBarPenConfigurationControlProperties
  • PerformGlyphVerification() : RatingControlPage
  • PerformImageVerification() : RatingControlPage
  • PerformLineAlignment() : FlowLayoutAlgorithm
  • PerformSwipe() : SwipeControlTests
  • PerfXamlEvent_RAII() : PerfXamlEvent_RAII
  • Person() : Person
  • PersonDataSource() : PersonDataSource
  • PersonElementFactory() : PersonElementFactory
  • PersonInfo() : PersonInfo
  • PersonInfoList_ViewChanged() : PipsPagerExamples
  • PersonInfoListPager_SelectedIndexChanged() : PipsPagerExamples
  • PersonPicture() : PersonPicture
  • PersonPicture_LayoutUpdated() : PersonPicturePage
  • PersonPicture_Loaded() : PersonPicturePage
  • PersonPictureAutomationPeer() : PersonPictureAutomationPeer
  • PersonPicturePage() : PersonPicturePage
  • PersonPictureProperties() : PersonPictureProperties
  • PersonPictureTemplateSettingsProperties() : PersonPictureTemplateSettingsProperties
  • Phase() : VirtualizationInfo
  • PhaseElement() : final
  • Phaser() : final
  • Photos_CollectionChanged() : ItemsViewIntegrationPage
  • PictureLibrary() : PictureLibrary
  • PinchContentThroughMaxZoomFactor() : ScrollPresenterTests
  • PinchRectangle() : ScrollPresenterTestsWithInputHelper
  • PinchRectangleWithMouseWheel() : ScrollPresenterTestsWithInputHelper
  • PinElement() : ItemsRepeater
  • PinnedElement() : final::PinnedElementInfo
  • PinnedElementInfo() : final::PinnedElementInfo
  • PinterestLayout() : PinterestLayout
  • PinterestLayoutSamplePage() : PinterestLayoutSamplePage
  • PipSizeAfterOrientationChangeTest() : PipsPagerTests
  • PipSizeWithDifferentOrientationsTest() : PipsPagerTests
  • PipsPager() : PipsPager
  • PipsPagerAutomationPeer() : PipsPagerAutomationPeer
  • PipsPagerAxeTestPage() : PipsPagerAxeTestPage
  • PipsPagerChangingPageTest() : PipsPagerTests
  • PipsPagerExamples() : PipsPagerExamples
  • PipsPagerInfinitePagesTest() : PipsPagerTests
  • PipsPagerItems() : PipsPagerTemplateSettingsProperties
  • PipsPagerItemsProperty() : PipsPagerTemplateSettingsProperties
  • PipsPagerPage() : PipsPagerPage
  • PipsPagerProperties() : PipsPagerProperties
  • PipsPagerRTLDoesNotCrash() : PipsPagerTests
  • PipsPagerTemplateSettingsProperties() : PipsPagerTemplateSettingsProperties
  • PipsPagerWrapModeNavigation() : PipsPagerTests
  • PipsPagerWrapModeNavigationButtonsHiddenInOnePageScenario() : PipsPagerTests
  • PipsPagerWrapModeNavigationInfinitePages() : PipsPagerTests
  • PivotPage() : PivotPage
  • PlaceholderFallbackRating_Loaded() : RatingControlPage
  • PlaceholderGlyph() : RatingItemFontInfoProperties
  • PlaceholderGlyphProperty() : RatingItemFontInfoProperties
  • PlaceholderImage() : RatingItemImageInfoProperties
  • PlaceholderImageFallbackRating_Loaded() : RatingControlPage
  • PlaceholderImageProperty() : RatingItemImageInfoProperties
  • PlaceholderText() : NumberBoxProperties
  • PlaceholderTextProperty() : NumberBoxProperties
  • PlaceholderValue() : RatingControlProperties
  • PlaceholderValueProperty() : RatingControlProperties
  • PlacementMargin() : TeachingTipProperties
  • PlacementMarginProperty() : TeachingTipProperties
  • Play() : AnimatedVisualPlayerPage
  • PlayAsync() : AnimatedVisualPlayer , IAnimatedVisual
  • PlaybackRate() : AnimatedVisualPlayerProperties
  • PlaybackRateProperty() : AnimatedVisualPlayerProperties
  • PlayButton_Click() : AnimatedVisualPlayerPage
  • PlayCloseAnimation() : CommandBarFlyoutCommandBar
  • PlayCrossFadeAnimation() : AcrylicBrush
  • Player_PointerMoved() : AnimatedVisualPlayerPage
  • PlayForward() : AnimatedVisualPlayerPage
  • PlayHalfButton_Click() : AnimatedVisualPlayerPage
  • PlayIndicatorAnimations() : NavigationView
  • PlayIndicatorNonSameLevelAnimations() : NavigationView
  • PlayIndicatorNonSameLevelTopPrimaryAnimation() : NavigationView
  • PlayOpenAnimation() : CommandBarFlyoutCommandBar
  • PlaySegment() : AnimatedIcon
  • PointerExitedImpl() : RatingControl
  • PointerInfo() : PointerInfo< T >
  • PointerOverFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverGlyph() : RatingItemFontInfoProperties
  • PointerOverGlyphProperty() : RatingItemFontInfoProperties
  • PointerOverImage() : RatingItemImageInfoProperties
  • PointerOverImageFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverImageProperty() : RatingItemImageInfoProperties
  • PointerOverPlaceholderFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverPlaceholderGlyph() : RatingItemFontInfoProperties
  • PointerOverPlaceholderGlyphProperty() : RatingItemFontInfoProperties
  • PointerOverPlaceholderImage() : RatingItemImageInfoProperties
  • PointerOverPlaceholderImageFallbackRating_PointerMoved() : RatingControlPage
  • PointerOverPlaceholderImageProperty() : RatingItemImageInfoProperties
  • PointerPoint() : ScrollControllerPanRequestedEventArgs
  • PointerReleaseWithoutPressTest() : WebView2Tests
  • PolicyChanged() : MaterialHelper
  • PolicyStatusChangedHelper() : AcrylicBrush , RevealBrush
  • PollForEffectBrush() : AcrylicBrushPage
  • PollForFallbackBrush() : AcrylicBrushPage
  • PollTimer_Tick() : LightConfigurationTests
  • PoolInstanceProperty() : RecyclePoolProperties , RecyclePool
  • PopulateAccessibleControls() : CommandBarFlyoutCommandBar
  • PopulateAnnotatedScrollBar() : ItemsViewIntegrationPage
  • PopulateCmbSelectorBarSelectedItem() : SelectorBarSummaryPage
  • PopulateContent() : MenuBarItem
  • PopulateContentItems() : SwipeControl
  • PopulateData() : ListViewItemPage , ListViewHeaderPage , ListViewBackgroundPage , VirtualizingStackPanelPage
  • PopulateHeader() : ItemsViewIntegrationPage
  • PopulateHeaderAsync() : ItemsViewIntegrationPage
  • PopulateLabels() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarSummaryPage , AnnotatedScrollBarRangeBasePage
  • PopulatePanelWithButtons() : FlowLayoutTests
  • PopulatePhotosCollection() : ItemsViewIntegrationPage
  • PopulateSquares() : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarSummaryPage
  • PopulateStackPanelWithItems() : RatingControl
  • PopulateTabViewList() : TabView
  • Position() : NavigationViewItemBase , SliderInteraction
  • PositionInkVisual() : InkCanvas
  • PositionPopup() : TeachingTip
  • PositionTargetedPopup() : TeachingTip
  • PositionUntargetedPopup() : TeachingTip
  • PostArrange() : ItemsRepeaterScrollHost , ScrollPresenter , ItemsRepeaterScrollHost
  • PostProcessOffsetsChange() : ScrollPresenter
  • PostProcessZoomFactorChange() : ScrollPresenter
  • PreferredPlacement() : TeachingTipProperties
  • PreferredPlacementProperty() : TeachingTipProperties
  • PreferSmallImage() : PersonPictureProperties
  • PreferSmallImageProperty() : PersonPictureProperties
  • PrefixText() : PagerControlProperties
  • PrefixTextProperty() : PagerControlProperties
  • PrepareContainer() : RecipeElementFactory
  • PrepareContainerForItemOverride() : TabViewListView , TreeViewList
  • PrepareForScrollPresenterManipulationStart() : ScrollPresenterTestsWithInputHelper
  • PrepareForScrollViewerManipulationStart() : ScrollPresenterTestsWithInputHelper
  • PrepareForScrollViewManipulationStart() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • PrepareItemsSource() : TreeViewPage , TreeViewLateDataInitTest
  • PrepareItemsSourceAsync() : TreeViewPage
  • PrepareItemsSourceForContainerReuseTest() : TreeViewItemsSourceTestPage
  • PrepareView() : ViewModel
  • PrepNavigationViewItem() : NavigationViewItem
  • PressButtonAndVerifyText() : TabViewTests
  • PressGamepadButtonAndVerifyOffsetAndFocus() : ScrollViewTestsWithInputHelper
  • PressingAnyKeyDismissesSwipe() : SwipeControlTests
  • PressKeyAndWaitForColorChange() : ColorPickerTests
  • PressTipCloseButton() : TeachingTipTests
  • PressXCloseButton() : TeachingTipTests
  • PreventKeyboardDisplayOnProgrammaticFocus() : NumberBoxProperties
  • PreventKeyboardDisplayOnProgrammaticFocusProperty() : NumberBoxProperties
  • PreviousButtonClicked() : PagerControl
  • PreviousButtonCommand() : PagerControlProperties
  • PreviousButtonCommandProperty() : PagerControlProperties
  • PreviousButtonStyle() : PipsPagerProperties , PagerControlProperties , PipsPagerProperties
  • PreviousButtonStyleProperty() : PipsPagerProperties , PagerControlProperties
  • PreviousButtonVisibility() : PagerControlProperties , PipsPagerProperties
  • PreviousButtonVisibilityProperty() : PipsPagerProperties , PagerControlProperties
  • PreviousColor() : ColorPickerProperties
  • PreviousColorBlueButton_Click() : ColorPickerPage
  • PreviousColorCurrentColorButton_Click() : ColorPickerPage
  • PreviousColorGreenButton_Click() : ColorPickerPage
  • PreviousColorNullButton_Click() : ColorPickerPage
  • PreviousColorProperty() : ColorPickerProperties
  • PreviousColorRectangleFillChanged() : ColorPickerPage
  • PreviousColorRedButton_Click() : ColorPickerPage
  • PreviousPageButtonChangingPageTest() : PipsPagerTests , PagerControlTests
  • PreviousPageButtonVisibilityOptionsTest() : PagerControlTests , PipsPagerTests
  • PreviousPageIndex() : PagerControlSelectedIndexChangedEventArgs
  • PreviousTargetUnloadingLeavesTeachingTipOpen() : TeachingTipTests
  • PrimaryCommands() : CommandBarFlyout
  • PrimaryEllipseFillChanged() : PersonPicturePage
  • PrimitiveXamlType() : PrimitiveXamlType
  • PrintGridWidth() : SwipeControlPage
  • PrintSelectedItem() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • PrintTopLevelIsChildSelectedItems() : HierarchicalNavigationViewMarkup
  • Priority() : WorkInfo
  • ProcessAddCommand() : AnimationsDemoPage
  • ProcessAnchorCandidate() : ScrollPresenter
  • ProcessBindings() : PhasingTests::ElementPhasingManager
  • ProcessClearCommand() : AnimationsDemoPage
  • ProcessCommand() : AnimationsDemoPage
  • ProcessCommands() : AnimationsDemoPage
  • ProcessContentSizeChange() : ScrollInputHelper
  • ProcessDequeuedViewChange() : ScrollPresenter
  • ProcessInteraction() : ItemsView
  • ProcessNavigationKeys() : ItemsView
  • ProcessOffsetsChange() : ScrollPresenter
  • ProcessPointerCanceled() : ItemContainer , NavigationViewItem , BreadcrumbBarItem
  • ProcessPointerOver() : BreadcrumbBarItem , NavigationViewItem , ItemContainer
  • ProcessRemoveCommand() : AnimationsDemoPage
  • ProcessResetCommand() : AnimationsDemoPage
  • ProcessScrollPresenterContentChange() : ScrollInputHelper
  • ProcessScrollViewerContentChange() : ScrollInputHelper
  • ProcessScrollViewerZoomModeChange() : ScrollInputHelper
  • ProcessSourceControlTemplateChange() : ScrollInputHelper
  • ProcessSourceElementChange() : ScrollInputHelper
  • ProcessTargetElementChange() : ScrollInputHelper
  • ProcessVerticalGridPointerCanceled() : AnnotatedScrollBar
  • ProcessZoomFactorChange() : ScrollPresenter
  • ProfilePicture() : PersonPictureProperties
  • ProfilePictureProperty() : PersonPictureProperties
  • ProgramaticallyCloseSwipeControl11() : SwipeControlPage
  • ProgramaticallyCloseSwipeControl3() : SwipeControlPage
  • ProgramaticallyCloseSwipeControl9() : SwipeControlPage
  • ProgressBar() : ProgressBar
  • ProgressBarAutomationPeer() : ProgressBarAutomationPeer
  • ProgressBarAxeTestPage() : ProgressBarAxeTestPage
  • ProgressBarPage() : ProgressBarPage
  • ProgressBarPage_CurrentStateChanged() : ProgressBarPage
  • ProgressBarPage_Loaded() : ProgressBarPage
  • ProgressBarProperties() : ProgressBarProperties
  • ProgressBarReTemplatePage() : ProgressBarReTemplatePage
  • ProgressBarReTemplatePage_CurrentStateChanged() : ProgressBarReTemplatePage
  • ProgressBarReTemplatePage_Loaded() : ProgressBarReTemplatePage
  • ProgressBarTemplateSettings() : ProgressBarTemplateSettings
  • ProgressBarTemplateSettingsProperties() : ProgressBarTemplateSettingsProperties
  • ProgressObject() : AnimatedVisualPlayer
  • ProgressRing() : ProgressRing
  • ProgressRingAutomationPeer() : ProgressRingAutomationPeer
  • ProgressRingAxeTestPage() : ProgressRingAxeTestPage
  • ProgressRingCustomLottieSourcePage() : ProgressRingCustomLottieSourcePage
  • ProgressRingCustomLottieSourcePage_CurrentStateChanged() : ProgressRingCustomLottieSourcePage
  • ProgressRingCustomLottieSourcePage_Loaded() : ProgressRingCustomLottieSourcePage
  • ProgressRingPage() : ProgressRingPage
  • ProgressRingPage_CurrentStateChanged() : ProgressRingPage
  • ProgressRingPage_Loaded() : ProgressRingPage
  • ProgressRingProperties() : ProgressRingProperties
  • ProgressRingStoryboardAnimationPage() : ProgressRingStoryboardAnimationPage
  • ProgressRingStoryboardAnimationPage_CurrentStateChanged() : ProgressRingStoryboardAnimationPage
  • ProgressRingStoryboardAnimationPage_Loaded() : ProgressRingStoryboardAnimationPage
  • ProgressRingTemplateSettings() : ProgressRingTemplateSettings
  • ProgressRingTemplateSettingsProperties() : ProgressRingTemplateSettingsProperties
  • PropagateDepthToChildren() : NavigationViewItem
  • PropagatePropertiesDown() : TeachingTipTests
  • Property() : GlobalDependencyProperty
  • PropertyChanged() : SliderInteraction , SelectionModelProperties , SelectionModel , ButtonInteraction , SelectionModelProperties , ButtonInteractionProperties , SelectionModel , SliderInteraction , ButtonInteraction , SliderInteractionProperties , ButtonInteractionProperties
  • PropertyChanged_revoker() : PropertyChanged_revoker
  • PropertyName() : ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
  • PropertyValueToString() : CommonStylesVisualTreeTestSamples::CustomizedTranslator
  • Protractor() : InkToolBarStencilButtonProperties , InkToolBarStencilButton , InkToolBarStencilButtonProperties
  • ProtractorProperty() : InkToolBarStencilButtonProperties
  • PrunePinnedElements() : final
  • PTRPage() : PTRPage
  • PullDirection() : RefreshContainerProperties
  • PullDirectionProperty() : RefreshContainerProperties
  • PullToRefreshPage() : PullToRefreshPage
  • put_Items() : SwipeItems
  • put_ParentImpl() : TreeViewNode
  • put_State() : RefreshVisualizer
  • PutElement() : RecyclePool
  • PutElementCore() : RecyclePool
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- q -

  • QPCTimer() : final
  • QueryCoreWebView2BasicTest() : WebView2Tests
  • QueryInterface() : ReferenceTracker< D, ImplT, I >
  • QueueCallbackForCompositionRendering() : SharedHelpers
  • QueuedOperation()
: ListViewBasePage::QueuedOperation
, ScrollPresenterStackPanelAnchoringPage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ScrollPresenterRepeaterAnchoringPage::QueuedOperation
, ScrollPresenterDynamicPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ListViewBasePage::QueuedOperation
  • QueuedOperationsTimer_Tick() : ListViewBasePage , ItemsViewSummaryPage
  • QueueInkPresenterWorkItem() : InkCanvas
  • QueueLayoutLabels() : AnnotatedScrollBar
  • QueueLengthSlider_ValueChanged() : AnimatedIconPage
  • QueueNavigationKey() : ItemsView
  • QueueTick() : final
  • QueueTransition() : ItemCollectionTransitionProvider
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- r -

  • RadialGradientBrush() : RadialGradientBrush
  • RadialGradientBrushPage() : RadialGradientBrushPage
  • RadialGradientBrushProperties() : RadialGradientBrushProperties
  • RadiansToDegrees() : RevealStatesPage
  • RadioButtons() : RadioButtons
  • RadioButtonsAutomationPeer() : RadioButtonsAutomationPeer
  • RadioButtonsCaseBundle() : RadioButtonsCaseBundle
  • RadioButtonsElementFactory() : RadioButtonsElementFactory
  • RadioButtonsFocusPage() : RadioButtonsFocusPage
  • RadioButtonsPage() : RadioButtonsPage
  • RadioButtonsPage_Loaded() : RadioButtonsPage
  • RadioButtonsProperties() : RadioButtonsProperties
  • RadioButtonsTestHooks_LayoutChanged() : RadioButtonsPage
  • RadioMenuFlyoutItem() : RadioMenuFlyoutItem
  • RadioMenuFlyoutItemPage() : RadioMenuFlyoutItemPage
  • RadioMenuFlyoutItemProperties() : RadioMenuFlyoutItemProperties
  • RadiusVector2Animation() : LottieLogo::LottieLogo_AnimatedVisual
  • RadiusX() : RadialGradientBrushProperties
  • RadiusXProperty() : RadialGradientBrushProperties
  • RadiusY() : RadialGradientBrushProperties
  • RadiusYProperty() : RadialGradientBrushProperties
  • RaiseAddScrollVelocityRequested() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollController , ScrollBarController
  • RaiseAnchorRequested() : ScrollPresenter
  • RaiseAutomationPropertyChangedEvent() : SharedHelpers
  • RaiseBringingIntoView() : ScrollPresenter
  • RaiseCanScrollChanged() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • RaiseChanged() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • RaiseChildrenChanged() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVectorInnerImpl< VectorOptions, Wrapper > , TreeViewNode
  • RaiseClosedEvent() : InfoBar , InfoBarAutomationPeer
  • RaiseClosingEvent() : InfoBar , TeachingTip
  • RaiseCollapsedEvent() : Expander , NavigationView
  • RaiseColorChanged() : ColorSpectrum
  • RaiseConfigurationChanged() : ViewportTests::TestScrollingSurface , ScrollPresenter
  • RaiseDetailLabelRequested() : AnnotatedScrollBar
  • RaiseDisplayModeChanged() : NavigationView
  • RaiseEvent() : ObservableTraits< T, true, isBindable >
  • RaiseExpandCollapseAutomationEvent() : ExpanderAutomationPeer , NavigationViewItemAutomationPeer , TreeViewItem , TreeViewItemAutomationPeer
  • RaiseExpandingEvent() : Expander , NavigationView
  • RaiseExpressionAnimationStatusChanged() : ScrollPresenter
  • RaiseExtentChanged() : ScrollPresenter
  • RaiseInteractingForRefreshChanged() : RefreshInfoProviderImplementation
  • RaiseInteractionRatioChanged() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • RaiseInteractionRatioChangedEvent() : RefreshInfoProviderImpl
  • RaiseInteractionSourcesChanged() : ScrollPresenter
  • RaiseInvoked() : ButtonInteraction
  • RaiseIsInteractingForRefreshChanged() : RefreshInfoProviderImpl
  • RaiseIsInteractionForRefreshChangedEvent() : RefreshInfoProviderImpl
  • RaiseIsScrollingWithMouseChanged() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • RaiseItemClickedEvent() : BreadcrumbBar , BreadcrumbBarItem
  • RaiseItemInvoked() : ItemContainer , ItemsView , NavigationView
  • RaiseItemInvokedForNavigationViewItem() : NavigationView
  • RaiseItemsInfoRequested() : LinedFlowLayout
  • RaiseLineArranged() : FlowLayoutAlgorithm
  • RaiseLogMessage() : BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollControllerPanningInfo , CompositionScrollController
  • RaiseMapElementClick() : MapElementsLayer
  • RaiseOpenedEvent() : InfoBarAutomationPeer
  • RaisePanRequested() : AnnotatedScrollBarPanningInfo , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollControllerPanningInfo
  • RaisePostArrange() : ScrollPresenter
  • RaisePropertyChanged() : SelectionModel
  • RaisePropertyChangedEvent() : ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer , RatingControlAutomationPeer
  • RaiseRefreshCompleted() : RefreshInfoProviderImpl
  • RaiseRefreshRequested() : RefreshContainer , RefreshVisualizer
  • RaiseRefreshStarted() : RefreshInfoProviderImpl
  • RaiseRefreshStateChanged() : RefreshVisualizer
  • RaiseRequestClose() : TabViewItem
  • RaiseScrollAnimationStarting() : ScrollPresenter
  • RaiseScrollByRequested() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollController , ScrollBarController
  • RaiseScrollCompleted() : BiDirectionalScrollController
  • RaiseScrolling() : AnnotatedScrollBar
  • RaiseScrollStarting() : ScrollPresenter
  • RaiseScrollToRequested() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollController , ScrollBarController
  • RaiseSelectedIndexChanged() : PagerControl , PipsPager
  • RaiseSelectionChanged() : SelectorBar , TreeView , ItemsView , ItemsViewAutomationPeer , PagerControlAutomationPeer , PipsPagerAutomationPeer
  • RaiseSelectionChangedEvent() : NavigationView , NavigationViewAutomationPeer
  • RaiseSelectionChangeEvents() : TreeViewItem
  • RaiseStateChanged() : ScrollPresenter
  • RaiseValueChangedEvent() : NumberBoxAutomationPeer
  • RaiseViewChangeCompleted() : ScrollPresenter
  • RaiseViewChanged() : ScrollPresenter
  • RaiseViewportChanged() : ScrollPresenter
  • RaiseWindowClosedEvent() : TeachingTipAutomationPeer
  • RaiseWindowOpenedEvent() : TeachingTipAutomationPeer
  • RaiseZoomAnimationStarting() : ScrollPresenter
  • RaiseZoomStarting() : ScrollPresenter
  • RandomizeCenter() : RadialGradientBrushPage
  • RandomizeCenterButton_Click() : RadialGradientBrushPage
  • RandomizeGradientOrigin() : RadialGradientBrushPage
  • RandomizeGradientOriginButton_Click() : RadialGradientBrushPage
  • RandomizeRadius() : RadialGradientBrushPage
  • RandomizeRadiusButton_Click() : RadialGradientBrushPage
  • RangeCount() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • RatingBindingSampleButton_Click() : RatingControlPage
  • RatingControl() : RatingControl
  • RatingControlAutomationPeer() : RatingControlAutomationPeer
  • RatingControlPage() : RatingControlPage
  • RatingControlPage_Loaded() : RatingControlPage
  • RatingControlProperties() : RatingControlProperties
  • RatingItemFontInfoProperties() : RatingItemFontInfoProperties
  • RatingItemImageInfoProperties() : RatingItemImageInfoProperties
  • RatingXBindSampleButton_Click() : RatingControlPage
  • RawAverageItemsPerLineDbg() : LinedFlowLayout
  • RawDataSize() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • RCRefreshRequestedComboBox_SelectionChanged() : RefreshContainerPage
  • RCRefreshRequestedComboBoxSwitcher_Click() : RefreshContainerPage
  • ReadBindingResult_Click() : TreeViewPage
  • ReadExpressionAnimationSources() : ScrollPresenterTests
  • ReadOnlyNotifyPropertyChangedCollection() : ReadOnlyNotifyPropertyChangedCollection-g< T >
  • ReadResult() : TreeViewTests
  • ReadSettingsSelected_Click() : NavigationViewPage
  • RealizationIndex() : VirtualizingStackLayout
  • RealizationRect() : FlowLayoutAlgorithm , VirtualizingLayoutContext
  • RealizationRectCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • RealizationWindow() : ItemsRepeater
  • RealizedChildrenNodeCount() : final
  • Reason() : InfoBarClosedEventArgs , InfoBarClosingEventArgs , TeachingTipClosedEventArgs , TeachingTipClosingEventArgs
  • RecipeElementFactory() : RecipeElementFactory
  • RecipeGroup() : RecipeGroup
  • RecommendedAnchorIndex() : VirtualizingLayoutContext
  • RecommendedAnchorIndexCore() : LayoutContextAdapter , RepeaterLayoutContext , VirtualizingLayoutContext
  • RecommendedNavigationTransitionInfo() : NavigationViewItemInvokedEventArgs , NavigationViewSelectionChangedEventArgs
  • RecommendedNavigationTransitionInfoToString() : NavigationViewTopNavOnlyPage
  • RecordEvent() : CommandBarFlyoutPage , TextCommandBarFlyoutPage
  • Rect() : Flex
  • Recycle() : PhasingTests::ElementPhasingManager
  • RecycleContainer() : NavigationView
  • RecycleElement() : ElementFactory , ItemTemplateWrapper , VirtualizingLayoutContext
  • RecycleElementCallInfo() : MockElementFactory::RecycleElementCallInfo
  • RecycleElementCore() : BreadcrumbElementFactory , NavigationViewItemsFactory , RadioButtonsElementFactory , DataAsElementElementFactory , ElementFromElementElementFactory , MockElementFactory , RecyclingElementFactoryDerived , PhasingTests::CustomElementFactory , ElementFactory , LayoutContextAdapter , RecyclingElementFactory , RepeaterLayoutContext , AnimationsDemoPage::AnimationElementFactory , RecipeElementFactory , PersonElementFactory , VirtualizingLayoutContext
  • RecycleEvents() : RatingControl , TreeViewItem
  • RecyclePool() : RecyclePool , RecyclingElementFactory
  • RecyclePoolProperties() : RecyclePoolProperties
  • RecyclingElementFactory() : RecyclingElementFactory
  • RecyclingElementFactoryDerived() : RecyclingElementFactoryDerived
  • RecyclingElementFactoryProperties() : RecyclingElementFactoryProperties
  • RedAmplitude() : IGammaTransferEffect
  • RedDisable() : IGammaTransferEffect , ILinearTransferEffect
  • RedExponent() : IGammaTransferEffect
  • RedOffset() : IGammaTransferEffect , ILinearTransferEffect
  • RedSlope() : ILinearTransferEffect
  • RedValueCount() : IPosterizeEffect
  • ReevaluateForwardedUIAProperties() : NumberBox
  • reference_tracker_implements() : reference_tracker_implements< D, WinRTClassType, ImplT, I >
  • ReferenceTracker() : ReferenceTracker< D, ImplT, I >
  • ReferenceTrackerContainerBase() : ReferenceTrackerContainerBase
  • Refresh() : RefreshableCollection-g< T >
  • RefreshAutomaticHorizontalOffsets() : ParallaxView
  • RefreshAutomaticVerticalOffsets() : ParallaxView
  • RefreshButtonClick() : RefreshVisualizerPage
  • RefreshCompleted() : RefreshVisualizer , RefreshInfoProviderImpl , RefreshContainer
  • RefreshCompletedAnimation() : AnimationHandler , IAdapterAnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • RefreshCompletedBatchCompleted() : AnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • RefreshCompletedDeferralCompletedOffUIThread() : RefreshVisualizerTests
  • RefreshContainer() : RefreshContainer
  • RefreshContainer_RefreshRequested() : RefreshContainerOnImagePage , RefreshContainerPage
  • RefreshContainerOnImagePage() : RefreshContainerOnImagePage
  • RefreshContainerPage() : RefreshContainerPage
  • RefreshContainerProperties() : RefreshContainerProperties
  • RefreshContentAlignments() : DynamicPage
  • RefreshHorizontalScrollMode() : DynamicPage
  • RefreshInfoProvider_InteractingForRefreshChanged() : RefreshVisualizer
  • RefreshInfoProvider_InteractionRatioChanged() : RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizer
  • RefreshInfoProviderAdapter() : RefreshContainer
  • RefreshInfoProviderImpl() : RefreshInfoProviderImpl
  • RefreshInfoProviderImplementation() : RefreshInfoProviderImplementation
  • RefreshInteractionRatioChangedEventArgs() : RefreshInteractionRatioChangedEventArgs
  • RefreshItems() : ItemsViewTransitionPage
  • RefreshOnContainerButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • RefreshOnVisualizerButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • RefreshPropagatesToInfoProvider() : RefreshVisualizerTests
  • RefreshRequested() : RefreshContainerProperties , RefreshVisualizerProperties
  • RefreshRequestedAnimation() : AnimationHandler , IAdapterAnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • RefreshRequestedEventArgs() : RefreshRequestedEventArgs
  • RefreshRequestedEventFires() : RefreshVisualizerTests
  • RefreshRequestedHandlersWorkOnEitherContainerOrVisualizerOrBoth() : RefreshContainerTests
  • RefreshSnapPoints() : ScrollPresenterBringIntoViewPage
  • RefreshSourceContent() : DynamicPage
  • RefreshSourceContentSizes() : DynamicPage
  • RefreshStarted() : RefreshInfoProviderImpl
  • RefreshStateChanged() : RefreshVisualizerProperties
  • RefreshStateChangedEventArgs() : RefreshStateChangedEventArgs
  • RefreshStateChangedEventFires() : RefreshVisualizerTests
  • RefreshSVCAlignments() : DynamicPage
  • RefreshTEAlignments() : DynamicPage
  • RefreshTESizes() : DynamicPage
  • RefreshVerticalScrollMode() : DynamicPage
  • RefreshVisualizer() : RefreshVisualizer
  • RefreshVisualizer_RefreshRequested() : RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizerPage
  • RefreshVisualizer_RefreshStateChanged() : RefreshContainerOnImagePage , RefreshContainerPage , RefreshVisualizerPage
  • RefreshVisualizer_SizeChanged() : RefreshContainerOnImagePage
  • RefreshVisualizerPage() : RefreshVisualizerPage
  • RefreshVisualizerProperties() : RefreshVisualizerProperties
  • RefreshZoomMode() : DynamicPage
  • RegenerateSnapPointsSet() : ScrollPresenter
  • RegionOffsetTest() : TwoPaneViewTests
  • RegionTest() : TwoPaneViewTests
  • RegisterAnchorCandidate() : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , IRepeaterScrollingSurface , ScrollPresenter , ScrollView
  • RegisterCacheBuildWork() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • RegisterCoreEventHandlers() : WebView2
  • RegisterFlyoutEvents() : DropDownButton , SplitButton
  • RegisterForCallback() : final
  • RegisterItem() : RadioMenuFlyoutItemPage
  • RegisterMethod() : CMethodProfileGroupBase , CMethodProfileGroup< size >
  • RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates() : ViewportManagerWithPlatformFeatures
  • RegisterPreparedElementsAsArranged() : ViewportManagerWithPlatformFeatures
  • RegisterWork() : final
  • RegisterXamlEventHandlers() : WebView2
  • RegressionTestScenario() : RegressionTestScenario
  • ReIndexVisibleElementsForAccessibility() : BreadcrumbBar
  • RelativeBounds() : ItemsRepeaterScrollHost::CandidateInfo
  • Release() : AutoHandle< THandlePolicy >
  • ReleaseCompositionResources() : RevealBorderLight , RevealHoverLight , XamlAmbientLight
  • ReleaseLocalLight() : RevealBorderLight
  • Reload() : WebView2
  • ReloadTest() : WebView2Tests
  • remove() : event_base< ImplT, T, StorageT >
  • Remove() : HashMap< K, V > , CustomItemsSource , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , CollectionChangeDemo::MyDataSource , MyCollection , final , ScrollPresenterTests::TestDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ScrollPresenterStackPanelAnchoringPage
  • Remove_Click() : ScrollViewerAdapterPage
  • remove_Click() : FlatSample , TreeViewSample
  • RemoveAllChildren() : LinedFlowLayoutDemo
  • RemoveAllWebViewControls() : WebView2CoreObjectsPage
  • RemoveAt() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SplitVector< T, SplitVectorID > , CustomItemsSourceView , WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , MyCollection , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • RemoveAtCore() : SelectedTreeNodeVector
  • RemoveAtEnd() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • RemoveButton_Click() : NavigationViewInitPage , NavigationViewTopNavStorePage
  • RemoveCachedBoundsOutsideViewport() : VirtualizingStackLayout
  • RemoveChild() : LinedFlowLayoutDemo
  • RemovedItems() : TreeViewSelectionChangedEventArgs
  • RemoveDropShadow() : CommandBarFlyout
  • RemoveEventHandler() : ObservableTraits< T, true, isBindable > , ObservableVectorInnerImpl< VectorOptions, Wrapper >
  • RemoveExistingWebViewControl() : WebView2BasicPage
  • RemoveExpandedChanged() : TreeViewNode
  • RemoveFakeBrowserExecutableFolderKey() : WebView2Tests
  • RemoveFirstItemButton_Click() : NavigationViewTopNavOverflowButtonPage
  • RemoveFlyoutItem_Click() : MenuBarPage
  • RemoveFooterButton_Click() : NavigationViewInitPage
  • RemoveFooterItemButton_Click() : NavigationViewTopNavPage , NavigationViewPage
  • RemoveFromChildrenNodes() : TreeViewNode
  • RemoveFromSelection() : RepeaterItemAutomationPeer , ItemContainerAutomationPeer , NavigationViewItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer
  • RemoveGradientStopButton_Click() : RadialGradientBrushPage
  • RemoveGradientStopTest() : RadialGradientBrushTests
  • RemoveInfoBarAsynchronouslyClick() : InfoBarPage
  • RemoveItem() : ItemsViewInteractiveTestsPage
  • RemoveItemButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • RemoveItemsFromOneChildrenItem_Click() : MenuBarPage
  • RemoveLastItem_Click() : TabViewTabClosingBehaviorPage
  • RemoveLastItemButton_Click() : NavigationViewTopNavOverflowButtonPage
  • RemoveMapIcon() : MapControl
  • RemoveMenuBarItem_Click() : MenuBarPage
  • RemoveMiddleItem_Click() : TabViewTabClosingBehaviorPage
  • RemoveNodeAndDescendantsFromView() : ViewModel
  • RemoveNodeFromParent() : TreeViewList
  • RemoveNodesAndDescendentsWithFlatIndexRange() : ViewModel
  • RemoveOpenButton_Click() : TeachingTipPage
  • RemovePin() : VirtualizationInfo
  • RemoveRandomGradientStop() : RadialGradientBrushPage
  • RemoveRange() : final
  • RemoveRevealButton_Click() : RevealRegressionTestsPage
  • RemoveSecondLevelOfNode_Click() : TreeViewPage
  • RemoveSecondMenuItem() : HierarchicalNavigationViewMarkup , HierarchicalNavigationViewDataBinding
  • RemoveTabButton_Click() : TabViewPage
  • RemoveTargetBrush() : RevealBrush
  • RemoveTeachingTipButton_Click() : TeachingTipPage
  • RemoveTeachingTipTextBlockContent_Unloaded() : TeachingTipPage
  • RemoveWebViewControls() : WebView2BasicPage
  • RemoveWebViewEventHandlers() : WebView2BasicPage , WebView2CoreObjectsPage
  • RemoveWhitespace() : MultipleTabViewPage
  • RemovingLastChildrenSetsIsExpandedToFalse() : TreeViewTests
  • RenderingRatingFontSize() : RatingControl
  • ReorderItems() : TreeViewItem
  • ReorderItemsTest() : TabViewTests
  • ReparentElementTest() : WebView2Tests
  • ReparentRepeater() : NavigationViewItem
  • RepeatedScrollSnapPoint() : RepeatedScrollSnapPoint
  • RepeatedZoomSnapPoint() : RepeatedZoomSnapPoint
  • Repeater_ElementIndexChanged() : FlatSample
  • Repeater_ElementPrepared() : ScrollPresenterBringIntoViewPage , FlatSample , TreeViewSample
  • RepeaterAutomationPeer() : RepeaterAutomationPeer
  • RepeaterItem() : RepeaterItem
  • RepeaterItemAutomationPeer() : RepeaterItemAutomationPeer
  • RepeaterLayoutContext() : RepeaterLayoutContext
  • RepeaterTestUIPage() : RepeaterTestUIPage
  • Replace() : CollectionChangeDemo::MyDataSource , SplitVector< T, SplitVectorID > , CustomItemsSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ScrollPresenterStackPanelAnchoringPage
  • ReplaceAll() : SelectedTreeNodeVector , ObservableVector< T > , VectorInnerImpl< VectorOptions, Wrapper > , SwipeItems , TreeViewNodeVector , ViewModel , SelectedItemsVector
  • ReplaceChild() : LinedFlowLayoutDemo
  • ReplaceGradientButton_Click() : RadialGradientBrushPage
  • ReplaceList() : BreadcrumbBarPage
  • ReplacementColor() : MonochromaticOverlayPresenterProperties
  • ReplacementColorProperty() : MonochromaticOverlayPresenterProperties
  • ReplaceMultipleItems() : FlowLayoutCollectionChangeTests
  • RepopulateAndApplyPhotosCollection() : ItemsViewIntegrationPage
  • RepositionPopup() : TeachingTip
  • RequestClose() : TabViewItem
  • RequestCloseCurrentTab() : TabView
  • RequestCloseTab() : TabView
  • RequestedRangeLength() : LinedFlowLayout
  • RequestedRangeStartIndex() : LinedFlowLayout
  • RequestEventArgs() : ScrollingBringingIntoViewEventArgs
  • RequestIgnored() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • RequestItemsInfo() : LinedFlowLayout
  • RequestPassThroughElement() : MenuBar
  • RequestRefresh() : RefreshContainer , RefreshVisualizer
  • ReRenderCaption() : RatingControl
  • reserve() : VectorInnerImpl< VectorOptions, Wrapper >
  • Reset() : final , CollectionChangeDemo::MyDataSource , ScrollPresenterRepeaterAnchoringPage::SampleDataSource , ItemsRepeaterScrollHost::BringIntoViewState , CustomItemsSource , WinRTCollection
  • ResetableCollection() : ResetableCollection-g< T >
  • ResetActionButtonAsynchronouslyClick() : InfoBarPage
  • ResetActionButtonProperty() : InfoBarPage
  • ResetAll() : PointerInfo< T >
  • ResetAnchorElement() : ScrollPresenter
  • ResetAndRearrangeTopNavItems() : NavigationView
  • ResetAnticipatedView() : ScrollPresenter
  • ResetAttachedData() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • ResetCacheBuffer() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • ResetCalendarItemCornerRadius_Click() : CalendarViewPage
  • ResetCollectionsButton_Click() : PaneLayoutTestPage
  • ResetContentMode_Click() : TreeViewPage
  • ResetControlWidth() : RatingControl
  • ResetCounts() : WebView2CoreObjectsPage
  • ResetElementAnimationProperties() : NavigationView
  • ResetEventCounters_Click() : NavigationViewPage
  • ResetExpectedViewportShift() : ViewportManagerWithPlatformFeatures
  • ResetExpressionAnimationStatusChanges() : ScrollPresenterTestHooksHelper
  • ResetFailedToAttachLightsCount() : MaterialHelper
  • ResetForcedIndexBasedLayoutOrientation() : Layout
  • ResetHideIndicatorsTimer() : ScrollView
  • ResetIgnoredValue() : SnapPointWrapper< T >
  • ResetInteractionRatios_Click() : RefreshContainerOnImagePage
  • ResetInteractionRatiosComboBox() : RefreshContainerOnImagePage
  • ResetIsAnimationsEnabledOverride() : ScrollPresenterTestHooksHelper
  • ResetIsMouseButtonPressed() : PointerInfo< T >
  • ResetIsMousePointerOver() : PointerInfo< T >
  • ResetIsPenPointerOver() : PointerInfo< T >
  • ResetIsTouchPointerOver() : PointerInfo< T >
  • ResetItemsInfo() : LinedFlowLayout
  • ResetItemsInfoForFastPath() : LinedFlowLayout
  • ResetItemsSource_Click() : TreeViewPage
  • ResetItemsSourceAsync_Click() : TreeViewPage
  • ResetItemsView() : ItemsViewTestsWithInputHelper
  • ResetLastBreadcrumbBarItem() : BreadcrumbBar
  • ResetLayerCollection() : MapControl
  • ResetLayoutExtent() : ViewportManagerWithPlatformFeatures
  • ResetLayoutForcedIndexBasedLayoutOrientation() : LayoutsTestHooks
  • ResetLayoutRealizationWindowCacheBuffer() : ViewportManagerDownLevel , ViewportManager , ViewportManagerWithPlatformFeatures
  • ResetLinedFlowLayout() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • ResetLinesInfo() : LinedFlowLayout
  • ResetMouseInputState() : WebView2
  • ResetNoise() : MaterialHelper
  • ResetOffsetsInertiaDecayRate() : ScrollPresenter
  • ResetOwner() : AnimatedVisualPlayer::final
  • ResetPendingViewportShift() : ViewportManagerWithPlatformFeatures
  • ResetPointerHelper() : WebView2
  • ResetPointerPressed() : PointerInfo< T >
  • ResetProperties() : WebView2
  • ResetResult_Click() : NavigationViewTopNavOnlyPage
  • ResetScrollers() : ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , ViewportManager
  • ResetSizedLines() : LinedFlowLayout
  • ResetSpyOutput() : RatingControlPage , SwipeControlPage , DynamicPage
  • ResetStateCounts() : ScrollViewVisualStateCounts
  • ResetStates_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • ResetStatesComboBox() : RefreshContainerPage , RefreshContainerOnImagePage
  • resetSwipeItemChoices() : SwipeControlPage2
  • ResettingCollectionRemoveItemButton_ItemClick() : CollectionChangeDemo
  • ResetTrackedPointerId() : BreadcrumbBarItem , NavigationViewItem , AnnotatedScrollBar , NavigationViewItemPresenter , PointerInfo< T >
  • ResetTransformWebView() : WebView2BasicPage
  • ResetUnshiftableShift() : ViewportManagerWithPlatformFeatures
  • ResetView() : ScrollViewsWithSimpleContentsPage , ScrollPresenterChainingAndRailingPage , ScrollPresentersWithSimpleContentsPage
  • ResetVisibleWindow() : ViewportManagerWithPlatformFeatures
  • ResetVisualProperties() : BreadcrumbBarItem
  • ResetWebViewVisibility() : WebView2BasicPage
  • ResetWebViewVisual() : WebView2BasicPage
  • ResetWith() : WinRTCollection
  • ResetZoomFactorInertiaDecayRate() : ScrollPresenter
  • Resize() : LinedFlowLayoutItemAspectRatios
  • ResizeRootGrid() : TextControlsPage
  • ResizeTest() : WebView2Tests
  • ResolveContainerForItem() : NavigationView
  • ResolvePath() : SelectionModel
  • ResourceAccessor() : sealed< T, fallback, RawStorageT >
  • ResourceLookup() : sealed< T, fallback, RawStorageT >
  • ResourceOverridablity() : ProgressBarTests
  • RestoreExpandedState() : NavigationViewItem
  • RestoreLayoutVirtualization() : PipsPager
  • RestoreLeftAdjacentTabSeparatorVisibility() : TabViewItem
  • RestoreOriginalVerticalScrollControllerAndVisibility() : ItemsView
  • RestoreScrollViewerWidth() : ListViewBasePage , GroupedListViewBasePage
  • Result() : ScrollingZoomCompletedEventArgs , ScrollingScrollCompletedEventArgs , ScrollingZoomCompletedEventArgs , ScrollingScrollCompletedEventArgs
  • Resume() : AnimatedVisualPlayer::final , AnimatedVisualPlayer , IAnimatedVisual
  • ReTemplateChangeStateTest() : ProgressBarTests
  • RetemplateUpdateIndicatorWidthTest() : ProgressBarTests
  • RetrieveBreadcrumbControl() : BreadcrumbTests
  • RetrieveRTLCheckBox() : BreadcrumbTests
  • RetrieveWidthSlider() : BreadcrumbTests
  • ReuseKeyProperty() : RecyclePool
  • RevealAlwaysUseFallback() : RevealBrushTests
  • RevealBasicPage() : RevealBasicPage
  • RevealBorderBrush() : RevealBorderBrush
  • RevealBorderLightTouchTests() : RevealBrushTests
  • RevealBrush() : RevealBrushTestApi , RevealBrush , RevealBrushTestApi
  • RevealBrushAudit() : RevealBrushTests
  • RevealBrushFromMarkup() : RevealBrushTests
  • RevealBrushProperties() : RevealBrushProperties
  • RevealButton_Click() : RevealRegressionTestsPage
  • RevealButtonStates() : RevealBrushTests
  • RevealButtonStates_FastRelease_Values() : RevealBrushTests
  • RevealButtonStates_SlowRelease_Values() : RevealBrushTests
  • RevealButtonStates_Values() : RevealBrushTests
  • RevealColorPage() : RevealColorPage
  • RevealCreateThenEnableEffects() : RevealBrushTests
  • RevealFallbackPage() : RevealFallbackPage
  • RevealHoverLightPosition_Values() : RevealBrushTests
  • RevealHoverLightPositionTests() : RevealBrushTests
  • RevealList_SelectionChanged() : RevealScenarios
  • RevealListPage() : RevealListPage
  • RevealListViewItemStates() : RevealBrushTests
  • RevealMarkupPage() : RevealMarkupPage
  • RevealPage() : RevealPage
  • RevealRegressionTestsPage() : RevealRegressionTestsPage
  • RevealScenarioColors() : RevealScenarioColors
  • RevealScenarioGrid() : RevealScenarioGrid
  • RevealScenarioLights() : RevealScenarioLights
  • RevealScenarioList() : RevealScenarioList
  • RevealScenarios() : RevealScenarios
  • RevealScenarioSecondaryView() : RevealScenarioSecondaryView
  • RevealSetStateNoCrashWhenParentIsNotControl() : RevealBrushTests
  • RevealSimpleListPage() : RevealSimpleListPage
  • RevealStatesHelper() : RevealBrushTests
  • RevealStatesPage() : RevealStatesPage
  • RevealTestApi() : RevealTestApi
  • ReverseNegativePlaybackRateAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • ReverseNegativePlaybackRateAnimationTest() : AnimatedVisualPlayerTests
  • ReversePositivePlaybackRateAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • ReversePositivePlaybackRateAnimationTest() : AnimatedVisualPlayerTests
  • revoke() : RoutedEventHandler_revoker , ScopedBatchCompleted_revoker , XamlRootChanged_revoker , PropertyChanged_revoker
  • RevokeAll() : NavigationViewItemBaseRevokers , PointerInfoRevokers , ItemContainerRevokers , ComboBoxDropDownEventRevokers
  • RevokeItemsViewItemContainerRevokers() : ItemsView
  • RevokeListeners() : BreadcrumbBar , BreadcrumbBarItem
  • RevokeNavigationViewItemBaseRevokers() : NavigationView
  • RevokePartsListeners() : BreadcrumbBarItem
  • RevokeViewportChangedEvent() : TeachingTip
  • Rgb() : Rgb
  • RgbaColor() : SharedHelpers
  • RichEditBoxDensityTest() : CommonStylesTests
  • RichEditBoxDensityTest_Click() : CommonStylesPage
  • RightEdgePlacementTopLeftHighlightMargin() : TeachingTip
  • RightItems() : SwipeControlProperties
  • RightItemsProperty() : SwipeControlProperties
  • RightToLeftFlowDirection() : ScrollPresenterTests
  • Root() : BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedVisual
  • RootGotFocus() : RadioButtonsPage
  • RootNodes() : TreeView
  • RootProgress() : AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedVisual
  • RootVisual() : AnimatedSettingsVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual
  • RotateButton_Click() : RefreshContainerOnImagePage , RefreshContainerPage
  • RotateExpandCollapseChevron() : NavigationViewItem , NavigationViewItemPresenter
  • RotationAngleInDegreesScalarAnimation_0_to_360_0() : AnimatedSettingsVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_0_to_360_1() : AnimatedSettingsVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_0_to_900() : AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_0_to_m20() : AnimatedSettingsVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_180_to_180() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual
  • RotationAngleInDegreesScalarAnimation_90_to_90() : AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • RoundedRectangle_375x667() : LottieLogo::LottieLogo_AnimatedVisual
  • RoundForLayout() : OrientationBasedMeasures
  • RoutedEventHandler_revoker() : RoutedEventHandler_revoker
  • RowSpacing() : ColumnMajorUniformToLargestGridLayoutProperties
  • RowSpacingProperty() : ColumnMajorUniformToLargestGridLayoutProperties
  • RS2IsSafeToCreateNoise() : MaterialHelper
  • RS2MultiColumnKeyboardTest() : RadioButtonsTests
  • RTL_Checked() : BreadcrumbBarPage
  • RTL_Unchecked() : BreadcrumbBarPage
  • RTLCheckBox_Checked() : ColorPickerPage
  • RTLCheckBox_Unchecked() : ColorPickerPage
  • Ruler() : InkToolBarStencilButtonProperties , InkToolBarStencilButton
  • RulerProperty() : InkToolBarStencilButtonProperties
  • RunAcrylicAlwaysUseFallback() : AcrylicBrushPage
  • RunAcrylicCreatedInFallbackMode() : AcrylicBrushPage
  • RunAcrylicNoiseCache() : AcrylicBrushPage
  • RunAcrylicPropertyChanges() : AcrylicBrushPage
  • RunAsync() : DispatcherHelper
  • RunBasicAcrylicOnRectangle() : AcrylicBrushPage
  • RunCompactTests() : CommonStylesTests
  • RunDensityTests() : CommonStylesTests
  • RunElementTrackingTestRoutine() : ViewportTests
  • RunInitializer() : XamlTypeBase
  • RunRevealAlwaysUseFallback() : RevealFallbackPage
  • RunTest_Click() : CompactPage
  • RunTestButton_Clicked() : AcrylicMarkupPage , RevealMarkupPage , RevealFallbackPage , AcrylicBrushPage , AcrylicRenderingPage
  • RunTestWithComplexBackground() : AcrylicRenderingPage
  • RunTestWithRedBlueBackground() : AcrylicRenderingPage
  • RunTintTransitionDuration() : AcrylicBrushPage
  • RunVerifyAcrylicBrushEffect() : AcrylicBrushPage
  • RunVerifyDisconnectedState() : AcrylicBrushPage
  • RunVerifyDisconnectedState_AnimationCompleted() : AcrylicBrushPage
  • RunVerifyOpaqueTintOptimization() : AcrylicBrushPage
  • RVRefreshRequestedComboBox_SelectionChanged() : RefreshContainerPage
  • RVRefreshRequestedComboBoxSwitcher_Click() : RefreshContainerPage
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- s -

  • safe_get() : sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • SafeGetAt() : VectorInnerImpl< VectorOptions, Wrapper >
  • SampleDataSource()
: ScrollPresenterBringIntoViewPage::SampleDataSource
, ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • SamplePointColors() : AcrylicRenderingPage
  • Saturation() : ISaturationEffect
  • ScalarAnimation_1_to_1() : AnimatedFindVisualSource_AnimatedVisual
  • Scale() : CornerRadiusFilterConverterProperties
  • ScaleAnimatedVerticalListDemo() : ScaleAnimatedVerticalListDemo
  • ScaledTouchTest() : WebView2Tests
  • ScaleIn() : LinedFlowLayoutItemCollectionTransitionProvider
  • ScaleOut() : LinedFlowLayoutItemCollectionTransitionProvider
  • ScalePointToPhysicalPixels() : WebView2
  • ScaleProperty() : CornerRadiusFilterConverterProperties
  • ScaleRectToPhysicalPixels() : WebView2
  • ScaleXScalarAnimation_2p25_to_2p25() : AnimatedBackVisualSource_AnimatedVisual
  • ScaleXScalarAnimation_2p749_to_2p749() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ScaleYScalarAnimation_2p25_to_2p25() : AnimatedBackVisualSource_AnimatedVisual
  • ScaleYScalarAnimation_2p75_to_2p75() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • ScheduleActionAfterWait() : SharedHelpers
  • ScopedBatchCompleted_revoker() : ScopedBatchCompleted_revoker
  • ScrambleButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • Scroll() : ScrollPresenterDynamicPage , ScrollPresenterAutomationPeer
  • ScrollableHeight() : ScrollPresenter , ScrollView
  • ScrollableWidth() : ScrollPresenter , ScrollView
  • ScrollAnimationStarting() : ScrollPresenterProperties , ScrollViewProperties
  • ScrollBarController() : ScrollBarController
  • ScrollBarPage() : ScrollBarPage
  • ScrollBarScroll() : ScrollBarController
  • ScrollBarValueChanged() : ScrollBarController
  • ScrollButtonToolTipTest() : TabViewTests
  • ScrollBy() : ScrollPresenterTests , ScrollPresenter , BiDirectionalScrollController , CompositionScrollController , ScrollView , TeachingTipTests
  • ScrollByRequested() : AnnotatedScrollBar , ScrollBarController
  • ScrollCompleted() : ScrollPresenterProperties , ScrollViewProperties
  • ScrollController() : AnnotatedScrollBar
  • ScrollController_AddScrollVelocityRequestedLog() : ItemsViewIntegrationPage
  • ScrollController_ScrollByRequestedLog() : ItemsViewIntegrationPage
  • ScrollController_ScrollToRequestedLog() : ItemsViewIntegrationPage
  • ScrollControllerAddScrollVelocityRequestedEventArgs() : ScrollControllerAddScrollVelocityRequestedEventArgs
  • ScrollControllerPanRequestedEventArgs() : ScrollControllerPanRequestedEventArgs
  • ScrollControllersAutoHidingChangedDbg() : ScrollView
  • ScrollControllerScrollByRequestedEventArgs() : ScrollControllerScrollByRequestedEventArgs
  • ScrollControllerScrollToRequestedEventArgs() : ScrollControllerScrollToRequestedEventArgs
  • ScrolledElementManipulationCompleted() : CanvasScrollControllerConsumer
  • ScrolledElementManipulationDelta() : CanvasScrollControllerConsumer
  • ScrolledElementManipulationStarting() : CanvasScrollControllerConsumer
  • Scroller() : ViewportManagerDownLevel::ScrollerInfo
  • ScrollerInfo() : ViewportManagerDownLevel::ScrollerInfo
  • ScrollGroupedGridViewWithMandatorySnapPointsTest() : CommonStylesTests
  • ScrollHorizontally() : ScrollPresenterTestsWithAutomationPeer
  • ScrollHorizontallyWithEndHomeKeys() : ScrollViewTestsWithInputHelper
  • ScrollHorizontallyWithEndHomeKeysInRTL() : ScrollViewTestsWithInputHelper
  • Scrolling() : AnnotatedScrollBarProperties
  • ScrollingAnchorRequestedEventArgs() : ScrollingAnchorRequestedEventArgs
  • ScrollingBringingIntoViewEventArgs() : ScrollingBringingIntoViewEventArgs
  • ScrollingEventKind() : AnnotatedScrollBarScrollingEventArgs
  • ScrollingScrollAnimationStartingEventArgs() : ScrollingScrollAnimationStartingEventArgs
  • ScrollingScrollCompletedEventArgs() : ScrollingScrollCompletedEventArgs
  • ScrollingScrollOptions() : ScrollingScrollOptions
  • ScrollingScrollStartingEventArgs() : ScrollingScrollStartingEventArgs
  • ScrollingZoomAnimationStartingEventArgs() : ScrollingZoomAnimationStartingEventArgs
  • ScrollingZoomCompletedEventArgs() : ScrollingZoomCompletedEventArgs
  • ScrollingZoomOptions() : ScrollingZoomOptions
  • ScrollingZoomStartingEventArgs() : ScrollingZoomStartingEventArgs
  • ScrollInputHelper() : ScrollInputHelper
  • ScrollItemIntoViewButton_Click() : NavigationViewPage
  • ScrollOffset() : AnnotatedScrollBarDetailLabelRequestedEventArgs , AnnotatedScrollBarLabel , AnnotatedScrollBarScrollingEventArgs
  • ScrollPeopleGroupedList() : PersonPictureTests
  • ScrollPeopleList() : PersonPictureTests
  • ScrollPeopleListPrivate() : PersonPictureTests
  • ScrollPresenter() : ScrollViewProperties , ScrollPresenter , ScrollView
  • ScrollPresenter_AnchorRequested() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • ScrollPresenter_BringingIntoView() : ScrollPresenterBringIntoViewPage , ScrollViewBringIntoViewPage
  • ScrollPresenter_ExtentChanged() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollPresenter_ExtentChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_Loaded() : ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollPresenter_LoadedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_PointerCanceled() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerCaptureLost() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerMoved() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerPressed() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerReleased() : ScrollPresenterMousePanningPage
  • ScrollPresenter_PointerWheelChanged() : ScrollViewDynamicPage
  • ScrollPresenter_ScrollAnimationStarting() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollPresenter_ScrollAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ScrollCompleted() : ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_ScrollCompletedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ScrollStarting() : ScrollPresenterDynamicPage , ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollPresenter_SizeChanged() : ScrollPresenterExpressionAnimationSourcesPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollPresenter_SizeChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_StateChanged() : ScrollPresenterBringIntoViewPage , ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresenterManipulationModePage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_StateChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ViewChanged() : DynamicPage , SimpleRectanglePage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_ViewChangedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ZoomAnimationStarting() : ScrollPresenterDynamicPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollPresenter_ZoomAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ZoomCompleted() : ScrollPresenterChainingAndRailingPage , ScrollPresenterDynamicPage , ScrollPresentersWithSimpleContentsPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewsWithSimpleContentsPage
  • ScrollPresenter_ZoomCompletedLog() : ItemsViewIntegrationPage
  • ScrollPresenter_ZoomStarting() : ScrollPresenterDynamicPage , ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollPresenterAccessibilityPage() : ScrollPresenterAccessibilityPage
  • ScrollPresenterAutomationPeer() : ScrollPresenterAutomationPeer
  • ScrollPresenterBringIntoViewPage() : ScrollPresenterBringIntoViewPage
  • ScrollPresenterBringIntoViewPage_Loaded() : ScrollPresenterBringIntoViewPage
  • ScrollPresenterChainingAndRailingPage() : ScrollPresenterChainingAndRailingPage
  • ScrollPresenterDynamicPage() : ScrollPresenterDynamicPage
  • ScrollPresenterExpressionAnimationSourcesPage() : ScrollPresenterExpressionAnimationSourcesPage
  • ScrollPresenterExpressionAnimationSourcesPage_Loaded() : ScrollPresenterExpressionAnimationSourcesPage
  • ScrollPresenterLeakDetectionPage() : ScrollPresenterLeakDetectionPage
  • ScrollPresenterManipulationModePage() : ScrollPresenterManipulationModePage
  • ScrollPresenterMousePanningPage() : ScrollPresenterMousePanningPage
  • ScrollPresenterOffsetFromThumbOffset() : BiDirectionalScrollController , CompositionScrollController
  • ScrollPresenterOperation() : ScrollPresenterTests::ScrollPresenterOperation
  • ScrollPresenterPage() : ScrollPresenterPage
  • ScrollPresenterProperties() : ScrollPresenterProperties
  • ScrollPresenterProperty() : ScrollViewProperties
  • ScrollPresenterRepeaterAnchoringPage() : ScrollPresenterRepeaterAnchoringPage
  • ScrollPresenterRepeaterAnchoringPage_Loaded() : ScrollPresenterRepeaterAnchoringPage
  • ScrollPresenterScrollSnapPointsPage() : ScrollPresenterScrollSnapPointsPage
  • ScrollPresenterScrollSnapPointsPage_Loaded() : ScrollPresenterScrollSnapPointsPage
  • ScrollPresenterStackPanelAnchoringPage() : ScrollPresenterStackPanelAnchoringPage
  • ScrollPresenterStackPanelAnchoringPage_Loaded() : ScrollPresenterStackPanelAnchoringPage
  • ScrollPresentersWithSimpleContentsPage() : ScrollPresentersWithSimpleContentsPage
  • ScrollPresenterTestHooks() : ScrollPresenterTestHooks
  • ScrollPresenterTestHooks_AnchorEvaluated() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooks_ContentLayoutOffsetXChanged() : ScrollPresentersWithSimpleContentsPage
  • ScrollPresenterTestHooks_ContentLayoutOffsetYChanged() : ScrollPresentersWithSimpleContentsPage
  • ScrollPresenterTestHooks_ExpressionAnimationStatusChanged() : ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooks_InteractionSourcesChanged() : ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooksAnchorEvaluatedEventArgs() : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs() : ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
  • ScrollPresenterTestHooksHelper() : ScrollPresenterTestHooksHelper
  • ScrollPresenterTestHooksInteractionSourcesChangedEventArgs() : ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
  • ScrollPresenterWithBiDirectionalScrollControllerPage() : ScrollPresenterWithBiDirectionalScrollControllerPage
  • ScrollPresenterWithCompositionScrollControllersPage() : ScrollPresenterWithCompositionScrollControllersPage
  • ScrollPresenterWithSimpleScrollControllersPage() : ScrollPresenterWithSimpleScrollControllersPage
  • ScrollPresenterWithSimpleScrollControllersPageOnLoaded() : ScrollPresenterWithSimpleScrollControllersPage
  • ScrollPresenterZoomSnapPointsPage() : ScrollPresenterZoomSnapPointsPage
  • ScrollPresenterZoomSnapPointsPage_Loaded() : ScrollPresenterZoomSnapPointsPage
  • ScrollSnapPoint() : ScrollSnapPoint
  • ScrollSnapPointBase() : ScrollSnapPointBase
  • ScrollStarting() : ScrollPresenterProperties , ScrollViewProperties
  • ScrollTargetIntoView() : TeachingTipTests
  • ScrollTest() : NumberBoxTests
  • ScrollThenPanScrollView() : ScrollViewTestsWithInputHelper
  • ScrollTo() : AnnotatedScrollBar , ScrollPresenterTests , ScrollPresenter , BiDirectionalScrollController , CompositionScrollController , ScrollView
  • ScrollToCenterOfViewport() : ScaleAnimatedVerticalListDemo , PipsPager
  • ScrollToEndOfContentTreeView_Click() : TreeViewItemsSourceTestPage
  • ScrollToHorizontalOffset() : ScrollPresenter
  • ScrollToMenuItemTest() : CommonTests
  • ScrollToOffsets() : ScrollPresenter
  • ScrollToRequested() : AnnotatedScrollBar , ScrollBarController
  • ScrollToTopOfContentTreeView_Click() : TreeViewItemsSourceTestPage
  • ScrollToVerticalOffset() : ScrollPresenter
  • ScrollTowardsTwoManditoryIrregularSnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • ScrollTowardsTwoManditoryIrregularSnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • ScrollTowardsTwoManditoryIrregularSnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • ScrollUsingArrowButtons() : AnnotatedScrollBarInteractionTests
  • ScrollUsingClick() : AnnotatedScrollBarInteractionTests
  • ScrollUsingTouchAndDrag() : AnnotatedScrollBarInteractionTests
  • ScrollVertically() : ScrollPresenterTestsWithAutomationPeer
  • ScrollView() : ItemsViewProperties , ItemsView , ScrollView
  • ScrollView_BringingIntoView() : ItemsViewSummaryPage , ScrollViewBringIntoViewPage
  • ScrollView_ExtentChanged() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ExtentChangedLog() : ItemsViewIntegrationPage
  • ScrollView_GettingFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_GotFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_Loaded() : ItemsViewBlankPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_LoadedLog() : ItemsViewIntegrationPage
  • ScrollView_LosingFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_LostFocus() : ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_PointerWheelChanged() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • ScrollView_ScrollAnimationStarting() : ItemsViewBlankPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , VariableSizedItemsPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ScrollAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollView_ScrollCompleted() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_ScrollCompletedLog() : ItemsViewIntegrationPage
  • ScrollView_ScrollStarting() : ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollView_SizeChanged() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_SizeChangedLog() : ItemsViewIntegrationPage
  • ScrollView_StateChanged() : ItemsViewBlankPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_StateChangedLog() : ItemsViewIntegrationPage
  • ScrollView_ViewChanged() : ItemsViewBlankPage , ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , VariableSizedItemsPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ViewChangedForCurrentElementVisual() : ItemsViewSummaryPage
  • ScrollView_ViewChangedForLockedItemsVisuals() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • ScrollView_ViewChangedLog() : ItemsViewIntegrationPage
  • ScrollView_ZoomAnimationStarting() : ItemsViewBlankPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollView_ZoomAnimationStartingLog() : ItemsViewIntegrationPage
  • ScrollView_ZoomCompleted() : ItemsViewBlankPage , ItemsViewInteractiveTestsPage , ItemsViewPictureLibraryPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ObjectModelTestPage , ScrollViewBlankPage , ScrollViewBringIntoViewPage
  • ScrollView_ZoomCompletedLog() : ItemsViewIntegrationPage
  • ScrollView_ZoomStarting() : ScrollViewBlankPage , ScrollViewDynamicPage
  • ScrollViewBlankPage() : ScrollViewBlankPage
  • ScrollViewBringIntoViewOperation() : ScrollViewBringIntoViewOperation
  • ScrollViewBringIntoViewPage() : ScrollViewBringIntoViewPage
  • ScrollViewDynamicPage() : ScrollViewDynamicPage
  • ScrollViewDynamicPage_Loaded() : ScrollViewDynamicPage
  • ScrollViewer() : ItemsRepeaterScrollHost
  • ScrollViewer2_DirectManipulationCompleted() : ScrollPresenterChainingAndRailingPage
  • ScrollViewer2_DirectManipulationStarted() : ScrollPresenterChainingAndRailingPage
  • ScrollViewer_DirectManipulationCompleted() : DynamicPage , SimpleRectanglePage
  • ScrollViewer_DirectManipulationStarted() : DynamicPage , SimpleRectanglePage
  • ScrollViewer_ViewChanged() : GroupedListViewBasePage , ScrollViewerPage , DynamicPage , SimpleRectanglePage , VariableSizedItemsPage , ScrollPresenterBringIntoViewPage
  • ScrollViewer_ViewChanging() : ScrollViewerPage , VariableSizedItemsPage
  • ScrollViewerAdapterPage() : ScrollViewerAdapterPage
  • ScrollViewerIRefreshInfoProviderAdapter() : ScrollViewerIRefreshInfoProviderAdapter
  • ScrollViewerIRefreshInfoProviderDefaultAnimationHandler() : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • ScrollViewerPage() : ScrollViewerPage
  • ScrollViewerPage_Loaded() : ScrollViewerPage
  • ScrollViewerSettingSelectionDoesNotMoveFocus() : RadioButtonsTests
  • ScrollViewerViewToString() : ScrollViewerPage , VariableSizedItemsPage
  • ScrollviewerWithScroll_ViewChanged() : NumberBoxPage
  • ScrollViewKeyboardAndGamepadNavigationPage() : ScrollViewKeyboardAndGamepadNavigationPage
  • ScrollViewPage() : ScrollViewPage
  • ScrollViewProperties() : ScrollViewProperties
  • ScrollViewProperty() : ItemsViewProperties
  • ScrollViewsWithSimpleContentsPage() : ScrollViewsWithSimpleContentsPage
  • ScrollViewsWithSimpleContentsPage_KeyDown() : ScrollViewsWithSimpleContentsPage
  • ScrollViewsWithSimpleContentsPage_Loaded() : ScrollViewsWithSimpleContentsPage
  • ScrollViewTestHooksHelper() : ScrollViewTestHooksHelper
  • ScrollViewWithRTLFlowDirectionPage() : ScrollViewWithRTLFlowDirectionPage
  • ScrollViewWithScrollControllersPage() : ScrollViewWithScrollControllersPage
  • ScrollWhileUsingExpressionAnimationSources() : ScrollPresenterTestsWithAutomationPeer
  • ScrollWithinARepeatedMandatorySnapPoint_Center() : ScrollPresenterTestsWithInputHelper
  • ScrollWithinARepeatedMandatorySnapPoint_Far() : ScrollPresenterTestsWithInputHelper
  • ScrollWithinARepeatedMandatorySnapPoint_Near() : ScrollPresenterTestsWithInputHelper
  • ScrollWithMouseWheel() : ScrollPresenterTestsWithInputHelper
  • ScrollWithNonSystemManipulationMode() : ScrollPresenterTestsWithInputHelper
  • SearchEntireTreeForContainer() : NavigationView
  • SearchEntireTreeForIndexPath() : NavigationView
  • SearchTreeForIRefreshInfoProvider() : RefreshContainer
  • SearchTreeForIRefreshInfoProviderRecursiveHelper() : RefreshContainer
  • SearchVisualTree() : RatingControlPage
  • SecondaryCommandAsFE_Loaded() : CommandBarFlyoutPage
  • SecondaryCommands() : CommandBarFlyout
  • SecondaryWindowLightConfiguration() : SecondaryWindowLightConfiguration
  • Select() : ItemContainerAutomationPeer , ItemsView , NavigationViewItemAutomationPeer , RadioButtons , SelectionModelTests , SelectionModel , final , RepeaterItemAutomationPeer , GroupedRepeaterItem , GroupedRepeaterItemAutomationPeer , TreeViewItem , TreeViewItemAutomationPeer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer
  • Select5ThenChangeSourceButton_Clicked() : RadioButtonsPage
  • SelectAll() : ItemsView , SelectorBase , SelectionModel , final , TreeView , ViewModel
  • SelectAllFlat() : SelectionModel
  • SelectandMoveOverflowItem() : NavigationView
  • SelectAt() : SelectionModel
  • SelectByIndex() : RadioButtonsTests , ViewModel
  • SelectByIndexButton1_Click() : RadioButtonsFocusPage
  • SelectByIndexButton2_Click() : RadioButtonsFocusPage
  • SelectByIndexButton_Click() : RadioButtonsPage
  • SelectByItem() : RadioButtonsTests
  • SelectByItemButton_Click() : RadioButtonsPage
  • SelectedBrush() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • SelectedBrushIndex() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • SelectedBrushIndexProperty() : InkToolBarPenButtonProperties
  • SelectedBrushProperty() : InkToolBarPenButtonProperties
  • SelectedCount() : final
  • SelectedEraser() : InkToolBarEraserButtonProperties , InkToolBarEraserButton
  • SelectedEraserProperty() : InkToolBarEraserButtonProperties
  • SelectedIndex() : final , RadioButtonsProperties , TabViewProperties , SelectionModel
  • SelectedIndexChanged() : PagerControlProperties , PipsPagerProperties
  • SelectedIndexProperty() : RadioButtonsProperties , TabViewProperties
  • SelectedIndices() : SelectionModel , final
  • SelectedItem() : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties , NavigationViewSelectionChangedEventArgs , SelectionModel
  • SelectedItemBindingsWork() : TreeViewTests
  • SelectedItemCombobox_SelectionChanged() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SelectedItemContainer() : NavigationViewSelectionChangedEventArgs
  • SelectedItemIsEnabledCheckbox_Checked() : NavigationViewPage
  • SelectedItemIsEnabledCheckbox_Unchecked() : NavigationViewPage
  • SelectedItemProperty() : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties
  • SelectedItems() : ItemsView , SelectedItems< T > , SelectionModel , TreeView
  • SelectedItemsTest() : TreeViewTests
  • SelectedNode() : TreeView
  • SelectedNodeChildrenChanged() : ViewModel
  • SelectedNodes() : TreeView
  • SelectedPageIndex() : PagerControlProperties , PipsPagerProperties
  • SelectedPageIndexProperty() : PagerControlProperties , PipsPagerProperties
  • SelectedPipStyle() : PipsPagerProperties
  • SelectedPipStyleProperty() : PipsPagerProperties
  • SelectedStencil() : InkToolBarStencilButtonProperties , InkToolBarStencilButton
  • SelectedStencilProperty() : InkToolBarStencilButtonProperties
  • SelectedStrokeWidth() : InkToolBarPenButtonProperties , InkToolBarPenButton
  • SelectedStrokeWidthProperty() : InkToolBarPenButtonProperties
  • SelectFirstFocusableItem() : SelectorBar
  • SelectImpl() : SelectionModel
  • SelectIndexButton_Click() : TabViewPage
  • SelectingAnItemInLeftCompactOrLeftMinimalClosesPane() : PaneBehaviorTests
  • SelectingNonTopLevelItemInOverflow() : SelectionTests
  • SelectionChanged() : ItemsViewProperties , NavigationViewProperties , RadioButtonsProperties , SelectionModelProperties , SelectorBarProperties , TabViewProperties , TreeViewProperties , SelectionContainerAutomationPeer
  • SelectionContainer() : ItemContainerAutomationPeer , NavigationViewItemAutomationPeer , SelectionContainer , TabViewItemAutomationPeer , TreeViewItemAutomationPeer
  • SelectionContainerAutomationPeer() : SelectionContainerAutomationPeer
  • SelectionEllipseChangesColorAccordingToSelectedColor() : ColorPickerTests
  • SelectionEllipsePositionChanged() : ColorPickerPage
  • SelectionEllipseShouldBeLight() : ColorSpectrum
  • SelectionEllipseStrokeChanged() : ColorPickerPage
  • SelectionFlyout() : NumberBoxProperties
  • SelectionFlyoutProperty() : NumberBoxProperties
  • SelectionFollowFocus_Checked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SelectionFollowFocus_Unchecked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SelectionFollowFocusTest() : SelectionTests
  • SelectionFollowsFocus() : NavigationViewProperties
  • SelectionFollowsFocusProperty() : NavigationViewProperties
  • SelectionFollowsFocusSetter_SelectionChanged() : NavigationViewTopNavOnlyPage
  • SelectionHighlightColor() : NumberBoxProperties
  • SelectionHighlightColorProperty() : NumberBoxProperties
  • SelectionInvalidatedDueToCollectionChange() : SelectionModel
  • SelectionMode() : ItemsViewProperties , TreeViewProperties
  • SelectionMode_SelectionChanged() : CalendarViewPage
  • SelectionModel() : SelectionModel
  • SelectionModel_PropertyChanged() : FlatSample , TreeViewSample
  • SelectionModelChildrenRequestedEventArgs() : SelectionModelChildrenRequestedEventArgs
  • SelectionModelProperties() : SelectionModelProperties
  • SelectionModeProperty() : ItemsViewProperties , TreeViewProperties
  • SelectionNode() : final
  • SelectionState() : TreeViewNode
  • SelectionStateBasedOnChildren() : ViewModel
  • SelectionTest() : RadioButtonsTests , TabViewTests
  • SelectItem() : NavigationViewTests
  • SelectItemButton_Click() : TabViewPage
  • SelectItemUsingAPI() : HierarchicalNavigationViewDataBinding
  • SelectLastRootNode_Click() : TreeViewPage
  • SelectNode() : ViewModel
  • SelectorBar() : SelectorBar
  • SelectorBar_Loaded() : SelectorBarSummaryPage
  • SelectorBar_SelectionChanged() : SelectorBarSamplePage , SelectorBarSummaryPage
  • SelectorBarItemProperties() : SelectorBarItemProperties
  • SelectorBarItemSelection() : SelectorBarTests
  • SelectorBarPage() : SelectorBarPage
  • SelectorBarProperties() : SelectorBarProperties
  • SelectorBarSamplePage() : SelectorBarSamplePage
  • SelectorBarSelectedItem() : SelectorBarTests
  • SelectorBarSummaryPage() : SelectorBarSummaryPage
  • SelectorBase() : SelectorBase
  • SelectOverflowItem() : NavigationView
  • SelectPageInNumberPanel() : PagerControlTestBase
  • SelectPageInPager() : PipsPagerTestBase
  • SelectRange() : SelectionModel , final
  • SelectRangeFromAnchor() : SelectionModelTests , SelectionModel
  • SelectRangeFromAnchorImpl() : SelectionModel
  • SelectRangeFromAnchorTo() : SelectionModel
  • SelectRangeFromAnchorWithGroupImpl() : SelectionModel
  • SelectRangeImpl() : SelectionModel
  • SelectRangeRegressionTest() : SelectionModelTests
  • SelectRoot2Item_Click() : TreeViewPage
  • SelectSecondItem() : HierarchicalNavigationViewDataBinding , HierarchicalNavigationViewMarkup
  • SelectSelectableItemWithOffset() : NavigationView
  • SelectSingleItem() : ViewModel
  • SelectsOnInvoked() : NavigationViewItemProperties
  • SelectsOnInvokedProperty() : NavigationViewItemProperties
  • SelectSource() : ParallaxViewTests
  • SelectStyleCore() : TreeViewItemStyleSelector
  • SelectSubMenuItem() : HierarchicalNavigationViewDataBinding
  • SelectTarget() : ParallaxViewTests
  • SelectTemplateCore() : MySelector , MyContainerSelector , MySelector , TreeViewItemTemplateSelector
  • SelectTemplateKey() : RecyclingElementFactoryProperties
  • SelectTextBoxes() : ColorPickerTests
  • SelectValueInPagerComboBox() : PagerControlTestBase
  • SelectWithGroupImpl() : SelectionModel
  • SelectWithPathImpl() : SelectionModel
  • SendMouseLeave() : WebView2
  • SendValueToNumberBox() : PagerControlTestBase
  • set() : sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >
  • SetAcrylicBrush() : AcrylicBrushPage
  • SetAcrylicBrushButton_Click() : AcrylicBrushPage
  • SetActionButtonContentTo() : TeachingTipTests
  • SetActiveContentTransparent_Click() : TabViewPage
  • SetActiveTabTransparent_Click() : TabViewPage
  • SetAddToMapFunc() : XamlType
  • SetAlignSelf() : Flex
  • SetAnchorCandidates() : ScrollingAnchorRequestedEventArgs
  • SetAnchorElement() : ScrollingAnchorRequestedEventArgs
  • SetAnchorIndex() : SelectionModelTests , SelectionModel
  • SetAnimatedVisualPlayerSource() : ProgressRing
  • SetAnimation() : ScrollingScrollAnimationStartingEventArgs , ScrollingZoomAnimationStartingEventArgs
  • SetAnimationQueueBehavior() : AnimatedIcon , AnimatedIconTestHooks
  • SetAnimations() : ImageIRefreshInfoProviderAdapter , ScrollViewerIRefreshInfoProviderAdapter , IRefreshInfoProviderAdapter
  • SetAreCheckStatesEnabled() : RadioMenuFlyoutItemProperties
  • SetArrangeWidthFromItemsInfo() : LinedFlowLayout
  • SetAsRootAndWaitForColorSpectrumFill() : ColorPickerTests
  • SetAt() : VectorInnerImpl< VectorOptions, Wrapper > , ObservableVector< T > , LinedFlowLayoutItemAspectRatios , LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock , SwipeItems , TreeViewNodeVector , ViewModel , SelectedTreeNodeVector , SelectedItemsVector
  • SetAutoDisplayMode() : PagerControlTestBase
  • SetAutoHideScrollControllers() : ScrollViewTestHooks
  • SetAutomationIdForNodes() : TreeViewPage
  • SetAutomationName() : TeachingTipTests
  • SetAutomationPeerNames() : AnimatedVisualPlayerPage
  • SetAverageItemsPerLine() : LinedFlowLayout
  • SetBackgrounds() : CalendarViewPage
  • SetBinding() : SharedHelpers
  • SetBlackout() : CalendarViewPage
  • SetBlackouts() : CalendarViewPage
  • SetBooleanParameter() : SnapPointBase
  • SetBorderWidth() : RadioButtonsTests
  • SetBorderWidthButton_Click() : RadioButtonsPage
  • SetBorderWidthToInf() : RadioButtonsTests
  • SetBrushColor_Click() : CalendarViewPage
  • SetButtonListRepeaterSize() : PipsPagerExamples
  • SetButtonVisibilityModeFunction() : PagerControlTestBase , PipsPagerTestBase
  • SetCachedBoundsForDataIndex() : VirtualizingStackLayout
  • SetCalendarItemBorderThickness_Click() : CalendarViewPage
  • SetCalendarItemCornerRadius_Click() : CalendarViewPage
  • SetCalendarSize_Click() : CalendarViewPage
  • SetCanGoBack() : WebView2
  • SetCanGoForward() : WebView2
  • SetCaptionColor() : ItemsViewSummaryPage
  • SetCenterPoint() : ScrollingZoomAnimationStartingEventArgs
  • SetCheckBoxValue() : ItemsViewTestsWithInputHelper , ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
  • SetClearPrimaryCommandsFlyout() : CommandBarFlyoutPage
  • SetClearSecondaryCommandsFlyout() : CommandBarFlyoutPage
  • SetCloseButtonContent() : TeachingTipTests
  • SetClosedExceptionCount() : WebView2CoreObjectsPage
  • SetCollectionAddFunc() : XamlType
  • SetColor() : ColorSpectrum
  • SetColorAndUpdateControls() : ColorPicker
  • SetColorProperty() : IAnimatedVisualSource , AnimatedAcceptVisualSource , AnimatedBackVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , MockAnimatedIconSource , BrightnessSun , MockIAnimatedIconSource2 , LottieLogo
  • SetColorsButton_Click() : TabViewPage
  • SetColorSpectrumColor() : ColorPickerTests
  • SetComboBox() : TwoPaneViewTests
  • SetComboBoxDisplayMode() : PagerControlTestBase
  • SetCompositionBrush() : XamlCompBrush
  • SetContentElevation() : TeachingTip , TeachingTipTestHooks
  • SetContentLayoutOffsetX() : ScrollPresenterTestHooks
  • SetContentLayoutOffsetXDbg() : ScrollPresenter
  • SetContentLayoutOffsetY() : ScrollPresenterTestHooks
  • SetContentLayoutOffsetYDbg() : ScrollPresenter
  • SetContentMode() : TreeViewTests
  • SetContentMode_Click() : TreeViewPage
  • SetContext() : final
  • SetContractAnimationDuration() : TeachingTip , TeachingTipTestHooks
  • SetContractEasingFunction() : TeachingTip , TeachingTipTestHooks
  • SetControlHeight() : TwoPaneViewTests
  • SetControllerDefaultBackgroundColor() : WebView2
  • SetControlStackPanelBackground() : VisualPropertiesPage
  • SetControlStackPanelForeground() : VisualPropertiesPage
  • SetControlType() : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • SetControlWidth() : TwoPaneViewTests
  • SetCoreProcessFailedCount() : WebView2CoreObjectsPage
  • SetCoreWebView2InitializedCount() : WebView2CoreObjectsPage
  • SetCoreWebViewAndVisualSize() : WebView2
  • SetCorrelationId() : ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs
  • SetCurrentElementIndex() : ItemsView
  • SetCustomIndexOfFunction() : VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
  • SetCustomInteractionRatio() : RefreshInfoProviderImpl
  • SetCustomIsInteractingForRefresh() : RefreshInfoProviderImpl
  • SetDataSource() : TopNavigationViewDataProvider
  • SetDayItemFontSize_Click() : CalendarViewPage
  • SetDayItemMargin_Click() : CalendarViewPage
  • SetDefaultInputScope() : NumberBox
  • SetDeferral() : TeachingTipClosingEventArgs
  • SetDensityColors() : CalendarViewPage
  • SetDesiredAspectRatioFromItemsInfo() : LinedFlowLayout
  • SetDesiredAspectRatios() : LinedFlowLayout , LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetDisplayMode() : NavigationView , PagerControlTestBase
  • SetDraggedOverItem() : TreeViewList
  • SetDropShadow() : NavigationView
  • SetDurationMultiplier() : AnimatedIcon , AnimatedIconTestHooks
  • SetDynamicLabelSecondaryCommand() : CommandBarFlyoutPage
  • SetDynamicOverflowContentRoot() : CommandBarFlyoutPage
  • SetDynamicPrimaryCommand() : CommandBarFlyoutPage
  • SetDynamicVisibilitySecondaryCommand() : CommandBarFlyoutPage
  • SetElementFactoryElementIndex() : RepeaterTestHooks
  • SetEllipsisDropDownItemDataTemplate() : BreadcrumbBarItem
  • SetEllipsisItem() : BreadcrumbBarItem
  • SetEndPosition() : ScrollingScrollAnimationStartingEventArgs
  • SetEndZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • SetEnsureCoreWebView2CompletionCount() : WebView2CoreObjectsPage
  • SetExpandAnimationDuration() : TeachingTip , TeachingTipTestHooks
  • SetExpandEasingFunction() : TeachingTip , TeachingTipTestHooks
  • SetExpectedViewportShift() : ViewportManagerWithPlatformFeatures
  • SetFallbackContent() : AnimatedVisualPlayer
  • SetFirstOfMonthLabelFontSize_Click() : CalendarViewPage
  • SetFirstOfMonthLabelMargin_Click() : CalendarViewPage
  • SetFirstOfYearDecadeLabelFontSize_Click() : CalendarViewPage
  • SetFirstOfYearDecadeLabelMargin_Click() : CalendarViewPage
  • SetFirstPageButtonVisibilityMode() : PagerControlTestBase
  • SetFirstTabSelectedBackgroundPathFill() : TabViewPage
  • SetFlexBasis() : Flex
  • SetFlexGrow() : Flex
  • SetFlexShrink() : Flex
  • SetFlyoutCheckbox_Checked() : DropDownButtonPage
  • SetFlyoutCheckBox_Checked() : SplitButtonPage
  • SetFlyoutCheckbox_Unchecked() : DropDownButtonPage
  • SetFlyoutCheckBox_Unchecked() : SplitButtonPage
  • SetFocusElementIndex() : ItemsView
  • SetFocusToFirstBreadcrumbBarItem() : BreadcrumbTests
  • SetForcedIndexBasedLayoutOrientation() : Layout
  • SetForegroundClick() : InfoBarPage
  • SetHeaderButton_Click() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • SetHeroContent() : TeachingTipTests
  • SetHorizontalInfo() : CanvasScrollControllerConsumer
  • SetHorizontalOffset() : ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs , CanvasScrollControllerConsumer
  • SetHorizontalOrientationMargin() : InfoBarPanelProperties
  • SetIcon() : TeachingTipTests
  • SetIconCheckBox_CheckedChanged() : TitleBarPageWindow
  • SetIgnoredValue() : SnapPointWrapper< T >
  • SetIndex() : BreadcrumbBarItem
  • SetIndexBasedLayoutOrientation() : Layout
  • SetIndexedValue() : CustomProperty
  • SetIndexToSelect() : RadioButtonsTests
  • SetInternalPullDirection() : RefreshVisualizer , IRefreshVisualizerPrivate
  • SetInvalidMaxZoomFactorValues() : ScrollPresenterTests
  • SetInvalidMinZoomFactorValues() : ScrollPresenterTests
  • SetInvalidSelectedItem_Click() : NavigationViewTopNavOnlyPage
  • SetIsAlphaEnabled() : ColorPickerTests
  • SetIsAnimationsEnabledOverride() : ScrollPresenterTestHooksHelper
  • SetIsBindable() : XamlType
  • SetIsCanceled() : InteractionTrackerAsyncOperation
  • SetIsCompleted() : InteractionTrackerAsyncOperation
  • SetIsDelayed() : InteractionTrackerAsyncOperation
  • SetIsEllipsisDropDownItem() : BreadcrumbBarItem
  • SetIsHorizontalOrientation() : ColorPickerTests
  • SetIsIdle() : TeachingTip
  • SetIsLightTheme() : RevealBorderLight
  • SetIsMoreButtonEnabled() : ColorPickerTests
  • SetIsMouseButtonPressed() : PointerInfo< T >
  • SetIsMousePointerOver() : PointerInfo< T >
  • SetIsPenPointerOver() : PointerInfo< T >
  • SetIsPressLight() : RevealHoverLight
  • SetIsRTL() : ColorPickerTests
  • SetIsScrollable() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • SetIsScrollControllerRequest() : InteractionTrackerAsyncOperation
  • SetIsTarget() : XamlAmbientLightProperties
  • SetIsTouchPointerOver() : PointerInfo< T >
  • SetIsVerboseLevel() : MUXControlsTestHooksLoggingMessageEventArgs
  • SetIsWideLight() : RevealBorderLight
  • SetItemRangeArrangeWidth() : LinedFlowLayout
  • SetItemsRangeEstablishedLength() : LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetItemsSource() : TreeViewItem
  • SetItemsViewItemContainerRevokers() : ItemsView
  • SetItemType() : RadioButtonsTests
  • SetKeepInteriorCornersSquare() : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • SetKnownCommandLocalizedControlTypes() : CommandBarFlyoutCommandBar
  • SetLargeWidth_Click() : TabViewSizingPage
  • SetLastPageButtonVisibilityMode() : PagerControlTestBase
  • SetLayoutBoundsForDataIndex() : final
  • SetLayoutBoundsForRealizedIndex() : final
  • SetLayoutCompleted() : ScrollPresenterExpressionAnimationSourcesPage
  • SetLayoutExtent() : ViewportManager , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures
  • SetLayoutForcedIndexBasedLayoutOrientation() : LayoutsTestHooks
  • SetLayoutId() : RepeaterTestHooks
  • SetLayoutOrigin() : FlowLayoutAlgorithm
  • SetLength() : TwoPaneViewTests
  • SetLinedFlowLayoutForcedAverageItemAspectRatio() : LayoutsTestHooks
  • SetLinedFlowLayoutForcedAverageItemsPerLineDivider() : LayoutsTestHooks
  • SetLinedFlowLayoutForcedWrapMultiplier() : LayoutsTestHooks
  • SetLinedFlowLayoutIsFastPathSupported() : LayoutsTestHooks
  • SetLinedFlowLayoutLogItemIndex() : LayoutsTestHooks
  • SetLoadedCount() : WebView2CoreObjectsPage
  • SetLoggingLevel() : ItemsViewTestsWithInputHelper::LoggingHelper , ScrollPresenterTestsBase , SwipeControlTests
  • SetLoggingLevelForInstance() : MUXControlsTestHooks
  • SetLoggingLevelForInstanceImpl() : MUXControlsTestHooks
  • SetLoggingLevelForType() : MUXControlsTestHooks
  • SetLoggingLevelForTypeImpl() : MUXControlsTestHooks
  • SetLogItemIndex() : ItemsRepeater , RepeaterTestHooks
  • SetLottieBackgroundColor() : ProgressRing
  • SetLottieForegroundColor() : ProgressRing
  • SetLuminosityButton_Clicked() : AcrylicRenderingPage
  • SetMajorSize() : OrientationBasedMeasures
  • SetMajorStart() : OrientationBasedMeasures
  • SetMaxColumnsButton_Click() : RadioButtonsPage
  • SetMaxPosition() : ScrollPresenterTestHooks
  • SetMaxPositionDbg() : ScrollPresenter
  • SetMaxPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • SetMaxPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • SetMaxSaturation() : ColorPickerTests
  • SetMaxTicksCountdown() : InteractionTrackerAsyncOperation
  • SetMaxValue() : ColorPickerTests
  • SetMaxWidths() : LinedFlowLayout , LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetMessage() : MUXControlsTestHooksLoggingMessageEventArgs
  • SetMinorStart() : OrientationBasedMeasures
  • SetMinPosition() : ScrollPresenterTestHooks
  • SetMinPositionDbg() : ScrollPresenter
  • SetMinPositionExpressionAnimationExpression() : ScrollPresenterTestHooks
  • SetMinPositionExpressionAnimationExpressionDbg() : ScrollPresenter
  • SetMinSaturation() : ColorPickerTests
  • SetMinTallModeHeight() : TwoPaneViewTests
  • SetMinValue() : ColorPickerTests
  • SetMinWideModeWidth() : TwoPaneViewTests
  • SetMinWidths() : LinedFlowLayout , LinedFlowLayoutItemsInfoRequestedEventArgs
  • SetMonthYearItemFontSize_Click() : CalendarViewPage
  • SetMonthYearItemMargin_Click() : CalendarViewPage
  • SetNaNButton_Click() : NumberBoxPage
  • SetNavigationCompletedCount() : WebView2CoreObjectsPage
  • SetNavigationStartingCount() : WebView2CoreObjectsPage
  • SetNavigationViewItemBaseRevokers() : NavigationView
  • SetNavigationViewItemRevokers() : NavigationView
  • SetNavigationViewParent() : NavigationViewItemBase
  • SetNavViewHeight() : NavigationViewTestsBase
  • SetNavViewWidth() : NavigationViewTestsBase
  • SetNextPageButtonVisibilityMode() : PagerControlTestBase , PipsPagerTestBase
  • SetNumberBoxDisplayMode() : PagerControlTestBase
  • SetNumberOfColumns() : RadioButtonsTests
  • SetNumberOfItems() : RadioButtonsTests
  • SetNumberOfItemsButton_Click() : RadioButtonsPage
  • SetNumberOfWeeksInView_Click() : CalendarViewPage
  • SetNumberPanelDisplayMode() : PagerControlTestBase
  • SetOffsetsBeforeLoading() : ScrollPresenterTests
  • SetOffsetsChangeCorrelationId() : ScrollingScrollAnimationStartingEventArgs
  • SetOffsetsChangeVelocityParameters() : ScrollPresenterTestHooks
  • SetOrientation() : PipsPagerTestBase
  • SetOriginTemplate() : RecyclePool
  • SetOutputDebugStringLevel() : ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper , ScrollPresenterTestsBase , SwipeControlTests
  • SetOutputDebugStringLevelForType() : MUXControlsTestHooks
  • SetOutputDebugStringLevelForTypeImpl() : MUXControlsTestHooks
  • SetOverflowButtonVisibility() : NavigationView
  • SetOwner() : sealed< T, fallback, RawStorageT >
  • SetOwners() : ViewModel
  • SetOwningFlyout() : CommandBarFlyoutCommandBar
  • SetPanelMinorSize() : FlowLayoutTests
  • SetPanePriority() : TwoPaneViewTests
  • SetPaneTitleFrameworkElementParent() : NavigationView
  • SetPaneToggleButtonAutomationName() : NavigationView
  • SetPanningElementExpressionAnimationSources() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • SetPanningFrameworkElement() : BiDirectionalScrollController::UniScrollController , CompositionScrollControllerPanningInfo
  • SetParent() : TreeViewNodeVector
  • SetParentBreadcrumb() : BreadcrumbBarItem
  • SetParentMapControl() : MapElementsLayer
  • SetParentTabView() : TabViewItem
  • SetPeekingMode() : RefreshInfoProviderImpl
  • SetPendingViewportShift() : ViewportManagerWithPlatformFeatures
  • SetPlaybackRate() : IAnimatedVisual , AnimatedVisualPlayer::final
  • SetPointerPressed() : PointerInfo< T >
  • SetPoolInstance() : RecyclePoolProperties , RecyclePool
  • SetPopupAutomationProperties() : TeachingTip
  • SetPreferredPlacement() : TeachingTipTests
  • SetPresenter() : CommandBarFlyoutCommandBar
  • SetPresenterName() : CommandBarFlyoutCommandBar
  • SetPreviousPageButtonVisibilityMode() : PagerControlTestBase , PipsPagerTestBase
  • SetProgress() : AnimatedVisualPlayer , IAnimatedVisual
  • SetProgressBarIndicatorWidth() : ProgressBar
  • SetProgressButton_Click() : AnimatedVisualPlayerPage
  • SetProgressObject() : IAnimatedVisual
  • SetPropertiesForEllipsisItem() : BreadcrumbBarItem
  • SetPropertiesForLastItem() : BreadcrumbBarItem
  • SetQueueLength() : AnimatedIcon , AnimatedIconTestHooks
  • SetRatingTo() : RatingControl
  • SetRequestId() : InteractionTrackerAsyncOperation
  • SetRequiredOperation() : InteractionTrackerAsyncOperation
  • SetReturnTopForOutOfWindowPlacement() : TeachingTipTests , TeachingTipTestHooks , TeachingTip
  • SetReuseKey() : RecyclePool
  • SetRoot1HasUnrealizedChildren_Click() : TreeViewPage
  • SetRootPanelChildToFallbackIcon() : AnimatedIcon
  • SetSaturation() : ColorPickerTests
  • SetScalarParameter() : SnapPointBase
  • SetScalarProperty() : AnimatedAcceptVisualSource , AnimatedChevronDownSmallVisualSource , AnimatedChevronRightDownSmallVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedFindVisualSource , AnimatedGlobalNavigationButtonVisualSource , AnimatedSettingsVisualSource , BrightnessSun , LottieLogo , AnimatedBackVisualSource
  • SetScrollBar() : ScrollBarController
  • SetScrollOrientation() : OrientationBasedMeasures
  • SetScrollPercent() : ScrollPresenterAutomationPeer
  • SetScrollPresenter() : ScrollInputHelper
  • SetScrollPresenterLoggingLevel() : ScrollViewTestsWithInputHelper
  • SetScrollViewer() : ScrollInputHelper
  • SetScrollViewerHorizontalOffsetButtonClick() : UniformGridLayoutDemo
  • SetScrollViewerMaxHeightButtonClick() : UniformGridLayoutDemo
  • SetScrollViewerMaxSize() : PipsPager
  • SetScrollViewerMaxWidthButtonClick() : UniformGridLayoutDemo
  • SetScrollViewerProperties() : TwoPaneView
  • SetScrollViewerVerticalOffsetButtonClick() : UniformGridLayoutDemo
  • SetScrollViewLoggingLevel() : ScrollViewTestsWithInputHelper
  • SetSecondaryCommandsToCloseWhenExecuted() : CommandBarFlyout
  • SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI() : NavigationView
  • SetSelectionModel() : SelectorBase
  • SetShouldBeginAttachingLights() : MaterialHelper
  • SetShouldConstrainToRootBounds() : TeachingTipTests
  • SetShouldContinueAttachingLights() : MaterialHelper
  • SetSize() : UniformGridLayoutState , IAnimatedVisual
  • SetSmallWidth_Click() : TabViewSizingPage
  • SetSnapPointVisualizationColor() : ScrollPresenterTestHooks
  • SetSource() : RadioButtonsTests
  • SetSourceElement() : ScrollInputHelper
  • SetSpeedUpMultiplier() : AnimatedIcon , AnimatedIconTestHooks
  • SetStartPosition() : ScrollingScrollAnimationStartingEventArgs
  • SetStartZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • SetState() : AnimatedIconProperties , RevealBrushProperties
  • SetState_Click() : RevealStatesPage
  • SetSubtitle() : TeachingTipTests
  • SetSubtitleButton_Click() : TitleBarPageWindow
  • SetTabSeparatorOpacity() : TabView
  • SetTabViewWidth_Click() : TabViewPage
  • SetTailElevation() : TeachingTip , TeachingTipTestHooks
  • SetTallModeConfiguration() : TwoPaneViewTests
  • SetTargetElement() : ScrollInputHelper
  • SetTeachingTipLocation() : TeachingTipTests
  • SetTestHooksEnabled() : ColumnMajorUniformToLargestGridLayout , RadioButtons , RadioButtonsTestHooks
  • SetTestScreenBounds() : TeachingTip , TeachingTipTestHooks
  • SetTestWindowBounds() : TeachingTipTestHooks , TeachingTip
  • SetTextBoxTextToPlayerProgress() : AnimatedVisualPlayerPage
  • SetTextButton_Click() : NumberBoxPage
  • SetThirdDimensionSliderChannel() : ColorPicker
  • SetThreshold() : NavigationViewTestsBase
  • SetThumbGhostVisibility() : AnnotatedScrollBar
  • SetTicksCountdown() : InteractionTrackerAsyncOperation
  • SettingAnimationOptimizationDoesNotCrash() : AnimatedVisualPlayerTests
  • Settings_ColorValuesChanged() : RevealSimpleListPage
  • SettingsAccessibilitySetTest() : CommonTests
  • SettingsCanBeUnselected() : SelectionTests
  • SettingScrollControllerProperties() : ScrollPresenterTests
  • SettingsItem() : NavigationViewProperties , NavigationViewItemsFactory
  • SettingsItemClickTest() : EventTests
  • SettingsItemGamepadTest() : CommonTests
  • SettingsItemProperty() : NavigationViewProperties
  • SettingsItemVisibilityCheckbox_Checked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewCustomThemeResourcesPage
  • SettingsItemVisibilityCheckbox_Unchecked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage , NavigationViewCustomThemeResourcesPage
  • SettingStateOnGrandParentPropagatesToGrandChildAnimatedIcon() : AnimatedIconTests
  • SettingStateOnParentDoesNotPropagateToChildNonAnimatedIcon() : AnimatedIconTests
  • SettingStateOnParentPropagatesToChildAnimatedIcon() : AnimatedIconTests
  • SettingTitleOrSubtitleToEmptyStringCollapsesTextBox() : TeachingTipTests
  • SetTipFollowsTarget() : TeachingTipTests , TeachingTipTestHooks , TeachingTip
  • SetTipIsTargeted() : TeachingTipTests
  • SetTipShouldHaveShadow() : TeachingTip , TeachingTipTestHooks
  • SetTitle() : TeachingTipTests
  • SetToolTipIsOpen() : AnnotatedScrollBar
  • SetTransformExpressionAnimationExpression() : ScrollPresenterTestHooks
  • SetTransformExpressionAnimationExpressionDbg() : ScrollPresenter
  • SetTwoWayBoundNaNButton_Click() : NumberBoxPage
  • SetUniformGridLayoutMaximumRowsOrColumnsButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinColumnSpacingButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinItemHeightButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinItemWidthButtonClick() : UniformGridLayoutDemo
  • SetUniformGridLayoutMinRowSpacingButtonClick() : UniformGridLayoutDemo
  • SetUnloadedCount() : WebView2CoreObjectsPage
  • SetUnshiftableShift() : ViewportManagerWithPlatformFeatures
  • SetupAnimatedValuesSpy() : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • SetupAutoSuggestBox() : AutoSuggestBoxTests
  • SetUpBridge() : IScrollControllerAdapter
  • SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter() : ScrollPresenterTests
  • SetupBringIntoViewUIWithScrollViewerInsideScrollViewer() : ScrollPresenterTests
  • SetupClipAnimation() : SwipeControl
  • SetupColorPickerTest() : ColorPickerTests
  • SetupComboBox() : ComboBoxTests
  • SetupCommandBarFlyoutTest() : CommandBarFlyoutTests
  • SetUpContainerReuseTest_Click() : TreeViewItemsSourceTestPage
  • SetUpCrumbledTest() : BreadcrumbTests
  • SetupCustomDragUIOverride_Click() : TreeViewPage
  • SetupDefaultAnchoringUI() : ScrollPresenterTests
  • SetupDefaultBringIntoViewUI() : ScrollPresenterTests
  • SetupDefaultBringIntoViewUIWithScrollViewer() : ScrollPresenterTests
  • SetupDefaultUI() : ItemsViewTests , ScrollPresenterTests , ScrollViewTests , SelectorBarTests , AcrylicBrushTests
  • SetupDefaultUIWithListView() : ParallaxViewTests
  • SetupDefaultUIWithScrollPresenter() : ParallaxViewTests
  • SetupDefaultUIWithScrollViewer() : ParallaxViewTests
  • SetupDragDropHandlersForApiTest_Click() : TreeViewPage
  • SetupDragToDropTarget_Click() : TreeViewPage
  • SetupExecuteExpressionAnimation() : SwipeControl
  • SetupExpandingNodeEvent_Click() : TreeViewPage
  • SetUpInteractionElements() : AnnotatedScrollBar
  • SetupInteractionTrackerBoundaries() : ScrollPresenter
  • SetupInteractionTrackerZoomFactorBoundaries() : ScrollPresenter
  • SetUpItemsViewForSelectionTests() : ItemsViewTestsWithInputHelper
  • SetupNavigationView() : NavigationViewTests
  • SetupNavigationViewHierarchy() : NavigationViewTests
  • SetupNavigationViewPaneContent() : NavigationViewTests
  • SetupNavigationViewScrolling() : NavigationViewTests
  • SetupNoReorderNodes_Click() : TreeViewPage
  • SetupNumberBox() : NumberBoxTests
  • SetupPositionBoundariesExpressionAnimations() : ScrollPresenter
  • SetupRepeater() : FlowLayoutCollectionChangeTests , ViewManagerTests
  • SetupRepeaterAnchoringUI() : ScrollPresenterTests
  • SetupScrollbars() : ScrollPresenterExpressionAnimationSourcesPage
  • SetupScrollControllerVisualInterationSource() : ScrollPresenter
  • SetupScrollControllerVisualInterationSourcePositionModifiers() : ScrollPresenter
  • SetupScrollPresenter() : DynamicPage , SimpleRectanglePage
  • SetupScrollPresenterVisualInteractionSource() : ScrollPresenter
  • SetUpScrollViewerOrientation() : FlowLayoutTests
  • SetupScrollViewTestWithImage() : ScrollViewTestsWithInputHelper
  • SetupSimpleSingleScrollViewTest() : ScrollViewTestsWithInputHelper
  • SetupSnapPoints() : ScrollPresenter
  • SetUpTemplateParts() : MenuBar
  • SetUpTest() : BreadcrumbTests
  • SetupTransformExpressionAnimations() : ScrollPresenter
  • SetupUIWithBiDirectionalScrollController() : ScrollPresenterTests
  • SetupUIWithParallaxViewInsideScrollPresenter() : ParallaxViewTests
  • SetupUIWithParallaxViewInsideScrollViewer() : ParallaxViewTests
  • SetupUIWithScrollControllers() : ScrollPresenterTests
  • SetupVisualInteractionSourceCenterPointModifier() : ScrollPresenter
  • SetupVisualInteractionSourceChainingMode() : ScrollPresenter
  • SetupVisualInteractionSourceMode() : ScrollPresenter
  • SetupVisualInteractionSourceRailingMode() : ScrollPresenter
  • SetupVisualInteractionSourceRedirectionMode() : ScrollPresenter
  • SetUpWebView() : MapControl
  • SetUseTestScreenBounds() : TeachingTip , TeachingTipTestHooks
  • SetUseTestWindowBounds() : TeachingTip , TeachingTipTestHooks
  • SetValue() : ProgressRingAutomationPeer , ColorSpectrumAutomationPeer , ColorSpectrum , ColorPickerSlider , XamlMember , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ValueProviderThunk< Owner > , RatingControlAutomationPeer , CustomProperty , ColorPickerTests , ColorPickerSliderAutomationPeer
  • SetValueButton_Click() : NumberBoxPage
  • SetValues() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , ScrollBarController , CompositionScrollController
  • SetVerticalInfo() : CanvasScrollControllerConsumer
  • SetVerticalOffset() : ScrollingZoomStartingEventArgs , CanvasScrollControllerConsumer , ScrollingScrollStartingEventArgs
  • SetVerticalOrientationMargin() : InfoBarPanelProperties
  • SetVerticalScrollControllerOnLoaded() : ItemsView
  • SetViewChangeCorrelationId() : InteractionTrackerAsyncOperation
  • SetViewModel() : SelectedTreeNodeVector , SelectedItemsVector
  • SetViewportChangedEvent() : TeachingTip
  • SetVisibleWindow() : ViewportManagerWithPlatformFeatures
  • SetVisualState() : TeachingTipAutomationPeer
  • SetWebViewElementFocus() : WebView2Tests
  • SetWideModeConfiguration() : TwoPaneViewTests
  • SetWidthForItem() : TopNavigationViewDataProvider
  • SetWrapMode() : PipsPagerTestBase
  • SetZoom_Click() : MapControlPage
  • SetZoomFactor() : ScrollingZoomStartingEventArgs , ScrollingScrollStartingEventArgs
  • SetZoomFactorBeforeLoading() : ScrollPresenterTests
  • SetZoomFactorChangeCorrelationId() : ScrollingZoomAnimationStartingEventArgs
  • SetZoomFactorChangeVelocityParameters() : ScrollPresenterTestHooks
  • Severity() : InfoBarProperties
  • SeverityComboBox_SelectionChanged() : InfoBarPage
  • SeverityProperty() : InfoBarProperties
  • ShadowCasterEaseOutStoryboard_Completed() : NavigationView
  • Shape() : ColorSpectrumProperties
  • ShapeProperty() : ColorSpectrumProperties
  • ShapeVisibilityAnimation() : AnimatedVisual
  • ShapeVisibilityAnimation_00() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_01() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_02() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_03() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_04() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_05() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_06() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_07() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_08() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_09() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_10() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_11() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_12() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_13() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_14() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_15() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_16() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_17() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_18() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_19() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_20() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_21() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_22() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_23() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_24() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_25() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_26() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_27() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_28() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_29() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisibilityAnimation_30() : LottieLogo::LottieLogo_AnimatedVisual
  • ShapeVisual() : ProgressRingDeterminate::AnimatedVisual
  • ShapeVisual_0() : AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • ShapeVisual_00() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_01() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_02() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_03() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_04() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_05() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_06() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_07() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_08() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_09() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual
  • ShapeVisual_10() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_11() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_12() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_13() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_14() : AnimatedAcceptVisualSource_AnimatedVisual
  • ShapeVisual_2() : AnimatedSettingsVisualSource_AnimatedVisual
  • SharedHelpers() : SharedHelpers
  • SharedLeafNode() : SelectionModel
  • Sharpness() : ITransform2DEffect
  • ShiftTabIntoItemsViewWithoutCurrentItem() : ItemsViewTestsWithInputHelper
  • ShortLongTextButton_Click() : TabViewPage
  • ShouldAnimate() : ItemCollectionTransitionProvider
  • ShouldAnimateCore() : RadialItemCollectionTransitionProvider , DefaultItemCollectionTransitionProvider , ItemCollectionTransitionProviderDerived , ItemCollectionTransitionProvider
  • ShouldBeginAttachingLights() : MaterialHelper
  • ShouldBorderLightBeOn() : RevealStatesPage
  • ShouldBreakLine() : FlowLayoutDerived , FlowLayout
  • ShouldCancelBringIntoView() : ScrollViewBringIntoViewOperation
  • ShouldChangeDataSource() : TopNavigationViewDataProvider
  • ShouldConstrainToRootBounds() : TeachingTipProperties
  • ShouldConstrainToRootBoundsProperty() : TeachingTipProperties
  • ShouldContinueAttachingLights() : MaterialHelper
  • ShouldContinueFillingUpSpace() : FlowLayoutAlgorithm , VirtualizingStackLayout
  • ShouldEnableToolTip() : NavigationViewItem
  • ShoulderNavigationEnabled() : NavigationViewProperties
  • ShoulderNavigationEnabledProperty() : NavigationViewProperties
  • ShoulderNavigationEnabledSetter_SelectionChanged() : NavigationViewTopNavOnlyPage
  • ShouldFallbackToComPointers() : sealed< T, fallback, RawStorageT >
  • ShouldNavigate() : WebView2
  • ShouldRepeaterShowInFlyout() : NavigationViewItem
  • ShouldShowBackButton() : NavigationView
  • ShouldShowBackOrCloseButton() : NavigationView
  • ShouldShowCloseButton() : NavigationView
  • ShouldShowContent() : NavigationViewItem
  • ShouldShowIcon() : NavigationViewItem
  • ShouldShowInfoBadge() : NavigationViewItem
  • ShouldStartDrag() : TabViewItem
  • ShouldVisitElement() : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • ShouldVisitProperty() : ControlVisualTreeTestFilter , CommonStylesVisualTreeTestSamples::CustomizedFilter
  • ShouldVisitPropertyValuePair() : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • ShouldYield() : final
  • ShowBorderThickness_Click() : ContentDialogPage
  • ShowDialog_Click() : ContentDialogPage , CornerRadiusPage , VisualPropertiesPage
  • ShowError() : ProgressBarProperties
  • ShowErrorProperty() : ProgressBarProperties
  • ShowFlyoutAt() : CommandBarFlyoutPage
  • ShowFooterItemButton_Click() : NavigationViewPage
  • ShowHideChildren() : NavigationViewItem
  • ShowHideChildrenItemsRepeater() : NavigationView
  • ShowHoverVisuals() : AnnotatedScrollBar
  • ShowInPlaceDialog_Click() : ContentDialogPage
  • ShowMenuFlyout() : MenuBarItem
  • ShowPaused() : ProgressBarProperties
  • ShowPausedProperty() : ProgressBarProperties
  • ShowRoundedDialog_Click() : CornerRadiusPage
  • ShowSelectionIndicator() : NavigationViewItem
  • ShowTextControlContextFlyoutStandard() : TextCommandBarFlyoutPage
  • ShowTextControlContextFlyoutTransient() : TextCommandBarFlyoutPage
  • ShowThumbGhostAtOffset() : AnnotatedScrollBar
  • ShowTimerTick() : TeachingTipPage
  • ShowToolTipAtOffset() : AnnotatedScrollBar
  • Shrink() : ScrollPresenterStackPanelAnchoringPage
  • ShrinkLineIfNeeded() : Flex
  • ShrinkTopNavigationSize() : NavigationView
  • ShuffleAndReset() : ResetableCollection-g< T >
  • SimluateDisabledByPolicyToggleButton_Checked() : RevealRegressionTestsPage
  • SimluateDisabledByPolicyToggleButton_Unchecked() : RevealRegressionTestsPage
  • SimpleRectanglePage() : SimpleRectanglePage
  • SimpleXamlStartStopEvent_RAII() : SimpleXamlStartStopEvent_RAII
  • SimulateComboBox_SelectionChanged() : TwoPaneViewPage
  • SimulateDisabledByPolicy() : MaterialHelperTestApi , MaterialHelperBase , MaterialHelperTestApi , MaterialHelperBase
  • SimulateDisplayRegions() : DisplayRegionHelperTestApi , DisplayRegionHelper , DisplayRegionHelperTestApi
  • SimulateMode() : DisplayRegionHelperTestApi , DisplayRegionHelper , DisplayRegionHelperTestApi , DisplayRegionHelper
  • SimulateTouch() : SplitButtonTestApi , SplitButtonTestHelper , SplitButtonTestApi
  • SimulateTouchCheckBox_Checked() : SplitButtonPage
  • SimulateTouchCheckBox_Unchecked() : SplitButtonPage
  • SingleRegionTest() : TwoPaneViewTests
  • SingleRowKeyboardTest() : RadioButtonsTests
  • SingleSelect() : SelectionModel
  • SingleSelectionFollowsFocus() : NavigationViewTemplateSettingsProperties
  • SingleSelectionFollowsFocusProperty() : NavigationViewTemplateSettingsProperties
  • SingleSelector() : SingleSelector
  • SingleSelectWithUnrealizedChildrenDoesNotMoveSelection() : TreeViewTests
  • SinkEvent() : ColorPickerTests::ColorPickerTestSetupHelper
  • Size() : SelectedItems< T > , AnimatedAcceptVisualSource_AnimatedVisual , ObservableVector< T > , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , VirtualLayoutContextAdapter::ChildrenCollection< T > , SwipeItems , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , VectorInnerImpl< VectorOptions, Wrapper > , TopNavigationViewDataProvider , AnimatedVisual , Flex , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , HashMap< K, V > , SplitVector< T, SplitVectorID > , SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize > , ViewModel
  • SizeTreeViewsForDrags_Click() : TreeViewPage
  • SizeValueChanged() : RefreshVisualizerPage
  • SizingTest() : TabViewTests
  • SkipToFirstPage() : PipsPagerPage
  • SkipToLastPage() : PipsPagerPage
  • SlideIn() : LinedFlowLayoutItemCollectionTransitionProvider
  • Slider_ValueChanged() : AnimatedIconPage
  • SliderDensityTest() : CommonStylesTests
  • SliderDensityTest_Click() : CommonStylesPage
  • SliderInteractionPage() : SliderInteractionPage
  • SliderInteractionProperties() : SliderInteractionProperties
  • SliderPage() : SliderPage
  • SliderRefreshInfoProviderAdapter() : SliderRefreshInfoProviderAdapter
  • SmallChange() : SliderInteraction , AnnotatedScrollBarProperties , NumberBoxProperties , SliderInteraction , ProgressBarAutomationPeer , ProgressRingAutomationPeer , RatingControlAutomationPeer , AnnotatedScrollBarProperties , NumberBoxProperties , NumberBoxAutomationPeer
  • SmallChangeProperty() : NumberBoxProperties , AnnotatedScrollBarProperties
  • SmallerIconWidth() : NavigationViewItemPresenterTemplateSettingsProperties
  • SmallerIconWidthProperty() : NavigationViewItemPresenterTemplateSettingsProperties
  • SmallerPaneToggleButtonWidth() : NavigationViewTemplateSettingsProperties
  • SmallerPaneToggleButtonWidthProperty() : NavigationViewTemplateSettingsProperties
  • SnapAverageItemsPerLine() : LinedFlowLayout
  • SnapCount() : SnapPointBase , RepeatedScrollSnapPoint , RepeatedZoomSnapPoint , ZoomSnapPoint , ScrollSnapPoint
  • SnappedAverageItemsPerLineDbg() : LinedFlowLayout
  • SnapPoint() : SnapPointWrapper< T >
  • SnapPointsMode() : ScrollingBringingIntoViewEventArgs , ScrollingScrollOptions , ScrollingZoomOptions , ScrollingBringingIntoViewEventArgs
  • SnapPointsPageChangeOffset() : ScrollPresenterTestsWithInputHelper
  • SnapPointsVectorChangedHelper() : ScrollPresenter
  • SnapPointsVectorItemInsertedHelper() : ScrollPresenter
  • SnapPointsViewportChangedHelper() : ScrollPresenter
  • SnapPointsWithInvalidArgsThrow() : ScrollPresenterTests
  • SnapPointWrapper() : SnapPointWrapper< T >
  • SnapsAt() : SnapPointWrapper< T > , SnapPointBase
  • SnapToFirstRepeatedScrollSnapPoint() : ScrollPresenterTests
  • SnapToFirstRepeatedZoomSnapPoint() : ScrollPresenterTests
  • SnapToPower() : ItemsViewTests , LinedFlowLayout
  • SortElements() : final
  • SortingAndFilteringPage() : SortingAndFilteringPage
  • SortPredicate() : RepeatedZoomSnapPoint , SnapPointBase , RepeatedScrollSnapPoint , ZoomSnapPoint , ScrollSnapPoint
  • Source() : IOpacityEffect , IHueRotationEffect , final , IAlphaMaskEffect , IDistantDiffuseEffect , IColorMatrixEffect , ICompositeStepEffect , IContrastEffect , IDistantSpecularEffect , IExposureEffect , IGammaTransferEffect , IGrayscaleEffect , IHueRotationEffect , IInvertEffect , ParallaxViewProperties , ILuminanceToAlphaEffect , IPointDiffuseEffect , IPosterizeEffect , IPremultiplyEffect , ILinearTransferEffect , IPremultiplyEffect , ISaturationEffect , ISpotDiffuseEffect , ISpotSpecularEffect , ITemperatureAndTintEffect , ITransform2DEffect , IUnPremultiplyEffect , AnimatedIconProperties , AnimatedVisualPlayerProperties , SelectionModelChildrenRequestedEventArgs , ParallaxViewProperties , SelectionModel , WebView2Properties , ISepiaEffect , WebView2Properties , AnimatedIconProperties , ImageIconProperties , AnimatedVisualPlayerProperties , AnimatedIconSourceProperties , ITemperatureAndTintEffect , ITransform2DEffect , ITintEffect , ISaturationEffect , ISpotSpecularEffect , ISpotDiffuseEffect , ISepiaEffect , IPointDiffuseEffect , IPosterizeEffect , IPointSpecularEffect , IInvertEffect , IOpacityEffect , ILuminanceToAlphaEffect , ILinearTransferEffect , IGammaTransferEffect , IGrayscaleEffect , IGaussianBlurEffect , IContrastEffect , IExposureEffect , IDistantSpecularEffect , IDistantDiffuseEffect , IAlphaMaskEffect , IColorMatrixEffect , IBorderEffect , final
  • Source1() : IArithmeticCompositeEffect , ICrossFadeEffect , IArithmeticCompositeEffect
  • Source1Amount() : IArithmeticCompositeEffect
  • Source2() : IArithmeticCompositeEffect , ICrossFadeEffect , IArithmeticCompositeEffect
  • Source2Amount() : IArithmeticCompositeEffect
  • SourceBeforeLoadTest() : WebView2Tests
  • SourceBindingTest() : WebView2Tests
  • SourceComboBoxSelectionChanged() : RadioButtonsPage
  • SourceElement() : MonochromaticOverlayPresenterProperties
  • SourceElementProperty() : MonochromaticOverlayPresenterProperties
  • SourceIndex() : SelectionModelChildrenRequestedEventArgs
  • SourceProperty() : WebView2Properties , AnimatedIconSourceProperties , ParallaxViewProperties , AnimatedIconProperties , ImageIconProperties , AnimatedVisualPlayerProperties
  • SourcePropertySet() : ScrollInputHelper
  • Spacing() : StackLayoutProperties
  • SpacingProperty() : StackLayoutProperties
  • SpecialElementDesiredSize() : FlowLayoutState
  • SpecificTouchTest() : WebView2Tests
  • SpecifiedPlacement() : TeachingTipTests
  • SpecifiedPlacementRTL() : TeachingTipTests
  • SpectrumBrushProperties() : SpectrumBrushProperties
  • SpectrumRectangleFillChanged() : ColorPickerPage
  • SpecularAmount() : IDistantSpecularEffect , ISpotSpecularEffect , IPointSpecularEffect , IDistantSpecularEffect , ISpotSpecularEffect , IPointSpecularEffect
  • SpecularExponent() : IDistantSpecularEffect , ISpotSpecularEffect , IPointSpecularEffect
  • SpeedUpSlider_ValueChanged() : AnimatedIconPage
  • SpinButtonPlacementMode() : NumberBoxProperties
  • SpinButtonPlacementModeProperty() : NumberBoxProperties
  • SpinMode_Changed() : NumberBoxPage
  • Split() : IndexRange , HashMap< K, V > , InitialsGenerator
  • SplitButton() : SplitButton
  • SplitButtonAutomationPeer() : SplitButtonAutomationPeer
  • SplitButtonPage() : SplitButtonPage
  • SplitButtonProperties() : SplitButtonProperties
  • SplitVector() : SplitVector< T, SplitVectorID >
  • SplitViewClosingArgs() : NavigationViewPaneClosingEventArgs
  • SplitViewPage() : SplitViewPage
  • SportsGroup() : PersonPicturePage::SportsGroup
  • SportsPerson() : PersonPicturePage::SportsPerson
  • SpreadMethod() : RadialGradientBrushProperties
  • SpreadMethodProperty() : RadialGradientBrushProperties
  • SpriteShape() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual
  • SpriteShape_0() : AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • SpriteShape_00() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_01() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_02()
: LottieLogo::LottieLogo_AnimatedVisual
, BrightnessSun::BrightnessSun_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_03() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_04() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_05() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_06()
: LottieLogo::LottieLogo_AnimatedVisual
, BrightnessSun::BrightnessSun_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_07() : BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_08() : AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • SpriteShape_09() : AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • SpriteShape_1() : AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • SpriteShape_10()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • SpriteShape_11() : BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_12() : AnimatedAcceptVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_13()
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
, AnimatedAcceptVisualSource_AnimatedVisual
  • SpriteShape_14() : BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_15() : AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_16() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • SpriteShape_17() : LottieLogo::LottieLogo_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • SpriteShape_18() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_19() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_2() : AnimatedSettingsVisualSource_AnimatedVisual , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • SpriteShape_20() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_21() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_22() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_23() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_24() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_25() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_26() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_27() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_28() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_29() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_3() : AnimatedBackVisualSource_AnimatedVisual
  • SpriteShape_30() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_31() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_32() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_33() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_34() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_35() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_36() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_37() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_38() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_39() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_4() : AnimatedBackVisualSource_AnimatedVisual
  • SpriteShape_40() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_41() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_42() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_43() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_44() : LottieLogo::LottieLogo_AnimatedVisual
  • SpriteShape_5() : AnimatedBackVisualSource_AnimatedVisual
  • SpyAnimatedValues() : SwipeControlPage , DynamicPage , SimpleRectanglePage , RatingControlPage
  • SpyTranslationAndScale() : ScrollPresenterTests
  • StackLayout() : StackLayout
  • StackLayoutProperties() : StackLayoutProperties
  • StampOutRatingItems() : RatingControl
  • StandardBackground_Click() : CommonStylesPage
  • Start() : ItemCollectionTransition , RepeatedScrollSnapPoint , RepeatedZoomSnapPoint , AnimatedVisualPlayer::final
  • StartAddScrollVelocity() : ScrollPresenterTests
  • StartAddTransitions() : LinedFlowLayoutItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider , DefaultItemCollectionTransitionProvider
  • StartAddZoomVelocity() : ScrollPresenterTests
  • StartAnimatedValuesSpy() : SimpleRectanglePage , DynamicPage , SwipeControlPage , RatingControlPage
  • StartAnimationGroup() : LinedFlowLayoutItemCollectionTransitionProvider
  • StartAsynchronousAction() : InfoBarPage
  • StartBringIndexIntoView() : ViewManagerTests
  • StartBringIntoView() : ItemsRepeaterScrollHost
  • StartBringItemIntoView() : ItemsViewTestsWithInputHelper , ItemsView , ItemsViewTestsWithInputHelper
  • StartBringItemIntoViewInternal() : ItemsView
  • StartBringTabIntoView() : TabViewItem
  • StartConstantVelocityPan() : ScrollPresenterMousePanningPage
  • StartContractToClose() : TeachingTip
  • StartExpandToOpen() : TeachingTip
  • StartExpressionAnimationSourcesAnimations() : ScrollPresenter
  • StartIndex() : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • StartInternalExpressionAnimations() : ScrollInputHelper
  • StartLoggingValues_Click() : RevealStatesPage
  • StartMoveTransitions() : LinedFlowLayoutItemCollectionTransitionProvider , DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • StartNewKeepAliveTimer() : ItemCollectionTransitionProvider
  • StartPath() : SelectionTreeHelper
  • StartPosition() : ScrollingScrollAnimationStartingEventArgs
  • StartProgressBoundAnimation() : AnimatedSettingsVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual
  • StartRemoveTransitions() : LinedFlowLayoutItemCollectionTransitionProvider , DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • StartScrollBy() : ScrollPresenterTests
  • StartScrollControllerExpressionAnimationSourcesAnimations() : ScrollPresenter
  • StartScrollTo() : ScrollPresenterTests
  • StartThumbAnimation() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • StartTrackingColorChanges() : ColorPickerTests::ColorPickerTestSetupHelper
  • StartTransformExpressionAnimations() : ScrollPresenter
  • StartTransitions() : DefaultItemCollectionTransitionProvider , ItemCollectionTransitionProviderDerived , RadialItemCollectionTransitionProvider , ItemCollectionTransitionProvider
  • StartTranslationAndZoomFactorExpressionAnimations() : ScrollPresenter
  • StartZoomBy() : ScrollPresenterTests
  • StartZoomFactor() : ScrollingZoomAnimationStartingEventArgs
  • StartZoomTo() : ScrollPresenterTests
  • State() : ScrollView , RefreshVisualizerProperties , ScrollPresenter , Flex
  • StateChanged() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • StateProperty() : AnimatedIconProperties , RefreshVisualizerProperties , RevealBrushProperties
  • StencilButton() : InkToolBarIsStencilButtonCheckedChangedEventArgs
  • StencilKind() : InkToolBarIsStencilButtonCheckedChangedEventArgs
  • StepThenHoldEasingFunction() : AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedAcceptVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , BrightnessSun::BrightnessSun_AnimatedVisual , AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual , AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual
  • StepValue() : NumberBox
  • StickyUnstickyAppBarsButton_Click() : CommandBarPage
  • Stop() : IAnimatedVisual , AnimatedVisualPlayer
  • StopAnimatedValuesSpy() : DynamicPage , SwipeControlPage , SimpleRectanglePage , RatingControlPage
  • StopAttachingLights() : RevealBrush
  • StopButton_Click() : AnimatedVisualPlayerPage
  • StopCheckingForDrag() : TabViewItem
  • StopConstantVelocityPan() : ScrollPresenterMousePanningPage
  • StopInternalExpressionAnimations() : ScrollInputHelper
  • StopMousePan() : ScrollPresenterMousePanningPage
  • StopPhasing() : final
  • StopScrollControllerExpressionAnimationSourcesAnimations() : ScrollPresenter
  • StopThumbAnimation() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • StopTransformExpressionAnimations() : ScrollPresenter
  • StopTranslationAndZoomFactorExpressionAnimations() : ScrollPresenter
  • StopWaiting() : final
  • StoreDemoPage() : StoreDemoPage
  • StoryboardAnimationRetemplateTest() : ProgressRingTests
  • Stretch() : AnimatedVisualPlayerProperties
  • StretchAlignment() : ScrollPresenterTests
  • StretchContentThroughMinZoomFactor() : ScrollPresenterTests
  • StretchedImage() : ScrollPresenterTests
  • StretchImage() : ScrollPresenterTestsWithInputHelper
  • StretchImageWithMouseWheel() : ScrollPresenterTestsWithInputHelper
  • StretchProperty() : AnimatedVisualPlayerProperties
  • StripTrailingBrackets() : InitialsGenerator
  • StrokeThicknessScalarAnimation_2p5_to_2p5() : AnimatedFindVisualSource_AnimatedVisual
  • StyleChooser_SelectionChanged() : RevealSimpleListPage
  • SubMenuTest() : RadioMenuFlyoutItemTests
  • Subtitle() : TitleBarProperties , TeachingTipProperties
  • SubtitleProperty() : TitleBarProperties , TeachingTipProperties
  • SubtitleVisibilityChanged() : TeachingTipTestHooks
  • SuccessiveAdditionalScrollVelocities() : ScrollPresenterTests
  • SuccessiveAdditionalZoomVelocities() : ScrollPresenterTests
  • SuffixText() : PagerControlProperties
  • SuffixTextProperty() : PagerControlProperties
  • SuggestedAnchor() : ViewportManagerWithPlatformFeatures , ItemsRepeater , ViewportManagerDownLevel , ViewportManager
  • SuggestedToolTipChanged() : NavigationViewItem
  • SuppressSelectionItemInvokeTest() : SelectionTests
  • Sv_ViewChanging() : RefreshContainerPage
  • Swap() : sealed< T, fallback, RawStorageT >
  • SwapItemsSource_Click() : TreeViewPage
  • SwapPaneHeaderContent() : NavigationView
  • SwipeContentBackgroundResetsOnClose() : SwipeControlTests
  • swipeContentSizeParameterName() : SwipeControl
  • swipeContentVisualPropertyName() : SwipeControl
  • SwipeControl() : SwipeControl , SwipeItemInvokedEventArgs
  • SwipeControlCanOnlyBeHorizontalOrVertical() : SwipeControlTests
  • SwipeControlCanOnlyBeHorizontalOrVerticalAfterRendering() : SwipeControlTests
  • SwipeControlClearPage() : SwipeControlClearPage
  • SwipeControlInteractionTrackerOwner() : SwipeControlInteractionTrackerOwner
  • SwipeControlPage() : SwipeControlPage
  • SwipeControlPage2() : SwipeControlPage2
  • SwipeControlProperties() : SwipeControlProperties
  • SwipeControlTest() : SwipeControlTests
  • SwipeDismissThenSwipe() : SwipeControlTests
  • SwipeDoesntJumpWhenItReverts() : SwipeControlTests
  • SwipeIsNotTabStop() : SwipeControlTests
  • SwipeItem() : SwipeItem
  • SwipeItemInheritsICommand2Properties() : SwipeControlTests
  • SwipeItemInvoked() : SwipeControlPage2 , SwipeControlPage
  • SwipeItemInvokedAndResizeGrid() : SwipeControlPage
  • SwipeItemProperties() : SwipeItemProperties
  • SwipeItems() : SwipeItems
  • SwipeItemsAreNullifiedWhenTheAnimationIsDone() : SwipeControlTests
  • SwipeItemsExecuteThrowsExceptionWhenMoreThanOneItemAreAdded() : SwipeControlTests
  • SwipeItemsProperties() : SwipeItemsProperties
  • SwipeItemsTest() : SwipeControlTests
  • SwipeItemTest() : SwipeControlTests
  • SwipePage() : SwipePage
  • swipeRootVisualPropertyName() : SwipeControl
  • SwipeTestHooks_IdleStatusChanged() : SwipeControlPage
  • SwipeTestHooks_LastInteractedWithSwipeControlChanged() : SwipeControlPage
  • SwipeTestHooks_OpenedStatusChanged() : SwipeControlPage
  • SwipingDoesntChangeTheBoundsOfSwipeControl() : SwipeControlTests
  • SwipingDoesntModifyTheSizeOfSwipeControl() : SwipeControlTests
  • SwitchCacheModeButton_Click() : AnimatedVisualPlayerPage
  • SwitchFrame_Click() : NavigationViewInitPage
  • SwitchLight() : RevealBorderLight , RevealHoverLight
  • SyncAndInitVectorFlagsWithID() : SplitDataSourceBase< T, SplitVectorID, AttachedDataType, SplitVectorSize >
  • SyncChildrenNodesWithItemsSource() : TreeViewNode
  • SyncItemTemplates() : NavigationView
  • SyncRootNodesWithItemsSource() : TreeView
  • SyncWait() : SharedHelpers
  • SystemBackdrop() : CommandBarFlyoutCommandBarProperties
  • SystemBackdropProperty() : CommandBarFlyoutCommandBarProperties
  • SystemBackTest() : CommonTests
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- t -

  • t0ScalarAnimation_0_to_1() : AnimatedBackVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • t1ScalarAnimation_0_to_1() : AnimatedFindVisualSource_AnimatedVisual
  • t2ScalarAnimation_0_to_1() : AnimatedFindVisualSource_AnimatedVisual
  • Tab() : TabViewTabDragStartingEventArgs , TabViewTabDragCompletedEventArgs , TabViewTabCloseRequestedEventArgs , TabViewTabDroppedOutsideEventArgs
  • TabCloseRequested() : TabViewProperties
  • TabDragCompleted() : TabViewProperties
  • TabDragStarting() : TabViewProperties
  • TabDroppedOutside() : TabViewProperties
  • TabGeometry() : TabViewItemTemplateSettingsProperties
  • TabGeometryProperty() : TabViewItemTemplateSettingsProperties
  • TabIntoItemsViewWithoutCurrentItem() : ItemsViewTestsWithInputHelper
  • TabItems() : TabViewProperties
  • TabItemsChanged() : TabViewProperties
  • TabItemsProperty() : TabViewProperties
  • TabItemsSource() : TabViewProperties
  • TabItemsSourceProperty() : TabViewProperties
  • TabItemTemplate() : TabViewProperties
  • TabItemTemplateProperty() : TabViewProperties
  • TabItemTemplateSelector() : TabViewProperties
  • TabItemTemplateSelectorProperty() : TabViewProperties
  • TabNavigationHierarchicalTest() : FocusBehaviorTests
  • TabNavigationTest() : FocusBehaviorTests
  • TabNavigationThroughItemsView() : ItemsViewTestsWithInputHelper
  • TabNavigationThroughItemsViewWithContentControlsAndSingleSelectionMode() : ItemsViewTestsWithInputHelper
  • TabNavigationThroughItemsViewWithItemContainersAndMultipleSelectionMode() : ItemsViewTestsWithInputHelper
  • TabNavigationThroughItemsViewWithItemContainersAndSingleSelectionMode() : ItemsViewTestsWithInputHelper
  • Tabs() : TabViewTabTearOutWindowRequestedEventArgs , TabViewTabTearOutRequestedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs , TabViewExternalTornOutTabsDroppedEventArgs
  • Tabs_TabCloseRequested() : TabViewSizingPage
  • Tabs_TabItemsChanged() : TabViewPage
  • TabSizeAndScrollButtonsTest() : TabViewTests
  • TabStripDragOver() : TabViewProperties
  • TabStripDrop() : TabViewProperties
  • TabStripFooter() : TabViewProperties
  • TabStripFooterProperty() : TabViewProperties
  • TabStripFooterTemplate() : TabViewProperties
  • TabStripFooterTemplateProperty() : TabViewProperties
  • TabStripHeader() : TabViewProperties
  • TabStripHeaderProperty() : TabViewProperties
  • TabStripHeaderTemplate() : TabViewProperties
  • TabStripHeaderTemplateProperty() : TabViewProperties
  • TabTearOutRequested() : TabViewProperties
  • TabTearOutWindowRequested() : TabViewProperties
  • TabTest() : MenuBarTests
  • TabTwicePastWebView2() : WebView2Tests
  • TabView() : TabView
  • TabView_AddButtonClick() : MultipleTabViewPage
  • Tabview_AddTabButtonClick() : TabViewSizingPage
  • TabView_DragEnter() : MultipleTabViewPage
  • TabView_Drop() : MultipleTabViewPage
  • TabView_TabCloseRequested() : MultipleTabViewPage
  • TabView_TabDragStarting() : MultipleTabViewPage
  • TabViewAutomationPeer() : TabViewAutomationPeer
  • TabViewAxeTestPage() : TabViewAxeTestPage
  • TabViewExternalTornOutTabsDroppedEventArgs() : TabViewExternalTornOutTabsDroppedEventArgs
  • TabViewExternalTornOutTabsDroppingEventArgs() : TabViewExternalTornOutTabsDroppingEventArgs
  • TabViewItem() : TabViewItem
  • TabViewItem_Loaded() : MultipleTabViewPage
  • TabViewItemAutomationPeer() : TabViewItemAutomationPeer
  • TabViewItemBackgroundTest() : TabViewTests
  • TabViewItemForegroundTest() : TabViewTests
  • TabViewItemHeaderTest() : TabViewTests
  • TabViewItemProperties() : TabViewItemProperties
  • TabViewItemsSourceSample_AddTabButtonClick() : TabViewTabItemsSourcePage
  • TabViewItemsSourceSample_TabCloseRequested() : TabViewTabItemsSourcePage
  • TabViewItemsSourceSample_TabItemsChanged() : TabViewTabItemsSourcePage
  • TabViewItemTemplateSettings() : TabViewItemTemplateSettings
  • TabViewItemTemplateSettingsProperties() : TabViewItemTemplateSettingsProperties
  • TabViewListView() : TabViewListView
  • TabViewPage() : TabViewPage
  • TabViewProperties() : TabViewProperties
  • TabViewScrollToTheLeftButton_Click() : TabViewPage
  • TabViewScrollToTheMiddleButton_Click() : TabViewPage
  • TabViewScrollToTheRightButton_Click() : TabViewPage
  • TabViewSelectionChanged() : TabViewPage
  • TabViewSizingPage() : TabViewSizingPage
  • TabViewSizingPageButton_Click() : TabViewPage
  • TabViewTabCloseRequested() : TabViewPage , TabViewTabClosingBehaviorPage
  • TabViewTabCloseRequestedEventArgs() : TabViewTabCloseRequestedEventArgs
  • TabViewTabClosingBehaviorButton_Click() : TabViewPage
  • TabViewTabClosingBehaviorPage() : TabViewTabClosingBehaviorPage
  • TabViewTabDragCompletedEventArgs() : TabViewTabDragCompletedEventArgs
  • TabViewTabDragStartingEventArgs() : TabViewTabDragStartingEventArgs
  • TabViewTabDroppedOutside() : TabViewPage
  • TabViewTabDroppedOutsideEventArgs() : TabViewTabDroppedOutsideEventArgs
  • TabViewTabItemsSourcePage() : TabViewTabItemsSourcePage
  • TabViewTabItemsSourcePage_Loaded() : TabViewTabItemsSourcePage
  • TabViewTabItemsSourcePageButton_Click() : TabViewPage
  • TabViewTabTearOutRequestedEventArgs() : TabViewTabTearOutRequestedEventArgs
  • TabViewTabTearOutWindowRequestedEventArgs() : TabViewTabTearOutWindowRequestedEventArgs
  • TabViewTearOutWindowWithDataItems() : TabViewTearOutWindowWithDataItems
  • TabViewTearOutWindowWithDataItemsButton_Click() : TabViewPage
  • TabViewTearOutWindowWithoutDataItems() : TabViewTearOutWindowWithoutDataItems
  • TabViewTearOutWindowWithoutDataItemsButton_Click() : TabViewPage
  • TabViewTemplateSettings() : TabViewItemProperties
  • TabViewTemplateSettingsProperty() : TabViewItemProperties
  • TabWidthComboBox_SelectionChanged() : TabViewPage
  • TabWidthMode() : TabViewProperties
  • TabWidthModeProperty() : TabViewProperties
  • TailElevationSliderChanged() : TeachingTipPage
  • TailLongSideActualLength() : TeachingTip
  • TailLongSideLength() : TeachingTip
  • TailShortSideLength() : TeachingTip
  • TailVisibility() : TeachingTipProperties
  • TailVisibilityProperty() : TeachingTipProperties
  • TallModeConfiguration() : TwoPaneViewProperties
  • TallModeConfigurationComboBox_SelectionChanged() : TwoPaneViewPage
  • TallModeConfigurationProperty() : TwoPaneViewProperties
  • TapItem() : SwipeControlTests
  • TapOnColorSpectrum() : ColorPickerTests
  • TapOnColorSpectrumAndWaitForColorChange() : ColorPickerTests
  • TapOnFlyoutTreeViewRootItemChevron() : TreeViewTests
  • TapOnItem() : RadioButtonsTests
  • TapOnTreeViewAt() : TreeViewTests
  • TappingOutsideARevealedSwipeDismissesIt() : SwipeControlTests
  • TapResetScrollViewButton() : ItemsViewTestsWithInputHelper
  • TapResetViewsButton() : ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • Target() : TeachingTipProperties , ButtonInteractionInvokedEventArgs
  • TargetData() : InkCanvas::TargetData
  • TargetElement() : TargetElement , ScrollInputHelper , ItemsRepeaterScrollHost::BringIntoViewState , ScrollViewBringIntoViewOperation
  • TargetHorizontalOffset() : ScrollingBringingIntoViewEventArgs
  • TargetInkCanvas() : InkToolBarProperties , InkToolBar
  • TargetInkCanvasProperty() : InkToolBarProperties
  • TargetInkPresenter() : InkToolBarProperties , InkToolBar
  • TargetInkPresenterProperty() : InkToolBarProperties
  • TargetListViewBackground() : ParallaxViewTests
  • TargetListViewHeader() : ParallaxViewTests
  • TargetListViewItem() : ParallaxViewTests
  • TargetOffsets() : ScrollingBringingIntoViewEventArgs
  • TargetProperty() : TeachingTipProperties
  • TargetTheme() : RevealBrushProperties , RevealTestApi
  • TargetThemeProperty() : RevealBrushProperties
  • TargetType() : XamlMember
  • TargetUnloadingClosesTeachingTip() : TeachingTipTests
  • TargetVerticalOffset() : ScrollingBringingIntoViewEventArgs
  • tbloaded() : ExtraCommandBarFlyoutPage
  • tbunloaded() : ExtraCommandBarFlyoutPage
  • TeachingTip() : TeachingTip
  • TeachingTip_SizeChanged() : TeachingTipPage
  • TeachingTipAutomationPeer() : TeachingTipAutomationPeer
  • TeachingTipBackgroundTest() : TeachingTipTests
  • TeachingTipCaseBundle() : TeachingTipCaseBundle
  • TeachingTipFocusPage() : TeachingTipFocusPage
  • TeachingTipHeroContentPlacementTest() : TeachingTipTests
  • TeachingTipInResources_Closed() : TeachingTipPage
  • TeachingTipInResourcesOnEdge_Closed() : TeachingTipPage
  • TeachingTipInResourcesRoot_Loaded() : TeachingTipPage
  • TeachingTipInVisualTree_Closed() : TeachingTipPage
  • TeachingTipInVisualTreeRoot_Loaded() : TeachingTipPage
  • TeachingTipInXamlPage() : TeachingTipInXamlPage
  • TeachingTipPage() : TeachingTipPage
  • TeachingTipProperties() : TeachingTipProperties
  • TeachingTipRemovalClosesPopup() : TeachingTipTests
  • TeachingTipTemplateSettings() : TeachingTipTemplateSettings
  • TeachingTipTemplateSettingsProperties() : TeachingTipTemplateSettingsProperties
  • TeachingTipTestHooks_EffectiveHeroContentPlacementChanged() : TeachingTipPage
  • TeachingTipTestHooks_EffectivePlacementChanged() : TeachingTipPage
  • TeachingTipTestHooks_IdleStatusChanged() : TeachingTipFocusPage , TeachingTipInXamlPage , TeachingTipPage
  • TeachingTipTestHooks_OffsetChanged() : TeachingTipPage
  • TeachingTipTestHooks_OpenedStatusChanged() : TeachingTipFocusPage , TeachingTipInXamlPage , TeachingTipPage
  • TeachingTipTestHooks_SubtitleVisibilityChanged() : TeachingTipPage
  • TeachingTipTestHooks_TitleVisibilityChanged() : TeachingTipPage
  • TeachingTipWithContentAndWithoutHeroContentDoesNotCrash() : TeachingTipTests
  • TeachingTipWithContentAndWithoutIconSourceDoesNotCrash() : TeachingTipTests
  • TearOutTab() : TabView
  • Temperature() : ITemperatureAndTintEffect
  • Template() : ItemTemplateWrapper
  • TemplateKey() : SelectTemplateEventArgs
  • Templates() : RecyclingElementFactory
  • TemplateSelector() : ItemTemplateWrapper
  • TemplateSettings() : ExpanderProperties , InfoBadgeProperties , InfoBarProperties , NavigationViewProperties , NavigationViewItemPresenterProperties , PagerControlProperties , PersonPictureProperties , PipsPagerProperties , ProgressBarProperties , ProgressRingProperties , TeachingTipProperties , TitleBarProperties
  • TemplateSettingsProperty() : PersonPictureProperties , PipsPagerProperties , ProgressBarProperties , ProgressRingProperties , TeachingTipProperties , TitleBarProperties , ExpanderProperties , InfoBadgeProperties , InfoBarProperties , NavigationViewProperties , NavigationViewItemPresenterProperties , PagerControlProperties
  • TEndScalarAnimation_0_to_1_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_0_to_1_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_0p81_to_0p734_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_0p81_to_0p734_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0() : BrightnessSun::BrightnessSun_AnimatedVisual
  • TEndScalarAnimation_1_to_0_00() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_01() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_02() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_03() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_04() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_05() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_06() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_07() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_08() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_09() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_10() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_11() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_12() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_13() : LottieLogo::LottieLogo_AnimatedVisual
  • TEndScalarAnimation_1_to_0_14() : LottieLogo::LottieLogo_AnimatedVisual
  • TestAutoPlacementForWindowOrScreenBounds() : TeachingTipTests
  • TestCaseSelectionChanged() : PaneLayoutTestPage
  • TestCleanup() : AnimatedVisualPlayerTests , AnnotatedScrollBarInteractionTests , AutoSuggestBox , BreadcrumbTests , ColorPickerTests , CommandBarFlyoutTests , TextCommandBarFlyoutTests , CommonStylesTests , DropDownButtonTests , ExpanderTests , ImageIconTests , InfoBarTests , ButtonInteractionTests , SliderInteractionTests , ItemContainerTests , ItemsViewTestsWithInputHelper , MapControlTests , AcrylicBrushTests , RevealBrushTests , MenuBarTests , NavigationViewTestsBase , NumberBoxTests , PagerControlTests , ParallaxViewTests , PersonPictureTests , PipsPagerTests , ProgressBarTests , ProgressRingTests , RefreshContainerTests , ScrollViewerAdapterTests , RadialGradientBrushTests , RadioButtonsTests , RadioMenuFlyoutItemTests , RatingControlTests , RepeaterTests , ScrollPresenterTestsWithAutomationPeer , ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper , SelectorBarTests , SplitButtonTests , SwipeControlTests , TabViewTearOutTests , TabViewTests , TeachingTipTests , TitleBarTests , TreeViewTests , TwoPaneViewTests , WebView2Tests
  • TestCommand() : TestCommand
  • TestControlAutomationPeer() : TestControlAutomationPeer
  • TestDataSource() : ScrollPresenterTests::TestDataSource
  • TestDropDownButton_Click() : DropDownButtonPage
  • TestDropDownButtonFlyout_Closed() : DropDownButtonPage
  • TestDropDownButtonFlyout_Opened() : DropDownButtonPage
  • TestFrameCheckbox_Checked() : MenuBarPage , NavigationViewPage , NavigationViewRS3Page , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage
  • TestFrameCheckbox_Unchecked() : MenuBarPage , NavigationViewPage , NavigationViewRS3Page , NavigationViewRS4Page , NavigationViewTopNavOnlyPage , NavigationViewTopNavPage
  • TestHooksViewChangeResult() : ScrollPresenterTestHooks
  • TestListView_ItemClick() : RevealStatesPage
  • TestMenuFlyoutItemClick() : MenuFlyoutPage
  • TestNameComboBox_SelectionChanged() : WebView2BasicPage , WebView2CoreObjectsPage
  • TestPage_GotFocus() : ColorPickerPage
  • TestPage_Loaded() : AcrylicBrushBasicPage , NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • TestPageLoaded() : ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper
  • TestPersonPicture_SizeChanged() : PersonPicturePage
  • TestPipsPager_GotFocus() : PipsPagerPage
  • TestPipsPager_LostFocus() : PipsPagerPage
  • TestPipsPager_PointerCanceled() : PipsPagerPage
  • TestPipsPager_PointerEntered() : PipsPagerPage
  • TestPipsPager_PointerExited() : PipsPagerPage
  • TestRadioButtons2_GotFocus() : RadioButtonsFocusPage
  • TestRadioButtons2_LostFocus() : RadioButtonsFocusPage
  • TestRadioButtons2_SelectionChanged() : RadioButtonsFocusPage
  • TestRadioButtons_GotFocus() : RadioButtonsFocusPage , RadioButtonsPage
  • TestRadioButtons_LostFocus() : RadioButtonsFocusPage , RadioButtonsPage
  • TestRadioButtons_SelectionChanged() : RadioButtonsFocusPage , RadioButtonsPage
  • TestRatingControl_Loaded() : RatingControlPage
  • TestRatingControl_ValueChanged() : RatingControlPage
  • TestRatingControlButton_Click() : RatingControlPage
  • TestSplitButton_Click() : SplitButtonPage
  • TestSplitButtonFlyout_Closed() : SplitButtonPage
  • TestSplitButtonFlyout_Opened() : SplitButtonPage
  • TestSwipeControl_Loaded() : SwipeControlPage
  • TestSwipeControl_Unloaded() : SwipeControlPage
  • TestTeachingTipInXamlPage() : TeachingTipTests
  • TestTreeView_DragItemsStarting() : TreeViewPage
  • TestTreeView_Expanding() : TreeViewPage
  • TestTreeView_ItemInvoked() : TreeViewPage
  • TestTreeViewContentMode_ItemInvoked() : TreeViewPage
  • Text() : NumberBoxProperties , SelectorBarItemProperties , SwipeItemProperties
  • TextAlignment() : NumberBoxProperties
  • TextAlignment_Changed() : NumberBoxPage
  • TextAlignmentProperty() : NumberBoxProperties
  • TextBoxDensityTest() : CommonStylesTests
  • TextBoxDensityTest_Click() : CommonStylesPage
  • TextCommandBarFlyoutPage() : TextCommandBarFlyoutPage
  • TextCommandBarFlyoutTestSetupHelper() : TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
  • TextControlsPage() : TextControlsPage
  • TextPage() : TextPage
  • TextProperty() : NumberBoxProperties , SelectorBarItemProperties , SwipeItemProperties
  • TextPropertyChanged() : NumberBoxPage
  • TextReadingOrder() : NumberBoxProperties
  • TextReadingOrderProperty() : NumberBoxProperties
  • ThemeColor_Background() : AnimatedVisual
  • ThemeColor_Foreground() : AnimatedAcceptVisualSource_AnimatedVisual , AnimatedBackVisualSource_AnimatedVisual , AnimatedChevronDownSmallVisualSource_AnimatedVisual , AnimatedChevronRightDownSmallVisualSource_AnimatedVisual , AnimatedChevronUpDownSmallVisualSource_AnimatedVisual , AnimatedFindVisualSource_AnimatedVisual , AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual , AnimatedSettingsVisualSource_AnimatedVisual
  • ThemeColor_Foreground_0() : AnimatedVisual
  • ThemeColor_Foreground_1() : AnimatedVisual
  • ThemeDarkButton_Click() : ColorPickerPage
  • ThemeLightButton_Click() : ColorPickerPage
  • ThemeResourceNameToColorBrush() : RatingControlPage
  • ThresholdTest() : TwoPaneViewTests
  • ThrowIfHasVerticalAndHorizontalContent() : SwipeControl
  • Thumb_ManipulationCompleted() : BiDirectionalScrollController
  • Thumb_ManipulationDelta() : BiDirectionalScrollController
  • Thumb_ManipulationStarting() : BiDirectionalScrollController
  • Thumb_PointerPressed() : BiDirectionalScrollController
  • TickForValuesSpy() : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • TickNonAnimatedOperation() : InteractionTrackerAsyncOperation
  • TickOperation() : ScrollViewBringIntoViewOperation
  • TickQueuedOperation() : InteractionTrackerAsyncOperation
  • TicksCount() : ScrollViewBringIntoViewOperation
  • TimePickerDensityTest() : CommonStylesTests
  • TimePickerDensityTest_Click() : CommonStylesPage
  • TimePickerPage() : TimePickerPage
  • Timer_Tick() : InfoBarPage , RefreshContainerOnImagePage , RefreshVisualizerPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , TeachingTipPage
  • timerTick() : RefreshInfoProviderImplementation
  • Tint() : ITemperatureAndTintEffect
  • TintColor() : AcrylicBrushProperties
  • TintColorButton_Checked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • TintColorButton_Unchecked() : AcrylicBrushBasicPage , AcrylicBrushPage
  • TintColorProperty() : AcrylicBrushProperties
  • TintLuminosityOpacity() : AcrylicBrushProperties
  • TintLuminosityOpacity_ValueChanged() : AcrylicBrushPage
  • TintLuminosityOpacityProperty() : AcrylicBrushProperties
  • TintOpacity() : AcrylicBrushProperties
  • TintOpacity_ValueChanged() : AcrylicBrushBasicPage , AcrylicBrushPage
  • TintOpacityProperty() : AcrylicBrushProperties
  • TintTransitionDuration() : AcrylicBrushProperties , AcrylicBrushTests
  • TintTransitionDurationProperty() : AcrylicBrushProperties
  • TipCanFollowTarget() : TeachingTipTests
  • TipFollowsTargetOnWindowResize() : TeachingTipTests
  • TipsWhichDoNotFitDoNotOpen() : TeachingTipTests
  • Title() : InfoBarProperties , MenuBarItemProperties , TeachingTipProperties , TitleBarProperties
  • TitleBar() : TitleBar
  • TitleBarAutomationPeer() : TitleBarAutomationPeer
  • TitleBarCheckbox_Checked() : NavigationViewCustomThemeResourcesPage , NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • TitleBarCheckbox_Unchecked() : NavigationViewCustomThemeResourcesPage , NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • TitleBarPage() : TitleBarPage
  • TitleBarPageWindow() : TitleBarPageWindow
  • TitleBarProperties() : TitleBarProperties
  • TitleBarTemplateSettings() : TitleBarTemplateSettings
  • TitleBarTemplateSettingsProperties() : TitleBarTemplateSettingsProperties
  • TitleBarTest() : CommonTests
  • TitleBarWindowingButton_Click() : TitleBarPage
  • TitleButton_Click() : TitleBarPageWindow
  • TitleProperty() : MenuBarItemProperties , InfoBarProperties , TeachingTipProperties , TitleBarProperties
  • TitleVisibilityChanged() : TeachingTipTestHooks
  • Toggle() : ToggleSplitButton , ToggleSplitButtonAutomationPeer
  • ToggleAccessibilityTest() : SplitButtonTests
  • ToggleAnimatedIconHost() : ToggleAnimatedIconHost
  • ToggleBackgroundChanged() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ToggleButton_Checked() : ImageIconPage
  • ToggleButton_Unchecked() : ImageIconPage
  • ToggleButtonStyleCheckbox_Checked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ToggleButtonStyleCheckbox_Unchecked() : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • ToggleCompactInAppLevel_Click() : CompactPage
  • ToggleHeaderTemplateValueButton_Click() : NumberBoxPage
  • ToggleHeaderValueButton_Click() : NumberBoxPage
  • ToggleIsExpandedNavigationViewItem() : NavigationView
  • ToggleKind() : InkToolBarToggleButton , InkToolBarToolButton
  • ToggleMappingMode() : RadialGradientBrushPage
  • ToggleMappingModeButton_Click() : RadialGradientBrushPage
  • TogglePaneOpenButton_Click() : NavigationViewMinimalPage
  • ToggleRoot0Selection_Click() : TreeViewPage
  • ToggleSelect() : final
  • ToggleSelectedNodes_Click() : TreeViewPage
  • ToggleSelection() : TreeViewItem
  • ToggleSelectionMode_Click() : TreeViewPage
  • ToggleSplitButton_Click() : SplitButtonPage
  • ToggleSplitButton_IsCheckedChanged() : SplitButtonPage
  • ToggleSplitButtonAutomationPeer() : ToggleSplitButtonAutomationPeer
  • ToggleSplitButtonProperties() : ToggleSplitButtonProperties
  • ToggleState() : ToggleSplitButtonAutomationPeer
  • ToggleSwitch_Toggled() : MapControlPage , RevealScenarios
  • ToggleSwitchDensityTest() : CommonStylesTests
  • ToggleSwitchDensityTest_Click() : CommonStylesPage
  • ToggleTest() : SplitButtonTests
  • ToggleTreeViewItemCheckBox() : TreeViewTests
  • ToggleVisibilityForEmptyContent() : TeachingTip
  • TogglingTheWindowStateDismissesSwipe() : SwipeControlTests
  • ToolKind() : InkToolBarToolButton
  • ToolTipCustomContentTest() : CommonTests
  • ToolTipDefaultTest() : TabViewTests
  • ToolTipPage() : ToolTipPage
  • ToolTipTest() : CommonTests
  • ToolTipUpdateTest() : TabViewTests
  • TopAppBarButton_Click() : CommandBarPage
  • TopBottomAppBarTest() : CommonStylesTests
  • TopEdgePlacementTopLeftHighlightMargin() : TeachingTip
  • TopItems() : SwipeControlProperties
  • TopItemsProperty() : SwipeControlProperties
  • TopLeftCornerRadius() : TeachingTip
  • TopLeftHighlightMargin() : TeachingTipTemplateSettingsProperties
  • TopLeftHighlightMarginProperty() : TeachingTipTemplateSettingsProperties
  • TopNavigationChevronClickTest() : TopModeTests
  • TopNavigationHaveCorrectSelectionWhenChangingMenuItems() : TopModeTests
  • TopNavigationItemsAccessibilitySetTest() : TopModeTests
  • TopNavigationMenuItemTemplateBindingTest() : TopModeTests
  • TopNavigationOverflowButtonClickTest() : TopModeTests
  • TopNavigationOverflowButtonTest() : TopModeTests
  • TopNavigationOverflowWidthLongNavItemTest() : TopModeTests
  • TopNavigationSecondClickOnSuppressSelectionItemTest() : TopModeTests
  • TopNavigationSelectionTest() : TopModeTests
  • TopNavigationSetSelectedItemToNullInItemInvoke() : TopModeTests
  • TopNavigationViewDataProvider() : TopNavigationViewDataProvider
  • TopNavigationViewItemContentChanged() : NavigationView
  • TopNavigationWithAccessKeysTest() : TopModeTests
  • TopNavigationWithHierarchyOverflowButtonClickTest() : TopModeTests
  • TopPadding() : NavigationViewTemplateSettingsProperties
  • TopPaddingProperty() : NavigationViewTemplateSettingsProperties
  • TopPaddingTest() : TopModeTests
  • TopPaneVisibility() : NavigationViewTemplateSettingsProperties
  • TopPaneVisibilityProperty() : NavigationViewTemplateSettingsProperties
  • TopRightCornerRadius() : TeachingTip
  • TopRightHighlightMargin() : TeachingTipTemplateSettingsProperties
  • TopRightHighlightMarginProperty() : TeachingTipTemplateSettingsProperties
  • ToString() : TreeNode , SimpleVerify , ItemCollectionTransitionProviderTests::CallInfo , IndexPath , RecipeGroup , Year , Flex::LineInfo , TreeViewNode , CustomContent , Recipe
  • TotalElementSize() : StackLayoutState
  • TotalElementsMeasured() : StackLayoutState
  • TotalItemsPerLine() : FlowLayoutState
  • TotalLineSize() : FlowLayoutState
  • TotalLinesMeasured() : FlowLayoutState
  • TouchSelectionTest() : TabViewTests
  • TouchTest() : SplitButtonTests
  • ToZeroKeyframeAnimationPlayButton_Click() : AnimatedVisualPlayerPage
  • ToZeroKeyframeAnimationTest() : AnimatedVisualPlayerTests
  • TraceInfo() : AnnotatedScrollBarTrace , InkToolBarTrace , ItemContainerTrace , ItemsViewTrace , PTRTrace , ItemsRepeaterTrace , LinedFlowLayoutTrace , ScrollViewTrace , SelectorBarTrace , SwipeControlTrace , TabViewTrace , NavigationViewTrace , ScrollPresenterTrace , CommandBarFlyoutTrace
  • TracePerfInfo() : AnnotatedScrollBarTrace , ItemContainerTrace , ItemsViewTrace , PTRTrace , ItemsRepeaterTrace , LinedFlowLayoutTrace , ScrollViewTrace , SelectorBarTrace , SwipeControlTrace , ScrollPresenterTrace , TabViewTrace , NavigationViewTrace
  • TraceVerbose() : SelectorBarTrace , AnnotatedScrollBarTrace , CommandBarFlyoutTrace , InkToolBarTrace , ItemsViewTrace , NavigationViewTrace , PTRTrace , LinedFlowLayoutTrace , ScrollPresenterTrace , ScrollViewTrace , TabViewTrace , SwipeControlTrace , ItemContainerTrace , ItemsRepeaterTrace
  • TrackElement() : ItemsRepeaterScrollHost
  • tracker_ref() : sealed< T, fallback, RawStorageT > , tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > , sealed< T, fallback, RawStorageT >
  • trackerPropertyName() : SwipeControl
  • TrackItemSelected() : ViewModel
  • TrackItemUnselected() : ViewModel
  • TrackPointerId() : PointerInfo< T >
  • TrackRevealLightsToRemove() : MaterialHelperBase
  • TransformMatrix() : ITransform2DEffect
  • TransformWebView() : WebView2BasicPage
  • Transition() : ItemCollectionTransitionProgress , ItemCollectionTransitionCompletedEventArgs
  • TransitionAndUpdateStates() : AnimatedIcon
  • TransitionCompleted() : ItemCollectionTransitionProviderProperties
  • TransitionFallbackLogic() : AnimatedIconTests
  • TransitionManager() : ItemsRepeater , final
  • TransitionStates() : AnimatedIcon
  • Translate() : LinedFlowLayoutItemCollectionTransitionProvider
  • Traverse() : SelectionModelTests , SelectionTreeHelper
  • TraverseIndexPath() : SelectionTreeHelper
  • TraverseRangeRealizeChildren() : SelectionTreeHelper
  • TreeNode() : TreeViewItem
  • TreeView() : TreeView
  • TreeView_DragOver() : TreeViewPage
  • TreeView_Drop() : TreeViewPage
  • TreeViewBackgroundTest() : TreeViewTests
  • TreeViewClearAndSetAtTest() : TreeViewTests
  • TreeViewCollectionChangesEffectSelectedNodesTest() : TreeViewTests
  • TreeViewCollectionChangesEffectSelectedNodesTest_ContentMode() : TreeViewTests
  • TreeViewCollectionChangesEffectSelectedNodesTest_NodeMode() : TreeViewTests
  • TreeViewDataLateInitTest() : TreeViewTests
  • TreeViewDensityChange() : TreeViewTests
  • TreeViewDisableItemDragTest() : TreeViewTests
  • TreeViewDisableItemDragTest_ContentMode() : TreeViewTests
  • TreeViewDisableItemDragTest_NodeMode() : TreeViewTests
  • TreeViewDisableItemReorderKeyboardTest() : TreeViewTests
  • TreeViewDisableItemReorderTest() : TreeViewTests
  • TreeViewDisableItemReorderTest_ContentMode() : TreeViewTests
  • TreeViewDisableItemReorderTest_NodeMode() : TreeViewTests
  • TreeViewDragAndDropBetweenNodes() : TreeViewTests
  • TreeViewDragAndDropBetweenNodes_ContentMode() : TreeViewTests
  • TreeViewDragAndDropBetweenNodes_NodeMode() : TreeViewTests
  • TreeViewDragAndDropOnNode() : TreeViewTests
  • TreeViewDragAndDropOnNode_ContentMode() : TreeViewTests
  • TreeViewDragAndDropOnNode_NodeMode() : TreeViewTests
  • TreeViewDragCrash() : TreeViewTests
  • TreeViewDragCrash_ContentMode() : TreeViewTests
  • TreeViewDragCrash_NodeMode() : TreeViewTests
  • TreeViewDragEnterOverDropTest() : TreeViewTests
  • TreeViewDragEnterOverDropTest_ContentMode() : TreeViewTests
  • TreeViewDragEnterOverDropTest_NodeMode() : TreeViewTests
  • TreeViewDragEnterOverLeaveTest() : TreeViewTests
  • TreeViewDragEnterOverLeaveTest_ContentMode() : TreeViewTests
  • TreeViewDragEnterOverLeaveTest_NodeMode() : TreeViewTests
  • TreeViewDragItemsCompletedEventArgs() : TreeViewDragItemsCompletedEventArgs
  • TreeViewDragItemsStartingEventArgs() : TreeViewDragItemsStartingEventArgs
  • TreeViewDragItemTest() : TreeViewTests
  • TreeViewDragItemTest_ContentMode() : TreeViewTests
  • TreeViewDragItemTest_NodeMode() : TreeViewTests
  • TreeViewDragMultipleItemsTest() : TreeViewTests
  • TreeViewDragMultipleItemsTest_ContentMode() : TreeViewTests
  • TreeViewDragMultipleItemsTest_NodeMode() : TreeViewTests
  • TreeViewExpandingEventTest() : TreeViewTests
  • TreeViewExpandingEventTest_ContentMode() : TreeViewTests
  • TreeViewExpandingEventTest_NodeMode() : TreeViewTests
  • TreeViewExpandNodeWithUnrealizedChildrenCrash() : TreeViewTests
  • TreeViewFastReorderTest() : TreeViewTests
  • TreeViewInFlyout_Click() : TreeViewPage
  • TreeViewInheritanceTest() : TreeViewTests
  • TreeViewItem() : TreeViewItem
  • TreeViewItemAutomationPeer() : TreeViewItemAutomationPeer
  • TreeViewItemAutomationPeerSelectionItemPatternTest() : TreeViewTests
  • TreeViewItemClickTest() : TreeViewTests
  • TreeViewItemClickTest_ContentMode() : TreeViewTests
  • TreeViewItemClickTest_NodeMode() : TreeViewTests
  • TreeViewItemContainerStyleTest() : TreeViewTests
  • TreeViewItemContainerTransitionTest() : TreeViewTests
  • TreeViewItemDataAutomationPeer() : TreeViewItemDataAutomationPeer
  • TreeViewItemProperties() : TreeViewItemProperties
  • TreeViewItemSource() : TreeViewItemSource
  • TreeViewItemSourceResetRecreateItems() : TreeViewTests
  • TreeViewItemsSourceTest() : TreeViewTests
  • TreeViewItemsSourceTestPage() : TreeViewItemsSourceTestPage
  • TreeViewItemsSourceTestPage_Click() : TreeViewPage
  • TreeViewItemsSourceUpdateTest() : TreeViewTests
  • TreeViewItemTemplateSelectorTest() : TreeViewTests
  • TreeViewItemTemplateSelectorTestPage() : TreeViewItemTemplateSelectorTestPage
  • TreeViewItemTemplateSettings() : TreeViewItemTemplateSettings , TreeViewItemProperties
  • TreeViewItemTemplateSettingsProperties() : TreeViewItemTemplateSettingsProperties
  • TreeViewItemTemplateSettingsProperty() : TreeViewItemProperties
  • TreeViewItemTemplateTest() : TreeViewTests
  • TreeViewItemUIATest() : TreeViewTests
  • TreeViewItemUIATest_ContentMode() : TreeViewTests
  • TreeViewItemUIATest_NodeMode() : TreeViewTests
  • TreeViewKeyboardReorderTest() : TreeViewTests
  • TreeViewKeyboardReorderTest_ContentMode() : TreeViewTests
  • TreeViewKeyboardReorderTest_NodeMode() : TreeViewTests
  • TreeViewKeyDownLeftToRightTest() : TreeViewTests
  • TreeViewKeyDownLeftToRightTest_ContentMode() : TreeViewTests
  • TreeViewKeyDownLeftToRightTest_NodeMode() : TreeViewTests
  • TreeViewKeyDownRightToLeftTest() : TreeViewTests
  • TreeViewKeyDownRightToLeftTest_ContentMode() : TreeViewTests
  • TreeViewKeyDownRightToLeftTest_NodeMode() : TreeViewTests
  • TreeViewLateDataInitTest() : TreeViewLateDataInitTest
  • TreeViewLateDataInitTestPage_Click() : TreeViewPage
  • TreeViewList() : TreeViewList
  • TreeViewListAutomationPeer() : TreeViewListAutomationPeer
  • TreeViewListMultipleSelectionUIATest() : TreeViewTests
  • TreeViewMultiSelectDragAndDropBetweenNodes() : TreeViewTests
  • TreeViewMultiSelectDragAndDropBetweenNodes_ContentMode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropBetweenNodes_NodeMode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropOnNode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropOnNode_ContentMode() : TreeViewTests
  • TreeViewMultiSelectDragAndDropOnNode_NodeMode() : TreeViewTests
  • TreeViewMultiSelectGamepadTest() : TreeViewTests
  • TreeViewMultiSelectGamepadTest_ContentMode() : TreeViewTests
  • TreeViewMultiSelectGamepadTest_NodeMode() : TreeViewTests
  • TreeViewMultiSelectItemTest() : TreeViewTests
  • TreeViewMultiSelectItemTest_ContentMode() : TreeViewTests
  • TreeViewMultiSelectItemTest_NodeMode() : TreeViewTests
  • TreeViewMultiSelectKeyboardingTest() : TreeViewTests
  • TreeViewMultiSelectKeyboardingTest_ContentMode() : TreeViewTests
  • TreeViewMultiSelectKeyboardingTest_NodeMode() : TreeViewTests
  • TreeViewNode() : TreeViewNode
  • TreeViewNodeDPTest() : TreeViewTests
  • TreeViewNodeHasChildrenPropertyChanged() : ViewModel
  • TreeViewNodeInheritenceTest() : TreeViewTests
  • TreeViewNodeInMarkupTest() : TreeViewTests
  • TreeViewNodeInMarkupTestPage() : TreeViewNodeInMarkupTestPage
  • TreeViewNodeInMarkupTestPage_Click() : TreeViewPage
  • TreeViewNodeIsExpandedPropertyChanged() : ViewModel
  • TreeViewNodeProperties() : TreeViewNodeProperties
  • TreeViewNodePropertyChanged() : ViewModel
  • TreeViewNodeStringableTest() : TreeViewTests
  • TreeViewNodeTest() : TreeViewTests
  • TreeViewNodeVector() : TreeViewNodeVector
  • TreeViewNodeVectorChanged() : ViewModel
  • TreeViewNonexistNodeAutomationPeerTest() : TreeViewTests
  • TreeViewNoReorderIntoChildren() : TreeViewTests
  • TreeViewNoReorderIntoChildren_ContentMode() : TreeViewTests
  • TreeViewNoReorderIntoChildren_NodeMode() : TreeViewTests
  • TreeViewPage() : TreeViewPage
  • TreeViewPartialSelectionTest() : TreeViewTests
  • TreeViewPartialSelectionTest_ContentMode() : TreeViewTests
  • TreeViewPartialSelectionTest_NodeMode() : TreeViewTests
  • TreeViewPendingSelectedNodesTest() : TreeViewTests
  • TreeViewProperties() : TreeViewProperties
  • TreeViewRootNodeBindingTest() : TreeViewTests
  • TreeViewSample() : TreeViewSample
  • TreeViewSelectedItemsTest() : TreeViewTests
  • TreeViewSelectedItemTest() : TreeViewTests
  • TreeViewSelectedNodesTest() : TreeViewTests
  • TreeViewSelectedNodeTest() : TreeViewTests
  • TreeViewSelectionChangedEventArgs() : TreeViewSelectionChangedEventArgs
  • TreeViewSelectionChangedMultipleMode() : TreeViewTests
  • TreeViewSelectionChangedSingleMode() : TreeViewTests
  • TreeViewSelectionChangeUIAEventsTest() : TreeViewTests
  • TreeViewSelectRegressionTest() : TreeViewTests
  • TreeViewSwappingNodesTest() : TreeViewTests
  • TreeViewSwappingNodesTest_ContentMode() : TreeViewTests
  • TreeViewSwappingNodesTest_NodeMode() : TreeViewTests
  • TreeViewUnrealizedChildrenTestPage() : TreeViewUnrealizedChildrenTestPage
  • TreeViewUnrealizedChildrenTestPage_Click() : TreeViewPage
  • TreeViewUpdateTest() : TreeViewTests
  • TreeViewViewModel() : TreeViewViewModel
  • TreeViewWithMultiLevelChildrenExpandCollapseTest() : TreeViewTests
  • TreeWalkNodeInfo() : SelectionTreeHelper::TreeWalkNodeInfo
  • TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException() : ItemsViewTests
  • TriggerLinedFlowLayoutItemsInfoRequestedEventArgsExceptions() : ItemsViewTests
  • Triggers() : ItemCollectionTransition
  • TrimEndScalarAnimation_0_to_0p316_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p316_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p375_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p375_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p43_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p43_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p457_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p457_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0_to_0p5() : AnimatedVisual
  • TrimEndScalarAnimation_0_to_1() : AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_0() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_1() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_2() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_3() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0_to_1_4() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimEndScalarAnimation_0p117_to_1_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p117_to_1_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p249_to_0p891() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p411_to_0p665_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p411_to_0p665_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p5_to_1_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_0p5_to_1_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimEndScalarAnimation_1_to_0p88() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0_to_0p399() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0_to_0p5() : AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_0() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_1() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_2() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_3() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0_to_1_4() : AnimatedAcceptVisualSource_AnimatedVisual
  • TrimStartScalarAnimation_0p29_to_0_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0p29_to_0_1() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0p5_to_0_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TrimStartScalarAnimation_0p5_to_0_1() : LottieLogo::LottieLogo_AnimatedVisual
  • try_as() : sealed< T, fallback, RawStorageT >
  • TryCompleteInitialization() : WebView2
  • TryConnectSystemBackdrop() : CommandBarFlyoutCommandBar
  • TryCreateAnimatedVisual() : AnimatedBackVisualSource , AnimatedAcceptVisualSource , AnimatedChevronRightDownSmallVisualSource , MockIAnimatedIconSource2 , AnimatedSettingsVisualSource , ProgressRingDeterminate , IAnimatedVisualSource , LottieLogo , AnimatedGlobalNavigationButtonVisualSource , AnimatedAcceptVisualSource , IAnimatedVisualSource3 , BrightnessSun , AnimatedGlobalNavigationButtonVisualSource , MockAnimatedIconSource , LottieLogo , AnimatedBackVisualSource , BrightnessSun , AnimatedChevronDownSmallVisualSource , ProgressRingIndeterminate , Nullsource , AnimatedChevronRightDownSmallVisualSource , AnimatedFindVisualSource , AnimatedChevronUpDownSmallVisualSource , AnimatedChevronDownSmallVisualSource
  • TryGetCurrentCoreApplicationView() : SharedHelpers
  • TryGetElement() : ItemsView , RecyclePool , ItemsRepeater , RecyclePool
  • TryGetElementCore() : RecyclePool
  • TryGetFocusByPressingTab() : BreadcrumbTests
  • TryGetFocusForRs2() : BreadcrumbTests
  • TryGetFocusForRs3() : BreadcrumbTests
  • TryGetItemIndex() : ItemsView
  • TryGetMaterialHelperInstance() : LifetimeHandler
  • TryGetStringRepresentationFromObject() : SharedHelpers
  • TryGetSwipeVisuals() : SwipeControl
  • TryGetVirtualizationInfo() : ItemsRepeater
  • TryInstallingBrowser() : WebView2Tests
  • TryInvalidateMeasure() : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • TrySetCenterPoint() : TeachingTip
  • TrySetForegroundProperty() : AnimatedIcon
  • TryWait() : ColorChangedEventWaiter
  • TryWaitForEditValues() : CommonStylesTests
  • TryWaitForScrollPresenterManipulationEnd() : ScrollPresenterTestsWithInputHelper
  • TryWaitForScrollViewManipulationEnd() : ScrollViewTestsWithInputHelper
  • TStartScalarAnimation_0_to_0p249() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_00() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_01() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_02() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_03() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_04() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_05() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_06() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_07() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_08() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_09() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_10() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_11() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_12() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_13() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_14() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_15() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_16() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_17() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p87_to_0_18() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p8_to_0() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_0p8_to_0p3() : LottieLogo::LottieLogo_AnimatedVisual
  • TStartScalarAnimation_1_to_0() : BrightnessSun::BrightnessSun_AnimatedVisual
  • TurnOffAnchorNotifications() : ScrollPresenterTestHooksHelper
  • TurnOffExpressionAnimationStatusNotifications() : ScrollPresenterTestHooksHelper
  • TurnOffInteractionSourcesNotifications() : ScrollPresenterTestHooksHelper
  • TurnOnAnchorNotifications() : ScrollPresenterTestHooksHelper
  • TurnOnExpressionAnimationStatusNotifications() : ScrollPresenterTestHooksHelper
  • TurnOnInteractionSourcesNotifications() : ScrollPresenterTestHooksHelper
  • TV_Click() : NavigationViewSelectedItemEdgeCasePage
  • TV_Click2() : NavigationViewSelectedItemEdgeCasePage
  • TwoByOneifySize() : AspectRatioRespectingControl
  • TwoPaneView() : TwoPaneView
  • TwoPaneView_ModeChanged() : TwoPaneViewPage
  • TwoPaneView_SizeChanged() : TwoPaneViewPage
  • TwoPaneViewPage() : TwoPaneViewPage
  • TwoPaneViewProperties() : TwoPaneViewProperties
  • TwoWayBoundButton_Click() : TreeViewPage
  • txtHorizontalOverriddenOffsetsChangeDuration_TextChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • txtVerticalOverriddenOffsetsChangeDuration_TextChanged() : ScrollPresenterWithCompositionScrollControllersPage
  • Type() : CustomProperty , SelectionModel , XamlMember , TreeViewNode
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- u -

  • UIAProperties() : RadioButtonsTests
  • UIAValuePatternTest() : RatingControlTests
  • UICollection() : UICollection
  • UICommand_ExecuteRequested() : SwipeControlPage
  • UIElement_DragStarting() : ItemsViewSummaryPage
  • UIObjectContains() : NavigationViewTestsBase
  • UIObjectToString() : NavigationViewTestsBase
  • Uncheck() : InfoBarTests , NumberBoxTests
  • Unchecked() : InkToolBarFlyoutItemProperties
  • UnclearableIsUnclearableTest() : RatingControlTests
  • UnderlyingType() : XamlTypeBase
  • UndoButtonOverflow16_SizeChanged() : CommandBarFlyoutPage
  • UndoItem_Click() : MenuBarPage
  • UndoSelectionAndRevertSelectionTo() : NavigationView
  • UnhookAllCommandBarElementDependencyPropertyChanges() : CommandBarFlyout
  • UnhookAnnotatedScrollBarEvents() : ItemsViewIntegrationPage
  • UnhookBringIntoViewEvents() : ScrollPresenterBringIntoViewPage
  • UnhookChildPropertyChanged() : ParallaxView
  • UnhookCollectionChangedHandler() : final
  • UnhookCommandBarElementDependencyPropertyChanges() : CommandBarFlyout
  • UnhookCompositionTargetRendering() : ItemsView , ScrollInputHelper , ScrollPresenter , ScrollView
  • UnhookContentEffectiveViewportChanged() : ScrollPresenterDynamicPage
  • UnhookContentPointerEvents() : ScrollPresenterDynamicPage
  • UnhookContentPropertyChanged() : ScrollPresenter
  • UnhookEvents() : NumberBox
  • UnhookEventsAndClearFields() : NavigationViewItem , NavigationViewItemPresenter , TabView , NavigationView
  • UnhookHandlers() : AnnotatedScrollBar , BiDirectionalScrollController , CompositionScrollController
  • UnhookHorizontalScrollControllerEvents() : ScrollPresenter , ScrollView
  • UnhookHorizontalScrollControllerPanningInfoEvents() : ScrollPresenter
  • UnhookInputEvents() : NavigationViewItem
  • UnhookItemsRepeaterEvents() : ItemsView , ItemsViewSummaryPage , SelectorBarSummaryPage
  • UnhookItemsViewEvents() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UnhookLinedFlowLayoutEvents() : ItemsViewIntegrationPage , ItemsViewSummaryPage
  • UnhookPhotosCollectionChanged() : ItemsViewIntegrationPage
  • UnhookRichEditBoxTextChanged() : ScrollInputHelper
  • UnhookScrollBarEvent() : ScrollBarController
  • UnhookScrollBarPropertyChanged() : ScrollBarController
  • UnhookScrollersEvents() : VariableSizedItemsPage
  • UnhookScrollPresenterContentPropertyChanged() : ScrollInputHelper
  • UnhookScrollPresenterEvents() : ScrollPresenter , ScrollPresenterBringIntoViewPage , ScrollView
  • UnhookScrollPresenterPropertyChanged() : ScrollInputHelper
  • UnhookScrollViewerContentPropertyChanged() : ScrollInputHelper
  • UnhookScrollViewerDirectManipulationCompleted() : ScrollInputHelper
  • UnhookScrollViewerDirectManipulationStarted() : ScrollInputHelper
  • UnhookScrollViewerEvents() : ScrollPresenterBringIntoViewPage
  • UnhookScrollViewerPropertyChanged() : ScrollInputHelper
  • UnhookScrollViewEvents() : ItemsView , ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo , ScrollView
  • UnhookSelectorBarEvents() : SelectorBarSummaryPage
  • UnhookSourceControlTemplateChanged() : ScrollInputHelper
  • UnhookSourceElementLoaded() : ScrollInputHelper
  • UnhookTargetElementLoaded() : ScrollInputHelper
  • UnhookVerticalScrollControllerEvents() : ScrollPresenter , ScrollView
  • UnhookVerticalScrollControllerPanningInfoEvents() : ScrollPresenter
  • UnhookWindowPointerHandlers() : RevealBorderLight
  • UniformGridLayout() : UniformGridLayout
  • UniformGridLayoutDemo() : UniformGridLayoutDemo
  • UniformGridLayoutDemo_Loaded() : UniformGridLayoutDemo
  • UniformGridLayoutProperties() : UniformGridLayoutProperties
  • UninitializeForContext() : FlowLayoutAlgorithm , FlowLayoutState , Layout , StackLayoutState , UniformGridLayoutState
  • UninitializeForContextCore() : FlowLayoutDerived , FlowLayout , LinedFlowLayout , NonVirtualizingLayout , StackLayout , Flex , ActivityFeedLayout , UniformGridLayout , VirtualizingLayout
  • UniqueId() : VirtualizationInfo
  • UniqueIdElementPool() : final
  • UniScrollController() : BiDirectionalScrollController::UniScrollController
  • UniScrollController_ScrollCompleted() : BiDirectionalScrollController
  • UniScrollControllerScrollingScrollCompletedEventArgs() : BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs
  • UnlinkElementFromParent() : NavigationViewItemsFactory
  • UnListenToCollectionChanges() : InspectingDataSource
  • UnloadContent() : AnimatedVisualPlayer
  • UnloadFallbackContent() : AnimatedVisualPlayer
  • UnlockItems() : LinedFlowLayout
  • UnlockLinedFlowLayoutItems() : LayoutsTestHooks
  • UnpinElement() : ItemsRepeater
  • UnrealizedTreeViewSelection_Collapsed() : TreeViewUnrealizedChildrenTestPage
  • UnrealizedTreeViewSelection_Expanding() : TreeViewUnrealizedChildrenTestPage
  • UnregisterAnchorCandidate() : ViewportTests::TestScrollingSurface , ItemsRepeaterScrollHost , IRepeaterScrollingSurface , ScrollPresenter , ScrollView
  • UnregisterCoreEventHandlers() : WebView2
  • UnregisterEvents() : SplitButton
  • UnregisterScrollAnchorCandidates() : ViewportManagerWithPlatformFeatures
  • UnregisterXamlEventHandlers() : WebView2
  • UnselectPrevItem() : NavigationView
  • UnsetDropShadow() : NavigationView
  • UnsetFallbackRating_Loaded() : RatingControlPage
  • UnsetGlyph() : RatingItemFontInfoProperties
  • UnsetGlyphProperty() : RatingItemFontInfoProperties
  • UnsetImage() : RatingItemImageInfoProperties
  • UnsetImageFallbackRating_Loaded() : RatingControlPage
  • UnsetImageProperty() : RatingItemImageInfoProperties
  • UnsetLuminosityButton_Clicked() : AcrylicRenderingPage
  • UntargetedTipCenterPlacementOffset() : TeachingTip
  • UntargetedTipFarPlacementOffset() : TeachingTip
  • UntargetedTipNearPlacementOffset() : TeachingTip
  • unwrap() : TStorageWrapperImpl< T, isNoTrackerRef > , TStorageWrapperImpl< T, true > , VectorInnerImpl< VectorOptions, Wrapper > , ReferenceTrackerStorageHelper< ImplT, T > , NonReferenceTrackerStorageHelper< T >
  • Update() : ItemsRepeaterElementClearingEventArgs , ItemsRepeaterElementIndexChangedEventArgs , ItemsRepeaterElementPreparedEventArgs
  • UpdateAcrylicBrush() : AcrylicBrush
  • UpdateAcrylicBrushesDarkTheme() : XamlControlsResources
  • UpdateAcrylicBrushesLightTheme() : XamlControlsResources
  • UpdateAcrylicStatus() : AcrylicBrush
  • UpdateActualLineHeight() : LinedFlowLayout
  • UpdateAdaptiveLayout() : NavigationView
  • UpdateAlphaSlider() : ColorPicker
  • UpdateAnticipatedOffset() : ScrollPresenter
  • UpdateAnticipatedZoomFactor() : ScrollPresenter
  • UpdateAppAnimator() : ItemsViewInteractiveTestsPage
  • UpdateAppAnimatorCheckBox() : ItemsViewInteractiveTestsPage
  • UpdateAppTitle() : NavigationViewTopNavOnlyPage
  • UpdateAspectRatiosWithItemsInfo() : LinedFlowLayout
  • UpdateAutomationName() : PersonPicture
  • UpdateAutomationSizeAndPosition() : MenuBar
  • UpdateBackAndCloseButtonsVisibility() : NavigationView
  • UpdateBackButton() : TitleBar
  • UpdateBackground() : ItemsViewSummaryPage , ScrollViewDynamicPage , SelectorBarSummaryPage
  • UpdateBadge() : PersonPicture
  • UpdateBadgeGlyph() : PersonPicture
  • UpdateBadgeImageSource() : PersonPicture
  • UpdateBadgeNumber() : PersonPicture
  • UpdateBitmapSources() : ColorSpectrum
  • UpdateBorderBrush() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateBorderThickness() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateBottomBorderLineVisualStates() : TabView
  • UpdateBottomBorderVisualState() : TabViewListView
  • UpdateBreadcrumbBarItemsFlowDirection() : BreadcrumbBar
  • UpdateBrush() : MonochromaticOverlayPresenter
  • UpdateButtonAutomationProperties() : TeachingTip
  • UpdateButtonCommonVisualState() : BreadcrumbBarItem
  • UpdateButtons() : TextCommandBarFlyout
  • UpdateButtonsState() : TeachingTip
  • UpdateButtonVisibilityCheckboxes() : PipsPagerPage
  • UpdateCachedBounds() : PinterestLayout
  • UpdateCanExecute() : MyCommand
  • UpdateCanScroll() : AnnotatedScrollBar , BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • UpdateCaptionMargins() : RatingControl
  • UpdateCenterInWebPage() : MapControl
  • UpdateCheckboxState() : ItemContainer
  • UpdateCheckedItemInGroup() : RadioMenuFlyoutItem
  • UpdateChild() : ParallaxView
  • UpdateChildrenCount() : LinedFlowLayoutDemo
  • UpdateChildrenList() : BreadcrumbBarPage
  • UpdateChkIsEnabled() : ScrollViewerPage
  • UpdateChkIsHorizontalRailEnabled() : ScrollViewerPage
  • UpdateChkIsHorizontalScrollChainingEnabled() : ScrollViewerPage
  • UpdateChkIsTabStop() : ScrollViewerPage
  • UpdateChkIsVerticalRailEnabled() : ScrollViewerPage
  • UpdateChkIsVerticalScrollChainingEnabled() : ScrollViewerPage
  • UpdateChkIsZoomChainingEnabled() : ScrollViewerPage
  • UpdateCloseButton() : InfoBar , TabViewItem
  • UpdateClosedCompactVisualState() : NavigationViewItemPresenter
  • UpdateCmbBackground() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbContent() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbContentHorizontalAlignment() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateCmbContentManipulationMode() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateCmbContentOrientation() : ScrollPresenterDynamicPage
  • UpdateCmbContentVerticalAlignment() : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateCmbHorizontalScrollBarVisibility() : ScrollViewerPage , ScrollViewDynamicPage
  • UpdateCmbHorizontalScrollChainMode() : ScrollPresenterDynamicPage
  • UpdateCmbHorizontalScrollMode() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbHorizontalScrollRailMode() : ScrollPresenterDynamicPage
  • UpdateCmbIgnoredInputKinds() : ScrollPresenterDynamicPage
  • UpdateCmbItemsRepeaterHorizontalAlignment() : VariableSizedItemsPage
  • UpdateCmbItemsRepeaterVerticalAlignment() : VariableSizedItemsPage
  • UpdateCmbScrollPresenterManipulationMode() : ScrollPresenterDynamicPage
  • UpdateCmbScrollViewerManipulationMode() : ScrollViewerPage
  • UpdateCmbVerticalScrollBarVisibility() : ScrollViewerPage , ScrollViewDynamicPage
  • UpdateCmbVerticalScrollChainMode() : ScrollPresenterDynamicPage
  • UpdateCmbVerticalScrollMode() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateCmbVerticalScrollRailMode() : ScrollPresenterDynamicPage
  • UpdateCmbXYFocusKeyboardNavigation() : ScrollViewerPage , ScrollViewDynamicPage
  • UpdateCmbZoomChainMode() : ScrollPresenterDynamicPage
  • UpdateCmbZoomMode() : ScrollViewerPage , ScrollPresenterDynamicPage
  • UpdateColor() : ColorPicker , ColorSpectrum
  • UpdateColorControls() : ColorPicker
  • UpdateColorFromPoint() : ColorSpectrum
  • UpdateColors() : SwipeControl
  • UpdateColorsIfExecuteItem() : SwipeControl
  • UpdateColorsIfRevealItems() : SwipeControl
  • UpdateCompactPaneLength() : NavigationViewItem , NavigationViewItemPresenter
  • UpdateCompositionBrush() : AcrylicBrushPage , AcrylicMarkupPage
  • UpdateCompositionExtendMode() : RadialGradientBrush
  • UpdateCompositionGradientCenter() : RadialGradientBrush
  • UpdateCompositionGradientMappingMode() : RadialGradientBrush
  • UpdateCompositionGradientOrigin() : RadialGradientBrush
  • UpdateCompositionGradientRadius() : RadialGradientBrush
  • UpdateCompositionGradientStops() : RadialGradientBrush
  • UpdateCompositionInterpolationSpace() : RadialGradientBrush
  • UpdateConditionalExpressionAnimationForImpulse() : SnapPointBase , ScrollSnapPoint , RepeatedScrollSnapPoint , ZoomSnapPoint , RepeatedZoomSnapPoint
  • UpdateContent() : AnimatedVisualPlayer , RefreshVisualizer , ScrollPresenter , ScrollViewDynamicPage , TitleBar
  • UpdateContentBindingsForPaneDisplayMode() : NavigationView
  • UpdateContentHeight() : ScrollViewWithScrollControllersPage
  • UpdateContentLeftIndentation() : NavigationViewItemPresenter
  • UpdateContentMargin() : ScrollViewWithScrollControllersPage
  • UpdateContentOrientation() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • UpdateContentPosition() : InfoBar
  • UpdateContentSize() : ScrollInputHelper
  • UpdateContentWidth() : ScrollViewWithScrollControllersPage
  • UpdateControlForContact() : PersonPicture
  • UpdateControlsInWebPage() : MapControl
  • UpdateCoreWebViewScale() : WebView2
  • UpdateCoreWebViewVisibility() : WebView2
  • UpdateCornerRadius() : AutoSuggestBoxHelper , ComboBoxHelper , ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateCurrentItemIndex() : ItemsViewSummaryPage
  • UpdateDataSourceItemCount() : FlatItemsControlPage , ListViewBasePage , ItemsViewSummaryPage
  • UpdateDefaultVisualBackgroundColor() : WebView2
  • UpdateDepth() : TreeViewNode
  • UpdateDisplayModeAutoState() : PagerControl
  • UpdateDisplayRadioButton() : RadioButtonsPage
  • UpdateDisplayRadioButtonButton_Click() : RadioButtonsPage
  • UpdateDragDropVisualState() : TabViewItem
  • UpdateDragRegion() : TitleBar
  • UpdateDropTargetDropEffect() : TreeViewList
  • UpdateDynamicHeroContentPlacementToBottom() : TeachingTip
  • UpdateDynamicHeroContentPlacementToBottomImpl() : TeachingTip
  • UpdateDynamicHeroContentPlacementToTop() : TeachingTip
  • UpdateDynamicHeroContentPlacementToTopImpl() : TeachingTip
  • UpdateElementIndex() : final
  • UpdateEllipse() : ColorSpectrum
  • UpdateEllipsisBreadcrumbBarItemDropDownItemTemplate() : BreadcrumbBar
  • UpdateEllipsisDropDownItemCommonVisualState() : BreadcrumbBarItem
  • UpdateEndOffsetExpression() : ParallaxView
  • UpdateExecuteBackgroundColor() : SwipeControl
  • UpdateExecuteForegroundColor() : SwipeControl
  • UpdateExpandDirection() : Expander
  • UpdateExpandState() : Expander
  • UpdateExpressionAnimation() : ParallaxView
  • UpdateExpressionAnimationSources() : ScrollPresenter
  • UpdateExtentHeight() : ItemsViewSummaryPage , VariableSizedItemsPage , ScrollViewDynamicPage
  • UpdateExtentWidth() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • UpdateFallbackBrush() : RadialGradientBrush
  • UpdateFlowsFromAndFlowsTo() : CommandBarFlyoutCommandBar
  • UpdateFlyoutIndex() : BreadcrumbBarItem
  • UpdateFocusedElement() : final
  • UpdateFooter() : TitleBar
  • UpdateFooterRepeaterItemsSource() : NavigationView
  • UpdateForeground() : InfoBar , TabViewItem
  • UpdateHasChildren() : TreeViewNode
  • UpdateHeader() : TitleBar
  • UpdateHeaderPresenterState() : NumberBox
  • UpdateHeaderSizes() : ScrollViewerPage
  • UpdateHeaderSpacing() : TitleBar
  • UpdateHeaderVisibility() : NavigationView
  • UpdateHeight() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , TitleBar
  • UpdateHeightFromInputTarget() : ColorPickerPage
  • UpdateHorizontalAnchorRatio() : ItemsViewSummaryPage , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , ScrollViewDynamicPage
  • UpdateHorizontalOffset() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • UpdateHorizontalScrollBarVisibility() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • UpdateHorizontalScrollChainMode() : ScrollViewDynamicPage
  • UpdateHorizontalScrollController() : ScrollView
  • UpdateHorizontalScrollMode() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • UpdateHorizontalScrollRailMode() : ScrollViewDynamicPage
  • UpdateIcon() : InfoBadgePage , InfoBar , TitleBar
  • UpdateIconVisibility() : InfoBar
  • UpdateIfReady() : PersonPicture
  • UpdateIgnoredInputKinds() : ScrollViewDynamicPage
  • UpdateImage() : ImagePage
  • UpdateIndentation() : TreeViewItem
  • UpdateIndex() : VirtualizationInfo
  • UpdateIndexBasedLayoutOrientation() : FlowLayout , StackLayout , UniformGridLayout
  • UpdateIndicatorWidthTest() : ProgressBarTests
  • UpdateIndividualNavigationButtonVisualState() : PipsPager
  • UpdateInkPresenterSize() : InkCanvas
  • UpdateInlineItemTypeVisualState() : BreadcrumbBarItem
  • UpdateInnerLayouts() : AnimationsDemoPage::AnimationElementFactory
  • UpdateInteractableElementsList() : TitleBar
  • UpdateInteractionRatiosComboBox() : RefreshContainerOnImagePage
  • UpdateInternalExpressionAnimations() : ScrollInputHelper
  • UpdateIsChildSelected() : NavigationView
  • UpdateIsChildSelectedForIndexPath() : NavigationView
  • UpdateIsClosedCompact() : NavigationView , NavigationViewItem , NavigationViewItemHeader , NavigationViewItemSeparator
  • UpdateIsEnabled() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateIsHovering() : ButtonInteraction
  • UpdateIsInteractingForRefresh() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • UpdateIsItemDraggedOver() : TabView
  • UpdateIsOpen() : SwipeControl
  • UpdateIsPressing() : ButtonInteraction
  • UpdateIsTabStop() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateIsTargetElementInSource() : ScrollInputHelper
  • UpdateIsUsingAcrylicBrush() : AcrylicBrushPage , AcrylicMarkupPage
  • UpdateItemIndentation() : NavigationViewItem , NavigationViewItemHeader , NavigationViewItemSeparator
  • UpdateItemsControlHeaderTemplate() : GroupedItemsControlPage
  • UpdateItemsControlIsTabStop() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsControlItemTemplate() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsControlProperties() : GroupedItemsControlPage
  • UpdateItemsControlTabNavigation() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsControlXYFocusKeyboardNavigation() : FlatItemsControlPage , GroupedItemsControlPage
  • UpdateItemsCount() : SelectorBarSummaryPage
  • UpdateItemsInfo() : LinedFlowLayout
  • UpdateItemsInfoRequestedCheckBoxes() : ItemsViewInteractiveTestsPage
  • UpdateItemsInfoRequestedHandler() : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage
  • UpdateItemsPanelAreStickyGroupHeadersEnabled() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsPanelCacheLength() : GroupedListViewBasePage
  • UpdateItemsPanelGroupHeaderPlacement() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsPanelGroupPadding() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsPanelMargin() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsPanelOrientation() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsPanelProperties() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsPanelType() : FlatItemsControlPage , GroupedItemsControlPage , GroupedListViewBasePage , ListViewBasePage
  • UpdateItemsRepeater() : ItemsView
  • UpdateItemsRepeaterChildrenCount() : ItemsViewSummaryPage
  • UpdateItemsRepeaterDefaultCacheLengths() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementActualHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementActualWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementDesiredSize() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementIsEnabled() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMaxHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMaxWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMinHeight() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementMinWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementRenderSize() : ItemsViewSummaryPage
  • UpdateItemsRepeaterElementWidth() : ItemsViewSummaryPage
  • UpdateItemsRepeaterFields() : ItemsViewSummaryPage
  • UpdateItemsRepeaterHorizontalAlignment() : ItemsViewSummaryPage
  • UpdateItemsRepeaterHorizontalCacheLength() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemContainerCanUserInvoke() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemContainerCanUserSelect() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemContainerIsSelected() : ItemsViewSummaryPage
  • UpdateItemsRepeaterItemsSource() : BreadcrumbBar , NavigationView
  • UpdateItemsRepeaterLogItemIndexDbg() : ItemsViewSummaryPage
  • UpdateItemsRepeaterVerticalAlignment() : ItemsViewSummaryPage
  • UpdateItemsRepeaterVerticalCacheLength() : ItemsViewSummaryPage , VariableSizedItemsPage
  • UpdateItemsSelectionMode() : TreeView
  • UpdateItemsSource() : RadioButtons
  • UpdateItemsViewCurrentElementVisual() : ItemsViewSummaryPage
  • UpdateItemsViewIsItemInvokedEnabled() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • UpdateItemsViewKeyboardNavigationReferenceOffsetVisual() : ItemsViewSummaryPage
  • UpdateItemsViewLayout() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • UpdateItemsViewSelectionFromSelectedItem() : SelectorBar
  • UpdateItemsViewSelectionMode() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • UpdateItemsWrapGridCacheLength() : GroupedItemsControlPage
  • UpdateItemsWrapGridItemHeight() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsWrapGridItemWidth() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemsWrapGridMaximumRowsOrColumns() : ListViewBasePage , FlatItemsControlPage
  • UpdateItemsWrapGridUIVisibility() : GroupedItemsControlPage , GroupedListViewBasePage
  • UpdateItemTemplate() : RadioButtons , BreadcrumbBar
  • UpdateItemTypeVisualState() : BreadcrumbBarItem
  • UpdateItemVisualState() : CommandBarFlyoutCommandBar
  • UpdateKeyboardNavigationReference() : ItemsView
  • UpdateLabelContainersOffsets() : AnnotatedScrollBar
  • UpdateLastElement() : BreadcrumbBar
  • UpdateLayoutPanelBackground() : LinedFlowLayoutDemo
  • UpdateLayoutPanelBorderBrush() : LinedFlowLayoutDemo
  • UpdateLayoutPanelBorderThickness() : LinedFlowLayoutDemo
  • UpdateLayoutPanelCornerRadius() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementActualHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementActualWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementCornerRadius() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementIsEnabled() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMaxHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMaxWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMinHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementMinWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelElementWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelHorizontalAlignment() : LinedFlowLayoutDemo
  • UpdateLayoutPanelMargin() : LinedFlowLayoutDemo
  • UpdateLayoutPanelMaxHeight() : LinedFlowLayoutDemo
  • UpdateLayoutPanelMaxWidth() : LinedFlowLayoutDemo
  • UpdateLayoutPanelPadding() : LinedFlowLayoutDemo
  • UpdateLayoutPanelVerticalAlignment() : LinedFlowLayoutDemo
  • UpdateLayoutPanelWidth() : LinedFlowLayoutDemo
  • UpdateLayoutVirtualization() : PipsPager
  • UpdateLeftNavigationOnlyVisualState() : NavigationView
  • UpdateLeftRepeaterItemSource() : NavigationView
  • UpdateLength() : TwoPaneViewPage
  • UpdateLightTargets() : RevealBrush
  • UpdateLinedFlowLayoutActualLineHeight() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutAverageItemAspectRatioDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutForcedWrapMultiplierDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutFrozenItemIndexes() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutIsFastPathSupportedDbg() : ItemsViewSummaryPage
  • UpdateLinedFlowLayoutItemsJustification() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutItemsStretch() : LinedFlowLayoutDemo , ItemsViewSummaryPage
  • UpdateLinedFlowLayoutLineHeight() : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutLineSpacing() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutLockedItemsVisuals() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutLogItemIndexDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutMinItemSpacing() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutRealizedItemIndexes() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateLinedFlowLayoutRequestedRangeLength() : ItemsViewSummaryPage
  • UpdateLinedFlowLayoutRequestedRangeStartIndex() : ItemsViewSummaryPage
  • UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg() : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • UpdateListViewBaseProperties() : GroupedListViewBasePage
  • UpdateListViewBaseReorderMode() : ListViewBasePage
  • UpdateListViewBaseSelectionMode() : GroupedListViewBasePage , ListViewBasePage
  • UpdateListViewBaseSingleSelectionFollowsFocus() : GroupedListViewBasePage , ListViewBasePage
  • UpdateListViewBaseTabNavigation() : GroupedListViewBasePage , ListViewBasePage
  • UpdateListViewItemContainerTransitions() : TabView
  • UpdateLottieProgress() : ProgressRing
  • UpdateManipulationAlignments() : ScrollInputHelper
  • UpdateManipulationRedirectionMode() : ScrollPresenter
  • UpdateManipulationZoomMode() : ScrollInputHelper
  • UpdateMapIcon() : MapControl
  • UpdateMapServiceTokenInWebPage() : MapControl
  • UpdateMargin() : ItemsViewSummaryPage , NavigationViewItemPresenter , ScrollViewDynamicPage , SelectorBarSummaryPage
  • UpdateMaxHeight() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateMaxWidth() : SelectorBarSummaryPage , ItemsViewSummaryPage
  • UpdateMaxZoomFactor() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateMinMax_Click() : ProgressBarReTemplatePage , ProgressRingCustomLottieSourcePage , ProgressRingPage , ProgressBarPage
  • UpdateMinMaxTest() : ProgressRingTests , ProgressBarTests
  • UpdateMinZoomFactor() : ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • UpdateMirrorTransform() : AnimatedIcon
  • UpdateMode() : TwoPaneView
  • UpdateModernPanelUIVisibility() : FlatItemsControlPage , ListViewBasePage
  • UpdateMoreButton() : ColorPicker
  • UpdateMousePointerOverInstance() : ItemContainer
  • UpdateMultipleSelection() : TreeViewItem
  • UpdateMultiSelectState() : ItemContainer
  • UpdateNavigationButtonVisualStates() : PipsPager
  • UpdateNavigationViewItemsFactory() : NavigationView
  • UpdateNavigationViewItemToolTip() : NavigationViewItem
  • UpdateNodeIsExpandedAsync() : TreeViewItem
  • UpdateNodeSelection() : ViewModel
  • UpdateNoiseBrush() : AcrylicBrushPage , AcrylicMarkupPage
  • UpdateNonClientRegion() : TabView
  • UpdateNumberOfPanelCollectionInfiniteItems() : PagerControl
  • UpdateNumberPanel() : PagerControl
  • UpdateNumberPanelCollectionAllItems() : PagerControl
  • UpdateNumberPanelCollectionCenterWithEllipsis() : PagerControl
  • UpdateNumberPanelCollectionEndWithEllipsis() : PagerControl
  • UpdateNumberPanelCollectionStartWithEllipsis() : PagerControl
  • UpdateNumberPanelContentTextBlock() : PagerControlPage
  • UpdateOffset() : ScrollPresenter
  • UpdateOffsets() : CanvasScrollControllerConsumer
  • UpdateOnEdgeButtonVisualStates() : PagerControl
  • UpdateOpenPaneLength() : NavigationView
  • UpdateOrientation() : CompositionScrollController
  • UpdateOuterItemsControl() : NestedItemsControlsPage
  • UpdateOuterListView() : NestedListViewsPage
  • UpdateOutOfBoundsPanSize() : ScrollInputHelper
  • UpdatePadding() : ItemsViewSummaryPage , ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , SelectorBarSummaryPage , TitleBar
  • UpdatePadding_Click() : ProgressBarReTemplatePage , ProgressBarPage
  • UpdatePaneButtonsWidths() : NavigationView
  • UpdatePaneDisplayMode() : NavigationView
  • UpdatePaneLayout() : NavigationView
  • UpdatePaneOverlayGroup() : NavigationView
  • UpdatePaneTabFocusNavigation() : NavigationView
  • UpdatePaneTitleFrameworkElementParents() : NavigationView
  • UpdatePaneTitleMargins() : NavigationView
  • UpdatePaneToggleButton() : TitleBar
  • UpdatePaneToggleButtonVisibility() : NavigationView
  • UpdatePaneToggleSize() : NavigationView
  • UpdatePaneVisibility() : NavigationView
  • UpdatePanningElementOffsetMultiplier() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • UpdatePanningFrameworkElementLength() : BiDirectionalScrollController::UniScrollController , CompositionScrollControllerPanningInfo
  • UpdatePanningFrameworkElementOffset() : CompositionScrollController
  • UpdateParents() : TreeNode , TreeStructure
  • UpdateParentWindow() : WebView2
  • UpdatePartsVisibility() : SelectorBarItem
  • UpdatePhasingInfo() : VirtualizationInfo
  • UpdatePin() : final
  • UpdatePipOrientation() : PipsPager
  • UpdatePipsItems() : PipsPager
  • UpdatePolicyStatus() : MaterialHelper
  • UpdatePopupRequestedTheme() : TeachingTip
  • UpdatePosition() : SliderInteraction
  • UpdatePositionBoundaries() : ScrollPresenter
  • UpdatePositionsOfAnchoredElements() : AnnotatedScrollBar
  • UpdatePreviousColorRectangle() : ColorPicker
  • UpdateRadioButtonsSource() : RadioButtonsPage
  • UpdateRaiseAnchorNotifications() : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • UpdateRatingItemsAppearance() : RatingControl
  • UpdateRectVisualState() : ButtonInteractionPage
  • UpdateRefreshState() : RefreshVisualizer
  • UpdateRenderedSubscriptionAndVisibility() : WebView2
  • UpdateRepeaterItemsSource() : NavigationView , NavigationViewItem
  • UpdateRestingPointExpressionAnimationForImpulse() : RepeatedZoomSnapPoint , SnapPointBase , ScrollSnapPoint , ZoomSnapPoint , RepeatedScrollSnapPoint
  • UpdateRevealBrush() : RevealBrush
  • UpdateRoundingScaleFactor() : LinedFlowLayout
  • UpdateRowsColumns() : TwoPaneView
  • UpdateScrollAutomationPatternProperties() : ScrollPresenter
  • UpdateScrollbars() : ScrollPresenterExpressionAnimationSourcesPage
  • UpdateScrollControllerIsScrollable() : ScrollPresenter
  • UpdateScrollControllersAutoHiding() : ScrollView
  • UpdateScrollControllersSeparator() : ScrollView
  • UpdateScrollControllersSeparatorVisualState() : ScrollView
  • UpdateScrollControllersVisibility() : ScrollView
  • UpdateScrollControllersVisualState() : ScrollView
  • UpdateScrollControllerValues() : ScrollPresenter
  • UpdateScrollerChangeViewVerticalScrollPercentage() : VariableSizedItemsPage
  • UpdateScrollerExtentHeight() : VariableSizedItemsPage
  • UpdateScrollerScrollableHeight() : VariableSizedItemsPage
  • UpdateScrollerVerticalAnchorRatio() : VariableSizedItemsPage
  • UpdateScrollerVerticalOffset() : VariableSizedItemsPage
  • UpdateScrollerVerticalScrollPercentage() : VariableSizedItemsPage
  • UpdateScrollerZoomFactor() : VariableSizedItemsPage
  • UpdateScrollOffsetToLabelOffsetFactor() : AnnotatedScrollBar
  • UpdateScrollPatternProperties() : ScrollPresenterAutomationPeer
  • UpdateScrollPresenter() : ScrollView
  • UpdateScrollPresenterHorizontalScrollController() : ScrollView
  • UpdateScrollPresenterVerticalScrollController() : ScrollView
  • UpdateScrollView() : ItemsView
  • UpdateScrollViewBackground() : LinedFlowLayoutDemo
  • UpdateScrollViewBorderBrush() : LinedFlowLayoutDemo
  • UpdateScrollViewBorderThickness() : LinedFlowLayoutDemo
  • UpdateScrollViewContentOrientation() : LinedFlowLayoutDemo
  • UpdateScrollViewCornerRadius() : LinedFlowLayoutDemo
  • UpdateScrollViewDefaultAnchorRatios() : ItemsViewSummaryPage
  • UpdateScrollViewerDecreaseAndIncreaseButtonsViewState() : TabView
  • UpdateScrollViewerExtentHeight() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerExtentWidth() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerHorizontalOffset() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerHorizontalScrollMode() : GroupedListViewBasePage
  • UpdateScrollViewerHorizontalSnapPointsType() : ListViewBasePage , GroupedListViewBasePage
  • UpdateScrollViewerProperties() : ListViewBasePage , GroupedListViewBasePage
  • UpdateScrollViewerScrollOrientation() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerSizeProperties() : ListViewBasePage , GroupedListViewBasePage
  • UpdateScrollViewerVerticalOffset() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerVerticalScrollMode() : GroupedListViewBasePage
  • UpdateScrollViewerVerticalSnapPointsType() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerViewportHeight() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewerViewportWidth() : GroupedListViewBasePage , ListViewBasePage
  • UpdateScrollViewExtentHeight() : LinedFlowLayoutDemo
  • UpdateScrollViewExtentWidth() : LinedFlowLayoutDemo
  • UpdateScrollViewFields() : ItemsViewSummaryPage
  • UpdateScrollViewHeight() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalAnchorRatio() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalOffset() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalScrollBarVisibility() : LinedFlowLayoutDemo
  • UpdateScrollViewHorizontalScrollMode() : LinedFlowLayoutDemo
  • UpdateScrollViewIsEnabled() : LinedFlowLayoutDemo
  • UpdateScrollViewIsTabStop() : LinedFlowLayoutDemo
  • UpdateScrollViewMargin() : LinedFlowLayoutDemo
  • UpdateScrollViewMaxHeight() : LinedFlowLayoutDemo
  • UpdateScrollViewMaxWidth() : LinedFlowLayoutDemo
  • UpdateScrollViewPadding() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalAnchorRatio() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalOffset() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalScrollBarVisibility() : LinedFlowLayoutDemo
  • UpdateScrollViewVerticalScrollMode() : LinedFlowLayoutDemo
  • UpdateScrollViewWidth() : LinedFlowLayoutDemo
  • UpdateScrollViewZoomMode() : LinedFlowLayoutDemo
  • UpdateSelectedBackgroundPathTranslateTransform() : TabViewItem
  • UpdateSelectedColorName() : ColorPickerPage
  • UpdateSelectedIndex() : RadioButtons , TabView
  • UpdateSelectedItem() : ItemsViewSummaryPage , SelectorBarSummaryPage , RadioButtons , TabView
  • UpdateSelectedItemFromItemsView() : SelectorBar
  • UpdateSelectedItemFromMenuItems() : NavigationView
  • UpdateSelectedItems() : ItemsViewSummaryPage
  • UpdateSelectedPip() : PipsPager
  • UpdateSelection() : SelectedTreeNodeVector , TreeViewItem , TreeViewItemAutomationPeer , ViewModel , TreeView , ItemContainerAutomationPeer
  • UpdateSelectionEllipseColor() : ColorPickerPage
  • UpdateSelectionEllipsePosition() : ColorPickerPage
  • UpdateSelectionForMenuItems() : NavigationView
  • UpdateSelectionModelSelection() : NavigationView
  • UpdateSelectionModelSelectionForSelectedItem() : NavigationView
  • UpdateSelectionStateOfAncestors() : ViewModel
  • UpdateSelectionStateOfDescendants() : ViewModel
  • UpdateSelectionVisual() : TreeViewItem
  • UpdateSelector() : ItemsView
  • UpdateSettingsItemToolTip() : NavigationView
  • UpdateSeverity() : InfoBar
  • UpdateSharedState() : AcrylicBrushPage
  • UpdateSingleSelectionFollowsFocusTemplateSetting() : NavigationView
  • UpdateSizeBasedTemplateSettings() : TeachingTip
  • UpdateSizeOfSetForElements() : PipsPager
  • UpdateSnapPointsIgnoredValue() : ScrollPresenter
  • UpdateSnapPointsRanges() : ScrollPresenter
  • UpdateSortAndFilter() : SortingAndFilteringPage
  • UpdateSource() : XamlControlsResources , ScrollInputHelper
  • UpdateSourceInternal() : WebView2
  • UpdateSourceOnEnter() : WebView2BasicPage
  • UpdateSpectrumBrush() : SpectrumBrush
  • UpdateSpinButtonEnabled() : NumberBox
  • UpdateSpinButtonPlacement() : NumberBox
  • UpdateStackLayoutOrientation() : ItemsViewSummaryPage
  • UpdateStackLayoutSpacing() : ItemsViewSummaryPage
  • UpdateStartOffsetExpression() : ParallaxView
  • UpdateState() : ScrollPresenter
  • UpdateStateButton_Click() : AcrylicBrushPage
  • UpdateStates() : ProgressRing , ProgressBar
  • UpdateStatesComboBox() : RefreshContainerPage , RefreshContainerOnImagePage
  • UpdateSubtitle() : TitleBar
  • UpdateTabBottomBorderLineVisualStates() : TabView
  • UpdateTabContent() : TabView
  • UpdateTabGeometry() : TabViewItem
  • UpdateTabIndex() : TabView
  • UpdateTabNavigation() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateTabViewWithTearOutList() : TabView
  • UpdateTabWidths() : TabView
  • UpdateTail() : TeachingTip
  • UpdateTblComputedHorizontalScrollMode() : ScrollViewDynamicPage
  • UpdateTblComputedVerticalScrollMode() : ScrollViewDynamicPage
  • UpdateTemplateSettingElementLists() : PagerControl
  • UpdateTemplateSettings() : CommandBarFlyoutCommandBar
  • UpdateTextState() : RadioMenuFlyoutItemPage
  • UpdateTextToValue() : NumberBox
  • UpdateTheme() : TitleBar
  • UpdateThirdDimensionSlider() : ColorPicker
  • UpdateThresholdReached() : SwipeControl
  • UpdateThumbExpression() : AnnotatedScrollBarPanningInfo , CompositionScrollControllerPanningInfo
  • UpdateTintLuminosityOpacity() : XamlControlsResources
  • UpdateTitle() : TitleBar
  • UpdateTitleBarPadding() : NavigationView
  • UpdateToggleBackgroundColor() : NavigationViewTopNavPage , NavigationViewRS4Page , NavigationViewPage
  • UpdateTopNavigationWidthCache() : NavigationView
  • UpdateTopNavOverflowRepeaterItemsSource() : NavigationView
  • UpdateTopNavPrimaryRepeaterItemsSource() : NavigationView
  • UpdateTopNavRepeatersItemSource() : NavigationView
  • UpdateTraces() : ScrollViewTestsWithInputHelper , ItemsViewTestsWithInputHelper
  • UpdateTransform() : SliderInteraction
  • UpdateTransformSource() : ScrollPresenter
  • UpdateTreeViewItemVisualState() : TreeViewItem
  • UpdateTxtMargin() : ScrollViewerPage
  • UpdateTxtMaxZoomFactor() : ScrollViewerPage
  • UpdateTxtMinZoomFactor() : ScrollViewerPage
  • UpdateTxtPadding() : ScrollViewerPage
  • UpdateUI() : CommandBarFlyoutCommandBar
  • UpdateUniformGridLayoutMaximumRowsOrColumns() : ItemsViewSummaryPage
  • UpdateUniformGridLayoutMinColumnSpacing() : ItemsViewSummaryPage
  • UpdateUniformGridLayoutMinRowSpacing() : ItemsViewSummaryPage
  • UpdateUniformGridLayoutOrientation() : ItemsViewSummaryPage
  • UpdateUnzoomedExtentAndViewport() : ScrollPresenter
  • UpdateValue_Click() : ProgressRingCustomLottieSourcePage , ProgressRingPage , ProgressBarPage , ProgressBarReTemplatePage
  • UpdateValueToText() : NumberBox
  • UpdateVerticalAnchorRatio() : ScrollViewDynamicPage , ItemsViewSummaryPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage
  • UpdateVerticalOffset() : ScrollViewDynamicPage , ItemsViewSummaryPage
  • UpdateVerticalScrollBarVisibility() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage
  • UpdateVerticalScrollChainMode() : ScrollViewDynamicPage
  • UpdateVerticalScrollController() : ScrollView
  • UpdateVerticalScrollMode() : ItemsViewSummaryPage , ScrollViewWithScrollControllersPage , ScrollViewDynamicPage
  • UpdateVerticalScrollRailMode() : ScrollViewDynamicPage
  • UpdateViewport() : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • UpdateViewportSize() : ScrollInputHelper
  • UpdateVisibility() : InfoBar
  • UpdateVisualInteractionSourceMode() : ScrollPresenter
  • UpdateVisualState() : NavigationViewItemSeparator , CommandBarFlyoutCommandBar , NavigationViewItem , ItemContainer , NavigationView , ColorSpectrum , NavigationViewItemHeader , ColorPicker
  • UpdateVisualStateForChevron() : NavigationViewItem
  • UpdateVisualStateForClosedCompact() : NavigationViewItem
  • UpdateVisualStateForDisplayModeGroup() : NavigationView
  • UpdateVisualStateForIconAndContent() : NavigationViewItem
  • UpdateVisualStateForInfoBadge() : NavigationViewItem
  • UpdateVisualStateForIsEnabledChange() : NumberBox , RadioButtons
  • UpdateVisualStateForKeyboardFocusedState() : NavigationViewItem
  • UpdateVisualStateForNavigationViewPositionChange() : NavigationViewItem
  • UpdateVisualStateForOverflowButton() : NavigationView
  • UpdateVisualStateForPointer() : NavigationViewItem
  • UpdateVisualStateForToolTip() : NavigationViewItem
  • UpdateVisualStateNoTransition() : NavigationViewItem
  • UpdateVisualStates() : MenuBarItem , ScrollView , SplitButton
  • UpdateWidth() : ScrollViewWithScrollControllersPage , ItemsViewSummaryPage , ScrollViewDynamicPage
  • UpdateWidth_Click() : ProgressRingStoryboardAnimationPage , ProgressBarPage , ProgressRingCustomLottieSourcePage , ProgressBarReTemplatePage , ProgressRingPage
  • UpdateWidthBasedTemplateSettings() : ProgressBar
  • UpdateWidthForPrimaryItem() : TopNavigationViewDataProvider
  • UpdateWidthModeVisualState() : TabViewItem
  • UpdateXYFocusKeyboardNavigation() : ItemsViewSummaryPage , SelectorBarSummaryPage
  • UpdateZoomChainMode() : ScrollViewDynamicPage
  • UpdateZoomFactor() : ItemsViewSummaryPage , ScrollViewDynamicPage
  • UpdateZoomLevelInWebPage() : MapControl
  • UpdateZoomMode() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage , ItemsViewSummaryPage
  • UpDownEnabledTest() : NumberBoxTests
  • UpDownTest() : NumberBoxTests
  • UseAccessKey() : RadioButtonsTests
  • UseCompactResources() : XamlControlsResourcesProperties
  • UseCompactResourcesProperty() : XamlControlsResourcesProperties
  • UseDynamicScrollbars() : RegUtil
  • UseF6ToReturnToTestPageToCloseTip() : TeachingTipTests
  • UseItemsView() : ItemsViewSummaryPage
  • UseLinedFlowLayoutWithoutLineHeight() : ItemsViewTestsWithInputHelper
  • UseLinedFlowLayoutWithoutMinWidth() : ItemsViewTestsWithInputHelper
  • useLongLabelContent_Checked() : AnnotatedScrollBarSummaryPage
  • useLongLabelContent_Unchecked() : AnnotatedScrollBarSummaryPage
  • UsePropertyFactory() : EffectBase
  • UserAgentTest() : WebView2Tests
  • UserElementFactory() : NavigationViewItemsFactory , BreadcrumbElementFactory , RadioButtonsElementFactory
  • UsesArrangeWidthInfo() : LinedFlowLayout
  • UseScrollPresenter() : ScrollPresenterDynamicPage
  • UseScrollView() : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • UseScrollViewer() : ScrollViewerPage
  • UsesFastPathLayout() : LinedFlowLayout
  • UseSystemVisualLink() : InkCanvas
  • UseTestBounds() : TeachingTipTests
  • UseTestScreenBounds() : TeachingTipTests
  • UseTestWindowBounds() : TeachingTipTests
  • UseTextControlSource() : ParallaxViewTests
  • UseVirtualizingStackPanelSource() : ParallaxViewTests
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- v -

  • ValidadePinClickEvent() : MapControlTests
  • ValidateAdaptabilityWhenChangingFirstElementHeightForGridLayout() : FlowLayoutTests
  • ValidateAdaptabilityWhenChangingFirstElementSizeForGridLayout() : FlowLayoutTests
  • ValidateAdaptabilityWhenChangingFirstElementWidthForGridLayout() : FlowLayoutTests
  • ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout() : FlowLayoutTests
  • ValidateAnchorRatio() : ScrollPresenter , ScrollView
  • ValidateAndStoreParameters() : AnimationHandler , ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • ValidateAppBarButtonRevealStyles() : RevealTests
  • ValidateBasicScrollViewerScenario() : EffectiveViewportTests
  • ValidateBindingAndTemplateSelection() : ItemTemplateTests
  • ValidateBringIntoViewOperations() : ViewManagerTests
  • ValidateCacheLength() : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • ValidateCannotDragWithinSelectedSubtree() : TreeViewTests
  • ValidateCannotDragWithinSelectedSubtree_ContentMode() : TreeViewTests
  • ValidateCannotDragWithinSelectedSubtree_NodeMode() : TreeViewTests
  • ValidateCanSetSelectedIndex() : SelectionModelTests
  • ValidateChildBounds() : FlowLayoutTests
  • ValidateChildRemovedFromParentWhenOwnerIsDifferent() : RecyclePoolTests
  • ValidateChildrenPeers() : AccessibilityTests
  • ValidateClear() : FlowLayoutCollectionChangeTests , SelectionModelTests
  • ValidateConstructorParameters() : RepeatedScrollSnapPoint , RepeatedZoomSnapPoint
  • ValidateContentWithConstrainedHeight() : ScrollPresenterTests
  • ValidateContentWithConstrainedSize() : ScrollPresenterTests
  • ValidateContentWithConstrainedWidth() : ScrollPresenterTests
  • ValidateCorrectSizeWhenEmptyDataTemplateInSelector() : ItemTemplateTests
  • ValidateCurrentFocus() : ViewManagerTests
  • ValidateCustomElementFactory() : ItemTemplateTests
  • ValidateCustomRecyclingElementFactory() : ItemTemplateTests
  • ValidateDataContextDoesNotGetOverwritten() : ViewManagerTests
  • ValidateDataContextGetsPropagated() : ViewManagerTests
  • ValidateDataTemplateAsItemTemplate() : ItemTemplateTests
  • ValidateDataTemplateSelectorAsItemTemplate() : ItemTemplateTests
  • ValidateDataTemplateWithElementNameBinding() : ItemTemplateTests
  • ValidateDataTemplateWithNestedElementNameBinding() : ItemTemplateTests
  • ValidateDefaultHeightForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateDefaultSizeForFirstItemDoesntOverridePresetOne() : FlowLayoutTests
  • ValidateDefaultSizeForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateDefaultValues() : ButtonInteractionTests , SliderInteractionTests
  • ValidateDefaultWidthForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem() : FlowLayoutTests
  • ValidateEffectsPresent() : RevealStatesPage
  • ValidateElementClearingClearsDataContext() : ViewManagerTests
  • ValidateElementClearingOrderFromFlowLayout() : ViewManagerTests
  • ValidateElementEvents() : ViewManagerTests
  • ValidateElementIndexChangedEventOnStableReset() : ViewManagerTests
  • ValidateElementsHaveCorrectKeys() : RecyclePoolTests
  • ValidateElementsSizeInGridLayout() : FlowLayoutTests
  • ValidateElementToIndexMapping() : RepeaterTests
  • ValidateEstimations_Flow_Horizontal() : FlowLayoutTests
  • ValidateEstimations_Flow_Vertical() : FlowLayoutTests
  • ValidateEstimations_Grid_Horizontal() : FlowLayoutTests
  • ValidateEstimations_Grid_Vertical() : FlowLayoutTests
  • ValidateEstimations_Stack_Horizontal() : FlowLayoutTests
  • ValidateEstimations_Stack_Vertical() : FlowLayoutTests
  • ValidateEventCounts() : WebView2Tests
  • ValidateEventDetail() : WebView2Tests
  • ValidateEventWhenInnerNodeChangesSelectionState() : SelectionModelTests
  • ValidateExceptionCounts() : WebView2Tests
  • ValidateExpandingRaisedOnItemHavingUnrealizedChildren() : TreeViewTests
  • ValidateExpandingRaisedOnItemHavingUnrealizedChildren_ContentMode() : TreeViewTests
  • ValidateExpandingRaisedOnItemHavingUnrealizedChildren_NodeMode() : TreeViewTests
  • ValidateFlowLayout() : FlowLayoutTests
  • ValidateFlowLayoutChildrenLayoutBounds() : FlowLayoutTests
  • ValidateFlowLayoutLineAlignment() : FlowLayoutTests
  • ValidateFlowLayoutVaryingHeights() : FlowLayoutTests
  • ValidateFlowLayoutWithOneItemHasNonZeroExtent() : FlowLayoutTests
  • ValidateFocusMoveOnElementCleared() : ViewManagerTests
  • ValidateFocusMoveOnElementClearedWithUniqueIds() : ViewManagerTests
  • ValidateFractionalWidthDoesNotCrash() : ColorPickerTests
  • ValidateGetAtCalls() : MockItemsSource
  • ValidateGetElementAtCachingForLayout() : ViewManagerTests
  • ValidateGetElementCalls() : MockElementFactory
  • ValidateGetItemIdCalls() : MockItemsSource
  • ValidateGetSetBackground() : RepeaterTests
  • ValidateGetSetItemsSource() : RepeaterTests
  • ValidateGetSizeCalls() : MockItemsSource
  • ValidateGreaterThanZero() : ColumnMajorUniformToLargestGridLayout
  • ValidateGridLayout() : FlowLayoutTests
  • ValidateGridLayoutChildrenLayoutBounds() : FlowLayoutTests
  • ValidateGridLayoutDesiredSizingWithMaxRowsOrColumnsSet() : FlowLayoutTests
  • ValidateGridLayoutJustificationAndStretch() : FlowLayoutTests
  • ValidateGridLayoutMaximumRowsOrColumns() : FlowLayoutTests
  • ValidateGridLayoutWithSameOrientationAsScrolling() : FlowLayoutTests
  • ValidateGroupClear() : SelectionModelTests
  • ValidateGroupInserts() : SelectionModelTests
  • ValidateGroupRemoves() : SelectionModelTests
  • ValidateGroupReplaceLosesSelection() : SelectionModelTests
  • ValidateHueRange() : ColorPickerTests
  • ValidateIndexPath() : IndexPathTests
  • ValidateInput() : NumberBox
  • ValidateInserts() : FlowLayoutCollectionChangeTests , SelectionModelTests
  • ValidateIntersectionWithRealizationWindow() : FlowLayoutTests
  • ValidateInvokeWithHoverMode() : ButtonInteractionTests
  • ValidateInvokeWithPressMode() : ButtonInteractionTests
  • ValidateInvokeWithReleaseMode() : ButtonInteractionTests
  • ValidateItemCollectionTransitionProvider() : ItemCollectionTransitionProviderTests
  • ValidateItemIndex() : ItemsView
  • ValidateItemsLessThanThresholdDontRevertHorizontal() : SwipeControlTests
  • ValidateItemsRepeaterScrollHostScenario() : ViewportTests
  • ValidateKeyboarding() : TextCommandBarFlyoutTests
  • ValidateLayoutEstimations() : FlowLayoutTests
  • ValidateLayoutSharing() : FlowLayoutTests
  • ValidateLayoutWithInfiniteMeasureSizeInNonVirtualizingDirection() : FlowLayoutTests
  • ValidateLightsOnPressed() : RevealStatesPage
  • ValidateLoadedSource() : WebView2Tests
  • ValidateLoadUnload() : ViewportTests
  • ValidateMakeAnchor() : FlowLayoutTests
  • ValidateMappingAndAutoRecycling() : LayoutTests
  • ValidateMultiSelectDragDropRootsAndNonRoots() : TreeViewTests
  • ValidateMultiSelectDragDropRootsAndNonRoots_ContentMode() : TreeViewTests
  • ValidateMultiSelectDragDropRootsAndNonRoots_NodeMode() : TreeViewTests
  • ValidateNestedMultipleSelection() : SelectionModelTests
  • ValidateNestedSingleSelection() : SelectionModelTests
  • ValidateNoCrashWhenWhenColorSpectrumInvisibleAndColorChanged() : ColorPickerTests
  • ValidateNonVirtualLayoutDoesNotGetMeasuredForViewportChanges() : LayoutTests
  • ValidateNonVirtualLayoutWithItemsRepeater() : LayoutTests
  • ValidateNoScrollingSurfaceInPopupScenario() : ViewportTests
  • ValidateNoScrollingSurfaceScenario() : ViewportTests
  • ValidateNoSizeWhenEmptyDataTemplate() : ItemTemplateTests
  • ValidateNullItemsSource() : RepeaterTests
  • ValidateNullItemTemplateAndContainerInItems() : ItemTemplateTests
  • ValidateNumberFormatter() : NumberBox
  • ValidateOneLevelMultipleSelection() : SelectionModelTests
  • ValidateOneLevelSingleSelection() : SelectionModelTests
  • ValidateOneLevelSingleSelectionNoSource() : SelectionModelTests
  • ValidateOneScrollPresenterScenario() : EffectiveViewportScrollPresenterTests , ViewportTests
  • ValidateOneScrollViewerScenario() : EffectiveViewportTests
  • ValidateOwnershipWithStackPanel() : RecyclePoolTests
  • ValidatePhaseInvokeAndOrdering() : PhasingTests
  • ValidatePhaseOrdering() : final
  • ValidateProofingMenu() : TextCommandBarFlyoutTests
  • ValidatePropertyChangedEventIsRaised() : SelectionModelTests
  • ValidatePublicRootAncestor() : RevealBrush
  • ValidateRealizedRange() : EffectiveViewportScrollPresenterTests , EffectiveViewportTests , ViewportTests
  • ValidateRecycledElementOwnerAffinity() : RecyclePoolTests
  • ValidateRecycleElementCalls() : MockElementFactory
  • ValidateRecycling() : ItemTemplateTests
  • ValidateRecyclingElementFactoryWithSingleTemplate() : ItemTemplateTests
  • ValidateRegularResets() : FlowLayoutCollectionChangeTests
  • ValidateRemoves() : SelectionModelTests
  • ValidateRepeaterDefaults() : RepeaterTests
  • ValidateResizingFirstItemResizesOtherItemsInGridLayout() : FlowLayoutTests
  • ValidateReyclingElementFactoryWithNoTemplate() : ItemTemplateTests
  • ValidateRichTextBlockOverflowUsesSourceFlyouts() : TextCommandBarFlyoutTests
  • ValidateRightClickOnEmptyTextBoxDoesNotShowFlyout() : TextCommandBarFlyoutTests
  • ValidateScrollAnimationStartingAndZoomFactorEventArgsHaveValidStartAndEndPositions() : ScrollPresenterTests
  • ValidateSelectedItem() : SelectorBar
  • ValidateSelection() : SelectionModelTests
  • ValidateSelectionChangedEventMultipleSelection() : SelectionModelTests
  • ValidateSelectionChangedEventSingleSelection() : SelectionModelTests
  • ValidateSelectionFlyoutDoesNotTakeFocus() : TextCommandBarFlyoutTests
  • ValidateSelectionModeChangeFromMultipleToSingle() : SelectionModelTests
  • ValidateSelectionModeChangeFromMultipleToSingleSelectionChangedEvent() : SelectionModelTests
  • ValidateSentinelsDuringInserts() : FlowLayoutCollectionChangeTests
  • ValidateStableResets() : FlowLayoutCollectionChangeTests
  • ValidateStackLayout() : FlowLayoutTests
  • ValidateStackLayoutArrangeWithInsertion() : FlowLayoutTests
  • ValidateStackLayoutArrangeWithStretch() : FlowLayoutTests
  • ValidateStackLayoutChildrenLayoutBounds() : FlowLayoutTests
  • ValidateStackLayoutDisabledVirtualizationWithItemsRepeater() : LayoutTests
  • ValidateStackLayoutDoesNotRetainIncorrectMinorWidth() : LayoutTests
  • ValidateStretchedImageSize() : ScrollPresenterTests
  • ValidateSwipeCanHaveNoItemsOnASideHorizontal() : SwipeControlTests
  • ValidateSwipeDoesntCrashOnAddingMoreItemsThanItsSizeHorizontal() : SwipeControlTests
  • ValidateSwitchingItemInfo() : RatingControlTests
  • ValidateSwitchingItemsSourceRefreshesElements() : InspectingDataSourceTests
  • ValidateSwitchingItemsSourceRefreshesElementsNonVirtualLayout() : InspectingDataSourceTests
  • ValidateSwitchingItemsSourceRefreshesElementsVirtualLayout() : InspectingDataSourceTests
  • ValidateTabNavigation() : RepeaterFocusTests
  • ValidateTabNavigationOrder() : RepeaterFocusTests
  • ValidateTemplateSwitchingRefreshesElements() : ItemTemplateTests
  • ValidateTemplateSwitchingRefreshesElementsNonVirtualizingLayout() : ItemTemplateTests
  • ValidateTemplateSwitchingRefreshesElementsVirtualizingLayout() : ItemTemplateTests
  • ValidateTreeViewItemSourceChangeUpdatesChevronOpacity() : TreeViewTests
  • ValidateTwoLevelMultipleSelection() : SelectionModelTests
  • ValidateTwoLevelSingleSelection() : SelectionModelTests
  • ValidateTwoScrollPresentersScenario() : EffectiveViewportScrollPresenterTests , ViewportTests
  • ValidateTwoScrollViewerScenario() : EffectiveViewportTests
  • ValidateUnhandledKeysOnNonTransientFlyoutDoNotCloseFlyout() : TextCommandBarFlyoutTests
  • ValidateUniformGridWithItemsRelyingOnAspectRatio() : FlowLayoutTests
  • ValidateUniformGridWithNoItems() : FlowLayoutTests
  • ValidateXBindWithoutPhasing() : PhasingTests
  • ValidateXYFocusNavigation() : ScrollPresenterTests
  • ValidateZoomFactoryBoundary() : ScrollPresenter , ScrollView
  • Validation_Changed() : NumberBoxPage
  • ValidationActionsComboBox_SelectionChanged() : RevealStatesPage
  • ValidationDisabledTest() : NumberBoxTests
  • ValidationMode() : NumberBoxProperties
  • ValidationModeProperty() : NumberBoxProperties
  • Value() : AnnotatedScrollBar , HashMap< K, V >::Iterator::KeyValuePair , ColorPickerSliderAutomationPeer , ColorSpectrumAutomationPeer , InfoBadgeProperties , NumberBoxProperties , ProgressRingProperties , RatingControlProperties , NumberBox , NumberBoxAutomationPeer , ProgressBarAutomationPeer , ProgressRingAutomationPeer , ValueProviderThunk< Owner > , RatingControlAutomationPeer , ScrollSnapPoint , ZoomSnapPoint
  • ValueChanged() : NumberBoxProperties , RatingControlProperties
  • ValueChangedTest() : NumberBoxTests
  • ValueChangeInMarkup_ValueChanged() : RatingControlPage
  • ValueProperty() : InfoBadgeProperties , NumberBoxProperties , ProgressRingProperties , RatingControlProperties
  • ValuesChanged() : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , InteractionTrackerOwner , ScrollPresenter , SwipeControl , SwipeControlInteractionTrackerOwner
  • ValueTextTest() : NumberBoxTests
  • VariableSizedItemsPage() : VariableSizedItemsPage
  • VariableSizedItemsPage_Loaded() : VariableSizedItemsPage
  • VariableSizeItem() : VariableSizeItem
  • Vector() : Vector< T, flags, Helper >
  • VectorBase() : VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >
  • VectorChanged() : SwipeItems , ObservableVector< T > , SwipeItems
  • VectorChangedEventArgs() : VectorChangedEventArgs , WinRTCollection::VectorChangedEventArgs
  • VectorInnerImpl() : VectorInnerImpl< VectorOptions, Wrapper >
  • VectorIterator() : VectorIterator< T, isBindable, isDependencyObjectBase, Traits >
  • VerifyAccessibilityView() : ProgressRingTests
  • VerifyAcrylic() : AcrylicBrushPage , AcrylicMarkupPage
  • VerifyAcrylicBrushEffect() : AcrylicBrushTests
  • VerifyAcrylicBrushHasCorrectFallbackColor() : AcrylicBrushTests
  • VerifyAcrylicBrushHasCorrectFallbackColorOnTheme() : AcrylicBrushTests
  • VerifyAcrylicBrushNameRule() : AcrylicBrushTests
  • VerifyAcrylicWithPolling() : AcrylicBrushPage
  • VerifyAddingChildItemsToNavigationViewItem() : CommonTests
  • VerifyAddingNewItemsFromIndexZero() : CommonTests
  • VerifyAddPrimaryCommandsDynamically() : CommandBarFlyoutTests
  • VerifyAllThemesContainSameResourceKeys() : CommonStylesApiTests
  • VerifyAlwaysExpandedBehavior() : CommandBarFlyoutTests
  • VerifyAmbientLight() : RevealFallbackPage , RevealStatesPage
  • VerifyAnchorCandidateRegistration() : ScrollViewTests
  • VerifyAppBarButtonChevronMarginsDoNotCollide() : CommonStylesApiTests
  • VerifyAppBarButtonLightweightStyling() : CommonStylesApiTests
  • VerifyAreClose() : ScrollViewTestsWithInputHelper
  • VerifyAutoDisplayMode() : PagerControlTestBase
  • VerifyAutomationName() : PersonPictureTests
  • VerifyAutomationNamesAreCorrect() : ColorPickerTests
  • VerifyAutomationPeerBehavior() : PagerControlTests , PipsPagerTests
  • VerifyAutomationPeerExpandCollapsePatternBehavior() : NavigationViewTests
  • VerifyAutoSuggestBoxCornerRadius() : AutoSuggestBoxTests
  • VerifyAxeScanPasses() : AutoSuggestBox , BreadcrumbTests , ExpanderTests , InfoBarTests , MenuBarTests , CommonTests , NumberBoxTests , PagerControlTests , PipsPagerTests , ProgressBarTests , ProgressRingTests , TabViewTests
  • VerifyBackAndCloseButtonsVisibility() : NavigationViewTestsBase
  • VerifyBackAndCloseButtonsVisibilityInAutoPaneDisplayMode() : PaneBehaviorTests
  • VerifyBackAndCloseButtonsVisibilityInLeftMinimalPaneDisplayMode() : PaneBehaviorTests
  • VerifyBackButtonHidesWhenInMinimalOpenState() : CommonTests
  • VerifyBasicParallaxingInsideScroller() : ParallaxViewTests
  • VerifyBasicParallaxingInsideScrollViewer() : ParallaxViewTests
  • VerifyBasicParallaxingWithListView() : ParallaxViewTests
  • VerifyBasicParallaxingWithScroller() : ParallaxViewTests
  • VerifyBasicParallaxingWithScrollViewer() : ParallaxViewTests
  • VerifyBorderLight() : RevealFallbackPage , RevealStatesPage
  • VerifyBreadcrumbBarItemsContain() : BreadcrumbTests
  • VerifyBreadcrumbDefaultAPIValues() : BreadcrumbTests
  • VerifyButton() : PagerControlTestBase
  • VerifyButtonVisibilitySetInXAMLApplied() : PagerControlTests
  • VerifyCallingResetMultipleTimesOnUniqueIdItemsSource() : InspectingDataSourceTests
  • VerifyCanCancelClosing() : CommonTests
  • VerifyCanCancelScrolling() : AnnotatedScrollBarInteractionTests
  • VerifyCanChangeColorWithTouchWithoutPanning() : ColorPickerTests
  • VerifyCanInvertSelection() : ItemsViewTests
  • VerifyChangingFooterMenuItemVisibilityAdjustsPaneLayout() : PaneBehaviorTests
  • VerifyChildHeight() : CompactPage
  • VerifyClearingAlphaChannelInputFieldDoesNotCrash() : ColorPickerTests
  • VerifyClearingHexInputFieldDoesNotCrash() : ColorPickerTests
  • VerifyClearingItemsCollectionDoesNotCrashWhenItemSelectedOnTopNav() : NavigationViewTests
  • VerifyClearingItemsSourceClearsElements() : RepeaterTests
  • VerifyClearingNodeWithNoChildren() : TreeViewTests
  • VerifyClickingNavigationViewItemInPaneFooterDoesNotCrash() : CommonTests
  • VerifyClosedCompactVisualState() : NavigationViewTests
  • VerifyCollectionChangeGetsRespected() : BreadcrumbTests
  • VerifyColorIsSelected() : ColorPickerTests
  • VerifyColorIsSelectedCore() : ColorPickerTests
  • VerifyColorNameIsSelected() : ColorPickerTests
  • VerifyColorPropertyMetadata() : ColorPickerTests
  • VerifyColorSpectrumAutomationValuesAreCorrect() : ColorPickerTests
  • VerifyComboBoxDisabled() : PagerControlTestBase
  • VerifyComboBoxDisplayMode() : PagerControlTestBase
  • VerifyComboBoxEditModeCornerRadius() : ComboBoxTests
  • VerifyComboBoxEnabled() : PagerControlTestBase
  • VerifyComboBoxIsEnabled() : PagerControlTestBase
  • VerifyComboBoxItemsInfiniteItems() : PagerControlTests
  • VerifyComboBoxItemsListNormal() : PagerControlTests
  • VerifyComboBoxOverlayCornerRadius() : ComboBoxTests
  • VerifyComboBoxVisibility() : PagerControlTestBase
  • VerifyCommandBarSizing() : CommandBarFlyoutTests
  • VerifyCommandBarSizingPrimaryItemsLarger() : CommandBarFlyoutTests
  • VerifyCommandBarSizingSecondaryItemsLarger() : CommandBarFlyoutTests
  • VerifyCommandBarSizingSecondaryItemsMaxHeight() : CommandBarFlyoutTests
  • VerifyCommandBarSizingSecondaryItemsMaxWidth() : CommandBarFlyoutTests
  • VerifyCompactTabWidthVisualStates() : TabViewTests
  • VerifyCompactTabWidthVisualStates_ItemsMode() : TabViewTests
  • VerifyCompactTabWidthVisualStates_ItemsSourceMode() : TabViewTests
  • VerifyContactPropertyMetadata() : PersonPictureTests
  • VerifyContainerIsNonNullWhenSelectingANewlyAddedItem() : NavigationViewTests
  • VerifyCorrectionsInNonScrollableDirection() : RepeaterTests
  • VerifyCorrectNumberOfEventsRaised() : EventTests
  • VerifyCorrectVisualStateWhenChangingPaneDisplayMode() : PaneBehaviorTests
  • VerifyCorrectVisualStateWhenClosingPaneInLeftDisplayMode() : PaneBehaviorTests
  • VerifyCurrentAnchor() : RepeaterTests
  • VerifyCustomHeaderContentTest() : CommonTests
  • VerifyCustomItemTemplate() : BreadcrumbTests , RadioButtonsTests
  • VerifyCustomNonVirtualizingLayout() : LayoutPanelTests
  • VerifyDataContextCanBeUsedForNavigation() : SelectionTests
  • VerifyDefaultBreadcrumb() : BreadcrumbTests
  • VerifyDefaultPropertyValues() : AnnotatedScrollBarTests , ItemContainerTests , ItemsViewTests , AcrylicBrushTests , ParallaxViewTests , LinedFlowLayoutTests , ScrollPresenterTests , ScrollViewTests
  • VerifyDefaultsAndBasicSetting() : NavigationViewTests , PersonPictureTests , RatingControlTests , SplitButtonTests , TwoPaneViewTests
  • VerifyDefaultSelectorBarItemPropertyValues() : SelectorBarTests
  • VerifyDefaultSelectorBarPropertyValues() : SelectorBarTests
  • VerifyDependencyPropertyBinding() : RatingControlTests
  • VerifyDeselectionDisabled() : SelectionTests
  • VerifyDisconnected() : AcrylicBrushPage
  • VerifyDisconnectedFlyoutCommandBar() : CommandBarFlyoutTests
  • VerifyDisconnectedState() : AcrylicBrushTests
  • VerifyDisplayMode() : PagerControlTestBase
  • VerifyDontCrashWhenCollapsedAndValueSet() : RatingControlTests
  • VerifyDragStartedCalledOnItemDrag() : TabViewTests
  • VerifyDropDownItemContainsText() : BreadcrumbTests
  • VerifyDropdownItemTemplate() : BreadcrumbTests
  • VerifyDropdownItemTemplateWithNoControl() : BreadcrumbTests
  • VerifyDynamicOverflowContentRootWidth() : CommandBarFlyoutTests
  • VerifyDynamicSecondaryCommandLabel() : CommandBarFlyoutTests
  • VerifyDynamicSecondaryCommandVisibility() : CommandBarFlyoutTests
  • VerifyElement0OwnershipInUniformGridLayout() : FlowLayoutCollectionChangeTests
  • VerifyElementIsFocused() : ColorPickerTests
  • VerifyEllipsePositionIsClampedToSpectrumBounds() : ColorPickerTests
  • VerifyEmptyPagerDoesNotCrash() : PagerControlTests , PipsPagerTests
  • VerifyEventsReturnExpectedDataTypesItemTemplate() : EventTests
  • VerifyEventsReturnExpectedDataTypesMenuItems() : EventTests
  • VerifyEventsReturnExpectedDataTypesMenuItemsSource() : EventTests
  • VerifyExpandCollapseChevronVisibility() : NavigationViewTests
  • VerifyExpandCollapseFunctionality() : CommonTests
  • VerifyExpandCollapseFunctionalityUsingChevron() : CommonTests
  • VerifyExpandedItemsSaveStateWhenClosingAndOpeningPane() : PaneBehaviorTests
  • VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension() : ScrollPresenterTests
  • VerifyExtentAndViewportProperties() : ScrollPresenterTests
  • VerifyFallbackColor() : AcrylicBrushPage , AcrylicMarkupPage , RevealFallbackPage
  • VerifyFallbackColorWithPolling() : AcrylicBrushPage
  • VerifyFirstPageButtonIsEnabled() : PagerControlTestBase
  • VerifyFirstPageButtonVisibility() : PagerControlTestBase
  • VerifyFlowLayoutOnLineArranged() : FlowLayoutTests
  • VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommands() : CommandBarFlyoutTests
  • VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommandsWithAlwaysExpanded() : CommandBarFlyoutTests
  • VerifyFlowsToAndFromIsNotSetWithoutPrimaryCommands() : CommandBarFlyoutTests
  • VerifyFlyoutCloseKeyboardBehavior() : CommandBarFlyoutTests
  • VerifyFlyoutClosingBehavior() : CommandBarFlyoutTests
  • VerifyFlyoutCommandsArePropagatedToTheCommandBar() : CommandBarFlyoutTests
  • VerifyFlyoutDefaultPropertyValues() : CommandBarFlyoutTests
  • VerifyFlyoutOpenKeyboardBehavior() : CommandBarFlyoutTests
  • VerifyFlyoutRecycleCrash() : BreadcrumbTests
  • VerifyFocusedIndex() : RadioButtonsTests
  • VerifyFocusedItemIsRecycledOnCollectionReset() : RepeaterTests
  • VerifyFocusedPageIndex() : PipsPagerTestBase
  • VerifyFocusNotLostWhenTabbingWithBackButtonEnabled() : FocusBehaviorTests
  • VerifyGamepadAPress() : TreeViewTests
  • VerifyHeaderContentMargin() : NavigationViewTests
  • VerifyHeaderContentMarginOnMinimalNav() : NavigationViewTests
  • VerifyHeaderContentMarginOnTopNav() : NavigationViewTests
  • VerifyHeaderParallaxingInsideScrollViewer() : ParallaxViewTests
  • VerifyHeaderSizeWhenClosingLastTab() : TabViewTests
  • VerifyHeight() : CommonStylesPage , CompactPage
  • VerifyHexStringAndColorAreInSync() : ColorPickerTests
  • VerifyHierarchicalNavigationTopModeMenuItemsSourceDoesNotCrash() : NavigationViewTests
  • VerifyHoldingKeyOnlyInvokesOnce() : EventTests
  • VerifyHoverBrushTargeting() : RevealStatesPage
  • VerifyHoverLight() : RevealFallbackPage , RevealStatesPage
  • VerifyHsvUpdatesOnSpectrumSelection() : ColorPickerTests
  • VerifyIconsRespectCompactPaneLength() : PaneBehaviorTests
  • VerifyIndeterminateProgressRingDoesNotImplementRangeValuePattern() : ProgressRingTests
  • VerifyIndexOfBehavior() : InspectingDataSourceTests
  • VerifyInitialized() : MUXControlsFactory
  • VerifyInputScopePropogates() : NumberBoxTests
  • VerifyInstances() : WebView2RenderingVerifier
  • VerifyInteractionSourceSettings() : ScrollPresenterTests
  • VerifyInvalidTextEntryIsReverted() : ColorPickerTests
  • VerifyIsCheckedProperty() : SplitButtonTests
  • VerifyIsEnabledChangeUpdatesVisualState() : NumberBoxTests , RadioButtonsTests
  • VerifyIsFlyoutKeyboardAccessibleWithNoPrimaryCommands() : CommandBarFlyoutTests
  • VerifyIsPrettyClose() : InfoBarTests , TwoPaneViewTests
  • VerifyItemCollectionTransitionProviderAnimations() : ItemsViewTestsWithInputHelper
  • VerifyItemContainerUIASelectionBehavior() : ItemContainerTests
  • VerifyItemsGetFullSpaceInMajorDirectionWhenSmallerThanLineSize() : FlowLayoutTests
  • VerifyItemsRepeaterNullLayoutIsTreatedAsStackLayout() : LayoutTests
  • VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndMultipleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndNoSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndSingleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndMultipleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndNoSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndSingleSelection() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewItemInvokedEvent() : ItemsViewTestsWithInputHelper
  • VerifyItemsViewUIABehavior() : ItemsViewTests
  • VerifyItemsViewUIASelectionProviderBehavior() : ItemsViewTests
  • VerifyLastClickedItemIndexIs() : BreadcrumbTests
  • VerifyLastClickedItemIs() : BreadcrumbTests
  • VerifyLastPageButtonIsEnabled() : PagerControlTestBase
  • VerifyLastPageButtonVisibility() : PagerControlTestBase
  • VerifyLayoutData() : RadioButtonsTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommands() : CommandBarFlyoutTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTL() : CommandBarFlyoutTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTLUpAndDown() : CommandBarFlyoutTests
  • VerifyLeftAndRightNavigationBetweenPrimaryCommandsUpAndDown() : CommandBarFlyoutTests
  • VerifyLightDismissDoesntSendDuplicateEvents() : EventTests
  • VerifyLights() : LightConfigurationTests
  • VerifyLightsAfterResettingContentOnMainWindow() : LightConfigurationTests
  • VerifyLightsAfterResettingContentOnSecondaryWindow() : LightConfigurationTests
  • VerifyLightsAttachedDuringLayoutOnSecondaryWindow() : LightConfigurationTests
  • VerifyLightsOnMainWindow() : LightConfigurationTests
  • VerifyLightsOnSecondaryWindow() : LightConfigurationTests
  • VerifyLinedFlowLayoutAverageItemsPerLineStability() : ItemsViewTests
  • VerifyMenuItemAndContainerMappingMenuItems() : NavigationViewTests
  • VerifyMenuItemAndContainerMappingMenuItemsSource() : NavigationViewTests
  • VerifyMoreButtonIsOnlyReadOnce() : TopModeTests
  • VerifyMoreButtonRespondsToThemeChanges() : ColorPickerTests
  • VerifyMoreButtonShowsAndHidesTextInputFields() : ColorPickerTests
  • VerifyMulticlickCrash() : BreadcrumbTests
  • VerifyNavigationItemUIAType() : NavigationViewTests
  • VerifyNavigationViewContentChangeOnTopNavImpactsLayout() : TopModeTests
  • VerifyNavigationViewItemChildrenFlyoutMenuCornerRadius() : CommonTests
  • VerifyNavigationViewItemContentPresenterMargin() : CommonTests
  • VerifyNavigationViewItemInFooterDoesNotCrash() : NavigationViewTests
  • VerifyNavigationViewItemInPaneFooterHasTemplateSettingBindings() : CommonTests
  • VerifyNavigationViewItemIsSelectedWorks() : SelectionTests
  • VerifyNavigationViewItemResponseToClickAfterBeingMovedBetweenFrames() : EventTests
  • VerifyNavigationViewItemToolTipCreation() : NavigationViewTests
  • VerifyNavigationViewItemToolTipPaneDisplayMode() : NavigationViewTests
  • VerifyNextPageButtonIsEnabled() : PagerControlTestBase
  • VerifyNextPageButtonVisibility() : PipsPagerTestBase , PagerControlTestBase
  • VerifyNoCrashWhenNavViewInContentDialog() : CommonTests
  • VerifyNoCrashWhenSelectedItemIsInvalidItem() : SelectionTests
  • VerifyNoCrashWhenSwitchingPaneDisplayModeWithAutoWrappedElements() : CommonTests
  • VerifyNoResourceKeysWereRemovedFromPreviousStableReleaseInV2Styles() : CommonStylesApiTests
  • VerifyNotifyCollectionChangeWithReadonlyListBehavior() : InspectingDataSourceTests
  • VerifyNotShouldPreserveNavigationViewRS3Behavior() : CommonTests
  • VerifyNullTemplateGivesMeaningfullError() : ItemTemplateTests
  • VerifyNumberBoxDisabled() : PagerControlTestBase
  • VerifyNumberBoxDisplayMode() : PagerControlTestBase
  • VerifyNumberBoxEnabled() : PagerControlTestBase
  • VerifyNumberBoxHeaderBehavior() : NumberBoxTests
  • VerifyNumberBoxIsEnabled() : PagerControlTestBase
  • VerifyNumberBoxVisibility() : PagerControlTestBase
  • VerifyNumberOfPages() : PagerControlTestBase , PipsPagerTestBase
  • VerifyNumberPanelButtonUIABehavior() : PagerControlTests
  • VerifyNumberPanelContent() : PagerControlTestBase
  • VerifyNumberPanelDisabled() : PagerControlTestBase
  • VerifyNumberPanelDisplayMode() : PagerControlTestBase
  • VerifyNumberPanelEnabled() : PagerControlTestBase
  • VerifyNumberPanelVisibility() : PagerControlTestBase
  • VerifyNumericItemsSource() : BreadcrumbTests
  • VerifyNVIItemsRepeaterIsLoadedAfterSelectionSetInMarkup() : SelectionTests
  • VerifyNVIOutlivingNVDoesNotCrash() : NavigationViewTests
  • VerifyObjectItemsSource() : BreadcrumbTests
  • VerifyOrientationChanged() : PipsPagerTestBase
  • VerifyOverflowButtonIsCollapsedWhenOverflowMenuIsEmpty() : TopModeTests
  • VerifyOverflowButtonToolTip() : NavigationViewTests
  • VerifyOverflowMenuCornerRadius() : TopModeTests
  • VerifyPaddingAndBorderThicknessLayoutOffset() : LayoutPanelTests
  • VerifyPaddingAndBorderThicknessLayoutOffset_StackLayout() : LayoutPanelTests
  • VerifyPageButtonWithVisibilityModeSet() : PipsPagerTestBase
  • VerifyPageChanged() : PagerControlTestBase
  • VerifyPaneDisplayModeAndDisplayModeMapping() : NavigationViewTests
  • VerifyPaneDisplayModeAndIsPaneOpenInterplayOnNavViewLaunch() : NavigationViewTests
  • VerifyPaneDisplayModeChangingPaneAccordingly() : NavigationViewTests
  • VerifyPaneIsClosedAfterSelectingItem() : PaneBehaviorTests
  • VerifyPaneIsClosedWhenClickingOnSelectedItem() : PaneBehaviorTests
  • VerifyPaneLayoutDynamicallyUpdatingCollections() : PaneBehaviorTests
  • VerifyPaneLayoutDynamicallyUpdatingCollectionsFooterPrecedence() : PaneBehaviorTests
  • VerifyPaneLayoutSettingsDisabledNoGapFooterItems() : PaneBehaviorTests
  • VerifyPaneLayoutSettingsDisabledNoGapMenuItems() : PaneBehaviorTests
  • VerifyPaneLayoutSwappingCollections() : PaneBehaviorTests
  • VerifyPaneProperties() : NavigationViewTests
  • VerifyPaneSize() : TwoPaneViewTests
  • VerifyPaneSpacing() : TwoPaneViewTests
  • VerifyPaneTitlePresentAndUpdates() : PaneBehaviorTests
  • VerifyPaneVisibleOnInit() : PaneBehaviorTests
  • VerifyParallaxingWithAbsoluteExtremes() : ParallaxViewTests
  • VerifyParallaxingWithClamping() : ParallaxViewTests
  • VerifyParallaxingWithDefaultSourceUI() : ParallaxViewTests
  • VerifyParallaxingWithMaxRatios() : ParallaxViewTests
  • VerifyParallaxingWithoutClamping() : ParallaxViewTests
  • VerifyParallaxingWithParallaxViewInsideScrollPresenter() : ParallaxViewTests
  • VerifyParallaxingWithParallaxViewInsideScrollViewer() : ParallaxViewTests
  • VerifyParallaxingWithSizeChanges() : ParallaxViewTests
  • VerifyParallaxingWithZooming() : ParallaxViewTests
  • VerifyParallaxViewOffsetChangeInsideScrollViewer() : ParallaxViewTests
  • VerifyPersonPictureVisualTree() : PersonPictureTests
  • VerifyPipsPagerButtonUIABehavior() : PipsPagerTests
  • VerifyPlacement() : TeachingTipTests
  • VerifyPreviousColorIsEqualTo() : ColorPickerTests
  • VerifyPreviousColorIsNull() : ColorPickerTests
  • VerifyPreviousPageButtonIsEnabled() : PagerControlTestBase
  • VerifyPreviousPageButtonVisibility() : PagerControlTestBase
  • VerifyPrimaryCommandLabelsAffectLayout() : CommandBarFlyoutTests
  • VerifyPrimaryCommandsAutomationSet() : CommandBarFlyoutTests
  • VerifyPrimaryCommandsAutomationSetWithAlwaysExpanded() : CommandBarFlyoutTests
  • VerifyPrimaryCommandsCanOverflowToSecondaryItemsControl() : CommandBarFlyoutTests
  • VerifyPropertyGettersAndSetters() : ParallaxViewTests , ScrollPresenterTests
  • VerifyPropertySetters() : ItemsViewTests
  • VerifyPropertyValuesAfterTemplateApplication() : ScrollViewTests , ItemsViewTests
  • VerifyRadioButtonsHasFocus() : RadioButtonsTests
  • VerifyRatingItemFallback() : RatingControlTests
  • VerifyReadOnlyIsntInteractive() : RatingControlTests
  • VerifyReadOnlyListCompatibility() : InspectingDataSourceTests
  • VerifyRealizedRange() : FlowLayoutCollectionChangeTests , FlowLayoutTests
  • VerifyRecordedCollectionChanges() : InspectingDataSourceTests
  • VerifyRepeaterDoesNotLeakItemContainers() : RepeaterTests
  • VerifyRevealBrush() : RevealFallbackPage
  • VerifyRichEditBoxHasContent() : TextCommandBarFlyoutTests
  • VerifyRightClickDoesNotSelectTab() : TabViewTests
  • VerifyRightClickForContextMenuDoesNotDeselectText() : NumberBoxTests
  • VerifyScrollPresenterAttachedProperties() : ScrollViewTests
  • VerifyScrollRepeatButtons() : TabViewTests
  • VerifyScrollViewGamePadBumperInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewGamePadHorizontalInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewGamePadInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewGamePadTriggerInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewIgnoresGamepadInput() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewIgnoresKeyboardInput() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewKeyboardInteraction() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewKeyboardInteractionWithXYFocusEnabled() : ScrollViewTestsWithInputHelper
  • VerifyScrollViewRemainsAtView() : ScrollViewTestsWithInputHelper
  • VerifySelectedColorIsNear() : ColorPickerTests
  • VerifySelectedFocusedIndex() : PipsPagerTestBase , RadioButtonsTests
  • VerifySelectedIndex() : RadioButtonsTests
  • VerifySelectedIndexChangedEventArgs() : PipsPagerTests , PagerControlTests
  • VerifySelectedItemInInvokedItem() : SelectionTests
  • VerifySelectedItemIsNullWhenNoItemIsSelected() : NavigationViewTests
  • VerifySelectedItems() : RadioMenuFlyoutItemTests
  • VerifySelectedNodesAndSelectedItems() : TreeViewTests
  • VerifySelectedPageIndex() : PipsPagerTestBase
  • VerifySelectedPositionInSet() : RadioButtonsTests
  • VerifySelectedSizeOfSet() : RadioButtonsTests
  • VerifySelectingACollapsedItemShowsSelectionIndicator() : NavigationViewTests
  • VerifySelectingANewItemAfterExpandingShowsSelectionIndicatorInTheCorrectLocation() : NavigationViewTests
  • VerifySelectionEllipseColorIsEqualTo() : ColorPickerTests
  • VerifySelectionEllipseIsNear() : ColorPickerTests
  • VerifySelectionEllipsePosition() : ColorPickerTests
  • VerifySelectionEllipsePositionCore() : ColorPickerTests
  • VerifySelectionItemPatternDoesInvoke() : SelectionTests
  • VerifySelectionPersistsAfterRecycling() : ItemsViewTests
  • VerifySelectorBarItems() : SelectorBarTests
  • VerifySelectTemplateLayoutFallback() : ItemTemplateTests
  • VerifySettableAPIValues() : ItemContainerTests
  • VerifySettingCustomSelectedItemInConstructorWorks() : SelectionTests
  • VerifySettingSelectionDoesNotCrash() : TreeViewTests
  • VerifySettingsItemTag() : NavigationViewTests
  • VerifySettingsItemToolTip() : NavigationViewTests
  • VerifySettingsWidthOnLeftNavMediumMode() : PaneBehaviorTests
  • VerifyShoulderNavigationEnabledAlwaysIsConsistent() : FocusBehaviorTests
  • VerifyShoulderNavigationEnabledOnlySelectionFollowsFocusIsCorrect() : FocusBehaviorTests
  • VerifyShouldPreserveNavigationViewRS3Behavior() : CommonTests
  • VerifySingleSelection() : NavigationViewTests
  • VerifySizeIsChangeableFromResource() : RatingControlTests
  • VerifySizingBehaviorModifyingCollectionRemovingLastItem() : TabViewTests
  • VerifySizingBehaviorModifyingCollectionRemovingSecondItem() : TabViewTests
  • VerifySizingBehaviorOnTabCloseComingFromCtrlF4() : TabViewTests
  • VerifySizingBehaviorOnTabCloseComingFromNonScroll() : TabViewTests
  • VerifySizingBehaviorOnTabCloseComingFromScroll() : TabViewTests
  • VerifySmallWidthAndHeightDoNotCrash() : PersonPictureTests
  • VerifySpaceAllocatedWhenDraggingFromOutsideTabView() : TabViewTests
  • VerifySpectrumTakesFocusOnPointerPress() : ColorPickerTests
  • VerifyStackLayoutCycleShortcut() : LayoutTests
  • VerifyStoreScenarioCache() : RepeaterTests
  • VerifyStringsAreLocalizedCorrectly() : ColorPickerTests
  • VerifySubTitleBlockVisibilityOnInitialUnset() : TeachingTipTests
  • VerifySwitchingLayoutDynamically() : LayoutPanelTests
  • VerifyTabFocusOrder() : ColorPickerTests
  • VerifyTabKeyWorks() : TwoPaneViewTests , RatingControlTests
  • VerifyTabNavigationBetweenPrimaryAndSecondaryCommands() : CommandBarFlyoutTests
  • VerifyTabViewItemUIABehavior() : TabViewTests
  • VerifyTabViewUIABehavior() : TabViewTests
  • VerifyTabViewWithoutTabsDoesNotCrash() : TabViewTests
  • VerifyTabWidthVisualStates() : TabViewTests
  • VerifyTeachingTipButtonsNameAutomationProperty() : TeachingTipTests
  • VerifyTeachingTipGetsFocus() : TeachingTipTests
  • VerifyTeachingTipNotIncludedInTabOrder() : TeachingTipTests
  • VerifyTeachingTipTargetChange() : TeachingTipTests
  • VerifyTextAlignmentPropogates() : NumberBoxTests
  • VerifyTextCommandBarRemainsOpenWithItems() : TextCommandBarFlyoutTests
  • VerifyThatProgrammaticallyRemovingEngagementResetsValue() : RatingControlTests
  • VerifyTheming() : TeachingTipTests
  • VerifyThirdDimensionSliderAutomationValuesAreCorrect() : ColorPickerTests
  • VerifyTopNavigationItemFocusVisualKindRevealTest() : TopModeTests
  • VerifyTopNavigationMinimalVisualStateOnTopNav() : TopModeTests
  • VerifyTreeViewIsNotTabStop() : TreeViewTests
  • VerifyUIANameBehavior() : NumberBoxTests
  • VerifyUIAProperties() : RatingControlTests
  • VerifyUIElementsInItemsSource() : RepeaterTests
  • VerifyUnconstrainedUniformGridLayout() : FlowLayoutTests
  • VerifyUniformGridLayoutDoesNotCreateHoles() : RepeaterTests
  • VerifyUniformGridLayoutDoesntCrashWhenTryingToScrollToEnd() : LayoutTests
  • VerifyUniformGridLayoutScrolling() : RepeaterTests
  • VerifyUniqueIdMappingInterface() : InspectingDataSourceTests
  • VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommands() : CommandBarFlyoutTests
  • VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommandsWithAlwaysExpanded() : CommandBarFlyoutTests
  • VerifyValue_ValueEqualsOnAutomationElement() : RatingControlTests
  • VerifyValueIsApproximately() : RatingControlTests
  • VerifyValuesCoercion() : NavigationViewTests , RatingControlTests
  • VerifyViewMode() : TwoPaneViewTests
  • VerifyVisualStates() : ScrollViewTests
  • VerifyVisualTree() : ColorPickerTests , CalendarViewTests , NavigationViewTests , TreeViewTests , AutoSuggestBoxTests , ComboBoxTests
  • VerifyVisualTreeExampleForLightTheme() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleLoadAndVerifyForAllThemes() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleWithCustomerFilter() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeExampleWithCustomerPropertyValueTranslator() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeForAppBarAndAppBarToggleButton() : CommonStylesVisualTreeTestSamples
  • VerifyVisualTreeForCommandBarCornerRadius() : CommonStylesApiTests
  • VerifyVisualTreeForCommandBarOverflowMenu() : CommonStylesApiTests
  • VerifyVisualTreeForControlsInCommonStyles() : CommonStylesApiTests
  • VerifyVSMStatesForPhotosAndInitials() : PersonPictureTests
  • VerifyWebMessageBasedTest() : WebView2BasicPage
  • VerifyWithinTolerance() : FlowLayoutTests
  • VerticalAlignmentRatio() : BringIntoViewOffsetsChange
  • VerticalAnchorRatio() : ItemsRepeaterScrollHost , ScrollViewProperties , ScrollPresenterProperties , ItemsRepeaterScrollHost , ScrollPresenterProperties , ScrollViewProperties
  • VerticalAnchorRatioProperty() : ScrollViewProperties , ScrollPresenterProperties
  • VerticalCacheLength() : ViewportManagerWithPlatformFeatures , ViewportManager , ItemsRepeaterProperties , ViewportManagerDownLevel , ViewportManagerWithPlatformFeatures , ViewportManager , ViewportManagerDownLevel
  • VerticalCacheLengthProperty() : ItemsRepeaterProperties
  • VerticalDecrementRepeatButton_Click() : BiDirectionalScrollController
  • VerticalIncrementRepeatButton_Click() : BiDirectionalScrollController
  • VerticallyScrollable() : ScrollPresenterAutomationPeer
  • VerticalOffset() : ScrollPresenter , BringIntoViewOffsetsChange , ScrollingScrollStartingEventArgs , ScrollingZoomStartingEventArgs , ScrollView
  • VerticalOrientationMarginProperty() : InfoBarPanelProperties
  • VerticalOrientationPadding() : InfoBarPanelProperties
  • VerticalOrientationPaddingProperty() : InfoBarPanelProperties
  • VerticalScrollBarVisibility() : ScrollViewProperties
  • VerticalScrollBarVisibilityProperty() : ScrollViewProperties
  • VerticalScrollChainMode() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • VerticalScrollChainModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • VerticalScrollController() : ItemsViewProperties , ScrollPresenter , ItemsViewProperties , ScrollPresenter
  • VerticalScrollControllerProperty() : ItemsViewProperties
  • VerticalScrollMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • VerticalScrollModeProperty() : ScrollViewProperties , ScrollPresenterProperties
  • VerticalScrollPercent() : ScrollPresenterAutomationPeer
  • VerticalScrollRailMode() : ScrollPresenterProperties , ScrollViewProperties , ScrollPresenterProperties
  • VerticalScrollRailModeProperty() : ScrollPresenterProperties , ScrollViewProperties
  • VerticalShift() : ParallaxViewProperties
  • VerticalShiftProperty() : ParallaxViewProperties
  • VerticalSnapPoints() : ScrollPresenter
  • VerticalSourceEndOffset() : ParallaxViewProperties
  • VerticalSourceEndOffsetProperty() : ParallaxViewProperties
  • VerticalSourceOffsetKind() : ParallaxViewProperties
  • VerticalSourceOffsetKindProperty() : ParallaxViewProperties
  • VerticalSourceStartOffset() : ParallaxViewProperties
  • VerticalSourceStartOffsetProperty() : ParallaxViewProperties
  • VerticalViewSize() : ScrollPresenterAutomationPeer
  • ViewChange() : ViewChange
  • ViewChangeCount() : ScrollViewTestsWithInputHelper
  • ViewChanged() : ScrollViewProperties , ScrollPresenterProperties , ScrollViewProperties
  • ViewKind() : ViewChange
  • ViewManager() : final , ItemsRepeater
  • ViewModeTest() : TwoPaneViewTests
  • ViewModeToString() : TwoPaneViewPage
  • ViewportAnchorPointHorizontalOffset() : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • ViewportAnchorPointVerticalOffset() : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • ViewportChanged() : ItemsRepeaterScrollHost , ScrollPresenter
  • ViewportHeight() : ScrollPresenterTests , ScrollPresenter , ScrollPresenterTests , ScrollView
  • ViewportManagerDownLevel() : ViewportManagerDownLevel
  • ViewportManagerWithPlatformFeatures() : ViewportManagerWithPlatformFeatures
  • ViewportSize() : AnnotatedScrollBar
  • ViewportWidth() : ScrollView , ScrollPresenter
  • VirtInfo() : ElementInfo
  • VirtualizationInfo() : VirtualizationInfo , final::PinnedElementInfo
  • VirtualizingLayout() : VirtualizingLayout
  • VirtualizingStackLayoutSamplePage() : VirtualizingStackLayoutSamplePage
  • VirtualizingStackPanelPage() : VirtualizingStackPanelPage
  • VirtualizingUniformStackLayoutSamplePage() : VirtualizingUniformStackLayoutSamplePage
  • VirtualLayoutContextAdapter() : VirtualLayoutContextAdapter
  • VisibilityHiddenTest() : WebView2Tests
  • VisibilityTurnedOnTest() : WebView2Tests
  • VisibleRect() : VirtualizingLayoutContext
  • VisibleRectCore() : VirtualizingLayoutContext , LayoutContextAdapter , RepeaterLayoutContext
  • VisibleWindow() : ItemsRepeater
  • Visualizer() : RefreshContainerProperties
  • VisualizerProperty() : RefreshContainerProperties
  • visualizerTimer_Tick() : RefreshContainerPage
  • visualizerTimer_TickImpl() : RefreshContainerPage
  • VisualPropertiesPage() : VisualPropertiesPage
  • VisualPropertiesPage_Loaded() : VisualPropertiesPage
  • VisualState() : TeachingTipAutomationPeer
  • VisualStateGroupExists() : VisualStateUtil
  • VisualStatesPage() : VisualStatesPage
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- w -

  • WaitAndAssertPaneStatus() : NavigationViewTestsBase
  • WaitForBoxChecked() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • WaitForCheckbox() : RatingControlTests
  • WaitForCheckBoxUpdated() : SwipeControlTests , TeachingTipTests
  • WaitForChecked() : TeachingTipTests , SwipeControlTests
  • WaitForCopyCompleted() : WebView2Tests
  • WaitForEdgeIfAlreadyInstalling() : WebView2Tests
  • WaitForEditValue() : ItemsViewTestsWithInputHelper , RefreshContainerTests , ScrollPresenterTestsBase , ScrollViewTestsWithInputHelper
  • WaitForEnsureCompleted() : WebView2Tests
  • WaitForEvent() : ItemsViewTests , ScrollPresenterTests , ScrollViewTests , SelectorBarTests
  • WaitForFocus() : WebView2Tests
  • WaitForInputIdle() : TeachingTipAutomationPeer
  • WaitForLoadCompleted() : WebView2Tests
  • WaitForManipulationEnd() : ItemsViewTestsWithInputHelper , ScrollPresenterTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • WaitForOffsetToSettle() : ScrollPresenterTestsWithInputHelper , TeachingTipTests
  • WaitForOffsetUpdated() : ScrollPresenterTestsWithInputHelper , TeachingTipTests
  • WaitForScrollPresenterFinalSize() : ScrollPresenterTestsWithInputHelper
  • WaitForScrollPresenterManipulationEnd() : ScrollPresenterTestsWithInputHelper
  • WaitForScrollViewerManipulationEnd() : ScrollPresenterTestsWithInputHelper
  • WaitForScrollViewFinalSize() : ScrollViewTestsWithInputHelper
  • WaitForScrollViewManipulationEnd() : ItemsViewTestsWithInputHelper , ScrollViewTestsWithInputHelper
  • WaitForScrollViewOffsets() : ScrollViewTestsWithInputHelper
  • WaitForTextBoxValue() : WebView2Tests
  • WaitForTipClosed() : TeachingTipTests
  • WaitForTipOpened() : TeachingTipTests
  • WaitForUnchecked() : SwipeControlTests , TeachingTipTests
  • WaitForWebMessageResult() : WebView2Tests
  • WebMessageReceived() : WebView2Properties , MapControl
  • WebMessageReceivedTest() : WebView2Tests
  • WebView2() : WebView2
  • WebView2_TryCompleteInitialization_RAII() : WebView2_TryCompleteInitialization_RAII
  • WebView2AutomationPeer() : WebView2AutomationPeer
  • WebView2BasicPage() : WebView2BasicPage
  • WebView2CleanedUpTest() : WebView2Tests
  • WebView2Common() : WebView2Common
  • WebView2CoreObjectsPage() : WebView2CoreObjectsPage
  • WebView2Page() : WebView2Page
  • WebView2Properties() : WebView2Properties
  • WebView2TestSetupHelper() : WebView2Tests::WebView2TestSetupHelper
  • Weight() : ICrossFadeEffect
  • WideModeConfiguration() : TwoPaneViewProperties
  • WideModeConfigurationComboBox_SelectionChanged() : TwoPaneViewPage
  • WideModeConfigurationProperty() : TwoPaneViewProperties
  • WidthComboBox_SelectionChanged() : TwoPaneViewPage
  • WidthCombobox_SelectionChanged() : NavigationViewPage , NavigationViewCustomThemeResourcesPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • WidthExpansionAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionDelta() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionDeltaProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationEndPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationEndPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationStartPosition() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthExpansionMoreButtonAnimationStartPositionProperty() : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • WidthRequiredToRecoveryAllItemsToPrimary() : TopNavigationViewDataProvider
  • WidthSlider_ValueChanged() : BreadcrumbBarPage
  • WindowElement() : DisplayRegionHelper
  • WindowHiddenTest() : WebView2Tests
  • WindowingTitleBar_BackRequested() : TitleBarPageWindow
  • WindowingTitleBar_PaneToggleRequested() : TitleBarPageWindow
  • WindowlessPopupTest() : WebView2Tests
  • WindowPage() : WindowPage
  • WindowRect() : DisplayRegionHelper
  • WinRTCollection() : WinRTCollection
  • WinRTObservableVector() : InspectingDataSourceTests::WinRTObservableVector
  • WinRTVectorChangedEventArgs() : InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
  • WorkInfo() : WorkInfo
  • wrap() : TStorageWrapperImpl< T, true > , ReferenceTrackerStorageHelper< ImplT, T > , VectorInnerImpl< VectorOptions, Wrapper > , TStorageWrapperImpl< T, isNoTrackerRef > , NonReferenceTrackerStorageHelper< T >
  • WrapIterable() : InspectingDataSource
  • WrapMode() : PipsPagerProperties
  • WrapModeProperty() : PipsPagerProperties
  • WrapperEffectBrush() : AcrylicBrushPage::WrapperEffectBrush
  • WriteInTextBox() : ColorPickerTests , ParallaxViewTests , PersonPictureTests
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- x -

  • XamlAmbientLight() : XamlAmbientLight
  • XamlAmbientLightProperties() : XamlAmbientLightProperties
  • XamlControlsResources() : XamlControlsResources
  • XamlControlsResourcesProperties() : XamlControlsResourcesProperties
  • XamlMember() : XamlMember
  • XamlMetadataProvider() : XamlMetadataProvider
  • XamlRootChanged() : TeachingTip
  • XamlRootChanged_revoker() : XamlRootChanged_revoker
  • XamlRootChangedHelper() : WebView2
  • XamlStringForControl() : CommonStylesApiTests
  • XamlType() : XamlType
  • XamlWindow_VisibilityChanged() : AcrylicBrushPage
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • [
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • ~

- y -

  • Year() : Year
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • A : ColorPickerTests::Color
  • AcrylicBrushNames : AcrylicColorPage
  • ActionButton : TeachingTipPage
  • Address : Customer
  • AlignContent : Flex
  • AlignItems : Flex
  • Amount : Ingredient
  • AnchorElement : ViewportTests::TestScrollingSurface
  • AnimatedValuesSpy : DynamicPage , SimpleRectanglePage , RatingControlPage , SwipeControlPage
  • AnimationSlowdownFactor : DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • AnotherObject : Bridge
  • ArrangeLayoutFunc : FlowLayoutDerived , MockNonVirtualizingLayout , MockStackLayout , MockVirtualizingLayout
  • AspectRatio : Recipe , Picture
  • AttributeTable : RegisterMetadata
  • AutoHideScrollControllers : ScrollViewTestHooksHelper
  • AutoSuggestSource : CornerRadiusPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- j -

  • JustifyContent : Flex
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- k -

  • KeyFromIndexFunc : DelegatingItemsSource
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- l -

  • Label : MyItem
  • LastExtent : Flex::FlexState
  • LastName : Customer
  • LayoutRects : ActivityFeedLayoutState
  • Level0Layout : PageInfo
  • Level1Layout : PageInfo
  • Level2Layout : PageInfo
  • LightBorderColor : RevealScenarioColors
  • LightHoverPlateColor : RevealScenarioColors
  • Lines : Flex::FlexState
  • Location : Picture
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- m -

  • m_itemInvokedEventsFired : NavigationViewPage
  • m_selectionChangedEventsFired : NavigationViewPage
  • MainSize : Flex::LineInfo
  • MaxOffset : BiDirectionalScrollController::UniScrollController
  • MeasureLayoutFunc : MockVirtualizingLayout , FlowLayoutDerived , MockStackLayout , MockNonVirtualizingLayout
  • MinItemSize : ActivityFeedLayout
  • MinOffset : BiDirectionalScrollController::UniScrollController
  • MockProperty : BreadcrumbTests::MockClass
  • MouseIndicatorStateCount : ScrollViewVisualStateCounts
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- n -

  • Name : Square , TreeNode , GroupedListViewBaseGroupItem , Category , Ingredient , BreadcrumbBarFolder , PersonPicturePage::SportsGroup , NamedGroup-g< T > , GroupedItemsControlGroupItem , TreeViewViewModelItem , Item , Category , RecipeGroup , NavViewPageData
  • NewCount : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , ScrollPresenterStackPanelAnchoringPage::QueuedOperation
  • NewIndex : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , ScrollPresenterStackPanelAnchoringPage::QueuedOperation
  • NoIndicatorStateCount : ScrollViewVisualStateCounts
  • Number : DisposableUserControl , DataItem
  • NumLevels : PageInfo
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- o -

  • Offset : BiDirectionalScrollController::UniScrollController
  • OffsetChangeAnimationType : CompositionScrollController
  • OffsetChangeCorrelationId : CompositionScrollControllerOffsetChangeCompletedEventArgs , BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs
  • OffsetsChangeCorrelationId : BiDirectionalScrollControllerScrollingScrollCompletedEventArgs
  • OffsetTarget : BiDirectionalScrollController
  • OldCount : ScrollPresenterStackPanelAnchoringPage::QueuedOperation , ScrollPresenterRepeaterAnchoringPage::QueuedOperation
  • OldIndex : ScrollPresenterRepeaterAnchoringPage::QueuedOperation , ScrollPresenterStackPanelAnchoringPage::QueuedOperation
  • OnAttachedFunc : FlowLayoutDerived
  • OnDetatchedFunc : FlowLayoutDerived
  • OnElementMeasuredFunc : FlowLayoutDerived
  • OnLineArrangedFunc : FlowLayoutDerived
  • OpenItems : DisposableUserControl
  • OperationsCount : BiDirectionalScrollController
  • Orientation : CompositionScrollController , PageInfo , BiDirectionalScrollController::UniScrollController , ScrollBarController
  • OverlayCornerRadius : CornerRadiusPage
  • OverlayCornerRadiusSize : CornerRadiusPage
  • OverriddenOffsetChangeDuration : CompositionScrollController
  • Owner
: ScrollPresenterRepeaterAnchoringPage::SampleDataSource
, ScrollPresenterBringIntoViewPage::SampleDataSource
, BiDirectionalScrollController::UniScrollController
, MockElementFactory::GetElementCallInfo
, MockElementFactory::RecycleElementCallInfo
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- b -

  • B : ColorPickerTests::Color
  • Background : BreadcrumbBarFolder
  • BackgroundBrushNames : RevealColorPage , LightConfigurationTests
  • BadgeNumber : PersonPicturePage::SportsPerson
  • BitmapImage : Recipe
  • Blah : RevealColorPage
  • BorderBrushNames : RevealColorPage
  • BorderSpotlightAttenuationValue : RevealScenarioLights
  • BorderSpotlightInnerConeValue : RevealScenarioLights
  • BorderSpotlightOuterConeValue : RevealScenarioLights
  • breadCrumbList : BreadcrumbBarAxeTestPage , BreadcrumbBarPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- c -

  • CanScroll : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • CanSelectMultiple : SelectionContainerAutomationPeer
  • Children : TreeViewItemSource , TreeNode , Category
  • ClearElementFunc : MockElementFactory , RecyclingElementFactoryDerived
  • CollectionChange : WinRTCollection::VectorChangedEventArgs , InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
  • Color : Square , ColorPickerTests::ColorPickerTestSetupHelper
  • ColorBrush : ColorItem
  • CompactTabViewItems : MultipleTabViewPage
  • CompositionProperties : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • ConfigurationChanged : ViewportTests::TestScrollingSurface
  • ConfigurationChangedAddFunc : ViewportTests::TestScrollingSurface
  • ConfigurationChangedRemoveFunc : ViewportTests::TestScrollingSurface
  • ContainerRefreshCompletionDeferral : RefreshContainerPage
  • Content : TreeViewItemSource , Category , TabDataItem
  • ControlCornerRadius : CornerRadiusPage
  • ControlCornerRadiusSize : CornerRadiusPage
  • CorrelationId : ScrollPresenterTests::ScrollPresenterOperation
  • Count : WinRTCollection , InspectingDataSourceTests::WinRTObservableVector , CustomItemsSourceView
  • CountInLine : Flex::LineInfo
  • CrossPosition : Flex::LineInfo
  • CrossSize : Flex::LineInfo
  • Current : ColorPickerTests::ColorPickerTestSetupHelper , SelectionModelTests::TreeWalkNodeInfo
  • currentNodeChildrenList : BreadcrumbBarPage
  • CustomAutomationName : TreeNode
  • CustomListViewStyle : ListViewBackgroundPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- d -

  • DarkBorderColor : RevealScenarioColors
  • DarkHoverPlateColor : RevealScenarioColors
  • Data : PhasingTests::ElementPhasingManager , Defaults , ReadOnlyNotifyPropertyChangedCollection-g< T > , ItemTemplateDemo
  • DataContent : MyData
  • DataHeader : MyData
  • DataIconSource : MyData
  • DataModelWithINPC : NumberBoxPage
  • DataTemplateList : RevealListPage
  • Description : Recipe
  • Digits : ItemsViewTests
  • DisplayName : PersonPicturePage::SportsPerson
  • double : LottieLogo , BrightnessSun
  • DoubleValue
: ListViewBasePage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ScrollPresenterDynamicPage::QueuedOperation
  • DynamicGradientBrushInterpolationSpace : RadialGradientBrushPage
  • DynamicGradientBrushSpreadMethod : RadialGradientBrushPage
  • DynamicParallaxView : DynamicPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- e -

  • Element : MockElementFactory::RecycleElementCallInfo
  • EnlargeFocusedItem : UniformGrid2DLayout
  • ExecutionRatio : RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • ExpandCollapseState : Expander , DropDownButton
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- f -

  • Factory : BreadcrumbBarItem , ColorSpectrum , DropDownButton , Expander , ColorPickerSlider
  • FallbackGlyph : AnimatedIconHost
  • FirstName : Customer
  • FirstRealizedIndex : ActivityFeedLayoutState
  • FirstTabViewItems : MultipleTabViewPage
  • FlexDirection : Flex
  • FlexWrap : Flex
  • FocusedItemHeight : UniformGrid2DLayout
  • FocusedItemWidth : UniformGrid2DLayout
  • Foreground : BreadcrumbBarFolder
  • FullName : PersonInfo
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- g -

  • G : ColorPickerTests::Color
  • GetAnchorForRealizationRectFunc : FlowLayoutDerived
  • GetAnchorForTargetElementFunc : FlowLayoutDerived
  • GetAtCallCount : CustomItemsSource
  • GetAtFunc : MockItemsSource
  • GetElementFunc : MockElementFactory , RecyclingElementFactoryDerived
  • GetExtentFunc : FlowLayoutDerived
  • GetItemIdFunc : MockItemsSource
  • GetMeasureSizeFunc : FlowLayoutDerived
  • GetProvisionalArrangeSizeFunc : FlowLayoutDerived
  • GetRelativeViewportFunc : ViewportTests::TestScrollingSurface
  • GetSizeFunc : MockItemsSource
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- h -

  • HasDirectManipulation : DynamicPage , SimpleRectanglePage
  • HasKeyIndexMappingFunc : MockItemsSource
  • HasUnrealizedChildren : TreeViewItemSource
  • Header : TabDataItem
  • Height : MyItem
  • HorizontalOffsetAnimation : DynamicPage
  • HorizontalOffsetAnimation1 : SimpleRectanglePage
  • HorizontalOffsetAnimation2 : SimpleRectanglePage
  • HorizontalScrollController : BiDirectionalScrollController , CanvasScrollControllerConsumer
  • HorizontalSliderInteraction : SliderInteractionPage
  • HorizontalThumbOffset : BiDirectionalScrollController , CompositionScrollController
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- i -

  • Icon : Category
  • IconSource : ToggleAnimatedIconHost , TabDataItem , AnimatedIconHost
  • Id : Picture , Recipe , Person , GroupedItemsControlItem , GroupedListViewBaseItem
  • ImageUri : Recipe
  • InArrange : ViewportTests::TestScrollingSurface
  • Index
: WinRTCollection::VectorChangedEventArgs
, InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
, ItemCollectionTransitionProviderTests::CallInfo
, MockItemsSource::GetAtCallInfo
, MockItemsSource::KeyFromIndexCallInfo
, MockElementFactory::GetElementCallInfo
  • Initials : PersonPicturePage::SportsPerson , PersonInfo
  • InMeasure : ViewportTests::TestScrollingSurface
  • Inner
: CustomItemsSource
, CollectionChangeDemo::MyDataSource
, ScrollPresenterTests::TestDataSource
, ScrollPresenterBringIntoViewPage::SampleDataSource
, ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • InPostArrange : ViewportTests::TestScrollingSurface
  • Interaction : ButtonInteractionPage
  • InteractionRatioCompositionProperty : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • IntProperty : CustomSelectionModel
  • IntValue : ListViewBasePage::QueuedOperation , ItemsViewSummaryPage::QueuedOperation
  • IsAnimatingThumbOffset : CompositionScrollControllerPanningInfo , CompositionScrollController
  • IsCleared : PhasingTests::ElementPhasingManager
  • IsEnabled : CanvasScrollControllerConsumer , ScrollBarController
  • IsExpanded : TreeViewItemSource
  • IsExpressionAnimationStarted : ExpressionAnimationStatusChange
  • IsFixedSize : CustomItemsSourceView
  • IsHorizontallyScrollable : ViewportTests::TestScrollingSurface
  • IsInnerLayoutGrid : AnimationsDemoPage::AnimationElementFactory
  • IsInteractingForRefresh : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • IsLeftNavTest : RegressionTestScenario
  • IsLogging : CanvasScrollControllerConsumer , ScrollBarController
  • IsPageRTL : TeachingTipPage
  • IsRailEnabled : BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , CompositionScrollControllerPanningInfo
  • IsReadOnly : InspectingDataSourceTests::WinRTObservableVector , ColorSpectrum , ColorPickerSlider , CustomItemsSourceView , WinRTCollection
  • IsRenderingHooked : SwipeControlPage , DynamicPage , SimpleRectanglePage , RatingControlPage
  • IsScrollable : BiDirectionalScrollController::UniScrollController
  • IsScrollingWithMouse : CompositionScrollController , BiDirectionalScrollController::UniScrollController , BiDirectionalScrollController , ScrollBarController
  • IsSelected : RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer , GroupedRepeaterItem , TreeViewItemSource , RepeaterItem , TreeViewItem
  • IsSelectionRequired : SelectionContainerAutomationPeer
  • IsSynchronized : CustomItemsSourceView
  • IsThumbPannable : CompositionScrollControllerPanningInfo , CompositionScrollController
  • IsThumbPositionMirrored : CompositionScrollControllerPanningInfo , CompositionScrollController
  • IsUsingRS4Style : RegressionTestScenario
  • IsVertical : OrientationBasedMeasures
  • IsVerticallyScrollable : ViewportTests::TestScrollingSurface
  • ItemHeight : VirtualizingUniformStackLayout , UniformGrid2DLayout , VirtualizingUniformCarouselStackLayout
  • Items : TreeViewViewModelItem , GroupedItemsControlGroupItem , GroupedItemsControlViewModel , TreeViewViewModel , GroupedListViewBaseViewModel , GroupedListViewBaseGroupItem
  • ItemSize : CircleLayout
  • ItemSpacing : ActivityFeedLayout
  • ItemWidth : VirtualizingUniformCarouselStackLayout , UniformGrid2DLayout , VirtualizingUniformStackLayout
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- p -

  • Pages : NavigationViewPageDataContext
  • PanningElementAncestor : CompositionScrollControllerPanningInfo
  • PanningElementOffsetMultiplier : CompositionScrollControllerPanningInfo
  • PanningInfo : BiDirectionalScrollController::UniScrollController , CompositionScrollController , ScrollBarController
  • PanningVisual : CompositionScrollControllerPanningInfo
  • PanOrientation : CompositionScrollControllerPanningInfo
  • ParallaxView : DynamicPage
  • Path : Picture , SelectionModelTests::TreeWalkNodeInfo
  • Photo : Ingredient
  • PositionAnimation : SwipeControlPage
  • ProcessedCalls : PhasingTests::ElementPhasingManager
  • Prop : BridgeAnotherClass
  • PropertyName : ExpressionAnimationStatusChange
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- r -

  • R : ColorPickerTests::Color
  • RealizedElementIndices : RecyclingElementFactoryDerived
  • RecordedArgs : InspectingDataSourceTests::CollectionChangeRecorder
  • RecyclePool : RecipeElementFactory
  • RefreshCompletionDeferral : RefreshContainerOnImagePage , RefreshVisualizerPage
  • RegisterAnchorCandidateFunc : ViewportTests::TestScrollingSurface
  • Repeat : VirtualizingUniformCarouselStackLayout
  • RepeatCount : VirtualizingUniformCarouselStackLayout
  • RepeatedIndex : RepeaterItem , GroupedRepeaterItem , TreeViewItem
  • Reset : ScrollPresenterRepeaterAnchoringPage::QueuedOperation
  • ResettingListItems : CollectionChangeDemo
  • Result : ScrollPresenterTests::ScrollPresenterOperation
  • RevealBackgroundBrushes : LightConfigurationTests , RevealColorPage
  • RevealBorderBrushes : RevealColorPage
  • RevealState : RevealColorPage
  • RevealTest : RevealScenarioLights
  • RowSpacing : ActivityFeedLayout
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- s -

  • ScaleAnimation : RatingControlPage
  • ScrollBarsSeparatorCollapsedDisabledStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorCollapsedStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorCollapsedWithoutAnimationStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorDisplayedWithoutAnimationStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorExpandedStateCount : ScrollViewVisualStateCounts
  • ScrollBarsSeparatorExpandedWithoutAnimationStateCount : ScrollViewVisualStateCounts
  • ScrollOrientation : OrientationBasedMeasures
  • ScrollPresenter : DynamicPage
  • ScrollView : ScrollViewTestHooksHelper
  • ScrollViewer : DynamicPage
  • SecondTabViewItems : MultipleTabViewPage
  • SelectedScrollView : ScrollViewsWithSimpleContentsPage
  • SelectionContainer : TreeViewItemAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer
  • SelectionModel : SelectionContainer , RepeaterItem , GroupedRepeaterItem , TreeViewItem
  • SelectsOnInvoked : Category
  • SelectTemplateIdFunc : RecyclingElementFactoryDerived
  • ShouldAnimateFunc : ItemCollectionTransitionProviderDerived
  • ShouldBreakLineFunc : FlowLayoutDerived
  • Size : FixedSizeItem , VariableSizeItem
  • SizeToContentTabViewItems : MultipleTabViewPage
  • Spacing : UniformGrid2DLayout , VirtualizingUniformCarouselStackLayout
  • SpotlightAttenuationValue : RevealScenarioLights
  • SpotlightInnerConeAlphaValue : RevealScenarioLights
  • SpotlightInnerConeValue : RevealScenarioLights
  • SpotlightMaxSizeValue : RevealScenarioLights
  • SpotlightMinSizeValue : RevealScenarioLights
  • SpotlightOuterConeAlphaValue : RevealScenarioLights
  • SpotlightOuterConeValue : RevealScenarioLights
  • StartIndex : Flex::LineInfo
  • StartTransitionsFunc : ItemCollectionTransitionProviderDerived
  • StockOffsetChangeDuration : CompositionScrollController
  • StringList : TabViewTearOutWindowWithDataItems
  • StringValue
: ItemsViewSummaryPage::QueuedOperation
, ListViewBasePage::QueuedOperation
, ScrollPresenterDynamicPage::QueuedOperation
  • Style1 : TreeViewItemStyleSelector
  • Style2 : TreeViewItemStyleSelector
  • SuggestedAnchor : ViewportTests::TestStackLayout , ViewportTests::TestGridLayout
  • Suggestions : SampleSuggestions
  • SumGrow : Flex::LineInfo
  • SumShrink : Flex::LineInfo
  • SyncRoot : CustomItemsSourceView
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- t -

  • TabViewTearOutApp : TabViewTearOutTests
  • TargetElement : DynamicPage
  • Template1 : TreeViewItemTemplateSelector
  • Template2 : TreeViewItemTemplateSelector
  • TemplateEven : MySelector , MyContainerSelector , MySelector
  • TemplateOdd : MySelector , MyContainerSelector , MySelector
  • TestContext : TeachingTipTests
  • TestPageName : RegressionTestScenario
  • TestSetupHelperOptions : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper , TextCommandBarFlyoutTests::TextCommandBarFlyoutTestSetupHelper
  • TestTreeView2ItemsSource : TreeViewPage
  • TestTreeViewItemsSource : TreeViewLateDataInitTest , TreeViewPage
  • Text : CustomNavigationViewItem , FixedSizeItem , VariableSizeItem , DataItem
  • this : WinRTCollection , CustomItemsSourceView , InspectingDataSourceTests::WinRTObservableVector , MyCollection , Bridge
  • Thumb : BiDirectionalScrollController
  • Title : Picture , ColorItem , PictureLibrary , ToggleAnimatedIconHost , AnimatedIconHost
  • TouchIndicatorStateCount : ScrollViewVisualStateCounts
  • Transition : ItemCollectionTransitionProviderTests::CallInfo
  • Type
: ListViewBasePage::QueuedOperation
, ScrollPresenterDynamicPage::QueuedOperation
, ItemsViewSummaryPage::QueuedOperation
, ScrollPresenterStackPanelAnchoringPage::QueuedOperation
, ScrollPresenterRepeaterAnchoringPage::QueuedOperation
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- u -

  • UIThreadTicksForValuesSpy : DynamicPage , SimpleRectanglePage , SwipeControlPage , RatingControlPage
  • UnregisterAnchorCandidateFunc : ViewportTests::TestScrollingSurface
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- v -

  • ValidateElementIndices : RecyclingElementFactoryDerived
  • Value : ColorSpectrum , DataModelWithINPC , Year , ColorPickerSlider
  • VerticalOffsetAnimation : DynamicPage
  • VerticalOffsetAnimation1 : SimpleRectanglePage
  • VerticalOffsetAnimation2 : SimpleRectanglePage
  • VerticalScrollController : BiDirectionalScrollController , CanvasScrollControllerConsumer
  • VerticalSliderInteraction : SliderInteractionPage
  • VerticalThumbOffset : CompositionScrollController , BiDirectionalScrollController
  • ViewportLength : BiDirectionalScrollController::UniScrollController
  • VisualizerRefreshCompletionDeferral : RefreshContainerPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Properties

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- w -

  • WideBorderSpotlightAttenuationValue : RevealScenarioLights
  • WideBorderSpotlightInnerConeValue : RevealScenarioLights
  • WideBorderSpotlightOuterConeValue : RevealScenarioLights
  • Width : Square , PinterestLayout
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Related Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • AnimatedVisualPlayerProperties : AnimatedVisualPlayer
  • TeachingTipTestHooks : TeachingTip
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Typedefs

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • EventSource : ObservableTraits< T, isObservable, isBindable >
  • KVP : HashMap< K, V >
  • T_iterator : HashMap< K, V >
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- _ -

  • _acrylicBrush : AcrylicBrushPage , AcrylicMarkupPage
  • _acrylicTestApi : AcrylicMarkupPage , AcrylicBrushPage
  • _actionButton : InfoBarPage
  • _animationSlowdownFactor : RadialItemCollectionTransitionProvider
  • _aqua : RatingControlPage
  • _areWebviewElementsCleanedUp : WebView2BasicPage , WebView2CoreObjectsPage
  • _asyncEventReportingLock : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • _averageMonthCount : ItemsViewIntegrationPage
  • _backgroundLight : RevealScenarioLights
  • _bitmapImage : Recipe
  • _borderLight : RevealScenarioLights
  • _borderWideLight : RevealScenarioLights
  • _bringIntoViewOptions : ItemsViewIntegrationPage
  • _c
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, ProgressRingDeterminate::AnimatedVisual
  • _cancelScrolling : AnnotatedScrollBarSummaryPage
  • _canExecute : MyCommand
  • _checkBrushResult : RevealColorPage
  • _cleanupVerified : LightConfigurationTests
  • _clickCount : DropDownButtonPage , SplitButtonPage
  • _closedExceptionCount : WebView2CoreObjectsPage
  • _colEntities : ItemsViewSummaryPage , FlatItemsControlPage , ListViewBasePage , ItemsViewInteractiveTestsPage
  • _colFavoritePhotos : SelectorBarSamplePage
  • _collapsedElements : ObjectModelTestPage
  • _colorBrush_AlmostGoldenrod_FFE4950C : BrightnessSun::BrightnessSun_AnimatedVisual
  • _colorBrush_AlmostTeal_FF007A87 : LottieLogo::LottieLogo_AnimatedVisual
  • _colorBrush_White : LottieLogo::LottieLogo_AnimatedVisual
  • _colPhotos : ItemsViewIntegrationPage
  • _colRemotePhotos : SelectorBarSamplePage
  • _colSharedPhotos : SelectorBarSamplePage
  • _colSmallEntities : ItemsViewSummaryPage
  • _colSmallImages : ItemsViewSummaryPage
  • _colSmallItemContainers : ItemsViewSummaryPage
  • _colSmallUniformEntities : ItemsViewSummaryPage
  • _colStrings : ObjectModelTestPage
  • _commandExecuteCount : SplitButtonPage
  • _compositionPropertyLogger : RevealStatesPage
  • _containerShape_00 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_01 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_05 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_07 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_08 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_09 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_10 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_12 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_14 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_15 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_16 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_17 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_18 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_19 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_20 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_21 : LottieLogo::LottieLogo_AnimatedVisual
  • _containerShape_22 : LottieLogo::LottieLogo_AnimatedVisual
  • _controlCornerRadius : CornerRadiusPage
  • _coreProcessFailedCount : WebView2CoreObjectsPage
  • _coreWebView2InitializedCount : WebView2CoreObjectsPage
  • _cornerRadiusFour : LinedFlowLayoutDemo
  • _counter : DisposableUserControl
  • _cubicBezierEasingFunction_0 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_1 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_2 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_3 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_4 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_5 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_6 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_7 : LottieLogo::LottieLogo_AnimatedVisual
  • _cubicBezierEasingFunction_8 : LottieLogo::LottieLogo_AnimatedVisual
  • _currentAPIVersion : PlatformConfiguration
  • _currentItemIndexChangedToken : ItemsViewSummaryPage
  • _customUserDataFolder : WebView2BasicPage
  • _cvs : GroupedItemsControlPage , GroupedListViewBasePage , ListViewAnchoringPage
  • _data : ReadOnlyNotifyPropertyChangedCollection-g< T > , PhasingTests::ElementPhasingManager , DelegatingItemsSource , CircleLayoutSamplePage , PersonDataSource , FlatSample , TreeViewSample
  • _dataSource : AnimationsDemoPage , CollectionChangeDemo
  • _defaultBrushColors : CalendarViewPage
  • _description : Recipe
  • _detailLabelContent : AnnotatedScrollBarSummaryPage
  • _disableClickToExpand : TreeViewPage
  • _dt : RatingControlPage , SwipeControlPage
  • _dynamicItemsView : ItemsViewSummaryPage
  • _ellipse_0_0 : LottieLogo::LottieLogo_AnimatedVisual
  • _ellipse_0_1 : LottieLogo::LottieLogo_AnimatedVisual
  • _ellipse_4p7 : LottieLogo::LottieLogo_AnimatedVisual
  • _ensureCoreWebView2CompletionCount : WebView2CoreObjectsPage
  • _entityTemplates : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • _errors : SimpleVerify
  • _expandCollapsePattern : DropDownButton , Expander
  • _factory : BreadcrumbBarItem , ColorSpectrum , ColorPickerSlider , DropDownButton , Expander
  • _flatData : ItemsViewWithDataPage
  • _flowLayout : ItemsViewSummaryPage , RepeaterTestUIPage
  • _flyout : DropDownButtonPage
  • _flyoutClosedCount : DropDownButtonPage , SplitButtonPage
  • _flyoutOpenedCount : DropDownButtonPage , SplitButtonPage
  • _fullLogs : ItemsViewIntegrationPage , ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , SelectorBarSummaryPage
  • _fullWindowMediaRoot : LightConfigurationTests
  • _getSizeCallsCount : MockItemsSource
  • _grayBrush : LinedFlowLayoutDemo
  • _gridLayout : RepeaterTestUIPage
  • _groupedData : GroupedSample
  • _groupedItemsControlViewModel : GroupedItemsControlPage
  • _groupedListViewBaseViewModel : GroupedListViewBasePage , ListViewAnchoringPage
  • _groups : AnimationsDemoPage
  • _groupTemplate : AnimationsDemoPage::AnimationElementFactory , RecipeElementFactory
  • _headerTemplates : GroupedItemsControlPage
  • _helpers : WebView2BasicPage , WebView2CoreObjectsPage
  • _holdThenStepEasingFunction : BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • _hoverSpotlight : RevealStatesPage
  • _iconSource : TabViewPage
  • _id : Recipe , Person
  • _imageUri : Recipe
  • _index : InspectingDataSourceTests::WinRTObservableVector::WinRTVectorChangedEventArgs
  • _inkPresenter : InkToolbarPage
  • _inner
: CustomItemsSource
, CollectionChangeDemo::MyDataSource
, ScrollPresenterBringIntoViewPage::SampleDataSource
, ScrollPresenterRepeaterAnchoringPage::SampleDataSource
  • _innerRepeaters : AnimationsDemoPage::AnimationElementFactory
  • _intProperty : CustomSelectionModel
  • _invokeCount : ButtonInteractionPage
  • _invokePattern : BreadcrumbBarItem
  • _isApplicationLanguageOverrideSet : WebView2BasicPage
  • _isHorizontallyScrollable : ViewportTests::TestScrollingSurface
  • _isInConstantVelocityPan : ScrollPresenterMousePanningPage
  • _isInMousePan : ScrollPresenterMousePanningPage
  • _isInnerLayoutGrid : AnimationsDemoPage::AnimationElementFactory
  • _isMiddleButtonPressed : ScrollPresenterMousePanningPage
  • _isRedirected : WebView2BasicPage
  • _isUserInitiated : WebView2BasicPage
  • _isVerticallyScrollable : ViewportTests::TestScrollingSurface
  • _itemInvokedEventsFired : NavigationViewPage
  • _items : InspectingDataSourceTests::WinRTObservableVector
  • _itemSpacing : ActivityFeedLayout
  • _itemsStackPanelTemplate : ListViewAnchoringPage
  • _itemsView : ItemsViewSummaryPage
  • _itemsViewPointerWheelChangedEventHandler : ItemsViewSummaryPage
  • _itemTemplate : RecipeElementFactory
  • _itemTemplates : FlatItemsControlPage , GroupedItemsControlPage
  • _iteration_TintTransitionDuration : AcrylicBrushPage
  • _KeyFromIndexFunc : AnimationsDemoPage::AnimationElementFactory
  • _knownPropertyValueDict : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • _lastId : CircleLayoutSamplePage
  • _lastRequestedDetailLabelOffset : AnnotatedScrollBarSummaryPage
  • _lastScrollOffset : AnnotatedScrollBarSummaryPage
  • _layout : LinedFlowLayoutDemo , GroupedSample
  • _layoutRects : ActivityFeedLayoutState
  • _lightValidationTimer : LightConfigurationTests
  • _linedFlowLayout : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • _linedFlowLayoutItemCollectionTransitionProvider : ItemsViewInteractiveTestsPage
  • _listViewBase : GroupedListViewBasePage , ListViewBasePage
  • _listViewIem1 : CoreWindowEventsPage
  • _loadedCount : WebView2CoreObjectsPage
  • _lorem : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage , AnimationsDemoPage , PinterestLayoutSamplePage , VirtualizingStackLayoutSamplePage , ItemsViewWithDataPage
  • _lstAsyncEventMessage : ItemsViewIntegrationPage , ItemsViewSummaryPage , LinedFlowLayoutDemo
  • _lstEntities : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • _lstLargeEntities : ItemsViewInteractiveTestsPage
  • _lstLinedFlowLayoutLockedItemIndexes : ItemsViewSummaryPage , LinedFlowLayoutDemo
  • _lstQueuedOperations : ListViewBasePage , ItemsViewSummaryPage
  • _luminosityBlendResults : AcrylicRenderingPage
  • _mediaFullScreened : LightConfigurationTests
  • _minItemSize : ActivityFeedLayout
  • _modernPanelTemplate : FlatItemsControlPage , ListViewBasePage
  • _monthPhotoCounts : ItemsViewIntegrationPage
  • _months : ItemsViewIntegrationPage
  • _mpe : LightConfigurationTests
  • _navigationCompletedCount : WebView2CoreObjectsPage
  • _navigationStartingCount : WebView2CoreObjectsPage
  • _newTabNumber : TabViewPage , TabViewSizingPage , TabViewTabClosingBehaviorPage
  • _next : Data
  • _nextData : SelectionModelTests
  • _normalStateCheckNumber : RevealStatesPage
  • _numbers : NonVirtualStackLayoutSamplePage
  • _numLabels : AnnotatedScrollBarSummaryPage
  • _numPhases : PhasingTests::ElementPhasingManager , PhasingTests::CustomElementFactory
  • _offsetBetweenLabels : AnnotatedScrollBarSummaryPage
  • _offsetVector2Animation_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_05 : LottieLogo::LottieLogo_AnimatedVisual
  • _offsetVector2Animation_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _oldFocusedElement : ItemsViewInteractiveTestsPage
  • _oneLevelNestedData : ItemsViewWithDataPage
  • _originalHeight : WebView2BasicPage
  • _originalWidth : WebView2BasicPage
  • _otherSelectorBarItem : SelectorBarSummaryPage
  • _outerItemsControl : NestedItemsControlsPage
  • _outerListView : NestedListViewsPage
  • _overlayCornerRadius : CornerRadiusPage
  • _owner : SelectionContainerAutomationPeer , RepeaterItemAutomationPeer , GroupedRepeaterItemAutomationPeer , TreeViewItemAutomationPeer
  • _pageInfo : ItemsViewWithDataPage , RecipeElementFactory
  • _pageOperationCount : ListViewAnchoringPage
  • _pageOperations : ListViewAnchoringPage
  • _pageOperationTimer : ListViewAnchoringPage
  • _pages : NavigationViewPageDataContext
  • _parentPage : MyCommand
  • _path : BrightnessSun::BrightnessSun_AnimatedVisual
  • _path_0 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_1 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_2 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_3 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_4 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_5 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_6 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_7 : LottieLogo::LottieLogo_AnimatedVisual
  • _path_8 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_00 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_01 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_05 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_07 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_08 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_09 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_10 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_12 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_14 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_15 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_16 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_17 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_18 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_19 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_20 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_21 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_22 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_23 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_24 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_25 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_26 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_27 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_28 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_29 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_30 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_31 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_32 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_33 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_34 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_35 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_36 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_37 : LottieLogo::LottieLogo_AnimatedVisual
  • _pathGeometry_38 : LottieLogo::LottieLogo_AnimatedVisual
  • _personTemplate : PersonElementFactory
  • _photoTemplates : ItemsViewIntegrationPage
  • _placementFlyout : SplitButtonPage
  • _pollInterval : LightConfigurationTests
  • _pollMaxRetries : LightConfigurationTests
  • _pollRetry : LightConfigurationTests
  • _populateAnnotatedScrollBar : ItemsViewIntegrationPage
  • _populateAnnotatedScrollBarPending : ItemsViewIntegrationPage
  • _populateHeaderPending : ItemsViewIntegrationPage
  • _popupRoot : LightConfigurationTests
  • _preConstantVelocityPanPosition : ScrollPresenterMousePanningPage
  • _preMousePanHorizontalOffset : ScrollPresenterMousePanningPage
  • _preMousePanPosition : ScrollPresenterMousePanningPage
  • _preMousePanVerticalOffset : ScrollPresenterMousePanningPage
  • _pressSpotlight : RevealStatesPage
  • _primaryWindowCondition : TabViewTests
  • _propertyNameBlockList : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • _propertyNamePostfixBlockList : CommonStylesVisualTreeTestSamples::CustomizedFilter
  • _queuedOperationsTimer : ItemsViewSummaryPage , ListViewBasePage
  • _radiusVector2Animation : LottieLogo::LottieLogo_AnimatedVisual
  • _random : RadialGradientBrushPage
  • _realizedElementIndices : RecyclingElementFactoryDerived
  • _realizedElements : RecyclingElementFactoryDerived
  • _recipeTemplate : AnimationsDemoPage::AnimationElementFactory
  • _recordedArgs : InspectingDataSourceTests::CollectionChangeRecorder
  • _recordedGetAtCalls : MockItemsSource
  • _recordedGetElementCalls : MockElementFactory
  • _recordedKeyFromIndexCalls : MockItemsSource
  • _recordedRecycleElementCalls : MockElementFactory
  • _rectangle1 : AcrylicBrushTests
  • _recyclePool : PhasingTests::CustomElementFactory , AnimationsDemoPage::AnimationElementFactory
  • _redBrush : ItemsViewIntegrationPage , ItemsViewSummaryPage
  • _requestedDetailLabelPhotoInYearIndex : ItemsViewIntegrationPage
  • _requestedDetailLabelYearIndex : ItemsViewIntegrationPage
  • _resourceButtonRevealBackgroundBrush : RevealFallbackPage
  • _resourceButtonRevealBackgroundPointerOver : RevealFallbackPage
  • _resourceButtonRevealBackgroundPressed : RevealFallbackPage
  • _resourceButtonRevealBorderBrush : RevealFallbackPage
  • _resourceButtonRevealBorderBrushPointerOver : RevealFallbackPage
  • _resourceButtonRevealBorderBrushPressed : RevealFallbackPage
  • _reusableExpressionAnimation
: BrightnessSun::BrightnessSun_AnimatedVisual
, ProgressRingDeterminate::AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
  • _revealAddedCount : CoreWindowEventsPage
  • _revealBrushTestApi : RevealFallbackPage , RevealStatesPage
  • _revealState : RevealColorPage
  • _revealTest : RevealScenarioLights
  • _revealTestApi : RevealFallbackPage , RevealStatesPage
  • _reverse_order_items : NavigationViewMenuItemsSourcePage
  • _rnd : ResetableCollection-g< T > , GroupedSample , AnimationsDemoPage , CircleLayoutSamplePage
  • _root
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, ProgressRingDeterminate::AnimatedVisual
  • _rootProgress : BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual
  • _rootSP : AcrylicBrushTests
  • _rowSpacing : ActivityFeedLayout
  • _scrollController : IScrollControllerAdapter
  • _scrollView : ItemsViewIntegrationPage
  • _scrollViewer : ListViewBasePage , IScrollControllerAdapter , GroupedListViewBasePage
  • _scrollViewOffsetChangeCorrelationId : ItemsViewInteractiveTestsPage
  • _scrollViewPointerWheelChangedEventHandler : ItemsViewSummaryPage
  • _scrollViewResetCorrelationId : ItemsViewInteractiveTestsPage
  • _scrollViewZoomFactorChangeCorrelationId : ItemsViewInteractiveTestsPage
  • _secondaryWindowCondition : TabViewTests
  • _secondTextBlockUI : RatingControlPage
  • _selectionChangedEventsFired : NavigationViewPage
  • _shapeVisibilityAnimation_04 : LottieLogo::LottieLogo_AnimatedVisual
  • _sharedRecyclePool : RecipeElementFactory
  • _solidColorBrushGreen : NonVirtualStackLayoutSamplePage
  • _solidColorBrushRed : NonVirtualStackLayoutSamplePage
  • _spriteShape_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_12 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_14 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_15 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_19 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_22 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_23 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_36 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_37 : LottieLogo::LottieLogo_AnimatedVisual
  • _spriteShape_38 : LottieLogo::LottieLogo_AnimatedVisual
  • _stackLayout : RepeaterTestUIPage , ItemsViewSummaryPage , ItemsViewInteractiveTestsPage
  • _stepThenHoldEasingFunction : LottieLogo::LottieLogo_AnimatedVisual
  • _tabCondition : TabViewTearOutTests , TabViewTests
  • _tabViewCondition : TabViewTests , TabViewTearOutTests
  • _tabViewTearOutApp : TabViewTearOutTests
  • _tEndScalarAnimation_1_to_0 : BrightnessSun::BrightnessSun_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_03 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_06 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_11 : LottieLogo::LottieLogo_AnimatedVisual
  • _tEndScalarAnimation_1_to_0_13 : LottieLogo::LottieLogo_AnimatedVisual
  • _test1_RevealButton : RevealRegressionTestsPage
  • _testPage : WebView2Common
  • _thicknessFour : LinedFlowLayoutDemo
  • _timer : InfoBarPage
  • _timerAction : InfoBarPage
  • _tomato : RatingControlPage
  • _transitionProvider : AnimationsDemoPage::AnimationElementFactory
  • _tStartScalarAnimation_0_to_0p249 : LottieLogo::LottieLogo_AnimatedVisual
  • _tStartScalarAnimation_0p87_to_0_02 : LottieLogo::LottieLogo_AnimatedVisual
  • _tStartScalarAnimation_1_to_0 : BrightnessSun::BrightnessSun_AnimatedVisual
  • _twoLevelNestedData : ItemsViewWithDataPage
  • _uiElements : NonVirtualStackLayoutSamplePage
  • _uniformGridLayout : ItemsViewInteractiveTestsPage , ItemsViewSummaryPage
  • _unloadedCount : WebView2CoreObjectsPage
  • _useLongLabels : AnnotatedScrollBarSummaryPage
  • _validationCompleted : LightConfigurationTests
  • _value : DataModelWithINPC
  • _valuePattern : ColorSpectrum , ColorPickerSlider
  • _virtualizedNode : TreeViewPage
  • _visualRoot : TreeViewPage , LightConfigurationTests
  • _whiteBrush : ItemsViewSummaryPage , LinedFlowLayoutDemo , ItemsViewIntegrationPage
  • _windowCondition : TabViewTearOutTests
  • _wv2_ConcurrentCreation : WebView2CoreObjectsPage
  • _wv2_CoreProcessFailed : WebView2CoreObjectsPage
  • _wv2_Markup : WebView2CoreObjectsPage
  • _wv2_Programmatic_Live : WebView2CoreObjectsPage
  • _wv2_Programmatic_Offline : WebView2CoreObjectsPage
  • _yearCount : ItemsViewIntegrationPage
  • _yearPhotoCounts : ItemsViewIntegrationPage
  • _yearTemplate : RecipeElementFactory
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- j -

  • JustifyContentProperty : Flex
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- k -

  • k_DegreesPerRadian : EffectBase
  • k_PI : EffectBase
  • key : PhasingTests::CustomElementFactory
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- l -

  • LabelCollection : AnnotatedScrollBarIScrollControllerPage , AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarSummaryPage
  • largeImg : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • lastInteractedWithSwipeControlContentContainer : SwipeControlPage
  • lastInteractedWithSwipeControlContentRoot : SwipeControlPage
  • lastOffsetsChangeCorrelationId : ScrollPresenterDynamicPage
  • lastOffsetsChangeWithAdditionalVelocityCorrelationId : ScrollPresenterDynamicPage
  • LastPageButton : PagerControlTestPageElements
  • lastPageButton : PagerControlPage
  • LastPageButtonIsEnabledCheckBox : PagerControlTestPageElements
  • LastPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • LastPageButtonVisibilityComboBox : PagerControlTestPageElements
  • LastRealizedElementIndexDefault : final
  • lastScrollPresenterOffset : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • lastZoomFactorChangeCorrelationId : ScrollPresenterDynamicPage
  • lastZoomFactorChangeWithAdditionalVelocityCorrelationId : ScrollPresenterDynamicPage
  • Latest : FallbackGrid
  • layoutCompletedCount : ScrollPresenterExpressionAnimationSourcesPage
  • LayoutNumberOfColumnsTextBlock : RadioButtonsTestPageElements
  • LayoutNumberOfLargerColumnsTextBlock : RadioButtonsTestPageElements
  • LayoutNumberOfRowsTextBlock : RadioButtonsTestPageElements
  • Left : WebView2RenderingVerifier::NativeMethods::RECT
  • lightBorderColor : RevealScenarioColors
  • lightHoverPlateColor : RevealScenarioColors
  • LinearAttenuation : RevealBorderSpotlightStateDesc
  • listSource : RevealScenarioList , RevealScenarios
  • lockObject : ColorPickerTests::ColorPickerTestSetupHelper
  • lstAddScrollVelocityCorrelationIds : BiDirectionalScrollController , CompositionScrollController , ScrollBarController
  • lstAsyncEventMessage : ImagePage , ItemsViewBlankPage , BiDirectionalScrollController , ScrollViewBlankPage , ScrollPresenterBringIntoViewPage , ScrollPresenterDynamicPage , ScrollPresenterRepeaterAnchoringPage , ScrollViewBringIntoViewPage , ScrollBarController , ScrollViewDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ScrollViewWithScrollControllersPage , SwipeControlPage , ScrollPresenterStackPanelAnchoringPage , CompositionScrollController
  • lstEventMessage : ItemsViewPictureLibraryPage
  • lstLog : CanvasScrollControllerConsumer , ScrollBarController
  • lstOffsetChangeCorrelationIds : CompositionScrollController
  • lstQueuedOperations : ScrollPresenterDynamicPage , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage
  • lstScrollByCorrelationIds : ScrollBarController , BiDirectionalScrollController
  • lstScrollToCorrelationIds : ScrollBarController , BiDirectionalScrollController
  • lstTeachingTipEvents : TeachingTipTestPageElements
  • lstTriggeredOperations : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • lstViewChangeCorrelationIds : BiDirectionalScrollController
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- m -

  • M11 : Matrix5x4
  • M12 : Matrix5x4
  • M13 : Matrix5x4
  • M14 : Matrix5x4
  • M21 : Matrix5x4
  • M22 : Matrix5x4
  • M23 : Matrix5x4
  • M24 : Matrix5x4
  • M31 : Matrix5x4
  • M32 : Matrix5x4
  • M33 : Matrix5x4
  • M34 : Matrix5x4
  • M41 : Matrix5x4
  • M42 : Matrix5x4
  • M43 : Matrix5x4
  • M44 : Matrix5x4
  • M51 : Matrix5x4
  • M52 : Matrix5x4
  • M53 : Matrix5x4
  • M54 : Matrix5x4
  • m_acceleratorKeyActivatedRevoker : SwipeControl , WebView2
  • m_accessibilitySettings : WebView2
  • m_acrylicBrushCompositionEffectFactoryCache : MaterialHelperBase
  • m_action : VectorChangedEventArgs
  • m_actionButtonClickEventSource : TeachingTipProperties
  • m_activator : XamlTypeBase
  • m_activeToolChangedEventSource : InkToolBarProperties
  • m_addedSelectedItems : ViewModel
  • m_addTabButtonClickEventSource : TabViewProperties
  • m_addToMap : XamlTypeBase
  • m_anchorCandidates : ScrollPresenter
  • m_anchorElement : ScrollPresenterTestHooksAnchorEvaluatedEventArgs
  • m_anchorEvaluatedEventSource : ScrollPresenterTestHooks
  • m_anchorRequestedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_arrangeBounds : VirtualizationInfo
  • m_arrangeInvalidatedEventSource : LayoutProperties
  • m_aspectRatios : LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock
  • m_autoHideScrollBarsState : ScrollView
  • m_autoHideScrollControllersMap : ScrollViewTestHooks
  • m_autoSuggestBoxLoadedRevoker : AutoSuggestEventRevokers
  • m_averageItemsPerLine : LinedFlowLayout
  • m_backRequestedEventSource : NavigationViewProperties , TitleBarProperties
  • m_begin : IndexRange
  • m_bringingIntoViewEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_budgetInMs : final
  • m_buildTreeCompleted : RepeaterTestHooks , MUXControlsTestHooks
  • m_buttonClickRevokers : TextCommandBarFlyout
  • m_buttonCommandRevokers : TextCommandBarFlyout
  • m_buttons : TextCommandBarFlyout
  • m_cacheBuildAction : ViewportManagerDownLevel
  • m_cachedBounds : PinterestLayout
  • m_cancelBringIntoView : ScrollViewBringIntoViewOperation
  • m_cancelCurrentPressStateContinuation : RevealHoverLight
  • m_candidates : ItemsRepeaterScrollHost
  • m_changed : ObservableVector< T >
  • m_changeViewToVerticalOffsetWithAnimationCorrelationId : VariableSizedItemsPage
  • m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId : VariableSizedItemsPage
  • m_checkedEventSource : InkToolBarFlyoutItemProperties
  • m_childrenNodes : final
  • m_childrenRequestedEventSource : SelectionModelProperties
  • m_clickEventSource : SplitButtonProperties
  • m_closeButtonClickEventSource : InfoBarProperties , TeachingTipProperties
  • m_closedEventsFired : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • m_closedEventSource : InfoBarProperties , TeachingTipProperties
  • m_closeRequestedEventSource : TabViewItemProperties
  • m_closingEventsFired : NavigationViewPage , NavigationViewRS4Page , NavigationViewTopNavPage
  • m_closingEventSource : InfoBarProperties , TeachingTipProperties
  • m_cMethods : CMethodProfileGroup< size >
  • m_collapsedEventSource : ExpanderProperties , NavigationViewProperties , TreeViewProperties
  • m_collectionAdd : XamlTypeBase
  • m_collectionChangedEventSource : ItemsSourceViewProperties
  • m_collectionChangedEventTokenVector : ViewModel
  • m_colorChangedEventSource : ColorPickerProperties , ColorSpectrumProperties
  • m_columnOffsets : PinterestLayout
  • m_componentTypes : ItemsViewTestsWithInputHelper::LoggingHelper
  • m_compositionDevice : ThreadData
  • m_compositionTarget : InkCanvas::TargetData
  • m_contentLayoutOffsetXChangedEventSource : ScrollPresenterTestHooks
  • m_contentLayoutOffsetYChangedEventSource : ScrollPresenterTestHooks
  • m_contentProperty : XamlTypeBase
  • m_context : FlowLayoutAlgorithm , VirtualLayoutContextAdapter::ChildrenCollection< T >
  • m_controller : DesktopAcrylicBackdrop::ControllerEntry , MicaBackdrop::ControllerEntry
  • m_controllers : DesktopAcrylicBackdrop , MicaBackdrop
  • m_coreMoveFocusRequestedRevoker : WebView2
  • m_coreNavigationCompletedRevoker : WebView2
  • m_coreNavigationStartingRevoker : WebView2
  • m_coreProcessFailedEventSource : WebView2Properties
  • m_coreProcessFailedRevoker : WebView2
  • m_coreSourceChangedRevoker : WebView2
  • m_coreWebMessageReceivedRevoker : WebView2
  • m_coreWebView2InitializedEventSource : WebView2Properties
  • m_Counts : CMethodProfileGroup< size >
  • m_createAnimationsCounter : AnimatedVisualPlayer
  • m_createFromString : XamlTypeBase
  • m_currentIndex : SelectedItems< T >::Iterator , VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator
  • m_cursorChangedRevoker : WebView2
  • m_data : WinRTCollection , VirtualizationInfo
  • m_dataChangeCallback : TopNavigationViewDataProvider
  • m_dataSource : TopNavigationViewDataProvider , final
  • m_dataTemplateComponent : VirtualizationInfo
  • m_detailLabelRequestedEventSource : AnnotatedScrollBarProperties
  • m_diagnosticMessage : MapControlMapServiceErrorOccurredEventArgs
  • m_dictionary : Bridge
  • m_displayModeChangedEventSource : NavigationViewProperties
  • m_dragItemsCompletedEventSource : TreeViewProperties
  • m_dragItemsStartingEventArgs : TreeViewDragItemsStartingEventArgs
  • m_dragItemsStartingEventSource : TreeViewProperties
  • m_dropDownClosedRevoker : ComboBoxDropDownEventRevokers
  • m_dropDownOpenedRevoker : ComboBoxDropDownEventRevokers
  • m_dropTargetDropEffectString : TreeViewList
  • m_effectiveHeroContentPlacementChangedEventSource : TeachingTipTestHooks
  • m_effectivePlacementChangedEventSource : TeachingTipTestHooks
  • m_element : MapElementClickEventArgs , ItemsRepeaterScrollHost::CandidateInfo , RecyclePool::ElementInfo
  • m_elementAvailableWidths : LinedFlowLayout
  • m_elementClearingEventSource : ItemsRepeaterProperties
  • m_elementDesiredWidths : LinedFlowLayout
  • m_ElementFactoryGetArgs : final
  • m_ElementFactoryRecycleArgs : final
  • m_elementIds : MapElementsLayer
  • m_elementIndexChangedEventSource : ItemsRepeaterProperties
  • m_elementManager : FlowLayoutAlgorithm
  • m_elementMap : final
  • m_elementPreparedEventSource : ItemsRepeaterProperties
  • m_elementRect : BringIntoViewOffsetsChange
  • m_elements : RecyclePool
  • m_end : IndexRange
  • m_eraseAllClickedEventSource : InkToolBarProperties
  • m_eraserFlyoutItemClickedEventSource : InkToolBarProperties
  • m_estimationBuffer : VirtualizingStackLayout
  • m_eventName : PerfXamlEvent_RAII
  • m_expandingEventSource : ExpanderProperties , NavigationViewProperties , TreeViewProperties
  • m_expectedMutationCount : HashMap< K, V >::Iterator
  • m_expectNullSelectedItemInNextInvoke : NavigationViewTopNavOnlyPage
  • m_expressionAnimationStatusChangedEventSource : ScrollPresenterTestHooks
  • m_expressionAnimationStatusChanges : ScrollPresenterTestHooksHelper
  • m_extentChangedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_extentHeight : VariableSizedItemsPage
  • m_externalTornOutTabsDroppedEventSource : TabViewProperties
  • m_externalTornOutTabsDroppingEventSource : TabViewProperties
  • m_firstIndex : PinterestLayout
  • m_firstRealizedDataIndex : VirtualizingStackLayout
  • m_focusVisualKind : NavigationViewPage
  • m_footerItems : NavigationViewInitPage
  • m_frequency : final
  • m_func : GenericInkCallback
  • m_getAtImpl : SelectedItems< T >
  • m_getter : CustomProperty
  • m_gettingFocusRevoker : WebView2
  • m_gotFocusRevoker : WebView2
  • m_group : CMethodProfileGroup< size >
  • m_handle : AutoHandle< THandlePolicy >
  • m_handlers : event_base< ImplT, T, StorageT >
  • m_hasPointerCapture : TabViewItem
  • m_hasUnrealizedChildren : TreeViewItemSource
  • m_hmodDComp : ThreadData
  • m_horizontalAlignmentRatio : BringIntoViewOffsetsChange
  • m_horizontalOffset : BringIntoViewOffsetsChange
  • m_horizontalScroller : ViewportManagerDownLevel
  • m_hostHwnd : InkCanvas
  • m_hsvValues : ColorSpectrum
  • m_hwnd : InkCanvas::TargetData
  • m_iconPresenter : AnimatedIconHost , ToggleAnimatedIconHost
  • m_idleStatusChangedEventSource : SwipeTestHooks , TeachingTipTestHooks
  • m_index : VectorChangedEventArgs , ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator , ItemsRepeaterElementPreparedEventArgs
  • m_infoChangedFunction : ScrollInputHelper
  • m_infos : SelectedItems< T >
  • m_initializeComponentComplete : NavigationViewTopNavPage
  • m_inkDrawingAttributesChangedEventSource : InkToolBarProperties
  • m_inkHost : ThreadData
  • m_inkRootVisual : InkCanvas
  • m_inner : ObservableVector< T >::Iterator
  • m_innerChangedRevoker : ObservableVector< T >
  • m_innerScrollableScroller : ViewportManagerDownLevel
  • m_inputActivationListener : TitleBar
  • m_instanceLoggingLevels : MUXControlsTestHooks
  • m_interactionRatioCompositionProperty : RefreshInfoProviderImpl
  • m_interactionSources : ScrollPresenterTestHooksHelper
  • m_interactionSourcesChangedEventSource : ScrollPresenterTestHooks
  • m_interactionTrackerAsyncOperations : ScrollPresenter
  • m_invalidationTrigger : LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
  • m_invokedEventSource : ButtonInteractionProperties , SwipeItemProperties
  • m_invokeFunction : CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >
  • m_isBeingDragged : TabViewItem
  • m_isBindable : XamlTypeBase
  • m_isCheckedChangedEventSource : ToggleSplitButtonProperties
  • m_isCheckingforDrag : TabViewItem
  • m_isExpanded : TreeViewItemSource
  • m_IsExpandedChangedEventTokenVector : ViewModel
  • m_isExplicitControllerOptions : WebView2
  • m_isExplicitEnvironment : WebView2
  • m_isInteresting : PerfXamlEvent_RAII
  • m_isMiddlePointerButtonPressed : TabViewItem
  • m_isPointerOver : ColorSpectrum , TabViewItem
  • m_isPointerPressed : ColorSpectrum
  • m_isSelected : TreeViewItemSource
  • m_isSettingToggleButtonState : TextCommandBarFlyout
  • m_isStencilButtonCheckedChangedEventSource : InkToolBarProperties
  • m_isSystemType : XamlTypeBase
  • m_itemClickedEventSource : BreadcrumbBarProperties
  • m_itemContainersPointerInfos : ItemsView
  • m_itemContainersWithRevokers : ItemsView
  • m_itemIndex : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • m_itemInvokedEventSource : ItemContainerProperties , ItemsViewProperties , NavigationViewProperties , TreeViewProperties
  • m_items : TabViewTabTearOutWindowRequestedEventArgs , TabViewTabTearOutRequestedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs , TabViewExternalTornOutTabsDroppedEventArgs
  • m_itemsInfoArrangeWidths : LinedFlowLayout
  • m_itemsInfoDesiredAspectRatiosForRegularPath : LinedFlowLayout
  • m_itemsInfoMaxWidthsForRegularPath : LinedFlowLayout
  • m_itemsInfoMinWidthsForRegularPath : LinedFlowLayout
  • m_itemsInfoRequestedEventSource : LinedFlowLayoutProperties
  • m_itemsUnlockedEventSource : LinedFlowLayoutProperties
  • m_itemsWithRevokerObjects : NavigationView
  • m_iterator : HashMap< K, V >::Iterator
  • m_keepAliveTimersMap : ItemCollectionTransitionProvider
  • m_keyboardNavigationReferenceOffsetChangedEventSource : ItemsViewTestHooks
  • m_keyDownRevoker : WebView2
  • m_lastAnimationSegmentChangedEventSource : AnimatedIconTestHooks
  • m_lastAvailableWidth : PinterestLayout
  • m_lastExtent : VirtualizingStackLayout
  • m_lastFocusedElement : final
  • m_lastIndex : PinterestLayout
  • m_lastInteractedWithSwipeControlChangedEventSource : SwipeTestHooks
  • m_lastNumberOfPagesCount : PagerControl
  • m_lastSelectedPageIndex : PagerControl
  • m_layoutChangedEventSource : ColumnMajorUniformToLargestGridLayout , RadioButtonsTestHooks
  • m_layoutId : Layout
  • m_layoutInfo : CachedVisualTreeHelpers
  • m_layoutUpdatedRevoker : InkCanvas
  • m_leafNode : SelectionModel
  • m_linedFlowLayoutInvalidatedEventSource : LayoutsTestHooks
  • m_linedFlowLayoutItemLockedEventSource : LayoutsTestHooks
  • m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource : LayoutsTestHooks
  • m_lineIndex : LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
  • m_lineItemCounts : LinedFlowLayout
  • m_loaded : RadioButtonsPage
  • m_location : MapElementClickEventArgs
  • m_lockedItemIndexes : LinedFlowLayout
  • m_loggingMessageEventSource : MUXControlsTestHooks
  • m_losingFocusRevoker : WebView2
  • m_makeAnchorElement : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel
  • m_manager : final
  • m_map : HashMap< K, V >
  • m_mapElementClickEventSource : MapElementsLayerProperties , MapControlProperties
  • m_mapServiceErrorOccurredEventSource : MapControlProperties
  • m_materialHelper : LifetimeHandler
  • m_measureInvalidatedEventSource : LayoutProperties
  • m_members : XamlTypeBase
  • m_menuBar : MenuBarItem
  • m_menuItems : NavigationViewInitPage , NavigationViewTopNavStorePage
  • m_menuItemsEnumerable : NavigationViewInitPage
  • m_modeChangedEventSource : TwoPaneViewProperties
  • m_mutationCount : HashMap< K, V >
  • m_mutex : MutexLockedResource< T >
  • m_Name : EffectBase
  • m_navigationCompletedEventSource : WebView2Properties
  • m_navigationKeysToProcess : ItemsView
  • m_navigationStartingEventSource : WebView2Properties
  • m_newFooterItemIndex : NavigationViewTopNavPage , NavigationViewPage
  • m_newIndex : ItemsRepeaterElementIndexChangedEventArgs
  • m_newItemIndex : NavigationViewPage , NavigationViewTopNavPage , NavigationViewRS4Page
  • m_newPageIndex : PagerControlSelectedIndexChangedEventArgs
  • m_newParentItem : TreeViewDragItemsCompletedEventArgs
  • m_newValue : NumberBoxValueChangedEventArgs
  • m_noiseChangedListeners : MaterialHelper
  • m_numberOfItemAdded : NavigationViewTopNavOnlyPage
  • m_numItemsUsedForEstimation : VirtualizingStackLayout
  • m_object : RoutedEventHandler_revoker , PropertyChanged_revoker
  • m_objectPointer : PerfXamlEvent_RAII , SimpleXamlStartStopEvent_RAII
  • m_offsetChangedEventSource : TeachingTipTestHooks
  • m_oldIndex : ItemsRepeaterElementIndexChangedEventArgs
  • m_oldValue : NumberBoxValueChangedEventArgs
  • m_openedStatusChangedEventSource : SwipeTestHooks , TeachingTipTestHooks
  • m_optimizedIndexOf_StartNextSearchAt : VectorInnerImpl< VectorOptions, Wrapper >
  • m_owner : AnimatedVisualPlayer::final , ItemsViewTestsWithInputHelper::LoggingHelper , LayoutPanelLayoutContext , NavigationViewItemHelper< T > , ScrollInputHelper , final , RecyclePool::ElementInfo , RepeaterLayoutContext , final , ScrollViewTestsWithInputHelper::LoggingHelper , BringIntoViewOffsetsChange , FlowLayoutAlgorithm
  • m_paneClosedEventSource : NavigationViewProperties
  • m_paneClosingEventSource : NavigationViewProperties
  • m_paneOpenedEventSource : NavigationViewProperties
  • m_paneOpeningEventSource : NavigationViewProperties
  • m_paneToggleRequestedEventSource : TitleBarProperties
  • m_parentScrollers : ViewportManagerDownLevel
  • m_passThroughElement : MenuBarItem
  • m_path : IndexPath
  • m_pendingWork : final
  • m_phaser : final
  • m_pinnedElement : final::PinnedElementInfo
  • m_pinnedPool : final
  • m_pointerCanceledRevoker : WebView2
  • m_pointerCaptureLostRevoker : WebView2
  • m_pointerEnteredRevoker : WebView2
  • m_pointerExitedRevoker : WebView2
  • m_pointerMovedRevoker : WebView2
  • m_pointerPressedRevoker : WebView2
  • m_pointerReleasedRevoker : WebView2
  • m_pointerWheelChangedRevoker : WebView2
  • m_policyChangedListeners : MaterialHelper
  • m_popupClosedRevoker : AutoSuggestEventRevokers
  • m_popupOpenedRevoker : AutoSuggestEventRevokers
  • m_postArrangeToken : ViewportManagerDownLevel
  • m_preparedAndArrangedElements : ViewportManagerWithPlatformFeatures
  • m_preparedElements : ViewportManagerWithPlatformFeatures
  • m_previousPageIndex : PagerControlSelectedIndexChangedEventArgs
  • m_priority : WorkInfo
  • m_proofingMenuItemClickRevokers : TextCommandBarFlyout
  • m_proofingMenuToggleItemClickRevokers : TextCommandBarFlyout
  • m_propertyChangedEventSource : SelectionModelProperties , SliderInteractionProperties , ButtonInteractionProperties
  • m_propertyChangedRevokersByIndexMap : CommandBarFlyout
  • m_provider : WebView2AutomationPeer
  • m_radioButtonItemCollection : RadioButtonsPage
  • m_rawDataSource : TopNavigationViewDataProvider
  • m_rawPixelsPerViewPixel : OrientationBasedMeasures
  • m_realizedChildren : ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator
  • m_realizedElementBounds : VirtualizingStackLayout
  • m_realizedElementLayoutBounds : final
  • m_realizedElements : final
  • m_refreshPullDirection : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
  • m_refreshRequestedEventSource : RefreshContainerProperties , RefreshVisualizerProperties
  • m_refreshStateChangedEventSource : RefreshVisualizerProperties
  • m_removedSelectedItems : ViewModel
  • m_renderingToken : final
  • m_resetPool : final
  • m_resource : MutexLockedResource< T >
  • m_resourceManagerWinRT : sealed< T, fallback, RawStorageT >
  • m_revealBrushCompositionEffectFactoryCache : MaterialHelperBase
  • m_revealLightsToRemove : MaterialHelperBase
  • m_rootNodeChildrenChangedEventToken : ViewModel
  • m_scrollAnimationStartingEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_scrollBar : ScrollBarController
  • m_scrollCompletedEventSource : ScrollPresenterProperties , ScrollViewProperties
  • m_scroller : ViewportManagerWithPlatformFeatures , ViewportManagerDownLevel::ScrollerInfo
  • m_scrollingEventKind : AnnotatedScrollBarScrollingEventArgs
  • m_scrollingEventSource : AnnotatedScrollBarProperties
  • m_scrollStartingEventSource : ScrollViewProperties , ScrollPresenterProperties
  • m_scrollViewVisualStateCounts : ScrollViewTests
  • m_secondaryButtonClickRevokerByIndexMap : CommandBarFlyout
  • m_secondaryToggleButtonCheckedRevokerByIndexMap : CommandBarFlyout
  • m_secondaryToggleButtonUncheckedRevokerByIndexMap : CommandBarFlyout
  • m_selected : final
  • m_selectedIndexChangedEventSource : PipsPagerProperties , PagerControlProperties
  • m_selectedIndicesCached : final
  • m_selectedIndicesCacheIsValid : final
  • m_selectedNodeChildrenChangedEventTokenVector : ViewModel
  • m_selectionChangedEventSource : TabViewProperties , TreeViewProperties , SelectionModelProperties , NavigationViewProperties , RadioButtonsProperties , ItemsViewProperties , SelectorBarProperties
  • m_selector : ItemsView
  • m_selectTemplateKeyEventSource : RecyclingElementFactoryProperties
  • m_setter : CustomProperty
  • m_shouldShowLargeSelection : ColorSpectrum
  • m_signal : Awaitable
  • m_sizeChanged_revoker : InkCanvas
  • m_sizeChangedRevoker : WebView2
  • m_snapPoint : SnapPointWrapper< T >
  • m_source : final
  • m_start : final
  • m_stateChangedEventSource : ScrollViewProperties , ScrollPresenterProperties
  • m_stringItemCollection : RadioButtonsPage
  • m_subtitleVisibilityChangedEventSource : TeachingTipTestHooks
  • m_swipeControl : SwipeItemInvokedEventArgs
  • m_systemVisualBridge : WebView2
  • m_tabCloseRequestedEventSource : TabViewProperties
  • m_tabDragCompletedEventSource : TabViewProperties
  • m_tabDragStartingEventSource : TabViewProperties
  • m_tabDroppedOutsideEventSource : TabViewProperties
  • m_tabItemsChangedEventSource : TabViewProperties
  • m_tabs : TabViewTabTearOutWindowRequestedEventArgs , TabViewExternalTornOutTabsDroppingEventArgs , TabViewExternalTornOutTabsDroppedEventArgs , TabViewTabTearOutRequestedEventArgs
  • m_tabStripDragOverEventSource : TabViewProperties
  • m_tabStripDropEventSource : TabViewProperties
  • m_tabTearOutRequestedEventSource : TabViewProperties
  • m_tabTearOutWindowRequestedEventSource : TabViewProperties
  • m_tabViewBoundsTuples : TabView
  • m_target : MicaBackdrop::ControllerEntry , DesktopAcrylicBackdrop::ControllerEntry
  • m_targetData : InkCanvas
  • m_targetElement : ScrollViewBringIntoViewOperation , ItemsRepeaterScrollHost::BringIntoViewState
  • m_targetRootVisual : InkCanvas::TargetData
  • m_TargetUnloadedRevoker : TeachingTip
  • m_testTreeViewItemsSource : TreeViewLateDataInitTest
  • m_threadData : InkCanvas
  • m_timer : final
  • m_titleVisibilityChangedEventSource : TeachingTipTestHooks
  • m_tlsMap : InkCanvas::TargetData
  • m_toggleButtonCheckedRevokers : TextCommandBarFlyout
  • m_toggleButtonUncheckedRevokers : TextCommandBarFlyout
  • m_totalHeightForEstimation : VirtualizingStackLayout
  • m_trackScrollViewStateChanges : ScrollViewTests
  • m_transitionCompletedEventSource : ItemCollectionTransitionProviderProperties
  • m_transitionProvider : final
  • m_transitionsMap : ItemCollectionTransitionProvider
  • m_transitionsWithAnimationsMap : ItemCollectionTransitionProvider
  • m_transitionTextBlock : AnimatedIconHost , ToggleAnimatedIconHost
  • m_typeLoggingLevels : MUXControlsTestHooks
  • m_typeName : XamlTypeBase
  • m_uiSettings : WebView2
  • m_uncheckedEventSource : InkToolBarFlyoutItemProperties
  • m_uniqueId : VirtualizationInfo
  • m_updatingColor : ColorSpectrum
  • m_updatingHsvColor : ColorSpectrum
  • m_useFocusVisualKindReveal : NavigationViewPage
  • m_useLayoutRounding : OrientationBasedMeasures
  • m_value : auto_unbox , auto_cast
  • m_valueChangedEventSource : NumberBoxProperties , RatingControlProperties
  • m_vector : SplitVector< T, SplitVectorID > , VectorInnerImpl< VectorOptions, Wrapper >
  • m_vectorID : SplitVector< T, SplitVectorID >
  • m_verticalAlignmentRatio : BringIntoViewOffsetsChange
  • m_verticalOffset : BringIntoViewOffsetsChange
  • m_verticalScroller : ViewportManagerDownLevel
  • m_viewChangeBase : InteractionTrackerAsyncOperation
  • m_viewChangedEventSource : ScrollViewProperties , ScrollPresenterProperties
  • m_viewType : ItemsRepeaterElementPreparedEventArgs
  • m_virtInfo : final::PinnedElementInfo
  • m_visibilityChangedRevoker : MaterialHelper
  • m_visualTreeHelper : CachedVisualTreeHelpers
  • m_wait : Awaitable
  • m_webMessageReceivedEventSource : WebView2Properties
  • m_workFunc : WorkInfo
  • m_xamlBindingHelperStatics : CachedVisualTreeHelpers
  • m_zoomAnimationStartingEventSource : ScrollViewProperties , ScrollPresenterProperties
  • m_zoomCompletedEventSource : ScrollViewProperties , ScrollPresenterProperties
  • m_zoomStartingEventSource : ScrollPresenterProperties , ScrollViewProperties
  • Mapping : EffectBase::NamedProperty
  • Markers : MockIAnimatedIconSource2 , BrightnessSun , MockAnimatedIconSource
  • markers : MockIAnimatedIconSource2
  • Markers : LottieLogo
  • markers : MockAnimatedIconSource
  • MaterialHelper : AcrylicBrush , XamlAmbientLight , RevealBrush , RevealHoverLight , RevealBorderLight
  • MaterialHelperBase : XamlAmbientLight , RevealHoverLight , RevealBorderLight
  • MaxColumnsTextBlock : RadioButtonsTestPageElements
  • maxDepth : BreadcrumbBarPage
  • maxOffset : CompositionScrollControllerPanningInfo , CompositionScrollController
  • maxOffsetPropertyName : CompositionScrollControllerPanningInfo
  • MaxVisualIndicatorsComboBox : PipsPagerElements
  • menuItems : PaneLayoutTestPage
  • MessageLog : WebView2Common
  • minimal : NavigationViewTestsBase
  • MinItemSizeProperty : ActivityFeedLayout
  • minOffset : CompositionScrollControllerPanningInfo , CompositionScrollController
  • minOffsetPropertyName : CompositionScrollControllerPanningInfo
  • MinRowSpacing : PipsPagerExamples
  • miscellaneousGridViewSource : CommonStylesPage
  • Mode : SelectionModeItem
  • moreButton : ColorPickerPage
  • MoreButtonAutomationId : ColorPickerTests
  • MoreButtonLabelAutomationId : ColorPickerTests
  • mouseWheelDeltaForVelocityUnit : ScrollPresenterTestsWithInputHelper
  • multiplierPropertyName : CompositionScrollControllerPanningInfo
  • myAcrylicBrush : AcrylicBrushBasicPage
  • myDatas : TabViewTabItemsSourcePage
  • myList : InspectingDataSourceTests::CustomEnumerable
  • mySlider : SliderRefreshInfoProviderAdapter
  • myTimer : SliderRefreshInfoProviderAdapter
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- n -

  • Name : EffectBase::NamedProperty , RevealBackgroundItem , SelectionModeItem , RevealThemeItem , RevealGridTypeItem
  • NaN : DoubleUtil , FloatUtil
  • navigationViewItemPool : NavigationViewItemsFactory
  • nestingLevel : CustomContent
  • nextIndex : HierarchicalNavigationViewDataBinding
  • NextPageButton : PagerControlTestPageElements , PipsPagerElements
  • nextPageButton : PagerControlPage , PipsPagerPage
  • NextPageButtonIsEnabledCheckBox : PipsPagerElements , PagerControlTestPageElements
  • NextPageButtonIsVisibleCheckBox : PipsPagerElements
  • NextPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • NextPageButtonVisibilityComboBox : PagerControlTestPageElements , PipsPagerElements
  • Node : SelectedItemInfo , SelectionTreeHelper::TreeWalkNodeInfo
  • NoTrackRef : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • nullptr : RoutedEventHandler_revoker
  • number : MyData
  • NumberBoxIsEnabledCheckBox : PagerControlTestPageElements
  • NumberBoxVisibilityCheckBox : PagerControlTestPageElements
  • NumberOfItemsTextBlock : RadioButtonsTestPageElements
  • NumberOfPagesComboBox : PipsPagerElements
  • NumberOfPagesSetterButton : PagerControlTestPageElements
  • NumberOfPagesTextBlock : PagerControlTestPageElements
  • NumberPanelContentTextBlock : PagerControlTestPageElements
  • NumberPanelVisibilityCheckBox : PagerControlTestPageElements
  • NumberProperty : DisposableUserControl
  • Numbers : ListViewElementNameBindingPage , ItemTemplateDemo
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- o -

  • objects : ScrollViewerAdapterPage
  • Observable : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • offset : CompositionScrollController
  • offsetCoordinateTolerance : RevealStatesPage
  • offsetPropertyName : CompositionScrollControllerPanningInfo
  • offsetTarget : CompositionScrollController
  • OffsetTarget : BiDirectionalScrollController::OperationInfo , CompositionScrollController::OperationInfo
  • OnRefreshCompletedCalls : RefreshInfoProviderImpl
  • OnRefreshStartedCalls : RefreshInfoProviderImpl
  • openButton : TeachingTipFocusTestPageElements
  • operationCount : ScrollPresenterStackPanelAnchoringPage
  • operations : BiDirectionalScrollController , CompositionScrollController
  • operationsCount : ScrollBarController
  • orangeBrush : ScrollPresenterStackPanelAnchoringPage
  • orientation : CompositionScrollController
  • OrientationComboBox : PipsPagerElements
  • originalLabelSecondaryCommand : CommandBarFlyoutPage
  • originalVisibilitySecondaryCommand : CommandBarFlyoutPage
  • originalWidthOverflowContentRoot : CommandBarFlyoutPage
  • originatingTabViewIdentifier : MultipleTabViewPage
  • OuterAngleScale : RevealHoverSpotlightStateDesc , RevealBorderSpotlightStateDesc
  • OuterConeAngleInDegrees : RevealBorderSpotlightStateDesc
  • OuterConeColor : RevealHoverSpotlightStateDesc , RevealBorderSpotlightStateDesc
  • OuterConeIntensity : RevealHoverSpotlightStateDesc
  • OverlayCornerRadiusProperty : CornerRadiusPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- z -

  • zoomStartingCount : ScrollPresenterTests
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- a -

  • accent : RevealSimpleListPage
  • accentColor : RevealSimpleListPage
  • AcrylicRectangleName : RevealBrushTests , AcrylicBrushTests
  • AcrylicTestApi : AcrylicBrush
  • actionButtonContentComboBox : TeachingTipTestPageElements
  • activeTabContentBackgroundBrushCache : TabViewPage
  • activeTabSelectedBackgroundPathBrushCache : TabViewPage
  • adapter : AnnotatedScrollBarRangeBasePage
  • adapterTimer : RefreshVisualizerPage
  • addFlyoutTimer : CommandBarFlyoutPage
  • AlignContentProperty : Flex
  • AlignItemsProperty : Flex
  • AlignSelfProperty : Flex
  • AllTypes : SortingAndFilteringPage
  • alphaEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • AlphaLabelAutomationId : ColorPickerTests
  • AlphaSliderAutomationId : ColorPickerTests
  • AlphaTextBoxAutomationId : ColorPickerTests
  • anchorElement : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • angleInRadiansTolerance : RevealStatesPage
  • animatedCommandBarFlyoutCommandBarStyle : CommandBarFlyoutPage
  • animatedSwipe : SwipeControlPage
  • AnimatedVisualInvalidated : IAnimatedVisualSource
  • animationHandler : ImageIRefreshInfoProviderAdapter
  • APPROXIMATE_MARGIN : RatingControlTests
  • aspectRatios : ItemsViewPictureLibraryPage
  • asyncEventReportingLock : ScrollViewBlankPage , ItemsViewBlankPage , ScrollPresenterBringIntoViewPage , ScrollBarController , ScrollPresenterStackPanelAnchoringPage , ScrollPresenterRepeaterAnchoringPage , ScrollViewWithScrollControllersPage , ScrollPresenterDynamicPage , ScrollViewKeyboardAndGamepadNavigationPage , ImagePage , SwipeControlPage , ScrollViewDynamicPage , ScrollViewBringIntoViewPage
  • AutoDisplayModeThresholdValue : PagerControlTestBase
  • automationNameComboBox : TeachingTipTestPageElements
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- b -

  • backgroundColorCache : TabViewPage
  • BackgroundColorCounter : RefreshVisualizerPage
  • backgroundTypeSource : RevealScenarioList , RevealScenarioGrid
  • backRequestedCount : TitleBarPageWindow
  • biDecrementRepeatButton : BiDirectionalScrollController
  • biIncrementRepeatButton : BiDirectionalScrollController
  • Bindable : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • blanchedAlmondBrush : ScrollPresenterStackPanelAnchoringPage
  • blueEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • BlueLabelAutomationId : ColorPickerTests
  • blueOrValueChangedWaiter : ColorChangedEventWaiter
  • BlueTextBoxAutomationId : ColorPickerTests
  • border : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • BorderWidthTextBox : RadioButtonsTestPageElements
  • Bottom : WebView2RenderingVerifier::NativeMethods::RECT
  • bringTargetIntoViewButton : TeachingTipTestPageElements
  • btnAddMISnapPointUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • btnAddMRSnapPointUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • btnClearTeachingTipEvents : TeachingTipTestPageElements
  • BufferSize : FlowLayoutState , StackLayoutState
  • button : ScrollViewDynamicPage , ScrollViewerPage , ScrollPresenterDynamicPage
  • ButtonListPreviousOffset : PipsPagerExamples
Generated on Sun Dec 1 2024 20:52:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- c -

  • c1 : AcrylicRenderingPage::SampledColors
  • c2 : AcrylicRenderingPage::SampledColors
  • c3 : AcrylicRenderingPage::SampledColors
  • c4 : AcrylicRenderingPage::SampledColors
  • c_assetLoc : sealed< T, fallback, RawStorageT >
  • c_controlMargin : TwoPaneViewPage
  • c_controlMargin_bottom : TwoPaneViewTests
  • c_controlMargin_left : TwoPaneViewTests
  • c_controlMargin_right : TwoPaneViewTests
  • c_controlMargin_top : TwoPaneViewTests
  • c_defaultAnchoringUIRepeaterChildrenCount : ScrollPresenterTests
  • c_defaultAnchoringUIScrollPresenterConstrainedSize : ScrollPresenterTests
  • c_defaultAnchoringUIScrollPresenterNonConstrainedSize : ScrollPresenterTests
  • c_defaultAnchoringUIStackPanelChildrenCount : ScrollPresenterTests
  • c_defaultAnchorRatio : ScrollViewTests , ScrollPresenterTests
  • c_defaultBringIntoViewUIScrollPresenterConstrainedSize : ScrollPresenterTests
  • c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize : ScrollPresenterTests
  • c_defaultBringIntoViewUIStackPanelChildrenCount : ScrollPresenterTests
  • c_defaultComputedHorizontalScrollMode : ScrollViewTests
  • c_defaultComputedVerticalScrollMode : ScrollViewTests
  • c_defaultContentOrientation : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalOffset : ScrollPresenterTests
  • c_defaultHorizontalScrollChainMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalScrollMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalScrollRailMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultHorizontalShift : ParallaxViewTests
  • c_defaultHorizontalSourceEndOffset : ParallaxViewTests
  • c_defaultHorizontalSourceOffsetKind : ParallaxViewTests
  • c_defaultHorizontalSourceStartOffset : ParallaxViewTests
  • c_defaultIgnoredInputKinds : ScrollPresenterTests , ScrollViewTests
  • c_defaultIsHorizontalShiftClamped : ParallaxViewTests
  • c_defaultIsVerticalShiftClamped : ParallaxViewTests
  • c_defaultMaxHorizontalShiftRatio : ParallaxViewTests
  • c_defaultMaxVerticalShiftRatio : ParallaxViewTests
  • c_defaultMaxZoomFactor : ScrollPresenterTests , ScrollViewTests
  • c_defaultMinTallModeHeight : TwoPaneViewTests , TwoPaneViewPage
  • c_defaultMinWideModeWidth : TwoPaneViewTests , TwoPaneViewPage
  • c_defaultMinZoomFactor : ScrollPresenterTests , ScrollViewTests
  • c_defaultOffsetResultTolerance : ScrollPresenterTests
  • c_defaultState : ScrollPresenterTests
  • c_defaultUIFinalScrollPresenterHorizontalOffset : ParallaxViewTests
  • c_defaultUIFinalScrollPresenterVerticalOffset : ParallaxViewTests
  • c_defaultUIFinalScrollViewerHorizontalOffset : ParallaxViewTests
  • c_defaultUIFinalScrollViewerVerticalOffset : ParallaxViewTests
  • c_defaultUIHorizontalShift : ParallaxViewTests
  • c_defaultUIItemsViewHeight : ItemsViewTests
  • c_defaultUIItemsViewWidth : ItemsViewTests
  • c_defaultUIScrollControllerThickness : ScrollPresenterTests
  • c_defaultUIScrollPresenterContentHeight : ParallaxViewTests , ScrollPresenterTests
  • c_defaultUIScrollPresenterContentWidth : ScrollPresenterTests , ParallaxViewTests
  • c_defaultUIScrollPresenterHeight : ParallaxViewTests , ScrollPresenterTests
  • c_defaultUIScrollPresenterWidth : ParallaxViewTests , ScrollPresenterTests
  • c_defaultUIScrollViewContentHeight : ScrollViewTests
  • c_defaultUIScrollViewContentWidth : ScrollViewTests
  • c_defaultUIScrollViewerContentHeight : ParallaxViewTests
  • c_defaultUIScrollViewerContentWidth : ParallaxViewTests
  • c_defaultUIScrollViewerHeight : ParallaxViewTests
  • c_defaultUIScrollViewerWidth : ParallaxViewTests
  • c_defaultUIScrollViewHeight : ScrollViewTests
  • c_defaultUIScrollViewWidth : ScrollViewTests
  • c_defaultUISelectorBarParentHeight : SelectorBarTests
  • c_defaultUISelectorBarParentWidth : SelectorBarTests
  • c_defaultUIVerticalShift : ParallaxViewTests
  • c_defaultVerticalOffset : ScrollPresenterTests
  • c_defaultVerticalScrollChainMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultVerticalScrollMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultVerticalScrollRailMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultVerticalShift : ParallaxViewTests
  • c_defaultVerticalSourceEndOffset : ParallaxViewTests
  • c_defaultVerticalSourceOffsetKind : ParallaxViewTests
  • c_defaultVerticalSourceStartOffset : ParallaxViewTests
  • c_defaultZoomChainMode : ScrollPresenterTests , ScrollViewTests
  • c_defaultZoomFactor : ScrollPresenterTests
  • c_defaultZoomMode : ScrollPresenterTests , ScrollViewTests
  • c_durationTicks : BrightnessSun , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo , LottieLogo::LottieLogo_AnimatedVisual , ProgressRingDeterminate::AnimatedVisual
  • c_epsilon : ScrollViewTests
  • c_expandCollapseChevronName : TreeViewItem
  • c_expressionAnimationSourcesExtentPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesMaxPositionPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesMinPositionPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesOffsetPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesPositionPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesViewportPropertyName : ScrollPresenterTests
  • c_expressionAnimationSourcesZoomFactorPropertyName : ScrollPresenterTests
  • c_hoverLight_OuterConeAngle_Expected : RevealStatesPage
  • c_itemIndentation : NavigationViewItemBase
  • c_MaxStockOffsetsChangeDuration : ScrollPresenterTests
  • c_MaxStockZoomFactorChangeDuration : ScrollPresenterTests
  • c_MaxWaitDuration : SelectorBarTests , ItemsViewTests , ParallaxViewTests , RefreshVisualizerTests , ScrollPresenterTests , ScrollViewTests
  • c_multiSelectCheckBoxName : TreeViewItem
  • c_overlayCornerRadiusKey : TabViewItem
  • c_resourceLoc : sealed< T, fallback, RawStorageT >
  • c_resourceLocWinUI : sealed< T, fallback, RawStorageT >
  • c_scrollPresenterMaxOverpanRatio : ParallaxViewTests
  • c_scrollViewerMaxOverpanRatio : ParallaxViewTests
  • c_scrollViewerMaxOverpanRatioWithZoom : ParallaxViewTests
  • c_selectionIndicatorName : NavigationViewItemHelper< T >
  • c_shiftTolerance : ParallaxViewTests
  • c_simulatedMiddle : TwoPaneViewTests , TwoPaneViewPage
  • c_simulatedPaneHeight : TwoPaneViewTests , TwoPaneViewPage
  • c_simulatedPaneWidth : TwoPaneViewTests , TwoPaneViewPage
  • c_SquareWidth : AnnotatedScrollBarIScrollControllerPage
  • c_targetRectWidthIncrement : TabViewItem
  • c_visualHorizontalOffsetTargetedPropertyName : ScrollPresenterTests
  • c_visualScaleTargetedPropertyName : ScrollPresenterTests
  • c_visualVerticalOffsetTargetedPropertyName : ScrollPresenterTests
  • canScrollPresenter51ContentShrink : ScrollPresentersWithSimpleContentsPage
  • canvas : CanvasScrollControllerConsumer
  • canvasScrollControllerConsumer : ScrollPresenterWithSimpleScrollControllersPage
  • categories : HierarchicalNavigationViewDataBinding
  • categories11 : HierarchicalNavigationViewDataBinding
  • changeScrollPresenterOffset : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • Char : MathToken
  • chartreuseBrush : ScrollPresenterStackPanelAnchoringPage
  • checkedRevoker : ChildHandlers
  • CheckIfButtonsHiddenButton : PagerControlTestPageElements
  • CheckIfButtonsHiddenLabel : PagerControlTestPageElements
  • Children : CustomContent
  • ClearedElementsArrangePosition : ItemsRepeater
  • clearPrimaryCommandsFlyout : CommandBarFlyoutPage
  • clearPrimaryCommandsTimer : CommandBarFlyoutPage
  • ClearRadioButtonsEventsButton : RadioButtonsTestPageElements
  • clearSecondaryCommandsFlyout : CommandBarFlyoutPage
  • clearSecondaryCommandsTimer : CommandBarFlyoutPage
  • closeButton : TeachingTipTestPageElements , TeachingTipFocusTestPageElements
  • closeButtonContentComboBox : TeachingTipTestPageElements
  • cmbMISnapPointAlignment : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • cmbMRSnapPointAlignment : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • collection : UniformGridLayoutDemo
  • colorBrush : ColorItem
  • colorChangedEvent : ColorPickerTests::ColorPickerTestSetupHelper
  • colorIndex : ScrollPresenterScrollSnapPointsPage
  • colorNameToolTip : ColorPickerPage
  • ColorRepresentationComboBoxAutomationId : ColorPickerTests
  • ColorSpectrumAutomationId : ColorPickerTests
  • colorSpectrumInputTarget : ColorPickerPage
  • ComboBoxIsEnabledCheckBox : PagerControlTestPageElements
  • ComboBoxVisibilityCheckBox : PagerControlTestPageElements
  • compact : NavigationViewTestsBase
  • compositionProperties : RefreshInfoProviderImplementation , RefreshInfoProviderImpl
  • compositor : AnimationHandler
  • coneAngleTolerance : RevealStatesPage
  • coneIntensityTolerance : RevealStatesPage
  • ConfigurationChanged : IRepeaterScrollingSurface
  • ConstantAttenuation : RevealBorderSpotlightStateDesc
  • containerHasHandler : RefreshContainerPage , RefreshContainerOnImagePage
  • containerTimer : RefreshContainerPage
  • contentOverlay : NavigationViewTopNavStorePage , NavigationViewTopNavOnlyPage
  • contentPointerCanceledEventHandler : ScrollPresenterDynamicPage
  • contentPointerCaptureLostEventHandler : ScrollPresenterDynamicPage
  • contentPointerPressedEventHandler : ScrollPresenterDynamicPage
  • contentPointerReleasedEventHandler : ScrollPresenterDynamicPage
  • contentPointerWheelChangedEventHandler : ScrollViewDynamicPage
  • ControlCornerRadiusProperty : CornerRadiusPage
  • CorrelationId : CompositionScrollController::OperationInfo , BiDirectionalScrollController::OperationInfo
  • Count : ReadOnlyNotifyPropertyChangedCollection-g< T > , MyCollection
  • createXamlTypeCallback : Entry
  • currentAnchor : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage
  • CurrentCancelClosesCheckBox : TeachingTipPage
  • CurrentMaxVisualIndicatorsTextBlock : PipsPagerElements
  • CurrentNumberOfPagesTextBlock : PipsPagerElements
  • CurrentOrientationTextBlock : PipsPagerElements
  • CurrentPageIdentifierLeftMarginTextBlock : PagerControlTestPageElements
  • CurrentPageTextBlock : PipsPagerElements , PagerControlTestPageElements
  • currentSelectedItem : NavigationViewTopNavStorePage
  • customButtonsFlyoutOpenCount : ExtraCommandBarFlyoutPage
  • CustomCheckedCheckBox : RadioButtonsTestPageElements
  • CustomContentRootNode : TreeViewUnrealizedChildrenTestPage
  • CustomContentTextBox : RadioButtonsTestPageElements
  • CustomDisabledCheckBox : RadioButtonsTestPageElements
  • CustomIndexTextBox : RadioButtonsTestPageElements
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- d -

  • darkBorderColor : RevealScenarioColors
  • darkHoverPlateColor : RevealScenarioColors
  • data : VirtualizingUniformStackLayoutSamplePage
  • DataIdentifier : TabViewPage
  • dataItemToTabItemDictionary : MultipleTabViewPage
  • dataSource : ScrollPresenterRepeaterAnchoringPage , ScrollPresenterBringIntoViewPage
  • DataTabView : TabViewPage
  • defaultAnimatedViewChangeTimeout : ScrollPresenterTestsWithInputHelper , TeachingTipTests
  • DefaultAnimationDuration : LinedFlowLayoutItemCollectionTransitionProvider
  • DefaultAnimationDurationInMs : DefaultItemCollectionTransitionProvider , RadialItemCollectionTransitionProvider
  • defaultPaneTitleTextBlockStyle : NavigationViewCustomThemeResourcesPage
  • DefaultWaitTime : FlowLayoutCollectionChangeTests , FlowLayoutTests , ViewManagerTests
  • DefaultWindowSize : TabViewTearOutWindowWithDataItems , TabViewTearOutWindowWithoutDataItems
  • deferral : TeachingTipPage
  • delayRefresh : RefreshContainerOnImagePage , RefreshContainerPage
  • DependencyObjectBase : VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >
  • dispatcherQueue : CompositionScrollControllerPanningInfo
  • DisplayModeComboBox : PagerControlTestPageElements
  • DummyControlAutomationId : ButtonInteractionTests
  • Duration : ProgressRingDeterminate::AnimatedVisual , LottieLogo::LottieLogo_AnimatedVisual , BrightnessSun , BrightnessSun::BrightnessSun_AnimatedVisual , LottieLogo
  • dynamicCommandBarFlyout : CommandBarFlyoutPage
  • dynamicCommandTimer : CommandBarFlyoutPage
  • DynamicGradientBrush : RadialGradientBrushPage
  • dynamicLabelChangeCount : CommandBarFlyoutPage
  • dynamicLabelSecondaryCommand : CommandBarFlyoutPage
  • dynamicLabelTimer : CommandBarFlyoutPage
  • dynamicScrollPresenter : ScrollPresenterDynamicPage
  • dynamicVisibilityChangeCount : CommandBarFlyoutPage
  • dynamicVisibilitySecondaryCommand : CommandBarFlyoutPage
  • dynamicVisibilityTimer : CommandBarFlyoutPage
  • dynamicWidthChangeCount : CommandBarFlyoutPage
  • dynamicWidthOverflowContentRoot : CommandBarFlyoutPage
  • dynamicWidthTimer : CommandBarFlyoutPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- e -

  • effectiveForegroundOfTeachingTipButtonTextBlock : TeachingTipTestPageElements
  • effectiveForegroundOfTeachingTipContentTextBlock : TeachingTipTestPageElements
  • effectiveOpenTeachingTipOnEdgeButton : TeachingTipTestPageElements
  • effectivePageRTLCheckbox : TeachingTipTestPageElements
  • effectivePlacementTextBlock : TeachingTipTestPageElements
  • effectiveRemoveOpenButton : TeachingTipTestPageElements
  • effectiveRemoveTeachingTipButton : TeachingTipTestPageElements
  • effectiveTeachingTipContent : TeachingTipTestPageElements
  • effectiveTeachingTipContentUnloadedCheckbox : TeachingTipTestPageElements
  • effectiveTeachingTipOnEdgeOffsetButton : TeachingTipTestPageElements
  • effectiveTeachingTipOnEdgeOffsetTextblock : TeachingTipTestPageElements
  • elements : TeachingTipTests , PagerControlTestBase , PipsPagerTestBase , RadioButtonsTests
  • EnterInfinityModeButton : PagerControlTestPageElements
  • Epsilon : LinedFlowLayoutItemCollectionTransitionProvider
  • executionRatio : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • expanded : NavigationViewTestsBase
  • expectedLastRealizedIndex : PhasingTests
  • expressionAnimationSources : CompositionScrollControllerPanningInfo
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- f -

  • FallbackGlyphProperty : AnimatedIconHost
  • FirstPageButton : PagerControlTestPageElements
  • firstPageButton : PagerControlPage
  • FirstPageButtonIsEnabledCheckBox : PagerControlTestPageElements
  • FirstPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • FirstPageButtonVisibilityComboBox : PagerControlTestPageElements
  • FirstRealizedElementIndexDefault : final
  • FlexBasisProperty : Flex
  • FlexDirectionProperty : Flex
  • FlexGrowProperty : Flex
  • FlexShrinkProperty : Flex
  • FlexWrapProperty : Flex
  • flyoutToAdd : CommandBarFlyoutPage
  • flyoutTVI : TreeViewPage
  • FocusedIndexTextBlock : RadioButtonsTestPageElements
  • FocusedIndexTextBlock1 : RadioButtonsFocusTestPageElements
  • FocusedIndexTextBlock2 : RadioButtonsFocusTestPageElements
  • FocusedItemTextBlock : RadioButtonsTestPageElements
  • FocusedPageIndexTextBlock : PipsPagerElements
  • FocusSelectedItemButton : RadioButtonsTestPageElements
  • fonts : CommonStylesPage
  • footerItems : PaneLayoutTestPage
  • ForegroundColorCounter : RefreshVisualizerPage
  • FrameCount : LottieLogo , BrightnessSun
  • Framerate : LottieLogo , BrightnessSun
  • fullLogs : ScrollPresenterZoomSnapPointsPage , ScrollPresenterManipulationModePage , ScrollPresenterChainingAndRailingPage , ScrollPresenterScrollSnapPointsPage , SwipeControlPage , ScrollViewsWithSimpleContentsPage , ScrollPresentersWithSimpleContentsPage , ScrollPresenterExpressionAnimationSourcesPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- g -

  • GetCustomIndexOfFunction : IVectorOwner< EventSource, T > , VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > , SelectedItemsVector , SelectedTreeNodeVector
  • greenEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • GreenLabelAutomationId : ColorPickerTests
  • greenOrSaturationChangedWaiter : ColorChangedEventWaiter
  • GreenTextBoxAutomationId : ColorPickerTests
  • grid : RefreshVisualizerPage
  • gridItemTypeSource : RevealScenarioGrid
  • gridSource : RevealScenarioGrid
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- h -

  • Header : RevealGridItem , RevealScenarioItem , RevealItem
  • Height : RevealBorderSpotlightStateDesc
  • heroContentComboBox : TeachingTipTestPageElements
  • HexTextBoxAutomationId : ColorPickerTests
  • hIndicatorOffsetExpression : ScrollPresenterExpressionAnimationSourcesPage
  • hIndicatorWidthExpression : ScrollPresenterExpressionAnimationSourcesPage
  • horizontalDecrementRepeatButton : BiDirectionalScrollController , CompositionScrollController
  • horizontalDecrementVerticalIncrementRepeatButton : BiDirectionalScrollController
  • HorizontalElementAutomationId : SliderInteractionTests
  • horizontalGrid : CompositionScrollController
  • horizontalIncrementRepeatButton : BiDirectionalScrollController , CompositionScrollController
  • horizontalIncrementVerticalDecrementRepeatButton : BiDirectionalScrollController
  • HorizontalLargeChangeTextBlockAutomationId : SliderInteractionTests
  • HorizontalMaximumTextBlockAutomationId : SliderInteractionTests
  • HorizontalMinimumTextBlockAutomationId : SliderInteractionTests
  • HorizontalOrientationPipsPagerButtonHeightTextBlock : PipsPagerElements
  • HorizontalOrientationPipsPagerButtonWidthTextBlock : PipsPagerElements
  • HorizontalPositionTextBlockAutomationId : SliderInteractionTests
  • horizontalPS : CanvasScrollControllerConsumer
  • horizontalScrollController : BiDirectionalScrollController , ScrollPresenterWithSimpleScrollControllersPage , CanvasScrollControllerConsumer
  • HorizontalSmallChangeTextBlockAutomationId : SliderInteractionTests
  • horizontalStackPanel : ScrollPresenterDynamicPage , ScrollViewerPage
  • horizontalThumb : CompositionScrollController
  • HoverModeAutomationId : ButtonInteractionTests
  • hScrollBarVisual : ScrollPresenterExpressionAnimationSourcesPage
  • hScrollIndicatorSpriteVisual : ScrollPresenterExpressionAnimationSourcesPage
  • hScrollIndicatorVisual : ScrollPresenterExpressionAnimationSourcesPage
  • HSVComboBoxItemAutomationId : ColorPickerTests
  • HueLabelAutomationId : ColorPickerTests
  • HueTextBoxAutomationId : ColorPickerTests
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- i -

  • Icon : RevealScenarioItem , RevealItem
  • icon : RefreshVisualizerPage
  • iconComboBox : TeachingTipTestPageElements
  • iconForegroundBrush : InfoBadgePage
  • IconSourceProperty : AnimatedIconHost , ToggleAnimatedIconHost
  • Id : MapElement , MapLayer
  • image : ImageIRefreshInfoProviderAdapter
  • imageIndex : ImagePage
  • ImageSource : RevealGridItem
  • imageUri : PersonPicturePage
  • IncreaseNumberOfPagesButton : PagerControlTestPageElements
  • Index : EffectBase::NamedProperty
  • index : CustomContent
  • IndexToSelectTextBlock : RadioButtonsTestPageElements
  • IndexToSelectTextBox1 : RadioButtonsFocusTestPageElements
  • IndexToSelectTextBox2 : RadioButtonsFocusTestPageElements
  • infoProvider : AnimationHandler , ImageIRefreshInfoProviderAdapter
  • infoProviderOffsetAnimation : AnimationHandler
  • infoProviderRefreshCompletedAnimation : AnimationHandler
  • infoProviderRefreshRequestedAnimation : AnimationHandler
  • infoProviderVisual : AnimationHandler
  • Ingredients : ListViewBackgroundPage , ListViewHeaderPage , ListViewItemPage , VirtualizingStackPanelPage
  • initialTabsCount : TabViewTabItemsSourcePage
  • inner : MyCollection
  • InnerConeAngleInDegrees : RevealBorderSpotlightStateDesc
  • InnerConeColor : RevealHoverSpotlightStateDesc , RevealBorderSpotlightStateDesc
  • InnerConeIntensity : RevealHoverSpotlightStateDesc
  • innerListView : TabViewTabItemsSourcePage
  • InsertDisplayRadioButtonButton : RadioButtonsTestPageElements
  • interactionAnimationNeedsUpdating : AnimationHandler
  • InteractionRatioChanged : IRefreshInfoProvider
  • interactionRatioChangedCount : RefreshInfoProviderImplementation
  • interactionRatioName : RefreshInfoProviderImplementation
  • interactionTracker : AnimationHandler , ImageIRefreshInfoProviderAdapter
  • InvalidAPIVersion : PlatformConfiguration
  • InvalidRect : ItemsRepeater
  • InvokeCountTextBlockAutomationId : ButtonInteractionTests
  • InvokeModeComboBoxAutomationId : ButtonInteractionTests
  • isAnimatingThumbOffset : CompositionScrollControllerPanningInfo
  • isBindable : VectorFlagHelper< flag >
  • isDependencyObjectBase : VectorFlagHelper< flag >
  • isEnabled : CanvasScrollControllerConsumer
  • IsFixedSize : MyCollection
  • IsHoveringTextBlockAutomationId : ButtonInteractionTests
  • isIdleCheckBox : TeachingTipTestPageElements , TeachingTipFocusTestPageElements
  • isInteractingForRefresh : RefreshInfoProviderImplementation , RefreshInfoProviderImpl , RefreshInfoProviderImplementation
  • IsInteractingForRefreshChanged : IRefreshInfoProvider
  • isLightDismissEnabledButton : TeachingTipTestPageElements
  • isLightDismissEnabledCheckBox : TeachingTipFocusTestPageElements
  • isLightDismissEnabledComboBox : TeachingTipTestPageElements
  • isLoggingMessages : ScrollPresenterExpressionAnimationSourcesPage
  • isNoTrackerRef : VectorFlagHelper< flag >
  • isObservable : VectorFlagHelper< flag >
  • isOpenCheckBox : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • IsPressingTextBlockAutomationId : ButtonInteractionTests
  • isRailEnabled : CompositionScrollControllerPanningInfo , BiDirectionalScrollController
  • IsReadOnly : MyCollection
  • isRootGridDefaultSize : TextControlsPage
  • isScrollable : CompositionScrollController
  • IsSelectedProperty : RepeaterItem , TreeViewItem , GroupedRepeaterItem
  • IsSortDescending : SortingAndFilteringPage
  • IsSynchronized : MyCollection
  • isThumbPannable : CompositionScrollControllerPanningInfo
  • isThumbPositionMirrored : CompositionScrollControllerPanningInfo
  • itemChangeTimer : MenuFlyoutPage
  • items : SelectionModeItem , RevealGridItem
  • Items : RadioMenuFlyoutItemTests
  • items : RevealGridTypeItem , ItemsViewTransitionPage , RevealBackgroundItem , SwipeControlClearPage
  • ItemSpacingProperty : ActivityFeedLayout
  • itemStates : RadioMenuFlyoutItemPage
  • itemsToToggle : MenuFlyoutPage
  • ItemTypeComboBox : RadioButtonsTestPageElements
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- p -

  • Page : RevealScenarioItem
  • page : TestCommand
  • pageIconSource : InfoBadgePage
  • PagerComboBox : PagerControlTestPageElements
  • pagerComboBox : PagerControlPage
  • PagerControl : PagerControlTestPageElements
  • pagerItemsRepeater : PagerControlPage
  • PagerNumberBox : PagerControlTestPageElements
  • pagerNumberBox : PagerControlPage
  • Pages : NavigationViewMenuItemsSourcePage
  • paneToggleRequestedCount : TitleBarPageWindow
  • panningElementAncestor : CompositionScrollControllerPanningInfo
  • panningFrameworkElement : CompositionScrollControllerPanningInfo , CompositionScrollController
  • panningInfo : CompositionScrollController , BiDirectionalScrollController::UniScrollController
  • panningVisual : CompositionScrollControllerPanningInfo
  • panOrientation : CompositionScrollControllerPanningInfo
  • Parent : TreeNode
  • ParentNode : SelectionTreeHelper::TreeWalkNodeInfo
  • pastSender : SwipeControlPage , SwipeControlPage2
  • Path : SelectedItemInfo , SelectionTreeHelper::TreeWalkNodeInfo
  • pattern : AcrylicBrushTests
  • PersonInfoListPreviousOffset : PipsPagerExamples
  • PersonInfoListScrollViewer : PipsPagerExamples
  • pGroup : ProfileGroupInfo
  • PhaseNotSpecified : VirtualizationInfo
  • PhaseReachedEnd : VirtualizationInfo
  • pictureLibrary : ItemsViewPictureLibraryPage
  • Pictures : PipsPagerExamples , PipsPagerPage
  • PipsPager : PipsPagerElements
  • populatedBorder : ScrollViewerPage , ScrollPresenterDynamicPage
  • popupVerticalOffsetTextBlock : TeachingTipTestPageElements
  • PostArrange : IRepeaterScrollingSurface
  • preferredPlacementComboBox : TeachingTipTestPageElements
  • preManipulationHorizontalOffset : CanvasScrollControllerConsumer
  • preManipulationThumbOffset : BiDirectionalScrollController , CompositionScrollController
  • preManipulationVerticalOffset : CanvasScrollControllerConsumer
  • PressModeAutomationId : ButtonInteractionTests
  • previousColorRectangle : ColorPickerPage
  • previousPageButton : PipsPagerPage
  • PreviousPageButton : PagerControlTestPageElements
  • previousPageButton : PagerControlPage
  • PreviousPageButton : PipsPagerElements
  • PreviousPageButtonIsEnabledCheckBox : PagerControlTestPageElements , PipsPagerElements
  • PreviousPageButtonIsVisibleCheckBox : PipsPagerElements
  • PreviousPageButtonVisibilityCheckBox : PagerControlTestPageElements
  • PreviousPageButtonVisibilityComboBox : PipsPagerElements , PagerControlTestPageElements
  • PreviousPageTextBlock : PagerControlTestPageElements
  • primary : SnapPointSortPredicate
  • primaryEllipseLoaded : PersonPicturePage
  • pszGroupName : ProfileGroupInfo
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- q -

  • QuickAnimationDuration : LinedFlowLayoutItemCollectionTransitionProvider
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- r -

  • RadioButtons1HasFocusCheckBox : RadioButtonsFocusTestPageElements
  • RadioButtons2HasFocusCheckBox : RadioButtonsFocusTestPageElements
  • RadioButtonsEventsList : RadioButtonsTestPageElements
  • RadioButtonsHasFocusCheckBox : RadioButtonsTestPageElements
  • RATING_ITEM_HEIGHT : RatingControlTests
  • RATING_ITEM_WIDTH : RatingControlTests
  • RecipeContainerType : RecipeElementFactory
  • RecipeGroupType : RecipeElementFactory
  • rectangle : ScrollViewerPage , ScrollPresenterDynamicPage , ScrollViewDynamicPage
  • RectangleColor : FallbackGrid
  • RectangleHeight : FallbackGrid
  • rectangleLeftHeader : ScrollViewerPage
  • rectangleTopHeader : ScrollViewerPage
  • rectangleTopLeftHeader : ScrollViewerPage
  • RectangleWidth : FallbackGrid
  • rectSC : DynamicPage
  • redEventSource : ColorPickerTests::ColorPickerTestSetupHelper
  • RedLabelAutomationId : ColorPickerTests
  • redOrHueChangedWaiter : ColorChangedEventWaiter
  • RedTextBoxAutomationId : ColorPickerTests
  • RefreshCompleted : IRefreshInfoProvider
  • refreshCompletedAnimationNeedsUpdating : AnimationHandler
  • refreshCompletedScopedBatch : AnimationHandler
  • refreshCount : RefreshContainerOnImagePage , RefreshContainerPage
  • refreshPullDirection : AnimationHandler , ImageIRefreshInfoProviderAdapter , RefreshInfoProviderImplementation
  • refreshRequestedAnimationNeedsUpdating : AnimationHandler
  • RefreshStarted : IRefreshInfoProvider
  • refreshVisualizer : AnimationHandler
  • refreshVisualizerRefreshCompletedAnimation : AnimationHandler
  • refreshVisualizerRefreshRequestedAnimation : AnimationHandler
  • refreshVisualizerSize : RefreshInfoProviderImplementation
  • refreshVisualizerVisual : AnimationHandler
  • refreshVisualizerVisualOffsetAnimation : AnimationHandler
  • relativeChangeCorrelationIds : ScrollPresenterDynamicPage
  • RelativeOffsetChange : BiDirectionalScrollController::OperationInfo , CompositionScrollController::OperationInfo
  • ReleaseModeAutomationId : ButtonInteractionTests
  • removeTargetButton : TeachingTipTestPageElements
  • repeatButton : ScrollViewerPage
  • RepeatedIndexProperty : TreeViewItem , RepeaterItem , GroupedRepeaterItem
  • repeater : PipsPagerPage
  • ReproTextBlock : RadioButtonsTestPageElements
  • RetrievePipsPagerButtonSizesButton : PipsPagerElements
  • returnTopForOutOfWindowPlacementCheckBox : TeachingTipTestPageElements
  • RevealBrushTestApi : RevealBrush
  • revealHoverLightOffset_KeyboardExpression : RevealStatesPage
  • revealHoverLightOffset_PointerExpression : RevealStatesPage
  • RevealTestApi : RevealBorderLight , RevealHoverLight
  • RGBComboBoxItemAutomationId : ColorPickerTests
  • rgx : AcrylicBrushTests
  • Right : WebView2RenderingVerifier::NativeMethods::RECT
  • Root : TreeStructure
  • RootVisual
: BrightnessSun::BrightnessSun_AnimatedVisual
, ProgressRingDeterminate::AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
  • RowSpacingProperty : ActivityFeedLayout
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- s -

  • s_AcceptsExpressionProperty : NumberBoxProperties
  • s_ActionButtonCommandParameterProperty : TeachingTipProperties
  • s_ActionButtonCommandProperty : TeachingTipProperties
  • s_ActionButtonContentProperty : TeachingTipProperties
  • s_ActionButtonProperty : InfoBarProperties
  • s_ActionButtonStyleProperty : TeachingTipProperties
  • s_ActiveToolProperty : InkToolBarProperties
  • s_ActualImageBrushProperty : PersonPictureTemplateSettingsProperties
  • s_ActualInitialsProperty : PersonPictureTemplateSettingsProperties
  • s_ActualLineHeightProperty : LinedFlowLayoutProperties
  • s_AddTabButtonCommandParameterProperty : TabViewProperties
  • s_AddTabButtonCommandProperty : TabViewProperties
  • s_AllowDropTabsProperty : TabViewProperties
  • s_AlwaysShowHeaderProperty : NavigationViewProperties
  • s_AlwaysUseFallbackProperty : RevealBrushProperties , AcrylicBrushProperties
  • s_AnimationOptimizationProperty : AnimatedVisualPlayerProperties
  • s_appBarButtonDependencyProperties : CommandBarFlyout
  • s_appBarToggleButtonDependencyProperties : CommandBarFlyout
  • s_AreCheckStatesEnabledProperty : RadioMenuFlyoutItemProperties
  • s_ArePrecisionErasersVisibleProperty : InkToolBarEraserButtonProperties
  • s_AutoPlayProperty : AnimatedVisualPlayerProperties
  • s_AutoSuggestBoxProperty : NavigationViewProperties
  • s_AutoSuggestEventRevokersProperty : AutoSuggestBoxHelper
  • s_BackButtonVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_BackgroundProperty : ItemsRepeaterProperties , ScrollPresenterProperties , SwipeItemProperties
  • s_BadgeGlyphProperty : PersonPictureProperties
  • s_BadgeImageSourceProperty : PersonPictureProperties
  • s_BadgeNumberProperty : PersonPictureProperties
  • s_BadgeTextProperty : PersonPictureProperties
  • s_BehaviorOnInvokedProperty : SwipeItemProperties
  • s_BorderBrushProperty : LayoutPanelProperties
  • s_BorderThicknessProperty : LayoutPanelProperties
  • s_BottomItemsProperty : SwipeControlProperties
  • s_ButtonFlyoutPlacementProperty : InkToolBarProperties
  • s_ButtonPanelAlwaysShowFirstLastPageIndexProperty : PagerControlProperties
  • s_CanDragItemsProperty : TreeViewProperties
  • s_CanDragTabsProperty : TabViewProperties
  • s_CanGoBackProperty : WebView2Properties
  • s_CanGoForwardProperty : WebView2Properties
  • s_CanReorderItemsProperty : TreeViewProperties
  • s_CanReorderTabsProperty : TabViewProperties
  • s_CanTearOutTabsProperty : TabViewProperties
  • s_CanUserInvokeProperty : ItemContainerProperties
  • s_CanUserSelectProperty : ItemContainerProperties
  • s_CaptionProperty : RatingControlProperties
  • s_CenterProperty : MapControlProperties , RadialGradientBrushProperties
  • s_ChildProperty : ItemContainerProperties , ParallaxViewProperties
  • s_ChildrenProperty : InkToolBarProperties
  • s_ClipRectProperty : ProgressBarTemplateSettingsProperties
  • s_CloseAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_CloseButtonCommandParameterProperty : InfoBarProperties , TeachingTipProperties
  • s_CloseButtonCommandProperty : InfoBarProperties , TeachingTipProperties
  • s_CloseButtonContentProperty : TeachingTipProperties
  • s_CloseButtonOverlayModeProperty : TabViewProperties
  • s_CloseButtonStyleProperty : InfoBarProperties , TeachingTipProperties
  • s_CollapsedGlyphProperty : TreeViewItemProperties
  • s_CollapsedGlyphVisibilityProperty : TreeViewItemTemplateSettingsProperties
  • s_ColorChannelProperty : ColorPickerSliderProperties
  • s_ColorProperty : ColorPickerProperties , ColorSpectrumProperties , RevealBrushProperties , XamlAmbientLightProperties
  • s_ColorSpectrumComponentsProperty : ColorPickerProperties
  • s_ColorSpectrumShapeProperty : ColorPickerProperties
  • s_ColumnSpacingProperty : ColumnMajorUniformToLargestGridLayoutProperties
  • s_CommandParameterProperty : SplitButtonProperties , SwipeItemProperties
  • s_CommandProperty : SplitButtonProperties , SwipeItemProperties
  • s_CompactModeThresholdWidthProperty : NavigationViewProperties
  • s_CompactPaneLengthProperty : NavigationViewProperties , NavigationViewItemProperties
  • s_ComponentsProperty : ColorSpectrumProperties
  • s_ComputedHorizontalScrollBarVisibilityProperty : ScrollViewProperties
  • s_ComputedHorizontalScrollModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ComputedVerticalScrollBarVisibilityProperty : ScrollViewProperties
  • s_ComputedVerticalScrollModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ConfigurationContentProperty : InkToolBarCustomPenButtonProperties , InkToolBarCustomToolButtonProperties
  • s_constantAttenuation : RevealHoverLight
  • s_ContactProperty : PersonPictureProperties
  • s_Container2AnimationEndPositionProperty : ProgressBarTemplateSettingsProperties
  • s_Container2AnimationStartPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContainerAnimationEndPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContainerAnimationMidPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContainerAnimationStartPositionProperty : ProgressBarTemplateSettingsProperties
  • s_ContentClipRectProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ContentHeightProperty : ExpanderTemplateSettingsProperties
  • s_ContentOrientationProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ContentOverlayProperty : NavigationViewProperties
  • s_ContentProperty : InfoBarProperties , RefreshVisualizerProperties , ScrollPresenterProperties , ScrollViewProperties , TitleBarProperties , TreeViewNodeProperties
  • s_ContentTemplateProperty : InfoBarProperties
  • s_ControlTypeProperty : CommandBarFlyoutCommandBarAutomationPropertiesProperties
  • s_ConversionKindProperty : CornerRadiusToThicknessConverterProperties
  • s_CornerRadiusProperty : LayoutPanelProperties
  • s_CurrentItemIndexProperty : ItemsViewProperties
  • s_CurrentWidthProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_CustomPenProperty : InkToolBarCustomPenButtonProperties
  • s_DefaultBackgroundColorProperty : WebView2Properties
  • s_defaultTipHeightAndWidth : TeachingTip
  • s_DepthProperty : TreeViewNodeProperties
  • s_DescriptionProperty : NumberBoxProperties
  • s_DetailLabelTemplateProperty : AnnotatedScrollBarProperties
  • s_DeterminateSourceProperty : ProgressRingProperties
  • s_DiagnosticsProperty : AnimatedVisualPlayerProperties
  • s_DisabledGlyphProperty : RatingItemFontInfoProperties
  • s_DisabledImageProperty : RatingItemImageInfoProperties
  • s_DisplayModeProperty : NavigationViewProperties , PagerControlProperties
  • s_DisplayNameProperty : PersonPictureProperties
  • s_DragItemsCountProperty : TreeViewItemTemplateSettingsProperties
  • s_DropDownEventRevokersProperty : ComboBoxHelper
  • s_DurationProperty : AnimatedVisualPlayerProperties
  • s_elementFactoryElementIndex : RepeaterTestHooks
  • s_EllipseAnimationEndPositionProperty : ProgressBarTemplateSettingsProperties
  • s_EllipseAnimationWellPositionProperty : ProgressBarTemplateSettingsProperties
  • s_EllipseDiameterProperty : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • s_EllipseOffsetProperty : ProgressBarTemplateSettingsProperties , ProgressRingTemplateSettingsProperties
  • s_ExpandDirectionProperty : ExpanderProperties
  • s_ExpandDownAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandDownAnimationHoldPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandDownAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandDownOverflowVerticalPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandedGlyphProperty : TreeViewItemProperties
  • s_ExpandedGlyphVisibilityProperty : TreeViewItemTemplateSettingsProperties
  • s_ExpandedModeThresholdWidthProperty : NavigationViewProperties
  • s_ExpandedWidthProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpAnimationHoldPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_ExpandUpOverflowVerticalPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_FallbackContentProperty : AnimatedVisualPlayerProperties
  • s_FallbackIconSourceProperty : AnimatedIconProperties , AnimatedIconSourceProperties
  • s_FilterProperty : CornerRadiusFilterConverterProperties
  • s_FirstButtonCommandProperty : PagerControlProperties
  • s_FirstButtonStyleProperty : PagerControlProperties
  • s_FirstButtonVisibilityProperty : PagerControlProperties
  • s_FlyoutProperty : SplitButtonProperties
  • s_FlyoutTemplateSettingsProperty : CommandBarFlyoutCommandBarProperties
  • s_FooterMenuItemsProperty : NavigationViewProperties
  • s_FooterMenuItemsSourceProperty : NavigationViewProperties
  • s_FooterProperty : TitleBarProperties
  • s_ForegroundProperty : SwipeItemProperties
  • s_GlyphBrushProperty : TreeViewItemProperties
  • s_GlyphOpacityProperty : TreeViewItemProperties
  • s_GlyphProperty : RatingItemFontInfoProperties
  • s_GlyphSizeProperty : TreeViewItemProperties
  • s_GradientOriginProperty : RadialGradientBrushProperties
  • s_GroupNameProperty : RadioMenuFlyoutItemProperties
  • s_HasChildrenProperty : TreeViewNodeProperties
  • s_HasUnrealizedChildrenProperty : NavigationViewItemProperties , TreeViewItemProperties
  • s_HeaderProperty : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties , TitleBarProperties
  • s_HeaderTemplateProperty : ExpanderProperties , NavigationViewProperties , NumberBoxProperties , RadioButtonsProperties , TabViewItemProperties
  • s_HeaderTemplateSelectorProperty : ExpanderProperties
  • s_HeroContentPlacementProperty : TeachingTipProperties
  • s_HeroContentProperty : TeachingTipProperties
  • s_HorizontalAnchorRatioProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalCacheLengthProperty : ItemsRepeaterProperties
  • s_horizontalOffsetPropertyName : ScrollInputHelper
  • s_HorizontalOrientationMarginProperty : InfoBarPanelProperties
  • s_HorizontalOrientationPaddingProperty : InfoBarPanelProperties
  • s_HorizontalScrollBarVisibilityProperty : ScrollViewProperties
  • s_HorizontalScrollChainModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalScrollModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalScrollRailModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_HorizontalShiftProperty : ParallaxViewProperties
  • s_HorizontalSourceEndOffsetProperty : ParallaxViewProperties
  • s_HorizontalSourceOffsetKindProperty : ParallaxViewProperties
  • s_HorizontalSourceStartOffsetProperty : ParallaxViewProperties
  • s_HsvColorProperty : ColorSpectrumProperties
  • s_IconElementProperty : InfoBadgeTemplateSettingsProperties , InfoBarTemplateSettingsProperties , TabViewItemTemplateSettingsProperties , TeachingTipTemplateSettingsProperties , TitleBarTemplateSettingsProperties
  • s_IconProperty : NavigationViewItemProperties , NavigationViewItemPresenterProperties , SelectorBarItemProperties
  • s_IconSourceProperty : InfoBadgeProperties , InfoBarProperties , SwipeItemProperties , TabViewItemProperties , TeachingTipProperties , TitleBarProperties
  • s_IconWidthProperty : NavigationViewItemPresenterTemplateSettingsProperties
  • s_IgnoredInputKindsProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_ImageProperty : RatingItemImageInfoProperties
  • s_ImageSourceProperty : ImageIconSourceProperties
  • s_IndentationProperty : TreeViewItemTemplateSettingsProperties
  • s_IndeterminateSourceProperty : ProgressRingProperties
  • s_IndicatorLengthDeltaProperty : ProgressBarTemplateSettingsProperties
  • s_inertiaDecayRate : ScrollBarController
  • s_InfoBadgeCornerRadiusProperty : InfoBadgeTemplateSettingsProperties
  • s_InfoBadgeProperty : NavigationViewItemProperties , NavigationViewItemPresenterProperties
  • s_InfoProviderProperty : RefreshVisualizerProperties
  • s_InitialControlsProperty : InkToolBarProperties
  • s_initialized : MUXControlsFactory
  • s_InitialSetValueProperty : RatingControlProperties
  • s_InitialsProperty : PersonPictureProperties
  • s_InkDrawingAttributesProperty : InkToolBarProperties
  • s_InputScopeProperty : NumberBoxProperties
  • s_instance : SplitButtonTestHelper
  • s_InteractiveControlsVisibleProperty : MapControlProperties
  • s_InterpolationSpaceProperty : RadialGradientBrushProperties
  • s_IsActiveProperty : ProgressRingProperties
  • s_IsAddTabButtonVisibleProperty : TabViewProperties
  • s_IsAlphaEnabledProperty : ColorPickerProperties
  • s_IsAlphaSliderVisibleProperty : ColorPickerProperties
  • s_IsAlphaTextInputVisibleProperty : ColorPickerProperties
  • s_IsAnimatedVisualLoadedProperty : AnimatedVisualPlayerProperties
  • s_IsBackButtonVisibleProperty : NavigationViewProperties , TitleBarProperties
  • s_IsBackEnabledProperty : NavigationViewProperties , TitleBarProperties
  • s_IsCheckedProperty : InkToolBarFlyoutItemProperties , RadioMenuFlyoutItemProperties , ToggleSplitButtonProperties
  • s_IsChildSelectedProperty : NavigationViewItemProperties
  • s_IsClearAllVisibleProperty : InkToolBarEraserButtonProperties
  • s_IsClearEnabledProperty : RatingControlProperties
  • s_IsClosableProperty : InfoBarProperties , TabViewItemProperties
  • s_IsColorChannelTextInputVisibleProperty : ColorPickerProperties
  • s_IsColorPreviewVisibleProperty : ColorPickerProperties
  • s_IsColorSliderVisibleProperty : ColorPickerProperties
  • s_IsColorSpectrumVisibleProperty : ColorPickerProperties
  • s_IsContainerProperty : RevealBrush
  • s_IsDebugOutputEnabled : AnnotatedScrollBarTrace , CommandBarFlyoutTrace , InkToolBarTrace , ItemContainerTrace , ItemsViewTrace , NavigationViewTrace , PTRTrace , ItemsRepeaterTrace , LinedFlowLayoutTrace , ScrollPresenterTrace , CompositionScrollController , ScrollViewTrace , SelectorBarTrace , SwipeControlTrace , TabViewTrace
  • s_IsEnabledProperty : InkCanvasProperties
  • s_IsExpandedProperty : ExpanderProperties , NavigationViewItemProperties , TreeViewItemProperties , TreeViewNodeProperties
  • s_IsExtensionGlyphShownProperty : InkToolBarMenuButtonProperties , InkToolBarToolButtonProperties
  • s_IsGroupProperty : PersonPictureProperties
  • s_IsHexInputVisibleProperty : ColorPickerProperties
  • s_IsHorizontalShiftClampedProperty : ParallaxViewProperties
  • s_IsIconVisibleProperty : InfoBarProperties
  • s_IsIndeterminateProperty : ProgressBarProperties , ProgressRingProperties
  • s_IsItemInvokedEnabledProperty : ItemsViewProperties
  • s_IsLightDismissEnabledProperty : TeachingTipProperties
  • s_IsMoreButtonVisibleProperty : ColorPickerProperties
  • s_isMouseModeEnabled : SharedHelpers
  • s_isMouseModeEnabledInitialized : SharedHelpers
  • s_isOnXbox : SharedHelpers
  • s_isOnXboxInitialized : SharedHelpers
  • s_IsOpenProperty : InfoBarProperties , TeachingTipProperties
  • s_IsPaneOpenProperty : NavigationViewProperties
  • s_IsPaneToggleButtonVisibleProperty : NavigationViewProperties , TitleBarProperties
  • s_IsPaneVisibleProperty : NavigationViewProperties
  • s_IsPlayingProperty : AnimatedVisualPlayerProperties
  • s_IsProtractorItemVisibleProperty : InkToolBarStencilButtonProperties
  • s_IsReadOnlyProperty : RatingControlProperties
  • s_IsRulerButtonCheckedProperty : InkToolBarProperties
  • s_IsRulerItemVisibleProperty : InkToolBarStencilButtonProperties
  • s_IsSelectedProperty : ItemContainerProperties , NavigationViewItemBaseProperties
  • s_IsSettingsVisibleProperty : NavigationViewProperties
  • s_IsStencilButtonCheckedProperty : InkToolBarProperties
  • s_IsStrokeEraserVisibleProperty : InkToolBarEraserButtonProperties
  • s_IsTargetProperty : XamlAmbientLightProperties
  • s_IsTitleBarAutoPaddingEnabledProperty : NavigationViewProperties
  • s_IsVerboseDebugOutputEnabled : AnnotatedScrollBarTrace , CommandBarFlyoutTrace , InkToolBarTrace , ItemContainerTrace , ItemsViewTrace , NavigationViewTrace , PTRTrace , ItemsRepeaterTrace , LinedFlowLayoutTrace , ScrollPresenterTrace , ScrollViewTrace , SelectorBarTrace , SwipeControlTrace , TabViewTrace
  • s_IsVerticalShiftClampedProperty : ParallaxViewProperties
  • s_IsVirtualizationEnabledProperty : StackLayoutProperties
  • s_IsWrapEnabledProperty : NumberBoxProperties
  • s_ItemContainerStyleProperty : TreeViewProperties
  • s_ItemContainerStyleSelectorProperty : TreeViewProperties
  • s_ItemContainerTransitionsProperty : TreeViewProperties
  • s_ItemInfoProperty : RatingControlProperties
  • s_ItemsJustificationProperty : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • s_ItemsProperty : MenuBarProperties , MenuBarItemProperties , RadioButtonsProperties , SelectorBarProperties
  • s_ItemsSourceProperty : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties , TreeViewProperties , TreeViewItemProperties
  • s_ItemsStretchProperty : LinedFlowLayoutProperties , UniformGridLayoutProperties
  • s_ItemTemplateProperty : BreadcrumbBarProperties , ItemsRepeaterProperties , ItemsViewProperties , RadioButtonsProperties , TreeViewProperties
  • s_ItemTemplateSelectorProperty : TreeViewProperties
  • s_ItemTransitionProviderProperty : ItemsRepeaterProperties , ItemsViewProperties
  • s_KeepInteriorCornersSquareProperty : AutoSuggestBoxHelperProperties , ComboBoxHelperProperties
  • s_KindProperty : InkToolBarFlyoutItemProperties , MicaBackdropProperties
  • s_LabelsProperty : AnnotatedScrollBarProperties
  • s_LabelTemplateProperty : AnnotatedScrollBarProperties
  • s_LargeChangeProperty : NumberBoxProperties
  • s_LargeLibrary : PictureLibrary
  • s_LastButtonCommandProperty : PagerControlProperties
  • s_LastButtonStyleProperty : PagerControlProperties
  • s_LastButtonVisibilityProperty : PagerControlProperties
  • s_LayersProperty : MapControlProperties
  • s_LayoutProperty : ItemsRepeaterProperties , ItemsViewProperties , LayoutPanelProperties
  • s_LeftItemsProperty : SwipeControlProperties
  • s_LeftPaneVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_LineAlignmentProperty : FlowLayoutProperties
  • s_linearAttenuation : RevealHoverLight
  • s_LineHeightProperty : LinedFlowLayoutProperties
  • s_LineSpacingProperty : LinedFlowLayoutProperties
  • s_LocationProperty : MapIconProperties
  • s_MapElementsProperty : MapElementsLayerProperties
  • s_mapHtmlContent : MapControl
  • s_MappingModeProperty : RadialGradientBrushProperties
  • s_MapServiceTokenProperty : MapControlProperties
  • s_MaxColumnsProperty : ColumnMajorUniformToLargestGridLayoutProperties , RadioButtonsProperties
  • s_MaxHorizontalShiftRatioProperty : ParallaxViewProperties
  • s_MaxHueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_maximumPercent : ScrollPresenterAutomationPeer
  • s_MaximumProperty : NumberBoxProperties , ProgressRingProperties
  • s_MaximumRowsOrColumnsProperty : UniformGridLayoutProperties
  • s_MaxRatingProperty : RatingControlProperties
  • s_MaxSaturationProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_MaxSideLengthProperty : ProgressRingTemplateSettingsProperties
  • s_maxStackLayoutIterations : ItemsRepeater
  • s_MaxStrokeWidthProperty : InkToolBarPenButtonProperties
  • s_MaxSurfaceOpacityProperty : SpectrumBrushProperties
  • s_MaxSurfaceProperty : SpectrumBrushProperties
  • s_MaxValueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_MaxVerticalShiftRatioProperty : ParallaxViewProperties
  • s_MaxVisiblePipsProperty : PipsPagerProperties
  • s_MaxZoomFactorProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_MenuItemContainerStyleProperty : NavigationViewProperties
  • s_MenuItemContainerStyleSelectorProperty : NavigationViewProperties
  • s_MenuItemsProperty : NavigationViewItemProperties , NavigationViewProperties
  • s_MenuItemsSourceProperty : NavigationViewProperties , NavigationViewItemProperties
  • s_MenuItemTemplateProperty : NavigationViewProperties
  • s_MenuItemTemplateSelectorProperty : NavigationViewProperties
  • s_MenuKindProperty : InkToolBarMenuButtonProperties
  • s_MessageProperty : InfoBarProperties
  • s_MinColumnSpacingProperty : FlowLayoutProperties , UniformGridLayoutProperties
  • s_MinHueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_minimumPercent : ScrollPresenterAutomationPeer
  • s_MinimumProperty : NumberBoxProperties , ProgressRingProperties
  • s_MinItemHeightProperty : UniformGridLayoutProperties
  • s_MinItemSpacingProperty : LinedFlowLayoutProperties
  • s_MinItemWidthProperty : UniformGridLayoutProperties
  • s_MinRowSpacingProperty : FlowLayoutProperties , UniformGridLayoutProperties
  • s_MinSaturationProperty : ColorSpectrumProperties , ColorPickerProperties
  • s_MinStrokeWidthProperty : InkToolBarPenButtonProperties
  • s_MinSurfaceProperty : SpectrumBrushProperties
  • s_MinTallModeHeightProperty : TwoPaneViewProperties
  • s_MinValueProperty : ColorPickerProperties , ColorSpectrumProperties
  • s_MinWideModeWidthProperty : TwoPaneViewProperties
  • s_MinZoomFactorProperty : ScrollViewProperties , ScrollPresenterProperties
  • s_MirroredWhenRightToLeftProperty : AnimatedIconProperties , AnimatedIconSourceProperties
  • s_ModeProperty : TwoPaneViewProperties , SwipeItemsProperties
  • s_MultiplierProperty : CornerRadiusToThicknessConverterProperties
  • s_MultiSelectModeProperty : ItemContainerProperties
  • s_NegativeContentHeightProperty : ExpanderTemplateSettingsProperties
  • s_NextButtonCommandProperty : PagerControlProperties
  • s_NextButtonStyleProperty : PagerControlProperties , PipsPagerProperties
  • s_NextButtonVisibilityProperty : PagerControlProperties , PipsPagerProperties
  • s_noOpCorrelationId : ScrollPresenter , ScrollView
  • s_NormalPipStyleProperty : PipsPagerProperties
  • s_noScroll : ScrollPresenterAutomationPeer
  • s_NumberFormatterProperty : NumberBoxProperties
  • s_NumberOfPagesProperty : PagerControlProperties , PipsPagerProperties
  • s_NumberPanelItemsProperty : PagerControlTemplateSettingsProperties
  • s_OpenAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_OpenAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_OpenPaneLengthProperty : NavigationViewTemplateSettingsProperties , NavigationViewProperties
  • s_OrientationProperty : ColorPickerProperties , FlowLayoutProperties , InkToolBarProperties , PipsPagerProperties , RefreshVisualizerProperties , StackLayoutProperties , UniformGridLayoutProperties
  • s_originTemplateProperty : RecyclePool
  • s_OverflowButtonVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_OverflowContentClipRectProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_OverflowLabelModeProperty : NavigationViewProperties
  • s_PaddingProperty : LayoutPanelProperties
  • s_PagerInputCommandProperty : PagerControlProperties
  • s_PagesProperty : PagerControlTemplateSettingsProperties
  • s_PaletteProperty : InkToolBarPenButtonProperties
  • s_Pane1LengthProperty : TwoPaneViewProperties
  • s_Pane1Property : TwoPaneViewProperties
  • s_Pane2LengthProperty : TwoPaneViewProperties
  • s_Pane2Property : TwoPaneViewProperties
  • s_PaneCustomContentProperty : NavigationViewProperties
  • s_PaneDisplayModeProperty : NavigationViewProperties
  • s_PaneFooterProperty : NavigationViewProperties
  • s_PaneHeaderProperty : NavigationViewProperties
  • s_PanePriorityProperty : TwoPaneViewProperties
  • s_PaneTitleProperty : NavigationViewProperties
  • s_PaneToggleButtonStyleProperty : NavigationViewProperties
  • s_PaneToggleButtonVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_PaneToggleButtonWidthProperty : NavigationViewTemplateSettingsProperties
  • s_PenButtonProperty : InkToolBarPenConfigurationControlProperties
  • s_pipButtonHandlersProperty : PipsPager
  • s_PipsPagerItemsProperty : PipsPagerTemplateSettingsProperties
  • s_PlaceholderGlyphProperty : RatingItemFontInfoProperties
  • s_PlaceholderImageProperty : RatingItemImageInfoProperties
  • s_PlaceholderTextProperty : NumberBoxProperties
  • s_PlaceholderValueProperty : RatingControlProperties
  • s_PlacementMarginProperty : TeachingTipProperties
  • s_PlaybackRateProperty : AnimatedVisualPlayerProperties
  • s_PointerOverGlyphProperty : RatingItemFontInfoProperties
  • s_PointerOverImageProperty : RatingItemImageInfoProperties
  • s_PointerOverPlaceholderGlyphProperty : RatingItemFontInfoProperties
  • s_PointerOverPlaceholderImageProperty : RatingItemImageInfoProperties
  • s_PoolInstanceProperty : RecyclePoolProperties , RecyclePool
  • s_PreferredPlacementProperty : TeachingTipProperties
  • s_PreferSmallImageProperty : PersonPictureProperties
  • s_PrefixTextProperty : PagerControlProperties
  • s_pressSpotLightStates : RevealHoverLight
  • s_PreventKeyboardDisplayOnProgrammaticFocusProperty : NumberBoxProperties
  • s_PreviousButtonCommandProperty : PagerControlProperties
  • s_PreviousButtonStyleProperty : PagerControlProperties , PipsPagerProperties
  • s_PreviousButtonVisibilityProperty : PagerControlProperties , PipsPagerProperties
  • s_PreviousColorProperty : ColorPickerProperties
  • s_ProfilePictureProperty : PersonPictureProperties
  • s_ProtractorProperty : InkToolBarStencilButtonProperties
  • s_PullDirectionProperty : RefreshContainerProperties
  • s_RadiusXProperty : RadialGradientBrushProperties
  • s_RadiusYProperty : RadialGradientBrushProperties
  • s_ReplacementColorProperty : MonochromaticOverlayPresenterProperties
  • s_reuseKeyProperty : RecyclePool
  • s_revealHoverSpotlightStates : RevealHoverLight
  • s_RightItemsProperty : SwipeControlProperties
  • s_RowSpacingProperty : ColumnMajorUniformToLargestGridLayoutProperties
  • s_RulerProperty : InkToolBarStencilButtonProperties
  • s_ScaleProperty : CornerRadiusFilterConverterProperties
  • s_scalePropertyName : ScrollInputHelper
  • s_ScrollPresenterProperty : ScrollViewProperties
  • s_ScrollViewProperty : ItemsViewProperties
  • s_SelectedBrushIndexProperty : InkToolBarPenButtonProperties
  • s_SelectedBrushProperty : InkToolBarPenButtonProperties
  • s_SelectedEraserProperty : InkToolBarEraserButtonProperties
  • s_SelectedIndexProperty : RadioButtonsProperties , TabViewProperties
  • s_SelectedItemProperty : ItemsViewProperties , TreeViewProperties , RadioButtonsProperties , TabViewProperties , NavigationViewProperties , SelectorBarProperties
  • s_SelectedPageIndexProperty : PagerControlProperties , PipsPagerProperties
  • s_SelectedPipStyleProperty : PipsPagerProperties
  • s_SelectedStencilProperty : InkToolBarStencilButtonProperties
  • s_SelectedStrokeWidthProperty : InkToolBarPenButtonProperties
  • s_SelectionFlyoutProperty : NumberBoxProperties
  • s_SelectionFollowsFocusProperty : NavigationViewProperties
  • s_SelectionHighlightColorProperty : NumberBoxProperties
  • s_selectionMap : RadioMenuFlyoutItem
  • s_SelectionModeProperty : TreeViewProperties , ItemsViewProperties
  • s_SelectsOnInvokedProperty : NavigationViewItemProperties
  • s_SettingsItemProperty : NavigationViewProperties
  • s_SeverityProperty : InfoBarProperties
  • s_ShapeProperty : ColorSpectrumProperties
  • s_ShouldConstrainToRootBoundsProperty : TeachingTipProperties
  • s_ShoulderNavigationEnabledProperty : NavigationViewProperties
  • s_ShowErrorProperty : ProgressBarProperties
  • s_ShowPausedProperty : ProgressBarProperties
  • s_SingleSelectionFollowsFocusProperty : NavigationViewTemplateSettingsProperties
  • s_SmallChangeProperty : AnnotatedScrollBarProperties , NumberBoxProperties
  • s_SmallerIconWidthProperty : NavigationViewItemPresenterTemplateSettingsProperties
  • s_SmallerPaneToggleButtonWidthProperty : NavigationViewTemplateSettingsProperties
  • s_SmallLibrary : PictureLibrary
  • s_SourceElementProperty : MonochromaticOverlayPresenterProperties
  • s_SourceProperty : AnimatedIconProperties , AnimatedVisualPlayerProperties , ParallaxViewProperties , WebView2Properties , AnimatedIconSourceProperties , ImageIconProperties
  • s_SpacingProperty : StackLayoutProperties
  • s_SpinButtonPlacementModeProperty : NumberBoxProperties
  • s_SpreadMethodProperty : RadialGradientBrushProperties
  • s_StateProperty : RevealBrushProperties , RefreshVisualizerProperties , AnimatedIconProperties
  • s_StretchProperty : AnimatedVisualPlayerProperties
  • s_SubtitleProperty : TitleBarProperties , TeachingTipProperties
  • s_SuffixTextProperty : PagerControlProperties
  • s_SystemBackdropProperty : CommandBarFlyoutCommandBarProperties
  • s_TabGeometryProperty : TabViewItemTemplateSettingsProperties
  • s_TabItemsProperty : TabViewProperties
  • s_TabItemsSourceProperty : TabViewProperties
  • s_TabItemTemplateProperty : TabViewProperties
  • s_TabItemTemplateSelectorProperty : TabViewProperties
  • s_TabStripFooterProperty : TabViewProperties
  • s_TabStripFooterTemplateProperty : TabViewProperties
  • s_TabStripHeaderProperty : TabViewProperties
  • s_TabStripHeaderTemplateProperty : TabViewProperties
  • s_TabViewTemplateSettingsProperty : TabViewItemProperties
  • s_tabViewWithTearOutList : TabView
  • s_TabWidthModeProperty : TabViewProperties
  • s_tabWithTearOutListMutex : TabView
  • s_tailOcclusionAmount : TeachingTip
  • s_TailVisibilityProperty : TeachingTipProperties
  • s_TallModeConfigurationProperty : TwoPaneViewProperties
  • s_TargetInkCanvasProperty : InkToolBarProperties
  • s_TargetInkPresenterProperty : InkToolBarProperties
  • s_TargetProperty : TeachingTipProperties
  • s_TargetThemeProperty : RevealBrushProperties
  • s_TemplateSettingsProperty : TeachingTipProperties , InfoBadgeProperties , InfoBarProperties , NavigationViewProperties , PagerControlProperties , ProgressRingProperties , TitleBarProperties , PersonPictureProperties , ExpanderProperties , ProgressBarProperties , NavigationViewItemPresenterProperties , PipsPagerProperties
  • s_testHooks : SwipeTestHooks , ItemsViewTestHooks , ScrollPresenterTestHooks , ScrollViewTestHooks , MUXControlsTestHooks , AnimatedIconTestHooks , TeachingTipTestHooks , RadioButtonsTestHooks , LayoutsTestHooks , RepeaterTestHooks
  • s_TextAlignmentProperty : NumberBoxProperties
  • s_TextProperty : SwipeItemProperties , NumberBoxProperties , SelectorBarItemProperties
  • s_TextReadingOrderProperty : NumberBoxProperties
  • s_TintColorProperty : AcrylicBrushProperties
  • s_TintLuminosityOpacityProperty : AcrylicBrushProperties
  • s_TintOpacityProperty : AcrylicBrushProperties
  • s_TintTransitionDurationProperty : AcrylicBrushProperties
  • s_TitleProperty : TeachingTipProperties , TitleBarProperties , InfoBarProperties , MenuBarItemProperties
  • s_tlsInstanceNoRef : LifetimeHandler
  • s_TopItemsProperty : SwipeControlProperties
  • s_TopLeftHighlightMarginProperty : TeachingTipTemplateSettingsProperties
  • s_TopPaddingProperty : NavigationViewTemplateSettingsProperties
  • s_TopPaneVisibilityProperty : NavigationViewTemplateSettingsProperties
  • s_TopRightHighlightMarginProperty : TeachingTipTemplateSettingsProperties
  • s_translationAndZoomFactorAnimationsRestartTicks : ScrollPresenter
  • s_TreeViewItemTemplateSettingsProperty : TreeViewItemProperties
  • s_typeEntriesMutex : XamlMetadataProvider
  • s_UnsetGlyphProperty : RatingItemFontInfoProperties
  • s_UnsetImageProperty : RatingItemImageInfoProperties
  • s_untargetedTipWindowEdgeMargin : TeachingTip
  • s_UseCompactResourcesProperty : XamlControlsResourcesProperties
  • s_ValidationModeProperty : NumberBoxProperties
  • s_ValueProperty : InfoBadgeProperties , RatingControlProperties , NumberBoxProperties , ProgressRingProperties
  • s_velocityNeededPerPixel : IScrollControllerAdapter
  • s_VerticalAnchorRatioProperty : ScrollViewProperties , ScrollPresenterProperties
  • s_VerticalCacheLengthProperty : ItemsRepeaterProperties
  • s_verticalOffsetPropertyName : ScrollInputHelper
  • s_VerticalOrientationMarginProperty : InfoBarPanelProperties
  • s_VerticalOrientationPaddingProperty : InfoBarPanelProperties
  • s_VerticalScrollBarVisibilityProperty : ScrollViewProperties
  • s_VerticalScrollChainModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_VerticalScrollControllerProperty : ItemsViewProperties
  • s_VerticalScrollModeProperty : ScrollViewProperties , ScrollPresenterProperties
  • s_VerticalScrollRailModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • s_VerticalShiftProperty : ParallaxViewProperties
  • s_VerticalSourceEndOffsetProperty : ParallaxViewProperties
  • s_VerticalSourceOffsetKindProperty : ParallaxViewProperties
  • s_VerticalSourceStartOffsetProperty : ParallaxViewProperties
  • s_VisualizerProperty : RefreshContainerProperties
  • s_WideModeConfigurationProperty : TwoPaneViewProperties
  • s_WidthExpansionAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionDeltaProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionMoreButtonAnimationEndPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WidthExpansionMoreButtonAnimationStartPositionProperty : CommandBarFlyoutCommandBarTemplateSettingsProperties
  • s_WrapModeProperty : PipsPagerProperties
  • s_ZoomChainModeProperty : ScrollViewProperties , ScrollPresenterProperties
  • s_ZoomLevelProperty : MapControlProperties
  • s_ZoomModeProperty : ScrollPresenterProperties , ScrollViewProperties
  • SaturationLabelAutomationId : ColorPickerTests
  • SaturationTextBoxAutomationId : ColorPickerTests
  • sc_ambientContributionColor : RevealBrush
  • sc_blurRadius : AcrylicBrush
  • sc_colorToAlphaMatrix : RevealBrush
  • sc_controllerDefaultBackgroundColor : WebView2
  • sc_defaultColor : RevealBrush , XamlAmbientLight
  • sc_diffuseAmount : RevealBrush
  • sc_diffuseAmountBorder : RevealBrush
  • sc_luminanceToAlphaMatrix : RevealBrush
  • sc_maxFailedToAttachLightsCount : MaterialHelper
  • sc_noiseOpacity : AcrylicBrush
  • sc_saturation : AcrylicBrush
  • sc_specularAmount : RevealBrush
  • sc_specularAmountBorder : RevealBrush
  • sc_specularShine : RevealBrush
  • sc_specularShineBorder : RevealBrush
  • scrollBar : ScrollBarController
  • scrolledElement : CanvasScrollControllerConsumer
  • scrollPresenter : ScrollPresenterLeakDetectionPage , ScrollPresenterDynamicPage , DynamicPage
  • scrollPresenter3ZoomFactorChangeCorrelationId : ScrollPresenterChainingAndRailingPage
  • scrollPresenter52ZoomFactorChangeCorrelationId : ScrollPresentersWithSimpleContentsPage
  • scrollPresenterAutomationPeer : ScrollPresenterAccessibilityPage
  • scrollPresenterOffset : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • scrollPresenterOffsetChangeAmount : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • scrollPresenterPointerWheelChangedEventHandler : ScrollViewDynamicPage
  • scrollPresenterUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • scrollStartingCount : ScrollPresenterTests
  • scrollView : ScrollViewDynamicPage , ScrollViewWithScrollControllersPage
  • scrollView52ZoomFactorChangeCorrelationId : ScrollViewsWithSimpleContentsPage
  • scrollViewerOffsetButton : TeachingTipTestPageElements
  • scrollViewerOffsetTextBox : TeachingTipTestPageElements
  • scrollViewerStateTextBox : TeachingTipTestPageElements
  • scrollViewPointerWheelChangedEventHandler : ScrollViewDynamicPage
  • secondary : SnapPointSortPredicate
  • SelectByIndexButton : RadioButtonsTestPageElements , RadioButtonsFocusTestPageElements
  • SelectByIndexButton2 : RadioButtonsFocusTestPageElements
  • SelectByItemButton : RadioButtonsTestPageElements
  • SelectedIndexTextBlock : RadioButtonsTestPageElements
  • SelectedIndexTextBlock1 : RadioButtonsFocusTestPageElements
  • SelectedIndexTextBlock2 : RadioButtonsFocusTestPageElements
  • SelectedItemTextBlock : RadioButtonsTestPageElements
  • SelectedPositionInSetTextBlock : RadioButtonsTestPageElements
  • SelectedSizeOfSetTextBlock : RadioButtonsTestPageElements
  • selectionEllipse : ColorPickerPage
  • selectionEllipsePanel : ColorPickerPage
  • SelectionModelProperty : SelectionContainer , GroupedRepeaterItem , RepeaterItem , TreeViewItem
  • selectionModeSource : RevealScenarioGrid
  • setActionContentButton : TeachingTipTestPageElements
  • setAutomationNameButton : TeachingTipTestPageElements
  • SetBorderWidthButton : RadioButtonsTestPageElements
  • setCloseButtonContentButton : TeachingTipTestPageElements
  • setHeroContentButton : TeachingTipTestPageElements
  • setIconButton : TeachingTipTestPageElements
  • SetMaxColumnsButton : RadioButtonsTestPageElements
  • SetNumberOfItemsButton : RadioButtonsTestPageElements
  • setPreferredPlacementButton : TeachingTipTestPageElements
  • setSubtitleButton : TeachingTipTestPageElements
  • setTargetButton : TeachingTipTestPageElements
  • settings : RevealSimpleListPage
  • setTipLocationButton : TeachingTipTestPageElements
  • setTitleButton : TeachingTipTestPageElements
  • sharedFlyout : MenuFlyoutPage
  • shouldConstrainToRootBoundsButton : TeachingTipTestPageElements
  • shouldConstrainToRootBoundsComboBox : TeachingTipTestPageElements
  • showButton : TeachingTipTestPageElements
  • showTimer : TeachingTipPage
  • simpleStringsList : BasicDemo
  • Size
: BrightnessSun::BrightnessSun_AnimatedVisual
, LottieLogo::LottieLogo_AnimatedVisual
, ProgressRingDeterminate::AnimatedVisual
  • SizeSliderName : AcrylicBrushTests , RevealBrushTests
  • SlideInDistance : LinedFlowLayoutItemCollectionTransitionProvider
  • slider : RefreshInfoProviderImplementation
  • SmallChangeAdditionalVelocity : BiDirectionalScrollController , CompositionScrollController
  • SmallChangeInertiaDecayRate : CompositionScrollController , BiDirectionalScrollController
  • snapPointColumnHeight : ScrollPresenterScrollSnapPointsPage
  • snapPointColumns : ScrollPresenterScrollSnapPointsPage
  • snapPointColumnWidth : ScrollPresenterScrollSnapPointsPage
  • source : RevealSimpleListPage
  • SourceComboBox : RadioButtonsTestPageElements
  • SourceForRepeater : SortingAndFilteringPage
  • sp1 : ScrollViewDynamicPage
  • sp2 : ScrollViewDynamicPage
  • spectrumRectangle : ColorPickerPage
  • SquareCollection : AnnotatedScrollBarRangeBasePage , AnnotatedScrollBarSummaryPage , AnnotatedScrollBarIScrollControllerPage
  • Status1 : WebView2Common
  • Status2 : WebView2Common
  • Status3 : WebView2Common
  • statusReportingTextBox : CommandBarFlyoutTests::CommandBarFlyoutTestSetupHelper
  • SubHeader : RevealItem , RevealScenarioItem , RevealGridItem
  • subItemChangeTimer : MenuFlyoutPage
  • subItemsToToggle : MenuFlyoutPage
  • subtitleComboBox : TeachingTipTestPageElements
  • subtitleVisibilityTextBlock : TeachingTipTestPageElements
  • suggestions : AutoSuggestBoxPage
  • suppressSelectionNextNumber : NavigationViewTopNavStorePage
  • SwitchTargetButton : TeachingTipTestPageElements
  • symbolIconSource : MultipleTabViewPage
  • SyncRoot : MyCollection
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- t -

  • tabCount : MultipleTabViewPage
  • tabDataItemIdentifier : MultipleTabViewPage
  • TableSize : CMethodProfileGroup< size >
  • targetBoundsButton : TeachingTipTestPageElements
  • TargetElementAutomationId : ButtonInteractionTests
  • targetHeightTextBlock : TeachingTipTestPageElements
  • targetWidthTextBlock : TeachingTipTestPageElements
  • targetXOffsetTextBlock : TeachingTipTestPageElements
  • targetYOffsetTextBlock : TeachingTipTestPageElements
  • teachingTipAlternateCloseButton : TeachingTipTestPageElements
  • teachingTipCloseButton : TeachingTipFocusTestPageElements , TeachingTipTestPageElements
  • TeachingTipInResourcesRoot : TeachingTipPage
  • TeachingTipInVisualTreeRoot : TeachingTipPage
  • tearOutWindow : TabViewTearOutWindowWithoutDataItems
  • Template : RevealGridTypeItem
  • tertiary : SnapPointSortPredicate
  • TestExecuteCommand : SplitButtonPage
  • TestInfoDictionary : WebView2BasicPage
  • TestPageNames : WebView2BasicPage
  • TestRadioButtons : RadioButtonsTestPageElements
  • TestRadioButtons1 : RadioButtonsFocusTestPageElements
  • TestRadioButtons2 : RadioButtonsFocusTestPageElements
  • testScreenBounds : TeachingTipPage
  • testScreenBoundsHeightTextBox : TeachingTipTestPageElements
  • testScreenBoundsWidthTextBox : TeachingTipTestPageElements
  • testScreenBoundsXTextBox : TeachingTipTestPageElements
  • testScreenBoundsYTextBox : TeachingTipTestPageElements
  • testWindowBounds : TeachingTipPage
  • testWindowBoundsHeightTextBox : TeachingTipTestPageElements
  • testWindowBoundsWidthTextBox : TeachingTipTestPageElements
  • testWindowBoundsXTextBox : TeachingTipTestPageElements
  • testWindowBoundsYTextBox : TeachingTipTestPageElements
  • textBlock : ScrollViewerPage , ScrollPresenterDynamicPage
  • Theme : RevealThemeItem
  • themeSource : RevealScenarios
  • themingComboBox : TeachingTipTestPageElements
  • ThirdDimensionAutomationId : ColorPickerTests
  • this : ReadOnlyNotifyPropertyChangedCollection-g< T >
  • thumbOffsetAnimation : CompositionScrollControllerPanningInfo
  • tilePanel : ScrollViewerPage , ScrollPresenterDynamicPage
  • timer : RefreshContainerOnImagePage , RefreshVisualizerPage , RefreshInfoProviderImplementation , ScrollPresenterRepeaterAnchoringPage , ScrollPresenterStackPanelAnchoringPage , TeachingTipPage
  • TintOpacitySliderName : RevealBrushTests , AcrylicBrushTests
  • tipFollowsTargetCheckBox : TeachingTipTestPageElements
  • tipLocation : TeachingTipPage
  • tipLocationComboBox : TeachingTipTestPageElements
  • tipWidthTextBlock : TeachingTipTestPageElements
  • title : ColorItem
  • titleComboBox : TeachingTipTestPageElements
  • TitleProperty : AnimatedIconHost , ToggleAnimatedIconHost
  • titleVisibilityTextBlock : TeachingTipTestPageElements
  • Top : WebView2RenderingVerifier::NativeMethods::RECT
  • TotalNumberOfDisplayedObjects : PipsPagerExamples
  • Tree : BreadcrumbBarPage
  • treeViewFolder : VisualPropertiesPage
  • txtMISnapPointValueUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointEndUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointIntervalUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointOffsetUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • txtMRSnapPointStartUIObject : ScrollPresenterTestsWithInputHelper::ScrollSnapPointsTestPageElements
  • Type : MathToken
  • typeName : Entry
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- u -

  • UIA_FlowsFromPropertyId : CommandBarFlyoutTests
  • UIA_FlowsToPropertyId : CommandBarFlyoutTests
  • UIA_PositionInSetPropertyId : CommandBarFlyoutTests
  • UIA_SizeOfSetPropertyId : CommandBarFlyoutTests
  • uncheckedRevoker : ChildHandlers
  • unknownColor : AcrylicBrushTests
  • UpdateMarginTextBlockButton : PagerControlTestPageElements
  • useTestScreenBoundsCheckbox : TeachingTipTestPageElements
  • useTestWindowBoundsCheckbox : TeachingTipTestPageElements
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- v -

  • value : is_flags_enum< T > , is_flags_enum< PointerOverStatus >
  • Value : RevealBackgroundItem , MathToken
  • value : is_flags_enum< PointerPressedStatus >
  • ValueLabelAutomationId : ColorPickerTests
  • ValueTextBoxAutomationId : ColorPickerTests
  • verticalDecrementRepeatButton : BiDirectionalScrollController , CompositionScrollController
  • VerticalElementAutomationId : SliderInteractionTests
  • verticalGrid : CompositionScrollController
  • verticalIncrementRepeatButton : BiDirectionalScrollController , CompositionScrollController
  • VerticalLargeChangeTextBlockAutomationId : SliderInteractionTests
  • VerticalMaximumTextBlockAutomationId : SliderInteractionTests
  • VerticalMinimumTextBlockAutomationId : SliderInteractionTests
  • VerticalOrientationPipsPagerButtonHeightTextBlock : PipsPagerElements
  • VerticalOrientationPipsPagerButtonWidthTextBlock : PipsPagerElements
  • verticalOrientationPipsPagerRepeater : PipsPagerPage
  • VerticalPositionTextBlockAutomationId : SliderInteractionTests
  • verticalPS : CanvasScrollControllerConsumer
  • verticalScrollController : BiDirectionalScrollController , ScrollPresenterWithSimpleScrollControllersPage , CanvasScrollControllerConsumer
  • VerticalSmallChangeTextBlockAutomationId : SliderInteractionTests
  • verticalStackPanel : ScrollPresenterDynamicPage , ScrollViewerPage
  • verticalThumb : CompositionScrollController
  • View : MainWindowLightConfiguration , SecondaryWindowLightConfiguration
  • viewbox : ScrollPresenterDynamicPage , ScrollViewDynamicPage , ScrollViewerPage
  • viewChangedCount : ScrollPresenterTests
  • viewers : VisualStatesPage
  • viewModel : TreeViewItemsSourceTestPage
  • ViewportChanged : IRepeaterScrollingSurface
  • viewportLength : CompositionScrollController
  • vIndicatorHeightExpression : ScrollPresenterExpressionAnimationSourcesPage
  • vIndicatorOffsetExpression : ScrollPresenterExpressionAnimationSourcesPage
  • VirtualizingTestRootNode : TreeViewUnrealizedChildrenTestPage
  • visual : MockAnimatedIconSource , MockIAnimatedIconSource2
  • visualInteractionSource : ImageIRefreshInfoProviderAdapter
  • visualizerTimer : RefreshContainerPage
  • vScrollBarVisual : ScrollPresenterExpressionAnimationSourcesPage
  • vScrollIndicatorSpriteVisual : ScrollPresenterExpressionAnimationSourcesPage
  • vScrollIndicatorVisual : ScrollPresenterExpressionAnimationSourcesPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- w -

  • waitingForColorChanged : ColorPickerTests::ColorPickerTestSetupHelper
  • WrapModeComboBox : PipsPagerElements
  • WrappedProtectedCursor : WebView2WithCursor
  • wuxBorder : ScrollViewDynamicPage
  • wuxButton : ScrollViewDynamicPage
  • wuxLargeImg : ScrollViewDynamicPage
  • wuxRectangle : ScrollViewDynamicPage
  • wuxSp1 : ScrollViewDynamicPage
  • wuxSp2 : ScrollViewDynamicPage
  • wuxViewbox : ScrollViewDynamicPage
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- x -

  • xamlType : Entry
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members - Variables

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Properties
  • Events
  • Related Functions
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

- y -

  • YearType : RecipeElementFactory
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- k -

  • KeyDown : RoutedEventHelpers.h
  • KEYWORD_ANNOTATEDSCROLLBAR : MuxcTraceLogging.h
  • KEYWORD_COMMANDBARFLYOUT : MuxcTraceLogging.h
  • KEYWORD_INKTOOLBAR : MuxcTraceLogging.h
  • KEYWORD_ITEMCONTAINER : MuxcTraceLogging.h
  • KEYWORD_ITEMSREPEATER : MuxcTraceLogging.h
  • KEYWORD_ITEMSVIEW : MuxcTraceLogging.h
  • KEYWORD_LINEDFLOWLAYOUT : MuxcTraceLogging.h
  • KEYWORD_NAVIGATIONVIEW : MuxcTraceLogging.h
  • KEYWORD_PTR : MuxcTraceLogging.h
  • KEYWORD_SCROLLPRESENTER : MuxcTraceLogging.h
  • KEYWORD_SCROLLVIEW : MuxcTraceLogging.h
  • KEYWORD_SELECTORBAR : MuxcTraceLogging.h
  • KEYWORD_SWIPECONTROL : MuxcTraceLogging.h
  • KEYWORD_TABVIEW : MuxcTraceLogging.h
  • KEYWORD_WEBVIEW2 : MuxcTraceLogging.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- l -

  • Large : ColorHelpers.h
  • Layout : VirtualizationInfo.h
  • LayoutRound() : ProgressBar.cpp
  • Left : MenuBarItem.h , SwipeControl.h
  • LeftFooter : NavigationViewHelper.h
  • LeftListView : NavigationViewHelper.h
  • LeftMouseButton : PointerInfo.h
  • LeftNav : NavigationViewHelper.h
  • LeftRight : TwoPaneView.h
  • Linear : SpotLightStateHelper.h
  • LinearAttenuation : SpotLightStateHelper.h
  • LINEDFLOWLAYOUT_TRACE_INFO : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_INFO_DBG : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_INFO_ENABLED : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_PERF : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_PERF_DBG : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_VERBOSE : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED : LinedFlowLayoutTrace.h
  • LOC_PREFIX : ResourceAccessor.cpp
  • LOC_PREFIX_WINUI : ResourceAccessor.cpp
  • LoggingProviderEnabledCallback() : MuxcTraceLogging.cpp
  • LosingFocus : RoutedEventHelpers.h
  • Lower : ColorHelpers.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- m -

  • m_dropIndex() : TabView.cpp
  • m_fromProgress() : AnimatedVisualPlayer.cpp
  • m_looped() : AnimatedVisualPlayer.cpp
  • m_newBounds() : ItemCollectionTransition.cpp
  • m_oldBounds() : ItemCollectionTransition.cpp
  • M_PI : pch.h
  • M_PI_2 : pch.h
  • m_tabs() : TabView.cpp
  • m_toProgress() : AnimatedVisualPlayer.cpp
  • m_triggers() : ItemCollectionTransition.cpp
  • MakeAnimation() : AnimationUtility.h
  • MakeAnimation< float >() : AnimationUtility.h
  • MakeAnimation< winrt::Color >() : AnimationUtility.h
  • MakeVectorParam() : Vector.h
  • MakeVectorParamImpl() : Vector.h
  • MathTokenType : NumberBoxParser.h
  • MAX_BFS_DEPTH : RefreshContainer.cpp , ScrollViewerIRefreshInfoProviderAdapter.cpp
  • METH_NAME : MuxcTraceLogging.h
  • MICROSOFT_EVENTTAG_AGGREGATE : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_CORE_DATA : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_COSTDEFERRED_LATENCY : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_CRITICAL_PERSISTENCE : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_DROP_PII : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_DROP_PII_EXCEPT_IP : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_DROP_USER_IDS : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_HASH_PII : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_INJECT_XTOKEN : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_MARK_PII : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_NORMAL_LATENCY : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_NORMAL_PERSISTENCE : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_REALTIME_LATENCY : MicrosoftTelemetry.h
  • MICROSOFT_FIELDTAG_DROP_PII : MicrosoftTelemetry.h
  • MICROSOFT_FIELDTAG_HASH_PII : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_CRITICAL_DATA : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_MEASURES : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_RESERVED_44 : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_TELEMETRY : MicrosoftTelemetry.h
  • Minimal : NavigationViewHelper.h
  • MinimalWithBackButton : NavigationViewHelper.h
  • MINIMUM_INDICATOR_OPACITY : RefreshVisualizer.cpp
  • Mouse : PointerInfo.h
  • MUX_ASSERT : pch.h
  • MUX_ASSERT_MSG : pch.h
  • MUX_ASSERT_NOASSUME : pch.h
  • MUX_CATCH_RETURN : ErrorHandling.h
  • MUX_FAIL_FAST : pch.h
  • MUX_FAIL_FAST_MSG : pch.h
  • MUXCONTROLS_NAMESPACE : BuildMacros.h
  • MUXCONTROLS_VERSION_ATTRIBUTE : microsoft.ui.private.composition.effects.idl
  • MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL : microsoft.ui.private.composition.effects.idl
  • MUXCONTROLS_VERSION_PARAM : microsoft.ui.private.composition.effects.idl
  • MUXCONTROLSMEDIA_NAMESPACE_STR : BuildMacros.h
  • MUXCONTROLSROOT_NAMESPACE_STR : BuildMacros.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- n -

  • NavigationRecommendedTransitionDirection : NavigationView.h
  • NAVIGATIONVIEW_TRACE_INFO : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_INFO_DBG : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_INFO_ENABLED : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_PERF : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_PERF_DBG : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_VERBOSE : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_VERBOSE_DBG : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED : NavigationViewTrace.h
  • NavigationViewPropagateTarget : NavigationViewHelper.h
  • NavigationViewRepeaterPosition : NavigationViewHelper.h
  • NavigationViewSplitVectorID : TopNavigationViewDataProvider.h
  • NavigationViewVisualStateDisplayMode : NavigationViewHelper.h
  • NOMINMAX : pch.h
  • None : TwoPaneView.h , TextCommandBarFlyout.h , PointerInfo.h , tracker_ref.h , InteractionTrackerAsyncOperation.h , RatingControl.h , SwipeControl.h , SpotLightStateHelper.h , Vector.h
  • NotInitialized : TopNavigationViewDataProvider.h
  • NoTrackerRef : Vector.h
  • NotSelected : SelectionNode.h
  • NTDDI_VERSION : targetver.h
  • Null : RatingControl.h
  • Numeric : NumberBoxParser.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- o -

  • Observable : Vector.h
  • Offset : SpotLightStateHelper.h
  • OnAttachedIsTargetPropertyChanged() : IsTargetDPHelper.h
  • Opacity : CommandBarFlyoutCommandBar.h
  • Operator : NumberBoxParser.h
  • operator&() : Flags_Enum.h
  • operator<() : tracker_ref.h
  • operator<<() : Flags_Enum.h
  • operator>>() : Flags_Enum.h
  • operator^() : Flags_Enum.h
  • operator|() : Flags_Enum.h
  • operator~() : Flags_Enum.h
  • Other : InitialsGenerator.h
  • OuterAngleScale : SpotLightStateHelper.h
  • OuterConeAngle : SpotLightStateHelper.h
  • OuterConeAngleInDegrees : SpotLightStateHelper.h
  • OuterConeColor : SpotLightStateHelper.h
  • OuterConeIntensity : SpotLightStateHelper.h
  • OverflowList : TopNavigationViewDataProvider.h
  • OverflowListView : NavigationViewHelper.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- a -

  • Absolute : ViewChange.h
  • AddRoutedEventHandler() : RoutedEventHelpers.h
  • All : NavigationViewHelper.h
  • ALWAYS_RAISE_INTERACTION_RATIO_TOLERANCE : RefreshInfoProviderImpl.cpp
  • Animate : SpotLightStateHelper.h
  • AnimateTo() : AnimationUtility.h
  • Animator : VirtualizationInfo.h
  • ANNOTATEDSCROLLBAR_TRACE_INFO : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_INFO_DBG : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_PERF : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_PERF_DBG : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_VERBOSE : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_VERBOSE_DBG : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED : AnnotatedScrollBarTrace.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- b -

  • Bindable : Vector.h
  • Bold : TextCommandBarFlyout.h
  • Bottom : SwipeControl.h
  • BottomTop : TwoPaneView.h
  • BringIntoViewRequest : InteractionTrackerAsyncOperation.h
  • ButtonVisibility : PipsPager.cpp
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- c -

  • c_ApplicationViewModeSpanning : DisplayRegionHelper.cpp
  • c_AutoDisplayModeNumberOfPagesThreshold : PagerControl.cpp
  • c_captionTopMarginIntercept : RatingControl.cpp
  • c_captionTopMarginSlope : RatingControl.cpp
  • c_comboBoxName : PagerControl.cpp
  • c_comboBoxVisibleVisualState : PagerControl.cpp
  • c_edgeDetectionTolerance : ScrollPresenterAnchoring.cpp
  • c_finiteItemsModeState : PagerControl.cpp
  • c_firstPageButtonDisabledVisualState : PagerControl.cpp
  • c_firstPageButtonEnabledVisualState : PagerControl.cpp
  • c_firstPageButtonHiddenVisualState : PagerControl.cpp
  • c_firstPageButtonName : PagerControl.cpp
  • c_firstPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_firstPageButtonVisibleVisualState : PagerControl.cpp
  • c_fontSizeForRenderingKey : RatingControl.cpp
  • c_frame1point1 : NavigationView.cpp
  • c_frame1point2 : NavigationView.cpp
  • c_frame2point1 : NavigationView.cpp
  • c_frame2point2 : NavigationView.cpp
  • c_horizontalScaleAnimationCenterPoint : RatingControl.cpp
  • c_infiniteItemsModeState : PagerControl.cpp
  • c_infiniteModeComboBoxItemsIncrement : PagerControl.cpp
  • c_itemSpacingKey : RatingControl.cpp
  • c_lastPageButtonDisabledVisualState : PagerControl.cpp
  • c_lastPageButtonEnabledVisualState : PagerControl.cpp
  • c_lastPageButtonHiddenVisualState : PagerControl.cpp
  • c_lastPageButtonName : PagerControl.cpp
  • c_lastPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_lastPageButtonVisibleVisualState : PagerControl.cpp
  • c_maxNonAnimatedOperationTicks : InteractionTrackerAsyncOperation.h
  • c_maxRegions : DisplayRegionHelper.h
  • c_mouseOverScale : RatingControl.cpp
  • c_nextPageButtonCollapsedVisualState : PipsPager.cpp
  • c_nextPageButtonDisabledVisualState : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonEnabledVisualState : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonHiddenVisualState : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonName : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_nextPageButtonVisibleVisualState : PagerControl.cpp , PipsPager.cpp
  • c_noPointerOverMagicNumber : RatingControl.cpp
  • c_noValueSetSentinel : RatingControl.cpp
  • c_numberBoxName : PagerControl.cpp
  • c_numberBoxVisibleVisualState : PagerControl.cpp
  • c_numberPanelIndicatorName : PagerControl.cpp
  • c_numberPanelRepeaterName : PagerControl.cpp
  • c_numberPanelVisibleVisualState : PagerControl.cpp
  • c_pipsPagerButtonHorizontalOrientationVisualState : PipsPager.cpp
  • c_pipsPagerButtonVerticalOrientationVisualState : PipsPager.cpp
  • c_pipsPagerHorizontalOrientationButtonHeightPropertyName : PipsPager.cpp
  • c_pipsPagerHorizontalOrientationButtonWidthPropertyName : PipsPager.cpp
  • c_pipsPagerHorizontalOrientationVisualState : PipsPager.cpp
  • c_pipsPagerRepeaterName : PipsPager.cpp
  • c_pipsPagerScrollViewerName : PipsPager.cpp
  • c_pipsPagerVerticalOrientationButtonHeightPropertyName : PipsPager.cpp
  • c_pipsPagerVerticalOrientationButtonWidthPropertyName : PipsPager.cpp
  • c_pipsPagerVerticalOrientationVisualState : PipsPager.cpp
  • c_previousPageButtonCollapsedVisualState : PipsPager.cpp
  • c_previousPageButtonDisabledVisualState : PipsPager.cpp , PagerControl.cpp
  • c_previousPageButtonEnabledVisualState : PagerControl.cpp , PipsPager.cpp
  • c_previousPageButtonHiddenVisualState : PagerControl.cpp , PipsPager.cpp
  • c_previousPageButtonName : PagerControl.cpp , PipsPager.cpp
  • c_previousPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_previousPageButtonVisibleVisualState : PagerControl.cpp , PipsPager.cpp
  • c_queuedOperationTicks : InteractionTrackerAsyncOperation.h
  • c_renderingEventsPostBringIntoView : ItemsView.cpp
  • c_rootGridName : PagerControl.cpp
  • c_scrollPresenterDefaultInertiaDecayRate : ScrollPresenter.cpp
  • c_scrollPresenterLineDelta : ScrollPresenter.cpp
  • c_touchOverScale : RatingControl.cpp
  • c_verticalScaleAnimationCenterPoint : RatingControl.cpp
  • c_whitespace : NumberBox.cpp
  • CacheBufferPerSideInflationPixelDelta : ViewportManagerWithPlatformFeatures.cpp
  • CancelAsyncAction() : ColorHelpers.cpp , ColorHelpers.h
  • CharacterType : InitialsGenerator.h
  • CheckerSize : ColorHelpers.cpp
  • Clip : CommandBarFlyoutCommandBar.h
  • ColorFromRgba() : ColorConversion.cpp , ColorConversion.h
  • COMMANDBARFLYOUT_TRACE_INFO : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_INFO_DBG : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_INFO_ENABLED : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_PERF : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_PERF_DBG : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_VERBOSE : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_VERBOSE_DBG : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED : CommandBarFlyoutTrace.h
  • CommandBarFlyoutOpenCloseAnimationKind : CommandBarFlyoutCommandBar.h
  • Compact : NavigationViewHelper.h
  • Completed : ViewChangeBase.h
  • ConstantAttenuation : SpotLightStateHelper.h
  • Copy : TextCommandBarFlyout.h
  • CopyArray() : TabView.h
  • CppWinRTActivatableClass : RuntimeClassHelpers.h
  • CppWinRTActivatableClassWithBasicFactory : RuntimeClassHelpers.h
  • CppWinRTActivatableClassWithDPFactory : RuntimeClassHelpers.h
  • CppWinRTActivatableClassWithFactory : RuntimeClassHelpers.h
  • CREATE_XAML_UI_PRESENTER_API : pch.h
  • CreateBitmapFromPixelData() : ColorHelpers.cpp , ColorHelpers.h
  • CreateCheckeredBackgroundAsync() : ColorHelpers.h , ColorHelpers.cpp
  • CreatedContent : SwipeControl.h
  • CreateSpotLightColorsProxy() : SpotLightStateHelper.cpp , SpotLightStateHelper.h
  • CreateSurfaceFromPixelData() : ColorHelpers.h , ColorHelpers.cpp
  • CubicBezier : SpotLightStateHelper.h
  • Cut : TextCommandBarFlyout.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- d -

  • DEBUG_PROVIDER_NAME : MuxcTraceLogging.h
  • DebugSlowDownFactor : LinedFlowLayoutItemCollectionTransitionProvider.h
  • DECLARE_AUTOHANDLE_CLASS : AutoHandle.h
  • DECLARE_D2D_GUID : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_DUAL_SOURCES : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS() : TextCommandBarFlyout.h , SharedHelpers.h
  • DECLARE_INTERFACE_IID_() : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_NAMED_PROPERTY_MAPPING : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_POD_PROPERTY : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_SINGLE_SOURCE : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_SOURCE : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_TRACELOGGING_CLASS() : MuxcTraceLogging.h
  • Default : NavigationView.h , SpotLightStateHelper.h
  • DEFAULT_EXECUTION_RATIO : RefreshInfoProviderImpl.h
  • DEFAULT_INDICATOR_SIZE : RefreshVisualizer.cpp
  • DEFAULT_PULL_DIMENSION_SIZE : RefreshContainer.cpp
  • DEFINE_PROFILEGROUP : RuntimeProfiler.cpp
  • DependencyObjectBase : Vector.h
  • Direction : SpotLightStateHelper.h
  • DirectViewChange : InteractionTrackerAsyncOperation.h
  • Disabled : RatingControl.h
  • DragEnter : RoutedEventHelpers.h
  • DraggingTabWithinTabView : TabView.h
  • DraggingTornOutTab : TabView.h
  • DragLeave : RoutedEventHelpers.h
  • Drop : RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- e -

  • E_INVALID_OPERATION : ErrorHandling.h
  • EasingTypes : SpotLightStateHelper.h
  • EFFECT_ENUM_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
  • EFFECT_INTERFACE_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
  • EFFECT_RUNTIMECLASS_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
  • EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL : microsoft.ui.private.composition.effects.idl
  • EFFECT_STRUCT_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
  • ElementFactory : VirtualizationInfo.h
  • ElementOwner : VirtualizationInfo.h
  • Expanded : NavigationViewHelper.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- f -

  • FALLBACK_EXECUTION_RATIO : ScrollViewerIRefreshInfoProviderAdapter.cpp
  • FallbackToComPtrBeforeRS4 : tracker_ref.h
  • FindNextNamedColor() : ColorHelpers.h , ColorHelpers.cpp
  • FlyoutLocation : MenuBarItem.h
  • Font : RatingControl.h
  • ForwardRefToBaseReferenceTracker : RuntimeClassHelpers.h
  • FR_Map_Html : ResourceAccessor.h
  • FromLeft : NavigationView.h
  • FromOverflow : NavigationView.h
  • FromRight : NavigationView.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- g -

  • g_hInstance : dllmain.cpp
  • g_IsLoggingProviderEnabled : MuxcTraceLogging.h
  • g_IsPerfProviderEnabled : MuxcTraceLogging.h
  • g_IsTelemetryProviderEnabled : MuxcTraceLogging.h
  • g_LoggingProviderActivityId : MuxcTraceLogging.h
  • g_LoggingProviderLevel : MuxcTraceLogging.h
  • g_LoggingProviderMatchAnyKeyword : MuxcTraceLogging.h
  • g_PerfProviderActivityId : MuxcTraceLogging.h
  • g_PerfProviderLevel : MuxcTraceLogging.h
  • g_PerfProviderMatchAnyKeyword : MuxcTraceLogging.h
  • g_TelemetryProviderActivityId : MuxcTraceLogging.h
  • g_TelemetryProviderLevel : MuxcTraceLogging.h
  • g_TelemetryProviderMatchAnyKeyword : MuxcTraceLogging.h
  • GetLuminosityColor() : AcrylicBrush.cpp , AcrylicBrush.h
  • GetTemplateChildT() : CppWinRTHelpers.h
  • GettingFocus : RoutedEventHelpers.h
  • GetTintOpacityModifier() : AcrylicBrush.cpp , AcrylicBrush.h
  • gFileVersion : dllmain.cpp , RuntimeProfiler.cpp
  • Glyph : InitialsGenerator.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4 : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_RECT_TO_VECTOR4 : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_UNKNOWN : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ : microsoft.ui.private.composition.effects_impl.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- h -

  • Height : SpotLightStateHelper.h
  • HexToRgb() : ColorConversion.h
  • HexToRgba() : ColorConversion.h , ColorConversion.cpp
  • Higher : ColorHelpers.h
  • Horizontal : OrientationBasedMeasures.h
  • HorizontalScrollControllerRequest : InteractionTrackerAsyncOperation.h
  • HsvToRgb() : ColorConversion.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- i -

  • Idle : TabView.h
  • Ignore : SpotLightStateHelper.h
  • Ignored : ViewChangeBase.h
  • Image : RatingControl.h
  • Implement_IIterator : Vector.h
  • Implement_IObservable : Vector.h
  • Implement_IVector_Modify_Functions : Vector.h
  • Implement_IVector_Read_Functions : Vector.h
  • Implement_Vector : Vector.h
  • Implement_Vector_External : Vector.h
  • Implement_Vector_Read : Vector.h
  • Implement_Vector_Read_NoObservable : Vector.h
  • IncrementAlphaChannel() : ColorHelpers.cpp , ColorHelpers.h
  • IncrementAmount : ColorHelpers.h
  • IncrementColorChannel() : ColorHelpers.cpp , ColorHelpers.h
  • IncrementDirection : ColorHelpers.h
  • INITIAL_OFFSET_THRESHOLD : ScrollViewerIRefreshInfoProviderAdapter.cpp
  • Initialized : NavigationView.h
  • InitializeDependencyProperty() : CppWinRTHelpers.h
  • InitializeIsTargetDependencyProperty() : IsTargetDPHelper.h
  • INKTOOLBAR_TRACE_ERROR : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_INFO : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_INFO_DBG : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_INFO_ENABLED : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_PERF : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_PERF_DBG : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_VERBOSE : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_VERBOSE_DBG : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_VERBOSE_ENABLED : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_WARNING : InkToolBarTrace.h
  • InnerConeAngle : SpotLightStateHelper.h
  • InnerConeAngleInDegrees : SpotLightStateHelper.h
  • InnerConeColor : SpotLightStateHelper.h
  • InnerConeIntensity : SpotLightStateHelper.h
  • InteractionTrackerAsyncOperationTrigger : InteractionTrackerAsyncOperation.h
  • InteractionTrackerAsyncOperationType : InteractionTrackerAsyncOperation.h
  • Interrupted : ViewChangeBase.h
  • InvokableCallback() : InvokableCallbackHelper.h
  • IR_NoiseAsset_256X256_PNG : ResourceAccessor.h
  • IsAnimated() : SpotLightStateHelper.h
  • IsAnnotatedScrollBarPerfTracingEnabled() : AnnotatedScrollBarTrace.h
  • IsAnnotatedScrollBarTracingEnabled() : AnnotatedScrollBarTrace.h
  • IsAnnotatedScrollBarVerboseTracingEnabled() : AnnotatedScrollBarTrace.h
  • IsCommandBarFlyoutTracingEnabled() : CommandBarFlyoutTrace.h
  • IsCommandBarFlyoutVerboseTracingEnabled() : CommandBarFlyoutTrace.h
  • IsCorrectPeerForHwnd() : WebView2AutomationPeer.h
  • IsIgnored() : SpotLightStateHelper.h
  • IsInkToolBarTracingEnabled() : InkToolBarTrace.h
  • IsInkToolBarVerboseTracingEnabled() : InkToolBarTrace.h
  • IsItemContainerPerfTracingEnabled() : ItemContainerTrace.h
  • IsItemContainerTracingEnabled() : ItemContainerTrace.h
  • IsItemContainerVerboseTracingEnabled() : ItemContainerTrace.h
  • IsItemsRepeaterPerfTracingEnabled() : ItemsRepeaterTrace.h
  • IsItemsRepeaterTracingEnabled() : ItemsRepeaterTrace.h
  • IsItemsRepeaterVerboseTracingEnabled() : ItemsRepeaterTrace.h
  • IsItemsViewPerfTracingEnabled() : ItemsViewTrace.h
  • IsItemsViewTracingEnabled() : ItemsViewTrace.h
  • IsItemsViewVerboseTracingEnabled() : ItemsViewTrace.h
  • IsLinedFlowLayoutPerfTracingEnabled() : LinedFlowLayoutTrace.h
  • IsLinedFlowLayoutTracingEnabled() : LinedFlowLayoutTrace.h
  • IsLinedFlowLayoutVerboseTracingEnabled() : LinedFlowLayoutTrace.h
  • IsNavigationViewPerfTracingEnabled() : NavigationViewTrace.h
  • IsNavigationViewTracingEnabled() : NavigationViewTrace.h
  • IsNavigationViewVerboseTracingEnabled() : NavigationViewTrace.h
  • IsPTRPerfTracingEnabled() : PTRTracing.h
  • IsPTRTracingEnabled() : PTRTracing.h
  • IsPTRVerboseTracingEnabled() : PTRTracing.h
  • IsScrollPresenterPerfTracingEnabled() : ScrollPresenterTrace.h
  • IsScrollPresenterTracingEnabled() : ScrollPresenterTrace.h
  • IsScrollPresenterVerboseTracingEnabled() : ScrollPresenterTrace.h
  • IsScrollViewPerfTracingEnabled() : ScrollViewTrace.h
  • IsScrollViewTracingEnabled() : ScrollViewTrace.h
  • IsScrollViewVerboseTracingEnabled() : ScrollViewTrace.h
  • IsSelectorBarPerfTracingEnabled() : SelectorBarTrace.h
  • IsSelectorBarTracingEnabled() : SelectorBarTrace.h
  • IsSelectorBarVerboseTracingEnabled() : SelectorBarTrace.h
  • IsStateAnimated() : SpotLightStateHelper.cpp , SpotLightStateHelper.h
  • IsStateIgnored() : SpotLightStateHelper.h , SpotLightStateHelper.cpp
  • IsSwipeControlPerfTracingEnabled() : SwipeControlTrace.h
  • IsSwipeControlTracingEnabled() : SwipeControlTrace.h
  • IsSwipeControlVerboseTracingEnabled() : SwipeControlTrace.h
  • IsTabViewPerfTracingEnabled() : TabViewTrace.h
  • IsTabViewTracingEnabled() : TabViewTrace.h
  • IsTabViewVerboseTracingEnabled() : TabViewTrace.h
  • Italic : TextCommandBarFlyout.h
  • ITEMCONTAINER_TRACE_INFO : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_INFO_DBG : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_INFO_ENABLED : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_PERF : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_PERF_DBG : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_VERBOSE : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_VERBOSE_DBG : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_VERBOSE_ENABLED : ItemContainerTrace.h
  • ITEMSREPEATER_TRACE_INFO : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_INFO_DBG : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_INFO_ENABLED : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_PERF : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_PERF_DBG : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_VERBOSE : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_VERBOSE_DBG : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_VERBOSE_ENABLED : ItemsRepeaterTrace.h
  • ITEMSVIEW_TRACE_INFO : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_INFO_DBG : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_INFO_ENABLED : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_PERF : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_PERF_DBG : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_VERBOSE : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_VERBOSE_DBG : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_VERBOSE_ENABLED : ItemsViewTrace.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- p -

  • PACKAGE_FILTER_DYNAMIC : SharedHelpers.cpp
  • PACKAGE_FILTER_STATIC : SharedHelpers.cpp
  • PACKAGE_PROPERTY_DYNAMIC : SharedHelpers.cpp
  • PACKAGE_PROPERTY_STATIC : SharedHelpers.cpp
  • Pane1Only : TwoPaneView.h
  • Pane2Only : TwoPaneView.h
  • PARALLAX_POSITION_RATIO : RefreshVisualizer.cpp
  • Parenthesis : NumberBoxParser.h
  • PartiallySelected : SelectionNode.h
  • Paste : TextCommandBarFlyout.h
  • PDT_BrowsingHistory : MicrosoftTelemetry.h
  • PDT_DeviceConnectivityAndConfiguration : MicrosoftTelemetry.h
  • PDT_InkingTypingAndSpeechUtterance : MicrosoftTelemetry.h
  • PDT_ProductAndServicePerformance : MicrosoftTelemetry.h
  • PDT_ProductAndServiceUsage : MicrosoftTelemetry.h
  • PDT_SoftwareSetupAndInventory : MicrosoftTelemetry.h
  • Pen : PointerInfo.h
  • PERF_PROVIDER_NAME : MuxcTraceLogging.h
  • PerfProviderEnabledCallback() : MuxcTraceLogging.cpp
  • PinnedPool : VirtualizationInfo.h
  • Placeholder : RatingControl.h
  • PlaySpotLightStateAnimation() : SpotLightStateHelper.cpp , SpotLightStateHelper.h
  • Pointer : PointerInfo.h
  • PointerCanceled : RoutedEventHelpers.h
  • PointerCaptureLost : RoutedEventHelpers.h
  • PointerExited : RoutedEventHelpers.h
  • PointerOverPlaceholder : RatingControl.h
  • PointerOverSet : RatingControl.h
  • PointerOverStatus : PointerInfo.h
  • PointerPressed : RoutedEventHelpers.h
  • PointerPressedStatus : PointerInfo.h
  • PointerReleased : RoutedEventHelpers.h
  • PrimaryList : TopNavigationViewDataProvider.h
  • PTR_TRACE_INFO : PTRTracing.h
  • PTR_TRACE_INFO_DBG : PTRTracing.h
  • PTR_TRACE_INFO_ENABLED : PTRTracing.h
  • PTR_TRACE_PERF : PTRTracing.h
  • PTR_TRACE_PERF_DBG : PTRTracing.h
  • PTR_TRACE_VERBOSE : PTRTracing.h
  • PTR_TRACE_VERBOSE_DBG : PTRTracing.h
  • PTR_TRACE_VERBOSE_ENABLED : PTRTracing.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- q -

  • QuadraticAttenuation : SpotLightStateHelper.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- r -

  • RAISE_INTERACTION_RATIO_CHANGED_FREQUENCY : RefreshInfoProviderImpl.cpp
  • RatingControlStates : RatingControl.h
  • RatingInfoType : RatingControl.h
  • reason : dllmain.cpp
  • Redo : TextCommandBarFlyout.h
  • REFRESH_ANIMATION_DURATION : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp
  • REFRESH_VISUALIZER_OVERPAN_RATIO : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp
  • RegGetValueW() : RegUtil.h
  • RegisterPropertyChanged() : CppWinRTHelpers.h
  • RegisterScopedBatchCompleted() : CppWinRTHelpers.h
  • RegisterTraceLogging() : MuxcTraceLogging.cpp , MuxcTraceLogging.h
  • RegisterXamlRootChanged() : CppWinRTHelpers.h
  • RelativeToCurrentView : ViewChange.h
  • RevealHoverSpotlightFlags : SpotLightStateHelper.h
  • RevealHoverSpotlightState : SpotLightStateHelper.h
  • RevealHoverSpotlightState_AnimToHover : SpotLightStateHelper.h
  • RevealHoverSpotlightState_AnimToOff : SpotLightStateHelper.h
  • RevealHoverSpotlightState_FastRelease : SpotLightStateHelper.h
  • RevealHoverSpotlightState_Pressing : SpotLightStateHelper.h
  • RevealHoverSpotlightState_SlowRelease : SpotLightStateHelper.h
  • RevealHoverSpotlightState_StateCount : SpotLightStateHelper.h
  • RgbaToHex() : ColorConversion.cpp , ColorConversion.h
  • RgbFromColor() : ColorConversion.h , ColorConversion.cpp
  • RgbToHex() : ColorConversion.h
  • RgbToHsv() : ColorConversion.h
  • Right : SwipeControl.h , MenuBarItem.h
  • RightLeft : TwoPaneView.h
  • RightMouseButton : PointerInfo.h
  • RoutedEventType : RoutedEventHelpers.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- s -

  • s_tlsThreadData : InkCanvas.cpp
  • ScrollOrientation : OrientationBasedMeasures.h
  • SCROLLPRESENTER_TRACE_INFO : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_INFO_DBG : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_INFO_ENABLED : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_PERF : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_PERF_DBG : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_VERBOSE : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_VERBOSE_DBG : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_VERBOSE_ENABLED : ScrollPresenterTrace.h
  • ScrollPresenterViewChangeResult : ViewChangeBase.h
  • ScrollPresenterViewKind : ViewChange.h
  • SCROLLVIEW_TRACE_INFO : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_INFO_DBG : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_INFO_ENABLED : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_PERF : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_PERF_DBG : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_VERBOSE : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_VERBOSE_DBG : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_VERBOSE_ENABLED : ScrollViewTrace.h
  • SelectAll : TextCommandBarFlyout.h
  • Selected : SelectionNode.h
  • SelectedItemsVectorOptions : ViewModel.h
  • SelectedTreeNodeVectorOptions : ViewModel.h
  • SelectionState : SelectionNode.h
  • SELECTORBAR_TRACE_INFO : SelectorBarTrace.h
  • SELECTORBAR_TRACE_INFO_DBG : SelectorBarTrace.h
  • SELECTORBAR_TRACE_INFO_ENABLED : SelectorBarTrace.h
  • SELECTORBAR_TRACE_PERF : SelectorBarTrace.h
  • SELECTORBAR_TRACE_PERF_DBG : SelectorBarTrace.h
  • SELECTORBAR_TRACE_VERBOSE : SelectorBarTrace.h
  • SELECTORBAR_TRACE_VERBOSE_DBG : SelectorBarTrace.h
  • SELECTORBAR_TRACE_VERBOSE_ENABLED : SelectorBarTrace.h
  • Set : RatingControl.h
  • SetDefaultStyleKey() : CppWinRTHelpers.h
  • SetDefaultStyleKeyWorker() : XamlControlsResources.cpp , CppWinRTHelpers.h
  • SetFocus() : CppWinRTHelpers.h
  • SetSpotLightStateImmediate() : SpotLightStateHelper.cpp , SpotLightStateHelper.h
  • SetupAnimationAndStart() : AnimationUtility.h
  • SetValueDirect() : AnimationUtility.cpp , AnimationUtility.h
  • sgn() : ColorHelpers.cpp , ColorHelpers.h
  • Size : TopNavigationViewDataProvider.h
  • SkippedList : TopNavigationViewDataProvider.h
  • Small : ColorHelpers.h
  • specialize_guids() : pch.h
  • SpotlightProperty : SpotLightStateHelper.h
  • SR_AutomationNameAlphaSlider : ResourceAccessor.h
  • SR_AutomationNameAlphaTextBox : ResourceAccessor.h
  • SR_AutomationNameBlueTextBox : ResourceAccessor.h
  • SR_AutomationNameColorModelComboBox : ResourceAccessor.h
  • SR_AutomationNameColorSpectrum : ResourceAccessor.h
  • SR_AutomationNameEllipsisBreadcrumbBarItem : ResourceAccessor.h
  • SR_AutomationNameGreenTextBox : ResourceAccessor.h
  • SR_AutomationNameHSVHexTextBox : ResourceAccessor.h
  • SR_AutomationNameHueSlider : ResourceAccessor.h
  • SR_AutomationNameHueTextBox : ResourceAccessor.h
  • SR_AutomationNameMoreButtonCollapsed : ResourceAccessor.h
  • SR_AutomationNameMoreButtonExpanded : ResourceAccessor.h
  • SR_AutomationNameRedTextBox : ResourceAccessor.h
  • SR_AutomationNameRGBHexTextBox : ResourceAccessor.h
  • SR_AutomationNameSaturationSlider : ResourceAccessor.h
  • SR_AutomationNameSaturationTextBox : ResourceAccessor.h
  • SR_AutomationNameValueSlider : ResourceAccessor.h
  • SR_AutomationNameValueTextBox : ResourceAccessor.h
  • SR_BadgeIcon : ResourceAccessor.h
  • SR_BadgeIconTextOverride : ResourceAccessor.h
  • SR_BadgeItemPlural1 : ResourceAccessor.h
  • SR_BadgeItemPlural2 : ResourceAccessor.h
  • SR_BadgeItemPlural3 : ResourceAccessor.h
  • SR_BadgeItemPlural4 : ResourceAccessor.h
  • SR_BadgeItemPlural5 : ResourceAccessor.h
  • SR_BadgeItemPlural6 : ResourceAccessor.h
  • SR_BadgeItemPlural7 : ResourceAccessor.h
  • SR_BadgeItemSingular : ResourceAccessor.h
  • SR_BadgeItemTextOverride : ResourceAccessor.h
  • SR_BasicRatingString : ResourceAccessor.h
  • SR_BreadcrumbBarItemLocalizedControlType : ResourceAccessor.h
  • SR_CancelDraggingString : ResourceAccessor.h
  • SR_CommandBarFlyoutAppBarButtonLocalizedControlType : ResourceAccessor.h
  • SR_CommandBarFlyoutAppBarToggleButtonLocalizedControlType : ResourceAccessor.h
  • SR_CommandBarFlyoutCommandBarLocalizedControlType : ResourceAccessor.h
  • SR_CommunityRatingString : ResourceAccessor.h
  • SR_ContentHSVComboBoxItem : ResourceAccessor.h
  • SR_ContentRGBComboBoxItem : ResourceAccessor.h
  • SR_DefaultItemString : ResourceAccessor.h
  • SR_DownloadWebView2Runtime : ResourceAccessor.h
  • SR_DropIntoNodeString : ResourceAccessor.h
  • SR_ExpanderDefaultControlName : ResourceAccessor.h
  • SR_FallBackPlaceString : ResourceAccessor.h
  • SR_GroupName : ResourceAccessor.h
  • SR_HelpTextColorSpectrum : ResourceAccessor.h
  • SR_HelpTextMoreButton : ResourceAccessor.h
  • SR_InfoBarCloseButtonName : ResourceAccessor.h
  • SR_InfoBarCloseButtonTooltip : ResourceAccessor.h
  • SR_InfoBarClosedNotification : ResourceAccessor.h
  • SR_InfoBarCustomLandmarkName : ResourceAccessor.h
  • SR_InfoBarIconSeverityErrorName : ResourceAccessor.h
  • SR_InfoBarIconSeverityInformationalName : ResourceAccessor.h
  • SR_InfoBarIconSeveritySuccessName : ResourceAccessor.h
  • SR_InfoBarIconSeverityWarningName : ResourceAccessor.h
  • SR_InfoBarOpenedNotification : ResourceAccessor.h
  • SR_InfoBarSeverityErrorName : ResourceAccessor.h
  • SR_InfoBarSeverityInformationalName : ResourceAccessor.h
  • SR_InfoBarSeveritySuccessName : ResourceAccessor.h
  • SR_InfoBarSeverityWarningName : ResourceAccessor.h
  • SR_ItemContainerDefaultControlName : ResourceAccessor.h
  • SR_LocalizedControlTypeColorSpectrum : ResourceAccessor.h
  • SR_NavigationBackButtonName : ResourceAccessor.h
  • SR_NavigationBackButtonToolTip : ResourceAccessor.h
  • SR_NavigationButtonClosedName : ResourceAccessor.h
  • SR_NavigationButtonOpenName : ResourceAccessor.h
  • SR_NavigationButtonToggleName : ResourceAccessor.h
  • SR_NavigationCloseButtonName : ResourceAccessor.h
  • SR_NavigationOverflowButtonName : ResourceAccessor.h
  • SR_NavigationOverflowButtonText : ResourceAccessor.h
  • SR_NavigationOverflowButtonToolTip : ResourceAccessor.h
  • SR_NavigationViewItemDefaultControlName : ResourceAccessor.h
  • SR_NavigationViewSearchButtonName : ResourceAccessor.h
  • SR_NumberBoxDownSpinButtonName : ResourceAccessor.h
  • SR_NumberBoxMaximumValueStatus : ResourceAccessor.h
  • SR_NumberBoxMinimumValueStatus : ResourceAccessor.h
  • SR_NumberBoxUpSpinButtonName : ResourceAccessor.h
  • SR_PagerControlFirstPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlLastPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlNextPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlPageTextName : ResourceAccessor.h
  • SR_PagerControlPrefixTextName : ResourceAccessor.h
  • SR_PagerControlPreviousPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlSuffixTextName : ResourceAccessor.h
  • SR_PersonName : ResourceAccessor.h
  • SR_PipsPagerNameText : ResourceAccessor.h
  • SR_PipsPagerNextPageButtonText : ResourceAccessor.h
  • SR_PipsPagerPageText : ResourceAccessor.h
  • SR_PipsPagerPreviousPageButtonText : ResourceAccessor.h
  • SR_PlaceAfterString : ResourceAccessor.h
  • SR_PlaceBeforeString : ResourceAccessor.h
  • SR_PlaceBetweenString : ResourceAccessor.h
  • SR_ProgressBarErrorStatus : ResourceAccessor.h
  • SR_ProgressBarIndeterminateStatus : ResourceAccessor.h
  • SR_ProgressBarPausedStatus : ResourceAccessor.h
  • SR_ProgressRingIndeterminateStatus : ResourceAccessor.h
  • SR_ProgressRingName : ResourceAccessor.h
  • SR_ProofingMenuItemLabel : ResourceAccessor.h
  • SR_RatingControlName : ResourceAccessor.h
  • SR_RatingLocalizedControlType : ResourceAccessor.h
  • SR_RatingsControlName : ResourceAccessor.h
  • SR_RatingUnset : ResourceAccessor.h
  • SR_SelectorBarItemDefaultControlName : ResourceAccessor.h
  • SR_SettingsButtonName : ResourceAccessor.h
  • SR_SplitButtonSecondaryButtonName : ResourceAccessor.h
  • SR_TabViewAddButtonName : ResourceAccessor.h
  • SR_TabViewAddButtonTooltip : ResourceAccessor.h
  • SR_TabViewCloseButtonName : ResourceAccessor.h
  • SR_TabViewCloseButtonTooltip : ResourceAccessor.h
  • SR_TabViewCloseButtonTooltipWithKA : ResourceAccessor.h
  • SR_TabViewScrollDecreaseButtonTooltip : ResourceAccessor.h
  • SR_TabViewScrollIncreaseButtonTooltip : ResourceAccessor.h
  • SR_TeachingTipAlternateCloseButtonName : ResourceAccessor.h
  • SR_TeachingTipAlternateCloseButtonTooltip : ResourceAccessor.h
  • SR_TeachingTipCustomLandmarkName : ResourceAccessor.h
  • SR_TeachingTipNotification : ResourceAccessor.h
  • SR_TeachingTipNotificationWithoutAppName : ResourceAccessor.h
  • SR_TextAlphaLabel : ResourceAccessor.h
  • SR_TextBlueLabel : ResourceAccessor.h
  • SR_TextCommandDescriptionBold : ResourceAccessor.h
  • SR_TextCommandDescriptionCopy : ResourceAccessor.h
  • SR_TextCommandDescriptionCut : ResourceAccessor.h
  • SR_TextCommandDescriptionItalic : ResourceAccessor.h
  • SR_TextCommandDescriptionPaste : ResourceAccessor.h
  • SR_TextCommandDescriptionRedo : ResourceAccessor.h
  • SR_TextCommandDescriptionSelectAll : ResourceAccessor.h
  • SR_TextCommandDescriptionUnderline : ResourceAccessor.h
  • SR_TextCommandDescriptionUndo : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyBold : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyCopy : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyCut : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyItalic : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyPaste : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyRedo : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeySelectAll : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyUnderline : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyUndo : ResourceAccessor.h
  • SR_TextCommandLabelBold : ResourceAccessor.h
  • SR_TextCommandLabelCopy : ResourceAccessor.h
  • SR_TextCommandLabelCut : ResourceAccessor.h
  • SR_TextCommandLabelItalic : ResourceAccessor.h
  • SR_TextCommandLabelPaste : ResourceAccessor.h
  • SR_TextCommandLabelRedo : ResourceAccessor.h
  • SR_TextCommandLabelSelectAll : ResourceAccessor.h
  • SR_TextCommandLabelUnderline : ResourceAccessor.h
  • SR_TextCommandLabelUndo : ResourceAccessor.h
  • SR_TextGreenLabel : ResourceAccessor.h
  • SR_TextHueLabel : ResourceAccessor.h
  • SR_TextMoreButtonLabelCollapsed : ResourceAccessor.h
  • SR_TextMoreButtonLabelExpanded : ResourceAccessor.h
  • SR_TextRedLabel : ResourceAccessor.h
  • SR_TextSaturationLabel : ResourceAccessor.h
  • SR_TextValueLabel : ResourceAccessor.h
  • SR_ToolTipStringAlphaSlider : ResourceAccessor.h
  • SR_ToolTipStringHueSliderWithColorName : ResourceAccessor.h
  • SR_ToolTipStringHueSliderWithoutColorName : ResourceAccessor.h
  • SR_ToolTipStringSaturationSliderWithColorName : ResourceAccessor.h
  • SR_ToolTipStringSaturationSliderWithoutColorName : ResourceAccessor.h
  • SR_ToolTipStringValueSliderWithColorName : ResourceAccessor.h
  • SR_ToolTipStringValueSliderWithoutColorName : ResourceAccessor.h
  • SR_ValueStringColorSpectrumWithColorName : ResourceAccessor.h
  • SR_ValueStringColorSpectrumWithoutColorName : ResourceAccessor.h
  • SR_ValueStringHueSliderWithColorName : ResourceAccessor.h
  • SR_ValueStringHueSliderWithoutColorName : ResourceAccessor.h
  • SR_ValueStringSaturationSliderWithColorName : ResourceAccessor.h
  • SR_ValueStringSaturationSliderWithoutColorName : ResourceAccessor.h
  • SR_ValueStringValueSliderWithColorName : ResourceAccessor.h
  • SR_ValueStringValueSliderWithoutColorName : ResourceAccessor.h
  • SR_WarningSuitableWebView2NotFound : ResourceAccessor.h
  • Standard : InitialsGenerator.h
  • static_assert() : LinedFlowLayoutItemCollectionTransitionProvider.h
  • static_assert_false : StaticAssertFalse.h
  • STDAPI_() : dllmain.cpp , RuntimeProfiler.cpp , dllmain.cpp
  • Step : SpotLightStateHelper.h
  • SWIPECONTROL_TRACE_INFO : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_INFO_DBG : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_INFO_ENABLED : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_PERF : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_PERF_DBG : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_VERBOSE : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_VERBOSE_DBG : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_VERBOSE_ENABLED : SwipeControlTrace.h
  • Symbolic : InitialsGenerator.h
  • System : RadioMenuFlyoutItemTests.cs
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- t -

  • TabTearOutDraggingState : TabView.h
  • TABVIEW_TRACE_INFO : TabViewTrace.h
  • TABVIEW_TRACE_INFO_DBG : TabViewTrace.h
  • TABVIEW_TRACE_INFO_ENABLED : TabViewTrace.h
  • TABVIEW_TRACE_PERF : TabViewTrace.h
  • TABVIEW_TRACE_PERF_DBG : TabViewTrace.h
  • TABVIEW_TRACE_VERBOSE : TabViewTrace.h
  • TABVIEW_TRACE_VERBOSE_DBG : TabViewTrace.h
  • TABVIEW_TRACE_VERBOSE_ENABLED : TabViewTrace.h
  • TELEMETRY_PROVIDER_NAME : MuxcTraceLogging.h
  • TelemetryPrivacyDataTag : MicrosoftTelemetry.h
  • TelemetryProviderEnabledCallback() : MuxcTraceLogging.cpp
  • TextControlButtons : TextCommandBarFlyout.h
  • to_winrt() : CppWinRTHelpers.h , microsoft.ui.private.composition.effects_impl.h
  • Top : SwipeControl.h
  • TopBottom : TwoPaneView.h
  • TopFooter : NavigationViewHelper.h
  • TopListView : NavigationViewHelper.h
  • TopNavigationViewLayoutState : NavigationView.h
  • TopOverflow : NavigationViewHelper.h
  • TopPrimary : NavigationViewHelper.h
  • Touch : PointerInfo.h
  • TRACE_MSG_METH : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_INT_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_FLT_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_STR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_PTR : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_DBL_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_INT_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_DBL_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_INT_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_PTR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_STR : MuxcTraceLogging.h
  • TRACELOGGING_DECLARE_PROVIDER() : MuxcTraceLogging.h
  • TRACELOGGING_DEFINE_PROVIDER() : MuxcTraceLogging.cpp
  • TrackerRefFallback : tracker_ref.h
  • TreeViewNodeVectorOptions : TreeViewNode.h
  • trim() : NumberBox.cpp
  • TryParseInt() : ColorConversion.h
  • TryUpdatePosition : InteractionTrackerAsyncOperation.h
  • TryUpdatePositionBy : InteractionTrackerAsyncOperation.h
  • TryUpdatePositionWithAdditionalVelocity : InteractionTrackerAsyncOperation.h
  • TryUpdatePositionWithAnimation : InteractionTrackerAsyncOperation.h
  • TryUpdateScale : InteractionTrackerAsyncOperation.h
  • TryUpdateScaleWithAdditionalVelocity : InteractionTrackerAsyncOperation.h
  • TryUpdateScaleWithAnimation : InteractionTrackerAsyncOperation.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- u -

  • Underline : TextCommandBarFlyout.h
  • Undo : TextCommandBarFlyout.h
  • Uninitialized : NavigationView.h
  • UniqueIdResetPool : VirtualizationInfo.h
  • UnRegisterTraceLogging() : MuxcTraceLogging.cpp , MuxcTraceLogging.h
  • Unset : RatingControl.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- v -

  • VectorFlag : Vector.h
  • Vertical : OrientationBasedMeasures.h
  • VerticalScrollControllerRequest : InteractionTrackerAsyncOperation.h
  • ViewMode : TwoPaneView.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
Here is a list of all file members with links to the files they belong to:

- w -

  • warning() : WebView2.idl
  • WI_DEFINE_FEATURE() : velocity.h
  • WI_IS_FEATURE_PRESENT : pch.h
  • WIL_STAGING_DLL : velocity.h
  • WIN32_LEAN_AND_MEAN : pch.h
  • WINEVENT_LEVEL_CRITICAL : WinEventLogLevels.h
  • WINEVENT_LEVEL_ERROR : WinEventLogLevels.h
  • WINEVENT_LEVEL_INFO : WinEventLogLevels.h
  • WINEVENT_LEVEL_LOG_ALWAYS : WinEventLogLevels.h
  • WINEVENT_LEVEL_NONE : MUXControlsTestHooks.h
  • WINEVENT_LEVEL_VERBOSE : WinEventLogLevels.h
  • WINEVENT_LEVEL_WARNING : WinEventLogLevels.h
  • WINRT_DISABLE_FACTORY_CACHE : pch.h
  • winrt_make_Microsoft_UI_Xaml_Controls_ItemsSourceView() : ItemsSourceViewFactory.cpp
  • WINRT_MUXC_NAMESPACE : BuildMacros.h
  • WINRT_MUXM_NAMESPACE : BuildMacros.h
  • WINRT_NO_SOURCE_LOCATION : pch.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- _ -

  • __RP_Marker_ClassById : RuntimeProfiler.h
  • __RP_Marker_ClassMemberById : RuntimeProfiler.h
  • _USE_MATH_DEFINES : pch.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- k -

  • KEYWORD_ANNOTATEDSCROLLBAR : MuxcTraceLogging.h
  • KEYWORD_COMMANDBARFLYOUT : MuxcTraceLogging.h
  • KEYWORD_INKTOOLBAR : MuxcTraceLogging.h
  • KEYWORD_ITEMCONTAINER : MuxcTraceLogging.h
  • KEYWORD_ITEMSREPEATER : MuxcTraceLogging.h
  • KEYWORD_ITEMSVIEW : MuxcTraceLogging.h
  • KEYWORD_LINEDFLOWLAYOUT : MuxcTraceLogging.h
  • KEYWORD_NAVIGATIONVIEW : MuxcTraceLogging.h
  • KEYWORD_PTR : MuxcTraceLogging.h
  • KEYWORD_SCROLLPRESENTER : MuxcTraceLogging.h
  • KEYWORD_SCROLLVIEW : MuxcTraceLogging.h
  • KEYWORD_SELECTORBAR : MuxcTraceLogging.h
  • KEYWORD_SWIPECONTROL : MuxcTraceLogging.h
  • KEYWORD_TABVIEW : MuxcTraceLogging.h
  • KEYWORD_WEBVIEW2 : MuxcTraceLogging.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- l -

  • LINEDFLOWLAYOUT_TRACE_INFO : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_INFO_DBG : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_INFO_ENABLED : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_PERF : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_PERF_DBG : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_VERBOSE : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG : LinedFlowLayoutTrace.h
  • LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED : LinedFlowLayoutTrace.h
  • LOC_PREFIX : ResourceAccessor.cpp
  • LOC_PREFIX_WINUI : ResourceAccessor.cpp
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- m -

  • M_PI : pch.h
  • M_PI_2 : pch.h
  • MAX_BFS_DEPTH : ScrollViewerIRefreshInfoProviderAdapter.cpp , RefreshContainer.cpp
  • METH_NAME : MuxcTraceLogging.h
  • MICROSOFT_EVENTTAG_AGGREGATE : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_CORE_DATA : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_COSTDEFERRED_LATENCY : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_CRITICAL_PERSISTENCE : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_DROP_PII : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_DROP_PII_EXCEPT_IP : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_DROP_USER_IDS : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_HASH_PII : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_INJECT_XTOKEN : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_MARK_PII : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_NORMAL_LATENCY : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_NORMAL_PERSISTENCE : MicrosoftTelemetry.h
  • MICROSOFT_EVENTTAG_REALTIME_LATENCY : MicrosoftTelemetry.h
  • MICROSOFT_FIELDTAG_DROP_PII : MicrosoftTelemetry.h
  • MICROSOFT_FIELDTAG_HASH_PII : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_CRITICAL_DATA : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_MEASURES : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_RESERVED_44 : MicrosoftTelemetry.h
  • MICROSOFT_KEYWORD_TELEMETRY : MicrosoftTelemetry.h
  • MINIMUM_INDICATOR_OPACITY : RefreshVisualizer.cpp
  • MUX_ASSERT : pch.h
  • MUX_ASSERT_MSG : pch.h
  • MUX_ASSERT_NOASSUME : pch.h
  • MUX_CATCH_RETURN : ErrorHandling.h
  • MUX_FAIL_FAST : pch.h
  • MUX_FAIL_FAST_MSG : pch.h
  • MUXCONTROLS_NAMESPACE : BuildMacros.h
  • MUXCONTROLS_VERSION_ATTRIBUTE : microsoft.ui.private.composition.effects.idl
  • MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL : microsoft.ui.private.composition.effects.idl
  • MUXCONTROLS_VERSION_PARAM : microsoft.ui.private.composition.effects.idl
  • MUXCONTROLSMEDIA_NAMESPACE_STR : BuildMacros.h
  • MUXCONTROLSROOT_NAMESPACE_STR : BuildMacros.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- n -

  • NAVIGATIONVIEW_TRACE_INFO : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_INFO_DBG : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_INFO_ENABLED : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_PERF : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_PERF_DBG : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_VERBOSE : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_VERBOSE_DBG : NavigationViewTrace.h
  • NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED : NavigationViewTrace.h
  • NOMINMAX : pch.h
  • NTDDI_VERSION : targetver.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- a -

  • ALWAYS_RAISE_INTERACTION_RATIO_TOLERANCE : RefreshInfoProviderImpl.cpp
  • ANNOTATEDSCROLLBAR_TRACE_INFO : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_INFO_DBG : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_PERF : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_PERF_DBG : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_VERBOSE : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_VERBOSE_DBG : AnnotatedScrollBarTrace.h
  • ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED : AnnotatedScrollBarTrace.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- c -

  • COMMANDBARFLYOUT_TRACE_INFO : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_INFO_DBG : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_INFO_ENABLED : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_PERF : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_PERF_DBG : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_VERBOSE : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_VERBOSE_DBG : CommandBarFlyoutTrace.h
  • COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED : CommandBarFlyoutTrace.h
  • CppWinRTActivatableClass : RuntimeClassHelpers.h
  • CppWinRTActivatableClassWithBasicFactory : RuntimeClassHelpers.h
  • CppWinRTActivatableClassWithDPFactory : RuntimeClassHelpers.h
  • CppWinRTActivatableClassWithFactory : RuntimeClassHelpers.h
  • CREATE_XAML_UI_PRESENTER_API : pch.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- d -

  • DEBUG_PROVIDER_NAME : MuxcTraceLogging.h
  • DECLARE_AUTOHANDLE_CLASS : AutoHandle.h
  • DECLARE_D2D_GUID : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_DUAL_SOURCES : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS : SharedHelpers.h
  • DECLARE_NAMED_PROPERTY_MAPPING : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_POD_PROPERTY : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_SINGLE_SOURCE : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_SOURCE : microsoft.ui.private.composition.effects_impl.h
  • DEFAULT_EXECUTION_RATIO : RefreshInfoProviderImpl.h
  • DEFAULT_INDICATOR_SIZE : RefreshVisualizer.cpp
  • DEFAULT_PULL_DIMENSION_SIZE : RefreshContainer.cpp
  • DEFINE_PROFILEGROUP : RuntimeProfiler.cpp
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- e -

  • E_INVALID_OPERATION : ErrorHandling.h
  • EFFECT_ENUM_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
  • EFFECT_INTERFACE_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
  • EFFECT_RUNTIMECLASS_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
  • EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL : microsoft.ui.private.composition.effects.idl
  • EFFECT_STRUCT_ATTRIBUTES : microsoft.ui.private.composition.effects.idl
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- f -

  • FALLBACK_EXECUTION_RATIO : ScrollViewerIRefreshInfoProviderAdapter.cpp
  • ForwardRefToBaseReferenceTracker : RuntimeClassHelpers.h
  • FR_Map_Html : ResourceAccessor.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- i -

  • Implement_IIterator : Vector.h
  • Implement_IObservable : Vector.h
  • Implement_IVector_Modify_Functions : Vector.h
  • Implement_IVector_Read_Functions : Vector.h
  • Implement_Vector : Vector.h
  • Implement_Vector_External : Vector.h
  • Implement_Vector_Read : Vector.h
  • Implement_Vector_Read_NoObservable : Vector.h
  • INITIAL_OFFSET_THRESHOLD : ScrollViewerIRefreshInfoProviderAdapter.cpp
  • INKTOOLBAR_TRACE_ERROR : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_INFO : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_INFO_DBG : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_INFO_ENABLED : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_PERF : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_PERF_DBG : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_VERBOSE : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_VERBOSE_DBG : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_VERBOSE_ENABLED : InkToolBarTrace.h
  • INKTOOLBAR_TRACE_WARNING : InkToolBarTrace.h
  • IR_NoiseAsset_256X256_PNG : ResourceAccessor.h
  • ITEMCONTAINER_TRACE_INFO : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_INFO_DBG : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_INFO_ENABLED : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_PERF : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_PERF_DBG : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_VERBOSE : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_VERBOSE_DBG : ItemContainerTrace.h
  • ITEMCONTAINER_TRACE_VERBOSE_ENABLED : ItemContainerTrace.h
  • ITEMSREPEATER_TRACE_INFO : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_INFO_DBG : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_INFO_ENABLED : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_PERF : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_PERF_DBG : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_VERBOSE : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_VERBOSE_DBG : ItemsRepeaterTrace.h
  • ITEMSREPEATER_TRACE_VERBOSE_ENABLED : ItemsRepeaterTrace.h
  • ITEMSVIEW_TRACE_INFO : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_INFO_DBG : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_INFO_ENABLED : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_PERF : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_PERF_DBG : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_VERBOSE : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_VERBOSE_DBG : ItemsViewTrace.h
  • ITEMSVIEW_TRACE_VERBOSE_ENABLED : ItemsViewTrace.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- p -

  • PACKAGE_FILTER_DYNAMIC : SharedHelpers.cpp
  • PACKAGE_FILTER_STATIC : SharedHelpers.cpp
  • PACKAGE_PROPERTY_DYNAMIC : SharedHelpers.cpp
  • PACKAGE_PROPERTY_STATIC : SharedHelpers.cpp
  • PARALLAX_POSITION_RATIO : RefreshVisualizer.cpp
  • PDT_BrowsingHistory : MicrosoftTelemetry.h
  • PDT_DeviceConnectivityAndConfiguration : MicrosoftTelemetry.h
  • PDT_InkingTypingAndSpeechUtterance : MicrosoftTelemetry.h
  • PDT_ProductAndServicePerformance : MicrosoftTelemetry.h
  • PDT_ProductAndServiceUsage : MicrosoftTelemetry.h
  • PDT_SoftwareSetupAndInventory : MicrosoftTelemetry.h
  • PERF_PROVIDER_NAME : MuxcTraceLogging.h
  • PTR_TRACE_INFO : PTRTracing.h
  • PTR_TRACE_INFO_DBG : PTRTracing.h
  • PTR_TRACE_INFO_ENABLED : PTRTracing.h
  • PTR_TRACE_PERF : PTRTracing.h
  • PTR_TRACE_PERF_DBG : PTRTracing.h
  • PTR_TRACE_VERBOSE : PTRTracing.h
  • PTR_TRACE_VERBOSE_DBG : PTRTracing.h
  • PTR_TRACE_VERBOSE_ENABLED : PTRTracing.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- r -

  • RAISE_INTERACTION_RATIO_CHANGED_FREQUENCY : RefreshInfoProviderImpl.cpp
  • REFRESH_ANIMATION_DURATION : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp
  • REFRESH_VISUALIZER_OVERPAN_RATIO : ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- s -

  • SCROLLPRESENTER_TRACE_INFO : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_INFO_DBG : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_INFO_ENABLED : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_PERF : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_PERF_DBG : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_VERBOSE : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_VERBOSE_DBG : ScrollPresenterTrace.h
  • SCROLLPRESENTER_TRACE_VERBOSE_ENABLED : ScrollPresenterTrace.h
  • SCROLLVIEW_TRACE_INFO : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_INFO_DBG : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_INFO_ENABLED : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_PERF : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_PERF_DBG : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_VERBOSE : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_VERBOSE_DBG : ScrollViewTrace.h
  • SCROLLVIEW_TRACE_VERBOSE_ENABLED : ScrollViewTrace.h
  • SELECTORBAR_TRACE_INFO : SelectorBarTrace.h
  • SELECTORBAR_TRACE_INFO_DBG : SelectorBarTrace.h
  • SELECTORBAR_TRACE_INFO_ENABLED : SelectorBarTrace.h
  • SELECTORBAR_TRACE_PERF : SelectorBarTrace.h
  • SELECTORBAR_TRACE_PERF_DBG : SelectorBarTrace.h
  • SELECTORBAR_TRACE_VERBOSE : SelectorBarTrace.h
  • SELECTORBAR_TRACE_VERBOSE_DBG : SelectorBarTrace.h
  • SELECTORBAR_TRACE_VERBOSE_ENABLED : SelectorBarTrace.h
  • SR_AutomationNameAlphaSlider : ResourceAccessor.h
  • SR_AutomationNameAlphaTextBox : ResourceAccessor.h
  • SR_AutomationNameBlueTextBox : ResourceAccessor.h
  • SR_AutomationNameColorModelComboBox : ResourceAccessor.h
  • SR_AutomationNameColorSpectrum : ResourceAccessor.h
  • SR_AutomationNameEllipsisBreadcrumbBarItem : ResourceAccessor.h
  • SR_AutomationNameGreenTextBox : ResourceAccessor.h
  • SR_AutomationNameHSVHexTextBox : ResourceAccessor.h
  • SR_AutomationNameHueSlider : ResourceAccessor.h
  • SR_AutomationNameHueTextBox : ResourceAccessor.h
  • SR_AutomationNameMoreButtonCollapsed : ResourceAccessor.h
  • SR_AutomationNameMoreButtonExpanded : ResourceAccessor.h
  • SR_AutomationNameRedTextBox : ResourceAccessor.h
  • SR_AutomationNameRGBHexTextBox : ResourceAccessor.h
  • SR_AutomationNameSaturationSlider : ResourceAccessor.h
  • SR_AutomationNameSaturationTextBox : ResourceAccessor.h
  • SR_AutomationNameValueSlider : ResourceAccessor.h
  • SR_AutomationNameValueTextBox : ResourceAccessor.h
  • SR_BadgeIcon : ResourceAccessor.h
  • SR_BadgeIconTextOverride : ResourceAccessor.h
  • SR_BadgeItemPlural1 : ResourceAccessor.h
  • SR_BadgeItemPlural2 : ResourceAccessor.h
  • SR_BadgeItemPlural3 : ResourceAccessor.h
  • SR_BadgeItemPlural4 : ResourceAccessor.h
  • SR_BadgeItemPlural5 : ResourceAccessor.h
  • SR_BadgeItemPlural6 : ResourceAccessor.h
  • SR_BadgeItemPlural7 : ResourceAccessor.h
  • SR_BadgeItemSingular : ResourceAccessor.h
  • SR_BadgeItemTextOverride : ResourceAccessor.h
  • SR_BasicRatingString : ResourceAccessor.h
  • SR_BreadcrumbBarItemLocalizedControlType : ResourceAccessor.h
  • SR_CancelDraggingString : ResourceAccessor.h
  • SR_CommandBarFlyoutAppBarButtonLocalizedControlType : ResourceAccessor.h
  • SR_CommandBarFlyoutAppBarToggleButtonLocalizedControlType : ResourceAccessor.h
  • SR_CommandBarFlyoutCommandBarLocalizedControlType : ResourceAccessor.h
  • SR_CommunityRatingString : ResourceAccessor.h
  • SR_ContentHSVComboBoxItem : ResourceAccessor.h
  • SR_ContentRGBComboBoxItem : ResourceAccessor.h
  • SR_DefaultItemString : ResourceAccessor.h
  • SR_DownloadWebView2Runtime : ResourceAccessor.h
  • SR_DropIntoNodeString : ResourceAccessor.h
  • SR_ExpanderDefaultControlName : ResourceAccessor.h
  • SR_FallBackPlaceString : ResourceAccessor.h
  • SR_GroupName : ResourceAccessor.h
  • SR_HelpTextColorSpectrum : ResourceAccessor.h
  • SR_HelpTextMoreButton : ResourceAccessor.h
  • SR_InfoBarCloseButtonName : ResourceAccessor.h
  • SR_InfoBarCloseButtonTooltip : ResourceAccessor.h
  • SR_InfoBarClosedNotification : ResourceAccessor.h
  • SR_InfoBarCustomLandmarkName : ResourceAccessor.h
  • SR_InfoBarIconSeverityErrorName : ResourceAccessor.h
  • SR_InfoBarIconSeverityInformationalName : ResourceAccessor.h
  • SR_InfoBarIconSeveritySuccessName : ResourceAccessor.h
  • SR_InfoBarIconSeverityWarningName : ResourceAccessor.h
  • SR_InfoBarOpenedNotification : ResourceAccessor.h
  • SR_InfoBarSeverityErrorName : ResourceAccessor.h
  • SR_InfoBarSeverityInformationalName : ResourceAccessor.h
  • SR_InfoBarSeveritySuccessName : ResourceAccessor.h
  • SR_InfoBarSeverityWarningName : ResourceAccessor.h
  • SR_ItemContainerDefaultControlName : ResourceAccessor.h
  • SR_LocalizedControlTypeColorSpectrum : ResourceAccessor.h
  • SR_NavigationBackButtonName : ResourceAccessor.h
  • SR_NavigationBackButtonToolTip : ResourceAccessor.h
  • SR_NavigationButtonClosedName : ResourceAccessor.h
  • SR_NavigationButtonOpenName : ResourceAccessor.h
  • SR_NavigationButtonToggleName : ResourceAccessor.h
  • SR_NavigationCloseButtonName : ResourceAccessor.h
  • SR_NavigationOverflowButtonName : ResourceAccessor.h
  • SR_NavigationOverflowButtonText : ResourceAccessor.h
  • SR_NavigationOverflowButtonToolTip : ResourceAccessor.h
  • SR_NavigationViewItemDefaultControlName : ResourceAccessor.h
  • SR_NavigationViewSearchButtonName : ResourceAccessor.h
  • SR_NumberBoxDownSpinButtonName : ResourceAccessor.h
  • SR_NumberBoxMaximumValueStatus : ResourceAccessor.h
  • SR_NumberBoxMinimumValueStatus : ResourceAccessor.h
  • SR_NumberBoxUpSpinButtonName : ResourceAccessor.h
  • SR_PagerControlFirstPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlLastPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlNextPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlPageTextName : ResourceAccessor.h
  • SR_PagerControlPrefixTextName : ResourceAccessor.h
  • SR_PagerControlPreviousPageButtonTextName : ResourceAccessor.h
  • SR_PagerControlSuffixTextName : ResourceAccessor.h
  • SR_PersonName : ResourceAccessor.h
  • SR_PipsPagerNameText : ResourceAccessor.h
  • SR_PipsPagerNextPageButtonText : ResourceAccessor.h
  • SR_PipsPagerPageText : ResourceAccessor.h
  • SR_PipsPagerPreviousPageButtonText : ResourceAccessor.h
  • SR_PlaceAfterString : ResourceAccessor.h
  • SR_PlaceBeforeString : ResourceAccessor.h
  • SR_PlaceBetweenString : ResourceAccessor.h
  • SR_ProgressBarErrorStatus : ResourceAccessor.h
  • SR_ProgressBarIndeterminateStatus : ResourceAccessor.h
  • SR_ProgressBarPausedStatus : ResourceAccessor.h
  • SR_ProgressRingIndeterminateStatus : ResourceAccessor.h
  • SR_ProgressRingName : ResourceAccessor.h
  • SR_ProofingMenuItemLabel : ResourceAccessor.h
  • SR_RatingControlName : ResourceAccessor.h
  • SR_RatingLocalizedControlType : ResourceAccessor.h
  • SR_RatingsControlName : ResourceAccessor.h
  • SR_RatingUnset : ResourceAccessor.h
  • SR_SelectorBarItemDefaultControlName : ResourceAccessor.h
  • SR_SettingsButtonName : ResourceAccessor.h
  • SR_SplitButtonSecondaryButtonName : ResourceAccessor.h
  • SR_TabViewAddButtonName : ResourceAccessor.h
  • SR_TabViewAddButtonTooltip : ResourceAccessor.h
  • SR_TabViewCloseButtonName : ResourceAccessor.h
  • SR_TabViewCloseButtonTooltip : ResourceAccessor.h
  • SR_TabViewCloseButtonTooltipWithKA : ResourceAccessor.h
  • SR_TabViewScrollDecreaseButtonTooltip : ResourceAccessor.h
  • SR_TabViewScrollIncreaseButtonTooltip : ResourceAccessor.h
  • SR_TeachingTipAlternateCloseButtonName : ResourceAccessor.h
  • SR_TeachingTipAlternateCloseButtonTooltip : ResourceAccessor.h
  • SR_TeachingTipCustomLandmarkName : ResourceAccessor.h
  • SR_TeachingTipNotification : ResourceAccessor.h
  • SR_TeachingTipNotificationWithoutAppName : ResourceAccessor.h
  • SR_TextAlphaLabel : ResourceAccessor.h
  • SR_TextBlueLabel : ResourceAccessor.h
  • SR_TextCommandDescriptionBold : ResourceAccessor.h
  • SR_TextCommandDescriptionCopy : ResourceAccessor.h
  • SR_TextCommandDescriptionCut : ResourceAccessor.h
  • SR_TextCommandDescriptionItalic : ResourceAccessor.h
  • SR_TextCommandDescriptionPaste : ResourceAccessor.h
  • SR_TextCommandDescriptionRedo : ResourceAccessor.h
  • SR_TextCommandDescriptionSelectAll : ResourceAccessor.h
  • SR_TextCommandDescriptionUnderline : ResourceAccessor.h
  • SR_TextCommandDescriptionUndo : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyBold : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyCopy : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyCut : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyItalic : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyPaste : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyRedo : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeySelectAll : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyUnderline : ResourceAccessor.h
  • SR_TextCommandKeyboardAcceleratorKeyUndo : ResourceAccessor.h
  • SR_TextCommandLabelBold : ResourceAccessor.h
  • SR_TextCommandLabelCopy : ResourceAccessor.h
  • SR_TextCommandLabelCut : ResourceAccessor.h
  • SR_TextCommandLabelItalic : ResourceAccessor.h
  • SR_TextCommandLabelPaste : ResourceAccessor.h
  • SR_TextCommandLabelRedo : ResourceAccessor.h
  • SR_TextCommandLabelSelectAll : ResourceAccessor.h
  • SR_TextCommandLabelUnderline : ResourceAccessor.h
  • SR_TextCommandLabelUndo : ResourceAccessor.h
  • SR_TextGreenLabel : ResourceAccessor.h
  • SR_TextHueLabel : ResourceAccessor.h
  • SR_TextMoreButtonLabelCollapsed : ResourceAccessor.h
  • SR_TextMoreButtonLabelExpanded : ResourceAccessor.h
  • SR_TextRedLabel : ResourceAccessor.h
  • SR_TextSaturationLabel : ResourceAccessor.h
  • SR_TextValueLabel : ResourceAccessor.h
  • SR_ToolTipStringAlphaSlider : ResourceAccessor.h
  • SR_ToolTipStringHueSliderWithColorName : ResourceAccessor.h
  • SR_ToolTipStringHueSliderWithoutColorName : ResourceAccessor.h
  • SR_ToolTipStringSaturationSliderWithColorName : ResourceAccessor.h
  • SR_ToolTipStringSaturationSliderWithoutColorName : ResourceAccessor.h
  • SR_ToolTipStringValueSliderWithColorName : ResourceAccessor.h
  • SR_ToolTipStringValueSliderWithoutColorName : ResourceAccessor.h
  • SR_ValueStringColorSpectrumWithColorName : ResourceAccessor.h
  • SR_ValueStringColorSpectrumWithoutColorName : ResourceAccessor.h
  • SR_ValueStringHueSliderWithColorName : ResourceAccessor.h
  • SR_ValueStringHueSliderWithoutColorName : ResourceAccessor.h
  • SR_ValueStringSaturationSliderWithColorName : ResourceAccessor.h
  • SR_ValueStringSaturationSliderWithoutColorName : ResourceAccessor.h
  • SR_ValueStringValueSliderWithColorName : ResourceAccessor.h
  • SR_ValueStringValueSliderWithoutColorName : ResourceAccessor.h
  • SR_WarningSuitableWebView2NotFound : ResourceAccessor.h
  • static_assert_false : StaticAssertFalse.h
  • SWIPECONTROL_TRACE_INFO : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_INFO_DBG : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_INFO_ENABLED : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_PERF : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_PERF_DBG : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_VERBOSE : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_VERBOSE_DBG : SwipeControlTrace.h
  • SWIPECONTROL_TRACE_VERBOSE_ENABLED : SwipeControlTrace.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- t -

  • TABVIEW_TRACE_INFO : TabViewTrace.h
  • TABVIEW_TRACE_INFO_DBG : TabViewTrace.h
  • TABVIEW_TRACE_INFO_ENABLED : TabViewTrace.h
  • TABVIEW_TRACE_PERF : TabViewTrace.h
  • TABVIEW_TRACE_PERF_DBG : TabViewTrace.h
  • TABVIEW_TRACE_VERBOSE : TabViewTrace.h
  • TABVIEW_TRACE_VERBOSE_DBG : TabViewTrace.h
  • TABVIEW_TRACE_VERBOSE_ENABLED : TabViewTrace.h
  • TELEMETRY_PROVIDER_NAME : MuxcTraceLogging.h
  • TelemetryPrivacyDataTag : MicrosoftTelemetry.h
  • TRACE_MSG_METH : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_DBL_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_DBL_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_FLT_FLT_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_INT_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_FLT_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_METH_STR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_PTR : MuxcTraceLogging.h
  • TRACE_MSG_METH_PTR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_DBL_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_INT_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_DBL_DBL : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_INT_INT : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_PTR : MuxcTraceLogging.h
  • TRACE_MSG_METH_STR_STR_STR : MuxcTraceLogging.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • e
  • f
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w

- w -

  • WI_IS_FEATURE_PRESENT : pch.h
  • WIL_STAGING_DLL : velocity.h
  • WIN32_LEAN_AND_MEAN : pch.h
  • WINEVENT_LEVEL_CRITICAL : WinEventLogLevels.h
  • WINEVENT_LEVEL_ERROR : WinEventLogLevels.h
  • WINEVENT_LEVEL_INFO : WinEventLogLevels.h
  • WINEVENT_LEVEL_LOG_ALWAYS : WinEventLogLevels.h
  • WINEVENT_LEVEL_NONE : MUXControlsTestHooks.h
  • WINEVENT_LEVEL_VERBOSE : WinEventLogLevels.h
  • WINEVENT_LEVEL_WARNING : WinEventLogLevels.h
  • WINRT_DISABLE_FACTORY_CACHE : pch.h
  • WINRT_MUXC_NAMESPACE : BuildMacros.h
  • WINRT_MUXM_NAMESPACE : BuildMacros.h
  • WINRT_NO_SOURCE_LOCATION : pch.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • c
  • e
  • f
  • g
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • v

- c -

  • CharacterType : InitialsGenerator.h
  • CommandBarFlyoutOpenCloseAnimationKind : CommandBarFlyoutCommandBar.h
  • CreatedContent : SwipeControl.h

- e -

  • EasingTypes : SpotLightStateHelper.h
  • ElementOwner : VirtualizationInfo.h

- f -

  • FlyoutLocation : MenuBarItem.h

- g -

  • GRAPHICS_EFFECT_PROPERTY_MAPPING : microsoft.ui.private.composition.effects_impl.h

- i -

  • IncrementAmount : ColorHelpers.h
  • IncrementDirection : ColorHelpers.h
  • InteractionTrackerAsyncOperationTrigger : InteractionTrackerAsyncOperation.h
  • InteractionTrackerAsyncOperationType : InteractionTrackerAsyncOperation.h

- m -

  • MathTokenType : NumberBoxParser.h

- n -

  • NavigationRecommendedTransitionDirection : NavigationView.h
  • NavigationViewPropagateTarget : NavigationViewHelper.h
  • NavigationViewRepeaterPosition : NavigationViewHelper.h
  • NavigationViewSplitVectorID : TopNavigationViewDataProvider.h
  • NavigationViewVisualStateDisplayMode : NavigationViewHelper.h

- p -

  • PointerOverStatus : PointerInfo.h
  • PointerPressedStatus : PointerInfo.h

- r -

  • RatingControlStates : RatingControl.h
  • RatingInfoType : RatingControl.h
  • RevealHoverSpotlightFlags : SpotLightStateHelper.h
  • RevealHoverSpotlightState : SpotLightStateHelper.h
  • RoutedEventType : RoutedEventHelpers.h

- s -

  • ScrollOrientation : OrientationBasedMeasures.h
  • ScrollPresenterViewChangeResult : ViewChangeBase.h
  • ScrollPresenterViewKind : ViewChange.h
  • SelectionState : SelectionNode.h
  • SpotlightProperty : SpotLightStateHelper.h

- t -

  • TabTearOutDraggingState : TabView.h
  • TextControlButtons : TextCommandBarFlyout.h
  • TopNavigationViewLayoutState : NavigationView.h
  • TrackerRefFallback : tracker_ref.h

- v -

  • VectorFlag : Vector.h
  • ViewMode : TwoPaneView.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v

- a -

  • Absolute : ViewChange.h
  • All : NavigationViewHelper.h
  • Animate : SpotLightStateHelper.h
  • Animator : VirtualizationInfo.h

- b -

  • Bindable : Vector.h
  • Bold : TextCommandBarFlyout.h
  • Bottom : SwipeControl.h
  • BottomTop : TwoPaneView.h
  • BringIntoViewRequest : InteractionTrackerAsyncOperation.h

- c -

  • Clip : CommandBarFlyoutCommandBar.h
  • Compact : NavigationViewHelper.h
  • Completed : ViewChangeBase.h
  • ConstantAttenuation : SpotLightStateHelper.h
  • Copy : TextCommandBarFlyout.h
  • CubicBezier : SpotLightStateHelper.h
  • Cut : TextCommandBarFlyout.h

- d -

  • Default : SpotLightStateHelper.h , NavigationView.h
  • DependencyObjectBase : Vector.h
  • Direction : SpotLightStateHelper.h
  • DirectViewChange : InteractionTrackerAsyncOperation.h
  • Disabled : RatingControl.h
  • DragEnter : RoutedEventHelpers.h
  • DraggingTabWithinTabView : TabView.h
  • DraggingTornOutTab : TabView.h
  • DragLeave : RoutedEventHelpers.h
  • Drop : RoutedEventHelpers.h

- e -

  • ElementFactory : VirtualizationInfo.h
  • Expanded : NavigationViewHelper.h

- f -

  • FallbackToComPtrBeforeRS4 : tracker_ref.h
  • Font : RatingControl.h
  • FromLeft : NavigationView.h
  • FromOverflow : NavigationView.h
  • FromRight : NavigationView.h

- g -

  • GettingFocus : RoutedEventHelpers.h
  • Glyph : InitialsGenerator.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4 : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_RECT_TO_VECTOR4 : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_UNKNOWN : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY : microsoft.ui.private.composition.effects_impl.h
  • GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ : microsoft.ui.private.composition.effects_impl.h

- h -

  • Height : SpotLightStateHelper.h
  • Higher : ColorHelpers.h
  • Horizontal : OrientationBasedMeasures.h
  • HorizontalScrollControllerRequest : InteractionTrackerAsyncOperation.h

- i -

  • Idle : TabView.h
  • Ignore : SpotLightStateHelper.h
  • Ignored : ViewChangeBase.h
  • Image : RatingControl.h
  • Initialized : NavigationView.h
  • InnerConeAngle : SpotLightStateHelper.h
  • InnerConeAngleInDegrees : SpotLightStateHelper.h
  • InnerConeColor : SpotLightStateHelper.h
  • InnerConeIntensity : SpotLightStateHelper.h
  • Interrupted : ViewChangeBase.h
  • Italic : TextCommandBarFlyout.h

- k -

  • KeyDown : RoutedEventHelpers.h

- l -

  • Large : ColorHelpers.h
  • Layout : VirtualizationInfo.h
  • Left : SwipeControl.h , MenuBarItem.h
  • LeftFooter : NavigationViewHelper.h
  • LeftListView : NavigationViewHelper.h
  • LeftMouseButton : PointerInfo.h
  • LeftNav : NavigationViewHelper.h
  • LeftRight : TwoPaneView.h
  • Linear : SpotLightStateHelper.h
  • LinearAttenuation : SpotLightStateHelper.h
  • LosingFocus : RoutedEventHelpers.h
  • Lower : ColorHelpers.h

- m -

  • Minimal : NavigationViewHelper.h
  • MinimalWithBackButton : NavigationViewHelper.h
  • Mouse : PointerInfo.h

- n -

  • None : Vector.h , TextCommandBarFlyout.h , tracker_ref.h , SwipeControl.h , TwoPaneView.h , SpotLightStateHelper.h , PointerInfo.h , RatingControl.h , InteractionTrackerAsyncOperation.h
  • NotInitialized : TopNavigationViewDataProvider.h
  • NoTrackerRef : Vector.h
  • NotSelected : SelectionNode.h
  • Null : RatingControl.h
  • Numeric : NumberBoxParser.h

- o -

  • Observable : Vector.h
  • Offset : SpotLightStateHelper.h
  • Opacity : CommandBarFlyoutCommandBar.h
  • Operator : NumberBoxParser.h
  • Other : InitialsGenerator.h
  • OuterAngleScale : SpotLightStateHelper.h
  • OuterConeAngle : SpotLightStateHelper.h
  • OuterConeAngleInDegrees : SpotLightStateHelper.h
  • OuterConeColor : SpotLightStateHelper.h
  • OuterConeIntensity : SpotLightStateHelper.h
  • OverflowList : TopNavigationViewDataProvider.h
  • OverflowListView : NavigationViewHelper.h

- p -

  • Pane1Only : TwoPaneView.h
  • Pane2Only : TwoPaneView.h
  • Parenthesis : NumberBoxParser.h
  • PartiallySelected : SelectionNode.h
  • Paste : TextCommandBarFlyout.h
  • Pen : PointerInfo.h
  • PinnedPool : VirtualizationInfo.h
  • Placeholder : RatingControl.h
  • Pointer : PointerInfo.h
  • PointerCanceled : RoutedEventHelpers.h
  • PointerCaptureLost : RoutedEventHelpers.h
  • PointerExited : RoutedEventHelpers.h
  • PointerOverPlaceholder : RatingControl.h
  • PointerOverSet : RatingControl.h
  • PointerPressed : RoutedEventHelpers.h
  • PointerReleased : RoutedEventHelpers.h
  • PrimaryList : TopNavigationViewDataProvider.h

- q -

  • QuadraticAttenuation : SpotLightStateHelper.h

- r -

  • Redo : TextCommandBarFlyout.h
  • RelativeToCurrentView : ViewChange.h
  • RevealHoverSpotlightState_AnimToHover : SpotLightStateHelper.h
  • RevealHoverSpotlightState_AnimToOff : SpotLightStateHelper.h
  • RevealHoverSpotlightState_FastRelease : SpotLightStateHelper.h
  • RevealHoverSpotlightState_Pressing : SpotLightStateHelper.h
  • RevealHoverSpotlightState_SlowRelease : SpotLightStateHelper.h
  • RevealHoverSpotlightState_StateCount : SpotLightStateHelper.h
  • Right : SwipeControl.h , MenuBarItem.h
  • RightLeft : TwoPaneView.h
  • RightMouseButton : PointerInfo.h

- s -

  • SelectAll : TextCommandBarFlyout.h
  • Selected : SelectionNode.h
  • Set : RatingControl.h
  • Size : TopNavigationViewDataProvider.h
  • SkippedList : TopNavigationViewDataProvider.h
  • Small : ColorHelpers.h
  • Standard : InitialsGenerator.h
  • Step : SpotLightStateHelper.h
  • Symbolic : InitialsGenerator.h

- t -

  • Top : SwipeControl.h
  • TopBottom : TwoPaneView.h
  • TopFooter : NavigationViewHelper.h
  • TopListView : NavigationViewHelper.h
  • TopOverflow : NavigationViewHelper.h
  • TopPrimary : NavigationViewHelper.h
  • Touch : PointerInfo.h
  • TryUpdatePosition : InteractionTrackerAsyncOperation.h
  • TryUpdatePositionBy : InteractionTrackerAsyncOperation.h
  • TryUpdatePositionWithAdditionalVelocity : InteractionTrackerAsyncOperation.h
  • TryUpdatePositionWithAnimation : InteractionTrackerAsyncOperation.h
  • TryUpdateScale : InteractionTrackerAsyncOperation.h
  • TryUpdateScaleWithAdditionalVelocity : InteractionTrackerAsyncOperation.h
  • TryUpdateScaleWithAnimation : InteractionTrackerAsyncOperation.h

- u -

  • Underline : TextCommandBarFlyout.h
  • Undo : TextCommandBarFlyout.h
  • Uninitialized : NavigationView.h
  • UniqueIdResetPool : VirtualizationInfo.h
  • Unset : RatingControl.h

- v -

  • Vertical : OrientationBasedMeasures.h
  • VerticalScrollControllerRequest : InteractionTrackerAsyncOperation.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • w

- _ -

  • __declspec() : XamlMetadataDependencyLocator.cpp , RadioMenuFlyoutItem.h , tracker_ref.h , event.h , CppWinRTHelpers.h

- a -

  • AddRoutedEventHandler() : RoutedEventHelpers.h
  • AnimateTo() : AnimationUtility.h

- c -

  • CancelAsyncAction() : ColorHelpers.cpp , ColorHelpers.h
  • ColorFromRgba() : ColorConversion.h , ColorConversion.cpp
  • CopyArray() : TabView.h
  • CreateBitmapFromPixelData() : ColorHelpers.cpp , ColorHelpers.h
  • CreateCheckeredBackgroundAsync() : ColorHelpers.cpp , ColorHelpers.h
  • CreateSpotLightColorsProxy() : SpotLightStateHelper.cpp , SpotLightStateHelper.h
  • CreateSurfaceFromPixelData() : ColorHelpers.cpp , ColorHelpers.h

- d -

  • DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS() : TextCommandBarFlyout.h
  • DECLARE_INTERFACE_IID_() : microsoft.ui.private.composition.effects_impl.h
  • DECLARE_TRACELOGGING_CLASS() : MuxcTraceLogging.h

- f -

  • FindNextNamedColor() : ColorHelpers.cpp , ColorHelpers.h

- g -

  • GetLuminosityColor() : AcrylicBrush.cpp , AcrylicBrush.h
  • GetTemplateChildT() : CppWinRTHelpers.h
  • GetTintOpacityModifier() : AcrylicBrush.cpp , AcrylicBrush.h

- h -

  • HexToRgb() : ColorConversion.h
  • HexToRgba() : ColorConversion.cpp , ColorConversion.h
  • HsvToRgb() : ColorConversion.h

- i -

  • IncrementAlphaChannel() : ColorHelpers.cpp , ColorHelpers.h
  • IncrementColorChannel() : ColorHelpers.h , ColorHelpers.cpp
  • InitializeDependencyProperty() : CppWinRTHelpers.h
  • InitializeIsTargetDependencyProperty() : IsTargetDPHelper.h
  • InvokableCallback() : InvokableCallbackHelper.h
  • IsAnimated() : SpotLightStateHelper.h
  • IsAnnotatedScrollBarPerfTracingEnabled() : AnnotatedScrollBarTrace.h
  • IsAnnotatedScrollBarTracingEnabled() : AnnotatedScrollBarTrace.h
  • IsAnnotatedScrollBarVerboseTracingEnabled() : AnnotatedScrollBarTrace.h
  • IsCommandBarFlyoutTracingEnabled() : CommandBarFlyoutTrace.h
  • IsCommandBarFlyoutVerboseTracingEnabled() : CommandBarFlyoutTrace.h
  • IsCorrectPeerForHwnd() : WebView2AutomationPeer.h
  • IsIgnored() : SpotLightStateHelper.h
  • IsInkToolBarTracingEnabled() : InkToolBarTrace.h
  • IsInkToolBarVerboseTracingEnabled() : InkToolBarTrace.h
  • IsItemContainerPerfTracingEnabled() : ItemContainerTrace.h
  • IsItemContainerTracingEnabled() : ItemContainerTrace.h
  • IsItemContainerVerboseTracingEnabled() : ItemContainerTrace.h
  • IsItemsRepeaterPerfTracingEnabled() : ItemsRepeaterTrace.h
  • IsItemsRepeaterTracingEnabled() : ItemsRepeaterTrace.h
  • IsItemsRepeaterVerboseTracingEnabled() : ItemsRepeaterTrace.h
  • IsItemsViewPerfTracingEnabled() : ItemsViewTrace.h
  • IsItemsViewTracingEnabled() : ItemsViewTrace.h
  • IsItemsViewVerboseTracingEnabled() : ItemsViewTrace.h
  • IsLinedFlowLayoutPerfTracingEnabled() : LinedFlowLayoutTrace.h
  • IsLinedFlowLayoutTracingEnabled() : LinedFlowLayoutTrace.h
  • IsLinedFlowLayoutVerboseTracingEnabled() : LinedFlowLayoutTrace.h
  • IsNavigationViewPerfTracingEnabled() : NavigationViewTrace.h
  • IsNavigationViewTracingEnabled() : NavigationViewTrace.h
  • IsNavigationViewVerboseTracingEnabled() : NavigationViewTrace.h
  • IsPTRPerfTracingEnabled() : PTRTracing.h
  • IsPTRTracingEnabled() : PTRTracing.h
  • IsPTRVerboseTracingEnabled() : PTRTracing.h
  • IsScrollPresenterPerfTracingEnabled() : ScrollPresenterTrace.h
  • IsScrollPresenterTracingEnabled() : ScrollPresenterTrace.h
  • IsScrollPresenterVerboseTracingEnabled() : ScrollPresenterTrace.h
  • IsScrollViewPerfTracingEnabled() : ScrollViewTrace.h
  • IsScrollViewTracingEnabled() : ScrollViewTrace.h
  • IsScrollViewVerboseTracingEnabled() : ScrollViewTrace.h
  • IsSelectorBarPerfTracingEnabled() : SelectorBarTrace.h
  • IsSelectorBarTracingEnabled() : SelectorBarTrace.h
  • IsSelectorBarVerboseTracingEnabled() : SelectorBarTrace.h
  • IsStateAnimated() : SpotLightStateHelper.cpp , SpotLightStateHelper.h
  • IsStateIgnored() : SpotLightStateHelper.h , SpotLightStateHelper.cpp
  • IsSwipeControlPerfTracingEnabled() : SwipeControlTrace.h
  • IsSwipeControlTracingEnabled() : SwipeControlTrace.h
  • IsSwipeControlVerboseTracingEnabled() : SwipeControlTrace.h
  • IsTabViewPerfTracingEnabled() : TabViewTrace.h
  • IsTabViewTracingEnabled() : TabViewTrace.h
  • IsTabViewVerboseTracingEnabled() : TabViewTrace.h

- l -

  • LayoutRound() : ProgressBar.cpp
  • LoggingProviderEnabledCallback() : MuxcTraceLogging.cpp

- m -

  • m_dropIndex() : TabView.cpp
  • m_fromProgress() : AnimatedVisualPlayer.cpp
  • m_looped() : AnimatedVisualPlayer.cpp
  • m_newBounds() : ItemCollectionTransition.cpp
  • m_oldBounds() : ItemCollectionTransition.cpp
  • m_tabs() : TabView.cpp
  • m_toProgress() : AnimatedVisualPlayer.cpp
  • m_triggers() : ItemCollectionTransition.cpp
  • MakeAnimation() : AnimationUtility.h
  • MakeAnimation< float >() : AnimationUtility.h
  • MakeAnimation< winrt::Color >() : AnimationUtility.h
  • MakeVectorParam() : Vector.h
  • MakeVectorParamImpl() : Vector.h

- o -

  • OnAttachedIsTargetPropertyChanged() : IsTargetDPHelper.h
  • operator&() : Flags_Enum.h
  • operator<() : tracker_ref.h
  • operator<<() : Flags_Enum.h
  • operator>>() : Flags_Enum.h
  • operator^() : Flags_Enum.h
  • operator|() : Flags_Enum.h
  • operator~() : Flags_Enum.h

- p -

  • PerfProviderEnabledCallback() : MuxcTraceLogging.cpp
  • PlaySpotLightStateAnimation() : SpotLightStateHelper.h , SpotLightStateHelper.cpp

- r -

  • RegGetValueW() : RegUtil.h
  • RegisterPropertyChanged() : CppWinRTHelpers.h
  • RegisterScopedBatchCompleted() : CppWinRTHelpers.h
  • RegisterTraceLogging() : MuxcTraceLogging.cpp , MuxcTraceLogging.h
  • RegisterXamlRootChanged() : CppWinRTHelpers.h
  • RgbaToHex() : ColorConversion.h , ColorConversion.cpp
  • RgbFromColor() : ColorConversion.h , ColorConversion.cpp
  • RgbToHex() : ColorConversion.h
  • RgbToHsv() : ColorConversion.h

- s -

  • SetDefaultStyleKey() : CppWinRTHelpers.h
  • SetDefaultStyleKeyWorker() : XamlControlsResources.cpp , CppWinRTHelpers.h
  • SetFocus() : CppWinRTHelpers.h
  • SetSpotLightStateImmediate() : SpotLightStateHelper.h , SpotLightStateHelper.cpp , SpotLightStateHelper.h
  • SetupAnimationAndStart() : AnimationUtility.h
  • SetValueDirect() : AnimationUtility.h , AnimationUtility.cpp , AnimationUtility.h , AnimationUtility.cpp
  • sgn() : ColorHelpers.cpp , ColorHelpers.h
  • specialize_guids() : pch.h
  • static_assert() : LinedFlowLayoutItemCollectionTransitionProvider.h
  • STDAPI_() : RuntimeProfiler.cpp , dllmain.cpp

- t -

  • TelemetryProviderEnabledCallback() : MuxcTraceLogging.cpp
  • to_winrt() : microsoft.ui.private.composition.effects_impl.h , CppWinRTHelpers.h , microsoft.ui.private.composition.effects_impl.h
  • TRACELOGGING_DECLARE_PROVIDER() : MuxcTraceLogging.h
  • TRACELOGGING_DEFINE_PROVIDER() : MuxcTraceLogging.cpp
  • trim() : NumberBox.cpp
  • TryParseInt() : ColorConversion.h

- u -

  • UnRegisterTraceLogging() : MuxcTraceLogging.cpp , MuxcTraceLogging.h

- w -

  • warning() : WebView2.idl
  • WI_DEFINE_FEATURE() : velocity.h
  • winrt_make_Microsoft_UI_Xaml_Controls_ItemsSourceView() : ItemsSourceViewFactory.cpp
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • ButtonVisibility : PipsPager.cpp
  • GRAPHICS_EFFECT_PROPERTY_MAPPING : microsoft.ui.private.composition.effects_impl.h
  • SelectedItemsVectorOptions : ViewModel.h
  • SelectedTreeNodeVectorOptions : ViewModel.h
  • TreeViewNodeVectorOptions : TreeViewNode.h
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • g
  • r
  • s

- _ -

  • __pad0__ : WebView2.h , WebView2AutomationPeer.h

- c -

  • c_ApplicationViewModeSpanning : DisplayRegionHelper.cpp
  • c_AutoDisplayModeNumberOfPagesThreshold : PagerControl.cpp
  • c_captionTopMarginIntercept : RatingControl.cpp
  • c_captionTopMarginSlope : RatingControl.cpp
  • c_comboBoxName : PagerControl.cpp
  • c_comboBoxVisibleVisualState : PagerControl.cpp
  • c_edgeDetectionTolerance : ScrollPresenterAnchoring.cpp
  • c_finiteItemsModeState : PagerControl.cpp
  • c_firstPageButtonDisabledVisualState : PagerControl.cpp
  • c_firstPageButtonEnabledVisualState : PagerControl.cpp
  • c_firstPageButtonHiddenVisualState : PagerControl.cpp
  • c_firstPageButtonName : PagerControl.cpp
  • c_firstPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_firstPageButtonVisibleVisualState : PagerControl.cpp
  • c_fontSizeForRenderingKey : RatingControl.cpp
  • c_frame1point1 : NavigationView.cpp
  • c_frame1point2 : NavigationView.cpp
  • c_frame2point1 : NavigationView.cpp
  • c_frame2point2 : NavigationView.cpp
  • c_horizontalScaleAnimationCenterPoint : RatingControl.cpp
  • c_infiniteItemsModeState : PagerControl.cpp
  • c_infiniteModeComboBoxItemsIncrement : PagerControl.cpp
  • c_itemSpacingKey : RatingControl.cpp
  • c_lastPageButtonDisabledVisualState : PagerControl.cpp
  • c_lastPageButtonEnabledVisualState : PagerControl.cpp
  • c_lastPageButtonHiddenVisualState : PagerControl.cpp
  • c_lastPageButtonName : PagerControl.cpp
  • c_lastPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_lastPageButtonVisibleVisualState : PagerControl.cpp
  • c_maxNonAnimatedOperationTicks : InteractionTrackerAsyncOperation.h
  • c_maxRegions : DisplayRegionHelper.h
  • c_mouseOverScale : RatingControl.cpp
  • c_nextPageButtonCollapsedVisualState : PipsPager.cpp
  • c_nextPageButtonDisabledVisualState : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonEnabledVisualState : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonHiddenVisualState : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonName : PagerControl.cpp , PipsPager.cpp
  • c_nextPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_nextPageButtonVisibleVisualState : PagerControl.cpp , PipsPager.cpp
  • c_noPointerOverMagicNumber : RatingControl.cpp
  • c_noValueSetSentinel : RatingControl.cpp
  • c_numberBoxName : PagerControl.cpp
  • c_numberBoxVisibleVisualState : PagerControl.cpp
  • c_numberPanelIndicatorName : PagerControl.cpp
  • c_numberPanelRepeaterName : PagerControl.cpp
  • c_numberPanelVisibleVisualState : PagerControl.cpp
  • c_pipsPagerButtonHorizontalOrientationVisualState : PipsPager.cpp
  • c_pipsPagerButtonVerticalOrientationVisualState : PipsPager.cpp
  • c_pipsPagerHorizontalOrientationButtonHeightPropertyName : PipsPager.cpp
  • c_pipsPagerHorizontalOrientationButtonWidthPropertyName : PipsPager.cpp
  • c_pipsPagerHorizontalOrientationVisualState : PipsPager.cpp
  • c_pipsPagerRepeaterName : PipsPager.cpp
  • c_pipsPagerScrollViewerName : PipsPager.cpp
  • c_pipsPagerVerticalOrientationButtonHeightPropertyName : PipsPager.cpp
  • c_pipsPagerVerticalOrientationButtonWidthPropertyName : PipsPager.cpp
  • c_pipsPagerVerticalOrientationVisualState : PipsPager.cpp
  • c_previousPageButtonCollapsedVisualState : PipsPager.cpp
  • c_previousPageButtonDisabledVisualState : PipsPager.cpp , PagerControl.cpp
  • c_previousPageButtonEnabledVisualState : PagerControl.cpp , PipsPager.cpp
  • c_previousPageButtonHiddenVisualState : PipsPager.cpp , PagerControl.cpp
  • c_previousPageButtonName : PipsPager.cpp , PagerControl.cpp
  • c_previousPageButtonNotVisibleVisualState : PagerControl.cpp
  • c_previousPageButtonVisibleVisualState : PagerControl.cpp , PipsPager.cpp
  • c_queuedOperationTicks : InteractionTrackerAsyncOperation.h
  • c_renderingEventsPostBringIntoView : ItemsView.cpp
  • c_rootGridName : PagerControl.cpp
  • c_scrollPresenterDefaultInertiaDecayRate : ScrollPresenter.cpp
  • c_scrollPresenterLineDelta : ScrollPresenter.cpp
  • c_touchOverScale : RatingControl.cpp
  • c_verticalScaleAnimationCenterPoint : RatingControl.cpp
  • c_whitespace : NumberBox.cpp
  • CacheBufferPerSideInflationPixelDelta : ViewportManagerWithPlatformFeatures.cpp
  • CheckerSize : ColorHelpers.cpp

- d -

  • DebugSlowDownFactor : LinedFlowLayoutItemCollectionTransitionProvider.h

- g -

  • g_hInstance : dllmain.cpp
  • g_IsLoggingProviderEnabled : MuxcTraceLogging.h
  • g_IsPerfProviderEnabled : MuxcTraceLogging.h
  • g_IsTelemetryProviderEnabled : MuxcTraceLogging.h
  • g_LoggingProviderActivityId : MuxcTraceLogging.h
  • g_LoggingProviderLevel : MuxcTraceLogging.h
  • g_LoggingProviderMatchAnyKeyword : MuxcTraceLogging.h
  • g_PerfProviderActivityId : MuxcTraceLogging.h
  • g_PerfProviderLevel : MuxcTraceLogging.h
  • g_PerfProviderMatchAnyKeyword : MuxcTraceLogging.h
  • g_TelemetryProviderActivityId : MuxcTraceLogging.h
  • g_TelemetryProviderLevel : MuxcTraceLogging.h
  • g_TelemetryProviderMatchAnyKeyword : MuxcTraceLogging.h
  • gFileVersion : RuntimeProfiler.cpp , dllmain.cpp

- r -

  • reason : dllmain.cpp

- s -

  • s_tlsThreadData : InkCanvas.cpp
  • System : RadioMenuFlyoutItemTests.cs
Generated on Sun Dec 1 2024 20:54:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Main Page

WinUi3-Templates Documentation

End-User License Agreement

Introduction

This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and SIEMA ("Licensor") for the use of SIEMA-REFERENCE ("Software"). This EULA governs your use of the Software provided by the Licensor. By installing or using the Software, you agree to be bound by the terms of this EULA.

License Grant

Licensor grants you a revocable, non-exclusive, non-transferable, limited license to download, install, and use the Software solely for your personal or commercial purposes strictly in accordance with the terms of this Agreement.

Restrictions on Use

You agree not to, and you will not permit others to:

  • Modify, or create derivative works of the Software;
  • Distribute, transfer, sublicense, lease, lend, or rent the Software to any third party;
  • Reverse engineer, decompile or disassemble the Software, except to the extent expressly permitted by applicable law;
  • Remove, alter, or obscure any proprietary notices on the Software;
  • Use the Software in any manner that could damage, disable, overburden, or impair the Software;
  • Use the Software to create or distribute any malicious software or for any unlawful purpose.

Related Agreements

By agreeing to this EULA, you also agree to comply with the terms of Terms and Conditions, Privacy Policy, and any other agreements incorporated herein by reference.

Jurisdiction

This EULA and any disputes arising out of or in connection with it will be governed by and construed in accordance with the laws of Switzerland, without regard to its conflict of laws principles. Any legal actions or proceedings arising out of this EULA shall be brought exclusively in the courts of Switzerland.Intellectual Property & Copyright Infringement

The Software and all rights, title, and interest in and to the Software, including all intellectual property rights therein, are and will remain the exclusive property of the Licensor. You agree to notify the Licensor promptly if you become aware of any infringement of the Licensor’s intellectual property rights in the Software.Termination of Licensing

Licensor may terminate this EULA at any time if you fail to comply with any term(s) of this Agreement. Upon termination, you must cease all use of the Software and destroy all copies, full or partial, of the Software.

Warranty Disclaimer

THE SOFTWARE IS PROVIDED "AS IS". LICENSOR MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT. YOU BEAR THE ENTIRE RISK AS TO SELECTING THE SOFTWARE FOR YOUR PURPOSES AND AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE.

Limitations of Liability

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS OR REVENUES, WHETHER INCURRED DIRECTLY OR INDIRECTLY, OR ANY LOSS OF DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES, RESULTING FROM:

  1. YOUR USE OR INABILITY TO USE THE SOFTWARE;
  2. ANY UNAUTHORIZED ACCESS TO OR USE OF OUR SERVERS AND/OR ANY PERSONAL INFORMATION STORED THEREIN;
  3. ANY INTERRUPTION OR CESSATION OF TRANSMISSION TO OR FROM THE SOFTWARE;
  4. ANY ERRORS OR OMISSIONS IN ANY CONTENT OR FOR ANY LOSS OR DAMAGE INCURRED AS A RESULT OF YOUR USE OF ANY CONTENT POSTED, EMAILED, TRANSMITTED, OR OTHERWISE MADE AVAILABLE THROUGH THE SOFTWARE;
  5. THE DEFAMATORY, OFFENSIVE, OR ILLEGAL CONDUCT OF ANY THIRD PARTY.

Business Contact Information

If you have any questions about this EULA, please contact us at:

Siema
siema.switzerland@gmail.com

By installing or using the Software, you acknowledge that you have read this Agreement, understand it, and agree to be bound by its terms and conditions.

Generated on Sun Dec 1 2024 20:51:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- j -

  • JustifyContent : Flick
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- k -

  • Keyboard : MU_XC_NAMESPACE
  • KeyFromIndex() : MU_XC_NAMESPACE
  • KeyRoutedEventArgsToString() : TypeLogging
  • Kind : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- l -

  • LargeChange : MU_XC_NAMESPACE
  • LastButtonCommand : MU_XC_NAMESPACE
  • LastButtonStyle : MU_XC_NAMESPACE
  • LastButtonVisibility : MU_XC_NAMESPACE
  • Latency : MU_XC_NAMESPACE
  • Layout : MU_XC_NAMESPACE
  • LayoutContext : MU_XC_NAMESPACE
  • LayoutPanel : MU_XC_NAMESPACE
  • LayoutTransition : MU_XC_NAMESPACE
  • Left : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • LeftBottom : MU_XC_NAMESPACE
  • LeftCompact : MU_XC_NAMESPACE
  • LeftMinimal : MU_XC_NAMESPACE
  • LeftRight : MU_XC_NAMESPACE
  • LeftTop : MU_XC_NAMESPACE
  • LeftToRight : MU_XC_NAMESPACE
  • LightDismiss : MU_XC_NAMESPACE
  • Linear : Microsoft::UI::Private::Composition::Effects
  • LinearTransferEffect : Microsoft::UI::Private::Composition::Effects
  • LinedFlowLayout : MU_XC_NAMESPACE
  • LinedFlowLayoutInvalidationTrigger : MU_PRIVATE_CONTROLS_NAMESPACE
  • LinedFlowLayoutItemCollectionTransitionProvider : MU_XC_NAMESPACE
  • LinedFlowLayoutItemsInfoRequestedEventArgs : MU_XC_NAMESPACE
  • LinedFlowLayoutItemsJustification : MU_XC_NAMESPACE
  • LinedFlowLayoutItemsStretch : MU_XC_NAMESPACE
  • Location : MUXControlsTestApp
  • LuminanceToAlphaEffect : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- m -

  • MapControl : MU_XC_NAMESPACE
  • MapElement : MU_XC_NAMESPACE
  • MapElementClick : MU_XC_NAMESPACE
  • MapLayer : MU_XC_NAMESPACE
  • MapServiceErrorOccurred : MU_XC_NAMESPACE
  • MaskInvert : Microsoft::UI::Private::Composition::Effects
  • MaterialHelperTestApi : MU_PRIVATE_MEDIA_NAMESPACE
  • Matrix5x4 : Microsoft::UI::Private::Composition::Effects
  • MaxColumns : MU_XC_NAMESPACE
  • Maximum : MU_XC_NAMESPACE
  • MaxStrokeWidth : MU_XC_NAMESPACE
  • MaxVisiblePips : MU_XC_NAMESPACE
  • MeasureAndGetDesiredHeightFor() : LayoutUtils
  • MeasureAndGetDesiredWidthFor() : LayoutUtils
  • MenuBar : MU_XC_NAMESPACE
  • MenuBarAutomationPeer : MU_XAP_NAMESPACE
  • MenuBarItem : MU_XC_NAMESPACE
  • MenuBarItemAutomationPeer : MU_XAP_NAMESPACE
  • MenuBarItemFlyout : MU_XC_NAMESPACE
  • MicaBackdrop : MU_XM_NAMESPACE
  • Min : Microsoft::UI::Private::Composition::Effects
  • Minimal : MU_XC_NAMESPACE
  • Minimum : MU_XC_NAMESPACE
  • MinStrokeWidth : MU_XC_NAMESPACE
  • Mirror : Microsoft::UI::Private::Composition::Effects
  • ModeChanged : MU_XC_NAMESPACE
  • MonochromaticOverlayPresenter : MU_XCP_NAMESPACE
  • MoreLabel : MU_XC_NAMESPACE
  • MouseWheel : MU_XC_NAMESPACE
  • Move : MU_XC_NAMESPACE
  • Multiple : MU_XC_NAMESPACE
  • MultiSampleLinear : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- n -

  • NavigationViewBackButtonVisible : MU_XC_NAMESPACE
  • NavigationViewDisplayMode : MU_XC_NAMESPACE
  • NavigationViewItemAutomationPeer : MU_XAP_NAMESPACE
  • NavigationViewItemPresenter : MU_XCP_NAMESPACE
  • NavigationViewOverflowLabelMode : MU_XC_NAMESPACE
  • NavigationViewPaneDisplayMode : MU_XC_NAMESPACE
  • NavigationViewSelectionFollowsFocus : MU_XC_NAMESPACE
  • NavigationViewShoulderNavigationEnabled : MU_XC_NAMESPACE
  • Near : MU_XCP_NAMESPACE
  • NearestNeighbor : Microsoft::UI::Private::Composition::Effects
  • Never : MU_XC_NAMESPACE
  • NextButtonCommand : MU_XC_NAMESPACE
  • NextButtonStyle : MU_XC_NAMESPACE
  • NextButtonVisibility : MU_XC_NAMESPACE
  • NoLabel : MU_XC_NAMESPACE
  • None : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • Normal : MU_XC_NAMESPACE , MU_XM_NAMESPACE
  • NormalPipStyle : MU_XC_NAMESPACE
  • NullableFloat2ToString() : TypeLogging
  • NullableFloatToString() : TypeLogging
  • NumberBox : MU_XC_NAMESPACE
  • NumberBoxAutomationPeer : MU_XAP_NAMESPACE
  • NumberBoxSpinButtonPlacementMode : MU_XC_NAMESPACE
  • NumberBoxValidationMode : MU_XC_NAMESPACE
  • NumberFormatter : MU_XC_NAMESPACE
  • NumberOfPages : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- o -

  • OnPointerOver : MU_XC_NAMESPACE
  • OpacityEffect : Microsoft::UI::Private::Composition::Effects
  • Orientation : MU_XC_NAMESPACE
  • OrientationToString() : TypeLogging
  • OSVersion : Common
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- z -

  • ZoomAnimationStarting : MU_XC_NAMESPACE
  • ZoomBy() : MU_XC_NAMESPACE
  • ZoomCompleted : MU_XC_NAMESPACE
  • ZoomModeToString() : TypeLogging
  • ZoomOptionsToString() : TypeLogging
  • ZoomStarting : MU_XC_NAMESPACE
  • ZoomTo() : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- a -

  • Absolute : MU_XC_NAMESPACE
  • AcceptsExpression : MU_XC_NAMESPACE
  • AcrylicBrush : MU_XM_NAMESPACE
  • AcrylicTestApi : MU_PRIVATE_MEDIA_NAMESPACE
  • ActionButtonClick : MU_XC_NAMESPACE
  • ActionButtonCommand : MU_XC_NAMESPACE
  • ActionButtonCommandParameter : MU_XC_NAMESPACE
  • ActionButtonContent : MU_XC_NAMESPACE
  • ActionButtonStyle : MU_XC_NAMESPACE
  • ActivateInstance() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • ActivateInstanceWithFactory() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • ActiveTool : MU_XC_NAMESPACE
  • ActiveToolChanged : MU_XC_NAMESPACE
  • Adapt() : MU_PRIVATE_CONTROLS_NAMESPACE
  • Add : MU_XC_NAMESPACE , Microsoft::UI::Private::Composition::Effects
  • add_Resuming() : ABI::Windows::ApplicationModel::Core
  • add_Suspending() : ABI::Windows::ApplicationModel::Core
  • AddScrollVelocity() : MU_XC_NAMESPACE
  • AddTabButtonClick : MU_XC_NAMESPACE
  • AddZoomVelocity() : MU_XC_NAMESPACE
  • AlignContent : Flick
  • AlignItems : Flick
  • All : MU_XC_NAMESPACE
  • AllExceptPens : MU_XC_NAMESPACE
  • Alpha : MU_XC_NAMESPACE , Microsoft::UI::Private::Composition::Effects
  • AlphaMaskEffect : Microsoft::UI::Private::Composition::Effects
  • Always : MU_XC_NAMESPACE
  • AnchorRequested : MU_XC_NAMESPACE
  • AnimatedAcceptVisualSource : MU_XCAV_NAMESPACE
  • AnimatedBackVisualSource : MU_XCAV_NAMESPACE
  • AnimatedChevronDownSmallVisualSource : MU_XCAV_NAMESPACE
  • AnimatedChevronRightDownSmallVisualSource : MU_XCAV_NAMESPACE
  • AnimatedChevronUpDownSmallVisualSource : MU_XCAV_NAMESPACE
  • AnimatedFindVisualSource : MU_XCAV_NAMESPACE
  • AnimatedGlobalNavigationButtonVisualSource : MU_XCAV_NAMESPACE
  • AnimatedIcon : MU_XC_NAMESPACE
  • AnimatedIconAnimationQueueBehavior : MU_PRIVATE_CONTROLS_NAMESPACE
  • AnimatedIconSource : MU_XC_NAMESPACE
  • AnimatedSettingsVisualSource : MU_XCAV_NAMESPACE
  • AnimatedVisualPlayer : MU_XC_NAMESPACE
  • AnimatedVisualPlayerAutomationPeer : MU_XAP_NAMESPACE
  • Animation : MU_XC_NAMESPACE
  • animationHandler : MU_PRIVATE_CONTROLS_NAMESPACE
  • AnimationModeToString() : TypeLogging
  • Anisotropic : Microsoft::UI::Private::Composition::Effects
  • AnnotatedScrollBarScrollingEventKind : MU_XC_NAMESPACE
  • are_all_set() : flags_enum
  • ArePrecisionErasersVisible : MU_XC_NAMESPACE
  • ArithmeticCompositeEffect : Microsoft::UI::Private::Composition::Effects
  • Auto : MU_XC_NAMESPACE
  • AutomationInvoke : MU_XC_NAMESPACE
  • AutoPlay : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- b -

  • BackRequested : MU_XC_NAMESPACE
  • Balanced : Microsoft::UI::Private::Composition::Effects
  • BallpointPen : MU_XC_NAMESPACE
  • BindToAccessKeyIfUnset() : CommandingHelpers
  • BindToDescriptionPropertiesIfUnset() : CommandingHelpers
  • BindToIconPropertyIfUnset() : CommandingHelpers
  • BindToIconSourcePropertyIfUnset() : CommandingHelpers
  • BindToKeyboardAcceleratorsIfUnset() : CommandingHelpers
  • BindToLabelPropertyIfUnset() : CommandingHelpers
  • BlendEffect : Microsoft::UI::Private::Composition::Effects
  • Blue : Microsoft::UI::Private::Composition::Effects
  • BorderEffect : Microsoft::UI::Private::Composition::Effects
  • BorderLight_ShouldBeOn() : MU_PRIVATE_MEDIA_NAMESPACE
  • Both : MU_XC_NAMESPACE
  • Bottom : MU_XC_NAMESPACE , MU_XCP_NAMESPACE
  • BottomLeft : MU_XC_NAMESPACE
  • BottomRight : MU_XC_NAMESPACE
  • BottomRightValue : MU_XCP_NAMESPACE
  • BottomTop : MU_XC_NAMESPACE
  • BottomToTop : MU_XC_NAMESPACE
  • BoundedCopy : Microsoft::UI::Private::Composition::Effects
  • Box : MU_XC_NAMESPACE
  • BreadcrumbBarItemAutomationPeer : MU_XAP_NAMESPACE
  • BringingIntoView : MU_XC_NAMESPACE
  • ButtonFlyoutPlacement : MU_XC_NAMESPACE
  • ButtonInteractionInvokeMode : MU_PRIVATE_CONTROLS_NAMESPACE
  • ButtonPanel : MU_XC_NAMESPACE
  • ButtonPanelAlwaysShowFirstLastPageIndex : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- c -

  • c_knownNamespacePrefixes : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • c_reunionPackageNamePrefix : anonymous_namespace{SharedHelpers.cpp}
  • c_reunionPackageNamePrefixLength : anonymous_namespace{SharedHelpers.cpp}
  • c_typeEntries : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • CanvasAlphaMode : Microsoft::UI::Private::Composition::Effects
  • CanvasBlend : Microsoft::UI::Private::Composition::Effects
  • CanvasComposite : Microsoft::UI::Private::Composition::Effects
  • CanvasEdgeBehavior : Microsoft::UI::Private::Composition::Effects
  • CanvasImageInterpolation : Microsoft::UI::Private::Composition::Effects
  • Center : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • ChainingModeToString() : TypeLogging
  • Check : MU_XC_NAMESPACE
  • Checked : MU_XC_NAMESPACE
  • Clamp : Microsoft::UI::Private::Composition::Effects
  • ClearAll : MU_XC_NAMESPACE
  • ClearBindingIfSet() : CommandingHelpers
  • ClearTypeProperties() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • Click : MU_XC_NAMESPACE
  • Close : MU_XC_NAMESPACE
  • CloseButton : MU_XC_NAMESPACE
  • CloseButtonClick : MU_XC_NAMESPACE
  • CloseButtonCommand : MU_XC_NAMESPACE
  • CloseButtonCommandParameter : MU_XC_NAMESPACE
  • CloseButtonContent : MU_XC_NAMESPACE
  • CloseButtonStyle : MU_XC_NAMESPACE
  • Closed : MU_XC_NAMESPACE
  • CloseRequested : MU_XC_NAMESPACE
  • Closing : MU_XC_NAMESPACE
  • Collapsed : MU_XC_NAMESPACE
  • CollectionChangeAdd : MU_XC_NAMESPACE
  • CollectionChangeRemove : MU_XC_NAMESPACE
  • CollectionChangeReset : MU_XC_NAMESPACE
  • ColorChanged : MU_XC_NAMESPACE , MU_XCP_NAMESPACE
  • ColorChannels : Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
  • ColorMatrixEffect : Microsoft::UI::Private::Composition::Effects
  • ColorPicker : MU_XC_NAMESPACE
  • ColorPickerHsvChannel : MU_XC_NAMESPACE
  • ColorPickerSlider : MU_XCP_NAMESPACE
  • ColorPickerSliderAutomationPeer : MU_XAP_NAMESPACE
  • ColorSourceEffect : Microsoft::UI::Private::Composition::Effects
  • ColorSpectrum : MU_XCP_NAMESPACE
  • ColorSpectrumAutomationPeer : MU_XAP_NAMESPACE
  • ColorSpectrumComponents : MU_XC_NAMESPACE
  • ColorSpectrumShape : MU_XC_NAMESPACE
  • ColumnMajorUniformToLargestGridLayout : MU_XCP_NAMESPACE
  • ComboBox : MU_XC_NAMESPACE
  • CommandBarFlyout : MU_XC_NAMESPACE
  • CommandBarFlyoutCommandBar : MU_XCP_NAMESPACE
  • CommandBarFlyoutCommandBarTemplateSettings : MU_XCP_NAMESPACE
  • Compact : MU_XC_NAMESPACE
  • Completed : MU_PRIVATE_CONTROLS_NAMESPACE
  • CompositeStepEffect : Microsoft::UI::Private::Composition::Effects
  • ConfigurationChangedEventHandler() : MU_PRIVATE_CONTROLS_NAMESPACE
  • ConfigurationContent : MU_XC_NAMESPACE
  • ContainerFromIndex() : MU_XC_NAMESPACE
  • ContainerFromItem() : MU_XC_NAMESPACE
  • contains() : CollectionHelper
  • ContrastEffect : Microsoft::UI::Private::Composition::Effects
  • Copy : Microsoft::UI::Private::Composition::Effects
  • CornerRadiusFilterConverter : MU_XCP_NAMESPACE
  • CornerRadiusFilterKind : MU_XCP_NAMESPACE
  • CornerRadiusToThicknessConverter : MU_XCP_NAMESPACE
  • CornerRadiusToThicknessConverterKind : MU_XCP_NAMESPACE
  • CreateInkDrawingAttributes() : MU_XC_NAMESPACE
  • CreateInkDrawingAttributesCore() : MU_XC_NAMESPACE
  • CrossFadeEffect : Microsoft::UI::Private::Composition::Effects
  • Cubic : Microsoft::UI::Private::Composition::Effects
  • Custom : MU_XC_NAMESPACE
  • CustomPen : MU_XC_NAMESPACE
  • CustomTool : MU_XC_NAMESPACE
  • Cut : MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- d -

  • DECLARE_AUTOHANDLE_CLASS() : MUXControls::Common
  • DecrementButton : MU_XC_NAMESPACE
  • Default : MU_XC_NAMESPACE
  • DEFINE_PROFILEGROUP() : RuntimeProfiler
  • Description : MU_XC_NAMESPACE
  • DesktopAcrylicBackdrop : MU_XM_NAMESPACE
  • DestinationAtop : Microsoft::UI::Private::Composition::Effects
  • DestinationIn : Microsoft::UI::Private::Composition::Effects
  • DestinationOut : Microsoft::UI::Private::Composition::Effects
  • DestinationOver : Microsoft::UI::Private::Composition::Effects
  • DeviceType : Common
  • Disabled : MU_XC_NAMESPACE
  • DisplayMode : MU_XC_NAMESPACE
  • DistantDiffuseEffect : Microsoft::UI::Private::Composition::Effects
  • DistantSpecularEffect : Microsoft::UI::Private::Composition::Effects
  • DoInkPresenterWork() : MU_XC_NAMESPACE
  • DoubleTap : MU_XC_NAMESPACE
  • Down : MU_XC_NAMESPACE
  • Drag : MU_XC_NAMESPACE
  • DropDownButton : MU_XC_NAMESPACE
  • DropDownButtonAutomationPeer : MU_XAP_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- e -

  • EffectBorderMode : Microsoft::UI::Private::Composition::Effects
  • EffectChannelSelect : Microsoft::UI::Private::Composition::Effects
  • EffectOptimization : Microsoft::UI::Private::Composition::Effects
  • ElementClearing : MU_XC_NAMESPACE
  • ElementFactory : MU_XC_NAMESPACE
  • ElementIndexChanged : MU_XC_NAMESPACE
  • ElementPrepared : MU_XC_NAMESPACE
  • ElementRealizationOptions : MU_XC_NAMESPACE
  • Enabled : MU_XC_NAMESPACE
  • End : MU_XC_NAMESPACE
  • EnterKey : MU_XC_NAMESPACE
  • Equal : MU_XC_NAMESPACE
  • EraseAllClicked : MU_XC_NAMESPACE
  • Eraser : MU_XC_NAMESPACE
  • EraserFlyoutItemClicked : MU_XC_NAMESPACE
  • Error : MU_XC_NAMESPACE
  • EventFrequency : RuntimeProfiler
  • Execute : MU_XC_NAMESPACE
  • ExpandDirection : MU_XC_NAMESPACE
  • Expanded : MU_XC_NAMESPACE
  • Expander : MU_XC_NAMESPACE
  • ExpanderAutomationPeer : MU_XAP_NAMESPACE
  • ExpanderTemplateSettings : MU_XC_NAMESPACE
  • Expanding : MU_XC_NAMESPACE
  • ExposureEffect : Microsoft::UI::Private::Composition::Effects
  • Extended : MU_XC_NAMESPACE
  • ExtentChanged : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- f -

  • FallbackContent : MU_XC_NAMESPACE
  • Far : MU_XCP_NAMESPACE
  • Fill : MU_XC_NAMESPACE
  • FilterBottomFromBottomLeft : MU_XCP_NAMESPACE
  • FilterBottomFromBottomRight : MU_XCP_NAMESPACE
  • FilterLeftAndRightFromBottom : MU_XCP_NAMESPACE
  • FilterLeftAndRightFromTop : MU_XCP_NAMESPACE
  • FilterLeftFromBottomLeft : MU_XCP_NAMESPACE
  • FilterLeftFromTopLeft : MU_XCP_NAMESPACE
  • FilterRightFromBottomRight : MU_XCP_NAMESPACE
  • FilterRightFromTopRight : MU_XCP_NAMESPACE
  • FilterTopAndBottomFromLeft : MU_XCP_NAMESPACE
  • FilterTopAndBottomFromRight : MU_XCP_NAMESPACE
  • FilterTopFromTopLeft : MU_XCP_NAMESPACE
  • FilterTopFromTopRight : MU_XCP_NAMESPACE
  • FireEvent() : RuntimeProfiler
  • FirstButtonCommand : MU_XC_NAMESPACE
  • FirstButtonStyle : MU_XC_NAMESPACE
  • FirstButtonVisibility : MU_XC_NAMESPACE
  • FlexDirection : Flick
  • FlexWrap : Flick
  • Float2ToString() : TypeLogging
  • FlowLayout : MU_XC_NAMESPACE
  • FlowLayoutLineAlignment : MU_XC_NAMESPACE
  • FlowLayoutState : MU_XC_NAMESPACE
  • FocusStateToString() : TypeLogging
  • ForceCreate : MU_XC_NAMESPACE
  • ForceCreateAcrylicBrush() : MU_PRIVATE_MEDIA_NAMESPACE
  • FormatString() : StringUtil
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- g -

  • Gamepad : MU_XC_NAMESPACE
  • GammaTransferEffect : Microsoft::UI::Private::Composition::Effects
  • GaussianBlurEffect : Microsoft::UI::Private::Composition::Effects
  • get_Properties() : ABI::Windows::ApplicationModel::Core
  • GetActualWidthFor() : LayoutUtils
  • GetAlpha() : hsv
  • GetAsRevealBorderLight() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetAsRevealHoverLight() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetAt() : MU_XC_NAMESPACE
  • GetCurrentView() : ABI::Windows::ApplicationModel::Core
  • GetElementIndex() : MU_XC_NAMESPACE
  • GetFactory() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • GetHoverLightOffsetExpression() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetHue() : hsv
  • GetMenuButton() : MU_XC_NAMESPACE
  • GetNonVirtualizingLayoutContext() : anonymous_namespace{Layout.cpp}
  • GetOrCreateElement() : MU_XC_NAMESPACE
  • GetSaturation() : hsv
  • GetSpotLight() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetToggleButton() : MU_XC_NAMESPACE
  • GetToolButton() : MU_XC_NAMESPACE
  • GetValue() : hsv
  • GetVirtualizingLayoutContext() : anonymous_namespace{Layout.cpp}
  • gProfileGroups : RuntimeProfiler
  • GrayscaleEffect : Microsoft::UI::Private::Composition::Effects
  • Green : Microsoft::UI::Private::Composition::Effects
  • GroupName : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- h -

  • Hard : Microsoft::UI::Private::Composition::Effects
  • Header : MU_XC_NAMESPACE
  • HeaderTemplate : MU_XC_NAMESPACE
  • HeroContent : MU_XC_NAMESPACE
  • HeroContentPlacement : MU_XC_NAMESPACE
  • Hidden : MU_XC_NAMESPACE
  • HiddenOnEdge : MU_XC_NAMESPACE
  • Highlighter : MU_XC_NAMESPACE
  • HighQualityCubic : Microsoft::UI::Private::Composition::Effects
  • Horizontal : MU_XC_NAMESPACE
  • HorizontalOrientationPadding : MU_XCP_NAMESPACE
  • Hover : MU_PRIVATE_CONTROLS_NAMESPACE
  • HoverLight_IsPointerOver() : MU_PRIVATE_MEDIA_NAMESPACE
  • HoverLight_IsPressed() : MU_PRIVATE_MEDIA_NAMESPACE
  • HoverLight_ShouldBeOn() : MU_PRIVATE_MEDIA_NAMESPACE
  • hstring_name_of() : winrt
  • Hue : MU_XC_NAMESPACE
  • HueRotationEffect : Microsoft::UI::Private::Composition::Effects
  • HueSaturation : MU_XC_NAMESPACE
  • HueValue : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- i -

  • IconElement : MU_XC_NAMESPACE
  • IconSource : MU_XC_NAMESPACE
  • Idle : MU_XC_NAMESPACE
  • IExpandCollapseProvider : MU_XAP_NAMESPACE
  • Ignore : Microsoft::UI::Private::Composition::Effects , MU_XC_NAMESPACE
  • Ignored : MU_PRIVATE_CONTROLS_NAMESPACE
  • ImageIcon : MU_XC_NAMESPACE
  • ImageIconSource : MU_XC_NAMESPACE
  • IncrementButton : MU_XC_NAMESPACE
  • IndexBasedLayoutOrientation : MU_XC_NAMESPACE
  • IndexFromKey() : MU_XC_NAMESPACE
  • IndexOf() : MU_XC_NAMESPACE
  • IndexPath : MU_XC_NAMESPACE
  • Inertia : MU_XC_NAMESPACE
  • InfoBadge : MU_XC_NAMESPACE
  • InfoBadgeCornerRadius : MU_XC_NAMESPACE
  • InfoBadgeTemplateSettings : MU_XC_NAMESPACE
  • InfoBarAutomationPeer : MU_XAP_NAMESPACE
  • InfoBarCloseReason : MU_XC_NAMESPACE
  • InfoBarPanel : MU_XCP_NAMESPACE
  • InfoBarSeverity : MU_XC_NAMESPACE
  • Informational : MU_XC_NAMESPACE
  • InitialControls : MU_XC_NAMESPACE
  • InitializeRuntimeProfiler() : RuntimeProfiler
  • InkCanvas : MU_XC_NAMESPACE
  • InkCanvasAutomationPeer : MU_XAP_NAMESPACE
  • InkDrawingAttributesChanged : MU_XC_NAMESPACE
  • InkToolBar : MU_XC_NAMESPACE
  • InkToolBarAutomationPeer : MU_XAP_NAMESPACE
  • InkToolBarBallpointPenButton : MU_XC_NAMESPACE
  • InkToolBarButtonFlyoutPlacement : MU_XC_NAMESPACE
  • InkToolBarCustomPen : MU_XC_NAMESPACE
  • InkToolBarCustomPenButton : MU_XC_NAMESPACE
  • InkToolBarCustomToggleButton : MU_XC_NAMESPACE
  • InkToolBarCustomToolButton : MU_XC_NAMESPACE
  • InkToolBarEraserButton : MU_XC_NAMESPACE
  • InkToolBarEraserFlyoutItemKind : MU_XC_NAMESPACE
  • InkToolBarEraserKind : MU_XC_NAMESPACE
  • InkToolBarFlyoutItem : MU_XC_NAMESPACE
  • InkToolBarFlyoutItemAutomationPeer : MU_XAP_NAMESPACE
  • InkToolBarFlyoutItemKind : MU_XC_NAMESPACE
  • InkToolBarHighlighterButton : MU_XC_NAMESPACE
  • InkToolBarInitialControls : MU_XC_NAMESPACE
  • InkToolBarMenuButton : MU_XC_NAMESPACE
  • InkToolBarMenuButtonAutomationPeer : MU_XAP_NAMESPACE
  • InkToolBarMenuKind : MU_XC_NAMESPACE
  • InkToolBarPenButton : MU_XC_NAMESPACE
  • InkToolBarPencilButton : MU_XC_NAMESPACE
  • InkToolBarPenConfigurationControl : MU_XC_NAMESPACE
  • InkToolBarStencilButton : MU_XC_NAMESPACE
  • InkToolBarStencilKind : MU_XC_NAMESPACE
  • InkToolBarToggle : MU_XC_NAMESPACE
  • InkToolBarToggleButton : MU_XC_NAMESPACE
  • InkToolBarTool : MU_XC_NAMESPACE
  • InkToolBarToolButton : MU_XC_NAMESPACE
  • InkToolBarToolButtonAutomationPeer : MU_XAP_NAMESPACE
  • Inline : MU_XC_NAMESPACE
  • InputKindToString() : TypeLogging
  • Interacting : MU_XC_NAMESPACE
  • Interaction : MU_XC_NAMESPACE
  • InteractionTrackerAsyncOperationTriggerToString() : TypeLogging
  • InteractionTrackerAsyncOperationTypeToString() : TypeLogging
  • Interrupted : MU_PRIVATE_CONTROLS_NAMESPACE
  • InvalidateLayoutCall : MU_PRIVATE_CONTROLS_NAMESPACE
  • InvalidInputOverwritten : MU_XC_NAMESPACE
  • InvertEffect : Microsoft::UI::Private::Composition::Effects
  • is_set() : flags_enum
  • IsChecked : MU_XC_NAMESPACE
  • IsClearAllVisible : MU_XC_NAMESPACE
  • ISelectionItemProvider : MU_XAP_NAMESPACE
  • IsExtensionGlyphShown : MU_XC_NAMESPACE
  • IsInFrameworkPackageImpl() : anonymous_namespace{SharedHelpers.cpp}
  • IsLightDismissEnabled : MU_XC_NAMESPACE
  • IsOpen : MU_XC_NAMESPACE
  • IsProtractorItemVisible : MU_XC_NAMESPACE
  • IsRulerButtonChecked : MU_XC_NAMESPACE
  • IsRulerItemVisible : MU_XC_NAMESPACE
  • IsStencilButtonChecked : MU_XC_NAMESPACE
  • IsStencilButtonCheckedChanged : MU_XC_NAMESPACE
  • IsStrokeEraserVisible : MU_XC_NAMESPACE
  • IsWrapEnabled : MU_XC_NAMESPACE
  • ItemCollectionTransition : MU_XC_NAMESPACE
  • ItemCollectionTransitionOperation : MU_XC_NAMESPACE
  • ItemCollectionTransitionProgress : MU_XC_NAMESPACE
  • ItemCollectionTransitionProvider : MU_XC_NAMESPACE
  • ItemCollectionTransitionTriggers : MU_XC_NAMESPACE
  • ItemContainerAutomationPeer : MU_XAP_NAMESPACE
  • ItemContainerInteractionTrigger : MU_XC_NAMESPACE
  • ItemContainerInteractionTriggerToString() : TypeLogging
  • ItemContainerMultiSelectMode : MU_XC_NAMESPACE
  • ItemContainerMultiSelectModeToString() : TypeLogging
  • ItemContainerUserInvokeMode : MU_XC_NAMESPACE
  • ItemContainerUserSelectMode : MU_XC_NAMESPACE
  • ItemDesiredWidthChange : MU_PRIVATE_CONTROLS_NAMESPACE
  • ItemsRepeater : MU_XC_NAMESPACE
  • ItemsRepeaterElementClearingEventArgs : MU_XC_NAMESPACE
  • ItemsRepeaterElementIndexChangedEventArgs : MU_XC_NAMESPACE
  • ItemsRepeaterElementPreparedEventArgs : MU_XC_NAMESPACE
  • ItemsRepeaterScrollHost : MU_XC_NAMESPACE
  • ItemsSource : MU_XC_NAMESPACE
  • ItemsSourceView : MU_XC_NAMESPACE
  • ItemsViewAutomationPeer : MU_XAP_NAMESPACE
  • ItemsViewSelectionMode : MU_XC_NAMESPACE
  • ItemTemplate : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- p -

  • PackIntoWin32StyleMouseArgs_wparam() : WebView2Utility
  • PackIntoWin32StylePointerArgs_lparam() : WebView2Utility
  • PagerControl : MU_XC_NAMESPACE
  • PagerControlAutomationPeer : MU_XAP_NAMESPACE
  • PagerControlButtonVisibility : MU_XC_NAMESPACE
  • PagerControlDisplayMode : MU_XC_NAMESPACE
  • PagerControlTemplateSettings : MU_XC_NAMESPACE
  • PagerInputCommand : MU_XC_NAMESPACE
  • Pane1 : MU_XC_NAMESPACE
  • Pane2 : MU_XC_NAMESPACE
  • PaneToggleRequested : MU_XC_NAMESPACE
  • ParallaxSourceOffsetKind : MU_XC_NAMESPACE
  • ParallaxView : MU_XC_NAMESPACE
  • Pause() : MU_XC_NAMESPACE
  • Peeking : MU_XC_NAMESPACE
  • Pen : MU_XC_NAMESPACE
  • Pencil : MU_XC_NAMESPACE
  • Pending : MU_XC_NAMESPACE
  • PensOnly : MU_XC_NAMESPACE
  • PersonPicture : MU_XC_NAMESPACE
  • PersonPictureAutomationPeer : MU_XAP_NAMESPACE
  • PersonPictureTemplateSettings : MU_XC_NAMESPACE
  • PG_Class : RuntimeProfiler
  • PipsPager : MU_XC_NAMESPACE
  • PipsPagerAutomationPeer : MU_XAP_NAMESPACE
  • PipsPagerButtonVisibility : MU_XC_NAMESPACE
  • PipsPagerTemplateSettings : MU_XC_NAMESPACE
  • PipsPagerWrapMode : MU_XC_NAMESPACE
  • PlacementMargin : MU_XC_NAMESPACE
  • PlayAsync() : MU_XC_NAMESPACE
  • PlaybackRate : MU_XC_NAMESPACE
  • PlayerAnimationOptimization : MU_XC_NAMESPACE
  • PointDiffuseEffect : Microsoft::UI::Private::Composition::Effects
  • PointerDeviceTypeToString() : TypeLogging
  • PointerOver : MU_XM_NAMESPACE
  • PointerPointToString() : TypeLogging
  • PointerPressed : MU_XC_NAMESPACE
  • PointerReleased : MU_XC_NAMESPACE
  • PointerUpdateKindToString() : TypeLogging
  • PointSpecularEffect : Microsoft::UI::Private::Composition::Effects
  • PostArrangeEventHandler() : MU_PRIVATE_CONTROLS_NAMESPACE
  • PosterizeEffect : Microsoft::UI::Private::Composition::Effects
  • PrecisionLarge : MU_XC_NAMESPACE
  • PrecisionLargeEraser : MU_XC_NAMESPACE
  • PrecisionSmall : MU_XC_NAMESPACE
  • PrecisionSmallEraser : MU_XC_NAMESPACE
  • PreferredPlacement : MU_XC_NAMESPACE
  • PrefixText : MU_XC_NAMESPACE
  • Premultiplied : Microsoft::UI::Private::Composition::Effects
  • PremultiplyEffect : Microsoft::UI::Private::Composition::Effects
  • Press : MU_PRIVATE_CONTROLS_NAMESPACE
  • Pressed : MU_XM_NAMESPACE
  • PreventKeyboardDisplayOnProgrammaticFocus : MU_XC_NAMESPACE
  • PreviousButtonCommand : MU_XC_NAMESPACE
  • PreviousButtonStyle : MU_XC_NAMESPACE
  • PreviousButtonVisibility : MU_XC_NAMESPACE
  • ProfId_Acrylic : RuntimeProfiler
  • ProfId_AnimatedIcon : RuntimeProfiler
  • ProfId_AnimatedVisualPlayer : RuntimeProfiler
  • ProfId_AnnotatedScrollBar : RuntimeProfiler
  • ProfId_BreadcrumbBar : RuntimeProfiler
  • ProfId_BreadcrumbBarItem : RuntimeProfiler
  • ProfId_ColorPicker : RuntimeProfiler
  • ProfId_CommandBarFlyout : RuntimeProfiler
  • ProfId_DropDownButton : RuntimeProfiler
  • ProfId_Expander : RuntimeProfiler
  • ProfId_ImageIcon : RuntimeProfiler
  • ProfId_InfoBadge : RuntimeProfiler
  • ProfId_InfoBar : RuntimeProfiler
  • ProfId_InkCanvas : RuntimeProfiler
  • ProfId_ItemContainer : RuntimeProfiler
  • ProfId_ItemsRepeater : RuntimeProfiler
  • ProfId_ItemsRepeaterScrollHost : RuntimeProfiler
  • ProfId_ItemsView : RuntimeProfiler
  • ProfId_LinedFlowLayout : RuntimeProfiler
  • ProfId_MapControl : RuntimeProfiler
  • ProfId_MicaController : RuntimeProfiler
  • ProfId_NavigationView : RuntimeProfiler
  • ProfId_NonVirtualizingLayout : RuntimeProfiler
  • ProfId_NumberBox : RuntimeProfiler
  • ProfId_PagerControl : RuntimeProfiler
  • ProfId_ParallaxView : RuntimeProfiler
  • ProfId_PersonPicture : RuntimeProfiler
  • ProfId_PipsPager : RuntimeProfiler
  • ProfId_ProgressBar : RuntimeProfiler
  • ProfId_ProgressRing : RuntimeProfiler
  • ProfId_RadialGradientBrush : RuntimeProfiler
  • ProfId_RadioButtons : RuntimeProfiler
  • ProfId_RadioMenuFlyoutItem : RuntimeProfiler
  • ProfId_RatingControl : RuntimeProfiler
  • ProfId_RefreshContainer : RuntimeProfiler
  • ProfId_RefreshVisualizer : RuntimeProfiler
  • ProfId_Reveal : RuntimeProfiler
  • ProfId_ScrollPresenter : RuntimeProfiler
  • ProfId_ScrollView : RuntimeProfiler
  • ProfId_SelectorBar : RuntimeProfiler
  • ProfId_Size : RuntimeProfiler
  • ProfId_SplitButton : RuntimeProfiler
  • ProfId_StackLayout : RuntimeProfiler
  • ProfId_SwipeControl : RuntimeProfiler
  • ProfId_SwipeItem : RuntimeProfiler
  • ProfId_TabView : RuntimeProfiler
  • ProfId_TabViewItem : RuntimeProfiler
  • ProfId_TeachingTip : RuntimeProfiler
  • ProfId_TextCommandBarFlyout : RuntimeProfiler
  • ProfId_TitleBar : RuntimeProfiler
  • ProfId_TreeView : RuntimeProfiler
  • ProfId_TwoPaneView : RuntimeProfiler
  • ProfId_UniformGridLayout : RuntimeProfiler
  • ProfId_VirtualizingLayout : RuntimeProfiler
  • ProfId_WebView2 : RuntimeProfiler
  • ProfileGroup : RuntimeProfiler
  • ProfilerClassId : RuntimeProfiler
  • ProfilerMemberId : RuntimeProfiler
  • ProfMemberId_Acrylic_TintLuminosityOpacity_Changed : RuntimeProfiler
  • ProfMemberId_Size : RuntimeProfiler
  • ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation : RuntimeProfiler
  • ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation : RuntimeProfiler
  • ProfMemberId_TeachingTip_TipDidNotOpenDueToSize : RuntimeProfiler
  • Programmatic : MU_XC_NAMESPACE
  • ProgressBar : MU_XC_NAMESPACE
  • ProgressBarAutomationPeer : MU_XAP_NAMESPACE
  • ProgressBarTemplateSettings : MU_XC_NAMESPACE
  • ProgressRing : MU_XC_NAMESPACE
  • ProgressRingAutomationPeer : MU_XAP_NAMESPACE
  • ProgressRingTemplateSettings : MU_XC_NAMESPACE
  • Protractor : MU_XC_NAMESPACE
  • PROVIDE_DEPENDENCY() : Private
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- q -

  • Quality : Microsoft::UI::Private::Composition::Effects
  • QueueInkPresenterWorkItem() : MU_XC_NAMESPACE
  • QueueOne : MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- r -

  • RadialGradientBrush : MU_XM_NAMESPACE
  • Radio : MU_XC_NAMESPACE
  • RadioButtons : MU_XC_NAMESPACE
  • RadioButtonsAutomationPeer : MU_XAP_NAMESPACE
  • RadioCheck : MU_XC_NAMESPACE
  • RadioMenuFlyoutItem : MU_XC_NAMESPACE
  • RailingModeToString() : TypeLogging
  • RatingControl : MU_XC_NAMESPACE
  • RatingControlAutomationPeer : MU_XAP_NAMESPACE
  • RatingItemFontInfo : MU_XC_NAMESPACE
  • RatingItemImageInfo : MU_XC_NAMESPACE
  • RatingItemInfo : MU_XC_NAMESPACE
  • RectToString() : TypeLogging
  • RecyclePool : MU_XC_NAMESPACE
  • RecyclingElementFactory : MU_XC_NAMESPACE
  • Red : Microsoft::UI::Private::Composition::Effects
  • RefreshAutomaticHorizontalOffsets() : MU_XC_NAMESPACE
  • RefreshAutomaticVerticalOffsets() : MU_XC_NAMESPACE
  • RefreshContainer : MU_XC_NAMESPACE
  • Refreshing : MU_XC_NAMESPACE
  • RefreshPullDirection : MU_XC_NAMESPACE
  • RefreshRequested : MU_XC_NAMESPACE
  • RefreshVisualizerOrientation : MU_XC_NAMESPACE
  • RefreshVisualizerState : MU_XC_NAMESPACE
  • RegisterAnchorCandidate() : MU_XC_NAMESPACE
  • RegisterMethod() : RuntimeProfiler
  • RegressionTestType : Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
  • Relative : MU_XC_NAMESPACE
  • Release : MU_PRIVATE_CONTROLS_NAMESPACE
  • RemainOpen : MU_XC_NAMESPACE
  • remove() : CollectionHelper
  • Remove : MU_XC_NAMESPACE
  • remove_Resuming() : ABI::Windows::ApplicationModel::Core
  • remove_Suspending() : ABI::Windows::ApplicationModel::Core
  • RepeaterAutomationPeer : MU_XAP_NAMESPACE
  • RequestRefresh() : MU_XC_NAMESPACE
  • Resources : MU_XC_NAMESPACE
  • Resume() : MU_XC_NAMESPACE
  • Reveal : MU_XC_NAMESPACE
  • RevealBackgroundBrush : MU_XM_NAMESPACE
  • RevealBorderBrush : MU_XM_NAMESPACE
  • RevealBorderLight : MU_PRIVATE_MEDIA_NAMESPACE
  • RevealBrush : MU_XM_NAMESPACE
  • RevealBrushState : MU_XM_NAMESPACE
  • RevealBrushTestApi : MU_PRIVATE_MEDIA_NAMESPACE
  • RevealGridItemTemplates : MUXControlsTestApp
  • RevealHoverLight : MU_PRIVATE_MEDIA_NAMESPACE
  • RevealListViewItemPresenter : MU_XC_NAMESPACE
  • RevealTestApi : MU_PRIVATE_MEDIA_NAMESPACE
  • RevealTestBackgrounds : MUXControlsTestApp
  • Right : MU_XC_NAMESPACE , MU_XCP_NAMESPACE
  • RightBottom : MU_XC_NAMESPACE
  • RightLeft : MU_XC_NAMESPACE
  • RightToLeft : MU_XC_NAMESPACE
  • RightTop : MU_XC_NAMESPACE
  • Ring : MU_XC_NAMESPACE
  • Rotate270DegreesCounterclockwise : MU_XC_NAMESPACE
  • Rotate90DegreesCounterclockwise : MU_XC_NAMESPACE
  • Ruler : MU_XC_NAMESPACE
  • Run() : ABI::Windows::ApplicationModel::Core
  • RunWithActivationFactories() : ABI::Windows::ApplicationModel::Core
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- s -

  • Saturation : MU_XC_NAMESPACE
  • SaturationEffect : Microsoft::UI::Private::Composition::Effects
  • SaturationHue : MU_XC_NAMESPACE
  • SaturationValue : MU_XC_NAMESPACE
  • ScrollAmountToString() : TypeLogging
  • ScrollAnimationStarting : MU_XC_NAMESPACE
  • ScrollBarVisibilityToString() : TypeLogging
  • ScrollBy() : MU_XC_NAMESPACE
  • ScrollCompleted : MU_XC_NAMESPACE
  • ScrollEventTypeToString() : TypeLogging
  • ScrollingAnimationMode : MU_XC_NAMESPACE
  • ScrollingChainMode : MU_XC_NAMESPACE
  • ScrollingContentOrientation : MU_XC_NAMESPACE
  • ScrollingIndicatorModeToString() : TypeLogging
  • ScrollingInputKinds : MU_XC_NAMESPACE
  • ScrollingInteractionState : MU_XC_NAMESPACE
  • ScrollingRailMode : MU_XC_NAMESPACE
  • ScrollingScrollBarVisibility : MU_XC_NAMESPACE
  • ScrollingScrollMode : MU_XC_NAMESPACE
  • ScrollingSnapPointsMode : MU_XC_NAMESPACE
  • ScrollingZoomMode : MU_XC_NAMESPACE
  • ScrollModeToString() : TypeLogging
  • ScrollOptionsToString() : TypeLogging
  • ScrollOrientation : Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
  • ScrollPresenterAutomationPeer : MU_XAP_NAMESPACE
  • ScrollPresenterViewChangeResult : MU_PRIVATE_CONTROLS_NAMESPACE
  • ScrollPresenterViewChangeResultToString() : TypeLogging
  • ScrollPresenterViewKindToString() : TypeLogging
  • ScrollSnapPointsAlignment : MU_XCP_NAMESPACE
  • ScrollStarting : MU_XC_NAMESPACE
  • ScrollTo() : MU_XC_NAMESPACE
  • ScrollView : MU_XC_NAMESPACE
  • ScrollViewerIRefreshInfoProviderAdapter : MU_PRIVATE_CONTROLS_NAMESPACE
  • SelectedBrushIndex : MU_XC_NAMESPACE
  • SelectedIndex : MU_XC_NAMESPACE
  • SelectedIndexChanged : MU_XC_NAMESPACE
  • SelectedItem : MU_XC_NAMESPACE
  • SelectedPageIndex : MU_XC_NAMESPACE
  • SelectedPipStyle : MU_XC_NAMESPACE
  • SelectedStencil : MU_XC_NAMESPACE
  • SelectedStrokeWidth : MU_XC_NAMESPACE
  • SelectionChanged : MU_XC_NAMESPACE
  • SelectionFlyout : MU_XC_NAMESPACE
  • SelectionHighlightColor : MU_XC_NAMESPACE
  • SelectionModel : MU_XC_NAMESPACE
  • SelectionModelChildrenRequestedEventArgs : MU_XC_NAMESPACE
  • SelectionModelSelectionChangedEventArgs : MU_XC_NAMESPACE
  • SelectorBarItemAutomationPeer : MU_XAP_NAMESPACE
  • SelectTemplateEventArgs : MU_XC_NAMESPACE
  • SepiaEffect : Microsoft::UI::Private::Composition::Effects
  • set() : flags_enum
  • SetAlpha() : hsv
  • SetHue() : hsv
  • SetProgress() : MU_XC_NAMESPACE
  • SetSaturation() : hsv
  • SetValue() : hsv
  • ShouldConstrainToRootBounds : MU_XC_NAMESPACE
  • Simple : MU_XC_NAMESPACE
  • Single : MU_XC_NAMESPACE
  • SinglePane : MU_XC_NAMESPACE
  • SizeToContent : MU_XC_NAMESPACE
  • SizeToString() : TypeLogging
  • SliderInteraction : MU_PRIVATE_CONTROLS_NAMESPACE
  • SmallChange : MU_XC_NAMESPACE
  • SnappedAverageItemsPerLineChange : MU_PRIVATE_CONTROLS_NAMESPACE
  • SnapPointsModeToString() : TypeLogging
  • Soft : Microsoft::UI::Private::Composition::Effects
  • Source : MU_XC_NAMESPACE
  • SourceAtop : Microsoft::UI::Private::Composition::Effects
  • SourceIn : Microsoft::UI::Private::Composition::Effects
  • SourceOut : Microsoft::UI::Private::Composition::Effects
  • SourceOver : Microsoft::UI::Private::Composition::Effects
  • SpaceAround : MU_XC_NAMESPACE
  • SpaceBetween : MU_XC_NAMESPACE
  • SpaceEvenly : MU_XC_NAMESPACE
  • SpaceKey : MU_XC_NAMESPACE
  • SpectrumBrush : MU_PRIVATE_CONTROLS_NAMESPACE
  • Speed : Microsoft::UI::Private::Composition::Effects
  • SpeedUpQueueOne : MU_PRIVATE_CONTROLS_NAMESPACE
  • SplitButtonAutomationPeer : MU_XAP_NAMESPACE
  • SpotDiffuseEffect : Microsoft::UI::Private::Composition::Effects
  • SpotSpecularEffect : Microsoft::UI::Private::Composition::Effects
  • StackLayout : MU_XC_NAMESPACE
  • StackLayoutState : MU_XC_NAMESPACE
  • Start : MU_XC_NAMESPACE
  • StateChanged : MU_XC_NAMESPACE
  • Stencil : MU_XC_NAMESPACE
  • Stop() : MU_XC_NAMESPACE
  • Straight : Microsoft::UI::Private::Composition::Effects
  • Stretch : MU_XC_NAMESPACE
  • Stroke : MU_XC_NAMESPACE
  • StrokeEraser : MU_XC_NAMESPACE
  • Subtitle : MU_XC_NAMESPACE
  • Success : MU_XC_NAMESPACE
  • SuffixText : MU_XC_NAMESPACE
  • SuppressAutoRecycle : MU_XC_NAMESPACE
  • SwipeBehaviorOnInvoked : MU_XC_NAMESPACE
  • SwipeControl : MU_XC_NAMESPACE
  • SwipeItem : MU_XC_NAMESPACE
  • SwipeItemInvokedEventArgs : MU_XC_NAMESPACE
  • SwipeItems : MU_XC_NAMESPACE
  • SwipeMode : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- t -

  • TabCloseRequested : MU_XC_NAMESPACE
  • TabDragCompleted : MU_XC_NAMESPACE
  • TabDragStarting : MU_XC_NAMESPACE
  • TabDroppedOutside : MU_XC_NAMESPACE
  • TabItemsChanged : MU_XC_NAMESPACE
  • TabItemsSource : MU_XC_NAMESPACE
  • TabItemTemplate : MU_XC_NAMESPACE
  • TabStripDragOver : MU_XC_NAMESPACE
  • TabStripDrop : MU_XC_NAMESPACE
  • TabView : MU_XC_NAMESPACE
  • TabViewAutomationPeer : MU_XAP_NAMESPACE
  • TabViewCloseButtonOverlayMode : MU_XC_NAMESPACE
  • TabViewItem : MU_XC_NAMESPACE
  • TabViewItemAutomationPeer : MU_XAP_NAMESPACE
  • TabViewItemTemplateSettings : MU_XC_NAMESPACE
  • TabViewListView : MU_XCP_NAMESPACE
  • TabViewWidthMode : MU_XC_NAMESPACE
  • TailVisibility : MU_XC_NAMESPACE
  • Tall : MU_XC_NAMESPACE
  • Tap : MU_XC_NAMESPACE
  • Target : MU_XC_NAMESPACE
  • TargetInkCanvas : MU_XC_NAMESPACE
  • TargetInkPresenter : MU_XC_NAMESPACE
  • TeachingTip : MU_XC_NAMESPACE
  • TeachingTipAutomationPeer : MU_XAP_NAMESPACE
  • TeachingTipCloseReason : MU_XC_NAMESPACE
  • TeachingTipHeroContentPlacementMode : MU_XC_NAMESPACE
  • TeachingTipPlacementMode : MU_XC_NAMESPACE
  • TeachingTipTailVisibility : MU_XC_NAMESPACE
  • TeachingTipTemplateSettings : MU_XC_NAMESPACE
  • TemperatureAndTintEffect : Microsoft::UI::Private::Composition::Effects
  • Text : MU_XC_NAMESPACE
  • TextCommandBarFlyout : MU_XC_NAMESPACE
  • TintEffect : Microsoft::UI::Private::Composition::Effects
  • TipLocation : MUXControlsTestApp
  • Title : MU_XC_NAMESPACE
  • TitleBar : MU_XC_NAMESPACE
  • TitleBarAutomationPeer : MU_XC_NAMESPACE
  • TitleBarTemplateSettings : MU_XC_NAMESPACE
  • Top : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • TopBottom : MU_XC_NAMESPACE
  • TopLeft : MU_XC_NAMESPACE
  • TopLeftHighlightMargin : MU_XC_NAMESPACE
  • TopLeftValue : MU_XCP_NAMESPACE
  • TopRight : MU_XC_NAMESPACE
  • TopRightHighlightMargin : MU_XC_NAMESPACE
  • TopToBottom : MU_XC_NAMESPACE
  • Touch : MU_XC_NAMESPACE
  • TPTimerCallback() : RuntimeProfiler
  • Transform2DEffect : Microsoft::UI::Private::Composition::Effects
  • TreeViewItemAutomationPeer : MU_XAP_NAMESPACE
  • TreeViewListAutomationPeer : MU_XAP_NAMESPACE
  • TreeViewSelectionMode : MU_XC_NAMESPACE
  • TryGetCurrentPackageGraph() : anonymous_namespace{SharedHelpers.cpp}
  • TryGetElement() : MU_XC_NAMESPACE
  • TwoPaneView : MU_XC_NAMESPACE
  • TwoPaneViewMode : MU_XC_NAMESPACE
  • TwoPaneViewPriority : MU_XC_NAMESPACE
  • TwoPaneViewTallModeConfiguration : MU_XC_NAMESPACE
  • TwoPaneViewWideModeConfiguration : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- u -

  • Unchecked : MU_XC_NAMESPACE
  • underlying_type() : flags_enum
  • Uniform : MU_XC_NAMESPACE
  • UniformGridLayout : MU_XC_NAMESPACE
  • UniformGridLayoutItemsJustification : MU_XC_NAMESPACE
  • UniformGridLayoutItemsStretch : MU_XC_NAMESPACE
  • UniformGridLayoutState : MU_XC_NAMESPACE
  • UninitializeRuntimeProfiler() : RuntimeProfiler
  • unique_push_back() : CollectionHelper
  • UnPremultiplyEffect : Microsoft::UI::Private::Composition::Effects
  • UnregisterAnchorCandidate() : MU_XC_NAMESPACE
  • unset() : flags_enum
  • Up : MU_XC_NAMESPACE
  • UserCanInvoke : MU_XC_NAMESPACE
  • UserCannotInvoke : MU_XC_NAMESPACE
  • UserCannotSelect : MU_XC_NAMESPACE
  • UserCanSelect : MU_XC_NAMESPACE
  • Utf16ToUtf8() : StringUtil
  • Utf8ToUtf16() : StringUtil
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- v -

  • ValidationMode : MU_XC_NAMESPACE
  • Value : MU_XC_NAMESPACE
  • ValueChanged : MU_XC_NAMESPACE
  • ValueHue : MU_XC_NAMESPACE
  • ValueSaturation : MU_XC_NAMESPACE
  • Vertical : MU_XC_NAMESPACE
  • VerticalOrientationPadding : MU_XCP_NAMESPACE
  • ViewChanged : MU_XC_NAMESPACE
  • ViewportChangedEventHandler() : MU_PRIVATE_CONTROLS_NAMESPACE
  • VirtualizingLayout : MU_XC_NAMESPACE
  • VirtualizingLayoutContext : MU_XC_NAMESPACE
  • Visibility : Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
  • VisibilityFromBool() : Util
  • Visible : MU_XC_NAMESPACE
  • VisibleOnPointerOver : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- w -

  • Warning : MU_XC_NAMESPACE
  • WebView2AutomationPeer : MU_XAP_NAMESPACE
  • WhenSelectionFollowsFocus : MU_XC_NAMESPACE
  • Wide : MU_XC_NAMESPACE
  • Wrap : Microsoft::UI::Private::Composition::Effects , MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all namespace members with links to the namespace documentation for each member:

- x -

  • XamlAmbientLight : MU_PRIVATE_MEDIA_NAMESPACE
  • Xor : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • i
  • j
  • l
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v

- a -

  • AlignContent : Flick
  • AlignItems : Flick
  • AnimatedIconAnimationQueueBehavior : MU_PRIVATE_CONTROLS_NAMESPACE
  • AnnotatedScrollBarScrollingEventKind : MU_XC_NAMESPACE

- b -

  • ButtonInteractionInvokeMode : MU_PRIVATE_CONTROLS_NAMESPACE

- c -

  • CanvasAlphaMode : Microsoft::UI::Private::Composition::Effects
  • CanvasBlend : Microsoft::UI::Private::Composition::Effects
  • CanvasComposite : Microsoft::UI::Private::Composition::Effects
  • CanvasEdgeBehavior : Microsoft::UI::Private::Composition::Effects
  • CanvasImageInterpolation : Microsoft::UI::Private::Composition::Effects
  • ColorChannels : Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
  • ColorPickerHsvChannel : MU_XC_NAMESPACE
  • ColorSpectrumComponents : MU_XC_NAMESPACE
  • ColorSpectrumShape : MU_XC_NAMESPACE
  • CornerRadiusFilterKind : MU_XCP_NAMESPACE
  • CornerRadiusToThicknessConverterKind : MU_XCP_NAMESPACE

- d -

  • DeviceType : Common

- e -

  • EffectBorderMode : Microsoft::UI::Private::Composition::Effects
  • EffectChannelSelect : Microsoft::UI::Private::Composition::Effects
  • EffectOptimization : Microsoft::UI::Private::Composition::Effects
  • ElementRealizationOptions : MU_XC_NAMESPACE
  • ExpandDirection : MU_XC_NAMESPACE

- f -

  • FlexDirection : Flick
  • FlexWrap : Flick
  • FlowLayoutLineAlignment : MU_XC_NAMESPACE

- i -

  • IndexBasedLayoutOrientation : MU_XC_NAMESPACE
  • InfoBarCloseReason : MU_XC_NAMESPACE
  • InfoBarSeverity : MU_XC_NAMESPACE
  • InkToolBarButtonFlyoutPlacement : MU_XC_NAMESPACE
  • InkToolBarEraserFlyoutItemKind : MU_XC_NAMESPACE
  • InkToolBarEraserKind : MU_XC_NAMESPACE
  • InkToolBarFlyoutItemKind : MU_XC_NAMESPACE
  • InkToolBarInitialControls : MU_XC_NAMESPACE
  • InkToolBarMenuKind : MU_XC_NAMESPACE
  • InkToolBarStencilKind : MU_XC_NAMESPACE
  • InkToolBarToggle : MU_XC_NAMESPACE
  • InkToolBarTool : MU_XC_NAMESPACE
  • ItemCollectionTransitionOperation : MU_XC_NAMESPACE
  • ItemCollectionTransitionTriggers : MU_XC_NAMESPACE
  • ItemContainerInteractionTrigger : MU_XC_NAMESPACE
  • ItemContainerMultiSelectMode : MU_XC_NAMESPACE
  • ItemContainerUserInvokeMode : MU_XC_NAMESPACE
  • ItemContainerUserSelectMode : MU_XC_NAMESPACE
  • ItemsViewSelectionMode : MU_XC_NAMESPACE

- j -

  • JustifyContent : Flick

- l -

  • LinedFlowLayoutInvalidationTrigger : MU_PRIVATE_CONTROLS_NAMESPACE
  • LinedFlowLayoutItemsJustification : MU_XC_NAMESPACE
  • LinedFlowLayoutItemsStretch : MU_XC_NAMESPACE
  • Location : MUXControlsTestApp

- n -

  • NavigationViewBackButtonVisible : MU_XC_NAMESPACE
  • NavigationViewDisplayMode : MU_XC_NAMESPACE
  • NavigationViewOverflowLabelMode : MU_XC_NAMESPACE
  • NavigationViewPaneDisplayMode : MU_XC_NAMESPACE
  • NavigationViewSelectionFollowsFocus : MU_XC_NAMESPACE
  • NavigationViewShoulderNavigationEnabled : MU_XC_NAMESPACE
  • NumberBoxSpinButtonPlacementMode : MU_XC_NAMESPACE
  • NumberBoxValidationMode : MU_XC_NAMESPACE

- o -

  • OSVersion : Common

- p -

  • PagerControlButtonVisibility : MU_XC_NAMESPACE
  • PagerControlDisplayMode : MU_XC_NAMESPACE
  • ParallaxSourceOffsetKind : MU_XC_NAMESPACE
  • PipsPagerButtonVisibility : MU_XC_NAMESPACE
  • PipsPagerWrapMode : MU_XC_NAMESPACE
  • PlayerAnimationOptimization : MU_XC_NAMESPACE
  • ProfileGroup : RuntimeProfiler
  • ProfilerClassId : RuntimeProfiler
  • ProfilerMemberId : RuntimeProfiler

- r -

  • RefreshPullDirection : MU_XC_NAMESPACE
  • RefreshVisualizerOrientation : MU_XC_NAMESPACE
  • RefreshVisualizerState : MU_XC_NAMESPACE
  • RegressionTestType : Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests::NavigationViewTests
  • RevealBrushState : MU_XM_NAMESPACE
  • RevealGridItemTemplates : MUXControlsTestApp
  • RevealTestBackgrounds : MUXControlsTestApp

- s -

  • ScrollingAnimationMode : MU_XC_NAMESPACE
  • ScrollingChainMode : MU_XC_NAMESPACE
  • ScrollingContentOrientation : MU_XC_NAMESPACE
  • ScrollingInputKinds : MU_XC_NAMESPACE
  • ScrollingInteractionState : MU_XC_NAMESPACE
  • ScrollingRailMode : MU_XC_NAMESPACE
  • ScrollingScrollBarVisibility : MU_XC_NAMESPACE
  • ScrollingScrollMode : MU_XC_NAMESPACE
  • ScrollingSnapPointsMode : MU_XC_NAMESPACE
  • ScrollingZoomMode : MU_XC_NAMESPACE
  • ScrollOrientation : Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common
  • ScrollPresenterViewChangeResult : MU_PRIVATE_CONTROLS_NAMESPACE
  • ScrollSnapPointsAlignment : MU_XCP_NAMESPACE
  • SwipeBehaviorOnInvoked : MU_XC_NAMESPACE
  • SwipeMode : MU_XC_NAMESPACE

- t -

  • TabViewCloseButtonOverlayMode : MU_XC_NAMESPACE
  • TabViewWidthMode : MU_XC_NAMESPACE
  • TeachingTipCloseReason : MU_XC_NAMESPACE
  • TeachingTipHeroContentPlacementMode : MU_XC_NAMESPACE
  • TeachingTipPlacementMode : MU_XC_NAMESPACE
  • TeachingTipTailVisibility : MU_XC_NAMESPACE
  • TipLocation : MUXControlsTestApp
  • TreeViewSelectionMode : MU_XC_NAMESPACE
  • TwoPaneViewMode : MU_XC_NAMESPACE
  • TwoPaneViewPriority : MU_XC_NAMESPACE
  • TwoPaneViewTallModeConfiguration : MU_XC_NAMESPACE
  • TwoPaneViewWideModeConfiguration : MU_XC_NAMESPACE

- u -

  • UniformGridLayoutItemsJustification : MU_XC_NAMESPACE
  • UniformGridLayoutItemsStretch : MU_XC_NAMESPACE

- v -

  • Visibility : Microsoft::UI::Xaml::Tests::MUXControls::InteractionTests
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- a -

  • Absolute : MU_XC_NAMESPACE
  • Add : Microsoft::UI::Private::Composition::Effects , MU_XC_NAMESPACE
  • All : MU_XC_NAMESPACE
  • AllExceptPens : MU_XC_NAMESPACE
  • Alpha : MU_XC_NAMESPACE , Microsoft::UI::Private::Composition::Effects
  • Always : MU_XC_NAMESPACE
  • Animation : MU_XC_NAMESPACE
  • Anisotropic : Microsoft::UI::Private::Composition::Effects
  • Auto : MU_XC_NAMESPACE
  • AutomationInvoke : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- k -

  • Keyboard : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- l -

  • Latency : MU_XC_NAMESPACE
  • LayoutTransition : MU_XC_NAMESPACE
  • Left : MU_XC_NAMESPACE , MU_XCP_NAMESPACE
  • LeftBottom : MU_XC_NAMESPACE
  • LeftCompact : MU_XC_NAMESPACE
  • LeftMinimal : MU_XC_NAMESPACE
  • LeftRight : MU_XC_NAMESPACE
  • LeftTop : MU_XC_NAMESPACE
  • LeftToRight : MU_XC_NAMESPACE
  • LightDismiss : MU_XC_NAMESPACE
  • Linear : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- m -

  • MaskInvert : Microsoft::UI::Private::Composition::Effects
  • Min : Microsoft::UI::Private::Composition::Effects
  • Minimal : MU_XC_NAMESPACE
  • Mirror : Microsoft::UI::Private::Composition::Effects
  • MoreLabel : MU_XC_NAMESPACE
  • MouseWheel : MU_XC_NAMESPACE
  • Move : MU_XC_NAMESPACE
  • Multiple : MU_XC_NAMESPACE
  • MultiSampleLinear : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- n -

  • Near : MU_XCP_NAMESPACE
  • NearestNeighbor : Microsoft::UI::Private::Composition::Effects
  • Never : MU_XC_NAMESPACE
  • NoLabel : MU_XC_NAMESPACE
  • None : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • Normal : MU_XC_NAMESPACE , MU_XM_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- o -

  • OnPointerOver : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- b -

  • Balanced : Microsoft::UI::Private::Composition::Effects
  • BallpointPen : MU_XC_NAMESPACE
  • Blue : Microsoft::UI::Private::Composition::Effects
  • Both : MU_XC_NAMESPACE
  • Bottom : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • BottomLeft : MU_XC_NAMESPACE
  • BottomRight : MU_XC_NAMESPACE
  • BottomRightValue : MU_XCP_NAMESPACE
  • BottomTop : MU_XC_NAMESPACE
  • BottomToTop : MU_XC_NAMESPACE
  • BoundedCopy : Microsoft::UI::Private::Composition::Effects
  • Box : MU_XC_NAMESPACE
  • ButtonPanel : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- c -

  • Center : MU_XC_NAMESPACE , MU_XCP_NAMESPACE
  • Check : MU_XC_NAMESPACE
  • Clamp : Microsoft::UI::Private::Composition::Effects
  • ClearAll : MU_XC_NAMESPACE
  • Click : MU_XC_NAMESPACE
  • Close : MU_XC_NAMESPACE
  • CloseButton : MU_XC_NAMESPACE
  • CollectionChangeAdd : MU_XC_NAMESPACE
  • CollectionChangeRemove : MU_XC_NAMESPACE
  • CollectionChangeReset : MU_XC_NAMESPACE
  • ComboBox : MU_XC_NAMESPACE
  • Compact : MU_XC_NAMESPACE
  • Completed : MU_PRIVATE_CONTROLS_NAMESPACE
  • Copy : Microsoft::UI::Private::Composition::Effects
  • Cubic : Microsoft::UI::Private::Composition::Effects
  • Custom : MU_XC_NAMESPACE
  • CustomTool : MU_XC_NAMESPACE
  • Cut : MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- d -

  • DecrementButton : MU_XC_NAMESPACE
  • Default : MU_XC_NAMESPACE
  • DestinationAtop : Microsoft::UI::Private::Composition::Effects
  • DestinationIn : Microsoft::UI::Private::Composition::Effects
  • DestinationOut : Microsoft::UI::Private::Composition::Effects
  • DestinationOver : Microsoft::UI::Private::Composition::Effects
  • Disabled : MU_XC_NAMESPACE
  • DoubleTap : MU_XC_NAMESPACE
  • Down : MU_XC_NAMESPACE
  • Drag : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- e -

  • Enabled : MU_XC_NAMESPACE
  • End : MU_XC_NAMESPACE
  • EnterKey : MU_XC_NAMESPACE
  • Equal : MU_XC_NAMESPACE
  • Eraser : MU_XC_NAMESPACE
  • Error : MU_XC_NAMESPACE
  • Execute : MU_XC_NAMESPACE
  • Expanded : MU_XC_NAMESPACE
  • Extended : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- f -

  • Far : MU_XCP_NAMESPACE
  • Fill : MU_XC_NAMESPACE
  • FilterBottomFromBottomLeft : MU_XCP_NAMESPACE
  • FilterBottomFromBottomRight : MU_XCP_NAMESPACE
  • FilterLeftAndRightFromBottom : MU_XCP_NAMESPACE
  • FilterLeftAndRightFromTop : MU_XCP_NAMESPACE
  • FilterLeftFromBottomLeft : MU_XCP_NAMESPACE
  • FilterLeftFromTopLeft : MU_XCP_NAMESPACE
  • FilterRightFromBottomRight : MU_XCP_NAMESPACE
  • FilterRightFromTopRight : MU_XCP_NAMESPACE
  • FilterTopAndBottomFromLeft : MU_XCP_NAMESPACE
  • FilterTopAndBottomFromRight : MU_XCP_NAMESPACE
  • FilterTopFromTopLeft : MU_XCP_NAMESPACE
  • FilterTopFromTopRight : MU_XCP_NAMESPACE
  • ForceCreate : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- g -

  • Gamepad : MU_XC_NAMESPACE
  • Green : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- h -

  • Hard : Microsoft::UI::Private::Composition::Effects
  • Hidden : MU_XC_NAMESPACE
  • HiddenOnEdge : MU_XC_NAMESPACE
  • Highlighter : MU_XC_NAMESPACE
  • HighQualityCubic : Microsoft::UI::Private::Composition::Effects
  • Horizontal : MU_XC_NAMESPACE
  • Hover : MU_PRIVATE_CONTROLS_NAMESPACE
  • Hue : MU_XC_NAMESPACE
  • HueSaturation : MU_XC_NAMESPACE
  • HueValue : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- i -

  • Idle : MU_XC_NAMESPACE
  • Ignore : Microsoft::UI::Private::Composition::Effects , MU_XC_NAMESPACE
  • Ignored : MU_PRIVATE_CONTROLS_NAMESPACE
  • IncrementButton : MU_XC_NAMESPACE
  • Inertia : MU_XC_NAMESPACE
  • Informational : MU_XC_NAMESPACE
  • Inline : MU_XC_NAMESPACE
  • Interacting : MU_XC_NAMESPACE
  • Interaction : MU_XC_NAMESPACE
  • Interrupted : MU_PRIVATE_CONTROLS_NAMESPACE
  • InvalidateLayoutCall : MU_PRIVATE_CONTROLS_NAMESPACE
  • InvalidInputOverwritten : MU_XC_NAMESPACE
  • ItemDesiredWidthChange : MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- p -

  • Pane1 : MU_XC_NAMESPACE
  • Pane2 : MU_XC_NAMESPACE
  • Peeking : MU_XC_NAMESPACE
  • Pen : MU_XC_NAMESPACE
  • Pencil : MU_XC_NAMESPACE
  • Pending : MU_XC_NAMESPACE
  • PensOnly : MU_XC_NAMESPACE
  • PG_Class : RuntimeProfiler
  • PointerOver : MU_XM_NAMESPACE
  • PointerPressed : MU_XC_NAMESPACE
  • PointerReleased : MU_XC_NAMESPACE
  • PrecisionLarge : MU_XC_NAMESPACE
  • PrecisionLargeEraser : MU_XC_NAMESPACE
  • PrecisionSmall : MU_XC_NAMESPACE
  • PrecisionSmallEraser : MU_XC_NAMESPACE
  • Premultiplied : Microsoft::UI::Private::Composition::Effects
  • Press : MU_PRIVATE_CONTROLS_NAMESPACE
  • Pressed : MU_XM_NAMESPACE
  • ProfId_Acrylic : RuntimeProfiler
  • ProfId_AnimatedIcon : RuntimeProfiler
  • ProfId_AnimatedVisualPlayer : RuntimeProfiler
  • ProfId_AnnotatedScrollBar : RuntimeProfiler
  • ProfId_BreadcrumbBar : RuntimeProfiler
  • ProfId_BreadcrumbBarItem : RuntimeProfiler
  • ProfId_ColorPicker : RuntimeProfiler
  • ProfId_CommandBarFlyout : RuntimeProfiler
  • ProfId_DropDownButton : RuntimeProfiler
  • ProfId_Expander : RuntimeProfiler
  • ProfId_ImageIcon : RuntimeProfiler
  • ProfId_InfoBadge : RuntimeProfiler
  • ProfId_InfoBar : RuntimeProfiler
  • ProfId_InkCanvas : RuntimeProfiler
  • ProfId_ItemContainer : RuntimeProfiler
  • ProfId_ItemsRepeater : RuntimeProfiler
  • ProfId_ItemsRepeaterScrollHost : RuntimeProfiler
  • ProfId_ItemsView : RuntimeProfiler
  • ProfId_LinedFlowLayout : RuntimeProfiler
  • ProfId_MapControl : RuntimeProfiler
  • ProfId_MicaController : RuntimeProfiler
  • ProfId_NavigationView : RuntimeProfiler
  • ProfId_NonVirtualizingLayout : RuntimeProfiler
  • ProfId_NumberBox : RuntimeProfiler
  • ProfId_PagerControl : RuntimeProfiler
  • ProfId_ParallaxView : RuntimeProfiler
  • ProfId_PersonPicture : RuntimeProfiler
  • ProfId_PipsPager : RuntimeProfiler
  • ProfId_ProgressBar : RuntimeProfiler
  • ProfId_ProgressRing : RuntimeProfiler
  • ProfId_RadialGradientBrush : RuntimeProfiler
  • ProfId_RadioButtons : RuntimeProfiler
  • ProfId_RadioMenuFlyoutItem : RuntimeProfiler
  • ProfId_RatingControl : RuntimeProfiler
  • ProfId_RefreshContainer : RuntimeProfiler
  • ProfId_RefreshVisualizer : RuntimeProfiler
  • ProfId_Reveal : RuntimeProfiler
  • ProfId_ScrollPresenter : RuntimeProfiler
  • ProfId_ScrollView : RuntimeProfiler
  • ProfId_SelectorBar : RuntimeProfiler
  • ProfId_Size : RuntimeProfiler
  • ProfId_SplitButton : RuntimeProfiler
  • ProfId_StackLayout : RuntimeProfiler
  • ProfId_SwipeControl : RuntimeProfiler
  • ProfId_SwipeItem : RuntimeProfiler
  • ProfId_TabView : RuntimeProfiler
  • ProfId_TabViewItem : RuntimeProfiler
  • ProfId_TeachingTip : RuntimeProfiler
  • ProfId_TextCommandBarFlyout : RuntimeProfiler
  • ProfId_TitleBar : RuntimeProfiler
  • ProfId_TreeView : RuntimeProfiler
  • ProfId_TwoPaneView : RuntimeProfiler
  • ProfId_UniformGridLayout : RuntimeProfiler
  • ProfId_VirtualizingLayout : RuntimeProfiler
  • ProfId_WebView2 : RuntimeProfiler
  • ProfMemberId_Acrylic_TintLuminosityOpacity_Changed : RuntimeProfiler
  • ProfMemberId_Size : RuntimeProfiler
  • ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation : RuntimeProfiler
  • ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation : RuntimeProfiler
  • ProfMemberId_TeachingTip_TipDidNotOpenDueToSize : RuntimeProfiler
  • Programmatic : MU_XC_NAMESPACE
  • Protractor : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- q -

  • Quality : Microsoft::UI::Private::Composition::Effects
  • QueueOne : MU_PRIVATE_CONTROLS_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- r -

  • Radio : MU_XC_NAMESPACE
  • RadioCheck : MU_XC_NAMESPACE
  • Red : Microsoft::UI::Private::Composition::Effects
  • Refreshing : MU_XC_NAMESPACE
  • Relative : MU_XC_NAMESPACE
  • Release : MU_PRIVATE_CONTROLS_NAMESPACE
  • RemainOpen : MU_XC_NAMESPACE
  • Remove : MU_XC_NAMESPACE
  • Resources : MU_XC_NAMESPACE
  • Reveal : MU_XC_NAMESPACE
  • Right : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • RightBottom : MU_XC_NAMESPACE
  • RightLeft : MU_XC_NAMESPACE
  • RightToLeft : MU_XC_NAMESPACE
  • RightTop : MU_XC_NAMESPACE
  • Ring : MU_XC_NAMESPACE
  • Rotate270DegreesCounterclockwise : MU_XC_NAMESPACE
  • Rotate90DegreesCounterclockwise : MU_XC_NAMESPACE
  • Ruler : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- s -

  • Saturation : MU_XC_NAMESPACE
  • SaturationHue : MU_XC_NAMESPACE
  • SaturationValue : MU_XC_NAMESPACE
  • Simple : MU_XC_NAMESPACE
  • Single : MU_XC_NAMESPACE
  • SinglePane : MU_XC_NAMESPACE
  • SizeToContent : MU_XC_NAMESPACE
  • SnappedAverageItemsPerLineChange : MU_PRIVATE_CONTROLS_NAMESPACE
  • Soft : Microsoft::UI::Private::Composition::Effects
  • SourceAtop : Microsoft::UI::Private::Composition::Effects
  • SourceIn : Microsoft::UI::Private::Composition::Effects
  • SourceOut : Microsoft::UI::Private::Composition::Effects
  • SourceOver : Microsoft::UI::Private::Composition::Effects
  • SpaceAround : MU_XC_NAMESPACE
  • SpaceBetween : MU_XC_NAMESPACE
  • SpaceEvenly : MU_XC_NAMESPACE
  • SpaceKey : MU_XC_NAMESPACE
  • Speed : Microsoft::UI::Private::Composition::Effects
  • SpeedUpQueueOne : MU_PRIVATE_CONTROLS_NAMESPACE
  • Start : MU_XC_NAMESPACE
  • Stencil : MU_XC_NAMESPACE
  • Straight : Microsoft::UI::Private::Composition::Effects
  • Stroke : MU_XC_NAMESPACE
  • StrokeEraser : MU_XC_NAMESPACE
  • Success : MU_XC_NAMESPACE
  • SuppressAutoRecycle : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- t -

  • Tall : MU_XC_NAMESPACE
  • Tap : MU_XC_NAMESPACE
  • Top : MU_XC_NAMESPACE , MU_XCP_NAMESPACE
  • TopBottom : MU_XC_NAMESPACE
  • TopLeft : MU_XC_NAMESPACE
  • TopLeftValue : MU_XCP_NAMESPACE
  • TopRight : MU_XC_NAMESPACE
  • TopToBottom : MU_XC_NAMESPACE
  • Touch : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- u -

  • Uniform : MU_XC_NAMESPACE
  • Up : MU_XC_NAMESPACE
  • UserCanInvoke : MU_XC_NAMESPACE
  • UserCannotInvoke : MU_XC_NAMESPACE
  • UserCannotSelect : MU_XC_NAMESPACE
  • UserCanSelect : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- v -

  • Value : MU_XC_NAMESPACE
  • ValueHue : MU_XC_NAMESPACE
  • ValueSaturation : MU_XC_NAMESPACE
  • Vertical : MU_XC_NAMESPACE
  • Visible : MU_XC_NAMESPACE
  • VisibleOnPointerOver : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- w -

  • Warning : MU_XC_NAMESPACE
  • WhenSelectionFollowsFocus : MU_XC_NAMESPACE
  • Wide : MU_XC_NAMESPACE
  • Wrap : Microsoft::UI::Private::Composition::Effects , MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x

- x -

  • Xor : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • k
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • z

- a -

  • ActivateInstance() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • ActivateInstanceWithFactory() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • Adapt() : MU_PRIVATE_CONTROLS_NAMESPACE
  • add_Resuming() : ABI::Windows::ApplicationModel::Core
  • add_Suspending() : ABI::Windows::ApplicationModel::Core
  • AddScrollVelocity() : MU_XC_NAMESPACE
  • AddZoomVelocity() : MU_XC_NAMESPACE
  • AnimationModeToString() : TypeLogging
  • are_all_set() : flags_enum

- b -

  • BindToAccessKeyIfUnset() : CommandingHelpers
  • BindToDescriptionPropertiesIfUnset() : CommandingHelpers
  • BindToIconPropertyIfUnset() : CommandingHelpers
  • BindToIconSourcePropertyIfUnset() : CommandingHelpers
  • BindToKeyboardAcceleratorsIfUnset() : CommandingHelpers
  • BindToLabelPropertyIfUnset() : CommandingHelpers
  • BorderLight_ShouldBeOn() : MU_PRIVATE_MEDIA_NAMESPACE

- c -

  • ChainingModeToString() : TypeLogging
  • ClearBindingIfSet() : CommandingHelpers
  • ClearTypeProperties() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • ConfigurationChangedEventHandler() : MU_PRIVATE_CONTROLS_NAMESPACE
  • ContainerFromIndex() : MU_XC_NAMESPACE
  • ContainerFromItem() : MU_XC_NAMESPACE
  • contains() : CollectionHelper
  • CreateInkDrawingAttributes() : MU_XC_NAMESPACE
  • CreateInkDrawingAttributesCore() : MU_XC_NAMESPACE

- d -

  • DECLARE_AUTOHANDLE_CLASS() : MUXControls::Common
  • DEFINE_PROFILEGROUP() : RuntimeProfiler
  • DoInkPresenterWork() : MU_XC_NAMESPACE

- f -

  • FireEvent() : RuntimeProfiler
  • Float2ToString() : TypeLogging
  • FocusStateToString() : TypeLogging
  • ForceCreateAcrylicBrush() : MU_PRIVATE_MEDIA_NAMESPACE
  • FormatString() : StringUtil

- g -

  • get_Properties() : ABI::Windows::ApplicationModel::Core
  • GetActualWidthFor() : LayoutUtils
  • GetAlpha() : hsv
  • GetAsRevealBorderLight() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetAsRevealHoverLight() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetAt() : MU_XC_NAMESPACE
  • GetCurrentView() : ABI::Windows::ApplicationModel::Core
  • GetElementIndex() : MU_XC_NAMESPACE
  • GetFactory() : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • GetHoverLightOffsetExpression() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetHue() : hsv
  • GetMenuButton() : MU_XC_NAMESPACE
  • GetNonVirtualizingLayoutContext() : anonymous_namespace{Layout.cpp}
  • GetOrCreateElement() : MU_XC_NAMESPACE
  • GetSaturation() : hsv
  • GetSpotLight() : MU_PRIVATE_MEDIA_NAMESPACE
  • GetToggleButton() : MU_XC_NAMESPACE
  • GetToolButton() : MU_XC_NAMESPACE
  • GetValue() : hsv
  • GetVirtualizingLayoutContext() : anonymous_namespace{Layout.cpp}

- h -

  • HoverLight_IsPointerOver() : MU_PRIVATE_MEDIA_NAMESPACE
  • HoverLight_IsPressed() : MU_PRIVATE_MEDIA_NAMESPACE
  • HoverLight_ShouldBeOn() : MU_PRIVATE_MEDIA_NAMESPACE
  • hstring_name_of() : winrt

- i -

  • IndexFromKey() : MU_XC_NAMESPACE
  • IndexOf() : MU_XC_NAMESPACE
  • InitializeRuntimeProfiler() : RuntimeProfiler
  • InputKindToString() : TypeLogging
  • InteractionTrackerAsyncOperationTriggerToString() : TypeLogging
  • InteractionTrackerAsyncOperationTypeToString() : TypeLogging
  • is_set() : flags_enum
  • IsInFrameworkPackageImpl() : anonymous_namespace{SharedHelpers.cpp}
  • ItemContainerInteractionTriggerToString() : TypeLogging
  • ItemContainerMultiSelectModeToString() : TypeLogging

- k -

  • KeyFromIndex() : MU_XC_NAMESPACE
  • KeyRoutedEventArgsToString() : TypeLogging

- m -

  • MeasureAndGetDesiredHeightFor() : LayoutUtils
  • MeasureAndGetDesiredWidthFor() : LayoutUtils

- n -

  • NullableFloat2ToString() : TypeLogging
  • NullableFloatToString() : TypeLogging

- o -

  • OrientationToString() : TypeLogging

- p -

  • PackIntoWin32StyleMouseArgs_wparam() : WebView2Utility
  • PackIntoWin32StylePointerArgs_lparam() : WebView2Utility
  • Pause() : MU_XC_NAMESPACE
  • PlayAsync() : MU_XC_NAMESPACE
  • PointerDeviceTypeToString() : TypeLogging
  • PointerPointToString() : TypeLogging
  • PointerUpdateKindToString() : TypeLogging
  • PostArrangeEventHandler() : MU_PRIVATE_CONTROLS_NAMESPACE
  • PROVIDE_DEPENDENCY() : Private

- q -

  • QueueInkPresenterWorkItem() : MU_XC_NAMESPACE

- r -

  • RailingModeToString() : TypeLogging
  • RectToString() : TypeLogging
  • RefreshAutomaticHorizontalOffsets() : MU_XC_NAMESPACE
  • RefreshAutomaticVerticalOffsets() : MU_XC_NAMESPACE
  • RegisterAnchorCandidate() : MU_XC_NAMESPACE
  • RegisterMethod() : RuntimeProfiler
  • remove() : CollectionHelper
  • remove_Resuming() : ABI::Windows::ApplicationModel::Core
  • remove_Suspending() : ABI::Windows::ApplicationModel::Core
  • RequestRefresh() : MU_XC_NAMESPACE
  • Resume() : MU_XC_NAMESPACE
  • Run() : ABI::Windows::ApplicationModel::Core
  • RunWithActivationFactories() : ABI::Windows::ApplicationModel::Core

- s -

  • ScrollAmountToString() : TypeLogging
  • ScrollBarVisibilityToString() : TypeLogging
  • ScrollBy() : MU_XC_NAMESPACE
  • ScrollEventTypeToString() : TypeLogging
  • ScrollingIndicatorModeToString() : TypeLogging
  • ScrollModeToString() : TypeLogging
  • ScrollOptionsToString() : TypeLogging
  • ScrollPresenterViewChangeResultToString() : TypeLogging
  • ScrollPresenterViewKindToString() : TypeLogging
  • ScrollTo() : MU_XC_NAMESPACE
  • set() : flags_enum
  • SetAlpha() : hsv
  • SetHue() : hsv
  • SetProgress() : MU_XC_NAMESPACE
  • SetSaturation() : hsv
  • SetValue() : hsv
  • SizeToString() : TypeLogging
  • SnapPointsModeToString() : TypeLogging
  • Stop() : MU_XC_NAMESPACE

- t -

  • TPTimerCallback() : RuntimeProfiler
  • TryGetCurrentPackageGraph() : anonymous_namespace{SharedHelpers.cpp}
  • TryGetElement() : MU_XC_NAMESPACE

- u -

  • underlying_type() : flags_enum
  • UninitializeRuntimeProfiler() : RuntimeProfiler
  • unique_push_back() : CollectionHelper
  • UnregisterAnchorCandidate() : MU_XC_NAMESPACE
  • unset() : flags_enum
  • Utf16ToUtf8() : StringUtil
  • Utf8ToUtf16() : StringUtil

- v -

  • ViewportChangedEventHandler() : MU_PRIVATE_CONTROLS_NAMESPACE
  • VisibilityFromBool() : Util

- z -

  • ZoomBy() : MU_XC_NAMESPACE
  • ZoomModeToString() : TypeLogging
  • ZoomOptionsToString() : TypeLogging
  • ZoomTo() : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • CanvasAlphaMode : Microsoft::UI::Private::Composition::Effects
  • CanvasBlend : Microsoft::UI::Private::Composition::Effects
  • CanvasComposite : Microsoft::UI::Private::Composition::Effects
  • CanvasEdgeBehavior : Microsoft::UI::Private::Composition::Effects
  • CanvasImageInterpolation : Microsoft::UI::Private::Composition::Effects
  • EffectBorderMode : Microsoft::UI::Private::Composition::Effects
  • EffectChannelSelect : Microsoft::UI::Private::Composition::Effects
  • EffectOptimization : Microsoft::UI::Private::Composition::Effects
  • Matrix5x4 : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- _ -

  • __pad0__ : ABI::Windows::ApplicationModel::Core
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- k -

  • Kind : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- l -

  • LargeChange : MU_XC_NAMESPACE
  • LastButtonCommand : MU_XC_NAMESPACE
  • LastButtonStyle : MU_XC_NAMESPACE
  • LastButtonVisibility : MU_XC_NAMESPACE
  • Layout : MU_XC_NAMESPACE
  • LayoutContext : MU_XC_NAMESPACE
  • LayoutPanel : MU_XC_NAMESPACE
  • LinearTransferEffect : Microsoft::UI::Private::Composition::Effects
  • LinedFlowLayout : MU_XC_NAMESPACE
  • LinedFlowLayoutItemCollectionTransitionProvider : MU_XC_NAMESPACE
  • LinedFlowLayoutItemsInfoRequestedEventArgs : MU_XC_NAMESPACE
  • LuminanceToAlphaEffect : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- m -

  • MapControl : MU_XC_NAMESPACE
  • MapElement : MU_XC_NAMESPACE
  • MapElementClick : MU_XC_NAMESPACE
  • MapLayer : MU_XC_NAMESPACE
  • MapServiceErrorOccurred : MU_XC_NAMESPACE
  • MaterialHelperTestApi : MU_PRIVATE_MEDIA_NAMESPACE
  • MaxColumns : MU_XC_NAMESPACE
  • Maximum : MU_XC_NAMESPACE
  • MaxStrokeWidth : MU_XC_NAMESPACE
  • MaxVisiblePips : MU_XC_NAMESPACE
  • MenuBar : MU_XC_NAMESPACE
  • MenuBarAutomationPeer : MU_XAP_NAMESPACE
  • MenuBarItem : MU_XC_NAMESPACE
  • MenuBarItemAutomationPeer : MU_XAP_NAMESPACE
  • MenuBarItemFlyout : MU_XC_NAMESPACE
  • MicaBackdrop : MU_XM_NAMESPACE
  • Minimum : MU_XC_NAMESPACE
  • MinStrokeWidth : MU_XC_NAMESPACE
  • ModeChanged : MU_XC_NAMESPACE
  • MonochromaticOverlayPresenter : MU_XCP_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- n -

  • NavigationViewItemAutomationPeer : MU_XAP_NAMESPACE
  • NavigationViewItemPresenter : MU_XCP_NAMESPACE
  • NextButtonCommand : MU_XC_NAMESPACE
  • NextButtonStyle : MU_XC_NAMESPACE
  • NextButtonVisibility : MU_XC_NAMESPACE
  • NormalPipStyle : MU_XC_NAMESPACE
  • NumberBox : MU_XC_NAMESPACE
  • NumberBoxAutomationPeer : MU_XAP_NAMESPACE
  • NumberFormatter : MU_XC_NAMESPACE
  • NumberOfPages : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- o -

  • OpacityEffect : Microsoft::UI::Private::Composition::Effects
  • Orientation : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- z -

  • ZoomAnimationStarting : MU_XC_NAMESPACE
  • ZoomCompleted : MU_XC_NAMESPACE
  • ZoomStarting : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- a -

  • AcceptsExpression : MU_XC_NAMESPACE
  • AcrylicBrush : MU_XM_NAMESPACE
  • AcrylicTestApi : MU_PRIVATE_MEDIA_NAMESPACE
  • ActionButtonClick : MU_XC_NAMESPACE
  • ActionButtonCommand : MU_XC_NAMESPACE
  • ActionButtonCommandParameter : MU_XC_NAMESPACE
  • ActionButtonContent : MU_XC_NAMESPACE
  • ActionButtonStyle : MU_XC_NAMESPACE
  • ActiveTool : MU_XC_NAMESPACE
  • ActiveToolChanged : MU_XC_NAMESPACE
  • AddTabButtonClick : MU_XC_NAMESPACE
  • AlphaMaskEffect : Microsoft::UI::Private::Composition::Effects
  • AnchorRequested : MU_XC_NAMESPACE
  • AnimatedAcceptVisualSource : MU_XCAV_NAMESPACE
  • AnimatedBackVisualSource : MU_XCAV_NAMESPACE
  • AnimatedChevronDownSmallVisualSource : MU_XCAV_NAMESPACE
  • AnimatedChevronRightDownSmallVisualSource : MU_XCAV_NAMESPACE
  • AnimatedChevronUpDownSmallVisualSource : MU_XCAV_NAMESPACE
  • AnimatedFindVisualSource : MU_XCAV_NAMESPACE
  • AnimatedGlobalNavigationButtonVisualSource : MU_XCAV_NAMESPACE
  • AnimatedIcon : MU_XC_NAMESPACE
  • AnimatedIconSource : MU_XC_NAMESPACE
  • AnimatedSettingsVisualSource : MU_XCAV_NAMESPACE
  • AnimatedVisualPlayer : MU_XC_NAMESPACE
  • AnimatedVisualPlayerAutomationPeer : MU_XAP_NAMESPACE
  • animationHandler : MU_PRIVATE_CONTROLS_NAMESPACE
  • ArePrecisionErasersVisible : MU_XC_NAMESPACE
  • ArithmeticCompositeEffect : Microsoft::UI::Private::Composition::Effects
  • AutoPlay : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- b -

  • BackRequested : MU_XC_NAMESPACE
  • BlendEffect : Microsoft::UI::Private::Composition::Effects
  • BorderEffect : Microsoft::UI::Private::Composition::Effects
  • BreadcrumbBarItemAutomationPeer : MU_XAP_NAMESPACE
  • BringingIntoView : MU_XC_NAMESPACE
  • ButtonFlyoutPlacement : MU_XC_NAMESPACE
  • ButtonPanelAlwaysShowFirstLastPageIndex : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- c -

  • c_knownNamespacePrefixes : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • c_reunionPackageNamePrefix : anonymous_namespace{SharedHelpers.cpp}
  • c_reunionPackageNamePrefixLength : anonymous_namespace{SharedHelpers.cpp}
  • c_typeEntries : anonymous_namespace{XamlMetadataProviderGenerated.h}
  • Checked : MU_XC_NAMESPACE
  • CloseButtonClick : MU_XC_NAMESPACE
  • CloseButtonCommand : MU_XC_NAMESPACE
  • CloseButtonCommandParameter : MU_XC_NAMESPACE
  • CloseButtonContent : MU_XC_NAMESPACE
  • CloseButtonStyle : MU_XC_NAMESPACE
  • Closed : MU_XC_NAMESPACE
  • CloseRequested : MU_XC_NAMESPACE
  • Closing : MU_XC_NAMESPACE
  • Collapsed : MU_XC_NAMESPACE
  • ColorChanged : MU_XCP_NAMESPACE , MU_XC_NAMESPACE
  • ColorMatrixEffect : Microsoft::UI::Private::Composition::Effects
  • ColorPicker : MU_XC_NAMESPACE
  • ColorPickerSlider : MU_XCP_NAMESPACE
  • ColorPickerSliderAutomationPeer : MU_XAP_NAMESPACE
  • ColorSourceEffect : Microsoft::UI::Private::Composition::Effects
  • ColorSpectrum : MU_XCP_NAMESPACE
  • ColorSpectrumAutomationPeer : MU_XAP_NAMESPACE
  • ColumnMajorUniformToLargestGridLayout : MU_XCP_NAMESPACE
  • CommandBarFlyout : MU_XC_NAMESPACE
  • CommandBarFlyoutCommandBar : MU_XCP_NAMESPACE
  • CommandBarFlyoutCommandBarTemplateSettings : MU_XCP_NAMESPACE
  • CompositeStepEffect : Microsoft::UI::Private::Composition::Effects
  • ConfigurationContent : MU_XC_NAMESPACE
  • ContrastEffect : Microsoft::UI::Private::Composition::Effects
  • CornerRadiusFilterConverter : MU_XCP_NAMESPACE
  • CornerRadiusToThicknessConverter : MU_XCP_NAMESPACE
  • CrossFadeEffect : Microsoft::UI::Private::Composition::Effects
  • CustomPen : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- d -

  • Description : MU_XC_NAMESPACE
  • DesktopAcrylicBackdrop : MU_XM_NAMESPACE
  • DisplayMode : MU_XC_NAMESPACE
  • DistantDiffuseEffect : Microsoft::UI::Private::Composition::Effects
  • DistantSpecularEffect : Microsoft::UI::Private::Composition::Effects
  • DropDownButton : MU_XC_NAMESPACE
  • DropDownButtonAutomationPeer : MU_XAP_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- e -

  • ElementClearing : MU_XC_NAMESPACE
  • ElementFactory : MU_XC_NAMESPACE
  • ElementIndexChanged : MU_XC_NAMESPACE
  • ElementPrepared : MU_XC_NAMESPACE
  • EraseAllClicked : MU_XC_NAMESPACE
  • EraserFlyoutItemClicked : MU_XC_NAMESPACE
  • EventFrequency : RuntimeProfiler
  • Expander : MU_XC_NAMESPACE
  • ExpanderAutomationPeer : MU_XAP_NAMESPACE
  • ExpanderTemplateSettings : MU_XC_NAMESPACE
  • Expanding : MU_XC_NAMESPACE
  • ExposureEffect : Microsoft::UI::Private::Composition::Effects
  • ExtentChanged : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- f -

  • FallbackContent : MU_XC_NAMESPACE
  • FirstButtonCommand : MU_XC_NAMESPACE
  • FirstButtonStyle : MU_XC_NAMESPACE
  • FirstButtonVisibility : MU_XC_NAMESPACE
  • FlowLayout : MU_XC_NAMESPACE
  • FlowLayoutState : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- g -

  • GammaTransferEffect : Microsoft::UI::Private::Composition::Effects
  • GaussianBlurEffect : Microsoft::UI::Private::Composition::Effects
  • gProfileGroups : RuntimeProfiler
  • GrayscaleEffect : Microsoft::UI::Private::Composition::Effects
  • GroupName : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- h -

  • Header : MU_XC_NAMESPACE
  • HeaderTemplate : MU_XC_NAMESPACE
  • HeroContent : MU_XC_NAMESPACE
  • HeroContentPlacement : MU_XC_NAMESPACE
  • HorizontalOrientationPadding : MU_XCP_NAMESPACE
  • HueRotationEffect : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- i -

  • IconElement : MU_XC_NAMESPACE
  • IconSource : MU_XC_NAMESPACE
  • IExpandCollapseProvider : MU_XAP_NAMESPACE
  • ImageIcon : MU_XC_NAMESPACE
  • ImageIconSource : MU_XC_NAMESPACE
  • IndexPath : MU_XC_NAMESPACE
  • InfoBadge : MU_XC_NAMESPACE
  • InfoBadgeCornerRadius : MU_XC_NAMESPACE
  • InfoBadgeTemplateSettings : MU_XC_NAMESPACE
  • InfoBarAutomationPeer : MU_XAP_NAMESPACE
  • InfoBarPanel : MU_XCP_NAMESPACE
  • InitialControls : MU_XC_NAMESPACE
  • InkCanvas : MU_XC_NAMESPACE
  • InkCanvasAutomationPeer : MU_XAP_NAMESPACE
  • InkDrawingAttributesChanged : MU_XC_NAMESPACE
  • InkToolBar : MU_XC_NAMESPACE
  • InkToolBarAutomationPeer : MU_XAP_NAMESPACE
  • InkToolBarBallpointPenButton : MU_XC_NAMESPACE
  • InkToolBarCustomPen : MU_XC_NAMESPACE
  • InkToolBarCustomPenButton : MU_XC_NAMESPACE
  • InkToolBarCustomToggleButton : MU_XC_NAMESPACE
  • InkToolBarCustomToolButton : MU_XC_NAMESPACE
  • InkToolBarEraserButton : MU_XC_NAMESPACE
  • InkToolBarFlyoutItem : MU_XC_NAMESPACE
  • InkToolBarFlyoutItemAutomationPeer : MU_XAP_NAMESPACE
  • InkToolBarHighlighterButton : MU_XC_NAMESPACE
  • InkToolBarMenuButton : MU_XC_NAMESPACE
  • InkToolBarMenuButtonAutomationPeer : MU_XAP_NAMESPACE
  • InkToolBarPenButton : MU_XC_NAMESPACE
  • InkToolBarPencilButton : MU_XC_NAMESPACE
  • InkToolBarPenConfigurationControl : MU_XC_NAMESPACE
  • InkToolBarStencilButton : MU_XC_NAMESPACE
  • InkToolBarToggleButton : MU_XC_NAMESPACE
  • InkToolBarToolButton : MU_XC_NAMESPACE
  • InkToolBarToolButtonAutomationPeer : MU_XAP_NAMESPACE
  • InvertEffect : Microsoft::UI::Private::Composition::Effects
  • IsChecked : MU_XC_NAMESPACE
  • IsClearAllVisible : MU_XC_NAMESPACE
  • ISelectionItemProvider : MU_XAP_NAMESPACE
  • IsExtensionGlyphShown : MU_XC_NAMESPACE
  • IsLightDismissEnabled : MU_XC_NAMESPACE
  • IsOpen : MU_XC_NAMESPACE
  • IsProtractorItemVisible : MU_XC_NAMESPACE
  • IsRulerButtonChecked : MU_XC_NAMESPACE
  • IsRulerItemVisible : MU_XC_NAMESPACE
  • IsStencilButtonChecked : MU_XC_NAMESPACE
  • IsStencilButtonCheckedChanged : MU_XC_NAMESPACE
  • IsStrokeEraserVisible : MU_XC_NAMESPACE
  • IsWrapEnabled : MU_XC_NAMESPACE
  • ItemCollectionTransition : MU_XC_NAMESPACE
  • ItemCollectionTransitionProgress : MU_XC_NAMESPACE
  • ItemCollectionTransitionProvider : MU_XC_NAMESPACE
  • ItemContainerAutomationPeer : MU_XAP_NAMESPACE
  • ItemsRepeater : MU_XC_NAMESPACE
  • ItemsRepeaterElementClearingEventArgs : MU_XC_NAMESPACE
  • ItemsRepeaterElementIndexChangedEventArgs : MU_XC_NAMESPACE
  • ItemsRepeaterElementPreparedEventArgs : MU_XC_NAMESPACE
  • ItemsRepeaterScrollHost : MU_XC_NAMESPACE
  • ItemsSource : MU_XC_NAMESPACE
  • ItemsSourceView : MU_XC_NAMESPACE
  • ItemsViewAutomationPeer : MU_XAP_NAMESPACE
  • ItemTemplate : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- p -

  • PagerControl : MU_XC_NAMESPACE
  • PagerControlAutomationPeer : MU_XAP_NAMESPACE
  • PagerControlTemplateSettings : MU_XC_NAMESPACE
  • PagerInputCommand : MU_XC_NAMESPACE
  • PaneToggleRequested : MU_XC_NAMESPACE
  • ParallaxView : MU_XC_NAMESPACE
  • PersonPicture : MU_XC_NAMESPACE
  • PersonPictureAutomationPeer : MU_XAP_NAMESPACE
  • PersonPictureTemplateSettings : MU_XC_NAMESPACE
  • PipsPager : MU_XC_NAMESPACE
  • PipsPagerAutomationPeer : MU_XAP_NAMESPACE
  • PipsPagerTemplateSettings : MU_XC_NAMESPACE
  • PlacementMargin : MU_XC_NAMESPACE
  • PlaybackRate : MU_XC_NAMESPACE
  • PointDiffuseEffect : Microsoft::UI::Private::Composition::Effects
  • PointSpecularEffect : Microsoft::UI::Private::Composition::Effects
  • PosterizeEffect : Microsoft::UI::Private::Composition::Effects
  • PreferredPlacement : MU_XC_NAMESPACE
  • PrefixText : MU_XC_NAMESPACE
  • PremultiplyEffect : Microsoft::UI::Private::Composition::Effects
  • PreventKeyboardDisplayOnProgrammaticFocus : MU_XC_NAMESPACE
  • PreviousButtonCommand : MU_XC_NAMESPACE
  • PreviousButtonStyle : MU_XC_NAMESPACE
  • PreviousButtonVisibility : MU_XC_NAMESPACE
  • ProgressBar : MU_XC_NAMESPACE
  • ProgressBarAutomationPeer : MU_XAP_NAMESPACE
  • ProgressBarTemplateSettings : MU_XC_NAMESPACE
  • ProgressRing : MU_XC_NAMESPACE
  • ProgressRingAutomationPeer : MU_XAP_NAMESPACE
  • ProgressRingTemplateSettings : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- r -

  • RadialGradientBrush : MU_XM_NAMESPACE
  • RadioButtons : MU_XC_NAMESPACE
  • RadioButtonsAutomationPeer : MU_XAP_NAMESPACE
  • RadioMenuFlyoutItem : MU_XC_NAMESPACE
  • RatingControl : MU_XC_NAMESPACE
  • RatingControlAutomationPeer : MU_XAP_NAMESPACE
  • RatingItemFontInfo : MU_XC_NAMESPACE
  • RatingItemImageInfo : MU_XC_NAMESPACE
  • RatingItemInfo : MU_XC_NAMESPACE
  • RecyclePool : MU_XC_NAMESPACE
  • RecyclingElementFactory : MU_XC_NAMESPACE
  • RefreshContainer : MU_XC_NAMESPACE
  • RefreshRequested : MU_XC_NAMESPACE
  • RepeaterAutomationPeer : MU_XAP_NAMESPACE
  • RevealBackgroundBrush : MU_XM_NAMESPACE
  • RevealBorderBrush : MU_XM_NAMESPACE
  • RevealBorderLight : MU_PRIVATE_MEDIA_NAMESPACE
  • RevealBrush : MU_XM_NAMESPACE
  • RevealBrushTestApi : MU_PRIVATE_MEDIA_NAMESPACE
  • RevealHoverLight : MU_PRIVATE_MEDIA_NAMESPACE
  • RevealListViewItemPresenter : MU_XC_NAMESPACE
  • RevealTestApi : MU_PRIVATE_MEDIA_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- s -

  • SaturationEffect : Microsoft::UI::Private::Composition::Effects
  • ScrollAnimationStarting : MU_XC_NAMESPACE
  • ScrollCompleted : MU_XC_NAMESPACE
  • ScrollPresenterAutomationPeer : MU_XAP_NAMESPACE
  • ScrollStarting : MU_XC_NAMESPACE
  • ScrollView : MU_XC_NAMESPACE
  • ScrollViewerIRefreshInfoProviderAdapter : MU_PRIVATE_CONTROLS_NAMESPACE
  • SelectedBrushIndex : MU_XC_NAMESPACE
  • SelectedIndex : MU_XC_NAMESPACE
  • SelectedIndexChanged : MU_XC_NAMESPACE
  • SelectedItem : MU_XC_NAMESPACE
  • SelectedPageIndex : MU_XC_NAMESPACE
  • SelectedPipStyle : MU_XC_NAMESPACE
  • SelectedStencil : MU_XC_NAMESPACE
  • SelectedStrokeWidth : MU_XC_NAMESPACE
  • SelectionChanged : MU_XC_NAMESPACE
  • SelectionFlyout : MU_XC_NAMESPACE
  • SelectionHighlightColor : MU_XC_NAMESPACE
  • SelectionModel : MU_XC_NAMESPACE
  • SelectionModelChildrenRequestedEventArgs : MU_XC_NAMESPACE
  • SelectionModelSelectionChangedEventArgs : MU_XC_NAMESPACE
  • SelectorBarItemAutomationPeer : MU_XAP_NAMESPACE
  • SelectTemplateEventArgs : MU_XC_NAMESPACE
  • SepiaEffect : Microsoft::UI::Private::Composition::Effects
  • ShouldConstrainToRootBounds : MU_XC_NAMESPACE
  • SliderInteraction : MU_PRIVATE_CONTROLS_NAMESPACE
  • SmallChange : MU_XC_NAMESPACE
  • Source : MU_XC_NAMESPACE
  • SpectrumBrush : MU_PRIVATE_CONTROLS_NAMESPACE
  • SplitButtonAutomationPeer : MU_XAP_NAMESPACE
  • SpotDiffuseEffect : Microsoft::UI::Private::Composition::Effects
  • SpotSpecularEffect : Microsoft::UI::Private::Composition::Effects
  • StackLayout : MU_XC_NAMESPACE
  • StackLayoutState : MU_XC_NAMESPACE
  • StateChanged : MU_XC_NAMESPACE
  • Stretch : MU_XC_NAMESPACE
  • Subtitle : MU_XC_NAMESPACE
  • SuffixText : MU_XC_NAMESPACE
  • SwipeControl : MU_XC_NAMESPACE
  • SwipeItem : MU_XC_NAMESPACE
  • SwipeItemInvokedEventArgs : MU_XC_NAMESPACE
  • SwipeItems : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- t -

  • TabCloseRequested : MU_XC_NAMESPACE
  • TabDragCompleted : MU_XC_NAMESPACE
  • TabDragStarting : MU_XC_NAMESPACE
  • TabDroppedOutside : MU_XC_NAMESPACE
  • TabItemsChanged : MU_XC_NAMESPACE
  • TabItemsSource : MU_XC_NAMESPACE
  • TabItemTemplate : MU_XC_NAMESPACE
  • TabStripDragOver : MU_XC_NAMESPACE
  • TabStripDrop : MU_XC_NAMESPACE
  • TabView : MU_XC_NAMESPACE
  • TabViewAutomationPeer : MU_XAP_NAMESPACE
  • TabViewItem : MU_XC_NAMESPACE
  • TabViewItemAutomationPeer : MU_XAP_NAMESPACE
  • TabViewItemTemplateSettings : MU_XC_NAMESPACE
  • TabViewListView : MU_XCP_NAMESPACE
  • TailVisibility : MU_XC_NAMESPACE
  • Target : MU_XC_NAMESPACE
  • TargetInkCanvas : MU_XC_NAMESPACE
  • TargetInkPresenter : MU_XC_NAMESPACE
  • TeachingTip : MU_XC_NAMESPACE
  • TeachingTipAutomationPeer : MU_XAP_NAMESPACE
  • TeachingTipTemplateSettings : MU_XC_NAMESPACE
  • TemperatureAndTintEffect : Microsoft::UI::Private::Composition::Effects
  • Text : MU_XC_NAMESPACE
  • TextCommandBarFlyout : MU_XC_NAMESPACE
  • TintEffect : Microsoft::UI::Private::Composition::Effects
  • Title : MU_XC_NAMESPACE
  • TitleBar : MU_XC_NAMESPACE
  • TitleBarAutomationPeer : MU_XC_NAMESPACE
  • TitleBarTemplateSettings : MU_XC_NAMESPACE
  • TopLeftHighlightMargin : MU_XC_NAMESPACE
  • TopRightHighlightMargin : MU_XC_NAMESPACE
  • Transform2DEffect : Microsoft::UI::Private::Composition::Effects
  • TreeViewItemAutomationPeer : MU_XAP_NAMESPACE
  • TreeViewListAutomationPeer : MU_XAP_NAMESPACE
  • TwoPaneView : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- u -

  • Unchecked : MU_XC_NAMESPACE
  • UniformGridLayout : MU_XC_NAMESPACE
  • UniformGridLayoutState : MU_XC_NAMESPACE
  • UnPremultiplyEffect : Microsoft::UI::Private::Composition::Effects
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- v -

  • ValidationMode : MU_XC_NAMESPACE
  • ValueChanged : MU_XC_NAMESPACE
  • VerticalOrientationPadding : MU_XCP_NAMESPACE
  • ViewChanged : MU_XC_NAMESPACE
  • VirtualizingLayout : MU_XC_NAMESPACE
  • VirtualizingLayoutContext : MU_XC_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- w -

  • WebView2AutomationPeer : MU_XAP_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Class Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z

- x -

  • XamlAmbientLight : MU_PRIVATE_MEDIA_NAMESPACE
Generated on Sun Dec 1 2024 20:54:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBox.h Source File

  • File List
  • File Members
  • NumberBox

NumberBox.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include "NumberBox.g.h"
00009 #include "NumberBoxValueChangedEventArgs.g.h"
00010 #include "NumberBox.properties.h"
00011 #include "Windows.Globalization.NumberFormatting.h"
00012
00013 class NumberBoxValueChangedEventArgs :
00014     public winrt::implementation::NumberBoxValueChangedEventArgsT<NumberBoxValueChangedEventArgs>
00015 {
00016 public:
00017     NumberBoxValueChangedEventArgs(double oldValue, double newValue) : m_oldValue(oldValue), m_newValue(newValue) {}
00018
00019     double OldValue() { return m_oldValue; }
00020     double NewValue() { return m_newValue; }
00021
00022 private:
00023     double m_oldValue;
00024     double m_newValue;
00025 };
00026
00027 class NumberBox :
00028     public ReferenceTracker<NumberBox, winrt::implementation::NumberBoxT>,
00029     public NumberBoxProperties
00030 {
00031
00032 public:
00033
00034     NumberBox();
00035
00036     void Value(double value);
00037     double Value();
00038
00039     // IUIElement
00040     virtual winrt::AutomationPeer OnCreateAutomationPeer();
00041
00042     // IFrameworkElement
00043     void OnApplyTemplate();
00044     void OnTextBoxLoaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&);
00045
00046     void OnHeaderPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00047     void OnHeaderTemplatePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00048     void OnSpinButtonPlacementModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00049     void OnTextPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00050
00051     void OnValidationModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00052
00053     void OnValuePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00054     void OnMinimumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00055     void OnMaximumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00056     void OnSmallChangePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00057     void OnIsWrapEnabledPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00058
00059     void OnNumberFormatterPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00060     void ValidateNumberFormatter(winrt::INumberFormatter2 value);
00061
00062 private:
00063     winrt::DecimalFormatter GetRegionalSettingsAwareDecimalFormatter();
00064
00065     void OnSpinDownClick(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00066     void OnSpinUpClick(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00067     void OnNumberBoxKeyDown(winrt::IInspectable const& sender, winrt::KeyRoutedEventArgs const& args);
00068     void OnNumberBoxKeyUp(winrt::IInspectable const& sender, winrt::KeyRoutedEventArgs const& args);
00069     void OnNumberBoxGotFocus(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00070     void OnNumberBoxLostFocus(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00071     void OnNumberBoxScroll(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00072     void OnIsEnabledChanged(const winrt::IInspectable&, const winrt::DependencyPropertyChangedEventArgs&);
00073     void OnAutomationPropertiesNamePropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00074     void OnAutomationPropertiesLabeledByPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00075
00076     void UnhookEvents();
00077
00078     void ReevaluateForwardedUIAProperties();
00079
00080     void ValidateInput();
00081     void CoerceMinimum();
00082     void CoerceMaximum();
00083     void CoerceValue();
00084     void UpdateTextToValue();
00085     void UpdateValueToText();
00086
00087     void UpdateSpinButtonPlacement();
00088     void UpdateSpinButtonEnabled();
00089     void StepValue(double change);
00090
00091     void UpdateHeaderPresenterState();
00092
00093     void UpdateVisualStateForIsEnabledChange();
00094
00095     bool IsInBounds(double value);
00096
00097     void MoveCaretToTextEnd();
00098
00099     void SetDefaultInputScope();
00100
00101     bool m_valueUpdating{ false };
00102     bool m_textUpdating{ false };
00103
00104     winrt::SignificantDigitsNumberRounder m_displayRounder{};
00105
00106     tracker_ref<winrt::TextBox> m_textBox{ this };
00107     tracker_ref<winrt::ContentPresenter> m_headerPresenter{ this };
00108     tracker_ref<winrt::Popup> m_popup{ this };
00109
00110     winrt::RepeatButton::Click_revoker m_upButtonClickRevoker{};
00111     winrt::RepeatButton::Click_revoker m_downButtonClickRevoker{};
00112     winrt::FrameworkElement::Loaded_revoker m_textBoxLoadedRevoker{};
00113     winrt::TextBox::PreviewKeyDown_revoker m_textBoxPreviewKeyDownRevoker{};
00114     winrt::TextBox::KeyDown_revoker m_textBoxKeyDownRevoker{};
00115     winrt::TextBox::KeyUp_revoker m_textBoxKeyUpRevoker{};
00116     winrt::RepeatButton::Click_revoker m_popupUpButtonClickRevoker{};
00117     winrt::RepeatButton::Click_revoker m_popupDownButtonClickRevoker{};
00118     winrt::Control::IsEnabledChanged_revoker m_isEnabledChangedRevoker{};
00119 };
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/MultipleTabViewPage.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

MultipleTabViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using System.Collections.Generic;
00007 using System.Collections.ObjectModel;
00008 using Windows.ApplicationModel.DataTransfer;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class MultipleTabViewPage : TestPage
00013     {
00014         public ObservableCollection<TabDataItem> FirstTabViewItems { get; } = new();
00015         public ObservableCollection<TabDataItem> SecondTabViewItems { get; } = new();
00016         public ObservableCollection<TabDataItem> CompactTabViewItems { get; } = new();
00017         public ObservableCollection<TabDataItem> SizeToContentTabViewItems { get; } = new();
00018
00019         private int tabCount = 0;
00020         private SymbolIconSource symbolIconSource = new SymbolIconSource() { Symbol = Symbol.Placeholder };
00021         private const string tabDataItemIdentifier = "TabDataItem";
00022         private const string originatingTabViewIdentifier = "OriginatingTabView";
00023
00024         private readonly Dictionary<TabDataItem, TabViewItem> dataItemToTabItemDictionary = new();
00025
00026         public MultipleTabViewPage()
00027         {
00028             this.InitializeComponent();
00029
00030             AddNewTab(FirstTabViewItems);
00031             AddNewTab(FirstTabViewItems);
00032             AddNewTab(FirstTabViewItems);
00033             AddNewTab(FirstTabViewItems);
00034             AddNewTab(SecondTabViewItems);
00035             AddNewTab(CompactTabViewItems);
00036             AddNewTab(SizeToContentTabViewItems);
00037         }
00038
00039         public static string RemoveWhitespace(string s)
00040         {
00041             return s.Replace(" ", "");
00042         }
00043
00044         private void AddNewTab(ObservableCollection<TabDataItem> itemCollection, int position = -1, TabDataItem item = null)
00045         {
00046             if (item == null)
00047             {
00048                 item = new TabDataItem {
00049                     IconSource = symbolIconSource,
00050                     Header = $"Item {tabCount}",
00051                     Content = $"This is tab {tabCount}."
00052                 };
00053
00054                 tabCount++;
00055             }
00056
00057             if (position < 0)
00058             {
00059                 itemCollection.Add(item);
00060             }
00061             else
00062             {
00063                 itemCollection.Insert(position, item);
00064             }
00065         }
00066
00067         private void TabView_AddButtonClick(TabView sender, object args)
00068         {
00069             AddNewTab((ObservableCollection<TabDataItem>)sender.TabItemsSource);
00070         }
00071
00072         private void TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
00073         {
00074             ((ObservableCollection<TabDataItem>)sender.TabItemsSource).Remove((TabDataItem)args.Item);
00075         }
00076
00077         private void TabView_TabDragStarting(TabView sender, TabViewTabDragStartingEventArgs args)
00078         {
00079             args.Data.Properties.Add(tabDataItemIdentifier, args.Item);
00080             args.Data.Properties.Add(originatingTabViewIdentifier, sender);
00081             args.Data.RequestedOperation = DataPackageOperation.Move;
00082         }
00083
00084         private void TabView_DragEnter(object sender, DragEventArgs args)
00085         {
00086             TabView target = (TabView)sender;
00087
00088             // If we don't have the properties we expect in the data view properties, or if this is the same tab view
00089             // as what originated the drag, then we don't want to do anything - this either isn't a package we want to handle,
00090             // or it's a drag within the same tab view, in which case the tab view will handle everything internally.
00091             if (!args.DataView.Properties.TryGetValue(tabDataItemIdentifier, out _) ||
00092                 !args.DataView.Properties.TryGetValue(originatingTabViewIdentifier, out object originatingTabView) ||
00093                 originatingTabView == target)
00094             {
00095                 args.Handled = false;
00096                 return;
00097             }
00098
00099             args.AcceptedOperation = DataPackageOperation.Move;
00100         }
00101
00102         private void TabView_Drop(object sender, DragEventArgs args)
00103         {
00104             TabView target = (TabView)sender;
00105
00106             if (!args.DataView.Properties.TryGetValue(tabDataItemIdentifier, out object value) ||
00107                 !args.DataView.Properties.TryGetValue(originatingTabViewIdentifier, out object originatingTabViewObject) ||
00108                 originatingTabViewObject == target)
00109             {
00110                 args.Handled = false;
00111                 return;
00112             }
00113
00114             TabDataItem item = (TabDataItem)value;
00115
00116             int index = -1;
00117             for (int i = 0; i < target.TabItems.Count; i++)
00118             {
00119                 if (target.TabItems[i] is TabDataItem tabDataItem)
00120                 {
00121                     var tabItem = dataItemToTabItemDictionary[tabDataItem];
00122
00123                     // If the mouse cursor is within the bounds of this tab item,
00124                     // then this is the place where we're dropping the dragged item.
00125                     if (args.GetPosition(tabItem).X > 0 &&
00126                         args.GetPosition(tabItem).X < tabItem.ActualWidth)
00127                     {
00128                         index = i;
00129                         break;
00130                     }
00131                 }
00132             }
00133
00134             AddNewTab((ObservableCollection<TabDataItem>)target.TabItemsSource, index, item);
00135
00136             // We've dragged a tab item to a new TabView, so we'll want to remove it
00137             // from its original TabView now.
00138             var originatingTabView = (TabView)originatingTabViewObject;
00139             var originatingItemsSource = (ObservableCollection<TabDataItem>)originatingTabView.TabItemsSource;
00140
00141             int selectedIndex = originatingItemsSource.IndexOf(item);
00142             originatingItemsSource.Remove(item);
00143             originatingTabView.SelectedIndex = selectedIndex >= originatingItemsSource.Count ? originatingItemsSource.Count - 1 : selectedIndex;
00144         }
00145
00146         private void TabViewItem_Loaded(object sender, RoutedEventArgs e)
00147         {
00148             TabViewItem item = (TabViewItem)sender;
00149             TabDataItem tabDataItem = (TabDataItem)item.Tag;
00150
00151             dataItemToTabItemDictionary[tabDataItem] = item;
00152         }
00153     }
00154 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewWithRTLFlowDirectionPage Member List

This is the complete list of members for ScrollViewWithRTLFlowDirectionPage, including all inherited members.
ChkScrollViewContentFlowDirection_Checked(object sender, RoutedEventArgs e) | ScrollViewWithRTLFlowDirectionPage | [inline, private]
ChkScrollViewContentFlowDirection_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithRTLFlowDirectionPage | [inline, private]
ChkScrollViewFlowDirection_Checked(object sender, RoutedEventArgs e) | ScrollViewWithRTLFlowDirectionPage | [inline, private]
ChkScrollViewFlowDirection_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithRTLFlowDirectionPage | [inline, private]
ScrollViewWithRTLFlowDirectionPage() | ScrollViewWithRTLFlowDirectionPage | [inline]
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManagerWithPlatformFeatures.h Source File

  • File List
  • File Members
  • Repeater

ViewportManagerWithPlatformFeatures.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ViewportManager.h"
00007 #include "ScrollingScrollStartingEventArgs.h"
00008 #include "ScrollingZoomStartingEventArgs.h"
00009
00010 class ItemsRepeater;
00011
00012 // Manages the virtualization windows (visible/realization). This class essentially
00013 // does the equivalent behavior of ViewportManager class except that here we use
00014 // EffectiveViewport and ScrollAnchoring features added to the framework in RS5.
00015 // We also do not use the IRepeaterScrollingSurface internal API used by ViewManager.
00016 class ViewportManagerWithPlatformFeatures : public ViewportManager
00017 {
00018 public:
00019     ViewportManagerWithPlatformFeatures(ItemsRepeater* owner);
00020
00021     winrt::UIElement SuggestedAnchor() const override;
00022
00023     double HorizontalCacheLength() const override { return m_maximumHorizontalCacheLength; }
00024     void HorizontalCacheLength(double value) override;
00025
00026     double VerticalCacheLength() const override { return m_maximumVerticalCacheLength; }
00027     void VerticalCacheLength(double value) override;
00028
00029     winrt::Rect GetLayoutVisibleWindow() const override;
00030     winrt::Rect GetLayoutRealizationWindow() const override;
00031
00032     void SetLayoutExtent(const winrt::Rect& layoutExtent) override;
00033     winrt::Rect GetLayoutExtent() const override { return m_layoutExtent; }
00034     winrt::Point GetOrigin() const override { return winrt::Point(m_layoutExtent.X, m_layoutExtent.Y); }
00035
00036     void OnLayoutChanged(bool isVirtualizing) override;
00037     void OnElementPrepared(const winrt::UIElement& element) override;
00038     void OnElementCleared(const winrt::UIElement& element) override;
00039     void OnOwnerMeasuring() override;
00040     void OnOwnerArranged() override;
00041     void OnMakeAnchor(const winrt::UIElement& anchor, const bool isAnchorOutsideRealizedRange) override;
00042     void OnBringIntoViewRequested(const winrt::BringIntoViewRequestedEventArgs& args) override;
00043
00044     void ResetLayoutRealizationWindowCacheBuffer() override;
00045     void ResetScrollers() override;
00046
00047     winrt::UIElement MadeAnchor() const override { return m_makeAnchorElement.get(); }
00048
00049 private:
00050     struct ScrollerInfo;
00051
00052     void SetVisibleWindow(const winrt::Rect& visibleWindow);
00053     void SetPendingViewportShift(const winrt::Point& pendingViewportShift);
00054     void SetExpectedViewportShift(float expectedViewportShiftX, float expectedViewportShiftY);
00055     void SetUnshiftableShift(float unshiftableShiftX, float unshiftableShiftY);
00056
00057     void ResetLayoutExtent();
00058     void ResetVisibleWindow();
00059     void ResetExpectedViewportShift();
00060     void ResetPendingViewportShift();
00061     void ResetUnshiftableShift();
00062
00063     void OnCacheBuildActionCompleted();
00064     void OnEffectiveViewportChanged(winrt::FrameworkElement const& sender, winrt::EffectiveViewportChangedEventArgs const& args);
00065     void OnLayoutUpdated(winrt::IInspectable const& sender, winrt::IInspectable const& args);
00066     void OnScrollPresenterScrollStarting(winrt::ScrollPresenter const& scrollPresenter, winrt::ScrollingScrollStartingEventArgs const& args);
00067     void OnScrollPresenterZoomStarting(winrt::ScrollPresenter const& scrollPresenter, winrt::ScrollingZoomStartingEventArgs const& args);
00068     void OnScrollPresenterViewChangeStarting(winrt::ScrollPresenter const& scrollPresenter, double horizontalOffset, double verticalOffset, float zoomFactor);
00069
00070     void EnsureScroller();
00071     bool HasScroller() const { return m_scroller != nullptr; }
00072     bool UpdateViewport(winrt::Rect const& effectiveViewport);
00073     void ResetCacheBuffer(bool registerCacheBuildWork = true);
00074     void ValidateCacheLength(double cacheLength);
00075     void RegisterPreparedElementsAsArranged();
00076     void RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates();
00077     void RegisterCacheBuildWork();
00078     void TryInvalidateMeasure();
00079     void UnregisterScrollAnchorCandidates(winrt::UIElement const& exceptionElement, bool registerAsPreparedAndArrangedElements);
00080     winrt::Rect GetLayoutVisibleWindowDiscardAnchor() const;
00081
00082     winrt::hstring GetLayoutId() const;
00083     void OnCompositionTargetRendering(winrt::IInspectable const& sender, winrt::IInspectable const& args);
00084     winrt::UIElement GetImmediateChildOfRepeater(winrt::UIElement const& descendant);
00085
00086 #ifdef DBG
00087     void TraceFieldsDbg();
00088     void TraceScrollerDbg();
00089 #endif // DBG
00090
00091     ItemsRepeater* m_owner{ nullptr };
00092
00093     bool m_ensuredScroller{ false };
00094     tracker_ref<winrt::Controls::IScrollAnchorProvider> m_scroller;
00095
00096     std::vector<tracker_ref<winrt::UIElement>> m_preparedElements;
00097     std::vector<tracker_ref<winrt::UIElement>> m_preparedAndArrangedElements;
00098
00099     tracker_ref<winrt::UIElement> m_makeAnchorElement;
00100     bool m_isAnchorOutsideRealizedRange{};  // Value is only valid when m_makeAnchorElement is set.
00101
00102     bool m_skipScrollAnchorRegistrationsDuringNextMeasurePass{};
00103     bool m_skipScrollAnchorRegistrationsDuringNextArrangePass{};
00104
00105     bool m_cacheBuildActionOutstanding{};
00106
00107     winrt::Rect m_lastLayoutRealizationWindow{};
00108     winrt::Rect m_visibleWindow{};
00109     winrt::Rect m_layoutExtent{};
00110     // This is the expected shift by the layout.
00111     winrt::Point m_expectedViewportShift{};
00112     // This is what is pending and not been accounted for.
00113     // Sometimes the scrolling surface cannot service a shift (for example
00114     // it is already at the top and cannot shift anymore.)
00115     winrt::Point m_pendingViewportShift{};
00116     // Unshiftable shift amount that this view manager can
00117     // handle on its own to fake it to the layout as if the shift
00118     // actually happened. This can happen in cases where no scroller
00119     // in the parent chain can scroll in the shift direction.
00120     winrt::Point m_unshiftableShift{};
00121
00122     // Realization window cache fields
00123     double m_maximumHorizontalCacheLength{ 2.0 };
00124     double m_maximumVerticalCacheLength{ 2.0 };
00125     double m_horizontalCacheBufferPerSide{};
00126     double m_verticalCacheBufferPerSide{};
00127
00128     bool m_isBringIntoViewInProgress{false};
00129     // For non-virtualizing layouts, we do not need to keep
00130     // updating viewports and invalidating measure often. So when
00131     // a non virtualizing layout is used, we stop doing all that work.
00132     bool m_managingViewportDisabled{ false };
00133
00134     // Event tokens
00135     winrt::ScrollPresenter::ScrollStarting_revoker m_scrollPresenterScrollStartingRevoker{};
00136     winrt::ScrollPresenter::ZoomStarting_revoker m_scrollPresenterZoomStartingRevoker{};
00137     winrt::FrameworkElement::EffectiveViewportChanged_revoker m_effectiveViewportChangedRevoker{};
00138     winrt::FrameworkElement::LayoutUpdated_revoker m_layoutUpdatedRevoker{};
00139     winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering_revoker m_renderingToken{};
00140 };
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTemplateSettings.h Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipTemplateSettings.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TeachingTipTemplateSettings.g.h"
00007 #include "TeachingTipTemplateSettings.properties.h"
00008
00009 class TeachingTipTemplateSettings :
00010     public winrt::implementation::TeachingTipTemplateSettingsT<TeachingTipTemplateSettings>,
00011     public TeachingTipTemplateSettingsProperties
00012 {
00013 public:
00014     TeachingTipTemplateSettings();
00015 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingDeterminate::AnimatedVisual Member List

This is the complete list of members for ProgressRingDeterminate::AnimatedVisual, including all inherited members.
_c | ProgressRingDeterminate::AnimatedVisual | [private]
_reusableExpressionAnimation | ProgressRingDeterminate::AnimatedVisual | [private]
_root | ProgressRingDeterminate::AnimatedVisual | [private]
AnimatedVisual(Compositor compositor) | ProgressRingDeterminate::AnimatedVisual | [inline, private]
c_durationTicks | ProgressRingDeterminate::AnimatedVisual | [private]
ColorBrush_AlmostDodgerBlue_FF0078D7() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
ColorBrush_LightGray() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
CubicBezierEasingFunction() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
Dispose() | ProgressRingDeterminate::AnimatedVisual | [private]
Duration | ProgressRingDeterminate::AnimatedVisual | [private]
Ellipse_7_0() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
Ellipse_7_1() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
Root() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
RootVisual | ProgressRingDeterminate::AnimatedVisual | [private]
ShapeVisual() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
Size | ProgressRingDeterminate::AnimatedVisual | [private]
SpriteShape_0() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
SpriteShape_1() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
TrimEndScalarAnimation_0_to_1() | ProgressRingDeterminate::AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MaterialHelper Member List

This is the complete list of members for MaterialHelper, including all inherited members.
EnsureCompositionCapabilities() | MaterialHelper | [private]
FailedToAttachLights() | MaterialHelper | [private]
GetNoiseBrush() | MaterialHelper | [static]
GetNoiseBrushImpl() | MaterialHelper | [private]
HookupDpiChangedHandler() | MaterialHelper | [private]
IncrementAndCheckFailedToAttachLightsCount() | MaterialHelper | [static]
IsFullScreenOrTabletModeImpl() | MaterialHelper | [private]
m_noiseChangedListeners | MaterialHelper | [private]
m_policyChangedListeners | MaterialHelper | [private]
m_visibilityChangedRevoker | MaterialHelper | [private]
MaterialHelper() | MaterialHelper |
NoiseChanged(const std::function< void(const com_ptr< MaterialHelperBase > &)> &handler) | MaterialHelper | [static]
NoiseChanged(winrt::event_token removeToken) | MaterialHelper | [static]
OnCompositionCapabilitiesChanged(const winrt::CompositionCapabilities &, const winrt::IInspectable &) | MaterialHelper | [private]
OnDpiChanged(const winrt::IInspectable &sender, const winrt::IInspectable &args) | MaterialHelper | [private]
OnEnergySaverStatusChanged(const winrt::IInspectable &, const winrt::IInspectable &) | MaterialHelper | [private]
OnUISettingsChanged(const winrt::UISettings &, const winrt::IInspectable &) | MaterialHelper | [private]
PolicyChanged(const std::function< void(const com_ptr< MaterialHelperBase > &, bool)> &handler) | MaterialHelper | [static]
PolicyChanged(winrt::event_token removeToken) | MaterialHelper | [static]
ResetFailedToAttachLightsCount() | MaterialHelper | [static]
ResetNoise() | MaterialHelper | [private]
RS2IsSafeToCreateNoise() | MaterialHelper | [static]
sc_maxFailedToAttachLightsCount | MaterialHelper | [private, static]
SetShouldBeginAttachingLights(bool shouldBeginAttachingLights) | MaterialHelper | [static]
SetShouldContinueAttachingLights(bool shouldContinueAttachingLights) | MaterialHelper | [static]
ShouldBeginAttachingLights() | MaterialHelper | [static]
ShouldContinueAttachingLights() | MaterialHelper | [static]
UpdatePolicyStatus(bool onUIThread=false) | MaterialHelper |
~MaterialHelper() | MaterialHelper | [virtual]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MyCollection Member List

This is the complete list of members for MyCollection, including all inherited members.
Add(object value) | MyCollection | [inline]
Clear() | MyCollection | [inline]
CollectionChanged | MyCollection |
Contains(object value) | MyCollection | [inline]
CopyTo(Array array, int index) | MyCollection | [inline]
Count | MyCollection |
GetEnumerator() | MyCollection | [inline]
IndexFromKey(string key) | MyCollection | [inline]
IndexOf(object value) | MyCollection | [inline]
InitializeCollection(IEnumerable< object > collection) | MyCollection | [inline]
inner | MyCollection | [private]
Insert(int index, object value) | MyCollection | [inline]
IsFixedSize | MyCollection |
IsReadOnly | MyCollection |
IsSynchronized | MyCollection |
KeyFromIndex(int index) | MyCollection | [inline]
MyCollection(IEnumerable< object > collection) | MyCollection | [inline]
Remove(object value) | MyCollection | [inline]
RemoveAt(int index) | MyCollection | [inline]
SyncRoot | MyCollection |
this | MyCollection |
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabView.properties.h Source File

  • File List
  • File Members
  • Generated

TabView.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TabViewProperties
00008 {
00009 public:
00010     TabViewProperties();
00011
00012     void AddTabButtonCommand(winrt::ICommand const& value);
00013     winrt::ICommand AddTabButtonCommand();
00014
00015     void AddTabButtonCommandParameter(winrt::IInspectable const& value);
00016     winrt::IInspectable AddTabButtonCommandParameter();
00017
00018     void AllowDropTabs(bool value);
00019     bool AllowDropTabs();
00020
00021     void CanDragTabs(bool value);
00022     bool CanDragTabs();
00023
00024     void CanReorderTabs(bool value);
00025     bool CanReorderTabs();
00026
00027     void CanTearOutTabs(bool value);
00028     bool CanTearOutTabs();
00029
00030     void CloseButtonOverlayMode(winrt::TabViewCloseButtonOverlayMode const& value);
00031     winrt::TabViewCloseButtonOverlayMode CloseButtonOverlayMode();
00032
00033     void IsAddTabButtonVisible(bool value);
00034     bool IsAddTabButtonVisible();
00035
00036     void SelectedIndex(int value);
00037     int SelectedIndex();
00038
00039     void SelectedItem(winrt::IInspectable const& value);
00040     winrt::IInspectable SelectedItem();
00041
00042     void TabItems(winrt::IVector<winrt::IInspectable> const& value);
00043     winrt::IVector<winrt::IInspectable> TabItems();
00044
00045     void TabItemsSource(winrt::IInspectable const& value);
00046     winrt::IInspectable TabItemsSource();
00047
00048     void TabItemTemplate(winrt::DataTemplate const& value);
00049     winrt::DataTemplate TabItemTemplate();
00050
00051     void TabItemTemplateSelector(winrt::DataTemplateSelector const& value);
00052     winrt::DataTemplateSelector TabItemTemplateSelector();
00053
00054     void TabStripFooter(winrt::IInspectable const& value);
00055     winrt::IInspectable TabStripFooter();
00056
00057     void TabStripFooterTemplate(winrt::DataTemplate const& value);
00058     winrt::DataTemplate TabStripFooterTemplate();
00059
00060     void TabStripHeader(winrt::IInspectable const& value);
00061     winrt::IInspectable TabStripHeader();
00062
00063     void TabStripHeaderTemplate(winrt::DataTemplate const& value);
00064     winrt::DataTemplate TabStripHeaderTemplate();
00065
00066     void TabWidthMode(winrt::TabViewWidthMode const& value);
00067     winrt::TabViewWidthMode TabWidthMode();
00068
00069     static winrt::DependencyProperty AddTabButtonCommandProperty() { return s_AddTabButtonCommandProperty; }
00070     static winrt::DependencyProperty AddTabButtonCommandParameterProperty() { return s_AddTabButtonCommandParameterProperty; }
00071     static winrt::DependencyProperty AllowDropTabsProperty() { return s_AllowDropTabsProperty; }
00072     static winrt::DependencyProperty CanDragTabsProperty() { return s_CanDragTabsProperty; }
00073     static winrt::DependencyProperty CanReorderTabsProperty() { return s_CanReorderTabsProperty; }
00074     static winrt::DependencyProperty CanTearOutTabsProperty() { return s_CanTearOutTabsProperty; }
00075     static winrt::DependencyProperty CloseButtonOverlayModeProperty() { return s_CloseButtonOverlayModeProperty; }
00076     static winrt::DependencyProperty IsAddTabButtonVisibleProperty() { return s_IsAddTabButtonVisibleProperty; }
00077     static winrt::DependencyProperty SelectedIndexProperty() { return s_SelectedIndexProperty; }
00078     static winrt::DependencyProperty SelectedItemProperty() { return s_SelectedItemProperty; }
00079     static winrt::DependencyProperty TabItemsProperty() { return s_TabItemsProperty; }
00080     static winrt::DependencyProperty TabItemsSourceProperty() { return s_TabItemsSourceProperty; }
00081     static winrt::DependencyProperty TabItemTemplateProperty() { return s_TabItemTemplateProperty; }
00082     static winrt::DependencyProperty TabItemTemplateSelectorProperty() { return s_TabItemTemplateSelectorProperty; }
00083     static winrt::DependencyProperty TabStripFooterProperty() { return s_TabStripFooterProperty; }
00084     static winrt::DependencyProperty TabStripFooterTemplateProperty() { return s_TabStripFooterTemplateProperty; }
00085     static winrt::DependencyProperty TabStripHeaderProperty() { return s_TabStripHeaderProperty; }
00086     static winrt::DependencyProperty TabStripHeaderTemplateProperty() { return s_TabStripHeaderTemplateProperty; }
00087     static winrt::DependencyProperty TabWidthModeProperty() { return s_TabWidthModeProperty; }
00088
00089     static GlobalDependencyProperty s_AddTabButtonCommandProperty;
00090     static GlobalDependencyProperty s_AddTabButtonCommandParameterProperty;
00091     static GlobalDependencyProperty s_AllowDropTabsProperty;
00092     static GlobalDependencyProperty s_CanDragTabsProperty;
00093     static GlobalDependencyProperty s_CanReorderTabsProperty;
00094     static GlobalDependencyProperty s_CanTearOutTabsProperty;
00095     static GlobalDependencyProperty s_CloseButtonOverlayModeProperty;
00096     static GlobalDependencyProperty s_IsAddTabButtonVisibleProperty;
00097     static GlobalDependencyProperty s_SelectedIndexProperty;
00098     static GlobalDependencyProperty s_SelectedItemProperty;
00099     static GlobalDependencyProperty s_TabItemsProperty;
00100     static GlobalDependencyProperty s_TabItemsSourceProperty;
00101     static GlobalDependencyProperty s_TabItemTemplateProperty;
00102     static GlobalDependencyProperty s_TabItemTemplateSelectorProperty;
00103     static GlobalDependencyProperty s_TabStripFooterProperty;
00104     static GlobalDependencyProperty s_TabStripFooterTemplateProperty;
00105     static GlobalDependencyProperty s_TabStripHeaderProperty;
00106     static GlobalDependencyProperty s_TabStripHeaderTemplateProperty;
00107     static GlobalDependencyProperty s_TabWidthModeProperty;
00108
00109     winrt::event_token AddTabButtonClick(winrt::TypedEventHandler<winrt::TabView, winrt::IInspectable> const& value);
00110     void AddTabButtonClick(winrt::event_token const& token);
00111     winrt::event_token ExternalTornOutTabsDropped(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs> const& value);
00112     void ExternalTornOutTabsDropped(winrt::event_token const& token);
00113     winrt::event_token ExternalTornOutTabsDropping(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs> const& value);
00114     void ExternalTornOutTabsDropping(winrt::event_token const& token);
00115     winrt::event_token SelectionChanged(winrt::SelectionChangedEventHandler const& value);
00116     void SelectionChanged(winrt::event_token const& token);
00117     winrt::event_token TabCloseRequested(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs> const& value);
00118     void TabCloseRequested(winrt::event_token const& token);
00119     winrt::event_token TabDragCompleted(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragCompletedEventArgs> const& value);
00120     void TabDragCompleted(winrt::event_token const& token);
00121     winrt::event_token TabDragStarting(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragStartingEventArgs> const& value);
00122     void TabDragStarting(winrt::event_token const& token);
00123     winrt::event_token TabDroppedOutside(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs> const& value);
00124     void TabDroppedOutside(winrt::event_token const& token);
00125     winrt::event_token TabItemsChanged(winrt::TypedEventHandler<winrt::TabView, winrt::IVectorChangedEventArgs> const& value);
00126     void TabItemsChanged(winrt::event_token const& token);
00127     winrt::event_token TabStripDragOver(winrt::DragEventHandler const& value);
00128     void TabStripDragOver(winrt::event_token const& token);
00129     winrt::event_token TabStripDrop(winrt::DragEventHandler const& value);
00130     void TabStripDrop(winrt::event_token const& token);
00131     winrt::event_token TabTearOutRequested(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs> const& value);
00132     void TabTearOutRequested(winrt::event_token const& token);
00133     winrt::event_token TabTearOutWindowRequested(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs> const& value);
00134     void TabTearOutWindowRequested(winrt::event_token const& token);
00135
00136     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::IInspectable>> m_addTabButtonClickEventSource;
00137     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs>> m_externalTornOutTabsDroppedEventSource;
00138     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs>> m_externalTornOutTabsDroppingEventSource;
00139     event_source<winrt::SelectionChangedEventHandler> m_selectionChangedEventSource;
00140     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs>> m_tabCloseRequestedEventSource;
00141     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragCompletedEventArgs>> m_tabDragCompletedEventSource;
00142     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragStartingEventArgs>> m_tabDragStartingEventSource;
00143     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs>> m_tabDroppedOutsideEventSource;
00144     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::IVectorChangedEventArgs>> m_tabItemsChangedEventSource;
00145     event_source<winrt::DragEventHandler> m_tabStripDragOverEventSource;
00146     event_source<winrt::DragEventHandler> m_tabStripDropEventSource;
00147     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs>> m_tabTearOutRequestedEventSource;
00148     event_source<winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs>> m_tabTearOutWindowRequestedEventSource;
00149
00150     static void EnsureProperties();
00151     static void ClearProperties();
00152
00153     static void OnCanTearOutTabsPropertyChanged(
00154         winrt::DependencyObject const& sender,
00155         winrt::DependencyPropertyChangedEventArgs const& args);
00156
00157     static void OnCloseButtonOverlayModePropertyChanged(
00158         winrt::DependencyObject const& sender,
00159         winrt::DependencyPropertyChangedEventArgs const& args);
00160
00161     static void OnSelectedIndexPropertyChanged(
00162         winrt::DependencyObject const& sender,
00163         winrt::DependencyPropertyChangedEventArgs const& args);
00164
00165     static void OnSelectedItemPropertyChanged(
00166         winrt::DependencyObject const& sender,
00167         winrt::DependencyPropertyChangedEventArgs const& args);
00168
00169     static void OnTabItemsSourcePropertyChanged(
00170         winrt::DependencyObject const& sender,
00171         winrt::DependencyPropertyChangedEventArgs const& args);
00172
00173     static void OnTabWidthModePropertyChanged(
00174         winrt::DependencyObject const& sender,
00175         winrt::DependencyPropertyChangedEventArgs const& args);
00176 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbTests Member List

This is the complete list of members for BreadcrumbTests, including all inherited members.
AddItemsAndCompressBreadcrumbTest() | BreadcrumbTests | [inline]
AddItemsAndInvokeBreadcrumbBarItemTest() | BreadcrumbTests | [inline]
CheckCurrentItemDoesNotRaiseInvokeEvent() | BreadcrumbTests | [inline]
ClassInitialize(TestContext testContext) | BreadcrumbTests | [inline, static]
ClickOnElements(string[] elementNames) | BreadcrumbTests | [inline, private]
ConvertTo< T >(UIObject uiObject) | BreadcrumbTests | [inline, private]
GetCurrentItemText(BreadcrumbBarItem currentItem) | BreadcrumbTests | [inline, private]
GetDropDownItemByName(string dropDownItemName) | BreadcrumbTests | [inline, private]
GetLastClickedItem() | BreadcrumbTests | [inline, private]
GetLastClickedItemIndex() | BreadcrumbTests | [inline, private]
InvokeDropDownItemTest() | BreadcrumbTests | [inline]
InvokeEllipsisItem(UIObject breadcrumb) | BreadcrumbTests | [inline, private]
InvokeEllipsisItemTest() | BreadcrumbTests | [inline]
KeyboardNavigationDropDownItemInvokationTest() | BreadcrumbTests | [inline]
KeyboardNavigationFlyoutItemsTest() | BreadcrumbTests | [inline]
KeyboardNavigationForCrumbledLeftToRightTest() | BreadcrumbTests | [inline]
KeyboardNavigationForCrumbledRightToLeftTest() | BreadcrumbTests | [inline]
KeyboardNavigationItemInvokationTest() | BreadcrumbTests | [inline]
KeyboardNavigationLeftToRightTest() | BreadcrumbTests | [inline]
KeyboardNavigationRightToLeftTest() | BreadcrumbTests | [inline]
NoInteractionTest() | BreadcrumbTests | [inline]
RetrieveBreadcrumbControl() | BreadcrumbTests | [inline, private]
RetrieveRTLCheckBox(bool mustClickCheckBox=false) | BreadcrumbTests | [inline, private]
RetrieveWidthSlider() | BreadcrumbTests | [inline, private]
SetFocusToFirstBreadcrumbBarItem(UIObject breadcrumb, bool isEllipsisVisible=false, bool isRightToLeft=false) | BreadcrumbTests | [inline, private]
SetUpCrumbledTest() | BreadcrumbTests | [inline, private]
SetUpTest() | BreadcrumbTests | [inline, private]
TestCleanup() | BreadcrumbTests | [inline]
TryGetFocusByPressingTab(UIObject breadcrumb, int indexToFocus) | BreadcrumbTests | [inline, private]
TryGetFocusForRs2(UIObject breadcrumb, int indexToFocus, bool isEllipsisVisible) | BreadcrumbTests | [inline, private]
TryGetFocusForRs3(UIObject breadcrumb, int indexToFocus, bool isEllipsisVisible, bool isRightToLeft) | BreadcrumbTests | [inline, private]
VerifyAxeScanPasses() | BreadcrumbTests | [inline]
VerifyBreadcrumbBarItemsContain(UICollection< UIObject > breadcrumbItems, string[] expectedItemValues, bool firstItemIsCurrentItem=false, bool isEllipsisVisible=false) | BreadcrumbTests | [inline, private]
VerifyDropDownItemContainsText(string expectedText) | BreadcrumbTests | [inline, private]
VerifyDropDownItemContainsText(Button dropDownItem, string expectedEllipsisItemText) | BreadcrumbTests | [inline, private]
VerifyFlyoutRecycleCrash() | BreadcrumbTests | [inline]
VerifyLastClickedItemIndexIs(int expected) | BreadcrumbTests | [inline, private]
VerifyLastClickedItemIs(string expected) | BreadcrumbTests | [inline, private]
VerifyMulticlickCrash() | BreadcrumbTests | [inline]
Generated on Sun Dec 1 2024 20:53:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AutoSuggestBoxHelper Member List

This is the complete list of members for AutoSuggestBoxHelper, including all inherited members.
AutoSuggestBoxHelper() | AutoSuggestBoxHelper |
AutoSuggestBoxHelperProperties() | AutoSuggestBoxHelperProperties |
AutoSuggestEventRevokersProperty() | AutoSuggestBoxHelper | [inline, static]
ClearProperties() | AutoSuggestBoxHelper | [static]
EnsureProperties() | AutoSuggestBoxHelper | [static]
GetKeepInteriorCornersSquare(winrt::AutoSuggestBox const &target) | AutoSuggestBoxHelperProperties | [static]
IsPopupOpenDown(const winrt::AutoSuggestBox &autoSuggestBox) | AutoSuggestBoxHelper | [private, static]
KeepInteriorCornersSquareProperty() | AutoSuggestBoxHelperProperties | [inline, static]
OnAutoSuggestBoxLoaded(const winrt::IInspectable &sender, const winrt::IInspectable &args) | AutoSuggestBoxHelper | [private, static]
OnKeepInteriorCornersSquarePropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args) | AutoSuggestBoxHelper | [static]
s_AutoSuggestEventRevokersProperty | AutoSuggestBoxHelper | [static]
s_KeepInteriorCornersSquareProperty | AutoSuggestBoxHelperProperties | [static]
SetKeepInteriorCornersSquare(winrt::AutoSuggestBox const &target, bool value) | AutoSuggestBoxHelperProperties | [static]
UpdateCornerRadius(const winrt::AutoSuggestBox &autoSuggestBox, bool isPopupOpen) | AutoSuggestBoxHelper | [private, static]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollingScrollOptions Member List

This is the complete list of members for ScrollingScrollOptions, including all inherited members.
AnimationMode() const | ScrollingScrollOptions |
AnimationMode(winrt::ScrollingAnimationMode const &animationMode) | ScrollingScrollOptions |
ScrollingScrollOptions(winrt::ScrollingAnimationMode const &animationMode) | ScrollingScrollOptions |
ScrollingScrollOptions(winrt::ScrollingAnimationMode const &animationMode, winrt::ScrollingSnapPointsMode const &snapPointsMode) | ScrollingScrollOptions |
SnapPointsMode() const | ScrollingScrollOptions |
SnapPointsMode(winrt::ScrollingSnapPointsMode const &snapPointsMode) | ScrollingScrollOptions |
~ScrollingScrollOptions() | ScrollingScrollOptions | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/WebView2AutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

WebView2AutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "WebView2AutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(WebView2AutomationPeer)
00012 }
00013
00014 #include "WebView2AutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlTemplateSettingsProperties Member List

This is the complete list of members for PagerControlTemplateSettingsProperties, including all inherited members.
ClearProperties() | PagerControlTemplateSettingsProperties | [static]
EnsureProperties() | PagerControlTemplateSettingsProperties | [static]
NumberPanelItems(winrt::IVector< winrt::IInspectable > const &value) | PagerControlTemplateSettingsProperties |
NumberPanelItems() | PagerControlTemplateSettingsProperties |
NumberPanelItemsProperty() | PagerControlTemplateSettingsProperties | [inline, static]
PagerControlTemplateSettingsProperties() | PagerControlTemplateSettingsProperties |
Pages(winrt::IVector< winrt::IInspectable > const &value) | PagerControlTemplateSettingsProperties |
Pages() | PagerControlTemplateSettingsProperties |
PagesProperty() | PagerControlTemplateSettingsProperties | [inline, static]
s_NumberPanelItemsProperty | PagerControlTemplateSettingsProperties | [static]
s_PagesProperty | PagerControlTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AutoHandle< THandlePolicy > Member List

This is the complete list of members for AutoHandle< THandlePolicy >, including all inherited members.
Attach(THandleType handle) | AutoHandle< THandlePolicy > |
Attach(THandleType handle) | AutoHandle< THandlePolicy > |
AutoHandle() | AutoHandle< THandlePolicy > |
AutoHandle(THandleType handle) | AutoHandle< THandlePolicy > | [explicit]
AutoHandle(AutoHandle &&other) | AutoHandle< THandlePolicy > |
AutoHandle(const AutoHandle &) | AutoHandle< THandlePolicy > | [private]
AutoHandle() | AutoHandle< THandlePolicy > |
AutoHandle(THandleType handle) | AutoHandle< THandlePolicy > | [explicit]
AutoHandle(AutoHandle &&other) | AutoHandle< THandlePolicy > |
AutoHandle(const AutoHandle &) | AutoHandle< THandlePolicy > | [private]
Detach() | AutoHandle< THandlePolicy > | [inline]
Detach() | AutoHandle< THandlePolicy > | [inline]
IsValid() const | AutoHandle< THandlePolicy > |
IsValid() const | AutoHandle< THandlePolicy > |
m_handle | AutoHandle< THandlePolicy > | [private]
operator THandleType() const | AutoHandle< THandlePolicy > |
operator THandleType() const | AutoHandle< THandlePolicy > |
operator!=(THandleType handle) const | AutoHandle< THandlePolicy > |
operator!=(THandleType handle) const | AutoHandle< THandlePolicy > |
operator&() | AutoHandle< THandlePolicy > | [inline]
operator&() | AutoHandle< THandlePolicy > | [inline]
operator=(AutoHandle &&other) | AutoHandle< THandlePolicy > |
operator=(const THandleType &other) | AutoHandle< THandlePolicy > |
operator=(const AutoHandle &) | AutoHandle< THandlePolicy > | [private]
operator=(AutoHandle &&other) | AutoHandle< THandlePolicy > |
operator=(const THandleType &other) | AutoHandle< THandlePolicy > |
operator=(const AutoHandle &) | AutoHandle< THandlePolicy > | [private]
operator==(THandleType handle) const | AutoHandle< THandlePolicy > |
operator==(THandleType handle) const | AutoHandle< THandlePolicy > |
Release() | AutoHandle< THandlePolicy > |
Release() | AutoHandle< THandlePolicy > |
~AutoHandle() | AutoHandle< THandlePolicy > |
~AutoHandle() | AutoHandle< THandlePolicy > |
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< RoutedEventType::PointerCanceled > Member List

This is the complete list of members for RoutedEventTraits< RoutedEventType::PointerCanceled >, including all inherited members.
Event() RoutedEventTraits< RoutedEventType::PointerCanceled > [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

OrientationBasedMeasures Member List

This is the complete list of members for OrientationBasedMeasures, including all inherited members.
IsVertical | OrientationBasedMeasures |
m_rawPixelsPerViewPixel | OrientationBasedMeasures | [private]
m_useLayoutRounding | OrientationBasedMeasures | [private]
Major(Size size) | OrientationBasedMeasures | [inline]
MajorEnd(Rect rect) | OrientationBasedMeasures | [inline]
MajorSize(Rect rect) | OrientationBasedMeasures | [inline]
MajorStart(Rect rect) | OrientationBasedMeasures | [inline]
Minor(Size size) | OrientationBasedMeasures | [inline]
MinorMajorPoint(double minor, double major) | OrientationBasedMeasures | [inline]
MinorMajorRect(double minor, double major, double minorSize, double majorSize) | OrientationBasedMeasures | [inline]
MinorMajorSize(double minor, double major) | OrientationBasedMeasures | [inline]
MinorSize(Rect rect) | OrientationBasedMeasures | [inline]
MinorStart(Rect rect) | OrientationBasedMeasures | [inline]
OrientationBasedMeasures(ScrollOrientation o, bool useLayoutRounding=true) | OrientationBasedMeasures | [inline]
RoundForLayout(double value) | OrientationBasedMeasures | [inline, private]
ScrollOrientation | OrientationBasedMeasures |
SetMajorSize(ref Rect rect, double value) | OrientationBasedMeasures | [inline]
SetMajorStart(ref Rect rect, double value) | OrientationBasedMeasures | [inline]
SetMinorStart(ref Rect rect, double value) | OrientationBasedMeasures | [inline]
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarLabel.h Source File

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarLabel.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "AnnotatedScrollBarLabel.g.h"
00007
00008 class AnnotatedScrollBarLabel :
00009     public ReferenceTracker<AnnotatedScrollBarLabel, winrt::implementation::AnnotatedScrollBarLabelT, winrt::composable, winrt::composing>
00010 {
00011
00012 public:
00013     AnnotatedScrollBarLabel(const winrt::IInspectable& content, double scrollOffset);
00014     winrt::IInspectable Content();
00015     double ScrollOffset();
00016
00017 private:
00018     tracker_ref<winrt::IInspectable> m_content{ this };
00019     double m_scrollOffset{ 0.0 };
00020 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView.h Source File

  • File List
  • File Members
  • NavigationView

NavigationView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class NavigationViewItem;
00007 struct bringintoview_event_revoker;
00008
00009 #include "NavigationViewTemplateSettings.h"
00010 #include "NavigationViewItem.h"
00011 #include "NavigationView.g.h"
00012 #include "TopNavigationViewDataProvider.h"
00013 #include "NavigationViewHelper.h"
00014 #include "NavigationView.properties.h"
00015 #include "NavigationViewItemsFactory.h"
00016 #include "NavigationViewTrace.h"
00017
00018 enum class TopNavigationViewLayoutState
00019 {
00020     Uninitialized = 0,
00021     Initialized
00022 };
00023
00024 enum class NavigationRecommendedTransitionDirection
00025 {
00026     FromOverflow, // mapping to SlideNavigationTransitionInfo FromLeft
00027     FromLeft, // SlideNavigationTransitionInfo
00028     FromRight, // SlideNavigationTransitionInfo
00029     Default // Currently it's mapping to EntranceNavigationTransitionInfo and is subject to change.
00030 };
00031
00032 class NavigationView :
00033     public ReferenceTracker<NavigationView, winrt::implementation::NavigationViewT>,
00034     public NavigationViewProperties
00035 {
00036 public:
00037     NavigationView();
00038     virtual ~NavigationView();
00039
00040     // IFrameworkElementOverrides
00041     void OnApplyTemplate();
00042
00043 #pragma region IFrameworkElementOverridesHelper
00044     // IFrameworkElementOverrides (unoverridden methods provided by FrameworkElementOverridesHelper)
00045     winrt::Size MeasureOverride(winrt::Size const& availableSize);
00046 #pragma endregion
00047
00048     // IUIElement / IUIElementOverridesHelper
00049     winrt::AutomationPeer OnCreateAutomationPeer();
00050
00051     winrt::IInspectable MenuItemFromContainer(winrt::DependencyObject const& container);
00052     winrt::DependencyObject ContainerFromMenuItem(winrt::IInspectable const& item);
00053
00054     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs&  args);
00055     void OnRepeaterLoaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00056     void OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00057     void OnLoaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00058
00059     void OnSettingsInvoked();
00060
00061     winrt::UIElement FindSelectionIndicator(const winrt::IInspectable& item);
00062
00063     static void CreateAndAttachHeaderAnimation(const winrt::Visual& visual);
00064
00065     void OnPreviewKeyDown(winrt::KeyRoutedEventArgs const& args);
00066     void OnKeyDown(winrt::KeyRoutedEventArgs const& args);
00067
00068     bool IsFullScreenOrTabletMode();
00069
00070     void OnTopNavDataSourceChanged(winrt::NotifyCollectionChangedEventArgs const& args);
00071
00072     int GetNavigationViewItemCountInPrimaryList();
00073     int GetNavigationViewItemCountInTopNav();
00074     winrt::SplitView GetSplitView();
00075     TopNavigationViewDataProvider& GetTopDataProvider() { return m_topDataProvider; };
00076     void TopNavigationViewItemContentChanged();
00077
00078     void CoerceToGreaterThanZero(double& value);
00079
00080     void OnRepeaterElementPrepared(const winrt::ItemsRepeater& ir, const winrt::ItemsRepeaterElementPreparedEventArgs& args);
00081     void OnRepeaterElementClearing(const winrt::ItemsRepeater& ir, const winrt::ItemsRepeaterElementClearingEventArgs& args);
00082
00083     com_ptr<NavigationViewItemsFactory> GetNavigationViewItemsFactory() { return m_navigationViewItemsFactory; };
00084
00085     // Used in AutomationPeer
00086     winrt::ItemsRepeater LeftNavRepeater();
00087     winrt::NavigationViewItem GetSelectedContainer();
00088     winrt::ItemsRepeater GetParentItemsRepeaterForContainer(const winrt::NavigationViewItemBase& nvib);
00089     winrt::ItemsRepeater GetParentRootItemsRepeaterForContainer(const winrt::NavigationViewItemBase& nvib);
00090     winrt::IndexPath GetIndexPathForContainer(const winrt::NavigationViewItemBase& nvib);
00091
00092     // Hierarchical related functions
00093     void Expand(const winrt::NavigationViewItem& item);
00094     void Collapse(const winrt::NavigationViewItem& item);
00095
00096     // Selection handling functions
00097     void OnNavigationViewItemInvoked(const winrt::NavigationViewItem& nvi);
00098
00099     void OnNavigationViewItemClicked(const winrt::NavigationViewItem& sender);
00100
00101 private:
00102
00103     void OnNavigationViewItemBaseVisibilityPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00104
00105     // Selection handling functions
00106     void OnNavigationViewItemIsSelectedPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00107     void OnSelectionModelSelectionChanged(const winrt::SelectionModel& selectionModel, const winrt::SelectionModelSelectionChangedEventArgs& e);
00108     void OnSelectionModelChildrenRequested(const winrt::SelectionModel& selectionModel, const winrt::SelectionModelChildrenRequestedEventArgs& e);
00109     void OnSelectedItemPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00110     void ChangeSelection(const winrt::IInspectable& prevItem, const winrt::IInspectable& nextItem);
00111     void CompletePendingSelectionChange();
00112     void UpdateSelectionModelSelectionForSelectedItem(const winrt::IInspectable& selectedItem);
00113     void UpdateSelectionModelSelection(const winrt::IndexPath& ip);
00114
00115     // Item/container info functions
00116     int GetIndexFromItem(const winrt::ItemsRepeater& ir, const winrt::IInspectable& data);
00117     static winrt::IInspectable GetItemFromIndex(const winrt::ItemsRepeater& ir, int index);
00118     winrt::IndexPath GetIndexPathOfItem(const winrt::IInspectable& data);
00119     winrt::UIElement GetContainerForIndex(int index, bool inFooter);
00120     winrt::NavigationViewItemBase GetContainerForIndexPath(const winrt::IndexPath& ip, bool lastVisible = false, bool forceRealize = false);
00121     winrt::NavigationViewItemBase GetContainerForIndexPath(const winrt::UIElement& firstContainer, const winrt::IndexPath& ip, bool lastVisible, bool forceRealize);
00122     winrt::IInspectable GetChildrenForItemInIndexPath(const winrt::IndexPath& ip, bool forceRealize = false);
00123     winrt::IInspectable GetChildrenForItemInIndexPath(const winrt::UIElement& firstContainer, const winrt::IndexPath& ip, bool forceRealize = false);
00124     winrt::UIElement SearchEntireTreeForContainer(const winrt::ItemsRepeater& rootRepeater, const winrt::IInspectable& data);
00125     winrt::IndexPath SearchEntireTreeForIndexPath(const winrt::ItemsRepeater& rootRepeater, const winrt::IInspectable& data, bool isFooterRepeater);
00126     winrt::IndexPath SearchEntireTreeForIndexPath(const winrt::NavigationViewItem& parentContainer, const winrt::IInspectable& data, const winrt::IndexPath& ip);
00127
00128     winrt::ItemsRepeater GetChildRepeaterForIndexPath(const winrt::IndexPath& ip);
00129     winrt::NavigationViewItem GetParentNavigationViewItemForContainer(const winrt::NavigationViewItemBase& nvib);
00130     bool IsContainerTheSelectedItemInTheSelectionModel(const winrt::NavigationViewItemBase& nvib);
00131     int GetContainerCountInRepeater(const winrt::ItemsRepeater& ir);
00132     bool DoesRepeaterHaveRealizedContainers(const winrt::ItemsRepeater& ir);
00133     bool IsSettingsItem(winrt::IInspectable const& item);
00134     bool IsSelectionSuppressed(const winrt::IInspectable& item);
00135     bool DoesNavigationViewItemHaveChildren(const winrt::NavigationViewItem& nvi);
00136     bool IsTopLevelItem(const winrt::NavigationViewItemBase& nvib);
00137     winrt::IInspectable GetChildren(const winrt::NavigationViewItem& nvi);
00138
00139     // Hierarchy related functions
00140     void ToggleIsExpandedNavigationViewItem(const winrt::NavigationViewItem& nvi);
00141     void ChangeIsExpandedNavigationViewItem(const winrt::NavigationViewItem& nvi, bool isExpanded);
00142     void ShowHideChildrenItemsRepeater(const winrt::NavigationViewItem& nvi);
00143     winrt::NavigationViewItem FindLowestLevelContainerToDisplaySelectionIndicator();
00144     void UpdateIsChildSelectedForIndexPath(const winrt::IndexPath& ip, bool isChildSelected);
00145     void UpdateIsChildSelected(const winrt::IndexPath& prevIP, const winrt::IndexPath& nextIP);
00146     void RaiseExpandingEvent(const winrt::NavigationViewItemBase& container);
00147     void RaiseCollapsedEvent(const winrt::NavigationViewItemBase& container);
00148     void CloseFlyoutIfRequired(const winrt::NavigationViewItem& selectedItem);
00149
00150     // Force realization functions
00151     winrt::NavigationViewItemBase ResolveContainerForItem(const winrt::IInspectable& item);
00152     void RecycleContainer(const winrt::UIElement& container);
00153
00154     void OnFlyoutClosing(const winrt::IInspectable& sender, const winrt::FlyoutBaseClosingEventArgs& args);
00155
00156     void ClosePaneIfNeccessaryAfterItemIsClicked(const winrt::NavigationViewItem& selectedItem);
00157     bool NeedTopPaddingForRS5OrHigher(winrt::CoreApplicationViewTitleBar const& coreTitleBar);
00158     void OnAccessKeyInvoked(winrt::IInspectable const& sender, winrt::AccessKeyInvokedEventArgs const& args);
00159     winrt::NavigationTransitionInfo CreateNavigationTransitionInfo(NavigationRecommendedTransitionDirection recommendedTransitionDirection);
00160     NavigationRecommendedTransitionDirection GetRecommendedTransitionDirection(winrt::DependencyObject const& prev, winrt::DependencyObject const& next);
00161     inline NavigationViewTemplateSettings* GetTemplateSettings();
00162     inline bool IsNavigationViewListSingleSelectionFollowsFocus();
00163     inline void UpdateSingleSelectionFollowsFocusTemplateSetting();
00164     void OnMenuItemsSourceCollectionChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00165     void OnFooterItemsSourceCollectionChanged(const winrt::IInspectable &, const winrt::IInspectable &);
00166     void OnOverflowItemsSourceCollectionChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00167     void SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(winrt::IInspectable const& item);
00168     void ChangeSelectStatusForItem(winrt::IInspectable const& item, bool selected);
00169     void UnselectPrevItem(winrt::IInspectable const& prevItem, winrt::IInspectable const& nextItem);
00170     void UndoSelectionAndRevertSelectionTo(winrt::IInspectable const& prevSelectedItem, winrt::IInspectable const& nextItem);
00171     void CloseTopNavigationViewFlyout();
00172     void UpdateVisualState(bool useTransitions = false);
00173     void UpdateVisualStateForOverflowButton();
00174     void UpdateLeftNavigationOnlyVisualState(bool useTransitions);
00175     void UpdatePaneOverlayGroup();
00176     void UpdateNavigationViewItemsFactory();
00177     void SyncItemTemplates();
00178     bool IsRootGridOfFlyout(const winrt::DependencyObject& element);
00179     bool IsRootItemsRepeater(const winrt::DependencyObject& element);
00180     void RaiseItemInvoked(winrt::IInspectable const& item,
00181         bool isSettings,
00182         winrt::NavigationViewItemBase const& container = nullptr,
00183         NavigationRecommendedTransitionDirection recommendedDirection = NavigationRecommendedTransitionDirection::Default);
00184     void RaiseItemInvokedForNavigationViewItem(const winrt::NavigationViewItem& nvi);
00185     void HandleKeyEventForNavigationViewItem(const winrt::NavigationViewItem& nvi, const winrt::KeyRoutedEventArgs& args);
00186
00187     // This property is attached to the NavigationViewItems that are being
00188     // displayed by the repeaters in this control. It is used to keep track of the
00189     // revokers for NavigationViewItem events and allows them to get revoked when
00190     // the item gets cleaned up
00191     inline static GlobalDependencyProperty s_NavigationViewItemBaseRevokersProperty{ nullptr };
00192     void SetNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase& nvib);
00193     void SetNavigationViewItemRevokers(const winrt::NavigationViewItem& nvi);
00194     void ClearNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase& nvib);
00195     void ClearAllNavigationViewItemBaseRevokers() noexcept;
00196     void RevokeNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase& nvib);
00197     std::set<winrt::NavigationViewItemBase> m_itemsWithRevokerObjects;
00198
00199     void InvalidateTopNavPrimaryLayout();
00200     // Measure functions for top navigation
00201     float MeasureTopNavigationViewDesiredWidth(winrt::Size const& availableSize);
00202     float MeasureTopNavMenuItemsHostDesiredWidth(winrt::Size const& availableSize);
00203     float GetTopNavigationViewActualWidth();
00204
00205     bool HasTopNavigationViewItemNotInPrimaryList();
00206     void HandleTopNavigationMeasureOverride(winrt::Size const& availableSize);
00207     void HandleTopNavigationMeasureOverrideNormal(const winrt::Windows::Foundation::Size & availableSize);
00208     void HandleTopNavigationMeasureOverrideOverflow(const winrt::Windows::Foundation::Size & availableSize);
00209     void SetOverflowButtonVisibility(winrt::Visibility const& visibility);
00210     void SelectOverflowItem(winrt::IInspectable const& item, winrt::IndexPath const& ip);
00211     void SelectandMoveOverflowItem(winrt::IInspectable const& selectedItem, winrt::IndexPath const& selectedIndex, bool closeFlyout);
00212
00213     void ResetAndRearrangeTopNavItems(winrt::Size const& availableSize);
00214     void ArrangeTopNavItems(winrt::Size const& availableSize);
00215
00216     void ShrinkTopNavigationSize(float desiredWidth, winrt::Size const& availableSize);
00217
00218     std::vector<int> FindMovableItemsRecoverToPrimaryList(float availableWidth, std::vector<int> const& includeItems);
00219     std::vector<int> FindMovableItemsToBeRemovedFromPrimaryList(float widthToBeRemoved, std::vector<int> const& excludeItems);
00220     std::vector<int> FindMovableItemsBeyondAvailableWidth(float availableWidth);
00221     void KeepAtLeastOneItemInPrimaryList(std::vector<int>& itemInPrimaryToBeRemoved, bool shouldKeepFirst);
00222     void UpdateTopNavigationWidthCache();
00223
00224     int GetSelectedItemIndex();
00225     double GetPaneToggleButtonWidth();
00226     double GetPaneToggleButtonHeight();
00227
00228     bool BumperNavigation(int offset);
00229     bool SelectSelectableItemWithOffset(int startIndex, int offset, winrt::ItemsRepeater const& repeater, int repeaterCollectionSize);
00230
00231     bool IsTopNavigationView();
00232     bool IsTopPrimaryListVisible();
00233
00234     void CreateAndHookEventsToSettings();
00235     void OnIsPaneOpenChanged();
00236     void UpdatePaneButtonsWidths();
00237     void UpdateHeaderVisibility();
00238     void UpdateHeaderVisibility(winrt::NavigationViewDisplayMode displayMode);
00239     void UpdatePaneToggleButtonVisibility();
00240     void UpdatePaneDisplayMode();
00241     void UpdatePaneDisplayMode(winrt::NavigationViewPaneDisplayMode oldDisplayMode, winrt::NavigationViewPaneDisplayMode newDisplayMode);
00242     void UpdatePaneVisibility();
00243     void UpdateContentBindingsForPaneDisplayMode();
00244     void UpdatePaneTabFocusNavigation();
00245     void UpdatePaneToggleSize();
00246     void UpdateBackAndCloseButtonsVisibility();
00247     void UpdatePaneTitleMargins();
00248     void UpdateLeftRepeaterItemSource(const winrt::IInspectable& items);
00249     void UpdateTopNavRepeatersItemSource(const winrt::IInspectable& items);
00250     void UpdateTopNavPrimaryRepeaterItemsSource(const winrt::IInspectable& items);
00251     void UpdateTopNavOverflowRepeaterItemsSource(const winrt::IInspectable& items);
00252     static void UpdateItemsRepeaterItemsSource(const winrt::ItemsRepeater& listView, const winrt::IInspectable& itemsSource);
00253     void UpdateSelectionForMenuItems();
00254     bool UpdateSelectedItemFromMenuItems(const winrt::impl::com_ref<winrt::IVector<winrt::IInspectable>>& menuItems, bool foundFirstSelected = false);
00255     bool m_InitialNonForcedModeUpdate{ true };
00256
00257     void UpdateRepeaterItemsSource(bool forceSelectionModelUpdate);
00258     void UpdateFooterRepeaterItemsSource(bool sourceCollectionReseted, bool sourceCollectionChanged);
00259
00260     void OnSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00261     void OnItemsContainerSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00262     void OnLayoutUpdated(const winrt::IInspectable& sender, const winrt::IInspectable& e);
00263     void UpdateAdaptiveLayout(double width, bool forceSetDisplayMode = false);
00264     void UpdateOpenPaneLength(double width);
00265     void UpdatePaneLayout();
00266     void SetDisplayMode(const winrt::NavigationViewDisplayMode& displayMode, bool forceSetDisplayMode = false);
00267
00268     NavigationViewVisualStateDisplayMode GetVisualStateDisplayMode(const winrt::NavigationViewDisplayMode& displayMode);
00269     void UpdateVisualStateForDisplayModeGroup(const winrt::NavigationViewDisplayMode& displayMode);
00270
00271     // Event Handlers
00272     void OnPaneToggleButtonClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00273     void OnPaneSearchButtonClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00274     void OnPaneTitleHolderSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00275
00276     void OnNavigationViewItemKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args);
00277     void OnRepeaterGettingFocus(const winrt::IInspectable& sender, const winrt::GettingFocusEventArgs& args);
00278     void OnNavigationViewItemOnGotFocus(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& e);
00279     void OnNavigationViewItemExpandedPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00280
00281     void RaiseSelectionChangedEvent(winrt::IInspectable const& nextItem,
00282         bool isSettingsItem,
00283         NavigationRecommendedTransitionDirection recommendedDirection = NavigationRecommendedTransitionDirection::Default);
00284
00285     void OnTitleBarMetricsChanged(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00286     void OnTitleBarIsVisibleChanged(const winrt::CoreApplicationViewTitleBar& sender, const winrt::IInspectable& args);
00287     void UpdateTitleBarPadding();
00288
00289     void OnAutoSuggestBoxQuerySubmitted(const winrt::AutoSuggestBox& sender, const winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs& args);
00290
00291     void RaiseDisplayModeChanged(const winrt::NavigationViewDisplayMode& displayMode);
00292     void AnimateSelectionChanged(const winrt::IInspectable& currentItem);
00293     void AnimateSelectionChangedToItem(const winrt::IInspectable& selectedItem);
00294     void PlayIndicatorAnimations(const winrt::UIElement& indicator, float yFrom, float yTo, winrt::Size beginSize, winrt::Size endSize, bool isOutgoing);
00295     void PlayIndicatorNonSameLevelAnimations(const winrt::UIElement& indicator, bool isOutgoing, bool fromTop);
00296     void PlayIndicatorNonSameLevelTopPrimaryAnimation(const winrt::UIElement& indicator, bool isOutgoing);
00297     void OnAnimationComplete(const winrt::IInspectable& sender, const winrt::CompositionBatchCompletedEventArgs& args);
00298     void ResetElementAnimationProperties(const winrt::UIElement& element, float desiredOpacity);
00299     winrt::NavigationViewItem NavigationViewItemOrSettingsContentFromData(const winrt::IInspectable& data);
00300     winrt::NavigationViewItemBase NavigationViewItemBaseOrSettingsContentFromData(const winrt::IInspectable& data);
00301
00302     // Cache these objects for the view as they are expensive to query via GetForCurrentView() calls.
00303     winrt::ViewManagement::ApplicationView m_applicationView{ nullptr };
00304     winrt::ViewManagement::UIViewSettings m_uiViewSettings{ nullptr };
00305
00306     template<typename T> T GetContainerForData(const winrt::IInspectable& data);
00307
00308     void OpenPane();
00309     void ClosePane();
00310     bool AttemptClosePaneLightly();
00311     void SetPaneToggleButtonAutomationName();
00312     void SwapPaneHeaderContent(tracker_ref<winrt::ContentControl> newParent, tracker_ref<winrt::ContentControl> oldParent, winrt::hstring const& propertyPathName);
00313     void UpdateSettingsItemToolTip();
00314     void UpdatePaneTitleFrameworkElementParents();
00315     std::function<void ()> SetPaneTitleFrameworkElementParent(const winrt::ContentControl& parent, const winrt::FrameworkElement& paneTitle, bool shouldNotContainPaneTitle);
00316
00317     void OnSplitViewClosedCompactChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00318     void OnSplitViewPaneClosed(const winrt::DependencyObject& sender, const winrt::IInspectable& obj);
00319     void OnSplitViewPaneClosing(const winrt::DependencyObject& sender, const winrt::SplitViewPaneClosingEventArgs& args);
00320     void OnSplitViewPaneOpened(const winrt::DependencyObject& sender, const winrt::IInspectable& obj);
00321     void OnSplitViewPaneOpening(const winrt::DependencyObject& sender, const winrt::IInspectable& obj);
00322     void UpdateIsClosedCompact();
00323
00324     void OnBackButtonClicked(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00325
00326     void OnSelectedItemLayoutUpdated(const winrt::IInspectable& sender, const winrt::IInspectable& obj);
00327
00328     bool IsOverlay();
00329     bool IsLightDismissible();
00330     bool ShouldShowBackButton();
00331     bool ShouldShowCloseButton();
00332     bool ShouldShowBackOrCloseButton();
00333
00334     void UnhookEventsAndClearFields(bool isFromDestructor = false);
00335
00336     bool NeedRearrangeOfTopElementsAfterOverflowSelectionChanged(int selectedOriginalIndex);
00337     void KeyboardFocusFirstItemFromItem(const winrt::NavigationViewItemBase& nvib);
00338     void KeyboardFocusLastItemFromItem(const winrt::NavigationViewItemBase& nvib);
00339     void FocusNextDownItem(const winrt::NavigationViewItem& nvi, const winrt::KeyRoutedEventArgs& args);
00340     void FocusNextUpItem(const winrt::NavigationViewItem& nvi, const winrt::KeyRoutedEventArgs& args);
00341     void ApplyCustomMenuItemContainerStyling(const winrt::NavigationViewItemBase& nvib, const winrt::ItemsRepeater& ir, int index);
00342
00343     void SetDropShadow();
00344     void UnsetDropShadow();
00345     void ShadowCasterEaseOutStoryboard_Completed(const winrt::Grid& shadowCaster);
00346
00347     bool IsVisible(const winrt::DependencyObject& obj);
00348
00349     com_ptr<NavigationViewItemsFactory> m_navigationViewItemsFactory{ nullptr };
00350
00351     // Visual components
00352     tracker_ref<winrt::Button> m_paneToggleButton{ this };
00353     tracker_ref<winrt::SplitView> m_rootSplitView{ this };
00354     tracker_ref<winrt::NavigationViewItem> m_settingsItem{ this };
00355     tracker_ref<winrt::RowDefinition> m_itemsContainerRow{ this };
00356     tracker_ref<winrt::FrameworkElement> m_menuItemsScrollViewer{ this };
00357     tracker_ref<winrt::FrameworkElement> m_footerItemsScrollViewer{ this };
00358     tracker_ref<winrt::UIElement> m_paneContentGrid{ this };
00359     tracker_ref<winrt::ColumnDefinition> m_paneToggleButtonIconGridColumn{ this };
00360     tracker_ref<winrt::FrameworkElement> m_paneTitleHolderFrameworkElement{ this };
00361     tracker_ref<winrt::FrameworkElement> m_paneTitleFrameworkElement{ this };
00362     tracker_ref<winrt::Button> m_paneSearchButton{ this };
00363     tracker_ref<winrt::Button> m_backButton{ this };
00364     tracker_ref<winrt::Button> m_closeButton{ this };
00365     tracker_ref<winrt::ItemsRepeater> m_leftNavRepeater{ this };
00366     tracker_ref<winrt::ItemsRepeater> m_topNavRepeater{ this };
00367     tracker_ref<winrt::ItemsRepeater> m_leftNavFooterMenuRepeater{ this };
00368     tracker_ref<winrt::ItemsRepeater> m_topNavFooterMenuRepeater{ this };
00369     tracker_ref<winrt::Button> m_topNavOverflowButton{ this };
00370     tracker_ref<winrt::ItemsRepeater> m_topNavRepeaterOverflowView{ this };
00371     tracker_ref<winrt::Grid> m_topNavGrid{ this };
00372     tracker_ref<winrt::Border> m_topNavContentOverlayAreaGrid{ this };
00373     tracker_ref<winrt::Grid> m_shadowCaster{ this };
00374     tracker_ref<winrt::Storyboard> m_shadowCasterEaseOutStoryboard{ this };
00375
00376     // Indicator animations
00377     tracker_ref<winrt::UIElement> m_prevIndicator{ this };
00378     tracker_ref<winrt::UIElement> m_nextIndicator{ this };
00379     tracker_ref<winrt::UIElement> m_activeIndicator{ this };
00380     tracker_ref<winrt::IInspectable> m_lastSelectedItemPendingAnimationInTopNav{ this };
00381
00382     tracker_ref<winrt::FrameworkElement> m_togglePaneTopPadding{ this };
00383     tracker_ref<winrt::FrameworkElement> m_contentPaneTopPadding{ this };
00384     tracker_ref<winrt::FrameworkElement> m_contentLeftPadding{ this };
00385
00386     tracker_ref<winrt::CoreApplicationViewTitleBar> m_coreTitleBar{ this };
00387
00388     tracker_ref<winrt::ContentControl> m_leftNavPaneAutoSuggestBoxPresenter{ this };
00389     tracker_ref<winrt::ContentControl> m_topNavPaneAutoSuggestBoxPresenter{ this };
00390
00391     tracker_ref<winrt::ContentControl> m_leftNavPaneHeaderContentBorder{ this };
00392     tracker_ref<winrt::ContentControl> m_leftNavPaneCustomContentBorder{ this };
00393     tracker_ref<winrt::ContentControl> m_leftNavFooterContentBorder{ this };
00394
00395     tracker_ref<winrt::ContentControl> m_paneHeaderOnTopPane{ this };
00396     tracker_ref<winrt::ContentControl> m_paneTitleOnTopPane{ this };
00397     tracker_ref<winrt::ContentControl> m_paneCustomContentOnTopPane{ this };
00398     tracker_ref<winrt::ContentControl> m_paneFooterOnTopPane{ this };
00399     tracker_ref<winrt::ContentControl> m_paneTitlePresenter{ this };
00400
00401     tracker_ref<winrt::ColumnDefinition> m_paneHeaderCloseButtonColumn{ this };
00402     tracker_ref<winrt::ColumnDefinition> m_paneHeaderToggleButtonColumn{ this };
00403     tracker_ref<winrt::RowDefinition> m_paneHeaderContentBorderRow{ this };
00404     tracker_ref<winrt::FrameworkElement> m_itemsContainer{ this };
00405
00406     tracker_ref<winrt::NavigationViewItem> m_lastItemExpandedIntoFlyout{ this };
00407
00408     // Event Tokens
00409     winrt::Button::Click_revoker m_paneToggleButtonClickRevoker{};
00410     winrt::Button::Click_revoker m_paneSearchButtonClickRevoker{};
00411     winrt::CoreApplicationViewTitleBar::LayoutMetricsChanged_revoker m_titleBarMetricsChangedRevoker{};
00412     winrt::CoreApplicationViewTitleBar::IsVisibleChanged_revoker m_titleBarIsVisibleChangedRevoker{};
00413     winrt::Button::Click_revoker m_backButtonClickedRevoker{};
00414     winrt::Button::Click_revoker m_closeButtonClickedRevoker{};
00415     PropertyChanged_revoker m_splitViewIsPaneOpenChangedRevoker{};
00416     PropertyChanged_revoker m_splitViewDisplayModeChangedRevoker{};
00417     winrt::SplitView::PaneClosed_revoker m_splitViewPaneClosedRevoker{};
00418     winrt::SplitView::PaneClosing_revoker m_splitViewPaneClosingRevoker{};
00419     winrt::SplitView::PaneOpened_revoker m_splitViewPaneOpenedRevoker{};
00420     winrt::SplitView::PaneOpening_revoker m_splitViewPaneOpeningRevoker{};
00421     winrt::FrameworkElement::LayoutUpdated_revoker m_layoutUpdatedToken{};
00422     winrt::UIElement::AccessKeyInvoked_revoker m_accessKeyInvokedRevoker{};
00423     winrt::FrameworkElement::SizeChanged_revoker m_paneTitleHolderFrameworkElementSizeChangedRevoker{};
00424     winrt::FrameworkElement::SizeChanged_revoker m_itemsContainerSizeChangedRevoker{};
00425     winrt::AutoSuggestBox::QuerySubmitted_revoker m_autoSuggestBoxQuerySubmittedRevoker{};
00426
00427     winrt::ItemsRepeater::ElementPrepared_revoker m_leftNavItemsRepeaterElementPreparedRevoker{};
00428     winrt::ItemsRepeater::ElementClearing_revoker m_leftNavItemsRepeaterElementClearingRevoker{};
00429     winrt::ItemsRepeater::Loaded_revoker m_leftNavRepeaterLoadedRevoker{};
00430     winrt::ItemsRepeater::GettingFocus_revoker m_leftNavRepeaterGettingFocusRevoker{};
00431
00432     winrt::ItemsRepeater::ElementPrepared_revoker m_topNavItemsRepeaterElementPreparedRevoker{};
00433     winrt::ItemsRepeater::ElementClearing_revoker m_topNavItemsRepeaterElementClearingRevoker{};
00434     winrt::ItemsRepeater::Loaded_revoker m_topNavRepeaterLoadedRevoker{};
00435     winrt::ItemsRepeater::GettingFocus_revoker m_topNavRepeaterGettingFocusRevoker{};
00436
00437     winrt::ItemsRepeater::ElementPrepared_revoker m_leftNavFooterMenuItemsRepeaterElementPreparedRevoker{};
00438     winrt::ItemsRepeater::ElementClearing_revoker m_leftNavFooterMenuItemsRepeaterElementClearingRevoker{};
00439     winrt::ItemsRepeater::Loaded_revoker m_leftNavFooterMenuRepeaterLoadedRevoker{};
00440     winrt::ItemsRepeater::GettingFocus_revoker m_leftNavFooterMenuRepeaterGettingFocusRevoker{};
00441
00442     winrt::ItemsRepeater::ElementPrepared_revoker m_topNavFooterMenuItemsRepeaterElementPreparedRevoker{};
00443     winrt::ItemsRepeater::ElementClearing_revoker m_topNavFooterMenuItemsRepeaterElementClearingRevoker{};
00444     winrt::ItemsRepeater::Loaded_revoker m_topNavFooterMenuRepeaterLoadedRevoker{};
00445     winrt::ItemsRepeater::GettingFocus_revoker m_topNavFooterMenuRepeaterGettingFocusRevoker{};
00446
00447     winrt::ItemsRepeater::ElementPrepared_revoker m_topNavOverflowItemsRepeaterElementPreparedRevoker{};
00448     winrt::ItemsRepeater::ElementClearing_revoker m_topNavOverflowItemsRepeaterElementClearingRevoker{};
00449
00450     winrt::SelectionModel::SelectionChanged_revoker m_selectionChangedRevoker{};
00451     winrt::SelectionModel::ChildrenRequested_revoker m_childrenRequestedRevoker{};
00452
00453     winrt::ItemsSourceView::CollectionChanged_revoker m_menuItemsCollectionChangedRevoker{};
00454     winrt::ItemsSourceView::CollectionChanged_revoker m_footerItemsCollectionChangedRevoker{};
00455
00456     winrt::ItemsSourceView::CollectionChanged_revoker m_topNavOverflowItemsCollectionChangedRevoker{};
00457
00458     winrt::FlyoutBase::Closing_revoker m_flyoutClosingRevoker{};
00459
00460     winrt::Storyboard::Completed_revoker m_shadowCasterEaseOutStoryboardRevoker{};
00461
00462     winrt::NavigationViewItem::LayoutUpdated_revoker m_selectedItemLayoutUpdatedRevoker{};
00463
00464     bool m_wasForceClosed{ false };
00465     bool m_isClosedCompact{ false };
00466     bool m_blockNextClosingEvent{ false };
00467     bool m_initialListSizeStateSet{ false };
00468
00469     TopNavigationViewDataProvider m_topDataProvider{ this };
00470
00471     winrt::SelectionModel m_selectionModel{};
00472     winrt::IVector<winrt::IInspectable> m_selectionModelSource{};
00473
00474     winrt::ItemsSourceView m_menuItemsSource{ nullptr };
00475     winrt::ItemsSourceView m_footerItemsSource{ nullptr };
00476
00477     bool m_isSelectionChangedPending{ false };
00478     winrt::IInspectable m_pendingSelectionChangedItem{ nullptr };
00479     NavigationRecommendedTransitionDirection m_pendingSelectionChangedDirection{ NavigationRecommendedTransitionDirection::Default };
00480
00481     bool m_appliedTemplate{ false };
00482
00483     // Identifies whenever a call is the result of OnApplyTemplate
00484     bool m_fromOnApplyTemplate{ false };
00485
00486     // Used to defer updating the SplitView displaymode property
00487     bool m_updateVisualStateForDisplayModeFromOnLoaded{ false };
00488
00489     // flag is used to stop recursive call. eg:
00490     // Customer select an item from SelectedItem property->ChangeSelection update ListView->LIstView raise OnSelectChange(we want stop here)->change property do do animation again.
00491     // Customer clicked listview->listview raised OnSelectChange->SelectedItem property changed->ChangeSelection->Undo the selection by SelectedItem(prevItem) (we want it stop here)->ChangeSelection again ->...
00492     bool m_shouldIgnoreNextSelectionChange{ false };
00493     // A flag to track that the selectionchange is caused by selection a item in topnav overflow menu
00494     bool m_selectionChangeFromOverflowMenu{ false };
00495     // Flag indicating whether selection change should raise item invoked. This is needed to be able to raise ItemInvoked before SelectionChanged while SelectedItem should point to the clicked item
00496     bool m_shouldRaiseItemInvokedAfterSelection{ false };
00497
00498     TopNavigationViewLayoutState m_topNavigationMode{ TopNavigationViewLayoutState::Uninitialized };
00499
00500     // A threshold to stop recovery from overflow to normal happens immediately on resize.
00501     float m_topNavigationRecoveryGracePeriodWidth{ 5.f };
00502
00503     // There are three ways to change IsPaneOpen:
00504     // 1, customer call IsPaneOpen=true/false directly or nav.IsPaneOpen is binding with a variable and the value is changed.
00505     // 2, customer click ToggleButton or splitView.IsPaneOpen->nav.IsPaneOpen changed because of window resize
00506     // 3, customer changed PaneDisplayMode.
00507     // 2 and 3 are internal implementation and will call by ClosePane/OpenPane. the flag is to indicate 1 if it's false
00508     bool m_isOpenPaneForInteraction{ false };
00509
00510     bool m_moveTopNavOverflowItemOnFlyoutClose{ false };
00511
00512     bool m_shouldIgnoreUIASelectionRaiseAsExpandCollapseWillRaise{ false };
00513
00514     bool m_OrientationChangedPendingAnimation{ false };
00515
00516     bool m_TabKeyPrecedesFocusChange{ false };
00517
00518     bool m_isLeftPaneTitleEmpty{ false };
00519
00520     double m_OpenPaneLength{ 320.0 };
00521 };
00522
Generated on Sun Dec 1 2024 20:52:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedFindVisualSource_AnimatedVisual Member List

This is the complete list of members for AnimatedFindVisualSource_AnimatedVisual, including all inherited members.
_reusableExpressionAnimation(compositor.CreateExpressionAnimation()) | AnimatedFindVisualSource_AnimatedVisual | [inline]
AnimatedFindVisualSource_AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedFindVisualSource_AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CanvasGeometryToIGeometrySource2D(winrt::com_ptr< CanvasGeometry > geo) | AnimatedFindVisualSource_AnimatedVisual | [inline, private, static]
Close() | AnimatedFindVisualSource_AnimatedVisual | [inline]
ContainerShape() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_0() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix) | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_1() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_2() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_3() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_4() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_5() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
Duration() const | AnimatedFindVisualSource_AnimatedVisual | [inline]
Ellipse_14p188() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
Geometry() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
InsetClip_0() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedFindVisualSource_AnimatedVisual | [inline, static]
OffsetVector2Animation() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
PathGeometry() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
Root() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
RootProgress() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
RootVisual() const | AnimatedFindVisualSource_AnimatedVisual | [inline]
ScalarAnimation_1_to_1() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_1() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
Size() const | AnimatedFindVisualSource_AnimatedVisual | [inline]
SpriteShape_0() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
SpriteShape_1() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedFindVisualSource_AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
StrokeThicknessScalarAnimation_2p5_to_2p5() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
t0ScalarAnimation_0_to_1() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
t1ScalarAnimation_0_to_1() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
t2ScalarAnimation_0_to_1() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
ThemeColor_Foreground() | AnimatedFindVisualSource_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:52:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/GridViewPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

GridViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     [TopLevelTestPage(Name="GridView", Icon="GridView.png")]
00009     public sealed partial class GridViewPage : TestPage
00010     {
00011         public GridViewPage()
00012         {
00013             this.InitializeComponent();
00014
00015             navigateToGridView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewBasePage), true /*use GridView*/); };
00016             navigateToGroupedGridView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(GroupedListViewBasePage), true /*use GridView*/); };
00017             navigateToNestedGridViews.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NestedGridViewsPage)); };
00018         }
00019     }
00020 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementManager.h Source File

  • File List
  • File Members
  • Repeater

ElementManager.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "OrientationBasedMeasures.h"
00007
00008 // Internal component for layout to keep track of elements and
00009 // help with collection changes.
00010 class ElementManager final
00011 {
00012
00013 public:
00014     ElementManager(const ITrackerHandleManager* owner, bool useLayoutBounds = true) : m_owner(owner), m_useLayoutBounds(useLayoutBounds) { }
00015
00016     void SetContext(const winrt::VirtualizingLayoutContext& virtualContext);
00017
00018     void OnBeginMeasure(const ScrollOrientation& orientation);
00019
00020     int GetFirstRealizedDataIndex() const;
00021     int GetRealizedElementCount() const ;
00022     winrt::UIElement GetAt(int realizedIndex);
00023
00024     void Add(const winrt::UIElement& element, int dataIndex);
00025     void Insert(int realizedIndex, int dataIndex, const winrt::UIElement& element);
00026     void ClearRealizedRange(int realizedIndex, int count);
00027     void DiscardElementsOutsideWindow(bool forward, int startIndex);
00028     void ClearRealizedRange();
00029
00030     winrt::Rect GetLayoutBoundsForDataIndex(int dataIndex) const;
00031     void SetLayoutBoundsForDataIndex(int dataIndex, const winrt::Rect& bounds);
00032
00033     winrt::Rect GetLayoutBoundsForRealizedIndex(int realizedIndex) const;
00034     void SetLayoutBoundsForRealizedIndex(int realizedIndex, const winrt::Rect& bounds);
00035
00036     bool IsDataIndexRealized(int index) const;
00037     bool IsIndexValidInData(int currentIndex) const;
00038
00039     winrt::UIElement GetRealizedElement(int dataIndex);
00040     void EnsureElementRealized(bool forward, int dataIndex, const wstring_view& layoutId);
00041
00042     bool IsWindowConnected(const winrt::Rect& window, const ScrollOrientation& orientation, bool scrollOrientationSameAsFlow) const;
00043     void DataSourceChanged(const winrt::IInspectable& source, winrt::NotifyCollectionChangedEventArgs const& args);
00044
00045     // we do not want copies of this type
00046     ElementManager(const ElementManager& that) = delete;
00047     ElementManager& ElementManager::operator=(const ElementManager& other) = delete;
00048
00049     int GetElementDataIndex(const winrt::UIElement& suggestedAnchor) const;
00050     int GetDataIndexFromRealizedRangeIndex(int rangeIndex) const;
00051     int GetRealizedRangeIndexFromDataIndex(int dataIndex) const;
00052
00053 private:
00054     void DiscardElementsOutsideWindow(const winrt::Rect& window, const ScrollOrientation& orientation);
00055     static bool Intersects(const winrt::Rect& lhs, const winrt::Rect& rhs, const ScrollOrientation& orientation);
00056
00057     void OnItemsAdded(int index, int count);
00058     void OnItemsRemoved(int index, int count);
00059
00060     bool IsVirtualizingContext() const;
00061
00062     const ITrackerHandleManager* m_owner;
00063
00064     bool m_useLayoutBounds{ false };
00065     std::vector<tracker_ref<winrt::UIElement>> m_realizedElements;
00066     std::vector<winrt::Rect> m_realizedElementLayoutBounds;
00067     int m_firstRealizedDataIndex{ -1 };
00068     winrt::VirtualizingLayoutContext m_context{ nullptr };
00069 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayer.idl Source File

  • File List
  • File Members
  • AnimatedVisualPlayer

AnimatedVisualPlayer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 interface IAnimatedVisual
00007     requires Windows.Foundation.IClosable
00008 {
00009     Microsoft.UI.Composition.Visual RootVisual{ get; };
00010     Windows.Foundation.Numerics.Vector2 Size{ get; };
00011     Windows.Foundation.TimeSpan Duration{ get; };
00012 };
00013
00014 [MUX_PUBLIC_V3]
00015 [webhosthidden]
00016 interface IAnimatedVisual2 requires IAnimatedVisual
00017 {
00018     void CreateAnimations();
00019     void DestroyAnimations();
00020 };
00021
00022 [MUX_PUBLIC]
00023 [webhosthidden]
00024 interface IAnimatedVisualSource
00025 {
00026     IAnimatedVisual TryCreateAnimatedVisual(
00027         Microsoft.UI.Composition.Compositor compositor,
00028         out Object diagnostics);
00029 };
00030
00031 [MUX_PUBLIC]
00032 [webhosthidden]
00033 interface IDynamicAnimatedVisualSource
00034     requires IAnimatedVisualSource
00035 {
00036     event Windows.Foundation.TypedEventHandler<IDynamicAnimatedVisualSource, Object> AnimatedVisualInvalidated;
00037 };
00038
00039 [MUX_PUBLIC_V3]
00040 [webhosthidden]
00041 interface IAnimatedVisualSource3
00042 {
00043     IAnimatedVisual2 TryCreateAnimatedVisual(
00044         Microsoft.UI.Composition.Compositor compositor,
00045         out Object diagnostics,
00046         Boolean createAnimations);
00047 };
00048
00049 [MUX_INTERNAL]
00050 [webhosthidden]
00051 interface ISelfPlayingAnimatedVisual
00052     requires IAnimatedVisual
00053 {
00054     void Pause();
00055     Windows.Foundation.IAsyncAction PlayAsync(Double fromProgress, Double toProgress, Boolean looped);
00056     void Resume();
00057     void Stop();
00058     void SetPlaybackRate(Double playbackRate);
00059     void SetProgress(Double progress);
00060     void SetProgressObject(Microsoft.UI.Composition.CompositionPropertySet compositionPropertySet);
00061     void SetSize(Windows.Foundation.Size size);
00062 };
00063
00064 [MUX_PUBLIC_V3]
00065 [webhosthidden]
00066 enum PlayerAnimationOptimization
00067 {
00068     Latency,
00069     Resources
00070 };
00071
00072 [MUX_PUBLIC]
00073 [webhosthidden]
00074 [contentproperty("Source")]
00075 unsealed runtimeclass AnimatedVisualPlayer
00076     : Microsoft.UI.Xaml.FrameworkElement
00077 {
00078     AnimatedVisualPlayer();
00079
00080     Object Diagnostics{ get; };
00081     Windows.Foundation.TimeSpan Duration{ get; };
00082
00083     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00084     IAnimatedVisualSource Source;
00085     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00086     Microsoft.UI.Xaml.DataTemplate FallbackContent;
00087
00088     [MUX_DEFAULT_VALUE("true")]
00089     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00090     Boolean AutoPlay;
00091     Boolean IsAnimatedVisualLoaded{ get; };
00092     Boolean IsPlaying{ get; };
00093     [MUX_DEFAULT_VALUE("1")]
00094     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00095     Double PlaybackRate;
00096
00097     [MUX_PUBLIC_V3]
00098     {
00099         [MUX_DEFAULT_VALUE("winrt::PlayerAnimationOptimization::Latency")]
00100         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00101         PlayerAnimationOptimization AnimationOptimization;
00102     }
00103
00104     Microsoft.UI.Composition.CompositionObject ProgressObject{ get; };
00105
00106     [MUX_DEFAULT_VALUE("winrt::Stretch::Uniform")]
00107     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00108     Microsoft.UI.Xaml.Media.Stretch Stretch;
00109
00110     void Pause();
00111     Windows.Foundation.IAsyncAction PlayAsync(Double fromProgress, Double toProgress, Boolean looped);
00112     void Resume();
00113     void SetProgress(Double progress);
00114     void Stop();
00115
00116     // Dependency properties
00117     static Microsoft.UI.Xaml.DependencyProperty AutoPlayProperty{ get; };
00118     static Microsoft.UI.Xaml.DependencyProperty DiagnosticsProperty{ get; };
00119     static Microsoft.UI.Xaml.DependencyProperty DurationProperty{ get; };
00120     static Microsoft.UI.Xaml.DependencyProperty FallbackContentProperty{ get; };
00121     static Microsoft.UI.Xaml.DependencyProperty IsAnimatedVisualLoadedProperty{ get; };
00122     static Microsoft.UI.Xaml.DependencyProperty IsPlayingProperty{ get; };
00123     static Microsoft.UI.Xaml.DependencyProperty PlaybackRateProperty{ get; };
00124     static Microsoft.UI.Xaml.DependencyProperty SourceProperty{ get; };
00125     static Microsoft.UI.Xaml.DependencyProperty StretchProperty{ get; };
00126
00127     [MUX_PUBLIC_V3]
00128     {
00129         static Microsoft.UI.Xaml.DependencyProperty AnimationOptimizationProperty{ get; };
00130     }
00131 }
00132
00133 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooks.idl Source File

  • File List
  • File Members
  • SwipeControl

SwipeTestHooks.idl

Go to the documentation of this file.
00001 namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [default_interface]
00006 [webhosthidden]
00007 runtimeclass SwipeTestHooks
00008 {
00009     static MU_XC_NAMESPACE.SwipeControl GetLastInteractedWithSwipeControl();
00010     static Boolean GetIsOpen(MU_XC_NAMESPACE.SwipeControl swipeControl);
00011     static Boolean GetIsIdle(MU_XC_NAMESPACE.SwipeControl swipeControl);
00012     static event Windows.Foundation.TypedEventHandler<Object, Object> LastInteractedWithSwipeControlChanged;
00013     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.SwipeControl, Object> OpenedStatusChanged;
00014     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.SwipeControl, Object> IdleStatusChanged;
00015 }
00016
00017 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControlTrace.h Source File

  • File List
  • File Members
  • SwipeControl

SwipeControlTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsSwipeControlTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_SWIPECONTROL || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsSwipeControlVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_SWIPECONTROL || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsSwipeControlPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_SWIPECONTROL || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define SWIPECONTROL_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 SwipeControlTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define SWIPECONTROL_TRACE_INFO(sender, message, ...) \
00036 if (IsSwipeControlTracingEnabled()) \
00037 { \
00038     SWIPECONTROL_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (SwipeControlTrace::s_IsDebugOutputEnabled || SwipeControlTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     SWIPECONTROL_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define SWIPECONTROL_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 SwipeControlTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define SWIPECONTROL_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsSwipeControlVerboseTracingEnabled()) \
00050 { \
00051     SWIPECONTROL_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (SwipeControlTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     SWIPECONTROL_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define SWIPECONTROL_TRACE_PERF(info) \
00059 if (IsSwipeControlPerfTracingEnabled()) \
00060 { \
00061     SwipeControlTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define SWIPECONTROL_TRACE_INFO_DBG(sender, message, ...)    SWIPECONTROL_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define SWIPECONTROL_TRACE_VERBOSE_DBG(sender, message, ...) SWIPECONTROL_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define SWIPECONTROL_TRACE_PERF_DBG(info)                    SWIPECONTROL_TRACE_PERF(info)
00068 #else
00069 #define SWIPECONTROL_TRACE_INFO_DBG(sender, message, ...)
00070 #define SWIPECONTROL_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define SWIPECONTROL_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class SwipeControlTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[256]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "SwipeControlInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_SWIPECONTROL),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"SwipeControl") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[256]{};
00121         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00122         {
00123             if (includeTraceLogging)
00124             {
00125                 // TraceViewers
00126                 // http://toolbox/pef
00127                 // http://fastetw/index.aspx
00128                 TraceLoggingWrite(
00129                     g_hLoggingProvider,
00130                     "SwipeControlVerbose" /* eventName */,
00131                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00132                     TraceLoggingKeyword(KEYWORD_SWIPECONTROL),
00133                     TraceLoggingWideString(buffer, "Message"));
00134             }
00135
00136             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00137             {
00138                 OutputDebugStringW(buffer);
00139             }
00140
00141             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00142
00143             if (globalTestHooks &&
00144                 (globalTestHooks->GetLoggingLevelForType(L"SwipeControl") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00145             {
00146                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00147             }
00148         }
00149         va_end(args);
00150     }
00151
00152     static void TracePerfInfo(PCWSTR info) noexcept
00153     {
00154         // TraceViewers
00155         // http://toolbox/pef
00156         // http://fastetw/index.aspx
00157         TraceLoggingWrite(
00158             g_hPerfProvider,
00159             "SwipeControlPerf" /* eventName */,
00160             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00161             TraceLoggingKeyword(KEYWORD_SWIPECONTROL),
00162             TraceLoggingWideString(info, "Info"));
00163     }
00164 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizingUniformStackLayoutSamplePage Member List

This is the complete list of members for VirtualizingUniformStackLayoutSamplePage, including all inherited members.
BringIntoView_Click(object sender, RoutedEventArgs e) | VirtualizingUniformStackLayoutSamplePage | [inline, private]
BringIntoView_Click(object sender, RoutedEventArgs e) | VirtualizingUniformStackLayoutSamplePage | [inline, private]
data | VirtualizingUniformStackLayoutSamplePage | [private]
data | VirtualizingUniformStackLayoutSamplePage | [private]
Insert_Click(object sender, RoutedEventArgs e) | VirtualizingUniformStackLayoutSamplePage | [inline, private]
Insert_Click(object sender, RoutedEventArgs e) | VirtualizingUniformStackLayoutSamplePage | [inline, private]
VirtualizingUniformStackLayoutSamplePage() | VirtualizingUniformStackLayoutSamplePage | [inline]
VirtualizingUniformStackLayoutSamplePage() | VirtualizingUniformStackLayoutSamplePage | [inline]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPictureTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

PersonPictureTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class PersonPictureTemplateSettingsProperties
00008 {
00009 public:
00010     PersonPictureTemplateSettingsProperties();
00011
00012     void ActualImageBrush(winrt::ImageBrush const& value);
00013     winrt::ImageBrush ActualImageBrush();
00014
00015     void ActualInitials(winrt::hstring const& value);
00016     winrt::hstring ActualInitials();
00017
00018     static winrt::DependencyProperty ActualImageBrushProperty() { return s_ActualImageBrushProperty; }
00019     static winrt::DependencyProperty ActualInitialsProperty() { return s_ActualInitialsProperty; }
00020
00021     static GlobalDependencyProperty s_ActualImageBrushProperty;
00022     static GlobalDependencyProperty s_ActualInitialsProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterLayoutContext.cpp Source File

  • File List
  • File Members
  • Repeater

RepeaterLayoutContext.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "RepeaterLayoutContext.h"
00008 #include "ItemsRepeater.h"
00009
00010 RepeaterLayoutContext::RepeaterLayoutContext(const winrt::ItemsRepeater& owner)
00011 {
00012     m_owner = winrt::make_weak(owner);
00013 }
00014
00015 #pragma region ILayoutContext
00016
00017 int32_t RepeaterLayoutContext::ItemCountCore()
00018 {
00019     auto dataSource = GetOwner().ItemsSourceView();
00020     if (dataSource)
00021     {
00022         return dataSource.Count();
00023     }
00024     return 0;
00025 }
00026
00027 winrt::UIElement RepeaterLayoutContext::GetOrCreateElementAtCore(int index, winrt::ElementRealizationOptions const& options)
00028 {
00029     return winrt::get_self<ItemsRepeater>(GetOwner())->GetElementImpl(index,
00030         (options & winrt::ElementRealizationOptions::ForceCreate) == winrt::ElementRealizationOptions::ForceCreate,
00031         (options & winrt::ElementRealizationOptions::SuppressAutoRecycle) == winrt::ElementRealizationOptions::SuppressAutoRecycle);
00032 }
00033
00034 winrt::IInspectable RepeaterLayoutContext::LayoutStateCore()
00035 {
00036     if (auto owner = GetOwner())
00037     {
00038         return winrt::get_self<ItemsRepeater>(owner)->LayoutState();
00039     }
00040     return winrt::IInspectable{ nullptr };
00041 }
00042
00043 void RepeaterLayoutContext::LayoutStateCore(winrt::IInspectable const& value)
00044 {
00045     winrt::get_self<ItemsRepeater>(GetOwner())->LayoutState(value);
00046 }
00047
00048 #pragma endregion
00049
00050 #pragma region IVirtualizingLayoutContextOverrides
00051
00052 winrt::IInspectable RepeaterLayoutContext::GetItemAtCore(
00053     int index)
00054 {
00055     return GetOwner().ItemsSourceView().GetAt(index);
00056 }
00057
00058 void RepeaterLayoutContext::RecycleElementCore(winrt::UIElement const& element)
00059 {
00060     auto owner = winrt::get_self<ItemsRepeater>(GetOwner());
00061     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"RecycleElement:", owner->GetElementIndex(element));
00062     owner->ClearElementImpl(element);
00063 }
00064
00065 winrt::Rect RepeaterLayoutContext::VisibleRectCore()
00066 {
00067     return winrt::get_self<ItemsRepeater>(GetOwner())->VisibleWindow();
00068 }
00069
00070 winrt::Rect RepeaterLayoutContext::RealizationRectCore()
00071 {
00072     return winrt::get_self<ItemsRepeater>(GetOwner())->RealizationWindow();
00073 }
00074
00075 int32_t RepeaterLayoutContext::RecommendedAnchorIndexCore()
00076 {
00077     int anchorIndex = -1;
00078     auto repeater = winrt::get_self<ItemsRepeater>(GetOwner());
00079     auto anchor = repeater->SuggestedAnchor();
00080     if (anchor)
00081     {
00082         anchorIndex = repeater->GetElementIndex(anchor);
00083     }
00084
00085     return anchorIndex;
00086 }
00087
00088 winrt::Point RepeaterLayoutContext::LayoutOriginCore()
00089 {
00090     return winrt::get_self<ItemsRepeater>(GetOwner())->LayoutOrigin();
00091 }
00092
00093 void RepeaterLayoutContext::LayoutOriginCore(winrt::Point const& value)
00094 {
00095     winrt::get_self<ItemsRepeater>(GetOwner())->LayoutOrigin(value);
00096 }
00097
00098 #pragma endregion
00099
00100 winrt::ItemsRepeater RepeaterLayoutContext::GetOwner()
00101 {
00102     return m_owner.get();
00103 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooksFactory.h Source File

  • File List
  • File Members
  • SelectorBar

SelectorBarTestHooksFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SelectorBarTestHooks.h"
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.cpp Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutCommandBarTemplateSettings.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "CommandBarFlyoutCommandBarTemplateSettings.h"
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LinedFlowLayoutTrace Member List

This is the complete list of members for LinedFlowLayoutTrace, including all inherited members.
s_IsDebugOutputEnabled | LinedFlowLayoutTrace | [static]
s_IsVerboseDebugOutputEnabled | LinedFlowLayoutTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | LinedFlowLayoutTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | LinedFlowLayoutTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | LinedFlowLayoutTrace | [inline, static]
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewItemInvokedEventArgs Member List

This is the complete list of members for ItemsViewItemInvokedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ItemsViewItemInvokedEventArgs > &&self) noexcept | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< ItemsViewItemInvokedEventArgs > &&self) | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
InvokedItem() | ItemsViewItemInvokedEventArgs |
IsOnThread() | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
ItemsViewItemInvokedEventArgs(const winrt::IInspectable &invokedItem) | ItemsViewItemInvokedEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
~ItemsViewItemInvokedEventArgs() | ItemsViewItemInvokedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarToolButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarToolButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarToolButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarToolButton)
00012 }
00013
00014 #include "InkToolBarToolButton.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarToolButtonProperties::s_IsExtensionGlyphShownProperty{ nullptr };
00017
00018 InkToolBarToolButtonProperties::InkToolBarToolButtonProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void InkToolBarToolButtonProperties::EnsureProperties()
00024 {
00025     if (!s_IsExtensionGlyphShownProperty)
00026     {
00027         s_IsExtensionGlyphShownProperty =
00028             InitializeDependencyProperty(
00029                 L"IsExtensionGlyphShown",
00030                 winrt::name_of<bool>(),
00031                 winrt::name_of<winrt::InkToolBarToolButton>(),
00032                 false /* isAttached */,
00033                 ValueHelper<bool>::BoxedDefaultValue(),
00034                 nullptr);
00035     }
00036 }
00037
00038 void InkToolBarToolButtonProperties::ClearProperties()
00039 {
00040     s_IsExtensionGlyphShownProperty = nullptr;
00041 }
00042
00043 void InkToolBarToolButtonProperties::IsExtensionGlyphShown(bool value)
00044 {
00045     [[gsl::suppress(con)]]
00046     {
00047     static_cast<InkToolBarToolButton*>(this)->SetValue(s_IsExtensionGlyphShownProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00048     }
00049 }
00050
00051 bool InkToolBarToolButtonProperties::IsExtensionGlyphShown()
00052 {
00053     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarToolButton*>(this)->GetValue(s_IsExtensionGlyphShownProperty));
00054 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PropertyChanged_revoker Member List

This is the complete list of members for PropertyChanged_revoker, including all inherited members.
m_object | PropertyChanged_revoker | [private]
move_from(PropertyChanged_revoker &other) | PropertyChanged_revoker | [inline, private]
operator bool() const noexcept | PropertyChanged_revoker | [inline, explicit]
operator=(PropertyChanged_revoker const &) | PropertyChanged_revoker |
operator=(PropertyChanged_revoker &&other) noexcept | PropertyChanged_revoker | [inline]
PropertyChanged_revoker() noexcept | PropertyChanged_revoker |
PropertyChanged_revoker(PropertyChanged_revoker const &) | PropertyChanged_revoker |
PropertyChanged_revoker(PropertyChanged_revoker &&other) noexcept | PropertyChanged_revoker | [inline]
PropertyChanged_revoker(winrt::DependencyObject const &object, const winrt::DependencyProperty &dp, int64_t token) | PropertyChanged_revoker | [inline]
revoke() noexcept | PropertyChanged_revoker | [inline]
~PropertyChanged_revoker() noexcept | PropertyChanged_revoker | [inline]
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NumberBox.properties.h Source File

  • File List
  • File Members
  • Generated

NumberBox.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class NumberBoxProperties
00008 {
00009 public:
00010     NumberBoxProperties();
00011
00012     void AcceptsExpression(bool value);
00013     bool AcceptsExpression();
00014
00015     void Description(winrt::IInspectable const& value);
00016     winrt::IInspectable Description();
00017
00018     void Header(winrt::IInspectable const& value);
00019     winrt::IInspectable Header();
00020
00021     void HeaderTemplate(winrt::DataTemplate const& value);
00022     winrt::DataTemplate HeaderTemplate();
00023
00024     void InputScope(winrt::InputScope const& value);
00025     winrt::InputScope InputScope();
00026
00027     void IsWrapEnabled(bool value);
00028     bool IsWrapEnabled();
00029
00030     void LargeChange(double value);
00031     double LargeChange();
00032
00033     void Maximum(double value);
00034     double Maximum();
00035
00036     void Minimum(double value);
00037     double Minimum();
00038
00039     void NumberFormatter(winrt::INumberFormatter2 const& value);
00040     winrt::INumberFormatter2 NumberFormatter();
00041
00042     void PlaceholderText(winrt::hstring const& value);
00043     winrt::hstring PlaceholderText();
00044
00045     void PreventKeyboardDisplayOnProgrammaticFocus(bool value);
00046     bool PreventKeyboardDisplayOnProgrammaticFocus();
00047
00048     void SelectionFlyout(winrt::FlyoutBase const& value);
00049     winrt::FlyoutBase SelectionFlyout();
00050
00051     void SelectionHighlightColor(winrt::SolidColorBrush const& value);
00052     winrt::SolidColorBrush SelectionHighlightColor();
00053
00054     void SmallChange(double value);
00055     double SmallChange();
00056
00057     void SpinButtonPlacementMode(winrt::NumberBoxSpinButtonPlacementMode const& value);
00058     winrt::NumberBoxSpinButtonPlacementMode SpinButtonPlacementMode();
00059
00060     void Text(winrt::hstring const& value);
00061     winrt::hstring Text();
00062
00063     void TextAlignment(winrt::TextAlignment const& value);
00064     winrt::TextAlignment TextAlignment();
00065
00066     void TextReadingOrder(winrt::TextReadingOrder const& value);
00067     winrt::TextReadingOrder TextReadingOrder();
00068
00069     void ValidationMode(winrt::NumberBoxValidationMode const& value);
00070     winrt::NumberBoxValidationMode ValidationMode();
00071
00072     void Value(double value);
00073     double Value();
00074
00075     static winrt::DependencyProperty AcceptsExpressionProperty() { return s_AcceptsExpressionProperty; }
00076     static winrt::DependencyProperty DescriptionProperty() { return s_DescriptionProperty; }
00077     static winrt::DependencyProperty HeaderProperty() { return s_HeaderProperty; }
00078     static winrt::DependencyProperty HeaderTemplateProperty() { return s_HeaderTemplateProperty; }
00079     static winrt::DependencyProperty InputScopeProperty() { return s_InputScopeProperty; }
00080     static winrt::DependencyProperty IsWrapEnabledProperty() { return s_IsWrapEnabledProperty; }
00081     static winrt::DependencyProperty LargeChangeProperty() { return s_LargeChangeProperty; }
00082     static winrt::DependencyProperty MaximumProperty() { return s_MaximumProperty; }
00083     static winrt::DependencyProperty MinimumProperty() { return s_MinimumProperty; }
00084     static winrt::DependencyProperty NumberFormatterProperty() { return s_NumberFormatterProperty; }
00085     static winrt::DependencyProperty PlaceholderTextProperty() { return s_PlaceholderTextProperty; }
00086     static winrt::DependencyProperty PreventKeyboardDisplayOnProgrammaticFocusProperty() { return s_PreventKeyboardDisplayOnProgrammaticFocusProperty; }
00087     static winrt::DependencyProperty SelectionFlyoutProperty() { return s_SelectionFlyoutProperty; }
00088     static winrt::DependencyProperty SelectionHighlightColorProperty() { return s_SelectionHighlightColorProperty; }
00089     static winrt::DependencyProperty SmallChangeProperty() { return s_SmallChangeProperty; }
00090     static winrt::DependencyProperty SpinButtonPlacementModeProperty() { return s_SpinButtonPlacementModeProperty; }
00091     static winrt::DependencyProperty TextProperty() { return s_TextProperty; }
00092     static winrt::DependencyProperty TextAlignmentProperty() { return s_TextAlignmentProperty; }
00093     static winrt::DependencyProperty TextReadingOrderProperty() { return s_TextReadingOrderProperty; }
00094     static winrt::DependencyProperty ValidationModeProperty() { return s_ValidationModeProperty; }
00095     static winrt::DependencyProperty ValueProperty() { return s_ValueProperty; }
00096
00097     static GlobalDependencyProperty s_AcceptsExpressionProperty;
00098     static GlobalDependencyProperty s_DescriptionProperty;
00099     static GlobalDependencyProperty s_HeaderProperty;
00100     static GlobalDependencyProperty s_HeaderTemplateProperty;
00101     static GlobalDependencyProperty s_InputScopeProperty;
00102     static GlobalDependencyProperty s_IsWrapEnabledProperty;
00103     static GlobalDependencyProperty s_LargeChangeProperty;
00104     static GlobalDependencyProperty s_MaximumProperty;
00105     static GlobalDependencyProperty s_MinimumProperty;
00106     static GlobalDependencyProperty s_NumberFormatterProperty;
00107     static GlobalDependencyProperty s_PlaceholderTextProperty;
00108     static GlobalDependencyProperty s_PreventKeyboardDisplayOnProgrammaticFocusProperty;
00109     static GlobalDependencyProperty s_SelectionFlyoutProperty;
00110     static GlobalDependencyProperty s_SelectionHighlightColorProperty;
00111     static GlobalDependencyProperty s_SmallChangeProperty;
00112     static GlobalDependencyProperty s_SpinButtonPlacementModeProperty;
00113     static GlobalDependencyProperty s_TextProperty;
00114     static GlobalDependencyProperty s_TextAlignmentProperty;
00115     static GlobalDependencyProperty s_TextReadingOrderProperty;
00116     static GlobalDependencyProperty s_ValidationModeProperty;
00117     static GlobalDependencyProperty s_ValueProperty;
00118
00119     winrt::event_token ValueChanged(winrt::TypedEventHandler<winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs> const& value);
00120     void ValueChanged(winrt::event_token const& token);
00121
00122     event_source<winrt::TypedEventHandler<winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs>> m_valueChangedEventSource;
00123
00124     static void EnsureProperties();
00125     static void ClearProperties();
00126
00127     static void OnHeaderPropertyChanged(
00128         winrt::DependencyObject const& sender,
00129         winrt::DependencyPropertyChangedEventArgs const& args);
00130
00131     static void OnHeaderTemplatePropertyChanged(
00132         winrt::DependencyObject const& sender,
00133         winrt::DependencyPropertyChangedEventArgs const& args);
00134
00135     static void OnIsWrapEnabledPropertyChanged(
00136         winrt::DependencyObject const& sender,
00137         winrt::DependencyPropertyChangedEventArgs const& args);
00138
00139     static void OnMaximumPropertyChanged(
00140         winrt::DependencyObject const& sender,
00141         winrt::DependencyPropertyChangedEventArgs const& args);
00142
00143     static void OnMinimumPropertyChanged(
00144         winrt::DependencyObject const& sender,
00145         winrt::DependencyPropertyChangedEventArgs const& args);
00146
00147     static void OnNumberFormatterPropertyChanged(
00148         winrt::DependencyObject const& sender,
00149         winrt::DependencyPropertyChangedEventArgs const& args);
00150
00151     static void OnSmallChangePropertyChanged(
00152         winrt::DependencyObject const& sender,
00153         winrt::DependencyPropertyChangedEventArgs const& args);
00154
00155     static void OnSpinButtonPlacementModePropertyChanged(
00156         winrt::DependencyObject const& sender,
00157         winrt::DependencyPropertyChangedEventArgs const& args);
00158
00159     static void OnTextPropertyChanged(
00160         winrt::DependencyObject const& sender,
00161         winrt::DependencyPropertyChangedEventArgs const& args);
00162
00163     static void OnValidationModePropertyChanged(
00164         winrt::DependencyObject const& sender,
00165         winrt::DependencyPropertyChangedEventArgs const& args);
00166
00167     static void OnValuePropertyChanged(
00168         winrt::DependencyObject const& sender,
00169         winrt::DependencyPropertyChangedEventArgs const& args);
00170 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UniformGridLayoutState Member List

This is the complete list of members for UniformGridLayoutState, including all inherited members.
abi_enter() | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
CalculateAvailableSize(const winrt::Size availableSize, const winrt::Orientation orientation, const winrt::UniformGridLayoutItemsStretch &stretch, const unsigned int maxItemsPerLine, const double itemWidth, const double itemHeight, const double minRowSpacing, const double minColumnSpacing) const | UniformGridLayoutState | [private]
CalculateExtraPixelsInLine(const unsigned int maxItemsPerLine, const float availableSizeMinor, const double itemSizeMinor, const double minorItemSpacing) const | UniformGridLayoutState | [private]
CheckThread() | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< UniformGridLayoutState > &&self) noexcept | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline, static]
EffectiveItemHeight() const | UniformGridLayoutState | [inline]
EffectiveItemWidth() const | UniformGridLayoutState | [inline]
EnsureElementSize(const winrt::Size availableSize, const winrt::VirtualizingLayoutContext &context, const double itemWidth, const double itemHeight, const winrt::UniformGridLayoutItemsStretch &stretch, const winrt::Orientation &orientation, const double minRowSpacing, const double minColumnSpacing, unsigned int maxItemsPerLine) | UniformGridLayoutState |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
final_release(std::unique_ptr< UniformGridLayoutState > &&self) | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline, static]
FlowAlgorithm() | UniformGridLayoutState | [inline]
GetBase() | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
GetInner() | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
InitializeForContext(const winrt::VirtualizingLayoutContext &context, IFlowLayoutAlgorithmDelegates *callbacks) | UniformGridLayoutState |
InvalidateElementSize() | UniformGridLayoutState |
IsOnThread() | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing > | [inline]
SetSize(const winrt::Size &desiredItemSize, const double itemWidth, const double itemHeight, const winrt::Size availableSize, const winrt::UniformGridLayoutItemsStretch &stretch, const winrt::Orientation &orientation, const double minRowSpacing, const double minColumnSpacing, unsigned int maxItemsPerLine) | UniformGridLayoutState | [private]
UninitializeForContext(const winrt::VirtualizingLayoutContext &context) | UniformGridLayoutState |
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealTestApi.properties.cpp Source File

  • File List
  • File Members
  • Generated

RevealTestApi.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RevealTestApi.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Media
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RevealTestApi)
00012 }
00013
00014 #include "RevealTestApi.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IPointSpecularEffect Member List

This is the complete list of members for IPointSpecularEffect, including all inherited members.
HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value) | IPointSpecularEffect
HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value) | IPointSpecularEffect
HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2 *value) | IPointSpecularEffect
HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value) | IPointSpecularEffect
HeightMapScale([out, retval] float *value) | IPointSpecularEffect
HeightMapScale([in] float value) | IPointSpecularEffect
LightColor([out, retval] Windows.UI.Color *value) | IPointSpecularEffect
LightColor([in] Windows.UI.Color value) | IPointSpecularEffect
LightPosition([out, retval] Windows.Foundation.Numerics.Vector3 *value) | IPointSpecularEffect
LightPosition([in] Windows.Foundation.Numerics.Vector3 value) | IPointSpecularEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IPointSpecularEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IPointSpecularEffect
SpecularAmount([out, retval] float *value) | IPointSpecularEffect
SpecularAmount([in] float value) | IPointSpecularEffect
SpecularExponent([out, retval] float *value) | IPointSpecularEffect
SpecularExponent([in] float value) | IPointSpecularEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SliderInteractionTests Member List

This is the complete list of members for SliderInteractionTests, including all inherited members.
CanSlideHorizontally() | SliderInteractionTests | [inline]
CanSlideHorizontallyWithKeyboard() | SliderInteractionTests | [inline]
CanSlideVertically() | SliderInteractionTests | [inline]
CanSlideVerticallyWithKeyboard() | SliderInteractionTests | [inline]
ClassInitialize(TestContext testContext) | SliderInteractionTests | [inline, static]
DoesNotSlidePastMaximum() | SliderInteractionTests | [inline]
DoesNotSlidePastMinimum() | SliderInteractionTests | [inline]
HorizontalElementAutomationId | SliderInteractionTests |
HorizontalLargeChangeTextBlockAutomationId | SliderInteractionTests |
HorizontalMaximumTextBlockAutomationId | SliderInteractionTests |
HorizontalMinimumTextBlockAutomationId | SliderInteractionTests |
HorizontalPositionTextBlockAutomationId | SliderInteractionTests |
HorizontalSmallChangeTextBlockAutomationId | SliderInteractionTests |
TestCleanup() | SliderInteractionTests | [inline]
VerticalElementAutomationId | SliderInteractionTests |
VerticalLargeChangeTextBlockAutomationId | SliderInteractionTests |
VerticalMaximumTextBlockAutomationId | SliderInteractionTests |
VerticalMinimumTextBlockAutomationId | SliderInteractionTests |
VerticalPositionTextBlockAutomationId | SliderInteractionTests |
VerticalSmallChangeTextBlockAutomationId | SliderInteractionTests |
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.cpp Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

RefreshVisualizerEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006
00007 #include "RefreshVisualizer.h"
00008 #include "RefreshVisualizerEventArgs.h"
00009 #include "PTRTracing.h"
00010
00011 //////////////////////////////////////////////////////////
00012 /////////        RefreshStateChanged        /////////////
00013 //////////////////////////////////////////////////////////
00014
00015 RefreshStateChangedEventArgs::RefreshStateChangedEventArgs(winrt::RefreshVisualizerState oldValue, winrt::RefreshVisualizerState newValue)
00016 {
00017     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00018     m_oldState = oldValue;
00019     m_newState = newValue;
00020 }
00021
00022 winrt::RefreshVisualizerState RefreshStateChangedEventArgs::OldState()
00023 {
00024     return m_oldState;
00025 }
00026
00027 winrt::RefreshVisualizerState RefreshStateChangedEventArgs::NewState()
00028 {
00029     return m_newState;
00030 }
00031
00032 //////////////////////////////////////////////////////////
00033 /////////          RefreshRequested          /////////////
00034 //////////////////////////////////////////////////////////
00035 RefreshRequestedEventArgs::RefreshRequestedEventArgs(const winrt::Deferral& handler)
00036 {
00037     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00038     m_deferral.set(handler);
00039 }
00040
00041 winrt::Deferral RefreshRequestedEventArgs::GetDeferral()
00042 {
00043     m_deferralCount++;
00044
00045     com_ptr<RefreshRequestedEventArgs> strongThis = get_strong();
00046
00047     winrt::Deferral instance{ [strongThis]()
00048         {
00049             strongThis->CheckThread();
00050             strongThis->DecrementDeferralCount();
00051         }
00052     };
00053     return instance;
00054 }
00055
00056 void RefreshRequestedEventArgs::DecrementDeferralCount()
00057 {
00058     MUX_ASSERT(m_deferralCount >= 0);
00059     m_deferralCount--;
00060     if (m_deferralCount == 0)
00061     {
00062         m_deferral.get().Complete();
00063     }
00064 }
00065
00066 void RefreshRequestedEventArgs::IncrementDeferralCount()
00067 {
00068     m_deferralCount++;
00069 }
00070
00071
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImagePage Member List

This is the complete list of members for ImagePage, including all inherited members.
AppendAsyncEventMessage(string asyncEventMessage) | ImagePage | [inline, private]
AppendAsyncEventMessage() | ImagePage | [inline, private]
asyncEventReportingLock | ImagePage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetBitmapImageDecodePixelHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetBitmapImageDecodePixelWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetBitmapImageUriSource_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageActualHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageActualWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageDesiredHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageDesiredWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageHorizontalAlignment_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageMargin_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageMaxHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageMaxWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageMinHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageMinWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageParentHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageParentWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageRenderHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageRenderWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageStretch_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageVerticalAlignment_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnGetImageWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetBitmapImageDecodePixelHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetBitmapImageDecodePixelWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetBitmapImageUriSource_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageHorizontalAlignment_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageMargin_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageMaxHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageMaxWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageMinHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageMinWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageParentHeight_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageParentWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageStretch_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageVerticalAlignment_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
BtnSetImageWidth_Click(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
ChkImageParentProperties_Checked(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
ChkImageParentProperties_Unchecked(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
ChkImageProperties_Checked(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
ChkImageProperties_Unchecked(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
GetThicknessFromString(string thickness) | ImagePage | [inline, private]
Image_ImageFailed(object sender, ExceptionRoutedEventArgs e) | ImagePage | [inline, private]
Image_ImageOpened(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
imageIndex | ImagePage | [private]
ImagePage() | ImagePage | [inline]
ImagePage_Loaded(object sender, RoutedEventArgs e) | ImagePage | [inline, private]
lstAsyncEventMessage | ImagePage | [private]
UpdateImage() | ImagePage | [inline, private]
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/MicaBackdrop/MicaBackdrop.idl Source File

  • File List
  • File Members
  • Materials
  • MicaBackdrop

MicaBackdrop.idl

Go to the documentation of this file.
00001 namespace MU_XM_NAMESPACE
00002 {
00003 [MUX_PUBLIC_V4]
00004 [webhosthidden]
00005 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00006 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00007 unsealed runtimeclass MicaBackdrop : Microsoft.UI.Xaml.Media.SystemBackdrop
00008 {
00009     MicaBackdrop();
00010
00011     Microsoft.UI.Composition.SystemBackdrops.MicaKind Kind { get; set; };
00012
00013     static Microsoft.UI.Xaml.DependencyProperty KindProperty { get; };
00014 }
00015
00016 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/LifetimeHandler.cpp Source File

  • File List
  • File Members
  • Common

LifetimeHandler.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006
00007 #include "LifetimeHandler.h"
00008
00009
00010 /* static */
00011 thread_local LifetimeHandler* LifetimeHandler::s_tlsInstanceNoRef;
00012
00013 LifetimeHandler::~LifetimeHandler()
00014 {
00015     s_tlsInstanceNoRef = nullptr;
00016 }
00017
00018 LifetimeHandler& LifetimeHandler::Instance()
00019 {
00020     if (!s_tlsInstanceNoRef)
00021     {
00022         bool managedByCoreApplicationView = false;
00023         com_ptr<LifetimeHandler> strongInstance = winrt::make_self<LifetimeHandler>();
00024         s_tlsInstanceNoRef = strongInstance.get();
00025
00026         if (!SharedHelpers::IsInDesignMode())
00027         {
00028             if (auto currentView = SharedHelpers::TryGetCurrentCoreApplicationView()) // Might be null in XamlPresenter scenarios
00029             {
00030                 auto propertyName = MUXCONTROLSROOT_NAMESPACE_STR L".Controls.LifetimeHandler";
00031                 auto properties = currentView.Properties();
00032                 properties.Insert(propertyName, *strongInstance);
00033                 managedByCoreApplicationView = true;
00034             }
00035         }
00036
00037         if (!managedByCoreApplicationView)
00038         {
00039             // Keep alive indefinitely - the best we can do in this case
00040             strongInstance.detach();
00041         }
00042     }
00043
00044     return *s_tlsInstanceNoRef;
00045 }
00046
00047 #ifdef REPEATER_INCLUDED
00048 /* static */
00049 com_ptr<CachedVisualTreeHelpers> LifetimeHandler::GetCachedVisualTreeHelpersInstance()
00050 {
00051     if (!Instance().m_cachedVisualTreeHelpers)
00052     {
00053         Instance().m_cachedVisualTreeHelpers = winrt::make_self<CachedVisualTreeHelpers>();
00054     }
00055
00056     return Instance().m_cachedVisualTreeHelpers;
00057 }
00058 #endif
00059
00060 #ifdef TWOPANEVIEW_INCLUDED
00061 /* static */
00062 com_ptr<DisplayRegionHelper> LifetimeHandler::GetDisplayRegionHelperInstance()
00063 {
00064     if (!Instance().m_displayRegionHelper)
00065     {
00066         Instance().m_displayRegionHelper = winrt::make_self<DisplayRegionHelper>();
00067     }
00068
00069     return Instance().m_displayRegionHelper;
00070 }
00071 #endif
00072
00073 /* static */
00074 com_ptr<MaterialHelper> LifetimeHandler::GetMaterialHelperInstance()
00075 {
00076     if (const auto instance = TryGetMaterialHelperInstance())
00077     {
00078         return instance;
00079     }
00080
00081     Instance().m_materialHelper = winrt::make_self<MaterialHelper>();
00082
00083     return Instance().m_materialHelper;
00084 }
00085
00086 /* static */
00087 com_ptr<MaterialHelper> LifetimeHandler::TryGetMaterialHelperInstance()
00088 {
00089     const auto instance = Instance().m_materialHelper;
00090     if (instance && instance->m_acrylicCompositor)
00091     {
00092         // Make sure that MaterialHelper's Compositor is the same Compositor XAML's using. If XAML shuts down and starts
00093         // back up on the same thread, it will have closed the previous Compositor and created a new one.  Make sure
00094         // we're not using comp objects based on a stale/closed Compositor.
00095         winrt::Compositor xamlCompositor {nullptr};
00096
00097         // Calling winrt::CompositionTarget::GetCompositorForCurrentThread() can result in a noisy exception if this
00098         // call is happening after the XAML core has already shutdown. Avoid this by calling the ABI method, using
00099         // relevant winrt::impl types for the guid and interface definition.
00100         auto compositionTarget = winrt::get_activation_factory<winrt::CompositionTarget>();
00101         auto guid = winrt::impl::guid_v<winrt::Microsoft::UI::Xaml::Media::ICompositionTargetStatics>;
00102         com_ptr<winrt::impl::abi<winrt::Microsoft::UI::Xaml::Media::ICompositionTargetStatics>::type> compositionTargetStatics;
00103         auto hr = compositionTarget.as<IUnknown>()->QueryInterface(guid, compositionTargetStatics.put_void());
00104         if (SUCCEEDED(hr))
00105         {
00106             auto ignorehr = compositionTargetStatics->GetCompositorForCurrentThread(winrt::put_abi(xamlCompositor));
00107         }
00108
00109         if (instance->m_acrylicCompositor != xamlCompositor)
00110         {
00111             ClearMaterialHelperInstance();
00112             return nullptr;
00113         }
00114     }
00115
00116     return instance;
00117 }
00118
00119 /* static */
00120 void LifetimeHandler::ClearMaterialHelperInstance()
00121 {
00122     Instance().m_materialHelper = nullptr;
00123 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LayoutContext.properties.cpp Source File

  • File List
  • File Members
  • Generated

LayoutContext.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "LayoutContext.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(LayoutContext)
00012 }
00013
00014 #include "LayoutContext.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBar.properties.h Source File

  • File List
  • File Members
  • Generated

InkToolBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class InkToolBarProperties
00008 {
00009 public:
00010     InkToolBarProperties();
00011
00012     void ActiveTool(winrt::InkToolBarToolButton const& value);
00013     winrt::InkToolBarToolButton ActiveTool();
00014
00015     void ButtonFlyoutPlacement(winrt::InkToolBarButtonFlyoutPlacement const& value);
00016     winrt::InkToolBarButtonFlyoutPlacement ButtonFlyoutPlacement();
00017
00018     void Children(winrt::DependencyObjectCollection const& value);
00019     winrt::DependencyObjectCollection Children();
00020
00021     void InitialControls(winrt::InkToolBarInitialControls const& value);
00022     winrt::InkToolBarInitialControls InitialControls();
00023
00024     void InkDrawingAttributes(winrt::InkDrawingAttributes const& value);
00025     winrt::InkDrawingAttributes InkDrawingAttributes();
00026
00027     void IsRulerButtonChecked(bool value);
00028     bool IsRulerButtonChecked();
00029
00030     void IsStencilButtonChecked(bool value);
00031     bool IsStencilButtonChecked();
00032
00033     void Orientation(winrt::Orientation const& value);
00034     winrt::Orientation Orientation();
00035
00036     void TargetInkCanvas(winrt::InkCanvas const& value);
00037     winrt::InkCanvas TargetInkCanvas();
00038
00039     void TargetInkPresenter(winrt::IInspectable const& value);
00040     winrt::IInspectable TargetInkPresenter();
00041
00042     static winrt::DependencyProperty ActiveToolProperty() { return s_ActiveToolProperty; }
00043     static winrt::DependencyProperty ButtonFlyoutPlacementProperty() { return s_ButtonFlyoutPlacementProperty; }
00044     static winrt::DependencyProperty ChildrenProperty() { return s_ChildrenProperty; }
00045     static winrt::DependencyProperty InitialControlsProperty() { return s_InitialControlsProperty; }
00046     static winrt::DependencyProperty InkDrawingAttributesProperty() { return s_InkDrawingAttributesProperty; }
00047     static winrt::DependencyProperty IsRulerButtonCheckedProperty() { return s_IsRulerButtonCheckedProperty; }
00048     static winrt::DependencyProperty IsStencilButtonCheckedProperty() { return s_IsStencilButtonCheckedProperty; }
00049     static winrt::DependencyProperty OrientationProperty() { return s_OrientationProperty; }
00050     static winrt::DependencyProperty TargetInkCanvasProperty() { return s_TargetInkCanvasProperty; }
00051     static winrt::DependencyProperty TargetInkPresenterProperty() { return s_TargetInkPresenterProperty; }
00052
00053     static GlobalDependencyProperty s_ActiveToolProperty;
00054     static GlobalDependencyProperty s_ButtonFlyoutPlacementProperty;
00055     static GlobalDependencyProperty s_ChildrenProperty;
00056     static GlobalDependencyProperty s_InitialControlsProperty;
00057     static GlobalDependencyProperty s_InkDrawingAttributesProperty;
00058     static GlobalDependencyProperty s_IsRulerButtonCheckedProperty;
00059     static GlobalDependencyProperty s_IsStencilButtonCheckedProperty;
00060     static GlobalDependencyProperty s_OrientationProperty;
00061     static GlobalDependencyProperty s_TargetInkCanvasProperty;
00062     static GlobalDependencyProperty s_TargetInkPresenterProperty;
00063
00064     winrt::event_token ActiveToolChanged(winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> const& value);
00065     void ActiveToolChanged(winrt::event_token const& token);
00066     winrt::event_token EraseAllClicked(winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> const& value);
00067     void EraseAllClicked(winrt::event_token const& token);
00068     winrt::event_token EraserFlyoutItemClicked(winrt::TypedEventHandler<winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable> const& value);
00069     void EraserFlyoutItemClicked(winrt::event_token const& token);
00070     winrt::event_token InkDrawingAttributesChanged(winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> const& value);
00071     void InkDrawingAttributesChanged(winrt::event_token const& token);
00072     winrt::event_token IsStencilButtonCheckedChanged(winrt::TypedEventHandler<winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs> const& value);
00073     void IsStencilButtonCheckedChanged(winrt::event_token const& token);
00074
00075     event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable>> m_activeToolChangedEventSource;
00076     event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable>> m_eraseAllClickedEventSource;
00077     event_source<winrt::TypedEventHandler<winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable>> m_eraserFlyoutItemClickedEventSource;
00078     event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable>> m_inkDrawingAttributesChangedEventSource;
00079     event_source<winrt::TypedEventHandler<winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs>> m_isStencilButtonCheckedChangedEventSource;
00080
00081     static void EnsureProperties();
00082     static void ClearProperties();
00083 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModel.h Source File

  • File List
  • File Members
  • Repeater

SelectionModel.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SelectionModel.g.h"
00007 #include "SelectionModel.properties.h"
00008
00009 struct SelectedItemInfo
00010 {
00011     std::weak_ptr<SelectionNode> Node;
00012     winrt::IndexPath Path;
00013 };
00014
00015 class SelectionModel :
00016     public ReferenceTracker<SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing>,
00017     public SelectionModelProperties
00018 {
00019 public:
00020     SelectionModel();
00021     ~SelectionModel();
00022
00023 #pragma region ISelectionModel
00024     winrt::IInspectable Source();
00025     void Source(winrt::IInspectable const& value);
00026
00027     bool SingleSelect();
00028     void SingleSelect(bool value);
00029
00030     winrt::IndexPath AnchorIndex();
00031     void AnchorIndex(winrt::IndexPath const& value);
00032
00033     winrt::IndexPath SelectedIndex();
00034     void SelectedIndex(winrt::IndexPath const& value);
00035
00036     winrt::IInspectable SelectedItem();
00037     winrt::IVectorView<winrt::IInspectable> SelectedItems();
00038     winrt::IVectorView<winrt::IndexPath> SelectedIndices();
00039
00040     void SetAnchorIndex(int32_t index);
00041     void SetAnchorIndex(int groupIndex, int itemIndex);
00042
00043     void Select(int index);
00044     void Select(int groupIndex, int itemIndex);
00045     void SelectAt(winrt::IndexPath const& index);
00046
00047     void Deselect(int index);
00048     void Deselect(int groupIndex, int itemIndex);
00049     void DeselectAt(winrt::IndexPath const& index);
00050
00051     winrt::IReference<bool> IsSelected(int index);
00052     winrt::IReference<bool> IsSelected(int groupIndex, int itemIndex);
00053     winrt::IReference<bool> IsSelectedAt(winrt::IndexPath const& index);
00054
00055     void SelectRangeFromAnchor(int32_t index);
00056     void SelectRangeFromAnchor(int groupIndex, int itemIndex);
00057     void SelectRangeFromAnchorTo(winrt::IndexPath const& index);
00058
00059     void DeselectRangeFromAnchor(int32_t index);
00060     void DeselectRangeFromAnchor(int groupIndex, int itemIndex);
00061     void DeselectRangeFromAnchorTo(winrt::IndexPath const& index);
00062
00063     void SelectRange(winrt::IndexPath const& start, winrt::IndexPath const& end);
00064     void DeselectRange(winrt::IndexPath const& start, winrt::IndexPath const& end);
00065
00066     void SelectAll();
00067     void SelectAllFlat();
00068     void ClearSelection();
00069
00070 #pragma endregion
00071
00072 #pragma region ICustomPropertyProvider
00073     winrt::TypeName Type();
00074     winrt::ICustomProperty GetCustomProperty(hstring const& name);
00075     winrt::ICustomProperty GetIndexedProperty(hstring const& name, winrt::TypeName const& type);
00076     hstring GetStringRepresentation();
00077 #pragma endregion
00078
00079 #pragma region INotifyPropertyChanged
00080     winrt::event_token PropertyChanged(winrt::PropertyChangedEventHandler const& value);
00081     void PropertyChanged(winrt::event_token const& token);
00082 #pragma endregion
00083
00084 #pragma region ISelectionModelProtected
00085     void OnPropertyChanged(winrt::hstring const& propertyName);
00086 #pragma endregion
00087
00088     bool SelectionInvalidatedDueToCollectionChange() const
00089     {
00090         return m_selectionInvalidatedDueToCollectionChange;
00091     }
00092
00093     winrt::IInspectable ResolvePath(const winrt::IInspectable& data, const winrt::IndexPath& dataIndexPath);
00094     void OnSelectionInvalidatedDueToCollectionChange();
00095     std::shared_ptr<SelectionNode> SharedLeafNode() { return m_leafNode; }
00096
00097 private:
00098     void RaisePropertyChanged(std::wstring_view const& name);
00099     void ClearSelection(bool resetAnchor, bool raiseSelectionChanged);
00100     void OnSelectionChanged();
00101
00102     void SelectImpl(int index, bool select);
00103     void SelectWithGroupImpl(int groupIndex, int itemIndex, bool select);
00104     void SelectWithPathImpl(const winrt::IndexPath& index, bool select, bool raiseSelectionChanged);
00105     void SelectRangeFromAnchorImpl(int index, bool select);
00106     void SelectRangeFromAnchorWithGroupImpl(int groupIndex, int itemIndex, bool select);
00107     void SelectRangeImpl(const winrt::IndexPath& start, const winrt::IndexPath& end, bool select);
00108
00109     std::shared_ptr<SelectionNode> m_rootNode{ nullptr };
00110     bool m_singleSelect{ false };
00111
00112     bool m_selectionInvalidatedDueToCollectionChange{ false };
00113
00114     winrt::IVectorView<winrt::IndexPath> m_selectedIndicesCached{ nullptr };
00115     winrt::IVectorView<winrt::IInspectable> m_selectedItemsCached{ nullptr };
00116
00117     event_source<winrt::PropertyChangedEventHandler> m_propertyChangedEventSource{ this };
00118
00119     // Cached Event args to avoid creation cost every time
00120     tracker_ref<winrt::SelectionModelChildrenRequestedEventArgs> m_childrenRequestedEventArgs{ this };
00121     tracker_ref<winrt::SelectionModelSelectionChangedEventArgs> m_selectionChangedEventArgs{ this };
00122
00123     // use just one instance of a leaf node to avoid creating a bunch of these.
00124     std::shared_ptr<SelectionNode> m_leafNode;
00125 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadialGradientBrush.properties.cpp Source File

  • File List
  • File Members
  • Generated

RadialGradientBrush.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RadialGradientBrush.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Media
00010 {
00011     CppWinRTActivatableClassWithDPFactory(RadialGradientBrush)
00012 }
00013
00014 #include "RadialGradientBrush.g.cpp"
00015
00016 GlobalDependencyProperty RadialGradientBrushProperties::s_CenterProperty{ nullptr };
00017 GlobalDependencyProperty RadialGradientBrushProperties::s_GradientOriginProperty{ nullptr };
00018 GlobalDependencyProperty RadialGradientBrushProperties::s_InterpolationSpaceProperty{ nullptr };
00019 GlobalDependencyProperty RadialGradientBrushProperties::s_MappingModeProperty{ nullptr };
00020 GlobalDependencyProperty RadialGradientBrushProperties::s_RadiusXProperty{ nullptr };
00021 GlobalDependencyProperty RadialGradientBrushProperties::s_RadiusYProperty{ nullptr };
00022 GlobalDependencyProperty RadialGradientBrushProperties::s_SpreadMethodProperty{ nullptr };
00023
00024 RadialGradientBrushProperties::RadialGradientBrushProperties()
00025 {
00026     EnsureProperties();
00027 }
00028
00029 void RadialGradientBrushProperties::EnsureProperties()
00030 {
00031     if (!s_CenterProperty)
00032     {
00033         s_CenterProperty =
00034             InitializeDependencyProperty(
00035                 L"Center",
00036                 winrt::name_of<winrt::Point>(),
00037                 winrt::name_of<winrt::RadialGradientBrush>(),
00038                 false /* isAttached */,
00039                 ValueHelper<winrt::Point>::BoxValueIfNecessary(winrt::Point(0.5,0.5)),
00040                 winrt::PropertyChangedCallback(&OnCenterPropertyChanged));
00041     }
00042     if (!s_GradientOriginProperty)
00043     {
00044         s_GradientOriginProperty =
00045             InitializeDependencyProperty(
00046                 L"GradientOrigin",
00047                 winrt::name_of<winrt::Point>(),
00048                 winrt::name_of<winrt::RadialGradientBrush>(),
00049                 false /* isAttached */,
00050                 ValueHelper<winrt::Point>::BoxValueIfNecessary(winrt::Point(0.5,0.5)),
00051                 winrt::PropertyChangedCallback(&OnGradientOriginPropertyChanged));
00052     }
00053     if (!s_InterpolationSpaceProperty)
00054     {
00055         s_InterpolationSpaceProperty =
00056             InitializeDependencyProperty(
00057                 L"InterpolationSpace",
00058                 winrt::name_of<winrt::CompositionColorSpace>(),
00059                 winrt::name_of<winrt::RadialGradientBrush>(),
00060                 false /* isAttached */,
00061                 ValueHelper<winrt::CompositionColorSpace>::BoxValueIfNecessary(winrt::Microsoft::UI::Composition::CompositionColorSpace::Auto),
00062                 winrt::PropertyChangedCallback(&OnInterpolationSpacePropertyChanged));
00063     }
00064     if (!s_MappingModeProperty)
00065     {
00066         s_MappingModeProperty =
00067             InitializeDependencyProperty(
00068                 L"MappingMode",
00069                 winrt::name_of<winrt::BrushMappingMode>(),
00070                 winrt::name_of<winrt::RadialGradientBrush>(),
00071                 false /* isAttached */,
00072                 ValueHelper<winrt::BrushMappingMode>::BoxValueIfNecessary(winrt::BrushMappingMode::RelativeToBoundingBox),
00073                 winrt::PropertyChangedCallback(&OnMappingModePropertyChanged));
00074     }
00075     if (!s_RadiusXProperty)
00076     {
00077         s_RadiusXProperty =
00078             InitializeDependencyProperty(
00079                 L"RadiusX",
00080                 winrt::name_of<double>(),
00081                 winrt::name_of<winrt::RadialGradientBrush>(),
00082                 false /* isAttached */,
00083                 ValueHelper<double>::BoxValueIfNecessary(0.5),
00084                 winrt::PropertyChangedCallback(&OnRadiusXPropertyChanged));
00085     }
00086     if (!s_RadiusYProperty)
00087     {
00088         s_RadiusYProperty =
00089             InitializeDependencyProperty(
00090                 L"RadiusY",
00091                 winrt::name_of<double>(),
00092                 winrt::name_of<winrt::RadialGradientBrush>(),
00093                 false /* isAttached */,
00094                 ValueHelper<double>::BoxValueIfNecessary(0.5),
00095                 winrt::PropertyChangedCallback(&OnRadiusYPropertyChanged));
00096     }
00097     if (!s_SpreadMethodProperty)
00098     {
00099         s_SpreadMethodProperty =
00100             InitializeDependencyProperty(
00101                 L"SpreadMethod",
00102                 winrt::name_of<winrt::GradientSpreadMethod>(),
00103                 winrt::name_of<winrt::RadialGradientBrush>(),
00104                 false /* isAttached */,
00105                 ValueHelper<winrt::GradientSpreadMethod>::BoxValueIfNecessary(winrt::GradientSpreadMethod::Pad),
00106                 winrt::PropertyChangedCallback(&OnSpreadMethodPropertyChanged));
00107     }
00108 }
00109
00110 void RadialGradientBrushProperties::ClearProperties()
00111 {
00112     s_CenterProperty = nullptr;
00113     s_GradientOriginProperty = nullptr;
00114     s_InterpolationSpaceProperty = nullptr;
00115     s_MappingModeProperty = nullptr;
00116     s_RadiusXProperty = nullptr;
00117     s_RadiusYProperty = nullptr;
00118     s_SpreadMethodProperty = nullptr;
00119 }
00120
00121 void RadialGradientBrushProperties::OnCenterPropertyChanged(
00122     winrt::DependencyObject const& sender,
00123     winrt::DependencyPropertyChangedEventArgs const& args)
00124 {
00125     auto owner = sender.as<winrt::RadialGradientBrush>();
00126     winrt::get_self<RadialGradientBrush>(owner)->OnCenterPropertyChanged(args);
00127 }
00128
00129 void RadialGradientBrushProperties::OnGradientOriginPropertyChanged(
00130     winrt::DependencyObject const& sender,
00131     winrt::DependencyPropertyChangedEventArgs const& args)
00132 {
00133     auto owner = sender.as<winrt::RadialGradientBrush>();
00134     winrt::get_self<RadialGradientBrush>(owner)->OnGradientOriginPropertyChanged(args);
00135 }
00136
00137 void RadialGradientBrushProperties::OnInterpolationSpacePropertyChanged(
00138     winrt::DependencyObject const& sender,
00139     winrt::DependencyPropertyChangedEventArgs const& args)
00140 {
00141     auto owner = sender.as<winrt::RadialGradientBrush>();
00142     winrt::get_self<RadialGradientBrush>(owner)->OnInterpolationSpacePropertyChanged(args);
00143 }
00144
00145 void RadialGradientBrushProperties::OnMappingModePropertyChanged(
00146     winrt::DependencyObject const& sender,
00147     winrt::DependencyPropertyChangedEventArgs const& args)
00148 {
00149     auto owner = sender.as<winrt::RadialGradientBrush>();
00150     winrt::get_self<RadialGradientBrush>(owner)->OnMappingModePropertyChanged(args);
00151 }
00152
00153 void RadialGradientBrushProperties::OnRadiusXPropertyChanged(
00154     winrt::DependencyObject const& sender,
00155     winrt::DependencyPropertyChangedEventArgs const& args)
00156 {
00157     auto owner = sender.as<winrt::RadialGradientBrush>();
00158     winrt::get_self<RadialGradientBrush>(owner)->OnRadiusXPropertyChanged(args);
00159 }
00160
00161 void RadialGradientBrushProperties::OnRadiusYPropertyChanged(
00162     winrt::DependencyObject const& sender,
00163     winrt::DependencyPropertyChangedEventArgs const& args)
00164 {
00165     auto owner = sender.as<winrt::RadialGradientBrush>();
00166     winrt::get_self<RadialGradientBrush>(owner)->OnRadiusYPropertyChanged(args);
00167 }
00168
00169 void RadialGradientBrushProperties::OnSpreadMethodPropertyChanged(
00170     winrt::DependencyObject const& sender,
00171     winrt::DependencyPropertyChangedEventArgs const& args)
00172 {
00173     auto owner = sender.as<winrt::RadialGradientBrush>();
00174     winrt::get_self<RadialGradientBrush>(owner)->OnSpreadMethodPropertyChanged(args);
00175 }
00176
00177 void RadialGradientBrushProperties::Center(winrt::Point const& value)
00178 {
00179     [[gsl::suppress(con)]]
00180     {
00181     static_cast<RadialGradientBrush*>(this)->SetValue(s_CenterProperty, ValueHelper<winrt::Point>::BoxValueIfNecessary(value));
00182     }
00183 }
00184
00185 winrt::Point RadialGradientBrushProperties::Center()
00186 {
00187     return ValueHelper<winrt::Point>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_CenterProperty));
00188 }
00189
00190 void RadialGradientBrushProperties::GradientOrigin(winrt::Point const& value)
00191 {
00192     [[gsl::suppress(con)]]
00193     {
00194     static_cast<RadialGradientBrush*>(this)->SetValue(s_GradientOriginProperty, ValueHelper<winrt::Point>::BoxValueIfNecessary(value));
00195     }
00196 }
00197
00198 winrt::Point RadialGradientBrushProperties::GradientOrigin()
00199 {
00200     return ValueHelper<winrt::Point>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_GradientOriginProperty));
00201 }
00202
00203 void RadialGradientBrushProperties::InterpolationSpace(winrt::CompositionColorSpace const& value)
00204 {
00205     [[gsl::suppress(con)]]
00206     {
00207     static_cast<RadialGradientBrush*>(this)->SetValue(s_InterpolationSpaceProperty, ValueHelper<winrt::CompositionColorSpace>::BoxValueIfNecessary(value));
00208     }
00209 }
00210
00211 winrt::CompositionColorSpace RadialGradientBrushProperties::InterpolationSpace()
00212 {
00213     return ValueHelper<winrt::CompositionColorSpace>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_InterpolationSpaceProperty));
00214 }
00215
00216 void RadialGradientBrushProperties::MappingMode(winrt::BrushMappingMode const& value)
00217 {
00218     [[gsl::suppress(con)]]
00219     {
00220     static_cast<RadialGradientBrush*>(this)->SetValue(s_MappingModeProperty, ValueHelper<winrt::BrushMappingMode>::BoxValueIfNecessary(value));
00221     }
00222 }
00223
00224 winrt::BrushMappingMode RadialGradientBrushProperties::MappingMode()
00225 {
00226     return ValueHelper<winrt::BrushMappingMode>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_MappingModeProperty));
00227 }
00228
00229 void RadialGradientBrushProperties::RadiusX(double value)
00230 {
00231     [[gsl::suppress(con)]]
00232     {
00233     static_cast<RadialGradientBrush*>(this)->SetValue(s_RadiusXProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00234     }
00235 }
00236
00237 double RadialGradientBrushProperties::RadiusX()
00238 {
00239     return ValueHelper<double>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_RadiusXProperty));
00240 }
00241
00242 void RadialGradientBrushProperties::RadiusY(double value)
00243 {
00244     [[gsl::suppress(con)]]
00245     {
00246     static_cast<RadialGradientBrush*>(this)->SetValue(s_RadiusYProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00247     }
00248 }
00249
00250 double RadialGradientBrushProperties::RadiusY()
00251 {
00252     return ValueHelper<double>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_RadiusYProperty));
00253 }
00254
00255 void RadialGradientBrushProperties::SpreadMethod(winrt::GradientSpreadMethod const& value)
00256 {
00257     [[gsl::suppress(con)]]
00258     {
00259     static_cast<RadialGradientBrush*>(this)->SetValue(s_SpreadMethodProperty, ValueHelper<winrt::GradientSpreadMethod>::BoxValueIfNecessary(value));
00260     }
00261 }
00262
00263 winrt::GradientSpreadMethod RadialGradientBrushProperties::SpreadMethod()
00264 {
00265     return ValueHelper<winrt::GradientSpreadMethod>::CastOrUnbox(static_cast<RadialGradientBrush*>(this)->GetValue(s_SpreadMethodProperty));
00266 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ExpanderAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ExpanderAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ExpanderAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ExpanderAutomationPeer)
00012 }
00013
00014 #include "ExpanderAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

EffectiveViewportScrollPresenterTests Member List

This is the complete list of members for EffectiveViewportScrollPresenterTests, including all inherited members.
CanBringIntoViewElements() | EffectiveViewportScrollPresenterTests | [inline]
CanGrowCacheBuffer() | EffectiveViewportScrollPresenterTests | [inline]
GetMonitoringLayout(Size desiredSize, List< Rect > realizationRects) | EffectiveViewportScrollPresenterTests | [inline, private, static]
ValidateOneScrollPresenterScenario() | EffectiveViewportScrollPresenterTests | [inline]
ValidateRealizedRange(ItemsRepeater itemsRepeater, int expectedFirstItemIndex, int expectedLastItemIndex) | EffectiveViewportScrollPresenterTests | [inline, private]
ValidateTwoScrollPresentersScenario() | EffectiveViewportScrollPresenterTests | [inline]
Generated on Sun Dec 1 2024 20:53:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ListViewBasePage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ListViewBasePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Controls.Primitives;
00007 using Microsoft.UI.Xaml.Input;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Media.Imaging;
00010 using Microsoft.UI.Xaml.Navigation;
00011 using MUXControlsTestApp.Samples.Model;
00012 using System;
00013 using System.Collections.Generic;
00014 using System.Collections.ObjectModel;
00015 using System.Linq;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed partial class ListViewBasePage : TestPage
00020     {
00021         private enum QueuedOperationType
00022         {
00023             DataSourceAdd,
00024             DataSourceInsert,
00025             DataSourceRemove,
00026             DataSourceRemoveAll,
00027             DataSourceReplace,
00028             DataSourceRaiseResetNotification
00029         }
00030
00031         private class QueuedOperation
00032         {
00033             public QueuedOperation(QueuedOperationType type)
00034             {
00035                 this.Type = type;
00036             }
00037
00038             public QueuedOperation(QueuedOperationType type, double value)
00039             {
00040                 this.Type = type;
00041                 this.DoubleValue = value;
00042             }
00043
00044             public QueuedOperation(QueuedOperationType type, int value)
00045             {
00046                 this.Type = type;
00047                 this.IntValue = value;
00048             }
00049
00050             public QueuedOperation(QueuedOperationType type, string value)
00051             {
00052                 this.Type = type;
00053                 this.StringValue = value;
00054             }
00055
00056             public QueuedOperationType Type { get; set; }
00057             public double DoubleValue { get; set; }
00058             public int IntValue { get; set; }
00059             public string StringValue { get; set; }
00060         }
00061
00062         private EntityObservableCollection _colEntities = null;
00063         private ListViewBase _listViewBase = null;
00064         private ScrollViewer _scrollViewer = null;
00065         private ItemsPanelTemplate _modernPanelTemplate = null;
00066         private List<QueuedOperation> _lstQueuedOperations = new List<QueuedOperation>();
00067         private DispatcherTimer _queuedOperationsTimer = new DispatcherTimer();
00068
00069         public ListViewBasePage()
00070         {
00071             this.InitializeComponent();
00072
00073             _queuedOperationsTimer.Interval = new TimeSpan(0, 0, 10 /*sec*/);
00074             _queuedOperationsTimer.Tick += QueuedOperationsTimer_Tick;
00075
00076             Loaded += ListViewBasePage_Loaded;
00077         }
00078
00079         protected override void OnNavigatedTo(NavigationEventArgs e)
00080         {
00081             bool useGridView = (bool)e.Parameter;
00082
00083             _listViewBase = useGridView ? gridView : listView;
00084             _listViewBase.Visibility = Visibility.Visible;
00085
00086             if (useGridView)
00087             {
00088                 tblListViewBasePageTitle.Text = "GridView";
00089                 tblItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Visible;
00090                 nbItemsWrapGridMaximumRowsOrColumns.Visibility = Visibility.Visible;
00091             }
00092             else
00093             {
00094                 tblListViewBasePageTitle.Text = "ListView";
00095             }
00096
00097             base.OnNavigatedTo(e);
00098         }
00099
00100         private void ListViewBasePage_Loaded(object sender, RoutedEventArgs e)
00101         {
00102             _scrollViewer = FindElementOfTypeInSubtree<ScrollViewer>(_listViewBase);
00103
00104             _colEntities = new EntityObservableCollection();
00105
00106             for (int itemIndex = 0; itemIndex < 250; itemIndex++)
00107             {
00108                 BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);
00109
00110                 _colEntities.Add(new Entity()
00111                 {
00112                     BitmapImage = bitmapImage,
00113                     Id = itemIndex
00114                 });
00115             }
00116
00117             UpdateItemsPanelType();
00118             UpdateListViewBaseSingleSelectionFollowsFocus();
00119
00120             _listViewBase.ItemsSource = _colEntities;
00121         }
00122
00123         // Workaround to avoid the ListViewBase not being scrollable after an ItemsPanel change to VirtualizingStackPanel.
00124         private void RestoreScrollViewerWidth()
00125         {
00126             if (_scrollViewer != null)
00127             {
00128                 _scrollViewer.Width = double.NaN;
00129
00130                 _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerSizeProperties);
00131             }
00132         }
00133
00134         private void UpdateItemsPanelType()
00135         {
00136             try
00137             {
00138                 if (_listViewBase != null && cmbListViewBaseItemsPanelType != null)
00139                 {
00140                     switch (cmbListViewBaseItemsPanelType.SelectedIndex)
00141                     {
00142                         case 0:
00143                             if (_modernPanelTemplate == null)
00144                             {
00145                                 _modernPanelTemplate = _listViewBase.ItemsPanel;
00146                             }
00147                             else
00148                             {
00149                                 _listViewBase.ItemsPanel = _modernPanelTemplate;
00150                                 UpdateModernPanelUIVisibility(Visibility.Visible);
00151                             }
00152                             break;
00153                         case 1: // Use the virtualizingStackPanelItemsPanelTemplate resource
00154                             _listViewBase.ItemsPanel = Resources["virtualizingStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
00155                             UpdateModernPanelUIVisibility(Visibility.Collapsed);
00156                             break;
00157                         case 2: // Use the stackPanelItemsPanelTemplate resource
00158                             _listViewBase.ItemsPanel = Resources["stackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
00159                             UpdateModernPanelUIVisibility(Visibility.Collapsed);
00160                             break;
00161                     }
00162
00163                     // _listViewBase.ItemsPanelRoot is only updated asynchronously.
00164                     _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateItemsPanelProperties);
00165                 }
00166             }
00167             catch (Exception ex)
00168             {
00169                 txtExceptionReport.Text = ex.ToString();
00170                 AppendEventMessage(ex.ToString());
00171             }
00172         }
00173
00174         private void UpdateItemsPanelProperties()
00175         {
00176             UpdateItemsPanelOrientation();
00177             UpdateItemsPanelMargin();
00178
00179             if (_listViewBase.ItemsPanel == _modernPanelTemplate && _listViewBase == gridView)
00180             {
00181                 UpdateItemsWrapGridMaximumRowsOrColumns();
00182             }
00183
00184             // _listViewBase.ItemsPanelRoot is only updated asynchronously.
00185             _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerScrollOrientation);
00186             _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerProperties);
00187         }
00188
00189         private void UpdateListViewBaseReorderMode()
00190         {
00191             if (_listViewBase != null && cmbListViewBaseReorderMode != null)
00192             {
00193                 cmbListViewBaseReorderMode.SelectedIndex = (int)_listViewBase.ReorderMode;
00194             }
00195         }
00196
00197         private void UpdateListViewBaseSelectionMode()
00198         {
00199             if (_listViewBase != null && cmbListViewBaseSelectionMode != null)
00200             {
00201                 cmbListViewBaseSelectionMode.SelectedIndex = (int)_listViewBase.SelectionMode;
00202             }
00203         }
00204
00205         private void UpdateListViewBaseSingleSelectionFollowsFocus()
00206         {
00207             if (_listViewBase != null && chkListViewBaseSingleSelectionFollowsFocus != null)
00208             {
00209                 chkListViewBaseSingleSelectionFollowsFocus.IsChecked = _listViewBase.SingleSelectionFollowsFocus;
00210             }
00211         }
00212
00213         private void UpdateListViewBaseTabNavigation()
00214         {
00215             if (_listViewBase != null && cmbListViewBaseTabNavigation != null)
00216             {
00217                 cmbListViewBaseTabNavigation.SelectedIndex = (int)_listViewBase.TabNavigation;
00218             }
00219         }
00220
00221         private void UpdateItemsPanelOrientation()
00222         {
00223             if (_listViewBase != null && cmbItemsPanelOrientation != null)
00224             {
00225                 ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;
00226
00227                 if (itemsWrapGrid != null)
00228                 {
00229                     cmbItemsPanelOrientation.SelectedIndex = (int)itemsWrapGrid.Orientation;
00230                 }
00231                 else
00232                 {
00233                     ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;
00234
00235                     if (itemsStackPanel != null)
00236                     {
00237                         cmbItemsPanelOrientation.SelectedIndex = (int)itemsStackPanel.Orientation;
00238                     }
00239                     else
00240                     {
00241                         VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;
00242
00243                         if (virtualizingStackPanel != null)
00244                         {
00245                             cmbItemsPanelOrientation.SelectedIndex = (int)virtualizingStackPanel.Orientation;
00246                         }
00247                         else
00248                         {
00249                             StackPanel stackPanel = _listViewBase.ItemsPanelRoot as StackPanel;
00250
00251                             if (stackPanel != null)
00252                             {
00253                                 cmbItemsPanelOrientation.SelectedIndex = (int)stackPanel.Orientation;
00254                             }
00255                         }
00256                     }
00257                 }
00258             }
00259         }
00260
00261         private void UpdateItemsWrapGridMaximumRowsOrColumns()
00262         {
00263             try
00264             {
00265                 if (_listViewBase != null && nbItemsWrapGridMaximumRowsOrColumns != null)
00266                 {
00267                     ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;
00268
00269                     if (itemsWrapGrid != null && itemsWrapGrid.MaximumRowsOrColumns != -1)
00270                     {
00271                         nbItemsWrapGridMaximumRowsOrColumns.Value = itemsWrapGrid.MaximumRowsOrColumns;
00272                     }
00273                 }
00274             }
00275             catch (Exception ex)
00276             {
00277                 txtExceptionReport.Text = ex.ToString();
00278                 AppendEventMessage(ex.ToString());
00279             }
00280         }
00281
00282         private void UpdateItemsPanelMargin()
00283         {
00284             try
00285             {
00286                 if (_listViewBase != null && txtItemsPanelMargin != null)
00287                 {
00288                     Panel itemsPanel = _listViewBase.ItemsPanelRoot;
00289
00290                     if (itemsPanel != null)
00291                     {
00292                         txtItemsPanelMargin.Text = itemsPanel.Margin.ToString();
00293                     }
00294                 }
00295             }
00296             catch (Exception ex)
00297             {
00298                 txtExceptionReport.Text = ex.ToString();
00299                 AppendEventMessage(ex.ToString());
00300             }
00301         }
00302
00303         private void UpdateModernPanelUIVisibility(Visibility visibility)
00304         {
00305             if (_listViewBase == gridView)
00306             {
00307                 tblItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
00308                 nbItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
00309             }
00310         }
00311
00312         private void UpdateScrollViewerScrollOrientation()
00313         {
00314             try
00315             {
00316                 if (_listViewBase != null)
00317                 {
00318                     Orientation scrollOrientation = Orientation.Horizontal;
00319
00320                     ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;
00321
00322                     if (itemsWrapGrid != null)
00323                     {
00324                         if (itemsWrapGrid.Orientation == Orientation.Horizontal)
00325                         {
00326                             scrollOrientation = Orientation.Vertical;
00327                         }
00328                     }
00329                     else
00330                     {
00331                         ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;
00332
00333                         if (itemsStackPanel != null)
00334                         {
00335                             if (itemsStackPanel.Orientation == Orientation.Vertical)
00336                             {
00337                                 scrollOrientation = Orientation.Vertical;
00338                             }
00339                         }
00340                         else
00341                         {
00342                             VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;
00343
00344                             if (virtualizingStackPanel != null)
00345                             {
00346                                 if (virtualizingStackPanel.Orientation == Orientation.Vertical)
00347                                 {
00348                                     scrollOrientation = Orientation.Vertical;
00349                                 }
00350                             }
00351                             else
00352                             {
00353                                 StackPanel stackPanel = _listViewBase.ItemsPanelRoot as StackPanel;
00354
00355                                 if (stackPanel != null && stackPanel.Orientation == Orientation.Vertical)
00356                                 {
00357                                     scrollOrientation = Orientation.Vertical;
00358                                 }
00359                             }
00360                         }
00361                     }
00362
00363                     if (scrollOrientation == Orientation.Vertical)
00364                     {
00365                         ScrollViewer.SetHorizontalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Disabled);
00366                         ScrollViewer.SetVerticalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Auto);
00367                         ScrollViewer.SetHorizontalScrollMode(_listViewBase, ScrollMode.Disabled);
00368                         ScrollViewer.SetVerticalScrollMode(_listViewBase, ScrollMode.Enabled);
00369                         ScrollViewer.SetIsHorizontalRailEnabled(_listViewBase, false);
00370                         ScrollViewer.SetIsVerticalRailEnabled(_listViewBase, true);
00371                     }
00372                     else
00373                     {
00374                         ScrollViewer.SetHorizontalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Auto);
00375                         ScrollViewer.SetVerticalScrollBarVisibility(_listViewBase, ScrollBarVisibility.Disabled);
00376                         ScrollViewer.SetHorizontalScrollMode(_listViewBase, ScrollMode.Enabled);
00377                         ScrollViewer.SetVerticalScrollMode(_listViewBase, ScrollMode.Disabled);
00378                         ScrollViewer.SetIsHorizontalRailEnabled(_listViewBase, true);
00379                         ScrollViewer.SetIsVerticalRailEnabled(_listViewBase, false);
00380                     }
00381                 }
00382             }
00383             catch (Exception ex)
00384             {
00385                 txtExceptionReport.Text = ex.ToString();
00386                 AppendEventMessage(ex.ToString());
00387             }
00388         }
00389
00390         private void UpdateScrollViewerSizeProperties()
00391         {
00392             UpdateScrollViewerViewportWidth();
00393             UpdateScrollViewerViewportHeight();
00394             UpdateScrollViewerExtentWidth();
00395             UpdateScrollViewerExtentHeight();
00396             UpdateScrollViewerHorizontalOffset();
00397             UpdateScrollViewerVerticalOffset();
00398         }
00399
00400         private void UpdateScrollViewerProperties()
00401         {
00402             if (_listViewBase != null && _scrollViewer != null && _listViewBase.ItemsPanelRoot is VirtualizingStackPanel)
00403             {
00404                 // Workaround to avoid the ListViewBase not being scrollable after an ItemsPanel change to VirtualizingStackPanel.
00405                 // Resizing the ScrollViewer temporarily fixes its manipulability.
00406                 _scrollViewer.Width = _scrollViewer.ActualWidth + 1;
00407
00408                 _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, RestoreScrollViewerWidth);
00409             }
00410
00411             UpdateScrollViewerSizeProperties();
00412             UpdateScrollViewerHorizontalSnapPointsType();
00413             UpdateScrollViewerVerticalSnapPointsType();
00414         }
00415
00416         private void UpdateScrollViewerViewportWidth()
00417         {
00418             try
00419             {
00420                 if (_scrollViewer != null && txtScrollViewerViewportWidth != null)
00421                 {
00422                     txtScrollViewerViewportWidth.Text = _scrollViewer.ViewportWidth.ToString();
00423                 }
00424             }
00425             catch (Exception ex)
00426             {
00427                 txtExceptionReport.Text = ex.ToString();
00428                 AppendEventMessage(ex.ToString());
00429             }
00430         }
00431
00432         private void UpdateScrollViewerViewportHeight()
00433         {
00434             try
00435             {
00436                 if (_scrollViewer != null && txtScrollViewerViewportHeight != null)
00437                 {
00438                     txtScrollViewerViewportHeight.Text = _scrollViewer.ViewportHeight.ToString();
00439                 }
00440             }
00441             catch (Exception ex)
00442             {
00443                 txtExceptionReport.Text = ex.ToString();
00444                 AppendEventMessage(ex.ToString());
00445             }
00446         }
00447
00448         private void UpdateScrollViewerExtentWidth()
00449         {
00450             try
00451             {
00452                 if (_scrollViewer != null && txtScrollViewerExtentWidth != null)
00453                 {
00454                     txtScrollViewerExtentWidth.Text = _scrollViewer.ExtentWidth.ToString();
00455                 }
00456             }
00457             catch (Exception ex)
00458             {
00459                 txtExceptionReport.Text = ex.ToString();
00460                 AppendEventMessage(ex.ToString());
00461             }
00462         }
00463
00464         private void UpdateScrollViewerExtentHeight()
00465         {
00466             try
00467             {
00468                 if (_scrollViewer != null && txtScrollViewerExtentHeight != null)
00469                 {
00470                     txtScrollViewerExtentHeight.Text = _scrollViewer.ExtentHeight.ToString();
00471                 }
00472             }
00473             catch (Exception ex)
00474             {
00475                 txtExceptionReport.Text = ex.ToString();
00476                 AppendEventMessage(ex.ToString());
00477             }
00478         }
00479
00480         private void UpdateScrollViewerHorizontalOffset()
00481         {
00482             try
00483             {
00484                 if (_scrollViewer != null && txtScrollViewerHorizontalOffset != null)
00485                 {
00486                     txtScrollViewerHorizontalOffset.Text = _scrollViewer.HorizontalOffset.ToString();
00487                 }
00488             }
00489             catch (Exception ex)
00490             {
00491                 txtExceptionReport.Text = ex.ToString();
00492                 AppendEventMessage(ex.ToString());
00493             }
00494         }
00495
00496         private void UpdateScrollViewerVerticalOffset()
00497         {
00498             try
00499             {
00500                 if (_scrollViewer != null && txtScrollViewerVerticalOffset != null)
00501                 {
00502                     txtScrollViewerVerticalOffset.Text = _scrollViewer.VerticalOffset.ToString();
00503                 }
00504             }
00505             catch (Exception ex)
00506             {
00507                 txtExceptionReport.Text = ex.ToString();
00508                 AppendEventMessage(ex.ToString());
00509             }
00510         }
00511
00512         private void UpdateScrollViewerHorizontalSnapPointsType()
00513         {
00514             try
00515             {
00516                 if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsType != null)
00517                 {
00518                     cmbScrollViewerHorizontalSnapPointsType.SelectedIndex = (int)_scrollViewer.HorizontalSnapPointsType;
00519                 }
00520             }
00521             catch (Exception ex)
00522             {
00523                 txtExceptionReport.Text = ex.ToString();
00524                 AppendEventMessage(ex.ToString());
00525             }
00526         }
00527
00528         private void UpdateScrollViewerVerticalSnapPointsType()
00529         {
00530             try
00531             {
00532                 if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsType != null)
00533                 {
00534                     cmbScrollViewerVerticalSnapPointsType.SelectedIndex = (int)_scrollViewer.VerticalSnapPointsType;
00535                 }
00536             }
00537             catch (Exception ex)
00538             {
00539                 txtExceptionReport.Text = ex.ToString();
00540                 AppendEventMessage(ex.ToString());
00541             }
00542         }
00543
00544         private void UpdateDataSourceItemCount()
00545         {
00546             if (_listViewBase != null && txtDataSourceItemCount != null)
00547             {
00548                 if (_listViewBase.ItemsSource == null)
00549                 {
00550                     txtDataSourceItemCount.Text = "0";
00551                 }
00552                 else if (_listViewBase.ItemsSource == _colEntities)
00553                 {
00554                     txtDataSourceItemCount.Text = _colEntities.Count.ToString();
00555                 }
00556             }
00557         }
00558
00559         private BitmapImage GetBitmapImage(int index)
00560         {
00561             Uri uri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", index));
00562             BitmapImage bitmapImage = new BitmapImage();
00563             bitmapImage.DecodePixelWidth = 120;
00564             bitmapImage.DecodePixelHeight = 120;
00565             bitmapImage.UriSource = uri;
00566             return bitmapImage;
00567         }
00568
00569         private void DataSourceAddItem()
00570         {
00571             try
00572             {
00573                 if (_listViewBase != null && _listViewBase.ItemsSource != null)
00574                 {
00575                     if (_listViewBase.ItemsSource == _colEntities)
00576                     {
00577                         BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);
00578
00579                         var entity = new Entity()
00580                         {
00581                             BitmapImage = bitmapImage,
00582                             Id = _colEntities.Count
00583                         };
00584
00585                         _colEntities.Add(entity);
00586                     }
00587                 }
00588             }
00589             catch (Exception ex)
00590             {
00591                 txtExceptionReport.Text = ex.ToString();
00592                 AppendEventMessage(ex.ToString());
00593             }
00594         }
00595
00596         private void DataSourceInsertItem(int newItemIndex)
00597         {
00598             try
00599             {
00600                 if (_listViewBase != null && _listViewBase.ItemsSource != null)
00601                 {
00602                     if (_listViewBase.ItemsSource == _colEntities)
00603                     {
00604                         BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);
00605
00606                         var entity = new Entity()
00607                         {
00608                             BitmapImage = bitmapImage,
00609                             Id = _colEntities.Count
00610                         };
00611
00612                         _colEntities.Insert(newItemIndex, entity);
00613                     }
00614                 }
00615             }
00616             catch (Exception ex)
00617             {
00618                 txtExceptionReport.Text = ex.ToString();
00619                 AppendEventMessage(ex.ToString());
00620             }
00621         }
00622
00623         private void DataSourceRemoveAllItems()
00624         {
00625             try
00626             {
00627                 if (_listViewBase != null && _listViewBase.ItemsSource != null)
00628                 {
00629                     if (_listViewBase.ItemsSource == _colEntities)
00630                     {
00631                         _colEntities.Clear();
00632                     }
00633                 }
00634             }
00635             catch (Exception ex)
00636             {
00637                 txtExceptionReport.Text = ex.ToString();
00638                 AppendEventMessage(ex.ToString());
00639             }
00640         }
00641
00642         private void DataSourceRemoveItem(int oldItemIndex)
00643         {
00644             try
00645             {
00646                 if (_listViewBase != null && _listViewBase.ItemsSource != null)
00647                 {
00648                     if (_listViewBase.ItemsSource == _colEntities)
00649                     {
00650                         _colEntities.RemoveAt(oldItemIndex);
00651                     }
00652                 }
00653             }
00654             catch (Exception ex)
00655             {
00656                 txtExceptionReport.Text = ex.ToString();
00657                 AppendEventMessage(ex.ToString());
00658             }
00659         }
00660
00661         private void DataSourceReplaceItem(int itemIndex)
00662         {
00663             try
00664             {
00665                 if (_listViewBase != null && _listViewBase.ItemsSource != null)
00666                 {
00667                     if (_listViewBase.ItemsSource == _colEntities)
00668                     {
00669                         BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);
00670
00671                         var entity = new Entity()
00672                         {
00673                             BitmapImage = bitmapImage,
00674                             Id = _colEntities.Count
00675                         };
00676
00677                         _colEntities[itemIndex] = entity;
00678                     }
00679                 }
00680             }
00681             catch (Exception ex)
00682             {
00683                 txtExceptionReport.Text = ex.ToString();
00684                 AppendEventMessage(ex.ToString());
00685             }
00686         }
00687
00688         private void DataSourceRaiseResetNotification()
00689         {
00690             if (_colEntities != null)
00691             {
00692                 _colEntities.RaiseResetNotification();
00693             }
00694         }
00695
00696         private void ListViewBase_ItemClick(object sender, ItemClickEventArgs e)
00697         {
00698             try
00699             {
00700                 AppendEventMessage($"ListViewBase_ItemClick ClickedItem={e.ClickedItem.ToString()}");
00701             }
00702             catch (Exception ex)
00703             {
00704                 txtExceptionReport.Text = ex.ToString();
00705                 AppendEventMessage(ex.ToString());
00706             }
00707         }
00708
00709         private void BtnGetListViewBaseReorderMode_Click(object sender, RoutedEventArgs e)
00710         {
00711             UpdateListViewBaseReorderMode();
00712         }
00713
00714         private void BtnSetListViewBaseReorderMode_Click(object sender, RoutedEventArgs e)
00715         {
00716             if (_listViewBase != null && cmbListViewBaseReorderMode != null)
00717             {
00718                 _listViewBase.ReorderMode = (ListViewReorderMode)cmbListViewBaseReorderMode.SelectedIndex;
00719             }
00720         }
00721
00722         private void BtnGetListViewBaseSelectionMode_Click(object sender, RoutedEventArgs e)
00723         {
00724             UpdateListViewBaseSelectionMode();
00725         }
00726
00727         private void BtnSetListViewBaseSelectionMode_Click(object sender, RoutedEventArgs e)
00728         {
00729             if (_listViewBase != null && cmbListViewBaseSelectionMode != null)
00730             {
00731                 _listViewBase.SelectionMode = (ListViewSelectionMode) cmbListViewBaseSelectionMode.SelectedIndex;
00732             }
00733         }
00734
00735         private void BtnGetListViewBaseTabNavigation_Click(object sender, RoutedEventArgs e)
00736         {
00737             UpdateListViewBaseTabNavigation();
00738         }
00739
00740         private void BtnSetListViewBaseTabNavigation_Click(object sender, RoutedEventArgs e)
00741         {
00742             if (_listViewBase != null && cmbListViewBaseTabNavigation != null)
00743             {
00744                 _listViewBase.TabNavigation = (KeyboardNavigationMode)cmbListViewBaseTabNavigation.SelectedIndex;
00745             }
00746         }
00747
00748         private void CmbListViewBaseItemsPanelType_SelectionChanged(object sender, SelectionChangedEventArgs e)
00749         {
00750             UpdateItemsPanelType();
00751         }
00752
00753         private void CmbListViewBaseHeader_SelectionChanged(object sender, SelectionChangedEventArgs e)
00754         {
00755             try
00756             {
00757                 if (_listViewBase != null && cmbListViewBaseHeader != null)
00758                 {
00759                     switch (cmbListViewBaseHeader.SelectedIndex)
00760                     {
00761                         case 0: /*None*/
00762                             _listViewBase.Header = null;
00763                             break;
00764                         case 1: /*Non-focusable*/
00765                             _listViewBase.Header = new TextBlock()
00766                             {
00767                                 FontSize = 18.0,
00768                                 Margin = new Thickness(10.0),
00769                                 Text = "Header"
00770                             };
00771                             break;
00772                         case 2: /*Focusable*/
00773                             _listViewBase.Header = new Button()
00774                             {
00775                                 Content = "Header",
00776                                 FontSize = 18.0,
00777                                 Margin = new Thickness(10.0)
00778                             };
00779                             break;
00780                     }
00781                 }
00782             }
00783             catch (Exception ex)
00784             {
00785                 txtExceptionReport.Text = ex.ToString();
00786                 AppendEventMessage(ex.ToString());
00787             }
00788         }
00789
00790         private void CmbListViewBaseFooter_SelectionChanged(object sender, SelectionChangedEventArgs e)
00791         {
00792             try
00793             {
00794                 if (_listViewBase != null && cmbListViewBaseFooter != null)
00795                 {
00796                     switch (cmbListViewBaseFooter.SelectedIndex)
00797                     {
00798                         case 0: /*None*/
00799                             _listViewBase.Footer = null;
00800                             break;
00801                         case 1: /*Non-focusable*/
00802                             _listViewBase.Footer = new TextBlock()
00803                             {
00804                                 FontSize = 18.0,
00805                                 Margin = new Thickness(10.0),
00806                                 Text = "Footer"
00807                             };
00808                             break;
00809                         case 2: /*Focusable*/
00810                             _listViewBase.Footer = new Button()
00811                             {
00812                                 Content = "Footer",
00813                                 FontSize = 18.0,
00814                                 Margin = new Thickness(10.0)
00815                             };
00816                             break;
00817                     }
00818                 }
00819             }
00820             catch (Exception ex)
00821             {
00822                 txtExceptionReport.Text = ex.ToString();
00823                 AppendEventMessage(ex.ToString());
00824             }
00825         }
00826
00827         private void BtnGetItemsPanelOrientation_Click(object sender, RoutedEventArgs e)
00828         {
00829             UpdateItemsPanelOrientation();
00830         }
00831
00832         private void BtnSetItemsPanelOrientation_Click(object sender, RoutedEventArgs e)
00833         {
00834             if (_listViewBase != null && cmbItemsPanelOrientation != null)
00835             {
00836                 ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;
00837
00838                 if (itemsWrapGrid != null)
00839                 {
00840                     _listViewBase.ItemsSource = null;
00841
00842                     itemsWrapGrid.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
00843                 }
00844                 else
00845                 {
00846                     ItemsStackPanel itemsStackPanel = _listViewBase.ItemsPanelRoot as ItemsStackPanel;
00847
00848                     if (itemsStackPanel != null)
00849                     {
00850                         _listViewBase.ItemsSource = null;
00851
00852                         itemsStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
00853                     }
00854                     else
00855                     {
00856                         VirtualizingStackPanel virtualizingStackPanel = _listViewBase.ItemsPanelRoot as VirtualizingStackPanel;
00857
00858                         if (virtualizingStackPanel != null)
00859                         {
00860                             virtualizingStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
00861                         }
00862                         else
00863                         {
00864                             StackPanel stackPanel = _listViewBase.ItemsPanelRoot as StackPanel;
00865
00866                             if (stackPanel != null)
00867                             {
00868                                 stackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
00869                             }
00870                         }
00871                     }
00872                 }
00873
00874                 _listViewBase.ItemsSource = _colEntities;
00875
00876                 // _listViewBase.ItemsPanelRoot is only updated asynchronously.
00877                 _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerScrollOrientation);
00878                 _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateScrollViewerProperties);
00879             }
00880         }
00881
00882         private void BtnGetItemsPanelMargin_Click(object sender, RoutedEventArgs e)
00883         {
00884             UpdateItemsPanelMargin();
00885         }
00886
00887         private void BtnSetItemsPanelMargin_Click(object sender, RoutedEventArgs e)
00888         {
00889             try
00890             {
00891                 if (_listViewBase != null && txtItemsPanelMargin != null)
00892                 {
00893                     Panel itemsPanel = _listViewBase.ItemsPanelRoot;
00894
00895                     if (itemsPanel != null)
00896                     {
00897                         itemsPanel.Margin = GetThicknessFromString(txtItemsPanelMargin.Text);
00898                     }
00899                 }
00900             }
00901             catch (Exception ex)
00902             {
00903                 txtExceptionReport.Text = ex.ToString();
00904                 AppendEventMessage(ex.ToString());
00905             }
00906         }
00907
00908         private void BtnGetScrollViewerViewportWidth_Click(object sender, RoutedEventArgs e)
00909         {
00910             UpdateScrollViewerViewportWidth();
00911         }
00912
00913         private void BtnGetScrollViewerViewportHeight_Click(object sender, RoutedEventArgs e)
00914         {
00915             UpdateScrollViewerViewportHeight();
00916         }
00917
00918         private void BtnGetScrollViewerExtentWidth_Click(object sender, RoutedEventArgs e)
00919         {
00920             UpdateScrollViewerExtentWidth();
00921         }
00922
00923         private void BtnGetScrollViewerExtentHeight_Click(object sender, RoutedEventArgs e)
00924         {
00925             UpdateScrollViewerExtentHeight();
00926         }
00927
00928         private void BtnGetScrollViewerHorizontalOffset_Click(object sender, RoutedEventArgs e)
00929         {
00930             UpdateScrollViewerHorizontalOffset();
00931         }
00932
00933         private void BtnGetScrollViewerVerticalOffset_Click(object sender, RoutedEventArgs e)
00934         {
00935             UpdateScrollViewerVerticalOffset();
00936         }
00937
00938         private void CmbScrollViewerHorizontalSnapPointsType_SelectionChanged(object sender, SelectionChangedEventArgs e)
00939         {
00940             try
00941             {
00942                 if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsType != null)
00943                 {
00944                     _scrollViewer.HorizontalSnapPointsType = (SnapPointsType)cmbScrollViewerHorizontalSnapPointsType.SelectedIndex;
00945                 }
00946             }
00947             catch (Exception ex)
00948             {
00949                 txtExceptionReport.Text = ex.ToString();
00950                 AppendEventMessage(ex.ToString());
00951             }
00952         }
00953
00954         private void CmbScrollViewerVerticalSnapPointsType_SelectionChanged(object sender, SelectionChangedEventArgs e)
00955         {
00956             try
00957             {
00958                 if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsType != null)
00959                 {
00960                     _scrollViewer.VerticalSnapPointsType = (SnapPointsType)cmbScrollViewerVerticalSnapPointsType.SelectedIndex;
00961                 }
00962             }
00963             catch (Exception ex)
00964             {
00965                 txtExceptionReport.Text = ex.ToString();
00966                 AppendEventMessage(ex.ToString());
00967             }
00968         }
00969
00970         private void CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00971         {
00972             try
00973             {
00974                 if (_scrollViewer != null && cmbScrollViewerHorizontalSnapPointsAlignment != null)
00975                 {
00976                     _scrollViewer.HorizontalSnapPointsAlignment = (SnapPointsAlignment)cmbScrollViewerHorizontalSnapPointsAlignment.SelectedIndex;
00977                 }
00978             }
00979             catch (Exception ex)
00980             {
00981                 txtExceptionReport.Text = ex.ToString();
00982                 AppendEventMessage(ex.ToString());
00983             }
00984         }
00985
00986         private void CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00987         {
00988             try
00989             {
00990                 if (_scrollViewer != null && cmbScrollViewerVerticalSnapPointsAlignment != null)
00991                 {
00992                     _scrollViewer.VerticalSnapPointsAlignment = (SnapPointsAlignment)cmbScrollViewerVerticalSnapPointsAlignment.SelectedIndex;
00993                 }
00994             }
00995             catch (Exception ex)
00996             {
00997                 txtExceptionReport.Text = ex.ToString();
00998                 AppendEventMessage(ex.ToString());
00999             }
01000         }
01001
01002         private void NbItemsWrapGridMaximumRowsOrColumns_ValueChanged(object sender, object e)
01003         {
01004             try
01005             {
01006                 if (_listViewBase != null && nbItemsWrapGridMaximumRowsOrColumns != null)
01007                 {
01008                     ItemsWrapGrid itemsWrapGrid = _listViewBase.ItemsPanelRoot as ItemsWrapGrid;
01009
01010                     if (itemsWrapGrid != null)
01011                     {
01012                         itemsWrapGrid.MaximumRowsOrColumns = (int)nbItemsWrapGridMaximumRowsOrColumns.Value;
01013                     }
01014                 }
01015             }
01016             catch (Exception ex)
01017             {
01018                 txtExceptionReport.Text = ex.ToString();
01019                 AppendEventMessage(ex.ToString());
01020             }
01021         }
01022
01023         private void BtnDataSourceGetItemCount_Click(object sender, RoutedEventArgs e)
01024         {
01025             UpdateDataSourceItemCount();
01026         }
01027
01028         private void BtnDataSourceSetItemCount_Click(object sender, RoutedEventArgs e)
01029         {
01030             try
01031             {
01032                 if (_listViewBase != null && _listViewBase.ItemsSource != null && txtDataSourceItemCount != null)
01033                 {
01034                     int newItemCount = int.Parse(txtDataSourceItemCount.Text);
01035
01036                     if (_listViewBase.ItemsSource == _colEntities)
01037                     {
01038                         if (_colEntities.Count < newItemCount)
01039                         {
01040                             var colEntitiesEnd = new List<Entity>();
01041
01042                             for (int itemIndex = 0; itemIndex < newItemCount - _colEntities.Count; itemIndex++)
01043                             {
01044                                 BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);
01045
01046                                 colEntitiesEnd.Add(new Entity()
01047                                 {
01048                                     BitmapImage = bitmapImage,
01049                                     Id = itemIndex
01050                                 });
01051                             }
01052
01053                             _colEntities = new EntityObservableCollection(_colEntities.Collection.Concat(colEntitiesEnd));
01054                         }
01055                         else if (_colEntities.Count > newItemCount)
01056                         {
01057                             _colEntities = new EntityObservableCollection(_colEntities.Collection.Take(newItemCount));
01058                         }
01059
01060                         _listViewBase.ItemsSource = _colEntities;
01061                     }
01062                 }
01063             }
01064             catch (Exception ex)
01065             {
01066                 txtExceptionReport.Text = ex.ToString();
01067                 AppendEventMessage(ex.ToString());
01068             }
01069         }
01070
01071         private void BtnDataSourceAddItem_Click(object sender, RoutedEventArgs e)
01072         {
01073             AppendEventMessage("DataSourceAdd");
01074             DataSourceAddItem();
01075         }
01076
01077         private void BtnQueueDataSourceAddItem_Click(object sender, RoutedEventArgs e)
01078         {
01079             AppendEventMessage("Queued DataSourceAdd");
01080             EnqueueOperation(QueuedOperationType.DataSourceAdd);
01081         }
01082
01083         private void BtnDataSourceInsertItem_Click(object sender, RoutedEventArgs e)
01084         {
01085             try
01086             {
01087                 if (txtDataSourceItemIndex != null)
01088                 {
01089                     int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);
01090
01091                     AppendEventMessage("DataSourceInsert " + newItemIndex);
01092                     DataSourceInsertItem(newItemIndex);
01093                 }
01094             }
01095             catch (Exception ex)
01096             {
01097                 txtExceptionReport.Text = ex.ToString();
01098                 AppendEventMessage(ex.ToString());
01099             }
01100         }
01101
01102         private void BtnQueueDataSourceInsertItem_Click(object sender, RoutedEventArgs e)
01103         {
01104             try
01105             {
01106                 if (txtDataSourceItemIndex != null)
01107                 {
01108                     int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);
01109
01110                     AppendEventMessage("Queued DataSourceInsert " + newItemIndex);
01111                     EnqueueOperation(new QueuedOperation(QueuedOperationType.DataSourceInsert, newItemIndex));
01112                 }
01113             }
01114             catch (Exception ex)
01115             {
01116                 txtExceptionReport.Text = ex.ToString();
01117                 AppendEventMessage(ex.ToString());
01118             }
01119         }
01120
01121         private void BtnDataSourceRemoveAllItems_Click(object sender, RoutedEventArgs e)
01122         {
01123             AppendEventMessage("DataSourceRemoveAll");
01124             DataSourceRemoveAllItems();
01125         }
01126
01127         private void BtnQueueDataSourceRemoveAllItems_Click(object sender, RoutedEventArgs e)
01128         {
01129             AppendEventMessage("Queued DataSourceRemoveAll");
01130             EnqueueOperation(QueuedOperationType.DataSourceRemoveAll);
01131         }
01132
01133         private void BtnDataSourceRaiseResetNotification_Click(object sender, RoutedEventArgs e)
01134         {
01135             AppendEventMessage("DataSourceRaiseResetNotification");
01136             DataSourceRaiseResetNotification();
01137         }
01138
01139         private void BtnQueueDataSourceRaiseResetNotification_Click(object sender, RoutedEventArgs e)
01140         {
01141             AppendEventMessage("Queued DataSourceRaiseResetNotification");
01142             EnqueueOperation(QueuedOperationType.DataSourceRaiseResetNotification);
01143         }
01144
01145         private void BtnDataSourceRemoveItem_Click(object sender, RoutedEventArgs e)
01146         {
01147             try
01148             {
01149                 if (txtDataSourceItemIndex != null)
01150                 {
01151                     int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);
01152
01153                     AppendEventMessage("DataSourceRemove " + oldItemIndex);
01154                     DataSourceRemoveItem(oldItemIndex);
01155                 }
01156             }
01157             catch (Exception ex)
01158             {
01159                 txtExceptionReport.Text = ex.ToString();
01160                 AppendEventMessage(ex.ToString());
01161             }
01162         }
01163
01164         private void BtnQueueDataSourceRemoveItem_Click(object sender, RoutedEventArgs e)
01165         {
01166             try
01167             {
01168                 if (txtDataSourceItemIndex != null)
01169                 {
01170                     int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);
01171
01172                     AppendEventMessage("Queued DataSourceRemove " + oldItemIndex);
01173                     EnqueueOperation(new QueuedOperation(QueuedOperationType.DataSourceRemove, oldItemIndex));
01174                 }
01175             }
01176             catch (Exception ex)
01177             {
01178                 txtExceptionReport.Text = ex.ToString();
01179                 AppendEventMessage(ex.ToString());
01180             }
01181         }
01182
01183         private void BtnDataSourceReplaceItem_Click(object sender, RoutedEventArgs e)
01184         {
01185             try
01186             {
01187                 if (txtDataSourceItemIndex != null)
01188                 {
01189                     int itemIndex = int.Parse(txtDataSourceItemIndex.Text);
01190
01191                     AppendEventMessage("DataSourceReplace " + itemIndex);
01192                     DataSourceReplaceItem(itemIndex);
01193                 }
01194             }
01195             catch (Exception ex)
01196             {
01197                 txtExceptionReport.Text = ex.ToString();
01198                 AppendEventMessage(ex.ToString());
01199             }
01200         }
01201
01202         private void BtnQueueDataSourceReplaceItem_Click(object sender, RoutedEventArgs e)
01203         {
01204             try
01205             {
01206                 if (txtDataSourceItemIndex != null)
01207                 {
01208                     int itemIndex = int.Parse(txtDataSourceItemIndex.Text);
01209
01210                     AppendEventMessage("Queued DataSourceReplace " + itemIndex);
01211                     EnqueueOperation(new QueuedOperation(QueuedOperationType.DataSourceReplace, itemIndex));
01212                 }
01213             }
01214             catch (Exception ex)
01215             {
01216                 txtExceptionReport.Text = ex.ToString();
01217                 AppendEventMessage(ex.ToString());
01218             }
01219         }
01220
01221         private void ChkListViewBaseAllowDrop_IsCheckedChanged(object sender, RoutedEventArgs e)
01222         {
01223             try
01224             {
01225                 if (_listViewBase != null)
01226                 {
01227                     _listViewBase.AllowDrop = (bool)chkListViewBaseAllowDrop.IsChecked;
01228                 }
01229             }
01230             catch (Exception ex)
01231             {
01232                 txtExceptionReport.Text = ex.ToString();
01233                 AppendEventMessage(ex.ToString());
01234             }
01235         }
01236
01237         private void ChkListViewBaseCanDragItems_IsCheckedChanged(object sender, RoutedEventArgs e)
01238         {
01239             try
01240             {
01241                 if (_listViewBase != null)
01242                 {
01243                     _listViewBase.CanDragItems = (bool)chkListViewBaseCanDragItems.IsChecked;
01244                 }
01245             }
01246             catch (Exception ex)
01247             {
01248                 txtExceptionReport.Text = ex.ToString();
01249                 AppendEventMessage(ex.ToString());
01250             }
01251         }
01252
01253         private void ChkListViewBaseCanReorderItems_IsCheckedChanged(object sender, RoutedEventArgs e)
01254         {
01255             try
01256             {
01257                 if (_listViewBase != null)
01258                 {
01259                     _listViewBase.CanReorderItems = (bool)chkListViewBaseCanReorderItems.IsChecked;
01260                 }
01261             }
01262             catch (Exception ex)
01263             {
01264                 txtExceptionReport.Text = ex.ToString();
01265                 AppendEventMessage(ex.ToString());
01266             }
01267         }
01268
01269         private void ChkListViewBaseIsSwipeEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
01270         {
01271             try
01272             {
01273                 if (_listViewBase != null)
01274                 {
01275                     _listViewBase.IsSwipeEnabled = (bool)chkListViewBaseIsSwipeEnabled.IsChecked;
01276                 }
01277             }
01278             catch (Exception ex)
01279             {
01280                 txtExceptionReport.Text = ex.ToString();
01281                 AppendEventMessage(ex.ToString());
01282             }
01283         }
01284
01285         private void ChkListViewBaseIsItemClickEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
01286         {
01287             try
01288             {
01289                 if (_listViewBase != null)
01290                 {
01291                     _listViewBase.IsItemClickEnabled = (bool)chkListViewBaseIsItemClickEnabled.IsChecked;
01292                 }
01293             }
01294             catch (Exception ex)
01295             {
01296                 txtExceptionReport.Text = ex.ToString();
01297                 AppendEventMessage(ex.ToString());
01298             }
01299         }
01300
01301         private void ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged(object sender, RoutedEventArgs e)
01302         {
01303             try
01304             {
01305                 if (_listViewBase != null)
01306                 {
01307                     _listViewBase.SingleSelectionFollowsFocus = (bool)chkListViewBaseSingleSelectionFollowsFocus.IsChecked;
01308                 }
01309             }
01310             catch (Exception ex)
01311             {
01312                 txtExceptionReport.Text = ex.ToString();
01313                 AppendEventMessage(ex.ToString());
01314             }
01315         }
01316
01317         private void ChkListViewBaseProperties_Checked(object sender, RoutedEventArgs e)
01318         {
01319             if (svListViewBaseProperties != null)
01320                 svListViewBaseProperties.Visibility = Visibility.Visible;
01321         }
01322
01323         private void ChkListViewBaseProperties_Unchecked(object sender, RoutedEventArgs e)
01324         {
01325             if (svListViewBaseProperties != null)
01326                 svListViewBaseProperties.Visibility = Visibility.Collapsed;
01327         }
01328
01329         private void ChkDataSource_Checked(object sender, RoutedEventArgs e)
01330         {
01331             if (svDataSource != null)
01332                 svDataSource.Visibility = Visibility.Visible;
01333         }
01334
01335         private void ChkDataSource_Unchecked(object sender, RoutedEventArgs e)
01336         {
01337             if (svDataSource != null)
01338                 svDataSource.Visibility = Visibility.Collapsed;
01339         }
01340
01341         private void ChkLogs_Checked(object sender, RoutedEventArgs e)
01342         {
01343             if (grdLogs != null)
01344                 grdLogs.Visibility = Visibility.Visible;
01345         }
01346
01347         private void ChkLogs_Unchecked(object sender, RoutedEventArgs e)
01348         {
01349             if (grdLogs != null)
01350                 grdLogs.Visibility = Visibility.Collapsed;
01351         }
01352
01353         private void AppendEventMessage(string eventMessage)
01354         {
01355             if (chkLog.IsChecked == true)
01356             {
01357                 lstLogs.Items.Add(eventMessage);
01358             }
01359         }
01360
01361         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
01362         {
01363             txtExceptionReport.Text = string.Empty;
01364         }
01365
01366         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
01367         {
01368             lstLogs.Items.Clear();
01369         }
01370
01371         private Thickness GetThicknessFromString(string thickness)
01372         {
01373             string[] lengths = thickness.Split(',');
01374             if (lengths.Length < 4)
01375                 return new Thickness(
01376                     Convert.ToDouble(lengths[0]));
01377             else
01378                 return new Thickness(
01379                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
01380         }
01381
01382         private static T FindElementOfTypeInSubtree<T>(DependencyObject element) where T : DependencyObject
01383         {
01384             if (element == null)
01385                 return null;
01386
01387             if (element is T)
01388                 return (T)element;
01389
01390             int childrenCount = VisualTreeHelper.GetChildrenCount(element);
01391             for (int i = 0; i < childrenCount; i++)
01392             {
01393                 var result = FindElementOfTypeInSubtree<T>(VisualTreeHelper.GetChild(element, i));
01394                 if (result != null)
01395                     return result;
01396             }
01397
01398             return null;
01399         }
01400
01401         private void QueuedOperationsTimer_Tick(object sender, object e)
01402         {
01403             _queuedOperationsTimer.Stop();
01404             ExecuteQueuedOperations();
01405         }
01406
01407         private void EnqueueOperation(QueuedOperationType queuedOperationType)
01408         {
01409             EnqueueOperation(new QueuedOperation(queuedOperationType));
01410         }
01411
01412         private void EnqueueOperation(QueuedOperation queuedOperation)
01413         {
01414             _lstQueuedOperations.Add(queuedOperation);
01415             _queuedOperationsTimer.Start();
01416         }
01417
01418         private void ExecuteQueuedOperations()
01419         {
01420             try
01421             {
01422                 while (_lstQueuedOperations.Count > 0)
01423                 {
01424                     QueuedOperation qo = _lstQueuedOperations[0];
01425
01426                     switch (qo.Type)
01427                     {
01428                         case QueuedOperationType.DataSourceAdd:
01429                             DataSourceAddItem();
01430                             break;
01431                         case QueuedOperationType.DataSourceInsert:
01432                             DataSourceInsertItem(qo.IntValue);
01433                             break;
01434                         case QueuedOperationType.DataSourceRemove:
01435                             DataSourceRemoveItem(qo.IntValue);
01436                             break;
01437                         case QueuedOperationType.DataSourceRemoveAll:
01438                             DataSourceRemoveAllItems();
01439                             break;
01440                         case QueuedOperationType.DataSourceReplace:
01441                             DataSourceReplaceItem(qo.IntValue);
01442                             break;
01443                         case QueuedOperationType.DataSourceRaiseResetNotification:
01444                             DataSourceRaiseResetNotification();
01445                             break;
01446                     }
01447
01448                     _lstQueuedOperations.RemoveAt(0);
01449                 }
01450             }
01451             catch (Exception ex)
01452             {
01453                 txtExceptionReport.Text = ex.ToString();
01454                 AppendEventMessage(ex.ToString());
01455             }
01456         }
01457     }
01458 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ButtonInteraction.properties.cpp Source File

  • File List
  • File Members
  • Generated

ButtonInteraction.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ButtonInteraction.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ButtonInteraction)
00012 }
00013
00014 #include "ButtonInteraction.g.cpp"
00015
00016
00017 ButtonInteractionProperties::ButtonInteractionProperties()
00018     : m_invokedEventSource{static_cast<ButtonInteraction*>(this)}
00019     , m_propertyChangedEventSource{static_cast<ButtonInteraction*>(this)}
00020 {
00021 }
00022
00023 void ButtonInteractionProperties::EnsureProperties()
00024 {
00025 }
00026
00027 void ButtonInteractionProperties::ClearProperties()
00028 {
00029 }
00030
00031 winrt::event_token ButtonInteractionProperties::Invoked(winrt::TypedEventHandler<winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs> const& value)
00032 {
00033     return m_invokedEventSource.add(value);
00034 }
00035
00036 void ButtonInteractionProperties::Invoked(winrt::event_token const& token)
00037 {
00038     m_invokedEventSource.remove(token);
00039 }
00040
00041 winrt::event_token ButtonInteractionProperties::PropertyChanged(winrt::PropertyChangedEventHandler const& value)
00042 {
00043     return m_propertyChangedEventSource.add(value);
00044 }
00045
00046 void ButtonInteractionProperties::PropertyChanged(winrt::event_token const& token)
00047 {
00048     m_propertyChangedEventSource.remove(token);
00049 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooks.h Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooks.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "WinEventLogLevels.h"
00007 #include "LayoutsTestHooks.g.h"
00008
00009 class LayoutsTestHooks :
00010     public winrt::implementation::LayoutsTestHooksT<LayoutsTestHooks>
00011 {
00012 public:
00013     static com_ptr<LayoutsTestHooks> GetGlobalTestHooks()
00014     {
00015         return s_testHooks->get_strong();
00016     }
00017
00018     static winrt::IndexBasedLayoutOrientation GetLayoutForcedIndexBasedLayoutOrientation(winrt::IInspectable const& layout);
00019     static void SetLayoutForcedIndexBasedLayoutOrientation(winrt::IInspectable const& layout, winrt::IndexBasedLayoutOrientation forcedIndexBasedLayoutOrientation);
00020     static void ResetLayoutForcedIndexBasedLayoutOrientation(winrt::IInspectable const& layout);
00021
00022     static void LayoutInvalidateMeasure(winrt::IInspectable const& layout, bool relayout);
00023
00024     static int GetLayoutFirstRealizedItemIndex(winrt::IInspectable const& layout);
00025     static int GetLayoutLastRealizedItemIndex(winrt::IInspectable const& layout);
00026
00027     static int GetLinedFlowLayoutFirstFrozenItemIndex(winrt::IInspectable const& linedFlowLayout);
00028     static int GetLinedFlowLayoutLastFrozenItemIndex(winrt::IInspectable const& linedFlowLayout);
00029
00030     static double GetLinedFlowLayoutAverageItemAspectRatio(winrt::IInspectable const& linedFlowLayout);
00031     static double GetLinedFlowLayoutRawAverageItemsPerLine(winrt::IInspectable const& linedFlowLayout);
00032     static double GetLinedFlowLayoutSnappedAverageItemsPerLine(winrt::IInspectable const& linedFlowLayout);
00033
00034     static double GetLinedFlowLayoutForcedAverageItemAspectRatio(winrt::IInspectable const& linedFlowLayout);
00035     static void SetLinedFlowLayoutForcedAverageItemAspectRatio(winrt::IInspectable const& linedFlowLayout, double forcedAverageItemAspectRatio);
00036
00037     static double GetLinedFlowLayoutForcedAverageItemsPerLineDivider(winrt::IInspectable const& linedFlowLayout);
00038     static void SetLinedFlowLayoutForcedAverageItemsPerLineDivider(winrt::IInspectable const& linedFlowLayout, double forcedAverageItemsPerLineDivider);
00039
00040     static double GetLinedFlowLayoutForcedWrapMultiplier(winrt::IInspectable const& linedFlowLayout);
00041     static void SetLinedFlowLayoutForcedWrapMultiplier(winrt::IInspectable const& linedFlowLayout, double forcedWrapMultiplier);
00042
00043     static bool GetLinedFlowLayoutIsFastPathSupported(winrt::IInspectable const& linedFlowLayout);
00044     static void SetLinedFlowLayoutIsFastPathSupported(winrt::IInspectable const& linedFlowLayout, bool isFastPathSupported);
00045
00046     static int GetLinedFlowLayoutLogItemIndex(winrt::IInspectable const& linedFlowLayout);
00047     static void SetLinedFlowLayoutLogItemIndex(winrt::IInspectable const& linedFlowLayout, int logItemIndex);
00048
00049     static winrt::event_token LinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> const& value);
00050     static void LinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::event_token const& token);
00051     static void NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::IInspectable const& linedFlowLayout);
00052
00053     static winrt::event_token LinedFlowLayoutInvalidated(winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs> const& value);
00054     static void LinedFlowLayoutInvalidated(winrt::event_token const& token);
00055     static void NotifyLinedFlowLayoutInvalidated(winrt::IInspectable const& linedFlowLayout, winrt::LinedFlowLayoutInvalidationTrigger const& invalidationTrigger);
00056
00057     static winrt::event_token LinedFlowLayoutItemLocked(winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs> const& value);
00058     static void LinedFlowLayoutItemLocked(winrt::event_token const& token);
00059     static void NotifyLinedFlowLayoutItemLocked(winrt::IInspectable const& linedFlowLayout, int itemIndex, int lineIndex);
00060
00061     static int GetLinedFlowLayoutLineIndex(winrt::IInspectable const& linedFlowLayout, int itemIndex);
00062
00063     static void ClearLinedFlowLayoutItemAspectRatios(winrt::IInspectable const& linedFlowLayout);
00064     static void UnlockLinedFlowLayoutItems(winrt::IInspectable const& linedFlowLayout);
00065
00066 private:
00067     static LayoutsTestHooks* s_testHooks;
00068
00069     winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable>> m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource;
00070     winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs>> m_linedFlowLayoutInvalidatedEventSource;
00071     winrt::event<winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs>> m_linedFlowLayoutItemLockedEventSource;
00072
00073     static void EnsureHooks();
00074 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewStretchPage Member List

This is the complete list of members for NavigationViewStretchPage, including all inherited members.
NavigationViewStretchPage() NavigationViewStretchPage [inline]
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutCommandBarTemplateSettingsFactory Member List

This is the complete list of members for CommandBarFlyoutCommandBarTemplateSettingsFactory, including all inherited members.
ClearProperties() | CommandBarFlyoutCommandBarTemplateSettingsFactory | [inline, static]
EnsureProperties() | CommandBarFlyoutCommandBarTemplateSettingsFactory | [inline, static]
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TestUI/CommandBarFlyoutPage.xaml.cs Source File

  • File List
  • File Members
  • CommandBarFlyout
  • TestUI

CommandBarFlyoutPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Linq;
00007 using Windows.Foundation.Metadata;
00008 using Windows.System;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Automation;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Controls.Primitives;
00013 using Microsoft.UI.Xaml.Input;
00014 using MUXControlsTestApp.Utilities;
00015
00016 namespace MUXControlsTestApp
00017 {
00018     public sealed partial class CommandBarFlyoutPage : TestPage
00019     {
00020         private Style animatedCommandBarFlyoutCommandBarStyle;
00021
00022         private DispatcherTimer clearSecondaryCommandsTimer = new DispatcherTimer();
00023         private CommandBarFlyout clearSecondaryCommandsFlyout;
00024
00025         private DispatcherTimer clearPrimaryCommandsTimer = new DispatcherTimer();
00026         private CommandBarFlyout clearPrimaryCommandsFlyout;
00027
00028         private DispatcherTimer addFlyoutTimer = new DispatcherTimer();
00029         private MenuFlyout flyoutToAdd = new MenuFlyout();
00030
00031         private DispatcherTimer dynamicLabelTimer = new DispatcherTimer();
00032         private DispatcherTimer dynamicVisibilityTimer = new DispatcherTimer();
00033         private DispatcherTimer dynamicWidthTimer = new DispatcherTimer();
00034         private DispatcherTimer dynamicCommandTimer = new DispatcherTimer();
00035         private AppBarButton dynamicLabelSecondaryCommand;
00036         private AppBarButton dynamicVisibilitySecondaryCommand;
00037         private FrameworkElement dynamicWidthOverflowContentRoot;
00038         private CommandBarFlyout dynamicCommandBarFlyout;
00039         private string originalLabelSecondaryCommand;
00040         private Visibility originalVisibilitySecondaryCommand;
00041         private double originalWidthOverflowContentRoot;
00042         private int dynamicLabelChangeCount;
00043         private int dynamicVisibilityChangeCount;
00044         private int dynamicWidthChangeCount;
00045
00046         public CommandBarFlyoutPage()
00047         {
00048             this.InitializeComponent();
00049
00050             animatedCommandBarFlyoutCommandBarStyle = this.Resources["animatedCommandBarFlyoutCommandBarStyle"] as Style;
00051
00052             dynamicLabelTimer.Tick += DynamicLabelTimer_Tick;
00053             dynamicVisibilityTimer.Tick += DynamicVisibilityTimer_Tick;
00054             dynamicWidthTimer.Tick += DynamicWidthTimer_Tick;
00055             dynamicCommandTimer.Tick += DynamicCommandTimer_Tick;
00056
00057             clearSecondaryCommandsTimer.Interval = new TimeSpan(0, 0, 3 /*sec*/);
00058             clearSecondaryCommandsTimer.Tick += ClearSecondaryCommandsTimer_Tick;
00059
00060             clearSecondaryCommandsTimer.Interval = new TimeSpan(0, 0, 3 /*sec*/);
00061             clearPrimaryCommandsTimer.Tick += ClearPrimaryCommandsTimer_Tick;
00062
00063             addFlyoutTimer.Interval = new TimeSpan(0, 0, 1 /*sec*/);
00064             addFlyoutTimer.Tick += AddFlyoutTimer_Tick;
00065
00066             flyoutToAdd.Items.Add(new MenuFlyoutItem() { Text = "This" });
00067             flyoutToAdd.Items.Add(new MenuFlyoutItem() { Text = "That" });
00068
00069             UndoButton1.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00070             UndoButton2.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00071             UndoButton3.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00072             UndoButton4.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00073             UndoButton5.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00074             UndoButton6.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00075             UndoButton7.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00076             UndoButton11.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00077             UndoButton12.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00078             UndoButton13.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00079             UndoButton14.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00080             UndoButton15.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Z, Modifiers = VirtualKeyModifiers.Control });
00081
00082             RedoButton1.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00083             RedoButton2.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00084             RedoButton3.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00085             RedoButton4.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00086             RedoButton5.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00087             RedoButton6.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00088             RedoButton7.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00089             RedoButton11.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00090             RedoButton12.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00091             RedoButton13.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00092             RedoButton14.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00093             RedoButton15.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00094             RedoButton16.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.Y, Modifiers = VirtualKeyModifiers.Control });
00095
00096             SelectAllButton1.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00097             SelectAllButton2.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00098             SelectAllButton3.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00099             SelectAllButton4.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00100             SelectAllButton5.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00101             SelectAllButton6.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00102             SelectAllButton7.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00103             SelectAllButton11.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00104             SelectAllButton12.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00105             SelectAllButton13.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00106             SelectAllButton14.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00107             SelectAllButton15.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00108             SelectAllButton16.KeyboardAccelerators.Add(new KeyboardAccelerator() { Key = VirtualKey.A, Modifiers = VirtualKeyModifiers.Control });
00109
00110             FlyoutTarget1.ContextFlyout = Flyout1;
00111             FlyoutTarget2.ContextFlyout = Flyout2;
00112             FlyoutTarget3.ContextFlyout = Flyout3;
00113             FlyoutTarget4.ContextFlyout = Flyout4;
00114             FlyoutTarget5.ContextFlyout = Flyout5;
00115             FlyoutTarget6.ContextFlyout = Flyout6;
00116             FlyoutTarget7.ContextFlyout = Flyout7;
00117             FlyoutTarget11.ContextFlyout = Flyout11;
00118             FlyoutTarget12.ContextFlyout = Flyout12;
00119             FlyoutTarget13.ContextFlyout = Flyout13;
00120             FlyoutTarget14.ContextFlyout = Flyout14;
00121             FlyoutTarget15.ContextFlyout = Flyout15;
00122             FlyoutTarget16.ContextFlyout = Flyout16;
00123
00124             Flyout1.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00125             Flyout2.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00126             Flyout3.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00127             Flyout4.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00128             Flyout5.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00129             Flyout6.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00130             Flyout7.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00131             Flyout11.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00132             Flyout12.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00133             Flyout13.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00134             Flyout14.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00135             Flyout15.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00136             Flyout16.Placement = FlyoutPlacementMode.TopEdgeAlignedLeft;
00137
00138             Flyout16.Opening += (object sender, object args) =>
00139             {
00140                 addFlyoutTimer.Start();
00141             };
00142
00143             Flyout16.Closed += (object sender, object args) =>
00144             {
00145                 UndoButton16.Visibility = Visibility.Visible;
00146                 UndoButtonOverflow16.Visibility = Visibility.Collapsed;
00147                 UndoButtonOverflow16.Flyout = null;
00148
00149                 StatusReportingTextBox.Text = string.Empty;
00150                 ExtraInformationTextBox.Text = string.Empty;
00151             };
00152         }
00153
00154         public void OnElementClicked(object sender, object args)
00155         {
00156             RecordEvent(sender, "clicked");
00157         }
00158
00159         public void OnElementChecked(object sender, object args)
00160         {
00161             RecordEvent(sender, "checked");
00162         }
00163
00164         public void OnElementUnchecked(object sender, object args)
00165         {
00166             RecordEvent(sender, "unchecked");
00167         }
00168
00169         public void OnFlyoutOpened(object sender, object args)
00170         {
00171             IsFlyoutOpenCheckBox.IsChecked = true;
00172
00173             CommandBarFlyout commandBarFlyout = sender as CommandBarFlyout;
00174
00175             if (commandBarFlyout != null)
00176             {
00177                 if ((bool)UseOverflowContentRootDynamicWidthCheckBox.IsChecked && commandBarFlyout.SecondaryCommands != null && commandBarFlyout.SecondaryCommands.Count > 0)
00178                 {
00179                     FrameworkElement secondaryCommandAsFE = commandBarFlyout.SecondaryCommands[0] as FrameworkElement;
00180                     FrameworkElement overflowContentRoot = secondaryCommandAsFE.FindVisualParentByName("OverflowContentRoot");
00181
00182                     if (overflowContentRoot == null)
00183                     {
00184                         secondaryCommandAsFE.Loaded += SecondaryCommandAsFE_Loaded;
00185                     }
00186                     else
00187                     {
00188                         SetDynamicOverflowContentRoot(overflowContentRoot);
00189                     }
00190                 }
00191
00192                 if (animatedCommandBarFlyoutCommandBarStyle != null && (bool)UseAnimatedCommandBarFlyoutCommandBarStyleCheckBox.IsChecked && commandBarFlyout.PrimaryCommands != null && commandBarFlyout.PrimaryCommands.Count > 0)
00193                 {
00194                     FrameworkElement primaryCommandAsFE = commandBarFlyout.PrimaryCommands[0] as FrameworkElement;
00195
00196                     if (primaryCommandAsFE != null)
00197                     {
00198                         var commandBarFlyoutCommandBar = primaryCommandAsFE.FindVisualParentByType<CommandBarFlyoutCommandBar>();
00199
00200                         if (commandBarFlyoutCommandBar != null)
00201                         {
00202                             commandBarFlyoutCommandBar.Style = animatedCommandBarFlyoutCommandBarStyle;
00203                         }
00204                     }
00205                 }
00206             }
00207         }
00208
00209         private void SecondaryCommandAsFE_Loaded(object sender, RoutedEventArgs e)
00210         {
00211             FrameworkElement secondaryCommandAsFE = sender as FrameworkElement;
00212
00213             secondaryCommandAsFE.Loaded -= SecondaryCommandAsFE_Loaded;
00214
00215             FrameworkElement overflowContentRoot = secondaryCommandAsFE.FindVisualParentByName("OverflowContentRoot");
00216
00217             SetDynamicOverflowContentRoot(overflowContentRoot);
00218         }
00219
00220         public void OnFlyoutClosed(object sender, object args)
00221         {
00222             IsFlyoutOpenCheckBox.IsChecked = false;
00223             SetDynamicLabelSecondaryCommand(null);
00224             SetDynamicVisibilitySecondaryCommand(null);
00225             SetDynamicOverflowContentRoot(null);
00226             SetClearSecondaryCommandsFlyout(null);
00227
00228             if ((bool)HideFlyoutOnFlyoutClosedCheckBox.IsChecked)
00229             {
00230                 var commandBarFlyout = sender as CommandBarFlyout;
00231
00232                 if (commandBarFlyout != null)
00233                 {
00234                     commandBarFlyout.Hide();
00235                 }
00236             }
00237         }
00238
00239         private void RecordEvent(string eventString)
00240         {
00241             StatusReportingTextBox.Text = eventString;
00242         }
00243
00244         private void RecordEvent(object sender, string eventString)
00245         {
00246             DependencyObject senderAsDO = sender as DependencyObject;
00247
00248             if (senderAsDO != null)
00249             {
00250                 RecordEvent(AutomationProperties.GetAutomationId(senderAsDO) + " " + eventString);
00251             }
00252         }
00253
00254         private void OnFlyoutTarget1Click(object sender, RoutedEventArgs e)
00255         {
00256             ShowFlyoutAt(Flyout1, FlyoutTarget1);
00257         }
00258
00259         private void OnFlyoutTarget2Click(object sender, RoutedEventArgs e)
00260         {
00261             ShowFlyoutAt(Flyout2, FlyoutTarget2);
00262         }
00263
00264         private void OnFlyoutTarget3Click(object sender, RoutedEventArgs e)
00265         {
00266             ShowFlyoutAt(Flyout3, FlyoutTarget3);
00267         }
00268
00269         private void OnFlyoutTarget4Click(object sender, RoutedEventArgs e)
00270         {
00271             ShowFlyoutAt(Flyout4, FlyoutTarget4);
00272         }
00273
00274         private void OnFlyoutTarget5Click(object sender, RoutedEventArgs e)
00275         {
00276             ShowFlyoutAt(Flyout5, FlyoutTarget5);
00277         }
00278
00279         private void OnFlyoutTarget6Click(object sender, RoutedEventArgs e)
00280         {
00281             ShowFlyoutAt(Flyout6, FlyoutTarget6, FlyoutShowMode.Standard);
00282         }
00283
00284         private void OnFlyoutTarget7Click(object sender, RoutedEventArgs e)
00285         {
00286             ShowFlyoutAt(Flyout7, FlyoutTarget7);
00287         }
00288
00289         private void OnFlyoutTarget8Click(object sender, RoutedEventArgs e)
00290         {
00291             ShowFlyoutAt(Flyout8, FlyoutTarget8);
00292         }
00293
00294         private void OnFlyoutTarget9Click(object sender, RoutedEventArgs e)
00295         {
00296             ShowFlyoutAt(Flyout9, FlyoutTarget9);
00297         }
00298
00299         private void OnFlyoutTarget10Click(object sender, RoutedEventArgs e)
00300         {
00301             ShowFlyoutAt(Flyout10, FlyoutTarget10);
00302         }
00303
00304         private void OnFlyoutTarget11Click(object sender, RoutedEventArgs e)
00305         {
00306             ShowFlyoutAt(Flyout11, FlyoutTarget11, FlyoutShowMode.Standard);
00307         }
00308
00309         private void OnFlyoutTarget12Click(object sender, RoutedEventArgs e)
00310         {
00311             DispatcherTimer showFlyoutTimer = new();
00312             showFlyoutTimer.Interval = TimeSpan.FromSeconds(5);
00313             showFlyoutTimer.Tick += (object sender, object args) =>
00314             {
00315                 ShowFlyoutAt(Flyout12, FlyoutTarget12, FlyoutShowMode.Standard);
00316                 showFlyoutTimer.Stop();
00317             };
00318             showFlyoutTimer.Start();
00319         }
00320
00321         private void OnFlyoutTarget13Click(object sender, RoutedEventArgs e)
00322         {
00323             ShowFlyoutAt(Flyout13, FlyoutTarget13);
00324         }
00325
00326         private void OnFlyoutTarget14Click(object sender, RoutedEventArgs e)
00327         {
00328             ShowFlyoutAt(Flyout14, FlyoutTarget14);
00329         }
00330
00331         private void OnFlyoutTarget15Click(object sender, RoutedEventArgs e)
00332         {
00333             ShowFlyoutAt(Flyout15, FlyoutTarget15);
00334         }
00335
00336         private void OnFlyoutTarget16Click(object sender, RoutedEventArgs e)
00337         {
00338             ShowFlyoutAt(Flyout16, FlyoutTarget16);
00339         }
00340
00341         private void ShowFlyoutAt(FlyoutBase flyout, FrameworkElement targetElement, FlyoutShowMode showMode = FlyoutShowMode.Transient)
00342         {
00343             bool useSecondaryCommandDynamicLabel = (bool)UseSecondaryCommandDynamicLabelCheckBox.IsChecked;
00344             bool useSecondaryCommandDynamicVisibility = (bool)UseSecondaryCommandDynamicVisibilityCheckBox.IsChecked;
00345             bool clearSecondaryCommands = (bool)ClearSecondaryCommandsCheckBox.IsChecked;
00346             bool addPrimaryCommandDynamicallyCheckBox = (bool)AddPrimaryCommandDynamicallyCheckBox.IsChecked;
00347             bool clearPrimaryCommands = (bool)ClearPrimaryCommandsCheckBox.IsChecked;
00348
00349             if (useSecondaryCommandDynamicLabel || useSecondaryCommandDynamicVisibility || addPrimaryCommandDynamicallyCheckBox || clearSecondaryCommands || clearPrimaryCommands)
00350             {
00351                 CommandBarFlyout commandBarFlyout = flyout as CommandBarFlyout;
00352
00353                 if (commandBarFlyout != null)
00354                 {
00355                     if (commandBarFlyout.SecondaryCommands != null && commandBarFlyout.SecondaryCommands.Count > 0)
00356                     {
00357                         if (useSecondaryCommandDynamicLabel)
00358                         {
00359                             SetDynamicLabelSecondaryCommand(commandBarFlyout.SecondaryCommands[0] as AppBarButton);
00360                         }
00361
00362                         if (useSecondaryCommandDynamicVisibility && commandBarFlyout.SecondaryCommands.Count > 4)
00363                         {
00364                             SetDynamicVisibilitySecondaryCommand(commandBarFlyout.SecondaryCommands[4] as AppBarButton);
00365                         }
00366
00367                         if (clearSecondaryCommands)
00368                         {
00369                             SetClearSecondaryCommandsFlyout(commandBarFlyout);
00370                         }
00371                     }
00372
00373                     if (addPrimaryCommandDynamicallyCheckBox)
00374                     {
00375                         dynamicCommandBarFlyout = commandBarFlyout;
00376                         SetDynamicPrimaryCommand();
00377                     }
00378
00379                     if (clearPrimaryCommands && commandBarFlyout.PrimaryCommands != null && commandBarFlyout.PrimaryCommands.Count > 0)
00380                     {
00381                         SetClearPrimaryCommandsFlyout(commandBarFlyout);
00382                     }
00383                 }
00384             }
00385
00386             flyout.ShowAt(targetElement, new FlyoutShowOptions { Placement = FlyoutPlacementMode.TopEdgeAlignedLeft, ShowMode = showMode });
00387         }
00388
00389         private void SetClearSecondaryCommandsFlyout(CommandBarFlyout commandBarFlyout)
00390         {
00391             if (commandBarFlyout == null)
00392             {
00393                 clearSecondaryCommandsFlyout = null;
00394                 clearSecondaryCommandsTimer.Stop();
00395             }
00396             else
00397             {
00398                 clearSecondaryCommandsFlyout = commandBarFlyout;
00399                 clearSecondaryCommandsTimer.Start();
00400             }
00401         }
00402
00403         private void SetClearPrimaryCommandsFlyout(CommandBarFlyout commandBarFlyout)
00404         {
00405             if (commandBarFlyout == null)
00406             {
00407                 clearPrimaryCommandsFlyout = null;
00408                 clearPrimaryCommandsTimer.Stop();
00409             }
00410             else
00411             {
00412                 clearPrimaryCommandsFlyout = commandBarFlyout;
00413                 clearPrimaryCommandsTimer.Start();
00414             }
00415         }
00416
00417         private void SetDynamicLabelSecondaryCommand(AppBarButton appBarButton)
00418         {
00419             if (appBarButton == null)
00420             {
00421                 if (dynamicLabelSecondaryCommand != null)
00422                 {
00423                     if (dynamicLabelSecondaryCommand.Label != originalLabelSecondaryCommand)
00424                     {
00425                         dynamicLabelSecondaryCommand.Label = originalLabelSecondaryCommand;
00426                         SecondaryCommandDynamicLabelChangedCheckBox.IsChecked = true;
00427                     }
00428                     dynamicLabelSecondaryCommand = null;
00429                     dynamicLabelTimer.Stop();
00430                 }
00431             }
00432             else
00433             {
00434                 if (dynamicLabelSecondaryCommand == null)
00435                 {
00436                     originalLabelSecondaryCommand = appBarButton.Label;
00437                     dynamicLabelSecondaryCommand = appBarButton;
00438                     dynamicLabelTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicLabelTimerIntervalTextBox.Text) /*msec*/);
00439                     dynamicLabelChangeCount = int.Parse(DynamicLabelChangeCountTextBox.Text);
00440                     dynamicLabelTimer.Start();
00441                 }
00442             }
00443         }
00444
00445         private void SetDynamicVisibilitySecondaryCommand(AppBarButton appBarButton)
00446         {
00447             if (appBarButton == null)
00448             {
00449                 if (dynamicVisibilitySecondaryCommand != null)
00450                 {
00451                     if (dynamicVisibilitySecondaryCommand.Visibility != originalVisibilitySecondaryCommand)
00452                     {
00453                         dynamicVisibilitySecondaryCommand.Visibility = originalVisibilitySecondaryCommand;
00454                         SecondaryCommandDynamicVisibilityChangedCheckBox.IsChecked = true;
00455                     }
00456                     dynamicVisibilitySecondaryCommand = null;
00457                     dynamicVisibilityTimer.Stop();
00458                 }
00459             }
00460             else
00461             {
00462                 if (dynamicVisibilitySecondaryCommand == null)
00463                 {
00464                     originalVisibilitySecondaryCommand = appBarButton.Visibility;
00465                     dynamicVisibilitySecondaryCommand = appBarButton;
00466                     dynamicVisibilityTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicVisibilityTimerIntervalTextBox.Text) /*msec*/);
00467                     dynamicVisibilityChangeCount = int.Parse(DynamicVisibilityChangeCountTextBox.Text);
00468                     dynamicVisibilityTimer.Start();
00469                 }
00470             }
00471         }
00472
00473         private void SetDynamicOverflowContentRoot(FrameworkElement overflowContentRoot)
00474         {
00475             if (overflowContentRoot == null)
00476             {
00477                 if (dynamicWidthOverflowContentRoot != null)
00478                 {
00479                     if (dynamicWidthOverflowContentRoot.ActualWidth != originalWidthOverflowContentRoot)
00480                     {
00481                         dynamicWidthOverflowContentRoot.Width = originalWidthOverflowContentRoot;
00482                         OverflowContentRootDynamicWidthChangedCheckBox.IsChecked = true;
00483                     }
00484                     dynamicWidthOverflowContentRoot = null;
00485                     dynamicWidthTimer.Stop();
00486                 }
00487             }
00488             else if (dynamicWidthOverflowContentRoot == null)
00489             {
00490                 if (overflowContentRoot.ActualWidth == 0.0)
00491                 {
00492                     overflowContentRoot.SizeChanged += OverflowContentRoot_SizeChanged;
00493                 }
00494                 else
00495                 {
00496                     originalWidthOverflowContentRoot = overflowContentRoot.ActualWidth;
00497                     dynamicWidthOverflowContentRoot = overflowContentRoot;
00498                     dynamicWidthTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicWidthTimerIntervalTextBox.Text) /*msec*/);
00499                     dynamicWidthChangeCount = int.Parse(DynamicWidthChangeCountTextBox.Text);
00500                     dynamicWidthTimer.Start();
00501                 }
00502             }
00503         }
00504
00505         private void OverflowContentRoot_SizeChanged(object sender, SizeChangedEventArgs e)
00506         {
00507             FrameworkElement overflowContentRoot = sender as FrameworkElement;
00508
00509             overflowContentRoot.SizeChanged -= OverflowContentRoot_SizeChanged;
00510
00511             SetDynamicOverflowContentRoot(overflowContentRoot);
00512         }
00513
00514         private void SetDynamicPrimaryCommand()
00515         {
00516             dynamicCommandTimer.Interval = new TimeSpan(0, 0, 0, 0, int.Parse(DynamicLabelTimerIntervalTextBox.Text) /*msec*/);
00517             dynamicLabelChangeCount = int.Parse(DynamicLabelChangeCountTextBox.Text);
00518             dynamicCommandTimer.Start();
00519         }
00520
00521         private void ClearSecondaryCommandsTimer_Tick(object sender, object e)
00522         {
00523             if (clearSecondaryCommandsFlyout != null)
00524             {
00525                 clearSecondaryCommandsFlyout.SecondaryCommands.Clear();
00526             }
00527         }
00528
00529         private void ClearPrimaryCommandsTimer_Tick(object sender, object e)
00530         {
00531             if (clearPrimaryCommandsFlyout != null)
00532             {
00533                 clearPrimaryCommandsFlyout.PrimaryCommands.Clear();
00534             }
00535         }
00536
00537         private void AddFlyoutTimer_Tick(object sender, object e)
00538         {
00539             UndoButtonOverflow16.SizeChanged += UndoButtonOverflow16_SizeChanged;
00540
00541             UndoButton16.Visibility = Visibility.Collapsed;
00542             UndoButtonOverflow16.Visibility = Visibility.Visible;
00543             UndoButtonOverflow16.Flyout = flyoutToAdd;
00544             addFlyoutTimer.Stop();
00545         }
00546
00547         private void DynamicLabelTimer_Tick(object sender, object e)
00548         {
00549             if (dynamicLabelSecondaryCommand != null)
00550             {
00551                 if (dynamicLabelSecondaryCommand.Label == originalLabelSecondaryCommand)
00552                 {
00553                     // Testing dynamic label expansion
00554                     dynamicLabelSecondaryCommand.Label += " with an expanded label";
00555                 }
00556                 else
00557                 {
00558                     // Testing dynamic label shrinkage
00559                     dynamicLabelSecondaryCommand.Label = originalLabelSecondaryCommand;
00560                 }
00561
00562                 SecondaryCommandDynamicLabelChangedCheckBox.IsChecked = true;
00563
00564                 if (--dynamicLabelChangeCount == 0)
00565                 {
00566                     dynamicLabelTimer.Stop();
00567                 }
00568             }
00569         }
00570
00571         private void DynamicVisibilityTimer_Tick(object sender, object e)
00572         {
00573             if (dynamicVisibilitySecondaryCommand != null)
00574             {
00575                 dynamicVisibilitySecondaryCommand.Visibility = dynamicVisibilitySecondaryCommand.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;
00576
00577                 SecondaryCommandDynamicVisibilityChangedCheckBox.IsChecked = true;
00578
00579                 if (--dynamicVisibilityChangeCount == 0)
00580                 {
00581                     dynamicVisibilityTimer.Stop();
00582                 }
00583             }
00584         }
00585
00586         private void DynamicWidthTimer_Tick(object sender, object e)
00587         {
00588             if (dynamicWidthOverflowContentRoot != null)
00589             {
00590                 if (dynamicWidthOverflowContentRoot.ActualWidth == originalWidthOverflowContentRoot)
00591                 {
00592                     // Testing dynamic size expansion
00593                     dynamicWidthOverflowContentRoot.Width = dynamicWidthOverflowContentRoot.ActualWidth + 24.0;
00594                 }
00595                 else
00596                 {
00597                     // Testing dynamic size shrinkage
00598                     dynamicWidthOverflowContentRoot.Width = originalWidthOverflowContentRoot;
00599                 }
00600
00601                 OverflowContentRootDynamicWidthChangedCheckBox.IsChecked = true;
00602
00603                 if (--dynamicWidthChangeCount == 0)
00604                 {
00605                     dynamicWidthTimer.Stop();
00606                 }
00607             }
00608         }
00609
00610         private void DynamicCommandTimer_Tick(object sender, object e)
00611         {
00612             dynamicCommandBarFlyout.PrimaryCommands.Add(new AppBarButton() {
00613                 Content = new TextBlock() { Text = "Test" }
00614             });
00615
00616             PrimaryCommandDynamicallyAddedCheckBox.IsChecked = true;
00617
00618             if (--dynamicLabelChangeCount == 0)
00619             {
00620                 dynamicCommandTimer.Stop();
00621             }
00622         }
00623
00624         private void IsRTLCheckBox_Checked(object sender, RoutedEventArgs e)
00625         {
00626             FlowDirection = FlowDirection.RightToLeft;
00627         }
00628
00629         private void IsRTLCheckBox_Unchecked(object sender, RoutedEventArgs e)
00630         {
00631             FlowDirection = FlowDirection.LeftToRight;
00632         }
00633
00634         private void OnEditCommandCount6Click(object sender, RoutedEventArgs e)
00635         {
00636             var flyout6 = Flyout6 as CommandBarFlyout;
00637
00638             if (flyout6.PrimaryCommands.Count() == 0)
00639             {
00640                 flyout6.PrimaryCommands.Add(new AppBarButton() {
00641                     Content = new TextBlock() { Text = "Test" }
00642                 });
00643             }
00644             else
00645             {
00646                 flyout6.PrimaryCommands.RemoveAt(0);
00647             }
00648         }
00649
00650         private void UndoButtonOverflow16_SizeChanged(object sender, SizeChangedEventArgs e)
00651         {
00652             UndoButtonOverflow16.SizeChanged -= UndoButtonOverflow16_SizeChanged;
00653
00654             // These visual elements don't have automation peers we can access, so we need to expose their bounds to the test the hard way.
00655             var undoButtonOverflow16ContentViewbox = UndoButtonOverflow16.FindVisualChildByName("ContentViewbox");
00656             var undoButtonOverflow16OverflowTextLabel = UndoButtonOverflow16.FindVisualChildByName("OverflowTextLabel");
00657             var redoButton16ContentViewbox = RedoButton16.FindVisualChildByName("ContentViewbox");
00658
00659             var undoButtonOverflow16ContentViewboxBounds = undoButtonOverflow16ContentViewbox.TransformToVisual(null).TransformBounds(new Windows.Foundation.Rect(0, 0, undoButtonOverflow16ContentViewbox.ActualWidth, undoButtonOverflow16ContentViewbox.ActualHeight));
00660             var undoButtonOverflow16OverflowTextLabelBounds = undoButtonOverflow16OverflowTextLabel.TransformToVisual(null).TransformBounds(new Windows.Foundation.Rect(0, 0, undoButtonOverflow16ContentViewbox.ActualWidth, undoButtonOverflow16ContentViewbox.ActualHeight));
00661             var redoButton16ContentViewboxBounds = redoButton16ContentViewbox.TransformToVisual(null).TransformBounds(new Windows.Foundation.Rect(0, 0, undoButtonOverflow16ContentViewbox.ActualWidth, undoButtonOverflow16ContentViewbox.ActualHeight));
00662
00663             ExtraInformationTextBox.Text = $"({undoButtonOverflow16ContentViewboxBounds.X}, {undoButtonOverflow16ContentViewboxBounds.Y}, {undoButtonOverflow16ContentViewboxBounds.Width}, {undoButtonOverflow16ContentViewboxBounds.Height}), ({undoButtonOverflow16OverflowTextLabelBounds.X}, {undoButtonOverflow16OverflowTextLabelBounds.Y}, {undoButtonOverflow16OverflowTextLabelBounds.Width}, {undoButtonOverflow16OverflowTextLabelBounds.Height}), ({redoButton16ContentViewboxBounds.X}, {redoButton16ContentViewboxBounds.Y}, {redoButton16ContentViewboxBounds.Width}, {redoButton16ContentViewboxBounds.Height})";
00664             RecordEvent("Undo with overflow visible");
00665         }
00666     }
00667 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

reference_tracker_implements< D, WinRTClassType, ImplT, I > Member List

This is the complete list of members for reference_tracker_implements< D, WinRTClassType, ImplT, I >, including all inherited members.
reference_tracker_implements() reference_tracker_implements< D, WinRTClassType, ImplT, I > [inline]
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerScrollByRequestedEventArgs.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollControllerScrollByRequestedEventArgs.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollControllerScrollByRequestedEventArgs.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollControllerScrollByRequestedEventArgs)
00012 }
00013
00014 #include "ScrollControllerScrollByRequestedEventArgs.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarToolButtonProperties Member List

This is the complete list of members for InkToolBarToolButtonProperties, including all inherited members.
ClearProperties() | InkToolBarToolButtonProperties | [static]
EnsureProperties() | InkToolBarToolButtonProperties | [static]
InkToolBarToolButtonProperties() | InkToolBarToolButtonProperties |
IsExtensionGlyphShown(bool value) | InkToolBarToolButtonProperties |
IsExtensionGlyphShown() | InkToolBarToolButtonProperties |
IsExtensionGlyphShownProperty() | InkToolBarToolButtonProperties | [inline, static]
s_IsExtensionGlyphShownProperty | InkToolBarToolButtonProperties | [static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItem.properties.h Source File

  • File List
  • File Members
  • Generated

MenuBarItem.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class MenuBarItemProperties
00008 {
00009 public:
00010     MenuBarItemProperties();
00011
00012     void Items(winrt::IVector<winrt::MenuFlyoutItemBase> const& value);
00013     winrt::IVector<winrt::MenuFlyoutItemBase> Items();
00014
00015     void Title(winrt::hstring const& value);
00016     winrt::hstring Title();
00017
00018     static winrt::DependencyProperty ItemsProperty() { return s_ItemsProperty; }
00019     static winrt::DependencyProperty TitleProperty() { return s_TitleProperty; }
00020
00021     static GlobalDependencyProperty s_ItemsProperty;
00022     static GlobalDependencyProperty s_TitleProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsSourceView.cpp Source File

  • File List
  • File Members
  • Repeater

ItemsSourceView.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "ItemsSourceView.h"
00008 #include "InspectingDataSource.h"
00009
00010 #pragma region IDataSource
00011
00012 int32_t ItemsSourceView::Count()
00013 {
00014     if (m_cachedSize == -1)
00015     {
00016         // Call the override the very first time. After this,
00017         // we can just update the size when there is a data source change.
00018         m_cachedSize = GetSizeCore();
00019     }
00020
00021     return m_cachedSize;
00022 }
00023
00024 winrt::IInspectable ItemsSourceView::GetAt(int index)
00025 {
00026     return GetAtCore(index);
00027 }
00028
00029 bool ItemsSourceView::HasKeyIndexMapping()
00030 {
00031     return HasKeyIndexMappingCore();
00032 }
00033
00034 winrt::hstring ItemsSourceView::KeyFromIndex(int index)
00035 {
00036     return KeyFromIndexCore(index);
00037 }
00038
00039 int ItemsSourceView::IndexFromKey(winrt::hstring const& id)
00040 {
00041     return IndexFromKeyCore(id);
00042 }
00043
00044 int ItemsSourceView::IndexOf(winrt::IInspectable const& value)
00045 {
00046     return IndexOfCore(value);
00047 }
00048
00049 winrt::event_token ItemsSourceView::CollectionChanged(winrt::NotifyCollectionChangedEventHandler const& value)
00050 {
00051     return m_collectionChangedEventSource.add(value);
00052 }
00053
00054 void ItemsSourceView::CollectionChanged(winrt::event_token const& token)
00055 {
00056     m_collectionChangedEventSource.remove(token);
00057 }
00058
00059 #pragma endregion
00060
00061 #pragma region IDataSourceProtected
00062
00063 void ItemsSourceView::OnItemsSourceChanged(winrt::NotifyCollectionChangedEventArgs const& args)
00064 {
00065     m_cachedSize = GetSizeCore();
00066     m_collectionChangedEventSource(*this, args);
00067 }
00068
00069 #pragma endregion
00070
00071 #pragma region IDataSourceOverrides
00072
00073 int32_t ItemsSourceView::GetSizeCore()
00074 {
00075     throw winrt::hresult_not_implemented();
00076 }
00077
00078 winrt::IInspectable ItemsSourceView::GetAtCore(int /* index */)
00079 {
00080     throw winrt::hresult_not_implemented();
00081 }
00082
00083 bool ItemsSourceView::HasKeyIndexMappingCore()
00084 {
00085     throw winrt::hresult_not_implemented();
00086 }
00087
00088 winrt::hstring ItemsSourceView::KeyFromIndexCore(int /* index */)
00089 {
00090     throw winrt::hresult_not_implemented();
00091 }
00092
00093 int ItemsSourceView::IndexFromKeyCore(winrt::hstring const& /* id */)
00094 {
00095     throw winrt::hresult_not_implemented();
00096 }
00097
00098 #pragma endregion
00099
00100 int ItemsSourceView::IndexOfCore(winrt::IInspectable const& value)
00101 {
00102     throw winrt::hresult_not_implemented();
00103 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfobarAxeTestage Member List

This is the complete list of members for InfobarAxeTestage, including all inherited members.
InfobarAxeTestage() InfobarAxeTestage [inline]
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewAutomationPeer.cpp Source File

  • File List
  • File Members
  • ItemsView

ItemsViewAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "ItemsView.h"
00008 #include "ItemsViewTestHooks.h"
00009 #include "Utils.h"
00010 #include "ItemsViewAutomationPeer.h"
00011 #include "ItemsViewAutomationPeer.properties.cpp"
00012
00013 ItemsViewAutomationPeer::ItemsViewAutomationPeer(winrt::ItemsView const& owner)
00014     : ReferenceTracker(owner)
00015 {
00016 }
00017
00018 // IAutomationPeerOverrides
00019 winrt::IInspectable ItemsViewAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00020 {
00021     if (const auto itemsView = Owner().try_as<winrt::ItemsView>())
00022     {
00023         if (patternInterface == winrt::PatternInterface::Selection && itemsView.SelectionMode() != winrt::ItemsViewSelectionMode::None)
00024         {
00025             return *this;
00026         }
00027     }
00028
00029     return __super::GetPatternCore(patternInterface);
00030 }
00031
00032 hstring ItemsViewAutomationPeer::GetClassNameCore()
00033 {
00034     return winrt::hstring_name_of<winrt::ItemsView>();
00035 }
00036
00037 winrt::AutomationControlType ItemsViewAutomationPeer::GetAutomationControlTypeCore()
00038 {
00039     return winrt::AutomationControlType::List;
00040 }
00041
00042 // ISelectionProvider
00043 bool ItemsViewAutomationPeer::CanSelectMultiple()
00044 {
00045     if (const auto itemsView = GetImpl())
00046     {
00047         const auto selectionMode = itemsView->SelectionMode();
00048         if (selectionMode == winrt::ItemsViewSelectionMode::Multiple ||
00049             selectionMode == winrt::ItemsViewSelectionMode::Extended)
00050         {
00051             return true;
00052         }
00053     }
00054
00055     return false;
00056 }
00057
00058 winrt::com_array<winrt::IRawElementProviderSimple> ItemsViewAutomationPeer::GetSelection()
00059 {
00060     std::vector<winrt::IRawElementProviderSimple> selectionList;
00061
00062     if (const auto itemsView = GetImpl())
00063     {
00064         if (const auto selectionModel = itemsView->GetSelectionModel())
00065         {
00066             if (const auto selectedIndices = selectionModel.SelectedIndices())
00067             {
00068                 if (selectedIndices.Size() > 0)
00069                 {
00070                     if (const auto repeater = ItemsViewTestHooks::GetItemsRepeaterPart(*itemsView))
00071                     {
00072                         for (const auto indexPath : selectedIndices)
00073                         {
00074                             // TODO: Update once ItemsView has grouping.
00075                             const auto index = indexPath.GetAt(0);
00076
00077                             if (const auto itemElement = repeater.TryGetElement(index))
00078                             {
00079                                 if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(itemElement))
00080                                 {
00081                                     selectionList.push_back(ProviderFromPeer(peer));
00082                                 }
00083                             }
00084                         }
00085                     }
00086                 }
00087             }
00088         }
00089     }
00090
00091     return winrt::com_array(selectionList);
00092 }
00093
00094 void ItemsViewAutomationPeer::RaiseSelectionChanged(double oldIndex, double newIndex)
00095 {
00096     if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::SelectionPatternOnInvalidated))
00097     {
00098         if (const auto itemsView = Owner().try_as<winrt::ItemsView>())
00099         {
00100             if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(itemsView))
00101             {
00102                 peer.RaiseAutomationEvent(winrt::AutomationEvents::SelectionPatternOnInvalidated);
00103             }
00104         }
00105
00106     }
00107 }
00108
00109 com_ptr<ItemsView> ItemsViewAutomationPeer::GetImpl()
00110 {
00111     com_ptr<ItemsView> impl = nullptr;
00112
00113     if (const auto itemsView = Owner().try_as<winrt::ItemsView>())
00114     {
00115         impl = winrt::get_self<ItemsView>(itemsView)->get_strong();
00116     }
00117
00118     return impl;
00119 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemTemplateWrapper Member List

This is the complete list of members for ItemTemplateWrapper, including all inherited members.
GetElement(winrt::ElementFactoryGetArgs const &args) | ItemTemplateWrapper
ItemTemplateWrapper(winrt::DataTemplate const &dataTemplate) | ItemTemplateWrapper
ItemTemplateWrapper(winrt::DataTemplateSelector const &dataTemplateSelector) | ItemTemplateWrapper
RecycleElement(winrt::ElementFactoryRecycleArgs const &args) | ItemTemplateWrapper
Template() | ItemTemplateWrapper
Template(winrt::DataTemplate const &value) | ItemTemplateWrapper
TemplateSelector() | ItemTemplateWrapper
TemplateSelector(winrt::DataTemplateSelector const &value) | ItemTemplateWrapper
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemBase Member List

This is the complete list of members for NavigationViewItemBase, including all inherited members.
abi_enter() | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
c_itemIndentation | NavigationViewItemBase | [static]
CheckThread() | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
ClearProperties() | NavigationViewItemBaseProperties | [static]
CreatedByNavigationViewItemsFactory(bool createdByNavigationViewItemsFactory) | NavigationViewItemBase | [inline]
CreatedByNavigationViewItemsFactory() | NavigationViewItemBase | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< NavigationViewItemBase > &&self) noexcept | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline, static]
Depth(int depth) | NavigationViewItemBase |
Depth() const | NavigationViewItemBase |
EnsureProperties() | NavigationViewItemBaseProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
final_release(std::unique_ptr< NavigationViewItemBase > &&self) | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
GetInner() | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
GetNavigationView() const | NavigationViewItemBase |
GetSplitView() const | NavigationViewItemBase |
IsInNavigationViewOwnedRepeater(bool isInNavigationViewOwnedRepeater) | NavigationViewItemBase | [inline]
IsInNavigationViewOwnedRepeater() const | NavigationViewItemBase | [inline]
IsOnThread() | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
IsSelected(bool value) | NavigationViewItemBaseProperties |
IsSelected() | NavigationViewItemBaseProperties |
IsSelectedProperty() | NavigationViewItemBaseProperties | [inline, static]
IsTopLevelItem(bool isTopLevelItem) | NavigationViewItemBase | [inline]
IsTopLevelItem() const | NavigationViewItemBase | [inline]
NavigationViewItemBase() | NavigationViewItemBase |
NavigationViewItemBaseProperties() | NavigationViewItemBaseProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
OnApplyTemplate() | NavigationViewItemBase | [virtual]
OnContentChanged(winrt::IInspectable const &oldContent, winrt::IInspectable const &newContent) | NavigationViewItemBase | [inline, virtual]
OnCreateAutomationPeer() | NavigationViewItemBase | [inline, virtual]
OnGotFocus(winrt::RoutedEventArgs const &e) | NavigationViewItemBase | [inline, virtual]
OnIsSelectedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemBaseProperties | [static]
OnLoaded(winrt::IInspectable const &, winrt::RoutedEventArgs const &) | NavigationViewItemBase |
OnLostFocus(winrt::RoutedEventArgs const &e) | NavigationViewItemBase | [inline, virtual]
OnNavigationViewItemBaseDepthChanged() | NavigationViewItemBase | [inline, virtual]
OnNavigationViewItemBaseIsSelectedChanged() | NavigationViewItemBase | [inline, virtual]
OnNavigationViewItemBasePositionChanged() | NavigationViewItemBase | [inline, virtual]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NavigationViewItemBase |
Position() const | NavigationViewItemBase |
Position(NavigationViewRepeaterPosition value) | NavigationViewItemBase |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable > | [inline]
s_IsSelectedProperty | NavigationViewItemBaseProperties | [static]
SetNavigationViewParent(winrt::NavigationView const &navigationView) | NavigationViewItemBase |
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerRevokers Member List

This is the complete list of members for ItemContainerRevokers, including all inherited members.
RevokeAll(const winrt::ItemContainer &itemContainer) ItemContainerRevokers [inline]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushPage::WrapperEffectBrush Member List

This is the complete list of members for AcrylicBrushPage::WrapperEffectBrush, including all inherited members.
WrapperEffectBrush(CompositionEffectBrush brush) AcrylicBrushPage::WrapperEffectBrush [inline]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Defaults Member List

This is the complete list of members for Defaults, including all inherited members.
Data | Defaults |
Defaults() | Defaults | [inline]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RecyclePoolTests Member List

This is the complete list of members for RecyclePoolTests, including all inherited members.
ValidateChildRemovedFromParentWhenOwnerIsDifferent() | RecyclePoolTests | [inline]
ValidateElementsHaveCorrectKeys() | RecyclePoolTests | [inline]
ValidateOwnershipWithStackPanel() | RecyclePoolTests | [inline]
ValidateRecycledElementOwnerAffinity() | RecyclePoolTests | [inline]
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollViewerIRefreshInfoProviderAdapter.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollViewerIRefreshInfoProviderAdapter.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollViewerIRefreshInfoProviderAdapter.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollViewerIRefreshInfoProviderAdapter)
00012 }
00013
00014 #include "ScrollViewerIRefreshInfoProviderAdapter.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerSliderAutomationPeer Member List

This is the complete list of members for ColorPickerSliderAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
CheckThread() | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
ColorPickerSliderAutomationPeer(winrt::ColorPickerSlider const &owner) | ColorPickerSliderAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< ColorPickerSliderAutomationPeer > &&self) noexcept | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
final_release(std::unique_ptr< ColorPickerSliderAutomationPeer > &&self) | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline, static]
GetBase() | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
GetInner() | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
GetPatternCore(winrt::PatternInterface const &patternInterface) | ColorPickerSliderAutomationPeer |
GetValueString(winrt::Color color, int value) | ColorPickerSliderAutomationPeer | [private]
IsOnThread() | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
IsReadOnly() | ColorPickerSliderAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
RaisePropertyChangedEvent(winrt::Color oldColor, winrt::Color newColor, int oldValue, int newValue) | ColorPickerSliderAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider > | [inline]
SetValue(winrt::hstring const &value) | ColorPickerSliderAutomationPeer |
Value() | ColorPickerSliderAutomationPeer |
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewerPage Member List

This is the complete list of members for ScrollViewerPage, including all inherited members.
AppendEventMessage(string message) | ScrollViewerPage | [inline, private]
border | ScrollViewerPage | [private]
BtnChangeView_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnClearScrollViewerEvents_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetActualHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetActualWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentActualHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentActualWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentDesiredSize_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentMinHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentMinWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentPadding_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentRenderSize_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetExtentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetExtentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetHorizontalOffset_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetMargin_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetMaxZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetMinZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetPadding_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetVerticalOffset_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetViewportHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetViewportWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnGetZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentMinHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentMinWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentPadding_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetMargin_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetMaxZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetMinZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetPadding_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
BtnSetWidth_Click(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
button | ScrollViewerPage | [private]
ChkContentProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkContentProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkIsEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkIsHorizontalRailEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkIsHorizontalScrollChainingEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkIsTabStop_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkIsVerticalRailEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkIsVerticalScrollChainingEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkIsZoomChainingEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkScrollViewerEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkScrollViewerEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkScrollViewerMethods_Checked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkScrollViewerMethods_Unchecked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkScrollViewerProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkScrollViewerProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkUseLeftHeader_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkUseTopHeader_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
ChkUseTopLeftHeader_IsCheckedChanged(object sender, RoutedEventArgs e) | ScrollViewerPage | [inline, private]
CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbContent_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbContentHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbContentManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbContentVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbHorizontalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbHorizontalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbScrollViewerManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbVerticalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbVerticalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CmbZoomMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewerPage | [inline, private]
CreateChildren() | ScrollViewerPage | [inline, private]
GetThicknessFromString(string thickness) | ScrollViewerPage | [inline, private]
horizontalStackPanel | ScrollViewerPage | [private]
largeImg | ScrollViewerPage | [private]
populatedBorder | ScrollViewerPage | [private]
rectangle | ScrollViewerPage | [private]
rectangleLeftHeader | ScrollViewerPage | [private]
rectangleTopHeader | ScrollViewerPage | [private]
rectangleTopLeftHeader | ScrollViewerPage | [private]
repeatButton | ScrollViewerPage | [private]
ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs args) | ScrollViewerPage | [inline, private]
ScrollViewer_ViewChanging(object sender, ScrollViewerViewChangingEventArgs args) | ScrollViewerPage | [inline, private]
ScrollViewerPage() | ScrollViewerPage | [inline]
ScrollViewerPage_Loaded(object sender, RoutedEventArgs args) | ScrollViewerPage | [inline, private]
ScrollViewerViewToString(ScrollViewerView scrollViewerView) | ScrollViewerPage | [inline, private]
textBlock | ScrollViewerPage | [private]
tilePanel | ScrollViewerPage | [private]
UpdateChkIsEnabled() | ScrollViewerPage | [inline, private]
UpdateChkIsHorizontalRailEnabled() | ScrollViewerPage | [inline, private]
UpdateChkIsHorizontalScrollChainingEnabled() | ScrollViewerPage | [inline, private]
UpdateChkIsTabStop() | ScrollViewerPage | [inline, private]
UpdateChkIsVerticalRailEnabled() | ScrollViewerPage | [inline, private]
UpdateChkIsVerticalScrollChainingEnabled() | ScrollViewerPage | [inline, private]
UpdateChkIsZoomChainingEnabled() | ScrollViewerPage | [inline, private]
UpdateCmbBackground() | ScrollViewerPage | [inline, private]
UpdateCmbContent() | ScrollViewerPage | [inline, private]
UpdateCmbContentHorizontalAlignment() | ScrollViewerPage | [inline, private]
UpdateCmbContentManipulationMode() | ScrollViewerPage | [inline, private]
UpdateCmbContentVerticalAlignment() | ScrollViewerPage | [inline, private]
UpdateCmbHorizontalScrollBarVisibility() | ScrollViewerPage | [inline, private]
UpdateCmbHorizontalScrollMode() | ScrollViewerPage | [inline, private]
UpdateCmbScrollViewerManipulationMode() | ScrollViewerPage | [inline, private]
UpdateCmbVerticalScrollBarVisibility() | ScrollViewerPage | [inline, private]
UpdateCmbVerticalScrollMode() | ScrollViewerPage | [inline, private]
UpdateCmbXYFocusKeyboardNavigation() | ScrollViewerPage | [inline, private]
UpdateCmbZoomMode() | ScrollViewerPage | [inline, private]
UpdateHeaderSizes() | ScrollViewerPage | [inline, private]
UpdateTxtMargin() | ScrollViewerPage | [inline, private]
UpdateTxtMaxZoomFactor() | ScrollViewerPage | [inline, private]
UpdateTxtMinZoomFactor() | ScrollViewerPage | [inline, private]
UpdateTxtPadding() | ScrollViewerPage | [inline, private]
UseScrollViewer() | ScrollViewerPage | [inline, private]
verticalStackPanel | ScrollViewerPage | [private]
viewbox | ScrollViewerPage | [private]
~ScrollViewerPage() | ScrollViewerPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolbarPage Member List

This is the complete list of members for InkToolbarPage, including all inherited members.
_inkPresenter | InkToolbarPage | [private]
InkToolbarPage() | InkToolbarPage | [inline]
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/SpotLightStateHelper.h Source File

  • File List
  • File Members
  • Lights

SpotLightStateHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "CppWinRTHelpers.h"
00007
00008 enum class EasingTypes
00009 {
00010     Default,
00011     CubicBezier,
00012     Linear,
00013     Step
00014 };
00015
00016 // needed so that AnimateTo can set a non-animated value directly without the overhead of a 0 duration animation
00017 enum class SpotlightProperty
00018 {
00019     None,
00020     Offset,
00021     Direction,
00022     ConstantAttenuation,
00023     LinearAttenuation,
00024     QuadraticAttenuation,
00025     InnerConeAngleInDegrees,
00026     InnerConeAngle,
00027     InnerConeColor,
00028     InnerConeIntensity,
00029     OuterConeAngleInDegrees,
00030     OuterConeAngle,
00031     OuterConeColor,
00032     OuterConeIntensity,
00033     Height,
00034     OuterAngleScale
00035 };
00036
00037 // RevealHoverLight-related definitions
00038
00039 enum class RevealHoverSpotlightFlags
00040 {
00041     None = 0x0,
00042     Ignore = 0x1,
00043     Animate = 0x2
00044 };
00045
00046 struct EasingInfo
00047 {
00048     EasingTypes EasingType{};
00049     winrt::float2 EasingControlPoint1{};
00050     winrt::float2 EasingControlPoint2{};
00051 };
00052
00053 template <typename ValueType>
00054 struct RevealHoverSpotlightAnimationInfo
00055 {
00056     RevealHoverSpotlightFlags Flags{};
00057     SpotlightProperty SpotlightProperty{};
00058     PCWSTR PropertyName{};
00059     winrt::TimeSpan Duration{};
00060     ValueType Value{};
00061     EasingInfo EasingInfo{};
00062 };
00063
00064 struct RevealHoverSpotlightStateDesc
00065 {
00066     RevealHoverSpotlightAnimationInfo<winrt::Color> InnerConeColor;
00067     RevealHoverSpotlightAnimationInfo<winrt::Color> OuterConeColor;
00068     RevealHoverSpotlightAnimationInfo<float> InnerConeIntensity;
00069     RevealHoverSpotlightAnimationInfo<float> OuterConeIntensity;
00070     RevealHoverSpotlightAnimationInfo<float> OuterAngleScale;
00071 };
00072
00073 enum RevealHoverSpotlightState
00074 {
00075     RevealHoverSpotlightState_AnimToOff,
00076     RevealHoverSpotlightState_AnimToHover,
00077     RevealHoverSpotlightState_Pressing,
00078     RevealHoverSpotlightState_FastRelease,
00079     RevealHoverSpotlightState_SlowRelease,
00080
00081     RevealHoverSpotlightState_StateCount
00082 };
00083
00084 // RevealBorderLight-related definitions
00085
00086 template <typename ValueType>
00087 struct RevealBorderSpotlightInfo
00088 {
00089     SpotlightProperty SpotlightProperty{};
00090     PCWSTR PropertyName{};
00091     ValueType Value{};
00092 };
00093
00094 struct RevealBorderSpotlightStateDesc
00095 {
00096     RevealBorderSpotlightInfo<float> ConstantAttenuation;
00097     RevealBorderSpotlightInfo<float> LinearAttenuation;
00098     RevealBorderSpotlightInfo<float> InnerConeAngleInDegrees;
00099     RevealBorderSpotlightInfo<winrt::Color> InnerConeColor;
00100     RevealBorderSpotlightInfo<float> OuterConeAngleInDegrees;
00101     RevealBorderSpotlightInfo<winrt::Color> OuterConeColor;
00102     RevealBorderSpotlightInfo<float> Height;
00103     RevealBorderSpotlightInfo<float> OuterAngleScale;
00104 };
00105
00106 template <typename ValueType>
00107 bool IsAnimated(const RevealHoverSpotlightAnimationInfo<ValueType>& info)
00108 {
00109     return (int)RevealHoverSpotlightFlags::Animate & (int)info.Flags;
00110 }
00111
00112 template <typename ValueType>
00113 bool IsIgnored(const RevealHoverSpotlightAnimationInfo<ValueType>& info)
00114 {
00115     return (int)RevealHoverSpotlightFlags::Ignore & (int)info.Flags;
00116 }
00117
00118 bool inline IsStateAnimated(const RevealHoverSpotlightStateDesc& state);
00119 bool inline IsStateIgnored(const RevealHoverSpotlightStateDesc& state);
00120
00121 void PlaySpotLightStateAnimation(
00122     const winrt::SpotLight& compositionSpotLight,
00123     const winrt::CompositionPropertySet& colorsProxy,
00124     const winrt::CompositionPropertySet& offsetProps,
00125     const RevealHoverSpotlightStateDesc& targetState,
00126     std::function<void()>* cancelationFunction = nullptr,
00127     std::function<void()> onComplete = nullptr);
00128
00129 void SetSpotLightStateImmediate(const winrt::SpotLight& compositionSpotLight,
00130     const winrt::CompositionPropertySet& colorsProxy,
00131     const winrt::CompositionPropertySet& offsetProps,
00132     const RevealHoverSpotlightStateDesc& targetState);
00133
00134 void SetSpotLightStateImmediate(const winrt::SpotLight& compositionSpotLight,
00135     const winrt::CompositionPropertySet& colorsProxy,
00136     const winrt::CompositionPropertySet& offsetProps,
00137     const RevealBorderSpotlightStateDesc& targetState);
00138
00139 winrt::CompositionPropertySet CreateSpotLightColorsProxy(const winrt::SpotLight& compositionSpotLight);
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewportTests::TestScrollingSurface Member List

This is the complete list of members for ViewportTests::TestScrollingSurface, including all inherited members.
_configurationChanged | ViewportTests::TestScrollingSurface | [private]
_isHorizontallyScrollable | ViewportTests::TestScrollingSurface | [private]
_isVerticallyScrollable | ViewportTests::TestScrollingSurface | [private]
AnchorElement | ViewportTests::TestScrollingSurface |
ArrangeOverride(Size finalSize) | ViewportTests::TestScrollingSurface | [inline, protected]
ConfigurationChanged | ViewportTests::TestScrollingSurface |
ConfigurationChangedAddFunc | ViewportTests::TestScrollingSurface |
ConfigurationChangedRemoveFunc | ViewportTests::TestScrollingSurface |
GetRelativeViewport(UIElement child) | ViewportTests::TestScrollingSurface | [inline]
GetRelativeViewportFunc | ViewportTests::TestScrollingSurface |
InArrange | ViewportTests::TestScrollingSurface |
InMeasure | ViewportTests::TestScrollingSurface |
InPostArrange | ViewportTests::TestScrollingSurface |
IsHorizontallyScrollable | ViewportTests::TestScrollingSurface |
IsVerticallyScrollable | ViewportTests::TestScrollingSurface |
MeasureOverride(Size availableSize) | ViewportTests::TestScrollingSurface | [inline, protected]
PostArrange | ViewportTests::TestScrollingSurface |
RaiseConfigurationChanged() | ViewportTests::TestScrollingSurface | [inline, private]
RegisterAnchorCandidate(UIElement element) | ViewportTests::TestScrollingSurface | [inline]
RegisterAnchorCandidateFunc | ViewportTests::TestScrollingSurface |
UnregisterAnchorCandidate(UIElement element) | ViewportTests::TestScrollingSurface | [inline]
UnregisterAnchorCandidateFunc | ViewportTests::TestScrollingSurface |
ViewportChanged | ViewportTests::TestScrollingSurface |
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabView.h Source File

  • File List
  • File Members
  • TabView

TabView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "TabView.g.h"
00010 #include "TabView.properties.h"
00011 #include "TabViewTabCloseRequestedEventArgs.g.h"
00012 #include "TabViewTabDroppedOutsideEventArgs.g.h"
00013 #include "TabViewTabDragStartingEventArgs.g.h"
00014 #include "TabViewTabDragCompletedEventArgs.g.h"
00015 #include "TabViewTabTearOutWindowRequestedEventArgs.g.h"
00016 #include "TabViewTabTearOutRequestedEventArgs.g.h"
00017 #include "TabViewExternalTornOutTabsDroppingEventArgs.g.h"
00018 #include "TabViewExternalTornOutTabsDroppedEventArgs.g.h"
00019 #include "TabViewTrace.h"
00020
00021 #include <wil/resource.h>
00022
00023 class TabViewTabCloseRequestedEventArgs :
00024     public winrt::implementation::TabViewTabCloseRequestedEventArgsT<TabViewTabCloseRequestedEventArgs>
00025 {
00026 public:
00027     TabViewTabCloseRequestedEventArgs(winrt::IInspectable const& item, winrt::TabViewItem tab) : m_item(item), m_tab(tab) {}
00028
00029     winrt::IInspectable Item() { return m_item; }
00030     winrt::TabViewItem Tab() { return m_tab; }
00031
00032 private:
00033     winrt::IInspectable m_item{};
00034     winrt::TabViewItem m_tab{};
00035 };
00036
00037
00038 class TabViewTabDroppedOutsideEventArgs :
00039     public winrt::implementation::TabViewTabDroppedOutsideEventArgsT<TabViewTabDroppedOutsideEventArgs>
00040 {
00041 public:
00042     TabViewTabDroppedOutsideEventArgs(winrt::IInspectable const& item, winrt::TabViewItem tab) : m_item(item), m_tab(tab) {}
00043
00044     winrt::IInspectable Item() { return m_item; }
00045     winrt::TabViewItem Tab() { return m_tab; }
00046
00047 private:
00048     winrt::IInspectable m_item{};
00049     winrt::TabViewItem m_tab{};
00050 };
00051
00052 class TabViewTabDragStartingEventArgs :
00053     public winrt::implementation::TabViewTabDragStartingEventArgsT<TabViewTabDragStartingEventArgs>
00054 {
00055 public:
00056     TabViewTabDragStartingEventArgs(winrt::DragItemsStartingEventArgs const& args, winrt::IInspectable const& item, winrt::TabViewItem tab) : m_args(args), m_item(item), m_tab(tab) {}
00057
00058     bool Cancel() { return m_args.Cancel(); }
00059     void Cancel(bool value) { m_args.Cancel(value); }
00060     winrt::DataPackage Data() { return m_args.Data(); }
00061     winrt::IInspectable Item() { return m_item; }
00062     winrt::TabViewItem Tab() { return m_tab; }
00063
00064 private:
00065     winrt::DragItemsStartingEventArgs m_args{};
00066     winrt::IInspectable m_item{};
00067     winrt::TabViewItem m_tab{};
00068 };
00069
00070 class TabViewTabDragCompletedEventArgs :
00071     public winrt::implementation::TabViewTabDragCompletedEventArgsT<TabViewTabDragCompletedEventArgs>
00072 {
00073 public:
00074     TabViewTabDragCompletedEventArgs(winrt::DragItemsCompletedEventArgs const& args, winrt::IInspectable const& item, winrt::TabViewItem tab) : m_args(args), m_item(item), m_tab(tab) {}
00075
00076     winrt::DataPackageOperation DropResult() { return m_args.DropResult(); }
00077     winrt::IInspectable Item() { return m_item; }
00078     winrt::TabViewItem Tab() { return m_tab; }
00079
00080 private:
00081     winrt::DragItemsCompletedEventArgs m_args{ nullptr };
00082     winrt::IInspectable m_item{};
00083     winrt::TabViewItem m_tab{};
00084 };
00085
00086 // We need to make a copy of our arrays in event arg types because in managed code, they're cleaned up after access.
00087 // In other words, if we provide a pointer to the arrays stored on the args type, they will be clobbered after being accessed once.
00088 template <class T>
00089 winrt::com_array<T> CopyArray(winrt::com_array<T> const& a)
00090 {
00091     return std::move(winrt::com_array<T>{ a.begin(), a.end()});
00092 }
00093
00094 class TabViewTabTearOutWindowRequestedEventArgs :
00095     public winrt::implementation::TabViewTabTearOutWindowRequestedEventArgsT<TabViewTabTearOutWindowRequestedEventArgs>
00096 {
00097 public:
00098     TabViewTabTearOutWindowRequestedEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab);
00099
00100     winrt::com_array<winrt::IInspectable> Items() const { return CopyArray(m_items); }
00101     winrt::com_array<winrt::UIElement> Tabs() const { return CopyArray(m_tabs); }
00102
00103     winrt::Microsoft::UI::WindowId NewWindowId() const { return m_newWindowId; }
00104     void NewWindowId(winrt::Microsoft::UI::WindowId const& value) { m_newWindowId = value; }
00105
00106 private:
00107     winrt::com_array<winrt::IInspectable> m_items;
00108     winrt::com_array<winrt::UIElement> m_tabs;
00109
00110     winrt::Microsoft::UI::WindowId m_newWindowId{};
00111 };
00112
00113 class TabViewTabTearOutRequestedEventArgs :
00114     public winrt::implementation::TabViewTabTearOutRequestedEventArgsT<TabViewTabTearOutRequestedEventArgs>
00115 {
00116 public:
00117     TabViewTabTearOutRequestedEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab);
00118
00119     winrt::com_array<winrt::IInspectable> Items() const { return CopyArray(m_items); }
00120     winrt::com_array<winrt::UIElement> Tabs() const { return CopyArray(m_tabs); }
00121
00122     winrt::Microsoft::UI::WindowId NewWindowId() const { return m_newWindowId; }
00123
00124 private:
00125     winrt::com_array<winrt::IInspectable> m_items;
00126     winrt::com_array<winrt::UIElement> m_tabs;
00127
00128     winrt::Microsoft::UI::WindowId m_newWindowId{};
00129 };
00130
00131 class TabViewExternalTornOutTabsDroppingEventArgs :
00132     public winrt::implementation::TabViewExternalTornOutTabsDroppingEventArgsT<TabViewExternalTornOutTabsDroppingEventArgs>
00133 {
00134 public:
00135     TabViewExternalTornOutTabsDroppingEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab, int dropIndex);
00136
00137     winrt::com_array<winrt::IInspectable> Items() const { return CopyArray(m_items); }
00138     winrt::com_array<winrt::UIElement> Tabs() const { return CopyArray(m_tabs); }
00139
00140     int DropIndex() const { return m_dropIndex; }
00141     bool AllowDrop() const { return m_allowDrop; }
00142     void AllowDrop(bool value) { m_allowDrop = value; }
00143
00144 private:
00145     winrt::com_array<winrt::IInspectable> m_items;
00146     winrt::com_array<winrt::UIElement> m_tabs;
00147
00148     int m_dropIndex{ -1 };
00149     bool m_allowDrop{ false };
00150 };
00151
00152 class TabViewExternalTornOutTabsDroppedEventArgs :
00153     public winrt::implementation::TabViewExternalTornOutTabsDroppedEventArgsT<TabViewExternalTornOutTabsDroppedEventArgs>
00154 {
00155 public:
00156     TabViewExternalTornOutTabsDroppedEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab, int dropIndex);
00157
00158     winrt::com_array<winrt::IInspectable> Items() const { return CopyArray(m_items); }
00159     winrt::com_array<winrt::UIElement> Tabs() const { return CopyArray(m_tabs); }
00160
00161     int DropIndex() const { return m_dropIndex; }
00162
00163 private:
00164     winrt::com_array<winrt::IInspectable> m_items;
00165     winrt::com_array<winrt::UIElement> m_tabs;
00166
00167     int m_dropIndex{ -1 };
00168 };
00169
00170 template<class T>
00171 class MutexLockedResource
00172 {
00173 public:
00174     MutexLockedResource(HANDLE mutex, T* resource)
00175     {
00176         m_mutex = mutex;
00177         m_resource = resource;
00178
00179         ::WaitForSingleObject(m_mutex, INFINITE);
00180     }
00181
00182     ~MutexLockedResource()
00183     {
00184         ::ReleaseMutex(m_mutex);
00185     }
00186
00187     T& operator*()
00188     {
00189         return *m_resource;
00190     }
00191
00192     T* operator->()
00193     {
00194         return m_resource;
00195     }
00196
00197 private:
00198     HANDLE m_mutex;
00199     T* m_resource;
00200 };
00201
00202 enum class TabTearOutDraggingState
00203 {
00204     Idle,
00205     DraggingTabWithinTabView,
00206     DraggingTornOutTab,
00207 };
00208
00209 class TabView :
00210     public ReferenceTracker<TabView, winrt::implementation::TabViewT>,
00211     public TabViewProperties
00212 {
00213
00214 public:
00215     TabView();
00216     ~TabView();
00217
00218     // IFrameworkElement
00219     void OnApplyTemplate();
00220     winrt::Size MeasureOverride(winrt::Size const& availableSize);
00221
00222     // IUIElement
00223     winrt::AutomationPeer OnCreateAutomationPeer();
00224
00225     // From ListView
00226     winrt::DependencyObject ContainerFromItem(winrt::IInspectable const& item);
00227     winrt::DependencyObject ContainerFromIndex(int index);
00228     int IndexFromContainer(winrt::DependencyObject const& container);
00229     winrt::IInspectable ItemFromContainer(winrt::DependencyObject const& container);
00230
00231     // Internal
00232     void OnCloseButtonOverlayModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00233     void OnTabItemsSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00234     void OnTabWidthModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00235     void OnSelectedIndexPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00236     void OnSelectedItemPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00237     void OnCanTearOutTabsPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00238
00239     void OnItemsChanged(winrt::IInspectable const& item);
00240     void UpdateTabContent();
00241
00242     void RequestCloseTab(winrt::TabViewItem const& item,bool updateTabWidths);
00243
00244     winrt::hstring GetTabCloseButtonTooltipText() { return m_tabCloseButtonTooltipText; }
00245     void SetTabSeparatorOpacity(int index, int opacityValue);
00246     void SetTabSeparatorOpacity(int index);
00247
00248     bool MoveFocus(bool moveForward);
00249
00250     void UpdateTabWidths(bool shouldUpdateWidths = true, bool fillAllAvailableSpace = true);
00251
00252     int GetItemCount();
00253
00254     void UpdateTabViewWithTearOutList();
00255     void AttachMoveSizeLoopEvents();
00256
00257     static MutexLockedResource<std::list<winrt::weak_ref<winrt::TabView>>> GetTabViewWithTearOutList();
00258
00259     winrt::InputNonClientPointerSource const& GetInputNonClientPointerSource();
00260     winrt::ContentCoordinateConverter const& GetAppWindowCoordinateConverter();
00261
00262 private:
00263     void OnLoaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00264     void OnUnloaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00265     void OnScrollViewerLoaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00266     void OnAddButtonClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00267     void OnScrollDecreaseClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00268     void OnScrollIncreaseClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00269     void OnScrollViewerViewChanged(winrt::IInspectable const& sender, winrt::ScrollViewerViewChangedEventArgs const& args);
00270     void OnItemsPresenterSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00271
00272     void OnListViewLoaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00273     void OnTabStripPointerExited(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00274     void OnTabStripPointerEntered(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00275     void OnListViewSelectionChanged(const winrt::IInspectable& sender, const winrt::SelectionChangedEventArgs& args);
00276     void OnListViewSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00277
00278     void OnListViewDragItemsStarting(const winrt::IInspectable& sender, const winrt::DragItemsStartingEventArgs& args);
00279     void OnListViewDragItemsCompleted(const winrt::IInspectable& sender, const winrt::DragItemsCompletedEventArgs& args);
00280     void OnListViewDragOver(const winrt::IInspectable& sender, const winrt::DragEventArgs& args);
00281     void OnListViewDrop(const winrt::IInspectable& sender, const winrt::DragEventArgs& args);
00282
00283     void OnListViewDragEnter(const winrt::IInspectable& sender, const winrt::DragEventArgs& args);
00284     void OnListViewDragLeave(const winrt::IInspectable& sender, const winrt::DragEventArgs& args);
00285
00286     void OnCtrlF4Invoked(const winrt::KeyboardAccelerator& sender, const winrt::KeyboardAcceleratorInvokedEventArgs& args);
00287     void OnCtrlTabInvoked(const winrt::KeyboardAccelerator& sender, const winrt::KeyboardAcceleratorInvokedEventArgs& args);
00288     void OnCtrlShiftTabInvoked(const winrt::KeyboardAccelerator& sender, const winrt::KeyboardAcceleratorInvokedEventArgs& args);
00289
00290     void OnAddButtonKeyDown(const winrt::IInspectable& sender, winrt::KeyRoutedEventArgs const& args);
00291
00292     bool RequestCloseCurrentTab();
00293     bool MoveSelection(bool moveForward);
00294     void BringSelectedTabIntoView();
00295
00296     void UpdateSelectedItem();
00297     void UpdateSelectedIndex();
00298
00299     void UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
00300     void UpdateListViewItemContainerTransitions();
00301
00302     void UnhookEventsAndClearFields();
00303
00304     void OnListViewDraggingPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00305     void OnListViewGettingFocus(const winrt::IInspectable& sender, const winrt::GettingFocusEventArgs& args);
00306
00307     void UpdateBottomBorderLineVisualStates();
00308     void UpdateTabBottomBorderLineVisualStates();
00309
00310     winrt::TabViewItem FindTabViewItemFromDragItem(const winrt::IInspectable& item);
00311
00312     static bool IsFocusable(winrt::DependencyObject const& object, bool checkTabStop = false);
00313
00314     void UpdateIsItemDraggedOver(bool isItemDraggedOver);
00315
00316     void OnEnteringMoveSize(const winrt::InputNonClientPointerSource& sender, const winrt::EnteringMoveSizeEventArgs& args);
00317     void OnEnteredMoveSize(const winrt::InputNonClientPointerSource& sender, const winrt::EnteredMoveSizeEventArgs& args);
00318     void OnWindowRectChanging(const winrt::InputNonClientPointerSource& sender, const winrt::WindowRectChangingEventArgs& args);
00319     void OnExitedMoveSize(const winrt::InputNonClientPointerSource& sender, const winrt::ExitedMoveSizeEventArgs& args);
00320
00321     winrt::TabViewItem GetTabAtPoint(const winrt::Point& point);
00322     void PopulateTabViewList();
00323
00324     void DragTabWithinTabView(const winrt::WindowRectChangingEventArgs& args);
00325     void UpdateTabIndex(winrt::TabViewItem const& tabBeingDragged, winrt::Point const& pointerPosition);
00326     void TearOutTab(winrt::TabViewItem const& tabBeingDragged, winrt::Point const& pointerPosition);
00327     void DragTornOutTab(const winrt::WindowRectChangingEventArgs& args);
00328     int GetTabInsertionIndex(winrt::TabView const& otherTabView, winrt::PointInt32 const& screenPosition);
00329
00330     void UpdateNonClientRegion();
00331     winrt::WindowId GetAppWindowId();
00332
00333     static std::list<winrt::weak_ref<winrt::TabView>> s_tabViewWithTearOutList;
00334     static HANDLE s_tabWithTearOutListMutex;
00335
00336     bool m_updateTabWidthOnPointerLeave{ false };
00337     bool m_pointerInTabstrip{ false };
00338
00339     tracker_ref<winrt::ColumnDefinition> m_leftContentColumn{ this };
00340     tracker_ref<winrt::ColumnDefinition> m_tabColumn{ this };
00341     tracker_ref<winrt::ColumnDefinition> m_addButtonColumn{ this };
00342     tracker_ref<winrt::ColumnDefinition> m_rightContentColumn{ this };
00343
00344     tracker_ref<winrt::ListView> m_listView{ this };
00345     tracker_ref<winrt::ContentPresenter> m_tabContentPresenter{ this };
00346     tracker_ref<winrt::ContentPresenter> m_rightContentPresenter{ this };
00347     tracker_ref<winrt::Grid> m_tabContainerGrid{ this };
00348     tracker_ref<winrt::FxScrollViewer> m_scrollViewer{ this };
00349     tracker_ref<winrt::RepeatButton> m_scrollDecreaseButton{ this };
00350     tracker_ref<winrt::RepeatButton> m_scrollIncreaseButton{ this };
00351     tracker_ref<winrt::Button> m_addButton{ this };
00352     tracker_ref<winrt::ItemsPresenter> m_itemsPresenter{ this };
00353
00354     winrt::ListView::Loaded_revoker m_listViewLoadedRevoker{};
00355     winrt::ListView::PointerExited_revoker m_tabStripPointerExitedRevoker{};
00356     winrt::ListView::PointerEntered_revoker m_tabStripPointerEnteredRevoker{};
00357     winrt::Selector::SelectionChanged_revoker m_listViewSelectionChangedRevoker{};
00358     winrt::UIElement::GettingFocus_revoker m_listViewGettingFocusRevoker{};
00359     winrt::FrameworkElement::SizeChanged_revoker m_listViewSizeChangedRevoker{};
00360
00361     PropertyChanged_revoker m_listViewCanReorderItemsPropertyChangedRevoker{};
00362     PropertyChanged_revoker m_listViewAllowDropPropertyChangedRevoker{};
00363
00364     winrt::ListView::DragItemsStarting_revoker m_listViewDragItemsStartingRevoker{};
00365     winrt::ListView::DragItemsCompleted_revoker m_listViewDragItemsCompletedRevoker{};
00366     winrt::UIElement::DragOver_revoker m_listViewDragOverRevoker{};
00367
00368     RoutedEventHandler_revoker m_listViewDropRevoker{};
00369     RoutedEventHandler_revoker m_listViewDragEnterRevoker{};
00370     RoutedEventHandler_revoker m_listViewDragLeaveRevoker{};
00371
00372     winrt::FxScrollViewer::Loaded_revoker m_scrollViewerLoadedRevoker{};
00373     winrt::FxScrollViewer::ViewChanged_revoker m_scrollViewerViewChangedRevoker{};
00374
00375     winrt::Button::Click_revoker m_addButtonClickRevoker{};
00376
00377     winrt::RepeatButton::Click_revoker m_scrollDecreaseClickRevoker{};
00378     winrt::RepeatButton::Click_revoker m_scrollIncreaseClickRevoker{};
00379
00380     winrt::Button::KeyDown_revoker m_addButtonKeyDownRevoker{};
00381
00382     winrt::ItemsPresenter::SizeChanged_revoker m_itemsPresenterSizeChangedRevoker{};
00383
00384     winrt::hstring m_tabCloseButtonTooltipText{};
00385
00386     winrt::Size m_previousAvailableSize{};
00387
00388     bool m_isItemBeingDragged{ false };
00389     bool m_isItemDraggedOver{ false };
00390     std::optional<double> m_expandedWidthForDragOver{};
00391
00392     winrt::event_token m_enteringMoveSizeToken{};
00393     winrt::event_token m_enteredMoveSizeToken{};
00394     winrt::event_token m_windowRectChangingToken{};
00395     winrt::event_token m_exitedMoveSizeToken{};
00396
00397     bool m_isInTabTearOutLoop{ false };
00398     winrt::AppWindow m_tabTearOutNewAppWindow{ nullptr };
00399     winrt::IInspectable m_dataItemBeingDragged{ nullptr };
00400     winrt::TabViewItem m_tabBeingDragged{ nullptr };
00401     winrt::TabView m_tabViewContainingTabBeingDragged{ nullptr };
00402     winrt::TabView m_tabViewInNewAppWindow{ nullptr };
00403     winrt::Point m_originalTabBeingDraggedPoint{};
00404     winrt::Point m_dragPositionOffset{};
00405     TabTearOutDraggingState m_tabTearOutDraggingState{ TabTearOutDraggingState::Idle };
00406     winrt::PointInt32 m_tabTearOutInitialPosition{};
00407
00408     winrt::RectInt32 m_nonClientRegion{};
00409     bool m_nonClientRegionSet{ false };
00410
00411     std::vector<std::tuple<winrt::RectInt32, winrt::TabView>> m_tabViewBoundsTuples;
00412
00413     winrt::WindowId m_lastAppWindowId{};
00414     winrt::InputNonClientPointerSource m_inputNonClientPointerSource{ nullptr };
00415     winrt::ContentCoordinateConverter m_appWindowCoordinateConverter{ nullptr };
00416 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonAutomationPeer.cpp Source File

  • File List
  • File Members
  • SplitButton

SplitButtonAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "SplitButton.h"
00008 #include "SplitButtonAutomationPeer.h"
00009 #include "Utils.h"
00010
00011 #include "SplitButtonAutomationPeer.properties.cpp"
00012
00013 SplitButtonAutomationPeer::SplitButtonAutomationPeer(winrt::SplitButton const& owner)
00014     : ReferenceTracker(owner)
00015 {
00016 }
00017
00018 // IAutomationPeerOverrides
00019 winrt::IInspectable SplitButtonAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00020 {
00021     if (patternInterface == winrt::PatternInterface::ExpandCollapse ||
00022         patternInterface == winrt::PatternInterface::Invoke)
00023     {
00024         return *this;
00025     }
00026
00027     return __super::GetPatternCore(patternInterface);
00028 }
00029
00030 hstring SplitButtonAutomationPeer::GetClassNameCore()
00031 {
00032     return winrt::hstring_name_of<winrt::SplitButton>();
00033 }
00034
00035 winrt::AutomationControlType SplitButtonAutomationPeer::GetAutomationControlTypeCore()
00036 {
00037     return winrt::AutomationControlType::SplitButton;
00038 }
00039
00040 com_ptr<SplitButton> SplitButtonAutomationPeer::GetImpl()
00041 {
00042     com_ptr<SplitButton> impl = nullptr;
00043
00044     if (auto splitButton = Owner().try_as<winrt::SplitButton>())
00045     {
00046         impl = winrt::get_self<SplitButton>(splitButton)->get_strong();
00047     }
00048
00049     return impl;
00050 }
00051
00052 // IExpandCollapseProvider
00053 winrt::ExpandCollapseState SplitButtonAutomationPeer::ExpandCollapseState()
00054 {
00055     winrt::ExpandCollapseState currentState = winrt::ExpandCollapseState::Collapsed;
00056
00057     if (auto splitButton = GetImpl())
00058     {
00059         if (splitButton->IsFlyoutOpen())
00060         {
00061             currentState = winrt::ExpandCollapseState::Expanded;
00062         }
00063     }
00064
00065     return currentState;
00066 }
00067
00068 void SplitButtonAutomationPeer::Expand()
00069 {
00070     if (auto splitButton = GetImpl())
00071     {
00072         splitButton->OpenFlyout();
00073     }
00074 }
00075
00076 void SplitButtonAutomationPeer::Collapse()
00077 {
00078     if (auto splitButton = GetImpl())
00079     {
00080         splitButton->CloseFlyout();
00081     }
00082 }
00083
00084 // IInvokeProvider
00085 void SplitButtonAutomationPeer::Invoke()
00086 {
00087     if (auto splitButton = GetImpl())
00088     {
00089         splitButton->Invoke();
00090     }
00091 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarTrace Member List

This is the complete list of members for AnnotatedScrollBarTrace, including all inherited members.
s_IsDebugOutputEnabled | AnnotatedScrollBarTrace | [static]
s_IsVerboseDebugOutputEnabled | AnnotatedScrollBarTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | AnnotatedScrollBarTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | AnnotatedScrollBarTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | AnnotatedScrollBarTrace | [inline, static]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewCollapsedEventArgs.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewCollapsedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeViewCollapsedEventArgs.h"
00007
00008 winrt::TreeViewNode TreeViewCollapsedEventArgs::Node()
00009 {
00010     return m_node.get();
00011 }
00012
00013 void TreeViewCollapsedEventArgs::Node(const winrt::TreeViewNode& value)
00014 {
00015     m_node.set(value);
00016 }
00017
00018 winrt::IInspectable TreeViewCollapsedEventArgs::Item()
00019 {
00020     return m_node.get().Content();
00021 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/MenuFlyoutPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

MenuFlyoutPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.Foundation;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Input;
00008 using Microsoft.UI.Dispatching;
00009 using System.Collections.Generic;
00010
00011 namespace MUXControlsTestApp
00012 {
00013
00014     [TopLevelTestPage(Name = "MenuFlyout", Icon = "MenuFlyout.png")]
00015     public sealed partial class MenuFlyoutPage : TestPage
00016     {
00017         private MenuFlyout sharedFlyout;
00018         public MenuFlyoutPage()
00019         {
00020             this.InitializeComponent();
00021
00022             sharedFlyout = (MenuFlyout)Resources["SampleContextMenu"];
00023         }
00024
00025         private void TestMenuFlyoutItemClick(object sender, object e)
00026         {
00027             TestMenuFlyoutItemHeightTextBlock.Text = $"{TestMenuFlyoutItem.ActualHeight}";
00028             TestMenuFlyoutItemWidthTextBlock.Text = $"{TestMenuFlyoutItem.ActualWidth}";
00029         }
00030
00031         private void Grid_ContextRequested(UIElement sender, ContextRequestedEventArgs args)
00032         {
00033             var requestedElement = sender as FrameworkElement;
00034
00035             if (args.TryGetPosition(requestedElement, out Point point))
00036             {
00037                 sharedFlyout.ShowAt(requestedElement, point);
00038             }
00039             else
00040             {
00041                 sharedFlyout.ShowAt(requestedElement);
00042             }
00043         }
00044
00045         DispatcherQueueTimer itemChangeTimer;
00046         List<MenuFlyoutItemBase> itemsToToggle;
00047
00048         private void OnMenuFlyoutChangingItemsOpened(object sender, object e)
00049         {
00050             IList<MenuFlyoutItemBase> items = MenuFlyoutChangingItems.Items;
00051
00052             if (itemChangeTimer == null)
00053             {
00054                 itemsToToggle = new List<MenuFlyoutItemBase> {
00055                     items[4],
00056                     items[5],
00057                     items[6],
00058                     items[7]
00059                 };
00060
00061                 itemChangeTimer = DispatcherQueue.GetForCurrentThread().CreateTimer();
00062                 itemChangeTimer.Interval = System.TimeSpan.FromSeconds(1);
00063                 itemChangeTimer.Tick += (timer, args) =>
00064                 {
00065                     if (items.Count == 8)
00066                     {
00067                         itemsToToggle.ForEach(item => items.Remove(item));
00068                     }
00069                     else
00070                     {
00071                         itemsToToggle.ForEach(item => items.Add(item));
00072                     }
00073                 };
00074             }
00075
00076             itemChangeTimer.Start();
00077         }
00078
00079         private void OnMenuFlyoutChangingItemsClosed(object sender, object e)
00080         {
00081             if (itemChangeTimer != null)
00082             {
00083                 itemChangeTimer.Stop();
00084             }
00085         }
00086
00087         DispatcherQueueTimer subItemChangeTimer;
00088         List<MenuFlyoutItemBase> subItemsToToggle;
00089
00090         private void OnMenuFlyoutChangingSubItemsOpened(object sender, object e)
00091         {
00092             IList<MenuFlyoutItemBase> subItems = ((MenuFlyoutSubItem)MenuFlyoutChangingSubItems.Items[0]).Items;
00093
00094             if (subItemChangeTimer == null)
00095             {
00096                 subItemsToToggle = new List<MenuFlyoutItemBase> {
00097                     subItems[4],
00098                     subItems[5],
00099                     subItems[6],
00100                     subItems[7]
00101                 };
00102
00103                 subItemChangeTimer = DispatcherQueue.GetForCurrentThread().CreateTimer();
00104                 subItemChangeTimer.Interval = System.TimeSpan.FromSeconds(1);
00105                 subItemChangeTimer.Tick += (timer, args) =>
00106                 {
00107                     if (subItems.Count == 8)
00108                     {
00109                         subItemsToToggle.ForEach(item => subItems.Remove(item));
00110                     }
00111                     else
00112                     {
00113                         subItemsToToggle.ForEach(item => subItems.Add(item));
00114                     }
00115                 };
00116             }
00117
00118             subItemChangeTimer.Start();
00119         }
00120
00121         private void OnMenuFlyoutChangingSubItemsClosed(object sender, object e)
00122         {
00123             if (itemChangeTimer != null)
00124             {
00125                 itemChangeTimer.Stop();
00126             }
00127         }
00128     }
00129 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/pch.cpp Source File

  • File List
  • File Members
  • dll

pch.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma warning(push)
00005 #pragma warning(disable : 4996)
00006 #include "pch.h"
00007 #pragma warning(pop)
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ToggleSplitButtonAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ToggleSplitButtonAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ToggleSplitButtonAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ToggleSplitButtonAutomationPeer)
00012 }
00013
00014 #include "ToggleSplitButtonAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/OffsetsChangeWithAdditionalVelocity.h Source File

  • File List
  • File Members
  • ScrollPresenter

OffsetsChangeWithAdditionalVelocity.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ViewChangeBase.h"
00007
00008 class OffsetsChangeWithAdditionalVelocity : public ViewChangeBase
00009 {
00010 public:
00011     OffsetsChangeWithAdditionalVelocity(
00012         winrt::float2 offsetsVelocity,
00013         winrt::float2 anticipatedOffsetsChange,
00014         winrt::IReference<winrt::float2> inertiaDecayRate);
00015     ~OffsetsChangeWithAdditionalVelocity();
00016
00017     winrt::float2 OffsetsVelocity() const
00018     {
00019         return m_offsetsVelocity;
00020     }
00021
00022     void OffsetsVelocity(winrt::float2 const& offsetsVelocity);
00023
00024     winrt::float2 AnticipatedOffsetsChange() const
00025     {
00026         return m_anticipatedOffsetsChange;
00027     }
00028
00029     void AnticipatedOffsetsChange(winrt::float2 const& anticipatedOffsetsChange);
00030
00031     winrt::IReference<winrt::float2> InertiaDecayRate() const
00032     {
00033         return m_inertiaDecayRate;
00034     }
00035
00036     void InertiaDecayRate(winrt::IReference<winrt::float2> const& inertiaDecayRate);
00037
00038 private:
00039     winrt::float2 m_offsetsVelocity{};
00040     winrt::float2 m_anticipatedOffsetsChange{};
00041     winrt::IReference<winrt::float2> m_inertiaDecayRate{};
00042 };
00043
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/NavigationViewCaseBundle.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI

NavigationViewCaseBundle.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Private.Controls;
00007
00008 using WEX.TestExecution;
00009 using WEX.TestExecution.Markup;
00010 using WEX.Logging.Interop;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     [TopLevelTestPage(Name = "NavigationView", Icon = "NavigationView.png")]
00015     public sealed partial class NavigationViewCaseBundle : TestPage
00016     {
00017         public NavigationViewCaseBundle()
00018         {
00019             LogController.InitializeLogging();
00020             this.InitializeComponent();
00021             NavigationViewPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewPage), 0); };
00022             NavigationViewInfoBadgePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewInfoBadgeTestPage), 0); };
00023             NavigationViewCompactPaneLengthTestPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewCompactPaneLengthTestPage), 0); };
00024             NavigationViewRS4Page.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewRS4Page), 0); };
00025             NavigationViewPageDataContext.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewPageDataContext), 0); };
00026             NavigationViewTopNavPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavPage), 0); };
00027             NavigationViewTopNavOnlyPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavOnlyPage), 0); };
00028             NavigationViewTopNavStorePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavStorePage), 0); };
00029             NavigateToTopNavOverflowButtonPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewTopNavOverflowButtonPage), 0); };
00030             NavigateToSelectedItemEdgeCasePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewSelectedItemEdgeCasePage), 0); };
00031             NavigateToInitPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewInitPage), 0); };
00032             NavigateToStretchPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewStretchPage), 0); };
00033             NavigationViewMenuItemsSourcePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewMenuItemsSourcePage), 0); };
00034             NavigateToItemTemplatePage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewItemTemplatePage), 0); };
00035             NavigationViewCustomMenuItemPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewCustomMenuItemPage), 0); };
00036             NavigateToRS3Page.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewRS3Page), 0); };
00037             NavigateToAnimationPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewAnimationPage), 0); };
00038             NavigateToIsPaneOpenPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewIsPaneOpenPage), 0); };
00039             NavigateToMinimalPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewMinimalPage), 0); };
00040             NavigateToCustomThemeResourcesPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewCustomThemeResourcesPage), 0); };
00041             NavigationViewBlankPage1.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewBlankPage1), 0); };
00042             NavigationViewMenuItemStretchPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NavigationViewMenuItemStretchPage), 0); };
00043             NavigateToHierarchicalNavigationViewMarkupPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(HierarchicalNavigationViewMarkup), 0); };
00044             NavigateToHierarchicalNavigationViewDataBindingPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(HierarchicalNavigationViewDataBinding), 0); };
00045             PaneLayoutTestPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(PaneLayoutTestPage), 0); };
00046             PaneFooterTestPageButton.Click += delegate { Frame.NavigateWithoutAnimation(typeof(PaneFooterTestPage), 0); };
00047         }
00048
00049         private void CmbNavigationViewOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e)
00050         {
00051            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00052                "NavigationView",
00053                cmbNavigationViewOutputDebugStringLevel.SelectedIndex == 1 || cmbNavigationViewOutputDebugStringLevel.SelectedIndex == 2,
00054                cmbNavigationViewOutputDebugStringLevel.SelectedIndex == 2);
00055         }
00056     }
00057 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItems.cpp Source File

  • File List
  • File Members
  • SwipeControl

SwipeItems.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SwipeItems.h"
00007 #include "SwipeItem.h"
00008 #include "SwipeControl.h"
00009 #include "Vector.h"
00010 #include "VectorIterator.h"
00011
00012 SwipeItems::SwipeItems()
00013 {
00014     // create the Collection
00015     auto collection = winrt::make<Vector<winrt::SwipeItem, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>();
00016
00017     put_Items(collection);
00018 }
00019
00020 void SwipeItems::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00021 {
00022     if (args.Property() == s_ModeProperty)
00023     {
00024         if (winrt::unbox_value<winrt::SwipeMode>(args.NewValue()) == winrt::SwipeMode::Execute && m_items.get().Size() > 1)
00025         {
00026             throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
00027         }
00028     }
00029 }
00030
00031 void SwipeItems::put_Items(
00032     const winrt::Collections::IVector<winrt::SwipeItem>& value)
00033 {
00034     if (Mode() == winrt::SwipeMode::Execute && value.Size() > 1)
00035     {
00036         throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
00037     }
00038
00039     m_items.set(value);
00040     m_vectorChangedEventSource(*this, nullptr);
00041 }
00042
00043 winrt::SwipeItem SwipeItems::GetAt(uint32_t index)
00044 {
00045     if (index >= m_items.get().Size())
00046     {
00047         throw winrt::hresult_out_of_bounds();
00048     }
00049     return m_items.get().GetAt(index);
00050 }
00051
00052 uint32_t SwipeItems::Size()
00053 {
00054     return m_items.get().Size();
00055 }
00056
00057 bool SwipeItems::IndexOf(winrt::SwipeItem const& value, uint32_t& index)
00058 {
00059     if (index >= m_items.get().Size())
00060     {
00061         throw winrt::hresult_out_of_bounds();
00062     }
00063     return m_items.get().IndexOf(value, index);
00064 }
00065
00066 void SwipeItems::SetAt(uint32_t index, winrt::SwipeItem const& value)
00067 {
00068     if (index >= m_items.get().Size())
00069     {
00070         throw winrt::hresult_out_of_bounds();
00071     }
00072     m_items.get().SetAt(index, value);
00073     m_vectorChangedEventSource(*this, nullptr);
00074 }
00075
00076 void SwipeItems::InsertAt(uint32_t index, winrt::SwipeItem const& value)
00077 {
00078     if (Mode() == winrt::SwipeMode::Execute && m_items.get().Size() > 0)
00079     {
00080         throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
00081     }
00082     if (index > m_items.get().Size())
00083     {
00084         throw winrt::hresult_out_of_bounds();
00085     }
00086
00087     m_items.get().InsertAt(index, value);
00088     m_vectorChangedEventSource(*this, nullptr);
00089 }
00090
00091 void SwipeItems::RemoveAt(uint32_t index)
00092 {
00093     if (index >= m_items.get().Size())
00094     {
00095         throw winrt::hresult_out_of_bounds();
00096     }
00097     m_items.get().RemoveAt(index);
00098     m_vectorChangedEventSource(*this, nullptr);
00099 }
00100
00101 void SwipeItems::Append(winrt::SwipeItem const& value)
00102 {
00103     if (Mode() == winrt::SwipeMode::Execute && m_items.get().Size() > 0)
00104     {
00105         throw winrt::hresult_invalid_argument(L"Execute items should only have one item.");
00106     }
00107
00108     m_items.get().Append(value);
00109     m_vectorChangedEventSource(*this, nullptr);
00110 }
00111
00112 void SwipeItems::RemoveAtEnd()
00113 {
00114     m_items.get().RemoveAtEnd();
00115     m_vectorChangedEventSource(*this, nullptr);
00116 }
00117
00118 void SwipeItems::Clear()
00119 {
00120     m_items.get().Clear();
00121     m_vectorChangedEventSource(*this, nullptr);
00122 }
00123
00124 winrt::IVectorView<winrt::SwipeItem> SwipeItems::GetView()
00125 {
00126     return m_items.get().GetView();
00127 }
00128
00129 winrt::event_token SwipeItems::VectorChanged(winrt::VectorChangedEventHandler<winrt::SwipeItem> const& handler)
00130 {
00131     return m_vectorChangedEventSource.add(handler);
00132 }
00133
00134 void SwipeItems::VectorChanged(winrt::event_token const token)
00135 {
00136     m_vectorChangedEventSource.remove(token);
00137 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AutoSuggestBoxPage Member List

This is the complete list of members for AutoSuggestBoxPage, including all inherited members.
AutoSuggestBox_QuerySubmitted(Microsoft.UI.Xaml.Controls.AutoSuggestBox sender, Microsoft.UI.Xaml.Controls.AutoSuggestBoxQuerySubmittedEventArgs args) | AutoSuggestBoxPage | [inline, private]
AutoSuggestBoxPage() | AutoSuggestBoxPage | [inline]
suggestions | AutoSuggestBoxPage | [private]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooks.cpp Source File

  • File List
  • File Members
  • ItemsView

ItemsViewTestHooks.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsViewTestHooksFactory.h"
00007
00008 com_ptr<ItemsViewTestHooks> ItemsViewTestHooks::s_testHooks{};
00009
00010 com_ptr<ItemsViewTestHooks> ItemsViewTestHooks::EnsureGlobalTestHooks()
00011 {
00012     static bool s_initialized = []()
00013     {
00014         s_testHooks = winrt::make_self<ItemsViewTestHooks>();
00015         return true;
00016     }();
00017     return s_testHooks;
00018 }
00019
00020 winrt::Point ItemsViewTestHooks::GetKeyboardNavigationReferenceOffset(const winrt::ItemsView& itemsView)
00021 {
00022     if (itemsView)
00023     {
00024         return winrt::get_self<ItemsView>(itemsView)->GetKeyboardNavigationReferenceOffset();
00025     }
00026     else
00027     {
00028         return winrt::Point{ -1.0f, -1.0f };
00029     }
00030 }
00031
00032 void ItemsViewTestHooks::NotifyKeyboardNavigationReferenceOffsetChanged(const winrt::ItemsView& itemsView)
00033 {
00034     auto hooks = EnsureGlobalTestHooks();
00035     if (hooks->m_keyboardNavigationReferenceOffsetChangedEventSource)
00036     {
00037         hooks->m_keyboardNavigationReferenceOffsetChangedEventSource(itemsView, nullptr);
00038     }
00039 }
00040
00041 winrt::event_token ItemsViewTestHooks::KeyboardNavigationReferenceOffsetChanged(winrt::TypedEventHandler<winrt::ItemsView, winrt::IInspectable> const& value)
00042 {
00043     auto hooks = EnsureGlobalTestHooks();
00044     return hooks->m_keyboardNavigationReferenceOffsetChangedEventSource.add(value);
00045 }
00046
00047 void ItemsViewTestHooks::KeyboardNavigationReferenceOffsetChanged(winrt::event_token const& token)
00048 {
00049     auto hooks = EnsureGlobalTestHooks();
00050     hooks->m_keyboardNavigationReferenceOffsetChangedEventSource.remove(token);
00051 }
00052
00053 winrt::ScrollView ItemsViewTestHooks::GetScrollViewPart(const winrt::ItemsView& itemsView)
00054 {
00055     if (itemsView)
00056     {
00057         return winrt::get_self<ItemsView>(itemsView)->GetScrollViewPart();
00058     }
00059
00060     return nullptr;
00061 }
00062
00063 winrt::ItemsRepeater ItemsViewTestHooks::GetItemsRepeaterPart(const winrt::ItemsView& itemsView)
00064 {
00065     if (itemsView)
00066     {
00067         return winrt::get_self<ItemsView>(itemsView)->GetItemsRepeaterPart();
00068     }
00069
00070     return nullptr;
00071 }
00072
00073 winrt::SelectionModel ItemsViewTestHooks::GetSelectionModel(const winrt::ItemsView& itemsView)
00074 {
00075     if (itemsView)
00076     {
00077         return winrt::get_self<ItemsView>(itemsView)->GetSelectionModel();
00078     }
00079
00080     return nullptr;
00081 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterAutomationPeer.h Source File

  • File List
  • File Members
  • Repeater

RepeaterAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RepeaterAutomationPeer.g.h"
00007
00008 class RepeaterAutomationPeer :
00009     public ReferenceTracker<RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT>
00010 {
00011 public:
00012     RepeaterAutomationPeer(winrt::ItemsRepeater const& owner);
00013
00014 #pragma region IAutomationPeerOverrides
00015
00016     winrt::IVector<winrt::AutomationPeer> GetChildrenCore();
00017     winrt::AutomationControlType GetAutomationControlTypeCore();
00018
00019 #pragma endregion
00020
00021 private:
00022     winrt::UIElement GetElement(const winrt::AutomationPeer& peer, const winrt::ItemsRepeater& repeater);
00023 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2.idl Source File

  • File List
  • File Members
  • WebView2

WebView2.idl

Go to the documentation of this file.
00001 ﻿midl_pragma warning( disable: 5135 ) // a type that is not marked [experimental] cannot reference a type that is marked [experimental]
00002
00003 namespace MU_XC_NAMESPACE
00004 {
00005
00006 [webhosthidden]
00007 [MUX_PUBLIC]
00008 runtimeclass CoreWebView2InitializedEventArgs
00009 {
00010     HRESULT Exception{ get; };
00011 }
00012
00013 [webhosthidden]
00014 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00015 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00016 [MUX_PUBLIC]
00017 unsealed runtimeclass WebView2 : Microsoft.UI.Xaml.FrameworkElement
00018 {
00019     WebView2();
00020     Microsoft.Web.WebView2.Core.CoreWebView2 CoreWebView2{ get; };
00021
00022     Windows.Foundation.IAsyncAction EnsureCoreWebView2Async();
00023     [MUX_PUBLIC_V6]
00024     [overload("EnsureCoreWebView2Async")] Windows.Foundation.IAsyncAction EnsureCoreWebView2WithEnvironmentAsync(Microsoft.Web.WebView2.Core.CoreWebView2Environment environment);
00025     [MUX_PUBLIC_V6]
00026     [overload("EnsureCoreWebView2Async")] Windows.Foundation.IAsyncAction EnsureCoreWebView2WithEnvironmentAndOptionsAsync(Microsoft.Web.WebView2.Core.CoreWebView2Environment environment, Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions controllerOptions);
00027
00028     Windows.Foundation.IAsyncOperation<String> ExecuteScriptAsync(String javascriptCode);
00029     Windows.Foundation.Uri Source{ get; set; };
00030     Boolean CanGoForward{ get; set; };
00031     Boolean CanGoBack{ get; set; };
00032
00033     [MUX_DEFAULT_VALUE("WebView2::sc_controllerDefaultBackgroundColor")]
00034     Windows.UI.Color DefaultBackgroundColor{ get; set; };
00035
00036     void Reload();
00037     void GoForward();
00038     void GoBack();
00039     void NavigateToString(String htmlContent);
00040     void Close();
00041
00042     static Microsoft.UI.Xaml.DependencyProperty SourceProperty{ get; };
00043     static Microsoft.UI.Xaml.DependencyProperty CanGoForwardProperty{ get; };
00044     static Microsoft.UI.Xaml.DependencyProperty CanGoBackProperty{ get; };
00045     static Microsoft.UI.Xaml.DependencyProperty DefaultBackgroundColorProperty{ get; };
00046
00047     event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2NavigationCompletedEventArgs> NavigationCompleted;
00048     event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2WebMessageReceivedEventArgs> WebMessageReceived;
00049     event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2NavigationStartingEventArgs> NavigationStarting;
00050     event Windows.Foundation.TypedEventHandler<WebView2, Microsoft.Web.WebView2.Core.CoreWebView2ProcessFailedEventArgs> CoreProcessFailed;
00051     event Windows.Foundation.TypedEventHandler<WebView2, CoreWebView2InitializedEventArgs> CoreWebView2Initialized;
00052 }
00053
00054 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsView Member List

This is the complete list of members for ItemsView, including all inherited members.
abi_enter() | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
ApplySelectionModelSelectionChange() | ItemsView | [private]
ApplyVerticalScrollController() | ItemsView | [private]
AreNavigationKeysOpposite(const winrt::VirtualKey &key1, const winrt::VirtualKey &key2) const | ItemsView | [private]
CacheOriginalVerticalScrollControllerAndVisibility() | ItemsView | [private]
CanRaiseItemInvoked(const winrt::ItemContainerInteractionTrigger &interactionTrigger, const winrt::ItemContainer &itemContainer) | ItemsView | [private]
CanScrollVertically() | ItemsView | [private]
CheckThread() | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
ClearAllItemsViewItemContainerRevokers() noexcept | ItemsView | [private]
ClearItemsViewItemContainerRevokers(const winrt::ItemContainer &itemContainer) | ItemsView | [private]
ClearProperties() | ItemsViewProperties | [static]
CompleteStartBringItemIntoView() | ItemsView | [private]
CurrentItemIndex(int value) | ItemsViewProperties |
CurrentItemIndex() | ItemsViewProperties |
CurrentItemIndexProperty() | ItemsViewProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< ItemsView > &&self) noexcept | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline, static]
Deselect(int itemIndex) | ItemsView |
DeselectAll() | ItemsView |
EnsureItemTemplate() | ItemsView | [private]
EnsureProperties() | ItemsViewProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
final_release(std::unique_ptr< ItemsView > &&self) | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline, static]
GetAdjacentFocusableElementByDirection(const winrt::FocusNavigationDirection &focusNavigationDirection, bool hasIndexBasedLayoutOrientation) | ItemsView | [private]
GetAdjacentFocusableElementByIndex(bool getPreviousFocusableElement) | ItemsView | [private]
GetBase() | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
GetCornerFocusableItem(bool isForTopLeftItem) | ItemsView | [private]
GetCurrentElementIndex() const | ItemsView |
GetDistanceToKeyboardNavigationReferenceOffset(const winrt::FocusNavigationDirection &focusNavigationDirection, const winrt::Rect &currentElementRect, const winrt::UIElement &element, const winrt::ItemsRepeater &itemsRepeater, float keyboardNavigationReferenceOffset, double roundingScaleFactor, float *navigationDirectionDistance, float *noneNavigationDirectionDistance) const | ItemsView | [private]
GetElementIndex(const winrt::UIElement &element) const | ItemsView | [private]
GetElementIndexPath(const winrt::UIElement &element, bool *isValid) const | ItemsView | [private]
GetElementItem(const winrt::UIElement &element, bool *valueReturned) const | ItemsView | [private]
GetElementRect(const winrt::UIElement &element, const winrt::ItemsRepeater &itemsRepeater) const | ItemsView | [private]
GetInner() | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
GetItemInternal(double horizontalViewportRatio, double verticalViewportRatio, bool isHorizontalDistanceFavored, bool isVerticalDistanceFavored, bool useKeyboardNavigationReferenceHorizontalOffset, bool useKeyboardNavigationReferenceVerticalOffset, bool capItemEdgesToViewportRatioEdges, bool forFocusableItemsOnly) | ItemsView | [private]
GetItemsRepeaterPart() const | ItemsView |
GetKeyboardNavigationReferenceOffset() const | ItemsView |
GetLayoutIndexBasedLayoutOrientation() | ItemsView | [private]
GetRoundingScaleFactor(const winrt::UIElement &xamlRootReference) const | ItemsView | [private]
GetScrollViewPart() const | ItemsView |
GetSelectionModel() const | ItemsView |
GetTrailingNavigationKeyCount() const | ItemsView | [private]
GetUpdatedKeyboardNavigationReferenceOffset() | ItemsView | [private]
HookCompositionTargetRendering() | ItemsView | [private]
HookItemsRepeaterEvents() | ItemsView | [private]
HookItemsSourceViewEvents() | ItemsView | [private]
HookScrollViewEvents() | ItemsView | [private]
InvertSelection() | ItemsView |
IsCancelingNavigationKey(const winrt::VirtualKey &key, bool isRepeatKey) | ItemsView | [private]
IsItemInvokedEnabled(bool value) | ItemsViewProperties |
IsItemInvokedEnabled() | ItemsViewProperties |
IsItemInvokedEnabledProperty() | ItemsViewProperties | [inline, static]
IsLayoutOrientationIndexBased(bool horizontal) | ItemsView | [private]
IsNavigationKey(const winrt::VirtualKey &key) const | ItemsView | [private]
IsOnThread() | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
IsSelected(int itemIndex) | ItemsView |
ItemInvoked(winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs > const &value) | ItemsViewProperties |
ItemInvoked(winrt::event_token const &token) | ItemsViewProperties |
ItemsSource(winrt::IInspectable const &value) | ItemsViewProperties |
ItemsSource() | ItemsViewProperties |
ItemsSourceProperty() | ItemsViewProperties | [inline, static]
ItemsView() | ItemsView |
ItemsViewProperties() | ItemsViewProperties |
ItemTemplate(winrt::IElementFactory const &value) | ItemsViewProperties |
ItemTemplate() | ItemsViewProperties |
ItemTemplateProperty() | ItemsViewProperties | [inline, static]
ItemTransitionProvider(winrt::ItemCollectionTransitionProvider const &value) | ItemsViewProperties |
ItemTransitionProvider() | ItemsViewProperties |
ItemTransitionProviderProperty() | ItemsViewProperties | [inline, static]
Layout(winrt::Layout const &value) | ItemsViewProperties |
Layout() | ItemsViewProperties |
LayoutProperty() | ItemsViewProperties | [inline, static]
m_itemContainersPointerInfos | ItemsView | [private]
m_itemContainersWithRevokers | ItemsView | [private]
m_itemInvokedEventSource | ItemsViewProperties |
m_navigationKeysToProcess | ItemsView | [private]
m_selectionChangedEventSource | ItemsViewProperties |
m_selector | ItemsView | [inline, private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
OnApplyTemplate() | ItemsView |
OnCompositionTargetRendering(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ItemsView | [private]
OnCreateAutomationPeer() | ItemsView |
OnCurrentElementSelectionModelSelectionChanged(const winrt::SelectionModel &selectionModel, const winrt::SelectionModelSelectionChangedEventArgs &args) | ItemsView | [private]
OnCurrentItemIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnIsItemInvokedEnabledChanged() | ItemsView | [private]
OnIsItemInvokedEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnItemsRepeaterElementClearing(const winrt::ItemsRepeater &itemsRepeater, const winrt::ItemsRepeaterElementClearingEventArgs &args) | ItemsView | [private]
OnItemsRepeaterElementIndexChanged(const winrt::ItemsRepeater &itemsRepeater, const winrt::ItemsRepeaterElementIndexChangedEventArgs &args) | ItemsView | [private]
OnItemsRepeaterElementPrepared(const winrt::ItemsRepeater &itemsRepeater, const winrt::ItemsRepeaterElementPreparedEventArgs &args) | ItemsView | [private]
OnItemsRepeaterItemsSourceChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | ItemsView | [private]
OnItemsRepeaterLayoutUpdated(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ItemsView | [private]
OnItemsRepeaterSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | ItemsView | [private]
OnItemsSourceChanged() | ItemsView | [private]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnItemsViewElementGettingFocus(const winrt::UIElement &element, const winrt::GettingFocusEventArgs &args) | ItemsView | [private]
OnItemsViewElementKeyDown(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | ItemsView | [private]
OnItemsViewItemContainerIsSelectedChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | ItemsView | [private]
OnItemsViewItemContainerItemInvoked(const winrt::ItemContainer &itemContainer, const winrt::ItemContainerInvokedEventArgs &args) | ItemsView | [private]
OnItemTemplateChanged() | ItemsView | [private]
OnItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnItemTransitionProviderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnKeyDown(winrt::KeyRoutedEventArgs const &args) | ItemsView |
OnLayoutPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | ItemsView | [private]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ItemsView |
OnScrollViewAnchorRequested(const winrt::ScrollView &scrollView, const winrt::ScrollingAnchorRequestedEventArgs &args) | ItemsView | [private]
OnScrollViewBringingIntoView(const winrt::ScrollView &scrollView, const winrt::ScrollingBringingIntoViewEventArgs &args) | ItemsView | [private]
OnScrollViewPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnScrollViewScrollCompleted(const winrt::ScrollView &scrollView, const winrt::ScrollingScrollCompletedEventArgs &args) | ItemsView | [private]
OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnSelectionModeChanged() | ItemsView | [private]
OnSelectionModelSelectionChanged(const winrt::SelectionModel &selectionModel, const winrt::SelectionModelSelectionChangedEventArgs &args) | ItemsView | [private]
OnSelectionModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnSourceListChanged(const winrt::IInspectable &dataSource, const winrt::NotifyCollectionChangedEventArgs &args) | ItemsView | [private]
OnUnloaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | ItemsView | [private]
OnVerticalScrollControllerChanged() | ItemsView | [private]
OnVerticalScrollControllerPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
ProcessInteraction(const winrt::UIElement &element, const winrt::FocusState &focusState) | ItemsView | [private]
ProcessNavigationKeys() | ItemsView | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
QueueNavigationKey(const winrt::VirtualKey &key) | ItemsView | [private]
RaiseItemInvoked(const winrt::UIElement &element) | ItemsView | [private]
RaiseSelectionChanged() | ItemsView | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemsView, winrt::implementation::ItemsViewT > | [inline]
RestoreOriginalVerticalScrollControllerAndVisibility() | ItemsView | [private]
RevokeItemsViewItemContainerRevokers(const winrt::ItemContainer &itemContainer) | ItemsView | [private]
s_CurrentItemIndexProperty | ItemsViewProperties | [static]
s_IsItemInvokedEnabledProperty | ItemsViewProperties | [static]
s_ItemsSourceProperty | ItemsViewProperties | [static]
s_ItemTemplateProperty | ItemsViewProperties | [static]
s_ItemTransitionProviderProperty | ItemsViewProperties | [static]
s_LayoutProperty | ItemsViewProperties | [static]
s_ScrollViewProperty | ItemsViewProperties | [static]
s_SelectedItemProperty | ItemsViewProperties | [static]
s_SelectionModeProperty | ItemsViewProperties | [static]
s_VerticalScrollControllerProperty | ItemsViewProperties | [static]
ScrollView() const | ItemsView |
ItemsViewProperties::ScrollView(winrt::ScrollView const &value) | ItemsViewProperties |
ItemsViewProperties::ScrollView() | ItemsViewProperties |
ScrollViewProperty() | ItemsViewProperties | [inline, static]
Select(int itemIndex) | ItemsView |
SelectAll() | ItemsView |
SelectedItem(winrt::IInspectable const &value) | ItemsViewProperties |
SelectedItem() | ItemsViewProperties |
SelectedItemProperty() | ItemsViewProperties | [inline, static]
SelectedItems() | ItemsView |
SelectionChanged(winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs > const &value) | ItemsViewProperties |
SelectionChanged(winrt::event_token const &token) | ItemsViewProperties |
SelectionMode(winrt::ItemsViewSelectionMode const &value) | ItemsViewProperties |
SelectionMode() | ItemsViewProperties |
SelectionModeProperty() | ItemsViewProperties | [inline, static]
SetCurrentElementIndex(int index, winrt::FocusState focusState, bool forceKeyboardNavigationReferenceReset, bool startBringIntoView=false, bool expectBringIntoView=false) | ItemsView | [private]
SetFocusElementIndex(int index, winrt::FocusState focusState, bool startBringIntoView=false, bool expectBringIntoView=false) | ItemsView | [private]
SetItemsViewItemContainerRevokers(const winrt::ItemContainer &itemContainer) | ItemsView | [private]
SetVerticalScrollControllerOnLoaded() | ItemsView | [private]
StartBringItemIntoView(int32_t index, const winrt::BringIntoViewOptions &options) | ItemsView |
StartBringItemIntoViewInternal(bool throwOutOfBounds, bool throwOnAnyFailure, int32_t index, const winrt::BringIntoViewOptions &options) | ItemsView | [private]
TryGetElement(int index) const | ItemsView | [private]
TryGetItemIndex(double horizontalViewportRatio, double verticalViewportRatio, int &index) | ItemsView |
UnhookCompositionTargetRendering() | ItemsView | [private]
UnhookItemsRepeaterEvents(bool isForDestructor) | ItemsView | [private]
UnhookScrollViewEvents(bool isForDestructor) | ItemsView | [private]
UpdateItemsRepeater(const winrt::ItemsRepeater &itemsRepeater) | ItemsView | [private]
UpdateKeyboardNavigationReference() | ItemsView | [private]
UpdateScrollView(const winrt::ScrollView &scrollView) | ItemsView | [private]
UpdateSelector() | ItemsView | [private]
ValidateItemIndex(bool throwIfInvalid, int index) const | ItemsView | [private]
VerticalScrollController(winrt::IScrollController const &value) | ItemsViewProperties |
VerticalScrollController() | ItemsViewProperties |
VerticalScrollControllerProperty() | ItemsViewProperties | [inline, static]
~ItemsView() | ItemsView |
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedIconHost Member List

This is the complete list of members for AnimatedIconHost, including all inherited members.
AnimatedIconHost() | AnimatedIconHost | [inline]
AnimatedIconTestHooks_LastAnimationSegmentChanged(AnimatedIcon sender, object args) | AnimatedIconHost | [inline, private]
FallbackGlyph | AnimatedIconHost |
FallbackGlyphProperty | AnimatedIconHost | [static]
GetAnimatedIcon() | AnimatedIconHost | [inline]
IconSource | AnimatedIconHost |
IconSourceChanged() | AnimatedIconHost | [inline, private]
IconSourceProperty | AnimatedIconHost | [static]
m_iconPresenter | AnimatedIconHost | [private]
m_transitionTextBlock | AnimatedIconHost | [private]
OnApplyTemplate() | AnimatedIconHost | [inline, protected]
OnIconSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | AnimatedIconHost | [inline, private, static]
Title | AnimatedIconHost |
TitleProperty | AnimatedIconHost | [static]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshableCollection-g< T > Member List

This is the complete list of members for RefreshableCollection-g< T >, including all inherited members.
Refresh(IEnumerable< T > newItems) RefreshableCollection-g< T > [inline]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/ImageIcon.cpp Source File

  • File List
  • File Members
  • ImageIcon

ImageIcon.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ImageIcon.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009
00010 ImageIcon::ImageIcon()
00011 {
00012     __RP_Marker_ClassById(RuntimeProfiler::ProfId_ImageIcon);
00013 }
00014
00015 void ImageIcon::OnApplyTemplate()
00016 {
00017     winrt::IInspectable diagnostics{};
00018     if (auto const grid = winrt::VisualTreeHelper::GetChild(*this, 0).as<winrt::Grid>())
00019     {
00020         auto const image = winrt::VisualTreeHelper::GetChild(grid, 0).as<winrt::Image>();
00021         image.Source(Source());
00022         m_rootImage.set(image);
00023     }
00024     else
00025     {
00026         m_rootImage.set(nullptr);
00027     }
00028 }
00029
00030 void  ImageIcon::OnSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00031 {
00032     if (auto const image = m_rootImage.get())
00033     {
00034         image.Source(Source());
00035     }
00036 }
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarMenuButton Member List

This is the complete list of members for InkToolBarMenuButton, including all inherited members.
abi_enter() | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
ClearProperties() | InkToolBarMenuButtonProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< InkToolBarMenuButton > &&self) noexcept | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline, static]
EnsureProperties() | InkToolBarMenuButtonProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
final_release(std::unique_ptr< InkToolBarMenuButton > &&self) | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
GetInner() | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
InkToolBarMenuButtonProperties() | InkToolBarMenuButtonProperties |
IsExtensionGlyphShown() | InkToolBarMenuButton | [inline]
IsExtensionGlyphShown(bool value) | InkToolBarMenuButton | [inline]
IsExtensionGlyphShownProperty() | InkToolBarMenuButtonProperties | [inline, static]
IsOnThread() | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
MenuKind() | InkToolBarMenuButton | [inline]
InkToolBarMenuButtonProperties::MenuKind(winrt::InkToolBarMenuKind const &value) | InkToolBarMenuButtonProperties |
MenuKindProperty() | InkToolBarMenuButtonProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkToolBarMenuButton, winrt::implementation::InkToolBarMenuButtonT, winrt::composable > | [inline]
s_IsExtensionGlyphShownProperty | InkToolBarMenuButtonProperties | [static]
s_MenuKindProperty | InkToolBarMenuButtonProperties | [static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/HashMap.h Source File

  • File List
  • File Members
  • Collections

HashMap.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 template <typename K, typename V>
00007 class HashMap :
00008     public ReferenceTracker<
00009         HashMap<K, V>,
00010         typename reference_tracker_implements_t<winrt::IMap<K, V>>::type,
00011         winrt::IMapView<K, V>,
00012         winrt::IIterable<winrt::IKeyValuePair<K, V>>>
00013 {
00014     using K_storage = tracker_ref<K>;
00015     using V_storage = tracker_ref<V>;
00016     typedef typename winrt::IKeyValuePair<K, V> KVP;
00017
00018     typedef typename std::map<K_storage, V_storage>::const_iterator T_iterator;
00019
00020 public:
00021 #pragma region IMap(View)<K, V> interface
00022     V Lookup(K const& key)
00023     {
00024         auto it = FindKey(key);
00025         if (it != m_map.end())
00026         {
00027             return it->second.get();
00028         }
00029         else
00030         {
00031             return nullptr;
00032         }
00033     }
00034
00035     int32_t Size()
00036     {
00037         return static_cast<unsigned int>(m_map.size());
00038     }
00039
00040     bool HasKey(K const& key)
00041     {
00042         return (FindKey(key) != m_map.end());
00043     }
00044
00045     winrt::IMapView<K, V> GetView()
00046     {
00047         return *this;
00048     }
00049
00050     bool Insert(K const& key, V const& value)
00051     {
00052         ++m_mutationCount;
00053         auto it = FindKey(key);
00054         const bool found = (it != m_map.end());
00055         if (found)
00056         {
00057             it->second = tracker_ref<V>{ this, value };
00058         }
00059         else
00060         {
00061             m_map.insert(std::make_pair(tracker_ref<K>{ this, key }, tracker_ref<V>{ this, value }));
00062         }
00063
00064         return found;
00065     }
00066
00067     void Remove(K const& key)
00068     {
00069         ++m_mutationCount;
00070         auto it = FindKey(key);
00071         if (it != m_map.end())
00072         {
00073             m_map.erase(it);
00074         }
00075     }
00076
00077     void Clear()
00078     {
00079         ++m_mutationCount;
00080         m_map.clear();
00081     }
00082
00083     void Split(winrt::IMapView<K, V> &firstPartition, winrt::IMapView<K, V> &secondPartition)
00084     {
00085         // This view doesn't allow spliting.
00086         firstPartition = nullptr;
00087         secondPartition = nullptr;
00088     }
00089 #pragma endregion
00090
00091 #pragma region abi::IIterable<K, V>
00092     winrt::IIterator<KVP> First()
00093     {
00094         return winrt::make<HashMap<K, V>::Iterator>(this);
00095     }
00096 #pragma endregion
00097
00098     unsigned int GetMutationCount() const
00099     {
00100         return m_mutationCount;
00101     }
00102
00103     T_iterator Begin() const
00104     {
00105         return m_map.cbegin();
00106     }
00107
00108     T_iterator End() const
00109     {
00110         return m_map.cend();
00111     }
00112
00113 private:
00114     auto FindKey(K const& key)
00115     {
00116         return std::find_if(m_map.begin(), m_map.end(), [&key](const auto& entry) { return entry.first == key; });
00117     }
00118
00119     class Iterator :
00120         public ReferenceTracker<
00121             Iterator,
00122             reference_tracker_implements_t<winrt::IIterator<KVP>>::type>
00123     {
00124     public:
00125         Iterator(HashMap<K, V>* map)
00126         {
00127             m_map.set(map->get_strong());
00128             m_expectedMutationCount = map->GetMutationCount();
00129             m_iterator = map->Begin();
00130         }
00131
00132         KVP Current()
00133         {
00134             CheckMutationCount();
00135
00136             if (m_iterator != m_map.get()->End())
00137             {
00138                 return winrt::make<KeyValuePair>(m_iterator->first.get(), m_iterator->second.get());
00139             }
00140             else
00141             {
00142                 throw winrt::hresult_out_of_bounds();
00143             }
00144         }
00145
00146         bool HasCurrent()
00147         {
00148             CheckMutationCount();
00149             return (m_iterator != m_map.get()->End());
00150         }
00151
00152         bool MoveNext()
00153         {
00154             CheckMutationCount();
00155
00156             if (m_iterator != m_map.get()->End())
00157             {
00158                 ++m_iterator;
00159                 return (m_iterator != m_map.get()->End());
00160             }
00161             else
00162             {
00163                 throw winrt::hresult_out_of_bounds();
00164             }
00165         }
00166
00167         uint32_t GetMany(winrt::array_view<KVP> values)
00168         {
00169             uint32_t howMany = 0;
00170             if (HasCurrent())
00171             {
00172                 do
00173                 {
00174                     if (howMany >= values.size()) break;
00175
00176                     values[howMany] = Current();
00177                     howMany++;
00178                 } while (MoveNext());
00179             }
00180
00181             return howMany;
00182         }
00183     private:
00184         void CheckMutationCount() const
00185         {
00186             if (m_map.get()->GetMutationCount() != m_expectedMutationCount)
00187             {
00188                 throw winrt::hresult_out_of_bounds();
00189             }
00190         }
00191
00192         tracker_com_ref<HashMap<K, V>> m_map{ this };
00193         T_iterator m_iterator;
00194         unsigned int m_expectedMutationCount = 0;
00195
00196         class KeyValuePair :
00197             public ReferenceTracker<
00198                 KeyValuePair,
00199                 reference_tracker_implements_t<winrt::IKeyValuePair<K, V>>::type>
00200         {
00201         public:
00202
00203             KeyValuePair(K const& key, V const& value)
00204             {
00205                 m_key.set(key);
00206                 m_value.set(value);
00207             }
00208
00209             K Key()
00210             {
00211                 return m_key.get();
00212             }
00213
00214             V Value()
00215             {
00216                 return m_value.get();
00217             }
00218
00219         private:
00220             K_storage m_key{ this };
00221             V_storage m_value{ this };
00222         };
00223     };
00224
00225     std::map<K_storage, V_storage> m_map;
00226     unsigned int m_mutationCount = 0;
00227 };
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InvertEffect Member List

This is the complete list of members for InvertEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1Invert) | InvertEffect
DECLARE_SINGLE_SOURCE(Source) | InvertEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GroupedRepeaterItem Member List

This is the complete list of members for GroupedRepeaterItem, including all inherited members.
Deselect() | GroupedRepeaterItem | [inline]
GetGroupIndex() | GroupedRepeaterItem | [inline, private]
GroupedRepeaterItem() | GroupedRepeaterItem | [inline]
IsSelected | GroupedRepeaterItem |
IsSelectedProperty | GroupedRepeaterItem | [static]
OnCreateAutomationPeer() | GroupedRepeaterItem | [inline, protected]
OnKeyUp(KeyRoutedEventArgs e) | GroupedRepeaterItem | [inline, protected]
OnPointerPressed(PointerRoutedEventArgs e) | GroupedRepeaterItem | [inline, protected]
OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) | GroupedRepeaterItem | [inline, private, static]
OnselectionModelChanged(object sender, PropertyChangedEventArgs e) | GroupedRepeaterItem | [inline, private]
RepeatedIndex | GroupedRepeaterItem |
RepeatedIndexProperty | GroupedRepeaterItem | [static]
Select() | GroupedRepeaterItem | [inline]
SelectionModel | GroupedRepeaterItem |
SelectionModelProperty | GroupedRepeaterItem | [static]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealScenarioItem Member List

This is the complete list of members for RevealScenarioItem, including all inherited members.
Header | RevealScenarioItem
Icon | RevealScenarioItem
Page | RevealScenarioItem
SubHeader | RevealScenarioItem
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushFactory Member List

This is the complete list of members for AcrylicBrushFactory, including all inherited members.
AcrylicBrushFactory() AcrylicBrushFactory
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizerEventArgs.h Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

RefreshVisualizerEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RefreshVisualizer.h"
00007
00008 #include "RefreshStateChangedEventArgs.g.h"
00009 #include "RefreshRequestedEventArgs.g.h"
00010
00011 //////////////////////////////////////////////////////////
00012 /////////        RefreshStateChanged        /////////////
00013 //////////////////////////////////////////////////////////
00014
00015 class RefreshStateChangedEventArgs :
00016     public winrt::implementation::RefreshStateChangedEventArgsT<RefreshStateChangedEventArgs>
00017 {
00018 public:
00019     RefreshStateChangedEventArgs(winrt::RefreshVisualizerState oldValue, winrt::RefreshVisualizerState newValue);
00020
00021     //IRefreshStatusChangedEventArgs overrides
00022     winrt::RefreshVisualizerState OldState();
00023     winrt::RefreshVisualizerState NewState();
00024
00025 private:
00026     winrt::RefreshVisualizerState m_oldState { };
00027     winrt::RefreshVisualizerState m_newState { };
00028 };
00029
00030
00031 //////////////////////////////////////////////////////////
00032 /////////          RefreshRequested          /////////////
00033 //////////////////////////////////////////////////////////
00034
00035 class RefreshRequestedEventArgs :
00036     public ReferenceTracker<RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable>
00037 {
00038 public:
00039     RefreshRequestedEventArgs(const winrt::Deferral& handler);
00040
00041     winrt::Deferral GetDeferral();
00042
00043     void IncrementDeferralCount();
00044     void DecrementDeferralCount();
00045
00046 private:
00047     tracker_ref<winrt::Deferral> m_deferral{ this };
00048     int m_deferralCount{ 0 };
00049 };
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionTreeHelper.cpp Source File

  • File List
  • File Members
  • Repeater

SelectionTreeHelper.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "SelectionNode.h"
00008 #include "SelectionTreeHelper.h"
00009 #include "IndexPath.h"
00010
00011 // static
00012 void SelectionTreeHelper::TraverseIndexPath(
00013     std::shared_ptr<SelectionNode> root,
00014     const winrt::IndexPath& path,
00015     bool realizeChildren,
00016     std::function<void(std::shared_ptr<SelectionNode>, const winrt::IndexPath&, int /*depth*/, int /*childIndex*/)> nodeAction)
00017 {
00018     auto node = root;
00019     for (int depth = 0; depth < path.GetSize(); depth++)
00020     {
00021         const int childIndex = path.GetAt(depth);
00022         nodeAction(node, path, depth, childIndex);
00023
00024         if (depth < path.GetSize() - 1)
00025         {
00026             node = node->GetAt(childIndex, realizeChildren);
00027         }
00028     }
00029 }
00030
00031 // static
00032 void SelectionTreeHelper::Traverse(
00033     std::shared_ptr<SelectionNode> root,
00034     bool realizeChildren,
00035     std::function<void(const TreeWalkNodeInfo&)> nodeAction)
00036 {
00037     auto pendingNodes = std::vector<TreeWalkNodeInfo>();
00038     auto current = winrt::make<IndexPath>(nullptr);
00039     pendingNodes.push_back(TreeWalkNodeInfo(root, current));
00040
00041     while (pendingNodes.size() > 0)
00042     {
00043         const auto nextNode = pendingNodes.back();
00044         pendingNodes.pop_back();
00045         const int count = realizeChildren ? nextNode.Node->DataCount() : nextNode.Node->ChildrenNodeCount();
00046         for (int i = count - 1; i >= 0; i--)
00047         {
00048             std::shared_ptr<SelectionNode> child = nextNode.Node->GetAt(i, realizeChildren);
00049             auto childPath = winrt::get_self<IndexPath>(nextNode.Path)->CloneWithChildIndex(i);
00050             if (child != nullptr)
00051             {
00052                 pendingNodes.push_back(TreeWalkNodeInfo(child, childPath, nextNode.Node));
00053             }
00054         }
00055
00056         // Queue the children first and then perform the action. This way
00057         // the action can remove the children in the action if necessary
00058         nodeAction(nextNode);
00059     }
00060 }
00061
00062
00063 // static
00064 void SelectionTreeHelper::TraverseRangeRealizeChildren(
00065     std::shared_ptr<SelectionNode> root,
00066     const winrt::IndexPath& start,
00067     const winrt::IndexPath& end,
00068     std::function<void(const TreeWalkNodeInfo&)> nodeAction)
00069 {
00070     MUX_ASSERT(start.CompareTo(end) == -1);
00071
00072     auto pendingNodes = std::vector<TreeWalkNodeInfo>();
00073     winrt::IndexPath current = start;
00074
00075     // Build up the stack to account for the depth first walk up to the
00076     // start index path.
00077     TraverseIndexPath(
00078         root,
00079         start,
00080         true, /* realizeChildren */
00081         [&start, &end, &pendingNodes](std::shared_ptr<SelectionNode> node, const winrt::IndexPath& path, int depth, int childIndex)
00082     {
00083         const auto currentPath = StartPath(path, depth);
00084         const bool isStartPath = IsSubSet(start, currentPath);
00085         const bool isEndPath = IsSubSet(end, currentPath);
00086
00087         const int startIndex = depth < start.GetSize() && isStartPath ? std::max(0, start.GetAt(depth)) : 0;
00088         const int endIndex = depth < end.GetSize() && isEndPath ? std::min(node->DataCount() - 1, end.GetAt(depth)) : node->DataCount() - 1;
00089
00090         for (int i = endIndex; i >= startIndex; i--)
00091         {
00092             auto child = node->GetAt(i, true /* realizeChild */);
00093             if (child)
00094             {
00095                 auto childPath = winrt::get_self<IndexPath>(currentPath)->CloneWithChildIndex(i);
00096                 pendingNodes.push_back(TreeWalkNodeInfo(child, childPath, node));
00097             }
00098         }
00099     });
00100
00101     // From the start index path, do a depth first walk as long as the
00102     // current path is less than the end path.
00103     while (pendingNodes.size() > 0)
00104     {
00105         const auto info = pendingNodes.back();
00106         pendingNodes.pop_back();
00107         const int depth = info.Path.GetSize();
00108         const bool isStartPath = IsSubSet(start, info.Path);
00109         const bool isEndPath = IsSubSet(end, info.Path);
00110         const int startIndex = depth < start.GetSize() && isStartPath ? start.GetAt(depth) : 0;
00111         const int endIndex = depth < end.GetSize() && isEndPath ? end.GetAt(depth) : info.Node->DataCount() - 1;
00112         for (int i = endIndex; i >= startIndex; i--)
00113         {
00114             const auto child = info.Node->GetAt(i, true /* realizeChild */);
00115             if (child)
00116             {
00117                 auto childPath = winrt::get_self<IndexPath>(info.Path)->CloneWithChildIndex(i);
00118                 pendingNodes.push_back(TreeWalkNodeInfo(child, childPath, info.Node));
00119             }
00120         }
00121
00122         nodeAction(info);
00123
00124         if (info.Path.CompareTo(end) == 0)
00125         {
00126             // We reached the end index path. stop iterating.
00127             break;
00128         }
00129     }
00130 }
00131
00132 // static
00133 bool SelectionTreeHelper::IsSubSet(const winrt::IndexPath& path, const winrt::IndexPath& subset)
00134 {
00135     const auto subsetSize = subset.GetSize();
00136     if (path.GetSize() < subsetSize)
00137     {
00138         return false;
00139     }
00140
00141     for (int i = 0; i < subsetSize; i++)
00142     {
00143         if (path.GetAt(i) != subset.GetAt(i))
00144         {
00145             return false;
00146         }
00147     }
00148
00149     return true;
00150 }
00151
00152 // static
00153 winrt::IndexPath SelectionTreeHelper::StartPath(const winrt::IndexPath& path, int length)
00154 {
00155     std::vector<int> subPath;
00156     for (int i = 0; i < length; i++)
00157     {
00158         subPath.emplace_back(path.GetAt(i));
00159     }
00160
00161     return winrt::make<IndexPath>(subPath);
00162 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButton.h Source File

  • File List
  • File Members
  • SplitButton

SplitButton.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "SplitButton.g.h"
00010 #include "SplitButton.properties.h"
00011
00012 class SplitButton :
00013     public ReferenceTracker<SplitButton, winrt::implementation::SplitButtonT>,
00014     public SplitButtonProperties
00015 {
00016
00017 public:
00018     SplitButton();
00019
00020     // IFrameworkElement
00021     void OnApplyTemplate();
00022
00023     // IUIElement
00024     virtual winrt::AutomationPeer OnCreateAutomationPeer();
00025
00026     // Internal
00027     bool IsFlyoutOpen() { return m_isFlyoutOpen; };
00028     void OpenFlyout();
00029     void CloseFlyout();
00030     virtual bool InternalIsChecked() { return false; }
00031
00032     void UpdateVisualStates(bool useTransitions = true);
00033
00034     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00035
00036     void Invoke();
00037
00038 protected:
00039     virtual void OnClickPrimary(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00040
00041     bool m_hasLoaded{ false };
00042
00043 private:
00044     void ExecuteCommand();
00045     void RegisterFlyoutEvents();
00046     void UnregisterEvents();
00047
00048     void OnVisualPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00049
00050     // Internal event handlers
00051     void OnClickSecondary(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00052
00053     void OnFlyoutChanged();
00054     void OnFlyoutOpened(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00055     void OnFlyoutClosed(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00056     void OnFlyoutPlacementChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00057
00058     void OnPointerEvent(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00059     void OnSplitButtonKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args);
00060     void OnSplitButtonKeyUp(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args);
00061
00062     tracker_ref<winrt::Button> m_primaryButton{ this };
00063     tracker_ref<winrt::Button> m_secondaryButton{ this };
00064
00065     bool m_isFlyoutOpen{ false };
00066     winrt::PointerDeviceType m_lastPointerDeviceType{ winrt::PointerDeviceType::Mouse };
00067     bool m_isKeyDown{ false };
00068
00069     winrt::UIElement::KeyDown_revoker m_keyDownRevoker{};
00070     winrt::UIElement::KeyUp_revoker m_keyUpRevoker{};
00071
00072     winrt::ButtonBase::Click_revoker m_clickPrimaryRevoker{};
00073     PropertyChanged_revoker m_pressedPrimaryRevoker{};
00074     PropertyChanged_revoker m_pointerOverPrimaryRevoker{};
00075
00076     winrt::UIElement::PointerEntered_revoker m_pointerEnteredPrimaryRevoker{};
00077     winrt::UIElement::PointerExited_revoker m_pointerExitedPrimaryRevoker{};
00078     winrt::UIElement::PointerPressed_revoker m_pointerPressedPrimaryRevoker{};
00079     winrt::UIElement::PointerReleased_revoker m_pointerReleasedPrimaryRevoker{};
00080     winrt::UIElement::PointerCanceled_revoker m_pointerCanceledPrimaryRevoker{};
00081     winrt::UIElement::PointerCaptureLost_revoker m_pointerCaptureLostPrimaryRevoker{};
00082
00083     winrt::ButtonBase::Click_revoker m_clickSecondaryRevoker{};
00084     PropertyChanged_revoker m_pressedSecondaryRevoker{};
00085     PropertyChanged_revoker m_pointerOverSecondaryRevoker{};
00086
00087     winrt::UIElement::PointerEntered_revoker m_pointerEnteredSecondaryRevoker{};
00088     winrt::UIElement::PointerExited_revoker m_pointerExitedSecondaryRevoker{};
00089     winrt::UIElement::PointerPressed_revoker m_pointerPressedSecondaryRevoker{};
00090     winrt::UIElement::PointerReleased_revoker m_pointerReleasedSecondaryRevoker{};
00091     winrt::UIElement::PointerCanceled_revoker m_pointerCanceledSecondaryRevoker{};
00092     winrt::UIElement::PointerCaptureLost_revoker m_pointerCaptureLostSecondaryRevoker{};
00093
00094     winrt::FlyoutBase::Opened_revoker m_flyoutOpenedRevoker{};
00095     winrt::FlyoutBase::Closed_revoker m_flyoutClosedRevoker{};
00096     PropertyChanged_revoker m_flyoutPlacementChangedRevoker{};
00097 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/CommandingHelpers.cpp Source File

  • File List
  • File Members
  • dll

CommandingHelpers.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006
00007 #include "CommandingHelpers.h"
00008
00009 winrt::IInspectable CommandingHelpers::IconSourceToIconSourceElementConverter::Convert(
00010     winrt::IInspectable const& value,
00011     winrt::TypeName const& targetType,
00012     winrt::IInspectable const& parameter,
00013     winrt::hstring const& language)
00014 {
00015     if (value)
00016     {
00017         winrt::IconSource iconSource{ value.as<winrt::IconSource>() };
00018         winrt::IconSourceElement iconSourceElement;
00019         iconSourceElement.IconSource(iconSource);
00020         return iconSourceElement;
00021     }
00022
00023     return nullptr;
00024 }
00025
00026 winrt::IInspectable CommandingHelpers::IconSourceToIconSourceElementConverter::ConvertBack(
00027     winrt::IInspectable const& value,
00028     winrt::TypeName const& targetType,
00029     winrt::IInspectable const& parameter,
00030     winrt::hstring const& language) noexcept
00031 {
00032     winrt::throw_hresult(E_NOTIMPL);
00033 }
00034
00035 void CommandingHelpers::BindToIconSourcePropertyIfUnset(
00036     winrt::XamlUICommand const& uiCommand,
00037     winrt::DependencyObject const& target,
00038     winrt::DependencyProperty const& iconSourceProperty)
00039 {
00040     winrt::IconSource localIconSource = target.ReadLocalValue(iconSourceProperty).try_as<winrt::IconSource>();
00041
00042     if (!localIconSource)
00043     {
00044         SharedHelpers::SetBinding(uiCommand, L"IconSource", target, iconSourceProperty);
00045     }
00046 }
00047
00048 void CommandingHelpers::BindToIconPropertyIfUnset(
00049     winrt::XamlUICommand const& uiCommand,
00050     winrt::DependencyObject const& target,
00051     winrt::DependencyProperty const& iconProperty)
00052 {
00053     if (!target.ReadLocalValue(iconProperty).try_as<winrt::IconElement>())
00054     {
00055         SharedHelpers::SetBinding(uiCommand, L"Icon", target, iconProperty, winrt::make<IconSourceToIconSourceElementConverter>());
00056     }
00057 }
00058
00059 void CommandingHelpers::BindToLabelPropertyIfUnset(
00060     winrt::XamlUICommand const& uiCommand,
00061     winrt::DependencyObject const& target,
00062     winrt::DependencyProperty const& labelProperty)
00063 {
00064     auto labelReference = target.ReadLocalValue(labelProperty).try_as<winrt::IReference<winrt::hstring>>();
00065
00066     if (!labelReference || labelReference.Value().empty())
00067     {
00068         SharedHelpers::SetBinding(uiCommand, L"Label", target, labelProperty);
00069     }
00070 }
00071
00072
00073
00074 void CommandingHelpers::BindToKeyboardAcceleratorsIfUnset(
00075     winrt::XamlUICommand const& uiCommand,
00076     winrt::UIElement const& target)
00077 {
00078     if (target.KeyboardAccelerators().Size() == 0)
00079     {
00080         // Keyboard accelerators can't have two parents, so we'll need to copy them
00081         // and bind to the original properties instead of assigning them.
00082         // We set up bindings so that modifications to the app-defined accelerators
00083         // will propagate to the accelerators that are used by the framework.
00084         for (winrt::KeyboardAccelerator keyboardAccelerator : uiCommand.KeyboardAccelerators())
00085         {
00086             winrt::KeyboardAccelerator keyboardAcceleratorCopy;
00087
00088             SharedHelpers::SetBinding(keyboardAccelerator, L"IsEnabled", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::IsEnabledProperty());
00089             SharedHelpers::SetBinding(keyboardAccelerator, L"Key", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::KeyProperty());
00090             SharedHelpers::SetBinding(keyboardAccelerator, L"Modifiers", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::ModifiersProperty());
00091             SharedHelpers::SetBinding(keyboardAccelerator, L"ScopeOwner", keyboardAcceleratorCopy, winrt::KeyboardAccelerator::ScopeOwnerProperty());
00092             target.KeyboardAccelerators().Append(keyboardAcceleratorCopy);
00093         }
00094     }
00095 }
00096
00097 void CommandingHelpers::BindToAccessKeyIfUnset(
00098     winrt::XamlUICommand const& uiCommand,
00099     winrt::UIElement const& target)
00100 {
00101     if (target.AccessKey().empty())
00102     {
00103         SharedHelpers::SetBinding(uiCommand, L"AccessKey", target, winrt::UIElement::AccessKeyProperty());
00104     }
00105 }
00106
00107 void CommandingHelpers::BindToDescriptionPropertiesIfUnset(
00108     winrt::XamlUICommand const& uiCommand,
00109     winrt::DependencyObject const& target)
00110 {
00111     if (winrt::AutomationProperties::GetHelpText(target).empty())
00112     {
00113         SharedHelpers::SetBinding(uiCommand, L"Description", target, winrt::AutomationProperties::HelpTextProperty());
00114     }
00115
00116     winrt::IInspectable localToolTipAsI = winrt::ToolTipService::GetToolTip(target);
00117     auto localToolTipAsString = localToolTipAsI.try_as<winrt::IReference<winrt::hstring>>();
00118
00119     if ((!localToolTipAsString || localToolTipAsString.Value().empty()) && !localToolTipAsI.try_as<winrt::ToolTip>())
00120     {
00121         SharedHelpers::SetBinding(uiCommand, L"Description", target, winrt::ToolTipService::ToolTipProperty());
00122     }
00123 }
00124
00125 void CommandingHelpers::ClearBindingIfSet(
00126     winrt::XamlUICommand const& uiCommand,
00127     winrt::FrameworkElement const& target,
00128     winrt::DependencyProperty const& targetProperty)
00129 {
00130     if (auto bindingExpression = target.GetBindingExpression(targetProperty))
00131     {
00132         if (auto parentBinding = bindingExpression.ParentBinding())
00133         {
00134             if (auto source = parentBinding.Source())
00135             {
00136                 if (source == uiCommand)
00137                 {
00138                     target.ClearValue(targetProperty);
00139                 }
00140             }
00141         }
00142     }
00143 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarTemplateSettings.h Source File

  • File List
  • File Members
  • InfoBar

InfoBarTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "InfoBarTemplateSettings.g.h"
00007 #include "InfoBarTemplateSettings.properties.h"
00008
00009 class InfoBarTemplateSettings :
00010     public winrt::implementation::InfoBarTemplateSettingsT<InfoBarTemplateSettings>,
00011     public InfoBarTemplateSettingsProperties
00012 {
00013 public:
00014     InfoBarTemplateSettings();
00015 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksFactory.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenterTestHooks.h"
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicRenderingPage Member List

This is the complete list of members for AcrylicRenderingPage, including all inherited members.
_luminosityBlendResults | AcrylicRenderingPage | [private]
AcrylicRenderingPage() | AcrylicRenderingPage | [inline]
AreClose(Color color1, Color color2) | AcrylicRenderingPage | [inline, private]
cbComplexBackground_Toggled(object sender, RoutedEventArgs e) | AcrylicRenderingPage | [inline, private]
cbToggleFallbackColor_Toggled(object sender, RoutedEventArgs e) | AcrylicRenderingPage | [inline, private]
GetPixelAtPoint(Point p, RenderTargetBitmap rtb, byte[] pixelArray) | AcrylicRenderingPage | [inline, private]
LogAcrylicRecipeVersion(ResultsLogger logger) | AcrylicRenderingPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | AcrylicRenderingPage | [inline, protected]
RunTestButton_Clicked(object sender, RoutedEventArgs e) | AcrylicRenderingPage | [inline, private]
RunTestWithComplexBackground() | AcrylicRenderingPage | [inline, private]
RunTestWithRedBlueBackground() | AcrylicRenderingPage | [inline, private]
SamplePointColors(Image showRtb) | AcrylicRenderingPage | [inline, private]
SetLuminosityButton_Clicked(object sender, RoutedEventArgs e) | AcrylicRenderingPage | [inline, private]
UnsetLuminosityButton_Clicked(object sender, RoutedEventArgs e) | AcrylicRenderingPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterAccessibilityPage Member List

This is the complete list of members for ScrollPresenterAccessibilityPage, including all inherited members.
BtnSetScrollPercent_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ScrollPresenterAccessibilityPage | [inline, private]
EnsureAutomationPeer() | ScrollPresenterAccessibilityPage | [inline, private]
ScrollPresenterAccessibilityPage() | ScrollPresenterAccessibilityPage | [inline]
scrollPresenterAutomationPeer | ScrollPresenterAccessibilityPage | [private]
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealHoverSpotlightStateDesc Member List

This is the complete list of members for RevealHoverSpotlightStateDesc, including all inherited members.
InnerConeColor | RevealHoverSpotlightStateDesc
InnerConeIntensity | RevealHoverSpotlightStateDesc
OuterAngleScale | RevealHoverSpotlightStateDesc
OuterConeColor | RevealHoverSpotlightStateDesc
OuterConeIntensity | RevealHoverSpotlightStateDesc
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/TestUI/RadioButtonsFocusPage.xaml.cs Source File

  • File List
  • File Members
  • RadioButtons
  • TestUI

RadioButtonsFocusPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005 using MUXControlsTestApp;
00006 using System;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Input;
00009 using Microsoft.UI.Xaml.Media;
00010
00011 namespace RadioButtons_TestUI
00012 {
00013     public sealed partial class RadioButtonsFocusPage : TestPage
00014     {
00015         public RadioButtonsFocusPage()
00016         {
00017             this.InitializeComponent();
00018
00019             Loaded += OnLoaded;
00020         }
00021
00022         private void OnLoaded(object sender, RoutedEventArgs e)
00023         {
00024             ChangeTestFrameVisibility(Visibility.Collapsed);
00025         }
00026
00027         private void ChangeTestFrameVisibility(Visibility visibility)
00028         {
00029             var testFrame = App.TestContentRoot as TestFrame;
00030             testFrame.ChangeBarVisibility(visibility);
00031         }
00032
00033         private void TestRadioButtons_SelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
00034         {
00035             var index = TestRadioButtons1.SelectedIndex;
00036             SelectedIndexTextBlock1.Text = index.ToString();
00037             if (TestRadioButtons1.SelectedItem != null)
00038             {
00039                 SelectedItemTextBlock1.Text = TestRadioButtons1.SelectedItem.ToString();
00040             }
00041             else
00042             {
00043                 SelectedItemTextBlock1.Text = "null";
00044             }
00045         }
00046
00047         private void TestRadioButtons2_SelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
00048         {
00049             var index = TestRadioButtons2.SelectedIndex;
00050             SelectedIndexTextBlock2.Text = index.ToString();
00051             if (TestRadioButtons2.SelectedItem != null)
00052             {
00053                 SelectedItemTextBlock2.Text = TestRadioButtons2.SelectedItem.ToString();
00054             }
00055             else
00056             {
00057                 SelectedItemTextBlock2.Text = "null";
00058             }
00059         }
00060
00061         private void TestRadioButtons_GotFocus(object sender, RoutedEventArgs e)
00062         {
00063             var stackPanel = VisualTreeHelper.GetChild(TestRadioButtons1, 0);
00064             var repeater = (ItemsRepeater)VisualTreeHelper.GetChild(stackPanel, 1);
00065             FocusedIndexTextBlock1.Text = repeater.GetElementIndex((UIElement)e.OriginalSource).ToString();
00066             TestRadioButtons1HasFocusCheckBox.IsChecked = true;
00067         }
00068
00069         private void TestRadioButtons_LostFocus(object sender, RoutedEventArgs e)
00070         {
00071             FocusedIndexTextBlock1.Text = "-1";
00072             TestRadioButtons1HasFocusCheckBox.IsChecked = false;
00073         }
00074
00075         private void TestRadioButtons2_GotFocus(object sender, RoutedEventArgs e)
00076         {
00077             var stackPanel = VisualTreeHelper.GetChild(TestRadioButtons2, 0);
00078             var repeater = (ItemsRepeater)VisualTreeHelper.GetChild(stackPanel, 1);
00079             FocusedIndexTextBlock2.Text = repeater.GetElementIndex((UIElement)e.OriginalSource).ToString();
00080             TestRadioButtons2HasFocusCheckBox.IsChecked = true;
00081         }
00082
00083         private void TestRadioButtons2_LostFocus(object sender, RoutedEventArgs e)
00084         {
00085             FocusedIndexTextBlock2.Text = "-1";
00086             TestRadioButtons2HasFocusCheckBox.IsChecked = false;
00087         }
00088
00089         private void SelectByIndexButton1_Click(object sender, RoutedEventArgs e)
00090         {
00091             var index = getIndexToSelect(false);
00092             if (index != -2)
00093             {
00094                 TestRadioButtons1.SelectedIndex = index;
00095             }
00096         }
00097
00098         private void SelectByIndexButton2_Click(object sender, RoutedEventArgs e)
00099         {
00100             var index = getIndexToSelect(true);
00101             if (index != -2)
00102             {
00103                 TestRadioButtons2.SelectedIndex = index;
00104             }
00105         }
00106
00107         private int getIndexToSelect(bool selectRadioButtons2)
00108         {
00109             int value;
00110             bool success;
00111             if (selectRadioButtons2)
00112             {
00113                 success = Int32.TryParse(IndexToSelectTextBox2.Text, out value);
00114             }
00115             else
00116             {
00117                 success = Int32.TryParse(IndexToSelectTextBox1.Text, out value);
00118             }
00119
00120             if (success)
00121             {
00122                 if (value >= 3)
00123                 {
00124                     return 1;
00125                 }
00126                 if (value < -1)
00127                 {
00128                     return -2;
00129                 }
00130                 return value;
00131             }
00132             return -2;
00133         }
00134     }
00135 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewAutomationPeer.h Source File

  • File List
  • File Members
  • TabView

TabViewAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TabView.h"
00007 #include "TabViewAutomationPeer.g.h"
00008
00009 class TabViewAutomationPeer :
00010     public ReferenceTracker<TabViewAutomationPeer,
00011     winrt::implementation::TabViewAutomationPeerT,
00012     winrt::ISelectionProvider>
00013 {
00014
00015 public:
00016     TabViewAutomationPeer(winrt::TabView const& owner);
00017
00018     // IAutomationPeerOverrides
00019     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00020     hstring GetClassNameCore();
00021     winrt::AutomationControlType GetAutomationControlTypeCore();
00022
00023     // ISelectionProvider
00024     bool CanSelectMultiple();
00025     bool IsSelectionRequired();
00026     winrt::com_array<winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple> GetSelection();
00027 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewPage.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

TabViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Microsoft.UI;
00011 using System.Windows.Input;
00012 using Microsoft.UI.Xaml.Automation;
00013 using Microsoft.UI.Xaml.Shapes;
00014 using System.Reflection;
00015
00016 using System.Collections.ObjectModel;
00017 using Windows.Devices.PointOfService;
00018 using Windows.ApplicationModel.DataTransfer;
00019 using MUXControlsTestApp.Utilities;
00020 using System.Threading.Tasks;
00021
00022 namespace MUXControlsTestApp
00023 {
00024     public class TabDataItem : DependencyObject
00025     {
00026         public String Header { get; set; }
00027         public SymbolIconSource IconSource { get; set; }
00028         public String Content { get; set; }
00029     }
00030
00031     [TopLevelTestPage(Name = "TabView")]
00032     public sealed partial class TabViewPage : TestPage
00033     {
00034         int _newTabNumber = 1;
00035         SymbolIconSource _iconSource;
00036
00037         public TabViewPage()
00038         {
00039             this.InitializeComponent();
00040
00041             _iconSource = new SymbolIconSource();
00042             _iconSource.Symbol = Symbol.Placeholder;
00043
00044             Tabs.TabItemsChanged += Tabs_TabItemsChanged;
00045
00046             ObservableCollection<TabDataItem> itemSource = new ObservableCollection<TabDataItem>();
00047             for (int i = 0; i < 5; i++)
00048             {
00049                 var item = new TabDataItem();
00050                 item.IconSource = _iconSource;
00051                 item.Header = "Item " + i;
00052                 item.Content = "This is tab " + i + ".";
00053                 itemSource.Add(item);
00054             }
00055             DataBindingTabView.TabItemsSource = itemSource;
00056
00057             backgroundColorCache = BackgroundGrid.Background;
00058             activeTabContentBackgroundBrushCache = FirstTabContent.Background;
00059             CacheFirstTabSelectedBackgroundPathFill();
00060         }
00061
00062         private Brush backgroundColorCache;
00063         private Brush activeTabSelectedBackgroundPathBrushCache;
00064         private Brush activeTabContentBackgroundBrushCache;
00065
00066         protected async override void OnNavigatedTo(Microsoft.UI.Xaml.Navigation.NavigationEventArgs args)
00067         {
00068             NotCloseableTab.Visibility = Visibility.Collapsed;
00069             await Task.Delay(TimeSpan.FromMilliseconds(1));
00070             NotCloseableTab.Visibility = Visibility.Visible;
00071         }
00072
00073         private void Tabs_TabItemsChanged(TabView sender, Windows.Foundation.Collections.IVectorChangedEventArgs args)
00074         {
00075             TabsItemChangedEventArgsTextBlock.Text = args.CollectionChange.ToString();
00076             TabsItemChangedEventArgsIndexTextBlock.Text = args.Index.ToString();
00077         }
00078
00079         public void IsClosableCheckBox_CheckChanged(object sender, RoutedEventArgs e)
00080         {
00081             if (FirstTab != null)
00082             {
00083                 FirstTab.IsClosable = (bool)IsClosableCheckBox.IsChecked;
00084             }
00085         }
00086
00087         public void IsDisabledTabVisibleCheckBox_CheckChanged(object sender, RoutedEventArgs e)
00088         {
00089             if (Tabs != null && DisabledTab != null)
00090             {
00091                 var isVisible = (bool)IsDisabledTabVisibleCheckBox.IsChecked;
00092                 if (isVisible && !Tabs.TabItems.Contains(DisabledTab))
00093                 {
00094                     // Let's insert the DisabledTab just after NotCloseableTab
00095                     var n = Tabs.TabItems.IndexOf(NotCloseableTab) + 1;
00096                     Tabs.TabItems.Insert(n, DisabledTab);
00097                 }
00098                 else
00099                 {
00100                     Tabs.TabItems.Remove(DisabledTab);
00101                 }
00102             }
00103         }
00104
00105         public void AddButtonClick(object sender, object e)
00106         {
00107             if (Tabs != null)
00108             {
00109                 TabViewItem item = new TabViewItem();
00110                 item.IconSource = _iconSource;
00111                 item.Header = "New Tab " + _newTabNumber;
00112                 item.Content = item.Header;
00113
00114                 Tabs.TabItems.Add(item);
00115
00116                 _newTabNumber++;
00117             }
00118         }
00119
00120         public void RemoveTabButton_Click(object sender, RoutedEventArgs e)
00121         {
00122             if (Tabs != null && Tabs.TabItems.Count > 0)
00123             {
00124                 Tabs.TabItems.RemoveAt(Tabs.TabItems.Count - 1);
00125             }
00126         }
00127
00128
00129         public void SelectItemButton_Click(object sender, RoutedEventArgs e)
00130         {
00131             if (Tabs != null)
00132             {
00133                 Tabs.SelectedItem = Tabs.TabItems[1];
00134             }
00135         }
00136
00137         public void SelectIndexButton_Click(object sender, RoutedEventArgs e)
00138         {
00139             if (Tabs != null)
00140             {
00141                 Tabs.SelectedIndex = 2;
00142             }
00143         }
00144
00145         public void ChangeShopTextButton_Click(object sender, RoutedEventArgs e)
00146         {
00147             SecondTab.Header = "Changed";
00148         }
00149
00150         public void CustomTooltipButton_Click(object sender, RoutedEventArgs e)
00151         {
00152             ToolTipService.SetToolTip(SecondTab, "Custom");
00153         }
00154
00155         public void GetTab0ToolTipButton_Click(object sender, RoutedEventArgs e)
00156         {
00157             GetToolTipStringForUIElement(FirstTab, Tab0ToolTipTextBlock);
00158         }
00159
00160         public void GetTab1ToolTipButton_Click(object sender, RoutedEventArgs e)
00161         {
00162             GetToolTipStringForUIElement(SecondTab, Tab1ToolTipTextBlock);
00163         }
00164
00165         public void GetToolTipStringForUIElement(UIElement item, TextBlock textBlock)
00166         {
00167             var tooltip = ToolTipService.GetToolTip(item);
00168             if (tooltip is ToolTip)
00169             {
00170                 textBlock.Text = (tooltip as ToolTip).Content.ToString();
00171             }
00172             else
00173             {
00174                 textBlock.Text = tooltip.ToString();
00175             }
00176         }
00177
00178         public void GetFirstTabLocationButton_Click(object sender, RoutedEventArgs e)
00179         {
00180             FrameworkElement element = FirstTab as FrameworkElement;
00181             while (element != null)
00182             {
00183                 if (element == Tabs)
00184                 {
00185                     FirstTabLocationTextBlock.Text = "FirstTabView";
00186                     return;
00187                 }
00188                 if (element == SecondTabView)
00189                 {
00190                     FirstTabLocationTextBlock.Text = "SecondTabView";
00191                     return;
00192                 }
00193
00194                 element = VisualTreeHelper.GetParent(element) as FrameworkElement;
00195             }
00196
00197             FirstTabLocationTextBlock.Text = "";
00198         }
00199
00200         private void TabWidthComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00201         {
00202             if (Tabs != null)
00203             {
00204                 switch (TabWidthComboBox.SelectedIndex)
00205                 {
00206                     case 0: Tabs.TabWidthMode = Microsoft.UI.Xaml.Controls.TabViewWidthMode.Equal; break;
00207                     case 1: Tabs.TabWidthMode = Microsoft.UI.Xaml.Controls.TabViewWidthMode.SizeToContent; break;
00208                     case 2: Tabs.TabWidthMode = Microsoft.UI.Xaml.Controls.TabViewWidthMode.Compact; break;
00209                 }
00210             }
00211         }
00212
00213         private void CloseButtonOverlayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00214         {
00215             if (Tabs != null)
00216             {
00217                 switch (CloseButtonOverlayModeCombobox.SelectedIndex)
00218                 {
00219                     case 0: Tabs.CloseButtonOverlayMode = Microsoft.UI.Xaml.Controls.TabViewCloseButtonOverlayMode.Auto; break;
00220                     case 1: Tabs.CloseButtonOverlayMode = Microsoft.UI.Xaml.Controls.TabViewCloseButtonOverlayMode.OnPointerOver; break;
00221                     case 2: Tabs.CloseButtonOverlayMode = Microsoft.UI.Xaml.Controls.TabViewCloseButtonOverlayMode.Always; break;
00222                 }
00223             }
00224         }
00225
00226         private void TabViewSelectionChanged(object sender, SelectionChangedEventArgs e)
00227         {
00228             SelectedIndexTextBlock.Text = Tabs.SelectedIndex.ToString();
00229         }
00230
00231         private void TabViewTabCloseRequested(object sender, Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs e)
00232         {
00233             if ((bool)HandleTabCloseRequestedCheckBox.IsChecked)
00234             {
00235                 Tabs.TabItems.Remove(e.Tab);
00236             }
00237         }
00238
00239         private void FirstTab_CloseRequested(object sender, Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs e)
00240         {
00241             if ((bool)HandleTabItemCloseRequestedCheckBox.IsChecked)
00242             {
00243                 Tabs.TabItems.Remove(e.Tab);
00244             }
00245         }
00246
00247         private void TabViewTabDroppedOutside(object sender, Microsoft.UI.Xaml.Controls.TabViewTabDroppedOutsideEventArgs e)
00248         {
00249             TabViewItem tab = e.Tab;
00250             if (tab != null)
00251             {
00252                 TabDroppedOutsideTextBlock.Text = tab.Header.ToString();
00253             }
00254         }
00255
00256         // Drag/drop stuff
00257
00258         private const string DataIdentifier = "MyTabItem";
00259         private const string DataTabView = "MyTabView";
00260
00261         private TabViewItem FindTabViewItemFromContent(TabView tabView, object content)
00262         {
00263             var numItems = tabView.TabItems.Count;
00264             for (int i = 0; i < numItems; i++)
00265             {
00266                 var tabItem = tabView.ContainerFromIndex(i) as TabViewItem;
00267                 if (tabItem.Content == content)
00268                 {
00269                     return tabItem;
00270                 }
00271             }
00272             return null;
00273         }
00274
00275         private void OnTabDragStarting(object sender, TabViewTabDragStartingEventArgs e)
00276         {
00277             // Set the drag data to the tab
00278             e.Data.Properties.Add(DataIdentifier, e.Tab);
00279             e.Data.Properties.Add(DataTabView, sender as TabView);
00280
00281             // And indicate that we can move it
00282             e.Data.RequestedOperation = DataPackageOperation.Move;
00283         }
00284
00285         private void OnTabStripDragOver(object sender, DragEventArgs e)
00286         {
00287             if (e.DataView.Properties.ContainsKey(DataIdentifier))
00288             {
00289                 e.AcceptedOperation = DataPackageOperation.Move;
00290             }
00291         }
00292
00293         private void OnTabStripDrop(object sender, DragEventArgs e)
00294         {
00295             // This event is called when we're dragging between different TabViews
00296             // It is responsible for handling the drop of the item into the second TabView
00297
00298             object obj;
00299             object objOriginTabView;
00300             if (e.DataView.Properties.TryGetValue(DataIdentifier, out obj) && e.DataView.Properties.TryGetValue(DataTabView, out objOriginTabView))
00301             {
00302                 // TODO - BUG: obj should never be null, but occassionally is. Why?
00303                 if (obj == null || objOriginTabView == null)
00304                 {
00305                     return;
00306                 }
00307
00308                 var originTabView = objOriginTabView as TabView;
00309                 var destinationTabView = sender as TabView;
00310                 var destinationItems = destinationTabView.TabItems;
00311                 var tabViewItem = obj as TabViewItem;
00312
00313                 if (destinationItems != null)
00314                 {
00315                     // First we need to get the position in the List to drop to
00316                     var index = -1;
00317
00318                     // Determine which items in the list our pointer is inbetween.
00319                     for (int i = 0; i < destinationTabView.TabItems.Count; i++)
00320                     {
00321                         var item = destinationTabView.ContainerFromIndex(i) as TabViewItem;
00322
00323                         if (e.GetPosition(item).X - item.ActualWidth < 0)
00324                         {
00325                             index = i;
00326                             break;
00327                         }
00328                     }
00329
00330                     // Remove item from the old TabView
00331                     originTabView.TabItems.Remove(tabViewItem);
00332
00333                     if (index < 0)
00334                     {
00335                         // We didn't find a transition point, so we're at the end of the list
00336                         destinationItems.Add(tabViewItem);
00337                     }
00338                     else if (index < destinationTabView.TabItems.Count)
00339                     {
00340                         // Otherwise, insert at the provided index.
00341                         destinationItems.Insert(index, tabViewItem);
00342                     }
00343
00344                     // Select the newly dragged tab
00345                     destinationTabView.SelectedItem = tabViewItem;
00346                 }
00347             }
00348         }
00349
00350         public void SetTabViewWidth_Click(object sender, RoutedEventArgs e)
00351         {
00352             // This is the smallest width that fits our content without any scrolling.
00353             Tabs.Width = 752;
00354         }
00355
00356         public void GetScrollButtonsVisible_Click(object sender, RoutedEventArgs e)
00357         {
00358             var scrollDecrease = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButtonContainer") as FrameworkElement;
00359             var scrollIncrease = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButtonContainer") as FrameworkElement;
00360             if(scrollDecrease.Visibility == Visibility.Visible && scrollIncrease.Visibility == Visibility.Visible)
00361             {
00362                 ScrollButtonsVisible.Text = "True";
00363             }
00364             else if(scrollIncrease.Visibility == Visibility.Collapsed && scrollDecrease.Visibility == Visibility.Collapsed)
00365             {
00366                 ScrollButtonsVisible.Text = "False";
00367             }
00368             else
00369             {
00370                 ScrollButtonsVisible.Text = "Unexpected";
00371             }
00372         }
00373
00374         public void TabViewScrollToTheLeftButton_Click(object sender, RoutedEventArgs e)
00375         {
00376             var scrollViewer = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
00377             scrollViewer.ChangeView(0, null, null, true);
00378         }
00379
00380         public void TabViewScrollToTheMiddleButton_Click(object sender, RoutedEventArgs e)
00381         {
00382             var scrollViewer = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
00383             scrollViewer.ChangeView(scrollViewer.ScrollableWidth / 2.0f, null, null, true);
00384         }
00385
00386         public void TabViewScrollToTheRightButton_Click(object sender, RoutedEventArgs e)
00387         {
00388             var scrollViewer = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
00389             scrollViewer.ChangeView(double.MaxValue, null, null, true);
00390         }
00391
00392         public void GetScrollDecreaseButtonEnabled_Click(object sender, RoutedEventArgs e)
00393         {
00394             var scrollDecreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButton") as RepeatButton;
00395             ScrollDecreaseButtonEnabled.Text = scrollDecreaseButton.IsEnabled ? "True" : "False";
00396         }
00397
00398         public void GetScrollIncreaseButtonEnabled_Click(object sender, RoutedEventArgs e)
00399         {
00400             var scrollIncreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButton") as RepeatButton;
00401             ScrollIncreaseButtonEnabled.Text = scrollIncreaseButton.IsEnabled ? "True" : "False";
00402         }
00403
00404         private void TabViewSizingPageButton_Click(object sender, RoutedEventArgs e)
00405         {
00406             this.Frame.Navigate(typeof(TabViewSizingPage));
00407         }
00408
00409         private void TabViewTabClosingBehaviorButton_Click(object sender, RoutedEventArgs e)
00410         {
00411             this.Frame.Navigate(typeof(TabViewTabClosingBehaviorPage));
00412         }
00413
00414         private void TabViewTabItemsSourcePageButton_Click(object sender, RoutedEventArgs e)
00415         {
00416             this.Frame.Navigate(typeof(TabViewTabItemsSourcePage));
00417         }
00418
00419         private void MultipleTabViewPageButton_Click(object sender, RoutedEventArgs e)
00420         {
00421             this.Frame.Navigate(typeof(MultipleTabViewPage));
00422         }
00423
00424         private void TabViewTearOutWindowWithDataItemsButton_Click(object sender, RoutedEventArgs e)
00425         {
00426             TabViewTearOutWindowWithDataItems newWindow = new() { ExtendsContentIntoTitleBar = true };
00427             newWindow.AppWindow.Resize(TabViewTearOutWindowWithDataItems.DefaultWindowSize);
00428             newWindow.Activate();
00429         }
00430
00431         private void TabViewTearOutWindowWithoutDataItemsButton_Click(object sender, RoutedEventArgs e)
00432         {
00433             TabViewTearOutWindowWithoutDataItems newWindow = new() { ExtendsContentIntoTitleBar = true };
00434             newWindow.AppWindow.Resize(TabViewTearOutWindowWithoutDataItems.DefaultWindowSize);
00435             newWindow.Activate();
00436         }
00437
00438         private void ShortLongTextButton_Click(object sender, RoutedEventArgs e)
00439         {
00440             FirstTab.Header = "s";
00441             LongHeaderTab.Header = "long long long long long long long long";
00442         }
00443
00444         private void HomeTabOverlapCheck_Click(object sender, RoutedEventArgs e)
00445         {
00446             var redBrush = new SolidColorBrush();
00447             redBrush.Color = Colors.Red;
00448             BackgroundGrid.Background = redBrush;
00449
00450             var tabBrush = new SolidColorBrush();
00451             tabBrush.Color = Colors.Blue;
00452             SetFirstTabSelectedBackgroundPathFill(tabBrush);
00453
00454             var contentBrush = new SolidColorBrush();
00455             contentBrush.Color = Colors.Green;
00456             FirstTabContent.Background = contentBrush;
00457         }
00458
00459         private void SetActiveTabTransparent_Click(object sender, RoutedEventArgs e)
00460         {
00461             var tabBrush = new SolidColorBrush();
00462             tabBrush.Color = Colors.Transparent;
00463             SetFirstTabSelectedBackgroundPathFill(tabBrush);
00464         }
00465
00466         private void SetActiveContentTransparent_Click(object sender, RoutedEventArgs e)
00467         {
00468             var contentBrush = new SolidColorBrush();
00469             contentBrush.Color = Colors.Transparent;
00470             FirstTabContent.Background = contentBrush;
00471         }
00472
00473         private void ClearOverlapCheck_Click(object sender, RoutedEventArgs e)
00474         {
00475             BackgroundGrid.Background = backgroundColorCache;
00476
00477             if(activeTabSelectedBackgroundPathBrushCache != null)
00478             {
00479                 FrameworkElement selectedBackgroundPath = FindFrameworkElementWithName("SelectedBackgroundPath", FirstTab);
00480                 if(selectedBackgroundPath != null)
00481                 {
00482                     (selectedBackgroundPath as Path).Fill = activeTabSelectedBackgroundPathBrushCache;
00483                 }
00484             }
00485
00486             if(activeTabContentBackgroundBrushCache != null)
00487             {
00488                 FirstTabContent.Background = activeTabContentBackgroundBrushCache;
00489             }
00490         }
00491
00492         private void CacheFirstTabSelectedBackgroundPathFill()
00493         {
00494             FrameworkElement selectedBackgroundPath = FindFrameworkElementWithName("SelectedBackgroundPath", FirstTab);
00495             if(selectedBackgroundPath != null)
00496             {
00497                 activeTabSelectedBackgroundPathBrushCache = (selectedBackgroundPath as Path).Fill;
00498             }
00499         }
00500
00501         private void SetFirstTabSelectedBackgroundPathFill(Brush newBrush)
00502         {
00503             FrameworkElement selectedBackgroundPath = FindFrameworkElementWithName("SelectedBackgroundPath", FirstTab);
00504             if(selectedBackgroundPath != null)
00505             {
00506                 (selectedBackgroundPath as Path).Fill = newBrush;
00507             }
00508         }
00509
00510         private FrameworkElement FindFrameworkElementWithName(string name, DependencyObject startNode)
00511         {
00512             int count = VisualTreeHelper.GetChildrenCount(startNode);
00513             for (int i = 0; i < count; i++)
00514             {
00515                 DependencyObject current = VisualTreeHelper.GetChild(startNode, i);
00516                 if ((current.GetType()).Equals(typeof(FrameworkElement)) || (current.GetType().GetTypeInfo().IsSubclassOf(typeof(FrameworkElement))))
00517                 {
00518                     FrameworkElement fe = (FrameworkElement)current;
00519                     if(fe.Name == name)
00520                     {
00521                         return fe;
00522                     }
00523                 }
00524                 var result = FindFrameworkElementWithName(name, current);
00525                 if(result != null)
00526                 {
00527                     return result;
00528                 }
00529             }
00530             return null;
00531         }
00532
00533         private void SetColorsButton_Click(object sender, RoutedEventArgs e)
00534         {
00535             var foregroundBrush = new SolidColorBrush();
00536             foregroundBrush.Color = Colors.Blue;
00537             SecondTab.Foreground = foregroundBrush;
00538             var backgroundBrush = new SolidColorBrush();
00539             backgroundBrush.Color = Colors.Purple;
00540             SecondTab.Background = backgroundBrush;
00541         }
00542
00543         private void ClearColorsButton_Click(object sender, RoutedEventArgs e)
00544         {
00545             SecondTab.ClearValue(ForegroundProperty);
00546             SecondTab.ClearValue(BackgroundProperty);
00547         }
00548
00549         private void GetScrollDecreaseButtonToolTipButton_Click(object sender, RoutedEventArgs e)
00550         {
00551             if (VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButton") is RepeatButton scrollDecreaseButton)
00552             {
00553                 GetToolTipStringForUIElement(scrollDecreaseButton, ScrollDecreaseButtonToolTipTextBlock);
00554             }
00555         }
00556
00557         private void GetScrollIncreaseButtonToolTipButton_Click(object sender, RoutedEventArgs e)
00558         {
00559             if (VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButton") is RepeatButton scrollIncreaseButton)
00560             {
00561                 GetToolTipStringForUIElement(scrollIncreaseButton, ScrollIncreaseButtonToolTipTextBlock);
00562             }
00563         }
00564
00565         private void OnSecondTabDragStarting(object sender, DragStartingEventArgs e)
00566         {
00567             TabDraggedResultsTextBlock.Text = "SecondTab dragged";
00568             e.DragUI.SetContentFromBitmapImage(new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:///Assets/ingredient2.png")));
00569         }
00570     }
00571 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SliderRefreshInfoProviderAdapter Member List

This is the complete list of members for SliderRefreshInfoProviderAdapter, including all inherited members.
adapt() | SliderRefreshInfoProviderAdapter | [inline]
mySlider | SliderRefreshInfoProviderAdapter | [private]
myTimer | SliderRefreshInfoProviderAdapter | [private]
SliderRefreshInfoProviderAdapter(Slider slider, DispatcherTimer timer) | SliderRefreshInfoProviderAdapter | [inline]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterable.h Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbIterable.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 #pragma once
00004
00005 #include "pch.h"
00006 #include "common.h"
00007
00008 #include "Vector.h"
00009
00010 class BreadcrumbIterable :
00011     public ReferenceTracker<BreadcrumbIterable, reference_tracker_implements_t<winrt::IIterable<winrt::IInspectable>>::type>
00012 {
00013 public:
00014     BreadcrumbIterable();
00015     BreadcrumbIterable(const winrt::IInspectable& itemsSource);
00016     void ItemsSource(const winrt::IInspectable& itemsSource);
00017     winrt::IIterator<winrt::IInspectable> First();
00018
00019 private:
00020     tracker_ref<winrt::IInspectable> m_itemsSource{ this };
00021 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItem.cpp Source File

  • File List
  • File Members
  • MenuBar

MenuBarItem.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MenuBar.h"
00007 #include "MenuBarItem.h"
00008 #include "MenuBarItemFlyout.h"
00009 #include "Vector.h"
00010 #include "VectorIterator.h"
00011 #include "MenuBarItemAutomationPeer.h"
00012
00013 MenuBarItem::MenuBarItem()
00014 {
00015     SetDefaultStyleKey(this);
00016
00017     auto items = winrt::make<Vector<winrt::MenuFlyoutItemBase>>();
00018     auto observableVector = items.try_as<winrt::IObservableVector<winrt::MenuFlyoutItemBase>>();
00019     observableVector.VectorChanged({ this, &MenuBarItem::OnItemsVectorChanged });
00020     SetValue(s_ItemsProperty, items);
00021 }
00022
00023 MenuBarItem::~MenuBarItem()
00024 {
00025     DetachEventHandlers(true);
00026 }
00027
00028 // IUIElement / IUIElementOverridesHelper
00029 winrt::AutomationPeer MenuBarItem::OnCreateAutomationPeer()
00030 {
00031     return winrt::make<MenuBarItemAutomationPeer>(*this);
00032 }
00033
00034 // IFramework Override
00035 void MenuBarItem::OnApplyTemplate()
00036 {
00037     m_button.set(GetTemplateChildT<winrt::Button>(L"ContentButton", *this));
00038
00039     auto menuBar = SharedHelpers::GetAncestorOfType<winrt::MenuBar>(winrt::VisualTreeHelper::GetParent(*this));
00040     if (menuBar)
00041     {
00042         m_menuBar = winrt::make_weak(menuBar);
00043         // Ask parent MenuBar for its root to enable pass through
00044         winrt::get_self<MenuBar>(menuBar)->RequestPassThroughElement(*this);
00045     }
00046
00047     PopulateContent();
00048     DetachEventHandlers();
00049     AttachEventHandlers();
00050 }
00051
00052 void MenuBarItem::PopulateContent()
00053 {
00054     // Create flyout
00055     winrt::MenuBarItemFlyout flyout;
00056
00057     for (winrt::MenuFlyoutItemBase const& flyoutItem : Items())
00058     {
00059         flyout.Items().Append(flyoutItem);
00060     }
00061
00062     flyout.Placement(winrt::FlyoutPlacementMode::Bottom);
00063
00064     if (m_passThroughElement)
00065     {
00066         if (winrt::IFlyoutBase flyoutBase = flyout)
00067         {
00068             flyout.OverlayInputPassThroughElement(m_passThroughElement.get());
00069         }
00070     }
00071     m_flyout.set(flyout);
00072
00073     if (auto button = m_button.get())
00074     {
00075         button.IsAccessKeyScope(true);
00076         button.ContextFlyout(flyout);
00077     }
00078 }
00079
00080 void MenuBarItem::AttachEventHandlers()
00081 {
00082     if (auto button = m_button.get())
00083     {
00084         m_pressedRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPressedProperty(), { this, &MenuBarItem::OnVisualPropertyChanged });
00085         m_pointerOverRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPointerOverProperty(), { this, &MenuBarItem::OnVisualPropertyChanged });
00086     }
00087
00088     m_onMenuBarItemPointerPressedRevoker = AddRoutedEventHandler<RoutedEventType::PointerPressed>(
00089         *this,
00090         [this](auto const& sender, auto const& args)
00091         {
00092             OnMenuBarItemPointerPressed(sender, args);
00093         },
00094         true /*handledEventsToo*/
00095     );
00096
00097     m_onMenuBarItemKeyDownRevoker = AddRoutedEventHandler<RoutedEventType::KeyDown>(
00098         *this,
00099         [this](auto const& sender, auto const& args)
00100         {
00101             OnMenuBarItemKeyDown(sender, args);
00102         },
00103         true /*handledEventsToo*/
00104     );
00105
00106     if (auto flyout = m_flyout.get())
00107     {
00108         m_flyoutClosedRevoker = flyout.Closed(winrt::auto_revoke, { this, &MenuBarItem::OnFlyoutClosed });
00109         m_flyoutOpeningRevoker = flyout.Opening(winrt::auto_revoke, { this, &MenuBarItem::OnFlyoutOpening });
00110     }
00111
00112     m_pointerEnteredRevoker = PointerEntered(winrt::auto_revoke, { this, &MenuBarItem::OnMenuBarItemPointerEntered });
00113
00114     m_accessKeyInvokedRevoker = AccessKeyInvoked(winrt::auto_revoke, { this, &MenuBarItem::OnMenuBarItemAccessKeyInvoked });
00115 }
00116
00117 void MenuBarItem::DetachEventHandlers(bool useSafeGet)
00118 {
00119     m_pressedRevoker.revoke();
00120     m_pointerOverRevoker.revoke();
00121
00122     m_flyoutClosedRevoker.revoke();
00123     m_flyoutOpeningRevoker.revoke();
00124
00125     m_onMenuBarItemPointerPressedRevoker.revoke();
00126     m_onMenuBarItemKeyDownRevoker.revoke();
00127 }
00128
00129 // Event Handlers
00130 void MenuBarItem::OnMenuBarItemPointerEntered(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args)
00131 {
00132     if (auto menuBar = m_menuBar.get())
00133     {
00134         const auto flyoutOpen = (winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen());
00135         if (flyoutOpen)
00136         {
00137             ShowMenuFlyout();
00138         }
00139     }
00140 }
00141
00142 void MenuBarItem::OnMenuBarItemPointerPressed(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args)
00143 {
00144     if (auto menuBar = m_menuBar.get())
00145     {
00146         const auto flyoutOpen = (winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen());
00147         if (!flyoutOpen)
00148         {
00149             ShowMenuFlyout();
00150         }
00151     }
00152 }
00153
00154 void MenuBarItem::OnMenuBarItemKeyDown( winrt::IInspectable const& sender, winrt::KeyRoutedEventArgs const& args)
00155 {
00156     const auto isAltDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00157
00158     if(!isAltDown)
00159     {
00160         const auto key = args.Key();
00161         if (key == winrt::VirtualKey::Down
00162             || key == winrt::VirtualKey::Enter
00163             || key == winrt::VirtualKey::Space)
00164         {
00165             ShowMenuFlyout();
00166         }
00167         else if (key == winrt::VirtualKey::Right)
00168         {
00169             if (FlowDirection() == winrt::FlowDirection::RightToLeft)
00170             {
00171                 MoveFocusTo(FlyoutLocation::Left);
00172             }
00173             else
00174             {
00175                 MoveFocusTo(FlyoutLocation::Right);
00176             }
00177             args.Handled(TRUE);
00178         }
00179         else if (key == winrt::VirtualKey::Left)
00180         {
00181             if (FlowDirection() == winrt::FlowDirection::RightToLeft)
00182             {
00183                 MoveFocusTo(FlyoutLocation::Right);
00184             }
00185             else
00186             {
00187                 MoveFocusTo(FlyoutLocation::Left);
00188             }
00189             args.Handled(TRUE);
00190         }
00191     }
00192 }
00193
00194 void MenuBarItem::OnPresenterKeyDown( winrt::IInspectable const& sender, winrt::KeyRoutedEventArgs const& args)
00195 {
00196     // If the event came from a MenuFlyoutSubItem it means right/left arrow will open it, so we should not handle them to not override default behaviour
00197     if (auto const& subitem = args.OriginalSource().try_as<winrt::MenuFlyoutSubItem>())
00198     {
00199         if (subitem.Items().GetAt(0))
00200         {
00201             return;
00202         }
00203     }
00204
00205     const auto key = args.Key();
00206     if (key == winrt::VirtualKey::Right)
00207     {
00208         if (FlowDirection() == winrt::FlowDirection::RightToLeft)
00209         {
00210             OpenFlyoutFrom(FlyoutLocation::Left);
00211         }
00212         else
00213         {
00214             OpenFlyoutFrom(FlyoutLocation::Right);
00215         }
00216     }
00217     else if (key == winrt::VirtualKey::Left)
00218     {
00219         if (FlowDirection() == winrt::FlowDirection::RightToLeft)
00220         {
00221             OpenFlyoutFrom(FlyoutLocation::Right);
00222         }
00223         else
00224         {
00225             OpenFlyoutFrom(FlyoutLocation::Left);
00226         }
00227     }
00228 }
00229
00230 void MenuBarItem::OnItemsVectorChanged(winrt::Collections::IObservableVector<winrt::MenuFlyoutItemBase> const& sender, winrt::Collections::IVectorChangedEventArgs const& e)
00231 {
00232     if (auto flyout = m_flyout.safe_get())
00233     {
00234         const auto index = e.Index();
00235         switch (e.CollectionChange())
00236         {
00237         case winrt::Collections::CollectionChange::ItemInserted:
00238             flyout.Items().InsertAt(index, Items().GetAt(index));
00239             break;
00240         case winrt::Collections::CollectionChange::ItemRemoved:
00241             flyout.Items().RemoveAt(index);
00242             break;
00243         default:
00244             break;
00245         }
00246     }
00247 }
00248
00249 void MenuBarItem::OnMenuBarItemAccessKeyInvoked(winrt::IInspectable const& sender, winrt::AccessKeyInvokedEventArgs const& args)
00250 {
00251     ShowMenuFlyout();
00252     args.Handled(true);
00253 }
00254
00255 // Menu Flyout actions
00256 void MenuBarItem::ShowMenuFlyout()
00257 {
00258     if (Items().Size() != 0)
00259     {
00260         if (auto button = m_button.get())
00261         {
00262             const auto width = static_cast<float>(button.ActualWidth());
00263             const auto height = static_cast<float>(button.ActualHeight());
00264
00265             // Sets an exclusion rect over the button that generates the flyout so that even if the menu opens upwards
00266             // (which is the default in touch mode) it doesn't cover the menu bar button.
00267             winrt::FlyoutShowOptions options{};
00268             options.Position(winrt::Point(0, height));
00269             options.Placement(winrt::FlyoutPlacementMode::Bottom);
00270             options.ExclusionRect(winrt::Rect(0, 0, width, height));
00271             m_flyout.get().ShowAt(button, options);
00272
00273             // Attach keyboard event handler
00274             auto presenter = winrt::get_self<MenuBarItemFlyout>(m_flyout.get())->m_presenter.get();
00275             m_presenterKeyDownRevoker = presenter.KeyDown(winrt::auto_revoke, { this,  &MenuBarItem::OnPresenterKeyDown });
00276         }
00277     }
00278 }
00279
00280 void MenuBarItem::CloseMenuFlyout()
00281 {
00282     m_flyout.get().Hide();
00283 }
00284
00285 void MenuBarItem::OpenFlyoutFrom(FlyoutLocation location)
00286 {
00287     if (auto menuBar = m_menuBar.get())
00288     {
00289         uint32_t index = 0;
00290         menuBar.Items().IndexOf(*this, index);
00291         CloseMenuFlyout();
00292         if (location == FlyoutLocation::Left)
00293         {
00294             if (const auto item = FocusAndReturnNextFocusableItem(index, -1).try_as<MenuBarItem>())
00295             {
00296                 item->ShowMenuFlyout();
00297             }
00298         }
00299         else
00300         {
00301             if (const auto item = FocusAndReturnNextFocusableItem(index, +1).try_as<MenuBarItem>())
00302             {
00303                 item->ShowMenuFlyout();
00304             }
00305         }
00306     }
00307 }
00308
00309
00310 winrt::MenuBarItem MenuBarItem::FocusAndReturnNextFocusableItem(int index, int direction)
00311 {
00312     if (const auto menuBar = m_menuBar.get())
00313     {
00314         const int itemsCount = menuBar.Items().Size();
00315         // index + direction might be negative so account for that by adding itemsCount.
00316         int itemIndex = (index + direction + itemsCount) % itemsCount;
00317         while (!menuBar.Items().GetAt(itemIndex).Focus(winrt::FocusState::Programmatic))
00318         {
00319             // index + direction might be negative so account for that by adding itemsCount.
00320             itemIndex = (itemIndex + direction + itemsCount) % itemsCount;
00321             if (itemIndex == index)
00322             {
00323                 // We are where we started, return no new item.
00324                 return nullptr;
00325             }
00326         }
00327         return menuBar.Items().GetAt(itemIndex);
00328     }
00329     return nullptr;
00330 }
00331
00332 void MenuBarItem::MoveFocusTo(FlyoutLocation location)
00333 {
00334     if (auto menuBar = m_menuBar.get())
00335     {
00336         uint32_t index = 0;
00337         menuBar.Items().IndexOf(*this, index);
00338         if (location == FlyoutLocation::Left)
00339         {
00340             winrt::get_self<MenuBarItem>(menuBar.Items().GetAt(((index - 1) + menuBar.Items().Size()) % menuBar.Items().Size()))->Focus(winrt::FocusState::Programmatic);
00341         }
00342         else
00343         {
00344             winrt::get_self<MenuBarItem>(menuBar.Items().GetAt((index + 1) % menuBar.Items().Size()))->Focus(winrt::FocusState::Programmatic);
00345         }
00346     }
00347 }
00348
00349 void MenuBarItem::AddPassThroughElement(const winrt::DependencyObject& element)
00350 {
00351     m_passThroughElement = winrt::make_weak(element);
00352 }
00353
00354 bool MenuBarItem::IsFlyoutOpen()
00355 {
00356     return m_isFlyoutOpen;
00357 }
00358
00359 void MenuBarItem::Invoke()
00360 {
00361     if (IsFlyoutOpen())
00362     {
00363         CloseMenuFlyout();
00364     }
00365     else
00366     {
00367         ShowMenuFlyout();
00368     }
00369 }
00370
00371 // Menu Flyout Events
00372 void MenuBarItem::OnFlyoutClosed( winrt::IInspectable const& sender, winrt::IInspectable const& args)
00373 {
00374     m_isFlyoutOpen = false;
00375
00376     if (auto menuBar = m_menuBar.get())
00377     {
00378         winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen(false);
00379     }
00380
00381     UpdateVisualStates();
00382 }
00383
00384 void MenuBarItem::OnFlyoutOpening( winrt::IInspectable const& sender, winrt::IInspectable const& args)
00385 {
00386     Focus(winrt::FocusState::Programmatic);
00387
00388     m_isFlyoutOpen = true;
00389
00390     if (auto menuBar = m_menuBar.get())
00391     {
00392         winrt::get_self<MenuBar>(menuBar)->IsFlyoutOpen(true);
00393     }
00394
00395     UpdateVisualStates();
00396 }
00397
00398 void MenuBarItem::OnVisualPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00399 {
00400     UpdateVisualStates();
00401 }
00402
00403 void MenuBarItem::UpdateVisualStates()
00404 {
00405     if (auto button = m_button.get())
00406     {
00407         if (button.IsPressed())
00408         {
00409             winrt::VisualStateManager::GoToState(*this, L"Pressed", false);
00410         }
00411         else if (button.IsPointerOver())
00412         {
00413             winrt::VisualStateManager::GoToState(*this, L"PointerOver", false);
00414         }
00415         else
00416         {
00417             if (m_isFlyoutOpen)
00418             {
00419                 winrt::VisualStateManager::GoToState(*this, L"Selected", false);
00420             }
00421             else
00422             {
00423                 winrt::VisualStateManager::GoToState(*this, L"Normal", false);
00424             }
00425         }
00426     }
00427 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/RadioMenuFlyoutItem.idl Source File

  • File List
  • File Members
  • RadioMenuFlyoutItem

RadioMenuFlyoutItem.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00007 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00008 unsealed runtimeclass RadioMenuFlyoutItem : Microsoft.UI.Xaml.Controls.MenuFlyoutItem
00009 {
00010     RadioMenuFlyoutItem();
00011
00012     Boolean IsChecked;
00013     String GroupName;
00014
00015     static Microsoft.UI.Xaml.DependencyProperty IsCheckedProperty{ get; };
00016     static Microsoft.UI.Xaml.DependencyProperty GroupNameProperty{ get; };
00017
00018     [MUX_PUBLIC_V2]
00019     {
00020         [MUX_DEFAULT_VALUE("false")]
00021         [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnAreCheckStatesEnabledPropertyChanged")]
00022         static Microsoft.UI.Xaml.DependencyProperty AreCheckStatesEnabledProperty{ get; };
00023         static void SetAreCheckStatesEnabled(Microsoft.UI.Xaml.Controls.MenuFlyoutSubItem object, Boolean value);
00024         static Boolean GetAreCheckStatesEnabled(Microsoft.UI.Xaml.Controls.MenuFlyoutSubItem object);
00025     }
00026 }
00027
00028 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TextCommandBarFlyoutTests Member List

This is the complete list of members for TextCommandBarFlyoutTests, including all inherited members.
CanBoldTextInARichEditBox() | TextCommandBarFlyoutTests | [inline]
CanCopyTextFromRichEditBox() | TextCommandBarFlyoutTests | [inline]
CanCopyTextFromRichTextBlock() | TextCommandBarFlyoutTests | [inline]
CanCopyTextFromTextBlock() | TextCommandBarFlyoutTests | [inline]
CanCopyTextFromTextBox() | TextCommandBarFlyoutTests | [inline]
CanCutCopyTextFrom(string textControlName, bool cutText) | TextCommandBarFlyoutTests | [inline, private]
CanCutTextFromRichEditBox() | TextCommandBarFlyoutTests | [inline]
CanCutTextFromTextBox() | TextCommandBarFlyoutTests | [inline]
CanItalicizeTextInARichEditBox() | TextCommandBarFlyoutTests | [inline]
CanPasteTextTo(string textControlName) | TextCommandBarFlyoutTests | [inline, private]
CanPasteTextToPasswordBox() | TextCommandBarFlyoutTests | [inline]
CanPasteTextToRichEditBox() | TextCommandBarFlyoutTests | [inline]
CanPasteTextToTextBox() | TextCommandBarFlyoutTests | [inline]
CanSelectAllIn(string textControlName) | TextCommandBarFlyoutTests | [inline, private]
CanSelectAllInPasswordBox() | TextCommandBarFlyoutTests | [inline]
CanSelectAllInRichEditBox() | TextCommandBarFlyoutTests | [inline]
CanSelectAllInRichTextBlock() | TextCommandBarFlyoutTests | [inline]
CanSelectAllInTextBlock() | TextCommandBarFlyoutTests | [inline]
CanSelectAllInTextBox() | TextCommandBarFlyoutTests | [inline]
CanStyleTextInARichEditBox(string styleName, string styleStart, string styleEnd) | TextCommandBarFlyoutTests | [inline, private]
CanUnderlineTextInARichEditBox() | TextCommandBarFlyoutTests | [inline]
CanUndoAndRedoIn(string textControlName) | TextCommandBarFlyoutTests | [inline, private]
CanUndoAndRedoInRichEditBox() | TextCommandBarFlyoutTests | [inline]
CanUndoAndRedoInTextBox() | TextCommandBarFlyoutTests | [inline]
ClassInitialize(TestContext testContext) | TextCommandBarFlyoutTests | [inline, static]
DismissFlyout() | TextCommandBarFlyoutTests | [inline, private, static]
FocusAndSelectText(Edit editControl, string textToSelect) | TextCommandBarFlyoutTests | [inline, private]
OpenFlyoutOn(string textControlName, bool asTransient) | TextCommandBarFlyoutTests | [inline, private]
TestCleanup() | TextCommandBarFlyoutTests | [inline]
ValidateKeyboarding() | TextCommandBarFlyoutTests | [inline]
ValidateProofingMenu() | TextCommandBarFlyoutTests | [inline]
ValidateRichTextBlockOverflowUsesSourceFlyouts() | TextCommandBarFlyoutTests | [inline]
ValidateRightClickOnEmptyTextBoxDoesNotShowFlyout() | TextCommandBarFlyoutTests | [inline]
ValidateSelectionFlyoutDoesNotTakeFocus() | TextCommandBarFlyoutTests | [inline]
ValidateUnhandledKeysOnNonTransientFlyoutDoNotCloseFlyout() | TextCommandBarFlyoutTests | [inline]
VerifyRichEditBoxHasContent(string expectedContent) | TextCommandBarFlyoutTests | [inline, private, static]
VerifyTextCommandBarRemainsOpenWithItems() | TextCommandBarFlyoutTests | [inline]
Generated on Sun Dec 1 2024 20:53:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DoubleToStringConverter Member List

This is the complete list of members for DoubleToStringConverter, including all inherited members.
Convert(object value, Type targetType, object parameter, string language) | DoubleToStringConverter | [inline]
ConvertBack(object value, Type targetType, object parameter, string language) | DoubleToStringConverter | [inline]
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBoxAxeTestPage Member List

This is the complete list of members for NumberBoxAxeTestPage, including all inherited members.
NumberBoxAxeTestPage() NumberBoxAxeTestPage [inline]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerAddScrollVelocityRequestedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerAddScrollVelocityRequestedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollControllerAddScrollVelocityRequestedEventArgs.g.h"
00007
00008 class ScrollControllerAddScrollVelocityRequestedEventArgs :
00009     public winrt::implementation::ScrollControllerAddScrollVelocityRequestedEventArgsT<ScrollControllerAddScrollVelocityRequestedEventArgs>
00010 {
00011 public:
00012     ~ScrollControllerAddScrollVelocityRequestedEventArgs()
00013     {
00014         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00015     }
00016
00017     ScrollControllerAddScrollVelocityRequestedEventArgs(
00018         float offsetVelocity,
00019         winrt::IReference<float> inertiaDecayRate);
00020
00021     float OffsetVelocity() const;
00022     winrt::IReference<float> InertiaDecayRate() const;
00023     int32_t CorrelationId() const;
00024     void CorrelationId(int32_t correlationId);
00025
00026 private:
00027     float m_offsetVelocity{ 0.0f };
00028     winrt::IReference<float> m_inertiaDecayRate{};
00029     int32_t m_correlationId{ -1 };
00030 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarAutomationPeer.h Source File

  • File List
  • File Members
  • InfoBar

InfoBarAutomationPeer.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 #include "InfoBar.h"
00003 #include "InfoBarAutomationPeer.g.h"
00004
00005 class InfoBarAutomationPeer :
00006     public ReferenceTracker<InfoBarAutomationPeer, winrt::implementation::InfoBarAutomationPeerT>
00007 {
00008
00009 public:
00010     InfoBarAutomationPeer(winrt::InfoBar const& owner);
00011
00012     // IAutomationPeerOverrides
00013     winrt::AutomationControlType GetAutomationControlTypeCore();
00014     winrt::hstring GetClassNameCore();
00015
00016     void RaiseClosedEvent(winrt::InfoBarSeverity severity, wstring_view const& displayString);
00017     void RaiseOpenedEvent(winrt::InfoBarSeverity severity, wstring_view const& displayString);
00018
00019 private:
00020     winrt::InfoBar GetInfoBar();
00021     winrt::Peers::AutomationNotificationProcessing GetProcessingForSeverity(winrt::InfoBarSeverity severity);
00022 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarEraserButtonProperties Member List

This is the complete list of members for InkToolBarEraserButtonProperties, including all inherited members.
ArePrecisionErasersVisible(bool value) | InkToolBarEraserButtonProperties |
ArePrecisionErasersVisible() | InkToolBarEraserButtonProperties |
ArePrecisionErasersVisibleProperty() | InkToolBarEraserButtonProperties | [inline, static]
ClearProperties() | InkToolBarEraserButtonProperties | [static]
EnsureProperties() | InkToolBarEraserButtonProperties | [static]
InkToolBarEraserButtonProperties() | InkToolBarEraserButtonProperties |
IsClearAllVisible(bool value) | InkToolBarEraserButtonProperties |
IsClearAllVisible() | InkToolBarEraserButtonProperties |
IsClearAllVisibleProperty() | InkToolBarEraserButtonProperties | [inline, static]
IsStrokeEraserVisible(bool value) | InkToolBarEraserButtonProperties |
IsStrokeEraserVisible() | InkToolBarEraserButtonProperties |
IsStrokeEraserVisibleProperty() | InkToolBarEraserButtonProperties | [inline, static]
s_ArePrecisionErasersVisibleProperty | InkToolBarEraserButtonProperties | [static]
s_IsClearAllVisibleProperty | InkToolBarEraserButtonProperties | [static]
s_IsStrokeEraserVisibleProperty | InkToolBarEraserButtonProperties | [static]
s_SelectedEraserProperty | InkToolBarEraserButtonProperties | [static]
SelectedEraser(winrt::InkToolBarEraserKind const &value) | InkToolBarEraserButtonProperties |
SelectedEraser() | InkToolBarEraserButtonProperties |
SelectedEraserProperty() | InkToolBarEraserButtonProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ButtonInteraction.properties.h Source File

  • File List
  • File Members
  • Generated

ButtonInteraction.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ButtonInteractionProperties
00008 {
00009 public:
00010     ButtonInteractionProperties();
00011
00012
00013
00014     winrt::event_token Invoked(winrt::TypedEventHandler<winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs> const& value);
00015     void Invoked(winrt::event_token const& token);
00016     winrt::event_token PropertyChanged(winrt::PropertyChangedEventHandler const& value);
00017     void PropertyChanged(winrt::event_token const& token);
00018
00019     event_source<winrt::TypedEventHandler<winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs>> m_invokedEventSource;
00020     event_source<winrt::PropertyChangedEventHandler> m_propertyChangedEventSource;
00021
00022     static void EnsureProperties();
00023     static void ClearProperties();
00024 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IFlowLayoutAlgorithmDelegates Member List

This is the complete list of members for IFlowLayoutAlgorithmDelegates, including all inherited members.
Algorithm_GetAnchorForRealizationRect(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetAnchorForTargetElement(int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetExtent(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetMeasureSize(int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetProvisionalArrangeSize(int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_OnElementMeasured(const winrt::UIElement &element, int index, const winrt::Size &availableSize, const winrt::Size &measureSize, const winrt::Size &desiredSize, const winrt::Size &provisionalArrangeSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_OnLineArranged(int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_ShouldBreakLine(int index, double remainingSpace)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
~IFlowLayoutAlgorithmDelegates() | IFlowLayoutAlgorithmDelegates | [virtual]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemPresenter.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationViewItemPresenter.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationViewItemPresenter.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(NavigationViewItemPresenter)
00012 }
00013
00014 #include "NavigationViewItemPresenter.g.cpp"
00015
00016 GlobalDependencyProperty NavigationViewItemPresenterProperties::s_IconProperty{ nullptr };
00017 GlobalDependencyProperty NavigationViewItemPresenterProperties::s_InfoBadgeProperty{ nullptr };
00018 GlobalDependencyProperty NavigationViewItemPresenterProperties::s_TemplateSettingsProperty{ nullptr };
00019
00020 NavigationViewItemPresenterProperties::NavigationViewItemPresenterProperties()
00021 {
00022     EnsureProperties();
00023 }
00024
00025 void NavigationViewItemPresenterProperties::EnsureProperties()
00026 {
00027     if (!s_IconProperty)
00028     {
00029         s_IconProperty =
00030             InitializeDependencyProperty(
00031                 L"Icon",
00032                 winrt::name_of<winrt::IconElement>(),
00033                 winrt::name_of<winrt::NavigationViewItemPresenter>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
00036                 nullptr);
00037     }
00038     if (!s_InfoBadgeProperty)
00039     {
00040         s_InfoBadgeProperty =
00041             InitializeDependencyProperty(
00042                 L"InfoBadge",
00043                 winrt::name_of<winrt::InfoBadge>(),
00044                 winrt::name_of<winrt::NavigationViewItemPresenter>(),
00045                 false /* isAttached */,
00046                 ValueHelper<winrt::InfoBadge>::BoxedDefaultValue(),
00047                 nullptr);
00048     }
00049     if (!s_TemplateSettingsProperty)
00050     {
00051         s_TemplateSettingsProperty =
00052             InitializeDependencyProperty(
00053                 L"TemplateSettings",
00054                 winrt::name_of<winrt::NavigationViewItemPresenterTemplateSettings>(),
00055                 winrt::name_of<winrt::NavigationViewItemPresenter>(),
00056                 false /* isAttached */,
00057                 ValueHelper<winrt::NavigationViewItemPresenterTemplateSettings>::BoxedDefaultValue(),
00058                 nullptr);
00059     }
00060 }
00061
00062 void NavigationViewItemPresenterProperties::ClearProperties()
00063 {
00064     s_IconProperty = nullptr;
00065     s_InfoBadgeProperty = nullptr;
00066     s_TemplateSettingsProperty = nullptr;
00067 }
00068
00069 void NavigationViewItemPresenterProperties::Icon(winrt::IconElement const& value)
00070 {
00071     [[gsl::suppress(con)]]
00072     {
00073     static_cast<NavigationViewItemPresenter*>(this)->SetValue(s_IconProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
00074     }
00075 }
00076
00077 winrt::IconElement NavigationViewItemPresenterProperties::Icon()
00078 {
00079     return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<NavigationViewItemPresenter*>(this)->GetValue(s_IconProperty));
00080 }
00081
00082 void NavigationViewItemPresenterProperties::InfoBadge(winrt::InfoBadge const& value)
00083 {
00084     [[gsl::suppress(con)]]
00085     {
00086     static_cast<NavigationViewItemPresenter*>(this)->SetValue(s_InfoBadgeProperty, ValueHelper<winrt::InfoBadge>::BoxValueIfNecessary(value));
00087     }
00088 }
00089
00090 winrt::InfoBadge NavigationViewItemPresenterProperties::InfoBadge()
00091 {
00092     return ValueHelper<winrt::InfoBadge>::CastOrUnbox(static_cast<NavigationViewItemPresenter*>(this)->GetValue(s_InfoBadgeProperty));
00093 }
00094
00095 void NavigationViewItemPresenterProperties::TemplateSettings(winrt::NavigationViewItemPresenterTemplateSettings const& value)
00096 {
00097     [[gsl::suppress(con)]]
00098     {
00099     static_cast<NavigationViewItemPresenter*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::NavigationViewItemPresenterTemplateSettings>::BoxValueIfNecessary(value));
00100     }
00101 }
00102
00103 winrt::NavigationViewItemPresenterTemplateSettings NavigationViewItemPresenterProperties::TemplateSettings()
00104 {
00105     return ValueHelper<winrt::NavigationViewItemPresenterTemplateSettings>::CastOrUnbox(static_cast<NavigationViewItemPresenter*>(this)->GetValue(s_TemplateSettingsProperty));
00106 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenter.idl Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenter.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC_V5]
00005 [webhosthidden]
00006 enum ScrollingContentOrientation
00007 {
00008     Vertical = 0,
00009     Horizontal = 1,
00010     None = 2,
00011     Both = 3,
00012 };
00013
00014 [MUX_PUBLIC_V5]
00015 [webhosthidden]
00016 enum ScrollingInteractionState
00017 {
00018     Idle = 0,
00019     Interaction = 1,
00020     Inertia = 2,
00021     Animation = 3,
00022 };
00023
00024 [MUX_PUBLIC_V5]
00025 [webhosthidden]
00026 enum ScrollingScrollMode
00027 {
00028     Enabled = 0,
00029     Disabled = 1,
00030     Auto = 2,
00031 };
00032
00033 [MUX_PUBLIC_V5]
00034 [webhosthidden]
00035 enum ScrollingZoomMode
00036 {
00037     Enabled = 0,
00038     Disabled = 1,
00039 };
00040
00041 [MUX_PUBLIC_V5]
00042 [webhosthidden]
00043 enum ScrollingChainMode
00044 {
00045     Auto = 0,
00046     Always = 1,
00047     Never = 2,
00048 };
00049
00050 [MUX_PUBLIC_V5]
00051 [webhosthidden]
00052 enum ScrollingRailMode
00053 {
00054     Enabled = 0,
00055     Disabled = 1,
00056 };
00057
00058 [MUX_PUBLIC_V5]
00059 [webhosthidden]
00060 [flags]
00061 enum ScrollingInputKinds
00062 {
00063     None = 0,
00064     Touch = 1,
00065     Pen = 2,
00066     MouseWheel = 4,
00067     Keyboard = 8,
00068     Gamepad = 16,
00069     All = 255,
00070 };
00071
00072 [MUX_PUBLIC_V5]
00073 [webhosthidden]
00074 enum ScrollingAnimationMode
00075 {
00076    Disabled = 0,
00077    Enabled = 1,
00078    Auto = 2,
00079 };
00080
00081 [MUX_PUBLIC_V5]
00082 [webhosthidden]
00083 enum ScrollingSnapPointsMode
00084 {
00085     Default = 0,
00086     Ignore = 1,
00087 };
00088
00089 [MUX_PUBLIC_V5]
00090 [webhosthidden]
00091 [marshaling_behavior(agile)]
00092 [threading(both)]
00093 unsealed runtimeclass ScrollingScrollOptions
00094 {
00095     ScrollingScrollOptions(ScrollingAnimationMode animationMode);
00096     ScrollingScrollOptions(ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode);
00097
00098     ScrollingAnimationMode AnimationMode { get; set; };
00099     ScrollingSnapPointsMode SnapPointsMode { get; set; };
00100 }
00101
00102 [MUX_PUBLIC_V5]
00103 [webhosthidden]
00104 [marshaling_behavior(agile)]
00105 [threading(both)]
00106 unsealed runtimeclass ScrollingZoomOptions
00107 {
00108     ScrollingZoomOptions(ScrollingAnimationMode animationMode);
00109     ScrollingZoomOptions(ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode);
00110
00111     ScrollingAnimationMode AnimationMode { get; set; };
00112     ScrollingSnapPointsMode SnapPointsMode { get; set; };
00113 }
00114
00115 [MUX_PUBLIC_V5]
00116 [webhosthidden]
00117 runtimeclass ScrollingScrollAnimationStartingEventArgs
00118 {
00119     Microsoft.UI.Composition.CompositionAnimation Animation { get; set; };
00120     Windows.Foundation.Numerics.Vector2 StartPosition { get; };
00121     Windows.Foundation.Numerics.Vector2 EndPosition { get; };
00122     Int32 CorrelationId { get; };
00123 }
00124
00125 [MUX_PUBLIC_V5]
00126 [webhosthidden]
00127 runtimeclass ScrollingZoomAnimationStartingEventArgs
00128 {
00129     Windows.Foundation.Numerics.Vector2 CenterPoint { get; };
00130     Single StartZoomFactor { get; };
00131     Single EndZoomFactor { get; };
00132     Microsoft.UI.Composition.CompositionAnimation Animation { get; set; };
00133     Int32 CorrelationId { get; };
00134 }
00135
00136 [MUX_PUBLIC_V5]
00137 [webhosthidden]
00138 runtimeclass ScrollingScrollCompletedEventArgs
00139 {
00140     Int32 CorrelationId { get; };
00141 }
00142
00143 [MUX_PUBLIC_V5]
00144 [webhosthidden]
00145 runtimeclass ScrollingZoomCompletedEventArgs
00146 {
00147     Int32 CorrelationId { get; };
00148 }
00149
00150 [MUX_PUBLIC_V5]
00151 [webhosthidden]
00152 runtimeclass ScrollingBringingIntoViewEventArgs
00153 {
00154     ScrollingSnapPointsMode SnapPointsMode { get; set; };
00155     Microsoft.UI.Xaml.BringIntoViewRequestedEventArgs RequestEventArgs { get; };
00156     Double TargetHorizontalOffset { get; };
00157     Double TargetVerticalOffset { get; };
00158     Int32 CorrelationId { get; };
00159     Boolean Cancel { get; set; };
00160 }
00161
00162 [MUX_PUBLIC_V5]
00163 [webhosthidden]
00164 runtimeclass ScrollingAnchorRequestedEventArgs
00165 {
00166     Windows.Foundation.Collections.IVector<Microsoft.UI.Xaml.UIElement> AnchorCandidates { get; };
00167     Microsoft.UI.Xaml.UIElement AnchorElement { get; set; };
00168 }
00169
00170 [MUX_PREVIEW]
00171 [webhosthidden]
00172 runtimeclass ScrollingScrollStartingEventArgs
00173 {
00174     Int32 CorrelationId { get; };
00175     Double HorizontalOffset { get; };
00176     Double VerticalOffset { get; };
00177     Single ZoomFactor{ get; };
00178 }
00179
00180 [MUX_PREVIEW]
00181 [webhosthidden]
00182 runtimeclass ScrollingZoomStartingEventArgs
00183 {
00184     Int32 CorrelationId { get; };
00185     Double HorizontalOffset { get; };
00186     Double VerticalOffset { get; };
00187     Single ZoomFactor{ get; };
00188 }
00189
00190 }
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.idl Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedBackVisualSource.idl

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedBackVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedBackVisualSource.json (21751 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 namespace MU_XCAV_NAMESPACE
00022 {
00023     [MUX_PUBLIC]
00024     [webhosthidden]
00025     runtimeclass AnimatedBackVisualSource
00026         : [default] Microsoft.UI.Xaml.Controls.IAnimatedVisualSource, Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
00027     {
00028         AnimatedBackVisualSource();
00029     };
00030 }
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemBase.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemBase.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewItemBase.h"
00007 #include "NavigationView.h"
00008 #include "IndexPath.h"
00009
00010 NavigationViewItemBase::NavigationViewItemBase()
00011 {
00012     Loaded({ this, &NavigationViewItemBase::OnLoaded });
00013 }
00014
00015 void NavigationViewItemBase::OnApplyTemplate()
00016 {
00017     __super::OnApplyTemplate();
00018 }
00019
00020 void NavigationViewItemBase::OnLoaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&)
00021 {
00022     // If the NavViewItem is not prepared in an ItemPresenter it will be missing a reference to NavigationView, so adding that here.
00023     if (!m_navigationView.get())
00024     {
00025         SetNavigationViewParent(SharedHelpers::GetAncestorOfType<winrt::NavigationView>(*this));
00026     }
00027 }
00028
00029 NavigationViewRepeaterPosition NavigationViewItemBase::Position() const
00030 {
00031     return m_position;
00032 }
00033
00034 void NavigationViewItemBase::Position(NavigationViewRepeaterPosition value)
00035 {
00036     if (m_position != value)
00037     {
00038         m_position = value;
00039         OnNavigationViewItemBasePositionChanged();
00040     }
00041 }
00042
00043 winrt::NavigationView NavigationViewItemBase::GetNavigationView() const
00044 {
00045     return m_navigationView.get();
00046 }
00047
00048 void NavigationViewItemBase::Depth(int depth)
00049 {
00050     if (m_depth != depth)
00051     {
00052         m_depth = depth;
00053         OnNavigationViewItemBaseDepthChanged();
00054     }
00055 }
00056
00057 int NavigationViewItemBase::Depth() const
00058 {
00059     return m_depth;
00060 }
00061
00062 winrt::SplitView NavigationViewItemBase::GetSplitView() const
00063 {
00064     winrt::SplitView splitView{ nullptr };
00065     auto navigationView = GetNavigationView();
00066     if (navigationView)
00067     {
00068         splitView = winrt::get_self<NavigationView>(navigationView)->GetSplitView();
00069     }
00070     return splitView;
00071 }
00072
00073 void NavigationViewItemBase::SetNavigationViewParent(winrt::NavigationView const& navigationView)
00074 {
00075     m_navigationView = winrt::make_weak(navigationView);
00076 }
00077
00078 void NavigationViewItemBase::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00079 {
00080     if (args.Property() == s_IsSelectedProperty)
00081     {
00082         OnNavigationViewItemBaseIsSelectedChanged();
00083     }
00084 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusToThicknessConverter.h Source File

  • File List
  • File Members
  • Common

CornerRadiusToThicknessConverter.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "CornerRadiusToThicknessConverter.g.h"
00006 #include "CornerRadiusToThicknessConverter.properties.h"
00007
00008 class CornerRadiusToThicknessConverter :
00009     public winrt::implementation::CornerRadiusToThicknessConverterT<CornerRadiusToThicknessConverter>,
00010     public CornerRadiusToThicknessConverterProperties
00011 {
00012 public:
00013     winrt::Thickness Convert(winrt::CornerRadius const& radius,
00014         winrt::CornerRadiusToThicknessConverterKind const& filterKind,
00015         double multiplier);
00016
00017     winrt::IInspectable Convert(
00018         winrt::IInspectable const& value,
00019         winrt::TypeName const& targetType,
00020         winrt::IInspectable const& parameter,
00021         winrt::hstring const& language);
00022
00023     winrt::IInspectable ConvertBack(
00024         winrt::IInspectable const& value,
00025         winrt::TypeName const& targetType,
00026         winrt::IInspectable const& parameter,
00027         winrt::hstring const& language);
00028 };
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DispatcherHelper Member List

This is the complete list of members for DispatcherHelper, including all inherited members.
DispatcherHelper(const winrt::DependencyObject &dependencyObject=nullptr) | DispatcherHelper | [inline]
RunAsync(std::function< void()> func, bool fallbackToThisThread=false) const | DispatcherHelper | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.common.h Source File

  • File List
  • File Members
  • Repeater

ItemsRepeater.common.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsRepeaterTrace.h"
00007
00008 // Use std::min and std::max instead.
00009 #undef min
00010 #undef max
00011
00012 // We cache these factories for perf reasons
00013 class CachedVisualTreeHelpers :
00014     public winrt::implements<CachedVisualTreeHelpers, winrt::IInspectable>
00015 {
00016 public:
00017     static winrt::Rect GetLayoutSlot(winrt::FrameworkElement const& element);
00018     static winrt::DependencyObject GetParent(winrt::DependencyObject const& child);
00019
00020     static winrt::IDataTemplateComponent GetDataTemplateComponent(winrt::UIElement const& element);
00021
00022 private:
00023     winrt::ILayoutInformationStatics m_layoutInfo;
00024     winrt::IVisualTreeHelperStatics m_visualTreeHelper;
00025     winrt::IXamlBindingHelperStatics m_xamlBindingHelperStatics;
00026 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderPage Member List

This is the complete list of members for ExpanderPage, including all inherited members.
ExpanderPage() ExpanderPage [inline]
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/InteractionTests/PagerControlTestBase.cs Source File

  • File List
  • File Members
  • PagerControl
  • InteractionTests

PagerControlTestBase.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00007
00008 using WEX.TestExecution;
00009 using WEX.TestExecution.Markup;
00010 using WEX.Logging.Interop;
00011
00012 using Microsoft.Windows.Apps.Test.Automation;
00013 using Microsoft.Windows.Apps.Test.Foundation;
00014 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00015 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00016
00017 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00018 {
00019     public enum Visibility
00020     {
00021         Visible,
00022         Collapsed
00023     }
00024
00025     public class PagerControlTestBase
00026     {
00027         protected PagerControlTestPageElements elements;
00028         protected int AutoDisplayModeThresholdValue = 10;
00029         protected delegate void SetButtonVisibilityModeFunction(ButtonVisibilityModes mode);
00030
00031         protected void SelectValueInPagerComboBox(int index)
00032         {
00033             // Open ComboBox.
00034             InputHelper.LeftClick(elements.GetPagerComboBox());
00035             Wait.ForIdle();
00036             // Index is the actual PagerControl SelectedIndex, so we need to add 1 here
00037             // to result in the user friendly name being displayed in the ComboBox.
00038             elements.GetPagerComboBox().SelectItemByName((index + 1).ToString());
00039         }
00040
00041         protected void SendValueToNumberBox(string value)
00042         {
00043             Edit textbox = FindTextBox(elements.GetPagerNumberBox());
00044
00045             Verify.IsNotNull(textbox);
00046
00047             KeyboardHelper.EnterText(textbox, value);
00048             KeyboardHelper.PressKey(Key.Enter);
00049             Wait.ForIdle();
00050         }
00051
00052         protected void SelectPageInNumberPanel(int index)
00053         {
00054             InputHelper.LeftClick(elements.GetNumberPanelButton("Page " + index.ToString()));
00055             Wait.ForIdle();
00056         }
00057
00058         protected Edit FindTextBox(UIObject parent)
00059         {
00060             foreach (UIObject elem in parent.Children)
00061             {
00062                 if (elem.ClassName.Equals("TextBox"))
00063                 {
00064                     return new Edit(elem);
00065                 }
00066             }
00067             Log.Comment("Did not find TextBox for object " + parent.Name);
00068             return null;
00069         }
00070
00071         protected int GetLastPageAsInt()
00072         {
00073             return Convert.ToInt32(GetLastPage());
00074         }
00075         protected string GetLastPage()
00076         {
00077             return elements.GetNumberOfPagesTextBlock().GetText();
00078         }
00079
00080         protected int GetPreviousPageAsInt()
00081         {
00082             return Convert.ToInt32(GetPreviousPage());
00083         }
00084         protected string GetPreviousPage()
00085         {
00086             return elements.GetPreviousPageTextBlock().GetText();
00087         }
00088
00089         protected int GetCurrentPageAsInt()
00090         {
00091             return Convert.ToInt32(GetCurrentPage());
00092         }
00093         protected string GetCurrentPage()
00094         {
00095             return elements.GetCurrentPageTextBlock().GetText();
00096         }
00097
00098         protected void ChangeNumberOfPages()
00099         {
00100             InputHelper.LeftClick(elements.GetNumberOfPagesSetterButton());
00101         }
00102
00103         protected void IncrementNumberOfPages(int numberOfPagesToAdd)
00104         {
00105             for (int i = 0; i < numberOfPagesToAdd; i++)
00106             {
00107                 InputHelper.LeftClick(elements.GetIncreaseNumberOfPagesButton());
00108             }
00109         }
00110
00111         protected void VerifyNumberOfPages(string expectedPages)
00112         {
00113             Verify.AreEqual(expectedPages, elements.GetNumberOfPagesTextBlock().GetText());
00114         }
00115
00116         protected void VerifyNumberPanelContent(string expectedContent)
00117         {
00118             Verify.AreEqual(expectedContent, elements.GetNumberPanelContentTextBlock().GetText());
00119         }
00120
00121         protected void VerifyPageChanged(int expectedPage)
00122         {
00123             Verify.AreEqual(expectedPage, GetCurrentPageAsInt());
00124             Log.Comment($"Changing to page {expectedPage}");
00125         }
00126
00127         protected void VerifyButton(UIObject button, Visibility expectedVisibility, bool shouldBeEnabled)
00128         {
00129
00130             if (button == elements.GetFirstPageButton())
00131             {
00132                 VerifyFirstPageButtonVisibility(expectedVisibility);
00133                 VerifyFirstPageButtonIsEnabled(shouldBeEnabled);
00134             }
00135             else if (button == elements.GetPreviousPageButton())
00136             {
00137                 VerifyPreviousPageButtonVisibility(expectedVisibility);
00138                 VerifyPreviousPageButtonIsEnabled(shouldBeEnabled);
00139             }
00140             else if (button == elements.GetNextPageButton())
00141             {
00142                 VerifyNextPageButtonVisibility(expectedVisibility);
00143                 VerifyNextPageButtonIsEnabled(shouldBeEnabled);
00144             }
00145             else if (button == elements.GetLastPageButton())
00146             {
00147                 VerifyLastPageButtonVisibility(expectedVisibility);
00148                 VerifyLastPageButtonIsEnabled(shouldBeEnabled);
00149             }
00150         }
00151
00152         protected void VerifyFirstPageButtonVisibility(Visibility expected)
00153         {
00154             Verify.AreEqual(expected == Visibility.Visible, elements.GetFirstPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
00155         }
00156
00157         protected void VerifyFirstPageButtonIsEnabled(bool expected)
00158         {
00159             Verify.AreEqual(expected, elements.GetFirstPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
00160         }
00161
00162         protected void VerifyPreviousPageButtonVisibility(Visibility expected)
00163         {
00164             Verify.AreEqual(expected == Visibility.Visible, elements.GetPreviousPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
00165         }
00166
00167         protected void VerifyPreviousPageButtonIsEnabled(bool expected)
00168         {
00169             Verify.AreEqual(expected, elements.GetPreviousPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
00170         }
00171
00172         protected void VerifyNextPageButtonVisibility(Visibility expected)
00173         {
00174             Verify.AreEqual(expected == Visibility.Visible, elements.GetNextPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
00175         }
00176
00177         protected void VerifyNextPageButtonIsEnabled(bool expected)
00178         {
00179             Verify.AreEqual(expected, elements.GetNextPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
00180         }
00181
00182         protected void VerifyLastPageButtonVisibility(Visibility expected)
00183         {
00184             Verify.AreEqual(expected == Visibility.Visible, elements.GetLastPageButtonVisibilityCheckBox().ToggleState == ToggleState.On);
00185         }
00186
00187         protected void VerifyLastPageButtonIsEnabled(bool expected)
00188         {
00189             Verify.AreEqual(expected, elements.GetLastPageButtonIsEnabledCheckBox().ToggleState == ToggleState.On);
00190         }
00191
00192         protected void SetFirstPageButtonVisibilityMode(ButtonVisibilityModes mode)
00193         {
00194             if (mode == ButtonVisibilityModes.AlwaysVisible)
00195             {
00196                 elements.GetFirstPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisibleFirstPageButtonVisibilityItem");
00197             }
00198             else if (mode == ButtonVisibilityModes.HiddenOnEdge)
00199             {
00200                 elements.GetFirstPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgeFirstPageButtonVisibilityItem");
00201             }
00202             else if (mode == ButtonVisibilityModes.None)
00203             {
00204                 elements.GetFirstPageButtonVisibilityComboBox().SelectItemByName("NoneFirstPageButtonVisibilityItem");
00205             }
00206         }
00207
00208         protected void SetPreviousPageButtonVisibilityMode(ButtonVisibilityModes mode)
00209         {
00210             if (mode == ButtonVisibilityModes.AlwaysVisible)
00211             {
00212                 elements.GetPreviousPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisiblePreviousPageButtonVisibilityItem");
00213             }
00214             else if (mode == ButtonVisibilityModes.HiddenOnEdge)
00215             {
00216                 elements.GetPreviousPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgePreviousPageButtonVisibilityItem");
00217             }
00218             else if (mode == ButtonVisibilityModes.None)
00219             {
00220                 elements.GetPreviousPageButtonVisibilityComboBox().SelectItemByName("NonePreviousPageButtonVisibilityItem");
00221             }
00222         }
00223
00224         protected void SetNextPageButtonVisibilityMode(ButtonVisibilityModes mode)
00225         {
00226             if (mode == ButtonVisibilityModes.AlwaysVisible)
00227             {
00228                 elements.GetNextPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisibleNextPageButtonVisibilityItem");
00229             }
00230             else if (mode == ButtonVisibilityModes.HiddenOnEdge)
00231             {
00232                 elements.GetNextPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgeNextPageButtonVisibilityItem");
00233             }
00234             else if (mode == ButtonVisibilityModes.None)
00235             {
00236                 elements.GetNextPageButtonVisibilityComboBox().SelectItemByName("NoneNextPageButtonVisibilityItem");
00237             }
00238         }
00239
00240         protected void SetLastPageButtonVisibilityMode(ButtonVisibilityModes mode)
00241         {
00242             if (mode == ButtonVisibilityModes.AlwaysVisible)
00243             {
00244                 elements.GetLastPageButtonVisibilityComboBox().SelectItemByName("AlwaysVisibleLastPageButtonVisibilityItem");
00245             }
00246             else if (mode == ButtonVisibilityModes.HiddenOnEdge)
00247             {
00248                 elements.GetLastPageButtonVisibilityComboBox().SelectItemByName("HiddenOnEdgeLastPageButtonVisibilityItem");
00249             }
00250             else if (mode == ButtonVisibilityModes.None)
00251             {
00252                 elements.GetLastPageButtonVisibilityComboBox().SelectItemByName("NoneLastPageButtonVisibilityItem");
00253             }
00254         }
00255
00256         protected void SetAutoDisplayMode()
00257         {
00258             SetDisplayMode("AutoDisplayModeItem");
00259         }
00260
00261         protected void SetNumberBoxDisplayMode()
00262         {
00263             SetDisplayMode("NumberBoxDisplayModeItem");
00264         }
00265
00266         protected void SetComboBoxDisplayMode()
00267         {
00268             SetDisplayMode("ComboBoxDisplayModeItem");
00269         }
00270
00271         protected void SetNumberPanelDisplayMode()
00272         {
00273             SetDisplayMode("NumberPanelDisplayModeItem");
00274         }
00275
00276         protected void SetDisplayMode(string mode)
00277         {
00278             elements.GetDisplayModeComboBox().SelectItemByName(mode);
00279             Wait.ForIdle();
00280         }
00281
00282         protected void VerifyAutoDisplayMode()
00283         {
00284             VerifyDisplayMode(DisplayModes.Auto);
00285         }
00286
00287         protected void VerifyNumberBoxDisplayMode()
00288         {
00289             VerifyDisplayMode(DisplayModes.NumberBox);
00290         }
00291
00292         protected void VerifyComboBoxDisplayMode()
00293         {
00294             VerifyDisplayMode(DisplayModes.ComboBox);
00295         }
00296
00297         protected void VerifyNumberPanelDisplayMode()
00298         {
00299             VerifyDisplayMode(DisplayModes.NumberPanel);
00300         }
00301
00302         protected void VerifyDisplayMode(DisplayModes mode)
00303         {
00304             switch (mode)
00305             {
00306                 case DisplayModes.Auto:
00307                     if (Convert.ToInt32(elements.GetNumberOfPagesTextBlock().GetText()) < AutoDisplayModeThresholdValue)
00308                     {
00309                         VerifyComboBoxEnabled();
00310                         VerifyNumberBoxDisabled();
00311                         VerifyNumberPanelDisabled();
00312                     }
00313                     else
00314                     {
00315                         VerifyNumberBoxEnabled();
00316                         VerifyComboBoxDisabled();
00317                         VerifyNumberPanelDisabled();
00318                     }
00319                     break;
00320                 case DisplayModes.ComboBox:
00321                     VerifyComboBoxEnabled();
00322                     VerifyNumberBoxDisabled();
00323                     VerifyNumberPanelDisabled();
00324                     break;
00325                 case DisplayModes.NumberBox:
00326                     VerifyComboBoxDisabled();
00327                     VerifyNumberBoxEnabled();
00328                     VerifyNumberPanelDisabled();
00329                     break;
00330                 case DisplayModes.NumberPanel:
00331                     VerifyComboBoxDisabled();
00332                     VerifyNumberBoxDisabled();
00333                     VerifyNumberPanelEnabled();
00334                     break;
00335                 default:
00336                     break;
00337             }
00338         }
00339
00340         protected void VerifyComboBoxEnabled()
00341         {
00342             VerifyComboBoxVisibility(Visibility.Visible);
00343             VerifyComboBoxIsEnabled(true);
00344         }
00345
00346         protected void VerifyNumberBoxEnabled()
00347         {
00348             VerifyNumberBoxVisibility(Visibility.Visible);
00349             VerifyNumberBoxIsEnabled(true);
00350         }
00351
00352         protected void VerifyNumberPanelEnabled()
00353         {
00354             VerifyNumberPanelVisibility(Visibility.Visible);
00355         }
00356
00357         protected void VerifyComboBoxDisabled()
00358         {
00359             VerifyComboBoxVisibility(Visibility.Collapsed);
00360         }
00361
00362         protected void VerifyNumberBoxDisabled()
00363         {
00364             VerifyNumberBoxVisibility(Visibility.Collapsed);
00365         }
00366
00367         protected void VerifyNumberPanelDisabled()
00368         {
00369             VerifyNumberPanelVisibility(Visibility.Collapsed);
00370         }
00371
00372         protected void VerifyComboBoxVisibility(Visibility expected)
00373         {
00374             Verify.AreEqual(expected == Visibility.Visible, elements.GetComboBoxVisibilityCheckBox().ToggleState == ToggleState.On);
00375         }
00376
00377         protected void VerifyComboBoxIsEnabled(bool expected)
00378         {
00379             Verify.AreEqual(expected, elements.GetComboBoxIsEnabledCheckBox().ToggleState == ToggleState.On);
00380         }
00381
00382         protected void VerifyNumberBoxVisibility(Visibility expected)
00383         {
00384             Verify.AreEqual(expected == Visibility.Visible, elements.GetNumberBoxVisibilityCheckBox().ToggleState == ToggleState.On);
00385         }
00386
00387         protected void VerifyNumberBoxIsEnabled(bool expected)
00388         {
00389             Verify.AreEqual(expected, elements.GetNumberBoxIsEnabledCheckBox().ToggleState == ToggleState.On);
00390         }
00391
00392         protected void VerifyNumberPanelVisibility(Visibility expected)
00393         {
00394             Verify.AreEqual(expected == Visibility.Visible, elements.GetNumberPanelVisibilityCheckBox().ToggleState == ToggleState.On);
00395         }
00396
00397         protected void ButtonVisibilityOptionsTest(string buttonNamePrefix)
00398         {
00399             SetButtonVisibilityModeFunction SetButtonVisibilityMode;
00400             UIObject buttonBeingTested;
00401
00402             using (var setup = new TestSetupHelper("PagerControl Tests"))
00403             {
00404
00405                 elements = new PagerControlTestPageElements();
00406                 switch (buttonNamePrefix)
00407                 {
00408                     case "First":
00409                         SetButtonVisibilityMode = SetFirstPageButtonVisibilityMode;
00410                         buttonBeingTested = elements.GetFirstPageButton();
00411                         break;
00412                     case "Previous":
00413                         SetButtonVisibilityMode = SetPreviousPageButtonVisibilityMode;
00414                         buttonBeingTested = elements.GetPreviousPageButton();
00415                         break;
00416                     case "Next":
00417                         SetButtonVisibilityMode = SetNextPageButtonVisibilityMode;
00418                         buttonBeingTested = elements.GetNextPageButton();
00419                         break;
00420                     case "Last":
00421                         SetButtonVisibilityMode = SetLastPageButtonVisibilityMode;
00422                         buttonBeingTested = elements.GetLastPageButton();
00423                         break;
00424                     default:
00425                         Log.Warning("This test is being skipped because the button string was not one of these four strings: [First, Previous, Next, Last]");
00426                         return;
00427                 }
00428
00429                 VerifyPageChanged(0);
00430
00431                 foreach (ButtonVisibilityModes visMode in Enum.GetValues(typeof(ButtonVisibilityModes)))
00432                 {
00433                     SetButtonVisibilityMode(visMode);
00434                     GetLastPage();
00435                     // If we're not on the first page then navigate to the first page.
00436                     if (GetCurrentPageAsInt() != 0)
00437                     {
00438                         SelectValueInPagerComboBox(0);
00439                         VerifyPageChanged(0);
00440                     }
00441
00442                     var expectedVisibility = ((visMode == ButtonVisibilityModes.None) ||
00443                         (visMode == ButtonVisibilityModes.HiddenOnEdge &&
00444                         (buttonNamePrefix == "First" || buttonNamePrefix == "Previous"))) ? Visibility.Collapsed : Visibility.Visible;
00445
00446                     var expectedIsEnableValue = (buttonNamePrefix == "First" || buttonNamePrefix == "Previous") ? false : true;
00447
00448                     VerifyButton(buttonBeingTested, expectedVisibility, expectedIsEnableValue);
00449
00450                     SelectValueInPagerComboBox(1);
00451                     VerifyPageChanged(1);
00452
00453                     expectedVisibility = (visMode == ButtonVisibilityModes.None) ? Visibility.Collapsed : Visibility.Visible;
00454                     expectedIsEnableValue = true;
00455
00456                     VerifyButton(buttonBeingTested, expectedVisibility, expectedIsEnableValue);
00457
00458                     SelectValueInPagerComboBox(GetLastPageAsInt() - 1);
00459                     VerifyPageChanged(GetLastPageAsInt() - 1);
00460
00461                     expectedVisibility = ((visMode == ButtonVisibilityModes.None) ||
00462                         (visMode == ButtonVisibilityModes.HiddenOnEdge &&
00463                         (buttonNamePrefix == "Next" || buttonNamePrefix == "Last"))) ? Visibility.Collapsed : Visibility.Visible;
00464
00465                     expectedIsEnableValue = (buttonNamePrefix == "Next" || buttonNamePrefix == "Last") ? false : true;
00466
00467                     VerifyButton(buttonBeingTested, expectedVisibility, expectedIsEnableValue);
00468                 }
00469             }
00470         }
00471
00472         public enum DisplayModes
00473         {
00474             Auto,
00475             NumberBox,
00476             ComboBox,
00477             NumberPanel
00478         };
00479
00480         public enum ButtonVisibilityModes
00481         {
00482             AlwaysVisible,
00483             HiddenOnEdge,
00484             None
00485         }
00486     }
00487 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPicker.h Source File

  • File List
  • File Members
  • ColorPicker

ColorPicker.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ColorHelpers.h"
00007 #include "ColorChangedEventArgs.h"
00008
00009 #include "ColorPicker.g.h"
00010
00011 #include "ColorPicker.properties.h"
00012
00013 class ColorPicker :
00014     public ReferenceTracker<ColorPicker, winrt::implementation::ColorPickerT>,
00015     public ColorPickerProperties
00016 {
00017 public:
00018     ColorPicker();
00019
00020     // IFrameworkElementOverrides overrides
00021     void OnApplyTemplate();
00022
00023     // Property changed handler.
00024     void OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00025
00026     Hsv & GetCurrentHsv() { return m_currentHsv; }
00027
00028 private:
00029     // DependencyProperty changed event handlers
00030     void OnColorChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00031     void OnPreviousColorChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00032     void OnIsAlphaEnabledChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00033     void OnPartVisibilityChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00034     void OnMinMaxHueChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00035     void OnMinMaxSaturationChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00036     void OnMinMaxValueChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00037     void OnColorSpectrumComponentsChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00038     void OnOrientationChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00039
00040     // ColorPicker event handlers
00041     void OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00042     void OnCheckerColorChanged(winrt::DependencyObject const& o, winrt::DependencyProperty const& p);
00043
00044     // Size changed event handlers
00045     void OnColorPreviewRectangleGridSizeChanged(winrt::IInspectable const& sender, winrt::SizeChangedEventArgs const& args);
00046     void OnAlphaSliderBackgroundRectangleSizeChanged(winrt::IInspectable const& sender, winrt::SizeChangedEventArgs const& args);
00047
00048     // ColorSpectrum event handlers
00049     void OnColorSpectrumColorChanged(const winrt::ColorSpectrum& sender, const winrt::ColorChangedEventArgs& args);
00050     void OnColorSpectrumSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00051
00052     // Slider event handlers
00053     void OnThirdDimensionSliderValueChanged(winrt::IInspectable const& sender, winrt::RangeBaseValueChangedEventArgs const& args);
00054     void OnAlphaSliderValueChanged(winrt::IInspectable const& sender, winrt::RangeBaseValueChangedEventArgs const& args);
00055
00056     // More button event handlers
00057     void OnMoreButtonClicked(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00058     void OnMoreButtonChecked(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00059     void OnMoreButtonUnchecked(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00060
00061     // Color representation ComboBox event handler
00062     void OnColorRepresentationComboBoxSelectionChanged(winrt::IInspectable const& sender, winrt::SelectionChangedEventArgs const& args);
00063
00064     // General TextBox event handlers
00065     void OnTextBoxGotFocus(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00066     void OnTextBoxLostFocus(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00067
00068     // RGB TextBox event handlers
00069     void OnRgbTextChanging(winrt::TextBox const& sender, winrt::TextBoxTextChangingEventArgs const& args);
00070
00071     // HSV TextBox event handlers
00072     void OnHueTextChanging(winrt::TextBox const& sender, winrt::TextBoxTextChangingEventArgs const& args);
00073     void OnSaturationTextChanging(winrt::TextBox const& sender, winrt::TextBoxTextChangingEventArgs const& args);
00074     void OnValueTextChanging(winrt::TextBox const& sender, winrt::TextBoxTextChangingEventArgs const& args);
00075
00076     // Alpha TextBox event handler
00077     void OnAlphaTextChanging(winrt::TextBox const& sender, winrt::TextBoxTextChangingEventArgs const& args);
00078
00079     // Hex TextBox event handler
00080     void OnHexTextChanging(winrt::TextBox const& sender, winrt::TextBoxTextChangingEventArgs const& args);
00081
00082     // Helper functions
00083     void UpdateVisualState(bool useTransitions);
00084
00085     static void AddGradientStop(const winrt::LinearGradientBrush& brush, double offset, Hsv hsvColor, double alpha);
00086
00087     winrt::Color GetCheckerColor();
00088
00089     enum class ColorUpdateReason
00090     {
00091         InitializingColor,
00092         ColorPropertyChanged,
00093         ColorSpectrumColorChanged,
00094         ThirdDimensionSliderChanged,
00095         AlphaSliderChanged,
00096         RgbTextBoxChanged,
00097         HsvTextBoxChanged,
00098         AlphaTextBoxChanged,
00099         HexTextBoxChanged,
00100     };
00101
00102     void InitializeColor();
00103     void UpdateColor(const Rgb &rgb, ColorUpdateReason reason);
00104     void UpdateColor(const Hsv &hsv, ColorUpdateReason reason);
00105     void UpdateColor(double alpha, ColorUpdateReason reason);
00106     void SetColorAndUpdateControls(ColorUpdateReason reason);
00107
00108     void UpdatePreviousColorRectangle();
00109
00110     void UpdateColorControls(ColorUpdateReason reason);
00111
00112     void UpdateThirdDimensionSlider();
00113     void SetThirdDimensionSliderChannel();
00114     void UpdateAlphaSlider();
00115
00116     void CreateColorPreviewCheckeredBackground();
00117     void CreateAlphaSliderCheckeredBackground();
00118
00119     Rgb GetRgbColorFromTextBoxes();
00120     Hsv GetHsvColorFromTextBoxes();
00121     winrt::hstring GetCurrentHexValue();
00122
00123     Rgb ApplyConstraintsToRgbColor(const Rgb &rgb);
00124
00125     void UpdateMoreButton();
00126
00127     bool m_updatingColor{ false };
00128     bool m_updatingControls{ false };
00129     Rgb m_currentRgb{ 1.0, 1.0, 1.0 };
00130     Hsv m_currentHsv{ 0.0, 1.0, 1.0 };
00131     winrt::hstring m_currentHex{ L"#FFFFFFFF" };
00132     double m_currentAlpha{ 1.0 };
00133
00134     winrt::hstring m_previousString{ L"" };
00135     bool m_isFocusedTextBoxValid{ false };
00136
00137     bool m_textEntryGridOpened{ false };
00138
00139     // Template parts
00140     tracker_ref<winrt::ColorSpectrum> m_colorSpectrum{ this };
00141
00142     tracker_ref<winrt::Grid> m_colorPreviewRectangleGrid{ this };
00143     tracker_ref<winrt::Rectangle> m_colorPreviewRectangle{ this };
00144     tracker_ref<winrt::Rectangle> m_previousColorRectangle{ this };
00145     tracker_ref<winrt::ImageBrush> m_colorPreviewRectangleCheckeredBackgroundImageBrush{ this };
00146
00147     winrt::IAsyncAction m_createColorPreviewRectangleCheckeredBackgroundBitmapAction{ nullptr };
00148
00149     tracker_ref<winrt::ColorPickerSlider> m_thirdDimensionSlider{ this };
00150     tracker_ref<winrt::LinearGradientBrush> m_thirdDimensionSliderGradientBrush{ this };
00151
00152     tracker_ref<winrt::ColorPickerSlider> m_alphaSlider{ this };
00153     tracker_ref<winrt::LinearGradientBrush> m_alphaSliderGradientBrush{ this };
00154     tracker_ref<winrt::Rectangle> m_alphaSliderBackgroundRectangle{ this };
00155     tracker_ref<winrt::ImageBrush> m_alphaSliderCheckeredBackgroundImageBrush{ this };
00156
00157     winrt::IAsyncAction m_alphaSliderCheckeredBackgroundBitmapAction{ nullptr };
00158
00159     tracker_ref<winrt::ButtonBase> m_moreButton{ this };
00160     tracker_ref<winrt::TextBlock> m_moreButtonLabel{ this };
00161
00162     tracker_ref<winrt::ComboBox> m_colorRepresentationComboBox{ this };
00163     tracker_ref<winrt::TextBox> m_redTextBox{ this };
00164     tracker_ref<winrt::TextBox> m_greenTextBox{ this };
00165     tracker_ref<winrt::TextBox> m_blueTextBox{ this };
00166     tracker_ref<winrt::TextBox> m_hueTextBox{ this };
00167     tracker_ref<winrt::TextBox> m_saturationTextBox{ this };
00168     tracker_ref<winrt::TextBox> m_valueTextBox{ this };
00169     tracker_ref<winrt::TextBox> m_alphaTextBox{ this };
00170     tracker_ref<winrt::TextBox> m_hexTextBox{ this };
00171
00172     tracker_ref<winrt::ComboBoxItem> m_RgbComboBoxItem{ this };
00173     tracker_ref<winrt::ComboBoxItem> m_HsvComboBoxItem{ this };
00174     tracker_ref<winrt::TextBlock> m_redLabel{ this };
00175     tracker_ref<winrt::TextBlock> m_greenLabel{ this };
00176     tracker_ref<winrt::TextBlock> m_blueLabel{ this };
00177     tracker_ref<winrt::TextBlock> m_hueLabel{ this };
00178     tracker_ref<winrt::TextBlock> m_saturationLabel{ this };
00179     tracker_ref<winrt::TextBlock> m_valueLabel{ this };
00180     tracker_ref<winrt::TextBlock> m_alphaLabel{ this };
00181
00182     tracker_ref<winrt::SolidColorBrush> m_checkerColorBrush{ this };
00183 };
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicColorPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI

AcrylicColorPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using Windows.Foundation.Metadata;
00006 using Windows.UI;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Media;
00010 using Microsoft.UI.Xaml.Markup;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     public sealed partial class AcrylicColorPage : TestPage
00015     {
00016         public AcrylicColorPage()
00017         {
00018             this.InitializeComponent();
00019
00020             foreach (string brushName in AcrylicBrushNames)
00021             {
00022                 var item =
00023                     XamlReader.Load(
00024                         "<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' Margin='5' Background='{ThemeResource " + brushName + "}'>" +
00025                             "<TextBlock Margin='3' FontSize='12' MinWidth='200' MinHeight='36' MaxHeight='330' TextWrapping='Wrap' Text='" + brushName + "'/>" +
00026                         "</Grid>");
00027
00028                 BackgroundList.Items.Add(item);
00029             }
00030         }
00031
00032         public static IEnumerable<string> AcrylicBrushNames
00033         {
00034             get
00035             {
00036                 return new List<string>() {
00037                     "SystemControlAcrylicWindowBrush",
00038                     "SystemControlAcrylicElementBrush",
00039                     "SystemControlAccentAcrylicWindowAccentMediumHighBrush",
00040                     "SystemControlAccentAcrylicElementAccentMediumHighBrush",
00041                     "SystemControlAccentDark1AcrylicWindowAccentDark1Brush",
00042                     "SystemControlAccentDark1AcrylicElementAccentDark1Brush",
00043                     "SystemControlAccentDark2AcrylicWindowAccentDark2MediumHighBrush",
00044                     "SystemControlAccentDark2AcrylicElementAccentDark2MediumHighBrush",
00045                     "SystemControlAcrylicWindowMediumHighBrush",
00046                     "SystemControlAcrylicElementMediumHighBrush",
00047                     "SystemControlChromeMediumLowAcrylicWindowMediumBrush",
00048                     "SystemControlChromeMediumLowAcrylicElementMediumBrush",
00049                     "SystemControlBaseHighAcrylicWindowBrush",
00050                     "SystemControlBaseHighAcrylicElementBrush",
00051                     "SystemControlBaseHighAcrylicWindowMediumHighBrush",
00052                     "SystemControlBaseHighAcrylicElementMediumHighBrush",
00053                     "SystemControlBaseHighAcrylicWindowMediumBrush",
00054                     "SystemControlBaseHighAcrylicElementMediumBrush",
00055                     "SystemControlChromeLowAcrylicWindowBrush",
00056                     "SystemControlChromeLowAcrylicElementBrush",
00057                     "SystemControlChromeMediumAcrylicWindowMediumBrush",
00058                     "SystemControlChromeMediumAcrylicElementMediumBrush",
00059                     "SystemControlChromeHighAcrylicWindowMediumBrush",
00060                     "SystemControlChromeHighAcrylicElementMediumBrush",
00061                     "SystemControlBaseLowAcrylicWindowBrush",
00062                     "SystemControlBaseLowAcrylicElementBrush",
00063                     "SystemControlBaseMediumLowAcrylicWindowMediumBrush",
00064                     "SystemControlBaseMediumLowAcrylicElementMediumBrush",
00065                     "SystemControlAltLowAcrylicWindowBrush",
00066                     "SystemControlAltLowAcrylicElementBrush",
00067                     "SystemControlAltMediumLowAcrylicWindowMediumBrush",
00068                     "SystemControlAltMediumLowAcrylicElementMediumBrush",
00069                     "SystemControlAltHighAcrylicWindowBrush",
00070                     "SystemControlAltHighAcrylicElementBrush"
00071                 };
00072             }
00073         }
00074
00075         public static string GetBrushName(string fullName)
00076         {
00077             if (fullName == null || fullName.Length <= 25)
00078                 return string.Empty;
00079
00080             return fullName.Substring(20, fullName.Length - 25);
00081         }
00082     }
00083 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPicture.properties.cpp Source File

  • File List
  • File Members
  • Generated

PersonPicture.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PersonPicture.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(PersonPicture)
00012 }
00013
00014 #include "PersonPicture.g.cpp"
00015
00016 GlobalDependencyProperty PersonPictureProperties::s_BadgeGlyphProperty{ nullptr };
00017 GlobalDependencyProperty PersonPictureProperties::s_BadgeImageSourceProperty{ nullptr };
00018 GlobalDependencyProperty PersonPictureProperties::s_BadgeNumberProperty{ nullptr };
00019 GlobalDependencyProperty PersonPictureProperties::s_BadgeTextProperty{ nullptr };
00020 GlobalDependencyProperty PersonPictureProperties::s_ContactProperty{ nullptr };
00021 GlobalDependencyProperty PersonPictureProperties::s_DisplayNameProperty{ nullptr };
00022 GlobalDependencyProperty PersonPictureProperties::s_InitialsProperty{ nullptr };
00023 GlobalDependencyProperty PersonPictureProperties::s_IsGroupProperty{ nullptr };
00024 GlobalDependencyProperty PersonPictureProperties::s_PreferSmallImageProperty{ nullptr };
00025 GlobalDependencyProperty PersonPictureProperties::s_ProfilePictureProperty{ nullptr };
00026 GlobalDependencyProperty PersonPictureProperties::s_TemplateSettingsProperty{ nullptr };
00027
00028 PersonPictureProperties::PersonPictureProperties()
00029 {
00030     EnsureProperties();
00031 }
00032
00033 void PersonPictureProperties::EnsureProperties()
00034 {
00035     if (!s_BadgeGlyphProperty)
00036     {
00037         s_BadgeGlyphProperty =
00038             InitializeDependencyProperty(
00039                 L"BadgeGlyph",
00040                 winrt::name_of<winrt::hstring>(),
00041                 winrt::name_of<winrt::PersonPicture>(),
00042                 false /* isAttached */,
00043                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00044                 winrt::PropertyChangedCallback(&OnBadgeGlyphPropertyChanged));
00045     }
00046     if (!s_BadgeImageSourceProperty)
00047     {
00048         s_BadgeImageSourceProperty =
00049             InitializeDependencyProperty(
00050                 L"BadgeImageSource",
00051                 winrt::name_of<winrt::ImageSource>(),
00052                 winrt::name_of<winrt::PersonPicture>(),
00053                 false /* isAttached */,
00054                 ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
00055                 winrt::PropertyChangedCallback(&OnBadgeImageSourcePropertyChanged));
00056     }
00057     if (!s_BadgeNumberProperty)
00058     {
00059         s_BadgeNumberProperty =
00060             InitializeDependencyProperty(
00061                 L"BadgeNumber",
00062                 winrt::name_of<int>(),
00063                 winrt::name_of<winrt::PersonPicture>(),
00064                 false /* isAttached */,
00065                 ValueHelper<int>::BoxedDefaultValue(),
00066                 winrt::PropertyChangedCallback(&OnBadgeNumberPropertyChanged));
00067     }
00068     if (!s_BadgeTextProperty)
00069     {
00070         s_BadgeTextProperty =
00071             InitializeDependencyProperty(
00072                 L"BadgeText",
00073                 winrt::name_of<winrt::hstring>(),
00074                 winrt::name_of<winrt::PersonPicture>(),
00075                 false /* isAttached */,
00076                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00077                 winrt::PropertyChangedCallback(&OnBadgeTextPropertyChanged));
00078     }
00079     if (!s_ContactProperty)
00080     {
00081         s_ContactProperty =
00082             InitializeDependencyProperty(
00083                 L"Contact",
00084                 winrt::name_of<winrt::Contact>(),
00085                 winrt::name_of<winrt::PersonPicture>(),
00086                 false /* isAttached */,
00087                 ValueHelper<winrt::Contact>::BoxedDefaultValue(),
00088                 winrt::PropertyChangedCallback(&OnContactPropertyChanged));
00089     }
00090     if (!s_DisplayNameProperty)
00091     {
00092         s_DisplayNameProperty =
00093             InitializeDependencyProperty(
00094                 L"DisplayName",
00095                 winrt::name_of<winrt::hstring>(),
00096                 winrt::name_of<winrt::PersonPicture>(),
00097                 false /* isAttached */,
00098                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00099                 winrt::PropertyChangedCallback(&OnDisplayNamePropertyChanged));
00100     }
00101     if (!s_InitialsProperty)
00102     {
00103         s_InitialsProperty =
00104             InitializeDependencyProperty(
00105                 L"Initials",
00106                 winrt::name_of<winrt::hstring>(),
00107                 winrt::name_of<winrt::PersonPicture>(),
00108                 false /* isAttached */,
00109                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00110                 winrt::PropertyChangedCallback(&OnInitialsPropertyChanged));
00111     }
00112     if (!s_IsGroupProperty)
00113     {
00114         s_IsGroupProperty =
00115             InitializeDependencyProperty(
00116                 L"IsGroup",
00117                 winrt::name_of<bool>(),
00118                 winrt::name_of<winrt::PersonPicture>(),
00119                 false /* isAttached */,
00120                 ValueHelper<bool>::BoxedDefaultValue(),
00121                 winrt::PropertyChangedCallback(&OnIsGroupPropertyChanged));
00122     }
00123     if (!s_PreferSmallImageProperty)
00124     {
00125         s_PreferSmallImageProperty =
00126             InitializeDependencyProperty(
00127                 L"PreferSmallImage",
00128                 winrt::name_of<bool>(),
00129                 winrt::name_of<winrt::PersonPicture>(),
00130                 false /* isAttached */,
00131                 ValueHelper<bool>::BoxedDefaultValue(),
00132                 winrt::PropertyChangedCallback(&OnPreferSmallImagePropertyChanged));
00133     }
00134     if (!s_ProfilePictureProperty)
00135     {
00136         s_ProfilePictureProperty =
00137             InitializeDependencyProperty(
00138                 L"ProfilePicture",
00139                 winrt::name_of<winrt::ImageSource>(),
00140                 winrt::name_of<winrt::PersonPicture>(),
00141                 false /* isAttached */,
00142                 ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
00143                 winrt::PropertyChangedCallback(&OnProfilePicturePropertyChanged));
00144     }
00145     if (!s_TemplateSettingsProperty)
00146     {
00147         s_TemplateSettingsProperty =
00148             InitializeDependencyProperty(
00149                 L"TemplateSettings",
00150                 winrt::name_of<winrt::PersonPictureTemplateSettings>(),
00151                 winrt::name_of<winrt::PersonPicture>(),
00152                 false /* isAttached */,
00153                 ValueHelper<winrt::PersonPictureTemplateSettings>::BoxedDefaultValue(),
00154                 winrt::PropertyChangedCallback(&OnTemplateSettingsPropertyChanged));
00155     }
00156 }
00157
00158 void PersonPictureProperties::ClearProperties()
00159 {
00160     s_BadgeGlyphProperty = nullptr;
00161     s_BadgeImageSourceProperty = nullptr;
00162     s_BadgeNumberProperty = nullptr;
00163     s_BadgeTextProperty = nullptr;
00164     s_ContactProperty = nullptr;
00165     s_DisplayNameProperty = nullptr;
00166     s_InitialsProperty = nullptr;
00167     s_IsGroupProperty = nullptr;
00168     s_PreferSmallImageProperty = nullptr;
00169     s_ProfilePictureProperty = nullptr;
00170     s_TemplateSettingsProperty = nullptr;
00171 }
00172
00173 void PersonPictureProperties::OnBadgeGlyphPropertyChanged(
00174     winrt::DependencyObject const& sender,
00175     winrt::DependencyPropertyChangedEventArgs const& args)
00176 {
00177     auto owner = sender.as<winrt::PersonPicture>();
00178     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00179 }
00180
00181 void PersonPictureProperties::OnBadgeImageSourcePropertyChanged(
00182     winrt::DependencyObject const& sender,
00183     winrt::DependencyPropertyChangedEventArgs const& args)
00184 {
00185     auto owner = sender.as<winrt::PersonPicture>();
00186     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00187 }
00188
00189 void PersonPictureProperties::OnBadgeNumberPropertyChanged(
00190     winrt::DependencyObject const& sender,
00191     winrt::DependencyPropertyChangedEventArgs const& args)
00192 {
00193     auto owner = sender.as<winrt::PersonPicture>();
00194     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00195 }
00196
00197 void PersonPictureProperties::OnBadgeTextPropertyChanged(
00198     winrt::DependencyObject const& sender,
00199     winrt::DependencyPropertyChangedEventArgs const& args)
00200 {
00201     auto owner = sender.as<winrt::PersonPicture>();
00202     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00203 }
00204
00205 void PersonPictureProperties::OnContactPropertyChanged(
00206     winrt::DependencyObject const& sender,
00207     winrt::DependencyPropertyChangedEventArgs const& args)
00208 {
00209     auto owner = sender.as<winrt::PersonPicture>();
00210     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00211 }
00212
00213 void PersonPictureProperties::OnDisplayNamePropertyChanged(
00214     winrt::DependencyObject const& sender,
00215     winrt::DependencyPropertyChangedEventArgs const& args)
00216 {
00217     auto owner = sender.as<winrt::PersonPicture>();
00218     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00219 }
00220
00221 void PersonPictureProperties::OnInitialsPropertyChanged(
00222     winrt::DependencyObject const& sender,
00223     winrt::DependencyPropertyChangedEventArgs const& args)
00224 {
00225     auto owner = sender.as<winrt::PersonPicture>();
00226     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00227 }
00228
00229 void PersonPictureProperties::OnIsGroupPropertyChanged(
00230     winrt::DependencyObject const& sender,
00231     winrt::DependencyPropertyChangedEventArgs const& args)
00232 {
00233     auto owner = sender.as<winrt::PersonPicture>();
00234     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00235 }
00236
00237 void PersonPictureProperties::OnPreferSmallImagePropertyChanged(
00238     winrt::DependencyObject const& sender,
00239     winrt::DependencyPropertyChangedEventArgs const& args)
00240 {
00241     auto owner = sender.as<winrt::PersonPicture>();
00242     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00243 }
00244
00245 void PersonPictureProperties::OnProfilePicturePropertyChanged(
00246     winrt::DependencyObject const& sender,
00247     winrt::DependencyPropertyChangedEventArgs const& args)
00248 {
00249     auto owner = sender.as<winrt::PersonPicture>();
00250     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00251 }
00252
00253 void PersonPictureProperties::OnTemplateSettingsPropertyChanged(
00254     winrt::DependencyObject const& sender,
00255     winrt::DependencyPropertyChangedEventArgs const& args)
00256 {
00257     auto owner = sender.as<winrt::PersonPicture>();
00258     winrt::get_self<PersonPicture>(owner)->OnPropertyChanged(args);
00259 }
00260
00261 void PersonPictureProperties::BadgeGlyph(winrt::hstring const& value)
00262 {
00263     [[gsl::suppress(con)]]
00264     {
00265     static_cast<PersonPicture*>(this)->SetValue(s_BadgeGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00266     }
00267 }
00268
00269 winrt::hstring PersonPictureProperties::BadgeGlyph()
00270 {
00271     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeGlyphProperty));
00272 }
00273
00274 void PersonPictureProperties::BadgeImageSource(winrt::ImageSource const& value)
00275 {
00276     [[gsl::suppress(con)]]
00277     {
00278     static_cast<PersonPicture*>(this)->SetValue(s_BadgeImageSourceProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
00279     }
00280 }
00281
00282 winrt::ImageSource PersonPictureProperties::BadgeImageSource()
00283 {
00284     return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeImageSourceProperty));
00285 }
00286
00287 void PersonPictureProperties::BadgeNumber(int value)
00288 {
00289     [[gsl::suppress(con)]]
00290     {
00291     static_cast<PersonPicture*>(this)->SetValue(s_BadgeNumberProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00292     }
00293 }
00294
00295 int PersonPictureProperties::BadgeNumber()
00296 {
00297     return ValueHelper<int>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeNumberProperty));
00298 }
00299
00300 void PersonPictureProperties::BadgeText(winrt::hstring const& value)
00301 {
00302     [[gsl::suppress(con)]]
00303     {
00304     static_cast<PersonPicture*>(this)->SetValue(s_BadgeTextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00305     }
00306 }
00307
00308 winrt::hstring PersonPictureProperties::BadgeText()
00309 {
00310     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_BadgeTextProperty));
00311 }
00312
00313 void PersonPictureProperties::Contact(winrt::Contact const& value)
00314 {
00315     [[gsl::suppress(con)]]
00316     {
00317     static_cast<PersonPicture*>(this)->SetValue(s_ContactProperty, ValueHelper<winrt::Contact>::BoxValueIfNecessary(value));
00318     }
00319 }
00320
00321 winrt::Contact PersonPictureProperties::Contact()
00322 {
00323     return ValueHelper<winrt::Contact>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_ContactProperty));
00324 }
00325
00326 void PersonPictureProperties::DisplayName(winrt::hstring const& value)
00327 {
00328     [[gsl::suppress(con)]]
00329     {
00330     static_cast<PersonPicture*>(this)->SetValue(s_DisplayNameProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00331     }
00332 }
00333
00334 winrt::hstring PersonPictureProperties::DisplayName()
00335 {
00336     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_DisplayNameProperty));
00337 }
00338
00339 void PersonPictureProperties::Initials(winrt::hstring const& value)
00340 {
00341     [[gsl::suppress(con)]]
00342     {
00343     static_cast<PersonPicture*>(this)->SetValue(s_InitialsProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00344     }
00345 }
00346
00347 winrt::hstring PersonPictureProperties::Initials()
00348 {
00349     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_InitialsProperty));
00350 }
00351
00352 void PersonPictureProperties::IsGroup(bool value)
00353 {
00354     [[gsl::suppress(con)]]
00355     {
00356     static_cast<PersonPicture*>(this)->SetValue(s_IsGroupProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00357     }
00358 }
00359
00360 bool PersonPictureProperties::IsGroup()
00361 {
00362     return ValueHelper<bool>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_IsGroupProperty));
00363 }
00364
00365 void PersonPictureProperties::PreferSmallImage(bool value)
00366 {
00367     [[gsl::suppress(con)]]
00368     {
00369     static_cast<PersonPicture*>(this)->SetValue(s_PreferSmallImageProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00370     }
00371 }
00372
00373 bool PersonPictureProperties::PreferSmallImage()
00374 {
00375     return ValueHelper<bool>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_PreferSmallImageProperty));
00376 }
00377
00378 void PersonPictureProperties::ProfilePicture(winrt::ImageSource const& value)
00379 {
00380     [[gsl::suppress(con)]]
00381     {
00382     static_cast<PersonPicture*>(this)->SetValue(s_ProfilePictureProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
00383     }
00384 }
00385
00386 winrt::ImageSource PersonPictureProperties::ProfilePicture()
00387 {
00388     return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_ProfilePictureProperty));
00389 }
00390
00391 void PersonPictureProperties::TemplateSettings(winrt::PersonPictureTemplateSettings const& value)
00392 {
00393     [[gsl::suppress(con)]]
00394     {
00395     static_cast<PersonPicture*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::PersonPictureTemplateSettings>::BoxValueIfNecessary(value));
00396     }
00397 }
00398
00399 winrt::PersonPictureTemplateSettings PersonPictureProperties::TemplateSettings()
00400 {
00401     return ValueHelper<winrt::PersonPictureTemplateSettings>::CastOrUnbox(static_cast<PersonPicture*>(this)->GetValue(s_TemplateSettingsProperty));
00402 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewItemInvokedEventArgs.cpp Source File

  • File List
  • File Members
  • ItemsView

ItemsViewItemInvokedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsViewTrace.h"
00007 #include "ItemsViewItemInvokedEventArgs.h"
00008
00009 ItemsViewItemInvokedEventArgs::ItemsViewItemInvokedEventArgs(const winrt::IInspectable& invokedItem)
00010 {
00011     ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, invokedItem);
00012
00013     m_invokedItem.set(invokedItem);
00014 }
00015
00016 #pragma region IItemsViewItemInvokedEventArgs
00017
00018 winrt::IInspectable ItemsViewItemInvokedEventArgs::InvokedItem()
00019 {
00020     return m_invokedItem.get();
00021 }
00022
00023 #pragma endregion
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewBlankPage1.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewBlankPage1.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     public sealed partial class NavigationViewBlankPage1 : Page
00009     {
00010         public NavigationViewBlankPage1()
00011         {
00012             this.InitializeComponent();
00013         }
00014     }
00015 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTests Member List

This is the complete list of members for TabViewTests, including all inherited members.
CreateTabViewItem(string name, Symbol icon, bool closable=true, bool enabled=true) | TabViewTests | [inline, private, static]
CreateTabViewItem(string name, object content, bool closable=true, bool enabled=true) | TabViewTests | [inline, private, static]
CreateTabViewItem(string name, bool closable=true, bool enabled=true) | TabViewTests | [inline, private, static]
TabViewItemBackgroundTest() | TabViewTests | [inline]
TabViewItemForegroundTest() | TabViewTests | [inline]
TabViewItemHeaderTest() | TabViewTests | [inline]
VerifyCompactTabWidthVisualStates(bool isItemsSourceMode=false) | TabViewTests | [inline, private]
VerifyCompactTabWidthVisualStates_ItemsMode() | TabViewTests | [inline]
VerifyCompactTabWidthVisualStates_ItemsSourceMode() | TabViewTests | [inline]
VerifyTabViewItemUIABehavior() | TabViewTests | [inline]
VerifyTabViewUIABehavior() | TabViewTests | [inline]
VerifyTabViewWithoutTabsDoesNotCrash() | TabViewTests | [inline]
VerifyTabWidthVisualStates(TabView tabView, IList< object > items, bool isCompact) | TabViewTests | [inline, private, static]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Matrix5x4 Member List

This is the complete list of members for Matrix5x4, including all inherited members.
M11 | Matrix5x4
M12 | Matrix5x4
M13 | Matrix5x4
M14 | Matrix5x4
M21 | Matrix5x4
M22 | Matrix5x4
M23 | Matrix5x4
M24 | Matrix5x4
M31 | Matrix5x4
M32 | Matrix5x4
M33 | Matrix5x4
M34 | Matrix5x4
M41 | Matrix5x4
M42 | Matrix5x4
M43 | Matrix5x4
M44 | Matrix5x4
M51 | Matrix5x4
M52 | Matrix5x4
M53 | Matrix5x4
M54 | Matrix5x4
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutContextAdapter.cpp Source File

  • File List
  • File Members
  • Repeater

LayoutContextAdapter.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "VirtualizingLayoutContext.h"
00008 #include "LayoutContextAdapter.h"
00009
00010 LayoutContextAdapter::LayoutContextAdapter(winrt::NonVirtualizingLayoutContext const& nonVirtualizingContext)
00011 {
00012     m_nonVirtualizingContext = winrt::make_weak(nonVirtualizingContext);
00013 }
00014
00015 #pragma region ILayoutContextOverrides
00016
00017 winrt::IInspectable LayoutContextAdapter::LayoutStateCore()
00018 {
00019     if (auto context = m_nonVirtualizingContext.get())
00020     {
00021         return context.LayoutState();
00022     }
00023     return nullptr;
00024 }
00025
00026 void LayoutContextAdapter::LayoutStateCore(winrt::IInspectable const& state)
00027 {
00028     if (auto context = m_nonVirtualizingContext.get())
00029     {
00030         context.LayoutStateCore(state);
00031     }
00032 }
00033
00034 #pragma endregion
00035
00036 #pragma region IVirtualizingLayoutContextOverrides
00037
00038 int32_t LayoutContextAdapter::ItemCountCore()
00039 {
00040     if (auto context = m_nonVirtualizingContext.get())
00041     {
00042         return context.Children().Size();
00043     }
00044     return 0;
00045 }
00046
00047 winrt::IInspectable LayoutContextAdapter::GetItemAtCore(int index)
00048 {
00049     if (auto context = m_nonVirtualizingContext.get())
00050     {
00051         return context.Children().GetAt(index);
00052     }
00053     return nullptr;
00054 }
00055
00056 winrt::UIElement LayoutContextAdapter::GetOrCreateElementAtCore(int index, winrt::ElementRealizationOptions const& options)
00057 {
00058     if (auto context = m_nonVirtualizingContext.get())
00059     {
00060         return context.Children().GetAt(index);
00061     }
00062     return nullptr;
00063 }
00064
00065 void LayoutContextAdapter::RecycleElementCore(winrt::UIElement const& element)
00066 {
00067
00068 }
00069
00070 int32_t LayoutContextAdapter::GetElementIndexCore(winrt::UIElement const& element)
00071 {
00072     if (auto context = m_nonVirtualizingContext.get())
00073     {
00074         auto children = context.Children();
00075         for (unsigned int i = 0; i < children.Size(); i++)
00076         {
00077             if (children.GetAt(i) == element)
00078             {
00079                 return i;
00080             }
00081         }
00082     }
00083
00084     return -1;
00085 }
00086
00087 winrt::Rect LayoutContextAdapter::VisibleRectCore()
00088 {
00089     return winrt::Rect{ 0, 0, std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() };
00090 }
00091
00092 winrt::Rect LayoutContextAdapter::RealizationRectCore()
00093 {
00094     return winrt::Rect{ 0, 0, std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() };
00095 }
00096
00097 int LayoutContextAdapter::RecommendedAnchorIndexCore()
00098 {
00099     return -1;
00100 }
00101
00102 winrt::Point LayoutContextAdapter::LayoutOriginCore()
00103 {
00104     return winrt::Point(0, 0);
00105 }
00106
00107 void LayoutContextAdapter::LayoutOriginCore(winrt::Point const& value)
00108 {
00109     if (value != winrt::Point(0, 0))
00110     {
00111         throw winrt::hresult_invalid_argument(L"LayoutOrigin must be at (0,0) when RealizationRect is infinite sized.");
00112     }
00113 }
00114
00115 #pragma endregion
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewProperties Member List

This is the complete list of members for TabViewProperties, including all inherited members.
AddTabButtonClick(winrt::TypedEventHandler< winrt::TabView, winrt::IInspectable > const &value) | TabViewProperties |
AddTabButtonClick(winrt::event_token const &token) | TabViewProperties |
AddTabButtonCommand(winrt::ICommand const &value) | TabViewProperties |
AddTabButtonCommand() | TabViewProperties |
AddTabButtonCommandParameter(winrt::IInspectable const &value) | TabViewProperties |
AddTabButtonCommandParameter() | TabViewProperties |
AddTabButtonCommandParameterProperty() | TabViewProperties | [inline, static]
AddTabButtonCommandProperty() | TabViewProperties | [inline, static]
AllowDropTabs(bool value) | TabViewProperties |
AllowDropTabs() | TabViewProperties |
AllowDropTabsProperty() | TabViewProperties | [inline, static]
CanDragTabs(bool value) | TabViewProperties |
CanDragTabs() | TabViewProperties |
CanDragTabsProperty() | TabViewProperties | [inline, static]
CanReorderTabs(bool value) | TabViewProperties |
CanReorderTabs() | TabViewProperties |
CanReorderTabsProperty() | TabViewProperties | [inline, static]
CanTearOutTabs(bool value) | TabViewProperties |
CanTearOutTabs() | TabViewProperties |
CanTearOutTabsProperty() | TabViewProperties | [inline, static]
ClearProperties() | TabViewProperties | [static]
CloseButtonOverlayMode(winrt::TabViewCloseButtonOverlayMode const &value) | TabViewProperties |
CloseButtonOverlayMode() | TabViewProperties |
CloseButtonOverlayModeProperty() | TabViewProperties | [inline, static]
EnsureProperties() | TabViewProperties | [static]
ExternalTornOutTabsDropped(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs > const &value) | TabViewProperties |
ExternalTornOutTabsDropped(winrt::event_token const &token) | TabViewProperties |
ExternalTornOutTabsDropping(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs > const &value) | TabViewProperties |
ExternalTornOutTabsDropping(winrt::event_token const &token) | TabViewProperties |
IsAddTabButtonVisible(bool value) | TabViewProperties |
IsAddTabButtonVisible() | TabViewProperties |
IsAddTabButtonVisibleProperty() | TabViewProperties | [inline, static]
m_addTabButtonClickEventSource | TabViewProperties |
m_externalTornOutTabsDroppedEventSource | TabViewProperties |
m_externalTornOutTabsDroppingEventSource | TabViewProperties |
m_selectionChangedEventSource | TabViewProperties |
m_tabCloseRequestedEventSource | TabViewProperties |
m_tabDragCompletedEventSource | TabViewProperties |
m_tabDragStartingEventSource | TabViewProperties |
m_tabDroppedOutsideEventSource | TabViewProperties |
m_tabItemsChangedEventSource | TabViewProperties |
m_tabStripDragOverEventSource | TabViewProperties |
m_tabStripDropEventSource | TabViewProperties |
m_tabTearOutRequestedEventSource | TabViewProperties |
m_tabTearOutWindowRequestedEventSource | TabViewProperties |
OnCanTearOutTabsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnCloseButtonOverlayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnSelectedIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnTabItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnTabWidthModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
s_AddTabButtonCommandParameterProperty | TabViewProperties | [static]
s_AddTabButtonCommandProperty | TabViewProperties | [static]
s_AllowDropTabsProperty | TabViewProperties | [static]
s_CanDragTabsProperty | TabViewProperties | [static]
s_CanReorderTabsProperty | TabViewProperties | [static]
s_CanTearOutTabsProperty | TabViewProperties | [static]
s_CloseButtonOverlayModeProperty | TabViewProperties | [static]
s_IsAddTabButtonVisibleProperty | TabViewProperties | [static]
s_SelectedIndexProperty | TabViewProperties | [static]
s_SelectedItemProperty | TabViewProperties | [static]
s_TabItemsProperty | TabViewProperties | [static]
s_TabItemsSourceProperty | TabViewProperties | [static]
s_TabItemTemplateProperty | TabViewProperties | [static]
s_TabItemTemplateSelectorProperty | TabViewProperties | [static]
s_TabStripFooterProperty | TabViewProperties | [static]
s_TabStripFooterTemplateProperty | TabViewProperties | [static]
s_TabStripHeaderProperty | TabViewProperties | [static]
s_TabStripHeaderTemplateProperty | TabViewProperties | [static]
s_TabWidthModeProperty | TabViewProperties | [static]
SelectedIndex(int value) | TabViewProperties |
SelectedIndex() | TabViewProperties |
SelectedIndexProperty() | TabViewProperties | [inline, static]
SelectedItem(winrt::IInspectable const &value) | TabViewProperties |
SelectedItem() | TabViewProperties |
SelectedItemProperty() | TabViewProperties | [inline, static]
SelectionChanged(winrt::SelectionChangedEventHandler const &value) | TabViewProperties |
SelectionChanged(winrt::event_token const &token) | TabViewProperties |
TabCloseRequested(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs > const &value) | TabViewProperties |
TabCloseRequested(winrt::event_token const &token) | TabViewProperties |
TabDragCompleted(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragCompletedEventArgs > const &value) | TabViewProperties |
TabDragCompleted(winrt::event_token const &token) | TabViewProperties |
TabDragStarting(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragStartingEventArgs > const &value) | TabViewProperties |
TabDragStarting(winrt::event_token const &token) | TabViewProperties |
TabDroppedOutside(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs > const &value) | TabViewProperties |
TabDroppedOutside(winrt::event_token const &token) | TabViewProperties |
TabItems(winrt::IVector< winrt::IInspectable > const &value) | TabViewProperties |
TabItems() | TabViewProperties |
TabItemsChanged(winrt::TypedEventHandler< winrt::TabView, winrt::IVectorChangedEventArgs > const &value) | TabViewProperties |
TabItemsChanged(winrt::event_token const &token) | TabViewProperties |
TabItemsProperty() | TabViewProperties | [inline, static]
TabItemsSource(winrt::IInspectable const &value) | TabViewProperties |
TabItemsSource() | TabViewProperties |
TabItemsSourceProperty() | TabViewProperties | [inline, static]
TabItemTemplate(winrt::DataTemplate const &value) | TabViewProperties |
TabItemTemplate() | TabViewProperties |
TabItemTemplateProperty() | TabViewProperties | [inline, static]
TabItemTemplateSelector(winrt::DataTemplateSelector const &value) | TabViewProperties |
TabItemTemplateSelector() | TabViewProperties |
TabItemTemplateSelectorProperty() | TabViewProperties | [inline, static]
TabStripDragOver(winrt::DragEventHandler const &value) | TabViewProperties |
TabStripDragOver(winrt::event_token const &token) | TabViewProperties |
TabStripDrop(winrt::DragEventHandler const &value) | TabViewProperties |
TabStripDrop(winrt::event_token const &token) | TabViewProperties |
TabStripFooter(winrt::IInspectable const &value) | TabViewProperties |
TabStripFooter() | TabViewProperties |
TabStripFooterProperty() | TabViewProperties | [inline, static]
TabStripFooterTemplate(winrt::DataTemplate const &value) | TabViewProperties |
TabStripFooterTemplate() | TabViewProperties |
TabStripFooterTemplateProperty() | TabViewProperties | [inline, static]
TabStripHeader(winrt::IInspectable const &value) | TabViewProperties |
TabStripHeader() | TabViewProperties |
TabStripHeaderProperty() | TabViewProperties | [inline, static]
TabStripHeaderTemplate(winrt::DataTemplate const &value) | TabViewProperties |
TabStripHeaderTemplate() | TabViewProperties |
TabStripHeaderTemplateProperty() | TabViewProperties | [inline, static]
TabTearOutRequested(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs > const &value) | TabViewProperties |
TabTearOutRequested(winrt::event_token const &token) | TabViewProperties |
TabTearOutWindowRequested(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs > const &value) | TabViewProperties |
TabTearOutWindowRequested(winrt::event_token const &token) | TabViewProperties |
TabViewProperties() | TabViewProperties |
TabWidthMode(winrt::TabViewWidthMode const &value) | TabViewProperties |
TabWidthMode() | TabViewProperties |
TabWidthModeProperty() | TabViewProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ObjectModelTestPage Member List

This is the complete list of members for ObjectModelTestPage, including all inherited members.
_collapsedElements | ObjectModelTestPage | [private]
_colStrings | ObjectModelTestPage | [private]
AppendEventMessage(string eventMessage) | ObjectModelTestPage | [inline, private]
AppendEventMessage(List< string > lstEventMessage) | ObjectModelTestPage | [inline, private]
BtnChangeEvenItemsVisibility_Click(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
BtnChangeOddItemsVisibility_Click(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkItemsRepeaterProperties_IsCheckedChanged(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogs_IsCheckedChanged(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
CmbItemsSource_SelectionChanged(object sender, SelectionChangedEventArgs e) | ObjectModelTestPage | [inline, private]
CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) | ObjectModelTestPage | [inline, private]
CmbLayout_SelectionChanged(object sender, SelectionChangedEventArgs e) | ObjectModelTestPage | [inline, private]
ItemsRepeater_ElementClearing(ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args) | ObjectModelTestPage | [inline, private]
ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | ObjectModelTestPage | [inline, private]
ItemsRepeater_Loaded(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ItemsRepeater_SizeChanged(object sender, SizeChangedEventArgs e) | ObjectModelTestPage | [inline, private]
LogScrollViewInfo() | ObjectModelTestPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ObjectModelTestPage | [inline, private]
ObjectModelTestPage() | ObjectModelTestPage | [inline]
OnNavigatedFrom(NavigationEventArgs e) | ObjectModelTestPage | [inline, protected]
ScrollView_ExtentChanged(ScrollView sender, object args) | ObjectModelTestPage | [inline, private]
ScrollView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ObjectModelTestPage | [inline, private]
ScrollView_GotFocus(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ScrollView_Loaded(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ScrollView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | ObjectModelTestPage | [inline, private]
ScrollView_LostFocus(object sender, RoutedEventArgs e) | ObjectModelTestPage | [inline, private]
ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | ObjectModelTestPage | [inline, private]
ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args) | ObjectModelTestPage | [inline, private]
ScrollView_SizeChanged(object sender, SizeChangedEventArgs e) | ObjectModelTestPage | [inline, private]
ScrollView_StateChanged(ScrollView sender, object args) | ObjectModelTestPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | ObjectModelTestPage | [inline, private]
ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args) | ObjectModelTestPage | [inline, private]
ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args) | ObjectModelTestPage | [inline, private]
~ObjectModelTestPage() | ObjectModelTestPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabView.cpp Source File

  • File List
  • File Members
  • TabView

TabView.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TabView.h"
00007 #include "TabViewItem.h"
00008 #include "TabViewAutomationPeer.h"
00009 #include "DoubleUtil.h"
00010 #include "RuntimeProfiler.h"
00011 #include "ResourceAccessor.h"
00012 #include "SharedHelpers.h"
00013 #include <Vector.h>
00014 #include "velocity.h"
00015 #include <algorithm>
00016 #include <Windowsx.h>
00017 #include <winuser.h>
00018
00019 // This needs to be here instead of in CppWinRTIncludes.h because it includes Microsoft.UI.h,
00020 // which contains definitions of a few types like WindowId that conflict with their definitions
00021 // in Microsoft.UI.Content.h.
00022 #include <winrt\Microsoft.UI.Interop.h>
00023
00024 static constexpr double c_tabMinimumWidth = 48.0;
00025 static constexpr double c_tabMaximumWidth = 200.0;
00026
00027 static constexpr wstring_view c_tabViewItemMinWidthName{ L"TabViewItemMinWidth"sv };
00028 static constexpr wstring_view c_tabViewItemMaxWidthName{ L"TabViewItemMaxWidth"sv };
00029
00030 // TODO: what is the right number and should this be customizable?
00031 static constexpr double c_scrollAmount = 50.0;
00032
00033 // Change to 'true' to turn on debugging outputs in Output window
00034 bool TabViewTrace::s_IsDebugOutputEnabled{ false };
00035 bool TabViewTrace::s_IsVerboseDebugOutputEnabled{ false };
00036
00037 std::list<winrt::weak_ref<winrt::TabView>> TabView::s_tabViewWithTearOutList;
00038 HANDLE TabView::s_tabWithTearOutListMutex = ::CreateMutexW(nullptr, FALSE, nullptr);
00039
00040 TabViewTabTearOutWindowRequestedEventArgs::TabViewTabTearOutWindowRequestedEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab)
00041     : m_items({ item })
00042     , m_tabs({ tab })
00043 {
00044 }
00045
00046 TabViewTabTearOutRequestedEventArgs::TabViewTabTearOutRequestedEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab)
00047     : m_items({ item })
00048     , m_tabs({ tab })
00049 {
00050 }
00051
00052 TabViewExternalTornOutTabsDroppingEventArgs::TabViewExternalTornOutTabsDroppingEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab, int dropIndex)
00053     : m_items({ item })
00054     , m_tabs({ tab })
00055     , m_dropIndex(dropIndex)
00056 {
00057 }
00058
00059 TabViewExternalTornOutTabsDroppedEventArgs::TabViewExternalTornOutTabsDroppedEventArgs(winrt::IInspectable const& item, winrt::UIElement const& tab, int dropIndex)
00060     : m_items({ item })
00061     , m_tabs({ tab })
00062     , m_dropIndex(dropIndex)
00063 {
00064 }
00065
00066 TabView::TabView()
00067 {
00068     __RP_Marker_ClassById(RuntimeProfiler::ProfId_TabView);
00069
00070     auto items = winrt::make<Vector<winrt::IInspectable, MakeVectorParam<VectorFlag::Observable>()>>();
00071     SetValue(s_TabItemsProperty, items);
00072
00073     SetDefaultStyleKey(this);
00074
00075     Loaded({ this, &TabView::OnLoaded });
00076     Unloaded({ this, &TabView::OnUnloaded });
00077
00078     winrt::KeyboardAccelerator ctrlf4Accel;
00079     ctrlf4Accel.Key(winrt::VirtualKey::F4);
00080     ctrlf4Accel.Modifiers(winrt::VirtualKeyModifiers::Control);
00081     ctrlf4Accel.Invoked({ this, &TabView::OnCtrlF4Invoked });
00082     ctrlf4Accel.ScopeOwner(*this);
00083     KeyboardAccelerators().Append(ctrlf4Accel);
00084
00085     m_tabCloseButtonTooltipText = ResourceAccessor::GetLocalizedStringResource(SR_TabViewCloseButtonTooltipWithKA);
00086
00087     winrt::KeyboardAccelerator ctrlTabAccel;
00088     ctrlTabAccel.Key(winrt::VirtualKey::Tab);
00089     ctrlTabAccel.Modifiers(winrt::VirtualKeyModifiers::Control);
00090     ctrlTabAccel.Invoked({ this, &TabView::OnCtrlTabInvoked });
00091     ctrlTabAccel.ScopeOwner(*this);
00092     KeyboardAccelerators().Append(ctrlTabAccel);
00093
00094     winrt::KeyboardAccelerator ctrlShiftTabAccel;
00095     ctrlShiftTabAccel.Key(winrt::VirtualKey::Tab);
00096     ctrlShiftTabAccel.Modifiers(winrt::VirtualKeyModifiers::Control | winrt::VirtualKeyModifiers::Shift);
00097     ctrlShiftTabAccel.Invoked({ this, &TabView::OnCtrlShiftTabInvoked });
00098     ctrlShiftTabAccel.ScopeOwner(*this);
00099     KeyboardAccelerators().Append(ctrlShiftTabAccel);
00100 }
00101
00102 TabView::~TabView()
00103 {
00104     if (m_inputNonClientPointerSource)
00105     {
00106         m_inputNonClientPointerSource.EnteringMoveSize(m_enteringMoveSizeToken);
00107         m_inputNonClientPointerSource.EnteredMoveSize(m_enteredMoveSizeToken);
00108         m_inputNonClientPointerSource.WindowRectChanging(m_windowRectChangingToken);
00109         m_inputNonClientPointerSource.ExitedMoveSize(m_exitedMoveSizeToken);
00110     }
00111 }
00112
00113 void TabView::OnApplyTemplate()
00114 {
00115     UnhookEventsAndClearFields();
00116
00117     m_isItemBeingDragged = false;
00118     m_isItemDraggedOver = false;
00119     m_expandedWidthForDragOver.reset();
00120
00121     winrt::IControlProtected controlProtected{ *this };
00122
00123     m_tabContentPresenter.set(GetTemplateChildT<winrt::ContentPresenter>(L"TabContentPresenter", controlProtected));
00124     m_rightContentPresenter.set(GetTemplateChildT<winrt::ContentPresenter>(L"RightContentPresenter", controlProtected));
00125
00126     m_leftContentColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"LeftContentColumn", controlProtected));
00127     m_tabColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"TabColumn", controlProtected));
00128     m_addButtonColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"AddButtonColumn", controlProtected));
00129     m_rightContentColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(L"RightContentColumn", controlProtected));
00130
00131     if (const auto& containerGrid = GetTemplateChildT<winrt::Grid>(L"TabContainerGrid", controlProtected))
00132     {
00133         m_tabContainerGrid.set(containerGrid);
00134         m_tabStripPointerExitedRevoker = containerGrid.PointerExited(winrt::auto_revoke, { this,&TabView::OnTabStripPointerExited });
00135         m_tabStripPointerEnteredRevoker = containerGrid.PointerEntered(winrt::auto_revoke, { this,&TabView::OnTabStripPointerEntered });
00136     }
00137
00138     m_listView.set([this, controlProtected]() {
00139         auto listView = GetTemplateChildT<winrt::ListView>(L"TabListView", controlProtected);
00140         if (listView)
00141         {
00142             m_listViewLoadedRevoker = listView.Loaded(winrt::auto_revoke, { this, &TabView::OnListViewLoaded });
00143             m_listViewSelectionChangedRevoker = listView.SelectionChanged(winrt::auto_revoke, { this, &TabView::OnListViewSelectionChanged });
00144             m_listViewSizeChangedRevoker = listView.SizeChanged(winrt::auto_revoke, { this, &TabView::OnListViewSizeChanged });
00145
00146             m_listViewDragItemsStartingRevoker = listView.DragItemsStarting(winrt::auto_revoke, { this, &TabView::OnListViewDragItemsStarting });
00147             m_listViewDragItemsCompletedRevoker = listView.DragItemsCompleted(winrt::auto_revoke, { this, &TabView::OnListViewDragItemsCompleted });
00148             m_listViewDragOverRevoker = listView.DragOver(winrt::auto_revoke, { this, &TabView::OnListViewDragOver });
00149
00150             m_listViewDropRevoker = AddRoutedEventHandler<RoutedEventType::Drop>(
00151                 listView,
00152                 { this, &TabView::OnListViewDrop },
00153                 true /* handledEventsToo */);
00154             m_listViewDragEnterRevoker = AddRoutedEventHandler<RoutedEventType::DragEnter>(
00155                 listView,
00156                 { this, &TabView::OnListViewDragEnter },
00157                 true /* handledEventsToo */);
00158             m_listViewDragLeaveRevoker = AddRoutedEventHandler<RoutedEventType::DragLeave>(
00159                 listView,
00160                 { this, &TabView::OnListViewDragLeave },
00161                 true /* handledEventsToo */);
00162
00163             m_listViewGettingFocusRevoker = listView.GettingFocus(winrt::auto_revoke, { this, &TabView::OnListViewGettingFocus });
00164
00165             m_listViewCanReorderItemsPropertyChangedRevoker = RegisterPropertyChanged(listView, winrt::ListViewBase::CanReorderItemsProperty(), { this, &TabView::OnListViewDraggingPropertyChanged });
00166             m_listViewAllowDropPropertyChangedRevoker = RegisterPropertyChanged(listView, winrt::UIElement::AllowDropProperty(), { this, &TabView::OnListViewDraggingPropertyChanged });
00167         }
00168         return listView;
00169     }());
00170
00171     m_addButton.set([this, controlProtected]() {
00172         auto addButton = GetTemplateChildT<winrt::Button>(L"AddButton", controlProtected);
00173         if (addButton)
00174         {
00175             // Do localization for the add button
00176             if (winrt::AutomationProperties::GetName(addButton).empty())
00177             {
00178                 auto addButtonName = ResourceAccessor::GetLocalizedStringResource(SR_TabViewAddButtonName);
00179                 winrt::AutomationProperties::SetName(addButton, addButtonName);
00180             }
00181
00182             auto toolTip = winrt::ToolTipService::GetToolTip(addButton);
00183             if (!toolTip)
00184             {
00185                 winrt::ToolTip tooltip = winrt::ToolTip();
00186                 tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TabViewAddButtonTooltip)));
00187                 winrt::ToolTipService::SetToolTip(addButton, tooltip);
00188             }
00189
00190             m_addButtonClickRevoker = addButton.Click(winrt::auto_revoke, { this, &TabView::OnAddButtonClick });
00191             m_addButtonKeyDownRevoker = addButton.KeyDown(winrt::auto_revoke, { this, &TabView::OnAddButtonKeyDown });
00192         }
00193         return addButton;
00194     }());
00195
00196     UpdateListViewItemContainerTransitions();
00197 }
00198
00199
00200 void TabView::SetTabSeparatorOpacity(int index, int opacityValue)
00201 {
00202     if (const auto tvi = ContainerFromIndex(index).try_as<winrt::TabViewItem>())
00203     {
00204         // The reason we set the opacity directly instead of using VisualState
00205         // is because we want to hide the separator on hover/pressed
00206         // but the tab adjacent on the left to the selected tab
00207         // must hide the tab separator at all times.
00208         // It causes two visual states to modify the same property
00209         // what leads to undesired behaviour.
00210         if (const auto tabSeparator = tvi.GetTemplateChild(L"TabSeparator").try_as<winrt::FrameworkElement>())
00211         {
00212             tabSeparator.Opacity(opacityValue);
00213         }
00214     }
00215 }
00216
00217
00218 void TabView::SetTabSeparatorOpacity(int index)
00219 {
00220     const auto selectedIndex = SelectedIndex();
00221
00222     // If Tab is adjacent on the left to selected one or
00223     // it is selected tab - we hide the tabSeparator.
00224     if (index == selectedIndex || index + 1 == selectedIndex)
00225     {
00226         SetTabSeparatorOpacity(index, 0);
00227     }
00228     else
00229     {
00230         SetTabSeparatorOpacity(index, 1);
00231     }
00232 }
00233
00234
00235 void TabView::OnListViewDraggingPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00236 {
00237     UpdateListViewItemContainerTransitions();
00238 }
00239
00240 void TabView::OnListViewGettingFocus(const winrt::IInspectable& sender, const winrt::GettingFocusEventArgs& args)
00241 {
00242     // TabViewItems overlap each other by one pixel in order to get the desired visuals for the separator.
00243     // This causes problems with 2d focus navigation. Because the items overlap, pressing Down or Up from a
00244     // TabViewItem navigates to the overlapping item which is not desired.
00245     //
00246     // To resolve this issue, we detect the case where Up or Down focus navigation moves from one TabViewItem
00247     // to another.
00248     // How we handle it, depends on the input device.
00249     // For GamePad, we want to move focus to something in the direction of movement (other than the overlapping item)
00250     // For Keyboard, we cancel the focus movement.
00251
00252     const auto direction = args.Direction();
00253     if (direction == winrt::FocusNavigationDirection::Up || direction == winrt::FocusNavigationDirection::Down)
00254     {
00255         auto oldItem = args.OldFocusedElement().try_as<winrt::TabViewItem>();
00256         auto newItem = args.NewFocusedElement().try_as<winrt::TabViewItem>();
00257         if (oldItem && newItem)
00258         {
00259             if (auto&& listView = m_listView.get())
00260             {
00261                 bool oldItemIsFromThisTabView = listView.IndexFromContainer(oldItem) != -1;
00262                 bool newItemIsFromThisTabView = listView.IndexFromContainer(newItem) != -1;
00263                 if (oldItemIsFromThisTabView && newItemIsFromThisTabView)
00264                 {
00265                     const auto inputDevice = args.InputDevice();
00266                     if (inputDevice == winrt::FocusInputDeviceKind::GameController)
00267                     {
00268                         const auto listViewBoundsLocal = winrt::Rect{ 0, 0, static_cast<float>(listView.ActualWidth()), static_cast<float>(listView.ActualHeight()) };
00269                         const auto listViewBounds = listView.TransformToVisual(nullptr).TransformBounds(listViewBoundsLocal);
00270                         const winrt::FindNextElementOptions options;
00271                         options.ExclusionRect(listViewBounds);
00272                         options.SearchRoot(this->XamlRoot().Content());
00273                         const auto next = winrt::FocusManager::FindNextElement(direction, options);
00274
00275                         args.TrySetNewFocusedElement(next);
00276                         args.Handled(true);
00277                     }
00278                     else
00279                     {
00280                         args.Cancel(true);
00281                         args.Handled(true);
00282                     }
00283                 }
00284             }
00285         }
00286     }
00287 }
00288
00289 void TabView::OnSelectedIndexPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00290 {
00291     // We update previous selected and adjacent on the left tab
00292     // as well as current selected and adjacent on the left tab
00293     // to show/hide tabSeparator accordingly.
00294     UpdateSelectedIndex();
00295     SetTabSeparatorOpacity(winrt::unbox_value<int>(args.OldValue()));
00296     SetTabSeparatorOpacity(winrt::unbox_value<int>(args.OldValue()) - 1);
00297     SetTabSeparatorOpacity(SelectedIndex() - 1);
00298     SetTabSeparatorOpacity(SelectedIndex());
00299
00300     UpdateBottomBorderLineVisualStates();
00301 }
00302
00303 void TabView::UpdateTabBottomBorderLineVisualStates()
00304 {
00305     const int numItems = static_cast<int>(TabItems().Size());
00306     const int selectedIndex = SelectedIndex();
00307
00308     for (int i = 0; i < numItems; i++)
00309     {
00310         auto state = L"NormalBottomBorderLine";
00311         if (m_isItemBeingDragged)
00312         {
00313             state = L"NoBottomBorderLine";
00314         }
00315         else if (selectedIndex != -1)
00316         {
00317             if (i == selectedIndex)
00318             {
00319                 state = L"NoBottomBorderLine";
00320             }
00321             else if (i == selectedIndex - 1)
00322             {
00323                 state = L"LeftOfSelectedTab";
00324             }
00325             else if (i == selectedIndex + 1)
00326             {
00327                 state = L"RightOfSelectedTab";
00328             }
00329         }
00330
00331         if (const auto tvi = ContainerFromIndex(i).try_as<winrt::Control>())
00332         {
00333             winrt::VisualStateManager::GoToState(tvi, state, false /*useTransitions*/);
00334         }
00335     }
00336 }
00337
00338 void TabView::UpdateBottomBorderLineVisualStates()
00339 {
00340     // Update border line on all tabs
00341     UpdateTabBottomBorderLineVisualStates();
00342
00343     // Update border lines on the TabView
00344     winrt::VisualStateManager::GoToState(*this, m_isItemBeingDragged ? L"SingleBottomBorderLine" : L"NormalBottomBorderLine", false /*useTransitions*/);
00345
00346     // Update border lines in the inner TabViewListView
00347     if (const auto lv = m_listView.get())
00348     {
00349         winrt::VisualStateManager::GoToState(lv, m_isItemBeingDragged ? L"NoBottomBorderLine" : L"NormalBottomBorderLine", false /*useTransitions*/);
00350     }
00351
00352     // Update border lines in the ScrollViewer
00353     if (const auto scroller = m_scrollViewer.get())
00354     {
00355         winrt::VisualStateManager::GoToState(scroller, m_isItemBeingDragged ? L"NoBottomBorderLine" : L"NormalBottomBorderLine", false /*useTransitions*/);
00356     }
00357 }
00358
00359 void TabView::OnSelectedItemPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00360 {
00361     UpdateSelectedItem();
00362 }
00363
00364 void TabView::OnTabItemsSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00365 {
00366     UpdateListViewItemContainerTransitions();
00367 }
00368
00369 void TabView::UpdateListViewItemContainerTransitions()
00370 {
00371     if (TabItemsSource())
00372     {
00373         if (auto&& listView = m_listView.get())
00374         {
00375             if (listView.CanReorderItems() && listView.AllowDrop())
00376             {
00377                 // Remove all the AddDeleteThemeTransition/ContentThemeTransition instances in the inner ListView's ItemContainerTransitions
00378                 // collection to avoid attempting to reparent a tab's content while it is still parented during a tab reordering user gesture.
00379                 // This is only required when:
00380                 //  - the TabViewItem' contents are databound to UIElements (this condition is not being checked below though).
00381                 //  - System animations turned on (this condition is not being checked below though to maximize behavior consistency).
00382                 //  - TabViewItem reordering is turned on.
00383                 // With all those conditions met, the databound UIElements are still parented to the old item container as the tab is being dropped in
00384                 // its new location. Without animations, the old item container is already put into the recycling pool and picked as the new container.
00385                 // Its ContentControl.Content is kept unchanged and no reparenting is attempted.
00386                 // Because the default ItemContainerTransitions collection is defined in the TabViewListView style, all ListView instances share the same
00387                 // collection by default. Thus to avoid one TabView affecting all other ones, a new ItemContainerTransitions collection is created
00388                 // when the original one contains an AddDeleteThemeTransition or ContentThemeTransition instance.
00389                 bool transitionCollectionHasAddDeleteOrContentThemeTransition = [listView]()
00390                 {
00391                     if (auto itemContainerTransitions = listView.ItemContainerTransitions())
00392                     {
00393                         for (auto&& transition : itemContainerTransitions)
00394                         {
00395                             if (transition &&
00396                                 (transition.try_as<winrt::AddDeleteThemeTransition>() || transition.try_as<winrt::ContentThemeTransition>()))
00397                             {
00398                                 return true;
00399                             }
00400                         }
00401                     }
00402                     return false;
00403                 }();
00404
00405                 if (transitionCollectionHasAddDeleteOrContentThemeTransition)
00406                 {
00407                     auto const newItemContainerTransitions = winrt::TransitionCollection();
00408                     auto const oldItemContainerTransitions = listView.ItemContainerTransitions();
00409
00410                     for (auto&& transition : oldItemContainerTransitions)
00411                     {
00412                         if (transition)
00413                         {
00414                             if (transition.try_as<winrt::AddDeleteThemeTransition>() || transition.try_as<winrt::ContentThemeTransition>())
00415                             {
00416                                 continue;
00417                             }
00418                             newItemContainerTransitions.Append(transition);
00419                         }
00420                     }
00421
00422                     listView.ItemContainerTransitions(newItemContainerTransitions);
00423                 }
00424             }
00425         }
00426     }
00427 }
00428
00429 void TabView::OnCanTearOutTabsPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00430 {
00431     UpdateTabViewWithTearOutList();
00432     AttachMoveSizeLoopEvents();
00433     UpdateNonClientRegion();
00434 }
00435
00436 void TabView::UnhookEventsAndClearFields()
00437 {
00438     m_listViewLoadedRevoker.revoke();
00439     m_listViewSelectionChangedRevoker.revoke();
00440     m_listViewDragItemsStartingRevoker.revoke();
00441     m_listViewDragItemsCompletedRevoker.revoke();
00442     m_listViewDragOverRevoker.revoke();
00443     m_listViewGettingFocusRevoker.revoke();
00444     m_listViewCanReorderItemsPropertyChangedRevoker.revoke();
00445     m_listViewAllowDropPropertyChangedRevoker.revoke();
00446     m_addButtonClickRevoker.revoke();
00447     m_itemsPresenterSizeChangedRevoker.revoke();
00448     m_tabStripPointerExitedRevoker.revoke();
00449     m_tabStripPointerEnteredRevoker.revoke();
00450     m_scrollViewerLoadedRevoker.revoke();
00451     m_scrollViewerViewChangedRevoker.revoke();
00452     m_scrollDecreaseClickRevoker.revoke();
00453     m_scrollIncreaseClickRevoker.revoke();
00454     m_addButtonKeyDownRevoker.revoke();
00455
00456     m_tabContentPresenter.set(nullptr);
00457     m_rightContentPresenter.set(nullptr);
00458     m_leftContentColumn.set(nullptr);
00459     m_tabColumn.set(nullptr);
00460     m_addButtonColumn.set(nullptr);
00461     m_rightContentColumn.set(nullptr);
00462     m_tabContainerGrid.set(nullptr);
00463     m_listView.set(nullptr);
00464     m_addButton.set(nullptr);
00465     m_itemsPresenter.set(nullptr);
00466     m_scrollViewer.set(nullptr);
00467     m_scrollDecreaseButton.set(nullptr);
00468     m_scrollIncreaseButton.set(nullptr);
00469 }
00470
00471 void TabView::OnTabWidthModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00472 {
00473     UpdateTabWidths();
00474
00475     // Switch the visual states of all tab items to the correct TabViewWidthMode
00476     for (auto&& item : TabItems())
00477     {
00478         auto const tvi = [item, this]()
00479         {
00480             if (auto tabViewItem = item.try_as<TabViewItem>())
00481             {
00482                 return tabViewItem;
00483             }
00484             return ContainerFromItem(item).try_as<TabViewItem>();
00485         }();
00486
00487         if (tvi)
00488         {
00489             tvi->OnTabViewWidthModeChanged(TabWidthMode());
00490         }
00491     }
00492 }
00493
00494 void TabView::OnCloseButtonOverlayModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00495 {
00496     // Switch the visual states of all tab items to to the correct closebutton overlay mode
00497     for (auto&& item : TabItems())
00498     {
00499         auto const tvi = [item, this]()
00500         {
00501             if (auto tabViewItem = item.try_as<TabViewItem>())
00502             {
00503                 return tabViewItem;
00504             }
00505             return ContainerFromItem(item).try_as<TabViewItem>();
00506         }();
00507
00508         if (tvi)
00509         {
00510             tvi->OnCloseButtonOverlayModeChanged(CloseButtonOverlayMode());
00511         }
00512     }
00513 }
00514
00515 void TabView::OnAddButtonClick(const winrt::IInspectable&, const winrt::RoutedEventArgs& args)
00516 {
00517     m_addTabButtonClickEventSource(*this, args);
00518 }
00519
00520 winrt::AutomationPeer TabView::OnCreateAutomationPeer()
00521 {
00522     return winrt::make<TabViewAutomationPeer>(*this);
00523 }
00524
00525 void TabView::OnLoaded(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
00526 {
00527     UpdateTabContent();
00528     UpdateTabViewWithTearOutList();
00529     AttachMoveSizeLoopEvents();
00530     UpdateNonClientRegion();
00531 }
00532
00533 void TabView::OnUnloaded(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
00534 {
00535     UpdateTabViewWithTearOutList();
00536 }
00537
00538 void TabView::OnListViewLoaded(const winrt::IInspectable&, const winrt::RoutedEventArgs& args)
00539 {
00540     if (auto&& listView = m_listView.get())
00541     {
00542         // Now that ListView exists, we can start using its Items collection.
00543         if (auto const lvItems = listView.Items())
00544         {
00545             if (!listView.ItemsSource())
00546             {
00547                 // copy the list, because clearing lvItems may also clear TabItems
00548                 winrt::IVector<winrt::IInspectable> const itemList{ winrt::single_threaded_vector<winrt::IInspectable>() };
00549
00550                 for (auto const item : TabItems())
00551                 {
00552                     itemList.Append(item);
00553                 }
00554
00555                 lvItems.Clear();
00556
00557                 for (auto const item : itemList)
00558                 {
00559                     // App put items in our Items collection; copy them over to ListView.Items
00560                     if (item)
00561                     {
00562                         lvItems.Append(item);
00563                     }
00564                 }
00565             }
00566             TabItems(lvItems);
00567         }
00568
00569         if (ReadLocalValue(s_SelectedItemProperty) != winrt::DependencyProperty::UnsetValue())
00570         {
00571             UpdateSelectedItem();
00572         }
00573         else
00574         {
00575             // If SelectedItem wasn't set, default to selecting the first tab
00576             UpdateSelectedIndex();
00577         }
00578
00579         SelectedIndex(listView.SelectedIndex());
00580         SelectedItem(listView.SelectedItem());
00581
00582         // Find TabsItemsPresenter and listen for SizeChanged
00583         m_itemsPresenter.set([this, listView]() {
00584             auto itemsPresenter = SharedHelpers::FindInVisualTreeByName(listView, L"TabsItemsPresenter").as<winrt::ItemsPresenter>();
00585             if (itemsPresenter)
00586             {
00587                 m_itemsPresenterSizeChangedRevoker = itemsPresenter.SizeChanged(winrt::auto_revoke, { this, &TabView::OnItemsPresenterSizeChanged });
00588             }
00589             return itemsPresenter;
00590             }());
00591
00592         auto scrollViewer = SharedHelpers::FindInVisualTreeByName(listView, L"ScrollViewer").as<winrt::FxScrollViewer>();
00593         m_scrollViewer.set(scrollViewer);
00594         if (scrollViewer)
00595         {
00596             if (scrollViewer.IsLoaded())
00597             {
00598                 // This scenario occurs reliably for Terminal in XAML islands
00599                 OnScrollViewerLoaded(nullptr, nullptr);
00600             }
00601             else
00602             {
00603                 m_scrollViewerLoadedRevoker = scrollViewer.Loaded(winrt::auto_revoke, { this, &TabView::OnScrollViewerLoaded });
00604             }
00605         }
00606     }
00607
00608     UpdateBottomBorderLineVisualStates();
00609     UpdateNonClientRegion();
00610 }
00611
00612 void TabView::OnTabStripPointerExited(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args)
00613 {
00614     m_pointerInTabstrip = false;
00615     if (m_updateTabWidthOnPointerLeave)
00616     {
00617         auto scopeGuard = gsl::finally([this]()
00618         {
00619             m_updateTabWidthOnPointerLeave = false;
00620         });
00621         UpdateTabWidths();
00622     }
00623 }
00624
00625 void TabView::OnTabStripPointerEntered(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args)
00626 {
00627     m_pointerInTabstrip = true;
00628 }
00629
00630 void TabView::OnScrollViewerLoaded(const winrt::IInspectable&, const winrt::RoutedEventArgs& args)
00631 {
00632     if (auto&& scrollViewer = m_scrollViewer.get())
00633     {
00634         m_scrollDecreaseButton.set([this, scrollViewer]() {
00635             const auto decreaseButton = SharedHelpers::FindInVisualTreeByName(scrollViewer, L"ScrollDecreaseButton").as<winrt::RepeatButton>();
00636             if (decreaseButton)
00637             {
00638                 // Do localization for the scroll decrease button
00639                 const auto toolTip = winrt::ToolTipService::GetToolTip(decreaseButton);
00640                 if (!toolTip)
00641                 {
00642                     const auto tooltip = winrt::ToolTip();
00643                     tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TabViewScrollDecreaseButtonTooltip)));
00644                     winrt::ToolTipService::SetToolTip(decreaseButton, tooltip);
00645                 }
00646
00647                 m_scrollDecreaseClickRevoker = decreaseButton.Click(winrt::auto_revoke, { this, &TabView::OnScrollDecreaseClick });
00648             }
00649             return decreaseButton;
00650         }());
00651
00652         m_scrollIncreaseButton.set([this, scrollViewer]() {
00653             const auto increaseButton = SharedHelpers::FindInVisualTreeByName(scrollViewer, L"ScrollIncreaseButton").as<winrt::RepeatButton>();
00654             if (increaseButton)
00655             {
00656                 // Do localization for the scroll increase button
00657                 const auto toolTip = winrt::ToolTipService::GetToolTip(increaseButton);
00658                 if (!toolTip)
00659                 {
00660                     const auto tooltip = winrt::ToolTip();
00661                     tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TabViewScrollIncreaseButtonTooltip)));
00662                     winrt::ToolTipService::SetToolTip(increaseButton, tooltip);
00663                 }
00664
00665                 m_scrollIncreaseClickRevoker = increaseButton.Click(winrt::auto_revoke, { this, &TabView::OnScrollIncreaseClick });
00666             }
00667             return increaseButton;
00668         }());
00669
00670         m_scrollViewerViewChangedRevoker = scrollViewer.ViewChanged(winrt::auto_revoke, { this, &TabView::OnScrollViewerViewChanged });
00671     }
00672
00673     UpdateTabWidths();
00674 }
00675
00676 void TabView::OnScrollViewerViewChanged(winrt::IInspectable const& sender, winrt::ScrollViewerViewChangedEventArgs const& args)
00677 {
00678     UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
00679 }
00680
00681 void TabView::UpdateScrollViewerDecreaseAndIncreaseButtonsViewState()
00682 {
00683     if (auto&& scrollViewer = m_scrollViewer.get())
00684     {
00685         auto&& decreaseButton = m_scrollDecreaseButton.get();
00686         auto&& increaseButton = m_scrollIncreaseButton.get();
00687
00688         constexpr auto minThreshold = 0.1;
00689         const auto horizontalOffset = scrollViewer.HorizontalOffset();
00690         const auto scrollableWidth = scrollViewer.ScrollableWidth();
00691
00692         if (abs(horizontalOffset - scrollableWidth) < minThreshold)
00693         {
00694             if (decreaseButton)
00695             {
00696                 decreaseButton.IsEnabled(true);
00697             }
00698             if (increaseButton)
00699             {
00700                 increaseButton.IsEnabled(false);
00701             }
00702         }
00703         else if (abs(horizontalOffset) < minThreshold)
00704         {
00705             if (decreaseButton)
00706             {
00707                 decreaseButton.IsEnabled(false);
00708             }
00709             if (increaseButton)
00710             {
00711                 increaseButton.IsEnabled(true);
00712             }
00713         }
00714         else
00715         {
00716             if (decreaseButton)
00717             {
00718                 decreaseButton.IsEnabled(true);
00719             }
00720             if (increaseButton)
00721             {
00722                 increaseButton.IsEnabled(true);
00723             }
00724         }
00725     }
00726 }
00727
00728 void TabView::OnItemsPresenterSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args)
00729 {
00730     if (!m_updateTabWidthOnPointerLeave)
00731     {
00732         // Presenter size didn't change because of item being removed, so update manually
00733         UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
00734         UpdateTabWidths();
00735         // Make sure that the selected tab is fully in view and not cut off
00736         BringSelectedTabIntoView();
00737     }
00738 }
00739
00740 void TabView::BringSelectedTabIntoView()
00741 {
00742     if (SelectedItem())
00743     {
00744         auto tvi = SelectedItem().try_as<winrt::TabViewItem>();
00745         if (!tvi)
00746         {
00747             tvi = ContainerFromItem(SelectedItem()).try_as<winrt::TabViewItem>();
00748         }
00749         if (tvi)
00750         {
00751             winrt::get_self<TabViewItem>(tvi)->StartBringTabIntoView();
00752         }
00753     }
00754 }
00755
00756 void TabView::OnItemsChanged(winrt::IInspectable const& item)
00757 {
00758     if (auto args = item.as<winrt::IVectorChangedEventArgs>())
00759     {
00760         m_tabItemsChangedEventSource(*this, args);
00761
00762         int numItems = static_cast<int>(TabItems().Size());
00763         const auto listViewInnerSelectedIndex = m_listView.get().SelectedIndex();
00764         auto selectedIndex = SelectedIndex();
00765
00766         if (selectedIndex != listViewInnerSelectedIndex && listViewInnerSelectedIndex != -1)
00767         {
00768             SelectedIndex(listViewInnerSelectedIndex);
00769             selectedIndex = listViewInnerSelectedIndex;
00770         }
00771
00772         if (args.CollectionChange() == winrt::CollectionChange::ItemRemoved)
00773         {
00774             m_updateTabWidthOnPointerLeave = true;
00775             if (numItems > 0)
00776             {
00777                 // SelectedIndex might also already be -1
00778                 if (selectedIndex == -1 || selectedIndex == static_cast<int32_t>(args.Index()))
00779                 {
00780                     // Find the closest tab to select instead.
00781                     int startIndex = static_cast<int>(args.Index());
00782                     if (startIndex >= numItems)
00783                     {
00784                         startIndex = numItems - 1;
00785                     }
00786                     int index = startIndex;
00787
00788                     do
00789                     {
00790                         const auto nextItem = ContainerFromIndex(index).as<winrt::ListViewItem>();
00791
00792                         if (nextItem && nextItem.IsEnabled() && nextItem.Visibility() == winrt::Visibility::Visible)
00793                         {
00794                             SelectedItem(TabItems().GetAt(index));
00795                             break;
00796                         }
00797
00798                         // try the next item
00799                         index++;
00800                         if (index >= numItems)
00801                         {
00802                             index = 0;
00803                         }
00804                     } while (index != startIndex);
00805                 }
00806
00807             }
00808             if (TabWidthMode() == winrt::TabViewWidthMode::Equal)
00809             {
00810                 if (!m_pointerInTabstrip || args.Index() == TabItems().Size())
00811                 {
00812                     UpdateTabWidths(true, false);
00813                 }
00814             }
00815         }
00816         else
00817         {
00818             UpdateTabWidths();
00819             SetTabSeparatorOpacity(numItems - 1);
00820         }
00821     }
00822
00823     UpdateBottomBorderLineVisualStates();
00824 }
00825
00826 void TabView::OnListViewSelectionChanged(const winrt::IInspectable& sender, const winrt::SelectionChangedEventArgs& args)
00827 {
00828     if (auto&& listView = m_listView.get())
00829     {
00830         SelectedIndex(listView.SelectedIndex());
00831         SelectedItem(listView.SelectedItem());
00832     }
00833
00834     UpdateTabContent();
00835
00836     m_selectionChangedEventSource(*this, args);
00837 }
00838
00839 void TabView::OnListViewSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args)
00840 {
00841     UpdateNonClientRegion();
00842 }
00843
00844 winrt::TabViewItem TabView::FindTabViewItemFromDragItem(const winrt::IInspectable& item)
00845 {
00846     auto tab = ContainerFromItem(item).try_as<winrt::TabViewItem>();
00847
00848     if (!tab)
00849     {
00850         if (auto fe = item.try_as<winrt::FrameworkElement>())
00851         {
00852             tab = winrt::VisualTreeHelper::GetParent(fe).try_as<winrt::TabViewItem>();
00853         }
00854     }
00855
00856     if (!tab)
00857     {
00858         // This is a fallback scenario for tabs without a data context
00859         auto numItems = static_cast<int>(TabItems().Size());
00860         for (int i = 0; i < numItems; i++)
00861         {
00862             if (auto tabItem = ContainerFromIndex(i).try_as<winrt::TabViewItem>())
00863             {
00864                 if (tabItem.Content() == item)
00865                 {
00866                     tab = tabItem;
00867                     break;
00868                 }
00869             }
00870         }
00871     }
00872
00873     return tab;
00874 }
00875
00876 void TabView::OnListViewDragItemsStarting(const winrt::IInspectable& sender, const winrt::DragItemsStartingEventArgs& args)
00877 {
00878     m_isItemBeingDragged = true;
00879
00880     auto item = args.Items().GetAt(0);
00881     auto tab = FindTabViewItemFromDragItem(item);
00882     auto myArgs = winrt::make_self<TabViewTabDragStartingEventArgs>(args, item, tab);
00883
00884     m_tabDragStartingEventSource(*this, *myArgs);
00885
00886     UpdateBottomBorderLineVisualStates();
00887 }
00888
00889 void TabView::OnListViewDragOver(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
00890 {
00891     m_tabStripDragOverEventSource(*this, args);
00892 }
00893
00894 void TabView::OnListViewDrop(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
00895 {
00896     if (!args.Handled())
00897     {
00898         m_tabStripDropEventSource(*this, args);
00899     }
00900
00901     UpdateIsItemDraggedOver(false);
00902 }
00903
00904 void TabView::OnListViewDragEnter(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
00905 {
00906     // DragEnter can occur when we're dragging an item from within this TabView,
00907     // which will be handled internally.  In that case, we don't want to do anything here.
00908     for (auto&& tabItem : TabItems())
00909     {
00910         if (auto tabViewItem = ContainerFromItem(tabItem).try_as<winrt::TabViewItem>())
00911         {
00912             if (winrt::get_self<TabViewItem>(tabViewItem)->IsBeingDragged())
00913             {
00914                 return;
00915             }
00916         }
00917     }
00918
00919     UpdateIsItemDraggedOver(true);
00920 }
00921
00922 void TabView::OnListViewDragLeave(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
00923 {
00924     UpdateIsItemDraggedOver(false);
00925 }
00926
00927 void TabView::OnListViewDragItemsCompleted(const winrt::IInspectable& sender, const winrt::DragItemsCompletedEventArgs& args)
00928 {
00929     m_isItemBeingDragged = false;
00930
00931     // Selection may have changed during drag if dragged outside, so we update SelectedIndex again.
00932     if (auto&& listView = m_listView.get())
00933     {
00934         SelectedIndex(listView.SelectedIndex());
00935         SelectedItem(listView.SelectedItem());
00936
00937         BringSelectedTabIntoView();
00938     }
00939
00940     auto item = args.Items().GetAt(0);
00941     auto tab = FindTabViewItemFromDragItem(item);
00942     auto myArgs = winrt::make_self<TabViewTabDragCompletedEventArgs>(args, item, tab);
00943
00944     m_tabDragCompletedEventSource(*this, *myArgs);
00945
00946     // None means it's outside of the tab strip area
00947     if (args.DropResult() == winrt::DataPackageOperation::None)
00948     {
00949         auto tabDroppedArgs = winrt::make_self<TabViewTabDroppedOutsideEventArgs>(item, tab);
00950         m_tabDroppedOutsideEventSource(*this, *tabDroppedArgs);
00951     }
00952
00953     UpdateBottomBorderLineVisualStates();
00954 }
00955
00956 void TabView::UpdateTabContent()
00957 {
00958     if (auto&& tabContentPresenter = m_tabContentPresenter.get())
00959     {
00960         if (!SelectedItem())
00961         {
00962             tabContentPresenter.Content(nullptr);
00963             tabContentPresenter.ContentTemplate(nullptr);
00964             tabContentPresenter.ContentTemplateSelector(nullptr);
00965         }
00966         else
00967         {
00968             auto tvi = SelectedItem().try_as<winrt::TabViewItem>();
00969             if (!tvi)
00970             {
00971                 tvi = ContainerFromItem(SelectedItem()).try_as<winrt::TabViewItem>();
00972             }
00973
00974             if (tvi)
00975             {
00976                 // If the focus was in the old tab content, we will lose focus when it is removed from the visual tree.
00977                 // We should move the focus to the new tab content.
00978                 // The new tab content is not available at the time of the LosingFocus event, so we need to
00979                 // move focus later.
00980                 bool shouldMoveFocusToNewTab = false;
00981                 auto revoker = tabContentPresenter.LosingFocus(winrt::auto_revoke, [&shouldMoveFocusToNewTab](const winrt::IInspectable&, const winrt::LosingFocusEventArgs& args)
00982                 {
00983                     shouldMoveFocusToNewTab = true;
00984                 });
00985
00986                 tabContentPresenter.Content(tvi.Content());
00987                 tabContentPresenter.ContentTemplate(tvi.ContentTemplate());
00988                 tabContentPresenter.ContentTemplateSelector(tvi.ContentTemplateSelector());
00989
00990                 if (shouldMoveFocusToNewTab)
00991                 {
00992                     auto focusable = winrt::FocusManager::FindFirstFocusableElement(tabContentPresenter);
00993                     if (!focusable)
00994                     {
00995                         // If there is nothing focusable in the new tab, just move focus to the TabViewItem itself.
00996                         focusable = tvi;
00997                     }
00998
00999                     if (focusable)
01000                     {
01001                         SetFocus(focusable, winrt::FocusState::Programmatic);
01002                     }
01003                 }
01004             }
01005         }
01006     }
01007 }
01008
01009 void TabView::RequestCloseTab(winrt::TabViewItem const& container, bool updateTabWidths)
01010 {
01011     // If the tab being closed is the currently focused tab, we'll move focus to the next tab
01012     // when the tab closes.
01013     bool tabIsFocused = false;
01014     auto focusedElement{ winrt::FocusManager::GetFocusedElement() ? winrt::FocusManager::GetFocusedElement().try_as<winrt::DependencyObject>() : nullptr };
01015
01016     while (focusedElement)
01017     {
01018         if (focusedElement == container)
01019         {
01020             tabIsFocused = true;
01021             break;
01022         }
01023
01024         focusedElement = winrt::VisualTreeHelper::GetParent(focusedElement);
01025     }
01026
01027     winrt::UIElement::LosingFocus_revoker losingFocusRevoker{};
01028
01029     if (tabIsFocused)
01030     {
01031         // If the tab specified both is focused and loses focus, then we'll move focus to an adjacent focusable tab, if one exists.
01032         losingFocusRevoker = container.LosingFocus(winrt::auto_revoke, [&](const winrt::IInspectable&, const winrt::LosingFocusEventArgs& args)
01033             {
01034                 if (!args.Cancel() && !args.Handled())
01035                 {
01036                     int focusedIndex = IndexFromContainer(container);
01037                     winrt::DependencyObject newFocusedElement{ nullptr };
01038
01039                     for (int i = focusedIndex + 1; i < GetItemCount(); i++)
01040                     {
01041                         auto candidateElement = ContainerFromIndex(i);
01042
01043                         if (IsFocusable(candidateElement))
01044                         {
01045                             newFocusedElement = candidateElement;
01046                             break;
01047                         }
01048                     }
01049
01050                     if (!newFocusedElement)
01051                     {
01052                         for (int i = focusedIndex - 1; i >= 0; i--)
01053                         {
01054                             auto candidateElement = ContainerFromIndex(i);
01055
01056                             if (IsFocusable(candidateElement))
01057                             {
01058                                 newFocusedElement = candidateElement;
01059                                 break;
01060                             }
01061                         }
01062                     }
01063
01064                     if (!newFocusedElement)
01065                     {
01066                         newFocusedElement = m_addButton.get();
01067                     }
01068
01069                     args.Handled(args.TrySetNewFocusedElement(newFocusedElement));
01070                 }
01071             });
01072     }
01073
01074     if (auto&& listView = m_listView.get())
01075     {
01076         auto args = winrt::make_self<TabViewTabCloseRequestedEventArgs>(listView.ItemFromContainer(container), container);
01077
01078         m_tabCloseRequestedEventSource(*this, *args);
01079
01080         if (auto internalTabViewItem = winrt::get_self<TabViewItem>(container))
01081         {
01082             internalTabViewItem->RaiseRequestClose(*args);
01083         }
01084     }
01085     UpdateTabWidths(updateTabWidths);
01086 }
01087
01088 void TabView::OnScrollDecreaseClick(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
01089 {
01090     if (auto&& scrollViewer = m_scrollViewer.get())
01091     {
01092         scrollViewer.ChangeView(std::max(0.0, scrollViewer.HorizontalOffset() - c_scrollAmount), nullptr, nullptr);
01093     }
01094 }
01095
01096 void TabView::OnScrollIncreaseClick(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
01097 {
01098     if (auto&& scrollViewer = m_scrollViewer.get())
01099     {
01100         scrollViewer.ChangeView(std::min(scrollViewer.ScrollableWidth(), scrollViewer.HorizontalOffset() + c_scrollAmount), nullptr, nullptr);
01101     }
01102 }
01103
01104 winrt::Size TabView::MeasureOverride(winrt::Size const& availableSize)
01105 {
01106     if (m_previousAvailableSize.Width != availableSize.Width)
01107     {
01108         m_previousAvailableSize = availableSize;
01109         UpdateTabWidths();
01110     }
01111
01112     return __super::MeasureOverride(availableSize);
01113 }
01114
01115 void TabView::UpdateTabWidths(bool shouldUpdateWidths, bool fillAllAvailableSpace)
01116 {
01117     // Don't update any tab widths when we're in the middle of a tab tear-out loop -
01118     // we'll update tab widths when it's done.
01119     if (m_isInTabTearOutLoop)
01120     {
01121         return;
01122     }
01123
01124     auto const maxTabWidth = unbox_value<double>(SharedHelpers::FindInApplicationResources(c_tabViewItemMaxWidthName, box_value(c_tabMaximumWidth)));
01125     double tabWidth = std::numeric_limits<double>::quiet_NaN();
01126     uint32_t tabCount = TabItems().Size();
01127
01128     // If an item is being dragged over this TabView, then we'll want to act like there's an extra item
01129     // when updating tab widths, which will create a hole into which the item can be dragged.
01130     if (m_isItemDraggedOver)
01131     {
01132         tabCount++;
01133     }
01134
01135     if (auto&& tabGrid = m_tabContainerGrid.get())
01136     {
01137         // Add up width taken by custom content and + button
01138         double widthTaken = 0.0;
01139         if (auto&& leftContentColumn = m_leftContentColumn.get())
01140         {
01141             widthTaken += leftContentColumn.ActualWidth();
01142         }
01143         if (auto&& addButtonColumn = m_addButtonColumn.get())
01144         {
01145             widthTaken += addButtonColumn.ActualWidth();
01146         }
01147         if (auto&& rightContentColumn = m_rightContentColumn.get())
01148         {
01149             if (auto&& rightContentPresenter = m_rightContentPresenter.get())
01150             {
01151                 const winrt::Size rightContentSize = rightContentPresenter.DesiredSize();
01152                 rightContentColumn.MinWidth(rightContentSize.Width);
01153                 widthTaken += rightContentSize.Width;
01154             }
01155         }
01156
01157         if (auto&& tabColumn = m_tabColumn.get())
01158         {
01159             // Note: can be infinite
01160             const auto availableWidth = m_previousAvailableSize.Width - widthTaken;
01161
01162             // Size can be 0 when window is first created; in that case, skip calculations; we'll get a new size soon
01163             if (availableWidth > 0)
01164             {
01165                 if (TabWidthMode() == winrt::TabViewWidthMode::Equal)
01166                 {
01167                     auto const minTabWidth = unbox_value<double>(SharedHelpers::FindInApplicationResources(c_tabViewItemMinWidthName, box_value(c_tabMinimumWidth)));
01168
01169                     // If we should fill all of the available space, use scrollviewer dimensions
01170                     auto const padding = Padding();
01171
01172                     double headerWidth = 0.0;
01173                     double footerWidth = 0.0;
01174                     if (auto&& itemsPresenter = m_itemsPresenter.get())
01175                     {
01176                         if (auto const header = itemsPresenter.Header().try_as<winrt::FrameworkElement>())
01177                         {
01178                             headerWidth = header.ActualWidth();
01179                         }
01180                         if (auto const footer = itemsPresenter.Footer().try_as<winrt::FrameworkElement>())
01181                         {
01182                             footerWidth = footer.ActualWidth();
01183                         }
01184                     }
01185
01186                     if (fillAllAvailableSpace)
01187                     {
01188                         // Calculate the proportional width of each tab given the width of the ScrollViewer.
01189                         auto const tabWidthForScroller = (availableWidth - (padding.Left + padding.Right + headerWidth + footerWidth)) / (double)(tabCount);
01190                         tabWidth = std::clamp(tabWidthForScroller, minTabWidth, maxTabWidth);
01191                     }
01192                     else
01193                     {
01194                         double availableTabViewSpace = (tabColumn.ActualWidth() - (padding.Left + padding.Right + headerWidth + footerWidth));
01195                         if (const auto increaseButton = m_scrollIncreaseButton.get())
01196                         {
01197                             if (increaseButton.Visibility() == winrt::Visibility::Visible)
01198                             {
01199                                 availableTabViewSpace -= increaseButton.ActualWidth();
01200                             }
01201                         }
01202
01203                         if (const auto decreaseButton = m_scrollDecreaseButton.get())
01204                         {
01205                             if (decreaseButton.Visibility() == winrt::Visibility::Visible)
01206                             {
01207                                 availableTabViewSpace -= decreaseButton.ActualWidth();
01208                             }
01209                         }
01210
01211                         // Use current size to update items to fill the currently occupied space
01212                         auto const tabWidthUnclamped = availableTabViewSpace / (double)(tabCount);
01213                         tabWidth = std::clamp(tabWidthUnclamped, minTabWidth, maxTabWidth);
01214                     }
01215
01216
01217                     // Size tab column to needed size
01218                     tabColumn.MaxWidth(availableWidth + headerWidth + footerWidth);
01219                     auto requiredWidth = tabWidth * tabCount + headerWidth + footerWidth + padding.Left + padding.Right;
01220                     if (requiredWidth > availableWidth)
01221                     {
01222                         tabColumn.Width(winrt::GridLengthHelper::FromPixels(availableWidth));
01223                         if (auto&& listview = m_listView.get())
01224                         {
01225                             winrt::FxScrollViewer::SetHorizontalScrollBarVisibility(listview, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Visible);
01226                             UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
01227                         }
01228                     }
01229                     else
01230                     {
01231                         // If we're dragging over the TabView, we need to set the width to a specific value,
01232                         // since we want it to be larger than the items actually in it in order to accommodate
01233                         // the item being dragged into the TabView.  Otherwise, we can just set its width to Auto.
01234                         tabColumn.Width(
01235                             m_isItemDraggedOver ?
01236                             winrt::GridLengthHelper::FromPixels(requiredWidth) :
01237                             winrt::GridLengthHelper::FromValueAndType(1.0, winrt::GridUnitType::Auto));
01238
01239                         if (auto&& listview = m_listView.get())
01240                         {
01241                             if (shouldUpdateWidths && fillAllAvailableSpace)
01242                             {
01243                                 winrt::FxScrollViewer::SetHorizontalScrollBarVisibility(listview, winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Hidden);
01244                             }
01245                             else
01246                             {
01247                                 if (auto&& decreaseButton = m_scrollDecreaseButton.get())
01248                                 {
01249                                     decreaseButton.IsEnabled(false);
01250                                 }
01251                                 if (auto&& increaseButton = m_scrollIncreaseButton.get())
01252                                 {
01253                                     increaseButton.IsEnabled(false);
01254                                 }
01255                             }
01256                         }
01257                     }
01258                 }
01259                 else
01260                 {
01261                     // Case: TabWidthMode "Compact" or "SizeToContent"
01262                     tabColumn.MaxWidth(availableWidth);
01263
01264                     if (auto&& listview = m_listView.get())
01265                     {
01266                         // When an item is being dragged over, we need to reserve extra space for the potential new tab,
01267                         // so we can't rely on auto sizing in that case.  However, the ListView expands to the size of the column,
01268                         // so we need to store the value lest we keep expanding the width of the column every time we call this method.
01269                         if (m_isItemDraggedOver)
01270                         {
01271                             if (!m_expandedWidthForDragOver.has_value())
01272                             {
01273                                 m_expandedWidthForDragOver = listview.ActualWidth() + maxTabWidth;
01274                             }
01275
01276                             tabColumn.Width(winrt::GridLengthHelper::FromPixels(m_expandedWidthForDragOver.value()));
01277                         }
01278                         else
01279                         {
01280                             if (m_expandedWidthForDragOver.has_value())
01281                             {
01282                                 m_expandedWidthForDragOver.reset();
01283                             }
01284
01285                             tabColumn.Width(winrt::GridLengthHelper::FromValueAndType(1.0, winrt::GridUnitType::Auto));
01286                         }
01287
01288                         listview.MaxWidth(availableWidth);
01289
01290                         // Calculate if the scroll buttons should be visible.
01291                         if (auto&& itemsPresenter = m_itemsPresenter.get())
01292                         {
01293                             const auto visible = itemsPresenter.ActualWidth() > availableWidth;
01294                             winrt::FxScrollViewer::SetHorizontalScrollBarVisibility(listview, visible
01295                                 ? winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Visible
01296                                 : winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Hidden);
01297                             if (visible)
01298                             {
01299                                 UpdateScrollViewerDecreaseAndIncreaseButtonsViewState();
01300                             }
01301                         }
01302                     }
01303                 }
01304             }
01305         }
01306     }
01307
01308
01309     if (shouldUpdateWidths || TabWidthMode() != winrt::TabViewWidthMode::Equal)
01310     {
01311         for (auto item : TabItems())
01312         {
01313             // Set the calculated width on each tab.
01314             auto tvi = item.try_as<winrt::TabViewItem>();
01315             if (!tvi)
01316             {
01317                 tvi = ContainerFromItem(item).as<winrt::TabViewItem>();
01318             }
01319
01320             if (tvi)
01321             {
01322                 tvi.Width(tabWidth);
01323             }
01324         }
01325     }
01326 }
01327
01328 void TabView::UpdateSelectedItem()
01329 {
01330     if (auto&& listView = m_listView.get())
01331     {
01332         listView.SelectedItem(SelectedItem());
01333     }
01334 }
01335
01336 void TabView::UpdateSelectedIndex()
01337 {
01338     if (auto&& listView = m_listView.get())
01339     {
01340         const auto selectedIndex = SelectedIndex();
01341         // Ensure that the selected index is within range of the items
01342         if (selectedIndex < static_cast<int>(listView.Items().Size()))
01343         {
01344             listView.SelectedIndex(selectedIndex);
01345         }
01346     }
01347 }
01348
01349 winrt::DependencyObject TabView::ContainerFromItem(winrt::IInspectable const& item)
01350 {
01351     if (auto&& listView = m_listView.get())
01352     {
01353         return listView.ContainerFromItem(item);
01354     }
01355     return nullptr;
01356 }
01357
01358 winrt::DependencyObject TabView::ContainerFromIndex(int index)
01359 {
01360     if (auto&& listView = m_listView.get())
01361     {
01362         return listView.ContainerFromIndex(index);
01363     }
01364     return nullptr;
01365 }
01366
01367 int TabView::IndexFromContainer(winrt::DependencyObject const& container)
01368 {
01369     if (auto&& listView = m_listView.get())
01370     {
01371         return listView.IndexFromContainer(container);
01372     }
01373     return -1;
01374 }
01375 winrt::IInspectable TabView::ItemFromContainer(winrt::DependencyObject const& container)
01376 {
01377     if (auto&& listView = m_listView.get())
01378     {
01379         return listView.ItemFromContainer(container);
01380     }
01381     return nullptr;
01382 }
01383
01384 int TabView::GetItemCount()
01385 {
01386     if (auto itemsSource = TabItemsSource())
01387     {
01388         if (auto vector = itemsSource.try_as<winrt::IVector<winrt::IInspectable>>())
01389         {
01390             return static_cast<int>(vector.Size());
01391         }
01392         else if (auto iterable = itemsSource.try_as<winrt::IIterable<winrt::IInspectable>>())
01393         {
01394             int i = 0;
01395
01396             for (auto const& o : iterable)
01397             {
01398                 i++;
01399             }
01400
01401             return i;
01402         }
01403
01404         return 0;
01405     }
01406     else
01407     {
01408         return static_cast<int>(TabItems().Size());
01409     }
01410 }
01411
01412 bool TabView::MoveFocus(bool moveForward)
01413 {
01414     auto focusedControl = winrt::FocusManager::GetFocusedElement() ? winrt::FocusManager::GetFocusedElement().try_as<winrt::Control>() : nullptr;
01415
01416     // If there's no focused control, then we have nothing to do.
01417     if (!focusedControl)
01418     {
01419         return false;
01420     }
01421
01422     // Focus goes in this order:
01423     //
01424     //    Tab 1 -> Tab 1 close button -> Tab 2 -> Tab 2 close button -> ... -> Tab N -> Tab N close button -> Add tab button -> Tab 1
01425     //
01426     // Any element that's not focusable is skipped.
01427     //
01428     std::vector<winrt::Control> focusOrderList;
01429
01430     for (int i = 0; i < GetItemCount(); i++)
01431     {
01432         if (auto tab = ContainerFromIndex(i).try_as<winrt::TabViewItem>())
01433         {
01434             if (IsFocusable(tab, false /* checkTabStop */))
01435             {
01436                 focusOrderList.push_back(tab);
01437
01438                 if (auto closeButton = winrt::get_self<TabViewItem>(tab)->GetCloseButton())
01439                 {
01440                     if (IsFocusable(closeButton, false /* checkTabStop */))
01441                     {
01442                         focusOrderList.push_back(closeButton);
01443                     }
01444                 }
01445             }
01446         }
01447     }
01448
01449     if (auto&& addButton = m_addButton.get())
01450     {
01451         if (IsFocusable(addButton, false /* checkTabStop */))
01452         {
01453             focusOrderList.push_back(addButton);
01454         }
01455     }
01456
01457     auto position = std::find(focusOrderList.begin(), focusOrderList.end(), focusedControl);
01458
01459     // The focused control is not in the focus order list - nothing for us to do here either.
01460     if (position == focusOrderList.end())
01461     {
01462         return false;
01463     }
01464
01465     // At this point, we know that the focused control is indeed in the focus list, so we'll move focus to the next or previous control in the list.
01466
01467     const int sourceIndex = static_cast<int>(position - focusOrderList.begin());
01468     const int listSize = static_cast<int>(focusOrderList.size());
01469     const int increment = moveForward ? 1 : -1;
01470     int nextIndex = sourceIndex + increment;
01471
01472     if (nextIndex < 0)
01473     {
01474         nextIndex = listSize - 1;
01475     }
01476     else if (nextIndex >= listSize)
01477     {
01478         nextIndex = 0;
01479     }
01480
01481     // We have to do a bit of a dance for the close buttons - we don't want users to be able to give them focus when tabbing through an app,
01482     // since we only want to tab into the TabView once and then tab out on the next tab press.  However, IsTabStop also controls keyboard
01483     // focusability in general - we can't give keyboard focus to a control with IsTabStop = false.  To work around this, we'll temporarily set
01484     // IsTabStop = true before calling Focus(), and then set it back to false if it was previously false.
01485
01486     auto&& control = focusOrderList[nextIndex];
01487     const bool originalIsTabStop = control.IsTabStop();
01488
01489     auto scopeGuard = gsl::finally([control, originalIsTabStop]()
01490         {
01491             control.IsTabStop(originalIsTabStop);
01492         });
01493
01494     control.IsTabStop(true);
01495
01496     // We checked focusability above, so we should never be in a situation where Focus() returns false.
01497     MUX_ASSERT(control.Focus(winrt::FocusState::Keyboard));
01498     return true;
01499 }
01500
01501 bool TabView::MoveSelection(bool moveForward)
01502 {
01503     const int originalIndex = SelectedIndex();
01504     const int increment = moveForward ? 1 : -1;
01505     int currentIndex = originalIndex + increment;
01506     const int itemCount = GetItemCount();
01507
01508     while (currentIndex != originalIndex)
01509     {
01510         if (currentIndex < 0)
01511         {
01512             currentIndex = static_cast<int>(itemCount - 1);
01513         }
01514         else if (currentIndex >= itemCount)
01515         {
01516             currentIndex = 0;
01517         }
01518
01519         if (IsFocusable(ContainerFromIndex(currentIndex)))
01520         {
01521             SelectedIndex(currentIndex);
01522             return true;
01523         }
01524
01525         currentIndex += increment;
01526     }
01527
01528     return false;
01529 }
01530
01531 bool TabView::RequestCloseCurrentTab()
01532 {
01533     bool handled = false;
01534     if (auto selectedTab = SelectedItem().try_as<winrt::TabViewItem>())
01535     {
01536         if (selectedTab.IsClosable())
01537         {
01538             // Close the tab on ctrl + F4
01539             RequestCloseTab(selectedTab, true);
01540             handled = true;
01541         }
01542     }
01543
01544     return handled;
01545 }
01546
01547 void TabView::OnCtrlF4Invoked(const winrt::KeyboardAccelerator& sender, const winrt::KeyboardAcceleratorInvokedEventArgs& args)
01548 {
01549     args.Handled(RequestCloseCurrentTab());
01550 }
01551
01552 void TabView::OnCtrlTabInvoked(const winrt::KeyboardAccelerator& sender, const winrt::KeyboardAcceleratorInvokedEventArgs& args)
01553 {
01554     args.Handled(MoveSelection(true /* moveForward */));
01555 }
01556
01557 void TabView::OnCtrlShiftTabInvoked(const winrt::KeyboardAccelerator& sender, const winrt::KeyboardAcceleratorInvokedEventArgs& args)
01558 {
01559     args.Handled(MoveSelection(false /* moveForward */));
01560 }
01561
01562 void TabView::OnAddButtonKeyDown(const winrt::IInspectable& sender, winrt::KeyRoutedEventArgs const& args)
01563 {
01564     if (auto&& addButton = m_addButton.get())
01565     {
01566         if (args.Key() == winrt::VirtualKey::Right)
01567         {
01568             args.Handled(MoveFocus(addButton.FlowDirection() == winrt::FlowDirection::LeftToRight));
01569         }
01570         else if (args.Key() == winrt::VirtualKey::Left)
01571         {
01572             args.Handled(MoveFocus(addButton.FlowDirection() != winrt::FlowDirection::LeftToRight));
01573         }
01574     }
01575 }
01576
01577 // Note that the parameter is a DependencyObject for convenience to allow us to call this on the return value of ContainerFromIndex.
01578 // There are some non-control elements that can take focus - e.g. a hyperlink in a RichTextBlock - but those aren't relevant for our purposes here.
01579 bool TabView::IsFocusable(winrt::DependencyObject const& object, bool checkTabStop)
01580 {
01581     if (!object)
01582     {
01583         return false;
01584     }
01585
01586     if (auto control = object.try_as<winrt::Control>())
01587     {
01588         return control &&
01589             control.Visibility() == winrt::Visibility::Visible &&
01590             (control.IsEnabled() || control.AllowFocusWhenDisabled()) &&
01591             (control.IsTabStop() || !checkTabStop);
01592     }
01593     else
01594     {
01595         return false;
01596     }
01597 }
01598
01599 void TabView::UpdateIsItemDraggedOver(bool isItemDraggedOver)
01600 {
01601     if (m_isItemDraggedOver != isItemDraggedOver)
01602     {
01603         m_isItemDraggedOver = isItemDraggedOver;
01604         UpdateTabWidths();
01605     }
01606 }
01607
01608 void TabView::UpdateTabViewWithTearOutList()
01609 {
01610     auto tabViewWithTearOutList = GetTabViewWithTearOutList();
01611
01612     winrt::weak_ref<winrt::TabView> thisAsWeak = *this;
01613     auto existingIterator = std::find(tabViewWithTearOutList->begin(), tabViewWithTearOutList->end(), thisAsWeak);
01614
01615     if (CanTearOutTabs() && IsLoaded() && existingIterator == std::end((*tabViewWithTearOutList)))
01616     {
01617         tabViewWithTearOutList->push_back(*this);
01618     }
01619     else if ((!CanTearOutTabs() || !IsLoaded()) && existingIterator != std::end((*tabViewWithTearOutList)))
01620     {
01621         tabViewWithTearOutList->erase(existingIterator);
01622     }
01623 }
01624
01625 void TabView::AttachMoveSizeLoopEvents()
01626 {
01627     if (CanTearOutTabs())
01628     {
01629         if (IsLoaded() && m_enteringMoveSizeToken.value == 0)
01630         {
01631             auto& nonClientPointerSource = GetInputNonClientPointerSource();
01632
01633             m_enteringMoveSizeToken = nonClientPointerSource.EnteringMoveSize({ this, &TabView::OnEnteringMoveSize });
01634             m_enteredMoveSizeToken = nonClientPointerSource.EnteredMoveSize({ this, &TabView::OnEnteredMoveSize });
01635             m_windowRectChangingToken = nonClientPointerSource.WindowRectChanging({ this, &TabView::OnWindowRectChanging });
01636             m_exitedMoveSizeToken = nonClientPointerSource.ExitedMoveSize({ this, &TabView::OnExitedMoveSize });
01637         }
01638     }
01639     else if (m_inputNonClientPointerSource)
01640     {
01641         m_inputNonClientPointerSource.EnteringMoveSize(m_enteringMoveSizeToken);
01642         m_inputNonClientPointerSource.EnteredMoveSize(m_enteredMoveSizeToken);
01643         m_inputNonClientPointerSource.WindowRectChanging(m_windowRectChangingToken);
01644         m_inputNonClientPointerSource.ExitedMoveSize(m_exitedMoveSizeToken);
01645
01646         m_enteringMoveSizeToken.value = 0;
01647         m_enteredMoveSizeToken.value = 0;
01648         m_windowRectChangingToken.value = 0;
01649         m_exitedMoveSizeToken.value = 0;
01650     }
01651 }
01652
01653 //
01654 // We initialize the tab tear-out state machine when we enter the move-size loop. The state machine has two states it can be in:
01655 // either we're dragging a tab within a tab view, or we're dragging a tab that has been torn out of a tab view.
01656 //
01657 // If we start dragging a tab in a tab view with multiple tabs, then we'll start in the former state.  We'll raise the TabTearOutWindowRequested event,
01658 // which prompts the app to create a new window to host the tab's data object.
01659 //
01660 // If we start dragging a tab in a tab view where that is its only tab, then we'll start in the latter state.  We will *not* raise the TabTearOutWindowRequested event,
01661 // because in this case, the window being dragged is the one that owns the tab view with a single tab.
01662 //
01663 // We update the state machine in the WindowRectChanging event.  See that method for a description of the state machine's functionality.
01664 //
01665
01666 void TabView::OnEnteringMoveSize(const winrt::InputNonClientPointerSource& sender, const winrt::EnteringMoveSizeEventArgs& args)
01667 {
01668     // We only perform tab tear-out when a move is being performed.
01669     if (args.MoveSizeOperation() != winrt::MoveSizeOperation::Move)
01670     {
01671         return;
01672     }
01673
01674     auto pointInIslandCoords = XamlRoot().CoordinateConverter().ConvertScreenToLocal(args.PointerScreenPoint());
01675     auto tab = GetTabAtPoint(pointInIslandCoords);
01676
01677     // If there was no tab at the point where the user clicked and dragged, then we have nothing to do.
01678     if (!tab)
01679     {
01680         return;
01681     }
01682
01683     auto dataItem = ItemFromContainer(tab);
01684
01685     m_isInTabTearOutLoop = true;
01686     m_tabBeingDragged = tab;
01687     m_dataItemBeingDragged = dataItem;
01688     m_tabViewContainingTabBeingDragged = *this;
01689     m_originalTabBeingDraggedPoint = m_tabBeingDragged.TransformToVisual(nullptr).TransformPoint({ 0, 0 });
01690
01691     SelectedItem(m_dataItemBeingDragged);
01692
01693     // We don't want to create a new window for tearing out if every tab is being torn out -
01694     // in that case, we just want to drag the window.
01695     if (GetItemCount() > 1)
01696     {
01697         auto windowRequestedArgs = winrt::make<TabViewTabTearOutWindowRequestedEventArgs>(dataItem, tab);
01698         m_tabTearOutWindowRequestedEventSource(*this, windowRequestedArgs);
01699
01700         args.MoveSizeWindowId(windowRequestedArgs.NewWindowId());
01701
01702         HWND newWindow = winrt::Microsoft::UI::GetWindowFromWindowId(windowRequestedArgs.NewWindowId());
01703         m_tabTearOutNewAppWindow = winrt::AppWindow::GetFromWindowId(windowRequestedArgs.NewWindowId());
01704         HWND currentWindow = winrt::Microsoft::UI::GetWindowFromWindowId(XamlRoot().ContentIslandEnvironment().AppWindowId());
01705
01706         WINDOWPLACEMENT wp{};
01707         wp.length = sizeof(wp);
01708         GetWindowPlacement(currentWindow, &wp);
01709
01710         // We'll position the new window to be hidden at the same position as the current window and with the restored size of the current window.
01711         RECT windowRect;
01712         GetWindowRect(currentWindow, &windowRect);
01713         SetWindowPos(
01714             newWindow,
01715             currentWindow,
01716             windowRect.left,
01717             windowRect.top,
01718             wp.rcNormalPosition.right - wp.rcNormalPosition.left,
01719             wp.rcNormalPosition.bottom - wp.rcNormalPosition.top,
01720             SWP_SHOWWINDOW);
01721
01722         // The move-size loop prevents the pumping of window messages, which includes WM_PAINT messages. This creates the problem that a window that is
01723         // initially shown will not have any ability to handle those WM_PAINT messages to initially display its contents.
01724         // To get around this limitation, we'll show the window to allow it to initially draw its content, and then immediately hide it.
01725         // This allows it to render its contents without actually visually appearing to users.
01726         DispatcherQueue().TryEnqueue(winrt::DispatcherQueueHandler([window = m_tabTearOutNewAppWindow]() { window.Hide(); }));
01727     }
01728     else
01729     {
01730         m_tabTearOutNewAppWindow = winrt::AppWindow::GetFromWindowId(XamlRoot().ContentIslandEnvironment().AppWindowId());
01731     }
01732 }
01733
01734 void TabView::OnEnteredMoveSize(const winrt::InputNonClientPointerSource& sender, const winrt::EnteredMoveSizeEventArgs& args)
01735 {
01736     if (!m_isInTabTearOutLoop)
01737     {
01738         return;
01739     }
01740
01741     MUX_ASSERT(CanTearOutTabs() && m_tabTearOutDraggingState == TabTearOutDraggingState::Idle);
01742     m_tabTearOutDraggingState = GetItemCount() > 1 ? TabTearOutDraggingState::DraggingTabWithinTabView : TabTearOutDraggingState::DraggingTornOutTab;
01743     m_tabTearOutInitialPosition = args.PointerScreenPoint();
01744     m_dragPositionOffset = {};
01745
01746     // If we're starting in the state of dragging a torn out tab, let's populate the list of tab views and their bounds now.
01747     if (m_tabTearOutDraggingState == TabTearOutDraggingState::DraggingTornOutTab)
01748     {
01749         PopulateTabViewList();
01750     }
01751 }
01752
01753 //
01754 // The tab tear-out state machine proceeds as follows.
01755 //
01756 // When dragging a tab within a tab view:
01757 //   - If the tab is still within the bounds of the tab view, then we'll update its position in the item list based on where the user has dragged it -
01758 //     e.g., if the user has dragged it more than 1/2 of the way across the width of the tab to the right, then we'll swap the positions of those two tabs
01759 //     to keep the dragged tab underneath the user's pointer.
01760 //   - If the tab is no longer within the bounds of the tab view, then we'll transition to the torn-out tab state.  We'll raise the TabTearOutRequested event,
01761 //     which prompts the app to remove the tab's data object from the item list of the tab view it's being torn out from.  We'll then show the window created
01762 //     in response to TabTearOutWindowRequested, which will now display the data object that has been torn out.
01763 //
01764 // When dragging a torn-out tab:
01765 //   - If the tab is not over a tab view with CanTearOutTabs set to true, then we won't do anything, which will allow the window to be dragged as normal.
01766 //   - If the tab is over a tab view with CanTearOutTabs set to true, then we'll raise the ExternalTornOutTabsDropping event, which allows the app
01767 //     to decide whether it wants to allow the tab to be dropped into the tab view.  If it does, then we'll raise the ExternalTornOutTabsDropped event,
01768 //     which prompts the app to move the tab's data object to the item list of the tab view in question, then hide the window being dragged,
01769 //     and finally transition to the dragging within tab view state.
01770 //
01771 // The tab tear-out state concludes when the user releases the pointer.
01772 //
01773
01774 void TabView::OnWindowRectChanging(const winrt::InputNonClientPointerSource& sender, const winrt::WindowRectChangingEventArgs& args)
01775 {
01776     if (!m_isInTabTearOutLoop)
01777     {
01778         return;
01779     }
01780
01781     switch (m_tabTearOutDraggingState)
01782     {
01783     case TabTearOutDraggingState::DraggingTabWithinTabView:
01784         DragTabWithinTabView(args);
01785         break;
01786     case TabTearOutDraggingState::DraggingTornOutTab:
01787         DragTornOutTab(args);
01788         break;
01789     }
01790
01791     auto newWindowRect = args.NewWindowRect();
01792     const auto rasterizationScale = XamlRoot().RasterizationScale();
01793     newWindowRect.X -= static_cast<int32_t>(m_dragPositionOffset.X * rasterizationScale);
01794     newWindowRect.Y -= static_cast<int32_t>(m_dragPositionOffset.Y * rasterizationScale);
01795     args.NewWindowRect(newWindowRect);
01796 }
01797
01798 void TabView::DragTabWithinTabView(const winrt::WindowRectChangingEventArgs& args)
01799 {
01800     auto pointInIslandCoords = m_tabViewContainingTabBeingDragged.XamlRoot().CoordinateConverter().ConvertScreenToLocal(args.PointerScreenPoint());
01801     auto tabBeingDragged = m_tabViewContainingTabBeingDragged.ContainerFromItem(m_dataItemBeingDragged).try_as<winrt::TabViewItem>();
01802
01803     if (tabBeingDragged)
01804     {
01805         if (auto& listView = winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged)->m_listView.get())
01806         {
01807             // We'll retrieve the bounds of the tab view's list view in which we're dragging the tab, in order to be able to tell whether the tab has been dragged out of it.
01808             auto bounds = listView.TransformToVisual(nullptr).TransformBounds({ 0, 0, static_cast<float>(listView.ActualWidth()), static_cast<float>(listView.ActualHeight()) });
01809
01810             // We'll add a one-pixel margin to the bounds, since otherwise we could run into the situation where we immediately reattach after dragging out of a tab view,
01811             // depending on how sub-pixel rounding works out.
01812             bounds.X -= 1;
01813             bounds.Y -= 1;
01814             bounds.Width += 2;
01815             bounds.Height += 2;
01816
01817             if (SharedHelpers::DoesRectContainPoint(bounds, pointInIslandCoords))
01818             {
01819                 // If the tab view bounds contain the pointer point, then we'll update the index of the tab being dragged within its tab view.
01820                 UpdateTabIndex(tabBeingDragged, pointInIslandCoords);
01821             }
01822             else
01823             {
01824                 // Otherwise, we'll tear out the tab and show the window created to host the torn-out tab.
01825                 TearOutTab(tabBeingDragged, pointInIslandCoords);
01826             }
01827         }
01828     }
01829 }
01830
01831 void TabView::UpdateTabIndex(winrt::TabViewItem const& tabBeingDragged, winrt::Point const& pointerPosition)
01832 {
01833     auto tabViewImpl = winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged);
01834
01835     // We'll first figure out what tab is located at the position in question.  This may return null if, for example,
01836     // the user has dragged over the add-tab button, in which case we'll just early-out.
01837     if (auto tabAtPoint = tabViewImpl->GetTabAtPoint(pointerPosition))
01838     {
01839         // Now we'll retrieve the data item associated with that tab.  If it's the data item of the tab we're dragging,
01840         // then we know that the tab doesn't need to move - the pointer is still over the tab in question.
01841         // If it's *not* the data item of the tab we're dragging, then we'll swap the tab the pointer is over
01842         // with the tab we're dragging.
01843         auto dataItemAtPoint = tabViewImpl->ItemFromContainer(tabAtPoint);
01844
01845         if (dataItemAtPoint != m_dataItemBeingDragged)
01846         {
01847             int newIndex = tabViewImpl->IndexFromContainer(tabAtPoint);
01848
01849             // If this tab view has an items source set, we'll swap the items in the items source.
01850             // Otherwise, we'll swap the tab items themselves.
01851             if (auto tabItemsSource = m_tabViewContainingTabBeingDragged.TabItemsSource())
01852             {
01853                 if (auto tabItemsSourceVector = tabItemsSource.try_as<winrt::IVector<IInspectable>>())
01854                 {
01855                     tabItemsSourceVector.RemoveAt(tabViewImpl->IndexFromContainer(tabBeingDragged));
01856                     tabItemsSourceVector.InsertAt(newIndex, m_dataItemBeingDragged);
01857                 }
01858             }
01859             else
01860             {
01861                 m_tabViewContainingTabBeingDragged.TabItems().RemoveAt(tabViewImpl->IndexFromContainer(tabBeingDragged));
01862                 m_tabViewContainingTabBeingDragged.TabItems().InsertAt(newIndex, tabBeingDragged);
01863             }
01864
01865             // Finally, we'll re-select the tab being dragged, since it has changed positions.
01866             m_tabViewContainingTabBeingDragged.SelectedIndex(newIndex);
01867         }
01868     }
01869 }
01870
01871 void TabView::TearOutTab(winrt::TabViewItem const& tabBeingDragged, winrt::Point const& pointerPosition)
01872 {
01873     auto tabViewImpl = winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged);
01874
01875     // We'll first raise the TabTearOutRequested event, which prompts the app to move the torn-out tab data item from its current tab view to the one in the new window.
01876     tabViewImpl->m_tabTearOutRequestedEventSource(m_tabViewContainingTabBeingDragged, winrt::make<TabViewTabTearOutRequestedEventArgs>(m_dataItemBeingDragged, tabBeingDragged));
01877
01878     // We're now dragging a torn out tab, so let's populate the list of tab views.
01879     m_tabTearOutDraggingState = TabTearOutDraggingState::DraggingTornOutTab;
01880     PopulateTabViewList();
01881
01882     // Now we'll show the window.
01883     m_tabTearOutNewAppWindow.Show();
01884
01885     UpdateLayout();
01886
01887     if (m_tabViewContainingTabBeingDragged)
01888     {
01889         m_tabViewContainingTabBeingDragged.UpdateLayout();
01890
01891         // We want to keep the tab under the user's pointer, so we'll subtract off the difference from the XAML position of the tab in the original window,
01892         // in order to ensure we position the window such that the tab in the new window is in the same position as the tab in the old window.
01893         auto containingTabPosition = m_tabViewContainingTabBeingDragged.ContainerFromIndex(m_tabViewContainingTabBeingDragged.SelectedIndex()).as<winrt::TabViewItem>().TransformToVisual(nullptr).TransformPoint({ 0, 0 });
01894         m_dragPositionOffset = { containingTabPosition.X - m_originalTabBeingDraggedPoint.X, containingTabPosition.Y - m_originalTabBeingDraggedPoint.Y };
01895     }
01896     else
01897     {
01898         m_dragPositionOffset = {};
01899     }
01900 }
01901
01902 void TabView::DragTornOutTab(const winrt::WindowRectChangingEventArgs& args)
01903 {
01904     // When we're dragging a torn-out tab, we want to check, as the window moves, whether the user has dragged the tab over a tab view that will allow it to be dropped into it.
01905     // We'll iterate through the list of tab views and their bounds and check each of their screen positions against the screen position of the pointer.
01906     for (auto iterator = m_tabViewBoundsTuples.begin(); iterator != m_tabViewBoundsTuples.end(); iterator++)
01907     {
01908         auto& otherTabViewScreenBounds = std::get<winrt::RectInt32>(*iterator);
01909
01910         if (SharedHelpers::DoesRectContainPoint(otherTabViewScreenBounds, args.PointerScreenPoint()))
01911         {
01912             auto& otherTabView = std::get<winrt::TabView>(*iterator);
01913
01914             // We'll check which index we need to insert the tab at.
01915             int insertionIndex = GetTabInsertionIndex(otherTabView, args.PointerScreenPoint());
01916
01917             // If we got a valid index, we'll begin attempting to merge the tab into this tab view.
01918             if (insertionIndex >= 0)
01919             {
01920                 // First, we'll raise the ExternalTornOutTabsDropping event, which asks the app whether this tab view should accept the tab being dropped into it.
01921                 auto tabsDroppingArgs = winrt::make<TabViewExternalTornOutTabsDroppingEventArgs>(m_dataItemBeingDragged, m_tabBeingDragged, insertionIndex);
01922
01923                 auto otherTabViewImpl = winrt::get_self<TabView>(otherTabView);
01924                 otherTabViewImpl->m_externalTornOutTabsDroppingEventSource(otherTabView, tabsDroppingArgs);
01925
01926                 // If the response was yes, then we'll raise the ExternalTornOutTabsDropped event, which prompts the app to actually move the tab's data item
01927                 // to the new tab view; we'll flag the new tab view as the one containing the tab we're dragging; we'll move to the dragging tab within a tab view state;
01928                 // and finally we'll then hide the torn-out tab window.
01929                 if (tabsDroppingArgs.AllowDrop())
01930                 {
01931                     // We're about to merge the tab into the other tab view, so we'll retrieve and save off the tab view that currently holds the tab being dragged.
01932                     // We'll need to remove it from the list of tab views with CanTearOutTabs set to true if its window is destroyed.
01933                     m_tabViewInNewAppWindow = m_tabViewContainingTabBeingDragged;
01934
01935                     otherTabViewImpl->m_externalTornOutTabsDroppedEventSource(otherTabView, winrt::make<TabViewExternalTornOutTabsDroppedEventArgs>(m_dataItemBeingDragged, m_tabBeingDragged, insertionIndex));
01936                     otherTabView.SelectedItem(m_dataItemBeingDragged);
01937
01938                     // If the other tab view's app window is a different app window than the one being dragged, bring it to the front beneath the one being dragged.
01939                     auto otherTabViewAppWindow = winrt::AppWindow::GetFromWindowId(otherTabView.XamlRoot().ContentIslandEnvironment().AppWindowId());
01940                     otherTabViewAppWindow.MoveInZOrderAtTop();
01941
01942                     m_tabViewContainingTabBeingDragged = otherTabView;
01943                     m_dragPositionOffset = {};
01944                     m_tabTearOutDraggingState = TabTearOutDraggingState::DraggingTabWithinTabView;
01945                     m_tabTearOutNewAppWindow.Hide();
01946
01947                     break;
01948                 }
01949             }
01950         }
01951     }
01952 }
01953
01954 int TabView::GetTabInsertionIndex(winrt::TabView const& otherTabView, winrt::PointInt32 const& screenPosition)
01955 {
01956     int index = -1;
01957
01958     // To get the insertion index, we'll first check what tab (if any) is beneath the screen position.
01959     auto otherTabViewImpl = winrt::get_self<TabView>(otherTabView);
01960     auto tab = otherTabViewImpl->GetTabAtPoint(otherTabView.XamlRoot().CoordinateConverter().ConvertScreenToLocal(screenPosition));
01961
01962     if (tab)
01963     {
01964         // If there was a tab underneath the position, then we'll check whether the screen position is on its left side or its right side.
01965         // If it's on the left side, we'll set the insertion position to be before this tab. Otherwise, we'll set it to be after this tab.
01966         auto tabIndex = otherTabViewImpl->IndexFromContainer(tab);
01967         auto tabRect = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(tab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(tab.ActualWidth()), static_cast<float>(tab.ActualHeight()) }));
01968
01969         if (screenPosition.X < tabRect.X + tabRect.Width / 2)
01970         {
01971             index = tabIndex;
01972         }
01973         else
01974         {
01975             index = tabIndex + 1;
01976         }
01977     }
01978     else if (otherTabViewImpl->GetItemCount() > 0)
01979     {
01980         // If there was no tab, under the cursor, then that suggests we want to insert the tab either at the very beginning or at the very end.
01981         // We'll first check whether the screen position is to the left of the bounds of the first tab.  If so, we'll set the insertion position
01982         // to be the start of the item list.
01983         auto firstTab = otherTabViewImpl->ContainerFromIndex(0).as<winrt::TabViewItem>();
01984
01985         if (firstTab)
01986         {
01987             auto firstTabRect = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(firstTab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(firstTab.ActualWidth()), static_cast<float>(firstTab.ActualHeight()) }));
01988
01989             if (screenPosition.X < firstTabRect.X)
01990             {
01991                 index = 0;
01992             }
01993         }
01994
01995         // If that wasn't the case, then next we'll check whether the screen position is to the right of the bounds of the last tab.
01996         // If so, we'll set the insertion position to be the end of the item list.
01997         if (index < 0)
01998         {
01999             auto lastTabIndex = otherTabViewImpl->GetItemCount() - 1;
02000             auto lastTab = otherTabViewImpl->ContainerFromIndex(lastTabIndex).as<winrt::TabViewItem>();
02001
02002             if (lastTab)
02003             {
02004                 auto lastTabRect = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(lastTab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(lastTab.ActualWidth()), static_cast<float>(lastTab.ActualHeight()) }));
02005                 if (screenPosition.X > lastTabRect.X + lastTabRect.Width)
02006                 {
02007                     index = otherTabViewImpl->GetItemCount();
02008                 }
02009             }
02010         }
02011     }
02012
02013     return index;
02014 }
02015
02016 // When we exit the move-size loop, we'll reset the tab tear-out state machine to an idle state, and check the status of the window that was created.
02017 // If the window is currently hidden, then the user has merged the torn out tab with another tab view, and the window is no longer needed.
02018 // In that case, we'll queue the window for destruction.
02019
02020 void TabView::OnExitedMoveSize(const winrt::InputNonClientPointerSource& sender, const winrt::ExitedMoveSizeEventArgs& args)
02021 {
02022     if (!m_isInTabTearOutLoop)
02023     {
02024         return;
02025     }
02026
02027     m_tabTearOutDraggingState = TabTearOutDraggingState::Idle;
02028
02029     if (!m_tabTearOutNewAppWindow.IsVisible())
02030     {
02031         // We're about to close the window containing the tab view that had been holding the tab view,
02032         // so we'll remove it from the list of tab views with CanTearOutTabs set to true
02033         // This will ensure that it's immediately removed from the list rather than waiting for the
02034         // WM_CLOSE message to be handled.
02035         if (m_tabViewInNewAppWindow)
02036         {
02037             auto tabViewWithTearOutList = GetTabViewWithTearOutList();
02038             winrt::weak_ref<winrt::TabView> windowTabViewAsWeak = m_tabViewInNewAppWindow;
02039             auto existingIterator = std::find(tabViewWithTearOutList->begin(), tabViewWithTearOutList->end(), windowTabViewAsWeak);
02040
02041             if (existingIterator != std::end((*tabViewWithTearOutList)))
02042             {
02043                 tabViewWithTearOutList->erase(existingIterator);
02044             }
02045         }
02046
02047         PostMessageW(winrt::Microsoft::UI::GetWindowFromWindowId(m_tabTearOutNewAppWindow.Id()), WM_CLOSE, 0, 0);
02048     }
02049     else if (m_tabViewContainingTabBeingDragged)
02050     {
02051         // Otherwise, if the window is still open, let's update its tab view's non-client region.
02052         winrt::get_self<TabView>(m_tabViewContainingTabBeingDragged)->UpdateNonClientRegion();
02053     }
02054
02055     // We'll also update this tab view's non-client region, now that it's stabilized.
02056     UpdateNonClientRegion();
02057
02058     m_isInTabTearOutLoop = false;
02059
02060     // We'll also update tab widths, since we ceased doing so while the move-size loop was underway.
02061     UpdateTabWidths();
02062 }
02063
02064 winrt::TabViewItem TabView::GetTabAtPoint(const winrt::Point& point)
02065 {
02066     // Convert the point to a point in the TabView's coordinate space
02067     // and then detect which TabViewItem is at that point.
02068     auto tabViewRect = TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight()) });
02069
02070     if (SharedHelpers::DoesRectContainPoint(tabViewRect, point))
02071     {
02072         auto tabCount = GetItemCount();
02073         for (int i = 0; i < tabCount; i++)
02074         {
02075             auto tab = ContainerFromIndex(i).try_as<winrt::TabViewItem>();
02076             if (tab)
02077             {
02078                 auto tabRect = tab.TransformToVisual(nullptr).TransformBounds(winrt::Rect{ 0, 0, static_cast<float>(tab.ActualWidth()), static_cast<float>(tab.ActualHeight()) });
02079                 if (SharedHelpers::DoesRectContainPoint(tabRect, point))
02080                 {
02081                     return tab;
02082                 }
02083             }
02084         }
02085     }
02086
02087     return nullptr;
02088 }
02089
02090 void TabView::PopulateTabViewList()
02091 {
02092     // When we're dragging a torn-out tab, we want to check, as the window moves, whether the user has dragged the tab over a tab view that will allow it to be dropped into it.
02093     // We'll pre-fill a list of tab views and their screen bounds when we start dragging a torn-out tab, on the basis that they are unlikely to move while we're dragging the tab.
02094     m_tabViewBoundsTuples.clear();
02095
02096     // We'll also track which tab view holds the torn-out tab.
02097     m_tabViewContainingTabBeingDragged = nullptr;
02098
02099     auto tabViewWithTearOutList = TabView::GetTabViewWithTearOutList();
02100
02101     auto iterator = tabViewWithTearOutList->begin();
02102     while (iterator != tabViewWithTearOutList->end())
02103     {
02104         auto otherTabView = (*iterator).get();
02105
02106         if (!otherTabView)
02107         {
02108             iterator = tabViewWithTearOutList->erase(iterator);
02109         }
02110         else
02111         {
02112             // We only want to populate the tuple list with tab views that don't currently contain the item being dragged,
02113             // since this tuple list is used to detect tab views that the item being dragged can be dragged onto.
02114             bool otherTabViewContainsTab = false;
02115             uint32_t ignored;
02116
02117             if (auto otherTabItemsSource = otherTabView.TabItemsSource())
02118             {
02119                 if (auto tabItemsSourceVector = otherTabItemsSource.try_as<winrt::IVector<IInspectable>>())
02120                 {
02121                     otherTabViewContainsTab = tabItemsSourceVector.IndexOf(m_dataItemBeingDragged, ignored);
02122                 }
02123             }
02124             else
02125             {
02126                 otherTabViewContainsTab = otherTabView.TabItems().IndexOf(m_tabBeingDragged, ignored);
02127             }
02128
02129             if (otherTabViewContainsTab)
02130             {
02131                 m_tabViewContainingTabBeingDragged = otherTabView;
02132             }
02133             else
02134             {
02135                 auto otherTabViewImpl = winrt::get_self<TabView>(otherTabView);
02136
02137                 if (auto& otherTabViewListView = otherTabViewImpl->m_listView.get())
02138                 {
02139                     auto dragBounds = otherTabViewListView.TransformToVisual(nullptr).TransformBounds(winrt::Rect(0, 0, static_cast<float>(otherTabViewListView.ActualWidth()), static_cast<float>(otherTabViewListView.ActualHeight())));
02140
02141                     // We'll add the add button's bounds to the drag bounds, since it's also a valid element to drag a tab over, which will add the tab to the end of the tab view.
02142                     if (otherTabView.IsAddTabButtonVisible())
02143                     {
02144                         if (auto& otherTabViewAddButton = otherTabViewImpl->m_addButton.get())
02145                         {
02146                             auto addButtonBounds = otherTabViewAddButton.TransformToVisual(nullptr).TransformBounds(winrt::Rect(0, 0, static_cast<float>(otherTabViewAddButton.ActualWidth()), static_cast<float>(otherTabViewAddButton.ActualHeight())));
02147
02148                             float dragBoundsRight = dragBounds.X + dragBounds.Width;
02149                             float dragBoundsBottom = dragBounds.Y + dragBounds.Height;
02150                             float addButtonBoundsRight = addButtonBounds.X + addButtonBounds.Width;
02151                             float addButtonBoundsBottom = addButtonBounds.Y + addButtonBounds.Height;
02152
02153                             float minX = std::min(dragBounds.X, addButtonBounds.X);
02154                             float minY = std::min(dragBounds.Y, addButtonBounds.Y);
02155
02156                             dragBounds = {
02157                                 minX,
02158                                 minY,
02159                                 std::max(dragBoundsRight, addButtonBoundsRight) - minX,
02160                                 std::max(dragBoundsBottom, addButtonBoundsBottom) - minY
02161                             };
02162                         }
02163                     }
02164
02165                     auto dragScreenBounds = otherTabView.XamlRoot().CoordinateConverter().ConvertLocalToScreen(dragBounds);
02166
02167                     m_tabViewBoundsTuples.push_back(std::make_tuple(dragScreenBounds, otherTabView));
02168                 }
02169             }
02170
02171             iterator++;
02172         }
02173     }
02174 }
02175
02176 // At the moment, all TabViews and windows are on the same thread.
02177 // However, that won't always be the case, so to handle things
02178 // when it isn't, we'll lock the accessing of the list of TabViews
02179 // behind a mutex and require its acquisition to interact with the list.
02180 MutexLockedResource<std::list<winrt::weak_ref<winrt::TabView>>> TabView::GetTabViewWithTearOutList()
02181 {
02182     return MutexLockedResource(s_tabWithTearOutListMutex, &s_tabViewWithTearOutList);
02183 }
02184
02185 winrt::InputNonClientPointerSource const& TabView::GetInputNonClientPointerSource()
02186 {
02187     auto windowId = GetAppWindowId();
02188
02189     if (!m_inputNonClientPointerSource && windowId.Value != 0)
02190     {
02191         m_inputNonClientPointerSource = winrt::InputNonClientPointerSource::GetForWindowId(windowId);
02192     }
02193
02194     return m_inputNonClientPointerSource;
02195 }
02196
02197 winrt::ContentCoordinateConverter const& TabView::GetAppWindowCoordinateConverter()
02198 {
02199     auto windowId = GetAppWindowId();
02200
02201     if (!m_appWindowCoordinateConverter && windowId.Value != 0)
02202     {
02203         m_appWindowCoordinateConverter = winrt::ContentCoordinateConverter::CreateForWindowId(windowId);
02204     }
02205
02206     return m_appWindowCoordinateConverter;
02207 }
02208
02209 void TabView::UpdateNonClientRegion()
02210 {
02211     if (auto& nonClientPointerSource = GetInputNonClientPointerSource())
02212     {
02213         auto captionRects = nonClientPointerSource.GetRegionRects(winrt::NonClientRegionKind::Caption);
02214
02215         // We need to preserve non-client caption regions set by components other than us,
02216         // so we'll keep around all caption regions except the one that we set.
02217         std::vector<winrt::RectInt32> captionRegions;
02218         std::for_each(captionRects.cbegin(), captionRects.cend(), [&](winrt::RectInt32 const& rect)
02219             {
02220                 if (!m_nonClientRegionSet || rect != m_nonClientRegion)
02221                 {
02222                     captionRegions.push_back(rect);
02223                 }
02224             });
02225
02226         if (CanTearOutTabs() && IsLoaded())
02227         {
02228             if (auto& listView = m_listView.get())
02229             {
02230                 if (listView.IsLoaded())
02231                 {
02232                     if (auto& appWindowCoordinateConverter = GetAppWindowCoordinateConverter())
02233                     {
02234                         auto listViewBounds = listView.TransformToVisual(nullptr).TransformBounds(winrt::Rect(0, 0, static_cast<float>(listView.ActualWidth()), static_cast<float>(listView.ActualHeight())));
02235
02236                         if (listViewBounds.X < 0 || listViewBounds.Y < 0)
02237                         {
02238                             return;
02239                         }
02240
02241                         // Non-client region rects need to be in the coordinate system of the owning app window, so we'll take our XAML island coordinates,
02242                         // convert them to screen coordinates, and then convert from there to app window coordinates.
02243                         auto appWindowListViewBounds = appWindowCoordinateConverter.ConvertScreenToLocal(XamlRoot().CoordinateConverter().ConvertLocalToScreen(listViewBounds));
02244
02245                         m_nonClientRegion = {
02246                             static_cast<int32_t>(appWindowListViewBounds.X),
02247                             static_cast<int32_t>(appWindowListViewBounds.Y),
02248                             static_cast<int32_t>(appWindowListViewBounds.Width),
02249                             static_cast<int32_t>(appWindowListViewBounds.Height),
02250                         };
02251
02252                         m_nonClientRegionSet = true;
02253
02254                         captionRegions.push_back(m_nonClientRegion);
02255                     }
02256                 }
02257             }
02258         }
02259
02260         nonClientPointerSource.SetRegionRects(winrt::NonClientRegionKind::Caption, captionRegions);
02261     }
02262 }
02263
02264 winrt::WindowId TabView::GetAppWindowId()
02265 {
02266     winrt::WindowId appWindowId{};
02267
02268     if (auto xamlRoot = XamlRoot())
02269     {
02270         if (auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
02271         {
02272             appWindowId = contentIslandEnvironment.AppWindowId();
02273         }
02274     }
02275
02276     if (appWindowId.Value != m_lastAppWindowId.Value)
02277     {
02278         m_lastAppWindowId = appWindowId;
02279
02280         m_inputNonClientPointerSource = nullptr;
02281         m_appWindowCoordinateConverter = nullptr;
02282     }
02283
02284     return appWindowId;
02285 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestHelper.cpp Source File

  • File List
  • File Members
  • SplitButton

SplitButtonTestHelper.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SharedHelpers.h"
00007 #include "SplitButtonTestHelper.h"
00008
00009 thread_local com_ptr<SplitButtonTestHelper> SplitButtonTestHelper::s_instance;
00010
00011 com_ptr<SplitButtonTestHelper> SplitButtonTestHelper::EnsureInstance()
00012 {
00013     if (!s_instance)
00014     {
00015         s_instance = winrt::make_self<SplitButtonTestHelper>();
00016     }
00017
00018     return s_instance;
00019 }
00020
00021 void SplitButtonTestHelper::SimulateTouch(bool value)
00022 {
00023     auto instance = EnsureInstance();
00024     instance->m_simulateTouch = value;
00025 }
00026
00027 bool SplitButtonTestHelper::SimulateTouch()
00028 {
00029     auto instance = EnsureInstance();
00030     return instance->m_simulateTouch;
00031 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlType.h Source File

  • File List
  • File Members
  • dll

XamlType.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class XamlTypeBase :
00007     public winrt::implements<XamlTypeBase, winrt::IXamlType>
00008 {
00009 public:
00010     void AddDPMember(
00011         wstring_view const& name,
00012         wstring_view const& memberTypeName,
00013         winrt::DependencyProperty const& dp,
00014         bool isContent);
00015
00016     void AddMember(
00017         wstring_view const& name,
00018         wstring_view const& memberTypeName,
00019         std::function<winrt::IInspectable(const winrt::IInspectable&)> getter,
00020         std::function<void(const winrt::IInspectable&, const winrt::IInspectable&)> setter,
00021         bool isContent,
00022         bool isDependencyProperty,
00023         bool isAttachable);
00024
00025     // IXamlType
00026     winrt::IXamlType BaseType();
00027     winrt::IXamlMember ContentProperty();
00028     winrt::hstring FullName();
00029     bool IsArray();
00030     bool IsCollection();
00031     bool IsConstructible();
00032     bool IsDictionary();
00033     bool IsMarkupExtension();
00034     bool IsBindable();
00035     winrt::IXamlType ItemType();
00036     winrt::IXamlType KeyType();
00037     winrt::IXamlType BoxedType();
00038     winrt::TypeName UnderlyingType();
00039     winrt::IInspectable ActivateInstance();
00040     winrt::IInspectable CreateFromString(winrt::hstring const& value);
00041     winrt::IXamlMember GetMember(winrt::hstring const& name);
00042     void AddToVector(winrt::IInspectable const& instance, winrt::IInspectable const& value);
00043     void AddToMap(winrt::IInspectable const& instance, winrt::IInspectable const& key, winrt::IInspectable const& value);
00044     void RunInitializer();
00045
00046 protected:
00047
00048     hstring m_typeName;
00049     winrt::IXamlType m_baseType{};
00050     winrt::IXamlType m_boxedType{};
00051
00052     std::function<winrt::IInspectable()> m_activator;
00053     std::function<winrt::IInspectable(hstring)> m_createFromString;
00054     std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> m_collectionAdd;
00055     std::function<void(winrt::IInspectable const&, winrt::IInspectable const&, winrt::IInspectable const&)> m_addToMap;
00056
00057     winrt::IXamlMember m_contentProperty;
00058     std::vector<winrt::IXamlMember> m_members;
00059
00060     bool m_isSystemType = false;
00061     bool m_isBindable = false;
00062 };
00063
00064 class XamlType : public XamlTypeBase
00065 {
00066 public:
00067     XamlType(
00068         wstring_view const& typeName,
00069         wstring_view const& baseTypeName,
00070         std::function<winrt::IInspectable()> activator,
00071         std::function<void(XamlTypeBase&)> populatePropertiesFunc
00072     );
00073
00074     void SetCollectionAddFunc(std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> collectionAdd);
00075     void SetAddToMapFunc(std::function<void(winrt::IInspectable const&, winrt::IInspectable const&, winrt::IInspectable const&)> addToMap);
00076     void SetIsBindable(bool isBindable);
00077 };
00078
00079 class EnumXamlType : public XamlTypeBase
00080 {
00081 public:
00082     EnumXamlType(
00083         wstring_view const& typeName,
00084         std::function<winrt::IInspectable(hstring)> createFromString
00085     );
00086 };
00087
00088 class PrimitiveXamlType : public XamlTypeBase
00089 {
00090 public:
00091     PrimitiveXamlType(wstring_view const& typeName)
00092     {
00093         m_typeName = typeName;
00094         m_isSystemType = true;
00095     }
00096 };
00097
00098 class NullableXamlType : public XamlTypeBase
00099 {
00100 public:
00101     NullableXamlType(wstring_view const& typeName, wstring_view const& valueTypeName);
00102 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapElementsLayer.properties.cpp Source File

  • File List
  • File Members
  • Generated

MapElementsLayer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MapElementsLayer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(MapElementsLayer)
00012 }
00013
00014 #include "MapElementsLayer.g.cpp"
00015
00016 GlobalDependencyProperty MapElementsLayerProperties::s_MapElementsProperty{ nullptr };
00017
00018 MapElementsLayerProperties::MapElementsLayerProperties()
00019     : m_mapElementClickEventSource{static_cast<MapElementsLayer*>(this)}
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void MapElementsLayerProperties::EnsureProperties()
00025 {
00026     if (!s_MapElementsProperty)
00027     {
00028         s_MapElementsProperty =
00029             InitializeDependencyProperty(
00030                 L"MapElements",
00031                 winrt::name_of<winrt::IVector<winrt::MapElement>>(),
00032                 winrt::name_of<winrt::MapElementsLayer>(),
00033                 false /* isAttached */,
00034                 ValueHelper<winrt::IVector<winrt::MapElement>>::BoxedDefaultValue(),
00035                 winrt::PropertyChangedCallback(&OnMapElementsPropertyChanged));
00036     }
00037 }
00038
00039 void MapElementsLayerProperties::ClearProperties()
00040 {
00041     s_MapElementsProperty = nullptr;
00042 }
00043
00044 void MapElementsLayerProperties::OnMapElementsPropertyChanged(
00045     winrt::DependencyObject const& sender,
00046     winrt::DependencyPropertyChangedEventArgs const& args)
00047 {
00048     auto owner = sender.as<winrt::MapElementsLayer>();
00049     winrt::get_self<MapElementsLayer>(owner)->OnPropertyChanged(args);
00050 }
00051
00052 void MapElementsLayerProperties::MapElements(winrt::IVector<winrt::MapElement> const& value)
00053 {
00054     [[gsl::suppress(con)]]
00055     {
00056     static_cast<MapElementsLayer*>(this)->SetValue(s_MapElementsProperty, ValueHelper<winrt::IVector<winrt::MapElement>>::BoxValueIfNecessary(value));
00057     }
00058 }
00059
00060 winrt::IVector<winrt::MapElement> MapElementsLayerProperties::MapElements()
00061 {
00062     return ValueHelper<winrt::IVector<winrt::MapElement>>::CastOrUnbox(static_cast<MapElementsLayer*>(this)->GetValue(s_MapElementsProperty));
00063 }
00064
00065 winrt::event_token MapElementsLayerProperties::MapElementClick(winrt::TypedEventHandler<winrt::MapElementsLayer, winrt::MapElementClickEventArgs> const& value)
00066 {
00067     return m_mapElementClickEventSource.add(value);
00068 }
00069
00070 void MapElementsLayerProperties::MapElementClick(winrt::event_token const& token)
00071 {
00072     m_mapElementClickEventSource.remove(token);
00073 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/RefreshContainerOnImagePage.xaml.cs Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • TestUI

RefreshContainerOnImagePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.IO;
00007 using System.Linq;
00008 using System.Runtime.InteropServices.WindowsRuntime;
00009 using Windows.Foundation;
00010 using Windows.Foundation.Collections;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Controls.Primitives;
00014 using Microsoft.UI.Xaml.Data;
00015 using Microsoft.UI.Xaml.Input;
00016 using Microsoft.UI.Xaml.Media;
00017 using Microsoft.UI.Xaml.Media.Imaging;
00018 using Microsoft.UI.Xaml.Navigation;
00019 using Microsoft.UI.Private.Controls;
00020 using MUXControlsTestApp;
00021 using MUXControlsTestApp.Utilities;
00022
00023 namespace MUXControlsTestApp
00024 {
00025     public sealed partial class RefreshContainerOnImagePage : TestPage
00026     {
00027         public RefreshContainerOnImagePage()
00028         {
00029             this.InitializeComponent();
00030             this.Loaded += OnMainPageLoaded;
00031
00032             timer.Interval = new TimeSpan(0, 0, 0, 0, 800);
00033             timer.Tick += Timer_Tick;
00034         }
00035
00036         private DispatcherTimer timer = new DispatcherTimer();
00037         bool containerHasHandler = true;
00038         private bool delayRefresh = true;
00039         private int refreshCount = 0;
00040
00041         protected override void OnNavigatedFrom(NavigationEventArgs e)
00042         {
00043             base.OnNavigatedFrom(e);
00044             timer.Stop();
00045         }
00046
00047         private void OnMainPageLoaded(object sender, RoutedEventArgs e)
00048         {
00049             this.RefreshContainer.Visualizer.SizeChanged += RefreshVisualizer_SizeChanged;
00050             ((IRefreshContainerPrivate)this.RefreshContainer).RefreshInfoProviderAdapter = new ImageIRefreshInfoProviderAdapter(this.RefreshContainer.PullDirection, new AnimationHandler(RefreshContainer, this.RefreshContainer.PullDirection));
00051
00052             this.RefreshContainer.Visualizer.RefreshStateChanged += RefreshVisualizer_RefreshStateChanged;
00053             ResetStatesComboBox();
00054             ResetInteractionRatiosComboBox();
00055             this.RefreshOnContainerButton.Click += RefreshOnContainerButton_Click;
00056             this.RefreshOnVisualizerButton.Click += RefreshOnVisualizerButton_Click;
00057             this.ResetStates.Click += ResetStates_Click;
00058             this.ResetInteractionRatios.Click += ResetInteractionRatios_Click;
00059             this.AdaptButton.Click += AdaptButton_Click;
00060             this.RotateButton.Click += RotateButton_Click;
00061             this.ChangeAlignment.Click += ChangeAlignmentButton_Click;
00062             this.AddOrRemoveRefreshDelay.Click += AddOrRemoveRefreshDelayButton_Click;
00063             this.ChangeRefreshRequested.Click += ChangeRefreshRequestedButton_Click;
00064         }
00065
00066         private void RefreshContainer_RefreshRequested(object sender, RefreshRequestedEventArgs e)
00067         {
00068             if (delayRefresh)
00069             {
00070                 this.RefreshCompletionDeferral = e.GetDeferral();
00071             }
00072             else
00073             {
00074                 e.GetDeferral().Complete();
00075             }
00076             refreshCount++;
00077             this.RefreshCount.Text = refreshCount.ToString();
00078             timer.Start();
00079         }
00080
00081         private void RefreshVisualizer_SizeChanged(object sender, SizeChangedEventArgs e)
00082         {
00083             ((IRefreshContainerPrivate)this.RefreshContainer).RefreshInfoProviderAdapter = new ImageIRefreshInfoProviderAdapter(this.RefreshContainer.PullDirection, new AnimationHandler(RefreshContainer, this.RefreshContainer.PullDirection));
00084         }
00085
00086         private void RefreshInfoProvider_InteractionRatioChanged(IRefreshInfoProvider sender, RefreshInteractionRatioChangedEventArgs args)
00087         {
00088             UpdateInteractionRatiosComboBox(args.InteractionRatio);
00089         }
00090
00091         private void RefreshOnContainerButton_Click(object sender, RoutedEventArgs e)
00092         {
00093             this.RefreshContainer.RequestRefresh();
00094         }
00095
00096         private void RefreshOnVisualizerButton_Click(object sender, RoutedEventArgs e)
00097         {
00098             this.RefreshContainer.Visualizer.RequestRefresh();
00099         }
00100
00101         private void RotateButton_Click(object sender, RoutedEventArgs e)
00102         {
00103             switch (this.RefreshContainer.PullDirection)
00104             {
00105                 case (RefreshPullDirection.TopToBottom):
00106                     this.RefreshContainer.PullDirection = RefreshPullDirection.LeftToRight;
00107                     break;
00108                 case (RefreshPullDirection.LeftToRight):
00109                     this.RefreshContainer.PullDirection = RefreshPullDirection.BottomToTop;
00110                     break;
00111                 case (RefreshPullDirection.BottomToTop):
00112                     this.RefreshContainer.PullDirection = RefreshPullDirection.RightToLeft;
00113                     break;
00114                 case (RefreshPullDirection.RightToLeft):
00115                     this.RefreshContainer.PullDirection = RefreshPullDirection.TopToBottom;
00116                     break;
00117             }
00118             ((IRefreshContainerPrivate)this.RefreshContainer).RefreshInfoProviderAdapter = new ImageIRefreshInfoProviderAdapter(this.RefreshContainer.PullDirection, new AnimationHandler(RefreshContainer, this.RefreshContainer.PullDirection));
00119         }
00120
00121         private void ChangeAlignmentButton_Click(object sender, RoutedEventArgs e)
00122         {
00123             switch (this.RefreshContainer.VerticalAlignment)
00124             {
00125                 case (VerticalAlignment.Center):
00126                     if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Center)
00127                     {
00128                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Top;
00129                     }
00130                     if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Left)
00131                     {
00132                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
00133                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Bottom;
00134                     }
00135                     if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Right)
00136                     {
00137                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
00138                     }
00139                     break;
00140                 case (VerticalAlignment.Top):
00141                     {
00142                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Left;
00143                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
00144                         break;
00145                     }
00146                 case (VerticalAlignment.Bottom):
00147                     {
00148                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Right;
00149                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
00150                         break;
00151                     }
00152             }
00153         }
00154
00155         private void AddOrRemoveRefreshDelayButton_Click(object sender, RoutedEventArgs e)
00156         {
00157             delayRefresh = !delayRefresh;
00158         }
00159
00160         private void ChangeRefreshRequestedButton_Click(object sender, RoutedEventArgs e)
00161         {
00162             if (containerHasHandler)
00163             {
00164                 this.RefreshContainer.RefreshRequested -= RefreshContainer_RefreshRequested;
00165                 this.RefreshContainer.Visualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
00166             }
00167             else
00168             {
00169                 this.RefreshContainer.RefreshRequested += RefreshContainer_RefreshRequested;
00170                 this.RefreshContainer.Visualizer.RefreshRequested -= RefreshVisualizer_RefreshRequested;
00171             }
00172             containerHasHandler = !containerHasHandler;
00173         }
00174
00175         private void AdaptButton_Click(object sender, RoutedEventArgs e)
00176         {
00177             IRefreshContainerPrivate refreshContainerPrivate = (IRefreshContainerPrivate)this.RefreshContainer;
00178             IRefreshVisualizerPrivate refreshVisualizerPrivate = (IRefreshVisualizerPrivate)this.RefreshContainer.Visualizer;
00179
00180             if (refreshVisualizerPrivate.InfoProvider != null)
00181             {
00182                 refreshVisualizerPrivate.InfoProvider.InteractionRatioChanged -= RefreshInfoProvider_InteractionRatioChanged;
00183             }
00184
00185             refreshVisualizerPrivate.InfoProvider = refreshContainerPrivate.RefreshInfoProviderAdapter.AdaptFromTree(this.Image, this.RefreshContainer.Visualizer.RenderSize);
00186
00187             refreshContainerPrivate.RefreshInfoProviderAdapter.SetAnimations(this.RefreshContainer.Visualizer);
00188             refreshVisualizerPrivate.InfoProvider.InteractionRatioChanged += RefreshInfoProvider_InteractionRatioChanged;
00189         }
00190
00191         private void RefreshVisualizer_RefreshStateChanged(RefreshVisualizer sender, RefreshStateChangedEventArgs args)
00192         {
00193             UpdateStatesComboBox(args.NewState);
00194         }
00195
00196         private void ResetStates_Click(object sender, RoutedEventArgs e)
00197         {
00198             ResetStatesComboBox();
00199         }
00200
00201         private void ResetInteractionRatios_Click(object sender, RoutedEventArgs e)
00202         {
00203             ResetInteractionRatiosComboBox();
00204         }
00205
00206         private void UpdateStatesComboBox(RefreshVisualizerState state)
00207         {
00208             this.States.Items.Add(state.ToString());
00209             this.States.SelectedIndex = this.States.Items.Count - 1;
00210         }
00211
00212         private void UpdateInteractionRatiosComboBox(double interactionRatio)
00213         {
00214             this.InteractionRatios.Items.Add(interactionRatio.ToString());
00215             this.InteractionRatios.SelectedIndex = this.InteractionRatios.Items.Count - 1;
00216         }
00217
00218         private void ResetStatesComboBox()
00219         {
00220             this.States.Items.Clear();
00221             UpdateStatesComboBox(this.RefreshContainer.Visualizer.State);
00222         }
00223
00224         private void ResetInteractionRatiosComboBox()
00225         {
00226             this.InteractionRatios.Items.Clear();
00227             UpdateInteractionRatiosComboBox(0.0);
00228         }
00229
00230         private void RefreshVisualizer_RefreshRequested(object sender, RefreshRequestedEventArgs e)
00231         {
00232             if (delayRefresh)
00233             {
00234                 this.RefreshCompletionDeferral = e.GetDeferral();
00235             }
00236             else
00237             {
00238                 e.GetDeferral().Complete();
00239
00240                 BitmapImage bitmapImage = new BitmapImage();
00241                 Image.Width = bitmapImage.DecodePixelWidth = 300;
00242                 bitmapImage.UriSource = new Uri(Image.BaseUri, "Assets/ingredient" + ((refreshCount % 8) + 1).ToString() + ".png");
00243                 Image.Source = bitmapImage;
00244             }
00245             refreshCount++;
00246             this.RefreshCount.Text = refreshCount.ToString();
00247             timer.Start();
00248         }
00249
00250         private Deferral RefreshCompletionDeferral
00251         {
00252             get;
00253             set;
00254         }
00255
00256         private void Timer_Tick(object sender, object e)
00257         {
00258             timer.Stop();
00259
00260             if (this.RefreshCompletionDeferral != null)
00261             {
00262                 BitmapImage bitmapImage = new BitmapImage();
00263                 Image.Width = bitmapImage.DecodePixelWidth = 300;
00264                 bitmapImage.UriSource = new Uri(Image.BaseUri, "Assets/ingredient" + ((refreshCount % 8) + 1).ToString() + ".png");
00265                 Image.Source = bitmapImage;
00266
00267                 this.RefreshCompletionDeferral.Complete();
00268                 this.RefreshCompletionDeferral.Dispose();
00269                 this.RefreshCompletionDeferral = null;
00270             }
00271         }
00272     }
00273 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ObservableVector< T >::Iterator Member List

This is the complete list of members for ObservableVector< T >::Iterator, including all inherited members.
Current() const | ObservableVector< T >::Iterator | [inline]
GetMany(winrt::array_view< winrt::IInspectable > value) | ObservableVector< T >::Iterator | [inline]
HasCurrent() const noexcept | ObservableVector< T >::Iterator | [inline]
Iterator(winrt::IIterator< T > &&inner) noexcept | ObservableVector< T >::Iterator | [inline, explicit]
m_inner | ObservableVector< T >::Iterator | [private]
MoveNext() noexcept | ObservableVector< T >::Iterator | [inline]
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeItemsProperties Member List

This is the complete list of members for SwipeItemsProperties, including all inherited members.
ClearProperties() | SwipeItemsProperties | [static]
EnsureProperties() | SwipeItemsProperties | [static]
Mode(winrt::SwipeMode const &value) | SwipeItemsProperties |
Mode() | SwipeItemsProperties |
ModeProperty() | SwipeItemsProperties | [inline, static]
OnModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemsProperties | [static]
s_ModeProperty | SwipeItemsProperties | [static]
SwipeItemsProperties() | SwipeItemsProperties |
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTests Member List

This is the complete list of members for ScrollPresenterTests, including all inherited members.
AddScrollVelocity(ScrollPresenter scrollPresenter, float horizontalVelocity, float verticalVelocity, float?horizontalInertiaDecayRate, float?verticalInertiaDecayRate, bool waitForViewChangeCompletion=true, bool hookViewChangingAndChanged=true) | ScrollPresenterTests | [inline, private]
AddSnapPoints(ScrollPresenter scrollPresenter, StackPanel stackPanel) | ScrollPresenterTests | [inline, private]
AddZoomVelocity(ScrollPresenter scrollPresenter, float zoomFactorVelocity, float?inertiaDecayRate, float centerPointX, float centerPointY, bool waitForViewChangeCompletion=true, bool hookViewChangingAndChanged=true) | ScrollPresenterTests | [inline, private]
AnchoringAtAlmostBottomEdge() | ScrollPresenterTests | [inline]
AnchoringAtAlmostFarEdge(Orientation orientation) | ScrollPresenterTests | [inline, private]
AnchoringAtAlmostLeftEdge() | ScrollPresenterTests | [inline]
AnchoringAtAlmostNearEdge(Orientation orientation) | ScrollPresenterTests | [inline, private]
AnchoringAtAlmostRightEdge() | ScrollPresenterTests | [inline]
AnchoringAtAlmostTopEdge() | ScrollPresenterTests | [inline]
AnchoringAtBottomEdgeWhileDecreasingViewportHeight() | ScrollPresenterTests | [inline]
AnchoringAtBottomEdgeWhileIncreasingContentAndDecreasingViewportHeight() | ScrollPresenterTests | [inline]
AnchoringAtBottomEdgeWhileIncreasingContentAndViewportHeight() | ScrollPresenterTests | [inline]
AnchoringAtBottomEdgeWhileIncreasingContentHeight() | ScrollPresenterTests | [inline]
AnchoringAtFarEdgeWhileDecreasingViewport(Orientation orientation) | ScrollPresenterTests | [inline, private]
AnchoringAtFarEdgeWhileIncreasingContent(Orientation orientation, double viewportSizeChange, double expectedFinalOffset) | ScrollPresenterTests | [inline, private]
AnchoringAtLeftEdge() | ScrollPresenterTests | [inline]
AnchoringAtNearEdge(Orientation orientation) | ScrollPresenterTests | [inline, private]
AnchoringAtRepeaterMiddle() | ScrollPresenterTests | [inline]
AnchoringAtRightEdgeWhileDecreasingViewportWidth() | ScrollPresenterTests | [inline]
AnchoringAtRightEdgeWhileIncreasingContentAndDecreasingViewportWidth() | ScrollPresenterTests | [inline]
AnchoringAtRightEdgeWhileIncreasingContentAndViewportWidth() | ScrollPresenterTests | [inline]
AnchoringAtRightEdgeWhileIncreasingContentWidth() | ScrollPresenterTests | [inline]
AnchoringAtTopEdge() | ScrollPresenterTests | [inline]
AnchoringElementWithGrowningViewport() | ScrollPresenterTests | [inline]
AnchoringElementWithResizedViewport(Orientation orientation, double viewportSizeChange) | ScrollPresenterTests | [inline, private]
AnchoringElementWithShrinkingViewport() | ScrollPresenterTests | [inline]
AnchoringWithOffsetCoercion(bool reduceAnchorOffset) | ScrollPresenterTests | [inline, private]
AnchoringWithReducedExtent() | ScrollPresenterTests | [inline]
AnchoringWithReducedExtentAndAnchorOffset() | ScrollPresenterTests | [inline]
AnimateOffsetsBeforeLoading() | ScrollPresenterTests | [inline]
AnimateZoomFactorBeforeLoading() | ScrollPresenterTests | [inline]
BasicAlignment() | ScrollPresenterTests | [inline]
BasicImageWithConstrainedHeight() | ScrollPresenterTests | [inline]
BasicImageWithConstrainedWidth() | ScrollPresenterTests | [inline]
BasicMargin() | ScrollPresenterTests | [inline]
BasicMarginAndAlignment() | ScrollPresenterTests | [inline]
BasicOffsetChanges() | ScrollPresenterTests | [inline]
BasicOffsetsChangeCancelation() | ScrollPresenterTests | [inline]
BasicPadding() | ScrollPresenterTests | [inline]
BasicZoomFactorChangeCancelation() | ScrollPresenterTests | [inline]
BasicZoomFactorChanges() | ScrollPresenterTests | [inline]
BiDirectionalAlignment enum name | ScrollPresenterTests | [private]
BiDirectionalAlignmentFromHorizontalAlignment(HorizontalAlignment horizontalAlignment) | ScrollPresenterTests | [inline, private]
BiDirectionalAlignmentFromVerticalAlignment(VerticalAlignment verticalAlignment) | ScrollPresenterTests | [inline, private]
BringContentWithMarginIntoView() | ScrollPresenterTests | [inline]
BringElementInNestedScrollPresentersIntoView(Orientation orientation, double expectedOuterHorizontalOffset, double expectedOuterVerticalOffset, double expectedInnerHorizontalOffset, double expectedInnerVerticalOffset, BringIntoViewOptions options=null, double originalOuterHorizontalOffset=0.0, double originalOuterVerticalOffset=0.0, float originalOuterZoomFactor=1.0f, double originalInnerHorizontalOffset=0.0, double originalInnerVerticalOffset=0.0, float originalInnerZoomFactor=1.0f, bool applySnapPointsInBringingIntoViewHandler=false) | ScrollPresenterTests | [inline, private]
BringElementInNestedScrollViewersIntoView(Orientation orientation, double expectedOuterHorizontalOffset, double expectedOuterVerticalOffset, double expectedInnerHorizontalOffset, double expectedInnerVerticalOffset, BringIntoViewOptions options=null) | ScrollPresenterTests | [inline, private]
BringElementIntoHorizontalScrollPresenterViewFromFarEdge() | ScrollPresenterTests | [inline]
BringElementIntoHorizontalScrollPresenterViewFromNearEdge() | ScrollPresenterTests | [inline]
BringElementIntoHorizontalScrollPresenterViewWithFarAlignment() | ScrollPresenterTests | [inline]
BringElementIntoHorizontalScrollPresenterViewWithMiddleAlignment() | ScrollPresenterTests | [inline]
BringElementIntoHorizontalScrollPresenterViewWithNearAlignment() | ScrollPresenterTests | [inline]
BringElementIntoHorizontalScrollPresenterViewWithOffset() | ScrollPresenterTests | [inline]
BringElementIntoHorizontalScrollPresenterViewWithOffsetFromFarEdge() | ScrollPresenterTests | [inline]
BringElementIntoHorizontalScrollPresenterViewWithSnapPoints() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewFromFarEdge() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewFromNearEdge() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewWithFarAlignment() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewWithMiddleAlignment() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewWithNearAlignment() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewWithOffset() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewWithOffsetFromFarEdge() | ScrollPresenterTests | [inline]
BringElementIntoVerticalScrollPresenterViewWithSnapPoints() | ScrollPresenterTests | [inline]
BringElementIntoView(Orientation orientation, double expectedHorizontalOffset, double expectedVerticalOffset, BringIntoViewOptions options=null, double originalHorizontalOffset=0.0, double originalVerticalOffset=0.0, float originalZoomFactor=1.0f, bool applyOptionsInBringingIntoViewHandler=false, bool applySnapPointsInBringingIntoViewHandler=false) | ScrollPresenterTests | [inline, private]
BringElementIntoViewWithAdjustmentInBringingIntoViewHandler() | ScrollPresenterTests | [inline]
BringElementIntoViewWithAlignment(Orientation orientation, double alignmentRatio, double expectedHorizontalOffset, double expectedVerticalOffset) | ScrollPresenterTests | [inline, private]
BringElementIntoViewWithOffset(Orientation orientation, double offset, double expectedHorizontalOffset, double expectedVerticalOffset, double originalHorizontalOffset=0.0, double originalVerticalOffset=0.0, float originalZoomFactor=1.0f) | ScrollPresenterTests | [inline, private]
BringElementIntoViewWithTargetRect() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollPresenterView() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollPresenterViewFromFarEdge() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollPresenterViewWithNearAlignment() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollPresenterViewWithOffset() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollPresenterViewWithSnapPoints() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollViewerView() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollViewerViewWithNearAlignment() | ScrollPresenterTests | [inline]
BringNestedElementIntoHorizontalScrollViewerViewWithOffset() | ScrollPresenterTests | [inline]
BringNestedElementIntoVerticalScrollPresenterView() | ScrollPresenterTests | [inline]
BringNestedElementIntoVerticalScrollPresenterViewFromFarEdge() | ScrollPresenterTests | [inline]
BringNestedElementIntoVerticalScrollPresenterViewWithMiddleAlignment() | ScrollPresenterTests | [inline]
BringNestedElementIntoVerticalScrollPresenterViewWithOffset() | ScrollPresenterTests | [inline]
BringNestedElementIntoVerticalScrollViewerView() | ScrollPresenterTests | [inline]
BringNestedElementIntoVerticalScrollViewerViewWithMiddleAlignment() | ScrollPresenterTests | [inline]
BringNestedElementIntoVerticalScrollViewerViewWithOffset() | ScrollPresenterTests | [inline]
c_defaultAnchoringUIRepeaterChildrenCount | ScrollPresenterTests | [private]
c_defaultAnchoringUIScrollPresenterConstrainedSize | ScrollPresenterTests | [private]
c_defaultAnchoringUIScrollPresenterNonConstrainedSize | ScrollPresenterTests | [private]
c_defaultAnchoringUIStackPanelChildrenCount | ScrollPresenterTests | [private]
c_defaultAnchorRatio | ScrollPresenterTests | [private]
c_defaultBringIntoViewUIScrollPresenterConstrainedSize | ScrollPresenterTests | [private]
c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize | ScrollPresenterTests | [private]
c_defaultBringIntoViewUIStackPanelChildrenCount | ScrollPresenterTests | [private]
c_defaultContentOrientation | ScrollPresenterTests | [private]
c_defaultHorizontalOffset | ScrollPresenterTests | [private]
c_defaultHorizontalScrollChainMode | ScrollPresenterTests | [private]
c_defaultHorizontalScrollMode | ScrollPresenterTests | [private]
c_defaultHorizontalScrollRailMode | ScrollPresenterTests | [private]
c_defaultIgnoredInputKinds | ScrollPresenterTests | [private]
c_defaultMaxZoomFactor | ScrollPresenterTests | [private]
c_defaultMinZoomFactor | ScrollPresenterTests | [private]
c_defaultOffsetResultTolerance | ScrollPresenterTests | [private]
c_defaultState | ScrollPresenterTests | [private]
c_defaultUIScrollControllerThickness | ScrollPresenterTests | [private]
c_defaultUIScrollPresenterContentHeight | ScrollPresenterTests | [private]
c_defaultUIScrollPresenterContentWidth | ScrollPresenterTests | [private]
c_defaultUIScrollPresenterHeight | ScrollPresenterTests | [private]
c_defaultUIScrollPresenterWidth | ScrollPresenterTests | [private]
c_defaultVerticalOffset | ScrollPresenterTests | [private]
c_defaultVerticalScrollChainMode | ScrollPresenterTests | [private]
c_defaultVerticalScrollMode | ScrollPresenterTests | [private]
c_defaultVerticalScrollRailMode | ScrollPresenterTests | [private]
c_defaultZoomChainMode | ScrollPresenterTests | [private]
c_defaultZoomFactor | ScrollPresenterTests | [private]
c_defaultZoomMode | ScrollPresenterTests | [private]
c_expressionAnimationSourcesExtentPropertyName | ScrollPresenterTests | [private]
c_expressionAnimationSourcesMaxPositionPropertyName | ScrollPresenterTests | [private]
c_expressionAnimationSourcesMinPositionPropertyName | ScrollPresenterTests | [private]
c_expressionAnimationSourcesOffsetPropertyName | ScrollPresenterTests | [private]
c_expressionAnimationSourcesPositionPropertyName | ScrollPresenterTests | [private]
c_expressionAnimationSourcesViewportPropertyName | ScrollPresenterTests | [private]
c_expressionAnimationSourcesZoomFactorPropertyName | ScrollPresenterTests | [private]
c_MaxStockOffsetsChangeDuration | ScrollPresenterTests | [private]
c_MaxStockZoomFactorChangeDuration | ScrollPresenterTests | [private]
c_MaxWaitDuration | ScrollPresenterTests | [private]
c_visualHorizontalOffsetTargetedPropertyName | ScrollPresenterTests | [private]
c_visualScaleTargetedPropertyName | ScrollPresenterTests | [private]
c_visualVerticalOffsetTargetedPropertyName | ScrollPresenterTests | [private]
CanAddAndRemoveSnapPointsFromAScrollPresenter() | ScrollPresenterTests | [inline]
CanAddAndRemoveSnapPointsFromAScrollPresenter(ScrollSnapPointsAlignment alignment) | ScrollPresenterTests | [inline, private]
CanAddScrollSnapPointsWithMixedAlignments() | ScrollPresenterTests | [inline]
CanShareSnapPointsInMultipleCollections() | ScrollPresenterTests | [inline]
ChangeOffsetsBeforeLoading(bool animate) | ScrollPresenterTests | [inline, private]
ChangeOffsetsWhileBiDirectionalScrollControllerIsAttached() | ScrollPresenterTests | [inline]
ChangeOffsetsWhileScrollControllersAreAttached() | ScrollPresenterTests | [inline]
ChangeOffsetsWithAdditionalVelocityAndAttachedBiDirectionalScrollController() | ScrollPresenterTests | [inline]
ChangeOffsetsWithAdditionalVelocityAndAttachedScrollControllers() | ScrollPresenterTests | [inline]
ChangeOffsetsWithAttachedBiDirectionalScrollController() | ScrollPresenterTests | [inline]
ChangeOffsetsWithAttachedScrollControllers() | ScrollPresenterTests | [inline]
ChangeZoomFactorBeforeLoading(bool animate) | ScrollPresenterTests | [inline, private]
ConsecutiveOffsetJumps() | ScrollPresenterTests | [inline]
ConsecutiveOffsetJumps(bool waitForFirstCompletion) | ScrollPresenterTests | [inline, private]
ConsecutiveScrollAndZoomJumps() | ScrollPresenterTests | [inline]
ConsecutiveScrollAndZoomJumps(bool isScrollRelative, bool isZoomRelative, bool waitForFirstCompletion) | ScrollPresenterTests | [inline, private]
ConsecutiveZoomAndScrollJumps() | ScrollPresenterTests | [inline]
ConsecutiveZoomAndScrollJumps(bool isZoomRelative, bool isScrollRelative, bool waitForFirstCompletion) | ScrollPresenterTests | [inline, private]
ConsecutiveZoomFactorJumps() | ScrollPresenterTests | [inline]
ConsecutiveZoomFactorJumps(bool isFirstZoomRelative, bool isSecondZoomRelative, bool waitForFirstCompletion) | ScrollPresenterTests | [inline, private]
GetArrangeRenderSizesDelta(BiDirectionalAlignment alignment, double extentSize, double renderSize, double nearMargin, double farMargin) | ScrollPresenterTests | [inline, private]
GetEffectiveIsAnimationEnabled(ScrollingAnimationMode animationMode, bool?isAnimationsEnabledOverride) | ScrollPresenterTests | [inline, private]
ImageWithConstrainedHeight() | ScrollPresenterTests | [inline]
ImageWithConstrainedSize() | ScrollPresenterTests | [inline]
ImageWithConstrainedWidth() | ScrollPresenterTests | [inline]
ImageWithUnnaturalSize() | ScrollPresenterTests | [inline]
InsertStackPanelChild(StackPanel stackPanel, int operationCount, int newIndex, int newCount, string namePrefix="") | ScrollPresenterTests | [inline, private]
InterruptOffsetsChangeWithOffsetsChange() | ScrollPresenterTests | [inline]
InterruptOffsetsChangeWithZoomFactorChange() | ScrollPresenterTests | [inline]
InterruptViewChange(ViewChangeInterruptionKind viewChangeInterruptionKind) | ScrollPresenterTests | [inline, private]
InterruptViewChangeWithUnloading() | ScrollPresenterTests | [inline]
InterruptZoomFactorChangeWithOffsetsChange() | ScrollPresenterTests | [inline]
InterruptZoomFactorChangeWithZoomFactorChange() | ScrollPresenterTests | [inline]
ListenToContentEffectiveViewportChanged() | ScrollPresenterTests | [inline]
OffsetJumpAfterContentResizing() | ScrollPresenterTests | [inline]
OffsetsChangeWithCustomDuration() | ScrollPresenterTests | [inline]
OffsetsChangeWithNoContent() | ScrollPresenterTests | [inline]
OverlappingRepeatedSnapPointsThrow() | ScrollPresenterTests | [inline]
PinchContentThroughMaxZoomFactor() | ScrollPresenterTests | [inline]
ReadExpressionAnimationSources() | ScrollPresenterTests | [inline]
RightToLeftFlowDirection() | ScrollPresenterTests | [inline]
ScrollBy(ScrollPresenter scrollPresenter, double horizontalOffsetDelta, double verticalOffsetDelta, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null, double?expectedFinalHorizontalOffset=null, double?expectedFinalVerticalOffset=null) | ScrollPresenterTests | [inline, private]
scrollStartingCount | ScrollPresenterTests | [private]
ScrollTo(ScrollPresenter scrollPresenter, double horizontalOffset, double verticalOffset, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null, double?expectedFinalHorizontalOffset=null, double?expectedFinalVerticalOffset=null) | ScrollPresenterTests | [inline, private]
SetInvalidMaxZoomFactorValues() | ScrollPresenterTests | [inline]
SetInvalidMinZoomFactorValues() | ScrollPresenterTests | [inline]
SetOffsetsBeforeLoading() | ScrollPresenterTests | [inline]
SettingScrollControllerProperties() | ScrollPresenterTests | [inline]
SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter(Orientation orientation, ScrollPresenter outerScrollPresenter, ScrollPresenter innerScrollPresenter, AutoResetEvent outerScrollPresenterLoadedEvent, AutoResetEvent innerScrollPresenterLoadedEvent) | ScrollPresenterTests | [inline, private]
SetupBringIntoViewUIWithScrollViewerInsideScrollViewer(Orientation orientation, ScrollViewer outerScrollViewer, ScrollViewer innerScrollViewer, AutoResetEvent outerScrollViewerLoadedEvent, AutoResetEvent innerScrollViewerLoadedEvent) | ScrollPresenterTests | [inline, private]
SetupDefaultAnchoringUI(Orientation orientation, ScrollPresenter scrollPresenter, AutoResetEvent scrollPresenterLoadedEvent) | ScrollPresenterTests | [inline, private]
SetupDefaultBringIntoViewUI(Orientation orientation, ScrollPresenter scrollPresenter, AutoResetEvent scrollPresenterLoadedEvent, bool setAsContentRoot=true) | ScrollPresenterTests | [inline, private]
SetupDefaultBringIntoViewUIWithScrollViewer(Orientation orientation, ScrollViewer scrollViewer, AutoResetEvent scrollViewerLoadedEvent, bool setAsContentRoot=true) | ScrollPresenterTests | [inline, private]
SetupDefaultUI(ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, AutoResetEvent scrollPresenterLoadedEvent, bool setAsContentRoot=true) | ScrollPresenterTests | [inline, private]
SetupRepeaterAnchoringUI(ScrollPresenter scrollPresenter, AutoResetEvent scrollPresenterLoadedEvent) | ScrollPresenterTests | [inline, private]
SetupUIWithBiDirectionalScrollController(ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, BiDirectionalScrollController biDirectionalScrollController, AutoResetEvent loadedEvent) | ScrollPresenterTests | [inline, private]
SetupUIWithScrollControllers(ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, CompositionScrollController horizontalScrollController, CompositionScrollController verticalScrollController, AutoResetEvent loadedEvent) | ScrollPresenterTests | [inline, private]
SetZoomFactorBeforeLoading() | ScrollPresenterTests | [inline]
SnapPointsWithInvalidArgsThrow() | ScrollPresenterTests | [inline]
SnapToFirstRepeatedScrollSnapPoint() | ScrollPresenterTests | [inline]
SnapToFirstRepeatedZoomSnapPoint() | ScrollPresenterTests | [inline]
SpyTranslationAndScale(ScrollPresenter scrollPresenter, Compositor compositor, out float horizontalOffset, out float verticalOffset, out float zoomFactor) | ScrollPresenterTests | [inline, private]
StartAddScrollVelocity(ScrollPresenter scrollPresenter, float horizontalVelocity, float verticalVelocity, float?horizontalInertiaDecayRate, float?verticalInertiaDecayRate, AutoResetEvent scrollPresenterViewChangeOperationEvent) | ScrollPresenterTests | [inline, private]
StartAddZoomVelocity(ScrollPresenter scrollPresenter, float zoomFactorVelocity, float?inertiaDecayRate, float centerPointX, float centerPointY, AutoResetEvent scrollPresenterViewChangeOperationEvent) | ScrollPresenterTests | [inline, private]
StartScrollBy(ScrollPresenter scrollPresenter, double horizontalOffsetDelta, double verticalOffsetDelta, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent) | ScrollPresenterTests | [inline, private]
StartScrollTo(ScrollPresenter scrollPresenter, double horizontalOffset, double verticalOffset, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent) | ScrollPresenterTests | [inline, private]
StartZoomBy(ScrollPresenter scrollPresenter, float zoomFactorDelta, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent) | ScrollPresenterTests | [inline, private]
StartZoomTo(ScrollPresenter scrollPresenter, float zoomFactor, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, AutoResetEvent scrollPresenterViewChangeOperationEvent) | ScrollPresenterTests | [inline, private]
StretchAlignment() | ScrollPresenterTests | [inline]
StretchContentThroughMinZoomFactor() | ScrollPresenterTests | [inline]
StretchedImage() | ScrollPresenterTests | [inline]
SuccessiveAdditionalScrollVelocities() | ScrollPresenterTests | [inline]
SuccessiveAdditionalZoomVelocities() | ScrollPresenterTests | [inline]
ValidateContentWithConstrainedHeight(Compositor compositor, ScrollPresenter scrollPresenter, FrameworkElement content, VerticalAlignment verticalAlignment, double topMargin, double bottomMargin, float expectedMinPosition, float expectedZoomFactor) | ScrollPresenterTests | [inline, private]
ValidateContentWithConstrainedSize(Compositor compositor, ScrollPresenter scrollPresenter, FrameworkElement content, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, float expectedMinPositionX, float expectedMinPositionY, float expectedZoomFactor) | ScrollPresenterTests | [inline, private]
ValidateContentWithConstrainedWidth(Compositor compositor, ScrollPresenter scrollPresenter, FrameworkElement content, HorizontalAlignment horizontalAlignment, double leftMargin, double rightMargin, float expectedMinPosition, float expectedZoomFactor) | ScrollPresenterTests | [inline, private]
ValidateScrollAnimationStartingAndZoomFactorEventArgsHaveValidStartAndEndPositions() | ScrollPresenterTests | [inline]
ValidateStretchedImageSize(ScrollPresenter scrollPresenter, Image imageScrollPresenterContent, double desiredSize, double actualSize, double extentSize) | ScrollPresenterTests | [inline, private]
ValidateXYFocusNavigation() | ScrollPresenterTests | [inline]
VerifyDefaultPropertyValues() | ScrollPresenterTests | [inline]
VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(List< ExpressionAnimationStatusChange > expressionAnimationStatusChanges) | ScrollPresenterTests | [inline, private]
VerifyExtentAndViewportProperties() | ScrollPresenterTests | [inline]
VerifyInteractionSourceSettings() | ScrollPresenterTests | [inline]
VerifyPropertyGettersAndSetters() | ScrollPresenterTests | [inline]
viewChangedCount | ScrollPresenterTests | [private]
ViewChangeInterruptionKind enum name | ScrollPresenterTests | [private]
ViewportHeight() | ScrollPresenterTests | [inline]
ViewportHeight(bool isScrollPresenterParentSizeSet, bool isScrollPresenterParentMaxSizeSet, VerticalAlignment scrollPresenterVerticalAlignment, double scrollPresenterContentHeight) | ScrollPresenterTests | [inline, private]
WaitForEvent(string logComment, EventWaitHandle eventWaitHandle) | ScrollPresenterTests | [inline, private]
ZoomBy(ScrollPresenter scrollPresenter, float zoomFactorDelta, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null) | ScrollPresenterTests | [inline, private]
ZoomFactorChangeWithCustomDuration() | ScrollPresenterTests | [inline]
ZoomFactorChangeWithNoContent() | ScrollPresenterTests | [inline]
zoomStartingCount | ScrollPresenterTests | [private]
ZoomTo(ScrollPresenter scrollPresenter, float zoomFactor, float centerPointX, float centerPointY, ScrollingAnimationMode animationMode, ScrollingSnapPointsMode snapPointsMode, bool hookViewChangingAndChanged=true, bool?isAnimationsEnabledOverride=null) | ScrollPresenterTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBarAutomationPeer Member List

This is the complete list of members for TitleBarAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< TitleBarAutomationPeer > &&self) noexcept | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
final_release(std::unique_ptr< TitleBarAutomationPeer > &&self) | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | TitleBarAutomationPeer |
GetBase() | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
GetClassNameCore() | TitleBarAutomationPeer |
GetInner() | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
GetNameCore() | TitleBarAutomationPeer |
IsOnThread() | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT > | [inline]
TitleBarAutomationPeer(winrt::TitleBar const &owner) | TitleBarAutomationPeer |
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBar Member List

This is the complete list of members for SelectorBar, including all inherited members.
abi_enter() | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
CheckThread() | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
ClearProperties() | SelectorBarProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< SelectorBar > &&self) noexcept | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline, static]
EnsureProperties() | SelectorBarProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
final_release(std::unique_ptr< SelectorBar > &&self) | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline, static]
GetBase() | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
GetInner() | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
GetItemsViewPart() const | SelectorBar |
IsOnThread() | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
Items(winrt::IVector< winrt::SelectorBarItem > const &value) | SelectorBarProperties |
Items() | SelectorBarProperties |
ItemsProperty() | SelectorBarProperties | [inline, static]
m_selectionChangedEventSource | SelectorBarProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
OnApplyTemplate() | SelectorBar |
OnGotFocus(const winrt::RoutedEventArgs &args) | SelectorBar |
OnItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBarProperties | [static]
OnItemsViewSelectedItemPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | SelectorBar | [private]
OnLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | SelectorBar | [private]
OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBar |
OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBarProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
RaiseSelectionChanged() | SelectorBar | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< SelectorBar, winrt::implementation::SelectorBarT > | [inline]
s_ItemsProperty | SelectorBarProperties | [static]
s_SelectedItemProperty | SelectorBarProperties | [static]
SelectedItem(winrt::SelectorBarItem const &value) | SelectorBarProperties |
SelectedItem() | SelectorBarProperties |
SelectedItemProperty() | SelectorBarProperties | [inline, static]
SelectFirstFocusableItem() | SelectorBar | [private]
SelectionChanged(winrt::TypedEventHandler< winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs > const &value) | SelectorBarProperties |
SelectionChanged(winrt::event_token const &token) | SelectorBarProperties |
SelectorBar() | SelectorBar |
SelectorBarProperties() | SelectorBarProperties |
UpdateItemsViewSelectionFromSelectedItem() | SelectorBar | [private]
UpdateSelectedItemFromItemsView() | SelectorBar | [private]
ValidateSelectedItem() | SelectorBar | [private]
~SelectorBar() | SelectorBar |
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewPage.xaml.cs Source File

  • File List
  • File Members
  • ItemsView
  • TestUI

ItemsViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Private.Controls;
00008
00009 using WEX.TestExecution;
00010 using WEX.TestExecution.Markup;
00011 using WEX.Logging.Interop;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     [TopLevelTestPage(Name = "ItemsView", Icon = "ItemsView.png")]
00016     public sealed partial class ItemsViewPage : TestPage
00017     {
00018         public ItemsViewPage()
00019         {
00020             LogController.InitializeLogging();
00021             this.InitializeComponent();
00022
00023             navigateToSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewSummaryPage), 0); };
00024             navigateToInteractiveTests.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewInteractiveTestsPage), 0); };
00025             navigateToIntegration.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewIntegrationPage), 0); };
00026             navigateToBlank.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewBlankPage), 0); };
00027             navigateToTransitionProvider.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewTransitionPage), 0); };
00028             navigateToPictureLibrary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ItemsViewPictureLibraryPage), 0); };
00029         }
00030
00031         private void CmbItemsViewOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e)
00032         {
00033             if (chkItemsView != null && chkItemsView.IsChecked == true)
00034             {
00035                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00036                     "ItemsView",
00037                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
00038                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
00039             }
00040
00041             if (chkScrollView != null && chkScrollView.IsChecked == true)
00042             {
00043                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00044                     "ScrollView",
00045                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
00046                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
00047             }
00048
00049             if (chkScrollPresenter != null && chkScrollPresenter.IsChecked == true)
00050             {
00051                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00052                     "ScrollPresenter",
00053                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
00054                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
00055             }
00056
00057             if (chkItemContainer != null && chkItemContainer.IsChecked == true)
00058             {
00059                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00060                     "ItemContainer",
00061                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
00062                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
00063             }
00064
00065             if (chkItemsRepeater != null && chkItemsRepeater.IsChecked == true)
00066             {
00067                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00068                     "ItemsRepeater",
00069                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
00070                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
00071             }
00072
00073             if (chkLinedFlowLayout != null && chkLinedFlowLayout.IsChecked == true)
00074             {
00075                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00076                     "LinedFlowLayout",
00077                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
00078                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
00079             }
00080
00081             if (chkAnnotatedScrollBar != null && chkAnnotatedScrollBar.IsChecked == true)
00082             {
00083                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00084                     "AnnotatedScrollBar",
00085                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 1 || cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2,
00086                     cmbItemsViewOutputDebugStringLevel.SelectedIndex == 2);
00087             }
00088         }
00089     }
00090 }
Generated on Sun Dec 1 2024 20:51:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkCanvasProperties Member List

This is the complete list of members for InkCanvasProperties, including all inherited members.
ClearProperties() | InkCanvasProperties | [static]
EnsureProperties() | InkCanvasProperties | [static]
InkCanvasProperties() | InkCanvasProperties |
IsEnabled(bool value) | InkCanvasProperties |
IsEnabled() | InkCanvasProperties |
IsEnabledProperty() | InkCanvasProperties | [inline, static]
OnIsEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InkCanvasProperties | [static]
s_IsEnabledProperty | InkCanvasProperties | [static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorOptionsFromFlag< T, flag, Helper > Member List

This is the complete list of members for VectorOptionsFromFlag< T, flag, Helper >, including all inherited members.
Bindable | VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > | [static]
DependencyObjectBase | VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > | [static]
NoTrackRef | VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > | [static]
Observable | VectorOptionsBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > | [static]
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksFactory.cpp Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooksFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "LayoutsTestHooksFactory.h"
00007 #include "LayoutsTestHooks.properties.cpp"
00008
00009 LayoutsTestHooks* LayoutsTestHooks::s_testHooks = nullptr;
00010
00011 void LayoutsTestHooks::EnsureHooks()
00012 {
00013     if (!s_testHooks)
00014     {
00015         s_testHooks = winrt::make_self<LayoutsTestHooks>().detach();
00016     }
00017 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsRepeater.properties.cpp Source File

  • File List
  • File Members
  • Generated

ItemsRepeater.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ItemsRepeater.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ItemsRepeater)
00012 }
00013
00014 #include "ItemsRepeater.g.cpp"
00015
00016 GlobalDependencyProperty ItemsRepeaterProperties::s_BackgroundProperty{ nullptr };
00017 GlobalDependencyProperty ItemsRepeaterProperties::s_HorizontalCacheLengthProperty{ nullptr };
00018 GlobalDependencyProperty ItemsRepeaterProperties::s_ItemsSourceProperty{ nullptr };
00019 GlobalDependencyProperty ItemsRepeaterProperties::s_ItemTemplateProperty{ nullptr };
00020 GlobalDependencyProperty ItemsRepeaterProperties::s_ItemTransitionProviderProperty{ nullptr };
00021 GlobalDependencyProperty ItemsRepeaterProperties::s_LayoutProperty{ nullptr };
00022 GlobalDependencyProperty ItemsRepeaterProperties::s_VerticalCacheLengthProperty{ nullptr };
00023
00024 ItemsRepeaterProperties::ItemsRepeaterProperties()
00025     : m_elementClearingEventSource{static_cast<ItemsRepeater*>(this)}
00026     , m_elementIndexChangedEventSource{static_cast<ItemsRepeater*>(this)}
00027     , m_elementPreparedEventSource{static_cast<ItemsRepeater*>(this)}
00028 {
00029     EnsureProperties();
00030 }
00031
00032 void ItemsRepeaterProperties::EnsureProperties()
00033 {
00034     if (!s_BackgroundProperty)
00035     {
00036         s_BackgroundProperty =
00037             InitializeDependencyProperty(
00038                 L"Background",
00039                 winrt::name_of<winrt::Brush>(),
00040                 winrt::name_of<winrt::ItemsRepeater>(),
00041                 false /* isAttached */,
00042                 ValueHelper<winrt::Brush>::BoxedDefaultValue(),
00043                 nullptr);
00044     }
00045     if (!s_HorizontalCacheLengthProperty)
00046     {
00047         s_HorizontalCacheLengthProperty =
00048             InitializeDependencyProperty(
00049                 L"HorizontalCacheLength",
00050                 winrt::name_of<double>(),
00051                 winrt::name_of<winrt::ItemsRepeater>(),
00052                 false /* isAttached */,
00053                 ValueHelper<double>::BoxValueIfNecessary(2.0),
00054                 winrt::PropertyChangedCallback(&OnHorizontalCacheLengthPropertyChanged));
00055     }
00056     if (!s_ItemsSourceProperty)
00057     {
00058         s_ItemsSourceProperty =
00059             InitializeDependencyProperty(
00060                 L"ItemsSource",
00061                 winrt::name_of<winrt::IInspectable>(),
00062                 winrt::name_of<winrt::ItemsRepeater>(),
00063                 false /* isAttached */,
00064                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00065                 winrt::PropertyChangedCallback(&OnItemsSourcePropertyChanged));
00066     }
00067     if (!s_ItemTemplateProperty)
00068     {
00069         s_ItemTemplateProperty =
00070             InitializeDependencyProperty(
00071                 L"ItemTemplate",
00072                 winrt::name_of<winrt::IInspectable>(),
00073                 winrt::name_of<winrt::ItemsRepeater>(),
00074                 false /* isAttached */,
00075                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00076                 winrt::PropertyChangedCallback(&OnItemTemplatePropertyChanged));
00077     }
00078     if (!s_ItemTransitionProviderProperty)
00079     {
00080         s_ItemTransitionProviderProperty =
00081             InitializeDependencyProperty(
00082                 L"ItemTransitionProvider",
00083                 winrt::name_of<winrt::ItemCollectionTransitionProvider>(),
00084                 winrt::name_of<winrt::ItemsRepeater>(),
00085                 false /* isAttached */,
00086                 ValueHelper<winrt::ItemCollectionTransitionProvider>::BoxedDefaultValue(),
00087                 winrt::PropertyChangedCallback(&OnItemTransitionProviderPropertyChanged));
00088     }
00089     if (!s_LayoutProperty)
00090     {
00091         s_LayoutProperty =
00092             InitializeDependencyProperty(
00093                 L"Layout",
00094                 winrt::name_of<winrt::Layout>(),
00095                 winrt::name_of<winrt::ItemsRepeater>(),
00096                 false /* isAttached */,
00097                 ValueHelper<winrt::Layout>::BoxedDefaultValue(),
00098                 winrt::PropertyChangedCallback(&OnLayoutPropertyChanged));
00099     }
00100     if (!s_VerticalCacheLengthProperty)
00101     {
00102         s_VerticalCacheLengthProperty =
00103             InitializeDependencyProperty(
00104                 L"VerticalCacheLength",
00105                 winrt::name_of<double>(),
00106                 winrt::name_of<winrt::ItemsRepeater>(),
00107                 false /* isAttached */,
00108                 ValueHelper<double>::BoxValueIfNecessary(2.0),
00109                 winrt::PropertyChangedCallback(&OnVerticalCacheLengthPropertyChanged));
00110     }
00111 }
00112
00113 void ItemsRepeaterProperties::ClearProperties()
00114 {
00115     s_BackgroundProperty = nullptr;
00116     s_HorizontalCacheLengthProperty = nullptr;
00117     s_ItemsSourceProperty = nullptr;
00118     s_ItemTemplateProperty = nullptr;
00119     s_ItemTransitionProviderProperty = nullptr;
00120     s_LayoutProperty = nullptr;
00121     s_VerticalCacheLengthProperty = nullptr;
00122 }
00123
00124 void ItemsRepeaterProperties::OnHorizontalCacheLengthPropertyChanged(
00125     winrt::DependencyObject const& sender,
00126     winrt::DependencyPropertyChangedEventArgs const& args)
00127 {
00128     auto owner = sender.as<winrt::ItemsRepeater>();
00129     winrt::get_self<ItemsRepeater>(owner)->OnPropertyChanged(args);
00130 }
00131
00132 void ItemsRepeaterProperties::OnItemsSourcePropertyChanged(
00133     winrt::DependencyObject const& sender,
00134     winrt::DependencyPropertyChangedEventArgs const& args)
00135 {
00136     auto owner = sender.as<winrt::ItemsRepeater>();
00137     winrt::get_self<ItemsRepeater>(owner)->OnPropertyChanged(args);
00138 }
00139
00140 void ItemsRepeaterProperties::OnItemTemplatePropertyChanged(
00141     winrt::DependencyObject const& sender,
00142     winrt::DependencyPropertyChangedEventArgs const& args)
00143 {
00144     auto owner = sender.as<winrt::ItemsRepeater>();
00145     winrt::get_self<ItemsRepeater>(owner)->OnPropertyChanged(args);
00146 }
00147
00148 void ItemsRepeaterProperties::OnItemTransitionProviderPropertyChanged(
00149     winrt::DependencyObject const& sender,
00150     winrt::DependencyPropertyChangedEventArgs const& args)
00151 {
00152     auto owner = sender.as<winrt::ItemsRepeater>();
00153     winrt::get_self<ItemsRepeater>(owner)->OnPropertyChanged(args);
00154 }
00155
00156 void ItemsRepeaterProperties::OnLayoutPropertyChanged(
00157     winrt::DependencyObject const& sender,
00158     winrt::DependencyPropertyChangedEventArgs const& args)
00159 {
00160     auto owner = sender.as<winrt::ItemsRepeater>();
00161     winrt::get_self<ItemsRepeater>(owner)->OnPropertyChanged(args);
00162 }
00163
00164 void ItemsRepeaterProperties::OnVerticalCacheLengthPropertyChanged(
00165     winrt::DependencyObject const& sender,
00166     winrt::DependencyPropertyChangedEventArgs const& args)
00167 {
00168     auto owner = sender.as<winrt::ItemsRepeater>();
00169     winrt::get_self<ItemsRepeater>(owner)->OnPropertyChanged(args);
00170 }
00171
00172 void ItemsRepeaterProperties::Background(winrt::Brush const& value)
00173 {
00174     [[gsl::suppress(con)]]
00175     {
00176     static_cast<ItemsRepeater*>(this)->SetValue(s_BackgroundProperty, ValueHelper<winrt::Brush>::BoxValueIfNecessary(value));
00177     }
00178 }
00179
00180 winrt::Brush ItemsRepeaterProperties::Background()
00181 {
00182     return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<ItemsRepeater*>(this)->GetValue(s_BackgroundProperty));
00183 }
00184
00185 void ItemsRepeaterProperties::HorizontalCacheLength(double value)
00186 {
00187     [[gsl::suppress(con)]]
00188     {
00189     static_cast<ItemsRepeater*>(this)->SetValue(s_HorizontalCacheLengthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00190     }
00191 }
00192
00193 double ItemsRepeaterProperties::HorizontalCacheLength()
00194 {
00195     return ValueHelper<double>::CastOrUnbox(static_cast<ItemsRepeater*>(this)->GetValue(s_HorizontalCacheLengthProperty));
00196 }
00197
00198 void ItemsRepeaterProperties::ItemsSource(winrt::IInspectable const& value)
00199 {
00200     [[gsl::suppress(con)]]
00201     {
00202     static_cast<ItemsRepeater*>(this)->SetValue(s_ItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00203     }
00204 }
00205
00206 winrt::IInspectable ItemsRepeaterProperties::ItemsSource()
00207 {
00208     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<ItemsRepeater*>(this)->GetValue(s_ItemsSourceProperty));
00209 }
00210
00211 void ItemsRepeaterProperties::ItemTemplate(winrt::IInspectable const& value)
00212 {
00213     [[gsl::suppress(con)]]
00214     {
00215     static_cast<ItemsRepeater*>(this)->SetValue(s_ItemTemplateProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00216     }
00217 }
00218
00219 winrt::IInspectable ItemsRepeaterProperties::ItemTemplate()
00220 {
00221     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<ItemsRepeater*>(this)->GetValue(s_ItemTemplateProperty));
00222 }
00223
00224 void ItemsRepeaterProperties::ItemTransitionProvider(winrt::ItemCollectionTransitionProvider const& value)
00225 {
00226     [[gsl::suppress(con)]]
00227     {
00228     static_cast<ItemsRepeater*>(this)->SetValue(s_ItemTransitionProviderProperty, ValueHelper<winrt::ItemCollectionTransitionProvider>::BoxValueIfNecessary(value));
00229     }
00230 }
00231
00232 winrt::ItemCollectionTransitionProvider ItemsRepeaterProperties::ItemTransitionProvider()
00233 {
00234     return ValueHelper<winrt::ItemCollectionTransitionProvider>::CastOrUnbox(static_cast<ItemsRepeater*>(this)->GetValue(s_ItemTransitionProviderProperty));
00235 }
00236
00237 void ItemsRepeaterProperties::Layout(winrt::Layout const& value)
00238 {
00239     [[gsl::suppress(con)]]
00240     {
00241     static_cast<ItemsRepeater*>(this)->SetValue(s_LayoutProperty, ValueHelper<winrt::Layout>::BoxValueIfNecessary(value));
00242     }
00243 }
00244
00245 winrt::Layout ItemsRepeaterProperties::Layout()
00246 {
00247     return ValueHelper<winrt::Layout>::CastOrUnbox(static_cast<ItemsRepeater*>(this)->GetValue(s_LayoutProperty));
00248 }
00249
00250 void ItemsRepeaterProperties::VerticalCacheLength(double value)
00251 {
00252     [[gsl::suppress(con)]]
00253     {
00254     static_cast<ItemsRepeater*>(this)->SetValue(s_VerticalCacheLengthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00255     }
00256 }
00257
00258 double ItemsRepeaterProperties::VerticalCacheLength()
00259 {
00260     return ValueHelper<double>::CastOrUnbox(static_cast<ItemsRepeater*>(this)->GetValue(s_VerticalCacheLengthProperty));
00261 }
00262
00263 winrt::event_token ItemsRepeaterProperties::ElementClearing(winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs> const& value)
00264 {
00265     return m_elementClearingEventSource.add(value);
00266 }
00267
00268 void ItemsRepeaterProperties::ElementClearing(winrt::event_token const& token)
00269 {
00270     m_elementClearingEventSource.remove(token);
00271 }
00272
00273 winrt::event_token ItemsRepeaterProperties::ElementIndexChanged(winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs> const& value)
00274 {
00275     return m_elementIndexChangedEventSource.add(value);
00276 }
00277
00278 void ItemsRepeaterProperties::ElementIndexChanged(winrt::event_token const& token)
00279 {
00280     m_elementIndexChangedEventSource.remove(token);
00281 }
00282
00283 winrt::event_token ItemsRepeaterProperties::ElementPrepared(winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs> const& value)
00284 {
00285     return m_elementPreparedEventSource.add(value);
00286 }
00287
00288 void ItemsRepeaterProperties::ElementPrepared(winrt::event_token const& token)
00289 {
00290     m_elementPreparedEventSource.remove(token);
00291 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerScrollToRequestedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerScrollToRequestedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollControllerScrollToRequestedEventArgs.g.h"
00007
00008 class ScrollControllerScrollToRequestedEventArgs :
00009     public winrt::implementation::ScrollControllerScrollToRequestedEventArgsT<ScrollControllerScrollToRequestedEventArgs>
00010 {
00011 public:
00012     ~ScrollControllerScrollToRequestedEventArgs()
00013     {
00014         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00015     }
00016
00017     ScrollControllerScrollToRequestedEventArgs(
00018         double offset,
00019         winrt::ScrollingScrollOptions const & options);
00020
00021     double Offset() const;
00022     winrt::ScrollingScrollOptions Options() const;
00023     int32_t CorrelationId() const;
00024     void CorrelationId(int32_t correlationId);
00025
00026 private:
00027     double m_offset{ 0.0 };
00028     winrt::ScrollingScrollOptions m_options{ nullptr };
00029     int32_t m_correlationId{ -1 };
00030 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemAutomationPeer Member List

This is the complete list of members for NavigationViewItemAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
AddToSelection() | NavigationViewItemAutomationPeer |
AutomationOutput enum name | NavigationViewItemAutomationPeer | [private]
ChangeSelection(bool isSelected) | NavigationViewItemAutomationPeer | [private]
CheckThread() | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
Collapse() | NavigationViewItemAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< NavigationViewItemAutomationPeer > &&self) noexcept | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
Expand() | NavigationViewItemAutomationPeer |
ExpandCollapseState() | NavigationViewItemAutomationPeer |
final_release(std::unique_ptr< NavigationViewItemAutomationPeer > &&self) | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline, static]
GetAutomationControlTypeCore() | NavigationViewItemAutomationPeer |
GetBase() | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
GetClassNameCore() | NavigationViewItemAutomationPeer |
GetInner() | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
GetLevelCore() | NavigationViewItemAutomationPeer |
GetNameCore() | NavigationViewItemAutomationPeer |
GetNavigationViewItemCountInPrimaryList() | NavigationViewItemAutomationPeer | [private]
GetNavigationViewItemCountInTopNav() | NavigationViewItemAutomationPeer | [private]
GetNavigationViewRepeaterPosition() | NavigationViewItemAutomationPeer | [private]
GetParentItemsRepeater() | NavigationViewItemAutomationPeer | [private]
GetParentNavigationView() | NavigationViewItemAutomationPeer | [private]
GetPatternCore(winrt::PatternInterface const &patternInterface) | NavigationViewItemAutomationPeer |
GetPositionInSetCore() | NavigationViewItemAutomationPeer |
GetPositionOrSetCountHelper(AutomationOutput automationOutput) | NavigationViewItemAutomationPeer | [private]
GetSizeOfSetCore() | NavigationViewItemAutomationPeer |
HasChildren() | NavigationViewItemAutomationPeer | [private]
Invoke() | NavigationViewItemAutomationPeer |
IsOnFooterNavigation() | NavigationViewItemAutomationPeer | [private]
IsOnThread() | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
IsOnTopNavigation() | NavigationViewItemAutomationPeer | [private]
IsOnTopNavigationOverflow() | NavigationViewItemAutomationPeer | [private]
IsSelected() | NavigationViewItemAutomationPeer |
IsSettingsItem() | NavigationViewItemAutomationPeer | [private]
NavigationViewItemAutomationPeer(winrt::NavigationViewItem const &owner) | NavigationViewItemAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
Position enum value | NavigationViewItemAutomationPeer | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState newState) | NavigationViewItemAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< NavigationViewItemAutomationPeer, winrt::implementation::NavigationViewItemAutomationPeerT, winrt::IInvokeProvider, winrt::ISelectionItemProvider > | [inline]
RemoveFromSelection() | NavigationViewItemAutomationPeer |
Select() | NavigationViewItemAutomationPeer |
SelectionContainer() | NavigationViewItemAutomationPeer |
Size enum value | NavigationViewItemAutomationPeer | [private]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionProviderDerived Member List

This is the complete list of members for ItemCollectionTransitionProviderDerived, including all inherited members.
abi_enter() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
ClearProperties() | ItemCollectionTransitionProviderProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< ItemCollectionTransitionProvider > &&self) noexcept | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline, static]
EnsureProperties() | ItemCollectionTransitionProviderProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< ItemCollectionTransitionProvider > &&self) | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
ItemCollectionTransitionProviderProperties() | ItemCollectionTransitionProviderProperties |
m_transitionCompletedEventSource | ItemCollectionTransitionProviderProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
NotifyTransitionCompleted(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
QueueTransition(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider |
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
ShouldAnimate(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider |
ShouldAnimateCore(ItemCollectionTransition transition) | ItemCollectionTransitionProviderDerived | [inline, protected]
ItemCollectionTransitionProvider::ShouldAnimateCore(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider | [virtual]
ShouldAnimateFunc | ItemCollectionTransitionProviderDerived |
StartTransitions(IList< ItemCollectionTransition > transitions) | ItemCollectionTransitionProviderDerived | [inline, protected]
ItemCollectionTransitionProvider::StartTransitions(winrt::IVector< winrt::ItemCollectionTransition > const &transitions) | ItemCollectionTransitionProvider | [virtual]
StartTransitionsFunc | ItemCollectionTransitionProviderDerived |
TransitionCompleted(winrt::TypedEventHandler< winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs > const &value) | ItemCollectionTransitionProviderProperties |
TransitionCompleted(winrt::event_token const &token) | ItemCollectionTransitionProviderProperties |
~ItemCollectionTransitionProvider() | ItemCollectionTransitionProvider |
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterTrace Member List

This is the complete list of members for ItemsRepeaterTrace, including all inherited members.
s_IsDebugOutputEnabled | ItemsRepeaterTrace | [static]
s_IsVerboseDebugOutputEnabled | ItemsRepeaterTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ItemsRepeaterTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | ItemsRepeaterTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ItemsRepeaterTrace | [inline, static]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ControlVisualTreeTestFilter Member List

This is the complete list of members for ControlVisualTreeTestFilter, including all inherited members.
ShouldVisitProperty(string propertyName) ControlVisualTreeTestFilter [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewExpandingEventArgs Member List

This is the complete list of members for TreeViewExpandingEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewExpandingEventArgs > &&self) noexcept | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< TreeViewExpandingEventArgs > &&self) | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
Item() | TreeViewExpandingEventArgs |
Node() | TreeViewExpandingEventArgs |
Node(const winrt::TreeViewNode &value) | TreeViewExpandingEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewExpandingEventArgs, winrt::implementation::TreeViewExpandingEventArgsT, winrt::composing, winrt::composable > | [inline]
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SnapPointWrapperComparator< T > Member List

This is the complete list of members for SnapPointWrapperComparator< T >, including all inherited members.
operator()(std::shared_ptr< SnapPointWrapper< T >> left, std::shared_ptr< SnapPointWrapper< T >> right) const SnapPointWrapperComparator< T > [inline]
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionTreeHelper.h Source File

  • File List
  • File Members
  • Repeater

SelectionTreeHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class SelectionTreeHelper
00007 {
00008 public:
00009     struct TreeWalkNodeInfo
00010     {
00011         TreeWalkNodeInfo(std::shared_ptr<SelectionNode> node, const winrt::IndexPath& indexPath, std::shared_ptr<SelectionNode> parent)
00012             : Node(node), Path(indexPath), ParentNode(parent) {}
00013         TreeWalkNodeInfo(std::shared_ptr<SelectionNode> node, const winrt::IndexPath& indexPath)
00014             : Node(node), Path(indexPath), ParentNode(nullptr) {}
00015
00016         std::shared_ptr<SelectionNode> Node;
00017         winrt::IndexPath Path;
00018         std::shared_ptr<SelectionNode> ParentNode;
00019     };
00020
00021     static void TraverseIndexPath(
00022         std::shared_ptr<SelectionNode> root,
00023         const winrt::IndexPath& path,
00024         bool realizeChildren,
00025         std::function<void(std::shared_ptr<SelectionNode>, const winrt::IndexPath&, int /*depth*/, int /*childIndex*/)> nodeAction);
00026
00027     static void Traverse(
00028         std::shared_ptr<SelectionNode> root,
00029         bool realizeChildren,
00030         std::function<void(const TreeWalkNodeInfo&)> nodeAction);
00031
00032     static void TraverseRangeRealizeChildren(
00033         std::shared_ptr<SelectionNode> root,
00034         const winrt::IndexPath& start,
00035         const winrt::IndexPath& end,
00036         std::function<void(const TreeWalkNodeInfo&)> nodeAction);
00037
00038 private:
00039     static bool IsSubSet(const winrt::IndexPath& path, const winrt::IndexPath& subset);
00040     static winrt::IndexPath StartPath(const winrt::IndexPath& path, int length);
00041 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2.cpp Source File

  • File List
  • File Members
  • WebView2

WebView2.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include <corewindow.h>
00007 #include "dcomp.h"
00008 #include "InvokableCallbackHelper.h"
00009 #include "math.h"
00010 #include "Microsoft.UI.Xaml.xamlroot.h"
00011 #include "ResourceAccessor.h"
00012 #include "RuntimeProfiler.h"
00013 #include "UIAutomationCore.h"
00014 #include "UIAutomationCoreApi.h"
00015 #include "WebView2.h"
00016 #include "WebView2AutomationPeer.h"
00017 #include <WebView2Interop.h>
00018 #include "WebView2Utility.h"
00019 #include "Windows.Globalization.h"
00020 #include <wrl\event.h>
00021 #include "MuxcTraceLogging.h"
00022
00023 using namespace Microsoft::WRL;
00024
00025 static constexpr wstring_view s_error_wv2_closed{ L"Cannot create CoreWebView2 for Closed WebView2 element."sv };
00026 static constexpr wstring_view s_error_cwv2_not_present{ L"Failed because a valid CoreWebView2 is not present. Make sure one was created, for example by calling EnsureCoreWebView2Async() API."sv };
00027
00028 // White matches CoreWebView2Controller.DefaultBackgroundColor
00029 const winrt::Color WebView2::sc_controllerDefaultBackgroundColor{ 255, 255, 255, 255 };
00030
00031 // When the Xaml window is closed (eg by user clicking 'x'), CoreWebView2
00032 // (associated with child "Input HWND") is notified ahead of Xaml WebView2
00033 // resulting in a window of time when calls into the CoreWebView2 APIs
00034 // fail with ERROR_INVALID_STATE. The helper functions below are available
00035 // to detect and gracefully handle this situation.
00036
00037 // Checks CoreWebView2Controller status, use at start of simple/short functions
00038 bool WebView2::CoreWebView2HasInvalidState()
00039 {
00040     if (m_coreWebViewController)
00041     {
00042         try { bool isVisible = m_coreWebViewController.IsVisible(); }
00043         catch (winrt::hresult_error e)
00044         {
00045             if (e.code().value == HRESULT_FROM_WIN32(ERROR_INVALID_STATE))
00046             {
00047                 return true;
00048             }
00049         }
00050     }
00051     return false;
00052 }
00053
00054 // Wraps calls to Core Objects and swallows ERROR_INVALID_STATE, use around synchronous CWV2 API calls made frequently
00055 // (Note: for async CWV2 calls needing the check, use below code directly for simplicity)
00056 template <typename Delegate>
00057 void WebView2::CoreWebView2RunIgnoreInvalidStateSync(Delegate delegate)
00058 {
00059     try
00060     {
00061         delegate();
00062     }
00063     catch (winrt::hresult_error e)
00064     {
00065         if (e.code().value != HRESULT_FROM_WIN32(ERROR_INVALID_STATE))
00066         {
00067             throw;
00068         }
00069     }
00070 }
00071
00072
00073 WebView2::WebView2()
00074 {
00075     __RP_Marker_ClassById(RuntimeProfiler::ProfId_WebView2);
00076
00077     m_loadedRevoker = Loaded(winrt::auto_revoke, { this, &WebView2::OnLoaded });
00078     m_unloadedRevoker = Unloaded(winrt::auto_revoke, { this, &WebView2::OnUnloaded });
00079
00080     // Turn off DirectManipulation for this element so that all scrolling and gesture
00081     // inside the WebView element will be handled by Anaheim.
00082     this->ManipulationMode(winrt::ManipulationModes::None);
00083
00084     // TODO_WebView2: These can be deferred to CreateCoreObjects
00085     m_manipulationModeChangedToken.value = RegisterPropertyChangedCallback(winrt::UIElement::ManipulationModeProperty(),
00086         { this, &WebView2::OnManipulationModePropertyChanged });
00087     m_visibilityChangedToken.value = RegisterPropertyChangedCallback(winrt::UIElement::VisibilityProperty(),
00088         { this, &WebView2::OnVisibilityPropertyChanged });
00089     OnVisibilityPropertyChanged(nullptr, nullptr);
00090
00091     // IsTabStop is false by default for UIElement
00092     IsTabStop(true);
00093
00094     // Set the background for WebView2 to ensure it will be visible to hit-testing.
00095     Background(winrt::SolidColorBrush(winrt::Colors::Transparent()));
00096 }
00097
00098 void WebView2::OnManipulationModePropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& /*args*/)
00099 {
00100     MUX_FAIL_FAST_MSG("WebView2.ManipulationMode cannot be set to anything other than \"None\".");
00101 }
00102
00103 void WebView2::OnVisibilityPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& /*args*/)
00104 {
00105     UpdateRenderedSubscriptionAndVisibility();
00106 }
00107
00108 // Public Close() API
00109 void WebView2::Close()
00110 {
00111     CloseInternal(false /* inShutdownPath */);
00112 }
00113
00114 // Close Implementation (notice this does not implement IClosable). Also called implicitly as part of destruction.
00115 void WebView2::CloseInternal(bool inShutdownPath)
00116 {
00117     DisconnectFromRootVisualTarget();
00118
00119     UnregisterCoreEventHandlers();
00120
00121     m_xamlRootChangedRevoker.revoke();
00122     m_renderedRevoker.revoke();
00123
00124     if (m_tempHostHwnd && !winrt::CoreWindow::GetForCurrentThread())
00125     {
00126         DestroyWindow(m_tempHostHwnd);
00127         m_tempHostHwnd = nullptr;
00128     }
00129
00130     if (m_manipulationModeChangedToken.value != 0)
00131     {
00132         UnregisterPropertyChangedCallback(winrt::UIElement::ManipulationModeProperty(), m_manipulationModeChangedToken.value);
00133         m_manipulationModeChangedToken.value = 0;
00134     }
00135
00136     if (m_visibilityChangedToken.value != 0)
00137     {
00138         UnregisterPropertyChangedCallback(winrt::UIElement::VisibilityProperty(), m_visibilityChangedToken.value);
00139         m_visibilityChangedToken.value = 0;
00140     }
00141
00142     if (m_coreWebView)
00143     {
00144         m_coreWebView = nullptr;
00145     }
00146
00147     if (m_coreWebViewController)
00148     {
00149         m_coreWebViewController.Close();
00150         m_coreWebViewController = nullptr;
00151     }
00152
00153     if (m_coreWebViewCompositionController)
00154     {
00155         m_coreWebViewCompositionController = nullptr;
00156     }
00157
00158     UnregisterXamlEventHandlers();
00159
00160     // If called from destructor, skip ResetProperties() as property values no longer matter.
00161     // (Otherwise, Xaml Core will assert on failure to resurrect WV2's DXaml Peer)
00162     if (!inShutdownPath)
00163     {
00164         ResetProperties();
00165     }
00166
00167     m_isClosed = true;
00168 }
00169
00170 WebView2::~WebView2()
00171 {
00172     CloseInternal(true /* inShutdownPath */);
00173 }
00174
00175 void WebView2::OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00176 {
00177     winrt::IDependencyProperty property = args.Property();
00178
00179     if (property == s_SourceProperty)
00180     {
00181         const auto newValueUri = unbox_value<winrt::Uri>(args.NewValue());
00182
00183         if (ShouldNavigate(newValueUri))
00184         {
00185             if (!m_isClosed)
00186             {
00187                 OnSourceChanged(newValueUri);
00188             }
00189             else
00190             {
00191                 throw winrt::hresult_error(RO_E_CLOSED, s_error_wv2_closed);
00192             }
00193         }
00194     }
00195     else if ((property == s_CanGoBackProperty || property == s_CanGoForwardProperty) && !m_canGoPropSetInternally)
00196     {
00197         throw winrt::hresult_invalid_argument();
00198     }
00199     else if (property == s_DefaultBackgroundColorProperty)
00200     {
00201         SetControllerDefaultBackgroundColor();
00202     }
00203 }
00204
00205 void WebView2::HandlePointerPressed(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00206 {
00207     // Chromium handles WM_MOUSEXXX for mouse, WM_POINTERXXX for touch
00208     winrt::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
00209     winrt::Microsoft::UI::Input::PointerPoint pointerPoint{ args.GetCurrentPoint(*this) };
00210     UINT message = 0x0;
00211
00212     if (deviceType == winrt::PointerDeviceType::Mouse)
00213     {
00214         // WebView takes mouse capture to avoid missing pointer released events that occur outside of the element that
00215         // end pointer pressed state inside the webview. Example, scrollbar is being used and mouse is moved out
00216         // of webview bounds before being released, the webview will miss the released event and upon reentry into
00217         // the webview, the mouse will still cause the scrollbar to move as if selected.
00218         m_hasMouseCapture = this->CapturePointer(args.Pointer());
00219
00220         winrt::PointerPointProperties properties{ pointerPoint.Properties() };
00221         if (properties.IsLeftButtonPressed())
00222         {
00223             // Double Click is working as well with this code, presumably by being recognized on browser side from WM_LBUTTONDOWN/ WM_LBUTTONUP
00224             message = WM_LBUTTONDOWN;
00225             m_isLeftMouseButtonPressed = true;
00226         }
00227         else if (properties.IsMiddleButtonPressed())
00228         {
00229             message = WM_MBUTTONDOWN;
00230             m_isMiddleMouseButtonPressed = true;
00231         }
00232         else if (properties.IsRightButtonPressed())
00233         {
00234             message = WM_RBUTTONDOWN;
00235             m_isRightMouseButtonPressed = true;
00236         }
00237         else if (properties.IsXButton1Pressed())
00238         {
00239             message = WM_XBUTTONDOWN;
00240             m_isXButton1Pressed = true;
00241         }
00242         else if (properties.IsXButton2Pressed())
00243         {
00244             message = WM_XBUTTONDOWN;
00245             m_isXButton2Pressed = true;
00246         }
00247         else
00248         {
00249             MUX_ASSERT(false);
00250         }
00251     }
00252     else if (deviceType == winrt::PointerDeviceType::Touch)
00253     {
00254         message = WM_POINTERDOWN;
00255
00256         int32_t id = pointerPoint.PointerId();
00257         m_hasTouchCapture.insert(std::pair<int32_t, bool>(id, this->CapturePointer(args.Pointer())));
00258     }
00259     else if (deviceType == winrt::PointerDeviceType::Pen)
00260     {
00261         message = WM_POINTERDOWN;
00262         m_hasPenCapture = this->CapturePointer(args.Pointer());
00263     }
00264
00265     // Since OnXamlPointerMessage() will mark the args handled, Xaml FocusManager will ignore
00266     // this Pressed event when it bubbles up to the XamlRoot, not setting focus as expected.
00267     // Thus, we need to manually set Xaml Focus (Pointer) on WebView2 here.
00268     // TODO_WebView2: Update this to UIElement::Focus [sync version], when it becomes available.
00269
00270     if (IsTabStop() == true)
00271     {
00272         winrt::FocusManager::TryFocusAsync(*this, winrt::FocusState::Pointer);
00273     }
00274
00275     OnXamlPointerMessage(message, args);
00276 }
00277
00278 void WebView2::HandlePointerReleased(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00279 {
00280     // Chromium handles WM_MOUSEXXX for mouse, WM_POINTERXXX for touch
00281     winrt::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
00282     winrt::PointerPoint pointerPoint{ args.GetCurrentPoint(*this) };
00283     winrt::PointerPointProperties properties{ pointerPoint.Properties() };
00284     UINT message = 0x0;
00285
00286     // Get pointer id for handling multi-touch capture
00287     int32_t id = pointerPoint.PointerId();
00288
00289     if (deviceType == winrt::PointerDeviceType::Mouse)
00290     {
00291         if (m_isLeftMouseButtonPressed)
00292         {
00293             message = WM_LBUTTONUP;
00294             m_isLeftMouseButtonPressed = false;
00295         }
00296         else if (m_isMiddleMouseButtonPressed)
00297         {
00298             message = WM_MBUTTONUP;
00299             m_isMiddleMouseButtonPressed = false;
00300         }
00301         else if (m_isRightMouseButtonPressed)
00302         {
00303             message = WM_RBUTTONUP;
00304             m_isRightMouseButtonPressed = false;
00305         }
00306         else if (m_isXButton1Pressed)
00307         {
00308             message = WM_XBUTTONUP;
00309             m_isXButton1Pressed = false;
00310         }
00311         else if (m_isXButton2Pressed)
00312         {
00313             message = WM_XBUTTONUP;
00314             m_isXButton2Pressed = false;
00315         }
00316         else
00317         {
00318             // It is not guaranteed that we will get a PointerPressed before PointerReleased.
00319             // For example, the mouse can be pressed in the space next to a webview, dragged
00320             // into the webview, and then released. This is a valid case and should not crash.
00321             // Because we can't always know what button was pressed before a release, we can't
00322             // forward this message on to CoreWebView2.
00323             return;
00324         }
00325
00326         if (m_hasMouseCapture)
00327         {
00328             this->ReleasePointerCapture(args.Pointer());
00329             m_hasMouseCapture = false;
00330         }
00331     }
00332     else
00333     {
00334         if (m_hasTouchCapture.count(id) > 0)
00335         {
00336             this->ReleasePointerCapture(args.Pointer());
00337             m_hasTouchCapture.erase(id);
00338         }
00339
00340         if (m_hasPenCapture)
00341         {
00342             this->ReleasePointerCapture(args.Pointer());
00343             m_hasPenCapture = false;
00344         }
00345
00346         message = WM_POINTERUP;
00347     }
00348
00349     OnXamlPointerMessage(message, args);
00350 }
00351
00352 void WebView2::HandlePointerMoved(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00353 {
00354     // Chromium handles WM_MOUSEXXX for mouse, WM_POINTERXXX for touch
00355     winrt::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
00356     UINT message = deviceType == winrt::PointerDeviceType::Mouse ? WM_MOUSEMOVE : WM_POINTERUPDATE;
00357     OnXamlPointerMessage(message, args);
00358 }
00359
00360 void WebView2::HandlePointerWheelChanged(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00361 {
00362     // Chromium handles WM_MOUSEXXX for mouse, WM_POINTERXXX for touch
00363     winrt::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
00364     winrt::PointerPoint pointerPoint{ args.GetCurrentPoint(*this) };
00365     winrt::PointerPointProperties properties{ pointerPoint.Properties() };
00366     UINT message;
00367
00368     if (deviceType == winrt::PointerDeviceType::Mouse)
00369     {
00370         message = properties.IsHorizontalMouseWheel() ? WM_MOUSEHWHEEL : WM_MOUSEWHEEL;
00371     }
00372     else
00373     {
00374         message = WM_POINTERWHEEL;
00375     }
00376     OnXamlPointerMessage(message, args);
00377 }
00378
00379 void WebView2::HandlePointerExited(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00380 {
00381     winrt::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
00382     UINT message;
00383
00384     if (deviceType == winrt::PointerDeviceType::Mouse)
00385     {
00386         if (m_hasMouseCapture)
00387         {
00388             // WM_MOUSELEAVE should not fire while we have capture, since doing so
00389             // will cancel capture in the WebView.
00390             m_isMouseLeaveNeeded = true;
00391             return;
00392         }
00393
00394         message = WM_MOUSELEAVE;
00395         ResetMouseInputState();
00396     }
00397     else
00398     {
00399         message = WM_POINTERLEAVE;
00400     }
00401
00402     OnXamlPointerMessage(message, args);
00403 }
00404
00405 void WebView2::HandlePointerEntered(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00406 {
00407     winrt::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
00408
00409     if (deviceType != winrt::PointerDeviceType::Mouse) //mouse does not have an equivalent pointer_entered event, so only handling pen/touch
00410     {
00411         OnXamlPointerMessage(WM_POINTERENTER, args);
00412     }
00413     else
00414     {
00415         MUX_ASSERT(deviceType == winrt::PointerDeviceType::Mouse);
00416         // If there was a queued MouseLeave, clear it now that the mouse has re-entered.
00417         m_isMouseLeaveNeeded = false;
00418     }
00419 }
00420
00421 void WebView2::HandlePointerCanceled(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00422 {
00423     ResetPointerHelper(args);
00424 }
00425
00426 void WebView2::HandlePointerCaptureLost(const winrt::Windows::Foundation::IInspectable&, const winrt::PointerRoutedEventArgs& args)
00427 {
00428     ResetPointerHelper(args);
00429 }
00430
00431 void WebView2::ResetPointerHelper(const winrt::PointerRoutedEventArgs& args)
00432 {
00433     winrt::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
00434
00435     if (deviceType == winrt::PointerDeviceType::Mouse)
00436     {
00437         m_hasMouseCapture = false;
00438         ResetMouseInputState();
00439         if (m_isMouseLeaveNeeded)
00440         {
00441             m_isMouseLeaveNeeded = false;
00442             SendMouseLeave();
00443         }
00444     }
00445     else if (deviceType == winrt::PointerDeviceType::Touch)
00446     {
00447         // Get pointer id for handling multi-touch capture
00448         winrt::Microsoft::UI::Input::PointerPoint logicalPointerPoint{ args.GetCurrentPoint(*this) };
00449         int32_t id = logicalPointerPoint.PointerId();
00450         if (m_hasTouchCapture.count(id) > 0)
00451         {
00452             m_hasTouchCapture.erase(id);
00453         }
00454     }
00455     else if (deviceType == winrt::PointerDeviceType::Pen)
00456     {
00457         m_hasPenCapture = false;
00458     }
00459 }
00460
00461 void WebView2::SendMouseLeave()
00462 {
00463     if (!m_coreWebView || !m_coreWebViewCompositionController || CoreWebView2HasInvalidState())
00464     {
00465         // nothing to forward input to
00466         return;
00467     }
00468
00469     m_coreWebViewCompositionController.SendMouseInput(
00470         winrt::CoreWebView2MouseEventKind{ static_cast<winrt::CoreWebView2MouseEventKind>(WM_MOUSELEAVE) },
00471         winrt::CoreWebView2MouseEventVirtualKeys{ static_cast<winrt::CoreWebView2MouseEventVirtualKeys>(0) },
00472         0,
00473         winrt::Point{ 0, 0 });
00474 }
00475
00476 bool WebView2::ShouldNavigate(const winrt::Uri& uri)
00477 {
00478     return uri != nullptr && uri.RawUri() != m_stopNavigateOnUriChanged;
00479 }
00480
00481 winrt::IAsyncAction WebView2::OnSourceChanged(winrt::Uri providedUri)
00482 {
00483     auto strongThis = get_strong(); // ensure object lifetime during coroutines
00484
00485     // Trigger / wait for CWV2 creation if one isn't yet ready
00486     if (!m_coreWebView)
00487     {
00488         // Creation request when one is already in flight (either explicit or implicit)
00489         if (m_creationInProgressAsync)
00490         {
00491             MUX_ASSERT(m_isExplicitCreationInProgress || m_isImplicitCreationInProgress);
00492
00493             // If the in-flight creation is explicit (EnsureCWV2*Async()), navigate to new source when that ends
00494             // Otherwise it's implicit (another Source set), we are done; first Source will use updated Source value
00495             if (m_isExplicitCreationInProgress)
00496             {
00497                 // If EnsureCWV2*Async() call is in flight, wait for it to complete then set Source
00498                 co_await *m_creationInProgressAsync;
00499             }
00500             else if (m_isImplicitCreationInProgress)
00501             {
00502                 // If Set Source is in flight, nothing to do - it will apply latest source when it completes
00503                 co_return;
00504             }
00505         }
00506         // First-time creation request
00507         else
00508         {
00509             m_isImplicitCreationInProgress = true;
00510             co_await CreateCoreObjects();
00511         }
00512     }
00513
00514     if (m_coreWebView)
00515     {
00516         // TODO_WebView2: Should we use RawUri() instead of AbsoluteUri()?
00517         // Try to apply latest source (could have changed during the co_await's above)
00518         const auto updatedUri = this->Source();
00519         if (!updatedUri.Equals(providedUri) && ShouldNavigate(updatedUri))
00520         {
00521             m_coreWebView.Navigate(updatedUri.AbsoluteUri());
00522         }
00523         else
00524         {
00525             m_coreWebView.Navigate(providedUri.AbsoluteUri());
00526         }
00527     }
00528
00529     co_return;
00530 }
00531
00532 HWND WebView2::GetHostHwnd() noexcept
00533 {
00534     if (!m_xamlHostHwnd)
00535     {
00536         auto xamlRoot = this->XamlRoot();
00537         if (xamlRoot)
00538         {
00539             com_ptr<IXamlRootNative> xamlRootNative = xamlRoot.as<IXamlRootNative>();
00540             winrt::check_hresult(xamlRootNative->get_HostWindow(&m_xamlHostHwnd));
00541         }
00542     }
00543
00544     return m_xamlHostHwnd;
00545 }
00546
00547 void WebView2::RegisterCoreEventHandlers()
00548 {
00549     m_coreNavigationStartingRevoker = m_coreWebView.NavigationStarting(winrt::auto_revoke, {
00550         [weakThis{ get_weak() }](auto const&, winrt::CoreWebView2NavigationStartingEventArgs const& args)
00551         {
00552             if (auto strongThis = weakThis.get())
00553             {
00554                 // Update Uri without navigation
00555                 strongThis->UpdateSourceInternal();
00556                 strongThis->FireNavigationStarting(args);
00557             }
00558         } });
00559
00560     m_coreSourceChangedRevoker = m_coreWebView.SourceChanged(winrt::auto_revoke, {
00561         [weakThis{ get_weak() }](auto const&, winrt::CoreWebView2SourceChangedEventArgs const& args)
00562         {
00563             if (auto strongThis = weakThis.get())
00564             {
00565                 strongThis->UpdateSourceInternal();
00566             }
00567         } });
00568
00569     m_coreNavigationCompletedRevoker = m_coreWebView.NavigationCompleted(winrt::auto_revoke, {
00570         [weakThis{ get_weak() }](auto const&, winrt::CoreWebView2NavigationCompletedEventArgs const& args)
00571         {
00572             if (auto strongThis = weakThis.get())
00573             {
00574                 strongThis->FireNavigationCompleted(args);
00575             }
00576         } });
00577
00578     m_coreWebMessageReceivedRevoker = m_coreWebView.WebMessageReceived(winrt::auto_revoke, {
00579         [weakThis{ get_weak() }](auto const&, winrt::CoreWebView2WebMessageReceivedEventArgs const& args)
00580         {
00581             if (auto strongThis = weakThis.get())
00582             {
00583                 strongThis->FireWebMessageReceived(args);
00584             }
00585         } });
00586
00587     m_coreMoveFocusRequestedRevoker = m_coreWebViewController.MoveFocusRequested(winrt::auto_revoke, {
00588         [weakThis{ get_weak() }](auto const&, const winrt::CoreWebView2MoveFocusRequestedEventArgs& args)
00589         {
00590             if (auto strongThis = weakThis.get())
00591             {
00592                 winrt::CoreWebView2MoveFocusReason moveFocusRequestedReason{ args.Reason() };
00593
00594                 if (moveFocusRequestedReason == winrt::CoreWebView2MoveFocusReason::Next ||
00595                     moveFocusRequestedReason == winrt::CoreWebView2MoveFocusReason::Previous)
00596                 {
00597                     winrt::XamlRoot xamlRoot = strongThis->XamlRoot();
00598                     if (xamlRoot)
00599                     {
00600                         winrt::FocusNavigationDirection xamlDirection = moveFocusRequestedReason == winrt::CoreWebView2MoveFocusReason::Next
00601                             ? winrt::FocusNavigationDirection::Next
00602                             : winrt::FocusNavigationDirection::Previous;
00603
00604                         winrt::FindNextElementOptions findNextElementOptions;
00605                         findNextElementOptions.SearchRoot(xamlRoot.Content());
00606
00607                         winrt::DependencyObject nextElement = winrt::FocusManager::FindNextElement(xamlDirection, findNextElementOptions);
00608                         winrt::DependencyObject focusedElement = winrt::FocusManager::GetFocusedElement(xamlRoot).try_as<winrt::DependencyObject>();
00609
00610                         if (nextElement && nextElement != focusedElement)
00611                         {
00612                             // TODO_WebView2: We should check TryMoveFocusAsync() result before returning since FindNextElement()
00613                             //                only finds the next focusable element, but does not guarantee that we can
00614                             //                actually focus on it (eg it could be empty/in the process of loading).
00615                             //                Waiting on this result via winrt/cpp coroutine results in the WINRT_ASSERT
00616                             //                warning about a blocking wait on UI Thread.
00617                             //
00618                             //                We will address this scenario properly as part of:
00619                             //                Task 23157748: WebView2 should implement IInternalCoreWindowFocus (use Xaml's unified focus model)
00620                             //
00621                             //                For now, we'll assign the return value of TryMoveFocusAsync() to a dummy variable
00622                             //                in order to avoid the code analysis error C26444:
00623                             //
00624                             //                https://docs.microsoft.com/en-us/cpp/code-quality/c26444?view=vs-2019
00625
00626                             // If core webview is also losing focus via something other than TAB (web LostFocus event fired)
00627                             // and the TAB handling is arriving later (eg due to longer MOJO delay), skip manually moving Xaml Focus to next element.
00628                             winrt::DependencyObject thisElement = strongThis->try_as<winrt::DependencyObject>();
00629                             if (thisElement == focusedElement)
00630                             {
00631                                 // Move focus to the next XAML element
00632                                 const auto _ = winrt::FocusManager::TryMoveFocusAsync(xamlDirection, findNextElementOptions);
00633                             }
00634                         }
00635                         else
00636                         {
00637                             // Handle the case where there is no "next" focusable XAML element (WebView2 is first/last/only element),
00638                             // which we are in if FindNextElement() returns either null or the (already focused) WebView2. The appropriate
00639                             // behavior here is to cycle focus inside the webview, "wrapping around" to the other end (regardless of
00640                             //  WebView2.KeyboardNavigationMode).To achieve this, manually Call MoveFocus() in the specified direction.
00641                             strongThis->MoveFocusIntoCoreWebView2(moveFocusRequestedReason);
00642                         }
00643                     }
00644                 }
00645
00646                 // Always mark the args handled to prevent CoreWebView2Controller's "default behavior" which breaks XAML focus expectations (by explicitly changing  HWND focus)
00647                 // More info: https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2movefocusrequestedeventargs?view=webview2-winrt-1.0.2535.41#handled
00648                 args.Handled(TRUE);
00649
00650             }
00651         } });
00652
00653     m_coreProcessFailedRevoker = m_coreWebView.ProcessFailed(winrt::auto_revoke, {
00654         [weakThis{ get_weak() }](auto const&, const winrt::CoreWebView2ProcessFailedEventArgs& args)
00655         {
00656             if (auto strongThis = weakThis.get())
00657             {
00658                 // Moving focus out of WebView2
00659                 winrt::FocusNavigationDirection xamlDirection{ winrt::FocusNavigationDirection::Next };
00660                 winrt::FindNextElementOptions findNextElementOptions;
00661                 winrt::XamlRoot xamlRoot = strongThis->XamlRoot();
00662
00663                 if (xamlRoot)
00664                 {
00665                     findNextElementOptions.SearchRoot(xamlRoot.Content());
00666                     winrt::DependencyObject nextElement = winrt::FocusManager::FindNextElement(xamlDirection, findNextElementOptions);
00667                     if (nextElement)
00668                     {
00669                         const auto _ = winrt::FocusManager::TryMoveFocusAsync(xamlDirection, findNextElementOptions);
00670                     }
00671                 }
00672
00673                 winrt::CoreWebView2ProcessFailedKind coreProcessFailedKind{ args.ProcessFailedKind() };
00674                 if (coreProcessFailedKind == winrt::CoreWebView2ProcessFailedKind::BrowserProcessExited)
00675                 {
00676                     strongThis->m_isCoreFailure_BrowserExited_State = true;
00677
00678                     // CoreWebView2 takes care of clearing the event handlers when closing the host,
00679                     // but we still need to reset the event tokens
00680                     strongThis->UnregisterCoreEventHandlers();
00681
00682                     // Null these out so we can't try to use them anymore
00683                     strongThis->m_coreWebViewCompositionController = nullptr;
00684                     strongThis->m_coreWebViewController = nullptr;
00685                     strongThis->m_coreWebView = nullptr;
00686                     strongThis->ResetProperties();
00687                 }
00688
00689                 strongThis->FireCoreProcessFailedEvent(args);
00690             }
00691         } });
00692
00693     m_cursorChangedRevoker = m_coreWebViewCompositionController.CursorChanged(winrt::auto_revoke, {
00694         [weakThis{ get_weak() }](auto const& controller, auto const& obj)
00695         {
00696             if (auto strongThis = weakThis.get())
00697             {
00698                 winrt::CoreCursor coreCursor = controller.Cursor();
00699                 winrt::IInputSystemCursor inputSystemCursor;
00700
00701                 switch (coreCursor.Type())
00702                 {
00703                     default:
00704                     case winrt::CoreCursorType::Arrow:
00705                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::Arrow);
00706                         break;
00707                     case winrt::CoreCursorType::Cross:
00708                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::Cross);
00709                         break;
00710                     case winrt::CoreCursorType::Hand:
00711                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::Hand);
00712                         break;
00713                     case winrt::CoreCursorType::Help:
00714                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::Help);
00715                         break;
00716                     case winrt::CoreCursorType::IBeam:
00717                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::IBeam);
00718                         break;
00719                     case winrt::CoreCursorType::Person:
00720                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::Person);
00721                         break;
00722                     case winrt::CoreCursorType::Pin:
00723                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::Pin);
00724                         break;
00725                     case winrt::CoreCursorType::SizeAll:
00726                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::SizeAll);
00727                         break;
00728                     case winrt::CoreCursorType::SizeNortheastSouthwest:
00729                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::SizeNortheastSouthwest);
00730                         break;
00731                     case winrt::CoreCursorType::SizeNorthwestSoutheast:
00732                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::SizeNorthwestSoutheast);
00733                         break;
00734                     case winrt::CoreCursorType::SizeNorthSouth:
00735                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::SizeNorthSouth);
00736                         break;
00737                     case winrt::CoreCursorType::SizeWestEast:
00738                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::SizeWestEast);
00739                         break;
00740                     case winrt::CoreCursorType::UniversalNo:
00741                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::UniversalNo);
00742                         break;
00743                     case winrt::CoreCursorType::Wait:
00744                         inputSystemCursor = winrt::InputSystemCursor::Create(winrt::InputSystemCursorShape::Wait);
00745                         break;
00746                 }
00747
00748                 winrt::InputCursor inputCursorToSet = inputSystemCursor.as<winrt::InputCursor>();
00749                 strongThis->ProtectedCursor(inputCursorToSet);
00750             }
00751         } });
00752 }
00753
00754 void WebView2::UnregisterCoreEventHandlers()
00755 {
00756     if (m_coreWebView)
00757     {
00758         m_coreNavigationStartingRevoker.revoke();
00759         m_coreSourceChangedRevoker.revoke();
00760         m_coreNavigationCompletedRevoker.revoke();
00761         m_coreWebMessageReceivedRevoker.revoke();
00762         m_coreProcessFailedRevoker.revoke();
00763     }
00764
00765     if (m_coreWebViewController)
00766     {
00767         m_coreMoveFocusRequestedRevoker.revoke();
00768     }
00769
00770     if (m_coreWebViewCompositionController)
00771     {
00772         m_cursorChangedRevoker.revoke();
00773     }
00774 }
00775
00776 winrt::IAsyncAction WebView2::CreateCoreObjects(winrt::CoreWebView2Environment environment, winrt::CoreWebView2ControllerOptions controllerOptions)
00777 {
00778     MUX_ASSERT((m_isImplicitCreationInProgress && !m_isExplicitCreationInProgress) ||
00779                (!m_isImplicitCreationInProgress && m_isExplicitCreationInProgress));
00780
00781     auto strongThis = get_strong(); // ensure object lifetime during coroutines
00782
00783     if (m_isClosed)
00784     {
00785         throw winrt::hresult_error(RO_E_CLOSED, s_error_wv2_closed);
00786     }
00787     else
00788     {
00789         XamlTelemetry::WebView2_CreateCoreObjects(true, reinterpret_cast<uint64_t>(this));
00790
00791         m_creationInProgressAsync = std::make_unique<AsyncWebViewOperations>();
00792         RegisterXamlEventHandlers();
00793
00794         // We are about to attempt re-creation of the environment,
00795         // so clear any previous 'Missing Anaheim Warning'
00796         Children().Clear();
00797
00798         // Normally we always need a new environment, the exception being when Anaheim process failed and we get to reuse the existing one
00799         if (!m_isCoreFailure_BrowserExited_State)
00800         {
00801             m_coreWebViewEnvironment = environment ? environment : co_await CreateDefaultCoreEnvironment();
00802         }
00803
00804         if (m_coreWebViewEnvironment)
00805         {
00806             co_await CreateCoreWebViewFromEnvironment(GetHostHwnd(), controllerOptions);
00807
00808             // Do initialization including rendering setup.
00809             // Try this now but defer to Loaded event if it hasn't fired yet.
00810             TryCompleteInitialization();
00811         }
00812         else if (m_shouldShowMissingAnaheimWarning)
00813         {
00814             CreateMissingAnaheimWarning();
00815         }
00816
00817         XamlTelemetry::WebView2_CreateCoreObjects(false, reinterpret_cast<uint64_t>(this));
00818     }
00819
00820     co_return;
00821 }
00822
00823 winrt::IAsyncOperation<winrt::CoreWebView2Environment> WebView2::CreateDefaultCoreEnvironment() noexcept
00824 {
00825     hstring browserInstall;
00826     hstring userDataFolder;
00827     winrt::CoreWebView2Environment returnedValue = nullptr;
00828
00829     auto strongThis = get_strong(); // ensure object lifetime during coroutines
00830
00831     // NOTE: To enable Anaheim logging, add: environmentOptions.AdditionalBrowserArguments(L"--enable-logging=stderr --v=1");
00832     winrt::CoreWebView2EnvironmentOptions environmentOptions =  winrt::CoreWebView2EnvironmentOptions();
00833
00834     auto applicationLanguagesList = winrt::ApplicationLanguages::Languages();
00835     if (applicationLanguagesList.Size() > 0)
00836     {
00837         environmentOptions.Language(applicationLanguagesList.GetAt(0));
00838     }
00839
00840     try
00841     {
00842         returnedValue = co_await winrt::CoreWebView2Environment::CreateWithOptionsAsync(browserInstall, userDataFolder, environmentOptions);
00843     }
00844     catch (winrt::hresult_error e)
00845     {
00846         winrt::hresult hr = e.code().value;
00847         m_shouldShowMissingAnaheimWarning = hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
00848         FireCoreWebView2Initialized(hr);
00849     }
00850
00851     co_return returnedValue;
00852 }
00853
00854 winrt::IAsyncAction WebView2::CreateCoreWebViewFromEnvironment(HWND hwndParent, winrt::CoreWebView2ControllerOptions controllerOptions)
00855 {
00856     auto strongThis = get_strong(); // ensure object lifetime during coroutines
00857
00858     if (!hwndParent)
00859     {
00860         hwndParent = EnsureTemporaryHostHwnd();
00861     }
00862
00863     try
00864     {
00865         auto windowRef = winrt::CoreWebView2ControllerWindowReference::CreateFromWindowHandle(reinterpret_cast<UINT64>(hwndParent));
00866         // CreateCoreWebView2CompositionController(Async) creates a CompositionController and is in visual hosting mode.
00867         // Calling CreateCoreWebView2Controller would create a Controller and would be in windowed mode.
00868         if (!controllerOptions)
00869         {
00870             m_coreWebViewCompositionController = co_await m_coreWebViewEnvironment.CreateCoreWebView2CompositionControllerAsync(windowRef);
00871         }
00872         else
00873         {
00874             m_customCoreWebViewControllerOptions = controllerOptions;
00875             m_coreWebViewCompositionController = co_await m_coreWebViewEnvironment.CreateCoreWebView2CompositionControllerAsync(windowRef, controllerOptions);
00876         }
00877         m_coreWebViewController = m_coreWebViewCompositionController.as<winrt::CoreWebView2Controller>();
00878         m_coreWebViewController.DefaultBackgroundColor(this->DefaultBackgroundColor());
00879         m_coreWebViewController.ShouldDetectMonitorScaleChanges(false);
00880         m_coreWebView = m_coreWebViewController.CoreWebView2();
00881
00882         RegisterCoreEventHandlers();
00883         // Creation is considered complete at this point, however rendering and accessibility
00884         // hookup will only run after we get Loaded event (see TryCompleteInitialization())
00885         FireCoreWebView2Initialized(winrt::hresult(S_OK));
00886     }
00887     catch (winrt::hresult_error e)
00888     {
00889         winrt::hresult hr = e.code().value;
00890         FireCoreWebView2Initialized(hr);
00891     }
00892
00893     m_isImplicitCreationInProgress = false;
00894     m_isExplicitCreationInProgress = false;
00895     m_creationInProgressAsync->StopWaiting();
00896     m_creationInProgressAsync.reset();
00897
00898     co_return;
00899 }
00900
00901 // Get a theme-appropriate Background color to use as BG for SystemVisualBridge.
00902 // This helps avoid flicker when CoreWebView2 is intializing or shutting down.
00903 winrt::Color WebView2::GetThemeBackgroundColor()
00904 {
00905     bool isHighContrast = GetAccessibilitySettings().HighContrast();
00906     std::wstring helperBrushName = isHighContrast ? L"BrushForThemeBackgroundColor_HC" : L"BrushForThemeBackgroundColor";
00907
00908     // Ensure helper SCB referencing appropriate color as a ThemeResource is added to WV2.Resources.
00909     // This is needed since programatic lookup of theme resources themselves does not account for active theme.
00910     if (!this->Resources().HasKey(box_value(helperBrushName)))
00911     {
00912         std::wstring resourceName = isHighContrast ? L"SystemColorWindowColor" : L"SolidBackgroundFillColorBase";
00913         winrt::SolidColorBrush helperBrush = winrt::XamlReader::Load(
00914             L"<SolidColorBrush xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' "
00915             L"xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' "
00916             L"x:Name='" + helperBrushName + L"' "
00917             L"Color='{ThemeResource " + resourceName + L"}'/>"
00918         ).as<winrt::SolidColorBrush>();
00919
00920         this->Resources().Insert(box_value(helperBrushName), helperBrush);
00921     }
00922
00923     // Read off the theme-appropriate BG color from helper brush resource
00924     return (this->Resources().Lookup(box_value(helperBrushName)).as<winrt::SolidColorBrush>()).Color();
00925 }
00926
00927 void WebView2::UpdateDefaultVisualBackgroundColor()
00928 {
00929     if (m_systemVisualBridge) { m_systemVisualBridge.BackgroundColor(GetThemeBackgroundColor()); }
00930 }
00931
00932 HWND WebView2::EnsureTemporaryHostHwnd()
00933 {
00934     // If we don't know the parent yet, either use the CoreWindow as the parent,
00935     // or if we don't have one, create a dummy hwnd to be the temporary parent.
00936     // Using a dummy parent all the time won't work, since we can't reparent the
00937     // browser from a Non-ShellManaged Hwnd (dummy) to a ShellManaged one (CoreWindow).
00938     winrt::CoreWindow coreWindow = winrt::CoreWindow::GetForCurrentThread();
00939     if (coreWindow)
00940     {
00941         auto coreWindowInterop = coreWindow.as<ICoreWindowInterop>();
00942         winrt::check_hresult(coreWindowInterop->get_WindowHandle(&m_tempHostHwnd));
00943     }
00944     else
00945     {
00946         // Register the window class.
00947         const wchar_t CLASS_NAME[] = L"WEBVIEW2_TEMP_PARENT";
00948         HINSTANCE hInstance = ::GetModuleHandleW(NULL);
00949         WNDCLASSW wc = { };
00950         wc.lpfnWndProc = DefWindowProcW;
00951         wc.hInstance = hInstance;
00952         wc.lpszClassName = CLASS_NAME;
00953         RegisterClassW(&wc);
00954
00955         m_tempHostHwnd = CreateWindowEx(
00956             0,
00957             CLASS_NAME,                     // Window class
00958             L"Webview2 Temporary Parent",   // Window text
00959             WS_OVERLAPPED,                  // Window style
00960             0, 0, 0, 0,
00961             NULL,       // Parent window
00962             NULL,       // Menu
00963             hInstance,  // Instance handle
00964             NULL        // Additional application data
00965         );
00966     }
00967     return m_tempHostHwnd;
00968 }
00969
00970 void WebView2::CreateMissingAnaheimWarning()
00971 {
00972     auto warning = winrt::TextBlock();
00973     warning.Text(ResourceAccessor::GetLocalizedStringResource(SR_WarningSuitableWebView2NotFound));
00974     warning.Inlines().Append(winrt::LineBreak());
00975     auto linkText = winrt::Run();
00976     linkText.Text(ResourceAccessor::GetLocalizedStringResource(SR_DownloadWebView2Runtime));
00977     auto hyperlink = winrt::Hyperlink();
00978     hyperlink.Inlines().Append(linkText);
00979     auto url = winrt::Uri(L"https://aka.ms/winui3/webview2download/");
00980     hyperlink.NavigateUri(url);
00981     warning.Inlines().Append(hyperlink);
00982     Children().Append(warning);
00983 }
00984
00985 // We could have a child TextBlock (see CreateMissingAnaheimWarning), make sure it is visited by Measure pass.
00986 winrt::Size WebView2::MeasureOverride(winrt::Size const& availableSize)
00987 {
00988     if (Children().Size() > 0)
00989     {
00990         Children().GetAt(0).Measure(availableSize);
00991     }
00992
00993     return __super::MeasureOverride(availableSize);
00994 }
00995
00996 // We could have a child TextBlock (see CreateMissingAnaheimWarning), make sure it is visited by Arrange pass.
00997 winrt::Size WebView2::ArrangeOverride(winrt::Size const& finalSize)
00998 {
00999     if (Children().Size() > 0)
01000     {
01001         Children().GetAt(0).Arrange(winrt::Rect{ winrt::Point{0,0}, finalSize });
01002     }
01003
01004     return __super::ArrangeOverride(finalSize);
01005 }
01006
01007 void WebView2::FillPointerPenInfo(const winrt::PointerPoint& inputPt, winrt::CoreWebView2PointerInfo outputPt)
01008 {
01009     winrt::PointerPointProperties inputProperties{ inputPt.Properties() };
01010
01011     UINT32 outputPt_penFlags{ PEN_FLAG_NONE };
01012     if (inputProperties.IsBarrelButtonPressed())
01013     {
01014         outputPt_penFlags |= PEN_FLAG_BARREL;
01015     }
01016     if (inputProperties.IsInverted())
01017     {
01018         outputPt_penFlags |= PEN_FLAG_INVERTED;
01019     }
01020     if (inputProperties.IsEraser())
01021     {
01022         outputPt_penFlags |= PEN_FLAG_ERASER;
01023     }
01024     outputPt.PenFlags(outputPt_penFlags);
01025
01026     outputPt.PenMask(PEN_MASK_PRESSURE | PEN_MASK_ROTATION | PEN_MASK_TILT_X | PEN_MASK_TILT_Y);
01027     outputPt.PenPressure(static_cast<uint32_t>(inputProperties.Pressure() * 1024));
01028     outputPt.PenRotation(static_cast<uint32_t>(inputProperties.Twist()));
01029     outputPt.PenTiltX(static_cast<int32_t>(inputProperties.XTilt()));
01030     outputPt.PenTiltY(static_cast<int32_t>(inputProperties.YTilt()));
01031 }
01032
01033 void WebView2::FillPointerTouchInfo(const winrt::PointerPoint& inputPt, winrt::CoreWebView2PointerInfo outputPt)
01034 {
01035     winrt::PointerPointProperties inputProperties{ inputPt.Properties() };
01036
01037     outputPt.TouchFlags(TOUCH_FLAG_NONE);
01038     outputPt.TouchMask(TOUCH_MASK_CONTACTAREA | TOUCH_MASK_ORIENTATION | TOUCH_MASK_PRESSURE);
01039
01040     auto touchContact = ScaleRectToPhysicalPixels(inputProperties.ContactRect());
01041     outputPt.TouchContact(touchContact);
01042     outputPt.TouchContactRaw(touchContact);
01043
01044     outputPt.TouchOrientation(static_cast<uint32_t>(inputProperties.Orientation()));
01045     outputPt.TouchPressure(static_cast<uint32_t>(inputProperties.Pressure() * 1024));
01046 }
01047
01048 void WebView2::FillPointerInfo(const winrt::PointerPoint& inputPt, winrt::CoreWebView2PointerInfo outputPt, const winrt::PointerRoutedEventArgs& args)
01049 {
01050     winrt::PointerPointProperties inputProperties{ inputPt.Properties() };
01051
01052     winrt::PointerDeviceType deviceType{ inputPt.PointerDeviceType() };
01053
01054     if (deviceType == winrt::PointerDeviceType::Pen)
01055     {
01056         outputPt.PointerKind(PT_PEN);
01057     }
01058     else if (deviceType == winrt::PointerDeviceType::Touch)
01059     {
01060         outputPt.PointerKind(PT_TOUCH);
01061     }
01062
01063     outputPt.PointerId(args.Pointer().PointerId());
01064     outputPt.FrameId(inputPt.FrameId());
01065     outputPt.PointerFlags(GetPointerFlags(inputPt));
01066
01067     auto pixelLocation = ScalePointToPhysicalPixels(inputPt.Position());
01068     outputPt.PixelLocation(pixelLocation);
01069     outputPt.PixelLocationRaw(pixelLocation);
01070
01071     // TODO Task 30544057 - Himetric location and raw himetric location
01072
01073     outputPt.Time(static_cast<uint32_t>(inputPt.Timestamp() / 1000)); //microsecond to millisecond conversion (for tick count)
01074     outputPt.HistoryCount(args.GetIntermediatePoints(*this).Size());
01075
01076     LARGE_INTEGER lpFrequency{};
01077     if (QueryPerformanceFrequency(&lpFrequency))
01078     {
01079         auto scale = 1000000;
01080         auto frequency = lpFrequency.QuadPart;
01081         outputPt.PerformanceCount((inputPt.Timestamp() * frequency) / scale);
01082     }
01083
01084     outputPt.ButtonChangeKind(static_cast<int32_t>(inputProperties.PointerUpdateKind()));
01085 }
01086
01087 uint32_t WebView2::GetPointerFlags(const winrt::PointerPoint& inputPt)
01088 {
01089     winrt::PointerPointProperties inputProperties{ inputPt.Properties() };
01090     winrt::PointerDeviceType deviceType{ inputPt.PointerDeviceType() };
01091     uint32_t pointerFlags{ POINTER_FLAG_NONE };
01092
01093     if (deviceType == winrt::PointerDeviceType::Touch)
01094     {
01095         if (inputPt.IsInContact())
01096         {
01097             pointerFlags |= POINTER_FLAG_INCONTACT;
01098             pointerFlags |= POINTER_FLAG_FIRSTBUTTON;
01099         }
01100
01101         if (inputProperties.PointerUpdateKind() == winrt::PointerUpdateKind::LeftButtonPressed)
01102         {
01103             pointerFlags |= POINTER_FLAG_NEW;
01104         }
01105     }
01106     else if (deviceType == winrt::PointerDeviceType::Pen)
01107     {
01108         if (inputPt.IsInContact())
01109         {
01110             pointerFlags |= POINTER_FLAG_INCONTACT;
01111
01112             if (!inputProperties.IsBarrelButtonPressed())
01113             {
01114                 pointerFlags |= POINTER_FLAG_FIRSTBUTTON;
01115             }
01116             else
01117             {
01118                 pointerFlags |= POINTER_FLAG_SECONDBUTTON;
01119             }
01120         } // POINTER_FLAG_NEW is currently omitted for pen input
01121     }
01122
01123     if (inputProperties.IsInRange()) { pointerFlags |= POINTER_FLAG_INRANGE; }
01124     if (inputProperties.IsPrimary()) { pointerFlags |= POINTER_FLAG_PRIMARY; }
01125     if (inputProperties.IsCanceled()) { pointerFlags |= POINTER_FLAG_CANCELED; }
01126     if (inputProperties.TouchConfidence()) { pointerFlags |= POINTER_FLAG_CONFIDENCE; }
01127     if (inputProperties.PointerUpdateKind() == winrt::PointerUpdateKind::LeftButtonPressed) { pointerFlags |= POINTER_FLAG_DOWN; }
01128     if (inputProperties.PointerUpdateKind() == winrt::PointerUpdateKind::LeftButtonReleased) { pointerFlags |= POINTER_FLAG_UP; }
01129     if (inputProperties.PointerUpdateKind() == winrt::PointerUpdateKind::Other) { pointerFlags |= POINTER_FLAG_UPDATE; }
01130
01131     return pointerFlags;
01132 }
01133
01134 winrt::Rect WebView2::ScaleRectToPhysicalPixels(winrt::Rect inputRect)
01135 {
01136     float xVal = inputRect.X * m_rasterizationScale;
01137     float yVal = inputRect.Y * m_rasterizationScale;
01138     float width = inputRect.Width * m_rasterizationScale;
01139     float height = inputRect.Height * m_rasterizationScale;
01140
01141     return winrt::Rect(xVal, yVal, width, height);
01142 }
01143
01144 winrt::Point WebView2::ScalePointToPhysicalPixels(winrt::Point inputPoint)
01145 {
01146     return winrt::Point(inputPoint.X * m_rasterizationScale, inputPoint.Y * m_rasterizationScale);
01147 }
01148
01149 void WebView2::OnXamlPointerMessage(UINT message, const winrt::PointerRoutedEventArgs& args) noexcept
01150 {
01151     // Set Handled to prevent ancestor actions such as ScrollViewer taking focus on PointerPressed/PointerReleased.
01152     args.Handled(true);
01153
01154     if (!m_coreWebView || !m_coreWebViewCompositionController || CoreWebView2HasInvalidState())
01155     {
01156         // nothing to forward input to
01157         return;
01158     }
01159
01160     winrt::Microsoft::UI::Input::PointerPoint logicalPointerPoint{ args.GetCurrentPoint(*this) };
01161     winrt::Windows::Foundation::Point logicalPoint{ logicalPointerPoint.Position() };
01162     winrt::Windows::Foundation::Point physicalPoint = ScalePointToPhysicalPixels(logicalPoint);
01163     winrt::Microsoft::UI::Input::PointerDeviceType deviceType{ args.Pointer().PointerDeviceType() };
01164
01165     if (deviceType == winrt::Microsoft::UI::Input::PointerDeviceType::Mouse)
01166     {
01167         if (message == WM_MOUSELEAVE)
01168         {
01169             m_coreWebViewCompositionController.SendMouseInput(
01170                 winrt::CoreWebView2MouseEventKind{ static_cast<winrt::CoreWebView2MouseEventKind>(message) },
01171                 winrt::CoreWebView2MouseEventVirtualKeys{ static_cast<winrt::CoreWebView2MouseEventVirtualKeys>(0) },
01172                 0,
01173                 winrt::Point{ 0, 0 });
01174         }
01175         else
01176         {
01177             const WPARAM l_param = WebView2Utility::PackIntoWin32StylePointerArgs_lparam(message, args, physicalPoint);
01178             const LPARAM w_param = WebView2Utility::PackIntoWin32StyleMouseArgs_wparam(message, args, logicalPointerPoint);
01179
01180             POINT coords_win32{};
01181             POINTSTOPOINT(coords_win32, l_param);
01182             winrt::Point coords{ static_cast<float>(coords_win32.x), static_cast<float>(coords_win32.y) };
01183
01184             // mouse data is nonzero for mouse wheel scrolling and XBUTTON events
01185             DWORD mouse_data = 0;
01186             if (message == WM_MOUSEWHEEL || message == WM_MOUSEHWHEEL)
01187             {
01188                 mouse_data = GET_WHEEL_DELTA_WPARAM(w_param);
01189             }
01190             else if (message == WM_XBUTTONDOWN || message == WM_XBUTTONUP || message == WM_XBUTTONDBLCLK)
01191             {
01192                 mouse_data = GET_XBUTTON_WPARAM(w_param);
01193             }
01194
01195             m_coreWebViewCompositionController.SendMouseInput(
01196                 winrt::CoreWebView2MouseEventKind{ static_cast<winrt::CoreWebView2MouseEventKind>(message) },
01197                 winrt::CoreWebView2MouseEventVirtualKeys{ static_cast<winrt::CoreWebView2MouseEventVirtualKeys>(GET_KEYSTATE_WPARAM(w_param)) },
01198                 mouse_data,
01199                 coords);
01200         }
01201     }
01202     else if ((deviceType == winrt::Microsoft::UI::Input::PointerDeviceType::Touch) ||
01203              (deviceType == winrt::Microsoft::UI::Input::PointerDeviceType::Pen))
01204     {
01205         const winrt::PointerPoint inputPt{ args.GetCurrentPoint(*this) };
01206         winrt::CoreWebView2PointerInfo outputPt = m_coreWebViewEnvironment.CreateCoreWebView2PointerInfo();
01207
01208         if (deviceType == winrt::PointerDeviceType::Pen)
01209         {
01210             FillPointerPenInfo(inputPt, outputPt);
01211         }
01212         else if (deviceType == winrt::PointerDeviceType::Touch)
01213         {
01214             FillPointerTouchInfo(inputPt, outputPt);
01215         }
01216
01217         FillPointerInfo(inputPt, outputPt, args);
01218
01219         m_coreWebViewCompositionController.SendPointerInput(
01220             winrt::CoreWebView2PointerEventKind{ static_cast<winrt::CoreWebView2PointerEventKind>(message) },
01221             outputPt);
01222     }
01223 }
01224
01225 void WebView2::ResetMouseInputState()
01226 {
01227     m_isLeftMouseButtonPressed = false;
01228     m_isMiddleMouseButtonPressed = false;
01229     m_isRightMouseButtonPressed = false;
01230     m_isXButton1Pressed = false;
01231     m_isXButton2Pressed = false;
01232 }
01233
01234 void WebView2::FireNavigationStarting(const winrt::CoreWebView2NavigationStartingEventArgs& args)
01235 {
01236     // Fire new event on MUX side
01237     m_navigationStartingEventSource(*this, args);
01238 }
01239
01240 // Event fired when navigation has occurred in the WebView2.
01241 void WebView2::FireNavigationCompleted(const winrt::CoreWebView2NavigationCompletedEventArgs& args)
01242 {
01243     XamlTelemetry::WebView2_FireNavigationCompleted(reinterpret_cast<uint64_t>(this), !!m_navigationCompletedEventSource);
01244
01245     // UpdateSource to keep coherence between WebView2 and CoreWebView2.
01246     UpdateSourceInternal();
01247
01248     // Fire new event on MUXC side
01249     m_navigationCompletedEventSource(*this, args);
01250 }
01251
01252 // MUXC side event for WebMessageReceived
01253 // Registering for this event will allow for a notification to be received from an Anaheim side script.
01254 void WebView2::FireWebMessageReceived(const winrt::CoreWebView2WebMessageReceivedEventArgs& args)
01255 {
01256     m_webMessageReceivedEventSource(*this, args);
01257 }
01258
01259 // Updates the Source without navigating when the NavigationStarting event, SourceChanged event,
01260 // or NavigationCompleted events are fired from the core webview.
01261 void WebView2::UpdateSourceInternal()
01262 {
01263     if(CoreWebView2HasInvalidState()) { return; }
01264
01265     // Update Source to keep coherence between WebView2 and CoreWebView2.
01266     winrt::hstring newUri{ m_coreWebView.Source() };
01267     m_stopNavigateOnUriChanged = newUri;
01268     Source(winrt::Uri(newUri));
01269     m_stopNavigateOnUriChanged.clear();
01270
01271     // Update CanGoBack/Forward to be consistent with core webview post navigation.
01272     if (m_coreWebView)
01273     {
01274         SetCanGoBack(m_coreWebView.CanGoBack());
01275         SetCanGoForward(m_coreWebView.CanGoForward());
01276     }
01277 }
01278
01279 winrt::CoreWebView2 WebView2::CoreWebView2()
01280 {
01281     return m_coreWebView;
01282 }
01283
01284 void WebView2::FireCoreProcessFailedEvent(const winrt::CoreWebView2ProcessFailedEventArgs& args)
01285 {
01286     // Fire new event on MUXC side
01287     m_coreProcessFailedEventSource(*this, args);
01288 }
01289
01290 void WebView2::FireCoreWebView2Initialized(winrt::hresult exception)
01291 {
01292     auto eventArgs = winrt::make_self<CoreWebView2InitializedEventArgs>(exception);
01293     m_coreWebView2InitializedEventSource(*this, *eventArgs);
01294 }
01295
01296 void WebView2::MoveFocusIntoCoreWebView2(winrt::CoreWebView2MoveFocusReason reason)
01297 {
01298     if (m_coreWebView && m_coreWebViewController)
01299     {
01300         CoreWebView2RunIgnoreInvalidStateSync(
01301             [&]()
01302             {
01303                 m_coreWebViewController.MoveFocus(reason);
01304             });
01305     }
01306 }
01307
01308 void WebView2::HandleGotFocus(const winrt::Windows::Foundation::IInspectable&, const winrt::RoutedEventArgs&) noexcept
01309 {
01310     if (m_coreWebView && m_xamlFocusChangeInfo.m_isPending)
01311     {
01312         MoveFocusIntoCoreWebView2(m_xamlFocusChangeInfo.m_storedMoveFocusReason);
01313         m_xamlFocusChangeInfo.m_isPending = false;
01314     }
01315 }
01316
01317 void WebView2::HandleGettingFocus(const winrt::Windows::Foundation::IInspectable&, const winrt::GettingFocusEventArgs& args) noexcept
01318 {
01319     winrt::CoreWebView2MoveFocusReason moveFocusReason{ winrt::CoreWebView2MoveFocusReason::Programmatic };
01320
01321     if (args.InputDevice() == winrt::FocusInputDeviceKind::Keyboard)
01322     {
01323         if (args.Direction() == winrt::FocusNavigationDirection::Next)
01324         {
01325             moveFocusReason = winrt::CoreWebView2MoveFocusReason::Next;
01326         }
01327         else if (args.Direction() == winrt::FocusNavigationDirection::Previous)
01328         {
01329             moveFocusReason = winrt::CoreWebView2MoveFocusReason::Previous;
01330         }
01331     }
01332
01333     m_xamlFocusChangeInfo.m_storedMoveFocusReason = moveFocusReason;
01334     m_xamlFocusChangeInfo.m_isPending = true;
01335 }
01336
01337 void WebView2::HandleLosingFocus(const winrt::Windows::Foundation::IInspectable&, const winrt::RoutedEventArgs&) noexcept
01338 {
01339     m_xamlFocusChangeInfo.m_isPending = false;
01340 }
01341
01342 void WebView2::RegisterXamlEventHandlers()
01343 {
01344     m_gettingFocusRevoker = GettingFocus(winrt::auto_revoke, { this, &WebView2::HandleGettingFocus });
01345     m_gotFocusRevoker = GotFocus(winrt::auto_revoke, { this, &WebView2::HandleGotFocus });
01346     m_losingFocusRevoker = LosingFocus(winrt::auto_revoke, { this, &WebView2::HandleLosingFocus });
01347     m_pointerPressedRevoker = PointerPressed(winrt::auto_revoke, { this, &WebView2::HandlePointerPressed });
01348     m_pointerReleasedRevoker = PointerReleased(winrt::auto_revoke, { this, &WebView2::HandlePointerReleased });
01349     m_pointerMovedRevoker = PointerMoved(winrt::auto_revoke, { this, &WebView2::HandlePointerMoved });
01350     m_pointerWheelChangedRevoker = PointerWheelChanged(winrt::auto_revoke, { this, &WebView2::HandlePointerWheelChanged });
01351     m_pointerExitedRevoker = PointerExited(winrt::auto_revoke, { this, &WebView2::HandlePointerExited });
01352     m_pointerEnteredRevoker = PointerEntered(winrt::auto_revoke, { this, &WebView2::HandlePointerEntered });
01353     m_pointerCanceledRevoker = PointerCanceled(winrt::auto_revoke, { this, &WebView2::HandlePointerCanceled });
01354     m_pointerCaptureLostRevoker = PointerCaptureLost(winrt::auto_revoke, { this, &WebView2::HandlePointerCaptureLost });
01355
01356     m_sizeChangedRevoker = SizeChanged(winrt::auto_revoke, { this, &WebView2::HandleSizeChanged });
01357 }
01358
01359 void WebView2::UnregisterXamlEventHandlers()
01360 {
01361     m_gettingFocusRevoker.revoke();
01362     m_gotFocusRevoker.revoke();
01363     m_losingFocusRevoker.revoke();
01364     m_pointerPressedRevoker.revoke();
01365     m_pointerReleasedRevoker.revoke();
01366     m_pointerMovedRevoker.revoke();
01367     m_pointerWheelChangedRevoker.revoke();
01368     m_pointerExitedRevoker.revoke();
01369     m_pointerEnteredRevoker.revoke();
01370     m_pointerCanceledRevoker.revoke();
01371     m_pointerCaptureLostRevoker.revoke();
01372
01373     m_sizeChangedRevoker.revoke();
01374 }
01375
01376 winrt::AutomationPeer WebView2::OnCreateAutomationPeer()
01377 {
01378     return winrt::make<WebView2AutomationPeer>(*this);
01379 }
01380
01381 winrt::IUnknown WebView2::GetWebView2Provider()
01382 {
01383     winrt::com_ptr<IUnknown> provider;
01384     if (m_coreWebViewCompositionController)
01385     {
01386         CoreWebView2RunIgnoreInvalidStateSync(
01387             [&]()
01388             {
01389                 auto coreWebView2CompositionControllerInterop = m_coreWebViewCompositionController.as<ICoreWebView2CompositionControllerInterop>();
01390                 winrt::check_hresult(coreWebView2CompositionControllerInterop->get_AutomationProvider(provider.put()));
01391             });
01392     }
01393     return provider.as<winrt::IUnknown>();
01394 }
01395
01396 winrt::IUnknown WebView2::GetProviderForHwnd(HWND hwnd)
01397 {
01398     winrt::com_ptr<IUnknown> provider;
01399     if (m_coreWebViewEnvironment)
01400     {
01401         // If there is no provider for the given HWND, CoreWebview2 will return UIA_E_ELEMENTNOTAVAILABLE,
01402         // and we should just return an empty provider
01403         CoreWebView2RunIgnoreInvalidStateSync(
01404             [&]()
01405             {
01406                 auto coreWebView2EnvironmentInterop = m_coreWebViewEnvironment.as<ICoreWebView2EnvironmentInterop>();
01407                 winrt::hresult hr = coreWebView2EnvironmentInterop->GetAutomationProviderForWindow(hwnd, provider.put());
01408                 if (hr != UIA_E_ELEMENTNOTAVAILABLE)
01409                 {
01410                     winrt::check_hresult(hr);
01411                 }
01412             });
01413     }
01414     return provider.as<winrt::IUnknown>();
01415 }
01416
01417 winrt::IAsyncAction WebView2::EnsureCoreWebView2Async()
01418 {
01419     co_await EnsureCoreWebView2Async(nullptr, nullptr);
01420 }
01421
01422 winrt::IAsyncAction WebView2::EnsureCoreWebView2Async(winrt::CoreWebView2Environment environment)
01423 {
01424     co_await EnsureCoreWebView2Async(environment, nullptr);
01425 }
01426
01427 winrt::IAsyncAction WebView2::EnsureCoreWebView2Async(winrt::CoreWebView2Environment environment, winrt::CoreWebView2ControllerOptions controllerOptions)
01428 {
01429     auto strongThis = get_strong(); // ensure object lifetime during coroutines
01430
01431     if (m_isClosed)
01432     {
01433         throw winrt::hresult_error(RO_E_CLOSED, s_error_wv2_closed);
01434     }
01435
01436     // If CWV2 exists already, return immediately provided that current call to EnsureCWV2Async is compatible with original creation
01437     // Specifically, if current call has:
01438     //    a. Null args       : Always compatible  [i.e. E() == E(nullptr) == E(nullptr, nullptr))]
01439     //    b. Non-null arg(s) : Compatible iff called with same args as call that created current core objecs.
01440     //                         Note comparison is via reference equality for both args.
01441     if (m_coreWebView)
01442     {
01443         if (environment != nullptr || controllerOptions != nullptr)
01444         {
01445              if (m_coreWebViewEnvironment != environment)
01446              {
01447                 throw winrt::hresult_invalid_argument(
01448                     L"WebView2 was already initialized with a different CoreWebView2Environment. "
01449                     L"Check to see if the Source property was already set or EnsureCoreWebView2Async was previously called with different values."
01450                     );
01451              }
01452              if (m_customCoreWebViewControllerOptions != controllerOptions)
01453              {
01454                 throw winrt::hresult_invalid_argument(
01455                     L"WebView2 was already initialized with different CoreWebView2ControllerOptions. "
01456                     L"Check to see if the Source property was already set or EnsureCoreWebView2Async was previously called with different values."
01457                     );
01458              }
01459         }
01460
01461         // Synchronous return - existing core objects are compatible
01462         MUX_ASSERT(m_coreWebViewEnvironment && m_coreWebViewController);
01463         co_return;
01464     }
01465
01466     // If CWV2 is being created, return when the pending creation completes
01467     if (m_creationInProgressAsync)
01468     {
01469         MUX_ASSERT(m_isExplicitCreationInProgress || m_isImplicitCreationInProgress);
01470         co_await *m_creationInProgressAsync;
01471     }
01472
01473     // Otherwise, kick off a new CWV2 creation
01474     else
01475     {
01476         m_isExplicitCreationInProgress = true;
01477         if (environment != nullptr)
01478         {
01479             m_isExplicitEnvironment = true;
01480         }
01481         if (controllerOptions != nullptr)
01482         {
01483             m_isExplicitControllerOptions = true;
01484         }
01485         co_await CreateCoreObjects(environment, controllerOptions);
01486     }
01487
01488     MUX_ASSERT(!m_isImplicitCreationInProgress && !m_isExplicitCreationInProgress);
01489     co_return;
01490 }
01491
01492 void WebView2::DisconnectFromRootVisualTarget()
01493 {
01494     if(CoreWebView2HasInvalidState()) { return; }
01495
01496     if (m_coreWebViewCompositionController)
01497     {
01498         auto coreWebView2CompositionControllerInterop = m_coreWebViewCompositionController.as<ICoreWebView2CompositionControllerInterop>();
01499         winrt::check_hresult(coreWebView2CompositionControllerInterop->put_RootVisualTarget(nullptr));
01500     }
01501 }
01502
01503 winrt::AccessibilitySettings WebView2::GetAccessibilitySettings()
01504 {
01505     if (!m_accessibilitySettings)
01506     {
01507         m_accessibilitySettings = winrt::AccessibilitySettings();
01508     }
01509
01510     return m_accessibilitySettings;
01511 }
01512
01513 struct WebView2_TryCompleteInitialization_RAII : public SimpleXamlStartStopEvent_RAII
01514 {
01515 public:
01516     WebView2_TryCompleteInitialization_RAII(uint64_t objectPointer) : SimpleXamlStartStopEvent_RAII(objectPointer)
01517         { XamlTelemetry::WebView2_TryCompleteInitialization(true, m_objectPointer); }
01518     ~WebView2_TryCompleteInitialization_RAII()
01519         { XamlTelemetry::WebView2_TryCompleteInitialization(false, m_objectPointer); }
01520 };
01521
01522 void WebView2::TryCompleteInitialization()
01523 {
01524     // If proper Anaheim not present, no further initialization is necessary
01525     if (m_shouldShowMissingAnaheimWarning)
01526     {
01527         return;
01528     }
01529
01530     // If called directly after CWV2 creation completes, it's possible Xaml WV2 Loaded event did not yet fire.
01531     // Skip  work for now - this will be called again when WV2 Loaded fires.
01532     if (!this->IsLoaded())
01533     {
01534         return;
01535     }
01536
01537     // If called from Loaded handler, it's possible CWV2 is not ready yet.
01538     // Skip work for now - this will be called again when CWV2 is ready.
01539     if (!m_coreWebView)
01540     {
01541         return;
01542     }
01543
01544     if(CoreWebView2HasInvalidState())
01545     {
01546         return;
01547     }
01548
01549     WebView2_TryCompleteInitialization_RAII etwEvents(reinterpret_cast<uint64_t>(this));
01550
01551     // In a desktop scenario, we may have created the CoreWebView2 with a dummy hwnd as its parent
01552     // (see EnsureTemporaryHostHwnd()), in which case we need to update to use the real parent here.
01553     // If we used a CoreWindow parent, that hwnd has not changed. The CoreWebView2 does not allow us to switch
01554     // from using the CoreWindow as the parent to the XamlRoot.
01555     winrt::CoreWindow coreWindow = winrt::CoreWindow::GetForCurrentThread();
01556     if (!coreWindow)
01557     {
01558         HWND prevParentWindow = m_xamlHostHwnd;
01559         m_xamlHostHwnd = nullptr;
01560         HWND newParentWindow = GetHostHwnd();
01561         UpdateParentWindow(newParentWindow);
01562     }
01563
01564     XamlRootChangedHelper(true /* forceUpdate */);
01565     m_xamlRootChangedRevoker = this->XamlRoot().Changed(winrt::auto_revoke,
01566         [weakThis{ get_weak() }](auto const& /*sender*/, auto const& /*args*/)
01567         {
01568             if (auto strongThis = weakThis.get())
01569             {
01570                 strongThis->HandleXamlRootChanged();
01571             }
01572         });
01573
01574     if (!m_actualThemeChangedRevoker)
01575     {
01576         m_actualThemeChangedRevoker = this->ActualThemeChanged(winrt::auto_revoke,
01577             [this](auto&&, auto&&) { UpdateDefaultVisualBackgroundColor(); });
01578     }
01579
01580     // TODO_WebView2: Currently, AccessibilitySettings.HighContrastChanged does not work without a core window, and throws
01581     // an ElementNotFound exception. VS default behavior is to break on exceptions, regardless of whether we catch it below.
01582     // This is not a good experience for developers, since this happens on every WebView2 creation, and it feels like an error
01583     // even though it's expected.
01584     // We should avoid this altogether on desktop by not registering for the HighContrastChanged event, since for now it
01585     // will never be raised. Once Task #24777629 is fixed, we can remove the coreWindow check.
01586     if (!m_highContrastChangedRevoker && coreWindow)
01587     {
01588         m_highContrastChangedRevoker = GetAccessibilitySettings().HighContrastChanged(winrt::auto_revoke,
01589             [this](auto&&, auto&&) { UpdateDefaultVisualBackgroundColor(); });
01590     }
01591
01592     if (!m_textScaleChangedRevoker)
01593     {
01594         m_textScaleChangedRevoker = GetUISettings().TextScaleFactorChanged(winrt::auto_revoke,
01595             [weakThis{ get_weak() }](auto&&, auto&&)
01596             {
01597                 if (auto strongThis = weakThis.get())
01598                 {
01599                     // OnTextScaleFactorChanged happens in non-UI thread, use dispatcher to call UpdateCoreWebViewScale in UI thread.
01600                     strongThis->m_dispatcherHelper.RunAsync([strongThis]()
01601                         {
01602                             strongThis->UpdateCoreWebViewScale();
01603                         });
01604                 }
01605             });
01606     }
01607
01608     m_dragEnterRevoker = this->DragEnter(winrt::auto_revoke, { this, &WebView2::OnDragEnter });
01609     m_dragOverRevoker = this->DragOver(winrt::auto_revoke, { this, &WebView2::OnDragOver });
01610     m_dragLeaveRevoker = this->DragLeave(winrt::auto_revoke, { this, &WebView2::OnDragLeave });
01611     m_dropRevoker = this->Drop(winrt::auto_revoke, { this, &WebView2::OnDrop });
01612
01613     CreateAndSetVisual();
01614
01615     // If we were recreating the webview after a core process failure, indicate that we have now recovered
01616     m_isCoreFailure_BrowserExited_State = false;
01617
01618     if (const auto contentIslandEnvironment = this->XamlRoot().ContentIslandEnvironment())
01619     {
01620         const auto appWindowId = contentIslandEnvironment.AppWindowId();
01621         if(m_appWindow)
01622         {
01623             m_appWindow.Changed(m_appWindowPositionChangedToken);
01624         }
01625         m_appWindow = winrt::Microsoft::UI::Windowing::AppWindow::GetFromWindowId(appWindowId);
01626         m_appWindowPositionChangedToken = m_appWindow.Changed({this, &WebView2::OnAppWindowPositionChanged});
01627     }
01628
01629     //HandleGotFocus will give focus to the CWV2 if we're still pending to give it focus
01630     const winrt::Windows::Foundation::IInspectable emptyIInspectable;
01631     const winrt::RoutedEventArgs emptyArgs;
01632     HandleGotFocus(emptyIInspectable, emptyArgs);
01633 }
01634
01635 void WebView2::OnAppWindowPositionChanged(const winrt::Microsoft::UI::Windowing::AppWindow& sender, const winrt::Microsoft::UI::Windowing::AppWindowChangedEventArgs& args)
01636 {
01637     if (args.DidPositionChange())
01638     {
01639         m_coreWebViewController.NotifyParentWindowPositionChanged();
01640     }
01641 }
01642
01643 winrt::DataPackageOperation WebView2::DataPackageOperationFromDropEffect(DWORD dropEffect)
01644 {
01645     winrt::DataPackageOperation dataPackageOperation = winrt::DataPackageOperation::None;
01646     if ((dropEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY)
01647     {
01648         dataPackageOperation |= winrt::DataPackageOperation::Copy;
01649     }
01650     if ((dropEffect & DROPEFFECT_LINK) == DROPEFFECT_LINK)
01651     {
01652         dataPackageOperation |= winrt::DataPackageOperation::Link;
01653     }
01654     if ((dropEffect & DROPEFFECT_MOVE) == DROPEFFECT_MOVE)
01655     {
01656         dataPackageOperation |= winrt::DataPackageOperation::Move;
01657     }
01658
01659     return dataPackageOperation;
01660 }
01661
01662 void WebView2::ConvertXamlArgsToOle32Args(const winrt::DragEventArgs& args, DWORD& keyState, POINT& cursorPosition, DWORD& dropEffect, IDataObject** dataObject)
01663 {
01664     keyState = 0;
01665     cursorPosition = {0};
01666     dropEffect = DROPEFFECT_NONE;
01667
01668     // Get the drag drop modifiers and convert to key state
01669     winrt::DragDropModifiers dragDropModifiers = args.Modifiers();
01670     if ((dragDropModifiers & winrt::DragDropModifiers::LeftButton) ==
01671         winrt::DragDropModifiers::LeftButton)
01672     {
01673         keyState |= MK_LBUTTON;
01674     }
01675     if ((dragDropModifiers & winrt::DragDropModifiers::MiddleButton) ==
01676         winrt::DragDropModifiers::MiddleButton)
01677     {
01678         keyState |= MK_MBUTTON;
01679     }
01680     if ((dragDropModifiers & winrt::DragDrop::DragDropModifiers::RightButton) ==
01681         winrt::DragDrop::DragDropModifiers::RightButton)
01682     {
01683         keyState |= MK_RBUTTON;
01684     }
01685     if ((dragDropModifiers & winrt::DragDrop::DragDropModifiers::Shift) ==
01686         winrt::DragDrop::DragDropModifiers::Shift)
01687     {
01688         keyState |= MK_SHIFT;
01689     }
01690     if ((dragDropModifiers & winrt::DragDrop::DragDropModifiers::Control) ==
01691         winrt::DragDrop::DragDropModifiers::Control)
01692     {
01693         keyState |= MK_CONTROL;
01694     }
01695     if ((dragDropModifiers & winrt::DragDrop::DragDropModifiers::Alt) ==
01696         winrt::DragDrop::DragDropModifiers::Alt)
01697     {
01698         keyState |= MK_ALT;
01699     }
01700
01701     // point parameter must be modified to include the WebView's offset and be
01702     // in the WebView's client coordinates (Similar to how SendMouseInput works).
01703     winrt::Point cursorPosition_winrt{args.GetPosition(*this /* relativeTo */)};
01704     cursorPosition = {static_cast<LONG>(cursorPosition_winrt.X * m_rasterizationScale), static_cast<LONG>(cursorPosition_winrt.Y * m_rasterizationScale)};
01705
01706     // Map source's AllowedOperations to dropEffect
01707     winrt::DataPackageOperation allowedOperations = args.AllowedOperations();
01708     if ((allowedOperations & winrt::DataPackageOperation::Copy) ==
01709         winrt::DataPackageOperation::Copy)
01710     {
01711         dropEffect |= DROPEFFECT_COPY;
01712     }
01713     if ((allowedOperations & winrt::DataPackageOperation::Link) ==
01714         winrt::DataPackageOperation::Link)
01715     {
01716         dropEffect |= DROPEFFECT_LINK;
01717     }
01718     if ((allowedOperations & winrt::DataPackageOperation::Move) ==
01719         winrt::DataPackageOperation::Move)
01720     {
01721         dropEffect |= DROPEFFECT_MOVE;
01722     }
01723
01724     // Retrieve the IDataPackage
01725     if (dataObject)
01726     {
01727         args.DataView().as(IID_IDataObject, (void**)dataObject);
01728     }
01729 }
01730
01731
01732 void WebView2::OnDragEnter(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
01733 {
01734     DWORD keyState;
01735     POINT cursorPosition;
01736     DWORD dropEffect;
01737     winrt::com_ptr<IDataObject> dataObject;
01738
01739     ConvertXamlArgsToOle32Args(args, keyState, cursorPosition, dropEffect, dataObject.put());
01740
01741     auto coreWebViewCompositionControllerInterop2 = m_coreWebViewCompositionController.as<ICoreWebView2CompositionControllerInterop2>();
01742     winrt::check_hresult(coreWebViewCompositionControllerInterop2->DragEnter(dataObject.get(), keyState, cursorPosition, &dropEffect));
01743
01744     // Set the 'accepted' potential drop operation (chosen by DragEnter based on provided 'allowed operations')
01745     // This ensures Drop handler gets called for the element if appropriate
01746     args.AcceptedOperation(DataPackageOperationFromDropEffect(dropEffect));
01747 }
01748
01749 void WebView2::OnDragOver(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
01750 {
01751     DWORD keyState;
01752     POINT cursorPosition;
01753     DWORD dropEffect;
01754
01755     ConvertXamlArgsToOle32Args(args, keyState, cursorPosition, dropEffect, nullptr);
01756
01757     auto coreWebViewCompositionControllerInterop2 = m_coreWebViewCompositionController.as<ICoreWebView2CompositionControllerInterop2>();
01758     winrt::check_hresult(coreWebViewCompositionControllerInterop2->DragOver(keyState, cursorPosition, &dropEffect));
01759
01760     // Set the 'accepted' potential drop operation
01761     args.AcceptedOperation(DataPackageOperationFromDropEffect(dropEffect));
01762 }
01763
01764 void WebView2::OnDragLeave(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
01765 {
01766     auto coreWebViewCompositionControllerInterop2 = m_coreWebViewCompositionController.as<ICoreWebView2CompositionControllerInterop2>();
01767     winrt::check_hresult(coreWebViewCompositionControllerInterop2->DragLeave());
01768 }
01769
01770 void WebView2::OnDrop(const winrt::IInspectable& sender, const winrt::DragEventArgs& args)
01771 {
01772     DWORD keyState;
01773     POINT cursorPosition;
01774     DWORD dropEffect;
01775     winrt::com_ptr<IDataObject> dataObject;
01776
01777     ConvertXamlArgsToOle32Args(args, keyState, cursorPosition, dropEffect, dataObject.put());
01778
01779     auto coreWebViewCompositionControllerInterop2 = m_coreWebViewCompositionController.as<ICoreWebView2CompositionControllerInterop2>();
01780     winrt::check_hresult(coreWebViewCompositionControllerInterop2->Drop(dataObject.get(), keyState, cursorPosition, &dropEffect));
01781
01782     // Reflect the actual operation realized by drop in args.AcceptedOperation
01783     args.AcceptedOperation(DataPackageOperationFromDropEffect(dropEffect));
01784 }
01785
01786 void WebView2::CreateAndSetVisual()
01787 {
01788     if (!m_systemVisualBridge)
01789     {
01790         winrt::Compositor compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
01791         m_systemVisualBridge = winrt::ContentExternalOutputLink::Create(compositor);
01792     }
01793     UpdateDefaultVisualBackgroundColor();
01794
01795     SetCoreWebViewAndVisualSize(static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight()));
01796     winrt::ElementCompositionPreview::SetElementChildVisual(*this, m_systemVisualBridge.PlacementVisual());
01797
01798     winrt::com_ptr<IDCompositionTarget> sharedTarget = m_systemVisualBridge.as<IDCompositionTarget>();
01799     auto coreWebView2CompositionControllerInterop = m_coreWebViewCompositionController.as<ICoreWebView2CompositionControllerInterop>();
01800     winrt::check_hresult(coreWebView2CompositionControllerInterop->put_RootVisualTarget(sharedTarget.get()));
01801 }
01802
01803 winrt::IAsyncOperation<winrt::hstring> WebView2::ExecuteScriptAsync(winrt::hstring javascriptCode)
01804 {
01805     // TODO_WebView2: Consider recreating the core webview here if its process had failed,
01806     // allowing the app to use this API to recover from the error.
01807     auto strongThis = get_strong(); // ensure object lifetime during coroutines
01808
01809     winrt::hstring returnedValue{}; // initialized with default value
01810     if (m_coreWebView)
01811     {
01812         try
01813         {
01814             returnedValue = co_await m_coreWebView.ExecuteScriptAsync(javascriptCode);
01815         }
01816         catch (winrt::hresult_error e)
01817         {
01818             if (e.code().value != HRESULT_FROM_WIN32(ERROR_INVALID_STATE))
01819             {
01820                 throw;
01821             }
01822         }
01823     }
01824     else
01825     {
01826         throw winrt::hresult_illegal_method_call(std::wstring(L"ExecuteScriptAsync(): ").append(s_error_cwv2_not_present));
01827     }
01828
01829     co_return returnedValue;
01830 }
01831
01832 void WebView2::UpdateParentWindow(HWND newParentWindow)
01833 {
01834     if (m_tempHostHwnd && m_coreWebViewController)
01835     {
01836         auto windowRef = winrt::CoreWebView2ControllerWindowReference::CreateFromWindowHandle(reinterpret_cast<UINT64>(newParentWindow));
01837
01838         // Reparent webview host
01839         m_coreWebViewController.ParentWindow(windowRef);
01840
01841         DestroyWindow(m_tempHostHwnd);
01842         m_tempHostHwnd = nullptr;
01843     }
01844 }
01845
01846 void WebView2::OnLoaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
01847 {
01848     // OnLoaded and OnUnloaded are fired from XAML asynchronously, and unfortunately they could
01849     // be out of order.  If the element is removed from tree A and added to tree B, we could get
01850     // a Loaded event for tree B *before* we see the Unloaded event for tree A.  To handle this:
01851     //  * When we get a Loaded/Unloaded event, check the IsLoaded property. If it doesn't match
01852     //      the event we're in, nothing needs to be done since the other handler took care of it.
01853     //  * When we see a Loaded event when we have been or are already loaded, remove the
01854     //      XamlRootChanged event handler for the old tree and bind to the new one.
01855
01856     // If we're not loaded, there's nothing for us to do since Unloaded took care of everything
01857     if (!this->IsLoaded())
01858     {
01859         return;
01860     }
01861
01862     TryCompleteInitialization();
01863 }
01864
01865 void WebView2::OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
01866 {
01867     // Note that we always check the IsLoaded property before doing unloading actions, since we
01868     // could get an Unloaded event for an old tree A *after* a Loaded event for a new tree B.
01869     // See comment in WebView2::OnLoaded
01870     if (this->IsLoaded())
01871     {
01872         return;
01873     }
01874
01875     UpdateRenderedSubscriptionAndVisibility();
01876
01877     m_xamlRootChangedRevoker.revoke();
01878     if (m_appWindow)
01879     {
01880         m_appWindow.Changed(m_appWindowPositionChangedToken);
01881         m_appWindow = nullptr;
01882     }
01883
01884     DisconnectFromRootVisualTarget();
01885 }
01886
01887 void WebView2::Reload()
01888 {
01889     if (m_coreWebView)
01890     {
01891         CoreWebView2RunIgnoreInvalidStateSync(
01892             [&]()
01893             {
01894                 m_coreWebView.Reload();
01895             });
01896     }
01897     else
01898     {
01899         throw winrt::hresult_illegal_method_call(std::wstring(L"Reload(): ").append(s_error_cwv2_not_present));
01900     }
01901 }
01902
01903 void WebView2::UpdateCoreWebViewScale()
01904 {
01905     if (m_coreWebViewController)
01906     {
01907         auto textScaleFactor = m_uiSettings.TextScaleFactor();
01908         m_coreWebViewController.RasterizationScale(static_cast<double>(m_rasterizationScale * textScaleFactor));
01909     }
01910 }
01911
01912 void WebView2::NavigateToString(winrt::hstring htmlContent)
01913 {
01914     if (m_coreWebView)
01915     {
01916         CoreWebView2RunIgnoreInvalidStateSync(
01917             [&]()
01918             {
01919                 m_coreWebView.NavigateToString(htmlContent);
01920             });
01921     }
01922     else
01923     {
01924         throw winrt::hresult_illegal_method_call(std::wstring(L"NavigateToString(): ").append(s_error_cwv2_not_present));
01925     }
01926 }
01927
01928 void WebView2::GoBack()
01929 {
01930     if (m_coreWebView && CanGoBack())
01931     {
01932         CoreWebView2RunIgnoreInvalidStateSync(
01933             [&]()
01934             {
01935                 m_coreWebView.GoBack();
01936             });
01937     }
01938 }
01939
01940 void WebView2::GoForward()
01941 {
01942     if (m_coreWebView && CanGoForward())
01943     {
01944         CoreWebView2RunIgnoreInvalidStateSync(
01945             [&]()
01946             {
01947                 m_coreWebView.GoForward();
01948             });
01949     }
01950 }
01951
01952 void WebView2::XamlRootChangedHelper(bool forceUpdate)
01953 {
01954     if(CoreWebView2HasInvalidState()) { return; }
01955
01956     auto xamlRoot = this->XamlRoot();
01957     if (xamlRoot)
01958     {
01959         auto scale = static_cast<float>(xamlRoot.RasterizationScale());
01960         bool hostVisibility = xamlRoot.IsHostVisible();
01961         if (forceUpdate || (scale != m_rasterizationScale))
01962         {
01963             m_rasterizationScale = scale;
01964             m_isHostVisible = hostVisibility; // If we did forceUpdate we'll want to update host visibility here too
01965             UpdateCoreWebViewScale();
01966             SetCoreWebViewAndVisualSize(static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight()));
01967             CheckAndUpdateWebViewPosition();
01968             UpdateRenderedSubscriptionAndVisibility();
01969         }
01970         else if (hostVisibility != m_isHostVisible)
01971         {
01972             m_isHostVisible = hostVisibility;
01973             CheckAndUpdateVisibility();
01974         }
01975     }
01976 }
01977
01978 void WebView2::HandleXamlRootChanged()
01979 {
01980     XamlRootChangedHelper(false /* forceUpdate */);
01981 }
01982
01983 void WebView2::HandleSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& args)
01984 {
01985     SetCoreWebViewAndVisualSize(args.NewSize().Width, args.NewSize().Height);
01986 }
01987
01988 void WebView2::HandleRendered(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/)
01989 {
01990     if (m_coreWebView)
01991     {
01992         // Check if the position of the WebView inside the app has changed
01993         CheckAndUpdateWebViewPosition();
01994         // Check if the position of the window itself has changed
01995         CheckAndUpdateWindowPosition();
01996         // Check if the visibility property of a parent element has changed
01997         CheckAndUpdateVisibility();
01998     }
01999 }
02000
02001 void WebView2::CheckAndUpdateWebViewPosition()
02002 {
02003     if (!m_coreWebViewController)
02004     {
02005         return;
02006     }
02007
02008     // Skip this work if WebView2 has just been removed from the tree - otherwise the CWV2.Bounds update could cause a flicker.
02009     //
02010     // After WebView2 is removed from the tree, this handler gets run one more time during the frame's render pass
02011     // (WebView2::HandleRendered()). The removed element's ActualWidth or ActualHeight could now evaluate to zero
02012     // (if Width or Height weren't explicitly set), causing 0-sized Bounds to get applied below and clear the web content,
02013     // producing a flicker that last until DComp Commit for this frame is processed by Lifted & OS Compositors.
02014     if (!this->IsLoaded())
02015     {
02016         return;
02017     }
02018
02019     // Check if the position of the WebView2 within the window has changed
02020     bool changed = false;
02021     auto transform = TransformToVisual(nullptr);
02022     auto topLeft = transform.TransformPoint(winrt::Point(0, 0));
02023
02024     auto scaledTopLeftX = ceil(topLeft.X * m_rasterizationScale);
02025     auto scaledTopLeftY = ceil(topLeft.Y * m_rasterizationScale);
02026
02027     if (scaledTopLeftX != m_webViewScaledPosition.X || scaledTopLeftY != m_webViewScaledPosition.Y)
02028     {
02029         m_webViewScaledPosition.X = scaledTopLeftX;
02030         m_webViewScaledPosition.Y = scaledTopLeftY;
02031         changed = true;
02032     }
02033
02034     auto scaledSizeX = ceil(static_cast<float>(ActualWidth()) * m_rasterizationScale);
02035     auto scaledSizeY = ceil(static_cast<float>(ActualHeight()) * m_rasterizationScale);
02036     if (scaledSizeX != m_webViewScaledSize.X || scaledSizeY != m_webViewScaledSize.Y)
02037     {
02038         m_webViewScaledSize.X = scaledSizeX;
02039         m_webViewScaledSize.Y = scaledSizeY;
02040         changed = true;
02041     }
02042
02043     if (changed)
02044     {
02045         // We create the Bounds using X, Y, width, and height
02046         CoreWebView2RunIgnoreInvalidStateSync(
02047             [&]()
02048             {
02049                 m_coreWebViewController.Bounds({
02050                     (m_webViewScaledPosition.X),
02051                     (m_webViewScaledPosition.Y),
02052                     (m_webViewScaledSize.X),
02053                     (m_webViewScaledSize.Y) });
02054             });
02055     }
02056 }
02057
02058 void WebView2::SetCoreWebViewAndVisualSize(const float width, const float height)
02059 {
02060     if (!m_coreWebView && !m_systemVisualBridge) return;
02061
02062     if (m_coreWebView)
02063     {
02064         CheckAndUpdateWebViewPosition();
02065     }
02066
02067     // The CoreWebView2 visuals hosted under the bridge visual are already scaled for the rasterization scale.
02068     // To keep them from being scaled again from the scale above the WebView2 element, we need to apply
02069     // an inverse scale on the bridge visual. Since the inverse scale will reduce the size of the bridge visual, we
02070     // need to scale up the size by the rasterization scale to compensate.
02071
02072     if (m_systemVisualBridge)
02073     {
02074         winrt::Visual systemVisualPlacementVisual = m_systemVisualBridge.PlacementVisual();
02075         winrt::float2 newSize = winrt::float2(width * m_rasterizationScale, height * m_rasterizationScale);
02076         winrt::float3 newScale = winrt::float3(1.0f / m_rasterizationScale, 1.0f / m_rasterizationScale, 1.0);
02077
02078         systemVisualPlacementVisual.Size(newSize);
02079         systemVisualPlacementVisual.Scale(newScale);
02080     }
02081 }
02082
02083 void WebView2::CheckAndUpdateWindowPosition()
02084 {
02085     auto hostWindow = GetHostHwnd();
02086     if (!m_coreWebViewController || !::IsWindow(hostWindow))
02087     {
02088         return;
02089     }
02090
02091     POINT windowPosition = { 0, 0 };
02092     ::ClientToScreen(hostWindow, &windowPosition);
02093     if (m_hostWindowPosition.x != windowPosition.x || m_hostWindowPosition.y != windowPosition.y)
02094     {
02095         m_hostWindowPosition.x = windowPosition.x;
02096         m_hostWindowPosition.y = windowPosition.y;
02097         CoreWebView2RunIgnoreInvalidStateSync(
02098             [&]()
02099             {
02100                 m_coreWebViewController.NotifyParentWindowPositionChanged();
02101             });
02102     }
02103  }
02104
02105 void WebView2::CheckAndUpdateVisibility(bool force)
02106 {
02107     // Keep booleans in this order to prevent doing expensive tree walk if we don't have to.
02108     bool currentVisibility = this->Visibility() == winrt::Visibility::Visible &&
02109                              this->IsLoaded() &&
02110                              this->m_isHostVisible &&
02111                              AreAllAncestorsVisible();
02112     if (m_isVisible != currentVisibility || force)
02113     {
02114         m_isVisible = currentVisibility;
02115         UpdateCoreWebViewVisibility();
02116     }
02117 }
02118
02119 // When we hide the CoreWebView too early, we would see a flash caused by SystemVisualBridge's BackgroundColor being displayed.
02120 // To resolve this, we delay the call to hide CoreWV if the WebView is being hidden.
02121 void WebView2::UpdateCoreWebViewVisibility()
02122 {
02123     auto strongThis = get_strong(); // ensure object lifetime during coroutines
02124     auto updateCoreWebViewVisibilityAction = [&, strongThis]()
02125     {
02126         if (strongThis->m_coreWebViewController)
02127         {
02128             CoreWebView2RunIgnoreInvalidStateSync(
02129                 [&]()
02130                 {
02131                     strongThis->m_coreWebViewController.IsVisible(strongThis->m_isVisible);
02132                 });
02133         }
02134     };
02135
02136     if (!m_isVisible && m_isHostVisible)
02137     {
02138         SharedHelpers::ScheduleActionAfterWait(updateCoreWebViewVisibilityAction, 200);
02139     }
02140     else
02141     {
02142         if (m_coreWebViewController)
02143         {
02144             CoreWebView2RunIgnoreInvalidStateSync(
02145                 [&]()
02146                 {
02147                     m_coreWebViewController.IsVisible(m_isVisible);
02148                 });
02149         }
02150     }
02151 }
02152
02153 bool WebView2::AreAllAncestorsVisible()
02154 {
02155     bool allAncestorsVisible = true;
02156     winrt::DependencyObject parentAsDO = this->Parent().as<winrt::DependencyObject>();
02157     while (parentAsDO != nullptr)
02158     {
02159         winrt::IUIElement parentAsUIE = parentAsDO.as<winrt::IUIElement>();
02160         winrt::Visibility parentVisibility = parentAsUIE.Visibility();
02161         if (parentVisibility == winrt::Visibility::Collapsed)
02162         {
02163             allAncestorsVisible = false;
02164             break;
02165         }
02166         parentAsDO = winrt::VisualTreeHelper::GetParent(parentAsDO);
02167     }
02168
02169     return allAncestorsVisible;
02170 }
02171
02172 void WebView2::UpdateRenderedSubscriptionAndVisibility()
02173 {
02174     // The Rendered subscription is turned off for better performance when this element is hidden, or not loaded.
02175     // However, when this element is effectively hidden due to an ancestor being hidden, we should still subscribe --
02176     // otherwise, if the ancestor becomes visible again, we won't have the check in HandleRendered to inform us.
02177     if (this->IsLoaded() && this->Visibility() == winrt::Visibility::Visible)
02178     {
02179         if (!m_renderedRevoker)
02180         {
02181             m_renderedRevoker = winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendered(
02182                 winrt::auto_revoke, { this, &WebView2::HandleRendered });
02183         }
02184     }
02185     else
02186     {
02187         if (m_renderedRevoker)
02188         {
02189             m_renderedRevoker.revoke();
02190         }
02191     }
02192     CheckAndUpdateVisibility(true);
02193 }
02194
02195 void WebView2::SetControllerDefaultBackgroundColor()
02196 {
02197     if(CoreWebView2HasInvalidState()) { return; }
02198
02199     if (m_coreWebViewController)
02200     {
02201         m_coreWebViewController.DefaultBackgroundColor(this->DefaultBackgroundColor());
02202     }
02203 }
02204
02205 void WebView2::SetCanGoForward(bool canGoForward)
02206 {
02207     m_canGoPropSetInternally = true;
02208     auto canGoPropSetInternally = gsl::finally([this]()
02209     {
02210         m_canGoPropSetInternally = false;
02211     });
02212
02213     CanGoForward(canGoForward);
02214 }
02215
02216 void WebView2::SetCanGoBack(bool canGoBack)
02217 {
02218     m_canGoPropSetInternally = true;
02219     auto canGoPropSetInternally = gsl::finally([this]()
02220     {
02221         m_canGoPropSetInternally = false;
02222     });
02223
02224     CanGoBack(canGoBack);
02225 }
02226
02227 // Do not reset Source property as it be useful to app developer for restoring state
02228 void WebView2::ResetProperties()
02229 {
02230     SetCanGoForward(false);
02231     SetCanGoBack(false);
02232 }
02233
02234 HWND WebView2::GetComponentHwnd()
02235 {
02236     HWND parentWindow = GetHostHwnd();
02237     HWND childWindow = FindWindowExA(
02238         parentWindow,          // hwndParent
02239         nullptr,
02240         "Chrome_WidgetWin_0",  // window class name
02241         nullptr);
02242
02243     auto peer = OnCreateAutomationPeer().as<IAutomationPeerHwndInterop>();
02244
02245     while (childWindow)
02246     {
02247         bool foundHwnd = false;
02248         // Check for the correct peer, because there will be more than one child hwnd if there is more than one WebView2.
02249         winrt::check_hresult(peer->IsCorrectPeerForHwnd(childWindow, &foundHwnd));
02250         if (foundHwnd)
02251         {
02252             return childWindow;
02253         }
02254         else
02255         {
02256             childWindow = GetWindow(childWindow, GW_HWNDNEXT);
02257         }
02258     }
02259
02260     return nullptr;
02261 }
02262
02263 winrt::UISettings WebView2::GetUISettings()
02264 {
02265     if (m_uiSettings == nullptr)
02266     {
02267         m_uiSettings = winrt::UISettings();
02268     }
02269     return m_uiSettings;
02270 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewChange Member List

This is the complete list of members for ViewChange, including all inherited members.
Options() const | ViewChange | [inline]
ViewChange(ScrollPresenterViewKind viewKind, winrt::IInspectable const &options) | ViewChange |
ViewKind() const | ViewChange | [inline]
~ViewChange() | ViewChange |
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBarTemplateSettingsProperties Member List

This is the complete list of members for InfoBarTemplateSettingsProperties, including all inherited members.
ClearProperties() | InfoBarTemplateSettingsProperties | [static]
EnsureProperties() | InfoBarTemplateSettingsProperties | [static]
IconElement(winrt::IconElement const &value) | InfoBarTemplateSettingsProperties |
IconElement() | InfoBarTemplateSettingsProperties |
IconElementProperty() | InfoBarTemplateSettingsProperties | [inline, static]
InfoBarTemplateSettingsProperties() | InfoBarTemplateSettingsProperties |
s_IconElementProperty | InfoBarTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewWithScrollControllersPage Member List

This is the complete list of members for ScrollViewWithScrollControllersPage, including all inherited members.
AppendAsyncEventMessage() | ScrollViewWithScrollControllersPage | [inline, private]
asyncEventReportingLock | ScrollViewWithScrollControllersPage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetContentOrientation_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetHeight_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetHorizontalScrollBarVisibility_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetHorizontalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetPadding_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetVerticalScrollBarVisibility_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetVerticalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetWidth_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnGetZoomMode_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetContentOrientation_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetHeight_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetHorizontalScrollBarVisibility_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetHorizontalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetPadding_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetVerticalScrollBarVisibility_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetVerticalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetWidth_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
BtnSetZoomMode_Click(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkContentProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkContentProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsContentEnabled_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsContentEnabled_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsContentTabStop_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsContentTabStop_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsEnabled_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsEnabled_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsTabStop_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkIsTabStop_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkScrollPresenterAttachedProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkScrollPresenterAttachedProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkScrollViewProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
ChkScrollViewProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewWithScrollControllersPage | [inline, private]
GetThicknessFromString(string thickness) | ScrollViewWithScrollControllersPage | [inline, private]
lstAsyncEventMessage | ScrollViewWithScrollControllersPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollViewWithScrollControllersPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollViewWithScrollControllersPage | [inline, protected]
scrollView | ScrollViewWithScrollControllersPage | [private]
ScrollViewWithScrollControllersPage() | ScrollViewWithScrollControllersPage | [inline]
UpdateContentHeight() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateContentMargin() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateContentOrientation() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateContentWidth() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateHeight() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateHorizontalScrollBarVisibility() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateHorizontalScrollMode() | ScrollViewWithScrollControllersPage | [inline, private]
UpdatePadding() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateVerticalScrollBarVisibility() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateVerticalScrollMode() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateWidth() | ScrollViewWithScrollControllersPage | [inline, private]
UpdateZoomMode() | ScrollViewWithScrollControllersPage | [inline, private]
UseScrollView(ScrollView sv2) | ScrollViewWithScrollControllersPage | [inline, private]
~ScrollViewWithScrollControllersPage() | ScrollViewWithScrollControllersPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBarAutomationPeer.h Source File

  • File List
  • File Members
  • ProgressBar

ProgressBarAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ProgressBar.h"
00007 #include "ProgressBarAutomationPeer.g.h"
00008
00009 class ProgressBarAutomationPeer :
00010     public ReferenceTracker<ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider>
00011 {
00012
00013 public:
00014     ProgressBarAutomationPeer(winrt::ProgressBar const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     winrt::hstring GetClassNameCore();
00019     winrt::hstring GetNameCore();
00020     winrt::AutomationControlType GetAutomationControlTypeCore();
00021
00022     // IRangeValueProvider is necessary here to override IsReadOnly() to true.
00023     bool IsReadOnly() { return true; }
00024     double Value();
00025     double SmallChange();
00026     double LargeChange();
00027     double Minimum();
00028     double Maximum();
00029     void SetValue(double value);
00030
00031
00032 private:
00033     com_ptr<ProgressBar> GetImpl();
00034 };
00035
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2Common.cs Source File

  • File List
  • File Members
  • WebView2
  • TestUI

WebView2Common.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005 using System;
00006 using System.IO;
00007 using System.Reflection;
00008 using Windows.Storage;
00009
00010 using WebView2 = Microsoft.UI.Xaml.Controls.WebView2;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     public class WebView2Common
00015     {
00016         readonly TestPage _testPage;
00017         readonly TextBox Status1;
00018         readonly TextBox Status2;
00019         readonly TextBox Status3;
00020         readonly TextBox MessageLog;
00021
00022         public WebView2Common(TestPage testPage)
00023         {
00024             _testPage = testPage;
00025
00026             Status1 = _testPage.FindName("Status1") as TextBox;
00027             Status2 = _testPage.FindName("Status2") as TextBox;
00028             Status3 = _testPage.FindName("Status3") as TextBox;
00029             MessageLog = _testPage.FindName("MessageLog") as TextBox;
00030         }
00031
00032         public void ClearStatus()
00033         {
00034             Status1.Text = string.Empty;
00035             Status2.Text = string.Empty;
00036             Status3.Text = string.Empty;
00037         }
00038
00039         // In Desktop (Packaged) context, CWV2 can access the files directly from the app's Assets folder (and copying like the UWP case fails).
00040         public void CopyTestPagesLocally()
00041         {
00042             Status1.Text = "HTML files ready";
00043         }
00044
00045         // [Desktop (Packaged)] Get a file:// URI for the test page from app's Assets folder
00046         // Ex: file:///C:/Program%20Files/WindowsApps/MUXControlsTestApp.Desktop_1.0.0.0_x86__6f07fta6qpts2/Assets/SimplePage.html
00047         public static Uri GetTestPageUri(string testPageName)
00048         {
00049             string appDirectory  = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
00050             string fullUri = @"file:///" + appDirectory + @"/Assets/" + testPageName;
00051
00052             return new Uri(fullUri);
00053         }
00054
00055         public static void NavigateToUri(WebView2 webview, string UriString)
00056         {
00057             Uri newUri;
00058             if (!string.IsNullOrEmpty(UriString) &&
00059                 Uri.TryCreate(UriString, UriKind.RelativeOrAbsolute, out newUri) == true)
00060             {
00061                 webview.Source = newUri;
00062             }
00063         }
00064
00065         public static void NavigateToUri(WebView2 webview, Uri uri)
00066         {
00067             string uriString = uri.ToString();
00068             NavigateToUri(webview, uriString);
00069         }
00070
00071         public static void NavigateToStringMessage(WebView2 webview)
00072         {
00073             webview.NavigateToString("You've navigated to a string message.");
00074         }
00075
00076         public static void LoadWebPage(WebView2 webview, string testPageName)
00077         {
00078              Uri testPageUri = GetTestPageUri(testPageName);
00079              NavigateToUri(webview, testPageUri);
00080         }
00081
00082         public void AppendMessage(string message)
00083         {
00084             if (MessageLog != null)
00085             {
00086                 MessageLog.Text = MessageLog.Text + message + Environment.NewLine;
00087             }
00088         }
00089     }
00090 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedChevronUpDownSmallVisualSource Member List

This is the complete list of members for AnimatedChevronUpDownSmallVisualSource, including all inherited members.
ColorAsVector4(winrt::Windows::UI::Color color) | AnimatedChevronUpDownSmallVisualSource | [private, static]
Duration() | AnimatedChevronUpDownSmallVisualSource |
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | AnimatedChevronUpDownSmallVisualSource | [private]
Foreground() | AnimatedChevronUpDownSmallVisualSource | [inline]
Foreground(winrt::Windows::UI::Color value) | AnimatedChevronUpDownSmallVisualSource |
FrameCount() | AnimatedChevronUpDownSmallVisualSource |
Framerate() | AnimatedChevronUpDownSmallVisualSource |
FrameToProgress(double frameNumber) | AnimatedChevronUpDownSmallVisualSource |
Markers() | AnimatedChevronUpDownSmallVisualSource |
SetColorProperty(hstring const &propertyName, winrt::Windows::UI::Color value) | AnimatedChevronUpDownSmallVisualSource |
SetScalarProperty(hstring const &propertyName, double value) | AnimatedChevronUpDownSmallVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor) | AnimatedChevronUpDownSmallVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics) | AnimatedChevronUpDownSmallVisualSource |
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/ElementsInItemsSourcePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples

ElementsInItemsSourcePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.ObjectModel;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using MUXControlsTestApp.Utilities;
00008
00009 namespace MUXControlsTestApp.Samples
00010 {
00011     public sealed partial class ElementsInItemsSourcePage : Page
00012     {
00013         public ElementsInItemsSourcePage()
00014         {
00015             this.InitializeComponent();
00016             goBackButton.Click += delegate { Frame.GoBack(); };
00017         }
00018     }
00019
00020     public class UICollection: ObservableCollection<UIElement>
00021     {
00022         public UICollection()
00023         {
00024
00025         }
00026     }
00027 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsAutomationPeer Member List

This is the complete list of members for RadioButtonsAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< RadioButtonsAutomationPeer > &&self) noexcept | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
final_release(std::unique_ptr< RadioButtonsAutomationPeer > &&self) | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | RadioButtonsAutomationPeer |
GetBase() | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
GetClassNameCore() | RadioButtonsAutomationPeer |
GetInner() | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
GetNameCore() | RadioButtonsAutomationPeer |
IsOnThread() | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
RadioButtonsAutomationPeer(winrt::RadioButtons const &owner) | RadioButtonsAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2Tests Member List

This is the complete list of members for WebView2Tests, including all inherited members.
AccessKeyTest() | WebView2Tests | [inline, static]
AddHostObjectToScriptTest() | WebView2Tests | [inline]
BasicCoreObjectCreationAndDestructionTest() | WebView2Tests | [inline]
BasicFlingTouchTest() | WebView2Tests | [inline]
BasicKeyboardTest() | WebView2Tests | [inline]
BasicLongPressTouchTest() | WebView2Tests | [inline]
BasicPanTouchTest() | WebView2Tests | [inline]
BasicRenderingTest() | WebView2Tests | [inline]
BasicStretchTouchTest() | WebView2Tests | [inline]
BasicTapTouchTest() | WebView2Tests | [inline]
BeginSubTest(string testName, string testDescription) | WebView2Tests | [inline, private, static]
ChooseTest(string testName, bool waitForLoadCompleted=true) | WebView2Tests | [inline, private, static]
ClassInitialize(TestContext testContext) | WebView2Tests | [inline, static]
CloseThenDPIChangeTest() | WebView2Tests | [inline]
CompleteTestAndWaitForResult(string selectedTest, bool shouldDumpMessageLog=false) | WebView2Tests | [inline, private, static]
CompleteTestAndWaitForWebMessageResult(string selectedTest) | WebView2Tests | [inline, private, static]
ConcurrentCreationRequestsTest() | WebView2Tests | [inline]
CopyPasteTest() | WebView2Tests | [inline]
CopySelected() | WebView2Tests | [inline, private, static]
CoreWebView2Initialized_FailedTest() | WebView2Tests | [inline]
CoreWebView2InitializedTest() | WebView2Tests | [inline]
CursorClickUpdateTest() | WebView2Tests | [inline]
CursorUpdateTest() | WebView2Tests | [inline]
CustomConfiguration_BasicTest() | WebView2Tests | [inline]
CustomConfiguration_EnsureAgainAfterCustomTest() | WebView2Tests | [inline]
CustomConfiguration_EnsureAgainAfterDefaultTest() | WebView2Tests | [inline]
DoSelectAllByKeyboard() | WebView2Tests | [inline, private, static]
DragDropIntoWebView2Test() | WebView2Tests | [inline]
EdgeProcessFailedTest() | WebView2Tests | [inline]
EndSubTest(string testName) | WebView2Tests | [inline, private, static]
EnsureBrowser() | WebView2Tests | [inline, static]
ExecuteScriptTest() | WebView2Tests | [inline]
Focus_BackAndForthTabTest() | WebView2Tests | [inline]
Focus_BasicTabTest() | WebView2Tests | [inline]
Focus_MouseActivateTest() | WebView2Tests | [inline]
Focus_ReverseTabTest() | WebView2Tests | [inline]
GetBrowserExecutableFolderKey() | WebView2Tests | [inline, private, static]
GetHasCompatibleRuntimeInstalled(int browserBuildVersion, int sdkBuildVersion) | WebView2Tests | [inline, private, static]
GetInstalledBrowserVersion() | WebView2Tests | [inline, private, static]
GetSdkBuildVersion() | WebView2Tests | [inline, private, static]
GoBackAndForwardTest() | WebView2Tests | [inline]
HiddenThenVisibleTest() | WebView2Tests | [inline]
HostNameToFolderMappingTest() | WebView2Tests | [inline]
HtmlDropdownTest() | WebView2Tests | [inline]
IsEdgeAlreadyInstalling() | WebView2Tests | [inline, private, static]
KeyboardAcceleratorTest() | WebView2Tests | [inline]
LifetimeTabTest() | WebView2Tests | [inline]
MouseCaptureTest() | WebView2Tests | [inline]
MouseClickTestCommon(PointerButtons mouseButton) | WebView2Tests | [inline, private, static]
MouseLeftClickTest() | WebView2Tests | [inline]
MouseMiddleClickTest() | WebView2Tests | [inline]
MouseRightClickTest() | WebView2Tests | [inline]
MouseWheelScrollTest() | WebView2Tests | [inline]
MouseXButton1ClickTest() | WebView2Tests | [inline]
MouseXButton2ClickTest() | WebView2Tests | [inline]
MoveTest() | WebView2Tests | [inline]
MultipleWebviews_BasicRenderingTest() | WebView2Tests | [inline]
MultipleWebviews_FocusTest() | WebView2Tests | [inline]
MultipleWebviews_LanguageTest() | WebView2Tests | [inline]
NavigateToLocalImageTest() | WebView2Tests | [inline]
NavigateToStringTest() | WebView2Tests | [inline]
NavigateToVideoTest() | WebView2Tests | [inline]
NavigationErrorTest() | WebView2Tests | [inline]
NavigationStartingInvalidTest() | WebView2Tests | [inline]
NavigationStartingTest() | WebView2Tests | [inline]
NonAsciiUriTest() | WebView2Tests | [inline]
OffTreeWebViewInputTest() | WebView2Tests | [inline]
ParentHiddenThenVisibleTest() | WebView2Tests | [inline]
ParentVisibilityHiddenTest() | WebView2Tests | [inline]
ParentVisibilityTurnedOnTest() | WebView2Tests | [inline]
PasteClipboard() | WebView2Tests | [inline, private, static]
PointerReleaseWithoutPressTest() | WebView2Tests | [inline]
QueryCoreWebView2BasicTest() | WebView2Tests | [inline]
ReloadTest() | WebView2Tests | [inline]
RemoveFakeBrowserExecutableFolderKey() | WebView2Tests | [inline, private, static]
ReparentElementTest() | WebView2Tests | [inline]
ResizeTest() | WebView2Tests | [inline]
ScaledTouchTest() | WebView2Tests | [inline]
SetWebViewElementFocus(string target, uint tabs) | WebView2Tests | [inline, private, static]
SourceBeforeLoadTest() | WebView2Tests | [inline]
SourceBindingTest() | WebView2Tests | [inline]
SpecificTouchTest() | WebView2Tests | [inline]
TabTwicePastWebView2() | WebView2Tests | [inline, private, static]
TestCleanup() | WebView2Tests | [inline]
TryInstallingBrowser(int attemptsLeft) | WebView2Tests | [inline, private, static]
UserAgentTest() | WebView2Tests | [inline]
ValidateEventCounts(int coreWebView2InitializedCountExpected, int ensureCoreWebView2CompletionCountExpected, int navigationStartingCountExpected, int navigationCompletedCountExpected, int loadedCountExpected, int unloadedCountExpected, int coreProcessFailedCountExpected, string caption=null) | WebView2Tests | [inline, static]
ValidateEventDetail(string eventDetail) | WebView2Tests | [inline, private, static]
ValidateExceptionCounts(int closedExceptionCountExpected, string caption=null) | WebView2Tests | [inline, static]
ValidateLoadedSource(string loadedSource) | WebView2Tests | [inline, private, static]
VisibilityHiddenTest() | WebView2Tests | [inline]
VisibilityTurnedOnTest() | WebView2Tests | [inline]
WaitForCopyCompleted() | WebView2Tests | [inline, private, static]
WaitForEdgeIfAlreadyInstalling() | WebView2Tests | [inline, private, static]
WaitForEnsureCompleted() | WebView2Tests | [inline, private, static]
WaitForFocus(string target) | WebView2Tests | [inline, private, static]
WaitForLoadCompleted() | WebView2Tests | [inline, private, static]
WaitForTextBoxValue(Edit textbox, string expectedValue, bool match=true) | WebView2Tests | [inline, private, static]
WaitForWebMessageResult(string selectedTest) | WebView2Tests | [inline, private, static]
WebMessageReceivedTest() | WebView2Tests | [inline]
WebView2CleanedUpTest() | WebView2Tests | [inline]
WindowHiddenTest() | WebView2Tests | [inline]
WindowlessPopupTest() | WebView2Tests | [inline]
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewDragItemsCompletedEventArgs Member List

This is the complete list of members for TreeViewDragItemsCompletedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewDragItemsCompletedEventArgs > &&self) noexcept | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
DropResult() const | TreeViewDragItemsCompletedEventArgs |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< TreeViewDragItemsCompletedEventArgs > &&self) | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
Items() | TreeViewDragItemsCompletedEventArgs |
m_newParentItem | TreeViewDragItemsCompletedEventArgs | [private]
NewParentItem() | TreeViewDragItemsCompletedEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewDragItemsCompletedEventArgs, winrt::implementation::TreeViewDragItemsCompletedEventArgsT, winrt::composing, winrt::composable > | [inline]
TreeViewDragItemsCompletedEventArgs(const winrt::DragItemsCompletedEventArgs &args, const winrt::IInspectable &newParent) | TreeViewDragItemsCompletedEventArgs |
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/TextPage.xaml.cs Source File

  • File List
  • File Members
  • ParallaxView
  • TestUI

TextPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     public sealed partial class TextPage : TestPage
00007     {
00008         public TextPage()
00009         {
00010             this.InitializeComponent();
00011
00012             for (int i=0; i<32; i++)
00013                 this.textBox.Text += "Text " + i + "\r\n";
00014         }
00015     }
00016 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/TestUI/PipsPagerAxeTestPage.xaml.cs Source File

  • File List
  • File Members
  • PipsPager
  • TestUI

PipsPagerAxeTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 namespace MUXControlsTestApp
00004 {
00005     [AxeScanTestPage(Name = "PipsPager-Axe")]
00006     public sealed partial class PipsPagerAxeTestPage : TestPage
00007     {
00008         public PipsPagerAxeTestPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/EffectiveViewportScrollPresenterTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

EffectiveViewportScrollPresenterTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using System.Linq;
00007 using Windows.Foundation;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using System.Threading;
00012 using System.Collections.Generic;
00013 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks;
00014 using System.Numerics;
00015 using Common;
00016 using System.Collections.ObjectModel;
00017 using Microsoft.UI.Xaml.Media;
00018 using Windows.UI;
00019 using System.Runtime.InteropServices.WindowsRuntime;
00020 using Microsoft.UI.Xaml.Markup;
00021 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00022
00023 using WEX.TestExecution;
00024 using WEX.TestExecution.Markup;
00025 using WEX.Logging.Interop;
00026
00027 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00028 {
00029     [TestClass]
00030     public class EffectiveViewportScrollPresenterTests : ApiTestBase
00031     {
00032         [TestMethod]
00033         public void ValidateOneScrollPresenterScenario()
00034         {
00035             var realizationRects = new List<Rect>();
00036             ScrollPresenter scrollPresenter = null;
00037             var scrollCompletedEvent = new AutoResetEvent(false);
00038             var zoomCompletedEvent = new AutoResetEvent(false);
00039
00040             RunOnUIThread.Execute(() =>
00041             {
00042                 var repeater = new ItemsRepeater()
00043                 {
00044                     Layout = GetMonitoringLayout(new Size(500, 600), realizationRects),
00045                     HorizontalCacheLength = 0.0,
00046                     VerticalCacheLength = 0.0
00047                 };
00048
00049                 scrollPresenter = new ScrollPresenter
00050                 {
00051                     Content = repeater,
00052                     Width = 200,
00053                     Height = 300
00054                 };
00055
00056                 Content = scrollPresenter;
00057                 Content.UpdateLayout();
00058
00059                 Verify.AreEqual(2, realizationRects.Count);
00060                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00061                 Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
00062                 realizationRects.Clear();
00063
00064                 scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
00065                 {
00066                     scrollCompletedEvent.Set();
00067                 };
00068
00069                 scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
00070                 {
00071                     zoomCompletedEvent.Set();
00072                 };
00073             });
00074             IdleSynchronizer.Wait();
00075
00076             RunOnUIThread.Execute(() =>
00077             {
00078                 scrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00079             });
00080             Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00081             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00082
00083             RunOnUIThread.Execute(() =>
00084             {
00085                 Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
00086                 realizationRects.Clear();
00087
00088                 scrollPresenter.ZoomTo(2.0f, Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00089             });
00090             Verify.IsTrue(zoomCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00091             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00092
00093             RunOnUIThread.Execute(() =>
00094             {
00095                 Verify.AreEqual(
00096                     new Rect(0, 100, 100, 150),
00097                     realizationRects.Last());
00098                 realizationRects.Clear();
00099             });
00100         }
00101
00102         [TestMethod]
00103         public void ValidateTwoScrollPresentersScenario()
00104         {
00105             var realizationRects = new List<Rect>();
00106             ScrollPresenter horizontalScrollPresenter = null;
00107             ScrollPresenter verticalScrollPresenter = null;
00108             var horizontalScrollCompletedEvent = new AutoResetEvent(false);
00109             var verticalScrollCompletedEvent = new AutoResetEvent(false);
00110
00111             RunOnUIThread.Execute(() =>
00112             {
00113                 var repeater = new ItemsRepeater()
00114                 {
00115                     Layout = GetMonitoringLayout(new Size(500, 500), realizationRects),
00116                     HorizontalCacheLength = 0.0,
00117                     VerticalCacheLength = 0.0
00118                 };
00119
00120                 horizontalScrollPresenter = new ScrollPresenter
00121                 {
00122                     Content = repeater,
00123                     ContentOrientation = ScrollingContentOrientation.Horizontal
00124                 };
00125
00126                 // Placing a Grid in between two ScrollPresenter controls to avoid
00127                 // unsupported combined use of facades and ElementCompositionPreview.
00128                 var grid = new Grid();
00129                 grid.Children.Add(horizontalScrollPresenter);
00130
00131                 verticalScrollPresenter = new ScrollPresenter
00132                 {
00133                     Content = grid,
00134                     Width = 200,
00135                     Height = 200,
00136                     ContentOrientation = ScrollingContentOrientation.Vertical
00137                 };
00138
00139                 Content = verticalScrollPresenter;
00140                 Content.UpdateLayout();
00141
00142                 Verify.AreEqual(2, realizationRects.Count);
00143                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00144                 Verify.AreEqual(new Rect(0, 0, 200, 200), realizationRects[1]);
00145                 realizationRects.Clear();
00146
00147                 horizontalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
00148                 {
00149                     horizontalScrollCompletedEvent.Set();
00150                 };
00151
00152                 verticalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
00153                 {
00154                     verticalScrollCompletedEvent.Set();
00155                 };
00156             });
00157             IdleSynchronizer.Wait();
00158
00159             RunOnUIThread.Execute(() =>
00160             {
00161                 verticalScrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00162             });
00163             Verify.IsTrue(verticalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00164             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00165
00166             RunOnUIThread.Execute(() =>
00167             {
00168                 Verify.AreEqual(new Rect(0, 100, 200, 200), realizationRects.Last());
00169                 realizationRects.Clear();
00170
00171                 // Max viewport offset is (300, 300). Horizontal viewport offset
00172                 // is expected to get coerced from 400 to 300.
00173                 horizontalScrollPresenter.ScrollTo(400.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00174             });
00175             Verify.IsTrue(horizontalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00176             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00177
00178             RunOnUIThread.Execute(() =>
00179             {
00180                 Verify.AreEqual(new Rect(300, 100, 200, 200), realizationRects.Last());
00181                 realizationRects.Clear();
00182             });
00183         }
00184
00185         [TestMethod]
00186         public void CanGrowCacheBuffer()
00187         {
00188             ScrollPresenter scrollPresenter = null;
00189             ItemsRepeater repeater = null;
00190             var measureRealizationRects = new List<Rect>();
00191             var arrangeRealizationRects = new List<Rect>();
00192             var fullCacheEvent = new ManualResetEvent(initialState: false);
00193
00194             RunOnUIThread.Execute(() =>
00195             {
00196                 Log.Comment("Preparing the visual tree...");
00197
00198                 scrollPresenter = new ScrollPresenter
00199                 {
00200                     Width = 400,
00201                     Height = 400
00202                 };
00203
00204                 var layout = new MockVirtualizingLayout
00205                 {
00206                     MeasureLayoutFunc = (availableSize, context) =>
00207                     {
00208                         var ctx = (VirtualizingLayoutContext)context;
00209                         measureRealizationRects.Add(ctx.RealizationRect);
00210                         return new Size(1000, 2000);
00211                     },
00212
00213                     ArrangeLayoutFunc = (finalSize, context) =>
00214                     {
00215                         var ctx = (VirtualizingLayoutContext)context;
00216                         arrangeRealizationRects.Add(ctx.RealizationRect);
00217
00218                         if (ctx.RealizationRect.Height == scrollPresenter.Height * (repeater.VerticalCacheLength + 1))
00219                         {
00220                             fullCacheEvent.Set();
00221                         }
00222
00223                         return finalSize;
00224                     }
00225                 };
00226
00227                 repeater = new ItemsRepeater()
00228                 {
00229                     Layout = layout
00230                 };
00231
00232                 scrollPresenter.Content = repeater;
00233                 Content = scrollPresenter;
00234             });
00235
00236             if (!fullCacheEvent.WaitOne(500000)) Verify.Fail("Cache full size never reached.");
00237             IdleSynchronizer.Wait();
00238
00239             RunOnUIThread.Execute(() =>
00240             {
00241                 var cacheLength = repeater.VerticalCacheLength;
00242                 var expectedRealizationWindow = new Rect(
00243                     -cacheLength / 2 * scrollPresenter.Width,
00244                     -cacheLength / 2 * scrollPresenter.Height,
00245                     (1 + cacheLength) * scrollPresenter.Width,
00246                     (1 + cacheLength) * scrollPresenter.Height);
00247
00248                 Log.Comment("Validate that the realization window reached full size.");
00249                 Verify.AreEqual(expectedRealizationWindow, measureRealizationRects.Last());
00250
00251                 Log.Comment("Validate that the realization window grew by 40 pixels each time during the process.");
00252                 for (int i = 2; i < measureRealizationRects.Count; ++i)
00253                 {
00254                     Verify.AreEqual(-40, measureRealizationRects[i].X - measureRealizationRects[i - 1].X);
00255                     Verify.AreEqual(-40, measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y);
00256                     Verify.AreEqual(80, measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width);
00257                     Verify.AreEqual(80, measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height);
00258
00259                     Verify.AreEqual(-40, arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X);
00260                     Verify.AreEqual(-40, arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y);
00261                     Verify.AreEqual(80, arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width);
00262                     Verify.AreEqual(80, arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height);
00263                 }
00264             });
00265         }
00266
00267         [TestMethod]
00268         public void CanBringIntoViewElements()
00269         {
00270             ScrollPresenter scrollPresenter = null;
00271             ItemsRepeater itemsRepeater = null;
00272             var rootLoadedEvent = new AutoResetEvent(initialState: false);
00273             var viewChangedEvent = new AutoResetEvent(initialState: false);
00274             var waitingForIndex = -1;
00275             var indexRealized = new AutoResetEvent(initialState: false);
00276             var viewChangedOffsets = new List<double>();
00277
00278             RunOnUIThread.Execute(() =>
00279             {
00280                 var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00281                 var root = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
00282                      @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00283                              xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00284                              xmlns:controls='using:Microsoft.UI.Xaml.Controls'
00285                              xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'>
00286                          <Grid.Resources>
00287                            <controls:StackLayout x:Name='VerticalStackLayout'/>
00288                            <controls:RecyclingElementFactory x:Key='ElementFactory'>
00289                              <controls:RecyclingElementFactory.RecyclePool>
00290                                <controls:RecyclePool/>
00291                              </controls:RecyclingElementFactory.RecyclePool>
00292                              <DataTemplate x:Key='ItemTemplate'>
00293                                <Border Background='LightGray' Margin='5' Height='94'>
00294                                  <TextBlock Text='{Binding}' TextWrapping='WrapWholeWords'/>
00295                                </Border>
00296                              </DataTemplate>
00297                            </controls:RecyclingElementFactory>
00298                          </Grid.Resources>
00299                          <primitives:ScrollPresenter x:Name='ScrollPresenter' Width='400' Height='600' ContentOrientation='Vertical' Background='Gray'>
00300                            <controls:ItemsRepeater
00301                              x:Name='ItemsRepeater'
00302                              ItemTemplate='{StaticResource ElementFactory}'
00303                              Layout='{StaticResource VerticalStackLayout}'
00304                              HorizontalCacheLength='0'
00305                              VerticalCacheLength='0'/>
00306                          </primitives:ScrollPresenter>
00307                        </Grid>"));
00308
00309                 var elementFactory = (RecyclingElementFactory)root.Resources["ElementFactory"];
00310                 scrollPresenter = (ScrollPresenter)root.FindName("ScrollPresenter");
00311                 itemsRepeater = (ItemsRepeater)root.FindName("ItemsRepeater");
00312
00313                 itemsRepeater.ElementPrepared += (sender, args) =>
00314                 {
00315                     Log.Comment($"ItemsRepeater.ElementPrepared - Realized index: {args.Index}. Waiting for index: {waitingForIndex}");
00316                     if (args.Index == waitingForIndex)
00317                     {
00318                         indexRealized.Set();
00319                     }
00320                 };
00321
00322                 var items = Enumerable.Range(0, 400).Select(i => string.Format("{0}: {1}", i, lorem.Substring(0, 250)));
00323
00324                 itemsRepeater.ItemsSource = items;
00325
00326                 scrollPresenter.ViewChanged += (o, e) =>
00327                 {
00328                     Log.Comment($"ScrollPresenter.ViewChanged - VerticalOffset: {scrollPresenter.VerticalOffset}");
00329                     viewChangedOffsets.Add(scrollPresenter.VerticalOffset);
00330                     viewChangedEvent.Set();
00331                 };
00332
00333                 scrollPresenter.BringingIntoView += (o, e) =>
00334                 {
00335                     Log.Comment("ScrollPresenter.BringingIntoView - ");
00336                     Log.Comment($"    TargetVerticalOffset: {e.TargetVerticalOffset}");
00337                     Log.Comment($"    RequestEventArgs.AnimationDesired: {e.RequestEventArgs.AnimationDesired}");
00338                     Log.Comment($"    RequestEventArgs.Handled: {e.RequestEventArgs.Handled}");
00339                     Log.Comment($"    RequestEventArgs.VerticalAlignmentRatio: {e.RequestEventArgs.VerticalAlignmentRatio}");
00340                     Log.Comment($"    RequestEventArgs.VerticalOffset: {e.RequestEventArgs.VerticalOffset}");
00341                     Log.Comment($"    RequestEventArgs.TargetRect: {e.RequestEventArgs.TargetRect}");
00342                 };
00343
00344                 root.Loaded += delegate {
00345                     rootLoadedEvent.Set();
00346                 };
00347
00348                 Content = root;
00349             });
00350             Verify.IsTrue(rootLoadedEvent.WaitOne(DefaultWaitTimeInMS));
00351             IdleSynchronizer.Wait();
00352
00353             RunOnUIThread.Execute(() =>
00354             {
00355                 Log.Comment("\r\nStartBringIntoView for item index 100, w/ 0.5 vertical alignment.");
00356                 waitingForIndex = 96;
00357                 viewChangedEvent.Reset();
00358                 indexRealized.Reset();
00359                 itemsRepeater.GetOrCreateElement(100).StartBringIntoView(new BringIntoViewOptions {
00360                     VerticalAlignmentRatio = 0.5
00361                 });
00362                 itemsRepeater.UpdateLayout();
00363             });
00364
00365             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
00366             Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
00367             IdleSynchronizer.Wait();
00368
00369             Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
00370             Verify.AreEqual(1, viewChangedOffsets.Count);
00371             viewChangedOffsets.Clear();
00372
00373             ValidateRealizedRange(itemsRepeater, 96, 103);
00374
00375             RunOnUIThread.Execute(() =>
00376             {
00377                 Log.Comment("\r\nStartBringIntoView for item index 103 (already realized) w/ animation.");
00378                 waitingForIndex = 107;
00379                 viewChangedEvent.Reset();
00380                 indexRealized.Reset();
00381                 itemsRepeater.TryGetElement(103).StartBringIntoView(new BringIntoViewOptions
00382                 {
00383                     VerticalAlignmentRatio = 0.5,
00384                     AnimationDesired = true
00385                 });
00386                 itemsRepeater.UpdateLayout();
00387             });
00388
00389             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
00390             Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
00391             IdleSynchronizer.Wait();
00392
00393             Log.Comment("Waiting for animation to settle at final vertical offset.");
00394             CompositionPropertySpy.SynchronouslyTickUIThread(32);
00395
00396             Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
00397             Verify.IsLessThanOrEqual(1, viewChangedOffsets.Count);
00398             viewChangedOffsets.Clear();
00399
00400             ValidateRealizedRange(itemsRepeater, 99, 107);
00401
00402             RunOnUIThread.Execute(() =>
00403             {
00404                 Log.Comment("\r\nStartBringIntoView for disconnected item index 0, to the top w/ unfulfilled animation and 0.5 vertical alignment.");
00405                 waitingForIndex = 6;
00406                 viewChangedEvent.Reset();
00407                 indexRealized.Reset();
00408                 itemsRepeater.GetOrCreateElement(0).StartBringIntoView(new BringIntoViewOptions
00409                 {
00410                     VerticalAlignmentRatio = 0.5,
00411                     AnimationDesired = true
00412                 });
00413             });
00414
00415             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
00416             Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
00417             IdleSynchronizer.Wait();
00418
00419             Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
00420             Verify.AreEqual(1, viewChangedOffsets.Count);
00421             viewChangedOffsets.Clear();
00422
00423             ValidateRealizedRange(itemsRepeater, 0, 6);
00424
00425             RunOnUIThread.Execute(() =>
00426             {
00427                 // You can't align the first item in the middle obviously.
00428                 Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
00429
00430                 Log.Comment("\r\nStartBringIntoView for item index 20.");
00431                 waitingForIndex = 26;
00432                 viewChangedEvent.Reset();
00433                 indexRealized.Reset();
00434                 itemsRepeater.GetOrCreateElement(20).StartBringIntoView(new BringIntoViewOptions
00435                 {
00436                     VerticalAlignmentRatio = 0.0
00437                 });
00438                 itemsRepeater.UpdateLayout();
00439             });
00440
00441             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTimeInMS));
00442             Verify.IsTrue(indexRealized.WaitOne(DefaultWaitTimeInMS));
00443             IdleSynchronizer.Wait();
00444
00445             Log.Comment($"ScrollPresenter.ViewChanged - Count: {viewChangedOffsets.Count}");
00446             Verify.AreEqual(1, viewChangedOffsets.Count);
00447
00448             ValidateRealizedRange(itemsRepeater, 19, 26);
00449         }
00450
00451         private void ValidateRealizedRange(
00452             ItemsRepeater itemsRepeater,
00453             int expectedFirstItemIndex,
00454             int expectedLastItemIndex)
00455         {
00456             Log.Comment("Validating Realized Range...");
00457             int actualFirstItemIndex = -1;
00458             int actualLastItemIndex = -1;
00459             int itemIndex = 0;
00460
00461             RunOnUIThread.Execute(() =>
00462             {
00463                 var items = itemsRepeater.ItemsSource as IEnumerable<string>;
00464
00465                 foreach (var item in items)
00466                 {
00467                     var itemElement = itemsRepeater.TryGetElement(itemIndex);
00468
00469                     if (itemElement != null)
00470                     {
00471                         actualFirstItemIndex =
00472                             actualFirstItemIndex == -1 ?
00473                             itemIndex :
00474                             actualFirstItemIndex;
00475                         actualLastItemIndex = itemIndex;
00476
00477                         Log.Comment($"Realized Index - {itemIndex}");
00478                     }
00479
00480                     ++itemIndex;
00481                 }
00482             });
00483
00484             Log.Comment($"FirstItemIndex - {expectedFirstItemIndex}  {actualFirstItemIndex}");
00485             Log.Comment($"LastItemIndex  - {expectedLastItemIndex}  {actualLastItemIndex}");
00486             Verify.AreEqual(expectedFirstItemIndex, actualFirstItemIndex);
00487             Verify.AreEqual(expectedLastItemIndex, actualLastItemIndex);
00488         }
00489
00490         private static VirtualizingLayout GetMonitoringLayout(Size desiredSize, List<Rect> realizationRects)
00491         {
00492             return new MockVirtualizingLayout
00493             {
00494                 MeasureLayoutFunc = (availableSize, context) =>
00495                 {
00496                     var ctx = (VirtualizingLayoutContext)context;
00497                     realizationRects.Add(ctx.RealizationRect);
00498                     return desiredSize;
00499                 },
00500
00501                 ArrangeLayoutFunc = (finalSize, context) => finalSize
00502             };
00503         }
00504     }
00505 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBackgroundItem Member List

This is the complete list of members for RevealBackgroundItem, including all inherited members.
GetItems() | RevealBackgroundItem | [inline, static]
items | RevealBackgroundItem | [private, static]
Name | RevealBackgroundItem |
Value | RevealBackgroundItem |
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressBarAutomationPeer Member List

This is the complete list of members for ProgressBarAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
CheckThread() | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ProgressBarAutomationPeer > &&self) noexcept | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
final_release(std::unique_ptr< ProgressBarAutomationPeer > &&self) | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline, static]
GetAutomationControlTypeCore() | ProgressBarAutomationPeer |
GetBase() | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
GetClassNameCore() | ProgressBarAutomationPeer |
GetImpl() | ProgressBarAutomationPeer | [private]
GetInner() | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
GetNameCore() | ProgressBarAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | ProgressBarAutomationPeer |
IsOnThread() | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
IsReadOnly() | ProgressBarAutomationPeer | [inline]
LargeChange() | ProgressBarAutomationPeer |
Maximum() | ProgressBarAutomationPeer |
Minimum() | ProgressBarAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
ProgressBarAutomationPeer(winrt::ProgressBar const &owner) | ProgressBarAutomationPeer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ProgressBarAutomationPeer, winrt::implementation::ProgressBarAutomationPeerT, winrt::IRangeValueProvider > | [inline]
SetValue(double value) | ProgressBarAutomationPeer |
SmallChange() | ProgressBarAutomationPeer |
Value() | ProgressBarAutomationPeer |
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioButtons.properties.h Source File

  • File List
  • File Members
  • Generated

RadioButtons.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class RadioButtonsProperties
00008 {
00009 public:
00010     RadioButtonsProperties();
00011
00012     void Header(winrt::IInspectable const& value);
00013     winrt::IInspectable Header();
00014
00015     void HeaderTemplate(winrt::DataTemplate const& value);
00016     winrt::DataTemplate HeaderTemplate();
00017
00018     void Items(winrt::IVector<winrt::IInspectable> const& value);
00019     winrt::IVector<winrt::IInspectable> Items();
00020
00021     void ItemsSource(winrt::IInspectable const& value);
00022     winrt::IInspectable ItemsSource();
00023
00024     void ItemTemplate(winrt::IInspectable const& value);
00025     winrt::IInspectable ItemTemplate();
00026
00027     void MaxColumns(int value);
00028     int MaxColumns();
00029
00030     void SelectedIndex(int value);
00031     int SelectedIndex();
00032
00033     void SelectedItem(winrt::IInspectable const& value);
00034     winrt::IInspectable SelectedItem();
00035
00036     static winrt::DependencyProperty HeaderProperty() { return s_HeaderProperty; }
00037     static winrt::DependencyProperty HeaderTemplateProperty() { return s_HeaderTemplateProperty; }
00038     static winrt::DependencyProperty ItemsProperty() { return s_ItemsProperty; }
00039     static winrt::DependencyProperty ItemsSourceProperty() { return s_ItemsSourceProperty; }
00040     static winrt::DependencyProperty ItemTemplateProperty() { return s_ItemTemplateProperty; }
00041     static winrt::DependencyProperty MaxColumnsProperty() { return s_MaxColumnsProperty; }
00042     static winrt::DependencyProperty SelectedIndexProperty() { return s_SelectedIndexProperty; }
00043     static winrt::DependencyProperty SelectedItemProperty() { return s_SelectedItemProperty; }
00044
00045     static GlobalDependencyProperty s_HeaderProperty;
00046     static GlobalDependencyProperty s_HeaderTemplateProperty;
00047     static GlobalDependencyProperty s_ItemsProperty;
00048     static GlobalDependencyProperty s_ItemsSourceProperty;
00049     static GlobalDependencyProperty s_ItemTemplateProperty;
00050     static GlobalDependencyProperty s_MaxColumnsProperty;
00051     static GlobalDependencyProperty s_SelectedIndexProperty;
00052     static GlobalDependencyProperty s_SelectedItemProperty;
00053
00054     winrt::event_token SelectionChanged(winrt::SelectionChangedEventHandler const& value);
00055     void SelectionChanged(winrt::event_token const& token);
00056
00057     event_source<winrt::SelectionChangedEventHandler> m_selectionChangedEventSource;
00058
00059     static void EnsureProperties();
00060     static void ClearProperties();
00061
00062     static void OnHeaderPropertyChanged(
00063         winrt::DependencyObject const& sender,
00064         winrt::DependencyPropertyChangedEventArgs const& args);
00065
00066     static void OnHeaderTemplatePropertyChanged(
00067         winrt::DependencyObject const& sender,
00068         winrt::DependencyPropertyChangedEventArgs const& args);
00069
00070     static void OnItemsPropertyChanged(
00071         winrt::DependencyObject const& sender,
00072         winrt::DependencyPropertyChangedEventArgs const& args);
00073
00074     static void OnItemsSourcePropertyChanged(
00075         winrt::DependencyObject const& sender,
00076         winrt::DependencyPropertyChangedEventArgs const& args);
00077
00078     static void OnItemTemplatePropertyChanged(
00079         winrt::DependencyObject const& sender,
00080         winrt::DependencyPropertyChangedEventArgs const& args);
00081
00082     static void OnMaxColumnsPropertyChanged(
00083         winrt::DependencyObject const& sender,
00084         winrt::DependencyPropertyChangedEventArgs const& args);
00085
00086     static void OnSelectedIndexPropertyChanged(
00087         winrt::DependencyObject const& sender,
00088         winrt::DependencyPropertyChangedEventArgs const& args);
00089
00090     static void OnSelectedItemPropertyChanged(
00091         winrt::DependencyObject const& sender,
00092         winrt::DependencyPropertyChangedEventArgs const& args);
00093 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewListView.properties.cpp Source File

  • File List
  • File Members
  • Generated

TabViewListView.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TabViewListView.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TabViewListView)
00012 }
00013
00014 #include "TabViewListView.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TopNavigationViewDataProvider.cpp Source File

  • File List
  • File Members
  • NavigationView

TopNavigationViewDataProvider.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Vector.h"
00007 #include "SplitDataSourceBase.h"
00008 #include "TopNavigationViewDataProvider.h"
00009 #include "NavigationViewItem.h"
00010
00011 TopNavigationViewDataProvider::TopNavigationViewDataProvider(const ITrackerHandleManager* m_owner)
00012     :SplitDataSourceT()
00013     , m_rawDataSource(m_owner)
00014     , m_dataSource(m_owner)
00015 {
00016     auto lambda = [this](const winrt::IInspectable& value)
00017     {
00018         return IndexOf(value);
00019     };
00020
00021     auto primaryVector = std::make_shared<SplitVectorT>(m_owner, NavigationViewSplitVectorID::PrimaryList, lambda);
00022     auto overflowVector = std::make_shared<SplitVectorT>(m_owner, NavigationViewSplitVectorID::OverflowList, lambda);
00023
00024     InitializeSplitVectors({ primaryVector, overflowVector });
00025 }
00026
00027
00028 winrt::IVector<winrt::IInspectable> TopNavigationViewDataProvider::GetPrimaryItems()
00029 {
00030     return GetVector(NavigationViewSplitVectorID::PrimaryList)->GetVector();
00031 }
00032
00033 winrt::IVector<winrt::IInspectable> TopNavigationViewDataProvider::GetOverflowItems()
00034 {
00035     return GetVector(NavigationViewSplitVectorID::OverflowList)->GetVector();
00036 }
00037
00038 // The raw data is from MenuItems or MenuItemsSource
00039 void TopNavigationViewDataProvider::SetDataSource(const winrt::IInspectable& rawData)
00040 {
00041     if (ShouldChangeDataSource(rawData)) // avoid to create multiple of datasource for the same raw data
00042     {
00043         winrt::ItemsSourceView dataSource = nullptr;
00044         if (rawData)
00045         {
00046             dataSource = winrt::ItemsSourceView(rawData);
00047         }
00048         ChangeDataSource(dataSource);
00049         m_rawDataSource.set(rawData);
00050         if (dataSource)
00051         {
00052             MoveAllItemsToPrimaryList();
00053         }
00054     }
00055 }
00056
00057 bool TopNavigationViewDataProvider::ShouldChangeDataSource(winrt::IInspectable const& rawData)
00058 {
00059     return rawData != m_rawDataSource.get();
00060 }
00061
00062 void TopNavigationViewDataProvider::OnRawDataChanged(std::function<void(winrt::NotifyCollectionChangedEventArgs const& args)> const& dataChangeCallback)
00063 {
00064     m_dataChangeCallback = dataChangeCallback;
00065 }
00066
00067 int TopNavigationViewDataProvider::IndexOf(const winrt::IInspectable& value)
00068 {
00069     if (auto dataSource = m_dataSource.get())
00070     {
00071         return dataSource.IndexOf(value);
00072     }
00073     return -1;
00074 }
00075
00076 winrt::IInspectable TopNavigationViewDataProvider::GetAt(int index)
00077 {
00078     if (auto dataSource = m_dataSource.get())
00079     {
00080         return dataSource.GetAt(index);
00081     }
00082     return nullptr;
00083 }
00084
00085 int TopNavigationViewDataProvider::Size()
00086 {
00087     if (auto dataSource = m_dataSource.get())
00088     {
00089         return static_cast<int>(dataSource.Count());
00090     }
00091     return 0;
00092 }
00093
00094 NavigationViewSplitVectorID TopNavigationViewDataProvider::DefaultVectorIDOnInsert()
00095 {
00096     return NavigationViewSplitVectorID::NotInitialized;
00097 }
00098
00099 float TopNavigationViewDataProvider::DefaultAttachedData()
00100 {
00101     return std::numeric_limits<float>::min();
00102 }
00103
00104 void TopNavigationViewDataProvider::MoveAllItemsToPrimaryList()
00105 {
00106     for (int i = 0; i < Size(); i++)
00107     {
00108         MoveItemToVector(i, NavigationViewSplitVectorID::PrimaryList);
00109     }
00110 }
00111
00112 std::vector<int> TopNavigationViewDataProvider::ConvertPrimaryIndexToIndex(std::vector<int> const& indexesInPrimary)
00113 {
00114     std::vector<int> indexes;
00115     if (!indexesInPrimary.empty())
00116     {
00117         auto vector = GetVector(NavigationViewSplitVectorID::PrimaryList);
00118         if (vector)
00119         {
00120             // transform PrimaryList index to OrignalVector index
00121             std::transform(indexesInPrimary.begin(), indexesInPrimary.end(), std::back_inserter(indexes),
00122                 [&vector](int index) -> int
00123             {
00124                 return vector->IndexToIndexInOriginalVector(index);
00125             });
00126         }
00127     }
00128     return indexes;
00129 }
00130
00131 int TopNavigationViewDataProvider::ConvertOriginalIndexToIndex(int originalIndex)
00132 {
00133     auto const vector = GetVector(IsItemInPrimaryList(originalIndex) ? NavigationViewSplitVectorID::PrimaryList : NavigationViewSplitVectorID::OverflowList);
00134     return vector->IndexFromIndexInOriginalVector(originalIndex);
00135 }
00136
00137 void TopNavigationViewDataProvider::MoveItemsOutOfPrimaryList(std::vector<int> const& indexes)
00138 {
00139     MoveItemsToList(indexes, NavigationViewSplitVectorID::OverflowList);
00140 }
00141
00142 void TopNavigationViewDataProvider::MoveItemsToPrimaryList(std::vector<int> const& indexes)
00143 {
00144     MoveItemsToList(indexes, NavigationViewSplitVectorID::PrimaryList);
00145 }
00146
00147 void TopNavigationViewDataProvider::MoveItemsToList(std::vector<int> const& indexes, NavigationViewSplitVectorID vectorID)
00148 {
00149     for (auto &index : indexes)
00150     {
00151         MoveItemToVector(index, vectorID);
00152     };
00153 }
00154
00155 int TopNavigationViewDataProvider::GetPrimaryListSize()
00156 {
00157     return GetPrimaryItems().Size();
00158 }
00159
00160 int TopNavigationViewDataProvider::GetNavigationViewItemCountInPrimaryList()
00161 {
00162     int count = 0;
00163     for (int i = 0; i < Size(); i++)
00164     {
00165         if (IsItemInPrimaryList(i) && IsContainerNavigationViewItem(i))
00166         {
00167             count++;
00168         }
00169     }
00170     return count;
00171 }
00172
00173 int TopNavigationViewDataProvider::GetNavigationViewItemCountInTopNav()
00174 {
00175     int count = 0;
00176     for (int i = 0; i < Size(); i++)
00177     {
00178         if (IsContainerNavigationViewItem(i))
00179         {
00180             count++;
00181         }
00182     }
00183     return count;
00184 }
00185
00186 void TopNavigationViewDataProvider::UpdateWidthForPrimaryItem(int indexInPrimary, float width)
00187 {
00188     auto vector = GetVector(NavigationViewSplitVectorID::PrimaryList);
00189     if (vector)
00190     {
00191         const auto index = vector->IndexToIndexInOriginalVector(indexInPrimary);
00192         SetWidthForItem(index, width);
00193     }
00194 }
00195
00196 float TopNavigationViewDataProvider::WidthRequiredToRecoveryAllItemsToPrimary()
00197 {
00198     auto width = 0.f;
00199     for (int i=0; i<Size(); i++)
00200     {
00201         if (!IsItemInPrimaryList(i))
00202         {
00203             width += GetWidthForItem(i);
00204         }
00205     }
00206     width -= m_overflowButtonCachedWidth;
00207     return std::max(0.f, width);
00208 }
00209
00210 bool TopNavigationViewDataProvider::HasInvalidWidth(std::vector<int> & items)
00211 {
00212     bool hasInvalidWidth = false;
00213     for (auto &index : items)
00214     {
00215         if (!IsValidWidthForItem(index))
00216         {
00217             hasInvalidWidth = true;
00218             break;
00219         }
00220     }
00221     return hasInvalidWidth;
00222 }
00223
00224 float TopNavigationViewDataProvider::GetWidthForItem(int index)
00225 {
00226     auto width = AttachedData(index);
00227     if (!IsValidWidth(width))
00228     {
00229         width = 0;
00230     }
00231     return width;
00232 }
00233
00234 float TopNavigationViewDataProvider::CalculateWidthForItems(std::vector<int> &items)
00235 {
00236     float width = 0.f;
00237     for (auto &index : items)
00238     {
00239         width += GetWidthForItem(index);
00240     }
00241     return width;
00242 }
00243
00244 void TopNavigationViewDataProvider::InvalidWidthCache()
00245 {
00246     ResetAttachedData(-1.0f);
00247 }
00248
00249 float TopNavigationViewDataProvider::OverflowButtonWidth()
00250 {
00251     return m_overflowButtonCachedWidth;
00252 }
00253
00254 void TopNavigationViewDataProvider::OverflowButtonWidth(float width)
00255 {
00256     m_overflowButtonCachedWidth = width;
00257 }
00258
00259 bool TopNavigationViewDataProvider::IsItemSelectableInPrimaryList(const winrt::IInspectable& value)
00260 {
00261     const int index = IndexOf(value);
00262     return (index != -1);
00263 }
00264
00265 int TopNavigationViewDataProvider::IndexOf(const winrt::IInspectable& value, NavigationViewSplitVectorID vectorID)
00266 {
00267     return IndexOfImpl(value, vectorID);
00268 }
00269
00270 void TopNavigationViewDataProvider::OnDataSourceChanged(const winrt::IInspectable& sender, const winrt::NotifyCollectionChangedEventArgs& args)
00271 {
00272     switch (args.Action())
00273     {
00274         case winrt::NotifyCollectionChangedAction::Add:
00275         {
00276             OnInsertAt(args.NewStartingIndex(), args.NewItems().Size());
00277             break;
00278         }
00279
00280         case winrt::NotifyCollectionChangedAction::Remove:
00281         {
00282             OnRemoveAt(args.OldStartingIndex(), args.OldItems().Size());
00283             break;
00284         }
00285
00286         case winrt::NotifyCollectionChangedAction::Reset:
00287         {
00288             OnClear();
00289             break;
00290         }
00291
00292         case winrt::NotifyCollectionChangedAction::Replace:
00293         {
00294             OnRemoveAt(args.OldStartingIndex(), args.OldItems().Size());
00295             OnInsertAt(args.NewStartingIndex(), args.NewItems().Size());
00296             break;
00297         }
00298     }
00299     if (m_dataChangeCallback)
00300     {
00301         m_dataChangeCallback(args);
00302     }
00303 }
00304
00305 bool TopNavigationViewDataProvider::IsValidWidth(float width)
00306 {
00307     return (width >= 0) && (width < std::numeric_limits<float>::max());
00308 }
00309
00310 bool TopNavigationViewDataProvider::IsValidWidthForItem(int index)
00311 {
00312     auto width = AttachedData(index);
00313     return IsValidWidth(width);
00314 }
00315
00316 void TopNavigationViewDataProvider::SetWidthForItem(int index, float width)
00317 {
00318     if (IsValidWidth(width))
00319     {
00320         AttachedData(index, width);
00321     }
00322 }
00323
00324 void TopNavigationViewDataProvider::ChangeDataSource(winrt::ItemsSourceView newValue)
00325 {
00326     auto oldValue = m_dataSource.get();
00327     if (oldValue != newValue)
00328     {
00329         // update to the new datasource.
00330
00331         if (oldValue)
00332         {
00333             oldValue.CollectionChanged(m_dataSourceChanged);
00334         }
00335
00336         Clear();
00337
00338         m_dataSource.set(newValue);
00339         SyncAndInitVectorFlagsWithID(NavigationViewSplitVectorID::NotInitialized, DefaultAttachedData());
00340
00341         if (newValue)
00342         {
00343             m_dataSourceChanged = newValue.CollectionChanged({ this, &TopNavigationViewDataProvider::OnDataSourceChanged });
00344         }
00345     }
00346
00347     // Move all to primary list
00348     MoveItemsToVector(NavigationViewSplitVectorID::NotInitialized);
00349 }
00350
00351 bool TopNavigationViewDataProvider::IsItemInPrimaryList(int index)
00352 {
00353     return GetVectorIDForItem(index) == NavigationViewSplitVectorID::PrimaryList;
00354 }
00355
00356 bool TopNavigationViewDataProvider::IsContainerNavigationViewItem(int index)
00357 {
00358     bool isContainerNavigationViewItem = true;
00359
00360     auto item = GetAt(index);
00361     if (item && (item.try_as<winrt::NavigationViewItemHeader>() || item.try_as<winrt::NavigationViewItemSeparator>()))
00362     {
00363         isContainerNavigationViewItem = false;
00364     }
00365     return isContainerNavigationViewItem;
00366 }
00367
00368 bool TopNavigationViewDataProvider::IsContainerNavigationViewHeader(int index)
00369 {
00370     bool isContainerNavigationViewHeader = false;
00371
00372     auto item = GetAt(index);
00373     if (item && item.try_as<winrt::NavigationViewItemHeader>())
00374     {
00375         isContainerNavigationViewHeader = true;
00376     }
00377     return isContainerNavigationViewHeader;
00378 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IApplicationViewSpanningRects Member List

This is the complete list of members for IApplicationViewSpanningRects, including all inherited members.
GetSpanningRects() IApplicationViewSpanningRects
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarProperties Member List

This is the complete list of members for BreadcrumbBarProperties, including all inherited members.
BreadcrumbBarProperties() | BreadcrumbBarProperties |
ClearProperties() | BreadcrumbBarProperties | [static]
EnsureProperties() | BreadcrumbBarProperties | [static]
ItemClicked(winrt::TypedEventHandler< winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs > const &value) | BreadcrumbBarProperties |
ItemClicked(winrt::event_token const &token) | BreadcrumbBarProperties |
ItemsSource(winrt::IInspectable const &value) | BreadcrumbBarProperties |
ItemsSource() | BreadcrumbBarProperties |
ItemsSourceProperty() | BreadcrumbBarProperties | [inline, static]
ItemTemplate(winrt::IInspectable const &value) | BreadcrumbBarProperties |
ItemTemplate() | BreadcrumbBarProperties |
ItemTemplateProperty() | BreadcrumbBarProperties | [inline, static]
m_itemClickedEventSource | BreadcrumbBarProperties |
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | BreadcrumbBarProperties | [static]
OnItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | BreadcrumbBarProperties | [static]
s_ItemsSourceProperty | BreadcrumbBarProperties | [static]
s_ItemTemplateProperty | BreadcrumbBarProperties | [static]
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPicker.idl Source File

  • File List
  • File Members
  • ColorPicker

ColorPicker.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00007 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00008 unsealed runtimeclass ColorPicker : Microsoft.UI.Xaml.Controls.Control
00009 {
00010     ColorPicker();
00011
00012     [MUX_DEFAULT_VALUE("{ 255, 255, 255, 255 }")]
00013     Windows.UI.Color Color { get; set; };
00014     Windows.Foundation.IReference<Windows.UI.Color> PreviousColor { get; set; };
00015     Boolean IsAlphaEnabled { get; set; };
00016     [MUX_DEFAULT_VALUE("true")]
00017     Boolean IsColorSpectrumVisible { get; set; };
00018     [MUX_DEFAULT_VALUE("true")]
00019     Boolean IsColorPreviewVisible { get; set; };
00020     [MUX_DEFAULT_VALUE("true")]
00021     Boolean IsColorSliderVisible { get; set; };
00022     [MUX_DEFAULT_VALUE("true")]
00023     Boolean IsAlphaSliderVisible { get; set; };
00024     Boolean IsMoreButtonVisible { get; set; };
00025     [MUX_DEFAULT_VALUE("true")]
00026     Boolean IsColorChannelTextInputVisible { get; set; };
00027     [MUX_DEFAULT_VALUE("true")]
00028     Boolean IsAlphaTextInputVisible { get; set; };
00029     [MUX_DEFAULT_VALUE("true")]
00030     Boolean IsHexInputVisible { get; set; };
00031     [MUX_DEFAULT_VALUE("0")]
00032     Int32 MinHue { get; set; };
00033     [MUX_DEFAULT_VALUE("359")]
00034     Int32 MaxHue { get; set; };
00035     [MUX_DEFAULT_VALUE("0")]
00036     Int32 MinSaturation { get; set; };
00037     [MUX_DEFAULT_VALUE("100")]
00038     Int32 MaxSaturation { get; set; };
00039     [MUX_DEFAULT_VALUE("0")]
00040     Int32 MinValue { get; set; };
00041     [MUX_DEFAULT_VALUE("100")]
00042     Int32 MaxValue { get; set; };
00043     [MUX_DEFAULT_VALUE("winrt::ColorSpectrumShape::Box")]
00044     ColorSpectrumShape ColorSpectrumShape { get; set; };
00045     [MUX_DEFAULT_VALUE("winrt::ColorSpectrumComponents::HueSaturation")]
00046     ColorSpectrumComponents ColorSpectrumComponents { get; set; };
00047     event Windows.Foundation.TypedEventHandler<ColorPicker, ColorChangedEventArgs> ColorChanged;
00048
00049     [MUX_PUBLIC_V3]
00050     {
00051         [MUX_DEFAULT_VALUE("winrt::Orientation::Vertical")]
00052         Microsoft.UI.Xaml.Controls.Orientation Orientation;
00053     }
00054
00055     static Microsoft.UI.Xaml.DependencyProperty ColorProperty { get; };
00056     static Microsoft.UI.Xaml.DependencyProperty PreviousColorProperty { get; };
00057     static Microsoft.UI.Xaml.DependencyProperty IsAlphaEnabledProperty { get; };
00058     static Microsoft.UI.Xaml.DependencyProperty IsColorSpectrumVisibleProperty { get; };
00059     static Microsoft.UI.Xaml.DependencyProperty IsColorPreviewVisibleProperty { get; };
00060     static Microsoft.UI.Xaml.DependencyProperty IsColorSliderVisibleProperty { get; };
00061     static Microsoft.UI.Xaml.DependencyProperty IsAlphaSliderVisibleProperty { get; };
00062     static Microsoft.UI.Xaml.DependencyProperty IsMoreButtonVisibleProperty { get; };
00063     static Microsoft.UI.Xaml.DependencyProperty IsColorChannelTextInputVisibleProperty { get; };
00064     static Microsoft.UI.Xaml.DependencyProperty IsAlphaTextInputVisibleProperty { get; };
00065     static Microsoft.UI.Xaml.DependencyProperty IsHexInputVisibleProperty { get; };
00066     static Microsoft.UI.Xaml.DependencyProperty MinHueProperty { get; };
00067     static Microsoft.UI.Xaml.DependencyProperty MaxHueProperty { get; };
00068     static Microsoft.UI.Xaml.DependencyProperty MinSaturationProperty { get; };
00069     static Microsoft.UI.Xaml.DependencyProperty MaxSaturationProperty { get; };
00070     static Microsoft.UI.Xaml.DependencyProperty MinValueProperty { get; };
00071     static Microsoft.UI.Xaml.DependencyProperty MaxValueProperty { get; };
00072     static Microsoft.UI.Xaml.DependencyProperty ColorSpectrumShapeProperty { get; };
00073     static Microsoft.UI.Xaml.DependencyProperty ColorSpectrumComponentsProperty { get; };
00074     [MUX_PUBLIC_V3]
00075     {
00076         static Microsoft.UI.Xaml.DependencyProperty OrientationProperty{ get; };
00077     }
00078 }
00079
00080 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/XamlAmbientLight.idl Source File

  • File List
  • File Members
  • Lights

XamlAmbientLight.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_MEDIA_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 unsealed runtimeclass XamlAmbientLight : Microsoft.UI.Xaml.Media.XamlLight
00007 {
00008     XamlAmbientLight();
00009
00010     [MUX_DEFAULT_VALUE("{ 255, 255, 255, 255 }")]
00011     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00012     Windows.UI.Color Color { get; set; };
00013
00014     static Microsoft.UI.Xaml.DependencyProperty ColorProperty { get; };
00015     [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnIsTargetPropertyChanged")]
00016     static Microsoft.UI.Xaml.DependencyProperty IsTargetProperty { get; };
00017     static void SetIsTarget(Microsoft.UI.Xaml.DependencyObject object, Boolean value);
00018     static Boolean GetIsTarget(Microsoft.UI.Xaml.DependencyObject object);
00019 }
00020
00021 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPictureAutomationPeer.idl Source File

  • File List
  • File Members
  • PersonPicture

PersonPictureAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass PersonPictureAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00007 {
00008     [method_name("CreateInstanceWithOwner")] PersonPictureAutomationPeer(MU_XC_NAMESPACE.PersonPicture owner);
00009 }
00010
00011 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBar.h Source File

  • File List
  • File Members
  • ProgressBar

ProgressBar.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "ProgressBarTemplateSettings.h"
00010
00011 #include "ProgressBar.g.h"
00012 #include "ProgressBar.properties.h"
00013
00014 class ProgressBar :
00015     public ReferenceTracker<ProgressBar, winrt::implementation::ProgressBarT>,
00016     public ProgressBarProperties
00017 {
00018
00019 public:
00020     ProgressBar();
00021
00022     winrt::AutomationPeer OnCreateAutomationPeer();
00023     // IFrameworkElement
00024     void OnApplyTemplate();
00025
00026     // Internal
00027     void OnIsIndeterminatePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00028     void OnShowErrorPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00029     void OnShowPausedPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00030
00031 private:
00032     void OnIndicatorWidthComponentChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00033     void OnVisibilityPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00034
00035     void SetProgressBarIndicatorWidth();
00036     void UpdateStates();
00037     void UpdateWidthBasedTemplateSettings();
00038     void OnSizeChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00039
00040     winrt::Grid::Loaded_revoker m_layoutRootLoadedRevoker{};
00041     winrt::Rectangle::Loaded_revoker m_progressBarIndicatorRevoker{};
00042
00043     tracker_ref<winrt::Grid> m_layoutRoot{ this };
00044     tracker_ref<winrt::Rectangle> m_determinateProgressBarIndicator{ this };
00045     tracker_ref<winrt::Rectangle> m_indeterminateProgressBarIndicator{ this };
00046     tracker_ref<winrt::Rectangle> m_indeterminateProgressBarIndicator2{ this };
00047
00048     static constexpr wstring_view s_LayoutRootName{ L"LayoutRoot" };
00049     static constexpr wstring_view s_DeterminateProgressBarIndicatorName{ L"DeterminateProgressBarIndicator" };
00050     static constexpr wstring_view s_IndeterminateProgressBarIndicatorName{ L"IndeterminateProgressBarIndicator" };
00051     static constexpr wstring_view s_IndeterminateProgressBarIndicator2Name{ L"IndeterminateProgressBarIndicator2" };
00052     static constexpr wstring_view s_ErrorStateName{ L"Error" };
00053     static constexpr wstring_view s_PausedStateName{ L"Paused" };
00054     static constexpr wstring_view s_IndeterminateStateName{ L"Indeterminate" };
00055     static constexpr wstring_view s_IndeterminateErrorStateName{ L"IndeterminateError" };
00056     static constexpr wstring_view s_IndeterminatePausedStateName{ L"IndeterminatePaused" };
00057     static constexpr wstring_view s_DeterminateStateName{ L"Determinate" };
00058     static constexpr wstring_view s_UpdatingStateName{ L"Updating" };
00059     static constexpr wstring_view s_UpdatingWithErrorStateName{ L"UpdatingError" };
00060 };
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealStatesPage Member List

This is the complete list of members for RevealStatesPage, including all inherited members.
_compositionPropertyLogger | RevealStatesPage | [private]
_hoverSpotlight | RevealStatesPage | [private]
_normalStateCheckNumber | RevealStatesPage | [private]
_pressSpotlight | RevealStatesPage | [private]
_revealBrushTestApi | RevealStatesPage | [private]
_revealTestApi | RevealStatesPage | [private]
angleInRadiansTolerance | RevealStatesPage | [private]
AnotherButton_Click(object sender, RoutedEventArgs e) | RevealStatesPage | [inline, private]
AnotherListViewItem_Holding(object sender, Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs e) | RevealStatesPage | [inline, private]
BorderLight_ValidateBorderLightPanAway() | RevealStatesPage | [inline, private]
c_hoverLight_OuterConeAngle_Expected | RevealStatesPage | [private]
ChainedHoverLightStateValuesValidationHelper(float hoverLight_InnerConeIntensityExpected, float hoverLight_outerConeIntensityExpected, float hoverLight_outerConeAngleExpected, float pressLight_InnerConeIntensityExpected, float pressLight_outerConeIntensityExpected, float pressLight_outerConeAngleExpected, float hoverLight_InnerConeIntensityExpected2, float hoverLight_outerConeIntensityExpected2, float hoverLight_outerConeAngleExpected2, float pressLight_InnerConeIntensityExpected2, float pressLight_outerConeIntensityExpected2, float pressLight_outerConeAngleExpected2, string testName, string targetName) | RevealStatesPage | [inline, private]
coneAngleTolerance | RevealStatesPage | [private]
coneIntensityTolerance | RevealStatesPage | [private]
DegreesToRadians(float angle) | RevealStatesPage | [inline, private]
ElementTheme_Changed(object sender, SelectionChangedEventArgs e) | RevealStatesPage | [inline, private]
GetElementForHoverLight(object element) | RevealStatesPage | [inline, private]
HoverLight_ValidateFastRelease_Values() | RevealStatesPage | [inline, private]
HoverLight_ValidateNormal(RevealHoverLight hoverLight) | RevealStatesPage | [inline, private]
HoverLight_ValidateNormalState() | RevealStatesPage | [inline, private]
HoverLight_ValidatePointerOver(RevealHoverLight hoverLight) | RevealStatesPage | [inline, private]
HoverLight_ValidatePointerOverState() | RevealStatesPage | [inline, private]
HoverLight_ValidatePointerOverState_Values() | RevealStatesPage | [inline, private]
HoverLight_ValidatePosition_Offset1_Values() | RevealStatesPage | [inline, private]
HoverLight_ValidatePosition_Offset2_Values() | RevealStatesPage | [inline, private]
HoverLight_ValidatePosition_Offset3_Values() | RevealStatesPage | [inline, private]
HoverLight_ValidatePressed(RevealHoverLight hoverLight) | RevealStatesPage | [inline, private]
HoverLight_ValidatePressedState_Values() | RevealStatesPage | [inline, private]
HoverLight_ValidateSlowRelease_Values() | RevealStatesPage | [inline, private]
HoverLightPositionValuesValidationHelper(System.Numerics.Vector3 positionExpected, string testName, string targetName) | RevealStatesPage | [inline, private]
HoverLightStateValuesValidationHelper(float hoverLight_InnerConeIntensityExpected, float hoverLight_outerConeIntensityExpected, float hoverLight_outerConeAngleExpected, float pressLight_InnerConeIntensityExpected, float pressLight_outerConeIntensityExpected, float pressLight_outerConeAngleExpected, string testName, string targetName) | RevealStatesPage | [inline, private]
LargeButton_Click(object sender, RoutedEventArgs e) | RevealStatesPage | [inline, private]
NarrowButton_Holding(object sender, Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs e) | RevealStatesPage | [inline, private]
NotificationsTestButton_Click(object sender, RoutedEventArgs e) | RevealStatesPage | [inline, private]
offsetCoordinateTolerance | RevealStatesPage | [private]
OneMoreListViewItem_Holding(object sender, Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs e) | RevealStatesPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | RevealStatesPage | [inline, protected]
RadiansToDegrees(float angle) | RevealStatesPage | [inline, private]
revealHoverLightOffset_KeyboardExpression | RevealStatesPage | [private]
revealHoverLightOffset_PointerExpression | RevealStatesPage | [private]
RevealStatesPage() | RevealStatesPage | [inline]
SetState_Click(object sender, RoutedEventArgs e) | RevealStatesPage | [inline, private]
ShouldBorderLightBeOn() | RevealStatesPage | [inline, private]
StartLoggingValues_Click(object sender, RoutedEventArgs e) | RevealStatesPage | [inline, private]
TestListView_ItemClick(object sender, Microsoft.UI.Xaml.Controls.ItemClickEventArgs e) | RevealStatesPage | [inline, private]
ValidateEffectsPresent() | RevealStatesPage | [inline, private]
ValidateLightsOnPressed() | RevealStatesPage | [inline, private]
ValidationActionsComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | RevealStatesPage | [inline, private]
VerifyAmbientLight(RevealBrush testBrush, bool value) | RevealStatesPage | [inline, private]
VerifyBorderLight(RevealBrush testBrush, bool value) | RevealStatesPage | [inline, private]
VerifyHoverBrushTargeting(RevealBrush testBrush) | RevealStatesPage | [inline, private]
VerifyHoverLight(RevealBrush testBrush, bool value) | RevealStatesPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/MediaTransportControlsPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

MediaTransportControlsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     [TopLevelTestPage(Name = "MediaTransportControls")]
00016     public sealed partial class MediaTransportControlsPage : TestPage
00017     {
00018         public MediaTransportControlsPage()
00019         {
00020             this.InitializeComponent();
00021         }
00022     }
00023 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItem.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItem.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006
00007 #include "NavigationView.h"
00008 #include "NavigationViewItem.h"
00009 #include "NavigationViewItemAutomationPeer.h"
00010 #include "StackLayout.h"
00011 #include "Utils.h"
00012
00013 static constexpr wstring_view c_navigationViewItemPresenterName = L"NavigationViewItemPresenter"sv;
00014 static constexpr auto c_repeater = L"NavigationViewItemMenuItemsHost"sv;
00015 static constexpr auto c_rootGrid = L"NVIRootGrid"sv;
00016 static constexpr auto c_flyoutContentGrid = L"FlyoutContentGrid"sv;
00017
00018 // Visual States
00019 static constexpr auto c_pressedSelected = L"PressedSelected"sv;
00020 static constexpr auto c_pointerOverSelected = L"PointerOverSelected"sv;
00021 static constexpr auto c_selected = L"Selected"sv;
00022 static constexpr auto c_pressed = L"Pressed"sv;
00023 static constexpr auto c_pointerOver = L"PointerOver"sv;
00024 static constexpr auto c_disabled = L"Disabled"sv;
00025 static constexpr auto c_enabled = L"Enabled"sv;
00026 static constexpr auto c_normal = L"Normal"sv;
00027 static constexpr auto c_chevronHidden = L"ChevronHidden"sv;
00028 static constexpr auto c_chevronVisibleOpen = L"ChevronVisibleOpen"sv;
00029 static constexpr auto c_chevronVisibleClosed = L"ChevronVisibleClosed"sv;
00030
00031 static constexpr auto c_normalChevronHidden = L"NormalChevronHidden"sv;
00032 static constexpr auto c_normalChevronVisibleOpen = L"NormalChevronVisibleOpen"sv;
00033 static constexpr auto c_normalChevronVisibleClosed = L"NormalChevronVisibleClosed"sv;
00034 static constexpr auto c_pointerOverChevronHidden = L"PointerOverChevronHidden"sv;
00035 static constexpr auto c_pointerOverChevronVisibleOpen = L"PointerOverChevronVisibleOpen"sv;
00036 static constexpr auto c_pointerOverChevronVisibleClosed = L"PointerOverChevronVisibleClosed"sv;
00037 static constexpr auto c_pressedChevronHidden = L"PressedChevronHidden"sv;
00038 static constexpr auto c_pressedChevronVisibleOpen = L"PressedChevronVisibleOpen"sv;
00039 static constexpr auto c_pressedChevronVisibleClosed = L"PressedChevronVisibleClosed"sv;
00040
00041 NavigationViewItem::NavigationViewItem()
00042 {
00043     SetDefaultStyleKey(this);
00044     SetValue(s_MenuItemsProperty, winrt::make<Vector<winrt::IInspectable>>());
00045 }
00046
00047 void NavigationViewItem::UpdateVisualStateNoTransition()
00048 {
00049     UpdateVisualState(false /*useTransition*/);
00050 }
00051
00052 void NavigationViewItem::OnNavigationViewItemBaseDepthChanged()
00053 {
00054     UpdateItemIndentation();
00055     PropagateDepthToChildren(Depth() + 1);
00056 }
00057
00058 void NavigationViewItem::OnNavigationViewItemBaseIsSelectedChanged()
00059 {
00060     UpdateVisualStateForPointer();
00061 }
00062
00063 void NavigationViewItem::OnNavigationViewItemBasePositionChanged()
00064 {
00065     UpdateVisualStateNoTransition();
00066     ReparentRepeater();
00067 }
00068
00069 void NavigationViewItem::OnApplyTemplate()
00070 {
00071     // Stop UpdateVisualState before template is applied. Otherwise the visuals may be unexpected
00072     m_appliedTemplate = false;
00073     m_restoreToExpandedState = false;
00074
00075     UnhookEventsAndClearFields();
00076
00077     NavigationViewItemBase::OnApplyTemplate();
00078
00079     // Find selection indicator
00080     // Retrieve pointers to stable controls
00081     winrt::IControlProtected controlProtected = *this;
00082     m_helper.Init(controlProtected);
00083
00084     if (auto rootGrid = GetTemplateChildT<winrt::Grid>(c_rootGrid, controlProtected))
00085     {
00086         m_rootGrid.set(rootGrid);
00087
00088         if (auto flyoutBase = winrt::FlyoutBase::GetAttachedFlyout(rootGrid))
00089         {
00090             m_flyoutClosingRevoker = flyoutBase.Closing(winrt::auto_revoke, { this, &NavigationViewItem::OnFlyoutClosing });
00091         }
00092     }
00093
00094     HookInputEvents(controlProtected);
00095
00096     m_isEnabledChangedRevoker = IsEnabledChanged(winrt::auto_revoke, { this,  &NavigationViewItem::OnIsEnabledChanged });
00097
00098     m_toolTip.set(GetTemplateChildT<winrt::ToolTip>(L"ToolTip"sv, controlProtected));
00099
00100     if (auto splitView = GetSplitView())
00101     {
00102         PrepNavigationViewItem(splitView);
00103     }
00104     else
00105     {
00106         // If the NVI is not prepared in an ItemPresenter, it will not have reference to SplitView. So check OnLoaded
00107         // if it the reference has been manually set in NavigationViewItemBase::OnLoaded().
00108         Loaded({ this, &NavigationViewItem::OnLoaded });
00109     }
00110
00111     if (HasPotentialChildren())
00112     {
00113         LoadMenuItemsHost();
00114         UpdateRepeaterItemsSource();
00115     }
00116
00117     m_flyoutContentGrid.set(GetTemplateChildT<winrt::Grid>(c_flyoutContentGrid, controlProtected));
00118
00119     m_appliedTemplate = true;
00120
00121     UpdateItemIndentation();
00122     UpdateVisualStateNoTransition();
00123     ReparentRepeater();
00124     // We dont want to update the repeater visibilty during OnApplyTemplate if NavigationView is in a mode when items are shown in a flyout
00125     if (!ShouldRepeaterShowInFlyout())
00126     {
00127         ShowHideChildren();
00128     }
00129
00130     auto visual = winrt::ElementCompositionPreview::GetElementVisual(*this);
00131     NavigationView::CreateAndAttachHeaderAnimation(visual);
00132 }
00133
00134 void NavigationViewItem::LoadElementsForDisplayingChildren()
00135 {
00136     m_hasHadChildren = true;
00137
00138     LoadMenuItemsHost();
00139
00140     if (auto nvip = GetPresenter())
00141     {
00142         nvip->LoadChevron();
00143         UpdateVisualStateForChevron();
00144     }
00145 }
00146
00147 void NavigationViewItem::LoadMenuItemsHost()
00148 {
00149     // verify repeater is not already loaded
00150     if (m_repeater != nullptr)
00151     {
00152         return;
00153     }
00154
00155     if (auto nvImpl = winrt::get_self<NavigationView>(GetNavigationView()))
00156     {
00157         if (auto repeater = GetTemplateChildT<winrt::ItemsRepeater>(c_repeater, *this))
00158         {
00159             m_repeater.set(repeater);
00160
00161             if (auto stackLayout = repeater.Layout().try_as<winrt::StackLayout>())
00162             {
00163                 auto stackLayoutImpl = winrt::get_self<StackLayout>(stackLayout);
00164                 stackLayoutImpl->IsVirtualizationEnabled(false);
00165             }
00166
00167             // Primary element setup happens in NavigationView
00168             m_repeaterElementPreparedRevoker = repeater.ElementPrepared(winrt::auto_revoke, { nvImpl,  &NavigationView::OnRepeaterElementPrepared });
00169             m_repeaterElementClearingRevoker = repeater.ElementClearing(winrt::auto_revoke, { nvImpl, &NavigationView::OnRepeaterElementClearing });
00170
00171             repeater.ItemTemplate(*(nvImpl->GetNavigationViewItemsFactory()));
00172         }
00173     }
00174 }
00175
00176 void NavigationViewItem::OnLoaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&)
00177 {
00178     if (auto splitView = GetSplitView())
00179     {
00180         PrepNavigationViewItem(splitView);
00181     }
00182
00183     UpdateVisualStateForChevron();
00184 }
00185
00186 void NavigationViewItem::UpdateRepeaterItemsSource()
00187 {
00188     if (auto repeater = m_repeater.get())
00189     {
00190         auto const itemsSource = [this]()
00191         {
00192             if (auto const menuItemsSource = MenuItemsSource())
00193             {
00194                 return menuItemsSource;
00195             }
00196             return MenuItems().as<winrt::IInspectable>();
00197         }();
00198         m_itemsSourceViewCollectionChangedRevoker.revoke();
00199         repeater.ItemsSource(itemsSource);
00200         m_itemsSourceViewCollectionChangedRevoker = repeater.ItemsSourceView().CollectionChanged(winrt::auto_revoke, { this, &NavigationViewItem::OnItemsSourceViewChanged });
00201     }
00202 }
00203
00204 void NavigationViewItem::OnItemsSourceViewChanged(const winrt::IInspectable& /*sender*/, const winrt::NotifyCollectionChangedEventArgs& /*args*/)
00205 {
00206     UpdateVisualStateForChevron();
00207 }
00208
00209 winrt::UIElement NavigationViewItem::GetSelectionIndicator() const
00210 {
00211     auto selectIndicator = m_helper.GetSelectionIndicator();
00212     if (auto presenter = GetPresenter())
00213     {
00214         selectIndicator = presenter->GetSelectionIndicator();
00215     }
00216     return selectIndicator;
00217 }
00218
00219 void NavigationViewItem::OnSplitViewPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& args)
00220 {
00221     if (args == winrt::SplitView::CompactPaneLengthProperty())
00222     {
00223         UpdateCompactPaneLength();
00224     }
00225     else if (args == winrt::SplitView::IsPaneOpenProperty() ||
00226         args == winrt::SplitView::DisplayModeProperty())
00227     {
00228         UpdateIsClosedCompact();
00229         ReparentRepeater();
00230         HandleExpansionStateMemory();
00231     }
00232 }
00233
00234 void NavigationViewItem::UpdateCompactPaneLength()
00235 {
00236     if (const auto splitView = GetSplitView())
00237     {
00238         SetValue(s_CompactPaneLengthProperty, winrt::PropertyValue::CreateDouble(splitView.CompactPaneLength()));
00239
00240         // Only update when on left
00241         if (const auto presenter = GetPresenter())
00242         {
00243             presenter->UpdateCompactPaneLength(splitView.CompactPaneLength(), IsOnLeftNav());
00244         }
00245     }
00246 }
00247
00248 void NavigationViewItem::UpdateIsClosedCompact()
00249 {
00250     if (const auto splitView = GetSplitView())
00251     {
00252         // Check if the pane is closed and if the splitview is in either compact mode.
00253         m_isClosedCompact = !splitView.IsPaneOpen()
00254             && (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactInline);
00255
00256         UpdateVisualState(true /*useTransitions*/);
00257     }
00258 }
00259
00260 // NavigationView needs to force collapse top level items when the pane closes.
00261 // This is done to avoid a compact state with children showing.
00262 // This is done in a way that allows the control to restore the expanded
00263 // state when the pane is opened again.
00264 void NavigationViewItem::HandleExpansionStateMemory()
00265 {
00266     if (IsTopLevelItem())
00267     {
00268         if (const auto splitView = GetSplitView())
00269         {
00270             if (splitView.IsPaneOpen())
00271             {
00272                 RestoreExpandedState();
00273             }
00274             else
00275             {
00276                 ForceCollapse();
00277             }
00278         }
00279     }
00280 }
00281
00282 void NavigationViewItem::UpdateNavigationViewItemToolTip()
00283 {
00284     auto toolTipContent = winrt::ToolTipService::GetToolTip(*this);
00285
00286     // no custom tooltip, then use suggested tooltip
00287     if (!toolTipContent || toolTipContent == m_suggestedToolTipContent.get())
00288     {
00289         if (ShouldEnableToolTip())
00290         {
00291             // Don't SetToolTip with the same parameter because it close/re-open the ToolTip
00292             if (toolTipContent != m_suggestedToolTipContent.get())
00293             {
00294                 winrt::ToolTipService::SetToolTip(*this, m_suggestedToolTipContent.get());
00295             }
00296         }
00297         else
00298         {
00299             winrt::ToolTipService::SetToolTip(*this, nullptr);
00300         }
00301     }
00302 }
00303
00304 void NavigationViewItem::SuggestedToolTipChanged(winrt::IInspectable const& newContent)
00305 {
00306     auto potentialString = newContent.try_as<winrt::IPropertyValue>();
00307     const bool validStringableToolTip = potentialString
00308         && potentialString.Type() == winrt::PropertyType::String
00309         && !potentialString.GetString().empty();
00310
00311     winrt::IInspectable newToolTipContent{ nullptr };
00312     if (validStringableToolTip)
00313     {
00314         newToolTipContent = newContent;
00315     }
00316
00317     // Both customer and NavigationViewItem can update ToolTipContent by winrt::ToolTipService::SetToolTip or XAML
00318     // If the ToolTipContent is not the same as m_suggestedToolTipContent, then it's set by customer.
00319     // Customer's ToolTip take high priority, and we never override Customer's ToolTip.
00320     auto toolTipContent = winrt::ToolTipService::GetToolTip(*this);
00321     if (auto oldToolTipContent = m_suggestedToolTipContent.get())
00322     {
00323         if (oldToolTipContent == toolTipContent)
00324         {
00325             winrt::ToolTipService::SetToolTip(*this, nullptr);
00326         }
00327     }
00328
00329     m_suggestedToolTipContent.set(newToolTipContent);
00330 }
00331
00332 void NavigationViewItem::OnIsExpandedPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00333 {
00334     m_restoreToExpandedState = false;
00335
00336     if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00337     {
00338         auto navViewItemPeer = peer.as<winrt::NavigationViewItemAutomationPeer>();
00339         winrt::get_self<NavigationViewItemAutomationPeer>(navViewItemPeer)->RaiseExpandCollapseAutomationEvent(
00340             IsExpanded() ?
00341                 winrt::ExpandCollapseState::Expanded :
00342                 winrt::ExpandCollapseState::Collapsed
00343         );
00344     }
00345     UpdateVisualState(true);
00346 }
00347
00348 void NavigationViewItem::OnIconPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00349 {
00350     UpdateVisualStateNoTransition();
00351 }
00352
00353 void NavigationViewItem::OnInfoBadgePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00354 {
00355     UpdateVisualStateForInfoBadge();
00356 }
00357
00358 void NavigationViewItem::OnMenuItemsVectorChanged(const winrt::Collections::IObservableVector<winrt::IInspectable>& sender, const winrt::Collections::IVectorChangedEventArgs& args)
00359 {
00360     LoadElementsForDisplayingChildren();
00361     UpdateRepeaterItemsSource();
00362 }
00363
00364 void NavigationViewItem::OnMenuItemsPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00365 {
00366     m_menuItemsVectorChangedRevoker.revoke();
00367     if (auto menuItemsVector = MenuItems())
00368     {
00369         if (auto menuItemsObservableVector = menuItemsVector.as<winrt::IObservableVector<winrt::IInspectable>>())
00370         {
00371             m_menuItemsVectorChangedRevoker = menuItemsObservableVector.VectorChanged(winrt::auto_revoke, { this, &NavigationViewItem::OnMenuItemsVectorChanged });
00372         }
00373
00374         if (menuItemsVector.Size() > 0)
00375         {
00376             LoadElementsForDisplayingChildren();
00377         }
00378     }
00379
00380     UpdateRepeaterItemsSource();
00381     UpdateVisualStateForChevron();
00382 }
00383
00384 void NavigationViewItem::OnMenuItemsSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00385 {
00386     LoadElementsForDisplayingChildren();
00387     UpdateRepeaterItemsSource();
00388     UpdateVisualStateForChevron();
00389 }
00390
00391 void NavigationViewItem::OnHasUnrealizedChildrenPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00392 {
00393     LoadElementsForDisplayingChildren();
00394     UpdateVisualStateForChevron();
00395 }
00396
00397 void NavigationViewItem::ShowSelectionIndicator(bool visible)
00398 {
00399     if (auto const selectionIndicator = GetSelectionIndicator())
00400     {
00401         selectionIndicator.Opacity(visible ? 1.0 : 0.0);
00402     }
00403 }
00404
00405 void NavigationViewItem::UpdateVisualStateForIconAndContent(bool showIcon, bool showContent)
00406 {
00407     if (auto const presenter = m_navigationViewItemPresenter.get())
00408     {
00409         auto stateName = showIcon ? (showContent ? L"IconOnLeft" : L"IconOnly") : L"ContentOnly";
00410         winrt::VisualStateManager::GoToState(presenter, stateName, false /*useTransitions*/);
00411     }
00412 }
00413
00414 void NavigationViewItem::UpdateVisualStateForInfoBadge()
00415 {
00416     if (auto const presenter = m_navigationViewItemPresenter.get())
00417     {
00418         auto stateName = ShouldShowInfoBadge() ? L"InfoBadgeVisible" : L"InfoBadgeCollapsed";
00419         winrt::VisualStateManager::GoToState(presenter, stateName, false /*useTransitions*/);
00420     }
00421 }
00422
00423 void NavigationViewItem::UpdateVisualStateForClosedCompact()
00424 {
00425     if (const auto presenter = GetPresenter())
00426     {
00427         presenter->UpdateClosedCompactVisualState(IsTopLevelItem(), m_isClosedCompact);
00428     }
00429 }
00430
00431 void NavigationViewItem::UpdateVisualStateForNavigationViewPositionChange()
00432 {
00433     const auto position = Position();
00434     auto stateName = c_OnLeftNavigation;
00435
00436     bool handled = false;
00437
00438     switch (position)
00439     {
00440     case NavigationViewRepeaterPosition::LeftNav:
00441     case NavigationViewRepeaterPosition::LeftFooter:
00442         if (winrt::Application::Current().FocusVisualKind() == winrt::FocusVisualKind::Reveal)
00443         {
00444             if (winrt::VisualStateManager::GoToState(*this, c_OnLeftNavigationReveal, false /*useTransitions*/))
00445             {
00446                 handled = true;
00447             }
00448         }
00449         break;
00450     case NavigationViewRepeaterPosition::TopPrimary:
00451     case NavigationViewRepeaterPosition::TopFooter:
00452         stateName = c_OnTopNavigationPrimary;
00453         m_restoreToExpandedState = false;
00454         if (winrt::Application::Current().FocusVisualKind() == winrt::FocusVisualKind::Reveal)
00455         {
00456             // OnTopNavigationPrimaryReveal is introduced in RS6 and only in the V1 style.
00457             // Fallback to c_OnTopNavigationPrimary for other styles.
00458             if (winrt::VisualStateManager::GoToState(*this, c_OnTopNavigationPrimaryReveal, false /*useTransitions*/))
00459             {
00460                 handled = true;
00461             }
00462         }
00463         break;
00464     case NavigationViewRepeaterPosition::TopOverflow:
00465         stateName = c_OnTopNavigationOverflow;
00466         m_restoreToExpandedState = false;
00467         break;
00468     }
00469
00470     if (!handled)
00471     {
00472         winrt::VisualStateManager::GoToState(*this, stateName, false /*useTransitions*/);
00473     }
00474 }
00475
00476 void NavigationViewItem::UpdateVisualStateForKeyboardFocusedState()
00477 {
00478     auto focusState = L"KeyboardNormal";
00479     if (m_hasKeyboardFocus)
00480     {
00481         focusState = L"KeyboardFocused";
00482     }
00483
00484     winrt::VisualStateManager::GoToState(*this, focusState, false /*useTransitions*/);
00485 }
00486
00487 void NavigationViewItem::UpdateVisualStateForToolTip()
00488 {
00489     // Since RS5, ToolTip apply to NavigationViewItem directly to make Keyboard focus has tooltip too.
00490     // If ToolTip TemplatePart is detected, fallback to old logic and apply ToolTip on TemplatePart.
00491     if (auto toolTip = m_toolTip.get())
00492     {
00493         const auto shouldEnableToolTip = ShouldEnableToolTip();
00494         auto toolTipContent = m_suggestedToolTipContent.get();
00495         if (shouldEnableToolTip && toolTipContent)
00496         {
00497             toolTip.Content(toolTipContent);
00498             toolTip.IsEnabled(true);
00499         }
00500         else
00501         {
00502             toolTip.Content(nullptr);
00503             toolTip.IsEnabled(false);
00504         }
00505     }
00506     else
00507     {
00508         UpdateNavigationViewItemToolTip();
00509     }
00510 }
00511
00512 void NavigationViewItem::UpdateVisualStateForPointer()
00513 {
00514     const auto isEnabled = IsEnabled();
00515     const auto enabledStateValue = isEnabled ? c_enabled : c_disabled;
00516     // DisabledStates and CommonStates
00517     const auto selectedStateValue = [this, isEnabled, isSelected = IsSelected()]()
00518     {
00519         if (isEnabled)
00520         {
00521             if (isSelected)
00522             {
00523                 if (m_isPressed)
00524                 {
00525                     return c_pressedSelected;
00526                 }
00527                 else if (m_isPointerOver)
00528                 {
00529                     return c_pointerOverSelected;
00530                 }
00531                 else
00532                 {
00533                     return c_selected;
00534                 }
00535             }
00536             else if (m_isPointerOver)
00537             {
00538                 if (m_isPressed)
00539                 {
00540                     return c_pressed;
00541                 }
00542                 else
00543                 {
00544                     return c_pointerOver;
00545                 }
00546             }
00547             else if (m_isPressed)
00548             {
00549                 return c_pressed;
00550             }
00551         }
00552         else
00553         {
00554             if (isSelected)
00555             {
00556                 return c_selected;
00557             }
00558         }
00559         return c_normal;
00560     }();
00561
00562     // There are scenarios where the presenter may not exist.
00563     // For example, the top nav settings item. In that case,
00564     // update the states for the item itself.
00565     if (auto const presenter = m_navigationViewItemPresenter.get())
00566     {
00567         winrt::VisualStateManager::GoToState(presenter, enabledStateValue, true);
00568         winrt::VisualStateManager::GoToState(presenter, selectedStateValue, true);
00569     }
00570     else
00571     {
00572         winrt::VisualStateManager::GoToState(*this, enabledStateValue, true);
00573         winrt::VisualStateManager::GoToState(*this, selectedStateValue, true);
00574     }
00575 }
00576
00577 void NavigationViewItem::UpdateVisualState(bool useTransitions)
00578 {
00579     if (!m_appliedTemplate)
00580         return;
00581
00582     UpdateVisualStateForPointer();
00583
00584     UpdateVisualStateForNavigationViewPositionChange();
00585
00586     const bool shouldShowIcon = ShouldShowIcon();
00587     const bool shouldShowContent = ShouldShowContent();
00588
00589     if (IsOnLeftNav())
00590     {
00591         if (auto const presenter = m_navigationViewItemPresenter.get())
00592         {
00593             // Backward Compatibility with RS4-, new implementation prefer IconOnLeft/IconOnly/ContentOnly
00594             winrt::VisualStateManager::GoToState(presenter, shouldShowIcon ? L"IconVisible" : L"IconCollapsed", useTransitions);
00595         }
00596
00597         UpdateVisualStateForClosedCompact();
00598     }
00599
00600     UpdateVisualStateForToolTip();
00601
00602     UpdateVisualStateForIconAndContent(shouldShowIcon, shouldShowContent);
00603
00604     UpdateVisualStateForInfoBadge();
00605
00606     // visual state for focus state. top navigation use it to provide different visual for selected and selected+focused
00607     UpdateVisualStateForKeyboardFocusedState();
00608
00609     UpdateVisualStateForChevron();
00610 }
00611
00612 void NavigationViewItem::UpdateVisualStateForChevron()
00613 {
00614     if (auto const presenter = m_navigationViewItemPresenter.get())
00615     {
00616         enum class PointerStateValue{ Normal, PointerOver, Pressed };
00617         enum class ChevronStateValue { ChevronHidden, ChevronVisibleOpen, ChevronVisibleClosed };
00618         const auto pointerStateValue = [this, isEnabled = IsEnabled(), isSelected = IsSelected()]()
00619         {
00620             if (isEnabled)
00621             {
00622                 if (m_isPointerOver)
00623                 {
00624                     if (m_isPressed)
00625                     {
00626                         return PointerStateValue::Pressed; //Pressed
00627                     }
00628                     else
00629                     {
00630                         return PointerStateValue::PointerOver; //PointerOver
00631                     }
00632                 }
00633                 else if (m_isPressed)
00634                 {
00635                     return PointerStateValue::Pressed; //Pressed
00636                 }
00637             }
00638             return PointerStateValue::Normal; //Normal
00639         }();
00640         auto const chevronState = HasChildren() && !(m_isClosedCompact && ShouldRepeaterShowInFlyout()) ? (IsExpanded() ? ChevronStateValue::ChevronVisibleOpen : ChevronStateValue::ChevronVisibleClosed) : ChevronStateValue::ChevronHidden;
00641
00642         auto const pointerChevronState = [this, pointerStateValue, chevronState]() {
00643             // This Visual State Group will load the chevron in the PointerOver & Pressed states even if it is hidden.
00644             // In order to avoid loading the chevron when we don't need it, only execute this if we can confirm chevron is needed.
00645             if (m_hasHadChildren)
00646             {
00647                 if (chevronState == ChevronStateValue::ChevronHidden)
00648                 {
00649                     if (pointerStateValue == PointerStateValue::Normal)
00650                     {
00651                         return c_normalChevronHidden;
00652                     }
00653                     else if (pointerStateValue == PointerStateValue::PointerOver)
00654                     {
00655                         return c_pointerOverChevronHidden;
00656                     }
00657                     else if (pointerStateValue == PointerStateValue::Pressed)
00658                     {
00659                         return c_pressedChevronHidden;
00660                     }
00661                 }
00662                 else if (chevronState == ChevronStateValue::ChevronVisibleOpen)
00663                 {
00664                     if (pointerStateValue == PointerStateValue::Normal)
00665                     {
00666                         return c_normalChevronVisibleOpen;
00667                     }
00668                     else if (pointerStateValue == PointerStateValue::PointerOver)
00669                     {
00670                         return c_pointerOverChevronVisibleOpen;
00671                     }
00672                     else if (pointerStateValue == PointerStateValue::Pressed)
00673                     {
00674                         return c_pressedChevronVisibleOpen;
00675                     }
00676                 }
00677                 else if (chevronState == ChevronStateValue::ChevronVisibleClosed)
00678                 {
00679                     if (pointerStateValue == PointerStateValue::Normal)
00680                     {
00681                         return c_normalChevronVisibleClosed;
00682                     }
00683                     else if (pointerStateValue == PointerStateValue::PointerOver)
00684                     {
00685                         return c_pointerOverChevronVisibleClosed;
00686                     }
00687                     else if (pointerStateValue == PointerStateValue::Pressed)
00688                     {
00689                         return c_pressedChevronVisibleClosed;
00690                     }
00691                 }
00692             }
00693             return c_normalChevronHidden;
00694         }();
00695
00696         // Go to the appropriate pointerChevronState
00697         winrt::VisualStateManager::GoToState(presenter, pointerChevronState, true);
00698
00699         // Go to the appropriate chevronState
00700         if (chevronState == ChevronStateValue::ChevronHidden)
00701         {
00702             winrt::VisualStateManager::GoToState(presenter, c_chevronHidden, true);
00703         }
00704         else if (chevronState == ChevronStateValue::ChevronVisibleOpen)
00705         {
00706             winrt::VisualStateManager::GoToState(presenter, c_chevronVisibleOpen, true);
00707         }
00708         else if (chevronState == ChevronStateValue::ChevronVisibleClosed)
00709         {
00710             winrt::VisualStateManager::GoToState(presenter, c_chevronVisibleClosed, true);
00711         }
00712     }
00713 }
00714
00715 bool NavigationViewItem::HasChildren()
00716 {
00717     return (MenuItems() != nullptr && MenuItems().Size() > 0) ||
00718            (MenuItemsSource() != nullptr &&
00719             m_repeater != nullptr &&
00720             m_repeater.get().ItemsSourceView() != nullptr &&
00721             m_repeater.get().ItemsSourceView().Count() > 0) ||
00722             HasUnrealizedChildren();
00723 }
00724
00725 bool NavigationViewItem::HasPotentialChildren()
00726 {
00727     return (MenuItems() != nullptr && MenuItems().Size() > 0) ||
00728             MenuItemsSource() != nullptr ||
00729             HasUnrealizedChildren();
00730 }
00731
00732 bool NavigationViewItem::ShouldShowIcon()
00733 {
00734     return static_cast<bool>(Icon());
00735 }
00736
00737 bool NavigationViewItem::ShouldShowInfoBadge()
00738 {
00739     return static_cast<bool>(InfoBadge());
00740 }
00741
00742 bool NavigationViewItem::ShouldEnableToolTip() const
00743 {
00744     // We may enable Tooltip for IconOnly in the future, but not now
00745     return IsOnLeftNav() && m_isClosedCompact;
00746 }
00747
00748 bool NavigationViewItem::ShouldShowContent()
00749 {
00750     return static_cast<bool>(Content());
00751 }
00752
00753 bool NavigationViewItem::IsOnLeftNav() const
00754 {
00755     auto const position = Position();
00756     return position == NavigationViewRepeaterPosition::LeftNav || position == NavigationViewRepeaterPosition::LeftFooter;
00757 }
00758
00759 bool NavigationViewItem::IsOnTopPrimary() const
00760 {
00761     bool isPaneDisplayModeTop = true;
00762     if (const auto navigationView = GetNavigationView())
00763     {
00764         // There is a delay between the NavigationViewPaneDisplayMode update and the
00765         // position property of NavigationViewItem being updated. This function gets called
00766         // in that delay period, so we need to check the PaneDisplayMode as further verification
00767         // of whether we are in Top mode or switching away from it.
00768         isPaneDisplayModeTop = navigationView.PaneDisplayMode() == winrt::NavigationViewPaneDisplayMode::Top;
00769     }
00770     return Position() == NavigationViewRepeaterPosition::TopPrimary && isPaneDisplayModeTop;
00771 }
00772
00773 winrt::UIElement const NavigationViewItem::GetPresenterOrItem() const
00774 {
00775     if (auto const presenter = m_navigationViewItemPresenter.get())
00776     {
00777         return presenter.try_as<winrt::UIElement>();
00778     }
00779     else
00780     {
00781         return this->try_as<winrt::UIElement>();
00782     }
00783 }
00784
00785 NavigationViewItemPresenter* NavigationViewItem::GetPresenter() const
00786 {
00787     NavigationViewItemPresenter* presenter = nullptr;
00788     if (m_navigationViewItemPresenter)
00789     {
00790         presenter = winrt::get_self<NavigationViewItemPresenter>(m_navigationViewItemPresenter.get());
00791         presenter->ApplyTemplate();
00792     }
00793     return presenter;
00794 }
00795
00796 void NavigationViewItem::ShowHideChildren()
00797 {
00798     if (auto const repeater = m_repeater.get())
00799     {
00800         const bool shouldShowChildren = IsExpanded();
00801         const auto visibility = shouldShowChildren ? winrt::Visibility::Visible : winrt::Visibility::Collapsed;
00802         repeater.Visibility(visibility);
00803
00804         if (ShouldRepeaterShowInFlyout())
00805         {
00806             if (shouldShowChildren)
00807             {
00808                 // Verify that repeater is parented correctly
00809                 if (!m_isRepeaterParentedToFlyout)
00810                 {
00811                     ReparentRepeater();
00812                 }
00813
00814                 // There seems to be a race condition happening which sometimes
00815                 // prevents the opening of the flyout. Queue callback as a workaround.
00816                 SharedHelpers::QueueCallbackForCompositionRendering(
00817                     [strongThis = get_strong()]()
00818                 {
00819                     winrt::FlyoutBase::ShowAttachedFlyout(strongThis->m_rootGrid.get());
00820                 });
00821             }
00822             else
00823             {
00824                 if (auto const flyout = winrt::FlyoutBase::GetAttachedFlyout(m_rootGrid.get()))
00825                 {
00826                     flyout.Hide();
00827                 }
00828             }
00829         }
00830     }
00831 }
00832
00833 void NavigationViewItem::ForceCollapse()
00834 {
00835     if (IsExpanded())
00836     {
00837         IsExpanded(false);
00838         m_restoreToExpandedState = true;
00839     }
00840 }
00841
00842 void NavigationViewItem::RestoreExpandedState()
00843 {
00844     if (m_restoreToExpandedState)
00845     {
00846         IsExpanded(true);
00847         m_restoreToExpandedState = false;
00848     }
00849 }
00850
00851 void NavigationViewItem::ReparentRepeater()
00852 {
00853     if (HasChildren())
00854     {
00855         if (auto const repeater = m_repeater.get())
00856         {
00857             if (ShouldRepeaterShowInFlyout() && !m_isRepeaterParentedToFlyout)
00858             {
00859                 // Reparent repeater to flyout
00860                 // TODO: Replace removeatend with something more specific
00861                 m_rootGrid.get().Children().RemoveAtEnd();
00862                 m_flyoutContentGrid.get().Children().Append(repeater);
00863                 m_isRepeaterParentedToFlyout = true;
00864
00865                 PropagateDepthToChildren(0);
00866             }
00867             else if (!ShouldRepeaterShowInFlyout() && m_isRepeaterParentedToFlyout)
00868             {
00869                 m_flyoutContentGrid.get().Children().RemoveAtEnd();
00870                 m_rootGrid.get().Children().Append(repeater);
00871                 m_isRepeaterParentedToFlyout = false;
00872
00873                 PropagateDepthToChildren(1);
00874             }
00875         }
00876     }
00877 }
00878
00879 bool NavigationViewItem::ShouldRepeaterShowInFlyout() const
00880 {
00881     return (m_isClosedCompact && IsTopLevelItem()) || IsOnTopPrimary();
00882 }
00883
00884 bool NavigationViewItem::IsRepeaterVisible() const
00885 {
00886     if (auto const repeater = m_repeater.get())
00887     {
00888         return repeater.Visibility() == winrt::Visibility::Visible;
00889     }
00890     return false;
00891 }
00892
00893 void NavigationViewItem::UpdateItemIndentation()
00894 {
00895     // Update item indentation based on its depth
00896     if (auto const presenter = m_navigationViewItemPresenter.get())
00897     {
00898         const auto newLeftMargin = Depth() * c_itemIndentation;
00899         winrt::get_self<NavigationViewItemPresenter>(presenter)->UpdateContentLeftIndentation(static_cast<double>(newLeftMargin));
00900     }
00901 }
00902
00903 void NavigationViewItem::PropagateDepthToChildren(int depth)
00904 {
00905     if (auto const repeater = m_repeater.get())
00906     {
00907         auto itemsCount = repeater.ItemsSourceView().Count();
00908         for (int index = 0; index < itemsCount; index++)
00909         {
00910             if (auto const element = repeater.TryGetElement(index))
00911             {
00912                 if (auto const nvib = element.try_as<winrt::NavigationViewItemBase>())
00913                 {
00914                     winrt::get_self<NavigationViewItemBase>(nvib)->Depth(depth);
00915                 }
00916             }
00917         }
00918     }
00919 }
00920
00921 void NavigationViewItem::OnExpandCollapseChevronPointerReleased()
00922 {
00923     IsExpanded(!IsExpanded());
00924 }
00925
00926 void NavigationViewItem::OnFlyoutClosing(const winrt::IInspectable& sender, const winrt::FlyoutBaseClosingEventArgs& args)
00927 {
00928     IsExpanded(false);
00929 }
00930
00931 // IUIElement / IUIElementOverridesHelper
00932 winrt::AutomationPeer NavigationViewItem::OnCreateAutomationPeer()
00933 {
00934     return winrt::make<NavigationViewItemAutomationPeer>(*this);
00935 }
00936
00937 // IContentControlOverrides / IContentControlOverridesHelper
00938 void NavigationViewItem::OnContentChanged(winrt::IInspectable const& oldContent, winrt::IInspectable const& newContent)
00939 {
00940     NavigationViewItemBase::OnContentChanged(oldContent, newContent);
00941     SuggestedToolTipChanged(newContent);
00942     UpdateVisualStateNoTransition();
00943
00944     if (!IsOnLeftNav())
00945     {
00946         // Content has changed for the item, so we want to trigger a re-measure
00947         if (auto navView = GetNavigationView())
00948         {
00949             winrt::get_self<NavigationView>(navView)->TopNavigationViewItemContentChanged();
00950         }
00951     }
00952 }
00953
00954 void NavigationViewItem::OnGotFocus(winrt::RoutedEventArgs const& e)
00955 {
00956     NavigationViewItemBase::OnGotFocus(e);
00957     auto originalSource = e.OriginalSource().try_as<winrt::Control>();
00958     if (originalSource)
00959     {
00960         // It's used to support bluebar have difference appearance between focused and focused+selection.
00961         // For example, we can move the SelectionIndicator 3px up when focused and selected to make sure focus rectange doesn't override SelectionIndicator.
00962         // If it's a pointer or programatic, no focus rectangle, so no action
00963         const auto focusState = originalSource.FocusState();
00964         if (focusState == winrt::FocusState::Keyboard)
00965         {
00966             m_hasKeyboardFocus = true;
00967             UpdateVisualStateNoTransition();
00968         }
00969     }
00970 }
00971
00972 void NavigationViewItem::OnLostFocus(winrt::RoutedEventArgs const& e)
00973 {
00974     NavigationViewItemBase::OnLostFocus(e);
00975     if (m_hasKeyboardFocus)
00976     {
00977         m_hasKeyboardFocus = false;
00978         UpdateVisualStateNoTransition();
00979     }
00980 }
00981
00982 void NavigationViewItem::ResetTrackedPointerId()
00983 {
00984     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00985
00986     m_trackedPointerId = 0;
00987 }
00988
00989 // Returns False when the provided pointer Id matches the currently tracked Id.
00990 // When there is no currently tracked Id, sets the tracked Id to the provided Id and returns False.
00991 // Returns True when the provided pointer Id does not match the currently tracked Id.
00992 bool NavigationViewItem::IgnorePointerId(const winrt::PointerRoutedEventArgs& args)
00993 {
00994     uint32_t pointerId = args.Pointer().PointerId();
00995
00996     if (m_trackedPointerId == 0)
00997     {
00998         m_trackedPointerId = pointerId;
00999     }
01000     else if (m_trackedPointerId != pointerId)
01001     {
01002         return true;
01003     }
01004     return false;
01005 }
01006
01007 void NavigationViewItem::OnPresenterPointerPressed(const winrt::IInspectable&, const winrt::PointerRoutedEventArgs& args)
01008 {
01009     const bool ignorePointerId = IgnorePointerId(args);
01010     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, ignorePointerId);
01011     if (ignorePointerId)
01012     {
01013         // FUTURE: Remove this workaround, which always switches to a new Touch or Pen input
01014         //         in case a previous touch/input got lost due to a missing PointerCaptureLost event.
01015         auto const& pointerDeviceType = args.Pointer().PointerDeviceType();
01016         if (
01017             pointerDeviceType == winrt::PointerDeviceType::Touch ||
01018             pointerDeviceType == winrt::PointerDeviceType::Pen)
01019         {
01020             m_isPressed = false;
01021             m_isPointerOver = false;
01022
01023             if (m_capturedPointer)
01024             {
01025                 auto presenter = GetPresenterOrItem();
01026
01027                 MUX_ASSERT(presenter);
01028
01029                 presenter.ReleasePointerCapture(m_capturedPointer);
01030                 m_capturedPointer = nullptr;
01031             }
01032
01033             ResetTrackedPointerId();
01034         }
01035         else
01036         {
01037             return;
01038         }
01039     }
01040
01041     auto pointerProperties = args.GetCurrentPoint(*this).Properties();
01042     if (!pointerProperties.IsLeftButtonPressed())
01043     {
01044         // We are only interested in the primary action of the pointer device
01045         // (e.g. left click of a mouse)
01046     // Despite the name, IsLeftButtonPressed covers the primary action regardless of device.
01047         return;
01048     }
01049
01050     MUX_ASSERT(!m_isPressed);
01051     MUX_ASSERT(!m_capturedPointer);
01052
01053     m_isPressed = true;
01054
01055     auto pointer = args.Pointer();
01056     auto presenter = GetPresenterOrItem();
01057
01058     MUX_ASSERT(presenter);
01059
01060     if (presenter.CapturePointer(pointer))
01061     {
01062         m_capturedPointer = pointer;
01063     }
01064
01065     UpdateVisualState(true);
01066 }
01067
01068 void NavigationViewItem::OnPresenterPointerReleased(const winrt::IInspectable&, const winrt::PointerRoutedEventArgs& args)
01069 {
01070     const bool ignorePointerId = IgnorePointerId(args);
01071     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, ignorePointerId, m_isPressed);
01072     if (ignorePointerId)
01073     {
01074         return;
01075     }
01076
01077     if (m_isPressed)
01078     {
01079         m_isPressed = false;
01080
01081         if (!IsOutOfControlBounds(args.GetCurrentPoint(*this).Position()) &&
01082             IsInNavigationViewOwnedRepeater())
01083         {
01084             if (auto nvImpl = winrt::get_self<NavigationView>(GetNavigationView()))
01085             {
01086                 nvImpl->OnNavigationViewItemClicked(*this);
01087                 args.Handled(true);
01088             }
01089         }
01090
01091         if (m_capturedPointer)
01092         {
01093             auto presenter = GetPresenterOrItem();
01094
01095             MUX_ASSERT(presenter);
01096
01097             presenter.ReleasePointerCapture(m_capturedPointer);
01098             m_capturedPointer = nullptr;
01099         }
01100
01101         UpdateVisualState(true);
01102     }
01103 }
01104
01105 void NavigationViewItem::OnPresenterPointerEntered(const winrt::IInspectable&, const winrt::PointerRoutedEventArgs& args)
01106 {
01107     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
01108
01109     ProcessPointerOver(args);
01110 }
01111
01112 void NavigationViewItem::OnPresenterPointerMoved(const winrt::IInspectable&, const winrt::PointerRoutedEventArgs& args)
01113 {
01114     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
01115
01116     ProcessPointerOver(args);
01117 }
01118
01119 void NavigationViewItem::OnPresenterPointerExited(const winrt::IInspectable&, const winrt::PointerRoutedEventArgs& args)
01120 {
01121     const bool ignorePointerId = IgnorePointerId(args);
01122     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, ignorePointerId, !!m_capturedPointer);
01123     if (ignorePointerId)
01124     {
01125         return;
01126     }
01127
01128     m_isPointerOver = false;
01129
01130     if (!m_capturedPointer)
01131     {
01132         ResetTrackedPointerId();
01133     }
01134
01135     UpdateVisualState(true);
01136 }
01137
01138 void NavigationViewItem::OnPresenterPointerCanceled(const winrt::IInspectable&, const winrt::PointerRoutedEventArgs& args)
01139 {
01140     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
01141
01142     ProcessPointerCanceled(args);
01143 }
01144
01145 void NavigationViewItem::OnPresenterPointerCaptureLost(const winrt::IInspectable&, const winrt::PointerRoutedEventArgs& args)
01146 {
01147     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
01148
01149     ProcessPointerCanceled(args);
01150 }
01151
01152 void NavigationViewItem::OnIsEnabledChanged(const winrt::IInspectable&, const winrt::DependencyPropertyChangedEventArgs&)
01153 {
01154     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
01155
01156     if (!IsEnabled())
01157     {
01158         m_isPressed = false;
01159         m_isPointerOver = false;
01160
01161         if (m_capturedPointer)
01162         {
01163             auto presenter = GetPresenterOrItem();
01164
01165             MUX_ASSERT(presenter);
01166
01167             presenter.ReleasePointerCapture(m_capturedPointer);
01168             m_capturedPointer = nullptr;
01169         }
01170
01171         ResetTrackedPointerId();
01172     }
01173
01174     UpdateVisualState(true);
01175 }
01176
01177 void NavigationViewItem::RotateExpandCollapseChevron(bool isExpanded)
01178 {
01179     if (auto presenter = GetPresenter())
01180     {
01181         presenter->RotateExpandCollapseChevron(isExpanded);
01182     }
01183 }
01184
01185 void NavigationViewItem::ProcessPointerCanceled(const winrt::PointerRoutedEventArgs& args)
01186 {
01187     const bool ignorePointerId = IgnorePointerId(args);
01188     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, ignorePointerId);
01189     if (ignorePointerId)
01190     {
01191         return;
01192     }
01193
01194     m_isPressed = false;
01195     // m_isPointerOver should be true before this event so this doesn't need to be set to true in the else block...
01196     // What this flag tracks is complicated because of the NavigationView sub items and the m_capturedPointers that are being tracked..
01197     // We do this check because PointerCaptureLost can sometimes take the place of PointerReleased events.
01198     // In these cases we need to test if the pointer is over the item to maintain the proper state.
01199     // In the case of touch input, we want to cancel anyway since there will be no pointer exited due to the pointer being cancelled.
01200     if (IsOutOfControlBounds(args.GetCurrentPoint(*this).Position()) ||
01201         args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch)
01202     {
01203         m_isPointerOver = false;
01204     }
01205
01206     m_capturedPointer = nullptr;
01207     ResetTrackedPointerId();
01208     UpdateVisualState(true);
01209 }
01210
01211 bool NavigationViewItem::IsOutOfControlBounds(const winrt::Point& point) {
01212     // This is a conservative check. It is okay to say we are
01213     // out of the bounds when close to the edge to account for rounding.
01214     const auto tolerance = 1.0;
01215     const auto actualWidth = ActualWidth();
01216     const auto actualHeight = ActualHeight();
01217     return point.X < tolerance ||
01218         point.X > actualWidth - tolerance ||
01219         point.Y < tolerance ||
01220         point.Y  > actualHeight - tolerance;
01221 }
01222
01223 void NavigationViewItem::ProcessPointerOver(const winrt::PointerRoutedEventArgs& args)
01224 {
01225     const bool ignorePointerId = IgnorePointerId(args);
01226     NAVIGATIONVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, ignorePointerId);
01227     if (ignorePointerId)
01228     {
01229         return;
01230     }
01231
01232     if (!m_isPointerOver)
01233     {
01234         m_isPointerOver = true;
01235         UpdateVisualState(true);
01236     }
01237 }
01238
01239 void NavigationViewItem::HookInputEvents(const winrt::IControlProtected& controlProtected)
01240 {
01241     winrt::UIElement const presenter = [this, controlProtected]()
01242     {
01243         if (auto presenter = GetTemplateChildT<winrt::NavigationViewItemPresenter>(c_navigationViewItemPresenterName, controlProtected))
01244         {
01245             m_navigationViewItemPresenter.set(presenter);
01246             return presenter.try_as<winrt::UIElement>();
01247         }
01248         // We don't have a presenter, so we are our own presenter.
01249         return this->try_as<winrt::UIElement>();
01250     }();
01251
01252     MUX_ASSERT(presenter);
01253
01254     // Handlers that set flags are skipped when args.Handled is already True.
01255     m_presenterPointerPressedRevoker = presenter.PointerPressed(winrt::auto_revoke, { this, &NavigationViewItem::OnPresenterPointerPressed });
01256     m_presenterPointerEnteredRevoker = presenter.PointerEntered(winrt::auto_revoke, { this, &NavigationViewItem::OnPresenterPointerEntered });
01257     m_presenterPointerMovedRevoker = presenter.PointerMoved(winrt::auto_revoke, { this, &NavigationViewItem::OnPresenterPointerMoved });
01258
01259     // Handlers that reset flags are not skipped when args.Handled is already True to avoid broken states.
01260     m_presenterPointerReleasedRevoker = AddRoutedEventHandler<RoutedEventType::PointerReleased>(
01261         presenter,
01262         { this, &NavigationViewItem::OnPresenterPointerReleased },
01263         true /*handledEventsToo*/);
01264     m_presenterPointerExitedRevoker = AddRoutedEventHandler<RoutedEventType::PointerExited>(
01265         presenter,
01266         { this, &NavigationViewItem::OnPresenterPointerExited },
01267         true /*handledEventsToo*/);
01268     m_presenterPointerCanceledRevoker = AddRoutedEventHandler<RoutedEventType::PointerCanceled>(
01269         presenter,
01270         { this, &NavigationViewItem::OnPresenterPointerCanceled },
01271         true /*handledEventsToo*/);
01272     m_presenterPointerCaptureLostRevoker = AddRoutedEventHandler<RoutedEventType::PointerCaptureLost>(
01273         presenter,
01274         { this, &NavigationViewItem::OnPresenterPointerCaptureLost },
01275         true /*handledEventsToo*/);
01276 }
01277
01278 void NavigationViewItem::UnhookInputEvents()
01279 {
01280     m_presenterPointerPressedRevoker.revoke();
01281     m_presenterPointerEnteredRevoker.revoke();
01282     m_presenterPointerMovedRevoker.revoke();
01283     m_presenterPointerReleasedRevoker.revoke();
01284     m_presenterPointerExitedRevoker.revoke();
01285     m_presenterPointerCanceledRevoker.revoke();
01286     m_presenterPointerCaptureLostRevoker.revoke();
01287 }
01288
01289 void NavigationViewItem::UnhookEventsAndClearFields()
01290 {
01291     UnhookInputEvents();
01292
01293     m_flyoutClosingRevoker.revoke();
01294     m_splitViewIsPaneOpenChangedRevoker.revoke();
01295     m_splitViewDisplayModeChangedRevoker.revoke();
01296     m_splitViewCompactPaneLengthChangedRevoker.revoke();
01297     m_repeaterElementPreparedRevoker.revoke();
01298     m_repeaterElementClearingRevoker.revoke();
01299     m_isEnabledChangedRevoker.revoke();
01300     m_itemsSourceViewCollectionChangedRevoker.revoke();
01301
01302     m_rootGrid.set(nullptr);
01303     m_navigationViewItemPresenter.set(nullptr);
01304     m_toolTip.set(nullptr);
01305     m_repeater.set(nullptr);
01306     m_flyoutContentGrid.set(nullptr);
01307 }
01308
01309 void NavigationViewItem::PrepNavigationViewItem(const winrt::SplitView& splitView)
01310 {
01311     m_splitViewIsPaneOpenChangedRevoker = RegisterPropertyChanged(splitView,
01312         winrt::SplitView::IsPaneOpenProperty(), { this, &NavigationViewItem::OnSplitViewPropertyChanged });
01313     m_splitViewDisplayModeChangedRevoker = RegisterPropertyChanged(splitView,
01314         winrt::SplitView::DisplayModeProperty(), { this, &NavigationViewItem::OnSplitViewPropertyChanged });
01315     m_splitViewCompactPaneLengthChangedRevoker = RegisterPropertyChanged(splitView,
01316         winrt::SplitView::CompactPaneLengthProperty(), { this, &NavigationViewItem::OnSplitViewPropertyChanged });
01317
01318     UpdateCompactPaneLength();
01319     UpdateIsClosedCompact();
01320 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedIconTests Member List

This is the complete list of members for AnimatedIconTests, including all inherited members.
AddingAnimatedIconToGridWithoutAStateDoesNotPropogateState() | AnimatedIconTests | [inline]
CanChangeSourceAfterState() | AnimatedIconTests | [inline]
CanSetStateOnAnimatedIconDirectlyWithoutPropagationToChild() | AnimatedIconTests | [inline]
ChangingSourcePropertyChangesRenderSize() | AnimatedIconTests | [inline]
ChangingVisualTrees() | AnimatedIconTests | [inline]
ForegroundInheritsFromParent() | AnimatedIconTests | [inline]
SettingStateOnGrandParentPropagatesToGrandChildAnimatedIcon() | AnimatedIconTests | [inline]
SettingStateOnParentDoesNotPropagateToChildNonAnimatedIcon() | AnimatedIconTests | [inline]
SettingStateOnParentPropagatesToChildAnimatedIcon() | AnimatedIconTests | [inline]
TransitionFallbackLogic() | AnimatedIconTests | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DisposableUserControl Member List

This is the complete list of members for DisposableUserControl, including all inherited members.
_counter | DisposableUserControl | [private, static]
DisposableUserControl() | DisposableUserControl | [inline]
Number | DisposableUserControl |
NumberProperty | DisposableUserControl | [static]
OpenItems | DisposableUserControl | [static]
~DisposableUserControl() | DisposableUserControl | [inline, private]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/SliderInteraction.idl Source File

  • File List
  • File Members
  • Interactions
  • SliderInteraction

SliderInteraction.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_PREVIEW]
00005 [webhosthidden]
00006 unsealed runtimeclass SliderInteraction :
00007 #ifdef USE_INTERNAL_SDK
00008 Microsoft.UI.Xaml.InteractionBase,
00009 #else
00010 Microsoft.UI.Xaml.DependencyObject,
00011 #endif
00012 Microsoft.UI.Xaml.Data.INotifyPropertyChanged
00013 {
00014     SliderInteraction();
00015
00016     Microsoft.UI.Xaml.Controls.Orientation Orientation { get; set; };
00017     Double Minimum { get; set; };
00018     Double Maximum { get; set; };
00019     Double Position { get; };
00020     Double SmallChange { get; set; };
00021     Double LargeChange { get; set; };
00022 }
00023
00024 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerAutomationPeer.cpp Source File

  • File List
  • File Members
  • PipsPager

PipsPagerAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "PipsPager.h"
00008 #include "PipsPagerAutomationPeer.h"
00009 #include "Utils.h"
00010
00011 #include "PipsPagerAutomationPeer.properties.cpp"
00012
00013 PipsPagerAutomationPeer::PipsPagerAutomationPeer(winrt::PipsPager const& owner)
00014     : ReferenceTracker(owner)
00015 {
00016 }
00017
00018 // IAutomationPeerOverrides
00019 winrt::IInspectable PipsPagerAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00020 {
00021     if (patternInterface == winrt::PatternInterface::Selection)
00022     {
00023         return *this;
00024     }
00025
00026     return __super::GetPatternCore(patternInterface);
00027 }
00028
00029 hstring PipsPagerAutomationPeer::GetClassNameCore()
00030 {
00031     return winrt::hstring_name_of<winrt::PipsPager>();
00032 }
00033
00034 hstring PipsPagerAutomationPeer::GetNameCore()
00035 {
00036     winrt::hstring name = __super::GetNameCore();
00037
00038     if (name.empty())
00039     {
00040         if (const auto pipsPager = Owner().try_as<winrt::PipsPager>())
00041         {
00042             name = SharedHelpers::TryGetStringRepresentationFromObject(pipsPager.GetValue(winrt::AutomationProperties::NameProperty()));
00043         }
00044     }
00045
00046     return name;
00047 }
00048
00049 winrt::AutomationControlType PipsPagerAutomationPeer::GetAutomationControlTypeCore()
00050 {
00051     return winrt::AutomationControlType::Menu;
00052 }
00053
00054 com_ptr<PipsPager> PipsPagerAutomationPeer::GetImpl()
00055 {
00056     com_ptr<PipsPager> impl = nullptr;
00057
00058     if (const auto pipsPager = Owner().try_as<winrt::PipsPager>())
00059     {
00060         impl = winrt::get_self<PipsPager>(pipsPager)->get_strong();
00061     }
00062
00063     return impl;
00064 }
00065
00066 winrt::com_array<winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple> PipsPagerAutomationPeer::GetSelection()
00067 {
00068     if (const auto pager = GetImpl())
00069     {
00070         if (auto pip = pager->GetSelectedItem())
00071         {
00072             if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(pip))
00073             {
00074                 return { ProviderFromPeer(peer) };
00075             }
00076         }
00077     }
00078     return {};
00079 }
00080
00081 void PipsPagerAutomationPeer::RaiseSelectionChanged(double oldIndex, double newIndex)
00082 {
00083     if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
00084     {
00085         RaisePropertyChangedEvent(winrt::SelectionPatternIdentifiers::SelectionProperty(),
00086             winrt::PropertyValue::CreateDouble(oldIndex),
00087             winrt::PropertyValue::CreateDouble(newIndex));
00088     }
00089 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsElementFactory.h Source File

  • File List
  • File Members
  • RadioButtons

RadioButtonsElementFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "common.h"
00006 #include "ElementFactory.h"
00007
00008 class RadioButtonsElementFactory :
00009     public winrt::implements<RadioButtonsElementFactory, ElementFactory>
00010 {
00011 public:
00012     RadioButtonsElementFactory();
00013
00014     void UserElementFactory(const winrt::IInspectable& newValue);
00015     winrt::UIElement GetElementCore(const winrt::ElementFactoryGetArgs& args) override;
00016     void RecycleElementCore(const winrt::ElementFactoryRecycleArgs& args) override;
00017
00018 private:
00019     winrt::IElementFactory m_itemTemplateWrapper{ nullptr };
00020 };
00021
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MonochromaticOverlayPresenter.properties.h Source File

  • File List
  • File Members
  • Generated

MonochromaticOverlayPresenter.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class MonochromaticOverlayPresenterProperties
00008 {
00009 public:
00010     MonochromaticOverlayPresenterProperties();
00011
00012     void ReplacementColor(winrt::Color const& value);
00013     winrt::Color ReplacementColor();
00014
00015     void SourceElement(winrt::UIElement const& value);
00016     winrt::UIElement SourceElement();
00017
00018     static winrt::DependencyProperty ReplacementColorProperty() { return s_ReplacementColorProperty; }
00019     static winrt::DependencyProperty SourceElementProperty() { return s_SourceElementProperty; }
00020
00021     static GlobalDependencyProperty s_ReplacementColorProperty;
00022     static GlobalDependencyProperty s_SourceElementProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026
00027     static void OnReplacementColorPropertyChanged(
00028         winrt::DependencyObject const& sender,
00029         winrt::DependencyPropertyChangedEventArgs const& args);
00030
00031     static void OnSourceElementPropertyChanged(
00032         winrt::DependencyObject const& sender,
00033         winrt::DependencyPropertyChangedEventArgs const& args);
00034 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Category Member List

This is the complete list of members for Category, including all inherited members.
Category(String content, String name, String icon, ObservableCollection< Category > children, bool selectsOnInvoked) | Category | [inline]
Children | Category |
Content | Category |
Icon | Category |
Name | Category |
SelectsOnInvoked | Category |
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RepeaterFocusTests Member List

This is the complete list of members for RepeaterFocusTests, including all inherited members.
CreateAndInitializeRepeater(object itemsSource, VirtualizingLayout layout, ElementFactory elementFactory, ref ItemsRepeater repeater, ref ScrollViewer scrollViewer) | RepeaterFocusTests | [inline, private, static]
GetRealizedRange(ItemsRepeater repeater) | RepeaterFocusTests | [inline, private, static]
ValidateTabNavigation() | RepeaterFocusTests | [inline]
ValidateTabNavigationOrder(ItemsRepeater repeater) | RepeaterFocusTests | [inline, private, static]
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTopNavStorePage Member List

This is the complete list of members for NavigationViewTopNavStorePage, including all inherited members.
AddButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
AddButtonSuppressSelection_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
AddRemoveContentOverlay_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
AppBarButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
ChangeContentOverlayVisibility_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
ChangeSelectionInCode_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
ChangeToIEnumerableButton_Clicks(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
ChangeTopNavVisibility_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
ClearItemInvokedTextButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
contentOverlay | NavigationViewTopNavStorePage | [private]
currentSelectedItem | NavigationViewTopNavStorePage | [private]
EnableSelectionFollowsFocus_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
FlipIsTitleBarAutoPaddingEnabledButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
FlipOrientation_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
GetActiveVisualState_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
GetNavItemActiveNavItemVisualState_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
GetTopPaddingHeightButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
m_menuItems | NavigationViewTopNavStorePage | [private]
MoveContentUnderTopnav_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
MoveContentUnderTopnavTitleBar_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
NavigationViewTopNavStorePage() | NavigationViewTopNavStorePage | [inline]
OnNavigatedFrom(NavigationEventArgs e) | NavigationViewTopNavStorePage | [inline, protected]
OnNavItemInvoked(object sender, NavigationViewItemInvokedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
RemoveButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavStorePage | [inline, private]
suppressSelectionNextNumber | NavigationViewTopNavStorePage | [private]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.h Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemsInfoRequestedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "LinedFlowLayoutItemsInfoRequestedEventArgs.g.h"
00007
00008 class LinedFlowLayoutItemsInfoRequestedEventArgs :
00009     public ReferenceTracker<LinedFlowLayoutItemsInfoRequestedEventArgs, winrt::implementation::LinedFlowLayoutItemsInfoRequestedEventArgsT, winrt::composable, winrt::composing>
00010 {
00011 public:
00012     LinedFlowLayoutItemsInfoRequestedEventArgs(
00013         winrt::LinedFlowLayout const& linedFlowLayout,
00014         int itemsRangeStartIndex,
00015         int itemsRangeRequestedLength);
00016
00017     ~LinedFlowLayoutItemsInfoRequestedEventArgs();
00018
00019 #pragma region ILinedFlowLayoutItemsInfoRequestedEventArgs
00020     int32_t ItemsRangeStartIndex() { return m_itemsRangeStartIndex; }
00021     int32_t ItemsRangeRequestedLength() { return m_itemsRangeRequestedLength; }
00022     double MinWidth() { return m_minWidth; }
00023     double MaxWidth() { return m_maxWidth; }
00024     void ItemsRangeStartIndex(int32_t value);
00025     void MinWidth(double value);
00026     void MaxWidth(double value);
00027     void SetDesiredAspectRatios(winrt::array_view<double const> const& values);
00028     void SetMinWidths(winrt::array_view<double const> const& values);
00029     void SetMaxWidths(winrt::array_view<double const> const& values);
00030 #pragma endregion
00031
00032     int ItemsRangeLength() { return m_itemsRangeLength; }
00033     void ResetLinedFlowLayout() { m_linedFlowLayout.set(nullptr); };
00034
00035 private:
00036     void SetItemsRangeEstablishedLength(int value);
00037
00038     int m_itemsRangeStartIndex{};
00039     int m_itemsRangeRequestedStartIndex{};
00040     int m_itemsRangeEstablishedLength{};
00041     int m_itemsRangeLength{};
00042     int m_itemsRangeRequestedLength{};
00043     double m_minWidth{ -1.0 };
00044     double m_maxWidth{ -1.0 };
00045     tracker_ref<winrt::LinedFlowLayout> m_linedFlowLayout{ this };
00046 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ParallaxViewPage.xaml.cs Source File

  • File List
  • File Members
  • ParallaxView
  • TestUI

ParallaxViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     [TopLevelTestPage(Name = "ParallaxView", Icon = "ParallaxView.png")]
00009     public sealed partial class ParallaxViewPage : TestPage
00010     {
00011         public ParallaxViewPage()
00012         {
00013             this.InitializeComponent();
00014
00015             navigateToSimpleRectangle.Click += delegate { Frame.NavigateWithoutAnimation(typeof(SimpleRectanglePage), 0); };
00016             navigateToStackPanel.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ParallaxViewStackPanelPage), 0); };
00017             navigateToListViewBackground.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewBackgroundPage), 0); };
00018             navigateToVSP.Click += delegate { Frame.NavigateWithoutAnimation(typeof(VirtualizingStackPanelPage), 0); };
00019             navigateToListViewItem.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewItemPage), 0); };
00020             navigateToListViewHeader.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewHeaderPage), 0); };
00021             navigateToText.Click += delegate { Frame.NavigateWithoutAnimation(typeof(TextPage), 0); };
00022             navigateToDynamic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(DynamicPage), 0); };
00023         }
00024     }
00025 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIcon.properties.h Source File

  • File List
  • File Members
  • Generated

AnimatedIcon.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class AnimatedIconProperties
00008 {
00009 public:
00010     AnimatedIconProperties();
00011
00012     void FallbackIconSource(winrt::IconSource const& value);
00013     winrt::IconSource FallbackIconSource();
00014
00015     void MirroredWhenRightToLeft(bool value);
00016     bool MirroredWhenRightToLeft();
00017
00018     void Source(winrt::IAnimatedVisualSource2 const& value);
00019     winrt::IAnimatedVisualSource2 Source();
00020
00021     static void SetState(winrt::DependencyObject const& target, winrt::hstring const& value);
00022     static winrt::hstring GetState(winrt::DependencyObject const& target);
00023
00024     static winrt::DependencyProperty FallbackIconSourceProperty() { return s_FallbackIconSourceProperty; }
00025     static winrt::DependencyProperty MirroredWhenRightToLeftProperty() { return s_MirroredWhenRightToLeftProperty; }
00026     static winrt::DependencyProperty SourceProperty() { return s_SourceProperty; }
00027     static winrt::DependencyProperty StateProperty() { return s_StateProperty; }
00028
00029     static GlobalDependencyProperty s_FallbackIconSourceProperty;
00030     static GlobalDependencyProperty s_MirroredWhenRightToLeftProperty;
00031     static GlobalDependencyProperty s_SourceProperty;
00032     static GlobalDependencyProperty s_StateProperty;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036
00037     static void OnFallbackIconSourcePropertyChanged(
00038         winrt::DependencyObject const& sender,
00039         winrt::DependencyPropertyChangedEventArgs const& args);
00040
00041     static void OnMirroredWhenRightToLeftPropertyChanged(
00042         winrt::DependencyObject const& sender,
00043         winrt::DependencyPropertyChangedEventArgs const& args);
00044
00045     static void OnSourcePropertyChanged(
00046         winrt::DependencyObject const& sender,
00047         winrt::DependencyPropertyChangedEventArgs const& args);
00048 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColumnMajorUniformToLargestGridLayoutProperties Member List

This is the complete list of members for ColumnMajorUniformToLargestGridLayoutProperties, including all inherited members.
ClearProperties() | ColumnMajorUniformToLargestGridLayoutProperties | [static]
ColumnMajorUniformToLargestGridLayoutProperties() | ColumnMajorUniformToLargestGridLayoutProperties |
ColumnSpacing(double value) | ColumnMajorUniformToLargestGridLayoutProperties |
ColumnSpacing() | ColumnMajorUniformToLargestGridLayoutProperties |
ColumnSpacingProperty() | ColumnMajorUniformToLargestGridLayoutProperties | [inline, static]
EnsureProperties() | ColumnMajorUniformToLargestGridLayoutProperties | [static]
MaxColumns(int value) | ColumnMajorUniformToLargestGridLayoutProperties |
MaxColumns() | ColumnMajorUniformToLargestGridLayoutProperties |
MaxColumnsProperty() | ColumnMajorUniformToLargestGridLayoutProperties | [inline, static]
OnColumnSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColumnMajorUniformToLargestGridLayoutProperties | [static]
OnMaxColumnsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColumnMajorUniformToLargestGridLayoutProperties | [static]
OnRowSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColumnMajorUniformToLargestGridLayoutProperties | [static]
RowSpacing(double value) | ColumnMajorUniformToLargestGridLayoutProperties |
RowSpacing() | ColumnMajorUniformToLargestGridLayoutProperties |
RowSpacingProperty() | ColumnMajorUniformToLargestGridLayoutProperties | [inline, static]
s_ColumnSpacingProperty | ColumnMajorUniformToLargestGridLayoutProperties | [static]
s_MaxColumnsProperty | ColumnMajorUniformToLargestGridLayoutProperties | [static]
s_RowSpacingProperty | ColumnMajorUniformToLargestGridLayoutProperties | [static]
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRingTemplateSettings.h Source File

  • File List
  • File Members
  • ProgressRing

ProgressRingTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ProgressRingTemplateSettings.g.h"
00007 #include "ProgressRingTemplateSettings.properties.h"
00008
00009 class ProgressRingTemplateSettings :
00010     public winrt::implementation::ProgressRingTemplateSettingsT<ProgressRingTemplateSettings>,
00011     public ProgressRingTemplateSettingsProperties
00012 {
00013 public:
00014     ProgressRingTemplateSettings();
00015 };
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModelSelectionChangedEventArgs.h Source File

  • File List
  • File Members
  • Repeater

SelectionModelSelectionChangedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SelectionModelSelectionChangedEventArgs.g.h"
00007
00008 class SelectionModelSelectionChangedEventArgs :
00009     public winrt::implementation::SelectionModelSelectionChangedEventArgsT<SelectionModelSelectionChangedEventArgs>
00010 {
00011 public:
00012 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerScrollByRequestedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ScrollPresenterTypeLogging.h"
00008 #include "ScrollControllerScrollByRequestedEventArgs.h"
00009
00010 #include "ScrollControllerScrollByRequestedEventArgs.properties.cpp"
00011
00012 ScrollControllerScrollByRequestedEventArgs::ScrollControllerScrollByRequestedEventArgs(
00013     double offsetDelta,
00014     winrt::ScrollingScrollOptions const& options)
00015 {
00016     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_DBL, METH_NAME, this,
00017         TypeLogging::ScrollOptionsToString(options).c_str(), offsetDelta);
00018
00019     m_offsetDelta = offsetDelta;
00020     m_options = options;
00021 }
00022
00023 double ScrollControllerScrollByRequestedEventArgs::OffsetDelta() const
00024 {
00025     return m_offsetDelta;
00026 }
00027
00028 winrt::ScrollingScrollOptions ScrollControllerScrollByRequestedEventArgs::Options() const
00029 {
00030     return m_options;
00031 }
00032
00033 int32_t ScrollControllerScrollByRequestedEventArgs::CorrelationId() const
00034 {
00035     return m_correlationId;
00036 }
00037
00038 void ScrollControllerScrollByRequestedEventArgs::CorrelationId(int32_t correlationId)
00039 {
00040     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, correlationId);
00041
00042     m_correlationId = correlationId;
00043 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedVisualPlayer Member List

This is the complete list of members for AnimatedVisualPlayer, including all inherited members.
abi_enter() | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
AnimatedVisualPlayer() | AnimatedVisualPlayer |
AnimatedVisualPlayerProperties class | AnimatedVisualPlayer | [friend]
AnimatedVisualPlayerProperties::AnimatedVisualPlayerProperties() | AnimatedVisualPlayerProperties |
AnimationOptimization(winrt::PlayerAnimationOptimization const &value) | AnimatedVisualPlayerProperties |
AnimationOptimization() | AnimatedVisualPlayerProperties |
AnimationOptimizationProperty() | AnimatedVisualPlayerProperties | [inline, static]
ArrangeOverride(winrt::Size const &finalSize) | AnimatedVisualPlayer |
AutoPlay(bool value) | AnimatedVisualPlayerProperties |
AutoPlay() | AnimatedVisualPlayerProperties |
AutoPlayProperty() | AnimatedVisualPlayerProperties | [inline, static]
CheckThread() | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
ClearProperties() | AnimatedVisualPlayerProperties | [static]
CreateAnimations() | AnimatedVisualPlayer | [private]
DeleteInstanceOnUIThread(std::unique_ptr< AnimatedVisualPlayer > &&self) noexcept | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline, static]
DestroyAnimations() | AnimatedVisualPlayer | [private]
Diagnostics(winrt::IInspectable const &value) | AnimatedVisualPlayerProperties |
Diagnostics() | AnimatedVisualPlayerProperties |
DiagnosticsProperty() | AnimatedVisualPlayerProperties | [inline, static]
Duration(winrt::TimeSpan const &value) | AnimatedVisualPlayerProperties |
Duration() | AnimatedVisualPlayerProperties |
DurationProperty() | AnimatedVisualPlayerProperties | [inline, static]
EnsureProperties() | AnimatedVisualPlayerProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
FallbackContent(winrt::DataTemplate const &value) | AnimatedVisualPlayerProperties |
FallbackContent() | AnimatedVisualPlayerProperties |
FallbackContentProperty() | AnimatedVisualPlayerProperties | [inline, static]
final_release(std::unique_ptr< AnimatedVisualPlayer > &&self) | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline, static]
GetBase() | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
GetInner() | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
IsAnimatedVisualLoaded(bool value) | AnimatedVisualPlayerProperties |
IsAnimatedVisualLoaded() | AnimatedVisualPlayerProperties |
IsAnimatedVisualLoadedProperty() | AnimatedVisualPlayerProperties | [inline, static]
IsOnThread() | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
IsPlaying(bool value) | AnimatedVisualPlayerProperties |
IsPlaying() | AnimatedVisualPlayerProperties |
IsPlayingProperty() | AnimatedVisualPlayerProperties | [inline, static]
LoadFallbackContent() | AnimatedVisualPlayer | [private]
m_createAnimationsCounter | AnimatedVisualPlayer | [private]
MeasureOverride(winrt::Size const &availableSize) | AnimatedVisualPlayer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
OnAnimationOptimizationPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayer | [private]
AnimatedVisualPlayerProperties::OnAnimationOptimizationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnAutoPlayPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayer | [private]
AnimatedVisualPlayerProperties::OnAutoPlayPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnCreateAutomationPeer() | AnimatedVisualPlayer |
OnFallbackContentPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayer | [private]
AnimatedVisualPlayerProperties::OnFallbackContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnHiding() | AnimatedVisualPlayer | [private]
OnLoaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | AnimatedVisualPlayer | [private]
OnPlaybackRatePropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayer | [private]
AnimatedVisualPlayerProperties::OnPlaybackRatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnSourcePropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayer | [private]
AnimatedVisualPlayerProperties::OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnStretchPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayer | [private]
AnimatedVisualPlayerProperties::OnStretchPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnUnhiding() | AnimatedVisualPlayer | [private]
OnUnloaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | AnimatedVisualPlayer | [private]
Pause() | AnimatedVisualPlayer |
PlayAsync(double fromProgress, double toProgress, bool looped) | AnimatedVisualPlayer |
PlaybackRate(double value) | AnimatedVisualPlayerProperties |
PlaybackRate() | AnimatedVisualPlayerProperties |
PlaybackRateProperty() | AnimatedVisualPlayerProperties | [inline, static]
ProgressObject() | AnimatedVisualPlayer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< AnimatedVisualPlayer, DeriveFromPanelHelper_base, winrt::AnimatedVisualPlayer, winrt::IAnimatedVisualPlayer2 > | [inline]
Resume() | AnimatedVisualPlayer |
s_AnimationOptimizationProperty | AnimatedVisualPlayerProperties | [static]
s_AutoPlayProperty | AnimatedVisualPlayerProperties | [static]
s_DiagnosticsProperty | AnimatedVisualPlayerProperties | [static]
s_DurationProperty | AnimatedVisualPlayerProperties | [static]
s_FallbackContentProperty | AnimatedVisualPlayerProperties | [static]
s_IsAnimatedVisualLoadedProperty | AnimatedVisualPlayerProperties | [static]
s_IsPlayingProperty | AnimatedVisualPlayerProperties | [static]
s_PlaybackRateProperty | AnimatedVisualPlayerProperties | [static]
s_SourceProperty | AnimatedVisualPlayerProperties | [static]
s_StretchProperty | AnimatedVisualPlayerProperties | [static]
SetFallbackContent(winrt::UIElement const &uiElement) | AnimatedVisualPlayer | [private]
SetProgress(double progress) | AnimatedVisualPlayer |
Source(winrt::IAnimatedVisualSource const &value) | AnimatedVisualPlayerProperties |
Source() | AnimatedVisualPlayerProperties |
SourceProperty() | AnimatedVisualPlayerProperties | [inline, static]
Stop() | AnimatedVisualPlayer |
Stretch(winrt::Stretch const &value) | AnimatedVisualPlayerProperties |
Stretch() | AnimatedVisualPlayerProperties |
StretchProperty() | AnimatedVisualPlayerProperties | [inline, static]
UnloadContent() | AnimatedVisualPlayer | [private]
UnloadFallbackContent() | AnimatedVisualPlayer | [private]
UpdateContent() | AnimatedVisualPlayer | [private]
~AnimatedVisualPlayer() | AnimatedVisualPlayer |
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlTests Member List

This is the complete list of members for PagerControlTests, including all inherited members.
AutoDisplayChangingPageTest() | PagerControlTests | [inline]
AutoDisplayModeThresholdValue | PagerControlTestBase | [protected]
ButtonVisibilityModes enum name | PagerControlTestBase |
ButtonVisibilityOptionsTest(string buttonNamePrefix) | PagerControlTestBase | [inline, protected]
ChangeNumberOfPages() | PagerControlTestBase | [inline, protected]
ChangingDisplayModeTest() | PagerControlTests | [inline]
ClassInitialize(TestContext testContext) | PagerControlTests | [inline, static]
ComboBoxDisplayChangingPageTest() | PagerControlTests | [inline]
DisplayModes enum name | PagerControlTestBase |
elements | PagerControlTestBase | [protected]
FindTextBox(UIObject parent) | PagerControlTestBase | [inline, protected]
FirstPageButtonChangingPageTest() | PagerControlTests | [inline]
FirstPageButtonVisibilityOptionsTest() | PagerControlTests | [inline]
GetCurrentPage() | PagerControlTestBase | [inline, protected]
GetCurrentPageAsInt() | PagerControlTestBase | [inline, protected]
GetLastPage() | PagerControlTestBase | [inline, protected]
GetLastPageAsInt() | PagerControlTestBase | [inline, protected]
GetPreviousPage() | PagerControlTestBase | [inline, protected]
GetPreviousPageAsInt() | PagerControlTestBase | [inline, protected]
IncrementNumberOfPages(int numberOfPagesToAdd) | PagerControlTestBase | [inline, protected]
LastPageButtonChangingPageTest() | PagerControlTests | [inline]
LastPageButtonVisibilityOptionsTest() | PagerControlTests | [inline]
NextPageButtonChangingPageTest() | PagerControlTests | [inline]
NextPageButtonVisibilityOptionsTest() | PagerControlTests | [inline]
NumberBoxDisplayChangingPageTest() | PagerControlTests | [inline]
NumberBoxInfinityModeTest() | PagerControlTests | [inline]
NumberPanelChangingPageTest() | PagerControlTests | [inline]
NumberPanelChangingPageTest2() | PagerControlTests | [inline]
NumberPanelInfiniteItemsTest() | PagerControlTests | [inline]
PreviousPageButtonChangingPageTest() | PagerControlTests | [inline]
PreviousPageButtonVisibilityOptionsTest() | PagerControlTests | [inline]
SelectPageInNumberPanel(int index) | PagerControlTestBase | [inline, protected]
SelectValueInPagerComboBox(int index) | PagerControlTestBase | [inline, protected]
SendValueToNumberBox(string value) | PagerControlTestBase | [inline, protected]
SetAutoDisplayMode() | PagerControlTestBase | [inline, protected]
SetButtonVisibilityModeFunction(ButtonVisibilityModes mode) | PagerControlTestBase | [protected]
SetComboBoxDisplayMode() | PagerControlTestBase | [inline, protected]
SetDisplayMode(string mode) | PagerControlTestBase | [inline, protected]
SetFirstPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
SetLastPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
SetNextPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
SetNumberBoxDisplayMode() | PagerControlTestBase | [inline, protected]
SetNumberPanelDisplayMode() | PagerControlTestBase | [inline, protected]
SetPreviousPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
TestCleanup() | PagerControlTests | [inline]
VerifyAutoDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyAxeScanPasses() | PagerControlTests | [inline]
VerifyButton(UIObject button, Visibility expectedVisibility, bool shouldBeEnabled) | PagerControlTestBase | [inline, protected]
VerifyButtonVisibilitySetInXAMLApplied() | PagerControlTests | [inline]
VerifyComboBoxDisabled() | PagerControlTestBase | [inline, protected]
VerifyComboBoxDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyComboBoxEnabled() | PagerControlTestBase | [inline, protected]
VerifyComboBoxIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyComboBoxVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyDisplayMode(DisplayModes mode) | PagerControlTestBase | [inline, protected]
VerifyFirstPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyFirstPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyLastPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyLastPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyNextPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyNextPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyNumberBoxDisabled() | PagerControlTestBase | [inline, protected]
VerifyNumberBoxDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyNumberBoxEnabled() | PagerControlTestBase | [inline, protected]
VerifyNumberBoxIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyNumberBoxVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyNumberOfPages(string expectedPages) | PagerControlTestBase | [inline, protected]
VerifyNumberPanelContent(string expectedContent) | PagerControlTestBase | [inline, protected]
VerifyNumberPanelDisabled() | PagerControlTestBase | [inline, protected]
VerifyNumberPanelDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyNumberPanelEnabled() | PagerControlTestBase | [inline, protected]
VerifyNumberPanelVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyPageChanged(int expectedPage) | PagerControlTestBase | [inline, protected]
VerifyPreviousPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyPreviousPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealMarkupPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealMarkupPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Composition;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using Microsoft.UI.Xaml.Navigation;
00009 using Microsoft.UI.Private.Media;
00010
00011 namespace MUXControlsTestApp
00012 {
00013     public sealed partial class RevealMarkupPage : TestPage
00014     {
00015         public RevealMarkupPage()
00016         {
00017             this.InitializeComponent();
00018
00019             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00020             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00021         }
00022
00023         protected override void OnNavigatedFrom(NavigationEventArgs e)
00024         {
00025             // Unset all override flags to avoid impacting subsequent tests
00026             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00027             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00028             base.OnNavigatedFrom(e);
00029         }
00030
00031         private void RunTestButton_Clicked(object sender, RoutedEventArgs e)
00032         {
00033             using (var logger = new ResultsLogger("RevealBrushFromMarkup", TestResult))
00034             {
00035                 int globalLightCount = 0;
00036                 const int globalLightCountExpected = 5;
00037                 UIElement visualRoot = GetTopParent(XamlRoot.Content);
00038
00039                 if (visualRoot != null && visualRoot.GetType() == typeof(ScrollViewer))
00040                 {
00041                     globalLightCount = visualRoot.Lights.Count;
00042                 }
00043                 else
00044                 {
00045                     logger.Verify(false, "visualRoot = null or type is not ScrollViewer");
00046                 }
00047
00048                 logger.Verify(globalLightCount == globalLightCountExpected, "globalLightCount: " + globalLightCount + ", expected: " + globalLightCountExpected);
00049             }
00050         }
00051
00052         private UIElement GetTopParent(UIElement current)
00053         {
00054             UIElement parent = current;
00055             do
00056             {
00057                 current = parent;
00058                 parent = (UIElement)VisualTreeHelper.GetParent(current);
00059             } while (parent != null);
00060
00061             return current;
00062         }
00063     }
00064 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IRepeaterScrollingSurface Member List

This is the complete list of members for IRepeaterScrollingSurface, including all inherited members.
ConfigurationChanged | IRepeaterScrollingSurface
GetRelativeViewport(Microsoft.UI.Xaml.UIElement child) | IRepeaterScrollingSurface
PostArrange | IRepeaterScrollingSurface
RegisterAnchorCandidate(Microsoft.UI.Xaml.UIElement element) | IRepeaterScrollingSurface
UnregisterAnchorCandidate(Microsoft.UI.Xaml.UIElement element) | IRepeaterScrollingSurface
ViewportChanged | IRepeaterScrollingSurface
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImageIRefreshInfoProviderAdapter Member List

This is the complete list of members for ImageIRefreshInfoProviderAdapter, including all inherited members.
Adapt(Image image, Size visualizerSize) | ImageIRefreshInfoProviderAdapter | [inline]
AdaptFromTree(UIElement root, Size visualizerSize) | ImageIRefreshInfoProviderAdapter | [inline]
AdaptFromTreeRecursiveHelper(DependencyObject root, int depth) | ImageIRefreshInfoProviderAdapter | [inline, private]
animationHandler | ImageIRefreshInfoProviderAdapter | [private]
image | ImageIRefreshInfoProviderAdapter | [private]
ImageIRefreshInfoProviderAdapter(RefreshPullDirection refreshPullDirection, IAdapterAnimationHandler animationHandler) | ImageIRefreshInfoProviderAdapter | [inline]
infoProvider | ImageIRefreshInfoProviderAdapter | [private]
InfoProvider_RefreshCompleted(object sender, object e) | ImageIRefreshInfoProviderAdapter | [inline, private]
InfoProvider_RefreshStarted(object sender, object e) | ImageIRefreshInfoProviderAdapter | [inline, private]
interactionTracker | ImageIRefreshInfoProviderAdapter | [private]
IsOrientationVertical() | ImageIRefreshInfoProviderAdapter | [inline, private]
OnImagePointerPressed(object sender, PointerRoutedEventArgs e) | ImageIRefreshInfoProviderAdapter | [inline, private]
refreshPullDirection | ImageIRefreshInfoProviderAdapter | [private]
SetAnimations(UIElement refreshVisualizerAnimatableContainer) | ImageIRefreshInfoProviderAdapter | [inline]
visualInteractionSource | ImageIRefreshInfoProviderAdapter | [private]
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpectrumBrushProperties Member List

This is the complete list of members for SpectrumBrushProperties, including all inherited members.
ClearProperties() | SpectrumBrushProperties | [static]
EnsureProperties() | SpectrumBrushProperties | [static]
MaxSurface(winrt::LoadedImageSurface const &value) | SpectrumBrushProperties |
MaxSurface() | SpectrumBrushProperties |
MaxSurfaceOpacity(double value) | SpectrumBrushProperties |
MaxSurfaceOpacity() | SpectrumBrushProperties |
MaxSurfaceOpacityProperty() | SpectrumBrushProperties | [inline, static]
MaxSurfaceProperty() | SpectrumBrushProperties | [inline, static]
MinSurface(winrt::LoadedImageSurface const &value) | SpectrumBrushProperties |
MinSurface() | SpectrumBrushProperties |
MinSurfaceProperty() | SpectrumBrushProperties | [inline, static]
OnMaxSurfaceOpacityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SpectrumBrushProperties | [static]
OnMaxSurfacePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SpectrumBrushProperties | [static]
OnMinSurfacePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SpectrumBrushProperties | [static]
s_MaxSurfaceOpacityProperty | SpectrumBrushProperties | [static]
s_MaxSurfaceProperty | SpectrumBrushProperties | [static]
s_MinSurfaceProperty | SpectrumBrushProperties | [static]
SpectrumBrushProperties() | SpectrumBrushProperties |
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CustomItemsSourceViewWithUniqueIdMapping Member List

This is the complete list of members for CustomItemsSourceViewWithUniqueIdMapping, including all inherited members.
Add(object value) | CustomItemsSourceView | [inline]
Clear() | CustomItemsSourceView | [inline]
CollectionChanged | CustomItemsSourceView |
Contains(object value) | CustomItemsSourceView | [inline]
CopyTo(Array array, int index) | CustomItemsSourceView | [inline]
Count | CustomItemsSourceView |
GetAtCore(int index) | CustomItemsSourceView | [inline, protected, virtual]
GetEnumerator() | CustomItemsSourceView | [inline]
GetSizeCore() | CustomItemsSourceView | [inline, protected, virtual]
IndexFromKey(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
IndexFromKeyCore(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline, protected, virtual]
IndexOf(object value) | CustomItemsSourceView | [inline]
Insert(int index, object value) | CustomItemsSourceView | [inline]
IsFixedSize | CustomItemsSourceView |
IsReadOnly | CustomItemsSourceView |
IsSynchronized | CustomItemsSourceView |
KeyFromIndex(int index) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
KeyFromIndexCore(int index) | CustomItemsSourceViewWithUniqueIdMapping | [inline, protected, virtual]
OnItemsSourceChanged(NotifyCollectionChangedEventArgs args) | CustomItemsSourceView | [inline, protected]
Remove(object value) | CustomItemsSourceView | [inline]
RemoveAt(int index) | CustomItemsSourceView | [inline]
SyncRoot | CustomItemsSourceView |
this | CustomItemsSourceView |
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ParallaxView.h Source File

  • File List
  • File Members
  • ParallaxView

ParallaxView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollInputHelper.h"
00007
00008 #include "ParallaxView.g.h"
00009 #include "ParallaxView.properties.h"
00010
00011 class ParallaxView :
00012     public ReferenceTracker<ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView>,
00013     public ParallaxViewProperties
00014 {
00015 public:
00016     ParallaxView();
00017     ~ParallaxView();
00018
00019 #pragma region IFrameworkElementOverridesHelper
00020     // IFrameworkElementOverrides (unoverridden methods provided by FrameworkElementOverridesHelper)
00021     winrt::Size MeasureOverride(winrt::Size const& availableSize); // not actually final for 'derived' classes
00022     winrt::Size ArrangeOverride(winrt::Size const& finalSize); // not actually final for 'derived' classes
00023 #pragma endregion
00024
00025
00026     void RefreshAutomaticHorizontalOffsets();
00027     void RefreshAutomaticVerticalOffsets();
00028
00029     // Invoked when a dependency property of this ParallaxView has changed.
00030     void OnPropertyChanged(
00031         const winrt::DependencyPropertyChangedEventArgs& args);
00032
00033     // Invoked by ScrollInputHelper when a characteristic changes requires a re-evaluation of the parallaxing expression animations.
00034     void OnScrollInputHelperInfoChanged(
00035         bool horizontalInfoChanged, bool verticalInfoChanged);
00036
00037 private:
00038     static wstring_view GetVisualTargetedPropertyName(winrt::Orientation orientation);
00039
00040     void EnsureAnimatedVariables();
00041     void UpdateStartOffsetExpression(winrt::Orientation orientation);
00042     void UpdateEndOffsetExpression(winrt::Orientation orientation);
00043     void UpdateExpressionAnimation(winrt::Orientation orientation);
00044     void UpdateChild(const winrt::UIElement& oldChild, const winrt::UIElement& newChild);
00045
00046     void HookLoaded();
00047     void HookSizeChanged();
00048     void HookChildPropertyChanged(const winrt::FrameworkElement& child);
00049     void UnhookChildPropertyChanged(bool isInDestructor);
00050
00051     // Event handlers
00052     void OnLoaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00053     void OnSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00054     void OnChildPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00055
00056 private:
00057     std::shared_ptr<ScrollInputHelper> m_scrollInputHelper{ nullptr };
00058     winrt::Visual m_targetVisual{ nullptr };
00059     winrt::CompositionPropertySet m_animatedVariables{ nullptr };
00060     winrt::ExpressionAnimation m_horizontalSourceStartOffsetExpression{ nullptr };
00061     winrt::ExpressionAnimation m_horizontalSourceEndOffsetExpression{ nullptr };
00062     winrt::ExpressionAnimation m_verticalSourceStartOffsetExpression{ nullptr };
00063     winrt::ExpressionAnimation m_verticalSourceEndOffsetExpression{ nullptr };
00064     winrt::ExpressionAnimation m_horizontalParallaxExpressionInternal{ nullptr };
00065     winrt::ExpressionAnimation m_verticalParallaxExpressionInternal{ nullptr };
00066     bool m_isHorizontalAnimationStarted{ false };
00067     bool m_isVerticalAnimationStarted{ false };
00068
00069     // Event Tokens
00070     winrt::event_token m_loadedToken{ 0 };
00071     winrt::event_token m_sizeChangedToken{ 0 };
00072     winrt::event_token m_childHorizontalAlignmentChangedToken{ 0 };
00073     winrt::event_token m_childVerticalAlignmentChangedToken{ 0 };
00074     tracker_ref<winrt::FrameworkElement> m_currentListeningChild{ this };
00075
00076     // Property names being targeted for the ParallaxView.Child's Visual.
00077     // RedStone v1 case:
00078     static constexpr wstring_view s_transformMatrixTranslateXPropertyName{ L"TransformMatrix._41"sv };
00079     static constexpr wstring_view s_transformMatrixTranslateYPropertyName{ L"TransformMatrix._42"sv };
00080     // RedStone v2 and higher case:
00081     static constexpr wstring_view s_translationPropertyName{ L"Translation"sv };
00082     static constexpr wstring_view s_translationXPropertyName{ L"Translation.X"sv };
00083     static constexpr wstring_view s_translationYPropertyName{ L"Translation.Y"sv };
00084 };
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

event_source< T > Member List

This is the complete list of members for event_source< T >, including all inherited members.
add(const T &value) | event_base< event_source< T >, T, tracker_ref< T > > | [inline]
event_base(const event_base &) | event_base< event_source< T >, T, tracker_ref< T > > |
event_base() | event_base< event_source< T >, T, tracker_ref< T > > |
event_source(ITrackerHandleManager *owner) | event_source< T > | [inline]
m_handlers | event_base< event_source< T >, T, tracker_ref< T > > | [protected]
operator bool() const noexcept | event_base< event_source< T >, T, tracker_ref< T > > | [inline, explicit]
operator()(A const &...args) const | event_base< event_source< T >, T, tracker_ref< T > > | [inline]
operator=(const event_base &) | event_base< event_source< T >, T, tracker_ref< T > > |
ReferenceTrackerContainerBase(ITrackerHandleManager *owner) | ReferenceTrackerContainerBase | [inline]
remove(const winrt::event_token token) | event_base< event_source< T >, T, tracker_ref< T > > | [inline]
unwrap(const tracker_ref< T > &holder) const | ReferenceTrackerStorageHelper< event_source< T >, T > | [inline]
wrap(const T &value) const | ReferenceTrackerStorageHelper< event_source< T >, T > | [inline]
~event_base() | event_base< event_source< T >, T, tracker_ref< T > > | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTestHooks.cpp Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipTestHooks.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TeachingTipTestHooks.h"
00007
00008 #include "TeachingTipTestHooks.properties.cpp"
00009
00010 com_ptr<TeachingTipTestHooks> TeachingTipTestHooks::s_testHooks{};
00011
00012 com_ptr<TeachingTipTestHooks> TeachingTipTestHooks::EnsureGlobalTestHooks()
00013 {
00014     static bool s_initialized = []() {
00015         s_testHooks = winrt::make_self<TeachingTipTestHooks>();
00016         return true;
00017     }();
00018     return s_testHooks;
00019 }
00020
00021 void TeachingTipTestHooks::SetExpandEasingFunction(const winrt::TeachingTip& teachingTip, const winrt::CompositionEasingFunction& easingFunction)
00022 {
00023     if (teachingTip && easingFunction)
00024     {
00025         winrt::get_self<TeachingTip>(teachingTip)->SetExpandEasingFunction(easingFunction);
00026     }
00027 }
00028
00029 void TeachingTipTestHooks::SetContractEasingFunction(const winrt::TeachingTip& teachingTip, const winrt::CompositionEasingFunction& easingFunction)
00030 {
00031     if (teachingTip && easingFunction)
00032     {
00033         winrt::get_self<TeachingTip>(teachingTip)->SetContractEasingFunction(easingFunction);
00034     }
00035 }
00036
00037 void TeachingTipTestHooks::SetTipShouldHaveShadow(const winrt::TeachingTip& teachingTip, bool tipShouldHaveShadow)
00038 {
00039     if (teachingTip)
00040     {
00041         winrt::get_self<TeachingTip>(teachingTip)->SetTipShouldHaveShadow(tipShouldHaveShadow);
00042     }
00043 }
00044
00045 void TeachingTipTestHooks::SetContentElevation(const winrt::TeachingTip& teachingTip, float elevation)
00046 {
00047     if (teachingTip)
00048     {
00049         winrt::get_self<TeachingTip>(teachingTip)->SetContentElevation(elevation);
00050     }
00051 }
00052
00053 void TeachingTipTestHooks::SetTailElevation(const winrt::TeachingTip& teachingTip, float elevation)
00054 {
00055     if (teachingTip)
00056     {
00057         winrt::get_self<TeachingTip>(teachingTip)->SetTailElevation(elevation);
00058     }
00059 }
00060
00061 void TeachingTipTestHooks::SetUseTestWindowBounds(const winrt::TeachingTip& teachingTip, bool useTestWindowBounds)
00062 {
00063     if (teachingTip)
00064     {
00065         winrt::get_self<TeachingTip>(teachingTip)->SetUseTestWindowBounds(useTestWindowBounds);
00066     }
00067 }
00068
00069 void TeachingTipTestHooks::SetTestWindowBounds(const winrt::TeachingTip& teachingTip, const winrt::Rect& testWindowBounds)
00070 {
00071     if (teachingTip)
00072     {
00073         winrt::get_self<TeachingTip>(teachingTip)->SetTestWindowBounds(testWindowBounds);
00074     }
00075 }
00076
00077 void TeachingTipTestHooks::SetUseTestScreenBounds(const winrt::TeachingTip& teachingTip, bool useTestScreenBounds)
00078 {
00079     if (teachingTip)
00080     {
00081         winrt::get_self<TeachingTip>(teachingTip)->SetUseTestScreenBounds(useTestScreenBounds);
00082     }
00083 }
00084
00085 void TeachingTipTestHooks::SetTestScreenBounds(const winrt::TeachingTip& teachingTip, const winrt::Rect& testScreenBounds)
00086 {
00087     if (teachingTip)
00088     {
00089         winrt::get_self<TeachingTip>(teachingTip)->SetTestScreenBounds(testScreenBounds);
00090     }
00091 }
00092
00093 void TeachingTipTestHooks::SetTipFollowsTarget(const winrt::TeachingTip& teachingTip, bool tipFollowsTarget)
00094 {
00095     if (teachingTip)
00096     {
00097         winrt::get_self<TeachingTip>(teachingTip)->SetTipFollowsTarget(tipFollowsTarget);
00098     }
00099 }
00100
00101 void TeachingTipTestHooks::SetReturnTopForOutOfWindowPlacement(const winrt::TeachingTip& teachingTip, bool returnTopForOutOfWindowPlacement)
00102 {
00103     if (teachingTip)
00104     {
00105         winrt::get_self<TeachingTip>(teachingTip)->SetReturnTopForOutOfWindowPlacement(returnTopForOutOfWindowPlacement);
00106     }
00107 }
00108
00109 void TeachingTipTestHooks::SetExpandAnimationDuration(const winrt::TeachingTip& teachingTip, const winrt::TimeSpan& expandAnimationDuration)
00110 {
00111     if (teachingTip)
00112     {
00113         winrt::get_self<TeachingTip>(teachingTip)->SetExpandAnimationDuration(expandAnimationDuration);
00114     }
00115 }
00116
00117 void TeachingTipTestHooks::SetContractAnimationDuration(const winrt::TeachingTip& teachingTip, const winrt::TimeSpan& contractAnimationDuration)
00118 {
00119     if (teachingTip)
00120     {
00121         winrt::get_self<TeachingTip>(teachingTip)->SetContractAnimationDuration(contractAnimationDuration);
00122     }
00123 }
00124
00125 void TeachingTipTestHooks::NotifyOpenedStatusChanged(const winrt::TeachingTip& sender)
00126 {
00127     auto hooks = EnsureGlobalTestHooks();
00128     if (hooks->m_openedStatusChangedEventSource)
00129     {
00130         hooks->m_openedStatusChangedEventSource(sender, nullptr);
00131     }
00132 }
00133
00134 winrt::event_token TeachingTipTestHooks::OpenedStatusChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00135 {
00136     auto hooks = EnsureGlobalTestHooks();
00137     return hooks->m_openedStatusChangedEventSource.add(value);
00138 }
00139
00140 void TeachingTipTestHooks::OpenedStatusChanged(winrt::event_token const& token)
00141 {
00142     auto hooks = EnsureGlobalTestHooks();
00143     hooks->m_openedStatusChangedEventSource.remove(token);
00144 }
00145
00146 void TeachingTipTestHooks::NotifyIdleStatusChanged(const winrt::TeachingTip& sender)
00147 {
00148     auto hooks = EnsureGlobalTestHooks();
00149     if (hooks->m_idleStatusChangedEventSource)
00150     {
00151         hooks->m_idleStatusChangedEventSource(sender, nullptr);
00152     }
00153 }
00154
00155 winrt::event_token TeachingTipTestHooks::IdleStatusChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00156 {
00157     auto hooks = EnsureGlobalTestHooks();
00158     return hooks->m_idleStatusChangedEventSource.add(value);
00159 }
00160
00161 void TeachingTipTestHooks::IdleStatusChanged(winrt::event_token const& token)
00162 {
00163     auto hooks = EnsureGlobalTestHooks();
00164     hooks->m_idleStatusChangedEventSource.remove(token);
00165 }
00166
00167
00168 bool TeachingTipTestHooks::GetIsIdle(const winrt::TeachingTip& teachingTip)
00169 {
00170     if (teachingTip)
00171     {
00172         return winrt::get_self<TeachingTip>(teachingTip)->GetIsIdle();
00173     }
00174     return true;
00175 }
00176
00177 void TeachingTipTestHooks::NotifyEffectivePlacementChanged(const winrt::TeachingTip& sender)
00178 {
00179     auto hooks = EnsureGlobalTestHooks();
00180     if (hooks->m_effectivePlacementChangedEventSource)
00181     {
00182         hooks->m_effectivePlacementChangedEventSource(sender, nullptr);
00183     }
00184 }
00185
00186 winrt::event_token TeachingTipTestHooks::EffectivePlacementChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00187 {
00188     auto hooks = EnsureGlobalTestHooks();
00189     return hooks->m_effectivePlacementChangedEventSource.add(value);
00190 }
00191
00192 void TeachingTipTestHooks::EffectivePlacementChanged(winrt::event_token const& token)
00193 {
00194     auto hooks = EnsureGlobalTestHooks();
00195     hooks->m_effectivePlacementChangedEventSource.remove(token);
00196 }
00197
00198 winrt::TeachingTipPlacementMode TeachingTipTestHooks::GetEffectivePlacement(const winrt::TeachingTip& teachingTip)
00199 {
00200     if (teachingTip)
00201     {
00202         return winrt::get_self<TeachingTip>(teachingTip)->GetEffectivePlacement();
00203     }
00204     return winrt::TeachingTipPlacementMode::Auto;
00205 }
00206
00207 void TeachingTipTestHooks::NotifyEffectiveHeroContentPlacementChanged(const winrt::TeachingTip& sender)
00208 {
00209     auto hooks = EnsureGlobalTestHooks();
00210     if (hooks->m_effectiveHeroContentPlacementChangedEventSource)
00211     {
00212         hooks->m_effectiveHeroContentPlacementChangedEventSource(sender, nullptr);
00213     }
00214 }
00215
00216 winrt::event_token TeachingTipTestHooks::EffectiveHeroContentPlacementChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00217 {
00218     auto hooks = EnsureGlobalTestHooks();
00219     return hooks->m_effectiveHeroContentPlacementChangedEventSource.add(value);
00220 }
00221
00222 void TeachingTipTestHooks::EffectiveHeroContentPlacementChanged(winrt::event_token const& token)
00223 {
00224     auto hooks = EnsureGlobalTestHooks();
00225     hooks->m_effectiveHeroContentPlacementChangedEventSource.remove(token);
00226 }
00227
00228 winrt::TeachingTipHeroContentPlacementMode TeachingTipTestHooks::GetEffectiveHeroContentPlacement(const winrt::TeachingTip& teachingTip)
00229 {
00230     if (teachingTip)
00231     {
00232         return winrt::get_self<TeachingTip>(teachingTip)->GetEffectiveHeroContentPlacement();
00233     }
00234     return winrt::TeachingTipHeroContentPlacementMode::Auto;
00235 }
00236
00237 void TeachingTipTestHooks::NotifyOffsetChanged(const winrt::TeachingTip& sender)
00238 {
00239     auto hooks = EnsureGlobalTestHooks();
00240     if (hooks->m_offsetChangedEventSource)
00241     {
00242         hooks->m_offsetChangedEventSource(sender, nullptr);
00243     }
00244 }
00245
00246 winrt::event_token TeachingTipTestHooks::OffsetChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00247 {
00248     auto hooks = EnsureGlobalTestHooks();
00249     return hooks->m_offsetChangedEventSource.add(value);
00250 }
00251
00252 void TeachingTipTestHooks::OffsetChanged(winrt::event_token const& token)
00253 {
00254     auto hooks = EnsureGlobalTestHooks();
00255     hooks->m_offsetChangedEventSource.remove(token);
00256 }
00257
00258 void TeachingTipTestHooks::NotifyTitleVisibilityChanged(const winrt::TeachingTip& sender)
00259 {
00260     auto hooks = EnsureGlobalTestHooks();
00261     if (hooks->m_titleVisibilityChangedEventSource)
00262     {
00263         hooks->m_titleVisibilityChangedEventSource(sender, nullptr);
00264     }
00265 }
00266
00267 winrt::event_token TeachingTipTestHooks::TitleVisibilityChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00268 {
00269     auto hooks = EnsureGlobalTestHooks();
00270     return hooks->m_titleVisibilityChangedEventSource.add(value);
00271 }
00272
00273 void TeachingTipTestHooks::TitleVisibilityChanged(winrt::event_token const& token)
00274 {
00275     auto hooks = EnsureGlobalTestHooks();
00276     hooks->m_titleVisibilityChangedEventSource.remove(token);
00277 }
00278
00279 void TeachingTipTestHooks::NotifySubtitleVisibilityChanged(const winrt::TeachingTip& sender)
00280 {
00281     auto hooks = EnsureGlobalTestHooks();
00282     if (hooks->m_subtitleVisibilityChangedEventSource)
00283     {
00284         hooks->m_subtitleVisibilityChangedEventSource(sender, nullptr);
00285     }
00286 }
00287
00288 winrt::event_token TeachingTipTestHooks::SubtitleVisibilityChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00289 {
00290     auto hooks = EnsureGlobalTestHooks();
00291     return hooks->m_subtitleVisibilityChangedEventSource.add(value);
00292 }
00293
00294 void TeachingTipTestHooks::SubtitleVisibilityChanged(winrt::event_token const& token)
00295 {
00296     auto hooks = EnsureGlobalTestHooks();
00297     hooks->m_subtitleVisibilityChangedEventSource.remove(token);
00298 }
00299
00300 double TeachingTipTestHooks::GetVerticalOffset(const winrt::TeachingTip& teachingTip)
00301 {
00302     if (teachingTip)
00303     {
00304         return winrt::get_self<TeachingTip>(teachingTip)->GetVerticalOffset();
00305     }
00306     return 0.0;
00307 }
00308
00309 double TeachingTipTestHooks::GetHorizontalOffset(const winrt::TeachingTip& teachingTip)
00310 {
00311     if (teachingTip)
00312     {
00313         return winrt::get_self<TeachingTip>(teachingTip)->GetHorizontalOffset();
00314     }
00315     return 0.0;
00316 }
00317
00318 winrt::Visibility TeachingTipTestHooks::GetTitleVisibility(const winrt::TeachingTip& teachingTip)
00319 {
00320     if (teachingTip)
00321     {
00322         return winrt::get_self<TeachingTip>(teachingTip)->GetTitleVisibility();
00323     }
00324     return winrt::Visibility::Collapsed;
00325 }
00326
00327 winrt::Visibility TeachingTipTestHooks::GetSubtitleVisibility(const winrt::TeachingTip& teachingTip)
00328 {
00329     if (teachingTip)
00330     {
00331         return winrt::get_self<TeachingTip>(teachingTip)->GetSubtitleVisibility();
00332     }
00333     return winrt::Visibility::Collapsed;
00334 }
00335
00336 winrt::Popup TeachingTipTestHooks::GetPopup(const winrt::TeachingTip& teachingTip)
00337 {
00338     if (teachingTip)
00339     {
00340         return winrt::get_self<TeachingTip>(teachingTip)->m_popup.get();
00341     }
00342     return nullptr;
00343 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GridViewPage Member List

This is the complete list of members for GridViewPage, including all inherited members.
GridViewPage() GridViewPage [inline]
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PullToRefreshPage Member List

This is the complete list of members for PullToRefreshPage, including all inherited members.
PullToRefreshPage() PullToRefreshPage [inline]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealHoverLight.properties.cpp Source File

  • File List
  • File Members
  • Generated

RevealHoverLight.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RevealHoverLight.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Media
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RevealHoverLight)
00012 }
00013
00014 #include "RevealHoverLight.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/AnimationSamples/AnimationsDemoPage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • AnimationSamples

AnimationsDemoPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Samples.Model;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Linq;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Media.Imaging;
00011 using Microsoft.UI.Private.Controls;
00012 using MUXControlsTestApp.Utils;
00013
00014 namespace MUXControlsTestApp.Samples
00015 {
00016     public sealed partial class AnimationsDemoPage : Page
00017     {
00018         private string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00019         private ResetableCollection<RecipeGroup> _groups;
00020         private DelegatingItemsSource _dataSource;
00021         private Random _rnd = new Random(12345);
00022
00023         public AnimationsDemoPage()
00024         {
00025             InitializeComponent();
00026
00027             _groups = new ResetableCollection<RecipeGroup>(Enumerable.Range(0, 10).Select(j =>
00028                 new RecipeGroup(
00029                     Enumerable.Range(0, _rnd.Next(5, 16)).Select(k => CreateRecipe(j, k)))
00030                 {
00031                     Name = "Group #" + j
00032                 }));
00033
00034             _dataSource = new DelegatingItemsSource(_groups);
00035
00036             Func<DelegatingItemsSource, int, string> KeyFromIndexFunc = (ds, index) => ds.GetAt(index).ToString();
00037
00038             repeater.ItemsSource = _dataSource;
00039             _dataSource.KeyFromIndexFunc = KeyFromIndexFunc;
00040
00041             repeater.Layout = new StackLayout();
00042             var generator = new AnimationElementFactory(
00043                 (DataTemplate)Resources["RecipeGroupTemplate"],
00044                 (DataTemplate)Resources["RecipeTemplate"],
00045                 (ItemCollectionTransitionProvider)Resources["SharedTransitionProvider"],
00046                 KeyFromIndexFunc);
00047             repeater.ItemTemplate = generator;
00048             goBack.Click += delegate { Frame.GoBack(); };
00049
00050             commands.KeyDown += (s, e) =>
00051             {
00052                 if (e.Key == Windows.System.VirtualKey.Enter)
00053                 {
00054                     e.Handled = true;
00055                     ProcessCommands(commands.Text.ToLowerInvariant());
00056                 }
00057             };
00058
00059             stackLayout.Checked += delegate { generator.IsInnerLayoutGrid = false; };
00060             gridLayout.Checked += delegate { generator.IsInnerLayoutGrid = true; };
00061             withUniqueId.Checked += delegate { generator.UpdateInnerLayouts(); };
00062             withoutUniqueId.Checked += delegate { generator.UpdateInnerLayouts(); };
00063
00064             animationSlowdown.ValueChanged += delegate
00065             {
00066                 //ItemCollectionTransitionProvider.AnimationSlowdownFactor = animationSlowdown.Value;
00067             };
00068         }
00069
00070         private void ProcessCommands(string commands)
00071         {
00072             var commandsList = commands.Split(',');
00073             foreach (var command in commandsList)
00074             {
00075                 ProcessCommand(command);
00076             }
00077         }
00078
00079         private void ProcessCommand(string command)
00080         {
00081             if (command.StartsWith("add")) ProcessAddCommand(command);
00082             else if (command.StartsWith("rem")) ProcessRemoveCommand(command);
00083             else if (command.StartsWith("res")) ProcessResetCommand(command);
00084             else if (command.StartsWith("clr")) ProcessClearCommand(command);
00085         }
00086
00087         private void ProcessAddCommand(string command)
00088         {
00089             // Examples: add5w2, add5.7
00090             var args = command.Substring(3, command.Length - 3).Split('w');
00091             var indexPath = args[0];
00092             int[] indices = indexPath.Split('.').Select(i => int.Parse(i)).ToArray();
00093             if (indices.Length == 1)
00094             {
00095                 var groupIndex = indices[0];
00096                 var itemsCount = args.Length == 2 ? int.Parse(args[1]) : 0;
00097                 var newGroup = new RecipeGroup(Enumerable.Range(0, itemsCount).Select(i => CreateRecipe(groupIndex, i)))
00098                 {
00099                     Name = string.Format("Group #{0}", _groups.Count)
00100                 };
00101
00102                 if (groupIndex == _groups.Count) _groups.Add(newGroup);
00103                 else _groups.Insert(groupIndex, newGroup);
00104             }
00105             else if (indices.Length == 2)
00106             {
00107                 var groupIndex = indices[0];
00108                 var recipeIndex = indices[1];
00109                 var group = _groups[groupIndex];
00110                 var newRecipe = CreateRecipe(groupIndex, group.Count);
00111
00112                 if (recipeIndex == group.Count) group.Add(newRecipe);
00113                 else group.Insert(recipeIndex, newRecipe);
00114             }
00115         }
00116
00117         private void ProcessRemoveCommand(string command)
00118         {
00119             // Examples: rem5, rem5.7
00120             var indexPath = command.Substring(3, command.Length - 3);
00121             int[] indices = indexPath.Split('.').Select(i => int.Parse(i)).ToArray();
00122             var groupIndex = indices[0];
00123             if (indices.Length == 1)
00124             {
00125                 _groups.RemoveAt(groupIndex);
00126             }
00127             else if (indices.Length == 2)
00128             {
00129                 var itemIndex = indices[1];
00130                 var group = _groups[groupIndex];
00131                 group.RemoveAt(itemIndex);
00132             }
00133         }
00134
00135         private void ProcessResetCommand(string command)
00136         {
00137             // Examples: res, res5
00138             if (command == "res")
00139             {
00140                 // Shuffles+add+remove
00141                 _groups.ShuffleAndReset();
00142             }
00143             else
00144             {
00145                 var groupIndex = int.Parse(command.Substring(3, command.Length - 3));
00146                 var group = _groups[groupIndex];
00147                 group.ShuffleAndReset();
00148             }
00149         }
00150
00151         private void ProcessClearCommand(string command)
00152         {
00153             // Examples: clr, clr5
00154             if (command == "clr")
00155             {
00156                 _groups.Clear();
00157             }
00158             else
00159             {
00160                 var groupIndex = int.Parse(command.Substring(3, command.Length - 3));
00161                 _groups[groupIndex].Clear();
00162             }
00163         }
00164
00165
00166         private Recipe CreateRecipe(int groupIndex, int itemIndex)
00167         {
00168             return new Recipe
00169             {
00170                 ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", itemIndex % 8 + 1)),
00171                 Description = _lorem.Substring(0, _rnd.Next(200, 650))
00172             };
00173         }
00174
00175         private class AnimationElementFactory : ElementFactory
00176         {
00177             private DataTemplate _groupTemplate;
00178             private DataTemplate _recipeTemplate;
00179             private ItemCollectionTransitionProvider _transitionProvider;
00180             private RecyclePool _recyclePool = new RecyclePool();
00181             private List<ItemsRepeater> _innerRepeaters = new List<ItemsRepeater>();
00182             private Func<DelegatingItemsSource, int, string> _KeyFromIndexFunc;
00183             private bool _isInnerLayoutGrid;
00184
00185
00186             public bool IsInnerLayoutGrid
00187             {
00188                 get { return _isInnerLayoutGrid; }
00189                 set
00190                 {
00191                     if (_isInnerLayoutGrid != value)
00192                     {
00193                         _isInnerLayoutGrid = value;
00194                         UpdateInnerLayouts();
00195                     }
00196                 }
00197             }
00198
00199             public AnimationElementFactory(
00200                 DataTemplate groupTemplate,
00201                 DataTemplate recipeTemplate,
00202                 ItemCollectionTransitionProvider transitionProvider,
00203                 Func<DelegatingItemsSource, int, string> KeyFromIndexFunc)
00204             {
00205                 _groupTemplate = groupTemplate;
00206                 _recipeTemplate = recipeTemplate;
00207                 _transitionProvider = transitionProvider;
00208                 _KeyFromIndexFunc = KeyFromIndexFunc;
00209             }
00210
00211             protected override UIElement GetElementCore(ElementFactoryGetArgs args)
00212             {
00213                 var key = (args.Data is RecipeGroup) ? "Group" : "Recipe";
00214                 var element = (FrameworkElement)_recyclePool.TryGetElement(key, args.Parent);
00215
00216                 if (element == null)
00217                 {
00218                     if (args.Data is RecipeGroup)
00219                     {
00220                         element = (FrameworkElement)_groupTemplate.LoadContent();
00221                         _innerRepeaters.Add((ItemsRepeater)element.FindName("groupLayout"));
00222                     }
00223                     else
00224                     {
00225                         element = (FrameworkElement)_recipeTemplate.LoadContent();
00226                     }
00227                 }
00228
00229                 element.Tag = key;
00230
00231                 if (args.Data is RecipeGroup)
00232                 {
00233                     var group = (RecipeGroup)args.Data;
00234                     var groupName = (TextBlock)element.FindName("groupName");
00235                     var repeater = (ItemsRepeater)element.FindName("groupLayout");
00236
00237                     groupName.Text = group.Name;
00238                     var dataSource = new DelegatingItemsSource(group);
00239                     dataSource.KeyFromIndexFunc = _KeyFromIndexFunc;
00240                     repeater.ItemsSource = dataSource;
00241                     repeater.Layout = IsInnerLayoutGrid ? (VirtualizingLayout)new UniformGridLayout() { MinItemWidth = 150, MinItemHeight = 150 } : (VirtualizingLayout)new StackLayout();
00242                     RepeaterTestHooks.SetLayoutId(repeater.Layout, group.Name);
00243                     repeater.ItemTemplate = this;
00244                     repeater.ItemTransitionProvider = _transitionProvider;
00245                 }
00246                 else
00247                 {
00248                     var recipe = (Recipe)args.Data;
00249                     var image = (Image)element.FindName("recipeImage");
00250                     var description = (TextBlock)element.FindName("recipeDescription");
00251
00252                     image.Source = new BitmapImage(recipe.ImageUri);
00253                     description.Text = recipe.Description;
00254                 }
00255
00256                 return element;
00257             }
00258
00259             protected override void RecycleElementCore(ElementFactoryRecycleArgs args)
00260             {
00261                 var repeater = (ItemsRepeater)((FrameworkElement)args.Element).FindName("groupLayout");
00262                 if (repeater != null)
00263                 {
00264                     // Make sure all elements are cleared.
00265                     repeater.Layout = null;
00266                 }
00267
00268                 _recyclePool.PutElement(args.Element, (string)((FrameworkElement)args.Element).Tag, args.Parent);
00269             }
00270
00271             public void UpdateInnerLayouts()
00272             {
00273                 foreach (var repeater in _innerRepeaters)
00274                 {
00275                     if (repeater.Layout != null)
00276                     {
00277                         var id = RepeaterTestHooks.GetLayoutId(repeater.Layout);
00278                         repeater.Layout = IsInnerLayoutGrid ? (VirtualizingLayout)new UniformGridLayout() { MinItemWidth = 150, MinItemHeight = 150 } : (VirtualizingLayout)new StackLayout();
00279                         RepeaterTestHooks.SetLayoutId(repeater.Layout, id);
00280                     }
00281                 }
00282             }
00283         }
00284     }
00285 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TestCommand Member List

This is the complete list of members for TestCommand, including all inherited members.
CanExecute(object parameter) | TestCommand | [inline]
CanExecuteChanged | TestCommand |
Execute(object parameter) | TestCommand | [inline]
page | TestCommand | [private]
TestCommand(SwipeControlPage page) | TestCommand | [inline]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItem.cpp Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBarItem.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "BreadcrumbBarItem.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ItemTemplateWrapper.h"
00009 #include "BreadcrumbBar.h"
00010 #include "BreadcrumbBarItemAutomationPeer.h"
00011
00012 namespace winrt::Microsoft::UI::Xaml::Controls
00013 {
00014     CppWinRTActivatableClassWithBasicFactory(BreadcrumbBarItem)
00015 }
00016
00017 #include "BreadcrumbBarItem.g.cpp"
00018
00019 BreadcrumbBarItem::BreadcrumbBarItem()
00020 {
00021     __RP_Marker_ClassById(RuntimeProfiler::ProfId_BreadcrumbBarItem);
00022
00023     SetDefaultStyleKey(this);
00024 }
00025
00026 BreadcrumbBarItem::~BreadcrumbBarItem()
00027 {
00028     RevokeListeners();
00029 }
00030
00031 void BreadcrumbBarItem::HookListeners(bool forEllipsisDropDownItem)
00032 {
00033     if (!m_childPreviewKeyDownToken.value)
00034     {
00035         m_childPreviewKeyDownToken = PreviewKeyDown({ this, &BreadcrumbBarItem::OnChildPreviewKeyDown });
00036     }
00037
00038     if (forEllipsisDropDownItem)
00039     {
00040         if (!m_isEnabledChangedRevoker)
00041         {
00042             m_isEnabledChangedRevoker = IsEnabledChanged(winrt::auto_revoke, { this,  &BreadcrumbBarItem::OnIsEnabledChanged });
00043         }
00044     }
00045     else if (!m_flowDirectionChangedToken.value)
00046     {
00047         m_flowDirectionChangedToken.value = RegisterPropertyChangedCallback(winrt::FrameworkElement::FlowDirectionProperty(), { this, &BreadcrumbBarItem::OnFlowDirectionChanged });
00048     }
00049 }
00050
00051 void BreadcrumbBarItem::RevokeListeners()
00052 {
00053     if (m_flowDirectionChangedToken.value)
00054     {
00055         UnregisterPropertyChangedCallback(winrt::FrameworkElement::FlowDirectionProperty(), m_flowDirectionChangedToken.value);
00056         m_flowDirectionChangedToken.value = 0;
00057     }
00058
00059     if (m_childPreviewKeyDownToken.value)
00060     {
00061         PreviewKeyDown(m_childPreviewKeyDownToken);
00062         m_childPreviewKeyDownToken.value = 0;
00063     }
00064
00065     m_keyDownRevoker.revoke();
00066 }
00067
00068 void BreadcrumbBarItem::RevokePartsListeners()
00069 {
00070     m_buttonLoadedRevoker.revoke();
00071     m_buttonClickRevoker.revoke();
00072     m_ellipsisRepeaterElementPreparedRevoker.revoke();
00073     m_ellipsisRepeaterElementIndexChangedRevoker.revoke();
00074     m_isPressedButtonRevoker.revoke();
00075     m_isPointerOverButtonRevoker.revoke();
00076     m_isEnabledButtonRevoker.revoke();
00077 }
00078
00079 void BreadcrumbBarItem::OnApplyTemplate()
00080 {
00081     __super::OnApplyTemplate();
00082
00083     if (m_isEllipsisDropDownItem)
00084     {
00085         UpdateEllipsisDropDownItemCommonVisualState(false /*useTransitions*/);
00086     }
00087     else
00088     {
00089         RevokePartsListeners();
00090         winrt::IControlProtected controlProtected{ *this };
00091
00092         if (m_isEllipsisItem)
00093         {
00094             m_ellipsisFlyout.set(GetTemplateChildT<winrt::Flyout>(s_itemEllipsisFlyoutPartName, controlProtected));
00095         }
00096
00097         m_button.set(GetTemplateChildT<winrt::Button>(s_itemButtonPartName, controlProtected));
00098
00099         if (const auto& button = m_button.get())
00100         {
00101             m_buttonLoadedRevoker = button.Loaded(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnLoadedEvent });
00102
00103             m_isPressedButtonRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPressedProperty(), { this, &BreadcrumbBarItem::OnVisualPropertyChanged });
00104             m_isPointerOverButtonRevoker = RegisterPropertyChanged(button, winrt::ButtonBase::IsPointerOverProperty(), { this, &BreadcrumbBarItem::OnVisualPropertyChanged });
00105             m_isEnabledButtonRevoker = RegisterPropertyChanged(button, winrt::Control::IsEnabledProperty(), { this, &BreadcrumbBarItem::OnVisualPropertyChanged });
00106         }
00107
00108         UpdateButtonCommonVisualState(false /*useTransitions*/);
00109         UpdateInlineItemTypeVisualState(false /*useTransitions*/);
00110     }
00111
00112     UpdateItemTypeVisualState();
00113 }
00114
00115 void BreadcrumbBarItem::OnLoadedEvent(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
00116 {
00117     MUX_ASSERT(!m_isEllipsisDropDownItem);
00118
00119     m_buttonLoadedRevoker.revoke();
00120
00121     if (auto button = m_button.get())
00122     {
00123         m_buttonClickRevoker.revoke();
00124         if (m_isEllipsisItem)
00125         {
00126             m_buttonClickRevoker = button.Click(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnEllipsisItemClick });
00127         }
00128         else
00129         {
00130             m_buttonClickRevoker = button.Click(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnBreadcrumbBarItemClick });
00131         }
00132     }
00133
00134     if (m_isEllipsisItem)
00135     {
00136         SetPropertiesForEllipsisItem();
00137     }
00138     else if (m_isLastItem)
00139     {
00140         SetPropertiesForLastItem();
00141     }
00142     else
00143     {
00144         ResetVisualProperties();
00145     }
00146 }
00147
00148 void BreadcrumbBarItem::SetParentBreadcrumb(const winrt::BreadcrumbBar& parent)
00149 {
00150     MUX_ASSERT(!m_isEllipsisDropDownItem);
00151
00152     m_parentBreadcrumb = winrt::make_weak(parent);
00153 }
00154
00155 void BreadcrumbBarItem::SetEllipsisDropDownItemDataTemplate(const winrt::IInspectable& newDataTemplate)
00156 {
00157     if (auto const& dataTemplate = newDataTemplate.try_as<winrt::IElementFactory>())
00158     {
00159         m_ellipsisDropDownItemDataTemplate.set(dataTemplate);
00160     }
00161     else if (!newDataTemplate)
00162     {
00163         m_ellipsisDropDownItemDataTemplate.set(nullptr);
00164     }
00165 }
00166
00167 void BreadcrumbBarItem::SetIndex(const uint32_t index)
00168 {
00169     m_index = index;
00170 }
00171
00172 void BreadcrumbBarItem::SetIsEllipsisDropDownItem(bool isEllipsisDropDownItem)
00173 {
00174     m_isEllipsisDropDownItem = isEllipsisDropDownItem;
00175
00176     HookListeners(m_isEllipsisDropDownItem);
00177
00178     UpdateItemTypeVisualState();
00179 }
00180
00181 void BreadcrumbBarItem::RaiseItemClickedEvent(const winrt::IInspectable& content, const uint32_t index)
00182 {
00183     if (const auto& breadcrumb = m_parentBreadcrumb.get())
00184     {
00185         auto breadcrumbImpl = winrt::get_self<BreadcrumbBar>(breadcrumb);
00186         breadcrumbImpl->RaiseItemClickedEvent(content, index);
00187     }
00188 }
00189
00190 void BreadcrumbBarItem::OnBreadcrumbBarItemClick(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
00191 {
00192     RaiseItemClickedEvent(Content(), m_index - 1);
00193 }
00194
00195 void BreadcrumbBarItem::OnFlyoutElementPreparedEvent(winrt::ItemsRepeater sender, winrt::ItemsRepeaterElementPreparedEventArgs args)
00196 {
00197     MUX_ASSERT(!m_isEllipsisDropDownItem);
00198
00199     if (const auto& ellipsisDropDownItem = args.Element().try_as<winrt::BreadcrumbBarItem>())
00200     {
00201         if (const auto& ellipsisDropDownItemImpl = winrt::get_self<BreadcrumbBarItem>(ellipsisDropDownItem))
00202         {
00203             ellipsisDropDownItemImpl->SetIsEllipsisDropDownItem(true /*isEllipsisDropDownItem*/);
00204         }
00205     }
00206
00207     UpdateFlyoutIndex(args.Element(), args.Index());
00208 }
00209
00210 void BreadcrumbBarItem::OnFlyoutElementIndexChangedEvent(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementIndexChangedEventArgs& args)
00211 {
00212     MUX_ASSERT(!m_isEllipsisDropDownItem);
00213
00214     UpdateFlyoutIndex(args.Element(), args.NewIndex());
00215 }
00216
00217 void BreadcrumbBarItem::OnFlowDirectionChanged(winrt::DependencyObject const&, winrt::DependencyProperty const&)
00218 {
00219     MUX_ASSERT(!m_isEllipsisDropDownItem);
00220
00221     UpdateInlineItemTypeVisualState(true /*useTransitions*/);
00222 }
00223
00224 void BreadcrumbBarItem::OnChildPreviewKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args)
00225 {
00226     if (m_isEllipsisDropDownItem)
00227     {
00228         if (args.Key() == winrt::VirtualKey::Enter || args.Key() == winrt::VirtualKey::Space)
00229         {
00230             this->OnClickEvent(sender, nullptr);
00231             args.Handled(true);
00232         }
00233     }
00234     else if (args.Key() == winrt::VirtualKey::Enter || args.Key() == winrt::VirtualKey::Space)
00235     {
00236         if (m_isEllipsisItem)
00237         {
00238             OnEllipsisItemClick(nullptr, nullptr);
00239         }
00240         else
00241         {
00242             OnBreadcrumbBarItemClick(nullptr, nullptr);
00243         }
00244         args.Handled(true);
00245     }
00246 }
00247
00248 void BreadcrumbBarItem::OnIsEnabledChanged(
00249     const winrt::IInspectable&,
00250     const winrt::DependencyPropertyChangedEventArgs&)
00251 {
00252     MUX_ASSERT(m_isEllipsisDropDownItem);
00253
00254     UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
00255 }
00256
00257 void BreadcrumbBarItem::UpdateFlyoutIndex(const winrt::UIElement& element, const uint32_t index)
00258 {
00259     MUX_ASSERT(!m_isEllipsisDropDownItem);
00260
00261     if (auto const& ellipsisItemsRepeater = m_ellipsisItemsRepeater.get())
00262     {
00263         if (auto const& itemSourceView = ellipsisItemsRepeater.ItemsSourceView())
00264         {
00265             const uint32_t itemCount = itemSourceView.Count();
00266
00267             if (const auto& ellipsisDropDownItemImpl = element.try_as<BreadcrumbBarItem>())
00268             {
00269                 ellipsisDropDownItemImpl->SetEllipsisItem(*this);
00270                 ellipsisDropDownItemImpl->SetIndex(itemCount - index);
00271             }
00272
00273             element.SetValue(winrt::AutomationProperties::PositionInSetProperty(), box_value(index + 1));
00274             element.SetValue(winrt::AutomationProperties::SizeOfSetProperty(), box_value(itemCount));
00275         }
00276     }
00277 }
00278
00279 winrt::IInspectable BreadcrumbBarItem::CloneEllipsisItemSource(const winrt::Collections::IVector<winrt::IInspectable>& ellipsisItemsSource)
00280 {
00281     MUX_ASSERT(!m_isEllipsisDropDownItem);
00282
00283     // A copy of the hidden elements array in BreadcrumbLayout is created
00284     // to avoid getting a Layout cycle exception
00285     auto newItemsSource = winrt::make<Vector<winrt::IInspectable>>();
00286
00287     // The new list contains all the elements in reverse order
00288     const int itemsSourceSize = ellipsisItemsSource.Size();
00289     if(itemsSourceSize > 0)
00290     {
00291         for (int i = itemsSourceSize - 1; i >= 0; --i)
00292         {
00293             const auto& item = ellipsisItemsSource.GetAt(i);
00294             newItemsSource.Append(item);
00295         }
00296     }
00297
00298     return newItemsSource;
00299 }
00300
00301 void BreadcrumbBarItem::OpenFlyout()
00302 {
00303     MUX_ASSERT(!m_isEllipsisDropDownItem);
00304
00305     if (auto flyout = m_ellipsisFlyout.get())
00306     {
00307         winrt::FlyoutShowOptions options{};
00308         flyout.ShowAt(*this, options);
00309     }
00310 }
00311
00312 void BreadcrumbBarItem::CloseFlyout()
00313 {
00314     MUX_ASSERT(!m_isEllipsisDropDownItem);
00315
00316     if (auto flyout = m_ellipsisFlyout.get())
00317     {
00318         flyout.Hide();
00319     }
00320 }
00321
00322 void BreadcrumbBarItem::OnVisualPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&)
00323 {
00324     MUX_ASSERT(!m_isEllipsisDropDownItem);
00325
00326     UpdateButtonCommonVisualState(true /*useTransitions*/);
00327 }
00328
00329 void BreadcrumbBarItem::UpdateItemTypeVisualState()
00330 {
00331     winrt::VisualStateManager::GoToState(*this, m_isEllipsisDropDownItem ? s_ellipsisDropDownStateName : s_inlineStateName, false /*useTransitions*/);
00332 }
00333
00334 void BreadcrumbBarItem::UpdateEllipsisDropDownItemCommonVisualState(bool useTransitions)
00335 {
00336     MUX_ASSERT(m_isEllipsisDropDownItem);
00337
00338     hstring commonVisualStateName;
00339
00340     if (!IsEnabled())
00341     {
00342         commonVisualStateName = s_disabledStateName;
00343     }
00344     else if (m_isPressed)
00345     {
00346         commonVisualStateName = s_pressedStateName;
00347     }
00348     else if (m_isPointerOver)
00349     {
00350         commonVisualStateName = s_pointerOverStateName;
00351     }
00352     else
00353     {
00354         commonVisualStateName = s_normalStateName;
00355     }
00356
00357     winrt::VisualStateManager::GoToState(*this, commonVisualStateName, useTransitions);
00358 }
00359
00360 void BreadcrumbBarItem::UpdateInlineItemTypeVisualState(bool useTransitions)
00361 {
00362     MUX_ASSERT(!m_isEllipsisDropDownItem);
00363
00364     const bool isLeftToRight = (FlowDirection() == winrt::FlowDirection::LeftToRight);
00365     hstring visualStateName;
00366
00367     if (m_isEllipsisItem)
00368     {
00369         if (isLeftToRight)
00370         {
00371             visualStateName = s_ellipsisStateName;
00372         }
00373         else
00374         {
00375             visualStateName = s_ellipsisRTLStateName;
00376         }
00377     }
00378     else if (m_isLastItem)
00379     {
00380         visualStateName = s_lastItemStateName;
00381     }
00382     else if (isLeftToRight)
00383     {
00384         visualStateName = s_defaultStateName;
00385     }
00386     else
00387     {
00388         visualStateName = s_defaultRTLStateName;
00389     }
00390
00391     winrt::VisualStateManager::GoToState(*this, visualStateName, useTransitions);
00392 }
00393
00394 void BreadcrumbBarItem::UpdateButtonCommonVisualState(bool useTransitions)
00395 {
00396     MUX_ASSERT(!m_isEllipsisDropDownItem);
00397
00398     if (const auto& button = m_button.get())
00399     {
00400         hstring commonVisualStateName = L"";
00401
00402         // If is last item: place Current as prefix for visual state
00403         if (m_isLastItem)
00404         {
00405             commonVisualStateName = s_currentStateName;
00406         }
00407
00408         if (!button.IsEnabled())
00409         {
00410             commonVisualStateName = commonVisualStateName + s_disabledStateName;
00411         }
00412         else if (button.IsPressed())
00413         {
00414             commonVisualStateName = commonVisualStateName + s_pressedStateName;
00415         }
00416         else if (button.IsPointerOver())
00417         {
00418             commonVisualStateName = commonVisualStateName + s_pointerOverStateName;
00419         }
00420         else
00421         {
00422             commonVisualStateName = commonVisualStateName + s_normalStateName;
00423         }
00424
00425         winrt::VisualStateManager::GoToState(button, commonVisualStateName, useTransitions);
00426     }
00427 }
00428
00429 void BreadcrumbBarItem::OnEllipsisItemClick(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
00430 {
00431     MUX_ASSERT(!m_isEllipsisDropDownItem);
00432
00433     if (const auto& breadcrumb = m_parentBreadcrumb.get())
00434     {
00435         if (const auto& breadcrumbImpl = breadcrumb.try_as<BreadcrumbBar>())
00436         {
00437             const auto& hiddenElements = CloneEllipsisItemSource(breadcrumbImpl->HiddenElements());
00438
00439             if (const auto& dataTemplate = m_ellipsisDropDownItemDataTemplate.get())
00440             {
00441                 m_ellipsisElementFactory->UserElementFactory(dataTemplate);
00442             }
00443
00444             if (const auto& flyoutRepeater = m_ellipsisItemsRepeater.get())
00445             {
00446                 flyoutRepeater.ItemsSource(hiddenElements);
00447             }
00448
00449             OpenFlyout();
00450         }
00451     }
00452 }
00453
00454 void BreadcrumbBarItem::SetPropertiesForLastItem()
00455 {
00456     MUX_ASSERT(!m_isEllipsisDropDownItem);
00457
00458     m_isEllipsisItem = false;
00459     m_isLastItem = true;
00460
00461     UpdateButtonCommonVisualState(false /*useTransitions*/);
00462     UpdateInlineItemTypeVisualState(false /*useTransitions*/);
00463 }
00464
00465 void BreadcrumbBarItem::ResetVisualProperties()
00466 {
00467     if (m_isEllipsisDropDownItem)
00468     {
00469         UpdateEllipsisDropDownItemCommonVisualState(false /*useTransitions*/);
00470     }
00471     else
00472     {
00473         m_isEllipsisItem = false;
00474         m_isLastItem = false;
00475
00476         if (const auto& button = m_button.get())
00477         {
00478             button.Flyout(nullptr);
00479         }
00480         m_ellipsisFlyout.set(nullptr);
00481         m_ellipsisItemsRepeater.set(nullptr);
00482         m_ellipsisElementFactory = nullptr;
00483
00484         UpdateButtonCommonVisualState(false /*useTransitions*/);
00485         UpdateInlineItemTypeVisualState(false /*useTransitions*/);
00486     }
00487 }
00488
00489 void BreadcrumbBarItem::InstantiateFlyout()
00490 {
00491     MUX_ASSERT(!m_isEllipsisDropDownItem);
00492
00493     // Only if the element has been created visually, instantiate the flyout
00494     if (const auto& button = m_button.get())
00495     {
00496         if (const auto& ellipsisFlyout = m_ellipsisFlyout.get())
00497         {
00498             // Create ItemsRepeater and set the DataTemplate
00499             const auto& ellipsisItemsRepeater = winrt::ItemsRepeater();
00500             ellipsisItemsRepeater.Name(s_ellipsisItemsRepeaterPartName);
00501             winrt::AutomationProperties::SetName(ellipsisItemsRepeater, s_ellipsisItemsRepeaterAutomationName);
00502             ellipsisItemsRepeater.HorizontalAlignment(winrt::HorizontalAlignment::Stretch);
00503
00504             ellipsisItemsRepeater.Layout(winrt::StackLayout());
00505
00506             m_ellipsisElementFactory = winrt::make_self<BreadcrumbElementFactory>();
00507             ellipsisItemsRepeater.ItemTemplate(*m_ellipsisElementFactory);
00508
00509             if (const auto& dataTemplate = m_ellipsisDropDownItemDataTemplate.get())
00510             {
00511                 m_ellipsisElementFactory->UserElementFactory(dataTemplate);
00512             }
00513
00514             m_ellipsisRepeaterElementPreparedRevoker = ellipsisItemsRepeater.ElementPrepared(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnFlyoutElementPreparedEvent });
00515             m_ellipsisRepeaterElementIndexChangedRevoker = ellipsisItemsRepeater.ElementIndexChanged(winrt::auto_revoke, { this, &BreadcrumbBarItem::OnFlyoutElementIndexChangedEvent });
00516
00517             m_ellipsisItemsRepeater.set(ellipsisItemsRepeater);
00518
00519             // Set the repeater as the content.
00520             winrt::AutomationProperties::SetName(ellipsisFlyout, s_ellipsisFlyoutAutomationName);
00521             ellipsisFlyout.Content(ellipsisItemsRepeater);
00522             ellipsisFlyout.Placement(winrt::FlyoutPlacementMode::Bottom);
00523
00524             m_ellipsisFlyout.set(ellipsisFlyout);
00525         }
00526     }
00527 }
00528
00529 void BreadcrumbBarItem::SetPropertiesForEllipsisItem()
00530 {
00531     MUX_ASSERT(!m_isEllipsisDropDownItem);
00532
00533     m_isEllipsisItem = true;
00534     m_isLastItem = false;
00535
00536     InstantiateFlyout();
00537
00538     UpdateButtonCommonVisualState(false /*useTransitions*/);
00539     UpdateInlineItemTypeVisualState(false /*useTransitions*/);
00540 }
00541
00542 void BreadcrumbBarItem::SetEllipsisItem(const winrt::BreadcrumbBarItem& ellipsisItem)
00543 {
00544     MUX_ASSERT(m_isEllipsisDropDownItem);
00545
00546     m_ellipsisItem.set(ellipsisItem);
00547 }
00548
00549 winrt::AutomationPeer BreadcrumbBarItem::OnCreateAutomationPeer()
00550 {
00551     return winrt::make<BreadcrumbBarItemAutomationPeer>(*this);
00552 }
00553
00554 void BreadcrumbBarItem::OnPointerEntered(const winrt::PointerRoutedEventArgs& args)
00555 {
00556     __super::OnPointerEntered(args);
00557
00558     if (m_isEllipsisDropDownItem)
00559     {
00560         ProcessPointerOver(args);
00561     }
00562 }
00563
00564 void BreadcrumbBarItem::OnPointerMoved(const winrt::PointerRoutedEventArgs& args)
00565 {
00566     __super::OnPointerMoved(args);
00567
00568     if (m_isEllipsisDropDownItem)
00569     {
00570         ProcessPointerOver(args);
00571     }
00572 }
00573
00574 void BreadcrumbBarItem::OnPointerExited(const winrt::PointerRoutedEventArgs& args)
00575 {
00576     __super::OnPointerExited(args);
00577
00578     if (m_isEllipsisDropDownItem)
00579     {
00580         ProcessPointerCanceled(args);
00581     }
00582 }
00583
00584 void BreadcrumbBarItem::OnPointerPressed(const winrt::PointerRoutedEventArgs& args)
00585 {
00586     __super::OnPointerPressed(args);
00587
00588     if (m_isEllipsisDropDownItem)
00589     {
00590         if (IgnorePointerId(args))
00591         {
00592             return;
00593         }
00594
00595         MUX_ASSERT(!m_isPressed);
00596
00597         if (args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Mouse)
00598         {
00599             auto pointerProperties = args.GetCurrentPoint(*this).Properties();
00600             m_isPressed = pointerProperties.IsLeftButtonPressed();
00601         }
00602         else
00603         {
00604             m_isPressed = true;
00605         }
00606
00607         if (m_isPressed)
00608         {
00609             UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
00610         }
00611     }
00612 }
00613
00614 void BreadcrumbBarItem::OnPointerReleased(const winrt::PointerRoutedEventArgs& args)
00615 {
00616     __super::OnPointerReleased(args);
00617
00618     if (m_isEllipsisDropDownItem)
00619     {
00620         if (IgnorePointerId(args))
00621         {
00622             return;
00623         }
00624
00625         if (m_isPressed)
00626         {
00627             m_isPressed = false;
00628             UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
00629             OnClickEvent(nullptr, nullptr);
00630         }
00631     }
00632 }
00633
00634 void BreadcrumbBarItem::OnPointerCanceled(const winrt::PointerRoutedEventArgs& args)
00635 {
00636     __super::OnPointerCanceled(args);
00637
00638     if (m_isEllipsisDropDownItem)
00639     {
00640         ProcessPointerCanceled(args);
00641     }
00642 }
00643
00644 void BreadcrumbBarItem::OnPointerCaptureLost(const winrt::PointerRoutedEventArgs& args)
00645 {
00646     __super::OnPointerCaptureLost(args);
00647
00648     if (m_isEllipsisDropDownItem)
00649     {
00650         ProcessPointerCanceled(args);
00651     }
00652 }
00653
00654 void BreadcrumbBarItem::ProcessPointerOver(const winrt::PointerRoutedEventArgs& args)
00655 {
00656     MUX_ASSERT(m_isEllipsisDropDownItem);
00657
00658     if (IgnorePointerId(args))
00659     {
00660         return;
00661     }
00662
00663     if (!m_isPointerOver)
00664     {
00665         m_isPointerOver = true;
00666         UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
00667     }
00668 }
00669
00670 void BreadcrumbBarItem::ProcessPointerCanceled(const winrt::PointerRoutedEventArgs& args)
00671 {
00672     MUX_ASSERT(m_isEllipsisDropDownItem);
00673
00674     if (IgnorePointerId(args))
00675     {
00676         return;
00677     }
00678
00679     m_isPressed = false;
00680     m_isPointerOver = false;
00681     ResetTrackedPointerId();
00682     UpdateEllipsisDropDownItemCommonVisualState(true /*useTransitions*/);
00683 }
00684
00685 void BreadcrumbBarItem::ResetTrackedPointerId()
00686 {
00687     MUX_ASSERT(m_isEllipsisDropDownItem);
00688
00689     m_trackedPointerId = 0;
00690 }
00691
00692 // Returns False when the provided pointer Id matches the currently tracked Id.
00693 // When there is no currently tracked Id, sets the tracked Id to the provided Id and returns False.
00694 // Returns True when the provided pointer Id does not match the currently tracked Id.
00695 bool BreadcrumbBarItem::IgnorePointerId(const winrt::PointerRoutedEventArgs& args)
00696 {
00697     MUX_ASSERT(m_isEllipsisDropDownItem);
00698
00699     uint32_t pointerId = args.Pointer().PointerId();
00700
00701     if (m_trackedPointerId == 0)
00702     {
00703         m_trackedPointerId = pointerId;
00704     }
00705     else if (m_trackedPointerId != pointerId)
00706     {
00707         return true;
00708     }
00709     return false;
00710 }
00711
00712 void BreadcrumbBarItem::OnClickEvent(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args)
00713 {
00714     if (m_isEllipsisDropDownItem)
00715     {
00716         if (const auto& ellipsisItem = m_ellipsisItem.get())
00717         {
00718             // Once an element has been clicked, close the flyout
00719             if (const auto& ellipsisItemImpl = winrt::get_self<BreadcrumbBarItem>(ellipsisItem))
00720             {
00721                 ellipsisItemImpl->CloseFlyout();
00722                 ellipsisItemImpl->RaiseItemClickedEvent(Content(), m_index - 1);
00723             }
00724         }
00725     }
00726     else if (m_isEllipsisItem)
00727     {
00728         OnEllipsisItemClick(nullptr, nullptr);
00729     }
00730     else
00731     {
00732         OnBreadcrumbBarItemClick(nullptr, nullptr);
00733     }
00734 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/RecyclingViewGeneratorDerived.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

RecyclingViewGeneratorDerived.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Private.Controls;
00009
00010 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00011 {
00012     using RecyclingElementFactory = Microsoft.UI.Xaml.Controls.RecyclingElementFactory;
00013     public class RecyclingElementFactoryDerived : RecyclingElementFactory
00014     {
00015         private List<UIElement> _realizedElements = new List<UIElement>();
00016         private List<int> _realizedElementIndices = new List<int>();
00017
00018         public Func<int, UIElement, UIElement, UIElement> GetElementFunc { get; set; }
00019
00020         public Action<UIElement, UIElement> ClearElementFunc { get; set; }
00021
00022         public Func<object, UIElement, string> SelectTemplateIdFunc { get; set; }
00023
00024         public List<int> RealizedElementIndices { get { return _realizedElementIndices; } }
00025
00026         public bool ValidateElementIndices { get; set; }
00027
00028         public RecyclingElementFactoryDerived()
00029         {
00030             ValidateElementIndices = true;
00031         }
00032
00033         protected override UIElement GetElementCore(ElementFactoryGetArgs context)
00034         {
00035             UIElement element = base.GetElementCore(context);
00036             int index = RepeaterTestHooks.GetElementFactoryElementIndex();
00037             if (GetElementFunc != null)
00038             {
00039                 element = GetElementFunc(index, context.Parent, element);
00040             }
00041
00042             if (!RealizedElementIndices.Contains(index))
00043             {
00044                 _realizedElements.Add(element);
00045                 _realizedElementIndices.Add(index);
00046             }
00047             else if (ValidateElementIndices)
00048             {
00049                 throw new InvalidOperationException("Cannot request an element that has already been realized.");
00050             }
00051
00052             return element;
00053         }
00054
00055         protected override void RecycleElementCore(ElementFactoryRecycleArgs context)
00056         {
00057             base.RecycleElementCore(context);
00058             if (ClearElementFunc != null) { ClearElementFunc(context.Element, context.Parent); }
00059
00060             int elementIndex = _realizedElements.IndexOf(context.Element);
00061             if (elementIndex != -1)
00062             {
00063                 _realizedElements.RemoveAt(elementIndex);
00064                 _realizedElementIndices.RemoveAt(elementIndex);
00065             }
00066             else if (ValidateElementIndices)
00067             {
00068                 throw new InvalidOperationException("Cannot clear an element that has not been created or already been cleared.");
00069             }
00070         }
00071
00072         protected override string OnSelectTemplateKeyCore(object data, UIElement owner)
00073         {
00074             if (SelectTemplateIdFunc != null)
00075             {
00076                 return SelectTemplateIdFunc(data, owner);
00077             }
00078             else
00079             {
00080                 return base.OnSelectTemplateKeyCore(data, owner);
00081             }
00082         }
00083     }
00084 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderTemplateSettings.h Source File

  • File List
  • File Members
  • Expander

ExpanderTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ExpanderTemplateSettings.g.h"
00007 #include "ExpanderTemplateSettings.properties.h"
00008
00009 class ExpanderTemplateSettings :
00010     public winrt::implementation::ExpanderTemplateSettingsT<ExpanderTemplateSettings>,
00011     public ExpanderTemplateSettingsProperties
00012 {
00013 public:
00014     ExpanderTemplateSettings();
00015 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlSelectedIndexChangedEventArgs Member List

This is the complete list of members for PagerControlSelectedIndexChangedEventArgs, including all inherited members.
m_newPageIndex | PagerControlSelectedIndexChangedEventArgs | [private]
m_previousPageIndex | PagerControlSelectedIndexChangedEventArgs | [private]
NewPageIndex() | PagerControlSelectedIndexChangedEventArgs | [inline]
PagerControlSelectedIndexChangedEventArgs(const int previousIndex, const int newIndex) | PagerControlSelectedIndexChangedEventArgs | [inline]
PreviousPageIndex() | PagerControlSelectedIndexChangedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteraction.idl Source File

  • File List
  • File Members
  • Interactions
  • ButtonInteraction

ButtonInteraction.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_PREVIEW]
00005 [webhosthidden]
00006 enum ButtonInteractionInvokeMode
00007 {
00008     Release = 0,
00009     Press = 1,
00010     Hover = 2,
00011 };
00012
00013 [MUX_PREVIEW]
00014 [webhosthidden]
00015 runtimeclass ButtonInteractionInvokedEventArgs
00016 {
00017     Microsoft.UI.Xaml.UIElement Target { get; };
00018 }
00019
00020 [MUX_PREVIEW]
00021 [webhosthidden]
00022 unsealed runtimeclass ButtonInteraction :
00023 #ifdef USE_INTERNAL_SDK
00024 Microsoft.UI.Xaml.InteractionBase,
00025 #else
00026 Microsoft.UI.Xaml.DependencyObject,
00027 #endif
00028 Microsoft.UI.Xaml.Data.INotifyPropertyChanged
00029 {
00030     ButtonInteraction();
00031
00032     ButtonInteractionInvokeMode InvokeMode { get; set; };
00033     Boolean IsHovering { get; };
00034     Boolean IsPressing { get; };
00035     event Windows.Foundation.TypedEventHandler<ButtonInteraction, ButtonInteractionInvokedEventArgs> Invoked;
00036 }
00037
00038 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollView
  • TestUI

ScrollViewKeyboardAndGamepadNavigationPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Private.Controls;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Navigation;
00009 using System;
00010 using System.Collections.Generic;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     public sealed partial class ScrollViewKeyboardAndGamepadNavigationPage : TestPage
00015     {
00016         private Object asyncEventReportingLock = new Object();
00017         private List<string> lstAsyncEventMessage = new List<string>();
00018
00019         public ScrollViewKeyboardAndGamepadNavigationPage()
00020         {
00021             this.InitializeComponent();
00022         }
00023
00024         ~ScrollViewKeyboardAndGamepadNavigationPage()
00025         {
00026         }
00027
00028         protected override void OnNavigatedFrom(NavigationEventArgs e)
00029         {
00030             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00031             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00032
00033             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00034
00035             base.OnNavigatedFrom(e);
00036         }
00037
00038         private void ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args)
00039         {
00040             AppendAsyncEventMessage("ScrollPresenter.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
00041         }
00042
00043         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00044         {
00045             AppendAsyncEventMessage("ScrollPresenter.StateChanged " + sender.State.ToString());
00046         }
00047
00048         private void ScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
00049         {
00050             AppendAsyncEventMessage("ScrollPresenter.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
00051         }
00052
00053         private void ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
00054         {
00055             AppendAsyncEventMessage("ScrollPresenter.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId + " SP=(" + args.StartPosition.X + "," + args.StartPosition.Y + ") EP=(" + args.EndPosition.X + "," + args.EndPosition.Y + ")");
00056         }
00057
00058         private void ScrollPresenter_ZoomAnimationStarting(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
00059         {
00060             AppendAsyncEventMessage("ScrollPresenter.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint + ", SZF=" + args.StartZoomFactor + ", EZF=" + args.EndZoomFactor);
00061         }
00062
00063         private void ScrollView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
00064         {
00065             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00066             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00067             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00068             string newFEName = (newFE == null) ? "null" : newFE.Name;
00069
00070             AppendAsyncEventMessage("ScrollView.GettingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
00071         }
00072
00073         private void ScrollView_LostFocus(object sender, RoutedEventArgs e)
00074         {
00075             AppendAsyncEventMessage("ScrollView.LostFocus");
00076         }
00077
00078         private void ScrollView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
00079         {
00080             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00081             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00082             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00083             string newFEName = (newFE == null) ? "null" : newFE.Name;
00084
00085             AppendAsyncEventMessage("ScrollView.LosingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
00086         }
00087
00088         private void ScrollView_GotFocus(object sender, RoutedEventArgs e)
00089         {
00090             AppendAsyncEventMessage("ScrollView.GotFocus");
00091         }
00092
00093         private void ScrollView_ExtentChanged(ScrollView sender, object args)
00094         {
00095             AppendAsyncEventMessage("ScrollView.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
00096         }
00097
00098         private void ScrollView_StateChanged(ScrollView sender, object args)
00099         {
00100             AppendAsyncEventMessage("ScrollView.StateChanged " + sender.State.ToString());
00101         }
00102
00103         private void ScrollView_ViewChanged(ScrollView sender, object args)
00104         {
00105             AppendAsyncEventMessage("ScrollView.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
00106         }
00107
00108         private void ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
00109         {
00110             AppendAsyncEventMessage("ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId);
00111         }
00112
00113         private void ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
00114         {
00115             AppendAsyncEventMessage("ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint);
00116         }
00117
00118         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
00119         {
00120             lstLogs.Items.Clear();
00121         }
00122
00123         private void ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e)
00124         {
00125             if (muxScrollView != null)
00126             {
00127                 ScrollPresenter scrollPresenter = muxScrollView.ScrollPresenter;
00128
00129                 if (scrollPresenter != null)
00130                 {
00131                     scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
00132                     scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00133                     scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00134                     scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00135                     scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
00136                 }
00137             }
00138         }
00139
00140         private void ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e)
00141         {
00142             if (muxScrollView != null)
00143             {
00144                 ScrollPresenter scrollPresenter = muxScrollView.ScrollPresenter;
00145
00146                 if (scrollPresenter != null)
00147                 {
00148                     scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
00149                     scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
00150                     scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
00151                     scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00152                     scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
00153                 }
00154             }
00155         }
00156
00157         private void ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e)
00158         {
00159             if (muxScrollView != null)
00160             {
00161                 muxScrollView.GettingFocus += ScrollView_GettingFocus;
00162                 muxScrollView.GotFocus += ScrollView_GotFocus;
00163                 muxScrollView.LosingFocus += ScrollView_LosingFocus;
00164                 muxScrollView.LostFocus += ScrollView_LostFocus;
00165                 muxScrollView.ExtentChanged += ScrollView_ExtentChanged;
00166                 muxScrollView.StateChanged += ScrollView_StateChanged;
00167                 muxScrollView.ViewChanged += ScrollView_ViewChanged;
00168                 muxScrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
00169                 muxScrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
00170             }
00171         }
00172
00173         private void ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e)
00174         {
00175             if (muxScrollView != null)
00176             {
00177                 muxScrollView.GettingFocus -= ScrollView_GettingFocus;
00178                 muxScrollView.GotFocus -= ScrollView_GotFocus;
00179                 muxScrollView.LosingFocus -= ScrollView_LosingFocus;
00180                 muxScrollView.LostFocus -= ScrollView_LostFocus;
00181                 muxScrollView.ExtentChanged -= ScrollView_ExtentChanged;
00182                 muxScrollView.StateChanged -= ScrollView_StateChanged;
00183                 muxScrollView.ViewChanged -= ScrollView_ViewChanged;
00184                 muxScrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
00185                 muxScrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
00186             }
00187         }
00188
00189         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00190         {
00191             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00192             if (chkLogScrollViewMessages.IsChecked == false)
00193                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00194         }
00195
00196         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00197         {
00198             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00199             if (chkLogScrollViewMessages.IsChecked == false)
00200                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00201         }
00202
00203         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e)
00204         {
00205             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00206             if (chkLogScrollPresenterMessages.IsChecked == false)
00207                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00208         }
00209
00210         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e)
00211         {
00212             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00213             if (chkLogScrollPresenterMessages.IsChecked == false)
00214                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00215         }
00216
00217         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00218         {
00219             if ((chkLogScrollPresenterMessages.IsChecked == false && sender is ScrollPresenter) ||
00220                 (chkLogScrollViewMessages.IsChecked == false && sender is ScrollView))
00221             {
00222                 return;
00223             }
00224
00225             // Cut off the terminating new line.
00226             string msg = args.Message.Substring(0, args.Message.Length - 1);
00227             string asyncEventMessage = string.Empty;
00228             string senderName = string.Empty;
00229
00230             FrameworkElement fe = sender as FrameworkElement;
00231
00232             if (fe != null)
00233             {
00234                 senderName = "s:" + fe.Name + ", ";
00235             }
00236
00237             if (args.IsVerboseLevel)
00238             {
00239                 asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
00240             }
00241             else
00242             {
00243                 asyncEventMessage = "Info: " + senderName + "m:" + msg;
00244             }
00245
00246             AppendAsyncEventMessage(asyncEventMessage);
00247         }
00248
00249         private void AppendAsyncEventMessage(string asyncEventMessage)
00250         {
00251             lock (asyncEventReportingLock)
00252             {
00253                 while (asyncEventMessage.Length > 0)
00254                 {
00255                     string msgHead = asyncEventMessage;
00256
00257                     if (asyncEventMessage.Length > 100)
00258                     {
00259                         int commaIndex = asyncEventMessage.IndexOf(',', 100);
00260                         if (commaIndex != -1)
00261                         {
00262                             msgHead = asyncEventMessage.Substring(0, commaIndex);
00263                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
00264                         }
00265                         else
00266                         {
00267                             asyncEventMessage = string.Empty;
00268                         }
00269                     }
00270                     else
00271                     {
00272                         asyncEventMessage = string.Empty;
00273                     }
00274
00275                     lstAsyncEventMessage.Add(msgHead);
00276                 }
00277                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
00278
00279             }
00280         }
00281
00282         private void AppendAsyncEventMessage()
00283         {
00284             lock (asyncEventReportingLock)
00285             {
00286                 foreach (string asyncEventMessage in lstAsyncEventMessage)
00287                 {
00288                     lstLogs.Items.Add(asyncEventMessage);
00289                 }
00290                 lstAsyncEventMessage.Clear();
00291             }
00292         }
00293     }
00294 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TestUI/TeachingTipPage.xaml.cs Source File

  • File List
  • File Members
  • TeachingTip
  • TestUI

TeachingTipPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Linq;
00006 using Windows.Foundation;
00007 using Windows.UI;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Media.Imaging;
00014 using Microsoft.UI.Xaml.Navigation;
00015 using Microsoft.UI.Xaml.Automation;
00016 using Microsoft.UI.Private.Controls;
00017 using System.ComponentModel;
00018 using System.Runtime.CompilerServices;
00019 using Microsoft.UI.Xaml.Hosting;
00020
00021 namespace MUXControlsTestApp
00022 {
00023     enum TipLocation
00024     {
00025         VisualTree = 0,
00026         Resources = 1
00027     }
00028
00029     public sealed partial class TeachingTipPage : TestPage, INotifyPropertyChanged
00030     {
00031         public event PropertyChangedEventHandler PropertyChanged;
00032         private void NotifyPropertyChanged([CallerMemberName]string propertyName = null)
00033         {
00034             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
00035         }
00036
00037         Deferral deferral;
00038         DispatcherTimer timer;
00039         DispatcherTimer showTimer;
00040         Popup testWindowBounds;
00041         Popup testScreenBounds;
00042         TipLocation tipLocation = TipLocation.VisualTree;
00043         FrameworkElement TeachingTipInResourcesRoot;
00044         FrameworkElement TeachingTipInVisualTreeRoot;
00045         CheckBox CurrentCancelClosesCheckBox;
00046
00047         public TeachingTipPage()
00048         {
00049             this.InitializeComponent();
00050             TeachingTipTestHooks.IdleStatusChanged += TeachingTipTestHooks_IdleStatusChanged;
00051             TeachingTipTestHooks.OpenedStatusChanged += TeachingTipTestHooks_OpenedStatusChanged;
00052             TeachingTipTestHooks.EffectivePlacementChanged += TeachingTipTestHooks_EffectivePlacementChanged;
00053             TeachingTipTestHooks.EffectiveHeroContentPlacementChanged += TeachingTipTestHooks_EffectiveHeroContentPlacementChanged;
00054             TeachingTipTestHooks.OffsetChanged += TeachingTipTestHooks_OffsetChanged;
00055             TeachingTipTestHooks.TitleVisibilityChanged += TeachingTipTestHooks_TitleVisibilityChanged;
00056             TeachingTipTestHooks.SubtitleVisibilityChanged += TeachingTipTestHooks_SubtitleVisibilityChanged;
00057             this.TeachingTipInVisualTree.Closed += TeachingTipInVisualTree_Closed;
00058             this.TeachingTipInResources.Closed += TeachingTipInResources_Closed;
00059             this.TeachingTipInResourcesOnEdge.Closed += TeachingTipInResourcesOnEdge_Closed;
00060             this.ContentScrollViewer.ViewChanged += ContentScrollViewer_ViewChanged;
00061         }
00062
00063         private void TeachingTipInResources_Closed(TeachingTip sender, TeachingTipClosedEventArgs args)
00064         {
00065             if (TeachingTipInResourcesRoot != null)
00066             {
00067                 TeachingTipInResourcesRoot.SizeChanged -= TeachingTip_SizeChanged;
00068             }
00069         }
00070         private void TeachingTipInResourcesOnEdge_Closed(TeachingTip sender, TeachingTipClosedEventArgs args)
00071         {
00072             if (TeachingTipInResourcesOnEdge != null)
00073             {
00074                 TeachingTipInResourcesOnEdge.SizeChanged -= TeachingTip_SizeChanged;
00075             }
00076         }
00077
00078         private void TeachingTipInVisualTree_Closed(TeachingTip sender, TeachingTipClosedEventArgs args)
00079         {
00080             if (TeachingTipInVisualTreeRoot != null)
00081             {
00082                 TeachingTipInVisualTreeRoot.SizeChanged -= TeachingTip_SizeChanged;
00083             }
00084         }
00085
00086         protected override void OnNavigatedFrom(NavigationEventArgs e)
00087         {
00088             if (testWindowBounds != null && testWindowBounds.IsOpen)
00089             {
00090                 testWindowBounds.IsOpen = false;
00091             }
00092             if(testScreenBounds != null && testScreenBounds.IsOpen)
00093             {
00094                 testScreenBounds.IsOpen = false;
00095             }
00096             base.OnNavigatedFrom(e);
00097         }
00098
00099         private void TeachingTip_SizeChanged(object sender, SizeChangedEventArgs e)
00100         {
00101             this.TipHeightTextBlock.Text = ((FrameworkElement)sender).ActualHeight.ToString();
00102             this.TipWidthTextBlock.Text = ((FrameworkElement)sender).ActualWidth.ToString();
00103             NotifyPropertyChanged("ActionButton");
00104         }
00105
00106         private void TeachingTipTestHooks_OffsetChanged(TeachingTip sender, object args)
00107         {
00108             if (sender == getTeachingTip())
00109             {
00110                 this.PopupVerticalOffsetTextBlock.Text = TeachingTipTestHooks.GetVerticalOffset(sender).ToString();
00111                 this.PopupHorizontalOffsetTextBlock.Text = TeachingTipTestHooks.GetHorizontalOffset(sender).ToString();
00112             }
00113         }
00114
00115         private void TeachingTipTestHooks_TitleVisibilityChanged(TeachingTip sender, object args)
00116         {
00117             if (sender == getTeachingTip())
00118             {
00119                 this.TitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetTitleVisibility(sender).ToString();
00120             }
00121         }
00122
00123         private void TeachingTipTestHooks_SubtitleVisibilityChanged(TeachingTip sender, object args)
00124         {
00125             if (sender == getTeachingTip())
00126             {
00127                 this.SubtitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetSubtitleVisibility(sender).ToString();
00128             }
00129         }
00130
00131         private void TeachingTipTestHooks_EffectiveHeroContentPlacementChanged(TeachingTip sender, object args)
00132         {
00133             if (sender == getTeachingTip())
00134             {
00135                 var placement = TeachingTipTestHooks.GetEffectiveHeroContentPlacement(sender);
00136                 this.EffectiveHeroContentPlacementTextBlock.Text = placement.ToString();
00137             }
00138         }
00139
00140         private void TeachingTipTestHooks_EffectivePlacementChanged(TeachingTip sender, object args)
00141         {
00142             if (sender == getTeachingTip())
00143             {
00144                 var placement = TeachingTipTestHooks.GetEffectivePlacement(sender);
00145                 this.EffectivePlacementTextBlock.Text = placement.ToString();
00146             }
00147         }
00148
00149         private void ContentScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
00150         {
00151             this.ScrollViewerOffsetTextBox.Text = this.ContentScrollViewer.VerticalOffset.ToString();
00152             if(e.IsIntermediate)
00153             {
00154                 this.ScrollViewerStateTextBox.Text = "Scrolling";
00155             }
00156             else
00157             {
00158                 this.ScrollViewerStateTextBox.Text = "Idle";
00159             }
00160             OnGetTargetBoundsButtonClicked(null, null);
00161         }
00162
00163         private void TeachingTipTestHooks_OpenedStatusChanged(TeachingTip sender, object args)
00164         {
00165             if (this.TeachingTipInResources.IsOpen ||
00166                 this.TeachingTipInVisualTree.IsOpen)
00167             {
00168                 this.IsOpenCheckBox.IsChecked = true;
00169             }
00170             else
00171             {
00172                 this.IsOpenCheckBox.IsChecked = false;
00173             }
00174         }
00175
00176         private void TeachingTipTestHooks_IdleStatusChanged(TeachingTip sender, object args)
00177         {
00178             if (TeachingTipTestHooks.GetIsIdle(this.TeachingTipInResources) &&
00179                 TeachingTipTestHooks.GetIsIdle(this.TeachingTipInVisualTree))
00180             {
00181                 this.IsIdleCheckBox.IsChecked = true;
00182             }
00183             else
00184             {
00185                 this.IsIdleCheckBox.IsChecked = false;
00186             }
00187         }
00188
00189         public void OnSetIconButtonClicked(object sender, RoutedEventArgs args)
00190         {
00191             if (this.IconComboBox.SelectedItem == IconPeople)
00192             {
00193                 SymbolIconSource symbolIconSource = new SymbolIconSource();
00194                 symbolIconSource.Symbol = Symbol.People;
00195                 getTeachingTip().IconSource = symbolIconSource;
00196
00197             }
00198             else
00199             {
00200                 getTeachingTip().IconSource = null;
00201             }
00202         }
00203
00204         public void OnSetTipLocationButton(object sender, RoutedEventArgs args)
00205         {
00206             if (this.TipLocationComboBox.SelectedItem == TipInVisualTree)
00207             {
00208                 if (tipLocation != TipLocation.VisualTree)
00209                 {
00210                     TeachingTipInResources.IsOpen = false;
00211                     tipLocation = TipLocation.VisualTree;
00212                 }
00213                 tipLocation = TipLocation.VisualTree;
00214                 AutomationNameComboBox.SelectedItem = AutomationNameVisualTree;
00215             }
00216             else
00217             {
00218                 if (tipLocation != TipLocation.Resources)
00219                 {
00220                     TeachingTipInVisualTree.IsOpen = false;
00221                     tipLocation = TipLocation.Resources;
00222                 }
00223                 tipLocation = TipLocation.Resources;
00224                 AutomationNameComboBox.SelectedItem = AutomationNameResources;
00225             }
00226             OnSetAutomationNameButtonClicked(null, null);
00227         }
00228
00229         public void OnSetHeroContentButtonClicked(object sender, RoutedEventArgs args)
00230         {
00231             if (this.HeroContentComboBox.SelectedItem == HeroContentRedSquare)
00232             {
00233                 Grid grid = new Grid();
00234                 grid.MinHeight = 200;
00235                 grid.MinWidth = 200;
00236                 grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Red);
00237                 getTeachingTip().HeroContent = grid;
00238             }
00239             else if (this.HeroContentComboBox.SelectedItem == HeroContentBlueSquare)
00240             {
00241                 Grid grid = new Grid();
00242                 grid.MinHeight = 200;
00243                 grid.MinWidth = 200;
00244                 grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Blue);
00245                 getTeachingTip().HeroContent = grid;
00246             }
00247             else if (this.HeroContentComboBox.SelectedItem == HeroContentImage)
00248             {
00249                 Image image = new Image();
00250                 BitmapImage bitmapImage = new BitmapImage();
00251                 image.Width = bitmapImage.DecodePixelWidth = 300;
00252                 bitmapImage.UriSource = new Uri("ms-appx:///Assets/ingredient1.png");
00253                 image.Source = bitmapImage;
00254                 getTeachingTip().HeroContent = image;
00255             }
00256             else if (this.HeroContentComboBox.SelectedItem == HeroContentAutoSave)
00257             {
00258                 Image image = new Image();
00259                 BitmapImage bitmapImage = new BitmapImage();
00260                 bitmapImage.UriSource = new Uri("ms-appx:///Assets/AutoSave.png");
00261                 image.Source = bitmapImage;
00262                 getTeachingTip().HeroContent = image;
00263             }
00264             else
00265             {
00266                 getTeachingTip().HeroContent = null;
00267             }
00268         }
00269
00270         public void OnSetContentButtonClicked(object sender, RoutedEventArgs args)
00271         {
00272             if (this.ContentComboBox.SelectedItem == ContentRedSquare)
00273             {
00274                 Grid grid = new Grid();
00275                 grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Red);
00276                 getTeachingTip().Content = grid;
00277             }
00278             else if (this.ContentComboBox.SelectedItem == ContentBlueSquare)
00279             {
00280                 Grid grid = new Grid();
00281                 grid.Background = new SolidColorBrush(Microsoft.UI.Colors.Blue);
00282                 getTeachingTip().Content = grid;
00283             }
00284             else if (this.ContentComboBox.SelectedItem == ContentImage)
00285             {
00286                 Image image = new Image();
00287                 BitmapImage bitmapImage = new BitmapImage();
00288                 image.Width = bitmapImage.DecodePixelWidth = 300;
00289                 bitmapImage.UriSource = new Uri("ms-appx:///Assets/ingredient1.png");
00290                 image.Source = bitmapImage;
00291                 getTeachingTip().Content = image;
00292             }
00293             else if (this.ContentComboBox.SelectedItem == ContentShort)
00294             {
00295                 TextBlock textBlock = new TextBlock();
00296                 textBlock.Text = "This is shorter content.";
00297                 getTeachingTip().Content = textBlock;
00298             }
00299             else if (this.ContentComboBox.SelectedItem == ContentLong)
00300             {
00301                 TextBlock textBlock = new TextBlock();
00302                 textBlock.Text = "This is longer content. This is longer content. This is longer content. This is longer content. " +
00303                     "This is longer content. This is longer content.This is longer content. This is longer content." +
00304                     "This is longer content.This is longer content.This is longer content. This is longer content." +
00305                     "This is longer content.This is longer content.This is longer content.This is longer content." +
00306                     "This is longer content.This is longer content.This is longer content.This is longer content." +
00307                     "This is longer content.This is longer content.This is longer content.This is longer content." +
00308                     "This is longer content.This is longer content.This is longer content.This is longer content." +
00309                     "This is longer content.This is longer content.This is longer content.This is longer content." +
00310                     "This is longer content.This is longer content.";
00311                 textBlock.TextWrapping = TextWrapping.WrapWholeWords;
00312                 getTeachingTip().Content = textBlock;
00313             }
00314             else if (this.ContentComboBox.SelectedItem == ContentAutoSave)
00315             {
00316                 Image image = new Image();
00317                 BitmapImage bitmapImage = new BitmapImage();
00318                 bitmapImage.UriSource = new Uri("ms-appx:///Assets/AutoSave.png");
00319                 image.Source = bitmapImage;
00320                 getTeachingTip().Content = image;
00321             }
00322             else
00323             {
00324                 getTeachingTip().Content = null;
00325             }
00326         }
00327
00328         public void OnSetTitleButtonClicked(object sender, RoutedEventArgs args)
00329         {
00330             if (this.TitleComboBox.SelectedItem == TitleNo)
00331             {
00332                 getTeachingTip().Title = "";
00333             }
00334             else if (this.TitleComboBox.SelectedItem == TitleSmall)
00335             {
00336                 getTeachingTip().Title = "Short title.";
00337             }
00338             else
00339             {
00340                 getTeachingTip().Title = "This is a much longer title that might cause some issues if we don't do the right thing...";
00341             }
00342         }
00343
00344         public void OnSetSubtitleButtonClicked(object sender, RoutedEventArgs args)
00345         {
00346             if (this.SubtitleComboBox.SelectedItem == SubtitleNo)
00347             {
00348                 getTeachingTip().Subtitle = "";
00349             }
00350             else if (this.SubtitleComboBox.SelectedItem == SubtitleSmall)
00351             {
00352                 getTeachingTip().Subtitle = "Short Subtitle.";
00353             }
00354             else
00355             {
00356                 getTeachingTip().Subtitle = "This is a much longer subtitle that might cause some issues if we don't do the right thing..." +
00357                     "This is a much longer subtitle that might cause some issues if we don't do the right thing...";
00358             }
00359         }
00360
00361         public void OnSetActionButtonContentButtonClicked(object sender, RoutedEventArgs args)
00362         {
00363             if (this.ActionButtonContentComboBox.SelectedItem == ActionButtonContentNo)
00364             {
00365                 getTeachingTip().ActionButtonContent = "";
00366             }
00367             else if (this.ActionButtonContentComboBox.SelectedItem == ActionButtonContentSmall)
00368             {
00369                 getTeachingTip().ActionButtonContent = "A:Short Text.";
00370             }
00371             else if (this.ActionButtonContentComboBox.SelectedItem == ActionButtonContentLong)
00372             {
00373                 getTeachingTip().ActionButtonContent = "A:This is a much longer button text that might cause some issues if we don't do the right thing...";
00374             }
00375             else
00376             {
00377                 var button = new Button();
00378                 button.Content = "A:Button in a Button!";
00379                 getTeachingTip().ActionButtonContent = button;
00380             }
00381             NotifyPropertyChanged("ActionButton");
00382         }
00383
00384         public void OnSetCloseButtonContentButtonClicked(object sender, RoutedEventArgs args)
00385         {
00386             if (this.CloseButtonContentComboBox.SelectedItem == CloseButtonContentNo)
00387             {
00388                 getTeachingTip().CloseButtonContent = "";
00389             }
00390             else if (this.CloseButtonContentComboBox.SelectedItem == CloseButtonContentSmall)
00391             {
00392                 getTeachingTip().CloseButtonContent = "C:Short Text.";
00393             }
00394             else if (this.CloseButtonContentComboBox.SelectedItem == CloseButtonContentLong)
00395             {
00396                 getTeachingTip().CloseButtonContent = "C:This is a much longer button text that might cause some issues if we don't do the right thing...";
00397             }
00398             else
00399             {
00400                 var button = new Button();
00401                 button.Content = "C:Button in a Button!";
00402                 getTeachingTip().CloseButtonContent = button;
00403             }
00404         }
00405
00406         public void OnSetBleeingImagePlacementButtonClicked(object sender, RoutedEventArgs args)
00407         {
00408             if(this.HeroContentPlacementComboBox.SelectedItem == HeroContentPlacementAuto)
00409             {
00410                 getTeachingTip().HeroContentPlacement = TeachingTipHeroContentPlacementMode.Auto;
00411             }
00412             else if(this.HeroContentPlacementComboBox.SelectedItem == HeroContentPlacementTop)
00413             {
00414                 getTeachingTip().HeroContentPlacement = TeachingTipHeroContentPlacementMode.Top;
00415             }
00416             else
00417             {
00418                 getTeachingTip().HeroContentPlacement = TeachingTipHeroContentPlacementMode.Bottom;
00419             }
00420         }
00421         public void OnGetTargetBoundsButtonClicked(object sender, RoutedEventArgs args)
00422         {
00423             var bounds = this.targetButton.TransformToVisual(null).TransformBounds(new Rect(0.0,
00424                 0.0,
00425                 this.targetButton.ActualWidth,
00426                 this.targetButton.ActualHeight));
00427
00428             this.TargetXOffsetTextBlock.Text = bounds.X.ToString();
00429             this.TargetYOffsetTextBlock.Text = bounds.Y.ToString();
00430             this.TargetWidthTextBlock.Text = bounds.Width.ToString();
00431             this.TargetHeightTextBlock.Text = bounds.Height.ToString();
00432         }
00433
00434         public void OnSetScrollViewerOffsetButtonClicked(object sender, RoutedEventArgs args)
00435         {
00436             this.ContentScrollViewer.ChangeView(0, double.Parse(this.ScrollViewerOffsetTextBox.Text), 1);
00437         }
00438
00439         public void OnBringTargetIntoViewButtonClicked(object sender, RoutedEventArgs args)
00440         {
00441             this.targetButton.StartBringIntoView(new BringIntoViewOptions());
00442         }
00443
00444         public void OnUseTestWindowBoundsCheckBoxChecked(object sender, RoutedEventArgs args)
00445         {
00446             var tip = getTeachingTip();
00447             Rect windowRect = new Rect(double.Parse(this.TestWindowBoundsXTextBox.Text),
00448                                        double.Parse(this.TestWindowBoundsYTextBox.Text),
00449                                        double.Parse(this.TestWindowBoundsWidthTextBox.Text),
00450                                        double.Parse(this.TestWindowBoundsHeightTextBox.Text));
00451             TeachingTipTestHooks.SetUseTestWindowBounds(tip, true);
00452             TeachingTipTestHooks.SetTestWindowBounds(tip, windowRect);
00453             if(testWindowBounds == null)
00454             {
00455                 testWindowBounds = new Popup();
00456                 testWindowBounds.IsHitTestVisible = false;
00457                 testWindowBounds.XamlRoot = this.XamlRoot;
00458             }
00459             Grid windowBounds = new Grid();
00460             windowBounds.Width = windowRect.Width;
00461             windowBounds.Height = windowRect.Height;
00462             windowBounds.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
00463             windowBounds.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
00464             windowBounds.BorderThickness = new Thickness(1.0);
00465             testWindowBounds.Child = windowBounds;
00466             testWindowBounds.HorizontalOffset = windowRect.X;
00467             testWindowBounds.VerticalOffset = windowRect.Y;
00468             testWindowBounds.IsOpen = true;
00469         }
00470
00471         public void OnUseTestSreenBoundsCheckBoxChecked(object sender, RoutedEventArgs args)
00472         {
00473             var tip = getTeachingTip();
00474             Rect screenRect = new Rect(double.Parse(this.TestScreenBoundsXTextBox.Text),
00475                                        double.Parse(this.TestScreenBoundsYTextBox.Text),
00476                                        double.Parse(this.TestScreenBoundsWidthTextBox.Text),
00477                                        double.Parse(this.TestScreenBoundsHeightTextBox.Text));
00478             TeachingTipTestHooks.SetUseTestScreenBounds(tip, true);
00479             TeachingTipTestHooks.SetTestScreenBounds(tip, screenRect);
00480             if (testScreenBounds == null)
00481             {
00482                 testScreenBounds = new Popup();
00483                 testScreenBounds.IsHitTestVisible = false;
00484                 testScreenBounds.XamlRoot = this.XamlRoot;
00485             }
00486             Grid windowBounds = new Grid();
00487             windowBounds.Width = screenRect.Width;
00488             windowBounds.Height = screenRect.Height;
00489             windowBounds.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
00490             windowBounds.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Blue);
00491             windowBounds.BorderThickness = new Thickness(1.0);
00492             testScreenBounds.Child = windowBounds;
00493             testScreenBounds.HorizontalOffset = screenRect.X;
00494             testScreenBounds.VerticalOffset = screenRect.Y;
00495             testScreenBounds.IsOpen = true;
00496         }
00497
00498         public void OnUseTestWindowBoundsCheckBoxUnchecked(object sender, RoutedEventArgs args)
00499         {
00500             TeachingTipTestHooks.SetUseTestWindowBounds(getTeachingTip(), false);
00501             testWindowBounds.IsOpen = false;
00502         }
00503
00504         public void OnUseTestScreenBoundsCheckBoxUnchecked(object sender, RoutedEventArgs args)
00505         {
00506             TeachingTipTestHooks.SetUseTestScreenBounds(getTeachingTip(), false);
00507             testScreenBounds.IsOpen = false;
00508         }
00509
00510         public void OnTipFollowsTargetCheckBoxChecked(object sender, RoutedEventArgs args)
00511         {
00512             TeachingTipTestHooks.SetTipFollowsTarget(getTeachingTip(), true);
00513         }
00514
00515         public void OnTipFollowsTargetCheckBoxUnchecked(object sender, RoutedEventArgs args)
00516         {
00517             TeachingTipTestHooks.SetTipFollowsTarget(getTeachingTip(), false);
00518         }
00519
00520         public void OnReturnTopForOutOfWindowPlacementCheckBoxChecked(object sender, RoutedEventArgs args)
00521         {
00522             TeachingTipTestHooks.SetReturnTopForOutOfWindowPlacement(getTeachingTip(), true);
00523         }
00524
00525         public void OnReturnTopForOutOfWindowPlacementCheckBoxUnchecked(object sender, RoutedEventArgs args)
00526         {
00527             TeachingTipTestHooks.SetReturnTopForOutOfWindowPlacement(getTeachingTip(), false);
00528         }
00529
00530         public void OnSetPreferredPlacementButtonClicked(object sender, RoutedEventArgs args)
00531         {
00532             if (this.PreferredPlacementComboBox.SelectedItem == PlacementTop)
00533             {
00534                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Top;
00535             }
00536             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementBottom)
00537             {
00538                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Bottom;
00539             }
00540             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementLeft)
00541             {
00542                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Left;
00543             }
00544             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementRight)
00545             {
00546                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Right;
00547             }
00548             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementTopRight)
00549             {
00550                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.TopRight;
00551             }
00552             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementTopLeft)
00553             {
00554                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.TopLeft;
00555             }
00556             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementBottomRight)
00557             {
00558                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.BottomRight;
00559             }
00560             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementBottomLeft)
00561             {
00562                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.BottomLeft;
00563             }
00564             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementLeftTop)
00565             {
00566                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.LeftTop;
00567             }
00568             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementLeftBottom)
00569             {
00570                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.LeftBottom;
00571             }
00572             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementRightTop)
00573             {
00574                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.RightTop;
00575             }
00576             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementRightBottom)
00577             {
00578                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.RightBottom;
00579             }
00580             else if (this.PreferredPlacementComboBox.SelectedItem == PlacementCenter)
00581             {
00582                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Center;
00583             }
00584             else
00585             {
00586                 getTeachingTip().PreferredPlacement = TeachingTipPlacementMode.Auto;
00587             }
00588         }
00589
00590         public void OnSetIsLightDismissEnabledButtonClicked(object sender, RoutedEventArgs args)
00591         {
00592             if(this.IsLightDismissEnabledComboBox.SelectedItem == IsLightDismissFalse)
00593             {
00594                 getTeachingTip().IsLightDismissEnabled = false;
00595             }
00596             else
00597             {
00598                 getTeachingTip().IsLightDismissEnabled = true;
00599             }
00600         }
00601
00602         public void OnSetShouldConstrainToRootBoundsButtonClicked(object sender, RoutedEventArgs args)
00603         {
00604             if(this.ShouldConstrainToRootBoundsComboBox.SelectedItem == ShouldConstrainToRootBoundsFalse)
00605             {
00606                 getTeachingTip().ShouldConstrainToRootBounds = false;
00607             }
00608             else
00609             {
00610                 getTeachingTip().ShouldConstrainToRootBounds = true;
00611             }
00612         }
00613
00614         public void OnSetPlacementMarginButtonClicked(object sender, RoutedEventArgs args)
00615         {
00616             getTeachingTip().PlacementMargin = new Thickness(Double.Parse(this.PlacementMarginTextBox.Text));
00617         }
00618
00619         public void OnSetTailVisibilityButtonClicked(object sender, RoutedEventArgs args)
00620         {
00621             if (this.TailVisibilityComboBox.SelectedItem == TailVisibilityAuto)
00622             {
00623                 getTeachingTip().TailVisibility = TeachingTipTailVisibility.Auto;
00624             }
00625             else if (this.TailVisibilityComboBox.SelectedItem == TailVisibilityVisible)
00626             {
00627                 getTeachingTip().TailVisibility = TeachingTipTailVisibility.Visible;
00628             }
00629             else
00630             {
00631                 getTeachingTip().TailVisibility = TeachingTipTailVisibility.Collapsed;
00632             }
00633         }
00634
00635         public void OnSetTargetButtonClicked(object sender, RoutedEventArgs args)
00636         {
00637             getTeachingTip().Target = this.targetButton;
00638         }
00639
00640         public void OnUntargetButtonClicked(object sender, RoutedEventArgs args)
00641         {
00642             getTeachingTip().Target = null;
00643         }
00644
00645         public void OnShowButtonClicked(object sender, RoutedEventArgs args)
00646         {
00647             getTeachingTip().IsOpen = true;
00648             switch (tipLocation)
00649             {
00650                 case TipLocation.VisualTree:
00651                     if (TeachingTipInVisualTreeRoot == null)
00652                     {
00653                         getCancelClosesInTeachingTip().Loaded += TeachingTipInVisualTreeRoot_Loaded; ;
00654                     }
00655                     else
00656                     {
00657                         TeachingTipInVisualTreeRoot.SizeChanged += TeachingTip_SizeChanged;
00658                         TeachingTip_SizeChanged(TeachingTipInVisualTreeRoot, null);
00659                     }
00660                     break;
00661                 default:
00662                     if (TeachingTipInResourcesRoot == null)
00663                     {
00664                         getCancelClosesInTeachingTip().Loaded += TeachingTipInResourcesRoot_Loaded;
00665                     }
00666                     else
00667                     {
00668                         TeachingTipInResourcesRoot.SizeChanged += TeachingTip_SizeChanged;
00669                         TeachingTip_SizeChanged(TeachingTipInResourcesRoot, null);
00670                     }
00671                     break;
00672             }
00673
00674             CurrentCancelClosesCheckBox = getCancelClosesInTeachingTip();
00675             NotifyPropertyChanged("CurrentCancelClosesCheckBox");
00676         }
00677
00678         public void OnShowButtonClickedRightEdge(object sender, RoutedEventArgs args)
00679         {
00680             TeachingTipInResourcesOnEdge.IsOpen = true;
00681             TeachingTipInResourcesOnEdge.SizeChanged += TeachingTip_SizeChanged;
00682             TeachingTip_SizeChanged(TeachingTipInResourcesOnEdge, null);
00683         }
00684
00685         public void GetEdgeTeachingTipOffset_Clicked(object sender, RoutedEventArgs args)
00686         {
00687             EdgeTeachingTipOffset.Text = TeachingTipTestHooks.GetHorizontalOffset(TeachingTipInResourcesOnEdge).ToString()
00688                 + ";" + TeachingTipTestHooks.GetVerticalOffset(TeachingTipInResourcesOnEdge).ToString();
00689         }
00690
00691         public void OnShowAfterDelayButtonClicked(object sender, RoutedEventArgs args)
00692         {
00693             showTimer = new DispatcherTimer();
00694             showTimer.Interval = new TimeSpan(0, 0, 2);
00695             showTimer.Tick += ShowTimerTick;
00696             showTimer.Start();
00697         }
00698
00699         private void ShowTimerTick(object sender, object e)
00700         {
00701             showTimer.Tick -= ShowTimerTick;
00702             showTimer.Stop();
00703             OnShowButtonClicked(null, null);
00704         }
00705
00706         private void TeachingTipInResourcesRoot_Loaded(object sender, RoutedEventArgs e)
00707         {
00708             ((FrameworkElement)sender).Loaded -= TeachingTipInResourcesRoot_Loaded;
00709             TeachingTipInResourcesRoot = getTeachingTipRoot(getCancelClosesInTeachingTip());
00710             TeachingTipInResourcesRoot.SizeChanged += TeachingTip_SizeChanged;
00711             TeachingTip_SizeChanged(TeachingTipInResourcesRoot, null);
00712             this.TitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetTitleVisibility(this.TeachingTipInResources).ToString();
00713             this.SubtitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetSubtitleVisibility(this.TeachingTipInResources).ToString();
00714         }
00715
00716         private void TeachingTipInVisualTreeRoot_Loaded(object sender, RoutedEventArgs e)
00717         {
00718             ((FrameworkElement)sender).Loaded -= TeachingTipInVisualTreeRoot_Loaded;
00719             TeachingTipInVisualTreeRoot = getTeachingTipRoot(getCancelClosesInTeachingTip());
00720             TeachingTipInVisualTreeRoot.SizeChanged += TeachingTip_SizeChanged;
00721             TeachingTip_SizeChanged(TeachingTipInVisualTreeRoot, null);
00722
00723             this.TitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetTitleVisibility(this.TeachingTipInVisualTree).ToString();
00724             this.SubtitleVisibilityTextBlock.Text = TeachingTipTestHooks.GetSubtitleVisibility(this.TeachingTipInVisualTree).ToString();
00725         }
00726
00727         public void OnCloseButtonClicked(object sender, RoutedEventArgs args)
00728         {
00729             getTeachingTip().IsOpen = false;
00730         }
00731
00732         public void OnSetAutomationNameButtonClicked(object sender, RoutedEventArgs args)
00733         {
00734             var tip = getTeachingTip();
00735             if(this.AutomationNameComboBox.SelectedItem == AutomationNameVisualTree)
00736             {
00737                 AutomationProperties.SetName(tip, "TeachingTipInVisualTree");
00738             }
00739             else if(this.AutomationNameComboBox.SelectedItem == AutomationNameResources)
00740             {
00741                 AutomationProperties.SetName(tip, "TeachingTipInResources");
00742             }
00743             else
00744             {
00745                 AutomationProperties.SetName(tip, "");
00746             }
00747         }
00748
00749         public void OnSetTargetVerticalAlignmentButtonClicked(object sender, RoutedEventArgs args)
00750         {
00751             if(TargetVerticalAlignmentComboBox.SelectedItem == TargetVerticalAlignmentTop)
00752             {
00753                 getTeachingTip().VerticalAlignment = VerticalAlignment.Top;
00754             }
00755             else if (TargetVerticalAlignmentComboBox.SelectedItem == TargetVerticalAlignmentCenter)
00756             {
00757                 getTeachingTip().VerticalAlignment = VerticalAlignment.Center;
00758             }
00759             else
00760             {
00761                 getTeachingTip().VerticalAlignment = VerticalAlignment.Bottom;
00762             }
00763             OnGetTargetBoundsButtonClicked(null, null);
00764         }
00765         public void OnSetTargetHorizontalAlignmentButtonClicked(object sender, RoutedEventArgs args)
00766         {
00767             if (TargetHorizontalAlignmentComboBox.SelectedItem == TargetHorizontalAlignmentLeft)
00768             {
00769                 this.targetButton.HorizontalAlignment = HorizontalAlignment.Left;
00770             }
00771             else if (TargetHorizontalAlignmentComboBox.SelectedItem == TargetHorizontalAlignmentCenter)
00772             {
00773                 this.targetButton.HorizontalAlignment = HorizontalAlignment.Center;
00774             }
00775             else
00776             {
00777                 this.targetButton.HorizontalAlignment = HorizontalAlignment.Right;
00778             }
00779             OnGetTargetBoundsButtonClicked(null, null);
00780         }
00781
00782         public void OnSetAnimationParametersButtonClicked(object sender, RoutedEventArgs args)
00783         {
00784             var expandEasing = CompositionTarget.GetCompositorForCurrentThread().CreateCubicBezierEasingFunction(
00785                 new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint1X.Text), float.Parse(this.ExpandControlPoint1Y.Text)),
00786                 new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint2X.Text), float.Parse(this.ExpandControlPoint2Y.Text)));
00787
00788             var contractEasing = CompositionTarget.GetCompositorForCurrentThread().CreateCubicBezierEasingFunction(
00789                 new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint1X.Text), float.Parse(this.ExpandControlPoint1Y.Text)),
00790                 new System.Numerics.Vector2(float.Parse(this.ExpandControlPoint2X.Text), float.Parse(this.ExpandControlPoint2Y.Text)));
00791
00792             var tip = getTeachingTip();
00793             TeachingTipTestHooks.SetExpandEasingFunction(tip, expandEasing);
00794             TeachingTipTestHooks.SetContractEasingFunction(tip, contractEasing);
00795         }
00796
00797         public void OnSetAnimationDurationsButtonClicked(object sender, RoutedEventArgs args)
00798         {
00799             var expandDuration = new TimeSpan(0, 0, 0, 0, int.Parse(ExpandAnimationDuration.Text));
00800             var contractDuration = new TimeSpan(0, 0, 0, 0, int.Parse(ContractAnimationDuration.Text));
00801             TeachingTipTestHooks.SetExpandAnimationDuration(getTeachingTip(), expandDuration);
00802             TeachingTipTestHooks.SetContractAnimationDuration(getTeachingTip(), contractDuration);
00803         }
00804
00805         public void ContentElevationSliderChanged(object sender, RangeBaseValueChangedEventArgs args)
00806         {
00807             TeachingTipTestHooks.SetContentElevation(getTeachingTip(), (float)args.NewValue);
00808         }
00809
00810         public void TailElevationSliderChanged(object sender, RangeBaseValueChangedEventArgs args)
00811         {
00812             TeachingTipTestHooks.SetTailElevation(getTeachingTip(), (float)args.NewValue);
00813         }
00814
00815         public void OnTipShadowChecked(object sender, RoutedEventArgs args)
00816         {
00817             TeachingTipTestHooks.SetTipShouldHaveShadow(getTeachingTip(), true);
00818         }
00819
00820         public void OnTipShadowUnchecked(object sender, RoutedEventArgs args)
00821         {
00822             TeachingTipTestHooks.SetTipShouldHaveShadow(getTeachingTip(), false);
00823         }
00824
00825         public void OnTeachingTipClosed(object sender, TeachingTipClosedEventArgs args)
00826         {
00827             if (lstTeachingTipEvents != null)
00828             {
00829                 lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + args.ToString() + " Reason: " + args.Reason.ToString());
00830                 lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
00831             }
00832         }
00833
00834         public void OnTeachingTipClosing(TeachingTip sender, TeachingTipClosingEventArgs args)
00835         {
00836             if (lstTeachingTipEvents != null)
00837             {
00838                 lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + args.ToString() + " Reason: " + args.Reason.ToString());
00839                 lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
00840             }
00841
00842             CheckBox cancelClosesCheckBox = null;
00843             if (sender == TeachingTipInResources)
00844             {
00845                 cancelClosesCheckBox = CancelClosesCheckBoxInResources;
00846             }
00847             else
00848             {
00849                 cancelClosesCheckBox = CancelClosesCheckBoxInVisualTree;
00850             }
00851
00852             if (cancelClosesCheckBox != null && cancelClosesCheckBox.IsChecked == true)
00853             {
00854                 deferral = args.GetDeferral();
00855                 args.Cancel = true;
00856                 timer = new DispatcherTimer();
00857                 timer.Tick += Timer_Tick;
00858                 timer.Interval = new TimeSpan(0, 0, 1);
00859                 timer.Start();
00860             }
00861         }
00862
00863         private void Timer_Tick(object sender, object e)
00864         {
00865             timer.Stop();
00866             deferral.Complete();
00867         }
00868
00869         public void OnTeachingTipActionButtonClicked(object sender, object args)
00870         {
00871             lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + "Action Button Clicked Event");
00872             lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
00873         }
00874
00875         public void OnTeachingTipCloseButtonClicked(object sender, object args)
00876         {
00877             lstTeachingTipEvents.Items.Add(lstTeachingTipEvents.Items.Count.ToString() + ") " + "Close Button Clicked Event");
00878             lstTeachingTipEvents.ScrollIntoView(lstTeachingTipEvents.Items.Last<object>());
00879         }
00880
00881         private void BtnClearTeachingTipEvents_Click(object sender, RoutedEventArgs e)
00882         {
00883             this.lstTeachingTipEvents.Items.Clear();
00884         }
00885
00886         private TeachingTip getTeachingTip()
00887         {
00888             switch(tipLocation)
00889             {
00890                 case TipLocation.VisualTree:
00891                     return this.TeachingTipInVisualTree;
00892                 default:
00893                     return this.TeachingTipInResources;
00894             }
00895         }
00896
00897         private CheckBox getCancelClosesInTeachingTip()
00898         {
00899             switch(tipLocation)
00900             {
00901                 case TipLocation.VisualTree:
00902                     return this.CancelClosesCheckBoxInVisualTree;
00903                 default:
00904                     return this.CancelClosesCheckBoxInResources;
00905             }
00906         }
00907
00908         private FrameworkElement getTeachingTipRoot(UIElement cancelClosesCheckBox)
00909         {
00910             DependencyObject current = cancelClosesCheckBox;
00911             for(int i = 0; i < 11; i++)
00912             {
00913                 current = VisualTreeHelper.GetParent(current);
00914             }
00915             return (FrameworkElement)current;
00916         }
00917
00918         public bool IsPageRTL
00919         {
00920             get => FlowDirection == FlowDirection.RightToLeft;
00921             set
00922             {
00923                 FlowDirection newFlowDirection = value ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
00924                 if (FlowDirection != newFlowDirection)
00925                 {
00926                     FlowDirection = newFlowDirection;
00927                     NotifyPropertyChanged();
00928                 }
00929             }
00930         }
00931
00932         private void OnPageThemeComboBoxSelectionChanged(object sender, SelectionChangedEventArgs e)
00933         {
00934             var selectedItem = ((ComboBoxItem)PageThemeComboBox.SelectedItem);
00935             if (String.Equals(selectedItem?.Content, "Light"))
00936             {
00937                 RequestedTheme = ElementTheme.Light;
00938             }
00939             else if (String.Equals(selectedItem?.Content, "Dark"))
00940             {
00941                 RequestedTheme = ElementTheme.Dark;
00942             }
00943             else
00944             {
00945                 RequestedTheme = ElementTheme.Default;
00946             }
00947         }
00948
00949         public void OnSwitchTargetButtonClicked(object sender, RoutedEventArgs args)
00950         {
00951             var newTarget = getTeachingTip().Target == targetButton ? targetButton2 : targetButton;
00952             getTeachingTip().Target = newTarget;
00953         }
00954
00955         public Button ActionButton
00956         {
00957             get
00958             {
00959                 var popupChild = TeachingTipTestHooks.GetPopup(getTeachingTip())?.Child as FrameworkElement;
00960                 if (popupChild != null)
00961                 {
00962                     return (Button)FindVisualChildByName(popupChild, "ActionButton");
00963                 }
00964                 return null;
00965             }
00966         }
00967
00968         public string BrushToString(Brush brush)
00969         {
00970             if (brush is SolidColorBrush solidBrush)
00971             {
00972                 return String.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", solidBrush.Color.A, solidBrush.Color.R, solidBrush.Color.G, solidBrush.Color.B);
00973             }
00974
00975             return "Unknown";
00976         }
00977
00978         private void RemoveTeachingTipButton_Click(object sender, RoutedEventArgs e)
00979         {
00980             ContentStackPanel.Children.Remove(TeachingTipInVisualTree);
00981             ContentStackPanel.Children.Remove(TeachingTipInResources);
00982         }
00983
00984         private void RemoveTeachingTipTextBlockContent_Unloaded(object sender, RoutedEventArgs e)
00985         {
00986             VisualTreeTeachingTipContentTextBlockUnloaded.IsChecked = true;
00987         }
00988
00989         private void RemoveOpenButton_Click(object sender, RoutedEventArgs e)
00990         {
00991             ContentStackPanel.Children.Remove(targetButton);
00992         }
00993
00994     }
00995 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ItemsControlPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ItemsControlPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     [TopLevelTestPage(Name="ItemsControl", Icon="ListView.png")]
00009     public sealed partial class ItemsControlPage : TestPage
00010     {
00011         public ItemsControlPage()
00012         {
00013             this.InitializeComponent();
00014
00015             navigateToFlatItemsControl.Click += delegate { Frame.NavigateWithoutAnimation(typeof(FlatItemsControlPage)); };
00016             navigateToGroupedItemsControl.Click += delegate { Frame.NavigateWithoutAnimation(typeof(GroupedItemsControlPage)); };
00017             navigateToNestedItemsControls.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NestedItemsControlsPage)); };
00018         }
00019     }
00020 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarPanningInfo Member List

This is the complete list of members for AnnotatedScrollBarPanningInfo, including all inherited members.
abi_enter() | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
AnnotatedScrollBarPanningInfo() | AnnotatedScrollBarPanningInfo |
Changed(const winrt::TypedEventHandler< winrt::IScrollControllerPanningInfo, winrt::IInspectable > &handler) | AnnotatedScrollBarPanningInfo |
Changed(const winrt::event_token &token) | AnnotatedScrollBarPanningInfo |
CheckThread() | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< AnnotatedScrollBarPanningInfo > &&self) noexcept | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
EnsureThumbAnimation() | AnnotatedScrollBarPanningInfo | [private]
final_release(std::unique_ptr< AnnotatedScrollBarPanningInfo > &&self) | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline, static]
GetBase() | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
GetInner() | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
IsOnThread() | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
IsRailEnabled() | AnnotatedScrollBarPanningInfo |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
PanningElementAncestor() | AnnotatedScrollBarPanningInfo |
PanningElementAncestor(const winrt::UIElement &value) | AnnotatedScrollBarPanningInfo |
PanningElementOffsetMultiplier(float value) | AnnotatedScrollBarPanningInfo |
PanningFrameworkElement(const winrt::FrameworkElement &value) | AnnotatedScrollBarPanningInfo |
PanOrientation() | AnnotatedScrollBarPanningInfo |
PanRequested(const winrt::TypedEventHandler< winrt::IScrollControllerPanningInfo, winrt::ScrollControllerPanRequestedEventArgs > &handler) | AnnotatedScrollBarPanningInfo |
PanRequested(const winrt::event_token &token) | AnnotatedScrollBarPanningInfo |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
RaiseChanged() | AnnotatedScrollBarPanningInfo | [private]
RaisePanRequested(const winrt::PointerPoint &pointerPoint) | AnnotatedScrollBarPanningInfo |
ReferenceTracker(Args &&...args) | ReferenceTracker< AnnotatedScrollBarPanningInfo, reference_tracker_implements_t< winrt::IScrollControllerPanningInfo >::type > | [inline]
SetPanningElementExpressionAnimationSources(const winrt::CompositionPropertySet &propertySet, const winrt::hstring &minOffsetPropertyName, const winrt::hstring &maxOffsetPropertyName, const winrt::hstring &offsetPropertyName, const winrt::hstring &multiplierPropertyName) | AnnotatedScrollBarPanningInfo |
StartThumbAnimation() | AnnotatedScrollBarPanningInfo | [private]
StopThumbAnimation() | AnnotatedScrollBarPanningInfo | [private]
UpdatePanningElementOffsetMultiplier() | AnnotatedScrollBarPanningInfo | [private]
UpdateThumbExpression() | AnnotatedScrollBarPanningInfo | [private]
~AnnotatedScrollBarPanningInfo() | AnnotatedScrollBarPanningInfo |
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RepeatedZoomSnapPoint Member List

This is the complete list of members for RepeatedZoomSnapPoint, including all inherited members.
Combine(int &combinationCount, winrt::SnapPointBase const &snapPoint) const | RepeatedZoomSnapPoint |
CreateConditionalExpression(std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | RepeatedZoomSnapPoint |
CreateRestingPointExpression(double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | RepeatedZoomSnapPoint |
DetermineActualApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint) | RepeatedZoomSnapPoint |
DetermineActualImpulseApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue) | RepeatedZoomSnapPoint |
DetermineFirstRepeatedSnapPointValue() const | RepeatedZoomSnapPoint | [private]
DetermineLastRepeatedSnapPointValue() const | RepeatedZoomSnapPoint | [private]
DetermineMaxActualApplicableZone(const SnapPointBase *nextSnapPoint) const | RepeatedZoomSnapPoint | [private]
DetermineMaxActualImpulseApplicableZone(const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double nextIgnoredValue) const | RepeatedZoomSnapPoint | [private]
DetermineMinActualApplicableZone(const SnapPointBase *previousSnapPoint) const | RepeatedZoomSnapPoint | [private]
DetermineMinActualImpulseApplicableZone(const SnapPointBase *previousSnapPoint, double currentIgnoredValue, double previousIgnoredValue) const | RepeatedZoomSnapPoint | [private]
End() | RepeatedZoomSnapPoint |
Evaluate(std::tuple< double, double > actualApplicableZone, double value) const | RepeatedZoomSnapPoint |
ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const | RepeatedZoomSnapPoint |
Influence(double edgeOfMidpoint) const | RepeatedZoomSnapPoint |
Interval() | RepeatedZoomSnapPoint |
Offset() | RepeatedZoomSnapPoint |
RepeatedZoomSnapPoint(double offset, double interval, double start, double end) | RepeatedZoomSnapPoint |
SnapCount() const | RepeatedZoomSnapPoint |
SortPredicate() const | RepeatedZoomSnapPoint |
Start() | RepeatedZoomSnapPoint |
UpdateConditionalExpressionAnimationForImpulse(winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const | RepeatedZoomSnapPoint |
UpdateRestingPointExpressionAnimationForImpulse(winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const | RepeatedZoomSnapPoint |
ValidateConstructorParameters(double offset, double interval, double start, double end) const | RepeatedZoomSnapPoint | [private]
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewSummaryPage.xaml.cs Source File

  • File List
  • File Members
  • ItemsView
  • TestUI

ItemsViewSummaryPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Linq;
00008 using Microsoft.UI;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Media.Imaging;
00014 using Microsoft.UI.Xaml.Navigation;
00015 using Microsoft.UI.Private.Controls;
00016 using Windows.Foundation;
00017 using MUXControlsTestApp.Samples.Model;
00018
00019 namespace MUXControlsTestApp
00020 {
00021     public sealed partial class ItemsViewSummaryPage : TestPage
00022     {
00023         private enum QueuedOperationType
00024         {
00025             SetWidth,
00026             SetHeight,
00027             StartBringItemIntoView,
00028             DataSourceAdd,
00029             DataSourceInsert,
00030             DataSourceRemove,
00031             DataSourceRemoveAll,
00032             DataSourceReplace
00033         }
00034
00035         private class QueuedOperation
00036         {
00037             public QueuedOperation(QueuedOperationType type)
00038             {
00039                 this.Type = type;
00040             }
00041
00042             public QueuedOperation(QueuedOperationType type, double value)
00043             {
00044                 this.Type = type;
00045                 this.DoubleValue = value;
00046             }
00047
00048             public QueuedOperation(QueuedOperationType type, int value)
00049             {
00050                 this.Type = type;
00051                 this.IntValue = value;
00052             }
00053
00054             public QueuedOperation(QueuedOperationType type, string value)
00055             {
00056                 this.Type = type;
00057                 this.StringValue = value;
00058             }
00059
00060             public QueuedOperationType Type { get; set; }
00061             public double DoubleValue { get; set; }
00062             public int IntValue { get; set; }
00063             public string StringValue { get; set; }
00064         }
00065
00066         private string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00067         private object _asyncEventReportingLock = new object();
00068         private List<string> _lstAsyncEventMessage = new List<string>();
00069         private List<string> _fullLogs = new List<string>();
00070         private List<QueuedOperation> _lstQueuedOperations = new List<QueuedOperation>();
00071         private List<int> _lstLinedFlowLayoutLockedItemIndexes = new List<int>();
00072         private SolidColorBrush _redBrush = new SolidColorBrush(Colors.Red);
00073         private SolidColorBrush _whiteBrush = new SolidColorBrush(Colors.White);
00074         private ItemsView _dynamicItemsView = null;
00075         private ItemsView _itemsView = null;
00076         private ObservableCollection<Entity> _colEntities = null;
00077         private ObservableCollection<Entity> _colSmallEntities = null;
00078         private ObservableCollection<Entity> _colSmallUniformEntities = null;
00079         private ObservableCollection<ItemContainer> _colSmallItemContainers = null;
00080         private ObservableCollection<Image> _colSmallImages = null;
00081         private List<Entity> _lstEntities = null;
00082         private DataTemplate[] _entityTemplates = new DataTemplate[17];
00083         private StackLayout _stackLayout = null;
00084         private UniformGridLayout _uniformGridLayout = null;
00085         private FlowLayout _flowLayout = null;
00086         private LinedFlowLayout _linedFlowLayout = null;
00087         private DispatcherTimer _queuedOperationsTimer = new DispatcherTimer();
00088         private PointerEventHandler _itemsViewPointerWheelChangedEventHandler = null;
00089         private PointerEventHandler _scrollViewPointerWheelChangedEventHandler = null;
00090         private long _currentItemIndexChangedToken;
00091
00092         public ItemsViewSummaryPage()
00093         {
00094             this.InitializeComponent();
00095
00096             UseItemsView(markupItemsView);
00097
00098             if (chkLogItemsViewMessages.IsChecked == false &&
00099                 (chkLogScrollViewMessages.IsChecked == true || chkLogItemsRepeaterMessages.IsChecked == true || chkLogLinedFlowLayoutMessages.IsChecked == true))
00100             {
00101                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00102
00103                 if (chkLogLinedFlowLayoutMessages.IsChecked == true)
00104                 {
00105                     LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
00106                     LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
00107                     LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;
00108
00109                     MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00110                 }
00111                 if (chkLogItemsRepeaterMessages.IsChecked == true)
00112                 {
00113                     MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00114                 }
00115                 if (chkLogScrollViewMessages.IsChecked == true)
00116                 {
00117                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00118                 }
00119             }
00120
00121             if (chkItemsViewMethods != null && svItemsViewMethods != null)
00122             {
00123                 svItemsViewMethods.Visibility = chkItemsViewMethods.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
00124             }
00125
00126             _queuedOperationsTimer.Interval = new TimeSpan(0, 0, 4 /*sec*/);
00127             _queuedOperationsTimer.Tick += QueuedOperationsTimer_Tick;
00128
00129             LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked2;
00130
00131             this.KeyDown += ItemsViewSummaryPage_KeyDown;
00132         }
00133
00134         ~ItemsViewSummaryPage()
00135         {
00136         }
00137
00138         private void ItemsViewSummaryPage_KeyDown(object sender, KeyRoutedEventArgs e)
00139         {
00140             if (e.Key == Windows.System.VirtualKey.G)
00141             {
00142                 GetFullLog();
00143             }
00144             else if (e.Key == Windows.System.VirtualKey.C)
00145             {
00146                 ClearFullLog();
00147             }
00148         }
00149
00150         protected override void OnNavigatedFrom(NavigationEventArgs e)
00151         {
00152             LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
00153             LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
00154             LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;
00155             LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked2;
00156
00157             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00158             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00159             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00160             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00161
00162             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00163
00164             if (_itemsView != null)
00165             {
00166                 _itemsView.ItemsSource = null;
00167
00168                 UnhookItemsRepeaterEvents(ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView));
00169                 UnhookScrollViewEvents(ItemsViewTestHooks.GetScrollViewPart(_itemsView));
00170                 UnhookItemsViewEvents();
00171             }
00172             UnhookLinedFlowLayoutEvents(_linedFlowLayout);
00173
00174             ChkLinedFlowLayoutShowLockedItems_Unchecked(null, null);
00175             ChkShowCurrentElement_Unchecked(null, null);
00176
00177             base.OnNavigatedFrom(e);
00178         }
00179
00180         private void UseItemsView(ItemsView iv)
00181         {
00182             if (_itemsView == iv || iv == null)
00183                 return;
00184
00185             try
00186             {
00187                 if (_itemsView != null)
00188                 {
00189                     if (chkLogItemsViewMessages.IsChecked == true)
00190                     {
00191                         MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00192                         if (chkLogScrollViewMessages.IsChecked == false &&
00193                             chkLogItemsRepeaterMessages.IsChecked == false &&
00194                             chkLogLinedFlowLayoutMessages.IsChecked == false)
00195                             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00196                     }
00197
00198                     if (chkLogItemsViewEvents.IsChecked == true)
00199                     {
00200                         UnhookItemsViewEvents();
00201                     }
00202
00203                     UnhookItemsRepeaterEvents(ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView));
00204                 }
00205
00206                 _itemsView = iv;
00207
00208                 if (chkLogItemsViewMessages.IsChecked == true)
00209                 {
00210                     MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00211                     if (chkLogScrollViewMessages.IsChecked == false &&
00212                         chkLogItemsRepeaterMessages.IsChecked == false &&
00213                         chkLogLinedFlowLayoutMessages.IsChecked == false)
00214                         MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00215                 }
00216
00217                 if (chkLogItemsViewEvents.IsChecked == true)
00218                 {
00219                     HookItemsViewEvents();
00220                 }
00221
00222                 // Update ItemsView fields
00223                 UpdateItemsViewLayout();
00224                 UpdateItemsViewSelectionMode();
00225                 UpdateItemsViewIsItemInvokedEnabled();
00226                 UpdateBackground();
00227                 UpdateBorderBrush();
00228                 UpdateBorderThickness();
00229                 UpdateMargin();
00230                 UpdatePadding();
00231                 UpdateWidth();
00232                 UpdateHeight();
00233                 UpdateMaxWidth();
00234                 UpdateMaxHeight();
00235                 UpdateCornerRadius();
00236                 UpdateCurrentItemIndex();
00237                 UpdateTabNavigation();
00238                 UpdateXYFocusKeyboardNavigation();
00239                 UpdateIsEnabled();
00240                 UpdateIsTabStop();
00241
00242                 UpdateSelectedItem();
00243                 UpdateSelectedItems();
00244
00245                 UpdateLinedFlowLayoutActualLineHeight();
00246                 UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
00247                 UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
00248                 UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
00249                 UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
00250                 UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
00251                 UpdateLinedFlowLayoutFrozenItemIndexes();
00252                 UpdateLinedFlowLayoutIsFastPathSupportedDbg();
00253                 UpdateLinedFlowLayoutLineHeight();
00254                 UpdateLinedFlowLayoutLineSpacing();
00255                 UpdateLinedFlowLayoutItemsJustification();
00256                 UpdateLinedFlowLayoutItemsStretch();
00257                 UpdateLinedFlowLayoutMinItemSpacing();
00258                 UpdateLinedFlowLayoutRealizedItemIndexes();
00259                 UpdateLinedFlowLayoutRequestedRangeLength();
00260                 UpdateLinedFlowLayoutRequestedRangeStartIndex();
00261                 UpdateStackLayoutOrientation();
00262                 UpdateStackLayoutSpacing();
00263                 UpdateUniformGridLayoutMaximumRowsOrColumns();
00264                 UpdateUniformGridLayoutMinColumnSpacing();
00265                 UpdateUniformGridLayoutMinRowSpacing();
00266                 UpdateUniformGridLayoutOrientation();
00267
00268                 UpdateScrollViewFields();
00269
00270                 UpdateItemsRepeaterFields();
00271             }
00272             catch (Exception ex)
00273             {
00274                 txtExceptionReport.Text = ex.ToString();
00275                 AppendEventMessage(ex.ToString());
00276             }
00277         }
00278
00279         private void UpdateScrollViewFields()
00280         {
00281             UpdateContentOrientation();
00282             UpdateHorizontalScrollMode();
00283             UpdateVerticalScrollMode();
00284             UpdateZoomFactor();
00285             UpdateZoomMode();
00286             UpdateHorizontalScrollBarVisibility();
00287             UpdateVerticalScrollBarVisibility();
00288             UpdateHorizontalAnchorRatio();
00289             UpdateVerticalAnchorRatio();
00290             UpdateHorizontalOffset();
00291             UpdateVerticalOffset();
00292             UpdateExtentWidth();
00293             UpdateExtentHeight();
00294         }
00295
00296         private void UpdateItemsRepeaterFields()
00297         {
00298             UpdateItemsRepeaterHorizontalAlignment();
00299             UpdateItemsRepeaterHorizontalCacheLength();
00300             UpdateItemsRepeaterVerticalAlignment();
00301             UpdateItemsRepeaterVerticalCacheLength();
00302             UpdateItemsRepeaterChildrenCount();
00303         }
00304
00305         private void ItemsView_ItemInvoked(ItemsView sender, ItemsViewItemInvokedEventArgs args)
00306         {
00307             AppendAsyncEventMessage($"ItemsView.ItemInvoked InvokedItem={args.InvokedItem.ToString().Substring(0, 50)}");
00308         }
00309
00310         private void ItemsView_Loaded(object sender, RoutedEventArgs e)
00311         {
00312             AppendAsyncEventMessage($"ItemsView.Loaded");
00313             if (chkLogItemsRepeaterEvents.IsChecked == true)
00314             {
00315                 LogItemsRepeaterInfo();
00316             }
00317             if (chkLogScrollViewEvents.IsChecked == true)
00318             {
00319                 LogScrollViewInfo();
00320             }
00321             LogItemsViewInfo();
00322
00323             UpdateScrollViewFields();
00324             UpdateItemsRepeaterFields();
00325
00326             HookItemsRepeaterEvents(ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView));
00327         }
00328
00329         private void ItemsView_SelectionChanged(ItemsView sender, ItemsViewSelectionChangedEventArgs args)
00330         {
00331             string selectedItems = String.Empty;
00332
00333             foreach (var selectedItem in sender.SelectedItems)
00334             {
00335                 string selectedItemAsString = selectedItem.ToString();
00336
00337                 selectedItems += (selectedItem == null) ? "<null>, " : selectedItemAsString.Substring(0, Math.Min(selectedItemAsString.Length, 9)) + ", ";
00338             }
00339
00340             AppendAsyncEventMessage($"ItemsView.SelectionChanged SelectedItems={selectedItems}");
00341         }
00342
00343         private void ItemsView_SizeChanged(object sender, SizeChangedEventArgs e)
00344         {
00345             AppendAsyncEventMessage($"ItemsView.SizeChanged Size={_itemsView.ActualWidth}, {_itemsView.ActualHeight}");
00346             if (chkLogItemsRepeaterEvents.IsChecked == true)
00347             {
00348                 LogItemsRepeaterInfo();
00349             }
00350             if (chkLogScrollViewEvents.IsChecked == true)
00351             {
00352                 LogScrollViewInfo();
00353             }
00354             LogItemsViewInfo();
00355         }
00356
00357         private void ItemsView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
00358         {
00359             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00360             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00361             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00362             string newFEName = (newFE == null) ? "null" : newFE.Name;
00363
00364             AppendAsyncEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00365         }
00366
00367         private void ItemsView_LostFocus(object sender, RoutedEventArgs e)
00368         {
00369             AppendAsyncEventMessage("ItemsView.LostFocus");
00370         }
00371
00372         private void ItemsView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
00373         {
00374             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00375             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00376             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00377             string newFEName = (newFE == null) ? "null" : newFE.Name;
00378
00379             AppendAsyncEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00380         }
00381
00382         private void ItemsView_GotFocus(object sender, RoutedEventArgs e)
00383         {
00384             AppendAsyncEventMessage("ItemsView.GotFocus");
00385         }
00386
00387         private void ItemsView_PointerWheelChanged(object sender, PointerRoutedEventArgs args)
00388         {
00389             AppendAsyncEventMessage($"ItemsView.PointerWheelChanged args.Handled={args.Handled}");
00390         }
00391
00392         private void ItemsRepeater_LayoutUpdated(object sender, object e)
00393         {
00394             System.Diagnostics.Debug.WriteLine("ItemsRepeater.LayoutUpdated");
00395         }
00396
00397         private void ItemsRepeater_Loaded(object sender, RoutedEventArgs e)
00398         {
00399             if (chkLogItemsRepeaterEvents.IsChecked == true)
00400             {
00401                 AppendAsyncEventMessage($"ItemsRepeater.Loaded");
00402                 LogItemsRepeaterInfo();
00403                 if (chkLogItemsViewEvents.IsChecked == true)
00404                 {
00405                     LogItemsViewInfo();
00406                 }
00407             }
00408         }
00409
00410         private void ItemsRepeater_SizeChanged(object sender, SizeChangedEventArgs e)
00411         {
00412             if (_itemsView != null)
00413             {
00414                 if (canvasLinedFlowLayoutLockedItems != null)
00415                 {
00416                     canvasLinedFlowLayoutLockedItems.Width = _itemsView.ActualWidth;
00417                     canvasLinedFlowLayoutLockedItems.Height = _itemsView.ActualHeight;
00418                 }
00419
00420                 if (rectVerticalKeyboardNavigationReferenceOffset != null)
00421                 {
00422                     rectVerticalKeyboardNavigationReferenceOffset.Height = _itemsView.ActualHeight;
00423                 }
00424
00425                 if (chkLogItemsRepeaterEvents.IsChecked == true)
00426                 {
00427                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
00428
00429                     if (itemsRepeater != null)
00430                     {
00431                         AppendAsyncEventMessage($"ItemsRepeater.SizeChanged Size={itemsRepeater.ActualWidth}, {itemsRepeater.ActualHeight}");
00432                         /*
00433                         LogItemsRepeaterInfo();
00434                         if (chkLogItemsViewEvents.IsChecked == true)
00435                         {
00436                             LogItemsViewInfo();
00437                         }
00438                         */
00439                     }
00440                 }
00441             }
00442         }
00443
00444         private void ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
00445         {
00446             if (chkLogItemsRepeaterEvents.IsChecked == true)
00447             {
00448                 AppendAsyncEventMessage($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}");
00449             }
00450
00451             try
00452             {
00453                 FrameworkElement elementAsFE = args.Element as FrameworkElement;
00454
00455                 if (elementAsFE != null)
00456                 {
00457                     Image image = elementAsFE.FindName("image") as Image;
00458
00459                     if (image != null)
00460                     {
00461                         image.ImageOpened += Image_ImageOpened;
00462                         image.ImageFailed += Image_ImageFailed;
00463                     }
00464
00465                     if ((bool)chkSetItemsRepeaterElementMinWidth.IsChecked && elementAsFE != null)
00466                     {
00467                         elementAsFE.MinWidth = double.Parse(txtItemsRepeaterElementMinWidthAll.Text);
00468                     }
00469
00470                     if ((bool)chkSetItemsRepeaterElementMaxWidth.IsChecked && elementAsFE != null)
00471                     {
00472                         elementAsFE.MaxWidth = double.Parse(txtItemsRepeaterElementMaxWidthAll.Text);
00473                     }
00474
00475                     if ((bool)chkSetItemsRepeaterElementMargin.IsChecked && elementAsFE != null)
00476                     {
00477                         elementAsFE.Margin = GetThicknessFromString(txtItemsRepeaterElementMarginAll.Text);
00478                     }
00479                 }
00480
00481                 if ((bool)chkSetItemsRepeaterElementCanDrag.IsChecked)
00482                 {
00483                     args.Element.CanDrag = (bool)chkItemsRepeaterElementCanDrag.IsChecked;
00484
00485                     args.Element.DragStarting += UIElement_DragStarting;
00486                 }
00487             }
00488             catch (Exception ex)
00489             {
00490                 txtExceptionReport.Text = ex.ToString();
00491                 AppendEventMessage(ex.ToString());
00492             }
00493         }
00494
00495         private void ItemsRepeater_ElementClearing(ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
00496         {
00497             if (chkLogItemsRepeaterEvents.IsChecked == true)
00498             {
00499                 AppendAsyncEventMessage($"ItemsRepeater.ElementClearing Element={args.Element}");
00500             }
00501
00502             FrameworkElement elementAsFE = args.Element as FrameworkElement;
00503
00504             if (elementAsFE != null)
00505             {
00506                 Image image = elementAsFE.FindName("image") as Image;
00507
00508                 if (image != null)
00509                 {
00510                     // Not using a _yellowBrush class member to avoid memory leaks through ItemCoontainer->ItemsViewSummaryPage references.
00511                     SetCaptionColor(image, new SolidColorBrush(Colors.Yellow));
00512
00513                     image.ImageOpened -= Image_ImageOpened;
00514                     image.ImageFailed -= Image_ImageFailed;
00515                 }
00516             }
00517
00518             args.Element.DragStarting -= UIElement_DragStarting;
00519         }
00520
00521         private void ScrollView_BringingIntoView(ScrollView sender, ScrollingBringingIntoViewEventArgs args)
00522         {
00523             var requestEventArgs = args.RequestEventArgs;
00524
00525             AppendAsyncEventMessage($"ScrollView.BringingIntoView RequestEventArgs AnimationDesired={requestEventArgs.AnimationDesired}, VerticalAlignmentRatio={requestEventArgs.VerticalAlignmentRatio}, VerticalOffset={requestEventArgs.VerticalOffset}, TargetRect={requestEventArgs.TargetRect}");
00526             AppendAsyncEventMessage($"ScrollView.BringingIntoView CorrelationId={args.CorrelationId}, TargetVerticalOffset={args.TargetVerticalOffset}");
00527
00528             bool animationDesired = cmbBringIntoViewOptionsAnimationDesired.SelectedIndex == 0;
00529
00530             args.RequestEventArgs.AnimationDesired = animationDesired;
00531         }
00532
00533         private void ScrollView_Loaded(object sender, RoutedEventArgs e)
00534         {
00535             AppendAsyncEventMessage($"ScrollView.Loaded");
00536             LogScrollViewInfo();
00537             if (chkLogItemsViewEvents.IsChecked == true)
00538             {
00539                 LogItemsViewInfo();
00540             }
00541         }
00542
00543         private void ScrollView_SizeChanged(object sender, SizeChangedEventArgs e)
00544         {
00545             AppendAsyncEventMessage($"ScrollView.SizeChanged Size={_itemsView.ActualWidth}, {_itemsView.ActualHeight}");
00546             LogScrollViewInfo();
00547             if (chkLogItemsViewEvents.IsChecked == true)
00548             {
00549                 LogItemsViewInfo();
00550             }
00551         }
00552
00553         private void ScrollView_ExtentChanged(ScrollView sender, object args)
00554         {
00555             AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
00556         }
00557
00558         private void ScrollView_PointerWheelChanged(object sender, PointerRoutedEventArgs args)
00559         {
00560             AppendAsyncEventMessage($"ScrollView.PointerWheelChanged args.Handled={args.Handled}");
00561         }
00562
00563         private void ScrollView_StateChanged(ScrollView sender, object args)
00564         {
00565             AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
00566         }
00567
00568         private void ScrollView_ViewChanged(ScrollView sender, object args)
00569         {
00570             AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00571         }
00572
00573         private void ScrollView_ViewChangedForLockedItemsVisuals(ScrollView sender, object args)
00574         {
00575             UpdateLinedFlowLayoutLockedItemsVisuals();
00576         }
00577
00578         private void ScrollView_ViewChangedForCurrentElementVisual(ScrollView sender, object args)
00579         {
00580             UpdateItemsViewCurrentElementVisual(log: false);
00581             UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: false);
00582         }
00583
00584         private void ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
00585         {
00586             AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
00587         }
00588
00589         private void ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
00590         {
00591             AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
00592         }
00593
00594         private void ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args)
00595         {
00596             AppendAsyncEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
00597         }
00598
00599         private void ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args)
00600         {
00601             AppendAsyncEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
00602         }
00603
00604         private void Image_ImageOpened(object sender, RoutedEventArgs e)
00605         {
00606             try
00607             {
00608                 Image image = sender as Image;
00609
00610                 // When the Image has a TextBlock sibling, set its Foreground to White to indicate the image loading success.
00611                 SetCaptionColor(image, _whiteBrush);
00612
00613                 int elementIndex = GetItemsRepeaterElementIndex(image);
00614
00615                 if (elementIndex != -1)
00616                 {
00617                     int linedFlowLayoutLogItemIndexDbg = _linedFlowLayout == null ? -1 : Convert.ToInt32(txtLinedFlowLayoutLogItemIndexDbg.Text);
00618
00619                     if (chkLogImageEvents.IsChecked == true || elementIndex == linedFlowLayoutLogItemIndexDbg)
00620                     {
00621                         string captionText = GetCaptionText(image);
00622
00623                         if (captionText == null)
00624                         {
00625                             captionText = "<None>";
00626                         }
00627
00628                         AppendAsyncEventMessage($"Image_ImageOpened elementIndex={elementIndex}, Item Id={captionText}");
00629                     }
00630                 }
00631             }
00632             catch (Exception ex)
00633             {
00634                 txtExceptionReport.Text = ex.ToString();
00635                 AppendEventMessage(ex.ToString());
00636             }
00637         }
00638
00639         private void Image_ImageFailed(object sender, ExceptionRoutedEventArgs e)
00640         {
00641             // When the Image has a TextBlock sibling, set its Foreground to Red to indicate the image loading failure.
00642             string captionText = SetCaptionColor(sender as Image, _redBrush);
00643
00644             if (!string.IsNullOrEmpty(captionText))
00645             {
00646                 AppendAsyncEventMessage($"Image_ImageFailed ErrorMessage={e.ErrorMessage}, Item Id={captionText}");
00647             }
00648         }
00649
00650         private void LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
00651         {
00652             if (chkLogLinedFlowLayoutEvents.IsChecked == true)
00653             {
00654                 AppendAsyncEventMessage($"LinedFlowLayout.ItemsInfoRequested ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
00655             }
00656
00657             if (!(bool)chkProvideDesiredAspectRatioItemsInfo.IsChecked)
00658             {
00659                 return;
00660             }
00661
00662             try
00663             {
00664                 bool provideMinSizeItemsInfo = (bool)chkProvideMinSizeItemsInfo.IsChecked;
00665                 bool provideMaxSizeItemsInfo = (bool)chkProvideMaxSizeItemsInfo.IsChecked;
00666                 bool provideExtraDesiredAspectRatioItemsInfo = (bool)chkProvideExtraDesiredAspectRatioItemsInfo.IsChecked;
00667                 bool provideTemporaryDesiredAspectRatioItemsInfo = (bool)chkProvideTemporaryDesiredAspectRatioItemsInfo.IsChecked;
00668                 bool provideMinSizeArrayItemsInfo = (bool)chkProvideMinSizeArrayItemsInfo.IsChecked;
00669                 bool provideMaxSizeArrayItemsInfo = (bool)chkProvideMaxSizeArrayItemsInfo.IsChecked;
00670
00671                 int arrayOffset = 0;
00672                 int arrayLength = 0;
00673                 double[] desiredAspectRatios = null;
00674                 double[] minWidths = null;
00675                 double[] maxWiths = null;
00676
00677                 if (provideExtraDesiredAspectRatioItemsInfo)
00678                 {
00679                     arrayOffset = args.ItemsRangeStartIndex = 0;
00680
00681                     if (_itemsView.ItemsSource == _lstEntities)
00682                     {
00683                         arrayLength = _lstEntities.Count;
00684                     }
00685                     else if (_itemsView.ItemsSource == _colSmallEntities)
00686                     {
00687                         arrayLength = _colSmallEntities.Count;
00688                     }
00689                     else if (_itemsView.ItemsSource == _colSmallUniformEntities)
00690                     {
00691                         arrayLength = _colSmallUniformEntities.Count;
00692                     }
00693                     else if (_itemsView.ItemsSource == _colEntities)
00694                     {
00695                         arrayLength = _colEntities.Count;
00696                     }
00697                 }
00698                 else
00699                 {
00700                     arrayOffset = args.ItemsRangeStartIndex;
00701                     arrayLength = args.ItemsRangeRequestedLength;
00702                 }
00703
00704                 desiredAspectRatios = new double[arrayLength];
00705
00706                 if (provideMinSizeItemsInfo && provideMinSizeArrayItemsInfo)
00707                 {
00708                     minWidths = new double[arrayLength];
00709                 }
00710
00711                 if (provideMaxSizeItemsInfo && provideMaxSizeArrayItemsInfo)
00712                 {
00713                     maxWiths = new double[arrayLength];
00714                 }
00715
00716                 double minWidth = 0.0;
00717                 int templateId = cmbItemTemplate.SelectedIndex;
00718
00719                 if (provideMinSizeItemsInfo)
00720                 {
00721                     if ((bool)chkSetItemsRepeaterElementMinWidth.IsChecked)
00722                     {
00723                         minWidth = double.Parse(txtItemsRepeaterElementMinWidthAll.Text);
00724                     }
00725                     else
00726                     {
00727                         // These values come from the the 'entityTemplate1', 'entityTemplate2', ..., 'entityTemplate16' DataTemplates defined
00728                         // in ItemsViewSummaryPage.xaml.   Their MinWidth values are reused here.
00729                         switch (templateId)
00730                         {
00731                             case 16:
00732                             case 17:
00733                                 minWidth = 32.0;
00734                                 break;
00735                             case 2:
00736                             case 4:
00737                             case 8:
00738                             case 9:
00739                                 minWidth = 40.0;
00740                                 break;
00741                             case 1:
00742                                 minWidth = 72.0;
00743                                 break;
00744                             case 6:
00745                             case 11:
00746                                 minWidth = 96.0;
00747                                 break;
00748                             case 5:
00749                             case 10:
00750                                 minWidth = 100.0;
00751                                 break;
00752                             case 7:
00753                             case 12:
00754                                 minWidth = 126.0;
00755                                 break;
00756                         }
00757                     }
00758                 }
00759
00760                 double maxWidth = -1.0;
00761
00762                 if (provideMaxSizeItemsInfo)
00763                 {
00764                     if ((bool)chkSetItemsRepeaterElementMaxWidth.IsChecked)
00765                     {
00766                         maxWidth = double.Parse(txtItemsRepeaterElementMaxWidthAll.Text);
00767                     }
00768                 }
00769
00770                 double temporaryAspectRatio = provideTemporaryDesiredAspectRatioItemsInfo ? double.Parse(txtTemporaryAspectRatio.Text) : 1.0;
00771
00772                 for (int index = 0; index < arrayLength; index++)
00773                 {
00774                     if (provideTemporaryDesiredAspectRatioItemsInfo && index % 10 == 0)
00775                     {
00776                         // For 10% of the items, pretend the aspect ratio is still unknown.
00777                         desiredAspectRatios[index] = temporaryAspectRatio;
00778                         // A subsequent call to LinedFlowLayout.InvalidateItemsInfo after chkProvideTemporaryDesiredAspectRatioItemsInfo.IsChecked was reset
00779                         // can cause the full information to be provided.
00780                     }
00781                     else
00782                     {
00783                         // These values come from the the 'entityTemplate1', 'entityTemplate2', ..., 'entityTemplate16' DataTemplates defined
00784                         // in ItemsViewSummaryPage.xaml.   Some do not use the Entity object, but a hard-coded item size that is reused here.
00785                         // Others use the Entity object which exposes its own AspectRatio property.
00786                         switch (templateId)
00787                         {
00788                             case 5:
00789                             case 6:
00790                             case 11:
00791                             case 13:
00792                             case 14:
00793                             case 15:
00794                                 {
00795                                     desiredAspectRatios[index] = 1.0;
00796                                     break;
00797                                 }
00798                             case 7:
00799                             case 12:
00800                                 {
00801                                     desiredAspectRatios[index] = 1.3125; // == 126/96
00802                                     break;
00803                                 }
00804                             default:
00805                                 {
00806                                     Entity entity = null;
00807
00808                                     if (_itemsView.ItemsSource == _lstEntities)
00809                                     {
00810                                         entity = _lstEntities[arrayOffset + index];
00811                                     }
00812                                     else if (_itemsView.ItemsSource == _colSmallEntities)
00813                                     {
00814                                         entity = _colSmallEntities[arrayOffset + index];
00815                                     }
00816                                     else if (_itemsView.ItemsSource == _colSmallUniformEntities)
00817                                     {
00818                                         entity = _colSmallUniformEntities[arrayOffset + index];
00819                                     }
00820                                     else if (_itemsView.ItemsSource == _colEntities)
00821                                     {
00822                                         entity = _colEntities[arrayOffset + index];
00823                                     }
00824
00825                                     desiredAspectRatios[index] = entity.AspectRatio;
00826                                     break;
00827                                 }
00828                         }
00829                     }
00830
00831                     if (provideMinSizeItemsInfo && provideMinSizeArrayItemsInfo)
00832                     {
00833                         minWidths[index] = minWidth;
00834                     }
00835
00836                     if (provideMaxSizeItemsInfo && provideMaxSizeArrayItemsInfo)
00837                     {
00838                         maxWiths[index] = maxWidth;
00839                     }
00840                 }
00841
00842                 args.SetDesiredAspectRatios(desiredAspectRatios);
00843
00844                 if (provideMinSizeItemsInfo)
00845                 {
00846                     if (provideMinSizeArrayItemsInfo)
00847                     {
00848                         args.SetMinWidths(minWidths);
00849                     }
00850                     else
00851                     {
00852                         args.MinWidth = minWidth;
00853                     }
00854                 }
00855
00856                 if (provideMaxSizeItemsInfo)
00857                 {
00858                     if (provideMaxSizeArrayItemsInfo)
00859                     {
00860                         args.SetMaxWidths(maxWiths);
00861                     }
00862                     else
00863                     {
00864                         args.MaxWidth = maxWidth;
00865                     }
00866                 }
00867             }
00868             catch (Exception ex)
00869             {
00870                 txtExceptionReport.Text = ex.ToString();
00871                 AppendEventMessage(ex.ToString());
00872             }
00873         }
00874
00875         private void LinedFlowLayout_ItemsUnlocked(LinedFlowLayout sender, object args)
00876         {
00877             if (chkLogLinedFlowLayoutEvents.IsChecked == true)
00878             {
00879                 AppendAsyncEventMessage("LinedFlowLayout.ItemsUnlocked");
00880             }
00881
00882             _lstLinedFlowLayoutLockedItemIndexes.Clear();
00883             UpdateLinedFlowLayoutLockedItemsVisuals();
00884         }
00885
00886         private void UIElement_DragStarting(UIElement sender, DragStartingEventArgs args)
00887         {
00888             AppendAsyncEventMessage($"UIElement_DragStarting AllowedOperations={args.AllowedOperations}");
00889         }
00890
00891         private void LogItemsRepeaterInfo()
00892         {
00893             if (_itemsView != null)
00894             {
00895                 ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
00896
00897                 if (itemsRepeater != null)
00898                 {
00899                     AppendAsyncEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}, ChildrenCount={VisualTreeHelper.GetChildrenCount(itemsRepeater)}");
00900                 }
00901             }
00902         }
00903
00904         private void LogScrollViewInfo()
00905         {
00906             if (_itemsView != null)
00907             {
00908                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
00909
00910                 AppendAsyncEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
00911                 AppendAsyncEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
00912                 AppendAsyncEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
00913                 AppendAsyncEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
00914             }
00915         }
00916
00917         private void LogItemsViewInfo()
00918         {
00919             //AppendAsyncEventMessage($"ItemsView Info: ItemsSource={itemsView.ItemsSource}, ItemTemplate={itemsView.ItemTemplate}, Layout={itemsView.Layout}");
00920         }
00921
00922         #region UI Controls Updates
00923
00924         private string GetCaptionText(Image image)
00925         {
00926             if (image != null)
00927             {
00928                 Panel itemPanel = image.Parent as Panel;
00929
00930                 if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
00931                 {
00932                     TextBlock textBlock = itemPanel.Children[1] as TextBlock;
00933
00934                     if (textBlock != null)
00935                     {
00936                         return textBlock.Text;
00937                     }
00938                 }
00939             }
00940
00941             return null;
00942         }
00943
00944         private string SetCaptionColor(Image image, Brush brush)
00945         {
00946             if (image != null)
00947             {
00948                 Panel itemPanel = image.Parent as Panel;
00949
00950                 if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
00951                 {
00952                     TextBlock textBlock = itemPanel.Children[1] as TextBlock;
00953
00954                     if (textBlock != null)
00955                     {
00956                         textBlock.Foreground = brush;
00957
00958                         return textBlock.Text;
00959                     }
00960                 }
00961             }
00962
00963             return null;
00964         }
00965
00966         private void UpdateBackground()
00967         {
00968             if (_itemsView != null && cmbBackground != null)
00969             {
00970                 SolidColorBrush bg = _itemsView.Background as SolidColorBrush;
00971
00972                 if (bg == null)
00973                 {
00974                     cmbBackground.SelectedIndex = 0;
00975                 }
00976                 else if (bg.Color == Colors.Transparent)
00977                 {
00978                     cmbBackground.SelectedIndex = 1;
00979                 }
00980                 else if (bg.Color == Colors.AliceBlue)
00981                 {
00982                     cmbBackground.SelectedIndex = 2;
00983                 }
00984                 else if (bg.Color == Colors.Aqua)
00985                 {
00986                     cmbBackground.SelectedIndex = 3;
00987                 }
00988                 else
00989                 {
00990                     cmbBackground.SelectedIndex = -1;
00991                 }
00992             }
00993         }
00994
00995         private void UpdateBorderBrush()
00996         {
00997             if (_itemsView != null && cmbBorderBrush != null)
00998             {
00999                 SolidColorBrush bb = _itemsView.BorderBrush as SolidColorBrush;
01000
01001                 if (bb == null)
01002                 {
01003                     cmbBorderBrush.SelectedIndex = 0;
01004                 }
01005                 else if (bb.Color == Colors.Transparent)
01006                 {
01007                     cmbBorderBrush.SelectedIndex = 1;
01008                 }
01009                 else if (bb.Color == Colors.Blue)
01010                 {
01011                     cmbBorderBrush.SelectedIndex = 2;
01012                 }
01013                 else if (bb.Color == Colors.Green)
01014                 {
01015                     cmbBorderBrush.SelectedIndex = 3;
01016                 }
01017                 else
01018                 {
01019                     cmbBorderBrush.SelectedIndex = -1;
01020                 }
01021             }
01022         }
01023
01024         private void UpdateBorderThickness()
01025         {
01026             if (_itemsView != null && txtBorderThickness != null)
01027             {
01028                 txtBorderThickness.Text = _itemsView.BorderThickness.ToString();
01029             }
01030         }
01031
01032         private void UpdateContentOrientation()
01033         {
01034             try
01035             {
01036                 if (_itemsView != null && cmbContentOrientation != null)
01037                 {
01038                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01039
01040                     if (scrollView != null)
01041                     {
01042                         cmbContentOrientation.SelectedIndex = (int)scrollView.ContentOrientation;
01043                     }
01044                 }
01045             }
01046             catch (Exception ex)
01047             {
01048                 txtExceptionReport.Text = ex.ToString();
01049                 AppendEventMessage(ex.ToString());
01050             }
01051         }
01052
01053         private void UpdateCornerRadius()
01054         {
01055             if (_itemsView != null && txtCornerRadius != null)
01056             {
01057                 txtCornerRadius.Text = _itemsView.CornerRadius.ToString();
01058             }
01059         }
01060
01061         private void UpdateCurrentItemIndex()
01062         {
01063             if (_itemsView != null && txtCurrentItemIndex != null)
01064             {
01065                 txtCurrentItemIndex.Text = _itemsView.CurrentItemIndex.ToString();
01066             }
01067         }
01068
01069         private void UpdateDataSourceItemCount()
01070         {
01071             if (_itemsView != null && txtDataSourceItemCount != null)
01072             {
01073                 if (_itemsView.ItemsSource == null)
01074                 {
01075                     txtDataSourceItemCount.Text = "0";
01076                 }
01077                 else if (_itemsView.ItemsSource == _lstEntities)
01078                 {
01079                     txtDataSourceItemCount.Text = _lstEntities.Count.ToString();
01080                 }
01081                 else if (_itemsView.ItemsSource == _colSmallEntities)
01082                 {
01083                     txtDataSourceItemCount.Text = _colSmallEntities.Count.ToString();
01084                 }
01085                 else if (_itemsView.ItemsSource == _colSmallUniformEntities)
01086                 {
01087                     txtDataSourceItemCount.Text = _colSmallUniformEntities.Count.ToString();
01088                 }
01089                 else if (_itemsView.ItemsSource == _colEntities)
01090                 {
01091                     txtDataSourceItemCount.Text = _colEntities.Count.ToString();
01092                 }
01093                 else if (_itemsView.ItemsSource == _colSmallItemContainers)
01094                 {
01095                     txtDataSourceItemCount.Text = _colSmallItemContainers.Count.ToString();
01096                 }
01097                 else if (_itemsView.ItemsSource == _colSmallImages)
01098                 {
01099                     txtDataSourceItemCount.Text = _colSmallImages.Count.ToString();
01100                 }
01101             }
01102         }
01103
01104         private void UpdateExtentHeight()
01105         {
01106             if (_itemsView != null && txtExtentHeight != null)
01107             {
01108                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01109
01110                 if (scrollView != null)
01111                 {
01112                     txtExtentHeight.Text = scrollView.ExtentHeight.ToString();
01113                 }
01114             }
01115         }
01116
01117         private void UpdateExtentWidth()
01118         {
01119             if (_itemsView != null && txtExtentWidth != null)
01120             {
01121                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01122
01123                 if (scrollView != null)
01124                 {
01125                     txtExtentWidth.Text = scrollView.ExtentWidth.ToString();
01126                 }
01127             }
01128         }
01129
01130         private void UpdateHeight()
01131         {
01132             if (_itemsView != null && txtHeight != null)
01133             {
01134                 txtHeight.Text = _itemsView.Height.ToString();
01135             }
01136         }
01137
01138         private void UpdateHorizontalAnchorRatio()
01139         {
01140             if (_itemsView != null && txtHorizontalAnchorRatio != null)
01141             {
01142                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01143
01144                 if (scrollView != null)
01145                 {
01146                     txtHorizontalAnchorRatio.Text = scrollView.HorizontalAnchorRatio.ToString();
01147                 }
01148             }
01149         }
01150
01151         private void UpdateHorizontalOffset()
01152         {
01153             if (_itemsView != null && txtHorizontalOffset != null)
01154             {
01155                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01156
01157                 if (scrollView != null)
01158                 {
01159                     txtHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
01160                 }
01161             }
01162         }
01163
01164         private void UpdateHorizontalScrollBarVisibility()
01165         {
01166             try
01167             {
01168                 if (_itemsView != null && cmbHorizontalScrollBarVisibility != null)
01169                 {
01170                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01171
01172                     if (scrollView != null)
01173                     {
01174                         cmbHorizontalScrollBarVisibility.SelectedIndex = (int)scrollView.HorizontalScrollBarVisibility;
01175                     }
01176                 }
01177             }
01178             catch (Exception ex)
01179             {
01180                 txtExceptionReport.Text = ex.ToString();
01181                 AppendEventMessage(ex.ToString());
01182             }
01183         }
01184
01185         private void UpdateHorizontalScrollMode()
01186         {
01187             try
01188             {
01189                 if (_itemsView != null && cmbHorizontalScrollMode != null)
01190                 {
01191                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01192
01193                     if (scrollView != null)
01194                     {
01195                         cmbHorizontalScrollMode.SelectedIndex = (int)scrollView.HorizontalScrollMode;
01196                     }
01197                 }
01198             }
01199             catch (Exception ex)
01200             {
01201                 txtExceptionReport.Text = ex.ToString();
01202                 AppendEventMessage(ex.ToString());
01203             }
01204         }
01205
01206         private void UpdateIsEnabled()
01207         {
01208             try
01209             {
01210                 if (_itemsView != null && chkIsEnabled != null)
01211                 {
01212                     chkIsEnabled.IsChecked = _itemsView.IsEnabled;
01213                 }
01214             }
01215             catch (Exception ex)
01216             {
01217                 txtExceptionReport.Text = ex.ToString();
01218                 AppendEventMessage(ex.ToString());
01219             }
01220         }
01221
01222         private void UpdateIsTabStop()
01223         {
01224             try
01225             {
01226                 if (_itemsView != null && chkIsTabStop != null)
01227                 {
01228                     chkIsTabStop.IsChecked = _itemsView.IsTabStop;
01229                 }
01230             }
01231             catch (Exception ex)
01232             {
01233                 txtExceptionReport.Text = ex.ToString();
01234                 AppendEventMessage(ex.ToString());
01235             }
01236         }
01237
01238         private void UpdateItemsRepeaterDefaultCacheLengths()
01239         {
01240             try
01241             {
01242                 if (_itemsView != null)
01243                 {
01244                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01245
01246                     if (itemsRepeater != null)
01247                     {
01248                         if (_itemsView.Layout == _flowLayout)
01249                         {
01250                             itemsRepeater.HorizontalCacheLength = 2.0;
01251                             itemsRepeater.VerticalCacheLength = 2.0;
01252                         }
01253                         else if (_itemsView.Layout == _linedFlowLayout)
01254                         {
01255                             itemsRepeater.HorizontalCacheLength = 0.0;
01256                             itemsRepeater.VerticalCacheLength = 2.0;
01257                         }
01258                         else if (_itemsView.Layout == _stackLayout)
01259                         {
01260                             if (_stackLayout.Orientation == Orientation.Horizontal)
01261                             {
01262                                 itemsRepeater.HorizontalCacheLength = 0.0;
01263                                 itemsRepeater.VerticalCacheLength = 2.0;
01264                             }
01265                             else
01266                             {
01267                                 itemsRepeater.HorizontalCacheLength = 2.0;
01268                                 itemsRepeater.VerticalCacheLength = 0.0;
01269                             }
01270                         }
01271                         else if (_itemsView.Layout == _uniformGridLayout)
01272                         {
01273                             if (_uniformGridLayout.Orientation == Orientation.Horizontal)
01274                             {
01275                                 itemsRepeater.HorizontalCacheLength = 0.0;
01276                                 itemsRepeater.VerticalCacheLength = 2.0;
01277                             }
01278                             else
01279                             {
01280                                 itemsRepeater.HorizontalCacheLength = 2.0;
01281                                 itemsRepeater.VerticalCacheLength = 0.0;
01282                             }
01283                         }
01284
01285                         UpdateItemsRepeaterHorizontalCacheLength();
01286                         UpdateItemsRepeaterVerticalCacheLength();
01287                     }
01288                 }
01289             }
01290             catch (Exception ex)
01291             {
01292                 txtExceptionReport.Text = ex.ToString();
01293                 AppendEventMessage(ex.ToString());
01294             }
01295         }
01296
01297         private void UpdateItemsRepeaterChildrenCount()
01298         {
01299             try
01300             {
01301                 if (_itemsView != null && txtItemsRepeaterChildrenCount != null)
01302                 {
01303                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01304
01305                     if (itemsRepeater != null)
01306                     {
01307                         txtItemsRepeaterChildrenCount.Text = VisualTreeHelper.GetChildrenCount(itemsRepeater).ToString();
01308                     }
01309                 }
01310             }
01311             catch (Exception ex)
01312             {
01313                 txtExceptionReport.Text = ex.ToString();
01314                 AppendEventMessage(ex.ToString());
01315             }
01316         }
01317
01318         private void UpdateItemsRepeaterHorizontalAlignment()
01319         {
01320             try
01321             {
01322                 if (_itemsView != null && cmbItemsRepeaterHorizontalAlignment != null)
01323                 {
01324                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01325
01326                     if (itemsRepeater != null)
01327                     {
01328                         cmbItemsRepeaterHorizontalAlignment.SelectedIndex = (int)itemsRepeater.HorizontalAlignment;
01329                     }
01330                 }
01331             }
01332             catch (Exception ex)
01333             {
01334                 txtExceptionReport.Text = ex.ToString();
01335                 AppendEventMessage(ex.ToString());
01336             }
01337         }
01338
01339         private void UpdateItemsRepeaterHorizontalCacheLength()
01340         {
01341             try
01342             {
01343                 if (_itemsView != null && txtItemsRepeaterHorizontalCacheLength != null)
01344                 {
01345                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01346
01347                     if (itemsRepeater != null)
01348                     {
01349                         txtItemsRepeaterHorizontalCacheLength.Text = itemsRepeater.HorizontalCacheLength.ToString();
01350                     }
01351                 }
01352             }
01353             catch (Exception ex)
01354             {
01355                 txtExceptionReport.Text = ex.ToString();
01356                 AppendEventMessage(ex.ToString());
01357             }
01358         }
01359
01360         private void UpdateItemsRepeaterVerticalAlignment()
01361         {
01362             try
01363             {
01364                 if (_itemsView != null && cmbItemsRepeaterVerticalAlignment != null)
01365                 {
01366                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01367
01368                     if (itemsRepeater != null)
01369                     {
01370                         cmbItemsRepeaterVerticalAlignment.SelectedIndex = (int)itemsRepeater.VerticalAlignment;
01371                     }
01372                 }
01373             }
01374             catch (Exception ex)
01375             {
01376                 txtExceptionReport.Text = ex.ToString();
01377                 AppendEventMessage(ex.ToString());
01378             }
01379         }
01380
01381         private void UpdateItemsRepeaterVerticalCacheLength()
01382         {
01383             try
01384             {
01385                 if (_itemsView != null && txtItemsRepeaterVerticalCacheLength != null)
01386                 {
01387                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01388
01389                     if (itemsRepeater != null)
01390                     {
01391                         txtItemsRepeaterVerticalCacheLength.Text = itemsRepeater.VerticalCacheLength.ToString();
01392                     }
01393                 }
01394             }
01395             catch (Exception ex)
01396             {
01397                 txtExceptionReport.Text = ex.ToString();
01398                 AppendEventMessage(ex.ToString());
01399             }
01400         }
01401
01402         private void UpdateItemsViewIsItemInvokedEnabled()
01403         {
01404             if (_itemsView != null)
01405             {
01406                 chkIsItemInvokedEnabled.IsChecked = _itemsView.IsItemInvokedEnabled;
01407             }
01408         }
01409
01410         private void UpdateItemsViewLayout()
01411         {
01412             if (_itemsView != null)
01413             {
01414                 if (_itemsView.Layout is StackLayout stackLayout)
01415                 {
01416                     _stackLayout = stackLayout;
01417                     if (cmbLayout != null)
01418                     {
01419                         cmbLayout.SelectedIndex = 3;
01420                     }
01421                 }
01422                 else
01423                 {
01424                     _stackLayout = Resources["stackLayout"] as StackLayout;
01425                     if (_itemsView.Layout == null && cmbLayout != null)
01426                     {
01427                         cmbLayout.SelectedIndex = 0;
01428                     }
01429                 }
01430             }
01431         }
01432
01433         private void UpdateItemsViewSelectionMode()
01434         {
01435             if (_itemsView != null && cmbSelectionMode != null)
01436             {
01437                 cmbSelectionMode.SelectedIndex = (int)_itemsView.SelectionMode;
01438             }
01439         }
01440
01441         private void UpdateMargin()
01442         {
01443             if (_itemsView != null && txtMargin != null)
01444             {
01445                 txtMargin.Text = _itemsView.Margin.ToString();
01446             }
01447         }
01448
01449         private void UpdateMaxHeight()
01450         {
01451             if (_itemsView != null && txtMaxHeight != null)
01452             {
01453                 txtMaxHeight.Text = _itemsView.MaxHeight.ToString();
01454             }
01455         }
01456
01457         private void UpdateMaxWidth()
01458         {
01459             if (_itemsView != null && txtMaxWidth != null)
01460             {
01461                 txtMaxWidth.Text = _itemsView.MaxWidth.ToString();
01462             }
01463         }
01464
01465         private void UpdatePadding()
01466         {
01467             if (_itemsView != null && txtPadding != null)
01468             {
01469                 txtPadding.Text = _itemsView.Padding.ToString();
01470             }
01471         }
01472
01473         private void UpdateLinedFlowLayoutActualLineHeight()
01474         {
01475             if (_linedFlowLayout != null)
01476             {
01477                 txtLinedFlowLayoutActualLineHeight.Text = _linedFlowLayout.ActualLineHeight.ToString();
01478             }
01479         }
01480
01481         private void UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg()
01482         {
01483             if (_linedFlowLayout != null)
01484             {
01485                 string snappedAverageItemsPerLineDbg = LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(_linedFlowLayout).ToString();
01486                 txtLinedFlowLayoutSnappedAverageItemsPerLineDbg.Text = snappedAverageItemsPerLineDbg.Substring(0, Math.Min(snappedAverageItemsPerLineDbg.Length, 14));
01487             }
01488         }
01489
01490         private void UpdateLinedFlowLayoutAverageItemAspectRatioDbg()
01491         {
01492             if (_linedFlowLayout != null)
01493             {
01494                 string averageItemAspectRatioDbg = LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(_linedFlowLayout).ToString();
01495                 txtLinedFlowLayoutAverageItemAspectRatioDbg.Text = averageItemAspectRatioDbg.Substring(0, Math.Min(averageItemAspectRatioDbg.Length, 14));
01496             }
01497         }
01498
01499         private void UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg()
01500         {
01501             if (_linedFlowLayout != null)
01502             {
01503                 string forcedAverageItemAspectRatioDbg = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemAspectRatio(_linedFlowLayout).ToString();
01504                 txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text = forcedAverageItemAspectRatioDbg.Substring(0, Math.Min(forcedAverageItemAspectRatioDbg.Length, 14));
01505             }
01506         }
01507
01508         private void UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg()
01509         {
01510             if (_linedFlowLayout != null)
01511             {
01512                 string forcedAverageItemsPerLineDividerDbg = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemsPerLineDivider(_linedFlowLayout).ToString();
01513                 txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text = forcedAverageItemsPerLineDividerDbg.Substring(0, Math.Min(forcedAverageItemsPerLineDividerDbg.Length, 14));
01514             }
01515         }
01516
01517         private void UpdateLinedFlowLayoutForcedWrapMultiplierDbg()
01518         {
01519             if (_linedFlowLayout != null)
01520             {
01521                 string forcedWrapMultiplierDbg = LayoutsTestHooks.GetLinedFlowLayoutForcedWrapMultiplier(_linedFlowLayout).ToString();
01522                 txtLinedFlowLayoutForcedWrapMultiplierDbg.Text = forcedWrapMultiplierDbg.Substring(0, Math.Min(forcedWrapMultiplierDbg.Length, 14));
01523             }
01524         }
01525
01526         private void UpdateLinedFlowLayoutFrozenItemIndexes()
01527         {
01528             if (_linedFlowLayout != null)
01529             {
01530                 txtLinedFlowLayoutFirstFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutFirstFrozenItemIndex(_linedFlowLayout).ToString();
01531                 txtLinedFlowLayoutLastFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLastFrozenItemIndex(_linedFlowLayout).ToString();
01532             }
01533         }
01534
01535         private void UpdateLinedFlowLayoutIsFastPathSupportedDbg()
01536         {
01537             if (_linedFlowLayout != null)
01538             {
01539                 chkLinedFlowLayoutIsFastPathSupportedDbg.IsChecked = LayoutsTestHooks.GetLinedFlowLayoutIsFastPathSupported(_linedFlowLayout);
01540             }
01541         }
01542
01543         private void UpdateLinedFlowLayoutLineHeight()
01544         {
01545             if (_linedFlowLayout != null)
01546             {
01547                 txtLinedFlowLayoutLineHeight.Text = _linedFlowLayout.LineHeight.ToString();
01548             }
01549         }
01550
01551         private void UpdateLinedFlowLayoutLineSpacing()
01552         {
01553             if (_linedFlowLayout != null)
01554             {
01555                 txtLinedFlowLayoutLineSpacing.Text = _linedFlowLayout.LineSpacing.ToString();
01556             }
01557         }
01558
01559         private void UpdateLinedFlowLayoutRequestedRangeLength()
01560         {
01561             if (_linedFlowLayout != null)
01562             {
01563                 txtLinedFlowLayoutRequestedRangeLength.Text = _linedFlowLayout.RequestedRangeLength.ToString();
01564             }
01565         }
01566
01567         private void UpdateLinedFlowLayoutRequestedRangeStartIndex()
01568         {
01569             if (_linedFlowLayout != null)
01570             {
01571                 txtLinedFlowLayoutRequestedRangeStartIndex.Text = _linedFlowLayout.RequestedRangeStartIndex.ToString();
01572             }
01573         }
01574
01575         private void UpdateItemsViewCurrentElementVisual(bool log)
01576         {
01577             int currentItemIndex = _itemsView.CurrentItemIndex;
01578
01579             if (log)
01580             {
01581                 AppendAsyncEventMessage($"ItemsView.CurrentItemIndex={currentItemIndex}");
01582             }
01583
01584             if (bdrCurrentElement != null)
01585             {
01586                 UIElement currentElement = null;
01587                 ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01588
01589                 if (itemsRepeater != null)
01590                 {
01591                     currentElement = itemsRepeater.TryGetElement(currentItemIndex);
01592                 }
01593
01594                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01595
01596                 if (currentElement == null || scrollView == null || (bool)chkShowCurrentElement.IsChecked == false)
01597                 {
01598                     bdrCurrentElement.Visibility = Visibility.Collapsed;
01599                 }
01600                 else
01601                 {
01602                     bdrCurrentElement.Visibility = Visibility.Visible;
01603                     bdrCurrentElement.Width = currentElement.ActualSize.X * scrollView.ZoomFactor - bdrCurrentElement.BorderThickness.Left - bdrCurrentElement.BorderThickness.Right - 2;
01604                     bdrCurrentElement.Height = currentElement.ActualSize.Y * scrollView.ZoomFactor - bdrCurrentElement.BorderThickness.Top - bdrCurrentElement.BorderThickness.Bottom - 2;
01605
01606                     double currentElementOffsetX = currentElement.ActualOffset.X * scrollView.ZoomFactor + bdrCurrentElement.BorderThickness.Left + 2;
01607                     double currentElementOffsetY = currentElement.ActualOffset.Y * scrollView.ZoomFactor + bdrCurrentElement.BorderThickness.Top + 2;
01608
01609                     currentElementOffsetX -= scrollView.HorizontalOffset;
01610                     currentElementOffsetY -= scrollView.VerticalOffset;
01611
01612                     double horizontalExtent = scrollView.ExtentWidth * scrollView.ZoomFactor;
01613
01614                     if (horizontalExtent < scrollView.ViewportWidth)
01615                     {
01616                         if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Center || itemsRepeater.HorizontalAlignment == HorizontalAlignment.Stretch)
01617                         {
01618                             currentElementOffsetX += (scrollView.ViewportWidth - horizontalExtent) / 2.0;
01619                         }
01620                         else if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Right)
01621                         {
01622                             currentElementOffsetX += scrollView.ViewportWidth - horizontalExtent;
01623                         }
01624                     }
01625
01626                     double verticalExtent = scrollView.ExtentHeight * scrollView.ZoomFactor;
01627
01628                     if (verticalExtent < scrollView.ViewportHeight)
01629                     {
01630                         if (itemsRepeater.VerticalAlignment == VerticalAlignment.Center || itemsRepeater.VerticalAlignment == VerticalAlignment.Stretch)
01631                         {
01632                             currentElementOffsetX += (scrollView.ViewportHeight - verticalExtent) / 2.0;
01633                         }
01634                         else if (itemsRepeater.VerticalAlignment == VerticalAlignment.Bottom)
01635                         {
01636                             currentElementOffsetX += scrollView.ViewportHeight - verticalExtent;
01637                         }
01638                     }
01639
01640                     bdrCurrentElement.Margin = new Thickness(currentElementOffsetX, currentElementOffsetY, 0, 0);
01641                 }
01642             }
01643         }
01644
01645         private void UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(bool log)
01646         {
01647             Point keyboardNavigationReferenceOffset = ItemsViewTestHooks.GetKeyboardNavigationReferenceOffset(_itemsView);
01648
01649             if (log)
01650             {
01651                 AppendAsyncEventMessage($"ItemsView.KeyboardNavigationReferenceOffset={keyboardNavigationReferenceOffset}");
01652             }
01653
01654             IndexBasedLayoutOrientation indexBasedLayoutOrientation = _itemsView.Layout.IndexBasedLayoutOrientation;
01655
01656             if (rectVerticalKeyboardNavigationReferenceOffset != null)
01657             {
01658                 if (indexBasedLayoutOrientation != IndexBasedLayoutOrientation.TopToBottom)
01659                 {
01660                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01661
01662                     if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked && scrollView != null)
01663                     {
01664                         double offset = keyboardNavigationReferenceOffset.X * scrollView.ZoomFactor - scrollView.HorizontalOffset - 2.0f;
01665
01666                         ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01667
01668                         if (itemsRepeater != null)
01669                         {
01670                             double horizontalExtent = scrollView.ExtentWidth * scrollView.ZoomFactor;
01671
01672                             if (horizontalExtent < scrollView.ViewportWidth)
01673                             {
01674                                 if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Center || itemsRepeater.HorizontalAlignment == HorizontalAlignment.Stretch)
01675                                 {
01676                                     offset += (scrollView.ViewportWidth - horizontalExtent) / 2.0;
01677                                 }
01678                                 else if (itemsRepeater.HorizontalAlignment == HorizontalAlignment.Right)
01679                                 {
01680                                     offset += scrollView.ViewportWidth - horizontalExtent;
01681                                 }
01682                             }
01683                         }
01684
01685                         rectVerticalKeyboardNavigationReferenceOffset.Margin = new Thickness(offset, 0, 0, 0);
01686                         rectVerticalKeyboardNavigationReferenceOffset.Visibility = Visibility.Visible;
01687                     }
01688                     else
01689                     {
01690                         rectVerticalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
01691                     }
01692                 }
01693                 else
01694                 {
01695                     rectVerticalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
01696                 }
01697             }
01698
01699             if (rectHorizontalKeyboardNavigationReferenceOffset != null)
01700             {
01701                 if (indexBasedLayoutOrientation != IndexBasedLayoutOrientation.LeftToRight)
01702                 {
01703                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01704
01705                     if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked && scrollView != null)
01706                     {
01707                         double offset = keyboardNavigationReferenceOffset.Y * scrollView.ZoomFactor - scrollView.VerticalOffset - 2.0f;
01708
01709                         ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01710
01711                         if (itemsRepeater != null)
01712                         {
01713                             double verticalExtent = scrollView.ExtentHeight * scrollView.ZoomFactor;
01714
01715                             if (verticalExtent < scrollView.ViewportHeight)
01716                             {
01717                                 if (itemsRepeater.VerticalAlignment == VerticalAlignment.Center || itemsRepeater.VerticalAlignment == VerticalAlignment.Stretch)
01718                                 {
01719                                     offset += (scrollView.ViewportHeight - verticalExtent) / 2.0;
01720                                 }
01721                                 else if (itemsRepeater.VerticalAlignment == VerticalAlignment.Bottom)
01722                                 {
01723                                     offset += scrollView.ViewportHeight - verticalExtent;
01724                                 }
01725                             }
01726                         }
01727
01728                         rectHorizontalKeyboardNavigationReferenceOffset.Margin = new Thickness(0, offset, 0, 0);
01729                         rectHorizontalKeyboardNavigationReferenceOffset.Visibility = Visibility.Visible;
01730                     }
01731                     else
01732                     {
01733                         rectHorizontalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
01734                     }
01735                 }
01736                 else
01737                 {
01738                     rectHorizontalKeyboardNavigationReferenceOffset.Visibility = Visibility.Collapsed;
01739                 }
01740             }
01741         }
01742
01743         private void UpdateLinedFlowLayoutLockedItemsVisuals()
01744         {
01745             if (canvasLinedFlowLayoutLockedItems != null)
01746             {
01747                 bool showLockedItems = (bool)chkLinedFlowLayoutShowLockedItems.IsChecked;
01748
01749                 canvasLinedFlowLayoutLockedItems.Visibility = showLockedItems ? Visibility.Visible : Visibility.Collapsed;
01750                 canvasLinedFlowLayoutLockedItems.Children.Clear();
01751
01752                 if (showLockedItems && _lstLinedFlowLayoutLockedItemIndexes.Count > 0)
01753                 {
01754                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
01755                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01756
01757                     foreach (int lockedItemIndex in _lstLinedFlowLayoutLockedItemIndexes)
01758                     {
01759                         UIElement lockedItem = GetItemsRepeaterElement(itemsRepeater, lockedItemIndex);
01760                         if (lockedItem != null)
01761                         {
01762                             GeneralTransform gt = lockedItem.TransformToVisual(itemsRepeater);
01763                             Point lockedItemOriginPoint = new Point();
01764                             lockedItemOriginPoint = gt.TransformPoint(lockedItemOriginPoint);
01765
01766                             if (lockedItemOriginPoint.X - scrollView.HorizontalOffset >= 0 && lockedItemOriginPoint.Y - scrollView.VerticalOffset >= 0 &&
01767                                 lockedItemOriginPoint.X - scrollView.HorizontalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Width &&
01768                                 lockedItemOriginPoint.Y - scrollView.VerticalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Height)
01769                             {
01770                                 Microsoft.UI.Xaml.Shapes.Rectangle lockedItemRectangle = new Microsoft.UI.Xaml.Shapes.Rectangle() {
01771                                     Fill = new SolidColorBrush(Colors.Red),
01772                                     Width = 8,
01773                                     Height = 8
01774                                 };
01775
01776                                 canvasLinedFlowLayoutLockedItems.Children.Add(lockedItemRectangle);
01777                                 Canvas.SetLeft(lockedItemRectangle, lockedItemOriginPoint.X - scrollView.HorizontalOffset);
01778                                 Canvas.SetTop(lockedItemRectangle, lockedItemOriginPoint.Y - scrollView.VerticalOffset);
01779                             }
01780                         }
01781                     }
01782                 }
01783             }
01784         }
01785
01786         private void UpdateLinedFlowLayoutLogItemIndexDbg()
01787         {
01788             if (_linedFlowLayout != null)
01789             {
01790                 txtLinedFlowLayoutLogItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLogItemIndex(_linedFlowLayout).ToString();
01791             }
01792         }
01793
01794         private void UpdateLinedFlowLayoutItemsJustification()
01795         {
01796             if (_linedFlowLayout != null)
01797             {
01798                 cmbLinedFlowLayoutItemsJustification.SelectedIndex = (int)_linedFlowLayout.ItemsJustification;
01799             }
01800         }
01801
01802         private void UpdateLinedFlowLayoutItemsStretch()
01803         {
01804             if (_linedFlowLayout != null)
01805             {
01806                 cmbLinedFlowLayoutItemsStretch.SelectedIndex = (int)_linedFlowLayout.ItemsStretch;
01807             }
01808         }
01809
01810         private void UpdateLinedFlowLayoutMinItemSpacing()
01811         {
01812             if (_linedFlowLayout != null)
01813             {
01814                 txtLinedFlowLayoutMinItemSpacing.Text = _linedFlowLayout.MinItemSpacing.ToString();
01815             }
01816         }
01817
01818         private void UpdateLinedFlowLayoutRealizedItemIndexes()
01819         {
01820             if (_linedFlowLayout != null)
01821             {
01822                 txtLinedFlowLayoutFirstRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutFirstRealizedItemIndex(_linedFlowLayout).ToString();
01823                 txtLinedFlowLayoutLastRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutLastRealizedItemIndex(_linedFlowLayout).ToString();
01824             }
01825         }
01826
01827         private void UpdateScrollViewDefaultAnchorRatios()
01828         {
01829             try
01830             {
01831                 if (_itemsView != null)
01832                 {
01833                     ScrollView scrollView = _itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
01834
01835                     if (scrollView != null)
01836                     {
01837                         if (_itemsView.Layout == _flowLayout)
01838                         {
01839                             scrollView.HorizontalAnchorRatio = 0.0;
01840                             scrollView.VerticalAnchorRatio = 0.0;
01841                         }
01842                         else if (_itemsView.Layout == _linedFlowLayout)
01843                         {
01844                             scrollView.HorizontalAnchorRatio = double.NaN;
01845                             scrollView.VerticalAnchorRatio = double.NaN;
01846                         }
01847                         else if (_itemsView.Layout == _stackLayout)
01848                         {
01849                             if (_stackLayout.Orientation == Orientation.Horizontal)
01850                             {
01851                                 scrollView.HorizontalAnchorRatio = double.NaN;
01852                                 scrollView.VerticalAnchorRatio = 0.0;
01853                             }
01854                             else
01855                             {
01856                                 scrollView.HorizontalAnchorRatio = 0.0;
01857                                 scrollView.VerticalAnchorRatio = double.NaN;
01858                             }
01859                         }
01860                         else if (_itemsView.Layout == _uniformGridLayout)
01861                         {
01862                             if (_uniformGridLayout.Orientation == Orientation.Horizontal)
01863                             {
01864                                 scrollView.HorizontalAnchorRatio = double.NaN;
01865                                 scrollView.VerticalAnchorRatio = 0.0;
01866                             }
01867                             else
01868                             {
01869                                 scrollView.HorizontalAnchorRatio = 0.0;
01870                                 scrollView.VerticalAnchorRatio = double.NaN;
01871                             }
01872                         }
01873
01874                         UpdateHorizontalAnchorRatio();
01875                         UpdateVerticalAnchorRatio();
01876                     }
01877                 }
01878             }
01879             catch (Exception ex)
01880             {
01881                 txtExceptionReport.Text = ex.ToString();
01882                 AppendEventMessage(ex.ToString());
01883             }
01884         }
01885
01886         private void UpdateSelectedItem()
01887         {
01888             if (txtSelectedItem != null)
01889             {
01890                 if (_itemsView == null || _itemsView.SelectedItem == null)
01891                 {
01892                     txtSelectedItem.Text = "<null>";
01893                 }
01894                 else
01895                 {
01896                     string selectedItemAsString = _itemsView.SelectedItem.ToString();
01897
01898                     txtSelectedItem.Text = selectedItemAsString.Substring(0, Math.Min(selectedItemAsString.Length, 12));
01899                 }
01900             }
01901         }
01902
01903         private void UpdateSelectedItems()
01904         {
01905             if (txtSelectedItems != null)
01906             {
01907                 if (_itemsView == null)
01908                 {
01909                     txtSelectedItems.Text = "<null>";
01910                 }
01911                 else
01912                 {
01913                     txtSelectedItems.Text = String.Empty;
01914
01915                     foreach (var selectedItem in _itemsView.SelectedItems)
01916                     {
01917                         string selectedItemAsString = selectedItem.ToString();
01918
01919                         txtSelectedItems.Text += (selectedItem == null) ? "<null>, " : selectedItemAsString.Substring(0, Math.Min(selectedItemAsString.Length, 9)) + ", ";
01920                     }
01921                 }
01922             }
01923         }
01924
01925         private void UpdateStackLayoutOrientation()
01926         {
01927             if (_stackLayout != null && cmbStackLayoutOrientation != null)
01928             {
01929                 cmbStackLayoutOrientation.SelectedIndex = _stackLayout.Orientation == Orientation.Horizontal ? 0 : 1;
01930             }
01931         }
01932
01933         private void UpdateStackLayoutSpacing()
01934         {
01935             if (_stackLayout != null && txtStackLayoutSpacing != null)
01936             {
01937                 txtStackLayoutSpacing.Text = _stackLayout.Spacing.ToString();
01938             }
01939         }
01940
01941         private void UpdateTabNavigation()
01942         {
01943             try
01944             {
01945                 if (_itemsView != null && cmbTabNavigation != null)
01946                 {
01947                     cmbTabNavigation.SelectedIndex = (int)_itemsView.TabNavigation;
01948                 }
01949             }
01950             catch (Exception ex)
01951             {
01952                 txtExceptionReport.Text = ex.ToString();
01953                 AppendEventMessage(ex.ToString());
01954             }
01955         }
01956
01957         private void UpdateUniformGridLayoutMaximumRowsOrColumns()
01958         {
01959             if (_uniformGridLayout != null)
01960             {
01961                 txtUniformGridLayoutMaximumRowsOrColumns.Text = _uniformGridLayout.MaximumRowsOrColumns.ToString();
01962             }
01963         }
01964
01965         private void UpdateUniformGridLayoutMinColumnSpacing()
01966         {
01967             if (_uniformGridLayout != null)
01968             {
01969                 txtUniformGridLayoutMinColumnSpacing.Text = _uniformGridLayout.MinColumnSpacing.ToString();
01970             }
01971         }
01972
01973         private void UpdateUniformGridLayoutMinRowSpacing()
01974         {
01975             if (_uniformGridLayout != null)
01976             {
01977                 txtUniformGridLayoutMinRowSpacing.Text = _uniformGridLayout.MinRowSpacing.ToString();
01978             }
01979         }
01980
01981         private void UpdateUniformGridLayoutOrientation()
01982         {
01983             if (_uniformGridLayout != null)
01984             {
01985                 cmbUniformGridLayoutOrientation.SelectedIndex = (int)_uniformGridLayout.Orientation;
01986             }
01987         }
01988
01989         private void UpdateVerticalAnchorRatio()
01990         {
01991             if (_itemsView != null && txtVerticalAnchorRatio != null)
01992             {
01993                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
01994
01995                 if (scrollView != null)
01996                 {
01997                     txtVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
01998                 }
01999             }
02000         }
02001
02002         private void UpdateVerticalOffset()
02003         {
02004             if (_itemsView != null && txtVerticalOffset != null)
02005             {
02006                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
02007
02008                 if (scrollView != null)
02009                 {
02010                     txtVerticalOffset.Text = scrollView.VerticalOffset.ToString();
02011                 }
02012             }
02013         }
02014
02015         private void UpdateVerticalScrollBarVisibility()
02016         {
02017             try
02018             {
02019                 if (_itemsView != null && cmbVerticalScrollBarVisibility != null)
02020                 {
02021                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
02022
02023                     if (scrollView != null)
02024                     {
02025                         cmbVerticalScrollBarVisibility.SelectedIndex = (int)scrollView.VerticalScrollBarVisibility;
02026                     }
02027                 }
02028             }
02029             catch (Exception ex)
02030             {
02031                 txtExceptionReport.Text = ex.ToString();
02032                 AppendEventMessage(ex.ToString());
02033             }
02034         }
02035
02036         private void UpdateVerticalScrollMode()
02037         {
02038             try
02039             {
02040                 if (_itemsView != null && cmbVerticalScrollMode != null)
02041                 {
02042                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
02043
02044                     if (scrollView != null)
02045                     {
02046                         cmbVerticalScrollMode.SelectedIndex = (int)scrollView.VerticalScrollMode;
02047                     }
02048                 }
02049             }
02050             catch (Exception ex)
02051             {
02052                 txtExceptionReport.Text = ex.ToString();
02053                 AppendEventMessage(ex.ToString());
02054             }
02055         }
02056
02057         private void UpdateWidth()
02058         {
02059             if (_itemsView != null && txtWidth != null)
02060             {
02061                 txtWidth.Text = _itemsView.Width.ToString();
02062             }
02063         }
02064
02065         private void UpdateXYFocusKeyboardNavigation()
02066         {
02067             try
02068             {
02069                 if (_itemsView != null && cmbXYFocusKeyboardNavigation != null)
02070                 {
02071                     cmbXYFocusKeyboardNavigation.SelectedIndex = (int)_itemsView.XYFocusKeyboardNavigation;
02072                 }
02073             }
02074             catch (Exception ex)
02075             {
02076                 txtExceptionReport.Text = ex.ToString();
02077                 AppendEventMessage(ex.ToString());
02078             }
02079         }
02080
02081         private void UpdateZoomFactor()
02082         {
02083             try
02084             {
02085                 if (_itemsView != null && txtZoomFactor != null)
02086                 {
02087                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
02088
02089                     if (scrollView != null)
02090                     {
02091                         txtZoomFactor.Text = scrollView.ZoomFactor.ToString();
02092                     }
02093                 }
02094             }
02095             catch (Exception ex)
02096             {
02097                 txtExceptionReport.Text = ex.ToString();
02098                 AppendEventMessage(ex.ToString());
02099             }
02100         }
02101
02102         private void UpdateZoomMode()
02103         {
02104             try
02105             {
02106                 if (_itemsView != null && cmbZoomMode != null)
02107                 {
02108                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
02109
02110                     if (scrollView != null)
02111                     {
02112                         cmbZoomMode.SelectedIndex = (int)scrollView.ZoomMode;
02113                     }
02114                 }
02115             }
02116             catch (Exception ex)
02117             {
02118                 txtExceptionReport.Text = ex.ToString();
02119                 AppendEventMessage(ex.ToString());
02120             }
02121         }
02122
02123         private void UpdateItemsRepeaterElementActualHeight()
02124         {
02125             try
02126             {
02127                 if (_itemsView != null && txtItemsRepeaterElementActualHeight != null)
02128                 {
02129                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02130                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02131
02132                     if (element is FrameworkElement frameworkElement)
02133                     {
02134                         txtItemsRepeaterElementActualHeight.Text = frameworkElement.ActualHeight.ToString();
02135                     }
02136                 }
02137             }
02138             catch (Exception ex)
02139             {
02140                 txtExceptionReport.Text = ex.ToString();
02141                 AppendEventMessage(ex.ToString());
02142             }
02143         }
02144
02145         private void UpdateItemsRepeaterElementActualWidth()
02146         {
02147             try
02148             {
02149                 if (_itemsView != null && txtItemsRepeaterElementActualWidth != null)
02150                 {
02151                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02152                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02153
02154                     if (element is FrameworkElement frameworkElement)
02155                     {
02156                         txtItemsRepeaterElementActualWidth.Text = frameworkElement.ActualWidth.ToString();
02157                     }
02158                 }
02159             }
02160             catch (Exception ex)
02161             {
02162                 txtExceptionReport.Text = ex.ToString();
02163                 AppendEventMessage(ex.ToString());
02164             }
02165         }
02166
02167         private void UpdateItemsRepeaterElementIsEnabled()
02168         {
02169             try
02170             {
02171                 if (_itemsView != null && chkItemsRepeaterElementIsEnabled != null)
02172                 {
02173                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02174                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02175
02176                     if (element is Control control)
02177                     {
02178                         chkItemsRepeaterElementIsEnabled.IsChecked = control != null && control.IsEnabled;
02179                     }
02180                 }
02181             }
02182             catch (Exception ex)
02183             {
02184                 txtExceptionReport.Text = ex.ToString();
02185                 AppendEventMessage(ex.ToString());
02186             }
02187         }
02188
02189         private void UpdateItemsRepeaterElementMinWidth()
02190         {
02191             try
02192             {
02193                 if (_itemsView != null && txtItemsRepeaterElementMinWidth != null)
02194                 {
02195                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02196                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02197
02198                     if (element is FrameworkElement frameworkElement)
02199                     {
02200                         txtItemsRepeaterElementMinWidth.Text = frameworkElement.MinWidth.ToString();
02201                     }
02202                 }
02203             }
02204             catch (Exception ex)
02205             {
02206                 txtExceptionReport.Text = ex.ToString();
02207                 AppendEventMessage(ex.ToString());
02208             }
02209         }
02210
02211         private void UpdateItemsRepeaterElementMaxWidth()
02212         {
02213             try
02214             {
02215                 if (_itemsView != null && txtItemsRepeaterElementMaxWidth != null)
02216                 {
02217                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02218                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02219
02220                     if (element is FrameworkElement frameworkElement)
02221                     {
02222                         txtItemsRepeaterElementMaxWidth.Text = frameworkElement.MaxWidth.ToString();
02223                     }
02224                 }
02225             }
02226             catch (Exception ex)
02227             {
02228                 txtExceptionReport.Text = ex.ToString();
02229                 AppendEventMessage(ex.ToString());
02230             }
02231         }
02232
02233         private void UpdateItemsRepeaterElementWidth()
02234         {
02235             try
02236             {
02237                 if (_itemsView != null && txtItemsRepeaterElementWidth != null)
02238                 {
02239                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02240                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02241
02242                     if (element is FrameworkElement frameworkElement)
02243                     {
02244                         txtItemsRepeaterElementWidth.Text = frameworkElement.Width.ToString();
02245                     }
02246                 }
02247             }
02248             catch (Exception ex)
02249             {
02250                 txtExceptionReport.Text = ex.ToString();
02251                 AppendEventMessage(ex.ToString());
02252             }
02253         }
02254
02255         private void UpdateItemsRepeaterElementMinHeight()
02256         {
02257             try
02258             {
02259                 if (_itemsView != null && txtItemsRepeaterElementMinHeight != null)
02260                 {
02261                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02262                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02263
02264                     if (element is FrameworkElement frameworkElement)
02265                     {
02266                         txtItemsRepeaterElementMinHeight.Text = frameworkElement.MinHeight.ToString();
02267                     }
02268                 }
02269             }
02270             catch (Exception ex)
02271             {
02272                 txtExceptionReport.Text = ex.ToString();
02273                 AppendEventMessage(ex.ToString());
02274             }
02275         }
02276
02277         private void UpdateItemsRepeaterElementMaxHeight()
02278         {
02279             try
02280             {
02281                 if (_itemsView != null && txtItemsRepeaterElementMaxHeight != null)
02282                 {
02283                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02284                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02285
02286                     if (element is FrameworkElement frameworkElement)
02287                     {
02288                         txtItemsRepeaterElementMaxHeight.Text = frameworkElement.MaxHeight.ToString();
02289                     }
02290                 }
02291             }
02292             catch (Exception ex)
02293             {
02294                 txtExceptionReport.Text = ex.ToString();
02295                 AppendEventMessage(ex.ToString());
02296             }
02297         }
02298
02299         private void UpdateItemsRepeaterElementHeight()
02300         {
02301             try
02302             {
02303                 if (_itemsView != null && txtItemsRepeaterElementHeight != null)
02304                 {
02305                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02306                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02307
02308                     if (element is FrameworkElement frameworkElement)
02309                     {
02310                         txtItemsRepeaterElementHeight.Text = frameworkElement.Height.ToString();
02311                     }
02312                 }
02313             }
02314             catch (Exception ex)
02315             {
02316                 txtExceptionReport.Text = ex.ToString();
02317                 AppendEventMessage(ex.ToString());
02318             }
02319         }
02320
02321         private void UpdateItemsRepeaterElementDesiredSize()
02322         {
02323             try
02324             {
02325                 if (_itemsView != null && txtItemsRepeaterElementDesiredSize != null)
02326                 {
02327                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02328                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02329
02330                     if (element != null)
02331                     {
02332                         txtItemsRepeaterElementDesiredSize.Text = element.DesiredSize.ToString();
02333                     }
02334                 }
02335             }
02336             catch (Exception ex)
02337             {
02338                 txtExceptionReport.Text = ex.ToString();
02339                 AppendEventMessage(ex.ToString());
02340             }
02341         }
02342
02343         private void UpdateItemsRepeaterElementRenderSize()
02344         {
02345             try
02346             {
02347                 if (_itemsView != null && txtItemsRepeaterElementRenderSize != null)
02348                 {
02349                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02350                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02351
02352                     if (element != null)
02353                     {
02354                         txtItemsRepeaterElementRenderSize.Text = element.RenderSize.ToString();
02355                     }
02356                 }
02357             }
02358             catch (Exception ex)
02359             {
02360                 txtExceptionReport.Text = ex.ToString();
02361                 AppendEventMessage(ex.ToString());
02362             }
02363         }
02364
02365         private void UpdateItemsRepeaterItemContainerCanUserSelect()
02366         {
02367             try
02368             {
02369                 if (_itemsView != null && chkItemsRepeaterItemContainerCanUserSelect != null)
02370                 {
02371                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02372                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02373
02374                     if (element is ItemContainer itemContainer)
02375                     {
02376 #if MUX_PRERELEASE
02377                         if ((int)(itemContainer.CanUserSelect & ItemContainerUserSelectMode.UserCannotSelect) == (int)ItemContainerUserSelectMode.UserCannotSelect)
02378                         {
02379                             chkItemsRepeaterItemContainerCanUserSelect.IsChecked = false;
02380                         }
02381                         else if ((int)(itemContainer.CanUserSelect & ItemContainerUserSelectMode.UserCanSelect) == (int)ItemContainerUserSelectMode.UserCanSelect)
02382                         {
02383                             chkItemsRepeaterItemContainerCanUserSelect.IsChecked = true;
02384                         }
02385                         else
02386                         {
02387                             chkItemsRepeaterItemContainerCanUserSelect.IsChecked = null;
02388                         }
02389 #endif
02390                     }
02391                 }
02392             }
02393             catch (Exception ex)
02394             {
02395                 txtExceptionReport.Text = ex.ToString();
02396                 AppendEventMessage(ex.ToString());
02397             }
02398         }
02399
02400         private void UpdateItemsRepeaterItemContainerIsSelected()
02401         {
02402             try
02403             {
02404                 if (_itemsView != null && chkItemsRepeaterItemContainerIsSelected != null)
02405                 {
02406                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02407                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02408
02409                     if (element is ItemContainer itemContainer)
02410                     {
02411                         chkItemsRepeaterItemContainerIsSelected.IsChecked = itemContainer != null && itemContainer.IsSelected;
02412                     }
02413                 }
02414             }
02415             catch (Exception ex)
02416             {
02417                 txtExceptionReport.Text = ex.ToString();
02418                 AppendEventMessage(ex.ToString());
02419             }
02420         }
02421
02422         private void UpdateItemsRepeaterItemContainerCanUserInvoke()
02423         {
02424             try
02425             {
02426                 if (_itemsView != null && chkItemsRepeaterItemContainerCanUserInvoke != null)
02427                 {
02428                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02429                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
02430
02431                     if (element is ItemContainer itemContainer)
02432                     {
02433 #if MUX_PRERELEASE
02434                         if ((int)(itemContainer.CanUserInvoke & ItemContainerUserInvokeMode.UserCannotInvoke) == (int)ItemContainerUserInvokeMode.UserCannotInvoke)
02435                         {
02436                             chkItemsRepeaterItemContainerCanUserInvoke.IsChecked = false;
02437                         }
02438                         else if ((int)(itemContainer.CanUserInvoke & ItemContainerUserInvokeMode.UserCanInvoke) == (int)ItemContainerUserInvokeMode.UserCanInvoke)
02439                         {
02440                             chkItemsRepeaterItemContainerCanUserInvoke.IsChecked = true;
02441                         }
02442                         else
02443                         {
02444                             chkItemsRepeaterItemContainerCanUserInvoke.IsChecked = null;
02445                         }
02446 #endif
02447                     }
02448                 }
02449             }
02450             catch (Exception ex)
02451             {
02452                 txtExceptionReport.Text = ex.ToString();
02453                 AppendEventMessage(ex.ToString());
02454             }
02455         }
02456
02457         private void UpdateItemsRepeaterLogItemIndexDbg()
02458         {
02459             if (txtItemsRepeaterLogItemIndexDbg != null)
02460             {
02461                 txtItemsRepeaterLogItemIndexDbg.Text = RepeaterTestHooks.GetLogItemIndex().ToString();
02462             }
02463         }
02464
02465         #endregion
02466
02467         #region Property Getters
02468
02469         private void BtnGetBorderThickness_Click(object sender, RoutedEventArgs e)
02470         {
02471             UpdateBorderThickness();
02472         }
02473
02474         private void BtnGetContentOrientation_Click(object sender, RoutedEventArgs e)
02475         {
02476             UpdateContentOrientation();
02477         }
02478
02479         private void BtnGetCornerRadius_Click(object sender, RoutedEventArgs e)
02480         {
02481             UpdateCornerRadius();
02482         }
02483
02484         private void BtnGetCurrentItemIndex_Click(object sender, RoutedEventArgs e)
02485         {
02486             UpdateCurrentItemIndex();
02487         }
02488
02489         private void BtnGetExtentHeight_Click(object sender, RoutedEventArgs e)
02490         {
02491             UpdateExtentHeight();
02492         }
02493
02494         private void BtnGetExtentWidth_Click(object sender, RoutedEventArgs e)
02495         {
02496             UpdateExtentWidth();
02497         }
02498
02499         private void BtnGetHeight_Click(object sender, RoutedEventArgs e)
02500         {
02501             UpdateHeight();
02502         }
02503
02504         private void BtnGetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
02505         {
02506             UpdateHorizontalAnchorRatio();
02507         }
02508
02509         private void BtnGetHorizontalOffset_Click(object sender, RoutedEventArgs e)
02510         {
02511             UpdateHorizontalOffset();
02512         }
02513
02514         private void BtnGetHorizontalScrollMode_Click(object sender, RoutedEventArgs e)
02515         {
02516             UpdateHorizontalScrollMode();
02517         }
02518
02519         private void BtnGetHorizontalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
02520         {
02521             UpdateHorizontalScrollBarVisibility();
02522         }
02523
02524         private void BtnGetItemsRepeaterChildrenCount_Click(object sender, RoutedEventArgs e)
02525         {
02526             UpdateItemsRepeaterChildrenCount();
02527         }
02528
02529         private void BtnGetItemsRepeaterHorizontalAlignment_Click(object sender, RoutedEventArgs e)
02530         {
02531             UpdateItemsRepeaterHorizontalAlignment();
02532         }
02533
02534         private void BtnGetItemsRepeaterHorizontalCacheLength_Click(object sender, RoutedEventArgs e)
02535         {
02536             UpdateItemsRepeaterHorizontalCacheLength();
02537         }
02538
02539         private void BtnGetItemsRepeaterLogItemIndexDbg_Click(object sender, RoutedEventArgs e)
02540         {
02541             UpdateItemsRepeaterLogItemIndexDbg();
02542         }
02543
02544         private void BtnGetItemsRepeaterVerticalAlignment_Click(object sender, RoutedEventArgs e)
02545         {
02546             UpdateItemsRepeaterVerticalAlignment();
02547         }
02548
02549         private void BtnGetItemsRepeaterVerticalCacheLength_Click(object sender, RoutedEventArgs e)
02550         {
02551             UpdateItemsRepeaterVerticalCacheLength();
02552         }
02553
02554         private void BtnGetLayoutForcedIndexBasedLayoutOrientation_Click(object sender, RoutedEventArgs e)
02555         {
02556             try
02557             {
02558                 if (_itemsView != null)
02559                 {
02560                     Layout layout = _itemsView.Layout;
02561
02562                     if (layout != null)
02563                     {
02564                         cmbLayoutForcedIndexBasedLayoutOrientation.SelectedIndex = (int)LayoutsTestHooks.GetLayoutForcedIndexBasedLayoutOrientation(layout);
02565                     }
02566                 }
02567             }
02568             catch (Exception ex)
02569             {
02570                 txtExceptionReport.Text = ex.ToString();
02571                 AppendEventMessage(ex.ToString());
02572             }
02573         }
02574
02575         private void BtnGetMargin_Click(object sender, RoutedEventArgs e)
02576         {
02577             UpdateMargin();
02578         }
02579
02580         private void BtnGetMaxHeight_Click(object sender, RoutedEventArgs e)
02581         {
02582             UpdateMaxHeight();
02583         }
02584
02585         private void BtnGetMaxWidth_Click(object sender, RoutedEventArgs e)
02586         {
02587             UpdateMaxWidth();
02588         }
02589
02590         private void BtnGetPadding_Click(object sender, RoutedEventArgs e)
02591         {
02592             UpdatePadding();
02593         }
02594
02595         private void BtnGetSelectedItem_Click(object sender, RoutedEventArgs e)
02596         {
02597             UpdateSelectedItem();
02598         }
02599
02600         private void BtnGetSelectedItems_Click(object sender, RoutedEventArgs e)
02601         {
02602             UpdateSelectedItems();
02603         }
02604
02605         private void BtnGetStackLayoutOrientation_Click(object sender, RoutedEventArgs e)
02606         {
02607             UpdateStackLayoutOrientation();
02608         }
02609
02610         private void BtnGetStackLayoutSpacing_Click(object sender, RoutedEventArgs e)
02611         {
02612             UpdateStackLayoutSpacing();
02613         }
02614
02615         private void BtnGetLinedFlowLayoutActualLineHeight_Click(object sender, RoutedEventArgs e)
02616         {
02617             UpdateLinedFlowLayoutActualLineHeight();
02618         }
02619
02620         private void BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click(object sender, RoutedEventArgs e)
02621         {
02622             UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
02623         }
02624
02625         private void BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click(object sender, RoutedEventArgs e)
02626         {
02627             UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
02628         }
02629
02630         private void BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click(object sender, RoutedEventArgs e)
02631         {
02632             UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
02633         }
02634
02635         private void BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click(object sender, RoutedEventArgs e)
02636         {
02637             UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
02638         }
02639
02640         private void BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click(object sender, RoutedEventArgs e)
02641         {
02642             UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
02643         }
02644
02645         private void BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click(object sender, RoutedEventArgs e)
02646         {
02647             UpdateLinedFlowLayoutFrozenItemIndexes();
02648         }
02649
02650         private void BtnGetLinedFlowLayoutLineHeight_Click(object sender, RoutedEventArgs e)
02651         {
02652             UpdateLinedFlowLayoutLineHeight();
02653         }
02654
02655         private void BtnGetLinedFlowLayoutLineSpacing_Click(object sender, RoutedEventArgs e)
02656         {
02657             UpdateLinedFlowLayoutLineSpacing();
02658         }
02659
02660         private void BtnGetLinedFlowLayoutLogItemIndexDbg_Click(object sender, RoutedEventArgs e)
02661         {
02662             UpdateLinedFlowLayoutLogItemIndexDbg();
02663         }
02664
02665         private void BtnGetLinedFlowLayoutMinItemSpacing_Click(object sender, RoutedEventArgs e)
02666         {
02667             UpdateLinedFlowLayoutMinItemSpacing();
02668         }
02669
02670         private void BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click(object sender, RoutedEventArgs e)
02671         {
02672             UpdateLinedFlowLayoutRealizedItemIndexes();
02673         }
02674
02675         private void BtnGetLinedFlowLayoutRequestedRangeLength_Click(object sender, RoutedEventArgs e)
02676         {
02677             UpdateLinedFlowLayoutRequestedRangeLength();
02678         }
02679
02680         private void BtnGetLinedFlowLayoutRequestedRangeStartIndex_Click(object sender, RoutedEventArgs e)
02681         {
02682             UpdateLinedFlowLayoutRequestedRangeStartIndex();
02683         }
02684
02685         private void BtnGetUniformGridLayoutMaximumRowsOrColumns_Click(object sender, RoutedEventArgs e)
02686         {
02687             UpdateUniformGridLayoutMaximumRowsOrColumns();
02688         }
02689
02690         private void BtnGetUniformGridLayoutMinColumnSpacing_Click(object sender, RoutedEventArgs e)
02691         {
02692             UpdateUniformGridLayoutMinColumnSpacing();
02693         }
02694
02695         private void BtnGetUniformGridLayoutMinRowSpacing_Click(object sender, RoutedEventArgs e)
02696         {
02697             UpdateUniformGridLayoutMinRowSpacing();
02698         }
02699
02700         private void BtnGetUniformGridLayoutOrientation_Click(object sender, RoutedEventArgs e)
02701         {
02702             UpdateUniformGridLayoutOrientation();
02703         }
02704
02705         private void BtnGetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
02706         {
02707             UpdateVerticalAnchorRatio();
02708         }
02709
02710         private void BtnGetVerticalOffset_Click(object sender, RoutedEventArgs e)
02711         {
02712             UpdateVerticalOffset();
02713         }
02714
02715         private void BtnGetVerticalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
02716         {
02717             UpdateVerticalScrollBarVisibility();
02718         }
02719
02720         private void BtnGetVerticalScrollMode_Click(object sender, RoutedEventArgs e)
02721         {
02722             UpdateVerticalScrollMode();
02723         }
02724
02725         private void BtnGetWidth_Click(object sender, RoutedEventArgs e)
02726         {
02727             UpdateWidth();
02728         }
02729
02730         private void BtnGetZoomFactor_Click(object sender, RoutedEventArgs e)
02731         {
02732             UpdateZoomFactor();
02733         }
02734
02735         private void BtnGetZoomMode_Click(object sender, RoutedEventArgs e)
02736         {
02737             UpdateZoomMode();
02738         }
02739
02740         private void BtnGetItemsRepeaterElementActualHeight_Click(object sender, RoutedEventArgs e)
02741         {
02742             UpdateItemsRepeaterElementActualHeight();
02743         }
02744
02745         private void BtnGetItemsRepeaterElementActualWidth_Click(object sender, RoutedEventArgs e)
02746         {
02747             UpdateItemsRepeaterElementActualWidth();
02748         }
02749
02750         private void BtnGetItemsRepeaterElementIsEnabled_Click(object sender, RoutedEventArgs e)
02751         {
02752             UpdateItemsRepeaterElementIsEnabled();
02753         }
02754
02755         private void BtnGetItemsRepeaterElementMinWidth_Click(object sender, RoutedEventArgs e)
02756         {
02757             UpdateItemsRepeaterElementMinWidth();
02758         }
02759
02760         private void BtnGetItemsRepeaterElementMaxWidth_Click(object sender, RoutedEventArgs e)
02761         {
02762             UpdateItemsRepeaterElementMaxWidth();
02763         }
02764
02765         private void BtnGetItemsRepeaterElementDesiredSize_Click(object sender, RoutedEventArgs e)
02766         {
02767             UpdateItemsRepeaterElementDesiredSize();
02768         }
02769
02770         private void BtnGetItemsRepeaterElementRenderSize_Click(object sender, RoutedEventArgs e)
02771         {
02772             UpdateItemsRepeaterElementRenderSize();
02773         }
02774
02775         private void BtnGetItemsRepeaterElementWidth_Click(object sender, RoutedEventArgs e)
02776         {
02777             UpdateItemsRepeaterElementWidth();
02778         }
02779
02780         private void BtnGetItemsRepeaterElementMinHeight_Click(object sender, RoutedEventArgs e)
02781         {
02782             UpdateItemsRepeaterElementMinHeight();
02783         }
02784
02785         private void BtnGetItemsRepeaterElementMaxHeight_Click(object sender, RoutedEventArgs e)
02786         {
02787             UpdateItemsRepeaterElementMaxHeight();
02788         }
02789
02790         private void BtnGetItemsRepeaterElementHeight_Click(object sender, RoutedEventArgs e)
02791         {
02792             UpdateItemsRepeaterElementHeight();
02793         }
02794
02795         private void BtnItemsRepeaterElementInvalidateMeasure_Click(object sender, RoutedEventArgs e)
02796         {
02797             try
02798             {
02799                 if (_itemsView != null)
02800                 {
02801                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02802                     UIElement element = GetItemsRepeaterMethodElement(itemsRepeater);
02803                     if (element != null)
02804                     {
02805                         element.InvalidateMeasure();
02806                     }
02807                 }
02808             }
02809             catch (Exception ex)
02810             {
02811                 txtExceptionReport.Text = ex.ToString();
02812                 AppendEventMessage(ex.ToString());
02813             }
02814         }
02815
02816         private void BtnItemsRepeaterElementInvalidateArrange_Click(object sender, RoutedEventArgs e)
02817         {
02818             try
02819             {
02820                 if (_itemsView != null)
02821                 {
02822                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
02823                     UIElement element = GetItemsRepeaterMethodElement(itemsRepeater);
02824                     if (element != null)
02825                     {
02826                         element.InvalidateArrange();
02827                     }
02828                 }
02829             }
02830             catch (Exception ex)
02831             {
02832                 txtExceptionReport.Text = ex.ToString();
02833                 AppendEventMessage(ex.ToString());
02834             }
02835         }
02836
02837         private void BtnGetItemsRepeaterItemContainerCanUserInvoke_Click(object sender, RoutedEventArgs e)
02838         {
02839             UpdateItemsRepeaterItemContainerCanUserInvoke();
02840         }
02841
02842         private void BtnGetItemsRepeaterItemContainerCanUserSelect_Click(object sender, RoutedEventArgs e)
02843         {
02844             UpdateItemsRepeaterItemContainerCanUserSelect();
02845         }
02846
02847         private void BtnGetItemsRepeaterItemContainerIsSelected_Click(object sender, RoutedEventArgs e)
02848         {
02849             UpdateItemsRepeaterItemContainerIsSelected();
02850         }
02851
02852         private void BtnItemsViewTryGetItemIndex_Click(object sender, RoutedEventArgs e)
02853         {
02854             try
02855             {
02856                 if (_itemsView != null)
02857                 {
02858                     double horizontalViewportRatio = double.Parse(txtTryGetItemIndexHorizontalViewportRatio.Text);
02859                     double verticalViewportRatio = double.Parse(txtTryGetItemIndexVerticalViewportRatio.Text);
02860                     int index;
02861                     _itemsView.TryGetItemIndex(horizontalViewportRatio, verticalViewportRatio, out index);
02862
02863                     txtItemsViewTryGetItemIndex.Text = index.ToString();
02864                 }
02865             }
02866             catch (Exception ex)
02867             {
02868                 txtExceptionReport.Text = ex.ToString();
02869                 AppendEventMessage(ex.ToString());
02870             }
02871         }
02872
02873         private void BtnItemsViewStartBringItemIntoView_Click(object sender, RoutedEventArgs e)
02874         {
02875             ItemsViewStartBringItemIntoView();
02876         }
02877
02878         private void ItemsViewStartBringItemIntoView()
02879         {
02880             try
02881             {
02882                 if (_itemsView != null)
02883                 {
02884                     int index = -1;
02885
02886                     int.TryParse(txtItemsViewMethodIndex.Text, out index);
02887
02888                     BringIntoViewOptions bringIntoViewOptions = new BringIntoViewOptions();
02889
02890                     bool startBringItemIntoViewSuccess = false;
02891                     bool animationDesired = cmbBringIntoViewOptionsAnimationDesired.SelectedIndex == 0;
02892                     double verticalAlignmentRatio = Convert.ToDouble(txtBringIntoViewOptionsVerticalAlignmentRatio.Text);
02893                     double verticalOffset = Convert.ToDouble(txtBringIntoViewOptionsVerticalOffset.Text);
02894
02895                     if (!animationDesired ||
02896                         double.IsNaN(verticalAlignmentRatio) != double.IsNaN(bringIntoViewOptions.VerticalAlignmentRatio) ||
02897                         (!double.IsNaN(verticalAlignmentRatio) && verticalAlignmentRatio != bringIntoViewOptions.VerticalAlignmentRatio) ||
02898                         verticalOffset != bringIntoViewOptions.VerticalOffset ||
02899                         !string.IsNullOrWhiteSpace(txtBringIntoViewOptionsTargetRect.Text))
02900                     {
02901                         if (!string.IsNullOrWhiteSpace(txtBringIntoViewOptionsTargetRect.Text))
02902                         {
02903                             string[] rectComponents = txtBringIntoViewOptionsTargetRect.Text.Split(',');
02904
02905                             if (rectComponents.Length != 4)
02906                             {
02907                                 AppendEventMessage("Invalid TargetRect format.");
02908                                 return;
02909                             }
02910                             bringIntoViewOptions.TargetRect = new Rect(double.Parse(rectComponents[0]), double.Parse(rectComponents[1]), double.Parse(rectComponents[2]), double.Parse(rectComponents[3]));
02911                         }
02912
02913                         bringIntoViewOptions.AnimationDesired = animationDesired;
02914                         bringIntoViewOptions.VerticalAlignmentRatio = verticalAlignmentRatio;
02915                         bringIntoViewOptions.VerticalOffset = verticalOffset;
02916
02917                         try
02918                         {
02919                             _itemsView.StartBringItemIntoView(index, bringIntoViewOptions);
02920                             startBringItemIntoViewSuccess = true;
02921                         }
02922                         catch (Exception)
02923                         {
02924                             startBringItemIntoViewSuccess = false;
02925                         }
02926                     }
02927                     else
02928                     {
02929                         try
02930                         {
02931                             _itemsView.StartBringItemIntoView(index, null);
02932                             startBringItemIntoViewSuccess = true;
02933                         }
02934                         catch (Exception)
02935                         {
02936                             startBringItemIntoViewSuccess = false;
02937                         }
02938                     }
02939
02940                     AppendEventMessage($"StartBringItemIntoView({index})={startBringItemIntoViewSuccess}");
02941                 }
02942             }
02943             catch (Exception ex)
02944             {
02945                 txtExceptionReport.Text = ex.ToString();
02946                 AppendEventMessage(ex.ToString());
02947             }
02948         }
02949
02950         private void BtnItemsViewStartBringItemIntoViewAsync_Click(object sender, RoutedEventArgs e)
02951         {
02952             try
02953             {
02954                 if (txtItemsViewStartBringItemIntoViewAsyncCountdown != null)
02955                 {
02956                     int startBringItemIntoViewAsyncCountdown = int.Parse(txtItemsViewStartBringItemIntoViewAsyncCountdown.Text);
02957
02958                     _queuedOperationsTimer.Interval = new TimeSpan(0, 0, startBringItemIntoViewAsyncCountdown /*sec*/);
02959                 }
02960
02961                 _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.StartBringItemIntoView));
02962                 _queuedOperationsTimer.Start();
02963                 AppendAsyncEventMessage("Queued StartBringItemIntoView");
02964             }
02965             catch (Exception ex)
02966             {
02967                 txtExceptionReport.Text = ex.ToString();
02968                 AppendEventMessage(ex.ToString());
02969             }
02970         }
02971
02972         private void BtnLayoutInvalidateMeasure_Click(object sender, RoutedEventArgs e)
02973         {
02974             try
02975             {
02976                 Layout layout = _itemsView == null ? null : _itemsView.Layout;
02977
02978                 if (layout != null)
02979                 {
02980                     LayoutsTestHooks.LayoutInvalidateMeasure(layout, relayout: true);
02981                 }
02982             }
02983             catch (Exception ex)
02984             {
02985                 txtExceptionReport.Text = ex.ToString();
02986                 AppendEventMessage(ex.ToString());
02987             }
02988         }
02989
02990         private void BtnLinedFlowLayoutInvalidateItemsInfo_Click(object sender, RoutedEventArgs e)
02991         {
02992             try
02993             {
02994                 if (_linedFlowLayout != null)
02995                 {
02996                     _linedFlowLayout.InvalidateItemsInfo();
02997                 }
02998             }
02999             catch (Exception ex)
03000             {
03001                 txtExceptionReport.Text = ex.ToString();
03002                 AppendEventMessage(ex.ToString());
03003             }
03004         }
03005
03006         private void BtnLinedFlowLayoutGetLineIndex_Click(object sender, RoutedEventArgs e)
03007         {
03008             try
03009             {
03010                 if (_linedFlowLayout != null)
03011                 {
03012                     int itemIndex = -1;
03013
03014                     int.TryParse(txtLinedFlowLayoutMethodIndex.Text, out itemIndex);
03015
03016                     int lineIndex = LayoutsTestHooks.GetLinedFlowLayoutLineIndex(_linedFlowLayout, itemIndex);
03017
03018                     txtLinedFlowLayoutLineIndex.Text = lineIndex.ToString();
03019                 }
03020             }
03021             catch (Exception ex)
03022             {
03023                 txtExceptionReport.Text = ex.ToString();
03024                 AppendEventMessage(ex.ToString());
03025             }
03026         }
03027
03028         private void BtnLinedFlowLayoutLockItemToLine_Click(object sender, RoutedEventArgs e)
03029         {
03030             try
03031             {
03032                 if (_linedFlowLayout != null)
03033                 {
03034                     int itemIndex = -1;
03035
03036                     int.TryParse(txtLinedFlowLayoutMethodIndex.Text, out itemIndex);
03037
03038                     int lineIndex = _linedFlowLayout.LockItemToLine(itemIndex);
03039
03040                     txtLinedFlowLayoutLockLine.Text = lineIndex.ToString();
03041                 }
03042             }
03043             catch (Exception ex)
03044             {
03045                 txtExceptionReport.Text = ex.ToString();
03046                 AppendEventMessage(ex.ToString());
03047             }
03048         }
03049
03050         private void BtnLinedFlowLayoutClearItemAspectRatios_Click(object sender, RoutedEventArgs e)
03051         {
03052             try
03053             {
03054                 if (_linedFlowLayout != null)
03055                 {
03056                     LayoutsTestHooks.ClearLinedFlowLayoutItemAspectRatios(_linedFlowLayout);
03057                 }
03058             }
03059             catch (Exception ex)
03060             {
03061                 txtExceptionReport.Text = ex.ToString();
03062                 AppendEventMessage(ex.ToString());
03063             }
03064         }
03065
03066         private void BtnLinedFlowLayoutUnlockItems_Click(object sender, RoutedEventArgs e)
03067         {
03068             try
03069             {
03070                 if (_linedFlowLayout != null)
03071                 {
03072                     LayoutsTestHooks.UnlockLinedFlowLayoutItems(_linedFlowLayout);
03073                 }
03074             }
03075             catch (Exception ex)
03076             {
03077                 txtExceptionReport.Text = ex.ToString();
03078                 AppendEventMessage(ex.ToString());
03079             }
03080         }
03081
03082         private void BtnSelectAll_Click(object sender, RoutedEventArgs e)
03083         {
03084             try
03085             {
03086                 if (_itemsView != null)
03087                 {
03088                     _itemsView.SelectAll();
03089                 }
03090             }
03091             catch (Exception ex)
03092             {
03093                 txtExceptionReport.Text = ex.ToString();
03094                 AppendEventMessage(ex.ToString());
03095             }
03096         }
03097
03098         private void BtnDeselectAll_Click(object sender, RoutedEventArgs e)
03099         {
03100             try
03101             {
03102                 if (_itemsView != null)
03103                 {
03104                     _itemsView.DeselectAll();
03105                 }
03106             }
03107             catch (Exception ex)
03108             {
03109                 txtExceptionReport.Text = ex.ToString();
03110                 AppendEventMessage(ex.ToString());
03111             }
03112         }
03113
03114         private void BtnInvertSelection_Click(object sender, RoutedEventArgs e)
03115         {
03116             try
03117             {
03118                 if (_itemsView != null)
03119                 {
03120                     _itemsView.InvertSelection();
03121                 }
03122             }
03123             catch (Exception ex)
03124             {
03125                 txtExceptionReport.Text = ex.ToString();
03126                 AppendEventMessage(ex.ToString());
03127             }
03128         }
03129
03130         private void BtnIsSelected_Click(object sender, RoutedEventArgs e)
03131         {
03132             try
03133             {
03134                 if (_itemsView != null && txtIsSelected != null && txtSelectionIndex != null)
03135                 {
03136                     int index = -1;
03137
03138                     int.TryParse(txtSelectionIndex.Text, out index);
03139
03140                     txtIsSelected.Text = _itemsView.IsSelected(index).ToString();;
03141                 }
03142             }
03143             catch (Exception ex)
03144             {
03145                 txtExceptionReport.Text = ex.ToString();
03146                 AppendEventMessage(ex.ToString());
03147             }
03148         }
03149
03150         private void BtnSelect_Click(object sender, RoutedEventArgs e)
03151         {
03152             try
03153             {
03154                 if (_itemsView != null && txtSelectionIndex != null)
03155                 {
03156                     int index = -1;
03157
03158                     int.TryParse(txtSelectionIndex.Text, out index);
03159
03160                     _itemsView.Select(index);
03161                 }
03162             }
03163             catch (Exception ex)
03164             {
03165                 txtExceptionReport.Text = ex.ToString();
03166                 AppendEventMessage(ex.ToString());
03167             }
03168         }
03169
03170         private void BtnDeselect_Click(object sender, RoutedEventArgs e)
03171         {
03172             try
03173             {
03174                 if (_itemsView != null && txtSelectionIndex != null)
03175                 {
03176                     int index = -1;
03177
03178                     int.TryParse(txtSelectionIndex.Text, out index);
03179
03180                     _itemsView.Deselect(index);
03181                 }
03182             }
03183             catch (Exception ex)
03184             {
03185                 txtExceptionReport.Text = ex.ToString();
03186                 AppendEventMessage(ex.ToString());
03187             }
03188         }
03189
03190         #endregion
03191
03192         #region Property Setters
03193
03194         private void ChkIsEnabled_Checked(object sender, RoutedEventArgs e)
03195         {
03196             try
03197             {
03198                 if (_itemsView != null)
03199                 {
03200                     _itemsView.IsEnabled = true;
03201                 }
03202             }
03203             catch (Exception ex)
03204             {
03205                 txtExceptionReport.Text = ex.ToString();
03206                 AppendEventMessage(ex.ToString());
03207             }
03208         }
03209
03210         private void ChkIsEnabled_Unchecked(object sender, RoutedEventArgs e)
03211         {
03212             try
03213             {
03214                 if (_itemsView != null)
03215                 {
03216                     _itemsView.IsEnabled = false;
03217                 }
03218             }
03219             catch (Exception ex)
03220             {
03221                 txtExceptionReport.Text = ex.ToString();
03222                 AppendEventMessage(ex.ToString());
03223             }
03224         }
03225
03226         private void ChkIsTabStop_Checked(object sender, RoutedEventArgs e)
03227         {
03228             try
03229             {
03230                 if (_itemsView != null)
03231                 {
03232                     _itemsView.IsTabStop = true;
03233                 }
03234             }
03235             catch (Exception ex)
03236             {
03237                 txtExceptionReport.Text = ex.ToString();
03238                 AppendEventMessage(ex.ToString());
03239             }
03240         }
03241
03242         private void ChkIsTabStop_Unchecked(object sender, RoutedEventArgs e)
03243         {
03244             try
03245             {
03246                 if (_itemsView != null)
03247                 {
03248                     _itemsView.IsTabStop = false;
03249                 }
03250             }
03251             catch (Exception ex)
03252             {
03253                 txtExceptionReport.Text = ex.ToString();
03254                 AppendEventMessage(ex.ToString());
03255             }
03256         }
03257
03258         private void ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged(object sender, RoutedEventArgs e)
03259         {
03260             try
03261             {
03262                 if (_linedFlowLayout != null)
03263                 {
03264                     LayoutsTestHooks.SetLinedFlowLayoutIsFastPathSupported(_linedFlowLayout, (bool)chkLinedFlowLayoutIsFastPathSupportedDbg.IsChecked);
03265                 }
03266             }
03267             catch (Exception ex)
03268             {
03269                 txtExceptionReport.Text = ex.ToString();
03270                 AppendEventMessage(ex.ToString());
03271             }
03272         }
03273
03274         private void ChkLinedFlowLayoutShowLockedItems_Checked(object sender, RoutedEventArgs e)
03275         {
03276             UpdateLinedFlowLayoutLockedItemsVisuals();
03277
03278             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03279
03280             if (scrollView != null)
03281             {
03282                 scrollView.ViewChanged += ScrollView_ViewChangedForLockedItemsVisuals;
03283             }
03284         }
03285
03286         private void ChkLinedFlowLayoutShowLockedItems_Unchecked(object sender, RoutedEventArgs e)
03287         {
03288             UpdateLinedFlowLayoutLockedItemsVisuals();
03289
03290             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03291
03292             if (scrollView != null)
03293             {
03294                 scrollView.ViewChanged -= ScrollView_ViewChangedForLockedItemsVisuals;
03295             }
03296         }
03297
03298         private void ChkShowCurrentElement_Checked(object sender, RoutedEventArgs e)
03299         {
03300             _currentItemIndexChangedToken = _itemsView.RegisterPropertyChangedCallback(
03301                                                             ItemsView.CurrentItemIndexProperty,
03302                                                             new DependencyPropertyChangedCallback(ItemsView_CurrentItemIndexChanged));
03303
03304             UpdateItemsViewCurrentElementVisual(log: true);
03305
03306             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03307
03308             if (scrollView != null)
03309             {
03310                 scrollView.ViewChanged += ScrollView_ViewChangedForCurrentElementVisual;
03311             }
03312         }
03313
03314         private void ChkShowCurrentElement_Unchecked(object sender, RoutedEventArgs e)
03315         {
03316             _itemsView.UnregisterPropertyChangedCallback(ItemsView.CurrentItemIndexProperty, _currentItemIndexChangedToken);
03317
03318             UpdateItemsViewCurrentElementVisual(log: false);
03319
03320             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03321
03322             if (scrollView != null)
03323             {
03324                 scrollView.ViewChanged -= ScrollView_ViewChangedForCurrentElementVisual;
03325             }
03326         }
03327
03328         private void ChkShowKeyboardNavigationReferenceOffset_Checked(object sender, RoutedEventArgs e)
03329         {
03330             ItemsViewTestHooks.KeyboardNavigationReferenceOffsetChanged += ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged;
03331
03332             UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
03333         }
03334
03335         private void ChkShowKeyboardNavigationReferenceOffset_Unchecked(object sender, RoutedEventArgs e)
03336         {
03337             ItemsViewTestHooks.KeyboardNavigationReferenceOffsetChanged -= ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged;
03338
03339             UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
03340         }
03341
03342         private void BtnSetBorderThickness_Click(object sender, RoutedEventArgs e)
03343         {
03344             try
03345             {
03346                 if (_itemsView != null)
03347                 {
03348                     _itemsView.BorderThickness = GetThicknessFromString(txtBorderThickness.Text);
03349                 }
03350             }
03351             catch (Exception ex)
03352             {
03353                 txtExceptionReport.Text = ex.ToString();
03354                 AppendEventMessage(ex.ToString());
03355             }
03356         }
03357
03358         private void BtnSetContentOrientation_Click(object sender, RoutedEventArgs e)
03359         {
03360             try
03361             {
03362                 if (_itemsView != null)
03363                 {
03364                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03365
03366                     if (scrollView != null)
03367                     {
03368                         ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
03369
03370                         scrollView.ContentOrientation = co;
03371                     }
03372                 }
03373             }
03374             catch (Exception ex)
03375             {
03376                 txtExceptionReport.Text = ex.ToString();
03377                 AppendEventMessage(ex.ToString());
03378             }
03379         }
03380
03381         private void BtnSetCornerRadius_Click(object sender, RoutedEventArgs e)
03382         {
03383             try
03384             {
03385                 _itemsView.CornerRadius = GetCornerRadiusFromString(txtCornerRadius.Text);
03386             }
03387             catch (Exception ex)
03388             {
03389                 txtExceptionReport.Text = ex.ToString();
03390                 AppendEventMessage(ex.ToString());
03391             }
03392         }
03393
03394         private void BtnSetHeight_Click(object sender, RoutedEventArgs e)
03395         {
03396             try
03397             {
03398                 ItemsViewSetHeight(Convert.ToDouble(txtHeight.Text));
03399             }
03400             catch (Exception ex)
03401             {
03402                 txtExceptionReport.Text = ex.ToString();
03403                 AppendEventMessage(ex.ToString());
03404             }
03405         }
03406
03407         private void ItemsViewSetHeight(double value)
03408         {
03409             _itemsView.Height = value;
03410         }
03411
03412         private void BtnSetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
03413         {
03414             try
03415             {
03416                 if (_itemsView != null)
03417                 {
03418                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03419
03420                     if (scrollView != null)
03421                     {
03422                         scrollView.HorizontalAnchorRatio = Convert.ToDouble(txtHorizontalAnchorRatio.Text);
03423                     }
03424                 }
03425             }
03426             catch (Exception ex)
03427             {
03428                 txtExceptionReport.Text = ex.ToString();
03429                 AppendEventMessage(ex.ToString());
03430             }
03431         }
03432
03433         private void BtnSetHorizontalOffset_Click(object sender, RoutedEventArgs e)
03434         {
03435             try
03436             {
03437                 if (_itemsView != null)
03438                 {
03439                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03440
03441                     if (scrollView != null)
03442                     {
03443                         scrollView.ScrollTo(Convert.ToDouble(txtHorizontalOffset.Text), scrollView.VerticalOffset);
03444                     }
03445                 }
03446             }
03447             catch (Exception ex)
03448             {
03449                 txtExceptionReport.Text = ex.ToString();
03450                 AppendEventMessage(ex.ToString());
03451             }
03452         }
03453
03454         private void BtnSetHorizontalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
03455         {
03456             try
03457             {
03458                 if (_itemsView != null)
03459                 {
03460                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03461
03462                     if (scrollView != null)
03463                     {
03464                         scrollView.HorizontalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbHorizontalScrollBarVisibility.SelectedIndex;
03465                     }
03466                 }
03467             }
03468             catch (Exception ex)
03469             {
03470                 txtExceptionReport.Text = ex.ToString();
03471                 AppendEventMessage(ex.ToString());
03472             }
03473         }
03474
03475         private void BtnSetHorizontalScrollMode_Click(object sender, RoutedEventArgs e)
03476         {
03477             try
03478             {
03479                 if (_itemsView != null)
03480                 {
03481                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03482
03483                     if (scrollView != null)
03484                     {
03485                         ScrollingScrollMode ssm = (ScrollingScrollMode)cmbHorizontalScrollMode.SelectedIndex;
03486
03487                         scrollView.HorizontalScrollMode = ssm;
03488                     }
03489                 }
03490             }
03491             catch (Exception ex)
03492             {
03493                 txtExceptionReport.Text = ex.ToString();
03494                 AppendEventMessage(ex.ToString());
03495             }
03496         }
03497
03498         private void BtnSetItemsRepeaterHorizontalAlignment_Click(object sender, RoutedEventArgs e)
03499         {
03500             try
03501             {
03502                 if (_itemsView != null)
03503                 {
03504                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
03505
03506                     if (itemsRepeater != null)
03507                     {
03508                         itemsRepeater.HorizontalAlignment = (HorizontalAlignment)cmbItemsRepeaterHorizontalAlignment.SelectedIndex;
03509                     }
03510                 }
03511             }
03512             catch (Exception ex)
03513             {
03514                 txtExceptionReport.Text = ex.ToString();
03515                 AppendEventMessage(ex.ToString());
03516             }
03517         }
03518
03519         private void BtnSetItemsRepeaterHorizontalCacheLength_Click(object sender, RoutedEventArgs e)
03520         {
03521             try
03522             {
03523                 if (_itemsView != null)
03524                 {
03525                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
03526
03527                     if (itemsRepeater != null)
03528                     {
03529                         itemsRepeater.HorizontalCacheLength = Convert.ToDouble(txtItemsRepeaterHorizontalCacheLength.Text);
03530                     }
03531                 }
03532             }
03533             catch (Exception ex)
03534             {
03535                 txtExceptionReport.Text = ex.ToString();
03536                 AppendEventMessage(ex.ToString());
03537             }
03538         }
03539
03540         private void BtnSetItemsRepeaterLogItemIndexDbg_Click(object sender, RoutedEventArgs e)
03541         {
03542             try
03543             {
03544                 if (txtItemsRepeaterLogItemIndexDbg != null)
03545                 {
03546                     RepeaterTestHooks.SetLogItemIndex(Convert.ToInt32(txtItemsRepeaterLogItemIndexDbg.Text));
03547                 }
03548             }
03549             catch (Exception ex)
03550             {
03551                 txtExceptionReport.Text = ex.ToString();
03552                 AppendEventMessage(ex.ToString());
03553             }
03554         }
03555
03556         private void BtnSetItemsRepeaterVerticalAlignment_Click(object sender, RoutedEventArgs e)
03557         {
03558             try
03559             {
03560                 if (_itemsView != null)
03561                 {
03562                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
03563
03564                     if (itemsRepeater != null)
03565                     {
03566                         itemsRepeater.VerticalAlignment = (VerticalAlignment)cmbItemsRepeaterVerticalAlignment.SelectedIndex;
03567                     }
03568                 }
03569             }
03570             catch (Exception ex)
03571             {
03572                 txtExceptionReport.Text = ex.ToString();
03573                 AppendEventMessage(ex.ToString());
03574             }
03575         }
03576
03577         private void BtnSetItemsRepeaterVerticalCacheLength_Click(object sender, RoutedEventArgs e)
03578         {
03579             try
03580             {
03581                 if (_itemsView != null)
03582                 {
03583                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
03584
03585                     if (itemsRepeater != null)
03586                     {
03587                         itemsRepeater.VerticalCacheLength = Convert.ToDouble(txtItemsRepeaterVerticalCacheLength.Text);
03588                     }
03589                 }
03590             }
03591             catch (Exception ex)
03592             {
03593                 txtExceptionReport.Text = ex.ToString();
03594                 AppendEventMessage(ex.ToString());
03595             }
03596         }
03597
03598         private void BtnResetLayoutForcedIndexBasedLayoutOrientation_Click(object sender, RoutedEventArgs e)
03599         {
03600             try
03601             {
03602                 if (_itemsView != null)
03603                 {
03604                     Layout layout = _itemsView.Layout;
03605
03606                     if (layout != null)
03607                     {
03608                         LayoutsTestHooks.ResetLayoutForcedIndexBasedLayoutOrientation(layout);
03609                         if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked)
03610                         {
03611                             UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
03612                         }
03613                     }
03614                 }
03615             }
03616             catch (Exception ex)
03617             {
03618                 txtExceptionReport.Text = ex.ToString();
03619                 AppendEventMessage(ex.ToString());
03620             }
03621         }
03622
03623         private void BtnSetLayoutForcedIndexBasedLayoutOrientation_Click(object sender, RoutedEventArgs e)
03624         {
03625             try
03626             {
03627                 if (_itemsView != null)
03628                 {
03629                     Layout layout = _itemsView.Layout;
03630
03631                     if (layout != null)
03632                     {
03633                         LayoutsTestHooks.SetLayoutForcedIndexBasedLayoutOrientation(layout, (IndexBasedLayoutOrientation)cmbLayoutForcedIndexBasedLayoutOrientation.SelectedIndex);
03634                         if ((bool)chkShowKeyboardNavigationReferenceOffset.IsChecked)
03635                         {
03636                             UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
03637                         }
03638                     }
03639                 }
03640             }
03641             catch (Exception ex)
03642             {
03643                 txtExceptionReport.Text = ex.ToString();
03644                 AppendEventMessage(ex.ToString());
03645             }
03646         }
03647
03648         private void BtnSetMargin_Click(object sender, RoutedEventArgs e)
03649         {
03650             try
03651             {
03652                 if (_itemsView != null)
03653                 {
03654                     _itemsView.Margin = GetThicknessFromString(txtMargin.Text);
03655                 }
03656             }
03657             catch (Exception ex)
03658             {
03659                 txtExceptionReport.Text = ex.ToString();
03660                 AppendEventMessage(ex.ToString());
03661             }
03662         }
03663
03664         private void BtnSetMaxHeight_Click(object sender, RoutedEventArgs e)
03665         {
03666             try
03667             {
03668                 _itemsView.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
03669             }
03670             catch (Exception ex)
03671             {
03672                 txtExceptionReport.Text = ex.ToString();
03673                 AppendEventMessage(ex.ToString());
03674             }
03675         }
03676
03677         private void BtnSetMaxWidth_Click(object sender, RoutedEventArgs e)
03678         {
03679             try
03680             {
03681                 _itemsView.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
03682             }
03683             catch (Exception ex)
03684             {
03685                 txtExceptionReport.Text = ex.ToString();
03686                 AppendEventMessage(ex.ToString());
03687             }
03688         }
03689
03690         private void BtnSetPadding_Click(object sender, RoutedEventArgs e)
03691         {
03692             try
03693             {
03694                 if (_itemsView != null)
03695                 {
03696                     _itemsView.Padding = GetThicknessFromString(txtPadding.Text);
03697                 }
03698             }
03699             catch (Exception ex)
03700             {
03701                 txtExceptionReport.Text = ex.ToString();
03702                 AppendEventMessage(ex.ToString());
03703             }
03704         }
03705
03706         private void BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click(object sender, RoutedEventArgs e)
03707         {
03708             try
03709             {
03710                 if (_linedFlowLayout != null)
03711                 {
03712                     LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemAspectRatio(_linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text));
03713                 }
03714             }
03715             catch (Exception ex)
03716             {
03717                 txtExceptionReport.Text = ex.ToString();
03718                 AppendEventMessage(ex.ToString());
03719             }
03720         }
03721
03722         private void BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click(object sender, RoutedEventArgs e)
03723         {
03724             try
03725             {
03726                 if (_linedFlowLayout != null)
03727                 {
03728                     LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemsPerLineDivider(_linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text));
03729                 }
03730             }
03731             catch (Exception ex)
03732             {
03733                 txtExceptionReport.Text = ex.ToString();
03734                 AppendEventMessage(ex.ToString());
03735             }
03736         }
03737
03738         private void BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click(object sender, RoutedEventArgs e)
03739         {
03740             try
03741             {
03742                 if (_linedFlowLayout != null)
03743                 {
03744                     LayoutsTestHooks.SetLinedFlowLayoutForcedWrapMultiplier(_linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedWrapMultiplierDbg.Text));
03745                 }
03746             }
03747             catch (Exception ex)
03748             {
03749                 txtExceptionReport.Text = ex.ToString();
03750                 AppendEventMessage(ex.ToString());
03751             }
03752         }
03753
03754         private void BtnSetLinedFlowLayoutLineHeight_Click(object sender, RoutedEventArgs e)
03755         {
03756             try
03757             {
03758                 if (_linedFlowLayout != null)
03759                 {
03760                     _linedFlowLayout.LineHeight = Convert.ToDouble(txtLinedFlowLayoutLineHeight.Text);
03761                 }
03762             }
03763             catch (Exception ex)
03764             {
03765                 txtExceptionReport.Text = ex.ToString();
03766                 AppendEventMessage(ex.ToString());
03767             }
03768         }
03769
03770         private void BtnSetLinedFlowLayoutLineSpacing_Click(object sender, RoutedEventArgs e)
03771         {
03772             try
03773             {
03774                 if (_linedFlowLayout != null)
03775                 {
03776                     _linedFlowLayout.LineSpacing = Convert.ToDouble(txtLinedFlowLayoutLineSpacing.Text);
03777                 }
03778             }
03779             catch (Exception ex)
03780             {
03781                 txtExceptionReport.Text = ex.ToString();
03782                 AppendEventMessage(ex.ToString());
03783             }
03784         }
03785
03786         private void BtnSetLinedFlowLayoutLogItemIndexDbg_Click(object sender, RoutedEventArgs e)
03787         {
03788             try
03789             {
03790                 if (_linedFlowLayout != null)
03791                 {
03792                     LayoutsTestHooks.SetLinedFlowLayoutLogItemIndex(_linedFlowLayout, Convert.ToInt32(txtLinedFlowLayoutLogItemIndexDbg.Text));
03793                 }
03794             }
03795             catch (Exception ex)
03796             {
03797                 txtExceptionReport.Text = ex.ToString();
03798                 AppendEventMessage(ex.ToString());
03799             }
03800         }
03801
03802         private void BtnSetLinedFlowLayoutMinItemSpacing_Click(object sender, RoutedEventArgs e)
03803         {
03804             try
03805             {
03806                 if (_linedFlowLayout != null)
03807                 {
03808                     _linedFlowLayout.MinItemSpacing = Convert.ToDouble(txtLinedFlowLayoutMinItemSpacing.Text);
03809                 }
03810             }
03811             catch (Exception ex)
03812             {
03813                 txtExceptionReport.Text = ex.ToString();
03814                 AppendEventMessage(ex.ToString());
03815             }
03816         }
03817
03818         private void BtnSetStackLayoutOrientation_Click(object sender, RoutedEventArgs e)
03819         {
03820             try
03821             {
03822                 if (_stackLayout != null)
03823                 {
03824                     _stackLayout.Orientation = cmbStackLayoutOrientation.SelectedIndex == 0 ? Orientation.Horizontal : Orientation.Vertical;
03825                 }
03826             }
03827             catch (Exception ex)
03828             {
03829                 txtExceptionReport.Text = ex.ToString();
03830                 AppendEventMessage(ex.ToString());
03831             }
03832         }
03833
03834         private void BtnSetStackLayoutSpacing_Click(object sender, RoutedEventArgs e)
03835         {
03836             try
03837             {
03838                 if (_stackLayout != null)
03839                 {
03840                     _stackLayout.Spacing = Convert.ToDouble(txtStackLayoutSpacing.Text);
03841                 }
03842             }
03843             catch (Exception ex)
03844             {
03845                 txtExceptionReport.Text = ex.ToString();
03846                 AppendEventMessage(ex.ToString());
03847             }
03848         }
03849
03850         private void BtnSetUniformGridLayoutMaximumRowsOrColumns_Click(object sender, RoutedEventArgs e)
03851         {
03852             try
03853             {
03854                 if (_uniformGridLayout != null)
03855                 {
03856                     _uniformGridLayout.MaximumRowsOrColumns = Convert.ToInt32(txtUniformGridLayoutMaximumRowsOrColumns.Text);
03857                 }
03858             }
03859             catch (Exception ex)
03860             {
03861                 txtExceptionReport.Text = ex.ToString();
03862                 AppendEventMessage(ex.ToString());
03863             }
03864         }
03865
03866         private void BtnSetUniformGridLayoutMinColumnSpacing_Click(object sender, RoutedEventArgs e)
03867         {
03868             try
03869             {
03870                 if (_uniformGridLayout != null)
03871                 {
03872                     _uniformGridLayout.MinColumnSpacing = Convert.ToDouble(txtUniformGridLayoutMinColumnSpacing.Text);
03873                 }
03874             }
03875             catch (Exception ex)
03876             {
03877                 txtExceptionReport.Text = ex.ToString();
03878                 AppendEventMessage(ex.ToString());
03879             }
03880         }
03881
03882         private void BtnSetUniformGridLayoutMinRowSpacing_Click(object sender, RoutedEventArgs e)
03883         {
03884             try
03885             {
03886                 if (_uniformGridLayout != null)
03887                 {
03888                     _uniformGridLayout.MinRowSpacing = Convert.ToDouble(txtUniformGridLayoutMinRowSpacing.Text);
03889                 }
03890             }
03891             catch (Exception ex)
03892             {
03893                 txtExceptionReport.Text = ex.ToString();
03894                 AppendEventMessage(ex.ToString());
03895             }
03896         }
03897
03898         private void BtnSetUniformGridLayoutOrientation_Click(object sender, RoutedEventArgs e)
03899         {
03900             try
03901             {
03902                 if (_uniformGridLayout != null)
03903                 {
03904                     _uniformGridLayout.Orientation = (Orientation)cmbUniformGridLayoutOrientation.SelectedIndex;
03905                 }
03906             }
03907             catch (Exception ex)
03908             {
03909                 txtExceptionReport.Text = ex.ToString();
03910                 AppendEventMessage(ex.ToString());
03911             }
03912         }
03913
03914         private void BtnSetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
03915         {
03916             try
03917             {
03918                 if (_itemsView != null)
03919                 {
03920                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03921
03922                     if (scrollView != null)
03923                     {
03924                         scrollView.VerticalAnchorRatio = Convert.ToDouble(txtVerticalAnchorRatio.Text);
03925                     }
03926                 }
03927             }
03928             catch (Exception ex)
03929             {
03930                 txtExceptionReport.Text = ex.ToString();
03931                 AppendEventMessage(ex.ToString());
03932             }
03933         }
03934
03935         private void BtnSetVerticalConstantVelocity_Click(object sender, RoutedEventArgs e)
03936         {
03937             try
03938             {
03939                 if (_itemsView != null)
03940                 {
03941                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03942
03943                     if (scrollView != null)
03944                     {
03945                         float verticalConstantVelocity = float.Parse(this.txtVerticalConstantVelocity.Text);
03946
03947                         if (verticalConstantVelocity == 0.0f)
03948                         {
03949                             scrollView.ScrollBy(0, 0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
03950                         }
03951                         else
03952                         {
03953                             scrollView.AddScrollVelocity(new System.Numerics.Vector2(0.0f, verticalConstantVelocity), new System.Numerics.Vector2(0.0f, 0.0f));
03954                         }
03955                     }
03956                 }
03957             }
03958             catch (Exception ex)
03959             {
03960                 txtExceptionReport.Text = ex.ToString();
03961                 AppendEventMessage(ex.ToString());
03962             }
03963         }
03964
03965         private void BtnSetVerticalOffset_Click(object sender, RoutedEventArgs e)
03966         {
03967             try
03968             {
03969                 if (_itemsView != null)
03970                 {
03971                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03972
03973                     if (scrollView != null)
03974                     {
03975                         scrollView.ScrollTo(scrollView.HorizontalOffset, Convert.ToDouble(txtVerticalOffset.Text));
03976                     }
03977                 }
03978             }
03979             catch (Exception ex)
03980             {
03981                 txtExceptionReport.Text = ex.ToString();
03982                 AppendEventMessage(ex.ToString());
03983             }
03984         }
03985
03986         private void BtnSetVerticalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
03987         {
03988             try
03989             {
03990                 if (_itemsView != null)
03991                 {
03992                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
03993
03994                     if (scrollView != null)
03995                     {
03996                         scrollView.VerticalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbVerticalScrollBarVisibility.SelectedIndex;
03997                     }
03998                 }
03999             }
04000             catch (Exception ex)
04001             {
04002                 txtExceptionReport.Text = ex.ToString();
04003                 AppendEventMessage(ex.ToString());
04004             }
04005         }
04006
04007         private void BtnSetVerticalScrollMode_Click(object sender, RoutedEventArgs e)
04008         {
04009             try
04010             {
04011                 if (_itemsView != null)
04012                 {
04013                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
04014
04015                     if (scrollView != null)
04016                     {
04017                         ScrollingScrollMode ssm = (ScrollingScrollMode)cmbVerticalScrollMode.SelectedIndex;
04018
04019                         scrollView.VerticalScrollMode = ssm;
04020                     }
04021                 }
04022             }
04023             catch (Exception ex)
04024             {
04025                 txtExceptionReport.Text = ex.ToString();
04026                 AppendEventMessage(ex.ToString());
04027             }
04028         }
04029
04030         private void BtnSetWidth_Click(object sender, RoutedEventArgs e)
04031         {
04032             try
04033             {
04034                 ItemsViewSetWidth(Convert.ToDouble(txtWidth.Text));
04035             }
04036             catch (Exception ex)
04037             {
04038                 txtExceptionReport.Text = ex.ToString();
04039                 AppendEventMessage(ex.ToString());
04040             }
04041         }
04042
04043         private void ItemsViewSetWidth(double value)
04044         {
04045             _itemsView.Width = value;
04046
04047             if (rectHorizontalKeyboardNavigationReferenceOffset != null)
04048             {
04049                 rectHorizontalKeyboardNavigationReferenceOffset.Width = _itemsView.ActualWidth;
04050             }
04051         }
04052
04053         private void BtnSetZoomFactor_Click(object sender, RoutedEventArgs e)
04054         {
04055             try
04056             {
04057                 if (_itemsView != null)
04058                 {
04059                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
04060
04061                     if (scrollView != null)
04062                     {
04063                         scrollView.ZoomTo(float.Parse(txtZoomFactor.Text), null);
04064                     }
04065                 }
04066             }
04067             catch (Exception ex)
04068             {
04069                 txtExceptionReport.Text = ex.ToString();
04070                 AppendEventMessage(ex.ToString());
04071             }
04072         }
04073
04074         private void BtnSetZoomMode_Click(object sender, RoutedEventArgs e)
04075         {
04076             try
04077             {
04078                 if (_itemsView != null)
04079                 {
04080                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(_itemsView);
04081
04082                     if (scrollView != null)
04083                     {
04084                         ScrollingZoomMode szm = (ScrollingZoomMode)cmbZoomMode.SelectedIndex;
04085
04086                         scrollView.ZoomMode = szm;
04087                     }
04088                 }
04089             }
04090             catch (Exception ex)
04091             {
04092                 txtExceptionReport.Text = ex.ToString();
04093                 AppendEventMessage(ex.ToString());
04094             }
04095         }
04096
04097         private void BtnSetItemsRepeaterElementIsEnabled_Click(object sender, RoutedEventArgs e)
04098         {
04099             try
04100             {
04101                 if (_itemsView != null)
04102                 {
04103                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04104                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04105
04106                     if (element is Control control)
04107                     {
04108                         control.IsEnabled = (bool)chkItemsRepeaterElementIsEnabled.IsChecked;
04109                     }
04110                 }
04111             }
04112             catch (Exception ex)
04113             {
04114                 txtExceptionReport.Text = ex.ToString();
04115                 AppendEventMessage(ex.ToString());
04116             }
04117         }
04118
04119         private void BtnSetItemsRepeaterElementMinWidth_Click(object sender, RoutedEventArgs e)
04120         {
04121             try
04122             {
04123                 if (_itemsView != null)
04124                 {
04125                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04126                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04127
04128                     if (element is FrameworkElement frameworkElement)
04129                     {
04130                         frameworkElement.MinWidth = double.Parse(txtItemsRepeaterElementMinWidth.Text);
04131                     }
04132                 }
04133             }
04134             catch (Exception ex)
04135             {
04136                 txtExceptionReport.Text = ex.ToString();
04137                 AppendEventMessage(ex.ToString());
04138             }
04139         }
04140
04141         private void BtnSetItemsRepeaterElementMaxWidth_Click(object sender, RoutedEventArgs e)
04142         {
04143             try
04144             {
04145                 if (_itemsView != null)
04146                 {
04147                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04148                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04149
04150                     if (element is FrameworkElement frameworkElement)
04151                     {
04152                         frameworkElement.MaxWidth = double.Parse(txtItemsRepeaterElementMaxWidth.Text);
04153                     }
04154                 }
04155             }
04156             catch (Exception ex)
04157             {
04158                 txtExceptionReport.Text = ex.ToString();
04159                 AppendEventMessage(ex.ToString());
04160             }
04161         }
04162
04163         private void BtnSetItemsRepeaterElementWidth_Click(object sender, RoutedEventArgs e)
04164         {
04165             try
04166             {
04167                 if (_itemsView != null)
04168                 {
04169                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04170                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04171
04172                     if (element is FrameworkElement frameworkElement)
04173                     {
04174                         frameworkElement.Width = double.Parse(txtItemsRepeaterElementWidth.Text);
04175                     }
04176                 }
04177             }
04178             catch (Exception ex)
04179             {
04180                 txtExceptionReport.Text = ex.ToString();
04181                 AppendEventMessage(ex.ToString());
04182             }
04183         }
04184
04185         private void BtnSetItemsRepeaterElementMinHeight_Click(object sender, RoutedEventArgs e)
04186         {
04187             try
04188             {
04189                 if (_itemsView != null)
04190                 {
04191                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04192                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04193
04194                     if (element is FrameworkElement frameworkElement)
04195                     {
04196                         frameworkElement.MinHeight = double.Parse(txtItemsRepeaterElementMinHeight.Text);
04197                     }
04198                 }
04199             }
04200             catch (Exception ex)
04201             {
04202                 txtExceptionReport.Text = ex.ToString();
04203                 AppendEventMessage(ex.ToString());
04204             }
04205         }
04206
04207         private void BtnSetItemsRepeaterElementMaxHeight_Click(object sender, RoutedEventArgs e)
04208         {
04209             try
04210             {
04211                 if (_itemsView != null)
04212                 {
04213                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04214                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04215
04216                     if (element is FrameworkElement frameworkElement)
04217                     {
04218                         frameworkElement.MaxHeight = double.Parse(txtItemsRepeaterElementMaxHeight.Text);
04219                     }
04220                 }
04221             }
04222             catch (Exception ex)
04223             {
04224                 txtExceptionReport.Text = ex.ToString();
04225                 AppendEventMessage(ex.ToString());
04226             }
04227         }
04228
04229         private void BtnSetItemsRepeaterElementHeight_Click(object sender, RoutedEventArgs e)
04230         {
04231             try
04232             {
04233                 if (_itemsView != null)
04234                 {
04235                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04236                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04237
04238                     if (element is FrameworkElement frameworkElement)
04239                     {
04240                         frameworkElement.Height = double.Parse(txtItemsRepeaterElementHeight.Text);
04241                     }
04242                 }
04243             }
04244             catch (Exception ex)
04245             {
04246                 txtExceptionReport.Text = ex.ToString();
04247                 AppendEventMessage(ex.ToString());
04248             }
04249         }
04250
04251         private void BtnSetItemsRepeaterItemContainerCanUserInvoke_Click(object sender, RoutedEventArgs e)
04252         {
04253             try
04254             {
04255                 if (_itemsView != null)
04256                 {
04257                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04258                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04259
04260                     if (element is ItemContainer itemContainer)
04261                     {
04262 #if MUX_PRERELEASE
04263                         if (chkItemsRepeaterItemContainerCanUserInvoke.IsChecked == null)
04264                         {
04265                             itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.Auto;
04266                         }
04267                         else if (chkItemsRepeaterItemContainerCanUserInvoke.IsChecked == true)
04268                         {
04269                             itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.Auto | ItemContainerUserInvokeMode.UserCanInvoke;
04270                         }
04271                         else
04272                         {
04273                             itemContainer.CanUserInvoke = ItemContainerUserInvokeMode.Auto | ItemContainerUserInvokeMode.UserCannotInvoke;
04274                         }
04275 #endif
04276                     }
04277                 }
04278             }
04279             catch (Exception ex)
04280             {
04281                 txtExceptionReport.Text = ex.ToString();
04282                 AppendEventMessage(ex.ToString());
04283             }
04284         }
04285
04286         private void BtnSetItemsRepeaterItemContainerCanUserSelect_Click(object sender, RoutedEventArgs e)
04287         {
04288             try
04289             {
04290                 if (_itemsView != null)
04291                 {
04292                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04293                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04294
04295                     if (element is ItemContainer itemContainer)
04296                     {
04297 #if MUX_PRERELEASE
04298                         if (chkItemsRepeaterItemContainerCanUserSelect.IsChecked == null)
04299                         {
04300                             itemContainer.CanUserSelect = ItemContainerUserSelectMode.Auto;
04301                         }
04302                         else if (chkItemsRepeaterItemContainerCanUserSelect.IsChecked == true)
04303                         {
04304                             itemContainer.CanUserSelect = ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect;
04305                         }
04306                         else
04307                         {
04308                             itemContainer.CanUserSelect = ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCannotSelect;
04309                         }
04310 #endif
04311                     }
04312                 }
04313             }
04314             catch (Exception ex)
04315             {
04316                 txtExceptionReport.Text = ex.ToString();
04317                 AppendEventMessage(ex.ToString());
04318             }
04319         }
04320
04321         private void BtnSetItemsRepeaterItemContainerIsSelected_Click(object sender, RoutedEventArgs e)
04322         {
04323             try
04324             {
04325                 if (_itemsView != null)
04326                 {
04327                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
04328                     UIElement element = GetItemsRepeaterPropertyElement(itemsRepeater);
04329
04330                     if (element is ItemContainer itemContainer)
04331                     {
04332                         itemContainer.IsSelected = (bool)chkItemsRepeaterItemContainerIsSelected.IsChecked;
04333                     }
04334                 }
04335             }
04336             catch (Exception ex)
04337             {
04338                 txtExceptionReport.Text = ex.ToString();
04339                 AppendEventMessage(ex.ToString());
04340             }
04341         }
04342
04343         #endregion
04344
04345         #region Operation Queueing
04346
04347         private void BtnQueueWidth_Click(object sender, RoutedEventArgs e)
04348         {
04349             try
04350             {
04351                 double value = Convert.ToDouble(txtWidth.Text);
04352                 _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetWidth, value));
04353                 AppendAsyncEventMessage("Queued SetWidth " + value);
04354                 _queuedOperationsTimer.Start();
04355             }
04356             catch (Exception ex)
04357             {
04358                 txtExceptionReport.Text = ex.ToString();
04359                 AppendEventMessage(ex.ToString());
04360             }
04361         }
04362
04363         private void BtnQueueHeight_Click(object sender, RoutedEventArgs e)
04364         {
04365             try
04366             {
04367                 double value = Convert.ToDouble(txtHeight.Text);
04368                 _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetHeight, value));
04369                 AppendAsyncEventMessage("Queued SetHeight " + value);
04370                 _queuedOperationsTimer.Start();
04371             }
04372             catch (Exception ex)
04373             {
04374                 txtExceptionReport.Text = ex.ToString();
04375                 AppendEventMessage(ex.ToString());
04376             }
04377         }
04378
04379         #endregion
04380
04381         private void ChkIsItemInvokedEnabled_Checked(object sender, RoutedEventArgs e)
04382         {
04383             if (_itemsView != null)
04384             {
04385                 _itemsView.IsItemInvokedEnabled = true;
04386             }
04387         }
04388
04389         private void ChkIsItemInvokedEnabled_Unchecked(object sender, RoutedEventArgs e)
04390         {
04391             if (_itemsView != null)
04392             {
04393                 _itemsView.IsItemInvokedEnabled = false;
04394             }
04395         }
04396
04397         private void CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
04398         {
04399             try
04400             {
04401                 if (_itemsView != null)
04402                 {
04403                     if (cmbItemTemplate.SelectedIndex == 0)
04404                     {
04405                         _itemsView.ItemTemplate = null;
04406                     }
04407                     else
04408                     {
04409                         int templateIndex = cmbItemTemplate.SelectedIndex - 1;
04410
04411                         if (_entityTemplates[templateIndex] == null)
04412                         {
04413                             _entityTemplates[templateIndex] = Resources["entityTemplate" + cmbItemTemplate.SelectedIndex.ToString()] as DataTemplate;
04414                         }
04415
04416                         _itemsView.ItemTemplate = _entityTemplates[templateIndex];
04417                     }
04418                 }
04419             }
04420             catch (Exception ex)
04421             {
04422                 txtExceptionReport.Text = ex.ToString();
04423                 AppendEventMessage(ex.ToString());
04424             }
04425         }
04426
04427         private void CmbItemsSource_SelectionChanged(object sender, SelectionChangedEventArgs e)
04428         {
04429             try
04430             {
04431                 if (_itemsView != null)
04432                 {
04433                     switch (cmbItemsSource.SelectedIndex)
04434                     {
04435                         case 0:
04436                             _itemsView.ItemsSource = null;
04437                             break;
04438                         case 1:
04439                             if (_lstEntities == null)
04440                             {
04441                                 var rnd = new Random();
04442                                 _lstEntities = new List<Entity>();
04443
04444                                 for (int itemIndex = 0; itemIndex < 400; itemIndex++)
04445                                 {
04446                                     _lstEntities.Add(new Entity() {
04447                                         ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
04448                                         Id = itemIndex,
04449                                         Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(25, 125))
04450                                     });
04451                                 }
04452                             }
04453                             _itemsView.ItemsSource = _lstEntities;
04454                             break;
04455                         case 2:
04456                             if (_colSmallEntities == null)
04457                             {
04458                                 _colSmallEntities = new ObservableCollection<Entity>();
04459
04460                                 for (int itemIndex = 0; itemIndex < 7; itemIndex++)
04461                                 {
04462                                     _colSmallEntities.Add(new Entity() {
04463                                         ImageUri = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6)),
04464                                         Id = itemIndex,
04465                                         Description = itemIndex.ToString()
04466                                     });
04467                                 }
04468                             }
04469                             _itemsView.ItemsSource = _colSmallEntities;
04470                             break;
04471                         case 3:
04472                             if (_colSmallUniformEntities == null)
04473                             {
04474                                 var rnd = new Random();
04475                                 _colSmallUniformEntities = new ObservableCollection<Entity>();
04476
04477                                 for (int itemIndex = 0; itemIndex < 7; itemIndex++)
04478                                 {
04479                                     _colSmallUniformEntities.Add(new Entity() {
04480                                         ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 100)),
04481                                         Id = itemIndex,
04482                                         Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
04483                                     });
04484                                 }
04485                             }
04486                             _itemsView.ItemsSource = _colSmallUniformEntities;
04487                             break;
04488                         case 4:
04489                             if (_colEntities == null)
04490                             {
04491                                 var rnd = new Random();
04492                                 _colEntities = new ObservableCollection<Entity>();
04493
04494                                 for (int itemIndex = 0; itemIndex < 300; itemIndex++)
04495                                 {
04496                                     _colEntities.Add(new Entity() {
04497                                         ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
04498                                         Id = itemIndex,
04499                                         Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
04500                                     });
04501                                 }
04502                             }
04503                             _itemsView.ItemsSource = _colEntities;
04504                             break;
04505                         case 5:
04506                             if (_colSmallItemContainers == null)
04507                             {
04508                                 _colSmallItemContainers = new ObservableCollection<ItemContainer>();
04509
04510                                 for (int itemIndex = 0; itemIndex < 7; itemIndex++)
04511                                 {
04512                                     ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(itemIndex);
04513
04514                                     _colSmallItemContainers.Add(itemContainer);
04515                                 }
04516                             }
04517                             _itemsView.ItemsSource = _colSmallItemContainers;
04518                             break;
04519                         case 6:
04520                             if (_colSmallImages == null)
04521                             {
04522                                 _colSmallImages = new ObservableCollection<Image>();
04523
04524                                 for (int itemIndex = 0; itemIndex < 7; itemIndex++)
04525                                 {
04526                                     Image image = GetImageAsItemsSourceItem(itemIndex);
04527
04528                                     _colSmallImages.Add(image);
04529                                 }
04530                             }
04531                             _itemsView.ItemsSource = _colSmallImages;
04532                             break;
04533                     }
04534                 }
04535             }
04536             catch (Exception ex)
04537             {
04538                 txtExceptionReport.Text = ex.ToString();
04539                 AppendEventMessage(ex.ToString());
04540             }
04541         }
04542
04543         private void CmbLayout_SelectionChanged(object sender, SelectionChangedEventArgs e)
04544         {
04545             try
04546             {
04547                 if (_itemsView != null)
04548                 {
04549                     switch (cmbLayout.SelectedIndex)
04550                     {
04551                         case 0:
04552                             _itemsView.Layout = null;
04553                             break;
04554                         case 1:
04555                             if (_flowLayout == null)
04556                             {
04557                                 _flowLayout = Resources["flowLayout"] as FlowLayout;
04558                             }
04559                             _itemsView.Layout = _flowLayout;
04560                             break;
04561                         case 2:
04562                             if (_linedFlowLayout == null)
04563                             {
04564                                 _linedFlowLayout = Resources["linedFlowLayout"] as LinedFlowLayout;
04565                                 HookLinedFlowLayoutEvents(_linedFlowLayout);
04566                                 BtnSetLinedFlowLayoutLineHeight_Click(null, null);
04567                                 BtnSetLinedFlowLayoutLineSpacing_Click(null, null);
04568                                 BtnSetLinedFlowLayoutMinItemSpacing_Click(null, null);
04569                                 ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged(null, null);
04570                                 CmbLinedFlowLayoutItemsJustification_SelectionChanged(null, null);
04571                                 CmbLinedFlowLayoutItemsStretch_SelectionChanged(null, null);
04572                             }
04573                             _itemsView.Layout = _linedFlowLayout;
04574                             break;
04575                         case 3:
04576                             _itemsView.Layout = _stackLayout;
04577                             break;
04578                         case 4:
04579                             if (_uniformGridLayout == null)
04580                             {
04581                                 _uniformGridLayout = Resources["uniformGridLayout"] as UniformGridLayout;
04582                                 BtnSetUniformGridLayoutMinColumnSpacing_Click(null, null);
04583                                 BtnSetUniformGridLayoutMinRowSpacing_Click(null, null);
04584                                 CmbUniformGridLayoutItemsJustification_SelectionChanged(null, null);
04585                                 CmbUniformGridLayoutItemsStretch_SelectionChanged(null, null);
04586                             }
04587                             _itemsView.Layout = _uniformGridLayout;
04588                             break;
04589                     }
04590
04591                     UpdateItemsRepeaterDefaultCacheLengths();
04592                     UpdateScrollViewDefaultAnchorRatios();
04593                 }
04594             }
04595             catch (Exception ex)
04596             {
04597                 txtExceptionReport.Text = ex.ToString();
04598                 AppendEventMessage(ex.ToString());
04599             }
04600         }
04601
04602         private void CmbSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
04603         {
04604             try
04605             {
04606                 if (_itemsView != null && cmbSelectionMode != null && _itemsView.SelectionMode != (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex)
04607                 {
04608                     _itemsView.SelectionMode = (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex;
04609                 }
04610             }
04611             catch (Exception ex)
04612             {
04613                 txtExceptionReport.Text = ex.ToString();
04614                 AppendEventMessage(ex.ToString());
04615             }
04616         }
04617
04618         private void CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e)
04619         {
04620             try
04621             {
04622                 if (_itemsView != null)
04623                 {
04624                     switch (cmbBackground.SelectedIndex)
04625                     {
04626                         case 0:
04627                             _itemsView.Background = null;
04628                             break;
04629                         case 1:
04630                             _itemsView.Background = new SolidColorBrush(Colors.Transparent);
04631                             break;
04632                         case 2:
04633                             _itemsView.Background = new SolidColorBrush(Colors.AliceBlue);
04634                             break;
04635                         case 3:
04636                             _itemsView.Background = new SolidColorBrush(Colors.Aqua);
04637                             break;
04638                     }
04639                 }
04640             }
04641             catch (Exception ex)
04642             {
04643                 txtExceptionReport.Text = ex.ToString();
04644                 AppendEventMessage(ex.ToString());
04645             }
04646         }
04647
04648         private void CmbBorderBrush_SelectionChanged(object sender, SelectionChangedEventArgs e)
04649         {
04650             try
04651             {
04652                 if (_itemsView != null)
04653                 {
04654                     switch (cmbBorderBrush.SelectedIndex)
04655                     {
04656                         case 0:
04657                             _itemsView.BorderBrush = null;
04658                             break;
04659                         case 1:
04660                             _itemsView.BorderBrush = new SolidColorBrush(Colors.Transparent);
04661                             break;
04662                         case 2:
04663                             _itemsView.BorderBrush = new SolidColorBrush(Colors.Blue);
04664                             break;
04665                         case 3:
04666                             _itemsView.BorderBrush = new SolidColorBrush(Colors.Green);
04667                             break;
04668                     }
04669                 }
04670             }
04671             catch (Exception ex)
04672             {
04673                 txtExceptionReport.Text = ex.ToString();
04674                 AppendEventMessage(ex.ToString());
04675             }
04676         }
04677
04678         private void CmbTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
04679         {
04680             try
04681             {
04682                 if (_itemsView != null && cmbTabNavigation != null && _itemsView.TabNavigation != (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex)
04683                 {
04684                     _itemsView.TabNavigation = (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex;
04685                 }
04686             }
04687             catch (Exception ex)
04688             {
04689                 txtExceptionReport.Text = ex.ToString();
04690                 AppendEventMessage(ex.ToString());
04691             }
04692         }
04693
04694         private void CmbXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
04695         {
04696             try
04697             {
04698                 if (_itemsView != null && cmbXYFocusKeyboardNavigation != null && _itemsView.XYFocusKeyboardNavigation != (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex)
04699                 {
04700                     _itemsView.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;
04701                 }
04702             }
04703             catch (Exception ex)
04704             {
04705                 txtExceptionReport.Text = ex.ToString();
04706                 AppendEventMessage(ex.ToString());
04707             }
04708         }
04709
04710         private void CmbLinedFlowLayoutItemsJustification_SelectionChanged(object sender, SelectionChangedEventArgs e)
04711         {
04712             try
04713             {
04714                 if (_linedFlowLayout != null && cmbLinedFlowLayoutItemsJustification != null && _linedFlowLayout.ItemsJustification != (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex)
04715                 {
04716                     _linedFlowLayout.ItemsJustification = (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex;
04717                 }
04718             }
04719             catch (Exception ex)
04720             {
04721                 txtExceptionReport.Text = ex.ToString();
04722                 AppendEventMessage(ex.ToString());
04723             }
04724         }
04725
04726         private void CmbLinedFlowLayoutItemsStretch_SelectionChanged(object sender, SelectionChangedEventArgs e)
04727         {
04728             try
04729             {
04730                 if (_linedFlowLayout != null && cmbLinedFlowLayoutItemsStretch != null && _linedFlowLayout.ItemsStretch != (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex)
04731                 {
04732                     _linedFlowLayout.ItemsStretch = (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex;
04733                 }
04734             }
04735             catch (Exception ex)
04736             {
04737                 txtExceptionReport.Text = ex.ToString();
04738                 AppendEventMessage(ex.ToString());
04739             }
04740         }
04741
04742         private void CmbUniformGridLayoutItemsJustification_SelectionChanged(object sender, SelectionChangedEventArgs e)
04743         {
04744             try
04745             {
04746                 if (_uniformGridLayout != null && cmbUniformGridLayoutItemsJustification != null && _uniformGridLayout.ItemsJustification != (UniformGridLayoutItemsJustification)cmbUniformGridLayoutItemsJustification.SelectedIndex)
04747                 {
04748                     _uniformGridLayout.ItemsJustification = (UniformGridLayoutItemsJustification)cmbUniformGridLayoutItemsJustification.SelectedIndex;
04749                 }
04750             }
04751             catch (Exception ex)
04752             {
04753                 txtExceptionReport.Text = ex.ToString();
04754                 AppendEventMessage(ex.ToString());
04755             }
04756         }
04757
04758         private void CmbUniformGridLayoutItemsStretch_SelectionChanged(object sender, SelectionChangedEventArgs e)
04759         {
04760             try
04761             {
04762                 if (_uniformGridLayout != null && cmbLinedFlowLayoutItemsStretch != null && _uniformGridLayout.ItemsStretch != (UniformGridLayoutItemsStretch)cmbUniformGridLayoutItemsStretch.SelectedIndex)
04763                 {
04764                     _uniformGridLayout.ItemsStretch = (UniformGridLayoutItemsStretch)cmbUniformGridLayoutItemsStretch.SelectedIndex;
04765                 }
04766             }
04767             catch (Exception ex)
04768             {
04769                 txtExceptionReport.Text = ex.ToString();
04770                 AppendEventMessage(ex.ToString());
04771             }
04772         }
04773
04774         private void ChkItemsViewProperties_Checked(object sender, RoutedEventArgs e)
04775         {
04776             if (svItemsViewProperties != null)
04777                 svItemsViewProperties.Visibility = Visibility.Visible;
04778         }
04779
04780         private void ChkItemsViewProperties_Unchecked(object sender, RoutedEventArgs e)
04781         {
04782             if (svItemsViewProperties != null)
04783                 svItemsViewProperties.Visibility = Visibility.Collapsed;
04784         }
04785
04786         private void ChkChildrenProperties_Checked(object sender, RoutedEventArgs e)
04787         {
04788             if (svChildrenProperties != null)
04789                 svChildrenProperties.Visibility = Visibility.Visible;
04790         }
04791
04792         private void ChkChildrenProperties_Unchecked(object sender, RoutedEventArgs e)
04793         {
04794             if (svChildrenProperties != null)
04795                 svChildrenProperties.Visibility = Visibility.Collapsed;
04796         }
04797
04798         private void ChkItemsViewMethods_Checked(object sender, RoutedEventArgs e)
04799         {
04800             if (svItemsViewMethods != null)
04801                 svItemsViewMethods.Visibility = Visibility.Visible;
04802         }
04803
04804         private void ChkItemsViewMethods_Unchecked(object sender, RoutedEventArgs e)
04805         {
04806             if (svItemsViewMethods != null)
04807                 svItemsViewMethods.Visibility = Visibility.Collapsed;
04808         }
04809
04810         private void ChkLogs_Checked(object sender, RoutedEventArgs e)
04811         {
04812             if (grdLogs != null)
04813                 grdLogs.Visibility = Visibility.Visible;
04814         }
04815
04816         private void ChkLogs_Unchecked(object sender, RoutedEventArgs e)
04817         {
04818             if (grdLogs != null)
04819                 grdLogs.Visibility = Visibility.Collapsed;
04820         }
04821
04822         private void ChkPageMethods_Checked(object sender, RoutedEventArgs e)
04823         {
04824             if (grdPageMethods != null)
04825                 grdPageMethods.Visibility = Visibility.Visible;
04826         }
04827
04828         private void ChkPageMethods_Unchecked(object sender, RoutedEventArgs e)
04829         {
04830             if (grdPageMethods != null)
04831                 grdPageMethods.Visibility = Visibility.Collapsed;
04832         }
04833
04834         private void ChkItemsViewDataSource_Checked(object sender, RoutedEventArgs e)
04835         {
04836             if (grdItemsViewDataSource != null)
04837                 grdItemsViewDataSource.Visibility = Visibility.Visible;
04838         }
04839
04840         private void ChkItemsViewDataSource_Unchecked(object sender, RoutedEventArgs e)
04841         {
04842             if (grdItemsViewDataSource != null)
04843                 grdItemsViewDataSource.Visibility = Visibility.Collapsed;
04844         }
04845
04846         private void BtnDataSourceGetItemCount_Click(object sender, RoutedEventArgs e)
04847         {
04848             UpdateDataSourceItemCount();
04849         }
04850
04851         private void BtnDataSourceSetItemCount_Click(object sender, RoutedEventArgs e)
04852         {
04853             try
04854             {
04855                 if (_itemsView != null && txtDataSourceItemCount != null)
04856                 {
04857                     int newItemCount = int.Parse(txtDataSourceItemCount.Text);
04858                     var rnd = new Random();
04859
04860                     if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _lstEntities)
04861                     {
04862                         bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _lstEntities;
04863                         int currentItemCount = _lstEntities == null ? 0 : _lstEntities.Count;
04864
04865                         if (currentItemCount < newItemCount)
04866                         {
04867                             var lstEntitiesEnd = new List<Entity>();
04868
04869                             for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
04870                             {
04871                                 lstEntitiesEnd.Add(new Entity() {
04872                                     ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
04873                                     Id = itemIndex,
04874                                     Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(25, 125))
04875                                 });
04876                             }
04877
04878                             if (currentItemCount == 0)
04879                             {
04880                                 _lstEntities = lstEntitiesEnd;
04881                             }
04882                             else
04883                             {
04884                                 _lstEntities = new List<Entity>(_lstEntities.Concat(lstEntitiesEnd));
04885                             }
04886                         }
04887                         else if (currentItemCount > newItemCount)
04888                         {
04889                             _lstEntities = new List<Entity>(_lstEntities.Take(newItemCount));
04890                         }
04891
04892                         if (setItemsSource)
04893                         {
04894                             _itemsView.ItemsSource = _lstEntities;
04895                         }
04896                     }
04897
04898                     if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallEntities)
04899                     {
04900                         bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallEntities;
04901                         int currentItemCount = _colSmallEntities == null ? 0 : _colSmallEntities.Count;
04902
04903                         if (currentItemCount < newItemCount)
04904                         {
04905                             var colEntitiesEnd = new ObservableCollection<Entity>();
04906
04907                             for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
04908                             {
04909                                 colEntitiesEnd.Add(new Entity() {
04910                                     ImageUri = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6)),
04911                                     Id = itemIndex,
04912                                     Description = itemIndex.ToString()
04913                                 });
04914                             }
04915
04916                             if (currentItemCount == 0)
04917                             {
04918                                 _colSmallEntities = colEntitiesEnd;
04919                             }
04920                             else
04921                             {
04922                                 _colSmallEntities = new ObservableCollection<Entity>(_colSmallEntities.Concat(colEntitiesEnd));
04923                             }
04924                         }
04925                         else if (currentItemCount > newItemCount)
04926                         {
04927                             _colSmallEntities = new ObservableCollection<Entity>(_colSmallEntities.Take(newItemCount));
04928                         }
04929
04930                         if (setItemsSource)
04931                         {
04932                             _itemsView.ItemsSource = _colSmallEntities;
04933                         }
04934                     }
04935
04936                     if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallUniformEntities)
04937                     {
04938                         bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallUniformEntities;
04939                         int currentItemCount = _colSmallUniformEntities == null ? 0 : _colSmallUniformEntities.Count;
04940
04941                         if (currentItemCount < newItemCount)
04942                         {
04943                             var colEntitiesEnd = new ObservableCollection<Entity>();
04944
04945                             for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
04946                             {
04947                                 colEntitiesEnd.Add(new Entity() {
04948                                     ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
04949                                     Id = itemIndex,
04950                                     Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
04951                                 });
04952                             }
04953
04954                             if (currentItemCount == 0)
04955                             {
04956                                 _colSmallUniformEntities = colEntitiesEnd;
04957                             }
04958                             else
04959                             {
04960                                 _colSmallUniformEntities = new ObservableCollection<Entity>(_colSmallUniformEntities.Concat(colEntitiesEnd));
04961                             }
04962                         }
04963                         else if (currentItemCount > newItemCount)
04964                         {
04965                             _colSmallUniformEntities = new ObservableCollection<Entity>(_colSmallUniformEntities.Take(newItemCount));
04966                         }
04967
04968                         if (setItemsSource)
04969                         {
04970                             _itemsView.ItemsSource = _colSmallUniformEntities;
04971                         }
04972                     }
04973
04974                     if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colEntities)
04975                     {
04976                         bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colEntities;
04977                         int currentItemCount = _colEntities == null ? 0 : _colEntities.Count;
04978
04979                         if (currentItemCount < newItemCount)
04980                         {
04981                             var colEntitiesEnd = new ObservableCollection<Entity>();
04982
04983                             for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
04984                             {
04985                                 colEntitiesEnd.Add(new Entity() {
04986                                     ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1)),
04987                                     Id = itemIndex,
04988                                     Description = itemIndex + " - " + _lorem.Substring(0, rnd.Next(50, 350))
04989                                 });
04990                             }
04991
04992                             if (currentItemCount == 0)
04993                             {
04994                                 _colEntities = colEntitiesEnd;
04995                             }
04996                             else
04997                             {
04998                                 _colEntities = new ObservableCollection<Entity>(_colEntities.Concat(colEntitiesEnd));
04999                             }
05000                         }
05001                         else if (currentItemCount > newItemCount)
05002                         {
05003                             _colEntities = new ObservableCollection<Entity>(_colEntities.Take(newItemCount));
05004                         }
05005
05006                         if (setItemsSource)
05007                         {
05008                             _itemsView.ItemsSource = _colEntities;
05009                         }
05010                     }
05011
05012                     if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallItemContainers)
05013                     {
05014                         bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallItemContainers;
05015                         int currentItemCount = _colSmallItemContainers == null ? 0 : _colSmallItemContainers.Count;
05016
05017                         if (currentItemCount < newItemCount)
05018                         {
05019                             var colItemContainersEnd = new ObservableCollection<ItemContainer>();
05020
05021                             for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
05022                             {
05023                                 ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(itemIndex);
05024
05025                                 colItemContainersEnd.Add(itemContainer);
05026                             }
05027
05028                             if (currentItemCount == 0)
05029                             {
05030                                 _colSmallItemContainers = colItemContainersEnd;
05031                             }
05032                             else
05033                             {
05034                                 _colSmallItemContainers = new ObservableCollection<ItemContainer>(_colSmallItemContainers.Concat(colItemContainersEnd));
05035                             }
05036                         }
05037                         else if (currentItemCount > newItemCount)
05038                         {
05039                             _colSmallItemContainers = new ObservableCollection<ItemContainer>(_colSmallItemContainers.Take(newItemCount));
05040                         }
05041
05042                         if (setItemsSource)
05043                         {
05044                             _itemsView.ItemsSource = _colSmallItemContainers;
05045                         }
05046                     }
05047
05048                     if (_itemsView.ItemsSource == null || _itemsView.ItemsSource == _colSmallImages)
05049                     {
05050                         bool setItemsSource = _itemsView.ItemsSource != null && _itemsView.ItemsSource == _colSmallImages;
05051                         int currentItemCount = _colSmallImages == null ? 0 : _colSmallImages.Count;
05052
05053                         if (currentItemCount < newItemCount)
05054                         {
05055                             var colImagesEnd = new ObservableCollection<Image>();
05056
05057                             for (int itemIndex = currentItemCount; itemIndex < newItemCount; itemIndex++)
05058                             {
05059                                 Image image = GetImageAsItemsSourceItem(itemIndex);
05060
05061                                 colImagesEnd.Add(image);
05062                             }
05063
05064                             if (currentItemCount == 0)
05065                             {
05066                                 _colSmallImages = colImagesEnd;
05067                             }
05068                             else
05069                             {
05070                                 _colSmallImages = new ObservableCollection<Image>(_colSmallImages.Concat(colImagesEnd));
05071                             }
05072                         }
05073                         else if (currentItemCount > newItemCount)
05074                         {
05075                             _colSmallImages = new ObservableCollection<Image>(_colSmallImages.Take(newItemCount));
05076                         }
05077
05078                         if (setItemsSource)
05079                         {
05080                             _itemsView.ItemsSource = _colSmallImages;
05081                         }
05082                     }
05083                 }
05084             }
05085             catch (Exception ex)
05086             {
05087                 txtExceptionReport.Text = ex.ToString();
05088                 AppendEventMessage(ex.ToString());
05089             }
05090         }
05091
05092         private void DataSourceAddItem()
05093         {
05094             try
05095             {
05096                 if (_itemsView != null && _itemsView.ItemsSource != null)
05097                 {
05098                     var rnd = new Random();
05099
05100                     if (_itemsView.ItemsSource == _lstEntities)
05101                     {
05102                         var entity = new Entity() {
05103                             ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", _lstEntities.Count % 126 + 1)),
05104                             Id = _lstEntities.Count,
05105                             Description = _lstEntities.Count + " - " + _lorem.Substring(0, rnd.Next(25, 125))
05106                         };
05107
05108                         _lstEntities.Add(entity);
05109                     }
05110                     else
05111                     {
05112                         ObservableCollection<Entity> colEntities = _itemsView.ItemsSource as ObservableCollection<Entity>;
05113
05114                         if (colEntities != null)
05115                         {
05116                             string uriString;
05117                             string description;
05118
05119                             if (colEntities == _colEntities || colEntities == _colSmallUniformEntities)
05120                             {
05121                                 uriString = string.Format("ms-appx:///Images/vette{0}.jpg", colEntities.Count % 126 + 1);
05122                                 description = colEntities.Count.ToString() + " - " + _lorem.Substring(0, rnd.Next(50, 350));
05123                             }
05124                             else
05125                             {
05126                                 uriString = string.Format("ms-appx:///Images/Rect{0}.png", colEntities.Count % 6);
05127                                 description = colEntities.Count.ToString();
05128                             }
05129
05130                             var entity = new Entity() {
05131                                 ImageUri = new Uri(uriString),
05132                                 Id = colEntities.Count,
05133                                 Description = description
05134                             };
05135
05136                             colEntities.Add(entity);
05137                         }
05138                         else
05139                         {
05140                             ObservableCollection<ItemContainer> colItemContainers = _itemsView.ItemsSource as ObservableCollection<ItemContainer>;
05141
05142                             if (colItemContainers != null)
05143                             {
05144                                 ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(colItemContainers.Count);
05145
05146                                 colItemContainers.Add(itemContainer);
05147                             }
05148                             else
05149                             {
05150                                 ObservableCollection<Image> colImages = _itemsView.ItemsSource as ObservableCollection<Image>;
05151
05152                                 if (colImages != null)
05153                                 {
05154                                     Image image = GetImageAsItemsSourceItem(colImages.Count);
05155
05156                                     colImages.Add(image);
05157                                 }
05158                             }
05159                         }
05160                     }
05161                 }
05162             }
05163             catch (Exception ex)
05164             {
05165                 txtExceptionReport.Text = ex.ToString();
05166                 AppendEventMessage(ex.ToString());
05167             }
05168         }
05169
05170         private void DataSourceInsertItem(int newItemIndex)
05171         {
05172             try
05173             {
05174                 if (_itemsView != null && _itemsView.ItemsSource != null)
05175                 {
05176                     var rnd = new Random();
05177
05178                     if (_itemsView.ItemsSource == _lstEntities)
05179                     {
05180                         var entity = new Entity() {
05181                             ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", _lstEntities.Count % 126 + 1)),
05182                             Id = _lstEntities.Count,
05183                             Description = _lstEntities.Count + " - " + _lorem.Substring(0, rnd.Next(25, 125))
05184                         };
05185
05186                         _lstEntities.Insert(newItemIndex, entity);
05187                     }
05188                     else
05189                     {
05190                         ObservableCollection<Entity> colEntities = _itemsView.ItemsSource as ObservableCollection<Entity>;
05191
05192                         if (colEntities != null)
05193                         {
05194                             string uriString;
05195                             string description;
05196
05197                             if (colEntities == _colEntities || colEntities == _colSmallUniformEntities)
05198                             {
05199                                 uriString = string.Format("ms-appx:///Images/vette{0}.jpg", colEntities.Count % 126 + 1);
05200                                 description = colEntities.Count.ToString() + " - " + _lorem.Substring(0, rnd.Next(50, 350));
05201                             }
05202                             else
05203                             {
05204                                 uriString = string.Format("ms-appx:///Images/Rect{0}.png", colEntities.Count % 6);
05205                                 description = colEntities.Count.ToString();
05206                             }
05207
05208                             var entity = new Entity() {
05209                                 ImageUri = new Uri(uriString),
05210                                 Id = colEntities.Count,
05211                                 Description = description
05212                             };
05213
05214                             colEntities.Insert(newItemIndex, entity);
05215                         }
05216                         else
05217                         {
05218                             ObservableCollection<ItemContainer> colItemContainers = _itemsView.ItemsSource as ObservableCollection<ItemContainer>;
05219
05220                             if (colItemContainers != null)
05221                             {
05222                                 ItemContainer itemContainer = GetItemContainerAsItemsSourceItem(colItemContainers.Count);
05223
05224                                 colItemContainers.Insert(newItemIndex, itemContainer);
05225                             }
05226                             else
05227                             {
05228                                 ObservableCollection<Image> colImages = _itemsView.ItemsSource as ObservableCollection<Image>;
05229
05230                                 if (colImages != null)
05231                                 {
05232                                     Image image = GetImageAsItemsSourceItem(colImages.Count);
05233
05234                                     colImages.Insert(newItemIndex, image);
05235                                 }
05236                             }
05237                         }
05238                     }
05239                 }
05240             }
05241             catch (Exception ex)
05242             {
05243                 txtExceptionReport.Text = ex.ToString();
05244                 AppendEventMessage(ex.ToString());
05245             }
05246         }
05247
05248         private void DataSourceRemoveAllItems()
05249         {
05250             try
05251             {
05252                 if (_itemsView != null && _itemsView.ItemsSource != null)
05253                 {
05254                     if (_itemsView.ItemsSource == _lstEntities)
05255                     {
05256                         _lstEntities.Clear();
05257                     }
05258                     else if (_itemsView.ItemsSource == _colSmallEntities)
05259                     {
05260                         _colSmallEntities.Clear();
05261                     }
05262                     else if (_itemsView.ItemsSource == _colSmallUniformEntities)
05263                     {
05264                         _colSmallUniformEntities.Clear();
05265                     }
05266                     else if (_itemsView.ItemsSource == _colEntities)
05267                     {
05268                         _colEntities.Clear();
05269                     }
05270                     else if (_itemsView.ItemsSource == _colSmallItemContainers)
05271                     {
05272                         _colSmallItemContainers.Clear();
05273                     }
05274                     else if (_itemsView.ItemsSource == _colSmallImages)
05275                     {
05276                         _colSmallImages.Clear();
05277                     }
05278                 }
05279             }
05280             catch (Exception ex)
05281             {
05282                 txtExceptionReport.Text = ex.ToString();
05283                 AppendEventMessage(ex.ToString());
05284             }
05285         }
05286
05287         private void DataSourceRemoveItem(int oldItemIndex)
05288         {
05289             try
05290             {
05291                 if (_itemsView != null && _itemsView.ItemsSource != null)
05292                 {
05293                     if (_itemsView.ItemsSource == _lstEntities)
05294                     {
05295                         _lstEntities.RemoveAt(oldItemIndex);
05296                     }
05297                     else if (_itemsView.ItemsSource == _colSmallEntities)
05298                     {
05299                         _colSmallEntities.RemoveAt(oldItemIndex);
05300                     }
05301                     else if (_itemsView.ItemsSource == _colSmallUniformEntities)
05302                     {
05303                         _colSmallUniformEntities.RemoveAt(oldItemIndex);
05304                     }
05305                     else if (_itemsView.ItemsSource == _colEntities)
05306                     {
05307                         _colEntities.RemoveAt(oldItemIndex);
05308                     }
05309                     else if (_itemsView.ItemsSource == _colSmallItemContainers)
05310                     {
05311                         _colSmallItemContainers.RemoveAt(oldItemIndex);
05312                     }
05313                     else if (_itemsView.ItemsSource == _colSmallImages)
05314                     {
05315                         _colSmallImages.RemoveAt(oldItemIndex);
05316                     }
05317                 }
05318             }
05319             catch (Exception ex)
05320             {
05321                 txtExceptionReport.Text = ex.ToString();
05322                 AppendEventMessage(ex.ToString());
05323             }
05324         }
05325
05326         private void DataSourceReplaceItem(int itemIndex)
05327         {
05328             try
05329             {
05330                 if (_itemsView != null && _itemsView.ItemsSource != null)
05331                 {
05332                     var rnd = new Random();
05333
05334                     if (_itemsView.ItemsSource == _lstEntities)
05335                     {
05336                         var entity = new Entity() {
05337                             ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", _lstEntities.Count % 126 + 1)),
05338                             Id = _lstEntities.Count,
05339                             Description = _lstEntities.Count + " - " + _lorem.Substring(0, rnd.Next(25, 125))
05340                         };
05341
05342                         _lstEntities[itemIndex] = entity;
05343                     }
05344                     else
05345                     {
05346                         ObservableCollection<Entity> colEntities = _itemsView.ItemsSource as ObservableCollection<Entity>;
05347
05348                         if (colEntities != null)
05349                         {
05350                             string uriString;
05351                             string description;
05352
05353                             if (colEntities == _colEntities || colEntities == _colSmallUniformEntities)
05354                             {
05355                                 uriString = string.Format("ms-appx:///Images/vette{0}.jpg", colEntities.Count % 126 + 1);
05356                                 description = colEntities.Count.ToString() + " - " + _lorem.Substring(0, rnd.Next(50, 350));
05357                             }
05358                             else
05359                             {
05360                                 uriString = string.Format("ms-appx:///Images/Rect{0}.png", colEntities.Count % 6);
05361                                 description = colEntities.Count.ToString();
05362                             }
05363
05364                             var entity = new Entity() {
05365                                 ImageUri = new Uri(uriString),
05366                                 Id = colEntities.Count,
05367                                 Description = description
05368                             };
05369
05370                             colEntities[itemIndex] = entity;
05371                         }
05372                     }
05373                 }
05374             }
05375             catch (Exception ex)
05376             {
05377                 txtExceptionReport.Text = ex.ToString();
05378                 AppendEventMessage(ex.ToString());
05379             }
05380         }
05381
05382         private void DataSourceReplaceItemContent(int itemIndex)
05383         {
05384             try
05385             {
05386                 if (_itemsView != null)
05387                 {
05388                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
05389
05390                     if (itemsRepeater != null)
05391                     {
05392                         UIElement element = GetItemsRepeaterElement(itemsRepeater, itemIndex);
05393
05394                         if (element is ItemContainer || element is ContentControl)
05395                         {
05396                             Border border = new Border() {
05397                                 BorderThickness = new Thickness(4),
05398                                 Background = _whiteBrush,
05399                                 BorderBrush = _redBrush
05400                             };
05401
05402                             ItemContainer itemContainer = element as ItemContainer;
05403
05404                             if (itemContainer != null)
05405                             {
05406                                 border.Width = 2 * itemContainer.ActualWidth;
05407                                 border.Height = itemContainer.ActualHeight;
05408                                 itemContainer.Child = border;
05409                             }
05410                             else
05411                             {
05412                                 ContentControl contentControl = element as ContentControl;
05413
05414                                 border.Width = 2 * contentControl.ActualWidth;
05415                                 border.Height = contentControl.ActualHeight;
05416                                 contentControl.Content = border;
05417                             }
05418                         }
05419                     }
05420                 }
05421             }
05422             catch (Exception ex)
05423             {
05424                 txtExceptionReport.Text = ex.ToString();
05425                 AppendEventMessage(ex.ToString());
05426             }
05427         }
05428
05429         private void BtnDataSourceAddItem_Click(object sender, RoutedEventArgs e)
05430         {
05431             AppendAsyncEventMessage("DataSourceAdd");
05432             DataSourceAddItem();
05433         }
05434
05435         private void BtnQueueDataSourceAddItem_Click(object sender, RoutedEventArgs e)
05436         {
05437             try
05438             {
05439                 AppendAsyncEventMessage("Queued DataSourceAdd");
05440                 _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceAdd));
05441                 _queuedOperationsTimer.Start();
05442             }
05443             catch (Exception ex)
05444             {
05445                 txtExceptionReport.Text = ex.ToString();
05446                 AppendEventMessage(ex.ToString());
05447             }
05448         }
05449
05450         private void BtnDataSourceInsertItem_Click(object sender, RoutedEventArgs e)
05451         {
05452             try
05453             {
05454                 if (txtDataSourceItemIndex != null)
05455                 {
05456                     int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);
05457
05458                     AppendAsyncEventMessage("DataSourceInsert " + newItemIndex);
05459                     DataSourceInsertItem(newItemIndex);
05460                 }
05461             }
05462             catch (Exception ex)
05463             {
05464                 txtExceptionReport.Text = ex.ToString();
05465                 AppendEventMessage(ex.ToString());
05466             }
05467         }
05468
05469         private void BtnQueueDataSourceInsertItem_Click(object sender, RoutedEventArgs e)
05470         {
05471             try
05472             {
05473                 if (txtDataSourceItemIndex != null)
05474                 {
05475                     int newItemIndex = int.Parse(txtDataSourceItemIndex.Text);
05476
05477                     AppendAsyncEventMessage("Queued DataSourceInsert " + newItemIndex);
05478                     _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceInsert, newItemIndex));
05479                     _queuedOperationsTimer.Start();
05480                 }
05481             }
05482             catch (Exception ex)
05483             {
05484                 txtExceptionReport.Text = ex.ToString();
05485                 AppendEventMessage(ex.ToString());
05486             }
05487         }
05488
05489         private void BtnDataSourceRemoveAllItems_Click(object sender, RoutedEventArgs e)
05490         {
05491             AppendAsyncEventMessage("DataSourceRemoveAll");
05492             DataSourceRemoveAllItems();
05493         }
05494
05495         private void BtnQueueDataSourceRemoveAllItems_Click(object sender, RoutedEventArgs e)
05496         {
05497             try
05498             {
05499                 AppendAsyncEventMessage("Queued DataSourceRemoveAll");
05500                 _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceRemoveAll));
05501                 _queuedOperationsTimer.Start();
05502             }
05503             catch (Exception ex)
05504             {
05505                 txtExceptionReport.Text = ex.ToString();
05506                 AppendEventMessage(ex.ToString());
05507             }
05508         }
05509
05510         private void BtnDataSourceRemoveItem_Click(object sender, RoutedEventArgs e)
05511         {
05512             try
05513             {
05514                 if (txtDataSourceItemIndex != null)
05515                 {
05516                     int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);
05517
05518                     AppendAsyncEventMessage("DataSourceRemove " + oldItemIndex);
05519                     DataSourceRemoveItem(oldItemIndex);
05520                 }
05521             }
05522             catch (Exception ex)
05523             {
05524                 txtExceptionReport.Text = ex.ToString();
05525                 AppendEventMessage(ex.ToString());
05526             }
05527         }
05528
05529         private void BtnQueueDataSourceRemoveItem_Click(object sender, RoutedEventArgs e)
05530         {
05531             try
05532             {
05533                 if (txtDataSourceItemIndex != null)
05534                 {
05535                     int oldItemIndex = int.Parse(txtDataSourceItemIndex.Text);
05536
05537                     AppendAsyncEventMessage("Queued DataSourceRemove " + oldItemIndex);
05538                     _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceRemove, oldItemIndex));
05539                     _queuedOperationsTimer.Start();
05540                 }
05541             }
05542             catch (Exception ex)
05543             {
05544                 txtExceptionReport.Text = ex.ToString();
05545                 AppendEventMessage(ex.ToString());
05546             }
05547         }
05548
05549         private void BtnDataSourceReplaceItem_Click(object sender, RoutedEventArgs e)
05550         {
05551             try
05552             {
05553                 if (txtDataSourceItemIndex != null)
05554                 {
05555                     int itemIndex = int.Parse(txtDataSourceItemIndex.Text);
05556
05557                     AppendAsyncEventMessage("DataSourceReplace " + itemIndex);
05558                     DataSourceReplaceItem(itemIndex);
05559                 }
05560             }
05561             catch (Exception ex)
05562             {
05563                 txtExceptionReport.Text = ex.ToString();
05564                 AppendEventMessage(ex.ToString());
05565             }
05566         }
05567
05568         private void BtnDataSourceReplaceItemContent_Click(object sender, RoutedEventArgs e)
05569         {
05570             try
05571             {
05572                 if (txtDataSourceItemIndex != null)
05573                 {
05574                     int itemIndex = int.Parse(txtDataSourceItemIndex.Text);
05575
05576                     AppendAsyncEventMessage("DataSourceReplace Content " + itemIndex);
05577                     DataSourceReplaceItemContent(itemIndex);
05578                 }
05579             }
05580             catch (Exception ex)
05581             {
05582                 txtExceptionReport.Text = ex.ToString();
05583                 AppendEventMessage(ex.ToString());
05584             }
05585         }
05586
05587         private void BtnQueueDataSourceReplaceItem_Click(object sender, RoutedEventArgs e)
05588         {
05589             try
05590             {
05591                 if (txtDataSourceItemIndex != null)
05592                 {
05593                     int itemIndex = int.Parse(txtDataSourceItemIndex.Text);
05594
05595                     AppendAsyncEventMessage("Queued DataSourceReplace " + itemIndex);
05596                     _lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.DataSourceReplace, itemIndex));
05597                     _queuedOperationsTimer.Start();
05598                 }
05599             }
05600             catch (Exception ex)
05601             {
05602                 txtExceptionReport.Text = ex.ToString();
05603                 AppendEventMessage(ex.ToString());
05604             }
05605         }
05606
05607         private void BtnParentMarkupItemsView_Click(object sender, RoutedEventArgs e)
05608         {
05609             try
05610             {
05611                 root.Children.Add(markupItemsView);
05612             }
05613             catch (Exception ex)
05614             {
05615                 txtExceptionReport.Text = ex.ToString();
05616                 AppendEventMessage(ex.ToString());
05617             }
05618         }
05619
05620         private void BtnUnparentMarkupItemsView_Click(object sender, RoutedEventArgs e)
05621         {
05622             try
05623             {
05624                 root.Children.Remove(markupItemsView);
05625             }
05626             catch (Exception ex)
05627             {
05628                 txtExceptionReport.Text = ex.ToString();
05629                 AppendEventMessage(ex.ToString());
05630             }
05631         }
05632
05633         private void BtnUnparentReparentMarkupItemsView_Click(object sender, RoutedEventArgs e)
05634         {
05635             try
05636             {
05637                 root.Children.Remove(markupItemsView);
05638                 root.Children.Add(markupItemsView);
05639             }
05640             catch (Exception ex)
05641             {
05642                 txtExceptionReport.Text = ex.ToString();
05643                 AppendEventMessage(ex.ToString());
05644             }
05645         }
05646
05647         private void BtnCreateDynamicItemsView_Click(object sender, RoutedEventArgs e)
05648         {
05649             try
05650             {
05651                 _dynamicItemsView = new ItemsView();
05652                 _dynamicItemsView.Name = "dynamicItemsView";
05653                 _dynamicItemsView.Width = 300.0;
05654                 _dynamicItemsView.Height = 400.0;
05655                 _dynamicItemsView.Margin = new Thickness(1);
05656                 _dynamicItemsView.Background = new SolidColorBrush(Colors.HotPink);
05657                 _dynamicItemsView.VerticalAlignment = VerticalAlignment.Top;
05658                 Grid.SetRow(_dynamicItemsView, 1);
05659             }
05660             catch (Exception ex)
05661             {
05662                 txtExceptionReport.Text = ex.ToString();
05663                 AppendEventMessage(ex.ToString());
05664             }
05665         }
05666
05667         private void BtnParentDynamicItemsView_Click(object sender, RoutedEventArgs e)
05668         {
05669             try
05670             {
05671                 root.Children.Add(_dynamicItemsView);
05672             }
05673             catch (Exception ex)
05674             {
05675                 txtExceptionReport.Text = ex.ToString();
05676                 AppendEventMessage(ex.ToString());
05677             }
05678         }
05679
05680         private void BtnUnparentDynamicItemsView_Click(object sender, RoutedEventArgs e)
05681         {
05682             try
05683             {
05684                 root.Children.Remove(_dynamicItemsView);
05685             }
05686             catch (Exception ex)
05687             {
05688                 txtExceptionReport.Text = ex.ToString();
05689                 AppendEventMessage(ex.ToString());
05690             }
05691         }
05692
05693         private void BtnUseMarkupItemsView_Click(object sender, RoutedEventArgs e)
05694         {
05695             UseItemsView(markupItemsView);
05696         }
05697
05698         private void BtnUseDynamicItemsView_Click(object sender, RoutedEventArgs e)
05699         {
05700             UseItemsView(_dynamicItemsView);
05701         }
05702
05703         private void BtnReleaseDynamicItemsView_Click(object sender, RoutedEventArgs e)
05704         {
05705             _dynamicItemsView = null;
05706
05707             GC.Collect();
05708             GC.WaitForPendingFinalizers();
05709         }
05710
05711         private void BtnShareLinedFlowLayout_Click(object sender, RoutedEventArgs e)
05712         {
05713             try
05714             {
05715                 if (_linedFlowLayout != null && _dynamicItemsView != null)
05716                 {
05717                     _dynamicItemsView.Layout = _linedFlowLayout;
05718                 }
05719             }
05720             catch (Exception ex)
05721             {
05722                 txtExceptionReport.Text = ex.ToString();
05723                 AppendEventMessage(ex.ToString());
05724             }
05725         }
05726
05727         private void BtnExecuteQueuedOperations_Click(object sender, RoutedEventArgs e)
05728         {
05729             ExecuteQueuedOperations();
05730         }
05731
05732         private void BtnDiscardQueuedOperations_Click(object sender, RoutedEventArgs e)
05733         {
05734             _lstQueuedOperations.Clear();
05735             AppendAsyncEventMessage("Queued operations cleared.");
05736         }
05737
05738         private void BtnGetFullLog_Click(object sender, RoutedEventArgs e)
05739         {
05740             GetFullLog();
05741         }
05742
05743         private void BtnClearFullLog_Click(object sender, RoutedEventArgs e)
05744         {
05745             ClearFullLog();
05746         }
05747
05748         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
05749         {
05750             lstLogs.Items.Clear();
05751         }
05752
05753         private void BtnCopyItemsViewEvents_Click(object sender, RoutedEventArgs e)
05754         {
05755             string logs = string.Empty;
05756
05757             foreach (object log in lstLogs.Items)
05758             {
05759                 logs += log.ToString() + "\n";
05760             }
05761
05762             var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
05763             dataPackage.SetText(logs);
05764             Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
05765         }
05766
05767         private void QueuedOperationsTimer_Tick(object sender, object e)
05768         {
05769             _queuedOperationsTimer.Stop();
05770             ExecuteQueuedOperations();
05771         }
05772
05773         private void ExecuteQueuedOperations()
05774         {
05775             try
05776             {
05777                 while (_lstQueuedOperations.Count > 0)
05778                 {
05779                     QueuedOperation qo = _lstQueuedOperations[0];
05780
05781                     switch (qo.Type)
05782                     {
05783                         case QueuedOperationType.SetWidth:
05784                             ItemsViewSetWidth(qo.DoubleValue);
05785                             break;
05786                         case QueuedOperationType.SetHeight:
05787                             ItemsViewSetHeight(qo.DoubleValue);
05788                             break;
05789                         case QueuedOperationType.StartBringItemIntoView:
05790                             ItemsViewStartBringItemIntoView();
05791                             break;
05792                         case QueuedOperationType.DataSourceAdd:
05793                             DataSourceAddItem();
05794                             break;
05795                         case QueuedOperationType.DataSourceInsert:
05796                             DataSourceInsertItem(qo.IntValue);
05797                             break;
05798                         case QueuedOperationType.DataSourceRemove:
05799                             DataSourceRemoveItem(qo.IntValue);
05800                             break;
05801                         case QueuedOperationType.DataSourceRemoveAll:
05802                             DataSourceRemoveAllItems();
05803                             break;
05804                         case QueuedOperationType.DataSourceReplace:
05805                             DataSourceReplaceItem(qo.IntValue);
05806                             break;
05807                     }
05808
05809                     _lstQueuedOperations.RemoveAt(0);
05810                 }
05811             }
05812             catch (Exception ex)
05813             {
05814                 txtExceptionReport.Text = ex.ToString();
05815                 AppendEventMessage(ex.ToString());
05816             }
05817         }
05818
05819         private void ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e)
05820         {
05821             if (_itemsView != null)
05822             {
05823                 HookScrollViewEvents(ItemsViewTestHooks.GetScrollViewPart(_itemsView));
05824             }
05825         }
05826
05827         private void ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e)
05828         {
05829             if (_itemsView != null)
05830             {
05831                 UnhookScrollViewEvents(ItemsViewTestHooks.GetScrollViewPart(_itemsView));
05832             }
05833         }
05834
05835         private void ChkLogItemsViewEvents_Checked(object sender, RoutedEventArgs e)
05836         {
05837             HookItemsViewEvents();
05838         }
05839
05840         private void ChkLogItemsViewEvents_Unchecked(object sender, RoutedEventArgs e)
05841         {
05842             UnhookItemsViewEvents();
05843         }
05844
05845         private void ChkLogLinedFlowLayoutMessages_Checked(object sender, RoutedEventArgs e)
05846         {
05847             LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
05848             LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
05849             LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;
05850
05851             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
05852             if (chkLogItemsViewMessages.IsChecked == false &&
05853                 chkLogScrollViewMessages.IsChecked == false &&
05854                 chkLogItemsRepeaterMessages.IsChecked == false &&
05855                 chkLogItemContainerMessages.IsChecked == false)
05856                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
05857         }
05858
05859         private void ChkLogLinedFlowLayoutMessages_Unchecked(object sender, RoutedEventArgs e)
05860         {
05861             LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
05862             LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
05863             LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;
05864
05865             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
05866             if (chkLogItemsViewMessages.IsChecked == false &&
05867                 chkLogScrollViewMessages.IsChecked == false &&
05868                 chkLogItemsRepeaterMessages.IsChecked == false &&
05869                 chkLogItemContainerMessages.IsChecked == false)
05870                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
05871         }
05872
05873         private void ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e)
05874         {
05875             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
05876             if (chkLogItemsViewMessages.IsChecked == false &&
05877                 chkLogScrollViewMessages.IsChecked == false &&
05878                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05879                 chkLogItemContainerMessages.IsChecked == false)
05880                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
05881         }
05882
05883         private void ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e)
05884         {
05885             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
05886             if (chkLogItemsViewMessages.IsChecked == false &&
05887                 chkLogScrollViewMessages.IsChecked == false &&
05888                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05889                 chkLogItemContainerMessages.IsChecked == false)
05890                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
05891         }
05892
05893         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e)
05894         {
05895             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
05896             if (chkLogItemsViewMessages.IsChecked == false &&
05897                 chkLogItemsRepeaterMessages.IsChecked == false &&
05898                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05899                 chkLogItemContainerMessages.IsChecked == false)
05900                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
05901         }
05902
05903         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e)
05904         {
05905             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
05906             if (chkLogItemsViewMessages.IsChecked == false &&
05907                 chkLogItemsRepeaterMessages.IsChecked == false &&
05908                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05909                 chkLogItemContainerMessages.IsChecked == false)
05910                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
05911         }
05912
05913         private void ChkLogItemContainerMessages_Checked(object sender, RoutedEventArgs e)
05914         {
05915             MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
05916             if (chkLogScrollViewMessages.IsChecked == false &&
05917                 chkLogItemsRepeaterMessages.IsChecked == false &&
05918                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05919                 chkLogItemsViewMessages.IsChecked == false)
05920                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
05921         }
05922
05923         private void ChkLogItemContainerMessages_Unchecked(object sender, RoutedEventArgs e)
05924         {
05925             MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
05926             if (chkLogScrollViewMessages.IsChecked == false &&
05927                 chkLogItemsRepeaterMessages.IsChecked == false &&
05928                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05929                 chkLogItemsViewMessages.IsChecked == false)
05930                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
05931         }
05932
05933         private void ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs e)
05934         {
05935             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
05936             if (chkLogScrollViewMessages.IsChecked == false &&
05937                 chkLogItemsRepeaterMessages.IsChecked == false &&
05938                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05939                 chkLogItemContainerMessages.IsChecked == false)
05940                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
05941         }
05942
05943         private void ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs e)
05944         {
05945             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
05946             if (chkLogScrollViewMessages.IsChecked == false &&
05947                 chkLogItemsRepeaterMessages.IsChecked == false &&
05948                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
05949                 chkLogItemContainerMessages.IsChecked == false)
05950                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
05951         }
05952
05953         private void HookLinedFlowLayoutEvents(LinedFlowLayout linedFlowLayout)
05954         {
05955             if (linedFlowLayout != null)
05956             {
05957                 linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
05958                 linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlocked;
05959             }
05960         }
05961
05962         private void UnhookLinedFlowLayoutEvents(LinedFlowLayout linedFlowLayout)
05963         {
05964             if (linedFlowLayout != null)
05965             {
05966                 linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;
05967                 linedFlowLayout.ItemsUnlocked -= LinedFlowLayout_ItemsUnlocked;
05968             }
05969         }
05970
05971         private void HookItemsRepeaterEvents(ItemsRepeater itemsRepeater)
05972         {
05973             if (itemsRepeater != null)
05974             {
05975                 //Uncomment if needed for debugging purposes
05976                 //itemsRepeater.LayoutUpdated += ItemsRepeater_LayoutUpdated;
05977
05978                 itemsRepeater.Loaded += ItemsRepeater_Loaded;
05979                 itemsRepeater.SizeChanged += ItemsRepeater_SizeChanged;
05980                 itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
05981                 itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
05982             }
05983         }
05984
05985         private void UnhookItemsRepeaterEvents(ItemsRepeater itemsRepeater)
05986         {
05987             if (itemsRepeater != null)
05988             {
05989                 itemsRepeater.LayoutUpdated -= ItemsRepeater_LayoutUpdated;
05990                 itemsRepeater.Loaded -= ItemsRepeater_Loaded;
05991                 itemsRepeater.SizeChanged -= ItemsRepeater_SizeChanged;
05992                 itemsRepeater.ElementPrepared -= ItemsRepeater_ElementPrepared;
05993                 itemsRepeater.ElementClearing -= ItemsRepeater_ElementClearing;
05994             }
05995         }
05996
05997         private void HookScrollViewEvents(ScrollView scrollView)
05998         {
05999             if (scrollView != null)
06000             {
06001                 scrollView.Loaded += ScrollView_Loaded;
06002                 scrollView.SizeChanged += ScrollView_SizeChanged;
06003                 scrollView.ExtentChanged += ScrollView_ExtentChanged;
06004                 scrollView.StateChanged += ScrollView_StateChanged;
06005                 scrollView.ViewChanged += ScrollView_ViewChanged;
06006                 scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
06007                 scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
06008                 scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
06009                 scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
06010
06011                 if (_scrollViewPointerWheelChangedEventHandler == null)
06012                 {
06013                     _scrollViewPointerWheelChangedEventHandler = new PointerEventHandler(ScrollView_PointerWheelChanged);
06014                 }
06015                 scrollView.AddHandler(UIElement.PointerWheelChangedEvent, _scrollViewPointerWheelChangedEventHandler, true);
06016             }
06017         }
06018
06019         private void UnhookScrollViewEvents(ScrollView scrollView)
06020         {
06021             if (scrollView != null)
06022             {
06023                 scrollView.Loaded -= ScrollView_Loaded;
06024                 scrollView.SizeChanged -= ScrollView_SizeChanged;
06025                 scrollView.ExtentChanged -= ScrollView_ExtentChanged;
06026                 scrollView.StateChanged -= ScrollView_StateChanged;
06027                 scrollView.ViewChanged -= ScrollView_ViewChanged;
06028                 scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
06029                 scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
06030                 scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
06031                 scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
06032
06033                 if (_scrollViewPointerWheelChangedEventHandler != null)
06034                 {
06035                     scrollView.RemoveHandler(UIElement.PointerWheelChangedEvent, _scrollViewPointerWheelChangedEventHandler);
06036                 }
06037             }
06038         }
06039
06040         private void HookItemsViewEvents()
06041         {
06042             if (_itemsView != null)
06043             {
06044                 _itemsView.ItemInvoked += ItemsView_ItemInvoked;
06045                 _itemsView.GettingFocus += ItemsView_GettingFocus;
06046                 _itemsView.GotFocus += ItemsView_GotFocus;
06047                 _itemsView.LosingFocus += ItemsView_LosingFocus;
06048                 _itemsView.LostFocus += ItemsView_LostFocus;
06049                 _itemsView.Loaded += ItemsView_Loaded;
06050                 _itemsView.SelectionChanged += ItemsView_SelectionChanged;
06051                 _itemsView.SizeChanged += ItemsView_SizeChanged;
06052
06053                 if (_itemsViewPointerWheelChangedEventHandler == null)
06054                 {
06055                     _itemsViewPointerWheelChangedEventHandler = new PointerEventHandler(ItemsView_PointerWheelChanged);
06056                 }
06057                 _itemsView.AddHandler(UIElement.PointerWheelChangedEvent, _itemsViewPointerWheelChangedEventHandler, true);
06058             }
06059         }
06060
06061         private void UnhookItemsViewEvents()
06062         {
06063             if (_itemsView != null)
06064             {
06065                 _itemsView.ItemInvoked -= ItemsView_ItemInvoked;
06066                 _itemsView.GettingFocus -= ItemsView_GettingFocus;
06067                 _itemsView.GotFocus -= ItemsView_GotFocus;
06068                 _itemsView.LosingFocus -= ItemsView_LosingFocus;
06069                 _itemsView.LostFocus -= ItemsView_LostFocus;
06070                 _itemsView.Loaded -= ItemsView_Loaded;
06071                 _itemsView.SelectionChanged -= ItemsView_SelectionChanged;
06072                 _itemsView.SizeChanged -= ItemsView_SizeChanged;
06073
06074                 if (_itemsViewPointerWheelChangedEventHandler != null)
06075                 {
06076                     _itemsView.RemoveHandler(UIElement.PointerWheelChangedEvent, _itemsViewPointerWheelChangedEventHandler);
06077                 }
06078             }
06079         }
06080
06081         private void LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged(object sender, object args)
06082         {
06083             AppendAsyncEventMessage("LinedFlowLayout snapped average items per line changed. SnappedAverageItemsPerLine: " + LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(sender as LinedFlowLayout).ToString() + ", AverageItemAspectRatio: " + LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(sender as LinedFlowLayout).ToString());
06084         }
06085
06086         private void LayoutsTestHooks_LinedFlowLayoutInvalidated(object sender, LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs args)
06087         {
06088             AppendAsyncEventMessage("LinedFlowLayout invalidated. InvalidationTrigger: " + args.InvalidationTrigger.ToString());
06089         }
06090
06091         private void LayoutsTestHooks_LinedFlowLayoutItemLocked(object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
06092         {
06093             AppendAsyncEventMessage("LinedFlowLayout item locked. ItemIndex: " + args.ItemIndex.ToString() + ", LineIndex: " + args.LineIndex.ToString());
06094         }
06095
06096         private void LayoutsTestHooks_LinedFlowLayoutItemLocked2(object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
06097         {
06098             if (!_lstLinedFlowLayoutLockedItemIndexes.Contains(args.ItemIndex))
06099             {
06100                 _lstLinedFlowLayoutLockedItemIndexes.Add(args.ItemIndex);
06101                 UpdateLinedFlowLayoutLockedItemsVisuals();
06102             }
06103         }
06104
06105         private void ItemsView_CurrentItemIndexChanged(DependencyObject o, DependencyProperty p)
06106         {
06107             UpdateItemsViewCurrentElementVisual(log: true);
06108         }
06109
06110         private void ItemsViewTestHooks_KeyboardNavigationReferenceOffsetChanged(ItemsView itemsView, object args)
06111         {
06112             UpdateItemsViewKeyboardNavigationReferenceOffsetVisual(log: true);
06113
06114             if ((bool)chkShowCurrentElement.IsChecked)
06115             {
06116                 UpdateItemsViewCurrentElementVisual(log: false);
06117             }
06118         }
06119
06120         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
06121         {
06122             // Cut off the terminating new line.
06123             string msg = args.Message.Substring(0, args.Message.Length - 1);
06124             string asyncEventMessage;
06125             string senderName = string.Empty;
06126
06127             try
06128             {
06129                 FrameworkElement fe = sender as FrameworkElement;
06130
06131                 if (fe != null)
06132                 {
06133                     senderName = "s:" + fe.Name + ", ";
06134                 }
06135             }
06136             catch
06137             {
06138             }
06139
06140             if (args.IsVerboseLevel)
06141             {
06142                 asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
06143             }
06144             else
06145             {
06146                 asyncEventMessage = "Info: " + senderName + "m:" + msg;
06147             }
06148
06149             AppendAsyncEventMessage(asyncEventMessage);
06150         }
06151
06152         private void AppendAsyncEventMessage(string asyncEventMessage)
06153         {
06154             lock (_asyncEventReportingLock)
06155             {
06156                 while (asyncEventMessage.Length > 0)
06157                 {
06158                     string msgHead = asyncEventMessage;
06159
06160                     if (asyncEventMessage.Length > 110)
06161                     {
06162                         int commaIndex = asyncEventMessage.IndexOf(',', 110);
06163                         if (commaIndex != -1)
06164                         {
06165                             msgHead = asyncEventMessage.Substring(0, commaIndex);
06166                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
06167                         }
06168                         else
06169                         {
06170                             asyncEventMessage = string.Empty;
06171                         }
06172                     }
06173                     else
06174                     {
06175                         asyncEventMessage = string.Empty;
06176                     }
06177
06178                     _lstAsyncEventMessage.Add(msgHead);
06179                 }
06180                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
06181
06182             }
06183         }
06184
06185         private void AppendAsyncEventMessage()
06186         {
06187             lock (_asyncEventReportingLock)
06188             {
06189                 foreach (string asyncEventMessage in _lstAsyncEventMessage)
06190                 {
06191                     AppendEventMessage(asyncEventMessage);
06192                 }
06193                 _lstAsyncEventMessage.Clear();
06194             }
06195         }
06196
06197         private void AppendEventMessage(string eventMessage)
06198         {
06199             lstLogs.Items.Add(eventMessage);
06200             _fullLogs.Add(eventMessage);
06201
06202             if ((bool)chkOutputDebugString.IsChecked)
06203             {
06204                 System.Diagnostics.Debug.WriteLine(eventMessage);
06205             }
06206         }
06207
06208         private void GetFullLog()
06209         {
06210             this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
06211             chkLogCleared.IsChecked = false;
06212             foreach (string log in _fullLogs)
06213             {
06214                 this.cmbFullLog.Items.Add(log);
06215             }
06216             chkLogUpdated.IsChecked = true;
06217             this.txtStatus.Text = "GetFullLog. Done.";
06218         }
06219
06220         private void ClearFullLog()
06221         {
06222             this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
06223             chkLogUpdated.IsChecked = false;
06224             _fullLogs.Clear();
06225             this.cmbFullLog.Items.Clear();
06226             chkLogCleared.IsChecked = true;
06227             this.txtStatus.Text = "ClearFullLog. Done.";
06228         }
06229
06230         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
06231         {
06232             txtExceptionReport.Text = string.Empty;
06233         }
06234
06235         private UIElement GetItemsRepeaterMethodElement(ItemsRepeater itemsRepeater)
06236         {
06237             try
06238             {
06239                 if (itemsRepeater != null)
06240                 {
06241                     int index = -1;
06242
06243                     int.TryParse(txtItemsRepeaterElementMethodIndex.Text, out index);
06244
06245                     return GetItemsRepeaterElement(itemsRepeater, index);
06246                 }
06247             }
06248             catch (Exception ex)
06249             {
06250                 txtExceptionReport.Text = ex.ToString();
06251                 AppendEventMessage(ex.ToString());
06252             }
06253
06254             return null;
06255         }
06256
06257         private UIElement GetItemsRepeaterPropertyElement(ItemsRepeater itemsRepeater)
06258         {
06259             try
06260             {
06261                 if (itemsRepeater != null)
06262                 {
06263                     int index = -1;
06264
06265                     int.TryParse(txtItemsRepeaterElementPropertyIndex.Text, out index);
06266
06267                     return GetItemsRepeaterElement(itemsRepeater, index);
06268                 }
06269             }
06270             catch (Exception ex)
06271             {
06272                 txtExceptionReport.Text = ex.ToString();
06273                 AppendEventMessage(ex.ToString());
06274             }
06275
06276             return null;
06277         }
06278
06279         private UIElement GetLinedFlowLayoutMethodElement(ItemsRepeater itemsRepeater)
06280         {
06281             try
06282             {
06283                 if (itemsRepeater != null)
06284                 {
06285                     int index = -1;
06286
06287                     int.TryParse(txtLinedFlowLayoutMethodIndex.Text, out index);
06288
06289                     return GetItemsRepeaterElement(itemsRepeater, index);
06290                 }
06291             }
06292             catch (Exception ex)
06293             {
06294                 txtExceptionReport.Text = ex.ToString();
06295                 AppendEventMessage(ex.ToString());
06296             }
06297
06298             return null;
06299         }
06300
06301         private UIElement GetItemsRepeaterElement(ItemsRepeater itemsRepeater, int index)
06302         {
06303             try
06304             {
06305                 if (itemsRepeater != null)
06306                 {
06307                     return itemsRepeater.TryGetElement(index);
06308                 }
06309             }
06310             catch (Exception ex)
06311             {
06312                 txtExceptionReport.Text = ex.ToString();
06313                 AppendEventMessage(ex.ToString());
06314             }
06315
06316             return null;
06317         }
06318
06319         private int GetItemsRepeaterElementIndex(FrameworkElement element)
06320         {
06321             if (_itemsView != null)
06322             {
06323                 ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(_itemsView);
06324
06325                 if (itemsRepeater != null)
06326                 {
06327                     FrameworkElement parent1 = element;
06328                     FrameworkElement parent2 = VisualTreeHelper.GetParent(parent1) as FrameworkElement;
06329
06330                     while (parent1 != null && parent2 != itemsRepeater)
06331                     {
06332                         parent1 = parent2;
06333                         parent2 = VisualTreeHelper.GetParent(parent1) as FrameworkElement;
06334                     }
06335
06336                     if (parent1 != null)
06337                     {
06338                         return itemsRepeater.GetElementIndex(parent1);
06339                     }
06340                 }
06341             }
06342
06343             return -1;
06344         }
06345
06346         private ItemContainer GetItemContainerAsItemsSourceItem(int itemIndex)
06347         {
06348             Grid grid = new Grid() {
06349                 Name = "itemPanel"
06350             };
06351
06352             BitmapImage bitmapImage = new BitmapImage() {
06353                 DecodePixelHeight = 96,
06354                 UriSource = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6))
06355             };
06356
06357             Image image = new Image() {
06358                 Name = "image",
06359                 Stretch = Stretch.UniformToFill,
06360                 HorizontalAlignment = HorizontalAlignment.Center,
06361                 VerticalAlignment = VerticalAlignment.Center,
06362                 Source = bitmapImage
06363             };
06364
06365             grid.Children.Add(image);
06366
06367             TextBlock textBlock = new TextBlock() {
06368                 Text = itemIndex.ToString(),
06369                 TextWrapping = TextWrapping.Wrap,
06370                 Margin = new Thickness(4),
06371                 Foreground = new SolidColorBrush(Colors.Yellow),
06372                 FontSize = 14.0,
06373                 MaxWidth = 68.0,
06374                 MaxHeight = 48.0,
06375                 HorizontalAlignment = HorizontalAlignment.Center,
06376                 VerticalAlignment = VerticalAlignment.Bottom
06377             };
06378
06379             grid.Children.Add(textBlock);
06380
06381             ItemContainer itemContainer = new ItemContainer() {
06382                 MinWidth = 72.0,
06383                 Height = 96.0,
06384                 Background = new SolidColorBrush(Colors.Gray),
06385                 Child = grid
06386             };
06387
06388             return itemContainer;
06389         }
06390
06391         private Image GetImageAsItemsSourceItem(int itemIndex)
06392         {
06393             BitmapImage bitmapImage = new BitmapImage() {
06394                 DecodePixelHeight = 96,
06395                 UriSource = new Uri(string.Format("ms-appx:///Images/Rect{0}.png", itemIndex % 6))
06396             };
06397
06398             Image image = new Image() {
06399                 Name = "image",
06400                 MinWidth = 72.0,
06401                 Height = 96.0,
06402                 Stretch = Stretch.UniformToFill,
06403                 HorizontalAlignment = HorizontalAlignment.Center,
06404                 VerticalAlignment = VerticalAlignment.Center,
06405                 Source = bitmapImage
06406             };
06407
06408             return image;
06409         }
06410
06411         private Thickness GetThicknessFromString(string thickness)
06412         {
06413             string[] lengths = thickness.Split(',');
06414             if (lengths.Length < 4)
06415                 return new Thickness(
06416                     Convert.ToDouble(lengths[0]));
06417             else
06418                 return new Thickness(
06419                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
06420         }
06421
06422         private CornerRadius GetCornerRadiusFromString(string cornerRadius)
06423         {
06424             string[] lengths = cornerRadius.Split(',');
06425             if (lengths.Length < 4)
06426                 return new CornerRadius(
06427                     Convert.ToDouble(lengths[0]));
06428             else
06429                 return new CornerRadius(
06430                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
06431         }
06432     }
06433 }
Generated on Sun Dec 1 2024 20:51:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsTestHooks.idl Source File

  • File List
  • File Members
  • RadioButtons

RadioButtonsTestHooks.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [default_interface]
00006 [webhosthidden]
00007 runtimeclass RadioButtonsTestHooks
00008 {
00009     static void SetTestHooksEnabled(MU_XC_NAMESPACE.RadioButtons radioButtons, Boolean enabled);
00010
00011     static Int32 GetRows(MU_XC_NAMESPACE.RadioButtons radioButtons);
00012     static Int32 GetColumns(MU_XC_NAMESPACE.RadioButtons radioButtons);
00013     static Int32 GetLargerColumns(MU_XC_NAMESPACE.RadioButtons radioButtons);
00014
00015     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.RadioButtons, Object> LayoutChanged;
00016 }
00017
00018 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewItemSource.cs Source File

  • File List
  • File Members
  • TreeView
  • TestUI

TreeViewItemSource.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.ObjectModel;
00006 using System.ComponentModel;
00007 using MUXControlsTestApp.Utilities;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     public class TreeViewItemSource : INotifyPropertyChanged
00012     {
00013         public event PropertyChangedEventHandler PropertyChanged;
00014         public String Content { get; set; }
00015         public ObservableCollection<TreeViewItemSource> Children { get; set; }
00016
00017         private bool m_isExpanded;
00018         public bool IsExpanded
00019         {
00020             get { return m_isExpanded; }
00021             set
00022             {
00023                 if (m_isExpanded != value)
00024                 {
00025                     m_isExpanded = value;
00026                     NotifyPropertyChanged("IsExpanded");
00027                 }
00028             }
00029         }
00030
00031         private bool m_isSelected;
00032         public bool IsSelected
00033         {
00034             get { return m_isSelected; }
00035
00036             set
00037             {
00038                 if (m_isSelected != value)
00039                 {
00040                     m_isSelected = value;
00041                     NotifyPropertyChanged("IsSelected");
00042                 }
00043             }
00044
00045         }
00046
00047         private bool m_hasUnrealizedChildren;
00048         public bool HasUnrealizedChildren
00049         {
00050             get { return m_hasUnrealizedChildren; }
00051
00052             set
00053             {
00054                 if (m_hasUnrealizedChildren != value)
00055                 {
00056                     m_hasUnrealizedChildren = value;
00057                     NotifyPropertyChanged("HasUnrealizedChildren");
00058                 }
00059             }
00060         }
00061
00062
00063
00064         private void NotifyPropertyChanged(String propertyName)
00065         {
00066             if (PropertyChanged != null)
00067             {
00068                 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
00069             }
00070         }
00071
00072         public TreeViewItemSource()
00073         {
00074             Children = new ObservableCollection<TreeViewItemSource>();
00075         }
00076
00077     }
00078 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

HandlePolicy Member List

This is the complete list of members for HandlePolicy, including all inherited members.
Close(HANDLE &handle) | HandlePolicy | [inline, static]
Close(HANDLE &handle) | HandlePolicy | [inline, static]
Invalidate(HANDLE &handle) | HandlePolicy | [inline, static]
Invalidate(HANDLE &handle) | HandlePolicy | [inline, static]
IsValid(const HANDLE &handle) | HandlePolicy | [inline, static]
IsValid(const HANDLE &handle) | HandlePolicy | [inline, static]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBrushTests Member List

This is the complete list of members for RevealBrushTests, including all inherited members.
AcrylicRectangleName | RevealBrushTests | [private]
ChooseFromComboBox(string textBoxName, string text) | RevealBrushTests | [inline, private]
ClassInitialize(TestContext testContext) | RevealBrushTests | [inline, static]
CoreWindowEventsTests() | RevealBrushTests | [inline]
LogResult(Edit result, string stateName) | RevealBrushTests | [inline, private]
RevealAlwaysUseFallback() | RevealBrushTests | [inline]
RevealBorderLightTouchTests() | RevealBrushTests | [inline]
RevealBrushAudit() | RevealBrushTests | [inline]
RevealBrushFromMarkup() | RevealBrushTests | [inline]
RevealButtonStates() | RevealBrushTests | [inline]
RevealButtonStates_FastRelease_Values() | RevealBrushTests | [inline]
RevealButtonStates_SlowRelease_Values() | RevealBrushTests | [inline]
RevealButtonStates_Values() | RevealBrushTests | [inline]
RevealCreateThenEnableEffects() | RevealBrushTests | [inline]
RevealHoverLightPosition_Values() | RevealBrushTests | [inline]
RevealHoverLightPositionTests() | RevealBrushTests | [inline]
RevealListViewItemStates() | RevealBrushTests | [inline]
RevealSetStateNoCrashWhenParentIsNotControl() | RevealBrushTests | [inline]
RevealStatesHelper(UIObject target) | RevealBrushTests | [inline, private]
SizeSliderName | RevealBrushTests | [private]
TestCleanup() | RevealBrushTests | [inline]
TintOpacitySliderName | RevealBrushTests | [private]
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedVisualPlayerProperties Member List

This is the complete list of members for AnimatedVisualPlayerProperties, including all inherited members.
AnimatedVisualPlayerProperties() | AnimatedVisualPlayerProperties |
AnimationOptimization(winrt::PlayerAnimationOptimization const &value) | AnimatedVisualPlayerProperties |
AnimationOptimization() | AnimatedVisualPlayerProperties |
AnimationOptimizationProperty() | AnimatedVisualPlayerProperties | [inline, static]
AutoPlay(bool value) | AnimatedVisualPlayerProperties |
AutoPlay() | AnimatedVisualPlayerProperties |
AutoPlayProperty() | AnimatedVisualPlayerProperties | [inline, static]
ClearProperties() | AnimatedVisualPlayerProperties | [static]
Diagnostics(winrt::IInspectable const &value) | AnimatedVisualPlayerProperties |
Diagnostics() | AnimatedVisualPlayerProperties |
DiagnosticsProperty() | AnimatedVisualPlayerProperties | [inline, static]
Duration(winrt::TimeSpan const &value) | AnimatedVisualPlayerProperties |
Duration() | AnimatedVisualPlayerProperties |
DurationProperty() | AnimatedVisualPlayerProperties | [inline, static]
EnsureProperties() | AnimatedVisualPlayerProperties | [static]
FallbackContent(winrt::DataTemplate const &value) | AnimatedVisualPlayerProperties |
FallbackContent() | AnimatedVisualPlayerProperties |
FallbackContentProperty() | AnimatedVisualPlayerProperties | [inline, static]
IsAnimatedVisualLoaded(bool value) | AnimatedVisualPlayerProperties |
IsAnimatedVisualLoaded() | AnimatedVisualPlayerProperties |
IsAnimatedVisualLoadedProperty() | AnimatedVisualPlayerProperties | [inline, static]
IsPlaying(bool value) | AnimatedVisualPlayerProperties |
IsPlaying() | AnimatedVisualPlayerProperties |
IsPlayingProperty() | AnimatedVisualPlayerProperties | [inline, static]
OnAnimationOptimizationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnAutoPlayPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnFallbackContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnPlaybackRatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
OnStretchPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedVisualPlayerProperties | [static]
PlaybackRate(double value) | AnimatedVisualPlayerProperties |
PlaybackRate() | AnimatedVisualPlayerProperties |
PlaybackRateProperty() | AnimatedVisualPlayerProperties | [inline, static]
s_AnimationOptimizationProperty | AnimatedVisualPlayerProperties | [static]
s_AutoPlayProperty | AnimatedVisualPlayerProperties | [static]
s_DiagnosticsProperty | AnimatedVisualPlayerProperties | [static]
s_DurationProperty | AnimatedVisualPlayerProperties | [static]
s_FallbackContentProperty | AnimatedVisualPlayerProperties | [static]
s_IsAnimatedVisualLoadedProperty | AnimatedVisualPlayerProperties | [static]
s_IsPlayingProperty | AnimatedVisualPlayerProperties | [static]
s_PlaybackRateProperty | AnimatedVisualPlayerProperties | [static]
s_SourceProperty | AnimatedVisualPlayerProperties | [static]
s_StretchProperty | AnimatedVisualPlayerProperties | [static]
Source(winrt::IAnimatedVisualSource const &value) | AnimatedVisualPlayerProperties |
Source() | AnimatedVisualPlayerProperties |
SourceProperty() | AnimatedVisualPlayerProperties | [inline, static]
Stretch(winrt::Stretch const &value) | AnimatedVisualPlayerProperties |
Stretch() | AnimatedVisualPlayerProperties |
StretchProperty() | AnimatedVisualPlayerProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonTestApi Member List

This is the complete list of members for SplitButtonTestApi, including all inherited members.
SimulateTouch() | SplitButtonTestApi | [static]
SimulateTouch(bool value) | SplitButtonTestApi | [static]
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewSelectedItemEdgeCasePage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewSelectedItemEdgeCasePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.IO;
00007 using System.Linq;
00008 using System.Runtime.InteropServices.WindowsRuntime;
00009 using Windows.ApplicationModel.Core;
00010 using Windows.Foundation;
00011 using Windows.Foundation.Collections;
00012 using Windows.UI;
00013 using Microsoft.UI.Xaml;
00014 using Microsoft.UI.Xaml.Controls;
00015 using Microsoft.UI.Xaml.Controls.Primitives;
00016 using Microsoft.UI.Xaml.Data;
00017 using Microsoft.UI.Xaml.Input;
00018 using Microsoft.UI.Xaml.Media;
00019 using Microsoft.UI.Xaml.Navigation;
00020 using Microsoft.UI.Xaml.Automation;
00021
00022 namespace MUXControlsTestApp
00023 {
00024     public sealed partial class NavigationViewSelectedItemEdgeCasePage : TestPage
00025     {
00026         public NavigationViewSelectedItemEdgeCasePage()
00027         {
00028             this.InitializeComponent();
00029
00030             NavView.SelectedItem = NavView.MenuItems[1];
00031         }
00032
00033         private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
00034         {
00035
00036         }
00037
00038         private void Button_click(object sender, RoutedEventArgs e)
00039         {
00040             var menuItem = new NavigationViewItem();
00041             menuItem.Content = "New Menu Item Ay";
00042             menuItem.Icon = new SymbolIcon(Symbol.AllApps);
00043             NavView.MenuItems.Add(menuItem);
00044         }
00045         private void Movies_Click(object sender, RoutedEventArgs e)
00046         {
00047             NavView.SelectedItem = MoviesItem;
00048         }
00049
00050         private void Movies_Click2(object sender, RoutedEventArgs e)
00051         {
00052             MoviesItem.IsSelected = true;
00053         }
00054
00055         private void TV_Click(object sender, RoutedEventArgs e)
00056         {
00057             NavView.SelectedItem = TVItem;
00058         }
00059
00060         private void TV_Click2(object sender, RoutedEventArgs e)
00061         {
00062             TVItem.IsSelected = true;
00063         }
00064
00065         private void CopyIsSelected_Click(object sender, RoutedEventArgs e)
00066         {
00067             StatusTextBlock.Text = MoviesItem.IsSelected + " " + TVItem.IsSelected;
00068         }
00069
00070     }
00071 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NonVirtualizingLayoutContext Member List

This is the complete list of members for NonVirtualizingLayoutContext, including all inherited members.
Children() | NonVirtualizingLayoutContext |
ChildrenCore() | NonVirtualizingLayoutContext | [virtual]
GetVirtualizingContextAdapter() | NonVirtualizingLayoutContext |
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommonStylesTests Member List

This is the complete list of members for CommonStylesTests, including all inherited members.
AppBarButtonDensityTest() | CommonStylesTests | [inline]
AppBarToggleButtonDensityTest() | CommonStylesTests | [inline]
AutoSuggestBoxDensityTest() | CommonStylesTests | [inline]
ClassInitialize(TestContext testContext) | CommonStylesTests | [inline, static]
ComboBoxDensityTest() | CommonStylesTests | [inline]
CornerRadiusTest() | CommonStylesTests | [inline]
DatePickerDensityTest() | CommonStylesTests | [inline]
HyperlinkIsOffscreenTest() | CommonStylesTests | [inline]
InkToolbarTest() | CommonStylesTests | [inline]
ListViewBaseItemPageNavigationTest() | CommonStylesTests | [inline]
ListViewItemDensityTest() | CommonStylesTests | [inline]
MenuFlyoutItemSizeTest() | CommonStylesTests | [inline]
PasswordBoxDensityTest() | CommonStylesTests | [inline]
RichEditBoxDensityTest() | CommonStylesTests | [inline]
RunCompactTests() | CommonStylesTests | [inline]
RunDensityTests(string buttonName) | CommonStylesTests | [inline, private]
ScrollGroupedGridViewWithMandatorySnapPointsTest() | CommonStylesTests | [inline]
SliderDensityTest() | CommonStylesTests | [inline]
TestCleanup() | CommonStylesTests | [inline]
TextBoxDensityTest() | CommonStylesTests | [inline]
TimePickerDensityTest() | CommonStylesTests | [inline]
ToggleSwitchDensityTest() | CommonStylesTests | [inline]
TopBottomAppBarTest() | CommonStylesTests | [inline]
TryWaitForEditValues(string editName, string editValue) | CommonStylesTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewExternalTornOutTabsDroppedEventArgs Member List

This is the complete list of members for TabViewExternalTornOutTabsDroppedEventArgs, including all inherited members.
DropIndex() const | TabViewExternalTornOutTabsDroppedEventArgs | [inline]
Items() const | TabViewExternalTornOutTabsDroppedEventArgs | [inline]
m_items | TabViewExternalTornOutTabsDroppedEventArgs | [private]
m_tabs | TabViewExternalTornOutTabsDroppedEventArgs | [private]
Tabs() const | TabViewExternalTornOutTabsDroppedEventArgs | [inline]
TabViewExternalTornOutTabsDroppedEventArgs(winrt::IInspectable const &item, winrt::UIElement const &tab, int dropIndex) | TabViewExternalTornOutTabsDroppedEventArgs |
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipFocusTestPageElements Member List

This is the complete list of members for TeachingTipFocusTestPageElements, including all inherited members.
closeButton | TeachingTipFocusTestPageElements | [private]
GetCloseButton() | TeachingTipFocusTestPageElements | [inline]
GetElement< T >(ref T element, string elementName) | TeachingTipFocusTestPageElements | [inline, private]
GetIsIdleCheckBox() | TeachingTipFocusTestPageElements | [inline]
GetIsLightDismissEnabledCheckBox() | TeachingTipFocusTestPageElements | [inline]
GetIsOpenCheckBox() | TeachingTipFocusTestPageElements | [inline]
GetOpenButton() | TeachingTipFocusTestPageElements | [inline]
GetTeachingTipCloseButton() | TeachingTipFocusTestPageElements | [inline]
isIdleCheckBox | TeachingTipFocusTestPageElements | [private]
isLightDismissEnabledCheckBox | TeachingTipFocusTestPageElements | [private]
isOpenCheckBox | TeachingTipFocusTestPageElements | [private]
openButton | TeachingTipFocusTestPageElements | [private]
teachingTipCloseButton | TeachingTipFocusTestPageElements | [private]
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ListViewBackgroundPage.xaml.cs Source File

  • File List
  • File Members
  • ParallaxView
  • TestUI

ListViewBackgroundPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.ObjectModel;
00005 using Microsoft.UI.Xaml;
00006 using MUXControlsTestApp.Utilities;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     public sealed partial class ListViewBackgroundPage : TestPage
00011     {
00012         private ObservableCollection<Ingredient> Ingredients = new ObservableCollection<Ingredient>();
00013
00014         public ListViewBackgroundPage()
00015         {
00016             this.InitializeComponent();
00017             this.CustomListViewStyle = this.sp.Resources["CustomListViewStyle"] as Style;
00018             PopulateData();
00019         }
00020
00021         private Style CustomListViewStyle
00022         {
00023             get;
00024             set;
00025         }
00026
00027         private void PopulateData()
00028         {
00029             this.Ingredients.Add(new Ingredient("Banana", "10 lbs", "Assets/ingredient1.png"));
00030             this.Ingredients.Add(new Ingredient("Strawberry", "27 lbs", "Assets/ingredient2.png"));
00031             this.Ingredients.Add(new Ingredient("Lemon", "12 lbs", "Assets/ingredient5.png"));
00032             this.Ingredients.Add(new Ingredient("Orange", "54 lbs", "Assets/ingredient3.png"));
00033             this.Ingredients.Add(new Ingredient("Vanilla", "2 lbs", "Assets/ingredient8.png"));
00034             this.Ingredients.Add(new Ingredient("Mint", "5 lbs", "Assets/ingredient4.png"));
00035             this.Ingredients.Add(new Ingredient("Banana", "9 lbs", "Assets/ingredient1.png"));
00036             this.Ingredients.Add(new Ingredient("Strawberry", "21 lbs", "Assets/ingredient2.png"));
00037             this.Ingredients.Add(new Ingredient("Lemon", "10 lbs", "Assets/ingredient5.png"));
00038             this.Ingredients.Add(new Ingredient("Orange", "57 lbs", "Assets/ingredient3.png"));
00039             this.Ingredients.Add(new Ingredient("Vanilla", "1 lbs", "Assets/ingredient8.png"));
00040             this.Ingredients.Add(new Ingredient("Mint", "4 lbs", "Assets/ingredient4.png"));
00041
00042             this.IngredientList.ItemsSource = this.Ingredients;
00043         }
00044
00045         private void btnChangeListViewStyle_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
00046         {
00047             if (this.IngredientList.Style == this.CustomListViewStyle)
00048             {
00049                 this.IngredientList.Style = null;
00050             }
00051             else
00052             {
00053                 this.IngredientList.Style = this.CustomListViewStyle;
00054             }
00055         }
00056     }
00057 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/InteractionTests/RepeaterTests.cs Source File

  • File List
  • File Members
  • Repeater
  • InteractionTests

RepeaterTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using Common;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class RepeaterTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00029         public static void ClassInitialize(TestContext testContext)
00030         {
00031             TestEnvironment.Initialize(testContext);
00032         }
00033
00034         [TestCleanup]
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         public void VerifyUniformGridLayoutDoesNotCreateHoles()
00042         {
00043             using (var setup = new TestSetupHelper("ItemsRepeater Tests"))
00044             {
00045                 // Open page
00046                 FindElement.ByName("UniformGridLayoutDemo").Click();
00047
00048                 // Scroll down
00049                 var scrollviewer = FindElement.ByName("RepeaterScrollViewer");
00050                 var repeaterHeightButton = FindElement.ByName("GetRepeaterActualHeightButton");
00051                 repeaterHeightButton.Click();
00052                 // Get actual repeater height
00053                 var oldActualRepeaterHeight = double.Parse(FindElement.ByName("RepeaterActualHeightLabel").GetText());
00054
00055                 InputHelper.RotateWheel(scrollviewer, -2000);
00056                 Wait.ForIdle();
00057
00058                 // Scroll back up again, users don't scroll large offsets at once but rather small chunks in succession.
00059                 for(int i=0;i<5;i++)
00060                 {
00061                     InputHelper.RotateWheel(scrollviewer, 50);
00062                     Wait.ForIdle();
00063                 }
00064
00065                 repeaterHeightButton.Click();
00066                 Verify.IsTrue(Math.Abs(oldActualRepeaterHeight -
00067                     double.Parse(FindElement.ByName("RepeaterActualHeightLabel").GetText())) < 1,
00068                     "Repeater heights did not match. This indicates that there are holes in layout as the repeater now needed more/less space.");
00069             }
00070         }
00071
00072         [TestMethod]
00073         public void VerifyUniformGridLayoutScrolling()
00074         {
00075             using (var setup = new TestSetupHelper("ItemsRepeater Tests"))
00076             {
00077                 // Open page
00078                 FindElement.ByName("UniformGridLayoutDemo").Click();
00079
00080                 // Set ScrollViewer HorizontalScrollBarVisibility to Disabled.
00081                 Log.Comment("Retrieving CmbScrollViewerHorizontalScrollBarVisibility");
00082                 UIObject CmbScrollViewerHorizontalScrollBarVisibilityUIObject = FindElement.ByName("CmbScrollViewerHorizontalScrollBarVisibility");
00083                 ComboBox CmbScrollViewerHorizontalScrollBarVisibility = new ComboBox(CmbScrollViewerHorizontalScrollBarVisibilityUIObject);
00084                 Verify.IsNotNull(CmbScrollViewerHorizontalScrollBarVisibility, "Verifying that CmbScrollViewerHorizontalScrollBarVisibility ComboBox was found");
00085
00086                 Log.Comment("Changing ScrollViewer HorizontalScrollBarVisibility to Disabled");
00087                 CmbScrollViewerHorizontalScrollBarVisibility.SelectItemByName("Disabled");
00088                 Log.Comment("Selection is now {0}", CmbScrollViewerHorizontalScrollBarVisibility.Selection[0].Name);
00089
00090                 // Set ScrollViewer MaxWidth to 500.
00091                 Log.Comment("Retrieving ScrollViewerMaxWidth");
00092                 UIObject ScrollViewerMaxWidthUIObject = FindElement.ByName("ScrollViewerMaxWidth");
00093                 Edit ScrollViewerMaxWidthTextBox = new Edit(ScrollViewerMaxWidthUIObject);
00094                 Verify.IsNotNull(ScrollViewerMaxWidthTextBox, "Verifying that ScrollViewerMaxWidth Edit was found");
00095                 ScrollViewerMaxWidthTextBox.SetValue("500");
00096                 Wait.ForIdle();
00097                 Log.Comment("ScrollViewerMaxWidth: " + ScrollViewerMaxWidthTextBox.Value);
00098
00099                 Log.Comment("Retrieving SetScrollViewerMaxWidth");
00100                 UIObject SetScrollViewerMaxWidthUIObject = FindElement.ByName("SetScrollViewerMaxWidth");
00101                 Button SetScrollViewerMaxWidthButton = new Button(SetScrollViewerMaxWidthUIObject);
00102                 Verify.IsNotNull(SetScrollViewerMaxWidthUIObject, "Verifying that SetScrollViewerMaxWidth Button was found");
00103                 Log.Comment("Updating ScrollViewerMaxWidth");
00104                 SetScrollViewerMaxWidthButton.Invoke();
00105                 Wait.ForIdle();
00106
00107                 // Set UniformGridLayout ItemsStretch to Fill.
00108                 Log.Comment("Retrieving CmbUniformGridLayoutItemsStretch");
00109                 UIObject CmbUniformGridLayoutItemsStretchUIObject = FindElement.ByName("CmbUniformGridLayoutItemsStretch");
00110                 ComboBox CmbUniformGridLayoutItemsStretch = new ComboBox(CmbUniformGridLayoutItemsStretchUIObject);
00111                 Verify.IsNotNull(CmbUniformGridLayoutItemsStretch, "Verifying that CmbUniformGridLayoutItemsStretch ComboBox was found");
00112
00113                 Log.Comment("Changing UniformGridLayout ItemsStretch to Fill");
00114                 CmbUniformGridLayoutItemsStretch.SelectItemByName("Fill");
00115                 Log.Comment("Selection is now {0}", CmbUniformGridLayoutItemsStretch.Selection[0].Name);
00116
00117                 // Set UniformGridLayout MinColumnSpacing to 50.
00118                 Log.Comment("Retrieving UniformGridLayoutMinColumnSpacing");
00119                 UIObject UniformGridLayoutMinColumnSpacingUIObject = FindElement.ByName("UniformGridLayoutMinColumnSpacing");
00120                 Edit UniformGridLayoutMinColumnSpacingTextBox = new Edit(UniformGridLayoutMinColumnSpacingUIObject);
00121                 Verify.IsNotNull(UniformGridLayoutMinColumnSpacingTextBox, "Verifying that UniformGridLayoutMinColumnSpacing Edit was found");
00122                 UniformGridLayoutMinColumnSpacingTextBox.SetValue("50");
00123                 Wait.ForIdle();
00124                 Log.Comment("UniformGridLayoutMinColumnSpacing: " + UniformGridLayoutMinColumnSpacingTextBox.Value);
00125
00126                 Log.Comment("Retrieving SetUniformGridLayoutMinColumnSpacing");
00127                 UIObject SetUniformGridLayoutMinColumnSpacingUIObject = FindElement.ByName("SetUniformGridLayoutMinColumnSpacing");
00128                 Button SetUniformGridLayoutMinColumnSpacingButton = new Button(SetUniformGridLayoutMinColumnSpacingUIObject);
00129                 Verify.IsNotNull(SetUniformGridLayoutMinColumnSpacingUIObject, "Verifying that SetUniformGridLayoutMinColumnSpacing Button was found");
00130                 Log.Comment("Updating UniformGridLayoutMinColumnSpacing");
00131                 SetUniformGridLayoutMinColumnSpacingButton.Invoke();
00132                 Wait.ForIdle();
00133
00134                 // Set ScrollViewer VerticalOffset to 1000.
00135                 Log.Comment("Retrieving ScrollViewerVerticalOffset");
00136                 UIObject ScrollViewerVerticalOffsetUIObject = FindElement.ByName("ScrollViewerVerticalOffset");
00137                 Edit ScrollViewerVerticalOffsetTextBox = new Edit(ScrollViewerVerticalOffsetUIObject);
00138                 Verify.IsNotNull(ScrollViewerVerticalOffsetTextBox, "Verifying that ScrollViewerVerticalOffset Edit was found");
00139                 ScrollViewerVerticalOffsetTextBox.SetValue("1000");
00140                 Wait.ForIdle();
00141                 Log.Comment("ScrollViewerVerticalOffset: " + ScrollViewerVerticalOffsetTextBox.Value);
00142
00143                 Log.Comment("Retrieving SetScrollViewerVerticalOffset");
00144                 UIObject SetScrollViewerVerticalOffsetUIObject = FindElement.ByName("SetScrollViewerVerticalOffset");
00145                 Button SetScrollViewerVerticalOffsetButton = new Button(SetScrollViewerVerticalOffsetUIObject);
00146                 Verify.IsNotNull(SetScrollViewerVerticalOffsetUIObject, "Verifying that SetScrollViewerVerticalOffset Button was found");
00147                 Log.Comment("Scrolling to ScrollViewer VerticalOffset 1000 by invoking SetScrollViewerVerticalOffset Button");
00148                 SetScrollViewerVerticalOffsetButton.Invoke();
00149                 Wait.ForIdle();
00150
00151                 Log.Comment("Retrieving GetScrollViewerVerticalOffset");
00152                 UIObject GetScrollViewerVerticalOffsetUIObject = FindElement.ByName("GetScrollViewerVerticalOffset");
00153                 Button GetScrollViewerVerticalOffsetButton = new Button(GetScrollViewerVerticalOffsetUIObject);
00154                 Verify.IsNotNull(GetScrollViewerVerticalOffsetUIObject, "Verifying that GetScrollViewerVerticalOffset Button was found");
00155                 Log.Comment("Retrieving ScrollViewer VerticalOffset by invoking GetScrollViewerVerticalOffset Button");
00156                 GetScrollViewerVerticalOffsetButton.Invoke();
00157                 Wait.ForIdle();
00158                 Log.Comment("ScrollViewerVerticalOffset: " + ScrollViewerVerticalOffsetTextBox.Value);
00159
00160                 Verify.AreEqual("1000", ScrollViewerVerticalOffsetTextBox.Value, "Verifying that final ScrollViewer VerticalOffset is requested 1000.");
00161             }
00162         }
00163
00164         [TestMethod]
00165         public void InsertAtStartBehavior()
00166         {
00167             using (var setup = new TestSetupHelper(new[] { "ItemsRepeater Tests" }))
00168             {
00169                 FindElement.ByName("Basic Demo").Click();
00170                 var addItemButton = FindElement.ByName("InsertAtStartButton");
00171                 var itemCountLabel = FindElement.ByName("InsertAtStartChildCountLabel");
00172
00173                 for (int i = 0; i < 10; i++)
00174                 {
00175                     // For performance reasons, invoking the button also reevaluates the children count.
00176                     // Technically there are i+1 children, but the button is one item behind.
00177                     // Since i starts at 0, everything lines up correctly in here and we don't have to invoke two buttons.
00178                     addItemButton.Click();
00179                     Wait.ForIdle();
00180                     Verify.AreEqual(i.ToString(), itemCountLabel.GetText());
00181                 }
00182             }
00183         }
00184     }
00185 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CollectionChangeDemo Member List

This is the complete list of members for CollectionChangeDemo, including all inherited members.
_dataSource | CollectionChangeDemo | [private]
CollectionChangeDemo() | CollectionChangeDemo | [inline]
OnItemClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | CollectionChangeDemo | [inline, private]
OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args) | CollectionChangeDemo | [inline, private]
ResettingCollectionRemoveItemButton_ItemClick(object sender, RoutedEventArgs e) | CollectionChangeDemo | [inline, private]
ResettingListItems | CollectionChangeDemo |
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

StoreDemoPage Member List

This is the complete list of members for StoreDemoPage, including all inherited members.
OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args) | StoreDemoPage | [inline, private]
OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args) | StoreDemoPage | [inline, private]
StoreDemoPage() | StoreDemoPage | [inline]
StoreDemoPage() | StoreDemoPage | [inline]
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MultipleSelector Member List

This is the complete list of members for MultipleSelector, including all inherited members.
CanSelect(winrt::IndexPath const &index) | SelectorBase | [protected, virtual]
Clear() | SelectorBase | [virtual]
DeselectWithAnchorPreservation(int index) | SelectorBase |
GetSelectionModel() | SelectorBase | [inline, protected]
IsSelected(winrt::IndexPath const &index) | SelectorBase | [protected]
MultipleSelector() | MultipleSelector |
OnFocusedAction(winrt::IndexPath const &index, bool ctrl, bool shift) override | MultipleSelector | [virtual]
OnInteractedAction(winrt::IndexPath const &index, bool ctrl, bool shift) override | MultipleSelector | [virtual]
SelectAll() | SelectorBase | [virtual]
SelectorBase() | SelectorBase |
SetSelectionModel(winrt::SelectionModel const &selectionModel) | SelectorBase |
~MultipleSelector() | MultipleSelector |
~SelectorBase() | SelectorBase |
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizingLayout Member List

This is the complete list of members for VirtualizingLayout, including all inherited members.
ArrangeOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize) | VirtualizingLayout | [virtual]
InitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
MeasureOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize) | VirtualizingLayout | [virtual]
OnItemsChangedCore(winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args) | VirtualizingLayout | [virtual]
UninitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
VirtualizingLayout() | VirtualizingLayout |
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarToggleButton Member List

This is the complete list of members for InkToolBarToggleButton, including all inherited members.
abi_enter() | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< InkToolBarToggleButton > &&self) noexcept | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
final_release(std::unique_ptr< InkToolBarToggleButton > &&self) | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
GetInner() | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable > | [inline]
ToggleKind() | InkToolBarToggleButton | [inline]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/NavigationViewTopNavOverflowButtonPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • TopMode

NavigationViewTopNavOverflowButtonPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005
00006 using NavigationViewItem = Microsoft.UI.Xaml.Controls.NavigationViewItem;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     public sealed partial class NavigationViewTopNavOverflowButtonPage : TestPage
00011     {
00012         public NavigationViewTopNavOverflowButtonPage()
00013         {
00014             this.InitializeComponent();
00015         }
00016
00017         private void AddItem4Button_Click(object sender, RoutedEventArgs e)
00018         {
00019             var menuItem = new NavigationViewItem
00020             {
00021                 Content = $"Menu Item 4",
00022             };
00023
00024             this.NavView.MenuItems.Add(menuItem);
00025         }
00026
00027         private void RemoveFirstItemButton_Click(object sender, RoutedEventArgs e)
00028         {
00029             if (NavView.MenuItems.Count > 0)
00030             {
00031                 NavView.MenuItems.RemoveAt(0);
00032             }
00033         }
00034
00035         private void RemoveLastItemButton_Click(object sender, RoutedEventArgs e)
00036         {
00037             if (NavView.MenuItems.Count > 0)
00038             {
00039                 NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
00040             }
00041         }
00042     }
00043 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DropDownButton Member List

This is the complete list of members for DropDownButton, including all inherited members.
abi_enter() | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
CheckThread() | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
CloseFlyout() | DropDownButton |
DeleteInstanceOnUIThread(std::unique_ptr< DropDownButton > &&self) noexcept | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline, static]
DropDownButton() | DropDownButton |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
final_release(std::unique_ptr< DropDownButton > &&self) | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline, static]
GetBase() | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
GetInner() | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
IsFlyoutOpen() | DropDownButton |
IsOnThread() | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
OnApplyTemplate() | DropDownButton |
OnCreateAutomationPeer() | DropDownButton |
OnFlyoutClosed(const winrt::IInspectable &sender, const winrt::IInspectable &args) | DropDownButton | [private]
OnFlyoutOpened(const winrt::IInspectable &sender, const winrt::IInspectable &args) | DropDownButton | [private]
OnFlyoutPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | DropDownButton | [private]
OpenFlyout() | DropDownButton |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< DropDownButton, winrt::implementation::DropDownButtonT > | [inline]
RegisterFlyoutEvents() | DropDownButton | [private]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TestUI/TeachingTipFocusPage.xaml.cs Source File

  • File List
  • File Members
  • TeachingTip
  • TestUI

TeachingTipFocusPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Private.Controls;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     public sealed partial class TeachingTipFocusPage : TestPage
00011     {
00012         public TeachingTipFocusPage()
00013         {
00014             this.InitializeComponent();
00015             TeachingTipTestHooks.IdleStatusChanged += TeachingTipTestHooks_IdleStatusChanged;
00016             TeachingTipTestHooks.OpenedStatusChanged += TeachingTipTestHooks_OpenedStatusChanged;
00017
00018             this.Loaded += OnLoaded;
00019         }
00020
00021         private void OnLoaded(object sender, RoutedEventArgs e)
00022         {
00023             ChangeTestFrameVisibility(Visibility.Collapsed);
00024         }
00025
00026         private void ChangeTestFrameVisibility(Visibility visibility)
00027         {
00028             var testFrame = this.Frame as TestFrame;
00029             testFrame?.ChangeBarVisibility(visibility);
00030         }
00031
00032         private void OpenTeachingTipButton_Click(object sender, RoutedEventArgs e)
00033         {
00034             this.TestTeachingTip.IsOpen = true;
00035         }
00036
00037         private void CloseTeachingTipButton_Click(object sender, RoutedEventArgs e)
00038         {
00039             this.TestTeachingTip.IsOpen = false;
00040         }
00041
00042         private void TeachingTipTestHooks_OpenedStatusChanged(TeachingTip sender, object args)
00043         {
00044             if (this.TestTeachingTip.IsOpen)
00045             {
00046                 this.IsOpenCheckBox.IsChecked = true;
00047             }
00048             else
00049             {
00050                 this.IsOpenCheckBox.IsChecked = false;
00051             }
00052         }
00053
00054         private void TeachingTipTestHooks_IdleStatusChanged(TeachingTip sender, object args)
00055         {
00056             if (TeachingTipTestHooks.GetIsIdle(this.TestTeachingTip))
00057             {
00058                 this.IsIdleCheckBox.IsChecked = true;
00059             }
00060             else
00061             {
00062                 this.IsIdleCheckBox.IsChecked = false;
00063             }
00064         }
00065     }
00066 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarItemClickedEventArgs Member List

This is the complete list of members for BreadcrumbBarItemClickedEventArgs, including all inherited members.
Index() | BreadcrumbBarItemClickedEventArgs
Index(const int &index) | BreadcrumbBarItemClickedEventArgs
Item() | BreadcrumbBarItemClickedEventArgs
Item(const winrt::IInspectable &item) | BreadcrumbBarItemClickedEventArgs
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewNode.properties.cpp Source File

  • File List
  • File Members
  • Generated

TreeViewNode.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TreeViewNode.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TreeViewNode)
00012 }
00013
00014 #include "TreeViewNode.g.cpp"
00015
00016 GlobalDependencyProperty TreeViewNodeProperties::s_ContentProperty{ nullptr };
00017 GlobalDependencyProperty TreeViewNodeProperties::s_DepthProperty{ nullptr };
00018 GlobalDependencyProperty TreeViewNodeProperties::s_HasChildrenProperty{ nullptr };
00019 GlobalDependencyProperty TreeViewNodeProperties::s_IsExpandedProperty{ nullptr };
00020
00021 TreeViewNodeProperties::TreeViewNodeProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void TreeViewNodeProperties::EnsureProperties()
00027 {
00028     if (!s_ContentProperty)
00029     {
00030         s_ContentProperty =
00031             InitializeDependencyProperty(
00032                 L"Content",
00033                 winrt::name_of<winrt::IInspectable>(),
00034                 winrt::name_of<winrt::TreeViewNode>(),
00035                 false /* isAttached */,
00036                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00037                 nullptr);
00038     }
00039     if (!s_DepthProperty)
00040     {
00041         s_DepthProperty =
00042             InitializeDependencyProperty(
00043                 L"Depth",
00044                 winrt::name_of<int>(),
00045                 winrt::name_of<winrt::TreeViewNode>(),
00046                 false /* isAttached */,
00047                 ValueHelper<int>::BoxValueIfNecessary(-1),
00048                 nullptr);
00049     }
00050     if (!s_HasChildrenProperty)
00051     {
00052         s_HasChildrenProperty =
00053             InitializeDependencyProperty(
00054                 L"HasChildren",
00055                 winrt::name_of<bool>(),
00056                 winrt::name_of<winrt::TreeViewNode>(),
00057                 false /* isAttached */,
00058                 ValueHelper<bool>::BoxedDefaultValue(),
00059                 winrt::PropertyChangedCallback(&OnHasChildrenPropertyChanged));
00060     }
00061     if (!s_IsExpandedProperty)
00062     {
00063         s_IsExpandedProperty =
00064             InitializeDependencyProperty(
00065                 L"IsExpanded",
00066                 winrt::name_of<bool>(),
00067                 winrt::name_of<winrt::TreeViewNode>(),
00068                 false /* isAttached */,
00069                 ValueHelper<bool>::BoxedDefaultValue(),
00070                 winrt::PropertyChangedCallback(&OnIsExpandedPropertyChanged));
00071     }
00072 }
00073
00074 void TreeViewNodeProperties::ClearProperties()
00075 {
00076     s_ContentProperty = nullptr;
00077     s_DepthProperty = nullptr;
00078     s_HasChildrenProperty = nullptr;
00079     s_IsExpandedProperty = nullptr;
00080 }
00081
00082 void TreeViewNodeProperties::OnHasChildrenPropertyChanged(
00083     winrt::DependencyObject const& sender,
00084     winrt::DependencyPropertyChangedEventArgs const& args)
00085 {
00086     auto owner = sender.as<winrt::TreeViewNode>();
00087     winrt::get_self<TreeViewNode>(owner)->OnPropertyChanged(args);
00088 }
00089
00090 void TreeViewNodeProperties::OnIsExpandedPropertyChanged(
00091     winrt::DependencyObject const& sender,
00092     winrt::DependencyPropertyChangedEventArgs const& args)
00093 {
00094     auto owner = sender.as<winrt::TreeViewNode>();
00095     winrt::get_self<TreeViewNode>(owner)->OnPropertyChanged(args);
00096 }
00097
00098 void TreeViewNodeProperties::Content(winrt::IInspectable const& value)
00099 {
00100     [[gsl::suppress(con)]]
00101     {
00102     static_cast<TreeViewNode*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00103     }
00104 }
00105
00106 winrt::IInspectable TreeViewNodeProperties::Content()
00107 {
00108     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_ContentProperty));
00109 }
00110
00111 void TreeViewNodeProperties::Depth(int value)
00112 {
00113     [[gsl::suppress(con)]]
00114     {
00115     static_cast<TreeViewNode*>(this)->SetValue(s_DepthProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00116     }
00117 }
00118
00119 int TreeViewNodeProperties::Depth()
00120 {
00121     return ValueHelper<int>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_DepthProperty));
00122 }
00123
00124 void TreeViewNodeProperties::HasChildren(bool value)
00125 {
00126     [[gsl::suppress(con)]]
00127     {
00128     static_cast<TreeViewNode*>(this)->SetValue(s_HasChildrenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00129     }
00130 }
00131
00132 bool TreeViewNodeProperties::HasChildren()
00133 {
00134     return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_HasChildrenProperty));
00135 }
00136
00137 void TreeViewNodeProperties::IsExpanded(bool value)
00138 {
00139     [[gsl::suppress(con)]]
00140     {
00141     static_cast<TreeViewNode*>(this)->SetValue(s_IsExpandedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00142     }
00143 }
00144
00145 bool TreeViewNodeProperties::IsExpanded()
00146 {
00147     return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewNode*>(this)->GetValue(s_IsExpandedProperty));
00148 }
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterDynamicPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterDynamicPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Numerics;
00006 using System.Collections.Generic;
00007 using Windows.Foundation;
00008 using Windows.UI;
00009 using Microsoft.UI.Composition;
00010 using Windows.UI.ViewManagement;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Controls.Primitives;
00014 using Microsoft.UI.Xaml.Hosting;
00015 using Microsoft.UI.Xaml.Input;
00016 using Microsoft.UI.Xaml.Media;
00017 using Microsoft.UI.Xaml.Media.Imaging;
00018 using Microsoft.UI.Xaml.Navigation;
00019 using Microsoft.UI.Xaml.Shapes;
00020 using Microsoft.UI.Private.Controls;
00021 using MUXControlsTestApp.Utilities;
00022 using Microsoft.UI.Dispatching;
00023
00024 namespace MUXControlsTestApp
00025 {
00026     public sealed partial class ScrollPresenterDynamicPage : TestPage
00027     {
00028         private enum QueuedOperationType
00029         {
00030             SetMinZoomFactor,
00031             SetMaxZoomFactor,
00032             SetWidth,
00033             SetHeight,
00034             SetContentMargin,
00035             SetContentPadding,
00036             SetContentMinWidth,
00037             SetContentMinHeight,
00038             SetContentWidth,
00039             SetContentHeight,
00040             SetContentMaxWidth,
00041             SetContentMaxHeight,
00042         }
00043
00044         private class QueuedOperation
00045         {
00046             public QueuedOperation(QueuedOperationType type, double value)
00047             {
00048                 this.Type = type;
00049                 this.DoubleValue = value;
00050             }
00051             public QueuedOperation(QueuedOperationType type, string value)
00052             {
00053                 this.Type = type;
00054                 this.StringValue = value;
00055             }
00056
00057             public QueuedOperationType Type { get; set; }
00058             public double DoubleValue { get; set; }
00059             public string StringValue { get; set; }
00060         }
00061
00062         private int lastOffsetsChangeCorrelationId = -1;
00063         private int lastOffsetsChangeWithAdditionalVelocityCorrelationId = -1;
00064         private int lastZoomFactorChangeCorrelationId = -1;
00065         private int lastZoomFactorChangeWithAdditionalVelocityCorrelationId = -1;
00066         private HashSet<int> relativeChangeCorrelationIds = new HashSet<int>();
00067         private Object asyncEventReportingLock = new Object();
00068         private List<string> lstAsyncEventMessage = new List<string>();
00069         private List<QueuedOperation> lstQueuedOperations = new List<QueuedOperation>();
00070         private TextBlock textBlock;
00071         private Viewbox viewbox;
00072         private TilePanel tilePanel;
00073         private Image largeImg;
00074         private Rectangle rectangle;
00075         private Button button;
00076         private Border border;
00077         private Border populatedBorder;
00078         private StackPanel horizontalStackPanel;
00079         private StackPanel verticalStackPanel;
00080         private ScrollPresenter dynamicScrollPresenter = null;
00081         private ScrollPresenter scrollPresenter = null;
00082         private PointerEventHandler contentPointerPressedEventHandler = null;
00083         private PointerEventHandler contentPointerReleasedEventHandler = null;
00084         private PointerEventHandler contentPointerCanceledEventHandler = null;
00085         private PointerEventHandler contentPointerCaptureLostEventHandler = null;
00086
00087         public ScrollPresenterDynamicPage()
00088         {
00089             this.InitializeComponent();
00090
00091             UseScrollPresenter(markupScrollPresenter);
00092
00093             CreateChildren();
00094         }
00095
00096         ~ScrollPresenterDynamicPage()
00097         {
00098         }
00099
00100         protected override void OnNavigatedFrom(NavigationEventArgs e)
00101         {
00102             if (chkLogScrollPresenterMessages.IsChecked == true)
00103             {
00104                 MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00105                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00106             }
00107
00108             base.OnNavigatedFrom(e);
00109         }
00110
00111         private void ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args)
00112         {
00113             AppendAsyncEventMessage("ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
00114         }
00115
00116         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00117         {
00118             AppendAsyncEventMessage("StateChanged " + sender.State.ToString());
00119         }
00120
00121         private void ScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
00122         {
00123             AppendAsyncEventMessage("ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
00124         }
00125
00126         private void ScrollPresenter_ScrollStarting(ScrollPresenter sender, ScrollingScrollStartingEventArgs args)
00127         {
00128             AppendAsyncEventMessage("ScrollStarting H=" + args.HorizontalOffset.ToString() + ", V=" + args.VerticalOffset + ", ZF=" + args.ZoomFactor);
00129         }
00130
00131         private void ScrollPresenter_ZoomStarting(ScrollPresenter sender, ScrollingZoomStartingEventArgs args)
00132         {
00133             AppendAsyncEventMessage("ZoomStarting H=" + args.HorizontalOffset.ToString() + ", V=" + args.VerticalOffset + ", ZF=" + args.ZoomFactor);
00134         }
00135
00136         private void ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
00137         {
00138             ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00139
00140             AppendAsyncEventMessage("ScrollCompleted OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
00141         }
00142
00143         private void ScrollPresenter_ZoomCompleted(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
00144         {
00145             ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);
00146
00147             AppendAsyncEventMessage("ZoomCompleted ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
00148         }
00149
00150         private void CreateChildren()
00151         {
00152             textBlock = new TextBlock();
00153             textBlock.TextWrapping = TextWrapping.Wrap;
00154             string textBlockText = string.Empty;
00155             for (int i = 0; i < 50; i++)
00156             {
00157                 textBlockText += "Large TextBlock Text. ";
00158             }
00159             textBlock.Text = textBlockText;
00160
00161             viewbox = new Viewbox();
00162             tilePanel = new TilePanel();
00163             tilePanel.TileCount = 100;
00164             tilePanel.Background = new SolidColorBrush(Microsoft.UI.Colors.Orange);
00165             largeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
00166             SolidColorBrush chartreuseBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00167             SolidColorBrush blanchedAlmondBrush = new SolidColorBrush(Microsoft.UI.Colors.BlanchedAlmond);
00168             SolidColorBrush interBrush = new SolidColorBrush(Microsoft.UI.Colors.Yellow);
00169             LinearGradientBrush lgb = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };
00170             GradientStop gs = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
00171             lgb.GradientStops.Add(gs);
00172             gs = new GradientStop() { Color = Microsoft.UI.Colors.White, Offset = 0.5 };
00173             lgb.GradientStops.Add(gs);
00174             gs = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
00175             lgb.GradientStops.Add(gs);
00176             rectangle = new Rectangle() { Fill = lgb };
00177             button = new Button() { Content = "Button" };
00178             Rectangle viewboxChild = new Rectangle()
00179             {
00180                 Fill = lgb,
00181                 Width = 600,
00182                 Height = 500
00183             };
00184             viewbox.Child = viewboxChild;
00185             Rectangle borderChild = new Rectangle()
00186             {
00187                 Fill = lgb
00188             };
00189             border = new Border()
00190             {
00191                 BorderBrush = chartreuseBrush,
00192                 BorderThickness = new Thickness(5),
00193                 Child = borderChild
00194             };
00195             StackPanel populatedBorderChild = new StackPanel();
00196             populatedBorderChild.Margin = new Thickness(30);
00197             for (int i = 0; i < 16; i++)
00198             {
00199                 TextBlock textBlock = new TextBlock()
00200                 {
00201                     Text = "TB#" + populatedBorderChild.Children.Count,
00202                     HorizontalAlignment = HorizontalAlignment.Center,
00203                     VerticalAlignment = VerticalAlignment.Center
00204                 };
00205
00206                 Border borderInSP = new Border()
00207                 {
00208                     BorderThickness = border.Margin = new Thickness(3),
00209                     BorderBrush = chartreuseBrush,
00210                     Background = blanchedAlmondBrush,
00211                     Width = 170,
00212                     Height = 120,
00213                     Child = textBlock
00214                 };
00215
00216                 populatedBorderChild.Children.Add(borderInSP);
00217             }
00218             populatedBorder = new Border()
00219             {
00220                 BorderBrush = chartreuseBrush,
00221                 BorderThickness = new Thickness(3),
00222                 Margin = new Thickness(15),
00223                 Background = new SolidColorBrush(Microsoft.UI.Colors.Beige),
00224                 Child = populatedBorderChild
00225             };
00226             horizontalStackPanel = new StackPanel()
00227             {
00228                 Orientation = Orientation.Horizontal
00229             };
00230             for (int index = 0; index < 10; index++)
00231             {
00232                 horizontalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Width = 95 });
00233                 horizontalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Width = 5 });
00234             }
00235             verticalStackPanel = new StackPanel();
00236             for (int index = 0; index < 10; index++)
00237             {
00238                 verticalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Height = 95 });
00239                 verticalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Height = 5 });
00240             }
00241         }
00242
00243         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00244         {
00245             //To turn on info and verbose logging for a particular ScrollPresenter instance:
00246             //MUXControlsTestHooks.SetLoggingLevelForInstance(scrollPresenter, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00247
00248             //To turn on info and verbose logging without any filter:
00249             //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00250
00251             //To turn on info and verbose logging for the ScrollPresenter type:
00252             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00253
00254             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00255         }
00256
00257         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00258         {
00259             //To turn off info and verbose logging for a particular ScrollPresenter instance:
00260             //MUXControlsTestHooks.SetLoggingLevelForInstance(scrollPresenter, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00261
00262             //To turn off info and verbose logging without any filter:
00263             //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00264
00265             //To turn off info and verbose logging for the ScrollPresenter type:
00266             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00267
00268             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00269         }
00270
00271         private void ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e)
00272         {
00273             scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
00274             scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00275             scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00276             scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00277             scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00278             scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
00279             scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
00280             scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00281             scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
00282         }
00283
00284         private void ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e)
00285         {
00286             scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
00287             scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
00288             scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
00289             scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
00290             scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompleted;
00291             scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
00292             scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
00293             scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00294             scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
00295         }
00296
00297         private void ChkLogContentEffectiveViewportChangedEvent_Checked(object sender, RoutedEventArgs e)
00298         {
00299             HookContentEffectiveViewportChanged();
00300         }
00301
00302         private void ChkLogContentEffectiveViewportChangedEvent_Unchecked(object sender, RoutedEventArgs e)
00303         {
00304             UnhookContentEffectiveViewportChanged();
00305         }
00306
00307         private void ChkLogContentPointerEvents_Checked(object sender, RoutedEventArgs e)
00308         {
00309             HookContentPointerEvents();
00310         }
00311
00312         private void ChkLogContentPointerEvents_Unchecked(object sender, RoutedEventArgs e)
00313         {
00314             UnhookContentPointerEvents();
00315         }
00316
00317         private void HookContentEffectiveViewportChanged()
00318         {
00319             if (scrollPresenter != null)
00320             {
00321                 FrameworkElement contentAsFE = scrollPresenter.Content as FrameworkElement;
00322                 if (contentAsFE != null)
00323                 {
00324                     contentAsFE.EffectiveViewportChanged += Content_EffectiveViewportChanged;
00325                 }
00326             }
00327         }
00328
00329         private void UnhookContentEffectiveViewportChanged()
00330         {
00331             if (scrollPresenter != null)
00332             {
00333                 FrameworkElement contentAsFE = scrollPresenter.Content as FrameworkElement;
00334                 if (contentAsFE != null)
00335                 {
00336                     contentAsFE.EffectiveViewportChanged -= Content_EffectiveViewportChanged;
00337                 }
00338             }
00339         }
00340
00341         private void HookContentPointerEvents()
00342         {
00343             if (scrollPresenter != null)
00344             {
00345                 UIElement contentAsUIE = scrollPresenter.Content as UIElement;
00346                 if (contentAsUIE != null)
00347                 {
00348                     contentPointerPressedEventHandler = new PointerEventHandler(Content_PointerPressed);
00349                     contentPointerReleasedEventHandler = new PointerEventHandler(Content_PointerReleased);
00350                     contentPointerCanceledEventHandler = new PointerEventHandler(Content_PointerCanceled);
00351                     contentPointerCaptureLostEventHandler = new PointerEventHandler(Content_PointerCaptureLost);
00352
00353                     contentAsUIE.AddHandler(UIElement.PointerPressedEvent, contentPointerPressedEventHandler, true);
00354                     contentAsUIE.AddHandler(UIElement.PointerReleasedEvent, contentPointerReleasedEventHandler, true);
00355                     contentAsUIE.AddHandler(UIElement.PointerCanceledEvent, contentPointerCanceledEventHandler, true);
00356                     contentAsUIE.AddHandler(UIElement.PointerCaptureLostEvent, contentPointerCaptureLostEventHandler, true);
00357                 }
00358             }
00359         }
00360
00361         private void UnhookContentPointerEvents()
00362         {
00363             if (scrollPresenter != null)
00364             {
00365                 UIElement contentAsUIE = scrollPresenter.Content as UIElement;
00366                 if (contentAsUIE != null)
00367                 {
00368                     contentAsUIE.RemoveHandler(UIElement.PointerPressedEvent, contentPointerPressedEventHandler);
00369                     contentAsUIE.RemoveHandler(UIElement.PointerReleasedEvent, contentPointerReleasedEventHandler);
00370                     contentAsUIE.RemoveHandler(UIElement.PointerCanceledEvent, contentPointerCanceledEventHandler);
00371                     contentAsUIE.RemoveHandler(UIElement.PointerCaptureLostEvent, contentPointerCaptureLostEventHandler);
00372                 }
00373             }
00374         }
00375
00376         private void Content_EffectiveViewportChanged(FrameworkElement sender, EffectiveViewportChangedEventArgs args)
00377         {
00378             AppendAsyncEventMessage("Content_EffectiveViewportChanged: BringIntoViewDistance=" +
00379                 args.BringIntoViewDistanceX + "," + args.BringIntoViewDistanceY + ", EffectiveViewport=" +
00380                 args.EffectiveViewport.ToString() + ", MaxViewport=" + args.MaxViewport.ToString());
00381         }
00382
00383         private void Content_PointerPressed(object sender, PointerRoutedEventArgs e)
00384         {
00385             AppendAsyncEventMessage("Content_PointerPressed: PointerId=" + e.Pointer.PointerId);
00386         }
00387
00388         private void Content_PointerReleased(object sender, PointerRoutedEventArgs e)
00389         {
00390             AppendAsyncEventMessage("Content_PointerReleased: PointerId=" + e.Pointer.PointerId);
00391         }
00392
00393         private void Content_PointerCanceled(object sender, PointerRoutedEventArgs e)
00394         {
00395             AppendAsyncEventMessage("Content_PointerCanceled: PointerId=" + e.Pointer.PointerId);
00396         }
00397
00398         private void Content_PointerCaptureLost(object sender, PointerRoutedEventArgs e)
00399         {
00400             AppendAsyncEventMessage("Content_PointerCaptureLost: PointerId=" + e.Pointer.PointerId);
00401         }
00402
00403         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00404         {
00405             // Cut off the terminating new line.
00406             string msg = args.Message.Substring(0, args.Message.Length - 1);
00407             string senderName = string.Empty;
00408
00409             try
00410             {
00411                 FrameworkElement fe = sender as FrameworkElement;
00412
00413                 if (fe != null)
00414                 {
00415                     senderName = "s:" + fe.Name + ", ";
00416                 }
00417             }
00418             catch
00419             {
00420                 AppendAsyncEventMessage("Warning: Failure while accessing sender's Name");
00421             }
00422
00423             if (args.IsVerboseLevel)
00424             {
00425                 AppendAsyncEventMessage("Verbose: " + senderName + "m:" + msg);
00426             }
00427             else
00428             {
00429                 AppendAsyncEventMessage("Info: " + senderName + "m:" + msg);
00430             }
00431         }
00432
00433         private void ChkScrollPresenterProperties_Checked(object sender, RoutedEventArgs e)
00434         {
00435             if (svScrollPresenterProperties != null)
00436                 svScrollPresenterProperties.Visibility = Visibility.Visible;
00437         }
00438
00439         private void ChkScrollPresenterProperties_Unchecked(object sender, RoutedEventArgs e)
00440         {
00441             if (svScrollPresenterProperties != null)
00442                 svScrollPresenterProperties.Visibility = Visibility.Collapsed;
00443         }
00444
00445         private void ChkContentProperties_Checked(object sender, RoutedEventArgs e)
00446         {
00447             if (grdContentProperties != null)
00448                 grdContentProperties.Visibility = Visibility.Visible;
00449         }
00450
00451         private void ChkContentProperties_Unchecked(object sender, RoutedEventArgs e)
00452         {
00453             if (grdContentProperties != null)
00454                 grdContentProperties.Visibility = Visibility.Collapsed;
00455         }
00456
00457         private void ChkScrollPresenterMethods_Checked(object sender, RoutedEventArgs e)
00458         {
00459             if (svScrollPresenterMethods != null)
00460                 svScrollPresenterMethods.Visibility = Visibility.Visible;
00461         }
00462
00463         private void ChkScrollPresenterMethods_Unchecked(object sender, RoutedEventArgs e)
00464         {
00465             if (svScrollPresenterMethods != null)
00466                 svScrollPresenterMethods.Visibility = Visibility.Collapsed;
00467         }
00468
00469         private void ChkScrollPresenterEvents_Checked(object sender, RoutedEventArgs e)
00470         {
00471             if (grdScrollPresenterEvents != null)
00472                 grdScrollPresenterEvents.Visibility = Visibility.Visible;
00473         }
00474
00475         private void ChkScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e)
00476         {
00477             if (grdScrollPresenterEvents != null)
00478                 grdScrollPresenterEvents.Visibility = Visibility.Collapsed;
00479         }
00480
00481         private void ChkPageMethods_Checked(object sender, RoutedEventArgs e)
00482         {
00483             if (grdPageMethods != null)
00484                 grdPageMethods.Visibility = Visibility.Visible;
00485         }
00486
00487         private void ChkPageMethods_Unchecked(object sender, RoutedEventArgs e)
00488         {
00489             if (grdPageMethods != null)
00490                 grdPageMethods.Visibility = Visibility.Collapsed;
00491         }
00492
00493         private void ChkScrollPresenterTestHooks_Checked(object sender, RoutedEventArgs e)
00494         {
00495             if (grdScrollPresenterTestHooks != null)
00496                 grdScrollPresenterTestHooks.Visibility = Visibility.Visible;
00497         }
00498
00499         private void ChkScrollPresenterTestHooks_Unchecked(object sender, RoutedEventArgs e)
00500         {
00501             if (grdScrollPresenterTestHooks != null)
00502                 grdScrollPresenterTestHooks.Visibility = Visibility.Collapsed;
00503         }
00504
00505         private void CmbContentOrientation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00506         {
00507             if (scrollPresenter != null)
00508                 scrollPresenter.ContentOrientation = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
00509         }
00510
00511         private void CmbHorizontalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00512         {
00513             if (scrollPresenter != null)
00514                 scrollPresenter.HorizontalScrollMode = (ScrollingScrollMode)cmbHorizontalScrollMode.SelectedIndex;
00515         }
00516
00517         private void UpdateCmbContentOrientation()
00518         {
00519             try
00520             {
00521                 cmbContentOrientation.SelectedIndex = (int)scrollPresenter.ContentOrientation;
00522             }
00523             catch (Exception ex)
00524             {
00525                 txtExceptionReport.Text = ex.ToString();
00526                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00527             }
00528         }
00529
00530         private void UpdateCmbHorizontalScrollMode()
00531         {
00532             cmbHorizontalScrollMode.SelectedIndex = (int)scrollPresenter.HorizontalScrollMode;
00533         }
00534
00535         private void CmbHorizontalScrollChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00536         {
00537             if (scrollPresenter != null)
00538                 scrollPresenter.HorizontalScrollChainMode = (ScrollingChainMode)cmbHorizontalScrollChainMode.SelectedIndex;
00539         }
00540
00541         private void UpdateCmbHorizontalScrollChainMode()
00542         {
00543             cmbHorizontalScrollChainMode.SelectedIndex = (int)scrollPresenter.HorizontalScrollChainMode;
00544         }
00545
00546         private void CmbHorizontalScrollRailMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00547         {
00548             if (scrollPresenter != null)
00549                 scrollPresenter.HorizontalScrollRailMode = (ScrollingRailMode)cmbHorizontalScrollRailMode.SelectedIndex;
00550         }
00551
00552         private void UpdateCmbHorizontalScrollRailMode()
00553         {
00554             cmbHorizontalScrollRailMode.SelectedIndex = (int)scrollPresenter.HorizontalScrollRailMode;
00555         }
00556
00557         private void CmbVerticalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00558         {
00559             if (scrollPresenter != null)
00560                 scrollPresenter.VerticalScrollMode = (ScrollingScrollMode)cmbVerticalScrollMode.SelectedIndex;
00561         }
00562
00563         private void UpdateCmbVerticalScrollMode()
00564         {
00565             cmbVerticalScrollMode.SelectedIndex = (int)scrollPresenter.VerticalScrollMode;
00566         }
00567
00568         private void CmbVerticalScrollChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00569         {
00570             if (scrollPresenter != null)
00571                 scrollPresenter.VerticalScrollChainMode = (ScrollingChainMode)cmbVerticalScrollChainMode.SelectedIndex;
00572         }
00573
00574         private void UpdateCmbVerticalScrollChainMode()
00575         {
00576             cmbVerticalScrollChainMode.SelectedIndex = (int)scrollPresenter.VerticalScrollChainMode;
00577         }
00578
00579         private void CmbVerticalScrollRailMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00580         {
00581             if (scrollPresenter != null)
00582                 scrollPresenter.VerticalScrollRailMode = (ScrollingRailMode)cmbVerticalScrollRailMode.SelectedIndex;
00583         }
00584
00585         private void UpdateCmbVerticalScrollRailMode()
00586         {
00587             cmbVerticalScrollRailMode.SelectedIndex = (int)scrollPresenter.VerticalScrollRailMode;
00588         }
00589
00590         private void CmbZoomMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00591         {
00592             if (scrollPresenter != null)
00593                 scrollPresenter.ZoomMode = (ScrollingZoomMode)cmbZoomMode.SelectedIndex;
00594         }
00595
00596         private void UpdateCmbZoomMode()
00597         {
00598             cmbZoomMode.SelectedIndex = (int)scrollPresenter.ZoomMode;
00599         }
00600
00601         private void CmbZoomChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00602         {
00603             if (scrollPresenter != null)
00604                 scrollPresenter.ZoomChainMode = (ScrollingChainMode)cmbZoomChainMode.SelectedIndex;
00605         }
00606
00607         private void UpdateCmbZoomChainMode()
00608         {
00609             cmbZoomChainMode.SelectedIndex = (int)scrollPresenter.ZoomChainMode;
00610         }
00611
00612         private void CmbIgnoredInputKinds_SelectionChanged(object sender, SelectionChangedEventArgs e)
00613         {
00614             if (scrollPresenter != null)
00615             {
00616                 switch (cmbIgnoredInputKinds.SelectedIndex)
00617                 {
00618                     case 0:
00619                         scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.None;
00620                         break;
00621                     case 1:
00622                         scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Touch;
00623                         break;
00624                     case 2:
00625                         scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Pen;
00626                         break;
00627                     case 3:
00628                         scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.MouseWheel;
00629                         break;
00630                     case 4:
00631                         scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Keyboard;
00632                         break;
00633                     case 5:
00634                         scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.Gamepad;
00635                         break;
00636                     case 6:
00637                         scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.All;
00638                         break;
00639                 }
00640             }
00641         }
00642
00643         private void UpdateCmbIgnoredInputKinds()
00644         {
00645             switch (scrollPresenter.IgnoredInputKinds)
00646             {
00647                 case ScrollingInputKinds.None:
00648                     cmbIgnoredInputKinds.SelectedIndex = 0;
00649                     break;
00650                 case ScrollingInputKinds.Touch:
00651                     cmbIgnoredInputKinds.SelectedIndex = 1;
00652                     break;
00653                 case ScrollingInputKinds.Pen:
00654                     cmbIgnoredInputKinds.SelectedIndex = 2;
00655                     break;
00656                 case ScrollingInputKinds.MouseWheel:
00657                     cmbIgnoredInputKinds.SelectedIndex = 3;
00658                     break;
00659                 case ScrollingInputKinds.Keyboard:
00660                     cmbIgnoredInputKinds.SelectedIndex = 4;
00661                     break;
00662                 case ScrollingInputKinds.Gamepad:
00663                     cmbIgnoredInputKinds.SelectedIndex = 5;
00664                     break;
00665                 case ScrollingInputKinds.All:
00666                     cmbIgnoredInputKinds.SelectedIndex = 6;
00667                     break;
00668             }
00669         }
00670
00671         private void CmbContentHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00672         {
00673             if (scrollPresenter.Content is FrameworkElement)
00674             {
00675                 ((FrameworkElement)scrollPresenter.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
00676             }
00677         }
00678
00679         private void UpdateCmbContentHorizontalAlignment()
00680         {
00681             if (scrollPresenter.Content is FrameworkElement)
00682             {
00683                 cmbContentHorizontalAlignment.SelectedIndex = (int)((FrameworkElement)scrollPresenter.Content).HorizontalAlignment;
00684             }
00685         }
00686
00687         private void CmbContentVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00688         {
00689             if (scrollPresenter.Content is FrameworkElement)
00690             {
00691                 ((FrameworkElement)scrollPresenter.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
00692             }
00693         }
00694
00695         private void UpdateCmbContentVerticalAlignment()
00696         {
00697             if (scrollPresenter.Content is FrameworkElement)
00698             {
00699                 cmbContentVerticalAlignment.SelectedIndex = (int)((FrameworkElement)scrollPresenter.Content).VerticalAlignment;
00700             }
00701         }
00702
00703         private void CmbScrollPresenterManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00704         {
00705             switch (cmbScrollPresenterManipulationMode.SelectedIndex)
00706             {
00707                 case 0:
00708                     scrollPresenter.ManipulationMode = ManipulationModes.System;
00709                     break;
00710                 case 1:
00711                     scrollPresenter.ManipulationMode = ManipulationModes.None;
00712                     break;
00713             }
00714         }
00715
00716         private void UpdateCmbScrollPresenterManipulationMode()
00717         {
00718             switch (scrollPresenter.ManipulationMode)
00719             {
00720                 case ManipulationModes.System:
00721                     cmbScrollPresenterManipulationMode.SelectedIndex = 0;
00722                     break;
00723                 case ManipulationModes.None:
00724                     cmbScrollPresenterManipulationMode.SelectedIndex = 1;
00725                     break;
00726             }
00727         }
00728
00729         private void CmbContentManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00730         {
00731             if (scrollPresenter.Content is FrameworkElement)
00732             {
00733                 switch (cmbContentManipulationMode.SelectedIndex)
00734                 {
00735                     case 0:
00736                         scrollPresenter.Content.ManipulationMode = ManipulationModes.System;
00737                         break;
00738                     case 1:
00739                         scrollPresenter.Content.ManipulationMode = ManipulationModes.None;
00740                         break;
00741                 }
00742             }
00743         }
00744
00745         private void UpdateCmbContentManipulationMode()
00746         {
00747             if (scrollPresenter.Content != null)
00748             {
00749                 switch (scrollPresenter.Content.ManipulationMode)
00750                 {
00751                     case ManipulationModes.System:
00752                         cmbContentManipulationMode.SelectedIndex = 0;
00753                         break;
00754                     case ManipulationModes.None:
00755                         cmbContentManipulationMode.SelectedIndex = 1;
00756                         break;
00757                 }
00758             }
00759         }
00760
00761         private void CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e)
00762         {
00763             switch (cmbBackground.SelectedIndex)
00764             {
00765                 case 0:
00766                     scrollPresenter.Background = null;
00767                     break;
00768                 case 1:
00769                     scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
00770                     break;
00771                 case 2:
00772                     scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
00773                     break;
00774                 case 3:
00775                     scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Aqua);
00776                     break;
00777             }
00778         }
00779
00780         private void UpdateCmbBackground()
00781         {
00782             SolidColorBrush bg = scrollPresenter.Background as SolidColorBrush;
00783
00784             if (bg == null)
00785             {
00786                 cmbBackground.SelectedIndex = 0;
00787             }
00788             else if (bg.Color == Microsoft.UI.Colors.Transparent)
00789             {
00790                 cmbBackground.SelectedIndex = 1;
00791             }
00792             else if (bg.Color == Microsoft.UI.Colors.AliceBlue)
00793             {
00794                 cmbBackground.SelectedIndex = 2;
00795             }
00796             else if (bg.Color == Microsoft.UI.Colors.Aqua)
00797             {
00798                 cmbBackground.SelectedIndex = 3;
00799             }
00800         }
00801
00802         private void CmbContent_SelectionChanged(object sender, SelectionChangedEventArgs e)
00803         {
00804             try
00805             {
00806                 FrameworkElement currentContent = scrollPresenter.Content as FrameworkElement;
00807                 FrameworkElement newContent = null;
00808
00809                 switch (cmbContent.SelectedIndex)
00810                 {
00811                     case 0:
00812                         newContent = null;
00813                         break;
00814                     case 1:
00815                         newContent = smallImg;
00816                         break;
00817                     case 2:
00818                         newContent = largeImg;
00819                         break;
00820                     case 3:
00821                         newContent = rectangle;
00822                         break;
00823                     case 4:
00824                         newContent = button;
00825                         break;
00826                     case 5:
00827                         newContent = border;
00828                         break;
00829                     case 6:
00830                         newContent = populatedBorder;
00831                         break;
00832                     case 7:
00833                         newContent = horizontalStackPanel;
00834                         break;
00835                     case 8:
00836                         newContent = verticalStackPanel;
00837                         break;
00838                     case 9:
00839                         newContent = tilePanel;
00840                         break;
00841                     case 10:
00842                         newContent = viewbox;
00843                         break;
00844                     case 11:
00845                         newContent = textBlock;
00846                         break;
00847                 }
00848
00849                 if (chkPreserveProperties.IsChecked == true && currentContent != null && newContent != null)
00850                 {
00851                     newContent.Width = currentContent.Width;
00852                     newContent.Height = currentContent.Height;
00853                     newContent.Margin = currentContent.Margin;
00854                     newContent.HorizontalAlignment = currentContent.HorizontalAlignment;
00855                     newContent.VerticalAlignment = currentContent.VerticalAlignment;
00856
00857                     if (currentContent is Control && newContent is Control)
00858                     {
00859                         ((Control)newContent).Padding = ((Control)currentContent).Padding;
00860                     }
00861                 }
00862
00863                 if (chkLogScrollPresenterEvents.IsChecked == true)
00864                 {
00865                     UnhookContentEffectiveViewportChanged();
00866                 }
00867
00868                 if (chkLogContentPointerEvents.IsChecked == true)
00869                 {
00870                     UnhookContentPointerEvents();
00871                 }
00872
00873                 scrollPresenter.Content = newContent;
00874
00875                 if (chkPreserveProperties.IsChecked == false)
00876                 {
00877                     UpdateCmbContentHorizontalAlignment();
00878                     UpdateCmbContentVerticalAlignment();
00879                     UpdateCmbContentManipulationMode();
00880                 }
00881
00882                 if (chkLogScrollPresenterEvents.IsChecked == true)
00883                 {
00884                     HookContentEffectiveViewportChanged();
00885                 }
00886
00887                 if (chkLogContentPointerEvents.IsChecked == true)
00888                 {
00889                     HookContentPointerEvents();
00890                 }
00891             }
00892             catch (Exception ex)
00893             {
00894                 txtExceptionReport.Text = ex.ToString();
00895                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00896
00897                 UpdateCmbContent();
00898             }
00899         }
00900
00901         private void UpdateCmbContent()
00902         {
00903             if (scrollPresenter.Content == null)
00904             {
00905                 cmbContent.SelectedIndex = 0;
00906             }
00907             else if (scrollPresenter.Content is Image)
00908             {
00909                 if (((scrollPresenter.Content as Image).Source as BitmapImage).UriSource.AbsolutePath.ToLower().Contains("large"))
00910                 {
00911                     cmbContent.SelectedIndex = 2;
00912                 }
00913                 else
00914                 {
00915                     cmbContent.SelectedIndex = 1;
00916                 }
00917             }
00918             else if (scrollPresenter.Content is Rectangle)
00919             {
00920                 cmbContent.SelectedIndex = 3;
00921             }
00922             else if (scrollPresenter.Content is Button)
00923             {
00924                 cmbContent.SelectedIndex = 4;
00925             }
00926             else if (scrollPresenter.Content is Border)
00927             {
00928                 if ((scrollPresenter.Content as Border).Child is Rectangle)
00929                 {
00930                     cmbContent.SelectedIndex = 5;
00931                 }
00932                 else
00933                 {
00934                     cmbContent.SelectedIndex = 6;
00935                 }
00936             }
00937             else if (scrollPresenter.Content is StackPanel)
00938             {
00939                 cmbContent.SelectedIndex = 7;
00940             }
00941             else if (scrollPresenter.Content is TilePanel)
00942             {
00943                 cmbContent.SelectedIndex = 8;
00944             }
00945             else if (scrollPresenter.Content is Viewbox)
00946             {
00947                 cmbContent.SelectedIndex = 9;
00948             }
00949             else if (scrollPresenter.Content is TextBox)
00950             {
00951                 cmbContent.SelectedIndex = 10;
00952             }
00953         }
00954
00955         private void BtnGetContentMinWidth_Click(object sender, RoutedEventArgs e)
00956         {
00957             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
00958                 txtContentMinWidth.Text = string.Empty;
00959             else
00960                 txtContentMinWidth.Text = ((FrameworkElement)(scrollPresenter.Content)).MinWidth.ToString();
00961         }
00962
00963         private void BtnGetContentWidth_Click(object sender, RoutedEventArgs e)
00964         {
00965             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
00966                 txtContentWidth.Text = string.Empty;
00967             else
00968                 txtContentWidth.Text = ((FrameworkElement)(scrollPresenter.Content)).Width.ToString();
00969         }
00970
00971         private void BtnGetContentMaxWidth_Click(object sender, RoutedEventArgs e)
00972         {
00973             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
00974                 txtContentMaxWidth.Text = string.Empty;
00975             else
00976                 txtContentMaxWidth.Text = ((FrameworkElement)(scrollPresenter.Content)).MaxWidth.ToString();
00977         }
00978
00979         private void BtnSetContentMinWidth_Click(object sender, RoutedEventArgs e)
00980         {
00981             try
00982             {
00983                 if (scrollPresenter.Content is FrameworkElement)
00984                 {
00985                     ((FrameworkElement)(scrollPresenter.Content)).MinWidth = Convert.ToDouble(txtContentMinWidth.Text);
00986                 }
00987             }
00988             catch (Exception ex)
00989             {
00990                 txtExceptionReport.Text = ex.ToString();
00991                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00992             }
00993         }
00994
00995         private void BtnSetContentWidth_Click(object sender, RoutedEventArgs e)
00996         {
00997             try
00998             {
00999                 if (scrollPresenter.Content is FrameworkElement)
01000                 {
01001                     ((FrameworkElement)(scrollPresenter.Content)).Width = Convert.ToDouble(txtContentWidth.Text);
01002                 }
01003             }
01004             catch (Exception ex)
01005             {
01006                 txtExceptionReport.Text = ex.ToString();
01007                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01008             }
01009         }
01010
01011         private void BtnSetContentMaxWidth_Click(object sender, RoutedEventArgs e)
01012         {
01013             try
01014             {
01015                 if (scrollPresenter.Content is FrameworkElement)
01016                 {
01017                     ((FrameworkElement)(scrollPresenter.Content)).MaxWidth = Convert.ToDouble(txtContentMaxWidth.Text);
01018                 }
01019             }
01020             catch (Exception ex)
01021             {
01022                 txtExceptionReport.Text = ex.ToString();
01023                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01024             }
01025         }
01026
01027         private void BtnQueueContentMinWidth_Click(object sender, RoutedEventArgs e)
01028         {
01029             try
01030             {
01031                 double value = Convert.ToDouble(txtContentMinWidth.Text);
01032                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMinWidth, value));
01033                 AppendAsyncEventMessage("Queued SetContentMinWidth " + value);
01034             }
01035             catch (Exception ex)
01036             {
01037                 txtExceptionReport.Text = ex.ToString();
01038                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01039             }
01040         }
01041
01042         private void BtnQueueContentWidth_Click(object sender, RoutedEventArgs e)
01043         {
01044             try
01045             {
01046                 double value = Convert.ToDouble(txtContentWidth.Text);
01047                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentWidth, value));
01048                 AppendAsyncEventMessage("Queued SetContentWidth " + value);
01049             }
01050             catch (Exception ex)
01051             {
01052                 txtExceptionReport.Text = ex.ToString();
01053                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01054             }
01055         }
01056
01057         private void BtnQueueContentMaxWidth_Click(object sender, RoutedEventArgs e)
01058         {
01059             try
01060             {
01061                 double value = Convert.ToDouble(txtContentMaxWidth.Text);
01062                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMaxWidth, value));
01063                 AppendAsyncEventMessage("Queued SetContentMaxWidth " + value);
01064             }
01065             catch (Exception ex)
01066             {
01067                 txtExceptionReport.Text = ex.ToString();
01068                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01069             }
01070         }
01071
01072         private void BtnGetContentMinHeight_Click(object sender, RoutedEventArgs e)
01073         {
01074             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
01075                 txtContentMinHeight.Text = string.Empty;
01076             else
01077                 txtContentMinHeight.Text = ((FrameworkElement)(scrollPresenter.Content)).MinHeight.ToString();
01078         }
01079
01080         private void BtnGetContentHeight_Click(object sender, RoutedEventArgs e)
01081         {
01082             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
01083                 txtContentHeight.Text = string.Empty;
01084             else
01085                 txtContentHeight.Text = ((FrameworkElement)(scrollPresenter.Content)).Height.ToString();
01086         }
01087
01088         private void BtnGetContentMaxHeight_Click(object sender, RoutedEventArgs e)
01089         {
01090             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
01091                 txtContentMaxHeight.Text = string.Empty;
01092             else
01093                 txtContentMaxHeight.Text = ((FrameworkElement)(scrollPresenter.Content)).MaxHeight.ToString();
01094         }
01095
01096         private void BtnSetContentMinHeight_Click(object sender, RoutedEventArgs e)
01097         {
01098             try
01099             {
01100                 if (scrollPresenter.Content is FrameworkElement)
01101                 {
01102                     ((FrameworkElement)(scrollPresenter.Content)).MinHeight = Convert.ToDouble(txtContentMinHeight.Text);
01103                 }
01104             }
01105             catch (Exception ex)
01106             {
01107                 txtExceptionReport.Text = ex.ToString();
01108                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01109             }
01110         }
01111
01112         private void BtnSetContentHeight_Click(object sender, RoutedEventArgs e)
01113         {
01114             try
01115             {
01116                 if (scrollPresenter.Content is FrameworkElement)
01117                 {
01118                     ((FrameworkElement)(scrollPresenter.Content)).Height = Convert.ToDouble(txtContentHeight.Text);
01119                 }
01120             }
01121             catch (Exception ex)
01122             {
01123                 txtExceptionReport.Text = ex.ToString();
01124                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01125             }
01126         }
01127
01128         private void BtnSetContentMaxHeight_Click(object sender, RoutedEventArgs e)
01129         {
01130             try
01131             {
01132                 if (scrollPresenter.Content is FrameworkElement)
01133                 {
01134                     ((FrameworkElement)(scrollPresenter.Content)).MaxHeight = Convert.ToDouble(txtContentMaxHeight.Text);
01135                 }
01136             }
01137             catch (Exception ex)
01138             {
01139                 txtExceptionReport.Text = ex.ToString();
01140                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01141             }
01142         }
01143
01144         private void BtnQueueContentMinHeight_Click(object sender, RoutedEventArgs e)
01145         {
01146             try
01147             {
01148                 double value = Convert.ToDouble(txtContentMinHeight.Text);
01149                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMinHeight, value));
01150                 AppendAsyncEventMessage("Queued SetContentMinHeight " + value);
01151             }
01152             catch (Exception ex)
01153             {
01154                 txtExceptionReport.Text = ex.ToString();
01155                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01156             }
01157         }
01158
01159         private void BtnQueueContentHeight_Click(object sender, RoutedEventArgs e)
01160         {
01161             try
01162             {
01163                 double value = Convert.ToDouble(txtContentHeight.Text);
01164                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentHeight, value));
01165                 AppendAsyncEventMessage("Queued SetContentHeight " + value);
01166             }
01167             catch (Exception ex)
01168             {
01169                 txtExceptionReport.Text = ex.ToString();
01170                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01171             }
01172         }
01173
01174         private void BtnQueueContentMaxHeight_Click(object sender, RoutedEventArgs e)
01175         {
01176             try
01177             {
01178                 double value = Convert.ToDouble(txtContentMaxHeight.Text);
01179                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMaxHeight, value));
01180                 AppendAsyncEventMessage("Queued SetContentMaxHeight " + value);
01181             }
01182             catch (Exception ex)
01183             {
01184                 txtExceptionReport.Text = ex.ToString();
01185                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01186             }
01187         }
01188
01189         private void BtnGetContentMargin_Click(object sender, RoutedEventArgs e)
01190         {
01191             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
01192                 txtContentMargin.Text = string.Empty;
01193             else
01194                 txtContentMargin.Text = ((FrameworkElement)(scrollPresenter.Content)).Margin.ToString();
01195         }
01196
01197         private void BtnSetContentMargin_Click(object sender, RoutedEventArgs e)
01198         {
01199             try
01200             {
01201                 if (scrollPresenter.Content is FrameworkElement)
01202                 {
01203                     ((FrameworkElement)(scrollPresenter.Content)).Margin = GetThicknessFromString(txtContentMargin.Text);
01204                 }
01205             }
01206             catch (Exception ex)
01207             {
01208                 txtExceptionReport.Text = ex.ToString();
01209                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01210             }
01211         }
01212
01213         private void BtnQueueContentMargin_Click(object sender, RoutedEventArgs e)
01214         {
01215             try
01216             {
01217                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentMargin, txtContentMargin.Text));
01218                 AppendAsyncEventMessage("Queued SetContentMargin " + txtContentMargin.Text);
01219             }
01220             catch (Exception ex)
01221             {
01222                 txtExceptionReport.Text = ex.ToString();
01223                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01224             }
01225         }
01226
01227         private void BtnGetContentPadding_Click(object sender, RoutedEventArgs e)
01228         {
01229             if (scrollPresenter.Content == null || !(scrollPresenter.Content is Control || scrollPresenter.Content is Border || scrollPresenter.Content is StackPanel))
01230                 txtContentPadding.Text = string.Empty;
01231             else if (scrollPresenter.Content is Control)
01232                 txtContentPadding.Text = ((Control)(scrollPresenter.Content)).Padding.ToString();
01233             else if (scrollPresenter.Content is Border)
01234                 txtContentPadding.Text = ((Border)(scrollPresenter.Content)).Padding.ToString();
01235             else
01236                 txtContentPadding.Text = ((StackPanel)(scrollPresenter.Content)).Padding.ToString();
01237         }
01238
01239         private void BtnSetContentPadding_Click(object sender, RoutedEventArgs e)
01240         {
01241             try
01242             {
01243                 if (scrollPresenter.Content is Control)
01244                 {
01245                     ((Control)(scrollPresenter.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
01246                 }
01247                 else if (scrollPresenter.Content is Border)
01248                 {
01249                     ((Border)(scrollPresenter.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
01250                 }
01251                 else if (scrollPresenter.Content is StackPanel)
01252                 {
01253                     ((StackPanel)(scrollPresenter.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
01254                 }
01255             }
01256             catch (Exception ex)
01257             {
01258                 txtExceptionReport.Text = ex.ToString();
01259                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01260             }
01261         }
01262
01263         private void BtnQueueContentPadding_Click(object sender, RoutedEventArgs e)
01264         {
01265             try
01266             {
01267                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetContentPadding, txtContentPadding.Text));
01268                 AppendAsyncEventMessage("Queued SetContentPadding " + txtContentPadding.Text);
01269             }
01270             catch (Exception ex)
01271             {
01272                 txtExceptionReport.Text = ex.ToString();
01273                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01274             }
01275         }
01276
01277         private void BtnGetContentActualWidth_Click(object sender, RoutedEventArgs e)
01278         {
01279             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
01280                 txtContentActualWidth.Text = string.Empty;
01281             else
01282                 txtContentActualWidth.Text = (scrollPresenter.Content as FrameworkElement).ActualWidth.ToString();
01283         }
01284
01285         private void BtnGetContentActualHeight_Click(object sender, RoutedEventArgs e)
01286         {
01287             if (scrollPresenter.Content == null || !(scrollPresenter.Content is FrameworkElement))
01288                 txtContentActualHeight.Text = string.Empty;
01289             else
01290                 txtContentActualHeight.Text = (scrollPresenter.Content as FrameworkElement).ActualHeight.ToString();
01291         }
01292
01293         private void BtnGetContentDesiredSize_Click(object sender, RoutedEventArgs e)
01294         {
01295             if (scrollPresenter.Content == null)
01296                 txtContentDesiredSize.Text = string.Empty;
01297             else
01298                 txtContentDesiredSize.Text = scrollPresenter.Content.DesiredSize.ToString();
01299         }
01300
01301         private void BtnGetContentRenderSize_Click(object sender, RoutedEventArgs e)
01302         {
01303             if (scrollPresenter.Content == null)
01304                 txtContentRenderSize.Text = string.Empty;
01305             else
01306                 txtContentRenderSize.Text = scrollPresenter.Content.RenderSize.ToString();
01307         }
01308
01309         private void UpdateMinZoomFactor()
01310         {
01311             txtMinZoomFactor.Text = scrollPresenter.MinZoomFactor.ToString();
01312         }
01313
01314         private void UpdateMaxZoomFactor()
01315         {
01316             txtMaxZoomFactor.Text = scrollPresenter.MaxZoomFactor.ToString();
01317         }
01318
01319         private void BtnGetMinZoomFactor_Click(object sender, RoutedEventArgs e)
01320         {
01321             UpdateMinZoomFactor();
01322         }
01323
01324         private void BtnSetMinZoomFactor_Click(object sender, RoutedEventArgs e)
01325         {
01326             try
01327             {
01328                 scrollPresenter.MinZoomFactor = Convert.ToDouble(txtMinZoomFactor.Text);
01329             }
01330             catch (Exception ex)
01331             {
01332                 txtExceptionReport.Text = ex.ToString();
01333                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01334             }
01335         }
01336
01337         private void BtnQueueMinZoomFactor_Click(object sender, RoutedEventArgs e)
01338         {
01339             try
01340             {
01341                 double value = Convert.ToDouble(txtMinZoomFactor.Text);
01342                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetMinZoomFactor, value));
01343                 AppendAsyncEventMessage("Queued SetMinZoomFactor " + value);
01344             }
01345             catch (Exception ex)
01346             {
01347                 txtExceptionReport.Text = ex.ToString();
01348                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01349             }
01350         }
01351
01352         private void BtnGetMaxZoomFactor_Click(object sender, RoutedEventArgs e)
01353         {
01354             UpdateMaxZoomFactor();
01355         }
01356
01357         private void BtnSetMaxZoomFactor_Click(object sender, RoutedEventArgs e)
01358         {
01359             try
01360             {
01361                 scrollPresenter.MaxZoomFactor = Convert.ToDouble(txtMaxZoomFactor.Text);
01362             }
01363             catch (Exception ex)
01364             {
01365                 txtExceptionReport.Text = ex.ToString();
01366                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01367             }
01368         }
01369
01370         private void BtnQueueMaxZoomFactor_Click(object sender, RoutedEventArgs e)
01371         {
01372             try
01373             {
01374                 double value = Convert.ToDouble(txtMaxZoomFactor.Text);
01375                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetMaxZoomFactor, value));
01376                 AppendAsyncEventMessage("Queued SetMaxZoomFactor " + value);
01377             }
01378             catch (Exception ex)
01379             {
01380                 txtExceptionReport.Text = ex.ToString();
01381                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01382             }
01383         }
01384
01385         private void BtnGetHorizontalOffset_Click(object sender, RoutedEventArgs e)
01386         {
01387             tblHorizontalOffset.Text = scrollPresenter.HorizontalOffset.ToString();
01388         }
01389
01390         private void BtnGetVerticalOffset_Click(object sender, RoutedEventArgs e)
01391         {
01392             tblVerticalOffset.Text = scrollPresenter.VerticalOffset.ToString();
01393         }
01394
01395         private void BtnGetZoomFactor_Click(object sender, RoutedEventArgs e)
01396         {
01397             tblZoomFactor.Text = scrollPresenter.ZoomFactor.ToString();
01398         }
01399
01400         private void BtnGetState_Click(object sender, RoutedEventArgs e)
01401         {
01402             tblState.Text = scrollPresenter.State.ToString();
01403         }
01404
01405         private void BtnGetExtentWidth_Click(object sender, RoutedEventArgs e)
01406         {
01407             tblExtentWidth.Text = scrollPresenter.ExtentWidth.ToString();
01408         }
01409
01410         private void BtnGetExtentHeight_Click(object sender, RoutedEventArgs e)
01411         {
01412             tblExtentHeight.Text = scrollPresenter.ExtentHeight.ToString();
01413         }
01414
01415         private void BtnGetViewportWidth_Click(object sender, RoutedEventArgs e)
01416         {
01417             tblViewportWidth.Text = scrollPresenter.ViewportWidth.ToString();
01418         }
01419
01420         private void BtnGetViewportHeight_Click(object sender, RoutedEventArgs e)
01421         {
01422             tblViewportHeight.Text = scrollPresenter.ViewportHeight.ToString();
01423         }
01424
01425         private void BtnGetWidth_Click(object sender, RoutedEventArgs e)
01426         {
01427             txtWidth.Text = scrollPresenter.Width.ToString();
01428         }
01429
01430         private void BtnSetWidth_Click(object sender, RoutedEventArgs e)
01431         {
01432             try
01433             {
01434                 scrollPresenter.Width = Convert.ToDouble(txtWidth.Text);
01435             }
01436             catch (Exception ex)
01437             {
01438                 txtExceptionReport.Text = ex.ToString();
01439                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01440             }
01441         }
01442
01443         private void BtnQueueWidth_Click(object sender, RoutedEventArgs e)
01444         {
01445             try
01446             {
01447                 double value = Convert.ToDouble(txtWidth.Text);
01448                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetWidth, value));
01449                 AppendAsyncEventMessage("Queued SetWidth " + value);
01450             }
01451             catch (Exception ex)
01452             {
01453                 txtExceptionReport.Text = ex.ToString();
01454                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01455             }
01456         }
01457
01458         private void BtnGetMaxWidth_Click(object sender, RoutedEventArgs e)
01459         {
01460             txtMaxWidth.Text = scrollPresenter.MaxWidth.ToString();
01461         }
01462
01463         private void BtnSetMaxWidth_Click(object sender, RoutedEventArgs e)
01464         {
01465             try
01466             {
01467                 scrollPresenter.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
01468             }
01469             catch (Exception ex)
01470             {
01471                 txtExceptionReport.Text = ex.ToString();
01472                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01473             }
01474         }
01475
01476         private void BtnGetHeight_Click(object sender, RoutedEventArgs e)
01477         {
01478             txtHeight.Text = scrollPresenter.Height.ToString();
01479         }
01480
01481         private void BtnSetHeight_Click(object sender, RoutedEventArgs e)
01482         {
01483             try
01484             {
01485                 scrollPresenter.Height = Convert.ToDouble(txtHeight.Text);
01486             }
01487             catch (Exception ex)
01488             {
01489                 txtExceptionReport.Text = ex.ToString();
01490                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01491             }
01492         }
01493
01494         private void BtnQueueHeight_Click(object sender, RoutedEventArgs e)
01495         {
01496             try
01497             {
01498                 double value = Convert.ToDouble(txtHeight.Text);
01499                 lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.SetHeight, value));
01500                 AppendAsyncEventMessage("Queued SetHeight " + value);
01501             }
01502             catch (Exception ex)
01503             {
01504                 txtExceptionReport.Text = ex.ToString();
01505                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01506             }
01507         }
01508
01509         private void BtnGetMaxHeight_Click(object sender, RoutedEventArgs e)
01510         {
01511             txtMaxHeight.Text = scrollPresenter.MaxHeight.ToString();
01512         }
01513
01514         private void BtnSetMaxHeight_Click(object sender, RoutedEventArgs e)
01515         {
01516             try
01517             {
01518                 scrollPresenter.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
01519             }
01520             catch (Exception ex)
01521             {
01522                 txtExceptionReport.Text = ex.ToString();
01523                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01524             }
01525         }
01526
01527         private void BtnGetActualWidth_Click(object sender, RoutedEventArgs e)
01528         {
01529             tblActualWidth.Text = scrollPresenter.ActualWidth.ToString();
01530         }
01531
01532         private void BtnGetActualHeight_Click(object sender, RoutedEventArgs e)
01533         {
01534             tblActualHeight.Text = scrollPresenter.ActualHeight.ToString();
01535         }
01536
01537         private void BtnClearScrollPresenterEvents_Click(object sender, RoutedEventArgs e)
01538         {
01539             lstScrollPresenterEvents.Items.Clear();
01540         }
01541
01542         private void BtnCopyScrollPresenterEvents_Click(object sender, RoutedEventArgs e)
01543         {
01544             string logs = string.Empty;
01545
01546             foreach (object log in lstScrollPresenterEvents.Items)
01547             {
01548                 logs += log.ToString() + "\n";
01549             }
01550
01551             var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
01552             dataPackage.SetText(logs);
01553             Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
01554         }
01555
01556         private void BtnScrollTo_Click(object sender, RoutedEventArgs e)
01557         {
01558             Scroll(isRelativeChange: false);
01559         }
01560
01561         private void BtnScrollBy_Click(object sender, RoutedEventArgs e)
01562         {
01563             Scroll(isRelativeChange: true);
01564         }
01565
01566         private void Scroll(bool isRelativeChange)
01567         {
01568             try
01569             {
01570                 ScrollingAnimationMode animatioMode = (ScrollingAnimationMode)cmbScrollAnimationMode.SelectedIndex;
01571                 ScrollingSnapPointsMode snapPointsMode = (ScrollingSnapPointsMode)cmbScrollSnapPointsMode.SelectedIndex;
01572                 ScrollingScrollOptions options = new ScrollingScrollOptions(animatioMode, snapPointsMode);
01573
01574                 txtStockOffsetsChangeDuration.Text = string.Empty;
01575
01576                 ExecuteQueuedOperations();
01577
01578                 if (isRelativeChange)
01579                 {
01580                     lastOffsetsChangeCorrelationId = scrollPresenter.ScrollBy(
01581                         Convert.ToDouble(txtScrollHorizontalOffset.Text),
01582                         Convert.ToDouble(txtScrollVerticalOffset.Text),
01583                         options);
01584                     relativeChangeCorrelationIds.Add(lastOffsetsChangeCorrelationId);
01585                     AppendAsyncEventMessage("Invoked ScrollBy CorrelationId=" + lastOffsetsChangeCorrelationId);
01586                 }
01587                 else
01588                 {
01589                     lastOffsetsChangeCorrelationId = scrollPresenter.ScrollTo(
01590                         Convert.ToDouble(txtScrollHorizontalOffset.Text),
01591                         Convert.ToDouble(txtScrollVerticalOffset.Text),
01592                         options);
01593                     AppendAsyncEventMessage("Invoked ScrollTo CorrelationId=" + lastOffsetsChangeCorrelationId);
01594                 }
01595             }
01596             catch (Exception ex)
01597             {
01598                 txtExceptionReport.Text = ex.ToString();
01599                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01600             }
01601         }
01602
01603         private void BtnCancelScroll_Click(object sender, RoutedEventArgs e)
01604         {
01605             try
01606             {
01607                 if (lastOffsetsChangeCorrelationId != -1)
01608                 {
01609                     AppendAsyncEventMessage("Canceling scrollTo/By CorrelationId=" + lastOffsetsChangeCorrelationId);
01610                     scrollPresenter.ScrollBy(
01611                         0,
01612                         0,
01613                         new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
01614                 }
01615             }
01616             catch (Exception ex)
01617             {
01618                 txtExceptionReport.Text = ex.ToString();
01619                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01620             }
01621         }
01622
01623         private void ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
01624         {
01625             try
01626             {
01627                 AppendAsyncEventMessage("ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId + " SP=(" + args.StartPosition.X + "," + args.StartPosition.Y + ") EP=(" + args.EndPosition.X + "," + args.EndPosition.Y + ")");
01628
01629                 Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;
01630
01631                 if (stockKeyFrameAnimation != null)
01632                 {
01633                     Vector3KeyFrameAnimation customKeyFrameAnimation = stockKeyFrameAnimation;
01634
01635                     if (cmbOverriddenOffsetsChangeAnimation.SelectedIndex != 0)
01636                     {
01637                         bool isRelativeChange = relativeChangeCorrelationIds.Contains(args.CorrelationId);
01638
01639                         double targetHorizontalOffset = Convert.ToDouble(txtScrollHorizontalOffset.Text);
01640                         if (isRelativeChange)
01641                         {
01642                             targetHorizontalOffset += scrollPresenter.HorizontalOffset;
01643                         }
01644                         float targetHorizontalPosition = ComputeHorizontalPositionFromOffset(targetHorizontalOffset);
01645
01646                         double targetVerticalOffset = Convert.ToDouble(txtScrollVerticalOffset.Text);
01647                         if (isRelativeChange)
01648                         {
01649                             targetVerticalOffset += scrollPresenter.VerticalOffset;
01650                         }
01651                         float targetVerticalPosition = ComputeVerticalPositionFromOffset(targetVerticalOffset);
01652
01653                         customKeyFrameAnimation = stockKeyFrameAnimation.Compositor.CreateVector3KeyFrameAnimation();
01654                         if (cmbOverriddenOffsetsChangeAnimation.SelectedIndex == 1)
01655                         {
01656                             // Accordion case
01657                             float deltaHorizontalPosition = 0.1f * (float)(targetHorizontalOffset - scrollPresenter.HorizontalOffset);
01658                             float deltaVerticalPosition = 0.1f * (float)(targetVerticalOffset - scrollPresenter.VerticalOffset);
01659
01660                             for (int step = 0; step < 3; step++)
01661                             {
01662                                 customKeyFrameAnimation.InsertKeyFrame(
01663                                     1.0f - (0.4f / (float)Math.Pow(2, step)),
01664                                     new Vector3(targetHorizontalPosition + deltaHorizontalPosition, targetVerticalPosition + deltaVerticalPosition, 0.0f));
01665                                 deltaHorizontalPosition /= -2.0f;
01666                                 deltaVerticalPosition /= -2.0f;
01667                             }
01668
01669                             customKeyFrameAnimation.InsertKeyFrame(1.0f, new Vector3(targetHorizontalPosition, targetVerticalPosition, 0.0f));
01670                         }
01671                         else
01672                         {
01673                             // Teleportation case
01674                             float deltaHorizontalPosition = (float)(targetHorizontalOffset - scrollPresenter.HorizontalOffset);
01675                             float deltaVerticalPosition = (float)(targetVerticalOffset - scrollPresenter.VerticalOffset);
01676
01677                             CubicBezierEasingFunction cubicBezierStart = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
01678                                 new Vector2(1.0f, 0.0f),
01679                                 new Vector2(1.0f, 0.0f));
01680
01681                             StepEasingFunction step = stockKeyFrameAnimation.Compositor.CreateStepEasingFunction(1);
01682
01683                             CubicBezierEasingFunction cubicBezierEnd = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
01684                                 new Vector2(0.0f, 1.0f),
01685                                 new Vector2(0.0f, 1.0f));
01686
01687                             customKeyFrameAnimation.InsertKeyFrame(
01688                                 0.499999f,
01689                                 new Vector3(targetHorizontalPosition - 0.9f * deltaHorizontalPosition, targetVerticalPosition - 0.9f * deltaVerticalPosition, 0.0f),
01690                                 cubicBezierStart);
01691                             customKeyFrameAnimation.InsertKeyFrame(
01692                                 0.5f,
01693                                 new Vector3(targetHorizontalPosition - 0.1f * deltaHorizontalPosition, targetVerticalPosition - 0.1f * deltaVerticalPosition, 0.0f),
01694                                 step);
01695                             customKeyFrameAnimation.InsertKeyFrame(
01696                                 1.0f,
01697                                 new Vector3(targetHorizontalPosition, targetVerticalPosition, 0.0f),
01698                                 cubicBezierEnd);
01699                         }
01700                         customKeyFrameAnimation.Duration = stockKeyFrameAnimation.Duration;
01701                         args.Animation = customKeyFrameAnimation;
01702                     }
01703
01704                     if (!string.IsNullOrWhiteSpace(txtOverriddenOffsetsChangeDuration.Text))
01705                     {
01706                         txtStockOffsetsChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();
01707                         double durationOverride = Convert.ToDouble(txtOverriddenOffsetsChangeDuration.Text);
01708                         customKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
01709                     }
01710                 }
01711             }
01712             catch (Exception ex)
01713             {
01714                 txtExceptionReport.Text = ex.ToString();
01715                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01716             }
01717         }
01718
01719         private void BtnAddScrollVelocity_Click(object sender, RoutedEventArgs e)
01720         {
01721             try
01722             {
01723                 Vector2? inertiaDecayRate = null;
01724
01725                 if (txtScrollHorizontalInertiaDecayRate.Text != "null" && txtScrollVerticalInertiaDecayRate.Text != "null")
01726                 {
01727                     inertiaDecayRate = new Vector2(Convert.ToSingle(txtScrollHorizontalInertiaDecayRate.Text), Convert.ToSingle(txtScrollVerticalInertiaDecayRate.Text));
01728                 }
01729
01730                 txtStockOffsetsChangeDuration.Text = string.Empty;
01731
01732                 ExecuteQueuedOperations();
01733
01734                 lastOffsetsChangeWithAdditionalVelocityCorrelationId = scrollPresenter.AddScrollVelocity(
01735                     new Vector2(Convert.ToSingle(txtScrollHorizontalVelocity.Text), Convert.ToSingle(txtScrollVerticalVelocity.Text)),
01736                     inertiaDecayRate);
01737                 AppendAsyncEventMessage("Invoked AddScrollVelocity CorrelationId=" + lastOffsetsChangeWithAdditionalVelocityCorrelationId);
01738             }
01739             catch (Exception ex)
01740             {
01741                 txtExceptionReport.Text = ex.ToString();
01742                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01743             }
01744         }
01745
01746         private void BtnCancelAddScrollVelocity_Click(object sender, RoutedEventArgs e)
01747         {
01748             try
01749             {
01750                 if (lastOffsetsChangeWithAdditionalVelocityCorrelationId != -1)
01751                 {
01752                     AppendAsyncEventMessage("Canceling AddScrollVelocity CorrelationId=" + lastOffsetsChangeWithAdditionalVelocityCorrelationId);
01753                     scrollPresenter.ScrollBy(
01754                         0,
01755                         0,
01756                         new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
01757                 }
01758             }
01759             catch (Exception ex)
01760             {
01761                 txtExceptionReport.Text = ex.ToString();
01762                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01763             }
01764         }
01765
01766         private float ComputeHorizontalPositionFromOffset(double offset)
01767         {
01768             return (float)(offset + ComputeMinHorizontalPosition(scrollPresenter.ZoomFactor));
01769         }
01770
01771         private float ComputeVerticalPositionFromOffset(double offset)
01772         {
01773             return (float)(offset + ComputeMinVerticalPosition(scrollPresenter.ZoomFactor));
01774         }
01775
01776         private float ComputeMinHorizontalPosition(float zoomFactor)
01777         {
01778             UIElement content = scrollPresenter.Content;
01779
01780             if (content == null)
01781             {
01782                 return 0;
01783             }
01784
01785             FrameworkElement contentAsFE = content as FrameworkElement;
01786
01787             if (contentAsFE == null)
01788             {
01789                 return 0;
01790             }
01791
01792             Thickness contentMargin = contentAsFE.Margin;
01793             Visual scrollPresenterVisual = ElementCompositionPreview.GetElementVisual(scrollPresenter);
01794             double contentWidth = double.IsNaN(contentAsFE.Width) ? contentAsFE.ActualWidth : contentAsFE.Width;
01795             float minPosX = 0.0f;
01796             float extentWidth = Math.Max(0.0f, (float)(contentWidth + contentMargin.Left + contentMargin.Right));
01797
01798             if (contentAsFE.HorizontalAlignment == HorizontalAlignment.Center ||
01799                 contentAsFE.HorizontalAlignment == HorizontalAlignment.Stretch)
01800             {
01801                 minPosX = Math.Min(0.0f, (extentWidth * zoomFactor - scrollPresenterVisual.Size.X) / 2.0f);
01802             }
01803             else if (contentAsFE.HorizontalAlignment == HorizontalAlignment.Right)
01804             {
01805                 minPosX = Math.Min(0.0f, extentWidth * zoomFactor - scrollPresenterVisual.Size.X);
01806             }
01807
01808             return minPosX;
01809         }
01810
01811         private float ComputeMinVerticalPosition(float zoomFactor)
01812         {
01813             UIElement content = scrollPresenter.Content;
01814
01815             if (content == null)
01816             {
01817                 return 0;
01818             }
01819
01820             FrameworkElement contentAsFE = content as FrameworkElement;
01821
01822             if (contentAsFE == null)
01823             {
01824                 return 0;
01825             }
01826
01827             Thickness contentMargin = contentAsFE.Margin;
01828             Visual scrollPresenterVisual = ElementCompositionPreview.GetElementVisual(scrollPresenter);
01829             double contentHeight = double.IsNaN(contentAsFE.Height) ? contentAsFE.ActualHeight : contentAsFE.Height;
01830             float minPosY = 0.0f;
01831             float extentHeight = Math.Max(0.0f, (float)(contentHeight + contentMargin.Top + contentMargin.Bottom));
01832
01833             if (contentAsFE.VerticalAlignment == VerticalAlignment.Center ||
01834                 contentAsFE.VerticalAlignment == VerticalAlignment.Stretch)
01835             {
01836                 minPosY = Math.Min(0.0f, (extentHeight * zoomFactor - scrollPresenterVisual.Size.Y) / 2.0f);
01837             }
01838             else if (contentAsFE.VerticalAlignment == VerticalAlignment.Bottom)
01839             {
01840                 minPosY = Math.Min(0.0f, extentHeight * zoomFactor - scrollPresenterVisual.Size.Y);
01841             }
01842
01843             return minPosY;
01844         }
01845
01846         private void BtnZoomTo_Click(object sender, RoutedEventArgs e)
01847         {
01848             Zoom(isRelativeChange: false);
01849         }
01850
01851         private void BtnZoomBy_Click(object sender, RoutedEventArgs e)
01852         {
01853             Zoom(isRelativeChange: true);
01854         }
01855
01856         private void Zoom(bool isRelativeChange)
01857         {
01858             try
01859             {
01860                 ScrollingAnimationMode animationMode = (ScrollingAnimationMode)cmbZoomAnimationMode.SelectedIndex;
01861                 ScrollingSnapPointsMode snapPointsMode = (ScrollingSnapPointsMode)cmbZoomSnapPointsMode.SelectedIndex;
01862                 ScrollingZoomOptions options = new ScrollingZoomOptions(animationMode, snapPointsMode);
01863
01864                 txtStockZoomFactorChangeDuration.Text = string.Empty;
01865
01866                 ExecuteQueuedOperations();
01867
01868                 if (isRelativeChange)
01869                 {
01870                     lastZoomFactorChangeCorrelationId = scrollPresenter.ZoomBy(
01871                         Convert.ToSingle(txtZoomZoomFactor.Text),
01872                         (txtZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtZoomCenterPoint.Text),
01873                         options);
01874                     relativeChangeCorrelationIds.Add(lastZoomFactorChangeCorrelationId);
01875                     AppendAsyncEventMessage("Invoked ZoomBy CorrelationId=" + lastZoomFactorChangeCorrelationId);
01876                 }
01877                 else
01878                 {
01879                     lastZoomFactorChangeCorrelationId = scrollPresenter.ZoomTo(
01880                         Convert.ToSingle(txtZoomZoomFactor.Text),
01881                         (txtZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtZoomCenterPoint.Text),
01882                         options);
01883                     AppendAsyncEventMessage("Invoked ZoomTo CorrelationId=" + lastZoomFactorChangeCorrelationId);
01884                 }
01885             }
01886             catch (Exception ex)
01887             {
01888                 txtExceptionReport.Text = ex.ToString();
01889                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01890             }
01891         }
01892
01893         private void BtnCancelZoom_Click(object sender, RoutedEventArgs e)
01894         {
01895             try
01896             {
01897                 if (lastZoomFactorChangeCorrelationId != -1)
01898                 {
01899                     AppendAsyncEventMessage("Canceling ZoomTo/By CorrelationId=" + lastZoomFactorChangeCorrelationId);
01900                     scrollPresenter.ZoomBy(
01901                         0,
01902                         Vector2.Zero,
01903                         new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
01904                 }
01905             }
01906             catch (Exception ex)
01907             {
01908                 txtExceptionReport.Text = ex.ToString();
01909                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01910             }
01911         }
01912
01913         private void ScrollPresenter_ZoomAnimationStarting(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
01914         {
01915             try
01916             {
01917                 AppendAsyncEventMessage("ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint + ", SZF=" + args.StartZoomFactor + ", EZF=" + args.EndZoomFactor);
01918
01919                 ScalarKeyFrameAnimation stockKeyFrameAnimation = args.Animation as ScalarKeyFrameAnimation;
01920
01921                 if (stockKeyFrameAnimation != null)
01922                 {
01923                     ScalarKeyFrameAnimation customKeyFrameAnimation = stockKeyFrameAnimation;
01924
01925                     if (cmbOverriddenZoomFactorChangeAnimation.SelectedIndex != 0)
01926                     {
01927                         float targetZoomFactor = Convert.ToSingle(txtZoomZoomFactor.Text);
01928                         if (relativeChangeCorrelationIds.Contains(args.CorrelationId))
01929                         {
01930                             targetZoomFactor += scrollPresenter.ZoomFactor;
01931                         }
01932
01933                         customKeyFrameAnimation = stockKeyFrameAnimation.Compositor.CreateScalarKeyFrameAnimation();
01934                         if (cmbOverriddenZoomFactorChangeAnimation.SelectedIndex == 1)
01935                         {
01936                             // Accordion case
01937                             float deltaZoomFactor = 0.1f * (float)(targetZoomFactor - scrollPresenter.ZoomFactor);
01938
01939                             for (int step = 0; step < 3; step++)
01940                             {
01941                                 customKeyFrameAnimation.InsertKeyFrame(
01942                                     1.0f - (0.4f / (float)Math.Pow(2, step)),
01943                                     targetZoomFactor + deltaZoomFactor);
01944                                 deltaZoomFactor /= -2.0f;
01945                             }
01946
01947                             customKeyFrameAnimation.InsertKeyFrame(1.0f, targetZoomFactor);
01948                         }
01949                         else
01950                         {
01951                             // Teleportation case
01952                             float deltaZoomFactor = (float)(targetZoomFactor - scrollPresenter.ZoomFactor);
01953
01954                             CubicBezierEasingFunction cubicBezierStart = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
01955                                 new Vector2(1.0f, 0.0f),
01956                                 new Vector2(1.0f, 0.0f));
01957
01958                             StepEasingFunction step = stockKeyFrameAnimation.Compositor.CreateStepEasingFunction(1);
01959
01960                             CubicBezierEasingFunction cubicBezierEnd = stockKeyFrameAnimation.Compositor.CreateCubicBezierEasingFunction(
01961                                 new Vector2(0.0f, 1.0f),
01962                                 new Vector2(0.0f, 1.0f));
01963
01964                             customKeyFrameAnimation.InsertKeyFrame(
01965                                 0.499999f,
01966                                 targetZoomFactor - 0.9f * deltaZoomFactor,
01967                                 cubicBezierStart);
01968                             customKeyFrameAnimation.InsertKeyFrame(
01969                                 0.5f,
01970                                 targetZoomFactor - 0.1f * deltaZoomFactor,
01971                                 step);
01972                             customKeyFrameAnimation.InsertKeyFrame(
01973                                 1.0f,
01974                                 targetZoomFactor,
01975                                 cubicBezierEnd);
01976                         }
01977                         customKeyFrameAnimation.Duration = stockKeyFrameAnimation.Duration;
01978                         args.Animation = customKeyFrameAnimation;
01979                     }
01980
01981                     if (!string.IsNullOrWhiteSpace(txtOverriddenZoomFactorChangeDuration.Text))
01982                     {
01983                         txtStockZoomFactorChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();
01984                         double durationOverride = Convert.ToDouble(txtOverriddenZoomFactorChangeDuration.Text);
01985                         customKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
01986                     }
01987                 }
01988             }
01989             catch (Exception ex)
01990             {
01991                 txtExceptionReport.Text = ex.ToString();
01992                 lstScrollPresenterEvents.Items.Add(ex.ToString());
01993             }
01994         }
01995
01996         private void BtnAddZoomVelocity_Click(object sender, RoutedEventArgs e)
01997         {
01998             try
01999             {
02000                 txtStockZoomFactorChangeDuration.Text = string.Empty;
02001
02002                 ExecuteQueuedOperations();
02003
02004                 lastZoomFactorChangeWithAdditionalVelocityCorrelationId = scrollPresenter.AddZoomVelocity(
02005                     Convert.ToSingle(txtAddZoomVelocityVelocity.Text),
02006                     (txtAddZoomVelocityCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtAddZoomVelocityCenterPoint.Text),
02007                     (txtAddZoomVelocityInertiaDecayRate.Text == "null") ? (float?)null : (float?)Convert.ToSingle(txtAddZoomVelocityInertiaDecayRate.Text));
02008                 AppendAsyncEventMessage("Invoked AddZoomVelocity CorrelationId=" + lastZoomFactorChangeWithAdditionalVelocityCorrelationId);
02009             }
02010             catch (Exception ex)
02011             {
02012                 txtExceptionReport.Text = ex.ToString();
02013                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02014             }
02015         }
02016
02017         private void BtnCancelAddZoomVelocity_Click(object sender, RoutedEventArgs e)
02018         {
02019             try
02020             {
02021                 if (lastZoomFactorChangeWithAdditionalVelocityCorrelationId != -1)
02022                 {
02023                     AppendAsyncEventMessage("Canceling AddZoomVelocity CorrelationId=" + lastZoomFactorChangeWithAdditionalVelocityCorrelationId);
02024                     scrollPresenter.ZoomBy(
02025                         0,
02026                         Vector2.Zero,
02027                         new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
02028                 }
02029             }
02030             catch (Exception ex)
02031             {
02032                 txtExceptionReport.Text = ex.ToString();
02033                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02034             }
02035         }
02036
02037         private void CmbSnapPointKind_SelectionChanged(object sender, SelectionChangedEventArgs e)
02038         {
02039             if (cmbSnapPointAlignment != null)
02040             {
02041                 cmbSnapPointAlignment.IsEnabled = cmbSnapPointKind.SelectedIndex != 2;
02042             }
02043         }
02044
02045         private void BtnAddIrregularSnapPoint_Click(object sender, RoutedEventArgs e)
02046         {
02047             try
02048             {
02049 #if ApplicableRangeType
02050                 if (cmbSnapPointKind.SelectedIndex == 0)
02051                 {
02052                     ScrollSnapPoint snapPoint = new ScrollSnapPoint(Convert.ToSingle(txtSnapPointValue.Text), Convert.ToSingle(txtSnapPointValueRange.Text), ScrollSnapPointsAlignment.Near);
02053                     scrollPresenter.VerticalSnapPoints.Add(snapPoint);
02054                 }
02055                 else if (cmbSnapPointKind.SelectedIndex == 1)
02056                 {
02057                     ScrollSnapPoint snapPoint = new ScrollSnapPoint(Convert.ToSingle(txtSnapPointValue.Text), Convert.ToSingle(txtSnapPointValueRange.Text), ScrollSnapPointsAlignment.Near);
02058                     scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
02059                 }
02060                 else if (cmbSnapPointKind.SelectedIndex == 2)
02061                 {
02062                     ZoomSnapPoint snapPoint = new ZoomSnapPoint(Convert.ToSingle(txtSnapPointValue.Text), Convert.ToSingle(txtSnapPointValueRange.Text));
02063                     scrollPresenter.ZoomSnapPoints.Add(snapPoint);
02064                 }
02065 #else
02066                 if (cmbSnapPointKind.SelectedIndex != 2)
02067                 {
02068                     ScrollSnapPoint snapPoint = new ScrollSnapPoint(
02069                         Convert.ToSingle(txtIrregularSnapPointValue.Text),
02070                         (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
02071                     if (cmbSnapPointKind.SelectedIndex == 0)
02072                     {
02073                         scrollPresenter.VerticalSnapPoints.Add(snapPoint);
02074                     }
02075                     else
02076                     {
02077                         scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
02078                     }
02079                 }
02080                 else
02081                 {
02082                     ZoomSnapPoint snapPoint = new ZoomSnapPoint(
02083                         Convert.ToSingle(txtIrregularSnapPointValue.Text));
02084                     scrollPresenter.ZoomSnapPoints.Add(snapPoint);
02085                 }
02086 #endif
02087             }
02088             catch (Exception ex)
02089             {
02090                 txtExceptionReport.Text = ex.ToString();
02091                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02092             }
02093         }
02094
02095         private void BtnAddRepeatedSnapPoint_Click(object sender, RoutedEventArgs e)
02096         {
02097             try
02098             {
02099                 if (cmbSnapPointKind.SelectedIndex != 2)
02100                 {
02101                     RepeatedScrollSnapPoint snapPoint = new RepeatedScrollSnapPoint(
02102                         Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
02103                         Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
02104                         Convert.ToDouble(txtRepeatedSnapPointStart.Text),
02105                         Convert.ToDouble(txtRepeatedSnapPointEnd.Text),
02106                         (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
02107                     if (cmbSnapPointKind.SelectedIndex == 0)
02108                     {
02109                         scrollPresenter.VerticalSnapPoints.Add(snapPoint);
02110                     }
02111                     else
02112                     {
02113                         scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
02114                     }
02115                 }
02116                 else
02117                 {
02118                     RepeatedZoomSnapPoint snapPoint = new RepeatedZoomSnapPoint(
02119                         Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
02120                         Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
02121                         Convert.ToDouble(txtRepeatedSnapPointStart.Text),
02122                         Convert.ToDouble(txtRepeatedSnapPointEnd.Text));
02123                     scrollPresenter.ZoomSnapPoints.Add(snapPoint);
02124                 }
02125             }
02126             catch (Exception ex)
02127             {
02128                 txtExceptionReport.Text = ex.ToString();
02129                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02130             }
02131         }
02132
02133         private void BtnChangeView_Click(object sender, RoutedEventArgs e)
02134         {
02135             try
02136             {
02137                 double? horizontalOffset = string.IsNullOrWhiteSpace(txtScrollHorizontalOffset.Text) ? (double?)null : Convert.ToDouble(txtScrollHorizontalOffset.Text);
02138                 double? verticalOffset = string.IsNullOrWhiteSpace(txtScrollVerticalOffset.Text) ? (double?)null : Convert.ToDouble(txtScrollVerticalOffset.Text);
02139                 float? zoomFactor = string.IsNullOrWhiteSpace(txtZoomZoomFactor.Text) ? (float?)null : Convert.ToSingle(txtZoomZoomFactor.Text);
02140                 bool disableAnimation = true;
02141
02142                 if (horizontalOffset == null && verticalOffset == null && zoomFactor == null)
02143                 {
02144                     return;
02145                 }
02146
02147                 ComboBox cmbAnimationMode = (zoomFactor == null || zoomFactor == scrollPresenter.ZoomFactor) ?
02148                     cmbScrollAnimationMode : cmbZoomAnimationMode;
02149
02150                 switch (((ContentControl)cmbAnimationMode.SelectedItem).Content)
02151                 {
02152                     case "Disabled":
02153                         break;
02154                     case "Enabled":
02155                         disableAnimation = false;
02156                         break;
02157                     default: // Auto
02158                         disableAnimation = !new UISettings().AnimationsEnabled;
02159                         break;
02160                 }
02161
02162                 ChangeView(scrollPresenter, horizontalOffset, verticalOffset, zoomFactor, disableAnimation);
02163             }
02164             catch (Exception ex)
02165             {
02166                 txtExceptionReport.Text = ex.ToString();
02167                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02168             }
02169         }
02170
02171         private bool ChangeView(ScrollPresenter scrollPresenter, double? horizontalOffset, double? verticalOffset, float? zoomFactor, bool disableAnimation)
02172         {
02173             AppendAsyncEventMessage($"ChangeView(horizontalOffset:{horizontalOffset}, verticalOffset:{verticalOffset}, zoomFactor:{zoomFactor}, disableAnimation:{disableAnimation}) from horizontalOffset:{scrollPresenter.HorizontalOffset}, verticalOffset:{scrollPresenter.VerticalOffset}, zoomFactor:{scrollPresenter.ZoomFactor}");
02174
02175             double targetHorizontalOffset = horizontalOffset == null ? scrollPresenter.HorizontalOffset : (double)horizontalOffset;
02176             double targetVerticalOffset = verticalOffset == null ? scrollPresenter.VerticalOffset : (double)verticalOffset;
02177             float targetZoomFactor = zoomFactor == null ? scrollPresenter.ZoomFactor : (float)Math.Max(Math.Min((double)zoomFactor, scrollPresenter.MaxZoomFactor), scrollPresenter.MinZoomFactor);
02178             float deltaZoomFactor = targetZoomFactor - scrollPresenter.ZoomFactor;
02179
02180             if (disableAnimation)
02181             {
02182                 targetHorizontalOffset = Math.Max(Math.Min(targetHorizontalOffset, scrollPresenter.ExtentWidth * targetZoomFactor - scrollPresenter.ViewportWidth), 0.0);
02183                 targetVerticalOffset = Math.Max(Math.Min(targetVerticalOffset, scrollPresenter.ExtentHeight * targetZoomFactor - scrollPresenter.ViewportHeight), 0.0);
02184             }
02185             // During an animation, out-of-bounds offsets may become valid as the extents are dynamically updated, so no clamping is performed for animated view changes.
02186
02187             if (deltaZoomFactor == 0.0f)
02188             {
02189                 if (targetHorizontalOffset == scrollPresenter.HorizontalOffset && targetVerticalOffset == scrollPresenter.VerticalOffset)
02190                 {
02191                     AppendAsyncEventMessage("ChangeView no-op");
02192                     return false;
02193                 }
02194
02195                 lastOffsetsChangeCorrelationId = scrollPresenter.ScrollTo(
02196                     targetHorizontalOffset,
02197                     targetVerticalOffset,
02198                     new ScrollingScrollOptions(
02199                         disableAnimation ? ScrollingAnimationMode.Disabled : ScrollingAnimationMode.Enabled,
02200                         disableAnimation ? ScrollingSnapPointsMode.Ignore : ScrollingSnapPointsMode.Default));
02201                 AppendAsyncEventMessage($"ChangeView invoked ScrollTo(horizontalOffset:{targetHorizontalOffset}, verticalOffset:{targetVerticalOffset}) CorrelationId={lastOffsetsChangeCorrelationId}");
02202             }
02203             else
02204             {
02205                 FrameworkElement contentAsFE = scrollPresenter.Content as FrameworkElement;
02206                 HorizontalAlignment contentHorizontalAlignment = contentAsFE == null ? HorizontalAlignment.Stretch : contentAsFE.HorizontalAlignment;
02207                 VerticalAlignment contentVerticalAlignment = contentAsFE == null ? VerticalAlignment.Stretch : contentAsFE.VerticalAlignment;
02208                 double currentPositionX = scrollPresenter.HorizontalOffset;
02209                 double currentPositionY = scrollPresenter.VerticalOffset;
02210                 double currentViewportExcessX = scrollPresenter.ViewportWidth - scrollPresenter.ExtentWidth * scrollPresenter.ZoomFactor;
02211                 double targetViewportExcessX = scrollPresenter.ViewportWidth - scrollPresenter.ExtentWidth * targetZoomFactor;
02212                 double currentViewportExcessY = scrollPresenter.ViewportHeight - scrollPresenter.ExtentHeight * scrollPresenter.ZoomFactor;
02213                 double targetViewportExcessY = scrollPresenter.ViewportHeight - scrollPresenter.ExtentHeight * targetZoomFactor;
02214
02215                 switch (contentHorizontalAlignment)
02216                 {
02217                     case HorizontalAlignment.Center:
02218                     case HorizontalAlignment.Stretch:
02219                         if (currentViewportExcessX > 0) currentPositionX -= currentViewportExcessX / 2.0;
02220                         if (targetViewportExcessX > 0) targetHorizontalOffset -= targetViewportExcessX / 2.0;
02221                         break;
02222                     case HorizontalAlignment.Right:
02223                         if (currentViewportExcessX > 0) currentPositionX -= currentViewportExcessX;
02224                         if (targetViewportExcessX > 0) targetHorizontalOffset -= targetViewportExcessX;
02225                         break;
02226                 }
02227
02228                 switch (contentVerticalAlignment)
02229                 {
02230                     case VerticalAlignment.Center:
02231                     case VerticalAlignment.Stretch:
02232                         if (currentViewportExcessY > 0) currentPositionY -= currentViewportExcessY / 2.0;
02233                         if (targetViewportExcessY > 0) targetVerticalOffset -= targetViewportExcessY / 2.0;
02234                         break;
02235                     case VerticalAlignment.Bottom:
02236                         if (currentViewportExcessY > 0) currentPositionY -= currentViewportExcessY;
02237                         if (targetViewportExcessY > 0) targetVerticalOffset -= targetViewportExcessY;
02238                         break;
02239                 }
02240
02241                 Vector2 centerPoint = new Vector2(
02242                     (float)(targetHorizontalOffset * scrollPresenter.ZoomFactor - currentPositionX * targetZoomFactor) / deltaZoomFactor,
02243                     (float)(targetVerticalOffset * scrollPresenter.ZoomFactor - currentPositionY * targetZoomFactor) / deltaZoomFactor);
02244
02245
02246                 lastZoomFactorChangeCorrelationId = scrollPresenter.ZoomTo(
02247                     targetZoomFactor,
02248                     centerPoint,
02249                     new ScrollingZoomOptions(
02250                         disableAnimation ? ScrollingAnimationMode.Disabled : ScrollingAnimationMode.Enabled,
02251                         disableAnimation ? ScrollingSnapPointsMode.Ignore : ScrollingSnapPointsMode.Default));
02252                 AppendAsyncEventMessage($"ChangeView invoked ZoomBy(zoomFactor:{targetZoomFactor}, centerPoint:{centerPoint}) targetting horizontalOffset:{targetHorizontalOffset}, verticalOffset:{targetVerticalOffset} CorrelationId={lastZoomFactorChangeCorrelationId}");
02253             }
02254
02255             return true;
02256         }
02257
02258         private void BtnClearSnapPoints_Click(object sender, RoutedEventArgs e)
02259         {
02260             try
02261             {
02262                 if (cmbSnapPointKind.SelectedIndex == 0)
02263                 {
02264                     scrollPresenter.VerticalSnapPoints.Clear();
02265                 }
02266                 else if (cmbSnapPointKind.SelectedIndex == 1)
02267                 {
02268                     scrollPresenter.HorizontalSnapPoints.Clear();
02269                 }
02270                 else if (cmbSnapPointKind.SelectedIndex == 2)
02271                 {
02272                     scrollPresenter.ZoomSnapPoints.Clear();
02273                 }
02274             }
02275             catch (Exception ex)
02276             {
02277                 txtExceptionReport.Text = ex.ToString();
02278                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02279             }
02280         }
02281
02282         private void AppendAsyncEventMessage(string asyncEventMessage)
02283         {
02284             lock (asyncEventReportingLock)
02285             {
02286                 while (asyncEventMessage.Length > 0)
02287                 {
02288                     string msgHead = asyncEventMessage;
02289
02290                     if (asyncEventMessage.Length > 110)
02291                     {
02292                         int commaIndex = asyncEventMessage.IndexOf(',', 110);
02293                         if (commaIndex != -1)
02294                         {
02295                             msgHead = asyncEventMessage.Substring(0, commaIndex);
02296                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
02297                         }
02298                         else
02299                         {
02300                             asyncEventMessage = string.Empty;
02301                         }
02302                     }
02303                     else
02304                     {
02305                         asyncEventMessage = string.Empty;
02306                     }
02307
02308                     lstAsyncEventMessage.Add(msgHead);
02309                 }
02310
02311                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
02312             }
02313         }
02314
02315         private void AppendAsyncEventMessage()
02316         {
02317             lock (asyncEventReportingLock)
02318             {
02319                 foreach (string asyncEventMessage in lstAsyncEventMessage)
02320                 {
02321                     lstScrollPresenterEvents.Items.Add(asyncEventMessage);
02322                 }
02323                 lstAsyncEventMessage.Clear();
02324             }
02325         }
02326
02327         private Vector2 ConvertFromStringToVector2(string value)
02328         {
02329             float x = 0, y = 0;
02330
02331             int commaIndex = value.IndexOf(',');
02332             if (commaIndex != -1)
02333             {
02334                 x = Convert.ToSingle(value.Substring(0, commaIndex));
02335                 y = Convert.ToSingle(value.Substring(commaIndex + 1));
02336             }
02337
02338             return new Vector2(x, y);
02339         }
02340
02341         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
02342         {
02343             txtExceptionReport.Text = string.Empty;
02344         }
02345
02346         private void BtnParentMarkupScrollPresenter_Click(object sender, RoutedEventArgs e)
02347         {
02348             try
02349             {
02350                 root.Children.Add(markupScrollPresenter);
02351             }
02352             catch (Exception ex)
02353             {
02354                 txtExceptionReport.Text = ex.ToString();
02355                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02356             }
02357         }
02358
02359         private void BtnUnparentMarkupScrollPresenter_Click(object sender, RoutedEventArgs e)
02360         {
02361             try
02362             {
02363                 root.Children.Remove(markupScrollPresenter);
02364             }
02365             catch (Exception ex)
02366             {
02367                 txtExceptionReport.Text = ex.ToString();
02368                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02369             }
02370         }
02371
02372         private void BtnUnparentReparentMarkupScrollPresenter_Click(object sender, RoutedEventArgs e)
02373         {
02374             try
02375             {
02376                 root.Children.Remove(markupScrollPresenter);
02377                 root.Children.Add(markupScrollPresenter);
02378             }
02379             catch (Exception ex)
02380             {
02381                 txtExceptionReport.Text = ex.ToString();
02382                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02383             }
02384         }
02385
02386         private void BtnCreateDynamicScrollPresenter_Click(object sender, RoutedEventArgs e)
02387         {
02388             try
02389             {
02390                 dynamicScrollPresenter = new ScrollPresenter();
02391                 dynamicScrollPresenter.Name = "dynamicScrollPresenter";
02392                 dynamicScrollPresenter.Width = 300.0;
02393                 dynamicScrollPresenter.Height = 400.0;
02394                 dynamicScrollPresenter.Margin = new Thickness(1);
02395                 dynamicScrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.HotPink);
02396                 dynamicScrollPresenter.VerticalAlignment = VerticalAlignment.Top;
02397                 Grid.SetRow(dynamicScrollPresenter, 1);
02398             }
02399             catch (Exception ex)
02400             {
02401                 txtExceptionReport.Text = ex.ToString();
02402                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02403             }
02404         }
02405
02406         private void BtnParentDynamicScrollPresenter_Click(object sender, RoutedEventArgs e)
02407         {
02408             try
02409             {
02410                 root.Children.Add(dynamicScrollPresenter);
02411             }
02412             catch (Exception ex)
02413             {
02414                 txtExceptionReport.Text = ex.ToString();
02415                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02416             }
02417         }
02418
02419         private void BtnUnparentDynamicScrollPresenter_Click(object sender, RoutedEventArgs e)
02420         {
02421             try
02422             {
02423                 root.Children.Remove(dynamicScrollPresenter);
02424             }
02425             catch (Exception ex)
02426             {
02427                 txtExceptionReport.Text = ex.ToString();
02428                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02429             }
02430         }
02431
02432         private void BtnUseMarkupScrollPresenter_Click(object sender, RoutedEventArgs e)
02433         {
02434             UseScrollPresenter(markupScrollPresenter);
02435         }
02436
02437         private void BtnUseDynamicScrollPresenter_Click(object sender, RoutedEventArgs e)
02438         {
02439             UseScrollPresenter(dynamicScrollPresenter);
02440         }
02441
02442         private void BtnReleaseDynamicScrollPresenter_Click(object sender, RoutedEventArgs e)
02443         {
02444             dynamicScrollPresenter = null;
02445
02446             GC.Collect();
02447             GC.WaitForPendingFinalizers();
02448         }
02449
02450         private void BtnExecuteQueuedOperations_Click(object sender, RoutedEventArgs e)
02451         {
02452             ExecuteQueuedOperations();
02453         }
02454
02455         private void BtnDiscardQueuedOperations_Click(object sender, RoutedEventArgs e)
02456         {
02457             lstQueuedOperations.Clear();
02458             AppendAsyncEventMessage("Queued operations cleared.");
02459         }
02460
02461         private void BtnGetContentLayoutOffsetX_Click(object sender, RoutedEventArgs e)
02462         {
02463             try
02464             {
02465                 float contentLayoutOffsetX = 0.0f;
02466
02467                 ScrollPresenterTestHooks.GetContentLayoutOffsetX(scrollPresenter, out contentLayoutOffsetX);
02468
02469                 txtContentLayoutOffsetX.Text = contentLayoutOffsetX.ToString();
02470             }
02471             catch (Exception ex)
02472             {
02473                 txtExceptionReport.Text = ex.ToString();
02474                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02475             }
02476         }
02477
02478         private void BtnSetContentLayoutOffsetX_Click(object sender, RoutedEventArgs e)
02479         {
02480             try
02481             {
02482                 ScrollPresenterTestHooks.SetContentLayoutOffsetX(scrollPresenter, Convert.ToSingle(txtContentLayoutOffsetX.Text));
02483             }
02484             catch (Exception ex)
02485             {
02486                 txtExceptionReport.Text = ex.ToString();
02487                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02488             }
02489         }
02490
02491         private void BtnGetContentLayoutOffsetY_Click(object sender, RoutedEventArgs e)
02492         {
02493             try
02494             {
02495                 float contentLayoutOffsetY = 0.0f;
02496
02497                 ScrollPresenterTestHooks.GetContentLayoutOffsetY(scrollPresenter, out contentLayoutOffsetY);
02498
02499                 txtContentLayoutOffsetY.Text = contentLayoutOffsetY.ToString();
02500             }
02501             catch (Exception ex)
02502             {
02503                 txtExceptionReport.Text = ex.ToString();
02504                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02505             }
02506         }
02507
02508         private void BtnSetContentLayoutOffsetY_Click(object sender, RoutedEventArgs e)
02509         {
02510             try
02511             {
02512                 ScrollPresenterTestHooks.SetContentLayoutOffsetY(scrollPresenter, Convert.ToSingle(txtContentLayoutOffsetY.Text));
02513             }
02514             catch (Exception ex)
02515             {
02516                 txtExceptionReport.Text = ex.ToString();
02517                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02518             }
02519         }
02520
02521         private void BtnGetArrangeRenderSizesDelta_Click(object sender, RoutedEventArgs e)
02522         {
02523             try
02524             {
02525                 txtArrangeRenderSizesDelta.Text = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter).ToString();
02526             }
02527             catch (Exception ex)
02528             {
02529                 txtExceptionReport.Text = ex.ToString();
02530                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02531             }
02532         }
02533
02534         private void BtnGetPosition_Click(object sender, RoutedEventArgs e)
02535         {
02536             try
02537             {
02538                 Vector2 position = ScrollPresenterTestHooks.GetPosition(scrollPresenter);
02539                 txtPositionX.Text = position.X.ToString();
02540                 txtPositionY.Text = position.Y.ToString();
02541             }
02542             catch (Exception ex)
02543             {
02544                 txtExceptionReport.Text = ex.ToString();
02545                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02546             }
02547         }
02548
02549         private void BtnGetMinPosition_Click(object sender, RoutedEventArgs e)
02550         {
02551             try
02552             {
02553                 Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
02554                 txtMinPositionX.Text = minPosition.X.ToString();
02555                 txtMinPositionY.Text = minPosition.Y.ToString();
02556             }
02557             catch (Exception ex)
02558             {
02559                 txtExceptionReport.Text = ex.ToString();
02560                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02561             }
02562         }
02563
02564         private void BtnSetMinPosition_Click(object sender, RoutedEventArgs e)
02565         {
02566             try
02567             {
02568                 ScrollPresenterTestHooks.SetMinPosition(scrollPresenter, new Vector2(float.Parse(txtMinPositionX.Text), float.Parse(txtMinPositionY.Text)));
02569             }
02570             catch (Exception ex)
02571             {
02572                 txtExceptionReport.Text = ex.ToString();
02573                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02574             }
02575         }
02576
02577         private void BtnGetMaxPosition_Click(object sender, RoutedEventArgs e)
02578         {
02579             try
02580             {
02581                 Vector2 maxPosition = ScrollPresenterTestHooks.GetMaxPosition(scrollPresenter);
02582                 txtMaxPositionX.Text = maxPosition.X.ToString();
02583                 txtMaxPositionY.Text = maxPosition.Y.ToString();
02584             }
02585             catch (Exception ex)
02586             {
02587                 txtExceptionReport.Text = ex.ToString();
02588                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02589             }
02590         }
02591
02592         private void BtnSetMaxPosition_Click(object sender, RoutedEventArgs e)
02593         {
02594             try
02595             {
02596                 ScrollPresenterTestHooks.SetMaxPosition(scrollPresenter, new Vector2(float.Parse(txtMaxPositionX.Text), float.Parse(txtMaxPositionY.Text)));
02597             }
02598             catch (Exception ex)
02599             {
02600                 txtExceptionReport.Text = ex.ToString();
02601                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02602             }
02603         }
02604
02605         private void BtnGetPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e)
02606         {
02607             try
02608             {
02609                 txtPositionExpressionAnimationExpression.Text = ScrollPresenterTestHooks.GetTransformExpressionAnimationExpression(scrollPresenter);
02610             }
02611             catch (Exception ex)
02612             {
02613                 txtExceptionReport.Text = ex.ToString();
02614                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02615             }
02616         }
02617
02618         private void BtnSetPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e)
02619         {
02620             try
02621             {
02622                 ScrollPresenterTestHooks.SetTransformExpressionAnimationExpression(scrollPresenter, txtPositionExpressionAnimationExpression.Text);
02623             }
02624             catch (Exception ex)
02625             {
02626                 txtExceptionReport.Text = ex.ToString();
02627                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02628             }
02629         }
02630
02631         private void BtnGetMinPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e)
02632         {
02633             try
02634             {
02635                 txtMinPositionExpressionAnimationExpression.Text = ScrollPresenterTestHooks.GetMinPositionExpressionAnimationExpression(scrollPresenter);
02636             }
02637             catch (Exception ex)
02638             {
02639                 txtExceptionReport.Text = ex.ToString();
02640                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02641             }
02642         }
02643
02644         private void BtnSetMinPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e)
02645         {
02646             try
02647             {
02648                 ScrollPresenterTestHooks.SetMinPositionExpressionAnimationExpression(scrollPresenter, txtMinPositionExpressionAnimationExpression.Text);
02649             }
02650             catch (Exception ex)
02651             {
02652                 txtExceptionReport.Text = ex.ToString();
02653                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02654             }
02655         }
02656
02657         private void BtnGetMaxPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e)
02658         {
02659             try
02660             {
02661                 txtMaxPositionExpressionAnimationExpression.Text = ScrollPresenterTestHooks.GetMaxPositionExpressionAnimationExpression(scrollPresenter);
02662             }
02663             catch (Exception ex)
02664             {
02665                 txtExceptionReport.Text = ex.ToString();
02666                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02667             }
02668         }
02669
02670         private void BtnSetMaxPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e)
02671         {
02672             try
02673             {
02674                 ScrollPresenterTestHooks.SetMaxPositionExpressionAnimationExpression(scrollPresenter, txtMaxPositionExpressionAnimationExpression.Text);
02675             }
02676             catch (Exception ex)
02677             {
02678                 txtExceptionReport.Text = ex.ToString();
02679                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02680             }
02681         }
02682
02683         private void UseScrollPresenter(ScrollPresenter s)
02684         {
02685             if (scrollPresenter == s || s == null)
02686                 return;
02687
02688             try
02689             {
02690                 if (scrollPresenter != null)
02691                 {
02692                     if (chkLogScrollPresenterMessages.IsChecked == true)
02693                     {
02694                         MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
02695                         MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
02696                     }
02697
02698                     if (chkLogScrollPresenterEvents.IsChecked == true)
02699                     {
02700                         scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
02701                         scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
02702                         scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
02703                         scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
02704                         scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompleted;
02705                         scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
02706                         scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
02707                         scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
02708                         scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
02709                     }
02710
02711                     if (chkLogScrollPresenterEvents.IsChecked == true)
02712                     {
02713                         UnhookContentEffectiveViewportChanged();
02714                     }
02715                 }
02716
02717                 scrollPresenter = s;
02718
02719                 if (chkLogScrollPresenterMessages.IsChecked == true)
02720                 {
02721                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
02722                     MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
02723                 }
02724
02725                 UpdateCmbContentOrientation();
02726                 UpdateCmbHorizontalScrollMode();
02727                 UpdateCmbHorizontalScrollChainMode();
02728                 UpdateCmbHorizontalScrollRailMode();
02729                 UpdateCmbVerticalScrollMode();
02730                 UpdateCmbVerticalScrollChainMode();
02731                 UpdateCmbVerticalScrollRailMode();
02732                 UpdateCmbZoomMode();
02733                 UpdateCmbZoomChainMode();
02734                 UpdateCmbIgnoredInputKinds();
02735                 UpdateCmbContentHorizontalAlignment();
02736                 UpdateCmbContentVerticalAlignment();
02737                 UpdateCmbScrollPresenterManipulationMode();
02738                 UpdateCmbContentManipulationMode();
02739                 UpdateCmbBackground();
02740                 UpdateCmbContent();
02741                 UpdateMinZoomFactor();
02742                 UpdateMaxZoomFactor();
02743
02744                 txtWidth.Text = string.Empty;
02745                 txtHeight.Text = string.Empty;
02746
02747                 if (scrollPresenter != null)
02748                 {
02749                     if (chkLogScrollPresenterEvents.IsChecked == true)
02750                     {
02751                         scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
02752                         scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
02753                         scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
02754                         scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
02755                         scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
02756                         scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
02757                         scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
02758                         scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
02759                         scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
02760                     }
02761
02762                     if (chkLogScrollPresenterEvents.IsChecked == true)
02763                     {
02764                         HookContentEffectiveViewportChanged();
02765                     }
02766                 }
02767             }
02768             catch (Exception ex)
02769             {
02770                 txtExceptionReport.Text = ex.ToString();
02771                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02772             }
02773         }
02774
02775         private Thickness GetThicknessFromString(string thickness)
02776         {
02777             string[] lengths = thickness.Split(',');
02778             if (lengths.Length < 4)
02779                 return new Thickness(Convert.ToDouble(lengths[0]));
02780             else
02781                 return new Thickness(
02782                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
02783         }
02784
02785         private void ExecuteQueuedOperations()
02786         {
02787             try
02788             {
02789                 while (lstQueuedOperations.Count > 0)
02790                 {
02791                     QueuedOperation qo = lstQueuedOperations[0];
02792
02793                     switch (qo.Type)
02794                     {
02795                         case QueuedOperationType.SetMinZoomFactor:
02796                             scrollPresenter.MinZoomFactor = qo.DoubleValue;
02797                             AppendAsyncEventMessage("Unqueued SetMinZoomFactor " + qo.DoubleValue);
02798                             break;
02799                         case QueuedOperationType.SetMaxZoomFactor:
02800                             scrollPresenter.MaxZoomFactor = qo.DoubleValue;
02801                             AppendAsyncEventMessage("Unqueued SetMaxZoomFactor " + qo.DoubleValue);
02802                             break;
02803                         case QueuedOperationType.SetWidth:
02804                             scrollPresenter.Width = qo.DoubleValue;
02805                             AppendAsyncEventMessage("Unqueued SetWidth " + qo.DoubleValue);
02806                             break;
02807                         case QueuedOperationType.SetHeight:
02808                             scrollPresenter.Height = qo.DoubleValue;
02809                             AppendAsyncEventMessage("Unqueued SetHeight " + qo.DoubleValue);
02810                             break;
02811                         case QueuedOperationType.SetContentWidth:
02812                             if (scrollPresenter.Content is FrameworkElement)
02813                             {
02814                                 ((FrameworkElement)(scrollPresenter.Content)).Width = qo.DoubleValue;
02815                             }
02816                             AppendAsyncEventMessage("Unqueued SetContentWidth " + qo.DoubleValue);
02817                             break;
02818                         case QueuedOperationType.SetContentHeight:
02819                             if (scrollPresenter.Content is FrameworkElement)
02820                             {
02821                                 ((FrameworkElement)(scrollPresenter.Content)).Height = qo.DoubleValue;
02822                             }
02823                             AppendAsyncEventMessage("Unqueued SetContentHeight " + qo.DoubleValue);
02824                             break;
02825                         case QueuedOperationType.SetContentMargin:
02826                             if (scrollPresenter.Content is FrameworkElement)
02827                             {
02828                                 ((FrameworkElement)(scrollPresenter.Content)).Margin = GetThicknessFromString(qo.StringValue);
02829                             }
02830                             AppendAsyncEventMessage("Unqueued SetContentMargin " + qo.StringValue);
02831                             break;
02832                         case QueuedOperationType.SetContentPadding:
02833                             if (scrollPresenter.Content is Control)
02834                             {
02835                                 ((Control)(scrollPresenter.Content)).Padding = GetThicknessFromString(qo.StringValue);
02836                             }
02837                             else if (scrollPresenter.Content is Border)
02838                             {
02839                                 ((Border)(scrollPresenter.Content)).Padding = GetThicknessFromString(qo.StringValue);
02840                             }
02841                             else if (scrollPresenter.Content is StackPanel)
02842                             {
02843                                 ((StackPanel)(scrollPresenter.Content)).Padding = GetThicknessFromString(qo.StringValue);
02844                             }
02845                             AppendAsyncEventMessage("Unqueued SetContentPadding " + qo.StringValue);
02846                             break;
02847                     }
02848
02849                     lstQueuedOperations.RemoveAt(0);
02850                 }
02851             }
02852             catch (Exception ex)
02853             {
02854                 txtExceptionReport.Text = ex.ToString();
02855                 lstScrollPresenterEvents.Items.Add(ex.ToString());
02856             }
02857         }
02858     }
02859 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewBlankPage Member List

This is the complete list of members for ItemsViewBlankPage, including all inherited members.
AppendAsyncEventMessage(string asyncEventMessage) | ItemsViewBlankPage | [inline, private]
AppendAsyncEventMessage() | ItemsViewBlankPage | [inline, private]
asyncEventReportingLock | ItemsViewBlankPage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkCustomUI_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkCustomUI_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsViewEvents_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsViewEvents_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ItemsRepeater_Loaded(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ItemsRepeater_SizeChanged(object sender, SizeChangedEventArgs e) | ItemsViewBlankPage | [inline, private]
ItemsView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ItemsViewBlankPage | [inline, private]
ItemsView_GotFocus(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ItemsView_Loaded(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ItemsView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | ItemsViewBlankPage | [inline, private]
ItemsView_LostFocus(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ItemsView_SizeChanged(object sender, SizeChangedEventArgs e) | ItemsViewBlankPage | [inline, private]
ItemsViewBlankPage() | ItemsViewBlankPage | [inline]
LogItemsRepeaterInfo() | ItemsViewBlankPage | [inline, private]
LogItemsViewInfo() | ItemsViewBlankPage | [inline, private]
LogScrollViewInfo() | ItemsViewBlankPage | [inline, private]
lstAsyncEventMessage | ItemsViewBlankPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ItemsViewBlankPage | [inline, private]
ScrollView_ExtentChanged(ScrollView sender, object args) | ItemsViewBlankPage | [inline, private]
ScrollView_Loaded(object sender, RoutedEventArgs e) | ItemsViewBlankPage | [inline, private]
ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | ItemsViewBlankPage | [inline, private]
ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args) | ItemsViewBlankPage | [inline, private]
ScrollView_SizeChanged(object sender, SizeChangedEventArgs e) | ItemsViewBlankPage | [inline, private]
ScrollView_StateChanged(ScrollView sender, object args) | ItemsViewBlankPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | ItemsViewBlankPage | [inline, private]
ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args) | ItemsViewBlankPage | [inline, private]
ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args) | ItemsViewBlankPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ListViewBasePage::QueuedOperation Member List

This is the complete list of members for ListViewBasePage::QueuedOperation, including all inherited members.
DoubleValue | ListViewBasePage::QueuedOperation |
IntValue | ListViewBasePage::QueuedOperation |
QueuedOperation(QueuedOperationType type) | ListViewBasePage::QueuedOperation | [inline]
QueuedOperation(QueuedOperationType type, double value) | ListViewBasePage::QueuedOperation | [inline]
QueuedOperation(QueuedOperationType type, int value) | ListViewBasePage::QueuedOperation | [inline]
QueuedOperation(QueuedOperationType type, string value) | ListViewBasePage::QueuedOperation | [inline]
StringValue | ListViewBasePage::QueuedOperation |
Type | ListViewBasePage::QueuedOperation |
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LottieLogo Member List

This is the complete list of members for LottieLogo, including all inherited members.
c_durationTicks | LottieLogo | [private]
double | LottieLogo |
Duration | LottieLogo |
FrameCount | LottieLogo |
Framerate | LottieLogo |
FrameToProgress(double frameNumber) | LottieLogo | [inline]
Markers | LottieLogo |
SetColorProperty(string propertyName, Color value) | LottieLogo | [inline]
SetScalarProperty(string propertyName, double value) | LottieLogo | [inline]
TryCreateAnimatedVisual(Compositor compositor) | LottieLogo | [inline]
TryCreateAnimatedVisual(Compositor compositor, out object diagnostics) | LottieLogo | [inline]
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPictureTemplateSettings.h Source File

  • File List
  • File Members
  • PersonPicture

PersonPictureTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PersonPictureTemplateSettings.g.h"
00007 #include "PersonPictureTemplateSettings.properties.h"
00008
00009 class PersonPictureTemplateSettings :
00010     public winrt::implementation::PersonPictureTemplateSettingsT<PersonPictureTemplateSettings>,
00011     public PersonPictureTemplateSettingsProperties
00012 {
00013 };
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarPenConfigurationControlProperties Member List

This is the complete list of members for InkToolBarPenConfigurationControlProperties, including all inherited members.
ClearProperties() | InkToolBarPenConfigurationControlProperties | [static]
EnsureProperties() | InkToolBarPenConfigurationControlProperties | [static]
InkToolBarPenConfigurationControlProperties() | InkToolBarPenConfigurationControlProperties |
PenButton(winrt::InkToolBarPenButton const &value) | InkToolBarPenConfigurationControlProperties |
PenButton() | InkToolBarPenConfigurationControlProperties |
PenButtonProperty() | InkToolBarPenConfigurationControlProperties | [inline, static]
s_PenButtonProperty | InkToolBarPenConfigurationControlProperties | [static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMetadataDependencyLocator.cpp Source File

  • File List
  • File Members
  • dll

XamlMetadataDependencyLocator.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include <initguid.h>
00007
00008 #include <minerror.h>
00009 #include <DependencyLocator.h>
00010
00011 #include "XamlTypeInfo.h"
00012 #include "XamlTypeInfo.g.h"
00013
00014 using namespace Microsoft::WRL;
00015
00016 namespace Private
00017 {
00018     PROVIDE_DEPENDENCY(XamlRuntimeType);
00019 }
00020
00021 // Need it to export services
00022 extern "C" __declspec(dllexport) DependencyLocator::Internal::ILocalDependencyStorage* __cdecl GetDependencyLocatorStorage()
00023 {
00024     return &(DependencyLocator::Internal::GetDependencyLocatorStorage().Get());
00025 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushTests Member List

This is the complete list of members for AcrylicBrushTests, including all inherited members.
AcrylicAlwaysUseFallback() | AcrylicBrushTests | [inline]
AcrylicCreatedInFallbackMode() | AcrylicBrushTests | [inline]
AcrylicFromMarkup() | AcrylicBrushTests | [inline]
AcrylicNoiseCache() | AcrylicBrushTests | [inline]
AcrylicPropertyChanges() | AcrylicBrushTests | [inline]
AcrylicRectangleName | AcrylicBrushTests | [private]
AcrylicRendering() | AcrylicBrushTests | [inline]
AcrylicRendering_AcrylicOnComplexTransparentBG() | AcrylicBrushTests | [inline]
AcrylicRendering_LuminosityBlend() | AcrylicBrushTests | [inline]
BasicAcrylicOnRectangle() | AcrylicBrushTests | [inline]
ChooseFromComboBox(string textBoxName, string text) | AcrylicBrushTests | [inline, private]
ClassInitialize(TestContext testContext) | AcrylicBrushTests | [inline, static]
IsUsingAcrylicBrush() | AcrylicBrushTests | [inline, private]
LogBrushSate() | AcrylicBrushTests | [inline, private]
LogResult(Edit result, string stateName) | AcrylicBrushTests | [inline, private]
SizeSliderName | AcrylicBrushTests | [private]
TestCleanup() | AcrylicBrushTests | [inline]
TintOpacitySliderName | AcrylicBrushTests | [private]
TintTransitionDuration() | AcrylicBrushTests | [inline]
VerifyAcrylicBrushEffect() | AcrylicBrushTests | [inline]
VerifyDisconnectedState() | AcrylicBrushTests | [inline]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< RoutedEventType::LosingFocus > Member List

This is the complete list of members for RoutedEventTraits< RoutedEventType::LosingFocus >, including all inherited members.
Event() RoutedEventTraits< RoutedEventType::LosingFocus > [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealTests Member List

This is the complete list of members for RevealTests, including all inherited members.
ValidateAppBarButtonRevealStyles() RevealTests [inline]
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSlider.cpp Source File

  • File List
  • File Members
  • ColorPicker

ColorPickerSlider.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ColorPickerSlider.h"
00007 #include "ColorPickerSliderAutomationPeer.h"
00008
00009 #include "ColorPicker.h"
00010 #include "ResourceAccessor.h"
00011 #include "Utils.h"
00012
00013 ColorPickerSlider::ColorPickerSlider()
00014 {
00015     // We want the ColorPickerSlider to pick up everything for its default style from the Slider's default style,
00016     // since its purpose is just to turn off keyboarding.  So we'll give it Slider's control name as its default style key
00017     // instead of ColorPickerSlider.
00018     winrt::IControlProtected controlProtected = *this;
00019     auto propertyValue = box_value(L"Microsoft.UI.Xaml.Controls.Slider");
00020     controlProtected.DefaultStyleKey(propertyValue);
00021
00022     ValueChanged({ this, &ColorPickerSlider::OnValueChangedEvent });
00023 }
00024
00025 winrt::AutomationPeer ColorPickerSlider::OnCreateAutomationPeer()
00026 {
00027     return winrt::make<ColorPickerSliderAutomationPeer>(*this);
00028 }
00029
00030 void ColorPickerSlider::OnApplyTemplate()
00031 {
00032     __super::OnApplyTemplate();
00033
00034     winrt::IControlProtected thisAsControlProtected = *this;
00035
00036     m_toolTip.set(GetTemplateChildT<winrt::ToolTip>(L"ToolTip", thisAsControlProtected));
00037
00038     if (auto toolTip = m_toolTip.get())
00039     {
00040         toolTip.Content(box_value(GetToolTipString()));
00041     }
00042 }
00043
00044 void ColorPickerSlider::OnKeyDown(winrt::KeyRoutedEventArgs const& args)
00045 {
00046     if (args.Key() != winrt::VirtualKey::Left &&
00047         args.Key() != winrt::VirtualKey::Right &&
00048         args.Key() != winrt::VirtualKey::Up &&
00049         args.Key() != winrt::VirtualKey::Down)
00050     {
00051         __super::OnKeyDown(args);
00052         return;
00053     }
00054
00055     winrt::ColorPicker parentColorPicker = GetParentColorPicker();
00056
00057     if (!parentColorPicker)
00058     {
00059         return;
00060     }
00061
00062     const bool isControlDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00063
00064     double minBound = 0;
00065     double maxBound = 0;
00066
00067     Hsv currentHsv = winrt::get_self<ColorPicker>(parentColorPicker)->GetCurrentHsv();
00068     double currentAlpha = 0;
00069
00070     switch (ColorChannel())
00071     {
00072     case winrt::ColorPickerHsvChannel::Hue:
00073         minBound = parentColorPicker.MinHue();
00074         maxBound = parentColorPicker.MaxHue();
00075         currentHsv.h = Value();
00076         break;
00077
00078     case winrt::ColorPickerHsvChannel::Saturation:
00079         minBound = parentColorPicker.MinSaturation();
00080         maxBound = parentColorPicker.MaxSaturation();
00081         currentHsv.s = Value() / 100;
00082         break;
00083
00084     case winrt::ColorPickerHsvChannel::Value:
00085         minBound = parentColorPicker.MinValue();
00086         maxBound = parentColorPicker.MaxValue();
00087         currentHsv.v = Value() / 100;
00088         break;
00089
00090     case winrt::ColorPickerHsvChannel::Alpha:
00091         minBound = 0;
00092         maxBound = 100;
00093         currentAlpha = Value() / 100;
00094         break;
00095
00096     default:
00097         throw winrt::hresult_error(E_FAIL);
00098     }
00099
00100     const bool shouldInvertHorizontalDirection = FlowDirection() == winrt::FlowDirection::RightToLeft && !IsDirectionReversed();
00101
00102     const IncrementDirection direction =
00103         ((args.Key() == winrt::VirtualKey::Left && !shouldInvertHorizontalDirection)    ||
00104             (args.Key() == winrt::VirtualKey::Right && shouldInvertHorizontalDirection) ||
00105              args.Key() == winrt::VirtualKey::Down) ?
00106         IncrementDirection::Lower :
00107         IncrementDirection::Higher;
00108
00109     const IncrementAmount amount = isControlDown ? IncrementAmount::Large : IncrementAmount::Small;
00110
00111     if (ColorChannel() != winrt::ColorPickerHsvChannel::Alpha)
00112     {
00113         currentHsv = IncrementColorChannel(currentHsv, ColorChannel(), direction, amount, false /* shouldWrap */, minBound, maxBound);
00114     }
00115     else
00116     {
00117         currentAlpha = IncrementAlphaChannel(currentAlpha, direction, amount, false /* shouldWrap */, minBound, maxBound);
00118     }
00119
00120     switch (ColorChannel())
00121     {
00122     case winrt::ColorPickerHsvChannel::Hue:
00123         Value(currentHsv.h);
00124         break;
00125
00126     case winrt::ColorPickerHsvChannel::Saturation:
00127         Value(currentHsv.s * 100);
00128         break;
00129
00130     case winrt::ColorPickerHsvChannel::Value:
00131         Value(currentHsv.v * 100);
00132         break;
00133
00134     case winrt::ColorPickerHsvChannel::Alpha:
00135         Value(currentAlpha * 100);
00136         break;
00137
00138     default:
00139         MUX_ASSERT(false);
00140     }
00141
00142     args.Handled(true);
00143 }
00144
00145 void ColorPickerSlider::OnGotFocus(winrt::RoutedEventArgs const& /*e*/)
00146 {
00147     if (auto toolTip = m_toolTip.get())
00148     {
00149         toolTip.Content(box_value(GetToolTipString()));
00150         toolTip.IsEnabled(true);
00151         toolTip.IsOpen(true);
00152     }
00153 }
00154
00155 void ColorPickerSlider::OnLostFocus(winrt::RoutedEventArgs const& /*e*/)
00156 {
00157     if (auto toolTip = m_toolTip.get())
00158     {
00159         toolTip.IsOpen(false);
00160     }
00161 }
00162
00163 void ColorPickerSlider::OnValueChangedEvent(winrt::IInspectable const& /*sender*/, winrt::RangeBaseValueChangedEventArgs const& args)
00164 {
00165     if (auto toolTip = m_toolTip.get())
00166     {
00167         toolTip.Content(box_value(GetToolTipString()));
00168
00169         // ToolTip doesn't currently provide any way to re-run its placement logic if its placement target moves,
00170         // so toggling IsEnabled induces it to do that without incurring any visual glitches.
00171         toolTip.IsEnabled(false);
00172         toolTip.IsEnabled(true);
00173     }
00174
00175     winrt::DependencyObject currentObject = *this;
00176     winrt::ColorPicker owningColorPicker{ nullptr };
00177
00178     while (currentObject && (owningColorPicker = currentObject.try_as<winrt::ColorPicker>()) == nullptr)
00179     {
00180         currentObject = winrt::VisualTreeHelper::GetParent(currentObject);
00181     }
00182
00183     if (owningColorPicker)
00184     {
00185         const winrt::Color oldColor = owningColorPicker.Color();
00186         Hsv hsv = RgbToHsv(RgbFromColor(oldColor));
00187         hsv.v = args.NewValue() / 100.0;
00188         const winrt::Color newColor = ColorFromRgba(HsvToRgb(hsv));
00189
00190         winrt::ColorPickerSliderAutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this).as<winrt::ColorPickerSliderAutomationPeer>();
00191         winrt::get_self<ColorPickerSliderAutomationPeer>(peer)->RaisePropertyChangedEvent(oldColor, newColor, static_cast<int>(round(args.OldValue())), static_cast<int>(round(args.NewValue())));
00192     }
00193 }
00194
00195 winrt::ColorPicker ColorPickerSlider::GetParentColorPicker()
00196 {
00197     winrt::ColorPicker parentColorPicker{ nullptr };
00198     winrt::DependencyObject currentObject = *this;
00199
00200     while (currentObject && !(parentColorPicker = currentObject.try_as<winrt::ColorPicker>()))
00201     {
00202         currentObject = winrt::VisualTreeHelper::GetParent(currentObject);
00203     }
00204
00205     return parentColorPicker;
00206 }
00207
00208 winrt::hstring ColorPickerSlider::GetToolTipString()
00209 {
00210     const unsigned int sliderValue = static_cast<unsigned int>(round(Value()));
00211
00212     if (ColorChannel() == winrt::ColorPickerHsvChannel::Alpha)
00213     {
00214         return StringUtil::FormatString(
00215             ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringAlphaSlider),
00216             sliderValue);
00217     }
00218     else
00219     {
00220         winrt::ColorPicker parentColorPicker = GetParentColorPicker();
00221         if (parentColorPicker)
00222         {
00223             Hsv currentHsv = winrt::get_self<ColorPicker>(parentColorPicker)->GetCurrentHsv();
00224             winrt::hstring localizedString;
00225
00226             switch (ColorChannel())
00227             {
00228             case winrt::ColorPickerHsvChannel::Hue:
00229                 currentHsv.h = Value();
00230                 localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringHueSliderWithColorName);
00231                 break;
00232
00233             case winrt::ColorPickerHsvChannel::Saturation:
00234                 localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringSaturationSliderWithColorName);
00235                 currentHsv.s = Value() / 100;
00236                 break;
00237
00238             case winrt::ColorPickerHsvChannel::Value:
00239                 localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringValueSliderWithColorName);
00240                 currentHsv.v = Value() / 100;
00241                 break;
00242             default:
00243                 throw winrt::hresult_error(E_FAIL);
00244             }
00245
00246             return StringUtil::FormatString(
00247                 localizedString,
00248                 sliderValue,
00249                 winrt::ColorDisplayNameHelper::ToDisplayName(ColorFromRgba(HsvToRgb(currentHsv))).data());
00250         }
00251         else
00252         {
00253             winrt::hstring localizedString;
00254             switch (ColorChannel())
00255             {
00256             case winrt::ColorPickerHsvChannel::Hue:
00257                 localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringHueSliderWithoutColorName);
00258                 break;
00259             case winrt::ColorPickerHsvChannel::Saturation:
00260                 localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringSaturationSliderWithoutColorName);
00261                 break;
00262             case winrt::ColorPickerHsvChannel::Value:
00263                 localizedString = ResourceAccessor::GetLocalizedStringResource(SR_ToolTipStringValueSliderWithoutColorName);
00264                 break;
00265             default:
00266                 throw winrt::hresult_error(E_FAIL);
00267             }
00268
00269             return StringUtil::FormatString(
00270                 localizedString,
00271                 sliderValue);
00272         }
00273     }
00274 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewMarkup.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Hierarchical

HierarchicalNavigationViewMarkup.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using MUXControlsTestApp.Utilities;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class HierarchicalNavigationViewMarkup : Page
00013     {
00014
00015         public HierarchicalNavigationViewMarkup()
00016         {
00017             this.InitializeComponent();
00018         }
00019
00020         private void OnCheckedIsSettingsVisible(object sender, RoutedEventArgs e)
00021         {
00022             navview.IsSettingsVisible = true;
00023         }
00024
00025         private void OnUncheckedIsSettingsVisible(object sender, RoutedEventArgs e)
00026         {
00027             navview.IsSettingsVisible = false;
00028         }
00029
00030         private void ClickedItem(object sender, NavigationViewItemInvokedEventArgs e)
00031         {
00032         }
00033
00034         private void PrintSelectedItem(object sender, RoutedEventArgs e)
00035         {
00036             var selectedItem = navview.SelectedItem;
00037             if (selectedItem != null)
00038             {
00039                 var label = (String)((NavigationViewItem)selectedItem).Content;
00040                 SelectedItemLabel.Text = label;
00041             }
00042             else
00043             {
00044                 SelectedItemLabel.Text = "No Item Selected";
00045             }
00046         }
00047
00048         private void CollapseSelectedItem(object sender, RoutedEventArgs e)
00049         {
00050             var selectedItem = navview.SelectedItem;
00051             if(selectedItem != null)
00052             {
00053                 var container = (NavigationViewItem)navview.ContainerFromMenuItem(selectedItem);
00054                 container.IsExpanded = false;
00055             }
00056         }
00057
00058         private void RemoveSecondMenuItem(object sender, RoutedEventArgs e)
00059         {
00060             navview.MenuItems.RemoveAt(2);
00061         }
00062
00063         private void AddChildItemToMI19(object sender, RoutedEventArgs e)
00064         {
00065             MI19.MenuItems.Add(CreateMenuItem("Child of MI19"));
00066         }
00067
00068         private NavigationViewItem CreateMenuItem(string title)
00069         {
00070             return new NavigationViewItem{ Content = title };
00071         }
00072
00073         private void PrintTopLevelIsChildSelectedItems(object sender, RoutedEventArgs e)
00074         {
00075             string itemstring = "";
00076             itemstring = BuildIsChildSelectedString(navview.MenuItems, itemstring);
00077             if(itemstring == "")
00078             {
00079                 itemstring = "None";
00080             }
00081             IsChildSelectedLabel.Text = itemstring;
00082         }
00083
00084         private string BuildIsChildSelectedString(IList<object> items, string itemstring)
00085         {
00086             foreach (NavigationViewItem item in items)
00087             {
00088                 if (item.IsChildSelected == true)
00089                 {
00090                     itemstring += item.Name + " ";
00091                 }
00092             }
00093             return itemstring;
00094         }
00095
00096         private void SelectSecondItem(object sender, RoutedEventArgs e)
00097         {
00098             IList<Object> menuItems = navview.MenuItems;
00099             navview.SelectedItem = menuItems[1];
00100
00101         }
00102
00103         private void OnItemExpanding(object sender, NavigationViewItemExpandingEventArgs e)
00104         {
00105             var expandingItemContainerContent = (string)(e.ExpandingItemContainer.Content);
00106             TextBlockExpandingItem.Text = expandingItemContainerContent;
00107
00108             // Verify that returned item corresponds to the returned container
00109             var item = (NavigationViewItem)e.ExpandingItem;
00110             var areItemAndContainerTheSame = "false";
00111             if ((string)(item.Content) == expandingItemContainerContent)
00112             {
00113                 areItemAndContainerTheSame = "true";
00114             }
00115             TextblockExpandingItemAndContainerMatch.Text = areItemAndContainerTheSame;
00116         }
00117
00118         private void OnItemCollapsed(object sender, NavigationViewItemCollapsedEventArgs e)
00119         {
00120             var collapsedItemContainerContent = (string)(e.CollapsedItemContainer.Content);
00121             TextBlockCollapsedItem.Text = collapsedItemContainerContent;
00122
00123             // Verify that returned item corresponds to the returned container
00124             var item = (NavigationViewItem)e.CollapsedItem;
00125             var areItemAndContainerTheSame = "false";
00126             if ((string)(item.Content) == collapsedItemContainerContent)
00127             {
00128                 areItemAndContainerTheSame = "true";
00129             }
00130             TextblockCollapsedItemAndContainerMatch.Text = areItemAndContainerTheSame;
00131         }
00132
00133         private void PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00134         {
00135             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00136             var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
00137             navview.PaneDisplayMode = mode;
00138         }
00139
00140         private void GetMenuItem1ChildrenFlyoutCornerRadiusButton_Click(object sender, RoutedEventArgs e)
00141         {
00142             var parent = MI2.FindVisualParentByType<FlyoutPresenter>();
00143             if (parent is FlyoutPresenter flyoutPresenter)
00144             {
00145                 var contentPresenter = flyoutPresenter.FindVisualChildByName("ContentPresenter") as ContentPresenter;
00146                 MenuItem1ChildrenFlyoutCornerRadiusTextBlock.Text = contentPresenter?.CornerRadius.ToString() ?? "Internal ContentPresenter not found";
00147             }
00148         }
00149
00150         private void NavView_PaneClosed(NavigationView sender, object args)
00151         {
00152             PaneOpenedOrClosedEvent.Text = "Closed";
00153         }
00154
00155         private void NavView_PaneOpened(NavigationView sender, object args)
00156         {
00157             PaneOpenedOrClosedEvent.Text = "Opened";
00158         }
00159     }
00160 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockStackLayout Member List

This is the complete list of members for MockStackLayout, including all inherited members.
ArrangeLayoutFunc | MockStackLayout |
ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) | MockStackLayout | [inline, protected]
InvalidateMeasure() | MockStackLayout | [inline]
MeasureLayoutFunc | MockStackLayout |
MeasureOverride(VirtualizingLayoutContext context, Size availableSize) | MockStackLayout | [inline, protected]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayoutState.cpp Source File

  • File List
  • File Members
  • Repeater

UniformGridLayoutState.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "IFlowLayoutAlgorithmDelegates.h"
00008 #include "FlowLayoutAlgorithm.h"
00009 #include "UniformGridLayoutState.h"
00010
00011 #include "UniformGridLayoutState.properties.cpp"
00012
00013 void UniformGridLayoutState::InitializeForContext(
00014     const winrt::VirtualizingLayoutContext& context,
00015     IFlowLayoutAlgorithmDelegates* callbacks)
00016 {
00017     m_flowAlgorithm.InitializeForContext(context, callbacks);
00018     context.LayoutStateCore(*this);
00019 }
00020
00021 void UniformGridLayoutState::UninitializeForContext(const winrt::VirtualizingLayoutContext& context)
00022 {
00023     m_flowAlgorithm.UninitializeForContext(context);
00024 }
00025
00026 void UniformGridLayoutState::EnsureElementSize(
00027     const winrt::Size availableSize,
00028     const winrt::VirtualizingLayoutContext& context,
00029     const double layoutItemWidth,
00030     const double layoutItemHeight,
00031     const winrt::UniformGridLayoutItemsStretch& stretch,
00032     const winrt::Orientation& orientation,
00033     const double minRowSpacing,
00034     const double minColumnSpacing,
00035     unsigned int maxItemsPerLine)
00036 {
00037     if (maxItemsPerLine == 0)
00038     {
00039         maxItemsPerLine = 1;
00040     }
00041
00042     if (context.ItemCount() > 0)
00043     {
00044         // If the first element is realized we don't need to get it from the context.
00045         if (auto realizedElement = m_flowAlgorithm.GetElementIfRealized(0))
00046         {
00047             // This is relatively cheap, when item 0 is realized, always use it to find the size.
00048             realizedElement.Measure(CalculateAvailableSize(availableSize, orientation, stretch, maxItemsPerLine, layoutItemWidth, layoutItemHeight, minRowSpacing, minColumnSpacing));
00049             SetSize(realizedElement.DesiredSize(), layoutItemWidth, layoutItemHeight, availableSize, stretch, orientation, minRowSpacing, minColumnSpacing, maxItemsPerLine);
00050         }
00051         else
00052         {
00053             // Not realized by flowlayout, so do this now but just once per layout pass since this is expensive and
00054             // has the potential to repeatedly invalidate layout due to recycling causing layout cycles.
00055             if (!m_isEffectiveSizeValid)
00056             {
00057                 if (const auto firstElement = context.GetOrCreateElementAt(0, winrt::ElementRealizationOptions::ForceCreate))
00058                 {
00059                     firstElement.Measure(CalculateAvailableSize(availableSize, orientation, stretch, maxItemsPerLine, layoutItemWidth, layoutItemHeight, minRowSpacing, minColumnSpacing));
00060                     SetSize(firstElement.DesiredSize(), layoutItemWidth, layoutItemHeight, availableSize, stretch, orientation, minRowSpacing, minColumnSpacing, maxItemsPerLine);
00061                     context.RecycleElement(firstElement);
00062                 }
00063             }
00064         }
00065
00066         m_isEffectiveSizeValid = true;
00067     }
00068 }
00069
00070 void UniformGridLayoutState::InvalidateElementSize()
00071 {
00072     m_isEffectiveSizeValid = false;
00073 }
00074
00075 winrt::Size UniformGridLayoutState::CalculateAvailableSize(
00076     const winrt::Size availableSize,
00077     const winrt::Orientation orientation,
00078     const winrt::UniformGridLayoutItemsStretch& stretch,
00079     const unsigned int maxItemsPerLine,
00080     const double itemWidth,
00081     const double itemHeight,
00082     const double minRowSpacing,
00083     const double minColumnSpacing) const
00084 {
00085     // Since some controls might have certain requirements when rendering (e.g. maintaining an aspect ratio),
00086     // we will let elements know the actual size they will get within our layout and let them measure based on that assumption.
00087     // That way we ensure that no gaps will be created within our layout because of a control deciding it doesn't need as much height (or width)
00088     // for the column width (or row height) being provided.
00089     if (orientation == winrt::Orientation::Horizontal)
00090     {
00091         if (!isnan(itemWidth) && std::isfinite(availableSize.Width))
00092         {
00093             double allowedColumnWidth = itemWidth;
00094             if (stretch != winrt::UniformGridLayoutItemsStretch::None)
00095             {
00096                 allowedColumnWidth += CalculateExtraPixelsInLine(maxItemsPerLine, availableSize.Width, itemWidth, minColumnSpacing);
00097             }
00098             return winrt::Size{ static_cast<float>(allowedColumnWidth), availableSize.Height };
00099         }
00100     }
00101     else
00102     {
00103         if (!isnan(itemHeight) && std::isfinite(availableSize.Height))
00104         {
00105             double allowedRowHeight = itemHeight;
00106             if (stretch != winrt::UniformGridLayoutItemsStretch::None)
00107             {
00108                 allowedRowHeight += CalculateExtraPixelsInLine(maxItemsPerLine, availableSize.Height, itemHeight, minRowSpacing);
00109             }
00110             return winrt::Size{ availableSize.Width, static_cast<float>(allowedRowHeight) };
00111         }
00112     }
00113     return availableSize;
00114 }
00115
00116 double UniformGridLayoutState::CalculateExtraPixelsInLine(
00117     const unsigned int maxItemsPerLine,
00118     const float availableSizeMinor,
00119     const double itemSizeMinor,
00120     const double minorItemSpacing) const
00121 {
00122     const auto numItemsPerColumn = [](const unsigned int maxItemsPerLine, const float availableSizeMinor, const double itemSizeMinor, const double minorItemSpacing)
00123     {
00124         const unsigned int numItemsBasedOnSize = static_cast<unsigned int>(std::max(1.0, availableSizeMinor / (itemSizeMinor + minorItemSpacing)));
00125         if (numItemsBasedOnSize == 0)
00126         {
00127             return maxItemsPerLine;
00128         }
00129         else
00130         {
00131             return std::min(maxItemsPerLine, numItemsBasedOnSize);
00132         }
00133     }(maxItemsPerLine,availableSizeMinor,itemSizeMinor,minorItemSpacing);
00134
00135     const auto usedSpace = (numItemsPerColumn * (itemSizeMinor + minorItemSpacing)) - minorItemSpacing;
00136     const auto remainingSpace = static_cast<int>(availableSizeMinor - usedSpace);
00137     return remainingSpace / static_cast<int>(numItemsPerColumn);
00138 }
00139
00140 void UniformGridLayoutState::SetSize(
00141     const winrt::Size& desiredItemSize,
00142     const double layoutItemWidth,
00143     const double layoutItemHeight,
00144     const winrt::Size availableSize,
00145     const winrt::UniformGridLayoutItemsStretch& stretch,
00146     const winrt::Orientation& orientation,
00147     const double minRowSpacing,
00148     const double minColumnSpacing,
00149     unsigned int maxItemsPerLine)
00150 {
00151     if (maxItemsPerLine == 0)
00152     {
00153         maxItemsPerLine = 1;
00154     }
00155
00156     m_effectiveItemWidth = (std::isnan(layoutItemWidth) ? desiredItemSize.Width : layoutItemWidth);
00157     m_effectiveItemHeight = (std::isnan(layoutItemHeight) ? desiredItemSize.Height : layoutItemHeight);
00158
00159     const auto availableSizeMinor = orientation == winrt::Orientation::Horizontal ? availableSize.Width : availableSize.Height;
00160     const auto minorItemSpacing = orientation == winrt::Orientation::Vertical ? minRowSpacing : minColumnSpacing;
00161     const auto itemSizeMinor = orientation == winrt::Orientation::Horizontal ? m_effectiveItemWidth : m_effectiveItemHeight;
00162
00163     double extraMinorPixelsForEachItem = 0.0;
00164     if (std::isfinite(availableSizeMinor))
00165     {
00166         extraMinorPixelsForEachItem = CalculateExtraPixelsInLine(maxItemsPerLine, availableSizeMinor, itemSizeMinor, minorItemSpacing);
00167     }
00168
00169     if (stretch == winrt::UniformGridLayoutItemsStretch::Fill)
00170     {
00171         if (orientation == winrt::Orientation::Horizontal)
00172         {
00173             m_effectiveItemWidth += extraMinorPixelsForEachItem;
00174         }
00175         else
00176         {
00177             m_effectiveItemHeight += extraMinorPixelsForEachItem;
00178         }
00179     }
00180     else if (stretch == winrt::UniformGridLayoutItemsStretch::Uniform)
00181     {
00182         const auto itemSizeMajor = orientation == winrt::Orientation::Horizontal ? m_effectiveItemHeight : m_effectiveItemWidth;
00183         const auto extraMajorPixelsForEachItem = itemSizeMajor * (extraMinorPixelsForEachItem / itemSizeMinor);
00184
00185         if (orientation == winrt::Orientation::Horizontal)
00186         {
00187             m_effectiveItemWidth += extraMinorPixelsForEachItem;
00188             m_effectiveItemHeight += extraMajorPixelsForEachItem;
00189         }
00190         else
00191         {
00192             m_effectiveItemHeight += extraMinorPixelsForEachItem;
00193             m_effectiveItemWidth += extraMajorPixelsForEachItem;
00194         }
00195     }
00196 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewSample.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • TreeView

TreeViewSample.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections;
00006 using System.ComponentModel;
00007 using System.Diagnostics;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010
00011 namespace MUXControlsTestApp.Samples.Selection
00012 {
00013     public sealed partial class TreeViewSample : Page
00014     {
00015         static object _data = Data.CreateNested(3, 2, 4);
00016         public TreeViewSample()
00017         {
00018             this.InitializeComponent();
00019             rootRepeater.ItemsSource = _data;
00020             selectionModel.Source = _data;
00021             selectionModel.PropertyChanged += SelectionModel_PropertyChanged;
00022         }
00023
00024         private void SelectionModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
00025         {
00026             if (e.PropertyName == "SelectedItem")
00027             {
00028                 var selected = (sender as SelectionModel).SelectedItem;
00029             }
00030         }
00031
00032         private void ElementFactory_SelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args)
00033         {
00034             args.TemplateKey = args.DataContext is IEnumerable ? "group" : "item";
00035         }
00036
00037         private void OnBackClicked(object sender, RoutedEventArgs e)
00038         {
00039             GC.Collect();
00040             GC.WaitForPendingFinalizers();
00041             GC.Collect();
00042             Frame.GoBack();
00043         }
00044
00045         private void OnMultipleSelectionClicked(object sender, RoutedEventArgs e)
00046         {
00047             selectionModel.SingleSelect = multipleSelection.IsChecked.Value ? false : true;
00048         }
00049
00050         private void Repeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
00051         {
00052             if (args.Element is TreeViewItem)
00053             {
00054                 (args.Element as TreeViewItem).RepeatedIndex = args.Index;
00055             }
00056         }
00057
00058         private IList GetData()
00059         {
00060             var indices = indexPath.Text.Split('.');
00061             IList data = (IList)_data;
00062             foreach (var index in indices)
00063             {
00064                 data = (IList)(data as IList)[int.Parse(index)];
00065             }
00066
00067             return data;
00068         }
00069
00070         private IList GetParentData()
00071         {
00072             var indices = indexPath.Text.Split('.');
00073             IList data = (IList)_data;
00074             for (int depth = 0; depth < indices.Length - 1; depth++)
00075             {
00076                 var index = indices[depth];
00077                 data = (IList)(data as IList)[int.Parse(index)];
00078             }
00079
00080             return data;
00081         }
00082
00083         private int GetLeafIndex()
00084         {
00085             var indices = indexPath.Text.Split('.');
00086             return int.Parse(indices[indices.Length - 1]);
00087         }
00088
00089         private void insert_Click(object sender, RoutedEventArgs e)
00090         {
00091             var data = GetParentData();
00092             data.Insert(GetLeafIndex(), 100);
00093         }
00094
00095         private void remove_Click(object sender, RoutedEventArgs e)
00096         {
00097             var data = GetParentData();
00098             data.RemoveAt(GetLeafIndex());
00099         }
00100
00101         private void clear_Click(object sender, RoutedEventArgs e)
00102         {
00103             var data = GetData();
00104             data.Clear();
00105         }
00106
00107         private void OnElementIndexChanged(ItemsRepeater sender, ItemsRepeaterElementIndexChangedEventArgs args)
00108         {
00109             if (args.Element is TreeViewItem)
00110             {
00111                 (args.Element as TreeViewItem).RepeatedIndex = args.NewIndex;
00112             }
00113         }
00114
00115         private void Button_Click(object sender, RoutedEventArgs e)
00116         {
00117             var indices = selectionModel.SelectedIndices;
00118             var items = selectionModel.SelectedItems;
00119             Debug.Assert(indices.Count == items.Count);
00120             for (int i = 0; i < items.Count; i++)
00121             {
00122                 Debug.WriteLine(indices[i] + ":" + items[i]);
00123             }
00124
00125             foreach (var index in selectionModel.SelectedIndices)
00126             {
00127                 Debug.WriteLine(index);
00128             }
00129
00130             foreach (var obj in selectionModel.SelectedItems)
00131             {
00132                 Debug.WriteLine(obj);
00133             }
00134         }
00135     }
00136 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewBringIntoViewPage Member List

This is the complete list of members for ScrollViewBringIntoViewPage, including all inherited members.
AppendAsyncEventMessage(string asyncEventMessage) | ScrollViewBringIntoViewPage | [inline, private]
AppendAsyncEventMessage() | ScrollViewBringIntoViewPage | [inline, private]
asyncEventReportingLock | ScrollViewBringIntoViewPage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
BtnStartBringIntoView_Click(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkBringIntoViewUI_Checked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkBringIntoViewUI_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
FrameworkElement_BringIntoViewRequested(UIElement sender, BringIntoViewRequestedEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
LogScrollPresenterInfo() | ScrollViewBringIntoViewPage | [inline, private]
LogScrollViewInfo() | ScrollViewBringIntoViewPage | [inline, private]
lstAsyncEventMessage | ScrollViewBringIntoViewPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollViewBringIntoViewPage | [inline, protected]
ScrollPresenter_BringingIntoView(ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_Loaded(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_SizeChanged(object sender, SizeChangedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_ZoomAnimationStarting(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollPresenter_ZoomCompleted(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_BringingIntoView(ScrollView sender, ScrollingBringingIntoViewEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_ExtentChanged(ScrollView sender, object args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_GotFocus(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_Loaded(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_LostFocus(object sender, RoutedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_SizeChanged(object sender, SizeChangedEventArgs e) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_StateChanged(ScrollView sender, object args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args) | ScrollViewBringIntoViewPage | [inline, private]
ScrollViewBringIntoViewPage() | ScrollViewBringIntoViewPage | [inline]
~ScrollViewBringIntoViewPage() | ScrollViewBringIntoViewPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ButtonInteractionInvokedEventArgs Member List

This is the complete list of members for ButtonInteractionInvokedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
ButtonInteractionInvokedEventArgs(winrt::UIElement const &target) | ButtonInteractionInvokedEventArgs |
CheckThread() | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ButtonInteractionInvokedEventArgs > &&self) noexcept | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< ButtonInteractionInvokedEventArgs > &&self) | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
Target() | ButtonInteractionInvokedEventArgs |
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/APITests/SelectorBarTests.cs Source File

  • File List
  • File Members
  • SelectorBar
  • APITests

SelectorBarTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Threading;
00008 using Microsoft.UI.Private.Controls;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Input;
00011 using MUXControlsTestApp.Utilities;
00012
00013 using WEX.TestExecution;
00014 using WEX.TestExecution.Markup;
00015 using WEX.Logging.Interop;
00016
00017 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00018 {
00019     [TestClass]
00020     public class SelectorBarTests : ApiTestBase
00021     {
00022         private const int c_MaxWaitDuration = 5000;
00023
00024         private const double c_defaultUISelectorBarParentWidth = 400.0;
00025         private const double c_defaultUISelectorBarParentHeight = 200.0;
00026
00027         [TestMethod]
00028         public void VerifyDefaultSelectorBarItemPropertyValues()
00029         {
00030             RunOnUIThread.Execute(() =>
00031             {
00032                 SelectorBarItem selectorBarItem = new SelectorBarItem();
00033                 Verify.IsNotNull(selectorBarItem);
00034                 Verify.AreEqual("", selectorBarItem.Text);
00035                 Verify.IsNull(selectorBarItem.Icon);
00036                 Verify.IsNull(selectorBarItem.Child);
00037                 Verify.IsFalse(selectorBarItem.IsSelected);
00038             });
00039         }
00040
00041         [TestMethod]
00042         public void VerifyDefaultSelectorBarPropertyValues()
00043         {
00044             RunOnUIThread.Execute(() =>
00045             {
00046                 SelectorBar selectorBar = new SelectorBar();
00047                 Verify.IsNotNull(selectorBar);
00048                 Verify.IsNotNull(selectorBar.Items);
00049                 Verify.IsNull(selectorBar.SelectedItem);
00050             });
00051         }
00052
00053         [TestMethod]
00054         public void VerifySelectorBarItems()
00055         {
00056             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
00057             {
00058                 SelectorBar selectorBar = null;
00059                 AutoResetEvent selectorBarLoadedEvent = new AutoResetEvent(false);
00060                 AutoResetEvent selectorBarUnloadedEvent = new AutoResetEvent(false);
00061
00062                 RunOnUIThread.Execute(() =>
00063                 {
00064                     selectorBar = new SelectorBar();
00065                     Verify.IsNotNull(selectorBar);
00066                     Verify.IsNotNull(selectorBar.Items);
00067
00068                     SelectorBarItem selectorBarItemDeleted = new SelectorBarItem()
00069                     {
00070                         Text = "Deleted",
00071                         Icon = new SymbolIcon(Symbol.Delete),
00072                         IsEnabled = false
00073                     };
00074
00075                     selectorBar.Items.Add(selectorBarItemDeleted);
00076
00077                     SelectorBarItem selectorBarItemRemote = new SelectorBarItem()
00078                     {
00079                         Text = "Remote",
00080                         Icon = new SymbolIcon(Symbol.Remote),
00081                         IsSelected = true
00082                     };
00083
00084                     selectorBar.Items.Add(selectorBarItemRemote);
00085
00086                     SelectorBarItem selectorBarItemShared = new SelectorBarItem()
00087                     {
00088                         Text = "Shared",
00089                         Icon = new SymbolIcon(Symbol.Share)
00090                     };
00091
00092                     selectorBar.Items.Add(selectorBarItemShared);
00093
00094                     SelectorBarItem selectorBarItemFavorites = new SelectorBarItem()
00095                     {
00096                         Text = "Favorites",
00097                         Icon = new SymbolIcon(Symbol.Favorite)
00098                     };
00099
00100                     selectorBar.Items.Add(selectorBarItemFavorites);
00101
00102                     Verify.AreEqual(4, selectorBar.Items.Count);
00103
00104                     SetupDefaultUI(selectorBar, selectorBarLoadedEvent, selectorBarUnloadedEvent);
00105                 });
00106
00107                 WaitForEvent("Waiting for Loaded event", selectorBarLoadedEvent);
00108
00109                 RunOnUIThread.Execute(() =>
00110                 {
00111                     Log.Comment("Logging SelectorBar property values after Loaded event");
00112                     LogSelectorBarProperties(selectorBar);
00113
00114                     Log.Comment("Verifying SelectorBar property values after Loaded event");
00115                     Verify.AreEqual(selectorBar.Items[1], selectorBar.SelectedItem);
00116                     Verify.IsTrue(selectorBar.IsEnabled);
00117                     Verify.IsFalse(selectorBar.IsTabStop);
00118                     Verify.AreEqual(XYFocusKeyboardNavigationMode.Auto, selectorBar.XYFocusKeyboardNavigation);
00119                     Verify.AreEqual(KeyboardNavigationMode.Once, selectorBar.TabNavigation);
00120
00121                     ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);
00122
00123                     Log.Comment("Logging ItemsView property values after Loaded event");
00124                     LogItemsViewProperties(itemsView);
00125
00126                     Log.Comment("Verifying ItemsView property values after Loaded event");
00127                     Verify.IsNotNull(itemsView);
00128                     Verify.AreEqual(XYFocusKeyboardNavigationMode.Disabled, itemsView.XYFocusKeyboardNavigation);
00129                     Verify.AreEqual(KeyboardNavigationMode.Once, itemsView.TabNavigation);
00130                     Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
00131                     Verify.AreEqual(1, itemsView.SelectedItems.Count);
00132                     Verify.AreEqual(-1, itemsView.CurrentItemIndex);
00133                     Verify.AreEqual(selectorBar.Items[1], itemsView.SelectedItem);
00134
00135                     Log.Comment("Removing 2nd SelectorBarItem.");
00136                     selectorBar.Items.RemoveAt(1);
00137                     Verify.AreEqual(3, selectorBar.Items.Count);
00138                     Verify.IsNull(selectorBar.SelectedItem);
00139
00140                     Log.Comment("Clearing all SelectorBarItems.");
00141                     selectorBar.Items.Clear();
00142                     Verify.AreEqual(0, selectorBar.Items.Count);
00143
00144                     Log.Comment("Resetting window content and SelectorBar");
00145                     Content = null;
00146                     selectorBar = null;
00147                 });
00148
00149                 WaitForEvent("Waiting for Unloaded event", selectorBarUnloadedEvent);
00150                 IdleSynchronizer.Wait();
00151                 Log.Comment("Done");
00152             }
00153         }
00154
00155         private void SetupDefaultUI(
00156             SelectorBar selectorBar,
00157             AutoResetEvent selectorBarLoadedEvent = null,
00158             AutoResetEvent selectorBarUnloadedEvent = null,
00159             bool setAsContentRoot = true,
00160             bool useParentGrid = false)
00161         {
00162             Log.Comment("Setting up default UI with SelectorBar");
00163
00164             Verify.IsNotNull(selectorBar);
00165             selectorBar.Name = "selectorBar";
00166
00167             if (selectorBarLoadedEvent != null)
00168             {
00169                 selectorBar.Loaded += (object sender, RoutedEventArgs e) =>
00170                 {
00171                     Log.Comment("SelectorBar.Loaded event handler");
00172                     selectorBarLoadedEvent.Set();
00173                 };
00174             }
00175
00176             if (selectorBarUnloadedEvent != null)
00177             {
00178                 selectorBar.Unloaded += (object sender, RoutedEventArgs e) =>
00179                 {
00180                     Log.Comment("SelectorBar.Unloaded event handler");
00181                     selectorBarUnloadedEvent.Set();
00182                 };
00183             }
00184
00185             Grid parentGrid = null;
00186
00187             if (useParentGrid)
00188             {
00189                 parentGrid = new Grid();
00190                 parentGrid.Width = c_defaultUISelectorBarParentWidth;
00191                 parentGrid.Height = c_defaultUISelectorBarParentHeight;
00192
00193                 selectorBar.HorizontalAlignment = HorizontalAlignment.Left;
00194                 selectorBar.VerticalAlignment = VerticalAlignment.Top;
00195
00196                 parentGrid.Children.Add(selectorBar);
00197             }
00198
00199             if (setAsContentRoot)
00200             {
00201                 Log.Comment("Setting window content");
00202                 if (useParentGrid)
00203                 {
00204                     Content = parentGrid;
00205                 }
00206                 else
00207                 {
00208                     Content = selectorBar;
00209                 }
00210             }
00211         }
00212
00213         private string GetStringFromSelectorBarItem(SelectorBarItem selectorBarItem)
00214         {
00215             return "Icon:" + (selectorBarItem.Icon == null ? "null" : selectorBarItem.Icon.ToString()) + ", Text:" + selectorBarItem.Text + ", Child:" + (selectorBarItem.Child == null ? "null" : selectorBarItem.Child.ToString());
00216         }
00217
00218         private void LogSelectorBarProperties(SelectorBar selectorBar)
00219         {
00220             Log.Comment(" - selectorBar.SelectedItem: " + (selectorBar.SelectedItem == null ? "null" : GetStringFromSelectorBarItem(selectorBar.SelectedItem)));
00221             foreach (var selectorBarItem in selectorBar.Items)
00222             {
00223                 Log.Comment(" - selectorBar.Item: " + GetStringFromSelectorBarItem(selectorBarItem));
00224             }
00225             Log.Comment(" - selectorBar.IsEnabled: " + selectorBar.IsEnabled);
00226             Log.Comment(" - selectorBar.IsTabStop: " + selectorBar.IsTabStop);
00227             Log.Comment(" - selectorBar.XYFocusKeyboardNavigation: " + selectorBar.XYFocusKeyboardNavigation);
00228             Log.Comment(" - selectorBar.TabNavigation: " + selectorBar.TabNavigation);
00229         }
00230
00231         private void LogItemsViewProperties(ItemsView itemsView)
00232         {
00233             Log.Comment(" - itemsView.ItemTemplate: " + (itemsView.ItemTemplate == null ? "null" : "non-null"));
00234             Log.Comment(" - itemsView.ItemsSource: " + (itemsView.ItemsSource == null ? "null" : "non-null"));
00235             Log.Comment(" - itemsView.SelectedItem: " + (itemsView.SelectedItem == null ? "null" : "non-null"));
00236             Log.Comment(" - itemsView.CurrentItemIndex: " + itemsView.CurrentItemIndex);
00237             Log.Comment(" - itemsView.Layout: " + (itemsView.Layout == null ? "null" : "non-null"));
00238             Log.Comment(" - itemsView.Layout as StackLayout: " + ((itemsView.Layout as StackLayout) == null ? "null" : "non-null"));
00239             Log.Comment(" - itemsView.IsEnabled: " + itemsView.IsEnabled);
00240             Log.Comment(" - itemsView.IsTabStop: " + itemsView.IsTabStop);
00241             Log.Comment(" - itemsView.XYFocusKeyboardNavigation: " + itemsView.XYFocusKeyboardNavigation);
00242             Log.Comment(" - itemsView.TabNavigation: " + itemsView.TabNavigation);
00243             Log.Comment(" - itemsView.SelectionMode: " + itemsView.SelectionMode);
00244         }
00245
00246         private void WaitForEvent(string logComment, EventWaitHandle eventWaitHandle)
00247         {
00248             Log.Comment(logComment);
00249             if (!eventWaitHandle.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration)))
00250             {
00251                 throw new Exception("Timeout expiration in WaitForEvent.");
00252             }
00253         }
00254     }
00255 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedIconSource Member List

This is the complete list of members for AnimatedIconSource, including all inherited members.
abi_enter() | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
AnimatedIconSourceProperties() | AnimatedIconSourceProperties |
CheckThread() | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
ClearProperties() | AnimatedIconSourceProperties | [static]
CreateIconElementCore() | AnimatedIconSource |
DeleteInstanceOnUIThread(std::unique_ptr< AnimatedIconSource > &&self) noexcept | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline, static]
EnsureProperties() | AnimatedIconSourceProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
FallbackIconSource(winrt::IconSource const &value) | AnimatedIconSourceProperties |
FallbackIconSource() | AnimatedIconSourceProperties |
FallbackIconSourceProperty() | AnimatedIconSourceProperties | [inline, static]
final_release(std::unique_ptr< AnimatedIconSource > &&self) | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline, static]
GetBase() | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
GetIconElementPropertyCore(winrt::DependencyProperty sourceProperty) | AnimatedIconSource |
GetInner() | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
IsOnThread() | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
MirroredWhenRightToLeft(bool value) | AnimatedIconSourceProperties |
MirroredWhenRightToLeft() | AnimatedIconSourceProperties |
MirroredWhenRightToLeftProperty() | AnimatedIconSourceProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource > | [inline]
s_FallbackIconSourceProperty | AnimatedIconSourceProperties | [static]
s_MirroredWhenRightToLeftProperty | AnimatedIconSourceProperties | [static]
s_SourceProperty | AnimatedIconSourceProperties | [static]
Source(winrt::IAnimatedVisualSource2 const &value) | AnimatedIconSourceProperties |
Source() | AnimatedIconSourceProperties |
SourceProperty() | AnimatedIconSourceProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlMember Member List

This is the complete list of members for XamlMember, including all inherited members.
GetValue(winrt::IInspectable const &instance) | XamlMember
IsAttachable() | XamlMember
IsDependencyProperty() | XamlMember
IsReadOnly() | XamlMember
Name() | XamlMember
SetValue(winrt::IInspectable const &instance, winrt::IInspectable const &value) | XamlMember
TargetType() | XamlMember
Type() | XamlMember
XamlMember(wstring_view const &memberName, const winrt::IXamlType &type, std::function< winrt::IInspectable(const winrt::IInspectable &)> getter, std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> setter, bool isDependencyProperty, bool isAttachable) | XamlMember
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBarTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

SelectorBarTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SelectorBarTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(SelectorBarTestHooks)
00012 }
00013
00014 #include "SelectorBarTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemDataAutomationPeer Member List

This is the complete list of members for TreeViewItemDataAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
Collapse() | TreeViewItemDataAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewItemDataAutomationPeer > &&self) noexcept | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
Expand() | TreeViewItemDataAutomationPeer |
ExpandCollapseState() | TreeViewItemDataAutomationPeer |
final_release(std::unique_ptr< TreeViewItemDataAutomationPeer > &&self) | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline, static]
GetBase() | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
GetInner() | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
GetPatternCore(winrt::PatternInterface const &patternInterface) | TreeViewItemDataAutomationPeer |
GetTreeViewItemAutomationPeer() | TreeViewItemDataAutomationPeer | [private]
IsOnThread() | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewItemDataAutomationPeer, winrt::implementation::TreeViewItemDataAutomationPeerT > | [inline]
TreeViewItemDataAutomationPeer(winrt::IInspectable const &item, winrt::TreeViewListAutomationPeer const &parent) | TreeViewItemDataAutomationPeer |
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Vector< T, flags, Helper > Member List

This is the complete list of members for Vector< T, flags, Helper >, including all inherited members.
abi_enter() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
CheckThread() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
CustomIndexOf(T const &value, uint32_t &index) | Vector< T, flags, Helper > | [inline, private]
DeleteInstanceOnUIThread(std::unique_ptr< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > > > &&self) noexcept | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
final_release(std::unique_ptr< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > > > &&self) | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline, static]
GetBase() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
GetCustomIndexOfFunction | VectorBase< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef > | [inline, protected]
GetInner() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
IsOnThread() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
SetCustomIndexOfFunction(std::function< bool(T const &value, uint32_t &index)> indexOfFunction) | VectorBase< T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef > | [inline, protected]
Vector() | Vector< T, flags, Helper > | [inline]
Vector(uint32_t capacity) | Vector< T, flags, Helper > | [inline]
Vector(std::function< int(typename T const &value)> indexOfFunction) | Vector< T, flags, Helper > | [inline]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedChevronRightDownSmallVisualSource Member List

This is the complete list of members for AnimatedChevronRightDownSmallVisualSource, including all inherited members.
ColorAsVector4(winrt::Windows::UI::Color color) | AnimatedChevronRightDownSmallVisualSource | [private, static]
Duration() | AnimatedChevronRightDownSmallVisualSource |
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | AnimatedChevronRightDownSmallVisualSource | [private]
Foreground() | AnimatedChevronRightDownSmallVisualSource | [inline]
Foreground(winrt::Windows::UI::Color value) | AnimatedChevronRightDownSmallVisualSource |
FrameCount() | AnimatedChevronRightDownSmallVisualSource |
Framerate() | AnimatedChevronRightDownSmallVisualSource |
FrameToProgress(double frameNumber) | AnimatedChevronRightDownSmallVisualSource |
Markers() | AnimatedChevronRightDownSmallVisualSource |
SetColorProperty(hstring const &propertyName, winrt::Windows::UI::Color value) | AnimatedChevronRightDownSmallVisualSource |
SetScalarProperty(hstring const &propertyName, double value) | AnimatedChevronRightDownSmallVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor) | AnimatedChevronRightDownSmallVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics) | AnimatedChevronRightDownSmallVisualSource |
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBar.cpp Source File

  • File List
  • File Members
  • TitleBar

TitleBar.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TitleBar.h"
00007 #include "TitleBarTemplateSettings.h"
00008 #include "TitleBarAutomationPeer.h"
00009 #include "ResourceAccessor.h"
00010 #include <winrt/Microsoft.UI.Windowing.h>
00011
00012 TitleBar::TitleBar()
00013 {
00014     SetValue(s_TemplateSettingsProperty, winrt::make<::TitleBarTemplateSettings>());
00015
00016     SetDefaultStyleKey(this);
00017
00018     SizeChanged({ this, &TitleBar::OnSizeChanged });
00019     LayoutUpdated({ this, &TitleBar::OnLayoutUpdated });
00020
00021     if (const winrt::IFrameworkElement frameworkElement = *this)
00022     {
00023         m_actualThemeChangedRevoker = frameworkElement.ActualThemeChanged(winrt::auto_revoke,
00024                 [this](auto&&, auto&&) { UpdateTheme(); });
00025     }
00026 }
00027
00028 TitleBar::~TitleBar()
00029 {
00030     if (m_inputActivationChangedToken.value)
00031     {
00032         m_inputActivationListener.InputActivationChanged(m_inputActivationChangedToken);
00033         m_inputActivationChangedToken.value = 0;
00034     }
00035 }
00036
00037 winrt::AutomationPeer TitleBar::OnCreateAutomationPeer()
00038 {
00039     return winrt::make<TitleBarAutomationPeer>(*this);
00040 }
00041
00042 void TitleBar::OnApplyTemplate()
00043 {
00044     __super::OnApplyTemplate();
00045
00046     winrt::IControlProtected controlProtected{ *this };
00047
00048     m_leftPaddingColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(s_leftPaddingColumnName, controlProtected));
00049     m_rightPaddingColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(s_rightPaddingColumnName, controlProtected));
00050
00051     if (const auto xamlRoot = XamlRoot())
00052     {
00053         if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
00054         {
00055             const auto appWindowId = contentIslandEnvironment.AppWindowId();
00056
00057             if (appWindowId.Value != 0)
00058             {
00059                 m_inputActivationListener = winrt::Microsoft::UI::Input::InputActivationListener::GetForWindowId(appWindowId);
00060                 m_inputActivationChangedToken = m_inputActivationListener.InputActivationChanged({ this, &TitleBar::OnInputActivationChanged });
00061             }
00062         }
00063     }
00064
00065     UpdateHeight();
00066     UpdatePadding();
00067     UpdateIcon();
00068     UpdateBackButton();
00069     UpdatePaneToggleButton();
00070     UpdateTheme();
00071     UpdateTitle();
00072     UpdateSubtitle();
00073     UpdateHeader();
00074     UpdateContent();
00075     UpdateFooter();
00076     UpdateInteractableElementsList();
00077 }
00078
00079 void TitleBar::OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00080 {
00081     winrt::IDependencyProperty property = args.Property();
00082
00083     if (property == s_IsBackButtonVisibleProperty)
00084     {
00085         UpdateBackButton();
00086     }
00087     else if (property == s_IsBackEnabledProperty)
00088     {
00089         UpdateInteractableElementsList();
00090     }
00091     else if (property == s_IsPaneToggleButtonVisibleProperty)
00092     {
00093         UpdatePaneToggleButton();
00094     }
00095     if (property == s_IconSourceProperty)
00096     {
00097         UpdateIcon();
00098     }
00099     else if (property == s_TitleProperty)
00100     {
00101         UpdateTitle();
00102     }
00103     else if (property == s_SubtitleProperty)
00104     {
00105         UpdateSubtitle();
00106     }
00107     if (property == s_HeaderProperty)
00108     {
00109         UpdateHeader();
00110     }
00111     else if (property == s_ContentProperty)
00112     {
00113         UpdateContent();
00114     }
00115     else if (property == s_FooterProperty)
00116     {
00117         UpdateFooter();
00118     }
00119 }
00120
00121 void TitleBar::OnSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args)
00122 {
00123     if (Content() != nullptr)
00124     {
00125         const auto contentArea = m_contentArea.get();
00126         const auto contentAreaGrid = m_contentAreaGrid.get();
00127
00128         if (contentArea && contentAreaGrid)
00129         {
00130             if (!m_compactModeThresholdWidth && contentArea.DesiredSize().Width >= contentAreaGrid.ActualWidth())
00131             {
00132                 m_compactModeThresholdWidth = args.NewSize().Width;
00133                 winrt::VisualStateManager::GoToState(*this, s_compactVisualStateName, false);
00134             }
00135             else if (args.NewSize().Width >= m_compactModeThresholdWidth)
00136             {
00137                 m_compactModeThresholdWidth = 0.0;
00138                 winrt::VisualStateManager::GoToState(*this, s_expandedVisualStateName, false);
00139                 UpdateTitle();
00140                 UpdateSubtitle();
00141             }
00142         }
00143     }
00144
00145     UpdateDragRegion();
00146 }
00147
00148 void TitleBar::OnLayoutUpdated(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00149 {
00150     UpdateDragRegion();
00151 }
00152
00153 void TitleBar::OnInputActivationChanged(const winrt::InputActivationListener& sender, const winrt::InputActivationListenerActivationChangedEventArgs& args)
00154 {
00155     bool isDeactivated = sender.State() == winrt::InputActivationState::Deactivated;
00156
00157     if (IsBackButtonVisible() && IsBackEnabled())
00158     {
00159         winrt::VisualStateManager::GoToState(*this,
00160             isDeactivated ? s_backButtonDeactivatedVisualStateName : s_backButtonVisibleVisualStateName, false);
00161     }
00162
00163     if (IsPaneToggleButtonVisible())
00164     {
00165         winrt::VisualStateManager::GoToState(*this,
00166             isDeactivated ? s_paneToggleButtonDeactivatedVisualStateName : s_paneToggleButtonVisibleVisualStateName, false);
00167     }
00168
00169     if (IconSource() != nullptr)
00170     {
00171         winrt::VisualStateManager::GoToState(*this,
00172             isDeactivated ? s_iconDeactivatedVisualStateName : s_iconVisibleVisualStateName, false);
00173     }
00174
00175     if (!Title().empty())
00176     {
00177         winrt::VisualStateManager::GoToState(*this,
00178             isDeactivated ? s_titleTextDeactivatedVisualStateName : s_titleTextVisibleVisualStateName, false);
00179     }
00180
00181     if (!Subtitle().empty())
00182     {
00183         winrt::VisualStateManager::GoToState(*this,
00184             isDeactivated ? s_subtitleTextDeactivatedVisualStateName : s_subtitleTextVisibleVisualStateName, false);
00185     }
00186
00187     if (Header() != nullptr)
00188     {
00189         winrt::VisualStateManager::GoToState(*this,
00190             isDeactivated ? s_headerDeactivatedVisualStateName : s_headerVisibleVisualStateName, false);
00191     }
00192
00193     if (Content() != nullptr)
00194     {
00195         winrt::VisualStateManager::GoToState(*this,
00196             isDeactivated ? s_contentDeactivatedVisualStateName : s_contentVisibleVisualStateName, false);
00197     }
00198
00199     if (Footer() != nullptr)
00200     {
00201         winrt::VisualStateManager::GoToState(*this,
00202             isDeactivated ? s_footerDeactivatedVisualStateName : s_footerVisibleVisualStateName, false);
00203     }
00204 }
00205
00206 void TitleBar::OnBackButtonClick(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
00207 {
00208     m_backRequestedEventSource(*this, nullptr);
00209 }
00210
00211 void TitleBar::OnPaneToggleButtonClick(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
00212 {
00213     m_paneToggleRequestedEventSource(*this, nullptr);
00214 }
00215
00216 void TitleBar::UpdateIcon()
00217 {
00218     auto const templateSettings = winrt::get_self<::TitleBarTemplateSettings>(TemplateSettings());
00219     if (auto const source = IconSource())
00220     {
00221         templateSettings->IconElement(SharedHelpers::MakeIconElementFrom(source));
00222         winrt::VisualStateManager::GoToState(*this, s_iconVisibleVisualStateName, false);
00223     }
00224     else
00225     {
00226         templateSettings->IconElement(nullptr);
00227         winrt::VisualStateManager::GoToState(*this, s_iconCollapsedVisualStateName, false);
00228     }
00229 }
00230
00231 void TitleBar::UpdateBackButton()
00232 {
00233     if (IsBackButtonVisible())
00234     {
00235         if (!m_backButton.get())
00236         {
00237             LoadBackButton();
00238         }
00239
00240         winrt::VisualStateManager::GoToState(*this, s_backButtonVisibleVisualStateName, false);
00241     }
00242     else
00243     {
00244         winrt::VisualStateManager::GoToState(*this, s_backButtonCollapsedVisualStateName, false);
00245     }
00246
00247     UpdateInteractableElementsList();
00248     UpdateHeaderSpacing();
00249 }
00250
00251 void TitleBar::UpdatePaneToggleButton()
00252 {
00253     if (IsPaneToggleButtonVisible())
00254     {
00255         if (!m_paneToggleButton.get())
00256         {
00257             LoadPaneToggleButton();
00258         }
00259
00260         winrt::VisualStateManager::GoToState(*this, s_paneToggleButtonVisibleVisualStateName, false);
00261     }
00262     else
00263     {
00264         winrt::VisualStateManager::GoToState(*this, s_paneToggleButtonCollapsedVisualStateName, false);
00265     }
00266
00267     UpdateInteractableElementsList();
00268     UpdateHeaderSpacing();
00269 }
00270
00271 void TitleBar::UpdateHeight()
00272 {
00273     winrt::VisualStateManager::GoToState(*this,
00274         (Content() == nullptr && Header() == nullptr && Footer() == nullptr) ?
00275         s_compactHeightVisualStateName : s_expandedHeightVisualStateName,
00276         false);
00277 }
00278
00279 void TitleBar::UpdatePadding()
00280 {
00281     if (const auto xamlRoot = XamlRoot())
00282     {
00283         if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
00284         {
00285             const auto appWindowId = contentIslandEnvironment.AppWindowId();
00286             const winrt::Microsoft::UI::Windowing::AppWindow appWindow = winrt::Microsoft::UI::Windowing::AppWindow::GetFromWindowId(appWindowId);
00287
00288             if (const auto appTitleBar = appWindow.TitleBar())
00289             {
00290                 // TODO 50724421: Bind to appTitleBar Left and Right inset changed event.
00291                 if (const auto leftColumn = m_leftPaddingColumn.get())
00292                 {
00293                     leftColumn.Width(winrt::GridLengthHelper::FromPixels(appTitleBar.LeftInset()));
00294                 }
00295
00296                 if (const auto rightColumn = m_rightPaddingColumn.get())
00297                 {
00298                     rightColumn.Width(winrt::GridLengthHelper::FromPixels(appTitleBar.RightInset()));
00299                 }
00300             }
00301         }
00302     }
00303 }
00304
00305 void TitleBar::UpdateTheme()
00306 {
00307     if (const auto xamlRoot = XamlRoot())
00308     {
00309         if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
00310         {
00311             const auto appWindowId = contentIslandEnvironment.AppWindowId();
00312             const winrt::Microsoft::UI::Windowing::AppWindow appWindow = winrt::Microsoft::UI::Windowing::AppWindow::GetFromWindowId(appWindowId);
00313
00314             // AppWindow TitleBar's caption buttons does not update colors with theme change.
00315             // We need to set them here.
00316             if (const auto appTitleBar = appWindow.TitleBar())
00317             {
00318                 // Rest colors.
00319                 const auto buttonForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonForegroundColorName)).as<winrt::Color>();
00320                 appTitleBar.ButtonForegroundColor(buttonForegroundColor);
00321
00322                 const auto buttonBackgroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonBackgroundColorName)).as<winrt::Color>();
00323                 appTitleBar.ButtonBackgroundColor(buttonBackgroundColor);
00324                 appTitleBar.ButtonInactiveBackgroundColor(buttonBackgroundColor);
00325
00326                 // Hover colors.
00327                 const auto buttonHoverForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonHoverForegroundColorName)).as<winrt::Color>();
00328                 appTitleBar.ButtonHoverForegroundColor(buttonHoverForegroundColor);
00329
00330                 const auto buttonHoverBackgroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonHoverBackgroundColorName)).as<winrt::Color>();
00331                 appTitleBar.ButtonHoverBackgroundColor(buttonHoverBackgroundColor);
00332
00333                 // Pressed colors.
00334                 const auto buttonPressedForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonPressedForegroundColorName)).as<winrt::Color>();
00335                 appTitleBar.ButtonPressedForegroundColor(buttonPressedForegroundColor);
00336
00337                 const auto buttonPressedBackgroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonPressedBackgroundColorName)).as<winrt::Color>();
00338                 appTitleBar.ButtonPressedBackgroundColor(buttonPressedBackgroundColor);
00339
00340                 // Inactive foreground.
00341                 const auto buttonInactiveForegroundColor = ResourceAccessor::ResourceLookup(*this, box_value(s_titleBarButtonInactiveForegroundColorName)).as<winrt::Color>();
00342                 appTitleBar.ButtonInactiveForegroundColor(buttonInactiveForegroundColor);
00343             }
00344         }
00345     }
00346 }
00347
00348 void TitleBar::UpdateTitle()
00349 {
00350     const winrt::hstring titleText = Title();
00351     if (titleText.empty())
00352     {
00353         winrt::VisualStateManager::GoToState(*this, s_titleTextCollapsedVisualStateName, false);
00354     }
00355     else
00356     {
00357         winrt::VisualStateManager::GoToState(*this, s_titleTextVisibleVisualStateName, false);
00358     }
00359 }
00360
00361 void TitleBar::UpdateSubtitle()
00362 {
00363     const winrt::hstring titleText = Title();
00364     if (titleText.empty())
00365     {
00366         winrt::VisualStateManager::GoToState(*this, s_subtitleTextCollapsedVisualStateName, false);
00367     }
00368     else
00369     {
00370         winrt::VisualStateManager::GoToState(*this, s_subtitleTextVisibleVisualStateName, false);
00371     }
00372 }
00373
00374 void TitleBar::UpdateHeader()
00375 {
00376     if (Header() == nullptr)
00377     {
00378         winrt::VisualStateManager::GoToState(*this, s_headerCollapsedVisualStateName, false);
00379     }
00380     else
00381     {
00382         if (!m_headerArea.get())
00383         {
00384             m_headerArea.set(GetTemplateChildT<winrt::FrameworkElement>(s_headerContentPresenterPartName, *this));
00385         }
00386         winrt::VisualStateManager::GoToState(*this, s_headerVisibleVisualStateName, false);
00387     }
00388
00389     UpdateHeight();
00390     UpdateInteractableElementsList();
00391 }
00392
00393 void TitleBar::UpdateContent()
00394 {
00395     if (Content() == nullptr)
00396     {
00397         winrt::VisualStateManager::GoToState(*this, s_contentCollapsedVisualStateName, false);
00398     }
00399     else
00400     {
00401         if (!m_contentArea.get())
00402         {
00403             winrt::IControlProtected controlProtected{ *this };
00404
00405             m_contentAreaGrid.set(GetTemplateChildT<winrt::Grid>(s_contentPresenterGridPartName, controlProtected));
00406             m_contentArea.set(GetTemplateChildT<winrt::FrameworkElement>(s_contentPresenterPartName, controlProtected));
00407         }
00408
00409         winrt::VisualStateManager::GoToState(*this, s_contentVisibleVisualStateName, false);
00410     }
00411
00412     UpdateHeight();
00413     UpdateInteractableElementsList();
00414 }
00415
00416 void TitleBar::UpdateFooter()
00417 {
00418     if (Footer() == nullptr)
00419     {
00420         winrt::VisualStateManager::GoToState(*this, s_footerCollapsedVisualStateName, false);
00421     }
00422     else
00423     {
00424         if (!m_footerArea.get())
00425         {
00426             m_footerArea.set(GetTemplateChildT<winrt::FrameworkElement>(s_footerPresenterPartName, *this));
00427         }
00428         winrt::VisualStateManager::GoToState(*this, s_footerVisibleVisualStateName, false);
00429     }
00430
00431     UpdateHeight();
00432     UpdateInteractableElementsList();
00433 }
00434
00435 // Once TitleBar control is set as the Window titlebar in developer codebehind, the entire region's input is marked as non-client
00436 // and becomes non interactable. We need to punch out a hole for each interactable region in TitleBar.
00437 void TitleBar::UpdateDragRegion()
00438 {
00439     if (const auto xamlRoot = XamlRoot())
00440     {
00441         if (const auto contentIslandEnvironment = xamlRoot.ContentIslandEnvironment())
00442         {
00443             auto appWindowId = contentIslandEnvironment.AppWindowId();
00444             winrt::InputNonClientPointerSource nonClientPointerSource = winrt::InputNonClientPointerSource::GetForWindowId(appWindowId);
00445
00446             if (!m_interactableElementsList.empty())
00447             {
00448                 std::vector<winrt::Windows::Graphics::RectInt32> passthroughRects;
00449
00450                 // Get rects for each interactable element in TitleBar.
00451                 for (const auto frameworkElement : m_interactableElementsList)
00452                 {
00453                     const auto transformBounds = frameworkElement.TransformToVisual(nullptr);
00454                     const auto width = frameworkElement.ActualWidth();
00455                     const auto height = frameworkElement.ActualHeight();
00456                     const auto bounds = transformBounds.TransformBounds(winrt::Rect{
00457                         0.0f,
00458                         0.0f,
00459                         static_cast<float>(width),
00460                         static_cast<float>(height) });
00461
00462                     if (bounds.X < 0 || bounds.Y < 0)
00463                     {
00464                         continue;
00465                     }
00466
00467                     const auto scale = xamlRoot.RasterizationScale();
00468                     const auto transparentRect = winrt::Windows::Graphics::RectInt32{
00469                         static_cast<int32_t>(bounds.X * scale),
00470                         static_cast<int32_t>(bounds.Y * scale),
00471                         static_cast<int32_t>(bounds.Width * scale),
00472                         static_cast<int32_t>(bounds.Height * scale),
00473                     };
00474
00475                     passthroughRects.push_back(transparentRect);
00476                 }
00477
00478                 // Set list of rects as passthrough regions for the non-client area.
00479                 nonClientPointerSource.SetRegionRects(winrt::NonClientRegionKind::Passthrough, passthroughRects);
00480             }
00481             else
00482             {
00483                 // There is no interactable areas. Clear previous passthrough rects.
00484                 nonClientPointerSource.ClearRegionRects(winrt::NonClientRegionKind::Passthrough);
00485             }
00486         }
00487     }
00488 }
00489
00490 void TitleBar::UpdateInteractableElementsList()
00491 {
00492     m_interactableElementsList.clear();
00493
00494     if (IsBackButtonVisible() && IsBackEnabled())
00495     {
00496         if (const auto backButton = m_backButton.get())
00497         {
00498             m_interactableElementsList.push_back(backButton);
00499         }
00500     }
00501
00502     if (IsPaneToggleButtonVisible())
00503     {
00504         if (const auto paneToggleButton = m_paneToggleButton.get())
00505         {
00506             m_interactableElementsList.push_back(paneToggleButton);
00507         }
00508     }
00509
00510     if (Header() != nullptr)
00511     {
00512         if (const auto headerArea = m_headerArea.get())
00513         {
00514             m_interactableElementsList.push_back(headerArea);
00515         }
00516     }
00517
00518     if (Content() != nullptr)
00519     {
00520         if (const auto contentArea = m_contentArea.get())
00521         {
00522             m_interactableElementsList.push_back(contentArea);
00523         }
00524     }
00525
00526     if (Footer() != nullptr)
00527     {
00528         if (const auto footerArea = m_footerArea.get())
00529         {
00530             m_interactableElementsList.push_back(footerArea);
00531         }
00532     }
00533 }
00534
00535 void TitleBar::UpdateHeaderSpacing()
00536 {
00537     winrt::VisualStateManager::GoToState(
00538         *this,
00539         IsBackButtonVisible() == IsPaneToggleButtonVisible() ?
00540         s_defaultSpacingVisualStateName : s_negativeInsetVisualStateName,
00541         false);
00542 }
00543
00544 void TitleBar::LoadBackButton()
00545 {
00546     m_backButton.set(GetTemplateChildT<winrt::Button>(s_backButtonPartName, *this));
00547
00548     if (const auto backButton = m_backButton.get())
00549     {
00550         m_backButtonClickRevoker = backButton.Click(winrt::auto_revoke, { this, &TitleBar::OnBackButtonClick });
00551
00552         // Do localization for the back button
00553         if (winrt::AutomationProperties::GetName(backButton).empty())
00554         {
00555             const auto backButtonName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationBackButtonName);
00556             winrt::AutomationProperties::SetName(backButton, backButtonName);
00557         }
00558
00559         // Setup the tooltip for the back button
00560         const auto tooltip = winrt::ToolTip();
00561         const auto backButtonTooltipText = ResourceAccessor::GetLocalizedStringResource(SR_NavigationBackButtonToolTip);
00562         tooltip.Content(box_value(backButtonTooltipText));
00563         winrt::ToolTipService::SetToolTip(backButton, tooltip);
00564     }
00565 }
00566
00567 void TitleBar::LoadPaneToggleButton()
00568 {
00569     m_paneToggleButton.set(GetTemplateChildT<winrt::Button>(s_paneToggleButtonPartName, *this));
00570
00571     if (const auto paneToggleButton = m_paneToggleButton.get())
00572     {
00573         m_paneToggleButtonClickRevoker = paneToggleButton.Click(winrt::auto_revoke, { this, &TitleBar::OnPaneToggleButtonClick });
00574
00575         // Do localization for paneToggleButton
00576         if (winrt::AutomationProperties::GetName(paneToggleButton).empty())
00577         {
00578             const auto paneToggleButtonName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationButtonToggleName);
00579             winrt::AutomationProperties::SetName(paneToggleButton, paneToggleButtonName);
00580         }
00581
00582         // Setup the tooltip for the paneToggleButton
00583         const auto tooltip = winrt::ToolTip();
00584         tooltip.Content(box_value(winrt::AutomationProperties::GetName(paneToggleButton)));
00585         winrt::ToolTipService::SetToolTip(paneToggleButton, tooltip);
00586     }
00587 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingPage Member List

This is the complete list of members for ProgressRingPage, including all inherited members.
ChangeValue_Click(object sender, RoutedEventArgs e) | ProgressRingPage | [inline]
ProgressRingPage() | ProgressRingPage | [inline]
ProgressRingPage_CurrentStateChanged(object sender, VisualStateChangedEventArgs e) | ProgressRingPage | [inline, private]
ProgressRingPage_Loaded(object sender, RoutedEventArgs e) | ProgressRingPage | [inline, private]
UpdateMinMax_Click(object sender, RoutedEventArgs e) | ProgressRingPage | [inline]
UpdateValue_Click(object sender, RoutedEventArgs e) | ProgressRingPage | [inline]
UpdateWidth_Click(object sender, RoutedEventArgs e) | ProgressRingPage | [inline]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/MockIRichAnimatedIconSource.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • TestUI

MockIRichAnimatedIconSource.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml.Controls;
00002 using System;
00003 using System.Collections.Generic;
00004 using Windows.UI;
00005 using Microsoft.UI.Composition;
00006 using Microsoft.UI.Xaml;
00007 using Controls_02_Hamburger = Microsoft.UI.Xaml.Controls.AnimatedVisuals.AnimatedGlobalNavigationButtonVisualSource;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     class MockIAnimatedIconSource2 : IAnimatedVisualSource2
00012     {
00013         Dictionary<string, double> markers = new Dictionary<string, double>();
00014
00015         IAnimatedVisualSource2 visual = new Controls_02_Hamburger();
00016         public MockIAnimatedIconSource2()
00017         {
00018             markers.Add("aTob_Start", 0.12345);
00019             markers.Add("aTob_End", 0.12345);
00020             markers.Add("bToc_Start", 0.12345);
00021             markers.Add("cTod_End", 0.12345);
00022             markers.Add("dToe", 0.12345);
00023             markers.Add("f", 0.12345);
00024         }
00025         public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics)
00026         {
00027             return visual.TryCreateAnimatedVisual(Microsoft.UI.Xaml.Media.CompositionTarget.GetCompositorForCurrentThread(), out diagnostics);
00028         }
00029
00030         public void SetColorProperty(string propertyName, Color value)
00031         {
00032             visual.SetColorProperty(propertyName, value);
00033         }
00034
00035         public IReadOnlyDictionary<string, double> Markers => markers;
00036     }
00037 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRingAutomationPeer.cpp Source File

  • File List
  • File Members
  • ProgressRing

ProgressRingAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "ProgressRing.h"
00008 #include "ProgressRingAutomationPeer.h"
00009 #include "Utils.h"
00010
00011 #include "ProgressRingAutomationPeer.properties.cpp"
00012
00013 ProgressRingAutomationPeer::ProgressRingAutomationPeer(winrt::ProgressRing const& owner)
00014     : ReferenceTracker(owner)
00015 {
00016 }
00017
00018 winrt::IInspectable ProgressRingAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00019 {
00020     if (patternInterface == winrt::PatternInterface::RangeValue)
00021     {
00022         if (GetImpl()->IsIndeterminate())
00023         {
00024             return nullptr;
00025         }
00026         else
00027         {
00028             return *this;
00029         }
00030     }
00031
00032     return __super::GetPatternCore(patternInterface);
00033 }
00034
00035 winrt::hstring ProgressRingAutomationPeer::GetClassNameCore()
00036 {
00037     return winrt::hstring_name_of<winrt::ProgressRing>();
00038 }
00039
00040 winrt::hstring ProgressRingAutomationPeer::GetNameCore()
00041 {
00042     //Check to see if the item has a defined AutomationProperties.Name
00043     winrt::hstring name = __super::GetNameCore();
00044
00045     if (auto progressRing = Owner().try_as<winrt::ProgressRing>())
00046     {
00047         if (progressRing.IsActive())
00048         {
00049             if (progressRing.IsIndeterminate())
00050             {
00051                 return winrt::hstring{ ResourceAccessor::GetLocalizedStringResource(SR_ProgressRingIndeterminateStatus) + L" " + name };
00052             }
00053             else
00054             {
00055                 return name;
00056             }
00057         }
00058     }
00059     return name;
00060 }
00061
00062 winrt::AutomationControlType ProgressRingAutomationPeer::GetAutomationControlTypeCore()
00063 {
00064     return winrt::AutomationControlType::ProgressBar;
00065 }
00066
00067 winrt::hstring ProgressRingAutomationPeer::GetLocalizedControlTypeCore()
00068 {
00069     return ResourceAccessor::GetLocalizedStringResource(SR_ProgressRingName);
00070 }
00071
00072 // IRangeValueProvider
00073 double ProgressRingAutomationPeer::Minimum()
00074 {
00075     return GetImpl()->Minimum();
00076 }
00077
00078 double ProgressRingAutomationPeer::Maximum()
00079 {
00080     return GetImpl()->Maximum();
00081 }
00082
00083 double ProgressRingAutomationPeer::Value()
00084 {
00085     return GetImpl()->Value();
00086 }
00087
00088 double ProgressRingAutomationPeer::SmallChange()
00089 {
00090     return std::numeric_limits<double>::quiet_NaN();
00091 }
00092
00093 double ProgressRingAutomationPeer::LargeChange()
00094 {
00095     return std::numeric_limits<double>::quiet_NaN();
00096 }
00097
00098 void ProgressRingAutomationPeer::SetValue(double value)
00099 {
00100     GetImpl()->Value(value);
00101 }
00102
00103 com_ptr<ProgressRing> ProgressRingAutomationPeer::GetImpl()
00104 {
00105     com_ptr<ProgressRing> impl = nullptr;
00106
00107     if (auto numberBox = Owner().try_as<winrt::ProgressRing>())
00108     {
00109         impl = winrt::get_self<ProgressRing>(numberBox)->get_strong();
00110     }
00111
00112     return impl;
00113 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/CustomProperty.cpp Source File

  • File List
  • File Members
  • Repeater

CustomProperty.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "CustomProperty.h"
00006
00007 CustomProperty::CustomProperty(
00008     winrt::hstring const& name,
00009     winrt::TypeName const& typeName,
00010     std::function<winrt::IInspectable(winrt::IInspectable const&)> getter,
00011     std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> setter)
00012 {
00013     m_name = name;
00014     m_typeName = typeName;
00015     m_getter = getter;
00016     m_setter = setter;
00017 }
00018
00019 bool CustomProperty::CanRead()
00020 {
00021     return m_getter != nullptr;
00022 }
00023
00024 bool CustomProperty::CanWrite()
00025 {
00026     return m_setter != nullptr;
00027 }
00028
00029 winrt::hstring CustomProperty::Name()
00030 {
00031     return m_name;
00032 }
00033
00034 winrt::TypeName CustomProperty::Type()
00035 {
00036     return m_typeName;
00037 }
00038
00039 winrt::IInspectable CustomProperty::GetValue(winrt::IInspectable const& target)
00040 {
00041     return m_getter(target);
00042 }
00043
00044 void CustomProperty::SetValue(winrt::IInspectable const& target, winrt::IInspectable const& value)
00045 {
00046     m_setter(target, value);
00047 }
00048
00049 winrt::IInspectable CustomProperty::GetIndexedValue(winrt::IInspectable const& target, winrt::IInspectable const& index)
00050 {
00051     throw winrt::hresult_not_implemented();
00052 }
00053
00054 void CustomProperty::SetIndexedValue(winrt::IInspectable const& target, winrt::IInspectable const& value, winrt::IInspectable const& index)
00055 {
00056     throw winrt::hresult_not_implemented();
00057 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterManipulationModePage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterManipulationModePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Input;
00009 using Microsoft.UI.Xaml.Navigation;
00010 using Microsoft.UI.Private.Controls;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     public sealed partial class ScrollPresenterManipulationModePage : TestPage
00015     {
00016         private List<string> fullLogs = new List<string>();
00017
00018         public ScrollPresenterManipulationModePage()
00019         {
00020             this.InitializeComponent();
00021
00022             scrollPresenter0.StateChanged += ScrollPresenter_StateChanged;
00023             scrollPresenter1.StateChanged += ScrollPresenter_StateChanged;
00024         }
00025
00026         ~ScrollPresenterManipulationModePage()
00027         {
00028         }
00029
00030         protected override void OnNavigatedFrom(NavigationEventArgs e)
00031         {
00032             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00033             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00034
00035             base.OnNavigatedFrom(e);
00036         }
00037
00038         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00039         {
00040             if (sender == scrollPresenter0)
00041                 txtScrollPresenter0State.Text = "scrollPresenter0 " + scrollPresenter0.State.ToString();
00042             else if (sender == scrollPresenter1)
00043                 txtScrollPresenter1State.Text = "scrollPresenter1 " + scrollPresenter1.State.ToString();
00044         }
00045
00046         private void CmbManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00047         {
00048             ComboBox cmb = sender as ComboBox;
00049             if (cmb == null)
00050                 return;
00051             switch (cmb.Name)
00052             {
00053                 case "cmbManipulationModeS1":
00054                     scrollPresenter1.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
00055                     break;
00056                 case "cmbManipulationModeSP1":
00057                     stackPanel1.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
00058                     break;
00059                 case "cmbManipulationModeS0":
00060                     scrollPresenter0.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
00061                     break;
00062                 case "cmbManipulationModeSP0":
00063                     stackPanel0.ManipulationMode = ManipulationModeFromIndex(cmb.SelectedIndex);
00064                     break;
00065             }
00066         }
00067
00068         private ManipulationModes ManipulationModeFromIndex(int index)
00069         {
00070             switch (index)
00071             {
00072                 case 0:
00073                     return ManipulationModes.System;
00074                 case 1:
00075                     return ManipulationModes.None;
00076                 case 2:
00077                     return ManipulationModes.TranslateX;
00078             }
00079             return ManipulationModes.All;
00080         }
00081
00082         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00083         {
00084             //Turn on info and verbose logging for the ScrollPresenter type:
00085             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00086
00087             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00088         }
00089
00090         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00091         {
00092             //Turn off info and verbose logging for the ScrollPresenter type:
00093             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00094
00095             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00096         }
00097
00098         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00099         {
00100             // Cut off the terminating new line.
00101             string msg = args.Message.Substring(0, args.Message.Length - 1);
00102             string senderName = string.Empty;
00103
00104             try
00105             {
00106                 FrameworkElement fe = sender as FrameworkElement;
00107
00108                 if (fe != null)
00109                 {
00110                     senderName = "s:" + fe.Name + ", ";
00111                 }
00112             }
00113             catch
00114             {
00115             }
00116
00117             if (args.IsVerboseLevel)
00118             {
00119                 this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
00120             }
00121             else
00122             {
00123                 this.fullLogs.Add("Info: " + senderName + "m:" + msg);
00124             }
00125         }
00126
00127         private void btnGetFullLog_Click(object sender, RoutedEventArgs e)
00128         {
00129             foreach (string log in this.fullLogs)
00130             {
00131                 this.cmbFullLog.Items.Add(log);
00132             }
00133         }
00134
00135         private void btnClearFullLog_Click(object sender, RoutedEventArgs e)
00136         {
00137             this.fullLogs.Clear();
00138             this.cmbFullLog.Items.Clear();
00139         }
00140     }
00141 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2WithCursor Member List

This is the complete list of members for WebView2WithCursor, including all inherited members.
WrappedProtectedCursor WebView2WithCursor
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicBrushPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI

AcrylicBrushPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Threading;
00007 using System.Threading.Tasks;
00008 using Windows.Foundation.Metadata;
00009 using Windows.UI;
00010 using Microsoft.UI.Composition;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Automation;
00013 using Microsoft.UI.Xaml.Automation.Peers;
00014 using Microsoft.UI.Xaml.Controls;
00015 using Microsoft.UI.Xaml.Hosting;
00016 using Microsoft.UI.Xaml.Media;
00017 using Microsoft.UI.Xaml.Media.Animation;
00018 using Microsoft.UI.Xaml.Navigation;
00019 using Microsoft.UI.Private.Media;
00020 using MUXControlsTestApp.Utilities;
00021
00022 namespace MUXControlsTestApp
00023 {
00024     public sealed partial class AcrylicBrushPage : TestPage
00025     {
00026         AcrylicBrush _acrylicBrush;
00027         AcrylicTestApi _acrylicTestApi;
00028         int _iteration_TintTransitionDuration;
00029
00030         public AcrylicBrushPage()
00031         {
00032             this.InitializeComponent();
00033
00034             AutomationProperties.SetName(this, "AcrylicBrushPage");
00035             AutomationProperties.SetAutomationId(this, "AcrylicBrushPage");
00036
00037             _acrylicBrush = new AcrylicBrush {
00038                 FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0x0, 0xFF),
00039                 TintOpacity = TintOpacity.Value
00040             };
00041
00042             _acrylicTestApi = new AcrylicTestApi();
00043
00044             _iteration_TintTransitionDuration = 0;
00045         }
00046
00047         protected override void OnNavigatedTo(NavigationEventArgs e)
00048         {
00049             base.OnNavigatedTo(e);
00050
00051             // The app will notify the InteractionTest (AcrylicBrushTests.HideAndShowWindow) when
00052             // Xaml window visibility changes since these events are not available through UIA / Mita.
00053             App.CurrentWindow.VisibilityChanged += XamlWindow_VisibilityChanged;
00054         }
00055
00056         protected override void OnNavigatedFrom(NavigationEventArgs e)
00057         {
00058             base.OnNavigatedFrom(e);
00059
00060             App.CurrentWindow.VisibilityChanged -= XamlWindow_VisibilityChanged;
00061         }
00062
00063         protected override AutomationPeer OnCreateAutomationPeer()
00064         {
00065             return new FrameworkElementAutomationPeer(this);
00066         }
00067
00068         private void TintColorButton_Checked(object sender, RoutedEventArgs e)
00069         {
00070             var colorPicker = new ColorPicker();
00071             colorPicker.ColorChanged += ColorPicker_ColorChanged;
00072             colorPicker.Color = _acrylicBrush.TintColor;
00073             Viewbox.Child = colorPicker;
00074         }
00075
00076         private void TintColorButton_Unchecked(object sender, RoutedEventArgs e)
00077         {
00078             Viewbox.Child = null;
00079         }
00080
00081         private void FallbackColorButton_Checked(object sender, RoutedEventArgs e)
00082         {
00083             _acrylicBrush.FallbackColor = Microsoft.UI.ColorHelper.FromArgb(255, 255, 100, 0);
00084         }
00085
00086         private void FallbackColorButton_Unchecked(object sender, RoutedEventArgs e)
00087         {
00088             _acrylicBrush.FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xE6, 0xE6, 0xE6); // Default
00089         }
00090
00091         private void AlwaysUseFallbackButton_Checked(object sender, RoutedEventArgs e)
00092         {
00093             _acrylicBrush.AlwaysUseFallback = true;
00094         }
00095
00096         private void AlwaysUseFallbackButton_Unchecked(object sender, RoutedEventArgs e)
00097         {
00098             _acrylicBrush.AlwaysUseFallback = false;
00099         }
00100
00101         private void TintOpacity_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
00102         {
00103             if (_acrylicBrush != null)
00104             {
00105                 _acrylicBrush.TintOpacity = TintOpacity.Value;
00106             }
00107         }
00108
00109         private void TintLuminosityOpacity_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
00110         {
00111             if (_acrylicBrush != null)
00112             {
00113                 _acrylicBrush.TintLuminosityOpacity = TintLuminosityOpacity.Value;
00114             }
00115         }
00116
00117         private void AutoTintLuminosityOpacity_IsCheckedChanged(object sender, RoutedEventArgs e)
00118         {
00119             TintLuminosityOpacity.IsEnabled = AutoTintLuminosityOpacity.IsChecked != true;
00120
00121             if (_acrylicBrush != null)
00122             {
00123                 _acrylicBrush.TintLuminosityOpacity = TintLuminosityOpacity.IsEnabled ? TintLuminosityOpacity.Value : (double?)null;
00124             }
00125         }
00126
00127         private void AnimateBackgroundButton_Checked(object sender, RoutedEventArgs e)
00128         {
00129             var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);
00130
00131             var animation = visual.Compositor.CreateScalarKeyFrameAnimation();
00132             animation.InsertExpressionKeyFrame(0.25f, "this.StartingValue - 200", visual.Compositor.CreateLinearEasingFunction());
00133             animation.InsertExpressionKeyFrame(0.75f, "this.StartingValue + 200", visual.Compositor.CreateLinearEasingFunction());
00134             animation.InsertExpressionKeyFrame(1.0f, "this.StartingValue", visual.Compositor.CreateLinearEasingFunction());
00135             animation.Duration = TimeSpan.FromSeconds(10);
00136             animation.IterationBehavior = Microsoft.UI.Composition.AnimationIterationBehavior.Forever;
00137             visual.StartAnimation("Offset.X", animation);
00138         }
00139
00140         private void AnimateBackgroundButton_Unchecked(object sender, RoutedEventArgs e)
00141         {
00142             var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);
00143             visual.Offset = new System.Numerics.Vector3(0, 0, 0);
00144         }
00145
00146         private void ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args)
00147         {
00148             _acrylicBrush.TintColor = args.NewColor;
00149         }
00150
00151         private void RunTestButton_Clicked(object sender, RoutedEventArgs e)
00152         {
00153             var selectedText = TestNameComboBox.GetSelectedText();
00154
00155             // This group of tests is separate as it requires manual control of MaterialSetupHelper flags
00156             switch (selectedText)
00157             {
00158                 case "AcrylicAlwaysUseFallback": RunAcrylicAlwaysUseFallback(); return;
00159             }
00160
00161             using (var setup = new MaterialSetupHelper())
00162             {
00163                 switch (selectedText)
00164                 {
00165                     case "BasicAcrylicOnRectangle": RunBasicAcrylicOnRectangle(); break;
00166                     case "AcrylicPropertyChanges": RunAcrylicPropertyChanges(); break;
00167                     case "VerifyDisconnectedState": RunVerifyDisconnectedState(); break;
00168                     case "AcrylicCreatedInFallbackMode": RunAcrylicCreatedInFallbackMode(); break;
00169                     case "VerifyOpaqueTintOptimization": RunVerifyOpaqueTintOptimization(); break;
00170                     case "TintTransitionDuration": RunTintTransitionDuration(); break;
00171                     case "AcrylicNoiseCache": RunAcrylicNoiseCache(); break;
00172                     case "VerifyAcrylicBrushEffect": RunVerifyAcrylicBrushEffect(); break;
00173                 }
00174             }
00175         }
00176
00177         void RunBasicAcrylicOnRectangle()
00178         {
00179             // Now that AB has entered the live tree, we can validate that it's backed by an EffectBrush
00180             // Unfortunately at this point we lack COMP API's to walk + validate the effect graph.
00181             SetAcrylicBrush();
00182             bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
00183             var compositionBrush = UpdateCompositionBrush();
00184             var noiseBrush = UpdateNoiseBrush();
00185
00186             bool result = false;
00187             if (isUsingAcrylicBrush)
00188             {
00189                 // For AcrylicBrush, validate we're using a WUC effect brush and noise is present
00190                 result = ((compositionBrush != null && compositionBrush is CompositionEffectBrush) &&
00191                           (noiseBrush != null && noiseBrush is CompositionSurfaceBrush));
00192             }
00193             else
00194             {
00195                 // For Fallback case, validate we have a WUC color brush with the right color
00196                 //TestResult.Text = "FallbackCase: Start";
00197                 CompositionColorBrush myColorBrush = compositionBrush as CompositionColorBrush;
00198                 result = myColorBrush.Color.Equals(_acrylicBrush.FallbackColor);
00199                 //TestResult.Text = "FallbackCase: (" + myColorBrush.Color.A.ToString() + ", " + myColorBrush.Color.R + ", " + myColorBrush.Color.G + ", " + myColorBrush.Color.B + ")";
00200             }
00201
00202             TestResult.Text = "BasicAcrylicOnRectangle: " + (result ? "Passed" : "Failed");
00203         }
00204
00205         // >> Test changes to TintOpacity, TintColor and Fallback Color
00206         //    recreate or reuse exsiting AcrylicBursh as expected.
00207         // >> Also covers AcrylicBrush sharing and rendering in SW-rasterized element (Ellipse)
00208         void RunAcrylicPropertyChanges()
00209         {
00210             AcrylicBrush acrylicBrush1 = new AcrylicBrush {
00211                 FallbackColor = Microsoft.UI.Colors.Blue,
00212                 TintColor = Microsoft.UI.Colors.Green,
00213                 TintOpacity = 0.1
00214             };
00215
00216             AcrylicBrush acrylicBrush2 = new AcrylicBrush {
00217                 FallbackColor = Microsoft.UI.Colors.Blue,
00218                 TintColor = Microsoft.UI.Colors.Bisque,
00219                 TintOpacity = 0.8
00220             };
00221
00222             // Add Ellipse with Acrylic Fill and Stroke
00223             Ellipse1.Visibility = Visibility.Visible;
00224             Ellipse1.Fill = acrylicBrush1;
00225             Ellipse1.Stroke = acrylicBrush2;
00226
00227             // Reuse Ellipse's brush in Rectangle
00228             Rectangle1.Fill = acrylicBrush2;
00229
00230             _acrylicTestApi.AcrylicBrush = acrylicBrush1;
00231             if (_acrylicTestApi.IsUsingAcrylicBrush == false)
00232             {
00233                 TestResult.Text = "VerifyOpaqueTintOptimization: Skipped";
00234                 return;
00235             }
00236
00237             bool[] results = { false, false, false};
00238
00239             _acrylicTestApi.AcrylicBrush = acrylicBrush1;
00240             results[0] = VerifyAcrylic();
00241
00242             // Update Tint - should not recreate brush
00243             _acrylicTestApi.AcrylicBrush = acrylicBrush1;
00244             CompositionBrush originalAcrylicBrush = UpdateCompositionBrush();
00245             acrylicBrush1.TintColor = Microsoft.UI.Colors.DeepSkyBlue;
00246             CompositionBrush updatedAcrylicBrush1 = UpdateCompositionBrush();
00247             results[1] = VerifyAcrylic() && Object.ReferenceEquals(originalAcrylicBrush, updatedAcrylicBrush1);
00248
00249             // Update TintOpacity - should not recreate brush
00250             acrylicBrush1.TintOpacity = 0.123456789;
00251             CompositionBrush updatedAcrylicBrush2 = UpdateCompositionBrush();
00252             results[2] = VerifyAcrylic() && Object.ReferenceEquals(originalAcrylicBrush, updatedAcrylicBrush2);
00253
00254             bool result = results[0] && results[1] && results[2];
00255             string resultString = System.String.Format("({0},{1},{2})", results[0], results[1], results[2]);
00256
00257             TestResult.Text = "AcrylicPropertyChanges: " + (result ? "Passed" : ("Failed " + resultString));
00258         }
00259
00260         // Test AlwaysUseFallback property
00261         void RunAcrylicAlwaysUseFallback()
00262         {
00263             // Need to set override flags here manually since we don't want to
00264             // unset them until worker thread actions are complete
00265             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00266             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00267             SetAcrylicBrush();
00268
00269             // Run these tests off-thread as they need to poll for brush status changes that are deferred by transition animations.
00270             Task.Run(async () =>
00271             {
00272                 // If we are in fallback mode already due to policy, skip the test
00273                 if (await VerifyAcrylicWithPolling())
00274                 {
00275                     bool[] results = { false, false, false, false };
00276
00277                     RunOnUIThread.Execute(() =>
00278                     {
00279                         // Set AlwaysUseFallback, verify we are using the expected fallback color
00280                         _acrylicBrush.AlwaysUseFallback = true;
00281                     });
00282                     results[0] = await VerifyFallbackColorWithPolling();
00283
00284                     RunOnUIThread.Execute(() =>
00285                     {
00286                         // Change fallback color while in fallback, veryify fallback brush is updated
00287                         _acrylicBrush.FallbackColor = Microsoft.UI.Colors.Purple;
00288                     });
00289                     results[1] = await VerifyFallbackColorWithPolling();
00290
00291                     RunOnUIThread.Execute(() =>
00292                     {
00293                         // Unset AlwaysUseFallback, verify we are using acrylic again
00294                         _acrylicBrush.AlwaysUseFallback = false;
00295                     });
00296                     results[2] = await VerifyAcrylicWithPolling();
00297
00298                     RunOnUIThread.Execute(() =>
00299                     {
00300                         // Change fallback color while not in fallback, then force fallback and verify color
00301                         _acrylicBrush.FallbackColor = Microsoft.UI.Colors.Orange;
00302                         _acrylicBrush.AlwaysUseFallback = true;
00303                     });
00304                     results[3] = await VerifyFallbackColorWithPolling();
00305
00306                     bool result = results[0] && results[1] && results[2] && results[3];
00307                     string resultString = System.String.Format("({0},{1},{2},{3})", results[0], results[1], results[2], results[3]);
00308
00309                     RunOnUIThread.Execute(() =>
00310                     {
00311                         // Unset all override flags to avoid impacting subsequent tests
00312                         MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00313                         MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00314
00315                         TestResult.Text = "AcrylicAlwaysUseFallback: " + (result ? "Passed" : ("Failed " + resultString));
00316                     });
00317                 }
00318                 else
00319                 {
00320                     RunOnUIThread.Execute(() =>
00321                     {
00322                         // Unset all override flags to avoid impacting subsequent tests
00323                         MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00324                         MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00325
00326                         TestResult.Text = "AcrylicAlwaysUseFallback: Skipped";
00327                     });
00328                 }
00329             });
00330         }
00331
00332         // In non fallback mode, we have crossfading and non crossfading effects.
00333         // crossfading only last for hundren ms in the transition between fallback mode and acrylic mode.
00334         //
00335         void RunVerifyAcrylicBrushEffect()
00336         {
00337             bool[] results = { false, false };
00338
00339             AcrylicBrush acrylicBrush1 = new AcrylicBrush {
00340                 FallbackColor = Microsoft.UI.Colors.Blue,
00341                 TintColor = Microsoft.UI.Colors.Green,
00342                 TintOpacity = 0.1
00343             };
00344
00345             // Add Ellipse with Acrylic Fill and Stroke
00346             Ellipse1.Visibility = Visibility.Visible;
00347             Ellipse1.Fill = acrylicBrush1;
00348
00349             _acrylicTestApi.AcrylicBrush = acrylicBrush1;
00350
00351             // Force to create a AcrylicBrush which is used for animation. So it's a CrosssFading effect brush
00352             _acrylicTestApi.ForceCreateAcrylicBrush(true /*useCrossFadeEffect*/);
00353
00354             var fallbackColor = Microsoft.UI.Colors.Black;
00355             var tintColor = Microsoft.UI.Colors.Black;
00356
00357             // Get FallbackColor and TintColor. Only CrossFading effect brush provides animation properties for both and TryGetColor success.
00358             CompositionGetValueStatus fallbackColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("FallbackColor.Color", out fallbackColor);
00359             CompositionGetValueStatus tintColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("TintColor.Color", out tintColor);
00360
00361             // Luminosity impacts the effective tint value, so don't validate it here.
00362             results[0] = tintColorValueStatus != CompositionGetValueStatus.NotFound &&
00363                          fallbackColorValueStatus != CompositionGetValueStatus.NotFound &&
00364                          fallbackColor == acrylicBrush1.FallbackColor;
00365
00366             // Force to create a non crosssFading effect brush
00367             _acrylicTestApi.ForceCreateAcrylicBrush(false /*useCrossFadeEffect*/);
00368
00369             fallbackColor = Microsoft.UI.Colors.Black;
00370             tintColor = Microsoft.UI.Colors.Black;
00371
00372             // Get FallbackColor and TintColor. Non CrossFading effect brush doesn't provide FallbackColor.Color.
00373             fallbackColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("FallbackColor.Color", out fallbackColor);
00374             tintColorValueStatus = _acrylicTestApi.CompositionBrush.Properties.TryGetColor("TintColor.Color", out tintColor);
00375
00376             // Luminosity impacts the effective tint value, so don't validate it here.
00377             results[1] = fallbackColorValueStatus == CompositionGetValueStatus.NotFound;
00378
00379             bool result = results[0] && results[1];
00380             string resultString = System.String.Format("({0},{1})", results[0], results[1]);
00381             TestResult.Text = "VerifyAcrylicBrushEffect: " + (result ? "Passed" : ("Failed " + resultString));
00382         }
00383
00384         // Test in-app and window acrylic created while in fallback mode
00385         void RunAcrylicCreatedInFallbackMode()
00386         {
00387             using (var setup = new MaterialSetupHelper(true /* ignoreAreEffectsFast*/, true /* simulateDisabledByPolicy */ ))
00388             {
00389                 // Test app acrylic
00390                 _acrylicBrush = new AcrylicBrush {
00391                     FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0x0, 0xFF),
00392                     TintOpacity = TintOpacity.Value
00393                 };
00394
00395                 _acrylicTestApi.AcrylicBrush = _acrylicBrush;
00396
00397                 Rectangle1.Fill = _acrylicBrush;
00398                 bool result1 = VerifyFallbackColor();
00399
00400                 // Test window acrylic
00401                 _acrylicBrush = new AcrylicBrush {
00402                     FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0xFF, 0xFF),
00403                     TintOpacity = TintOpacity.Value
00404                 };
00405                 _acrylicTestApi.AcrylicBrush = _acrylicBrush;
00406
00407                 Rectangle1.Fill = _acrylicBrush;
00408                 bool result2 = VerifyFallbackColor();
00409
00410                 TestResult.Text = "AcrylicCreatedInFallbackMode: " + (result1 && result2 ? "Passed" : "Failed ");
00411             }
00412         }
00413
00414         // Test adding an AcrylicBrush, animating the affected element, and then removing the brush
00415         void RunVerifyDisconnectedState()
00416         {
00417             _acrylicBrush = new AcrylicBrush {
00418                 FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x0, 0x0, 0xFF),
00419                 TintOpacity = TintOpacity.Value
00420             };
00421             _acrylicTestApi.AcrylicBrush = _acrylicBrush;
00422             Rectangle1.Fill = _acrylicBrush;
00423
00424             if (_acrylicTestApi.IsUsingAcrylicBrush == false)
00425             {
00426                 TestResult.Text = "VerifyDisconnectedState: Skipped";
00427                 return;
00428             }
00429
00430             DoubleAnimation positionAnimation = new DoubleAnimation();
00431             positionAnimation.By = 100;
00432             positionAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 200));
00433             Storyboard.SetTarget(positionAnimation, MyTranslateTransform);
00434             Storyboard.SetTargetProperty(positionAnimation, "X");
00435             Storyboard sb = new Storyboard();
00436             sb.Children.Add(positionAnimation);
00437             sb.Completed += RunVerifyDisconnectedState_AnimationCompleted;
00438             sb.Begin();
00439         }
00440
00441         private void RunVerifyDisconnectedState_AnimationCompleted(object sender, object e)
00442         {
00443             Rectangle1.Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple);
00444             bool result = VerifyDisconnected();
00445
00446             TestResult.Text = "VerifyDisconnectedState: " + (result ? "Passed" : "Failed ");
00447         }
00448
00449         // Test adding an AcrylicBrush and switching its tint transparency status
00450         // to validate that we use optimized opaque tint effect chain
00451         void RunVerifyOpaqueTintOptimization()
00452         {
00453             // Start out with transparent tint
00454             _acrylicBrush = new AcrylicBrush {
00455                 FallbackColor = Microsoft.UI.Colors.Blue,
00456                 TintColor = Microsoft.UI.Colors.Green,
00457                 TintOpacity = 0.1
00458             };
00459             _acrylicTestApi.AcrylicBrush = _acrylicBrush;
00460             Rectangle1.Fill = _acrylicBrush;
00461
00462             if (_acrylicTestApi.IsUsingAcrylicBrush == false)
00463             {
00464                 TestResult.Text = "VerifyOpaqueTintOptimization: Skipped";
00465                 return;
00466             }
00467
00468             bool[] results = { false, false, false, false };
00469
00470             CompositionBrush originalTransparentBrush = UpdateCompositionBrush();
00471             results[0] = VerifyAcrylic();
00472
00473             // Switch to opaque tint
00474             _acrylicBrush.TintOpacity = 1.0;
00475             CompositionBrush updatedOpaqueBrush = UpdateCompositionBrush();
00476             results[1] = VerifyAcrylic();
00477
00478             // Switch back to transparent tint
00479             _acrylicBrush.TintOpacity = 0.1;
00480             CompositionBrush updatedTransapentBrush = UpdateCompositionBrush();
00481             results[2] = VerifyAcrylic();
00482
00483             // Make a new brush got created in each case
00484             results[3] =
00485                 !Object.ReferenceEquals(originalTransparentBrush, updatedOpaqueBrush) &&
00486                 !Object.ReferenceEquals(originalTransparentBrush, updatedTransapentBrush) &&
00487                 !Object.ReferenceEquals(updatedOpaqueBrush, updatedTransapentBrush);
00488
00489             bool result = results[0] && results[1] && results[2] && results[3];
00490             string resultString = System.String.Format("({0},{1},{2},{3})", results[0], results[1], results[2], results[3]);
00491
00492             TestResult.Text = "VerifyOpaqueTintOptimization: " + (result ? "Passed" : ("Failed " + resultString));
00493         }
00494
00495         void RunTintTransitionDuration()
00496         {
00497             int durationMS = 0;
00498
00499             if (_iteration_TintTransitionDuration == 0) { durationMS = 0; }
00500             else if (_iteration_TintTransitionDuration == 1) { durationMS = 500; }
00501             else if (_iteration_TintTransitionDuration == 2) { durationMS = 999; }
00502
00503             _iteration_TintTransitionDuration++;
00504
00505             _acrylicBrush = new AcrylicBrush {
00506                 FallbackColor = Microsoft.UI.Colors.Blue,
00507                 TintColor = Microsoft.UI.Colors.Green,
00508                 TintOpacity = 0.8
00509             };
00510             _acrylicTestApi.AcrylicBrush = _acrylicBrush;
00511             Rectangle1.Fill = _acrylicBrush;
00512
00513             _acrylicBrush.TintTransitionDuration = new TimeSpan(0, 0, 0, 0, durationMS);
00514             _acrylicBrush.TintColor = Microsoft.UI.Colors.DarkOrange;
00515         }
00516
00517         // Test noise cache is functional:
00518         // 1. Validate two AcrylicBrushes both use the same noise
00519         // 2. Validate destroying these AB's and creating a new one still use the same noise.
00520         void RunAcrylicNoiseCache()
00521         {
00522             AcrylicBrush acrylicBrush1 = new AcrylicBrush {
00523                 FallbackColor = Microsoft.UI.Colors.Blue,
00524                 TintColor = Microsoft.UI.Colors.Green,
00525                 TintOpacity = 0.1
00526             };
00527
00528             AcrylicBrush acrylicBrush2 = new AcrylicBrush {
00529                 FallbackColor = Microsoft.UI.Colors.Blue,
00530                 TintColor = Microsoft.UI.Colors.Bisque,
00531                 TintOpacity = 1
00532             };
00533
00534             Rectangle1.Fill = acrylicBrush1;
00535             _acrylicTestApi.AcrylicBrush = acrylicBrush1;
00536             CompositionBrush noiseBrush1 = UpdateNoiseBrush();
00537
00538             if (_acrylicTestApi.IsUsingAcrylicBrush == false)
00539             {
00540                 TestResult.Text = "AcrylicNoiseCache: Skipped";
00541                 return;
00542             }
00543
00544             Rectangle1.Stroke = acrylicBrush2;
00545             _acrylicTestApi.AcrylicBrush = acrylicBrush2;
00546             CompositionBrush noiseBrush2 = UpdateNoiseBrush();
00547
00548             // Make sure two brushes conccurrently in tree use the same noise
00549             bool result1 = Object.ReferenceEquals(noiseBrush1, noiseBrush2);
00550
00551             // Destroy existing brushes
00552             Rectangle1.Fill = new SolidColorBrush(Microsoft.UI.Colors.PaleGoldenrod);
00553             Rectangle1.Stroke = new SolidColorBrush(Microsoft.UI.Colors.PaleGoldenrod);
00554             acrylicBrush1 = null;
00555             acrylicBrush2 = null;
00556             _acrylicTestApi.AcrylicBrush = null;
00557             GC.Collect();
00558
00559             AcrylicBrush acrylicBrush3 = new AcrylicBrush {
00560                 FallbackColor = Microsoft.UI.Colors.Blue,
00561                 TintColor = Microsoft.UI.Colors.DarkOliveGreen,
00562                 TintOpacity = 0.25
00563             };
00564
00565             Rectangle1.Fill = acrylicBrush3;
00566             _acrylicTestApi.AcrylicBrush = acrylicBrush3;
00567             CompositionBrush noiseBrush3 = UpdateNoiseBrush();
00568
00569             // Make sure new brush still uses the same noise
00570             bool result2 = Object.ReferenceEquals(noiseBrush2, noiseBrush3);
00571
00572             bool result = result1 && result2;
00573             string resultString = System.String.Format("({0},{1})", result1, result2);
00574
00575             TestResult.Text = "AcrylicNoiseCache: " + (result ? "Passed" : ("Failed " + resultString));
00576         }
00577
00578         bool VerifyDisconnected()
00579         {
00580             bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
00581             var compositionBrush = UpdateCompositionBrush();
00582             var noiseBrush = UpdateNoiseBrush();
00583             return !isUsingAcrylicBrush &&
00584                     compositionBrush == null &&
00585                     noiseBrush == null;     // Noise is cached in MaterialHelper but not in individual brushes
00586         }
00587
00588         bool VerifyAcrylic()
00589         {
00590             bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
00591             var compositionBrush = UpdateCompositionBrush();
00592             var noiseBrush = UpdateNoiseBrush();
00593             return isUsingAcrylicBrush &&
00594                    (compositionBrush != null && compositionBrush is CompositionEffectBrush) &&
00595                    (noiseBrush != null && noiseBrush is CompositionSurfaceBrush);
00596         }
00597
00598         bool VerifyFallbackColor()
00599         {
00600             bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
00601             var compositionBrush = UpdateCompositionBrush();
00602             return !isUsingAcrylicBrush &&
00603                    (compositionBrush != null && compositionBrush is CompositionColorBrush) &&
00604                    (compositionBrush as CompositionColorBrush).Color.Equals(_acrylicBrush.FallbackColor);
00605         }
00606
00607         // Poll for up to 1 sec for underlyig WUC brush to become a CompositionColorBrush using the FallbackColor.
00608         // This is needed because fallback <-> acrylic changes (and color changes in the fallback brush, if it is in use)
00609         // are delayed until transition animations are completed.
00610         // Since XCBB.CompositionBrush is not a DependencyProperty, we can't get a property change notification.
00611         private async Task PollForFallbackBrush()
00612         {
00613             await Task.Run(async () =>
00614             {
00615                 for (int i = 0; i < 5; i++)
00616                 {
00617                     bool hasFallbackBrush = false;
00618                     RunOnUIThread.Execute(() =>
00619                     {
00620                         CompositionColorBrush polledBrushAsColorBrush = _acrylicTestApi.CompositionBrush as CompositionColorBrush;
00621                         hasFallbackBrush = polledBrushAsColorBrush != null && polledBrushAsColorBrush.Color.Equals(_acrylicBrush.FallbackColor);
00622                     });
00623                     if (hasFallbackBrush) { break; }
00624
00625                     await Task.Delay(200);
00626                 }
00627             });
00628         }
00629
00630         // Poll for up to 1 sec for underlyig WUC brush to become a CompositonEffectBrush.
00631         // This is needed because fallback <-> acrylic changes are delayed until transition animations are completed.
00632         // Since XCBB.CompositionBrush is not a DependencyProperty, we can't get a property change notification.
00633         private async Task PollForEffectBrush()
00634         {
00635             await Task.Run(async () =>
00636             {
00637                 for (int i = 0; i < 5; i++)
00638                 {
00639                     bool hasEffectBrush = false;
00640                     RunOnUIThread.Execute(() =>
00641                     {
00642                         CompositionEffectBrush polledBrushsAEffectBrush = _acrylicTestApi.CompositionBrush as CompositionEffectBrush;
00643                         hasEffectBrush = polledBrushsAEffectBrush != null;
00644                     });
00645                     if (hasEffectBrush) { break; }
00646
00647                     await Task.Delay(200);
00648                 }
00649             });
00650         }
00651         private async Task<bool> VerifyAcrylicWithPolling()
00652         {
00653             await PollForEffectBrush();
00654
00655             bool result = false;
00656             RunOnUIThread.Execute(() =>
00657             {
00658                 result = VerifyAcrylic();
00659             });
00660
00661             return result;
00662         }
00663
00664         private async Task<bool> VerifyFallbackColorWithPolling()
00665         {
00666             await PollForFallbackBrush();
00667
00668             bool result = false;
00669             RunOnUIThread.Execute(() =>
00670             {
00671                 result = VerifyFallbackColor();
00672             });
00673
00674             return result;
00675         }
00676
00677         // We use UIA AutopmationEvents to send notifications about Window Visisbility changes,
00678         // since there are no direct events for this exposed directly in UIA / Mita.
00679         // Also, here isn't a custom AutomationEvent type, so use an existing event type - AsyncContentLoaded.
00680         // The InteractionTest expects it to fire in a specific pattern and hence extracts its own meaning
00681         // from each firing of the event.
00682         private void XamlWindow_VisibilityChanged(object sender, Microsoft.UI.Xaml.WindowVisibilityChangedEventArgs e)
00683         {
00684             var automationPeer = FrameworkElementAutomationPeer.FromElement(this);
00685             automationPeer.RaiseAutomationEvent(AutomationEvents.AsyncContentLoaded);
00686         }
00687
00688         private void SetAcrylicBrush()
00689         {
00690             Rectangle1.Fill = _acrylicBrush;
00691             _acrylicTestApi.AcrylicBrush = _acrylicBrush;
00692         }
00693
00694         private void UpdateSharedState()
00695         {
00696             UpdateIsUsingAcrylicBrush();
00697             UpdateCompositionBrush();
00698             UpdateNoiseBrush();
00699         }
00700
00701         private CompositionBrush UpdateCompositionBrush()
00702         {
00703             CompositionBrush result = null;
00704             if (_acrylicTestApi.AcrylicBrush != null)
00705             {
00706                 result = _acrylicTestApi.CompositionBrush;
00707
00708                 // ToString() here will log the type of the brush - useful to check whether we are in fallback mode
00709                 CompositionBrushPointer.Text = (result == null) ? "null" : result.ToString();
00710             }
00711             return result;
00712         }
00713
00714         private CompositionBrush UpdateNoiseBrush()
00715         {
00716             CompositionBrush result = null;
00717             if (_acrylicTestApi.AcrylicBrush != null)
00718             {
00719                 result = _acrylicTestApi.NoiseBrush;
00720                 NoiseBrushPointer.Text = (result == null) ? "null" : result.ToString();
00721             }
00722             return result;
00723         }
00724
00725         private bool UpdateIsUsingAcrylicBrush()
00726         {
00727             bool result = _acrylicTestApi.IsUsingAcrylicBrush;
00728             IsUsingAcrylicBrush.Text = result.ToString();
00729             return result;
00730         }
00731
00732         private void UpdateStateButton_Click(object sender, RoutedEventArgs e)
00733         {
00734             UpdateSharedState();
00735         }
00736
00737         private class WrapperEffectBrush : XamlCompositionBrushBase
00738         {
00739             public WrapperEffectBrush(CompositionEffectBrush brush)
00740             {
00741                 this.CompositionBrush = brush;
00742             }
00743         }
00744
00745         private void SetAcrylicBrushButton_Click(object sender, RoutedEventArgs e)
00746         {
00747             SetAcrylicBrush();
00748         }
00749
00750         private void Overlay_PointerPressed(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
00751         {
00752             Overlay.Background = null;
00753         }
00754     }
00755 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ActivityFeedSamplePage Member List

This is the complete list of members for ActivityFeedSamplePage, including all inherited members.
ActivityFeedSamplePage() ActivityFeedSamplePage [inline]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewDragItemsStartingEventArgs Member List

This is the complete list of members for TreeViewDragItemsStartingEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
Cancel() const | TreeViewDragItemsStartingEventArgs |
Cancel(const bool value) | TreeViewDragItemsStartingEventArgs |
CheckThread() | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
Data() const | TreeViewDragItemsStartingEventArgs |
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewDragItemsStartingEventArgs > &&self) noexcept | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< TreeViewDragItemsStartingEventArgs > &&self) | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
Items() | TreeViewDragItemsStartingEventArgs |
m_dragItemsStartingEventArgs | TreeViewDragItemsStartingEventArgs | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable > | [inline]
TreeViewDragItemsStartingEventArgs(const winrt::DragItemsStartingEventArgs &args) | TreeViewDragItemsStartingEventArgs |
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewListAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

TreeViewListAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TreeViewListAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TreeViewListAutomationPeer)
00012 }
00013
00014 #include "TreeViewListAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/NavigationViewTopNavStorePage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • TopMode

NavigationViewTopNavStorePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Navigation;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Generic;
00008 using Windows.ApplicationModel.Core;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Private.Media;
00012 using System.Text;
00013 using Common;
00014 using Microsoft.UI.Xaml.Automation;
00015 using MUXControlsTestApp.Utilities;
00016 using Windows.UI.Core;
00017
00018 namespace MUXControlsTestApp
00019 {
00020
00021     public sealed partial class NavigationViewTopNavStorePage : TestPage
00022     {
00023         ObservableCollection<NavigationViewItemBase> m_menuItems;
00024         private TextBlock contentOverlay = null;
00025         private int currentSelectedItem = 0;
00026         private int suppressSelectionNextNumber = 0;
00027
00028         public NavigationViewTopNavStorePage()
00029         {
00030             this.InitializeComponent();
00031
00032             App.Current.FocusVisualKind = FocusVisualKind.Reveal;
00033
00034             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00035             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00036
00037             m_menuItems = new ObservableCollection<NavigationViewItemBase>();
00038
00039             m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 1" });
00040             m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 2" });
00041             m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 3" });
00042             m_menuItems.Add(new NavigationViewItemSeparator());
00043             m_menuItems.Add(new NavigationViewItem() { Content = "Menu Item 4" });
00044
00045             NavView.MenuItemsSource = m_menuItems;
00046             NavView.SelectedItem = m_menuItems[currentSelectedItem];
00047
00048             NavViewIsTitleBarAutoPaddingEnabled.Text = NavView.IsTitleBarAutoPaddingEnabled.ToString();
00049         }
00050
00051         protected override void OnNavigatedFrom(NavigationEventArgs e)
00052         {
00053             // Unset all override flags to avoid impacting subsequent tests
00054             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00055             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00056             base.OnNavigatedFrom(e);
00057         }
00058
00059         private void AddButton_Click(object sender, RoutedEventArgs e)
00060         {
00061             m_menuItems.Add(new NavigationViewItem() { Content = "New Menu Item" });
00062         }
00063
00064         private void AddButtonSuppressSelection_Click(object sender, RoutedEventArgs e)
00065         {
00066             var newItem = new NavigationViewItem() { Content = "New Menu Item S.S", SelectsOnInvoked = false };
00067             AutomationProperties.SetAutomationId(newItem, "sup-selection-nav-item-" + suppressSelectionNextNumber);
00068             m_menuItems.Add(newItem);
00069             suppressSelectionNextNumber++;
00070         }
00071
00072         private void RemoveButton_Click(object sender, RoutedEventArgs e)
00073         {
00074             if (m_menuItems.Count > 0)
00075             {
00076                 m_menuItems.RemoveAt(m_menuItems.Count - 1);
00077             }
00078         }
00079
00080         private void ChangeToIEnumerableButton_Clicks(object sender, RoutedEventArgs e)
00081         {
00082             var newMenuItems = new LinkedList<string>();
00083             newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 1");
00084             newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 2");
00085             newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 3");
00086
00087             NavView.MenuItemsSource = newMenuItems;
00088         }
00089
00090         private void FlipIsTitleBarAutoPaddingEnabledButton_Click(object sender, RoutedEventArgs e)
00091         {
00092             NavView.IsTitleBarAutoPaddingEnabled = !NavView.IsTitleBarAutoPaddingEnabled;
00093             NavViewIsTitleBarAutoPaddingEnabled.Text = NavView.IsTitleBarAutoPaddingEnabled.ToString();
00094         }
00095
00096         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00097         {
00098             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00099         }
00100
00101         private void AppBarButton_Click(object sender, RoutedEventArgs e)
00102         {
00103         }
00104
00105         private void ChangeTopNavVisibility_Click(object sender, RoutedEventArgs e)
00106         {
00107             NavView.IsPaneVisible = !NavView.IsPaneVisible;
00108         }
00109
00110         private void AddRemoveContentOverlay_Click(object sender, RoutedEventArgs e)
00111         {
00112             contentOverlay = contentOverlay == null ? new TextBlock() { Text = "CONTENT OVERLAY" } : null;
00113             NavView.ContentOverlay = contentOverlay;
00114         }
00115
00116         private void ChangeContentOverlayVisibility_Click(object sender, RoutedEventArgs e)
00117         {
00118             if (contentOverlay != null)
00119             {
00120                 contentOverlay.Visibility = contentOverlay.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
00121             }
00122         }
00123
00124         private void MoveContentUnderTopnav_Click(object sender, RoutedEventArgs e)
00125         {
00126             var topNavArea = FindVisualChildByName(NavView, "TopNavArea") as FrameworkElement;
00127             var topNavGrid = FindVisualChildByName(NavView, "TopNavGrid") as FrameworkElement;
00128             var topNavHeight = topNavGrid.Height;
00129
00130             if (CoreWindow.GetForCurrentThread() != null)
00131             {
00132                 CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
00133             }
00134
00135             if (ContentScrollViewer.ActualHeight == 200)
00136             {
00137                 Grid.SetRow(topNavArea, 0);
00138                 ContentScrollViewer.Height = double.NaN;
00139                 ContentStackPanel.Padding = new Thickness(0);
00140                 ContentScrollViewer.Margin = new Thickness(0);
00141                 ContentScrollViewer.Padding = new Thickness(0);
00142             }
00143             else
00144             {
00145                 Grid.SetRow(topNavArea, 1);
00146                 ContentScrollViewer.Height = 200;
00147                 ContentStackPanel.Padding = new Thickness(0, topNavHeight, 0, 0);
00148                 ContentScrollViewer.Margin = new Thickness(0, topNavHeight, 0, 0);
00149                 ContentScrollViewer.Padding = new Thickness(0, -topNavHeight, 0, 0);
00150             }
00151         }
00152
00153         private void MoveContentUnderTopnavTitleBar_Click(object sender, RoutedEventArgs e)
00154         {
00155             var topNavArea = FindVisualChildByName(NavView, "TopNavArea") as FrameworkElement;
00156             var topNavGrid = FindVisualChildByName(NavView, "TopNavGrid") as FrameworkElement;
00157             var topNavHeight = topNavGrid.Height + 33;
00158
00159             if (CoreWindow.GetForCurrentThread() != null && CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar)
00160             {
00161                 //AppTitleBar
00162                 UpdateTestFrameVisibility(Visibility.Visible);
00163                 CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
00164
00165                 // Reset values
00166                 Grid.SetRow(topNavArea, 0);
00167                 ContentScrollViewer.Height = double.NaN;
00168                 ContentStackPanel.Padding = new Thickness(0);
00169                 ContentScrollViewer.Margin = new Thickness(0);
00170                 ContentScrollViewer.Padding = new Thickness(0);
00171             }
00172             else
00173             {
00174                 //AppTitleBar
00175                 UpdateTestFrameVisibility(Visibility.Collapsed);
00176                 if(CoreWindow.GetForCurrentThread() != null)
00177                 {
00178                     CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
00179                 }
00180                 Grid.SetRow(topNavArea, 1);
00181                 ContentScrollViewer.Height = 200;
00182                 ContentStackPanel.Padding = new Thickness(0, topNavHeight, 0, 0);
00183                 ContentScrollViewer.Margin = new Thickness(0, topNavHeight, 0, 0);
00184                 ContentScrollViewer.Padding = new Thickness(0, -topNavHeight, 0, 0);
00185             }
00186         }
00187
00188         private void ChangeSelectionInCode_Click(object sender, RoutedEventArgs e)
00189         {
00190             currentSelectedItem++;
00191             if (currentSelectedItem == m_menuItems.Count)
00192             {
00193                 currentSelectedItem = 0;
00194             }
00195
00196             NavView.SelectedItem = m_menuItems[currentSelectedItem];
00197         }
00198
00199         private void GetTopPaddingHeightButton_Click(object sender, RoutedEventArgs e)
00200         {
00201             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00202             if (rootGrid != null)
00203             {
00204                 Grid paneContentGrid = rootGrid.FindName("TopNavTopPadding") as Grid;
00205                 TopPaddingRenderedValue.Text = paneContentGrid.ActualHeight.ToString();
00206             }
00207
00208             if (CoreWindow.GetForCurrentThread() != null && CoreApplication.GetCurrentView().TitleBar.IsVisible)
00209             {
00210                 TitleBarIsVisible.Text = "True";
00211             }
00212             else
00213             {
00214                 TitleBarIsVisible.Text = "False";
00215             }
00216         }
00217
00218         private void EnableSelectionFollowsFocus_Click(object sender, RoutedEventArgs e)
00219         {
00220             if (NavView.SelectionFollowsFocus == NavigationViewSelectionFollowsFocus.Disabled)
00221             {
00222                 NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
00223             }
00224             else
00225             {
00226                 NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
00227             }
00228             EnableSelectionFollowsFocusButton.Content = NavView.SelectionFollowsFocus == NavigationViewSelectionFollowsFocus.Enabled ? "Disable Selection Follows Focus" : "Enable Selection Follows Focus";
00229         }
00230
00231         private void GetActiveVisualState_Click(object sender, RoutedEventArgs e)
00232         {
00233             ActiveVisualStates.Text = Utilities.VisualStateHelper.GetCurrentVisualStateNameString(NavView);
00234         }
00235
00236         private void GetNavItemActiveNavItemVisualState_Click(object sender, RoutedEventArgs e)
00237         {
00238             NavItemActiveVisualStates.Text = Utilities.VisualStateHelper.GetCurrentVisualStateNameString(NavView.SelectedItem as FrameworkElement);
00239         }
00240
00241         private void ClearItemInvokedTextButton_Click(object sender, RoutedEventArgs e)
00242         {
00243             ItemInvokedText.Text = string.Empty;
00244         }
00245
00246         private void OnNavItemInvoked(object sender, NavigationViewItemInvokedEventArgs e)
00247         {
00248             ItemInvokedText.Text = e.InvokedItem as string;
00249         }
00250     }
00251 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RecyclingElementFactory.properties.cpp Source File

  • File List
  • File Members
  • Generated

RecyclingElementFactory.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RecyclingElementFactory.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RecyclingElementFactory)
00012 }
00013
00014 #include "RecyclingElementFactory.g.cpp"
00015
00016
00017 RecyclingElementFactoryProperties::RecyclingElementFactoryProperties()
00018     : m_selectTemplateKeyEventSource{static_cast<RecyclingElementFactory*>(this)}
00019 {
00020 }
00021
00022 void RecyclingElementFactoryProperties::EnsureProperties()
00023 {
00024 }
00025
00026 void RecyclingElementFactoryProperties::ClearProperties()
00027 {
00028 }
00029
00030 winrt::event_token RecyclingElementFactoryProperties::SelectTemplateKey(winrt::TypedEventHandler<winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs> const& value)
00031 {
00032     return m_selectTemplateKeyEventSource.add(value);
00033 }
00034
00035 void RecyclingElementFactoryProperties::SelectTemplateKey(winrt::event_token const& token)
00036 {
00037     m_selectTemplateKeyEventSource.remove(token);
00038 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemExpandingEventArgs.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemExpandingEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewItemExpandingEventArgs.g.h"
00007
00008 class NavigationViewItemExpandingEventArgs :
00009     public ReferenceTracker<NavigationViewItemExpandingEventArgs, winrt::implementation::NavigationViewItemExpandingEventArgsT, winrt::composing, winrt::composable>
00010 {
00011 public:
00012     NavigationViewItemExpandingEventArgs(const winrt::NavigationView& navigationView);
00013
00014     winrt::NavigationViewItemBase ExpandingItemContainer();
00015     void ExpandingItemContainer(winrt::NavigationViewItemBase const& value);
00016
00017     winrt::IInspectable ExpandingItem();
00018
00019 private:
00020     tracker_ref<winrt::NavigationViewItemBase> m_expandingItemContainer{ this };
00021     tracker_ref<winrt::IInspectable> m_expandingItem{ this };
00022     tracker_ref<winrt::NavigationView> m_navigationView{ this };
00023 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CompactPage Member List

This is the complete list of members for CompactPage, including all inherited members.
AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) | CompactPage | [inline, private]
CompactPage() | CompactPage | [inline]
GetChild(FrameworkElement item, string childXName) | CompactPage | [inline, private]
RunTest_Click(object sender, RoutedEventArgs e) | CompactPage | [inline, private]
ToggleCompactInAppLevel_Click(object sender, RoutedEventArgs e) | CompactPage | [inline, private]
VerifyChildHeight(SimpleVerify simpleVerify, FrameworkElement item, string childXName, int expectHeight, string controlName) | CompactPage | [inline, private]
VerifyHeight(SimpleVerify simpleVerify, FrameworkElement item, int expectHeight, string controlName) | CompactPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.h Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedGlobalNavigationButtonVisualSource.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 //------------------------------------------------------------------------------
00003 // <auto-generated>
00004 //     This code was generated by a tool.
00005 //
00006 //       LottieGen version:
00007 //           7.1.0+ge1fa92580f
00008 //
00009 //       Command:
00010 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedGlobalNavigationButtonVisualSource.json
00011 //
00012 //       Input file:
00013 //           AnimatedGlobalNavigationButtonVisualSource.json (37639 bytes created 23:37-07:00 Oct 5 2021)
00014 //
00015 //       LottieGen source:
00016 //           http://aka.ms/Lottie
00017 //
00018 //     Changes to this file may cause incorrect behavior and will be lost if
00019 //     the code is regenerated.
00020 // </auto-generated>
00021 //------------------------------------------------------------------------------
00022 #include "common.h"
00023 #include "AnimatedVisuals\AnimatedGlobalNavigationButtonVisualSource.g.h"
00024
00025 // Name:        Controls_02_Hamburger
00026 // Frame rate:  60 fps
00027 // Frame count: 80
00028 // Duration:    1333.3 mS
00029 // _____________________________________________________________________________________________
00030 // |           Marker           |           Constant           | Frame |   mS   |   Progress   |
00031 // |____________________________|______________________________|_______|________|______________|
00032 // | NormalToPointerOver_Start  | M_NormalToPointerOver_Start  |     0 |    0.0 | 0.0F         |
00033 // | NormalToPointerOver_End    | M_NormalToPointerOver_End    |     9 |  150.0 | 0.113124996F |
00034 // | NormalToPressed_Start      | M_NormalToPressed_Start      |    10 |  166.7 | 0.125624999F |
00035 // | NormalToPressed_End        | M_NormalToPressed_End        |    19 |  316.7 | 0.238124996F |
00036 // | PointerOverToNormal_Start  | M_PointerOverToNormal_Start  |    20 |  333.3 | 0.250625014F |
00037 // | PointerOverToNormal_End    | M_PointerOverToNormal_End    |    29 |  483.3 | 0.363124996F |
00038 // | PointerOverToPressed_Start | M_PointerOverToPressed_Start |    30 |  500.0 | 0.375625014F |
00039 // | PointerOverToPressed_End   | M_PointerOverToPressed_End   |    39 |  650.0 | 0.488124996F |
00040 // | PressedToNormal_Start      | M_PressedToNormal_Start      |    40 |  666.7 | 0.500625014F |
00041 // | PressedToNormal_End        | M_PressedToNormal_End        |    59 |  983.3 | 0.738125026F |
00042 // | PressedToPointerOver_Start | M_PressedToPointerOver_Start |    60 | 1000.0 | 0.750625014F |
00043 // | PressedToPointerOver_End   | M_PressedToPointerOver_End   |    79 | 1316.7 | 0.988125026F |
00044 // ---------------------------------------------------------------------------------------------
00045 // _________________________________________________________
00046 // | Theme property |  Accessor  | Type  |  Default value  |
00047 // |________________|____________|_______|_________________|
00048 // | Foreground     | Foreground | Color | #FF000000 Black |
00049 // ---------------------------------------------------------
00050 class AnimatedGlobalNavigationButtonVisualSource
00051     : public winrt::implementation::AnimatedGlobalNavigationButtonVisualSourceT<AnimatedGlobalNavigationButtonVisualSource>
00052 {
00053     winrt::Microsoft::UI::Composition::CompositionPropertySet _themeProperties{ nullptr };
00054     winrt::Windows::UI::Color _themeForeground{ 0xFF, 0x00, 0x00, 0x00 };
00055     winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00056
00057     static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4(winrt::Windows::UI::Color color);
00058 public:
00059     // Animation duration: 1.333 seconds.
00060     static constexpr int64_t c_durationTicks{ 13333333L };
00061
00062     // Marker: NormalToPointerOver_Start.
00063     static constexpr float M_NormalToPointerOver_Start{ 0.0F };
00064
00065     // Marker: NormalToPointerOver_End.
00066     static constexpr float M_NormalToPointerOver_End{ 0.113124996F };
00067
00068     // Marker: NormalToPressed_Start.
00069     static constexpr float M_NormalToPressed_Start{ 0.125624999F };
00070
00071     // Marker: NormalToPressed_End.
00072     static constexpr float M_NormalToPressed_End{ 0.238124996F };
00073
00074     // Marker: PointerOverToNormal_Start.
00075     static constexpr float M_PointerOverToNormal_Start{ 0.250625014F };
00076
00077     // Marker: PointerOverToNormal_End.
00078     static constexpr float M_PointerOverToNormal_End{ 0.363124996F };
00079
00080     // Marker: PointerOverToPressed_Start.
00081     static constexpr float M_PointerOverToPressed_Start{ 0.375625014F };
00082
00083     // Marker: PointerOverToPressed_End.
00084     static constexpr float M_PointerOverToPressed_End{ 0.488124996F };
00085
00086     // Marker: PressedToNormal_Start.
00087     static constexpr float M_PressedToNormal_Start{ 0.500625014F };
00088
00089     // Marker: PressedToNormal_End.
00090     static constexpr float M_PressedToNormal_End{ 0.738125026F };
00091
00092     // Marker: PressedToPointerOver_Start.
00093     static constexpr float M_PressedToPointerOver_Start{ 0.750625014F };
00094
00095     // Marker: PressedToPointerOver_End.
00096     static constexpr float M_PressedToPointerOver_End{ 0.988125026F };
00097
00098     // Theme property: Foreground.
00099     static inline const winrt::Windows::UI::Color c_themeForeground{ 0xFF, 0x00, 0x00, 0x00 };
00100
00101
00102     winrt::Windows::UI::Color Foreground();
00103     void Foreground(winrt::Windows::UI::Color value);
00104
00105     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00106         winrt::Microsoft::UI::Composition::Compositor const& compositor);
00107
00108     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00109         winrt::Microsoft::UI::Composition::Compositor const& compositor,
00110         winrt::Windows::Foundation::IInspectable& diagnostics);
00111
00112     // Gets the number of frames in the animation.
00113     double FrameCount();
00114
00115     // Gets the framerate of the animation.
00116     double Framerate();
00117
00118     // Gets the duration of the animation.
00119     winrt::Windows::Foundation::TimeSpan Duration();
00120
00121     // Converts a zero-based frame number to the corresponding progress value denoting the
00122     // start of the frame.
00123     double FrameToProgress(double frameNumber);
00124
00125     // Returns a map from marker names to corresponding progress values.
00126     winrt::Windows::Foundation::Collections::IMapView<hstring, double> Markers();
00127
00128     // Sets the color property with the given name, or does nothing if no such property
00129     // exists.
00130     void SetColorProperty(hstring const& propertyName, winrt::Windows::UI::Color value);
00131
00132     // Sets the scalar property with the given name, or does nothing if no such property
00133     // exists.
00134     void SetScalarProperty(hstring const& propertyName, double value);
00135 };
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImageIconProperties Member List

This is the complete list of members for ImageIconProperties, including all inherited members.
ClearProperties() | ImageIconProperties | [static]
EnsureProperties() | ImageIconProperties | [static]
ImageIconProperties() | ImageIconProperties |
OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ImageIconProperties | [static]
s_SourceProperty | ImageIconProperties | [static]
Source(winrt::ImageSource const &value) | ImageIconProperties |
Source() | ImageIconProperties |
SourceProperty() | ImageIconProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItemFlyout.cpp Source File

  • File List
  • File Members
  • MenuBar

MenuBarItemFlyout.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MenuBarItemFlyout.h"
00007
00008 #include "MenuBarItemFlyout.properties.cpp"
00009
00010 winrt::Control MenuBarItemFlyout::CreatePresenter()
00011 {
00012     m_presenter.set(__super::CreatePresenter());
00013     return m_presenter.get();
00014 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicRenderingPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI

AcrylicRenderingPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Runtime.InteropServices.WindowsRuntime;
00007 using System.Threading.Tasks;
00008 using Windows.Foundation;
00009 using Windows.UI;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Media.Imaging;
00014 using Microsoft.UI.Xaml.Navigation;
00015 using Microsoft.UI.Private.Media;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed partial class AcrylicRenderingPage : TestPage
00020     {
00021         struct SampledColors
00022         {
00023             public Color c1;
00024             public Color c2;
00025             public Color c3;
00026             public Color c4;
00027         }
00028
00029         bool[] _luminosityBlendResults = { false, false };
00030
00031         public AcrylicRenderingPage()
00032         {
00033             this.InitializeComponent();
00034
00035             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00036             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00037         }
00038
00039         protected override void OnNavigatedFrom(NavigationEventArgs e)
00040         {
00041             // Unset all override flags to avoid impacting subsequent tests
00042             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00043             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00044             base.OnNavigatedFrom(e);
00045         }
00046
00047         //          We use RenderTargetBitmap to sample some pixels from the scene below:
00048         //
00049         //          Test SetUp:
00050         //
00051         //          + Consider two adjacent rectangles R1, filled with Red and R2 filled with Blue, each of size 200 x 200
00052         //          + And the following sample points:
00053         //                 P1: in middle of R1
00054         //                 P2: in middle of R2
00055         //                 P3: near right edge of R1
00056         //                 P4: near left edge of R2
00057         //          + Place R3 filled with myAcrylicBrush (in-app acylic) of size 200 x 400 snugly above R1 and R2
00058         //               >> R3 should render as acrylic over half-red, half-blue background
00059         //          + Take a RTB of ContainerGrid, which includes R1, R2 and R3.
00060         //          + Now we can inspect the colors at P1...P4 to confirm that what's rendered looks like acrylic
00061         //
00062         //                   R1                 R2
00063         //          -------------------+-------------------
00064         //          |                  |                  |
00065         //          |                  |                  |
00066         //          |                  |                  |
00067         //          |       (P1)       |       (P2)       |
00068         //          |                  |                  |
00069         //          |              (P3)|(P4)              |
00070         //          |                  |                  |
00071         //          -------------------+-------------------
00072         async Task<SampledColors> SamplePointColors(Image showRtb)
00073         {
00074             Point p1 = new Point(100, 100);             // Point over middle of Rectangle1
00075             Point p2 = new Point(300, 100);             // Point over middle of Rectangle2
00076             Point p3 = new Point(197, 100);             // Point near right edge of Rectangle 1
00077             Point p4 = new Point(203, 100);             // Point near left eedge or Rectangle 2
00078
00079             RenderTargetBitmap rtb = new RenderTargetBitmap();
00080             await rtb.RenderAsync(ContainerGrid);
00081             showRtb.Source = rtb;
00082
00083             var pixelBuffer = await rtb.GetPixelsAsync();
00084             byte[] pixelArray = pixelBuffer.ToArray();       // In BGRA8 format
00085
00086             SampledColors sampledColors = new SampledColors();
00087
00088             sampledColors.c1 = GetPixelAtPoint(p1, rtb, pixelArray);
00089             sampledColors.c2 = GetPixelAtPoint(p2, rtb, pixelArray);
00090             sampledColors.c3 = GetPixelAtPoint(p3, rtb, pixelArray);
00091             sampledColors.c4 = GetPixelAtPoint(p4, rtb, pixelArray);
00092
00093             return sampledColors;
00094         }
00095
00096         private void RunTestButton_Clicked(object sender, RoutedEventArgs e)
00097         {
00098             if (cbComplexBackground.IsChecked == true)
00099             {
00100                 RunTestWithComplexBackground();
00101             }
00102             else
00103             {
00104                 RunTestWithRedBlueBackground();
00105             }
00106         }
00107
00108         private async void RunTestWithComplexBackground()
00109         {
00110             System.Diagnostics.Debug.WriteLine("------------------------------");
00111             System.Diagnostics.Debug.WriteLine("RunTestWithComplexBackground results:");
00112
00113             RenderTargetBitmap rtb = new RenderTargetBitmap();
00114             await rtb.RenderAsync(ContainerGrid);
00115             ShowRtb1.Source = rtb;
00116
00117             bool[] results = { false, false, false, false, false };
00118
00119             var pixelBuffer = await rtb.GetPixelsAsync();
00120             byte[] pixelArray = pixelBuffer.ToArray();       // In BGRA8 format
00121
00122             // Test to see if the text is blurred
00123             var textSample1 = GetPixelAtPoint(new Point(143,10), rtb, pixelArray);
00124             var textSample2 = GetPixelAtPoint(new Point(144,10), rtb, pixelArray);
00125             var textSample3 = GetPixelAtPoint(new Point(145,10), rtb, pixelArray);
00126             results[0] = AreClose(textSample1, textSample2) && AreClose(textSample2, textSample3);
00127             System.Diagnostics.Debug.WriteLine(System.String.Format("textSamples: {0} {1} {2}", textSample1, textSample2, textSample3));
00128
00129             // Test to see if all colors are fully opaque
00130             results[1] = textSample1.A == 0xFF && textSample2.A == 0xFF && textSample3.A == 0xFF;
00131
00132             // Test the left edge red rectangle
00133             var redRectSample1 = GetPixelAtPoint(new Point(241,60), rtb, pixelArray);
00134             var redRectSample2 = GetPixelAtPoint(new Point(242,60), rtb, pixelArray);
00135             var redRectSample3 = GetPixelAtPoint(new Point(243,60), rtb, pixelArray);
00136             results[2] = AreClose(redRectSample1, redRectSample2) && AreClose(redRectSample2, redRectSample3);
00137             System.Diagnostics.Debug.WriteLine(System.String.Format("redRectSamples: {0} {1} {2}", redRectSample1, redRectSample2, redRectSample3));
00138
00139             // Test to see if all colors are fully opaque
00140             results[3] = redRectSample1.A == 0xFF && redRectSample2.A == 0xFF && redRectSample3.A == 0xFF;
00141
00142             // Test if the Green FallbackColor is noticeable
00143             var greenSample = GetPixelAtPoint(new Point(140,100), rtb, pixelArray);
00144             results[4] = AreClose(greenSample, new Color() { A = 0xFF, R = 0x4D, G = 0x87, B = 0x4D });
00145             System.Diagnostics.Debug.WriteLine(System.String.Format("greenSample: {0}", greenSample));
00146
00147             bool result = results[0] && results[1] && results[2] && results[3] && results[4];
00148             string resultString = System.String.Format("({0},{1},{2},{3},{4})", results[0], results[1], results[2], results[3], results[4]);
00149             TestResult.Text = "AcrylicOnComplexTransparentBG: " + (result ? "Passed" : ("Failed " + resultString));
00150         }
00151
00152         private async void RunTestWithRedBlueBackground()
00153         {
00154             bool[] results = { false, false, false, false};
00155
00156             ShowRtb1_Text.Text = "RenderTargetBitmap: In-app Acylic";
00157             SampledColors inAppAcrylicColors = await SamplePointColors(ShowRtb1);
00158
00159             // Test 0: We are not rendering fallback color [for in-app acrylic]
00160             results[0] = !inAppAcrylicColors.c1.Equals(Microsoft.UI.Colors.Green);
00161
00162             // Test 1: Transparency is present (acylic over red BG and blue BG comes out different) ...
00163             results[1] = !inAppAcrylicColors.c1.Equals(inAppAcrylicColors.c2);
00164
00165             // Test 2: ... but not fully transparent (we don't just evaluate to BG color)
00166             results[2] = !inAppAcrylicColors.c1.Equals(Microsoft.UI.Colors.Red) && !inAppAcrylicColors.c2.Equals(Microsoft.UI.Colors.Blue);
00167
00168             // Test 3: Gaussian blur is present  (point at center of one color BG different from point at edge of different color BG)
00169             results[3] = !inAppAcrylicColors.c1.Equals(inAppAcrylicColors.c3) && !inAppAcrylicColors.c2.Equals(inAppAcrylicColors.c4);
00170
00171             bool result = results[0] && results[1] && results[2] && results[3];
00172             string resultString = System.String.Format("({0},{1},{2},{3})", results[0], results[1], results[2], results[3]);
00173             TestResult.Text = "AcrylicRendering: " + (result ? "Passed" : ("Failed " + resultString));
00174         }
00175
00176         private async void SetLuminosityButton_Clicked(object sender, RoutedEventArgs e)
00177         {
00178             bool result = false;
00179
00180             using (var logger = new ResultsLogger("SetLuminosityBlend", TestResult))
00181             {
00182                 LogAcrylicRecipeVersion(logger);
00183
00184                 // Capture state when TintLuminosityOpacity is at default value of null
00185                 // On 19H1+, this means auto configure the Luminosity for the given Tint
00186                 // On RS5-, it has no effect (we use the legacy acrylic recipe)
00187
00188                 ShowRtb1_Text.Text = "SetLuminosityBlend: Luminosity = auto";
00189                 SampledColors initialColors = await SamplePointColors(ShowRtb1);
00190
00191                 // Manually set TintLuminosityOpacity
00192                 myAcrylicBrush.TintLuminosityOpacity = 1.0;
00193                 await Task.Delay(2000);
00194
00195                 ShowRtb2_Text.Text = "SetLuminosityBlend: Luminosity = 1.0";
00196                 SampledColors customLuminosityColors = await SamplePointColors(ShowRtb2);
00197
00198                 // Color change expected
00199                 result = !initialColors.Equals(customLuminosityColors);
00200
00201                 logger.Verify(result, "Sampled acrylic pixels did not change as expected");
00202             }
00203         }
00204
00205         private async void UnsetLuminosityButton_Clicked(object sender, RoutedEventArgs e)
00206         {
00207             bool result = false;
00208
00209             using (var logger = new ResultsLogger("ClearLuminosityBlend", TestResult))
00210             {
00211                 LogAcrylicRecipeVersion(logger);
00212
00213                 // Manually set TintLuminosityOpacity
00214                 myAcrylicBrush.TintLuminosityOpacity = 1.0;
00215                 await Task.Delay(2000);
00216
00217                 ShowRtb1_Text.Text = "ClearLuminosityBlend: Luminosity = 1.0";
00218                 SampledColors customLuminsotyColors = await SamplePointColors(ShowRtb1);
00219
00220                 // Restore TintLuminosityOpacity to default
00221                 myAcrylicBrush.ClearValue(AcrylicBrush.TintLuminosityOpacityProperty);
00222                 await Task.Delay(2000);
00223
00224                 ShowRtb2_Text.Text = "ClearLuminosityBlend: Luminosity = auto";
00225                 SampledColors defaultLuminosityColors = await SamplePointColors(ShowRtb2);
00226
00227                 // Color change expected
00228                 result = !defaultLuminosityColors.Equals(customLuminsotyColors);
00229
00230                 logger.Verify(result, "Sampled acrylic pixels did not change as expected");
00231             }
00232         }
00233
00234         void LogAcrylicRecipeVersion(ResultsLogger logger)
00235         {
00236             // Color change expected
00237             logger.LogMessage("Using Luminosity-based recipe... ");
00238         }
00239
00240         Color GetPixelAtPoint(Point p, RenderTargetBitmap rtb, byte[] pixelArray)
00241         {
00242             // Test infra normally runs at 100% scale, but account for the scale so this
00243             // works if the developer is running this at a different display scale.
00244             double scale = ContainerGrid.XamlRoot.RasterizationScale;
00245             Color pixelColor = new Color();
00246             int x = (int)(p.X * scale);
00247             int y = (int)(p.Y * scale);
00248             int pointPosition = 4 * (rtb.PixelWidth * y + x);
00249
00250             pixelColor.B = pixelArray[pointPosition];
00251             pixelColor.G = pixelArray[pointPosition + 1];
00252             pixelColor.R = pixelArray[pointPosition + 2];
00253             pixelColor.A = pixelArray[pointPosition + 3];
00254
00255             return pixelColor;
00256         }
00257
00258         private bool AreClose(Color color1, Color color2)
00259         {
00260             // Note: "<= 2" was arbitrarily chosen to be considered close and is currently sufficient.
00261             //       This needs to be enough to account for both acrylic blur and acrylic noise.
00262             bool aClose = Math.Abs((int)color1.A - (int)color2.A) <= 2;
00263             bool rClose = Math.Abs((int)color1.R - (int)color2.R) <= 2;
00264             bool gClose = Math.Abs((int)color1.G - (int)color2.G) <= 2;
00265             bool bClose = Math.Abs((int)color1.B - (int)color2.B) <= 2;
00266             return aClose && rClose && gClose && bClose;
00267         }
00268
00269         private void cbComplexBackground_Toggled(object sender, RoutedEventArgs e)
00270         {
00271             if (cbComplexBackground.IsChecked == true)
00272             {
00273                 blueRedBGSP.Visibility = Visibility.Collapsed;
00274                 complexBGGrid.Visibility = Visibility.Visible;
00275             }
00276             else
00277             {
00278                 blueRedBGSP.Visibility = Visibility.Visible;
00279                 complexBGGrid.Visibility = Visibility.Collapsed;
00280             }
00281         }
00282
00283         private void cbToggleFallbackColor_Toggled(object sender, RoutedEventArgs e)
00284         {
00285             if (cbToggleFallbackColor.IsChecked == true)
00286             {
00287                 myAcrylicBrush.FallbackColor = Microsoft.UI.Colors.Blue;
00288             }
00289             else
00290             {
00291                 myAcrylicBrush.FallbackColor = Microsoft.UI.Colors.Green;
00292             }
00293         }
00294     }
00295 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealTestApi.idl Source File

  • File List
  • File Members
  • Lights

RevealTestApi.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_MEDIA_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 runtimeclass RevealTestApi : Microsoft.UI.Xaml.DependencyObject
00007 {
00008     RevealTestApi();
00009
00010     Microsoft.UI.Xaml.ApplicationTheme TargetTheme { get; set; };
00011     Microsoft.UI.Composition.SpotLight BackgroundLight { get; };
00012     Microsoft.UI.Xaml.Media.XamlLight BorderLight { get; };
00013     Microsoft.UI.Xaml.Media.XamlLight BorderWideLight { get; };
00014     Double BackgroundLightMinSize { get; set; };
00015     Double BackgroundLightMaxSize { get; set; };
00016     Microsoft.UI.Composition.SpotLight GetSpotLight(Microsoft.UI.Xaml.Media.XamlLight value);
00017     Microsoft.UI.Composition.ExpressionAnimation GetHoverLightOffsetExpression(RevealHoverLight value);
00018     RevealBorderLight GetAsRevealBorderLight(Microsoft.UI.Xaml.Media.XamlLight value);
00019     RevealHoverLight GetAsRevealHoverLight(Microsoft.UI.Xaml.Media.XamlLight value);
00020     Boolean BorderLight_ShouldBeOn(RevealBorderLight value);
00021     Boolean HoverLight_ShouldBeOn(RevealHoverLight value);
00022     Boolean HoverLight_IsPressed(RevealHoverLight value);
00023     Boolean HoverLight_IsPointerOver(RevealHoverLight value);
00024 }
00025
00026 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewLateDataInitTestPage.xaml.cs Source File

  • File List
  • File Members
  • TreeView
  • TestUI

TreeViewLateDataInitTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 using System;
00004 using Microsoft.UI.Xaml;
00005 using System.Collections.ObjectModel;
00006 using System.ComponentModel;
00007 using MUXControlsTestApp.Utilities;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     /// Test page for late initialization data binding. ItemsSource is null until we click the button to set it.
00012     public sealed partial class TreeViewLateDataInitTest : TestPage, INotifyPropertyChanged
00013     {
00014         public event PropertyChangedEventHandler PropertyChanged;
00015         private ObservableCollection<TreeViewItemSource> m_testTreeViewItemsSource;
00016         public ObservableCollection<TreeViewItemSource> TestTreeViewItemsSource
00017         {
00018             get { return m_testTreeViewItemsSource; }
00019             set
00020             {
00021                 if (m_testTreeViewItemsSource != value)
00022                 {
00023                     m_testTreeViewItemsSource = value;
00024                     NotifyPropertyChanged(nameof(TestTreeViewItemsSource));
00025                 }
00026             }
00027         }
00028
00029         public TreeViewLateDataInitTest()
00030         {
00031             this.InitializeComponent();
00032         }
00033
00034         private void InitializeItemsSource_Click(object sender, RoutedEventArgs e)
00035         {
00036             TestTreeViewItemsSource = PrepareItemsSource();
00037         }
00038
00039         private ObservableCollection<TreeViewItemSource> PrepareItemsSource()
00040         {
00041             var root0 = new TreeViewItemSource() { Content = "Root.0" };
00042             var root1 = new TreeViewItemSource() { Content = "Root.1" };
00043             var root = new TreeViewItemSource() { Content = "Root", Children = { root0, root1 } };
00044
00045             return new ObservableCollection<TreeViewItemSource> { root };
00046         }
00047
00048         private void NotifyPropertyChanged(String propertyName)
00049         {
00050             if (PropertyChanged != null)
00051             {
00052                 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
00053             }
00054         }
00055     }
00056 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarProperties Member List

This is the complete list of members for InkToolBarProperties, including all inherited members.
ActiveTool(winrt::InkToolBarToolButton const &value) | InkToolBarProperties |
ActiveTool() | InkToolBarProperties |
ActiveToolChanged(winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const &value) | InkToolBarProperties |
ActiveToolChanged(winrt::event_token const &token) | InkToolBarProperties |
ActiveToolProperty() | InkToolBarProperties | [inline, static]
ButtonFlyoutPlacement(winrt::InkToolBarButtonFlyoutPlacement const &value) | InkToolBarProperties |
ButtonFlyoutPlacement() | InkToolBarProperties |
ButtonFlyoutPlacementProperty() | InkToolBarProperties | [inline, static]
Children(winrt::DependencyObjectCollection const &value) | InkToolBarProperties |
Children() | InkToolBarProperties |
ChildrenProperty() | InkToolBarProperties | [inline, static]
ClearProperties() | InkToolBarProperties | [static]
EnsureProperties() | InkToolBarProperties | [static]
EraseAllClicked(winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const &value) | InkToolBarProperties |
EraseAllClicked(winrt::event_token const &token) | InkToolBarProperties |
EraserFlyoutItemClicked(winrt::TypedEventHandler< winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable > const &value) | InkToolBarProperties |
EraserFlyoutItemClicked(winrt::event_token const &token) | InkToolBarProperties |
InitialControls(winrt::InkToolBarInitialControls const &value) | InkToolBarProperties |
InitialControls() | InkToolBarProperties |
InitialControlsProperty() | InkToolBarProperties | [inline, static]
InkDrawingAttributes(winrt::InkDrawingAttributes const &value) | InkToolBarProperties |
InkDrawingAttributes() | InkToolBarProperties |
InkDrawingAttributesChanged(winrt::TypedEventHandler< winrt::InkToolBar, winrt::IInspectable > const &value) | InkToolBarProperties |
InkDrawingAttributesChanged(winrt::event_token const &token) | InkToolBarProperties |
InkDrawingAttributesProperty() | InkToolBarProperties | [inline, static]
InkToolBarProperties() | InkToolBarProperties |
IsRulerButtonChecked(bool value) | InkToolBarProperties |
IsRulerButtonChecked() | InkToolBarProperties |
IsRulerButtonCheckedProperty() | InkToolBarProperties | [inline, static]
IsStencilButtonChecked(bool value) | InkToolBarProperties |
IsStencilButtonChecked() | InkToolBarProperties |
IsStencilButtonCheckedChanged(winrt::TypedEventHandler< winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs > const &value) | InkToolBarProperties |
IsStencilButtonCheckedChanged(winrt::event_token const &token) | InkToolBarProperties |
IsStencilButtonCheckedProperty() | InkToolBarProperties | [inline, static]
m_activeToolChangedEventSource | InkToolBarProperties |
m_eraseAllClickedEventSource | InkToolBarProperties |
m_eraserFlyoutItemClickedEventSource | InkToolBarProperties |
m_inkDrawingAttributesChangedEventSource | InkToolBarProperties |
m_isStencilButtonCheckedChangedEventSource | InkToolBarProperties |
Orientation(winrt::Orientation const &value) | InkToolBarProperties |
Orientation() | InkToolBarProperties |
OrientationProperty() | InkToolBarProperties | [inline, static]
s_ActiveToolProperty | InkToolBarProperties | [static]
s_ButtonFlyoutPlacementProperty | InkToolBarProperties | [static]
s_ChildrenProperty | InkToolBarProperties | [static]
s_InitialControlsProperty | InkToolBarProperties | [static]
s_InkDrawingAttributesProperty | InkToolBarProperties | [static]
s_IsRulerButtonCheckedProperty | InkToolBarProperties | [static]
s_IsStencilButtonCheckedProperty | InkToolBarProperties | [static]
s_OrientationProperty | InkToolBarProperties | [static]
s_TargetInkCanvasProperty | InkToolBarProperties | [static]
s_TargetInkPresenterProperty | InkToolBarProperties | [static]
TargetInkCanvas(winrt::InkCanvas const &value) | InkToolBarProperties |
TargetInkCanvas() | InkToolBarProperties |
TargetInkCanvasProperty() | InkToolBarProperties | [inline, static]
TargetInkPresenter(winrt::IInspectable const &value) | InkToolBarProperties |
TargetInkPresenter() | InkToolBarProperties |
TargetInkPresenterProperty() | InkToolBarProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollSnapPoint Member List

This is the complete list of members for ScrollSnapPoint, including all inherited members.
ActualValue() const | ScrollSnapPoint | [private]
Combine(int &combinationCount, winrt::SnapPointBase const &snapPoint) const | ScrollSnapPoint |
CreateConditionalExpression(std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | ScrollSnapPoint |
CreateRestingPointExpression(double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | ScrollSnapPoint |
DetermineActualApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint) | ScrollSnapPoint |
DetermineActualImpulseApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue) | ScrollSnapPoint |
DetermineMaxActualApplicableZone(const SnapPointBase *nextSnapPoint) const | ScrollSnapPoint | [private]
DetermineMaxActualImpulseApplicableZone(const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double nextIgnoredValue) const | ScrollSnapPoint | [private]
DetermineMinActualApplicableZone(const SnapPointBase *previousSnapPoint) const | ScrollSnapPoint | [private]
DetermineMinActualImpulseApplicableZone(const SnapPointBase *previousSnapPoint, double currentIgnoredValue, double previousIgnoredValue) const | ScrollSnapPoint | [private]
Evaluate(std::tuple< double, double > actualApplicableZone, double value) const | ScrollSnapPoint |
ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const | ScrollSnapPoint |
Influence(double edgeOfMidpoint) const | ScrollSnapPoint |
ScrollSnapPoint(double snapPointValue, winrt::ScrollSnapPointsAlignment alignment=winrt::ScrollSnapPointsAlignment::Near) | ScrollSnapPoint |
SnapCount() const | ScrollSnapPoint |
SortPredicate() const | ScrollSnapPoint |
UpdateConditionalExpressionAnimationForImpulse(winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const | ScrollSnapPoint |
UpdateRestingPointExpressionAnimationForImpulse(winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const | ScrollSnapPoint |
Value() | ScrollSnapPoint |
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

event_base< ImplT, T, StorageT > Member List

This is the complete list of members for event_base< ImplT, T, StorageT >, including all inherited members.
add(const T &value) | event_base< ImplT, T, StorageT > | [inline]
event_base(const event_base &) | event_base< ImplT, T, StorageT > |
event_base() | event_base< ImplT, T, StorageT > |
Impl() const | event_base< ImplT, T, StorageT > | [inline, private]
m_handlers | event_base< ImplT, T, StorageT > | [protected]
operator bool() const noexcept | event_base< ImplT, T, StorageT > | [inline, explicit]
operator()(A const &...args) const | event_base< ImplT, T, StorageT > | [inline]
operator=(const event_base &) | event_base< ImplT, T, StorageT > |
remove(const winrt::event_token token) | event_base< ImplT, T, StorageT > | [inline]
~event_base() | event_base< ImplT, T, StorageT > | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewportManagerDownLevel Member List

This is the complete list of members for ViewportManagerDownLevel, including all inherited members.
AddScroller(const winrt::IRepeaterScrollingSurface &scroller) | ViewportManagerDownLevel | [private]
EnsureScrollers() | ViewportManagerDownLevel | [private]
GetLayoutExtent() const override | ViewportManagerDownLevel | [inline, virtual]
GetLayoutId() | ViewportManagerDownLevel | [private]
GetLayoutRealizationWindow() const override | ViewportManagerDownLevel | [virtual]
GetLayoutVisibleWindow() const override | ViewportManagerDownLevel | [virtual]
GetOrigin() const override | ViewportManagerDownLevel | [inline, virtual]
GetOuterScroller() const | ViewportManagerDownLevel | [private]
HasScrollers() const | ViewportManagerDownLevel | [inline, private]
HorizontalCacheLength() const override | ViewportManagerDownLevel | [inline, virtual]
HorizontalCacheLength(double value) override | ViewportManagerDownLevel | [virtual]
m_cacheBuildAction | ViewportManagerDownLevel | [private]
m_horizontalScroller | ViewportManagerDownLevel | [private]
m_innerScrollableScroller | ViewportManagerDownLevel | [private]
m_makeAnchorElement | ViewportManagerDownLevel | [private]
m_parentScrollers | ViewportManagerDownLevel | [private]
m_postArrangeToken | ViewportManagerDownLevel | [private]
m_verticalScroller | ViewportManagerDownLevel | [private]
MadeAnchor() const override | ViewportManagerDownLevel | [inline, virtual]
OnBringIntoViewRequested(const winrt::BringIntoViewRequestedEventArgs &args) override | ViewportManagerDownLevel | [virtual]
OnCacheBuildActionCompleted() | ViewportManagerDownLevel | [private]
OnConfigurationChanged(const winrt::IRepeaterScrollingSurface &sender) | ViewportManagerDownLevel | [private]
OnElementCleared(const winrt::UIElement &element) override | ViewportManagerDownLevel | [virtual]
OnElementPrepared(const winrt::UIElement &element) override | ViewportManagerDownLevel | [inline, virtual]
OnLayoutChanged(bool isVirtualizing) override | ViewportManagerDownLevel | [virtual]
OnMakeAnchor(const winrt::UIElement &anchor, const bool isAnchorOutsideRealizedRange) override | ViewportManagerDownLevel | [virtual]
OnOwnerArranged() override | ViewportManagerDownLevel | [virtual]
OnOwnerMeasuring() override | ViewportManagerDownLevel | [virtual]
OnPostArrange(const winrt::IRepeaterScrollingSurface &sender) | ViewportManagerDownLevel | [private]
OnViewportChanged(const winrt::IRepeaterScrollingSurface &sender, const bool isFinal) | ViewportManagerDownLevel | [private]
RegisterCacheBuildWork() | ViewportManagerDownLevel | [private]
ResetCacheBuffer(bool registerCacheBuildWork=true) | ViewportManagerDownLevel | [private]
ResetLayoutRealizationWindowCacheBuffer() override | ViewportManagerDownLevel | [virtual]
ResetScrollers() override | ViewportManagerDownLevel | [virtual]
SetLayoutExtent(const winrt::Rect &extent) override | ViewportManagerDownLevel | [virtual]
SuggestedAnchor() const override | ViewportManagerDownLevel | [virtual]
TryInvalidateMeasure() | ViewportManagerDownLevel | [private]
UpdateViewport() | ViewportManagerDownLevel | [private]
ValidateCacheLength(double cacheLength) | ViewportManagerDownLevel | [private]
VerticalCacheLength() const override | ViewportManagerDownLevel | [inline, virtual]
VerticalCacheLength(double value) override | ViewportManagerDownLevel | [virtual]
ViewportManagerDownLevel(ItemsRepeater *owner) | ViewportManagerDownLevel |
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionProvider.h Source File

  • File List
  • File Members
  • Repeater

ItemCollectionTransitionProvider.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemCollectionTransitionProvider.g.h"
00007 #include "ItemCollectionTransitionProvider.properties.h"
00008
00009 // Given some elements and their animation context, ItemCollectionTransitionProvider
00010 // animates them (Add, Delete and Move) and ensures the timing
00011 // is correct (Delete -> Move -> Add).
00012 // It's possible to customize the animations by inheriting from ItemCollectionTransitionProvider
00013 // and overriding virtual/abstract members.
00014 class ItemCollectionTransitionProvider :
00015     public ReferenceTracker<ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable>,
00016     public ItemCollectionTransitionProviderProperties
00017 {
00018 public:
00019     ~ItemCollectionTransitionProvider();
00020
00021 #pragma region IItemCollectionTransitionProvider
00022
00023     void QueueTransition(winrt::ItemCollectionTransition const& transition);
00024     bool ShouldAnimate(winrt::ItemCollectionTransition const& transition);
00025
00026 #pragma endregion
00027
00028 #pragma region IItemCollectionTransitionProviderOverrides
00029
00030     virtual void StartTransitions(winrt::IVector<winrt::ItemCollectionTransition> const& transitions);
00031     virtual bool ShouldAnimateCore(winrt::ItemCollectionTransition const& transition);
00032
00033 #pragma endregion
00034
00035     void NotifyTransitionCompleted(winrt::ItemCollectionTransition const& transition);
00036
00037 private:
00038     void CleanTransitionsBatch();
00039     void OnKeepAliveTimerTick(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00040     void OnRendering(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00041     void StartNewKeepAliveTimer();
00042
00043     uint32_t m_transitionsBatch{};
00044     std::map<winrt::DispatcherTimer, uint32_t> m_keepAliveTimersMap;
00045     std::map<uint32_t, winrt::IVector<winrt::ItemCollectionTransition>> m_transitionsMap;
00046     std::map<uint32_t, winrt::IVector<winrt::ItemCollectionTransition>> m_transitionsWithAnimationsMap;
00047     winrt::CompositionTarget::Rendering_revoker m_rendering{};
00048 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBadgeTests Member List

This is the complete list of members for InfoBadgeTests, including all inherited members.
InfoBadgeDisplayKindTest() | InfoBadgeTests | [inline]
InfoBadgeSupportsAllIconTypes() | InfoBadgeTests | [inline]
InfoBadgeValueLessThanNegativeOneCrashes() | InfoBadgeTests | [inline]
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/PointerInfo.h Source File

  • File List
  • File Members
  • Common

PointerInfo.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include <Flags_Enum.h>
00007
00008 enum class PointerOverStatus
00009 {
00010     None  = 0x00,
00011     Touch = 0x01,
00012     Pen   = 0x02,
00013     Mouse = 0x04
00014 };
00015
00016 enum class PointerPressedStatus
00017 {
00018     None             = 0x00,
00019     LeftMouseButton  = 0x01,
00020     RightMouseButton = 0x02,
00021     Pointer          = 0x04
00022 };
00023
00024 template <>
00025 struct is_flags_enum<PointerOverStatus>
00026 {
00027     static constexpr bool value = true;
00028 };
00029
00030 template <>
00031 struct is_flags_enum<PointerPressedStatus>
00032 {
00033     static constexpr bool value = true;
00034 };
00035
00036 template<typename T>
00037 class PointerInfo
00038 {
00039 public:
00040     /* Use this constructor if pointer capturing is added through
00041        CapturedPointer/SetCapturedPointer/m_capturedPointer members below.
00042     PointerInfo(const ITrackerHandleManager* owner) : m_owner(owner)
00043     {
00044     }
00045     */
00046
00047     PointerInfo()
00048     {
00049     }
00050
00051     ~PointerInfo()
00052     {
00053     }
00054
00055     bool IsPointerOver() const
00056     {
00057         return m_pointerOverStatus != PointerOverStatus::None;
00058     }
00059
00060     bool IsTouchPointerOver() const
00061     {
00062         return flags_enum::is_set(m_pointerOverStatus, PointerOverStatus::Touch);
00063     }
00064
00065     bool IsPenPointerOver() const
00066     {
00067         return flags_enum::is_set(m_pointerOverStatus, PointerOverStatus::Pen);
00068     }
00069
00070     bool IsMousePointerOver() const
00071     {
00072         return flags_enum::is_set(m_pointerOverStatus, PointerOverStatus::Mouse);
00073     }
00074
00075     void SetIsTouchPointerOver()
00076     {
00077         m_pointerOverStatus = flags_enum::set(m_pointerOverStatus, PointerOverStatus::Touch);
00078     }
00079
00080     void ResetIsTouchPointerOver()
00081     {
00082         m_pointerOverStatus = flags_enum::unset(m_pointerOverStatus, PointerOverStatus::Touch);
00083     }
00084
00085     void SetIsPenPointerOver()
00086     {
00087         m_pointerOverStatus = flags_enum::set(m_pointerOverStatus, PointerOverStatus::Pen);
00088     }
00089
00090     void ResetIsPenPointerOver()
00091     {
00092         m_pointerOverStatus = flags_enum::unset(m_pointerOverStatus, PointerOverStatus::Pen);
00093     }
00094
00095     void SetIsMousePointerOver()
00096     {
00097         m_pointerOverStatus = flags_enum::set(m_pointerOverStatus, PointerOverStatus::Mouse);
00098     }
00099
00100     void ResetIsMousePointerOver()
00101     {
00102         m_pointerOverStatus = flags_enum::unset(m_pointerOverStatus, PointerOverStatus::Mouse);
00103     }
00104
00105     bool IsPressed() const
00106     {
00107         return m_pointerPressedStatus != PointerPressedStatus::None;
00108     }
00109
00110     bool IsMouseButtonPressed(bool isForLeftMouseButton) const
00111     {
00112         return isForLeftMouseButton ? flags_enum::is_set(m_pointerPressedStatus, PointerPressedStatus::LeftMouseButton) : flags_enum::is_set(m_pointerPressedStatus, PointerPressedStatus::RightMouseButton);
00113     }
00114
00115     void SetIsMouseButtonPressed(bool isForLeftMouseButton)
00116     {
00117         if (isForLeftMouseButton)
00118         {
00119             m_pointerPressedStatus = flags_enum::set(m_pointerPressedStatus, PointerPressedStatus::LeftMouseButton);
00120         }
00121         else
00122         {
00123             m_pointerPressedStatus = flags_enum::set(m_pointerPressedStatus, PointerPressedStatus::RightMouseButton);
00124         }
00125     }
00126
00127     void ResetIsMouseButtonPressed(bool isForLeftMouseButton)
00128     {
00129         if (isForLeftMouseButton)
00130         {
00131             m_pointerPressedStatus = flags_enum::unset(m_pointerPressedStatus, PointerPressedStatus::LeftMouseButton);
00132         }
00133         else
00134         {
00135             m_pointerPressedStatus = flags_enum::unset(m_pointerPressedStatus, PointerPressedStatus::RightMouseButton);
00136         }
00137     }
00138
00139     void SetPointerPressed()
00140     {
00141         m_pointerPressedStatus = flags_enum::set(m_pointerPressedStatus, PointerPressedStatus::Pointer);
00142     }
00143
00144     void ResetPointerPressed()
00145     {
00146         m_pointerPressedStatus = flags_enum::unset(m_pointerPressedStatus, PointerPressedStatus::Pointer);
00147     }
00148
00149     bool IsTrackingPointer() const
00150     {
00151         return m_trackedPointerId != 0;
00152     }
00153
00154     bool IsPointerIdTracked(uint32_t pointerId) const
00155     {
00156         return m_trackedPointerId == pointerId;
00157     }
00158
00159     void TrackPointerId(uint32_t pointerId)
00160     {
00161         MUX_ASSERT(m_trackedPointerId == 0);
00162
00163         m_trackedPointerId = pointerId;
00164     }
00165
00166     void ResetTrackedPointerId()
00167     {
00168         m_trackedPointerId = 0;
00169     }
00170
00171     void ResetAll()
00172     {
00173         m_trackedPointerId = 0;
00174         m_pointerOverStatus = PointerOverStatus::None;
00175         m_pointerPressedStatus = PointerPressedStatus::None;
00176     }
00177
00178     /* Uncomment when pointer capturing becomes necessary.
00179     winrt::Pointer CapturedPointer() const
00180     {
00181         return m_capturedPointer.get();
00182     }
00183
00184     void SetCapturedPointer(const winrt::Pointer& pointer)
00185     {
00186         m_capturedPointer = pointer;
00187     }
00188     */
00189
00190 private:
00191     //const ITrackerHandleManager* m_owner;
00192     //tracker_ref<winrt::Pointer> m_capturedPointer{ m_owner };
00193     uint32_t m_trackedPointerId{ 0 };
00194     PointerOverStatus m_pointerOverStatus{ PointerOverStatus::None };
00195     PointerPressedStatus m_pointerPressedStatus{ PointerPressedStatus::None };
00196 };
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderTests Member List

This is the complete list of members for ExpanderTests, including all inherited members.
ExpanderAutomationPeerTest() ExpanderTests [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewDynamicPage Member List

This is the complete list of members for ScrollViewDynamicPage, including all inherited members.
AppendAsyncEventMessage(string asyncEventMessage) | ScrollViewDynamicPage | [inline, private]
AppendAsyncEventMessage() | ScrollViewDynamicPage | [inline, private]
asyncEventReportingLock | ScrollViewDynamicPage | [private]
border | ScrollViewDynamicPage | [private]
BtnAddIrregularSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnAddRepeatedSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnClearSnapPoints_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetComputedHorizontalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetComputedVerticalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentActualHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentActualWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentDesiredSize_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentMinHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentMinWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentOrientation_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentPadding_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentRenderSize_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetCurrentAnchor_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetExtentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetExtentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetHorizontalOffset_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetHorizontalScrollChainMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetHorizontalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetHorizontalScrollRailMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetIgnoredInputKinds_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetMargin_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetMaxZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetMinZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetPadding_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetVerticalOffset_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetVerticalScrollChainMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetVerticalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetVerticalScrollRailMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetZoomChainMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnGetZoomMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentMinHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentMinWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentOrientation_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentPadding_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetHeight_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetHorizontalScrollChainMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetHorizontalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetHorizontalScrollRailMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetIgnoredInputKinds_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetMargin_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetMaxZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetMinZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetPadding_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetVerticalScrollChainMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetVerticalScrollMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetVerticalScrollRailMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetWidth_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetZoomChainMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
BtnSetZoomMode_Click(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
button | ScrollViewDynamicPage | [private]
ChkAutoHideScrollControllers_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkAutoHideScrollControllers_Indeterminate(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkAutoHideScrollControllers_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkContentProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkContentProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkIsEnabled_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkIsEnabled_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkIsTabStop_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkIsTabStop_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogContentEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogContentEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkScrollPresenterClonedProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkScrollPresenterClonedProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkScrollViewProperties_Checked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ChkScrollViewProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbContent_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbContentHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbContentManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbContentVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbHorizontalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbSnapPointKind_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbVerticalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
CmbXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewDynamicPage | [inline, private]
Content_PointerWheelChanged(object sender, PointerRoutedEventArgs args) | ScrollViewDynamicPage | [inline, private]
contentPointerWheelChangedEventHandler | ScrollViewDynamicPage | [private]
CreateChildren() | ScrollViewDynamicPage | [inline, private]
GetThicknessFromString(string thickness) | ScrollViewDynamicPage | [inline, private]
largeImg | ScrollViewDynamicPage | [private]
lstAsyncEventMessage | ScrollViewDynamicPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollViewDynamicPage | [inline, private]
MuxRailModeToWuxRailMode(ScrollingRailMode muxRailingMode) | ScrollViewDynamicPage | [inline, private]
MuxScrollBarVisibilityToWuxScrollBarVisibility(ScrollingScrollBarVisibility muxScrollBarVisibility) | ScrollViewDynamicPage | [inline, private]
MuxScrollModeToWuxScrollMode(ScrollingScrollMode muxScrollMode) | ScrollViewDynamicPage | [inline, private]
MuxZoomModeToWuxZoomMode(ScrollingZoomMode muxZoomMode) | ScrollViewDynamicPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollViewDynamicPage | [inline, protected]
rectangle | ScrollViewDynamicPage | [private]
ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args) | ScrollViewDynamicPage | [inline, private]
ScrollPresenter_PointerWheelChanged(object sender, PointerRoutedEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollPresenter_ScrollStarting(ScrollPresenter sender, ScrollingScrollStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollViewDynamicPage | [inline, private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollViewDynamicPage | [inline, private]
ScrollPresenter_ZoomAnimationStarting(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollPresenter_ZoomStarting(ScrollPresenter sender, ScrollingZoomStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
scrollPresenterPointerWheelChangedEventHandler | ScrollViewDynamicPage | [private]
scrollView | ScrollViewDynamicPage | [private]
ScrollView_ExtentChanged(ScrollView sender, object args) | ScrollViewDynamicPage | [inline, private]
ScrollView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollView_GotFocus(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ScrollView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollView_LostFocus(object sender, RoutedEventArgs e) | ScrollViewDynamicPage | [inline, private]
ScrollView_PointerWheelChanged(object sender, PointerRoutedEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollView_ScrollStarting(ScrollView sender, ScrollingScrollStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollView_StateChanged(ScrollView sender, object args) | ScrollViewDynamicPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | ScrollViewDynamicPage | [inline, private]
ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollView_ZoomStarting(ScrollView sender, ScrollingZoomStartingEventArgs args) | ScrollViewDynamicPage | [inline, private]
ScrollViewDynamicPage() | ScrollViewDynamicPage | [inline]
ScrollViewDynamicPage_Loaded(object sender, RoutedEventArgs args) | ScrollViewDynamicPage | [inline, private]
scrollViewPointerWheelChangedEventHandler | ScrollViewDynamicPage | [private]
sp1 | ScrollViewDynamicPage | [private]
sp2 | ScrollViewDynamicPage | [private]
UpdateBackground() | ScrollViewDynamicPage | [inline, private]
UpdateCmbContentHorizontalAlignment() | ScrollViewDynamicPage | [inline, private]
UpdateCmbContentManipulationMode() | ScrollViewDynamicPage | [inline, private]
UpdateCmbContentVerticalAlignment() | ScrollViewDynamicPage | [inline, private]
UpdateCmbHorizontalScrollBarVisibility() | ScrollViewDynamicPage | [inline, private]
UpdateCmbVerticalScrollBarVisibility() | ScrollViewDynamicPage | [inline, private]
UpdateCmbXYFocusKeyboardNavigation() | ScrollViewDynamicPage | [inline, private]
UpdateContent() | ScrollViewDynamicPage | [inline, private]
UpdateContentOrientation() | ScrollViewDynamicPage | [inline, private]
UpdateExtentHeight() | ScrollViewDynamicPage | [inline, private]
UpdateExtentWidth() | ScrollViewDynamicPage | [inline, private]
UpdateHeight() | ScrollViewDynamicPage | [inline, private]
UpdateHorizontalAnchorRatio() | ScrollViewDynamicPage | [inline, private]
UpdateHorizontalOffset() | ScrollViewDynamicPage | [inline, private]
UpdateHorizontalScrollChainMode() | ScrollViewDynamicPage | [inline, private]
UpdateHorizontalScrollMode() | ScrollViewDynamicPage | [inline, private]
UpdateHorizontalScrollRailMode() | ScrollViewDynamicPage | [inline, private]
UpdateIgnoredInputKinds() | ScrollViewDynamicPage | [inline, private]
UpdateMargin() | ScrollViewDynamicPage | [inline, private]
UpdateMaxZoomFactor() | ScrollViewDynamicPage | [inline, private]
UpdateMinZoomFactor() | ScrollViewDynamicPage | [inline, private]
UpdatePadding() | ScrollViewDynamicPage | [inline, private]
UpdateTblComputedHorizontalScrollMode() | ScrollViewDynamicPage | [inline, private]
UpdateTblComputedVerticalScrollMode() | ScrollViewDynamicPage | [inline, private]
UpdateVerticalAnchorRatio() | ScrollViewDynamicPage | [inline, private]
UpdateVerticalOffset() | ScrollViewDynamicPage | [inline, private]
UpdateVerticalScrollChainMode() | ScrollViewDynamicPage | [inline, private]
UpdateVerticalScrollMode() | ScrollViewDynamicPage | [inline, private]
UpdateVerticalScrollRailMode() | ScrollViewDynamicPage | [inline, private]
UpdateWidth() | ScrollViewDynamicPage | [inline, private]
UpdateZoomChainMode() | ScrollViewDynamicPage | [inline, private]
UpdateZoomFactor() | ScrollViewDynamicPage | [inline, private]
UpdateZoomMode() | ScrollViewDynamicPage | [inline, private]
UseScrollView(ScrollView sv2) | ScrollViewDynamicPage | [inline, private]
viewbox | ScrollViewDynamicPage | [private]
wuxBorder | ScrollViewDynamicPage | [private]
wuxButton | ScrollViewDynamicPage | [private]
wuxLargeImg | ScrollViewDynamicPage | [private]
wuxRectangle | ScrollViewDynamicPage | [private]
wuxSp1 | ScrollViewDynamicPage | [private]
wuxSp2 | ScrollViewDynamicPage | [private]
wuxViewbox | ScrollViewDynamicPage | [private]
~ScrollViewDynamicPage() | ScrollViewDynamicPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarPage Member List

This is the complete list of members for SelectorBarPage, including all inherited members.
CmbSelectorBarOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | SelectorBarPage | [inline, private]
SelectorBarPage() | SelectorBarPage | [inline]
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/pch.h Source File

  • File List
  • File Members
  • dll

pch.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #define NOMINMAX
00007
00008 // By default C++/WinRT will include some extra source and type info in the exception structs that it creates.
00009 // This is useful diagnostic info, but it comes at a high cost due to the fact that it breaks COMDAT folding
00010 // due to template functions that would previously compile down to identical binary code (which gets folded by
00011 // the compiler) now end up unique for each instantiation of the template.
00012 // This bloats the file size of MUXC.dll by 50%, so we turn this C++/WinRT feature off.
00013 #define WINRT_NO_SOURCE_LOCATION
00014
00015 #pragma warning(disable : 6221) // Disable implicit cast warning for C++/WinRT headers (tracked by Bug 17528784: C++/WinRT headers trigger C6221 comparing e.code() to int-typed things)
00016
00017 // Disable factory caching in CppWinRT as the global COM pointers that are released during dll/process
00018 // unload are not safe. Setting this makes CppWinRT just call get_activation_factory directly every time.
00019 #define WINRT_DISABLE_FACTORY_CACHE 1
00020
00021 #include "targetver.h"
00022
00023 #include "BuildMacros.h"
00024
00025 #ifndef WIN32_LEAN_AND_MEAN
00026 #define WIN32_LEAN_AND_MEAN
00027 #endif
00028
00029 #include <windows.h>
00030
00031 // Basic WinRT ABI things -- without including all of WRL
00032 #include <inspectable.h>
00033 #include <hstring.h>
00034 #include <eventtoken.h>
00035 #include <activation.h>
00036 #include <weakreference.h>
00037 #include <guiddef.h>
00038
00039 #ifdef DBG
00040 // Copied from dxaml\xcp\components\base\inc\AssertMacros.h to avoid taking a dependency.
00041 #define XCPW(x) L##x
00042
00043 #define ASSERT(cond, ...) \
00044     do { \
00045         _Analysis_assume_(!!(cond)); \
00046         __pragma(warning(suppress:4127)) \
00047         if(!(cond)) \
00048         { \
00049             FAIL_ASSERT_HERE(XCPW(#cond)); \
00050         } \
00051     } \
00052     __pragma(warning(suppress:4127)) \
00053     while(0)
00054
00055 #define FAIL_ASSERT_HERE(x) \
00056     do { \
00057         __annotation(L"Debug", L"AssertFail", (x)); \
00058         DbgRaiseAssertionFailure(); \
00059     } \
00060     __pragma(warning(suppress:4127)) \
00061     while(0)
00062
00063 #define MUX_ASSERT(X) ASSERT(X)
00064 #define MUX_ASSERT_MSG(X, MSG) ASSERT(X)
00065 #define MUX_ASSERT_NOASSUME(X) ASSERT(X)
00066 #else
00067 #define MUX_ASSERT(X)
00068 #define MUX_ASSERT_MSG(X, MSG)
00069 #define MUX_ASSERT_NOASSUME(X)
00070 #endif //DBG
00071
00072 #define MUX_FAIL_FAST() RaiseFailFastException(nullptr, nullptr, 0);
00073 #define MUX_FAIL_FAST_MSG(MSG) RaiseFailFastException(nullptr, nullptr, 0);
00074
00075 #include "gsl/gsl"
00076
00077 // Microsoft.UI.Xaml.h accesses LoadLibrary in its inline declaration of CreateXamlUiPresenter
00078 // Accessing LoadLibrary is not always allowed (e.g. on phone), so we need to suppress that.
00079 // We can do so by making this define prior to including the header.
00080 #define CREATE_XAML_UI_PRESENTER_API
00081 #include <Microsoft.UI.Xaml.Hosting.ReferenceTracker.h>
00082 #include <Windows.Foundation.h>
00083
00084 #include <WindowsNumerics.h>
00085
00086 #include <strsafe.h>
00087 #include <robuffer.h>
00088
00089 #include <wil/common.h>
00090
00091 // STL
00092 #include <vector>
00093 #include <map>
00094 #include <functional>
00095
00096 #define _USE_MATH_DEFINES
00097 #include <cmath>
00098 #define M_PI       3.14159265358979323846   // pi
00099 #define M_PI_2     1.57079632679489661923   // pi/2
00100
00101 #define WI_IS_FEATURE_PRESENT(FeatureName) 1
00102
00103 #undef GetCurrentTime
00104
00105 #include "CppWinRTIncludes.h"
00106
00107 // This function is a compile time optimization. These GUID calculations are very expensive (each takes about .5-1s to compile)
00108 // and many appear in multiple compilation units so the work is duplicated across invocations of the compiler. I used the
00109 // MSVC compiler option "/d1reportTime" to get a dump of all the work and then searched for "pinterface_guid" invocations to
00110 // determine the set of things to put here.
00111 void constexpr specialize_guids()
00112 {
00113     winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<bool>>();
00114     winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<struct winrt::hstring>>();
00115     winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<struct winrt::Windows::Storage::Streams::IRandomAccessStreamWithContentType>>();
00116     winrt::guid_of<struct winrt::Windows::Foundation::AsyncOperationCompletedHandler<unsigned int>>();
00117     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::hstring>>();
00118
00119 #ifdef REPEATER_INCLUDED
00120     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::IndexPath>>();
00121     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemCollectionTransitionTriggers>>();
00122     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVectorView<struct winrt::Microsoft::UI::Xaml::Controls::IndexPath>>();
00123     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::IndexPath>>();
00124     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ElementRealizationOptions>>();
00125     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::IndexBasedLayoutOrientation>>();
00126     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::FlowLayoutLineAlignment>>();
00127     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsJustification>>();
00128     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::UniformGridLayoutItemsStretch>>();
00129     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsJustification>>();
00130     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::LinedFlowLayoutItemsStretch>>();
00131     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Layout, struct winrt::Windows::Foundation::IInspectable>>();
00132 #endif
00133
00134 #ifdef TREEVIEW_INCLUDED
00135     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
00136     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
00137     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
00138     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
00139     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode>>();
00140     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode, struct winrt::Windows::Foundation::Collections::IVectorChangedEventArgs>>();
00141     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode, struct winrt::Windows::Foundation::IInspectable>>();
00142     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TreeViewNode, struct winrt::Microsoft::UI::Xaml::DependencyPropertyChangedEventArgs>>();
00143 #endif
00144
00145 #ifdef MENUBAR_INCLUDED
00146     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
00147     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
00148     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
00149     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
00150     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::MenuBarItem>>();
00151 #endif
00152
00153 #ifdef SCROLLPRESENTER_INCLUDED
00154     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
00155     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
00156     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
00157     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
00158     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
00159     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
00160     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
00161     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
00162     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
00163     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
00164     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
00165     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
00166     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>>();
00167     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>>();
00168     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>();
00169     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingInteractionState>>();
00170     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment>>();
00171     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs>>();
00172     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs>>();
00173     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs>>();
00174     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs>>();
00175     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, struct winrt::Windows::Foundation::IInspectable>>();
00176     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Private::Controls::ScrollPresenterTestHooksAnchorEvaluatedEventArgs>>();
00177     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Private::Controls::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs>>();
00178     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingAnchorRequestedEventArgs>>();
00179     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingBringingIntoViewEventArgs>>();
00180     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollAnimationStartingEventArgs>>();
00181     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomAnimationStartingEventArgs>>();
00182     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollCompletedEventArgs>>();
00183     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomCompletedEventArgs>>();
00184     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, struct winrt::Windows::Foundation::IInspectable>>();
00185 #endif
00186
00187 #ifdef SWIPECONTROL_INCLUDED
00188     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
00189     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
00190     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
00191     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
00192     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SwipeItem>>();
00193     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::SwipeBehaviorOnInvoked>>();
00194     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::SwipeMode>>();
00195     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SwipeControl, struct winrt::Windows::Foundation::IInspectable>>();
00196 #endif
00197
00198 #ifdef COLORPICKER_INCLUDED
00199     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ColorPickerHsvChannel>>();
00200     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents>>();
00201     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape>>();
00202     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum, struct winrt::Microsoft::UI::Xaml::Controls::ColorChangedEventArgs>>();
00203 #endif
00204
00205 #ifdef NAVIGATIONVIEW_INCLUDED
00206     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackButtonVisible>>();
00207     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewDisplayMode>>();
00208     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewOverflowLabelMode>>();
00209     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewPaneDisplayMode>>();
00210     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewSelectionFollowsFocus>>();
00211     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::NavigationViewShoulderNavigationEnabled>>();
00212 #endif
00213
00214 #ifdef PARALLAXVIEW_INCUDED
00215     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ParallaxSourceOffsetKind>>();
00216 #endif
00217
00218 #ifdef PULLTOREFRESH_INCLUDED
00219     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::RefreshPullDirection>>();
00220     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerOrientation>>();
00221     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizerState>>();
00222     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Private::Controls::IRefreshInfoProvider, struct winrt::Microsoft::UI::Xaml::Controls::RefreshInteractionRatioChangedEventArgs>>();
00223     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Private::Controls::IRefreshInfoProvider, struct winrt::Windows::Foundation::IInspectable>>();
00224     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::RefreshVisualizer, struct winrt::Microsoft::UI::Xaml::Controls::RefreshRequestedEventArgs>>();
00225 #endif
00226
00227 #ifdef SELECTORBAR_INCLUDED
00228     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
00229     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
00230     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
00231     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
00232     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SelectorBarItem>>();
00233 #endif
00234
00235 #ifdef SCROLLVIEW_INCLUDED
00236     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility>>();
00237     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode>>();
00238     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds>>();
00239     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode>>();
00240     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode>>();
00241     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode>>();
00242 #endif
00243
00244 #ifdef ITEMSVIEW_INCLUDED
00245     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemsViewSelectionMode>>();
00246 #endif
00247
00248 #ifdef ITEMCONTAINER_INCLUDED
00249     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerMultiSelectMode>>();
00250     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerInteractionTrigger>>();
00251     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerUserSelectMode>>();
00252     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::ItemContainerUserInvokeMode>>();
00253 #endif
00254
00255 #ifdef TWOPANEVIEW_INCLUDED
00256     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewMode>>();
00257     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewPriority>>();
00258     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewTallModeConfiguration>>();
00259     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::TwoPaneViewWideModeConfiguration>>();
00260 #endif
00261
00262 #ifdef MATERIALS_INCLUDED
00263     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Media::RevealBrushState>>();
00264 #endif
00265
00266     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Foundation::IInspectable, struct winrt::Microsoft::UI::Private::Controls::MUXControlsTestHooksLoggingMessageEventArgs>>();
00267
00268     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Windows::Foundation::Collections::IKeyValuePair<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate> >>();
00269     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Windows::Foundation::IInspectable>>();
00270     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
00271     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
00272     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationPeer>>();
00273     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
00274     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
00275     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::DependencyObject>>();
00276     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterable<struct winrt::Microsoft::UI::Xaml::UIElement>>();
00277     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::hstring>>();
00278     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Windows::Foundation::Collections::IKeyValuePair<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate> >>();
00279     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Windows::Foundation::IInspectable>>();
00280     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
00281     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
00282     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationPeer>>();
00283     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
00284     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
00285     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::DependencyObject>>();
00286     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IIterator<struct winrt::Microsoft::UI::Xaml::UIElement>>();
00287     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IKeyValuePair<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate>>();
00288     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::hstring>>();
00289     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Windows::Foundation::IInspectable>>();
00290     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Windows::Graphics::Imaging::BitmapTypedValue>>();
00291     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Microsoft::UI::Composition::ICompositionAnimationBase>>();
00292     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate>>();
00293     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMap<struct winrt::Windows::Foundation::IInspectable,struct winrt::Windows::Foundation::IInspectable>>();
00294     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IMapView<struct winrt::hstring,struct winrt::Microsoft::UI::Xaml::DataTemplate>>();
00295     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Windows::Foundation::IInspectable>>();
00296     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
00297     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
00298     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IObservableVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
00299     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<double>>();
00300     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::hstring>>();
00301     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Windows::Foundation::IInspectable>>();
00302     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Windows::Foundation::Point>>();
00303     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
00304     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Composition::Interactions::InteractionTrackerInertiaModifier>>();
00305     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationPeer>>();
00306     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
00307     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
00308     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::ColorKeyFrame>>();
00309     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::DoubleKeyFrame>>();
00310     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::ObjectKeyFrame>>();
00311     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::PointKeyFrame>>();
00312     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::Timeline>>();
00313     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Animation::Transition>>();
00314     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Brush>>();
00315     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Geometry>>();
00316     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::GradientStop>>();
00317     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::PathFigure>>();
00318     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::PathSegment>>();
00319     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::Media::Transform>>();
00320     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::TriggerAction>>();
00321     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVector<struct winrt::Microsoft::UI::Xaml::UIElement>>();
00322     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVectorView<struct winrt::Windows::Foundation::IInspectable>>();
00323     winrt::guid_of<struct winrt::Windows::Foundation::Collections::IVectorView<struct winrt::Microsoft::UI::Composition::Interactions::CompositionConditionalValue>>();
00324     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Windows::Foundation::IInspectable>>();
00325     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ICommandBarElement>>();
00326     winrt::guid_of<struct winrt::Windows::Foundation::Collections::VectorChangedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::MenuFlyoutItemBase>>();
00327     winrt::guid_of<struct winrt::Windows::Foundation::EventHandler<struct winrt::Windows::Foundation::IInspectable>>();
00328     winrt::guid_of<struct winrt::Windows::Foundation::EventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs>>();
00329     winrt::guid_of<struct winrt::Windows::Foundation::EventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs>>();
00330     winrt::guid_of<struct winrt::Windows::Foundation::IReference<bool>>();
00331     winrt::guid_of<struct winrt::Windows::Foundation::IReference<winrt::TimeSpan>>();
00332     winrt::guid_of<struct winrt::Windows::Foundation::IReference<double>>();
00333     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Windows::UI::Text::FontStyle>>();
00334     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::ApplicationTheme>>();
00335     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Automation::ExpandCollapseState>>();
00336     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Orientation>>();
00337     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode>>();
00338     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Controls::Symbol>>();
00339     winrt::guid_of<struct winrt::Windows::Foundation::IReference<enum winrt::Microsoft::UI::Xaml::Visibility>>();
00340     winrt::guid_of<struct winrt::Windows::Foundation::IReference<float>>();
00341     winrt::guid_of<struct winrt::Windows::Foundation::IReference<int>>();
00342     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::hstring>>();
00343     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Numerics::float2>>();
00344     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Numerics::float3>>();
00345     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Numerics::float4>>();
00346     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Point>>();
00347     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::Foundation::Rect>>();
00348     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::UI::Color>>();
00349     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::UI::Text::FontWeight>>();
00350     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::CornerRadius>>();
00351     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::GridLength>>();
00352     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::Input::KeyEventHandler>>();
00353     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::Input::PointerEventHandler>>();
00354     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Windows::UI::Xaml::Interop::TypeName>>();
00355     winrt::guid_of<struct winrt::Windows::Foundation::IReference<struct winrt::Microsoft::UI::Xaml::Thickness>>();
00356     winrt::guid_of<struct winrt::Windows::Foundation::IReference<unsigned int>>();
00357     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::ApplicationModel::Core::CoreApplicationViewTitleBar,struct winrt::Windows::Foundation::IInspectable>>();
00358     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Foundation::IInspectable,struct winrt::Windows::Foundation::IInspectable>>();
00359     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Foundation::IInspectable,struct winrt::Microsoft::UI::Composition::CompositionBatchCompletedEventArgs>>();
00360     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::Graphics::Display::DisplayInformation,struct winrt::Windows::Foundation::IInspectable>>();
00361     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Composition::CompositionCapabilities,struct winrt::Windows::Foundation::IInspectable>>();
00362     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreDispatcher,struct winrt::Windows::UI::Core::AcceleratorKeyEventArgs>>();
00363     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreWindow,struct winrt::Windows::UI::Core::KeyEventArgs>>();
00364     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreWindow,struct winrt::Windows::UI::Core::PointerEventArgs>>();
00365     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::Core::CoreWindow,struct winrt::Windows::UI::Core::VisibilityChangedEventArgs>>();
00366     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Windows::UI::ViewManagement::UISettings,struct winrt::Windows::Foundation::IInspectable>>();
00367     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Control,struct winrt::Microsoft::UI::Xaml::Controls::FocusDisengagedEventArgs>>();
00368     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Control,struct winrt::Microsoft::UI::Xaml::Controls::FocusEngagedEventArgs>>();
00369     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ListViewBase,struct winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs>>();
00370     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::ListViewBase,struct winrt::Microsoft::UI::Xaml::Controls::DragItemsCompletedEventArgs>>();
00371     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase,struct winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBaseClosingEventArgs>>();
00372     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SplitView,struct winrt::Windows::Foundation::IInspectable>>();
00373     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::SplitView,struct winrt::Microsoft::UI::Xaml::Controls::SplitViewPaneClosingEventArgs>>();
00374     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Controls::TextBox,struct winrt::Microsoft::UI::Xaml::Controls::TextBoxTextChangingEventArgs>>();
00375     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::FrameworkElement,struct winrt::Microsoft::UI::Xaml::EffectiveViewportChangedEventArgs>>();
00376     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::Input::XamlUICommand,struct winrt::Microsoft::UI::Xaml::Input::ExecuteRequestedEventArgs>>();
00377     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::UIElement,struct winrt::Microsoft::UI::Xaml::BringIntoViewRequestedEventArgs>>();
00378     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::UIElement,struct winrt::Microsoft::UI::Xaml::Input::AccessKeyInvokedEventArgs>>();
00379     winrt::guid_of<struct winrt::Windows::Foundation::TypedEventHandler<struct winrt::Microsoft::UI::Xaml::UIElement,struct winrt::Microsoft::UI::Xaml::Input::GettingFocusEventArgs>>();
00380 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollingScrollCompletedEventArgs Member List

This is the complete list of members for ScrollingScrollCompletedEventArgs, including all inherited members.
CorrelationId() | ScrollingScrollCompletedEventArgs |
OffsetsChangeCorrelationId(int32_t offsetsChangeCorrelationId) | ScrollingScrollCompletedEventArgs |
Result() | ScrollingScrollCompletedEventArgs |
Result(ScrollPresenterViewChangeResult result) | ScrollingScrollCompletedEventArgs |
ScrollingScrollCompletedEventArgs() | ScrollingScrollCompletedEventArgs | [inline]
~ScrollingScrollCompletedEventArgs() | ScrollingScrollCompletedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsSourceView.properties.h Source File

  • File List
  • File Members
  • Generated

ItemsSourceView.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ItemsSourceViewProperties
00008 {
00009 public:
00010     ItemsSourceViewProperties();
00011
00012
00013
00014     winrt::event_token CollectionChanged(winrt::NotifyCollectionChangedEventHandler const& value);
00015     void CollectionChanged(winrt::event_token const& token);
00016
00017     event_source<winrt::NotifyCollectionChangedEventHandler> m_collectionChangedEventSource;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs.h"
00007
00008 ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs::ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs(
00009     bool isExpressionAnimationStarted, wstring_view const& propertyName)
00010 {
00011     m_isExpressionAnimationStarted = isExpressionAnimationStarted;
00012     m_propertyName = propertyName.data();
00013 }
00014
00015 #pragma region IScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs
00016
00017 bool ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs::IsExpressionAnimationStarted()
00018 {
00019     return m_isExpressionAnimationStarted;
00020 }
00021
00022 winrt::hstring ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs::PropertyName()
00023 {
00024     return m_propertyName;
00025 }
00026
00027 #pragma endregion
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTests::TestDataSource Member List

This is the complete list of members for ScrollPresenterTests::TestDataSource, including all inherited members.
Add(object value) | CustomItemsSourceView | [inline]
Clear() | CustomItemsSourceView | [inline]
CollectionChanged | CustomItemsSourceView |
Contains(object value) | CustomItemsSourceView | [inline]
CopyTo(Array array, int index) | CustomItemsSourceView | [inline]
Count | CustomItemsSourceView |
GetAtCore(int index) | ScrollPresenterTests::TestDataSource | [inline, protected, virtual]
GetEnumerator() | CustomItemsSourceView | [inline]
GetSizeCore() | ScrollPresenterTests::TestDataSource | [inline, protected, virtual]
IndexFromKey(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
IndexFromKeyCore(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline, protected, virtual]
IndexOf(object value) | CustomItemsSourceView | [inline]
Inner | ScrollPresenterTests::TestDataSource |
Insert(int index, int count) | ScrollPresenterTests::TestDataSource | [inline]
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping::Insert(int index, object value) | CustomItemsSourceView | [inline]
IsFixedSize | CustomItemsSourceView |
IsReadOnly | CustomItemsSourceView |
IsSynchronized | CustomItemsSourceView |
KeyFromIndex(int index) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
KeyFromIndexCore(int index) | ScrollPresenterTests::TestDataSource | [inline, protected, virtual]
OnItemsSourceChanged(NotifyCollectionChangedEventArgs args) | CustomItemsSourceView | [inline, protected]
Remove(int index, int count) | ScrollPresenterTests::TestDataSource | [inline]
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping::Remove(object value) | CustomItemsSourceView | [inline]
RemoveAt(int index) | CustomItemsSourceView | [inline]
SyncRoot | CustomItemsSourceView |
TestDataSource(List< string > source) | ScrollPresenterTests::TestDataSource | [inline]
this | CustomItemsSourceView |
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/SharedHelpers.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

SharedHelpers.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Text;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Markup;
00011
00012 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00013 {
00014     public enum ScrollOrientation
00015     {
00016         Vertical,
00017         Horizontal
00018     }
00019
00020     public static class SharedHelpers
00021     {
00022         public static DataTemplate GetDataTemplate(string content)
00023         {
00024             return (DataTemplate)XamlReader.Load(
00025                        string.Format(@"<DataTemplate
00026                             xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00027                            {0}
00028                         </DataTemplate>", content));
00029         }
00030
00031         public static void RunActionsWithWait(Action[] actions)
00032         {
00033             foreach (var action in actions)
00034             {
00035                 RunOnUIThread.Execute(() =>
00036                 {
00037                     action();
00038                 });
00039
00040                 IdleSynchronizer.Wait();
00041             }
00042         }
00043
00044         public static Orientation ToLayoutOrientation(this ScrollOrientation scrollOrientation)
00045         {
00046             return scrollOrientation == ScrollOrientation.Horizontal ? Orientation.Horizontal : Orientation.Vertical;
00047         }
00048
00049         public static Orientation ToOrthogonalLayoutOrientation(this ScrollOrientation scrollOrientation)
00050         {
00051             return scrollOrientation == ScrollOrientation.Horizontal ? Orientation.Vertical : Orientation.Horizontal;
00052         }
00053     }
00054 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTip.h Source File

  • File List
  • File Members
  • TeachingTip

TeachingTip.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "TeachingTipTemplateSettings.h"
00010
00011 #include "TeachingTip.g.h"
00012 #include "TeachingTip.properties.h"
00013
00014 class TeachingTip :
00015     public ReferenceTracker<TeachingTip, winrt::implementation::TeachingTipT>,
00016     public TeachingTipProperties
00017 {
00018
00019 public:
00020     TeachingTip();
00021
00022     // IFrameworkElement
00023     void OnApplyTemplate();
00024     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00025
00026     // ContentControl
00027     void OnContentChanged(const winrt::IInspectable& oldContent, const winrt::IInspectable& newContent);
00028
00029     // UIElement
00030     winrt::AutomationPeer OnCreateAutomationPeer();
00031
00032     tracker_ref<winrt::FrameworkElement> m_target{ this };
00033
00034     // TestHooks
00035     void SetExpandEasingFunction(const winrt::CompositionEasingFunction& easingFunction);
00036     void SetContractEasingFunction(const winrt::CompositionEasingFunction& easingFunction);
00037     void SetTipShouldHaveShadow(bool tipShadow);
00038     void SetContentElevation(float elevation);
00039     void SetTailElevation(float elevation);
00040     bool GetIsIdle();
00041     void SetIsIdle(bool isIdle);
00042     winrt::TeachingTipPlacementMode GetEffectivePlacement();
00043     winrt::TeachingTipHeroContentPlacementMode GetEffectiveHeroContentPlacement();
00044     double GetHorizontalOffset();
00045     double GetVerticalOffset();
00046     winrt::Visibility GetTitleVisibility();
00047     winrt::Visibility GetSubtitleVisibility();
00048     void SetUseTestWindowBounds(bool useTestWindowBounds);
00049     void SetTestWindowBounds(const winrt::Rect& testWindowBounds);
00050     void SetUseTestScreenBounds(bool useTestScreenBounds);
00051     void SetTestScreenBounds(const winrt::Rect& testScreenBounds);
00052     void SetTipFollowsTarget(bool tipFollowsTarget);
00053     void SetReturnTopForOutOfWindowPlacement(bool useScreenBoundsForAutoPlacement);
00054     void SetExpandAnimationDuration(const winrt::TimeSpan& expandAnimationDuration);
00055     void SetContractAnimationDuration(const winrt::TimeSpan& contractAnimationDuration);
00056
00057     bool m_isIdle{ true };
00058
00059     friend class TeachingTipTestHooks;
00060
00061 private:
00062     PropertyChanged_revoker m_automationNameChangedRevoker{};
00063     PropertyChanged_revoker m_automationIdChangedRevoker{};
00064     winrt::CoreDispatcher::AcceleratorKeyActivated_revoker m_acceleratorKeyActivatedRevoker{};
00065     winrt::UIElement::PreviewKeyDown_revoker m_previewKeyDownForF6Revoker{};
00066     // This handler is not required for Winui3 because the framework bug this works around has been fixed.
00067     winrt::UIElement::PreviewKeyDown_revoker m_popupPreviewKeyDownForF6Revoker{};
00068     winrt::UIElement::PreviewKeyDown_revoker m_lightDismissIndicatorPopupPreviewKeyDownForF6Revoker{};
00069     winrt::Button::Click_revoker m_closeButtonClickedRevoker{};
00070     winrt::Button::Click_revoker m_alternateCloseButtonClickedRevoker{};
00071     winrt::Button::Click_revoker m_actionButtonClickedRevoker{};
00072     winrt::FrameworkElement::SizeChanged_revoker m_contentSizeChangedRevoker{};
00073     winrt::FrameworkElement::EffectiveViewportChanged_revoker m_effectiveViewportChangedRevoker{};
00074     winrt::FrameworkElement::EffectiveViewportChanged_revoker m_targetEffectiveViewportChangedRevoker{};
00075     winrt::FrameworkElement::Loaded_revoker m_targetLoadedRevoker{};
00076     winrt::Popup::Opened_revoker m_popupOpenedRevoker{};
00077     winrt::Popup::Closed_revoker m_popupClosedRevoker{};
00078     winrt::Popup::Closed_revoker m_lightDismissIndicatorPopupClosedRevoker{};
00079     winrt::Grid::Loaded_revoker m_tailOcclusionGridLoadedRevoker{};
00080     winrt::XamlRoot::Changed_revoker m_xamlRootChangedRevoker{};
00081     winrt::FrameworkElement::ActualThemeChanged_revoker m_actualThemeChangedRevoker{};
00082
00083     void SetPopupAutomationProperties();
00084     void CreateLightDismissIndicatorPopup();
00085     bool UpdateTail();
00086     void PositionPopup();
00087     bool PositionTargetedPopup();
00088     bool PositionUntargetedPopup();
00089     void UpdateSizeBasedTemplateSettings();
00090     void UpdateButtonsState();
00091     void UpdateDynamicHeroContentPlacementToTop();
00092     void UpdateDynamicHeroContentPlacementToBottom();
00093     void UpdateDynamicHeroContentPlacementToTopImpl();
00094     void UpdateDynamicHeroContentPlacementToBottomImpl();
00095
00096     static void OnPropertyChanged(
00097         const winrt::DependencyObject& sender,
00098         const winrt::DependencyPropertyChangedEventArgs& args);
00099
00100     void OnIsOpenChanged();
00101     void IsOpenChangedToOpen();
00102     void IsOpenChangedToClose();
00103     void CreateNewPopup();
00104     void OnTargetChanged();
00105     void OnTailVisibilityChanged();
00106     void OnIconSourceChanged();
00107     void OnPlacementMarginChanged();
00108     void OnIsLightDismissEnabledChanged();
00109     void OnShouldConstrainToRootBoundsChanged();
00110     void OnHeroContentPlacementChanged();
00111
00112     void OnAutomationNameChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00113     void OnAutomationIdChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00114
00115     void OnContentSizeChanged(const winrt::IInspectable&, const winrt::SizeChangedEventArgs& args);
00116     void OnF6PreviewKeyDownClicked(const winrt::IInspectable&, const winrt::KeyRoutedEventArgs& args);
00117     void OnF6PopupPreviewKeyDownClicked(const winrt::IInspectable&, const winrt::KeyRoutedEventArgs& args);
00118     void OnF6AcceleratorKeyClicked(const winrt::CoreDispatcher&, const winrt::AcceleratorKeyEventArgs& args);
00119     bool HandleF6Clicked(bool fromPopup = false);
00120     void OnCloseButtonClicked(const winrt::IInspectable&, const winrt::RoutedEventArgs&);
00121     void OnActionButtonClicked(const winrt::IInspectable&, const winrt::RoutedEventArgs&);
00122     void OnPopupOpened(const winrt::IInspectable&, const winrt::IInspectable&);
00123     void OnPopupClosed(const winrt::IInspectable&, const winrt::IInspectable&);
00124     void OnLightDismissIndicatorPopupClosed(const winrt::IInspectable&, const winrt::IInspectable&);
00125
00126     void RaiseClosingEvent(bool attachDeferralCompletedHandler);
00127     void ClosePopupWithAnimationIfAvailable();
00128     void ClosePopup();
00129
00130     winrt::TeachingTipPlacementMode GetFlowDirectionAdjustedPlacement(const winrt::TeachingTipPlacementMode& placementMode);
00131
00132     void SetViewportChangedEvent(const gsl::strict_not_null<winrt::FrameworkElement>& target);
00133     void RevokeViewportChangedEvent();
00134     void XamlRootChanged(const winrt::XamlRoot&, const winrt::XamlRootChangedEventArgs&);
00135     void OnTargetLayoutUpdated(const winrt::IInspectable&, const winrt::IInspectable&);
00136     void OnTargetLoaded(const winrt::IInspectable&, const winrt::IInspectable&);
00137     void RepositionPopup();
00138     void ClosePopupOnUnloadEvent(winrt::IInspectable const&, winrt::RoutedEventArgs const& e);
00139     winrt::FrameworkElement::Unloaded_revoker m_TargetUnloadedRevoker;
00140
00141     void CreateExpandAnimation();
00142     void CreateContractAnimation();
00143
00144     void StartExpandToOpen();
00145     void StartContractToClose();
00146
00147     void UpdatePopupRequestedTheme();
00148
00149     std::tuple<winrt::TeachingTipPlacementMode, bool> DetermineEffectivePlacement();
00150     std::tuple<winrt::TeachingTipPlacementMode, bool> DetermineEffectivePlacementTargeted(double contentHight, double contentWidth);
00151     std::tuple<winrt::TeachingTipPlacementMode, bool> DetermineEffectivePlacementUntargeted(double contentHight, double contentWidth);
00152     std::tuple<winrt::Thickness, winrt::Thickness> DetermineSpaceAroundTarget();
00153     winrt::Rect GetEffectiveWindowBoundsInCoreWindowSpace(const winrt::Rect& windowBounds);
00154     winrt::Rect GetEffectiveScreenBoundsInCoreWindowSpace(const winrt::Rect& windowBounds);
00155     winrt::Rect GetWindowBounds();
00156     static std::array<winrt::TeachingTipPlacementMode, 13> GetPlacementFallbackOrder(winrt::TeachingTipPlacementMode preferredPalcement);
00157     void EstablishShadows();
00158     void TrySetCenterPoint(const winrt::IUIElement& element, const winrt::float3& centerPoint);
00159     bool ToggleVisibilityForEmptyContent(const wstring_view visibleStateName, const wstring_view collapsedStateName, const winrt::hstring& content);
00160     void UpdateButtonAutomationProperties(const winrt::Button button, const winrt::IInspectable content);
00161
00162     // The tail is designed as an 8x16 pixel shape, however it is actually a 10x20 shape which is partially occluded by the tip content.
00163     // This is done to get the border of the tip to follow the tail shape without drawing the border on the tip edge of the tail.
00164     double TailLongSideActualLength();
00165     double TailLongSideLength();
00166     double TailShortSideLength();
00167     double MinimumTipEdgeToTailEdgeMargin();
00168     double MinimumTipEdgeToTailCenter();
00169
00170     winrt::CornerRadius GetTeachingTipCornerRadius();
00171     double TopLeftCornerRadius() { return GetTeachingTipCornerRadius().TopLeft; }
00172     double TopRightCornerRadius() { return GetTeachingTipCornerRadius().TopRight; }
00173
00174     tracker_ref<winrt::Border> m_container{ this };
00175
00176     tracker_ref<winrt::Popup> m_popup{ this };
00177     tracker_ref<winrt::Popup> m_lightDismissIndicatorPopup{ this };
00178     tracker_ref<winrt::ContentControl> m_popupContentControl{ this };
00179
00180     tracker_ref<winrt::UIElement> m_rootElement{ this };
00181     tracker_ref<winrt::Grid> m_tailOcclusionGrid{ this };
00182     tracker_ref<winrt::Grid> m_contentRootGrid{ this };
00183     tracker_ref<winrt::Grid> m_nonHeroContentRootGrid{ this };
00184     tracker_ref<winrt::Border> m_heroContentBorder{ this };
00185     tracker_ref<winrt::Button> m_actionButton{ this };
00186     tracker_ref<winrt::Button> m_alternateCloseButton{ this };
00187     tracker_ref<winrt::Button> m_closeButton{ this };
00188     tracker_ref<winrt::Polygon> m_tailPolygon{ this };
00189     tracker_ref<winrt::Grid> m_tailEdgeBorder{ this };
00190     tracker_ref<winrt::UIElement> m_titleTextBlock{ this };
00191     tracker_ref<winrt::UIElement> m_subtitleTextBlock{ this };
00192
00193     weak_ref<winrt::DependencyObject> m_previouslyFocusedElement{ };
00194
00195     tracker_ref<winrt::KeyFrameAnimation> m_expandAnimation{ this };
00196     tracker_ref<winrt::KeyFrameAnimation> m_contractAnimation{ this };
00197     tracker_ref<winrt::KeyFrameAnimation> m_expandElevationAnimation{ this };
00198     tracker_ref<winrt::KeyFrameAnimation> m_contractElevationAnimation{ this };
00199     tracker_ref<winrt::CompositionEasingFunction> m_expandEasingFunction{ this };
00200     tracker_ref<winrt::CompositionEasingFunction> m_contractEasingFunction{ this };
00201
00202     winrt::TeachingTipPlacementMode m_currentEffectiveTipPlacementMode{ winrt::TeachingTipPlacementMode::Auto };
00203     winrt::TeachingTipPlacementMode m_currentEffectiveTailPlacementMode{ winrt::TeachingTipPlacementMode::Auto };
00204     winrt::TeachingTipHeroContentPlacementMode m_currentHeroContentEffectivePlacementMode{ winrt::TeachingTipHeroContentPlacementMode::Auto };
00205
00206     winrt::Rect m_currentBoundsInCoreWindowSpace{ 0,0,0,0 };
00207     winrt::Rect m_currentTargetBoundsInCoreWindowSpace{ 0,0,0,0 };
00208
00209     winrt::Size m_currentXamlRootSize{ 0,0 };
00210
00211     bool m_ignoreNextIsOpenChanged{ false };
00212     bool m_isTemplateApplied{ false };
00213     bool m_createNewPopupOnOpen{ false };
00214
00215     bool m_isExpandAnimationPlaying{ false };
00216     bool m_isContractAnimationPlaying{ false };
00217
00218     bool m_hasF6BeenInvoked{ false };
00219
00220     bool m_useTestWindowBounds{ false };
00221     winrt::Rect m_testWindowBoundsInCoreWindowSpace{ 0,0,0,0 };
00222     bool m_useTestScreenBounds{ false };
00223     winrt::Rect m_testScreenBoundsInCoreWindowSpace{ 0,0,0,0 };
00224
00225     bool m_tipShouldHaveShadow{ true };
00226
00227     bool m_tipFollowsTarget{ false };
00228     bool m_returnTopForOutOfWindowPlacement{ true };
00229
00230     float m_contentElevation{ 32.0f };
00231     float m_tailElevation{ 0.0f };
00232     bool m_tailShadowTargetsShadowTarget{ false };
00233
00234     winrt::TimeSpan m_expandAnimationDuration{ 300ms };
00235     winrt::TimeSpan m_contractAnimationDuration{ 200ms };
00236
00237     winrt::TeachingTipCloseReason m_lastCloseReason{ winrt::TeachingTipCloseReason::Programmatic };
00238
00239     static bool constexpr IsPlacementTop(winrt::TeachingTipPlacementMode placement) {
00240         return placement == winrt::TeachingTipPlacementMode::Top ||
00241             placement == winrt::TeachingTipPlacementMode::TopLeft ||
00242             placement == winrt::TeachingTipPlacementMode::TopRight;
00243     }
00244     static bool constexpr IsPlacementBottom(winrt::TeachingTipPlacementMode placement) {
00245         return placement == winrt::TeachingTipPlacementMode::Bottom ||
00246             placement == winrt::TeachingTipPlacementMode::BottomLeft ||
00247             placement == winrt::TeachingTipPlacementMode::BottomRight;
00248     }
00249     static bool constexpr IsPlacementLeft(winrt::TeachingTipPlacementMode placement) {
00250         return placement == winrt::TeachingTipPlacementMode::Left ||
00251             placement == winrt::TeachingTipPlacementMode::LeftTop ||
00252             placement == winrt::TeachingTipPlacementMode::LeftBottom;
00253     }
00254     static bool constexpr IsPlacementRight(winrt::TeachingTipPlacementMode placement) {
00255         return placement == winrt::TeachingTipPlacementMode::Right ||
00256             placement == winrt::TeachingTipPlacementMode::RightTop ||
00257             placement == winrt::TeachingTipPlacementMode::RightBottom;
00258     }
00259
00260     // These values are shifted by one because this is the 1px highlight that sits adjacent to the tip border.
00261     inline winrt::Thickness BottomPlacementTopRightHighlightMargin(double width, double height) { return { (width / 2) + (TailShortSideLength() - 1.0), 0, (TopRightCornerRadius() - 1.0), 0 }; }
00262     inline winrt::Thickness BottomRightPlacementTopRightHighlightMargin(double width, double height) { return { MinimumTipEdgeToTailEdgeMargin() + TailLongSideLength() - 1.0, 0, (TopRightCornerRadius() - 1.0), 0 }; }
00263     inline winrt::Thickness BottomLeftPlacementTopRightHighlightMargin(double width, double height) { return { width - (MinimumTipEdgeToTailEdgeMargin() + 1.0), 0, (TopRightCornerRadius() - 1.0), 0 }; }
00264     static inline winrt::Thickness constexpr OtherPlacementTopRightHighlightMargin(double width, double height) { return { 0, 0, 0, 0 }; }
00265
00266     inline winrt::Thickness BottomPlacementTopLeftHighlightMargin(double width, double height) { return { (TopLeftCornerRadius() - 1.0), 0, (width / 2) + (TailShortSideLength() - 1.0), 0 }; }
00267     inline winrt::Thickness BottomRightPlacementTopLeftHighlightMargin(double width, double height) { return { (TopLeftCornerRadius() - 1.0), 0, width - (MinimumTipEdgeToTailEdgeMargin() + 1.0), 0 }; }
00268     inline winrt::Thickness BottomLeftPlacementTopLeftHighlightMargin(double width, double height) { return { (TopLeftCornerRadius() - 1.0), 0, MinimumTipEdgeToTailEdgeMargin() + TailLongSideLength() - 1.0, 0 }; }
00269     inline winrt::Thickness TopEdgePlacementTopLeftHighlightMargin(double width, double height) { return { (TopLeftCornerRadius() - 1.0), 1, (TopRightCornerRadius() - 1.0), 0 }; }
00270     // Shifted by one since the tail edge's border is not accounted for automatically.
00271     inline winrt::Thickness LeftEdgePlacementTopLeftHighlightMargin(double width, double height) { return { (TopLeftCornerRadius() - 1.0), 1, (TopRightCornerRadius() - 2.0), 0 }; }
00272     inline winrt::Thickness RightEdgePlacementTopLeftHighlightMargin(double width, double height) { return { (TopLeftCornerRadius() - 2.0), 1, (TopRightCornerRadius() - 1.0), 0 }; }
00273
00274     static inline double constexpr UntargetedTipFarPlacementOffset(float farWindowCoordinateInCoreWindowSpace, double tipSize, double offset) { return farWindowCoordinateInCoreWindowSpace - (tipSize + s_untargetedTipWindowEdgeMargin + offset); }
00275     static inline double constexpr UntargetedTipCenterPlacementOffset(float nearWindowCoordinateInCoreWindowSpace, float farWindowCoordinateInCoreWindowSpace, double tipSize, double nearOffset, double farOffset) { return ((static_cast<double>(nearWindowCoordinateInCoreWindowSpace) + static_cast<double>(farWindowCoordinateInCoreWindowSpace)) / 2)  - (tipSize / 2) + nearOffset - farOffset; }
00276     static inline double constexpr UntargetedTipNearPlacementOffset(float nearWindowCoordinateInCoreWindowSpace, double offset) { return static_cast<double>(s_untargetedTipWindowEdgeMargin) + nearWindowCoordinateInCoreWindowSpace + offset; }
00277
00278     static constexpr wstring_view s_scaleTargetName{ L"Scale"sv };
00279     static constexpr wstring_view s_translationTargetName{ L"Translation"sv };
00280
00281     static constexpr wstring_view s_containerName{ L"Container"sv };
00282     static constexpr wstring_view s_popupName{ L"Popup"sv };
00283     static constexpr wstring_view s_tailOcclusionGridName{ L"TailOcclusionGrid"sv };
00284     static constexpr wstring_view s_contentRootGridName{ L"ContentRootGrid"sv };
00285     static constexpr wstring_view s_nonHeroContentRootGridName{ L"NonHeroContentRootGrid"sv };
00286     static constexpr wstring_view s_shadowTargetName{ L"ShadowTarget"sv };
00287     static constexpr wstring_view s_heroContentBorderName{ L"HeroContentBorder"sv };
00288     static constexpr wstring_view s_titlesStackPanelName{ L"TitlesStackPanel"sv };
00289     static constexpr wstring_view s_titleTextBoxName{ L"TitleTextBlock"sv };
00290     static constexpr wstring_view s_subtitleTextBoxName{ L"SubtitleTextBlock"sv };
00291     static constexpr wstring_view s_alternateCloseButtonName{ L"AlternateCloseButton"sv };
00292     static constexpr wstring_view s_mainContentPresenterName{ L"MainContentPresenter"sv };
00293     static constexpr wstring_view s_actionButtonName{ L"ActionButton"sv };
00294     static constexpr wstring_view s_closeButtonName{ L"CloseButton"sv };
00295     static constexpr wstring_view s_tailPolygonName{ L"TailPolygon"sv };
00296     static constexpr wstring_view s_tailEdgeBorderName{ L"TailEdgeBorder"sv };
00297     static constexpr wstring_view s_topTailPolygonHighlightName{ L"TopTailPolygonHighlight"sv };
00298     static constexpr wstring_view s_topHighlightLeftName{ L"TopHighlightLeft"sv };
00299     static constexpr wstring_view s_topHighlightRightName{ L"TopHighlightRight"sv };
00300
00301     static constexpr wstring_view s_accentButtonStyleName{ L"AccentButtonStyle" };
00302     static constexpr wstring_view s_teachingTipTopHighlightBrushName{ L"TeachingTipTopHighlightBrush" };
00303
00304     static constexpr winrt::float2 s_expandAnimationEasingCurveControlPoint1{ 0.1f, 0.9f };
00305     static constexpr winrt::float2 s_expandAnimationEasingCurveControlPoint2{ 0.2f, 1.0f };
00306     static constexpr winrt::float2 s_contractAnimationEasingCurveControlPoint1{ 0.7f, 0.0f };
00307     static constexpr winrt::float2 s_contractAnimationEasingCurveControlPoint2{ 1.0f, 0.5f };
00308
00309     //It is possible this should be exposed as a property, but you can adjust what it does with margin.
00310     static constexpr float s_untargetedTipWindowEdgeMargin = 24;
00311     static constexpr float s_defaultTipHeightAndWidth = 320;
00312
00313     //Ideally this would be computed from layout but it is difficult to do.
00314     static constexpr float s_tailOcclusionAmount = 2;
00315 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusFilterConverter.h Source File

  • File List
  • File Members
  • Common

CornerRadiusFilterConverter.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "CornerRadiusFilterConverter.g.h"
00006 #include "CornerRadiusFilterConverter.properties.h"
00007
00008 class CornerRadiusFilterConverter :
00009     public winrt::implementation::CornerRadiusFilterConverterT<CornerRadiusFilterConverter>,
00010     public CornerRadiusFilterConverterProperties
00011 {
00012 public:
00013     winrt::CornerRadius Convert(
00014         winrt::CornerRadius const& radius,
00015         winrt::CornerRadiusFilterKind const& filterKind);
00016
00017     winrt::IInspectable Convert(
00018         winrt::IInspectable const& value,
00019         winrt::TypeName const& targetType,
00020         winrt::IInspectable const& parameter,
00021         winrt::hstring const& language);
00022
00023     winrt::IInspectable ConvertBack(
00024         winrt::IInspectable const& value,
00025         winrt::TypeName const& targetType,
00026         winrt::IInspectable const& parameter,
00027         winrt::hstring const& language);
00028
00029 private:
00030     double GetDoubleValue(winrt::CornerRadius const& radius, winrt::CornerRadiusFilterKind const& filterKind);
00031 };
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizingUniformStackLayout Member List

This is the complete list of members for VirtualizingUniformStackLayout, including all inherited members.
ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) | VirtualizingUniformStackLayout | [inline, protected]
VirtualizingLayout::ArrangeOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize) | VirtualizingLayout | [virtual]
FirstRealizedIndexInRect(Rect realizationRect, int itemCount) | VirtualizingUniformStackLayout | [inline, private]
InitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
ItemHeight | VirtualizingUniformStackLayout |
ItemWidth | VirtualizingUniformStackLayout |
LastRealizedIndexInRect(Rect realizationRect, int itemCount) | VirtualizingUniformStackLayout | [inline, private]
MeasureOverride(VirtualizingLayoutContext context, Size availableSize) | VirtualizingUniformStackLayout | [inline, protected]
VirtualizingLayout::MeasureOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize) | VirtualizingLayout | [virtual]
OnItemsChangedCore(winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args) | VirtualizingLayout | [virtual]
UninitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
VirtualizingLayout() | VirtualizingLayout |
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewInteractiveTestsPage.xaml.cs Source File

  • File List
  • File Members
  • ItemsView
  • TestUI

ItemsViewInteractiveTestsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Linq;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Automation;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Controls.Primitives;
00012 using Microsoft.UI.Xaml.Input;
00013 using Microsoft.UI.Private.Controls;
00014 using MUXControlsTestApp.Samples.Model;
00015
00016 namespace MUXControlsTestApp
00017 {
00018     public sealed partial class ItemsViewInteractiveTestsPage : TestPage
00019     {
00020         private string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00021         private List<string> _fullLogs = new List<string>();
00022         private int _scrollViewResetCorrelationId = -1;
00023         private int _scrollViewOffsetChangeCorrelationId = -1;
00024         private int _scrollViewZoomFactorChangeCorrelationId = -1;
00025         private ObservableCollection<Entity> _colEntities = null;
00026         private List<Entity> _lstEntities = null;
00027         private List<Entity> _lstLargeEntities = null;
00028         private DataTemplate[] _entityTemplates = new DataTemplate[6];
00029         private LinedFlowLayout _linedFlowLayout = null;
00030         private StackLayout _stackLayout = null;
00031         private UniformGridLayout _uniformGridLayout = null;
00032         private UIElement _oldFocusedElement = null;
00033         private LinedFlowLayoutItemCollectionTransitionProvider _linedFlowLayoutItemCollectionTransitionProvider = null;
00034
00035         public ItemsViewInteractiveTestsPage()
00036         {
00037             this.InitializeComponent();
00038
00039             Loaded += ItemsViewInteractiveTestsPage_Loaded;
00040             KeyDown += ItemsViewInteractiveTestsPage_KeyDown;
00041
00042             btnGetCurrentItemIndex.GettingFocus += BtnGetCurrentItemIndex_GettingFocus;
00043         }
00044
00045         private void ItemsViewInteractiveTestsPage_Loaded(object sender, RoutedEventArgs e)
00046         {
00047             itemsView.ItemInvoked += ItemsView_ItemInvoked;
00048
00049             UpdateItemsViewLayout();
00050             UpdateItemsViewIsItemInvokedEnabled();
00051             UpdateItemsViewSelectionMode();
00052             UpdateItemsInfoRequestedCheckBoxes();
00053             UpdateAppAnimatorCheckBox();
00054
00055             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(this.itemsView);
00056
00057             if (scrollView != null)
00058             {
00059                 scrollView.StateChanged += ScrollView_StateChanged;
00060                 scrollView.ViewChanged += ScrollView_ViewChanged;
00061                 scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
00062                 scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
00063
00064                 ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
00065
00066                 if (scrollPresenter != null)
00067                 {
00068                     AutomationProperties.SetAutomationId(scrollPresenter, "PART_ScrollPresenter");
00069                     AutomationProperties.SetName(scrollPresenter, "PART_ScrollPresenter");
00070                 }
00071             }
00072         }
00073
00074         private void ItemsViewInteractiveTestsPage_KeyDown(object sender, KeyRoutedEventArgs e)
00075         {
00076             if (e.Key == Windows.System.VirtualKey.G)
00077             {
00078                 GetFullLog();
00079             }
00080             else if (e.Key == Windows.System.VirtualKey.C)
00081             {
00082                 ClearFullLog();
00083             }
00084         }
00085
00086         private void ChkHandleItemsInfoRequested_IsCheckedChanged(object sender, RoutedEventArgs args)
00087         {
00088             UpdateItemsInfoRequestedHandler();
00089         }
00090
00091         private void ChkUseFastPath_IsCheckedChanged(object sender, RoutedEventArgs args)
00092         {
00093             UpdateItemsInfoRequestedHandler();
00094         }
00095
00096         private void ChkUseAppAnimator_IsCheckedChanged(object sender, RoutedEventArgs args)
00097         {
00098             UpdateAppAnimator();
00099         }
00100
00101         private void ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e)
00102         {
00103             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00104                 type: "ItemsRepeater",
00105                 isLoggingInfoLevel: true,
00106                 isLoggingVerboseLevel: true);
00107
00108             MUXControlsTestHooks.SetLoggingLevelForType(
00109                 type: "ItemsRepeater",
00110                 isLoggingInfoLevel: true,
00111                 isLoggingVerboseLevel: true);
00112
00113             if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
00114                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00115         }
00116
00117         private void ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e)
00118         {
00119             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00120                 type: "ItemsRepeater",
00121                 isLoggingInfoLevel: false,
00122                 isLoggingVerboseLevel: false);
00123
00124             MUXControlsTestHooks.SetLoggingLevelForType(
00125                 type: "ItemsRepeater",
00126                 isLoggingInfoLevel: false,
00127                 isLoggingVerboseLevel: false);
00128
00129             if (chkLogItemsViewMessages.IsChecked == false && chkLogScrollViewMessages.IsChecked == false)
00130                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00131         }
00132
00133         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e)
00134         {
00135             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00136                 type: "ScrollView",
00137                 isLoggingInfoLevel: true,
00138                 isLoggingVerboseLevel: true);
00139
00140             MUXControlsTestHooks.SetLoggingLevelForType(
00141                 type: "ScrollView",
00142                 isLoggingInfoLevel: true,
00143                 isLoggingVerboseLevel: true);
00144
00145             if (chkLogItemsRepeaterMessages.IsChecked == false && chkLogItemsViewMessages.IsChecked == false)
00146                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00147         }
00148
00149         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e)
00150         {
00151             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00152                 type: "ScrollView",
00153                 isLoggingInfoLevel: false,
00154                 isLoggingVerboseLevel: false);
00155
00156             MUXControlsTestHooks.SetLoggingLevelForType(
00157                 type: "ScrollView",
00158                 isLoggingInfoLevel: false,
00159                 isLoggingVerboseLevel: false);
00160
00161             if (chkLogItemsRepeaterMessages.IsChecked == false && chkLogItemsViewMessages.IsChecked == false)
00162                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00163         }
00164
00165         private void ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs e)
00166         {
00167             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00168                 type: "ItemsView",
00169                 isLoggingInfoLevel: true,
00170                 isLoggingVerboseLevel: true);
00171
00172             MUXControlsTestHooks.SetLoggingLevelForType(
00173                 type: "ItemsView",
00174                 isLoggingInfoLevel: true,
00175                 isLoggingVerboseLevel: true);
00176
00177             if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
00178                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00179         }
00180
00181         private void ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs e)
00182         {
00183             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00184                 type: "ItemsView",
00185                 isLoggingInfoLevel: false,
00186                 isLoggingVerboseLevel: false);
00187
00188             MUXControlsTestHooks.SetLoggingLevelForType(
00189                 type: "ItemsView",
00190                 isLoggingInfoLevel: false,
00191                 isLoggingVerboseLevel: false);
00192
00193             if (chkLogScrollViewMessages.IsChecked == false && chkLogItemsRepeaterMessages.IsChecked == false)
00194                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00195         }
00196
00197         private void CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
00198         {
00199             try
00200             {
00201                 if (itemsView != null)
00202                 {
00203                     if (cmbItemTemplate.SelectedIndex == 0)
00204                     {
00205                         itemsView.ItemTemplate = null;
00206                     }
00207                     else
00208                     {
00209                         int templateIndex = cmbItemTemplate.SelectedIndex - 1;
00210
00211                         if (_entityTemplates[templateIndex] == null)
00212                         {
00213                             _entityTemplates[templateIndex] = Resources["entityTemplate" + cmbItemTemplate.SelectedIndex.ToString()] as DataTemplate;
00214                         }
00215
00216                         itemsView.ItemTemplate = _entityTemplates[templateIndex];
00217                     }
00218
00219                     UpdateLinedFlowLayoutLineHeight();
00220                     UpdateItemsInfoRequestedCheckBoxes();
00221                 }
00222             }
00223             catch (Exception ex)
00224             {
00225                 _fullLogs.Add(ex.ToString());
00226             }
00227         }
00228
00229         private void CmbItemsSource_SelectionChanged(object sender, SelectionChangedEventArgs e)
00230         {
00231             try
00232             {
00233                 if (itemsView != null)
00234                 {
00235                     switch (cmbItemsSource.SelectedIndex)
00236                     {
00237                         case 0:
00238                             itemsView.ItemsSource = null;
00239                             break;
00240                         case 1:
00241                             if (_lstEntities == null)
00242                             {
00243                                 _lstEntities = new List<Entity>(
00244                                                 Enumerable.Range(0, 50).Select(k =>
00245                                                     new Entity
00246                                                     {
00247                                                         ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00248                                                         Description = k + " - " + _lorem.Substring(0, k)
00249                                                     }));
00250                             }
00251                             itemsView.ItemsSource = _lstEntities;
00252                             break;
00253                         case 2:
00254                             if (_lstLargeEntities == null)
00255                             {
00256                                 _lstLargeEntities = new List<Entity>(
00257                                                 Enumerable.Range(0, 1000).Select(k =>
00258                                                     new Entity
00259                                                     {
00260                                                         ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00261                                                         Description = k + " - " + _lorem.Substring(0, k % 50 + 1)
00262                                                     }));
00263                             }
00264                             itemsView.ItemsSource = _lstLargeEntities;
00265                             break;
00266                         case 3:
00267                             if (_colEntities == null)
00268                             {
00269                                 _colEntities = new ObservableCollection<Entity>(
00270                                                 Enumerable.Range(0, 25).Select(k =>
00271                                                     new Entity
00272                                                     {
00273                                                         ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00274                                                         Description = k + " - " + _lorem.Substring(0, 2 * k)
00275                                                     }));
00276                             }
00277                             itemsView.ItemsSource = _colEntities;
00278                             break;
00279                     }
00280                 }
00281             }
00282             catch (Exception ex)
00283             {
00284                 _fullLogs.Add(ex.ToString());
00285             }
00286         }
00287
00288         private void CmbLayout_SelectionChanged(object sender, SelectionChangedEventArgs e)
00289         {
00290             try
00291             {
00292                 if (itemsView != null)
00293                 {
00294                     switch (cmbLayout.SelectedIndex)
00295                     {
00296                         case 0:
00297                             itemsView.Layout = null;
00298                             break;
00299                         case 1:
00300                             if (_linedFlowLayout == null)
00301                             {
00302                                 _linedFlowLayout = Resources["linedFlowLayout"] as LinedFlowLayout;
00303                             }
00304                             itemsView.Layout = _linedFlowLayout;
00305                             break;
00306                         case 2:
00307                             itemsView.Layout = _stackLayout;
00308                             break;
00309                         case 3:
00310                             if (_uniformGridLayout == null)
00311                             {
00312                                 _uniformGridLayout = Resources["uniformGridLayout"] as UniformGridLayout;
00313                             }
00314                             itemsView.Layout = _uniformGridLayout;
00315                             break;
00316                     }
00317
00318                     UpdateLinedFlowLayoutLineHeight();
00319                     UpdateItemsInfoRequestedCheckBoxes();
00320                     UpdateAppAnimatorCheckBox();
00321                 }
00322             }
00323             catch (Exception ex)
00324             {
00325                 _fullLogs.Add(ex.ToString());
00326             }
00327         }
00328
00329         private void ChkIsItemInvokedEnabled_Checked(object sender, RoutedEventArgs e)
00330         {
00331             if (itemsView != null)
00332             {
00333                 itemsView.IsItemInvokedEnabled = true;
00334             }
00335         }
00336
00337         private void ChkIsItemInvokedEnabled_Unchecked(object sender, RoutedEventArgs e)
00338         {
00339             if (itemsView != null)
00340             {
00341                 itemsView.IsItemInvokedEnabled = false;
00342             }
00343         }
00344
00345         private void CmbSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00346         {
00347             try
00348             {
00349                 if (itemsView != null && cmbSelectionMode != null && itemsView.SelectionMode != (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex)
00350                 {
00351                     itemsView.SelectionMode = (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex;
00352                 }
00353             }
00354             catch (Exception ex)
00355             {
00356                 _fullLogs.Add(ex.ToString());
00357             }
00358         }
00359
00360         private void ItemsView_ItemInvoked(ItemsView sender, ItemsViewItemInvokedEventArgs args)
00361         {
00362             _fullLogs.Add($"ItemsView.ItemInvoked InvokedItem={args.InvokedItem}");
00363         }
00364
00365         private void LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
00366         {
00367             _fullLogs.Add($"LinedFlowLayout.ItemsInfoRequested ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
00368
00369             if (cmbItemTemplate.SelectedIndex != 5 || itemsView.ItemsSource == null)
00370             {
00371                 return;
00372             }
00373
00374             args.MinWidth = 80.0;
00375
00376             double[] desiredAspectRatios = new double[chkUseFastPath.IsChecked == true ? (itemsView.ItemsSource as IReadOnlyCollection<Entity>).Count : args.ItemsRangeRequestedLength];
00377
00378             if (chkUseFastPath.IsChecked == true)
00379             {
00380                 args.ItemsRangeStartIndex = 0;
00381             }
00382
00383             for (int index = 0; index < desiredAspectRatios.Length; index++)
00384             {
00385                 desiredAspectRatios[index] = 1.0;
00386             }
00387
00388             args.SetDesiredAspectRatios(desiredAspectRatios);
00389         }
00390
00391         private void ScrollView_StateChanged(ScrollView scrollView, object args)
00392         {
00393             this.txtScrollViewState.Text = scrollView.State.ToString();
00394             _fullLogs.Add($"StateChanged S={scrollView.State.ToString()}");
00395             chkLogUpdated.IsChecked = false;
00396         }
00397
00398         private void ScrollView_ViewChanged(ScrollView scrollView, object args)
00399         {
00400             this.txtScrollViewHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
00401             this.txtScrollViewVerticalOffset.Text = scrollView.VerticalOffset.ToString();
00402             this.txtScrollViewZoomFactor.Text = scrollView.ZoomFactor.ToString();
00403             _fullLogs.Add($"ViewChanged H={this.txtScrollViewHorizontalOffset.Text}, V={this.txtScrollViewVerticalOffset.Text}, ZF={this.txtScrollViewZoomFactor.Text}");
00404             chkLogUpdated.IsChecked = false;
00405         }
00406
00407         private void ScrollView_ScrollCompleted(ScrollView scrollView, ScrollingScrollCompletedEventArgs args)
00408         {
00409             ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00410
00411             _fullLogs.Add($"ScrollCompleted. OffsetsChangeCorrelationId={args.CorrelationId}, Result={result}");
00412             chkLogUpdated.IsChecked = false;
00413
00414             if (args.CorrelationId == _scrollViewOffsetChangeCorrelationId)
00415             {
00416                 this.txtStatus.Text = "ScrollView scrolled";
00417                 _scrollViewOffsetChangeCorrelationId = -1;
00418             }
00419         }
00420
00421         private void ScrollView_ZoomCompleted(ScrollView scrollView, ScrollingZoomCompletedEventArgs args)
00422         {
00423             ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);
00424
00425             _fullLogs.Add($"ZoomCompleted. ZoomFactorChangeCorrelationId={args.CorrelationId}, Result={result}");
00426             chkLogUpdated.IsChecked = false;
00427
00428             if (args.CorrelationId == _scrollViewZoomFactorChangeCorrelationId)
00429             {
00430                 this.txtStatus.Text = "ScrollView zoomed";
00431                 _scrollViewZoomFactorChangeCorrelationId = -1;
00432             }
00433             else if (args.CorrelationId == _scrollViewResetCorrelationId)
00434             {
00435                 this.txtStatus.Text = "ScrollView reset";
00436                 _scrollViewResetCorrelationId = -1;
00437             }
00438         }
00439
00440         private void BtnGetCurrentItemIndex_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
00441         {
00442             _oldFocusedElement = args.OldFocusedElement as UIElement;
00443         }
00444
00445         private void BtnGetFullLog_Click(object sender, RoutedEventArgs e)
00446         {
00447             GetFullLog();
00448         }
00449
00450         private void BtnClearFullLog_Click(object sender, RoutedEventArgs e)
00451         {
00452             ClearFullLog();
00453         }
00454
00455         private void BtnScrollViewScrollTo_Click(object sender, RoutedEventArgs e)
00456         {
00457             this.txtStatus.Text = "Scrolling ScrollView ...";
00458
00459             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
00460
00461             double horizontalOffset = double.Parse(txtScrollViewHorizontalOffset.Text);
00462             double verticalOffset = double.Parse(txtScrollViewVerticalOffset.Text);
00463
00464             int viewChangeCorrelationId = scrollView.ScrollTo(horizontalOffset, verticalOffset, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00465             _fullLogs.Add($"ScrollTo requested. Id={viewChangeCorrelationId}");
00466
00467             chkLogUpdated.IsChecked = false;
00468             _scrollViewOffsetChangeCorrelationId = viewChangeCorrelationId;
00469         }
00470
00471         private void BtnScrollViewZoomTo_Click(object sender, RoutedEventArgs e)
00472         {
00473             this.txtStatus.Text = "Zooming ScrollView ...";
00474
00475             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
00476
00477             float zoomFactor = float.Parse(txtScrollViewZoomFactor.Text);
00478
00479             int viewChangeCorrelationId = scrollView.ZoomTo(zoomFactor, System.Numerics.Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00480             _fullLogs.Add($"ZoomTo requested. Id={viewChangeCorrelationId}");
00481
00482             chkLogUpdated.IsChecked = false;
00483             _scrollViewZoomFactorChangeCorrelationId = viewChangeCorrelationId;
00484         }
00485
00486         private void BtnResetScrollView_Click(object sender, RoutedEventArgs e)
00487         {
00488             this.txtStatus.Text = "Resetting ScrollView ...";
00489
00490             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
00491
00492             int viewChangeCorrelationId = scrollView.ScrollTo(0.0, 0.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00493             _fullLogs.Add($"ScrollTo requested. Id={viewChangeCorrelationId}");
00494
00495             viewChangeCorrelationId = scrollView.ZoomTo(1.0f, System.Numerics.Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00496             _fullLogs.Add($"ZoomTo requested. Id={viewChangeCorrelationId}");
00497
00498             chkLogUpdated.IsChecked = false;
00499             _scrollViewResetCorrelationId = viewChangeCorrelationId;
00500         }
00501
00502         private void BtnGetCurrentItemIndex_Click(object sender, RoutedEventArgs e)
00503         {
00504             this.txtStatus.Text = "GetCurrentItemIndex ...";
00505
00506             int currentItemIndex = itemsView.CurrentItemIndex;
00507
00508             txtCurrentItemIndex.Text = currentItemIndex.ToString();
00509
00510             this.txtStatus.Text = "GetCurrentItemIndex. Done.";
00511
00512             if (_oldFocusedElement != null)
00513             {
00514                 _oldFocusedElement.Focus(FocusState.Programmatic);
00515                 _oldFocusedElement = null;
00516             }
00517         }
00518
00519         private void BtnInsertItems_Click(object sender, RoutedEventArgs e)
00520         {
00521             try
00522             {
00523                 if (txtItemsSourceIndexes != null && txtStatus != null)
00524                 {
00525                     txtStatus.Text = "InsertItems ...";
00526
00527                     string[] indexes = txtItemsSourceIndexes.Text.Split(',');
00528
00529                     foreach (string index in indexes)
00530                     {
00531                         InsertItem(int.Parse(index));
00532                     }
00533
00534                     txtStatus.Text = "InsertItems. Done.";
00535
00536                     if (_oldFocusedElement != null)
00537                     {
00538                         _oldFocusedElement.Focus(FocusState.Programmatic);
00539                         _oldFocusedElement = null;
00540                     }
00541                 }
00542             }
00543             catch (Exception ex)
00544             {
00545                 _fullLogs.Add(ex.ToString());
00546             }
00547         }
00548
00549         private void BtnRemoveItems_Click(object sender, RoutedEventArgs e)
00550         {
00551             try
00552             {
00553                 if (txtItemsSourceIndexes != null && txtStatus != null)
00554                 {
00555                     txtStatus.Text = "RemoveItems ...";
00556
00557                     string[] indexes = txtItemsSourceIndexes.Text.Split(',');
00558
00559                     foreach (string index in indexes)
00560                     {
00561                         RemoveItem(int.Parse(index));
00562                     }
00563
00564                     txtStatus.Text = "RemoveItems. Done.";
00565                 }
00566             }
00567             catch (Exception ex)
00568             {
00569                 _fullLogs.Add(ex.ToString());
00570             }
00571         }
00572
00573         private void InsertItem(int index)
00574         {
00575             try
00576             {
00577                 if (itemsView != null && cmbItemsSource != null)
00578                 {
00579                     switch (cmbItemsSource.SelectedIndex)
00580                     {
00581                         case 1:
00582                             if (_lstEntities != null)
00583                             {
00584                                 int rank = _lstEntities.Count;
00585                                 Entity entity = new Entity
00586                                 {
00587                                     ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", rank % 8 + 1)),
00588                                     Description = rank + " - " + _lorem.Substring(0, rank)
00589                                 };
00590
00591                                 _lstEntities.Insert(index, entity);
00592                             }
00593                             break;
00594                         case 2:
00595                             if (_lstLargeEntities != null)
00596                             {
00597                                 int rank = _lstLargeEntities.Count;
00598                                 Entity entity = new Entity
00599                                 {
00600                                     ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", rank % 8 + 1)),
00601                                     Description = rank + " - " + _lorem.Substring(0, rank % 50 + 1)
00602                                 };
00603
00604                                 _lstLargeEntities.Insert(index, entity);
00605                             }
00606                             break;
00607                         case 3:
00608                             if (_colEntities != null)
00609                             {
00610                                 int rank = _colEntities.Count;
00611                                 Entity entity = new Entity
00612                                 {
00613                                     ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", rank % 8 + 1)),
00614                                     Description = rank + " - " + _lorem.Substring(0, 2 * rank)
00615                                 };
00616
00617                                 _colEntities.Insert(index, entity);
00618                             }
00619                             break;
00620                     }
00621                 }
00622             }
00623             catch (Exception ex)
00624             {
00625                 _fullLogs.Add(ex.ToString());
00626             }
00627         }
00628
00629         private void RemoveItem(int index)
00630         {
00631             try
00632             {
00633                 if (itemsView != null && cmbItemsSource != null)
00634                 {
00635                     switch (cmbItemsSource.SelectedIndex)
00636                     {
00637                         case 1:
00638                             if (_lstEntities != null)
00639                             {
00640                                 _lstEntities.RemoveAt(index);
00641                             }
00642                             break;
00643                         case 2:
00644                             if (_lstLargeEntities != null)
00645                             {
00646                                 _lstLargeEntities.RemoveAt(index);
00647                             }
00648                             break;
00649                         case 3:
00650                             if (_colEntities != null)
00651                             {
00652                                 _colEntities.RemoveAt(index);
00653                             }
00654                             break;
00655                     }
00656                 }
00657             }
00658             catch (Exception ex)
00659             {
00660                 _fullLogs.Add(ex.ToString());
00661             }
00662         }
00663
00664         private void UpdateItemsInfoRequestedCheckBoxes()
00665         {
00666             chkHandleItemsInfoRequested.Visibility = chkUseFastPath.Visibility = cmbLayout.SelectedIndex == 1 ? Visibility.Visible : Visibility.Collapsed;
00667             chkHandleItemsInfoRequested.IsEnabled = chkUseFastPath.IsEnabled = cmbItemTemplate.SelectedIndex == 5;
00668             if (!chkHandleItemsInfoRequested.IsEnabled)
00669             {
00670                 chkHandleItemsInfoRequested.IsChecked = chkUseFastPath.IsEnabled = false;
00671             }
00672         }
00673
00674         private void UpdateAppAnimatorCheckBox()
00675         {
00676             if (cmbLayout.SelectedIndex == 1)
00677             {
00678                 chkUseAppAnimator.Visibility = Visibility.Visible;
00679                 if (itemsView != null)
00680                 {
00681                     chkUseAppAnimator.IsChecked = itemsView.ItemTransitionProvider != null;
00682                 }
00683             }
00684             else
00685             {
00686                 chkUseAppAnimator.Visibility = Visibility.Collapsed;
00687             }
00688         }
00689
00690         private void UpdateItemsInfoRequestedHandler()
00691         {
00692             if (_linedFlowLayout != null)
00693             {
00694                 _linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;
00695
00696                 if (chkHandleItemsInfoRequested.IsChecked == true || chkUseFastPath.IsChecked == true)
00697                 {
00698                     _linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
00699                 }
00700
00701                 _linedFlowLayout.InvalidateItemsInfo();
00702             }
00703         }
00704
00705         private void UpdateAppAnimator()
00706         {
00707             if (itemsView != null && chkUseAppAnimator != null)
00708             {
00709                 if (chkUseAppAnimator.IsChecked == true)
00710                 {
00711                     if (itemsView.ItemTransitionProvider == null)
00712                     {
00713                         if (_linedFlowLayoutItemCollectionTransitionProvider == null)
00714                         {
00715                             _linedFlowLayoutItemCollectionTransitionProvider = new LinedFlowLayoutItemCollectionTransitionProvider();
00716                         }
00717
00718                         itemsView.ItemTransitionProvider = _linedFlowLayoutItemCollectionTransitionProvider;
00719                     }
00720                 }
00721                 else
00722                 {
00723                     if (itemsView.ItemTransitionProvider != null)
00724                     {
00725                         itemsView.ItemTransitionProvider = null;
00726                     }
00727                 }
00728             }
00729         }
00730
00731         private void UpdateItemsViewIsItemInvokedEnabled()
00732         {
00733             if (itemsView != null)
00734             {
00735                 chkIsItemInvokedEnabled.IsChecked = itemsView.IsItemInvokedEnabled;
00736             }
00737         }
00738
00739         private void UpdateItemsViewLayout()
00740         {
00741             if (itemsView != null)
00742             {
00743                 if (itemsView.Layout is StackLayout stackLayout)
00744                 {
00745                     _stackLayout = stackLayout;
00746                     if (cmbLayout != null)
00747                     {
00748                         cmbLayout.SelectedIndex = 2;
00749                     }
00750                 }
00751                 else
00752                 {
00753                     _stackLayout = Resources["stackLayout"] as StackLayout;
00754                     if (itemsView.Layout == null && cmbLayout != null)
00755                     {
00756                         cmbLayout.SelectedIndex = 0;
00757                     }
00758                 }
00759             }
00760         }
00761
00762         private void UpdateItemsViewSelectionMode()
00763         {
00764             if (itemsView != null && cmbSelectionMode != null)
00765             {
00766                 cmbSelectionMode.SelectedIndex = (int)itemsView.SelectionMode;
00767             }
00768         }
00769
00770         private void UpdateLinedFlowLayoutLineHeight()
00771         {
00772             if (_linedFlowLayout != null)
00773             {
00774                 switch (cmbItemTemplate.SelectedIndex)
00775                 {
00776                     case 2:
00777                         _linedFlowLayout.LineHeight = 100.0;
00778                         break;
00779                     case 3:
00780                         _linedFlowLayout.LineHeight = 192.0;
00781                         break;
00782                     case 4:
00783                         _linedFlowLayout.LineHeight = 96.0;
00784                         break;
00785                     case 5:
00786                         _linedFlowLayout.LineHeight = 80.0;
00787                         break;
00788                     default:
00789                         _linedFlowLayout.LineHeight = double.NaN;
00790                         break;
00791                 }
00792             }
00793         }
00794
00795         private void GetFullLog()
00796         {
00797             this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
00798             chkLogCleared.IsChecked = false;
00799             foreach (string log in _fullLogs)
00800             {
00801                 this.cmbFullLog.Items.Add(log);
00802             }
00803             chkLogUpdated.IsChecked = true;
00804             this.txtStatus.Text = "GetFullLog. Done.";
00805         }
00806
00807         private void ClearFullLog()
00808         {
00809             this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
00810             chkLogUpdated.IsChecked = false;
00811             _fullLogs.Clear();
00812             this.cmbFullLog.Items.Clear();
00813             chkLogCleared.IsChecked = true;
00814             this.txtStatus.Text = "ClearFullLog. Done.";
00815         }
00816
00817         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00818         {
00819             // Cut off the terminating new line.
00820             string msg = args.Message.Substring(0, args.Message.Length - 1);
00821             string senderName = string.Empty;
00822             FrameworkElement fe = sender as FrameworkElement;
00823
00824             if (fe != null)
00825             {
00826                 senderName = "s:" + fe.Name + ", ";
00827             }
00828
00829             _fullLogs.Add((args.IsVerboseLevel ? "Verbose: " : "Info: ") + senderName + "m:" + msg);
00830         }
00831     }
00832 }
Generated on Sun Dec 1 2024 20:51:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

is_flags_enum< PointerOverStatus > Member List

This is the complete list of members for is_flags_enum< PointerOverStatus >, including all inherited members.
value is_flags_enum< PointerOverStatus > [static]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrush.h Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicBrush.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "MaterialHelper.h"
00007 #include "AcrylicTestApi.h"
00008
00009 #include "AcrylicBrush.g.h"
00010 #include "AcrylicBrush.properties.h"
00011
00012 #include <limits>
00013
00014 #pragma warning(push)
00015 #pragma warning(disable: 6101)  // Returning uninitialized memory '<value>'.  A successful path through the function does not set the named _Out_ parameter.
00016 #include "Microsoft.UI.Private.Composition.Effects_impl.h"
00017 #pragma warning(pop)
00018
00019 winrt::Color GetLuminosityColor(winrt::Color tintColor, winrt::IReference<double> luminosityOpacity);
00020 double GetTintOpacityModifier(winrt::Color tintColor);
00021
00022 class AcrylicBrush :
00023     public ReferenceTracker<AcrylicBrush, winrt::implementation::AcrylicBrushT>,
00024     public AcrylicBrushProperties
00025 {
00026     friend AcrylicTestApi;
00027     friend MaterialHelper;
00028
00029 public:
00030     AcrylicBrush();
00031     virtual ~AcrylicBrush();
00032
00033     // IXamlCompositionBrushOverrides
00034     void OnConnected();
00035     void OnDisconnected();
00036     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00037     void OnNoiseChanged(const com_ptr<MaterialHelperBase>& sender);
00038     void OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy);
00039
00040 public:
00041     // Default value on public DP - ok to be public
00042     static constexpr winrt::Color sc_defaultTintColor{ 204, 255, 255, 255 };
00043     static constexpr double sc_defaultTintOpacity{ 1.0 };
00044     static constexpr winrt::TimeSpan sc_defaultTintTransitionDuration{ 500ms };
00045
00046     static winrt::CompositionEffectBrush CreateAcrylicBrushWorker(
00047         const winrt::Compositor& compositor,
00048         bool useCrossFadeEffect,
00049         winrt::Color tintColor,
00050         winrt::Color luminosityColor,
00051         winrt::Color fallbackColor,
00052         bool shouldBrushBeOpaque,
00053         bool useCache = false);
00054
00055     void CoerceToZeroOneRange(double& value);
00056     void CoerceToZeroOneRange_Nullable(winrt::IReference<double>& value);
00057
00058 private:
00059     static constexpr auto TintColorColor{ L"TintColor.Color"sv };
00060     static constexpr auto LuminosityColorColor{ L"LuminosityColor.Color"sv };
00061     static constexpr auto FallbackColorColor{ L"FallbackColor.Color"sv };
00062     static constexpr auto OpaqueFallbackColorColor{ L"OpaqueFallbackColor.Color"sv };
00063
00064     static constexpr float sc_blurRadius = 30.0f;
00065     static constexpr float sc_noiseOpacity = 0.02f;
00066     static constexpr winrt::Color sc_exclusionColor{ 26, 255, 255, 255 };
00067     static constexpr float sc_saturation = 1.25f;
00068
00069     void CreateAcrylicBrush(bool useCrossFadeEffect, bool forceCreateAcrylicBrush = false);
00070
00071     static winrt::IGraphicsEffect CombineNoiseWithTintEffect_Luminosity(
00072         const winrt::IGraphicsEffectSource& blurredSource,
00073         const winrt::Microsoft::UI::Private::Composition::Effects::ColorSourceEffect& tintColorEffect,
00074         const winrt::Color initialLuminosityColor,
00075         std::vector<winrt::hstring>& animatedProperties);
00076
00077     static winrt::CompositionEffectFactory CreateAcrylicBrushCompositionEffectFactory(const winrt::Compositor& compositor,
00078         bool shouldBrushBeOpaque,
00079         bool useCrossFadeEffect,
00080         winrt::Color initialTintColor,
00081         winrt::Color initialLuminosityColor,
00082         winrt::Color initialFallbackColor);
00083
00084     static winrt::CompositionEffectFactory GetOrCreateAcrylicBrushCompositionEffectFactory(
00085         const winrt::Compositor& compositor,
00086         bool shouldBrushBeOpaque,
00087         bool useCrossFadeEffect,
00088         winrt::Color initialTintColor,
00089         winrt::Color initialLuminosityColor,
00090         winrt::Color initialFallbackColor,
00091         bool useCache);
00092
00093     winrt::Color GetEffectiveTintColor();
00094     winrt::Color GetEffectiveLuminosityColor();
00095
00096     void EnsureNoiseBrush();
00097     void UpdateAcrylicBrush();
00098
00099     // Handle acrylic status changes
00100     void UpdateAcrylicStatus();
00101
00102     void OnFallbackColorChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00103
00104     void CreateAnimation(const winrt::CompositionBrush& brush,
00105         winrt::CompositionScopedBatch& scopedBatch,
00106         winrt::event_token& token,
00107         float acrylicStart,
00108         float acrylicEnd,
00109         const winrt::TypedEventHandler<winrt::IInspectable, winrt::CompositionBatchCompletedEventArgs>& handler);
00110
00111     void CancelFallbackAnimationCompleteWait();
00112
00113     static winrt::CompositionAnimation MakeColorAnimation(const winrt::Color& color, const winrt::TimeSpan& duration, const winrt::Compositor& compositor);
00114     static winrt::CompositionAnimation MakeFloatAnimation(
00115         float fromValue,
00116         float toValue,
00117         const winrt::TimeSpan& duration,
00118         const winrt::CompositionEasingFunction& easing,
00119         const winrt::Compositor& compositor);
00120     static void PlayCrossFadeAnimation(const winrt::CompositionBrush& brush, float acrylicStart, float acrylicEnd);
00121
00122     bool IsInFallbackMode() { return !m_isUsingAcrylicBrush; }
00123
00124     void PolicyStatusChangedHelper(bool isDisabledByMaterialPolicy);
00125
00126     bool m_isConnected{};
00127     bool m_isUsingAcrylicBrush{};
00128     bool m_noiseChanged{};
00129     bool m_isUsingOpaqueBrush{};
00130     bool m_isWaitingForFallbackAnimationComplete{};
00131     bool m_isDisabledByMaterialPolicy{};
00132
00133     winrt::event_token m_fallbackColorChangedToken{};
00134     winrt::event_token m_waitingForFallbackAnimationCompleteToken{};
00135     winrt::CompositionScopedBatch m_waitingForFallbackAnimationCompleteBatch{ nullptr };
00136     winrt::CompositionBrush m_brush{ nullptr };
00137     winrt::event_token m_materialPolicyChangedToken{};
00138     winrt::event_token m_noiseChangedToken{};
00139     winrt::CompositionSurfaceBrush m_noiseBrush{ nullptr };
00140 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnnotatedScrollBar.properties.h Source File

  • File List
  • File Members
  • Generated

AnnotatedScrollBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class AnnotatedScrollBarProperties
00008 {
00009 public:
00010     AnnotatedScrollBarProperties();
00011
00012     void DetailLabelTemplate(winrt::IElementFactory const& value);
00013     winrt::IElementFactory DetailLabelTemplate();
00014
00015     void Labels(winrt::IVector<winrt::AnnotatedScrollBarLabel> const& value);
00016     winrt::IVector<winrt::AnnotatedScrollBarLabel> Labels();
00017
00018     void LabelTemplate(winrt::IElementFactory const& value);
00019     winrt::IElementFactory LabelTemplate();
00020
00021     void SmallChange(double value);
00022     double SmallChange();
00023
00024     static winrt::DependencyProperty DetailLabelTemplateProperty() { return s_DetailLabelTemplateProperty; }
00025     static winrt::DependencyProperty LabelsProperty() { return s_LabelsProperty; }
00026     static winrt::DependencyProperty LabelTemplateProperty() { return s_LabelTemplateProperty; }
00027     static winrt::DependencyProperty SmallChangeProperty() { return s_SmallChangeProperty; }
00028
00029     static GlobalDependencyProperty s_DetailLabelTemplateProperty;
00030     static GlobalDependencyProperty s_LabelsProperty;
00031     static GlobalDependencyProperty s_LabelTemplateProperty;
00032     static GlobalDependencyProperty s_SmallChangeProperty;
00033
00034     winrt::event_token DetailLabelRequested(winrt::TypedEventHandler<winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs> const& value);
00035     void DetailLabelRequested(winrt::event_token const& token);
00036     winrt::event_token Scrolling(winrt::TypedEventHandler<winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs> const& value);
00037     void Scrolling(winrt::event_token const& token);
00038
00039     event_source<winrt::TypedEventHandler<winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs>> m_detailLabelRequestedEventSource;
00040     event_source<winrt::TypedEventHandler<winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs>> m_scrollingEventSource;
00041
00042     static void EnsureProperties();
00043     static void ClearProperties();
00044
00045     static void OnDetailLabelTemplatePropertyChanged(
00046         winrt::DependencyObject const& sender,
00047         winrt::DependencyPropertyChangedEventArgs const& args);
00048
00049     static void OnLabelsPropertyChanged(
00050         winrt::DependencyObject const& sender,
00051         winrt::DependencyPropertyChangedEventArgs const& args);
00052
00053     static void OnLabelTemplatePropertyChanged(
00054         winrt::DependencyObject const& sender,
00055         winrt::DependencyPropertyChangedEventArgs const& args);
00056
00057     static void OnSmallChangePropertyChanged(
00058         winrt::DependencyObject const& sender,
00059         winrt::DependencyPropertyChangedEventArgs const& args);
00060 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LinedFlowLayoutItemCollectionTransitionProvider Member List

This is the complete list of members for LinedFlowLayoutItemCollectionTransitionProvider, including all inherited members.
DefaultAnimationDuration | LinedFlowLayoutItemCollectionTransitionProvider | [private]
Epsilon | LinedFlowLayoutItemCollectionTransitionProvider | [private]
GetCenterPoint(winrt::UIElement const &element) | LinedFlowLayoutItemCollectionTransitionProvider | [private, static]
GetEaseInFunction(winrt::Compositor const &compositor) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
GetEaseOutFunction(winrt::Compositor const &compositor) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
QuickAnimationDuration | LinedFlowLayoutItemCollectionTransitionProvider | [private]
ScaleIn(winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, std::chrono::milliseconds const &delay, bool presetInitialValue=false) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
ScaleOut(winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, std::chrono::milliseconds const &delay, bool presetInitialValue=false) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
SlideIn(winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, std::chrono::milliseconds const &delay) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
SlideInDistance | LinedFlowLayoutItemCollectionTransitionProvider | [private]
StartAddTransitions(std::vector< winrt::ItemCollectionTransition > const &transitions, bool hasRemoveTransitions, bool hasMoveTransitions) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
StartAnimationGroup(winrt::Visual const &visual, winrt::CompositionAnimationGroup const &animationGroup) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
StartMoveTransitions(std::vector< winrt::ItemCollectionTransition > const &transitions, bool hasRemoveTransitions) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
StartRemoveTransitions(std::vector< winrt::ItemCollectionTransition > const &transitions, bool hasAddAnimations) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
Translate(winrt::CompositionAnimationGroup const &group, winrt::Compositor const &compositor, winrt::Rect const &from, winrt::Rect const &to, std::chrono::milliseconds const &delay, bool presetInitialValue=false) | LinedFlowLayoutItemCollectionTransitionProvider | [private]
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockStackLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks

MockStackLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Windows.Foundation;
00006
00007 using StackLayout = Microsoft.UI.Xaml.Controls.StackLayout;
00008 using VirtualizingLayoutContext = Microsoft.UI.Xaml.Controls.VirtualizingLayoutContext;
00009
00010 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks
00011 {
00012     class MockStackLayout : StackLayout
00013     {
00014         public Func<Size, VirtualizingLayoutContext, Size> MeasureLayoutFunc { get; set; }
00015         public Func<Size, VirtualizingLayoutContext, Size> ArrangeLayoutFunc { get; set; }
00016
00017         public new void InvalidateMeasure()
00018         {
00019             base.InvalidateMeasure();
00020         }
00021
00022         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00023         {
00024             return MeasureLayoutFunc != null ? MeasureLayoutFunc(availableSize, context) : default(Size);
00025         }
00026
00027         protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00028         {
00029             return ArrangeLayoutFunc != null ? ArrangeLayoutFunc(finalSize, context) : default(Size);
00030         }
00031     }
00032 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTrace Member List

This is the complete list of members for ScrollPresenterTrace, including all inherited members.
s_IsDebugOutputEnabled | ScrollPresenterTrace | [static]
s_IsVerboseDebugOutputEnabled | ScrollPresenterTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ScrollPresenterTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | ScrollPresenterTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ScrollPresenterTrace | [inline, static]
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/KeyboardNavigationSample.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples

KeyboardNavigationSample.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Linq;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Input;
00008
00009 namespace MUXControlsTestApp.Samples
00010 {
00011     public sealed partial class KeyboardNavigationSample : TestPage
00012     {
00013         public KeyboardNavigationSample()
00014         {
00015             this.InitializeComponent();
00016             HookItemsRepeaterEvents(itemsRepeater);
00017
00018             GotFocus += KeyboardNavigationSample_GotFocus;
00019         }
00020
00021         ~KeyboardNavigationSample()
00022         {
00023         }
00024
00025         private void KeyboardNavigationSample_GotFocus(object sender, RoutedEventArgs e)
00026         {
00027             FrameworkElement fe = e.OriginalSource as FrameworkElement;
00028
00029             if (fe != null)
00030             {
00031                 AppendLog($"KeyboardNavigationSample.GotFocus OriginalSource={e.OriginalSource}, Name={fe.Name}");
00032             }
00033             else
00034             {
00035                 AppendLog($"KeyboardNavigationSample.GotFocus OriginalSource={e.OriginalSource}");
00036             }
00037         }
00038
00039         private void CmbScrollViewTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00040         {
00041             if (scrollView != null && cmbScrollViewTabNavigation != null)
00042             {
00043                 scrollView.TabNavigation = (KeyboardNavigationMode)cmbScrollViewTabNavigation.SelectedIndex;
00044             }
00045         }
00046
00047         private void CmbItemsRepeaterTabFocusNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00048         {
00049             if (itemsRepeater != null && cmbItemsRepeaterTabFocusNavigation != null)
00050             {
00051                 itemsRepeater.TabFocusNavigation = (KeyboardNavigationMode)cmbItemsRepeaterTabFocusNavigation.SelectedIndex;
00052             }
00053         }
00054
00055         private void BtnSetItemsSource_Click(object sender, RoutedEventArgs e)
00056         {
00057             itemsRepeater.ItemsSource = Enumerable.Range(0, 20).Select(i => string.Format("Item #{0}", i));
00058         }
00059
00060         private void BtnResetItemsSource_Click(object sender, RoutedEventArgs e)
00061         {
00062             itemsRepeater.ItemsSource = null;
00063         }
00064
00065         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
00066         {
00067             lvLogs.Items.Clear();
00068         }
00069
00070         private void HookItemsRepeaterEvents(ItemsRepeater itemsRepeater)
00071         {
00072             if (itemsRepeater != null)
00073             {
00074                 itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
00075                 itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
00076             }
00077         }
00078
00079         private void AppendLog(string log)
00080         {
00081             lvLogs.Items.Add(log);
00082         }
00083
00084         private void ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
00085         {
00086             AppendLog($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}");
00087         }
00088
00089         private void ItemsRepeater_ElementClearing(ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
00090         {
00091             AppendLog($"ItemsRepeater.ElementClearing Element={args.Element}");
00092         }
00093     }
00094 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorSpectrum Member List

This is the complete list of members for ColorSpectrum, including all inherited members.
_factory | ColorSpectrum | [private, static]
_valuePattern | ColorSpectrum | [private]
ColorSpectrum(UIObject uiObject) | ColorSpectrum | [inline]
Factory | ColorSpectrum | [static]
GetColorChangedWaiter() | ColorSpectrum | [inline]
Initialize() | ColorSpectrum | [inline, private]
IsReadOnly | ColorSpectrum |
SetValue(string value) | ColorSpectrum | [inline, virtual]
Value | ColorSpectrum |
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBackgroundBrush.properties.cpp Source File

  • File List
  • File Members
  • Generated

RevealBackgroundBrush.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RevealBackgroundBrush.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Media
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RevealBackgroundBrush)
00012 }
00013
00014 #include "RevealBackgroundBrush.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PullToRefreshHelperTestApi.properties.cpp Source File

  • File List
  • File Members
  • Generated

PullToRefreshHelperTestApi.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PullToRefreshHelperTestApi.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(PullToRefreshHelperTestApi)
00012 }
00013
00014 #include "PullToRefreshHelperTestApi.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProfileGroupInfo Member List

This is the complete list of members for ProfileGroupInfo, including all inherited members.
pGroup | ProfileGroupInfo
pszGroupName | ProfileGroupInfo
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshVisualizerProperties Member List

This is the complete list of members for RefreshVisualizerProperties, including all inherited members.
ClearProperties() | RefreshVisualizerProperties | [static]
Content(winrt::UIElement const &value) | RefreshVisualizerProperties |
Content() | RefreshVisualizerProperties |
ContentProperty() | RefreshVisualizerProperties | [inline, static]
EnsureProperties() | RefreshVisualizerProperties | [static]
InfoProviderProperty() | RefreshVisualizerProperties | [inline, static]
m_refreshRequestedEventSource | RefreshVisualizerProperties |
m_refreshStateChangedEventSource | RefreshVisualizerProperties |
OnContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
OnInfoProviderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
OnOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
OnStatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
Orientation(winrt::RefreshVisualizerOrientation const &value) | RefreshVisualizerProperties |
Orientation() | RefreshVisualizerProperties |
OrientationProperty() | RefreshVisualizerProperties | [inline, static]
RefreshRequested(winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshRequestedEventArgs > const &value) | RefreshVisualizerProperties |
RefreshRequested(winrt::event_token const &token) | RefreshVisualizerProperties |
RefreshStateChanged(winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshStateChangedEventArgs > const &value) | RefreshVisualizerProperties |
RefreshStateChanged(winrt::event_token const &token) | RefreshVisualizerProperties |
RefreshVisualizerProperties() | RefreshVisualizerProperties |
s_ContentProperty | RefreshVisualizerProperties | [static]
s_InfoProviderProperty | RefreshVisualizerProperties | [static]
s_OrientationProperty | RefreshVisualizerProperties | [static]
s_StateProperty | RefreshVisualizerProperties | [static]
State(winrt::RefreshVisualizerState const &value) | RefreshVisualizerProperties |
State() | RefreshVisualizerProperties |
StateProperty() | RefreshVisualizerProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock Member List

This is the complete list of members for LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock, including all inherited members.
BlockSize() | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock | [inline, static]
Clear() | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock |
EndIndex() const | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock | [inline]
GetAt(int itemIndex) const | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock |
GetTotals(int firstItemIndex, int lastItemIndex, int weight) const | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock |
HasLowerWeight(int firstItemIndex, int lastItemIndex, int weight) const | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock |
IncludesItemIndex(int itemIndex) const | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock |
ItemAspectRatioBlock() | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock | [inline]
m_aspectRatios | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock | [private]
SetAt(int itemIndex, ItemAspectRatio itemAspectRatio) | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock |
StartIndex() const | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock | [inline]
StartIndex(int startIndex) | LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock | [inline]
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator Member List

This is the complete list of members for VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator, including all inherited members.
abi_enter() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
CheckThread() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
Current() | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< Iterator > &&self) noexcept | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
final_release(std::unique_ptr< Iterator > &&self) | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline, static]
GetBase() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
GetInner() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
GetMany(winrt::array_view< T > values) | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator | [inline]
HasCurrent() | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator | [inline]
IsOnThread() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
Iterator(const winrt::IVectorView< T > &childCollection) | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator | [inline]
m_currentIndex | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator | [private]
MoveNext() | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< T > >::type > | [inline]
~Iterator() | VirtualLayoutContextAdapter::ChildrenCollection< T >::Iterator | [inline]
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimationsDemoPage Member List

This is the complete list of members for AnimationsDemoPage, including all inherited members.
_dataSource | AnimationsDemoPage | [private]
_groups | AnimationsDemoPage | [private]
_lorem | AnimationsDemoPage | [private]
_rnd | AnimationsDemoPage | [private]
AnimationsDemoPage() | AnimationsDemoPage | [inline]
CreateRecipe(int groupIndex, int itemIndex) | AnimationsDemoPage | [inline, private]
ProcessAddCommand(string command) | AnimationsDemoPage | [inline, private]
ProcessClearCommand(string command) | AnimationsDemoPage | [inline, private]
ProcessCommand(string command) | AnimationsDemoPage | [inline, private]
ProcessCommands(string commands) | AnimationsDemoPage | [inline, private]
ProcessRemoveCommand(string command) | AnimationsDemoPage | [inline, private]
ProcessResetCommand(string command) | AnimationsDemoPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/DoubleUtil.h Source File

  • File List
  • File Members
  • inc

DoubleUtil.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class DoubleUtil
00007 {
00008 public:
00009     // Represents a value that is not a number (NaN).
00010     static const double NaN;
00011 };
00012
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RegressionTestScenario Member List

This is the complete list of members for RegressionTestScenario, including all inherited members.
BuildAllRegressionTestScenarios() | RegressionTestScenario | [inline, static]
BuildHierarchicalNavRegressionTestScenarios() | RegressionTestScenario | [inline, static]
BuildLeftNavRegressionTestScenarios() | RegressionTestScenario | [inline, static]
BuildTestScenarios(RegressionTestType types) | RegressionTestScenario | [inline, private, static]
BuildTopNavRegressionTestScenarios() | RegressionTestScenario | [inline, static]
IsLeftNavTest | RegressionTestScenario |
IsUsingRS4Style | RegressionTestScenario |
RegressionTestScenario(string testPagename, bool isLeftnavTest, bool isUsingRS4Style) | RegressionTestScenario | [inline, private]
TestPageName | RegressionTestScenario |
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemAspectRatios.h Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemAspectRatios.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "LinedFlowLayoutTrace.h"
00007
00008 // This class is used to track weighted aspect ratios of some LinedFlowLayout items. Blocks tracking 64 contiguous items
00009 // are allocated. To minimize allocations, those blocks are re-used when a different area of the items collection needs
00010 // to be tracked.
00011 //
00012 // Example:
00013 // Initially blocks [0,63][64,127] track the first items of 5700 items i the collection.  The user uses the PageDown key a
00014 // few times and the tracking blocks are extended to [0,63][64,127][128,191][192,255].  Then the user hits the End key
00015 // causing the blocks to track [0,63][64,127][128,191][192,255][5632,5695][5696,5759].  Finally the user keeps hitting the
00016 // PageUp key to the middle of the collection and the blocks become:
00017 // [2624,2687][2688,2751][2752,2815][2816,2879][2880,2943][2944,3007][3008,3071].
00018 //
00019 // The consumer of this class is in charge of setting a limit to the number of items being tracked. In this case the LinedFlowLayout
00020 // sets the limit to 10 scrolling viewports worth of items. If on average a scrolling viewport can hold 40 items, no more than
00021 // 7 blocks (i.e. 400 / 64) will be allocated to store aspect ratios of 400 items at a time.
00022 //
00023 // As the user jumps from area to area in the items collection, the closest existing blocks from the new area are preserved,
00024 // while the furthest away are recycled.
00025
00026 class LinedFlowLayoutItemAspectRatios
00027 {
00028 public:
00029     LinedFlowLayoutItemAspectRatios() {};
00030
00031     struct ItemAspectRatio
00032     {
00033     public:
00034         float m_aspectRatio{};
00035         int m_weight{};
00036     };
00037
00038     static constexpr ItemAspectRatio s_emptyItemAspectRatio
00039     {
00040         0.0f /*aspectRatio*/,
00041         0 /*weight*/
00042     };
00043
00044     bool HasLowerWeight(
00045         int firstItemIndex,
00046         int lastItemIndex,
00047         int weight) const;
00048
00049     bool IsEmpty() const;
00050
00051     float GetAverageAspectRatio(
00052         int firstItemIndex,
00053         int lastItemIndex,
00054         int weight) const;
00055
00056     ItemAspectRatio GetAt(
00057         int itemIndex) const;
00058     void SetAt(
00059         int itemIndex, ItemAspectRatio itemAspectRatio);
00060
00061     void Clear();
00062
00063     void Resize(
00064         int size,
00065         int referenceItemIndex);
00066
00067 #ifdef DBG
00068     void LogItemAspectRatiosDbg();
00069 #endif
00070
00071 private:
00072     class ItemAspectRatioBlock
00073     {
00074     public:
00075         ItemAspectRatioBlock() {};
00076
00077         ItemAspectRatio GetTotals(int firstItemIndex,
00078             int lastItemIndex,
00079             int weight) const;
00080
00081         bool HasLowerWeight(
00082             int firstItemIndex,
00083             int lastItemIndex,
00084             int weight) const;
00085
00086         bool IncludesItemIndex(
00087             int itemIndex) const;
00088
00089         ItemAspectRatio GetAt(
00090             int itemIndex) const;
00091         void SetAt(
00092             int itemIndex, ItemAspectRatio itemAspectRatio);
00093
00094         int StartIndex() const
00095         {
00096             return m_startIndex;
00097         }
00098
00099         void StartIndex(
00100             int startIndex)
00101         {
00102             m_startIndex = startIndex;
00103         }
00104
00105         int EndIndex() const
00106         {
00107             return m_startIndex == -1 ? -1 : m_startIndex + c_blockSize - 1;
00108         }
00109
00110         static int BlockSize()
00111         {
00112             return c_blockSize;
00113         }
00114
00115         void Clear();
00116
00117 #ifdef DBG
00118         void LogItemAspectRatioBlockDbg();
00119 #endif
00120
00121     private:
00122         static constexpr int c_blockSize{ 64 };
00123
00124         ItemAspectRatio m_aspectRatios[c_blockSize];
00125         int m_startIndex{ -1 };
00126     };
00127
00128     std::shared_ptr<ItemAspectRatioBlock> GetEmptyOrFurthestBlock(
00129         int fromItemIndex);
00130
00131     std::set<std::shared_ptr<ItemAspectRatioBlock>> m_itemAspectRatioBlocks{};
00132 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InspectingDataSourceTests Member List

This is the complete list of members for InspectingDataSourceTests, including all inherited members.
CanCreateFromIBindableIterable() | InspectingDataSourceTests | [inline]
CanCreateFromInccIBindableVector() | InspectingDataSourceTests | [inline]
CanCreateFromIObservableVector() | InspectingDataSourceTests | [inline]
GetCount(IList vector) | InspectingDataSourceTests | [inline, private, static]
ValidateSwitchingItemsSourceRefreshesElements(bool isVirtualLayout) | InspectingDataSourceTests | [inline]
ValidateSwitchingItemsSourceRefreshesElementsNonVirtualLayout() | InspectingDataSourceTests | [inline]
ValidateSwitchingItemsSourceRefreshesElementsVirtualLayout() | InspectingDataSourceTests | [inline]
VerifyCallingResetMultipleTimesOnUniqueIdItemsSource() | InspectingDataSourceTests | [inline]
VerifyIndexOfBehavior() | InspectingDataSourceTests | [inline]
VerifyNotifyCollectionChangeWithReadonlyListBehavior() | InspectingDataSourceTests | [inline]
VerifyReadOnlyListCompatibility() | InspectingDataSourceTests | [inline]
VerifyRecordedCollectionChanges(NotifyCollectionChangedEventArgs[] expected, List< NotifyCollectionChangedEventArgs > actual) | InspectingDataSourceTests | [inline, private, static]
VerifyUniqueIdMappingInterface() | InspectingDataSourceTests | [inline]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsCaseBundle Member List

This is the complete list of members for RadioButtonsCaseBundle, including all inherited members.
RadioButtonsCaseBundle() RadioButtonsCaseBundle [inline]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ListViewElementNameBindingPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ListViewElementNameBindingPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Data;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class ListViewElementNameBindingPage : TestPage
00013     {
00014         public List<MUXControlsTestApp.Samples.MyData> Numbers = new List<MUXControlsTestApp.Samples.MyData>();
00015
00016         public ListViewElementNameBindingPage()
00017         {
00018             for (int i = 0; i < 3; i++)
00019             {
00020                 Numbers.Add(new MUXControlsTestApp.Samples.MyData(i));
00021             }
00022
00023             this.InitializeComponent();
00024         }
00025
00026         private void ChkSample_CheckedChanged(object sender, RoutedEventArgs e)
00027         {
00028             if (sender == chkSample0)
00029             {
00030                 listView0.Visibility = (bool)chkSample0.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00031             }
00032             else if (sender == chkSample1)
00033             {
00034                 listView1.Visibility = (bool)chkSample1.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00035             }
00036             else if (sender == chkSample2)
00037             {
00038                 listView2.Visibility = (bool)chkSample2.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00039             }
00040             else if (sender == chkSample3)
00041             {
00042                 listView3.Visibility = (bool)chkSample3.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00043             }
00044             else if (sender == chkSample4)
00045             {
00046                 listView4.Visibility = (bool)chkSample4.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00047             }
00048         }
00049
00050         private void ListView_ItemClick(object sender, ItemClickEventArgs e)
00051         {
00052             Popup popup = ((sender as ItemsControl).ItemsPanelRoot.Children[(((MUXControlsTestApp.Samples.MyData)e.ClickedItem).number)] as ListViewItem).ContentTemplateRoot as Popup;
00053
00054             if (popup != null)
00055             {
00056                 popup.IsOpen = true;
00057             }
00058         }
00059     }
00060 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutTrace Member List

This is the complete list of members for CommandBarFlyoutTrace, including all inherited members.
s_IsDebugOutputEnabled | CommandBarFlyoutTrace | [static]
s_IsVerboseDebugOutputEnabled | CommandBarFlyoutTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | CommandBarFlyoutTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | CommandBarFlyoutTrace | [inline, static]
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MUXControlsTestHooks Member List

This is the complete list of members for MUXControlsTestHooks, including all inherited members.
BuildTreeCompleted(winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value) | MUXControlsTestHooks | [static]
BuildTreeCompleted(winrt::event_token const &token) | MUXControlsTestHooks | [static]
BuildTreeCompletedImpl(winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value) | MUXControlsTestHooks |
BuildTreeCompletedImpl(winrt::event_token const &token) | MUXControlsTestHooks |
EnsureHooks() | MUXControlsTestHooks | [private, static]
GetGlobalTestHooks() | MUXControlsTestHooks | [inline, static]
GetLoggingLevelForInstance(const winrt::IInspectable &sender) | MUXControlsTestHooks |
GetLoggingLevelForType(const wstring_view &type) | MUXControlsTestHooks |
LoggingMessage(winrt::TypedEventHandler< winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs > const &value) | MUXControlsTestHooks | [static]
LoggingMessage(winrt::event_token const &token) | MUXControlsTestHooks | [static]
LoggingMessageImpl(winrt::TypedEventHandler< winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs > const &value) | MUXControlsTestHooks |
LoggingMessageImpl(winrt::event_token const &token) | MUXControlsTestHooks |
LogMessage(const winrt::IInspectable &sender, const wstring_view &message, bool isVerboseLevel) | MUXControlsTestHooks |
m_buildTreeCompleted | MUXControlsTestHooks | [private]
m_instanceLoggingLevels | MUXControlsTestHooks | [private]
m_loggingMessageEventSource | MUXControlsTestHooks | [private]
m_typeLoggingLevels | MUXControlsTestHooks | [private]
NotifyBuildTreeCompleted() | MUXControlsTestHooks | [static]
NotifyBuildTreeCompletedImpl() | MUXControlsTestHooks |
s_testHooks | MUXControlsTestHooks | [private, static]
SetLoggingLevelForInstance(winrt::IInspectable const &sender, bool isLoggingInfoLevel, bool isLoggingVerboseLevel) | MUXControlsTestHooks | [static]
SetLoggingLevelForInstanceImpl(const winrt::IInspectable &sender, bool isLoggingInfoLevel, bool isLoggingVerboseLevel) | MUXControlsTestHooks |
SetLoggingLevelForType(winrt::hstring const &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel) | MUXControlsTestHooks | [static]
SetLoggingLevelForTypeImpl(const wstring_view &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel) | MUXControlsTestHooks |
SetOutputDebugStringLevelForType(winrt::hstring const &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel) | MUXControlsTestHooks | [static]
SetOutputDebugStringLevelForTypeImpl(const wstring_view &type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel) | MUXControlsTestHooks |
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipTemplateSettings Member List

This is the complete list of members for TeachingTipTemplateSettings, including all inherited members.
ClearProperties() | TeachingTipTemplateSettingsProperties | [static]
EnsureProperties() | TeachingTipTemplateSettingsProperties | [static]
IconElement(winrt::IconElement const &value) | TeachingTipTemplateSettingsProperties |
IconElement() | TeachingTipTemplateSettingsProperties |
IconElementProperty() | TeachingTipTemplateSettingsProperties | [inline, static]
s_IconElementProperty | TeachingTipTemplateSettingsProperties | [static]
s_TopLeftHighlightMarginProperty | TeachingTipTemplateSettingsProperties | [static]
s_TopRightHighlightMarginProperty | TeachingTipTemplateSettingsProperties | [static]
TeachingTipTemplateSettings() | TeachingTipTemplateSettings |
TeachingTipTemplateSettingsProperties() | TeachingTipTemplateSettingsProperties |
TopLeftHighlightMargin(winrt::Thickness const &value) | TeachingTipTemplateSettingsProperties |
TopLeftHighlightMargin() | TeachingTipTemplateSettingsProperties |
TopLeftHighlightMarginProperty() | TeachingTipTemplateSettingsProperties | [inline, static]
TopRightHighlightMargin(winrt::Thickness const &value) | TeachingTipTemplateSettingsProperties |
TopRightHighlightMargin() | TeachingTipTemplateSettingsProperties |
TopRightHighlightMarginProperty() | TeachingTipTemplateSettingsProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainer.cpp Source File

  • File List
  • File Members
  • ItemContainer

ItemContainer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ItemContainer.h"
00008 #include "RuntimeProfiler.h"
00009 #include "ResourceAccessor.h"
00010 #include "PointerInfoRevokers.h"
00011 #include "ItemContainerInvokedEventArgs.h"
00012 #include "ItemContainerAutomationPeer.h"
00013
00014 // Change to 'true' to turn on debugging outputs in Output window
00015 bool ItemContainerTrace::s_IsDebugOutputEnabled{ false };
00016 bool ItemContainerTrace::s_IsVerboseDebugOutputEnabled{ false };
00017
00018 // Keeps track of the one ItemContainer with the mouse pointer over, if any.
00019 // The OnPointerExited method does not get invoked when the ItemContainer is scrolled away from the mouse pointer.
00020 // This static instance allows to clear the mouse over state when any other ItemContainer gets the mouse over state.
00021 static thread_local winrt::weak_ref<ItemContainer> s_mousePointerOverInstance = nullptr;
00022
00023 ItemContainer::ItemContainer()
00024 {
00025     ITEMCONTAINER_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00026
00027     __RP_Marker_ClassById(RuntimeProfiler::ProfId_ItemContainer);
00028
00029     EnsureProperties();
00030     SetDefaultStyleKey(this);
00031 }
00032
00033 ItemContainer::~ItemContainer()
00034 {
00035     ITEMCONTAINER_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00036
00037     if (auto mousePointerOverInstance = s_mousePointerOverInstance.get())
00038     {
00039         if (mousePointerOverInstance.get() == this)
00040         {
00041             s_mousePointerOverInstance = nullptr;
00042         }
00043     }
00044 }
00045
00046 void ItemContainer::OnApplyTemplate()
00047 {
00048     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00049
00050     // Unload events from previous template when ItemContainer gets a new template.
00051     if (auto&& selectionCheckbox = m_selectionCheckbox.get())
00052     {
00053         m_checked_revoker.revoke();
00054         m_unchecked_revoker.revoke();
00055     }
00056
00057     winrt::IControlProtected controlProtected{ *this };
00058     m_rootPanel.set(GetTemplateChildT<winrt::Panel>(s_containerRootName, controlProtected));
00059
00060     // If the Child property is already set, add it to the tree. After this point, the
00061     // property changed event for Child property will add it to the tree.
00062     if (const auto& child = Child())
00063     {
00064         if (auto&& rootPanel = m_rootPanel.get())
00065         {
00066             rootPanel.Children().InsertAt(0, child);
00067         }
00068     }
00069
00070     m_pointerInfo = std::make_shared<PointerInfo<ItemContainer>>();
00071     m_isEnabledChangedRevoker.revoke();
00072     m_isEnabledChangedRevoker = IsEnabledChanged(winrt::auto_revoke, { this,  &ItemContainer::OnIsEnabledChanged });
00073
00074     __super::OnApplyTemplate();
00075
00076     UpdateVisualState(true);
00077     UpdateMultiSelectState(true);
00078 }
00079
00080 winrt::AutomationPeer ItemContainer::OnCreateAutomationPeer()
00081 {
00082     return winrt::make<ItemContainerAutomationPeer>(*this);
00083 }
00084
00085 void ItemContainer::OnIsEnabledChanged(winrt::IInspectable const& sender, winrt::DependencyPropertyChangedEventArgs const& args)
00086 {
00087     ITEMCONTAINER_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, IsEnabled());
00088
00089     if (!IsEnabled())
00090     {
00091         ProcessPointerCanceled(nullptr);
00092     }
00093     else
00094     {
00095         UpdateVisualState(true);
00096     }
00097 }
00098
00099 void ItemContainer::OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00100 {
00101     auto dependencyProperty = args.Property();
00102
00103 #ifdef DBG
00104     if (dependencyProperty == s_IsSelectedProperty)
00105     {
00106         const bool oldValue = unbox_value<bool>(args.OldValue());
00107         const bool newValue = unbox_value<bool>(args.NewValue());
00108
00109         ITEMCONTAINER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"IsSelected", oldValue, newValue);
00110     }
00111     else if (dependencyProperty == s_MultiSelectModeProperty)
00112     {
00113         const winrt::ItemContainerMultiSelectMode oldValue = unbox_value<winrt::ItemContainerMultiSelectMode>(args.OldValue());
00114         const winrt::ItemContainerMultiSelectMode newValue = unbox_value<winrt::ItemContainerMultiSelectMode>(args.NewValue());
00115
00116         ITEMCONTAINER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, L"MultiSelectMode", TypeLogging::ItemContainerMultiSelectModeToString(newValue).c_str());
00117     }
00118     else
00119     {
00120         ITEMCONTAINER_TRACE_VERBOSE(nullptr, L"%s[%p](property: %s)\n", METH_NAME, this, DependencyPropertyToString(dependencyProperty).c_str());
00121     }
00122 #endif
00123
00124     if (dependencyProperty == s_IsSelectedProperty)
00125     {
00126 #ifdef MUX_PRERELEASE
00127         const bool isMultipleOrExtended = (static_cast<int>(MultiSelectMode() & (winrt::ItemContainerMultiSelectMode::Multiple | winrt::ItemContainerMultiSelectMode::Extended)));
00128 #else
00129         const bool isMultipleOrExtended = (static_cast<int>(MultiSelectModeInternal() & (winrt::ItemContainerMultiSelectMode::Multiple | winrt::ItemContainerMultiSelectMode::Extended)));
00130 #endif
00131
00132         const winrt::AutomationEvents eventToRaise =
00133             IsSelected() ?
00134             (isMultipleOrExtended ? winrt::AutomationEvents::SelectionItemPatternOnElementAddedToSelection : winrt::AutomationEvents::SelectionItemPatternOnElementSelected) :
00135             (isMultipleOrExtended ? winrt::AutomationEvents::SelectionItemPatternOnElementRemovedFromSelection :winrt::AutomationEvents::PropertyChanged);
00136
00137         if (eventToRaise != winrt::AutomationEvents::PropertyChanged && winrt::AutomationPeer::ListenerExists(eventToRaise))
00138         {
00139             if (const auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(*this))
00140             {
00141                 peer.RaiseAutomationEvent(eventToRaise);
00142             }
00143         }
00144     }
00145     else if (dependencyProperty == s_ChildProperty)
00146     {
00147         if (auto&& rootPanel = m_rootPanel.get())
00148         {
00149             unsigned int oldChildIndex{};
00150
00151             if (args.OldValue() != nullptr && rootPanel.Children().IndexOf(args.OldValue().as<winrt::UIElement>(), oldChildIndex))
00152             {
00153                 rootPanel.Children().RemoveAt(oldChildIndex);
00154             }
00155
00156             rootPanel.Children().InsertAt(0, args.NewValue().as<winrt::UIElement>());
00157         }
00158     }
00159
00160     if (m_pointerInfo != nullptr)
00161     {
00162         if (dependencyProperty == s_IsSelectedProperty ||
00163             dependencyProperty == s_MultiSelectModeProperty)
00164         {
00165             UpdateVisualState(true);
00166             UpdateMultiSelectState(true);
00167         }
00168     }
00169 }
00170
00171 void ItemContainer::GoToState(std::wstring_view const& stateName, bool useTransitions)
00172 {
00173     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, stateName.data(), useTransitions);
00174
00175     winrt::VisualStateManager::GoToState(*this, stateName, useTransitions);
00176 }
00177
00178 void ItemContainer::UpdateVisualState(bool useTransitions)
00179 {
00180     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, useTransitions);
00181
00182     // DisabledStates
00183     if (!IsEnabled())
00184     {
00185         GoToState(s_disabledStateName, useTransitions);
00186         GoToState(IsSelected() ? s_selectedNormalStateName : s_unselectedNormalStateName, useTransitions);
00187     }
00188     else
00189     {
00190         GoToState(s_enabledStateName, useTransitions);
00191
00192         // CombinedStates
00193         if (m_pointerInfo == nullptr)
00194         {
00195             return;
00196         }
00197
00198         if (m_pointerInfo->IsPressed() && IsSelected())
00199         {
00200             GoToState(s_selectedPressedStateName, useTransitions);
00201         }
00202         else if (m_pointerInfo->IsPressed())
00203         {
00204             GoToState(s_unselectedPressedStateName, useTransitions);
00205         }
00206         else if (m_pointerInfo->IsPointerOver() && IsSelected())
00207         {
00208             GoToState(s_selectedPointerOverStateName, useTransitions);
00209         }
00210         else if (m_pointerInfo->IsPointerOver())
00211         {
00212             GoToState(s_unselectedPointerOverStateName, useTransitions);
00213         }
00214         else if (IsSelected())
00215         {
00216             GoToState(s_selectedNormalStateName, useTransitions);
00217         }
00218         else
00219         {
00220             GoToState(s_unselectedNormalStateName, useTransitions);
00221         }
00222     }
00223 }
00224
00225 void ItemContainer::UpdateMultiSelectState(bool useTransitions)
00226 {
00227     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, useTransitions);
00228
00229 #ifdef MUX_PRERELEASE
00230     const winrt::ItemContainerMultiSelectMode multiSelectMode = MultiSelectMode();
00231 #else
00232     const winrt::ItemContainerMultiSelectMode multiSelectMode = MultiSelectModeInternal();
00233 #endif
00234
00235     // MultiSelectStates
00236     if (static_cast<int>(multiSelectMode & winrt::ItemContainerMultiSelectMode::Multiple))
00237     {
00238         GoToState(s_multipleStateName, useTransitions);
00239
00240         if (!m_selectionCheckbox.get())
00241         {
00242             LoadSelectionCheckbox();
00243         }
00244
00245         UpdateCheckboxState();
00246     }
00247     else
00248     {
00249         GoToState(s_singleStateName, useTransitions);
00250     }
00251 }
00252
00253 void ItemContainer::ProcessPointerOver(winrt::PointerRoutedEventArgs const& args, bool isPointerOver)
00254 {
00255     if (m_pointerInfo)
00256     {
00257         const bool oldIsPointerOver = m_pointerInfo->IsPointerOver();
00258         auto const& pointerDeviceType = args.Pointer().PointerDeviceType();
00259
00260         if (pointerDeviceType == winrt::PointerDeviceType::Touch)
00261         {
00262             if (isPointerOver)
00263             {
00264                 m_pointerInfo->SetIsTouchPointerOver();
00265             }
00266             else
00267             {
00268                 // Once a touch pointer leaves the ItemContainer it is no longer tracked because this
00269                 // ItemContainer may never receive a PointerReleased, PointerCanceled or PointerCaptureLost
00270                 // for that PointerId.
00271                 m_pointerInfo->ResetAll();
00272             }
00273         }
00274         else if (pointerDeviceType == winrt::PointerDeviceType::Pen)
00275         {
00276             if (isPointerOver)
00277             {
00278                 m_pointerInfo->SetIsPenPointerOver();
00279             }
00280             else
00281             {
00282                 // Once a pen pointer leaves the ItemContainer it is no longer tracked because this
00283                 // ItemContainer may never receive a PointerReleased, PointerCanceled or PointerCaptureLost
00284                 // for that PointerId.
00285                 m_pointerInfo->ResetAll();
00286             }
00287         }
00288         else
00289         {
00290             if (isPointerOver)
00291             {
00292                 m_pointerInfo->SetIsMousePointerOver();
00293             }
00294             else
00295             {
00296                 m_pointerInfo->ResetIsMousePointerOver();
00297             }
00298             UpdateMousePointerOverInstance(isPointerOver);
00299         }
00300
00301         if (m_pointerInfo->IsPointerOver() != oldIsPointerOver)
00302         {
00303             UpdateVisualState(true);
00304         }
00305     }
00306 }
00307
00308 void ItemContainer::ProcessPointerCanceled(winrt::PointerRoutedEventArgs const& args)
00309 {
00310     ITEMCONTAINER_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, args == nullptr ? -1 : args.Pointer().PointerId());
00311
00312     if (m_pointerInfo)
00313     {
00314         if (args == nullptr)
00315         {
00316             m_pointerInfo->ResetAll();
00317         }
00318         else
00319         {
00320             auto const& pointer = args.Pointer();
00321
00322             if (m_pointerInfo->IsPointerIdTracked(pointer.PointerId()))
00323             {
00324                 m_pointerInfo->ResetTrackedPointerId();
00325             }
00326
00327             auto const& pointerDeviceType = pointer.PointerDeviceType();
00328
00329             switch (pointerDeviceType)
00330             {
00331             case winrt::PointerDeviceType::Touch:
00332                 m_pointerInfo->ResetPointerPressed();
00333                 m_pointerInfo->ResetIsTouchPointerOver();
00334                 break;
00335             case winrt::PointerDeviceType::Pen:
00336                 m_pointerInfo->ResetPointerPressed();
00337                 m_pointerInfo->ResetIsPenPointerOver();
00338                 break;
00339             case winrt::PointerDeviceType::Mouse:
00340                 m_pointerInfo->ResetIsMouseButtonPressed(true /*isForLeftMouseButton*/);
00341                 m_pointerInfo->ResetIsMouseButtonPressed(false /*isForLeftMouseButton*/);
00342                 m_pointerInfo->ResetIsMousePointerOver();
00343                 UpdateMousePointerOverInstance(false /*isPointerOver*/);
00344                 break;
00345             }
00346         }
00347     }
00348
00349     UpdateVisualState(true);
00350 }
00351
00352 void ItemContainer::OnPointerEntered(winrt::PointerRoutedEventArgs const& args)
00353 {
00354     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());
00355
00356     __super::OnPointerEntered(args);
00357
00358     ProcessPointerOver(args, true /*isPointerOver*/);
00359 }
00360
00361 void ItemContainer::OnPointerMoved(winrt::PointerRoutedEventArgs const& args)
00362 {
00363     __super::OnPointerMoved(args);
00364
00365     ProcessPointerOver(args, true /*isPointerOver*/);
00366 }
00367
00368 void ItemContainer::OnPointerExited(winrt::PointerRoutedEventArgs const& args)
00369 {
00370     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());
00371
00372     __super::OnPointerExited(args);
00373
00374     ProcessPointerOver(args, false /*isPointerOver*/);
00375 }
00376
00377 void ItemContainer::OnPointerPressed(winrt::PointerRoutedEventArgs const& args)
00378 {
00379     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());
00380
00381     __super::OnPointerPressed(args);
00382
00383     if (m_pointerInfo == nullptr || args.Handled())
00384     {
00385         return;
00386     }
00387
00388     auto const& pointer = args.Pointer();
00389     auto const& pointerDeviceType = pointer.PointerDeviceType();
00390     winrt::PointerUpdateKind pointerUpdateKind{ winrt::PointerUpdateKind::Other };
00391
00392     if (pointerDeviceType == winrt::PointerDeviceType::Mouse)
00393     {
00394         const auto pointerProperties = args.GetCurrentPoint(*this).Properties();
00395
00396         pointerUpdateKind = pointerProperties.PointerUpdateKind();
00397
00398         if (pointerUpdateKind != winrt::PointerUpdateKind::LeftButtonPressed &&
00399             pointerUpdateKind != winrt::PointerUpdateKind::RightButtonPressed)
00400         {
00401             return;
00402         }
00403     }
00404
00405     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, TypeLogging::PointerDeviceTypeToString(pointerDeviceType).c_str(), TypeLogging::PointerUpdateKindToString(pointerUpdateKind).c_str());
00406
00407     const auto pointerId = pointer.PointerId();
00408
00409     if (!m_pointerInfo->IsTrackingPointer())
00410     {
00411         m_pointerInfo->TrackPointerId(pointerId);
00412     }
00413     else if (!m_pointerInfo->IsPointerIdTracked(pointerId))
00414     {
00415         return;
00416     }
00417
00418     bool canRaiseItemInvoked = CanRaiseItemInvoked();
00419
00420     switch (pointerDeviceType)
00421     {
00422     case winrt::PointerDeviceType::Touch:
00423         m_pointerInfo->SetPointerPressed();
00424         m_pointerInfo->SetIsTouchPointerOver();
00425         break;
00426     case winrt::PointerDeviceType::Pen:
00427         m_pointerInfo->SetPointerPressed();
00428         m_pointerInfo->SetIsPenPointerOver();
00429         break;
00430     case winrt::PointerDeviceType::Mouse:
00431         m_pointerInfo->SetIsMouseButtonPressed(pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonPressed /*isForLeftMouseButton*/);
00432         canRaiseItemInvoked &= pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonPressed;
00433         m_pointerInfo->SetIsMousePointerOver();
00434         UpdateMousePointerOverInstance(true /*isPointerOver*/);
00435         break;
00436     }
00437
00438     if (canRaiseItemInvoked)
00439     {
00440         args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::PointerPressed, args.OriginalSource()));
00441     }
00442
00443     UpdateVisualState(true);
00444 }
00445
00446 void ItemContainer::OnPointerReleased(winrt::PointerRoutedEventArgs const& args)
00447 {
00448     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());
00449
00450     __super::OnPointerReleased(args);
00451
00452     if (m_pointerInfo == nullptr ||
00453         !m_pointerInfo->IsPointerIdTracked(args.Pointer().PointerId()) ||
00454         !m_pointerInfo->IsPressed())
00455     {
00456         return;
00457     }
00458
00459     m_pointerInfo->ResetTrackedPointerId();
00460
00461     bool canRaiseItemInvoked = CanRaiseItemInvoked();
00462     auto const& pointerDeviceType = args.Pointer().PointerDeviceType();
00463
00464     if (pointerDeviceType == winrt::PointerDeviceType::Mouse)
00465     {
00466         const auto pointerProperties = args.GetCurrentPoint(*this).Properties();
00467         const auto pointerUpdateKind = pointerProperties.PointerUpdateKind();
00468
00469         ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, TypeLogging::PointerDeviceTypeToString(pointerDeviceType).c_str(), TypeLogging::PointerUpdateKindToString(pointerUpdateKind).c_str());
00470
00471         if (pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonReleased ||
00472             pointerUpdateKind == winrt::PointerUpdateKind::RightButtonReleased)
00473         {
00474             m_pointerInfo->ResetIsMouseButtonPressed(pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonReleased /*isForLeftMouseButton*/);
00475         }
00476         canRaiseItemInvoked &= pointerUpdateKind == winrt::PointerUpdateKind::LeftButtonReleased;
00477     }
00478     else
00479     {
00480         ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::PointerDeviceTypeToString(pointerDeviceType).c_str());
00481
00482         m_pointerInfo->ResetPointerPressed();
00483     }
00484
00485     if (canRaiseItemInvoked &&
00486         !args.Handled() &&
00487         !m_pointerInfo->IsPressed())
00488     {
00489         args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::PointerReleased, args.OriginalSource()));
00490     }
00491
00492     UpdateVisualState(true);
00493 }
00494
00495 void ItemContainer::OnPointerCanceled(winrt::PointerRoutedEventArgs const& args)
00496 {
00497     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());
00498
00499     __super::OnPointerCanceled(args);
00500
00501     ProcessPointerCanceled(args);
00502 }
00503
00504 void ItemContainer::OnPointerCaptureLost(winrt::PointerRoutedEventArgs const& args)
00505 {
00506     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, args.Pointer().PointerId());
00507
00508     __super::OnPointerCaptureLost(args);
00509
00510     ProcessPointerCanceled(args);
00511 }
00512
00513 void ItemContainer::OnTapped(winrt::TappedRoutedEventArgs const& args)
00514 {
00515     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00516
00517     __super::OnTapped(args);
00518
00519     if (CanRaiseItemInvoked() && !args.Handled())
00520     {
00521         args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::Tap, args.OriginalSource()));
00522     }
00523 }
00524
00525 void ItemContainer::OnDoubleTapped(winrt::DoubleTappedRoutedEventArgs const& args)
00526 {
00527     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00528
00529     __super::OnDoubleTapped(args);
00530
00531     if (CanRaiseItemInvoked() && !args.Handled())
00532     {
00533         args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::DoubleTap, args.OriginalSource()));
00534     }
00535 }
00536
00537 void ItemContainer::OnKeyDown(winrt::KeyRoutedEventArgs const& args)
00538 {
00539     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::KeyRoutedEventArgsToString(args).c_str());
00540
00541     __super::OnKeyDown(args);
00542
00543     if (!args.Handled() && CanRaiseItemInvoked())
00544     {
00545         if (args.Key() == winrt::VirtualKey::Enter)
00546         {
00547             args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::EnterKey, args.OriginalSource()));
00548         }
00549         else if (args.Key() == winrt::VirtualKey::Space)
00550         {
00551             args.Handled(RaiseItemInvoked(winrt::ItemContainerInteractionTrigger::SpaceKey, args.OriginalSource()));
00552         }
00553     }
00554 }
00555
00556 bool ItemContainer::CanRaiseItemInvoked()
00557 {
00558 #ifdef MUX_PRERELEASE
00559     return static_cast<int>(CanUserInvoke() & winrt::ItemContainerUserInvokeMode::UserCanInvoke) ||
00560         static_cast<int>(CanUserSelect() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
00561 #else
00562     return static_cast<int>(CanUserInvokeInternal() & winrt::ItemContainerUserInvokeMode::UserCanInvoke) ||
00563         static_cast<int>(CanUserSelectInternal() & (winrt::ItemContainerUserSelectMode::Auto | winrt::ItemContainerUserSelectMode::UserCanSelect));
00564 #endif
00565 }
00566
00567 bool ItemContainer::RaiseItemInvoked(winrt::ItemContainerInteractionTrigger const& interactionTrigger, winrt::IInspectable const& originalSource)
00568 {
00569     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::ItemContainerInteractionTriggerToString(interactionTrigger).c_str());
00570
00571     if (m_itemInvokedEventSource)
00572     {
00573         const auto itemInvokedEventArgs = winrt::make_self<ItemContainerInvokedEventArgs>(interactionTrigger, originalSource);
00574         m_itemInvokedEventSource(*this, *itemInvokedEventArgs);
00575
00576         return itemInvokedEventArgs->Handled();
00577     }
00578
00579     return false;
00580 }
00581
00582 void ItemContainer::LoadSelectionCheckbox()
00583 {
00584     winrt::IControlProtected controlProtected{ *this };
00585
00586     m_selectionCheckbox.set(GetTemplateChildT<winrt::CheckBox>(s_selectionCheckboxName, controlProtected));
00587
00588     if (auto&& selectionCheckbox = m_selectionCheckbox.get())
00589     {
00590         m_checked_revoker = selectionCheckbox.Checked(winrt::auto_revoke, { this, &ItemContainer::OnCheckToggle });
00591         m_unchecked_revoker = selectionCheckbox.Unchecked(winrt::auto_revoke, { this, &ItemContainer::OnCheckToggle });
00592     }
00593 }
00594
00595 void ItemContainer::OnCheckToggle(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& /*args*/)
00596 {
00597     UpdateCheckboxState();
00598 }
00599
00600 void ItemContainer::UpdateCheckboxState()
00601 {
00602     if (auto&& selectionCheckbox = m_selectionCheckbox.get())
00603     {
00604         const bool isChecked = SharedHelpers::IsTrue(selectionCheckbox.IsChecked());
00605         const bool isSelected = IsSelected();
00606
00607         if (isChecked != isSelected)
00608         {
00609             selectionCheckbox.IsChecked(isSelected);
00610         }
00611     }
00612 }
00613
00614 void ItemContainer::UpdateMousePointerOverInstance(bool isPointerOver)
00615 {
00616     auto mousePointerOverInstance = s_mousePointerOverInstance.get();
00617
00618     if (isPointerOver)
00619     {
00620         if (mousePointerOverInstance == nullptr || mousePointerOverInstance.get() != this)
00621         {
00622             if (mousePointerOverInstance != nullptr && mousePointerOverInstance->m_pointerInfo != nullptr)
00623             {
00624                 mousePointerOverInstance->m_pointerInfo->ResetIsMousePointerOver();
00625             }
00626
00627             s_mousePointerOverInstance = get_weak();
00628         }
00629     }
00630     else
00631     {
00632         if (mousePointerOverInstance != nullptr && mousePointerOverInstance.get() == this)
00633         {
00634             s_mousePointerOverInstance = nullptr;
00635         }
00636     }
00637 }
00638
00639 #ifdef DBG
00640
00641 winrt::hstring ItemContainer::DependencyPropertyToString(
00642     const winrt::IDependencyProperty& dependencyProperty)
00643 {
00644     if (dependencyProperty == s_IsSelectedProperty)
00645     {
00646         return L"IsSelected";
00647     }
00648     else if (dependencyProperty == s_CanUserSelectProperty)
00649     {
00650         return L"CanUserSelect";
00651     }
00652     else if (dependencyProperty == s_CanUserInvokeProperty)
00653     {
00654         return L"CanUserInvoke";
00655     }
00656     else if (dependencyProperty == s_MultiSelectModeProperty)
00657     {
00658         return L"MultiSelectMode";
00659     }
00660     else
00661     {
00662         return L"UNKNOWN";
00663     }
00664 }
00665
00666 winrt::Size ItemContainer::MeasureOverride(winrt::Size const& availableSize)
00667 {
00668     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"availableSize", availableSize.Width, availableSize.Height);
00669
00670     winrt::Size returnedSize = __super::MeasureOverride(availableSize);
00671
00672     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"returnedSize", returnedSize.Width, returnedSize.Height);
00673
00674     return returnedSize;
00675 }
00676
00677 winrt::Size ItemContainer::ArrangeOverride(winrt::Size const& finalSize)
00678 {
00679     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"finalSize", finalSize.Width, finalSize.Height);
00680
00681     winrt::Size returnedSize = __super::ArrangeOverride(finalSize);
00682
00683     ITEMCONTAINER_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"returnedSize", returnedSize.Width, returnedSize.Height);
00684
00685     return returnedSize;
00686 }
00687
00688 #endif
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/APITests/TwoPaneViewTests.cs Source File

  • File List
  • File Members
  • TwoPaneView
  • APITests

TwoPaneViewTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006
00007 using System;
00008 using System.Numerics;
00009 using System.Threading;
00010
00011 using Windows.Foundation;
00012 using Windows.UI;
00013 using Microsoft.UI.Composition;
00014 using Microsoft.UI.Xaml;
00015 using Microsoft.UI.Xaml.Controls;
00016 using Microsoft.UI.Xaml.Hosting;
00017 using Microsoft.UI.Xaml.Media;
00018 using Microsoft.UI.Xaml.Shapes;
00019
00020 using WEX.TestExecution;
00021 using WEX.TestExecution.Markup;
00022 using WEX.Logging.Interop;
00023
00024 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00025 {
00026     [TestClass]
00027     public class TwoPaneViewTests : ApiTestBase
00028     {
00029         private const double c_defaultMinWideModeWidth = 641.0;
00030         private const double c_defaultMinTallModeHeight = 641.0;
00031
00032         [TestMethod]
00033         [Description("Verifies the TwoPaneView default properties.")]
00034         public void VerifyDefaultsAndBasicSetting()
00035         {
00036             TwoPaneView twoPaneView = null;
00037             UIElement pane1 = null;
00038             UIElement pane2 = null;
00039
00040             RunOnUIThread.Execute(() =>
00041             {
00042                 pane1 = new Grid();
00043                 pane2 = new Grid();
00044
00045                 twoPaneView = new TwoPaneView();
00046                 Verify.IsNotNull(twoPaneView);
00047
00048                 // Verify Defaults
00049                 Verify.IsNull(twoPaneView.Pane1);
00050                 Verify.IsNull(twoPaneView.Pane2);
00051                 Verify.AreEqual(TwoPaneViewPriority.Pane1, twoPaneView.PanePriority);
00052                 Verify.AreEqual(TwoPaneViewMode.SinglePane, twoPaneView.Mode);
00053                 Verify.AreEqual(TwoPaneViewWideModeConfiguration.LeftRight, twoPaneView.WideModeConfiguration);
00054                 Verify.AreEqual(TwoPaneViewTallModeConfiguration.TopBottom, twoPaneView.TallModeConfiguration);
00055                 Verify.AreEqual(c_defaultMinWideModeWidth, twoPaneView.MinWideModeWidth);
00056                 Verify.AreEqual(c_defaultMinTallModeHeight, twoPaneView.MinTallModeHeight);
00057
00058                 // Verify basic setters
00059                 twoPaneView.Pane1 = pane1;
00060                 twoPaneView.Pane2 = pane2;
00061                 twoPaneView.PanePriority = TwoPaneViewPriority.Pane2;
00062                 twoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.RightLeft;
00063                 twoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.BottomTop;
00064                 twoPaneView.MinWideModeWidth = 500;
00065                 twoPaneView.MinTallModeHeight = 700;
00066             });
00067
00068             IdleSynchronizer.Wait();
00069
00070             RunOnUIThread.Execute(() =>
00071             {
00072                 Verify.AreEqual(pane1, twoPaneView.Pane1);
00073                 Verify.AreEqual(pane2, twoPaneView.Pane2);
00074                 Verify.AreEqual(TwoPaneViewPriority.Pane2, twoPaneView.PanePriority);
00075                 Verify.AreEqual(TwoPaneViewWideModeConfiguration.RightLeft, twoPaneView.WideModeConfiguration);
00076                 Verify.AreEqual(TwoPaneViewTallModeConfiguration.BottomTop, twoPaneView.TallModeConfiguration);
00077                 Verify.AreEqual(500, twoPaneView.MinWideModeWidth);
00078                 Verify.AreEqual(700, twoPaneView.MinTallModeHeight);
00079
00080                 // Verify nullable values
00081                 twoPaneView.Pane1 = null;
00082                 twoPaneView.Pane2 = null;
00083             });
00084
00085             IdleSynchronizer.Wait();
00086
00087             RunOnUIThread.Execute(() =>
00088             {
00089                 Verify.IsNull(twoPaneView.Pane1);
00090                 Verify.IsNull(twoPaneView.Pane2);
00091             });
00092         }
00093     }
00094 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewNodeInMarkupTestPage Member List

This is the complete list of members for TreeViewNodeInMarkupTestPage, including all inherited members.
TreeViewNodeInMarkupTestPage() TreeViewNodeInMarkupTestPage [inline]
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DisplayRegionHelper Member List

This is the complete list of members for DisplayRegionHelper, including all inherited members.
GetRegionInfo() | DisplayRegionHelper | [static]
OnDisplayModeChanged(const winrt::IInspectable &sender, const winrt::IInspectable &args) | DisplayRegionHelper | [private]
SimulateDisplayRegions(bool value) | DisplayRegionHelper | [static]
SimulateDisplayRegions() | DisplayRegionHelper | [static]
SimulateMode(winrt::TwoPaneViewMode value) | DisplayRegionHelper | [static]
SimulateMode() | DisplayRegionHelper | [static]
WindowElement() | DisplayRegionHelper | [static]
WindowRect() | DisplayRegionHelper | [static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTestsWithAutomationPeer Member List

This is the complete list of members for ScrollPresenterTestsWithAutomationPeer, including all inherited members.
ClassInitialize(TestContext testContext) | ScrollPresenterTestsWithAutomationPeer | [inline, static]
ClearTraces() | ScrollPresenterTestsBase | [inline, protected]
LogAndClearTraces() | ScrollPresenterTestsBase | [inline, protected]
LogAndClearTraces(bool recordWarning) | ScrollPresenterTestsBase | [inline, protected]
LogTraces() | ScrollPresenterTestsBase | [inline, protected]
LogTraces(bool recordWarning) | ScrollPresenterTestsBase | [inline, protected]
ScrollHorizontally() | ScrollPresenterTestsWithAutomationPeer | [inline]
ScrollVertically() | ScrollPresenterTestsWithAutomationPeer | [inline]
ScrollWhileUsingExpressionAnimationSources() | ScrollPresenterTestsWithAutomationPeer | [inline]
SetLoggingLevel(bool isPrivateLoggingEnabled) | ScrollPresenterTestsBase | [inline, protected]
SetOutputDebugStringLevel(string outputDebugStringLevel) | ScrollPresenterTestsBase | [inline, protected]
TestCleanup() | ScrollPresenterTestsWithAutomationPeer | [inline]
WaitForEditValue(string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true) | ScrollPresenterTestsBase | [inline, protected]
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarScrollingEventArgs Member List

This is the complete list of members for AnnotatedScrollBarScrollingEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
AnnotatedScrollBarScrollingEventArgs(double scrollOffset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind) | AnnotatedScrollBarScrollingEventArgs |
Cancel(bool cancel) | AnnotatedScrollBarScrollingEventArgs |
Cancel() | AnnotatedScrollBarScrollingEventArgs |
CheckThread() | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< AnnotatedScrollBarScrollingEventArgs > &&self) noexcept | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< AnnotatedScrollBarScrollingEventArgs > &&self) | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
IsOnThread() | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
m_scrollingEventKind | AnnotatedScrollBarScrollingEventArgs | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing > | [inline]
ScrollingEventKind() | AnnotatedScrollBarScrollingEventArgs |
ScrollOffset() | AnnotatedScrollBarScrollingEventArgs |
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TextCommandBarFlyout Member List

This is the complete list of members for TextCommandBarFlyout, including all inherited members.
ExecuteBoldCommand() | TextCommandBarFlyout | [private]
ExecuteCopyCommand() | TextCommandBarFlyout | [private]
ExecuteCutCommand() | TextCommandBarFlyout | [private]
ExecuteItalicCommand() | TextCommandBarFlyout | [private]
ExecutePasteCommand() | TextCommandBarFlyout | [private]
ExecuteRedoCommand() | TextCommandBarFlyout | [private]
ExecuteSelectAllCommand() | TextCommandBarFlyout | [private]
ExecuteUnderlineCommand() | TextCommandBarFlyout | [private]
ExecuteUndoCommand() | TextCommandBarFlyout | [private]
ForwardRefToBaseReferenceTracker(CommandBarFlyout) TextCommandBarFlyout() | TextCommandBarFlyout |
GetButton(TextControlButtons button) | TextCommandBarFlyout | [private]
GetButtonsToAdd() | TextCommandBarFlyout | [private]
GetPasswordBoxButtonsToAdd(winrt::PasswordBox const &passwordBox) | TextCommandBarFlyout | [private, static]
GetRichEditBoxButtonsToAdd(winrt::RichEditBox const &richEditBox) | TextCommandBarFlyout | [private, static]
GetRichTextBlockButtonsToAdd(winrt::RichTextBlock const &richTextBlock) | TextCommandBarFlyout | [private, static]
GetTextBlockButtonsToAdd(winrt::TextBlock const &textBlock) | TextCommandBarFlyout | [private, static]
GetTextBoxButtonsToAdd(winrt::TextBox const &textBox) | TextCommandBarFlyout | [private, static]
InitializeButtonWithProperties(winrt::ButtonBase const &button, ResourceIdType labelResourceId, ResourceIdType acceleratorKeyResourceId, ResourceIdType descriptionResourceId, std::function< void()> const &executeFunc) | TextCommandBarFlyout | [private]
InitializeButtonWithProperties(winrt::ButtonBase const &button, ResourceIdType labelResourceId, winrt::Symbol const &symbol, ResourceIdType acceleratorKeyResourceId, ResourceIdType descriptionResourceId, std::function< void()> const &executeFunc) | TextCommandBarFlyout | [private]
InitializeButtonWithUICommand(winrt::ButtonBase const &button, winrt::XamlUICommand const &uiCommand, std::function< void()> const &executeFunc) | TextCommandBarFlyout | [private]
IsButtonInPrimaryCommands(TextControlButtons button) | TextCommandBarFlyout | [private]
m_buttonClickRevokers | TextCommandBarFlyout | [private]
m_buttonCommandRevokers | TextCommandBarFlyout | [private]
m_buttons | TextCommandBarFlyout | [private]
m_isSettingToggleButtonState | TextCommandBarFlyout | [private]
m_proofingMenuItemClickRevokers | TextCommandBarFlyout | [private]
m_proofingMenuToggleItemClickRevokers | TextCommandBarFlyout | [private]
m_toggleButtonCheckedRevokers | TextCommandBarFlyout | [private]
m_toggleButtonUncheckedRevokers | TextCommandBarFlyout | [private]
UpdateButtons() | TextCommandBarFlyout | [private]
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UniformGridLayoutProperties Member List

This is the complete list of members for UniformGridLayoutProperties, including all inherited members.
ClearProperties() | UniformGridLayoutProperties | [static]
EnsureProperties() | UniformGridLayoutProperties | [static]
ItemsJustification(winrt::UniformGridLayoutItemsJustification const &value) | UniformGridLayoutProperties |
ItemsJustification() | UniformGridLayoutProperties |
ItemsJustificationProperty() | UniformGridLayoutProperties | [inline, static]
ItemsStretch(winrt::UniformGridLayoutItemsStretch const &value) | UniformGridLayoutProperties |
ItemsStretch() | UniformGridLayoutProperties |
ItemsStretchProperty() | UniformGridLayoutProperties | [inline, static]
MaximumRowsOrColumns(int value) | UniformGridLayoutProperties |
MaximumRowsOrColumns() | UniformGridLayoutProperties |
MaximumRowsOrColumnsProperty() | UniformGridLayoutProperties | [inline, static]
MinColumnSpacing(double value) | UniformGridLayoutProperties |
MinColumnSpacing() | UniformGridLayoutProperties |
MinColumnSpacingProperty() | UniformGridLayoutProperties | [inline, static]
MinItemHeight(double value) | UniformGridLayoutProperties |
MinItemHeight() | UniformGridLayoutProperties |
MinItemHeightProperty() | UniformGridLayoutProperties | [inline, static]
MinItemWidth(double value) | UniformGridLayoutProperties |
MinItemWidth() | UniformGridLayoutProperties |
MinItemWidthProperty() | UniformGridLayoutProperties | [inline, static]
MinRowSpacing(double value) | UniformGridLayoutProperties |
MinRowSpacing() | UniformGridLayoutProperties |
MinRowSpacingProperty() | UniformGridLayoutProperties | [inline, static]
OnItemsJustificationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnItemsStretchPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMaximumRowsOrColumnsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinColumnSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinItemHeightPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinItemWidthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinRowSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
Orientation(winrt::Orientation const &value) | UniformGridLayoutProperties |
Orientation() | UniformGridLayoutProperties |
OrientationProperty() | UniformGridLayoutProperties | [inline, static]
s_ItemsJustificationProperty | UniformGridLayoutProperties | [static]
s_ItemsStretchProperty | UniformGridLayoutProperties | [static]
s_MaximumRowsOrColumnsProperty | UniformGridLayoutProperties | [static]
s_MinColumnSpacingProperty | UniformGridLayoutProperties | [static]
s_MinItemHeightProperty | UniformGridLayoutProperties | [static]
s_MinItemWidthProperty | UniformGridLayoutProperties | [static]
s_MinRowSpacingProperty | UniformGridLayoutProperties | [static]
s_OrientationProperty | UniformGridLayoutProperties | [static]
UniformGridLayoutProperties() | UniformGridLayoutProperties |
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/TopModeTests.cs Source File

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests

TopModeTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Linq;
00008 using System.Threading.Tasks;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00010 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00011
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 using Microsoft.Windows.Apps.Test.Automation;
00017 using Microsoft.Windows.Apps.Test.Foundation;
00018 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00019 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.NavigationViewTests
00022 {
00023     [TestClass]
00024     public class TopModeTests : NavigationViewTestsBase
00025     {
00026
00027         [ClassInitialize]
00028         [TestProperty("RunAs", "User")]
00029         [TestProperty("Classification", "Integration")]
00030         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00031         [TestProperty("MUXControlsTestEnabledForPhone", "True")]
00032         public static void ClassInitialize(TestContext testContext)
00033         {
00034             TestEnvironment.Initialize(testContext);
00035         }
00036
00037         [TestMethod] //bug 18033309
00038         public void TopNavigationSecondClickOnSuppressSelectionItemTest()
00039         {
00040             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00041             {
00042                 Button resetResultButton = new Button(FindElement.ById("ResetResult"));
00043                 UIObject suppressSelection = FindElement.ByName("SuppressSelection");
00044
00045                 var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
00046                 var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
00047                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00048                 {
00049                     suppressSelection.Click();
00050                     waiter.Wait();
00051                 }
00052
00053                 // First time selection only raise ItemInvoke
00054                 Verify.AreEqual(invokeResult.Value, "SuppressSelection");
00055                 Verify.AreEqual(selectResult.Value, "");
00056
00057                 resetResultButton.Click();
00058                 Wait.ForIdle();
00059
00060                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00061                 {
00062                     suppressSelection.Click();
00063                     waiter.Wait();
00064                 }
00065
00066                 // Click it again, only raise ItemInvoke event
00067                 Verify.AreEqual(invokeResult.Value, "SuppressSelection");
00068                 Verify.AreEqual(selectResult.Value, "");
00069             }
00070         }
00071
00072         [TestMethod]
00073         public void TopNavigationWithAccessKeysTest()
00074         {
00075             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00076             {
00077                 Log.Comment("Add ten items to make overflow happen");
00078                 Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
00079                 addTenItems.Invoke();
00080                 Wait.ForIdle();
00081
00082                 Log.Comment("Verify overflow menu is not opened");
00083                 Verify.IsTrue(GetTopNavigationItems(TopNavPosition.Overflow).Count == 0);
00084
00085                 InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement("TopNavOverflowButton");
00086
00087                 Log.Comment("Verify overflow menu is opened");
00088                 // Flyout doesn't seem raise any UIA WindowOpened/MenuOpened events so just check a few times for the menu to
00089                 // have opened.
00090                 TestEnvironment.VerifyAreEqualWithRetry(5,
00091                     () => true,
00092                     () => GetTopNavigationItems(TopNavPosition.Overflow).Count > 0);
00093             }
00094         }
00095
00096         [TestMethod]
00097         public void TopNavigationOverflowWidthLongNavItemTest()
00098         {
00099             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00100             {
00101                 var longNavItemPartialContent = "Gates";
00102                 var primaryCount = GetTopNavigationItems(TopNavPosition.Primary).Count;
00103
00104                 Log.Comment("Add a long navigationview item which text includes " + longNavItemPartialContent);
00105                 Button button = new Button(FindElement.ByName("AddLongNavItem"));
00106                 button.Click();
00107                 Wait.ForIdle();
00108
00109                 var count = GetTopNavigationItems(TopNavPosition.Primary).Count;
00110                 Verify.AreEqual(primaryCount, count, "The appended nav item goes to overflow");
00111
00112                 // Select the longest nav item
00113                 OpenOverflowMenuAndInvokeItem(longNavItemPartialContent);
00114
00115                 count = GetTopNavigationItems(TopNavPosition.Primary).Count;
00116                 Verify.IsTrue(primaryCount - count >= 2, "Longest nav item make more than 1 items to overflow " + primaryCount + " vs " + count);
00117
00118                 // Select the shortest IntegerItem which content is 7
00119                 OpenOverflowMenuAndInvokeItem("IntegerItem");
00120                 Verify.IsTrue(
00121                     GetTopNavigationItems(TopNavPosition.Primary).
00122                         Where(item => UIObjectContains(item, longNavItemPartialContent)).
00123                         Count() == 0,
00124                     "Longest nav item is pushed to overflow");
00125
00126                 count = GetTopNavigationItems(TopNavPosition.Primary).Count;
00127                 Verify.IsTrue(primaryCount <= count,
00128                     "Select the shortest item make more item to primary " + primaryCount + " vs " + count);
00129             }
00130         }
00131
00132         [TestMethod]
00133         public void TopNavigationOverflowButtonTest()
00134         {
00135             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00136             {
00137                 Log.Comment("Add ten items to make overflow happen");
00138                 Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
00139                 addTenItems.Invoke();
00140                 Wait.ForIdle();
00141
00142                 Log.Comment("Get and Check that active visualstate contains OverflowButtonWithLabel");
00143                 var getActiveVisualStateButton = new Button(FindElement.ByName("GetActiveVisualState"));
00144                 var invokeResult = new Edit(FindElement.ById("TestResult"));
00145                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00146                 {
00147                     getActiveVisualStateButton.Click();
00148                     waiter.Wait();
00149                 }
00150
00151                 Verify.IsTrue(invokeResult.Value.Contains("OverflowButtonWithLabel"));
00152
00153                 Log.Comment("Hide the overflow button label");
00154                 var changeOverflowLabelVisibility = new CheckBox(FindElement.ByName("ChangeOverflowLabelVisibility"));
00155                 changeOverflowLabelVisibility.Uncheck();
00156                 Wait.ForIdle();
00157
00158                 Log.Comment("Get and Check that active visualstate contains OverflowButtonNoLabel");
00159                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00160                 {
00161                     getActiveVisualStateButton.Click();
00162                     waiter.Wait();
00163                 }
00164
00165                 Verify.IsTrue(invokeResult.Value.Contains("OverflowButtonNoLabel"));
00166             }
00167         }
00168
00169         [TestMethod]
00170         public void VerifyMoreButtonIsOnlyReadOnce()
00171         {
00172             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00173             {
00174                 UIObject moreButton = FindElement.ById("TopNavOverflowButton");
00175                 moreButton.SetFocus();
00176                 Wait.ForIdle();
00177
00178                 AutomationElement ae = AutomationElement.FocusedElement;
00179                 Verify.AreEqual("More", ae.GetCurrentPropertyValue(AutomationElement.NameProperty).ToString());
00180             }
00181         }
00182
00183         [TestMethod]
00184         public void VerifyOverflowMenuCornerRadius()
00185         {
00186             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView TopNav Test" }))
00187             {
00188                 Log.Comment("Verify that the overflow menu is closed.");
00189                 var overflowItemsHost = TryFindElement.ById("TopNavMenuItemsOverflowHost");
00190                 Verify.IsNull(overflowItemsHost, "Overflow menu should have been closed.");
00191
00192                 Log.Comment("Open the overflow menu.");
00193                 GetOverflowButton().Click();
00194                 Wait.ForIdle();
00195
00196                 Log.Comment("Verify that the overflow menu is open.");
00197                 overflowItemsHost = TryFindElement.ById("TopNavMenuItemsOverflowHost");
00198                 Verify.IsNotNull(overflowItemsHost, "Overflow menu should have been open.");
00199
00200                 Log.Comment("Get CornerRadius of the overflow menu.");
00201                 FindElement.ByName<Button>("GetOverflowMenuCornerRadiusButton").Invoke();
00202
00203                 // A CornerRadius of (8,8,8,8) is the current default value for flyouts.
00204                 TextBlock overflowMenuCornerRadiusTextBlock = new TextBlock(FindElement.ByName("OverflowMenuCornerRadiusTextBlock"));
00205                 Verify.AreEqual("8,8,8,8", overflowMenuCornerRadiusTextBlock.DocumentText);
00206
00207                 UIObject GetOverflowButton()
00208                 {
00209                     Log.Comment("Add items until the overflow button shows up.");
00210                     var addItemButton = new Button(FindElement.ById("AddItemButton"));
00211
00212                     UIObject overflowButton1 = TryFindElement.ById("TopNavOverflowButton");
00213                     while (overflowButton1 == null)
00214                     {
00215                         addItemButton.Click();
00216                         Log.Comment("Item added.");
00217                         Wait.ForIdle();
00218
00219                         overflowButton1 = TryFindElement.ById("TopNavOverflowButton");
00220                     }
00221
00222                     return overflowButton1;
00223                 }
00224             }
00225         }
00226
00227         [TestMethod]
00228         public void TopNavigationSelectionTest()
00229         {
00230             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00231             {
00232                 Button resetResultButton = new Button(FindElement.ById("ResetResult"));
00233                 UIObject home = FindElement.ByName("Home");
00234                 UIObject apps = FindElement.ById("AppsItem");
00235                 UIObject suppressSelection = FindElement.ByName("SuppressSelection");
00236
00237                 var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
00238                 var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
00239                 var invokeRecommendedTransition = new Edit(FindElement.ById("InvokeRecommendedTransition"));
00240                 var selectionChangeRecommendedTransition = new Edit(FindElement.ById("SelectionChangeRecommendedTransition"));
00241                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00242                 {
00243                     apps.Click();
00244                     waiter.Wait();
00245                 }
00246
00247                 // First time selection raise ItemInvoke and SelectionChange events
00248                 Verify.AreEqual(invokeResult.Value, "Apps");
00249                 Verify.AreEqual(selectResult.Value, "Apps");
00250                 Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
00251                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "Default");
00252
00253                 resetResultButton.Click();
00254                 Wait.ForIdle();
00255
00256                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00257                 {
00258                     apps.Click();
00259                     waiter.Wait();
00260                 }
00261
00262                 // Click it again, only raise ItemInvoke event
00263                 Verify.AreEqual(invokeResult.Value, "Apps");
00264                 Verify.AreEqual(selectResult.Value, "");
00265                 Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
00266                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "");
00267
00268                 resetResultButton.Click();
00269                 Wait.ForIdle();
00270
00271                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00272                 {
00273                     suppressSelection.Click();
00274                     waiter.Wait();
00275                 }
00276
00277                 // Only click for suppress items
00278                 Verify.AreEqual(invokeResult.Value, "SuppressSelection");
00279                 Verify.AreEqual(selectResult.Value, "");
00280                 Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
00281                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "");
00282
00283                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00284                 {
00285                     home.Click();
00286                     waiter.Wait();
00287                 }
00288
00289                 // Click home again, it raise two events. transition from right to left
00290                 Verify.AreEqual(invokeResult.Value, "Home");
00291                 Verify.AreEqual(selectResult.Value, "Home");
00292
00293                 Verify.AreEqual(invokeRecommendedTransition.Value, "FromLeft");
00294                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "FromLeft");
00295
00296                 resetResultButton.Click();
00297                 Wait.ForIdle();
00298
00299                 // click apps again. transition from left to right
00300                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00301                 {
00302                     apps.Click();
00303                     waiter.Wait();
00304                 }
00305
00306                 Verify.AreEqual(invokeResult.Value, "Apps");
00307                 Verify.AreEqual(selectResult.Value, "Apps");
00308
00309                 Verify.AreEqual(invokeRecommendedTransition.Value, "FromRight");
00310                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "FromRight");
00311             }
00312         }
00313
00314         [TestMethod]
00315         public void TopNavigationSetSelectedItemToNullInItemInvoke()
00316         {
00317             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00318             {
00319                 Button resetResultButton = new Button(FindElement.ById("ResetResult"));
00320                 UIObject home = FindElement.ByName("Home");
00321                 UIObject apps = FindElement.ById("AppsItem");
00322
00323                 var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
00324                 var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
00325                 var invokeRecommendedTransition = new Edit(FindElement.ById("InvokeRecommendedTransition"));
00326                 var selectionChangeRecommendedTransition = new Edit(FindElement.ById("SelectionChangeRecommendedTransition"));
00327                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00328                 {
00329                     apps.Click();
00330                     waiter.Wait();
00331                 }
00332
00333                 // First time selection raise ItemInvoke and SelectionChange events
00334                 Verify.AreEqual(invokeResult.Value, "Apps");
00335                 Verify.AreEqual(selectResult.Value, "Apps");
00336                 Verify.AreEqual(invokeRecommendedTransition.Value, "Default");
00337                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "Default");
00338
00339                 resetResultButton.Click();
00340                 Wait.ForIdle();
00341
00342                 Button expectNullSelectedItemInItemInvoke = new Button(FindElement.ById("ExpectNullSelectedItemInItemInvoke"));
00343                 expectNullSelectedItemInItemInvoke.Click();
00344                 Wait.ForIdle();
00345
00346                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00347                 {
00348                     home.Click();
00349                     waiter.Wait();
00350                 }
00351
00352                 // Click home, expect Null in select change event
00353                 Verify.AreEqual(invokeResult.Value, "Home");
00354                 Verify.AreEqual(selectResult.Value, "Null");
00355
00356                 Verify.AreEqual(invokeRecommendedTransition.Value, "FromLeft");
00357                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "Default");
00358             }
00359         }
00360
00361         [TestMethod]
00362         public void TopNavigationOverflowButtonClickTest()
00363         {
00364             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00365             {
00366                 Log.Comment("Setting focus to Home");
00367                 UIObject home = FindElement.ByName("Home");
00368                 home.SetFocus();
00369                 Wait.ForIdle();
00370
00371                 Log.Comment("Add ten items to make overflow happen");
00372                 Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
00373                 addTenItems.Invoke();
00374                 Wait.ForIdle();
00375
00376                 InvokeOverflowButton();
00377
00378                 UIObject overflowItem = FindElement.ByName("Added Item 5");
00379                 var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
00380                 var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
00381                 var invokeRecommendedTransition = new Edit(FindElement.ById("InvokeRecommendedTransition"));
00382                 var selectionChangeRecommendedTransition = new Edit(FindElement.ById("SelectionChangeRecommendedTransition"));
00383                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00384                 {
00385                     overflowItem.Click();
00386                     waiter.Wait();
00387                 }
00388
00389                 // First time selection raise ItemInvoke and SelectionChange events
00390                 Verify.AreEqual(invokeResult.Value, "Added Item 5");
00391                 Verify.AreEqual(selectResult.Value, "Added Item 5");
00392
00393                 Verify.AreEqual(invokeRecommendedTransition.Value, "FromRight");
00394                 Verify.AreEqual(selectionChangeRecommendedTransition.Value, "FromRight");
00395             }
00396         }
00397
00398         [TestMethod]
00399         public void TopNavigationWithHierarchyOverflowButtonClickTest()
00400         {
00401             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
00402             {
00403                 Log.Comment("Set PaneDisplayMode to Top");
00404                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00405                 panelDisplayModeComboBox.SelectItemByName("Top");
00406                 Wait.ForIdle();
00407
00408                 InvokeOverflowButton();
00409
00410                 UIObject overflowItem = FindElement.ByName("Menu Item 15");
00411                 Verify.IsNotNull(overflowItem, "Menu Item 15 should be in overflow");
00412             }
00413         }
00414
00415         [TestMethod]
00416         public void TopNavigationItemsAccessibilitySetTest()
00417         {
00418             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00419             {
00420                 Log.Comment("Setting focus to Home");
00421                 UIObject home = FindElement.ByName("Home");
00422                 home.SetFocus();
00423                 Wait.ForIdle();
00424
00425                 AutomationElement ae = AutomationElement.FocusedElement;
00426                 int positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
00427                 int sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
00428
00429                 Verify.AreEqual(1, positionInSet, "Position in set");
00430                 Verify.AreEqual(4, sizeOfSet, "Size of set");
00431
00432
00433                 Log.Comment("Add ten items to make overflow happen");
00434                 Button addTenItems = new Button(FindElement.ByName("AddTenItems"));
00435                 addTenItems.Invoke();
00436                 Wait.ForIdle();
00437
00438                 InvokeOverflowButton();
00439
00440                 UIObject overflowItem = FindElement.ByName("Added Item 5");
00441                 overflowItem.SetFocus();
00442                 Wait.ForIdle();
00443
00444                 ae = AutomationElement.FocusedElement;
00445                 positionInSet = (int)ae.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
00446                 sizeOfSet = (int)ae.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
00447
00448                 Verify.AreEqual(8, positionInSet, "Position in overflow.");
00449                 Verify.AreEqual(13, sizeOfSet, "Size of set.");
00450             }
00451         }
00452
00453         [TestMethod]
00454         public void TopNavigationMenuItemTemplateBindingTest()
00455         {
00456             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView ItemTemplate Test" }))
00457             {
00458                 ElementCache.Refresh();
00459
00460                 // If binding has problem, we will not see the button and text.
00461                 var lastName = new Button(FindElement.ByName("Anderberg"));
00462                 Verify.IsNotNull(lastName);
00463
00464                 var firstName = new Button(FindElement.ByName("Michael"));
00465                 Verify.IsNotNull(firstName);
00466             }
00467         }
00468
00469         // Bug 17512989. If we change the menu items for multiple times, the item may be not selected.
00470         [TestMethod]
00471         public void TopNavigationHaveCorrectSelectionWhenChangingMenuItems()
00472         {
00473             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00474             {
00475                 for (int i = 0; i < 3; i++)
00476                 {
00477                     Log.Comment("Iteration: " + i);
00478                     Log.Comment("Invoke ChangeDataSource");
00479                     var button = new Button(FindElement.ById("ChangeDataSource"));
00480                     button.Invoke();
00481                     Wait.ForIdle();
00482
00483                     Log.Comment("Reset TestResult");
00484                     var resetButton = new Button(FindElement.ById("ResetResult"));
00485                     resetButton.Invoke();
00486                     Wait.ForIdle();
00487
00488                     ElementCache.Refresh();
00489                     UIObject selectedItem = FindElement.ByName("Happy new year Item");
00490
00491                     Log.Comment("Verify the item is selected");
00492                     Verify.IsTrue(Convert.ToBoolean(selectedItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00493                 }
00494             }
00495         }
00496
00497         [TestMethod]
00498         [TestProperty("Ignore", "True")] // 32134869: Temporarily disabling
00499         public void TopPaddingTest()
00500         {
00501             // We cannot restrict the inner framesize for this test because it interacts with the titlebar area.
00502             using (var setup = new TestSetupHelper(testNames: new[] { "NavigationView Tests", "Top NavigationView Store Test" }, shouldRestrictInnerFrameSize: false))
00503             {
00504                 var moveContentUnderTitleBarButton = new Button(FindElement.ById("MoveContentUnderTopnavTitleBar"));
00505                 var flipIsTitleBarAutoPaddingEnabledButton = new Button(FindElement.ById("FlipIsTitleBarAutoPaddingEnabledButton"));
00506                 var getTopPaddingHeightButton = new Button(FindElement.ById("GetTopPaddingHeightButton"));
00507                 var fullScreenButton = new Button(FindElement.ById("FullScreenInvokerButton"));
00508                 var navViewIsTitleBarAutoPaddingEnabledId = "NavViewIsTitleBarAutoPaddingEnabled";
00509                 var topPaddingRenderedValueId = "TopPaddingRenderedValue";
00510                 UIObject navViewIsTitleBarAutoPaddingEnabled = null;
00511                 UIObject topNavTopPadding = null;
00512
00513                 // Checking top padding is added for regular Desktop
00514                 Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to True");
00515                 moveContentUnderTitleBarButton.Click();
00516                 Wait.ForIdle();
00517
00518                 Log.Comment("Accessing TopPadding Height");
00519                 getTopPaddingHeightButton.Click();
00520                 Wait.ForIdle();
00521
00522                 navViewIsTitleBarAutoPaddingEnabled = TryFindElement.ById(navViewIsTitleBarAutoPaddingEnabledId);
00523                 Verify.IsNotNull(navViewIsTitleBarAutoPaddingEnabled);
00524                 Log.Comment($"NavView.IsTitleBarAutoPaddingEnabled: {navViewIsTitleBarAutoPaddingEnabled.GetText()}");
00525                 Verify.AreEqual("True", navViewIsTitleBarAutoPaddingEnabled.GetText());
00526
00527                 topNavTopPadding = TryFindElement.ById(topPaddingRenderedValueId);
00528                 Verify.IsNotNull(topNavTopPadding);
00529                 Log.Comment($"TopPadding Height: {topNavTopPadding.GetText()}");
00530
00531                 // To detect if it's in tabbed sets, CoreApplicationViewTitleBar.IsVisible can be used to check in MUXControlsTestApp
00532                 // Not all branches enabled tabbed shell, also not all default setting with tabbed shell enabled
00533                 // We skip the test if tabbedshell is disabled.
00534                 if (TryFindElement.ById("TitleBarIsVisible").GetText().Equals("True"))
00535                 {
00536                     Log.Comment("Tabbed Shell is disabled or not enabled for this application, skip Verify");
00537                 }
00538                 else
00539                 {
00540                     Verify.AreEqual("0", topNavTopPadding.GetText());
00541                 }
00542
00543                 Log.Comment("Setting IsTitleBarAutoPaddingEnabled to False");
00544                 flipIsTitleBarAutoPaddingEnabledButton.Click();
00545                 Wait.ForIdle();
00546
00547                 Log.Comment($"NavView.IsTitleBarAutoPaddingEnabled: {navViewIsTitleBarAutoPaddingEnabled.GetText()}");
00548                 Verify.AreEqual("False", navViewIsTitleBarAutoPaddingEnabled.GetText());
00549
00550                 Log.Comment("Accessing TopPadding Height");
00551                 getTopPaddingHeightButton.Click();
00552                 Wait.ForIdle();
00553                 Log.Comment($"TopPadding Height: {topNavTopPadding.GetText()}");
00554                 Verify.AreEqual("0", topNavTopPadding.GetText());
00555
00556                 Log.Comment("Setting IsTitleBarAutoPaddingEnabled to True");
00557                 flipIsTitleBarAutoPaddingEnabledButton.Click();
00558                 Wait.ForIdle();
00559
00560                 Log.Comment($"NavView.IsTitleBarAutoPaddingEnabled: {navViewIsTitleBarAutoPaddingEnabled.GetText()}");
00561                 Verify.AreEqual("True", navViewIsTitleBarAutoPaddingEnabled.GetText());
00562
00563                 // Checking top padding is NOT added for fullscreen Desktop
00564                 Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to False");
00565                 moveContentUnderTitleBarButton.Click();
00566                 Wait.ForIdle();
00567                 fullScreenButton.Click();
00568                 Wait.ForIdle();
00569
00570                 Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to True");
00571                 moveContentUnderTitleBarButton.Click();
00572                 Wait.ForIdle();
00573
00574                 Log.Comment("Accessing TopPadding Height");
00575                 getTopPaddingHeightButton.Click();
00576                 Wait.ForIdle();
00577                 Log.Comment($"TopPadding Height: {topNavTopPadding.GetText()}");
00578                 Verify.AreEqual("0", topNavTopPadding.GetText());
00579
00580                 // Reverting changes to leave app in original state
00581                 Log.Comment("Setting TitleBar.ExtendViewIntoTitleBar to False");
00582                 moveContentUnderTitleBarButton.Click();
00583                 Wait.ForIdle();
00584                 fullScreenButton.Click();
00585                 Wait.ForIdle();
00586             }
00587         }
00588
00589         [TestMethod]
00590         public void VerifyTopNavigationMinimalVisualStateOnTopNav()
00591         {
00592             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00593             {
00594                 Log.Comment("To Minimal mode");
00595                 SetNavViewWidth(ControlWidth.Narrow);
00596
00597                 Log.Comment("Get NavView Active VisualStates");
00598                 var getNavViewActiveVisualStatesButton = new Button(FindElement.ByName("GetNavViewActiveVisualStates"));
00599                 getNavViewActiveVisualStatesButton.Invoke();
00600                 Wait.ForIdle();
00601
00602                 var visualStateName = "TopNavigationMinimal";
00603                 var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
00604                 Verify.IsFalse(result.GetText().Contains(visualStateName), "active VisualStates doesn't include " + visualStateName);
00605
00606                 Log.Comment("To Wide mode");
00607                 SetNavViewWidth(ControlWidth.Wide);
00608
00609                 Log.Comment("Flipping orientation: Left -> Top.");
00610                 var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
00611                 flipOrientationButton.Invoke();
00612                 Wait.ForIdle();
00613
00614                 Log.Comment("Get NavView Active VisualStates");
00615                 getNavViewActiveVisualStatesButton.Invoke();
00616                 Wait.ForIdle();
00617
00618                 Verify.IsTrue(result.GetText().Contains(visualStateName), "active VisualStates includes " + visualStateName);
00619             }
00620         }
00621
00622         [TestMethod]
00623         [TestProperty("Ignore", "True")] // Disabled as Reveal styles are being deprecated.
00624         public void VerifyTopNavigationItemFocusVisualKindRevealTest()
00625         {
00626             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Store Test" }))
00627             {
00628                 Log.Comment("Getting navitem active visual states");
00629                 var getActiveVisualStateButton = new Button(FindElement.ByName("GetNavItemActiveVisualState"));
00630
00631                 var activeVisualStates = new Edit(FindElement.ById("NavItemActiveVisualStates"));
00632
00633                 // didn't figure out why, retry helps the stability.
00634                 Wait.RetryUntilEvalFuncSuccessOrTimeout(
00635                     () =>
00636                     {
00637                         getActiveVisualStateButton.Click();
00638                         Wait.ForIdle();
00639                         return activeVisualStates.GetText().Contains("OnTopNavigationPrimaryReveal");
00640                     },
00641                     retryTimoutByMilliseconds: 3000
00642                 );
00643
00644                 Log.Comment("Visual states: " + activeVisualStates.GetText());
00645                 Verify.IsTrue(activeVisualStates.GetText().Contains("OnTopNavigationPrimaryReveal"));
00646             }
00647         }
00648
00649         [TestMethod]
00650         // To verify two problems:
00651         // 1. NavigationViewItem not in overflow menu
00652         //      Layout doesn't know about overflow, so changing the content of NavigationViewItem may not trigger MeasureOverride
00653         //      Verify NavigationView will handle this
00654         // 2. NavigationViewItem in overflow menu
00655         //      We cached the Width when moving items to overflow, and cached width would be used to recover items to primary
00656         //      This test case verifies that cache is invalidated if content is changed for NavigationViewItem
00657         public void VerifyNavigationViewContentChangeOnTopNavImpactsLayout()
00658         {
00659             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00660             {
00661                 Log.Comment("Verify there is overflow button");
00662                 VerifyElement.Found("TopNavOverflowButton", FindBy.Id);
00663
00664                 Verify.IsTrue(IsItemInTopNavPrimaryList("Games"), "Games not in overflow");
00665
00666                 Log.Comment("Change Games Content to a long string");
00667                 Button changeGamesContent = new Button(FindElement.ByName("ChangeGamesContent"));
00668                 changeGamesContent.Invoke();
00669                 Wait.ForIdle();
00670
00671                 Log.Comment("Verify Content change in primary may push Games item to overflow");
00672                 Verify.IsFalse(IsItemInTopNavPrimaryList("Games"), "Games is moved to overflow");
00673
00674                 Log.Comment("Clear Content of all NavigationViewItems");
00675                 Button clearNavItemContent = new Button(FindElement.ByName("ClearNavItemContent"));
00676                 clearNavItemContent.Invoke();
00677                 Wait.ForIdle();
00678
00679                 Log.Comment("Verify all items are moved out of overflow menu");
00680                 VerifyElement.NotFound("TopNavOverflowButton", FindBy.Id);
00681
00682                 Log.Comment("Change Games Content to a long string");
00683                 changeGamesContent.Invoke();
00684                 Wait.ForIdle();
00685
00686                 Log.Comment("Verify change content of Game makes it to overflow");
00687                 Verify.IsFalse(IsItemInTopNavPrimaryList("Games"), "Games is moved to overflow");
00688
00689                 Log.Comment("Clear Content of Games which is in overflow");
00690                 clearNavItemContent.Invoke();
00691                 Wait.ForIdle();
00692
00693                 // If NavigationViewItem is in overflow and the popup is not opened, we can't get NavigationView by the visualtree from NavigationViewItem itself
00694                 // Change the content of NavigationViewItem in overflow will not Invalidate Layout, and request user to invalid measure.
00695                 Log.Comment("Invalid Measure");
00696                 Button invalidateMeasure = new Button(FindElement.ByName("NavInvalidateMeasure"));
00697                 invalidateMeasure.Invoke();
00698                 Wait.ForIdle();
00699
00700                 Log.Comment("Verify cached width is invalidated and InvalidateMeasure will move all items out of overflow");
00701                 VerifyElement.NotFound("TopNavOverflowButton", FindBy.Id);
00702             }
00703         }
00704
00705         [TestMethod]
00706         public void VerifyOverflowButtonIsCollapsedWhenOverflowMenuIsEmpty()
00707         {
00708             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Overflow Button Test" }))
00709             {
00710                 VerifyOverflowButtonIsVisibleAndOverflowMenuHasSingleItem();
00711
00712                 Log.Comment("Verify that removing the final overflow menu item collapses the overflow button");
00713                 FindElement.ByName<Button>("RemoveLastItemButton").InvokeAndWait();
00714
00715                 // Refresh the cache to make sure that the overflow button we are going to be searching for
00716                 // does not return as a false positive due to the caching mechanism.
00717                 ElementCache.Clear();
00718
00719                 VerifyOverflowButtonIsCollapsed();
00720
00721                 Log.Comment("Add menu item to show the overflow button again with the overflow menu item containing a single item");
00722                 FindElement.ByName<Button>("AddItem4Button").InvokeAndWait();
00723
00724                 VerifyOverflowButtonIsVisibleAndOverflowMenuHasSingleItem();
00725
00726                 Log.Comment("Verify that removing a primary menu item which creates enough room for the single overflow menu item to be moved into collapses the overflow button");
00727                 FindElement.ByName<Button>("RemoveFirstItemButton").InvokeAndWait();
00728
00729                 // Refresh the cache to make sure that the overflow button we are going to be searching for
00730                 // does not return as a false positive due to the caching mechanism.
00731                 ElementCache.Clear();
00732
00733                 VerifyOverflowButtonIsCollapsed();
00734
00735                 void VerifyOverflowButtonIsVisibleAndOverflowMenuHasSingleItem()
00736                 {
00737                     UIObject overflowButton = FindElement.ById("TopNavOverflowButton");
00738                     Verify.IsNotNull(overflowButton, "The overflow button is required to be visible for this test");
00739
00740                     Log.Comment("Verify that the overflow menu contains a single item");
00741                     overflowButton.Click();
00742                     Wait.ForIdle();
00743
00744                     int numOverflowMenuItems = GetTopNavigationItems(TopNavPosition.Overflow).Count;
00745                     Verify.IsTrue(numOverflowMenuItems == 1, "The overflow menu should only contain a single item");
00746                 }
00747
00748                 void VerifyOverflowButtonIsCollapsed()
00749                 {
00750                     UIObject overflowButton = FindElement.ById("TopNavOverflowButton");
00751                     Verify.IsNull(overflowButton, "The overflow button should have been collapsed");
00752                 }
00753             }
00754         }
00755
00756         [TestMethod]
00757         public void TopNavigationChevronClickTest()
00758         {
00759             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
00760             {
00761                 Log.Comment("Set PaneDisplayMode to Top");
00762                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00763                 panelDisplayModeComboBox.SelectItemByName("Top");
00764                 Wait.ForIdle();
00765
00766                 UIObject menuItem1 = FindElement.ByName("Menu Item 1");
00767                 Verify.IsNotNull(menuItem1);
00768
00769                 UIObject menuItem2 = FindElement.ByName("Menu Item 2");
00770                 Verify.IsNull(menuItem2, "Menu Item 2 should not be visible.");
00771
00772                 ClickOnNavigationViewItemChevron(menuItem1);
00773
00774                 menuItem2 = FindElement.ByName("Menu Item 2");
00775                 Verify.IsNotNull(menuItem2, "Menu Item 2 should be visible.");
00776
00777                 ClickOnNavigationViewItemChevron(menuItem1);
00778
00779                 ElementCache.Refresh();
00780
00781                 menuItem2 = FindElement.ByName("Menu Item 2");
00782                 Verify.IsNull(menuItem2, "Menu Item 2 should not be visible.");
00783             }
00784         }
00785
00786         private void ClickOnNavigationViewItemChevron(UIObject nvi)
00787         {
00788             Log.Comment("Click On NavigationViewItem Chevron");
00789             InputHelper.LeftClick(nvi, nvi.BoundingRectangle.Width - 20, nvi.BoundingRectangle.Height / 2 + 10);
00790             Wait.ForIdle();
00791         }
00792     }
00793 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ParallaxViewProperties Member List

This is the complete list of members for ParallaxViewProperties, including all inherited members.
Child(winrt::UIElement const &value) | ParallaxViewProperties |
Child() | ParallaxViewProperties |
ChildProperty() | ParallaxViewProperties | [inline, static]
ClearProperties() | ParallaxViewProperties | [static]
EnsureProperties() | ParallaxViewProperties | [static]
HorizontalShift(double value) | ParallaxViewProperties |
HorizontalShift() | ParallaxViewProperties |
HorizontalShiftProperty() | ParallaxViewProperties | [inline, static]
HorizontalSourceEndOffset(double value) | ParallaxViewProperties |
HorizontalSourceEndOffset() | ParallaxViewProperties |
HorizontalSourceEndOffsetProperty() | ParallaxViewProperties | [inline, static]
HorizontalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const &value) | ParallaxViewProperties |
HorizontalSourceOffsetKind() | ParallaxViewProperties |
HorizontalSourceOffsetKindProperty() | ParallaxViewProperties | [inline, static]
HorizontalSourceStartOffset(double value) | ParallaxViewProperties |
HorizontalSourceStartOffset() | ParallaxViewProperties |
HorizontalSourceStartOffsetProperty() | ParallaxViewProperties | [inline, static]
IsHorizontalShiftClamped(bool value) | ParallaxViewProperties |
IsHorizontalShiftClamped() | ParallaxViewProperties |
IsHorizontalShiftClampedProperty() | ParallaxViewProperties | [inline, static]
IsVerticalShiftClamped(bool value) | ParallaxViewProperties |
IsVerticalShiftClamped() | ParallaxViewProperties |
IsVerticalShiftClampedProperty() | ParallaxViewProperties | [inline, static]
MaxHorizontalShiftRatio(double value) | ParallaxViewProperties |
MaxHorizontalShiftRatio() | ParallaxViewProperties |
MaxHorizontalShiftRatioProperty() | ParallaxViewProperties | [inline, static]
MaxVerticalShiftRatio(double value) | ParallaxViewProperties |
MaxVerticalShiftRatio() | ParallaxViewProperties |
MaxVerticalShiftRatioProperty() | ParallaxViewProperties | [inline, static]
OnChildPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalShiftPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalSourceEndOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalSourceOffsetKindPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalSourceStartOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnIsHorizontalShiftClampedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnIsVerticalShiftClampedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnMaxHorizontalShiftRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnMaxVerticalShiftRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalShiftPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalSourceEndOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalSourceOffsetKindPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalSourceStartOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
ParallaxViewProperties() | ParallaxViewProperties |
s_ChildProperty | ParallaxViewProperties | [static]
s_HorizontalShiftProperty | ParallaxViewProperties | [static]
s_HorizontalSourceEndOffsetProperty | ParallaxViewProperties | [static]
s_HorizontalSourceOffsetKindProperty | ParallaxViewProperties | [static]
s_HorizontalSourceStartOffsetProperty | ParallaxViewProperties | [static]
s_IsHorizontalShiftClampedProperty | ParallaxViewProperties | [static]
s_IsVerticalShiftClampedProperty | ParallaxViewProperties | [static]
s_MaxHorizontalShiftRatioProperty | ParallaxViewProperties | [static]
s_MaxVerticalShiftRatioProperty | ParallaxViewProperties | [static]
s_SourceProperty | ParallaxViewProperties | [static]
s_VerticalShiftProperty | ParallaxViewProperties | [static]
s_VerticalSourceEndOffsetProperty | ParallaxViewProperties | [static]
s_VerticalSourceOffsetKindProperty | ParallaxViewProperties | [static]
s_VerticalSourceStartOffsetProperty | ParallaxViewProperties | [static]
Source(winrt::UIElement const &value) | ParallaxViewProperties |
Source() | ParallaxViewProperties |
SourceProperty() | ParallaxViewProperties | [inline, static]
VerticalShift(double value) | ParallaxViewProperties |
VerticalShift() | ParallaxViewProperties |
VerticalShiftProperty() | ParallaxViewProperties | [inline, static]
VerticalSourceEndOffset(double value) | ParallaxViewProperties |
VerticalSourceEndOffset() | ParallaxViewProperties |
VerticalSourceEndOffsetProperty() | ParallaxViewProperties | [inline, static]
VerticalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const &value) | ParallaxViewProperties |
VerticalSourceOffsetKind() | ParallaxViewProperties |
VerticalSourceOffsetKindProperty() | ParallaxViewProperties | [inline, static]
VerticalSourceStartOffset(double value) | ParallaxViewProperties |
VerticalSourceStartOffset() | ParallaxViewProperties |
VerticalSourceStartOffsetProperty() | ParallaxViewProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemsSourceTestPage Member List

This is the complete list of members for TreeViewItemsSourceTestPage, including all inherited members.
EnumerateDescendants(UIElement?reference) | TreeViewItemsSourceTestPage | [inline, private, static]
ExpandSecondItem_Click(object sender, RoutedEventArgs e) | TreeViewItemsSourceTestPage | [inline, private]
PrepareItemsSourceForContainerReuseTest() | TreeViewItemsSourceTestPage | [inline]
ScrollToEndOfContentTreeView_Click(object sender, RoutedEventArgs e) | TreeViewItemsSourceTestPage | [inline, private]
ScrollToTopOfContentTreeView_Click(object sender, RoutedEventArgs e) | TreeViewItemsSourceTestPage | [inline, private]
SetUpContainerReuseTest_Click(object sender, RoutedEventArgs e) | TreeViewItemsSourceTestPage | [inline, private]
TreeViewItemsSourceTestPage() | TreeViewItemsSourceTestPage | [inline]
viewModel | TreeViewItemsSourceTestPage | [private]
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/QPCTimer.cpp Source File

  • File List
  • File Members
  • Repeater

QPCTimer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "QPCTimer.h"
00007 #include <windows.h>
00008
00009 QPCTimer::QPCTimer()
00010 {
00011     if (!QueryPerformanceFrequency(&m_frequency) || !QueryPerformanceCounter(&m_start))
00012     {
00013         throw winrt::hresult_error(E_FAIL);
00014     }
00015 }
00016
00017 void QPCTimer::Reset()
00018 {
00019     QueryPerformanceCounter(&m_start);
00020 }
00021
00022 int QPCTimer::DurationInMilliSeconds() const
00023 {
00024     LARGE_INTEGER now;
00025     const auto success = QueryPerformanceCounter(&now);
00026     int elapsedMilliSeconds = 0;
00027
00028     if (success)
00029     {
00030         const double elapsedSeconds = static_cast<DOUBLE>(now.QuadPart - m_start.QuadPart) / static_cast<DOUBLE>(m_frequency.QuadPart);
00031         elapsedMilliSeconds = static_cast<int>(elapsedSeconds * 1000);
00032     }
00033     else
00034     {
00035         // Hardware that doesn't understand QPC?? Very unlikely, but in this case, let's not crash
00036         // and just return that no time has elapsed. This will trigger people relying on budget to see that they
00037         // have a lot of budget and atleast not have them encounter a situation where they do not get to perform
00038         // certain work.
00039     }
00040
00041     return elapsedMilliSeconds;
00042 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/FlowLayoutState.properties.cpp Source File

  • File List
  • File Members
  • Generated

FlowLayoutState.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "FlowLayoutState.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(FlowLayoutState)
00012 }
00013
00014 #include "FlowLayoutState.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterWithBiDirectionalScrollControllerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using Microsoft.UI.Xaml;
00006
00007 namespace MUXControlsTestApp
00008 {
00009     public sealed partial class ScrollPresenterWithBiDirectionalScrollControllerPage : TestPage
00010     {
00011         public ScrollPresenterWithBiDirectionalScrollControllerPage()
00012         {
00013             this.InitializeComponent();
00014             biDirectionalScrollController.LogMessage += BiDirectionalScrollController_LogMessage;
00015         }
00016
00017         private void BtnSetScrollPresenterScrollControllers_Click(object sender, RoutedEventArgs e)
00018         {
00019             scrollPresenter.HorizontalScrollController = biDirectionalScrollController.HorizontalScrollController;
00020             scrollPresenter.VerticalScrollController = biDirectionalScrollController.VerticalScrollController;
00021         }
00022
00023         private void BtnResetScrollPresenterScrollControllers_Click(object sender, RoutedEventArgs e)
00024         {
00025             scrollPresenter.HorizontalScrollController = null;
00026             scrollPresenter.VerticalScrollController = null;
00027         }
00028
00029         private void ChkIsBiDirectionalScrollControllerRailEnabled_Checked(object sender, RoutedEventArgs e)
00030         {
00031             biDirectionalScrollController.IsRailEnabled = true;
00032         }
00033
00034         private void ChkIsBiDirectionalScrollControllerRailEnabled_Unchecked(object sender, RoutedEventArgs e)
00035         {
00036             biDirectionalScrollController.IsRailEnabled = false;
00037         }
00038
00039         private void BiDirectionalScrollController_LogMessage(BiDirectionalScrollController sender, string args)
00040         {
00041             LogMessage(args);
00042         }
00043
00044         private void LogMessage(string message)
00045         {
00046             if (chkLog.IsChecked.Value)
00047             {
00048                 lstLog.Items.Add(message);
00049             }
00050         }
00051
00052         private void BtnClearLog_Click(object sender, RoutedEventArgs e)
00053         {
00054             lstLog.Items.Clear();
00055         }
00056     }
00057 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/DesktopAcrylicBackdrop.properties.cpp Source File

  • File List
  • File Members
  • Generated

DesktopAcrylicBackdrop.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "DesktopAcrylicBackdrop.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Media
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(DesktopAcrylicBackdrop)
00012 }
00013
00014 #include "DesktopAcrylicBackdrop.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ProgressRingDeterminate.cpp Source File

  • File List
  • File Members
  • ProgressRing
  • AnimatedVisuals

ProgressRingDeterminate.cpp

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           6.1.0+gd30fc5741e
00007 //
00008 //       Command:
00009 //           LottieGen -GenerateDependencyObject -Language Cppwinrt -InputFile ProgressRingDeterminate.json
00010 //
00011 //       Input file:
00012 //           ProgressRingDeterminate.json (2627 bytes created 14:08-07:00 Feb 7 2022)
00013 //
00014 //       Invoked on:
00015 //           KAREN @ 17:39-07:00 Feb 7 2022
00016 //
00017 //       LottieGen source:
00018 //           http://aka.ms/Lottie
00019 //
00020 //     Changes to this file may cause incorrect behavior and will be lost if
00021 //     the code is regenerated.
00022 // </auto-generated>
00023 //------------------------------------------------------------------------------
00024 // ____________________________________
00025 // |       Object stats       | Count |
00026 // |__________________________|_______|
00027 // | All CompositionObjects   |    47 |
00028 // |--------------------------+-------|
00029 // | Animators                |     7 |
00030 // | Animated brushes         |     3 |
00031 // | Animated gradient stops  |     - |
00032 // | ExpressionAnimations     |     4 |
00033 // | PathKeyFrameAnimations   |     - |
00034 // |--------------------------+-------|
00035 // | ContainerVisuals         |     1 |
00036 // | ShapeVisuals             |     1 |
00037 // |--------------------------+-------|
00038 // | ContainerShapes          |     1 |
00039 // | CompositionSpriteShapes  |     3 |
00040 // |--------------------------+-------|
00041 // | Brushes                  |     3 |
00042 // | Gradient stops           |     - |
00043 // | CompositionVisualSurface |     - |
00044 // ------------------------------------
00045 #include "pch.h"
00046 #include "ProgressRingDeterminate.h"
00047 #include "WindowsNumerics.h"
00048
00049 using namespace winrt::Windows::Foundation;
00050 using namespace winrt::Windows::Foundation::Numerics;
00051 using namespace winrt::Windows::Graphics;
00052 using namespace winrt::Windows::UI;
00053 using namespace winrt::Microsoft::UI::Composition;
00054 using namespace winrt::Microsoft::UI::Xaml;
00055
00056 namespace
00057 {
00058     class AnimatedVisual
00059         : public winrt::implements<AnimatedVisual, winrt::IAnimatedVisual, winrt::IClosable>
00060     {
00061         static constexpr int64_t c_durationTicks{ 20000000L };
00062         Compositor const _c{ nullptr };
00063         ExpressionAnimation const _reusableExpressionAnimation{ nullptr };
00064         winrt::CompositionPropertySet const _themeProperties{ nullptr };
00065         ContainerVisual _root{ nullptr };
00066         CubicBezierEasingFunction _cubicBezierEasingFunction_0{ nullptr };
00067         ExpressionAnimation _rootProgress{ nullptr };
00068         StepEasingFunction _holdThenStepEasingFunction{ nullptr };
00069
00070         static void StartProgressBoundAnimation(
00071             CompositionObject target,
00072             winrt::hstring animatedPropertyName,
00073             CompositionAnimation animation,
00074             ExpressionAnimation controllerProgressExpression)
00075         {
00076             target.StartAnimation(animatedPropertyName, animation);
00077             const auto controller = target.TryGetAnimationController(animatedPropertyName);
00078             controller.Pause();
00079             controller.StartAnimation(L"Progress", controllerProgressExpression);
00080         }
00081
00082         void BindProperty(
00083             CompositionObject target,
00084             winrt::hstring animatedPropertyName,
00085             winrt::hstring expression,
00086             winrt::hstring referenceParameterName,
00087             CompositionObject referencedObject)
00088         {
00089             _reusableExpressionAnimation.ClearAllParameters();
00090             _reusableExpressionAnimation.Expression(expression);
00091             _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00092             target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00093         }
00094
00095         ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00096         {
00097             const auto result = _c.CreateScalarKeyFrameAnimation();
00098             result.Duration(TimeSpan{ c_durationTicks });
00099             result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00100             return result;
00101         }
00102
00103         Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(float initialProgress, float2 initialValue, CompositionEasingFunction initialEasingFunction)
00104         {
00105             const auto result = _c.CreateVector2KeyFrameAnimation();
00106             result.Duration(TimeSpan{ c_durationTicks });
00107             result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00108             return result;
00109         }
00110
00111         CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, float3x2 transformMatrix)
00112         {
00113             const auto result = _c.CreateSpriteShape(geometry);
00114             result.TransformMatrix(transformMatrix);
00115             return result;
00116         }
00117
00118         // - Layer aggregator
00119         // Offset:<16, 16>
00120         // Color bound to theme property value: Background
00121         CompositionColorBrush ThemeColor_Background()
00122         {
00123             const auto result = _c.CreateColorBrush();
00124             BindProperty(result, L"Color", L"ColorRGB(_theme.Background.W*1,_theme.Background.X,_theme.Background.Y,_theme.Background.Z)", L"_theme", _themeProperties);
00125             return result;
00126         }
00127
00128         // - - Layer aggregator
00129         // - Layer: Radial
00130         // Offset:<16, 16>
00131         // Color bound to theme property value: Foreground
00132         CompositionColorBrush ThemeColor_Foreground_0()
00133         {
00134             const auto result = _c.CreateColorBrush();
00135             BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W*0,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
00136             return result;
00137         }
00138
00139         // - - Layer aggregator
00140         // - Layer: Radial
00141         // Offset:<16, 16>
00142         // Color bound to theme property value: Foreground
00143         CompositionColorBrush ThemeColor_Foreground_1()
00144         {
00145             const auto result = _c.CreateColorBrush();
00146             BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W*1,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
00147             return result;
00148         }
00149
00150         // Layer aggregator
00151         // Layer: Radial
00152         CompositionContainerShape ContainerShape()
00153         {
00154             const auto result = _c.CreateContainerShape();
00155             result.Scale({ 0.0F, 0.0F });
00156             const auto shapes = result.Shapes();
00157             // Offset:<16, 16>
00158             shapes.Append(SpriteShape_1());
00159             // Offset:<16, 16>
00160             shapes.Append(SpriteShape_2());
00161             StartProgressBoundAnimation(result, L"Scale", ShapeVisibilityAnimation(), _rootProgress);
00162             return result;
00163         }
00164
00165         // - Layer aggregator
00166         // Offset:<16, 16>
00167         // Ellipse Path.EllipseGeometry
00168         CompositionEllipseGeometry Ellipse_7_0()
00169         {
00170             const auto result = _c.CreateEllipseGeometry();
00171             result.Radius({ 8.0F, 8.0F });
00172             return result;
00173         }
00174
00175         // - - Layer aggregator
00176         // - Layer: Radial
00177         // Offset:<16, 16>
00178         // Ellipse Path.EllipseGeometry
00179         CompositionEllipseGeometry Ellipse_7_1()
00180         {
00181             const auto result = _c.CreateEllipseGeometry();
00182             result.TrimEnd(0.5F);
00183             result.Radius({ 8.0F, 8.0F });
00184             return result;
00185         }
00186
00187         // - - Layer aggregator
00188         // - Layer: Radial
00189         // Offset:<16, 16>
00190         // Ellipse Path.EllipseGeometry
00191         CompositionEllipseGeometry Ellipse_7_2()
00192         {
00193             const auto result = _c.CreateEllipseGeometry();
00194             result.Radius({ 8.0F, 8.0F });
00195             StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_1(), RootProgress());
00196             return result;
00197         }
00198
00199         // Layer aggregator
00200         // Ellipse Path
00201         CompositionSpriteShape SpriteShape_0()
00202         {
00203             // Offset:<16, 16>, Rotation:-0.008387561908827789 degrees, Scale:<1.77, 1.77>
00204             const auto result = CreateSpriteShape(Ellipse_7_0(), { 1.76999998F, 0.0F, 0.0F, 1.76999998F, 16.0F, 16.0F });
00205             result.StrokeBrush(ThemeColor_Background());
00206             result.StrokeDashCap(CompositionStrokeCap::Round);
00207             result.StrokeThickness(1.5F);
00208             return result;
00209         }
00210
00211         // - Layer aggregator
00212         // Layer: Radial
00213         // Ellipse Path
00214         CompositionSpriteShape SpriteShape_1()
00215         {
00216             // Offset:<16, 16>, Rotation:-0.008387561908827789 degrees, Scale:<1.77, 1.77>
00217             const auto result = CreateSpriteShape(Ellipse_7_1(), { 1.76999998F, 0.0F, 0.0F, 1.76999998F, 16.0F, 16.0F });
00218             result.StrokeBrush(ThemeColor_Foreground_0());
00219             result.StrokeDashCap(CompositionStrokeCap::Round);
00220             result.StrokeStartCap(CompositionStrokeCap::Round);
00221             result.StrokeEndCap(CompositionStrokeCap::Round);
00222             result.StrokeThickness(1.5F);
00223             return result;
00224         }
00225
00226         // - Layer aggregator
00227         // Layer: Radial
00228         // Ellipse Path
00229         CompositionSpriteShape SpriteShape_2()
00230         {
00231             // Offset:<16, 16>, Rotation:-0.008387561908827789 degrees, Scale:<1.77, 1.77>
00232             const auto result = CreateSpriteShape(Ellipse_7_2(), { 1.76999998F, 0.0F, 0.0F, 1.76999998F, 16.0F, 16.0F });
00233             result.StrokeBrush(ThemeColor_Foreground_1());
00234             result.StrokeDashCap(CompositionStrokeCap::Round);
00235             result.StrokeStartCap(CompositionStrokeCap::Round);
00236             result.StrokeEndCap(CompositionStrokeCap::Round);
00237             result.StrokeThickness(1.5F);
00238             return result;
00239         }
00240
00241         // The root of the composition.
00242         ContainerVisual Root()
00243         {
00244             const auto result = _root = _c.CreateContainerVisual();
00245             const auto propertySet = result.Properties();
00246             propertySet.InsertScalar(L"Progress", 0.0F);
00247             // Layer aggregator
00248             result.Children().InsertAtTop(ShapeVisual_0());
00249             return result;
00250         }
00251
00252         CubicBezierEasingFunction CubicBezierEasingFunction_0()
00253         {
00254             return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.833000004F, 0.833000004F });
00255         }
00256
00257         ExpressionAnimation RootProgress()
00258         {
00259             const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
00260             result.SetReferenceParameter(L"_", _root);
00261             return result;
00262         }
00263
00264         // - - - Layer aggregator
00265         // - - Layer: Radial
00266         // -  Offset:<16, 16>
00267         // Ellipse Path.EllipseGeometry
00268         // TrimEnd
00269         ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1()
00270         {
00271             const auto result = CreateScalarKeyFrameAnimation(0.0F, 9.99999975E-05F, StepThenHoldEasingFunction());
00272             result.InsertKeyFrame(0.00833333377F, 9.99999975E-05F, HoldThenStepEasingFunction());
00273             result.InsertKeyFrame(0.25F, 0.25F, CubicBezierEasingFunction_0());
00274             result.InsertKeyFrame(0.5F, 0.5F, _cubicBezierEasingFunction_0);
00275             result.InsertKeyFrame(0.75F, 0.75F, _cubicBezierEasingFunction_0);
00276             result.InsertKeyFrame(0.983333349F, 0.96666666F, _cubicBezierEasingFunction_0);
00277             result.InsertKeyFrame(0.991666675F, 1.0F, _cubicBezierEasingFunction_0);
00278             return result;
00279         }
00280
00281         // Layer aggregator
00282         ShapeVisual ShapeVisual_0()
00283         {
00284             const auto result = _c.CreateShapeVisual();
00285             result.Size({ 32.0F, 32.0F });
00286             const auto shapes = result.Shapes();
00287             // Offset:<16, 16>
00288             shapes.Append(SpriteShape_0());
00289             // Layer: Radial
00290             shapes.Append(ContainerShape());
00291             return result;
00292         }
00293
00294         StepEasingFunction HoldThenStepEasingFunction()
00295         {
00296             const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
00297             result.IsFinalStepSingleFrame(true);
00298             return result;
00299         }
00300
00301         // - - - - Layer aggregator
00302         // - - - Layer: Radial
00303         // - -  Offset:<16, 16>
00304         // - Ellipse Path.EllipseGeometry
00305         // TrimEnd
00306         StepEasingFunction StepThenHoldEasingFunction()
00307         {
00308             const auto result = _c.CreateStepEasingFunction();
00309             result.IsInitialStepSingleFrame(true);
00310             return result;
00311         }
00312
00313         // - Layer aggregator
00314         // Layer: Radial
00315         Vector2KeyFrameAnimation ShapeVisibilityAnimation()
00316         {
00317             const auto result = CreateVector2KeyFrameAnimation(0.00833333377F, { 1.0F, 1.0F }, _holdThenStepEasingFunction);
00318             return result;
00319         }
00320
00321     public:
00322         AnimatedVisual(Compositor compositor, winrt::CompositionPropertySet themeProperties)
00323             : _c(compositor)
00324             , _themeProperties(themeProperties)
00325             , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
00326         {
00327             const auto _ = Root();
00328         }
00329
00330         void Close()
00331         {
00332             if (_root)
00333             {
00334                 _root.Close();
00335             }
00336         }
00337
00338         TimeSpan Duration() const
00339         {
00340             return { TimeSpan{ c_durationTicks } };
00341         }
00342
00343
00344         Visual RootVisual() const
00345         {
00346             return _root;
00347         }
00348
00349
00350         float2 Size() const
00351         {
00352             return { 32.0F, 32.0F };
00353         }
00354
00355         static bool IsRuntimeCompatible()
00356         {
00357             return  winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
00358         }
00359     };
00360 } // end namespace
00361
00362 float4 AnimatedVisuals::ProgressRingDeterminate::ColorAsVector4(Color color)
00363 {
00364     return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
00365 }
00366
00367 winrt::CompositionPropertySet AnimatedVisuals::ProgressRingDeterminate::EnsureThemeProperties(Compositor compositor)
00368 {
00369     if (_themeProperties == nullptr)
00370     {
00371         _themeProperties = compositor.CreatePropertySet();
00372         _themeProperties.InsertVector4(L"Background", ColorAsVector4((Color)_themeBackground));
00373         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00374     }
00375
00376     return _themeProperties;
00377 }
00378
00379 winrt::CompositionPropertySet AnimatedVisuals::ProgressRingDeterminate::GetThemeProperties(Compositor compositor)
00380 {
00381     return EnsureThemeProperties(compositor);
00382 }
00383
00384 Color AnimatedVisuals::ProgressRingDeterminate::Background()
00385 {
00386     return _themeBackground;
00387 }
00388
00389 void AnimatedVisuals::ProgressRingDeterminate::Background(Color value)
00390 {
00391     _themeBackground = value;
00392     if (_themeProperties != nullptr)
00393     {
00394         _themeProperties.InsertVector4(L"Background", ColorAsVector4((Color)_themeBackground));
00395     }
00396 }
00397
00398 Color AnimatedVisuals::ProgressRingDeterminate::Foreground()
00399 {
00400     return _themeForeground;
00401 }
00402
00403 void AnimatedVisuals::ProgressRingDeterminate::Foreground(Color value)
00404 {
00405     _themeForeground = value;
00406     if (_themeProperties != nullptr)
00407     {
00408         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00409     }
00410 }
00411
00412 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedVisuals::ProgressRingDeterminate::TryCreateAnimatedVisual(
00413     const Compositor& compositor,
00414     IInspectable& diagnostics)
00415 {
00416     const auto _ = EnsureThemeProperties(compositor);
00417     diagnostics = nullptr;
00418
00419     if (AnimatedVisual::IsRuntimeCompatible())
00420     {
00421         return winrt::make<AnimatedVisual>(compositor, _themeProperties);
00422     }
00423
00424     return nullptr;
00425 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/APITests/ExpanderTests.cs Source File

  • File List
  • File Members
  • Expander
  • APITests

ExpanderTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Controls;
00006 using MUXControlsTestApp.Utilities;
00007 using Microsoft.UI.Xaml.Automation.Peers;
00008 using Microsoft.UI.Xaml.Automation.Provider;
00009 using Microsoft.UI.Xaml.Automation.Peers;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Automation;
00012 using Microsoft.UI.Xaml.Shapes;
00013 using Microsoft.UI.Xaml.Markup;
00014 using Microsoft.UI.Xaml.Controls;
00015
00016 using WEX.TestExecution;
00017 using WEX.TestExecution.Markup;
00018 using WEX.Logging.Interop;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00021 {
00022     [TestClass]
00023     public class ExpanderTests : ApiTestBase
00024     {
00025         [TestMethod]
00026         public void ExpanderAutomationPeerTest()
00027         {
00028             RunOnUIThread.Execute(() =>
00029             {
00030                 var root = (StackPanel)XamlReader.Load(
00031     @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00032                              xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00033                              xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'
00034                              xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
00035                              <controls:Expander x:Name ='ExpandedExpander' AutomationProperties.Name='ExpandedExpander' IsExpanded='True' Margin='12' HorizontalAlignment='Left'>
00036                                 <controls:Expander.Header>
00037                                     <Grid>
00038                                         <Grid.ColumnDefinitions>
00039                                             <ColumnDefinition />
00040                                             <ColumnDefinition Width='80'/>
00041                                         </Grid.ColumnDefinitions>
00042                                         <StackPanel Margin='0,14,0,16'>
00043                                             <TextBlock AutomationProperties.Name='test' Text='This expander is expanded by default.'  Margin='0,0,0,4' />
00044                                             <TextBlock Text='This is the second line of text.' />
00045                                         </StackPanel>
00046                                         <ToggleSwitch Grid.Column='1'/>
00047                                     </Grid>
00048                                 </controls:Expander.Header>
00049                                 <Button AutomationProperties.AutomationId = 'ExpandedExpanderContent'> Content </Button>
00050                              </controls:Expander>
00051                                     </StackPanel>");
00052
00053                 Content = root;
00054                 Content.UpdateLayout();
00055
00056                 var expander = VisualTreeHelper.GetChild(root, 0) as Expander;
00057
00058                 expander.IsExpanded = true;
00059                 Content.UpdateLayout();
00060
00061                 var grid = VisualTreeHelper.GetChild(expander, 0);
00062                 var toggleButton = VisualTreeHelper.GetChild(grid, 0);
00063                 var toggleButtonGrid = VisualTreeHelper.GetChild(toggleButton, 0);
00064                 var contentPresenter = VisualTreeHelper.GetChild(toggleButtonGrid, 0);
00065                 var grid2 = VisualTreeHelper.GetChild(contentPresenter, 0);
00066                 var stackPanel = VisualTreeHelper.GetChild(grid2, 0);
00067                 var textBlock1 = VisualTreeHelper.GetChild(stackPanel, 0) as TextBlock;
00068                 var textBlock2 = VisualTreeHelper.GetChild(stackPanel, 1) as TextBlock;
00069                 var toggleSwitch = VisualTreeHelper.GetChild(grid2, 1) as ToggleSwitch;
00070
00071                 var border = VisualTreeHelper.GetChild(grid, 1);
00072                 var expanderContentBorder = VisualTreeHelper.GetChild(border, 0);
00073                 var expanderContentContentPresenter = VisualTreeHelper.GetChild(expanderContentBorder, 0);
00074                 var button = VisualTreeHelper.GetChild(expanderContentContentPresenter, 0) as Button;
00075
00076                 Verify.AreEqual("ExpandedExpander", AutomationProperties.GetName(expander));
00077
00078                 // Verify ExpandedExpander header content are included in the accessibility tree
00079                 Verify.AreEqual(AutomationProperties.GetAccessibilityView(textBlock1), AccessibilityView.Content);
00080                 Verify.AreEqual(AutomationProperties.GetAccessibilityView(textBlock2), AccessibilityView.Content);
00081                 Verify.AreEqual(AutomationProperties.GetAccessibilityView(toggleSwitch), AccessibilityView.Content);
00082
00083                 // Verify ExpandedExpander content is included in the accessibility tree
00084                 Verify.AreEqual(AutomationProperties.GetAccessibilityView(button), AccessibilityView.Content);
00085
00086                 expander.IsExpanded = false;
00087                 Content.UpdateLayout();
00088
00089                 // Verify ExpandedExpander content is not included in the accessibility tree and not readable once collapsed
00090                 Verify.AreNotEqual(AutomationProperties.GetAccessibilityView(button), AccessibilityView.Raw);
00091             });
00092         }
00093     }
00094 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InspectingDataSourceTests::WinRTObservableVector Member List

This is the complete list of members for InspectingDataSourceTests::WinRTObservableVector, including all inherited members.
_items | InspectingDataSourceTests::WinRTObservableVector | [private]
Add(object item) | InspectingDataSourceTests::WinRTObservableVector | [inline]
Clear() | InspectingDataSourceTests::WinRTObservableVector | [inline]
Contains(object item) | InspectingDataSourceTests::WinRTObservableVector | [inline]
CopyTo(object[] array, int arrayIndex) | InspectingDataSourceTests::WinRTObservableVector | [inline]
Count | InspectingDataSourceTests::WinRTObservableVector |
GetEnumerator() | InspectingDataSourceTests::WinRTObservableVector | [inline]
GetEnumerator() | InspectingDataSourceTests::WinRTObservableVector | [inline, private]
IndexOf(object item) | InspectingDataSourceTests::WinRTObservableVector | [inline]
Insert(int index, object item) | InspectingDataSourceTests::WinRTObservableVector | [inline]
IsReadOnly | InspectingDataSourceTests::WinRTObservableVector |
Remove(object item) | InspectingDataSourceTests::WinRTObservableVector | [inline]
RemoveAt(int index) | InspectingDataSourceTests::WinRTObservableVector | [inline]
this | InspectingDataSourceTests::WinRTObservableVector |
VectorChanged | InspectingDataSourceTests::WinRTObservableVector |
WinRTObservableVector() | InspectingDataSourceTests::WinRTObservableVector | [inline]
WinRTObservableVector(IEnumerable< object > items) | InspectingDataSourceTests::WinRTObservableVector | [inline]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewSelectionChangedEventArgs.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewSelectionChangedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewSelectionChangedEventArgs.g.h"
00007
00008 class NavigationViewSelectionChangedEventArgs
00009     : public ReferenceTracker<NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable>
00010 {
00011 public:
00012     winrt::IInspectable SelectedItem();
00013     bool IsSettingsSelected();
00014
00015     void SelectedItem(winrt::IInspectable const& value);
00016     void IsSettingsSelected(bool value);
00017
00018     winrt::NavigationViewItemBase SelectedItemContainer();
00019     void SelectedItemContainer(winrt::NavigationViewItemBase const& value);
00020
00021     winrt::NavigationTransitionInfo RecommendedNavigationTransitionInfo();
00022     void RecommendedNavigationTransitionInfo(winrt::NavigationTransitionInfo const& value);
00023
00024 private:
00025     bool m_isSettingsSelected{};
00026     tracker_ref<winrt::IInspectable> m_selectedItem{ this };
00027     tracker_ref<winrt::NavigationViewItemBase> m_selectedItemContainer{ this };
00028     tracker_ref<winrt::NavigationTransitionInfo> m_recommendedNavigationTransitionInfo{ this };
00029
00030 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ReferenceTrackerContainerBase Member List

This is the complete list of members for ReferenceTrackerContainerBase, including all inherited members.
ReferenceTrackerContainerBase(ITrackerHandleManager *owner) ReferenceTrackerContainerBase [inline]
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > Member List

This is the complete list of members for tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * >, including all inherited members.
get() const | tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > | [inline]
safe_get(bool) const | tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > | [inline]
set(const winrt::hstring &value) | tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > | [inline]
tracker_ref(const ITrackerHandleManager *) | tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > | [inline, explicit]
tracker_ref(const ITrackerHandleManager *, const winrt::hstring &value) | tracker_ref< winrt::hstring, TrackerRefFallback::None, IUnknown * > | [inline, explicit]
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlTestBase Member List

This is the complete list of members for PagerControlTestBase, including all inherited members.
AutoDisplayModeThresholdValue | PagerControlTestBase | [protected]
ButtonVisibilityModes enum name | PagerControlTestBase |
ButtonVisibilityOptionsTest(string buttonNamePrefix) | PagerControlTestBase | [inline, protected]
ChangeNumberOfPages() | PagerControlTestBase | [inline, protected]
DisplayModes enum name | PagerControlTestBase |
elements | PagerControlTestBase | [protected]
FindTextBox(UIObject parent) | PagerControlTestBase | [inline, protected]
GetCurrentPage() | PagerControlTestBase | [inline, protected]
GetCurrentPageAsInt() | PagerControlTestBase | [inline, protected]
GetLastPage() | PagerControlTestBase | [inline, protected]
GetLastPageAsInt() | PagerControlTestBase | [inline, protected]
GetPreviousPage() | PagerControlTestBase | [inline, protected]
GetPreviousPageAsInt() | PagerControlTestBase | [inline, protected]
IncrementNumberOfPages(int numberOfPagesToAdd) | PagerControlTestBase | [inline, protected]
SelectPageInNumberPanel(int index) | PagerControlTestBase | [inline, protected]
SelectValueInPagerComboBox(int index) | PagerControlTestBase | [inline, protected]
SendValueToNumberBox(string value) | PagerControlTestBase | [inline, protected]
SetAutoDisplayMode() | PagerControlTestBase | [inline, protected]
SetButtonVisibilityModeFunction(ButtonVisibilityModes mode) | PagerControlTestBase | [protected]
SetComboBoxDisplayMode() | PagerControlTestBase | [inline, protected]
SetDisplayMode(string mode) | PagerControlTestBase | [inline, protected]
SetFirstPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
SetLastPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
SetNextPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
SetNumberBoxDisplayMode() | PagerControlTestBase | [inline, protected]
SetNumberPanelDisplayMode() | PagerControlTestBase | [inline, protected]
SetPreviousPageButtonVisibilityMode(ButtonVisibilityModes mode) | PagerControlTestBase | [inline, protected]
VerifyAutoDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyButton(UIObject button, Visibility expectedVisibility, bool shouldBeEnabled) | PagerControlTestBase | [inline, protected]
VerifyComboBoxDisabled() | PagerControlTestBase | [inline, protected]
VerifyComboBoxDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyComboBoxEnabled() | PagerControlTestBase | [inline, protected]
VerifyComboBoxIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyComboBoxVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyDisplayMode(DisplayModes mode) | PagerControlTestBase | [inline, protected]
VerifyFirstPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyFirstPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyLastPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyLastPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyNextPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyNextPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyNumberBoxDisabled() | PagerControlTestBase | [inline, protected]
VerifyNumberBoxDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyNumberBoxEnabled() | PagerControlTestBase | [inline, protected]
VerifyNumberBoxIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyNumberBoxVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyNumberOfPages(string expectedPages) | PagerControlTestBase | [inline, protected]
VerifyNumberPanelContent(string expectedContent) | PagerControlTestBase | [inline, protected]
VerifyNumberPanelDisabled() | PagerControlTestBase | [inline, protected]
VerifyNumberPanelDisplayMode() | PagerControlTestBase | [inline, protected]
VerifyNumberPanelEnabled() | PagerControlTestBase | [inline, protected]
VerifyNumberPanelVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
VerifyPageChanged(int expectedPage) | PagerControlTestBase | [inline, protected]
VerifyPreviousPageButtonIsEnabled(bool expected) | PagerControlTestBase | [inline, protected]
VerifyPreviousPageButtonVisibility(Visibility expected) | PagerControlTestBase | [inline, protected]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/Expander.idl Source File

  • File List
  • File Members
  • Expander

Expander.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [MUX_PROPERTY_NEEDS_DP_FIELD]
00007 runtimeclass ExpanderTemplateSettings : Microsoft.UI.Xaml.DependencyObject
00008 {
00009     Double ContentHeight{ get; };
00010     Double NegativeContentHeight{ get; };
00011 }
00012
00013 [MUX_PUBLIC]
00014 [webhosthidden]
00015 unsealed runtimeclass Expander : Microsoft.UI.Xaml.Controls.ContentControl
00016 {
00017     Expander();
00018
00019     Object Header{ get; set; };
00020     Microsoft.UI.Xaml.DataTemplate HeaderTemplate{ get; set; };
00021     Microsoft.UI.Xaml.Controls.DataTemplateSelector HeaderTemplateSelector{ get; set; };
00022
00023     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00024     Boolean IsExpanded{ get; set; };
00025
00026     [MUX_DEFAULT_VALUE("winrt::ExpandDirection::Down")]
00027     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00028     ExpandDirection ExpandDirection{ get; set; };
00029
00030     event Windows.Foundation.TypedEventHandler<Expander, ExpanderExpandingEventArgs> Expanding;
00031     event Windows.Foundation.TypedEventHandler<Expander, ExpanderCollapsedEventArgs> Collapsed;
00032
00033     [MUX_PROPERTY_NEEDS_DP_FIELD]
00034     ExpanderTemplateSettings TemplateSettings{ get; };
00035
00036     static Microsoft.UI.Xaml.DependencyProperty HeaderProperty{ get; };
00037     static Microsoft.UI.Xaml.DependencyProperty HeaderTemplateProperty{ get; };
00038     static Microsoft.UI.Xaml.DependencyProperty HeaderTemplateSelectorProperty{ get; };
00039
00040     static Microsoft.UI.Xaml.DependencyProperty IsExpandedProperty{ get; };
00041     static Microsoft.UI.Xaml.DependencyProperty ExpandDirectionProperty{ get; };
00042 }
00043
00044 [MUX_PUBLIC]
00045 [webhosthidden]
00046 enum ExpandDirection
00047 {
00048     Down = 0,
00049     Up = 1
00050 };
00051
00052 [MUX_PUBLIC]
00053 [default_interface]
00054 [webhosthidden]
00055 runtimeclass ExpanderExpandingEventArgs
00056 {
00057 }
00058
00059 [MUX_PUBLIC]
00060 [default_interface]
00061 [webhosthidden]
00062 runtimeclass ExpanderCollapsedEventArgs
00063 {
00064 }
00065
00066 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorSpectrum Member List

This is the complete list of members for ColorSpectrum, including all inherited members.
abi_enter() | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
CheckThread() | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
ClearProperties() | ColorSpectrumProperties | [static]
Color(winrt::Color const &value) | ColorSpectrumProperties |
Color() | ColorSpectrumProperties |
ColorChanged(winrt::TypedEventHandler< winrt::ColorSpectrum, winrt::ColorChangedEventArgs > const &value) | ColorSpectrumProperties |
ColorChanged(winrt::event_token const &token) | ColorSpectrumProperties |
ColorProperty() | ColorSpectrumProperties | [inline, static]
ColorSpectrum() | ColorSpectrum |
ColorSpectrumProperties() | ColorSpectrumProperties |
Components(winrt::ColorSpectrumComponents const &value) | ColorSpectrumProperties |
Components() | ColorSpectrumProperties |
ComponentsProperty() | ColorSpectrumProperties | [inline, static]
CreateBitmapsAndColorMap() | ColorSpectrum | [private]
DeleteInstanceOnUIThread(std::unique_ptr< ColorSpectrum > &&self) noexcept | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline, static]
EnsureProperties() | ColorSpectrumProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
FillPixelForBox(double x, double y, const Hsv &baseHsv, double minDimension, winrt::ColorSpectrumComponents components, double minHue, double maxHue, double minSaturation, double maxSaturation, double minValue, double maxValue, std::shared_ptr< std::vector< byte >> bgraMinPixelData, std::shared_ptr< std::vector< byte >> bgraMiddle1PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle2PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle3PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle4PixelData, std::shared_ptr< std::vector< byte >> bgraMaxPixelData, std::shared_ptr< std::vector< Hsv >> newHsvValues) | ColorSpectrum | [private, static]
FillPixelForRing(double x, double y, double radius, const Hsv &baseHsv, winrt::ColorSpectrumComponents components, double minHue, double maxHue, double minSaturation, double maxSaturation, double minValue, double maxValue, std::shared_ptr< std::vector< byte >> bgraMinPixelData, std::shared_ptr< std::vector< byte >> bgraMiddle1PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle2PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle3PixelData, std::shared_ptr< std::vector< byte >> bgraMiddle4PixelData, std::shared_ptr< std::vector< byte >> bgraMaxPixelData, std::shared_ptr< std::vector< Hsv >> newHsvValues) | ColorSpectrum | [private, static]
final_release(std::unique_ptr< ColorSpectrum > &&self) | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline, static]
GetBase() | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
GetBoundingRectangle() | ColorSpectrum |
GetInner() | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
HsvColor(winrt::float4 const &value) | ColorSpectrumProperties |
HsvColor() | ColorSpectrumProperties |
HsvColorProperty() | ColorSpectrumProperties | [inline, static]
IsOnThread() | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
m_colorChangedEventSource | ColorSpectrumProperties |
m_hsvValues | ColorSpectrum | [private]
m_isPointerOver | ColorSpectrum | [private]
m_isPointerPressed | ColorSpectrum | [private]
m_shouldShowLargeSelection | ColorSpectrum | [private]
m_updatingColor | ColorSpectrum | [private]
m_updatingHsvColor | ColorSpectrum | [private]
MaxHue(int value) | ColorSpectrumProperties |
MaxHue() | ColorSpectrumProperties |
MaxHueProperty() | ColorSpectrumProperties | [inline, static]
MaxSaturation(int value) | ColorSpectrumProperties |
MaxSaturation() | ColorSpectrumProperties |
MaxSaturationProperty() | ColorSpectrumProperties | [inline, static]
MaxValue(int value) | ColorSpectrumProperties |
MaxValue() | ColorSpectrumProperties |
MaxValueProperty() | ColorSpectrumProperties | [inline, static]
MinHue(int value) | ColorSpectrumProperties |
MinHue() | ColorSpectrumProperties |
MinHueProperty() | ColorSpectrumProperties | [inline, static]
MinSaturation(int value) | ColorSpectrumProperties |
MinSaturation() | ColorSpectrumProperties |
MinSaturationProperty() | ColorSpectrumProperties | [inline, static]
MinValue(int value) | ColorSpectrumProperties |
MinValue() | ColorSpectrumProperties |
MinValueProperty() | ColorSpectrumProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
OnApplyTemplate() | ColorSpectrum |
OnColorChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum | [private]
OnColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnComponentsChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum | [private]
OnComponentsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnCreateAutomationPeer() | ColorSpectrum |
OnGotFocus(winrt::RoutedEventArgs const &e) | ColorSpectrum |
OnHsvColorChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum | [private]
OnHsvColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnInputTargetPointerEntered(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | ColorSpectrum | [private]
OnInputTargetPointerExited(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | ColorSpectrum | [private]
OnInputTargetPointerMoved(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | ColorSpectrum | [private]
OnInputTargetPointerPressed(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | ColorSpectrum | [private]
OnInputTargetPointerReleased(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | ColorSpectrum | [private]
OnKeyDown(winrt::KeyRoutedEventArgs const &e) | ColorSpectrum |
OnLayoutRootSizeChanged(winrt::IInspectable const &sender, winrt::SizeChangedEventArgs const &args) | ColorSpectrum | [private]
OnLostFocus(winrt::RoutedEventArgs const &e) | ColorSpectrum |
OnMaxHuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMaxSaturationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMaxValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMinHuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMinMaxHueChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum | [private]
OnMinMaxSaturationChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum | [private]
OnMinMaxValueChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum | [private]
OnMinSaturationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMinValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum |
OnSelectionEllipseFlowDirectionChanged(winrt::DependencyObject const &o, winrt::DependencyProperty const &p) | ColorSpectrum | [private]
OnShapeChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrum | [private]
OnShapePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnUnloaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | ColorSpectrum | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
RaiseColorChanged() | ColorSpectrum |
ReferenceTracker(Args &&...args) | ReferenceTracker< ColorSpectrum, winrt::implementation::ColorSpectrumT > | [inline]
s_ColorProperty | ColorSpectrumProperties | [static]
s_ComponentsProperty | ColorSpectrumProperties | [static]
s_HsvColorProperty | ColorSpectrumProperties | [static]
s_MaxHueProperty | ColorSpectrumProperties | [static]
s_MaxSaturationProperty | ColorSpectrumProperties | [static]
s_MaxValueProperty | ColorSpectrumProperties | [static]
s_MinHueProperty | ColorSpectrumProperties | [static]
s_MinSaturationProperty | ColorSpectrumProperties | [static]
s_MinValueProperty | ColorSpectrumProperties | [static]
s_ShapeProperty | ColorSpectrumProperties | [static]
SelectionEllipseShouldBeLight() | ColorSpectrum | [private]
SetColor() | ColorSpectrum | [private]
Shape(winrt::ColorSpectrumShape const &value) | ColorSpectrumProperties |
Shape() | ColorSpectrumProperties |
ShapeProperty() | ColorSpectrumProperties | [inline, static]
UpdateBitmapSources() | ColorSpectrum | [private]
UpdateColor(Hsv newHsv) | ColorSpectrum | [private]
UpdateColorFromPoint(const winrt::PointerPoint &point) | ColorSpectrum | [private]
UpdateEllipse() | ColorSpectrum | [private]
UpdateVisualState(bool useTransitions) | ColorSpectrum | [private]
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControl Member List

This is the complete list of members for PagerControl, including all inherited members.
abi_enter() | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
AppendButtonToNumberPanelList(const int pageNumber, const int numberOfPages) | PagerControl | [private]
AppendEllipsisIconToNumberPanelList() | PagerControl | [private]
ButtonPanelAlwaysShowFirstLastPageIndex(bool value) | PagerControlProperties |
ButtonPanelAlwaysShowFirstLastPageIndex() | PagerControlProperties |
ButtonPanelAlwaysShowFirstLastPageIndexProperty() | PagerControlProperties | [inline, static]
CheckThread() | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
ClearProperties() | PagerControlProperties | [static]
ComboBoxSelectionChanged(const winrt::IInspectable &sender, const winrt::SelectionChangedEventArgs &args) | PagerControl | [private]
DeleteInstanceOnUIThread(std::unique_ptr< PagerControl > &&self) noexcept | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline, static]
DisplayMode(winrt::PagerControlDisplayMode const &value) | PagerControlProperties |
DisplayMode() | PagerControlProperties |
DisplayModeProperty() | PagerControlProperties | [inline, static]
EnsureProperties() | PagerControlProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
FillComboBoxCollectionToSize(const int numberOfPages) | PagerControl | [private]
final_release(std::unique_ptr< PagerControl > &&self) | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline, static]
FirstButtonClicked(const IInspectable &sender, const winrt::RoutedEventArgs &args) | PagerControl | [private]
FirstButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
FirstButtonCommand() | PagerControlProperties |
FirstButtonCommandProperty() | PagerControlProperties | [inline, static]
FirstButtonStyle(winrt::Style const &value) | PagerControlProperties |
FirstButtonStyle() | PagerControlProperties |
FirstButtonStyleProperty() | PagerControlProperties | [inline, static]
FirstButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
FirstButtonVisibility() | PagerControlProperties |
FirstButtonVisibilityProperty() | PagerControlProperties | [inline, static]
GetBase() | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
GetInner() | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
IsOnThread() | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
LastButtonClicked(const IInspectable &sender, const winrt::RoutedEventArgs &args) | PagerControl | [private]
LastButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
LastButtonCommand() | PagerControlProperties |
LastButtonCommandProperty() | PagerControlProperties | [inline, static]
LastButtonStyle(winrt::Style const &value) | PagerControlProperties |
LastButtonStyle() | PagerControlProperties |
LastButtonStyleProperty() | PagerControlProperties | [inline, static]
LastButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
LastButtonVisibility() | PagerControlProperties |
LastButtonVisibilityProperty() | PagerControlProperties | [inline, static]
m_lastNumberOfPagesCount | PagerControl | [private]
m_lastSelectedPageIndex | PagerControl | [private]
m_selectedIndexChangedEventSource | PagerControlProperties |
MoveIdentifierToElement(const int index) | PagerControl | [private]
NextButtonClicked(const IInspectable &sender, const winrt::RoutedEventArgs &args) | PagerControl | [private]
NextButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
NextButtonCommand() | PagerControlProperties |
NextButtonCommandProperty() | PagerControlProperties | [inline, static]
NextButtonStyle(winrt::Style const &value) | PagerControlProperties |
NextButtonStyle() | PagerControlProperties |
NextButtonStyleProperty() | PagerControlProperties | [inline, static]
NextButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
NextButtonVisibility() | PagerControlProperties |
NextButtonVisibilityProperty() | PagerControlProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
NumberBoxValueChanged(const winrt::IInspectable &sender, const winrt::NumberBoxValueChangedEventArgs &args) | PagerControl | [private]
NumberOfPages(int value) | PagerControlProperties |
NumberOfPages() | PagerControlProperties |
NumberOfPagesProperty() | PagerControlProperties | [inline, static]
OnApplyTemplate() | PagerControl |
OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnButtonVisibilityChanged(const winrt::PagerControlButtonVisibility visibility, const wstring_view visibleStateName, const wstring_view collapsedStateName, const wstring_view hiddenStateName, const int hiddenOnEdgePageCriteria) | PagerControl |
OnCreateAutomationPeer() | PagerControl |
OnDisplayModeChanged() | PagerControl |
OnDisplayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnFirstButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnFirstButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnFirstButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnLastButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnLastButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnLastButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNextButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNextButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNextButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNumberOfPagesChanged(const int oldValue) | PagerControl |
OnNumberOfPagesPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPagerInputCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPrefixTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPreviousButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPreviousButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPreviousButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | PagerControl |
OnRootGridKeyDown(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | PagerControl | [private]
OnSelectedPageIndexChange(const int oldValue) | PagerControl |
OnSelectedPageIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnSuffixTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
PagerControl() | PagerControl |
PagerControlProperties() | PagerControlProperties |
PagerInputCommand(winrt::ICommand const &value) | PagerControlProperties |
PagerInputCommand() | PagerControlProperties |
PagerInputCommandProperty() | PagerControlProperties | [inline, static]
PrefixText(winrt::hstring const &value) | PagerControlProperties |
PrefixText() | PagerControlProperties |
PrefixTextProperty() | PagerControlProperties | [inline, static]
PreviousButtonClicked(const IInspectable &sender, const winrt::RoutedEventArgs &args) | PagerControl | [private]
PreviousButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
PreviousButtonCommand() | PagerControlProperties |
PreviousButtonCommandProperty() | PagerControlProperties | [inline, static]
PreviousButtonStyle(winrt::Style const &value) | PagerControlProperties |
PreviousButtonStyle() | PagerControlProperties |
PreviousButtonStyleProperty() | PagerControlProperties | [inline, static]
PreviousButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
PreviousButtonVisibility() | PagerControlProperties |
PreviousButtonVisibilityProperty() | PagerControlProperties | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
RaiseSelectedIndexChanged() | PagerControl | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< PagerControl, winrt::implementation::PagerControlT > | [inline]
s_ButtonPanelAlwaysShowFirstLastPageIndexProperty | PagerControlProperties | [static]
s_DisplayModeProperty | PagerControlProperties | [static]
s_FirstButtonCommandProperty | PagerControlProperties | [static]
s_FirstButtonStyleProperty | PagerControlProperties | [static]
s_FirstButtonVisibilityProperty | PagerControlProperties | [static]
s_LastButtonCommandProperty | PagerControlProperties | [static]
s_LastButtonStyleProperty | PagerControlProperties | [static]
s_LastButtonVisibilityProperty | PagerControlProperties | [static]
s_NextButtonCommandProperty | PagerControlProperties | [static]
s_NextButtonStyleProperty | PagerControlProperties | [static]
s_NextButtonVisibilityProperty | PagerControlProperties | [static]
s_NumberOfPagesProperty | PagerControlProperties | [static]
s_PagerInputCommandProperty | PagerControlProperties | [static]
s_PrefixTextProperty | PagerControlProperties | [static]
s_PreviousButtonCommandProperty | PagerControlProperties | [static]
s_PreviousButtonStyleProperty | PagerControlProperties | [static]
s_PreviousButtonVisibilityProperty | PagerControlProperties | [static]
s_SelectedPageIndexProperty | PagerControlProperties | [static]
s_SuffixTextProperty | PagerControlProperties | [static]
s_TemplateSettingsProperty | PagerControlProperties | [static]
SelectedIndexChanged(winrt::TypedEventHandler< winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs > const &value) | PagerControlProperties |
SelectedIndexChanged(winrt::event_token const &token) | PagerControlProperties |
SelectedPageIndex(int value) | PagerControlProperties |
SelectedPageIndex() | PagerControlProperties |
SelectedPageIndexProperty() | PagerControlProperties | [inline, static]
SuffixText(winrt::hstring const &value) | PagerControlProperties |
SuffixText() | PagerControlProperties |
SuffixTextProperty() | PagerControlProperties | [inline, static]
TemplateSettings(winrt::PagerControlTemplateSettings const &value) | PagerControlProperties |
TemplateSettings() | PagerControlProperties |
TemplateSettingsProperty() | PagerControlProperties | [inline, static]
UpdateDisplayModeAutoState() | PagerControl |
UpdateNumberOfPanelCollectionInfiniteItems() | PagerControl | [private]
UpdateNumberPanel(const int numberOfPages) | PagerControl | [private]
UpdateNumberPanelCollectionAllItems(const int numberOfPages) | PagerControl | [private]
UpdateNumberPanelCollectionCenterWithEllipsis(const int numberOfPages, const int selectedIndex) | PagerControl | [private]
UpdateNumberPanelCollectionEndWithEllipsis(const int numberOfPages, const int selectedIndex) | PagerControl | [private]
UpdateNumberPanelCollectionStartWithEllipsis(const int numberOfPages, const int selectedIndex) | PagerControl | [private]
UpdateOnEdgeButtonVisualStates() | PagerControl | [private]
UpdateTemplateSettingElementLists() | PagerControl | [private]
~PagerControl() | PagerControl |
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/FocusBehaviorTests.cs Source File

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests

FocusBehaviorTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 using Common;
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using System.Threading.Tasks;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 using Microsoft.Windows.Apps.Test.Automation;
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.NavigationViewTests
00022 {
00023     [TestClass]
00024     public class FocusBehaviorTests : NavigationViewTestsBase
00025     {
00026         [ClassInitialize]
00027         [TestProperty("RunAs", "User")]
00028         [TestProperty("Classification", "Integration")]
00029         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00030         [TestProperty("MUXControlsTestEnabledForPhone", "True")]
00031         public static void ClassInitialize(TestContext testContext)
00032         {
00033             TestEnvironment.Initialize(testContext);
00034         }
00035
00036         [TestMethod]
00037         public void EnsureTopSettingsRetainsFocusAfterOrientationChanges()
00038         {
00039             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00040             {
00041                 var readSettingsSelectedButton = new Button(FindElement.ByName("ReadSettingsSelected"));
00042                 var SettingsSelectionStateTextBlock = new TextBlock(FindElement.ByName("SettingsSelectedState"));
00043
00044                 Log.Comment("Bring Settings into view.");
00045                 FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
00046                 Wait.ForIdle();
00047
00048                 var leftSettingsItem = new Button(FindElement.ByName("Settings"));
00049                 leftSettingsItem.Click();
00050
00051                 Log.Comment("Verify the left settings item is selected.");
00052                 readSettingsSelectedButton.Invoke();
00053                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
00054
00055                 Log.Comment("Flipping orientation: Left -> Top.");
00056                 var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
00057                 flipOrientationButton.Invoke();
00058                 Wait.ForIdle();
00059
00060                 Log.Comment("Verify the top settings item is selected.");
00061                 readSettingsSelectedButton.Invoke();
00062                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
00063
00064                 Log.Comment("Flipping orientation: Top -> Left.");
00065                 flipOrientationButton.Invoke();
00066                 Wait.ForIdle();
00067
00068                 Log.Comment("Verify the left settings item is still selected.");
00069                 readSettingsSelectedButton.Invoke();
00070                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
00071             }
00072         }
00073
00074         [TestMethod]
00075         public void VerifyFocusNotLostWhenTabbingWithBackButtonEnabled()
00076         {
00077             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView TopNav Test" }))
00078             {
00079                 CheckBox checkBox = new CheckBox(FindElement.ByName("BackButtonEnabledCheckbox"));
00080                 Log.Comment("Checking Back Enabled");
00081
00082                 checkBox.Check();
00083                 Wait.ForIdle();
00084
00085                 // Pick an item close to the end of the content and set focus on it.
00086                 CheckBox cancelClosingCheckbox = new CheckBox(FindElement.ById("CancelClosingEvents"));
00087                 cancelClosingCheckbox.SetFocus();
00088                 Wait.ForIdle();
00089
00090                 // Tab a number of times so that we get past the last item
00091                 // in the content.
00092                 for (int i = 0; i < 10; i++)
00093                 {
00094                     KeyboardHelper.PressKey(Key.Tab);
00095                     Wait.ForIdle();
00096                 }
00097
00098                 // Verify that we do not lose focus.
00099                 AutomationElement focusedElement = AutomationElement.FocusedElement;
00100                 Verify.IsNotNull(focusedElement);
00101             }
00102         }
00103
00104         [TestMethod]
00105         public void EnsureLeftSettingsRetainsFocusAfterOrientationChanges()
00106         {
00107             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00108             {
00109                 var readSettingsSelectedButton = new Button(FindElement.ByName("ReadSettingsSelected"));
00110                 var SettingsSelectionStateTextBlock = new TextBlock(FindElement.ByName("SettingsSelectedState"));
00111
00112                 Log.Comment("Flipping orientation: Left -> Top.");
00113                 var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
00114                 flipOrientationButton.Invoke();
00115                 Wait.ForIdle();
00116
00117                 var topSettingsItem = new Button(FindElement.ByName("Settings"));
00118                 topSettingsItem.Click();
00119
00120                 Log.Comment("Verify the top settings item is selected.");
00121                 readSettingsSelectedButton.Invoke();
00122                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
00123
00124                 Log.Comment("Flipping orientation: Top -> Left.");
00125                 flipOrientationButton.Invoke();
00126                 Wait.ForIdle();
00127
00128                 Log.Comment("Verify the left settings item is selected.");
00129                 readSettingsSelectedButton.Invoke();
00130                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
00131
00132                 Log.Comment("Flipping orientation: Left -> Top.");
00133                 flipOrientationButton.Invoke();
00134                 Wait.ForIdle();
00135
00136                 Log.Comment("Verify the left top item is still selected.");
00137                 readSettingsSelectedButton.Invoke();
00138                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
00139             }
00140         }
00141
00142         [TestMethod]
00143         public void HomeEndNavigationTest()
00144         {
00145             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00146             foreach (var testScenario in testScenarios)
00147             {
00148                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00149                 {
00150                     UIObject firstItem = FindElement.ByName("Home");
00151                     UIObject appsItem = FindElement.ByName("Apps");
00152                     UIObject lastItem = FindElement.ByName("HasChildItem");
00153
00154                     Log.Comment("Make sure something inside the ListView other than the first item has input focus");
00155                     appsItem.SetFocus();
00156                     Wait.ForIdle();
00157                     Verify.IsFalse(firstItem.HasKeyboardFocus);
00158
00159                     Log.Comment("Verify the Home key puts focus on the first menu item");
00160                     KeyboardHelper.PressKey(Key.Home);
00161                     Wait.ForIdle();
00162                     Verify.IsTrue(firstItem.HasKeyboardFocus);
00163
00164                     Log.Comment("Verify the End key puts focus on the last menu item");
00165                     KeyboardHelper.PressKey(Key.End);
00166                     Wait.ForIdle();
00167                     Verify.IsTrue(lastItem.HasKeyboardFocus);
00168                 }
00169             }
00170         }
00171
00172         [TestMethod]
00173         public void TabNavigationTest()
00174         {
00175             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00176             foreach (var testScenario in testScenarios)
00177             {
00178                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00179                 {
00180                     SetNavViewWidth(ControlWidth.Wide);
00181
00182                     Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
00183                     UIObject searchBox = FindElement.ByNameAndClassName("PaneAutoSuggestBox", "TextBox");
00184                     UIObject settingsItem = FindElement.ByName("Settings");
00185
00186                     VerifyTabNavigationWithoutMenuItemSelected();
00187                     VerifyTabNavigationWithMenuItemSelected();
00188
00189                     void VerifyTabNavigationWithoutMenuItemSelected()
00190                     {
00191                         Log.Comment("Verify Tab navigation without a selected menu item");
00192
00193                         // Clear any item selection
00194                         var clearSelectedItemButton = new Button(FindElement.ByName("ClearSelectedItemButton"));
00195                         clearSelectedItemButton.Click();
00196                         Wait.ForIdle();
00197
00198                         Verify.AreEqual("null", GetSelectedItem());
00199
00200                         UIObject firstMenuItem = FindElement.ByName("Home");
00201                         UIObject lastMenuItem = FindElement.ByName("HasChildItem");
00202
00203                         // Set focus on the pane's toggle button.
00204                         togglePaneButton.SetFocus();
00205                         Wait.ForIdle();
00206
00207                         Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to the search box");
00208                         KeyboardHelper.PressKey(Key.Tab);
00209                         Wait.ForIdle();
00210                         Verify.IsTrue(searchBox.HasKeyboardFocus);
00211
00212                         Log.Comment("Verify that pressing tab while the search box has focus moves to the first menu item");
00213                         KeyboardHelper.PressKey(Key.Tab);
00214                         Wait.ForIdle();
00215                         Verify.IsTrue(firstMenuItem.HasKeyboardFocus);
00216
00217                         Log.Comment("Verify that pressing tab thrice more will move focus to the settings item");
00218                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 3);
00219                         Wait.ForIdle();
00220                         Verify.IsTrue(settingsItem.HasKeyboardFocus);
00221
00222                         Log.Comment("Verify that pressing SHIFT+tab thrice will move focus to the last menu item");
00223                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 3);
00224                         Wait.ForIdle();
00225                         Verify.IsTrue(lastMenuItem.HasKeyboardFocus);
00226
00227                         Log.Comment("Verify that pressing SHIFT+tab will move focus to the search box");
00228                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00229                         Wait.ForIdle();
00230                         Verify.IsTrue(searchBox.HasKeyboardFocus);
00231
00232                         Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
00233                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00234                         Wait.ForIdle();
00235                         Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00236                     }
00237
00238                     void VerifyTabNavigationWithMenuItemSelected()
00239                     {
00240                         Log.Comment("Verify Tab navigation with a selected menu item");
00241
00242                         // Select a menu item (preferably not the first or last menu item)
00243                         UIObject thirdMenuItem = FindElement.ByName("Games");
00244
00245                         var selectedItemComboBox = new ComboBox(FindElement.ById("SelectedItemCombobox"));
00246                         selectedItemComboBox.SelectItemByName("Games");
00247                         Wait.ForIdle();
00248
00249                         Verify.IsTrue(Convert.ToBoolean(thirdMenuItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00250
00251                         // Set focus on the pane's toggle button.
00252                         togglePaneButton.SetFocus();
00253                         Wait.ForIdle();
00254
00255                         Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to the search box");
00256                         KeyboardHelper.PressKey(Key.Tab);
00257                         Wait.ForIdle();
00258                         Verify.IsTrue(searchBox.HasKeyboardFocus);
00259
00260                         Log.Comment("Verify that pressing tab while the search box has focus moves to the selected menu item");
00261                         KeyboardHelper.PressKey(Key.Tab);
00262                         Wait.ForIdle();
00263                         Verify.IsTrue(thirdMenuItem.HasKeyboardFocus);
00264
00265                         Log.Comment("Verify that pressing tab thrice more will move focus to the settings item");
00266                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 3);
00267                         Wait.ForIdle();
00268                         Verify.IsTrue(settingsItem.HasKeyboardFocus);
00269
00270                         Log.Comment("Verify that pressing SHIFT+tab thrice will move focus to the selected menu item");
00271                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 3);
00272                         Wait.ForIdle();
00273                         Verify.IsTrue(thirdMenuItem.HasKeyboardFocus);
00274
00275                         Log.Comment("Verify that pressing SHIFT+tab will move focus to the search box");
00276                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00277                         Wait.ForIdle();
00278                         Verify.IsTrue(searchBox.HasKeyboardFocus);
00279
00280                         Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
00281                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00282                         Wait.ForIdle();
00283                         Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00284                     }
00285                 }
00286
00287                 string GetSelectedItem()
00288                 {
00289                     return FindElement.ByName("SelectionChangedItemType").GetText();
00290                 }
00291             }
00292         }
00293
00294         [TestMethod]
00295         public void TabNavigationHierarchicalTest()
00296         {
00297             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00298             foreach (var testScenario in testScenarios)
00299             {
00300                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
00301                 {
00302                     Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
00303                     Button getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));
00304
00305                     Log.Comment("Deselect Menu Item 1");
00306                     UIObject menuItem1 = FindElement.ByName("Menu Item 1");
00307                     menuItem1.SetFocus();
00308                     AutomationElement menuItem1AE = AutomationElement.FocusedElement;
00309                     SelectionItemPattern menuItem1SIP = menuItem1AE.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;
00310                     menuItem1SIP.RemoveFromSelection();
00311
00312                     VerifyTabNavigationWithoutMenuItemSelected();
00313                     VerifyTabNavigationWithMenuItemSelected();
00314                     VerifyTabNavigationWithSettingsItemVisible();
00315
00316                     void VerifyTabNavigationWithoutMenuItemSelected()
00317                     {
00318                         Log.Comment("Verify Tab navigation without a selected menu item");
00319
00320                         getSelectItemButton.Invoke();
00321                         Wait.ForIdle();
00322
00323                         Verify.AreEqual("No Item Selected", GetSelectedItem());
00324
00325                         UIObject menuItem29 = FindElement.ByName("Menu Item 29 (Selectable)");
00326
00327                         // Set focus on the pane's toggle button.
00328                         togglePaneButton.SetFocus();
00329                         Wait.ForIdle();
00330
00331                         Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to Menu Item 1.");
00332                         KeyboardHelper.PressKey(Key.Tab);
00333                         Wait.ForIdle();
00334                         Verify.IsTrue(menuItem1.HasKeyboardFocus);
00335
00336                         Log.Comment("Verify that pressing tab while Menu Item 1 has focus moves to 'Get Selected Item Label' Button item");
00337                         KeyboardHelper.PressKey(Key.Tab);
00338                         Wait.ForIdle();
00339                         Verify.IsTrue(getSelectItemButton.HasKeyboardFocus);
00340
00341                         Log.Comment("Verify that pressing SHIFT+tab will move focus to Menu Item 29");
00342                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00343                         Wait.ForIdle();
00344                         Verify.IsTrue(menuItem29.HasKeyboardFocus);
00345
00346                         Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
00347                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00348                         Wait.ForIdle();
00349                         Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00350                     }
00351
00352                     void VerifyTabNavigationWithMenuItemSelected()
00353                     {
00354                         Log.Comment("Verify Tab navigation with a selected menu item");
00355
00356                         Log.Comment("Expand Menu Item 15.");
00357                         UIObject menuItem15 = FindElement.ByName("Menu Item 15");
00358                         InputHelper.LeftClick(menuItem15);
00359
00360                         Log.Comment("Select Menu Item 16.");
00361                         UIObject menuItem16 = FindElement.ByName("Menu Item 16");
00362                         InputHelper.LeftClick(menuItem16);
00363
00364                         getSelectItemButton.Invoke();
00365                         Wait.ForIdle();
00366
00367                         Verify.AreEqual("Menu Item 16", GetSelectedItem());
00368
00369                         // Set focus on the pane's toggle button.
00370                         togglePaneButton.SetFocus();
00371                         Wait.ForIdle();
00372
00373                         Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to Menu Item 16.");
00374                         KeyboardHelper.PressKey(Key.Tab);
00375                         Wait.ForIdle();
00376                         Verify.IsTrue(menuItem16.HasKeyboardFocus);
00377
00378                         Log.Comment("Verify that pressing tab while Menu Item 16 has focus moves to 'Get Selected Item Label' Button item");
00379                         KeyboardHelper.PressKey(Key.Tab);
00380                         Wait.ForIdle();
00381                         Verify.IsTrue(getSelectItemButton.HasKeyboardFocus);
00382
00383                         Log.Comment("Verify that pressing SHIFT+tab will move focus to Menu Item 16");
00384                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00385                         Wait.ForIdle();
00386                         Verify.IsTrue(menuItem16.HasKeyboardFocus);
00387
00388                         Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
00389                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00390                         Wait.ForIdle();
00391                         Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00392
00393                         Log.Comment("Verify that pressing tab from parent of item will move focus to 'Get Selected Item Label' Button item");
00394                         KeyboardHelper.PressKey(Key.Down, ModifierKey.None, 3);
00395                         Wait.ForIdle();
00396                         Verify.IsTrue(menuItem15.HasKeyboardFocus);
00397
00398                         KeyboardHelper.PressKey(Key.Tab);
00399                         Wait.ForIdle();
00400                         Verify.IsTrue(getSelectItemButton.HasKeyboardFocus);
00401                     }
00402
00403                     void VerifyTabNavigationWithSettingsItemVisible()
00404                     {
00405                         Log.Comment("Verify tab navigation with settings item visible.");
00406
00407                         Log.Comment("Check IsSettingsVisible");
00408                         CheckBox checkBoxIsSettingsVisible = FindElement.ByName<CheckBox>("Settings Item Visibility");
00409                         checkBoxIsSettingsVisible.Check();
00410                         Wait.ForIdle();
00411
00412                         UIObject settingsItem = FindElement.ByName("Settings");
00413
00414                         getSelectItemButton.Invoke();
00415                         Wait.ForIdle();
00416
00417                         Verify.AreEqual("Menu Item 16", GetSelectedItem());
00418
00419                         UIObject menuItem16 = FindElement.ByName("Menu Item 16");
00420
00421                         // Set focus on the pane's toggle button.
00422                         togglePaneButton.SetFocus();
00423                         Wait.ForIdle();
00424
00425                         Log.Comment("Verify that pressing tab while TogglePaneButton has focus moves to Menu Item 16.");
00426                         KeyboardHelper.PressKey(Key.Tab);
00427                         Wait.ForIdle();
00428                         Verify.IsTrue(menuItem16.HasKeyboardFocus);
00429
00430                         Log.Comment("Verify that pressing tab while Menu Item 16 has focus moves to Settings item");
00431                         KeyboardHelper.PressKey(Key.Tab);
00432                         Wait.ForIdle();
00433                         Verify.IsTrue(settingsItem.HasKeyboardFocus);
00434
00435                         Log.Comment("Verify that pressing SHIFT+tab will move focus to Menu Item 16");
00436                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00437                         Wait.ForIdle();
00438                         Verify.IsTrue(menuItem16.HasKeyboardFocus);
00439
00440                         Log.Comment("Verify that pressing SHIFT+tab will move focus to the TogglePaneButton");
00441                         KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00442                         Wait.ForIdle();
00443                         Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00444                     }
00445                 }
00446
00447                 string GetSelectedItem()
00448                 {
00449                     return new TextBlock(FindElement.ByName("SelectedItemLabel")).DocumentText;
00450                 }
00451             }
00452         }
00453
00454         [TestMethod]
00455         public void CanDoSelectionChangedOfItemTemplate()
00456         {
00457             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView ItemTemplate Test" }))
00458             {
00459                 // Set focus inside page
00460                 var focusButton = FindElement.ByName("FocusAnchorButton");
00461                 focusButton.SetFocus();
00462
00463                 // Navigate to NavView
00464                 KeyboardHelper.PressKey(Key.Tab);
00465                 // Select the first item.
00466                 KeyboardHelper.PressKey(Key.Space);
00467
00468                 Log.Comment("Verify correct items have been passed to selection event");
00469                 var selectedItem = FindElement.ByName("SelectionEventResult");
00470                 Verify.AreEqual("Passed", selectedItem.GetText());
00471                 // Go to the second item.
00472                 KeyboardHelper.PressKey(Key.Right);
00473                 // Select the second item.
00474                 KeyboardHelper.PressKey(Key.Space);
00475                 Log.Comment("Verify correct items have been passed to selection event");
00476                 Verify.AreEqual("Passed", selectedItem.GetText());
00477             }
00478         }
00479
00480         [TestMethod]
00481         public void ArrowKeyNavigationTest()
00482         {
00483             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00484             foreach (var testScenario in testScenarios)
00485             {
00486                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00487                 {
00488                     SetNavViewWidth(ControlWidth.Wide);
00489
00490                     // Clear any item selection
00491                     var clearSelectedItemButton = new Button(FindElement.ByName("ClearSelectedItemButton"));
00492                     clearSelectedItemButton.Click();
00493                     Wait.ForIdle();
00494
00495                     Verify.AreEqual("null", GetSelectedItem());
00496
00497                     Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
00498                     togglePaneButton.SetFocus();
00499                     Wait.ForIdle();
00500
00501                     // Grab references to all the menu items in the test UI
00502                     UIObject searchBox = FindElement.ByNameAndClassName("PaneAutoSuggestBox", "TextBox");
00503                     UIObject item1 = FindElement.ByName("Home");
00504                     UIObject item2 = FindElement.ByName("Apps");
00505                     UIObject item3 = FindElement.ByName("Games");
00506                     UIObject item4 = FindElement.ByName("Music");
00507                     UIObject item5 = FindElement.ByName("Movies");
00508                     UIObject item6 = FindElement.ByName("TV");
00509                     UIObject item7 = FindElement.ByName("Volume");
00510                     UIObject item8 = FindElement.ByName("Integer");
00511                     UIObject item9 = FindElement.ByName("AcceptItem");
00512                     UIObject item10 = FindElement.ByName("HasChildItem");
00513                     UIObject settingsItem = FindElement.ByName("Settings");
00514
00515                     Log.Comment("Verify that tab from the TogglePaneButton goes to the search box");
00516                     KeyboardHelper.PressKey(Key.Tab);
00517                     Wait.ForIdle();
00518                     Verify.IsTrue(searchBox.HasKeyboardFocus);
00519
00520                     Log.Comment("Verify that tab from search box goes to the first item");
00521                     KeyboardHelper.PressKey(Key.Tab);
00522                     Wait.ForIdle();
00523                     Verify.IsTrue(item1.HasKeyboardFocus);
00524
00525                     Log.Comment("Verify that down arrow can navigate through all items");
00526                     KeyboardHelper.PressKey(Key.Down);
00527                     Wait.ForIdle();
00528                     Verify.IsTrue(item2.HasKeyboardFocus);
00529
00530                     KeyboardHelper.PressKey(Key.Down);
00531                     Wait.ForIdle();
00532                     Verify.IsTrue(item3.HasKeyboardFocus);
00533
00534                     KeyboardHelper.PressKey(Key.Down);
00535                     Wait.ForIdle();
00536                     Verify.IsTrue(item4.HasKeyboardFocus);
00537
00538                     KeyboardHelper.PressKey(Key.Down);
00539                     Wait.ForIdle();
00540                     Verify.IsTrue(item5.HasKeyboardFocus);
00541
00542                     KeyboardHelper.PressKey(Key.Down);
00543                     Wait.ForIdle();
00544                     Verify.IsTrue(item6.HasKeyboardFocus);
00545
00546                     KeyboardHelper.PressKey(Key.Down);
00547                     Wait.ForIdle();
00548                     Verify.IsTrue(item7.HasKeyboardFocus);
00549
00550                     KeyboardHelper.PressKey(Key.Down);
00551                     Wait.ForIdle();
00552                     Verify.IsTrue(item8.HasKeyboardFocus);
00553
00554                     KeyboardHelper.PressKey(Key.Down);
00555                     Wait.ForIdle();
00556                     Verify.IsTrue(item9.HasKeyboardFocus);
00557
00558                     KeyboardHelper.PressKey(Key.Down);
00559                     Wait.ForIdle();
00560                     Verify.IsTrue(item10.HasKeyboardFocus);
00561
00562                     Log.Comment("Verify that tab thrice from the last menu item goes to the settings item");
00563                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 3);
00564                     Wait.ForIdle();
00565                     Verify.IsTrue(settingsItem.HasKeyboardFocus);
00566
00567                     Log.Comment("Verify that shift+tab thrice from the settings item goes to the last menu item");
00568                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 3);
00569                     Wait.ForIdle();
00570                     Verify.IsTrue(item10.HasKeyboardFocus);
00571
00572                     Log.Comment("Verify that up arrow can navigate through all items");
00573                     KeyboardHelper.PressKey(Key.Up);
00574                     Wait.ForIdle();
00575                     Verify.IsTrue(item9.HasKeyboardFocus);
00576
00577                     KeyboardHelper.PressKey(Key.Up);
00578                     Wait.ForIdle();
00579                     Verify.IsTrue(item8.HasKeyboardFocus);
00580
00581                     KeyboardHelper.PressKey(Key.Up);
00582                     Wait.ForIdle();
00583                     Verify.IsTrue(item7.HasKeyboardFocus);
00584
00585                     KeyboardHelper.PressKey(Key.Up);
00586                     Wait.ForIdle();
00587                     Verify.IsTrue(item6.HasKeyboardFocus);
00588
00589                     KeyboardHelper.PressKey(Key.Up);
00590                     Wait.ForIdle();
00591                     Verify.IsTrue(item5.HasKeyboardFocus);
00592
00593                     KeyboardHelper.PressKey(Key.Up);
00594                     Wait.ForIdle();
00595                     Verify.IsTrue(item4.HasKeyboardFocus);
00596
00597                     KeyboardHelper.PressKey(Key.Up);
00598                     Wait.ForIdle();
00599                     Verify.IsTrue(item3.HasKeyboardFocus);
00600
00601                     KeyboardHelper.PressKey(Key.Up);
00602                     Wait.ForIdle();
00603                     Verify.IsTrue(item2.HasKeyboardFocus);
00604
00605                     KeyboardHelper.PressKey(Key.Up);
00606                     Wait.ForIdle();
00607                     Verify.IsTrue(item1.HasKeyboardFocus);
00608
00609                     Log.Comment("Verify that shift+tab from the first menu item goes to the search box");
00610                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);
00611                     Wait.ForIdle();
00612                     Verify.IsTrue(searchBox.HasKeyboardFocus);
00613
00614                     Log.Comment("Verify that shift+tab from the search box goes to the TogglePaneButton");
00615                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);
00616                     Wait.ForIdle();
00617                     Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00618                 }
00619
00620                 string GetSelectedItem()
00621                 {
00622                     return FindElement.ByName("SelectionChangedItemType").GetText();
00623                 }
00624             }
00625         }
00626
00627         [TestMethod]
00628         public void ArrowKeyHierarchicalNavigationTest()
00629         {
00630             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
00631             {
00632                 // Set up tree and get references to all required elements
00633                 UIObject item1 = FindElement.ByName("Menu Item 1");
00634
00635                 Log.Comment("Expand Menu Item 1");
00636                 InputHelper.LeftClick(item1);
00637                 Wait.ForIdle();
00638
00639                 UIObject item2 = FindElement.ByName("Menu Item 2");
00640                 UIObject item3 = FindElement.ByName("Menu Item 3");
00641
00642                 Log.Comment("Expand Menu Item 2");
00643                 InputHelper.LeftClick(item2);
00644                 Wait.ForIdle();
00645
00646                 UIObject item4 = FindElement.ByName("Menu Item 4");
00647                 UIObject item5 = FindElement.ByName("Menu Item 5");
00648
00649                 // Set up initial focus
00650                 Log.Comment("Set focus on the pane toggle button");
00651                 Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
00652                 togglePaneButton.SetFocus();
00653                 Wait.ForIdle();
00654
00655                 // Start down arrow key navigation test
00656
00657                 Log.Comment("Verify that down arrow navigates to Menu Item 1");
00658                 KeyboardHelper.PressKey(Key.Down);
00659                 Wait.ForIdle();
00660                 Verify.IsTrue(item1.HasKeyboardFocus);
00661
00662                 Log.Comment("Verify that down arrow navigates to Menu Item 2");
00663                 KeyboardHelper.PressKey(Key.Down);
00664                 Wait.ForIdle();
00665                 Verify.IsTrue(item2.HasKeyboardFocus);
00666
00667                 Log.Comment("Verify that down arrow navigates to Menu Item 4");
00668                 KeyboardHelper.PressKey(Key.Down);
00669                 Wait.ForIdle();
00670                 Verify.IsTrue(item4.HasKeyboardFocus);
00671
00672                 Log.Comment("Verify that down arrow navigates to Menu Item 5");
00673                 KeyboardHelper.PressKey(Key.Down);
00674                 Wait.ForIdle();
00675                 Verify.IsTrue(item5.HasKeyboardFocus);
00676
00677                 Log.Comment("Verify that down arrow navigates to Menu Item 3");
00678                 KeyboardHelper.PressKey(Key.Down);
00679                 Wait.ForIdle();
00680                 Verify.IsTrue(item3.HasKeyboardFocus);
00681
00682                 // Start up arrow key navigation test
00683
00684                 Log.Comment("Verify that up arrow navigates to Menu Item 5");
00685                 KeyboardHelper.PressKey(Key.Up);
00686                 Wait.ForIdle();
00687                 Verify.IsTrue(item5.HasKeyboardFocus);
00688
00689                 Log.Comment("Verify that up arrow navigates to Menu Item 4");
00690                 KeyboardHelper.PressKey(Key.Up);
00691                 Wait.ForIdle();
00692                 Verify.IsTrue(item4.HasKeyboardFocus);
00693
00694                 Log.Comment("Verify that up arrow navigates to Menu Item 2");
00695                 KeyboardHelper.PressKey(Key.Up);
00696                 Wait.ForIdle();
00697                 Verify.IsTrue(item2.HasKeyboardFocus);
00698
00699                 Log.Comment("Verify that up arrow navigates to Menu Item 1");
00700                 KeyboardHelper.PressKey(Key.Up);
00701                 Wait.ForIdle();
00702                 Verify.IsTrue(item1.HasKeyboardFocus);
00703
00704                 Log.Comment("Verify that up arrow navigates to the pane toggle button");
00705                 KeyboardHelper.PressKey(Key.Up);
00706                 Wait.ForIdle();
00707                 Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00708
00709             }
00710         }
00711
00712         [TestMethod]
00713         public void VerifyShoulderNavigationEnabledAlwaysIsConsistent()
00714         {
00715             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00716             {
00717                 var navView = FindElement.ByName("NavView");
00718                 var shoulderNavigationEnabled = new ComboBox(FindElement.ByName("ShoulderNavigationEnabledSetter"));
00719                 var selectionFollowsFocusComboBox = new ComboBox(FindElement.ByName("SelectionFollowsFocusSetter"));
00720
00721                 Log.Comment("Set ShoulderNavigation to always");
00722                 shoulderNavigationEnabled.SelectItemByName("ShoulderNavigationEnabledAlways");
00723
00724                 Log.Comment("Set SelectionFollowsFocus to enabled");
00725                 selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusEnabled");
00726
00727                 Log.Comment("Select first item");
00728                 FindElement.ByName("Home").Click();
00729                 Wait.ForIdle();
00730                 Verify.AreEqual("Home", GetSelectedItem());
00731
00732                 GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);
00733                 Wait.ForIdle();
00734                 Verify.AreEqual("Apps", GetSelectedItem());
00735
00736                 Log.Comment("Set SelectionFollowsFocus to disabled");
00737                 selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusDisabled");
00738                 Wait.ForIdle();
00739
00740                 GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);
00741
00742                 Wait.ForIdle();
00743                 Verify.AreEqual("Games", GetSelectedItem());
00744             }
00745
00746             string GetSelectedItem()
00747             {
00748                 return FindElement.ByName("SelectionChangedResult").GetText();
00749             }
00750         }
00751
00752         [TestMethod]
00753         public void VerifyShoulderNavigationEnabledOnlySelectionFollowsFocusIsCorrect()
00754         {
00755             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00756             {
00757                 var navView = FindElement.ByName("NavView");
00758                 var shoulderNavigationEnabled = new ComboBox(FindElement.ByName("ShoulderNavigationEnabledSetter"));
00759                 var selectionFollowsFocusComboBox = new ComboBox(FindElement.ByName("SelectionFollowsFocusSetter"));
00760
00761                 Log.Comment("Set ShoulderNavigation to always");
00762                 shoulderNavigationEnabled.SelectItemByName("ShoulderNavigationEnabledWhenSelectionFollowsFocus");
00763
00764                 Log.Comment("Set SelectionFollowsFocus to enabled");
00765                 selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusEnabled");
00766
00767                 Log.Comment("Select first item");
00768                 FindElement.ByName("Home").Click();
00769                 Wait.ForIdle();
00770                 Verify.AreEqual("Home", GetSelectedItem());
00771
00772                 GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);
00773                 Wait.ForIdle();
00774                 Verify.AreEqual("Apps", GetSelectedItem());
00775
00776                 Log.Comment("Set SelectionFollowsFocus to disabled");
00777                 selectionFollowsFocusComboBox.SelectItemByName("SelectionFollowsFocusDisabled");
00778                 Wait.ForIdle();
00779
00780                 GamepadHelper.PressButton(navView, GamepadButton.RightShoulder);
00781
00782                 Wait.ForIdle();
00783                 Verify.AreEqual("Apps", GetSelectedItem());
00784             }
00785
00786             string GetSelectedItem()
00787             {
00788                 return FindElement.ByName("SelectionChangedResult").GetText();
00789             }
00790         }
00791     }
00792 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/InteractionTests/TreeViewTests.cs Source File

  • File List
  • File Members
  • TreeView
  • InteractionTests

TreeViewTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00008
00009 using WEX.TestExecution;
00010 using WEX.TestExecution.Markup;
00011 using WEX.Logging.Interop;
00012
00013 using Microsoft.Windows.Apps.Test.Automation;
00014 using Microsoft.Windows.Apps.Test.Foundation;
00015 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00016 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00017 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00018
00019 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00020 {
00021     [TestClass]
00022     public class TreeViewTests
00023     {
00024         [ClassInitialize]
00025         [TestProperty("RunAs", "User")]
00026         [TestProperty("Classification", "Integration")]
00027         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00028         [TestProperty("TestSuite", "A")]
00029         [TestProperty("Ignore", "True")] // TODO 29556921: Disabled after converting MUXControlsTestApp to a desktop .NET 5 app.  Re-enable when fixed.
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         [TestCleanup]
00036         public void TestCleanup()
00037         {
00038             TestCleanupHelper.Cleanup();
00039         }
00040
00041         private bool IsPhoneDevice()
00042         {
00043             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00044             {
00045                 Log.Warning("Test is disabled on phone (bug #11244792/11318650).");
00046                 return true;
00047             }
00048
00049             return false;
00050         }
00051
00052         private void SetContentMode(bool isContentMode)
00053         {
00054             if(isContentMode)
00055             {
00056                 ClickButton("SetContentMode");
00057             }
00058         }
00059
00060         private void ExpandCollapseTest(bool isContentMode = false)
00061         {
00062             if (IsPhoneDevice())
00063             {
00064                 return;
00065             }
00066
00067             using (var setup = new TestSetupHelper("TreeView Tests"))
00068             {
00069                 SetContentMode(isContentMode);
00070
00071                 UIObject itemRoot = LabelFirstItem();
00072
00073                 ClickButton("GetItemCount");
00074                 Verify.AreEqual("1", ReadResult());
00075
00076                 InputHelper.Tap(itemRoot);
00077
00078                 // Should be expanded now
00079                 ClickButton("GetItemCount");
00080                 Verify.AreEqual("4", ReadResult());
00081
00082                 ClickButton("AddSecondLevelOfNodes");
00083                 ClickButton("LabelItems");
00084
00085                 var root0 = FindElement.ById("Root.0");
00086                 InputHelper.Tap(root0);
00087                 ClickButton("GetItemCount");
00088                 Verify.AreEqual("5", ReadResult());
00089
00090                 InputHelper.Tap(itemRoot);
00091                 ClickButton("GetItemCount");
00092                 Verify.AreEqual("1", ReadResult());
00093
00094                 InputHelper.Tap(itemRoot);
00095                 ClickButton("GetItemCount");
00096                 Verify.AreEqual("5", ReadResult());
00097
00098                 var root1 = FindElement.ById("Root.1");
00099                 InputHelper.Tap(root1);
00100                 ClickButton("GetItemCount");
00101                 Verify.AreEqual("8", ReadResult());
00102
00103                 // Collapse and expand
00104                 InputHelper.Tap(itemRoot);
00105                 InputHelper.Tap(itemRoot);
00106                 ClickButton("GetItemCount");
00107                 Verify.AreEqual("8", ReadResult());
00108             }
00109         }
00110
00111         [TestMethod]
00112         [TestProperty("TestSuite", "A")]
00113         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00114         public void ExpandCollapseTest_NodeMode()
00115         {
00116            ExpandCollapseTest();
00117         }
00118
00119         [TestMethod]
00120         [TestProperty("TestSuite", "A")]
00121         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00122         public void ExpandCollapseTest_ContentMode()
00123         {
00124            ExpandCollapseTest(isContentMode:true);
00125         }
00126
00127         private void ExpandCollapseViaAutomationTest(bool isContentMode = false)
00128         {
00129             if (IsPhoneDevice())
00130             {
00131                 return;
00132             }
00133
00134             using (var setup = new TestSetupHelper("TreeView Tests"))
00135             {
00136                 SetContentMode(isContentMode);
00137
00138                 UIObject itemRoot = LabelFirstItem();
00139
00140                 ClickButton("GetItemCount");
00141                 Verify.AreEqual("1", ReadResult());
00142
00143                 Log.Comment("Expand using UIA ExpandCollapse pattern");
00144                 var expandCollapseImplementation = new ExpandCollapseImplementation(itemRoot);
00145                 var expandWaiter = expandCollapseImplementation.GetExpandedWaiter();
00146                 expandCollapseImplementation.Expand();
00147                 expandWaiter.Wait(2000);
00148
00149                 // Should be expanded now
00150                 ClickButton("GetItemCount");
00151                 Verify.AreEqual("4", ReadResult());
00152
00153                 Log.Comment("Collapse using UIA ExpandCollapse pattern");
00154                 var collapseWaiter = expandCollapseImplementation.GetCollapsedWaiter();
00155                 expandCollapseImplementation.Collapse();
00156                 collapseWaiter.Wait(2000);
00157
00158                 // Should be collapsed now
00159                 ClickButton("GetItemCount");
00160                 Verify.AreEqual("1", ReadResult());
00161
00162                 Log.Comment("Expand using UIA Invoke Pattern");
00163                 var invokeImplementation = new InvokeImplementation(itemRoot);
00164                 expandWaiter.Reset();
00165                 invokeImplementation.Invoke();
00166                 expandWaiter.Wait(2000);
00167
00168                 // Should be expanded now
00169                 ClickButton("GetItemCount");
00170                 Verify.AreEqual("4", ReadResult());
00171
00172                 Log.Comment("Collapse using UIA Invoke Pattern");
00173                 collapseWaiter.Reset();
00174                 invokeImplementation.Invoke();
00175                 collapseWaiter.Wait(2000);
00176
00177                 // Should be collapsed now
00178                 ClickButton("GetItemCount");
00179                 Verify.AreEqual("1", ReadResult());
00180             }
00181         }
00182
00183         [TestMethod]
00184         [TestProperty("TestSuite", "A")]
00185         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00186         public void ExpandCollapseViaAutomationTest_NodeMode()
00187         {
00188             ExpandCollapseViaAutomationTest();
00189         }
00190
00191         [TestMethod]
00192         [TestProperty("TestSuite", "A")]
00193         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00194         public void ExpandCollapseViaAutomationTest_ContentMode()
00195         {
00196             ExpandCollapseViaAutomationTest(isContentMode:true);
00197         }
00198
00199         private void TreeViewItemClickTest(bool isContentMode = false)
00200         {
00201             if (IsPhoneDevice())
00202             {
00203                 return;
00204             }
00205
00206             using (var setup = new TestSetupHelper("TreeView Tests"))
00207             {
00208                 SetContentMode(isContentMode);
00209
00210                 UIObject ItemRoot = LabelFirstItem();
00211
00212                 ClickButton("GetItemCount");
00213                 Verify.AreEqual("1", ReadResult());
00214
00215                 InputHelper.Tap(ItemRoot);
00216
00217                 // Should be expanded now
00218                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00219             }
00220         }
00221
00222         [TestMethod]
00223         [TestProperty("TestSuite", "A")]
00224         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00225         public void TreeViewItemClickTest_NodeMode()
00226         {
00227             TreeViewItemClickTest();
00228         }
00229
00230         [TestMethod]
00231         [TestProperty("TestSuite", "A")]
00232         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00233         public void TreeViewItemClickTest_ContentMode()
00234         {
00235             TreeViewItemClickTest(isContentMode:true);
00236         }
00237
00238         [TestMethod]
00239         [TestProperty("TestSuite", "A")]
00240         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00241         public void FlyoutTreeViewItemClickTest()
00242         {
00243             using (var setup = new TestSetupHelper("TreeView Tests"))
00244             {
00245                 if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00246                 {
00247                     Log.Warning("Test is disabled on phone (bug #11244792).");
00248                     return;
00249                 }
00250
00251                 // click button to popup flyout treeview
00252                 ClickButton("TreeViewInFlyout");
00253
00254                 // expand tree
00255                 TapOnFlyoutTreeViewRootItemChevron();
00256
00257                 ClickButton("GetFlyoutItemCount");
00258                 Verify.AreEqual("4", ReadResult());
00259
00260                 // click button to hide flyout treeview
00261                 ClickButton("TreeViewInFlyout");
00262
00263                 // click button to popup flyout treeview again
00264                 ClickButton("TreeViewInFlyout");
00265
00266                 //Expand once more
00267                 TapOnFlyoutTreeViewRootItemChevron();
00268                 ClickButton("GetFlyoutItemCount");
00269                 Verify.AreEqual("4", ReadResult());
00270             }
00271         }
00272
00273         [TestMethod]
00274         [TestProperty("TestSuite", "A")]
00275         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00276         // Regression test for bug 15801893
00277         public void FlyoutTreeViewItemTabTest()
00278         {
00279             using (var setup = new TestSetupHelper("TreeView Tests"))
00280             {
00281                 if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00282                 {
00283                     Log.Warning("Test is disabled on phone (bug #11244792).");
00284                     return;
00285                 }
00286
00287                 // click button to popup flyout treeview
00288                 ClickButton("TreeViewInFlyout");
00289
00290                 // Give a little bit of time for the
00291                 // flyout to show up.
00292                 Wait.ForIdle();
00293
00294                 // expand tree
00295                 TapOnFlyoutTreeViewRootItemChevron();
00296
00297                 // collapse and dismiss
00298                 KeyboardHelper.PressKey(Key.Left);
00299                 KeyboardHelper.PressKey(Key.Escape);
00300
00301                 // click button to popup flyout treeview
00302                 ClickButton("TreeViewInFlyout");
00303
00304                 // Give a little bit of time for the
00305                 // flyout to show up.
00306                 Wait.ForIdle();
00307
00308                 // expand tree
00309                 TapOnFlyoutTreeViewRootItemChevron();
00310
00311                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift);
00312
00313                 // Verify that app did not crash.
00314                 ClickButton("GetFlyoutItemCount");
00315                 Verify.AreEqual("4", ReadResult());
00316             }
00317         }
00318
00319         private void TreeViewKeyDownLeftToRightTest(bool isContentMode = false)
00320         {
00321             if (IsPhoneDevice())
00322             {
00323                 return;
00324             }
00325
00326             using (var setup = new TestSetupHelper("TreeView Tests"))
00327             {
00328                 SetContentMode(isContentMode);
00329
00330                 UIObject ItemRoot = LabelFirstItem();
00331
00332                 ClickButton("DisableClickToExpand");
00333                 ClickButton("GetItemCount");
00334                 Verify.AreEqual("1", ReadResult());
00335
00336                 InputHelper.Tap(ItemRoot);
00337
00338                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00339
00340                 ClickButton("GetItemCount");
00341                 Verify.AreEqual("1", ReadResult());
00342
00343                 InputHelper.Tap(ItemRoot);
00344
00345                 KeyboardHelper.PressKey(Key.Right);
00346
00347                 ClickButton("GetItemCount");
00348                 Log.Comment("Verify that ItemRoot has expanded.");
00349                 Verify.AreEqual("4", ReadResult());
00350
00351                 InputHelper.Tap(ItemRoot);
00352
00353                 KeyboardHelper.PressKey(Key.Right);
00354                 KeyboardHelper.PressKey(Key.Enter);
00355                 Log.Comment("Verify that we are on first child.");
00356                 Verify.AreEqual("ItemClicked:Root.0", ReadResult());
00357
00358                 KeyboardHelper.PressKey(Key.Left);
00359                 KeyboardHelper.PressKey(Key.Enter);
00360                 Log.Comment("Verify that we are on Root.");
00361                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00362
00363                 KeyboardHelper.PressKey(Key.Left);
00364
00365                 Log.Comment("Verify that ItemRoot has collapsed.");
00366                 ClickButton("GetItemCount");
00367                 Verify.AreEqual("1", ReadResult());
00368
00369                 // Validate Gamepad left/right dpad
00370                 ItemRoot.SetFocus();
00371                 GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadRight);
00372                 Log.Comment("Verify that ItemRoot has expanded.");
00373                 ClickButton("GetItemCount");
00374                 Verify.AreEqual("4", ReadResult());
00375
00376                 ItemRoot.SetFocus();
00377                 GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadLeft);
00378                 Log.Comment("Verify that ItemRoot has collapsed.");
00379                 ClickButton("GetItemCount");
00380                 Verify.AreEqual("1", ReadResult());
00381
00382                 // Validate Gamepad left/right on left thumbstick
00383                 ItemRoot.SetFocus();
00384                 GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickRight);
00385                 Log.Comment("Verify that ItemRoot has expanded.");
00386                 ClickButton("GetItemCount");
00387                 Verify.AreEqual("4", ReadResult());
00388
00389                 ItemRoot.SetFocus();
00390                 GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickLeft);
00391                 Log.Comment("Verify that ItemRoot has collapsed.");
00392                 ClickButton("GetItemCount");
00393                 Verify.AreEqual("1", ReadResult());
00394             }
00395         }
00396
00397         [TestMethod]
00398         [TestProperty("TestSuite", "A")]
00399         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00400         public void TreeViewKeyDownLeftToRightTest_NodeMode()
00401         {
00402             TreeViewKeyDownLeftToRightTest();
00403         }
00404
00405         [TestMethod]
00406         [TestProperty("TestSuite", "A")]
00407         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00408         public void TreeViewKeyDownLeftToRightTest_ContentMode()
00409         {
00410             TreeViewKeyDownLeftToRightTest(isContentMode: true);
00411         }
00412
00413         private void TreeViewKeyDownRightToLeftTest(bool isContentMode = false)
00414         {
00415             if (IsPhoneDevice())
00416             {
00417                 return;
00418             }
00419
00420             using (var setup = new TestSetupHelper("TreeView Tests"))
00421             {
00422                 SetContentMode(isContentMode);
00423
00424                 ClickButton("ChangeFlowDirection");
00425                 ClickButton("DisableClickToExpand");
00426                 ClickButton("GetItemCount");
00427                 Verify.AreEqual("1", ReadResult());
00428
00429                 UIObject ItemRoot = LabelFirstItem();
00430
00431                 InputHelper.Tap(ItemRoot);
00432
00433                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00434                 ClickButton("GetItemCount");
00435                 Verify.AreEqual("1", ReadResult());
00436
00437                 InputHelper.Tap(ItemRoot);
00438
00439                 KeyboardHelper.PressKey(Key.Left);
00440                 ClickButton("GetItemCount");
00441                 Log.Comment("Verify that ItemRoot has expanded.");
00442                 Verify.AreEqual("4", ReadResult());
00443
00444                 InputHelper.Tap(ItemRoot);
00445
00446                 KeyboardHelper.PressKey(Key.Left);
00447                 KeyboardHelper.PressKey(Key.Enter);
00448                 Log.Comment("Verify that we are on first child.");
00449                 Verify.AreEqual("ItemClicked:Root.0", ReadResult());
00450
00451                 KeyboardHelper.PressKey(Key.Right);
00452                 KeyboardHelper.PressKey(Key.Enter);
00453                 Log.Comment("Verify that we are on Root.");
00454                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00455
00456                 KeyboardHelper.PressKey(Key.Right);
00457
00458                 Log.Comment("Verify that ItemRoot has collapsed.");
00459                 ClickButton("GetItemCount");
00460                 Verify.AreEqual("1", ReadResult());
00461
00462                 // Validate Gamepad left/right
00463                 ItemRoot.SetFocus();
00464                 GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadLeft);
00465                 Log.Comment("Verify that ItemRoot has expanded.");
00466                 ClickButton("GetItemCount");
00467                 Verify.AreEqual("4", ReadResult());
00468
00469                 ItemRoot.SetFocus();
00470                 GamepadHelper.PressButton(ItemRoot, GamepadButton.DPadRight);
00471                 Log.Comment("Verify that ItemRoot has collapsed.");
00472                 ClickButton("GetItemCount");
00473                 Verify.AreEqual("1", ReadResult());
00474
00475                 // Validate Gamepad left/right on left thumbstick
00476                 ItemRoot.SetFocus();
00477                 GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickLeft);
00478                 Log.Comment("Verify that ItemRoot has expanded.");
00479                 ClickButton("GetItemCount");
00480                 Verify.AreEqual("4", ReadResult());
00481
00482                 ItemRoot.SetFocus();
00483                 GamepadHelper.PressButton(ItemRoot, GamepadButton.LeftThumbstickRight);
00484                 Log.Comment("Verify that ItemRoot has collapsed.");
00485                 ClickButton("GetItemCount");
00486                 Verify.AreEqual("1", ReadResult());
00487             }
00488         }
00489
00490         [TestMethod]
00491         [TestProperty("TestSuite", "A")]
00492         public void TreeViewKeyDownRightToLeftTest_NodeMode()
00493         {
00494             TreeViewKeyDownRightToLeftTest();
00495         }
00496
00497         [TestMethod]
00498         [TestProperty("TestSuite", "A")]
00499         public void TreeViewKeyDownRightToLeftTest_ContentMode()
00500         {
00501             TreeViewKeyDownRightToLeftTest(isContentMode:true);
00502         }
00503
00504         private void TreeViewSwappingNodesTest(bool isContentMode = false)
00505         {
00506             if (IsPhoneDevice())
00507             {
00508                 return;
00509             }
00510
00511             using (var setup = new TestSetupHelper("TreeView Tests"))
00512             {
00513                 SetContentMode(isContentMode);
00514
00515                 ClickButton("GetItemCount");
00516                 Verify.AreEqual("1", ReadResult());
00517
00518                 UIObject ItemRoot = LabelFirstItem();
00519
00520                 InputHelper.Tap(ItemRoot);
00521
00522                 // Should be expanded now
00523                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00524
00525                 ClickButton("MoveNodesToNewTreeView");
00526
00527                 Wait.ForIdle();
00528                 ClickButton("GetTree2ItemCount");
00529                 Verify.AreEqual("6", ReadResult());
00530             }
00531         }
00532
00533         [TestMethod]
00534         [TestProperty("TestSuite", "A")]
00535         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00536         public void TreeViewSwappingNodesTest_NodeMode()
00537         {
00538             TreeViewSwappingNodesTest();
00539         }
00540
00541         [TestMethod]
00542         [TestProperty("TestSuite", "A")]
00543         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00544         public void TreeViewSwappingNodesTest_ContentMode()
00545         {
00546             TreeViewSwappingNodesTest(isContentMode:true);
00547         }
00548
00549         private void TreeViewExpandingEventTest(bool isContentMode = false)
00550         {
00551             if (IsPhoneDevice())
00552             {
00553                 return;
00554             }
00555
00556             using (var setup = new TestSetupHelper("TreeView Tests"))
00557             {
00558                 SetContentMode(isContentMode);
00559
00560                 ClickButton("SetUpExpandingNodeEvent");
00561
00562                 UIObject ItemRoot = LabelFirstItem();
00563
00564                 InputHelper.Tap(ItemRoot);
00565
00566                 // Should be expanded now
00567                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00568
00569                 ClickButton("GetItemCount");
00570                 Verify.AreEqual("5", ReadResult());
00571
00572                 ClickButton("DisableClickToExpand");
00573
00574                 InputHelper.Tap(ItemRoot);
00575
00576                 KeyboardHelper.PressKey(Key.Down);
00577                 KeyboardHelper.PressKey(Key.Down);
00578                 KeyboardHelper.PressKey(Key.Down);
00579                 KeyboardHelper.PressKey(Key.Down);
00580                 KeyboardHelper.PressKey(Key.Right);
00581
00582                 Verify.AreEqual("Loaded", ReadResult());
00583                 ClickButton("GetItemCount");
00584                 Verify.AreEqual("8", ReadResult());
00585             }
00586         }
00587
00588         [TestMethod]
00589         [TestProperty("TestSuite", "A")]
00590         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00591         public void TreeViewExpandingEventTest_NodeMode()
00592         {
00593             TreeViewExpandingEventTest();
00594         }
00595
00596         [TestMethod]
00597         [TestProperty("TestSuite", "A")]
00598         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00599         public void TreeViewExpandingEventTest_ContentMode()
00600         {
00601             TreeViewExpandingEventTest(isContentMode:true);
00602         }
00603
00604         private void TreeViewKeyboardReorderTest(bool isContentMode = false)
00605         {
00606             if (IsPhoneDevice())
00607             {
00608                 return;
00609             }
00610
00611             using (var setup = new TestSetupHelper("TreeView Tests"))
00612             {
00613                 SetContentMode(isContentMode);
00614
00615                 ClickButton("DisableClickToExpand");
00616                 ClickButton("GetItemCount");
00617                 Verify.AreEqual("1", ReadResult());
00618
00619                 UIObject ItemRoot = LabelFirstItem();
00620
00621                 InputHelper.Tap(ItemRoot);
00622
00623                 Verify.AreEqual("ItemClicked:Root", ReadResult());
00624
00625                 ClickButton("GetItemCount");
00626                 Verify.AreEqual("1", ReadResult());
00627
00628                 InputHelper.Tap(ItemRoot);
00629
00630                 KeyboardHelper.PressKey(Key.Right);
00631                 KeyboardHelper.PressKey(Key.Enter);
00632
00633                 ClickButton("GetItemCount");
00634                 Verify.AreEqual("4", ReadResult());
00635
00636                 InputHelper.Tap(ItemRoot);
00637
00638                 KeyboardHelper.PressKey(Key.Down);
00639                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
00640                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
00641
00642                 ClickButton("GetChildrenOrder");
00643                 Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());
00644
00645                 InputHelper.Tap(ItemRoot);
00646
00647                 KeyboardHelper.PressKey(Key.Down);
00648                 KeyboardHelper.PressKey(Key.Up, ModifierKey.Alt | ModifierKey.Shift);
00649
00650                 ClickButton("GetChildrenOrder");
00651                 Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());
00652
00653                 InputHelper.Tap(ItemRoot);
00654
00655                 KeyboardHelper.PressKey(Key.Down);
00656                 KeyboardHelper.PressKey(Key.Down);
00657                 KeyboardHelper.PressKey(Key.Down);
00658                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
00659
00660                 ClickButton("GetChildrenOrder");
00661                 Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());
00662
00663                 InputHelper.Tap(ItemRoot);
00664
00665                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
00666
00667                 ClickButton("GetItemCount");
00668                 Verify.AreEqual("4", ReadResult());
00669
00670                 ClickButton("GetChildrenOrder");
00671                 Verify.AreEqual("Root | Root.1 | Root.2 | Root.0", ReadResult());
00672             }
00673         }
00674
00675         [TestMethod]
00676         [TestProperty("TestSuite", "A")]
00677         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00678         public void TreeViewKeyboardReorderTest_NodeMode()
00679         {
00680             TreeViewKeyboardReorderTest();
00681         }
00682
00683         [TestMethod]
00684         [TestProperty("TestSuite", "A")]
00685         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00686         public void TreeViewKeyboardReorderTest_ContentMode()
00687         {
00688             TreeViewKeyboardReorderTest(isContentMode:true);
00689         }
00690
00691         private void TreeViewDragAndDropOnNode(bool isContentMode = false)
00692         {
00693             if (IsPhoneDevice())
00694             {
00695                 return;
00696             }
00697
00698             using (var setup = new TestSetupHelper("TreeView Tests"))
00699             {
00700                 SetContentMode(isContentMode);
00701
00702                 ClickButton("GetItemCount");
00703                 Verify.AreEqual("1", ReadResult());
00704
00705                 UIObject ItemRoot = LabelFirstItem();
00706
00707                 InputHelper.Tap(ItemRoot);
00708
00709                 ClickButton("DisableClickToExpand");
00710                 ClickButton("LabelItems");
00711                 ClickButton("GetItemCount");
00712                 Verify.AreEqual("4", ReadResult());
00713
00714                 UIObject dragUIObject = FindElement.ById("Root.0");
00715                 Verify.IsNotNull(dragUIObject, "Verifying that we found a UIElement called Root.0");
00716
00717                 UIObject dropUIObject = FindElement.ById("Root.1");
00718                 Verify.IsNotNull(dropUIObject, "Verifying that we found a UIElement called Root.1");
00719
00720                 InputHelper.DragToTarget(dragUIObject, dropUIObject);
00721
00722                 ClickButton("GetItemCount");
00723                 Verify.AreEqual("3", ReadResult());
00724
00725                 ClickButton("GetChildrenOrder");
00726                 Verify.AreEqual("Root | Root.1 | Root.0 | Root.2", ReadResult());
00727             }
00728         }
00729
00730         [TestMethod]
00731         [TestProperty("TestSuite", "A")]
00732         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00733         public void TreeViewDragAndDropOnNode_NodeMode()
00734         {
00735             TreeViewDragAndDropOnNode();
00736         }
00737
00738         [TestMethod]
00739         [TestProperty("TestSuite", "A")]
00740         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00741         public void TreeViewDragAndDropOnNode_ContentMode()
00742         {
00743             TreeViewDragAndDropOnNode(isContentMode:true);
00744         }
00745
00746         private void TreeViewDragAndDropBetweenNodes(bool isContentMode = false)
00747         {
00748             if (IsPhoneDevice())
00749             {
00750                 return;
00751             }
00752
00753             using (var setup = new TestSetupHelper("TreeView Tests"))
00754             {
00755                 SetContentMode(isContentMode);
00756
00757                 ClickButton("GetItemCount");
00758                 Verify.AreEqual("1", ReadResult());
00759
00760                 UIObject ItemRoot = LabelFirstItem();
00761
00762                 InputHelper.Tap(ItemRoot);
00763
00764                 ClickButton("DisableClickToExpand");
00765                 ClickButton("LabelItems");
00766                 ClickButton("GetItemCount");
00767                 Verify.AreEqual("4", ReadResult());
00768
00769                 UIObject dragUIObject = FindElement.ById("Root.0");
00770
00771                 var height = dragUIObject.BoundingRectangle.Height;
00772                 // Drag distance is 1.75 times the height of a TreeViewItem
00773                 var distance = (int)(height * 1.75);
00774
00775                 Log.Comment("Click on the item to help make the drag more reliable");
00776                 dragUIObject.Click();
00777
00778                 Log.Comment("Starting Drag...distance:" + distance);
00779                 InputHelper.DragDistance(dragUIObject, distance, Direction.South);
00780
00781                 TestEnvironment.VerifyAreEqualWithRetry(
00782                     5,
00783                     () => "Root | Root.1 | Root.0 | Root.2",
00784                     () => {
00785                         ClickButton("GetChildrenOrder");
00786                         return ReadResult();
00787                     });
00788
00789                 ClickButton("GetItemCount");
00790                 Verify.AreEqual("4", ReadResult());
00791
00792                 ClickButton("GetItemCommonStates");
00793                 Verify.AreEqual("Normal Normal Normal Normal", ReadResult().Trim());
00794             }
00795         }
00796
00797         [TestMethod]
00798         [TestProperty("TestSuite", "A")]
00799         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00800         public void TreeViewDragAndDropBetweenNodes_NodeMode()
00801         {
00802             TreeViewDragAndDropBetweenNodes();
00803         }
00804
00805         [TestMethod]
00806         [TestProperty("TestSuite", "A")]
00807         public void TreeViewDensityChange()
00808         {
00809             using (var setup = new TestSetupHelper("TreeView Tests"))
00810             {
00811                 UIObject root = LabelFirstItem();
00812                 int height = root.BoundingRectangle.Height;
00813                 Verify.AreEqual(height, 28);
00814             }
00815         }
00816
00817         [TestMethod]
00818         [TestProperty("TestSuite", "A")]
00819         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00820         public void TreeViewDragAndDropBetweenNodes_ContentMode()
00821         {
00822             TreeViewDragAndDropBetweenNodes(isContentMode:true);
00823         }
00824
00825         private void TreeViewCollectionChangesEffectSelectedNodesTest(bool isContentMode = false)
00826         {
00827             using (var setup = new TestSetupHelper("TreeView Tests"))
00828             {
00829                 SetContentMode(isContentMode);
00830
00831                 ClickButton("GetItemCount");
00832                 Verify.AreEqual("1", ReadResult());
00833
00834                 ClickButton("ToggleSelectionMode");
00835
00836                 UIObject ItemRoot = LabelFirstItem();
00837                 InputHelper.Tap(ItemRoot);
00838
00839                 ClickButton("DisableClickToExpand");
00840                 ClickButton("LabelItems");
00841                 ClickButton("GetItemCount");
00842                 Verify.AreEqual("4", ReadResult());
00843
00844                 ClickButton("GetSelected");
00845                 Verify.AreEqual("Nothing selected", ReadResult());
00846
00847                 InputHelper.Tap(ItemRoot);
00848                 KeyboardHelper.PressKey(Key.Down);
00849                 KeyboardHelper.PressKey(Key.Space);
00850
00851                 KeyboardHelper.PressKey(Key.Down);
00852                 KeyboardHelper.PressKey(Key.Space);
00853
00854                 ClickButton("GetSelected");
00855                 Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());
00856
00857                 ClickButton("AddSecondLevelOfNodes");
00858
00859                 ClickButton("GetSelected");
00860                 Verify.AreEqual("Selected: Root.0, Root.0.0, Root.1, Root.1.0, Root.1.1, Root.1.2", ReadResult());
00861
00862                 ClickButton("ModifySecondLevelOfNode");
00863                 ClickButton("GetSelected");
00864                 Verify.AreEqual("Selected: Root.0, Root.1, Root.1.0, Root.1.1, Root.1.2, THIS IS NEW", ReadResult());
00865
00866                 ClickButton("RemoveSecondLevelOfNode");
00867                 ClickButton("GetSelected");
00868                 Verify.AreEqual("Selected: Root.0, Root.1, Root.1.0, Root.1.1, Root.1.2", ReadResult());
00869             }
00870         }
00871
00872         [TestMethod]
00873         [TestProperty("TestSuite", "A")]
00874         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00875         public void TreeViewCollectionChangesEffectSelectedNodesTest_NodeMode()
00876         {
00877             TreeViewCollectionChangesEffectSelectedNodesTest();
00878         }
00879
00880         [TestMethod]
00881         [TestProperty("TestSuite", "A")]
00882         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00883         public void TreeViewCollectionChangesEffectSelectedNodesTest_ContentMode()
00884         {
00885             TreeViewCollectionChangesEffectSelectedNodesTest(isContentMode:true);
00886         }
00887
00888         private void TreeViewMultiSelectDragAndDropOnNode(bool isContentMode = false)
00889         {
00890             using (var setup = new TestSetupHelper("TreeView Tests"))
00891             {
00892                 SetContentMode(isContentMode);
00893
00894                 ClickButton("GetItemCount");
00895                 Verify.AreEqual("1", ReadResult());
00896
00897                 ClickButton("ToggleSelectionMode");
00898
00899                 UIObject ItemRoot = LabelFirstItem();
00900
00901                 InputHelper.Tap(ItemRoot);
00902
00903                 ClickButton("DisableClickToExpand");
00904                 ClickButton("LabelItems");
00905                 ClickButton("GetItemCount");
00906                 Verify.AreEqual("4", ReadResult());
00907
00908                 InputHelper.Tap(ItemRoot);
00909                 KeyboardHelper.PressKey(Key.Down);
00910                 KeyboardHelper.PressKey(Key.Space);
00911
00912                 KeyboardHelper.PressKey(Key.Down);
00913                 KeyboardHelper.PressKey(Key.Space);
00914
00915                 ClickButton("GetSelected");
00916                 Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());
00917
00918                 UIObject dragUIObject = FindElement.ById("Root.0");
00919                 Verify.IsNotNull(dragUIObject, "Verifying that we found a UIElement called Root.0");
00920
00921                 UIObject dropUIObject = FindElement.ById("Root.2");
00922                 Verify.IsNotNull(dropUIObject, "Verifying that we found a UIElement called Root.2");
00923
00924                 InputHelper.DragToTarget(dragUIObject, dropUIObject);
00925
00926                 ClickButton("GetItemCount");
00927                 Verify.AreEqual("2", ReadResult());
00928
00929                 ClickButton("GetChildrenOrder");
00930                 Verify.AreEqual("Root | Root.2 | Root.0 | Root.1", ReadResult());
00931             }
00932         }
00933
00934         [TestMethod]
00935         [TestProperty("TestSuite", "A")]
00936         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00937         public void TreeViewMultiSelectDragAndDropOnNode_NodeMode()
00938         {
00939             TreeViewMultiSelectDragAndDropOnNode();
00940         }
00941
00942         [TestMethod]
00943         [TestProperty("TestSuite", "A")]
00944         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00945         public void TreeViewMultiSelectDragAndDropOnNode_ContentMode()
00946         {
00947             TreeViewMultiSelectDragAndDropOnNode(isContentMode:true);
00948         }
00949
00950         private void TreeViewMultiSelectDragAndDropBetweenNodes(bool isContentMode = false)
00951         {
00952             if (IsPhoneDevice())
00953             {
00954                 return;
00955             }
00956
00957             using (var setup = new TestSetupHelper("TreeView Tests"))
00958             {
00959                 SetContentMode(isContentMode);
00960
00961                 ClickButton("GetItemCount");
00962                 Verify.AreEqual("1", ReadResult());
00963
00964                 ClickButton("ToggleSelectionMode");
00965
00966                 UIObject ItemRoot = LabelFirstItem();
00967                 InputHelper.Tap(ItemRoot);
00968
00969                 ClickButton("DisableClickToExpand");
00970                 ClickButton("LabelItems");
00971                 ClickButton("GetItemCount");
00972                 Verify.AreEqual("4", ReadResult());
00973
00974                 InputHelper.Tap(ItemRoot);
00975                 KeyboardHelper.PressKey(Key.Down);
00976                 KeyboardHelper.PressKey(Key.Space);
00977                 KeyboardHelper.PressKey(Key.Down);
00978                 KeyboardHelper.PressKey(Key.Space);
00979
00980                 ClickButton("GetSelected");
00981                 Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());
00982
00983                 UIObject dragUIObject = FindElement.ById("Root.1");
00984
00985                 var height = dragUIObject.BoundingRectangle.Height;
00986                 // Drag distance is 1.75 times the height of a TreeViewItem
00987                 var distance = (int)(height * 1.75);
00988
00989                 Log.Comment("Starting Drag...distance:" + distance);
00990                 InputHelper.DragDistance(dragUIObject, distance, Direction.South);
00991
00992                 ClickButton("GetChildrenOrder");
00993                 Verify.AreEqual("Root | Root.2 | Root.0 | Root.1", ReadResult());
00994
00995                 ClickButton("GetItemCount");
00996                 Verify.AreEqual("4", ReadResult());
00997
00998                 ClickButton("GetSelected");
00999                 Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());
01000             }
01001         }
01002
01003         [TestMethod]
01004         [TestProperty("TestSuite", "A")]
01005         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01006         public void TreeViewMultiSelectDragAndDropBetweenNodes_NodeMode()
01007         {
01008             TreeViewMultiSelectDragAndDropBetweenNodes();
01009         }
01010
01011         [TestMethod]
01012         [TestProperty("TestSuite", "A")]
01013         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01014         public void TreeViewMultiSelectDragAndDropBetweenNodes_ContentMode()
01015         {
01016             TreeViewMultiSelectDragAndDropBetweenNodes(isContentMode:true);
01017         }
01018
01019         private void ValidateCannotDragWithinSelectedSubtree(bool isContentMode = false)
01020         {
01021             if (IsPhoneDevice())
01022             {
01023                 return;
01024             }
01025
01026             using (var setup = new TestSetupHelper("TreeView Tests"))
01027             {
01028                 SetContentMode(isContentMode);
01029
01030                 ClickButton("GetItemCount");
01031                 Verify.AreEqual("1", ReadResult());
01032
01033                 ClickButton("ToggleSelectionMode");
01034
01035                 UIObject ItemRoot = LabelFirstItem();
01036                 InputHelper.Tap(ItemRoot);
01037
01038                 ClickButton("DisableClickToExpand");
01039                 ClickButton("LabelItems");
01040                 ClickButton("GetItemCount");
01041                 Verify.AreEqual("4", ReadResult());
01042
01043                 InputHelper.Tap(ItemRoot);
01044                 KeyboardHelper.PressKey(Key.Space);
01045
01046                 ClickButton("GetSelected");
01047                 Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
01048
01049                 UIObject dragUIObject = FindElement.ById("Root.1");
01050
01051                 var height = dragUIObject.BoundingRectangle.Height;
01052                 // 5% from the edge of the next item
01053                 var distance = (int)(height * 1.45);
01054
01055                 Log.Comment("Starting Drag...distance:" + distance);
01056                 InputHelper.DragDistance(dragUIObject, distance, Direction.South);
01057
01058                 ClickButton("GetChildrenOrder");
01059                 Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());
01060
01061                 ClickButton("GetItemCount");
01062                 Verify.AreEqual("4", ReadResult());
01063
01064                 ClickButton("GetSelected");
01065                 Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
01066             }
01067         }
01068
01069         [TestMethod]
01070         [TestProperty("TestSuite", "A")]
01071         public void ValidateCannotDragWithinSelectedSubtree_NodeMode()
01072         {
01073             ValidateCannotDragWithinSelectedSubtree();
01074         }
01075
01076         [TestMethod]
01077         [TestProperty("TestSuite", "A")]
01078         public void ValidateCannotDragWithinSelectedSubtree_ContentMode()
01079         {
01080             ValidateCannotDragWithinSelectedSubtree(isContentMode:true);
01081         }
01082
01083         private void ValidateMultiSelectDragDropRootsAndNonRoots(bool isContentMode = false)
01084         {
01085             if (IsPhoneDevice())
01086             {
01087                 return;
01088             }
01089
01090             using (var setup = new TestSetupHelper("TreeView Tests"))
01091             {
01092                 SetContentMode(isContentMode);
01093
01094                 ClickButton("GetItemCount");
01095                 Verify.AreEqual("1", ReadResult());
01096
01097                 ClickButton("ToggleSelectionMode");
01098                 ClickButton("AddSecondLevelOfNodes");
01099
01100                 UIObject ItemRoot = LabelFirstItem();
01101                 InputHelper.Tap(ItemRoot);
01102
01103                 ClickButton("DisableClickToExpand");
01104                 ClickButton("GetItemCount");
01105                 Verify.AreEqual("4", ReadResult());
01106
01107                 InputHelper.Tap(ItemRoot);
01108                 KeyboardHelper.PressKey(Key.Down);
01109                 KeyboardHelper.PressKey(Key.Right);
01110                 KeyboardHelper.PressKey(Key.Space);
01111
01112                 KeyboardHelper.PressKey(Key.Down);
01113                 KeyboardHelper.PressKey(Key.Down);
01114
01115                 KeyboardHelper.PressKey(Key.Right);
01116                 KeyboardHelper.PressKey(Key.Down);
01117                 KeyboardHelper.PressKey(Key.Space);
01118
01119                 ClickButton("GetSelected");
01120                 Verify.AreEqual("Selected: Root.0, Root.0.0, Root.1.0", ReadResult());
01121
01122                 ClickButton("LabelItems");
01123                 UIObject dragUIObject = FindElement.ById("Root.1.0");
01124
01125                 var height = dragUIObject.BoundingRectangle.Height;
01126                 // Drag distance is 1.75 times the height of a TreeViewItem
01127                 var distance = (int)(height * 1.75);
01128
01129                 Log.Comment("Starting Drag...distance:" + distance);
01130                 InputHelper.DragDistance(dragUIObject, distance, Direction.South);
01131
01132                 ClickButton("GetChildrenOrder");
01133                 Verify.AreEqual("Root | Root.1 | Root.1.1 | Root.0 | Root.0.0 | Root.1.0 | Root.1.2 | Root.2", ReadResult());
01134                 Wait.ForIdle();
01135
01136                 ClickButton("GetItemCount");
01137                 Verify.AreEqual("8", ReadResult());
01138
01139                 ClickButton("GetSelected");
01140                 Verify.AreEqual("Selected: Root.0, Root.0.0, Root.1.0", ReadResult());
01141             }
01142         }
01143
01144         [TestMethod]
01145         [TestProperty("TestSuite", "A")]
01146         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01147         public void ValidateMultiSelectDragDropRootsAndNonRoots_NodeMode()
01148         {
01149             ValidateMultiSelectDragDropRootsAndNonRoots();
01150         }
01151
01152         [TestMethod]
01153         [TestProperty("TestSuite", "A")]
01154         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01155         public void ValidateMultiSelectDragDropRootsAndNonRoots_ContentMode()
01156         {
01157             ValidateMultiSelectDragDropRootsAndNonRoots(isContentMode:true);
01158         }
01159
01160         private void TreeViewDragCrash(bool isContentMode = false)
01161         {
01162             using (var setup = new TestSetupHelper("TreeView Tests"))
01163             {
01164                 SetContentMode(isContentMode);
01165
01166                 ClickButton("GetItemCount");
01167                 Verify.AreEqual("1", ReadResult());
01168
01169                 UIObject ItemRoot = LabelFirstItem();
01170
01171                 InputHelper.Tap(ItemRoot);
01172
01173                 ClickButton("SizeTreeViewsForDrags");
01174                 ClickButton("DisableClickToExpand");
01175                 ClickButton("LabelItems");
01176                 ClickButton("GetItemCount");
01177                 Verify.AreEqual("4", ReadResult());
01178
01179                 UIObject dragUIObject = FindElement.ById("Root.2");
01180                 Verify.IsNotNull(dragUIObject);
01181
01182                 //Drag along the entire TreeView, to cover all possible DragOver scenarios
01183                 var distance = 90;
01184
01185                 Log.Comment("Starting Drag...distance:" + distance);
01186                 InputHelper.DragDistance(dragUIObject, distance, Direction.South);
01187
01188                 Log.Comment("Congratulations, No Crash!");
01189
01190                 ClickButton("GetItemCount");
01191                 Verify.AreEqual("4", ReadResult());
01192             }
01193         }
01194
01195         [TestMethod]
01196         [TestProperty("TestSuite", "A")]
01197         public void TreeViewDragCrash_NodeMode()
01198         {
01199             TreeViewDragCrash();
01200         }
01201
01202         [TestMethod]
01203         [TestProperty("TestSuite", "A")]
01204         public void TreeViewDragCrash_ContentMode()
01205         {
01206             TreeViewDragCrash(isContentMode:true);
01207         }
01208
01209         private void DragItemOutOfTreeView(bool isContentMode = false)
01210         {
01211             if (IsPhoneDevice())
01212             {
01213                 return;
01214             }
01215
01216             using (var setup = new TestSetupHelper("TreeView Tests"))
01217             {
01218                 SetContentMode(isContentMode);
01219
01220                 ClickButton("GetItemCount");
01221                 Verify.AreEqual("1", ReadResult());
01222
01223                 UIObject ItemRoot = LabelFirstItem();
01224
01225                 InputHelper.Tap(ItemRoot);
01226
01227                 ClickButton("SetupDragToDropTarget");
01228                 ClickButton("DisableClickToExpand");
01229                 ClickButton("LabelItems");
01230                 ClickButton("GetItemCount");
01231                 Verify.AreEqual("4", ReadResult());
01232
01233                 UIObject dragUIObject = FindElement.ById("Root.2");
01234                 Verify.IsNotNull(dragUIObject);
01235
01236                 UIObject dropTarget = FindElement.ByName("DropTarget");
01237                 Verify.IsNotNull(dropTarget);
01238
01239                 Log.Comment($"Dragging from {dragUIObject} to {dropTarget}");
01240                 InputHelper.DragToTarget(dragUIObject, dropTarget);
01241
01242                 TestEnvironment.VerifyAreEqualWithRetry(
01243                     5,
01244                     () => "Root.2",
01245                     () => new TextBlock(FindElement.ByName("DropTargetTextBlock")).DocumentText,
01246                     () => {
01247                         // The drag&drop operation may not have worked because the input is unreliable, just try again.
01248                         InputHelper.DragToTarget(dragUIObject, dropTarget);
01249                     });
01250             }
01251         }
01252
01253         [TestMethod]
01254         [TestProperty("TestSuite", "A")]
01255         [TestProperty("Ignore", "True")] //Task 24429465: DCPP: Multiple MUXControls interaction tests failing after IXP integration.
01256         public void DragItemOutOfTreeView_NodeMode()
01257         {
01258             DragItemOutOfTreeView();
01259         }
01260
01261         [TestMethod]
01262         [TestProperty("TestSuite", "B")]
01263         public void DragItemOutOfTreeView_ContentMode()
01264         {
01265             DragItemOutOfTreeView(isContentMode:true);
01266         }
01267
01268         private void DragItemOntoTreeView(bool isContentMode = false)
01269         {
01270             if (IsPhoneDevice())
01271             {
01272                 return;
01273             }
01274
01275             using (var setup = new TestSetupHelper("TreeView Tests"))
01276             {
01277                 SetContentMode(isContentMode);
01278
01279                 ClickButton("GetItemCount");
01280                 Verify.AreEqual("1", ReadResult());
01281
01282                 UIObject ItemRoot = LabelFirstItem();
01283
01284                 InputHelper.Tap(ItemRoot);
01285
01286                 ClickButton("SetupDragToDropTarget");
01287                 ClickButton("DisableClickToExpand");
01288                 ClickButton("LabelItems");
01289                 ClickButton("GetItemCount");
01290                 Verify.AreEqual("4", ReadResult());
01291
01292                 UIObject dragUIObject = FindElement.ByName("DraggableElement");
01293                 Verify.IsNotNull(dragUIObject);
01294
01295                 UIObject dropTarget = isContentMode ? FindElement.ByName("ContentModeTestTreeView") : FindElement.ByName("TestTreeView");
01296
01297                 Verify.IsNotNull(dropTarget);
01298
01299                 InputHelper.DragToTarget(dragUIObject, dropTarget);
01300
01301                 Verify.AreEqual("Dropped: Test Item", ReadResult());
01302             }
01303         }
01304
01305         [TestMethod]
01306         [TestProperty("TestSuite", "B")]
01307         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01308         public void DragItemOntoTreeView_NodeMode()
01309         {
01310             DragItemOntoTreeView();
01311         }
01312
01313         [TestMethod]
01314         [TestProperty("TestSuite", "B")]
01315         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01316         public void DragItemOntoTreeView_ContentMode()
01317         {
01318             DragItemOntoTreeView(isContentMode:true);
01319         }
01320
01321         private void TreeViewNoReorderIntoChildren(bool isContentMode = false)
01322         {
01323             using (var setup = new TestSetupHelper("TreeView Tests"))
01324             {
01325                 SetContentMode(isContentMode);
01326
01327                 ClickButton("GetItemCount");
01328                 Verify.AreEqual("1", ReadResult());
01329
01330                 UIObject ItemRoot = LabelFirstItem();
01331
01332                 InputHelper.Tap(ItemRoot);
01333
01334                 ClickButton("LabelItems");
01335                 ClickButton("GetItemCount");
01336                 Verify.AreEqual("4", ReadResult());
01337                 ClickButton("SetupNoReorderNodes");
01338
01339                 UIObject lockedItem = FindElement.ById("Root.0");
01340                 InputHelper.Tap(lockedItem);
01341                 ClickButton("DisableClickToExpand");
01342                 ClickButton("GetItemCount");
01343                 Verify.AreEqual("7", ReadResult());
01344
01345                 UIObject dragUIObject = FindElement.ById("Root.1");
01346                 Verify.IsNotNull(dragUIObject);
01347
01348                 var topBottomMargin = 4; // To account for the 2px top and 2px bottom margin for TreeViewItem
01349                 var height = dragUIObject.BoundingRectangle.Height + topBottomMargin;
01350                 // 5% from the edge of the next item
01351                 var distance = (int)(height * 1.45);
01352
01353                 Log.Comment("Starting Drag...distance:" + distance);
01354                 InputHelper.DragDistance(dragUIObject, distance, Direction.North);
01355
01356                 ClickButton("GetItemCount");
01357                 Verify.AreEqual("7", ReadResult());
01358             }
01359         }
01360
01361         [TestMethod]
01362         [TestProperty("TestSuite", "B")]
01363         public void TreeViewNoReorderIntoChildren_NodeMode()
01364         {
01365             TreeViewNoReorderIntoChildren();
01366         }
01367
01368         [TestMethod]
01369         [TestProperty("TestSuite", "B")]
01370         public void TreeViewNoReorderIntoChildren_ContentMode()
01371         {
01372             TreeViewNoReorderIntoChildren(isContentMode:true);
01373         }
01374
01375         [TestMethod]
01376         [TestProperty("TestSuite", "B")]
01377         public void FlyoutTreeViewSelectionChangedCrash()
01378         {
01379             using (var setup = new TestSetupHelper("TreeView Tests"))
01380             {
01381                 if (PlatformConfiguration.IsDevice(DeviceType.Phone))
01382                 {
01383                     Log.Warning("Test is disabled on phone (bug #11244792).");
01384                     return;
01385                 }
01386                 // click button to popup flyout treeview
01387                 ClickButton("TreeViewInFlyout");
01388
01389                 // expand tree
01390                 TapOnFlyoutTreeViewRootItemChevron();
01391
01392                 ClickButton("GetFlyoutItemCount");
01393                 Verify.AreEqual("4", ReadResult());
01394
01395                 // tap button to hide flyout treeview
01396                 UIObject flyoutButton = FindElement.ByName("TreeViewInFlyout");
01397                 Verify.IsNotNull(flyoutButton, "Verifying that we found the button");
01398                 InputHelper.Tap(flyoutButton);
01399                 Wait.ForIdle();
01400
01401                 //Click Button to test for crash
01402                 ClickButton("ChangeSelectionAfterFlyout");
01403
01404                 Log.Comment("Congratulations, no crash!");
01405             }
01406         }
01407
01408         private void TreeViewMultiSelectKeyboardingTest(bool isContentMode = false)
01409         {
01410             if (IsPhoneDevice())
01411             {
01412                 return;
01413             }
01414
01415             using (var setup = new TestSetupHelper("TreeView Tests"))
01416             {
01417                 SetContentMode(isContentMode);
01418
01419                 ClickButton("ToggleSelectionMode");
01420                 ClickButton("DisableClickToExpand");
01421
01422                 UIObject ItemRoot = LabelFirstItem();
01423
01424                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
01425
01426                 KeyboardHelper.PressKey(Key.Space);
01427                 ClickButton("GetItemCount");
01428                 Verify.AreEqual("1", ReadResult());
01429
01430                 ClickButton("GetSelected");
01431                 Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
01432
01433                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
01434
01435                 KeyboardHelper.PressKey(Key.Right);
01436                 KeyboardHelper.PressKey(Key.Down);
01437                 KeyboardHelper.PressKey(Key.Space);
01438
01439                 ClickButton("GetItemCount");
01440                 Verify.AreEqual("4", ReadResult());
01441
01442                 ClickButton("GetSelected");
01443                 Verify.AreEqual("Selected: Root.1, Root.2", ReadResult());
01444
01445                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
01446
01447                 KeyboardHelper.PressKey(Key.Right);
01448                 KeyboardHelper.PressKey(Key.Down);
01449                 KeyboardHelper.PressKey(Key.Down);
01450                 KeyboardHelper.PressKey(Key.Space);
01451
01452                 ClickButton("GetItemCount");
01453                 Verify.AreEqual("4", ReadResult());
01454
01455                 ClickButton("GetSelected");
01456                 Verify.AreEqual("Selected: Root.1", ReadResult());
01457
01458                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
01459                 KeyboardHelper.PressKey(Key.Left);
01460
01461                 ClickButton("GetItemCount");
01462                 Verify.AreEqual("1", ReadResult());
01463
01464                 ClickButton("GetSelected");
01465                 Verify.AreEqual("Selected: Root.1", ReadResult());
01466
01467                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
01468                 KeyboardHelper.PressKey(Key.Space);
01469
01470                 ClickButton("GetSelected");
01471                 Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
01472             }
01473         }
01474
01475         [TestMethod]
01476         [TestProperty("TestSuite", "B")]
01477         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01478         public void TreeViewMultiSelectKeyboardingTest_NodeMode()
01479         {
01480             TreeViewMultiSelectKeyboardingTest();
01481         }
01482
01483         [TestMethod]
01484         [TestProperty("TestSuite", "B")]
01485         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01486         public void TreeViewMultiSelectKeyboardingTest_ContentMode()
01487         {
01488             TreeViewMultiSelectKeyboardingTest(isContentMode:true);
01489         }
01490
01491         private void TreeViewMultiSelectItemTest(bool isContentMode = false)
01492         {
01493             if (IsPhoneDevice())
01494             {
01495                 return;
01496             }
01497
01498             using (var setup = new TestSetupHelper("TreeView Tests"))
01499             {
01500                 SetContentMode(isContentMode);
01501
01502                 ClickButton("ToggleSelectionMode");
01503                 ClickButton("LabelItems");
01504
01505                 ClickButton("GetItemCount");
01506                 Verify.AreEqual("1", ReadResult());
01507
01508                 UIObject ItemRoot = LabelFirstItem();
01509
01510                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .75, ItemRoot.BoundingRectangle.Height * .5);
01511
01512                 ClickButton("GetItemCount");
01513                 Verify.AreEqual("4", ReadResult());
01514                 ClickButton("LabelItems");
01515
01516                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .05, ItemRoot.BoundingRectangle.Height * .5);
01517                 ClickButton("GetSelected");
01518                 Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
01519
01520                 Log.Comment("Retrieve first item as generic UIElement");
01521                 UIObject Item0 = FindElement.ById("Root.0");
01522                 Verify.IsNotNull(ItemRoot, "Verifying that we found a UIElement called Root.0");
01523
01524                 InputHelper.Tap(Item0, Item0.BoundingRectangle.Width * .1, Item0.BoundingRectangle.Height * .5);
01525                 ClickButton("GetSelected");
01526                 Verify.AreEqual("Selected: Root.1, Root.2", ReadResult());
01527
01528                 // tap on partial selected node will set it to unselected state
01529                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .05, ItemRoot.BoundingRectangle.Height * .5);
01530                 ClickButton("GetSelected");
01531                 Verify.AreEqual("Nothing selected", ReadResult());
01532
01533                 InputHelper.Tap(ItemRoot, ItemRoot.BoundingRectangle.Width * .05, ItemRoot.BoundingRectangle.Height * .5);
01534                 ClickButton("GetSelected");
01535                 Verify.AreEqual("Selected: Root, Root.0, Root.1, Root.2", ReadResult());
01536             }
01537         }
01538
01539         [TestMethod]
01540         [TestProperty("TestSuite", "B")]
01541         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01542         public void TreeViewMultiSelectItemTest_NodeMode()
01543         {
01544             TreeViewMultiSelectItemTest();
01545         }
01546
01547         [TestMethod]
01548         [TestProperty("TestSuite", "B")]
01549         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01550         public void TreeViewMultiSelectItemTest_ContentMode()
01551         {
01552             TreeViewMultiSelectItemTest(isContentMode:true);
01553         }
01554
01555         private void TreeViewMultiSelectGamepadTest(bool isContentMode = false)
01556         {
01557             if (IsPhoneDevice())
01558             {
01559                 return;
01560             }
01561
01562             using (var setup = new TestSetupHelper("TreeView Tests"))
01563             {
01564                 SetContentMode(isContentMode);
01565
01566                 ClickButton("ToggleSelectionMode");
01567                 UIObject treeRoot = LabelFirstItem();
01568
01569                 // Tree is collapsed, and nothing is selected
01570                 ClickButton("GetItemCount");
01571                 Verify.AreEqual("1", ReadResult());
01572
01573                 // First A expands the tree
01574                 VerifyGamepadAPress(treeRoot, "4", "Nothing selected");
01575
01576                 // Second A selects root and all children
01577                 VerifyGamepadAPress(treeRoot, "4", "Selected: Root, Root.0, Root.1, Root.2");
01578
01579                 // Third A unselects
01580                 VerifyGamepadAPress(treeRoot, "4", "Nothing selected");
01581
01582                 // Fourth A collapses
01583                 VerifyGamepadAPress(treeRoot, "1", "Nothing selected");
01584
01585                 // Fifth A selects
01586                 VerifyGamepadAPress(treeRoot, "1", "Selected: Root, Root.0, Root.1, Root.2");
01587
01588                 // Sixth A unselects
01589                 VerifyGamepadAPress(treeRoot, "1", "Nothing selected");
01590
01591                 // Seventh A expands again
01592                 VerifyGamepadAPress(treeRoot, "4", "Nothing selected");
01593             }
01594         }
01595
01596         [TestMethod]
01597         [TestProperty("TestSuite", "B")]
01598         public void TreeViewMultiSelectGamepadTest_NodeMode()
01599         {
01600             TreeViewMultiSelectGamepadTest();
01601         }
01602
01603         [TestMethod]
01604         [TestProperty("TestSuite", "B")]
01605         public void TreeViewMultiSelectGamepadTest_ContentMode()
01606         {
01607             TreeViewMultiSelectGamepadTest(isContentMode:true);
01608         }
01609
01610         private void TreeViewItemUIATest(bool isContentMode = false)
01611         {
01612             if (IsPhoneDevice())
01613             {
01614                 return;
01615             }
01616
01617             using (var setup = new TestSetupHelper("TreeView Tests"))
01618             {
01619                 SetContentMode(isContentMode);
01620
01621                 UIObject ItemRoot = LabelFirstItem();
01622
01623                 InputHelper.Tap(ItemRoot);
01624
01625                 ClickButton("LabelItems");
01626
01627                 Log.Comment("Retrieve first item as generic UIElement");
01628                 UIObject Item1 = FindElement.ById("Root.1");
01629                 Verify.IsNotNull(Item1, "Verifying that we found a UIElement called Root.1");
01630
01631                 Item1.SetFocus();
01632                 AutomationElement itemPeer = AutomationElement.FocusedElement;
01633
01634                 // object valuePatternAsObject;
01635                 int positionInSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
01636                 int sizeOfSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
01637                 int level = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.LevelProperty);
01638
01639                 Verify.AreEqual(2, positionInSet, "Position in set.");
01640                 Verify.AreEqual(3, sizeOfSet, "Size of set.");
01641                 Verify.AreEqual(2, level, "Level in tree.");
01642
01643                 var expandCollapsePattern = (ExpandCollapsePattern)itemPeer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
01644                 Verify.AreEqual(ExpandCollapseState.LeafNode, expandCollapsePattern.Current.ExpandCollapseState);
01645
01646                 ItemRoot.SetFocus();
01647                 AutomationElement rootPeer = AutomationElement.FocusedElement;
01648                 expandCollapsePattern = (ExpandCollapsePattern)rootPeer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
01649                 Verify.AreEqual(ExpandCollapseState.Expanded, expandCollapsePattern.Current.ExpandCollapseState);
01650
01651                 // Select root and check selection pattern.
01652                 InputHelper.Tap(ItemRoot);
01653                 var rootSelectionItemPattern = (SelectionItemPattern)rootPeer.GetCurrentPattern(SelectionItemPattern.Pattern);
01654                 Verify.AreEqual(true, rootSelectionItemPattern.Current.IsSelected);
01655
01656                 // Expand and look at IsSelected for root and first child. Root should still be selected and first child should not.
01657                 InputHelper.Tap(ItemRoot);
01658                 ClickButton("LabelItems");
01659                 UIObject item1 = FindElement.ById("Root.1");
01660                 Verify.IsNotNull(item1, "Verifying that we found a UIElement called Root.1");
01661
01662                 item1.SetFocus();
01663                 AutomationElement item1Peer = AutomationElement.FocusedElement;
01664                 var item1SelectionItemPattern = (SelectionItemPattern)item1Peer.GetCurrentPattern(SelectionItemPattern.Pattern);
01665                 Verify.AreEqual(false, item1SelectionItemPattern.Current.IsSelected);
01666                 Verify.AreEqual(true, rootSelectionItemPattern.Current.IsSelected);
01667
01668                 // Select item1
01669                 item1SelectionItemPattern.AddToSelection();
01670                 Verify.AreEqual(true, item1SelectionItemPattern.Current.IsSelected);
01671
01672                 // Go to multi select mode
01673                 ClickButton("ToggleSelectionMode");
01674
01675                 ClickButton("LabelItems");
01676                 item1 = FindElement.ById("Root.1");
01677                 Verify.IsNotNull(item1, "Verifying that we found a UIElement called Root.1");
01678
01679                 item1.SetFocus();
01680                 KeyboardHelper.PressKey(Key.Space);
01681                 item1Peer = AutomationElement.FocusedElement;
01682                 item1SelectionItemPattern = (SelectionItemPattern)item1Peer.GetCurrentPattern(SelectionItemPattern.Pattern);
01683                 Verify.AreEqual(true, item1SelectionItemPattern.Current.IsSelected);
01684                 Verify.AreEqual(false, rootSelectionItemPattern.Current.IsSelected);
01685
01686                 // Deselect item1
01687                 item1SelectionItemPattern.RemoveFromSelection();
01688                 Verify.AreEqual(false, item1SelectionItemPattern.Current.IsSelected);
01689
01690                 // Select Root, which should select all its children as well.
01691                 rootSelectionItemPattern.AddToSelection();
01692                 Verify.AreEqual(true, rootSelectionItemPattern.Current.IsSelected);
01693                 Verify.AreEqual(true, item1SelectionItemPattern.Current.IsSelected);
01694             }
01695         }
01696
01697         [TestMethod]
01698         [TestProperty("TestSuite", "B")]
01699         public void TreeViewListMultipleSelectionUIATest()
01700         {
01701             using (var setup = new TestSetupHelper("TreeView Tests"))
01702             {
01703                 SetContentMode(false);
01704
01705                 UIObject ItemRoot = LabelFirstItem();
01706
01707                 InputHelper.Tap(ItemRoot);
01708
01709                 ClickButton("LabelItems");
01710                 ClickButton("ToggleSelectionMode");
01711
01712                 Log.Comment("Retrieve first item as generic UIElement");
01713                 UIObject Item1 = FindElement.ById("Root.1");
01714                 Verify.IsNotNull(Item1, "Verifying that we found a UIElement called Root.1");
01715
01716                 Item1.SetFocus();
01717                 AutomationElement itemPeer = AutomationElement.FocusedElement;
01718
01719                 var selectionItemPeer = (SelectionItemPattern)itemPeer.GetCurrentPattern(SelectionItemPattern.Pattern);
01720                 var treeViewListPeer = selectionItemPeer.Current.SelectionContainer;
01721
01722                 var multipleSelectionPattern = (SelectionPattern)treeViewListPeer.GetCurrentPattern(SelectionPattern.Pattern);
01723                 Verify.IsNotNull(multipleSelectionPattern);
01724                 Verify.IsTrue(multipleSelectionPattern.Current.CanSelectMultiple);
01725                 Verify.IsFalse(multipleSelectionPattern.Current.IsSelectionRequired);
01726                 var elements = multipleSelectionPattern.Current.GetSelection();
01727                 Verify.IsNotNull(elements);
01728                 Verify.AreEqual(0, elements.Length);
01729             }
01730         }
01731
01732         [TestMethod]
01733         [TestProperty("TestSuite", "B")]
01734         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01735         public void TreeViewItemUIATest_NodeMode()
01736         {
01737             TreeViewItemUIATest();
01738         }
01739
01740         [TestMethod]
01741         [TestProperty("TestSuite", "B")]
01742         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01743         public void TreeViewItemUIATest_ContentMode()
01744         {
01745             TreeViewItemUIATest(isContentMode:true);
01746         }
01747
01748         private void ValidateExpandingRaisedOnItemHavingUnrealizedChildren(bool isContentMode = false)
01749         {
01750             if (IsPhoneDevice())
01751             {
01752                 return;
01753             }
01754
01755             using (var setup = new TestSetupHelper("TreeView Tests"))
01756             {
01757                 SetContentMode(isContentMode);
01758
01759                 ClickButton("GetItemCount");
01760                 Verify.AreEqual("1", ReadResult());
01761
01762                 var itemRoot = new TreeItem(LabelFirstItem());
01763                 itemRoot.Expand();
01764                 Wait.ForIdle();
01765
01766                 ClickButton("DisableClickToExpand");
01767                 ClickButton("GetItemCount");
01768                 Verify.AreEqual("4", ReadResult());
01769
01770                 ClickButton("SetRoot1HasUnrealizedChildren");
01771
01772                 ClickButton("LabelItems");
01773                 var root1 = new TreeItem(FindElement.ById("Root.1"));
01774                 Verify.IsNotNull(root1, "Verifying root.1 is found");
01775                 root1.Expand();
01776                 Wait.ForIdle();
01777
01778                 Verify.AreEqual("Expanding Raised", ReadResult());
01779             }
01780         }
01781
01782         [TestMethod]
01783         [TestProperty("TestSuite", "B")]
01784         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01785         public void ValidateExpandingRaisedOnItemHavingUnrealizedChildren_NodeMode()
01786         {
01787             ValidateExpandingRaisedOnItemHavingUnrealizedChildren();
01788         }
01789
01790         [TestMethod]
01791         [TestProperty("TestSuite", "B")]
01792         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
01793         public void ValidateExpandingRaisedOnItemHavingUnrealizedChildren_ContentMode()
01794         {
01795             ValidateExpandingRaisedOnItemHavingUnrealizedChildren(isContentMode:true);
01796         }
01797
01798         private void TreeViewDragItemTest(bool isContentMode = false)
01799         {
01800             if (IsPhoneDevice())
01801             {
01802                 return;
01803             }
01804
01805             using (var setup = new TestSetupHelper("TreeView Tests"))
01806             {
01807                 SetContentMode(isContentMode);
01808
01809                 ClickButton("SetupDragDropHandlersForApiTest");
01810                 UIObject dragUIObject = LabelFirstItem();
01811                 InputHelper.DragDistance(dragUIObject, dragUIObject.BoundingRectangle.Height, Direction.South);
01812                 Verify.AreEqual("DragItemsStarting:Root\nDragItemsCompleted:Root", ReadResult());
01813             }
01814         }
01815
01816         [TestMethod]
01817         [TestProperty("TestSuite", "B")]
01818         public void TreeViewDragItemTest_NodeMode()
01819         {
01820             TreeViewDragItemTest();
01821         }
01822
01823         [TestMethod]
01824         [TestProperty("TestSuite", "B")]
01825         public void TreeViewDragItemTest_ContentMode()
01826         {
01827             TreeViewDragItemTest(isContentMode:true);
01828         }
01829
01830         private void TreeViewDragMultipleItemsTest(bool isContentMode = false)
01831         {
01832             using (var setup = new TestSetupHelper("TreeView Tests"))
01833             {
01834                 SetContentMode(isContentMode);
01835
01836                 ClickButton("ToggleSelectionMode");
01837                 ClickButton("SetupDragDropHandlersForApiTest");
01838
01839                 UIObject ItemRoot = LabelFirstItem();
01840                 InputHelper.Tap(ItemRoot);
01841
01842                 ClickButton("DisableClickToExpand");
01843                 ClickButton("LabelItems");
01844                 ClickButton("GetItemCount");
01845                 Verify.AreEqual("4", ReadResult());
01846
01847                 InputHelper.Tap(ItemRoot);
01848                 KeyboardHelper.PressKey(Key.Down);
01849                 KeyboardHelper.PressKey(Key.Space);
01850
01851                 KeyboardHelper.PressKey(Key.Down);
01852                 KeyboardHelper.PressKey(Key.Space);
01853
01854                 ClickButton("GetSelected");
01855                 Verify.AreEqual("Selected: Root.0, Root.1", ReadResult());
01856
01857                 UIObject dragUIObject = FindElement.ByName("Root.0");
01858                 Verify.IsNotNull(dragUIObject, "Verifying Root.0 is found");
01859                 UIObject dropUIObject = FindElement.ByName("Root.2");
01860                 Verify.IsNotNull(dropUIObject, "Verifying Root.2 is found");
01861                 InputHelper.DragToTarget(dragUIObject, dropUIObject);
01862                 Verify.AreEqual("DragItemsStarting:Root.0|Root.1\nDragItemsCompleted:Root.0|Root.1\nNewParent: Root.2", ReadResult());
01863             }
01864         }
01865
01866         [TestMethod]
01867         [TestProperty("TestSuite", "C")]
01868         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01869         public void TreeViewDragMultipleItemsTest_NodeMode()
01870         {
01871             TreeViewDragMultipleItemsTest();
01872         }
01873
01874         [TestMethod]
01875         [TestProperty("TestSuite", "C")]
01876         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01877         public void TreeViewDragMultipleItemsTest_ContentMode()
01878         {
01879             TreeViewDragMultipleItemsTest(isContentMode:true);
01880         }
01881
01882         private void TreeViewDragEnterOverLeaveTest(bool isContentMode = false)
01883         {
01884             if (IsPhoneDevice())
01885             {
01886                 return;
01887             }
01888
01889             using (var setup = new TestSetupHelper("TreeView Tests"))
01890             {
01891                 SetContentMode(isContentMode);
01892
01893                 ClickButton("SetupDragDropHandlersForApiTest");
01894
01895                 UIObject dragUIObject = isContentMode ? FindElement.ByName("DraggableElement2") : FindElement.ByName("DraggableElement");
01896                 Verify.IsNotNull(dragUIObject, "Verifying draggable element is found");
01897
01898                 UIObject dropUIObject = isContentMode ? FindElement.ByName("ContentModeTestTreeView") : FindElement.ByName("TestTreeView");
01899                 Verify.IsNotNull(dropUIObject, "Verifying TreeView is found");
01900
01901                 // drag draggable into TestTreeView to test TestTreeView2's DragLeave event
01902                 InputHelper.DragToTarget(dragUIObject, dropUIObject);
01903
01904                 Verify.AreEqual("DragEnter->DragOver->DragLeave", ReadResult());
01905             }
01906         }
01907
01908         [TestMethod]
01909         [TestProperty("TestSuite", "C")]
01910         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01911         public void TreeViewDragEnterOverLeaveTest_NodeMode()
01912         {
01913             TreeViewDragEnterOverLeaveTest();
01914         }
01915
01916         [TestMethod]
01917         [TestProperty("TestSuite", "C")]
01918         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01919         public void TreeViewDragEnterOverLeaveTest_ContentMode()
01920         {
01921             TreeViewDragEnterOverLeaveTest(isContentMode:true);
01922         }
01923
01924         private void TreeViewDragEnterOverDropTest(bool isContentMode = false)
01925         {
01926             if (IsPhoneDevice())
01927             {
01928                 return;
01929             }
01930
01931             using (var setup = new TestSetupHelper("TreeView Tests"))
01932             {
01933                 SetContentMode(isContentMode);
01934
01935                 ClickButton("SetupDragDropHandlersForApiTest");
01936
01937                 UIObject dragUIObject = isContentMode ? FindElement.ByName("DraggableElement2") : FindElement.ByName("DraggableElement");
01938                 Verify.IsNotNull(dragUIObject, "Verifying draggable element is found");
01939
01940                 UIObject dropUIObject = isContentMode ? FindElement.ByName("ContentModeTestTreeView2") : FindElement.ByName("TestTreeView2");
01941                 Verify.IsNotNull(dropUIObject, "Verifying TestTreeView2 is found");
01942
01943                 InputHelper.DragToTarget(dragUIObject, dropUIObject);
01944
01945                 Verify.AreEqual("DragEnter->DragOver->Drop", ReadResult());
01946             }
01947         }
01948
01949         [TestMethod]
01950         [TestProperty("TestSuite", "C")]
01951         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01952         public void TreeViewDragEnterOverDropTest_NodeMode()
01953         {
01954             TreeViewDragEnterOverDropTest();
01955         }
01956
01957         [TestMethod]
01958         [TestProperty("TestSuite", "C")]
01959         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01960         public void TreeViewDragEnterOverDropTest_ContentMode()
01961         {
01962             TreeViewDragEnterOverDropTest(isContentMode:true);
01963         }
01964
01965         private void TreeViewDisableItemDragTest(bool isContentMode = false)
01966         {
01967             if (IsPhoneDevice())
01968             {
01969                 return;
01970             }
01971
01972             using (var setup = new TestSetupHelper("TreeView Tests"))
01973             {
01974                 SetContentMode(isContentMode);
01975
01976                 ClickButton("SetupDragDropHandlersForApiTest");
01977                 ClickButton("DisableItemDrag");
01978
01979                 var root = new TreeItem(LabelFirstItem());
01980                 root.Expand();
01981                 Wait.ForIdle();
01982
01983                 ClickButton("LabelItems");
01984                 UIObject dragUIObject = FindElement.ById("Root.1");
01985                 Verify.IsNotNull(dragUIObject, "Verifying that we found UIElement root1");
01986
01987                 UIObject dropUIObject = FindElement.ById("Root.2");
01988                 Verify.IsNotNull(dropUIObject, "Verifying that we found UIElement root2");
01989
01990                 InputHelper.DragToTarget(dragUIObject, dropUIObject);
01991
01992                 // Verify drag item events (DragItemsStarting, DragItemsCompleted) didn't get called
01993                 Verify.AreEqual("", ReadResult());
01994             }
01995         }
01996
01997         [TestMethod]
01998         [TestProperty("TestSuite", "C")]
01999         public void TreeViewDisableItemDragTest_NodeMode()
02000         {
02001             TreeViewDisableItemDragTest();
02002         }
02003
02004         [TestMethod]
02005         [TestProperty("TestSuite", "C")]
02006         public void TreeViewDisableItemDragTest_ContentMode()
02007         {
02008             TreeViewDisableItemDragTest(isContentMode:true);
02009         }
02010
02011         private void TreeViewDisableItemReorderTest(bool isContentMode = false)
02012         {
02013             if (IsPhoneDevice())
02014             {
02015                 return;
02016             }
02017
02018             using (var setup = new TestSetupHelper("TreeView Tests"))
02019             {
02020                 SetContentMode(isContentMode);
02021
02022                 ClickButton("GetItemCount");
02023                 Verify.AreEqual("1", ReadResult());
02024
02025                 UIObject ItemRoot = LabelFirstItem();
02026
02027                 InputHelper.Tap(ItemRoot);
02028
02029                 ClickButton("LabelItems");
02030                 ClickButton("GetChildrenOrder");
02031                 Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());
02032
02033                 ClickButton("DisableItemReorder");
02034
02035                 UIObject dragUIObject = FindElement.ById("Root.0");
02036                 Verify.IsNotNull(dragUIObject, "Verifying Root.0 is found");
02037
02038                 var height = dragUIObject.BoundingRectangle.Height;
02039
02040                 Log.Comment("Verify cannot drag between nodes");
02041                 // Drag Root.0 to the middle of Root.1 and Root.2
02042                 var distance = (int)(height * 1.5);
02043
02044                 Log.Comment("Starting Drag...distance:" + distance);
02045                 InputHelper.DragDistance(dragUIObject, distance, Direction.South);
02046
02047                 ClickButton("GetChildrenOrder");
02048                 // Verify nodes are still in the same order
02049                 Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());
02050
02051                 Log.Comment("Verify cannot drag onto a node");
02052                 // Drag Root.0 onto Root.1
02053                 var root1 = FindElement.ById("Root.1");
02054                 InputHelper.DragToTarget(dragUIObject, root1);
02055
02056                 ClickButton("GetChildrenOrder");
02057                 // Verify nodes are still in the same order
02058                 Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());
02059             }
02060         }
02061
02062         [TestMethod]
02063         [TestProperty("TestSuite", "C")]
02064         public void TreeViewDisableItemReorderTest_NodeMode()
02065         {
02066             TreeViewDisableItemReorderTest();
02067         }
02068
02069         [TestMethod]
02070         [TestProperty("TestSuite", "C")]
02071         public void TreeViewDisableItemReorderTest_ContentMode()
02072         {
02073             TreeViewDisableItemReorderTest(isContentMode:true);
02074         }
02075
02076         [TestMethod]
02077         [TestProperty("TestSuite", "C")]
02078         public void TreeViewDisableItemReorderKeyboardTest()
02079         {
02080             using (var setup = new TestSetupHelper("TreeView Tests"))
02081             {
02082                 var ItemRoot = LabelFirstItem();
02083                 InputHelper.Tap(ItemRoot);
02084
02085                 ClickButton("LabelItems");
02086                 ClickButton("GetChildrenOrder");
02087                 Verify.AreEqual("Root | Root.0 | Root.1 | Root.2", ReadResult());
02088
02089                 ClickButton("DisableClickToExpand");
02090
02091                 var root0 = FindElement.ById("Root.0");
02092                 Verify.IsNotNull(root0, "Verifying Root.0 is found");
02093
02094                 // Verify we can reorder items using keyboard by default
02095                 InputHelper.Tap(root0);
02096                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
02097                 ClickButton("GetChildrenOrder");
02098                 Verify.AreEqual("Root | Root.1 | Root.0 | Root.2", ReadResult());
02099
02100                 ClickButton("DisableItemReorder");
02101
02102                 // Verify reorder is disabled
02103                 InputHelper.Tap(root0);
02104                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift);
02105                 ClickButton("GetChildrenOrder");
02106                 Verify.AreEqual("Root | Root.1 | Root.0 | Root.2", ReadResult());
02107             }
02108         }
02109
02110         [TestMethod]
02111         [TestProperty("TestSuite", "C")]
02112         public void TreeViewItemTemplateSelectorTest()
02113         {
02114             using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "ItemTemplateSelectorTestPage" }))
02115             {
02116                 Log.Comment("ItemTemplateSelector test page is ready");
02117                 UIObject node1 = FindElement.ByName("Template1");
02118                 Verify.IsNotNull(node1, "Verifying template 1 is set");
02119                 UIObject node2 = FindElement.ByName("Template2");
02120                 Verify.IsNotNull(node2, "Verifying template 2 is set");
02121
02122                 var topBottomMargin = 4; // To account for the 2px top and 2px bottom margins for TreeViewItem
02123
02124                 // Verify item container styles are set correctly by checking heights
02125                 Verify.AreEqual(node1.BoundingRectangle.Height, 50 - topBottomMargin);
02126                 Verify.AreEqual(node2.BoundingRectangle.Height, 60 - topBottomMargin);
02127             }
02128         }
02129
02130         //Bug 16396926
02131         [TestMethod]
02132         [TestProperty("TestSuite", "C")]
02133         public void TreeViewExpandNodeWithUnrealizedChildrenCrash()
02134         {
02135             using (var setup = new TestSetupHelper("TreeView Tests"))
02136             {
02137                 ClickButton("AddNodeWithEmpyUnrealizedChildren");
02138                 ClickButton("DisableClickToExpand");
02139                 UIObject root = LabelFirstItem();
02140                 InputHelper.Tap(root);
02141
02142                 // Expand root
02143                 KeyboardHelper.PressKey(Key.Right);
02144                 // Move down to root.3
02145                 KeyboardHelper.PressKey(Key.Down);
02146                 KeyboardHelper.PressKey(Key.Down);
02147                 KeyboardHelper.PressKey(Key.Down);
02148                 KeyboardHelper.PressKey(Key.Down);
02149                 // Expand root.3
02150                 KeyboardHelper.PressKey(Key.Right);
02151
02152                 ClickButton("GetItemCount");
02153                 Verify.AreEqual("5", ReadResult());
02154             }
02155         }
02156
02157         private void TreeViewPartialSelectionTest(bool isContentMode = false)
02158         {
02159             using (var setup = new TestSetupHelper("TreeView Tests"))
02160             {
02161                 SetContentMode(isContentMode);
02162
02163                 UIObject ItemRoot = LabelFirstItem();
02164                 InputHelper.Tap(ItemRoot);
02165
02166                 ClickButton("AddSecondLevelOfNodes");
02167                 // expand all nodes
02168                 ClickButton("LabelItems");
02169                 UIObject root0 = FindElement.ById("Root.0");
02170                 Verify.IsNotNull(root0, "Verifying Root.0 is found");
02171                 UIObject root1 = FindElement.ById("Root.1");
02172                 Verify.IsNotNull(root1, "Verifying Root.1 is found");
02173                 InputHelper.Tap(root0);
02174                 InputHelper.Tap(root1);
02175                 ClickButton("GetItemCount");
02176                 Verify.AreEqual("8", ReadResult());
02177                 ClickButton("LabelItems");
02178
02179                 ClickButton("DisableClickToExpand");
02180                 ClickButton("ToggleSelectionMode");
02181
02182                 ClickButton("GetMultiSelectCheckBoxStates");
02183                 Verify.AreEqual("u|u|u|u|u|u|u|u|", ReadResult());
02184
02185                 UIObject root00 = FindElement.ById("Root.0.0");
02186                 Verify.IsNotNull(root00, "Verifying Root.0.0 is found");
02187                 ToggleTreeViewItemCheckBox(root00, 3);
02188                 ClickButton("GetMultiSelectCheckBoxStates");
02189                 Verify.AreEqual("p|s|s|u|u|u|u|u|", ReadResult());
02190
02191                 UIObject root10 = FindElement.ById("Root.1.0");
02192                 Verify.IsNotNull(root10, "Verifying Root.1.0 is found");
02193                 ToggleTreeViewItemCheckBox(root10, 3);
02194                 ClickButton("GetMultiSelectCheckBoxStates");
02195                 Verify.AreEqual("p|s|s|p|s|u|u|u|", ReadResult());
02196
02197                 ToggleTreeViewItemCheckBox(root1, 2);
02198                 ClickButton("GetMultiSelectCheckBoxStates");
02199                 Verify.AreEqual("p|s|s|u|u|u|u|u|", ReadResult());
02200
02201                 ToggleTreeViewItemCheckBox(root1, 2);
02202                 ClickButton("GetMultiSelectCheckBoxStates");
02203                 Verify.AreEqual("p|s|s|s|s|s|s|u|", ReadResult());
02204
02205                 UIObject root2 = FindElement.ById("Root.2");
02206                 Verify.IsNotNull(root2, "Verifying Root.2 is found");
02207                 ToggleTreeViewItemCheckBox(root2, 2);
02208                 ClickButton("GetMultiSelectCheckBoxStates");
02209                 Verify.AreEqual("s|s|s|s|s|s|s|s|", ReadResult());
02210             }
02211         }
02212
02213         [TestMethod]
02214         [TestProperty("TestSuite", "C")]
02215         public void TreeViewPartialSelectionTest_NodeMode()
02216         {
02217             TreeViewPartialSelectionTest();
02218         }
02219
02220         [TestMethod]
02221         [TestProperty("TestSuite", "C")]
02222         public void TreeViewPartialSelectionTest_ContentMode()
02223         {
02224             TreeViewPartialSelectionTest(isContentMode:true);
02225         }
02226
02227         [TestMethod]
02228         [TestProperty("TestSuite", "C")]
02229         public void TreeViewSelectedNodeTest()
02230         {
02231             using (var setup = new TestSetupHelper("TreeView Tests"))
02232             {
02233                 var root = new TreeItem(LabelFirstItem());
02234                 root.Expand();
02235                 Wait.ForIdle();
02236
02237                 ClickButton("LabelItems");
02238                 UIObject root0 = FindElement.ById("Root.0");
02239                 Verify.IsNotNull(root0, "Verifying Root.0 is found");
02240
02241                 InputHelper.Tap(root0);
02242
02243                 ClickButton("GetSelected");
02244                 Verify.AreEqual("Selected: Root.0", ReadResult());
02245
02246                 ClickButton("ToggleRoot0Selection");
02247
02248                 ClickButton("GetSelected");
02249                 Verify.AreEqual("Nothing selected", ReadResult());
02250             }
02251         }
02252
02253         [TestMethod]
02254         [TestProperty("TestSuite", "C")]
02255         public void TreeViewSelectedNodesTest()
02256         {
02257             using (var setup = new TestSetupHelper("TreeView Tests"))
02258             {
02259                 var root = new TreeItem(LabelFirstItem());
02260                 root.Expand();
02261                 Wait.ForIdle();
02262
02263                 //SelectedNodes vector changes should be reflected on UI
02264                 ClickButton("GetMultiSelectCheckBoxStates");
02265                 Verify.AreEqual("u|u|u|u|", ReadResult());
02266
02267                 ClickButton("ToggleSelectedNodes");
02268                 ClickButton("GetMultiSelectCheckBoxStates");
02269                 Verify.AreEqual("p|s|u|s|", ReadResult());
02270
02271                 ClickButton("ToggleSelectedNodes");
02272                 ClickButton("GetMultiSelectCheckBoxStates");
02273                 Verify.AreEqual("u|u|u|u|", ReadResult());
02274
02275                 // UI changes should update SelectedNodes vector
02276                 ClickButton("GetSelected");
02277                 Verify.AreEqual("Nothing selected", ReadResult());
02278
02279                 ClickButton("LabelItems");
02280                 UIObject root0 = FindElement.ById("Root.0");
02281                 Verify.IsNotNull(root0, "Verifying Root.0 is found");
02282                 InputHelper.Tap(root0);
02283                 KeyboardHelper.PressKey(Key.Space);
02284
02285                 ClickButton("GetSelected");
02286                 Verify.AreEqual("Selected: Root.0", ReadResult());
02287             }
02288         }
02289
02290         [TestMethod]
02291         [TestProperty("TestSuite", "C")]
02292         public void TreeViewSelectedItemTest()
02293         {
02294             using (var setup = new TestSetupHelper("TreeView Tests"))
02295             {
02296                 SetContentMode(true);
02297
02298                 var root = new TreeItem(LabelFirstItem());
02299                 root.Expand();
02300                 Wait.ForIdle();
02301
02302                 ClickButton("LabelItems");
02303                 UIObject root0 = FindElement.ById("Root.0");
02304                 Verify.IsNotNull(root0, "Verifying Root.0 is found");
02305
02306                 InputHelper.Tap(root0);
02307
02308                 ClickButton("GetSelected");
02309                 Verify.AreEqual("Selected: Root.0", ReadResult());
02310
02311                 ClickButton("ToggleRoot0Selection");
02312
02313                 ClickButton("GetSelected");
02314                 Verify.AreEqual("Nothing selected", ReadResult());
02315             }
02316         }
02317
02318         [TestMethod]
02319         [TestProperty("TestSuite", "C")]
02320         public void TreeViewSelectedItemsTest()
02321         {
02322             using (var setup = new TestSetupHelper("TreeView Tests"))
02323             {
02324                 SetContentMode(true);
02325
02326                 var root = new TreeItem(LabelFirstItem());
02327                 root.Expand();
02328                 Wait.ForIdle();
02329
02330                 //SelectedItems vector changes should be reflected on UI
02331                 ClickButton("GetMultiSelectCheckBoxStates");
02332                 Verify.AreEqual("u|u|u|u|", ReadResult());
02333
02334                 ClickButton("ToggleSelectedNodes");
02335                 ClickButton("GetMultiSelectCheckBoxStates");
02336                 Verify.AreEqual("p|s|u|s|", ReadResult());
02337
02338                 ClickButton("ToggleSelectedNodes");
02339                 ClickButton("GetMultiSelectCheckBoxStates");
02340                 Verify.AreEqual("u|u|u|u|", ReadResult());
02341
02342                 // UI changes should update SelectedItems vector
02343                 ClickButton("GetSelected");
02344                 Verify.AreEqual("Nothing selected", ReadResult());
02345
02346                 ClickButton("LabelItems");
02347                 UIObject root0 = FindElement.ById("Root.0");
02348                 Verify.IsNotNull(root0, "Verifying Root.0 is found");
02349                 InputHelper.Tap(root0);
02350                 KeyboardHelper.PressKey(Key.Space);
02351
02352                 ClickButton("GetSelected");
02353                 Verify.AreEqual("Selected: Root.0", ReadResult());
02354             }
02355         }
02356
02357         // test for #1756 https://github.com/microsoft/microsoft-ui-xaml/issues/1756
02358         [TestMethod]
02359         [TestProperty("TreeViewTestSuite", "B")]
02360         public void TreeViewSelectRegressionTest()
02361         {
02362             // Running 5 times since the the bug doesn't repro consistently.
02363             for(int i = 0; i < 5; i++)
02364             {
02365                 using (var setup = new TestSetupHelper("TreeView Tests"))
02366                 {
02367                     ClickButton("AddExtraNodes");
02368                     ClickButton("LabelItems");
02369
02370                     ClickButton("SelectLastRootNode");
02371                     ClickButton("GetSelected");
02372                     Verify.AreEqual("Selected: Node 50", ReadResult());
02373
02374                     UIObject node1 = FindElement.ByName("Node 1");
02375                     Verify.IsNotNull(node1, "Verifying Node 1 is found");
02376                     InputHelper.Tap(node1);
02377
02378                     ClickButton("GetSelected");
02379                     Verify.AreEqual("Selected: Node 1", ReadResult());
02380                 }
02381             }
02382         }
02383
02384         // Regression test for bug 16833853
02385         [TestMethod]
02386         [TestProperty("TestSuite", "C")]
02387         public void TreeViewNonexistNodeAutomationPeerTest()
02388         {
02389             using (var setup = new TestSetupHelper("TreeView Tests"))
02390             {
02391                 ClickButton("AddSecondLevelOfNodes");
02392                 var root = LabelFirstItem();
02393                 InputHelper.Tap(root);
02394
02395                 ClickButton("LabelItems");
02396                 var root0 = FindElement.ById("Root.0");
02397                 InputHelper.Tap(root0);
02398
02399                 ClickButton("LabelItems");
02400                 UIObject root00 = FindElement.ById("Root.0.0");
02401                 root00.SetFocus();
02402
02403                 AutomationElement itemPeer = AutomationElement.FocusedElement;
02404                 int positionInSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
02405                 int sizeOfSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
02406                 int level = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.LevelProperty);
02407                 Verify.AreEqual(1, positionInSet, "Position in set.");
02408                 Verify.AreEqual(1, sizeOfSet, "Size of set.");
02409                 Verify.AreEqual(3, level, "Level in tree.");
02410
02411                 ClickButton("RemoveSecondLevelOfNode");
02412                 positionInSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.PositionInSetProperty);
02413                 sizeOfSet = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.SizeOfSetProperty);
02414                 level = (int)itemPeer.GetCurrentPropertyValue(AutomationElement.LevelProperty);
02415                 Verify.AreEqual(-1, positionInSet, "Position in set.");
02416                 Verify.AreEqual(-1, sizeOfSet, "Size of set.");
02417                 Verify.AreEqual(-1, level, "Level in tree.");
02418             }
02419         }
02420
02421         // Regression test for bug 17644036
02422         [TestMethod]
02423         [TestProperty("TestSuite", "C")]
02424         public void TreeViewItemAutomationPeerSelectionItemPatternTest()
02425         {
02426             using (var setup = new TestSetupHelper("TreeView Tests"))
02427             {
02428                 ClickButton("AddSecondLevelOfNodes");
02429                 var root = LabelFirstItem();
02430                 root.SetFocus();
02431                 AutomationElement rootPeer = AutomationElement.FocusedElement;
02432
02433                 // single selection mode by default
02434                 int index = Array.IndexOf(rootPeer.GetSupportedPatterns(), SelectionItemPatternIdentifiers.Pattern);
02435                 Verify.IsGreaterThanOrEqual(index, 0);
02436
02437                 // click twice to switch to none selection mode
02438                 ClickButton("ToggleSelectionMode");
02439                 ClickButton("ToggleSelectionMode");
02440
02441                 index = Array.IndexOf(rootPeer.GetSupportedPatterns(), SelectionItemPatternIdentifiers.Pattern);
02442                 Verify.IsLessThan(index, 0);
02443             }
02444         }
02445
02446         [TestMethod]
02447         [TestProperty("TestSuite", "C")]
02448         public void TreeViewSelectionChangeUIAEventsTest()
02449         {
02450             using (var setup = new TestSetupHelper("TreeView Tests"))
02451             {
02452                 ClickButton("ToggleSelectionMode");
02453                 var root = LabelFirstItem();
02454                 root.SetFocus();
02455                 AutomationElement rootPeer = AutomationElement.FocusedElement;
02456
02457                 var selectionItemPattern = rootPeer.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;
02458                 Verify.AreEqual(false, selectionItemPattern.Current.IsSelected);
02459
02460                 using (var propertyChangedEventWaiter = new PropertyChangedEventWaiter(root, UIProperty.Get("SelectionItem.IsSelected")))
02461                 {
02462                     KeyboardHelper.PressKey(Key.Space);
02463                     propertyChangedEventWaiter.Wait();
02464                     Log.Comment("SelectionItem.IsSelected property change event fired");
02465                     Verify.AreEqual(true, selectionItemPattern.Current.IsSelected);
02466                 }
02467
02468                 using (var automationEventWaiter = new AutomationEventWaiter(SelectionItemPattern.ElementRemovedFromSelectionEvent, root, Scope.Element))
02469                 {
02470                     KeyboardHelper.PressKey(Key.Space);
02471                     automationEventWaiter.Wait();
02472                     Log.Comment("SelectionItemPattern.ElementRemovedFromSelectionEvent fired");
02473                     Verify.AreEqual(false, selectionItemPattern.Current.IsSelected);
02474                 }
02475
02476                 using (var automationEventWaiter = new AutomationEventWaiter(SelectionItemPattern.ElementAddedToSelectionEvent, root, Scope.Element))
02477                 {
02478                     KeyboardHelper.PressKey(Key.Space);
02479                     automationEventWaiter.Wait();
02480                     Log.Comment("SelectionItemPattern.ElementAddedToSelectionEvent fired");
02481                     Verify.AreEqual(true, selectionItemPattern.Current.IsSelected);
02482                 }
02483             }
02484         }
02485
02486         [TestMethod]
02487         [TestProperty("TestSuite", "C")]
02488         public void TreeViewNodeInheritenceTest()
02489         {
02490             using (var setup = new TestSetupHelper("TreeView Tests"))
02491             {
02492                 var itemRoot = new TreeItem(LabelFirstItem());
02493                 itemRoot.Expand();
02494                 Wait.ForIdle();
02495
02496                 ClickButton("AddInheritedTreeViewNode");
02497                 ClickButton("LabelItems");
02498                 var node = FindElement.ById("Inherited from TreeViewNode");
02499                 Verify.IsNotNull(node, "Verify TreeViewNode content is correct");
02500             }
02501         }
02502
02503         //[TestMethod] Bug 24048408: DCPP: Multiple MUXC interaction tests fail in CatGates due to taking too long to execute
02504         [TestProperty("TestSuite", "C")]
02505         public void TreeViewFastReorderTest()
02506         {
02507             using (var setup = new TestSetupHelper("TreeView Tests"))
02508             {
02509                 ClickButton("AddExtraNodes");
02510                 ClickButton("LabelItems");
02511                 var node = FindElement.ById("Node 1");
02512                 Verify.IsNotNull(node);
02513                 node.SetFocus();
02514                 Log.Comment("Move down node 1");
02515                 var originalDelay = Keyboard.SendKeysDelay;
02516                 Keyboard.SendKeysDelay = 10;
02517
02518                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Alt | ModifierKey.Shift, 50);
02519                 Log.Comment("Move up node 1");
02520                 KeyboardHelper.PressKey(Key.Up, ModifierKey.Alt | ModifierKey.Shift, 50);
02521                 Log.Comment("App didn't crash");
02522
02523                 Keyboard.SendKeysDelay = originalDelay;
02524             }
02525         }
02526
02527         // [TestMethod] 24048500
02528         [TestProperty("TestSuite", "C")]
02529         public void TreeViewDataLateInitTest()
02530         {
02531             using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewLateDataInitTestPage" }))
02532             {
02533                 ClickButton("InitializeItemsSource");
02534                 Wait.ForIdle();
02535                 UIObject node1 = FindElement.ByName("Root");
02536                 Verify.IsNotNull(node1, "Verify data binding");
02537             }
02538         }
02539
02540         [TestMethod]
02541         [TestProperty("TestSuite", "C")]
02542         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
02543         public void TreeViewNodeInMarkupTest()
02544         {
02545             using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewNodeInMarkupTestPage" }))
02546             {
02547                 UIObject root = FindElement.ByName("Root");
02548                 Verify.IsNotNull(root, "Verify root node content");
02549             }
02550         }
02551
02552         [TestMethod]
02553         [TestProperty("TestSuite", "C")]
02554         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
02555         public void TreeViewRootNodeBindingTest()
02556         {
02557             using (var setup = new TestSetupHelper("TreeView Tests"))
02558             {
02559                 SetContentMode(true);
02560
02561                 ClickButton("ClearNodes");
02562                 ClickButton("AddRootNode");
02563                 ClickButton("AddRootNode");
02564                 ClickButton("GetItemCount");
02565                 Verify.AreEqual("2", ReadResult());
02566
02567                 ClickButton("LabelItems");
02568                 var root0 = FindElement.ById("Root0");
02569                 var root1 = FindElement.ById("Root1");
02570
02571                 Log.Comment("Drag Root1 onto Root0...");
02572                 InputHelper.DragToTarget(root1, root0);
02573
02574                 ClickButton("GetItemCount");
02575                 Verify.AreEqual("1", ReadResult());
02576
02577                 var rootTreeItem = new TreeItem(root0);
02578                 rootTreeItem.Expand();
02579                 Wait.ForIdle();
02580                 ClickButton("GetChildrenOrder");
02581                 Verify.AreEqual("Root0 | Root1", ReadResult());
02582             }
02583         }
02584
02585         [TestMethod]
02586         [TestProperty("TestSuite", "C")]
02587         // Regression test for https://github.com/microsoft/microsoft-ui-xaml/issues/1182
02588         public void TreeViewWithMultiLevelChildrenExpandCollapseTest()
02589         {
02590             using (var setup = new TestSetupHelper("TreeView Tests"))
02591             {
02592                 SetContentMode(true);
02593
02594                 var root = new TreeItem(LabelFirstItem());
02595                 root.Expand();
02596                 Wait.ForIdle();
02597
02598                 ClickButton("AddSecondLevelOfNodes");
02599                 ClickButton("LabelItems");
02600
02601                 var root1 = new TreeItem(FindElement.ByName("Root.1"));
02602                 root1.Expand();
02603                 Wait.ForIdle();
02604
02605                 Log.Comment("Drag Root.1.2 into Root.1.1");
02606                 var root11 = new TreeItem(FindElement.ByName("Root.1.1"));
02607                 var root12 = new TreeItem(FindElement.ByName("Root.1.2"));
02608                 InputHelper.DragToTarget(root12, root11);
02609
02610                 var root0 = new TreeItem(FindElement.ByName("Root.0"));
02611                 Log.Comment("Drag Root.1 into Root.0");
02612                 InputHelper.DragToTarget(root1, root0);
02613
02614                 root0.Expand();
02615                 Wait.ForIdle();
02616                 root1.Expand();
02617                 Wait.ForIdle();
02618                 root11.Expand();
02619                 Wait.ForIdle();
02620
02621                 ClickButton("GetChildrenOrder");
02622                 Verify.AreEqual("Root | Root.0 | Root.0.0 | Root.1 | Root.1.0 | Root.1.1 | Root.1.2 | Root.2", ReadResult());
02623
02624                 root0.Collapse();
02625                 Wait.ForIdle();
02626                 root0.Expand();
02627                 Wait.ForIdle();
02628
02629                 ClickButton("GetChildrenOrder");
02630                 Verify.AreEqual("Root | Root.0 | Root.0.0 | Root.1 | Root.1.0 | Root.1.1 | Root.1.2 | Root.2", ReadResult());
02631             }
02632         }
02633
02634         [TestMethod]
02635         [TestProperty("TestSuite", "B")]
02636         // Regression test for https://github.com/microsoft/microsoft-ui-xaml/issues/1790
02637         public void ItemsSourceResyncTest()
02638         {
02639             using (var setup = new TestSetupHelper("TreeView Tests"))
02640             {
02641                 SetContentMode(true);
02642
02643                 ClickButton("GetItemCount");
02644                 Verify.AreEqual("1", ReadResult());
02645
02646                 ClickButton("ResetItemsSource");
02647                 Wait.ForIdle();
02648                 ClickButton("GetItemCount");
02649                 Verify.AreEqual("4", ReadResult());
02650
02651                 ClickButton("ResetItemsSourceAsync");
02652                 Wait.ForIdle();
02653                 ClickButton("GetItemCount");
02654                 Verify.AreEqual("6", ReadResult());
02655             }
02656         }
02657
02658         [TestMethod]
02659         [TestProperty("TestSuite", "B")]
02660         public void ItemsSourceSwitchForthAndBackTest()
02661         {
02662             using (var setup = new TestSetupHelper("TreeView Tests"))
02663             {
02664                 SetContentMode(true);
02665
02666                 ClickButton("SwapItemsSource");
02667                 Wait.ForIdle();
02668                 ClickButton("GetItemCount");
02669                 Verify.AreEqual("2", ReadResult());
02670
02671                 ClickButton("SwapItemsSource");
02672                 Wait.ForIdle();
02673                 ClickButton("ExpandRootNode");
02674                 Wait.ForIdle();
02675                 ClickButton("GetItemCount");
02676                 Verify.AreEqual("4", ReadResult());
02677             }
02678         }
02679
02680         [TestMethod]
02681         [TestProperty("TestSuite","C")]
02682         public void SelectedItemBindingsWork()
02683         {
02684             using (var setup = new TestSetupHelper("TreeView Tests"))
02685             {
02686                 var setContentButton = new Button(FindElement.ByName("TwoWayBoundButton"));
02687                 var setSelectedItemButton = new Button(FindElement.ByName("SelectRoot2Item"));
02688                 var readResultButton = new Button(FindElement.ByName("ReadBindingResult"));
02689
02690                 setContentButton.Click();
02691                 Wait.ForIdle();
02692
02693                 readResultButton.Click();
02694                 Wait.ForIdle();
02695                 Verify.AreEqual("Root.1;Root.1",ReadResult());
02696
02697                 setSelectedItemButton.Click();
02698                 Wait.ForIdle();
02699                 readResultButton.Click();
02700                 Wait.ForIdle();
02701                 Verify.AreEqual("Root.2;Root.2", ReadResult());
02702             }
02703         }
02704
02705         [TestMethod]
02706         [TestProperty("TestSuite", "B")]
02707         public void SingleSelectWithUnrealizedChildrenDoesNotMoveSelection()
02708         {
02709             using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewUnrealizedChildrenTestPage" }))
02710             {
02711                 TapOnTreeViewAt(50, 12, "GetSelectedItemName");
02712
02713                 Log.Comment("Selecting item");
02714                 ClickButton("GetSelectedItemName");
02715                 Wait.ForIdle();
02716
02717                 Log.Comment("Verifying current selection");
02718                 var textBlock = new TextBlock(FindElement.ByName("SelectedItemName"));
02719                 Verify.AreEqual("Item: 0; layer: 3", textBlock.GetText());
02720
02721                 Log.Comment("Expanding selected item");
02722                 TapOnTreeViewAt(12, 12, "GetSelectedItemName");
02723                 Wait.ForIdle();
02724
02725                 Log.Comment("Verifying selection again");
02726                 ClickButton("GetSelectedItemName");
02727                 Wait.ForIdle();
02728                 textBlock = new TextBlock(FindElement.ByName("SelectedItemName"));
02729                 Verify.AreEqual("Item: 0; layer: 3", textBlock.GetText());
02730             }
02731         }
02732
02733         [TestMethod]
02734         [TestProperty("TestSuite", "C")]
02735         [TestProperty("Ignore", "False")] // Doesn't use input, so it's safe.
02736         [TestProperty("RegressionBug", "39499253")]
02737         public void CanExpandTreeViewItemWithItemSourceSet()
02738         {
02739             using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewItemsSourceTestPage" }))
02740             {
02741                 UIObject item1 = FindElement.ByName("Item 1");
02742                 UIObject item2 = FindElement.ByName("Item 2");
02743
02744                 item1.SetFocus();
02745                 AutomationElement item1Peer = AutomationElement.FocusedElement;
02746                 var item1SelectionItemPeer = (SelectionItemPattern)item1Peer.GetCurrentPattern(SelectionItemPattern.Pattern);
02747
02748                 item2.SetFocus();
02749                 AutomationElement item2Peer = AutomationElement.FocusedElement;
02750                 var item2SelectionItemPeer = (SelectionItemPattern)item2Peer.GetCurrentPattern(SelectionItemPattern.Pattern);
02751                 var item2ExpandCollapseItemPeer = (ExpandCollapsePattern)item2Peer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
02752
02753                 item1SelectionItemPeer.AddToSelection();
02754                 item2SelectionItemPeer.AddToSelection();
02755
02756                 Wait.ForIdle();
02757
02758                 item2ExpandCollapseItemPeer.Expand();
02759
02760                 Wait.ForIdle();
02761
02762                 item2ExpandCollapseItemPeer.Collapse();
02763
02764                 Wait.ForIdle();
02765
02766                 // If the bug repros, the app will crash here and the test will fail. If we get no crash, we can say the test passes.
02767                 item2ExpandCollapseItemPeer.Expand();
02768
02769                 Wait.ForIdle();
02770             }
02771         }
02772
02773         [TestMethod]
02774         [TestProperty("TestSuite", "C")]
02775         [TestProperty("Ignore", "False")]
02776         public void IsExpandedIsProperlyPreservedDuringItemRecycling()
02777         {
02778             using (var setup = new TestSetupHelper(new[] { "TreeView Tests", "TreeViewItemsSourceTestPage" }))
02779             {
02780                 ClickButton("SetUpContainerReuseTest1");
02781                 ClickButton("ExpandSecondItem");
02782
02783                 UIObject root1 = FindElement.ByName("Root1");
02784                 Verify.IsNotNull(root1, "Verifying that we found a UIElement called Root1");
02785
02786                 root1.SetFocus();
02787                 AutomationElement root1Peer = AutomationElement.FocusedElement;
02788
02789                 // Verify that root1 is expanded
02790                 var root1ExpandCollapseItemPeer = (ExpandCollapsePattern)root1Peer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
02791                 Verify.AreEqual(ExpandCollapseState.Expanded, root1ExpandCollapseItemPeer.Current.ExpandCollapseState);
02792
02793                 ClickButton("ScrollToEndOfContentTreeView");
02794                 Wait.ForIdle();
02795                 Wait.ForSeconds(5);
02796                 ClickButton("ScrollToTopOfContentTreeView");
02797                 Wait.ForIdle();
02798
02799                 // Verify tree view item is still expanded
02800                 ElementCache.Refresh();
02801                 root1 = FindElement.ByName("Root1");
02802                 Verify.IsNotNull(root1, "Verifying that we found a UIElement called Root1");
02803
02804                 root1.SetFocus();
02805                 root1Peer = AutomationElement.FocusedElement;
02806
02807                 root1ExpandCollapseItemPeer = (ExpandCollapsePattern)root1Peer.GetCurrentPattern(ExpandCollapsePattern.Pattern);
02808                 Verify.AreEqual(ExpandCollapseState.Expanded, root1ExpandCollapseItemPeer.Current.ExpandCollapseState);
02809             }
02810         }
02811
02812         private void ClickButton(string buttonName)
02813         {
02814             var button = new Button(FindElement.ByName(buttonName));
02815             button.InvokeAndWait();
02816             Wait.ForIdle();
02817         }
02818
02819         private string ReadResult()
02820         {
02821             var results = new TextBlock(FindElement.ByName("Results"));
02822             return results.DocumentText;
02823         }
02824
02825         private void TapOnTreeViewAt(double x, double y, string buttonName)
02826         {
02827             // Note: Unable to get the treeview UIObject. Using the button above and accounting
02828             // for its height as a workaround.
02829             UIObject buttonAboveTreeView = FindElement.ByName(buttonName);
02830             Verify.IsNotNull(buttonAboveTreeView, "Verifying that we found a UIElement called" + buttonName);
02831
02832             InputHelper.Tap(buttonAboveTreeView, x, buttonAboveTreeView.BoundingRectangle.Height + y);
02833             Wait.ForIdle();
02834         }
02835
02836         private void TapOnFlyoutTreeViewRootItemChevron()
02837         {
02838             // Chevron has 12px left padding, and it's 12px wide.
02839             // 18 is the center point of chevron.
02840             TapOnTreeViewAt(18, 20, "GetFlyoutItemCount");
02841         }
02842
02843         private UIObject LabelFirstItem()
02844         {
02845             ClickButton("LabelItems");
02846             Log.Comment("Retrieve first item as generic UIElement");
02847             UIObject ItemRoot = FindElement.ById("Root");
02848             Verify.IsNotNull(ItemRoot, "Verifying that we found a UIElement called Root");
02849             return ItemRoot;
02850         }
02851
02852         private void VerifyGamepadAPress(UIObject node, string expectedItemCount, string expectedSelection)
02853         {
02854             node.SetFocus();
02855             GamepadHelper.PressButton(node, GamepadButton.A);
02856             Wait.ForIdle();
02857             ClickButton("GetItemCount");
02858             Verify.AreEqual(expectedItemCount, ReadResult());
02859             ClickButton("GetSelected");
02860             Verify.AreEqual(expectedSelection, ReadResult());
02861         }
02862
02863         private void ToggleTreeViewItemCheckBox(UIObject item, int level)
02864         {
02865             InputHelper.Tap(item, item.BoundingRectangle.Width * 0.05 * level, item.BoundingRectangle.Height * .5);
02866         }
02867     }
02868 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemPresenterProperties Member List

This is the complete list of members for NavigationViewItemPresenterProperties, including all inherited members.
ClearProperties() | NavigationViewItemPresenterProperties | [static]
EnsureProperties() | NavigationViewItemPresenterProperties | [static]
Icon(winrt::IconElement const &value) | NavigationViewItemPresenterProperties |
Icon() | NavigationViewItemPresenterProperties |
IconProperty() | NavigationViewItemPresenterProperties | [inline, static]
InfoBadge(winrt::InfoBadge const &value) | NavigationViewItemPresenterProperties |
InfoBadge() | NavigationViewItemPresenterProperties |
InfoBadgeProperty() | NavigationViewItemPresenterProperties | [inline, static]
NavigationViewItemPresenterProperties() | NavigationViewItemPresenterProperties |
s_IconProperty | NavigationViewItemPresenterProperties | [static]
s_InfoBadgeProperty | NavigationViewItemPresenterProperties | [static]
s_TemplateSettingsProperty | NavigationViewItemPresenterProperties | [static]
TemplateSettings(winrt::NavigationViewItemPresenterTemplateSettings const &value) | NavigationViewItemPresenterProperties |
TemplateSettings() | NavigationViewItemPresenterProperties |
TemplateSettingsProperty() | NavigationViewItemPresenterProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollStartingEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollStartingEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenter.h"
00007 #include "ScrollingScrollStartingEventArgs.g.h"
00008
00009 class ScrollingScrollStartingEventArgs :
00010     public winrt::implementation::ScrollingScrollStartingEventArgsT<ScrollingScrollStartingEventArgs>
00011 {
00012 public:
00013     ScrollingScrollStartingEventArgs()
00014     {
00015         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00016     }
00017
00018     ~ScrollingScrollStartingEventArgs()
00019     {
00020         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00021     }
00022
00023     // IScrollingScrollStartingEventArgs overrides
00024     int32_t CorrelationId() const;
00025     double HorizontalOffset() const;
00026     double VerticalOffset() const;
00027     float ZoomFactor() const;
00028
00029     void SetCorrelationId(int32_t correlationId);
00030     void SetHorizontalOffset(double horizontalOffset);
00031     void SetVerticalOffset(double verticalOffset);
00032     void SetZoomFactor(float zoomFactor);
00033
00034 private:
00035     int32_t m_correlationId{ -1 };
00036     double m_horizontalOffset{};
00037     double m_verticalOffset{};
00038     float m_zoomFactor{};
00039 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RecyclingElementFactoryDerived Member List

This is the complete list of members for RecyclingElementFactoryDerived, including all inherited members.
_realizedElementIndices | RecyclingElementFactoryDerived | [private]
_realizedElements | RecyclingElementFactoryDerived | [private]
ClearElementFunc | RecyclingElementFactoryDerived |
GetElementCore(ElementFactoryGetArgs context) | RecyclingElementFactoryDerived | [inline, protected]
GetElementFunc | RecyclingElementFactoryDerived |
OnSelectTemplateKeyCore(object data, UIElement owner) | RecyclingElementFactoryDerived | [inline, protected]
RealizedElementIndices | RecyclingElementFactoryDerived |
RecycleElementCore(ElementFactoryRecycleArgs context) | RecyclingElementFactoryDerived | [inline, protected]
RecyclingElementFactoryDerived() | RecyclingElementFactoryDerived | [inline]
SelectTemplateIdFunc | RecyclingElementFactoryDerived |
ValidateElementIndices | RecyclingElementFactoryDerived |
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Hierarchical/HierarchicalNavigationViewDataBinding.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Hierarchical

HierarchicalNavigationViewDataBinding.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.ObjectModel;
00006 using System.Linq;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Windows.System;
00010
00011 namespace MUXControlsTestApp
00012 {
00013     public class Category
00014     {
00015         public String Content { get; set; }
00016         public String Name { get; set; }
00017         public String Icon { get; set; }
00018         public ObservableCollection<Category> Children { get; set; }
00019         public bool SelectsOnInvoked { get; set; }
00020
00021         public Category(String content, String name, String icon, ObservableCollection<Category> children, bool selectsOnInvoked)
00022         {
00023             this.Content = content;
00024             this.Name = name;
00025             this.Icon = icon;
00026             this.Children = children;
00027             this.SelectsOnInvoked = selectsOnInvoked;
00028         }
00029     }
00030
00031     public sealed partial class HierarchicalNavigationViewDataBinding : Page
00032     {
00033
00034         ObservableCollection<Category> categories = new ObservableCollection<Category>();
00035         ObservableCollection<Category> categories11 = new ObservableCollection<Category>();
00036
00037         public HierarchicalNavigationViewDataBinding()
00038         {
00039             this.InitializeComponent();
00040
00041             var categories3 = new ObservableCollection<Category>();
00042             categories3.Add(new Category("Menu Item 4", "MI4", "Icon", null, true));
00043             categories3.Add(new Category("Menu Item 5", "MI5", "Icon", null, true));
00044
00045             var categories2 = new ObservableCollection<Category>();
00046             categories2.Add(new Category("Menu Item 2", "MI2", "Icon", categories3, false));
00047             categories2.Add(new Category("Menu Item 3", "MI3", "Icon", null, true));
00048
00049             var categories5 = new ObservableCollection<Category>();
00050             categories5.Add(new Category("Menu Item 8", "MI8", "Icon", null, true));
00051             categories5.Add(new Category("Menu Item 9", "MI9", "Icon", null, true));
00052
00053             var categories4 = new ObservableCollection<Category>();
00054             categories4.Add(new Category("Menu Item 7 (Selectable)", "MI7", "Icon", categories5, true));
00055
00056             var categories7 = new ObservableCollection<Category>();
00057             categories7.Add(new Category("Menu Item 13", "MI13", "Icon", null, true));
00058             categories7.Add(new Category("Menu Item 14", "MI14", "Icon", null, true));
00059
00060             var categories6 = new ObservableCollection<Category>();
00061             categories6.Add(new Category("Menu Item 12", "MI12", "Icon", categories7, false));
00062
00063             var categories9 = new ObservableCollection<Category>();
00064             categories9.Add(new Category("Menu Item 17", "MI17", "Icon", null, true));
00065             categories9.Add(new Category("Menu Item 18", "MI18", "Icon", null, true));
00066
00067             var categories8 = new ObservableCollection<Category>();
00068             categories8.Add(new Category("Menu Item 16 (Selectable)", "MI16", "Icon", categories9, true));
00069
00070             var categories10 = new ObservableCollection<Category>();
00071
00072             var categories111 = new ObservableCollection<Category>();
00073             categories111.Add(new Category("Menu Item 21", "MI21", "Icon", null, true));
00074             categories111.Add(new Category("Menu Item 22", "MI22", "Icon", null, true));
00075
00076             categories11.Add(new Category("Menu Item 20", "MI20", "Icon", null, true));
00077             categories11.Add(new Category("Menu Item 23", "MI23", "Icon", categories111, true));
00078             categories11.Add(new Category("Menu Item 24", "MI24", "Icon", null, true));
00079
00080             categories.Add(new Category("Menu Item 1", "MI1", "Icon", categories2, false));
00081             categories.Add(new Category("Menu Item 6 (Selectable)", "MI6", "Icon", categories4, true));
00082             categories.Add(new Category("Menu Item 10", "MI10", "Icon", categories10, true));
00083             categories.Add(new Category("Menu Item 11", "MI11", "Icon", categories6, false));
00084             categories.Add(new Category("Menu Item 15", "MI15", "Icon", categories8, false));
00085             categories.Add(new Category("Menu Item 19", "MI19", "Icon", categories11, false));
00086         }
00087
00088         private void ClickedItem(object sender, NavigationViewItemInvokedEventArgs e)
00089         {
00090             var clickedItem = e.InvokedItem;
00091             var clickedItemContainer = e.InvokedItemContainer;
00092         }
00093
00094         private void PrintSelectedItem(object sender, RoutedEventArgs e)
00095         {
00096             var selectedItem = navview.SelectedItem;
00097             if(selectedItem != null)
00098             {
00099                 var label = ((Category)selectedItem).Content;
00100                 SelectedItemLabel.Text = label;
00101             }
00102             else
00103             {
00104                 SelectedItemLabel.Text = "No Item Selected";
00105             }
00106         }
00107
00108         private void AddMenuItem(object sender, RoutedEventArgs e)
00109         {
00110             categories.Add(new Category("Menu Item G", "MIG", "Icon", null, true));
00111         }
00112
00113         private int nextIndex = 25;
00114
00115         private void AddAndSelectSubMenuItem(object sender, RoutedEventArgs e)
00116         {
00117             Category newCategory = new Category($"Menu Item {nextIndex}", $"MI{nextIndex}", "Icon", null, true);
00118             categories11.Add(newCategory);
00119             navview.SelectedItem = newCategory;
00120
00121             nextIndex++;
00122         }
00123
00124         private void AddShowAndSelectSubMenuItem(object sender, RoutedEventArgs e)
00125         {
00126             Category newCategory = new Category($"Menu Item {nextIndex}", $"MI{nextIndex}", "Icon", null, true);
00127             categories11.Add(newCategory);
00128             navview.SelectedItem = newCategory;
00129
00130             NavigationViewItem container = (NavigationViewItem)navview.ContainerFromMenuItem(categories.Last());
00131
00132             if (!container.IsExpanded)
00133             {
00134                 navview.Expand(container);
00135             }
00136
00137             nextIndex++;
00138         }
00139
00140         private void SelectSubMenuItem(object sender, RoutedEventArgs e)
00141         {
00142             navview.SelectedItem = categories11[0];
00143         }
00144
00145         private void RemoveSecondMenuItem(object sender, RoutedEventArgs e)
00146         {
00147             categories.RemoveAt(1);
00148         }
00149         private void SelectSecondItem(object sender, RoutedEventArgs e)
00150         {
00151             navview.SelectedItem = categories[1];
00152         }
00153         private void SelectItemUsingAPI(object sender, RoutedEventArgs e)
00154         {
00155             navview.SelectedItem = categories[0].Children[0].Children[1];
00156         }
00157         private void OnItemExpanding(object sender, NavigationViewItemExpandingEventArgs e)
00158         {
00159             var expandingItemContainerContent = (string)(e.ExpandingItemContainer.Content);
00160             TextBlockExpandingItem.Text = expandingItemContainerContent;
00161
00162             // Verify that returned item corresponds to the returned container
00163             var item = (Category)e.ExpandingItem;
00164             var areItemAndContainerTheSame = "false";
00165             if ((string)(item.Content) == expandingItemContainerContent)
00166             {
00167                 areItemAndContainerTheSame = "true";
00168             }
00169             TextblockExpandingItemAndContainerMatch.Text = areItemAndContainerTheSame;
00170         }
00171
00172         private void OnItemCollapsed(object sender, NavigationViewItemCollapsedEventArgs e)
00173         {
00174             var collapsedItemContainerContent = (string)(e.CollapsedItemContainer.Content);
00175             TextBlockCollapsedItem.Text = collapsedItemContainerContent;
00176
00177             // Verify that returned item corresponds to the returned container
00178             var item = (Category)e.CollapsedItem;
00179             var areItemAndContainerTheSame = "false";
00180             if((string)(item.Content) == collapsedItemContainerContent)
00181             {
00182                 areItemAndContainerTheSame = "true";
00183             }
00184             TextblockCollapsedItemAndContainerMatch.Text = areItemAndContainerTheSame;
00185         }
00186
00187         private void OnSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
00188         {
00189             if (args.SelectedItemContainer != null)
00190             {
00191                 args.SelectedItemContainer.StartBringIntoView();
00192             }
00193         }
00194
00195         private void PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00196         {
00197             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00198             var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
00199             navview.PaneDisplayMode = mode;
00200         }
00201
00202         private void NavView_PaneClosed(NavigationView sender, object args)
00203         {
00204             PaneOpenedOrClosedEvent.Text = "Closed";
00205         }
00206
00207         private void NavView_PaneOpened(NavigationView sender, object args)
00208         {
00209             PaneOpenedOrClosedEvent.Text = "Opened";
00210         }
00211     }
00212 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ProgressRingDeterminate.h Source File

  • File List
  • File Members
  • ProgressRing
  • AnimatedVisuals

ProgressRingDeterminate.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 //------------------------------------------------------------------------------
00003 // <auto-generated>
00004 //     This code was generated by a tool.
00005 //
00006 //       LottieGen version:
00007 //           6.1.0+gd30fc5741e
00008 //
00009 //       Command:
00010 //           LottieGen -GenerateDependencyObject -Language Cppwinrt -InputFile ProgressRingDeterminate.json
00011 //
00012 //       Input file:
00013 //           ProgressRingDeterminate.json (2627 bytes created 14:08-07:00 Feb 7 2022)
00014 //
00015 //       Invoked on:
00016 //           KAREN @ 17:39-07:00 Feb 7 2022
00017 //
00018 //       LottieGen source:
00019 //           http://aka.ms/Lottie
00020 //
00021 //     Changes to this file may cause incorrect behavior and will be lost if
00022 //     the code is regenerated.
00023 // </auto-generated>
00024 //------------------------------------------------------------------------------
00025
00026 namespace AnimatedVisuals
00027 {
00028     // Name:        ProgressRingDeterminate - 32x32
00029     // Frame rate:  60 fps
00030     // Frame count: 120
00031     // Duration:    2000.0 mS
00032     class ProgressRingDeterminate
00033         : public winrt::implements<ProgressRingDeterminate, winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisualSource>
00034     {
00035         winrt::Microsoft::UI::Composition::CompositionPropertySet _themeProperties{ nullptr };
00036         winrt::Windows::UI::Color _themeBackground{ 0xFF, 0xD3, 0xD3, 0xD3 };
00037         winrt::Windows::UI::Color _themeForeground{ 0xFF, 0x00, 0x78, 0xD7 };
00038
00039         winrt::float4 ColorAsVector4(winrt::Windows::UI::Color color);
00040
00041         winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00042
00043         // Animation duration: 2.000 seconds.
00044         static constexpr int64_t c_durationTicks{ 20000000L };
00045
00046         // Theme property: Background.
00047         static inline const  winrt::Windows::UI::Color c_themeBackground{ 0xFF, 0xD3, 0xD3, 0xD3 };
00048
00049         // Theme property: Foreground.
00050         static inline const  winrt::Windows::UI::Color c_themeForeground{ 0xFF, 0x00, 0x78, 0xD7 };
00051
00052         winrt::Windows::UI::Color Background();
00053         void Background(winrt::Windows::UI::Color value);
00054         winrt::Windows::UI::Color Foreground();
00055         void Foreground(winrt::Windows::UI::Color value);
00056
00057     public:
00058         virtual winrt::Microsoft::UI::Composition::CompositionPropertySet GetThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00059
00060         virtual winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00061             const winrt::Microsoft::UI::Composition::Compositor& compositor,
00062             winrt::IInspectable& diagnostics);
00063     };
00064 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ListViewHeaderPage.xaml.cs Source File

  • File List
  • File Members
  • ParallaxView
  • TestUI

ListViewHeaderPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.ObjectModel;
00005 using MUXControlsTestApp.Utilities;
00006
00007 namespace MUXControlsTestApp
00008 {
00009     public sealed partial class ListViewHeaderPage : TestPage
00010     {
00011         private ObservableCollection<Ingredient> Ingredients = new ObservableCollection<Ingredient>();
00012
00013         public ListViewHeaderPage()
00014         {
00015             this.InitializeComponent();
00016             PopulateData();
00017         }
00018
00019         private void PopulateData()
00020         {
00021             this.Ingredients.Add(new Ingredient("Banana", "10 lbs", "Assets/ingredient1.png"));
00022             this.Ingredients.Add(new Ingredient("Strawberry", "27 lbs", "Assets/ingredient2.png"));
00023             this.Ingredients.Add(new Ingredient("Lemon", "12 lbs", "Assets/ingredient5.png"));
00024             this.Ingredients.Add(new Ingredient("Orange", "54 lbs", "Assets/ingredient3.png"));
00025             this.Ingredients.Add(new Ingredient("Vanilla", "2 lbs", "Assets/ingredient8.png"));
00026             this.Ingredients.Add(new Ingredient("Mint", "5 lbs", "Assets/ingredient4.png"));
00027             this.Ingredients.Add(new Ingredient("Banana", "9 lbs", "Assets/ingredient1.png"));
00028             this.Ingredients.Add(new Ingredient("Strawberry", "21 lbs", "Assets/ingredient2.png"));
00029             this.Ingredients.Add(new Ingredient("Lemon", "10 lbs", "Assets/ingredient5.png"));
00030             this.Ingredients.Add(new Ingredient("Orange", "57 lbs", "Assets/ingredient3.png"));
00031             this.Ingredients.Add(new Ingredient("Vanilla", "1 lbs", "Assets/ingredient8.png"));
00032             this.Ingredients.Add(new Ingredient("Mint", "4 lbs", "Assets/ingredient4.png"));
00033
00034             this.IngredientList1.ItemsSource = this.Ingredients;
00035             this.IngredientList2.ItemsSource = this.Ingredients;
00036             this.IngredientList3.ItemsSource = this.Ingredients;
00037         }
00038     }
00039 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterWithSimpleScrollControllersPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterWithSimpleScrollControllersPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Numerics;
00007 using Windows.Foundation;
00008 using Microsoft.UI.Composition;
00009 using Microsoft.UI.Input;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Controls.Primitives;
00013 using Microsoft.UI.Xaml.Hosting;
00014 using Microsoft.UI.Xaml.Input;
00015 using Microsoft.UI.Xaml.Media;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed partial class ScrollPresenterWithSimpleScrollControllersPage : TestPage
00020     {
00021         private CanvasScrollControllerConsumer canvasScrollControllerConsumer = null;
00022         private IScrollController horizontalScrollController = null;
00023         private IScrollController verticalScrollController = null;
00024
00025         public ScrollPresenterWithSimpleScrollControllersPage()
00026         {
00027             this.InitializeComponent();
00028             this.Loaded += ScrollPresenterWithSimpleScrollControllersPageOnLoaded;
00029         }
00030
00031         private void LogMessage(string message)
00032         {
00033             if (chkLog.IsChecked.Value)
00034             {
00035                 lstLog.Items.Add(message);
00036             }
00037         }
00038
00039         private void ScrollPresenterWithSimpleScrollControllersPageOnLoaded(object sender, RoutedEventArgs e)
00040         {
00041             Rect rect = new Rect(0.0, 0.0, 300.0, 500.0);
00042             RectangleGeometry rectGeo = new RectangleGeometry();
00043             rectGeo.Rect = rect;
00044             this.canvas.Clip = rectGeo;
00045
00046             CmbIScrollControllerConsumer_SelectionChanged(null, null);
00047         }
00048
00049         private void BtnSetHorizontalScrollController_Click(object sender, RoutedEventArgs e)
00050         {
00051             if (horizontalScrollController == null)
00052             {
00053                 horizontalScrollController = new ScrollBarController(horizontalScrollBar, lstLog, chkLog.IsChecked.Value);
00054             }
00055
00056             ((ScrollBarController)horizontalScrollController).IsEnabled = true;
00057
00058             if (cmbIScrollControllerConsumer.SelectedIndex == 0)
00059             {
00060                 if (scrollPresenter.HorizontalScrollController != horizontalScrollController)
00061                 {
00062                     scrollPresenter.HorizontalScrollController = horizontalScrollController;
00063                     LogMessage("ScrollPresenter.HorizontalScrollController set");
00064                 }
00065             }
00066             else if (canvasScrollControllerConsumer.HorizontalScrollController != horizontalScrollController)
00067             {
00068                 canvasScrollControllerConsumer.HorizontalScrollController = horizontalScrollController;
00069                 LogMessage("CanvasScrollControllerConsumer.HorizontalScrollController set");
00070             }
00071         }
00072
00073         private void BtnSetVerticalScrollController_Click(object sender, RoutedEventArgs e)
00074         {
00075             if (verticalScrollController == null)
00076             {
00077                 verticalScrollController = new ScrollBarController(verticalScrollBar, lstLog, chkLog.IsChecked.Value);
00078             }
00079
00080             ((ScrollBarController)verticalScrollController).IsEnabled = true;
00081
00082             if (cmbIScrollControllerConsumer.SelectedIndex == 0)
00083             {
00084                 if (scrollPresenter.VerticalScrollController != verticalScrollController)
00085                 {
00086                     scrollPresenter.VerticalScrollController = verticalScrollController;
00087                     LogMessage("ScrollPresenter.VerticalScrollController set");
00088                 }
00089             }
00090             else if (canvasScrollControllerConsumer.VerticalScrollController != verticalScrollController)
00091             {
00092                 canvasScrollControllerConsumer.VerticalScrollController = verticalScrollController;
00093                 LogMessage("CanvasScrollControllerConsumer.VerticalScrollController set");
00094             }
00095         }
00096
00097         private void BtnResetHorizontalScrollController_Click(object sender, RoutedEventArgs e)
00098         {
00099             if (scrollPresenter != null && scrollPresenter.HorizontalScrollController != null)
00100             {
00101                 scrollPresenter.HorizontalScrollController = null;
00102                 LogMessage("ScrollPresenter.HorizontalScrollController reset");
00103             }
00104
00105             if (canvasScrollControllerConsumer != null && canvasScrollControllerConsumer.HorizontalScrollController != null)
00106             {
00107                 canvasScrollControllerConsumer.HorizontalScrollController = null;
00108                 LogMessage("CanvasScrollControllerConsumer.HorizontalScrollController reset");
00109             }
00110
00111             if (horizontalScrollController != null)
00112                 ((ScrollBarController)horizontalScrollController).IsEnabled = false;
00113         }
00114
00115         private void BtnResetVerticalScrollController_Click(object sender, RoutedEventArgs e)
00116         {
00117             if (scrollPresenter != null && scrollPresenter.VerticalScrollController != null)
00118             {
00119                 scrollPresenter.VerticalScrollController = null;
00120                 LogMessage("ScrollPresenter.VerticalScrollController reset");
00121             }
00122             if (canvasScrollControllerConsumer != null && canvasScrollControllerConsumer.VerticalScrollController != null)
00123             {
00124                 canvasScrollControllerConsumer.VerticalScrollController = null;
00125                 LogMessage("CanvasScrollControllerConsumer.VerticalScrollController reset");
00126             }
00127
00128             if (verticalScrollController != null)
00129                 ((ScrollBarController)verticalScrollController).IsEnabled = false;
00130         }
00131
00132         private void BtnClearLog_Click(object sender, RoutedEventArgs e)
00133         {
00134             lstLog.Items.Clear();
00135         }
00136
00137         private void CmbIScrollControllerConsumer_SelectionChanged(object sender, SelectionChangedEventArgs e)
00138         {
00139             if (lstLog != null)
00140             {
00141                 BtnResetHorizontalScrollController_Click(null, null);
00142                 BtnResetVerticalScrollController_Click(null, null);
00143
00144                 if (cmbIScrollControllerConsumer.SelectedIndex == 0)
00145                 {
00146                     scrollPresenter.Visibility = Visibility.Visible;
00147                     canvas.Visibility = Visibility.Collapsed;
00148                 }
00149                 else
00150                 {
00151                     scrollPresenter.Visibility = Visibility.Collapsed;
00152                     canvas.Visibility = Visibility.Visible;
00153                 }
00154
00155                 if (cmbIScrollControllerConsumer.SelectedIndex == 1)
00156                 {
00157                     if (canvasScrollControllerConsumer == null)
00158                     {
00159                         canvasScrollControllerConsumer = new CanvasScrollControllerConsumer(lstLog, canvas, img2, chkLog.IsChecked.Value);
00160                     }
00161
00162                     canvasScrollControllerConsumer.IsEnabled = true;
00163                 }
00164                 else
00165                 {
00166                     canvasScrollControllerConsumer.IsEnabled = false;
00167                 }
00168
00169                 LogMessage(cmbIScrollControllerConsumer.SelectedIndex == 0 ? "ScrollPresenter is consumer" : "CanvasScrollControllerConsumer is consumer");
00170             }
00171         }
00172
00173         private void ChkLog_Checked(object sender, RoutedEventArgs e)
00174         {
00175             if (canvasScrollControllerConsumer != null)
00176                 canvasScrollControllerConsumer.IsLogging = true;
00177             if (horizontalScrollController != null)
00178                 ((ScrollBarController)horizontalScrollController).IsLogging = true;
00179             if (verticalScrollController != null)
00180                 ((ScrollBarController)verticalScrollController).IsLogging = true;
00181         }
00182
00183         private void ChkLog_Unchecked(object sender, RoutedEventArgs e)
00184         {
00185             if (canvasScrollControllerConsumer != null)
00186                 canvasScrollControllerConsumer.IsLogging = false;
00187             if (horizontalScrollController != null)
00188                 ((ScrollBarController)horizontalScrollController).IsLogging = false;
00189             if (verticalScrollController != null)
00190                 ((ScrollBarController)verticalScrollController).IsLogging = false;
00191         }
00192     }
00193
00194     public class CanvasScrollControllerConsumer
00195     {
00196         private CompositionPropertySet horizontalPS = null;
00197         private CompositionPropertySet verticalPS = null;
00198         private IScrollController horizontalScrollController = null;
00199         private IScrollController verticalScrollController = null;
00200         private ListBox lstLog = null;
00201         private Canvas canvas = null;
00202         private FrameworkElement scrolledElement = null;
00203         private double preManipulationHorizontalOffset = 0.0;
00204         private double preManipulationVerticalOffset = 0.0;
00205         private bool isEnabled = true;
00206
00207         public CanvasScrollControllerConsumer(ListBox lstLog, Canvas canvas, FrameworkElement scrolledElement, bool isLogging)
00208         {
00209             this.lstLog = lstLog;
00210             this.canvas = canvas;
00211             this.scrolledElement = scrolledElement;
00212             this.IsLogging = isLogging;
00213
00214             scrolledElement.ManipulationStarting += ScrolledElementManipulationStarting;
00215             scrolledElement.ManipulationDelta += ScrolledElementManipulationDelta;
00216             scrolledElement.ManipulationCompleted += ScrolledElementManipulationCompleted;
00217
00218             Visual visual = ElementCompositionPreview.GetElementVisual(lstLog);
00219             Compositor compositor = visual.Compositor;
00220
00221             horizontalPS = compositor.CreatePropertySet();
00222             horizontalPS.InsertScalar("CustomMinOffset", 0.0f);
00223             horizontalPS.InsertScalar("CustomMaxOffset", 0.0f);
00224             horizontalPS.InsertScalar("CustomOffset", 0.0f);
00225             horizontalPS.InsertScalar("CustomViewportLength", 0.0f);
00226
00227             verticalPS = compositor.CreatePropertySet();
00228             verticalPS.InsertScalar("CustomMinOffset", 0.0f);
00229             verticalPS.InsertScalar("CustomMaxOffset", 0.0f);
00230             verticalPS.InsertScalar("CustomOffset", 0.0f);
00231             verticalPS.InsertScalar("CustomViewportLength", 0.0f);
00232
00233             SetHorizontalInfo(Math.Max(0.0, scrolledElement.ActualWidth - canvas.ActualWidth), canvas.ActualWidth);
00234             SetVerticalInfo(Math.Max(0.0, scrolledElement.ActualHeight - canvas.ActualHeight), canvas.ActualWidth);
00235         }
00236
00237         public bool IsLogging
00238         {
00239             get;
00240             set;
00241         }
00242
00243         public bool IsEnabled
00244         {
00245             get
00246             {
00247                 return isEnabled;
00248             }
00249             set
00250             {
00251                 isEnabled = value;
00252
00253                 if (value)
00254                 {
00255                     SetHorizontalOffset(-Canvas.GetLeft(scrolledElement));
00256                     SetVerticalOffset(-Canvas.GetTop(scrolledElement));
00257                 }
00258             }
00259         }
00260
00261         private void SetHorizontalInfo(double maxOffset, double viewportLength)
00262         {
00263             horizontalPS.InsertScalar("CustomMaxOffset", (float)maxOffset);
00264             horizontalPS.InsertScalar("CustomViewportLength", (float)viewportLength);
00265         }
00266
00267         private double GetHorizontalViewportLength()
00268         {
00269             float viewportLength = 0.0f;
00270             horizontalPS.TryGetScalar("CustomViewportLength", out viewportLength);
00271             return (double)viewportLength;
00272         }
00273
00274         private double GetHorizontalMaxOffset()
00275         {
00276             float maxOffset = 0.0f;
00277             horizontalPS.TryGetScalar("CustomMaxOffset", out maxOffset);
00278             return (double)maxOffset;
00279         }
00280
00281         private void SetHorizontalOffset(double offset)
00282         {
00283             horizontalPS.InsertScalar("CustomOffset", (float)offset);
00284         }
00285
00286         private double GetHorizontalOffset()
00287         {
00288             float offset = 0.0f;
00289             horizontalPS.TryGetScalar("CustomOffset", out offset);
00290             return (double)offset;
00291         }
00292
00293         private void SetVerticalInfo(double maxOffset, double viewportLength)
00294         {
00295             verticalPS.InsertScalar("CustomMaxOffset", (float)maxOffset);
00296             verticalPS.InsertScalar("CustomViewportLength", (float)viewportLength);
00297         }
00298
00299         private double GetVerticalViewportLength()
00300         {
00301             float viewportLength = 0.0f;
00302             verticalPS.TryGetScalar("CustomViewportLength", out viewportLength);
00303             return (double)viewportLength;
00304         }
00305
00306         private double GetVerticalMaxOffset()
00307         {
00308             float maxOffset = 0.0f;
00309             verticalPS.TryGetScalar("CustomMaxOffset", out maxOffset);
00310             return (double)maxOffset;
00311         }
00312
00313         private void SetVerticalOffset(double offset)
00314         {
00315             verticalPS.InsertScalar("CustomOffset", (float)offset);
00316         }
00317
00318         private double GetVerticalOffset()
00319         {
00320             float offset = 0.0f;
00321             verticalPS.TryGetScalar("CustomOffset", out offset);
00322             return (double)offset;
00323         }
00324
00325         public IScrollController HorizontalScrollController
00326         {
00327             get
00328             {
00329                 return horizontalScrollController;
00330             }
00331             set
00332             {
00333                 if (horizontalScrollController != value)
00334                 {
00335                     if (horizontalScrollController != null)
00336                     {
00337                         horizontalScrollController.CanScrollChanged -= OnCanScrollChanged;
00338                         horizontalScrollController.IsScrollingWithMouseChanged -= OnIsScrollingWithMouseChanged;
00339                         horizontalScrollController.ScrollToRequested -= OnScrollToRequested;
00340                         horizontalScrollController.ScrollByRequested -= OnScrollByRequested;
00341                         horizontalScrollController.AddScrollVelocityRequested -= OnAddScrollVelocityRequested;
00342                         LogMessage("CanvasScrollControllerConsumer: old HorizontalScrollController events unhooked");
00343                     }
00344
00345                     horizontalScrollController = value;
00346
00347                     if (horizontalScrollController != null)
00348                     {
00349                         horizontalScrollController.CanScrollChanged += OnCanScrollChanged;
00350                         horizontalScrollController.IsScrollingWithMouseChanged += OnIsScrollingWithMouseChanged;
00351                         horizontalScrollController.ScrollToRequested += OnScrollToRequested;
00352                         horizontalScrollController.ScrollByRequested += OnScrollByRequested;
00353                         horizontalScrollController.AddScrollVelocityRequested += OnAddScrollVelocityRequested;
00354                         LogMessage("CanvasScrollControllerConsumer: new HorizontalScrollController events hooked");
00355
00356                         horizontalScrollController.SetValues(
00357                             0.0                           /*minOffset*/,
00358                             GetHorizontalMaxOffset()      /*maxOffset*/,
00359                             GetHorizontalOffset()         /*offset*/,
00360                             GetHorizontalViewportLength() /*viewportLength*/);
00361                     }
00362                 }
00363             }
00364         }
00365
00366         public IScrollController VerticalScrollController
00367         {
00368             get
00369             {
00370                 return verticalScrollController;
00371             }
00372             set
00373             {
00374                 if (verticalScrollController != value)
00375                 {
00376                     if (verticalScrollController != null)
00377                     {
00378                         verticalScrollController.CanScrollChanged -= OnCanScrollChanged;
00379                         verticalScrollController.IsScrollingWithMouseChanged -= OnIsScrollingWithMouseChanged;
00380                         verticalScrollController.ScrollToRequested -= OnScrollToRequested;
00381                         verticalScrollController.ScrollByRequested -= OnScrollByRequested;
00382                         verticalScrollController.AddScrollVelocityRequested -= OnAddScrollVelocityRequested;
00383                         LogMessage("CanvasScrollControllerConsumer: old VerticalScrollController events unhooked");
00384                     }
00385
00386                     verticalScrollController = value;
00387
00388                     if (verticalScrollController != null)
00389                     {
00390                         verticalScrollController.CanScrollChanged += OnCanScrollChanged;
00391                         verticalScrollController.IsScrollingWithMouseChanged += OnIsScrollingWithMouseChanged;
00392                         verticalScrollController.ScrollToRequested += OnScrollToRequested;
00393                         verticalScrollController.ScrollByRequested += OnScrollByRequested;
00394                         verticalScrollController.AddScrollVelocityRequested += OnAddScrollVelocityRequested;
00395                         LogMessage("CanvasScrollControllerConsumer: new VerticalScrollController events hooked");
00396
00397                         verticalScrollController.SetValues(
00398                             0.0                         /*minOffset*/,
00399                             GetVerticalMaxOffset()      /*maxOffset*/,
00400                             GetVerticalOffset()         /*offset*/,
00401                             GetVerticalViewportLength() /*viewportLength*/);
00402                     }
00403                 }
00404             }
00405         }
00406
00407         private void OnCanScrollChanged(IScrollController sender, object e)
00408         {
00409             if (sender == horizontalScrollController)
00410             {
00411                 LogMessage("CanvasScrollControllerConsumer: OnCanScrollChanged for HorizontalScrollController");
00412             }
00413             else if (sender == verticalScrollController)
00414             {
00415                 LogMessage("CanvasScrollControllerConsumer: OnCanScrollChanged for VerticalScrollController");
00416             }
00417             else
00418             {
00419                 LogMessage("CanvasScrollControllerConsumer: OnCanScrollChanged for unknown sender");
00420             }
00421         }
00422
00423         private void OnIsScrollingWithMouseChanged(IScrollController sender, object e)
00424         {
00425             if (sender == horizontalScrollController)
00426             {
00427                 LogMessage("CanvasScrollControllerConsumer: OnIsScrollingWithMouseChanged for HorizontalScrollController");
00428             }
00429             else if (sender == verticalScrollController)
00430             {
00431                 LogMessage("CanvasScrollControllerConsumer: OnIsScrollingWithMouseChanged for VerticalScrollController");
00432             }
00433             else
00434             {
00435                 LogMessage("CanvasScrollControllerConsumer: OnIsScrollingWithMouseChanged for unknown sender");
00436             }
00437         }
00438
00439         private void OnScrollToRequested(IScrollController sender, ScrollControllerScrollToRequestedEventArgs e)
00440         {
00441             if (sender == horizontalScrollController)
00442             {
00443                 LogMessage("CanvasScrollControllerConsumer: OnScrollToRequested for HorizontalScrollController");
00444                 LogMessage("Offset=" + e.Offset + ", AnimationMode=" + e.Options.AnimationMode + ", SnapPointsMode=" + e.Options.SnapPointsMode);
00445
00446                 if (e.Options.AnimationMode == ScrollingAnimationMode.Disabled)
00447                 {
00448                     Canvas.SetLeft(scrolledElement, -e.Offset);
00449                 }
00450             }
00451             else if (sender == verticalScrollController)
00452             {
00453                 LogMessage("CanvasScrollControllerConsumer: OnScrollToRequested for VerticalScrollController");
00454                 LogMessage("Offset=" + e.Offset + ", AnimationMode=" + e.Options.AnimationMode + ", SnapPointsMode=" + e.Options.SnapPointsMode);
00455
00456                 if (e.Options.AnimationMode == ScrollingAnimationMode.Disabled)
00457                 {
00458                     Canvas.SetTop(scrolledElement, -e.Offset);
00459                 }
00460             }
00461             else
00462             {
00463                 LogMessage("CanvasScrollControllerConsumer: OnScrollToRequested for unknown sender");
00464             }
00465         }
00466
00467         private void OnScrollByRequested(IScrollController sender, ScrollControllerScrollByRequestedEventArgs e)
00468         {
00469             if (sender == horizontalScrollController || sender == verticalScrollController)
00470             {
00471                 LogMessage("CanvasScrollControllerConsumer: OnScrollByRequested for " + (sender == horizontalScrollController ? "HorizontalScrollController" : "VerticalScrollController"));
00472                 LogMessage("OffsetDelta=" + e.OffsetDelta + ", AnimationMode=" + e.Options.AnimationMode + ", SnapPointsMode=" + e.Options.SnapPointsMode);
00473             }
00474             else
00475             {
00476                 LogMessage("CanvasScrollControllerConsumer: OnScrollByRequested for unknown sender");
00477             }
00478         }
00479
00480         private void OnAddScrollVelocityRequested(IScrollController sender, ScrollControllerAddScrollVelocityRequestedEventArgs e)
00481         {
00482             if (sender == horizontalScrollController)
00483             {
00484                 LogMessage("CanvasScrollControllerConsumer: OnAddScrollVelocityRequested for HorizontalScrollController");
00485             }
00486             else if (sender == verticalScrollController)
00487             {
00488                 LogMessage("CanvasScrollControllerConsumer: OnAddScrollVelocityRequested for VerticalScrollController");
00489             }
00490             else
00491             {
00492                 LogMessage("CanvasScrollControllerConsumer: OnAddScrollVelocityRequested for unknown sender");
00493             }
00494         }
00495
00496         private void ScrolledElementManipulationStarting(object sender, ManipulationStartingRoutedEventArgs e)
00497         {
00498             preManipulationHorizontalOffset = -Canvas.GetLeft(scrolledElement);
00499             preManipulationVerticalOffset = -Canvas.GetTop(scrolledElement);
00500         }
00501
00502         private void ScrolledElementManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
00503         {
00504             UpdateOffsets(e.Cumulative.Translation);
00505         }
00506
00507         private void ScrolledElementManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
00508         {
00509             UpdateOffsets(e.Cumulative.Translation, true);
00510
00511             preManipulationHorizontalOffset = 0.0;
00512             preManipulationVerticalOffset = 0.0;
00513         }
00514
00515         private void UpdateOffsets(Point cumulativeTranslation, bool clamp = false)
00516         {
00517             double newHorizontalOffset = preManipulationHorizontalOffset - cumulativeTranslation.X;
00518             double newVerticalOffset = preManipulationVerticalOffset - cumulativeTranslation.Y;
00519
00520             if (clamp)
00521             {
00522                 newHorizontalOffset = Math.Max(0.0, newHorizontalOffset);
00523                 newVerticalOffset = Math.Max(0.0, newVerticalOffset);
00524
00525                 newHorizontalOffset = Math.Min(GetHorizontalMaxOffset(), newHorizontalOffset);
00526                 newVerticalOffset = Math.Min(GetVerticalMaxOffset(), newVerticalOffset);
00527             }
00528
00529             Canvas.SetLeft(scrolledElement, -newHorizontalOffset);
00530             Canvas.SetTop(scrolledElement, -newVerticalOffset);
00531
00532             SetHorizontalOffset(newHorizontalOffset);
00533             SetVerticalOffset(newVerticalOffset);
00534
00535             if (horizontalScrollController != null)
00536                 horizontalScrollController.SetValues(
00537                     0.0                           /*minOffset*/,
00538                     GetHorizontalMaxOffset()      /*maxOffset*/,
00539                     GetHorizontalOffset()         /*offset*/,
00540                     GetHorizontalViewportLength() /*viewportLength*/);
00541
00542             if (verticalScrollController != null)
00543                 verticalScrollController.SetValues(
00544                     0.0                         /*minOffset*/,
00545                     GetVerticalMaxOffset()      /*maxOffset*/,
00546                     GetVerticalOffset()         /*offset*/,
00547                     GetVerticalViewportLength() /*viewportLength*/);
00548         }
00549
00550         private void LogMessage(string message)
00551         {
00552             if (IsLogging)
00553             {
00554                 lstLog.Items.Add(message);
00555             }
00556         }
00557     }
00558
00559     public class ScrollBarController : IScrollController
00560     {
00561         private ListBox lstLog = null;
00562         private ScrollBar scrollBar = null;
00563         private int operationsCount = 0;
00564         private Object asyncEventReportingLock = new Object();
00565         private List<string> lstAsyncEventMessage = new List<string>();
00566         private List<int> lstScrollToCorrelationIds = new List<int>();
00567         private List<int> lstScrollByCorrelationIds = new List<int>();
00568         private List<int> lstAddScrollVelocityCorrelationIds = new List<int>();
00569
00570         public event TypedEventHandler<IScrollController, object> CanScrollChanged;
00571         public event TypedEventHandler<IScrollController, object> IsScrollingWithMouseChanged;
00572         public event TypedEventHandler<IScrollController, ScrollControllerScrollToRequestedEventArgs> ScrollToRequested;
00573         public event TypedEventHandler<IScrollController, ScrollControllerScrollByRequestedEventArgs> ScrollByRequested;
00574         public event TypedEventHandler<IScrollController, ScrollControllerAddScrollVelocityRequestedEventArgs> AddScrollVelocityRequested;
00575
00576         public ScrollBarController(ScrollBar scrollBar, ListBox logList, bool isLogging)
00577         {
00578             this.scrollBar = scrollBar;
00579             this.IsLogging = isLogging;
00580             this.IsScrollingWithMouse = false;
00581
00582             lstLog = logList;
00583             LogMessage("ScrollBarController: constructor for Orientation=" + Orientation);
00584
00585             scrollBar.SmallChange = 16.0;
00586             scrollBar.ValueChanged += ScrollBarValueChanged;
00587             scrollBar.Scroll += ScrollBarScroll;
00588         }
00589
00590         public bool IsLogging
00591         {
00592             get;
00593             set;
00594         }
00595
00596         public bool IsEnabled
00597         {
00598             get
00599             {
00600                 return scrollBar.IsEnabled;
00601             }
00602             set
00603             {
00604                 scrollBar.IsEnabled = value;
00605                 if (!value)
00606                     scrollBar.Value = 0.0;
00607             }
00608         }
00609
00610         public Orientation Orientation
00611         {
00612             get
00613             {
00614                 return scrollBar.Orientation;
00615             }
00616         }
00617
00618         public IScrollControllerPanningInfo PanningInfo
00619         {
00620             get
00621             {
00622                 return null;
00623             }
00624         }
00625
00626         public bool CanScroll
00627         {
00628             get;
00629             private set;
00630         }
00631
00632         public bool IsScrollingWithMouse
00633         {
00634             get;
00635             private set;
00636         }
00637
00638         public void SetIsScrollable(bool isScrollable)
00639         {
00640             LogMessage("ScrollBarController: SetIsScrollable for Orientation=" + Orientation + " with isScrollable=" + isScrollable);
00641             bool oldCanScroll = CanScroll;
00642
00643             CanScroll = isScrollable && IsEnabled;
00644
00645             if (oldCanScroll != CanScroll)
00646             {
00647                 RaiseCanScrollChanged();
00648             }
00649         }
00650
00651         public void SetValues(
00652             double minOffset,
00653             double maxOffset,
00654             double offset,
00655             double viewportLength)
00656         {
00657             LogMessage("ScrollBarController: SetValues for Orientation=" + Orientation + " with maxOffset=" + maxOffset + ", offset=" + offset + ", viewportLength=" + viewportLength);
00658
00659             if (operationsCount > 0)
00660             {
00661                 LogMessage("ScrollBarController: SetValues ignored during operation");
00662                 return;
00663             }
00664
00665             scrollBar.ViewportSize = viewportLength;
00666             scrollBar.Minimum = minOffset;
00667             scrollBar.Maximum = maxOffset;
00668             scrollBar.Value = offset;
00669             scrollBar.LargeChange = viewportLength;
00670         }
00671
00672         public CompositionAnimation GetScrollAnimation(
00673             int correlationId,
00674             Vector2 startPosition,
00675             Vector2 endPosition,
00676             CompositionAnimation defaultAnimation)
00677         {
00678             LogMessage(
00679                 "ScrollBarController: GetScrollAnimation for Orientation=" + Orientation +
00680                 " with offsetChangeCorrelationId=" + correlationId + ", startPosition=" + startPosition + ", endPosition=" + endPosition);
00681             return null;
00682         }
00683
00684         public void NotifyRequestedScrollCompleted(
00685             int correlationId)
00686         {
00687             int offsetChangeCorrelationId = correlationId;
00688
00689             LogMessage(
00690                 "ScrollBarController: NotifyRequestedScrollCompleted for Orientation=" + Orientation +
00691                 " with offsetChangeCorrelationId=" + offsetChangeCorrelationId);
00692
00693             if (lstScrollToCorrelationIds.Contains(offsetChangeCorrelationId))
00694             {
00695                 lstScrollToCorrelationIds.Remove(offsetChangeCorrelationId);
00696                 operationsCount--;
00697             }
00698             else if (lstScrollByCorrelationIds.Contains(offsetChangeCorrelationId))
00699             {
00700                 lstScrollByCorrelationIds.Remove(offsetChangeCorrelationId);
00701                 operationsCount--;
00702             }
00703             else if (lstAddScrollVelocityCorrelationIds.Contains(offsetChangeCorrelationId))
00704             {
00705                 lstAddScrollVelocityCorrelationIds.Remove(offsetChangeCorrelationId);
00706                 operationsCount--;
00707             }
00708         }
00709
00710         private void ScrollBarValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00711         {
00712             LogMessage("ScrollBarController: ScrollBarValueChanged for Orientation=" + Orientation + " with Value=" + scrollBar.Value);
00713         }
00714
00715         private void ScrollBarScroll(object sender, ScrollEventArgs e)
00716         {
00717             LogMessage("ScrollBarController: ScrollBarScroll for Orientation=" + Orientation + " with ScrollEventType=" + e.ScrollEventType + ", NewValue = " + e.NewValue);
00718
00719             switch (e.ScrollEventType)
00720             {
00721                 case ScrollEventType.EndScroll:
00722                     if (IsScrollingWithMouse)
00723                     {
00724                         IsScrollingWithMouse = false;
00725                         RaiseIsScrollingWithMouseChanged();
00726                     }
00727                     break;
00728                 case ScrollEventType.LargeDecrement:
00729                 case ScrollEventType.LargeIncrement:
00730                 case ScrollEventType.SmallDecrement:
00731                 case ScrollEventType.SmallIncrement:
00732                 case ScrollEventType.ThumbPosition:
00733                 case ScrollEventType.ThumbTrack:
00734
00735                     if (e.ScrollEventType == ScrollEventType.ThumbTrack && !IsScrollingWithMouse)
00736                     {
00737                         IsScrollingWithMouse = true;
00738                         RaiseIsScrollingWithMouseChanged();
00739                     }
00740
00741                     int offsetChangeCorrelationId = RaiseScrollToRequested(
00742                         e.NewValue,
00743                         ScrollingAnimationMode.Disabled);
00744                     break;
00745             }
00746         }
00747
00748         private void RaiseCanScrollChanged()
00749         {
00750             LogMessage("ScrollBarController: RaiseCanScrollChanged for Orientation=" + Orientation);
00751             if (CanScrollChanged != null)
00752             {
00753                 CanScrollChanged(this, null);
00754             }
00755         }
00756
00757         private void RaiseIsScrollingWithMouseChanged()
00758         {
00759             LogMessage("ScrollBarController: RaiseIsScrollingWithMouseChanged for Orientation=" + Orientation);
00760             if (IsScrollingWithMouseChanged != null)
00761             {
00762                 IsScrollingWithMouseChanged(this, null);
00763             }
00764         }
00765
00766         private int RaiseScrollToRequested(
00767             double offset,
00768             ScrollingAnimationMode animationMode)
00769         {
00770             LogMessage("ScrollBarController: RaiseScrollToRequested for Orientation=" + Orientation + " with offset=" + offset + ", animationMode=" + animationMode);
00771             if (ScrollToRequested != null)
00772             {
00773                 ScrollControllerScrollToRequestedEventArgs e =
00774                     new ScrollControllerScrollToRequestedEventArgs(
00775                         offset,
00776                         new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
00777                 ScrollToRequested(this, e);
00778                 if (e.CorrelationId != -1 && !lstScrollToCorrelationIds.Contains(e.CorrelationId))
00779                 {
00780                     operationsCount++;
00781                     lstScrollToCorrelationIds.Add(e.CorrelationId);
00782                 }
00783                 return e.CorrelationId;
00784             }
00785             return -1;
00786         }
00787
00788         private int RaiseScrollByRequested(
00789             double offsetDelta,
00790             ScrollingAnimationMode animationMode)
00791         {
00792             LogMessage("ScrollBarController: RaiseScrollByRequested for Orientation=" + Orientation + " with offsetDelta=" + offsetDelta + ", animationMode=" + animationMode);
00793             if (ScrollToRequested != null)
00794             {
00795                 ScrollControllerScrollByRequestedEventArgs e =
00796                     new ScrollControllerScrollByRequestedEventArgs(
00797                         offsetDelta,
00798                         new ScrollingScrollOptions(animationMode, ScrollingSnapPointsMode.Ignore));
00799                 ScrollByRequested(this, e);
00800                 if (e.CorrelationId != -1 && !lstScrollByCorrelationIds.Contains(e.CorrelationId))
00801                 {
00802                     operationsCount++;
00803                     lstScrollByCorrelationIds.Add(e.CorrelationId);
00804                 }
00805                 return e.CorrelationId;
00806             }
00807             return -1;
00808         }
00809
00810         private int RaiseAddScrollVelocityRequested(
00811             float offsetVelocity, float? inertiaDecayRate)
00812         {
00813             LogMessage("ScrollBarController: RaiseAddScrollVelocityRequested for Orientation=" + Orientation + " with offsetVelocity=" + offsetVelocity + ", inertiaDecayRate=" + inertiaDecayRate);
00814             if (AddScrollVelocityRequested != null)
00815             {
00816                 ScrollControllerAddScrollVelocityRequestedEventArgs e =
00817                     new ScrollControllerAddScrollVelocityRequestedEventArgs(
00818                         offsetVelocity,
00819                         inertiaDecayRate);
00820                 AddScrollVelocityRequested(this, e);
00821                 if (e.CorrelationId != -1 && !lstAddScrollVelocityCorrelationIds.Contains(e.CorrelationId))
00822                 {
00823                     operationsCount++;
00824                     lstAddScrollVelocityCorrelationIds.Add(e.CorrelationId);
00825                 }
00826                 return e.CorrelationId;
00827             }
00828             return -1;
00829         }
00830
00831         private void LogMessage(string message)
00832         {
00833             if (IsLogging)
00834             {
00835                 lstLog.Items.Add(message);
00836             }
00837         }
00838     }
00839 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ContrastEffect Member List

This is the complete list of members for ContrastEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1Contrast) | ContrastEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"Contrast", D2D1_CONTRAST_PROP_CONTRAST, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"ClampSource", D2D1_CONTRAST_PROP_CLAMP_INPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | ContrastEffect |
DECLARE_POD_PROPERTY(Contrast, float, 0.0f, value >=-1.0f &&value<=1.0f) | ContrastEffect |
DECLARE_POD_PROPERTY(ClampSource, bool, false, true) | ContrastEffect |
DECLARE_SINGLE_SOURCE(Source) | ContrastEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | ContrastEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | ContrastEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Regression/NavigationViewRS4Page.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Regression

NavigationViewRS4Page.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Controls.Primitives;
00007 using Microsoft.UI.Xaml.Media;
00008 using Microsoft.UI.Xaml.Navigation;
00009 using Microsoft.UI.Xaml.Automation;
00010 using Microsoft.UI.Private.Media;
00011 using System;
00012 using Windows.ApplicationModel.Core;
00013 using Windows.UI.Core;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public sealed partial class NavigationViewRS4Page : TestPage
00018     {
00019         private int m_newItemIndex = 0;
00020         private int m_closingEventsFired = 0;
00021         private int m_closedEventsFired = 0;
00022
00023         public NavigationViewRS4Page()
00024         {
00025             this.InitializeComponent();
00026
00027             this.Loaded += NavigationViewRS4Page_Loaded;
00028
00029             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00030             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00031
00032             IntegerItem.Content = 7; // Testing that boxed ints don't cause crashes in tooltips
00033         }
00034
00035         protected override void OnNavigatedFrom(NavigationEventArgs e)
00036         {
00037             // Unset all override flags to avoid impacting subsequent tests
00038             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00039             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00040
00041             base.OnNavigatedFrom(e);
00042         }
00043
00044         private void NavigationViewRS4Page_Loaded(object sender, RoutedEventArgs e)
00045         {
00046             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00047             if (rootGrid != null)
00048             {
00049                 Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
00050                 if (paneContentGrid != null)
00051                 {
00052                     Button toggleButton = paneContentGrid.FindName("TogglePaneButton") as Button;
00053                     if (toggleButton != null)
00054                     {
00055                         toggleButton.RegisterPropertyChangedCallback(Button.BackgroundProperty, new DependencyPropertyChangedCallback(ToggleBackgroundChanged));
00056                         UpdateToggleBackgroundColor(toggleButton);
00057                     }
00058                 }
00059             }
00060
00061             SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
00062             PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
00063             HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;
00064
00065             NavView.SelectedItem = HomeItem;
00066
00067             FindAndGiveAutomationNameToVisualChild("NavigationViewBackButton");
00068         }
00069
00070         private void ToggleBackgroundChanged(DependencyObject o, DependencyProperty p)
00071         {
00072             UpdateToggleBackgroundColor(o as Button);
00073         }
00074
00075         private void UpdateToggleBackgroundColor(Button toggleButton)
00076         {
00077             if (toggleButton.Background != null && toggleButton.Background is SolidColorBrush)
00078             {
00079                 ToggleButtonBackgroundColor.Text = (toggleButton.Background as SolidColorBrush).Color.ToString();
00080             }
00081             else
00082             {
00083                 ToggleButtonBackgroundColor.Text = String.Empty;
00084             }
00085         }
00086
00087         private void OpenPaneButton_Click(object sender, RoutedEventArgs e)
00088         {
00089             NavView.IsPaneOpen = true;
00090         }
00091
00092         private void ChangeContent_Click(object sender, RoutedEventArgs e)
00093         {
00094             NavView.Content = new TextBox();
00095         }
00096
00097         private void CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00098         {
00099             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00100             NavView.CompactModeThresholdWidth = tag;
00101         }
00102
00103         private void ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00104         {
00105             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00106             NavView.ExpandedModeThresholdWidth = tag;
00107         }
00108
00109         private void TestPage_Loaded(object sender, RoutedEventArgs e)
00110         {
00111         }
00112
00113         private void SelectedItemCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00114         {
00115             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00116             if (tag == "Home")
00117             {
00118                 NavView.SelectedItem = HomeItem;
00119             }
00120             else if (tag == "Apps")
00121             {
00122                 AppsItem.IsSelected = true;
00123             }
00124             else if (tag == "Games")
00125             {
00126                 NavView.SelectedItem = GamesItem;
00127             }
00128             else if (tag == "Music")
00129             {
00130                 NavView.SelectedItem = MusicItem;
00131             }
00132             else if (tag == "Movies")
00133             {
00134                 NavView.SelectedItem = MoviesItem;
00135             }
00136             else if (tag == "TV")
00137             {
00138                 NavView.SelectedItem = TVItem;
00139             }
00140             else if (tag == "Settings")
00141             {
00142                 NavView.SelectedItem = NavView.SettingsItem;
00143             }
00144         }
00145
00146         private void SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00147         {
00148             NavView.IsSettingsVisible = true;
00149         }
00150
00151         private void SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00152         {
00153             NavView.IsSettingsVisible = false;
00154         }
00155
00156         private void PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00157         {
00158             NavView.IsPaneToggleButtonVisible = true;
00159         }
00160
00161         private void PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00162         {
00163             NavView.IsPaneToggleButtonVisible = false;
00164         }
00165
00166         private void ToggleButtonStyleCheckbox_Checked(object sender, RoutedEventArgs e)
00167         {
00168             NavView.PaneToggleButtonStyle = this.Resources["AlternateToggleButtonStyle"] as Style;
00169         }
00170
00171         private void ToggleButtonStyleCheckbox_Unchecked(object sender, RoutedEventArgs e)
00172         {
00173             NavView.PaneToggleButtonStyle = Application.Current.Resources["PaneToggleButtonStyle"] as Style;
00174         }
00175
00176         private void CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00177         {
00178             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00179             NavView.CompactPaneLength = tag;
00180         }
00181
00182         private void OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00183         {
00184             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00185             NavView.OpenPaneLength = tag;
00186         }
00187
00188         private void NavView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
00189         {
00190             switch (args.DisplayMode)
00191             {
00192                 case NavigationViewDisplayMode.Minimal:
00193                     DisplayModeTextBox.Text = "Minimal";
00194                     DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DodgerBlue);
00195                     break;
00196                 case NavigationViewDisplayMode.Compact:
00197                     DisplayModeTextBox.Text = "Compact";
00198                     DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkMagenta);
00199                     break;
00200                 case NavigationViewDisplayMode.Expanded:
00201                     DisplayModeTextBox.Text = "Expanded";
00202                     DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkRed);
00203                     break;
00204             }
00205         }
00206
00207         private void HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00208         {
00209             NavView.AlwaysShowHeader = true;
00210         }
00211
00212         private void HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00213         {
00214             NavView.AlwaysShowHeader = false;
00215         }
00216
00217         private void FindAndGiveAutomationNameToVisualChild(string childName)
00218         {
00219             DependencyObject obj = FindVisualChildByName(this.NavView, childName);
00220
00221             if (obj != null)
00222             {
00223                 AutomationProperties.SetName(obj, childName);
00224             }
00225         }
00226
00227
00228         private void WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00229         {
00230             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00231             NavView.Width = tag;
00232         }
00233
00234         private void AddItemButton_Click(object sender, RoutedEventArgs e)
00235         {
00236             var menuItem = new NavigationViewItem();
00237             menuItem.Content = "New Menu Item " + m_newItemIndex.ToString();
00238             menuItem.Icon = new SymbolIcon(Symbol.AllApps);
00239             NavView.MenuItems.Add(menuItem);
00240             m_newItemIndex++;
00241         }
00242
00243         private void RemoveItemButton_Click(object sender, RoutedEventArgs e)
00244         {
00245             if (NavView.MenuItems.Count > 0)
00246             {
00247                 NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
00248             }
00249         }
00250
00251         private void ClearMenuButton_Click(object sender, RoutedEventArgs e)
00252         {
00253             NavView.MenuItems.Clear();
00254         }
00255
00256         private void HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00257         {
00258             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00259             if (tag == "Default")
00260             {
00261                 MainGridRow.Height = new GridLength(1, GridUnitType.Star);
00262             }
00263             else if (tag == "300")
00264             {
00265                 MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
00266             }
00267         }
00268
00269         private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
00270         {
00271             if (args.SelectedItem != null)
00272             {
00273                 var itemdata = args.SelectedItem as NavigationViewItem;
00274                 if (itemdata != null)
00275                 {
00276                     if (itemdata.Content != null)
00277                     {
00278                         NavView.Header = itemdata.Content + " as header";
00279                     }
00280                 }
00281             }
00282         }
00283
00284         private void MoviesEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00285         {
00286             MoviesItem.IsEnabled = true;
00287             TVItem.IsEnabled = true;
00288         }
00289
00290         private void MoviesEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00291         {
00292             MoviesItem.IsEnabled = false;
00293             TVItem.IsEnabled = false;
00294         }
00295
00296         private void TitleBarCheckbox_Checked(object sender, RoutedEventArgs e)
00297         {
00298             if (CoreWindow.GetForCurrentThread() != null)
00299             {
00300                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00301                 titleBar.ExtendViewIntoTitleBar = false;
00302             }
00303         }
00304
00305         private void TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e)
00306         {
00307             if (CoreWindow.GetForCurrentThread() != null)
00308             {
00309                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00310                 titleBar.ExtendViewIntoTitleBar = true;
00311             }
00312         }
00313
00314         private void TestFrameCheckbox_Checked(object sender, RoutedEventArgs e)
00315         {
00316             var testFrame = App.CurrentWindow.Content as TestFrame;
00317             testFrame.ChangeBarVisibility(Visibility.Visible);
00318         }
00319
00320         private void TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e)
00321         {
00322             var testFrame = App.CurrentWindow.Content as TestFrame;
00323             testFrame.ChangeBarVisibility(Visibility.Collapsed);
00324         }
00325
00326         private void AutoSuggestCheckbox_Checked(object sender, RoutedEventArgs e)
00327         {
00328             // recreate AutoSuggestBox
00329             var autoSuggestBox = new AutoSuggestBox();
00330             AutomationProperties.SetName(autoSuggestBox, "PaneAutoSuggestBox");
00331             NavView.AutoSuggestBox = autoSuggestBox;
00332         }
00333
00334         private void AutoSuggestCheckbox_Unchecked(object sender, RoutedEventArgs e)
00335         {
00336             NavView.AutoSuggestBox = null;
00337         }
00338
00339         private void ScrambleButton_Click(object sender, RoutedEventArgs e)
00340         {
00341             foreach (var entry in NavView.MenuItems)
00342             {
00343                 NavigationViewItem item = entry as NavigationViewItem;
00344
00345                 if (item != null)
00346                 {
00347                     char[] newTitle = item.Content.ToString().ToCharArray();
00348                     Array.Reverse(newTitle);
00349                     item.Content = new string(newTitle);
00350                 }
00351             }
00352         }
00353
00354         private void CopyGamesLabelButton_Click(object sender, RoutedEventArgs e)
00355         {
00356             var popups = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot);
00357             if (popups != null && popups.Count > 0)
00358             {
00359                 Popup popup = popups[0];
00360                 ToolTip toolTip = popup.Child as ToolTip;
00361                 ToolTipStatusTextBlock.Text = toolTip.Content.ToString();
00362             }
00363             else
00364             {
00365                 ToolTipStatusTextBlock.Text = "There are no popups";
00366             }
00367         }
00368
00369         private void ClosingEventCountResetButton_Click(object sender, RoutedEventArgs e)
00370         {
00371             LastIngEventText.Text = "";
00372             LastEdEventText.Text = "";
00373             m_closingEventsFired = 0;
00374             m_closedEventsFired = 0;
00375             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00376         }
00377
00378         private void NavView_PaneClosing(NavigationView sender, NavigationViewPaneClosingEventArgs args)
00379         {
00380             if (CancelClosingEvents != null && (bool)CancelClosingEvents.IsChecked)
00381             {
00382                 args.Cancel = true;
00383             }
00384
00385             LastIngEventText.Text = "PaneClosing event fired";
00386
00387             m_closingEventsFired++;
00388             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00389
00390         }
00391
00392         private void NavView_PaneClosed(NavigationView sender, object args)
00393         {
00394             LastEdEventText.Text = "PaneClosed event fired";
00395
00396             m_closedEventsFired++;
00397             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00398             PaneOpenedOrClosedEvent.Text = "Closed";
00399         }
00400
00401         private void NavView_PaneOpening(NavigationView sender, object args)
00402         {
00403             LastIngEventText.Text = "PaneOpening event fired";
00404         }
00405
00406         private void NavView_PaneOpened(NavigationView sender, object args)
00407         {
00408             LastEdEventText.Text = "PaneOpened event fired";
00409             PaneOpenedOrClosedEvent.Text = "Opened";
00410         }
00411
00412         private void ChangePaneTitle_Click(object sender, RoutedEventArgs e)
00413         {
00414             NavView.PaneTitle = "";
00415         }
00416
00417         private void CopyVolumeToolTipButton_Click(object sender, RoutedEventArgs e)
00418         {
00419             var contentGrid = FindVisualChildByName(VolumeItem, "ContentGrid") as Grid;
00420             ToolTip tooltip = ToolTipService.GetToolTip(contentGrid) as ToolTip;
00421             if (tooltip.Content == null)
00422             {
00423                 ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is null";
00424             }
00425             else
00426             {
00427                 ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is definitely not null";
00428             }
00429         }
00430
00431         private void SetHeaderButton_Click(object sender, RoutedEventArgs args)
00432         {
00433             NavView.Header = new TextBlock() { Text = "Bananas" };
00434         }
00435
00436         private void ClearHeaderButton_Click(object sender, RoutedEventArgs args)
00437         {
00438             NavView.Header = null;
00439
00440             var found = Utilities.VisualStateHelper.ContainsVisualState(NavView, "HeaderVisible");
00441             TestResult.Text = found ? "FoundHeaderContent" : "NoHeaderContent";
00442         }
00443
00444         private void BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00445         {
00446             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00447         }
00448
00449         private void BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00450         {
00451             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
00452         }
00453
00454         private void BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00455         {
00456             NavView.IsBackEnabled = true;
00457         }
00458
00459         private void BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00460         {
00461             NavView.IsBackEnabled = false;
00462         }
00463
00464         private void SelectionFollowFocus_Checked(object sender, RoutedEventArgs e)
00465         {
00466             NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
00467         }
00468
00469         private void SelectionFollowFocus_Unchecked(object sender, RoutedEventArgs e)
00470         {
00471             NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
00472         }
00473
00474         private void NavView_BackRequested(NavigationView nv, NavigationViewBackRequestedEventArgs args)
00475         {
00476             BackRequestedStateTextBlock.Text = "Back was requested";
00477         }
00478
00479         private void BackRequestedStateResetButton_Click(object sender, RoutedEventArgs args)
00480         {
00481             BackRequestedStateTextBlock.Text = "Test reset";
00482         }
00483
00484         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00485         {
00486             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00487         }
00488
00489         private void ClearSelectedItem_Click(object sender, RoutedEventArgs e)
00490         {
00491             NavView.SelectedItem = null;
00492         }
00493     }
00494 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedBackVisualSource Member List

This is the complete list of members for AnimatedBackVisualSource, including all inherited members.
ColorAsVector4(winrt::Windows::UI::Color color) | AnimatedBackVisualSource | [private, static]
Duration() | AnimatedBackVisualSource |
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | AnimatedBackVisualSource | [private]
Foreground() | AnimatedBackVisualSource | [inline]
Foreground(winrt::Windows::UI::Color value) | AnimatedBackVisualSource |
FrameCount() | AnimatedBackVisualSource |
Framerate() | AnimatedBackVisualSource |
FrameToProgress(double frameNumber) | AnimatedBackVisualSource |
Markers() | AnimatedBackVisualSource |
SetColorProperty(hstring const &propertyName, winrt::Windows::UI::Color value) | AnimatedBackVisualSource |
SetScalarProperty(hstring const &propertyName, double value) | AnimatedBackVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor) | AnimatedBackVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics) | AnimatedBackVisualSource |
Generated on Sun Dec 1 2024 20:52:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemDataAutomationPeer.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewItemDataAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeView.h"
00007 #include "TreeViewItem.h"
00008 #include "TreeViewItemDataAutomationPeer.h"
00009 #include <UIAutomationCore.h>
00010 #include <UIAutomationCoreApi.h>
00011
00012 #include "TreeViewItemDataAutomationPeer.properties.cpp"
00013
00014 TreeViewItemDataAutomationPeer::TreeViewItemDataAutomationPeer(winrt::IInspectable const& item, winrt::TreeViewListAutomationPeer const& parent) :
00015     ReferenceTracker(item, parent)
00016 {
00017 }
00018
00019 // IExpandCollapseProvider
00020 winrt::ExpandCollapseState TreeViewItemDataAutomationPeer::ExpandCollapseState()
00021 {
00022     if (auto peer = GetTreeViewItemAutomationPeer())
00023     {
00024         return peer.ExpandCollapseState();
00025     }
00026     throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
00027 }
00028
00029 void TreeViewItemDataAutomationPeer::Collapse()
00030 {
00031     if (auto peer = GetTreeViewItemAutomationPeer())
00032     {
00033         return peer.Collapse();
00034     }
00035     throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
00036 }
00037
00038 void TreeViewItemDataAutomationPeer::Expand()
00039 {
00040     if (auto peer = GetTreeViewItemAutomationPeer())
00041     {
00042         return peer.Expand();
00043     }
00044     throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
00045 }
00046
00047 // IAutomationPeerOverrides
00048 winrt::IInspectable TreeViewItemDataAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00049 {
00050     if (patternInterface == winrt::PatternInterface::ExpandCollapse)
00051     {
00052         return *this;
00053     }
00054
00055     return __super::GetPatternCore(patternInterface);
00056 }
00057
00058 winrt::TreeViewItemAutomationPeer TreeViewItemDataAutomationPeer::GetTreeViewItemAutomationPeer()
00059 {
00060     // ItemsAutomationPeer hold ItemsControlAutomationPeer and Item properties.
00061     // ItemsControlAutomationPeer -> ItemsControl by ItemsControlAutomationPeer.Owner -> ItemsControl Look up Item to get TreeViewItem -> Get TreeViewItemAutomationPeer
00062     if (auto itemsControlAutomationPeer = ItemsControlAutomationPeer())
00063     {
00064         if (auto itemsControl = itemsControlAutomationPeer.Owner().try_as<winrt::ItemsControl>())
00065         {
00066             if (auto item = itemsControl.ContainerFromItem(Item()).try_as<winrt::UIElement>())
00067             {
00068                 if (auto treeViewItemAutomationPeer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(item).try_as<winrt::TreeViewItemAutomationPeer>())
00069                 {
00070                     return treeViewItemAutomationPeer;
00071                 }
00072             }
00073         }
00074     }
00075     throw winrt::hresult_error(UIA_E_ELEMENTNOTENABLED);
00076 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

final::PinnedElementInfo Member List

This is the complete list of members for final::PinnedElementInfo, including all inherited members.
m_pinnedElement | final::PinnedElementInfo | [private]
m_virtInfo | final::PinnedElementInfo | [private]
PinnedElement() const | final::PinnedElementInfo | [inline]
PinnedElementInfo(const ITrackerHandleManager *owner, const winrt::UIElement &element) | final::PinnedElementInfo |
VirtualizationInfo() const | final::PinnedElementInfo | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/InitialsGenerator.h Source File

  • File List
  • File Members
  • PersonPicture

InitialsGenerator.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006     /// <summary>
00007     /// Value indicating the general character set for a given character.
00008     /// </summary>
00009 enum class CharacterType
00010 {
00011     /// <summary>
00012     /// Indicates we could not match the character set.
00013     /// </summary>
00014     Other = 0,
00015
00016     /// <summary>
00017     /// Member of the Latin character set.
00018     /// </summary>
00019     Standard = 1,
00020
00021     /// <summary>
00022     /// Member of a symbolic character set.
00023     /// </summary>
00024     Symbolic = 2,
00025
00026     /// <summary>
00027     /// Member of a character set which supports glyphs.
00028     /// </summary>
00029     Glyph = 3
00030 };
00031
00032 /// <summary>
00033 /// PersonPicture Control. Displays the Profile Picture, or in its absence Initials,
00034 /// for a given Contact.
00035 /// </summary>
00036 class InitialsGenerator
00037 {
00038 public:
00039     /// <summary>
00040     /// Helper function which takes a DisplayName, as generated by
00041     /// Windows.ApplicationModel.Contacts, and returns a initials representation.
00042     /// </summary>
00043     /// <returns>
00044     /// String containing the initials representation of the given DisplayName.
00045     /// </returns>
00046     static winrt::hstring InitialsFromContactObject(const winrt::Contact &contact);
00047
00048     /// <summary>
00049     /// Helper function which takes a DisplayName, as generated by
00050     /// Windows.ApplicationModel.Contacts, and returns a initials representation.
00051     /// </summary>
00052     /// <param name="contactDisplayName>The DisplayName of the person</param>
00053     /// <returns>
00054     /// String containing the initials representation of the given DisplayName.
00055     /// </returns>
00056     static winrt::hstring InitialsFromDisplayName(const wstring_view &contactDisplayName);
00057
00058     /// <summary>
00059     /// Helper function which indicates the type of characters in a given string
00060     /// </summary>
00061     /// <param name="str">String from which to detect character-set.</param>
00062     /// <returns>
00063     /// Character set of the string: Latin, Symbolic, Glyph, or other.
00064     /// </returns>
00065     static CharacterType GetCharacterType(const wstring_view &str);
00066
00067     /// <summary>
00068     /// Helper function which indicates the character-set of a given character.
00069     /// </summary>
00070     /// <param name="character">Character for which to detect character-set.</param>
00071     /// <returns>
00072     /// Character set of the string: Latin, Symbolic, Glyph, or other.
00073     /// </returns>
00074     static CharacterType GetCharacterType(wchar_t character);
00075
00076 private:
00077     /// <summary>
00078     /// Helper function which takes in a string and returns a vector of pieces, separated by delimiter.
00079     /// </summary>
00080     /// <param name="source">String on which to perform the split operation.</param>
00081     /// <param name="delim">String on which to perform the split operation.</param>
00082     /// <param name="maxIterations">Maximum number of times to perform a <code>getline</code> loop.</param>
00083     /// <returns>A vector of pieces from the source string, separated by delimiter</returns>
00084     static std::vector<std::wstring> Split(const std::wstring &source, wchar_t delim, int maxIterations = 25);
00085
00086     /// <summary>
00087     /// Helper function to remove bracket qualifier from the end of a display name if present.
00088     /// </summary>
00089     /// <param name="source">String on which to perform the operation.</param>
00090     /// <returns>A string with the content within brackets removed.</returns>
00091     static void StripTrailingBrackets(std::wstring &source);
00092
00093     /// <summary>
00094     /// Extracts the first full character from a given string, including any diacritics or combining characters.
00095     /// </summary>
00096     /// <param name="str">String from which to extract the character.</param>
00097     /// <returns>A wstring which represents a given character.</returns>
00098     static std::wstring GetFirstFullCharacter(const std::wstring &str);
00099 };
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/UniformGrid2DLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

UniformGrid2DLayout.cs

Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Diagnostics;
00004 using System.Linq;
00005 using System.Text;
00006 using System.Threading.Tasks;
00007 using Windows.Foundation;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Input;
00010
00011 namespace Flick
00012 {
00013     public class UniformGrid2DLayout : VirtualizingLayout
00014     {
00015         public double ItemWidth { get; set; }
00016         public double ItemHeight { get; set; }
00017         public double Spacing { get; set; }
00018
00019         public double FocusedItemWidth { get; set; }
00020         public double FocusedItemHeight { get; set; }
00021
00022         public bool EnlargeFocusedItem { get; set; }
00023
00024         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00025         {
00026             var realizationRect = context.RealizationRect;
00027             int itemCount = context.ItemCount;
00028             var firstRow = FirstRealizedRowIndexInRect(realizationRect, itemCount);
00029             var firstCol = FirsttRealizedColumnIndexInRect(realizationRect, itemCount);
00030             var lastRow = LastRealizedRowIndexInRect(realizationRect, itemCount);
00031             var lastCol = LastRealizedColumnIndexInRect(realizationRect, itemCount);
00032
00033             Debug.WriteLine("Measure:" + realizationRect.ToString());
00034
00035             // Viewport + Buffer Rect.
00036             for (int rowIndex = firstRow; rowIndex <= lastRow; rowIndex++)
00037             {
00038                 for (int colIndex = firstCol; colIndex <= lastCol; colIndex++)
00039                 {
00040                     var realIndex = GetElementIndex(rowIndex, colIndex, context.ItemCount);
00041                     if (realIndex >= 0 && realIndex < itemCount)
00042                     {
00043                         var element = context.GetOrCreateElementAt(realIndex);
00044                         if (EnlargeFocusedItem && FocusManager.GetFocusedElement(element.XamlRoot) == element)
00045                         {
00046                             element.Measure(new Size(FocusedItemWidth, FocusedItemHeight));
00047                         }
00048                         else
00049                         {
00050                             element.Measure(new Size(ItemWidth, ItemHeight));
00051                         }
00052                     }
00053                 }
00054             }
00055
00056             int numRowsOrColumns = (int)Math.Sqrt(context.ItemCount);
00057             return new Size(ItemWidth * numRowsOrColumns, ItemHeight * numRowsOrColumns);
00058         }
00059
00060         protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00061         {
00062
00063             var realizationRect = context.RealizationRect;
00064             int itemCount = context.ItemCount;
00065             var firstRow = FirstRealizedRowIndexInRect(realizationRect, itemCount);
00066             var firstCol = FirsttRealizedColumnIndexInRect(realizationRect, itemCount);
00067             var lastRow = LastRealizedRowIndexInRect(realizationRect, itemCount);
00068             var lastCol = LastRealizedColumnIndexInRect(realizationRect, itemCount);
00069
00070             Debug.WriteLine("Arrange:" + realizationRect.ToString());
00071
00072             // Viewport + Buffer Rect.
00073             for (int rowIndex = firstRow; rowIndex <= lastRow; rowIndex++)
00074             {
00075                 for (int colIndex = firstCol; colIndex <= lastCol; colIndex++)
00076                 {
00077                     var realIndex = GetElementIndex(rowIndex, colIndex, context.ItemCount);
00078                     if (realIndex >= 0 && realIndex < itemCount)
00079                     {
00080                         var element = context.GetOrCreateElementAt(realIndex);
00081                         if (EnlargeFocusedItem && FocusManager.GetFocusedElement(element.XamlRoot) == element)
00082                         {
00083                             var widthDiff = FocusedItemWidth - ItemWidth;
00084                             var heightDiff = FocusedItemHeight - ItemHeight;
00085                             var arrangeRect = new Rect(colIndex * (ItemWidth + Spacing) - widthDiff / 2, rowIndex * (ItemHeight + Spacing) - heightDiff / 2, FocusedItemWidth, FocusedItemHeight);
00086                             element.Arrange(arrangeRect);
00087                             Debug.WriteLine("   Arrange:" + realIndex + " :" + arrangeRect);
00088                             Canvas.SetZIndex(element, 1);
00089                         }
00090                         else
00091                         {
00092                             var arrangeRect = new Rect(colIndex * (ItemWidth + Spacing), rowIndex * (ItemHeight + Spacing), ItemWidth, ItemHeight);
00093                             element.Arrange(arrangeRect);
00094                             Debug.WriteLine("   Arrange:" + realIndex + " :" + arrangeRect);
00095                             Canvas.SetZIndex(element, 0);
00096                         }
00097                     }
00098                 }
00099             }
00100
00101             return finalSize;
00102         }
00103
00104         #region Private Helper Methods
00105
00106         private int GetElementIndex(int row, int col, int count)
00107         {
00108             int numRowsOrColumns = (int)Math.Sqrt(count);
00109             return (row * numRowsOrColumns + col);
00110         }
00111
00112         private int FirstRealizedRowIndexInRect(Rect realizationRect, int itemCount)
00113         {
00114             return Clamp((int)(realizationRect.Y / (ItemHeight + Spacing)), itemCount);
00115         }
00116
00117         private int LastRealizedRowIndexInRect(Rect realizationRect, int itemCount)
00118         {
00119             return Clamp((int)(realizationRect.Bottom / (ItemHeight + Spacing)), itemCount);
00120         }
00121
00122         private int FirsttRealizedColumnIndexInRect(Rect realizationRect, int itemCount)
00123         {
00124             return Clamp((int)(realizationRect.X / (ItemWidth + Spacing)), itemCount);
00125         }
00126
00127         private int LastRealizedColumnIndexInRect(Rect realizationRect, int itemCount)
00128         {
00129             return Clamp((int)(realizationRect.Right / (ItemWidth + Spacing)), itemCount);
00130         }
00131
00132         private int Clamp(int index, int count)
00133         {
00134             return Math.Min(Math.Max(0, index), count - 1);
00135         }
00136
00137         #endregion Private Methods
00138     }
00139 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterZoomSnapPointsPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterZoomSnapPointsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Numerics;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Controls.Primitives;
00010 using Microsoft.UI.Xaml.Navigation;
00011
00012 using MUXControlsTestHooks = Microsoft.UI.Private.Controls.MUXControlsTestHooks;
00013 using MUXControlsTestHooksLoggingMessageEventArgs = Microsoft.UI.Private.Controls.MUXControlsTestHooksLoggingMessageEventArgs;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public sealed partial class ScrollPresenterZoomSnapPointsPage : TestPage
00018     {
00019         private List<string> fullLogs = new List<string>();
00020
00021         public ScrollPresenterZoomSnapPointsPage()
00022         {
00023             this.InitializeComponent();
00024             Loaded += ScrollPresenterZoomSnapPointsPage_Loaded;
00025         }
00026
00027         protected override void OnNavigatedFrom(NavigationEventArgs e)
00028         {
00029             if (chkLogScrollPresenterMessages.IsChecked == true)
00030             {
00031                 MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00032                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00033             }
00034
00035             base.OnNavigatedFrom(e);
00036         }
00037
00038         private void ScrollPresenterZoomSnapPointsPage_Loaded(object sender, RoutedEventArgs e)
00039         {
00040             this.markupScrollPresenter.ViewChanged += MarkupScrollPresenter_ViewChanged;
00041             this.markupScrollPresenter.StateChanged += MarkupScrollPresenter_StateChanged;
00042         }
00043
00044         private void MarkupScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
00045         {
00046             this.txtScrollPresenterHorizontalOffset.Text = this.markupScrollPresenter.HorizontalOffset.ToString("F2");
00047             this.txtScrollPresenterVerticalOffset.Text = this.markupScrollPresenter.VerticalOffset.ToString("F2");
00048             this.txtScrollPresenterZoomFactor.Text = this.markupScrollPresenter.ZoomFactor.ToString("F2");
00049         }
00050
00051         private void MarkupScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00052         {
00053             this.txtScrollPresenterState.Text = this.markupScrollPresenter.State.ToString();
00054         }
00055
00056         private void BtnMIAddSnapPoint_Click(object sender, RoutedEventArgs e)
00057         {
00058             try
00059             {
00060                 double value = Convert.ToDouble(txtMISnapPointValue.Text);
00061                 ZoomSnapPoint newSnapPoint = new ZoomSnapPoint(value);
00062                 markupScrollPresenter.ZoomSnapPoints.Add(newSnapPoint);
00063             }
00064             catch (Exception ex)
00065             {
00066                 this.fullLogs.Add(ex.ToString());
00067                 txtExceptionReport.Text = ex.ToString();
00068             }
00069         }
00070
00071 #if ApplicableRangeType
00072         private void BtnOIAddSnapPoint_Click(object sender, RoutedEventArgs e)
00073         {
00074             try
00075             {
00076                 double value = Convert.ToDouble(txtOISnapPointValue.Text);
00077                 double range = Convert.ToDouble(txtOIApplicableRange.Text);
00078                 ZoomSnapPoint newSnapPoint = new ZoomSnapPoint(value, range);
00079                 markupScrollPresenter.ZoomSnapPoints.Add(newSnapPoint);
00080             }
00081             catch (Exception ex)
00082             {
00083                 this.fullLogs.Add(ex.ToString());
00084                 txtExceptionReport.Text = ex.ToString();
00085             }
00086         }
00087 #endif
00088
00089         private void BtnMRAddSnapPoint_Click(object sender, RoutedEventArgs e)
00090         {
00091             try
00092             {
00093                 double offset = Convert.ToDouble(txtMRSnapPointOffset.Text);
00094                 double interval = Convert.ToDouble(txtMRSnapPointInterval.Text);
00095                 double start = Convert.ToDouble(txtMRSnapPointStart.Text);
00096                 double end = Convert.ToDouble(txtMRSnapPointEnd.Text);
00097                 RepeatedZoomSnapPoint newSnapPoint = new RepeatedZoomSnapPoint(offset, interval, start, end);
00098                 markupScrollPresenter.ZoomSnapPoints.Add(newSnapPoint);
00099             }
00100             catch (Exception ex)
00101             {
00102                 this.fullLogs.Add(ex.ToString());
00103                 txtExceptionReport.Text = ex.ToString();
00104             }
00105         }
00106
00107 #if ApplicableRangeType
00108         private void BtnORAddSnapPoint_Click(object sender, RoutedEventArgs e)
00109         {
00110             try
00111             {
00112                 double offset = Convert.ToDouble(txtORSnapPointOffset.Text);
00113                 double interval = Convert.ToDouble(txtORSnapPointInterval.Text);
00114                 double range = Convert.ToDouble(txtORApplicableRange.Text);
00115                 double start = Convert.ToDouble(txtORSnapPointStart.Text);
00116                 double end = Convert.ToDouble(txtORSnapPointEnd.Text);
00117
00118                 RepeatedZoomSnapPoint newSnapPoint = new RepeatedZoomSnapPoint(offset, interval, start, end, range);
00119                 markupScrollPresenter.ZoomSnapPoints.Add(newSnapPoint);
00120             }
00121             catch (Exception ex)
00122             {
00123                 this.fullLogs.Add(ex.ToString());
00124                 txtExceptionReport.Text = ex.ToString();
00125             }
00126         }
00127 #endif
00128
00129         private void BtnRemoveFirst_Click(object sender, RoutedEventArgs e)
00130         {
00131             try
00132             {
00133                 markupScrollPresenter.ZoomSnapPoints.RemoveAt(0);
00134             }
00135             catch (Exception ex)
00136             {
00137                 txtExceptionReport.Text = ex.ToString();
00138             }
00139         }
00140
00141         private void BtnRemoveAll_Click(object sender, RoutedEventArgs e)
00142         {
00143             try
00144             {
00145                 markupScrollPresenter.ZoomSnapPoints.Clear();
00146             }
00147             catch (Exception ex)
00148             {
00149                 txtExceptionReport.Text = ex.ToString();
00150             }
00151         }
00152
00153         private void BtnScrollPresenterZoomFactorChange_Click(object sender, RoutedEventArgs e)
00154         {
00155             try
00156             {
00157                 float changeAmount = Convert.ToSingle(txtScrollPresenterZoomFactorChange.Text);
00158                 markupScrollPresenter.AddZoomVelocity(changeAmount + 0.05f, null, null);
00159             }
00160             catch (Exception ex)
00161             {
00162                 txtExceptionReport.Text = ex.ToString();
00163             }
00164         }
00165
00166         private void BtnZoomFactorPlus1With_Click(object sender, RoutedEventArgs e)
00167         {
00168             try
00169             {
00170                 markupScrollPresenter.ZoomBy(1.0f, null, new ScrollingZoomOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Default));
00171             }
00172             catch (Exception ex)
00173             {
00174                 txtExceptionReport.Text = ex.ToString();
00175             }
00176         }
00177
00178         private void BtnZoomFactorPlus1Without_Click(object sender, RoutedEventArgs e)
00179         {
00180             try
00181             {
00182                 markupScrollPresenter.ZoomBy(1.0f, null, new ScrollingZoomOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore));
00183             }
00184             catch (Exception ex)
00185             {
00186                 txtExceptionReport.Text = ex.ToString();
00187             }
00188         }
00189
00190         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
00191         {
00192             txtExceptionReport.Text = string.Empty;
00193         }
00194
00195         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00196         {
00197             //Turn on info and verbose logging for the ScrollPresenter type:
00198             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00199
00200             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00201         }
00202
00203         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00204         {
00205             //Turn off info and verbose logging for the ScrollPresenter type:
00206             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00207
00208             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00209         }
00210
00211         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00212         {
00213             // Cut off the terminating new line.
00214             string msg = args.Message.Substring(0, args.Message.Length - 1);
00215             string senderName = string.Empty;
00216             FrameworkElement fe = sender as FrameworkElement;
00217
00218             if (fe != null)
00219             {
00220                 senderName = "s:" + fe.Name + ", ";
00221             }
00222
00223             if (args.IsVerboseLevel)
00224             {
00225                 this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
00226             }
00227             else
00228             {
00229                 this.fullLogs.Add("Info: " + senderName + "m:" + msg);
00230             }
00231         }
00232
00233         private void btnGetFullLog_Click(object sender, RoutedEventArgs e)
00234         {
00235             foreach (string log in this.fullLogs)
00236             {
00237                 this.cmbFullLog.Items.Add(log);
00238             }
00239         }
00240
00241         private void btnClearFullLog_Click(object sender, RoutedEventArgs e)
00242         {
00243             this.fullLogs.Clear();
00244             this.cmbFullLog.Items.Clear();
00245         }
00246     }
00247 }
00248
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionModeItem Member List

This is the complete list of members for SelectionModeItem, including all inherited members.
GetItems() | SelectionModeItem | [inline, static]
items | SelectionModeItem | [private, static]
Mode | SelectionModeItem |
Name | SelectionModeItem |
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarItem Member List

This is the complete list of members for MenuBarItem, including all inherited members.
abi_enter() | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
AddPassThroughElement(const winrt::DependencyObject &element) | MenuBarItem |
AttachEventHandlers() | MenuBarItem | [private]
CheckThread() | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
ClearProperties() | MenuBarItemProperties | [static]
CloseMenuFlyout() | MenuBarItem |
DeleteInstanceOnUIThread(std::unique_ptr< MenuBarItem > &&self) noexcept | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline, static]
DetachEventHandlers(bool useSafeGet=false) | MenuBarItem | [private]
EnsureProperties() | MenuBarItemProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
final_release(std::unique_ptr< MenuBarItem > &&self) | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline, static]
FocusAndReturnNextFocusableItem(int index, int direction) | MenuBarItem | [private]
GetBase() | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
GetInner() | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
Invoke() | MenuBarItem |
IsFlyoutOpen() | MenuBarItem |
IsOnThread() | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
Items(winrt::IVector< winrt::MenuFlyoutItemBase > const &value) | MenuBarItemProperties |
Items() | MenuBarItemProperties |
ItemsProperty() | MenuBarItemProperties | [inline, static]
m_menuBar | MenuBarItem | [private]
m_passThroughElement | MenuBarItem | [private]
MenuBarItem() | MenuBarItem |
MenuBarItemProperties() | MenuBarItemProperties |
MoveFocusTo(FlyoutLocation location) | MenuBarItem | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
OnApplyTemplate() | MenuBarItem |
OnCreateAutomationPeer() | MenuBarItem |
OnFlyoutClosed(winrt::IInspectable const &sender, winrt::IInspectable const &args) | MenuBarItem | [private]
OnFlyoutOpening(winrt::IInspectable const &sender, winrt::IInspectable const &args) | MenuBarItem | [private]
OnItemsVectorChanged(winrt::Collections::IObservableVector< winrt::MenuFlyoutItemBase > const &sender, winrt::Collections::IVectorChangedEventArgs const &e) | MenuBarItem | [private]
OnMenuBarItemAccessKeyInvoked(winrt::IInspectable const &sender, winrt::AccessKeyInvokedEventArgs const &args) | MenuBarItem | [private]
OnMenuBarItemKeyDown(winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args) | MenuBarItem | [private]
OnMenuBarItemPointerEntered(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | MenuBarItem | [private]
OnMenuBarItemPointerPressed(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | MenuBarItem | [private]
OnPresenterKeyDown(winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args) | MenuBarItem | [private]
OnVisualPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | MenuBarItem | [private]
OpenFlyoutFrom(FlyoutLocation location) | MenuBarItem | [private]
PopulateContent() | MenuBarItem | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MenuBarItem, winrt::implementation::MenuBarItemT > | [inline]
s_ItemsProperty | MenuBarItemProperties | [static]
s_TitleProperty | MenuBarItemProperties | [static]
ShowMenuFlyout() | MenuBarItem |
Title(winrt::hstring const &value) | MenuBarItemProperties |
Title() | MenuBarItemProperties |
TitleProperty() | MenuBarItemProperties | [inline, static]
UpdateVisualStates() | MenuBarItem | [private]
~MenuBarItem() | MenuBarItem | [virtual]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/AnimatedIconSource.h Source File

  • File List
  • File Members
  • IconSource

AnimatedIconSource.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "AnimatedIconSource.g.h"
00007 #include "AnimatedIconSource.properties.h"
00008
00009 class AnimatedIconSource :
00010     public ReferenceTracker<AnimatedIconSource, DeriveFromPathIconSourceHelper_base, winrt::AnimatedIconSource>,
00011     public AnimatedIconSourceProperties
00012 {
00013 public:
00014     using AnimatedIconSourceProperties::EnsureProperties;
00015     using AnimatedIconSourceProperties::ClearProperties;
00016
00017     winrt::DependencyProperty GetIconElementPropertyCore(winrt::DependencyProperty sourceProperty);
00018     winrt::IconElement CreateIconElementCore();
00019 };
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/TestUI/PagerControlAxeTestPage.xaml.cs Source File

  • File List
  • File Members
  • PagerControl
  • TestUI

PagerControlAxeTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 namespace MUXControlsTestApp
00004 {
00005     [AxeScanTestPage(Name = "PagerControl-Axe")]
00006     public sealed partial class PagerControlAxeTestPage : TestPage
00007     {
00008         public PagerControlAxeTestPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealBorderLight.idl Source File

  • File List
  • File Members
  • Lights

RevealBorderLight.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_MEDIA_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 unsealed runtimeclass RevealBorderLight : Microsoft.UI.Xaml.Media.XamlLight
00007 {
00008     RevealBorderLight();
00009 }
00010
00011 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonManaged/PlatformConfiguration.cs Source File

  • File List
  • File Members
  • CommonManaged

PlatformConfiguration.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using System.Text;
00008 using System.Threading.Tasks;
00009 using Windows.Foundation.Metadata;
00010 using Windows.System.Profile;
00011
00012 namespace Common
00013 {
00014     public enum DeviceType
00015     {
00016         Desktop,
00017         Phone,
00018         OneCore
00019     }
00020
00021     public enum OSVersion : ushort
00022     {
00023         Threshold2 = 2,
00024         Redstone1 = 3,
00025         Redstone2 = 4,
00026         Redstone3 = 5,
00027         Redstone4 = 6,
00028         Redstone5 = 7,
00029         NineteenH1 = 8,
00030         TwentyOneH1 = 14
00031     }
00032
00033     public class PlatformConfiguration
00034     {
00035         private const ushort InvalidAPIVersion = 255;
00036         private static ushort _currentAPIVersion = InvalidAPIVersion;
00037
00038         private static bool IsApiContractPresent(ushort version)
00039         {
00040             return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", version);
00041         }
00042
00043         public static ushort GetCurrentAPIVersion()
00044         {
00045             if (_currentAPIVersion == InvalidAPIVersion)
00046             {
00047                 ushort currentAPIVersion = 3;
00048                 while (IsApiContractPresent((ushort)(currentAPIVersion + 1)))
00049                 {
00050                     currentAPIVersion++;
00051                 }
00052
00053                 _currentAPIVersion = currentAPIVersion;
00054             }
00055             return _currentAPIVersion;
00056         }
00057
00058         public static bool IsDevice(DeviceType type)
00059         {
00060             var deviceFamily = AnalyticsInfo.VersionInfo.DeviceFamily;
00061
00062             if (type == DeviceType.Desktop && deviceFamily == "Windows.Desktop")
00063             {
00064                 return true;
00065             }
00066             else if (type == DeviceType.Phone && deviceFamily == "Windows.Mobile")
00067             {
00068                 return true;
00069             }
00070             else if (type == DeviceType.OneCore && deviceFamily != "Windows.Desktop" && deviceFamily != "Windows.Mobile")
00071             {
00072                 return true;
00073             }
00074
00075             return false;
00076         }
00077
00078         public static bool IsOsVersion(OSVersion version)
00079         {
00080             // We can determine the OS version by checking for the presence of the Universal contract
00081             // corresonding to that version and the absense of the contract version corresonding to
00082             // the next OS version.
00083             return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", (ushort)version)
00084                 && !ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", (ushort)(version + 1));
00085         }
00086
00087         public static bool IsOsVersionGreaterThan(OSVersion version)
00088         {
00089             // We can determine that the OS version is greater than the specified version by checking for
00090             // the presence of the Universal contract corresonding to the next version.
00091             return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", (ushort)(version + 1));
00092         }
00093
00094         public static bool IsOsVersionGreaterThanOrEqual(OSVersion version)
00095         {
00096             return IsOsVersionGreaterThan(version) || IsOsVersion(version);
00097         }
00098
00099         public static bool IsOSVersionLessThan(OSVersion version)
00100         {
00101             return !IsOsVersionGreaterThanOrEqual(version);
00102         }
00103
00104         public static bool IsDebugBuildConfiguration()
00105         {
00106 #if DEBUG
00107             return true;
00108 #else
00109             return false;
00110 #endif
00111         }
00112     }
00113 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManager.h Source File

  • File List
  • File Members
  • Repeater

ViewportManager.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002
00003 class ViewportManager
00004 {
00005 public:
00006     virtual winrt::UIElement SuggestedAnchor() const = 0;
00007
00008     virtual double HorizontalCacheLength() const = 0;
00009     virtual void HorizontalCacheLength(double value) = 0;
00010
00011     virtual double VerticalCacheLength() const = 0;
00012     virtual void VerticalCacheLength(double value) = 0;
00013
00014     virtual winrt::Rect GetLayoutVisibleWindow() const = 0;
00015     virtual winrt::Rect GetLayoutRealizationWindow() const = 0;
00016
00017     virtual void SetLayoutExtent(const winrt::Rect& layoutExtent) = 0;
00018     virtual winrt::Rect GetLayoutExtent() const = 0;
00019     virtual winrt::Point GetOrigin() const = 0;
00020
00021     virtual void OnLayoutChanged(bool isVirtualizing) = 0;
00022     virtual void OnElementPrepared(const winrt::UIElement& element) = 0;
00023     virtual void OnElementCleared(const winrt::UIElement& element) = 0;
00024     virtual void OnOwnerMeasuring() = 0;
00025     virtual void OnOwnerArranged() = 0;
00026     virtual void OnMakeAnchor(const winrt::UIElement& anchor, const bool isAnchorOutsideRealizedRange) = 0;
00027     virtual void OnBringIntoViewRequested(const winrt::BringIntoViewRequestedEventArgs& args) = 0;
00028
00029     virtual void ResetLayoutRealizationWindowCacheBuffer() = 0;
00030     virtual void ResetScrollers() = 0;
00031
00032     virtual winrt::UIElement MadeAnchor() const = 0;
00033 };
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectedItemsVector Member List

This is the complete list of members for SelectedItemsVector, including all inherited members.
abi_enter() | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
Append(winrt::IInspectable const &item) | SelectedItemsVector |
CheckThread() | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
Clear() | SelectedItemsVector |
Contains(winrt::IInspectable const &item) | SelectedItemsVector |
DeleteInstanceOnUIThread(std::unique_ptr< SelectedItemsVector > &&self) noexcept | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
final_release(std::unique_ptr< SelectedItemsVector > &&self) | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline, static]
GetBase() | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
GetCustomIndexOfFunction | SelectedItemsVector | [inline]
GetInner() | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
Implement_Vector_Read(SelectedItemsVectorOptions) private | SelectedItemsVector | [inline, private]
IndexOf_OptimizedForRemove(winrt::IInspectable const &node, uint32_t &index) | SelectedItemsVector |
InsertAt(unsigned int index, winrt::IInspectable const &item) | SelectedItemsVector |
InsertAt_NoContainsCheck(unsigned int index, winrt::IInspectable const &item) | SelectedItemsVector |
IsOnThread() | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t< SelectedItemsVectorOptions::VectorType >::type, SelectedItemsVectorOptions::IterableType, SelectedItemsVectorOptions::ObservableVectorType > | [inline]
RemoveAt(unsigned int index) | SelectedItemsVector |
RemoveAtEnd() | SelectedItemsVector |
ReplaceAll(winrt::array_view< winrt::IInspectable const > items) | SelectedItemsVector |
SetAt(unsigned int index, winrt::IInspectable const &item) | SelectedItemsVector |
SetViewModel(ViewModel &viewModel) | SelectedItemsVector |
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItemInvokedEventArgs.h Source File

  • File List
  • File Members
  • SwipeControl

SwipeItemInvokedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SwipeItemInvokedEventArgs.g.h"
00007
00008 class SwipeItemInvokedEventArgs
00009     : public winrt::implementation::SwipeItemInvokedEventArgsT<SwipeItemInvokedEventArgs>
00010 {
00011 public:
00012 #pragma region ISwipeItemInvokedEventArgs
00013     winrt::SwipeControl SwipeControl();
00014 #pragma endregion
00015     void SwipeControl(const winrt::SwipeControl& value);
00016
00017 private:
00018     winrt::SwipeControl m_swipeControl;
00019 };
00020
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrushTestApi.idl Source File

  • File List
  • File Members
  • Materials
  • Reveal

RevealBrushTestApi.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_MEDIA_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 runtimeclass RevealBrushTestApi : Microsoft.UI.Xaml.DependencyObject
00007 {
00008     RevealBrushTestApi();
00009
00010     MU_XM_NAMESPACE.RevealBrush RevealBrush { get; set; };
00011     Boolean IsInFallbackMode { get; };
00012     Boolean IsAmbientLightSet { get; };
00013     Boolean IsBorderLightSet { get; };
00014     Boolean IsHoverLightSet { get; };
00015     Microsoft.UI.Composition.CompositionBrush CompositionBrush { get; };
00016     Microsoft.UI.Composition.CompositionBrush NoiseBrush { get; };
00017
00018 }
00019
00020 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/TestUI/PTRPage.xaml.cs Source File

  • File List
  • File Members
  • PullToRefresh
  • TestUI

PTRPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.IO;
00008 using System.Linq;
00009 using System.Runtime.InteropServices.WindowsRuntime;
00010 using Windows.Foundation;
00011 using Windows.Foundation.Collections;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Controls.Primitives;
00015 using Microsoft.UI.Xaml.Data;
00016 using Microsoft.UI.Xaml.Input;
00017 using Microsoft.UI.Xaml.Media;
00018 using Microsoft.UI.Xaml.Navigation;
00019
00020 namespace MUXControlsTestApp
00021 {
00022     [TopLevelTestPage(Name = "PTR", Icon = "PullToRefresh.png")]
00023     public sealed partial class PTRPage : TestPage
00024     {
00025         public PTRPage()
00026         {
00027             this.InitializeComponent();
00028
00029             RefreshContainerButton.Click += delegate { Frame.Navigate(typeof(RefreshContainerPage), 0); };
00030             RefreshContainerOnImageButton.Click += delegate { Frame.Navigate(typeof(RefreshContainerOnImagePage), 0); };
00031             RefreshVisualizerButton.Click += delegate { Frame.Navigate(typeof(RefreshVisualizerPage), 0); };
00032         }
00033     }
00034 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBadgeTemplateSettings Member List

This is the complete list of members for InfoBadgeTemplateSettings, including all inherited members.
ClearProperties() | InfoBadgeTemplateSettingsProperties | [static]
EnsureProperties() | InfoBadgeTemplateSettingsProperties | [static]
IconElement(winrt::IconElement const &value) | InfoBadgeTemplateSettingsProperties |
IconElement() | InfoBadgeTemplateSettingsProperties |
IconElementProperty() | InfoBadgeTemplateSettingsProperties | [inline, static]
InfoBadgeCornerRadius(winrt::CornerRadius const &value) | InfoBadgeTemplateSettingsProperties |
InfoBadgeCornerRadius() | InfoBadgeTemplateSettingsProperties |
InfoBadgeCornerRadiusProperty() | InfoBadgeTemplateSettingsProperties | [inline, static]
InfoBadgeTemplateSettings() | InfoBadgeTemplateSettings |
InfoBadgeTemplateSettingsProperties() | InfoBadgeTemplateSettingsProperties |
s_IconElementProperty | InfoBadgeTemplateSettingsProperties | [static]
s_InfoBadgeCornerRadiusProperty | InfoBadgeTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterBringIntoViewPage Member List

This is the complete list of members for ScrollPresenterBringIntoViewPage, including all inherited members.
AppendAsyncEventMessage(string asyncEventMessage) | ScrollPresenterBringIntoViewPage | [inline, private]
AppendAsyncEventMessage() | ScrollPresenterBringIntoViewPage | [inline, private]
asyncEventReportingLock | ScrollPresenterBringIntoViewPage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
BtnClearScrollPresenterEvents_Click(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
BtnStartBringIntoView_Click(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
ChkLogBringIntoViewRequestedEvents_Checked(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
ChkLogBringIntoViewRequestedEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
CmbNestingCombination_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
dataSource | ScrollPresenterBringIntoViewPage | [private]
FrameworkElement_BringIntoViewRequested(UIElement sender, BringIntoViewRequestedEventArgs args) | ScrollPresenterBringIntoViewPage | [inline, private]
HookBringIntoViewEvents() | ScrollPresenterBringIntoViewPage | [inline, private]
HookScrollPresenterEvents(ScrollPresenter scrollPresenter) | ScrollPresenterBringIntoViewPage | [inline, private]
HookScrollViewerEvents(ScrollViewer scrollViewer) | ScrollPresenterBringIntoViewPage | [inline, private]
lstAsyncEventMessage | ScrollPresenterBringIntoViewPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollPresenterBringIntoViewPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, protected]
RefreshSnapPoints(ScrollPresenter scrollPresenter, StackPanel stackPanel) | ScrollPresenterBringIntoViewPage | [inline, private]
Repeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollPresenter_BringingIntoView(ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollPresenterBringIntoViewPage() | ScrollPresenterBringIntoViewPage | [inline]
ScrollPresenterBringIntoViewPage_Loaded(object sender, RoutedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) | ScrollPresenterBringIntoViewPage | [inline, private]
UnhookBringIntoViewEvents() | ScrollPresenterBringIntoViewPage | [inline, private]
UnhookScrollPresenterEvents(ScrollPresenter scrollPresenter) | ScrollPresenterBringIntoViewPage | [inline, private]
UnhookScrollViewerEvents(ScrollViewer scrollViewer) | ScrollPresenterBringIntoViewPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbIterable Member List

This is the complete list of members for BreadcrumbIterable, including all inherited members.
abi_enter() | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
BreadcrumbIterable() | BreadcrumbIterable |
BreadcrumbIterable(const winrt::IInspectable &itemsSource) | BreadcrumbIterable |
CheckThread() | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< BreadcrumbIterable > &&self) noexcept | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
final_release(std::unique_ptr< BreadcrumbIterable > &&self) | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline, static]
First() | BreadcrumbIterable |
GetBase() | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
GetInner() | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
IsOnThread() | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
ItemsSource(const winrt::IInspectable &itemsSource) | BreadcrumbIterable |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< BreadcrumbIterable, reference_tracker_implements_t< winrt::IIterable< winrt::IInspectable > >::type > | [inline]
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DesktopAcrylicBackdrop Member List

This is the complete list of members for DesktopAcrylicBackdrop, including all inherited members.
abi_enter() | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
CheckThread() | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< DesktopAcrylicBackdrop > &&self) noexcept | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline, static]
DesktopAcrylicBackdrop() | DesktopAcrylicBackdrop |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
final_release(std::unique_ptr< DesktopAcrylicBackdrop > &&self) | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline, static]
GetBase() | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
GetInner() | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
IsOnThread() | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
m_controllers | DesktopAcrylicBackdrop | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
OnTargetConnected(ICompositionSupportsSystemBackdrop connectedTarget, winrt::Microsoft::UI::Xaml::XamlRoot xamlRoot) | DesktopAcrylicBackdrop |
OnTargetDisconnected(ICompositionSupportsSystemBackdrop disconnectedTarget) | DesktopAcrylicBackdrop |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< DesktopAcrylicBackdrop, winrt::implementation::DesktopAcrylicBackdropT > | [inline]
~DesktopAcrylicBackdrop() | DesktopAcrylicBackdrop | [virtual]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooksFactory.h Source File

  • File List
  • File Members
  • SwipeControl

SwipeTestHooksFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SwipeTestHooks.h"
00007
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemTemplateDemo Member List

This is the complete list of members for ItemTemplateDemo, including all inherited members.
ChkSample_CheckedChanged(object sender, RoutedEventArgs e) | ItemTemplateDemo | [inline, private]
Data | ItemTemplateDemo |
ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | ItemTemplateDemo | [inline, private]
ItemTemplateDemo() | ItemTemplateDemo | [inline]
Numbers | ItemTemplateDemo |
OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args) | ItemTemplateDemo | [inline, private]
Generated on Sun Dec 1 2024 20:54:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Effects/microsoft.ui.private.composition.effects_impl.h Source File

  • File List
  • File Members
  • Effects

microsoft.ui.private.composition.effects_impl.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // This is a header-only implementation of Win2D-like effects descriptions,
00005 // which can be use to describe effects graph in the Microsoft::UI::Composition API.
00006
00007 #pragma once
00008
00009 #include <cstring>
00010 #include <d2d1_1.h>
00011 #include <d2d1effects_2.h>
00012
00013 #include <Windows.Graphics.Effects.h>
00014 #include <winrt\Windows.Graphics.Effects.h>
00015
00016 #pragma warning(push)
00017 #pragma warning(disable : 28285 28196 6387 6319 26812 26496)
00018
00019 #include "AlphaMaskEffect.g.h"
00020 #include "ArithmeticCompositeEffect.g.h"
00021 #include "BlendEffect.g.h"
00022 #include "BorderEffect.g.h"
00023 #include "ColorMatrixEffect.g.h"
00024 #include "ColorSourceEffect.g.h"
00025 #include "CompositeStepEffect.g.h"
00026 #include "ContrastEffect.g.h"
00027 #include "CrossFadeEffect.g.h"
00028 #include "DistantDiffuseEffect.g.h"
00029 #include "DistantSpecularEffect.g.h"
00030 #include "ExposureEffect.g.h"
00031 #include "GammaTransferEffect.g.h"
00032 #include "GaussianBlurEffect.g.h"
00033 #include "GrayscaleEffect.g.h"
00034 #include "HueRotationEffect.g.h"
00035 #include "InvertEffect.g.h"
00036 #include "LinearTransferEffect.g.h"
00037 #include "LuminanceToAlphaEffect.g.h"
00038 #include "OpacityEffect.g.h"
00039 #include "PointDiffuseEffect.g.h"
00040 #include "PointSpecularEffect.g.h"
00041 #include "PosterizeEffect.g.h"
00042 #include "PremultiplyEffect.g.h"
00043 #include "SaturationEffect.g.h"
00044 #include "SepiaEffect.g.h"
00045 #include "SpotDiffuseEffect.g.h"
00046 #include "SpotSpecularEffect.g.h"
00047 #include "TemperatureAndTintEffect.g.h"
00048 #include "TintEffect.g.h"
00049 #include "Transform2DEffect.g.h"
00050 #include "UnPremultiplyEffect.g.h"
00051
00052 typedef enum GRAPHICS_EFFECT_PROPERTY_MAPPING
00053 {
00054     GRAPHICS_EFFECT_PROPERTY_MAPPING_UNKNOWN,
00055     GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT,
00056     GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX,
00057     GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY,
00058     GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ,
00059     GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW,
00060     GRAPHICS_EFFECT_PROPERTY_MAPPING_RECT_TO_VECTOR4,
00061     GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES,
00062     GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE,
00063     GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3,
00064     GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4
00065 } GRAPHICS_EFFECT_PROPERTY_MAPPING;
00066
00067 namespace abi
00068 {
00069     using ABI::Windows::Foundation::IPropertyValue;
00070     using ABI::Windows::Graphics::Effects::IGraphicsEffectSource;
00071 }
00072
00073 // NOTE: We are redefining this to work around VS15.5 issue where the MIDL headers give errors with the new
00074 // compiler. We don't really want to be including MIDL headers anyway so this is kind of ok. This interface
00075 // is a redefinition of the one in Windows.Graphics.Effects.Interop.h.
00076
00077 DECLARE_INTERFACE_IID_(IGraphicsEffectD2D1Interop, IUnknown, "2FC57384-A068-44D7-A331-30982FCF7177")
00078 {
00079     STDMETHOD(GetEffectId)(
00080         _Out_ GUID * id
00081         ) PURE;
00082
00083     STDMETHOD(GetNamedPropertyMapping)(
00084         LPCWSTR name,
00085         _Out_ UINT * index,
00086         _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING * mapping
00087         ) PURE;
00088
00089     STDMETHOD(GetPropertyCount)(
00090         _Out_ UINT * count
00091         ) PURE;
00092
00093     STDMETHOD(GetProperty)(
00094         UINT index,
00095         _Outptr_ abi::IPropertyValue ** value
00096         ) PURE;
00097
00098     STDMETHOD(GetSource)(
00099         UINT index,
00100         _Outptr_ abi::IGraphicsEffectSource ** source
00101         ) PURE;
00102
00103     STDMETHOD(GetSourceCount)(
00104         _Out_ UINT * count
00105         ) PURE;
00106 };
00107
00108 inline winrt::IGraphicsEffectSource& to_winrt(abi::IGraphicsEffectSource*& instance)
00109 {
00110     return reinterpret_cast<winrt::IGraphicsEffectSource&>(instance);
00111 }
00112
00113 inline winrt::IPropertyValue& to_winrt(abi::IPropertyValue*& instance)
00114 {
00115     return reinterpret_cast<winrt::IPropertyValue&>(instance);
00116 }
00117
00118
00119 namespace Microsoft { namespace UI { namespace Private { namespace Composition { namespace Effects
00120 {
00121     // Base class for Win2D-like effect descriptions
00122     class EffectBase :
00123         public winrt::implements<
00124             EffectBase,
00125             ::IGraphicsEffectD2D1Interop>
00126     {
00127     protected:
00128         // This is a header file so we can't use "using namespace", but we can do this:
00129         using UIColor = winrt::Color; // Renamed because we use "Color" as a field name
00130         using PropertyValue = winrt::PropertyValue;
00131         using Vector2 = winrt::float2;
00132         using Vector3 = winrt::float3;
00133         using Matrix3x2 = winrt::float3x2;
00134         using Matrix5x4 = winrt::Matrix5x4;
00135         using PropertyMapping = GRAPHICS_EFFECT_PROPERTY_MAPPING;
00136
00137     public:
00138         // IGraphicsEffect
00139         winrt::hstring Name() { return m_Name; }
00140         void Name(winrt::hstring const& value) { m_Name = value; }
00141
00142         // IGraphicsEffectD2D1Interop
00143         IFACEMETHODIMP GetSourceCount(_Out_ UINT * count) override { *count = 0; return S_OK; }
00144         IFACEMETHODIMP GetPropertyCount(_Out_ UINT* count) override { *count = 0; return S_OK; }
00145
00146         IFACEMETHODIMP GetSource(UINT, _Outptr_ abi::IGraphicsEffectSource**) override
00147         {
00148             return E_INVALIDARG;
00149         }
00150
00151         IFACEMETHODIMP GetProperty(UINT, _Outptr_ abi::IPropertyValue**) override
00152         {
00153             return E_INVALIDARG;
00154         }
00155
00156         IFACEMETHODIMP GetNamedPropertyMapping(LPCWSTR, _Out_ UINT*,
00157             _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING*) override
00158         {
00159             return E_INVALIDARG;
00160         }
00161
00162     protected:
00163         // Invokes a functor with the pointer to the property factory
00164         static HRESULT UsePropertyFactory(_Outptr_ abi::IPropertyValue **value, std::function<winrt::IInspectable()> const& func) try
00165         {
00166             auto ret = func();
00167             auto propertyValue = ret.as<winrt::IPropertyValue>();
00168             to_winrt(*value) = propertyValue;
00169             MUX_CATCH_RETURN;
00170         }
00171
00172         template<UINT32 ComponentCount>
00173         static winrt::IInspectable CreateColor(UIColor color)
00174         {
00175             static_assert(ComponentCount == 3 || ComponentCount == 4, "Unexpected color component count.");
00176             float values[] = { color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f };
00177             return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, ComponentCount>&>(values));
00178         }
00179
00180         // Helpers to implement GetNamedPropertyMapping more succintly
00181         struct NamedProperty
00182         {
00183             const wchar_t* Name; // Compile-time constant
00184             UINT Index; // Property index
00185             GRAPHICS_EFFECT_PROPERTY_MAPPING Mapping;
00186         };
00187
00188         HRESULT GetNamedPropertyMappingImpl(
00189             _In_count_(mappingCount) const NamedProperty* namedProperties,
00190             UINT namedPropertyCount,
00191             LPCWSTR name,
00192             _Out_ UINT * index,
00193             _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING * mapping)
00194         {
00195             for (UINT i = 0; i < namedPropertyCount; ++i)
00196             {
00197                 const auto& prop = namedProperties[i];
00198                 if (_wcsicmp(name, prop.Name) == 0)
00199                 {
00200                     *index = prop.Index;
00201                     *mapping = prop.Mapping;
00202                     return S_OK;
00203                 }
00204             }
00205             return E_INVALIDARG;
00206         }
00207
00208         // M_PI requires us to be the first to include math.h, not worth it
00209         static constexpr float k_PI = 3.14159265358979f;
00210         static constexpr float k_DegreesPerRadian = 180.0f / k_PI;
00211
00212     public:
00213         winrt::hstring m_Name;
00214     };
00215
00216     //-----------------------------------------------------------------------------------------------------------------
00217     // Helper macros to make implementation more succint
00218
00219 #pragma push_macro("DECLARE_D2D_GUID")
00220 #undef DECLARE_D2D_GUID
00221 #define DECLARE_D2D_GUID(Guid) \
00222     IFACEMETHODIMP GetEffectId(_Out_ GUID * id) override { *id = Guid; return S_OK; }
00223
00224 #pragma push_macro("DECLARE_POD_PROPERTY")
00225 #undef DECLARE_POD_PROPERTY
00226 #define DECLARE_POD_PROPERTY(Name, Type, InitialValue, Condition) \
00227     private: \
00228     Type m_##Name = InitialValue; \
00229     public: \
00230     Type Name() { return m_##Name; } \
00231     void Name(Type const& value) \
00232     { \
00233         if (!(0, Condition)) { throw winrt::hresult_invalid_argument(); } \
00234         m_##Name = value; \
00235     }
00236
00237 #pragma push_macro("DECLARE_SOURCE")
00238 #undef DECLARE_SOURCE
00239 #define DECLARE_SOURCE(Name) \
00240     winrt::IGraphicsEffectSource m_##Name; \
00241     winrt::IGraphicsEffectSource Name() { return m_##Name; } \
00242     void Name(winrt::IGraphicsEffectSource const& value) { m_##Name = value; }
00243
00244 #pragma push_macro("DECLARE_SINGLE_SOURCE")
00245 #undef DECLARE_SINGLE_SOURCE
00246 #define DECLARE_SINGLE_SOURCE(Name) \
00247     DECLARE_SOURCE(Name) \
00248     IFACEMETHODIMP GetSourceCount(_Out_ UINT * count) override { *count = 1; return S_OK; } \
00249     IFACEMETHODIMP GetSource(UINT index, _Outptr_ abi::IGraphicsEffectSource ** source) override try \
00250     { \
00251         if (index == 0) to_winrt(*source) = m_##Name; \
00252         else throw winrt::hresult_invalid_argument(); \
00253         MUX_CATCH_RETURN; \
00254     }
00255
00256 #pragma push_macro("DECLARE_DUAL_SOURCES")
00257 #undef DECLARE_DUAL_SOURCES
00258 #define DECLARE_DUAL_SOURCES(Name1, Name2) \
00259     DECLARE_SOURCE(Name1) \
00260     DECLARE_SOURCE(Name2) \
00261     IFACEMETHODIMP GetSourceCount(_Out_ UINT * count) override { *count = 2; return S_OK; } \
00262     IFACEMETHODIMP GetSource(UINT index, _Outptr_ abi::IGraphicsEffectSource ** source) override try \
00263     { \
00264         if (index == 0) to_winrt(*source) = m_##Name1; \
00265         else if (index == 1) to_winrt(*source) = m_##Name2; \
00266         else throw winrt::hresult_invalid_argument(); \
00267         MUX_CATCH_RETURN; \
00268     }
00269
00270 #pragma push_macro("DECLARE_NAMED_PROPERTY_MAPPING")
00271 #undef DECLARE_NAMED_PROPERTY_MAPPING
00272 #define DECLARE_NAMED_PROPERTY_MAPPING(...) \
00273     IFACEMETHODIMP GetNamedPropertyMapping(LPCWSTR name, _Out_ UINT * index, \
00274         _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING * mapping) override \
00275     { \
00276         static const NamedProperty s_Properties[] = { __VA_ARGS__ }; \
00277         return GetNamedPropertyMappingImpl(s_Properties, _countof(s_Properties), name, index, mapping); \
00278     }
00279
00280
00281     //-----------------------------------------------------------------------------------------------------------------
00282
00283     class AlphaMaskEffect :
00284         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::AlphaMaskEffectT<AlphaMaskEffect, EffectBase>
00285     {
00286     public:
00287         DECLARE_D2D_GUID(CLSID_D2D1AlphaMask);
00288         DECLARE_DUAL_SOURCES(Source, Mask);
00289     };
00290
00291     //-----------------------------------------------------------------------------------------------------------------
00292
00293     class ArithmeticCompositeEffect :
00294         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::ArithmeticCompositeEffectT<ArithmeticCompositeEffect, EffectBase>
00295     {
00296     public:
00297         DECLARE_D2D_GUID(CLSID_D2D1ArithmeticComposite);
00298         DECLARE_DUAL_SOURCES(Source1, Source2);
00299         DECLARE_POD_PROPERTY(MultiplyAmount, float, 1.0f, true);
00300         DECLARE_POD_PROPERTY(Source1Amount, float, 0.0f, true);
00301         DECLARE_POD_PROPERTY(Source2Amount, float, 0.0f, true);
00302         DECLARE_POD_PROPERTY(Offset, float, 0.0f, true);
00303         DECLARE_POD_PROPERTY(ClampOutput, bool, false, true);
00304         DECLARE_NAMED_PROPERTY_MAPPING(
00305             { L"MultiplyAmount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX },
00306             { L"Source1Amount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY },
00307             { L"Source2Amount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ },
00308             { L"Offset", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW },
00309             { L"ClampOutput", D2D1_ARITHMETICCOMPOSITE_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00310
00311     public:
00312         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 2; return S_OK; }
00313
00314         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00315         {
00316             return UsePropertyFactory(value, [=]()
00317             {
00318                 switch (index)
00319                 {
00320                     case D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS:
00321                     {
00322                         float coefficients[4] = { m_MultiplyAmount, m_Source1Amount, m_Source2Amount, m_Offset };
00323                         return winrt::PropertyValue::CreateSingleArray({ coefficients });
00324                     }
00325                     case D2D1_ARITHMETICCOMPOSITE_PROP_CLAMP_OUTPUT:
00326                         return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
00327                     default:
00328                         throw winrt::hresult_invalid_argument();
00329                 }
00330             });
00331         }
00332     };
00333
00334     //-----------------------------------------------------------------------------------------------------------------
00335
00336     class BlendEffect :
00337         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::BlendEffectT<BlendEffect, EffectBase>
00338     {
00339     public:
00340         DECLARE_D2D_GUID(CLSID_D2D1Blend);
00341         DECLARE_DUAL_SOURCES(Background, Foreground);
00342         DECLARE_POD_PROPERTY(Mode, winrt::BlendEffectMode, winrt::BlendEffectMode::Multiply, true);
00343         DECLARE_NAMED_PROPERTY_MAPPING(
00344             { L"Mode", D2D1_BLEND_PROP_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00345
00346     public:
00347         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
00348
00349         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00350         {
00351             return UsePropertyFactory(value, [=]()
00352             {
00353                 switch (index)
00354                 {
00355                     case D2D1_BLEND_PROP_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_Mode);
00356                     default: throw winrt::hresult_invalid_argument();
00357                 }
00358             });
00359         }
00360     };
00361
00362     //-----------------------------------------------------------------------------------------------------------------
00363
00364     class BorderEffect :
00365         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::BorderEffectT<BorderEffect, EffectBase>
00366     {
00367     public:
00368         DECLARE_D2D_GUID(CLSID_D2D1Border);
00369         DECLARE_SINGLE_SOURCE(Source);
00370         DECLARE_POD_PROPERTY(ExtendX, winrt::CanvasEdgeBehavior, winrt::CanvasEdgeBehavior::Clamp, true);
00371         DECLARE_POD_PROPERTY(ExtendY, winrt::CanvasEdgeBehavior, winrt::CanvasEdgeBehavior::Clamp, true);
00372         DECLARE_NAMED_PROPERTY_MAPPING(
00373             { L"ExtendX", D2D1_BORDER_PROP_EDGE_MODE_X, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00374             { L"ExtendY", D2D1_BORDER_PROP_EDGE_MODE_Y, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00375
00376     public:
00377         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 2; return S_OK; }
00378
00379         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00380         {
00381             return UsePropertyFactory(value, [=]()
00382             {
00383                 switch (index)
00384                 {
00385                 case D2D1_BORDER_PROP_EDGE_MODE_X: return winrt::PropertyValue::CreateUInt32((UINT32)m_ExtendX);
00386                 case D2D1_BORDER_PROP_EDGE_MODE_Y: return winrt::PropertyValue::CreateUInt32((UINT32)m_ExtendY);
00387                 default: throw winrt::hresult_invalid_argument();
00388                 }
00389             });
00390         }
00391     };
00392
00393     //-----------------------------------------------------------------------------------------------------------------
00394
00395     class ColorMatrixEffect :
00396         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::ColorMatrixEffectT<ColorMatrixEffect, EffectBase>
00397     {
00398     public:
00399         DECLARE_D2D_GUID(CLSID_D2D1ColorMatrix);
00400         DECLARE_SINGLE_SOURCE(Source);
00401         DECLARE_POD_PROPERTY(ColorMatrix, winrt::Matrix5x4, (winrt::Matrix5x4{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 }), true);
00402         DECLARE_POD_PROPERTY(AlphaMode, winrt::CanvasAlphaMode, winrt::CanvasAlphaMode::Premultiplied, value != winrt::CanvasAlphaMode::Ignore);
00403         DECLARE_POD_PROPERTY(ClampOutput, bool, false, true);
00404         DECLARE_NAMED_PROPERTY_MAPPING(
00405             { L"ColorMatrix", D2D1_COLORMATRIX_PROP_COLOR_MATRIX, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00406             { L"AlphaMode", D2D1_COLORMATRIX_PROP_ALPHA_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE },
00407             { L"ClampOutput", D2D1_COLORMATRIX_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00408
00409     public:
00410         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 3; return S_OK; }
00411
00412         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00413         {
00414             return UsePropertyFactory(value, [=]()
00415             {
00416                 switch (index)
00417                 {
00418                     case D2D1_COLORMATRIX_PROP_COLOR_MATRIX: return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 20>&>(m_ColorMatrix));
00419                     case D2D1_COLORMATRIX_PROP_ALPHA_MODE:
00420                     {
00421                         switch (m_AlphaMode)
00422                         {
00423                             case winrt::CanvasAlphaMode::Premultiplied:
00424                                 return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_PREMULTIPLIED);
00425                             case winrt::CanvasAlphaMode::Straight:
00426                                 return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_STRAIGHT);
00427                         }
00428                         break;
00429                     }
00430                     case D2D1_COLORMATRIX_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
00431                 }
00432                 throw winrt::hresult_invalid_argument();
00433             });
00434         }
00435     };
00436
00437     //-----------------------------------------------------------------------------------------------------------------
00438
00439     class ColorSourceEffect :
00440         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::ColorSourceEffectT<ColorSourceEffect, EffectBase>
00441     {
00442     public:
00443         DECLARE_D2D_GUID(CLSID_D2D1Flood);
00444         DECLARE_POD_PROPERTY(Color, UIColor, (UIColor{ 255, 0, 0, 0 }), true);
00445         DECLARE_NAMED_PROPERTY_MAPPING(
00446             { L"Color", D2D1_FLOOD_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4 });
00447
00448     public:
00449         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
00450
00451         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00452         {
00453             return UsePropertyFactory(value, [=]()
00454             {
00455                 switch (index)
00456                 {
00457                     case D2D1_FLOOD_PROP_COLOR: return CreateColor<4>(m_Color);
00458                     default: throw winrt::hresult_invalid_argument();
00459                 }
00460             });
00461         }
00462     };
00463
00464     //-----------------------------------------------------------------------------------------------------------------
00465     // Win2D has CompositeEffect with an arbitrary number of sources,
00466     // but this involves having an IVector of sources and is more trouble than it's worth.
00467     // We declare a simplified single-step composite effect between two sources.
00468
00469     class CompositeStepEffect :
00470         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::CompositeStepEffectT<CompositeStepEffect, EffectBase>
00471     {
00472     public:
00473         DECLARE_D2D_GUID(CLSID_D2D1Composite);
00474         DECLARE_DUAL_SOURCES(Destination, Source);
00475         DECLARE_POD_PROPERTY(Mode, winrt::CanvasComposite, winrt::CanvasComposite::SourceOver, true);
00476         DECLARE_NAMED_PROPERTY_MAPPING(
00477             { L"Mode", D2D1_COMPOSITE_PROP_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00478
00479     public:
00480         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
00481
00482         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00483         {
00484             return UsePropertyFactory(value, [=]()
00485             {
00486                 switch (index)
00487                 {
00488                     case D2D1_COMPOSITE_PROP_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_Mode);
00489                     default: throw winrt::hresult_invalid_argument();
00490                 }
00491             });
00492         }
00493     };
00494
00495     //-----------------------------------------------------------------------------------------------------------------
00496
00497     class ContrastEffect :
00498         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::ContrastEffectT<ContrastEffect, EffectBase>
00499     {
00500     public:
00501         DECLARE_D2D_GUID(CLSID_D2D1Contrast);
00502         DECLARE_SINGLE_SOURCE(Source);
00503         DECLARE_POD_PROPERTY(Contrast, float, 0.0f, value >= -1.0f && value <= 1.0f);
00504         DECLARE_POD_PROPERTY(ClampSource, bool, false, true);
00505         DECLARE_NAMED_PROPERTY_MAPPING(
00506             { L"Contrast", D2D1_CONTRAST_PROP_CONTRAST, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00507             { L"ClampSource", D2D1_CONTRAST_PROP_CLAMP_INPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00508
00509     public:
00510         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 2; return S_OK; }
00511
00512         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00513         {
00514             return UsePropertyFactory(value, [=]()
00515             {
00516                 switch (index)
00517                 {
00518                     case D2D1_CONTRAST_PROP_CONTRAST: return winrt::PropertyValue::CreateSingle(m_Contrast);
00519                     case D2D1_CONTRAST_PROP_CLAMP_INPUT: return winrt::PropertyValue::CreateBoolean(m_ClampSource);
00520                     default: throw winrt::hresult_invalid_argument();
00521                 }
00522             });
00523         }
00524     };
00525
00526     //-----------------------------------------------------------------------------------------------------------------
00527
00528     class CrossFadeEffect :
00529         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::CrossFadeEffectT<CrossFadeEffect, EffectBase>
00530     {
00531     public:
00532         DECLARE_D2D_GUID(CLSID_D2D1CrossFade);
00533         DECLARE_DUAL_SOURCES(Source1, Source2);
00534         DECLARE_POD_PROPERTY(Weight, float, 0.5f, value >= 0.0f && value <= 1.0f);
00535         DECLARE_NAMED_PROPERTY_MAPPING(
00536             { L"Weight", D2D1_CROSSFADE_PROP_WEIGHT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00537
00538     public:
00539         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
00540
00541         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00542         {
00543             return UsePropertyFactory(value, [=]()
00544             {
00545                 switch (index)
00546                 {
00547                     case D2D1_CROSSFADE_PROP_WEIGHT: return winrt::PropertyValue::CreateSingle(m_Weight);
00548                     default: throw winrt::hresult_invalid_argument();
00549                 }
00550             });
00551         }
00552     };
00553
00554     //-----------------------------------------------------------------------------------------------------------------
00555
00556     class DistantDiffuseEffect :
00557         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::DistantDiffuseEffectT<DistantDiffuseEffect, EffectBase>
00558     {
00559     public:
00560         DECLARE_D2D_GUID(CLSID_D2D1DistantDiffuse);
00561         DECLARE_SINGLE_SOURCE(Source);
00562         DECLARE_POD_PROPERTY(Azimuth, float, 0.0f, true); // D2D clamps within [0, 360] degrees
00563         DECLARE_POD_PROPERTY(Elevation, float, 0.0f, true); // D2D clamps within [0, 360] degrees
00564         DECLARE_POD_PROPERTY(DiffuseAmount, float, 1.0f, value >= 0.0f && value <= 10000.0f);
00565         DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
00566         DECLARE_POD_PROPERTY(LightColor, UIColor, (UIColor{ 255, 255, 255, 255 }), true);
00567         DECLARE_POD_PROPERTY(HeightMapKernelSize, winrt::float2, (winrt::float2{ 1.0f, 1.0f }),
00568             value.x >= 0.01f && value.y >= 0.01f && value.x <= 100.0f && value.y <= 100.0f);
00569         DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true);
00570         DECLARE_NAMED_PROPERTY_MAPPING(
00571             { L"Azimuth", D2D1_DISTANTDIFFUSE_PROP_AZIMUTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES },
00572             { L"Elevation", D2D1_DISTANTDIFFUSE_PROP_ELEVATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES },
00573             { L"DiffuseAmount", D2D1_DISTANTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00574             { L"HeightMapScale", D2D1_DISTANTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00575             { L"LightColor", D2D1_DISTANTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 },
00576             { L"HeightMapKernelSize", D2D1_DISTANTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00577             { L"HeightMapInterpolationMode", D2D1_DISTANTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT }, );
00578
00579     public:
00580         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 7; return S_OK; }
00581
00582         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00583         {
00584             return UsePropertyFactory(value, [=]()
00585             {
00586                 switch (index)
00587                 {
00588                     case D2D1_DISTANTDIFFUSE_PROP_AZIMUTH: return winrt::PropertyValue::CreateSingle(m_Azimuth * k_DegreesPerRadian);
00589                     case D2D1_DISTANTDIFFUSE_PROP_ELEVATION: return winrt::PropertyValue::CreateSingle(m_Elevation * k_DegreesPerRadian);
00590                     case D2D1_DISTANTDIFFUSE_PROP_DIFFUSE_CONSTANT: return winrt::PropertyValue::CreateSingle(m_DiffuseAmount);
00591                     case D2D1_DISTANTDIFFUSE_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
00592                     case D2D1_DISTANTDIFFUSE_PROP_COLOR: return CreateColor<3>(m_LightColor);
00593                     case D2D1_DISTANTDIFFUSE_PROP_KERNEL_UNIT_LENGTH:
00594                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
00595                     case D2D1_DISTANTDIFFUSE_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
00596                     default: throw winrt::hresult_invalid_argument();
00597                 }
00598             });
00599         }
00600     };
00601
00602     //-----------------------------------------------------------------------------------------------------------------
00603
00604     class DistantSpecularEffect :
00605         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::DistantSpecularEffectT<DistantSpecularEffect, EffectBase>
00606     {
00607     public:
00608         DECLARE_D2D_GUID(CLSID_D2D1DistantSpecular);
00609         DECLARE_SINGLE_SOURCE(Source);
00610         DECLARE_POD_PROPERTY(Azimuth, float, 0.0f, true); // D2D clamps within [0, 360] degrees
00611         DECLARE_POD_PROPERTY(Elevation, float, 0.0f, true); // D2D clamps within [0, 360] degrees
00612         DECLARE_POD_PROPERTY(SpecularExponent, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
00613         DECLARE_POD_PROPERTY(SpecularAmount, float, 1.0f, value >= 0.0f && value <= 10000.0f);
00614         DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
00615         DECLARE_POD_PROPERTY(LightColor, UIColor, (UIColor{ 255, 255, 255, 255 }), true);
00616         DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2, (Vector2{ 1.0f, 1.0f }),
00617             value.x >= 0.01f && value.y >= 0.01f && value.x <= 100.0f && value.y <= 100.0f);
00618         DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true);
00619         DECLARE_NAMED_PROPERTY_MAPPING(
00620             { L"Azimuth", D2D1_DISTANTSPECULAR_PROP_AZIMUTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES },
00621             { L"Elevation", D2D1_DISTANTSPECULAR_PROP_ELEVATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES },
00622             { L"SpecularExponent", D2D1_DISTANTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00623             { L"SpecularAmount", D2D1_DISTANTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00624             { L"HeightMapScale", D2D1_DISTANTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00625             { L"LightColor", D2D1_DISTANTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 },
00626             { L"HeightMapKernelSize", D2D1_DISTANTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00627             { L"HeightMapInterpolationMode", D2D1_DISTANTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },);
00628
00629     public:
00630         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 8; return S_OK; }
00631
00632         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00633         {
00634             return UsePropertyFactory(value, [=]()
00635             {
00636                 switch (index)
00637                 {
00638                     case D2D1_DISTANTSPECULAR_PROP_AZIMUTH: return winrt::PropertyValue::CreateSingle(m_Azimuth * k_DegreesPerRadian);
00639                     case D2D1_DISTANTSPECULAR_PROP_ELEVATION: return winrt::PropertyValue::CreateSingle(m_Elevation * k_DegreesPerRadian);
00640                     case D2D1_DISTANTSPECULAR_PROP_SPECULAR_EXPONENT: return winrt::PropertyValue::CreateSingle(m_SpecularExponent);
00641                     case D2D1_DISTANTSPECULAR_PROP_SPECULAR_CONSTANT: return winrt::PropertyValue::CreateSingle(m_SpecularAmount);
00642                     case D2D1_DISTANTSPECULAR_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
00643                     case D2D1_DISTANTSPECULAR_PROP_COLOR: return CreateColor<3>(m_LightColor);
00644                     case D2D1_DISTANTSPECULAR_PROP_KERNEL_UNIT_LENGTH:
00645                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
00646                     case D2D1_DISTANTSPECULAR_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
00647                     default: throw winrt::hresult_invalid_argument();
00648                 }
00649             });
00650         }
00651     };
00652
00653     //-----------------------------------------------------------------------------------------------------------------
00654
00655     class ExposureEffect :
00656         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::ExposureEffectT<ExposureEffect, EffectBase>
00657     {
00658     public:
00659         DECLARE_D2D_GUID(CLSID_D2D1Exposure);
00660         DECLARE_SINGLE_SOURCE(Source);
00661         DECLARE_POD_PROPERTY(Exposure, float, 0.0f, value >= -2.0f && value <= 2.0f);
00662         DECLARE_NAMED_PROPERTY_MAPPING(
00663             { L"Exposure", D2D1_EXPOSURE_PROP_EXPOSURE_VALUE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00664
00665     public:
00666         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
00667
00668         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00669         {
00670             return UsePropertyFactory(value, [=]()
00671             {
00672                 switch (index)
00673                 {
00674                     case D2D1_EXPOSURE_PROP_EXPOSURE_VALUE: return winrt::PropertyValue::CreateSingle(m_Exposure);
00675                     default: throw winrt::hresult_invalid_argument();
00676                 }
00677             });
00678         }
00679     };
00680
00681     //-----------------------------------------------------------------------------------------------------------------
00682
00683     class GammaTransferEffect :
00684         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::GammaTransferEffectT<GammaTransferEffect, EffectBase>
00685     {
00686     public:
00687         DECLARE_D2D_GUID(CLSID_D2D1GammaTransfer);
00688         DECLARE_SINGLE_SOURCE(Source);
00689         DECLARE_POD_PROPERTY(RedAmplitude, float, 1.0f, true);
00690         DECLARE_POD_PROPERTY(RedExponent, float, 1.0f, true);
00691         DECLARE_POD_PROPERTY(RedOffset, float, 0.0f, true);
00692         DECLARE_POD_PROPERTY(RedDisable, bool, false, true);
00693         DECLARE_POD_PROPERTY(GreenAmplitude, float, 1.0f, true);
00694         DECLARE_POD_PROPERTY(GreenExponent, float, 1.0f, true);
00695         DECLARE_POD_PROPERTY(GreenOffset, float, 0.0f, true);
00696         DECLARE_POD_PROPERTY(GreenDisable, bool, false, true);
00697         DECLARE_POD_PROPERTY(BlueAmplitude, float, 1.0f, true);
00698         DECLARE_POD_PROPERTY(BlueExponent, float, 1.0f, true);
00699         DECLARE_POD_PROPERTY(BlueOffset, float, 0.0f, true);
00700         DECLARE_POD_PROPERTY(BlueDisable, bool, false, true);
00701         DECLARE_POD_PROPERTY(AlphaAmplitude, float, 1.0f, true);
00702         DECLARE_POD_PROPERTY(AlphaExponent, float, 1.0f, true);
00703         DECLARE_POD_PROPERTY(AlphaOffset, float, 0.0f, true);
00704         DECLARE_POD_PROPERTY(AlphaDisable, bool, false, true);
00705         DECLARE_POD_PROPERTY(ClampOutput, bool, false, true);
00706         DECLARE_NAMED_PROPERTY_MAPPING(
00707             { L"RedAmplitude", D2D1_GAMMATRANSFER_PROP_RED_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00708             { L"RedExponent", D2D1_GAMMATRANSFER_PROP_RED_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00709             { L"RedOffset", D2D1_GAMMATRANSFER_PROP_RED_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00710             { L"RedDisable", D2D1_GAMMATRANSFER_PROP_RED_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00711             { L"GreenAmplitude", D2D1_GAMMATRANSFER_PROP_GREEN_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00712             { L"GreenExponent", D2D1_GAMMATRANSFER_PROP_GREEN_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00713             { L"GreenOffset", D2D1_GAMMATRANSFER_PROP_GREEN_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00714             { L"GreenDisable", D2D1_GAMMATRANSFER_PROP_GREEN_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00715             { L"BlueAmplitude", D2D1_GAMMATRANSFER_PROP_BLUE_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00716             { L"BlueExponent", D2D1_GAMMATRANSFER_PROP_BLUE_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00717             { L"BlueOffset", D2D1_GAMMATRANSFER_PROP_BLUE_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00718             { L"BlueDisable", D2D1_GAMMATRANSFER_PROP_BLUE_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00719             { L"AlphaAmplitude", D2D1_GAMMATRANSFER_PROP_ALPHA_AMPLITUDE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00720             { L"AlphaExponent", D2D1_GAMMATRANSFER_PROP_ALPHA_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00721             { L"AlphaOffset", D2D1_GAMMATRANSFER_PROP_ALPHA_OFFSET, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00722             { L"AlphaDisable", D2D1_GAMMATRANSFER_PROP_ALPHA_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00723             { L"ClampOutput", D2D1_GAMMATRANSFER_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00724
00725     public:
00726         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 17; return S_OK; }
00727
00728         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00729         {
00730             return UsePropertyFactory(value, [=]()
00731             {
00732                 switch (index)
00733                 {
00734                     case D2D1_GAMMATRANSFER_PROP_RED_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_RedAmplitude);
00735                     case D2D1_GAMMATRANSFER_PROP_RED_EXPONENT: return winrt::PropertyValue::CreateSingle(m_RedExponent);
00736                     case D2D1_GAMMATRANSFER_PROP_RED_OFFSET: return winrt::PropertyValue::CreateSingle(m_RedOffset);
00737                     case D2D1_GAMMATRANSFER_PROP_RED_DISABLE: return winrt::PropertyValue::CreateBoolean(m_RedDisable);
00738                     case D2D1_GAMMATRANSFER_PROP_GREEN_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_GreenAmplitude);
00739                     case D2D1_GAMMATRANSFER_PROP_GREEN_EXPONENT: return winrt::PropertyValue::CreateSingle(m_GreenExponent);
00740                     case D2D1_GAMMATRANSFER_PROP_GREEN_OFFSET: return winrt::PropertyValue::CreateSingle(m_GreenOffset);
00741                     case D2D1_GAMMATRANSFER_PROP_GREEN_DISABLE: return winrt::PropertyValue::CreateBoolean(m_GreenDisable);
00742                     case D2D1_GAMMATRANSFER_PROP_BLUE_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_BlueAmplitude);
00743                     case D2D1_GAMMATRANSFER_PROP_BLUE_EXPONENT: return winrt::PropertyValue::CreateSingle(m_BlueExponent);
00744                     case D2D1_GAMMATRANSFER_PROP_BLUE_OFFSET: return winrt::PropertyValue::CreateSingle(m_BlueOffset);
00745                     case D2D1_GAMMATRANSFER_PROP_BLUE_DISABLE: return winrt::PropertyValue::CreateBoolean(m_BlueDisable);
00746                     case D2D1_GAMMATRANSFER_PROP_ALPHA_AMPLITUDE: return winrt::PropertyValue::CreateSingle(m_AlphaAmplitude);
00747                     case D2D1_GAMMATRANSFER_PROP_ALPHA_EXPONENT: return winrt::PropertyValue::CreateSingle(m_AlphaExponent);
00748                     case D2D1_GAMMATRANSFER_PROP_ALPHA_OFFSET: return winrt::PropertyValue::CreateSingle(m_AlphaOffset);
00749                     case D2D1_GAMMATRANSFER_PROP_ALPHA_DISABLE: return winrt::PropertyValue::CreateBoolean(m_AlphaDisable);
00750                     case D2D1_GAMMATRANSFER_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
00751                     default: throw winrt::hresult_invalid_argument();
00752                 }
00753             });
00754         }
00755     };
00756
00757     //-----------------------------------------------------------------------------------------------------------------
00758     class GaussianBlurEffect :
00759         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::GaussianBlurEffectT<GaussianBlurEffect, EffectBase>
00760     {
00761     public:
00762         DECLARE_D2D_GUID(CLSID_D2D1GaussianBlur);
00763         DECLARE_SINGLE_SOURCE(Source);
00764         DECLARE_POD_PROPERTY(BlurAmount, float, 3.0f, value >= 0.0f && value <= 250.0f);
00765         DECLARE_POD_PROPERTY(Optimization, winrt::EffectOptimization, winrt::EffectOptimization::Balanced, true);
00766         DECLARE_POD_PROPERTY(BorderMode, winrt::EffectBorderMode, winrt::EffectBorderMode::Soft, true);
00767         DECLARE_NAMED_PROPERTY_MAPPING(
00768             { L"BlurAmount", D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00769             { L"Optimization", D2D1_GAUSSIANBLUR_PROP_OPTIMIZATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00770             { L"BorderMode", D2D1_GAUSSIANBLUR_PROP_BORDER_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00771
00772     public:
00773         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 3; return S_OK; }
00774
00775         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00776         {
00777             return UsePropertyFactory(value, [=]()
00778             {
00779                 switch (index)
00780                 {
00781                     case D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION: return winrt::PropertyValue::CreateSingle(m_BlurAmount);
00782                     case D2D1_GAUSSIANBLUR_PROP_OPTIMIZATION: return winrt::PropertyValue::CreateUInt32((UINT32)m_Optimization);
00783                     case D2D1_GAUSSIANBLUR_PROP_BORDER_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_BorderMode);
00784                     default: throw winrt::hresult_invalid_argument();
00785                 }
00786             });
00787         }
00788     };
00789
00790     //-----------------------------------------------------------------------------------------------------------------
00791
00792     class GrayscaleEffect :
00793         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::GrayscaleEffectT<GrayscaleEffect, EffectBase>
00794     {
00795     public:
00796         DECLARE_D2D_GUID(CLSID_D2D1Grayscale);
00797         DECLARE_SINGLE_SOURCE(Source);
00798     };
00799
00800     //-----------------------------------------------------------------------------------------------------------------
00801
00802     class HueRotationEffect :
00803         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::HueRotationEffectT<HueRotationEffect, EffectBase>
00804     {
00805     public:
00806         DECLARE_D2D_GUID(CLSID_D2D1HueRotation);
00807         DECLARE_SINGLE_SOURCE(Source);
00808         DECLARE_POD_PROPERTY(Angle, float, 0.0f, true);  // D2D clamps within [0, 360] degrees
00809         DECLARE_NAMED_PROPERTY_MAPPING(
00810             { L"Angle", D2D1_HUEROTATION_PROP_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES });
00811
00812     public:
00813         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
00814
00815         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00816         {
00817             return UsePropertyFactory(value, [=]()
00818             {
00819                 switch (index)
00820                 {
00821                     case D2D1_HUEROTATION_PROP_ANGLE:
00822                         return winrt::PropertyValue::CreateSingle(m_Angle * k_DegreesPerRadian);
00823                     default: throw winrt::hresult_invalid_argument();
00824                 }
00825             });
00826         }
00827     };
00828
00829     //-----------------------------------------------------------------------------------------------------------------
00830
00831     class InvertEffect :
00832         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::InvertEffectT<InvertEffect, EffectBase>
00833     {
00834     public:
00835         DECLARE_D2D_GUID(CLSID_D2D1Invert);
00836         DECLARE_SINGLE_SOURCE(Source);
00837     };
00838
00839     //-----------------------------------------------------------------------------------------------------------------
00840
00841     class LinearTransferEffect :
00842         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::LinearTransferEffectT<LinearTransferEffect, EffectBase>
00843     {
00844     public:
00845         DECLARE_D2D_GUID(CLSID_D2D1LinearTransfer);
00846         DECLARE_SINGLE_SOURCE(Source);
00847         DECLARE_POD_PROPERTY(RedOffset, float, 0.0f, true);
00848         DECLARE_POD_PROPERTY(RedSlope, float, 1.0f, true);
00849         DECLARE_POD_PROPERTY(RedDisable, bool, false, true);
00850         DECLARE_POD_PROPERTY(GreenOffset, float, 0.0f, true);
00851         DECLARE_POD_PROPERTY(GreenSlope, float, 1.0f, true);
00852         DECLARE_POD_PROPERTY(GreenDisable, bool, false, true);
00853         DECLARE_POD_PROPERTY(BlueOffset, float, 0.0f, true);
00854         DECLARE_POD_PROPERTY(BlueSlope, float, 1.0f, true);
00855         DECLARE_POD_PROPERTY(BlueDisable, bool, false, true);
00856         DECLARE_POD_PROPERTY(AlphaOffset, float, 0.0f, true);
00857         DECLARE_POD_PROPERTY(AlphaSlope, float, 1.0f, true);
00858         DECLARE_POD_PROPERTY(AlphaDisable, bool, false, true);
00859         DECLARE_POD_PROPERTY(ClampOutput, bool, false, true);
00860         DECLARE_NAMED_PROPERTY_MAPPING(
00861             { L"RedOffset", D2D1_LINEARTRANSFER_PROP_RED_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00862             { L"RedSlope", D2D1_LINEARTRANSFER_PROP_RED_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00863             { L"RedDisable", D2D1_LINEARTRANSFER_PROP_RED_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00864             { L"GreenOffset", D2D1_LINEARTRANSFER_PROP_GREEN_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00865             { L"GreenSlope", D2D1_LINEARTRANSFER_PROP_GREEN_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00866             { L"GreenDisable", D2D1_LINEARTRANSFER_PROP_GREEN_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00867             { L"BlueOffset", D2D1_LINEARTRANSFER_PROP_BLUE_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00868             { L"BlueSlope", D2D1_LINEARTRANSFER_PROP_BLUE_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00869             { L"BlueDisable", D2D1_LINEARTRANSFER_PROP_BLUE_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00870             { L"AlphaOffset", D2D1_LINEARTRANSFER_PROP_ALPHA_Y_INTERCEPT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00871             { L"AlphaSlope", D2D1_LINEARTRANSFER_PROP_ALPHA_SLOPE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00872             { L"AlphaDisable", D2D1_LINEARTRANSFER_PROP_ALPHA_DISABLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00873             { L"ClampOutput", D2D1_LINEARTRANSFER_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT } );
00874
00875     public:
00876         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 13; return S_OK; }
00877
00878         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00879         {
00880             return UsePropertyFactory(value, [=]()
00881             {
00882                 switch (index)
00883                 {
00884                     case D2D1_LINEARTRANSFER_PROP_RED_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_RedOffset);
00885                     case D2D1_LINEARTRANSFER_PROP_RED_SLOPE: return winrt::PropertyValue::CreateSingle(m_RedSlope);
00886                     case D2D1_LINEARTRANSFER_PROP_RED_DISABLE: return winrt::PropertyValue::CreateBoolean(m_RedDisable);
00887                     case D2D1_LINEARTRANSFER_PROP_GREEN_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_GreenOffset);
00888                     case D2D1_LINEARTRANSFER_PROP_GREEN_SLOPE: return winrt::PropertyValue::CreateSingle(m_GreenSlope);
00889                     case D2D1_LINEARTRANSFER_PROP_GREEN_DISABLE: return winrt::PropertyValue::CreateBoolean(m_GreenDisable);
00890                     case D2D1_LINEARTRANSFER_PROP_BLUE_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_BlueOffset);
00891                     case D2D1_LINEARTRANSFER_PROP_BLUE_SLOPE: return winrt::PropertyValue::CreateSingle(m_BlueSlope);
00892                     case D2D1_LINEARTRANSFER_PROP_BLUE_DISABLE: return winrt::PropertyValue::CreateBoolean(m_BlueDisable);
00893                     case D2D1_LINEARTRANSFER_PROP_ALPHA_Y_INTERCEPT: return winrt::PropertyValue::CreateSingle(m_AlphaOffset);
00894                     case D2D1_LINEARTRANSFER_PROP_ALPHA_SLOPE: return winrt::PropertyValue::CreateSingle(m_AlphaSlope);
00895                     case D2D1_LINEARTRANSFER_PROP_ALPHA_DISABLE: return winrt::PropertyValue::CreateBoolean(m_AlphaDisable);
00896                     case D2D1_LINEARTRANSFER_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
00897                     default: throw winrt::hresult_invalid_argument();
00898                 }
00899             });
00900         }
00901     };
00902
00903     //-----------------------------------------------------------------------------------------------------------------
00904
00905     class LuminanceToAlphaEffect :
00906         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::LuminanceToAlphaEffectT<LuminanceToAlphaEffect, EffectBase>
00907     {
00908     public:
00909         DECLARE_D2D_GUID(CLSID_D2D1LuminanceToAlpha);
00910         DECLARE_SINGLE_SOURCE(Source);
00911     };
00912
00913     //-----------------------------------------------------------------------------------------------------------------
00914
00915     class OpacityEffect :
00916         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::OpacityEffectT<OpacityEffect, EffectBase>
00917     {
00918     public:
00919         DECLARE_D2D_GUID(CLSID_D2D1Opacity);
00920         DECLARE_SINGLE_SOURCE(Source);
00921         DECLARE_POD_PROPERTY(Opacity, float, 1.0f, value >= 0.0f && value <= 1.0f);
00922         DECLARE_NAMED_PROPERTY_MAPPING(
00923             { L"Opacity", D2D1_OPACITY_PROP_OPACITY, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
00924
00925     public:
00926         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
00927
00928         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00929         {
00930             return UsePropertyFactory(value, [=]()
00931             {
00932                 switch (index)
00933                 {
00934                     case D2D1_OPACITY_PROP_OPACITY: return winrt::PropertyValue::CreateSingle(m_Opacity);
00935                     default: throw winrt::hresult_invalid_argument();
00936                 }
00937             });
00938         }
00939     };
00940
00941     //-----------------------------------------------------------------------------------------------------------------
00942
00943     class PointDiffuseEffect :
00944         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::PointDiffuseEffectT<PointDiffuseEffect, EffectBase>
00945     {
00946     public:
00947         DECLARE_D2D_GUID(CLSID_D2D1PointDiffuse);
00948         DECLARE_SINGLE_SOURCE(Source);
00949         DECLARE_POD_PROPERTY(LightPosition, Vector3, (Vector3{ 0.0f, 0.0f, 0.0f }), true);
00950         DECLARE_POD_PROPERTY(DiffuseAmount, float, 1.0f, value >= 0.0f && value <= 10000.0f);
00951         DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
00952         DECLARE_POD_PROPERTY(LightColor, UIColor, (UIColor{ 255, 255, 255, 255 }), true);
00953         DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2, (Vector2{ 1.0f, 1.0f }),
00954             value.x >= 0.01f && value.y >= 0.01f && value.x <= 100.0f && value.y <= 100.0f);
00955         DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true);
00956         DECLARE_NAMED_PROPERTY_MAPPING(
00957             { L"LightPosition", D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00958             { L"DiffuseAmount", D2D1_POINTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00959             { L"HeightMapScale", D2D1_POINTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00960             { L"LightColor", D2D1_POINTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 },
00961             { L"HeightMapKernelSize", D2D1_POINTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
00962             { L"HeightMapInterpolationMode", D2D1_POINTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },);
00963
00964     public:
00965         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 6; return S_OK; }
00966
00967         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
00968         {
00969             return UsePropertyFactory(value, [=]()
00970             {
00971                 switch (index)
00972                 {
00973                     case D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION:
00974                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
00975                     case D2D1_POINTDIFFUSE_PROP_DIFFUSE_CONSTANT: return winrt::PropertyValue::CreateSingle(m_DiffuseAmount);
00976                     case D2D1_POINTDIFFUSE_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
00977                     case D2D1_POINTDIFFUSE_PROP_COLOR: return CreateColor<3>(m_LightColor);
00978                     case D2D1_POINTDIFFUSE_PROP_KERNEL_UNIT_LENGTH:
00979                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
00980                     case D2D1_POINTDIFFUSE_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
00981                     default: throw winrt::hresult_invalid_argument();
00982                 }
00983             });
00984         }
00985     };
00986
00987     //-----------------------------------------------------------------------------------------------------------------
00988
00989     class PointSpecularEffect :
00990         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::PointSpecularEffectT<PointSpecularEffect, EffectBase>
00991     {
00992     public:
00993         DECLARE_D2D_GUID(CLSID_D2D1PointSpecular);
00994         DECLARE_SINGLE_SOURCE(Source);
00995         DECLARE_POD_PROPERTY(LightPosition, Vector3, (Vector3{ 0.0f, 0.0f, 0.0f }), true);
00996         DECLARE_POD_PROPERTY(SpecularExponent, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
00997         DECLARE_POD_PROPERTY(SpecularAmount, float, 1.0f, value >= 0.0f && value <= 10000.0f);
00998         DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
00999         DECLARE_POD_PROPERTY(LightColor, UIColor, (UIColor{ 255, 255, 255, 255 }), true);
01000         DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2, (Vector2{ 1.0f, 1.0f }),
01001             value.x >= 0.01f && value.y >= 0.01f && value.x <= 100.0f && value.y <= 100.0f);
01002         DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true);
01003         DECLARE_NAMED_PROPERTY_MAPPING(
01004             { L"LightPosition", D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01005             { L"SpecularExponent", D2D1_POINTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01006             { L"SpecularAmount", D2D1_POINTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01007             { L"HeightMapScale", D2D1_POINTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01008             { L"LightColor", D2D1_POINTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 },
01009             { L"HeightMapKernelSize", D2D1_POINTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01010             { L"HeightMapInterpolationMode", D2D1_POINTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },);
01011
01012     public:
01013         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 7; return S_OK; }
01014
01015         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01016         {
01017             return UsePropertyFactory(value, [=]()
01018             {
01019                 switch (index)
01020                 {
01021                     case D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION:
01022                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
01023                     case D2D1_POINTSPECULAR_PROP_SPECULAR_EXPONENT: return winrt::PropertyValue::CreateSingle(m_SpecularExponent);
01024                     case D2D1_POINTSPECULAR_PROP_SPECULAR_CONSTANT: return winrt::PropertyValue::CreateSingle(m_SpecularAmount);
01025                     case D2D1_POINTSPECULAR_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
01026                     case D2D1_POINTSPECULAR_PROP_COLOR: return CreateColor<3>(m_LightColor);
01027                     case D2D1_POINTSPECULAR_PROP_KERNEL_UNIT_LENGTH:
01028                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
01029                     case D2D1_POINTSPECULAR_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
01030                     default: throw winrt::hresult_invalid_argument();
01031                 }
01032             });
01033         }
01034     };
01035
01036     //-----------------------------------------------------------------------------------------------------------------
01037
01038     class PosterizeEffect :
01039         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::PosterizeEffectT<PosterizeEffect, EffectBase>
01040     {
01041     public:
01042         DECLARE_D2D_GUID(CLSID_D2D1Posterize);
01043         DECLARE_SINGLE_SOURCE(Source);
01044         DECLARE_POD_PROPERTY(RedValueCount, int, 4, value >= 2 && value <= 16);
01045         DECLARE_POD_PROPERTY(GreenValueCount, int, 4, value >= 2 && value <= 16);
01046         DECLARE_POD_PROPERTY(BlueValueCount, int, 4, value >= 2 && value <= 16);
01047         DECLARE_NAMED_PROPERTY_MAPPING(
01048             { L"RedValueCount", D2D1_POSTERIZE_PROP_RED_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01049             { L"GreenValueCount", D2D1_POSTERIZE_PROP_GREEN_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01050             { L"BlueValueCount", D2D1_POSTERIZE_PROP_BLUE_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
01051
01052     public:
01053         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
01054
01055         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01056         {
01057             return UsePropertyFactory(value, [=]()
01058             {
01059                 switch (index)
01060                 {
01061                     case D2D1_POSTERIZE_PROP_RED_VALUE_COUNT: return winrt::PropertyValue::CreateInt32(m_RedValueCount);
01062                     case D2D1_POSTERIZE_PROP_GREEN_VALUE_COUNT: return winrt::PropertyValue::CreateInt32(m_GreenValueCount);
01063                     case D2D1_POSTERIZE_PROP_BLUE_VALUE_COUNT: return winrt::PropertyValue::CreateInt32(m_BlueValueCount);
01064                     default: throw winrt::hresult_invalid_argument();
01065                 }
01066             });
01067         }
01068     };
01069
01070     //-----------------------------------------------------------------------------------------------------------------
01071
01072     class PremultiplyEffect :
01073         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::PremultiplyEffectT<PremultiplyEffect, EffectBase>
01074     {
01075     public:
01076         DECLARE_D2D_GUID(CLSID_D2D1Premultiply);
01077         DECLARE_SINGLE_SOURCE(Source);
01078     };
01079
01080     //-----------------------------------------------------------------------------------------------------------------
01081
01082     class SaturationEffect :
01083         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::SaturationEffectT<SaturationEffect, EffectBase>
01084     {
01085     public:
01086         DECLARE_D2D_GUID(CLSID_D2D1Saturation);
01087         DECLARE_SINGLE_SOURCE(Source);
01088         DECLARE_POD_PROPERTY(Saturation, float, 0.5f, value >= 0.0f && value <= 2.0f);
01089         DECLARE_NAMED_PROPERTY_MAPPING(
01090             { L"Saturation", D2D1_SATURATION_PROP_SATURATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
01091
01092     public:
01093         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 1; return S_OK; }
01094
01095         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01096         {
01097             return UsePropertyFactory(value, [=]()
01098             {
01099                 switch (index)
01100                 {
01101                     case D2D1_SATURATION_PROP_SATURATION: return winrt::PropertyValue::CreateSingle(m_Saturation);
01102                     default: throw winrt::hresult_invalid_argument();
01103                 }
01104             });
01105         }
01106     };
01107
01108     //-----------------------------------------------------------------------------------------------------------------
01109
01110     class SepiaEffect :
01111         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::SepiaEffectT<SepiaEffect, EffectBase>
01112     {
01113     public:
01114         DECLARE_D2D_GUID(CLSID_D2D1Sepia);
01115         DECLARE_SINGLE_SOURCE(Source);
01116         DECLARE_POD_PROPERTY(Intensity, float, 0.5f, value >= 0.0f && value <= 1.0f);
01117         DECLARE_POD_PROPERTY(AlphaMode, winrt::CanvasAlphaMode, winrt::CanvasAlphaMode::Premultiplied, value != winrt::CanvasAlphaMode::Ignore);
01118         DECLARE_NAMED_PROPERTY_MAPPING(
01119             { L"Intensity", D2D1_SEPIA_PROP_INTENSITY, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01120             { L"AlphaMode", D2D1_SEPIA_PROP_ALPHA_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE });
01121
01122     public:
01123         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 2; return S_OK; }
01124
01125         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01126         {
01127             return UsePropertyFactory(value, [=]()
01128             {
01129                 switch (index)
01130                 {
01131                     case D2D1_SEPIA_PROP_INTENSITY: return winrt::PropertyValue::CreateSingle(m_Intensity);
01132                     case D2D1_SEPIA_PROP_ALPHA_MODE:
01133                     {
01134                         switch (m_AlphaMode)
01135                         {
01136                             case winrt::CanvasAlphaMode::Premultiplied:
01137                                 return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_PREMULTIPLIED);
01138                             case winrt::CanvasAlphaMode::Straight:
01139                                 return winrt::PropertyValue::CreateUInt32(D2D1_COLORMANAGEMENT_ALPHA_MODE_STRAIGHT);
01140                         }
01141                         break;
01142                     }
01143                 }
01144                 throw winrt::hresult_invalid_argument();
01145             });
01146         }
01147     };
01148
01149     //-----------------------------------------------------------------------------------------------------------------
01150
01151     class SpotDiffuseEffect :
01152         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::SpotDiffuseEffectT<SpotDiffuseEffect, EffectBase>
01153     {
01154     public:
01155         DECLARE_D2D_GUID(CLSID_D2D1SpotDiffuse);
01156         DECLARE_SINGLE_SOURCE(Source);
01157         DECLARE_POD_PROPERTY(LightPosition, Vector3, (Vector3{ 0.0f, 0.0f, 0.0f }), true);
01158         DECLARE_POD_PROPERTY(LightTarget, Vector3, (Vector3{ 0.0f, 0.0f, 0.0f }), true);
01159         DECLARE_POD_PROPERTY(Focus, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
01160         DECLARE_POD_PROPERTY(LimitingConeAngle, float, k_PI / 2.0f, true); // D2D clamps within [-90, 90] degrees
01161         DECLARE_POD_PROPERTY(DiffuseAmount, float, 1.0f, value >= 0.0f && value <= 10000.0f);
01162         DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
01163         DECLARE_POD_PROPERTY(LightColor, UIColor, (UIColor{ 255, 255, 255, 255 }), true);
01164         DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2, (Vector2{ 1.0f, 1.0f }),
01165             value.x >= 0.01f && value.y >= 0.01f && value.x <= 100.0f && value.y <= 100.0f);
01166         DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true);
01167         DECLARE_NAMED_PROPERTY_MAPPING(
01168             { L"LightPosition", D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01169             { L"LightTarget", D2D1_SPOTDIFFUSE_PROP_POINTS_AT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01170             { L"Focus", D2D1_SPOTDIFFUSE_PROP_FOCUS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01171             { L"LimitingConeAngle", D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES },
01172             { L"DiffuseAmount", D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01173             { L"HeightMapScale", D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01174             { L"LightColor", D2D1_SPOTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 },
01175             { L"HeightMapKernelSize", D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01176             { L"HeightMapInterpolationMode", D2D1_SPOTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },);
01177
01178     public:
01179         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 9; return S_OK; }
01180
01181         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01182         {
01183             return UsePropertyFactory(value, [=]()
01184             {
01185                 switch (index)
01186                 {
01187                     case D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION:
01188                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
01189                     case D2D1_SPOTDIFFUSE_PROP_POINTS_AT:
01190                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightTarget));
01191                     case D2D1_SPOTDIFFUSE_PROP_FOCUS: return winrt::PropertyValue::CreateSingle(m_Focus);
01192                     case D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE:
01193                         return winrt::PropertyValue::CreateSingle(m_LimitingConeAngle * k_DegreesPerRadian);
01194                     case D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT: return winrt::PropertyValue::CreateSingle(m_DiffuseAmount);
01195                     case D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
01196                     case D2D1_SPOTDIFFUSE_PROP_COLOR: return CreateColor<3>(m_LightColor);
01197                     case D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH:
01198                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
01199                     case D2D1_SPOTDIFFUSE_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
01200                     default: throw winrt::hresult_invalid_argument();
01201                 }
01202             });
01203         }
01204     };
01205
01206     //-----------------------------------------------------------------------------------------------------------------
01207
01208     class SpotSpecularEffect :
01209         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::SpotSpecularEffectT<SpotSpecularEffect, EffectBase>
01210     {
01211     public:
01212         DECLARE_D2D_GUID(CLSID_D2D1SpotSpecular);
01213         DECLARE_SINGLE_SOURCE(Source);
01214         DECLARE_POD_PROPERTY(LightPosition, Vector3, (Vector3{ 0.0f, 0.0f, 0.0f }), true);
01215         DECLARE_POD_PROPERTY(LightTarget, Vector3, (Vector3{ 0.0f, 0.0f, 0.0f }), true);
01216         DECLARE_POD_PROPERTY(Focus, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
01217         DECLARE_POD_PROPERTY(LimitingConeAngle, float, k_PI / 2.0f, true); // D2D clamps within [-90, 90] degrees
01218         DECLARE_POD_PROPERTY(SpecularExponent, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
01219         DECLARE_POD_PROPERTY(SpecularAmount, float, 1.0f, value >= 0.0f && value <= 10000.0f);
01220         DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >= -10000.0f && value <= 10000.0f);
01221         DECLARE_POD_PROPERTY(LightColor, UIColor, (UIColor{ 255, 255, 255, 255 }), true);
01222         DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2, (Vector2{ 1.0f, 1.0f }),
01223             value.x >= 0.01f && value.y >= 0.01f && value.x <= 100.0f && value.y <= 100.0f);
01224         DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true);
01225         DECLARE_NAMED_PROPERTY_MAPPING(
01226             { L"LightPosition", D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01227             { L"LightTarget", D2D1_SPOTDIFFUSE_PROP_POINTS_AT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01228             { L"Focus", D2D1_SPOTDIFFUSE_PROP_FOCUS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01229             { L"LimitingConeAngle", D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES },
01230             { L"SpecularExponent", D2D1_SPOTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01231             { L"SpecularAmount", D2D1_SPOTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01232             { L"HeightMapScale", D2D1_SPOTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01233             { L"LightColor", D2D1_SPOTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3 },
01234             { L"HeightMapKernelSize", D2D1_SPOTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01235             { L"HeightMapInterpolationMode", D2D1_SPOTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },);
01236
01237     public:
01238         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 10; return S_OK; }
01239
01240         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01241         {
01242             return UsePropertyFactory(value, [=]()
01243             {
01244                 switch (index)
01245                 {
01246                     case D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION:
01247                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightPosition));
01248                     case D2D1_SPOTDIFFUSE_PROP_POINTS_AT:
01249                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 3>&>(m_LightTarget));
01250                     case D2D1_SPOTDIFFUSE_PROP_FOCUS: return winrt::PropertyValue::CreateSingle(m_Focus);
01251                     case D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE:
01252                         return winrt::PropertyValue::CreateSingle(m_LimitingConeAngle * k_DegreesPerRadian);
01253                     case D2D1_SPOTSPECULAR_PROP_SPECULAR_EXPONENT: return winrt::PropertyValue::CreateSingle(m_SpecularExponent);
01254                     case D2D1_SPOTSPECULAR_PROP_SPECULAR_CONSTANT: return winrt::PropertyValue::CreateSingle(m_SpecularAmount);
01255                     case D2D1_SPOTSPECULAR_PROP_SURFACE_SCALE: return winrt::PropertyValue::CreateSingle(m_HeightMapScale);
01256                     case D2D1_SPOTSPECULAR_PROP_COLOR: return CreateColor<3>(m_LightColor);
01257                     case D2D1_SPOTSPECULAR_PROP_KERNEL_UNIT_LENGTH:
01258                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 2>&>(m_HeightMapKernelSize));
01259                     case D2D1_SPOTSPECULAR_PROP_SCALE_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_HeightMapInterpolationMode);
01260                     default: throw winrt::hresult_invalid_argument();
01261                 }
01262             });
01263         }
01264     };
01265
01266     //-----------------------------------------------------------------------------------------------------------------
01267
01268     class TemperatureAndTintEffect :
01269         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::TemperatureAndTintEffectT<TemperatureAndTintEffect, EffectBase>
01270     {
01271     public:
01272         DECLARE_D2D_GUID(CLSID_D2D1TemperatureTint);
01273         DECLARE_SINGLE_SOURCE(Source);
01274         DECLARE_POD_PROPERTY(Temperature, float, 0.0f, value >= -1.0f && value <= 1.0f);
01275         DECLARE_POD_PROPERTY(Tint, float, 0.0f, value >= -1.0f && value <= 1.0f);
01276         DECLARE_NAMED_PROPERTY_MAPPING(
01277             { L"Temperature", D2D1_TEMPERATUREANDTINT_PROP_TEMPERATURE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01278             { L"Tint", D2D1_TEMPERATUREANDTINT_PROP_TINT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
01279
01280     public:
01281         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 2; return S_OK; }
01282
01283         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01284         {
01285             return UsePropertyFactory(value, [=]()
01286             {
01287                 switch (index)
01288                 {
01289                     case D2D1_TEMPERATUREANDTINT_PROP_TEMPERATURE: return winrt::PropertyValue::CreateSingle(m_Temperature);
01290                     case D2D1_TEMPERATUREANDTINT_PROP_TINT: return winrt::PropertyValue::CreateSingle(m_Tint);
01291                     default: throw winrt::hresult_invalid_argument();
01292                 }
01293             });
01294         }
01295     };
01296
01297     //-----------------------------------------------------------------------------------------------------------------
01298
01299     class TintEffect :
01300         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::TintEffectT<TintEffect, EffectBase>
01301     {
01302     public:
01303         DECLARE_D2D_GUID(CLSID_D2D1Tint);
01304         DECLARE_SINGLE_SOURCE(Source);
01305         DECLARE_POD_PROPERTY(Color, UIColor, (UIColor{ 255, 255, 255, 255 }), true);
01306         DECLARE_POD_PROPERTY(ClampOutput, bool, false, true);
01307         DECLARE_NAMED_PROPERTY_MAPPING(
01308             { L"Color", D2D1_TINT_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR4 },
01309             { L"ClampOutput", D2D1_TINT_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
01310
01311     public:
01312         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 2; return S_OK; }
01313
01314         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01315         {
01316             return UsePropertyFactory(value, [=]()
01317             {
01318                 switch (index)
01319                 {
01320                     case D2D1_TINT_PROP_COLOR: return CreateColor<4>(m_Color);
01321                     case D2D1_TINT_PROP_CLAMP_OUTPUT: return winrt::PropertyValue::CreateBoolean(m_ClampOutput);
01322                     default: throw winrt::hresult_invalid_argument();
01323                 }
01324             });
01325         }
01326     };
01327
01328     //-----------------------------------------------------------------------------------------------------------------
01329
01330     class Transform2DEffect :
01331         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::Transform2DEffectT<Transform2DEffect, EffectBase>
01332     {
01333     public:
01334         DECLARE_D2D_GUID(CLSID_D2D12DAffineTransform);
01335         DECLARE_SINGLE_SOURCE(Source);
01336         DECLARE_POD_PROPERTY(InterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true);
01337         DECLARE_POD_PROPERTY(BorderMode, winrt::EffectBorderMode, winrt::EffectBorderMode::Soft, true);
01338         DECLARE_POD_PROPERTY(TransformMatrix, winrt::float3x2, (winrt::float3x2{ 1, 0, 0, 1, 0, 0}), true);
01339         DECLARE_POD_PROPERTY(Sharpness, float, 0.0f, value >= 0.0f && value <= 1.0f);
01340         DECLARE_NAMED_PROPERTY_MAPPING(
01341             { L"InterpolationMode", D2D1_2DAFFINETRANSFORM_PROP_INTERPOLATION_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01342             { L"BorderMode", D2D1_2DAFFINETRANSFORM_PROP_BORDER_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01343             { L"TransformMatrix", D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT },
01344             { L"Sharpness", D2D1_2DAFFINETRANSFORM_PROP_SHARPNESS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT });
01345
01346     public:
01347         IFACEMETHODIMP GetPropertyCount(_Out_ UINT * count) override { *count = 4; return S_OK; }
01348
01349         IFACEMETHODIMP GetProperty(UINT index, _Outptr_ abi::IPropertyValue ** value) override
01350         {
01351             return UsePropertyFactory(value, [=]()
01352             {
01353                 switch (index)
01354                 {
01355                     case D2D1_2DAFFINETRANSFORM_PROP_INTERPOLATION_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_InterpolationMode);
01356                     case D2D1_2DAFFINETRANSFORM_PROP_BORDER_MODE: return winrt::PropertyValue::CreateUInt32((UINT32)m_BorderMode);
01357                     case D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX:
01358                         return winrt::PropertyValue::CreateSingleArray(reinterpret_cast<std::array<float, 6>&>(m_TransformMatrix));
01359                     case D2D1_2DAFFINETRANSFORM_PROP_SHARPNESS: return winrt::PropertyValue::CreateSingle(m_Sharpness);
01360                     default: throw winrt::hresult_invalid_argument();
01361                 }
01362             });
01363         }
01364     };
01365
01366     //-----------------------------------------------------------------------------------------------------------------
01367
01368     class UnPremultiplyEffect :
01369         public winrt::Microsoft::UI::Private::Composition::Effects::implementation::UnPremultiplyEffectT<UnPremultiplyEffect, EffectBase>
01370     {
01371     public:
01372         DECLARE_D2D_GUID(CLSID_D2D1UnPremultiply);
01373         DECLARE_SINGLE_SOURCE(Source);
01374     };
01375
01376     //-----------------------------------------------------------------------------------------------------------------
01377     // Clean up preprocessor state
01378
01379 #ifndef MICROSOFT_UI_COMPOSITION_EFFECT_IMPL_KEEP_MACROS
01380 #    pragma pop_macro("DECLARE_D2D_GUID")
01381 #    pragma pop_macro("DECLARE_POD_PROPERTY")
01382 #    pragma pop_macro("DECLARE_SOURCE")
01383 #    pragma pop_macro("DECLARE_SINGLE_SOURCE")
01384 #    pragma pop_macro("DECLARE_DUAL_SOURCES")
01385 #    pragma pop_macro("DECLARE_NAMED_PROPERTY_MAPPING")
01386 #endif
01387
01388 }}}}}
01389 #pragma warning(pop)
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockItemsSource::KeyFromIndexCallInfo Member List

This is the complete list of members for MockItemsSource::KeyFromIndexCallInfo, including all inherited members.
Index | MockItemsSource::KeyFromIndexCallInfo |
KeyFromIndexCallInfo(int index) | MockItemsSource::KeyFromIndexCallInfo | [inline]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MonochromaticOverlayPresenter.properties.cpp Source File

  • File List
  • File Members
  • Generated

MonochromaticOverlayPresenter.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MonochromaticOverlayPresenter.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(MonochromaticOverlayPresenter)
00012 }
00013
00014 #include "MonochromaticOverlayPresenter.g.cpp"
00015
00016 GlobalDependencyProperty MonochromaticOverlayPresenterProperties::s_ReplacementColorProperty{ nullptr };
00017 GlobalDependencyProperty MonochromaticOverlayPresenterProperties::s_SourceElementProperty{ nullptr };
00018
00019 MonochromaticOverlayPresenterProperties::MonochromaticOverlayPresenterProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void MonochromaticOverlayPresenterProperties::EnsureProperties()
00025 {
00026     if (!s_ReplacementColorProperty)
00027     {
00028         s_ReplacementColorProperty =
00029             InitializeDependencyProperty(
00030                 L"ReplacementColor",
00031                 winrt::name_of<winrt::Color>(),
00032                 winrt::name_of<winrt::MonochromaticOverlayPresenter>(),
00033                 false /* isAttached */,
00034                 ValueHelper<winrt::Color>::BoxedDefaultValue(),
00035                 winrt::PropertyChangedCallback(&OnReplacementColorPropertyChanged));
00036     }
00037     if (!s_SourceElementProperty)
00038     {
00039         s_SourceElementProperty =
00040             InitializeDependencyProperty(
00041                 L"SourceElement",
00042                 winrt::name_of<winrt::UIElement>(),
00043                 winrt::name_of<winrt::MonochromaticOverlayPresenter>(),
00044                 false /* isAttached */,
00045                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00046                 winrt::PropertyChangedCallback(&OnSourceElementPropertyChanged));
00047     }
00048 }
00049
00050 void MonochromaticOverlayPresenterProperties::ClearProperties()
00051 {
00052     s_ReplacementColorProperty = nullptr;
00053     s_SourceElementProperty = nullptr;
00054 }
00055
00056 void MonochromaticOverlayPresenterProperties::OnReplacementColorPropertyChanged(
00057     winrt::DependencyObject const& sender,
00058     winrt::DependencyPropertyChangedEventArgs const& args)
00059 {
00060     auto owner = sender.as<winrt::MonochromaticOverlayPresenter>();
00061     winrt::get_self<MonochromaticOverlayPresenter>(owner)->OnPropertyChanged(args);
00062 }
00063
00064 void MonochromaticOverlayPresenterProperties::OnSourceElementPropertyChanged(
00065     winrt::DependencyObject const& sender,
00066     winrt::DependencyPropertyChangedEventArgs const& args)
00067 {
00068     auto owner = sender.as<winrt::MonochromaticOverlayPresenter>();
00069     winrt::get_self<MonochromaticOverlayPresenter>(owner)->OnPropertyChanged(args);
00070 }
00071
00072 void MonochromaticOverlayPresenterProperties::ReplacementColor(winrt::Color const& value)
00073 {
00074     [[gsl::suppress(con)]]
00075     {
00076     static_cast<MonochromaticOverlayPresenter*>(this)->SetValue(s_ReplacementColorProperty, ValueHelper<winrt::Color>::BoxValueIfNecessary(value));
00077     }
00078 }
00079
00080 winrt::Color MonochromaticOverlayPresenterProperties::ReplacementColor()
00081 {
00082     return ValueHelper<winrt::Color>::CastOrUnbox(static_cast<MonochromaticOverlayPresenter*>(this)->GetValue(s_ReplacementColorProperty));
00083 }
00084
00085 void MonochromaticOverlayPresenterProperties::SourceElement(winrt::UIElement const& value)
00086 {
00087     [[gsl::suppress(con)]]
00088     {
00089     static_cast<MonochromaticOverlayPresenter*>(this)->SetValue(s_SourceElementProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00090     }
00091 }
00092
00093 winrt::UIElement MonochromaticOverlayPresenterProperties::SourceElement()
00094 {
00095     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<MonochromaticOverlayPresenter*>(this)->GetValue(s_SourceElementProperty));
00096 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTestHooks.h Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipTestHooks.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TeachingTip.h"
00007
00008 #include "TeachingTipTestHooks.g.h"
00009
00010 class TeachingTipTestHooks :
00011     public winrt::implementation::TeachingTipTestHooksT<TeachingTipTestHooks>
00012 {
00013 public:
00014     static com_ptr<TeachingTipTestHooks> GetGlobalTestHooks()
00015     {
00016         return s_testHooks;
00017     }
00018
00019     static com_ptr<TeachingTipTestHooks> EnsureGlobalTestHooks();
00020
00021     static void SetExpandEasingFunction(const winrt::TeachingTip& teachingTip, const winrt::CompositionEasingFunction& easingFunction);
00022     static void SetContractEasingFunction(const winrt::TeachingTip& teachingTip, const winrt::CompositionEasingFunction& easingFunction);
00023     static void SetTipShouldHaveShadow(const winrt::TeachingTip& teachingTip, bool tipShadow);
00024     static void SetContentElevation(const winrt::TeachingTip& teachingTip, float elevation);
00025     static void SetTailElevation(const winrt::TeachingTip& teachingTip, float elevation);
00026     static void SetUseTestScreenBounds(const winrt::TeachingTip& teachingTip, bool useTestScreenBounds);
00027     static void SetTestScreenBounds(const winrt::TeachingTip& teachingTip, const winrt::Rect& testScreenBounds);
00028     static void SetUseTestWindowBounds(const winrt::TeachingTip& teachingTip, bool useTestWindowBounds);
00029     static void SetTestWindowBounds(const winrt::TeachingTip& teachingTip, const winrt::Rect& testWindowBounds);
00030     static void SetTipFollowsTarget(const winrt::TeachingTip& teachingTip, bool tipFollowsTarget);
00031     static void SetReturnTopForOutOfWindowPlacement(const winrt::TeachingTip& teachingTip, bool returnTopForOutOfWindowPlacement);
00032     static void SetExpandAnimationDuration(const winrt::TeachingTip& teachingTip, const winrt::TimeSpan& expandAnimationDuration);
00033     static void SetContractAnimationDuration(const winrt::TeachingTip& teachingTip, const winrt::TimeSpan& contractAnimationDuration);
00034
00035     static bool GetIsIdle(const winrt::TeachingTip& teachingTip);
00036     static winrt::TeachingTipPlacementMode GetEffectivePlacement(const winrt::TeachingTip& teachingTip);
00037     static winrt::TeachingTipHeroContentPlacementMode GetEffectiveHeroContentPlacement(const winrt::TeachingTip& teachingTip);
00038     static double GetVerticalOffset(const winrt::TeachingTip& teachingTip);
00039     static double GetHorizontalOffset(const winrt::TeachingTip& teachingTip);
00040     static winrt::Visibility GetTitleVisibility(const winrt::TeachingTip& teachingTip);
00041     static winrt::Visibility GetSubtitleVisibility(const winrt::TeachingTip& teachingTip);
00042
00043     static void NotifyOpenedStatusChanged(const winrt::TeachingTip& sender);
00044     static winrt::event_token OpenedStatusChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00045     static void OpenedStatusChanged(winrt::event_token const& token);
00046
00047     static void NotifyIdleStatusChanged(const winrt::TeachingTip& sender);
00048     static winrt::event_token IdleStatusChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00049     static void IdleStatusChanged(winrt::event_token const& token);
00050
00051     static void NotifyEffectivePlacementChanged(const winrt::TeachingTip& sender);
00052     static winrt::event_token EffectivePlacementChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00053     static void EffectivePlacementChanged(winrt::event_token const& token);
00054
00055     static void NotifyEffectiveHeroContentPlacementChanged(const winrt::TeachingTip& sender);
00056     static winrt::event_token EffectiveHeroContentPlacementChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00057     static void EffectiveHeroContentPlacementChanged(winrt::event_token const& token);
00058
00059     static void NotifyOffsetChanged(const winrt::TeachingTip& sender);
00060     static winrt::event_token OffsetChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00061     static void OffsetChanged(winrt::event_token const& token);
00062
00063     static void NotifyTitleVisibilityChanged(const winrt::TeachingTip& sender);
00064     static winrt::event_token TitleVisibilityChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00065     static void TitleVisibilityChanged(winrt::event_token const& token);
00066
00067     static void NotifySubtitleVisibilityChanged(const winrt::TeachingTip& sender);
00068     static winrt::event_token SubtitleVisibilityChanged(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00069     static void SubtitleVisibilityChanged(winrt::event_token const& token);
00070
00071     static winrt::Popup GetPopup(const winrt::TeachingTip& teachingTip);
00072
00073 private:
00074     static com_ptr<TeachingTipTestHooks> s_testHooks;
00075     winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_openedStatusChangedEventSource;
00076     winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_idleStatusChangedEventSource;
00077     winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_effectivePlacementChangedEventSource;
00078     winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_effectiveHeroContentPlacementChangedEventSource;
00079     winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_offsetChangedEventSource;
00080     winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_titleVisibilityChangedEventSource;
00081     winrt::event<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_subtitleVisibilityChangedEventSource;
00082 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DistantDiffuseEffect Member List

This is the complete list of members for DistantDiffuseEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1DistantDiffuse) | DistantDiffuseEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"Azimuth", D2D1_DISTANTDIFFUSE_PROP_AZIMUTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"Elevation", D2D1_DISTANTDIFFUSE_PROP_ELEVATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"DiffuseAmount", D2D1_DISTANTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_DISTANTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_DISTANTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_DISTANTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_DISTANTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},) | DistantDiffuseEffect |
DECLARE_POD_PROPERTY(Azimuth, float, 0.0f, true) | DistantDiffuseEffect |
DECLARE_POD_PROPERTY(Elevation, float, 0.0f, true) | DistantDiffuseEffect |
DECLARE_POD_PROPERTY(DiffuseAmount, float, 1.0f, value >=0.0f &&value<=10000.0f) | DistantDiffuseEffect |
DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | DistantDiffuseEffect |
DECLARE_POD_PROPERTY(LightColor, UIColor,(UIColor{255, 255, 255, 255}), true) | DistantDiffuseEffect |
DECLARE_POD_PROPERTY(HeightMapKernelSize, winrt::float2,(winrt::float2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f) | DistantDiffuseEffect |
DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true) | DistantDiffuseEffect |
DECLARE_SINGLE_SOURCE(Source) | DistantDiffuseEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | DistantDiffuseEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | DistantDiffuseEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkCanvas::TargetData Member List

This is the complete list of members for InkCanvas::TargetData, including all inherited members.
Get(HWND hwnd) | InkCanvas::TargetData | [inline, static]
m_compositionTarget | InkCanvas::TargetData |
m_hwnd | InkCanvas::TargetData |
m_targetRootVisual | InkCanvas::TargetData |
m_tlsMap | InkCanvas::TargetData | [static]
TargetData(HWND hwnd) | InkCanvas::TargetData | [inline]
~TargetData() | InkCanvas::TargetData | [inline]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipClosedEventArgs Member List

This is the complete list of members for TeachingTipClosedEventArgs, including all inherited members.
Reason() | TeachingTipClosedEventArgs
Reason(const winrt::TeachingTipCloseReason &reason) | TeachingTipClosedEventArgs
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorSpectrumAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ColorSpectrumAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ColorSpectrumAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ColorSpectrumAutomationPeer)
00012 }
00013
00014 #include "ColorSpectrumAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewAxeTestPage Member List

This is the complete list of members for TabViewAxeTestPage, including all inherited members.
TabViewAxeTestPage() TabViewAxeTestPage [inline]
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/inc/Constants.cs Source File

  • File List
  • File Members
  • AnimatedVisualPlayer
  • inc

Constants.cs

Go to the documentation of this file.
00001 ﻿namespace AnimatedVisualPlayerTests
00002 {
00003     /// <summary>
00004     /// Share these constants between the UI and the Interaction test that uses
00005     /// Accessibility to access them.
00006     /// </summary>
00007     internal static class Constants
00008     {
00009         public const string FalseText = "False";
00010         public const string OneText = "1";
00011         public const string PlayingEndedText = "AnimatedVisualPlayer playing ended";
00012         public const string PointerMovedText = "Pointer moved";
00013         public const string TrueText = "True";
00014         public const string ZeroText = "0";
00015     }
00016 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedGlobalNavigationButtonVisualSource.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedGlobalNavigationButtonVisualSource.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedGlobalNavigationButtonVisualSource.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(AnimatedGlobalNavigationButtonVisualSource)
00012 }
00013
00014 #include "AnimatedGlobalNavigationButtonVisualSource.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeControl.properties.cpp Source File

  • File List
  • File Members
  • Generated

SwipeControl.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SwipeControl.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(SwipeControl)
00012 }
00013
00014 #include "SwipeControl.g.cpp"
00015
00016 GlobalDependencyProperty SwipeControlProperties::s_BottomItemsProperty{ nullptr };
00017 GlobalDependencyProperty SwipeControlProperties::s_LeftItemsProperty{ nullptr };
00018 GlobalDependencyProperty SwipeControlProperties::s_RightItemsProperty{ nullptr };
00019 GlobalDependencyProperty SwipeControlProperties::s_TopItemsProperty{ nullptr };
00020
00021 SwipeControlProperties::SwipeControlProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void SwipeControlProperties::EnsureProperties()
00027 {
00028     if (!s_BottomItemsProperty)
00029     {
00030         s_BottomItemsProperty =
00031             InitializeDependencyProperty(
00032                 L"BottomItems",
00033                 winrt::name_of<winrt::SwipeItems>(),
00034                 winrt::name_of<winrt::SwipeControl>(),
00035                 false /* isAttached */,
00036                 ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
00037                 winrt::PropertyChangedCallback(&OnBottomItemsPropertyChanged));
00038     }
00039     if (!s_LeftItemsProperty)
00040     {
00041         s_LeftItemsProperty =
00042             InitializeDependencyProperty(
00043                 L"LeftItems",
00044                 winrt::name_of<winrt::SwipeItems>(),
00045                 winrt::name_of<winrt::SwipeControl>(),
00046                 false /* isAttached */,
00047                 ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
00048                 winrt::PropertyChangedCallback(&OnLeftItemsPropertyChanged));
00049     }
00050     if (!s_RightItemsProperty)
00051     {
00052         s_RightItemsProperty =
00053             InitializeDependencyProperty(
00054                 L"RightItems",
00055                 winrt::name_of<winrt::SwipeItems>(),
00056                 winrt::name_of<winrt::SwipeControl>(),
00057                 false /* isAttached */,
00058                 ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
00059                 winrt::PropertyChangedCallback(&OnRightItemsPropertyChanged));
00060     }
00061     if (!s_TopItemsProperty)
00062     {
00063         s_TopItemsProperty =
00064             InitializeDependencyProperty(
00065                 L"TopItems",
00066                 winrt::name_of<winrt::SwipeItems>(),
00067                 winrt::name_of<winrt::SwipeControl>(),
00068                 false /* isAttached */,
00069                 ValueHelper<winrt::SwipeItems>::BoxedDefaultValue(),
00070                 winrt::PropertyChangedCallback(&OnTopItemsPropertyChanged));
00071     }
00072 }
00073
00074 void SwipeControlProperties::ClearProperties()
00075 {
00076     s_BottomItemsProperty = nullptr;
00077     s_LeftItemsProperty = nullptr;
00078     s_RightItemsProperty = nullptr;
00079     s_TopItemsProperty = nullptr;
00080 }
00081
00082 void SwipeControlProperties::OnBottomItemsPropertyChanged(
00083     winrt::DependencyObject const& sender,
00084     winrt::DependencyPropertyChangedEventArgs const& args)
00085 {
00086     auto owner = sender.as<winrt::SwipeControl>();
00087     winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
00088 }
00089
00090 void SwipeControlProperties::OnLeftItemsPropertyChanged(
00091     winrt::DependencyObject const& sender,
00092     winrt::DependencyPropertyChangedEventArgs const& args)
00093 {
00094     auto owner = sender.as<winrt::SwipeControl>();
00095     winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
00096 }
00097
00098 void SwipeControlProperties::OnRightItemsPropertyChanged(
00099     winrt::DependencyObject const& sender,
00100     winrt::DependencyPropertyChangedEventArgs const& args)
00101 {
00102     auto owner = sender.as<winrt::SwipeControl>();
00103     winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
00104 }
00105
00106 void SwipeControlProperties::OnTopItemsPropertyChanged(
00107     winrt::DependencyObject const& sender,
00108     winrt::DependencyPropertyChangedEventArgs const& args)
00109 {
00110     auto owner = sender.as<winrt::SwipeControl>();
00111     winrt::get_self<SwipeControl>(owner)->OnPropertyChanged(args);
00112 }
00113
00114 void SwipeControlProperties::BottomItems(winrt::SwipeItems const& value)
00115 {
00116     [[gsl::suppress(con)]]
00117     {
00118     static_cast<SwipeControl*>(this)->SetValue(s_BottomItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
00119     }
00120 }
00121
00122 winrt::SwipeItems SwipeControlProperties::BottomItems()
00123 {
00124     return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_BottomItemsProperty));
00125 }
00126
00127 void SwipeControlProperties::LeftItems(winrt::SwipeItems const& value)
00128 {
00129     [[gsl::suppress(con)]]
00130     {
00131     static_cast<SwipeControl*>(this)->SetValue(s_LeftItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
00132     }
00133 }
00134
00135 winrt::SwipeItems SwipeControlProperties::LeftItems()
00136 {
00137     return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_LeftItemsProperty));
00138 }
00139
00140 void SwipeControlProperties::RightItems(winrt::SwipeItems const& value)
00141 {
00142     [[gsl::suppress(con)]]
00143     {
00144     static_cast<SwipeControl*>(this)->SetValue(s_RightItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
00145     }
00146 }
00147
00148 winrt::SwipeItems SwipeControlProperties::RightItems()
00149 {
00150     return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_RightItemsProperty));
00151 }
00152
00153 void SwipeControlProperties::TopItems(winrt::SwipeItems const& value)
00154 {
00155     [[gsl::suppress(con)]]
00156     {
00157     static_cast<SwipeControl*>(this)->SetValue(s_TopItemsProperty, ValueHelper<winrt::SwipeItems>::BoxValueIfNecessary(value));
00158     }
00159 }
00160
00161 winrt::SwipeItems SwipeControlProperties::TopItems()
00162 {
00163     return ValueHelper<winrt::SwipeItems>::CastOrUnbox(static_cast<SwipeControl*>(this)->GetValue(s_TopItemsProperty));
00164 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderProperties Member List

This is the complete list of members for ExpanderProperties, including all inherited members.
ClearProperties() | ExpanderProperties | [static]
Collapsed(winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderCollapsedEventArgs > const &value) | ExpanderProperties |
Collapsed(winrt::event_token const &token) | ExpanderProperties |
EnsureProperties() | ExpanderProperties | [static]
ExpandDirection(winrt::ExpandDirection const &value) | ExpanderProperties |
ExpandDirection() | ExpanderProperties |
ExpandDirectionProperty() | ExpanderProperties | [inline, static]
ExpanderProperties() | ExpanderProperties |
Expanding(winrt::TypedEventHandler< winrt::Expander, winrt::ExpanderExpandingEventArgs > const &value) | ExpanderProperties |
Expanding(winrt::event_token const &token) | ExpanderProperties |
Header(winrt::IInspectable const &value) | ExpanderProperties |
Header() | ExpanderProperties |
HeaderProperty() | ExpanderProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | ExpanderProperties |
HeaderTemplate() | ExpanderProperties |
HeaderTemplateProperty() | ExpanderProperties | [inline, static]
HeaderTemplateSelector(winrt::DataTemplateSelector const &value) | ExpanderProperties |
HeaderTemplateSelector() | ExpanderProperties |
HeaderTemplateSelectorProperty() | ExpanderProperties | [inline, static]
IsExpanded(bool value) | ExpanderProperties |
IsExpanded() | ExpanderProperties |
IsExpandedProperty() | ExpanderProperties | [inline, static]
m_collapsedEventSource | ExpanderProperties |
m_expandingEventSource | ExpanderProperties |
OnExpandDirectionPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ExpanderProperties | [static]
OnIsExpandedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ExpanderProperties | [static]
s_ExpandDirectionProperty | ExpanderProperties | [static]
s_HeaderProperty | ExpanderProperties | [static]
s_HeaderTemplateProperty | ExpanderProperties | [static]
s_HeaderTemplateSelectorProperty | ExpanderProperties | [static]
s_IsExpandedProperty | ExpanderProperties | [static]
s_TemplateSettingsProperty | ExpanderProperties | [static]
TemplateSettings(winrt::ExpanderTemplateSettings const &value) | ExpanderProperties |
TemplateSettings() | ExpanderProperties |
TemplateSettingsProperty() | ExpanderProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBadgePage Member List

This is the complete list of members for InfoBadgePage, including all inherited members.
IconComboBoxSelectionChanged(object sender, SelectionChangedEventArgs args) | InfoBadgePage | [inline]
iconForegroundBrush | InfoBadgePage | [private]
InfoBadgePage() | InfoBadgePage | [inline]
MakeAnimatedIcon() | InfoBadgePage | [inline, private]
MakeBitmapIcon() | InfoBadgePage | [inline, private]
MakeFontIcon() | InfoBadgePage | [inline, private]
MakeImageIcon() | InfoBadgePage | [inline, private]
MakePathIcon() | InfoBadgePage | [inline, private]
MakeSymbolIcon() | InfoBadgePage | [inline, private]
OnClearForegroundButtonClicked(object sender, RoutedEventArgs args) | InfoBadgePage | [inline]
OnForegroundToNullButtonClicked(object sender, RoutedEventArgs args) | InfoBadgePage | [inline]
OnIconForegroundColorPickerColorChanged(object sender, ColorChangedEventArgs args) | InfoBadgePage | [inline]
pageIconSource | InfoBadgePage | [private]
UpdateIcon(IconSource iconSource) | InfoBadgePage | [inline, private]
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyout.h Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyout.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "CommandBarFlyout.g.h"
00007 #include "CommandBarFlyoutTrace.h"
00008
00009 class CommandBarFlyout :
00010     public ReferenceTracker<CommandBarFlyout, winrt::implementation::CommandBarFlyoutT>
00011 {
00012 public:
00013     CommandBarFlyout();
00014     ~CommandBarFlyout();
00015
00016     bool AlwaysExpanded() { return m_alwaysExpanded; }
00017     void AlwaysExpanded(bool value) { m_alwaysExpanded = value; }
00018
00019     winrt::IObservableVector<winrt::ICommandBarElement> PrimaryCommands();
00020     winrt::IObservableVector<winrt::ICommandBarElement> SecondaryCommands();
00021
00022     // IFlyoutOverrides overrides
00023     winrt::Control CreatePresenter();
00024
00025     void AddDropShadow();
00026     void RemoveDropShadow();
00027     tracker_ref<winrt::FlyoutPresenter> GetPresenter();
00028
00029 protected:
00030     tracker_ref<winrt::CommandBarFlyoutCommandBar> m_commandBar{ this };
00031
00032 private:
00033     static constexpr int s_commandBarElementDependencyPropertiesCount{ 3 };
00034
00035     static winrt::DependencyProperty s_appBarButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount];
00036     static winrt::DependencyProperty s_appBarToggleButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount];
00037
00038     void SetSecondaryCommandsToCloseWhenExecuted();
00039     void HookAppBarButtonDependencyPropertyChanges(winrt::AppBarButton const& appBarButton, int index);
00040     void HookAppBarToggleButtonDependencyPropertyChanges(winrt::AppBarToggleButton const& appBarToggleButton, int index);
00041     void HookAllCommandBarElementDependencyPropertyChanges();
00042     void UnhookCommandBarElementDependencyPropertyChanges(int index, bool eraseRevokers = true);
00043     void UnhookAllCommandBarElementDependencyPropertyChanges();
00044     void OnCommandBarElementDependencyPropertyChanged(winrt::DependencyObject const& dependencyObject, winrt::DependencyProperty const& dependencyProperty);
00045
00046     bool m_alwaysExpanded{ false };
00047
00048     winrt::IObservableVector<winrt::ICommandBarElement> m_primaryCommands{ nullptr };
00049     winrt::IObservableVector<winrt::ICommandBarElement> m_secondaryCommands{ nullptr };
00050
00051     // winrt::IObservableVector<winrt::ICommandBarElement>::VectorChanged_revoker throws a weird build error when used,
00052     // so we're using the event token pattern for manual detachment instead.
00053     winrt::event_token m_primaryCommandsVectorChangedToken{};
00054     winrt::event_token m_secondaryCommandsVectorChangedToken{};
00055
00056     winrt::CommandBar::Opened_revoker m_commandBarOpenedRevoker{};
00057     winrt::CommandBar::Opening_revoker m_commandBarOpeningRevoker{};
00058     winrt::CommandBar::Closed_revoker m_commandBarClosedRevoker{};
00059     winrt::CommandBar::Closing_revoker m_commandBarClosingRevoker{};
00060
00061     std::map<int, winrt::ButtonBase::Click_revoker> m_secondaryButtonClickRevokerByIndexMap;
00062     std::map<int, winrt::ToggleButton::Checked_revoker> m_secondaryToggleButtonCheckedRevokerByIndexMap;
00063     std::map<int, winrt::ToggleButton::Unchecked_revoker> m_secondaryToggleButtonUncheckedRevokerByIndexMap;
00064     std::map<int, PropertyChanged_revoker[s_commandBarElementDependencyPropertiesCount]> m_propertyChangedRevokersByIndexMap;
00065
00066     tracker_ref<winrt::FlyoutPresenter> m_presenter{ this };
00067
00068     bool m_isClosingAfterCloseAnimation{ false };
00069 };
00070
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingBringingIntoViewEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingBringingIntoViewEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollingBringingIntoViewEventArgs.g.h"
00007
00008 class ScrollingBringingIntoViewEventArgs :
00009     public winrt::implementation::ScrollingBringingIntoViewEventArgsT<ScrollingBringingIntoViewEventArgs>
00010 {
00011 public:
00012     ScrollingBringingIntoViewEventArgs()
00013     {
00014         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00015     }
00016
00017     ~ScrollingBringingIntoViewEventArgs()
00018     {
00019         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00020     }
00021
00022     // IScrollingBringingIntoViewEventArgs overrides
00023     winrt::ScrollingSnapPointsMode SnapPointsMode();
00024     void SnapPointsMode(winrt::ScrollingSnapPointsMode snapPointsMode);
00025     winrt::BringIntoViewRequestedEventArgs RequestEventArgs();
00026     double TargetHorizontalOffset();
00027     double TargetVerticalOffset();
00028     int32_t CorrelationId();
00029     bool Cancel();
00030     void Cancel(bool value);
00031
00032     double GetTargetHorizontalOffset() const
00033     {
00034         return m_targetHorizontalOffset;
00035     }
00036
00037     double GetTargetVerticalOffset() const
00038     {
00039         return m_targetVerticalOffset;
00040     }
00041
00042     bool GetCancel() const
00043     {
00044         return m_cancel;
00045     }
00046
00047     void OffsetsChangeCorrelationId(int32_t offsetsChangeCorrelationId);
00048     void RequestEventArgs(const winrt::BringIntoViewRequestedEventArgs& requestEventArgs);
00049     void TargetOffsets(double targetHorizontalOffset, double targetVerticalOffset);
00050
00051 private:
00052     winrt::ScrollingSnapPointsMode m_snapPointsMode{ winrt::ScrollingSnapPointsMode::Ignore };
00053     winrt::BringIntoViewRequestedEventArgs m_requestEventArgs{ nullptr };
00054     double m_targetHorizontalOffset{ 0.0 };
00055     double m_targetVerticalOffset{ 0.0 };
00056     bool m_cancel{ false };
00057     int32_t m_offsetsChangeCorrelationId{ -1 };
00058 };
00059
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewPaneClosingEventArgs.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewPaneClosingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewPaneClosingEventArgs.h"
00007 #include "NavigationView.h"
00008
00009 bool NavigationViewPaneClosingEventArgs::Cancel()
00010 {
00011     return m_cancelled;
00012 }
00013
00014 void NavigationViewPaneClosingEventArgs::Cancel(bool value)
00015 {
00016     m_cancelled = value;
00017
00018     if (auto args = m_splitViewClosingArgs.get())
00019     {
00020         args.Cancel(value);
00021     }
00022 }
00023
00024 void NavigationViewPaneClosingEventArgs::SplitViewClosingArgs(winrt::SplitViewPaneClosingEventArgs const& value)
00025 {
00026     m_splitViewClosingArgs.set(value);
00027 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewInitPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewInitPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Automation;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Navigation;
00012 using Microsoft.UI.Private.Media;
00013 using MUXControlsTestApp.Utilities;
00014
00015 namespace MUXControlsTestApp
00016 {
00017
00018     public sealed partial class NavigationViewInitPage : TestPage
00019     {
00020         ObservableCollection<string> m_menuItems;
00021         ObservableCollection<string> m_footerItems;
00022         LinkedList<string> m_menuItemsEnumerable = null;
00023
00024         public NavigationViewInitPage()
00025         {
00026             this.InitializeComponent();
00027
00028             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00029             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00030
00031             m_menuItems = new ObservableCollection<string>();
00032
00033             m_menuItems.Add("Menu Item 1");
00034             m_menuItems.Add("Menu Item 2");
00035             m_menuItems.Add("Menu Item 3");
00036             m_menuItems.Add("Music");
00037
00038             m_footerItems = new ObservableCollection<string>();
00039
00040             m_footerItems.Add("Footer Item 1");
00041             m_footerItems.Add("Footer Item 2");
00042             m_footerItems.Add("Footer Item 3");
00043
00044             NavView.MenuItemsSource = m_menuItems;
00045             NavView.FooterMenuItemsSource = m_footerItems;
00046             NavView.SelectedItem = m_menuItems[0];
00047         }
00048
00049         protected override void OnNavigatedFrom(NavigationEventArgs e)
00050         {
00051             // Unset all override flags to avoid impacting subsequent tests
00052             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00053             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00054             base.OnNavigatedFrom(e);
00055         }
00056
00057         private void AddButton_Click(object sender, RoutedEventArgs e)
00058         {
00059             if (m_menuItemsEnumerable == null)
00060             {
00061                 m_menuItems.Add("New Menu Item");
00062             }
00063             else
00064             {
00065                 m_menuItemsEnumerable.AddLast("New Menu Item");
00066             }
00067         }
00068
00069         private void RemoveButton_Click(object sender, RoutedEventArgs e)
00070         {
00071             if (m_menuItemsEnumerable == null)
00072             {
00073                 m_menuItems.RemoveAt(m_menuItems.Count - 1);
00074             }
00075             else
00076             {
00077                 m_menuItemsEnumerable.RemoveLast();
00078             }
00079         }
00080
00081         private void AddFooterButton_Click(object sender, RoutedEventArgs e)
00082         {
00083             m_footerItems.Add("New Footer Item");
00084         }
00085
00086         private void RemoveFooterButton_Click(object sender, RoutedEventArgs e)
00087         {
00088             m_footerItems.RemoveAt(m_footerItems.Count - 1);
00089         }
00090
00091         private void ChangeToIEnumerableButton_Clicks(object sender, RoutedEventArgs e)
00092         {
00093             var newMenuItems = new LinkedList<string>();
00094             newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 1");
00095             newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 2");
00096             newMenuItems.AddLast("IIterator/Enumerable/LinkedList Item 3");
00097
00098             NavView.MenuItemsSource = newMenuItems;
00099         }
00100
00101         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00102         {
00103             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00104         }
00105
00106         private void SwitchFrame_Click(object sender, RoutedEventArgs e)
00107         {
00108             if (Frame2.Content == null)
00109             {
00110                 var content = Frame1.Content;
00111                 Frame1.Content = null;
00112                 Frame2.Content = content;
00113             }
00114             else
00115             {
00116                 var content = Frame2.Content;
00117                 Frame2.Content = null;
00118                 Frame1.Content = content;
00119             }
00120         }
00121
00122         private void NavView2_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
00123         {
00124             if (Frame2.Content == null)
00125             {
00126                 MyLocationResult.Text = "Frame1";
00127             }
00128             else
00129             {
00130                 MyLocationResult.Text = "Frame2";
00131             }
00132         }
00133
00134         private void ChangePaneVisibleButton_Click(object sender, RoutedEventArgs e)
00135         {
00136             NavView4.IsPaneVisible = !NavView4.IsPaneVisible;
00137         }
00138
00139         private void NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
00140         {
00141             // Reset argument type indicatiors
00142             ItemInvokedItemType.Text = "null";
00143             ItemInvokedItemContainerType.Text = "null";
00144
00145             if (args.InvokedItem != null)
00146             {
00147                 ItemInvokedItemType.Text = args.InvokedItem.GetType().ToString();
00148             }
00149
00150             if (args.InvokedItemContainer != null)
00151             {
00152                 ItemInvokedItemContainerType.Text = args.InvokedItemContainer.GetType().ToString();
00153             }
00154         }
00155
00156         private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
00157         {
00158             // Reset argument type indicatiors
00159             SelectionChangedItemType.Text = "null";
00160             SelectionChangedItemContainerType.Text = "null";
00161
00162             if (args.SelectedItem != null)
00163             {
00164                 SelectionChangedItemType.Text = args.SelectedItem.GetType().ToString();
00165             }
00166
00167             if (args.SelectedItemContainer != null)
00168             {
00169                 SelectionChangedItemContainerType.Text = args.SelectedItemContainer.GetType().ToString();
00170             }
00171         }
00172     }
00173 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/Expander.properties.cpp Source File

  • File List
  • File Members
  • Generated

Expander.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "Expander.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(Expander)
00012 }
00013
00014 #include "Expander.g.cpp"
00015
00016 GlobalDependencyProperty ExpanderProperties::s_ExpandDirectionProperty{ nullptr };
00017 GlobalDependencyProperty ExpanderProperties::s_HeaderProperty{ nullptr };
00018 GlobalDependencyProperty ExpanderProperties::s_HeaderTemplateProperty{ nullptr };
00019 GlobalDependencyProperty ExpanderProperties::s_HeaderTemplateSelectorProperty{ nullptr };
00020 GlobalDependencyProperty ExpanderProperties::s_IsExpandedProperty{ nullptr };
00021 GlobalDependencyProperty ExpanderProperties::s_TemplateSettingsProperty{ nullptr };
00022
00023 ExpanderProperties::ExpanderProperties()
00024     : m_collapsedEventSource{static_cast<Expander*>(this)}
00025     , m_expandingEventSource{static_cast<Expander*>(this)}
00026 {
00027     EnsureProperties();
00028 }
00029
00030 void ExpanderProperties::EnsureProperties()
00031 {
00032     if (!s_ExpandDirectionProperty)
00033     {
00034         s_ExpandDirectionProperty =
00035             InitializeDependencyProperty(
00036                 L"ExpandDirection",
00037                 winrt::name_of<winrt::ExpandDirection>(),
00038                 winrt::name_of<winrt::Expander>(),
00039                 false /* isAttached */,
00040                 ValueHelper<winrt::ExpandDirection>::BoxValueIfNecessary(winrt::ExpandDirection::Down),
00041                 winrt::PropertyChangedCallback(&OnExpandDirectionPropertyChanged));
00042     }
00043     if (!s_HeaderProperty)
00044     {
00045         s_HeaderProperty =
00046             InitializeDependencyProperty(
00047                 L"Header",
00048                 winrt::name_of<winrt::IInspectable>(),
00049                 winrt::name_of<winrt::Expander>(),
00050                 false /* isAttached */,
00051                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00052                 nullptr);
00053     }
00054     if (!s_HeaderTemplateProperty)
00055     {
00056         s_HeaderTemplateProperty =
00057             InitializeDependencyProperty(
00058                 L"HeaderTemplate",
00059                 winrt::name_of<winrt::DataTemplate>(),
00060                 winrt::name_of<winrt::Expander>(),
00061                 false /* isAttached */,
00062                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00063                 nullptr);
00064     }
00065     if (!s_HeaderTemplateSelectorProperty)
00066     {
00067         s_HeaderTemplateSelectorProperty =
00068             InitializeDependencyProperty(
00069                 L"HeaderTemplateSelector",
00070                 winrt::name_of<winrt::DataTemplateSelector>(),
00071                 winrt::name_of<winrt::Expander>(),
00072                 false /* isAttached */,
00073                 ValueHelper<winrt::DataTemplateSelector>::BoxedDefaultValue(),
00074                 nullptr);
00075     }
00076     if (!s_IsExpandedProperty)
00077     {
00078         s_IsExpandedProperty =
00079             InitializeDependencyProperty(
00080                 L"IsExpanded",
00081                 winrt::name_of<bool>(),
00082                 winrt::name_of<winrt::Expander>(),
00083                 false /* isAttached */,
00084                 ValueHelper<bool>::BoxedDefaultValue(),
00085                 winrt::PropertyChangedCallback(&OnIsExpandedPropertyChanged));
00086     }
00087     if (!s_TemplateSettingsProperty)
00088     {
00089         s_TemplateSettingsProperty =
00090             InitializeDependencyProperty(
00091                 L"TemplateSettings",
00092                 winrt::name_of<winrt::ExpanderTemplateSettings>(),
00093                 winrt::name_of<winrt::Expander>(),
00094                 false /* isAttached */,
00095                 ValueHelper<winrt::ExpanderTemplateSettings>::BoxedDefaultValue(),
00096                 nullptr);
00097     }
00098 }
00099
00100 void ExpanderProperties::ClearProperties()
00101 {
00102     s_ExpandDirectionProperty = nullptr;
00103     s_HeaderProperty = nullptr;
00104     s_HeaderTemplateProperty = nullptr;
00105     s_HeaderTemplateSelectorProperty = nullptr;
00106     s_IsExpandedProperty = nullptr;
00107     s_TemplateSettingsProperty = nullptr;
00108 }
00109
00110 void ExpanderProperties::OnExpandDirectionPropertyChanged(
00111     winrt::DependencyObject const& sender,
00112     winrt::DependencyPropertyChangedEventArgs const& args)
00113 {
00114     auto owner = sender.as<winrt::Expander>();
00115     winrt::get_self<Expander>(owner)->OnExpandDirectionPropertyChanged(args);
00116 }
00117
00118 void ExpanderProperties::OnIsExpandedPropertyChanged(
00119     winrt::DependencyObject const& sender,
00120     winrt::DependencyPropertyChangedEventArgs const& args)
00121 {
00122     auto owner = sender.as<winrt::Expander>();
00123     winrt::get_self<Expander>(owner)->OnIsExpandedPropertyChanged(args);
00124 }
00125
00126 void ExpanderProperties::ExpandDirection(winrt::ExpandDirection const& value)
00127 {
00128     [[gsl::suppress(con)]]
00129     {
00130     static_cast<Expander*>(this)->SetValue(s_ExpandDirectionProperty, ValueHelper<winrt::ExpandDirection>::BoxValueIfNecessary(value));
00131     }
00132 }
00133
00134 winrt::ExpandDirection ExpanderProperties::ExpandDirection()
00135 {
00136     return ValueHelper<winrt::ExpandDirection>::CastOrUnbox(static_cast<Expander*>(this)->GetValue(s_ExpandDirectionProperty));
00137 }
00138
00139 void ExpanderProperties::Header(winrt::IInspectable const& value)
00140 {
00141     [[gsl::suppress(con)]]
00142     {
00143     static_cast<Expander*>(this)->SetValue(s_HeaderProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00144     }
00145 }
00146
00147 winrt::IInspectable ExpanderProperties::Header()
00148 {
00149     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<Expander*>(this)->GetValue(s_HeaderProperty));
00150 }
00151
00152 void ExpanderProperties::HeaderTemplate(winrt::DataTemplate const& value)
00153 {
00154     [[gsl::suppress(con)]]
00155     {
00156     static_cast<Expander*>(this)->SetValue(s_HeaderTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00157     }
00158 }
00159
00160 winrt::DataTemplate ExpanderProperties::HeaderTemplate()
00161 {
00162     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<Expander*>(this)->GetValue(s_HeaderTemplateProperty));
00163 }
00164
00165 void ExpanderProperties::HeaderTemplateSelector(winrt::DataTemplateSelector const& value)
00166 {
00167     [[gsl::suppress(con)]]
00168     {
00169     static_cast<Expander*>(this)->SetValue(s_HeaderTemplateSelectorProperty, ValueHelper<winrt::DataTemplateSelector>::BoxValueIfNecessary(value));
00170     }
00171 }
00172
00173 winrt::DataTemplateSelector ExpanderProperties::HeaderTemplateSelector()
00174 {
00175     return ValueHelper<winrt::DataTemplateSelector>::CastOrUnbox(static_cast<Expander*>(this)->GetValue(s_HeaderTemplateSelectorProperty));
00176 }
00177
00178 void ExpanderProperties::IsExpanded(bool value)
00179 {
00180     [[gsl::suppress(con)]]
00181     {
00182     static_cast<Expander*>(this)->SetValue(s_IsExpandedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00183     }
00184 }
00185
00186 bool ExpanderProperties::IsExpanded()
00187 {
00188     return ValueHelper<bool>::CastOrUnbox(static_cast<Expander*>(this)->GetValue(s_IsExpandedProperty));
00189 }
00190
00191 void ExpanderProperties::TemplateSettings(winrt::ExpanderTemplateSettings const& value)
00192 {
00193     [[gsl::suppress(con)]]
00194     {
00195     static_cast<Expander*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::ExpanderTemplateSettings>::BoxValueIfNecessary(value));
00196     }
00197 }
00198
00199 winrt::ExpanderTemplateSettings ExpanderProperties::TemplateSettings()
00200 {
00201     return ValueHelper<winrt::ExpanderTemplateSettings>::CastOrUnbox(static_cast<Expander*>(this)->GetValue(s_TemplateSettingsProperty));
00202 }
00203
00204 winrt::event_token ExpanderProperties::Collapsed(winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderCollapsedEventArgs> const& value)
00205 {
00206     return m_collapsedEventSource.add(value);
00207 }
00208
00209 void ExpanderProperties::Collapsed(winrt::event_token const& token)
00210 {
00211     m_collapsedEventSource.remove(token);
00212 }
00213
00214 winrt::event_token ExpanderProperties::Expanding(winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderExpandingEventArgs> const& value)
00215 {
00216     return m_expandingEventSource.add(value);
00217 }
00218
00219 void ExpanderProperties::Expanding(winrt::event_token const& token)
00220 {
00221     m_expandingEventSource.remove(token);
00222 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTabTearOutRequestedEventArgs Member List

This is the complete list of members for TabViewTabTearOutRequestedEventArgs, including all inherited members.
Items() const | TabViewTabTearOutRequestedEventArgs | [inline]
m_items | TabViewTabTearOutRequestedEventArgs | [private]
m_tabs | TabViewTabTearOutRequestedEventArgs | [private]
NewWindowId() const | TabViewTabTearOutRequestedEventArgs | [inline]
Tabs() const | TabViewTabTearOutRequestedEventArgs | [inline]
TabViewTabTearOutRequestedEventArgs(winrt::IInspectable const &item, winrt::UIElement const &tab) | TabViewTabTearOutRequestedEventArgs |
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NonVirtualizingLayoutContext.properties.cpp Source File

  • File List
  • File Members
  • Generated

NonVirtualizingLayoutContext.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NonVirtualizingLayoutContext.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(NonVirtualizingLayoutContext)
00012 }
00013
00014 #include "NonVirtualizingLayoutContext.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicBrushBasicPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI

AcrylicBrushBasicPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.UI;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Media;
00007 using Microsoft.UI.Xaml.Hosting;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Controls;
00010 using System;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     public sealed partial class AcrylicBrushBasicPage : TestPage
00015     {
00016         AcrylicBrush myAcrylicBrush;
00017         //AcrylicBrush sideBarAcrylicBrush;
00018
00019         public AcrylicBrushBasicPage()
00020         {
00021             this.InitializeComponent();
00022
00023             myAcrylicBrush = new AcrylicBrush
00024             {
00025                 FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xFF, 0xFF, 0xFF),
00026                 TintOpacity = TintOpacity.Value
00027             };
00028
00029         }
00030
00031         private void TestPage_Loaded(object sender, RoutedEventArgs e)
00032         {
00033             Rectangle1.Fill = myAcrylicBrush;
00034         }
00035
00036         private void TintColorButton_Checked(object sender, RoutedEventArgs e)
00037         {
00038             var colorPicker = new ColorPicker();
00039             colorPicker.ColorChanged += ColorPicker_ColorChanged;
00040             colorPicker.Color = myAcrylicBrush.TintColor;
00041             Viewbox.Child = colorPicker;
00042         }
00043
00044         private void TintColorButton_Unchecked(object sender, RoutedEventArgs e)
00045         {
00046             Viewbox.Child = null;
00047         }
00048
00049         private void FallbackColorButton_Checked(object sender, RoutedEventArgs e)
00050         {
00051             myAcrylicBrush.FallbackColor = ColorHelper.FromArgb(255, 255, 100, 0);
00052         }
00053
00054         private void FallbackColorButton_Unchecked(object sender, RoutedEventArgs e)
00055         {
00056             myAcrylicBrush.FallbackColor = Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xE6, 0xE6, 0xE6); // Default
00057         }
00058
00059         private void TintOpacity_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
00060         {
00061             if (myAcrylicBrush != null)
00062             {
00063                 myAcrylicBrush.TintOpacity = TintOpacity.Value;
00064             }
00065         }
00066
00067         private void AnimateBackgroundButton_Checked(object sender, RoutedEventArgs e)
00068         {
00069             var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);
00070
00071             var animation = visual.Compositor.CreateScalarKeyFrameAnimation();
00072             animation.InsertExpressionKeyFrame(0.25f, "this.StartingValue - 200", visual.Compositor.CreateLinearEasingFunction());
00073             animation.InsertExpressionKeyFrame(0.75f, "this.StartingValue + 200", visual.Compositor.CreateLinearEasingFunction());
00074             animation.InsertExpressionKeyFrame(1.0f, "this.StartingValue", visual.Compositor.CreateLinearEasingFunction());
00075             animation.Duration = TimeSpan.FromSeconds(10);
00076             animation.IterationBehavior = Microsoft.UI.Composition.AnimationIterationBehavior.Forever;
00077             visual.StartAnimation("Offset.X", animation);
00078         }
00079
00080         private void AnimateBackgroundButton_Unchecked(object sender, RoutedEventArgs e)
00081         {
00082             var visual = ElementCompositionPreview.GetElementVisual(BackgroundPanel);
00083             visual.Offset = new System.Numerics.Vector3(0, 0, 0);
00084         }
00085
00086         private void ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args)
00087         {
00088             myAcrylicBrush.TintColor = args.NewColor;
00089         }
00090     }
00091 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CornerRadiusFilterConverter.properties.cpp Source File

  • File List
  • File Members
  • Generated

CornerRadiusFilterConverter.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "CornerRadiusFilterConverter.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(CornerRadiusFilterConverter)
00012 }
00013
00014 #include "CornerRadiusFilterConverter.g.cpp"
00015
00016 GlobalDependencyProperty CornerRadiusFilterConverterProperties::s_FilterProperty{ nullptr };
00017 GlobalDependencyProperty CornerRadiusFilterConverterProperties::s_ScaleProperty{ nullptr };
00018
00019 CornerRadiusFilterConverterProperties::CornerRadiusFilterConverterProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void CornerRadiusFilterConverterProperties::EnsureProperties()
00025 {
00026     if (!s_FilterProperty)
00027     {
00028         s_FilterProperty =
00029             InitializeDependencyProperty(
00030                 L"Filter",
00031                 winrt::name_of<winrt::CornerRadiusFilterKind>(),
00032                 winrt::name_of<winrt::CornerRadiusFilterConverter>(),
00033                 false /* isAttached */,
00034                 ValueHelper<winrt::CornerRadiusFilterKind>::BoxValueIfNecessary(winrt::CornerRadiusFilterKind::None),
00035                 nullptr);
00036     }
00037     if (!s_ScaleProperty)
00038     {
00039         s_ScaleProperty =
00040             InitializeDependencyProperty(
00041                 L"Scale",
00042                 winrt::name_of<double>(),
00043                 winrt::name_of<winrt::CornerRadiusFilterConverter>(),
00044                 false /* isAttached */,
00045                 ValueHelper<double>::BoxValueIfNecessary(1.0),
00046                 nullptr);
00047     }
00048 }
00049
00050 void CornerRadiusFilterConverterProperties::ClearProperties()
00051 {
00052     s_FilterProperty = nullptr;
00053     s_ScaleProperty = nullptr;
00054 }
00055
00056 void CornerRadiusFilterConverterProperties::Filter(winrt::CornerRadiusFilterKind const& value)
00057 {
00058     [[gsl::suppress(con)]]
00059     {
00060     static_cast<CornerRadiusFilterConverter*>(this)->SetValue(s_FilterProperty, ValueHelper<winrt::CornerRadiusFilterKind>::BoxValueIfNecessary(value));
00061     }
00062 }
00063
00064 winrt::CornerRadiusFilterKind CornerRadiusFilterConverterProperties::Filter()
00065 {
00066     return ValueHelper<winrt::CornerRadiusFilterKind>::CastOrUnbox(static_cast<CornerRadiusFilterConverter*>(this)->GetValue(s_FilterProperty));
00067 }
00068
00069 void CornerRadiusFilterConverterProperties::Scale(double value)
00070 {
00071     [[gsl::suppress(con)]]
00072     {
00073     static_cast<CornerRadiusFilterConverter*>(this)->SetValue(s_ScaleProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00074     }
00075 }
00076
00077 double CornerRadiusFilterConverterProperties::Scale()
00078 {
00079     return ValueHelper<double>::CastOrUnbox(static_cast<CornerRadiusFilterConverter*>(this)->GetValue(s_ScaleProperty));
00080 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanelLayoutContext.h Source File

  • File List
  • File Members
  • LayoutPanel

LayoutPanelLayoutContext.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "NonvirtualizingLayoutContext.h"
00006
00007 class LayoutPanelLayoutContext :
00008     public winrt::implements<LayoutPanelLayoutContext, NonVirtualizingLayoutContext>
00009 {
00010 public:
00011     LayoutPanelLayoutContext(winrt::LayoutPanel const& owner);
00012
00013 #pragma region ILayoutContextOverrides
00014
00015     winrt::IVectorView<winrt::UIElement> ChildrenCore();
00016
00017     winrt::IInspectable LayoutStateCore();
00018     void LayoutStateCore(winrt::IInspectable const& state);
00019
00020 #pragma endregion
00021
00022
00023 private:
00024     winrt::LayoutPanel GetOwner();
00025
00026     // We hold a weak reference to prevent a leaking reference
00027     // cycle between the LayoutPanel and its layout.
00028     winrt::weak_ref<winrt::LayoutPanel> m_owner;
00029 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarItemAutomationPeer Member List

This is the complete list of members for SelectorBarItemAutomationPeer, including all inherited members.
GetClassNameCore() override | SelectorBarItemAutomationPeer
GetLocalizedControlTypeCore() override | SelectorBarItemAutomationPeer
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/TestUI/ExpanderPage.xaml.cs Source File

  • File List
  • File Members
  • Expander
  • TestUI

ExpanderPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012
00013 using Expander = Microsoft.UI.Xaml.Controls.Expander;
00014 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00015 using Microsoft.UI.Xaml.Automation.Peers;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     // We are going to test setting the events source of an expander to the customcontrol's
00020     public sealed class TestControl : ContentControl
00021     {
00022         protected override AutomationPeer OnCreateAutomationPeer()
00023         {
00024             return new TestControlAutomationPeer(this);
00025         }
00026
00027     }
00028
00029     public sealed class TestControlAutomationPeer : FrameworkElementAutomationPeer
00030     {
00031         public TestControlAutomationPeer(TestControl owner) : base(owner){}
00032         protected override AutomationControlType GetAutomationControlTypeCore()
00033         {
00034             return AutomationControlType.Custom;
00035         }
00036
00037         protected override string GetLocalizedControlTypeCore()
00038         {
00039             return "TestControl";
00040         }
00041     }
00042
00043     [TopLevelTestPage(Name = "Expander")]
00044     [AxeScanTestPage(Name = "Expander-Axe")]
00045     public sealed partial class ExpanderPage : TestPage
00046     {
00047         public ExpanderPage()
00048         {
00049             this.InitializeComponent();
00050             var customControlPeer = FrameworkElementAutomationPeer.FromElement(CustomControl);
00051             var expanderPeer = FrameworkElementAutomationPeer.FromElement(ExpanderWithCustomEventsSource);
00052
00053             // Commenting because of MuxTestInfra bug:
00054             // https://github.com/microsoft/microsoft-ui-xaml/issues/3491
00055             //expanderPeer.EventsSource = customControlPeer;
00056         }
00057     }
00058 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/InteractionTests/CommandBarFlyoutTests.cs Source File

  • File List
  • File Members
  • CommandBarFlyout
  • InteractionTests

CommandBarFlyoutTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Drawing;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 using Microsoft.Windows.Apps.Test.Automation;
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00019 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00020 using System.Text.RegularExpressions;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00023 {
00024     [TestClass]
00025     public partial class CommandBarFlyoutTests
00026     {
00027         // Values taken from https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids
00028         private const int UIA_FlowsFromPropertyId = 30148;
00029         private const int UIA_FlowsToPropertyId = 30106;
00030         private const int UIA_PositionInSetPropertyId = 30152;
00031         private const int UIA_SizeOfSetPropertyId = 30153;
00032
00033         [ClassInitialize]
00034         [TestProperty("RunAs", "User")]
00035         [TestProperty("Classification", "Integration")]
00036         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00037         public static void ClassInitialize(TestContext testContext)
00038         {
00039             TestEnvironment.Initialize(testContext);
00040         }
00041
00042         [TestCleanup]
00043         public void TestCleanup()
00044         {
00045             TestCleanupHelper.Cleanup();
00046         }
00047
00048         internal class CommandBarFlyoutTestSetupHelper : TestSetupHelper
00049         {
00050             public CommandBarFlyoutTestSetupHelper(string languageOverride = "")
00051                 : base(new[] { "CommandBarFlyout Tests", "Base CommandBarFlyout Tests" }, new TestSetupHelperOptions{ LanguageOverride = languageOverride})
00052             {
00053                 statusReportingTextBox = FindElement.ById<Edit>("StatusReportingTextBox");
00054             }
00055
00056             public void ExecuteAndWaitForEvent(Action action, string eventText)
00057             {
00058                 ExecuteAndWaitForEvents(action, new List<string>() { eventText });
00059             }
00060
00061             public void ExecuteAndWaitForEvents(Action action, IList<string> eventTexts)
00062             {
00063                 IList<ValueChangedEventWaiter> waiters = new List<ValueChangedEventWaiter>();
00064
00065                 foreach (string eventText in eventTexts)
00066                 {
00067                     waiters.Add(new ValueChangedEventWaiter(statusReportingTextBox, eventText));
00068                 }
00069
00070                 action.Invoke();
00071
00072                 for (int i = 0; i < waiters.Count; i++)
00073                 {
00074                     Log.Comment(string.Format("Waiting for the event \"{0}\"...", eventTexts[i]));
00075                     waiters[i].Wait();
00076                     Log.Comment("Event occurred.");
00077
00078                     waiters[i].Dispose();
00079                 }
00080             }
00081
00082             private Edit statusReportingTextBox;
00083         }
00084
00085         [TestMethod]
00086         [TestProperty("TestSuite", "A")]
00087         public void CanTapOnPrimaryItems()
00088         {
00089             using (var setup = new CommandBarFlyoutTestSetupHelper())
00090             {
00091                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
00092
00093                 Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00094                 InputHelper.Tap(showCommandBarFlyoutButton);
00095
00096                 Log.Comment("Tapping on the buttons in the primary commands list.");
00097                 setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("CutButton1")), new List<string>() { "CutButton1 clicked" });
00098                 setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("CopyButton1")), new List<string>() { "CopyButton1 clicked" });
00099                 setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("PasteButton1")), new List<string>() { "PasteButton1 clicked" });
00100                 setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("BoldButton1")), new List<string>() { "BoldButton1 clicked" });
00101                 setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("ItalicButton1")), new List<string>() { "ItalicButton1 clicked" });
00102                 setup.ExecuteAndWaitForEvents(() => InputHelper.Tap(FindElement.ById("UnderlineButton1")), new List<string>() { "UnderlineButton1 clicked" });
00103
00104                 Log.Comment("Tapping on the button to hide the CommandBarFlyout.");
00105                 InputHelper.Tap(showCommandBarFlyoutButton);
00106             }
00107         }
00108
00109         [TestMethod]
00110         [TestProperty("TestSuite", "A")]
00111         public void CanTapOnSecondaryItems()
00112         {
00113             using (var setup = new CommandBarFlyoutTestSetupHelper())
00114             {
00115                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
00116                 ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");
00117
00118                 Action openCommandBarAction = () =>
00119                 {
00120                     Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00121                     InputHelper.Tap(showCommandBarFlyoutButton);
00122
00123                     Log.Comment("Expanding the CommandBar by invoking the more button.");
00124                     FindElement.ById<Button>("MoreButton").InvokeAndWait();
00125                 };
00126
00127                 Log.Comment("Opening the CommandBar and invoking the first button in the secondary commands list.");
00128                 openCommandBarAction();
00129
00130                 using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
00131                 {
00132                     setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("UndoButton1").Invoke(), new List<string>() { "UndoButton1 clicked" });
00133                     waiter.Wait();
00134                 }
00135
00136                 Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);
00137
00138                 Log.Comment("Opening the CommandBar and invoking the second button in the secondary commands list.");
00139                 openCommandBarAction();
00140
00141                 using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
00142                 {
00143                     setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("RedoButton1").Invoke(), new List<string>() { "RedoButton1 clicked" });
00144                     waiter.Wait();
00145                 }
00146
00147                 Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);
00148
00149                 Log.Comment("Opening the CommandBar and invoking the third button in the secondary commands list.");
00150                 openCommandBarAction();
00151
00152                 using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
00153                 {
00154                     setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("SelectAllButton1").Invoke(), new List<string>() { "SelectAllButton1 clicked" });
00155                     waiter.Wait();
00156                 }
00157
00158                 Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);
00159
00160                 Log.Comment("Opening the CommandBar and invoking the toggle button in the secondary commands list.");
00161                 openCommandBarAction();
00162
00163                 using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
00164                 {
00165                     setup.ExecuteAndWaitForEvents(() => FindElement.ById<ToggleButton>("FavoriteToggleButton1").Toggle(), new List<string>() { "FavoriteToggleButton1 checked" });
00166                     waiter.Wait();
00167                 }
00168
00169                 Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.Off);
00170             }
00171         }
00172
00173         [TestMethod]
00174         [TestProperty("TestSuite", "A")]
00175         [TestProperty("Ignore", "True")] // TODO 31897875: Re-enable when release build instability resolved.
00176         public void CanTapOnSecondaryItemWithFlyoutWithoutClosing()
00177         {
00178             using (var setup = new CommandBarFlyoutTestSetupHelper())
00179             {
00180                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");
00181                 ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");
00182
00183                 Action openCommandBarAction = () =>
00184                 {
00185                     Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00186                     InputHelper.Tap(showCommandBarFlyoutButton);
00187
00188                     Log.Comment("Expanding the CommandBar by invoking the more button.");
00189                     FindElement.ById<Button>("MoreButton").InvokeAndWait();
00190                 };
00191
00192                 Log.Comment("Opening the CommandBar and invoking the first button in the secondary commands list.");
00193                 openCommandBarAction();
00194
00195                 setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("ProofingButton").Invoke(), new List<string>() { "ProofingButton clicked" });
00196
00197                 Verify.IsTrue(isFlyoutOpenCheckBox.ToggleState == ToggleState.On);
00198             }
00199         }
00200
00201         [TestMethod]
00202         [TestProperty("TestSuite", "A")]
00203         public void VerifyTabNavigationBetweenPrimaryAndSecondaryCommands()
00204         {
00205             using (var setup = new CommandBarFlyoutTestSetupHelper())
00206             {
00207                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
00208
00209                 Log.Comment("Tap on a button to show the CommandBarFlyout.");
00210                 InputHelper.Tap(showCommandBarFlyoutButton);
00211
00212                 FocusHelper.SetFocus(FindElement.ById("CutButton1"));
00213
00214                 Log.Comment("Press Tab key to move focus to first secondary command: Undo.");
00215                 KeyboardHelper.PressKey(Key.Tab);
00216                 Wait.ForIdle();
00217
00218                 Button undoButton1 = FindElement.ById<Button>("UndoButton1");
00219                 var undoButtonElement = AutomationElement.FocusedElement;
00220                 Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton1.AutomationId);
00221
00222                 Log.Comment("Press Tab key to move focus to first primary command: Cut.");
00223                 KeyboardHelper.PressKey(Key.Tab);
00224                 Wait.ForIdle();
00225
00226                 Button cutButton1 = FindElement.ById<Button>("CutButton1");
00227                 var cutButtonElement = AutomationElement.FocusedElement;
00228                 Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
00229             }
00230         }
00231
00232         [TestMethod]
00233         [TestProperty("TestSuite", "A")]
00234         public void VerifyLeftAndRightNavigationBetweenPrimaryCommands()
00235         {
00236             VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: false, useUpDownKeys: false);
00237         }
00238
00239         [TestMethod]
00240         [TestProperty("TestSuite", "A")]
00241         public void VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTL()
00242         {
00243             VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: true,  useUpDownKeys: false);
00244
00245         }
00246
00247         [TestMethod]
00248         [TestProperty("TestSuite", "A")]
00249         public void VerifyLeftAndRightNavigationBetweenPrimaryCommandsUpAndDown()
00250         {
00251             VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: false, useUpDownKeys: true);
00252
00253         }
00254
00255         [TestMethod]
00256         [TestProperty("TestSuite", "A")]
00257         public void VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTLUpAndDown()
00258         {
00259             VerifyLeftAndRightNavigationBetweenPrimaryCommands(inRTL: true,  useUpDownKeys: true);
00260         }
00261
00262         private void VerifyLeftAndRightNavigationBetweenPrimaryCommands(bool inRTL, bool useUpDownKeys)
00263         {
00264             using (var setup = new CommandBarFlyoutTestSetupHelper())
00265             {
00266                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
00267
00268                 if (inRTL)
00269                 {
00270                     ToggleButton isRTLCheckBox = FindElement.ById<ToggleButton>("IsRTLCheckBox");
00271
00272                     Log.Comment("Switch to RightToLeft FlowDirection.");
00273                     isRTLCheckBox.Toggle();
00274                     Wait.ForIdle();
00275                 }
00276
00277                 string rightStr;
00278                 string leftStr;
00279                 Key rightKey;
00280                 Key leftKey;
00281
00282                 if (useUpDownKeys)
00283                 {
00284                     // Down and Up keys are used to move logically within the primary commands: Up to move to the previous command and Down to move to the next command.
00285                     rightStr = "Down";
00286                     leftStr = "Up";
00287                     rightKey = Key.Down;
00288                     leftKey = Key.Up;
00289                 }
00290                 else
00291                 {
00292                     // Left and Right keys are used to move physically within the primary commands: Left to move to the left command and Right to move to the right command.
00293                     rightStr = inRTL ? "Left" : "Right";
00294                     leftStr = inRTL ? "Right" : "Left";
00295                     rightKey = inRTL ? Key.Left : Key.Right;
00296                     leftKey = inRTL ? Key.Right : Key.Left;
00297                 }
00298
00299                 Log.Comment("Tap on a button to show the CommandBarFlyout.");
00300                 InputHelper.Tap(showCommandBarFlyoutButton);
00301
00302                 FocusHelper.SetFocus(FindElement.ById("CutButton1"));
00303
00304                 Log.Comment($"Press {rightStr} key to move focus to second primary command: Copy.");
00305                 KeyboardHelper.PressKey(rightKey);
00306                 Wait.ForIdle();
00307
00308                 Button copyButton1 = FindElement.ById<Button>("CopyButton1");
00309                 var copyButtonElement = AutomationElement.FocusedElement;
00310                 Verify.AreEqual(copyButtonElement.Current.AutomationId, copyButton1.AutomationId);
00311
00312                 Log.Comment($"Press {leftStr} key to move focus back to first primary command: Cut.");
00313                 KeyboardHelper.PressKey(leftKey);
00314                 Wait.ForIdle();
00315
00316                 Button cutButton1 = FindElement.ById<Button>("CutButton1");
00317                 var cutButtonElement = AutomationElement.FocusedElement;
00318                 Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
00319
00320                 if (!useUpDownKeys)
00321                 {
00322                     Log.Comment($"Press {leftStr} key and remain on first primary command: Cut.");
00323                     KeyboardHelper.PressKey(leftKey);
00324                     Wait.ForIdle();
00325
00326                     cutButtonElement = AutomationElement.FocusedElement;
00327                     Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
00328                 }
00329
00330                 Log.Comment($"Press {rightStr} key to move focus to MoreButton.");
00331                 for (int i = 0; i <= 5; i++)
00332                 {
00333                     KeyboardHelper.PressKey(rightKey);
00334                     Wait.ForIdle();
00335                 }
00336
00337                 Button moreButton = FindElement.ById<Button>("MoreButton");
00338                 var moreButtonElement = AutomationElement.FocusedElement;
00339                 Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
00340
00341                 if (!useUpDownKeys)
00342                 {
00343                     Log.Comment($"Press {rightStr} key and remain on MoreButton.");
00344                     KeyboardHelper.PressKey(rightKey);
00345                     Wait.ForIdle();
00346
00347                     moreButtonElement = AutomationElement.FocusedElement;
00348                     Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
00349                 }
00350             }
00351         }
00352
00353         [TestMethod]
00354         [TestProperty("TestSuite", "A")]
00355         public void VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommands()
00356         {
00357             using (var setup = new CommandBarFlyoutTestSetupHelper())
00358             {
00359                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
00360
00361                 Log.Comment("Tap on a button to show the CommandBarFlyout.");
00362                 InputHelper.Tap(showCommandBarFlyoutButton);
00363
00364                 FocusHelper.SetFocus(FindElement.ById("CutButton1"));
00365
00366                 Log.Comment("Press Down key to move focus to second primary command: Copy.");
00367                 KeyboardHelper.PressKey(Key.Down);
00368                 Wait.ForIdle();
00369
00370                 Button copyButton1 = FindElement.ById<Button>("CopyButton1");
00371                 var copyButtonElement = AutomationElement.FocusedElement;
00372                 Verify.AreEqual(copyButtonElement.Current.AutomationId, copyButton1.AutomationId);
00373
00374                 Log.Comment("Press Up key to move focus back to first primary command: Cut.");
00375                 KeyboardHelper.PressKey(Key.Up);
00376                 Wait.ForIdle();
00377
00378                 Button cutButton1 = FindElement.ById<Button>("CutButton1");
00379                 var cutButtonElement = AutomationElement.FocusedElement;
00380                 Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
00381
00382                 Log.Comment("Press Down key to move focus to last primary command: Underline.");
00383                 for (int i = 0; i <= 4; i++)
00384                 {
00385                     KeyboardHelper.PressKey(Key.Down);
00386                     Wait.ForIdle();
00387                 }
00388
00389                 Button underlineButton1 = FindElement.ById<Button>("UnderlineButton1");
00390                 var underlineButtonElement = AutomationElement.FocusedElement;
00391                 Verify.AreEqual(underlineButtonElement.Current.AutomationId, underlineButton1.AutomationId);
00392
00393                 Log.Comment("Press Down key to move focus to MoreButton.");
00394                 KeyboardHelper.PressKey(Key.Down);
00395                 Wait.ForIdle();
00396
00397                 Button moreButton = FindElement.ById<Button>("MoreButton");
00398                 var moreButtonElement = AutomationElement.FocusedElement;
00399                 Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
00400
00401                 Log.Comment("Press Up key to move focus to first primary command: Cut.");
00402                 for (int i = 0; i <= 5; i++)
00403                 {
00404                     KeyboardHelper.PressKey(Key.Up);
00405                     Wait.ForIdle();
00406                 }
00407
00408                 cutButtonElement = AutomationElement.FocusedElement;
00409                 Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
00410
00411                 Log.Comment("Press Up key to move focus to last secondary command: Favorite.");
00412                 KeyboardHelper.PressKey(Key.Up);
00413                 Wait.ForIdle();
00414
00415                 Button favoriteToggleButton1 = FindElement.ById<Button>("FavoriteToggleButton1");
00416                 var favoriteToggleButtonElement = AutomationElement.FocusedElement;
00417                 Verify.AreEqual(favoriteToggleButtonElement.Current.AutomationId, favoriteToggleButton1.AutomationId);
00418
00419                 Log.Comment("Press Up key to move focus to first secondary command: Undo.");
00420                 for (int i = 0; i <= 2; i++)
00421                 {
00422                     KeyboardHelper.PressKey(Key.Up);
00423                     Wait.ForIdle();
00424                 }
00425
00426                 Button undoButton1 = FindElement.ById<Button>("UndoButton1");
00427                 var undoButtonElement = AutomationElement.FocusedElement;
00428                 Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton1.AutomationId);
00429
00430                 Log.Comment("Press Up key to move focus to MoreButton.");
00431                 KeyboardHelper.PressKey(Key.Up);
00432                 Wait.ForIdle();
00433
00434                 moreButtonElement = AutomationElement.FocusedElement;
00435                 Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
00436
00437                 Log.Comment("Press Down key to move focus to first primary command through all secondary commands: Cut.");
00438                 for (int i = 0; i <= 4; i++)
00439                 {
00440                     KeyboardHelper.PressKey(Key.Down);
00441                     Wait.ForIdle();
00442                 }
00443
00444                 cutButtonElement = AutomationElement.FocusedElement;
00445                 Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
00446             }
00447         }
00448
00449         [TestMethod]
00450         [TestProperty("TestSuite", "A")]
00451         public void VerifyPrimaryCommandsAutomationSet()
00452         {
00453             using (var setup = new CommandBarFlyoutTestSetupHelper())
00454             {
00455                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
00456
00457                 Log.Comment("Tap on a button to show the CommandBarFlyout.");
00458                 InputHelper.Tap(showCommandBarFlyoutButton);
00459
00460                 FocusHelper.SetFocus(FindElement.ById("CutButton1"));
00461
00462                 Button cutButton1 = FindElement.ById<Button>("CutButton1");
00463                 var cutButtonElement = AutomationElement.FocusedElement;
00464                 Verify.AreEqual(cutButtonElement.Current.AutomationId, cutButton1.AutomationId);
00465
00466                 int sizeOfSet = (int)cutButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
00467                 int positionInSet = (int)cutButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));
00468
00469                 Log.Comment("Verify first primary command's SizeOfSet and PositionInSet automation properties.");
00470                 Verify.AreEqual(sizeOfSet, 7);
00471                 Verify.IsTrue(positionInSet == -1 || positionInSet == 1);
00472
00473                 Log.Comment("Press Right key to move focus to last primary command: Underline.");
00474                 for (int i = 0; i <= 4; i++)
00475                 {
00476                     KeyboardHelper.PressKey(Key.Right);
00477                     Wait.ForIdle();
00478                 }
00479
00480                 Button underlineButton1 = FindElement.ById<Button>("UnderlineButton1");
00481                 var underlineButtonElement = AutomationElement.FocusedElement;
00482                 Verify.AreEqual(underlineButtonElement.Current.AutomationId, underlineButton1.AutomationId);
00483
00484                 sizeOfSet = (int)underlineButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
00485                 positionInSet = (int)underlineButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));
00486
00487                 Log.Comment("Verify last primary command's SizeOfSet and PositionInSet automation properties.");
00488                 Verify.AreEqual(sizeOfSet, 7);
00489                 Verify.IsTrue(positionInSet == -1 || positionInSet == 6);
00490
00491                 Log.Comment("Press Right key to move focus to MoreButton.");
00492                 KeyboardHelper.PressKey(Key.Right);
00493                 Wait.ForIdle();
00494
00495                 Button moreButton = FindElement.ById<Button>("MoreButton");
00496                 var moreButtonElement = AutomationElement.FocusedElement;
00497                 Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
00498
00499                 sizeOfSet = (int)moreButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
00500                 positionInSet = (int)moreButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));
00501
00502                 Log.Comment("Verify MoreButton's SizeOfSet and PositionInSet automation properties.");
00503                 Verify.AreEqual(sizeOfSet, 7);
00504                 Verify.AreEqual(positionInSet, 7);
00505             }
00506         }
00507
00508         [TestMethod]
00509         [TestProperty("TestSuite", "A")]
00510         public void VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommands()
00511         {
00512             using (var setup = new CommandBarFlyoutTestSetupHelper())
00513             {
00514                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout");
00515
00516                 Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00517                 showCommandBarFlyoutButton.InvokeAndWait();
00518
00519                 Log.Comment("Expanding the CommandBar by invoking the more button.");
00520                 FindElement.ById<Button>("MoreButton").InvokeAndWait();
00521
00522                 FocusHelper.SetFocus(FindElement.ById("CutButton1"));
00523
00524                 Log.Comment("Retrieving the more button and undo button's automation element objects.");
00525
00526                 // Moving to the MoreButton to retrieve it
00527                 for (int i = 0; i <= 6; i++)
00528                 {
00529                     KeyboardHelper.PressKey(Key.Right);
00530                     Wait.ForIdle();
00531                 }
00532                 Button moreButton = FindElement.ById<Button>("MoreButton");
00533                 var moreButtonElement = AutomationElement.FocusedElement;
00534                 Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
00535
00536                 // Moving to the Undo button to retrieve it
00537                 KeyboardHelper.PressKey(Key.Down);
00538                 Wait.ForIdle();
00539                 Button undoButton1 = FindElement.ById<Button>("UndoButton1");
00540                 var undoButtonElement = AutomationElement.FocusedElement;
00541                 Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton1.AutomationId);
00542
00543                 Log.Comment("Verifying that the two elements point at each other using FlowsTo and FlowsFrom.");
00544                 var flowsToCollection = (AutomationElementCollection)moreButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsToPropertyId));
00545
00546                 Verify.AreEqual(1, flowsToCollection.Count);
00547                 Verify.AreEqual(undoButtonElement, flowsToCollection[0]);
00548
00549                 var flowsFromCollection = (AutomationElementCollection)undoButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsFromPropertyId));
00550
00551                 Verify.AreEqual(1, flowsFromCollection.Count);
00552                 Verify.AreEqual(moreButtonElement, flowsFromCollection[0]);
00553
00554                 Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
00555                 InputHelper.Tap(showCommandBarFlyoutButton);
00556             }
00557         }
00558
00559         [TestMethod]
00560         [TestProperty("TestSuite", "B")]
00561         public void VerifyFlowsToAndFromIsNotSetWithoutPrimaryCommands()
00562         {
00563             using (var setup = new CommandBarFlyoutTestSetupHelper())
00564             {
00565                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");
00566
00567                 Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00568                 InputHelper.Tap(showCommandBarFlyoutButton);
00569
00570                 Log.Comment("Retrieving the undo button's automation element object.");
00571                 FindElement.ById("UndoButton6").SetFocus();
00572                 Wait.ForIdle();
00573                 var undoButtonElement = AutomationElement.FocusedElement;
00574
00575                 Log.Comment("Verifying that the undo button does not point at the more button using FlowsFrom.");
00576                 var flowsFromCollection = (AutomationElementCollection)undoButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsFromPropertyId));
00577                 Verify.AreEqual(0, flowsFromCollection.Count);
00578
00579                 Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
00580                 InputHelper.Tap(showCommandBarFlyoutButton);
00581             }
00582         }
00583
00584         [TestMethod]
00585         [TestProperty("TestSuite", "B")]
00586         public void VerifyFlyoutClosingBehavior()
00587         {
00588             using (var setup = new CommandBarFlyoutTestSetupHelper())
00589             {
00590                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");
00591
00592                 Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00593                 showCommandBarFlyoutButton.Click();
00594
00595                 Log.Comment("Expanding the CommandBar by invoking the more button.");
00596                 FindElement.ById<Button>("MoreButton").InvokeAndWait();
00597
00598                 // Click item to open flyout
00599                 FindElement.ById<Button>("ProofingButton").Click();
00600
00601                 // Move around over the first item to keep flyout open safely
00602                 // This also verifies that the flyout is open as it would crash otherwise
00603                 PointerInput.Move(FindElement.ByName("FirstFlyoutItem"), 5, 5);
00604                 PointerInput.Move(FindElement.ByName("FirstFlyoutItem"), 6, 5);
00605                 PointerInput.Move(FindElement.ByName("FirstFlyoutItem"), 5, 6);
00606
00607                 // Click outside of the flyout to close it
00608                 InputHelper.Tap(FindElement.ByName<Button>("Show CommandBarFlyout"));
00609
00610                 // Check that the flyout item is not present anymore
00611                 VerifyElement.NotFound("FirstFlyoutItem",FindBy.Name);
00612             }
00613         }
00614
00615         [TestMethod]
00616         [TestProperty("TestSuite", "B")]
00617         public void VerifyFlyoutOpenKeyboardBehavior()
00618         {
00619             using (var setup = new CommandBarFlyoutTestSetupHelper())
00620             {
00621                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");
00622
00623                 Log.Comment("Show the CommandBarFlyout.");
00624                 InputHelper.RightClick(showCommandBarFlyoutButton, 10, 10);
00625
00626                 Log.Comment("Press Down key to move focus to first secondary command: Proofing.");
00627                 for (int i = 0; i < 7; i++)
00628                 {
00629                     KeyboardHelper.PressKey(Key.Down);
00630                     Wait.ForIdle();
00631                 }
00632
00633                 // Press right key to open flyout
00634                 KeyboardHelper.PressKey(Key.Right);
00635
00636                 // Click first item on flyout
00637                 setup.ExecuteAndWaitForEvents(() => KeyboardHelper.PressKey(Key.Enter), new List<string>() { "FirstFlyoutItem clicked" });
00638             }
00639         }
00640
00641         [TestMethod]
00642         [TestProperty("TestSuite", "B")]
00643         public void VerifyFlyoutCloseKeyboardBehavior()
00644         {
00645             using (var setup = new CommandBarFlyoutTestSetupHelper())
00646             {
00647                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");
00648
00649                 Log.Comment("Show the CommandBarFlyout.");
00650                 InputHelper.RightClick(showCommandBarFlyoutButton, 10, 10);
00651
00652                 Log.Comment("Press Down key to move focus to first secondary command: Proofing.");
00653                 for (int i = 0; i < 7; i++)
00654                 {
00655                     KeyboardHelper.PressKey(Key.Down);
00656                     Wait.ForIdle();
00657                 }
00658
00659                 // Press right key to open flyout
00660                 KeyboardHelper.PressKey(Key.Right);
00661                 Wait.ForIdle();
00662
00663                 // Press left key to close flyout
00664                 KeyboardHelper.PressKey(Key.Left);
00665                 Wait.ForIdle();
00666
00667                 // Navigate down
00668                 KeyboardHelper.PressKey(Key.Down);
00669                 Wait.ForIdle();
00670
00671                 // Click AppBarButton item
00672                 setup.ExecuteAndWaitForEvents(() => KeyboardHelper.PressKey(Key.Enter), new List<string>() { "UndoButton5 clicked" });
00673             }
00674         }
00675
00676         [TestMethod]
00677         [TestProperty("TestSuite", "B")]
00678         public void VerifyAlwaysExpandedBehavior()
00679         {
00680             using (var setup = new CommandBarFlyoutTestSetupHelper())
00681             {
00682                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");
00683
00684                 Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00685                 showCommandBarFlyoutButton.InvokeAndWait();
00686
00687                 Log.Comment("Verifying that the secondary commands are visible.");
00688                 Button undoButton = FindElement.ById<Button>("UndoButton9");
00689                 Verify.IsNotNull(undoButton);
00690
00691                 Log.Comment("Verifying that the ... button is not visible.");
00692                 UIObject moreButton = TryFindElement.ById("MoreButton");
00693                 Verify.IsNull(moreButton);
00694
00695                 Log.Comment("Tapping on one of the primary commands");
00696                 FindElement.ById<Button>("CutButton9").InvokeAndWait();
00697                 ElementCache.Clear();
00698
00699                 Log.Comment("Verifying that the secondary commands are still visible.");
00700                 undoButton = FindElement.ById<Button>("UndoButton9");
00701                 Verify.IsNotNull(undoButton);
00702
00703                 Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
00704                 InputHelper.Tap(showCommandBarFlyoutButton);
00705             }
00706         }
00707
00708         [TestMethod]
00709         [TestProperty("TestSuite", "B")]
00710         public void VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommandsWithAlwaysExpanded()
00711         {
00712             using (var setup = new CommandBarFlyoutTestSetupHelper())
00713             {
00714                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");
00715
00716                 Log.Comment("Tap on a button to show the CommandBarFlyout.");
00717                 InputHelper.Tap(showCommandBarFlyoutButton);
00718
00719                 Log.Comment("Press Down key to move focus to last primary command: Underline.");
00720                 for (int i = 0; i < 5; i++)
00721                 {
00722                     KeyboardHelper.PressKey(Key.Down);
00723                     Wait.ForIdle();
00724                 }
00725
00726                 Button underlineButton9 = FindElement.ById<Button>("UnderlineButton9");
00727                 Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, underlineButton9.AutomationId);
00728
00729                 Button undoButton9 = FindElement.ById<Button>("UndoButton9");
00730
00731                 if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone3))
00732                 {
00733                     Log.Comment("Press Down key to move focus to first secondary command: Undo.");
00734                     KeyboardHelper.PressKey(Key.Down);
00735                     Wait.ForIdle();
00736
00737                     Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, undoButton9.AutomationId);
00738
00739                     Log.Comment("Press Up key to move focus to first primary command: Cut.");
00740                     for (int i = 0; i < 6; i++)
00741                     {
00742                         KeyboardHelper.PressKey(Key.Up);
00743                         Wait.ForIdle();
00744                     }
00745                 }
00746                 else
00747                 {
00748                     Log.Comment("Press Up key to move focus to first primary command: Cut.");
00749                     for (int i = 0; i < 5; i++)
00750                     {
00751                         KeyboardHelper.PressKey(Key.Up);
00752                         Wait.ForIdle();
00753                     }
00754                 }
00755
00756                 Button cutButton9 = FindElement.ById<Button>("CutButton9");
00757                 Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, cutButton9.AutomationId);
00758
00759                 Log.Comment("Press Up key to move focus to last secondary command: Favorite.");
00760                 KeyboardHelper.PressKey(Key.Up);
00761                 Wait.ForIdle();
00762
00763                 Button favoriteToggleButton9 = FindElement.ById<Button>("FavoriteToggleButton9");
00764                 Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, favoriteToggleButton9.AutomationId);
00765
00766                 Log.Comment("Press Up key to move focus to first secondary command: Undo.");
00767                 for (int i = 0; i < 3; i++)
00768                 {
00769                     KeyboardHelper.PressKey(Key.Up);
00770                     Wait.ForIdle();
00771                 }
00772
00773                 Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, undoButton9.AutomationId);
00774
00775                 Log.Comment("Press Up key to move focus to last primary command: Underline.");
00776                 KeyboardHelper.PressKey(Key.Up);
00777                 Wait.ForIdle();
00778
00779                 Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, underlineButton9.AutomationId);
00780
00781                 Log.Comment("Press Down key to move focus to first primary command through all secondary commands: Cut.");
00782                 for (int i = 0; i < 5; i++)
00783                 {
00784                     KeyboardHelper.PressKey(Key.Down);
00785                     Wait.ForIdle();
00786                 }
00787
00788                 Verify.AreEqual(AutomationElement.FocusedElement.Current.AutomationId, cutButton9.AutomationId);
00789
00790                 Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
00791                 InputHelper.Tap(showCommandBarFlyoutButton);
00792             }
00793         }
00794
00795         [TestMethod]
00796         [TestProperty("TestSuite", "B")]
00797         public void VerifyPrimaryCommandsAutomationSetWithAlwaysExpanded()
00798         {
00799             using (var setup = new CommandBarFlyoutTestSetupHelper())
00800             {
00801                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");
00802
00803                 Log.Comment("Tap on a button to show the CommandBarFlyout.");
00804                 InputHelper.Tap(showCommandBarFlyoutButton);
00805
00806                 Button cutButton9 = FindElement.ById<Button>("CutButton9");
00807                 var focusedElement = AutomationElement.FocusedElement;
00808                 Verify.AreEqual(focusedElement.Current.AutomationId, cutButton9.AutomationId);
00809
00810                 int sizeOfSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
00811                 int positionInSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));
00812
00813                 Log.Comment("Verify first primary command's SizeOfSet and PositionInSet automation properties.");
00814                 Verify.AreEqual(sizeOfSet, 6);
00815                 Verify.IsTrue(positionInSet == -1 || positionInSet == 1);
00816
00817                 Log.Comment("Press Right key to move focus to last primary command: Underline.");
00818                 for (int i = 0; i < 5; i++)
00819                 {
00820                     KeyboardHelper.PressKey(Key.Right);
00821                     Wait.ForIdle();
00822                 }
00823
00824                 Button underlineButton9 = FindElement.ById<Button>("UnderlineButton9");
00825                 focusedElement = AutomationElement.FocusedElement;
00826                 Verify.AreEqual(focusedElement.Current.AutomationId, underlineButton9.AutomationId);
00827
00828                 sizeOfSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_SizeOfSetPropertyId));
00829                 positionInSet = (int)focusedElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_PositionInSetPropertyId));
00830
00831                 Log.Comment("Verify last primary command's SizeOfSet and PositionInSet automation properties.");
00832                 Verify.AreEqual(sizeOfSet, 6);
00833                 Verify.IsTrue(positionInSet == -1 || positionInSet == 6);
00834
00835                 Log.Comment("Press Right key. Focus should not move.");
00836                 KeyboardHelper.PressKey(Key.Right);
00837                 Wait.ForIdle();
00838
00839                 focusedElement = AutomationElement.FocusedElement;
00840                 Verify.AreEqual(focusedElement.Current.AutomationId, underlineButton9.AutomationId);
00841
00842                 Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
00843                 InputHelper.Tap(showCommandBarFlyoutButton);
00844             }
00845         }
00846
00847         [TestMethod]
00848         [TestProperty("TestSuite", "B")]
00849         public void VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommandsWithAlwaysExpanded()
00850         {
00851             using (var setup = new CommandBarFlyoutTestSetupHelper())
00852             {
00853                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");
00854
00855                 Log.Comment("Tapping on a button to show the CommandBarFlyout.");
00856                 showCommandBarFlyoutButton.InvokeAndWait();
00857
00858                 Log.Comment("Press Right key to move focus to last primary command: Underline.");
00859                 for (int i = 0; i < 5; i++)
00860                 {
00861                     KeyboardHelper.PressKey(Key.Right);
00862                     Wait.ForIdle();
00863                 }
00864
00865                 Button underlineButton9 = FindElement.ById<Button>("UnderlineButton9");
00866                 var underlineButtonElement = AutomationElement.FocusedElement;
00867                 Verify.AreEqual(underlineButtonElement.Current.AutomationId, underlineButton9.AutomationId);
00868
00869                 // Moving to the Undo button to retrieve it
00870                 KeyboardHelper.PressKey(Key.Down);
00871                 Wait.ForIdle();
00872
00873                 Button undoButton9 = FindElement.ById<Button>("UndoButton9");
00874                 var undoButtonElement = AutomationElement.FocusedElement;
00875                 Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton9.AutomationId);
00876
00877                 Log.Comment("Verifying that the two elements point at each other using FlowsTo and FlowsFrom.");
00878                 var flowsToCollection = (AutomationElementCollection)underlineButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsToPropertyId));
00879
00880                 Verify.AreEqual(1, flowsToCollection.Count);
00881                 Verify.AreEqual(undoButtonElement, flowsToCollection[0]);
00882
00883                 var flowsFromCollection = (AutomationElementCollection)undoButtonElement.GetCurrentPropertyValue(AutomationProperty.LookupById(UIA_FlowsFromPropertyId));
00884
00885                 Verify.AreEqual(1, flowsFromCollection.Count);
00886                 Verify.AreEqual(underlineButtonElement, flowsFromCollection[0]);
00887
00888                 Log.Comment("Tapping on a button to hide the CommandBarFlyout.");
00889                 InputHelper.Tap(showCommandBarFlyoutButton);
00890             }
00891         }
00892
00893         [TestMethod]
00894         [TestProperty("TestSuite", "B")]
00895         public void VerifyDynamicSecondaryCommandLabel()
00896         {
00897             using (var setup = new CommandBarFlyoutTestSetupHelper())
00898             {
00899                 Log.Comment("Retrieving FlyoutTarget6");
00900                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");
00901
00902                 Log.Comment("Retrieving IsFlyoutOpenCheckBox");
00903                 ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");
00904
00905                 Log.Comment("Retrieving UseSecondaryCommandDynamicLabelCheckBox");
00906                 ToggleButton useSecondaryCommandDynamicLabelCheckBox = FindElement.ById<ToggleButton>("UseSecondaryCommandDynamicLabelCheckBox");
00907
00908                 Log.Comment("SecondaryCommandDynamicLabelChangedCheckBox");
00909                 ToggleButton secondaryCommandDynamicLabelChangedCheckBox = FindElement.ById<ToggleButton>("SecondaryCommandDynamicLabelChangedCheckBox");
00910
00911                 Log.Comment("Retrieving DynamicLabelTimerIntervalTextBox");
00912                 Edit dynamicLabelTimerIntervalTextBox = new Edit(FindElement.ById("DynamicLabelTimerIntervalTextBox"));
00913
00914                 Log.Comment("Retrieving DynamicLabelChangeCountTextBox");
00915                 Edit dynamicLabelChangeCountTextBox = new Edit(FindElement.ById("DynamicLabelChangeCountTextBox"));
00916
00917                 Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
00918
00919                 Log.Comment("Change the first command bar element's Label property asynchronously after the command bar is opened");
00920                 useSecondaryCommandDynamicLabelCheckBox.CheckAndWait();
00921
00922                 Log.Comment("Setting DynamicLabelTimerIntervalTextBox to 2s");
00923                 dynamicLabelTimerIntervalTextBox.SetValueAndWait("2000");
00924
00925                 Log.Comment("Setting DynamicLabelChangeCountTextBox to 1 single change");
00926                 dynamicLabelChangeCountTextBox.SetValueAndWait("1");
00927
00928                 Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicLabelChangedCheckBox.ToggleState);
00929
00930                 Log.Comment("Invoking button 'Show CommandBarFlyout with no primary commands' to show the Flyout6 command bar.");
00931                 showCommandBarFlyoutButton.Invoke();
00932                 Wait.ForIdle();
00933                 Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);
00934
00935                 Button undoButton6 = FindElement.ById<Button>("UndoButton6");
00936                 Verify.IsNotNull(undoButton6);
00937
00938                 UIObject commandBarElementsContainer = undoButton6.Parent;
00939                 Verify.IsNotNull(commandBarElementsContainer);
00940
00941                 Button redoButton6 = FindElement.ById<Button>("RedoButton6");
00942                 Verify.IsNotNull(redoButton6);
00943
00944                 Rectangle initialBoundingRectangle = redoButton6.BoundingRectangle;
00945
00946                 Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Width=" + initialBoundingRectangle.Width);
00947                 Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Height=" + initialBoundingRectangle.Height);
00948
00949                 Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicLabelChangedCheckBox.ToggleState);
00950
00951                 Log.Comment("Waiting for SecondaryCommandDynamicLabelChangedCheckBox becoming checked indicating the asynchronous Label property change occurred");
00952                 secondaryCommandDynamicLabelChangedCheckBox.GetToggledWaiter().Wait();
00953                 Wait.ForIdle();
00954
00955                 Rectangle finalBoundingRectangle = redoButton6.BoundingRectangle;
00956
00957                 Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Width=" + finalBoundingRectangle.Width);
00958                 Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Height=" + finalBoundingRectangle.Height);
00959
00960                 Log.Comment("Hitting Escape key to close the command bar.");
00961                 KeyboardHelper.PressKey(Key.Escape);
00962                 Wait.ForIdle();
00963
00964                 Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
00965
00966                 Log.Comment("Verifying the command bar flyout width was increased to accommodate the longer label.");
00967                 Verify.IsGreaterThan(finalBoundingRectangle.Width, initialBoundingRectangle.Width);
00968                 Verify.AreEqual(finalBoundingRectangle.Height, initialBoundingRectangle.Height);
00969             }
00970         }
00971
00972         [TestMethod]
00973         [TestProperty("TestSuite", "B")]
00974         [TestProperty("Ignore", "True")] // Bug 39490247: [WinUI3]CommandBarFlyoutTests.VerifyDynamicSecondaryCommandVisibility fails in WinUI 3
00975         public void VerifyDynamicSecondaryCommandVisibility()
00976         {
00977             using (var setup = new CommandBarFlyoutTestSetupHelper())
00978             {
00979                 Log.Comment("Retrieving FlyoutTarget6");
00980                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");
00981
00982                 Log.Comment("Retrieving IsFlyoutOpenCheckBox");
00983                 ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");
00984
00985                 Log.Comment("Retrieving UseSecondaryCommandDynamicVisibilityCheckBox");
00986                 ToggleButton useSecondaryCommandDynamicVisibilityCheckBox = FindElement.ById<ToggleButton>("UseSecondaryCommandDynamicVisibilityCheckBox");
00987
00988                 Log.Comment("SecondaryCommandDynamicVisibilityChangedCheckBox");
00989                 ToggleButton secondaryCommandDynamicVisibilityChangedCheckBox = FindElement.ById<ToggleButton>("SecondaryCommandDynamicVisibilityChangedCheckBox");
00990
00991                 Log.Comment("Retrieving DynamicVisibilityTimerIntervalTextBox");
00992                 Edit dynamicVisibilityTimerIntervalTextBox = new Edit(FindElement.ById("DynamicVisibilityTimerIntervalTextBox"));
00993
00994                 Log.Comment("Retrieving DynamicVisibilityChangeCountTextBox");
00995                 Edit dynamicVisibilityChangeCountTextBox = new Edit(FindElement.ById("DynamicVisibilityChangeCountTextBox"));
00996
00997                 Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
00998
00999                 Log.Comment("Change the fifth command bar element's Visibility property asynchronously after the command bar is opened");
01000                 useSecondaryCommandDynamicVisibilityCheckBox.CheckAndWait();
01001
01002                 Log.Comment("Setting DynamicVisibilityTimerIntervalTextBox to 2s");
01003                 dynamicVisibilityTimerIntervalTextBox.SetValueAndWait("2000");
01004
01005                 Log.Comment("Setting DynamicVisibilityChangeCountTextBox to 1 single change");
01006                 dynamicVisibilityChangeCountTextBox.SetValueAndWait("1");
01007
01008                 Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicVisibilityChangedCheckBox.ToggleState);
01009
01010                 Log.Comment("Invoking button 'Show CommandBarFlyout with no primary commands' to show the Flyout6 command bar.");
01011                 showCommandBarFlyoutButton.Invoke();
01012                 Wait.ForIdle();
01013                 Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);
01014
01015                 Button undoButton6 = FindElement.ById<Button>("UndoButton6");
01016                 Verify.IsNotNull(undoButton6);
01017
01018                 Button redoButton6 = FindElement.ById<Button>("RedoButton6");
01019                 Verify.IsNotNull(redoButton6);
01020
01021                 Rectangle initialBoundingRectangle = redoButton6.BoundingRectangle;
01022
01023                 Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Width=" + initialBoundingRectangle.Width);
01024                 Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Height=" + initialBoundingRectangle.Height);
01025
01026                 Verify.AreEqual(ToggleState.Off, secondaryCommandDynamicVisibilityChangedCheckBox.ToggleState);
01027
01028                 Log.Comment("Waiting for SecondaryCommandDynamicVisibilityChangedCheckBox becoming checked indicating the asynchronous Visibility property change occurred");
01029                 secondaryCommandDynamicVisibilityChangedCheckBox.GetToggledWaiter().Wait();
01030                 Wait.ForIdle();
01031
01032                 Rectangle finalBoundingRectangle = redoButton6.BoundingRectangle;
01033
01034                 Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Width=" + finalBoundingRectangle.Width);
01035                 Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Height=" + finalBoundingRectangle.Height);
01036
01037                 Log.Comment("Hitting Escape key to close the command bar.");
01038                 KeyboardHelper.PressKey(Key.Escape);
01039                 Wait.ForIdle();
01040
01041                 Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
01042
01043                 Log.Comment("Verifying the command bar flyout width and height were increased to accommodate the new AppBarButton.");
01044                 Verify.IsGreaterThan(finalBoundingRectangle.Width, initialBoundingRectangle.Width);
01045                 Verify.IsGreaterThan(finalBoundingRectangle.Height, initialBoundingRectangle.Height);
01046             }
01047         }
01048
01049         [TestMethod]
01050         [TestProperty("TestSuite", "B")]
01051         public void VerifyDynamicOverflowContentRootWidth()
01052         {
01053             using (var setup = new CommandBarFlyoutTestSetupHelper())
01054             {
01055                 Log.Comment("Retrieving FlyoutTarget6");
01056                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");
01057
01058                 Log.Comment("Retrieving IsFlyoutOpenCheckBox");
01059                 ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");
01060
01061                 Log.Comment("Retrieving UseOverflowContentRootDynamicWidthCheckBox");
01062                 ToggleButton useOverflowContentRootDynamicWidthCheckBox = FindElement.ById<ToggleButton>("UseOverflowContentRootDynamicWidthCheckBox");
01063
01064                 Log.Comment("OverflowContentRootDynamicWidthChangedCheckBox");
01065                 ToggleButton overflowContentRootDynamicWidthChangedCheckBox = FindElement.ById<ToggleButton>("OverflowContentRootDynamicWidthChangedCheckBox");
01066
01067                 Log.Comment("Retrieving DynamicWidthTimerIntervalTextBox");
01068                 Edit dynamicWidthTimerIntervalTextBox = new Edit(FindElement.ById("DynamicWidthTimerIntervalTextBox"));
01069
01070                 Log.Comment("Retrieving DynamicWidthChangeCountTextBox");
01071                 Edit dynamicWidthChangeCountTextBox = new Edit(FindElement.ById("DynamicWidthChangeCountTextBox"));
01072
01073                 Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
01074
01075                 Log.Comment("Change the fifth command bar element's Visibility property asynchronously after the command bar is opened");
01076                 useOverflowContentRootDynamicWidthCheckBox.CheckAndWait();
01077
01078                 Log.Comment("Setting DynamicWidthTimerIntervalTextBox to 1s");
01079                 dynamicWidthTimerIntervalTextBox.SetValueAndWait("1000");
01080
01081                 Log.Comment("Setting DynamicWidthChangeCountTextBox to 1 single change");
01082                 dynamicWidthChangeCountTextBox.SetValueAndWait("1");
01083
01084                 Verify.AreEqual(ToggleState.Off, overflowContentRootDynamicWidthChangedCheckBox.ToggleState);
01085
01086                 Log.Comment("Invoking button 'Show CommandBarFlyout with no primary commands' to show the Flyout6 command bar.");
01087                 showCommandBarFlyoutButton.Invoke();
01088                 Wait.ForIdle();
01089                 Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);
01090
01091                 Button undoButton6 = FindElement.ById<Button>("UndoButton6");
01092                 Verify.IsNotNull(undoButton6);
01093
01094                 Button redoButton6 = FindElement.ById<Button>("RedoButton6");
01095                 Verify.IsNotNull(redoButton6);
01096
01097                 Rectangle initialBoundingRectangle = redoButton6.BoundingRectangle;
01098
01099                 Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Width=" + initialBoundingRectangle.Width);
01100                 Log.Comment("Initial commandBarElementsContainer.BoundingRectangle.Height=" + initialBoundingRectangle.Height);
01101
01102                 Verify.AreEqual(ToggleState.Off, overflowContentRootDynamicWidthChangedCheckBox.ToggleState);
01103
01104                 Log.Comment("Waiting for OverflowContentRootDynamicWidthChangedCheckBox becoming checked indicating the asynchronous Visibility property change occurred");
01105                 overflowContentRootDynamicWidthChangedCheckBox.GetToggledWaiter().Wait();
01106                 Wait.ForIdle();
01107
01108                 Rectangle finalBoundingRectangle = redoButton6.BoundingRectangle;
01109
01110                 Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Width=" + finalBoundingRectangle.Width);
01111                 Log.Comment("Final commandBarElementsContainer.BoundingRectangle.Height=" + finalBoundingRectangle.Height);
01112
01113                 Log.Comment("Hitting Escape key to close the command bar.");
01114                 KeyboardHelper.PressKey(Key.Escape);
01115                 Wait.ForIdle();
01116
01117                 Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
01118
01119                 Log.Comment("Verifying the command bar flyout width was increased to accommodate the OverflowContentRoot's larger Width.");
01120                 Verify.IsGreaterThan(finalBoundingRectangle.Width, initialBoundingRectangle.Width);
01121                 Verify.AreEqual(finalBoundingRectangle.Height, initialBoundingRectangle.Height);
01122             }
01123         }
01124
01125         [TestMethod]
01126         [TestProperty("TestSuite", "B")]
01127         public void VerifyIsFlyoutKeyboardAccessibleWithNoPrimaryCommands()
01128         {
01129             using (var setup = new CommandBarFlyoutTestSetupHelper())
01130             {
01131                 Button showCommandBarFlyoutButtonWithNoPrimaryCommands = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");
01132
01133                 Log.Comment("Tap on a button to show the CommandBarFlyout.");
01134                 showCommandBarFlyoutButtonWithNoPrimaryCommands.InvokeAndWait();
01135
01136                 Button undoButton6 = FindElement.ById<Button>("UndoButton6");
01137                 var undoButtonElement = AutomationElement.FocusedElement;
01138                 Verify.AreEqual(undoButtonElement.Current.AutomationId, undoButton6.AutomationId);
01139
01140                 KeyboardHelper.PressKey(Key.Up);
01141                 Wait.ForIdle();
01142
01143                 Log.Comment("Press Up key to make sure commands loops focus to last secondary command: Favorite.");
01144                 Button favoriteToggleButton6 = FindElement.ById<Button>("FavoriteToggleButton6");
01145                 var favoriteToggleElement = AutomationElement.FocusedElement;
01146                 Verify.AreEqual(favoriteToggleElement.Current.AutomationId, favoriteToggleButton6.AutomationId);
01147             }
01148         }
01149
01150         [TestMethod]
01151         [TestProperty("TestSuite", "B")]
01152         public void VerifyAddPrimaryCommandsDynamically()
01153         {
01154             using (var setup = new CommandBarFlyoutTestSetupHelper())
01155             {
01156                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with no primary commands");
01157                 ToggleButton addPrimaryCommandDynamicallyCheckBox = FindElement.ById<ToggleButton>("AddPrimaryCommandDynamicallyCheckBox");
01158                 ToggleButton clearPrimaryCommandsCheckBox = FindElement.ById<ToggleButton>("ClearPrimaryCommandsCheckBox");
01159                 ToggleButton primaryCommandDynamicallyAddedCheckBox = FindElement.ById<ToggleButton>("PrimaryCommandDynamicallyAddedCheckBox");
01160                 Edit dynamicLabelTimerIntervalTextBox = new Edit(FindElement.ById("DynamicLabelTimerIntervalTextBox"));
01161                 Edit dynamicLabelChangeCountTextBox = new Edit(FindElement.ById("DynamicLabelChangeCountTextBox"));
01162
01163                 Log.Comment("Setting DynamicLabelTimerIntervalTextBox to 2s");
01164                 dynamicLabelTimerIntervalTextBox.SetValue("2000");
01165
01166                 Log.Comment("Setting DynamicLabelChangeCountTextBox to 1 single change");
01167                 dynamicLabelChangeCountTextBox.SetValue("1");
01168                 Wait.ForIdle();
01169
01170                 Log.Comment("Set Flyout6 to add Primary Commands dynamically");
01171                 addPrimaryCommandDynamicallyCheckBox.Check();
01172                 Wait.ForIdle();
01173
01174                 Log.Comment("Invoke FlyoutTarget 6 to Show CommandBarFlyout with no primary commands");
01175                 showCommandBarFlyoutButton.InvokeAndWait();
01176
01177                 Log.Comment("Waiting for SecondaryCommandDynamicLabelChangedCheckBox becoming checked indicating the asynchronous Label property change occurred");
01178                 primaryCommandDynamicallyAddedCheckBox.GetToggledWaiter().Wait();
01179                 Wait.ForIdle();
01180
01181                 KeyboardHelper.PressKey(Key.Tab);
01182                 Wait.ForIdle();
01183
01184                 KeyboardHelper.PressKey(Key.Right);
01185                 Wait.ForIdle();
01186
01187                 Log.Comment("Verifying Primary Commands is added and MoreButton is actionable");
01188
01189                 Button moreButton = FindElement.ById<Button>("MoreButton");
01190                 var moreButtonElement = AutomationElement.FocusedElement;
01191                 Verify.AreEqual(moreButtonElement.Current.AutomationId, moreButton.AutomationId);
01192
01193                 Log.Comment("Dismissing flyout");
01194                 KeyboardHelper.PressKey(Key.Escape);
01195             }
01196         }
01197
01198         [TestMethod]
01199         [TestProperty("TestSuite", "B")]
01200         public void CanHideCommandBarFlyoutInFlyoutClosedHandler()
01201         {
01202             CanHideCommandBarFlyoutInFlyoutClosedHandler(useAnimations: false);
01203             CanHideCommandBarFlyoutInFlyoutClosedHandler(useAnimations: true);
01204         }
01205
01206         private void CanHideCommandBarFlyoutInFlyoutClosedHandler(bool useAnimations)
01207         {
01208             using (var setup = new CommandBarFlyoutTestSetupHelper())
01209             {
01210                 ToggleButton useAnimatedCommandBarFlyoutCommandBarStyleCheckBox = FindElement.ById<ToggleButton>("UseAnimatedCommandBarFlyoutCommandBarStyleCheckBox");
01211                 Verify.IsNotNull(useAnimatedCommandBarFlyoutCommandBarStyleCheckBox);
01212
01213                 if (useAnimations && useAnimatedCommandBarFlyoutCommandBarStyleCheckBox.ToggleState == ToggleState.Off)
01214                 {
01215                     Log.Comment("Using DefaultCommandBarFlyoutCommandBarStyle with animations.");
01216                     useAnimatedCommandBarFlyoutCommandBarStyleCheckBox.Toggle();
01217                     Wait.ForIdle();
01218                 }
01219
01220                 ToggleButton hideFlyoutOnFlyoutClosedCheckBox = FindElement.ById<ToggleButton>("HideFlyoutOnFlyoutClosedCheckBox");
01221                 Verify.IsNotNull(hideFlyoutOnFlyoutClosedCheckBox);
01222
01223                 if (hideFlyoutOnFlyoutClosedCheckBox.ToggleState == ToggleState.Off)
01224                 {
01225                     Log.Comment("Hiding CommandBarFlyout in FlyoutClosed handler.");
01226                     hideFlyoutOnFlyoutClosedCheckBox.Toggle();
01227                     Wait.ForIdle();
01228                 }
01229
01230                 Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with AlwaysExpanded");
01231                 ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");
01232
01233                 Log.Comment("Invoking button 'Show CommandBarFlyout with AlwaysExpanded' to show the Flyout9 command bar.");
01234                 showCommandBarFlyoutButton.Invoke();
01235                 Wait.ForIdle();
01236
01237                 Log.Comment("Checking command bar opened successfully.");
01238                 Verify.AreEqual(ToggleState.On, isFlyoutOpenCheckBox.ToggleState);
01239
01240                 using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
01241                 {
01242                     Log.Comment("Invoking the first secondary command to close the CommandBarFlyout.");
01243                     setup.ExecuteAndWaitForEvents(() => FindElement.ById<Button>("UndoButton9").Invoke(), new List<string>() { "UndoButton9 clicked" });
01244                     waiter.Wait();
01245                 }
01246                 Wait.ForIdle();
01247
01248                 Log.Comment("Checking command bar closed successfully.");
01249                 Verify.AreEqual(ToggleState.Off, isFlyoutOpenCheckBox.ToggleState);
01250             }
01251         }
01252
01253         [TestMethod]
01254         [TestProperty("TestSuite", "B")]
01255         public void CommandBarFlyoutCommandBecomingVisibleHasCorrectVisuals()
01256         {
01257             using (var setup = new CommandBarFlyoutTestSetupHelper())
01258             {
01259                 var showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with a delayed AppBarButton flyout");
01260                 showCommandBarFlyoutButton.SetFocus();
01261
01262                 Rectangle originalBoundingRectangle = new();
01263                 var isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");
01264
01265                 setup.ExecuteAndWaitForEvent(() =>
01266                 {
01267                     using (var waiter = isFlyoutOpenCheckBox.GetToggledWaiter())
01268                     {
01269                         showCommandBarFlyoutButton.Invoke();
01270                         waiter.Wait();
01271                     }
01272
01273                     var undoButton16 = FindElement.ById<Button>("UndoButton16");
01274                     originalBoundingRectangle = undoButton16.BoundingRectangle;
01275                 }, "Undo with overflow visible");
01276
01277                 Wait.ForIdle();
01278
01279                 Log.Comment("The Undo button without an overflow should be less wide than the Undo button with an overflow.");
01280                 var undoButtonOverflow16 = FindElement.ById<Button>("UndoButtonOverflow16");
01281                 Verify.IsLessThan(originalBoundingRectangle.Width, undoButtonOverflow16.BoundingRectangle.Width);
01282
01283                 var extraInformationTextBox = FindElement.ById<Edit>("ExtraInformationTextBox");
01284                 var boundsText = extraInformationTextBox.GetText();
01285                 Rectangle undoButtonOverflow16IconBounds;
01286                 Rectangle undoButtonOverflow16OverflowTextLabelBounds;
01287                 Rectangle redoButton16IconBounds;
01288
01289                 var boundsPatternMatch = BoundsRegex().Match(boundsText);
01290                 undoButtonOverflow16IconBounds = new Rectangle(int.Parse(boundsPatternMatch.Groups[1].Value), int.Parse(boundsPatternMatch.Groups[2].Value), int.Parse(boundsPatternMatch.Groups[3].Value), int.Parse(boundsPatternMatch.Groups[4].Value));
01291                 undoButtonOverflow16OverflowTextLabelBounds = new Rectangle(int.Parse(boundsPatternMatch.Groups[5].Value), int.Parse(boundsPatternMatch.Groups[6].Value), int.Parse(boundsPatternMatch.Groups[7].Value), int.Parse(boundsPatternMatch.Groups[8].Value));
01292                 redoButton16IconBounds = new Rectangle(int.Parse(boundsPatternMatch.Groups[9].Value), int.Parse(boundsPatternMatch.Groups[10].Value), int.Parse(boundsPatternMatch.Groups[11].Value), int.Parse(boundsPatternMatch.Groups[12].Value));
01293
01294                 Verify.IsLessThan(undoButtonOverflow16IconBounds.X, undoButtonOverflow16OverflowTextLabelBounds.X);
01295                 Verify.AreEqual(undoButtonOverflow16IconBounds.X, redoButton16IconBounds.X);
01296             }
01297         }
01298
01299         [GeneratedRegex("\\((\\d+), (\\d+), (\\d+), (\\d+)\\), \\((\\d+), (\\d+), (\\d+), (\\d+)\\), \\((\\d+), (\\d+), (\\d+), (\\d+)\\)")]
01300         private static partial Regex BoundsRegex();
01301     }
01302 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/BreadcrumbBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

BreadcrumbBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "BreadcrumbBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(BreadcrumbBar)
00012 }
00013
00014 #include "BreadcrumbBar.g.cpp"
00015
00016 GlobalDependencyProperty BreadcrumbBarProperties::s_ItemsSourceProperty{ nullptr };
00017 GlobalDependencyProperty BreadcrumbBarProperties::s_ItemTemplateProperty{ nullptr };
00018
00019 BreadcrumbBarProperties::BreadcrumbBarProperties()
00020     : m_itemClickedEventSource{static_cast<BreadcrumbBar*>(this)}
00021 {
00022     EnsureProperties();
00023 }
00024
00025 void BreadcrumbBarProperties::EnsureProperties()
00026 {
00027     if (!s_ItemsSourceProperty)
00028     {
00029         s_ItemsSourceProperty =
00030             InitializeDependencyProperty(
00031                 L"ItemsSource",
00032                 winrt::name_of<winrt::IInspectable>(),
00033                 winrt::name_of<winrt::BreadcrumbBar>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00036                 winrt::PropertyChangedCallback(&OnItemsSourcePropertyChanged));
00037     }
00038     if (!s_ItemTemplateProperty)
00039     {
00040         s_ItemTemplateProperty =
00041             InitializeDependencyProperty(
00042                 L"ItemTemplate",
00043                 winrt::name_of<winrt::IInspectable>(),
00044                 winrt::name_of<winrt::BreadcrumbBar>(),
00045                 false /* isAttached */,
00046                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00047                 winrt::PropertyChangedCallback(&OnItemTemplatePropertyChanged));
00048     }
00049 }
00050
00051 void BreadcrumbBarProperties::ClearProperties()
00052 {
00053     s_ItemsSourceProperty = nullptr;
00054     s_ItemTemplateProperty = nullptr;
00055 }
00056
00057 void BreadcrumbBarProperties::OnItemsSourcePropertyChanged(
00058     winrt::DependencyObject const& sender,
00059     winrt::DependencyPropertyChangedEventArgs const& args)
00060 {
00061     auto owner = sender.as<winrt::BreadcrumbBar>();
00062     winrt::get_self<BreadcrumbBar>(owner)->OnPropertyChanged(args);
00063 }
00064
00065 void BreadcrumbBarProperties::OnItemTemplatePropertyChanged(
00066     winrt::DependencyObject const& sender,
00067     winrt::DependencyPropertyChangedEventArgs const& args)
00068 {
00069     auto owner = sender.as<winrt::BreadcrumbBar>();
00070     winrt::get_self<BreadcrumbBar>(owner)->OnPropertyChanged(args);
00071 }
00072
00073 void BreadcrumbBarProperties::ItemsSource(winrt::IInspectable const& value)
00074 {
00075     [[gsl::suppress(con)]]
00076     {
00077     static_cast<BreadcrumbBar*>(this)->SetValue(s_ItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00078     }
00079 }
00080
00081 winrt::IInspectable BreadcrumbBarProperties::ItemsSource()
00082 {
00083     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<BreadcrumbBar*>(this)->GetValue(s_ItemsSourceProperty));
00084 }
00085
00086 void BreadcrumbBarProperties::ItemTemplate(winrt::IInspectable const& value)
00087 {
00088     [[gsl::suppress(con)]]
00089     {
00090     static_cast<BreadcrumbBar*>(this)->SetValue(s_ItemTemplateProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00091     }
00092 }
00093
00094 winrt::IInspectable BreadcrumbBarProperties::ItemTemplate()
00095 {
00096     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<BreadcrumbBar*>(this)->GetValue(s_ItemTemplateProperty));
00097 }
00098
00099 winrt::event_token BreadcrumbBarProperties::ItemClicked(winrt::TypedEventHandler<winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs> const& value)
00100 {
00101     return m_itemClickedEventSource.add(value);
00102 }
00103
00104 void BreadcrumbBarProperties::ItemClicked(winrt::event_token const& token)
00105 {
00106     m_itemClickedEventSource.remove(token);
00107 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizationInfo.cpp Source File

  • File List
  • File Members
  • Repeater

VirtualizationInfo.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "VirtualizationInfo.h"
00008 #include "ItemsRepeater.h"
00009
00010 #ifdef DBG
00011 int VirtualizationInfo::s_logItemIndexDbg{ -1 };
00012 #endif // DBG
00013
00014 VirtualizationInfo::VirtualizationInfo()
00015     : m_arrangeBounds(ItemsRepeater::InvalidRect)
00016 { }
00017
00018 bool VirtualizationInfo::IsPinned() const
00019 {
00020     return m_pinCounter > 0u;
00021 }
00022
00023 bool VirtualizationInfo::IsHeldByLayout() const
00024 {
00025     return m_owner == ElementOwner::Layout;
00026 }
00027
00028 bool VirtualizationInfo::IsInPinnedPool() const
00029 {
00030     return m_owner == ElementOwner::PinnedPool;
00031 }
00032
00033 bool VirtualizationInfo::IsInUniqueIdResetPool() const
00034 {
00035     return m_owner == ElementOwner::UniqueIdResetPool;
00036 }
00037
00038 bool VirtualizationInfo::IsRealized() const
00039 {
00040     return IsHeldByLayout() || IsInPinnedPool();
00041 }
00042
00043 void VirtualizationInfo::UpdatePhasingInfo(int phase, const winrt::IInspectable& data, const winrt::IDataTemplateComponent& component)
00044 {
00045     m_phase = phase;
00046     m_data = winrt::make_weak(data);
00047     m_dataTemplateComponent = winrt::make_weak(component);
00048 }
00049
00050 #pragma region Ownership state machine
00051
00052 void VirtualizationInfo::MoveOwnershipToLayoutFromElementFactory(int index, wstring_view uniqueId)
00053 {
00054 #ifdef DBG
00055     if (m_index != index)
00056     {
00057         if (m_index != -1 && m_index == s_logItemIndexDbg)
00058         {
00059             ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Loses log index.", s_logItemIndexDbg);
00060         }
00061         else if (index != -1 && index == s_logItemIndexDbg)
00062         {
00063             ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Gains log index.", s_logItemIndexDbg);
00064         }
00065     }
00066 #endif // DBG
00067
00068     MUX_ASSERT(m_owner == ElementOwner::ElementFactory);
00069     m_owner = ElementOwner::Layout;
00070     m_index = index;
00071     m_uniqueId = uniqueId;
00072 }
00073
00074 void VirtualizationInfo::MoveOwnershipToLayoutFromUniqueIdResetPool()
00075 {
00076 #ifdef DBG
00077     if (m_index == s_logItemIndexDbg)
00078     {
00079         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00080         MUX_ASSERT(s_logItemIndexDbg != -1);
00081     }
00082 #endif // DBG
00083
00084     MUX_ASSERT(m_owner == ElementOwner::UniqueIdResetPool);
00085     m_owner = ElementOwner::Layout;
00086 }
00087
00088 void VirtualizationInfo::MoveOwnershipToLayoutFromPinnedPool()
00089 {
00090 #ifdef DBG
00091     if (m_index == s_logItemIndexDbg)
00092     {
00093         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00094         MUX_ASSERT(s_logItemIndexDbg != -1);
00095     }
00096 #endif // DBG
00097
00098     MUX_ASSERT(m_owner == ElementOwner::PinnedPool);
00099     MUX_ASSERT(IsPinned());
00100     m_owner = ElementOwner::Layout;
00101 }
00102
00103 void VirtualizationInfo::MoveOwnershipToElementFactory()
00104 {
00105 #ifdef DBG
00106     if (m_index == s_logItemIndexDbg && !(m_owner == ElementOwner::Animator && m_index == -1))
00107     {
00108         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00109         MUX_ASSERT(s_logItemIndexDbg != -1);
00110     }
00111 #endif // DBG
00112
00113     MUX_ASSERT(m_owner != ElementOwner::ElementFactory);
00114     m_owner = ElementOwner::ElementFactory;
00115     m_pinCounter = 0u;
00116     m_index = -1;
00117     m_uniqueId.clear();
00118     m_arrangeBounds = ItemsRepeater::InvalidRect;
00119 }
00120
00121 void VirtualizationInfo::MoveOwnershipToUniqueIdResetPoolFromLayout()
00122 {
00123 #ifdef DBG
00124     if (m_index == s_logItemIndexDbg)
00125     {
00126         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00127         MUX_ASSERT(s_logItemIndexDbg != -1);
00128     }
00129 #endif // DBG
00130
00131     MUX_ASSERT(m_owner == ElementOwner::Layout);
00132     m_owner = ElementOwner::UniqueIdResetPool;
00133     // Keep the pinCounter the same. If the container survives the reset
00134     // it can go on being pinned as if nothing happened.
00135 }
00136
00137 void VirtualizationInfo::MoveOwnershipToAnimator()
00138 {
00139 #ifdef DBG
00140     if (m_index == s_logItemIndexDbg)
00141     {
00142         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00143         MUX_ASSERT(s_logItemIndexDbg != -1);
00144     }
00145 #endif // DBG
00146
00147     // During a unique id reset, some elements might get removed.
00148     // Their ownership will go from the UniqueIdResetPool to the Animator.
00149     // The common path though is for ownership to go from Layout to Animator.
00150     MUX_ASSERT(m_owner == ElementOwner::Layout || m_owner == ElementOwner::UniqueIdResetPool);
00151     m_owner = ElementOwner::Animator;
00152     m_index = -1;
00153     m_pinCounter = 0u;
00154 }
00155
00156 void VirtualizationInfo::MoveOwnershipToPinnedPool()
00157 {
00158 #ifdef DBG
00159     if (m_index == s_logItemIndexDbg)
00160     {
00161         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00162         MUX_ASSERT(s_logItemIndexDbg != -1);
00163     }
00164 #endif // DBG
00165
00166     MUX_ASSERT(m_owner == ElementOwner::Layout);
00167     m_owner = ElementOwner::PinnedPool;
00168 }
00169
00170 #pragma endregion
00171
00172 unsigned VirtualizationInfo::AddPin()
00173 {
00174 #ifdef DBG
00175     if (m_index == s_logItemIndexDbg)
00176     {
00177         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00178         MUX_ASSERT(s_logItemIndexDbg != -1);
00179     }
00180 #endif // DBG
00181
00182     if (!IsRealized())
00183     {
00184         throw winrt::hresult_error(E_FAIL, L"You can't pin an unrealized element.");
00185     }
00186
00187     return ++m_pinCounter;
00188 }
00189
00190 unsigned VirtualizationInfo::RemovePin()
00191 {
00192 #ifdef DBG
00193     if (m_index == s_logItemIndexDbg)
00194     {
00195         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, s_logItemIndexDbg);
00196         MUX_ASSERT(s_logItemIndexDbg != -1);
00197     }
00198 #endif // DBG
00199
00200     if (!IsRealized())
00201     {
00202         throw winrt::hresult_error(E_FAIL, L"You can't unpin an unrealized element.");
00203     }
00204
00205     if (!IsPinned())
00206     {
00207         throw winrt::hresult_error(E_FAIL, L"UnpinElement was called more often than PinElement.");
00208     }
00209
00210     return --m_pinCounter;
00211 }
00212
00213 void VirtualizationInfo::UpdateIndex(int newIndex)
00214 {
00215 #ifdef DBG
00216     if (m_index != newIndex)
00217     {
00218         if (m_index != -1 && m_index == s_logItemIndexDbg)
00219         {
00220             ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Loses log index.", s_logItemIndexDbg);
00221         }
00222         else if (newIndex != -1 && newIndex == s_logItemIndexDbg)
00223         {
00224             ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Gains log index.", s_logItemIndexDbg);
00225         }
00226     }
00227 #endif // DBG
00228
00229     MUX_ASSERT(IsRealized());
00230     m_index = newIndex;
00231 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarItemAutomationPeer Member List

This is the complete list of members for BreadcrumbBarItemAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
BreadcrumbBarItemAutomationPeer(winrt::BreadcrumbBarItem const &owner) | BreadcrumbBarItemAutomationPeer |
CheckThread() | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< BreadcrumbBarItemAutomationPeer > &&self) noexcept | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
final_release(std::unique_ptr< BreadcrumbBarItemAutomationPeer > &&self) | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | BreadcrumbBarItemAutomationPeer |
GetBase() | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
GetClassNameCore() | BreadcrumbBarItemAutomationPeer |
GetImpl() | BreadcrumbBarItemAutomationPeer | [private]
GetInner() | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
GetLocalizedControlTypeCore() | BreadcrumbBarItemAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | BreadcrumbBarItemAutomationPeer |
Invoke() | BreadcrumbBarItemAutomationPeer |
IsOnThread() | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.idl Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedChevronUpDownSmallVisualSource.idl

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedChevronUpDownSmallVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedChevronUpDownSmallVisualSource.json (24992 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 namespace MU_XCAV_NAMESPACE
00022 {
00023     [MUX_PUBLIC]
00024     [webhosthidden]
00025     runtimeclass AnimatedChevronUpDownSmallVisualSource
00026         : [default] Microsoft.UI.Xaml.Controls.IAnimatedVisualSource, Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
00027     {
00028         AnimatedChevronUpDownSmallVisualSource();
00029     };
00030 }
Generated on Sun Dec 1 2024 20:51:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclingElementFactory.cpp Source File

  • File List
  • File Members
  • Repeater

RecyclingElementFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include <HashMap.h>
00008 #include "SelectTemplateEventArgs.h"
00009 #include "RecyclingElementFactory.h"
00010 #include "ItemsRepeater.h"
00011 #include "RecyclePool.h"
00012
00013 #include "RecyclingElementFactory.properties.cpp"
00014
00015 RecyclingElementFactory::RecyclingElementFactory()
00016 {
00017     m_templates.set(winrt::make<HashMap<winrt::hstring, winrt::DataTemplate>>());
00018 }
00019
00020 #pragma region IRecyclingElementFactory
00021
00022 winrt::RecyclePool RecyclingElementFactory::RecyclePool()
00023 {
00024     return m_recyclePool.get();
00025 }
00026
00027 void RecyclingElementFactory::RecyclePool(winrt::RecyclePool const& value)
00028 {
00029     m_recyclePool.set(value);
00030 }
00031
00032 winrt::IMap<winrt::hstring, winrt::DataTemplate> RecyclingElementFactory::Templates()
00033 {
00034     return m_templates.get();
00035 }
00036
00037 void RecyclingElementFactory::Templates(winrt::IMap<winrt::hstring, winrt::DataTemplate> const& value)
00038 {
00039     m_templates.set(value);
00040 }
00041
00042 #pragma endregion
00043
00044 #pragma region IRecyclingElementFactoryOverrides
00045
00046 winrt::hstring RecyclingElementFactory::OnSelectTemplateKeyCore(
00047     winrt::IInspectable const& dataContext,
00048     winrt::UIElement const& owner)
00049 {
00050     if (!m_args)
00051     {
00052         m_args.set(winrt::make<SelectTemplateEventArgs>());
00053     }
00054
00055     auto args = winrt::get_self<SelectTemplateEventArgs>(m_args.get());
00056     args->TemplateKey({});
00057     args->DataContext(dataContext);
00058     args->Owner(owner);
00059
00060     m_selectTemplateKeyEventSource(*this, *args);
00061
00062     auto templateKey = args->TemplateKey();
00063     if (templateKey.empty())
00064     {
00065         throw winrt::hresult_error(E_FAIL, L"Please provide a valid template identifier in the handler for the SelectTemplateKey event.");
00066     }
00067
00068     return templateKey;
00069 }
00070
00071 #pragma endregion
00072
00073 #pragma region IElementFactoryOverrides
00074
00075 winrt::UIElement RecyclingElementFactory::GetElementCore(winrt::ElementFactoryGetArgs const& args)
00076 {
00077     if (!m_templates || m_templates.get().Size() == 0)
00078     {
00079         throw winrt::hresult_error(E_FAIL, L"Templates property cannot be null or empty.");
00080     }
00081
00082     const auto winrtOwner = args.Parent();
00083     const auto templateKey =
00084         m_templates.get().Size() == 1 ?
00085         m_templates.get().First().Current().Key() :
00086         OnSelectTemplateKeyCore(args.Data(), winrtOwner);
00087
00088     if (templateKey.empty())
00089     {
00090         // Note: We could allow null/whitespace, which would work as long as
00091         // the recycle pool is not shared. in order to make this work in all cases
00092         // currently we validate that a valid template key is provided.
00093         throw winrt::hresult_error(E_FAIL, L"Template key cannot be empty or null.");
00094     }
00095
00096     // Get an element from the Recycle Pool or create one
00097     auto element = m_recyclePool.get().TryGetElement(templateKey, winrtOwner).as<winrt::FrameworkElement>();
00098
00099     if (!element)
00100     {
00101         // No need to call HasKey if there is only one template.
00102         if (m_templates.get().Size() > 1 && !m_templates.get().HasKey(templateKey))
00103         {
00104             std::wstring message = L"No templates of key " + std::wstring(templateKey.data()) + L" were found in the templates collection.";
00105             throw winrt::hresult_error(E_FAIL, message.c_str());
00106         }
00107
00108         auto dataTemplate = m_templates.get().Lookup(templateKey);
00109         element = dataTemplate.LoadContent().as<winrt::FrameworkElement>();
00110
00111         // Associate ReuseKey with element
00112         RecyclePool::SetReuseKey(element, templateKey);
00113     }
00114
00115     return element;
00116 }
00117
00118 void RecyclingElementFactory::RecycleElementCore(winrt::ElementFactoryRecycleArgs const& args)
00119 {
00120     auto element = args.Element();
00121     auto key = RecyclePool::GetReuseKey(element);
00122     m_recyclePool.get().PutElement(element, key, args.Parent());
00123 }
00124
00125 #pragma endregion
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

ActivityFeedLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Diagnostics;
00007 using Windows.Foundation;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010
00011 namespace MUXControlsTestApp.Samples
00012 {
00013     /// <summary>
00014     ///  This is a custom layout that displays elements in two different sizes
00015     ///  wide (w) and narrow (n). There are two types of rows
00016     ///  odd rows - narrow narrow wide
00017     ///  even rows - wide narrow narrow
00018     ///  This pattern repeats.
00019     /// </summary>
00020     public class ActivityFeedLayout : VirtualizingLayout
00021     {
00022         #region Layout parameters
00023
00024         public double RowSpacing
00025         {
00026             get { return _rowSpacing; }
00027             set { SetValue(RowSpacingProperty, value); }
00028         }
00029
00030         public static readonly DependencyProperty RowSpacingProperty =
00031             DependencyProperty.Register("RowSpacing", typeof(double), typeof(ActivityFeedLayout), new PropertyMetadata(0, OnPropertyChanged));
00032
00033         public double ItemSpacing
00034         {
00035             get { return _itemSpacing; }
00036             set { SetValue(ItemSpacingProperty, value); }
00037         }
00038
00039         public static readonly DependencyProperty ItemSpacingProperty =
00040             DependencyProperty.Register("ItemSpacing", typeof(double), typeof(ActivityFeedLayout), new PropertyMetadata(0, OnPropertyChanged));
00041
00042         public Size MinItemSize
00043         {
00044             get { return _minItemSize; }
00045             set { SetValue(MinItemSizeProperty, value); }
00046         }
00047
00048         public static readonly DependencyProperty MinItemSizeProperty =
00049             DependencyProperty.Register("MinItemSize", typeof(Size), typeof(ActivityFeedLayout), new PropertyMetadata(0, OnPropertyChanged));
00050
00051         #endregion
00052
00053         #region Setup / teardown
00054
00055         protected override void InitializeForContextCore(VirtualizingLayoutContext context)
00056         {
00057             base.InitializeForContextCore(context);
00058
00059             var state = context.LayoutState as ActivityFeedLayoutState;
00060             if (state == null)
00061             {
00062                 // Store any state we might need since (in theory) the layout could be in use by multiple elements simultaneously
00063                 // In reality for the Xbox Activity Feed there's probably only a single instance.
00064                 context.LayoutState = new ActivityFeedLayoutState();
00065             }
00066         }
00067
00068         protected override void UninitializeForContextCore(VirtualizingLayoutContext context)
00069         {
00070             base.UninitializeForContextCore(context);
00071
00072             // clear any state
00073             context.LayoutState = null;
00074         }
00075
00076         #endregion
00077
00078         #region Layout
00079
00080         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00081         {
00082             // In the Xbox scenario there isn't a user grabbing the window and resizing it.  Otherwise, it
00083             // might be useful to skip a full layout here and return a cached size until some condition is met
00084             // such as having enough room to fit another column.  That would require extra work like
00085             // tracking some additional state, comparing the virtualizing rect with the cached value.
00086             var virtualizingContext = context as VirtualizingLayoutContext;
00087             var realizationRect = virtualizingContext.RealizationRect;
00088
00089             // Determine which rows need to be realized
00090             var firstRowIndex = Math.Max((int)(realizationRect.Y / (this.MinItemSize.Height + this.RowSpacing)) - 1, 0);
00091             var lastRowIndex = Math.Min((int)(realizationRect.Bottom / (this.MinItemSize.Height + this.RowSpacing)) + 1, (int)(context.ItemCount / 3));
00092
00093             // Determine which items fall on those rows and determine the rect for each item
00094             var state = context.LayoutState as ActivityFeedLayoutState;
00095             state.LayoutRects.Clear();
00096             state.FirstRealizedIndex = firstRowIndex * 3;
00097
00098             for (int rowIndex = firstRowIndex; rowIndex < lastRowIndex; rowIndex++)
00099             {
00100                 int firstItemIndex = rowIndex * 3;
00101                 var boundsForCurrentRow = CalculateLayoutBoundsForRow(rowIndex);
00102
00103                 for (int columnIndex = 0; columnIndex < 3; columnIndex++)
00104                 {
00105                     var index = firstItemIndex + columnIndex;
00106                     var rect = boundsForCurrentRow[index % 3];
00107                     var container = virtualizingContext.GetOrCreateElementAt(index);
00108                     container.Measure(new Size(boundsForCurrentRow[columnIndex].Width, boundsForCurrentRow[columnIndex].Height));
00109                     state.LayoutRects.Add(boundsForCurrentRow[columnIndex]);
00110                 }
00111             }
00112
00113             // estimate the extent by finding the last item and getting its bottom/right position
00114             var extentHeight = ((int)(context.ItemCount / 3) - 1) * (this.MinItemSize.Height + this.RowSpacing) + this.MinItemSize.Height;
00115
00116             // Report a desired size for the layout
00117             return new Size(this.MinItemSize.Width * 4 + this.ItemSpacing * 2, extentHeight);
00118         }
00119
00120         protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00121         {
00122             Debug.WriteLine("ActivityFeedLayout.ArrangeOverride:");
00123             // walk through the cache of containers and arrange
00124             var state = context.LayoutState as ActivityFeedLayoutState;
00125             var virtualContext = context as VirtualizingLayoutContext;
00126             int currentIndex = state.FirstRealizedIndex;
00127             foreach(var arrangeRect in state.LayoutRects)
00128             {
00129                 Debug.WriteLine("ActivityFeedLayout.ArrangeOverride  Arranging " + currentIndex + " at " + arrangeRect);
00130                 var container = virtualContext.GetOrCreateElementAt(currentIndex);
00131                 container.Arrange(arrangeRect);
00132                 currentIndex++;
00133             }
00134
00135             return finalSize;
00136         }
00137
00138         #endregion
00139
00140         private Rect[] CalculateLayoutBoundsForRow(int rowIndex)
00141         {
00142             var boundsForRow = new Rect[3];
00143
00144             var yoffset = rowIndex * (this.MinItemSize.Height + this.RowSpacing);
00145             boundsForRow[0].Y = boundsForRow[1].Y = boundsForRow[2].Y = yoffset;
00146             boundsForRow[0].Height = boundsForRow[1].Height = boundsForRow[2].Height = this.MinItemSize.Height;
00147
00148             if (rowIndex % 2 == 0)
00149             {
00150                 // Left tile (narrow)
00151                 boundsForRow[0].X = 0;
00152                 boundsForRow[0].Width = this.MinItemSize.Width;
00153                 // Middle tile (narrow)
00154                 boundsForRow[1].X = boundsForRow[0].Right + this.ItemSpacing;
00155                 boundsForRow[1].Width = this.MinItemSize.Width;
00156                 // Right tile (wide)
00157                 boundsForRow[2].X = boundsForRow[1].Right + this.ItemSpacing;
00158                 boundsForRow[2].Width = this.MinItemSize.Width * 2 + this.ItemSpacing;
00159             }
00160             else
00161             {
00162                 // Left tile (wide)
00163                 boundsForRow[0].X = 0;
00164                 boundsForRow[0].Width = (this.MinItemSize.Width * 2 + this.ItemSpacing);
00165                 // Middle tile (narrow)
00166                 boundsForRow[1].X = boundsForRow[0].Right + this.ItemSpacing;
00167                 boundsForRow[1].Width = this.MinItemSize.Width;
00168                 // Right tile (narrow)
00169                 boundsForRow[2].X = boundsForRow[1].Right + this.ItemSpacing;
00170                 boundsForRow[2].Width = this.MinItemSize.Width;
00171             }
00172
00173             return boundsForRow;
00174         }
00175
00176         private static void OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
00177         {
00178             var layout = obj as ActivityFeedLayout;
00179             if (args.Property == RowSpacingProperty)
00180             {
00181                 layout._rowSpacing = (double)args.NewValue;
00182             }
00183             else if (args.Property == ItemSpacingProperty)
00184             {
00185                 layout._itemSpacing = (double)args.NewValue;
00186             }
00187             else if (args.Property == MinItemSizeProperty)
00188             {
00189                 layout._minItemSize = (Size)args.NewValue;
00190             }
00191             else
00192             {
00193                 throw new InvalidOperationException("Don't know what you are talking about !");
00194             }
00195
00196             layout.InvalidateMeasure();
00197         }
00198
00199         // Cached copy of dependency properties so that we do not have to do GetValue in the host path during
00200         // layout. This can be quite expensive due to the number of times we end up calling these.
00201         private double _rowSpacing;
00202         private double _itemSpacing;
00203         private Size _minItemSize;
00204     }
00205
00206     internal class ActivityFeedLayoutState
00207     {
00208         public int FirstRealizedIndex { get; set; }
00209         /// <summary>
00210         /// List of indicies and their layout bounds.
00211         /// </summary>
00212         public List<Rect> LayoutRects
00213         {
00214             get
00215             {
00216                 if(_layoutRects == null)
00217                 {
00218                     _layoutRects = new List<Rect>();
00219                 }
00220
00221                 return _layoutRects;
00222             }
00223         }
00224
00225         private List<Rect> _layoutRects;
00226     }
00227 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlMetadataProvider Member List

This is the complete list of members for XamlMetadataProvider, including all inherited members.
ClearTypes() | XamlMetadataProvider | [static]
GetXamlType(winrt::TypeName const &type) | XamlMetadataProvider |
GetXamlType(winrt::hstring const &fullName) | XamlMetadataProvider |
GetXmlnsDefinitions() | XamlMetadataProvider |
Initialize() | XamlMetadataProvider | [static]
LookupXamlType(const wstring_view &typeName) | XamlMetadataProvider | [static]
s_typeEntriesMutex | XamlMetadataProvider | [private, static]
XamlMetadataProvider() | XamlMetadataProvider |
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PointDiffuseEffect Member List

This is the complete list of members for PointDiffuseEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1PointDiffuse) | PointDiffuseEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"LightPosition", D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"DiffuseAmount", D2D1_POINTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_POINTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_POINTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_POINTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_POINTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},) | PointDiffuseEffect |
DECLARE_POD_PROPERTY(LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true) | PointDiffuseEffect |
DECLARE_POD_PROPERTY(DiffuseAmount, float, 1.0f, value >=0.0f &&value<=10000.0f) | PointDiffuseEffect |
DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | PointDiffuseEffect |
DECLARE_POD_PROPERTY(LightColor, UIColor,(UIColor{255, 255, 255, 255}), true) | PointDiffuseEffect |
DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f) | PointDiffuseEffect |
DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true) | PointDiffuseEffect |
DECLARE_SINGLE_SOURCE(Source) | PointDiffuseEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | PointDiffuseEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | PointDiffuseEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButton.properties.h Source File

  • File List
  • File Members
  • Generated

SplitButton.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class SplitButtonProperties
00008 {
00009 public:
00010     SplitButtonProperties();
00011
00012     void Command(winrt::ICommand const& value);
00013     winrt::ICommand Command();
00014
00015     void CommandParameter(winrt::IInspectable const& value);
00016     winrt::IInspectable CommandParameter();
00017
00018     void Flyout(winrt::FlyoutBase const& value);
00019     winrt::FlyoutBase Flyout();
00020
00021     static winrt::DependencyProperty CommandProperty() { return s_CommandProperty; }
00022     static winrt::DependencyProperty CommandParameterProperty() { return s_CommandParameterProperty; }
00023     static winrt::DependencyProperty FlyoutProperty() { return s_FlyoutProperty; }
00024
00025     static GlobalDependencyProperty s_CommandProperty;
00026     static GlobalDependencyProperty s_CommandParameterProperty;
00027     static GlobalDependencyProperty s_FlyoutProperty;
00028
00029     winrt::event_token Click(winrt::TypedEventHandler<winrt::SplitButton, winrt::SplitButtonClickEventArgs> const& value);
00030     void Click(winrt::event_token const& token);
00031
00032     event_source<winrt::TypedEventHandler<winrt::SplitButton, winrt::SplitButtonClickEventArgs>> m_clickEventSource;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036
00037     static void OnCommandPropertyChanged(
00038         winrt::DependencyObject const& sender,
00039         winrt::DependencyPropertyChangedEventArgs const& args);
00040
00041     static void OnCommandParameterPropertyChanged(
00042         winrt::DependencyObject const& sender,
00043         winrt::DependencyPropertyChangedEventArgs const& args);
00044
00045     static void OnFlyoutPropertyChanged(
00046         winrt::DependencyObject const& sender,
00047         winrt::DependencyPropertyChangedEventArgs const& args);
00048 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarToolButton.properties.h Source File

  • File List
  • File Members
  • Generated

InkToolBarToolButton.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class InkToolBarToolButtonProperties
00008 {
00009 public:
00010     InkToolBarToolButtonProperties();
00011
00012     void IsExtensionGlyphShown(bool value);
00013     bool IsExtensionGlyphShown();
00014
00015     static winrt::DependencyProperty IsExtensionGlyphShownProperty() { return s_IsExtensionGlyphShownProperty; }
00016
00017     static GlobalDependencyProperty s_IsExtensionGlyphShownProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PointSpecularEffect Member List

This is the complete list of members for PointSpecularEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1PointSpecular) | PointSpecularEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"LightPosition", D2D1_POINTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"SpecularExponent", D2D1_POINTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"SpecularAmount", D2D1_POINTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_POINTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_POINTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_POINTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_POINTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},) | PointSpecularEffect |
DECLARE_POD_PROPERTY(LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true) | PointSpecularEffect |
DECLARE_POD_PROPERTY(SpecularExponent, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | PointSpecularEffect |
DECLARE_POD_PROPERTY(SpecularAmount, float, 1.0f, value >=0.0f &&value<=10000.0f) | PointSpecularEffect |
DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | PointSpecularEffect |
DECLARE_POD_PROPERTY(LightColor, UIColor,(UIColor{255, 255, 255, 255}), true) | PointSpecularEffect |
DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f) | PointSpecularEffect |
DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true) | PointSpecularEffect |
DECLARE_SINGLE_SOURCE(Source) | PointSpecularEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | PointSpecularEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | PointSpecularEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/RadialGradientBrush.idl Source File

  • File List
  • File Members
  • RadialGradientBrush

RadialGradientBrush.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XM_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [contentproperty("GradientStops")]
00007 unsealed runtimeclass RadialGradientBrush : Microsoft.UI.Xaml.Media.XamlCompositionBrushBase
00008 {
00009     RadialGradientBrush();
00010
00011     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00012     [MUX_DEFAULT_VALUE("winrt::Point(0.5,0.5)")]
00013     Windows.Foundation.Point Center { get; set; };
00014
00015     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00016     [MUX_DEFAULT_VALUE("0.5")]
00017     Double RadiusX { get; set; };
00018
00019     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00020     [MUX_DEFAULT_VALUE("0.5")]
00021     Double RadiusY { get; set; };
00022
00023     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00024     [MUX_DEFAULT_VALUE("winrt::Point(0.5,0.5)")]
00025     Windows.Foundation.Point GradientOrigin { get; set; };
00026
00027     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00028     [MUX_DEFAULT_VALUE("winrt::BrushMappingMode::RelativeToBoundingBox")]
00029     Microsoft.UI.Xaml.Media.BrushMappingMode MappingMode { get; set; };
00030
00031     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00032     [MUX_DEFAULT_VALUE("winrt::Microsoft::UI::Composition::CompositionColorSpace::Auto")]
00033     Microsoft.UI.Composition.CompositionColorSpace InterpolationSpace { get; set; };
00034
00035     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00036     [MUX_DEFAULT_VALUE("winrt::GradientSpreadMethod::Pad")]
00037     Microsoft.UI.Xaml.Media.GradientSpreadMethod SpreadMethod { get; set; };
00038
00039     Windows.Foundation.Collections.IObservableVector<Microsoft.UI.Xaml.Media.GradientStop> GradientStops { get; };
00040
00041     static Microsoft.UI.Xaml.DependencyProperty CenterProperty { get; };
00042     static Microsoft.UI.Xaml.DependencyProperty RadiusXProperty { get; };
00043     static Microsoft.UI.Xaml.DependencyProperty RadiusYProperty{ get; };
00044     static Microsoft.UI.Xaml.DependencyProperty GradientOriginProperty { get; };
00045     static Microsoft.UI.Xaml.DependencyProperty InterpolationSpaceProperty { get; };
00046     static Microsoft.UI.Xaml.DependencyProperty MappingModeProperty { get; };
00047     static Microsoft.UI.Xaml.DependencyProperty SpreadMethodProperty { get; };
00048 }
00049
00050 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollingAnchorRequestedEventArgs Member List

This is the complete list of members for ScrollingAnchorRequestedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
AnchorCandidates() | ScrollingAnchorRequestedEventArgs |
AnchorElement() | ScrollingAnchorRequestedEventArgs |
AnchorElement(winrt::UIElement const &value) | ScrollingAnchorRequestedEventArgs |
CheckThread() | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ScrollingAnchorRequestedEventArgs > &&self) noexcept | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< ScrollingAnchorRequestedEventArgs > &&self) | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetAnchorCandidates() | ScrollingAnchorRequestedEventArgs |
GetAnchorElement() const | ScrollingAnchorRequestedEventArgs |
GetBase() | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
IsOnThread() | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
ScrollingAnchorRequestedEventArgs(const winrt::ScrollPresenter &scrollPresenter) | ScrollingAnchorRequestedEventArgs |
SetAnchorCandidates(const std::vector< tracker_ref< winrt::UIElement >> &anchorCandidates) | ScrollingAnchorRequestedEventArgs |
SetAnchorElement(const winrt::UIElement &anchorElement) | ScrollingAnchorRequestedEventArgs |
~ScrollingAnchorRequestedEventArgs() | ScrollingAnchorRequestedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColumnMajorUniformToLargestGridLayout.properties.h Source File

  • File List
  • File Members
  • Generated

ColumnMajorUniformToLargestGridLayout.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ColumnMajorUniformToLargestGridLayoutProperties
00008 {
00009 public:
00010     ColumnMajorUniformToLargestGridLayoutProperties();
00011
00012     void ColumnSpacing(double value);
00013     double ColumnSpacing();
00014
00015     void MaxColumns(int value);
00016     int MaxColumns();
00017
00018     void RowSpacing(double value);
00019     double RowSpacing();
00020
00021     static winrt::DependencyProperty ColumnSpacingProperty() { return s_ColumnSpacingProperty; }
00022     static winrt::DependencyProperty MaxColumnsProperty() { return s_MaxColumnsProperty; }
00023     static winrt::DependencyProperty RowSpacingProperty() { return s_RowSpacingProperty; }
00024
00025     static GlobalDependencyProperty s_ColumnSpacingProperty;
00026     static GlobalDependencyProperty s_MaxColumnsProperty;
00027     static GlobalDependencyProperty s_RowSpacingProperty;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031
00032     static void OnColumnSpacingPropertyChanged(
00033         winrt::DependencyObject const& sender,
00034         winrt::DependencyPropertyChangedEventArgs const& args);
00035
00036     static void OnMaxColumnsPropertyChanged(
00037         winrt::DependencyObject const& sender,
00038         winrt::DependencyPropertyChangedEventArgs const& args);
00039
00040     static void OnRowSpacingPropertyChanged(
00041         winrt::DependencyObject const& sender,
00042         winrt::DependencyPropertyChangedEventArgs const& args);
00043 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterDynamicPage::QueuedOperation Member List

This is the complete list of members for ScrollPresenterDynamicPage::QueuedOperation, including all inherited members.
DoubleValue | ScrollPresenterDynamicPage::QueuedOperation |
QueuedOperation(QueuedOperationType type, double value) | ScrollPresenterDynamicPage::QueuedOperation | [inline]
QueuedOperation(QueuedOperationType type, string value) | ScrollPresenterDynamicPage::QueuedOperation | [inline]
StringValue | ScrollPresenterDynamicPage::QueuedOperation |
Type | ScrollPresenterDynamicPage::QueuedOperation |
Generated on Sun Dec 1 2024 20:54:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBoxTests Member List

This is the complete list of members for NumberBoxTests, including all inherited members.
BasicExpressionTest() | NumberBoxTests | [inline]
BasicKeyboardTest() | NumberBoxTests | [inline]
Check(string checkboxName) | NumberBoxTests | [inline, private]
ClassInitialize(TestContext testContext) | NumberBoxTests | [inline, static]
CustomFormatterTest() | NumberBoxTests | [inline]
EnterText(RangeValueSpinner numBox, string text, bool pressEnter=true) | NumberBoxTests | [inline, private]
FindButton(UIObject parent, string buttonName) | NumberBoxTests | [inline, private]
FindTextBox(UIObject parent) | NumberBoxTests | [inline, private]
GamepadTest() | NumberBoxTests | [inline]
MinMaxTest() | NumberBoxTests | [inline]
ScrollTest() | NumberBoxTests | [inline]
TestCleanup() | NumberBoxTests | [inline]
Uncheck(string checkboxName) | NumberBoxTests | [inline, private]
UpDownEnabledTest() | NumberBoxTests | [inline]
UpDownTest() | NumberBoxTests | [inline]
ValidationDisabledTest() | NumberBoxTests | [inline]
ValueChangedTest() | NumberBoxTests | [inline]
ValueTextTest() | NumberBoxTests | [inline]
VerifyAxeScanPasses() | NumberBoxTests | [inline]
VerifyNumberBoxHeaderBehavior() | NumberBoxTests | [inline]
VerifyRightClickForContextMenuDoesNotDeselectText() | NumberBoxTests | [inline]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AutoSuggestBoxTests Member List

This is the complete list of members for AutoSuggestBoxTests, including all inherited members.
SetupAutoSuggestBox() | AutoSuggestBoxTests | [inline, private]
VerifyAutoSuggestBoxCornerRadius() | AutoSuggestBoxTests | [inline]
VerifyVisualTree() | AutoSuggestBoxTests | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioSecondaryView.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealScenarioSecondaryView.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using Windows.UI.ViewManagement;
00006 using Microsoft.UI.Xaml;
00007 using System.Runtime.InteropServices;
00008 using Windows.UI.Core;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class RevealScenarioSecondaryView : TestPage
00013     {
00014         public RevealScenarioSecondaryView()
00015         {
00016             this.InitializeComponent();
00017         }
00018
00019         private async void CreateNewView(object sender, RoutedEventArgs e)
00020         {
00021             var newView = await ViewHelper.MakeSecondaryViewFromUIThread(() =>
00022             {
00023                 var frame = new TestFrame(typeof(MainPage));
00024                 frame.NavigateWithoutAnimation(typeof(RevealScenarios));
00025                 Window secondaryWindow = App.CurrentWindow;
00026
00027                 secondaryWindow.Content = frame;
00028
00029                 if (CoreWindow.GetForCurrentThread() != null)
00030                 {
00031                     try
00032                     {
00033                         ApplicationView.GetForCurrentView().Consolidated += (consolidatedSender, args) =>
00034                         {
00035                             secondaryWindow.Close();
00036                         };
00037                     }
00038                     catch (COMException)
00039                     {
00040                         // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
00041                     }
00042                 }
00043             });
00044         }
00045     }
00046 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeItems Member List

This is the complete list of members for SwipeItems, including all inherited members.
abi_enter() | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
Append(winrt::SwipeItem const &value) | SwipeItems |
CheckThread() | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
Clear() | SwipeItems |
ClearProperties() | SwipeItemsProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< SwipeItems > &&self) noexcept | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline, static]
EnsureProperties() | SwipeItemsProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
final_release(std::unique_ptr< SwipeItems > &&self) | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline, static]
First() | SwipeItems | [inline]
GetAt(uint32_t index) | SwipeItems |
GetBase() | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
GetInner() | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
GetMany(uint32_t startIndex, winrt::array_view< winrt::SwipeItem > items) | SwipeItems | [inline]
GetView() | SwipeItems |
IndexOf(winrt::SwipeItem const &value, uint32_t &index) | SwipeItems |
InsertAt(uint32_t index, winrt::SwipeItem const &value) | SwipeItems |
IsOnThread() | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
Mode(winrt::SwipeMode const &value) | SwipeItemsProperties |
Mode() | SwipeItemsProperties |
ModeProperty() | SwipeItemsProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
OnModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemsProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | SwipeItems |
put_Items(const winrt::Collections::IVector< winrt::SwipeItem > &value) | SwipeItems | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector< winrt::SwipeItem > > | [inline]
RemoveAt(uint32_t index) | SwipeItems |
RemoveAtEnd() | SwipeItems |
ReplaceAll(winrt::array_view< winrt::SwipeItem const > items) | SwipeItems | [inline]
s_ModeProperty | SwipeItemsProperties | [static]
SetAt(uint32_t index, winrt::SwipeItem const &value) | SwipeItems |
Size() | SwipeItems |
SwipeItems() | SwipeItems |
SwipeItemsProperties() | SwipeItemsProperties |
VectorChanged(winrt::VectorChangedEventHandler< winrt::SwipeItem > const &handler) | SwipeItems |
VectorChanged(winrt::event_token const token) | SwipeItems |
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Square Member List

This is the complete list of members for Square, including all inherited members.
Color | Square
Name | Square
Width | Square
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewTestHooksHelper Member List

This is the complete list of members for ScrollViewTestHooksHelper, including all inherited members.
AutoHideScrollControllers | ScrollViewTestHooksHelper |
Dispose() | ScrollViewTestHooksHelper | [inline]
ScrollView | ScrollViewTestHooksHelper |
ScrollViewTestHooksHelper(ScrollView scrollView, bool?autoHideScrollControllers=null) | ScrollViewTestHooksHelper | [inline]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewTrace Member List

This is the complete list of members for ItemsViewTrace, including all inherited members.
s_IsDebugOutputEnabled | ItemsViewTrace | [static]
s_IsVerboseDebugOutputEnabled | ItemsViewTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ItemsViewTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | ItemsViewTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ItemsViewTrace | [inline, static]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IPremultiplyEffect Member List

This is the complete list of members for IPremultiplyEffect, including all inherited members.
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IPremultiplyEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IPremultiplyEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshContainerOnImagePage Member List

This is the complete list of members for RefreshContainerOnImagePage, including all inherited members.
AdaptButton_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
AddOrRemoveRefreshDelayButton_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
ChangeAlignmentButton_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
ChangeRefreshRequestedButton_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
containerHasHandler | RefreshContainerOnImagePage | [private]
delayRefresh | RefreshContainerOnImagePage | [private]
OnMainPageLoaded(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | RefreshContainerOnImagePage | [inline, protected]
RefreshCompletionDeferral | RefreshContainerOnImagePage | [private]
RefreshContainer_RefreshRequested(object sender, RefreshRequestedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
RefreshContainerOnImagePage() | RefreshContainerOnImagePage | [inline]
refreshCount | RefreshContainerOnImagePage | [private]
RefreshInfoProvider_InteractionRatioChanged(IRefreshInfoProvider sender, RefreshInteractionRatioChangedEventArgs args) | RefreshContainerOnImagePage | [inline, private]
RefreshOnContainerButton_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
RefreshOnVisualizerButton_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
RefreshVisualizer_RefreshRequested(object sender, RefreshRequestedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
RefreshVisualizer_RefreshStateChanged(RefreshVisualizer sender, RefreshStateChangedEventArgs args) | RefreshContainerOnImagePage | [inline, private]
RefreshVisualizer_SizeChanged(object sender, SizeChangedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
ResetInteractionRatios_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
ResetInteractionRatiosComboBox() | RefreshContainerOnImagePage | [inline, private]
ResetStates_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
ResetStatesComboBox() | RefreshContainerOnImagePage | [inline, private]
RotateButton_Click(object sender, RoutedEventArgs e) | RefreshContainerOnImagePage | [inline, private]
timer | RefreshContainerOnImagePage | [private]
Timer_Tick(object sender, object e) | RefreshContainerOnImagePage | [inline, private]
UpdateInteractionRatiosComboBox(double interactionRatio) | RefreshContainerOnImagePage | [inline, private]
UpdateStatesComboBox(RefreshVisualizerState state) | RefreshContainerOnImagePage | [inline, private]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItemAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

MenuBarItemAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MenuBarItemAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(MenuBarItemAutomationPeer)
00012 }
00013
00014 #include "MenuBarItemAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ContentDialogPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ContentDialogPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.UI;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     [TopLevelTestPage(Name = "ContentDialog")]
00012     public sealed partial class ContentDialogPage : TestPage
00013     {
00014         public ContentDialogPage()
00015         {
00016             this.InitializeComponent();
00017         }
00018
00019         private void ShowDialog_Click(object sender, RoutedEventArgs e)
00020         {
00021             var contentDialog = CreateContentDialog();
00022             contentDialog.XamlRoot = this.XamlRoot;
00023             _ = contentDialog.ShowAsync();
00024         }
00025
00026         private void ShowBorderThickness_Click(object sender, RoutedEventArgs e)
00027         {
00028             var dialog = new ContentDialog {
00029                 Title = "Title",
00030                 Content = "I am testing border thickness",
00031                 IsPrimaryButtonEnabled = true,
00032                 BorderThickness = new Thickness(10, 20, 10, 20),
00033                 CloseButtonText = "CloseButton",
00034                 BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0)),
00035             };
00036             dialog.XamlRoot = this.XamlRoot;
00037             _ = CreateContentDialog().ShowAsync();
00038         }
00039
00040         private void ShowInPlaceDialog_Click(object sender, RoutedEventArgs e)
00041         {
00042             var contentDialog = CreateContentDialog();
00043             MainPanel.Children.Add(contentDialog);
00044             _ = contentDialog.ShowAsync();
00045         }
00046
00047         private static ContentDialog CreateContentDialog()
00048         {
00049             return new ContentDialog
00050             {
00051                 Title = "Title",
00052                 Content = "Content",
00053                 IsPrimaryButtonEnabled = true,
00054                 PrimaryButtonText = "PrimaryButton",
00055                 SecondaryButtonText = "SecondaryButton",
00056                 CloseButtonText = "CloseButton"
00057             };
00058         }
00059     }
00060 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/SplitDataSourceBase.h Source File

  • File List
  • File Members
  • NavigationView

SplitDataSourceBase.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "Vector.h"
00007
00008 // The same copy of .Net Collections like C# ObservableCollection<string> data is splitted into multiple Vectors.
00009 // For example, the raw data is:  Homes Apps Music | Microsoft Development
00010 // raw Data SplitDataSource is splitted into 3 ObservableVector which is owned by SplitVector:
00011 //  A: Home
00012 //  B: Apps Music Microsoft Development
00013 //  C: |
00014 // A flag vector is used to indicate which Vector the item belongs to and the flag vector is the same length with raw data.
00015 // so raw data: Homes Apps Music | Microsoft Development
00016 // flag vector:   A    B    B    C   B         B
00017 //  We never Add/Delete A,B and C Vector directly, but change the flag.
00018 //  If flag for Homes is changed from A to B, it asks A to remove it by indexInRawData first, then insert the new data to B vector with indexInRawData
00019 // SplitVector itself maintained the mapping between indexInRawData and indexInSplitVector.
00020 template<typename T, typename SplitVectorID>
00021 class SplitVector
00022 {
00023 public:
00024     SplitVector(const ITrackerHandleManager* owner, typename SplitVectorID id, std::function<int(typename T const& value)> indexOfFunction)
00025         :m_vectorID(id)
00026         , m_vector(owner)
00027     {
00028         m_indexFunctionFromDataSource = indexOfFunction;
00029
00030         m_vector.set(winrt::make<Vector<T, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()>>(
00031             [this](const T& value)
00032                {
00033                     return IndexOf(value);
00034                }));
00035     }
00036
00037     SplitVectorID GetVectorIDForItem() { return m_vectorID; }
00038
00039     winrt::IVector<winrt::IInspectable> GetVector() { return m_vector.get(); }
00040
00041     void OnRawDataRemove(int indexInOriginalVector, SplitVectorID vectorID)
00042     {
00043         if (m_vectorID == vectorID)
00044         {
00045             RemoveAt(indexInOriginalVector);
00046         }
00047
00048         for (auto& v : m_indexesInOriginalVector)
00049         {
00050             if (v > indexInOriginalVector)
00051             {
00052                 v--;
00053             }
00054         };
00055
00056     }
00057
00058     void OnRawDataInsert(int preferIndex, int indexInOriginalVector, typename T const& value, SplitVectorID vectorID)
00059     {
00060         for (auto& v : m_indexesInOriginalVector)
00061         {
00062             if (v >= indexInOriginalVector)
00063             {
00064                 v++;
00065             }
00066         };
00067
00068         if (m_vectorID == vectorID)
00069         {
00070             InsertAt(preferIndex, indexInOriginalVector, value);
00071         }
00072     }
00073
00074     void InsertAt(int preferIndex, int indexInOriginalVector, typename T const& value)
00075     {
00076         MUX_ASSERT(preferIndex >= 0);
00077         MUX_ASSERT(indexInOriginalVector >= 0);
00078         m_vector.get().InsertAt(preferIndex, value);
00079         m_indexesInOriginalVector.insert(m_indexesInOriginalVector.begin()+preferIndex, indexInOriginalVector);
00080     }
00081
00082     void Replace(int indexInOriginalVector, typename T const& value)
00083     {
00084         MUX_ASSERT(indexInOriginalVector >= 0);
00085
00086         auto index = IndexFromIndexInOriginalVector(indexInOriginalVector);
00087         auto vector = m_vector.get();
00088         vector.RemoveAt(index);
00089         vector.InsertAt(index, value);
00090     }
00091
00092     void Clear()
00093     {
00094         m_vector.get().Clear();
00095         m_indexesInOriginalVector.clear();
00096     }
00097
00098     void RemoveAt(int indexInOriginalVector)
00099     {
00100         MUX_ASSERT(indexInOriginalVector >= 0);
00101         const auto index = static_cast<uint32_t>(IndexFromIndexInOriginalVector(indexInOriginalVector));
00102         MUX_ASSERT(index < m_indexesInOriginalVector.size());
00103         m_vector.get().RemoveAt(index);
00104         m_indexesInOriginalVector.erase(m_indexesInOriginalVector.begin() + index);
00105     }
00106
00107     int IndexOf(const typename T& value)
00108     {
00109         const int indexInOriginalVector = m_indexFunctionFromDataSource(value);
00110         return IndexFromIndexInOriginalVector(indexInOriginalVector);
00111     }
00112
00113     int IndexToIndexInOriginalVector(int index)
00114     {
00115         MUX_ASSERT(index >= 0 && index < Size());
00116         return m_indexesInOriginalVector[index];
00117     }
00118
00119     int IndexFromIndexInOriginalVector(int indexInOriginalVector)
00120     {
00121         auto pos = std::find(m_indexesInOriginalVector.begin(), m_indexesInOriginalVector.end(), indexInOriginalVector);
00122         if (pos != m_indexesInOriginalVector.end())
00123         {
00124             return static_cast<int>(std::distance(m_indexesInOriginalVector.begin(), pos));
00125         }
00126         return -1;
00127     }
00128 private:
00129     int Size() { return  static_cast<int>(m_indexesInOriginalVector.size()); }
00130
00131 private:
00132     SplitVectorID m_vectorID;
00133     tracker_ref<winrt::IVector<typename T>> m_vector;
00134     std::vector<int> m_indexesInOriginalVector{ };
00135     std::function<int(typename T const& value)> m_indexFunctionFromDataSource{ };
00136 };
00137
00138 template<typename T, typename SplitVectorID, typename AttachedDataType, int SplitVectorSize = static_cast<int>(SplitVectorID::Size)>
00139 class SplitDataSourceBase
00140 {
00141     using SplitVectorType = SplitVector<typename T, typename SplitVectorID>;
00142 public:
00143     typename SplitVectorID GetVectorIDForItem(int index)
00144     {
00145         MUX_ASSERT(index >= 0 && index < RawDataSize());
00146         return m_flags[index];
00147     }
00148
00149     typename AttachedDataType AttachedData(int index)
00150     {
00151         MUX_ASSERT(index >= 0 && index < RawDataSize());
00152         return m_attachedData[index];
00153     }
00154
00155     void AttachedData(int index, typename AttachedDataType attachedData)
00156     {
00157         MUX_ASSERT(index >= 0 && index < RawDataSize());
00158         m_attachedData[index] = attachedData;
00159     }
00160
00161     void ResetAttachedData()
00162     {
00163         ResetAttachedData(DefaultAttachedData());
00164     }
00165
00166     void ResetAttachedData(typename AttachedDataType attachedData)
00167     {
00168         for (int i = 0; i < RawDataSize(); i++)
00169         {
00170             m_attachedData[i] = attachedData;
00171         }
00172     }
00173
00174     std::shared_ptr<SplitVectorType> GetVectorForItem(int index)
00175     {
00176         if (index >= 0 && index < RawDataSize())
00177         {
00178             return m_splitVectors[static_cast<int>(m_flags[index])];
00179         }
00180         return nullptr;
00181     }
00182
00183     void MoveItemsToVector(typename SplitVectorID newVectorID)
00184     {
00185         MoveItemsToVector(0, RawDataSize(), newVectorID);
00186     }
00187
00188     void MoveItemsToVector(int start, int end, typename SplitVectorID newVectorID)
00189     {
00190         MUX_ASSERT(start >= 0 && end <= RawDataSize());
00191         for (int i = start; i < end; i++)
00192         {
00193             MoveItemToVector(i, newVectorID);
00194         }
00195     }
00196
00197     void MoveItemToVector(int index, typename SplitVectorID newVectorID)
00198     {
00199         MUX_ASSERT(index >= 0 && index < RawDataSize());
00200
00201         if (m_flags[index] != newVectorID)
00202         {
00203             // remove from the old vector
00204             if (auto splitVector = GetVectorForItem(index))
00205             {
00206                 splitVector->RemoveAt(index);
00207             }
00208
00209             // change flag
00210             m_flags[index] = newVectorID;
00211
00212             // insert item to vector which matches with the newVectorID
00213             if (auto &toVector = m_splitVectors[static_cast<int>(newVectorID)])
00214             {
00215                 const int pos = GetPreferIndex(index, newVectorID);
00216
00217                 const auto value = GetAt(index);
00218                 toVector->InsertAt(pos, index, value);
00219             }
00220         }
00221     }
00222
00223 protected:
00224     virtual int IndexOf(const typename T& value) = 0;
00225     virtual typename T GetAt(int index) = 0;
00226     virtual int Size() = 0;
00227     virtual SplitVectorID DefaultVectorIDOnInsert() = 0;
00228     virtual AttachedDataType DefaultAttachedData() = 0;
00229
00230     int IndexOfImpl(const typename T& value, typename SplitVectorID vectorID)
00231     {
00232         const int indexInOriginalVector = IndexOf(value);
00233         int index = -1;
00234         if (indexInOriginalVector != -1)
00235         {
00236             auto vector = GetVectorForItem(indexInOriginalVector);
00237             if (vector && vector->GetVectorIDForItem() == vectorID)
00238             {
00239                 index = vector->IndexFromIndexInOriginalVector(indexInOriginalVector);
00240             }
00241         }
00242         return index;
00243     }
00244
00245     void InitializeSplitVectors(std::vector<std::shared_ptr<SplitVectorType>> vectors)
00246     {
00247         for (auto &vector: vectors)
00248         {
00249             m_splitVectors[static_cast<int>(vector->GetVectorIDForItem())] = vector;
00250         }
00251     }
00252
00253     std::shared_ptr<SplitVectorType> GetVector(SplitVectorID vectorID)
00254     {
00255         return m_splitVectors[static_cast<int>(vectorID)];
00256     }
00257
00258
00259     void OnClear()
00260     {
00261         // Clear all vectors
00262         for (auto &vector: m_splitVectors)
00263         {
00264             if (vector)
00265             {
00266                 vector->Clear();
00267             }
00268         }
00269
00270         m_flags.clear();
00271         m_attachedData.clear();
00272     }
00273
00274     void OnRemoveAt(int startIndex, int count)
00275     {
00276         for (int i = startIndex + count-1; i >= startIndex; i--)
00277         {
00278             OnRemoveAt(i);
00279         }
00280     }
00281
00282     void OnInsertAt(int startIndex, int count)
00283     {
00284         for (int i = startIndex; i < startIndex + count; i++)
00285         {
00286             OnInsertAt(i);
00287         }
00288     }
00289
00290     int RawDataSize()
00291     {
00292         return static_cast<int>(m_flags.size());
00293     }
00294
00295     void SyncAndInitVectorFlagsWithID(SplitVectorID defaultID, typename AttachedDataType defaultAttachedData)
00296     {
00297         // Initialize the flags
00298         for (int i = 0; i < Size(); i++)
00299         {
00300             m_flags.push_back(defaultID);
00301             m_attachedData.push_back(defaultAttachedData);
00302         }
00303     }
00304
00305     void Clear()
00306     {
00307         OnClear();
00308     }
00309
00310 private:
00311     void OnRemoveAt(int index)
00312     {
00313         auto vectorID = m_flags[index];
00314
00315         // Update mapping on all Vectors and Remove Item on vectorID vector;
00316         for (auto &vector : m_splitVectors)
00317         {
00318             if (vector)
00319             {
00320                 vector->OnRawDataRemove(index, vectorID);
00321             }
00322         }
00323
00324         m_flags.erase(m_flags.begin() + index);
00325         m_attachedData.erase(m_attachedData.begin() + index);
00326     }
00327
00328     void OnReplace(int index)
00329     {
00330         if (auto splitVector = GetVectorForItem(index))
00331         {
00332             auto value = GetAt(index);
00333             splitVector->Replace(index, value);
00334         }
00335     }
00336
00337     void OnInsertAt(int index)
00338     {
00339         const auto vectorID = DefaultVectorIDOnInsert();
00340         const auto defaultAttachedData = DefaultAttachedData();
00341         const auto preferIndex = GetPreferIndex(index, vectorID);
00342         const auto data = GetAt(index);
00343
00344         // Update mapping on all Vectors and Insert Item on vectorID vector;
00345         for (auto &vector: m_splitVectors)
00346         {
00347             if (vector)
00348             {
00349                 vector->OnRawDataInsert(preferIndex, index, data, vectorID);
00350             }
00351         }
00352
00353         m_flags.insert(m_flags.begin() + index, vectorID);
00354         m_attachedData.insert(m_attachedData.begin() + index, defaultAttachedData);
00355     }
00356
00357     int GetPreferIndex(int index, SplitVectorID vectorID)
00358     {
00359         return RangeCount(0, index, vectorID);
00360     }
00361
00362     int RangeCount(int start, int end, SplitVectorID vectorID)
00363     {
00364         int count = 0;
00365         for (int i = start; i < end; i++)
00366         {
00367             if (m_flags[i] == vectorID)
00368             {
00369                 count++;
00370             }
00371         }
00372         return count;
00373     }
00374 private:
00375     // length is the same as data source, and used to identify which SplitVector it belongs to.
00376     std::vector<typename SplitVectorID> m_flags{ };
00377     std::vector<typename AttachedDataType> m_attachedData{ };
00378     std::array<std::shared_ptr<SplitVectorType>, SplitVectorSize> m_splitVectors{};
00379 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBarAutomationProperties.cpp Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutCommandBarAutomationProperties.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "CommandBarFlyoutCommandBarAutomationProperties.h"
00007
00008 // Forward changes to CommandBarFlyoutCommandBarAutomationProperties.ControlType on to
00009 // AutomationProperties.ControlType.  We need to do this indirection since we can't
00010 // access types in XAML that we're interacting with via a known interface GUID.
00011 /* static */ void CommandBarFlyoutCommandBarAutomationProperties::OnControlTypePropertyChanged(
00012     const winrt::DependencyObject& sender,
00013     const winrt::DependencyPropertyChangedEventArgs& args)
00014 {
00015     if (auto senderAsUIE = sender.try_as<winrt::UIElement>())
00016     {
00017         winrt::AutomationProperties::SetAutomationControlType(senderAsUIE, unbox_value<winrt::AutomationControlType>(args.NewValue()));
00018     }
00019 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImageIconTests Member List

This is the complete list of members for ImageIconTests, including all inherited members.
BasicTest() | ImageIconTests | [inline]
ClassInitialize(TestContext testContext) | ImageIconTests | [inline, static]
TestCleanup() | ImageIconTests | [inline]
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > Member List

This is the complete list of members for ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > >, including all inherited members.
BoxedDefaultValue() | ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > | [inline, static]
BoxValueIfNecessary(T const &value) | ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > | [inline, static]
CastOrUnbox(winrt::IInspectable const &value) | ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > | [inline, static]
GetDefaultValue() | ValueHelper< T, std::enable_if_t< std::is_base_of_v< winrt::Windows::Foundation::IUnknown, T > > > | [inline, static]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTypeLogging.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTypeLogging.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ViewChange.h"
00007 #include "InteractionTrackerAsyncOperation.h"
00008 #include "ScrollPresenter.h"
00009
00010 namespace TypeLogging
00011 {
00012     winrt::hstring ScrollEventTypeToString(const winrt::ScrollEventType& scrollEventType);
00013     winrt::hstring ScrollingIndicatorModeToString(const winrt::ScrollingIndicatorMode& indicatorMode);
00014     winrt::hstring ScrollBarVisibilityToString(const winrt::ScrollingScrollBarVisibility& scrollBarVisibility);
00015     winrt::hstring ChainingModeToString(const winrt::ScrollingChainMode& chainingMode);
00016     winrt::hstring RailingModeToString(const winrt::ScrollingRailMode& railingMode);
00017     winrt::hstring ScrollModeToString(const winrt::ScrollingScrollMode& scrollMode);
00018     winrt::hstring ZoomModeToString(const winrt::ScrollingZoomMode& zoomMode);
00019     winrt::hstring InputKindToString(const winrt::ScrollingInputKinds& inputKind);
00020     winrt::hstring AnimationModeToString(const winrt::ScrollingAnimationMode& animationMode);
00021     winrt::hstring SnapPointsModeToString(const winrt::ScrollingSnapPointsMode& snapPointsMode);
00022     winrt::hstring ScrollPresenterViewKindToString(ScrollPresenterViewKind viewKind);
00023     winrt::hstring ScrollPresenterViewChangeResultToString(ScrollPresenterViewChangeResult result);
00024     winrt::hstring ScrollAmountToString(const winrt::ScrollAmount& scrollAmount);
00025     winrt::hstring ScrollOptionsToString(const winrt::ScrollingScrollOptions& options);
00026     winrt::hstring ZoomOptionsToString(const winrt::ScrollingZoomOptions& options);
00027     winrt::hstring InteractionTrackerAsyncOperationTypeToString(InteractionTrackerAsyncOperationType operationType);
00028     winrt::hstring InteractionTrackerAsyncOperationTriggerToString(InteractionTrackerAsyncOperationTrigger operationTrigger);
00029 };
00030
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AutoSuggestBoxHelper.properties.cpp Source File

  • File List
  • File Members
  • Generated

AutoSuggestBoxHelper.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AutoSuggestBoxHelper.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(AutoSuggestBoxHelper)
00012 }
00013
00014 #include "AutoSuggestBoxHelper.g.cpp"
00015
00016 GlobalDependencyProperty AutoSuggestBoxHelperProperties::s_KeepInteriorCornersSquareProperty{ nullptr };
00017
00018 AutoSuggestBoxHelperProperties::AutoSuggestBoxHelperProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void AutoSuggestBoxHelperProperties::EnsureProperties()
00024 {
00025     if (!s_KeepInteriorCornersSquareProperty)
00026     {
00027         s_KeepInteriorCornersSquareProperty =
00028             InitializeDependencyProperty(
00029                 L"KeepInteriorCornersSquare",
00030                 winrt::name_of<bool>(),
00031                 winrt::name_of<winrt::AutoSuggestBoxHelper>(),
00032                 true /* isAttached */,
00033                 ValueHelper<bool>::BoxValueIfNecessary(false),
00034                 &AutoSuggestBoxHelper::OnKeepInteriorCornersSquarePropertyChanged);
00035     }
00036 }
00037
00038 void AutoSuggestBoxHelperProperties::ClearProperties()
00039 {
00040     s_KeepInteriorCornersSquareProperty = nullptr;
00041 }
00042
00043
00044 void AutoSuggestBoxHelperProperties::SetKeepInteriorCornersSquare(winrt::AutoSuggestBox const& target, bool value)
00045 {
00046     target.SetValue(s_KeepInteriorCornersSquareProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00047 }
00048
00049 bool AutoSuggestBoxHelperProperties::GetKeepInteriorCornersSquare(winrt::AutoSuggestBox const& target)
00050 {
00051     return ValueHelper<bool>::CastOrUnbox(target.GetValue(s_KeepInteriorCornersSquareProperty));
00052 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionContainerAutomationPeer Member List

This is the complete list of members for SelectionContainerAutomationPeer, including all inherited members.
_owner | SelectionContainerAutomationPeer | [private]
CanSelectMultiple | SelectionContainerAutomationPeer |
GetPatternCore(PatternInterface patternInterface) | SelectionContainerAutomationPeer | [inline, protected]
GetSelection() | SelectionContainerAutomationPeer | [inline]
IsSelectionRequired | SelectionContainerAutomationPeer |
SelectionChanged(SelectionModelSelectionChangedEventArgs args) | SelectionContainerAutomationPeer | [inline, private]
SelectionContainerAutomationPeer(FrameworkElement owner) | SelectionContainerAutomationPeer | [inline]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/TestUI/SplitButtonPage.xaml.cs Source File

  • File List
  • File Members
  • SplitButton
  • TestUI

SplitButtonPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Microsoft.UI.Private.Controls;
00011 using Windows.UI;
00012 using System.Windows.Input;
00013 using System.Collections.Generic;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     [TopLevelTestPage(Name = "SplitButton", Icon = "SplitButton.png")]
00018     public sealed partial class SplitButtonPage : TestPage
00019     {
00020         private int _clickCount = 0;
00021         private int _flyoutOpenedCount = 0;
00022         private int _flyoutClosedCount = 0;
00023
00024         public MyCommand TestExecuteCommand;
00025         private int _commandExecuteCount = 0;
00026
00027         private Flyout _placementFlyout;
00028
00029         public SplitButtonPage()
00030         {
00031             this.InitializeComponent();
00032
00033             SplitButtonTestApi.SimulateTouch = false;
00034
00035             TestExecuteCommand = new MyCommand(this);
00036
00037             _placementFlyout = new Flyout();
00038             _placementFlyout.Placement = FlyoutPlacementMode.Bottom;
00039             TextBlock textBlock = new TextBlock();
00040             textBlock.Text = "Placement Flyout";
00041             _placementFlyout.Content = textBlock;
00042
00043             ControlStateViewer.ControlType = TestSplitButton.GetType();
00044             ControlStateViewer.States = new List<string>
00045             {
00046                 "Normal",
00047                 "FlyoutOpen",
00048                 "TouchPressed",
00049                 "PrimaryPointerOver",
00050                 "PrimaryPressed",
00051                 "SecondaryPointerOver",
00052                 "SecondaryPressed",
00053             };
00054
00055             ToggleControlStateViewer.ControlType = TestSplitButton.GetType();
00056             ToggleControlStateViewer.States = new List<string>
00057             {
00058                 "Checked",
00059                 "CheckedFlyoutOpen",
00060                 "CheckedTouchPressed",
00061                 "CheckedPrimaryPointerOver",
00062                 "CheckedPrimaryPressed",
00063                 "CheckedSecondaryPointerOver",
00064                 "CheckedSecondaryPressed",
00065             };
00066         }
00067
00068         private void TestSplitButton_Click(object sender, object e)
00069         {
00070             ClickCountTextBlock.Text = (++_clickCount).ToString();
00071         }
00072
00073         private void TestSplitButtonFlyout_Opened(object sender, object e)
00074         {
00075             FlyoutOpenedCountTextBlock.Text = (++_flyoutOpenedCount).ToString();
00076         }
00077
00078         private void TestSplitButtonFlyout_Closed(object sender, object e)
00079         {
00080             FlyoutClosedCountTextBlock.Text = (++_flyoutClosedCount).ToString();
00081         }
00082
00083         private void SimulateTouchCheckBox_Checked(object sender, RoutedEventArgs e)
00084         {
00085             SplitButtonTestApi.SimulateTouch = true;
00086         }
00087
00088         private void SimulateTouchCheckBox_Unchecked(object sender, RoutedEventArgs e)
00089         {
00090             SplitButtonTestApi.SimulateTouch = false;
00091         }
00092
00093         private void EnableCheckBox_Checked(object sender, RoutedEventArgs e)
00094         {
00095             DisabledSplitButton.IsEnabled = true;
00096         }
00097
00098         private void EnableCheckBox_Unchecked(object sender, RoutedEventArgs e)
00099         {
00100             DisabledSplitButton.IsEnabled = false;
00101         }
00102
00103         private void CanExecuteCheckBox_Checked(object sender, RoutedEventArgs e)
00104         {
00105             if (TestExecuteCommand != null)
00106             {
00107                 TestExecuteCommand.UpdateCanExecute(true);
00108             }
00109         }
00110
00111         private void CanExecuteCheckBox_Unchecked(object sender, RoutedEventArgs e)
00112         {
00113             if (TestExecuteCommand != null)
00114             {
00115                 TestExecuteCommand.UpdateCanExecute(false);
00116             }
00117         }
00118
00119         public void CommandExecute()
00120         {
00121             ExecuteCountTextBlock.Text = (++_commandExecuteCount).ToString();
00122         }
00123
00124         private void SetFlyoutCheckBox_Checked(object sender, RoutedEventArgs e)
00125         {
00126             if (FlyoutSetSplitButton != null)
00127             {
00128                 FlyoutSetSplitButton.Flyout = _placementFlyout;
00129             }
00130         }
00131
00132         private void SetFlyoutCheckBox_Unchecked(object sender, RoutedEventArgs e)
00133         {
00134             if (FlyoutSetSplitButton != null)
00135             {
00136                 FlyoutSetSplitButton.Flyout = null;
00137             }
00138         }
00139
00140         private void ToggleSplitButton_IsCheckedChanged(ToggleSplitButton sender, ToggleSplitButtonIsCheckedChangedEventArgs args)
00141         {
00142             ToggleStateTextBlock.Text = ToggleSplitButton.IsChecked ? "Checked" : "Unchecked";
00143         }
00144
00145         private void ToggleSplitButton_Click(object sender, object e)
00146         {
00147             ToggleStateOnClickTextBlock.Text = ToggleSplitButton.IsChecked ? "Checked" : "Unchecked";
00148         }
00149     }
00150
00151     public class MyCommand : ICommand
00152     {
00153         public event EventHandler CanExecuteChanged;
00154
00155         private SplitButtonPage _parentPage;
00156         private bool _canExecute = true;
00157
00158         public MyCommand() { }
00159
00160         public MyCommand(SplitButtonPage parentPage)
00161         {
00162             _parentPage = parentPage;
00163         }
00164
00165         public void UpdateCanExecute(bool canExecute)
00166         {
00167             _canExecute = canExecute;
00168             if (CanExecuteChanged != null)
00169             {
00170                 EventArgs args = new EventArgs();
00171                 CanExecuteChanged(this, args);
00172             }
00173         }
00174
00175         public bool CanExecute(object o)
00176         {
00177             return _canExecute;
00178         }
00179
00180         public void Execute(object o)
00181         {
00182             _parentPage.CommandExecute();
00183         }
00184     }
00185 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LightConfigurationTests Member List

This is the complete list of members for LightConfigurationTests, including all inherited members.
_cleanupVerified | LightConfigurationTests | [private]
_fullWindowMediaRoot | LightConfigurationTests | [private]
_lightValidationTimer | LightConfigurationTests | [private]
_mediaFullScreened | LightConfigurationTests | [private]
_mpe | LightConfigurationTests | [private]
_pollInterval | LightConfigurationTests | [private]
_pollMaxRetries | LightConfigurationTests | [private]
_pollRetry | LightConfigurationTests | [private]
_popupRoot | LightConfigurationTests | [private]
_validationCompleted | LightConfigurationTests | [private]
_visualRoot | LightConfigurationTests | [private]
BackgroundBrushNames | LightConfigurationTests | [static]
CompositionTarget_Rendering(object sender, object e) | LightConfigurationTests | [inline, private]
CTR_CheckCleanup(object sender, object e) | LightConfigurationTests | [inline, private]
GetBrushName(string fullName) | LightConfigurationTests | [inline, static]
GetTopParent(UIElement current) | LightConfigurationTests | [inline, private]
PollTimer_Tick(object sender, object e) | LightConfigurationTests | [inline, private]
RevealBackgroundBrushes | LightConfigurationTests |
VerifyLights(CoreApplicationView whichView, bool forceLightAttachDuringLayout, bool resetWindowContent) | LightConfigurationTests | [inline, private]
VerifyLightsAfterResettingContentOnMainWindow() | LightConfigurationTests | [inline]
VerifyLightsAfterResettingContentOnSecondaryWindow() | LightConfigurationTests | [inline]
VerifyLightsAttachedDuringLayoutOnSecondaryWindow() | LightConfigurationTests | [inline]
VerifyLightsOnMainWindow() | LightConfigurationTests | [inline]
VerifyLightsOnSecondaryWindow() | LightConfigurationTests | [inline]
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/ComboBoxHelper.cpp Source File

  • File List
  • File Members
  • ComboBox

ComboBoxHelper.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ComboBoxHelper.h"
00007 #include "CornerRadiusFilterConverter.h"
00008 #include "ResourceAccessor.h"
00009
00010 static constexpr auto c_popupBorderName = L"PopupBorder"sv;
00011 static constexpr auto c_editableTextName = L"EditableText"sv;
00012 static constexpr auto c_editableTextBorderName = L"BorderElement"sv;
00013 static constexpr auto c_overlayCornerRadiusKey = L"OverlayCornerRadius"sv;
00014 GlobalDependencyProperty ComboBoxHelper::s_DropDownEventRevokersProperty{ nullptr };
00015
00016 ComboBoxHelper::ComboBoxHelper()
00017 {
00018     EnsureProperties();
00019 }
00020
00021 void ComboBoxHelper::EnsureProperties()
00022 {
00023     if (!s_DropDownEventRevokersProperty)
00024     {
00025         s_DropDownEventRevokersProperty =
00026             InitializeDependencyProperty(
00027                 L"DropDownEventRevokers",
00028                 winrt::name_of<winrt::IInspectable>(),
00029                 winrt::name_of<winrt::ComboBoxHelper>(),
00030                 true /* isAttached */,
00031                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00032                 nullptr);
00033     }
00034
00035     ComboBoxHelperProperties::EnsureProperties();
00036 }
00037
00038 void ComboBoxHelper::ClearProperties()
00039 {
00040     s_DropDownEventRevokersProperty = nullptr;
00041     ComboBoxHelperProperties::ClearProperties();
00042 }
00043
00044
00045 // Normal ComboBox and editable ComboBox have different CornerRadius behaviors.
00046 // Xaml is not lifted yet when we implementing this feature so we don't have access to ComboBox code.
00047 // Creating this attached property to help us plug in some extra logic without touching the actual ComboBox code.
00048 void ComboBoxHelper::OnKeepInteriorCornersSquarePropertyChanged(
00049     const winrt::DependencyObject& sender,
00050     const winrt::DependencyPropertyChangedEventArgs& args)
00051 {
00052     if (auto comboBox = sender.try_as<winrt::ComboBox>())
00053     {
00054         bool shouldMonitorDropDownState = unbox_value<bool>(args.NewValue());
00055         if (shouldMonitorDropDownState)
00056         {
00057             auto revokersInspectable = winrt::make<ComboBoxDropDownEventRevokers>();
00058             auto revokers = revokersInspectable.as<ComboBoxDropDownEventRevokers>();
00059
00060             revokers->m_dropDownOpenedRevoker = comboBox.DropDownOpened(winrt::auto_revoke, ComboBoxHelper::OnDropDownOpened);
00061             revokers->m_dropDownClosedRevoker = comboBox.DropDownClosed(winrt::auto_revoke, ComboBoxHelper::OnDropDownClosed);
00062
00063             comboBox.SetValue(DropDownEventRevokersProperty(), revokersInspectable);
00064         }
00065         else
00066         {
00067             comboBox.SetValue(DropDownEventRevokersProperty(), nullptr);
00068         }
00069     }
00070 }
00071
00072 void ComboBoxHelper::OnDropDownOpened(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00073 {
00074     auto comboBox = sender.as<winrt::ComboBox>();
00075     // We need to know whether the dropDown opens above or below the ComboBox in order to update corner radius correctly.
00076     // Sometimes TransformToPoint value is incorrect because popup is not fully opened when this function gets called.
00077     // Use dispatcher to make sure we get correct VerticalOffset.
00078     if(auto dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread())
00079     {
00080         auto result = dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler([comboBox]()
00081         {
00082             UpdateCornerRadius(comboBox, /*IsDropDownOpen=*/true);
00083         }));
00084     }
00085 }
00086
00087 void ComboBoxHelper::OnDropDownClosed(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00088 {
00089     auto comboBox = sender.as<winrt::ComboBox>();
00090     UpdateCornerRadius(comboBox, /*IsDropDownOpen=*/false);
00091 }
00092
00093 void ComboBoxHelper::UpdateCornerRadius(const winrt::ComboBox& comboBox, bool isDropDownOpen)
00094 {
00095     if (comboBox.IsEditable())
00096     {
00097         auto popupRadius = unbox_value<winrt::CornerRadius>(ResourceAccessor::ResourceLookup(comboBox, box_value(c_overlayCornerRadiusKey)));
00098
00099         auto textBoxRadius = comboBox.CornerRadius();
00100
00101         if (isDropDownOpen)
00102         {
00103             const bool isOpenDown = IsPopupOpenDown(comboBox);
00104             auto cornerRadiusConverter = winrt::make_self<CornerRadiusFilterConverter>();
00105
00106             const auto popupRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Bottom : winrt::CornerRadiusFilterKind::Top;
00107             popupRadius = cornerRadiusConverter->Convert(popupRadius, popupRadiusFilter);
00108
00109             const auto textBoxRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Top : winrt::CornerRadiusFilterKind::Bottom;
00110             textBoxRadius = cornerRadiusConverter->Convert(textBoxRadius, textBoxRadiusFilter);
00111         }
00112
00113         if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, comboBox))
00114         {
00115             popupBorder.CornerRadius(popupRadius);
00116         }
00117
00118         if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_editableTextName, comboBox))
00119         {
00120             textBox.CornerRadius(textBoxRadius);
00121         }
00122     }
00123 }
00124
00125 bool ComboBoxHelper::IsPopupOpenDown(const winrt::ComboBox& comboBox)
00126 {
00127     double verticalOffset = 0;
00128     if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, comboBox))
00129     {
00130         if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_editableTextName, comboBox))
00131         {
00132             const auto transform = popupBorder.TransformToVisual(textBox);
00133             const auto popupTop = transform.TransformPoint(winrt::Point(0, 0));
00134             verticalOffset = popupTop.Y;
00135         }
00136     }
00137     return verticalOffset > 0;
00138 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/TimePickerPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

TimePickerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     [TopLevelTestPage(Name = "TimePicker", Icon = "TimePicker.png")]
00007     public sealed partial class TimePickerPage : TestPage
00008     {
00009         public TimePickerPage()
00010         {
00011             this.InitializeComponent();
00012         }
00013     }
00014 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/ColumnMajorUniformToLargestGridLayout.cpp Source File

  • File List
  • File Members
  • RadioButtons

ColumnMajorUniformToLargestGridLayout.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "Utils.h"
00008 #include "ColumnMajorUniformToLargestGridLayout.h"
00009
00010 winrt::Size ColumnMajorUniformToLargestGridLayout::MeasureOverride(
00011     winrt::NonVirtualizingLayoutContext const& context,
00012     winrt::Size const& availableSize)
00013 {
00014     if (auto const children = context.Children())
00015     {
00016         m_largestChildSize = [children, availableSize]()
00017         {
00018             auto largestChildWidth = 0.0f;
00019             auto largestChildHeight = 0.0f;
00020             for (auto const child : children)
00021             {
00022                 child.Measure(availableSize);
00023                 auto const desiredSize = child.DesiredSize();
00024                 if (desiredSize.Width > largestChildWidth)
00025                 {
00026                     largestChildWidth = desiredSize.Width;
00027                 }
00028                 if (desiredSize.Height > largestChildHeight)
00029                 {
00030                     largestChildHeight = desiredSize.Height;
00031                 }
00032             }
00033             return winrt::Size(largestChildWidth, largestChildHeight);
00034         }();
00035
00036         m_actualColumnCount = CalculateColumns(children.Size(), m_largestChildSize.Width, availableSize.Width);
00037         auto const maxItemsPerColumn = static_cast<int>(std::ceil(static_cast<double>(children.Size()) / static_cast<double>(m_actualColumnCount)));
00038         return winrt::Size(
00039             (m_largestChildSize.Width * m_actualColumnCount) +
00040             (static_cast<float>(ColumnSpacing()) * (m_actualColumnCount - 1)),
00041             (m_largestChildSize.Height * maxItemsPerColumn) +
00042             (static_cast<float>(RowSpacing()) * (maxItemsPerColumn - 1))
00043         );
00044     }
00045     return winrt::Size(0, 0);
00046 }
00047
00048 winrt::Size ColumnMajorUniformToLargestGridLayout::ArrangeOverride(
00049     winrt::NonVirtualizingLayoutContext const& context,
00050     winrt::Size const& finalSize)
00051 {
00052     if (auto const children = context.Children())
00053     {
00054         auto const itemCount = children.Size();
00055         auto const minitemsPerColumn = static_cast<int>(std::floor(static_cast<float>(itemCount) / m_actualColumnCount));
00056         auto const numberOfColumnsWithExtraElements = static_cast<int>(itemCount % static_cast<int>(m_actualColumnCount));
00057
00058         auto const columnSpacing = static_cast<float>(ColumnSpacing());
00059         auto const rowSpacing = static_cast<float>(RowSpacing());
00060
00061         auto horizontalOffset = 0.0f;
00062         auto verticalOffset = 0.0f;
00063         auto index = 0;
00064         auto column = 0;
00065         for (auto const child : children)
00066         {
00067             auto const desiredSize = child.DesiredSize();
00068             child.Arrange(winrt::Rect{ horizontalOffset, verticalOffset, desiredSize.Width, desiredSize.Height });
00069             if (column < numberOfColumnsWithExtraElements)
00070             {
00071                 if (index % (minitemsPerColumn + 1) == minitemsPerColumn)
00072                 {
00073                     horizontalOffset += m_largestChildSize.Width + columnSpacing;
00074                     verticalOffset = 0.0;
00075                     column++;
00076                 }
00077                 else
00078                 {
00079                     verticalOffset += m_largestChildSize.Height + rowSpacing;
00080                 }
00081             }
00082             else
00083             {
00084                 auto const indexAfterExtraLargeColumns = index - (numberOfColumnsWithExtraElements * (minitemsPerColumn + 1));
00085                 if (indexAfterExtraLargeColumns % minitemsPerColumn == minitemsPerColumn - 1)
00086                 {
00087                     horizontalOffset += m_largestChildSize.Width + columnSpacing;
00088                     verticalOffset = 0.0;
00089                     column++;
00090                 }
00091                 else
00092                 {
00093                     verticalOffset += m_largestChildSize.Height + rowSpacing;
00094                 }
00095             }
00096             index++;
00097         }
00098
00099         if (m_testHooksEnabled)
00100         {
00101             //Testhooks setup
00102             if (m_largerColumns != numberOfColumnsWithExtraElements ||
00103                 m_columns != column ||
00104                 m_rows != minitemsPerColumn)
00105             {
00106                 m_largerColumns = numberOfColumnsWithExtraElements;
00107                 m_columns = column;
00108                 m_rows = minitemsPerColumn;
00109
00110                 m_layoutChangedEventSource(*this, nullptr);
00111             }
00112         }
00113     }
00114     return finalSize;
00115 }
00116
00117 void ColumnMajorUniformToLargestGridLayout::OnColumnSpacingPropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00118 {
00119     InvalidateMeasure();
00120 }
00121
00122 void ColumnMajorUniformToLargestGridLayout::OnRowSpacingPropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00123 {
00124     InvalidateMeasure();
00125 }
00126
00127 void ColumnMajorUniformToLargestGridLayout::OnMaxColumnsPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00128 {
00129     InvalidateMeasure();
00130 }
00131
00132 int ColumnMajorUniformToLargestGridLayout::CalculateColumns(int childCount, float maxItemWidth, float availableWidth)
00133 {
00134     /*
00135     --------------------------------------------------------------
00136     |      |-----------|-----------| | widthNeededForExtraColumn |
00137     |                                |                           |
00138     |      |------|    |------|      | ColumnSpacing             |
00139     | |----|      |----|      |----| | maxItemWidth              |
00140     |  O RB        O RB        O RB  |                           |
00141     --------------------------------------------------------------
00142     */
00143
00144     // Every column execpt the first takes this ammount of space to fit on screen.
00145     auto const widthNeededForExtraColumn = ColumnSpacing() + maxItemWidth;
00146     // The number of columns from data and api ignoring available space
00147     auto const requestedColumnCount = std::min(MaxColumns(), childCount);
00148
00149     // If columns can be added with effectively 0 extra space return as many columns as needed.
00150     if (widthNeededForExtraColumn < std::numeric_limits<float>::epsilon())
00151     {
00152         return requestedColumnCount;
00153     }
00154
00155     auto const extraWidthAfterFirstColumn = availableWidth - maxItemWidth;
00156     auto const maxExtraColumns = std::max(0.0, std::floor(extraWidthAfterFirstColumn / widthNeededForExtraColumn));
00157
00158     // The smaller of number of columns from data and api and
00159     // the number of columns the available space can support
00160     auto const effectiveColumnCount = std::min(static_cast<double>(requestedColumnCount), maxExtraColumns + 1);
00161     // return 1 even if there isn't any data
00162     return std::max(1, static_cast<int>(effectiveColumnCount));
00163 }
00164
00165 void ColumnMajorUniformToLargestGridLayout::ValidateGreaterThanZero(int value)
00166 {
00167     if (value <= 0)
00168     {
00169         throw winrt::hresult_invalid_argument();
00170     }
00171 }
00172
00173 //Testhooks helpers, only function while m_testHooksEnabled == true
00174 void ColumnMajorUniformToLargestGridLayout::SetTestHooksEnabled(bool enabled)
00175 {
00176     m_testHooksEnabled = enabled;
00177 }
00178
00179 int ColumnMajorUniformToLargestGridLayout::GetRows()
00180 {
00181     return m_rows;
00182 }
00183
00184 int ColumnMajorUniformToLargestGridLayout::GetColumns()
00185 {
00186     return m_columns;
00187 }
00188
00189 int ColumnMajorUniformToLargestGridLayout::GetLargerColumns()
00190 {
00191     return m_largerColumns;
00192 }
00193
00194 winrt::event_token ColumnMajorUniformToLargestGridLayout::LayoutChanged(winrt::TypedEventHandler<winrt::ColumnMajorUniformToLargestGridLayout, winrt::IInspectable> const& value)
00195 {
00196     return m_layoutChangedEventSource.add(value);
00197 }
00198
00199 void ColumnMajorUniformToLargestGridLayout::LayoutChanged(winrt::event_token const& token)
00200 {
00201     m_layoutChangedEventSource.remove(token);
00202 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "CppWinRTHelpers.h"
00007
00008
00009 class ScrollViewerIRefreshInfoProviderDefaultAnimationHandler
00010     : public ReferenceTracker<ScrollViewerIRefreshInfoProviderDefaultAnimationHandler,
00011     reference_tracker_implements_t<winrt::IAdapterAnimationHandler>::type>
00012 {
00013 public:
00014     ScrollViewerIRefreshInfoProviderDefaultAnimationHandler(const winrt::UIElement& container, const winrt::RefreshPullDirection& refreshPullDirection);
00015     ~ScrollViewerIRefreshInfoProviderDefaultAnimationHandler();
00016
00017     //IAdapterAnimationHandler
00018     void InteractionTrackerAnimation(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider, const winrt::InteractionTracker& interactionTracker);
00019     void RefreshRequestedAnimation(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider, double executionRatio);
00020     void RefreshCompletedAnimation(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider);
00021
00022 private:
00023     //PrivateHelpers
00024     void ValidateAndStoreParameters(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider, const winrt::InteractionTracker& interactionTracker);
00025     void RefreshCompletedBatchCompleted(const winrt::IInspectable& sender, const winrt::CompositionBatchCompletedEventArgs& args);
00026     winrt::hstring getAnimatedPropertyName();
00027
00028     bool IsOrientationVertical();
00029
00030     winrt::RefreshPullDirection m_refreshPullDirection;
00031
00032     tracker_ref<winrt::UIElement> m_refreshVisualizer{ this };
00033     tracker_ref<winrt::UIElement> m_infoProvider{ this };
00034     winrt::Visual m_refreshVisualizerVisual{ nullptr };
00035     winrt::Visual m_infoProviderVisual{ nullptr };
00036     winrt::InteractionTracker m_interactionTracker{ nullptr };
00037     winrt::Compositor m_compositor{ nullptr };
00038
00039     bool m_interactionAnimationNeedsUpdating{ true };
00040     bool m_refreshRequestedAnimationNeedsUpdating{ true };
00041     bool m_refreshCompletedAnimationNeedsUpdating{ true };
00042
00043     winrt::ExpressionAnimation m_refreshVisualizerVisualOffsetAnimation{ nullptr };
00044     winrt::ExpressionAnimation m_infoProviderOffsetAnimation{ nullptr };
00045
00046     winrt::ScalarKeyFrameAnimation m_refreshVisualizerRefreshRequestedAnimation{ nullptr };
00047     winrt::ScalarKeyFrameAnimation m_infoProviderRefreshRequestedAnimation{ nullptr };
00048
00049     winrt::ScalarKeyFrameAnimation m_refreshVisualizerRefreshCompletedAnimation{ nullptr };
00050     winrt::ScalarKeyFrameAnimation m_infoProviderRefreshCompletedAnimation{ nullptr };
00051     winrt::CompositionScopedBatch m_refreshCompletedScopedBatch{ nullptr };
00052
00053     winrt::event_token m_compositionScopedBatchCompletedEventToken{ 0 };
00054 };
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/VariableSizedItemsPage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples

VariableSizedItemsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.ObjectModel;
00006 using System.Diagnostics;
00007 using System.Linq;
00008 using System.Numerics;
00009 using Microsoft.UI.Composition;
00010 using Microsoft.UI.Private.Controls;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Navigation;
00014
00015 namespace MUXControlsTestApp.Samples
00016 {
00017     public sealed partial class VariableSizedItemsPage : Page
00018     {
00019         private double m_extentHeight = 0;
00020         private int m_changeViewToVerticalOffsetWithAnimationCorrelationId = -1;
00021         private int m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId = -1;
00022
00023         public VariableSizedItemsPage()
00024         {
00025             this.InitializeComponent();
00026             goBackButton.Click += delegate { Frame.GoBack(); };
00027
00028             itemsRepeater.ItemsSource = Enumerable.Range(0, 10000).Select(x => new VariableSizeItem(x)
00029             {
00030                 Text = "Item " + x
00031             });
00032
00033             Loaded += VariableSizedItemsPage_Loaded;
00034         }
00035
00036         ~VariableSizedItemsPage()
00037         {
00038         }
00039
00040         protected override void OnNavigatedFrom(NavigationEventArgs e)
00041         {
00042             UnhookScrollersEvents();
00043
00044             base.OnNavigatedFrom(e);
00045         }
00046
00047         private void AppendEventMessage(string message)
00048         {
00049             if (lstEvents != null)
00050             {
00051                 lstEvents.Items.Add(message);
00052             }
00053         }
00054
00055         private void HookScrollersEvents()
00056         {
00057             if (scrollViewer != null)
00058             {
00059                 scrollViewer.ViewChanging += ScrollViewer_ViewChanging;
00060                 scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
00061             }
00062             if (scrollView != null)
00063             {
00064                 scrollView.ViewChanged += ScrollView_ViewChanged;
00065                 scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
00066             }
00067         }
00068
00069         private void UnhookScrollersEvents()
00070         {
00071             if (scrollViewer != null)
00072             {
00073                 scrollViewer.ViewChanging -= ScrollViewer_ViewChanging;
00074                 scrollViewer.ViewChanged -= ScrollViewer_ViewChanged;
00075             }
00076             if (scrollView != null)
00077             {
00078                 scrollView.ViewChanged -= ScrollView_ViewChanged;
00079                 scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
00080             }
00081         }
00082
00083         private void UpdateItemsRepeaterVerticalCacheLength()
00084         {
00085             try
00086             {
00087                 if (itemsRepeater != null)
00088                 {
00089                     txtItemsRepeaterVerticalCacheLength.Text = itemsRepeater.VerticalCacheLength.ToString();
00090                 }
00091             }
00092             catch (Exception ex)
00093             {
00094                 string message = "UpdateItemsRepeaterVerticalCacheLength. Exception:" + ex.ToString();
00095
00096                 Debug.WriteLine(message);
00097                 AppendEventMessage(message);
00098             }
00099         }
00100
00101         private void UpdateScrollerVerticalAnchorRatio()
00102         {
00103             try
00104             {
00105                 if (scrollViewer != null && scrollViewer.Content != null)
00106                 {
00107                     txtScrollerVerticalAnchorRatio.Text = scrollViewer.VerticalAnchorRatio.ToString();
00108                 }
00109                 else if (scrollView != null)
00110                 {
00111                     txtScrollerVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
00112                 }
00113             }
00114             catch (Exception ex)
00115             {
00116                 string message = "UpdateScrollerVerticalAnchorRatio. Exception:" + ex.ToString();
00117
00118                 Debug.WriteLine(message);
00119                 AppendEventMessage(message);
00120             }
00121         }
00122
00123         private void UpdateScrollerVerticalOffset()
00124         {
00125             try
00126             {
00127                 if (scrollViewer != null && scrollViewer.Content != null)
00128                 {
00129                     txtScrollerVerticalOffset.Text = scrollViewer.VerticalOffset.ToString();
00130                 }
00131                 else if (scrollView != null)
00132                 {
00133                     txtScrollerVerticalOffset.Text = scrollView.VerticalOffset.ToString();
00134                 }
00135             }
00136             catch (Exception ex)
00137             {
00138                 string message = "UpdateScrollerVerticalOffset. Exception:" + ex.ToString();
00139
00140                 Debug.WriteLine(message);
00141                 AppendEventMessage(message);
00142             }
00143         }
00144
00145         private void UpdateScrollerZoomFactor()
00146         {
00147             try
00148             {
00149                 if (scrollViewer != null && scrollViewer.Content != null)
00150                 {
00151                     txtScrollerZoomFactor.Text = scrollViewer.ZoomFactor.ToString();
00152                 }
00153                 else if (scrollView != null)
00154                 {
00155                     txtScrollerZoomFactor.Text = scrollView.ZoomFactor.ToString();
00156                 }
00157             }
00158             catch (Exception ex)
00159             {
00160                 string message = "UpdateScrollerZoomFactor. Exception:" + ex.ToString();
00161
00162                 Debug.WriteLine(message);
00163                 AppendEventMessage(message);
00164             }
00165         }
00166
00167         private void UpdateScrollerVerticalScrollPercentage()
00168         {
00169             try
00170             {
00171                 if (scrollViewer != null && scrollViewer.Content != null)
00172                 {
00173                     if (scrollViewer.ScrollableHeight == 0)
00174                     {
00175                         txtScrollerVerticalScrollPercentage.Text = "N/A";
00176                     }
00177                     else
00178                     {
00179                         txtScrollerVerticalScrollPercentage.Text = (scrollViewer.VerticalOffset / scrollViewer.ScrollableHeight * 100.0).ToString();
00180                     }
00181                 }
00182                 else if (scrollView != null)
00183                 {
00184                     if (scrollView.ScrollableHeight == 0)
00185                     {
00186                         txtScrollerVerticalScrollPercentage.Text = "N/A";
00187                     }
00188                     else
00189                     {
00190                         txtScrollerVerticalScrollPercentage.Text = (scrollView.VerticalOffset / scrollView.ScrollableHeight * 100.0).ToString();
00191                     }
00192                 }
00193             }
00194             catch (Exception ex)
00195             {
00196                 string message = "UpdateScrollerVerticalScrollPercentage. Exception:" + ex.ToString();
00197
00198                 Debug.WriteLine(message);
00199                 AppendEventMessage(message);
00200             }
00201         }
00202
00203         private void UpdateScrollerScrollableHeight()
00204         {
00205             try
00206             {
00207                 if (scrollViewer != null && scrollViewer.Content != null)
00208                 {
00209                     txtScrollerScrollableHeight.Text = scrollViewer.ScrollableHeight.ToString();
00210                 }
00211                 else if (scrollView != null)
00212                 {
00213                     txtScrollerScrollableHeight.Text = scrollView.ScrollableHeight.ToString();
00214                 }
00215             }
00216             catch (Exception ex)
00217             {
00218                 string message = "UpdateScrollerScrollableHeight. Exception:" + ex.ToString();
00219
00220                 Debug.WriteLine(message);
00221                 AppendEventMessage(message);
00222             }
00223         }
00224
00225         private void UpdateScrollerExtentHeight()
00226         {
00227             try
00228             {
00229                 if (scrollViewer != null && scrollViewer.Content != null)
00230                 {
00231                     txtScrollerExtentHeight.Text = scrollViewer.ExtentHeight.ToString();
00232                 }
00233                 else if (scrollView != null)
00234                 {
00235                     txtScrollerExtentHeight.Text = scrollView.ExtentHeight.ToString();
00236                 }
00237
00238                 UpdateExtentHeight();
00239             }
00240             catch (Exception ex)
00241             {
00242                 string message = "UpdateScrollerExtentHeight. Exception:" + ex.ToString();
00243
00244                 Debug.WriteLine(message);
00245                 AppendEventMessage(message);
00246             }
00247         }
00248
00249         private void UpdateExtentHeight()
00250         {
00251             double extentHeight = 0;
00252
00253             if (scrollViewer != null && scrollViewer.Content != null)
00254             {
00255                 extentHeight = scrollViewer.ExtentHeight;
00256             }
00257             else if (scrollView != null)
00258             {
00259                 extentHeight = scrollView.ExtentHeight;
00260             }
00261
00262             if (m_extentHeight != extentHeight)
00263             {
00264                 AppendEventMessage("ExtentHeight changed. Old=" + m_extentHeight + ", New=" + extentHeight);
00265
00266                 m_extentHeight = extentHeight;
00267             }
00268         }
00269
00270         private void UpdateScrollerChangeViewVerticalScrollPercentage()
00271         {
00272             try
00273             {
00274                 double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);
00275
00276                 if (scrollViewer != null && scrollViewer.Content != null)
00277                 {
00278                     if (scrollViewer.ScrollableHeight == 0)
00279                     {
00280                         txtScrollerChangeViewVerticalScrollPercentage.Text = "N/A";
00281                     }
00282                     else
00283                     {
00284                         txtScrollerChangeViewVerticalScrollPercentage.Text = (verticalOffset / scrollViewer.ScrollableHeight * 100.0).ToString();
00285                     }
00286                 }
00287                 else if (scrollView != null)
00288                 {
00289                     if (scrollView.ScrollableHeight == 0)
00290                     {
00291                         txtScrollerChangeViewVerticalScrollPercentage.Text = "N/A";
00292                     }
00293                     else
00294                     {
00295                         txtScrollerChangeViewVerticalScrollPercentage.Text = (verticalOffset / scrollView.ScrollableHeight * 100.0).ToString();
00296                     }
00297                 }
00298             }
00299             catch (Exception ex)
00300             {
00301                 string message = "UpdateScrollerChangeViewVerticalScrollPercentage. Exception:" + ex.ToString();
00302
00303                 Debug.WriteLine(message);
00304                 AppendEventMessage(message);
00305             }
00306         }
00307
00308         private void VariableSizedItemsPage_Loaded(object sender, RoutedEventArgs e)
00309         {
00310             HookScrollersEvents();
00311             UpdateItemsRepeaterVerticalCacheLength();
00312             UpdateCmbItemsRepeaterHorizontalAlignment();
00313             UpdateCmbItemsRepeaterVerticalAlignment();
00314             UpdateScrollerVerticalAnchorRatio();
00315             UpdateScrollerVerticalOffset();
00316             UpdateScrollerZoomFactor();
00317             UpdateScrollerVerticalScrollPercentage();
00318             UpdateScrollerScrollableHeight();
00319             UpdateScrollerExtentHeight();
00320             UpdateScrollerChangeViewVerticalScrollPercentage();
00321         }
00322
00323         private string ScrollViewerViewToString(ScrollViewerView scrollViewerView)
00324         {
00325             return "H=" + scrollViewerView.HorizontalOffset.ToString() + ", V=" + scrollViewerView.VerticalOffset + ", ZF=" + scrollViewerView.ZoomFactor;
00326         }
00327
00328         private void ScrollViewer_ViewChanging(object sender, ScrollViewerViewChangingEventArgs args)
00329         {
00330             AppendEventMessage("ViewChanging IsInertial=" + args.IsInertial + ", NextView=(" + ScrollViewerViewToString(args.NextView) + "), FinalView=(" + ScrollViewerViewToString(args.FinalView) + ")");
00331         }
00332
00333         private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs args)
00334         {
00335             AppendEventMessage("ViewChanged IsIntermediate=" + args.IsIntermediate + ", H=" + scrollViewer.HorizontalOffset.ToString() + ", V=" + scrollViewer.VerticalOffset + ", ZF=" + scrollViewer.ZoomFactor);
00336
00337             UpdateExtentHeight();
00338         }
00339
00340         private void ScrollView_ViewChanged(ScrollView sender, object args)
00341         {
00342             AppendEventMessage("ViewChanged H=" + scrollView.HorizontalOffset.ToString() + ", V=" + scrollView.VerticalOffset + ", ZF=" + scrollView.ZoomFactor);
00343
00344             UpdateExtentHeight();
00345         }
00346
00347         private void ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
00348         {
00349             AppendEventMessage($"ScrollAnimationStarting CorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
00350
00351             try
00352             {
00353                 Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;
00354
00355                 if (stockKeyFrameAnimation != null)
00356                 {
00357                     TextBox txtChangeViewWithAnimationDuration = null;
00358
00359                     if (m_changeViewToVerticalOffsetWithAnimationCorrelationId == args.CorrelationId)
00360                     {
00361                         txtChangeViewWithAnimationDuration = txtScrollerChangeViewToVerticalOffsetWithAnimationDuration;
00362                     }
00363                     else if (m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId == args.CorrelationId)
00364                     {
00365                         txtChangeViewWithAnimationDuration = txtScrollerChangeViewToVerticalScrollPercentageWithAnimationDuration;
00366                     }
00367
00368                     if (txtChangeViewWithAnimationDuration != null &&
00369                         txtChangeViewWithAnimationDuration.Text != "N/A" &&
00370                         !string.IsNullOrWhiteSpace(txtChangeViewWithAnimationDuration.Text))
00371                     {
00372                         double durationOverride = Convert.ToDouble(txtChangeViewWithAnimationDuration.Text);
00373
00374                         stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
00375                     }
00376                 }
00377             }
00378             catch (Exception ex)
00379             {
00380                 string message = "ScrollView_ScrollAnimationStarting. Exception:" + ex.ToString();
00381
00382                 Debug.WriteLine(message);
00383                 AppendEventMessage(message);
00384             }
00385         }
00386
00387         private void BtnSwitchScroller_Click(object sender, RoutedEventArgs e)
00388         {
00389             if (btnSwitchScroller.Content as string == "Use ScrollView")
00390             {
00391                 btnSwitchScroller.Content = "Use ScrollViewer";
00392                 btnScrollerChangeViewToZoomFactor.Content = "Jump to ZoomFactor";
00393                 btnScrollerChangeViewToZoomFactorWithAnimation.Content = "Animate to ZoomFactor";
00394                 txtScrollerChangeViewToVerticalOffsetWithAnimationDuration.IsEnabled = true;
00395                 txtScrollerChangeViewToVerticalScrollPercentageWithAnimationDuration.IsEnabled = true;
00396                 txtScrollerChangeViewZoomCenterPoint.IsEnabled = true;
00397                 scrollViewer.Visibility = Visibility.Collapsed;
00398                 scrollView.Visibility = Visibility.Visible;
00399                 scrollViewer.Content = null;
00400                 scrollView.Content = itemsRepeater;
00401             }
00402             else
00403             {
00404                 btnSwitchScroller.Content = "Use ScrollView";
00405                 btnScrollerChangeViewToZoomFactor.Content = "Jump to VerticalOffset/ZoomFactor";
00406                 btnScrollerChangeViewToZoomFactorWithAnimation.Content = "Animate to VerticalOffset/ZoomFactor";
00407                 txtScrollerChangeViewToVerticalOffsetWithAnimationDuration.IsEnabled = false;
00408                 txtScrollerChangeViewToVerticalScrollPercentageWithAnimationDuration.IsEnabled = false;
00409                 txtScrollerChangeViewZoomCenterPoint.IsEnabled = false;
00410                 scrollView.Visibility = Visibility.Collapsed;
00411                 scrollViewer.Visibility = Visibility.Visible;
00412                 scrollView.Content = null;
00413                 scrollViewer.Content = itemsRepeater;
00414             }
00415         }
00416
00417         private void BtnSwitchVariability_Click(object sender, RoutedEventArgs e)
00418         {
00419             if (btnSwitchVariability.Content as string == "Use fixed heights")
00420             {
00421                 btnSwitchVariability.Content = "Use variable heights";
00422                 itemsRepeater.ItemsSource = Enumerable.Range(0, 10000).Select(x => new FixedSizeItem()
00423                 {
00424                     Text = "Item " + x
00425                 });
00426             }
00427             else
00428             {
00429                 btnSwitchVariability.Content = "Use fixed heights";
00430                 itemsRepeater.ItemsSource = Enumerable.Range(0, 10000).Select(x => new VariableSizeItem(x)
00431                 {
00432                     Text = "Item " + x
00433                 });
00434             }
00435         }
00436
00437         private void BtnGetScrollerVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
00438         {
00439             UpdateScrollerVerticalAnchorRatio();
00440         }
00441
00442         private void BtnGetScrollerVerticalOffset_Click(object sender, RoutedEventArgs e)
00443         {
00444             UpdateScrollerVerticalOffset();
00445         }
00446
00447         private void BtnGetScrollerZoomFactor_Click(object sender, RoutedEventArgs e)
00448         {
00449             UpdateScrollerZoomFactor();
00450         }
00451
00452         private void BtnGetScrollerVerticalScrollPercentage_Click(object sender, RoutedEventArgs e)
00453         {
00454             UpdateScrollerVerticalScrollPercentage();
00455         }
00456
00457         private void BtnGetScrollerScrollableHeight_Click(object sender, RoutedEventArgs e)
00458         {
00459             UpdateScrollerScrollableHeight();
00460         }
00461
00462         private void BtnGetScrollerExtentHeight_Click(object sender, RoutedEventArgs e)
00463         {
00464             UpdateScrollerExtentHeight();
00465         }
00466
00467         private void BtnSetScrollerVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
00468         {
00469             try
00470             {
00471                 double verticalAnchorRatio = Convert.ToDouble(txtScrollerVerticalAnchorRatio.Text);
00472
00473                 if (scrollViewer != null)
00474                 {
00475                     scrollViewer.VerticalAnchorRatio = verticalAnchorRatio;
00476                 }
00477                 if (scrollView != null)
00478                 {
00479                     scrollView.VerticalAnchorRatio = verticalAnchorRatio;
00480                 }
00481             }
00482             catch (Exception ex)
00483             {
00484                 string message = "BtnSetScrollerVerticalAnchorRatio_Click. Exception:" + ex.ToString();
00485
00486                 Debug.WriteLine(message);
00487                 AppendEventMessage(message);
00488             }
00489         }
00490
00491         private void BtnScrollerChangeViewToVerticalOffset_Click(object sender, RoutedEventArgs e)
00492         {
00493             try
00494             {
00495                 double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);
00496
00497                 if (scrollViewer != null && scrollViewer.Content != null)
00498                 {
00499                     scrollViewer.ChangeView(null, verticalOffset, null, true);
00500                 }
00501                 else if (scrollView != null)
00502                 {
00503                     scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00504                 }
00505             }
00506             catch (Exception ex)
00507             {
00508                 string message = "BtnScrollerChangeView_Click. Exception:" + ex.ToString();
00509
00510                 Debug.WriteLine(message);
00511                 AppendEventMessage(message);
00512             }
00513         }
00514
00515         private void BtnScrollerChangeViewToVerticalScrollPercentage_Click(object sender, RoutedEventArgs e)
00516         {
00517             try
00518             {
00519                 double verticalScrollPercentage = Convert.ToDouble(txtScrollerChangeViewVerticalScrollPercentage.Text);
00520
00521                 if (scrollViewer != null && scrollViewer.Content != null)
00522                 {
00523                     double verticalOffset = scrollViewer.ScrollableHeight * verticalScrollPercentage / 100.0;
00524
00525                     scrollViewer.ChangeView(null, verticalOffset, null, true);
00526                 }
00527                 else if (scrollView != null)
00528                 {
00529                     double verticalOffset = scrollView.ScrollableHeight * verticalScrollPercentage / 100.0;
00530
00531                     scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00532                 }
00533             }
00534             catch (Exception ex)
00535             {
00536                 string message = "BtnScrollerChangeViewToVerticalScrollPercentage_Click. Exception:" + ex.ToString();
00537
00538                 Debug.WriteLine(message);
00539                 AppendEventMessage(message);
00540             }
00541         }
00542
00543         private void BtnScrollerChangeViewToVerticalOffsetWithAnimation_Click(object sender, RoutedEventArgs e)
00544         {
00545             try
00546             {
00547                 double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);
00548
00549                 if (scrollViewer != null && scrollViewer.Content != null)
00550                 {
00551                     scrollViewer.ChangeView(null, verticalOffset, null, false);
00552                 }
00553                 else if (scrollView != null)
00554                 {
00555                     m_changeViewToVerticalOffsetWithAnimationCorrelationId = scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset);
00556                 }
00557             }
00558             catch (Exception ex)
00559             {
00560                 string message = "BtnScrollerChangeViewWithAnimation_Click. Exception:" + ex.ToString();
00561
00562                 Debug.WriteLine(message);
00563                 AppendEventMessage(message);
00564             }
00565         }
00566
00567         private void BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click(object sender, RoutedEventArgs e)
00568         {
00569             try
00570             {
00571                 double verticalScrollPercentage = Convert.ToDouble(txtScrollerChangeViewVerticalScrollPercentage.Text);
00572
00573                 if (scrollViewer != null && scrollViewer.Content != null)
00574                 {
00575                     double verticalOffset = scrollViewer.ScrollableHeight * verticalScrollPercentage / 100.0;
00576
00577                     scrollViewer.ChangeView(null, verticalOffset, null, false);
00578                 }
00579                 else if (scrollView != null)
00580                 {
00581                     double verticalOffset = scrollView.ScrollableHeight * verticalScrollPercentage / 100.0;
00582
00583                     m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId = scrollView.ScrollTo(scrollView.HorizontalOffset, verticalOffset);
00584                 }
00585             }
00586             catch (Exception ex)
00587             {
00588                 string message = "BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click. Exception:" + ex.ToString();
00589
00590                 Debug.WriteLine(message);
00591                 AppendEventMessage(message);
00592             }
00593         }
00594
00595         private void BtnScrollerChangeViewToZoomFactor_Click(object sender, RoutedEventArgs e)
00596         {
00597             try
00598             {
00599                 double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);
00600                 float zoomFactor = Convert.ToSingle(txtScrollerChangeViewZoomZoomFactor.Text);
00601
00602                 if (scrollViewer != null && scrollViewer.Content != null)
00603                 {
00604                     scrollViewer.ChangeView(
00605                         null,
00606                         verticalOffset,
00607                         zoomFactor,
00608                         true);
00609                 }
00610                 else if (scrollView != null)
00611                 {
00612                     scrollView.ZoomTo(
00613                         zoomFactor,
00614                         (txtScrollerChangeViewZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtScrollerChangeViewZoomCenterPoint.Text),
00615                         new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00616                 }
00617             }
00618             catch (Exception ex)
00619             {
00620                 string message = "BtnScrollerChangeViewToZoomFactor_Click. Exception:" + ex.ToString();
00621
00622                 Debug.WriteLine(message);
00623                 AppendEventMessage(message);
00624             }
00625         }
00626
00627         private void BtnScrollerChangeViewToZoomFactorWithAnimation_Click(object sender, RoutedEventArgs e)
00628         {
00629             try
00630             {
00631                 double verticalOffset = Convert.ToDouble(txtScrollerChangeViewVerticalOffset.Text);
00632                 float zoomFactor = Convert.ToSingle(txtScrollerChangeViewZoomZoomFactor.Text);
00633
00634                 if (scrollViewer != null && scrollViewer.Content != null)
00635                 {
00636                     scrollViewer.ChangeView(
00637                         null,
00638                         verticalOffset,
00639                         zoomFactor,
00640                         false);
00641                 }
00642                 else if (scrollView != null)
00643                 {
00644                     scrollView.ZoomTo(
00645                         zoomFactor,
00646                         (txtScrollerChangeViewZoomCenterPoint.Text == "null") ? (Vector2?)null : ConvertFromStringToVector2(txtScrollerChangeViewZoomCenterPoint.Text));
00647                 }
00648             }
00649             catch (Exception ex)
00650             {
00651                 string message = "BtnScrollerChangeViewToZoomFactorWithAnimation_Click. Exception:" + ex.ToString();
00652
00653                 Debug.WriteLine(message);
00654                 AppendEventMessage(message);
00655             }
00656         }
00657
00658         private void BtnGetScrollerChangeViewVerticalOffset_Click(object sender, RoutedEventArgs e)
00659         {
00660             try
00661             {
00662                 if (txtScrollerChangeViewVerticalScrollPercentage.Text == "N/A")
00663                 {
00664                     txtScrollerChangeViewVerticalOffset.Text = "N/A";
00665                     return;
00666                 }
00667
00668                 double verticalScrollPercentage = Convert.ToDouble(txtScrollerChangeViewVerticalScrollPercentage.Text);
00669
00670                 if (scrollViewer != null && scrollViewer.Content != null)
00671                 {
00672                     txtScrollerChangeViewVerticalOffset.Text = (scrollViewer.ScrollableHeight * verticalScrollPercentage / 100.0).ToString();
00673                 }
00674                 else if (scrollView != null)
00675                 {
00676                     txtScrollerChangeViewVerticalOffset.Text = (scrollView.ScrollableHeight * verticalScrollPercentage / 100.0).ToString();
00677                 }
00678             }
00679             catch (Exception ex)
00680             {
00681                 string message = "BtnGetScrollerChangeViewVerticalOffset_Click. Exception:" + ex.ToString();
00682
00683                 Debug.WriteLine(message);
00684                 AppendEventMessage(message);
00685             }
00686         }
00687
00688         private void BtnGetScrollerChangeViewVerticalScrollPercentage_Click(object sender, RoutedEventArgs e)
00689         {
00690             UpdateScrollerChangeViewVerticalScrollPercentage();
00691         }
00692
00693         private void BtnGetItemsRepeaterVerticalCacheLength_Click(object sender, RoutedEventArgs e)
00694         {
00695             UpdateItemsRepeaterVerticalCacheLength();
00696         }
00697
00698         private void BtnSetItemsRepeaterVerticalCacheLength_Click(object sender, RoutedEventArgs e)
00699         {
00700             try
00701             {
00702                 if (itemsRepeater != null)
00703                 {
00704                     itemsRepeater.VerticalCacheLength = Convert.ToDouble(txtItemsRepeaterVerticalCacheLength.Text);
00705                 }
00706             }
00707             catch (Exception ex)
00708             {
00709                 string message = "BtnSetItemsRepeaterVerticalCacheLength_Click. Exception:" + ex.ToString();
00710
00711                 Debug.WriteLine(message);
00712                 AppendEventMessage(message);
00713             }
00714         }
00715
00716         private void CmbItemsRepeaterHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00717         {
00718             if (itemsRepeater != null)
00719             {
00720                 itemsRepeater.HorizontalAlignment = (HorizontalAlignment)cmbItemsRepeaterHorizontalAlignment.SelectedIndex;
00721             }
00722         }
00723
00724         private void UpdateCmbItemsRepeaterHorizontalAlignment()
00725         {
00726             if (itemsRepeater != null)
00727             {
00728                 cmbItemsRepeaterHorizontalAlignment.SelectedIndex = (int)itemsRepeater.HorizontalAlignment;
00729             }
00730         }
00731
00732         private void CmbItemsRepeaterVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00733         {
00734             if (itemsRepeater != null)
00735             {
00736                 itemsRepeater.VerticalAlignment = (VerticalAlignment)cmbItemsRepeaterVerticalAlignment.SelectedIndex;
00737             }
00738         }
00739
00740         private void UpdateCmbItemsRepeaterVerticalAlignment()
00741         {
00742             if (itemsRepeater != null)
00743             {
00744                 cmbItemsRepeaterVerticalAlignment.SelectedIndex = (int)itemsRepeater.VerticalAlignment;
00745             }
00746         }
00747
00748         private void BtnClearEvents_Click(object sender, RoutedEventArgs e)
00749         {
00750             if (lstEvents != null)
00751             {
00752                 lstEvents.Items.Clear();
00753             }
00754         }
00755
00756         private Vector2 ConvertFromStringToVector2(string value)
00757         {
00758             float x = 0, y = 0;
00759
00760             int commaIndex = value.IndexOf(',');
00761             if (commaIndex != -1)
00762             {
00763                 x = Convert.ToSingle(value.Substring(0, commaIndex));
00764                 y = Convert.ToSingle(value.Substring(commaIndex + 1));
00765             }
00766
00767             return new Vector2(x, y);
00768         }
00769     }
00770
00771     public class FixedSizeItem
00772     {
00773         public FixedSizeItem()
00774         {
00775             Size = 50;
00776         }
00777
00778         public string Text { get; set; }
00779         public int Size { get; set; }
00780     }
00781
00782     public class VariableSizeItem
00783     {
00784         public VariableSizeItem(int sizeSeed)
00785         {
00786             long size = (sizeSeed + 9) * (sizeSeed + 10) * (sizeSeed + 11);
00787             string sizeStr = size.ToString();
00788             sizeStr = sizeStr.Substring(sizeStr.Length - 2);
00789             size = long.Parse(sizeStr) * 2;
00790             Size = Math.Max((int)size, 24);
00791         }
00792
00793         public string Text { get; set; }
00794         public int Size { get; set; }
00795     }
00796 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemTemplateSamples/DisposableUserControl.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemTemplateSamples

DisposableUserControl.xaml.cs

Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.IO;
00004 using System.Linq;
00005 using System.Runtime.InteropServices.WindowsRuntime;
00006 using System.Threading;
00007 using Windows.Foundation;
00008 using Windows.Foundation.Collections;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Controls.Primitives;
00012 using Microsoft.UI.Xaml.Data;
00013 using Microsoft.UI.Xaml.Input;
00014 using Microsoft.UI.Xaml.Media;
00015 using Microsoft.UI.Xaml.Navigation;
00016
00017 // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
00018
00019 namespace MUXControlsTestApp.Samples
00020 {
00021     public sealed partial class DisposableUserControl : UserControl
00022     {
00023
00024         public int Number
00025         {
00026             get { return (int)GetValue(NumberProperty); }
00027             set { SetValue(NumberProperty, value); }
00028         }
00029
00030         public static readonly DependencyProperty NumberProperty =
00031             DependencyProperty.Register("Number", typeof(int), typeof(DisposableUserControl), new PropertyMetadata(-1));
00032
00033
00034         public static int OpenItems { get { return _counter; } }
00035         private static int _counter = 0;
00036
00037         public DisposableUserControl()
00038         {
00039             Interlocked.Increment(ref _counter);
00040             this.InitializeComponent();
00041         }
00042
00043         ~DisposableUserControl()
00044         {
00045             Interlocked.Decrement(ref _counter);
00046         }
00047     }
00048 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewInteractions.cpp Source File

  • File List
  • File Members
  • ItemsView

ItemsViewInteractions.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include <DoubleUtil.h>
00007 #include "TypeLogging.h"
00008 #include "ItemsView.h"
00009 #include "RuntimeProfiler.h"
00010 #include "ItemsViewTestHooks.h"
00011 #include "ItemsViewItemInvokedEventArgs.h"
00012 #include "NullSelector.h"
00013 #include "SharedHelpers.h"
00014 #include "SingleSelector.h"
00015 #include "ItemContainerRevokers.h"
00016
00017 #pragma region IControlOverrides
00018
00019 void ItemsView::OnKeyDown(
00020     winrt::KeyRoutedEventArgs const& args)
00021 {
00022     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::KeyRoutedEventArgsToString(args).c_str());
00023
00024     __super::OnKeyDown(args);
00025
00026     if (args.Handled())
00027     {
00028         return;
00029     }
00030
00031     switch (args.Key())
00032     {
00033     case winrt::VirtualKey::A:
00034     {
00035         if (m_selector != nullptr)
00036         {
00037             const winrt::ItemsViewSelectionMode selectionMode = SelectionMode();
00038
00039             if (selectionMode != winrt::ItemsViewSelectionMode::None &&
00040                 selectionMode != winrt::ItemsViewSelectionMode::Single &&
00041                 (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down)
00042             {
00043                 m_selector->SelectAll();
00044                 args.Handled(true);
00045             }
00046         }
00047         break;
00048     }
00049     }
00050 }
00051
00052 #pragma endregion
00053
00054 // Returns True when the provided virtual key and navigation key are canceling each other.
00055 bool ItemsView::AreNavigationKeysOpposite(
00056     const winrt::VirtualKey& key1,
00057     const winrt::VirtualKey& key2) const
00058 {
00059     MUX_ASSERT(IsNavigationKey(key1));
00060     MUX_ASSERT(IsNavigationKey(key2));
00061
00062     return (key1 == winrt::VirtualKey::Left && key2 == winrt::VirtualKey::Right) ||
00063            (key1 == winrt::VirtualKey::Right && key2 == winrt::VirtualKey::Left) ||
00064            (key1 == winrt::VirtualKey::Up && key2 == winrt::VirtualKey::Down) ||
00065            (key1 == winrt::VirtualKey::Down && key2 == winrt::VirtualKey::Up);
00066 }
00067
00068 // Returns True when ScrollView.ComputedVerticalScrollMode is Enabled.
00069 bool ItemsView::CanScrollVertically()
00070 {
00071     if (auto const& scrollView = m_scrollView.get())
00072     {
00073         return scrollView.ComputedVerticalScrollMode() == winrt::ScrollingScrollMode::Enabled;
00074     }
00075     return false;
00076 }
00077
00078 // Returns the index of the closest focusable element to the current element following the provided direction, or -1 when no element was found.
00079 // hasIndexBasedLayoutOrientation indicates whether the Layout has one orientation that has an index-based layout.
00080 int ItemsView::GetAdjacentFocusableElementByDirection(
00081     const winrt::FocusNavigationDirection& focusNavigationDirection,
00082     bool hasIndexBasedLayoutOrientation)
00083 {
00084     int currentElementIndex = GetCurrentElementIndex();
00085
00086     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, focusNavigationDirection, currentElementIndex);
00087
00088     MUX_ASSERT(
00089         focusNavigationDirection == winrt::FocusNavigationDirection::Up ||
00090         focusNavigationDirection == winrt::FocusNavigationDirection::Down ||
00091         focusNavigationDirection == winrt::FocusNavigationDirection::Left ||
00092         focusNavigationDirection == winrt::FocusNavigationDirection::Right);
00093
00094     if (currentElementIndex == -1)
00095     {
00096         return -1;
00097     }
00098
00099     auto currentElement = TryGetElement(currentElementIndex);
00100
00101     if (currentElement == nullptr)
00102     {
00103         const bool startBringItemIntoViewSuccess = StartBringItemIntoViewInternal(true /*throwOutOfBounds*/, false /* throwOnAnyFailure */, currentElementIndex, nullptr /* options */);
00104
00105         currentElementIndex = GetCurrentElementIndex();
00106
00107         if (!startBringItemIntoViewSuccess || currentElementIndex == -1)
00108         {
00109             return -1;
00110         }
00111
00112         currentElement = TryGetElement(currentElementIndex);
00113
00114         if (currentElement == nullptr)
00115         {
00116             return -1;
00117         }
00118     }
00119
00120     auto const& itemsRepeater = m_itemsRepeater.get();
00121
00122     MUX_ASSERT(itemsRepeater != nullptr);
00123
00124     auto const& itemsSourceView = itemsRepeater.ItemsSourceView();
00125
00126     MUX_ASSERT(itemsSourceView != nullptr);
00127
00128     const int itemsCount = itemsSourceView.Count();
00129
00130     MUX_ASSERT(itemsCount > 0);
00131
00132     const bool useKeyboardNavigationReferenceHorizontalOffset =
00133         focusNavigationDirection == winrt::FocusNavigationDirection::Up ||
00134         focusNavigationDirection == winrt::FocusNavigationDirection::Down;
00135
00136     MUX_ASSERT((useKeyboardNavigationReferenceHorizontalOffset && m_keyboardNavigationReferenceRect.X != -1.0f) ||
00137         (!useKeyboardNavigationReferenceHorizontalOffset && m_keyboardNavigationReferenceRect.Y != -1.0f));
00138
00139     const winrt::Rect currentElementRect = GetElementRect(currentElement, itemsRepeater);
00140     const winrt::Point keyboardNavigationReferenceOffsetPoint = GetUpdatedKeyboardNavigationReferenceOffset();
00141     const float keyboardNavigationReferenceOffset = useKeyboardNavigationReferenceHorizontalOffset ? keyboardNavigationReferenceOffsetPoint.X : keyboardNavigationReferenceOffsetPoint.Y;
00142
00143     MUX_ASSERT(keyboardNavigationReferenceOffset != -1.0f);
00144
00145     bool getPreviousFocusableElement = focusNavigationDirection == winrt::FocusNavigationDirection::Up || focusNavigationDirection == winrt::FocusNavigationDirection::Left;
00146     bool traversalDirectionChanged = false;
00147     int closestElementIndex = -1;
00148     int itemIndex = getPreviousFocusableElement ? currentElementIndex - 1 : currentElementIndex + 1;
00149     float smallestDistance = std::numeric_limits<float>::max();
00150     float smallestNavigationDirectionDistance = std::numeric_limits<float>::max();
00151     float smallestNoneNavigationDirectionDistance = std::numeric_limits<float>::max();
00152     const double roundingScaleFactor = GetRoundingScaleFactor(itemsRepeater);
00153
00154     while ((getPreviousFocusableElement && itemIndex >= 0) || (!getPreviousFocusableElement && itemIndex < itemsCount))
00155     {
00156         auto element = itemsRepeater.TryGetElement(itemIndex);
00157
00158         if (element == nullptr)
00159         {
00160             if (hasIndexBasedLayoutOrientation)
00161             {
00162                 if (smallestNoneNavigationDirectionDistance == std::numeric_limits<float>::max())
00163                 {
00164                     // Ran out of realized items and smallestNoneNavigationDirectionDistance still has its initial float::max value.
00165                     // Assuming no qualifying item will be found, return -1 instead of realizing more items and bringing them into view.
00166                     return -1;
00167                 }
00168
00169                 // Bring the still unrealized item into view to realize it.
00170                 const bool startBringItemIntoViewSuccess = StartBringItemIntoViewInternal(true /* throwOutOfBounds */, false /* throwOnAnyFailure */, itemIndex, nullptr /*options*/);
00171
00172                 if (!startBringItemIntoViewSuccess)
00173                 {
00174                     return -1;
00175                 }
00176
00177                 element = itemsRepeater.TryGetElement(itemIndex);
00178             }
00179             else
00180             {
00181                 // When the Layout has no index-based orientation, all items are traversed to find the closest one.
00182                 // First a traversal from the current item to one end, and then from the current item to the other end.
00183                 if (traversalDirectionChanged)
00184                 {
00185                     // Both traversals were performed. Return the resulting closest index.
00186                     return closestElementIndex;
00187                 }
00188                 else
00189                 {
00190                     // Do the second traversal in the opposite direction.
00191                     traversalDirectionChanged = true;
00192                     getPreviousFocusableElement = !getPreviousFocusableElement;
00193                     itemIndex = getPreviousFocusableElement ? currentElementIndex - 1 : currentElementIndex + 1;
00194                     continue;
00195                 }
00196             }
00197         }
00198
00199         MUX_ASSERT(element != nullptr);
00200
00201         if (SharedHelpers::IsFocusableElement(element))
00202         {
00203             float navigationDirectionDistance = std::numeric_limits<float>::max();
00204             float noneNavigationDirectionDistance = std::numeric_limits<float>::max();
00205
00206             GetDistanceToKeyboardNavigationReferenceOffset(
00207                 focusNavigationDirection,
00208                 currentElementRect,
00209                 element,
00210                 itemsRepeater,
00211                 keyboardNavigationReferenceOffset,
00212                 roundingScaleFactor,
00213                 &navigationDirectionDistance,
00214                 &noneNavigationDirectionDistance);
00215
00216             MUX_ASSERT(navigationDirectionDistance >= 0.0f);
00217             MUX_ASSERT(noneNavigationDirectionDistance >= 0.0f);
00218
00219             if (navigationDirectionDistance <= 1.0f / static_cast<float>(roundingScaleFactor) && noneNavigationDirectionDistance <= 1.0f / static_cast<float>(roundingScaleFactor))
00220             {
00221                 // Stop the search right away since an element at the target point was found.
00222                 return itemIndex;
00223             }
00224             else if (hasIndexBasedLayoutOrientation)
00225             {
00226                 // When the Layout has an index-based orientation, its orthogonal orientation defines the primary (favored) distance. The index-based orientation defines a secondary distance.
00227                 if (noneNavigationDirectionDistance < smallestNoneNavigationDirectionDistance ||
00228                     (noneNavigationDirectionDistance == smallestNoneNavigationDirectionDistance && navigationDirectionDistance < smallestNavigationDirectionDistance))
00229                 {
00230                     smallestNoneNavigationDirectionDistance = noneNavigationDirectionDistance;
00231                     smallestNavigationDirectionDistance = navigationDirectionDistance;
00232                     closestElementIndex = itemIndex;
00233                 }
00234                 else if (noneNavigationDirectionDistance > smallestNoneNavigationDirectionDistance)
00235                 {
00236                     return closestElementIndex;
00237                 }
00238             }
00239             else
00240             {
00241                 // When the Layout has no index-based orientation, the typical Euclidean distance is used.
00242                 const float distance = std::pow(navigationDirectionDistance, 2.0f) + std::pow(noneNavigationDirectionDistance, 2.0f);
00243
00244                 if (distance < smallestDistance)
00245                 {
00246                     smallestDistance = distance;
00247                     closestElementIndex = itemIndex;
00248                 }
00249             }
00250         }
00251
00252         itemIndex = getPreviousFocusableElement ? itemIndex - 1 : itemIndex + 1;
00253     }
00254
00255     return closestElementIndex;
00256 }
00257
00258 // Returns the index of the previous or next focusable element from the current element, or -1 when no element was found.
00259 int ItemsView::GetAdjacentFocusableElementByIndex(
00260     bool getPreviousFocusableElement)
00261 {
00262     int currentElementIndex = GetCurrentElementIndex();
00263
00264     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, getPreviousFocusableElement, currentElementIndex);
00265
00266     if (currentElementIndex == -1)
00267     {
00268         return -1;
00269     }
00270
00271     auto const& currentElement = TryGetElement(currentElementIndex);
00272
00273     if (currentElement == nullptr)
00274     {
00275         // Realize the current element so its neighbors are available for evaluation.
00276         const bool startBringItemIntoViewSuccess = StartBringItemIntoViewInternal(false /*throwOutOfBounds*/, false /* throwOnAnyFailure */, currentElementIndex, nullptr /*options*/);
00277
00278         currentElementIndex = GetCurrentElementIndex();
00279
00280         if (!startBringItemIntoViewSuccess || currentElementIndex == -1 || TryGetElement(currentElementIndex) == nullptr)
00281         {
00282             return -1;
00283         }
00284     }
00285
00286     auto const& itemsRepeater = m_itemsRepeater.get();
00287
00288     MUX_ASSERT(itemsRepeater != nullptr);
00289
00290     auto const& itemsSourceView = itemsRepeater.ItemsSourceView();
00291
00292     MUX_ASSERT(itemsSourceView != nullptr);
00293
00294     const int itemsCount = itemsSourceView.Count();
00295
00296     MUX_ASSERT(itemsCount > 0);
00297
00298     // Because we are dealing with an index-based layout, the search is only done in one direction.
00299     int itemIndex = getPreviousFocusableElement ? currentElementIndex - 1 : currentElementIndex + 1;
00300
00301     while ((getPreviousFocusableElement && itemIndex >= 0) || (!getPreviousFocusableElement && itemIndex < itemsCount))
00302     {
00303         auto element = itemsRepeater.TryGetElement(itemIndex);
00304
00305         if (element == nullptr)
00306         {
00307             const bool startBringItemIntoViewSuccess = StartBringItemIntoViewInternal(false /*throwOutOfBounds*/, false /* throwOnAnyFailure */, itemIndex, nullptr /*options*/);
00308
00309             if (!startBringItemIntoViewSuccess)
00310             {
00311                 return -1;
00312             }
00313
00314             element = itemsRepeater.TryGetElement(itemIndex);
00315         }
00316
00317         MUX_ASSERT(element != nullptr);
00318
00319         if (SharedHelpers::IsFocusableElement(element))
00320         {
00321             return itemIndex;
00322         }
00323
00324         itemIndex = getPreviousFocusableElement ? itemIndex - 1 : itemIndex + 1;
00325     }
00326
00327     return -1;
00328 }
00329
00330 // When focusNavigationDirection is FocusNavigationDirection::Up or FocusNavigationDirection::Down, keyboardNavigationReferenceOffset indicates a vertical line
00331 // to get the distance from 'element'. Otherwise keyboardNavigationReferenceOffset indicates a horizontal line.
00332 void ItemsView::GetDistanceToKeyboardNavigationReferenceOffset(
00333     const winrt::FocusNavigationDirection& focusNavigationDirection,
00334     const winrt::Rect& currentElementRect,
00335     const winrt::UIElement& element,
00336     const winrt::ItemsRepeater& itemsRepeater,
00337     float keyboardNavigationReferenceOffset,
00338     double roundingScaleFactor,
00339     float* navigationDirectionDistance,
00340     float* noneNavigationDirectionDistance) const
00341 {
00342     MUX_ASSERT(focusNavigationDirection == winrt::FocusNavigationDirection::Up ||
00343         focusNavigationDirection == winrt::FocusNavigationDirection::Down ||
00344         focusNavigationDirection == winrt::FocusNavigationDirection::Left ||
00345         focusNavigationDirection == winrt::FocusNavigationDirection::Right);
00346     MUX_ASSERT(element != nullptr);
00347     MUX_ASSERT(itemsRepeater != nullptr);
00348     MUX_ASSERT(navigationDirectionDistance != nullptr);
00349     MUX_ASSERT(noneNavigationDirectionDistance != nullptr);
00350     MUX_ASSERT(keyboardNavigationReferenceOffset != -1.0f);
00351     MUX_ASSERT(roundingScaleFactor > 0.0);
00352
00353     *noneNavigationDirectionDistance = *navigationDirectionDistance = std::numeric_limits<float>::max();
00354
00355     winrt::Rect elementRect = GetElementRect(element, itemsRepeater);
00356     const double roundingMargin = roundingScaleFactor <= 1.0 ? 0.5 : 2.0 / roundingScaleFactor;
00357
00358     if (focusNavigationDirection == winrt::FocusNavigationDirection::Up &&
00359         static_cast<double>(elementRect.Y) + static_cast<double>(elementRect.Height) > static_cast<double>(currentElementRect.Y) + roundingMargin)
00360     {
00361         // This element is disqualified because it is not placed at the top of currentElement.
00362         return;
00363     }
00364
00365     if (focusNavigationDirection == winrt::FocusNavigationDirection::Down &&
00366         static_cast<double>(elementRect.Y) + roundingMargin < static_cast<double>(currentElementRect.Y) + static_cast<double>(currentElementRect.Height))
00367     {
00368         // This element is disqualified because it is not placed at the bottom of currentElement.
00369         return;
00370     }
00371
00372     if (focusNavigationDirection == winrt::FocusNavigationDirection::Left &&
00373         static_cast<double>(elementRect.X) + static_cast<double>(elementRect.Width) > static_cast<double>(currentElementRect.X) + roundingMargin)
00374     {
00375         // This element is disqualified because it is not placed at the left of currentElement.
00376         return;
00377     }
00378
00379     if (focusNavigationDirection == winrt::FocusNavigationDirection::Right &&
00380         static_cast<double>(elementRect.X) + roundingMargin < static_cast<double>(currentElementRect.X) + static_cast<double>(currentElementRect.Width))
00381     {
00382         // This element is disqualified because it is not placed at the right of currentElement.
00383         return;
00384     }
00385
00386     switch (focusNavigationDirection)
00387     {
00388     case winrt::FocusNavigationDirection::Up:
00389         *noneNavigationDirectionDistance = currentElementRect.Y - elementRect.Y - elementRect.Height;
00390         break;
00391     case winrt::FocusNavigationDirection::Down:
00392         *noneNavigationDirectionDistance = elementRect.Y - currentElementRect.Y - currentElementRect.Height;
00393         break;
00394     case winrt::FocusNavigationDirection::Left:
00395         *noneNavigationDirectionDistance = currentElementRect.X - elementRect.X - elementRect.Width;
00396         break;
00397     case winrt::FocusNavigationDirection::Right:
00398         *noneNavigationDirectionDistance = elementRect.X - currentElementRect.X - currentElementRect.Width;
00399         break;
00400     }
00401
00402     MUX_ASSERT(*noneNavigationDirectionDistance >= -roundingMargin);
00403
00404     *noneNavigationDirectionDistance = std::max(0.0f, *noneNavigationDirectionDistance);
00405
00406     if (focusNavigationDirection == winrt::FocusNavigationDirection::Up || focusNavigationDirection == winrt::FocusNavigationDirection::Down)
00407     {
00408         *navigationDirectionDistance = std::abs(elementRect.X + elementRect.Width / 2.0f - keyboardNavigationReferenceOffset);
00409     }
00410     else
00411     {
00412         *navigationDirectionDistance = std::abs(elementRect.Y + elementRect.Height / 2.0f - keyboardNavigationReferenceOffset);
00413     }
00414 }
00415
00416 // Returns the position within the ItemsRepeater + size of the provided element as a Rect.
00417 // The potential element.Margin is not included in the returned rectangle.
00418 winrt::Rect ItemsView::GetElementRect(
00419     const winrt::UIElement& element,
00420     const winrt::ItemsRepeater& itemsRepeater) const
00421 {
00422     MUX_ASSERT(element != nullptr);
00423     MUX_ASSERT(itemsRepeater != nullptr);
00424
00425     auto const generalTransform = element.TransformToVisual(itemsRepeater);
00426     auto const elementOffset = generalTransform.TransformPoint(winrt::Point(0, 0));
00427
00428     if (auto const elementAsFE = element.as<winrt::FrameworkElement>())
00429     {
00430         auto const farSideOffset = generalTransform.TransformPoint(winrt::Point(
00431             static_cast<float>(elementAsFE.ActualWidth()),
00432             static_cast<float>(elementAsFE.ActualHeight())));
00433
00434         return winrt::Rect{
00435             elementOffset.X,
00436             elementOffset.Y,
00437             farSideOffset.X - elementOffset.X,
00438             farSideOffset.Y - elementOffset.Y };
00439     }
00440     else
00441     {
00442         return winrt::Rect{
00443             elementOffset.X,
00444             elementOffset.Y,
00445             0.0f,
00446             0.0f };
00447     }
00448 }
00449
00450 winrt::IndexBasedLayoutOrientation ItemsView::GetLayoutIndexBasedLayoutOrientation()
00451 {
00452     if (auto const& layout = Layout())
00453     {
00454         return layout.IndexBasedLayoutOrientation();
00455     }
00456     return winrt::IndexBasedLayoutOrientation::None;
00457 }
00458
00459 // Returns the number of most recently queued navigation keys of the same kind.
00460 int ItemsView::GetTrailingNavigationKeyCount() const
00461 {
00462     MUX_ASSERT(!m_navigationKeysToProcess.empty());
00463
00464     winrt::VirtualKey lastNavigationKey = m_navigationKeysToProcess.back();
00465     int count = 0;
00466     auto iterator = m_navigationKeysToProcess.end();
00467     iterator--;
00468
00469     while (*iterator == lastNavigationKey)
00470     {
00471         count++;
00472         if (iterator == m_navigationKeysToProcess.begin())
00473         {
00474             break;
00475         }
00476         iterator--;
00477     }
00478
00479     MUX_ASSERT(count > 0);
00480
00481     return count;
00482 }
00483
00484 // Returns the Point within the ItemsRepeater representing the reference for non-index-based orientation keyboard navigation.
00485 // Both X and Y are relevant for Layouts that have no index-based orientation.
00486 winrt::Point ItemsView::GetUpdatedKeyboardNavigationReferenceOffset()
00487 {
00488     if (m_keyboardNavigationReferenceIndex != -1)
00489     {
00490         MUX_ASSERT(m_keyboardNavigationReferenceRect.X != -1.0f);
00491         MUX_ASSERT(m_keyboardNavigationReferenceRect.Y != -1.0f);
00492
00493         if (auto const& itemsRepeater = m_itemsRepeater.get())
00494         {
00495             if (auto const& keyboardNavigationReferenceElement = itemsRepeater.TryGetElement(m_keyboardNavigationReferenceIndex))
00496             {
00497                 winrt::Rect keyboardNavigationReferenceRect = GetElementRect(keyboardNavigationReferenceElement, itemsRepeater);
00498
00499                 if (keyboardNavigationReferenceRect.X + keyboardNavigationReferenceRect.Width >= 0 && keyboardNavigationReferenceRect.Y + keyboardNavigationReferenceRect.Height >= 0)
00500                 {
00501                     if (keyboardNavigationReferenceRect != m_keyboardNavigationReferenceRect)
00502                     {
00503                         UpdateKeyboardNavigationReference();
00504                     }
00505                 }
00506                 // Else the keyboard navigation reference element was pinned and placed out of bounds. Use the cached m_keyboardNavigationReferenceRect.
00507             }
00508             // Else the keyboard navigation reference element was unrealized. Use the cached m_keyboardNavigationReferenceRect.
00509         }
00510     }
00511
00512     MUX_ASSERT((m_keyboardNavigationReferenceRect.X == -1.0f && m_keyboardNavigationReferenceIndex == -1) || (m_keyboardNavigationReferenceRect.X != -1.0f && m_keyboardNavigationReferenceIndex != -1));
00513
00514     return GetKeyboardNavigationReferenceOffset();
00515 }
00516
00517 // Returns True when the provided incoming navigation key is canceled
00518 // - because of input throttling
00519 // - because it is the opposite of the last queued key.
00520 // This method also clears all queued up keys when the incoming key is Home or End.
00521 bool ItemsView::IsCancelingNavigationKey(
00522     const winrt::VirtualKey& key,
00523     bool isRepeatKey)
00524 {
00525     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"key", key);
00526     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"isRepeatKey", isRepeatKey);
00527     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"queued keys size", m_navigationKeysToProcess.size());
00528
00529     MUX_ASSERT(IsNavigationKey(key));
00530
00531     if (m_navigationKeysToProcess.empty())
00532     {
00533         return false;
00534     }
00535
00536     // Maximum number of unprocessed keystrokes of the same kind being queued in m_navigationKeysToProcess.
00537     constexpr int maxRepeatQueuedNavigationKeys = 3;    // Do not queue more than 3 identical navigation keys with a repeat count > 1.
00538     constexpr int maxNonRepeatQueuedNavigationKeys = 6; // Do not queue more than 6 identical navigation keys with a repeat count = 1.
00539     // Keystrokes without holding down the key are more likely to have a repeat count of 1 and are more liberally queued up because more intentional.
00540
00541     winrt::VirtualKey lastNavigationKey = m_navigationKeysToProcess.back();
00542
00543     if (lastNavigationKey == key)
00544     {
00545         // Incoming key is identical to the last queued up.
00546         const int trailingNavigationKeyCount = GetTrailingNavigationKeyCount();
00547
00548         if ((trailingNavigationKeyCount >= maxRepeatQueuedNavigationKeys && isRepeatKey) ||
00549             (trailingNavigationKeyCount >= maxNonRepeatQueuedNavigationKeys && !isRepeatKey))
00550         {
00551             ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Navigation keys throttling.");
00552
00553             // Incoming key is canceled to avoid lenghty processing after keyboard input stops.
00554             return true;
00555         }
00556     }
00557
00558     switch (key)
00559     {
00560     case winrt::VirtualKey::Home:
00561     case winrt::VirtualKey::End:
00562     {
00563         // Any navigation key queued before a Home or End key can be canceled.
00564         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Navigation keys list cleared for Home/End.");
00565
00566         m_navigationKeysToProcess.clear();
00567         break;
00568     }
00569     default:
00570     {
00571         if (AreNavigationKeysOpposite(key, lastNavigationKey))
00572         {
00573             ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Incoming key and last queued navigation key canceled.");
00574
00575             // The incoming key and last queued navigation key are canceling each other and neither need to be processed.
00576             m_navigationKeysToProcess.pop_back();
00577             return true;
00578         }
00579         break;
00580     }
00581     }
00582
00583     return false;
00584 }
00585
00586 bool ItemsView::IsLayoutOrientationIndexBased(bool horizontal)
00587 {
00588     const winrt::IndexBasedLayoutOrientation indexBasedLayoutOrientation = GetLayoutIndexBasedLayoutOrientation();
00589
00590     return (horizontal && indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::LeftToRight) ||
00591         (!horizontal && indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::TopToBottom);
00592 }
00593
00594 bool ItemsView::IsNavigationKey(
00595     const winrt::VirtualKey& key) const
00596 {
00597     switch (key)
00598     {
00599     case winrt::VirtualKey::Home:
00600     case winrt::VirtualKey::End:
00601     case winrt::VirtualKey::Left:
00602     case winrt::VirtualKey::Right:
00603     case winrt::VirtualKey::Up:
00604     case winrt::VirtualKey::Down:
00605     case winrt::VirtualKey::PageUp:
00606     case winrt::VirtualKey::PageDown:
00607         return true;
00608     }
00609
00610     return false;
00611 }
00612
00613 void ItemsView::OnItemsViewElementGettingFocus(
00614     const winrt::UIElement& element,
00615     const winrt::GettingFocusEventArgs& args)
00616 {
00617     auto const& focusState = args.FocusState();
00618
00619     ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::FocusStateToString(focusState).c_str());
00620
00621     if (focusState == winrt::FocusState::Keyboard)
00622     {
00623         const int elementIndex = GetElementIndex(element);
00624         int currentElementIndex = GetCurrentElementIndex();
00625         bool focusMovingIntoItemsRepeater{ true };
00626
00627         // Check if the focus comes from an element outside the scope of the inner ItemsRepeater.
00628         if (auto const& itemsRepeater = m_itemsRepeater.get())
00629         {
00630             auto const& oldFocusedElement = args.OldFocusedElement();
00631
00632             if (oldFocusedElement && SharedHelpers::IsAncestor(oldFocusedElement, itemsRepeater, false /*checkVisibility*/))
00633             {
00634                 focusMovingIntoItemsRepeater = false;
00635             }
00636         }
00637
00638         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"ElementIndex", elementIndex);
00639         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"CurrentElementIndex", currentElementIndex);
00640         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"FocusMovingIntoItemsRepeater", focusMovingIntoItemsRepeater);
00641         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Direction", static_cast<int>(args.Direction()));
00642
00643         if (currentElementIndex != elementIndex && focusMovingIntoItemsRepeater)
00644         {
00645             if (currentElementIndex == -1)
00646             {
00647                 auto const& direction = args.Direction();
00648
00649                 if (direction == winrt::FocusNavigationDirection::Previous || direction == winrt::FocusNavigationDirection::Next)
00650                 {
00651                     // Tabbing (direction == FocusNavigationDirection::Next) or Shift-Tabbing (direction == FocusNavigationDirection::Previous) into
00652                     // the ItemsRepeater while there is no current element.
00653
00654                     int focusableItemIndex{ -1 };
00655
00656                     // When these conditions are fulfilled, set the selected item as the current one.
00657                     // - TabNavigation is Once
00658                     // - SelectionMode is Single
00659                     // - an item is selected and is focusable
00660                     if (TabNavigation() == winrt::KeyboardNavigationMode::Once &&
00661                         SelectionMode() == winrt::ItemsViewSelectionMode::Single)
00662                     {
00663                         const auto selectedItem = m_selectionModel.SelectedItem().as<winrt::UIElement>();
00664
00665                         if (selectedItem && SharedHelpers::IsFocusableElement(selectedItem))
00666                         {
00667                             winrt::IndexPath selectedItemIndexPath = m_selectionModel.SelectedIndex();
00668                             MUX_ASSERT(selectedItemIndexPath != nullptr && selectedItemIndexPath.GetSize() == 1);
00669
00670                             focusableItemIndex = selectedItemIndexPath.GetAt(0);
00671                             MUX_ASSERT(focusableItemIndex != -1);
00672                         }
00673                     }
00674
00675                     if (focusableItemIndex == -1)
00676                     {
00677                         // Retrieve the focusable index on the top/left corner for Tabbing, or bottom/right corner for Shift-Tabbing.
00678                         focusableItemIndex = ItemsView::GetCornerFocusableItem(direction == winrt::FocusNavigationDirection::Next /*isForTopLeftItem*/);
00679                         MUX_ASSERT(focusableItemIndex != -1);
00680                     }
00681
00682                     // Set that index as the current one.
00683                     SetCurrentElementIndex(focusableItemIndex, winrt::FocusState::Unfocused, false /*forceKeyboardNavigationReferenceReset*/);
00684                     MUX_ASSERT(focusableItemIndex == GetCurrentElementIndex());
00685
00686                     // Allow TrySetNewFocusedElement to be called below for that new current element.
00687                     currentElementIndex = focusableItemIndex;
00688                 }
00689             }
00690
00691             if (currentElementIndex != -1)
00692             {
00693                 // The ItemsView has a current element other than the one receiving focus, and focus is moving into the ItemsRepeater.
00694                 auto currentElement = TryGetElement(currentElementIndex);
00695
00696                 if (currentElement == nullptr)
00697                 {
00698                     // Realize the current element.
00699                     const bool startBringItemIntoViewSuccess = StartBringItemIntoViewInternal(true /* throwOutOfBounds*/, false /* throwOnAnyFailure */, currentElementIndex, nullptr /*options*/);
00700
00701                     currentElementIndex = GetCurrentElementIndex();
00702
00703                     if (startBringItemIntoViewSuccess && currentElementIndex != -1)
00704                     {
00705                         currentElement = TryGetElement(currentElementIndex);
00706                     }
00707                 }
00708
00709                 if (currentElement != nullptr)
00710                 {
00711                     // Redirect focus to the current element.
00712                     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Redirecting focus to CurrentElementIndex", currentElementIndex);
00713
00714                     bool success = args.TrySetNewFocusedElement(currentElement);
00715
00716                     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"TrySetNewFocusedElement result", success);
00717
00718                     return;
00719                 }
00720             }
00721         }
00722
00723         if (currentElementIndex != elementIndex)
00724         {
00725             SetCurrentElementIndex(elementIndex, winrt::FocusState::Unfocused, false /*forceKeyboardNavigationReferenceReset*/);
00726         }
00727
00728         // Selection is not updated when focus moves into the ItemsRepeater.
00729         if (m_selector != nullptr && !focusMovingIntoItemsRepeater)
00730         {
00731             const bool isCtrlDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00732             const bool isShiftDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Shift) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00733
00734             auto scopeGuard = gsl::finally([this]()
00735             {
00736                 m_isProcessingInteraction = false;
00737             });
00738
00739             m_isProcessingInteraction = true;
00740
00741             bool isIndexPathValid = false;
00742             const winrt::IndexPath indexPath = GetElementIndexPath(element, &isIndexPathValid);
00743
00744             if (isIndexPathValid)
00745             {
00746                 m_selector->OnFocusedAction(indexPath, isCtrlDown, isShiftDown);
00747             }
00748         }
00749     }
00750 }
00751
00752 // Process the Home/End, arrows and page navigation keystrokes before the inner ScrollView gets a chance to do it by simply scrolling.
00753 void ItemsView::OnItemsViewElementKeyDown(
00754     const winrt::IInspectable& sender,
00755     const winrt::KeyRoutedEventArgs& args)
00756 {
00757     const auto element = sender.try_as<winrt::UIElement>();
00758
00759     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sender element index", element ? GetElementIndex(element) : -1);
00760     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"current element index", GetCurrentElementIndex());
00761     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"key", args.Key());
00762     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"key repeat count", args.KeyStatus().RepeatCount);
00763
00764     MUX_ASSERT(!args.Handled());
00765
00766     const auto key = args.Key();
00767
00768     if (!IsNavigationKey(key))
00769     {
00770         return;
00771     }
00772
00773     if (IsCancelingNavigationKey(key, args.KeyStatus().RepeatCount > 1 /*isRepeatKey*/))
00774     {
00775         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Key canceled.");
00776
00777         // Mark the event as handled to prevent the outer ScrollView from processing it.
00778         args.Handled(true);
00779         return;
00780     }
00781
00782     QueueNavigationKey(key);
00783
00784     if (m_navigationKeyBringIntoViewPendingCount == 0 && m_navigationKeyBringIntoViewCorrelationId == -1 && m_navigationKeyProcessingCountdown == 0)
00785     {
00786         // No ItemsView::OnScrollViewBringingIntoView call is pending and there is no count down to a stable layout, so process the key right away.
00787         if (ProcessNavigationKeys())
00788         {
00789             args.Handled(true);
00790         }
00791     }
00792     else
00793     {
00794 #ifdef DBG
00795         if (m_navigationKeyBringIntoViewPendingCount > 0)
00796         {
00797             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Key processing delayed until bring-into-view started & completed.");
00798         }
00799         else
00800         {
00801             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Key processing delayed until bring-into-view completed.");
00802         }
00803 #endif
00804         // Even though the key will be processed asynchronously, it is marked as handled to prevent the parents, like the ScrollView, from processing it.
00805         args.Handled(true);
00806     }
00807 }
00808
00809 #ifdef DBG
00810 void ItemsView::OnItemsViewElementLosingFocusDbg(
00811     const winrt::UIElement& element,
00812     const winrt::LosingFocusEventArgs& args)
00813 {
00814     ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, GetElementIndex(element));
00815 }
00816 #endif
00817
00818 void ItemsView::OnItemsViewItemContainerItemInvoked(
00819     const winrt::ItemContainer& itemContainer,
00820     const winrt::ItemContainerInvokedEventArgs& args)
00821 {
00822     ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, TypeLogging::ItemContainerInteractionTriggerToString(args.InteractionTrigger()).c_str(), GetElementIndex(itemContainer));
00823
00824     auto const& interactionTrigger = args.InteractionTrigger();
00825     bool handled = args.Handled();
00826
00827     switch (interactionTrigger)
00828     {
00829         case winrt::ItemContainerInteractionTrigger::PointerReleased:
00830         {
00831             handled |= ProcessInteraction(itemContainer, winrt::FocusState::Pointer);
00832             break;
00833         }
00834
00835         case winrt::ItemContainerInteractionTrigger::EnterKey:
00836         case winrt::ItemContainerInteractionTrigger::SpaceKey:
00837         {
00838             handled |= ProcessInteraction(itemContainer, winrt::FocusState::Keyboard);
00839             break;
00840         }
00841
00842         case winrt::ItemContainerInteractionTrigger::Tap:
00843         case winrt::ItemContainerInteractionTrigger::DoubleTap:
00844         case winrt::ItemContainerInteractionTrigger::AutomationInvoke:
00845         {
00846             break;
00847         }
00848
00849         default:
00850         {
00851             return;
00852         }
00853     }
00854
00855     if (!args.Handled() &&
00856         interactionTrigger != winrt::ItemContainerInteractionTrigger::PointerReleased &&
00857         CanRaiseItemInvoked(interactionTrigger, itemContainer))
00858     {
00859         MUX_ASSERT(GetElementIndex(itemContainer) != -1);
00860
00861         RaiseItemInvoked(itemContainer);
00862     }
00863
00864     args.Handled(handled);
00865 }
00866
00867 #ifdef DBG_VERBOSE
00868 void ItemsView::OnItemsViewItemContainerSizeChangedDbg(
00869     const winrt::IInspectable& sender,
00870     const winrt::SizeChangedEventArgs& args)
00871 {
00872     auto const& element = sender.try_as<winrt::UIElement>();
00873
00874     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"ItemContainer index:", GetElementIndex(element));
00875     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_FLT_FLT, METH_NAME, this, args.PreviousSize().Width, args.PreviousSize().Height);
00876     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_FLT_FLT, METH_NAME, this, args.NewSize().Width, args.NewSize().Height);
00877 }
00878 #endif
00879
00880 bool ItemsView::ProcessInteraction(
00881     const winrt::UIElement& element,
00882     const winrt::FocusState& focusState)
00883 {
00884     MUX_ASSERT(element != nullptr);
00885
00886     const int elementIndex = GetElementIndex(element);
00887
00888     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, TypeLogging::FocusStateToString(focusState).c_str(), elementIndex);
00889
00890     MUX_ASSERT(elementIndex >= 0);
00891
00892     // When the focusState is Pointer, the element not only gets focus but is also brought into view by SetFocusElementIndex's StartBringIntoView call.
00893     const bool handled = SetCurrentElementIndex(elementIndex, focusState, true /*forceKeyboardNavigationReferenceReset*/, focusState == winrt::FocusState::Pointer /*startBringIntoView*/);
00894
00895     if (m_selector != nullptr)
00896     {
00897         const bool isCtrlDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00898         const bool isShiftDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Shift) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00899
00900         auto scopeGuard = gsl::finally([this]()
00901         {
00902             m_isProcessingInteraction = false;
00903         });
00904
00905         m_isProcessingInteraction = true;
00906
00907         bool isIndexPathValid = false;
00908         const winrt::IndexPath indexPath = GetElementIndexPath(element, &isIndexPathValid);
00909
00910         if (isIndexPathValid)
00911         {
00912             m_selector->OnInteractedAction(indexPath, isCtrlDown, isShiftDown);
00913         }
00914     }
00915
00916     return handled;
00917 }
00918
00919 // Processes the queued up navigation keys while there is no pending bring-into-view operation which needs to settle
00920 // before any subsequent processing, so items are realized, layed out and ready for identification of the target item.
00921 bool ItemsView::ProcessNavigationKeys()
00922 {
00923     MUX_ASSERT(m_navigationKeyBringIntoViewPendingCount == 0);
00924     MUX_ASSERT(m_navigationKeyBringIntoViewCorrelationId == -1);
00925     MUX_ASSERT(m_navigationKeyProcessingCountdown == 0);
00926
00927     while (!m_navigationKeysToProcess.empty() &&
00928         m_navigationKeyBringIntoViewPendingCount == 0 &&
00929         m_navigationKeyBringIntoViewCorrelationId == -1 &&
00930         m_navigationKeyProcessingCountdown == 0)
00931     {
00932         const winrt::VirtualKey navigationKey = m_navigationKeysToProcess.front();
00933
00934         m_lastNavigationKeyProcessed = navigationKey;
00935         m_navigationKeysToProcess.pop_front();
00936
00937 #ifdef DBG
00938         switch (navigationKey)
00939         {
00940         case winrt::VirtualKey::Left:
00941         {
00942             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Left key dequeued.");
00943             break;
00944         }
00945         case winrt::VirtualKey::Right:
00946         {
00947             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Right key dequeued.");
00948             break;
00949         }
00950         case winrt::VirtualKey::Up:
00951         {
00952             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Up key dequeued.");
00953             break;
00954         }
00955         case winrt::VirtualKey::Down:
00956         {
00957             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Down key dequeued.");
00958             break;
00959         }
00960         case winrt::VirtualKey::PageUp:
00961         {
00962             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"PageUp key dequeued.");
00963             break;
00964         }
00965         case winrt::VirtualKey::PageDown:
00966         {
00967             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"PageDown key dequeued.");
00968             break;
00969         }
00970         case winrt::VirtualKey::Home:
00971         {
00972             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Home key dequeued.");
00973             break;
00974         }
00975         case winrt::VirtualKey::End:
00976         {
00977             ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End key dequeued.");
00978             break;
00979         }
00980         }
00981 #endif
00982
00983         bool forceKeyboardNavigationReferenceReset = false;
00984         int newCurrentElementIndexToFocus = -1;
00985
00986         switch (navigationKey)
00987         {
00988         case winrt::VirtualKey::Home:
00989         case winrt::VirtualKey::End:
00990         {
00991             if (auto const& itemsRepeater = m_itemsRepeater.get())
00992             {
00993                 auto const& itemsSourceView = itemsRepeater.ItemsSourceView();
00994
00995                 if (itemsSourceView == nullptr)
00996                 {
00997                     return false;
00998                 }
00999
01000                 const int itemsCount = itemsSourceView.Count();
01001
01002                 if (itemsCount == 0)
01003                 {
01004                     return false;
01005                 }
01006
01007                 const bool targetIsFirstItem = navigationKey == winrt::VirtualKey::Home;
01008                 const int itemIndex = targetIsFirstItem ? 0 : itemsCount - 1;
01009                 winrt::BringIntoViewOptions options;
01010
01011                 // When processing the Home key, the top/left corner of the first focusable element is aligned to the top/left corner of the viewport.
01012                 // When processing the End key, the bottom/right corner of the last focusable element is aligned to the bottom/right corner of the viewport.
01013                 options.HorizontalAlignmentRatio(targetIsFirstItem ? 0.0 : 1.0);
01014                 options.VerticalAlignmentRatio(targetIsFirstItem ? 0.0 : 1.0);
01015
01016                 const bool startBringItemIntoViewSuccess = StartBringItemIntoViewInternal(false /*throwOutOfBounds*/, false /* throwOnAnyFailure */, itemIndex, options);
01017
01018                 if (!startBringItemIntoViewSuccess)
01019                 {
01020                     return false;
01021                 }
01022
01023                 // Now that the target item is realized and moving into view, check if it needs to take keyboard focus.
01024                 if (auto const& layout = Layout())
01025                 {
01026                     auto const& focusableObject = targetIsFirstItem ? winrt::FocusManager::FindFirstFocusableElement(itemsRepeater) : winrt::FocusManager::FindLastFocusableElement(itemsRepeater);
01027
01028                     if (auto const& focusableElement = focusableObject.try_as<winrt::UIElement>())
01029                     {
01030                         const int index = GetElementIndex(focusableElement);
01031
01032                         MUX_ASSERT(index != -1);
01033
01034                         if (index != GetCurrentElementIndex())
01035                         {
01036                             forceKeyboardNavigationReferenceReset = true;
01037                             newCurrentElementIndexToFocus = index;
01038                         }
01039                     }
01040                 }
01041             }
01042             break;
01043         }
01044         case winrt::VirtualKey::Left:
01045         case winrt::VirtualKey::Right:
01046         case winrt::VirtualKey::Up:
01047         case winrt::VirtualKey::Down:
01048         {
01049             const bool isLayoutOrientationIndexBased = IsLayoutOrientationIndexBased(navigationKey == winrt::VirtualKey::Left || navigationKey == winrt::VirtualKey::Right /*horizontal*/);
01050             const bool isRightToLeftDirection = FlowDirection() == winrt::FlowDirection::RightToLeft;
01051
01052             if (isLayoutOrientationIndexBased)
01053             {
01054                 const bool getPreviousFocusableElement =
01055                     (navigationKey == winrt::VirtualKey::Left && !isRightToLeftDirection) ||
01056                     (navigationKey == winrt::VirtualKey::Right && isRightToLeftDirection) ||
01057                     navigationKey == winrt::VirtualKey::Up;
01058                 const int index = GetAdjacentFocusableElementByIndex(getPreviousFocusableElement);
01059
01060                 if (index != -1 && index != GetCurrentElementIndex())
01061                 {
01062                     forceKeyboardNavigationReferenceReset = true;
01063                     newCurrentElementIndexToFocus = index;
01064                 }
01065             }
01066             else
01067             {
01068                 const bool hasIndexBasedLayoutOrientation = GetLayoutIndexBasedLayoutOrientation() != winrt::IndexBasedLayoutOrientation::None;
01069                 winrt::FocusNavigationDirection focusNavigationDirection;
01070
01071                 switch (navigationKey)
01072                 {
01073                 case winrt::VirtualKey::Left:
01074                     focusNavigationDirection = isRightToLeftDirection ? winrt::FocusNavigationDirection::Right : winrt::FocusNavigationDirection::Left;
01075                     break;
01076                 case winrt::VirtualKey::Right:
01077                     focusNavigationDirection = isRightToLeftDirection ? winrt::FocusNavigationDirection::Left : winrt::FocusNavigationDirection::Right;
01078                     break;
01079                 case winrt::VirtualKey::Up:
01080                     focusNavigationDirection = winrt::FocusNavigationDirection::Up;
01081                     break;
01082                 case winrt::VirtualKey::Down:
01083                     focusNavigationDirection = winrt::FocusNavigationDirection::Down;
01084                     break;
01085                 }
01086
01087                 const int index = GetAdjacentFocusableElementByDirection(focusNavigationDirection, hasIndexBasedLayoutOrientation);
01088
01089                 if (index != -1 && index != GetCurrentElementIndex())
01090                 {
01091                     if (!hasIndexBasedLayoutOrientation)
01092                     {
01093                         forceKeyboardNavigationReferenceReset = true;
01094                     }
01095
01096                     newCurrentElementIndexToFocus = index;
01097                 }
01098             }
01099             break;
01100         }
01101         case winrt::VirtualKey::PageUp:
01102         case winrt::VirtualKey::PageDown:
01103         {
01104             const winrt::IndexBasedLayoutOrientation indexBasedLayoutOrientation = GetLayoutIndexBasedLayoutOrientation();
01105             const bool isHorizontalDistanceFavored = indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::TopToBottom;
01106             const bool isVerticalDistanceFavored = indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::LeftToRight;
01107             const bool isForPageUp = navigationKey == winrt::VirtualKey::PageUp;
01108             const bool isPageNavigationRailed{ true }; // Keeping this variable for now. It could be set to an ItemsView.IsPageNavigationRailed() property to opt out of railing.
01109             bool useKeyboardNavigationReferenceHorizontalOffset{ false };
01110             bool useKeyboardNavigationReferenceVerticalOffset{ false };
01111             double horizontalViewportRatio{}, verticalViewportRatio{};
01112
01113             // First phase: Check if target element is on the current page.
01114             if (isVerticalDistanceFavored || CanScrollVertically())
01115             {
01116                 if (isPageNavigationRailed)
01117                 {
01118                     useKeyboardNavigationReferenceHorizontalOffset = true;
01119                 }
01120                 else
01121                 {
01122                     horizontalViewportRatio = isForPageUp ? -std::numeric_limits<double>::max() : std::numeric_limits<double>::max();
01123                 }
01124
01125                 verticalViewportRatio = isForPageUp ? 0.0 : 1.0;
01126             }
01127             else if (isHorizontalDistanceFavored)
01128             {
01129                 horizontalViewportRatio = isForPageUp ? 0.0 : 1.0;
01130
01131                 if (isPageNavigationRailed)
01132                 {
01133                     useKeyboardNavigationReferenceVerticalOffset = true;
01134                 }
01135                 else
01136                 {
01137                     verticalViewportRatio = isForPageUp ? -std::numeric_limits<double>::max() : std::numeric_limits<double>::max();
01138                 }
01139             }
01140
01141             MUX_ASSERT(!isPageNavigationRailed || horizontalViewportRatio == 0.0 || verticalViewportRatio == 0.0);
01142             MUX_ASSERT(!useKeyboardNavigationReferenceHorizontalOffset || !useKeyboardNavigationReferenceVerticalOffset);
01143
01144             int index = GetItemInternal(
01145                 horizontalViewportRatio,
01146                 verticalViewportRatio,
01147                 isHorizontalDistanceFavored,
01148                 isVerticalDistanceFavored,
01149                 useKeyboardNavigationReferenceHorizontalOffset,
01150                 useKeyboardNavigationReferenceVerticalOffset,
01151                 true /*capItemEdgesToViewportRatioEdges*/,
01152                 true /*forFocusableItemsOnly*/);
01153
01154             ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, isForPageUp ? L"PageUp - phase 1" : L"PageDown - phase 1", index);
01155
01156             if (index != -1)
01157             {
01158                 if (!isPageNavigationRailed || indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::None)
01159                 {
01160                     forceKeyboardNavigationReferenceReset = true;
01161                 }
01162
01163                 if (index != GetCurrentElementIndex())
01164                 {
01165                     // Target element is on the current page.
01166                     newCurrentElementIndexToFocus = index;
01167                 }
01168                 else
01169                 {
01170                     // Find target on the neighboring page.
01171                     if (isVerticalDistanceFavored || CanScrollVertically())
01172                     {
01173                         verticalViewportRatio = isForPageUp ? -1.0 : 2.0;
01174                     }
01175                     else if (isHorizontalDistanceFavored)
01176                     {
01177                         horizontalViewportRatio = isForPageUp ? -1.0 : 2.0;
01178                     }
01179
01180                     MUX_ASSERT(!isPageNavigationRailed || horizontalViewportRatio == 0.0 || verticalViewportRatio == 0.0);
01181
01182                     index = GetItemInternal(
01183                         horizontalViewportRatio,
01184                         verticalViewportRatio,
01185                         isHorizontalDistanceFavored,
01186                         isVerticalDistanceFavored,
01187                         useKeyboardNavigationReferenceHorizontalOffset,
01188                         useKeyboardNavigationReferenceVerticalOffset,
01189                         true /*capItemEdgesToViewportRatioEdges*/,
01190                         true /*forFocusableItemsOnly*/);
01191
01192                     ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, isForPageUp ? L"PageUp - phase 2" : L"PageDown - phase 2", index);
01193
01194                     if (index != -1)
01195                     {
01196                         if (index != GetCurrentElementIndex())
01197                         {
01198                             // Found target element on neighboring page.
01199                             newCurrentElementIndexToFocus = index;
01200                         }
01201                         else if (isPageNavigationRailed)
01202                         {
01203                             MUX_ASSERT(useKeyboardNavigationReferenceHorizontalOffset || useKeyboardNavigationReferenceVerticalOffset);
01204
01205                             // Beginning or end of items reached while railing is turned on. Turn it off and try again.
01206                             if (isVerticalDistanceFavored || CanScrollVertically())
01207                             {
01208                                 horizontalViewportRatio = isForPageUp ? -std::numeric_limits<double>::max() : std::numeric_limits<double>::max();
01209                                 verticalViewportRatio = isForPageUp ? 0.0 : 1.0;
01210                             }
01211                             else if (isHorizontalDistanceFavored)
01212                             {
01213                                 horizontalViewportRatio = isForPageUp ? 0.0 : 1.0;
01214                                 verticalViewportRatio = isForPageUp ? -std::numeric_limits<double>::max() : std::numeric_limits<double>::max();
01215                             }
01216
01217                             index = GetItemInternal(
01218                                 horizontalViewportRatio,
01219                                 verticalViewportRatio,
01220                                 isHorizontalDistanceFavored,
01221                                 isVerticalDistanceFavored,
01222                                 false /*useKeyboardNavigationReferenceHorizontalOffset*/,
01223                                 false /*useKeyboardNavigationReferenceVerticalOffset*/,
01224                                 true  /*capItemEdgesToViewportRatioEdges*/,
01225                                 true  /*forFocusableItemsOnly*/);
01226
01227                             ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, isForPageUp ? L"PageUp - phase 3" : L"PageDown - phase 3", index);
01228
01229                             if (index != -1 && index != GetCurrentElementIndex())
01230                             {
01231                                 // Target element is first or last focusable element.
01232                                 forceKeyboardNavigationReferenceReset = true;
01233                                 newCurrentElementIndexToFocus = index;
01234                             }
01235                         }
01236                     }
01237                 }
01238             }
01239             break;
01240         }
01241         }
01242
01243         if (newCurrentElementIndexToFocus != -1)
01244         {
01245             SetCurrentElementIndex(newCurrentElementIndexToFocus, winrt::FocusState::Keyboard, forceKeyboardNavigationReferenceReset, false /*startBringIntoView*/, true /*expectBringIntoView*/);
01246
01247             if (m_navigationKeysToProcess.empty())
01248             {
01249                 return true;
01250             }
01251         }
01252     }
01253
01254     return false;
01255 }
01256
01257 // Queues the incoming navigation key for future processing in ProcessNavigationKeys.
01258 void ItemsView::QueueNavigationKey(
01259     const winrt::VirtualKey& key)
01260 {
01261     MUX_ASSERT(IsNavigationKey(key));
01262
01263 #ifdef DBG
01264     switch (key)
01265     {
01266     case winrt::VirtualKey::Home:
01267     {
01268         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Home key queued.");
01269         break;
01270     }
01271     case winrt::VirtualKey::End:
01272     {
01273         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End key queued.");
01274         break;
01275     }
01276     case winrt::VirtualKey::Left:
01277     {
01278         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Left key queued.");
01279         break;
01280     }
01281     case winrt::VirtualKey::Right:
01282     {
01283         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Right key queued.");
01284         break;
01285     }
01286     case winrt::VirtualKey::Up:
01287     {
01288         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Up key queued.");
01289         break;
01290     }
01291     case winrt::VirtualKey::Down:
01292     {
01293         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Down key queued.");
01294         break;
01295     }
01296     case winrt::VirtualKey::PageUp:
01297     {
01298         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"PageUp key queued.");
01299         break;
01300     }
01301     case winrt::VirtualKey::PageDown:
01302     {
01303         ITEMSVIEW_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"PageDown key queued.");
01304         break;
01305     }
01306     }
01307 #endif
01308
01309     m_navigationKeysToProcess.push_back(key);
01310 }
01311
01312 bool ItemsView::SetFocusElementIndex(
01313     int index,
01314     winrt::FocusState focusState,
01315     bool startBringIntoView,
01316     bool expectBringIntoView)
01317 {
01318     MUX_ASSERT(!startBringIntoView || !expectBringIntoView);
01319
01320     if (index != -1 && focusState != winrt::FocusState::Unfocused)
01321     {
01322         if (auto const& element = TryGetElement(index))
01323         {
01324             const bool success = SetFocus(element, focusState);
01325
01326             ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"index", index, success);
01327
01328             if (success)
01329             {
01330                 if (auto const& scrollView = m_scrollView.get())
01331                 {
01332                     if (expectBringIntoView)
01333                     {
01334                         m_navigationKeyBringIntoViewPendingCount++;
01335
01336                         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_navigationKeyBringIntoViewPendingCount incremented", m_navigationKeyBringIntoViewPendingCount);
01337                     }
01338                     else if (startBringIntoView)
01339                     {
01340                         ITEMSVIEW_TRACE_INFO_DBG(*this, TRACE_MSG_METH_METH, METH_NAME, this, L"UIElement::StartBringIntoView");
01341
01342                         element.StartBringIntoView();
01343                     }
01344                 }
01345             }
01346
01347             return success;
01348         }
01349     }
01350
01351     return false;
01352 }
01353
01354 // Updates the values of m_keyboardNavigationReferenceIndex and m_keyboardNavigationReferenceRect based on the current element.
01355 void ItemsView::UpdateKeyboardNavigationReference()
01356 {
01357     int currentElementIndex = GetCurrentElementIndex();
01358
01359     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, currentElementIndex);
01360
01361     const winrt::Point oldKeyboardNavigationReferenceOffset = GetKeyboardNavigationReferenceOffset();
01362
01363     m_keyboardNavigationReferenceIndex = currentElementIndex;
01364
01365     if (currentElementIndex != -1)
01366     {
01367         if (auto const& itemsRepeater = m_itemsRepeater.get())
01368         {
01369             if (auto const& currentElement = TryGetElement(currentElementIndex))
01370             {
01371                 auto const generalTransform = currentElement.TransformToVisual(itemsRepeater);
01372                 auto const currentElementOffset = generalTransform.TransformPoint(winrt::Point(0, 0));
01373
01374                 if (auto const currentElementAsFE = currentElement.as<winrt::FrameworkElement>())
01375                 {
01376                     m_keyboardNavigationReferenceRect = winrt::Rect{
01377                         currentElementOffset.X,
01378                         currentElementOffset.Y,
01379                         static_cast<float>(currentElementAsFE.ActualWidth()),
01380                         static_cast<float>(currentElementAsFE.ActualHeight()) };
01381                 }
01382                 else
01383                 {
01384                     m_keyboardNavigationReferenceRect = winrt::Rect{
01385                         currentElementOffset.X,
01386                         currentElementOffset.Y,
01387                         0.0f,
01388                         0.0f };
01389                 }
01390             }
01391             else
01392             {
01393                 m_keyboardNavigationReferenceIndex = -1;
01394                 m_keyboardNavigationReferenceRect = { -1.0f, -1.0f, -1.0f, -1.0f };
01395             }
01396         }
01397         else
01398         {
01399             m_keyboardNavigationReferenceIndex = -1;
01400             m_keyboardNavigationReferenceRect = { -1.0f, -1.0f, -1.0f, -1.0f };
01401         }
01402     }
01403     else
01404     {
01405         m_keyboardNavigationReferenceRect = { -1.0f, -1.0f, -1.0f, -1.0f };
01406     }
01407
01408     ITEMSVIEW_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, TypeLogging::RectToString(m_keyboardNavigationReferenceRect).c_str(), m_keyboardNavigationReferenceIndex);
01409
01410     com_ptr<ItemsViewTestHooks> globalTestHooks = ItemsViewTestHooks::GetGlobalTestHooks();
01411
01412     if (globalTestHooks != nullptr)
01413     {
01414         const winrt::Point newKeyboardNavigationReferenceOffset = GetKeyboardNavigationReferenceOffset();
01415         const winrt::IndexBasedLayoutOrientation indexBasedLayoutOrientation = GetLayoutIndexBasedLayoutOrientation();
01416
01417         if ((oldKeyboardNavigationReferenceOffset.X != newKeyboardNavigationReferenceOffset.X && (indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::LeftToRight || indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::None)) ||
01418             (oldKeyboardNavigationReferenceOffset.Y != newKeyboardNavigationReferenceOffset.Y && (indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::TopToBottom || indexBasedLayoutOrientation == winrt::IndexBasedLayoutOrientation::None)))
01419         {
01420             globalTestHooks->NotifyKeyboardNavigationReferenceOffsetChanged(*this);
01421         }
01422     }
01423 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayoutState.h Source File

  • File List
  • File Members
  • Repeater

FlowLayoutState.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "FlowLayoutState.g.h"
00007 #include "FlowLayoutAlgorithm.h"
00008
00009 class FlowLayoutState :
00010     public ReferenceTracker<FlowLayoutState, winrt::implementation::FlowLayoutStateT, winrt::composing>
00011 {
00012 public:
00013     void InitializeForContext(
00014         const winrt::VirtualizingLayoutContext& context,
00015         IFlowLayoutAlgorithmDelegates* callbacks);
00016     void UninitializeForContext(const winrt::VirtualizingLayoutContext& context);
00017     void OnLineArranged(int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext& context);
00018
00019     ::FlowLayoutAlgorithm& FlowAlgorithm() { return m_flowAlgorithm; }
00020     double TotalLineSize() const { return m_totalLineSize; }
00021     int TotalLinesMeasured() const { return m_totalLinesMeasured; }
00022     double TotalItemsPerLine() const { return m_totalItemsPerLine; }
00023
00024     winrt::Size SpecialElementDesiredSize() const { return m_specialElementDesiredSize; }
00025     void SpecialElementDesiredSize(winrt::Size value) { m_specialElementDesiredSize = value; }
00026
00027 private:
00028     ::FlowLayoutAlgorithm m_flowAlgorithm{ this };
00029     std::vector<double> m_lineSizeEstimationBuffer{};
00030     std::vector<double> m_itemsPerLineEstimationBuffer{};
00031     double m_totalLineSize{};
00032     int m_totalLinesMeasured{};
00033     double m_totalItemsPerLine{};
00034     winrt::Size m_specialElementDesiredSize{};
00035     static const int BufferSize = 100;
00036 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderAutomationPeer.idl Source File

  • File List
  • File Members
  • Expander

ExpanderAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass ExpanderAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer,
00007 Microsoft.UI.Xaml.Automation.Provider.IExpandCollapseProvider
00008 {
00009     ExpanderAutomationPeer(MU_XC_NAMESPACE.Expander owner);
00010 }
00011
00012 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

EnumXamlType Member List

This is the complete list of members for EnumXamlType, including all inherited members.
ActivateInstance() | XamlTypeBase |
AddDPMember(wstring_view const &name, wstring_view const &memberTypeName, winrt::DependencyProperty const &dp, bool isContent) | XamlTypeBase |
AddMember(wstring_view const &name, wstring_view const &memberTypeName, std::function< winrt::IInspectable(const winrt::IInspectable &)> getter, std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> setter, bool isContent, bool isDependencyProperty, bool isAttachable) | XamlTypeBase |
AddToMap(winrt::IInspectable const &instance, winrt::IInspectable const &key, winrt::IInspectable const &value) | XamlTypeBase |
AddToVector(winrt::IInspectable const &instance, winrt::IInspectable const &value) | XamlTypeBase |
BaseType() | XamlTypeBase |
BoxedType() | XamlTypeBase |
ContentProperty() | XamlTypeBase |
CreateFromString(winrt::hstring const &value) | XamlTypeBase |
EnumXamlType(wstring_view const &typeName, std::function< winrt::IInspectable(hstring)> createFromString) | EnumXamlType |
FullName() | XamlTypeBase |
GetMember(winrt::hstring const &name) | XamlTypeBase |
IsArray() | XamlTypeBase |
IsBindable() | XamlTypeBase |
IsCollection() | XamlTypeBase |
IsConstructible() | XamlTypeBase |
IsDictionary() | XamlTypeBase |
IsMarkupExtension() | XamlTypeBase |
ItemType() | XamlTypeBase |
KeyType() | XamlTypeBase |
m_activator | XamlTypeBase | [protected]
m_addToMap | XamlTypeBase | [protected]
m_collectionAdd | XamlTypeBase | [protected]
m_contentProperty | XamlTypeBase | [protected]
m_createFromString | XamlTypeBase | [protected]
m_isBindable | XamlTypeBase | [protected]
m_isSystemType | XamlTypeBase | [protected]
m_members | XamlTypeBase | [protected]
m_typeName | XamlTypeBase | [protected]
RunInitializer() | XamlTypeBase |
UnderlyingType() | XamlTypeBase |
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewMinimalPage Member List

This is the complete list of members for NavigationViewMinimalPage, including all inherited members.
GetNavViewActiveVisualStates_Click(object sender, RoutedEventArgs e) | NavigationViewMinimalPage | [inline, private]
NavigationViewMinimalPage() | NavigationViewMinimalPage | [inline]
TogglePaneOpenButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | NavigationViewMinimalPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerAutomationPeer Member List

This is the complete list of members for PipsPagerAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
CanSelectMultiple() | PipsPagerAutomationPeer | [inline]
CheckThread() | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< PipsPagerAutomationPeer > &&self) noexcept | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
final_release(std::unique_ptr< PipsPagerAutomationPeer > &&self) | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline, static]
GetAutomationControlTypeCore() | PipsPagerAutomationPeer |
GetBase() | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
GetClassNameCore() | PipsPagerAutomationPeer |
GetImpl() | PipsPagerAutomationPeer | [private]
GetInner() | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
GetNameCore() | PipsPagerAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | PipsPagerAutomationPeer |
GetSelection() | PipsPagerAutomationPeer |
IsOnThread() | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
IsSelectionRequired() | PipsPagerAutomationPeer | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
PipsPagerAutomationPeer(winrt::PipsPager const &owner) | PipsPagerAutomationPeer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
RaiseSelectionChanged(double oldIndex, double newIndex) | PipsPagerAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider > | [inline]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControl.properties.h Source File

  • File List
  • File Members
  • Generated

PagerControl.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class PagerControlProperties
00008 {
00009 public:
00010     PagerControlProperties();
00011
00012     void ButtonPanelAlwaysShowFirstLastPageIndex(bool value);
00013     bool ButtonPanelAlwaysShowFirstLastPageIndex();
00014
00015     void DisplayMode(winrt::PagerControlDisplayMode const& value);
00016     winrt::PagerControlDisplayMode DisplayMode();
00017
00018     void FirstButtonCommand(winrt::ICommand const& value);
00019     winrt::ICommand FirstButtonCommand();
00020
00021     void FirstButtonStyle(winrt::Style const& value);
00022     winrt::Style FirstButtonStyle();
00023
00024     void FirstButtonVisibility(winrt::PagerControlButtonVisibility const& value);
00025     winrt::PagerControlButtonVisibility FirstButtonVisibility();
00026
00027     void LastButtonCommand(winrt::ICommand const& value);
00028     winrt::ICommand LastButtonCommand();
00029
00030     void LastButtonStyle(winrt::Style const& value);
00031     winrt::Style LastButtonStyle();
00032
00033     void LastButtonVisibility(winrt::PagerControlButtonVisibility const& value);
00034     winrt::PagerControlButtonVisibility LastButtonVisibility();
00035
00036     void NextButtonCommand(winrt::ICommand const& value);
00037     winrt::ICommand NextButtonCommand();
00038
00039     void NextButtonStyle(winrt::Style const& value);
00040     winrt::Style NextButtonStyle();
00041
00042     void NextButtonVisibility(winrt::PagerControlButtonVisibility const& value);
00043     winrt::PagerControlButtonVisibility NextButtonVisibility();
00044
00045     void NumberOfPages(int value);
00046     int NumberOfPages();
00047
00048     void PagerInputCommand(winrt::ICommand const& value);
00049     winrt::ICommand PagerInputCommand();
00050
00051     void PrefixText(winrt::hstring const& value);
00052     winrt::hstring PrefixText();
00053
00054     void PreviousButtonCommand(winrt::ICommand const& value);
00055     winrt::ICommand PreviousButtonCommand();
00056
00057     void PreviousButtonStyle(winrt::Style const& value);
00058     winrt::Style PreviousButtonStyle();
00059
00060     void PreviousButtonVisibility(winrt::PagerControlButtonVisibility const& value);
00061     winrt::PagerControlButtonVisibility PreviousButtonVisibility();
00062
00063     void SelectedPageIndex(int value);
00064     int SelectedPageIndex();
00065
00066     void SuffixText(winrt::hstring const& value);
00067     winrt::hstring SuffixText();
00068
00069     void TemplateSettings(winrt::PagerControlTemplateSettings const& value);
00070     winrt::PagerControlTemplateSettings TemplateSettings();
00071
00072     static winrt::DependencyProperty ButtonPanelAlwaysShowFirstLastPageIndexProperty() { return s_ButtonPanelAlwaysShowFirstLastPageIndexProperty; }
00073     static winrt::DependencyProperty DisplayModeProperty() { return s_DisplayModeProperty; }
00074     static winrt::DependencyProperty FirstButtonCommandProperty() { return s_FirstButtonCommandProperty; }
00075     static winrt::DependencyProperty FirstButtonStyleProperty() { return s_FirstButtonStyleProperty; }
00076     static winrt::DependencyProperty FirstButtonVisibilityProperty() { return s_FirstButtonVisibilityProperty; }
00077     static winrt::DependencyProperty LastButtonCommandProperty() { return s_LastButtonCommandProperty; }
00078     static winrt::DependencyProperty LastButtonStyleProperty() { return s_LastButtonStyleProperty; }
00079     static winrt::DependencyProperty LastButtonVisibilityProperty() { return s_LastButtonVisibilityProperty; }
00080     static winrt::DependencyProperty NextButtonCommandProperty() { return s_NextButtonCommandProperty; }
00081     static winrt::DependencyProperty NextButtonStyleProperty() { return s_NextButtonStyleProperty; }
00082     static winrt::DependencyProperty NextButtonVisibilityProperty() { return s_NextButtonVisibilityProperty; }
00083     static winrt::DependencyProperty NumberOfPagesProperty() { return s_NumberOfPagesProperty; }
00084     static winrt::DependencyProperty PagerInputCommandProperty() { return s_PagerInputCommandProperty; }
00085     static winrt::DependencyProperty PrefixTextProperty() { return s_PrefixTextProperty; }
00086     static winrt::DependencyProperty PreviousButtonCommandProperty() { return s_PreviousButtonCommandProperty; }
00087     static winrt::DependencyProperty PreviousButtonStyleProperty() { return s_PreviousButtonStyleProperty; }
00088     static winrt::DependencyProperty PreviousButtonVisibilityProperty() { return s_PreviousButtonVisibilityProperty; }
00089     static winrt::DependencyProperty SelectedPageIndexProperty() { return s_SelectedPageIndexProperty; }
00090     static winrt::DependencyProperty SuffixTextProperty() { return s_SuffixTextProperty; }
00091     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00092
00093     static GlobalDependencyProperty s_ButtonPanelAlwaysShowFirstLastPageIndexProperty;
00094     static GlobalDependencyProperty s_DisplayModeProperty;
00095     static GlobalDependencyProperty s_FirstButtonCommandProperty;
00096     static GlobalDependencyProperty s_FirstButtonStyleProperty;
00097     static GlobalDependencyProperty s_FirstButtonVisibilityProperty;
00098     static GlobalDependencyProperty s_LastButtonCommandProperty;
00099     static GlobalDependencyProperty s_LastButtonStyleProperty;
00100     static GlobalDependencyProperty s_LastButtonVisibilityProperty;
00101     static GlobalDependencyProperty s_NextButtonCommandProperty;
00102     static GlobalDependencyProperty s_NextButtonStyleProperty;
00103     static GlobalDependencyProperty s_NextButtonVisibilityProperty;
00104     static GlobalDependencyProperty s_NumberOfPagesProperty;
00105     static GlobalDependencyProperty s_PagerInputCommandProperty;
00106     static GlobalDependencyProperty s_PrefixTextProperty;
00107     static GlobalDependencyProperty s_PreviousButtonCommandProperty;
00108     static GlobalDependencyProperty s_PreviousButtonStyleProperty;
00109     static GlobalDependencyProperty s_PreviousButtonVisibilityProperty;
00110     static GlobalDependencyProperty s_SelectedPageIndexProperty;
00111     static GlobalDependencyProperty s_SuffixTextProperty;
00112     static GlobalDependencyProperty s_TemplateSettingsProperty;
00113
00114     winrt::event_token SelectedIndexChanged(winrt::TypedEventHandler<winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs> const& value);
00115     void SelectedIndexChanged(winrt::event_token const& token);
00116
00117     event_source<winrt::TypedEventHandler<winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs>> m_selectedIndexChangedEventSource;
00118
00119     static void EnsureProperties();
00120     static void ClearProperties();
00121
00122     static void OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged(
00123         winrt::DependencyObject const& sender,
00124         winrt::DependencyPropertyChangedEventArgs const& args);
00125
00126     static void OnDisplayModePropertyChanged(
00127         winrt::DependencyObject const& sender,
00128         winrt::DependencyPropertyChangedEventArgs const& args);
00129
00130     static void OnFirstButtonCommandPropertyChanged(
00131         winrt::DependencyObject const& sender,
00132         winrt::DependencyPropertyChangedEventArgs const& args);
00133
00134     static void OnFirstButtonStylePropertyChanged(
00135         winrt::DependencyObject const& sender,
00136         winrt::DependencyPropertyChangedEventArgs const& args);
00137
00138     static void OnFirstButtonVisibilityPropertyChanged(
00139         winrt::DependencyObject const& sender,
00140         winrt::DependencyPropertyChangedEventArgs const& args);
00141
00142     static void OnLastButtonCommandPropertyChanged(
00143         winrt::DependencyObject const& sender,
00144         winrt::DependencyPropertyChangedEventArgs const& args);
00145
00146     static void OnLastButtonStylePropertyChanged(
00147         winrt::DependencyObject const& sender,
00148         winrt::DependencyPropertyChangedEventArgs const& args);
00149
00150     static void OnLastButtonVisibilityPropertyChanged(
00151         winrt::DependencyObject const& sender,
00152         winrt::DependencyPropertyChangedEventArgs const& args);
00153
00154     static void OnNextButtonCommandPropertyChanged(
00155         winrt::DependencyObject const& sender,
00156         winrt::DependencyPropertyChangedEventArgs const& args);
00157
00158     static void OnNextButtonStylePropertyChanged(
00159         winrt::DependencyObject const& sender,
00160         winrt::DependencyPropertyChangedEventArgs const& args);
00161
00162     static void OnNextButtonVisibilityPropertyChanged(
00163         winrt::DependencyObject const& sender,
00164         winrt::DependencyPropertyChangedEventArgs const& args);
00165
00166     static void OnNumberOfPagesPropertyChanged(
00167         winrt::DependencyObject const& sender,
00168         winrt::DependencyPropertyChangedEventArgs const& args);
00169
00170     static void OnPagerInputCommandPropertyChanged(
00171         winrt::DependencyObject const& sender,
00172         winrt::DependencyPropertyChangedEventArgs const& args);
00173
00174     static void OnPrefixTextPropertyChanged(
00175         winrt::DependencyObject const& sender,
00176         winrt::DependencyPropertyChangedEventArgs const& args);
00177
00178     static void OnPreviousButtonCommandPropertyChanged(
00179         winrt::DependencyObject const& sender,
00180         winrt::DependencyPropertyChangedEventArgs const& args);
00181
00182     static void OnPreviousButtonStylePropertyChanged(
00183         winrt::DependencyObject const& sender,
00184         winrt::DependencyPropertyChangedEventArgs const& args);
00185
00186     static void OnPreviousButtonVisibilityPropertyChanged(
00187         winrt::DependencyObject const& sender,
00188         winrt::DependencyPropertyChangedEventArgs const& args);
00189
00190     static void OnSelectedPageIndexPropertyChanged(
00191         winrt::DependencyObject const& sender,
00192         winrt::DependencyPropertyChangedEventArgs const& args);
00193
00194     static void OnSuffixTextPropertyChanged(
00195         winrt::DependencyObject const& sender,
00196         winrt::DependencyPropertyChangedEventArgs const& args);
00197
00198     static void OnTemplateSettingsPropertyChanged(
00199         winrt::DependencyObject const& sender,
00200         winrt::DependencyPropertyChangedEventArgs const& args);
00201 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollView.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollView.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollView.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ScrollView)
00012 }
00013
00014 #include "ScrollView.g.cpp"
00015
00016 GlobalDependencyProperty ScrollViewProperties::s_ComputedHorizontalScrollBarVisibilityProperty{ nullptr };
00017 GlobalDependencyProperty ScrollViewProperties::s_ComputedHorizontalScrollModeProperty{ nullptr };
00018 GlobalDependencyProperty ScrollViewProperties::s_ComputedVerticalScrollBarVisibilityProperty{ nullptr };
00019 GlobalDependencyProperty ScrollViewProperties::s_ComputedVerticalScrollModeProperty{ nullptr };
00020 GlobalDependencyProperty ScrollViewProperties::s_ContentProperty{ nullptr };
00021 GlobalDependencyProperty ScrollViewProperties::s_ContentOrientationProperty{ nullptr };
00022 GlobalDependencyProperty ScrollViewProperties::s_HorizontalAnchorRatioProperty{ nullptr };
00023 GlobalDependencyProperty ScrollViewProperties::s_HorizontalScrollBarVisibilityProperty{ nullptr };
00024 GlobalDependencyProperty ScrollViewProperties::s_HorizontalScrollChainModeProperty{ nullptr };
00025 GlobalDependencyProperty ScrollViewProperties::s_HorizontalScrollModeProperty{ nullptr };
00026 GlobalDependencyProperty ScrollViewProperties::s_HorizontalScrollRailModeProperty{ nullptr };
00027 GlobalDependencyProperty ScrollViewProperties::s_IgnoredInputKindsProperty{ nullptr };
00028 GlobalDependencyProperty ScrollViewProperties::s_MaxZoomFactorProperty{ nullptr };
00029 GlobalDependencyProperty ScrollViewProperties::s_MinZoomFactorProperty{ nullptr };
00030 GlobalDependencyProperty ScrollViewProperties::s_ScrollPresenterProperty{ nullptr };
00031 GlobalDependencyProperty ScrollViewProperties::s_VerticalAnchorRatioProperty{ nullptr };
00032 GlobalDependencyProperty ScrollViewProperties::s_VerticalScrollBarVisibilityProperty{ nullptr };
00033 GlobalDependencyProperty ScrollViewProperties::s_VerticalScrollChainModeProperty{ nullptr };
00034 GlobalDependencyProperty ScrollViewProperties::s_VerticalScrollModeProperty{ nullptr };
00035 GlobalDependencyProperty ScrollViewProperties::s_VerticalScrollRailModeProperty{ nullptr };
00036 GlobalDependencyProperty ScrollViewProperties::s_ZoomChainModeProperty{ nullptr };
00037 GlobalDependencyProperty ScrollViewProperties::s_ZoomModeProperty{ nullptr };
00038
00039 ScrollViewProperties::ScrollViewProperties()
00040     : m_anchorRequestedEventSource{static_cast<ScrollView*>(this)}
00041     , m_bringingIntoViewEventSource{static_cast<ScrollView*>(this)}
00042     , m_extentChangedEventSource{static_cast<ScrollView*>(this)}
00043     , m_scrollAnimationStartingEventSource{static_cast<ScrollView*>(this)}
00044     , m_scrollCompletedEventSource{static_cast<ScrollView*>(this)}
00045     , m_scrollStartingEventSource{static_cast<ScrollView*>(this)}
00046     , m_stateChangedEventSource{static_cast<ScrollView*>(this)}
00047     , m_viewChangedEventSource{static_cast<ScrollView*>(this)}
00048     , m_zoomAnimationStartingEventSource{static_cast<ScrollView*>(this)}
00049     , m_zoomCompletedEventSource{static_cast<ScrollView*>(this)}
00050     , m_zoomStartingEventSource{static_cast<ScrollView*>(this)}
00051 {
00052     EnsureProperties();
00053 }
00054
00055 void ScrollViewProperties::EnsureProperties()
00056 {
00057     if (!s_ComputedHorizontalScrollBarVisibilityProperty)
00058     {
00059         s_ComputedHorizontalScrollBarVisibilityProperty =
00060             InitializeDependencyProperty(
00061                 L"ComputedHorizontalScrollBarVisibility",
00062                 winrt::name_of<winrt::Visibility>(),
00063                 winrt::name_of<winrt::ScrollView>(),
00064                 false /* isAttached */,
00065                 ValueHelper<winrt::Visibility>::BoxValueIfNecessary(ScrollView::s_defaultComputedHorizontalScrollBarVisibility),
00066                 winrt::PropertyChangedCallback(&OnComputedHorizontalScrollBarVisibilityPropertyChanged));
00067     }
00068     if (!s_ComputedHorizontalScrollModeProperty)
00069     {
00070         s_ComputedHorizontalScrollModeProperty =
00071             InitializeDependencyProperty(
00072                 L"ComputedHorizontalScrollMode",
00073                 winrt::name_of<winrt::ScrollingScrollMode>(),
00074                 winrt::name_of<winrt::ScrollView>(),
00075                 false /* isAttached */,
00076                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollView::s_defaultComputedHorizontalScrollMode),
00077                 winrt::PropertyChangedCallback(&OnComputedHorizontalScrollModePropertyChanged));
00078     }
00079     if (!s_ComputedVerticalScrollBarVisibilityProperty)
00080     {
00081         s_ComputedVerticalScrollBarVisibilityProperty =
00082             InitializeDependencyProperty(
00083                 L"ComputedVerticalScrollBarVisibility",
00084                 winrt::name_of<winrt::Visibility>(),
00085                 winrt::name_of<winrt::ScrollView>(),
00086                 false /* isAttached */,
00087                 ValueHelper<winrt::Visibility>::BoxValueIfNecessary(ScrollView::s_defaultComputedVerticalScrollBarVisibility),
00088                 winrt::PropertyChangedCallback(&OnComputedVerticalScrollBarVisibilityPropertyChanged));
00089     }
00090     if (!s_ComputedVerticalScrollModeProperty)
00091     {
00092         s_ComputedVerticalScrollModeProperty =
00093             InitializeDependencyProperty(
00094                 L"ComputedVerticalScrollMode",
00095                 winrt::name_of<winrt::ScrollingScrollMode>(),
00096                 winrt::name_of<winrt::ScrollView>(),
00097                 false /* isAttached */,
00098                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollView::s_defaultComputedVerticalScrollMode),
00099                 winrt::PropertyChangedCallback(&OnComputedVerticalScrollModePropertyChanged));
00100     }
00101     if (!s_ContentProperty)
00102     {
00103         s_ContentProperty =
00104             InitializeDependencyProperty(
00105                 L"Content",
00106                 winrt::name_of<winrt::UIElement>(),
00107                 winrt::name_of<winrt::ScrollView>(),
00108                 false /* isAttached */,
00109                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00110                 winrt::PropertyChangedCallback(&OnContentPropertyChanged));
00111     }
00112     if (!s_ContentOrientationProperty)
00113     {
00114         s_ContentOrientationProperty =
00115             InitializeDependencyProperty(
00116                 L"ContentOrientation",
00117                 winrt::name_of<winrt::ScrollingContentOrientation>(),
00118                 winrt::name_of<winrt::ScrollView>(),
00119                 false /* isAttached */,
00120                 ValueHelper<winrt::ScrollingContentOrientation>::BoxValueIfNecessary(ScrollView::s_defaultContentOrientation),
00121                 winrt::PropertyChangedCallback(&OnContentOrientationPropertyChanged));
00122     }
00123     if (!s_HorizontalAnchorRatioProperty)
00124     {
00125         s_HorizontalAnchorRatioProperty =
00126             InitializeDependencyProperty(
00127                 L"HorizontalAnchorRatio",
00128                 winrt::name_of<double>(),
00129                 winrt::name_of<winrt::ScrollView>(),
00130                 false /* isAttached */,
00131                 ValueHelper<double>::BoxValueIfNecessary(ScrollView::s_defaultAnchorRatio),
00132                 winrt::PropertyChangedCallback(&OnHorizontalAnchorRatioPropertyChanged));
00133     }
00134     if (!s_HorizontalScrollBarVisibilityProperty)
00135     {
00136         s_HorizontalScrollBarVisibilityProperty =
00137             InitializeDependencyProperty(
00138                 L"HorizontalScrollBarVisibility",
00139                 winrt::name_of<winrt::ScrollingScrollBarVisibility>(),
00140                 winrt::name_of<winrt::ScrollView>(),
00141                 false /* isAttached */,
00142                 ValueHelper<winrt::ScrollingScrollBarVisibility>::BoxValueIfNecessary(ScrollView::s_defaultHorizontalScrollBarVisibility),
00143                 winrt::PropertyChangedCallback(&OnHorizontalScrollBarVisibilityPropertyChanged));
00144     }
00145     if (!s_HorizontalScrollChainModeProperty)
00146     {
00147         s_HorizontalScrollChainModeProperty =
00148             InitializeDependencyProperty(
00149                 L"HorizontalScrollChainMode",
00150                 winrt::name_of<winrt::ScrollingChainMode>(),
00151                 winrt::name_of<winrt::ScrollView>(),
00152                 false /* isAttached */,
00153                 ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(ScrollView::s_defaultHorizontalScrollChainMode),
00154                 winrt::PropertyChangedCallback(&OnHorizontalScrollChainModePropertyChanged));
00155     }
00156     if (!s_HorizontalScrollModeProperty)
00157     {
00158         s_HorizontalScrollModeProperty =
00159             InitializeDependencyProperty(
00160                 L"HorizontalScrollMode",
00161                 winrt::name_of<winrt::ScrollingScrollMode>(),
00162                 winrt::name_of<winrt::ScrollView>(),
00163                 false /* isAttached */,
00164                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollView::s_defaultHorizontalScrollMode),
00165                 winrt::PropertyChangedCallback(&OnHorizontalScrollModePropertyChanged));
00166     }
00167     if (!s_HorizontalScrollRailModeProperty)
00168     {
00169         s_HorizontalScrollRailModeProperty =
00170             InitializeDependencyProperty(
00171                 L"HorizontalScrollRailMode",
00172                 winrt::name_of<winrt::ScrollingRailMode>(),
00173                 winrt::name_of<winrt::ScrollView>(),
00174                 false /* isAttached */,
00175                 ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(ScrollView::s_defaultHorizontalScrollRailMode),
00176                 winrt::PropertyChangedCallback(&OnHorizontalScrollRailModePropertyChanged));
00177     }
00178     if (!s_IgnoredInputKindsProperty)
00179     {
00180         s_IgnoredInputKindsProperty =
00181             InitializeDependencyProperty(
00182                 L"IgnoredInputKinds",
00183                 winrt::name_of<winrt::ScrollingInputKinds>(),
00184                 winrt::name_of<winrt::ScrollView>(),
00185                 false /* isAttached */,
00186                 ValueHelper<winrt::ScrollingInputKinds>::BoxValueIfNecessary(ScrollView::s_defaultIgnoredInputKinds),
00187                 winrt::PropertyChangedCallback(&OnIgnoredInputKindsPropertyChanged));
00188     }
00189     if (!s_MaxZoomFactorProperty)
00190     {
00191         s_MaxZoomFactorProperty =
00192             InitializeDependencyProperty(
00193                 L"MaxZoomFactor",
00194                 winrt::name_of<double>(),
00195                 winrt::name_of<winrt::ScrollView>(),
00196                 false /* isAttached */,
00197                 ValueHelper<double>::BoxValueIfNecessary(ScrollView::s_defaultMaxZoomFactor),
00198                 winrt::PropertyChangedCallback(&OnMaxZoomFactorPropertyChanged));
00199     }
00200     if (!s_MinZoomFactorProperty)
00201     {
00202         s_MinZoomFactorProperty =
00203             InitializeDependencyProperty(
00204                 L"MinZoomFactor",
00205                 winrt::name_of<double>(),
00206                 winrt::name_of<winrt::ScrollView>(),
00207                 false /* isAttached */,
00208                 ValueHelper<double>::BoxValueIfNecessary(ScrollView::s_defaultMinZoomFactor),
00209                 winrt::PropertyChangedCallback(&OnMinZoomFactorPropertyChanged));
00210     }
00211     if (!s_ScrollPresenterProperty)
00212     {
00213         s_ScrollPresenterProperty =
00214             InitializeDependencyProperty(
00215                 L"ScrollPresenter",
00216                 winrt::name_of<winrt::ScrollPresenter>(),
00217                 winrt::name_of<winrt::ScrollView>(),
00218                 false /* isAttached */,
00219                 ValueHelper<winrt::ScrollPresenter>::BoxedDefaultValue(),
00220                 winrt::PropertyChangedCallback(&OnScrollPresenterPropertyChanged));
00221     }
00222     if (!s_VerticalAnchorRatioProperty)
00223     {
00224         s_VerticalAnchorRatioProperty =
00225             InitializeDependencyProperty(
00226                 L"VerticalAnchorRatio",
00227                 winrt::name_of<double>(),
00228                 winrt::name_of<winrt::ScrollView>(),
00229                 false /* isAttached */,
00230                 ValueHelper<double>::BoxValueIfNecessary(ScrollView::s_defaultAnchorRatio),
00231                 winrt::PropertyChangedCallback(&OnVerticalAnchorRatioPropertyChanged));
00232     }
00233     if (!s_VerticalScrollBarVisibilityProperty)
00234     {
00235         s_VerticalScrollBarVisibilityProperty =
00236             InitializeDependencyProperty(
00237                 L"VerticalScrollBarVisibility",
00238                 winrt::name_of<winrt::ScrollingScrollBarVisibility>(),
00239                 winrt::name_of<winrt::ScrollView>(),
00240                 false /* isAttached */,
00241                 ValueHelper<winrt::ScrollingScrollBarVisibility>::BoxValueIfNecessary(ScrollView::s_defaultVerticalScrollBarVisibility),
00242                 winrt::PropertyChangedCallback(&OnVerticalScrollBarVisibilityPropertyChanged));
00243     }
00244     if (!s_VerticalScrollChainModeProperty)
00245     {
00246         s_VerticalScrollChainModeProperty =
00247             InitializeDependencyProperty(
00248                 L"VerticalScrollChainMode",
00249                 winrt::name_of<winrt::ScrollingChainMode>(),
00250                 winrt::name_of<winrt::ScrollView>(),
00251                 false /* isAttached */,
00252                 ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(ScrollView::s_defaultVerticalScrollChainMode),
00253                 winrt::PropertyChangedCallback(&OnVerticalScrollChainModePropertyChanged));
00254     }
00255     if (!s_VerticalScrollModeProperty)
00256     {
00257         s_VerticalScrollModeProperty =
00258             InitializeDependencyProperty(
00259                 L"VerticalScrollMode",
00260                 winrt::name_of<winrt::ScrollingScrollMode>(),
00261                 winrt::name_of<winrt::ScrollView>(),
00262                 false /* isAttached */,
00263                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollView::s_defaultVerticalScrollMode),
00264                 winrt::PropertyChangedCallback(&OnVerticalScrollModePropertyChanged));
00265     }
00266     if (!s_VerticalScrollRailModeProperty)
00267     {
00268         s_VerticalScrollRailModeProperty =
00269             InitializeDependencyProperty(
00270                 L"VerticalScrollRailMode",
00271                 winrt::name_of<winrt::ScrollingRailMode>(),
00272                 winrt::name_of<winrt::ScrollView>(),
00273                 false /* isAttached */,
00274                 ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(ScrollView::s_defaultVerticalScrollRailMode),
00275                 winrt::PropertyChangedCallback(&OnVerticalScrollRailModePropertyChanged));
00276     }
00277     if (!s_ZoomChainModeProperty)
00278     {
00279         s_ZoomChainModeProperty =
00280             InitializeDependencyProperty(
00281                 L"ZoomChainMode",
00282                 winrt::name_of<winrt::ScrollingChainMode>(),
00283                 winrt::name_of<winrt::ScrollView>(),
00284                 false /* isAttached */,
00285                 ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(ScrollView::s_defaultZoomChainMode),
00286                 winrt::PropertyChangedCallback(&OnZoomChainModePropertyChanged));
00287     }
00288     if (!s_ZoomModeProperty)
00289     {
00290         s_ZoomModeProperty =
00291             InitializeDependencyProperty(
00292                 L"ZoomMode",
00293                 winrt::name_of<winrt::ScrollingZoomMode>(),
00294                 winrt::name_of<winrt::ScrollView>(),
00295                 false /* isAttached */,
00296                 ValueHelper<winrt::ScrollingZoomMode>::BoxValueIfNecessary(ScrollView::s_defaultZoomMode),
00297                 winrt::PropertyChangedCallback(&OnZoomModePropertyChanged));
00298     }
00299 }
00300
00301 void ScrollViewProperties::ClearProperties()
00302 {
00303     s_ComputedHorizontalScrollBarVisibilityProperty = nullptr;
00304     s_ComputedHorizontalScrollModeProperty = nullptr;
00305     s_ComputedVerticalScrollBarVisibilityProperty = nullptr;
00306     s_ComputedVerticalScrollModeProperty = nullptr;
00307     s_ContentProperty = nullptr;
00308     s_ContentOrientationProperty = nullptr;
00309     s_HorizontalAnchorRatioProperty = nullptr;
00310     s_HorizontalScrollBarVisibilityProperty = nullptr;
00311     s_HorizontalScrollChainModeProperty = nullptr;
00312     s_HorizontalScrollModeProperty = nullptr;
00313     s_HorizontalScrollRailModeProperty = nullptr;
00314     s_IgnoredInputKindsProperty = nullptr;
00315     s_MaxZoomFactorProperty = nullptr;
00316     s_MinZoomFactorProperty = nullptr;
00317     s_ScrollPresenterProperty = nullptr;
00318     s_VerticalAnchorRatioProperty = nullptr;
00319     s_VerticalScrollBarVisibilityProperty = nullptr;
00320     s_VerticalScrollChainModeProperty = nullptr;
00321     s_VerticalScrollModeProperty = nullptr;
00322     s_VerticalScrollRailModeProperty = nullptr;
00323     s_ZoomChainModeProperty = nullptr;
00324     s_ZoomModeProperty = nullptr;
00325 }
00326
00327 void ScrollViewProperties::OnComputedHorizontalScrollBarVisibilityPropertyChanged(
00328     winrt::DependencyObject const& sender,
00329     winrt::DependencyPropertyChangedEventArgs const& args)
00330 {
00331     auto owner = sender.as<winrt::ScrollView>();
00332     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00333 }
00334
00335 void ScrollViewProperties::OnComputedHorizontalScrollModePropertyChanged(
00336     winrt::DependencyObject const& sender,
00337     winrt::DependencyPropertyChangedEventArgs const& args)
00338 {
00339     auto owner = sender.as<winrt::ScrollView>();
00340     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00341 }
00342
00343 void ScrollViewProperties::OnComputedVerticalScrollBarVisibilityPropertyChanged(
00344     winrt::DependencyObject const& sender,
00345     winrt::DependencyPropertyChangedEventArgs const& args)
00346 {
00347     auto owner = sender.as<winrt::ScrollView>();
00348     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00349 }
00350
00351 void ScrollViewProperties::OnComputedVerticalScrollModePropertyChanged(
00352     winrt::DependencyObject const& sender,
00353     winrt::DependencyPropertyChangedEventArgs const& args)
00354 {
00355     auto owner = sender.as<winrt::ScrollView>();
00356     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00357 }
00358
00359 void ScrollViewProperties::OnContentPropertyChanged(
00360     winrt::DependencyObject const& sender,
00361     winrt::DependencyPropertyChangedEventArgs const& args)
00362 {
00363     auto owner = sender.as<winrt::ScrollView>();
00364     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00365 }
00366
00367 void ScrollViewProperties::OnContentOrientationPropertyChanged(
00368     winrt::DependencyObject const& sender,
00369     winrt::DependencyPropertyChangedEventArgs const& args)
00370 {
00371     auto owner = sender.as<winrt::ScrollView>();
00372     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00373 }
00374
00375 void ScrollViewProperties::OnHorizontalAnchorRatioPropertyChanged(
00376     winrt::DependencyObject const& sender,
00377     winrt::DependencyPropertyChangedEventArgs const& args)
00378 {
00379     auto owner = sender.as<winrt::ScrollView>();
00380
00381     auto value = winrt::unbox_value<double>(args.NewValue());
00382     auto coercedValue = value;
00383     winrt::get_self<ScrollView>(owner)->ValidateAnchorRatio(coercedValue);
00384     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00385     {
00386         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00387         return;
00388     }
00389
00390     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00391 }
00392
00393 void ScrollViewProperties::OnHorizontalScrollBarVisibilityPropertyChanged(
00394     winrt::DependencyObject const& sender,
00395     winrt::DependencyPropertyChangedEventArgs const& args)
00396 {
00397     auto owner = sender.as<winrt::ScrollView>();
00398     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00399 }
00400
00401 void ScrollViewProperties::OnHorizontalScrollChainModePropertyChanged(
00402     winrt::DependencyObject const& sender,
00403     winrt::DependencyPropertyChangedEventArgs const& args)
00404 {
00405     auto owner = sender.as<winrt::ScrollView>();
00406     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00407 }
00408
00409 void ScrollViewProperties::OnHorizontalScrollModePropertyChanged(
00410     winrt::DependencyObject const& sender,
00411     winrt::DependencyPropertyChangedEventArgs const& args)
00412 {
00413     auto owner = sender.as<winrt::ScrollView>();
00414     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00415 }
00416
00417 void ScrollViewProperties::OnHorizontalScrollRailModePropertyChanged(
00418     winrt::DependencyObject const& sender,
00419     winrt::DependencyPropertyChangedEventArgs const& args)
00420 {
00421     auto owner = sender.as<winrt::ScrollView>();
00422     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00423 }
00424
00425 void ScrollViewProperties::OnIgnoredInputKindsPropertyChanged(
00426     winrt::DependencyObject const& sender,
00427     winrt::DependencyPropertyChangedEventArgs const& args)
00428 {
00429     auto owner = sender.as<winrt::ScrollView>();
00430     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00431 }
00432
00433 void ScrollViewProperties::OnMaxZoomFactorPropertyChanged(
00434     winrt::DependencyObject const& sender,
00435     winrt::DependencyPropertyChangedEventArgs const& args)
00436 {
00437     auto owner = sender.as<winrt::ScrollView>();
00438
00439     auto value = winrt::unbox_value<double>(args.NewValue());
00440     auto coercedValue = value;
00441     winrt::get_self<ScrollView>(owner)->ValidateZoomFactoryBoundary(coercedValue);
00442     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00443     {
00444         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00445         return;
00446     }
00447
00448     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00449 }
00450
00451 void ScrollViewProperties::OnMinZoomFactorPropertyChanged(
00452     winrt::DependencyObject const& sender,
00453     winrt::DependencyPropertyChangedEventArgs const& args)
00454 {
00455     auto owner = sender.as<winrt::ScrollView>();
00456
00457     auto value = winrt::unbox_value<double>(args.NewValue());
00458     auto coercedValue = value;
00459     winrt::get_self<ScrollView>(owner)->ValidateZoomFactoryBoundary(coercedValue);
00460     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00461     {
00462         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00463         return;
00464     }
00465
00466     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00467 }
00468
00469 void ScrollViewProperties::OnScrollPresenterPropertyChanged(
00470     winrt::DependencyObject const& sender,
00471     winrt::DependencyPropertyChangedEventArgs const& args)
00472 {
00473     auto owner = sender.as<winrt::ScrollView>();
00474     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00475 }
00476
00477 void ScrollViewProperties::OnVerticalAnchorRatioPropertyChanged(
00478     winrt::DependencyObject const& sender,
00479     winrt::DependencyPropertyChangedEventArgs const& args)
00480 {
00481     auto owner = sender.as<winrt::ScrollView>();
00482
00483     auto value = winrt::unbox_value<double>(args.NewValue());
00484     auto coercedValue = value;
00485     winrt::get_self<ScrollView>(owner)->ValidateAnchorRatio(coercedValue);
00486     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00487     {
00488         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00489         return;
00490     }
00491
00492     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00493 }
00494
00495 void ScrollViewProperties::OnVerticalScrollBarVisibilityPropertyChanged(
00496     winrt::DependencyObject const& sender,
00497     winrt::DependencyPropertyChangedEventArgs const& args)
00498 {
00499     auto owner = sender.as<winrt::ScrollView>();
00500     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00501 }
00502
00503 void ScrollViewProperties::OnVerticalScrollChainModePropertyChanged(
00504     winrt::DependencyObject const& sender,
00505     winrt::DependencyPropertyChangedEventArgs const& args)
00506 {
00507     auto owner = sender.as<winrt::ScrollView>();
00508     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00509 }
00510
00511 void ScrollViewProperties::OnVerticalScrollModePropertyChanged(
00512     winrt::DependencyObject const& sender,
00513     winrt::DependencyPropertyChangedEventArgs const& args)
00514 {
00515     auto owner = sender.as<winrt::ScrollView>();
00516     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00517 }
00518
00519 void ScrollViewProperties::OnVerticalScrollRailModePropertyChanged(
00520     winrt::DependencyObject const& sender,
00521     winrt::DependencyPropertyChangedEventArgs const& args)
00522 {
00523     auto owner = sender.as<winrt::ScrollView>();
00524     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00525 }
00526
00527 void ScrollViewProperties::OnZoomChainModePropertyChanged(
00528     winrt::DependencyObject const& sender,
00529     winrt::DependencyPropertyChangedEventArgs const& args)
00530 {
00531     auto owner = sender.as<winrt::ScrollView>();
00532     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00533 }
00534
00535 void ScrollViewProperties::OnZoomModePropertyChanged(
00536     winrt::DependencyObject const& sender,
00537     winrt::DependencyPropertyChangedEventArgs const& args)
00538 {
00539     auto owner = sender.as<winrt::ScrollView>();
00540     winrt::get_self<ScrollView>(owner)->OnPropertyChanged(args);
00541 }
00542
00543 void ScrollViewProperties::ComputedHorizontalScrollBarVisibility(winrt::Visibility const& value)
00544 {
00545     [[gsl::suppress(con)]]
00546     {
00547     static_cast<ScrollView*>(this)->SetValue(s_ComputedHorizontalScrollBarVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
00548     }
00549 }
00550
00551 winrt::Visibility ScrollViewProperties::ComputedHorizontalScrollBarVisibility()
00552 {
00553     return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ComputedHorizontalScrollBarVisibilityProperty));
00554 }
00555
00556 void ScrollViewProperties::ComputedHorizontalScrollMode(winrt::ScrollingScrollMode const& value)
00557 {
00558     [[gsl::suppress(con)]]
00559     {
00560     static_cast<ScrollView*>(this)->SetValue(s_ComputedHorizontalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00561     }
00562 }
00563
00564 winrt::ScrollingScrollMode ScrollViewProperties::ComputedHorizontalScrollMode()
00565 {
00566     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ComputedHorizontalScrollModeProperty));
00567 }
00568
00569 void ScrollViewProperties::ComputedVerticalScrollBarVisibility(winrt::Visibility const& value)
00570 {
00571     [[gsl::suppress(con)]]
00572     {
00573     static_cast<ScrollView*>(this)->SetValue(s_ComputedVerticalScrollBarVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
00574     }
00575 }
00576
00577 winrt::Visibility ScrollViewProperties::ComputedVerticalScrollBarVisibility()
00578 {
00579     return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ComputedVerticalScrollBarVisibilityProperty));
00580 }
00581
00582 void ScrollViewProperties::ComputedVerticalScrollMode(winrt::ScrollingScrollMode const& value)
00583 {
00584     [[gsl::suppress(con)]]
00585     {
00586     static_cast<ScrollView*>(this)->SetValue(s_ComputedVerticalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00587     }
00588 }
00589
00590 winrt::ScrollingScrollMode ScrollViewProperties::ComputedVerticalScrollMode()
00591 {
00592     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ComputedVerticalScrollModeProperty));
00593 }
00594
00595 void ScrollViewProperties::Content(winrt::UIElement const& value)
00596 {
00597     [[gsl::suppress(con)]]
00598     {
00599     static_cast<ScrollView*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00600     }
00601 }
00602
00603 winrt::UIElement ScrollViewProperties::Content()
00604 {
00605     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ContentProperty));
00606 }
00607
00608 void ScrollViewProperties::ContentOrientation(winrt::ScrollingContentOrientation const& value)
00609 {
00610     [[gsl::suppress(con)]]
00611     {
00612     static_cast<ScrollView*>(this)->SetValue(s_ContentOrientationProperty, ValueHelper<winrt::ScrollingContentOrientation>::BoxValueIfNecessary(value));
00613     }
00614 }
00615
00616 winrt::ScrollingContentOrientation ScrollViewProperties::ContentOrientation()
00617 {
00618     return ValueHelper<winrt::ScrollingContentOrientation>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ContentOrientationProperty));
00619 }
00620
00621 void ScrollViewProperties::HorizontalAnchorRatio(double value)
00622 {
00623     [[gsl::suppress(con)]]
00624     {
00625     double coercedValue = value;
00626     static_cast<ScrollView*>(this)->ValidateAnchorRatio(coercedValue);
00627     static_cast<ScrollView*>(this)->SetValue(s_HorizontalAnchorRatioProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00628     }
00629 }
00630
00631 double ScrollViewProperties::HorizontalAnchorRatio()
00632 {
00633     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_HorizontalAnchorRatioProperty));
00634 }
00635
00636 void ScrollViewProperties::HorizontalScrollBarVisibility(winrt::ScrollingScrollBarVisibility const& value)
00637 {
00638     [[gsl::suppress(con)]]
00639     {
00640     static_cast<ScrollView*>(this)->SetValue(s_HorizontalScrollBarVisibilityProperty, ValueHelper<winrt::ScrollingScrollBarVisibility>::BoxValueIfNecessary(value));
00641     }
00642 }
00643
00644 winrt::ScrollingScrollBarVisibility ScrollViewProperties::HorizontalScrollBarVisibility()
00645 {
00646     return ValueHelper<winrt::ScrollingScrollBarVisibility>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_HorizontalScrollBarVisibilityProperty));
00647 }
00648
00649 void ScrollViewProperties::HorizontalScrollChainMode(winrt::ScrollingChainMode const& value)
00650 {
00651     [[gsl::suppress(con)]]
00652     {
00653     static_cast<ScrollView*>(this)->SetValue(s_HorizontalScrollChainModeProperty, ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(value));
00654     }
00655 }
00656
00657 winrt::ScrollingChainMode ScrollViewProperties::HorizontalScrollChainMode()
00658 {
00659     return ValueHelper<winrt::ScrollingChainMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_HorizontalScrollChainModeProperty));
00660 }
00661
00662 void ScrollViewProperties::HorizontalScrollMode(winrt::ScrollingScrollMode const& value)
00663 {
00664     [[gsl::suppress(con)]]
00665     {
00666     static_cast<ScrollView*>(this)->SetValue(s_HorizontalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00667     }
00668 }
00669
00670 winrt::ScrollingScrollMode ScrollViewProperties::HorizontalScrollMode()
00671 {
00672     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_HorizontalScrollModeProperty));
00673 }
00674
00675 void ScrollViewProperties::HorizontalScrollRailMode(winrt::ScrollingRailMode const& value)
00676 {
00677     [[gsl::suppress(con)]]
00678     {
00679     static_cast<ScrollView*>(this)->SetValue(s_HorizontalScrollRailModeProperty, ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(value));
00680     }
00681 }
00682
00683 winrt::ScrollingRailMode ScrollViewProperties::HorizontalScrollRailMode()
00684 {
00685     return ValueHelper<winrt::ScrollingRailMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_HorizontalScrollRailModeProperty));
00686 }
00687
00688 void ScrollViewProperties::IgnoredInputKinds(winrt::ScrollingInputKinds const& value)
00689 {
00690     [[gsl::suppress(con)]]
00691     {
00692     static_cast<ScrollView*>(this)->SetValue(s_IgnoredInputKindsProperty, ValueHelper<winrt::ScrollingInputKinds>::BoxValueIfNecessary(value));
00693     }
00694 }
00695
00696 winrt::ScrollingInputKinds ScrollViewProperties::IgnoredInputKinds()
00697 {
00698     return ValueHelper<winrt::ScrollingInputKinds>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_IgnoredInputKindsProperty));
00699 }
00700
00701 void ScrollViewProperties::MaxZoomFactor(double value)
00702 {
00703     [[gsl::suppress(con)]]
00704     {
00705     double coercedValue = value;
00706     static_cast<ScrollView*>(this)->ValidateZoomFactoryBoundary(coercedValue);
00707     static_cast<ScrollView*>(this)->SetValue(s_MaxZoomFactorProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00708     }
00709 }
00710
00711 double ScrollViewProperties::MaxZoomFactor()
00712 {
00713     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_MaxZoomFactorProperty));
00714 }
00715
00716 void ScrollViewProperties::MinZoomFactor(double value)
00717 {
00718     [[gsl::suppress(con)]]
00719     {
00720     double coercedValue = value;
00721     static_cast<ScrollView*>(this)->ValidateZoomFactoryBoundary(coercedValue);
00722     static_cast<ScrollView*>(this)->SetValue(s_MinZoomFactorProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00723     }
00724 }
00725
00726 double ScrollViewProperties::MinZoomFactor()
00727 {
00728     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_MinZoomFactorProperty));
00729 }
00730
00731 void ScrollViewProperties::ScrollPresenter(winrt::ScrollPresenter const& value)
00732 {
00733     [[gsl::suppress(con)]]
00734     {
00735     static_cast<ScrollView*>(this)->SetValue(s_ScrollPresenterProperty, ValueHelper<winrt::ScrollPresenter>::BoxValueIfNecessary(value));
00736     }
00737 }
00738
00739 winrt::ScrollPresenter ScrollViewProperties::ScrollPresenter()
00740 {
00741     return ValueHelper<winrt::ScrollPresenter>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ScrollPresenterProperty));
00742 }
00743
00744 void ScrollViewProperties::VerticalAnchorRatio(double value)
00745 {
00746     [[gsl::suppress(con)]]
00747     {
00748     double coercedValue = value;
00749     static_cast<ScrollView*>(this)->ValidateAnchorRatio(coercedValue);
00750     static_cast<ScrollView*>(this)->SetValue(s_VerticalAnchorRatioProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00751     }
00752 }
00753
00754 double ScrollViewProperties::VerticalAnchorRatio()
00755 {
00756     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_VerticalAnchorRatioProperty));
00757 }
00758
00759 void ScrollViewProperties::VerticalScrollBarVisibility(winrt::ScrollingScrollBarVisibility const& value)
00760 {
00761     [[gsl::suppress(con)]]
00762     {
00763     static_cast<ScrollView*>(this)->SetValue(s_VerticalScrollBarVisibilityProperty, ValueHelper<winrt::ScrollingScrollBarVisibility>::BoxValueIfNecessary(value));
00764     }
00765 }
00766
00767 winrt::ScrollingScrollBarVisibility ScrollViewProperties::VerticalScrollBarVisibility()
00768 {
00769     return ValueHelper<winrt::ScrollingScrollBarVisibility>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_VerticalScrollBarVisibilityProperty));
00770 }
00771
00772 void ScrollViewProperties::VerticalScrollChainMode(winrt::ScrollingChainMode const& value)
00773 {
00774     [[gsl::suppress(con)]]
00775     {
00776     static_cast<ScrollView*>(this)->SetValue(s_VerticalScrollChainModeProperty, ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(value));
00777     }
00778 }
00779
00780 winrt::ScrollingChainMode ScrollViewProperties::VerticalScrollChainMode()
00781 {
00782     return ValueHelper<winrt::ScrollingChainMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_VerticalScrollChainModeProperty));
00783 }
00784
00785 void ScrollViewProperties::VerticalScrollMode(winrt::ScrollingScrollMode const& value)
00786 {
00787     [[gsl::suppress(con)]]
00788     {
00789     static_cast<ScrollView*>(this)->SetValue(s_VerticalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00790     }
00791 }
00792
00793 winrt::ScrollingScrollMode ScrollViewProperties::VerticalScrollMode()
00794 {
00795     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_VerticalScrollModeProperty));
00796 }
00797
00798 void ScrollViewProperties::VerticalScrollRailMode(winrt::ScrollingRailMode const& value)
00799 {
00800     [[gsl::suppress(con)]]
00801     {
00802     static_cast<ScrollView*>(this)->SetValue(s_VerticalScrollRailModeProperty, ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(value));
00803     }
00804 }
00805
00806 winrt::ScrollingRailMode ScrollViewProperties::VerticalScrollRailMode()
00807 {
00808     return ValueHelper<winrt::ScrollingRailMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_VerticalScrollRailModeProperty));
00809 }
00810
00811 void ScrollViewProperties::ZoomChainMode(winrt::ScrollingChainMode const& value)
00812 {
00813     [[gsl::suppress(con)]]
00814     {
00815     static_cast<ScrollView*>(this)->SetValue(s_ZoomChainModeProperty, ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(value));
00816     }
00817 }
00818
00819 winrt::ScrollingChainMode ScrollViewProperties::ZoomChainMode()
00820 {
00821     return ValueHelper<winrt::ScrollingChainMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ZoomChainModeProperty));
00822 }
00823
00824 void ScrollViewProperties::ZoomMode(winrt::ScrollingZoomMode const& value)
00825 {
00826     [[gsl::suppress(con)]]
00827     {
00828     static_cast<ScrollView*>(this)->SetValue(s_ZoomModeProperty, ValueHelper<winrt::ScrollingZoomMode>::BoxValueIfNecessary(value));
00829     }
00830 }
00831
00832 winrt::ScrollingZoomMode ScrollViewProperties::ZoomMode()
00833 {
00834     return ValueHelper<winrt::ScrollingZoomMode>::CastOrUnbox(static_cast<ScrollView*>(this)->GetValue(s_ZoomModeProperty));
00835 }
00836
00837 winrt::event_token ScrollViewProperties::AnchorRequested(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs> const& value)
00838 {
00839     return m_anchorRequestedEventSource.add(value);
00840 }
00841
00842 void ScrollViewProperties::AnchorRequested(winrt::event_token const& token)
00843 {
00844     m_anchorRequestedEventSource.remove(token);
00845 }
00846
00847 winrt::event_token ScrollViewProperties::BringingIntoView(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs> const& value)
00848 {
00849     return m_bringingIntoViewEventSource.add(value);
00850 }
00851
00852 void ScrollViewProperties::BringingIntoView(winrt::event_token const& token)
00853 {
00854     m_bringingIntoViewEventSource.remove(token);
00855 }
00856
00857 winrt::event_token ScrollViewProperties::ExtentChanged(winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> const& value)
00858 {
00859     return m_extentChangedEventSource.add(value);
00860 }
00861
00862 void ScrollViewProperties::ExtentChanged(winrt::event_token const& token)
00863 {
00864     m_extentChangedEventSource.remove(token);
00865 }
00866
00867 winrt::event_token ScrollViewProperties::ScrollAnimationStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs> const& value)
00868 {
00869     return m_scrollAnimationStartingEventSource.add(value);
00870 }
00871
00872 void ScrollViewProperties::ScrollAnimationStarting(winrt::event_token const& token)
00873 {
00874     m_scrollAnimationStartingEventSource.remove(token);
00875 }
00876
00877 winrt::event_token ScrollViewProperties::ScrollCompleted(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs> const& value)
00878 {
00879     return m_scrollCompletedEventSource.add(value);
00880 }
00881
00882 void ScrollViewProperties::ScrollCompleted(winrt::event_token const& token)
00883 {
00884     m_scrollCompletedEventSource.remove(token);
00885 }
00886
00887 winrt::event_token ScrollViewProperties::ScrollStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs> const& value)
00888 {
00889     return m_scrollStartingEventSource.add(value);
00890 }
00891
00892 void ScrollViewProperties::ScrollStarting(winrt::event_token const& token)
00893 {
00894     m_scrollStartingEventSource.remove(token);
00895 }
00896
00897 winrt::event_token ScrollViewProperties::StateChanged(winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> const& value)
00898 {
00899     return m_stateChangedEventSource.add(value);
00900 }
00901
00902 void ScrollViewProperties::StateChanged(winrt::event_token const& token)
00903 {
00904     m_stateChangedEventSource.remove(token);
00905 }
00906
00907 winrt::event_token ScrollViewProperties::ViewChanged(winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> const& value)
00908 {
00909     return m_viewChangedEventSource.add(value);
00910 }
00911
00912 void ScrollViewProperties::ViewChanged(winrt::event_token const& token)
00913 {
00914     m_viewChangedEventSource.remove(token);
00915 }
00916
00917 winrt::event_token ScrollViewProperties::ZoomAnimationStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs> const& value)
00918 {
00919     return m_zoomAnimationStartingEventSource.add(value);
00920 }
00921
00922 void ScrollViewProperties::ZoomAnimationStarting(winrt::event_token const& token)
00923 {
00924     m_zoomAnimationStartingEventSource.remove(token);
00925 }
00926
00927 winrt::event_token ScrollViewProperties::ZoomCompleted(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs> const& value)
00928 {
00929     return m_zoomCompletedEventSource.add(value);
00930 }
00931
00932 void ScrollViewProperties::ZoomCompleted(winrt::event_token const& token)
00933 {
00934     m_zoomCompletedEventSource.remove(token);
00935 }
00936
00937 winrt::event_token ScrollViewProperties::ZoomStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs> const& value)
00938 {
00939     return m_zoomStartingEventSource.add(value);
00940 }
00941
00942 void ScrollViewProperties::ZoomStarting(winrt::event_token const& token)
00943 {
00944     m_zoomStartingEventSource.remove(token);
00945 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitVector< T, SplitVectorID > Member List

This is the complete list of members for SplitVector< T, SplitVectorID >, including all inherited members.
Clear() | SplitVector< T, SplitVectorID > | [inline]
GetVector() | SplitVector< T, SplitVectorID > | [inline]
GetVectorIDForItem() | SplitVector< T, SplitVectorID > | [inline]
IndexFromIndexInOriginalVector(int indexInOriginalVector) | SplitVector< T, SplitVectorID > | [inline]
IndexOf(const typename T &value) | SplitVector< T, SplitVectorID > | [inline]
IndexToIndexInOriginalVector(int index) | SplitVector< T, SplitVectorID > | [inline]
InsertAt(int preferIndex, int indexInOriginalVector, typename T const &value) | SplitVector< T, SplitVectorID > | [inline]
m_vector | SplitVector< T, SplitVectorID > | [private]
m_vectorID | SplitVector< T, SplitVectorID > | [private]
OnRawDataInsert(int preferIndex, int indexInOriginalVector, typename T const &value, SplitVectorID vectorID) | SplitVector< T, SplitVectorID > | [inline]
OnRawDataRemove(int indexInOriginalVector, SplitVectorID vectorID) | SplitVector< T, SplitVectorID > | [inline]
RemoveAt(int indexInOriginalVector) | SplitVector< T, SplitVectorID > | [inline]
Replace(int indexInOriginalVector, typename T const &value) | SplitVector< T, SplitVectorID > | [inline]
Size() | SplitVector< T, SplitVectorID > | [inline, private]
SplitVector(const ITrackerHandleManager *owner, typename SplitVectorID id, std::function< int(typename T const &value)> indexOfFunction) | SplitVector< T, SplitVectorID > | [inline]
Generated on Sun Dec 1 2024 20:53:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TemperatureAndTintEffect Member List

This is the complete list of members for TemperatureAndTintEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1TemperatureTint) | TemperatureAndTintEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"Temperature", D2D1_TEMPERATUREANDTINT_PROP_TEMPERATURE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Tint", D2D1_TEMPERATUREANDTINT_PROP_TINT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | TemperatureAndTintEffect |
DECLARE_POD_PROPERTY(Temperature, float, 0.0f, value >=-1.0f &&value<=1.0f) | TemperatureAndTintEffect |
DECLARE_POD_PROPERTY(Tint, float, 0.0f, value >=-1.0f &&value<=1.0f) | TemperatureAndTintEffect |
DECLARE_SINGLE_SOURCE(Source) | TemperatureAndTintEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | TemperatureAndTintEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | TemperatureAndTintEffect | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpecialTreeViewList Member List

This is the complete list of members for SpecialTreeViewList, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
CheckThread() | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
ContainerFromNode(winrt::TreeViewNode const &node) const | TreeViewList |
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewList > &&self) noexcept | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline, static]
DraggedTreeViewNode() const | TreeViewList |
DraggedTreeViewNode(winrt::TreeViewNode const &node) | TreeViewList |
EnableMultiselect(bool isEnabled) | TreeViewList |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
final_release(std::unique_ptr< TreeViewList > &&self) | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline, static]
FlatIndex(const winrt::TreeViewNode &node) const | TreeViewList |
GetBase() | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
GetContainerForItemOverride() | SpecialTreeViewList | [inline, protected]
GetDropTargetDropEffect() | TreeViewList |
GetInner() | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
GetRootsOfSelectedSubtrees() const | TreeViewList |
IsContentMode() const | TreeViewList |
IsFlatIndexValid(int index) const | TreeViewList |
IsMultiselect() const | TreeViewList |
IsMutiSelectWithSelectedItems() const | TreeViewList |
IsOnThread() | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
IsSelected(const winrt::TreeViewNode &node) const | TreeViewList |
ItemFromNode(winrt::TreeViewNode const &node) const | TreeViewList |
ListViewModel() const | TreeViewList |
ListViewModel(com_ptr< ViewModel > viewModel) | TreeViewList |
NodeFromContainer(winrt::DependencyObject const &container) const | TreeViewList |
NodeFromItem(winrt::IInspectable const &item) const | TreeViewList |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
OnApplyTemplate() | TreeViewList |
OnContainerContentChanging(const winrt::IInspectable &sender, const winrt::ContainerContentChangingEventArgs &args) | TreeViewList |
OnCreateAutomationPeer() | TreeViewList |
OnDragEnter(winrt::DragEventArgs const &e) | TreeViewList |
OnDragItemsCompleted(const winrt::IInspectable &sender, const winrt::DragItemsCompletedEventArgs &args) | TreeViewList |
OnDragItemsStarting(const winrt::IInspectable &sender, const winrt::DragItemsStartingEventArgs &args) | TreeViewList |
OnDragLeave(winrt::DragEventArgs const &e) | TreeViewList |
OnDragOver(winrt::DragEventArgs const &e) | TreeViewList |
OnDrop(winrt::DragEventArgs const &e) | TreeViewList |
PrepareContainerForItemOverride(winrt::DependencyObject const &element, winrt::IInspectable const &item) | TreeViewList |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewList, winrt::implementation::TreeViewListT > | [inline]
RemoveNodeFromParent(const winrt::TreeViewNode &node) const | TreeViewList |
SetDraggedOverItem(winrt::TreeViewItem newDraggedOverItem) | TreeViewList |
TreeViewList() | TreeViewList |
UpdateDropTargetDropEffect(bool forceUpdate, bool isLeaving, winrt::TreeViewItem keyboardReorderedContainer) | TreeViewList |
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarSelectionChangedEventArgs.h Source File

  • File List
  • File Members
  • SelectorBar

SelectorBarSelectionChangedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SelectorBarSelectionChangedEventArgs.g.h"
00007
00008 class SelectorBarSelectionChangedEventArgs :
00009     public winrt::implementation::SelectorBarSelectionChangedEventArgsT<SelectorBarSelectionChangedEventArgs>
00010 {
00011 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewCustomThemeResourcesPage Member List

This is the complete list of members for NavigationViewCustomThemeResourcesPage, including all inherited members.
BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
ChangeContent_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
ChangeHeaderButton_Click(object sender, RoutedEventArgs args) | NavigationViewCustomThemeResourcesPage | [inline, private]
ChangePaneHeader_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
ChangePaneTitleStyle_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
ChangePaneTitleText_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
defaultPaneTitleTextBlockStyle | NavigationViewCustomThemeResourcesPage | [private]
ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
FlipOrientation_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
GetHeaderContentMargin_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
GetNavViewActiveVisualStates_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
IsTitleBarAutoPaddingEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
IsTitleBarAutoPaddingEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
NavigationViewCustomThemeResourcesPage() | NavigationViewCustomThemeResourcesPage | [inline]
NavigationViewPage_Loaded(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
OpenPaneButton_Click(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
TitleBarCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCustomThemeResourcesPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IndexRange.cpp Source File

  • File List
  • File Members
  • Repeater

IndexRange.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "IndexRange.h"
00006
00007 IndexRange::IndexRange(int begin, int end)
00008 {
00009     // Accept out of order begin/end pairs, just swap them.
00010     if (begin > end)
00011     {
00012         const int temp = begin;
00013         begin = end;
00014         end = temp;
00015     }
00016
00017     MUX_ASSERT(begin <= end);
00018
00019     m_begin = begin;
00020     m_end = end;
00021 }
00022
00023 int IndexRange::Begin() const
00024 {
00025     return m_begin;
00026 }
00027
00028 int IndexRange::End() const
00029 {
00030     return m_end;
00031 }
00032
00033 bool IndexRange::Contains(int index) const
00034 {
00035     return index >= m_begin && index <= m_end;
00036 }
00037
00038 bool IndexRange::Split(int splitIndex, IndexRange& before, IndexRange& after)
00039 {
00040     MUX_ASSERT(Contains(splitIndex));
00041
00042     bool afterIsValid;
00043
00044     before = IndexRange(m_begin, splitIndex);
00045     if (splitIndex < m_end)
00046     {
00047         after = IndexRange(splitIndex + 1, m_end);
00048         afterIsValid = true;
00049     }
00050     else
00051     {
00052         after = IndexRange();
00053         afterIsValid = false;
00054     }
00055
00056     return afterIsValid;
00057 }
00058
00059 bool IndexRange::Intersects(const IndexRange& other) const
00060 {
00061     return ((m_begin <= other.End()) && (m_end >= other.Begin()));
00062 }
00063
00064 bool IndexRange::operator==(const IndexRange& rhs) const
00065 {
00066     return m_begin == rhs.m_begin && m_end == rhs.m_end;
00067 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTearOutWindowWithDataItems.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

TabViewTearOutWindowWithDataItems.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Navigation;
00007 using System;
00008 using System.Collections.Generic;
00009 using System.Collections.ObjectModel;
00010 using System.Collections.Specialized;
00011 using System.Linq;
00012 using Windows.Foundation.Collections;
00013 using Windows.Graphics;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public sealed partial class TabViewTearOutWindowWithDataItems : Window
00018     {
00019         public static readonly SizeInt32 DefaultWindowSize = new(1000, 300);
00020
00021         public ObservableCollection<object> StringList { get; set; }
00022
00023         public TabViewTearOutWindowWithDataItems()
00024         {
00025             this.InitializeComponent();
00026
00027             StringList = [
00028                 "Document 1",
00029                 "Document 2",
00030                 "Document 3",
00031             ];
00032
00033             Title = "MUXControlsTestApp.Desktop - Secondary TabViewTearOutWindow";
00034         }
00035
00036         // A user has begun interacting with a tab, such that they might want to tear it out into its own window.
00037         // We'll create a hidden window with the tab's contents that will be shown if the user tears out the tab.
00038         private void OnTabTearOutWindowRequested(TabView _, TabViewTabTearOutWindowRequestedEventArgs args)
00039         {
00040             TabViewTearOutWindowWithDataItems newWindow = new() { StringList = [.. args.Items], ExtendsContentIntoTitleBar = true };
00041             newWindow.AppWindow.Hide();
00042             newWindow.AppWindow.Resize(DefaultWindowSize);
00043             args.NewWindowId = newWindow.AppWindow.Id;
00044         }
00045
00046         // A user has torn out a tab, so now is the time we need to remove the torn-out item from our item list.
00047         private void OnTabTearOutRequested(TabView _, TabViewTabTearOutRequestedEventArgs args)
00048         {
00049             for (int i = 0; i < args.Items.Length; i++)
00050             {
00051                 int index = StringList.IndexOf(args.Items[i]);
00052
00053                 if (index >= 0)
00054                 {
00055                     StringList.RemoveAt(index);
00056                 }
00057             }
00058         }
00059
00060         // A tab being dragged from within this process has been dropped on another tab view.  This gives the tab view
00061         // the opportunity to check to see whether it actually want to accepts the new tab.  In the case of this test app,
00062         // however, we'll just always accept a dropped tab.
00063         private void OnExternalTornOutTabsDropping(TabView _, TabViewExternalTornOutTabsDroppingEventArgs args)
00064         {
00065             args.AllowDrop = true;
00066         }
00067
00068         // The tab being dragged has now been dropped onto another tab view.  We'll add its item to our item list.
00069         // The tab view will take care of disposing of the window.
00070         private void OnExternalTornOutTabsDropped(TabView _, TabViewExternalTornOutTabsDroppedEventArgs args)
00071         {
00072             for (int i = 0; i < args.Items.Length; i++)
00073             {
00074                 int index = StringList.IndexOf(args.Items[i]);
00075
00076                 if (index >= 0)
00077                 {
00078                     StringList.RemoveAt(index);
00079                 }
00080             }
00081
00082             for (int i = 0; i < args.Items.Length; i++)
00083             {
00084                 StringList.Insert(Math.Min(args.DropIndex + i, StringList.Count), args.Items[i]);
00085             }
00086         }
00087     }
00088 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RecyclePoolProperties Member List

This is the complete list of members for RecyclePoolProperties, including all inherited members.
ClearProperties() | RecyclePoolProperties | [static]
EnsureProperties() | RecyclePoolProperties | [static]
GetPoolInstance(winrt::DataTemplate const &target) | RecyclePoolProperties | [static]
PoolInstanceProperty() | RecyclePoolProperties | [inline, static]
RecyclePoolProperties() | RecyclePoolProperties |
s_PoolInstanceProperty | RecyclePoolProperties | [static]
SetPoolInstance(winrt::DataTemplate const &target, winrt::RecyclePool const &value) | RecyclePoolProperties | [static]
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewportManagerWithPlatformFeatures Member List

This is the complete list of members for ViewportManagerWithPlatformFeatures, including all inherited members.
EnsureScroller() | ViewportManagerWithPlatformFeatures | [private]
GetImmediateChildOfRepeater(winrt::UIElement const &descendant) | ViewportManagerWithPlatformFeatures | [private]
GetLayoutExtent() const override | ViewportManagerWithPlatformFeatures | [inline, virtual]
GetLayoutId() const | ViewportManagerWithPlatformFeatures | [private]
GetLayoutRealizationWindow() const override | ViewportManagerWithPlatformFeatures | [virtual]
GetLayoutVisibleWindow() const override | ViewportManagerWithPlatformFeatures | [virtual]
GetLayoutVisibleWindowDiscardAnchor() const | ViewportManagerWithPlatformFeatures | [private]
GetOrigin() const override | ViewportManagerWithPlatformFeatures | [inline, virtual]
HasScroller() const | ViewportManagerWithPlatformFeatures | [inline, private]
HorizontalCacheLength() const override | ViewportManagerWithPlatformFeatures | [inline, virtual]
HorizontalCacheLength(double value) override | ViewportManagerWithPlatformFeatures | [virtual]
m_makeAnchorElement | ViewportManagerWithPlatformFeatures | [private]
m_preparedAndArrangedElements | ViewportManagerWithPlatformFeatures | [private]
m_preparedElements | ViewportManagerWithPlatformFeatures | [private]
m_scroller | ViewportManagerWithPlatformFeatures | [private]
MadeAnchor() const override | ViewportManagerWithPlatformFeatures | [inline, virtual]
OnBringIntoViewRequested(const winrt::BringIntoViewRequestedEventArgs &args) override | ViewportManagerWithPlatformFeatures | [virtual]
OnCacheBuildActionCompleted() | ViewportManagerWithPlatformFeatures | [private]
OnCompositionTargetRendering(winrt::IInspectable const &sender, winrt::IInspectable const &args) | ViewportManagerWithPlatformFeatures | [private]
OnEffectiveViewportChanged(winrt::FrameworkElement const &sender, winrt::EffectiveViewportChangedEventArgs const &args) | ViewportManagerWithPlatformFeatures | [private]
OnElementCleared(const winrt::UIElement &element) override | ViewportManagerWithPlatformFeatures | [virtual]
OnElementPrepared(const winrt::UIElement &element) override | ViewportManagerWithPlatformFeatures | [virtual]
OnLayoutChanged(bool isVirtualizing) override | ViewportManagerWithPlatformFeatures | [virtual]
OnLayoutUpdated(winrt::IInspectable const &sender, winrt::IInspectable const &args) | ViewportManagerWithPlatformFeatures | [private]
OnMakeAnchor(const winrt::UIElement &anchor, const bool isAnchorOutsideRealizedRange) override | ViewportManagerWithPlatformFeatures | [virtual]
OnOwnerArranged() override | ViewportManagerWithPlatformFeatures | [virtual]
OnOwnerMeasuring() override | ViewportManagerWithPlatformFeatures | [virtual]
OnScrollPresenterScrollStarting(winrt::ScrollPresenter const &scrollPresenter, winrt::ScrollingScrollStartingEventArgs const &args) | ViewportManagerWithPlatformFeatures | [private]
OnScrollPresenterViewChangeStarting(winrt::ScrollPresenter const &scrollPresenter, double horizontalOffset, double verticalOffset, float zoomFactor) | ViewportManagerWithPlatformFeatures | [private]
OnScrollPresenterZoomStarting(winrt::ScrollPresenter const &scrollPresenter, winrt::ScrollingZoomStartingEventArgs const &args) | ViewportManagerWithPlatformFeatures | [private]
RegisterCacheBuildWork() | ViewportManagerWithPlatformFeatures | [private]
RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates() | ViewportManagerWithPlatformFeatures | [private]
RegisterPreparedElementsAsArranged() | ViewportManagerWithPlatformFeatures | [private]
ResetCacheBuffer(bool registerCacheBuildWork=true) | ViewportManagerWithPlatformFeatures | [private]
ResetExpectedViewportShift() | ViewportManagerWithPlatformFeatures | [private]
ResetLayoutExtent() | ViewportManagerWithPlatformFeatures | [private]
ResetLayoutRealizationWindowCacheBuffer() override | ViewportManagerWithPlatformFeatures | [virtual]
ResetPendingViewportShift() | ViewportManagerWithPlatformFeatures | [private]
ResetScrollers() override | ViewportManagerWithPlatformFeatures | [virtual]
ResetUnshiftableShift() | ViewportManagerWithPlatformFeatures | [private]
ResetVisibleWindow() | ViewportManagerWithPlatformFeatures | [private]
SetExpectedViewportShift(float expectedViewportShiftX, float expectedViewportShiftY) | ViewportManagerWithPlatformFeatures | [private]
SetLayoutExtent(const winrt::Rect &layoutExtent) override | ViewportManagerWithPlatformFeatures | [virtual]
SetPendingViewportShift(const winrt::Point &pendingViewportShift) | ViewportManagerWithPlatformFeatures | [private]
SetUnshiftableShift(float unshiftableShiftX, float unshiftableShiftY) | ViewportManagerWithPlatformFeatures | [private]
SetVisibleWindow(const winrt::Rect &visibleWindow) | ViewportManagerWithPlatformFeatures | [private]
SuggestedAnchor() const override | ViewportManagerWithPlatformFeatures | [virtual]
TryInvalidateMeasure() | ViewportManagerWithPlatformFeatures | [private]
UnregisterScrollAnchorCandidates(winrt::UIElement const &exceptionElement, bool registerAsPreparedAndArrangedElements) | ViewportManagerWithPlatformFeatures | [private]
UpdateViewport(winrt::Rect const &effectiveViewport) | ViewportManagerWithPlatformFeatures | [private]
ValidateCacheLength(double cacheLength) | ViewportManagerWithPlatformFeatures | [private]
VerticalCacheLength() const override | ViewportManagerWithPlatformFeatures | [inline, virtual]
VerticalCacheLength(double value) override | ViewportManagerWithPlatformFeatures | [virtual]
ViewportManagerWithPlatformFeatures(ItemsRepeater *owner) | ViewportManagerWithPlatformFeatures |
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarIsStencilButtonCheckedChangedEventArgs.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarIsStencilButtonCheckedChangedEventArgs.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarIsStencilButtonCheckedChangedEventArgs.g.h"
00011
00012 class InkToolBarIsStencilButtonCheckedChangedEventArgs :
00013     public ReferenceTracker<InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT>
00014 {
00015 public:
00016
00017     winrt::InkToolBarStencilButton StencilButton() { winrt::throw_hresult(E_NOTIMPL); }
00018     winrt::InkToolBarStencilKind StencilKind() { winrt::throw_hresult(E_NOTIMPL); }
00019 };
00020
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/Utils.h Source File

  • File List
  • File Members
  • ResourceHelper

Utils.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include <codecvt>
00007 #include <string>
00008
00009 namespace StringUtil
00010 {
00011     /// <summary>
00012     /// Formats a given string with the desired parameter list.
00013     /// </summary>
00014     /// <param name="formatString">The format string.</param>
00015     /// <param name="...">The parameter list of format args.</param>
00016     /// <returns>The formatted string.</returns>
00017     winrt::hstring FormatString(std::wstring_view formatString, ...);
00018
00019     std::wstring Utf8ToUtf16(const std::string_view& utf8Str);
00020     std::string Utf16ToUtf8(const std::wstring_view& utf16Str);
00021 }
00022
00023 class VisualStateUtil
00024 {
00025 public:
00026     static winrt::VisualStateGroup GetVisualStateGroup(const winrt::FrameworkElement& control, const std::wstring_view& groupName);
00027     static bool VisualStateGroupExists(const winrt::FrameworkElement& control, const std::wstring_view& groupName);
00028     static void GoToStateIfGroupExists(const winrt::Control& control, const std::wstring_view& groupName, const std::wstring_view& stateName, bool useTransitions);
00029 };
00030
00031 namespace LayoutUtils
00032 {
00033     template<class UIElementType>
00034     inline float MeasureAndGetDesiredWidthFor(UIElementType element, winrt::Size const& availableSize)
00035     {
00036         float desiredWidth = 0;
00037         if (element)
00038         {
00039             element.Measure(availableSize);
00040             desiredWidth = element.DesiredSize().Width;
00041         }
00042         return desiredWidth;
00043     }
00044
00045     template<class UIElementType>
00046     inline float MeasureAndGetDesiredHeightFor(UIElementType element, winrt::Size const& availableSize)
00047     {
00048         float desiredHeight = 0;
00049         if (element)
00050         {
00051             element.Measure(availableSize);
00052             desiredHeight = element.DesiredSize().Height;
00053         }
00054         return desiredHeight;
00055     }
00056
00057     template<class UIElementType>
00058     inline double GetActualWidthFor(UIElementType element)
00059     {
00060         return (element ? element.ActualWidth() : 0);
00061     }
00062 }
00063
00064 namespace Util
00065 {
00066     inline winrt::Visibility constexpr VisibilityFromBool(bool visible)
00067     {
00068         return visible ? winrt::Visibility::Visible : winrt::Visibility::Collapsed;
00069     }
00070 }
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollBarController Member List

This is the complete list of members for ScrollBarController, including all inherited members.
AddScrollVelocityRequested(winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerAddScrollVelocityRequestedEventArgs > const &value) | ScrollBarController |
AddScrollVelocityRequested(winrt::event_token const &token) | ScrollBarController |
CanScroll() | ScrollBarController |
CanScrollChanged(winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value) | ScrollBarController |
CanScrollChanged(winrt::event_token const &token) | ScrollBarController |
GetScrollAnimation(int correlationId, winrt::float2 const &startPosition, winrt::float2 const &endPosition, winrt::CompositionAnimation const &defaultAnimation) | ScrollBarController |
HookScrollBarEvent() | ScrollBarController | [private]
HookScrollBarPropertyChanged() | ScrollBarController | [private]
IsScrollingWithMouse() | ScrollBarController |
IsScrollingWithMouseChanged(winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value) | ScrollBarController |
IsScrollingWithMouseChanged(winrt::event_token const &token) | ScrollBarController |
m_scrollBar | ScrollBarController | [private]
NotifyRequestedScrollCompleted(int correlationId) | ScrollBarController |
OnScroll(const winrt::IInspectable &sender, const winrt::ScrollEventArgs &args) | ScrollBarController | [private]
OnScrollBarPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | ScrollBarController | [private]
PanningInfo() | ScrollBarController |
RaiseAddScrollVelocityRequested(double offsetChange) | ScrollBarController | [private]
RaiseCanScrollChanged() | ScrollBarController | [private]
RaiseIsScrollingWithMouseChanged() | ScrollBarController | [private]
RaiseScrollByRequested(double offsetChange) | ScrollBarController | [private]
RaiseScrollToRequested(double offset) | ScrollBarController | [private]
s_inertiaDecayRate | ScrollBarController | [private, static]
ScrollBarController() | ScrollBarController |
ScrollByRequested(winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollByRequestedEventArgs > const &value) | ScrollBarController |
ScrollByRequested(winrt::event_token const &token) | ScrollBarController |
ScrollToRequested(winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollToRequestedEventArgs > const &value) | ScrollBarController |
ScrollToRequested(winrt::event_token const &token) | ScrollBarController |
SetIsScrollable(bool isScrollable) | ScrollBarController |
SetScrollBar(const winrt::ScrollBar &scrollBar) | ScrollBarController |
SetValues(double minOffset, double maxOffset, double offset, double viewportLength) | ScrollBarController |
UnhookScrollBarEvent() | ScrollBarController | [private]
UnhookScrollBarPropertyChanged() | ScrollBarController | [private]
UpdateCanScroll() | ScrollBarController | [private]
~ScrollBarController() | ScrollBarController |
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemBaseProperties Member List

This is the complete list of members for NavigationViewItemBaseProperties, including all inherited members.
ClearProperties() | NavigationViewItemBaseProperties | [static]
EnsureProperties() | NavigationViewItemBaseProperties | [static]
IsSelected(bool value) | NavigationViewItemBaseProperties |
IsSelected() | NavigationViewItemBaseProperties |
IsSelectedProperty() | NavigationViewItemBaseProperties | [inline, static]
NavigationViewItemBaseProperties() | NavigationViewItemBaseProperties |
OnIsSelectedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemBaseProperties | [static]
s_IsSelectedProperty | NavigationViewItemBaseProperties | [static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/APITests/IconSourceApiTests.cs Source File

  • File List
  • File Members
  • IconSource
  • APITests

IconSourceApiTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using MUXControlsTestApp.Utilities;
00007
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Controls.AnimatedVisuals;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Media.Imaging;
00012 using Microsoft.UI.Xaml.XamlTypeInfo;
00013 using Windows.UI.Text;
00014 using Windows.Foundation.Metadata;
00015 using Common;
00016
00017 using WEX.TestExecution;
00018 using WEX.TestExecution.Markup;
00019 using WEX.Logging.Interop;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00022 {
00023     [TestClass]
00024     public class IconSourceApiTests : ApiTestBase
00025     {
00026         [TestMethod]
00027         public void ImageIconSourceTest()
00028         {
00029             ImageIconSource iconSource = null;
00030             ImageIcon imageIcon = null;
00031             var uri = new Uri("ms-appx:///Assets/Nuclear_symbol.svg");
00032
00033             RunOnUIThread.Execute(() =>
00034             {
00035                 iconSource = new ImageIconSource();
00036                 imageIcon = iconSource.CreateIconElement() as ImageIcon;
00037
00038                 // IconSource.Foreground should be null to allow foreground inheritance from
00039                 // the parent to work.
00040                 Verify.AreEqual(iconSource.Foreground, null);
00041                 //Verify.AreEqual(imageIcon.Foreground, null);
00042
00043                 Log.Comment("Validate the defaults match BitmapIcon.");
00044
00045                 var icon = new ImageIcon();
00046                 Verify.AreEqual(icon.Source, iconSource.ImageSource);
00047                 Verify.AreEqual(imageIcon.Source, iconSource.ImageSource);
00048
00049                 Log.Comment("Validate that you can change the properties.");
00050
00051                 iconSource.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Red);
00052                 iconSource.ImageSource = new SvgImageSource(uri);
00053             });
00054             IdleSynchronizer.Wait();
00055
00056             RunOnUIThread.Execute(() =>
00057             {
00058                 Verify.IsTrue(iconSource.Foreground is SolidColorBrush);
00059                 Verify.IsTrue(imageIcon.Foreground is SolidColorBrush);
00060                 Verify.AreEqual(Microsoft.UI.Colors.Red, (iconSource.Foreground as SolidColorBrush).Color);
00061                 Verify.AreEqual(Microsoft.UI.Colors.Red, (imageIcon.Foreground as SolidColorBrush).Color);
00062                 Verify.AreEqual(uri, ((SvgImageSource)iconSource.ImageSource).UriSource);
00063                 Verify.AreEqual(uri, ((SvgImageSource)imageIcon.Source).UriSource);
00064             });
00065         }
00066
00067         [TestMethod]
00068         public void AnimatedIconSourceTest()
00069         {
00070             AnimatedIconSource iconSource = null;
00071             IAnimatedVisualSource2 source = null;
00072             AnimatedIcon animatedIcon = null;
00073
00074             RunOnUIThread.Execute(() =>
00075             {
00076                 iconSource = new AnimatedIconSource();
00077                 source = new AnimatedChevronDownSmallVisualSource();
00078                 animatedIcon = iconSource.CreateIconElement() as AnimatedIcon;
00079
00080                 // IconSource.Foreground should be null to allow foreground inheritance from
00081                 // the parent to work.
00082                 Verify.AreEqual(iconSource.Foreground, null);
00083                 //Verify.AreEqual(animatedIcon.Foreground, null);
00084                 Verify.AreEqual(iconSource.MirroredWhenRightToLeft, false);
00085                 Verify.AreEqual(animatedIcon.MirroredWhenRightToLeft, false);
00086
00087                 Log.Comment("Validate the defaults match BitmapIcon.");
00088
00089                 var icon = new AnimatedIcon();
00090                 Verify.AreEqual(icon.Source, iconSource.Source);
00091                 Verify.AreEqual(animatedIcon.Source, iconSource.Source);
00092                 Verify.AreEqual(icon.MirroredWhenRightToLeft, iconSource.MirroredWhenRightToLeft);
00093
00094                 Log.Comment("Validate that you can change the properties.");
00095
00096                 iconSource.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Red);
00097                 iconSource.Source = source;
00098                 iconSource.MirroredWhenRightToLeft = true;
00099             });
00100             IdleSynchronizer.Wait();
00101
00102             RunOnUIThread.Execute(() =>
00103             {
00104                 Verify.IsTrue(iconSource.Foreground is SolidColorBrush);
00105                 Verify.IsTrue(animatedIcon.Foreground is SolidColorBrush);
00106                 Verify.AreEqual(Microsoft.UI.Colors.Red, (iconSource.Foreground as SolidColorBrush).Color);
00107                 Verify.AreEqual(Microsoft.UI.Colors.Red, (animatedIcon.Foreground as SolidColorBrush).Color);
00108                 Verify.AreEqual(source, iconSource.Source);
00109                 Verify.AreEqual(source, animatedIcon.Source);
00110                 Verify.IsTrue(iconSource.MirroredWhenRightToLeft);
00111                 Verify.IsTrue(animatedIcon.MirroredWhenRightToLeft);
00112             });
00113         }
00114     }
00115 }
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MutexLockedResource< T > Member List

This is the complete list of members for MutexLockedResource< T >, including all inherited members.
m_mutex | MutexLockedResource< T > | [private]
m_resource | MutexLockedResource< T > | [private]
MutexLockedResource(HANDLE mutex, T *resource) | MutexLockedResource< T > | [inline]
operator*() | MutexLockedResource< T > | [inline]
operator->() | MutexLockedResource< T > | [inline]
~MutexLockedResource() | MutexLockedResource< T > | [inline]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControlMapServiceErrorOccurredEventArgs.h Source File

  • File List
  • File Members
  • MapControl

MapControlMapServiceErrorOccurredEventArgs.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include "MapControlMapServiceErrorOccurredEventArgs.g.h"
00009
00010
00011 class MapControlMapServiceErrorOccurredEventArgs :
00012     public winrt::implementation::MapControlMapServiceErrorOccurredEventArgsT<MapControlMapServiceErrorOccurredEventArgs>
00013 {
00014 public:
00015
00016     MapControlMapServiceErrorOccurredEventArgs(winrt::hstring diagnosticMessage) :
00017         m_diagnosticMessage(diagnosticMessage) {};
00018
00019     winrt::hstring DiagnosticMessage() { return m_diagnosticMessage; };
00020
00021 private:
00022     winrt::hstring m_diagnosticMessage;
00023 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ToggleSplitButton.h Source File

  • File List
  • File Members
  • SplitButton

ToggleSplitButton.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "ToggleSplitButton.g.h"
00010 #include "SplitButton.h"
00011 #include "ToggleSplitButton.properties.h"
00012
00013 class ToggleSplitButton :
00014     public winrt::implementation::ToggleSplitButtonT<ToggleSplitButton, SplitButton>,
00015     public ToggleSplitButtonProperties
00016 {
00017
00018 public:
00019     ForwardRefToBaseReferenceTracker(SplitButton)
00020
00021     ToggleSplitButton();
00022
00023     // Lift up EnsureProperties and ClearProperties to resolve ambiguity between ToggleSplitButtonProperties and SplitButtonProperties
00024     using ToggleSplitButtonProperties::EnsureProperties;
00025     using ToggleSplitButtonProperties::ClearProperties;
00026
00027     // IFrameworkElement
00028     void OnApplyTemplate();
00029
00030     // IUIElement
00031     winrt::AutomationPeer OnCreateAutomationPeer() override;
00032
00033     // Internal
00034     void Toggle();
00035     void OnClickPrimary(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args) override;
00036     bool InternalIsChecked() override;
00037
00038     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00039
00040 private:
00041     void OnIsCheckedChanged();
00042 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollingScrollStartingEventArgs Member List

This is the complete list of members for ScrollingScrollStartingEventArgs, including all inherited members.
CorrelationId() const | ScrollingScrollStartingEventArgs |
HorizontalOffset() const | ScrollingScrollStartingEventArgs |
ScrollingScrollStartingEventArgs() | ScrollingScrollStartingEventArgs | [inline]
SetCorrelationId(int32_t correlationId) | ScrollingScrollStartingEventArgs |
SetHorizontalOffset(double horizontalOffset) | ScrollingScrollStartingEventArgs |
SetVerticalOffset(double verticalOffset) | ScrollingScrollStartingEventArgs |
SetZoomFactor(float zoomFactor) | ScrollingScrollStartingEventArgs |
VerticalOffset() const | ScrollingScrollStartingEventArgs |
ZoomFactor() const | ScrollingScrollStartingEventArgs |
~ScrollingScrollStartingEventArgs() | ScrollingScrollStartingEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingIndeterminate Member List

This is the complete list of members for ProgressRingIndeterminate, including all inherited members.
Background() | ProgressRingIndeterminate | [inline, private]
Background(winrt::Windows::UI::Color value) | ProgressRingIndeterminate | [private]
ColorAsVector4(winrt::Windows::UI::Color color) | ProgressRingIndeterminate | [private]
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | ProgressRingIndeterminate | [private]
Foreground() | ProgressRingIndeterminate | [private]
Foreground(winrt::Windows::UI::Color value) | ProgressRingIndeterminate | [private]
GetThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | ProgressRingIndeterminate | [virtual]
TryCreateAnimatedVisual(const winrt::Microsoft::UI::Composition::Compositor &compositor, winrt::IInspectable &diagnostics) | ProgressRingIndeterminate | [virtual]
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabDataItem Member List

This is the complete list of members for TabDataItem, including all inherited members.
Content | TabDataItem
Header | TabDataItem
IconSource | TabDataItem
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI

AcrylicPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.IO;
00007 using System.Linq;
00008 using System.Runtime.InteropServices.WindowsRuntime;
00009 using Windows.Foundation;
00010 using Windows.Foundation.Collections;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Controls.Primitives;
00014 using Microsoft.UI.Xaml.Data;
00015 using Microsoft.UI.Xaml.Input;
00016 using Microsoft.UI.Xaml.Media;
00017 using Microsoft.UI.Xaml.Navigation;
00018
00019
00020 namespace MUXControlsTestApp
00021 {
00022     [TopLevelTestPage(Name = "Acrylic", Icon = "AcrylicBrush.png")]
00023     public sealed partial class AcrylicPage : TestPage
00024     {
00025         public AcrylicPage()
00026         {
00027             this.InitializeComponent();
00028
00029             navigateToBasicAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicBrushPage), 0); };
00030             navigateToColorAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicColorPage), 0); };
00031             navigateToMarkupAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicMarkupPage), 0); };
00032             navigateToRenderingAcrylic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicRenderingPage), 0); };
00033             navigateToLuminosityAcrylicTest.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AcrylicBrushLuminosityTestPage), 0); };
00034         }
00035     }
00036 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomStartingEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomStartingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "ScrollingZoomStartingEventArgs.h"
00006
00007 int32_t ScrollingZoomStartingEventArgs::CorrelationId() const
00008 {
00009     return m_correlationId;
00010 }
00011
00012 void ScrollingZoomStartingEventArgs::SetCorrelationId(int32_t correlationId)
00013 {
00014     m_correlationId = correlationId;
00015 }
00016
00017 double ScrollingZoomStartingEventArgs::HorizontalOffset() const
00018 {
00019     return m_horizontalOffset;
00020 }
00021
00022 void ScrollingZoomStartingEventArgs::SetHorizontalOffset(double horizontalOffset)
00023 {
00024     m_horizontalOffset = horizontalOffset;
00025 }
00026
00027 double ScrollingZoomStartingEventArgs::VerticalOffset() const
00028 {
00029     return m_verticalOffset;
00030 }
00031
00032 void ScrollingZoomStartingEventArgs::SetVerticalOffset(double verticalOffset)
00033 {
00034     m_verticalOffset = verticalOffset;
00035 }
00036
00037 float ScrollingZoomStartingEventArgs::ZoomFactor() const
00038 {
00039     return m_zoomFactor;
00040 }
00041
00042 void ScrollingZoomStartingEventArgs::SetZoomFactor(float zoomFactor)
00043 {
00044     m_zoomFactor = zoomFactor;
00045 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBoxParser.h Source File

  • File List
  • File Members
  • NumberBox

NumberBoxParser.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include <regex>
00009 #include <stack>
00010
00011 enum class MathTokenType
00012 {
00013     Numeric,
00014     Operator,
00015     Parenthesis,
00016 };
00017
00018 struct MathToken
00019 {
00020     MathToken(MathTokenType t, wchar_t c) : Type(t), Char(c), Value(std::numeric_limits<double>::quiet_NaN()) {}
00021     MathToken(MathTokenType t, double d) : Type(t), Value(d), Char(0) {}
00022
00023     MathTokenType Type;
00024     wchar_t Char;
00025     double Value;
00026 };
00027
00028 class NumberBoxParser
00029 {
00030     public:
00031         static winrt::IReference<double> Compute(const std::wstring_view expr, const winrt::INumberParser& numberParser);
00032
00033     private:
00034         static std::vector<MathToken> GetTokens(const wchar_t *input, const winrt::INumberParser& numberParser);
00035
00036         static std::tuple<double, size_t> GetNextNumber(const std::wstring& input, const winrt::INumberParser& numberParser);
00037         static int constexpr GetPrecedenceValue(wchar_t c);
00038
00039         static std::vector<MathToken> ConvertInfixToPostfix(const std::vector<MathToken>& tokens);
00040
00041         static winrt::IReference<double> ComputePostfixExpression(const std::vector<MathToken>& tokens);
00042 };
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemDataAutomationPeer.h Source File

  • File List
  • File Members
  • TreeView

TreeViewItemDataAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TreeViewItemDataAutomationPeer.g.h"
00007
00008 class TreeViewItemDataAutomationPeer :
00009     public ReferenceTracker<TreeViewItemDataAutomationPeer,
00010         winrt::implementation::TreeViewItemDataAutomationPeerT>
00011 {
00012 public:
00013     TreeViewItemDataAutomationPeer(winrt::IInspectable const& item, winrt::TreeViewListAutomationPeer const& parent);
00014
00015     // IExpandCollapseProvider
00016     winrt::ExpandCollapseState ExpandCollapseState();
00017     void Collapse();
00018     void Expand();
00019
00020     // IAutomationPeerOverrides
00021     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00022
00023 private:
00024     winrt::TreeViewItemAutomationPeer GetTreeViewItemAutomationPeer();
00025 };
00026
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarIsStencilButtonCheckedChangedEventArgs Member List

This is the complete list of members for InkToolBarIsStencilButtonCheckedChangedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
CheckThread() | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< InkToolBarIsStencilButtonCheckedChangedEventArgs > &&self) noexcept | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
final_release(std::unique_ptr< InkToolBarIsStencilButtonCheckedChangedEventArgs > &&self) | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline, static]
GetBase() | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
GetInner() | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
IsOnThread() | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkToolBarIsStencilButtonCheckedChangedEventArgs, winrt::implementation::InkToolBarIsStencilButtonCheckedChangedEventArgsT > | [inline]
StencilButton() | InkToolBarIsStencilButtonCheckedChangedEventArgs | [inline]
StencilKind() | InkToolBarIsStencilButtonCheckedChangedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ValueHelper< winrt::hstring, void > Member List

This is the complete list of members for ValueHelper< winrt::hstring, void >, including all inherited members.
BoxedDefaultValue() | ValueHelper< winrt::hstring, void > | [inline, static]
BoxValueIfNecessary(winrt::hstring const &value) | ValueHelper< winrt::hstring, void > | [inline, static]
CastOrUnbox(winrt::IInspectable const &value) | ValueHelper< winrt::hstring, void > | [inline, static]
GetDefaultValue() | ValueHelper< winrt::hstring, void > | [inline, static]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

auto_cast Member List

This is the complete list of members for auto_cast, including all inherited members.
auto_cast(winrt::IInspectable const &value) | auto_cast | [inline, explicit]
m_value | auto_cast | [private]
operator T() const | auto_cast | [inline]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MediaTransportControlsPage Member List

This is the complete list of members for MediaTransportControlsPage, including all inherited members.
MediaTransportControlsPage() MediaTransportControlsPage [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsRepeaterScrollHost.properties.cpp Source File

  • File List
  • File Members
  • Generated

ItemsRepeaterScrollHost.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ItemsRepeaterScrollHost.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ItemsRepeaterScrollHost)
00012 }
00013
00014 #include "ItemsRepeaterScrollHost.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemInfo.h Source File

  • File List
  • File Members
  • RatingControl

RatingItemInfo.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RatingItemInfo.g.h"
00007
00008 class RatingItemInfo :
00009     public ReferenceTracker<RatingItemInfo, winrt::implementation::RatingItemInfoT>
00010 {
00011 };
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< RoutedEventType::PointerExited > Member List

This is the complete list of members for RoutedEventTraits< RoutedEventType::PointerExited >, including all inherited members.
Event() RoutedEventTraits< RoutedEventType::PointerExited > [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewItemAutomationPeer Member List

This is the complete list of members for TabViewItemAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
AddToSelection() | TabViewItemAutomationPeer |
CheckThread() | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< TabViewItemAutomationPeer > &&self) noexcept | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
final_release(std::unique_ptr< TabViewItemAutomationPeer > &&self) | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline, static]
GetAutomationControlTypeCore() | TabViewItemAutomationPeer |
GetBase() | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
GetClassNameCore() | TabViewItemAutomationPeer |
GetInner() | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
GetNameCore() | TabViewItemAutomationPeer |
GetParentTabView() | TabViewItemAutomationPeer | [private]
GetPatternCore(winrt::PatternInterface const &patternInterface) | TabViewItemAutomationPeer |
IsOnThread() | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
IsSelected() | TabViewItemAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TabViewItemAutomationPeer, winrt::implementation::TabViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
RemoveFromSelection() | TabViewItemAutomationPeer |
Select() | TabViewItemAutomationPeer |
SelectionContainer() | TabViewItemAutomationPeer |
TabViewItemAutomationPeer(winrt::TabViewItem const &owner) | TabViewItemAutomationPeer |
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyout.properties.cpp Source File

  • File List
  • File Members
  • Generated

CommandBarFlyout.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "CommandBarFlyout.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(CommandBarFlyout)
00012 }
00013
00014 #include "CommandBarFlyout.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTip.properties.cpp Source File

  • File List
  • File Members
  • Generated

TeachingTip.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TeachingTip.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TeachingTip)
00012 }
00013
00014 #include "TeachingTip.g.cpp"
00015
00016 GlobalDependencyProperty TeachingTipProperties::s_ActionButtonCommandProperty{ nullptr };
00017 GlobalDependencyProperty TeachingTipProperties::s_ActionButtonCommandParameterProperty{ nullptr };
00018 GlobalDependencyProperty TeachingTipProperties::s_ActionButtonContentProperty{ nullptr };
00019 GlobalDependencyProperty TeachingTipProperties::s_ActionButtonStyleProperty{ nullptr };
00020 GlobalDependencyProperty TeachingTipProperties::s_CloseButtonCommandProperty{ nullptr };
00021 GlobalDependencyProperty TeachingTipProperties::s_CloseButtonCommandParameterProperty{ nullptr };
00022 GlobalDependencyProperty TeachingTipProperties::s_CloseButtonContentProperty{ nullptr };
00023 GlobalDependencyProperty TeachingTipProperties::s_CloseButtonStyleProperty{ nullptr };
00024 GlobalDependencyProperty TeachingTipProperties::s_HeroContentProperty{ nullptr };
00025 GlobalDependencyProperty TeachingTipProperties::s_HeroContentPlacementProperty{ nullptr };
00026 GlobalDependencyProperty TeachingTipProperties::s_IconSourceProperty{ nullptr };
00027 GlobalDependencyProperty TeachingTipProperties::s_IsLightDismissEnabledProperty{ nullptr };
00028 GlobalDependencyProperty TeachingTipProperties::s_IsOpenProperty{ nullptr };
00029 GlobalDependencyProperty TeachingTipProperties::s_PlacementMarginProperty{ nullptr };
00030 GlobalDependencyProperty TeachingTipProperties::s_PreferredPlacementProperty{ nullptr };
00031 GlobalDependencyProperty TeachingTipProperties::s_ShouldConstrainToRootBoundsProperty{ nullptr };
00032 GlobalDependencyProperty TeachingTipProperties::s_SubtitleProperty{ nullptr };
00033 GlobalDependencyProperty TeachingTipProperties::s_TailVisibilityProperty{ nullptr };
00034 GlobalDependencyProperty TeachingTipProperties::s_TargetProperty{ nullptr };
00035 GlobalDependencyProperty TeachingTipProperties::s_TemplateSettingsProperty{ nullptr };
00036 GlobalDependencyProperty TeachingTipProperties::s_TitleProperty{ nullptr };
00037
00038 TeachingTipProperties::TeachingTipProperties()
00039     : m_actionButtonClickEventSource{static_cast<TeachingTip*>(this)}
00040     , m_closeButtonClickEventSource{static_cast<TeachingTip*>(this)}
00041     , m_closedEventSource{static_cast<TeachingTip*>(this)}
00042     , m_closingEventSource{static_cast<TeachingTip*>(this)}
00043 {
00044     EnsureProperties();
00045 }
00046
00047 void TeachingTipProperties::EnsureProperties()
00048 {
00049     if (!s_ActionButtonCommandProperty)
00050     {
00051         s_ActionButtonCommandProperty =
00052             InitializeDependencyProperty(
00053                 L"ActionButtonCommand",
00054                 winrt::name_of<winrt::ICommand>(),
00055                 winrt::name_of<winrt::TeachingTip>(),
00056                 false /* isAttached */,
00057                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00058                 winrt::PropertyChangedCallback(&OnActionButtonCommandPropertyChanged));
00059     }
00060     if (!s_ActionButtonCommandParameterProperty)
00061     {
00062         s_ActionButtonCommandParameterProperty =
00063             InitializeDependencyProperty(
00064                 L"ActionButtonCommandParameter",
00065                 winrt::name_of<winrt::IInspectable>(),
00066                 winrt::name_of<winrt::TeachingTip>(),
00067                 false /* isAttached */,
00068                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00069                 winrt::PropertyChangedCallback(&OnActionButtonCommandParameterPropertyChanged));
00070     }
00071     if (!s_ActionButtonContentProperty)
00072     {
00073         s_ActionButtonContentProperty =
00074             InitializeDependencyProperty(
00075                 L"ActionButtonContent",
00076                 winrt::name_of<winrt::IInspectable>(),
00077                 winrt::name_of<winrt::TeachingTip>(),
00078                 false /* isAttached */,
00079                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00080                 winrt::PropertyChangedCallback(&OnActionButtonContentPropertyChanged));
00081     }
00082     if (!s_ActionButtonStyleProperty)
00083     {
00084         s_ActionButtonStyleProperty =
00085             InitializeDependencyProperty(
00086                 L"ActionButtonStyle",
00087                 winrt::name_of<winrt::Style>(),
00088                 winrt::name_of<winrt::TeachingTip>(),
00089                 false /* isAttached */,
00090                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00091                 winrt::PropertyChangedCallback(&OnActionButtonStylePropertyChanged));
00092     }
00093     if (!s_CloseButtonCommandProperty)
00094     {
00095         s_CloseButtonCommandProperty =
00096             InitializeDependencyProperty(
00097                 L"CloseButtonCommand",
00098                 winrt::name_of<winrt::ICommand>(),
00099                 winrt::name_of<winrt::TeachingTip>(),
00100                 false /* isAttached */,
00101                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00102                 winrt::PropertyChangedCallback(&OnCloseButtonCommandPropertyChanged));
00103     }
00104     if (!s_CloseButtonCommandParameterProperty)
00105     {
00106         s_CloseButtonCommandParameterProperty =
00107             InitializeDependencyProperty(
00108                 L"CloseButtonCommandParameter",
00109                 winrt::name_of<winrt::IInspectable>(),
00110                 winrt::name_of<winrt::TeachingTip>(),
00111                 false /* isAttached */,
00112                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00113                 winrt::PropertyChangedCallback(&OnCloseButtonCommandParameterPropertyChanged));
00114     }
00115     if (!s_CloseButtonContentProperty)
00116     {
00117         s_CloseButtonContentProperty =
00118             InitializeDependencyProperty(
00119                 L"CloseButtonContent",
00120                 winrt::name_of<winrt::IInspectable>(),
00121                 winrt::name_of<winrt::TeachingTip>(),
00122                 false /* isAttached */,
00123                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00124                 winrt::PropertyChangedCallback(&OnCloseButtonContentPropertyChanged));
00125     }
00126     if (!s_CloseButtonStyleProperty)
00127     {
00128         s_CloseButtonStyleProperty =
00129             InitializeDependencyProperty(
00130                 L"CloseButtonStyle",
00131                 winrt::name_of<winrt::Style>(),
00132                 winrt::name_of<winrt::TeachingTip>(),
00133                 false /* isAttached */,
00134                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00135                 winrt::PropertyChangedCallback(&OnCloseButtonStylePropertyChanged));
00136     }
00137     if (!s_HeroContentProperty)
00138     {
00139         s_HeroContentProperty =
00140             InitializeDependencyProperty(
00141                 L"HeroContent",
00142                 winrt::name_of<winrt::UIElement>(),
00143                 winrt::name_of<winrt::TeachingTip>(),
00144                 false /* isAttached */,
00145                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00146                 winrt::PropertyChangedCallback(&OnHeroContentPropertyChanged));
00147     }
00148     if (!s_HeroContentPlacementProperty)
00149     {
00150         s_HeroContentPlacementProperty =
00151             InitializeDependencyProperty(
00152                 L"HeroContentPlacement",
00153                 winrt::name_of<winrt::TeachingTipHeroContentPlacementMode>(),
00154                 winrt::name_of<winrt::TeachingTip>(),
00155                 false /* isAttached */,
00156                 ValueHelper<winrt::TeachingTipHeroContentPlacementMode>::BoxValueIfNecessary(winrt::TeachingTipHeroContentPlacementMode::Auto),
00157                 winrt::PropertyChangedCallback(&OnHeroContentPlacementPropertyChanged));
00158     }
00159     if (!s_IconSourceProperty)
00160     {
00161         s_IconSourceProperty =
00162             InitializeDependencyProperty(
00163                 L"IconSource",
00164                 winrt::name_of<winrt::IconSource>(),
00165                 winrt::name_of<winrt::TeachingTip>(),
00166                 false /* isAttached */,
00167                 ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
00168                 winrt::PropertyChangedCallback(&OnIconSourcePropertyChanged));
00169     }
00170     if (!s_IsLightDismissEnabledProperty)
00171     {
00172         s_IsLightDismissEnabledProperty =
00173             InitializeDependencyProperty(
00174                 L"IsLightDismissEnabled",
00175                 winrt::name_of<bool>(),
00176                 winrt::name_of<winrt::TeachingTip>(),
00177                 false /* isAttached */,
00178                 ValueHelper<bool>::BoxValueIfNecessary(false),
00179                 winrt::PropertyChangedCallback(&OnIsLightDismissEnabledPropertyChanged));
00180     }
00181     if (!s_IsOpenProperty)
00182     {
00183         s_IsOpenProperty =
00184             InitializeDependencyProperty(
00185                 L"IsOpen",
00186                 winrt::name_of<bool>(),
00187                 winrt::name_of<winrt::TeachingTip>(),
00188                 false /* isAttached */,
00189                 ValueHelper<bool>::BoxValueIfNecessary(false),
00190                 winrt::PropertyChangedCallback(&OnIsOpenPropertyChanged));
00191     }
00192     if (!s_PlacementMarginProperty)
00193     {
00194         s_PlacementMarginProperty =
00195             InitializeDependencyProperty(
00196                 L"PlacementMargin",
00197                 winrt::name_of<winrt::Thickness>(),
00198                 winrt::name_of<winrt::TeachingTip>(),
00199                 false /* isAttached */,
00200                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00201                 winrt::PropertyChangedCallback(&OnPlacementMarginPropertyChanged));
00202     }
00203     if (!s_PreferredPlacementProperty)
00204     {
00205         s_PreferredPlacementProperty =
00206             InitializeDependencyProperty(
00207                 L"PreferredPlacement",
00208                 winrt::name_of<winrt::TeachingTipPlacementMode>(),
00209                 winrt::name_of<winrt::TeachingTip>(),
00210                 false /* isAttached */,
00211                 ValueHelper<winrt::TeachingTipPlacementMode>::BoxValueIfNecessary(winrt::TeachingTipPlacementMode::Auto),
00212                 winrt::PropertyChangedCallback(&OnPreferredPlacementPropertyChanged));
00213     }
00214     if (!s_ShouldConstrainToRootBoundsProperty)
00215     {
00216         s_ShouldConstrainToRootBoundsProperty =
00217             InitializeDependencyProperty(
00218                 L"ShouldConstrainToRootBounds",
00219                 winrt::name_of<bool>(),
00220                 winrt::name_of<winrt::TeachingTip>(),
00221                 false /* isAttached */,
00222                 ValueHelper<bool>::BoxValueIfNecessary(true),
00223                 winrt::PropertyChangedCallback(&OnShouldConstrainToRootBoundsPropertyChanged));
00224     }
00225     if (!s_SubtitleProperty)
00226     {
00227         s_SubtitleProperty =
00228             InitializeDependencyProperty(
00229                 L"Subtitle",
00230                 winrt::name_of<winrt::hstring>(),
00231                 winrt::name_of<winrt::TeachingTip>(),
00232                 false /* isAttached */,
00233                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00234                 winrt::PropertyChangedCallback(&OnSubtitlePropertyChanged));
00235     }
00236     if (!s_TailVisibilityProperty)
00237     {
00238         s_TailVisibilityProperty =
00239             InitializeDependencyProperty(
00240                 L"TailVisibility",
00241                 winrt::name_of<winrt::TeachingTipTailVisibility>(),
00242                 winrt::name_of<winrt::TeachingTip>(),
00243                 false /* isAttached */,
00244                 ValueHelper<winrt::TeachingTipTailVisibility>::BoxValueIfNecessary(winrt::TeachingTipTailVisibility::Auto),
00245                 winrt::PropertyChangedCallback(&OnTailVisibilityPropertyChanged));
00246     }
00247     if (!s_TargetProperty)
00248     {
00249         s_TargetProperty =
00250             InitializeDependencyProperty(
00251                 L"Target",
00252                 winrt::name_of<winrt::FrameworkElement>(),
00253                 winrt::name_of<winrt::TeachingTip>(),
00254                 false /* isAttached */,
00255                 ValueHelper<winrt::FrameworkElement>::BoxedDefaultValue(),
00256                 winrt::PropertyChangedCallback(&OnTargetPropertyChanged));
00257     }
00258     if (!s_TemplateSettingsProperty)
00259     {
00260         s_TemplateSettingsProperty =
00261             InitializeDependencyProperty(
00262                 L"TemplateSettings",
00263                 winrt::name_of<winrt::TeachingTipTemplateSettings>(),
00264                 winrt::name_of<winrt::TeachingTip>(),
00265                 false /* isAttached */,
00266                 ValueHelper<winrt::TeachingTipTemplateSettings>::BoxedDefaultValue(),
00267                 winrt::PropertyChangedCallback(&OnTemplateSettingsPropertyChanged));
00268     }
00269     if (!s_TitleProperty)
00270     {
00271         s_TitleProperty =
00272             InitializeDependencyProperty(
00273                 L"Title",
00274                 winrt::name_of<winrt::hstring>(),
00275                 winrt::name_of<winrt::TeachingTip>(),
00276                 false /* isAttached */,
00277                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00278                 winrt::PropertyChangedCallback(&OnTitlePropertyChanged));
00279     }
00280 }
00281
00282 void TeachingTipProperties::ClearProperties()
00283 {
00284     s_ActionButtonCommandProperty = nullptr;
00285     s_ActionButtonCommandParameterProperty = nullptr;
00286     s_ActionButtonContentProperty = nullptr;
00287     s_ActionButtonStyleProperty = nullptr;
00288     s_CloseButtonCommandProperty = nullptr;
00289     s_CloseButtonCommandParameterProperty = nullptr;
00290     s_CloseButtonContentProperty = nullptr;
00291     s_CloseButtonStyleProperty = nullptr;
00292     s_HeroContentProperty = nullptr;
00293     s_HeroContentPlacementProperty = nullptr;
00294     s_IconSourceProperty = nullptr;
00295     s_IsLightDismissEnabledProperty = nullptr;
00296     s_IsOpenProperty = nullptr;
00297     s_PlacementMarginProperty = nullptr;
00298     s_PreferredPlacementProperty = nullptr;
00299     s_ShouldConstrainToRootBoundsProperty = nullptr;
00300     s_SubtitleProperty = nullptr;
00301     s_TailVisibilityProperty = nullptr;
00302     s_TargetProperty = nullptr;
00303     s_TemplateSettingsProperty = nullptr;
00304     s_TitleProperty = nullptr;
00305 }
00306
00307 void TeachingTipProperties::OnActionButtonCommandPropertyChanged(
00308     winrt::DependencyObject const& sender,
00309     winrt::DependencyPropertyChangedEventArgs const& args)
00310 {
00311     auto owner = sender.as<winrt::TeachingTip>();
00312     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00313 }
00314
00315 void TeachingTipProperties::OnActionButtonCommandParameterPropertyChanged(
00316     winrt::DependencyObject const& sender,
00317     winrt::DependencyPropertyChangedEventArgs const& args)
00318 {
00319     auto owner = sender.as<winrt::TeachingTip>();
00320     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00321 }
00322
00323 void TeachingTipProperties::OnActionButtonContentPropertyChanged(
00324     winrt::DependencyObject const& sender,
00325     winrt::DependencyPropertyChangedEventArgs const& args)
00326 {
00327     auto owner = sender.as<winrt::TeachingTip>();
00328     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00329 }
00330
00331 void TeachingTipProperties::OnActionButtonStylePropertyChanged(
00332     winrt::DependencyObject const& sender,
00333     winrt::DependencyPropertyChangedEventArgs const& args)
00334 {
00335     auto owner = sender.as<winrt::TeachingTip>();
00336     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00337 }
00338
00339 void TeachingTipProperties::OnCloseButtonCommandPropertyChanged(
00340     winrt::DependencyObject const& sender,
00341     winrt::DependencyPropertyChangedEventArgs const& args)
00342 {
00343     auto owner = sender.as<winrt::TeachingTip>();
00344     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00345 }
00346
00347 void TeachingTipProperties::OnCloseButtonCommandParameterPropertyChanged(
00348     winrt::DependencyObject const& sender,
00349     winrt::DependencyPropertyChangedEventArgs const& args)
00350 {
00351     auto owner = sender.as<winrt::TeachingTip>();
00352     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00353 }
00354
00355 void TeachingTipProperties::OnCloseButtonContentPropertyChanged(
00356     winrt::DependencyObject const& sender,
00357     winrt::DependencyPropertyChangedEventArgs const& args)
00358 {
00359     auto owner = sender.as<winrt::TeachingTip>();
00360     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00361 }
00362
00363 void TeachingTipProperties::OnCloseButtonStylePropertyChanged(
00364     winrt::DependencyObject const& sender,
00365     winrt::DependencyPropertyChangedEventArgs const& args)
00366 {
00367     auto owner = sender.as<winrt::TeachingTip>();
00368     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00369 }
00370
00371 void TeachingTipProperties::OnHeroContentPropertyChanged(
00372     winrt::DependencyObject const& sender,
00373     winrt::DependencyPropertyChangedEventArgs const& args)
00374 {
00375     auto owner = sender.as<winrt::TeachingTip>();
00376     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00377 }
00378
00379 void TeachingTipProperties::OnHeroContentPlacementPropertyChanged(
00380     winrt::DependencyObject const& sender,
00381     winrt::DependencyPropertyChangedEventArgs const& args)
00382 {
00383     auto owner = sender.as<winrt::TeachingTip>();
00384     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00385 }
00386
00387 void TeachingTipProperties::OnIconSourcePropertyChanged(
00388     winrt::DependencyObject const& sender,
00389     winrt::DependencyPropertyChangedEventArgs const& args)
00390 {
00391     auto owner = sender.as<winrt::TeachingTip>();
00392     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00393 }
00394
00395 void TeachingTipProperties::OnIsLightDismissEnabledPropertyChanged(
00396     winrt::DependencyObject const& sender,
00397     winrt::DependencyPropertyChangedEventArgs const& args)
00398 {
00399     auto owner = sender.as<winrt::TeachingTip>();
00400     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00401 }
00402
00403 void TeachingTipProperties::OnIsOpenPropertyChanged(
00404     winrt::DependencyObject const& sender,
00405     winrt::DependencyPropertyChangedEventArgs const& args)
00406 {
00407     auto owner = sender.as<winrt::TeachingTip>();
00408     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00409 }
00410
00411 void TeachingTipProperties::OnPlacementMarginPropertyChanged(
00412     winrt::DependencyObject const& sender,
00413     winrt::DependencyPropertyChangedEventArgs const& args)
00414 {
00415     auto owner = sender.as<winrt::TeachingTip>();
00416     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00417 }
00418
00419 void TeachingTipProperties::OnPreferredPlacementPropertyChanged(
00420     winrt::DependencyObject const& sender,
00421     winrt::DependencyPropertyChangedEventArgs const& args)
00422 {
00423     auto owner = sender.as<winrt::TeachingTip>();
00424     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00425 }
00426
00427 void TeachingTipProperties::OnShouldConstrainToRootBoundsPropertyChanged(
00428     winrt::DependencyObject const& sender,
00429     winrt::DependencyPropertyChangedEventArgs const& args)
00430 {
00431     auto owner = sender.as<winrt::TeachingTip>();
00432     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00433 }
00434
00435 void TeachingTipProperties::OnSubtitlePropertyChanged(
00436     winrt::DependencyObject const& sender,
00437     winrt::DependencyPropertyChangedEventArgs const& args)
00438 {
00439     auto owner = sender.as<winrt::TeachingTip>();
00440     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00441 }
00442
00443 void TeachingTipProperties::OnTailVisibilityPropertyChanged(
00444     winrt::DependencyObject const& sender,
00445     winrt::DependencyPropertyChangedEventArgs const& args)
00446 {
00447     auto owner = sender.as<winrt::TeachingTip>();
00448     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00449 }
00450
00451 void TeachingTipProperties::OnTargetPropertyChanged(
00452     winrt::DependencyObject const& sender,
00453     winrt::DependencyPropertyChangedEventArgs const& args)
00454 {
00455     auto owner = sender.as<winrt::TeachingTip>();
00456     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00457 }
00458
00459 void TeachingTipProperties::OnTemplateSettingsPropertyChanged(
00460     winrt::DependencyObject const& sender,
00461     winrt::DependencyPropertyChangedEventArgs const& args)
00462 {
00463     auto owner = sender.as<winrt::TeachingTip>();
00464     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00465 }
00466
00467 void TeachingTipProperties::OnTitlePropertyChanged(
00468     winrt::DependencyObject const& sender,
00469     winrt::DependencyPropertyChangedEventArgs const& args)
00470 {
00471     auto owner = sender.as<winrt::TeachingTip>();
00472     winrt::get_self<TeachingTip>(owner)->OnPropertyChanged(args);
00473 }
00474
00475 void TeachingTipProperties::ActionButtonCommand(winrt::ICommand const& value)
00476 {
00477     [[gsl::suppress(con)]]
00478     {
00479     static_cast<TeachingTip*>(this)->SetValue(s_ActionButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00480     }
00481 }
00482
00483 winrt::ICommand TeachingTipProperties::ActionButtonCommand()
00484 {
00485     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_ActionButtonCommandProperty));
00486 }
00487
00488 void TeachingTipProperties::ActionButtonCommandParameter(winrt::IInspectable const& value)
00489 {
00490     [[gsl::suppress(con)]]
00491     {
00492     static_cast<TeachingTip*>(this)->SetValue(s_ActionButtonCommandParameterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00493     }
00494 }
00495
00496 winrt::IInspectable TeachingTipProperties::ActionButtonCommandParameter()
00497 {
00498     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_ActionButtonCommandParameterProperty));
00499 }
00500
00501 void TeachingTipProperties::ActionButtonContent(winrt::IInspectable const& value)
00502 {
00503     [[gsl::suppress(con)]]
00504     {
00505     static_cast<TeachingTip*>(this)->SetValue(s_ActionButtonContentProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00506     }
00507 }
00508
00509 winrt::IInspectable TeachingTipProperties::ActionButtonContent()
00510 {
00511     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_ActionButtonContentProperty));
00512 }
00513
00514 void TeachingTipProperties::ActionButtonStyle(winrt::Style const& value)
00515 {
00516     [[gsl::suppress(con)]]
00517     {
00518     static_cast<TeachingTip*>(this)->SetValue(s_ActionButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00519     }
00520 }
00521
00522 winrt::Style TeachingTipProperties::ActionButtonStyle()
00523 {
00524     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_ActionButtonStyleProperty));
00525 }
00526
00527 void TeachingTipProperties::CloseButtonCommand(winrt::ICommand const& value)
00528 {
00529     [[gsl::suppress(con)]]
00530     {
00531     static_cast<TeachingTip*>(this)->SetValue(s_CloseButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00532     }
00533 }
00534
00535 winrt::ICommand TeachingTipProperties::CloseButtonCommand()
00536 {
00537     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_CloseButtonCommandProperty));
00538 }
00539
00540 void TeachingTipProperties::CloseButtonCommandParameter(winrt::IInspectable const& value)
00541 {
00542     [[gsl::suppress(con)]]
00543     {
00544     static_cast<TeachingTip*>(this)->SetValue(s_CloseButtonCommandParameterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00545     }
00546 }
00547
00548 winrt::IInspectable TeachingTipProperties::CloseButtonCommandParameter()
00549 {
00550     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_CloseButtonCommandParameterProperty));
00551 }
00552
00553 void TeachingTipProperties::CloseButtonContent(winrt::IInspectable const& value)
00554 {
00555     [[gsl::suppress(con)]]
00556     {
00557     static_cast<TeachingTip*>(this)->SetValue(s_CloseButtonContentProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00558     }
00559 }
00560
00561 winrt::IInspectable TeachingTipProperties::CloseButtonContent()
00562 {
00563     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_CloseButtonContentProperty));
00564 }
00565
00566 void TeachingTipProperties::CloseButtonStyle(winrt::Style const& value)
00567 {
00568     [[gsl::suppress(con)]]
00569     {
00570     static_cast<TeachingTip*>(this)->SetValue(s_CloseButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00571     }
00572 }
00573
00574 winrt::Style TeachingTipProperties::CloseButtonStyle()
00575 {
00576     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_CloseButtonStyleProperty));
00577 }
00578
00579 void TeachingTipProperties::HeroContent(winrt::UIElement const& value)
00580 {
00581     [[gsl::suppress(con)]]
00582     {
00583     static_cast<TeachingTip*>(this)->SetValue(s_HeroContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00584     }
00585 }
00586
00587 winrt::UIElement TeachingTipProperties::HeroContent()
00588 {
00589     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_HeroContentProperty));
00590 }
00591
00592 void TeachingTipProperties::HeroContentPlacement(winrt::TeachingTipHeroContentPlacementMode const& value)
00593 {
00594     [[gsl::suppress(con)]]
00595     {
00596     static_cast<TeachingTip*>(this)->SetValue(s_HeroContentPlacementProperty, ValueHelper<winrt::TeachingTipHeroContentPlacementMode>::BoxValueIfNecessary(value));
00597     }
00598 }
00599
00600 winrt::TeachingTipHeroContentPlacementMode TeachingTipProperties::HeroContentPlacement()
00601 {
00602     return ValueHelper<winrt::TeachingTipHeroContentPlacementMode>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_HeroContentPlacementProperty));
00603 }
00604
00605 void TeachingTipProperties::IconSource(winrt::IconSource const& value)
00606 {
00607     [[gsl::suppress(con)]]
00608     {
00609     static_cast<TeachingTip*>(this)->SetValue(s_IconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
00610     }
00611 }
00612
00613 winrt::IconSource TeachingTipProperties::IconSource()
00614 {
00615     return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_IconSourceProperty));
00616 }
00617
00618 void TeachingTipProperties::IsLightDismissEnabled(bool value)
00619 {
00620     [[gsl::suppress(con)]]
00621     {
00622     static_cast<TeachingTip*>(this)->SetValue(s_IsLightDismissEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00623     }
00624 }
00625
00626 bool TeachingTipProperties::IsLightDismissEnabled()
00627 {
00628     return ValueHelper<bool>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_IsLightDismissEnabledProperty));
00629 }
00630
00631 void TeachingTipProperties::IsOpen(bool value)
00632 {
00633     [[gsl::suppress(con)]]
00634     {
00635     static_cast<TeachingTip*>(this)->SetValue(s_IsOpenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00636     }
00637 }
00638
00639 bool TeachingTipProperties::IsOpen()
00640 {
00641     return ValueHelper<bool>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_IsOpenProperty));
00642 }
00643
00644 void TeachingTipProperties::PlacementMargin(winrt::Thickness const& value)
00645 {
00646     [[gsl::suppress(con)]]
00647     {
00648     static_cast<TeachingTip*>(this)->SetValue(s_PlacementMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00649     }
00650 }
00651
00652 winrt::Thickness TeachingTipProperties::PlacementMargin()
00653 {
00654     return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_PlacementMarginProperty));
00655 }
00656
00657 void TeachingTipProperties::PreferredPlacement(winrt::TeachingTipPlacementMode const& value)
00658 {
00659     [[gsl::suppress(con)]]
00660     {
00661     static_cast<TeachingTip*>(this)->SetValue(s_PreferredPlacementProperty, ValueHelper<winrt::TeachingTipPlacementMode>::BoxValueIfNecessary(value));
00662     }
00663 }
00664
00665 winrt::TeachingTipPlacementMode TeachingTipProperties::PreferredPlacement()
00666 {
00667     return ValueHelper<winrt::TeachingTipPlacementMode>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_PreferredPlacementProperty));
00668 }
00669
00670 void TeachingTipProperties::ShouldConstrainToRootBounds(bool value)
00671 {
00672     [[gsl::suppress(con)]]
00673     {
00674     static_cast<TeachingTip*>(this)->SetValue(s_ShouldConstrainToRootBoundsProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00675     }
00676 }
00677
00678 bool TeachingTipProperties::ShouldConstrainToRootBounds()
00679 {
00680     return ValueHelper<bool>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_ShouldConstrainToRootBoundsProperty));
00681 }
00682
00683 void TeachingTipProperties::Subtitle(winrt::hstring const& value)
00684 {
00685     [[gsl::suppress(con)]]
00686     {
00687     static_cast<TeachingTip*>(this)->SetValue(s_SubtitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00688     }
00689 }
00690
00691 winrt::hstring TeachingTipProperties::Subtitle()
00692 {
00693     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_SubtitleProperty));
00694 }
00695
00696 void TeachingTipProperties::TailVisibility(winrt::TeachingTipTailVisibility const& value)
00697 {
00698     [[gsl::suppress(con)]]
00699     {
00700     static_cast<TeachingTip*>(this)->SetValue(s_TailVisibilityProperty, ValueHelper<winrt::TeachingTipTailVisibility>::BoxValueIfNecessary(value));
00701     }
00702 }
00703
00704 winrt::TeachingTipTailVisibility TeachingTipProperties::TailVisibility()
00705 {
00706     return ValueHelper<winrt::TeachingTipTailVisibility>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_TailVisibilityProperty));
00707 }
00708
00709 void TeachingTipProperties::Target(winrt::FrameworkElement const& value)
00710 {
00711     [[gsl::suppress(con)]]
00712     {
00713     static_cast<TeachingTip*>(this)->SetValue(s_TargetProperty, ValueHelper<winrt::FrameworkElement>::BoxValueIfNecessary(value));
00714     }
00715 }
00716
00717 winrt::FrameworkElement TeachingTipProperties::Target()
00718 {
00719     return ValueHelper<winrt::FrameworkElement>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_TargetProperty));
00720 }
00721
00722 void TeachingTipProperties::TemplateSettings(winrt::TeachingTipTemplateSettings const& value)
00723 {
00724     [[gsl::suppress(con)]]
00725     {
00726     static_cast<TeachingTip*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::TeachingTipTemplateSettings>::BoxValueIfNecessary(value));
00727     }
00728 }
00729
00730 winrt::TeachingTipTemplateSettings TeachingTipProperties::TemplateSettings()
00731 {
00732     return ValueHelper<winrt::TeachingTipTemplateSettings>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_TemplateSettingsProperty));
00733 }
00734
00735 void TeachingTipProperties::Title(winrt::hstring const& value)
00736 {
00737     [[gsl::suppress(con)]]
00738     {
00739     static_cast<TeachingTip*>(this)->SetValue(s_TitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00740     }
00741 }
00742
00743 winrt::hstring TeachingTipProperties::Title()
00744 {
00745     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TeachingTip*>(this)->GetValue(s_TitleProperty));
00746 }
00747
00748 winrt::event_token TeachingTipProperties::ActionButtonClick(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00749 {
00750     return m_actionButtonClickEventSource.add(value);
00751 }
00752
00753 void TeachingTipProperties::ActionButtonClick(winrt::event_token const& token)
00754 {
00755     m_actionButtonClickEventSource.remove(token);
00756 }
00757
00758 winrt::event_token TeachingTipProperties::CloseButtonClick(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value)
00759 {
00760     return m_closeButtonClickEventSource.add(value);
00761 }
00762
00763 void TeachingTipProperties::CloseButtonClick(winrt::event_token const& token)
00764 {
00765     m_closeButtonClickEventSource.remove(token);
00766 }
00767
00768 winrt::event_token TeachingTipProperties::Closed(winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosedEventArgs> const& value)
00769 {
00770     return m_closedEventSource.add(value);
00771 }
00772
00773 void TeachingTipProperties::Closed(winrt::event_token const& token)
00774 {
00775     m_closedEventSource.remove(token);
00776 }
00777
00778 winrt::event_token TeachingTipProperties::Closing(winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosingEventArgs> const& value)
00779 {
00780     return m_closingEventSource.add(value);
00781 }
00782
00783 void TeachingTipProperties::Closing(winrt::event_token const& token)
00784 {
00785     m_closingEventSource.remove(token);
00786 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.cpp Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedFindVisualSource.cpp

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedFindVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedFindVisualSource.json (14456 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 // ____________________________________
00022 // |       Object stats       | Count |
00023 // |__________________________|_______|
00024 // | All CompositionObjects   |    69 |
00025 // |--------------------------+-------|
00026 // | Expression animators     |    14 |
00027 // | KeyFrame animators       |     7 |
00028 // | Reference parameters     |    12 |
00029 // | Expression operations    |     4 |
00030 // |--------------------------+-------|
00031 // | Animated brushes         |     1 |
00032 // | Animated gradient stops  |     - |
00033 // | ExpressionAnimations     |     2 |
00034 // | PathKeyFrameAnimations   |     - |
00035 // |--------------------------+-------|
00036 // | ContainerVisuals         |     2 |
00037 // | ShapeVisuals             |     2 |
00038 // |--------------------------+-------|
00039 // | ContainerShapes          |     1 |
00040 // | CompositionSpriteShapes  |     2 |
00041 // |--------------------------+-------|
00042 // | Brushes                  |     1 |
00043 // | Gradient stops           |     - |
00044 // | CompositionVisualSurface |     - |
00045 // ------------------------------------
00046 #include "pch.h"
00047 #include "AnimatedVisuals\AnimatedFindVisualSource.h"
00048 #include <winrt/Windows.Foundation.Metadata.h>
00049 #include <winrt/Windows.Foundation.Collections.h>
00050 #include <winrt/Microsoft.UI.Composition.h>
00051 #include "d2d1.h"
00052 #include <d2d1_1.h>
00053 #include <d2d1helper.h>
00054 #include <Windows.Graphics.Interop.h>
00055 #include <Windows.Graphics.Effects.Interop.h>
00056 #include <winrt/Windows.Graphics.Effects.h>
00057
00058 using namespace winrt::Microsoft::UI::Xaml::Controls;
00059 using namespace winrt::Windows::Foundation;
00060 using namespace winrt::Windows::Foundation::Numerics;
00061 using namespace winrt::Windows::Graphics;
00062 using namespace winrt::Windows::UI;
00063 using namespace winrt::Microsoft::UI::Composition;
00064 using TimeSpan = winrt::Windows::Foundation::TimeSpan;
00065
00066 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00067 {
00068 CppWinRTActivatableClassWithBasicFactory(AnimatedFindVisualSource)
00069 }
00070 #include "AnimatedVisuals\AnimatedFindVisualSource.g.cpp"
00071
00072 class CanvasGeometry : public winrt::implements<CanvasGeometry,
00073     IGeometrySource2D,
00074     ::ABI::Windows::Graphics::IGeometrySource2DInterop>
00075 {
00076     winrt::com_ptr<ID2D1Geometry> _geometry{ nullptr };
00077
00078 public:
00079     CanvasGeometry(winrt::com_ptr<ID2D1Geometry> geometry)
00080         : _geometry{ geometry }
00081     { }
00082
00083     // IGeometrySource2D.
00084     winrt::com_ptr<ID2D1Geometry> Geometry() { return _geometry; }
00085
00086     // IGeometrySource2DInterop.
00087     IFACEMETHODIMP GetGeometry(ID2D1Geometry** value) override
00088     {
00089         _geometry.copy_to(value);
00090         return S_OK;
00091     }
00092
00093     // IGeometrySource2DInterop.
00094     IFACEMETHODIMP TryGetGeometryUsingFactory(ID2D1Factory*, ID2D1Geometry**) override
00095     {
00096         return E_NOTIMPL;
00097     }
00098 };
00099 class AnimatedFindVisualSource_AnimatedVisual : public winrt::implements<AnimatedFindVisualSource_AnimatedVisual,
00100         winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual,
00101         IClosable>
00102 {
00103     winrt::com_ptr<ID2D1Factory> _d2dFactory{ nullptr };
00104     static constexpr int64_t c_durationTicks{ 13333333L };
00105     Compositor const _c{ nullptr };
00106     ExpressionAnimation const _reusableExpressionAnimation{ nullptr };
00107     CompositionPropertySet const _themeProperties{ nullptr };
00108     CompositionColorBrush _themeColor_Foreground{ nullptr };
00109     ContainerVisual _root{ nullptr };
00110     CubicBezierEasingFunction _cubicBezierEasingFunction_0{ nullptr };
00111     CubicBezierEasingFunction _cubicBezierEasingFunction_1{ nullptr };
00112     CubicBezierEasingFunction _cubicBezierEasingFunction_2{ nullptr };
00113     CubicBezierEasingFunction _cubicBezierEasingFunction_3{ nullptr };
00114     CubicBezierEasingFunction _cubicBezierEasingFunction_4{ nullptr };
00115     CubicBezierEasingFunction _cubicBezierEasingFunction_5{ nullptr };
00116     ExpressionAnimation _rootProgress{ nullptr };
00117     ScalarKeyFrameAnimation _scalarAnimation_1_to_1{ nullptr };
00118     StepEasingFunction _holdThenStepEasingFunction{ nullptr };
00119     StepEasingFunction _stepThenHoldEasingFunction{ nullptr };
00120
00121     static void StartProgressBoundAnimation(
00122         CompositionObject target,
00123         winrt::hstring animatedPropertyName,
00124         CompositionAnimation animation,
00125         ExpressionAnimation controllerProgressExpression)
00126     {
00127         target.StartAnimation(animatedPropertyName, animation);
00128         const auto controller = target.TryGetAnimationController(animatedPropertyName);
00129         controller.Pause();
00130         controller.StartAnimation(L"Progress", controllerProgressExpression);
00131     }
00132
00133     void BindProperty(
00134         CompositionObject target,
00135         winrt::hstring animatedPropertyName,
00136         winrt::hstring expression,
00137         winrt::hstring referenceParameterName,
00138         CompositionObject referencedObject)
00139     {
00140         _reusableExpressionAnimation.ClearAllParameters();
00141         _reusableExpressionAnimation.Expression(expression);
00142         _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00143         target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00144     }
00145
00146     ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00147     {
00148         const auto result = _c.CreateScalarKeyFrameAnimation();
00149         result.Duration(TimeSpan{ c_durationTicks });
00150         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00151         return result;
00152     }
00153
00154     Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
00155     {
00156         const auto result = _c.CreateVector2KeyFrameAnimation();
00157         result.Duration(TimeSpan{ c_durationTicks });
00158         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00159         return result;
00160     }
00161
00162     CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix)
00163     {
00164         const auto result = _c.CreateSpriteShape(geometry);
00165         result.TransformMatrix(transformMatrix);
00166         return result;
00167     }
00168
00169     // - - - - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls -
00170     // 05 - Search - 02 - NormalToPressed Controls - 05 - Search - 03 -
00171     // PointerOverToNormal Controls - 05 - Search - 04 - PointerOverToPressed Controls -
00172     // 05 - Search - 05 - PressedToNormal Controls - 05 - Search - 06 -
00173     // PressedToPointerOver
00174     // - - - Shape tree root for layer: Layer 4 Layer 4 Layer 4 Layer 4 Layer 4 Layer 4
00175     // - - ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00176     winrt::com_ptr<CanvasGeometry> Geometry()
00177     {
00178         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00179         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00180         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00181         winrt::check_hresult(path->Open(sink.put()));
00182         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00183         sink->BeginFigure({ 12.9329996F, 278.140015F }, D2D1_FIGURE_BEGIN_FILLED);
00184         sink->AddLine({ 9.42300034F, 281.64801F });
00185         sink->AddBezier({ { 9.25599957F, 281.815002F }, { 9.25599957F, 282.087006F }, { 9.42300034F, 282.253998F } });
00186         sink->AddBezier({ { 9.57199955F, 282.403015F }, { 9.80300045F, 282.419006F }, { 9.97000027F, 282.303009F } });
00187         sink->AddLine({ 10.0290003F, 282.253998F });
00188         sink->AddLine({ 13.5340004F, 278.748993F });
00189         sink->AddBezier({ { 13.5340004F, 278.748993F }, { 13.3599997F, 278.609985F }, { 13.1879997F, 278.432007F } });
00190         sink->AddBezier({ { 13.0159998F, 278.253998F }, { 12.9329996F, 278.140015F }, { 12.9329996F, 278.140015F } });
00191         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00192         winrt::check_hresult(sink->Close());
00193         auto result = winrt::make_self<CanvasGeometry>(path);
00194         return result;
00195     }
00196
00197     // Color bound to theme property value: Foreground
00198     CompositionColorBrush ThemeColor_Foreground()
00199     {
00200         const auto result = _themeColor_Foreground = _c.CreateColorBrush();
00201         BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
00202         return result;
00203     }
00204
00205     // - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
00206     // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00207     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00208     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00209     // Opacity for layer: Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape
00210     // Layer 2 Shape Layer 2
00211     CompositionContainerShape ContainerShape()
00212     {
00213         const auto result = _c.CreateContainerShape();
00214         result.CenterPoint({ 3.81299996F, -3.93799996F });
00215         result.Offset({ 24.0F, 24.0F });
00216         // ShapeGroup: Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1
00217         // Scale:0.92286,0.92286, Offset:<3.812, -3.938>
00218         result.Shapes().Append(SpriteShape_1());
00219         StartProgressBoundAnimation(result, L"Scale.X", ScalarAnimation_1_to_1(), _rootProgress);
00220         StartProgressBoundAnimation(result, L"Scale.Y", _scalarAnimation_1_to_1, _rootProgress);
00221         return result;
00222     }
00223
00224     // - - - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls -
00225     // 05 - Search - 02 - NormalToPressed Controls - 05 - Search - 03 -
00226     // PointerOverToNormal Controls - 05 - Search - 04 - PointerOverToPressed Controls -
00227     // 05 - Search - 05 - PressedToNormal Controls - 05 - Search - 06 -
00228     // PressedToPointerOver
00229     // - - Opacity for layer: Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape Layer 2
00230     // Shape Layer 2 Shape Layer 2
00231     // ShapeGroup: Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1
00232     // Scale:0.92286,0.92286, Offset:<3.812, -3.938>
00233     // Ellipse Path 1 Ellipse Path 1 Ellipse Path 1 Ellipse Path 1 Ellipse Path 1 Ellipse
00234     // Path 1.EllipseGeometry
00235     CompositionEllipseGeometry Ellipse_14p188()
00236     {
00237         const auto result = _c.CreateEllipseGeometry();
00238         result.Radius({ 14.1875F, 14.1875F });
00239         return result;
00240     }
00241
00242     // - - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05
00243     // - Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00244     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00245     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00246     // - Shape tree root for layer: Layer 4 Layer 4 Layer 4 Layer 4 Layer 4 Layer 4
00247     // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00248     CompositionPathGeometry PathGeometry()
00249     {
00250         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry())));
00251     }
00252
00253     // - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
00254     // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00255     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00256     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00257     // Shape tree root for layer: Layer 4 Layer 4 Layer 4 Layer 4 Layer 4 Layer 4
00258     // Path 2 Path 2 Path 2 Path 2 Path 2 Path 2
00259     CompositionSpriteShape SpriteShape_0()
00260     {
00261         const auto result = _c.CreateSpriteShape(PathGeometry());
00262         result.CenterPoint({ 13.566F, 278.109985F });
00263         result.Scale({ 3.0F, 3.0F });
00264         result.FillBrush(ThemeColor_Foreground());
00265         StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation(), RootProgress());
00266         return result;
00267     }
00268
00269     // - - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05
00270     // - Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00271     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00272     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00273     // - Opacity for layer: Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape
00274     // Layer 2 Shape Layer 2
00275     // Ellipse Path 1 Ellipse Path 1 Ellipse Path 1 Ellipse Path 1 Ellipse Path 1 Ellipse
00276     // Path 1
00277     CompositionSpriteShape SpriteShape_1()
00278     {
00279         // Offset:<3.812, -3.938>, Scale:<0.92286, 0.92286>
00280         const auto result = CreateSpriteShape(Ellipse_14p188(), { 0.922860026F, 0.0F, 0.0F, 0.922860026F, 3.81200004F, -3.93799996F });
00281         result.StrokeBrush(_themeColor_Foreground);
00282         StartProgressBoundAnimation(result, L"StrokeThickness", StrokeThicknessScalarAnimation_2p5_to_2p5(), _rootProgress);
00283         return result;
00284     }
00285
00286     // Transforms for Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
00287     // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00288     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00289     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver Scale(1,1,0)
00290     ContainerVisual ContainerVisual_0()
00291     {
00292         const auto result = _c.CreateContainerVisual();
00293         result.Clip(InsetClip_0());
00294         result.Size({ 48.0F, 48.0F });
00295         // Scale:<1, 1>
00296         result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
00297         const auto children = result.Children();
00298         // Shape tree root for layer: Layer 4 Layer 4 Layer 4 Layer 4 Layer 4 Layer 4
00299         children.InsertAtTop(ShapeVisual_0());
00300         // Opacity for layer: Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape
00301         // Layer 2 Shape Layer 2
00302         children.InsertAtTop(ShapeVisual_1());
00303         return result;
00304     }
00305
00306     // The root of the composition.
00307     ContainerVisual Root()
00308     {
00309         const auto result = _root = _c.CreateContainerVisual();
00310         const auto propertySet = result.Properties();
00311         propertySet.InsertScalar(L"Progress", 0.0F);
00312         propertySet.InsertScalar(L"t0", 0.0F);
00313         propertySet.InsertScalar(L"t1", 0.0F);
00314         propertySet.InsertScalar(L"t2", 0.0F);
00315         // PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
00316         // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00317         // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00318         // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00319         result.Children().InsertAtTop(ContainerVisual_0());
00320         StartProgressBoundAnimation(propertySet, L"t0", t0ScalarAnimation_0_to_1(), _rootProgress);
00321         StartProgressBoundAnimation(propertySet, L"t1", t1ScalarAnimation_0_to_1(), _rootProgress);
00322         StartProgressBoundAnimation(propertySet, L"t2", t2ScalarAnimation_0_to_1(), _rootProgress);
00323         return result;
00324     }
00325
00326     CubicBezierEasingFunction CubicBezierEasingFunction_0()
00327     {
00328         return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
00329     }
00330
00331     CubicBezierEasingFunction CubicBezierEasingFunction_1()
00332     {
00333         return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.550000012F, 0.0F }, { 0.75F, 1.0F });
00334     }
00335
00336     CubicBezierEasingFunction CubicBezierEasingFunction_2()
00337     {
00338         return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
00339     }
00340
00341     CubicBezierEasingFunction CubicBezierEasingFunction_3()
00342     {
00343         return _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.449999988F, 1.0F });
00344     }
00345
00346     CubicBezierEasingFunction CubicBezierEasingFunction_4()
00347     {
00348         return _cubicBezierEasingFunction_4 = _c.CreateCubicBezierEasingFunction({ 0.449999988F, 0.0F }, { 0.75F, 1.0F });
00349     }
00350
00351     CubicBezierEasingFunction CubicBezierEasingFunction_5()
00352     {
00353         return _cubicBezierEasingFunction_5 = _c.CreateCubicBezierEasingFunction({ 0.75F, 0.0F }, { 0.75F, 1.0F });
00354     }
00355
00356     ExpressionAnimation RootProgress()
00357     {
00358         const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
00359         result.SetReferenceParameter(L"_", _root);
00360         return result;
00361     }
00362
00363     // PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
00364     // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00365     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00366     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00367     InsetClip InsetClip_0()
00368     {
00369         const auto result = _c.CreateInsetClip();
00370         return result;
00371     }
00372
00373     // Scale
00374     ScalarKeyFrameAnimation ScalarAnimation_1_to_1()
00375     {
00376         // Frame 0.
00377         const auto result = _scalarAnimation_1_to_1 = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
00378         // Frame 10.
00379         result.InsertKeyFrame(0.125F, 1.0F, _holdThenStepEasingFunction);
00380         // Frame 19.
00381         result.InsertKeyFrame(0.237499997F, 0.800000012F, CubicBezierEasingFunction_3());
00382         // Frame 20.
00383         result.InsertKeyFrame(0.25F, 1.0F, _holdThenStepEasingFunction);
00384         // Frame 30.
00385         result.InsertKeyFrame(0.375F, 1.0F, _holdThenStepEasingFunction);
00386         // Frame 39.
00387         result.InsertKeyFrame(0.487500012F, 0.800000012F, _cubicBezierEasingFunction_3);
00388         // Frame 40.
00389         result.InsertKeyFrame(0.5F, 0.800000012F, _holdThenStepEasingFunction);
00390         // Frame 45.
00391         result.InsertKeyFrame(0.5625F, 1.20000005F, CubicBezierEasingFunction_4());
00392         // Frame 59.
00393         result.InsertKeyFrame(0.737500012F, 1.0F, _cubicBezierEasingFunction_2);
00394         // Frame 60.
00395         result.InsertKeyFrame(0.75F, 0.800000012F, _holdThenStepEasingFunction);
00396         // Frame 65.
00397         result.InsertKeyFrame(0.8125F, 1.20000005F, _cubicBezierEasingFunction_4);
00398         // Frame 79.
00399         result.InsertKeyFrame(0.987500012F, 1.0F, _cubicBezierEasingFunction_2);
00400         return result;
00401     }
00402
00403     // - - - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls -
00404     // 05 - Search - 02 - NormalToPressed Controls - 05 - Search - 03 -
00405     // PointerOverToNormal Controls - 05 - Search - 04 - PointerOverToPressed Controls -
00406     // 05 - Search - 05 - PressedToNormal Controls - 05 - Search - 06 -
00407     // PressedToPointerOver
00408     // - - Opacity for layer: Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape Layer 2
00409     // Shape Layer 2 Shape Layer 2
00410     // ShapeGroup: Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1 Ellipse 1
00411     // Scale:0.92286,0.92286, Offset:<3.812, -3.938>
00412     // StrokeThickness
00413     ScalarKeyFrameAnimation StrokeThicknessScalarAnimation_2p5_to_2p5()
00414     {
00415         // Frame 0.
00416         const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.5F, _holdThenStepEasingFunction);
00417         // Frame 10.
00418         result.InsertKeyFrame(0.125F, 2.5F, _holdThenStepEasingFunction);
00419         // Frame 19.
00420         result.InsertKeyFrame(0.237499997F, 3.0F, CubicBezierEasingFunction_0());
00421         // Frame 20.
00422         result.InsertKeyFrame(0.25F, 2.5F, _holdThenStepEasingFunction);
00423         // Frame 30.
00424         result.InsertKeyFrame(0.375F, 2.5F, _holdThenStepEasingFunction);
00425         // Frame 39.
00426         result.InsertKeyFrame(0.487500012F, 3.0F, _cubicBezierEasingFunction_0);
00427         // Frame 40.
00428         result.InsertKeyFrame(0.5F, 3.0F, _holdThenStepEasingFunction);
00429         // Frame 45.
00430         result.InsertKeyFrame(0.5625F, 2.20000005F, CubicBezierEasingFunction_1());
00431         // Frame 59.
00432         result.InsertKeyFrame(0.737500012F, 2.5F, CubicBezierEasingFunction_2());
00433         // Frame 60.
00434         result.InsertKeyFrame(0.75F, 3.0F, _holdThenStepEasingFunction);
00435         // Frame 65.
00436         result.InsertKeyFrame(0.8125F, 2.20000005F, _cubicBezierEasingFunction_1);
00437         // Frame 79.
00438         result.InsertKeyFrame(0.987500012F, 2.5F, _cubicBezierEasingFunction_2);
00439         return result;
00440     }
00441
00442     ScalarKeyFrameAnimation t0ScalarAnimation_0_to_1()
00443     {
00444         // Frame 10.
00445         const auto result = CreateScalarKeyFrameAnimation(0.125000015F, 0.0F, _stepThenHoldEasingFunction);
00446         result.SetReferenceParameter(L"_", _root);
00447         // Frame 19.
00448         result.InsertKeyFrame(0.237499982F, 1.0F, _cubicBezierEasingFunction_3);
00449         // Frame 30.
00450         result.InsertKeyFrame(0.37500003F, 0.0F, _stepThenHoldEasingFunction);
00451         // Frame 39.
00452         result.InsertKeyFrame(0.487499982F, 1.0F, _cubicBezierEasingFunction_3);
00453         return result;
00454     }
00455
00456     ScalarKeyFrameAnimation t1ScalarAnimation_0_to_1()
00457     {
00458         // Frame 40.
00459         const auto result = CreateScalarKeyFrameAnimation(0.50000006F, 0.0F, _stepThenHoldEasingFunction);
00460         result.SetReferenceParameter(L"_", _root);
00461         // Frame 45.
00462         result.InsertKeyFrame(0.56249994F, 1.0F, CubicBezierEasingFunction_5());
00463         // Frame 45.
00464         result.InsertKeyFrame(0.5625F, 0.0F, _stepThenHoldEasingFunction);
00465         // Frame 59.
00466         result.InsertKeyFrame(0.737499952F, 1.0F, _cubicBezierEasingFunction_2);
00467         return result;
00468     }
00469
00470     ScalarKeyFrameAnimation t2ScalarAnimation_0_to_1()
00471     {
00472         // Frame 60.
00473         const auto result = CreateScalarKeyFrameAnimation(0.75000006F, 0.0F, _stepThenHoldEasingFunction);
00474         result.SetReferenceParameter(L"_", _root);
00475         // Frame 65.
00476         result.InsertKeyFrame(0.81249994F, 1.0F, _cubicBezierEasingFunction_5);
00477         // Frame 65.
00478         result.InsertKeyFrame(0.8125F, 0.0F, _stepThenHoldEasingFunction);
00479         // Frame 79.
00480         result.InsertKeyFrame(0.987499952F, 1.0F, _cubicBezierEasingFunction_2);
00481         return result;
00482     }
00483
00484     // PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
00485     // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00486     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00487     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00488     // Shape tree root for layer: Layer 4 Layer 4 Layer 4 Layer 4 Layer 4 Layer 4
00489     ShapeVisual ShapeVisual_0()
00490     {
00491         const auto result = _c.CreateShapeVisual();
00492         result.Size({ 48.0F, 48.0F });
00493         // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00494         result.Shapes().Append(SpriteShape_0());
00495         return result;
00496     }
00497
00498     // PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05 -
00499     // Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00500     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00501     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00502     // Shape tree root for layer: Shape Layer 2 Shape Layer 2 Shape Layer 2 Shape Layer 2
00503     // Shape Layer 2 Shape Layer 2
00504     ShapeVisual ShapeVisual_1()
00505     {
00506         const auto result = _c.CreateShapeVisual();
00507         result.Opacity(0.970000029F);
00508         result.Size({ 48.0F, 48.0F });
00509         result.Shapes().Append(ContainerShape());
00510         return result;
00511     }
00512
00513     StepEasingFunction HoldThenStepEasingFunction()
00514     {
00515         const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
00516         result.IsFinalStepSingleFrame(true);
00517         return result;
00518     }
00519
00520     StepEasingFunction StepThenHoldEasingFunction()
00521     {
00522         const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
00523         result.IsInitialStepSingleFrame(true);
00524         return result;
00525     }
00526
00527     // - - PreComp layer: Controls - 05 - Search - 01 - NormalToPointerOver Controls - 05
00528     // - Search - 02 - NormalToPressed Controls - 05 - Search - 03 - PointerOverToNormal
00529     // Controls - 05 - Search - 04 - PointerOverToPressed Controls - 05 - Search - 05 -
00530     // PressedToNormal Controls - 05 - Search - 06 - PressedToPointerOver
00531     // - Shape tree root for layer: Layer 4 Layer 4 Layer 4 Layer 4 Layer 4 Layer 4
00532     // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00533     // Offset
00534     Vector2KeyFrameAnimation OffsetVector2Animation()
00535     {
00536         // Frame 0.
00537         const auto result = CreateVector2KeyFrameAnimation(0.0F, { 5.64699984F, -249.322998F }, HoldThenStepEasingFunction());
00538         result.SetReferenceParameter(L"_", _root);
00539         // Frame 10.
00540         result.InsertKeyFrame(0.125F, { 5.64699984F, -249.322998F }, _holdThenStepEasingFunction);
00541         // Frame 19.
00542         result.InsertExpressionKeyFrame(0.237499982F, L"Pow(1-_.t0,3)*Vector2(5.647,-249.323)+(3*Square(1-_.t0)*_.t0*Vector2(5.939,-249.615))+(3*(1-_.t0)*Square(_.t0)*Vector2(7.105,-250.781))+(Pow(_.t0,3)*Vector2(7.397,-251.073))", StepThenHoldEasingFunction());
00543         // Frame 19.
00544         result.InsertKeyFrame(0.237499997F, { 7.39699984F, -251.072998F }, _stepThenHoldEasingFunction);
00545         // Frame 20.
00546         result.InsertKeyFrame(0.25F, { 5.64699984F, -249.322998F }, _holdThenStepEasingFunction);
00547         // Frame 30.
00548         result.InsertKeyFrame(0.375F, { 5.64699984F, -249.322998F }, _holdThenStepEasingFunction);
00549         // Frame 39.
00550         result.InsertExpressionKeyFrame(0.487499982F, L"Pow(1-_.t0,3)*Vector2(5.647,-249.323)+(3*Square(1-_.t0)*_.t0*Vector2(5.939,-249.615))+(3*(1-_.t0)*Square(_.t0)*Vector2(7.105,-250.781))+(Pow(_.t0,3)*Vector2(7.397,-251.073))", _stepThenHoldEasingFunction);
00551         // Frame 39.
00552         result.InsertKeyFrame(0.487500012F, { 7.39699984F, -251.072998F }, _stepThenHoldEasingFunction);
00553         // Frame 40.
00554         result.InsertKeyFrame(0.5F, { 7.39699984F, -251.072998F }, _holdThenStepEasingFunction);
00555         // Frame 45.
00556         result.InsertExpressionKeyFrame(0.56249994F, L"Pow(1-_.t1,3)*Vector2(7.397,-251.073)+(3*Square(1-_.t1)*_.t1*Vector2(6.767,-250.443))+(3*(1-_.t1)*Square(_.t1)*Vector2(3.616,-247.292))+(Pow(_.t1,3)*Vector2(3.616,-247.292))", _stepThenHoldEasingFunction);
00557         // Frame 59.
00558         result.InsertExpressionKeyFrame(0.737499952F, L"Pow(1-_.t1,3)*Vector2(3.616,-247.292)+(3*Square(1-_.t1)*_.t1*Vector2(3.616,-247.292))+(3*(1-_.t1)*Square(_.t1)*Vector2(5.308,-248.984))+(Pow(_.t1,3)*Vector2(5.647,-249.323))", _stepThenHoldEasingFunction);
00559         // Frame 59.
00560         result.InsertKeyFrame(0.737500012F, { 5.64699984F, -249.322998F }, _stepThenHoldEasingFunction);
00561         // Frame 60.
00562         result.InsertKeyFrame(0.75F, { 7.39699984F, -251.072998F }, _holdThenStepEasingFunction);
00563         // Frame 65.
00564         result.InsertExpressionKeyFrame(0.81249994F, L"Pow(1-_.t2,3)*Vector2(7.397,-251.073)+(3*Square(1-_.t2)*_.t2*Vector2(6.767,-250.443))+(3*(1-_.t2)*Square(_.t2)*Vector2(3.616,-247.292))+(Pow(_.t2,3)*Vector2(3.616,-247.292))", _stepThenHoldEasingFunction);
00565         // Frame 79.
00566         result.InsertExpressionKeyFrame(0.987499952F, L"Pow(1-_.t2,3)*Vector2(3.616,-247.292)+(3*Square(1-_.t2)*_.t2*Vector2(3.616,-247.292))+(3*(1-_.t2)*Square(_.t2)*Vector2(5.308,-248.984))+(Pow(_.t2,3)*Vector2(5.647,-249.323))", _stepThenHoldEasingFunction);
00567         // Frame 79.
00568         result.InsertKeyFrame(0.987500012F, { 5.64699984F, -249.322998F }, _stepThenHoldEasingFunction);
00569         return result;
00570     }
00571
00572     static IGeometrySource2D CanvasGeometryToIGeometrySource2D(winrt::com_ptr<CanvasGeometry> geo)
00573     {
00574         return geo.as<IGeometrySource2D>();
00575     }
00576
00577 public:
00578     AnimatedFindVisualSource_AnimatedVisual(
00579         Compositor compositor,
00580         CompositionPropertySet themeProperties)
00581         : _c{compositor}
00582         , _themeProperties{themeProperties}
00583         , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
00584     {
00585         winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
00586         const auto _ = Root();
00587     }
00588
00589     void Close()
00590     {
00591         if (_root)
00592         {
00593             _root.Close();
00594         }
00595     }
00596
00597     TimeSpan Duration() const
00598     {
00599         return TimeSpan{ c_durationTicks };
00600     }
00601
00602     Visual RootVisual() const
00603     {
00604         return _root;
00605     }
00606
00607     winrt::float2 Size() const
00608     {
00609         return { 48.0F, 48.0F };
00610     }
00611
00612     static bool IsRuntimeCompatible()
00613     {
00614         return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
00615     }
00616 };
00617
00618 winrt::float4 AnimatedFindVisualSource::ColorAsVector4(Color color)
00619 {
00620     return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
00621 }
00622
00623 CompositionPropertySet AnimatedFindVisualSource::EnsureThemeProperties(Compositor compositor)
00624 {
00625     if (_themeProperties == nullptr)
00626     {
00627         _themeProperties = compositor.CreatePropertySet();
00628         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00629     }
00630
00631     return _themeProperties;
00632 }
00633
00634 Color AnimatedFindVisualSource::Foreground()
00635 {
00636     return _themeForeground;
00637 }
00638
00639 void AnimatedFindVisualSource::Foreground(Color value)
00640 {
00641     _themeForeground = value;
00642     if (_themeProperties != nullptr)
00643     {
00644         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00645     }
00646 }
00647
00648 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedFindVisualSource::TryCreateAnimatedVisual(
00649     Compositor const& compositor)
00650 {
00651     IInspectable diagnostics = nullptr;
00652     return TryCreateAnimatedVisual(compositor, diagnostics);
00653 }
00654
00655 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedFindVisualSource::TryCreateAnimatedVisual(
00656     Compositor const& compositor,
00657     IInspectable& diagnostics)
00658 {
00659     const auto _ = EnsureThemeProperties(compositor);
00660     diagnostics = nullptr;
00661
00662     if (AnimatedFindVisualSource_AnimatedVisual::IsRuntimeCompatible())
00663     {
00664         return winrt::make<AnimatedFindVisualSource_AnimatedVisual>(
00665             compositor,
00666             _themeProperties);
00667     }
00668
00669     return nullptr;
00670 }
00671
00672 double AnimatedFindVisualSource::FrameCount()
00673 {
00674     return 80.0;
00675 }
00676
00677 double AnimatedFindVisualSource::Framerate()
00678 {
00679     return 60.0;
00680 }
00681
00682 TimeSpan AnimatedFindVisualSource::Duration()
00683 {
00684     return TimeSpan{ 13333333L };
00685 }
00686
00687 double AnimatedFindVisualSource::FrameToProgress(double frameNumber)
00688 {
00689     return frameNumber / 80.0;
00690 }
00691
00692 winrt::Windows::Foundation::Collections::IMapView<hstring, double> AnimatedFindVisualSource::Markers()
00693 {
00694     return winrt::single_threaded_map<winrt::hstring, double>(
00695         std::map<winrt::hstring, double>
00696         {
00697             { L"NormalToPointerOver_Start", 0.0 },
00698             { L"NormalToPointerOver_End", 0.113125 },
00699             { L"NormalToPressed_Start", 0.125625 },
00700             { L"NormalToPressed_End", 0.238125 },
00701             { L"PointerOverToNormal_Start", 0.250625 },
00702             { L"PointerOverToNormal_End", 0.363125 },
00703             { L"PointerOverToPressed_Start", 0.375625 },
00704             { L"PointerOverToPressed_End", 0.488125 },
00705             { L"PressedToNormal_Start", 0.500625 },
00706             { L"PressedToNormal_End", 0.738125 },
00707             { L"PressedToPointerOver_Start", 0.750625 },
00708             { L"PressedToPointerOver_End", 0.988125 },
00709         }
00710     ).GetView();
00711 }
00712
00713 void AnimatedFindVisualSource::SetColorProperty(hstring const& propertyName, Color value)
00714 {
00715     if (propertyName == L"Foreground")
00716     {
00717         _themeForeground = value;
00718     }
00719     else
00720     {
00721         return;
00722     }
00723
00724     if (_themeProperties != nullptr)
00725     {
00726         _themeProperties.InsertVector4(propertyName, ColorAsVector4(value));
00727     }
00728 }
00729
00730 void AnimatedFindVisualSource::SetScalarProperty(hstring const&, double)
00731 {
00732 }
Generated on Sun Dec 1 2024 20:51:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerTemplateSettingsProperties Member List

This is the complete list of members for PipsPagerTemplateSettingsProperties, including all inherited members.
ClearProperties() | PipsPagerTemplateSettingsProperties | [static]
EnsureProperties() | PipsPagerTemplateSettingsProperties | [static]
PipsPagerItems(winrt::IVector< int > const &value) | PipsPagerTemplateSettingsProperties |
PipsPagerItems() | PipsPagerTemplateSettingsProperties |
PipsPagerItemsProperty() | PipsPagerTemplateSettingsProperties | [inline, static]
PipsPagerTemplateSettingsProperties() | PipsPagerTemplateSettingsProperties |
s_PipsPagerItemsProperty | PipsPagerTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

KeyboardNavigationSample Member List

This is the complete list of members for KeyboardNavigationSample, including all inherited members.
AppendLog(string log) | KeyboardNavigationSample | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | KeyboardNavigationSample | [inline, private]
BtnResetItemsSource_Click(object sender, RoutedEventArgs e) | KeyboardNavigationSample | [inline, private]
BtnSetItemsSource_Click(object sender, RoutedEventArgs e) | KeyboardNavigationSample | [inline, private]
CmbItemsRepeaterTabFocusNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | KeyboardNavigationSample | [inline, private]
CmbScrollViewTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | KeyboardNavigationSample | [inline, private]
HookItemsRepeaterEvents(ItemsRepeater itemsRepeater) | KeyboardNavigationSample | [inline, private]
ItemsRepeater_ElementClearing(ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args) | KeyboardNavigationSample | [inline, private]
ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | KeyboardNavigationSample | [inline, private]
KeyboardNavigationSample() | KeyboardNavigationSample | [inline]
KeyboardNavigationSample_GotFocus(object sender, RoutedEventArgs e) | KeyboardNavigationSample | [inline, private]
~KeyboardNavigationSample() | KeyboardNavigationSample | [inline, private]
Generated on Sun Dec 1 2024 20:54:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutPage Member List

This is the complete list of members for CommandBarFlyoutPage, including all inherited members.
addFlyoutTimer | CommandBarFlyoutPage | [private]
AddFlyoutTimer_Tick(object sender, object e) | CommandBarFlyoutPage | [inline, private]
animatedCommandBarFlyoutCommandBarStyle | CommandBarFlyoutPage | [private]
clearPrimaryCommandsFlyout | CommandBarFlyoutPage | [private]
clearPrimaryCommandsTimer | CommandBarFlyoutPage | [private]
ClearPrimaryCommandsTimer_Tick(object sender, object e) | CommandBarFlyoutPage | [inline, private]
clearSecondaryCommandsFlyout | CommandBarFlyoutPage | [private]
clearSecondaryCommandsTimer | CommandBarFlyoutPage | [private]
ClearSecondaryCommandsTimer_Tick(object sender, object e) | CommandBarFlyoutPage | [inline, private]
CommandBarFlyoutPage() | CommandBarFlyoutPage | [inline]
dynamicCommandBarFlyout | CommandBarFlyoutPage | [private]
dynamicCommandTimer | CommandBarFlyoutPage | [private]
DynamicCommandTimer_Tick(object sender, object e) | CommandBarFlyoutPage | [inline, private]
dynamicLabelChangeCount | CommandBarFlyoutPage | [private]
dynamicLabelSecondaryCommand | CommandBarFlyoutPage | [private]
dynamicLabelTimer | CommandBarFlyoutPage | [private]
DynamicLabelTimer_Tick(object sender, object e) | CommandBarFlyoutPage | [inline, private]
dynamicVisibilityChangeCount | CommandBarFlyoutPage | [private]
dynamicVisibilitySecondaryCommand | CommandBarFlyoutPage | [private]
dynamicVisibilityTimer | CommandBarFlyoutPage | [private]
DynamicVisibilityTimer_Tick(object sender, object e) | CommandBarFlyoutPage | [inline, private]
dynamicWidthChangeCount | CommandBarFlyoutPage | [private]
dynamicWidthOverflowContentRoot | CommandBarFlyoutPage | [private]
dynamicWidthTimer | CommandBarFlyoutPage | [private]
DynamicWidthTimer_Tick(object sender, object e) | CommandBarFlyoutPage | [inline, private]
flyoutToAdd | CommandBarFlyoutPage | [private]
IsRTLCheckBox_Checked(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
IsRTLCheckBox_Unchecked(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnEditCommandCount6Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnElementChecked(object sender, object args) | CommandBarFlyoutPage | [inline]
OnElementClicked(object sender, object args) | CommandBarFlyoutPage | [inline]
OnElementUnchecked(object sender, object args) | CommandBarFlyoutPage | [inline]
OnFlyoutClosed(object sender, object args) | CommandBarFlyoutPage | [inline]
OnFlyoutOpened(object sender, object args) | CommandBarFlyoutPage | [inline]
OnFlyoutTarget10Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget11Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget12Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget13Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget14Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget15Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget16Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget1Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget2Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget3Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget4Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget5Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget6Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget7Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget8Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
OnFlyoutTarget9Click(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
originalLabelSecondaryCommand | CommandBarFlyoutPage | [private]
originalVisibilitySecondaryCommand | CommandBarFlyoutPage | [private]
originalWidthOverflowContentRoot | CommandBarFlyoutPage | [private]
OverflowContentRoot_SizeChanged(object sender, SizeChangedEventArgs e) | CommandBarFlyoutPage | [inline, private]
RecordEvent(string eventString) | CommandBarFlyoutPage | [inline, private]
RecordEvent(object sender, string eventString) | CommandBarFlyoutPage | [inline, private]
SecondaryCommandAsFE_Loaded(object sender, RoutedEventArgs e) | CommandBarFlyoutPage | [inline, private]
SetClearPrimaryCommandsFlyout(CommandBarFlyout commandBarFlyout) | CommandBarFlyoutPage | [inline, private]
SetClearSecondaryCommandsFlyout(CommandBarFlyout commandBarFlyout) | CommandBarFlyoutPage | [inline, private]
SetDynamicLabelSecondaryCommand(AppBarButton appBarButton) | CommandBarFlyoutPage | [inline, private]
SetDynamicOverflowContentRoot(FrameworkElement overflowContentRoot) | CommandBarFlyoutPage | [inline, private]
SetDynamicPrimaryCommand() | CommandBarFlyoutPage | [inline, private]
SetDynamicVisibilitySecondaryCommand(AppBarButton appBarButton) | CommandBarFlyoutPage | [inline, private]
ShowFlyoutAt(FlyoutBase flyout, FrameworkElement targetElement, FlyoutShowMode showMode=FlyoutShowMode.Transient) | CommandBarFlyoutPage | [inline, private]
UndoButtonOverflow16_SizeChanged(object sender, SizeChangedEventArgs e) | CommandBarFlyoutPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

EffectBase Member List

This is the complete list of members for EffectBase, including all inherited members.
CreateColor(UIColor color) | EffectBase | [inline, protected, static]
GetNamedPropertyMapping(LPCWSTR, _Out_ UINT *, _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING *) override | EffectBase | [inline]
GetNamedPropertyMappingImpl(_In_count_(mappingCount) const NamedProperty *namedProperties, UINT namedPropertyCount, LPCWSTR name, _Out_ UINT *index, _Out_ GRAPHICS_EFFECT_PROPERTY_MAPPING *mapping) | EffectBase | [inline, protected]
GetProperty(UINT, _Outptr_ abi::IPropertyValue **) override | EffectBase | [inline]
GetPropertyCount(_Out_ UINT *count) override | EffectBase | [inline]
GetSource(UINT, _Outptr_ abi::IGraphicsEffectSource **) override | EffectBase | [inline]
GetSourceCount(_Out_ UINT *count) override | EffectBase | [inline]
k_DegreesPerRadian | EffectBase | [protected, static]
k_PI | EffectBase | [protected, static]
m_Name | EffectBase |
Name() | EffectBase | [inline]
Name(winrt::hstring const &value) | EffectBase | [inline]
UsePropertyFactory(_Outptr_ abi::IPropertyValue **value, std::function< winrt::IInspectable()> const &func) | EffectBase | [inline, protected, static]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBar.idl Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutCommandBar.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XCP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [MUX_PROPERTY_NEEDS_DP_FIELD]
00007 runtimeclass CommandBarFlyoutCommandBarTemplateSettings
00008     : Microsoft.UI.Xaml.DependencyObject
00009 {
00010     Double OpenAnimationStartPosition { get; };
00011     Double OpenAnimationEndPosition { get; };
00012     Double CloseAnimationEndPosition { get; };
00013     Double CurrentWidth { get; };
00014     Double ExpandedWidth { get; };
00015     Double WidthExpansionDelta { get; };
00016     Double WidthExpansionAnimationStartPosition { get; };
00017     Double WidthExpansionAnimationEndPosition{ get; };
00018     Double WidthExpansionMoreButtonAnimationStartPosition { get; };
00019     Double WidthExpansionMoreButtonAnimationEndPosition{ get; };
00020     Double ExpandUpOverflowVerticalPosition { get; };
00021     Double ExpandDownOverflowVerticalPosition { get; };
00022     Double ExpandUpAnimationStartPosition { get; };
00023     Double ExpandUpAnimationEndPosition { get; };
00024     Double ExpandUpAnimationHoldPosition { get; };
00025     Double ExpandDownAnimationStartPosition { get; };
00026     Double ExpandDownAnimationEndPosition { get; };
00027     Double ExpandDownAnimationHoldPosition{ get; };
00028     Windows.Foundation.Rect ContentClipRect { get; };
00029     Windows.Foundation.Rect OverflowContentClipRect{ get; };
00030 };
00031
00032 [MUX_PUBLIC]
00033 [webhosthidden]
00034 unsealed runtimeclass CommandBarFlyoutCommandBar : Microsoft.UI.Xaml.Controls.CommandBar
00035 {
00036     CommandBarFlyoutCommandBar();
00037
00038     [MUX_PROPERTY_NEEDS_DP_FIELD]
00039     CommandBarFlyoutCommandBarTemplateSettings FlyoutTemplateSettings { get; };
00040
00041     [MUX_PUBLIC_V5]
00042     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00043     [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00044     Microsoft.UI.Xaml.Media.SystemBackdrop SystemBackdrop { get; set; };
00045
00046     [MUX_PUBLIC_V5]
00047     static Microsoft.UI.Xaml.DependencyProperty SystemBackdropProperty { get; };
00048 };
00049
00050 [MUX_PUBLIC]
00051 [webhosthidden]
00052 static runtimeclass CommandBarFlyoutCommandBarAutomationProperties
00053 {
00054     [MUX_DEFAULT_VALUE("winrt::AutomationControlType::Custom")]
00055     [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnControlTypePropertyChanged")]
00056     static Microsoft.UI.Xaml.DependencyProperty ControlTypeProperty{ get; };
00057     static Microsoft.UI.Xaml.Automation.Peers.AutomationControlType GetControlType(Microsoft.UI.Xaml.UIElement element);
00058     static void SetControlType(Microsoft.UI.Xaml.UIElement element, Microsoft.UI.Xaml.Automation.Peers.AutomationControlType value);
00059 }
00060 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ProgressRingDeterminate.cs Source File

  • File List
  • File Members
  • ProgressRing
  • TestUI

ProgressRingDeterminate.cs

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //     Changes to this file may cause incorrect behavior and will be lost if
00006 //     the code is regenerated.
00007 // </auto-generated>
00008 //------------------------------------------------------------------------------
00009 using Microsoft.UI.Xaml.Controls;
00010 using System;
00011 using System.Numerics;
00012 using Windows.UI;
00013 using Microsoft.UI.Composition;
00014
00015 namespace AnimatedVisuals
00016 {
00017     sealed class ProgressRingDeterminate : IAnimatedVisualSource
00018     {
00019         public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics)
00020         {
00021             diagnostics = null;
00022             if (!IsRuntimeCompatible())
00023             {
00024                 return null;
00025             }
00026             return new AnimatedVisual(compositor);
00027         }
00028
00029         static bool IsRuntimeCompatible()
00030         {
00031             // WinUI 3 specific change: .NET 6's IsTypePresent call returns false here, causing a failure in LottieCustomSourceTest since it won't create
00032             // the animated visual for the ProgressRing and ProgressRingCustomLottieSourcePage.xaml's IsPlayingText text will be False instead of True
00033             // since there's no animated visual to play.
00034             /*
00035             if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Microsoft.UI.Composition.CompositionGeometricClip"))
00036             {
00037                 throw new PlatformNotSupportedException("Could not find CompositionGeometricClip for ProgressRingDeterminate");
00038             }
00039             */
00040             return true;
00041         }
00042
00043         sealed class AnimatedVisual : IAnimatedVisual
00044         {
00045             const long c_durationTicks = 20000000;
00046             readonly Compositor _c;
00047             readonly ExpressionAnimation _reusableExpressionAnimation;
00048             ContainerVisual _root;
00049
00050             // Ellipse Path
00051             CompositionColorBrush ColorBrush_AlmostDodgerBlue_FF0078D7()
00052             {
00053                 return _c.CreateColorBrush(Color.FromArgb(0xFF, 0x00, 0x78, 0xD7));
00054             }
00055
00056             // Ellipse Path
00057             CompositionColorBrush ColorBrush_LightGray()
00058             {
00059                 return _c.CreateColorBrush(Color.FromArgb(0xFF, 0xD3, 0xD3, 0xD3));
00060             }
00061
00062             // Ellipse Path
00063             // Ellipse Path.EllipseGeometry
00064             // TrimEnd
00065             CubicBezierEasingFunction CubicBezierEasingFunction()
00066             {
00067                 return _c.CreateCubicBezierEasingFunction(new Vector2(0.400000006F, 0), new Vector2(0.833000004F, 0.833000004F));
00068             }
00069
00070             // Ellipse Path
00071             // Ellipse Path.EllipseGeometry
00072             CompositionEllipseGeometry Ellipse_7_0()
00073             {
00074                 var result = _c.CreateEllipseGeometry();
00075                 result.Radius = new Vector2(7, 7);
00076                 return result;
00077             }
00078
00079             // Ellipse Path
00080             // Ellipse Path.EllipseGeometry
00081             CompositionEllipseGeometry Ellipse_7_1()
00082             {
00083                 var result = _c.CreateEllipseGeometry();
00084                 result.Radius = new Vector2(7, 7);
00085                 result.StartAnimation("TrimEnd", TrimEndScalarAnimation_0_to_1());
00086                 var controller = result.TryGetAnimationController("TrimEnd");
00087                 controller.Pause();
00088                 _reusableExpressionAnimation.ClearAllParameters();
00089                 _reusableExpressionAnimation.Expression = "_.Progress";
00090                 _reusableExpressionAnimation.SetReferenceParameter("_", _root);
00091                 controller.StartAnimation("Progress", _reusableExpressionAnimation);
00092                 return result;
00093             }
00094
00095             // Ellipse Path
00096             // Ellipse Path.EllipseGeometry
00097             // TrimEnd
00098             StepEasingFunction HoldThenStepEasingFunction()
00099             {
00100                 var result = _c.CreateStepEasingFunction();
00101                 result.IsFinalStepSingleFrame  = true;
00102                 return result;
00103             }
00104
00105             // The root of the composition.
00106             ContainerVisual Root()
00107             {
00108                 var result = _root = _c.CreateContainerVisual();
00109                 var propertySet = result.Properties;
00110                 propertySet.InsertScalar("Progress", 0);
00111                 var children = result.Children;
00112                 children.InsertAtTop(ShapeVisual());
00113                 return result;
00114             }
00115
00116             ShapeVisual ShapeVisual()
00117             {
00118                 var result = _c.CreateShapeVisual();
00119                 result.Size = new Vector2(80, 80);
00120                 var shapes = result.Shapes;
00121                 // Ellipse Path
00122                 shapes.Add(SpriteShape_0());
00123                 // Ellipse Path
00124                 shapes.Add(SpriteShape_1());
00125                 return result;
00126             }
00127
00128             // Ellipse Path
00129             CompositionSpriteShape SpriteShape_0()
00130             {
00131                 var result = _c.CreateSpriteShape();
00132                 result.TransformMatrix = new Matrix3x2(5, 0, 0, 5, 40, 40);
00133                 result.Geometry = Ellipse_7_0();
00134                 result.StrokeBrush = ColorBrush_LightGray();
00135                 result.StrokeDashCap = CompositionStrokeCap.Round;
00136                 result.StrokeEndCap = CompositionStrokeCap.Round;
00137                 result.StrokeStartCap = CompositionStrokeCap.Round;
00138                 result.StrokeMiterLimit = 4;
00139                 result.StrokeThickness = 2;
00140                 return result;
00141             }
00142
00143             // Ellipse Path
00144             CompositionSpriteShape SpriteShape_1()
00145             {
00146                 var result = _c.CreateSpriteShape();
00147                 result.TransformMatrix = new Matrix3x2(5, 0, 0, 5, 40, 40);
00148                 result.Geometry = Ellipse_7_1();
00149                 result.StrokeBrush = ColorBrush_AlmostDodgerBlue_FF0078D7();
00150                 result.StrokeDashCap = CompositionStrokeCap.Round;
00151                 result.StrokeEndCap = CompositionStrokeCap.Round;
00152                 result.StrokeStartCap = CompositionStrokeCap.Round;
00153                 result.StrokeMiterLimit = 4;
00154                 result.StrokeThickness = 2;
00155                 return result;
00156             }
00157
00158             // Ellipse Path
00159             // Ellipse Path.EllipseGeometry
00160             // TrimEnd
00161             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_1()
00162             {
00163                 var result = _c.CreateScalarKeyFrameAnimation();
00164                 result.Duration = TimeSpan.FromTicks(c_durationTicks);
00165                 result.InsertKeyFrame(0, 9.99999975E-05F, HoldThenStepEasingFunction());
00166                 result.InsertKeyFrame(0.991666675F, 1, CubicBezierEasingFunction());
00167                 return result;
00168             }
00169
00170             internal AnimatedVisual(Compositor compositor)
00171             {
00172                 _c = compositor;
00173                 _reusableExpressionAnimation = compositor.CreateExpressionAnimation();
00174                 Root();
00175             }
00176
00177             Visual IAnimatedVisual.RootVisual => _root;
00178             TimeSpan IAnimatedVisual.Duration => TimeSpan.FromTicks(c_durationTicks);
00179             Vector2 IAnimatedVisual.Size => new Vector2(80, 80);
00180             void IDisposable.Dispose() => _root?.Dispose();
00181         }
00182     }
00183 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItem.h Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBarItem.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include "BreadcrumbBarElementFactory.h"
00009
00010 #include "BreadcrumbBarItem.g.h"
00011
00012 class BreadcrumbBarItem :
00013     public ReferenceTracker<BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT>
00014 {
00015 public:
00016     BreadcrumbBarItem();
00017     ~BreadcrumbBarItem();
00018
00019     // IUIElement
00020     winrt::AutomationPeer OnCreateAutomationPeer();
00021
00022     // IFrameworkElement
00023     void OnApplyTemplate();
00024
00025     // internal
00026
00027     // Only used for bug workaround in BreadcrumbElementFactory::RecycleElementCore.
00028     bool IsEllipsisDropDownItem() const
00029     {
00030         return m_isEllipsisDropDownItem;
00031     }
00032
00033     void ResetVisualProperties();
00034
00035     void SetPropertiesForLastItem();
00036     void SetPropertiesForEllipsisItem();
00037     void SetParentBreadcrumb(const winrt::BreadcrumbBar& parent);
00038     void SetEllipsisItem(const winrt::BreadcrumbBarItem& ellipsisItem);
00039     void SetEllipsisDropDownItemDataTemplate(const winrt::IInspectable& newDataTemplate);
00040     void SetIndex(const uint32_t index);
00041     void SetIsEllipsisDropDownItem(bool isEllipsisDropDownItem);
00042
00043     void RaiseItemClickedEvent(const winrt::IInspectable& content, const uint32_t index);
00044     void CloseFlyout();
00045     void OnClickEvent(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00046
00047     void OnPointerEntered(winrt::PointerRoutedEventArgs const& args);
00048     void OnPointerMoved(winrt::PointerRoutedEventArgs const& args);
00049     void OnPointerExited(winrt::PointerRoutedEventArgs const& args);
00050     void OnPointerPressed(winrt::PointerRoutedEventArgs const& args);
00051     void OnPointerReleased(winrt::PointerRoutedEventArgs const& args);
00052     void OnPointerCanceled(winrt::PointerRoutedEventArgs const& args);
00053     void OnPointerCaptureLost(winrt::PointerRoutedEventArgs const& args);
00054
00055 private:
00056     void OnLoadedEvent(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00057     void OnEllipsisItemClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00058     void OnBreadcrumbBarItemClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs & args);
00059     void OnFlowDirectionChanged(winrt::DependencyObject const&, winrt::DependencyProperty const&);
00060     void OnChildPreviewKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args);
00061     void OnIsEnabledChanged(const winrt::IInspectable& sender, const winrt::DependencyPropertyChangedEventArgs& args);
00062     void OnVisualPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00063
00064     // Flyout events
00065     void OnFlyoutElementPreparedEvent(winrt::ItemsRepeater sender, winrt::ItemsRepeaterElementPreparedEventArgs args);
00066     void OnFlyoutElementIndexChangedEvent(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementIndexChangedEventArgs&);
00067
00068     void HookListeners(bool forEllipsisDropDownItem);
00069     void RevokeListeners();
00070     void RevokePartsListeners();
00071     void InstantiateFlyout();
00072     void OpenFlyout();
00073     void ResetTrackedPointerId();
00074     bool IgnorePointerId(const winrt::PointerRoutedEventArgs& args);
00075     void ProcessPointerOver(const winrt::PointerRoutedEventArgs& args);
00076     void ProcessPointerCanceled(const winrt::PointerRoutedEventArgs& args);
00077
00078     void UpdateItemTypeVisualState();
00079     void UpdateEllipsisDropDownItemCommonVisualState(bool useTransitions);
00080     void UpdateInlineItemTypeVisualState(bool useTransitions);
00081     void UpdateButtonCommonVisualState(bool useTransitions);
00082     void UpdateFlyoutIndex(const winrt::UIElement& element, const uint32_t index);
00083     winrt::IInspectable CloneEllipsisItemSource(const winrt::Collections::IVector<winrt::IInspectable>& ellipsisItemsSource);
00084
00085     // Common item fields
00086
00087     // Contains the 1-indexed assigned to the element
00088     uint32_t m_index{};
00089     bool m_isEllipsisDropDownItem{};
00090
00091     // Inline item fields
00092
00093     bool m_isEllipsisItem{};
00094     bool m_isLastItem{};
00095
00096     // BreadcrumbBarItem visual representation
00097     tracker_ref<winrt::Button> m_button{ this };
00098     // Parent BreadcrumbBarItem to ask for hidden elements
00099     winrt::weak_ref<winrt::BreadcrumbBar> m_parentBreadcrumb{ nullptr };
00100
00101     // Flyout content for ellipsis item
00102     tracker_ref<winrt::Flyout> m_ellipsisFlyout{ this };
00103     tracker_ref<winrt::ItemsRepeater> m_ellipsisItemsRepeater{ this };
00104     tracker_ref<winrt::IElementFactory> m_ellipsisDropDownItemDataTemplate{ this };
00105     com_ptr<BreadcrumbElementFactory> m_ellipsisElementFactory{ nullptr };
00106
00107     // Ellipsis dropdown item fields
00108
00109     // BreadcrumbBarItem that owns the flyout
00110     tracker_ref<winrt::BreadcrumbBarItem> m_ellipsisItem{ this };
00111
00112     // Visual State tracking
00113     uint32_t m_trackedPointerId{ 0 };
00114     bool m_isPressed{ false };
00115     bool m_isPointerOver{ false };
00116
00117     // Common item token & revoker
00118
00119     winrt::event_token m_childPreviewKeyDownToken{};
00120     RoutedEventHandler_revoker m_keyDownRevoker{};
00121
00122     // Inline item token & revokers
00123     winrt::event_token m_flowDirectionChangedToken{};
00124     winrt::Button::Loaded_revoker m_buttonLoadedRevoker{};
00125     winrt::Button::Click_revoker m_buttonClickRevoker{};
00126
00127     winrt::ItemsRepeater::ElementPrepared_revoker m_ellipsisRepeaterElementPreparedRevoker{};
00128     winrt::ItemsRepeater::ElementIndexChanged_revoker m_ellipsisRepeaterElementIndexChangedRevoker{};
00129
00130     PropertyChanged_revoker m_isPressedButtonRevoker{};
00131     PropertyChanged_revoker m_isPointerOverButtonRevoker{};
00132     PropertyChanged_revoker m_isEnabledButtonRevoker{};
00133
00134     // Ellipsis dropdown item revoker
00135
00136     IsEnabledChanged_revoker m_isEnabledChangedRevoker{};
00137
00138     // Common Visual States
00139     static constexpr std::wstring_view s_normalStateName{ L"Normal"sv };
00140     static constexpr std::wstring_view s_currentStateName{ L"Current"sv };
00141     static constexpr std::wstring_view s_pointerOverStateName{ L"PointerOver"sv };
00142     static constexpr std::wstring_view s_pressedStateName{ L"Pressed"sv };
00143     static constexpr std::wstring_view s_disabledStateName{ L"Disabled"sv };
00144
00145     // Inline Item Type Visual States
00146     static constexpr std::wstring_view s_ellipsisStateName{ L"Ellipsis"sv };
00147     static constexpr std::wstring_view s_ellipsisRTLStateName{ L"EllipsisRTL"sv };
00148     static constexpr std::wstring_view s_lastItemStateName{ L"LastItem"sv };
00149     static constexpr std::wstring_view s_defaultStateName{ L"Default"sv };
00150     static constexpr std::wstring_view s_defaultRTLStateName{ L"DefaultRTL"sv };
00151
00152     // Item Type Visual States
00153     static constexpr std::wstring_view s_inlineStateName{ L"Inline"sv };
00154     static constexpr std::wstring_view s_ellipsisDropDownStateName{ L"EllipsisDropDown"sv };
00155
00156     // Template Parts
00157     static constexpr std::wstring_view s_ellipsisItemsRepeaterPartName{ L"PART_EllipsisItemsRepeater"sv };
00158     static constexpr std::wstring_view s_itemButtonPartName{ L"PART_ItemButton"sv };
00159     static constexpr std::wstring_view s_itemEllipsisFlyoutPartName{ L"PART_EllipsisFlyout"sv };
00160
00161     // Automation Names
00162     static constexpr std::wstring_view s_ellipsisFlyoutAutomationName{ L"EllipsisFlyout"sv };
00163     static constexpr std::wstring_view s_ellipsisItemsRepeaterAutomationName{ L"EllipsisItemsRepeater"sv };
00164 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IGaussianBlurEffect Member List

This is the complete list of members for IGaussianBlurEffect, including all inherited members.
BlurAmount([out, retval] float *value) | IGaussianBlurEffect
BlurAmount([in] float value) | IGaussianBlurEffect
BorderMode([out, retval] EffectBorderMode *value) | IGaussianBlurEffect
BorderMode([in] EffectBorderMode value) | IGaussianBlurEffect
Optimization([out, retval] EffectOptimization *value) | IGaussianBlurEffect
Optimization([in] EffectOptimization value) | IGaussianBlurEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IGaussianBlurEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IGaussianBlurEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressBarTemplateSettingsProperties Member List

This is the complete list of members for ProgressBarTemplateSettingsProperties, including all inherited members.
ClearProperties() | ProgressBarTemplateSettingsProperties | [static]
ClipRect(winrt::RectangleGeometry const &value) | ProgressBarTemplateSettingsProperties |
ClipRect() | ProgressBarTemplateSettingsProperties |
ClipRectProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
Container2AnimationEndPosition(double value) | ProgressBarTemplateSettingsProperties |
Container2AnimationEndPosition() | ProgressBarTemplateSettingsProperties |
Container2AnimationEndPositionProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
Container2AnimationStartPosition(double value) | ProgressBarTemplateSettingsProperties |
Container2AnimationStartPosition() | ProgressBarTemplateSettingsProperties |
Container2AnimationStartPositionProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
ContainerAnimationEndPosition(double value) | ProgressBarTemplateSettingsProperties |
ContainerAnimationEndPosition() | ProgressBarTemplateSettingsProperties |
ContainerAnimationEndPositionProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
ContainerAnimationMidPosition(double value) | ProgressBarTemplateSettingsProperties |
ContainerAnimationMidPosition() | ProgressBarTemplateSettingsProperties |
ContainerAnimationMidPositionProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
ContainerAnimationStartPosition(double value) | ProgressBarTemplateSettingsProperties |
ContainerAnimationStartPosition() | ProgressBarTemplateSettingsProperties |
ContainerAnimationStartPositionProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
EllipseAnimationEndPosition(double value) | ProgressBarTemplateSettingsProperties |
EllipseAnimationEndPosition() | ProgressBarTemplateSettingsProperties |
EllipseAnimationEndPositionProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
EllipseAnimationWellPosition(double value) | ProgressBarTemplateSettingsProperties |
EllipseAnimationWellPosition() | ProgressBarTemplateSettingsProperties |
EllipseAnimationWellPositionProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
EllipseDiameter(double value) | ProgressBarTemplateSettingsProperties |
EllipseDiameter() | ProgressBarTemplateSettingsProperties |
EllipseDiameterProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
EllipseOffset(double value) | ProgressBarTemplateSettingsProperties |
EllipseOffset() | ProgressBarTemplateSettingsProperties |
EllipseOffsetProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
EnsureProperties() | ProgressBarTemplateSettingsProperties | [static]
IndicatorLengthDelta(double value) | ProgressBarTemplateSettingsProperties |
IndicatorLengthDelta() | ProgressBarTemplateSettingsProperties |
IndicatorLengthDeltaProperty() | ProgressBarTemplateSettingsProperties | [inline, static]
ProgressBarTemplateSettingsProperties() | ProgressBarTemplateSettingsProperties |
s_ClipRectProperty | ProgressBarTemplateSettingsProperties | [static]
s_Container2AnimationEndPositionProperty | ProgressBarTemplateSettingsProperties | [static]
s_Container2AnimationStartPositionProperty | ProgressBarTemplateSettingsProperties | [static]
s_ContainerAnimationEndPositionProperty | ProgressBarTemplateSettingsProperties | [static]
s_ContainerAnimationMidPositionProperty | ProgressBarTemplateSettingsProperties | [static]
s_ContainerAnimationStartPositionProperty | ProgressBarTemplateSettingsProperties | [static]
s_EllipseAnimationEndPositionProperty | ProgressBarTemplateSettingsProperties | [static]
s_EllipseAnimationWellPositionProperty | ProgressBarTemplateSettingsProperties | [static]
s_EllipseDiameterProperty | ProgressBarTemplateSettingsProperties | [static]
s_EllipseOffsetProperty | ProgressBarTemplateSettingsProperties | [static]
s_IndicatorLengthDeltaProperty | ProgressBarTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2AutomationPeer.h Source File

  • File List
  • File Members
  • WebView2

WebView2AutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "WebView2AutomationPeer.g.h"
00007 #include "WebView2.h"
00008 #include "UIAutomationCore.h"
00009
00010 MIDL_INTERFACE("865F5B88-6506-4E64-A4C5-4B7723650731")
00011 IAutomationPeerHwndInterop : public IUnknown
00012 {
00013 public:
00014     virtual /* [propput] */ HRESULT STDMETHODCALLTYPE GetRawElementProviderSimple(
00015         /* [retval][out] */ _Outptr_opt_ IRawElementProviderSimple** value) = 0;
00016
00017     virtual /* [propget] */ HRESULT STDMETHODCALLTYPE IsCorrectPeerForHwnd(
00018                             HWND hwnd,
00019         /* [retval][out] */ _Out_ bool* value) = 0;
00020
00021 };
00022
00023 class WebView2AutomationPeer :
00024     public ReferenceTracker<WebView2AutomationPeer, winrt::implementation::WebView2AutomationPeerT, IAutomationPeerHwndInterop>
00025 {
00026 public:
00027     WebView2AutomationPeer(winrt::WebView2 const& owner);
00028
00029     // IAutomationPeerOverrides
00030     winrt::hstring GetClassNameCore();
00031     winrt::AutomationControlType GetAutomationControlTypeCore();
00032
00033     // IAutomationPeerHwndInterop
00034     HRESULT STDMETHODCALLTYPE GetRawElementProviderSimple(_Outptr_opt_ IRawElementProviderSimple** value);
00035     HRESULT STDMETHODCALLTYPE IsCorrectPeerForHwnd(HWND hwnd, _Out_ bool* value);
00036
00037 private:
00038     com_ptr<WebView2> GetImpl();
00039     bool InitProvider();
00040
00041     com_ptr<IRawElementProviderSimple> m_provider;
00042 };
00043
00044 CppWinRTActivatableClassWithBasicFactory(WebView2AutomationPeer)
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewSelectionChangedEventArgs.cpp Source File

  • File List
  • File Members
  • ItemsView

ItemsViewSelectionChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsViewSelectionChangedEventArgs.h"
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlAxeTestPage Member List

This is the complete list of members for PagerControlAxeTestPage, including all inherited members.
PagerControlAxeTestPage() PagerControlAxeTestPage [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshContainerTests Member List

This is the complete list of members for RefreshContainerTests, including all inherited members.
BasicInteractionTest() | RefreshContainerTests | [inline]
ClassInitialize(TestContext testContext) | RefreshContainerTests | [inline, static]
InteractionOnImageTest() | RefreshContainerTests | [inline]
InteractionOnImageTestPrivate(bool withInfoProvider) | RefreshContainerTests | [inline]
InteractionOnImageWithInfoProviderTest() | RefreshContainerTests | [inline]
LogInteractionRatios() | RefreshContainerTests | [inline, private]
LogRefreshVisualizerStates() | RefreshContainerTests | [inline, private]
RefreshRequestedHandlersWorkOnEitherContainerOrVisualizerOrBoth() | RefreshContainerTests | [inline]
TestCleanup() | RefreshContainerTests | [inline]
WaitForEditValue(string editName, string editValue, bool logInteractionRatios=false) | RefreshContainerTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarFlyoutItem.properties.h Source File

  • File List
  • File Members
  • Generated

InkToolBarFlyoutItem.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class InkToolBarFlyoutItemProperties
00008 {
00009 public:
00010     InkToolBarFlyoutItemProperties();
00011
00012     void IsChecked(bool value);
00013     bool IsChecked();
00014
00015     void Kind(winrt::InkToolBarFlyoutItemKind const& value);
00016     winrt::InkToolBarFlyoutItemKind Kind();
00017
00018     static winrt::DependencyProperty IsCheckedProperty() { return s_IsCheckedProperty; }
00019     static winrt::DependencyProperty KindProperty() { return s_KindProperty; }
00020
00021     static GlobalDependencyProperty s_IsCheckedProperty;
00022     static GlobalDependencyProperty s_KindProperty;
00023
00024     winrt::event_token Checked(winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable> const& value);
00025     void Checked(winrt::event_token const& token);
00026     winrt::event_token Unchecked(winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable> const& value);
00027     void Unchecked(winrt::event_token const& token);
00028
00029     event_source<winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable>> m_checkedEventSource;
00030     event_source<winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable>> m_uncheckedEventSource;
00031
00032     static void EnsureProperties();
00033     static void ClearProperties();
00034 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBrush.properties.h Source File

  • File List
  • File Members
  • Generated

RevealBrush.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class RevealBrushProperties
00008 {
00009 public:
00010     RevealBrushProperties();
00011
00012     void AlwaysUseFallback(bool value);
00013     bool AlwaysUseFallback();
00014
00015     void Color(winrt::Color const& value);
00016     winrt::Color Color();
00017
00018     static void SetState(winrt::UIElement const& target, winrt::RevealBrushState const& value);
00019     static winrt::RevealBrushState GetState(winrt::UIElement const& target);
00020
00021     void TargetTheme(winrt::ApplicationTheme const& value);
00022     winrt::ApplicationTheme TargetTheme();
00023
00024     static winrt::DependencyProperty AlwaysUseFallbackProperty() { return s_AlwaysUseFallbackProperty; }
00025     static winrt::DependencyProperty ColorProperty() { return s_ColorProperty; }
00026     static winrt::DependencyProperty StateProperty() { return s_StateProperty; }
00027     static winrt::DependencyProperty TargetThemeProperty() { return s_TargetThemeProperty; }
00028
00029     static GlobalDependencyProperty s_AlwaysUseFallbackProperty;
00030     static GlobalDependencyProperty s_ColorProperty;
00031     static GlobalDependencyProperty s_StateProperty;
00032     static GlobalDependencyProperty s_TargetThemeProperty;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036
00037     static void OnAlwaysUseFallbackPropertyChanged(
00038         winrt::DependencyObject const& sender,
00039         winrt::DependencyPropertyChangedEventArgs const& args);
00040
00041     static void OnColorPropertyChanged(
00042         winrt::DependencyObject const& sender,
00043         winrt::DependencyPropertyChangedEventArgs const& args);
00044
00045     static void OnTargetThemePropertyChanged(
00046         winrt::DependencyObject const& sender,
00047         winrt::DependencyPropertyChangedEventArgs const& args);
00048 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApi.cpp Source File

  • File List
  • File Members
  • Lights

MaterialHelperTestApi.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MaterialHelper.h"
00007 #include "MaterialHelperTestApi.h"
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooks.cpp Source File

  • File List
  • File Members
  • Repeater

RepeaterTestHooks.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RepeaterTestHooksFactory.h"
00007 #include "layout.h"
00008
00009 /* static */
00010 int RepeaterTestHooks::s_elementFactoryElementIndex;
00011
00012 winrt::event_token RepeaterTestHooks::BuildTreeCompletedImpl(
00013     winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> const& value)
00014 {
00015     return m_buildTreeCompleted.add(value);
00016 }
00017
00018 void RepeaterTestHooks::BuildTreeCompletedImpl(winrt::event_token const& token)
00019 {
00020     m_buildTreeCompleted.remove(token);
00021 }
00022
00023 void RepeaterTestHooks::NotifyBuildTreeCompletedImpl()
00024 {
00025     m_buildTreeCompleted(nullptr, nullptr);
00026 }
00027
00028 /* static */
00029 hstring RepeaterTestHooks::GetLayoutId(winrt::IInspectable const& layout)
00030 {
00031     if (auto instance = layout.as<Layout>())
00032     {
00033         return instance->LayoutId();
00034     }
00035
00036     return L"";
00037 }
00038
00039 /* static */
00040 void RepeaterTestHooks::SetLayoutId(winrt::IInspectable const& layout, const hstring& id)
00041 {
00042     if (auto instance = layout.as<Layout>())
00043     {
00044         instance->LayoutId(id);
00045     }
00046 }
00047
00048 /* static */
00049 int RepeaterTestHooks::GetElementFactoryElementIndex()
00050 {
00051     return s_elementFactoryElementIndex;
00052 }
00053
00054 /* static */
00055 void RepeaterTestHooks::SetElementFactoryElementIndex(int index)
00056 {
00057     s_elementFactoryElementIndex = index;
00058 }
00059
00060 /* static */
00061 int RepeaterTestHooks::GetLogItemIndex()
00062 {
00063     return ItemsRepeater::GetLogItemIndex();
00064 }
00065
00066 /* static */
00067 void RepeaterTestHooks::SetLogItemIndex(int logItemIndex)
00068 {
00069     ItemsRepeater::SetLogItemIndex(logItemIndex);
00070 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MultipleTabViewPage Member List

This is the complete list of members for MultipleTabViewPage, including all inherited members.
AddNewTab(ObservableCollection< TabDataItem > itemCollection, int position=-1, TabDataItem item=null) | MultipleTabViewPage | [inline, private]
CompactTabViewItems | MultipleTabViewPage |
dataItemToTabItemDictionary | MultipleTabViewPage | [private]
FirstTabViewItems | MultipleTabViewPage |
MultipleTabViewPage() | MultipleTabViewPage | [inline]
originatingTabViewIdentifier | MultipleTabViewPage | [private]
RemoveWhitespace(string s) | MultipleTabViewPage | [inline, static]
SecondTabViewItems | MultipleTabViewPage |
SizeToContentTabViewItems | MultipleTabViewPage |
symbolIconSource | MultipleTabViewPage | [private]
tabCount | MultipleTabViewPage | [private]
tabDataItemIdentifier | MultipleTabViewPage | [private]
TabView_AddButtonClick(TabView sender, object args) | MultipleTabViewPage | [inline, private]
TabView_DragEnter(object sender, DragEventArgs args) | MultipleTabViewPage | [inline, private]
TabView_Drop(object sender, DragEventArgs args) | MultipleTabViewPage | [inline, private]
TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args) | MultipleTabViewPage | [inline, private]
TabView_TabDragStarting(TabView sender, TabViewTabDragStartingEventArgs args) | MultipleTabViewPage | [inline, private]
TabViewItem_Loaded(object sender, RoutedEventArgs e) | MultipleTabViewPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpressionAnimationStatusChange Member List

This is the complete list of members for ExpressionAnimationStatusChange, including all inherited members.
ExpressionAnimationStatusChange(bool isExpressionAnimationStarted, string propertyName) | ExpressionAnimationStatusChange | [inline]
IsExpressionAnimationStarted | ExpressionAnimationStatusChange |
PropertyName | ExpressionAnimationStatusChange |
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NestedItemsControlsPage Member List

This is the complete list of members for NestedItemsControlsPage, including all inherited members.
_outerItemsControl | NestedItemsControlsPage | [private]
ChkOuterItemsControlIsTabStop_IsCheckedChanged(object sender, RoutedEventArgs e) | NestedItemsControlsPage | [inline, private]
CmbOuterItemsControlTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedItemsControlsPage | [inline, private]
CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedItemsControlsPage | [inline, private]
CmbOuterItemsPresenterFooter_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedItemsControlsPage | [inline, private]
CmbOuterItemsPresenterHeader_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedItemsControlsPage | [inline, private]
CmbUseOuterItemsControl_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedItemsControlsPage | [inline, private]
FindElementOfTypeInSubtree< T >(DependencyObject element) | NestedItemsControlsPage | [inline, private, static]
NestedItemsControlsPage() | NestedItemsControlsPage | [inline]
NestedItemsControlsPage_Loaded(object sender, RoutedEventArgs e) | NestedItemsControlsPage | [inline, private]
UpdateOuterItemsControl() | NestedItemsControlsPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/StackLayout.properties.h Source File

  • File List
  • File Members
  • Generated

StackLayout.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class StackLayoutProperties
00008 {
00009 public:
00010     StackLayoutProperties();
00011
00012     void IsVirtualizationEnabled(bool value);
00013     bool IsVirtualizationEnabled();
00014
00015     void Orientation(winrt::Orientation const& value);
00016     winrt::Orientation Orientation();
00017
00018     void Spacing(double value);
00019     double Spacing();
00020
00021     static winrt::DependencyProperty IsVirtualizationEnabledProperty() { return s_IsVirtualizationEnabledProperty; }
00022     static winrt::DependencyProperty OrientationProperty() { return s_OrientationProperty; }
00023     static winrt::DependencyProperty SpacingProperty() { return s_SpacingProperty; }
00024
00025     static GlobalDependencyProperty s_IsVirtualizationEnabledProperty;
00026     static GlobalDependencyProperty s_OrientationProperty;
00027     static GlobalDependencyProperty s_SpacingProperty;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031
00032     static void OnIsVirtualizationEnabledPropertyChanged(
00033         winrt::DependencyObject const& sender,
00034         winrt::DependencyPropertyChangedEventArgs const& args);
00035
00036     static void OnOrientationPropertyChanged(
00037         winrt::DependencyObject const& sender,
00038         winrt::DependencyPropertyChangedEventArgs const& args);
00039
00040     static void OnSpacingPropertyChanged(
00041         winrt::DependencyObject const& sender,
00042         winrt::DependencyPropertyChangedEventArgs const& args);
00043 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerSelectedIndexChangedEventArgs.h Source File

  • File List
  • File Members
  • PipsPager

PipsPagerSelectedIndexChangedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PipsPagerSelectedIndexChangedEventArgs.g.h"
00007
00008 class PipsPagerSelectedIndexChangedEventArgs :
00009     public winrt::implementation::PipsPagerSelectedIndexChangedEventArgsT<PipsPagerSelectedIndexChangedEventArgs>
00010 {};
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterElementClearingEventArgs Member List

This is the complete list of members for ItemsRepeaterElementClearingEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ItemsRepeaterElementClearingEventArgs > &&self) noexcept | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline, static]
Element() | ItemsRepeaterElementClearingEventArgs |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< ItemsRepeaterElementClearingEventArgs > &&self) | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
IsOnThread() | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
ItemsRepeaterElementClearingEventArgs(const winrt::UIElement &element) | ItemsRepeaterElementClearingEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing > | [inline]
Update(const winrt::UIElement &element) | ItemsRepeaterElementClearingEventArgs |
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.cpp Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

RefreshInfoProviderImpl.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RefreshInfoProviderImpl.h"
00007 #include "ScrollViewerIRefreshInfoProviderAdapter.h"
00008 #include "RefreshInteractionRatioChangedEventArgs.h"
00009 #include "PTRTracing.h"
00010
00011 // There is not a lot of value in constantly firing the interaction ratio changed event as the
00012 // animations which are based off of it use the published composition property set which is
00013 // updated regularly. Instead we fire the event every 5th change to reduce overhead.
00014 #define RAISE_INTERACTION_RATIO_CHANGED_FREQUENCY 5
00015
00016 // When the user is close to a threshold point we want to make sure that we always raise
00017 // InteractionRatioChanged events so that we don't miss something important.
00018 #define ALWAYS_RAISE_INTERACTION_RATIO_TOLERANCE 0.05
00019
00020 // This is our private implementation of the IRefreshInfoProvider interface. It is contructed by
00021 // the ScrollViewerAdapter's Adapt method and returned as an instance of an IRefreshInfoProvider.
00022 // It is an InteractionTrackerOwner, the corresponding InteractionTracker is maintained in the Adapter.
00023
00024 RefreshInfoProviderImpl::RefreshInfoProviderImpl()
00025 {
00026     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00027 }
00028
00029 RefreshInfoProviderImpl::~RefreshInfoProviderImpl()
00030 {
00031     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00032 }
00033
00034 RefreshInfoProviderImpl::RefreshInfoProviderImpl(const winrt::RefreshPullDirection& refreshPullDirection, const winrt::Size& refreshVisualizerSize, const winrt::Compositor& compositor)
00035 {
00036     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00037     m_refreshPullDirection = refreshPullDirection;
00038     m_refreshVisualizerSize = refreshVisualizerSize;
00039     m_compositionProperties = compositor.CreatePropertySet();
00040 }
00041
00042 void RefreshInfoProviderImpl::UpdateIsInteractingForRefresh(bool value)
00043 {
00044     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00045     const bool isInteractingForRefresh = value && !m_peeking;
00046     if (isInteractingForRefresh != m_isInteractingForRefresh)
00047     {
00048         m_isInteractingForRefresh = isInteractingForRefresh;
00049         RaiseIsInteractingForRefreshChanged();
00050     }
00051 }
00052
00053 /////////////////////////////////////////////////////
00054 ///////   IInteractionTrackerOwnerOverrides  ////////
00055 /////////////////////////////////////////////////////
00056 void RefreshInfoProviderImpl::ValuesChanged(const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerValuesChangedArgs& args)
00057 {
00058     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_FLT_FLT_FLT, METH_NAME, this, args.Position().x, args.Position().y, args.Position().z);
00059     switch (m_refreshPullDirection)
00060     {
00061     case winrt::RefreshPullDirection::TopToBottom:
00062         RaiseInteractionRatioChanged(m_refreshVisualizerSize.Height == 0 ? 1.0 : std::min(1.0, (double)-args.Position().y / m_refreshVisualizerSize.Height));
00063         break;
00064     case winrt::RefreshPullDirection::BottomToTop:
00065         RaiseInteractionRatioChanged(m_refreshVisualizerSize.Height == 0 ? 1.0f : std::min(1.0, (double)args.Position().y / m_refreshVisualizerSize.Height));
00066         break;
00067     case winrt::RefreshPullDirection::LeftToRight:
00068         RaiseInteractionRatioChanged(m_refreshVisualizerSize.Width == 0 ? 1.0f : std::min(1.0, (double)-args.Position().x / m_refreshVisualizerSize.Width));
00069         break;
00070     case winrt::RefreshPullDirection::RightToLeft:
00071         RaiseInteractionRatioChanged(m_refreshVisualizerSize.Width == 0 ? 1.0f : std::min(1.0, (double)args.Position().x / m_refreshVisualizerSize.Width));
00072         break;
00073     default:
00074         MUX_ASSERT(false);
00075     }
00076 }
00077
00078 void RefreshInfoProviderImpl::RequestIgnored(const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerRequestIgnoredArgs& args)
00079 {
00080     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
00081 }
00082
00083 void RefreshInfoProviderImpl::InteractingStateEntered(const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerInteractingStateEnteredArgs& args)
00084 {
00085     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
00086     UpdateIsInteractingForRefresh(true);
00087 }
00088
00089 void RefreshInfoProviderImpl::InertiaStateEntered(const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerInertiaStateEnteredArgs& args)
00090 {
00091     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
00092     UpdateIsInteractingForRefresh(false);
00093 }
00094
00095 void RefreshInfoProviderImpl::IdleStateEntered(const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerIdleStateEnteredArgs& args)
00096 {
00097     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
00098 }
00099
00100 void RefreshInfoProviderImpl::CustomAnimationStateEntered(const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs& args)
00101 {
00102     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, args.RequestId());
00103 }
00104
00105 /////////////////////////////////////////////////////
00106 ////////////   IRefreshInfoProvider  ////////////////
00107 /////////////////////////////////////////////////////
00108 void RefreshInfoProviderImpl::OnRefreshStarted()
00109 {
00110     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00111     RaiseRefreshStarted();
00112 }
00113
00114 void RefreshInfoProviderImpl::OnRefreshCompleted()
00115 {
00116     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00117     RaiseRefreshCompleted();
00118 }
00119
00120 winrt::event_token RefreshInfoProviderImpl::InteractionRatioChanged(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::RefreshInteractionRatioChangedEventArgs>& handler)
00121 {
00122     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
00123     return m_InteractionRatioChangedEventSource.add(handler);
00124 }
00125
00126 void RefreshInfoProviderImpl::InteractionRatioChanged(const winrt::event_token& token)
00127 {
00128     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
00129     m_InteractionRatioChangedEventSource.remove(token);
00130 }
00131
00132 winrt::event_token RefreshInfoProviderImpl::IsInteractingForRefreshChanged(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>& handler)
00133 {
00134     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
00135     return m_IsInteractingForRefreshChangedEventSource.add(handler);
00136 }
00137
00138 void RefreshInfoProviderImpl::IsInteractingForRefreshChanged(const winrt::event_token& token)
00139 {
00140     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
00141     m_IsInteractingForRefreshChangedEventSource.remove(token);
00142 }
00143
00144 winrt::event_token RefreshInfoProviderImpl::RefreshStarted(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>& handler)
00145 {
00146     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
00147     return m_RefreshStartedEventSource.add(handler);
00148 }
00149
00150 void RefreshInfoProviderImpl::RefreshStarted(const winrt::event_token& token)
00151 {
00152     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
00153     m_RefreshStartedEventSource.remove(token);
00154 }
00155
00156 winrt::event_token RefreshInfoProviderImpl::RefreshCompleted(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>& handler)
00157 {
00158     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
00159     return m_RefreshCompletedEventSource.add(handler);
00160 }
00161
00162 void RefreshInfoProviderImpl::RefreshCompleted(const winrt::event_token& token)
00163 {
00164     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
00165     m_RefreshCompletedEventSource.remove(token);
00166 }
00167
00168 double RefreshInfoProviderImpl::ExecutionRatio()
00169 {
00170     return m_executionRatio;
00171 }
00172
00173 winrt::hstring RefreshInfoProviderImpl::InteractionRatioCompositionProperty()
00174 {
00175     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00176     return m_interactionRatioCompositionProperty;
00177 }
00178
00179 winrt::CompositionPropertySet RefreshInfoProviderImpl::CompositionProperties()
00180 {
00181     return m_compositionProperties;
00182 }
00183
00184 bool RefreshInfoProviderImpl::IsInteractingForRefresh()
00185 {
00186     return m_isInteractingForRefresh;
00187 }
00188
00189 /////////////////////////////////////////////////////
00190 ///////////       Private Helpers       /////////////
00191 /////////////////////////////////////////////////////
00192 void RefreshInfoProviderImpl::RaiseInteractionRatioChanged(double interactionRatio)
00193 {
00194     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, interactionRatio);
00195
00196     m_compositionProperties.InsertScalar(m_interactionRatioCompositionProperty, static_cast<float>(interactionRatio));
00197
00198     if (m_interactionRatioChangedCount == 0 || AreClose(interactionRatio, 0.0) || AreClose(interactionRatio, m_executionRatio))
00199     {
00200         if (m_InteractionRatioChangedEventSource)
00201         {
00202             auto interactionRatioChangedArgs = winrt::make<RefreshInteractionRatioChangedEventArgs>(interactionRatio);
00203             m_InteractionRatioChangedEventSource(*this, interactionRatioChangedArgs);
00204         }
00205         m_interactionRatioChangedCount = 1;
00206     }
00207     else if (m_interactionRatioChangedCount >= RAISE_INTERACTION_RATIO_CHANGED_FREQUENCY)
00208     {
00209         m_interactionRatioChangedCount = 0;
00210     }
00211     else
00212     {
00213         m_interactionRatioChangedCount++;
00214     }
00215 }
00216
00217 bool RefreshInfoProviderImpl::AreClose(double interactionRatio, double target)
00218 {
00219     return abs(interactionRatio - target) < ALWAYS_RAISE_INTERACTION_RATIO_TOLERANCE;
00220 }
00221
00222 void RefreshInfoProviderImpl::RaiseIsInteractingForRefreshChanged()
00223 {
00224     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00225     m_IsInteractingForRefreshChangedEventSource(*this, nullptr);
00226 }
00227
00228 void RefreshInfoProviderImpl::RaiseRefreshStarted()
00229 {
00230     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00231     m_RefreshStartedEventSource(*this, nullptr);
00232 }
00233
00234 void RefreshInfoProviderImpl::RaiseRefreshCompleted()
00235 {
00236     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00237     m_RefreshCompletedEventSource(*this, nullptr);
00238 }
00239
00240 void RefreshInfoProviderImpl::SetPeekingMode(bool peeking)
00241 {
00242     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, peeking);
00243     m_peeking = peeking;
00244 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ViewChange.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ViewChange.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ScrollPresenterTypeLogging.h"
00008 #include "ViewChange.h"
00009
00010 ViewChange::ViewChange(
00011     ScrollPresenterViewKind viewKind,
00012     winrt::IInspectable const& options)
00013     : m_viewKind(viewKind)
00014     , m_options(options)
00015 {
00016     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR_STR, METH_NAME, this,
00017         options,
00018         TypeLogging::ScrollPresenterViewKindToString(viewKind).c_str());
00019 }
00020
00021 ViewChange::~ViewChange()
00022 {
00023     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00024 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarPage Member List

This is the complete list of members for BreadcrumbBarPage, including all inherited members.
BreadcrumbBarPage() | BreadcrumbBarPage | [inline]
BreadcrumbControl_ItemClicked(BreadcrumbBar sender, Microsoft.UI.Xaml.Controls.BreadcrumbBarItemClickedEventArgs args) | BreadcrumbBarPage | [inline, private]
breadCrumbList | BreadcrumbBarPage |
Child_ElementPrepared(object sender, ItemsRepeaterElementPreparedEventArgs e) | BreadcrumbBarPage | [inline, private]
CreateChildrenForNode(TreeNode node, int depth) | BreadcrumbBarPage | [inline, private]
currentNodeChildrenList | BreadcrumbBarPage |
GenerateTree() | BreadcrumbBarPage | [inline, private]
GenerateTreeDynamic() | BreadcrumbBarPage | [inline, private]
InitializeBreadcrumbAndChildren() | BreadcrumbBarPage | [inline, private]
ItemsRepeater_ButtonClick(object sender, RoutedEventArgs e) | BreadcrumbBarPage | [inline, private]
maxDepth | BreadcrumbBarPage | [private]
ReplaceList(ObservableCollection< object > oldItemsList, List< object > newItemsList) | BreadcrumbBarPage | [inline, private]
RTL_Checked(object sender, RoutedEventArgs e) | BreadcrumbBarPage | [inline, private]
RTL_Unchecked(object sender, RoutedEventArgs e) | BreadcrumbBarPage | [inline, private]
Tree | BreadcrumbBarPage | [private]
UpdateChildrenList(TreeNode node) | BreadcrumbBarPage | [inline, private]
WidthSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) | BreadcrumbBarPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WinRTCollection::VectorChangedEventArgs Member List

This is the complete list of members for WinRTCollection::VectorChangedEventArgs, including all inherited members.
CollectionChange | WinRTCollection::VectorChangedEventArgs |
Index | WinRTCollection::VectorChangedEventArgs |
VectorChangedEventArgs(CollectionChange change, uint index) | WinRTCollection::VectorChangedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollPresenter.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollPresenter.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollPresenter.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ScrollPresenter)
00012 }
00013
00014 #include "ScrollPresenter.g.cpp"
00015
00016 GlobalDependencyProperty ScrollPresenterProperties::s_BackgroundProperty{ nullptr };
00017 GlobalDependencyProperty ScrollPresenterProperties::s_ComputedHorizontalScrollModeProperty{ nullptr };
00018 GlobalDependencyProperty ScrollPresenterProperties::s_ComputedVerticalScrollModeProperty{ nullptr };
00019 GlobalDependencyProperty ScrollPresenterProperties::s_ContentProperty{ nullptr };
00020 GlobalDependencyProperty ScrollPresenterProperties::s_ContentOrientationProperty{ nullptr };
00021 GlobalDependencyProperty ScrollPresenterProperties::s_HorizontalAnchorRatioProperty{ nullptr };
00022 GlobalDependencyProperty ScrollPresenterProperties::s_HorizontalScrollChainModeProperty{ nullptr };
00023 GlobalDependencyProperty ScrollPresenterProperties::s_HorizontalScrollModeProperty{ nullptr };
00024 GlobalDependencyProperty ScrollPresenterProperties::s_HorizontalScrollRailModeProperty{ nullptr };
00025 GlobalDependencyProperty ScrollPresenterProperties::s_IgnoredInputKindsProperty{ nullptr };
00026 GlobalDependencyProperty ScrollPresenterProperties::s_MaxZoomFactorProperty{ nullptr };
00027 GlobalDependencyProperty ScrollPresenterProperties::s_MinZoomFactorProperty{ nullptr };
00028 GlobalDependencyProperty ScrollPresenterProperties::s_VerticalAnchorRatioProperty{ nullptr };
00029 GlobalDependencyProperty ScrollPresenterProperties::s_VerticalScrollChainModeProperty{ nullptr };
00030 GlobalDependencyProperty ScrollPresenterProperties::s_VerticalScrollModeProperty{ nullptr };
00031 GlobalDependencyProperty ScrollPresenterProperties::s_VerticalScrollRailModeProperty{ nullptr };
00032 GlobalDependencyProperty ScrollPresenterProperties::s_ZoomChainModeProperty{ nullptr };
00033 GlobalDependencyProperty ScrollPresenterProperties::s_ZoomModeProperty{ nullptr };
00034
00035 ScrollPresenterProperties::ScrollPresenterProperties()
00036     : m_anchorRequestedEventSource{static_cast<ScrollPresenter*>(this)}
00037     , m_bringingIntoViewEventSource{static_cast<ScrollPresenter*>(this)}
00038     , m_extentChangedEventSource{static_cast<ScrollPresenter*>(this)}
00039     , m_scrollAnimationStartingEventSource{static_cast<ScrollPresenter*>(this)}
00040     , m_scrollCompletedEventSource{static_cast<ScrollPresenter*>(this)}
00041     , m_scrollStartingEventSource{static_cast<ScrollPresenter*>(this)}
00042     , m_stateChangedEventSource{static_cast<ScrollPresenter*>(this)}
00043     , m_viewChangedEventSource{static_cast<ScrollPresenter*>(this)}
00044     , m_zoomAnimationStartingEventSource{static_cast<ScrollPresenter*>(this)}
00045     , m_zoomCompletedEventSource{static_cast<ScrollPresenter*>(this)}
00046     , m_zoomStartingEventSource{static_cast<ScrollPresenter*>(this)}
00047 {
00048     EnsureProperties();
00049 }
00050
00051 void ScrollPresenterProperties::EnsureProperties()
00052 {
00053     if (!s_BackgroundProperty)
00054     {
00055         s_BackgroundProperty =
00056             InitializeDependencyProperty(
00057                 L"Background",
00058                 winrt::name_of<winrt::Brush>(),
00059                 winrt::name_of<winrt::ScrollPresenter>(),
00060                 false /* isAttached */,
00061                 ValueHelper<winrt::Brush>::BoxedDefaultValue(),
00062                 winrt::PropertyChangedCallback(&OnBackgroundPropertyChanged));
00063     }
00064     if (!s_ComputedHorizontalScrollModeProperty)
00065     {
00066         s_ComputedHorizontalScrollModeProperty =
00067             InitializeDependencyProperty(
00068                 L"ComputedHorizontalScrollMode",
00069                 winrt::name_of<winrt::ScrollingScrollMode>(),
00070                 winrt::name_of<winrt::ScrollPresenter>(),
00071                 false /* isAttached */,
00072                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultComputedHorizontalScrollMode),
00073                 winrt::PropertyChangedCallback(&OnComputedHorizontalScrollModePropertyChanged));
00074     }
00075     if (!s_ComputedVerticalScrollModeProperty)
00076     {
00077         s_ComputedVerticalScrollModeProperty =
00078             InitializeDependencyProperty(
00079                 L"ComputedVerticalScrollMode",
00080                 winrt::name_of<winrt::ScrollingScrollMode>(),
00081                 winrt::name_of<winrt::ScrollPresenter>(),
00082                 false /* isAttached */,
00083                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultComputedVerticalScrollMode),
00084                 winrt::PropertyChangedCallback(&OnComputedVerticalScrollModePropertyChanged));
00085     }
00086     if (!s_ContentProperty)
00087     {
00088         s_ContentProperty =
00089             InitializeDependencyProperty(
00090                 L"Content",
00091                 winrt::name_of<winrt::UIElement>(),
00092                 winrt::name_of<winrt::ScrollPresenter>(),
00093                 false /* isAttached */,
00094                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00095                 winrt::PropertyChangedCallback(&OnContentPropertyChanged));
00096     }
00097     if (!s_ContentOrientationProperty)
00098     {
00099         s_ContentOrientationProperty =
00100             InitializeDependencyProperty(
00101                 L"ContentOrientation",
00102                 winrt::name_of<winrt::ScrollingContentOrientation>(),
00103                 winrt::name_of<winrt::ScrollPresenter>(),
00104                 false /* isAttached */,
00105                 ValueHelper<winrt::ScrollingContentOrientation>::BoxValueIfNecessary(ScrollPresenter::s_defaultContentOrientation),
00106                 winrt::PropertyChangedCallback(&OnContentOrientationPropertyChanged));
00107     }
00108     if (!s_HorizontalAnchorRatioProperty)
00109     {
00110         s_HorizontalAnchorRatioProperty =
00111             InitializeDependencyProperty(
00112                 L"HorizontalAnchorRatio",
00113                 winrt::name_of<double>(),
00114                 winrt::name_of<winrt::ScrollPresenter>(),
00115                 false /* isAttached */,
00116                 ValueHelper<double>::BoxValueIfNecessary(ScrollPresenter::s_defaultAnchorRatio),
00117                 winrt::PropertyChangedCallback(&OnHorizontalAnchorRatioPropertyChanged));
00118     }
00119     if (!s_HorizontalScrollChainModeProperty)
00120     {
00121         s_HorizontalScrollChainModeProperty =
00122             InitializeDependencyProperty(
00123                 L"HorizontalScrollChainMode",
00124                 winrt::name_of<winrt::ScrollingChainMode>(),
00125                 winrt::name_of<winrt::ScrollPresenter>(),
00126                 false /* isAttached */,
00127                 ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultHorizontalScrollChainMode),
00128                 winrt::PropertyChangedCallback(&OnHorizontalScrollChainModePropertyChanged));
00129     }
00130     if (!s_HorizontalScrollModeProperty)
00131     {
00132         s_HorizontalScrollModeProperty =
00133             InitializeDependencyProperty(
00134                 L"HorizontalScrollMode",
00135                 winrt::name_of<winrt::ScrollingScrollMode>(),
00136                 winrt::name_of<winrt::ScrollPresenter>(),
00137                 false /* isAttached */,
00138                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultHorizontalScrollMode),
00139                 winrt::PropertyChangedCallback(&OnHorizontalScrollModePropertyChanged));
00140     }
00141     if (!s_HorizontalScrollRailModeProperty)
00142     {
00143         s_HorizontalScrollRailModeProperty =
00144             InitializeDependencyProperty(
00145                 L"HorizontalScrollRailMode",
00146                 winrt::name_of<winrt::ScrollingRailMode>(),
00147                 winrt::name_of<winrt::ScrollPresenter>(),
00148                 false /* isAttached */,
00149                 ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultHorizontalScrollRailMode),
00150                 winrt::PropertyChangedCallback(&OnHorizontalScrollRailModePropertyChanged));
00151     }
00152     if (!s_IgnoredInputKindsProperty)
00153     {
00154         s_IgnoredInputKindsProperty =
00155             InitializeDependencyProperty(
00156                 L"IgnoredInputKinds",
00157                 winrt::name_of<winrt::ScrollingInputKinds>(),
00158                 winrt::name_of<winrt::ScrollPresenter>(),
00159                 false /* isAttached */,
00160                 ValueHelper<winrt::ScrollingInputKinds>::BoxValueIfNecessary(ScrollPresenter::s_defaultIgnoredInputKinds),
00161                 winrt::PropertyChangedCallback(&OnIgnoredInputKindsPropertyChanged));
00162     }
00163     if (!s_MaxZoomFactorProperty)
00164     {
00165         s_MaxZoomFactorProperty =
00166             InitializeDependencyProperty(
00167                 L"MaxZoomFactor",
00168                 winrt::name_of<double>(),
00169                 winrt::name_of<winrt::ScrollPresenter>(),
00170                 false /* isAttached */,
00171                 ValueHelper<double>::BoxValueIfNecessary(ScrollPresenter::s_defaultMaxZoomFactor),
00172                 winrt::PropertyChangedCallback(&OnMaxZoomFactorPropertyChanged));
00173     }
00174     if (!s_MinZoomFactorProperty)
00175     {
00176         s_MinZoomFactorProperty =
00177             InitializeDependencyProperty(
00178                 L"MinZoomFactor",
00179                 winrt::name_of<double>(),
00180                 winrt::name_of<winrt::ScrollPresenter>(),
00181                 false /* isAttached */,
00182                 ValueHelper<double>::BoxValueIfNecessary(ScrollPresenter::s_defaultMinZoomFactor),
00183                 winrt::PropertyChangedCallback(&OnMinZoomFactorPropertyChanged));
00184     }
00185     if (!s_VerticalAnchorRatioProperty)
00186     {
00187         s_VerticalAnchorRatioProperty =
00188             InitializeDependencyProperty(
00189                 L"VerticalAnchorRatio",
00190                 winrt::name_of<double>(),
00191                 winrt::name_of<winrt::ScrollPresenter>(),
00192                 false /* isAttached */,
00193                 ValueHelper<double>::BoxValueIfNecessary(ScrollPresenter::s_defaultAnchorRatio),
00194                 winrt::PropertyChangedCallback(&OnVerticalAnchorRatioPropertyChanged));
00195     }
00196     if (!s_VerticalScrollChainModeProperty)
00197     {
00198         s_VerticalScrollChainModeProperty =
00199             InitializeDependencyProperty(
00200                 L"VerticalScrollChainMode",
00201                 winrt::name_of<winrt::ScrollingChainMode>(),
00202                 winrt::name_of<winrt::ScrollPresenter>(),
00203                 false /* isAttached */,
00204                 ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultVerticalScrollChainMode),
00205                 winrt::PropertyChangedCallback(&OnVerticalScrollChainModePropertyChanged));
00206     }
00207     if (!s_VerticalScrollModeProperty)
00208     {
00209         s_VerticalScrollModeProperty =
00210             InitializeDependencyProperty(
00211                 L"VerticalScrollMode",
00212                 winrt::name_of<winrt::ScrollingScrollMode>(),
00213                 winrt::name_of<winrt::ScrollPresenter>(),
00214                 false /* isAttached */,
00215                 ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultVerticalScrollMode),
00216                 winrt::PropertyChangedCallback(&OnVerticalScrollModePropertyChanged));
00217     }
00218     if (!s_VerticalScrollRailModeProperty)
00219     {
00220         s_VerticalScrollRailModeProperty =
00221             InitializeDependencyProperty(
00222                 L"VerticalScrollRailMode",
00223                 winrt::name_of<winrt::ScrollingRailMode>(),
00224                 winrt::name_of<winrt::ScrollPresenter>(),
00225                 false /* isAttached */,
00226                 ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultVerticalScrollRailMode),
00227                 winrt::PropertyChangedCallback(&OnVerticalScrollRailModePropertyChanged));
00228     }
00229     if (!s_ZoomChainModeProperty)
00230     {
00231         s_ZoomChainModeProperty =
00232             InitializeDependencyProperty(
00233                 L"ZoomChainMode",
00234                 winrt::name_of<winrt::ScrollingChainMode>(),
00235                 winrt::name_of<winrt::ScrollPresenter>(),
00236                 false /* isAttached */,
00237                 ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultZoomChainMode),
00238                 winrt::PropertyChangedCallback(&OnZoomChainModePropertyChanged));
00239     }
00240     if (!s_ZoomModeProperty)
00241     {
00242         s_ZoomModeProperty =
00243             InitializeDependencyProperty(
00244                 L"ZoomMode",
00245                 winrt::name_of<winrt::ScrollingZoomMode>(),
00246                 winrt::name_of<winrt::ScrollPresenter>(),
00247                 false /* isAttached */,
00248                 ValueHelper<winrt::ScrollingZoomMode>::BoxValueIfNecessary(ScrollPresenter::s_defaultZoomMode),
00249                 winrt::PropertyChangedCallback(&OnZoomModePropertyChanged));
00250     }
00251 }
00252
00253 void ScrollPresenterProperties::ClearProperties()
00254 {
00255     s_BackgroundProperty = nullptr;
00256     s_ComputedHorizontalScrollModeProperty = nullptr;
00257     s_ComputedVerticalScrollModeProperty = nullptr;
00258     s_ContentProperty = nullptr;
00259     s_ContentOrientationProperty = nullptr;
00260     s_HorizontalAnchorRatioProperty = nullptr;
00261     s_HorizontalScrollChainModeProperty = nullptr;
00262     s_HorizontalScrollModeProperty = nullptr;
00263     s_HorizontalScrollRailModeProperty = nullptr;
00264     s_IgnoredInputKindsProperty = nullptr;
00265     s_MaxZoomFactorProperty = nullptr;
00266     s_MinZoomFactorProperty = nullptr;
00267     s_VerticalAnchorRatioProperty = nullptr;
00268     s_VerticalScrollChainModeProperty = nullptr;
00269     s_VerticalScrollModeProperty = nullptr;
00270     s_VerticalScrollRailModeProperty = nullptr;
00271     s_ZoomChainModeProperty = nullptr;
00272     s_ZoomModeProperty = nullptr;
00273 }
00274
00275 void ScrollPresenterProperties::OnBackgroundPropertyChanged(
00276     winrt::DependencyObject const& sender,
00277     winrt::DependencyPropertyChangedEventArgs const& args)
00278 {
00279     auto owner = sender.as<winrt::ScrollPresenter>();
00280     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00281 }
00282
00283 void ScrollPresenterProperties::OnComputedHorizontalScrollModePropertyChanged(
00284     winrt::DependencyObject const& sender,
00285     winrt::DependencyPropertyChangedEventArgs const& args)
00286 {
00287     auto owner = sender.as<winrt::ScrollPresenter>();
00288     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00289 }
00290
00291 void ScrollPresenterProperties::OnComputedVerticalScrollModePropertyChanged(
00292     winrt::DependencyObject const& sender,
00293     winrt::DependencyPropertyChangedEventArgs const& args)
00294 {
00295     auto owner = sender.as<winrt::ScrollPresenter>();
00296     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00297 }
00298
00299 void ScrollPresenterProperties::OnContentPropertyChanged(
00300     winrt::DependencyObject const& sender,
00301     winrt::DependencyPropertyChangedEventArgs const& args)
00302 {
00303     auto owner = sender.as<winrt::ScrollPresenter>();
00304     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00305 }
00306
00307 void ScrollPresenterProperties::OnContentOrientationPropertyChanged(
00308     winrt::DependencyObject const& sender,
00309     winrt::DependencyPropertyChangedEventArgs const& args)
00310 {
00311     auto owner = sender.as<winrt::ScrollPresenter>();
00312     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00313 }
00314
00315 void ScrollPresenterProperties::OnHorizontalAnchorRatioPropertyChanged(
00316     winrt::DependencyObject const& sender,
00317     winrt::DependencyPropertyChangedEventArgs const& args)
00318 {
00319     auto owner = sender.as<winrt::ScrollPresenter>();
00320
00321     auto value = winrt::unbox_value<double>(args.NewValue());
00322     auto coercedValue = value;
00323     winrt::get_self<ScrollPresenter>(owner)->ValidateAnchorRatio(coercedValue);
00324     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00325     {
00326         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00327         return;
00328     }
00329
00330     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00331 }
00332
00333 void ScrollPresenterProperties::OnHorizontalScrollChainModePropertyChanged(
00334     winrt::DependencyObject const& sender,
00335     winrt::DependencyPropertyChangedEventArgs const& args)
00336 {
00337     auto owner = sender.as<winrt::ScrollPresenter>();
00338     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00339 }
00340
00341 void ScrollPresenterProperties::OnHorizontalScrollModePropertyChanged(
00342     winrt::DependencyObject const& sender,
00343     winrt::DependencyPropertyChangedEventArgs const& args)
00344 {
00345     auto owner = sender.as<winrt::ScrollPresenter>();
00346     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00347 }
00348
00349 void ScrollPresenterProperties::OnHorizontalScrollRailModePropertyChanged(
00350     winrt::DependencyObject const& sender,
00351     winrt::DependencyPropertyChangedEventArgs const& args)
00352 {
00353     auto owner = sender.as<winrt::ScrollPresenter>();
00354     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00355 }
00356
00357 void ScrollPresenterProperties::OnIgnoredInputKindsPropertyChanged(
00358     winrt::DependencyObject const& sender,
00359     winrt::DependencyPropertyChangedEventArgs const& args)
00360 {
00361     auto owner = sender.as<winrt::ScrollPresenter>();
00362     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00363 }
00364
00365 void ScrollPresenterProperties::OnMaxZoomFactorPropertyChanged(
00366     winrt::DependencyObject const& sender,
00367     winrt::DependencyPropertyChangedEventArgs const& args)
00368 {
00369     auto owner = sender.as<winrt::ScrollPresenter>();
00370
00371     auto value = winrt::unbox_value<double>(args.NewValue());
00372     auto coercedValue = value;
00373     winrt::get_self<ScrollPresenter>(owner)->ValidateZoomFactoryBoundary(coercedValue);
00374     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00375     {
00376         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00377         return;
00378     }
00379
00380     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00381 }
00382
00383 void ScrollPresenterProperties::OnMinZoomFactorPropertyChanged(
00384     winrt::DependencyObject const& sender,
00385     winrt::DependencyPropertyChangedEventArgs const& args)
00386 {
00387     auto owner = sender.as<winrt::ScrollPresenter>();
00388
00389     auto value = winrt::unbox_value<double>(args.NewValue());
00390     auto coercedValue = value;
00391     winrt::get_self<ScrollPresenter>(owner)->ValidateZoomFactoryBoundary(coercedValue);
00392     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00393     {
00394         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00395         return;
00396     }
00397
00398     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00399 }
00400
00401 void ScrollPresenterProperties::OnVerticalAnchorRatioPropertyChanged(
00402     winrt::DependencyObject const& sender,
00403     winrt::DependencyPropertyChangedEventArgs const& args)
00404 {
00405     auto owner = sender.as<winrt::ScrollPresenter>();
00406
00407     auto value = winrt::unbox_value<double>(args.NewValue());
00408     auto coercedValue = value;
00409     winrt::get_self<ScrollPresenter>(owner)->ValidateAnchorRatio(coercedValue);
00410     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00411     {
00412         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00413         return;
00414     }
00415
00416     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00417 }
00418
00419 void ScrollPresenterProperties::OnVerticalScrollChainModePropertyChanged(
00420     winrt::DependencyObject const& sender,
00421     winrt::DependencyPropertyChangedEventArgs const& args)
00422 {
00423     auto owner = sender.as<winrt::ScrollPresenter>();
00424     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00425 }
00426
00427 void ScrollPresenterProperties::OnVerticalScrollModePropertyChanged(
00428     winrt::DependencyObject const& sender,
00429     winrt::DependencyPropertyChangedEventArgs const& args)
00430 {
00431     auto owner = sender.as<winrt::ScrollPresenter>();
00432     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00433 }
00434
00435 void ScrollPresenterProperties::OnVerticalScrollRailModePropertyChanged(
00436     winrt::DependencyObject const& sender,
00437     winrt::DependencyPropertyChangedEventArgs const& args)
00438 {
00439     auto owner = sender.as<winrt::ScrollPresenter>();
00440     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00441 }
00442
00443 void ScrollPresenterProperties::OnZoomChainModePropertyChanged(
00444     winrt::DependencyObject const& sender,
00445     winrt::DependencyPropertyChangedEventArgs const& args)
00446 {
00447     auto owner = sender.as<winrt::ScrollPresenter>();
00448     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00449 }
00450
00451 void ScrollPresenterProperties::OnZoomModePropertyChanged(
00452     winrt::DependencyObject const& sender,
00453     winrt::DependencyPropertyChangedEventArgs const& args)
00454 {
00455     auto owner = sender.as<winrt::ScrollPresenter>();
00456     winrt::get_self<ScrollPresenter>(owner)->OnPropertyChanged(args);
00457 }
00458
00459 void ScrollPresenterProperties::Background(winrt::Brush const& value)
00460 {
00461     [[gsl::suppress(con)]]
00462     {
00463     static_cast<ScrollPresenter*>(this)->SetValue(s_BackgroundProperty, ValueHelper<winrt::Brush>::BoxValueIfNecessary(value));
00464     }
00465 }
00466
00467 winrt::Brush ScrollPresenterProperties::Background()
00468 {
00469     return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_BackgroundProperty));
00470 }
00471
00472 void ScrollPresenterProperties::ComputedHorizontalScrollMode(winrt::ScrollingScrollMode const& value)
00473 {
00474     [[gsl::suppress(con)]]
00475     {
00476     static_cast<ScrollPresenter*>(this)->SetValue(s_ComputedHorizontalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00477     }
00478 }
00479
00480 winrt::ScrollingScrollMode ScrollPresenterProperties::ComputedHorizontalScrollMode()
00481 {
00482     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_ComputedHorizontalScrollModeProperty));
00483 }
00484
00485 void ScrollPresenterProperties::ComputedVerticalScrollMode(winrt::ScrollingScrollMode const& value)
00486 {
00487     [[gsl::suppress(con)]]
00488     {
00489     static_cast<ScrollPresenter*>(this)->SetValue(s_ComputedVerticalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00490     }
00491 }
00492
00493 winrt::ScrollingScrollMode ScrollPresenterProperties::ComputedVerticalScrollMode()
00494 {
00495     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_ComputedVerticalScrollModeProperty));
00496 }
00497
00498 void ScrollPresenterProperties::Content(winrt::UIElement const& value)
00499 {
00500     [[gsl::suppress(con)]]
00501     {
00502     static_cast<ScrollPresenter*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00503     }
00504 }
00505
00506 winrt::UIElement ScrollPresenterProperties::Content()
00507 {
00508     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_ContentProperty));
00509 }
00510
00511 void ScrollPresenterProperties::ContentOrientation(winrt::ScrollingContentOrientation const& value)
00512 {
00513     [[gsl::suppress(con)]]
00514     {
00515     static_cast<ScrollPresenter*>(this)->SetValue(s_ContentOrientationProperty, ValueHelper<winrt::ScrollingContentOrientation>::BoxValueIfNecessary(value));
00516     }
00517 }
00518
00519 winrt::ScrollingContentOrientation ScrollPresenterProperties::ContentOrientation()
00520 {
00521     return ValueHelper<winrt::ScrollingContentOrientation>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_ContentOrientationProperty));
00522 }
00523
00524 void ScrollPresenterProperties::HorizontalAnchorRatio(double value)
00525 {
00526     [[gsl::suppress(con)]]
00527     {
00528     double coercedValue = value;
00529     static_cast<ScrollPresenter*>(this)->ValidateAnchorRatio(coercedValue);
00530     static_cast<ScrollPresenter*>(this)->SetValue(s_HorizontalAnchorRatioProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00531     }
00532 }
00533
00534 double ScrollPresenterProperties::HorizontalAnchorRatio()
00535 {
00536     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_HorizontalAnchorRatioProperty));
00537 }
00538
00539 void ScrollPresenterProperties::HorizontalScrollChainMode(winrt::ScrollingChainMode const& value)
00540 {
00541     [[gsl::suppress(con)]]
00542     {
00543     static_cast<ScrollPresenter*>(this)->SetValue(s_HorizontalScrollChainModeProperty, ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(value));
00544     }
00545 }
00546
00547 winrt::ScrollingChainMode ScrollPresenterProperties::HorizontalScrollChainMode()
00548 {
00549     return ValueHelper<winrt::ScrollingChainMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_HorizontalScrollChainModeProperty));
00550 }
00551
00552 void ScrollPresenterProperties::HorizontalScrollMode(winrt::ScrollingScrollMode const& value)
00553 {
00554     [[gsl::suppress(con)]]
00555     {
00556     static_cast<ScrollPresenter*>(this)->SetValue(s_HorizontalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00557     }
00558 }
00559
00560 winrt::ScrollingScrollMode ScrollPresenterProperties::HorizontalScrollMode()
00561 {
00562     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_HorizontalScrollModeProperty));
00563 }
00564
00565 void ScrollPresenterProperties::HorizontalScrollRailMode(winrt::ScrollingRailMode const& value)
00566 {
00567     [[gsl::suppress(con)]]
00568     {
00569     static_cast<ScrollPresenter*>(this)->SetValue(s_HorizontalScrollRailModeProperty, ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(value));
00570     }
00571 }
00572
00573 winrt::ScrollingRailMode ScrollPresenterProperties::HorizontalScrollRailMode()
00574 {
00575     return ValueHelper<winrt::ScrollingRailMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_HorizontalScrollRailModeProperty));
00576 }
00577
00578 void ScrollPresenterProperties::IgnoredInputKinds(winrt::ScrollingInputKinds const& value)
00579 {
00580     [[gsl::suppress(con)]]
00581     {
00582     static_cast<ScrollPresenter*>(this)->SetValue(s_IgnoredInputKindsProperty, ValueHelper<winrt::ScrollingInputKinds>::BoxValueIfNecessary(value));
00583     }
00584 }
00585
00586 winrt::ScrollingInputKinds ScrollPresenterProperties::IgnoredInputKinds()
00587 {
00588     return ValueHelper<winrt::ScrollingInputKinds>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_IgnoredInputKindsProperty));
00589 }
00590
00591 void ScrollPresenterProperties::MaxZoomFactor(double value)
00592 {
00593     [[gsl::suppress(con)]]
00594     {
00595     double coercedValue = value;
00596     static_cast<ScrollPresenter*>(this)->ValidateZoomFactoryBoundary(coercedValue);
00597     static_cast<ScrollPresenter*>(this)->SetValue(s_MaxZoomFactorProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00598     }
00599 }
00600
00601 double ScrollPresenterProperties::MaxZoomFactor()
00602 {
00603     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_MaxZoomFactorProperty));
00604 }
00605
00606 void ScrollPresenterProperties::MinZoomFactor(double value)
00607 {
00608     [[gsl::suppress(con)]]
00609     {
00610     double coercedValue = value;
00611     static_cast<ScrollPresenter*>(this)->ValidateZoomFactoryBoundary(coercedValue);
00612     static_cast<ScrollPresenter*>(this)->SetValue(s_MinZoomFactorProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00613     }
00614 }
00615
00616 double ScrollPresenterProperties::MinZoomFactor()
00617 {
00618     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_MinZoomFactorProperty));
00619 }
00620
00621 void ScrollPresenterProperties::VerticalAnchorRatio(double value)
00622 {
00623     [[gsl::suppress(con)]]
00624     {
00625     double coercedValue = value;
00626     static_cast<ScrollPresenter*>(this)->ValidateAnchorRatio(coercedValue);
00627     static_cast<ScrollPresenter*>(this)->SetValue(s_VerticalAnchorRatioProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00628     }
00629 }
00630
00631 double ScrollPresenterProperties::VerticalAnchorRatio()
00632 {
00633     return ValueHelper<double>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_VerticalAnchorRatioProperty));
00634 }
00635
00636 void ScrollPresenterProperties::VerticalScrollChainMode(winrt::ScrollingChainMode const& value)
00637 {
00638     [[gsl::suppress(con)]]
00639     {
00640     static_cast<ScrollPresenter*>(this)->SetValue(s_VerticalScrollChainModeProperty, ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(value));
00641     }
00642 }
00643
00644 winrt::ScrollingChainMode ScrollPresenterProperties::VerticalScrollChainMode()
00645 {
00646     return ValueHelper<winrt::ScrollingChainMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_VerticalScrollChainModeProperty));
00647 }
00648
00649 void ScrollPresenterProperties::VerticalScrollMode(winrt::ScrollingScrollMode const& value)
00650 {
00651     [[gsl::suppress(con)]]
00652     {
00653     static_cast<ScrollPresenter*>(this)->SetValue(s_VerticalScrollModeProperty, ValueHelper<winrt::ScrollingScrollMode>::BoxValueIfNecessary(value));
00654     }
00655 }
00656
00657 winrt::ScrollingScrollMode ScrollPresenterProperties::VerticalScrollMode()
00658 {
00659     return ValueHelper<winrt::ScrollingScrollMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_VerticalScrollModeProperty));
00660 }
00661
00662 void ScrollPresenterProperties::VerticalScrollRailMode(winrt::ScrollingRailMode const& value)
00663 {
00664     [[gsl::suppress(con)]]
00665     {
00666     static_cast<ScrollPresenter*>(this)->SetValue(s_VerticalScrollRailModeProperty, ValueHelper<winrt::ScrollingRailMode>::BoxValueIfNecessary(value));
00667     }
00668 }
00669
00670 winrt::ScrollingRailMode ScrollPresenterProperties::VerticalScrollRailMode()
00671 {
00672     return ValueHelper<winrt::ScrollingRailMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_VerticalScrollRailModeProperty));
00673 }
00674
00675 void ScrollPresenterProperties::ZoomChainMode(winrt::ScrollingChainMode const& value)
00676 {
00677     [[gsl::suppress(con)]]
00678     {
00679     static_cast<ScrollPresenter*>(this)->SetValue(s_ZoomChainModeProperty, ValueHelper<winrt::ScrollingChainMode>::BoxValueIfNecessary(value));
00680     }
00681 }
00682
00683 winrt::ScrollingChainMode ScrollPresenterProperties::ZoomChainMode()
00684 {
00685     return ValueHelper<winrt::ScrollingChainMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_ZoomChainModeProperty));
00686 }
00687
00688 void ScrollPresenterProperties::ZoomMode(winrt::ScrollingZoomMode const& value)
00689 {
00690     [[gsl::suppress(con)]]
00691     {
00692     static_cast<ScrollPresenter*>(this)->SetValue(s_ZoomModeProperty, ValueHelper<winrt::ScrollingZoomMode>::BoxValueIfNecessary(value));
00693     }
00694 }
00695
00696 winrt::ScrollingZoomMode ScrollPresenterProperties::ZoomMode()
00697 {
00698     return ValueHelper<winrt::ScrollingZoomMode>::CastOrUnbox(static_cast<ScrollPresenter*>(this)->GetValue(s_ZoomModeProperty));
00699 }
00700
00701 winrt::event_token ScrollPresenterProperties::AnchorRequested(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingAnchorRequestedEventArgs> const& value)
00702 {
00703     return m_anchorRequestedEventSource.add(value);
00704 }
00705
00706 void ScrollPresenterProperties::AnchorRequested(winrt::event_token const& token)
00707 {
00708     m_anchorRequestedEventSource.remove(token);
00709 }
00710
00711 winrt::event_token ScrollPresenterProperties::BringingIntoView(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingBringingIntoViewEventArgs> const& value)
00712 {
00713     return m_bringingIntoViewEventSource.add(value);
00714 }
00715
00716 void ScrollPresenterProperties::BringingIntoView(winrt::event_token const& token)
00717 {
00718     m_bringingIntoViewEventSource.remove(token);
00719 }
00720
00721 winrt::event_token ScrollPresenterProperties::ExtentChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value)
00722 {
00723     return m_extentChangedEventSource.add(value);
00724 }
00725
00726 void ScrollPresenterProperties::ExtentChanged(winrt::event_token const& token)
00727 {
00728     m_extentChangedEventSource.remove(token);
00729 }
00730
00731 winrt::event_token ScrollPresenterProperties::ScrollAnimationStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollAnimationStartingEventArgs> const& value)
00732 {
00733     return m_scrollAnimationStartingEventSource.add(value);
00734 }
00735
00736 void ScrollPresenterProperties::ScrollAnimationStarting(winrt::event_token const& token)
00737 {
00738     m_scrollAnimationStartingEventSource.remove(token);
00739 }
00740
00741 winrt::event_token ScrollPresenterProperties::ScrollCompleted(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs> const& value)
00742 {
00743     return m_scrollCompletedEventSource.add(value);
00744 }
00745
00746 void ScrollPresenterProperties::ScrollCompleted(winrt::event_token const& token)
00747 {
00748     m_scrollCompletedEventSource.remove(token);
00749 }
00750
00751 winrt::event_token ScrollPresenterProperties::ScrollStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs> const& value)
00752 {
00753     return m_scrollStartingEventSource.add(value);
00754 }
00755
00756 void ScrollPresenterProperties::ScrollStarting(winrt::event_token const& token)
00757 {
00758     m_scrollStartingEventSource.remove(token);
00759 }
00760
00761 winrt::event_token ScrollPresenterProperties::StateChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value)
00762 {
00763     return m_stateChangedEventSource.add(value);
00764 }
00765
00766 void ScrollPresenterProperties::StateChanged(winrt::event_token const& token)
00767 {
00768     m_stateChangedEventSource.remove(token);
00769 }
00770
00771 winrt::event_token ScrollPresenterProperties::ViewChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value)
00772 {
00773     return m_viewChangedEventSource.add(value);
00774 }
00775
00776 void ScrollPresenterProperties::ViewChanged(winrt::event_token const& token)
00777 {
00778     m_viewChangedEventSource.remove(token);
00779 }
00780
00781 winrt::event_token ScrollPresenterProperties::ZoomAnimationStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs> const& value)
00782 {
00783     return m_zoomAnimationStartingEventSource.add(value);
00784 }
00785
00786 void ScrollPresenterProperties::ZoomAnimationStarting(winrt::event_token const& token)
00787 {
00788     m_zoomAnimationStartingEventSource.remove(token);
00789 }
00790
00791 winrt::event_token ScrollPresenterProperties::ZoomCompleted(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs> const& value)
00792 {
00793     return m_zoomCompletedEventSource.add(value);
00794 }
00795
00796 void ScrollPresenterProperties::ZoomCompleted(winrt::event_token const& token)
00797 {
00798     m_zoomCompletedEventSource.remove(token);
00799 }
00800
00801 winrt::event_token ScrollPresenterProperties::ZoomStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs> const& value)
00802 {
00803     return m_zoomStartingEventSource.add(value);
00804 }
00805
00806 void ScrollPresenterProperties::ZoomStarting(winrt::event_token const& token)
00807 {
00808     m_zoomStartingEventSource.remove(token);
00809 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ToggleSplitButtonAutomationPeer.h Source File

  • File List
  • File Members
  • SplitButton

ToggleSplitButtonAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ToggleSplitButton.h"
00007 #include "ToggleSplitButtonAutomationPeer.g.h"
00008
00009 class ToggleSplitButtonAutomationPeer :
00010     public ReferenceTracker<ToggleSplitButtonAutomationPeer, winrt::implementation::ToggleSplitButtonAutomationPeerT>
00011 {
00012
00013 public:
00014     ToggleSplitButtonAutomationPeer(winrt::ToggleSplitButton const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     hstring GetClassNameCore();
00019     winrt::AutomationControlType GetAutomationControlTypeCore();
00020
00021     // IExpandCollapseProvider
00022     winrt::ExpandCollapseState ExpandCollapseState();
00023     void Expand();
00024     void Collapse();
00025
00026     // IToggleProvider
00027     winrt::ToggleState ToggleState();
00028     void Toggle();
00029
00030 private:
00031     com_ptr<ToggleSplitButton> GetImpl();
00032 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollBarController.cpp Source File

  • File List
  • File Members
  • ScrollView

ScrollBarController.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollingScrollOptions.h"
00007 #include "ScrollBarController.h"
00008 #include "ScrollView.h"
00009 #include "TypeLogging.h"
00010 #include "ScrollPresenterTypeLogging.h"
00011 #include "ScrollControllerScrollToRequestedEventArgs.h"
00012 #include "ScrollControllerScrollByRequestedEventArgs.h"
00013 #include "ScrollControllerAddScrollVelocityRequestedEventArgs.h"
00014
00015 ScrollBarController::ScrollBarController()
00016 {
00017     SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00018 }
00019
00020 ScrollBarController::~ScrollBarController()
00021 {
00022     SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00023
00024     UnhookScrollBarEvent();
00025     UnhookScrollBarPropertyChanged();
00026 }
00027
00028 void ScrollBarController::SetScrollBar(const winrt::ScrollBar& scrollBar)
00029 {
00030     SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00031
00032     UnhookScrollBarEvent();
00033
00034     m_scrollBar = scrollBar;
00035
00036     HookScrollBarEvent();
00037     HookScrollBarPropertyChanged();
00038 }
00039
00040 #pragma region IScrollController
00041
00042 winrt::IScrollControllerPanningInfo ScrollBarController::PanningInfo()
00043 {
00044     return nullptr;
00045 }
00046
00047 bool ScrollBarController::CanScroll()
00048 {
00049     return m_canScroll;
00050 }
00051
00052 bool ScrollBarController::IsScrollingWithMouse()
00053 {
00054     return m_isScrollingWithMouse;
00055 }
00056
00057 void ScrollBarController::SetIsScrollable(
00058     bool isScrollable)
00059 {
00060     SCROLLVIEW_TRACE_INFO(
00061         nullptr,
00062         TRACE_MSG_METH_INT,
00063         METH_NAME,
00064         this,
00065         isScrollable);
00066     m_isScrollable = isScrollable;
00067
00068     UpdateCanScroll();
00069 }
00070
00071 void ScrollBarController::SetValues(
00072     double minOffset,
00073     double maxOffset,
00074     double offset,
00075     double viewportLength)
00076 {
00077     SCROLLVIEW_TRACE_INFO(
00078         nullptr,
00079         L"%s[0x%p](minOffset:%lf, maxOffset:%lf, offset:%lf, viewportLength:%lf, operationsCount:%d)\n",
00080         METH_NAME,
00081         this,
00082         minOffset,
00083         maxOffset,
00084         offset,
00085         viewportLength,
00086         m_operationsCount);
00087
00088     if (maxOffset < minOffset)
00089     {
00090         throw winrt::hresult_invalid_argument(L"maxOffset cannot be smaller than minOffset.");
00091     }
00092
00093     if (viewportLength < 0.0)
00094     {
00095         throw winrt::hresult_invalid_argument(L"viewportLength cannot be negative.");
00096     }
00097
00098     offset = max(minOffset, offset);
00099     offset = min(maxOffset, offset);
00100     m_lastOffset = offset;
00101
00102     MUX_ASSERT(m_scrollBar);
00103
00104     if (minOffset < m_scrollBar.Minimum())
00105     {
00106         m_scrollBar.Minimum(minOffset);
00107     }
00108
00109     if (maxOffset > m_scrollBar.Maximum())
00110     {
00111         m_scrollBar.Maximum(maxOffset);
00112     }
00113
00114     if (minOffset != m_scrollBar.Minimum())
00115     {
00116         m_scrollBar.Minimum(minOffset);
00117     }
00118
00119     if (maxOffset != m_scrollBar.Maximum())
00120     {
00121         m_scrollBar.Maximum(maxOffset);
00122     }
00123
00124     m_scrollBar.ViewportSize(viewportLength);
00125     m_scrollBar.LargeChange(viewportLength);
00126     m_scrollBar.SmallChange(max(1.0, viewportLength / s_defaultViewportToSmallChangeRatio));
00127
00128     // The ScrollBar Value is only updated when there is no operation in progress otherwise the Scroll
00129     // event handler, ScrollBarScroll, may initiate a new request impeding the on-going operation.
00130     if (m_operationsCount == 0 || m_scrollBar.Value() < minOffset || m_scrollBar.Value() > maxOffset)
00131     {
00132         m_scrollBar.Value(offset);
00133         m_lastScrollBarValue = offset;
00134     }
00135
00136     // Potentially changed ScrollBar.Minimum / ScrollBar.Maximum value(s) may have an effect
00137     // on the read-only IScrollController.CanScroll property.
00138     UpdateCanScroll();
00139 }
00140
00141 winrt::CompositionAnimation ScrollBarController::GetScrollAnimation(
00142     int correlationId,
00143     winrt::float2 const& startPosition,
00144     winrt::float2 const& endPosition,
00145     winrt::CompositionAnimation const& defaultAnimation)
00146 {
00147     SCROLLVIEW_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, correlationId);
00148
00149     // Using the consumer's default animation.
00150     return nullptr;
00151 }
00152
00153 void ScrollBarController::NotifyRequestedScrollCompleted(
00154     int correlationId)
00155 {
00156     SCROLLVIEW_TRACE_INFO(
00157         nullptr,
00158         TRACE_MSG_METH_INT,
00159         METH_NAME,
00160         this,
00161         correlationId);
00162
00163     MUX_ASSERT(m_operationsCount > 0);
00164     m_operationsCount--;
00165
00166     if (m_operationsCount == 0 && m_scrollBar && m_scrollBar.Value() != m_lastOffset)
00167     {
00168         m_scrollBar.Value(m_lastOffset);
00169         m_lastScrollBarValue = m_lastOffset;
00170     }
00171 }
00172
00173 winrt::event_token ScrollBarController::ScrollToRequested(winrt::TypedEventHandler<winrt::IScrollController, winrt::ScrollControllerScrollToRequestedEventArgs> const& value)
00174 {
00175     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00176
00177     return m_scrollToRequested.add(value);
00178 }
00179
00180 void ScrollBarController::ScrollToRequested(winrt::event_token const& token)
00181 {
00182     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00183
00184     m_scrollToRequested.remove(token);
00185 }
00186
00187 winrt::event_token ScrollBarController::ScrollByRequested(winrt::TypedEventHandler<winrt::IScrollController, winrt::ScrollControllerScrollByRequestedEventArgs> const& value)
00188 {
00189     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00190
00191     return m_scrollByRequested.add(value);
00192 }
00193
00194 void ScrollBarController::ScrollByRequested(winrt::event_token const& token)
00195 {
00196     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00197
00198     m_scrollByRequested.remove(token);
00199 }
00200
00201 winrt::event_token ScrollBarController::AddScrollVelocityRequested(winrt::TypedEventHandler<winrt::IScrollController, winrt::ScrollControllerAddScrollVelocityRequestedEventArgs> const& value)
00202 {
00203     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00204
00205     return m_addScrollVelocityRequested.add(value);
00206 }
00207
00208 void ScrollBarController::AddScrollVelocityRequested(winrt::event_token const& token)
00209 {
00210     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00211
00212     m_addScrollVelocityRequested.remove(token);
00213 }
00214
00215 winrt::event_token ScrollBarController::CanScrollChanged(winrt::TypedEventHandler<winrt::IScrollController, winrt::IInspectable> const& value)
00216 {
00217     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00218
00219     return m_canScrollChanged.add(value);
00220 }
00221
00222 void ScrollBarController::CanScrollChanged(winrt::event_token const& token)
00223 {
00224     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00225
00226     m_canScrollChanged.remove(token);
00227 }
00228
00229 winrt::event_token ScrollBarController::IsScrollingWithMouseChanged(winrt::TypedEventHandler<winrt::IScrollController, winrt::IInspectable> const& value)
00230 {
00231     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00232
00233     return m_isScrollingWithMouseChanged.add(value);
00234 }
00235
00236 void ScrollBarController::IsScrollingWithMouseChanged(winrt::event_token const& token)
00237 {
00238     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00239
00240     m_isScrollingWithMouseChanged.remove(token);
00241 }
00242
00243 #pragma endregion
00244
00245 void ScrollBarController::HookScrollBarPropertyChanged()
00246 {
00247     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00248
00249 #ifdef DBG
00250     MUX_ASSERT(m_scrollBarIndicatorModeChangedToken.value == 0);
00251     MUX_ASSERT(m_scrollBarVisibilityChangedToken.value == 0);
00252 #endif //DBG
00253     MUX_ASSERT(m_scrollBarIsEnabledChangedToken.value == 0);
00254
00255     if (m_scrollBar)
00256     {
00257 #ifdef DBG
00258         m_scrollBarIndicatorModeChangedToken.value = m_scrollBar.RegisterPropertyChangedCallback(
00259             winrt::ScrollBar::IndicatorModeProperty(), { this, &ScrollBarController::OnScrollBarPropertyChanged });
00260
00261         m_scrollBarVisibilityChangedToken.value = m_scrollBar.RegisterPropertyChangedCallback(
00262             winrt::UIElement::VisibilityProperty(), { this, &ScrollBarController::OnScrollBarPropertyChanged });
00263 #endif //DBG
00264
00265         m_scrollBarIsEnabledChangedToken.value = m_scrollBar.RegisterPropertyChangedCallback(
00266             winrt::Control::IsEnabledProperty(), { this, &ScrollBarController::OnScrollBarPropertyChanged });
00267     }
00268 }
00269
00270 void ScrollBarController::UnhookScrollBarPropertyChanged()
00271 {
00272     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00273
00274     if (m_scrollBar)
00275     {
00276 #ifdef DBG
00277         if (m_scrollBarIndicatorModeChangedToken.value != 0)
00278         {
00279             m_scrollBar.UnregisterPropertyChangedCallback(winrt::ScrollBar::IndicatorModeProperty(), m_scrollBarIndicatorModeChangedToken.value);
00280             m_scrollBarIndicatorModeChangedToken.value = 0;
00281         }
00282
00283         if (m_scrollBarVisibilityChangedToken.value != 0)
00284         {
00285             m_scrollBar.UnregisterPropertyChangedCallback(winrt::UIElement::VisibilityProperty(), m_scrollBarVisibilityChangedToken.value);
00286             m_scrollBarVisibilityChangedToken.value = 0;
00287         }
00288 #endif //DBG
00289
00290         if (m_scrollBarIsEnabledChangedToken.value != 0)
00291         {
00292             m_scrollBar.UnregisterPropertyChangedCallback(winrt::Control::IsEnabledProperty(), m_scrollBarIsEnabledChangedToken.value);
00293             m_scrollBarIsEnabledChangedToken.value = 0;
00294         }
00295     }
00296 }
00297
00298 void ScrollBarController::UpdateCanScroll()
00299 {
00300     const bool oldCanScroll = m_canScroll;
00301
00302     m_canScroll =
00303         m_scrollBar &&
00304         m_scrollBar.Parent() &&
00305         m_scrollBar.IsEnabled() &&
00306         m_scrollBar.Maximum() > m_scrollBar.Minimum() &&
00307         m_isScrollable;
00308
00309     if (oldCanScroll != m_canScroll)
00310     {
00311         RaiseCanScrollChanged();
00312     }
00313 }
00314
00315 void ScrollBarController::HookScrollBarEvent()
00316 {
00317     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00318
00319     MUX_ASSERT(m_scrollBarScrollToken.value == 0);
00320
00321     if (m_scrollBar)
00322     {
00323         m_scrollBarScrollToken = m_scrollBar.Scroll({ this, &ScrollBarController::OnScroll });
00324     }
00325 }
00326
00327 void ScrollBarController::UnhookScrollBarEvent()
00328 {
00329     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00330
00331     if (m_scrollBar && m_scrollBarScrollToken.value != 0)
00332     {
00333         m_scrollBar.Scroll(m_scrollBarScrollToken);
00334         m_scrollBarScrollToken.value = 0;
00335     }
00336 }
00337
00338 void ScrollBarController::OnScrollBarPropertyChanged(
00339     const winrt::DependencyObject& /*sender*/,
00340     const winrt::DependencyProperty& args)
00341 {
00342     MUX_ASSERT(m_scrollBar);
00343
00344     if (args == winrt::Control::IsEnabledProperty())
00345     {
00346         SCROLLVIEW_TRACE_VERBOSE(
00347             nullptr,
00348             TRACE_MSG_METH_STR_INT,
00349             METH_NAME,
00350             this,
00351             L"IsEnabled",
00352             m_scrollBar.IsEnabled());
00353
00354         UpdateCanScroll();
00355     }
00356 #ifdef DBG
00357     else if (args == winrt::UIElement::VisibilityProperty())
00358     {
00359         SCROLLVIEW_TRACE_VERBOSE(
00360             nullptr,
00361             TRACE_MSG_METH_STR_INT,
00362             METH_NAME,
00363             this,
00364             L"Visibility",
00365             m_scrollBar.Visibility());
00366     }
00367     else if (args == winrt::ScrollBar::IndicatorModeProperty())
00368     {
00369         SCROLLVIEW_TRACE_VERBOSE(
00370             nullptr,
00371             TRACE_MSG_METH_STR_STR,
00372             METH_NAME,
00373             this,
00374             L"IndicatorMode",
00375             TypeLogging::ScrollingIndicatorModeToString(m_scrollBar.IndicatorMode()).c_str());
00376     }
00377 #endif //DBG
00378 }
00379
00380 void ScrollBarController::OnScroll(
00381     const winrt::IInspectable& /*sender*/,
00382     const winrt::ScrollEventArgs& args)
00383 {
00384     const auto scrollEventType = args.ScrollEventType();
00385
00386     SCROLLVIEW_TRACE_VERBOSE(
00387         nullptr,
00388         TRACE_MSG_METH_STR,
00389         METH_NAME,
00390         this,
00391         TypeLogging::ScrollEventTypeToString(scrollEventType).c_str());
00392
00393     if (!m_scrollBar)
00394     {
00395         return;
00396     }
00397
00398     if (!m_isScrollable && scrollEventType != winrt::ScrollEventType::ThumbPosition)
00399     {
00400         // This ScrollBar is not interactive. Restore its previous Value.
00401         m_scrollBar.Value(m_lastScrollBarValue);
00402         return;
00403     }
00404
00405     switch (scrollEventType)
00406     {
00407     case winrt::ScrollEventType::First:
00408     case winrt::ScrollEventType::Last:
00409     {
00410         break;
00411     }
00412     case winrt::ScrollEventType::EndScroll:
00413     {
00414         if (m_isScrollingWithMouse)
00415         {
00416             m_isScrollingWithMouse = false;
00417             RaiseIsScrollingWithMouseChanged();
00418         }
00419         break;
00420     }
00421     case winrt::ScrollEventType::LargeDecrement:
00422     case winrt::ScrollEventType::LargeIncrement:
00423     case winrt::ScrollEventType::SmallDecrement:
00424     case winrt::ScrollEventType::SmallIncrement:
00425     case winrt::ScrollEventType::ThumbPosition:
00426     case winrt::ScrollEventType::ThumbTrack:
00427     {
00428         if (scrollEventType == winrt::ScrollEventType::ThumbTrack)
00429         {
00430             if (!m_isScrollingWithMouse)
00431             {
00432                 m_isScrollingWithMouse = true;
00433                 RaiseIsScrollingWithMouseChanged();
00434             }
00435         }
00436
00437         bool offsetChangeRequested = false;
00438
00439         if (scrollEventType == winrt::ScrollEventType::ThumbPosition ||
00440             scrollEventType == winrt::ScrollEventType::ThumbTrack)
00441         {
00442             offsetChangeRequested = RaiseScrollToRequested(args.NewValue());
00443         }
00444         else
00445         {
00446             double offsetChange = 0.0;
00447
00448             switch (scrollEventType)
00449             {
00450             case winrt::ScrollEventType::LargeDecrement:
00451                 offsetChange = -min(m_lastScrollBarValue - m_scrollBar.Minimum(), m_scrollBar.LargeChange());
00452                 break;
00453             case winrt::ScrollEventType::LargeIncrement:
00454                 offsetChange = min(m_scrollBar.Maximum() - m_lastScrollBarValue, m_scrollBar.LargeChange());
00455                 break;
00456             case winrt::ScrollEventType::SmallDecrement:
00457                 offsetChange = -min(m_lastScrollBarValue - m_scrollBar.Minimum(), m_scrollBar.SmallChange());
00458                 break;
00459             case winrt::ScrollEventType::SmallIncrement:
00460                 offsetChange = min(m_scrollBar.Maximum() - m_lastScrollBarValue, m_scrollBar.SmallChange());
00461                 break;
00462             }
00463
00464             // When the requested Value is near the Mininum or Maximum, include a little additional velocity
00465             // to ensure the extreme value is reached.
00466             if (args.NewValue() - m_scrollBar.Minimum() < s_minMaxEpsilon)
00467             {
00468                 MUX_ASSERT(offsetChange < 0.0);
00469                 offsetChange -= s_minMaxEpsilon;
00470             }
00471             else if (m_scrollBar.Maximum() - args.NewValue() < s_minMaxEpsilon)
00472             {
00473                 MUX_ASSERT(offsetChange > 0.0);
00474                 offsetChange += s_minMaxEpsilon;
00475             }
00476
00477             if (SharedHelpers::IsAnimationsEnabled())
00478             {
00479                 offsetChangeRequested = RaiseAddScrollVelocityRequested(offsetChange);
00480             }
00481             else
00482             {
00483                 offsetChangeRequested = RaiseScrollByRequested(offsetChange);
00484             }
00485         }
00486
00487         if (!offsetChangeRequested)
00488         {
00489             // This request could not be requested, restore the previous Value.
00490             m_scrollBar.Value(m_lastScrollBarValue);
00491         }
00492         break;
00493     }
00494     }
00495
00496     m_lastScrollBarValue = m_scrollBar.Value();
00497 }
00498
00499 bool ScrollBarController::RaiseScrollToRequested(
00500     double offset)
00501 {
00502     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, offset);
00503
00504     if (!m_scrollToRequested)
00505     {
00506         return false;
00507     }
00508
00509     auto options = winrt::make_self<ScrollingScrollOptions>(
00510         winrt::ScrollingAnimationMode::Disabled,
00511         winrt::ScrollingSnapPointsMode::Ignore);
00512
00513     auto scrollToRequestedEventArgs = winrt::make_self<ScrollControllerScrollToRequestedEventArgs>(
00514         offset,
00515         *options);
00516
00517     m_scrollToRequested(*this, *scrollToRequestedEventArgs);
00518
00519     // The CorrelationId property was set by the ScrollToRequested event handler.
00520     // Typically it is set to a new unique value, but it may also be set to the ID
00521     // from the prior request. This occurs when a request is quickly raised before
00522     // the prior one was handed off to the Composition layer. The back-to-back requests
00523     // are then coalesced into a single operation handed off to the Composition layer.
00524     int32_t offsetChangeCorrelationId = scrollToRequestedEventArgs.as<winrt::ScrollControllerScrollToRequestedEventArgs>().CorrelationId();
00525
00526     if (offsetChangeCorrelationId != -1)
00527     {
00528         // Only increment m_operationsCount when the returned CorrelationId represents a new request that was not coalesced with a pending request.
00529         if (offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollTo)
00530         {
00531             m_lastOffsetChangeCorrelationIdForScrollTo = offsetChangeCorrelationId;
00532             m_operationsCount++;
00533         }
00534
00535         return true;
00536     }
00537
00538     return false;
00539 }
00540
00541 bool ScrollBarController::RaiseScrollByRequested(
00542     double offsetChange)
00543 {
00544     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, offsetChange);
00545
00546     if (!m_scrollByRequested)
00547     {
00548         return false;
00549     }
00550
00551     auto options = winrt::make_self<ScrollingScrollOptions>(
00552         winrt::ScrollingAnimationMode::Disabled,
00553         winrt::ScrollingSnapPointsMode::Ignore);
00554
00555     auto scrollByRequestedEventArgs = winrt::make_self<ScrollControllerScrollByRequestedEventArgs>(
00556         offsetChange,
00557         *options);
00558
00559     m_scrollByRequested(*this, *scrollByRequestedEventArgs);
00560
00561     // The CorrelationId property was set by the ScrollByRequested event handler.
00562     // Typically it is set to a new unique value, but it may also be set to the ID
00563     // from the prior request. This occurs when a request is quickly raised before
00564     // the prior one was handed off to the Composition layer. The back-to-back requests
00565     // are then coalesced into a single operation handed off to the Composition layer.
00566     int32_t offsetChangeCorrelationId = scrollByRequestedEventArgs.as<winrt::ScrollControllerScrollByRequestedEventArgs>().CorrelationId();
00567
00568     if (offsetChangeCorrelationId != -1)
00569     {
00570         // Only increment m_operationsCount when the returned CorrelationId represents a new request that was not coalesced with a pending request.
00571         if (offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollBy)
00572         {
00573             m_lastOffsetChangeCorrelationIdForScrollBy = offsetChangeCorrelationId;
00574             m_operationsCount++;
00575         }
00576
00577         return true;
00578     }
00579
00580     return false;
00581 }
00582
00583 bool ScrollBarController::RaiseAddScrollVelocityRequested(
00584     double offsetChange)
00585 {
00586     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, offsetChange);
00587
00588     if (!m_addScrollVelocityRequested)
00589     {
00590         return false;
00591     }
00592
00593     winrt::IInspectable inertiaDecayRateAsInsp = box_value(s_inertiaDecayRate);
00594     winrt::IReference<float> inertiaDecayRate = inertiaDecayRateAsInsp.as<winrt::IReference<float>>();
00595
00596     auto addScrollVelocityRequestedEventArgs = winrt::make_self<ScrollControllerAddScrollVelocityRequestedEventArgs>(
00597         static_cast<float>(offsetChange * s_velocityNeededPerPixel),
00598         inertiaDecayRate);
00599
00600     m_addScrollVelocityRequested(*this, *addScrollVelocityRequestedEventArgs);
00601
00602     // The CorrelationId property was set by the AddScrollVelocityRequested event handler.
00603     // Typically it is set to a new unique value, but it may also be set to the ID
00604     // from the prior request. This occurs when a request is quickly raised before
00605     // the prior one was handed off to the Composition layer. The back-to-back requests
00606     // are then coalesced into a single operation handed off to the Composition layer.
00607     int32_t offsetChangeCorrelationId = addScrollVelocityRequestedEventArgs.as<winrt::ScrollControllerAddScrollVelocityRequestedEventArgs>().CorrelationId();
00608
00609     if (offsetChangeCorrelationId != -1)
00610     {
00611         // Only increment m_operationsCount when the returned CorrelationId represents a new request that was not coalesced with a pending request.
00612         if (offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForAddScrollVelocity)
00613         {
00614             m_lastOffsetChangeCorrelationIdForAddScrollVelocity = offsetChangeCorrelationId;
00615             m_operationsCount++;
00616         }
00617
00618         return true;
00619     }
00620
00621     return false;
00622 }
00623
00624 void ScrollBarController::RaiseCanScrollChanged()
00625 {
00626     if (!m_canScrollChanged)
00627     {
00628         return;
00629     }
00630
00631     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00632
00633     m_canScrollChanged(*this, nullptr);
00634 }
00635
00636 void ScrollBarController::RaiseIsScrollingWithMouseChanged()
00637 {
00638     if (!m_isScrollingWithMouseChanged)
00639     {
00640         return;
00641     }
00642
00643     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00644
00645     m_isScrollingWithMouseChanged(*this, nullptr);
00646 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NullableXamlType Member List

This is the complete list of members for NullableXamlType, including all inherited members.
ActivateInstance() | XamlTypeBase |
AddDPMember(wstring_view const &name, wstring_view const &memberTypeName, winrt::DependencyProperty const &dp, bool isContent) | XamlTypeBase |
AddMember(wstring_view const &name, wstring_view const &memberTypeName, std::function< winrt::IInspectable(const winrt::IInspectable &)> getter, std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> setter, bool isContent, bool isDependencyProperty, bool isAttachable) | XamlTypeBase |
AddToMap(winrt::IInspectable const &instance, winrt::IInspectable const &key, winrt::IInspectable const &value) | XamlTypeBase |
AddToVector(winrt::IInspectable const &instance, winrt::IInspectable const &value) | XamlTypeBase |
BaseType() | XamlTypeBase |
BoxedType() | XamlTypeBase |
ContentProperty() | XamlTypeBase |
CreateFromString(winrt::hstring const &value) | XamlTypeBase |
FullName() | XamlTypeBase |
GetMember(winrt::hstring const &name) | XamlTypeBase |
IsArray() | XamlTypeBase |
IsBindable() | XamlTypeBase |
IsCollection() | XamlTypeBase |
IsConstructible() | XamlTypeBase |
IsDictionary() | XamlTypeBase |
IsMarkupExtension() | XamlTypeBase |
ItemType() | XamlTypeBase |
KeyType() | XamlTypeBase |
m_activator | XamlTypeBase | [protected]
m_addToMap | XamlTypeBase | [protected]
m_collectionAdd | XamlTypeBase | [protected]
m_contentProperty | XamlTypeBase | [protected]
m_createFromString | XamlTypeBase | [protected]
m_isBindable | XamlTypeBase | [protected]
m_isSystemType | XamlTypeBase | [protected]
m_members | XamlTypeBase | [protected]
m_typeName | XamlTypeBase | [protected]
NullableXamlType(wstring_view const &typeName, wstring_view const &valueTypeName) | NullableXamlType |
RunInitializer() | XamlTypeBase |
UnderlyingType() | XamlTypeBase |
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs Member List

This is the complete list of members for LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs, including all inherited members.
InvalidationTrigger() | LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs |
LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs(winrt::LinedFlowLayoutInvalidationTrigger const &invalidationTrigger) | LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs |
m_invalidationTrigger | LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs | [private]
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshContainerProperties Member List

This is the complete list of members for RefreshContainerProperties, including all inherited members.
ClearProperties() | RefreshContainerProperties | [static]
EnsureProperties() | RefreshContainerProperties | [static]
m_refreshRequestedEventSource | RefreshContainerProperties |
OnPullDirectionPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshContainerProperties | [static]
OnVisualizerPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshContainerProperties | [static]
PullDirection(winrt::RefreshPullDirection const &value) | RefreshContainerProperties |
PullDirection() | RefreshContainerProperties |
PullDirectionProperty() | RefreshContainerProperties | [inline, static]
RefreshContainerProperties() | RefreshContainerProperties |
RefreshRequested(winrt::TypedEventHandler< winrt::RefreshContainer, winrt::RefreshRequestedEventArgs > const &value) | RefreshContainerProperties |
RefreshRequested(winrt::event_token const &token) | RefreshContainerProperties |
s_PullDirectionProperty | RefreshContainerProperties | [static]
s_VisualizerProperty | RefreshContainerProperties | [static]
Visualizer(winrt::RefreshVisualizer const &value) | RefreshContainerProperties |
Visualizer() | RefreshContainerProperties |
VisualizerProperty() | RefreshContainerProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterDynamicPage Member List

This is the complete list of members for ScrollPresenterDynamicPage, including all inherited members.
AppendAsyncEventMessage(string asyncEventMessage) | ScrollPresenterDynamicPage | [inline, private]
AppendAsyncEventMessage() | ScrollPresenterDynamicPage | [inline, private]
asyncEventReportingLock | ScrollPresenterDynamicPage | [private]
border | ScrollPresenterDynamicPage | [private]
BtnAddIrregularSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnAddRepeatedSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnAddScrollVelocity_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnAddZoomVelocity_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnCancelAddScrollVelocity_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnCancelAddZoomVelocity_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnCancelScroll_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnCancelZoom_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnChangeView_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnClearScrollPresenterEvents_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnClearSnapPoints_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnCopyScrollPresenterEvents_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnCreateDynamicScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnDiscardQueuedOperations_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnExecuteQueuedOperations_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetActualHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetActualWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetArrangeRenderSizesDelta_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentActualHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentActualWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentDesiredSize_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentLayoutOffsetX_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentLayoutOffsetY_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentMinHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentMinWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentPadding_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentRenderSize_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetExtentHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetExtentWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetHorizontalOffset_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMaxPosition_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMaxPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMaxZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMinPosition_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMinPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetMinZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetPosition_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetState_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetVerticalOffset_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetViewportHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetViewportWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnGetZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnParentDynamicScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnParentMarkupScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentMargin_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentMinHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentMinWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentPadding_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueContentWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueMaxZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueMinZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnQueueWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnReleaseDynamicScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnScrollBy_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnScrollTo_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentLayoutOffsetX_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentLayoutOffsetY_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentMargin_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentMinHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentMinWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentPadding_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetContentWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMaxHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMaxPosition_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMaxPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMaxWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMaxZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMinPosition_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMinPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetMinZoomFactor_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetPositionExpressionAnimationExpression_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnSetWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnUnparentDynamicScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnUnparentMarkupScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnUnparentReparentMarkupScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnUseDynamicScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnUseMarkupScrollPresenter_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnZoomBy_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
BtnZoomTo_Click(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
button | ScrollPresenterDynamicPage | [private]
ChangeView(ScrollPresenter scrollPresenter, double?horizontalOffset, double?verticalOffset, float?zoomFactor, bool disableAnimation) | ScrollPresenterDynamicPage | [inline, private]
ChkContentProperties_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkContentProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogContentEffectiveViewportChangedEvent_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogContentEffectiveViewportChangedEvent_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogContentPointerEvents_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogContentPointerEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkPageMethods_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkPageMethods_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterEvents_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterMethods_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterMethods_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterProperties_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterProperties_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterTestHooks_Checked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ChkScrollPresenterTestHooks_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbContent_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbContentHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbContentManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbContentOrientation_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbContentVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbHorizontalScrollChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbHorizontalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbHorizontalScrollRailMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbIgnoredInputKinds_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbScrollPresenterManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbSnapPointKind_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbVerticalScrollChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbVerticalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbVerticalScrollRailMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbZoomChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
CmbZoomMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
ComputeHorizontalPositionFromOffset(double offset) | ScrollPresenterDynamicPage | [inline, private]
ComputeMinHorizontalPosition(float zoomFactor) | ScrollPresenterDynamicPage | [inline, private]
ComputeMinVerticalPosition(float zoomFactor) | ScrollPresenterDynamicPage | [inline, private]
ComputeVerticalPositionFromOffset(double offset) | ScrollPresenterDynamicPage | [inline, private]
Content_EffectiveViewportChanged(FrameworkElement sender, EffectiveViewportChangedEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
Content_PointerCanceled(object sender, PointerRoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
Content_PointerCaptureLost(object sender, PointerRoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
Content_PointerPressed(object sender, PointerRoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
Content_PointerReleased(object sender, PointerRoutedEventArgs e) | ScrollPresenterDynamicPage | [inline, private]
contentPointerCanceledEventHandler | ScrollPresenterDynamicPage | [private]
contentPointerCaptureLostEventHandler | ScrollPresenterDynamicPage | [private]
contentPointerPressedEventHandler | ScrollPresenterDynamicPage | [private]
contentPointerReleasedEventHandler | ScrollPresenterDynamicPage | [private]
ConvertFromStringToVector2(string value) | ScrollPresenterDynamicPage | [inline, private]
CreateChildren() | ScrollPresenterDynamicPage | [inline, private]
dynamicScrollPresenter | ScrollPresenterDynamicPage | [private]
ExecuteQueuedOperations() | ScrollPresenterDynamicPage | [inline, private]
GetThicknessFromString(string thickness) | ScrollPresenterDynamicPage | [inline, private]
HookContentEffectiveViewportChanged() | ScrollPresenterDynamicPage | [inline, private]
HookContentPointerEvents() | ScrollPresenterDynamicPage | [inline, private]
horizontalStackPanel | ScrollPresenterDynamicPage | [private]
largeImg | ScrollPresenterDynamicPage | [private]
lastOffsetsChangeCorrelationId | ScrollPresenterDynamicPage | [private]
lastOffsetsChangeWithAdditionalVelocityCorrelationId | ScrollPresenterDynamicPage | [private]
lastZoomFactorChangeCorrelationId | ScrollPresenterDynamicPage | [private]
lastZoomFactorChangeWithAdditionalVelocityCorrelationId | ScrollPresenterDynamicPage | [private]
lstAsyncEventMessage | ScrollPresenterDynamicPage | [private]
lstQueuedOperations | ScrollPresenterDynamicPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollPresenterDynamicPage | [inline, protected]
populatedBorder | ScrollPresenterDynamicPage | [private]
QueuedOperationType enum name | ScrollPresenterDynamicPage | [private]
rectangle | ScrollPresenterDynamicPage | [private]
relativeChangeCorrelationIds | ScrollPresenterDynamicPage | [private]
Scroll(bool isRelativeChange) | ScrollPresenterDynamicPage | [inline, private]
scrollPresenter | ScrollPresenterDynamicPage | [private]
ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_ScrollStarting(ScrollPresenter sender, ScrollingScrollStartingEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_ZoomAnimationStarting(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_ZoomCompleted(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenter_ZoomStarting(ScrollPresenter sender, ScrollingZoomStartingEventArgs args) | ScrollPresenterDynamicPage | [inline, private]
ScrollPresenterDynamicPage() | ScrollPresenterDynamicPage | [inline]
textBlock | ScrollPresenterDynamicPage | [private]
tilePanel | ScrollPresenterDynamicPage | [private]
UnhookContentEffectiveViewportChanged() | ScrollPresenterDynamicPage | [inline, private]
UnhookContentPointerEvents() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbBackground() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbContent() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbContentHorizontalAlignment() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbContentManipulationMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbContentOrientation() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbContentVerticalAlignment() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbHorizontalScrollChainMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbHorizontalScrollMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbHorizontalScrollRailMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbIgnoredInputKinds() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbScrollPresenterManipulationMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbVerticalScrollChainMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbVerticalScrollMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbVerticalScrollRailMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbZoomChainMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateCmbZoomMode() | ScrollPresenterDynamicPage | [inline, private]
UpdateMaxZoomFactor() | ScrollPresenterDynamicPage | [inline, private]
UpdateMinZoomFactor() | ScrollPresenterDynamicPage | [inline, private]
UseScrollPresenter(ScrollPresenter s) | ScrollPresenterDynamicPage | [inline, private]
verticalStackPanel | ScrollPresenterDynamicPage | [private]
viewbox | ScrollPresenterDynamicPage | [private]
Zoom(bool isRelativeChange) | ScrollPresenterDynamicPage | [inline, private]
~ScrollPresenterDynamicPage() | ScrollPresenterDynamicPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:29 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollSnapPoint.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollSnapPoint.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SnapPoint.h"
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewMenuItemsSourcePage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewMenuItemsSourcePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Navigation;
00010 using Microsoft.UI.Xaml.Automation;
00011 using Windows.ApplicationModel.Core;
00012
00013 using NavigationView = Microsoft.UI.Xaml.Controls.NavigationView;
00014 using NavigationViewSelectionChangedEventArgs = Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs;
00015 using NavigationViewItem = Microsoft.UI.Xaml.Controls.NavigationViewItem;
00016 using System.ComponentModel;
00017 using System.Runtime.CompilerServices;
00018 using System.Collections.Generic;
00019 using System.Collections.ObjectModel;
00020 using System.Linq;
00021
00022 namespace MUXControlsTestApp
00023 {
00024     public sealed partial class NavigationViewMenuItemsSourcePage : TestPage
00025     {
00026         public ObservableCollection<NavViewPageData> Pages = new ObservableCollection<NavViewPageData>();
00027
00028         private ObservableCollection<NavViewPageData> _reverse_order_items = new ObservableCollection<NavViewPageData>();
00029
00030         public NavigationViewMenuItemsSourcePage()
00031         {
00032             this.InitializeComponent();
00033
00034             Pages.Add(new NavViewPageData("First Item"));
00035             Pages.Add(new NavViewPageData("Second Item"));
00036             Pages.Add(new NavViewPageData("Third Item"));
00037             Pages.Add(new NavViewPageData("Fourth Item"));
00038             Pages.Add(new NavViewPageData("Fifth Item"));
00039             Pages.Add(new NavViewPageData("Sixth Item"));
00040             Pages.Add(new NavViewPageData("Seventh Item"));
00041
00042             _reverse_order_items.Add(new NavViewPageData("Item 0"));
00043             _reverse_order_items.Add(new NavViewPageData("Item 1"));
00044         }
00045
00046         private void NavigationView_ItemInvoked(NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs args)
00047         {
00048             Pages.Add(new NavViewPageData("Menu Item NEW"));
00049             Pages.RemoveAt(0);
00050         }
00051
00052         private void BtnInsertItemsFromBeginning_Click(object sender, RoutedEventArgs e)
00053         {
00054             foreach (var item in _reverse_order_items.Reverse())
00055             {
00056                 Pages.Insert(0, item);
00057             }
00058         }
00059
00060     }
00061 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewTests Member List

This is the complete list of members for TreeViewTests, including all inherited members.
CanExpandTreeViewItemWithItemSourceSet() | TreeViewTests | [inline]
ClassInitialize(TestContext testContext) | TreeViewTests | [inline, static]
ClickButton(string buttonName) | TreeViewTests | [inline, private]
DragItemOntoTreeView(bool isContentMode=false) | TreeViewTests | [inline, private]
DragItemOntoTreeView_ContentMode() | TreeViewTests | [inline]
DragItemOntoTreeView_NodeMode() | TreeViewTests | [inline]
DragItemOutOfTreeView(bool isContentMode=false) | TreeViewTests | [inline, private]
DragItemOutOfTreeView_ContentMode() | TreeViewTests | [inline]
DragItemOutOfTreeView_NodeMode() | TreeViewTests | [inline]
ExpandCollapseTest(bool isContentMode=false) | TreeViewTests | [inline, private]
ExpandCollapseTest_ContentMode() | TreeViewTests | [inline]
ExpandCollapseTest_NodeMode() | TreeViewTests | [inline]
ExpandCollapseViaAutomationTest(bool isContentMode=false) | TreeViewTests | [inline, private]
ExpandCollapseViaAutomationTest_ContentMode() | TreeViewTests | [inline]
ExpandCollapseViaAutomationTest_NodeMode() | TreeViewTests | [inline]
FlyoutTreeViewItemClickTest() | TreeViewTests | [inline]
FlyoutTreeViewItemTabTest() | TreeViewTests | [inline]
FlyoutTreeViewSelectionChangedCrash() | TreeViewTests | [inline]
IsExpandedIsProperlyPreservedDuringItemRecycling() | TreeViewTests | [inline]
IsPhoneDevice() | TreeViewTests | [inline, private]
ItemsSourceResyncTest() | TreeViewTests | [inline]
ItemsSourceSwitchForthAndBackTest() | TreeViewTests | [inline]
LabelFirstItem() | TreeViewTests | [inline, private]
ReadResult() | TreeViewTests | [inline, private]
SelectedItemBindingsWork() | TreeViewTests | [inline]
SetContentMode(bool isContentMode) | TreeViewTests | [inline, private]
SingleSelectWithUnrealizedChildrenDoesNotMoveSelection() | TreeViewTests | [inline]
TapOnFlyoutTreeViewRootItemChevron() | TreeViewTests | [inline, private]
TapOnTreeViewAt(double x, double y, string buttonName) | TreeViewTests | [inline, private]
TestCleanup() | TreeViewTests | [inline]
ToggleTreeViewItemCheckBox(UIObject item, int level) | TreeViewTests | [inline, private]
TreeViewCollectionChangesEffectSelectedNodesTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewCollectionChangesEffectSelectedNodesTest_ContentMode() | TreeViewTests | [inline]
TreeViewCollectionChangesEffectSelectedNodesTest_NodeMode() | TreeViewTests | [inline]
TreeViewDataLateInitTest() | TreeViewTests | [inline]
TreeViewDensityChange() | TreeViewTests | [inline]
TreeViewDisableItemDragTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDisableItemDragTest_ContentMode() | TreeViewTests | [inline]
TreeViewDisableItemDragTest_NodeMode() | TreeViewTests | [inline]
TreeViewDisableItemReorderKeyboardTest() | TreeViewTests | [inline]
TreeViewDisableItemReorderTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDisableItemReorderTest_ContentMode() | TreeViewTests | [inline]
TreeViewDisableItemReorderTest_NodeMode() | TreeViewTests | [inline]
TreeViewDragAndDropBetweenNodes(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDragAndDropBetweenNodes_ContentMode() | TreeViewTests | [inline]
TreeViewDragAndDropBetweenNodes_NodeMode() | TreeViewTests | [inline]
TreeViewDragAndDropOnNode(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDragAndDropOnNode_ContentMode() | TreeViewTests | [inline]
TreeViewDragAndDropOnNode_NodeMode() | TreeViewTests | [inline]
TreeViewDragCrash(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDragCrash_ContentMode() | TreeViewTests | [inline]
TreeViewDragCrash_NodeMode() | TreeViewTests | [inline]
TreeViewDragEnterOverDropTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDragEnterOverDropTest_ContentMode() | TreeViewTests | [inline]
TreeViewDragEnterOverDropTest_NodeMode() | TreeViewTests | [inline]
TreeViewDragEnterOverLeaveTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDragEnterOverLeaveTest_ContentMode() | TreeViewTests | [inline]
TreeViewDragEnterOverLeaveTest_NodeMode() | TreeViewTests | [inline]
TreeViewDragItemTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDragItemTest_ContentMode() | TreeViewTests | [inline]
TreeViewDragItemTest_NodeMode() | TreeViewTests | [inline]
TreeViewDragMultipleItemsTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewDragMultipleItemsTest_ContentMode() | TreeViewTests | [inline]
TreeViewDragMultipleItemsTest_NodeMode() | TreeViewTests | [inline]
TreeViewExpandingEventTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewExpandingEventTest_ContentMode() | TreeViewTests | [inline]
TreeViewExpandingEventTest_NodeMode() | TreeViewTests | [inline]
TreeViewExpandNodeWithUnrealizedChildrenCrash() | TreeViewTests | [inline]
TreeViewFastReorderTest() | TreeViewTests | [inline]
TreeViewItemAutomationPeerSelectionItemPatternTest() | TreeViewTests | [inline]
TreeViewItemClickTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewItemClickTest_ContentMode() | TreeViewTests | [inline]
TreeViewItemClickTest_NodeMode() | TreeViewTests | [inline]
TreeViewItemTemplateSelectorTest() | TreeViewTests | [inline]
TreeViewItemUIATest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewItemUIATest_ContentMode() | TreeViewTests | [inline]
TreeViewItemUIATest_NodeMode() | TreeViewTests | [inline]
TreeViewKeyboardReorderTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewKeyboardReorderTest_ContentMode() | TreeViewTests | [inline]
TreeViewKeyboardReorderTest_NodeMode() | TreeViewTests | [inline]
TreeViewKeyDownLeftToRightTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewKeyDownLeftToRightTest_ContentMode() | TreeViewTests | [inline]
TreeViewKeyDownLeftToRightTest_NodeMode() | TreeViewTests | [inline]
TreeViewKeyDownRightToLeftTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewKeyDownRightToLeftTest_ContentMode() | TreeViewTests | [inline]
TreeViewKeyDownRightToLeftTest_NodeMode() | TreeViewTests | [inline]
TreeViewListMultipleSelectionUIATest() | TreeViewTests | [inline]
TreeViewMultiSelectDragAndDropBetweenNodes(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewMultiSelectDragAndDropBetweenNodes_ContentMode() | TreeViewTests | [inline]
TreeViewMultiSelectDragAndDropBetweenNodes_NodeMode() | TreeViewTests | [inline]
TreeViewMultiSelectDragAndDropOnNode(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewMultiSelectDragAndDropOnNode_ContentMode() | TreeViewTests | [inline]
TreeViewMultiSelectDragAndDropOnNode_NodeMode() | TreeViewTests | [inline]
TreeViewMultiSelectGamepadTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewMultiSelectGamepadTest_ContentMode() | TreeViewTests | [inline]
TreeViewMultiSelectGamepadTest_NodeMode() | TreeViewTests | [inline]
TreeViewMultiSelectItemTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewMultiSelectItemTest_ContentMode() | TreeViewTests | [inline]
TreeViewMultiSelectItemTest_NodeMode() | TreeViewTests | [inline]
TreeViewMultiSelectKeyboardingTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewMultiSelectKeyboardingTest_ContentMode() | TreeViewTests | [inline]
TreeViewMultiSelectKeyboardingTest_NodeMode() | TreeViewTests | [inline]
TreeViewNodeInheritenceTest() | TreeViewTests | [inline]
TreeViewNodeInMarkupTest() | TreeViewTests | [inline]
TreeViewNonexistNodeAutomationPeerTest() | TreeViewTests | [inline]
TreeViewNoReorderIntoChildren(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewNoReorderIntoChildren_ContentMode() | TreeViewTests | [inline]
TreeViewNoReorderIntoChildren_NodeMode() | TreeViewTests | [inline]
TreeViewPartialSelectionTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewPartialSelectionTest_ContentMode() | TreeViewTests | [inline]
TreeViewPartialSelectionTest_NodeMode() | TreeViewTests | [inline]
TreeViewRootNodeBindingTest() | TreeViewTests | [inline]
TreeViewSelectedItemsTest() | TreeViewTests | [inline]
TreeViewSelectedItemTest() | TreeViewTests | [inline]
TreeViewSelectedNodesTest() | TreeViewTests | [inline]
TreeViewSelectedNodeTest() | TreeViewTests | [inline]
TreeViewSelectionChangeUIAEventsTest() | TreeViewTests | [inline]
TreeViewSelectRegressionTest() | TreeViewTests | [inline]
TreeViewSwappingNodesTest(bool isContentMode=false) | TreeViewTests | [inline, private]
TreeViewSwappingNodesTest_ContentMode() | TreeViewTests | [inline]
TreeViewSwappingNodesTest_NodeMode() | TreeViewTests | [inline]
TreeViewWithMultiLevelChildrenExpandCollapseTest() | TreeViewTests | [inline]
ValidateCannotDragWithinSelectedSubtree(bool isContentMode=false) | TreeViewTests | [inline, private]
ValidateCannotDragWithinSelectedSubtree_ContentMode() | TreeViewTests | [inline]
ValidateCannotDragWithinSelectedSubtree_NodeMode() | TreeViewTests | [inline]
ValidateExpandingRaisedOnItemHavingUnrealizedChildren(bool isContentMode=false) | TreeViewTests | [inline, private]
ValidateExpandingRaisedOnItemHavingUnrealizedChildren_ContentMode() | TreeViewTests | [inline]
ValidateExpandingRaisedOnItemHavingUnrealizedChildren_NodeMode() | TreeViewTests | [inline]
ValidateMultiSelectDragDropRootsAndNonRoots(bool isContentMode=false) | TreeViewTests | [inline, private]
ValidateMultiSelectDragDropRootsAndNonRoots_ContentMode() | TreeViewTests | [inline]
ValidateMultiSelectDragDropRootsAndNonRoots_NodeMode() | TreeViewTests | [inline]
VerifyGamepadAPress(UIObject node, string expectedItemCount, string expectedSelection) | TreeViewTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2Utility.h Source File

  • File List
  • File Members
  • WebView2

WebView2Utility.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007
00008
00009 // These utilities convert WinRT event args into Win32 event args which are sent to the webview
00010 // Referencing winuser.h input codes : https://docs.microsoft.com/en-us/windows/desktop/api/winuser/
00011 namespace WebView2Utility
00012 {
00013     namespace winrtsystem = winrt::Windows::System;
00014
00015     LPARAM PackIntoWin32StylePointerArgs_lparam(
00016         const UINT message,
00017         const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs& args, winrt::Windows::Foundation::Point point)
00018     {
00019         // These are the same for WM_POINTER and WM_MOUSE based events
00020         // Pointer: https://msdn.microsoft.com/en-us/ie/hh454929(v=vs.80)
00021         // Mouse: https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-mousemove
00022         LPARAM lParam = MAKELPARAM((signed int)(point.X), (signed int)(point.Y));
00023         return lParam;
00024     }
00025
00026     WPARAM PackIntoWin32StyleMouseArgs_wparam(
00027         const UINT message,
00028         const winrt::Microsoft::UI::Xaml::Input::PointerRoutedEventArgs& args, winrt::PointerPoint pointerPoint)
00029     {
00030         WORD lowWord = 0x0;       // unsigned modifier flags
00031         short highWord = 0x0;     // signed wheel delta
00032
00033         winrtsystem::VirtualKeyModifiers modifiers(args.KeyModifiers());
00034
00035         // can support cases like Ctrl|Alt + Scroll where Alt will be ignored and it will be treated as Ctrl + Scroll
00036         if (static_cast<int>(modifiers) & static_cast<int>(winrtsystem::VirtualKeyModifiers::Control))
00037         {
00038             lowWord |= MK_CONTROL;
00039         }
00040         if (static_cast<int>(modifiers) & static_cast<int>(winrtsystem::VirtualKeyModifiers::Shift))
00041         {
00042             lowWord |= MK_SHIFT;
00043         }
00044
00045         winrt::PointerPointProperties properties{ pointerPoint.Properties() };
00046
00047         if (properties.IsLeftButtonPressed())
00048         {
00049             lowWord |= MK_LBUTTON;
00050         }
00051         if (properties.IsRightButtonPressed())
00052         {
00053             lowWord |= MK_RBUTTON;
00054         }
00055         if (properties.IsMiddleButtonPressed())
00056         {
00057             lowWord |= MK_MBUTTON;
00058         }
00059         if (properties.IsXButton1Pressed())
00060         {
00061             lowWord |= MK_XBUTTON1;
00062         }
00063         if (properties.IsXButton2Pressed())
00064         {
00065             lowWord |= MK_XBUTTON2;
00066         }
00067
00068         // Mouse wheel : https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-mousewheel
00069         if (message == WM_MOUSEWHEEL || message == WM_MOUSEHWHEEL)
00070         {
00071             // TODO_WebView2 : See if this needs to be multiplied with scale for different dpi scenarios
00072             highWord = static_cast<short>(properties.MouseWheelDelta());
00073         }
00074         else if (message == WM_XBUTTONDOWN || message == WM_XBUTTONUP)
00075         {
00076             // highWord Specifies which of the two XButtons is referenced by the message
00077             winrt::PointerUpdateKind pointerUpdateKind{ properties.PointerUpdateKind() };
00078             if (pointerUpdateKind == winrt::PointerUpdateKind::XButton1Pressed ||
00079                 pointerUpdateKind == winrt::PointerUpdateKind::XButton1Released)
00080             {
00081                 highWord |= XBUTTON1;
00082             }
00083             else if (pointerUpdateKind == winrt::PointerUpdateKind::XButton2Pressed ||
00084                      pointerUpdateKind == winrt::PointerUpdateKind::XButton2Released)
00085             {
00086                 highWord |= XBUTTON2;
00087             }
00088         }
00089
00090         WPARAM wParam = MAKEWPARAM(lowWord, highWord);
00091         return wParam;
00092     }
00093 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingTemplateSettingsProperties Member List

This is the complete list of members for ProgressRingTemplateSettingsProperties, including all inherited members.
ClearProperties() | ProgressRingTemplateSettingsProperties | [static]
EllipseDiameter(double value) | ProgressRingTemplateSettingsProperties |
EllipseDiameter() | ProgressRingTemplateSettingsProperties |
EllipseDiameterProperty() | ProgressRingTemplateSettingsProperties | [inline, static]
EllipseOffset(winrt::Thickness const &value) | ProgressRingTemplateSettingsProperties |
EllipseOffset() | ProgressRingTemplateSettingsProperties |
EllipseOffsetProperty() | ProgressRingTemplateSettingsProperties | [inline, static]
EnsureProperties() | ProgressRingTemplateSettingsProperties | [static]
MaxSideLength(double value) | ProgressRingTemplateSettingsProperties |
MaxSideLength() | ProgressRingTemplateSettingsProperties |
MaxSideLengthProperty() | ProgressRingTemplateSettingsProperties | [inline, static]
ProgressRingTemplateSettingsProperties() | ProgressRingTemplateSettingsProperties |
s_EllipseDiameterProperty | ProgressRingTemplateSettingsProperties | [static]
s_EllipseOffsetProperty | ProgressRingTemplateSettingsProperties | [static]
s_MaxSideLengthProperty | ProgressRingTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IAlphaMaskEffect Member List

This is the complete list of members for IAlphaMaskEffect, including all inherited members.
Mask([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IAlphaMaskEffect
Mask([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IAlphaMaskEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IAlphaMaskEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IAlphaMaskEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CoreWindowEventsPage Member List

This is the complete list of members for CoreWindowEventsPage, including all inherited members.
_listViewIem1 | CoreWindowEventsPage | [private]
_revealAddedCount | CoreWindowEventsPage | [private]
AddReveal_Click(object sender, RoutedEventArgs e) | CoreWindowEventsPage | [inline, private]
CoreWindow_PointerExited(CoreWindow sender, PointerEventArgs args) | CoreWindowEventsPage | [inline, private]
CoreWindowEventsPage() | CoreWindowEventsPage | [inline]
OnNavigatedFrom(NavigationEventArgs e) | CoreWindowEventsPage | [inline, protected]
OnNavigatedTo(NavigationEventArgs e) | CoreWindowEventsPage | [inline, protected]
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedGlobalNavigationButtonVisualSource Member List

This is the complete list of members for AnimatedGlobalNavigationButtonVisualSource, including all inherited members.
ColorAsVector4(winrt::Windows::UI::Color color) | AnimatedGlobalNavigationButtonVisualSource | [private, static]
Duration() | AnimatedGlobalNavigationButtonVisualSource |
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | AnimatedGlobalNavigationButtonVisualSource | [private]
Foreground() | AnimatedGlobalNavigationButtonVisualSource | [inline]
Foreground(winrt::Windows::UI::Color value) | AnimatedGlobalNavigationButtonVisualSource |
FrameCount() | AnimatedGlobalNavigationButtonVisualSource |
Framerate() | AnimatedGlobalNavigationButtonVisualSource |
FrameToProgress(double frameNumber) | AnimatedGlobalNavigationButtonVisualSource |
Markers() | AnimatedGlobalNavigationButtonVisualSource |
SetColorProperty(hstring const &propertyName, winrt::Windows::UI::Color value) | AnimatedGlobalNavigationButtonVisualSource |
SetScalarProperty(hstring const &propertyName, double value) | AnimatedGlobalNavigationButtonVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor) | AnimatedGlobalNavigationButtonVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics) | AnimatedGlobalNavigationButtonVisualSource |
Generated on Sun Dec 1 2024 20:52:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApi.idl Source File

  • File List
  • File Members
  • Lights

MaterialHelperTestApi.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_MEDIA_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 [default_interface]
00007 runtimeclass MaterialHelperTestApi : Microsoft.UI.Xaml.DependencyObject
00008 {
00009     MaterialHelperTestApi();
00010
00011     static Boolean SimulateDisabledByPolicy { get; set; };
00012     static Boolean IgnoreAreEffectsFast { get; set; };
00013 }
00014
00015 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IndexPath Member List

This is the complete list of members for IndexPath, including all inherited members.
CloneWithChildIndex(int childIndex) const | IndexPath |
CompareTo(winrt::IndexPath const &rhs) | IndexPath |
CreateFrom(Args &&...args) | IndexPath | [inline, static]
CreateFromIndices(T &&indices) | IndexPath | [inline, static]
GetAt(int index) | IndexPath |
GetSize() | IndexPath |
IndexPath(int index) | IndexPath |
IndexPath(int groupIndex, int itemIndex) | IndexPath |
IndexPath(const winrt::IVector< int > &indices) | IndexPath |
IndexPath(const std::vector< int > &indices) | IndexPath |
IsValid() const | IndexPath |
m_path | IndexPath | [private]
ToString() | IndexPath |
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPicturePage::SportsPerson Member List

This is the complete list of members for PersonPicturePage::SportsPerson, including all inherited members.
BadgeNumber | PersonPicturePage::SportsPerson |
DisplayName | PersonPicturePage::SportsPerson |
Initials | PersonPicturePage::SportsPerson |
SportsPerson(int badgeNumber, string initials, string displayName) | PersonPicturePage::SportsPerson | [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/InteractionTests/MapControlTests.cs Source File

  • File List
  • File Members
  • MapControl
  • InteractionTests

MapControlTests.cs

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class MapControlTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("Platform", "Any")]
00029         [TestProperty("MUXControlsTestSuite", "SuiteB")]
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         [TestProperty("TestPass:MinOSVer", WindowsOSVersion._19H1)]
00042         public void AddMultipleElementsOnMap()
00043         {
00044             using (var setup = new TestSetupHelper("MapControl Tests"))
00045             {
00046                 //Wait for map to load
00047                 var map = FindElement.ByName("Map Application");
00048                 Wait.RetryUntilEvalFuncSuccessOrTimeout(
00049                     () => { return (map = FindElement.ByName("Map Application")) != null; },
00050                     retryTimoutByMilliseconds: 3000
00051                 );
00052
00053                 // Get map contents
00054                 var elements = map.Descendants[0].Descendants;
00055
00056                 //Verify that the interactive map is the only element
00057                 Verify.AreEqual(1, elements.Count);
00058
00059                 // Add a layer
00060                 var addLayerButton = FindElement.ByName<Button>("Add Layer");
00061                 addLayerButton.Invoke();
00062                 Wait.ForIdle();
00063
00064                 // Add a pins
00065                 var addPinButton = FindElement.ByName<Button>("Add Pin");
00066                 var latitudeTextBox = FindElement.ById<Edit>("latitudePinText");
00067                 var longitudeTextBox = FindElement.ById<Edit>("longitudePinText");
00068
00069                 KeyboardHelper.EnterText(latitudeTextBox, "0");
00070                 KeyboardHelper.EnterText(longitudeTextBox, "0");
00071                 Wait.ForIdle();
00072                 addPinButton.Invoke();
00073                 Wait.ForIdle();
00074
00075                 KeyboardHelper.EnterText(latitudeTextBox, "10");
00076                 KeyboardHelper.EnterText(longitudeTextBox, "10");
00077                 Wait.ForIdle();
00078                 addPinButton.Invoke();
00079
00080                 //Verify that the two pins were added
00081                 Wait.RetryUntilEvalFuncSuccessOrTimeout(
00082                     () => { return (elements.Count) == 5; },
00083                     retryTimoutByMilliseconds: 3000
00084                 );
00085                 Verify.AreEqual(5, elements.Count);
00086             }
00087         }
00088
00089         [TestMethod]
00090         [TestProperty("TestPass:MinOSVer", WindowsOSVersion._19H1)]
00091         public void ValidadePinClickEvent()
00092         {
00093             using (var setup = new TestSetupHelper("MapControl Tests"))
00094             {
00095                 //Wait for map to load
00096                 var map = FindElement.ByName("Map Application");
00097                 Wait.RetryUntilEvalFuncSuccessOrTimeout(
00098                     () => { return (map = FindElement.ByName("Map Application")) != null; },
00099                     retryTimoutByMilliseconds: 3000
00100                 );
00101
00102                 // Get map contents
00103                 var elements = map.Descendants[0].Descendants;
00104
00105                 // Add a layer
00106                 var addLayerButton = FindElement.ByName<Button>("Add Layer");
00107                 addLayerButton.Invoke();
00108                 Wait.ForIdle();
00109
00110                 // Add a pin
00111                 var addPinButton = FindElement.ByName<Button>("Add Pin");
00112                 var latitudeTextBox = FindElement.ById<Edit>("latitudePinText");
00113                 var longitudeTextBox = FindElement.ById<Edit>("longitudePinText");
00114
00115                 KeyboardHelper.EnterText(latitudeTextBox, "0");
00116                 KeyboardHelper.EnterText(longitudeTextBox, "0");
00117                 Wait.ForIdle();
00118                 addPinButton.Invoke();
00119
00120                 //Check pin was created
00121                 Wait.RetryUntilEvalFuncSuccessOrTimeout(
00122                     () => { return (elements.Count) == 3; },
00123                     retryTimoutByMilliseconds: 3000
00124                 );
00125                 Verify.AreEqual(3, elements.Count);
00126
00127                 // Click on the pin
00128                 var pin = elements[1];
00129                 InputHelper.LeftClick(pin);
00130                 Wait.ForIdle();
00131
00132                 //Check pin was deleted
00133                 Wait.RetryUntilEvalFuncSuccessOrTimeout(
00134                     () => { return (elements.Count) == 1; },
00135                     retryTimoutByMilliseconds: 3000
00136                 );
00137                 Verify.AreEqual(1, elements.Count);
00138
00139                 //Check if both click events were raised
00140                 var logBox = new Edit(FindElement.ById("output"));
00141                 Verify.IsTrue(logBox.GetText().Contains("Layer Clicked"));
00142                 Verify.IsTrue(logBox.GetText().Contains("Map Clicked"));
00143
00144             }
00145         }
00146     }
00147 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ScrollInputHelper.cpp Source File

  • File List
  • File Members
  • ParallaxView

ScrollInputHelper.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollInputHelper.h"
00007 #include "ScrollPresenter.h"
00008
00009 PCWSTR ScrollInputHelper::s_horizontalOffsetPropertyName = L"TranslationX";
00010 PCWSTR ScrollInputHelper::s_verticalOffsetPropertyName = L"TranslationY";
00011 PCWSTR ScrollInputHelper::s_scalePropertyName = L"Scale";
00012
00013 ScrollInputHelper::ScrollInputHelper(
00014     const ITrackerHandleManager* owner,
00015     std::function<void(bool, bool)> infoChangedFunction)
00016     :m_owner(owner)
00017 {
00018     m_infoChangedFunction = infoChangedFunction;
00019 }
00020
00021 ScrollInputHelper::~ScrollInputHelper()
00022 {
00023     UnhookScrollPresenterPropertyChanged();
00024     UnhookScrollPresenterContentPropertyChanged();
00025     UnhookScrollViewerPropertyChanged();
00026     UnhookScrollViewerContentPropertyChanged();
00027     UnhookScrollViewerDirectManipulationStarted();
00028     UnhookScrollViewerDirectManipulationCompleted();
00029     UnhookRichEditBoxTextChanged();
00030     UnhookSourceControlTemplateChanged();
00031     UnhookSourceElementLoaded();
00032     UnhookTargetElementLoaded();
00033     UnhookCompositionTargetRendering();
00034 }
00035
00036 winrt::UIElement ScrollInputHelper::TargetElement() const
00037 {
00038     return m_targetElement.get();
00039 }
00040
00041 winrt::CompositionPropertySet ScrollInputHelper::SourcePropertySet() const
00042 {
00043     return m_sourcePropertySet;
00044 }
00045
00046 bool ScrollInputHelper::IsTargetElementInSource() const
00047 {
00048     return m_isTargetElementInSource;
00049 }
00050
00051 winrt::hstring ScrollInputHelper::GetSourceOffsetPropertyName(winrt::Orientation orientation) const
00052 {
00053     return (orientation == winrt::Orientation::Horizontal) ? s_horizontalOffsetPropertyName : s_verticalOffsetPropertyName;
00054 }
00055
00056 winrt::hstring ScrollInputHelper::GetSourceScalePropertyName() const
00057 {
00058     return s_scalePropertyName;
00059 }
00060
00061 // Returns the offset of the scrolled element in relation to its owning source.
00062 double ScrollInputHelper::GetOffsetFromScrollContentElement(const winrt::UIElement& element, winrt::Orientation orientation) const
00063 {
00064     const winrt::UIElement scrollContentElement = GetScrollContentElement();
00065
00066     if (!scrollContentElement)
00067     {
00068         return 0.0;
00069     }
00070
00071     const winrt::GeneralTransform gt = element.TransformToVisual(scrollContentElement);
00072     const winrt::Windows::Foundation::Point elementOffset = gt.TransformPoint(winrt::Windows::Foundation::Point(0, 0));
00073
00074     return orientation == winrt::Orientation::Horizontal ? elementOffset.X : elementOffset.Y;
00075 }
00076
00077 double ScrollInputHelper::GetMaxUnderpanOffset(winrt::Orientation orientation) const
00078 {
00079     return (orientation == winrt::Orientation::Horizontal) ? m_outOfBoundsPanSize.Width : m_outOfBoundsPanSize.Height;
00080 }
00081
00082 double ScrollInputHelper::GetMaxOverpanOffset(winrt::Orientation orientation) const
00083 {
00084     return (orientation == winrt::Orientation::Horizontal) ? m_outOfBoundsPanSize.Width : m_outOfBoundsPanSize.Height;
00085 }
00086
00087 double ScrollInputHelper::GetContentSize(winrt::Orientation orientation) const
00088 {
00089     return (orientation == winrt::Orientation::Horizontal) ? m_contentSize.Width : m_contentSize.Height;
00090 }
00091
00092 double ScrollInputHelper::GetViewportSize(winrt::Orientation orientation) const
00093 {
00094     return (orientation == winrt::Orientation::Horizontal) ? m_viewportSize.Width : m_viewportSize.Height;
00095 }
00096
00097 void ScrollInputHelper::SetSourceElement(const winrt::UIElement& sourceElement)
00098 {
00099     if (m_sourceElement.get() != sourceElement)
00100     {
00101         UnhookSourceControlTemplateChanged();
00102
00103         m_sourceElement.set(sourceElement);
00104         OnSourceElementChanged(true /*allowSourceElementLoadedHookup*/);
00105     }
00106 }
00107
00108 void ScrollInputHelper::SetTargetElement(const winrt::UIElement& targetElement)
00109 {
00110     if (m_targetElement.get() != targetElement)
00111     {
00112         UnhookTargetElementLoaded();
00113         m_targetElement.set(targetElement);
00114         OnTargetElementChanged();
00115     }
00116 }
00117
00118 void ScrollInputHelper::SetScrollViewer(const winrt::FxScrollViewer& scrollViewer)
00119 {
00120     if (scrollViewer != m_scrollViewer.get())
00121     {
00122         if (m_scrollViewer)
00123         {
00124             UnhookScrollViewerPropertyChanged();
00125             UnhookScrollViewerDirectManipulationStarted();
00126             UnhookScrollViewerDirectManipulationCompleted();
00127             UnhookRichEditBoxTextChanged();
00128
00129             m_richEditBox.set(nullptr);
00130             m_scrollViewerPropertySet = nullptr;
00131             m_isScrollViewerInDirectManipulation = false;
00132         }
00133
00134         m_scrollViewer.set(scrollViewer);
00135
00136         if (scrollViewer)
00137         {
00138             // Check if the ScrollViewer belongs to a RichEditBox so content size changes can be detected
00139             // via its TextChanged event.
00140             m_richEditBox.set(ScrollInputHelper::GetRichEditBoxParent(scrollViewer));
00141
00142             HookScrollViewerPropertyChanged();
00143             HookScrollViewerDirectManipulationStarted();
00144             HookScrollViewerDirectManipulationCompleted();
00145             HookRichEditBoxTextChanged();
00146
00147             m_scrollViewerPropertySet = winrt::ElementCompositionPreview::GetScrollViewerManipulationPropertySet(scrollViewer);
00148         }
00149
00150         ProcessScrollViewerContentChange();
00151     }
00152 }
00153
00154 void ScrollInputHelper::SetScrollPresenter(const winrt::ScrollPresenter& scrollPresenter)
00155 {
00156     if (scrollPresenter != m_scrollPresenter.get())
00157     {
00158         if (m_scrollPresenter)
00159         {
00160             UnhookScrollPresenterPropertyChanged();
00161         }
00162
00163         m_scrollPresenter.set(scrollPresenter);
00164
00165         if (scrollPresenter)
00166         {
00167             HookScrollPresenterPropertyChanged();
00168         }
00169
00170         ProcessScrollPresenterContentChange();
00171     }
00172 }
00173
00174 // Returns the parent RichEditBox if any.
00175 winrt::RichEditBox ScrollInputHelper::GetRichEditBoxParent(const winrt::DependencyObject& childElement)
00176 {
00177     if (childElement)
00178     {
00179         winrt::DependencyObject parent = winrt::VisualTreeHelper::GetParent(childElement);
00180         if (parent)
00181         {
00182             winrt::RichEditBox richEditBoxParent = parent.try_as<winrt::RichEditBox>();
00183             if (richEditBoxParent)
00184             {
00185                 return richEditBoxParent;
00186             }
00187             return ScrollInputHelper::GetRichEditBoxParent(parent);
00188         }
00189     }
00190
00191     return nullptr;
00192 }
00193
00194 // Returns the inner ScrollViewer or ScrollPresenter if any.
00195 void ScrollInputHelper::GetChildScrollPresenterOrScrollViewer(
00196     const winrt::DependencyObject& rootElement,
00197     _Out_ winrt::ScrollPresenter* scrollPresenter,
00198     _Out_ winrt::FxScrollViewer* scrollViewer)
00199 {
00200     *scrollPresenter = nullptr;
00201     *scrollViewer = nullptr;
00202
00203     if (rootElement)
00204     {
00205         const int childCount = winrt::VisualTreeHelper::GetChildrenCount(rootElement);
00206         for (int i = 0; i < childCount; i++)
00207         {
00208             winrt::DependencyObject current = winrt::VisualTreeHelper::GetChild(rootElement, i);
00209             *scrollViewer = current.try_as<winrt::FxScrollViewer>();
00210             if (*scrollViewer)
00211             {
00212                 return;
00213             }
00214             *scrollPresenter = current.try_as<winrt::ScrollPresenter>();
00215             if (*scrollPresenter)
00216             {
00217                 return;
00218             }
00219         }
00220
00221         for (int i = 0; i < childCount; i++)
00222         {
00223             winrt::DependencyObject current = winrt::VisualTreeHelper::GetChild(rootElement, i);
00224             ScrollInputHelper::GetChildScrollPresenterOrScrollViewer(
00225                 current,
00226                 scrollPresenter,
00227                 scrollViewer);
00228             if (*scrollPresenter)
00229             {
00230                 return;
00231             }
00232             if (*scrollViewer)
00233             {
00234                 return;
00235             }
00236         }
00237     }
00238 }
00239
00240 // Returns the ScrollViewer content as a UIElement, if any. Or ScrollPresenter.Content, if any.
00241 winrt::UIElement ScrollInputHelper::GetScrollContentElement() const
00242 {
00243     if (m_scrollViewer)
00244     {
00245         winrt::ContentControl scrollViewerAsContentControl = m_scrollViewer.as<winrt::ContentControl>();
00246
00247         winrt::IInspectable content = scrollViewerAsContentControl.Content();
00248         if (content)
00249         {
00250             return content.try_as<winrt::UIElement>();
00251         }
00252     }
00253     else if (auto scrollPresenter = m_scrollPresenter.get())
00254     {
00255         return scrollPresenter.Content();
00256     }
00257     return nullptr;
00258 }
00259
00260 // Returns the effective horizontal alignment of the ScrollViewer content.
00261 winrt::HorizontalAlignment ScrollInputHelper::GetEffectiveHorizontalAlignment() const
00262 {
00263     if (m_isScrollViewerInDirectManipulation)
00264     {
00265         return m_manipulationHorizontalAlignment;
00266     }
00267     else
00268     {
00269         return ComputeHorizontalContentAlignment();
00270     }
00271 }
00272
00273 // Returns the effective vertical alignment of the ScrollViewer content.
00274 winrt::VerticalAlignment ScrollInputHelper::GetEffectiveVerticalAlignment() const
00275 {
00276     if (m_isScrollViewerInDirectManipulation)
00277     {
00278         return m_manipulationVerticalAlignment;
00279     }
00280     else
00281     {
00282         return ComputeVerticalContentAlignment();
00283     }
00284 }
00285
00286 // Returns the effective zoom mode of the ScrollViewer.
00287 winrt::FxZoomMode ScrollInputHelper::GetEffectiveZoomMode() const
00288 {
00289     if (m_isScrollViewerInDirectManipulation)
00290     {
00291         return m_manipulationZoomMode;
00292     }
00293     else
00294     {
00295         return ComputeZoomMode();
00296     }
00297 }
00298
00299 // Updates the m_outOfBoundsPanSize field based on the viewport size and zoom mode.
00300 void ScrollInputHelper::UpdateOutOfBoundsPanSize()
00301 {
00302     if (m_scrollPresenter || m_scrollViewer)
00303     {
00304         const double viewportWith = GetViewportSize(winrt::Orientation::Horizontal);
00305         const double viewportHeight = GetViewportSize(winrt::Orientation::Vertical);
00306
00307         if (m_scrollViewer && GetEffectiveZoomMode() == winrt::FxZoomMode::Disabled)
00308         {
00309             // A ScrollViewer can under/overpan up to 10% of its viewport size
00310             m_outOfBoundsPanSize.Width = static_cast<float>(0.1 * viewportWith);
00311             m_outOfBoundsPanSize.Height = static_cast<float>(0.1 * viewportHeight);
00312         }
00313         else
00314         {
00315             // When zooming is allowed for a ScrollViewer, or in general for the ScrollPresenter,
00316             // the content can be pushed all the way to the edge of the screen with two fingers,
00317             // but we limit the offset to one viewport size.
00318             // Note that if in the future, the ScrollPresenter's underpan & overpan limits become customizable,
00319             // its ExpressionAnimationSources property set will have to expose those custom limits.
00320             // The values would then be consumed here for a more accurate ParallaxView behavior.
00321             m_outOfBoundsPanSize.Width = static_cast<float>(viewportWith);
00322             m_outOfBoundsPanSize.Height = static_cast<float>(viewportHeight);
00323         }
00324     }
00325     else
00326     {
00327         m_outOfBoundsPanSize.Width = m_outOfBoundsPanSize.Height = 0.0f;
00328     }
00329 }
00330
00331 // Updates the m_contentSize field.
00332 void ScrollInputHelper::UpdateContentSize()
00333 {
00334     m_contentSize.Width = m_contentSize.Height = 0.0f;
00335     auto scrollPresenter = m_scrollPresenter.get();
00336
00337     if (!scrollPresenter && !m_scrollViewer)
00338     {
00339         return;
00340     }
00341
00342     if (scrollPresenter)
00343     {
00344         winrt::CompositionPropertySet scrollPresenterPropertySet = scrollPresenter.ExpressionAnimationSources();
00345         winrt::float2 extent{};
00346
00347         const winrt::CompositionGetValueStatus status = scrollPresenterPropertySet.TryGetVector2(ScrollPresenter::s_extentSourcePropertyName, extent);
00348         if (status == winrt::CompositionGetValueStatus::Succeeded)
00349         {
00350             m_contentSize.Width = extent.x;
00351             m_contentSize.Height = extent.y;
00352         }
00353         return;
00354     }
00355     auto scrollViewer = m_scrollViewer.get();
00356     const float extentWidth = static_cast<float>(scrollViewer.ExtentWidth());
00357     const float extentHeight = static_cast<float>(scrollViewer.ExtentHeight());
00358
00359     winrt::UIElement scrollContentElement = GetScrollContentElement();
00360     winrt::ItemsPresenter itemsPresenter = scrollContentElement ? (scrollContentElement.try_as<winrt::ItemsPresenter>()) : nullptr;
00361
00362     if (!scrollContentElement || !itemsPresenter)
00363     {
00364         m_contentSize.Width = extentWidth;
00365         m_contentSize.Height = extentHeight;
00366         return;
00367     }
00368
00369     int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter);
00370
00371     if (childrenCount > 0)
00372     {
00373         winrt::DependencyObject child = winrt::VisualTreeHelper::GetChild(itemsPresenter, childrenCount == 1 ? 0 : 1);
00374
00375         if (child)
00376         {
00377             winrt::VirtualizingStackPanel virtualizingStackPanel = child.try_as<winrt::VirtualizingStackPanel>();
00378
00379             if (virtualizingStackPanel)
00380             {
00381                 // VirtualizingStackPanel are handled specially because the ScrollViewer.ExtentWidth/ExtentHeight is unit-based instead
00382                 // of pixel-based in the virtualized dimension. The computed size accounts for the potential margins, header and footer.
00383                 double virtualizingSize = 0.0;
00384                 const winrt::Thickness vspMargin = virtualizingStackPanel.Margin();
00385                 const winrt::Thickness itMargin = itemsPresenter.Margin();
00386
00387                 if (virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal)
00388                 {
00389                     virtualizingSize = virtualizingStackPanel.ExtentWidth() * virtualizingStackPanel.ActualWidth() / virtualizingStackPanel.ViewportWidth() +
00390                         vspMargin.Left + vspMargin.Right + itMargin.Left + itMargin.Right;
00391                 }
00392                 else
00393                 {
00394                     virtualizingSize = virtualizingStackPanel.ExtentHeight() * virtualizingStackPanel.ActualHeight() / virtualizingStackPanel.ViewportHeight() +
00395                         vspMargin.Top + vspMargin.Bottom + itMargin.Top + itMargin.Bottom;
00396                 }
00397
00398                 if (childrenCount > 1)
00399                 {
00400                     child = winrt::VisualTreeHelper::GetChild(itemsPresenter, 0);
00401
00402                     if (child)
00403                     {
00404                         winrt::FrameworkElement headerChild = child.try_as<winrt::FrameworkElement>();
00405
00406                         if (headerChild)
00407                         {
00408                             virtualizingSize += virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal ? headerChild.ActualWidth() : headerChild.ActualHeight();
00409                         }
00410                     }
00411                 }
00412
00413                 if (childrenCount > 2)
00414                 {
00415                     child = winrt::VisualTreeHelper::GetChild(itemsPresenter, 2);
00416
00417                     if (child)
00418                     {
00419                         winrt::FrameworkElement footerChild = child.try_as<winrt::FrameworkElement>();
00420
00421                         if (footerChild)
00422                         {
00423                             virtualizingSize += virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal ? footerChild.ActualWidth() : footerChild.ActualHeight();
00424                         }
00425                     }
00426                 }
00427
00428                 if (virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal)
00429                 {
00430                     m_contentSize.Width = static_cast<float>(virtualizingSize);
00431                     m_contentSize.Height = extentHeight;
00432                 }
00433                 else
00434                 {
00435                     m_contentSize.Width = extentWidth;
00436                     m_contentSize.Height = static_cast<float>(virtualizingSize);
00437                 }
00438
00439                 return;
00440             }
00441         }
00442     }
00443
00444     m_contentSize.Width = extentWidth;
00445     m_contentSize.Height = extentHeight;
00446 }
00447
00448 // Updates the m_viewportSize field.
00449 void ScrollInputHelper::UpdateViewportSize()
00450 {
00451     auto scrollPresenter = m_scrollPresenter.get();
00452     if (scrollPresenter)
00453     {
00454         winrt::CompositionPropertySet scrollPresenterPropertySet = scrollPresenter.ExpressionAnimationSources();
00455         winrt::float2 viewport{};
00456
00457         const winrt::CompositionGetValueStatus status = scrollPresenterPropertySet.TryGetVector2(ScrollPresenter::s_viewportSourcePropertyName, viewport);
00458         if (status == winrt::CompositionGetValueStatus::Succeeded)
00459         {
00460             m_viewportSize.Width = viewport.x;
00461             m_viewportSize.Height = viewport.y;
00462         }
00463         return;
00464     }
00465
00466     if (m_scrollViewer)
00467     {
00468         auto scrollViewer = m_scrollViewer.get();
00469         winrt::UIElement scrollContentElement = GetScrollContentElement();
00470
00471         if (scrollContentElement)
00472         {
00473             winrt::ItemsPresenter itemsPresenter = scrollContentElement.try_as<winrt::ItemsPresenter>();
00474
00475             if (itemsPresenter)
00476             {
00477                 int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter);
00478
00479                 if (childrenCount > 0)
00480                 {
00481                     winrt::DependencyObject child = winrt::VisualTreeHelper::GetChild(itemsPresenter, childrenCount == 1 ? 0 : 1);
00482
00483                     if (child)
00484                     {
00485                         winrt::VirtualizingStackPanel virtualizingStackPanel = child.try_as<winrt::VirtualizingStackPanel>();
00486
00487                         if (virtualizingStackPanel)
00488                         {
00489                             // VirtualizingStackPanel are handled specially because the ScrollViewer.ViewportWidth/ViewportHeight is unit-based instead
00490                             // of pixel-based in the virtualized dimension. The computed size accounts for the potential margins.
00491                             const winrt::Thickness itMargin = itemsPresenter.Margin();
00492
00493                             if (virtualizingStackPanel.Orientation() == winrt::Orientation::Horizontal)
00494                             {
00495                                 m_viewportSize.Width = static_cast<float>(itemsPresenter.ActualWidth() + itMargin.Left + itMargin.Right);
00496                                 m_viewportSize.Height = static_cast<float>(scrollViewer.ViewportHeight());
00497                             }
00498                             else
00499                             {
00500                                 m_viewportSize.Width = static_cast<float>(scrollViewer.ViewportWidth());
00501                                 m_viewportSize.Height = static_cast<float>(itemsPresenter.ActualHeight() + itMargin.Top + itMargin.Bottom);
00502                             }
00503                             return;
00504                         }
00505                     }
00506                 }
00507             }
00508         }
00509         m_viewportSize.Width = static_cast<float>(scrollViewer.ViewportWidth());
00510         m_viewportSize.Height = static_cast<float>(scrollViewer.ViewportHeight());
00511     }
00512     else
00513     {
00514         m_viewportSize.Width = m_viewportSize.Height = 0.0f;
00515     }
00516 }
00517
00518 // Updates all the fields dependent on the ScrollViewer source. Stops/starts
00519 // the internal composition animations.
00520 void ScrollInputHelper::UpdateSource(bool allowSourceElementLoadedHookup)
00521 {
00522     winrt::ScrollPresenter scrollPresenter = nullptr;
00523     winrt::FxScrollViewer scrollViewer = nullptr;
00524     auto sourceElement = m_sourceElement.get();
00525     if (sourceElement)
00526     {
00527         scrollPresenter = sourceElement.try_as<winrt::ScrollPresenter>();
00528         scrollViewer = sourceElement.try_as<winrt::FxScrollViewer>();
00529     }
00530
00531     if (scrollPresenter || scrollViewer)
00532     {
00533         SetScrollPresenter(scrollPresenter);
00534         SetScrollViewer(scrollViewer);
00535     }
00536     else if (sourceElement)
00537     {
00538         ScrollInputHelper::GetChildScrollPresenterOrScrollViewer(
00539             sourceElement,
00540             &scrollPresenter,
00541             &scrollViewer);
00542         SetScrollPresenter(scrollPresenter);
00543         SetScrollViewer(scrollViewer);
00544     }
00545     else
00546     {
00547         SetScrollPresenter(nullptr);
00548         SetScrollViewer(nullptr);
00549     }
00550
00551     if (allowSourceElementLoadedHookup &&
00552         !scrollPresenter &&
00553         !m_scrollViewer)
00554     {
00555         HookSourceElementLoaded();
00556     }
00557
00558     if (!scrollPresenter && !m_scrollViewer)
00559     {
00560         StopInternalExpressionAnimations();
00561         m_sourcePropertySet = nullptr;
00562     }
00563     else if (m_targetElement)
00564     {
00565         EnsureInternalSourcePropertySetAndExpressionAnimations();
00566         m_sourcePropertySet = m_internalSourcePropertySet;
00567         StartInternalExpressionAnimations(m_scrollViewer ? m_scrollViewerPropertySet : scrollPresenter.ExpressionAnimationSources());
00568     }
00569
00570     UpdateIsTargetElementInSource();
00571     UpdateContentSize();
00572     UpdateViewportSize();
00573     UpdateOutOfBoundsPanSize();
00574 }
00575
00576 // Updates the m_isTargetElementInSource field.
00577 void ScrollInputHelper::UpdateIsTargetElementInSource()
00578 {
00579     auto targetElement = m_targetElement.get();
00580
00581     if (targetElement)
00582     {
00583         bool sourceIsScrollViewer = m_scrollViewer != nullptr;
00584         bool sourceIsScrollPresenter = m_scrollPresenter != nullptr;
00585
00586         if (sourceIsScrollViewer || sourceIsScrollPresenter)
00587         {
00588             winrt::DependencyObject parent = targetElement;
00589             do
00590             {
00591                 parent = winrt::VisualTreeHelper::GetParent(parent);
00592                 if (parent)
00593                 {
00594                     if (sourceIsScrollViewer)
00595                     {
00596                         winrt::FxScrollViewer parentAsScrollViewer = parent.try_as<winrt::FxScrollViewer>();
00597
00598                         if (parentAsScrollViewer == m_scrollViewer.get())
00599                         {
00600                             m_isTargetElementInSource = true;
00601                             return;
00602                         }
00603                     }
00604                     else
00605                     {
00606                         winrt::ScrollPresenter parentAsScrollPresenter = parent.try_as<winrt::ScrollPresenter>();
00607
00608                         if (parentAsScrollPresenter == m_scrollPresenter.get())
00609                         {
00610                             m_isTargetElementInSource = true;
00611                             return;
00612                         }
00613                     }
00614                 }
00615             } while (parent);
00616         }
00617     }
00618
00619     m_isTargetElementInSource = false;
00620 }
00621
00622 // Updates the m_manipulationZoomMode field.
00623 void ScrollInputHelper::UpdateManipulationZoomMode()
00624 {
00625     if (m_targetElement)
00626     {
00627         m_manipulationZoomMode = ComputeZoomMode();
00628     }
00629 }
00630
00631 // Updates the m_manipulationHorizontalAlignment/m_manipulationVerticalAlignment fields.
00632 void ScrollInputHelper::UpdateManipulationAlignments()
00633 {
00634     if (m_targetElement)
00635     {
00636         m_manipulationHorizontalAlignment = ComputeHorizontalContentAlignment();
00637         m_manipulationVerticalAlignment = ComputeVerticalContentAlignment();
00638     }
00639 }
00640
00641 // Updates the internal composition animations that account for the alignment portions in the ScrollViewer's manipulation property set (m_scrollViewerPropertySet).
00642 // The offsets exposed by m_sourcePropertySet exclude those alignment portions.
00643 void ScrollInputHelper::UpdateInternalExpressionAnimations(bool horizontalInfoChanged, bool verticalInfoChanged, bool zoomInfoChanged)
00644 {
00645     bool restartAnimations = false;
00646
00647     if (m_scrollViewer)
00648     {
00649         if (horizontalInfoChanged && m_internalTranslationXExpressionAnimation)
00650         {
00651             switch (GetEffectiveHorizontalAlignment())
00652             {
00653             case winrt::HorizontalAlignment::Left:
00654                 m_internalTranslationXExpressionAnimation.Expression(L"source.Translation.X");
00655                 break;
00656
00657             case winrt::HorizontalAlignment::Stretch:
00658             case winrt::HorizontalAlignment::Center:
00659                 m_internalTranslationXExpressionAnimation.Expression(
00660                     L"source.Translation.X + ((contentWidth * source.Scale.X - viewportWidth) < 0.0f ? (contentWidth * source.Scale.X - viewportWidth) / 2.0f : 0.0f)");
00661                 m_internalTranslationXExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Horizontal)));
00662                 m_internalTranslationXExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Horizontal)));
00663                 break;
00664
00665             case winrt::HorizontalAlignment::Right:
00666                 m_internalTranslationXExpressionAnimation.Expression(L"source.Translation.X + ((contentWidth * source.Scale.X - viewportWidth) < 0.0f ? (contentWidth * source.Scale.X - viewportWidth) : 0.0f)");
00667                 m_internalTranslationXExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Horizontal)));
00668                 m_internalTranslationXExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Horizontal)));
00669                 break;
00670             }
00671             restartAnimations = true;
00672         }
00673
00674         if (verticalInfoChanged && m_internalTranslationYExpressionAnimation)
00675         {
00676             switch (GetEffectiveVerticalAlignment())
00677             {
00678             case winrt::VerticalAlignment::Top:
00679                 m_internalTranslationYExpressionAnimation.Expression(L"source.Translation.Y");
00680                 break;
00681
00682             case winrt::VerticalAlignment::Stretch:
00683             case winrt::VerticalAlignment::Center:
00684                 m_internalTranslationYExpressionAnimation.Expression(
00685                     L"source.Translation.Y + ((contentWidth * source.Scale.Y - viewportWidth) < 0.0f ? (contentWidth * source.Scale.Y - viewportWidth) / 2.0f : 0.0f)");
00686                 m_internalTranslationYExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Vertical)));
00687                 m_internalTranslationYExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Vertical)));
00688                 break;
00689
00690             case winrt::VerticalAlignment::Bottom:
00691                 m_internalTranslationYExpressionAnimation.Expression(
00692                     L"source.Translation.Y + ((contentWidth * source.Scale.Y - viewportWidth) < 0.0f ? (contentWidth * source.Scale.Y - viewportWidth) : 0.0f)");
00693                 m_internalTranslationYExpressionAnimation.SetScalarParameter(L"contentWidth", static_cast<float>(GetContentSize(winrt::Orientation::Vertical)));
00694                 m_internalTranslationYExpressionAnimation.SetScalarParameter(L"viewportWidth", static_cast<float>(GetViewportSize(winrt::Orientation::Vertical)));
00695                 break;
00696             }
00697             restartAnimations = true;
00698         }
00699
00700         if (zoomInfoChanged && m_internalScaleExpressionAnimation)
00701         {
00702             m_internalScaleExpressionAnimation.Expression(L"source.Scale.X");
00703             restartAnimations = true;
00704         }
00705
00706         if (restartAnimations && m_targetElement)
00707         {
00708             StartInternalExpressionAnimations(m_scrollViewerPropertySet);
00709         }
00710     }
00711     else if (auto scrollPresenter = m_scrollPresenter.get())
00712     {
00713         if (horizontalInfoChanged && m_internalTranslationXExpressionAnimation)
00714         {
00715             m_internalTranslationXExpressionAnimation.Expression(L"source.MinPosition.X - source.Position.X");
00716             restartAnimations = true;
00717         }
00718         if (verticalInfoChanged && m_internalTranslationYExpressionAnimation)
00719         {
00720             m_internalTranslationYExpressionAnimation.Expression(L"source.MinPosition.Y - source.Position.Y");
00721             restartAnimations = true;
00722         }
00723
00724         if (zoomInfoChanged && m_internalScaleExpressionAnimation)
00725         {
00726             m_internalScaleExpressionAnimation.Expression(L"source.ZoomFactor");
00727             restartAnimations = true;
00728         }
00729
00730         if (restartAnimations && m_targetElement)
00731         {
00732             StartInternalExpressionAnimations(scrollPresenter.ExpressionAnimationSources());
00733         }
00734     }
00735 }
00736
00737 // Returns the ScrollViewer's content horizontal alignment.
00738 winrt::HorizontalAlignment ScrollInputHelper::ComputeHorizontalContentAlignment() const
00739 {
00740     // Panels that implement XAML's internal IScrollInfo interface: OrientedVirtualizingPanel, CarouselPanel, TextBoxView for TextBox, RichTextBox and PasswordBox.
00741
00742     winrt::HorizontalAlignment horizontalAlignment = winrt::HorizontalAlignment::Stretch;
00743
00744     // First access the ScrollViewer's HorizontalContentAlignment
00745     if (m_scrollViewer)
00746     {
00747         horizontalAlignment = m_scrollViewer.get().HorizontalContentAlignment();
00748
00749         // Determine whether the ScrollContentPresenter is the IScrollInfo implementer or not
00750         if (IsScrollContentPresenterIScrollInfoProvider())
00751         {
00752             // When the ScrollContentPresenter is the IScrollInfo implementer,
00753             // use the horizontal alignment of the manipulated element by default.
00754             winrt::UIElement scrollContentElement = GetScrollContentElement();
00755
00756             if (scrollContentElement)
00757             {
00758                 winrt::FrameworkElement contentAsFrameworkElement = scrollContentElement.try_as<winrt::FrameworkElement>();
00759
00760                 if (contentAsFrameworkElement)
00761                 {
00762                     horizontalAlignment = contentAsFrameworkElement.HorizontalAlignment();
00763                 }
00764             }
00765         }
00766     }
00767
00768     return horizontalAlignment;
00769 }
00770
00771 // Returns the ScrollViewer's content vertical alignment.
00772 winrt::VerticalAlignment ScrollInputHelper::ComputeVerticalContentAlignment() const
00773 {
00774     // Panels that implement XAML's internal IScrollInfo interface: OrientedVirtualizingPanel, CarouselPanel, TextBoxView for TextBox, RichTextBox and PasswordBox.
00775
00776     winrt::VerticalAlignment verticalAlignment = winrt::VerticalAlignment::Stretch;
00777
00778     // First access the ScrollViewer's VerticalContentAlignment
00779     if (m_scrollViewer)
00780     {
00781         verticalAlignment = m_scrollViewer.get().VerticalContentAlignment();
00782
00783         // Determine whether the ScrollContentPresenter is the IScrollInfo implementer or not
00784         if (IsScrollContentPresenterIScrollInfoProvider())
00785         {
00786             // When the ScrollContentPresenter is the IScrollInfo implementer,
00787             // use the vertical alignment of the manipulated element by default.
00788             winrt::UIElement scrollContentElement = GetScrollContentElement();
00789
00790             if (scrollContentElement)
00791             {
00792                 winrt::FrameworkElement contentAsFrameworkElement = scrollContentElement.try_as<winrt::FrameworkElement>();
00793
00794                 if (contentAsFrameworkElement)
00795                 {
00796                     verticalAlignment = contentAsFrameworkElement.VerticalAlignment();
00797                 }
00798             }
00799         }
00800     }
00801
00802     return verticalAlignment;
00803 }
00804
00805 winrt::FxZoomMode ScrollInputHelper::ComputeZoomMode() const
00806 {
00807     return m_scrollViewer ? m_scrollViewer.get().ZoomMode() : winrt::FxZoomMode::Disabled;
00808 }
00809
00810 // Determines whether the ScrollViewer's ScrollContentPresenter is the IScrollInfo implementer used by the ScrollViewer.
00811 bool ScrollInputHelper::IsScrollContentPresenterIScrollInfoProvider() const
00812 {
00813     if (m_scrollViewer)
00814     {
00815         winrt::UIElement scrollContentElement = GetScrollContentElement();
00816
00817         if (scrollContentElement)
00818         {
00819             winrt::ItemsPresenter itemsPresenter = scrollContentElement.try_as<winrt::ItemsPresenter>();
00820
00821             if (itemsPresenter)
00822             {
00823                 int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter);
00824
00825                 if (childrenCount > 0)
00826                 {
00827                     winrt::DependencyObject child = winrt::VisualTreeHelper::GetChild(itemsPresenter, childrenCount == 1 ? 0 : 1);
00828
00829                     if (child)
00830                     {
00831                         winrt::OrientedVirtualizingPanel itemsPanelAsOrientedVirtualizingPanel = child.try_as<winrt::OrientedVirtualizingPanel>();
00832                         winrt::CarouselPanel itemsPanelAsCarouselPanel = child.try_as<winrt::CarouselPanel>();
00833
00834                         if (itemsPanelAsOrientedVirtualizingPanel || itemsPanelAsCarouselPanel)
00835                         {
00836                             return false;
00837                         }
00838                     }
00839                 }
00840             }
00841         }
00842         return true;
00843     }
00844     return false;
00845 }
00846
00847 // Creates the internal composition property set, m_internalSourcePropertySet, that filters out the alignment portions of the ScrollViewer manipulation property set.
00848 void ScrollInputHelper::EnsureInternalSourcePropertySetAndExpressionAnimations()
00849 {
00850     auto targetElement = m_targetElement.get();
00851     if (!m_internalSourcePropertySet && targetElement)
00852     {
00853         winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(targetElement);
00854         winrt::Compositor compositor = visual.Compositor();
00855
00856         m_internalSourcePropertySet = compositor.CreatePropertySet();
00857         m_internalSourcePropertySet.InsertScalar(s_horizontalOffsetPropertyName, 0.0f);
00858         m_internalSourcePropertySet.InsertScalar(s_verticalOffsetPropertyName, 0.0f);
00859         m_internalSourcePropertySet.InsertScalar(s_scalePropertyName, 1.0f);
00860
00861         auto scrollViewer = m_scrollViewer.get();
00862         m_internalTranslationXExpressionAnimation = compositor.CreateExpressionAnimation(scrollViewer ? L"source.Translation.X" : L"source.MinPosition.X - source.Position.X");
00863         m_internalTranslationYExpressionAnimation = compositor.CreateExpressionAnimation(scrollViewer ? L"source.Translation.Y" : L"source.MinPosition.Y - source.Position.Y");
00864         m_internalScaleExpressionAnimation = compositor.CreateExpressionAnimation(scrollViewer ? L"source.Scale.X" : L"source.ZoomFactor");
00865     }
00866 }
00867
00868 // Starts the animations targeting the properties inside m_internalSourcePropertySet.
00869 void ScrollInputHelper::StartInternalExpressionAnimations(const winrt::CompositionPropertySet& source)
00870 {
00871     if (m_internalSourcePropertySet && source)
00872     {
00873         m_internalTranslationXExpressionAnimation.SetReferenceParameter(L"source", source);
00874         m_internalTranslationYExpressionAnimation.SetReferenceParameter(L"source", source);
00875         m_internalScaleExpressionAnimation.SetReferenceParameter(L"source", source);
00876
00877         m_internalSourcePropertySet.StopAnimation(s_horizontalOffsetPropertyName);
00878         m_internalSourcePropertySet.StopAnimation(s_verticalOffsetPropertyName);
00879         m_internalSourcePropertySet.StopAnimation(s_scalePropertyName);
00880
00881         m_internalSourcePropertySet.StartAnimation(s_horizontalOffsetPropertyName, m_internalTranslationXExpressionAnimation);
00882         m_internalSourcePropertySet.StartAnimation(s_verticalOffsetPropertyName, m_internalTranslationYExpressionAnimation);
00883         m_internalSourcePropertySet.StartAnimation(s_scalePropertyName, m_internalScaleExpressionAnimation);
00884     }
00885 }
00886
00887 // Stops the animations targeting the properties inside m_internalSourcePropertySet.
00888 void ScrollInputHelper::StopInternalExpressionAnimations()
00889 {
00890     if (m_internalSourcePropertySet)
00891     {
00892         m_internalSourcePropertySet.StopAnimation(s_horizontalOffsetPropertyName);
00893         m_internalSourcePropertySet.StopAnimation(s_verticalOffsetPropertyName);
00894         m_internalSourcePropertySet.StopAnimation(s_scalePropertyName);
00895
00896         m_internalSourcePropertySet.InsertScalar(s_horizontalOffsetPropertyName, 0.0f);
00897         m_internalSourcePropertySet.InsertScalar(s_verticalOffsetPropertyName, 0.0f);
00898         m_internalSourcePropertySet.InsertScalar(s_scalePropertyName, 1.0f);
00899     }
00900 }
00901
00902 void ScrollInputHelper::ProcessSourceElementChange(bool allowSourceElementLoadedHookup)
00903 {
00904     winrt::CompositionPropertySet oldSourcePropertySet = m_sourcePropertySet;
00905     const bool oldIsTargetElementInSource = m_isTargetElementInSource;
00906     const double oldViewportWidth = GetViewportSize(winrt::Orientation::Horizontal);
00907     const double oldViewportHeight = GetViewportSize(winrt::Orientation::Vertical);
00908     const double oldContentWidth = GetContentSize(winrt::Orientation::Horizontal);
00909     const double oldContentHeight = GetContentSize(winrt::Orientation::Vertical);
00910     const double oldUnderpanWidth = GetMaxUnderpanOffset(winrt::Orientation::Horizontal);
00911     const double oldUnderpanHeight = GetMaxUnderpanOffset(winrt::Orientation::Vertical);
00912     const double oldOverpanWidth = GetMaxOverpanOffset(winrt::Orientation::Horizontal);
00913     const double oldOverpanHeight = GetMaxOverpanOffset(winrt::Orientation::Vertical);
00914
00915     UnhookSourceElementLoaded();
00916
00917     UpdateSource(allowSourceElementLoadedHookup);
00918
00919     if (m_sourcePropertySet != oldSourcePropertySet ||
00920         m_isTargetElementInSource != oldIsTargetElementInSource)
00921     {
00922         OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, true /*zoomInfoChanged*/);
00923     }
00924     else
00925     {
00926         const bool horizontalInfoChanged =
00927             oldViewportWidth != GetViewportSize(winrt::Orientation::Horizontal) ||
00928             oldContentWidth != GetContentSize(winrt::Orientation::Horizontal) ||
00929             oldUnderpanWidth != GetMaxUnderpanOffset(winrt::Orientation::Horizontal) ||
00930             oldOverpanWidth != GetMaxOverpanOffset(winrt::Orientation::Horizontal);
00931
00932         const bool verticalInfoChanged =
00933             oldViewportHeight != GetViewportSize(winrt::Orientation::Vertical) ||
00934             oldContentHeight != GetContentSize(winrt::Orientation::Vertical) ||
00935             oldUnderpanHeight != GetMaxUnderpanOffset(winrt::Orientation::Vertical) ||
00936             oldOverpanHeight != GetMaxOverpanOffset(winrt::Orientation::Vertical);
00937
00938         if (horizontalInfoChanged || verticalInfoChanged)
00939         {
00940             OnSourceInfoChanged(horizontalInfoChanged, verticalInfoChanged, true /*zoomInfoChanged*/);
00941         }
00942     }
00943 }
00944
00945 void ScrollInputHelper::ProcessTargetElementChange()
00946 {
00947     const bool oldIsTargetElementInSource = m_isTargetElementInSource;
00948
00949     UpdateIsTargetElementInSource();
00950
00951     if (m_isTargetElementInSource != oldIsTargetElementInSource)
00952     {
00953         OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
00954     }
00955     else if (m_targetElement)
00956     {
00957         UpdateInternalExpressionAnimations(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
00958     }
00959 }
00960
00961 // Invoked when the ScrollViewer.Content or ScrollPresenter.Content size changed.
00962 void ScrollInputHelper::ProcessContentSizeChange()
00963 {
00964     const double oldContentWidth = GetContentSize(winrt::Orientation::Horizontal);
00965     const double oldContentHeight = GetContentSize(winrt::Orientation::Vertical);
00966
00967     UpdateContentSize();
00968
00969     const double newContentWidth = GetContentSize(winrt::Orientation::Horizontal);
00970     const double newContentHeight = GetContentSize(winrt::Orientation::Vertical);
00971
00972     if (oldContentWidth != newContentWidth || oldContentHeight != newContentHeight)
00973     {
00974         OnSourceInfoChanged(oldContentWidth != newContentWidth, oldContentHeight != newContentHeight, false /*zoomInfoChanged*/);
00975     }
00976 }
00977
00978 // Invoked when the source element has changed.
00979 void ScrollInputHelper::OnSourceElementChanged(bool allowSourceElementLoadedHookup)
00980 {
00981     auto sourceElement = m_sourceElement.get();
00982     if (sourceElement)
00983     {
00984         winrt::Control sourceAsControl = sourceElement.try_as<winrt::Control>();
00985         winrt::FxScrollViewer sourceAsScrollViewer = sourceElement.try_as<winrt::FxScrollViewer>();
00986
00987         if (sourceAsControl && !sourceAsScrollViewer)
00988         {
00989             HookSourceControlTemplateChanged();
00990         }
00991     }
00992     else
00993     {
00994         // No need to find the inner ScrollViewer at the next UI thread tick.
00995         UnhookCompositionTargetRendering();
00996     }
00997
00998     ProcessSourceElementChange(allowSourceElementLoadedHookup);
00999 }
01000
01001 // Invoked when the target element has changed.
01002 void ScrollInputHelper::OnTargetElementChanged()
01003 {
01004     auto scrollViewer = m_scrollViewer.get();
01005     auto targetElement = m_targetElement.get();
01006     auto scrollPresenter = m_scrollPresenter.get();
01007     if (targetElement)
01008     {
01009         winrt::DependencyObject parent = winrt::VisualTreeHelper::GetParent(targetElement);
01010         if (!parent)
01011         {
01012             HookTargetElementLoaded();
01013         }
01014     }
01015
01016     if (scrollPresenter || scrollViewer)
01017     {
01018         EnsureInternalSourcePropertySetAndExpressionAnimations();
01019         m_sourcePropertySet = m_internalSourcePropertySet;
01020         if (targetElement)
01021         {
01022             StartInternalExpressionAnimations(scrollViewer ? m_scrollViewerPropertySet : scrollPresenter.ExpressionAnimationSources());
01023             if (m_isScrollViewerInDirectManipulation)
01024             {
01025                 UpdateManipulationAlignments();
01026                 UpdateManipulationZoomMode();
01027             }
01028         }
01029
01030         ProcessTargetElementChange();
01031     }
01032 }
01033
01034 // Invoked when the source is a Control other than a ScrollViewer, and its Template property changed.
01035 void ScrollInputHelper::ProcessSourceControlTemplateChange()
01036 {
01037     // Wait for one UI thread tick so the new control template gets applied and the potential inner ScrollViewer can be set.
01038     HookCompositionTargetRendering();
01039 }
01040
01041 // Invoked when a source characteristic influencing the composition animations changed.
01042 void ScrollInputHelper::OnSourceInfoChanged(bool horizontalInfoChanged, bool verticalInfoChanged, bool zoomInfoChanged)
01043 {
01044     MUX_ASSERT(horizontalInfoChanged || verticalInfoChanged);
01045
01046     if ((m_scrollPresenter || m_scrollViewer) && m_targetElement)
01047     {
01048         UpdateInternalExpressionAnimations(horizontalInfoChanged, verticalInfoChanged, zoomInfoChanged);
01049     }
01050
01051     if (m_infoChangedFunction)
01052     {
01053         // Let the ScrollInputHelper consumer know about the characteristic change too.
01054         m_infoChangedFunction(horizontalInfoChanged, verticalInfoChanged);
01055     }
01056 }
01057
01058 void ScrollInputHelper::OnTargetElementLoaded(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
01059 {
01060     UnhookTargetElementLoaded();
01061     ProcessTargetElementChange();
01062 }
01063
01064 void ScrollInputHelper::OnSourceElementLoaded(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
01065 {
01066     UnhookSourceElementLoaded();
01067     ProcessSourceElementChange(false /*allowSourceElementLoadedHookup*/);
01068 }
01069
01070 void ScrollInputHelper::OnSourceElementPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& args)
01071 {
01072     if (args == winrt::Control::TemplateProperty())
01073     {
01074         ProcessSourceControlTemplateChange();
01075     }
01076 }
01077
01078 void ScrollInputHelper::ProcessScrollViewerContentChange()
01079 {
01080     UnhookScrollViewerContentPropertyChanged();
01081
01082     m_sourceContent.set(nullptr);
01083
01084     auto scrollViewer = m_scrollViewer.get();
01085     if (scrollViewer)
01086     {
01087         winrt::IInspectable newContent = scrollViewer.Content();
01088
01089         if (newContent)
01090         {
01091             m_sourceContent.set(newContent.try_as<winrt::FrameworkElement>());
01092
01093             HookScrollViewerContentPropertyChanged();
01094         }
01095     }
01096
01097     OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, true /*zoomInfoChanged*/);
01098 }
01099
01100 void ScrollInputHelper::ProcessScrollPresenterContentChange()
01101 {
01102     auto scrollPresenter = m_scrollPresenter.get();
01103     UnhookScrollPresenterContentPropertyChanged();
01104
01105     m_sourceContent.set(nullptr);
01106
01107     if (scrollPresenter)
01108     {
01109         winrt::UIElement newContent = scrollPresenter.Content();
01110
01111         if (newContent)
01112         {
01113             m_sourceContent.set(newContent.try_as<winrt::FrameworkElement>());
01114
01115             HookScrollPresenterContentPropertyChanged();
01116         }
01117     }
01118
01119     OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, true /*zoomInfoChanged*/);
01120 }
01121
01122 void ScrollInputHelper::ProcessScrollViewerZoomModeChange()
01123 {
01124     UpdateOutOfBoundsPanSize();
01125     OnSourceInfoChanged(true /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
01126 }
01127
01128 void ScrollInputHelper::OnSourceSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& /*args*/)
01129 {
01130     const double oldViewportWidth = GetViewportSize(winrt::Orientation::Horizontal);
01131     const double oldViewportHeight = GetViewportSize(winrt::Orientation::Vertical);
01132     const double oldUnderpanWidth = GetMaxUnderpanOffset(winrt::Orientation::Horizontal);
01133     const double oldUnderpanHeight = GetMaxUnderpanOffset(winrt::Orientation::Vertical);
01134     const double oldOverpanWidth = GetMaxOverpanOffset(winrt::Orientation::Horizontal);
01135     const double oldOverpanHeight = GetMaxOverpanOffset(winrt::Orientation::Vertical);
01136
01137     UpdateViewportSize();
01138     UpdateOutOfBoundsPanSize();
01139
01140     const bool horizontalInfoChanged =
01141         oldViewportWidth != GetViewportSize(winrt::Orientation::Horizontal) ||
01142         oldUnderpanWidth != GetMaxUnderpanOffset(winrt::Orientation::Horizontal) ||
01143         oldOverpanWidth != GetMaxOverpanOffset(winrt::Orientation::Horizontal);
01144
01145     const bool verticalInfoChanged =
01146         oldViewportHeight != GetViewportSize(winrt::Orientation::Vertical) ||
01147         oldUnderpanHeight != GetMaxUnderpanOffset(winrt::Orientation::Vertical) ||
01148         oldOverpanHeight != GetMaxOverpanOffset(winrt::Orientation::Vertical);
01149
01150     if (horizontalInfoChanged || verticalInfoChanged)
01151     {
01152         OnSourceInfoChanged(horizontalInfoChanged, verticalInfoChanged, false /*zoomInfoChanged*/);
01153     }
01154 }
01155
01156 void ScrollInputHelper::OnScrollViewerDirectManipulationStarted(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/)
01157 {
01158     // Alignment and zoom mode changes during a manipulation are ignored until the end of that manipulation.
01159
01160     m_isScrollViewerInDirectManipulation = true;
01161
01162     UpdateManipulationAlignments();
01163     UpdateManipulationZoomMode();
01164 }
01165
01166 void ScrollInputHelper::OnScrollViewerDirectManipulationCompleted(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/)
01167 {
01168     // Alignment and zoom mode changes that occurred during this completed manipulation are now taken into account.
01169
01170     winrt::HorizontalAlignment oldEffectiveHorizontalAlignment = winrt::HorizontalAlignment::Left;
01171     winrt::VerticalAlignment oldEffectiveVerticalAlignment = winrt::VerticalAlignment::Top;
01172     winrt::FxZoomMode oldZoomMode = winrt::FxZoomMode::Disabled;
01173
01174     if (m_targetElement)
01175     {
01176         oldEffectiveHorizontalAlignment = GetEffectiveHorizontalAlignment();
01177         oldEffectiveVerticalAlignment = GetEffectiveVerticalAlignment();
01178         oldZoomMode = GetEffectiveZoomMode();
01179     }
01180
01181     m_isScrollViewerInDirectManipulation = false;
01182
01183     if (m_targetElement)
01184     {
01185         const winrt::FxZoomMode newZoomMode = GetEffectiveZoomMode();
01186
01187         if (oldZoomMode != newZoomMode)
01188         {
01189             ProcessScrollViewerZoomModeChange();
01190         }
01191
01192         const winrt::HorizontalAlignment newEffectiveHorizontalAlignment = GetEffectiveHorizontalAlignment();
01193         const winrt::VerticalAlignment newEffectiveVerticalAlignment = GetEffectiveVerticalAlignment();
01194
01195         if (oldEffectiveHorizontalAlignment != newEffectiveHorizontalAlignment || oldEffectiveVerticalAlignment != newEffectiveVerticalAlignment)
01196         {
01197             UpdateInternalExpressionAnimations(
01198                 oldEffectiveHorizontalAlignment != newEffectiveHorizontalAlignment,
01199                 oldEffectiveVerticalAlignment != newEffectiveVerticalAlignment,
01200                 false /*zoomInfoChanged*/);
01201         }
01202     }
01203 }
01204
01205 void ScrollInputHelper::OnRichEditBoxTextChanged(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
01206 {
01207     ProcessContentSizeChange();
01208 }
01209
01210 void ScrollInputHelper::OnCompositionTargetRendering(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/)
01211 {
01212     // Unhook the Rendering event handler and attempt to find the potential new inner ScrollViewer.
01213     UnhookCompositionTargetRendering();
01214     ProcessSourceElementChange(false /*allowSourceElementLoadedHookup*/);
01215 }
01216
01217 void ScrollInputHelper::OnSourceContentSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& /*args*/)
01218 {
01219     ProcessContentSizeChange();
01220 }
01221
01222 // Invoked when a tracked dependency property changes for the ScrollViewer dependency object.
01223 void ScrollInputHelper::OnScrollViewerPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& args)
01224 {
01225     if (args == winrt::ContentControl::ContentProperty())
01226     {
01227         ProcessScrollViewerContentChange();
01228     }
01229     else if (args == winrt::FxScrollViewer::ZoomModeProperty())
01230     {
01231         if (!m_isScrollViewerInDirectManipulation)
01232         {
01233             ProcessScrollViewerZoomModeChange();
01234         }
01235     }
01236     else if (args == winrt::Control::HorizontalContentAlignmentProperty())
01237     {
01238         if (!m_isScrollViewerInDirectManipulation)
01239         {
01240             UpdateInternalExpressionAnimations(true /*horizontalInfoChanged*/, false /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
01241         }
01242     }
01243     else if (args == winrt::Control::VerticalContentAlignmentProperty())
01244     {
01245         if (!m_isScrollViewerInDirectManipulation)
01246         {
01247             UpdateInternalExpressionAnimations(false /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
01248         }
01249     }
01250 }
01251
01252 // Invoked when a tracked dependency property changes for the ScrollPresenter dependency object.
01253 void ScrollInputHelper::OnScrollPresenterPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& args)
01254 {
01255     if (args == winrt::ScrollPresenter::ContentProperty())
01256     {
01257         ProcessScrollPresenterContentChange();
01258     }
01259 }
01260
01261 // Invoked when a tracked dependency property changes for the ScrollViewer.Content dependency object.
01262 void ScrollInputHelper::OnScrollViewerContentPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& args)
01263 {
01264     if (args == winrt::FrameworkElement::HorizontalAlignmentProperty())
01265     {
01266         if (!m_isScrollViewerInDirectManipulation)
01267         {
01268             UpdateInternalExpressionAnimations(true /*horizontalInfoChanged*/, false /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
01269         }
01270     }
01271     else if (args == winrt::FrameworkElement::VerticalAlignmentProperty())
01272     {
01273         if (!m_isScrollViewerInDirectManipulation)
01274         {
01275             UpdateInternalExpressionAnimations(false /*horizontalInfoChanged*/, true /*verticalInfoChanged*/, false /*zoomInfoChanged*/);
01276         }
01277     }
01278 }
01279
01280 void ScrollInputHelper::HookSourceElementLoaded()
01281 {
01282     auto sourceElement = m_sourceElement.get();
01283     if (sourceElement && m_sourceElementLoadedToken.value == 0)
01284     {
01285         winrt::FrameworkElement sourceElementAsFrameworkElement = sourceElement.try_as<winrt::FrameworkElement>();
01286
01287         if (sourceElementAsFrameworkElement)
01288         {
01289             m_sourceElementLoadedToken = sourceElementAsFrameworkElement.Loaded({ this, &ScrollInputHelper::OnSourceElementLoaded });
01290         }
01291     }
01292 }
01293
01294 void ScrollInputHelper::UnhookSourceElementLoaded()
01295 {
01296     auto sourceElement = m_sourceElement.safe_get();
01297     if (sourceElement && m_sourceElementLoadedToken.value != 0)
01298     {
01299         winrt::FrameworkElement sourceElementAsFrameworkElement = sourceElement.try_as<winrt::FrameworkElement>();
01300
01301         if (sourceElementAsFrameworkElement)
01302         {
01303             sourceElementAsFrameworkElement.Loaded(m_sourceElementLoadedToken);
01304             m_sourceElementLoadedToken.value = 0;
01305         }
01306     }
01307 }
01308
01309 void ScrollInputHelper::HookSourceControlTemplateChanged()
01310 {
01311     auto sourceElement = m_sourceElement.get();
01312     if (sourceElement && m_sourceControlTemplateChangedToken.value == 0)
01313     {
01314         m_sourceControlTemplateChangedToken.value = sourceElement.RegisterPropertyChangedCallback(
01315             winrt::Control::TemplateProperty(), { this, &ScrollInputHelper::OnSourceElementPropertyChanged });
01316     }
01317 }
01318
01319 void ScrollInputHelper::UnhookSourceControlTemplateChanged()
01320 {
01321     auto sourceElement = m_sourceElement.safe_get();
01322     if (sourceElement && m_sourceControlTemplateChangedToken.value != 0)
01323     {
01324         sourceElement.UnregisterPropertyChangedCallback(winrt::Control::TemplateProperty(), m_sourceControlTemplateChangedToken.value);
01325         m_sourceControlTemplateChangedToken.value = 0;
01326     }
01327 }
01328
01329 void ScrollInputHelper::HookTargetElementLoaded()
01330 {
01331     auto targetElement = m_targetElement.get();
01332
01333     if (targetElement && m_targetElementLoadedToken.value == 0)
01334     {
01335         winrt::FrameworkElement targetElementAsFrameworkElement = targetElement.try_as<winrt::FrameworkElement>();
01336
01337         if (targetElementAsFrameworkElement)
01338         {
01339             m_targetElementLoadedToken = targetElementAsFrameworkElement.Loaded({ this, &ScrollInputHelper::OnTargetElementLoaded });
01340         }
01341     }
01342 }
01343
01344 void ScrollInputHelper::UnhookTargetElementLoaded()
01345 {
01346     auto targetElement = m_targetElement.safe_get();
01347     if (targetElement && m_targetElementLoadedToken.value != 0)
01348     {
01349         winrt::FrameworkElement targetElementAsFrameworkElement = targetElement.try_as<winrt::FrameworkElement>();
01350
01351         if (targetElementAsFrameworkElement)
01352         {
01353             targetElementAsFrameworkElement.Loaded(m_targetElementLoadedToken);
01354             m_targetElementLoadedToken.value = 0;
01355         }
01356     }
01357 }
01358
01359 void ScrollInputHelper::HookScrollViewerPropertyChanged()
01360 {
01361     auto scrollViewer = m_scrollViewer.get();
01362     if (scrollViewer)
01363     {
01364         MUX_ASSERT(m_scrollViewerContentChangedToken.value == 0);
01365         MUX_ASSERT(m_scrollViewerHorizontalContentAlignmentChangedToken.value == 0);
01366         MUX_ASSERT(m_scrollViewerVerticalContentAlignmentChangedToken.value == 0);
01367         MUX_ASSERT(m_scrollViewerZoomModeChangedToken.value == 0);
01368         MUX_ASSERT(m_sourceSizeChangedToken.value == 0);
01369
01370         m_scrollViewerContentChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
01371             winrt::ContentControl::ContentProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
01372         m_scrollViewerHorizontalContentAlignmentChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
01373             winrt::Control::HorizontalContentAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
01374         m_scrollViewerVerticalContentAlignmentChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
01375             winrt::Control::VerticalContentAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
01376         m_scrollViewerZoomModeChangedToken.value = scrollViewer.RegisterPropertyChangedCallback(
01377             winrt::FxScrollViewer::ZoomModeProperty(), { this, &ScrollInputHelper::OnScrollViewerPropertyChanged });
01378         m_sourceSizeChangedToken = scrollViewer.SizeChanged({ this, &ScrollInputHelper::OnSourceSizeChanged });
01379     }
01380 }
01381
01382 void ScrollInputHelper::HookScrollPresenterPropertyChanged()
01383 {
01384     auto scrollPresenter = m_scrollPresenter.get();
01385
01386     if (scrollPresenter)
01387     {
01388         MUX_ASSERT(m_scrollPresenterContentChangedToken.value == 0);
01389         MUX_ASSERT(m_sourceSizeChangedToken.value == 0);
01390
01391         m_scrollPresenterContentChangedToken.value = scrollPresenter.RegisterPropertyChangedCallback(
01392             winrt::ScrollPresenter::ContentProperty(), { this, &ScrollInputHelper::OnScrollPresenterPropertyChanged });
01393         m_sourceSizeChangedToken = scrollPresenter.SizeChanged({ this, &ScrollInputHelper::OnSourceSizeChanged });
01394     }
01395 }
01396
01397 void ScrollInputHelper::UnhookScrollViewerPropertyChanged()
01398 {
01399     auto scrollViewer = m_scrollViewer.safe_get();
01400     if (scrollViewer)
01401     {
01402         if (m_scrollViewerContentChangedToken.value != 0)
01403         {
01404             scrollViewer.UnregisterPropertyChangedCallback(winrt::ContentControl::ContentProperty(), m_scrollViewerContentChangedToken.value);
01405             m_scrollViewerContentChangedToken.value = 0;
01406         }
01407         if (m_scrollViewerHorizontalContentAlignmentChangedToken.value != 0)
01408         {
01409             scrollViewer.UnregisterPropertyChangedCallback(winrt::Control::HorizontalContentAlignmentProperty(), m_scrollViewerHorizontalContentAlignmentChangedToken.value);
01410             m_scrollViewerHorizontalContentAlignmentChangedToken.value = 0;
01411         }
01412         if (m_scrollViewerVerticalContentAlignmentChangedToken.value != 0)
01413         {
01414             scrollViewer.UnregisterPropertyChangedCallback(winrt::Control::VerticalContentAlignmentProperty(), m_scrollViewerVerticalContentAlignmentChangedToken.value);
01415             m_scrollViewerVerticalContentAlignmentChangedToken.value = 0;
01416         }
01417         if (m_scrollViewerZoomModeChangedToken.value != 0)
01418         {
01419             scrollViewer.UnregisterPropertyChangedCallback(winrt::FxScrollViewer::ZoomModeProperty(), m_scrollViewerZoomModeChangedToken.value);
01420             m_scrollViewerZoomModeChangedToken.value = 0;
01421         }
01422         if (m_sourceSizeChangedToken.value != 0)
01423         {
01424             scrollViewer.SizeChanged(m_sourceSizeChangedToken);
01425             m_sourceSizeChangedToken.value = 0;
01426         }
01427     }
01428 }
01429
01430 void ScrollInputHelper::UnhookScrollPresenterPropertyChanged()
01431 {
01432     auto scrollPresenter = m_scrollPresenter.safe_get();
01433
01434     if (scrollPresenter)
01435     {
01436         if (m_scrollPresenterContentChangedToken.value != 0)
01437         {
01438             scrollPresenter.UnregisterPropertyChangedCallback(winrt::ScrollPresenter::ContentProperty(), m_scrollPresenterContentChangedToken.value);
01439             m_scrollPresenterContentChangedToken.value = 0;
01440         }
01441         if (m_sourceSizeChangedToken.value != 0)
01442         {
01443             scrollPresenter.SizeChanged(m_sourceSizeChangedToken);
01444             m_sourceSizeChangedToken.value = 0;
01445         }
01446     }
01447 }
01448
01449 void ScrollInputHelper::HookScrollViewerContentPropertyChanged()
01450 {
01451     auto sourceContent = m_sourceContent.get();
01452     if (sourceContent)
01453     {
01454         if (m_scrollViewerContentHorizontalAlignmentChangedToken.value == 0)
01455         {
01456             m_scrollViewerContentHorizontalAlignmentChangedToken.value = sourceContent.RegisterPropertyChangedCallback(
01457                 winrt::FrameworkElement::HorizontalAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerContentPropertyChanged });
01458         }
01459         if (m_scrollViewerContentVerticalAlignmentChangedToken.value == 0)
01460         {
01461             m_scrollViewerContentVerticalAlignmentChangedToken.value = sourceContent.RegisterPropertyChangedCallback(
01462                 winrt::FrameworkElement::VerticalAlignmentProperty(), { this, &ScrollInputHelper::OnScrollViewerContentPropertyChanged });
01463         }
01464         if (m_sourceContentSizeChangedToken.value == 0)
01465         {
01466             m_sourceContentSizeChangedToken = sourceContent.SizeChanged({ this, &ScrollInputHelper::OnSourceContentSizeChanged });
01467         }
01468     }
01469 }
01470
01471 void ScrollInputHelper::HookScrollPresenterContentPropertyChanged()
01472 {
01473     auto sourceContent = m_sourceContent.get();
01474
01475     if (sourceContent)
01476     {
01477         if (m_sourceContentSizeChangedToken.value == 0)
01478         {
01479             m_sourceContentSizeChangedToken = sourceContent.SizeChanged({ this, &ScrollInputHelper::OnSourceContentSizeChanged });
01480         }
01481     }
01482 }
01483
01484 void ScrollInputHelper::UnhookScrollViewerContentPropertyChanged()
01485 {
01486     auto sourceContent = m_sourceContent.safe_get();
01487
01488     if (sourceContent)
01489     {
01490         if (m_scrollViewerContentHorizontalAlignmentChangedToken.value != 0)
01491         {
01492             sourceContent.UnregisterPropertyChangedCallback(winrt::FrameworkElement::HorizontalAlignmentProperty(), m_scrollViewerContentHorizontalAlignmentChangedToken.value);
01493             m_scrollViewerContentHorizontalAlignmentChangedToken.value = 0;
01494         }
01495         if (m_scrollViewerContentVerticalAlignmentChangedToken.value != 0)
01496         {
01497             sourceContent.UnregisterPropertyChangedCallback(winrt::FrameworkElement::VerticalAlignmentProperty(), m_scrollViewerContentVerticalAlignmentChangedToken.value);
01498             m_scrollViewerContentVerticalAlignmentChangedToken.value = 0;
01499         }
01500         if (m_sourceContentSizeChangedToken.value != 0)
01501         {
01502             sourceContent.SizeChanged(m_sourceContentSizeChangedToken);
01503             m_sourceContentSizeChangedToken.value = 0;
01504         }
01505     }
01506 }
01507
01508 // Note that if in the future the ScrollPresenter supports a virtual mode where the extent does not
01509 // correspond to its Content size, the ScrollPresenter will need to raise an event when its virtual extent
01510 // changes so that the ScrollPresenter.ExpressionAnimationSources's Extent composition property can
01511 // be read. This should replace hooking up the SizeChanged event on the ScrollPresenter.Content altogether.
01512 void ScrollInputHelper::UnhookScrollPresenterContentPropertyChanged()
01513 {
01514     auto sourceContent = m_sourceContent.safe_get();
01515
01516     if (sourceContent)
01517     {
01518         if (m_sourceContentSizeChangedToken.value != 0)
01519         {
01520             sourceContent.SizeChanged(m_sourceContentSizeChangedToken);
01521             m_sourceContentSizeChangedToken.value = 0;
01522         }
01523     }
01524 }
01525
01526 void ScrollInputHelper::HookScrollViewerDirectManipulationStarted()
01527 {
01528     auto scrollViewer = m_scrollViewer.get();
01529     if (scrollViewer)
01530     {
01531         MUX_ASSERT(m_scrollViewerDirectManipulationStartedToken.value == 0);
01532
01533         m_scrollViewerDirectManipulationStartedToken = scrollViewer.DirectManipulationStarted({ this, &ScrollInputHelper::OnScrollViewerDirectManipulationStarted });
01534     }
01535 }
01536
01537 void ScrollInputHelper::UnhookScrollViewerDirectManipulationStarted()
01538 {
01539     auto scrollViewer = m_scrollViewer.safe_get();
01540     if (scrollViewer && m_scrollViewerDirectManipulationStartedToken.value != 0)
01541     {
01542         scrollViewer.DirectManipulationStarted(m_scrollViewerDirectManipulationStartedToken);
01543         m_scrollViewerDirectManipulationStartedToken.value = 0;
01544     }
01545 }
01546
01547 void ScrollInputHelper::HookScrollViewerDirectManipulationCompleted()
01548 {
01549     auto scrollViewer = m_scrollViewer.get();
01550     if (scrollViewer)
01551     {
01552         MUX_ASSERT(m_scrollViewerDirectManipulationCompletedToken.value == 0);
01553
01554         m_scrollViewerDirectManipulationCompletedToken = scrollViewer.DirectManipulationCompleted({ this, &ScrollInputHelper::OnScrollViewerDirectManipulationCompleted });
01555     }
01556 }
01557
01558 void ScrollInputHelper::UnhookScrollViewerDirectManipulationCompleted()
01559 {
01560     auto scrollViewer = m_scrollViewer.safe_get();
01561     if (scrollViewer && m_scrollViewerDirectManipulationCompletedToken.value != 0)
01562     {
01563         scrollViewer.DirectManipulationCompleted(m_scrollViewerDirectManipulationCompletedToken);
01564         m_scrollViewerDirectManipulationCompletedToken.value = 0;
01565     }
01566 }
01567
01568 void ScrollInputHelper::HookRichEditBoxTextChanged()
01569 {
01570     auto richEditBox = m_richEditBox.get();
01571     if (richEditBox)
01572     {
01573         MUX_ASSERT(m_richEditBoxTextChangedToken.value == 0);
01574
01575         m_richEditBoxTextChangedToken = richEditBox.TextChanged({ this, &ScrollInputHelper::OnRichEditBoxTextChanged });
01576     }
01577 }
01578
01579 void ScrollInputHelper::UnhookRichEditBoxTextChanged()
01580 {
01581     auto richEditBox = m_richEditBox.safe_get();
01582     if (richEditBox && m_richEditBoxTextChangedToken.value != 0)
01583     {
01584         richEditBox.TextChanged(m_richEditBoxTextChangedToken);
01585         m_richEditBoxTextChangedToken.value = 0;
01586     }
01587 }
01588
01589 void ScrollInputHelper::HookCompositionTargetRendering()
01590 {
01591     if (m_renderingToken.value == 0)
01592     {
01593         winrt::Microsoft::UI::Xaml::Media::CompositionTarget compositionTarget{ nullptr };
01594
01595         m_renderingToken = compositionTarget.Rendering({ this, &ScrollInputHelper::OnCompositionTargetRendering });
01596     }
01597 }
01598
01599 void ScrollInputHelper::UnhookCompositionTargetRendering()
01600 {
01601     if (m_renderingToken.value != 0)
01602     {
01603         winrt::Microsoft::UI::Xaml::Media::CompositionTarget compositionTarget{ nullptr };
01604
01605         compositionTarget.Rendering(m_renderingToken);
01606         m_renderingToken.value = 0;
01607     }
01608 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlControlsResourcesProperties Member List

This is the complete list of members for XamlControlsResourcesProperties, including all inherited members.
ClearProperties() | XamlControlsResourcesProperties | [static]
EnsureProperties() | XamlControlsResourcesProperties | [static]
OnUseCompactResourcesPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | XamlControlsResourcesProperties | [static]
s_UseCompactResourcesProperty | XamlControlsResourcesProperties | [static]
UseCompactResources(bool value) | XamlControlsResourcesProperties |
UseCompactResources() | XamlControlsResourcesProperties |
UseCompactResourcesProperty() | XamlControlsResourcesProperties | [inline, static]
XamlControlsResourcesProperties() | XamlControlsResourcesProperties |
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InteractionTests/InfoBarTests.cs Source File

  • File List
  • File Members
  • InfoBar
  • InteractionTests

InfoBarTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019 using MUXTestInfra.Shared.Infra;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00022 {
00023     [TestClass]
00024     public class InfoBarTests
00025     {
00026         [ClassInitialize]
00027         [TestProperty("RunAs", "User")]
00028         [TestProperty("Classification", "Integration")]
00029         [TestProperty("Platform", "Any")]
00030         [TestProperty("MUXControlsTestSuite", "SuiteB")]
00031         public static void ClassInitialize(TestContext testContext)
00032         {
00033             TestEnvironment.Initialize(testContext);
00034         }
00035
00036         public void TestCleanup()
00037         {
00038             TestCleanupHelper.Cleanup();
00039         }
00040
00041         [TestMethod]
00042         public void VerifyAxeScanPasses()
00043         {
00044             using (var setup = new TestSetupHelper("Infobar-Axe"))
00045             {
00046                 AxeTestHelper.TestForAxeIssues();
00047             }
00048         }
00049
00050         [TestMethod]
00051         public void IsClosableTest()
00052         {
00053             using (var setup = new TestSetupHelper("InfoBar Tests"))
00054             {
00055                 StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
00056
00057                 Button closeButton = FindCloseButton(infoBar);
00058                 Verify.IsNotNull(closeButton, "Close button should be visible by default");
00059
00060                 Uncheck("IsClosableCheckBox");
00061                 ElementCache.Clear();
00062                 closeButton = FindCloseButton(infoBar);
00063                 Verify.IsNull(closeButton, "Close button should not be visible when IsClosable=false");
00064
00065                 Check("IsClosableCheckBox");
00066                 ElementCache.Clear();
00067                 closeButton = FindCloseButton(infoBar);
00068                 Verify.IsNotNull(closeButton, "Close button should be visible when IsClosable=true");
00069             }
00070         }
00071
00072         [TestMethod]
00073         public void CloseTest()
00074         {
00075             using (var setup = new TestSetupHelper("InfoBar Tests"))
00076             {
00077                 StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
00078
00079                 Log.Comment("Clicking the close button");
00080                 Button closeButton = FindCloseButton(infoBar);
00081                 closeButton.InvokeAndWait();
00082
00083                 ListBox events = FindElement.ByName<ListBox>("EventListBox");
00084                 Verify.AreEqual(3, events.Items.Count);
00085                 Verify.AreEqual("CloseButtonClick", events.Items[0].Name, "First event should be the CloseButtonClick event");
00086                 Verify.AreEqual("Closing: CloseButton", events.Items[1].Name, "Second event should be the Closing event, reason=CloseButton");
00087                 Verify.AreEqual("Closed: CloseButton", events.Items[2].Name, "Third event should be the Closed event, reason=CloseButton");
00088
00089                 CheckBox isOpenCheckBox = FindElement.ByName<CheckBox>("IsOpenCheckBox");
00090                 Verify.AreEqual(ToggleState.Off, isOpenCheckBox.ToggleState);
00091
00092                 // reopen
00093                 isOpenCheckBox.Check();
00094                 Check("CancelCheckBox");
00095                 Button listBoxClearButton = FindElement.ByName<Button>("ClearButton");
00096                 listBoxClearButton.InvokeAndWait();
00097
00098                 Log.Comment("Clicking the close button but cancel the closing event");
00099                 closeButton.InvokeAndWait();
00100
00101                 Verify.AreEqual(2, events.Items.Count);
00102                 Verify.AreEqual("CloseButtonClick", events.Items[0].Name, "First event should be the CloseButtonClick event");
00103                 Verify.AreEqual("Closing: CloseButton", events.Items[1].Name, "Second event should be the Closing event, reason=CloseButton");
00104                 Verify.AreEqual(ToggleState.On, isOpenCheckBox.ToggleState);
00105
00106                 Uncheck("CancelCheckBox");
00107
00108                 Log.Comment("Close programmatically");
00109                 listBoxClearButton.InvokeAndWait();
00110                 isOpenCheckBox.Uncheck();
00111                 Wait.ForIdle();
00112
00113                 Verify.AreEqual(2, events.Items.Count);
00114                 Verify.AreEqual("Closing: Programmatic", events.Items[0].Name, "Second event should be the Closing event, reason=Programmatic");
00115                 Verify.AreEqual("Closed: Programmatic", events.Items[1].Name, "Third event should be the Closed event, reason=Programmatic");
00116                 Verify.AreEqual(ToggleState.Off, isOpenCheckBox.ToggleState);
00117             }
00118         }
00119
00120         [TestMethod]
00121         public void AccessibilityViewTest()
00122         {
00123             using (var setup = new TestSetupHelper("InfoBar Tests"))
00124             {
00125                 StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
00126                 Verify.IsNotNull(infoBar, "TestInfoBar should be visible by default");
00127
00128                 Log.Comment("Close InfoBar and make sure it can't be found.");
00129                 Uncheck("IsOpenCheckBox");
00130                 ElementCache.Clear();
00131
00132                 infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
00133                 Verify.IsNull(infoBar, "TestInfoBar should not be in the accessible tree");
00134
00135                 infoBar = FindElement.ByName<StatusBar>("DefaultInfoBar");
00136                 Verify.IsNull(infoBar, "By default, Infobar should not be visible");
00137             }
00138         }
00139
00140         [TestMethod]
00141         public void LayoutTest()
00142         {
00143             using (var setup = new TestSetupHelper("InfoBar Tests"))
00144             {
00145                 ComboBox actionComboBox = FindElement.ByName<ComboBox>("ActionButtonComboBox");
00146                 actionComboBox.SelectItemByName("Button");
00147                 Check("HasCustomContentCheckBox");
00148                 ElementCache.Clear();
00149
00150                 StatusBar infoBar = FindElement.ByName<StatusBar>("TestInfoBar");
00151                 CheckBox customContent = FindElement.ByName<CheckBox>("CustomContentCheckBox");
00152
00153                 // 0: icon; 1: title; 2: message; 3: action button
00154                 Log.Comment("Verify that title, message, and action button layout is left-to-right");
00155                 Verify.IsGreaterThan(infoBar.Children[2].BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect Message to be on the right of Title");
00156                 Verify.IsGreaterThan(infoBar.Children[3].BoundingRectangle.X, infoBar.Children[2].BoundingRectangle.X, "Expect action button to be on the right of Message");
00157                 VerifyIsPrettyClose(infoBar.Children[2].BoundingRectangle.Y, infoBar.Children[1].BoundingRectangle.Y, "Expect Message to be top-aligned with Title");
00158
00159                 Verify.IsGreaterThan(customContent.BoundingRectangle.Y, infoBar.Children[1].BoundingRectangle.Y, "Expect custom content to be on under all other things");
00160                 VerifyIsPrettyClose(customContent.BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect custom content to be left-aligned with title");
00161
00162                 Log.Comment("Change title and message to long strings");
00163                 Edit editTitle = FindElement.ByName<Edit>("TitleTextBox");
00164                 Edit editMessage = FindElement.ByName<Edit>("MessageTextBox");
00165                 editTitle.SetValueAndWait("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vel orci eros. Sed ut lectus ultrices quam hendrerit sagittis. Cras gravida eleifend eros, eu pulvinar lectus molestie dictum. Vivamus et tellus euismod, dapibus odio vel, volutpat risus.");
00166                 editMessage.SetValueAndWait("Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent vehicula mauris eu libero pretium ullamcorper.");
00167
00168                 Log.Comment("Verify that title, message, and action button layout is top-to-bottom");
00169                 Verify.IsGreaterThan(infoBar.Children[2].BoundingRectangle.Y, infoBar.Children[1].BoundingRectangle.Y, "Expect Message to be below Title");
00170                 Verify.IsGreaterThan(infoBar.Children[3].BoundingRectangle.Y, infoBar.Children[2].BoundingRectangle.Y, "Expect action button to be below Message");
00171                 VerifyIsPrettyClose(infoBar.Children[2].BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect Message to be left-aligned with Title");
00172                 VerifyIsPrettyClose(infoBar.Children[3].BoundingRectangle.X, infoBar.Children[2].BoundingRectangle.X, "Expect action button to be left-aligned Message");
00173
00174                 Verify.IsGreaterThan(customContent.BoundingRectangle.Y, infoBar.Children[3].BoundingRectangle.Y, "Expect custom content to be on under all other things");
00175                 VerifyIsPrettyClose(customContent.BoundingRectangle.X, infoBar.Children[1].BoundingRectangle.X, "Expect custom content to be left-aligned with everyone else");
00176             }
00177         }
00178
00179         void VerifyIsPrettyClose(int a, int b, string message)
00180         {
00181             // Due to rounding between float and int, just make sure the values are pretty close
00182             Verify.IsTrue(a <= b + 1 && a >= b - 1, message + ": expected " + a + ", actual " + b);
00183         }
00184
00185         Button FindCloseButton(UIObject parent)
00186         {
00187             foreach (UIObject elem in parent.Children)
00188             {
00189                 if (elem.Name.Equals("Close"))
00190                 {
00191                     return new Button(elem);
00192                 }
00193             }
00194             Log.Comment("Did not find Close button for object " + parent.Name);
00195             return null;
00196         }
00197
00198         void Check(string checkboxName)
00199         {
00200             CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
00201             checkBox.Check();
00202             Log.Comment("Checked " + checkboxName + " checkbox");
00203             Wait.ForIdle();
00204         }
00205
00206         void Uncheck(string checkboxName)
00207         {
00208             CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
00209             checkBox.Uncheck();
00210             Log.Comment("Unchecked " + checkboxName + " checkbox");
00211             Wait.ForIdle();
00212         }
00213     }
00214 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper Member List

This is the complete list of members for ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper, including all inherited members.
ItemsViewTestSetupHelper(ICollection< string > testNames, TestSetupHelperOptions options, bool shouldRestrictInnerFrameSize, string outputDebugStringLevel, ICollection< string > outputDebugStringComponentTypes) | ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper | [inline]
SetCheckBoxValue(string checkBoxName, bool checkBoxValue) | ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper | [inline, private]
SetOutputDebugStringLevel(string outputDebugStringLevel) | ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper | [inline, private]
TestPageLoaded(string testName) | ItemsViewTestsWithInputHelper::ItemsViewTestSetupHelper | [inline, protected]
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarHighlighterButton.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarHighlighterButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarHighlighterButton.g.h"
00011
00012 #include "InkToolBarPenButton.h"
00013
00014 class InkToolBarHighlighterButton :
00015     public winrt::implementation::InkToolBarHighlighterButtonT<InkToolBarHighlighterButton, InkToolBarPenButton>
00016 {
00017 public:
00018     ForwardRefToBaseReferenceTracker(InkToolBarPenButton)
00019 };
00020
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerInvokedEventArgs Member List

This is the complete list of members for ItemContainerInvokedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ItemContainerInvokedEventArgs > &&self) noexcept | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< ItemContainerInvokedEventArgs > &&self) | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
Handled() | ItemContainerInvokedEventArgs |
Handled(bool value) | ItemContainerInvokedEventArgs |
InteractionTrigger() | ItemContainerInvokedEventArgs |
IsOnThread() | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
ItemContainerInvokedEventArgs(const winrt::ItemContainerInteractionTrigger &interactionTrigger, const winrt::IInspectable &originalSource) | ItemContainerInvokedEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
OriginalSource() | ItemContainerInvokedEventArgs |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing > | [inline]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrush.idl Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicBrush.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XM_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00007 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00008 [MUX_HAS_CUSTOM_FACTORY]
00009 unsealed runtimeclass AcrylicBrush : Microsoft.UI.Xaml.Media.XamlCompositionBrushBase
00010 {
00011     AcrylicBrush();
00012
00013     [MUX_DEFAULT_VALUE("AcrylicBrush::sc_defaultTintColor")]
00014     Windows.UI.Color TintColor { get; set; };
00015
00016     [MUX_DEFAULT_VALUE("AcrylicBrush::sc_defaultTintOpacity")]
00017     [MUX_PROPERTY_VALIDATION_CALLBACK("CoerceToZeroOneRange")]
00018     Double TintOpacity { get; set; };
00019
00020     [MUX_DEFAULT_VALUE("AcrylicBrush::sc_defaultTintTransitionDuration")]
00021     Windows.Foundation.TimeSpan TintTransitionDuration { get; set; };
00022
00023     Boolean AlwaysUseFallback { get; set; };
00024
00025     [MUX_PUBLIC]
00026     {
00027         [MUX_PROPERTY_VALIDATION_CALLBACK("CoerceToZeroOneRange_Nullable")]
00028         Windows.Foundation.IReference<Double> TintLuminosityOpacity{ get; set; };
00029     }
00030
00031     static Microsoft.UI.Xaml.DependencyProperty TintColorProperty { get; };
00032     static Microsoft.UI.Xaml.DependencyProperty TintOpacityProperty { get; };
00033     static Microsoft.UI.Xaml.DependencyProperty TintTransitionDurationProperty { get; };
00034     static Microsoft.UI.Xaml.DependencyProperty AlwaysUseFallbackProperty { get; };
00035
00036     [MUX_PUBLIC]
00037     {
00038         static Microsoft.UI.Xaml.DependencyProperty TintLuminosityOpacityProperty { get; };
00039     }
00040 }
00041
00042 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlTestPageElements Member List

This is the complete list of members for PagerControlTestPageElements, including all inherited members.
CheckIfButtonsHiddenButton | PagerControlTestPageElements | [private]
CheckIfButtonsHiddenLabel | PagerControlTestPageElements | [private]
ComboBoxIsEnabledCheckBox | PagerControlTestPageElements | [private]
ComboBoxVisibilityCheckBox | PagerControlTestPageElements | [private]
CurrentPageIdentifierLeftMarginTextBlock | PagerControlTestPageElements | [private]
CurrentPageTextBlock | PagerControlTestPageElements | [private]
DisplayModeComboBox | PagerControlTestPageElements | [private]
EnterInfinityModeButton | PagerControlTestPageElements | [private]
FirstPageButton | PagerControlTestPageElements | [private]
FirstPageButtonIsEnabledCheckBox | PagerControlTestPageElements | [private]
FirstPageButtonVisibilityCheckBox | PagerControlTestPageElements | [private]
FirstPageButtonVisibilityComboBox | PagerControlTestPageElements | [private]
GetCheckIfButtonsHiddenButton() | PagerControlTestPageElements | [inline]
GetCheckIfButtonsHiddenLabel() | PagerControlTestPageElements | [inline]
GetComboBoxIsEnabledCheckBox() | PagerControlTestPageElements | [inline]
GetComboBoxVisibilityCheckBox() | PagerControlTestPageElements | [inline]
GetCurrentPageIdentifierLeftMarginTextBlock() | PagerControlTestPageElements | [inline]
GetCurrentPageTextBlock() | PagerControlTestPageElements | [inline]
GetDisplayModeComboBox() | PagerControlTestPageElements | [inline]
GetElement< T >(ref T element, string elementName) | PagerControlTestPageElements | [inline, private]
GetElementWithinPager< T >(ref T element, string elementName) | PagerControlTestPageElements | [inline, private]
GetEnterInfinityModeButton() | PagerControlTestPageElements | [inline]
GetFirstPageButton() | PagerControlTestPageElements | [inline]
GetFirstPageButtonIsEnabledCheckBox() | PagerControlTestPageElements | [inline]
GetFirstPageButtonVisibilityCheckBox() | PagerControlTestPageElements | [inline]
GetFirstPageButtonVisibilityComboBox() | PagerControlTestPageElements | [inline]
GetIncreaseNumberOfPagesButton() | PagerControlTestPageElements | [inline]
GetLastPageButton() | PagerControlTestPageElements | [inline]
GetLastPageButtonIsEnabledCheckBox() | PagerControlTestPageElements | [inline]
GetLastPageButtonVisibilityCheckBox() | PagerControlTestPageElements | [inline]
GetLastPageButtonVisibilityComboBox() | PagerControlTestPageElements | [inline]
GetNextPageButton() | PagerControlTestPageElements | [inline]
GetNextPageButtonIsEnabledCheckBox() | PagerControlTestPageElements | [inline]
GetNextPageButtonVisibilityCheckBox() | PagerControlTestPageElements | [inline]
GetNextPageButtonVisibilityComboBox() | PagerControlTestPageElements | [inline]
GetNumberBoxIsEnabledCheckBox() | PagerControlTestPageElements | [inline]
GetNumberBoxVisibilityCheckBox() | PagerControlTestPageElements | [inline]
GetNumberOfPagesSetterButton() | PagerControlTestPageElements | [inline]
GetNumberOfPagesTextBlock() | PagerControlTestPageElements | [inline]
GetNumberPanelButton(string elementName) | PagerControlTestPageElements | [inline]
GetNumberPanelContentTextBlock() | PagerControlTestPageElements | [inline]
GetNumberPanelVisibilityCheckBox() | PagerControlTestPageElements | [inline]
GetPagerComboBox() | PagerControlTestPageElements | [inline]
GetPagerControl() | PagerControlTestPageElements | [inline]
GetPagerNumberBox() | PagerControlTestPageElements | [inline]
GetPreviousPageButton() | PagerControlTestPageElements | [inline]
GetPreviousPageButtonIsEnabledCheckBox() | PagerControlTestPageElements | [inline]
GetPreviousPageButtonVisibilityCheckBox() | PagerControlTestPageElements | [inline]
GetPreviousPageButtonVisibilityComboBox() | PagerControlTestPageElements | [inline]
GetPreviousPageTextBlock() | PagerControlTestPageElements | [inline]
GetUpdateMarginTextBlockButton() | PagerControlTestPageElements | [inline]
IncreaseNumberOfPagesButton | PagerControlTestPageElements | [private]
LastPageButton | PagerControlTestPageElements | [private]
LastPageButtonIsEnabledCheckBox | PagerControlTestPageElements | [private]
LastPageButtonVisibilityCheckBox | PagerControlTestPageElements | [private]
LastPageButtonVisibilityComboBox | PagerControlTestPageElements | [private]
NextPageButton | PagerControlTestPageElements | [private]
NextPageButtonIsEnabledCheckBox | PagerControlTestPageElements | [private]
NextPageButtonVisibilityCheckBox | PagerControlTestPageElements | [private]
NextPageButtonVisibilityComboBox | PagerControlTestPageElements | [private]
NumberBoxIsEnabledCheckBox | PagerControlTestPageElements | [private]
NumberBoxVisibilityCheckBox | PagerControlTestPageElements | [private]
NumberOfPagesSetterButton | PagerControlTestPageElements | [private]
NumberOfPagesTextBlock | PagerControlTestPageElements | [private]
NumberPanelContentTextBlock | PagerControlTestPageElements | [private]
NumberPanelVisibilityCheckBox | PagerControlTestPageElements | [private]
PagerComboBox | PagerControlTestPageElements | [private]
PagerControl | PagerControlTestPageElements | [private]
PagerNumberBox | PagerControlTestPageElements | [private]
PreviousPageButton | PagerControlTestPageElements | [private]
PreviousPageButtonIsEnabledCheckBox | PagerControlTestPageElements | [private]
PreviousPageButtonVisibilityCheckBox | PagerControlTestPageElements | [private]
PreviousPageButtonVisibilityComboBox | PagerControlTestPageElements | [private]
PreviousPageTextBlock | PagerControlTestPageElements | [private]
UpdateMarginTextBlockButton | PagerControlTestPageElements | [private]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RepeatedScrollSnapPoint Member List

This is the complete list of members for RepeatedScrollSnapPoint, including all inherited members.
ActualEnd() const | RepeatedScrollSnapPoint | [private]
ActualOffset() const | RepeatedScrollSnapPoint | [private]
ActualStart() const | RepeatedScrollSnapPoint | [private]
Combine(int &combinationCount, winrt::SnapPointBase const &snapPoint) const | RepeatedScrollSnapPoint |
CreateConditionalExpression(std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | RepeatedScrollSnapPoint |
CreateRestingPointExpression(double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | RepeatedScrollSnapPoint |
DetermineActualApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint) | RepeatedScrollSnapPoint |
DetermineActualImpulseApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue) | RepeatedScrollSnapPoint |
DetermineFirstRepeatedSnapPointValue() const | RepeatedScrollSnapPoint | [private]
DetermineLastRepeatedSnapPointValue() const | RepeatedScrollSnapPoint | [private]
DetermineMaxActualApplicableZone(const SnapPointBase *nextSnapPoint) const | RepeatedScrollSnapPoint | [private]
DetermineMaxActualImpulseApplicableZone(const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double nextIgnoredValue) const | RepeatedScrollSnapPoint | [private]
DetermineMinActualApplicableZone(const SnapPointBase *previousSnapPoint) const | RepeatedScrollSnapPoint | [private]
DetermineMinActualImpulseApplicableZone(const SnapPointBase *previousSnapPoint, double currentIgnoredValue, double previousIgnoredValue) const | RepeatedScrollSnapPoint | [private]
End() | RepeatedScrollSnapPoint |
Evaluate(std::tuple< double, double > actualApplicableZone, double value) const | RepeatedScrollSnapPoint |
ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const | RepeatedScrollSnapPoint |
Influence(double edgeOfMidpoint) const | RepeatedScrollSnapPoint |
Interval() | RepeatedScrollSnapPoint |
Offset() | RepeatedScrollSnapPoint |
RepeatedScrollSnapPoint(double offset, double interval, double start, double end, winrt::ScrollSnapPointsAlignment alignment=winrt::ScrollSnapPointsAlignment::Near) | RepeatedScrollSnapPoint |
SnapCount() const | RepeatedScrollSnapPoint |
SortPredicate() const | RepeatedScrollSnapPoint |
Start() | RepeatedScrollSnapPoint |
UpdateConditionalExpressionAnimationForImpulse(winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const | RepeatedScrollSnapPoint |
UpdateRestingPointExpressionAnimationForImpulse(winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const | RepeatedScrollSnapPoint |
ValidateConstructorParameters(double offset, double interval, double start, double end) const | RepeatedScrollSnapPoint | [private]
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GroupedSample Member List

This is the complete list of members for GroupedSample, including all inherited members.
_groupedData | GroupedSample | [private]
_layout | GroupedSample | [private]
_rnd | GroupedSample | [private]
GroupedSample() | GroupedSample | [inline]
groupRepeater_ElementIndexChanged(ItemsRepeater sender, ItemsRepeaterElementIndexChangedEventArgs args) | GroupedSample | [inline, private]
groupRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | GroupedSample | [inline, private]
OnBackClicked(object sender, RoutedEventArgs e) | GroupedSample | [inline, private]
OnMultipleSelectionClicked(object sender, RoutedEventArgs e) | GroupedSample | [inline, private]
OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args) | GroupedSample | [inline, private]
OnTreeViewClicked(object sender, RoutedEventArgs e) | GroupedSample | [inline, private]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.cpp Source File

  • File List
  • File Members
  • Generated

CommandBarFlyoutCommandBarAutomationProperties.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "CommandBarFlyoutCommandBarAutomationProperties.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(CommandBarFlyoutCommandBarAutomationProperties)
00012 }
00013
00014 #include "CommandBarFlyoutCommandBarAutomationProperties.g.cpp"
00015
00016 GlobalDependencyProperty CommandBarFlyoutCommandBarAutomationPropertiesProperties::s_ControlTypeProperty{ nullptr };
00017
00018 CommandBarFlyoutCommandBarAutomationPropertiesProperties::CommandBarFlyoutCommandBarAutomationPropertiesProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void CommandBarFlyoutCommandBarAutomationPropertiesProperties::EnsureProperties()
00024 {
00025     if (!s_ControlTypeProperty)
00026     {
00027         s_ControlTypeProperty =
00028             InitializeDependencyProperty(
00029                 L"ControlType",
00030                 winrt::name_of<winrt::AutomationControlType>(),
00031                 winrt::name_of<winrt::CommandBarFlyoutCommandBarAutomationProperties>(),
00032                 true /* isAttached */,
00033                 ValueHelper<winrt::AutomationControlType>::BoxValueIfNecessary(winrt::AutomationControlType::Custom),
00034                 &CommandBarFlyoutCommandBarAutomationProperties::OnControlTypePropertyChanged);
00035     }
00036 }
00037
00038 void CommandBarFlyoutCommandBarAutomationPropertiesProperties::ClearProperties()
00039 {
00040     s_ControlTypeProperty = nullptr;
00041 }
00042
00043
00044 void CommandBarFlyoutCommandBarAutomationPropertiesProperties::SetControlType(winrt::UIElement const& target, winrt::AutomationControlType const& value)
00045 {
00046     target.SetValue(s_ControlTypeProperty, ValueHelper<winrt::AutomationControlType>::BoxValueIfNecessary(value));
00047 }
00048
00049 winrt::AutomationControlType CommandBarFlyoutCommandBarAutomationPropertiesProperties::GetControlType(winrt::UIElement const& target)
00050 {
00051     return ValueHelper<winrt::AutomationControlType>::CastOrUnbox(target.GetValue(s_ControlTypeProperty));
00052 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemSeparator.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemSeparator.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewItemSeparator.h"
00007 #include "Utils.h"
00008
00009 #include "NavigationViewItemSeparator.properties.cpp"
00010
00011 static constexpr auto c_rootGrid = L"NavigationViewItemSeparatorRootGrid"sv;
00012
00013 NavigationViewItemSeparator::NavigationViewItemSeparator()
00014 {
00015     SetDefaultStyleKey(this);
00016 }
00017
00018 void NavigationViewItemSeparator::UpdateVisualState(bool useTransitions)
00019 {
00020     if (m_appliedTemplate)
00021     {
00022         static auto groupName = L"NavigationSeparatorLineStates"sv;
00023         const auto stateName = (Position() != NavigationViewRepeaterPosition::TopPrimary && Position() != NavigationViewRepeaterPosition::TopFooter)
00024             ? m_isClosedCompact
00025                 ? L"HorizontalLineCompact"sv
00026                 : L"HorizontalLine"sv
00027             : L"VerticalLine"sv;
00028
00029         VisualStateUtil::GoToStateIfGroupExists(*this, groupName, stateName, false /*useTransitions*/);
00030     }
00031 }
00032
00033 void NavigationViewItemSeparator::OnApplyTemplate()
00034 {
00035     // Stop UpdateVisualState before template is applied. Otherwise the visual may not the same as we expect
00036     m_appliedTemplate = false;
00037     NavigationViewItemBase::OnApplyTemplate();
00038
00039     if (auto rootGrid = GetTemplateChildT<winrt::Grid>(c_rootGrid, *this))
00040     {
00041         m_rootGrid.set(rootGrid);
00042     }
00043
00044     if (auto splitView = GetSplitView())
00045     {
00046         m_splitViewIsPaneOpenChangedRevoker = RegisterPropertyChanged(splitView,
00047             winrt::SplitView::IsPaneOpenProperty(), { this, &NavigationViewItemSeparator::OnSplitViewPropertyChanged });
00048         m_splitViewDisplayModeChangedRevoker = RegisterPropertyChanged(splitView,
00049             winrt::SplitView::DisplayModeProperty(), { this, &NavigationViewItemSeparator::OnSplitViewPropertyChanged });
00050
00051         UpdateIsClosedCompact(false);
00052     }
00053
00054     m_appliedTemplate = true;
00055     UpdateVisualState(false /*useTransition*/);
00056     UpdateItemIndentation();
00057 }
00058
00059 void NavigationViewItemSeparator::OnNavigationViewItemBaseDepthChanged()
00060 {
00061     UpdateItemIndentation();
00062 }
00063
00064 void NavigationViewItemSeparator::OnNavigationViewItemBasePositionChanged()
00065 {
00066     UpdateVisualState(false /*useTransition*/);
00067 }
00068
00069 void NavigationViewItemSeparator::OnSplitViewPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& /*args*/)
00070 {
00071     UpdateIsClosedCompact(true);
00072 }
00073
00074 void NavigationViewItemSeparator::UpdateItemIndentation()
00075 {
00076     // Update item indentation based on its depth
00077     if (auto const rootGrid = m_rootGrid.get())
00078     {
00079         auto const oldMargin = rootGrid.Margin();
00080         const auto newLeftMargin = Depth() * c_itemIndentation;
00081         rootGrid.Margin({ static_cast<double>(newLeftMargin), oldMargin.Top, oldMargin.Right, oldMargin.Bottom });
00082     }
00083 }
00084
00085 void NavigationViewItemSeparator::UpdateIsClosedCompact(bool updateVisualState)
00086 {
00087     if (auto splitView = GetSplitView())
00088     {
00089         // Check if the pane is closed and if the splitview is in either compact mode
00090         m_isClosedCompact = !splitView.IsPaneOpen()
00091             && (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactInline);
00092
00093         if (updateVisualState)
00094         {
00095             UpdateVisualState(false /*useTransition*/);
00096         }
00097     }
00098 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/ActivityFeedSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

ActivityFeedSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Linq;
00005 using Microsoft.UI.Xaml.Controls;
00006
00007 namespace MUXControlsTestApp.Samples
00008 {
00009     public sealed partial class ActivityFeedSamplePage : Page
00010     {
00011         public ActivityFeedSamplePage()
00012         {
00013             this.InitializeComponent();
00014             repeater.ItemTemplate = elementFactory;
00015             repeater.ItemsSource = Enumerable.Range(0, 500);
00016         }
00017     }
00018 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterStackPanelAnchoringPage Member List

This is the complete list of members for ScrollPresenterStackPanelAnchoringPage, including all inherited members.
anchorElement | ScrollPresenterStackPanelAnchoringPage | [private]
AppendAsyncEventMessage(string asyncEventMessage) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
AppendAsyncEventMessage() | ScrollPresenterStackPanelAnchoringPage | [inline, private]
asyncEventReportingLock | ScrollPresenterStackPanelAnchoringPage | [private]
blanchedAlmondBrush | ScrollPresenterStackPanelAnchoringPage | [private]
BtnAddScrollVelocity_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnClearScrollPresenterEvents_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnExpand_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnExpandMore_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnGetAnchorElement_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnGetCurrentAnchor_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnGetHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnGetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnGetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnGetWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnInsert_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnInvalidateArrange_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnRemove_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnReplace_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnScrollTo_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnSetAnchorElement_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnSetHeight_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnSetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnSetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnSetWidth_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnShrink_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
BtnShrinkMore_Click(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
chartreuseBrush | ScrollPresenterStackPanelAnchoringPage | [private]
ChkHorizontalOrientation_Checked(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ChkHorizontalOrientation_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
CmbAnchorElement_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
currentAnchor | ScrollPresenterStackPanelAnchoringPage | [private]
ExecuteQueuedOperations() | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ExecuteTriggerableOperations() | ScrollPresenterStackPanelAnchoringPage | [inline, private]
Expand(int index, int amount) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
Insert(int newIndex, int newCount) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
lastScrollPresenterOffset | ScrollPresenterStackPanelAnchoringPage | [private]
lstAsyncEventMessage | ScrollPresenterStackPanelAnchoringPage | [private]
lstQueuedOperations | ScrollPresenterStackPanelAnchoringPage | [private]
lstTriggeredOperations | ScrollPresenterStackPanelAnchoringPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, protected]
operationCount | ScrollPresenterStackPanelAnchoringPage | [private]
orangeBrush | ScrollPresenterStackPanelAnchoringPage | [private]
QueuedOperationType enum name | ScrollPresenterStackPanelAnchoringPage | [private]
Remove(int oldIndex, int oldCount) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
Replace(int oldIndex, int oldCount, int newCount) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenter_AnchorRequested(ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenter_SizeChanged(object sender, SizeChangedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenterStackPanelAnchoringPage() | ScrollPresenterStackPanelAnchoringPage | [inline]
ScrollPresenterStackPanelAnchoringPage_Loaded(object sender, RoutedEventArgs e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
ScrollPresenterTestHooks_AnchorEvaluated(ScrollPresenter sender, ScrollPresenterTestHooksAnchorEvaluatedEventArgs args) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
Shrink(int index, int amount) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
timer | ScrollPresenterStackPanelAnchoringPage | [private]
Timer_Tick(object sender, object e) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
UpdateHorizontalAnchorRatio() | ScrollPresenterStackPanelAnchoringPage | [inline, private]
UpdateRaiseAnchorNotifications(bool raiseAnchorNotifications) | ScrollPresenterStackPanelAnchoringPage | [inline, private]
UpdateVerticalAnchorRatio() | ScrollPresenterStackPanelAnchoringPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedAcceptVisualSource.idl Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedAcceptVisualSource.idl

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.0.2+gebbbdfc697
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedAcceptVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedAcceptVisualSource.json (22496 bytes created 11:36-07:00 May 14 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 namespace MU_XCAV_NAMESPACE
00022 {
00023     [MUX_PUBLIC]
00024     [webhosthidden]
00025     runtimeclass AnimatedAcceptVisualSource
00026         : [default] Microsoft.UI.Xaml.Controls.IAnimatedVisualSource, Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
00027     {
00028         AnimatedAcceptVisualSource();
00029     };
00030 }
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarMenuButton.properties.h Source File

  • File List
  • File Members
  • Generated

InkToolBarMenuButton.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class InkToolBarMenuButtonProperties
00008 {
00009 public:
00010     InkToolBarMenuButtonProperties();
00011
00012     void IsExtensionGlyphShown(bool value);
00013     bool IsExtensionGlyphShown();
00014
00015     void MenuKind(winrt::InkToolBarMenuKind const& value);
00016     winrt::InkToolBarMenuKind MenuKind();
00017
00018     static winrt::DependencyProperty IsExtensionGlyphShownProperty() { return s_IsExtensionGlyphShownProperty; }
00019     static winrt::DependencyProperty MenuKindProperty() { return s_MenuKindProperty; }
00020
00021     static GlobalDependencyProperty s_IsExtensionGlyphShownProperty;
00022     static GlobalDependencyProperty s_MenuKindProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/VirtualizingDataSource.cs Source File

  • File List
  • File Members
  • TreeView
  • TestUI

VirtualizingDataSource.cs

Go to the documentation of this file.
00001 using Microsoft.UI.Xaml.Controls;
00002 using System;
00003 using System.Collections.Generic;
00004 using System.Text;
00005 using Windows.ApplicationModel.Chat;
00006
00007 namespace MUXControlsTestApp
00008 {
00009     public class CustomContent
00010     {
00011         public List<CustomContent> Children = new List<CustomContent>();
00012
00013         private int nestingLevel;
00014         private int index;
00015
00016         public CustomContent(int nestingLevel = 3,int index=0)
00017         {
00018             this.nestingLevel = nestingLevel;
00019             this.index = index;
00020             if(nestingLevel <= 0)
00021             {
00022                 return;
00023             }
00024             for (int i = 0; i < 4; i++)
00025             {
00026                 Children.Add(new CustomContent(nestingLevel - 1,i));
00027             }
00028         }
00029
00030         public override string ToString()
00031         {
00032             return $"Item: {this.index}; layer: {this.nestingLevel}";
00033         }
00034
00035         public TreeViewNode GetTreeViewNode()
00036         {
00037             var node = new TreeViewNode();
00038             node.Content = this;
00039             node.HasUnrealizedChildren = this.Children.Count != 0;
00040             return node;
00041         }
00042     }
00043
00044     public class VirtualizingDataSource
00045     {
00046         public static void FillTreeNode(TreeViewNode node)
00047         {
00048             var customContent = (CustomContent)node.Content;
00049             if(customContent != null)
00050             {
00051                 if(node.HasUnrealizedChildren)
00052                 {
00053                     foreach(var child in customContent.Children)
00054                     {
00055                         node.Children.Add(child.GetTreeViewNode());
00056                     }
00057                 }
00058                 node.HasUnrealizedChildren = false;
00059             }
00060         }
00061
00062         public static void EmptyTreeNode(TreeViewNode node)
00063         {
00064             node.Children.Clear();
00065             node.HasUnrealizedChildren = true;
00066         }
00067     }
00068 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

SwipeTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SwipeTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(SwipeTestHooks)
00012 }
00013
00014 #include "SwipeTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealListPage Member List

This is the complete list of members for RevealListPage, including all inherited members.
DataTemplateList | RevealListPage |
OnBackgroundColorButtonClick(object sender, RoutedEventArgs e) | RevealListPage | [inline, private]
OnBorderColorButtonClick(object sender, RoutedEventArgs e) | RevealListPage | [inline, private]
RevealListPage() | RevealListPage | [inline]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSliderAutomationPeer.cpp Source File

  • File List
  • File Members
  • ColorPicker

ColorPickerSliderAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ColorPickerSliderAutomationPeer.h"
00007
00008 #include "ColorPicker.h"
00009 #include "ResourceAccessor.h"
00010 #include "Utils.h"
00011
00012 #include "ColorPickerSliderAutomationPeer.properties.cpp"
00013
00014 ColorPickerSliderAutomationPeer::ColorPickerSliderAutomationPeer(winrt::ColorPickerSlider const& owner)
00015     : ReferenceTracker(owner)
00016 {
00017 }
00018
00019 winrt::IInspectable ColorPickerSliderAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00020 {
00021     // If this slider is handling the alpha channel, then we don't want to do anything special for it -
00022     // in that case, we'll just return the base SliderAutomationPeer.
00023     if (Owner().as<winrt::ColorPickerSlider>().ColorChannel() != winrt::ColorPickerHsvChannel::Alpha && patternInterface == winrt::PatternInterface::Value)
00024     {
00025         return *this;
00026     }
00027
00028     return __super::GetPatternCore(patternInterface);
00029 }
00030
00031 bool ColorPickerSliderAutomationPeer::IsReadOnly()
00032 {
00033     return false;
00034 }
00035
00036 winrt::hstring ColorPickerSliderAutomationPeer::Value()
00037 {
00038     winrt::ColorPickerSlider owner = Owner().as<winrt::ColorPickerSlider>();
00039     winrt::DependencyObject currentObject = owner;
00040     winrt::ColorPicker owningColorPicker{ nullptr };
00041
00042     while (currentObject && !(owningColorPicker = currentObject.try_as<winrt::ColorPicker>()))
00043     {
00044         currentObject = winrt::VisualTreeHelper::GetParent(currentObject);
00045     }
00046
00047     if (owningColorPicker)
00048     {
00049         const winrt::Color color = owningColorPicker.Color();
00050         const double sliderValue = owner.Value();
00051
00052         return GetValueString(color, static_cast<int>(round(sliderValue)));
00053     }
00054     else
00055     {
00056         return L"";
00057     }
00058 }
00059
00060 void ColorPickerSliderAutomationPeer::SetValue(winrt::hstring const& /*value*/)
00061 {
00062     MUX_ASSERT(false); // Not implemented.
00063 }
00064
00065 void ColorPickerSliderAutomationPeer::RaisePropertyChangedEvent(winrt::Color oldColor, winrt::Color newColor, int oldValue, int newValue)
00066 {
00067     winrt::hstring oldValueString = GetValueString(oldColor, oldValue);
00068     winrt::hstring newValueString = GetValueString(newColor, newValue);
00069
00070     __super::RaisePropertyChangedEvent(winrt::ValuePatternIdentifiers::ValueProperty(), box_value(oldValueString), box_value(newValueString));
00071 }
00072
00073 winrt::hstring ColorPickerSliderAutomationPeer::GetValueString(winrt::Color color, int value)
00074 {
00075     winrt::hstring resourceStringWithName;
00076     switch (Owner().as<winrt::ColorPickerSlider>().ColorChannel())
00077     {
00078     case winrt::ColorPickerHsvChannel::Hue:
00079         resourceStringWithName = ResourceAccessor::GetLocalizedStringResource(SR_ValueStringHueSliderWithColorName);
00080          break;
00081     case winrt::ColorPickerHsvChannel::Saturation:
00082         resourceStringWithName = ResourceAccessor::GetLocalizedStringResource(SR_ValueStringSaturationSliderWithColorName);
00083         break;
00084     case winrt::ColorPickerHsvChannel::Value:
00085         resourceStringWithName = ResourceAccessor::GetLocalizedStringResource(SR_ValueStringValueSliderWithColorName);
00086         break;
00087     default:
00088         return L"";
00089     }
00090
00091     return StringUtil::FormatString(
00092         resourceStringWithName,
00093         value,
00094         winrt::ColorDisplayNameHelper::ToDisplayName(color).data());
00095 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/APITests/MockAnimatedIconSource.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • APITests

MockAnimatedIconSource.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml.Controls;
00002 using System;
00003 using System.Collections.Generic;
00004 using System.Text;
00005 using Windows.UI;
00006 using Microsoft.UI.Composition;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     class MockAnimatedIconSource : IRichAnimatedVisualSource
00011     {
00012         Dictionary<string, double> markers = new Dictionary<string, double>();
00013
00014         IRichAnimatedVisualSource visual = new Controls_09_Hamburger();
00015         public MockAnimatedIconSource()
00016         {
00017             markers.Add("aTob_Start", 0.0);
00018             markers.Add("aTob_End", 0.316666663);
00019             markers.Add("NormalToPressedStart", 0.0);
00020             markers.Add("NormalToPressedEnd", 0.816666663);
00021             markers.Add("PointerOverToNormalStart", 0.316666663);
00022             markers.Add("PointerOverToNormalEnd", 0.0);
00023             markers.Add("PointerOverToPressedStart", 0.333333343);
00024             markers.Add("PointerOverToPressedEnd", 0.816666663);
00025             markers.Add("PressedToNormalStart", 0.833333313);
00026             markers.Add("PressedToNormalEnd", 0.983333349);
00027             markers.Add("PressedToPointerOverStart", 0.816666663);
00028             markers.Add("PressedToPointerOverEnd", 0.333333343);
00029             markers.Add("Disabled", 0.5);
00030         }
00031         public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor)
00032         {
00033             return visual.TryCreateAnimatedVisual(Window.Current.Compositor);
00034         }
00035
00036         public void SetColorProperty(string propertyName, Color value)
00037         {
00038             visual.SetColorProperty(propertyName, value);
00039         }
00040
00041         public IReadOnlyDictionary<string, double> Markers => markers;
00042     }
00043 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItem.properties.cpp Source File

  • File List
  • File Members
  • Generated

TreeViewItem.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TreeViewItem.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TreeViewItem)
00012 }
00013
00014 #include "TreeViewItem.g.cpp"
00015
00016 GlobalDependencyProperty TreeViewItemProperties::s_CollapsedGlyphProperty{ nullptr };
00017 GlobalDependencyProperty TreeViewItemProperties::s_ExpandedGlyphProperty{ nullptr };
00018 GlobalDependencyProperty TreeViewItemProperties::s_GlyphBrushProperty{ nullptr };
00019 GlobalDependencyProperty TreeViewItemProperties::s_GlyphOpacityProperty{ nullptr };
00020 GlobalDependencyProperty TreeViewItemProperties::s_GlyphSizeProperty{ nullptr };
00021 GlobalDependencyProperty TreeViewItemProperties::s_HasUnrealizedChildrenProperty{ nullptr };
00022 GlobalDependencyProperty TreeViewItemProperties::s_IsExpandedProperty{ nullptr };
00023 GlobalDependencyProperty TreeViewItemProperties::s_ItemsSourceProperty{ nullptr };
00024 GlobalDependencyProperty TreeViewItemProperties::s_TreeViewItemTemplateSettingsProperty{ nullptr };
00025
00026 TreeViewItemProperties::TreeViewItemProperties()
00027 {
00028     EnsureProperties();
00029 }
00030
00031 void TreeViewItemProperties::EnsureProperties()
00032 {
00033     if (!s_CollapsedGlyphProperty)
00034     {
00035         s_CollapsedGlyphProperty =
00036             InitializeDependencyProperty(
00037                 L"CollapsedGlyph",
00038                 winrt::name_of<winrt::hstring>(),
00039                 winrt::name_of<winrt::TreeViewItem>(),
00040                 false /* isAttached */,
00041                 ValueHelper<winrt::hstring>::BoxValueIfNecessary(L"\uE76C"),
00042                 nullptr);
00043     }
00044     if (!s_ExpandedGlyphProperty)
00045     {
00046         s_ExpandedGlyphProperty =
00047             InitializeDependencyProperty(
00048                 L"ExpandedGlyph",
00049                 winrt::name_of<winrt::hstring>(),
00050                 winrt::name_of<winrt::TreeViewItem>(),
00051                 false /* isAttached */,
00052                 ValueHelper<winrt::hstring>::BoxValueIfNecessary(L"\uE70D"),
00053                 nullptr);
00054     }
00055     if (!s_GlyphBrushProperty)
00056     {
00057         s_GlyphBrushProperty =
00058             InitializeDependencyProperty(
00059                 L"GlyphBrush",
00060                 winrt::name_of<winrt::Brush>(),
00061                 winrt::name_of<winrt::TreeViewItem>(),
00062                 false /* isAttached */,
00063                 ValueHelper<winrt::Brush>::BoxedDefaultValue(),
00064                 nullptr);
00065     }
00066     if (!s_GlyphOpacityProperty)
00067     {
00068         s_GlyphOpacityProperty =
00069             InitializeDependencyProperty(
00070                 L"GlyphOpacity",
00071                 winrt::name_of<double>(),
00072                 winrt::name_of<winrt::TreeViewItem>(),
00073                 false /* isAttached */,
00074                 ValueHelper<double>::BoxValueIfNecessary(1.0),
00075                 nullptr);
00076     }
00077     if (!s_GlyphSizeProperty)
00078     {
00079         s_GlyphSizeProperty =
00080             InitializeDependencyProperty(
00081                 L"GlyphSize",
00082                 winrt::name_of<double>(),
00083                 winrt::name_of<winrt::TreeViewItem>(),
00084                 false /* isAttached */,
00085                 ValueHelper<double>::BoxValueIfNecessary(8.0),
00086                 nullptr);
00087     }
00088     if (!s_HasUnrealizedChildrenProperty)
00089     {
00090         s_HasUnrealizedChildrenProperty =
00091             InitializeDependencyProperty(
00092                 L"HasUnrealizedChildren",
00093                 winrt::name_of<bool>(),
00094                 winrt::name_of<winrt::TreeViewItem>(),
00095                 false /* isAttached */,
00096                 ValueHelper<bool>::BoxedDefaultValue(),
00097                 winrt::PropertyChangedCallback(&OnHasUnrealizedChildrenPropertyChanged));
00098     }
00099     if (!s_IsExpandedProperty)
00100     {
00101         s_IsExpandedProperty =
00102             InitializeDependencyProperty(
00103                 L"IsExpanded",
00104                 winrt::name_of<bool>(),
00105                 winrt::name_of<winrt::TreeViewItem>(),
00106                 false /* isAttached */,
00107                 ValueHelper<bool>::BoxedDefaultValue(),
00108                 winrt::PropertyChangedCallback(&OnIsExpandedPropertyChanged));
00109     }
00110     if (!s_ItemsSourceProperty)
00111     {
00112         s_ItemsSourceProperty =
00113             InitializeDependencyProperty(
00114                 L"ItemsSource",
00115                 winrt::name_of<winrt::IInspectable>(),
00116                 winrt::name_of<winrt::TreeViewItem>(),
00117                 false /* isAttached */,
00118                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00119                 winrt::PropertyChangedCallback(&OnItemsSourcePropertyChanged));
00120     }
00121     if (!s_TreeViewItemTemplateSettingsProperty)
00122     {
00123         s_TreeViewItemTemplateSettingsProperty =
00124             InitializeDependencyProperty(
00125                 L"TreeViewItemTemplateSettings",
00126                 winrt::name_of<winrt::TreeViewItemTemplateSettings>(),
00127                 winrt::name_of<winrt::TreeViewItem>(),
00128                 false /* isAttached */,
00129                 ValueHelper<winrt::TreeViewItemTemplateSettings>::BoxedDefaultValue(),
00130                 nullptr);
00131     }
00132 }
00133
00134 void TreeViewItemProperties::ClearProperties()
00135 {
00136     s_CollapsedGlyphProperty = nullptr;
00137     s_ExpandedGlyphProperty = nullptr;
00138     s_GlyphBrushProperty = nullptr;
00139     s_GlyphOpacityProperty = nullptr;
00140     s_GlyphSizeProperty = nullptr;
00141     s_HasUnrealizedChildrenProperty = nullptr;
00142     s_IsExpandedProperty = nullptr;
00143     s_ItemsSourceProperty = nullptr;
00144     s_TreeViewItemTemplateSettingsProperty = nullptr;
00145 }
00146
00147 void TreeViewItemProperties::OnHasUnrealizedChildrenPropertyChanged(
00148     winrt::DependencyObject const& sender,
00149     winrt::DependencyPropertyChangedEventArgs const& args)
00150 {
00151     auto owner = sender.as<winrt::TreeViewItem>();
00152     winrt::get_self<TreeViewItem>(owner)->OnPropertyChanged(args);
00153 }
00154
00155 void TreeViewItemProperties::OnIsExpandedPropertyChanged(
00156     winrt::DependencyObject const& sender,
00157     winrt::DependencyPropertyChangedEventArgs const& args)
00158 {
00159     auto owner = sender.as<winrt::TreeViewItem>();
00160     winrt::get_self<TreeViewItem>(owner)->OnPropertyChanged(args);
00161 }
00162
00163 void TreeViewItemProperties::OnItemsSourcePropertyChanged(
00164     winrt::DependencyObject const& sender,
00165     winrt::DependencyPropertyChangedEventArgs const& args)
00166 {
00167     auto owner = sender.as<winrt::TreeViewItem>();
00168     winrt::get_self<TreeViewItem>(owner)->OnPropertyChanged(args);
00169 }
00170
00171 void TreeViewItemProperties::CollapsedGlyph(winrt::hstring const& value)
00172 {
00173     [[gsl::suppress(con)]]
00174     {
00175     static_cast<TreeViewItem*>(this)->SetValue(s_CollapsedGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00176     }
00177 }
00178
00179 winrt::hstring TreeViewItemProperties::CollapsedGlyph()
00180 {
00181     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_CollapsedGlyphProperty));
00182 }
00183
00184 void TreeViewItemProperties::ExpandedGlyph(winrt::hstring const& value)
00185 {
00186     [[gsl::suppress(con)]]
00187     {
00188     static_cast<TreeViewItem*>(this)->SetValue(s_ExpandedGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00189     }
00190 }
00191
00192 winrt::hstring TreeViewItemProperties::ExpandedGlyph()
00193 {
00194     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_ExpandedGlyphProperty));
00195 }
00196
00197 void TreeViewItemProperties::GlyphBrush(winrt::Brush const& value)
00198 {
00199     [[gsl::suppress(con)]]
00200     {
00201     static_cast<TreeViewItem*>(this)->SetValue(s_GlyphBrushProperty, ValueHelper<winrt::Brush>::BoxValueIfNecessary(value));
00202     }
00203 }
00204
00205 winrt::Brush TreeViewItemProperties::GlyphBrush()
00206 {
00207     return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_GlyphBrushProperty));
00208 }
00209
00210 void TreeViewItemProperties::GlyphOpacity(double value)
00211 {
00212     [[gsl::suppress(con)]]
00213     {
00214     static_cast<TreeViewItem*>(this)->SetValue(s_GlyphOpacityProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00215     }
00216 }
00217
00218 double TreeViewItemProperties::GlyphOpacity()
00219 {
00220     return ValueHelper<double>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_GlyphOpacityProperty));
00221 }
00222
00223 void TreeViewItemProperties::GlyphSize(double value)
00224 {
00225     [[gsl::suppress(con)]]
00226     {
00227     static_cast<TreeViewItem*>(this)->SetValue(s_GlyphSizeProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00228     }
00229 }
00230
00231 double TreeViewItemProperties::GlyphSize()
00232 {
00233     return ValueHelper<double>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_GlyphSizeProperty));
00234 }
00235
00236 void TreeViewItemProperties::HasUnrealizedChildren(bool value)
00237 {
00238     [[gsl::suppress(con)]]
00239     {
00240     static_cast<TreeViewItem*>(this)->SetValue(s_HasUnrealizedChildrenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00241     }
00242 }
00243
00244 bool TreeViewItemProperties::HasUnrealizedChildren()
00245 {
00246     return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_HasUnrealizedChildrenProperty));
00247 }
00248
00249 void TreeViewItemProperties::IsExpanded(bool value)
00250 {
00251     [[gsl::suppress(con)]]
00252     {
00253     static_cast<TreeViewItem*>(this)->SetValue(s_IsExpandedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00254     }
00255 }
00256
00257 bool TreeViewItemProperties::IsExpanded()
00258 {
00259     return ValueHelper<bool>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_IsExpandedProperty));
00260 }
00261
00262 void TreeViewItemProperties::ItemsSource(winrt::IInspectable const& value)
00263 {
00264     [[gsl::suppress(con)]]
00265     {
00266     static_cast<TreeViewItem*>(this)->SetValue(s_ItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00267     }
00268 }
00269
00270 winrt::IInspectable TreeViewItemProperties::ItemsSource()
00271 {
00272     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_ItemsSourceProperty));
00273 }
00274
00275 void TreeViewItemProperties::TreeViewItemTemplateSettings(winrt::TreeViewItemTemplateSettings const& value)
00276 {
00277     [[gsl::suppress(con)]]
00278     {
00279     static_cast<TreeViewItem*>(this)->SetValue(s_TreeViewItemTemplateSettingsProperty, ValueHelper<winrt::TreeViewItemTemplateSettings>::BoxValueIfNecessary(value));
00280     }
00281 }
00282
00283 winrt::TreeViewItemTemplateSettings TreeViewItemProperties::TreeViewItemTemplateSettings()
00284 {
00285     return ValueHelper<winrt::TreeViewItemTemplateSettings>::CastOrUnbox(static_cast<TreeViewItem*>(this)->GetValue(s_TreeViewItemTemplateSettingsProperty));
00286 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/TestUI/ScrollViewerAdapterPage.xaml.cs Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • TestUI

ScrollViewerAdapterPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Text;
00007 using System.Threading;
00008 using Windows.Foundation;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Hosting;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Private.Controls;
00014 using MUXControlsTestApp.Utilities;
00015 using Common;
00016
00017 using WEX.TestExecution;
00018 using WEX.TestExecution.Markup;
00019 using WEX.Logging.Interop;
00020
00021 namespace MUXControlsTestApp
00022 {
00023     [TopLevelTestPage(Name = "ScrollViewerAdapter", Icon = "ScrollViewer.png")]
00024     public sealed partial class ScrollViewerAdapterPage : TestPage
00025     {
00026         Dictionary<string, WeakReference> objects = new Dictionary<string, WeakReference>();
00027
00028         public ScrollViewerAdapterPage()
00029         {
00030             this.InitializeComponent();
00031             this.AdaptOnSVWithoutWaitingForLoadedButton.Click += AdaptOnSVWithoutWaitingForLoaded_Click;
00032             this.RemoveButton.Click += Remove_Click;
00033             this.GCButton.Click += GC_Click;
00034             this.CheckLeaksButton.Click += CheckLeaks_Click;
00035             LogController.InitializeLogging();
00036         }
00037
00038         private void AdaptOnSVWithoutWaitingForLoaded_Click(object sender, RoutedEventArgs e)
00039         {
00040             ScrollViewer sv = new ScrollViewer();
00041             objects["sv"] = new WeakReference(sv);
00042             sv.Content = new Button();
00043             ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
00044             adapter.Adapt(sv, new Size(1.0, 1.0));
00045             this.TestRoot.Children.Add(sv);
00046         }
00047
00048         private void Remove_Click(object sender, RoutedEventArgs e)
00049         {
00050             this.TestRoot.Children.Clear();
00051         }
00052
00053         private void GC_Click(object sender, RoutedEventArgs e)
00054         {
00055             GC.Collect();
00056             GC.WaitForPendingFinalizers();
00057             GC.Collect();
00058         }
00059
00060         private void CheckLeaks_Click(object sender, RoutedEventArgs e)
00061         {
00062             CheckLeaks(objects);
00063         }
00064
00065         void CheckLeaks(Dictionary<string, WeakReference> objects)
00066         {
00067             foreach (var pair in objects)
00068             {
00069                 Log.Comment("Checking if object {0} has been collected", pair.Key);
00070                 object target = pair.Value.Target;
00071                 if (target != null)
00072                 {
00073                     Verify.DisableVerifyFailureExceptions = true; // throwing exceptions makes running this in TDP harder
00074                     Verify.Fail(String.Format("Object {0} is still alive when it should not be.", target));
00075                     Verify.DisableVerifyFailureExceptions = false;
00076                 }
00077             }
00078             objects.Clear();
00079         }
00080     }
00081 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CanvasGeometry Member List

This is the complete list of members for CanvasGeometry, including all inherited members.
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
CanvasGeometry(winrt::com_ptr< ID2D1Geometry > geometry) | CanvasGeometry | [inline]
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SliderPage Member List

This is the complete list of members for SliderPage, including all inherited members.
SliderPage() SliderPage [inline]
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarIScrollControllerPage Member List

This is the complete list of members for AnnotatedScrollBarIScrollControllerPage, including all inherited members.
AnnotatedScrollBar_DetailLabelRequested(object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args) | AnnotatedScrollBarIScrollControllerPage | [inline]
AnnotatedScrollBarIScrollControllerPage() | AnnotatedScrollBarIScrollControllerPage | [inline]
AnnotatedScrollBarPage_Loaded(object sender, RoutedEventArgs e) | AnnotatedScrollBarIScrollControllerPage | [inline, private]
c_SquareWidth | AnnotatedScrollBarIScrollControllerPage | [private]
GetOffsetLabel(double offset) | AnnotatedScrollBarIScrollControllerPage | [inline, private]
GetOffsetOfItem(int itemNumber) | AnnotatedScrollBarIScrollControllerPage | [inline, private]
GetSquareColor(int squareNum) | AnnotatedScrollBarIScrollControllerPage | [inline, private]
LabelCollection | AnnotatedScrollBarIScrollControllerPage |
MOCK_GetItemsPerRow() | AnnotatedScrollBarIScrollControllerPage | [inline, private]
MOCK_GetStaticRowHeight() | AnnotatedScrollBarIScrollControllerPage | [inline, private]
PageAnnotatedScrollbar_Scrolling(AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args) | AnnotatedScrollBarIScrollControllerPage | [inline, private]
PageContentRepeater_Loaded(object sender, object e) | AnnotatedScrollBarIScrollControllerPage | [inline, private]
PopulateLabels() | AnnotatedScrollBarIScrollControllerPage | [inline, private]
PopulateSquares(int rows) | AnnotatedScrollBarIScrollControllerPage | [inline, private]
SquareCollection | AnnotatedScrollBarIScrollControllerPage |
~AnnotatedScrollBarIScrollControllerPage() | AnnotatedScrollBarIScrollControllerPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2CoreObjectsPage Member List

This is the complete list of members for WebView2CoreObjectsPage, including all inherited members.
_areWebviewElementsCleanedUp | WebView2CoreObjectsPage | [private]
_closedExceptionCount | WebView2CoreObjectsPage | [private]
_coreProcessFailedCount | WebView2CoreObjectsPage | [private]
_coreWebView2InitializedCount | WebView2CoreObjectsPage | [private]
_ensureCoreWebView2CompletionCount | WebView2CoreObjectsPage | [private]
_helpers | WebView2CoreObjectsPage | [private]
_loadedCount | WebView2CoreObjectsPage | [private]
_navigationCompletedCount | WebView2CoreObjectsPage | [private]
_navigationStartingCount | WebView2CoreObjectsPage | [private]
_unloadedCount | WebView2CoreObjectsPage | [private]
_wv2_ConcurrentCreation | WebView2CoreObjectsPage | [private]
_wv2_CoreProcessFailed | WebView2CoreObjectsPage | [private]
_wv2_Markup | WebView2CoreObjectsPage | [private]
_wv2_Programmatic_Live | WebView2CoreObjectsPage | [private]
_wv2_Programmatic_Offline | WebView2CoreObjectsPage | [private]
AddWebViewEventHandlers(WebView2 webview) | WebView2CoreObjectsPage | [inline, private]
CleanupCurrentTest(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
CleanupWebViewElements() | WebView2CoreObjectsPage | [inline, private]
OnAdd_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnBad_Source_Browser_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnBad_Source_Render_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnBadSourceButtonClickedHelper(string badUri) | WebView2CoreObjectsPage | [inline, private]
OnClose_ConcurrentCreationElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnClose_LiveElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnClose_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnClose_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnCoreProcessFailed(object sender, CoreWebView2ProcessFailedEventArgs e) | WebView2CoreObjectsPage | [inline, private]
OnCoreWebView2Initialized(WebView2 sender, object args) | WebView2CoreObjectsPage | [inline, private]
OnCoreWebView2Initialized_Ensure(WebView2 sender, object args) | WebView2CoreObjectsPage | [inline, private]
OnCoreWebView2Initialized_Source(WebView2 sender, object args) | WebView2CoreObjectsPage | [inline, private]
OnCreate_ConcurrentCreationElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnCreate_CoreProcessFailed_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnCreate_LiveElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnCreate_MarkupElement_Blank_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnCreate_MarkupElement_Source_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnCreate_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnEnsure_Ensure_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnEnsure_Source_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnEnsureCoreWebView2_LiveElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnEnsureCoreWebView2_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnEnsureCoreWebView2_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnGood_Source_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnLoaded(object sender, RoutedEventArgs e) | WebView2CoreObjectsPage | [inline, private]
OnNavigatingFrom(NavigatingCancelEventArgs e) | WebView2CoreObjectsPage | [inline, protected]
OnNavigationCompleted(WebView2 sender, CoreWebView2NavigationCompletedEventArgs args) | WebView2CoreObjectsPage | [inline, private]
OnNavigationStarting(WebView2 sender, CoreWebView2NavigationStartingEventArgs args) | WebView2CoreObjectsPage | [inline, private]
OnReleaseReference_LiveElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnReleaseReference_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnReloadButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline, private]
OnRemove_ConcurrentCreationElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnRemove_LiveElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnRemove_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnRemove_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnResetCounts_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSetCustomSource_LiveElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSetCustomSource_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSetCustomSource_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSetSource_LiveElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSetSource_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSetSource_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSource_Ensure_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnSource_Source_ButtonClicked(object sender, RoutedEventArgs args) | WebView2CoreObjectsPage | [inline]
OnUnloaded(object sender, RoutedEventArgs e) | WebView2CoreObjectsPage | [inline, private]
Page_Loaded(object sender, RoutedEventArgs e) | WebView2CoreObjectsPage | [inline, private]
RemoveAllWebViewControls() | WebView2CoreObjectsPage | [inline, private]
RemoveWebViewEventHandlers(WebView2 webview) | WebView2CoreObjectsPage | [inline, private]
ResetCounts() | WebView2CoreObjectsPage | [inline, private]
SetClosedExceptionCount(int value) | WebView2CoreObjectsPage | [inline, private]
SetCoreProcessFailedCount(int value) | WebView2CoreObjectsPage | [inline, private]
SetCoreWebView2InitializedCount(int value) | WebView2CoreObjectsPage | [inline, private]
SetEnsureCoreWebView2CompletionCount(int value) | WebView2CoreObjectsPage | [inline, private]
SetLoadedCount(int value) | WebView2CoreObjectsPage | [inline, private]
SetNavigationCompletedCount(int value) | WebView2CoreObjectsPage | [inline, private]
SetNavigationStartingCount(int value) | WebView2CoreObjectsPage | [inline, private]
SetUnloadedCount(int value) | WebView2CoreObjectsPage | [inline, private]
TestList enum name | WebView2CoreObjectsPage | [private]
TestNameComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | WebView2CoreObjectsPage | [inline, private]
WebView2CoreObjectsPage() | WebView2CoreObjectsPage | [inline]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControl.idl Source File

  • File List
  • File Members
  • RatingControl

RatingControl.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass RatingItemInfo : Microsoft.UI.Xaml.DependencyObject
00007 {
00008     RatingItemInfo();
00009 }
00010
00011 [MUX_PUBLIC]
00012 [webhosthidden]
00013 unsealed runtimeclass RatingItemFontInfo : RatingItemInfo
00014 {
00015     RatingItemFontInfo();
00016
00017     String DisabledGlyph { get; set; };
00018     String Glyph { get; set; };
00019     String PointerOverGlyph { get; set; };
00020     String PointerOverPlaceholderGlyph { get; set; };
00021     String PlaceholderGlyph { get; set; };
00022     String UnsetGlyph { get; set; };
00023
00024     static Microsoft.UI.Xaml.DependencyProperty DisabledGlyphProperty { get; };
00025     static Microsoft.UI.Xaml.DependencyProperty GlyphProperty { get; };
00026     static Microsoft.UI.Xaml.DependencyProperty PlaceholderGlyphProperty { get; };
00027     static Microsoft.UI.Xaml.DependencyProperty PointerOverGlyphProperty { get; };
00028     static Microsoft.UI.Xaml.DependencyProperty PointerOverPlaceholderGlyphProperty { get; };
00029     static Microsoft.UI.Xaml.DependencyProperty UnsetGlyphProperty { get; };
00030 }
00031
00032 [MUX_PUBLIC]
00033 [webhosthidden]
00034 unsealed runtimeclass RatingItemImageInfo : RatingItemInfo
00035 {
00036     RatingItemImageInfo();
00037
00038     Microsoft.UI.Xaml.Media.ImageSource DisabledImage { get; set; };
00039     Microsoft.UI.Xaml.Media.ImageSource Image { get; set; };
00040     Microsoft.UI.Xaml.Media.ImageSource PlaceholderImage { get; set; };
00041     Microsoft.UI.Xaml.Media.ImageSource PointerOverImage { get; set; };
00042     Microsoft.UI.Xaml.Media.ImageSource PointerOverPlaceholderImage { get; set; };
00043     Microsoft.UI.Xaml.Media.ImageSource UnsetImage { get; set; };
00044
00045     static Microsoft.UI.Xaml.DependencyProperty DisabledImageProperty { get; };
00046     static Microsoft.UI.Xaml.DependencyProperty ImageProperty { get; };
00047     static Microsoft.UI.Xaml.DependencyProperty PlaceholderImageProperty { get; };
00048     static Microsoft.UI.Xaml.DependencyProperty PointerOverImageProperty { get; };
00049     static Microsoft.UI.Xaml.DependencyProperty PointerOverPlaceholderImageProperty { get; };
00050     static Microsoft.UI.Xaml.DependencyProperty UnsetImageProperty { get; };
00051 }
00052
00053 [MUX_PUBLIC]
00054 [webhosthidden]
00055 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00056 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00057 unsealed runtimeclass RatingControl : Microsoft.UI.Xaml.Controls.Control
00058 {
00059     RatingControl();
00060
00061     String Caption { get; set; };
00062     [MUX_DEFAULT_VALUE("1")]
00063     Int32 InitialSetValue { get; set; };
00064     [MUX_DEFAULT_VALUE("true")]
00065     Boolean IsClearEnabled { get; set; };
00066     Boolean IsReadOnly { get; set; };
00067     [MUX_DEFAULT_VALUE("5")]
00068     Int32 MaxRating { get; set; };
00069     [MUX_DEFAULT_VALUE("-1")]
00070     Double PlaceholderValue { get; set; };
00071     RatingItemInfo ItemInfo { get; set; };
00072     [MUX_DEFAULT_VALUE("-1")]
00073     Double Value { get; set; };
00074     event Windows.Foundation.TypedEventHandler<RatingControl, Object> ValueChanged;
00075
00076     static Microsoft.UI.Xaml.DependencyProperty CaptionProperty { get; };
00077     static Microsoft.UI.Xaml.DependencyProperty InitialSetValueProperty { get; };
00078     static Microsoft.UI.Xaml.DependencyProperty IsClearEnabledProperty { get; };
00079     static Microsoft.UI.Xaml.DependencyProperty IsReadOnlyProperty { get; };
00080     static Microsoft.UI.Xaml.DependencyProperty MaxRatingProperty { get; };
00081     static Microsoft.UI.Xaml.DependencyProperty PlaceholderValueProperty { get; };
00082     static Microsoft.UI.Xaml.DependencyProperty ItemInfoProperty { get; };
00083     static Microsoft.UI.Xaml.DependencyProperty ValueProperty { get; };
00084 }
00085
00086 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemExpandingEventArgs.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemExpandingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewItemExpandingEventArgs.h"
00007
00008 NavigationViewItemExpandingEventArgs::NavigationViewItemExpandingEventArgs(const winrt::NavigationView& navigationView)
00009 {
00010     m_navigationView.set(navigationView);
00011 }
00012
00013 winrt::NavigationViewItemBase NavigationViewItemExpandingEventArgs::ExpandingItemContainer()
00014 {
00015     return m_expandingItemContainer.get();
00016 }
00017
00018 void NavigationViewItemExpandingEventArgs::ExpandingItemContainer(winrt::NavigationViewItemBase const& value)
00019 {
00020     m_expandingItemContainer.set(value);
00021 }
00022
00023 winrt::IInspectable NavigationViewItemExpandingEventArgs::ExpandingItem()
00024 {
00025     if (auto const expandingItem = m_expandingItem.get())
00026     {
00027         return expandingItem;
00028     }
00029
00030     if (auto const nv = m_navigationView.get())
00031     {
00032         m_expandingItem.set(nv.MenuItemFromContainer(m_expandingItemContainer.get()));
00033         return m_expandingItem.get();
00034     }
00035
00036     return nullptr;
00037 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/AnimatedIconSource.cpp Source File

  • File List
  • File Members
  • IconSource

AnimatedIconSource.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006
00007 #include "AnimatedIconSource.h"
00008
00009 winrt::IconElement AnimatedIconSource::CreateIconElementCore()
00010 {
00011     winrt::AnimatedIcon animatedIcon;
00012     if (auto const source = Source())
00013     {
00014         animatedIcon.Source(source);
00015     }
00016     if (auto const fallbackIconSource = FallbackIconSource())
00017     {
00018         animatedIcon.FallbackIconSource(fallbackIconSource);
00019     }
00020     if (const auto newForeground = Foreground())
00021     {
00022         animatedIcon.Foreground(newForeground);
00023     }
00024     animatedIcon.MirroredWhenRightToLeft(MirroredWhenRightToLeft());
00025
00026     return animatedIcon;
00027 }
00028
00029 winrt::DependencyProperty AnimatedIconSource::GetIconElementPropertyCore(winrt::DependencyProperty sourceProperty)
00030 {
00031     if (sourceProperty == s_SourceProperty)
00032     {
00033         return winrt::AnimatedIcon::SourceProperty();
00034     }
00035     else if (sourceProperty == s_FallbackIconSourceProperty)
00036     {
00037         return winrt::AnimatedIcon::FallbackIconSourceProperty();
00038     }
00039     else if (sourceProperty == s_MirroredWhenRightToLeftProperty)
00040     {
00041         return winrt::AnimatedIcon::MirroredWhenRightToLeftProperty();
00042     }
00043
00044     return __super::GetIconElementPropertyCore(sourceProperty);
00045 }
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/AnnotatedScrollBarPage.xaml.cs Source File

  • File List
  • File Members
  • AnnotatedScrollBar
  • TestUI

AnnotatedScrollBarPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Private.Controls;
00007
00008 using WEX.TestExecution;
00009 using WEX.TestExecution.Markup;
00010 using WEX.Logging.Interop;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     [TopLevelTestPage(Name="AnnotatedScrollBar")]
00015     public sealed partial class AnnotatedScrollBarPage : TestPage
00016     {
00017         public AnnotatedScrollBarPage()
00018         {
00019             LogController.InitializeLogging();
00020             this.InitializeComponent();
00021
00022             navigateToSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AnnotatedScrollBarSummaryPage), 0); };
00023             navigateToIScrollController.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AnnotatedScrollBarIScrollControllerPage), 0); };
00024             navigateToRangeBase.Click += delegate { Frame.NavigateWithoutAnimation(typeof(AnnotatedScrollBarRangeBasePage), 0); };
00025         }
00026
00027         private void CmbAnnotatedScrollBarOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e)
00028         {
00029            MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00030                "AnnotatedScrollBar",
00031                cmbAnnotatedScrollBarOutputDebugStringLevel.SelectedIndex == 1 || cmbAnnotatedScrollBarOutputDebugStringLevel.SelectedIndex == 2,
00032                cmbAnnotatedScrollBarOutputDebugStringLevel.SelectedIndex == 2);
00033         }
00034     }
00035 }
00036
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarItemAutomationPeer.h Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBarItemAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "BreadcrumbBarItem.h"
00007 #include "BreadcrumbBarItemAutomationPeer.g.h"
00008
00009 class BreadcrumbBarItemAutomationPeer :
00010     public ReferenceTracker<BreadcrumbBarItemAutomationPeer, winrt::implementation::BreadcrumbBarItemAutomationPeerT>
00011 {
00012
00013 public:
00014     BreadcrumbBarItemAutomationPeer(winrt::BreadcrumbBarItem const& owner);
00015
00016     // IAutomationPeerOverrides
00017     hstring GetLocalizedControlTypeCore();
00018     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00019     hstring GetClassNameCore();
00020     winrt::AutomationControlType GetAutomationControlTypeCore();
00021
00022     // IInvokeProvider
00023     void Invoke();
00024
00025 private:
00026     com_ptr<BreadcrumbBarItem> GetImpl();
00027 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlowLayout Member List

This is the complete list of members for FlowLayout, including all inherited members.
abi_enter() | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
Algorithm_GetAnchorForRealizationRect(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetAnchorForRealizationRect(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetAnchorForTargetElement(int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetAnchorForTargetElement(int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetExtent(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetExtent(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetMeasureSize(int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetMeasureSize(int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetProvisionalArrangeSize(int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetProvisionalArrangeSize(int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_OnElementMeasured(const winrt::UIElement &element, const int index, const winrt::Size &availableSize, const winrt::Size &measureSize, const winrt::Size &desiredSize, const winrt::Size &provisionalArrangeSize, const winrt::VirtualizingLayoutContext &context) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_OnElementMeasured(const winrt::UIElement &element, int index, const winrt::Size &availableSize, const winrt::Size &measureSize, const winrt::Size &desiredSize, const winrt::Size &provisionalArrangeSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_OnLineArranged(int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext &context) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_OnLineArranged(int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_ShouldBreakLine(int index, double remainingSpace) override | FlowLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_ShouldBreakLine(int index, double remainingSpace)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
ArrangeOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize) | FlowLayout |
CheckThread() | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
ClearProperties() | FlowLayoutProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< FlowLayout > &&self) noexcept | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline, static]
DoesRealizationWindowOverlapExtent(const winrt::Rect &realizationWindow, const winrt::Rect &extent) | FlowLayout | [inline, private]
EnsureProperties() | FlowLayoutProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
final_release(std::unique_ptr< FlowLayout > &&self) | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline, static]
FlowLayout() | FlowLayout |
FlowLayoutProperties() | FlowLayoutProperties |
GetAnchorForRealizationRect(winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context) | FlowLayout |
GetAnchorForTargetElement(int targetIndex, winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context) | FlowLayout |
GetAsFlowState(const winrt::IInspectable &state) | FlowLayout | [inline, private]
GetAverageLineInfo(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::com_ptr< FlowLayoutState > &flowState, double &avgCountInLine) | FlowLayout | [private]
GetBase() | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
GetExtent(winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context, winrt::UIElement const &firstRealized, int firstRealizedItemIndex, winrt::Rect const &firstRealizedLayoutBounds, winrt::UIElement const &lastRealized, int lastRealizedItemIndex, winrt::Rect const &lastRealizedLayoutBounds) | FlowLayout |
GetFlowAlgorithm(const winrt::VirtualizingLayoutContext &context) | FlowLayout | [inline, private]
GetInner() | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
GetMeasureSize(int index, winrt::Size const &availableSize) | FlowLayout |
GetProvisionalArrangeSize(int index, winrt::Size const &measureSize, winrt::Size const &desiredSize) | FlowLayout |
GetScrollOrientation() const | OrientationBasedMeasures | [inline]
InitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | FlowLayout |
InvalidateLayout() | FlowLayout | [inline, private]
IsOnThread() | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
LineAlignment(winrt::FlowLayoutLineAlignment const &value) | FlowLayoutProperties |
LineAlignment() | FlowLayoutProperties |
LineAlignmentProperty() | FlowLayoutProperties | [inline, static]
LineSpacing() | FlowLayout | [inline, private]
Major(const winrt::Size &size) | OrientationBasedMeasures |
MajorEnd(const winrt::Rect &rect) const | OrientationBasedMeasures |
MajorSize(const winrt::Rect &rect) | OrientationBasedMeasures |
MajorStart(const winrt::Rect &rect) | OrientationBasedMeasures |
MeasureOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize) | FlowLayout |
MinColumnSpacing(double value) | FlowLayoutProperties |
MinColumnSpacing() | FlowLayoutProperties |
MinColumnSpacingProperty() | FlowLayoutProperties | [inline, static]
MinItemSpacing() | FlowLayout | [inline, private]
Minor(const winrt::Size &size) | OrientationBasedMeasures |
MinorEnd(const winrt::Rect &rect) const | OrientationBasedMeasures |
MinorMajorPoint(float minor, float major) | OrientationBasedMeasures |
MinorMajorRect(float minor, float major, float minorSize, float majorSize) | OrientationBasedMeasures |
MinorMajorSize(float minor, float major) | OrientationBasedMeasures |
MinorSize(const winrt::Rect &rect) | OrientationBasedMeasures |
MinorStart(const winrt::Rect &rect) | OrientationBasedMeasures |
MinRowSpacing(double value) | FlowLayoutProperties |
MinRowSpacing() | FlowLayoutProperties |
MinRowSpacingProperty() | FlowLayoutProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
OnElementMeasured(winrt::UIElement const &element, int index, winrt::Size const &availableSize, winrt::Size const &measureSize, winrt::Size const &desiredSize, winrt::Size const &provisionalArrangeSize, winrt::VirtualizingLayoutContext const &context) | FlowLayout |
OnItemsChangedCore(winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args) | FlowLayout |
OnLineAlignmentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | FlowLayoutProperties | [static]
OnLineArranged(int startIndex, int countInLine, double lineSize, winrt::VirtualizingLayoutContext const &context) | FlowLayout |
OnMinColumnSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | FlowLayoutProperties | [static]
OnMinRowSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | FlowLayoutProperties | [static]
OnOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | FlowLayoutProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | FlowLayout |
Orientation(winrt::Orientation const &value) | FlowLayoutProperties |
Orientation() | FlowLayoutProperties |
OrientationProperty() | FlowLayoutProperties | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout > | [inline]
s_LineAlignmentProperty | FlowLayoutProperties | [static]
s_MinColumnSpacingProperty | FlowLayoutProperties | [static]
s_MinRowSpacingProperty | FlowLayoutProperties | [static]
s_OrientationProperty | FlowLayoutProperties | [static]
SetScrollOrientation(ScrollOrientation value) | OrientationBasedMeasures | [inline]
ShouldBreakLine(int index, double remainingSpace) | FlowLayout |
UninitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | FlowLayout |
UpdateIndexBasedLayoutOrientation(const winrt::Orientation &orientation) | FlowLayout | [private]
~IFlowLayoutAlgorithmDelegates() | IFlowLayoutAlgorithmDelegates | [virtual]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBadgeTemplateSettingsProperties Member List

This is the complete list of members for InfoBadgeTemplateSettingsProperties, including all inherited members.
ClearProperties() | InfoBadgeTemplateSettingsProperties | [static]
EnsureProperties() | InfoBadgeTemplateSettingsProperties | [static]
IconElement(winrt::IconElement const &value) | InfoBadgeTemplateSettingsProperties |
IconElement() | InfoBadgeTemplateSettingsProperties |
IconElementProperty() | InfoBadgeTemplateSettingsProperties | [inline, static]
InfoBadgeCornerRadius(winrt::CornerRadius const &value) | InfoBadgeTemplateSettingsProperties |
InfoBadgeCornerRadius() | InfoBadgeTemplateSettingsProperties |
InfoBadgeCornerRadiusProperty() | InfoBadgeTemplateSettingsProperties | [inline, static]
InfoBadgeTemplateSettingsProperties() | InfoBadgeTemplateSettingsProperties |
s_IconElementProperty | InfoBadgeTemplateSettingsProperties | [static]
s_InfoBadgeCornerRadiusProperty | InfoBadgeTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AlphaMaskEffect Member List

This is the complete list of members for AlphaMaskEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1AlphaMask) | AlphaMaskEffect
DECLARE_DUAL_SOURCES(Source, Mask) | AlphaMaskEffect
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsElementFactory.cpp Source File

  • File List
  • File Members
  • RadioButtons

RadioButtonsElementFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemTemplateWrapper.h"
00007 #include "ResourceAccessor.h"
00008 #include "Utils.h"
00009 #include "RadioButtonsElementFactory.h"
00010
00011 RadioButtonsElementFactory::RadioButtonsElementFactory()
00012 {
00013 }
00014
00015 void RadioButtonsElementFactory::UserElementFactory(const winrt::IInspectable& newValue)
00016 {
00017     if (auto dataTemplate = newValue.try_as<winrt::DataTemplate>())
00018     {
00019         m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(dataTemplate);
00020     }
00021     else if (auto selector = newValue.try_as<winrt::DataTemplateSelector>())
00022     {
00023         m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(selector);
00024     }
00025     else if (auto customElementFactory = newValue.try_as<winrt::IElementFactory>())
00026     {
00027         m_itemTemplateWrapper = customElementFactory;
00028     }
00029 }
00030
00031 winrt::UIElement RadioButtonsElementFactory::GetElementCore(const winrt::ElementFactoryGetArgs& args)
00032 {
00033     auto const newContent = [itemTemplateWrapper = m_itemTemplateWrapper, args]() {
00034         if (itemTemplateWrapper)
00035         {
00036             return itemTemplateWrapper.GetElement(args).as<winrt::IInspectable>();
00037         }
00038         return args.Data();
00039     }();
00040
00041     // Element is already a RadioButton, so we just return it.
00042     if (auto const radioButton = newContent.try_as<winrt::RadioButton>())
00043     {
00044         return radioButton;
00045     }
00046
00047     // Element is not a RadioButton. We'll wrap it in a RadioButton now.
00048     auto const newRadioButton = winrt::RadioButton{};
00049     newRadioButton.Content(args.Data());
00050
00051     // If a user provided item template exists, we pass the template down to the ContentPresenter of the RadioButton.
00052     if (auto const itemTemplateWrapper = m_itemTemplateWrapper.try_as<ItemTemplateWrapper>())
00053     {
00054         newRadioButton.ContentTemplate(itemTemplateWrapper->Template());
00055     }
00056
00057     return newRadioButton;
00058 }
00059
00060 void RadioButtonsElementFactory::RecycleElementCore(const winrt::ElementFactoryRecycleArgs& args)
00061 {
00062
00063 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterable.cpp Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbIterable.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "BreadcrumbIterable.h"
00007 #include "BreadcrumbIterator.h"
00008
00009 BreadcrumbIterable::BreadcrumbIterable()
00010 {
00011 }
00012
00013 BreadcrumbIterable::BreadcrumbIterable(const winrt::IInspectable& itemsSource)
00014 {
00015     ItemsSource(itemsSource);
00016 }
00017
00018 void BreadcrumbIterable::ItemsSource(const winrt::IInspectable& itemsSource)
00019 {
00020     m_itemsSource.set(itemsSource);
00021 }
00022
00023 winrt::IIterator<winrt::IInspectable> BreadcrumbIterable::First()
00024 {
00025     return winrt::make<BreadcrumbIterator>(m_itemsSource.get());
00026 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsView.properties.h Source File

  • File List
  • File Members
  • Generated

ItemsView.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ItemsViewProperties
00008 {
00009 public:
00010     ItemsViewProperties();
00011
00012     void CurrentItemIndex(int value);
00013     int CurrentItemIndex();
00014
00015     void IsItemInvokedEnabled(bool value);
00016     bool IsItemInvokedEnabled();
00017
00018     void ItemsSource(winrt::IInspectable const& value);
00019     winrt::IInspectable ItemsSource();
00020
00021     void ItemTemplate(winrt::IElementFactory const& value);
00022     winrt::IElementFactory ItemTemplate();
00023
00024     void ItemTransitionProvider(winrt::ItemCollectionTransitionProvider const& value);
00025     winrt::ItemCollectionTransitionProvider ItemTransitionProvider();
00026
00027     void Layout(winrt::Layout const& value);
00028     winrt::Layout Layout();
00029
00030     void ScrollView(winrt::ScrollView const& value);
00031     winrt::ScrollView ScrollView();
00032
00033     void SelectedItem(winrt::IInspectable const& value);
00034     winrt::IInspectable SelectedItem();
00035
00036     void SelectionMode(winrt::ItemsViewSelectionMode const& value);
00037     winrt::ItemsViewSelectionMode SelectionMode();
00038
00039     void VerticalScrollController(winrt::IScrollController const& value);
00040     winrt::IScrollController VerticalScrollController();
00041
00042     static winrt::DependencyProperty CurrentItemIndexProperty() { return s_CurrentItemIndexProperty; }
00043     static winrt::DependencyProperty IsItemInvokedEnabledProperty() { return s_IsItemInvokedEnabledProperty; }
00044     static winrt::DependencyProperty ItemsSourceProperty() { return s_ItemsSourceProperty; }
00045     static winrt::DependencyProperty ItemTemplateProperty() { return s_ItemTemplateProperty; }
00046     static winrt::DependencyProperty ItemTransitionProviderProperty() { return s_ItemTransitionProviderProperty; }
00047     static winrt::DependencyProperty LayoutProperty() { return s_LayoutProperty; }
00048     static winrt::DependencyProperty ScrollViewProperty() { return s_ScrollViewProperty; }
00049     static winrt::DependencyProperty SelectedItemProperty() { return s_SelectedItemProperty; }
00050     static winrt::DependencyProperty SelectionModeProperty() { return s_SelectionModeProperty; }
00051     static winrt::DependencyProperty VerticalScrollControllerProperty() { return s_VerticalScrollControllerProperty; }
00052
00053     static GlobalDependencyProperty s_CurrentItemIndexProperty;
00054     static GlobalDependencyProperty s_IsItemInvokedEnabledProperty;
00055     static GlobalDependencyProperty s_ItemsSourceProperty;
00056     static GlobalDependencyProperty s_ItemTemplateProperty;
00057     static GlobalDependencyProperty s_ItemTransitionProviderProperty;
00058     static GlobalDependencyProperty s_LayoutProperty;
00059     static GlobalDependencyProperty s_ScrollViewProperty;
00060     static GlobalDependencyProperty s_SelectedItemProperty;
00061     static GlobalDependencyProperty s_SelectionModeProperty;
00062     static GlobalDependencyProperty s_VerticalScrollControllerProperty;
00063
00064     winrt::event_token ItemInvoked(winrt::TypedEventHandler<winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs> const& value);
00065     void ItemInvoked(winrt::event_token const& token);
00066     winrt::event_token SelectionChanged(winrt::TypedEventHandler<winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs> const& value);
00067     void SelectionChanged(winrt::event_token const& token);
00068
00069     event_source<winrt::TypedEventHandler<winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs>> m_itemInvokedEventSource;
00070     event_source<winrt::TypedEventHandler<winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs>> m_selectionChangedEventSource;
00071
00072     static void EnsureProperties();
00073     static void ClearProperties();
00074
00075     static void OnCurrentItemIndexPropertyChanged(
00076         winrt::DependencyObject const& sender,
00077         winrt::DependencyPropertyChangedEventArgs const& args);
00078
00079     static void OnIsItemInvokedEnabledPropertyChanged(
00080         winrt::DependencyObject const& sender,
00081         winrt::DependencyPropertyChangedEventArgs const& args);
00082
00083     static void OnItemsSourcePropertyChanged(
00084         winrt::DependencyObject const& sender,
00085         winrt::DependencyPropertyChangedEventArgs const& args);
00086
00087     static void OnItemTemplatePropertyChanged(
00088         winrt::DependencyObject const& sender,
00089         winrt::DependencyPropertyChangedEventArgs const& args);
00090
00091     static void OnItemTransitionProviderPropertyChanged(
00092         winrt::DependencyObject const& sender,
00093         winrt::DependencyPropertyChangedEventArgs const& args);
00094
00095     static void OnLayoutPropertyChanged(
00096         winrt::DependencyObject const& sender,
00097         winrt::DependencyPropertyChangedEventArgs const& args);
00098
00099     static void OnScrollViewPropertyChanged(
00100         winrt::DependencyObject const& sender,
00101         winrt::DependencyPropertyChangedEventArgs const& args);
00102
00103     static void OnSelectedItemPropertyChanged(
00104         winrt::DependencyObject const& sender,
00105         winrt::DependencyPropertyChangedEventArgs const& args);
00106
00107     static void OnSelectionModePropertyChanged(
00108         winrt::DependencyObject const& sender,
00109         winrt::DependencyPropertyChangedEventArgs const& args);
00110
00111     static void OnVerticalScrollControllerPropertyChanged(
00112         winrt::DependencyObject const& sender,
00113         winrt::DependencyPropertyChangedEventArgs const& args);
00114 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/APITests/AcrylicBrushTests.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • APITests

AcrylicBrushTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp;
00005 using MUXControlsTestApp.Utilities;
00006 using System;
00007 using System.Linq;
00008 using Windows.UI;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Shapes;
00012 using Microsoft.UI.Xaml.Media;
00013 using Windows.Foundation.Metadata;
00014 using System.Collections.Generic;
00015 using System.Text.RegularExpressions;
00016 using Common;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00023 {
00024     [TestClass]
00025     public class AcrylicBrushTests : ApiTestBase
00026     {
00027         private Rectangle _rectangle1 = null;
00028         private StackPanel _rootSP = null;
00029         private static string pattern = @"SystemControl(.*)(AcrylicWindow|AcrylicElement).*Brush";
00030         private static Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase);
00031         private Color unknownColor = Microsoft.UI.ColorHelper.FromArgb(111, 112, 113, 114);
00032
00033         [TestMethod]
00034         /// SystemControl <fallback color> Acrylic <background source> <tint color and tint opacity> Brush
00035         public void VerifyAcrylicBrushNameRule()
00036         {
00037             foreach (var brushName in GetAcrylicBrushNames())
00038             {
00039                 Verify.IsTrue(rgx.Match(brushName).Success, brushName + " match the pattern");
00040             }
00041         }
00042
00043         /// <summary>
00044         /// SystemControl <fallback color> Acrylic <background source> <tint color and tint opacity> Brush
00045         /// In practice, we’ll have:
00046         /// SystemControlAcrylicWindowBrush
00047         /// SystemControlAcrylicElementMediumHighBrush
00048         /// SystemControlAccentDark1AcrylicWindowAccentDark1Brush
00049         /// SystemControlBaseHighAcrylicElementBrush
00050         /// SystemControlBaseHighAcrylicWindowMediumHighBrush
00051         ///
00052         /// deduce color by name: brush name -> <fallback color> -> System{<fallback color>}Color -> Color
00053         /// get color by function: brush name -> FallbackColor -> Color
00054         /// then compare the two Microsoft.UI.Colors.
00055         /// </summary>
00056         [TestMethod]
00057         public void VerifyAcrylicBrushHasCorrectFallbackColor()
00058         {
00059             if (PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone2))
00060             {
00061                 Log.Comment("Using system XAML AcrylicBrushes post-RS2, so nothing to test.");
00062                 return;
00063             }
00064
00065             RunOnUIThread.Execute(() =>
00066             {
00067                 // only select the pair whose <fallback color> is not empty
00068                 var brushAndFallbackColorNamePairs = GetAcrylicBrushNames()
00069                     .Select(brushName => new KeyValuePair<string, string>(brushName, GetFallBackColorName(brushName)))
00070                     .Where(pair => !String.IsNullOrEmpty(pair.Value));
00071
00072                 var lightTheme = Application.Current.Resources.MergedDictionaries.First().ThemeDictionaries["Light"] as ResourceDictionary;
00073                 var darkTheme = Application.Current.Resources.MergedDictionaries.First().ThemeDictionaries["Default"] as ResourceDictionary;
00074
00075                 Log.Comment("Verify Dark");
00076                 VerifyAcrylicBrushHasCorrectFallbackColorOnTheme(brushAndFallbackColorNamePairs, darkTheme);
00077                 Log.Comment("Verify Light");
00078                 VerifyAcrylicBrushHasCorrectFallbackColorOnTheme(brushAndFallbackColorNamePairs, lightTheme);
00079             }
00080             );
00081         }
00082
00083         private void VerifyAcrylicBrushHasCorrectFallbackColorOnTheme(IEnumerable<KeyValuePair<string, string>> brushAndFallbackColorNamePairs, ResourceDictionary theme)
00084         {
00085             foreach (var namePair in brushAndFallbackColorNamePairs)
00086             {
00087                 Color fallbackColor = GetAcrylicBrushFallbackColor(namePair.Key, theme); ;
00088                 Color fallbackExpectedColor = GetColorByName(namePair.Value, theme);
00089                 Verify.AreEqual(fallbackColor, fallbackExpectedColor,
00090                     string.Format("Fallback Color for AcrylicBrush {0} and Color {1} are the same", namePair.Key, namePair.Value));
00091             };
00092         }
00093
00094         /// <summary>
00095         /// Verifies the AcrylicBrush default properties.
00096         /// </summary>
00097         [TestMethod]
00098         public void VerifyDefaultPropertyValues()
00099         {
00100             RunOnUIThread.Execute(() =>
00101             {
00102                 AcrylicBrush acrylicBrush = new AcrylicBrush();
00103                 Verify.IsNotNull(acrylicBrush);
00104
00105                 MatrixTransform identityTransform = new MatrixTransform();
00106                 identityTransform.Matrix = Matrix.Identity;
00107
00108                 Log.Comment("Verifying AcrylicBrush default property values");
00109                 Verify.AreEqual(acrylicBrush.FallbackColor, Microsoft.UI.ColorHelper.FromArgb(0, 255, 255, 255));
00110                 Verify.AreEqual(acrylicBrush.AlwaysUseFallback, false);
00111                 Verify.AreEqual(acrylicBrush.TintColor, Microsoft.UI.ColorHelper.FromArgb(204, 255, 255, 255));
00112                 Verify.AreEqual(acrylicBrush.TintOpacity, 1.0);
00113                 Verify.AreEqual(acrylicBrush.Opacity, 1.0);
00114             });
00115         }
00116
00117         private void SetupDefaultUI()
00118         {
00119             _rectangle1 = new Rectangle();
00120             _rectangle1.Width = 200;
00121             _rectangle1.Height = 100;
00122             _rectangle1.Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple);
00123
00124             _rootSP = new StackPanel();
00125             _rootSP.Children.Add(_rectangle1);
00126
00127             Log.Comment("Setting window content");
00128             Content = _rootSP;
00129         }
00130
00131         private Color GetColorByName(string name, ResourceDictionary dict)
00132         {
00133             object color;
00134             if (dict.TryGetValue(name, out color))
00135                 return (Color)color;
00136             return unknownColor;
00137         }
00138
00139         private Color GetSolidColorBrushColor(string brushName, ResourceDictionary dict)
00140         {
00141             Color color = unknownColor;
00142             var brush = dict[brushName] as SolidColorBrush;
00143             if (brush != null)
00144                 color = brush.Color;
00145
00146             return color;
00147         }
00148
00149         private Color GetAcrylicBrushFallbackColor(string brushName, ResourceDictionary dict)
00150         {
00151             Color color = unknownColor;
00152
00153             var brush = dict[brushName] as AcrylicBrush;
00154             if (brush != null)
00155                 color = brush.FallbackColor;
00156
00157             return color;
00158         }
00159         private IEnumerable<string> GetAcrylicBrushNames()
00160         {
00161             return AcrylicColorPage.AcrylicBrushNames;
00162         }
00163
00164         /// <summary>
00165         /// brush name is: SystemControl <fallback color> Acrylic <background source>
00166         /// <fallback color> should be part of FallbackColor
00167         /// eg: SystemControlBaseHighAcrylicElementBrush <-> SystemBaseHighColor
00168         /// BaseHigh is <fallback color> and SystemBaseHighColor is the expected fallback Color name
00169         /// </summary>
00170         private string GetFallBackColorName(String brushName)
00171         {
00172             string name = "";
00173             Match m = rgx.Match(brushName);
00174
00175             if (m.Success)
00176                 name = m.Groups[1].Value;
00177
00178             if (!String.IsNullOrEmpty(name))
00179             {
00180                 switch (name)
00181                 {
00182                     case "AccentDark1": name = "SystemAccentColorDark1"; break;
00183                     case "AccentDark2": name = "SystemAccentColorDark2"; break;
00184                     case "AccentDark3": name = "SystemAccentColorDark3"; break;
00185                     case "Accent": name = "SystemAccentColor"; break;
00186                     case "AccentLight1": name = "SystemAccentColorLight1"; break;
00187                     case "AccentLight2": name = "SystemAccentColorLight2"; break;
00188                     case "AccentLight3": name = "SystemAccentColorLight3"; break;
00189                     default:
00190                         name = string.Format("System{0}Color", name); break;
00191                 }
00192             }
00193
00194             return name;
00195         }
00196
00197     }
00198 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBarAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ProgressBarAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ProgressBarAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ProgressBarAutomationPeer)
00012 }
00013
00014 #include "ProgressBarAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerAutomationPeer.h Source File

  • File List
  • File Members
  • ItemContainer

ItemContainerAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemContainer.h"
00007 #include "ItemContainerAutomationPeer.g.h"
00008
00009 class ItemContainerAutomationPeer :
00010     public ReferenceTracker<ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT>
00011 {
00012 public:
00013     ItemContainerAutomationPeer(winrt::FrameworkElement const& owner);
00014
00015     // IAutomationPeerOverrides
00016     virtual winrt::hstring GetNameCore();
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     winrt::AutomationControlType GetAutomationControlTypeCore();
00019     virtual winrt::hstring GetLocalizedControlTypeCore();
00020     virtual winrt::hstring GetClassNameCore();
00021
00022     // IInvokeProvider
00023     void Invoke();
00024
00025     // ISelectionItemProvider
00026     bool IsSelected();
00027     winrt::IRawElementProviderSimple SelectionContainer();
00028     void AddToSelection();
00029     void RemoveFromSelection();
00030     void Select();
00031
00032 private:
00033     com_ptr<ItemContainer> GetImpl();
00034     void UpdateSelection(bool isSelected);
00035 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ElementsInItemsSourcePage Member List

This is the complete list of members for ElementsInItemsSourcePage, including all inherited members.
ElementsInItemsSourcePage() ElementsInItemsSourcePage [inline]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPenConfigurationControl.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarPenConfigurationControl.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarPenConfigurationControl.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarPenConfigurationControl)
00012 }
00013
00014 #include "InkToolBarPenConfigurationControl.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarPenConfigurationControlProperties::s_PenButtonProperty{ nullptr };
00017
00018 InkToolBarPenConfigurationControlProperties::InkToolBarPenConfigurationControlProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void InkToolBarPenConfigurationControlProperties::EnsureProperties()
00024 {
00025     if (!s_PenButtonProperty)
00026     {
00027         s_PenButtonProperty =
00028             InitializeDependencyProperty(
00029                 L"PenButton",
00030                 winrt::name_of<winrt::InkToolBarPenButton>(),
00031                 winrt::name_of<winrt::InkToolBarPenConfigurationControl>(),
00032                 false /* isAttached */,
00033                 ValueHelper<winrt::InkToolBarPenButton>::BoxedDefaultValue(),
00034                 nullptr);
00035     }
00036 }
00037
00038 void InkToolBarPenConfigurationControlProperties::ClearProperties()
00039 {
00040     s_PenButtonProperty = nullptr;
00041 }
00042
00043 void InkToolBarPenConfigurationControlProperties::PenButton(winrt::InkToolBarPenButton const& value)
00044 {
00045     [[gsl::suppress(con)]]
00046     {
00047     static_cast<InkToolBarPenConfigurationControl*>(this)->SetValue(s_PenButtonProperty, ValueHelper<winrt::InkToolBarPenButton>::BoxValueIfNecessary(value));
00048     }
00049 }
00050
00051 winrt::InkToolBarPenButton InkToolBarPenConfigurationControlProperties::PenButton()
00052 {
00053     return ValueHelper<winrt::InkToolBarPenButton>::CastOrUnbox(static_cast<InkToolBarPenConfigurationControl*>(this)->GetValue(s_PenButtonProperty));
00054 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainer.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common

SelectionContainer.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Automation.Peers;
00006 using Microsoft.UI.Xaml.Controls;
00007
00008 namespace MUXControlsTestApp.Samples.Selection
00009 {
00010     public class SelectionContainer : ContentControl
00011     {
00012         public SelectionContainer()
00013         {
00014             IsTabStop = false;
00015         }
00016
00017         public SelectionModel SelectionModel
00018         {
00019             get { return (SelectionModel)GetValue(SelectionModelProperty); }
00020             set { SetValue(SelectionModelProperty, value); }
00021         }
00022
00023         public static readonly DependencyProperty SelectionModelProperty =
00024             DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(SelectionContainer), new PropertyMetadata(null, new PropertyChangedCallback(OnSelectionModelChanged)));
00025
00026         private static void OnSelectionModelChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
00027         {
00028             if(args.OldValue != null)
00029             {
00030                 var old = (SelectionModel)args.OldValue;
00031                 old.SelectionChanged -= (sender as SelectionContainer).OnSelectionChanged;
00032             }
00033
00034             if(args.NewValue != null)
00035             {
00036                 var newValue = (SelectionModel)args.NewValue;
00037                 newValue.SelectionChanged += (sender as SelectionContainer).OnSelectionChanged;
00038             }
00039         }
00040
00041         private void OnSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
00042         {
00043             if(AutomationPeer.ListenerExists(AutomationEvents.SelectionPatternOnInvalidated))
00044             {
00045                 var peer = (SelectionContainerAutomationPeer)FrameworkElementAutomationPeer.CreatePeerForElement(this);
00046                 peer.SelectionChanged(args);
00047             }
00048         }
00049
00050         protected override AutomationPeer OnCreateAutomationPeer()
00051         {
00052             return new SelectionContainerAutomationPeer(this);
00053         }
00054     }
00055 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorSpectrumAutomationPeer Member List

This is the complete list of members for ColorSpectrumAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
CheckThread() | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
ColorSpectrumAutomationPeer(winrt::ColorSpectrum const &owner) | ColorSpectrumAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< ColorSpectrumAutomationPeer > &&self) noexcept | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
final_release(std::unique_ptr< ColorSpectrumAutomationPeer > &&self) | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline, static]
GetAutomationControlTypeCore() | ColorSpectrumAutomationPeer |
GetBase() | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
GetBoundingRectangleCore() | ColorSpectrumAutomationPeer |
GetClassNameCore() | ColorSpectrumAutomationPeer |
GetClickablePointCore() | ColorSpectrumAutomationPeer |
GetHelpTextCore() | ColorSpectrumAutomationPeer |
GetInner() | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
GetLocalizedControlTypeCore() | ColorSpectrumAutomationPeer |
GetNameCore() | ColorSpectrumAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | ColorSpectrumAutomationPeer |
GetValueString(winrt::Color color, winrt::float4 hsvColor) | ColorSpectrumAutomationPeer | [private, static]
IsOnThread() | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
IsReadOnly() | ColorSpectrumAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
RaisePropertyChangedEvent(winrt::Color oldColor, winrt::Color newColor, winrt::float4 oldHsvColor, winrt::float4 newHsvColor) | ColorSpectrumAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< ColorSpectrumAutomationPeer, winrt::implementation::ColorSpectrumAutomationPeerT, winrt::IValueProvider > | [inline]
SetValue(winrt::hstring const &value) | ColorSpectrumAutomationPeer |
Value() | ColorSpectrumAutomationPeer |
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/VectorIterator.h Source File

  • File List
  • File Members
  • Collections

VectorIterator.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "VectorChangedEventArgs.h"
00006
00007 template <bool isDependencyObjectBase>
00008 struct ComposableBasePointersImplTTypeForIterator
00009 {
00010     using WinRTBase = typename winrt::DependencyObject;
00011     using WinRTBaseFactoryInterface = typename winrt::IDependencyObjectFactory;
00012 };
00013
00014 template <>
00015 struct ComposableBasePointersImplTTypeForIterator<false>
00016 {
00017     using WinRTBase = typename winrt::IInspectable;
00018     using WinRTBaseFactoryInterface = typename winrt::IInspectable;
00019 };
00020
00021 template <typename T, bool isBindable, bool isDependencyObjectBase>
00022 struct VectorIteratorTraits: ComposableBasePointersImplTTypeForIterator<isDependencyObjectBase>
00023 {
00024     using T_type = typename T;
00025     using VectorType = typename winrt::IVector<T>;
00026     using IteratorType = typename winrt::IIterator<T>;
00027 };
00028
00029 template <typename T, bool isDependencyObjectBase>
00030 struct VectorIteratorTraits<T, true, isDependencyObjectBase>:
00031     ComposableBasePointersImplTTypeForIterator<isDependencyObjectBase>
00032 {
00033     using T_type = typename winrt::IInspectable;
00034     using VectorType = typename winrt::IBindableVector;
00035     using IteratorType = typename winrt::IBindableIterator;
00036 };
00037
00038 template <typename T, bool isBindable = false, bool isDependencyObjectBase = true,
00039     typename Traits = VectorIteratorTraits<T, isBindable, isDependencyObjectBase>>
00040 class VectorIterator :
00041     public ReferenceTracker<
00042         VectorIterator<T, isBindable, isDependencyObjectBase, Traits>,
00043         typename reference_tracker_implements_t<typename Traits::IteratorType>::type>
00044 {
00045 public:
00046     VectorIterator(typename Traits::VectorType const& vector)
00047     {
00048         m_vector.set(vector);
00049     }
00050
00051     T Current()
00052     {
00053         return m_vector.get().GetAt(m_currentIndex);
00054     }
00055
00056     bool HasCurrent()
00057     {
00058         const uint32_t size = m_vector.get().Size();
00059         return m_currentIndex < size;
00060     }
00061
00062     bool MoveNext()
00063     {
00064         ++m_currentIndex;
00065         return HasCurrent();
00066     }
00067
00068     uint32_t GetMany(winrt::array_view<T> values)
00069     {
00070         uint32_t howMany = 0;
00071         if (HasCurrent())
00072         {
00073             do
00074             {
00075                 if (howMany >= values.size()) break;
00076
00077                 values[howMany] = Current();
00078                 howMany++;
00079             } while (MoveNext());
00080         }
00081
00082         return howMany;
00083     }
00084
00085
00086 private:
00087     tracker_ref<typename Traits::VectorType> m_vector{ this };
00088     unsigned int m_currentIndex{ 0 };
00089 };
00090
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlTemplateSettings.cpp Source File

  • File List
  • File Members
  • PagerControl

PagerControlTemplateSettings.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "PagerControlTemplateSettings.h"
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitView/TestUI/SplitViewPage.xaml.cs Source File

  • File List
  • File Members
  • SplitView
  • TestUI

SplitViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     [TopLevelTestPage(Name = "SplitView", Icon="SplitView.png")]
00011     public sealed partial class SplitViewPage : TestPage
00012     {
00013         public SplitViewPage()
00014         {
00015             this.InitializeComponent();
00016         }
00017
00018         private void DisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00019         {
00020             splitView.DisplayMode = (SplitViewDisplayMode)Enum.Parse(typeof(SplitViewDisplayMode), (e.AddedItems[0] as ComboBoxItem).Content.ToString());
00021         }
00022
00023         private void Pane_Closed(SplitView sender, object e)
00024         {
00025             paneOpenCheckbox.IsChecked = false;
00026         }
00027
00028         private void Pane_Opened(SplitView sender, object e)
00029         {
00030             paneOpenCheckbox.IsChecked = true;
00031         }
00032
00033         private void PaneOpenCheckbox_CheckChanged(object sender, RoutedEventArgs e)
00034         {
00035             splitView.IsPaneOpen = paneOpenCheckbox.IsChecked.GetValueOrDefault();
00036         }
00037
00038         private void PanePlacement_Toggled(object sender, RoutedEventArgs e)
00039         {
00040             var ts = sender as ToggleSwitch;
00041             if (ts.IsOn)
00042             {
00043                 splitView.PanePlacement = SplitViewPanePlacement.Right;
00044             }
00045             else
00046             {
00047                 splitView.PanePlacement = SplitViewPanePlacement.Left;
00048             }
00049         }
00050     }
00051 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedVisual Member List

This is the complete list of members for AnimatedVisual, including all inherited members.
AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedVisual | [inline, private]
BindProperty2(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName0, CompositionObject referencedObject0, winrt::hstring referenceParameterName1, CompositionObject referencedObject1) | AnimatedVisual | [inline, private]
Close() | AnimatedVisual | [inline]
ContainerShape() | AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, float3x2 transformMatrix) | AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedVisual | [inline, private]
Duration() const | AnimatedVisual | [inline]
Ellipse_7_0() | AnimatedVisual | [inline, private]
Ellipse_7_1() | AnimatedVisual | [inline, private]
Ellipse_7_2() | AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedVisual | [inline, private]
Opacity0ScalarAnimation_0_to_1() | AnimatedVisual | [inline, private]
Opacity0ScalarAnimation_1_to_0() | AnimatedVisual | [inline, private]
Root() | AnimatedVisual | [inline, private]
RootProgress() | AnimatedVisual | [inline, private]
RootVisual() const | AnimatedVisual | [inline]
RotationAngleInDegreesScalarAnimation_0_to_900() | AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedVisual | [inline, private]
Size() const | AnimatedVisual | [inline]
SpriteShape_0() | AnimatedVisual | [inline, private]
SpriteShape_1() | AnimatedVisual | [inline, private]
SpriteShape_2() | AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | AnimatedVisual | [inline, private]
ThemeColor_Background() | AnimatedVisual | [inline, private]
ThemeColor_Foreground_0() | AnimatedVisual | [inline, private]
ThemeColor_Foreground_1() | AnimatedVisual | [inline, private]
TrimEndScalarAnimation_0_to_0p5() | AnimatedVisual | [inline, private]
TrimStartScalarAnimation_0_to_0p5() | AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IArithmeticCompositeEffect Member List

This is the complete list of members for IArithmeticCompositeEffect, including all inherited members.
ClampOutput([out, retval] boolean *value) | IArithmeticCompositeEffect
ClampOutput([in] boolean value) | IArithmeticCompositeEffect
MultiplyAmount([out, retval] float *value) | IArithmeticCompositeEffect
MultiplyAmount([in] float value) | IArithmeticCompositeEffect
Offset([out, retval] float *value) | IArithmeticCompositeEffect
Offset([in] float value) | IArithmeticCompositeEffect
Source1([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IArithmeticCompositeEffect
Source1([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IArithmeticCompositeEffect
Source1Amount([out, retval] float *value) | IArithmeticCompositeEffect
Source1Amount([in] float value) | IArithmeticCompositeEffect
Source2([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IArithmeticCompositeEffect
Source2([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IArithmeticCompositeEffect
Source2Amount([out, retval] float *value) | IArithmeticCompositeEffect
Source2Amount([in] float value) | IArithmeticCompositeEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

SelectorBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SelectorBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(SelectorBar)
00012 }
00013
00014 #include "SelectorBar.g.cpp"
00015
00016 GlobalDependencyProperty SelectorBarProperties::s_ItemsProperty{ nullptr };
00017 GlobalDependencyProperty SelectorBarProperties::s_SelectedItemProperty{ nullptr };
00018
00019 SelectorBarProperties::SelectorBarProperties()
00020     : m_selectionChangedEventSource{static_cast<SelectorBar*>(this)}
00021 {
00022     EnsureProperties();
00023 }
00024
00025 void SelectorBarProperties::EnsureProperties()
00026 {
00027     if (!s_ItemsProperty)
00028     {
00029         s_ItemsProperty =
00030             InitializeDependencyProperty(
00031                 L"Items",
00032                 winrt::name_of<winrt::IVector<winrt::SelectorBarItem>>(),
00033                 winrt::name_of<winrt::SelectorBar>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::IVector<winrt::SelectorBarItem>>::BoxedDefaultValue(),
00036                 winrt::PropertyChangedCallback(&OnItemsPropertyChanged));
00037     }
00038     if (!s_SelectedItemProperty)
00039     {
00040         s_SelectedItemProperty =
00041             InitializeDependencyProperty(
00042                 L"SelectedItem",
00043                 winrt::name_of<winrt::SelectorBarItem>(),
00044                 winrt::name_of<winrt::SelectorBar>(),
00045                 false /* isAttached */,
00046                 ValueHelper<winrt::SelectorBarItem>::BoxedDefaultValue(),
00047                 winrt::PropertyChangedCallback(&OnSelectedItemPropertyChanged));
00048     }
00049 }
00050
00051 void SelectorBarProperties::ClearProperties()
00052 {
00053     s_ItemsProperty = nullptr;
00054     s_SelectedItemProperty = nullptr;
00055 }
00056
00057 void SelectorBarProperties::OnItemsPropertyChanged(
00058     winrt::DependencyObject const& sender,
00059     winrt::DependencyPropertyChangedEventArgs const& args)
00060 {
00061     auto owner = sender.as<winrt::SelectorBar>();
00062     winrt::get_self<SelectorBar>(owner)->OnPropertyChanged(args);
00063 }
00064
00065 void SelectorBarProperties::OnSelectedItemPropertyChanged(
00066     winrt::DependencyObject const& sender,
00067     winrt::DependencyPropertyChangedEventArgs const& args)
00068 {
00069     auto owner = sender.as<winrt::SelectorBar>();
00070     winrt::get_self<SelectorBar>(owner)->OnPropertyChanged(args);
00071 }
00072
00073 void SelectorBarProperties::Items(winrt::IVector<winrt::SelectorBarItem> const& value)
00074 {
00075     [[gsl::suppress(con)]]
00076     {
00077     static_cast<SelectorBar*>(this)->SetValue(s_ItemsProperty, ValueHelper<winrt::IVector<winrt::SelectorBarItem>>::BoxValueIfNecessary(value));
00078     }
00079 }
00080
00081 winrt::IVector<winrt::SelectorBarItem> SelectorBarProperties::Items()
00082 {
00083     return ValueHelper<winrt::IVector<winrt::SelectorBarItem>>::CastOrUnbox(static_cast<SelectorBar*>(this)->GetValue(s_ItemsProperty));
00084 }
00085
00086 void SelectorBarProperties::SelectedItem(winrt::SelectorBarItem const& value)
00087 {
00088     [[gsl::suppress(con)]]
00089     {
00090     static_cast<SelectorBar*>(this)->SetValue(s_SelectedItemProperty, ValueHelper<winrt::SelectorBarItem>::BoxValueIfNecessary(value));
00091     }
00092 }
00093
00094 winrt::SelectorBarItem SelectorBarProperties::SelectedItem()
00095 {
00096     return ValueHelper<winrt::SelectorBarItem>::CastOrUnbox(static_cast<SelectorBar*>(this)->GetValue(s_SelectedItemProperty));
00097 }
00098
00099 winrt::event_token SelectorBarProperties::SelectionChanged(winrt::TypedEventHandler<winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs> const& value)
00100 {
00101     return m_selectionChangedEventSource.add(value);
00102 }
00103
00104 void SelectorBarProperties::SelectionChanged(winrt::event_token const& token)
00105 {
00106     m_selectionChangedEventSource.remove(token);
00107 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarPage Member List

This is the complete list of members for MenuBarPage, including all inherited members.
AddFlyoutItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
AddMenuBarItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
AddMenuBarToEmptyMenuBarItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
CutCommand_ExecuteRequested(XamlUICommand sender, ExecuteRequestedEventArgs args) | MenuBarPage | [inline, private]
MenuBarPage() | MenuBarPage | [inline]
NewItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
RemoveFlyoutItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
RemoveItemsFromOneChildrenItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
RemoveMenuBarItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
TestFrameCheckbox_Checked(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
UndoItem_Click(object sender, RoutedEventArgs e) | MenuBarPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarDetailLabelRequestedEventArgs Member List

This is the complete list of members for AnnotatedScrollBarDetailLabelRequestedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
AnnotatedScrollBarDetailLabelRequestedEventArgs(double scrollOffset) | AnnotatedScrollBarDetailLabelRequestedEventArgs |
CheckThread() | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
Content() | AnnotatedScrollBarDetailLabelRequestedEventArgs |
Content(const winrt::IInspectable &content) | AnnotatedScrollBarDetailLabelRequestedEventArgs |
DeleteInstanceOnUIThread(std::unique_ptr< AnnotatedScrollBarDetailLabelRequestedEventArgs > &&self) noexcept | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< AnnotatedScrollBarDetailLabelRequestedEventArgs > &&self) | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
IsOnThread() | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< AnnotatedScrollBarDetailLabelRequestedEventArgs, winrt::implementation::AnnotatedScrollBarDetailLabelRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
ScrollOffset() | AnnotatedScrollBarDetailLabelRequestedEventArgs |
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutCommandBarTemplateSettings Member List

This is the complete list of members for CommandBarFlyoutCommandBarTemplateSettings, including all inherited members.
ClearProperties() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
CloseAnimationEndPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
CloseAnimationEndPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
CloseAnimationEndPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
CommandBarFlyoutCommandBarTemplateSettingsProperties() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ContentClipRect(winrt::Rect const &value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ContentClipRect() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ContentClipRectProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
CurrentWidth(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
CurrentWidth() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
CurrentWidthProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
EnsureProperties() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
ExpandDownAnimationEndPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownAnimationEndPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownAnimationEndPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandDownAnimationHoldPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownAnimationHoldPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownAnimationHoldPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandDownAnimationStartPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownAnimationStartPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownAnimationStartPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandDownOverflowVerticalPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownOverflowVerticalPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandDownOverflowVerticalPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandedWidth(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandedWidth() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandedWidthProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandUpAnimationEndPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpAnimationEndPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpAnimationEndPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandUpAnimationHoldPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpAnimationHoldPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpAnimationHoldPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandUpAnimationStartPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpAnimationStartPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpAnimationStartPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
ExpandUpOverflowVerticalPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpOverflowVerticalPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
ExpandUpOverflowVerticalPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
OpenAnimationEndPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
OpenAnimationEndPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
OpenAnimationEndPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
OpenAnimationStartPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
OpenAnimationStartPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
OpenAnimationStartPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
OverflowContentClipRect(winrt::Rect const &value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
OverflowContentClipRect() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
OverflowContentClipRectProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
s_CloseAnimationEndPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ContentClipRectProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_CurrentWidthProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandDownAnimationEndPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandDownAnimationHoldPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandDownAnimationStartPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandDownOverflowVerticalPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandedWidthProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandUpAnimationEndPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandUpAnimationHoldPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandUpAnimationStartPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_ExpandUpOverflowVerticalPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_OpenAnimationEndPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_OpenAnimationStartPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_OverflowContentClipRectProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_WidthExpansionAnimationEndPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_WidthExpansionAnimationStartPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_WidthExpansionDeltaProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_WidthExpansionMoreButtonAnimationEndPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
s_WidthExpansionMoreButtonAnimationStartPositionProperty | CommandBarFlyoutCommandBarTemplateSettingsProperties | [static]
WidthExpansionAnimationEndPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionAnimationEndPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionAnimationEndPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
WidthExpansionAnimationStartPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionAnimationStartPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionAnimationStartPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
WidthExpansionDelta(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionDelta() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionDeltaProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
WidthExpansionMoreButtonAnimationEndPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionMoreButtonAnimationEndPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionMoreButtonAnimationEndPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
WidthExpansionMoreButtonAnimationStartPosition(double value) | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionMoreButtonAnimationStartPosition() | CommandBarFlyoutCommandBarTemplateSettingsProperties |
WidthExpansionMoreButtonAnimationStartPositionProperty() | CommandBarFlyoutCommandBarTemplateSettingsProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemProperties Member List

This is the complete list of members for NavigationViewItemProperties, including all inherited members.
ClearProperties() | NavigationViewItemProperties | [static]
CompactPaneLength(double value) | NavigationViewItemProperties |
CompactPaneLength() | NavigationViewItemProperties |
CompactPaneLengthProperty() | NavigationViewItemProperties | [inline, static]
EnsureProperties() | NavigationViewItemProperties | [static]
HasUnrealizedChildren(bool value) | NavigationViewItemProperties |
HasUnrealizedChildren() | NavigationViewItemProperties |
HasUnrealizedChildrenProperty() | NavigationViewItemProperties | [inline, static]
Icon(winrt::IconElement const &value) | NavigationViewItemProperties |
Icon() | NavigationViewItemProperties |
IconProperty() | NavigationViewItemProperties | [inline, static]
InfoBadge(winrt::InfoBadge const &value) | NavigationViewItemProperties |
InfoBadge() | NavigationViewItemProperties |
InfoBadgeProperty() | NavigationViewItemProperties | [inline, static]
IsChildSelected(bool value) | NavigationViewItemProperties |
IsChildSelected() | NavigationViewItemProperties |
IsChildSelectedProperty() | NavigationViewItemProperties | [inline, static]
IsExpanded(bool value) | NavigationViewItemProperties |
IsExpanded() | NavigationViewItemProperties |
IsExpandedProperty() | NavigationViewItemProperties | [inline, static]
MenuItems(winrt::IVector< winrt::IInspectable > const &value) | NavigationViewItemProperties |
MenuItems() | NavigationViewItemProperties |
MenuItemsProperty() | NavigationViewItemProperties | [inline, static]
MenuItemsSource(winrt::IInspectable const &value) | NavigationViewItemProperties |
MenuItemsSource() | NavigationViewItemProperties |
MenuItemsSourceProperty() | NavigationViewItemProperties | [inline, static]
NavigationViewItemProperties() | NavigationViewItemProperties |
OnHasUnrealizedChildrenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemProperties | [static]
OnIconPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemProperties | [static]
OnInfoBadgePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemProperties | [static]
OnIsExpandedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemProperties | [static]
OnMenuItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemProperties | [static]
OnMenuItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewItemProperties | [static]
s_CompactPaneLengthProperty | NavigationViewItemProperties | [static]
s_HasUnrealizedChildrenProperty | NavigationViewItemProperties | [static]
s_IconProperty | NavigationViewItemProperties | [static]
s_InfoBadgeProperty | NavigationViewItemProperties | [static]
s_IsChildSelectedProperty | NavigationViewItemProperties | [static]
s_IsExpandedProperty | NavigationViewItemProperties | [static]
s_MenuItemsProperty | NavigationViewItemProperties | [static]
s_MenuItemsSourceProperty | NavigationViewItemProperties | [static]
s_SelectsOnInvokedProperty | NavigationViewItemProperties | [static]
SelectsOnInvoked(bool value) | NavigationViewItemProperties |
SelectsOnInvoked() | NavigationViewItemProperties |
SelectsOnInvokedProperty() | NavigationViewItemProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PointerInfoRevokers Member List

This is the complete list of members for PointerInfoRevokers, including all inherited members.
RevokeAll() PointerInfoRevokers [inline]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CommandBarCenterPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

CommandBarCenterPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     [TopLevelTestPage(Name="CommandBar")]
00009     public sealed partial class CommandBarCenterPage : TestPage
00010     {
00011         public CommandBarCenterPage()
00012         {
00013             this.InitializeComponent();
00014
00015             navigateToCommandBarSummary.Click += delegate { Frame.NavigateWithoutAnimation(typeof(CommandBarSummaryPage)); };
00016             navigateToCommandBar.Click += delegate { Frame.NavigateWithoutAnimation(typeof(CommandBarPage)); };
00017         }
00018     }
00019 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemSeparator.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationViewItemSeparator.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationViewItemSeparator.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(NavigationViewItemSeparator)
00012 }
00013
00014 #include "NavigationViewItemSeparator.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ParallaxView.properties.cpp Source File

  • File List
  • File Members
  • Generated

ParallaxView.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ParallaxView.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ParallaxView)
00012 }
00013
00014 #include "ParallaxView.g.cpp"
00015
00016 GlobalDependencyProperty ParallaxViewProperties::s_ChildProperty{ nullptr };
00017 GlobalDependencyProperty ParallaxViewProperties::s_HorizontalShiftProperty{ nullptr };
00018 GlobalDependencyProperty ParallaxViewProperties::s_HorizontalSourceEndOffsetProperty{ nullptr };
00019 GlobalDependencyProperty ParallaxViewProperties::s_HorizontalSourceOffsetKindProperty{ nullptr };
00020 GlobalDependencyProperty ParallaxViewProperties::s_HorizontalSourceStartOffsetProperty{ nullptr };
00021 GlobalDependencyProperty ParallaxViewProperties::s_IsHorizontalShiftClampedProperty{ nullptr };
00022 GlobalDependencyProperty ParallaxViewProperties::s_IsVerticalShiftClampedProperty{ nullptr };
00023 GlobalDependencyProperty ParallaxViewProperties::s_MaxHorizontalShiftRatioProperty{ nullptr };
00024 GlobalDependencyProperty ParallaxViewProperties::s_MaxVerticalShiftRatioProperty{ nullptr };
00025 GlobalDependencyProperty ParallaxViewProperties::s_SourceProperty{ nullptr };
00026 GlobalDependencyProperty ParallaxViewProperties::s_VerticalShiftProperty{ nullptr };
00027 GlobalDependencyProperty ParallaxViewProperties::s_VerticalSourceEndOffsetProperty{ nullptr };
00028 GlobalDependencyProperty ParallaxViewProperties::s_VerticalSourceOffsetKindProperty{ nullptr };
00029 GlobalDependencyProperty ParallaxViewProperties::s_VerticalSourceStartOffsetProperty{ nullptr };
00030
00031 ParallaxViewProperties::ParallaxViewProperties()
00032 {
00033     EnsureProperties();
00034 }
00035
00036 void ParallaxViewProperties::EnsureProperties()
00037 {
00038     if (!s_ChildProperty)
00039     {
00040         s_ChildProperty =
00041             InitializeDependencyProperty(
00042                 L"Child",
00043                 winrt::name_of<winrt::UIElement>(),
00044                 winrt::name_of<winrt::ParallaxView>(),
00045                 false /* isAttached */,
00046                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00047                 winrt::PropertyChangedCallback(&OnChildPropertyChanged));
00048     }
00049     if (!s_HorizontalShiftProperty)
00050     {
00051         s_HorizontalShiftProperty =
00052             InitializeDependencyProperty(
00053                 L"HorizontalShift",
00054                 winrt::name_of<double>(),
00055                 winrt::name_of<winrt::ParallaxView>(),
00056                 false /* isAttached */,
00057                 ValueHelper<double>::BoxedDefaultValue(),
00058                 winrt::PropertyChangedCallback(&OnHorizontalShiftPropertyChanged));
00059     }
00060     if (!s_HorizontalSourceEndOffsetProperty)
00061     {
00062         s_HorizontalSourceEndOffsetProperty =
00063             InitializeDependencyProperty(
00064                 L"HorizontalSourceEndOffset",
00065                 winrt::name_of<double>(),
00066                 winrt::name_of<winrt::ParallaxView>(),
00067                 false /* isAttached */,
00068                 ValueHelper<double>::BoxedDefaultValue(),
00069                 winrt::PropertyChangedCallback(&OnHorizontalSourceEndOffsetPropertyChanged));
00070     }
00071     if (!s_HorizontalSourceOffsetKindProperty)
00072     {
00073         s_HorizontalSourceOffsetKindProperty =
00074             InitializeDependencyProperty(
00075                 L"HorizontalSourceOffsetKind",
00076                 winrt::name_of<winrt::ParallaxSourceOffsetKind>(),
00077                 winrt::name_of<winrt::ParallaxView>(),
00078                 false /* isAttached */,
00079                 ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(winrt::ParallaxSourceOffsetKind::Relative),
00080                 winrt::PropertyChangedCallback(&OnHorizontalSourceOffsetKindPropertyChanged));
00081     }
00082     if (!s_HorizontalSourceStartOffsetProperty)
00083     {
00084         s_HorizontalSourceStartOffsetProperty =
00085             InitializeDependencyProperty(
00086                 L"HorizontalSourceStartOffset",
00087                 winrt::name_of<double>(),
00088                 winrt::name_of<winrt::ParallaxView>(),
00089                 false /* isAttached */,
00090                 ValueHelper<double>::BoxedDefaultValue(),
00091                 winrt::PropertyChangedCallback(&OnHorizontalSourceStartOffsetPropertyChanged));
00092     }
00093     if (!s_IsHorizontalShiftClampedProperty)
00094     {
00095         s_IsHorizontalShiftClampedProperty =
00096             InitializeDependencyProperty(
00097                 L"IsHorizontalShiftClamped",
00098                 winrt::name_of<bool>(),
00099                 winrt::name_of<winrt::ParallaxView>(),
00100                 false /* isAttached */,
00101                 ValueHelper<bool>::BoxValueIfNecessary(true),
00102                 winrt::PropertyChangedCallback(&OnIsHorizontalShiftClampedPropertyChanged));
00103     }
00104     if (!s_IsVerticalShiftClampedProperty)
00105     {
00106         s_IsVerticalShiftClampedProperty =
00107             InitializeDependencyProperty(
00108                 L"IsVerticalShiftClamped",
00109                 winrt::name_of<bool>(),
00110                 winrt::name_of<winrt::ParallaxView>(),
00111                 false /* isAttached */,
00112                 ValueHelper<bool>::BoxValueIfNecessary(true),
00113                 winrt::PropertyChangedCallback(&OnIsVerticalShiftClampedPropertyChanged));
00114     }
00115     if (!s_MaxHorizontalShiftRatioProperty)
00116     {
00117         s_MaxHorizontalShiftRatioProperty =
00118             InitializeDependencyProperty(
00119                 L"MaxHorizontalShiftRatio",
00120                 winrt::name_of<double>(),
00121                 winrt::name_of<winrt::ParallaxView>(),
00122                 false /* isAttached */,
00123                 ValueHelper<double>::BoxValueIfNecessary(1.0),
00124                 winrt::PropertyChangedCallback(&OnMaxHorizontalShiftRatioPropertyChanged));
00125     }
00126     if (!s_MaxVerticalShiftRatioProperty)
00127     {
00128         s_MaxVerticalShiftRatioProperty =
00129             InitializeDependencyProperty(
00130                 L"MaxVerticalShiftRatio",
00131                 winrt::name_of<double>(),
00132                 winrt::name_of<winrt::ParallaxView>(),
00133                 false /* isAttached */,
00134                 ValueHelper<double>::BoxValueIfNecessary(1.0),
00135                 winrt::PropertyChangedCallback(&OnMaxVerticalShiftRatioPropertyChanged));
00136     }
00137     if (!s_SourceProperty)
00138     {
00139         s_SourceProperty =
00140             InitializeDependencyProperty(
00141                 L"Source",
00142                 winrt::name_of<winrt::UIElement>(),
00143                 winrt::name_of<winrt::ParallaxView>(),
00144                 false /* isAttached */,
00145                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00146                 winrt::PropertyChangedCallback(&OnSourcePropertyChanged));
00147     }
00148     if (!s_VerticalShiftProperty)
00149     {
00150         s_VerticalShiftProperty =
00151             InitializeDependencyProperty(
00152                 L"VerticalShift",
00153                 winrt::name_of<double>(),
00154                 winrt::name_of<winrt::ParallaxView>(),
00155                 false /* isAttached */,
00156                 ValueHelper<double>::BoxedDefaultValue(),
00157                 winrt::PropertyChangedCallback(&OnVerticalShiftPropertyChanged));
00158     }
00159     if (!s_VerticalSourceEndOffsetProperty)
00160     {
00161         s_VerticalSourceEndOffsetProperty =
00162             InitializeDependencyProperty(
00163                 L"VerticalSourceEndOffset",
00164                 winrt::name_of<double>(),
00165                 winrt::name_of<winrt::ParallaxView>(),
00166                 false /* isAttached */,
00167                 ValueHelper<double>::BoxedDefaultValue(),
00168                 winrt::PropertyChangedCallback(&OnVerticalSourceEndOffsetPropertyChanged));
00169     }
00170     if (!s_VerticalSourceOffsetKindProperty)
00171     {
00172         s_VerticalSourceOffsetKindProperty =
00173             InitializeDependencyProperty(
00174                 L"VerticalSourceOffsetKind",
00175                 winrt::name_of<winrt::ParallaxSourceOffsetKind>(),
00176                 winrt::name_of<winrt::ParallaxView>(),
00177                 false /* isAttached */,
00178                 ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(winrt::ParallaxSourceOffsetKind::Relative),
00179                 winrt::PropertyChangedCallback(&OnVerticalSourceOffsetKindPropertyChanged));
00180     }
00181     if (!s_VerticalSourceStartOffsetProperty)
00182     {
00183         s_VerticalSourceStartOffsetProperty =
00184             InitializeDependencyProperty(
00185                 L"VerticalSourceStartOffset",
00186                 winrt::name_of<double>(),
00187                 winrt::name_of<winrt::ParallaxView>(),
00188                 false /* isAttached */,
00189                 ValueHelper<double>::BoxedDefaultValue(),
00190                 winrt::PropertyChangedCallback(&OnVerticalSourceStartOffsetPropertyChanged));
00191     }
00192 }
00193
00194 void ParallaxViewProperties::ClearProperties()
00195 {
00196     s_ChildProperty = nullptr;
00197     s_HorizontalShiftProperty = nullptr;
00198     s_HorizontalSourceEndOffsetProperty = nullptr;
00199     s_HorizontalSourceOffsetKindProperty = nullptr;
00200     s_HorizontalSourceStartOffsetProperty = nullptr;
00201     s_IsHorizontalShiftClampedProperty = nullptr;
00202     s_IsVerticalShiftClampedProperty = nullptr;
00203     s_MaxHorizontalShiftRatioProperty = nullptr;
00204     s_MaxVerticalShiftRatioProperty = nullptr;
00205     s_SourceProperty = nullptr;
00206     s_VerticalShiftProperty = nullptr;
00207     s_VerticalSourceEndOffsetProperty = nullptr;
00208     s_VerticalSourceOffsetKindProperty = nullptr;
00209     s_VerticalSourceStartOffsetProperty = nullptr;
00210 }
00211
00212 void ParallaxViewProperties::OnChildPropertyChanged(
00213     winrt::DependencyObject const& sender,
00214     winrt::DependencyPropertyChangedEventArgs const& args)
00215 {
00216     auto owner = sender.as<winrt::ParallaxView>();
00217     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00218 }
00219
00220 void ParallaxViewProperties::OnHorizontalShiftPropertyChanged(
00221     winrt::DependencyObject const& sender,
00222     winrt::DependencyPropertyChangedEventArgs const& args)
00223 {
00224     auto owner = sender.as<winrt::ParallaxView>();
00225     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00226 }
00227
00228 void ParallaxViewProperties::OnHorizontalSourceEndOffsetPropertyChanged(
00229     winrt::DependencyObject const& sender,
00230     winrt::DependencyPropertyChangedEventArgs const& args)
00231 {
00232     auto owner = sender.as<winrt::ParallaxView>();
00233     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00234 }
00235
00236 void ParallaxViewProperties::OnHorizontalSourceOffsetKindPropertyChanged(
00237     winrt::DependencyObject const& sender,
00238     winrt::DependencyPropertyChangedEventArgs const& args)
00239 {
00240     auto owner = sender.as<winrt::ParallaxView>();
00241     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00242 }
00243
00244 void ParallaxViewProperties::OnHorizontalSourceStartOffsetPropertyChanged(
00245     winrt::DependencyObject const& sender,
00246     winrt::DependencyPropertyChangedEventArgs const& args)
00247 {
00248     auto owner = sender.as<winrt::ParallaxView>();
00249     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00250 }
00251
00252 void ParallaxViewProperties::OnIsHorizontalShiftClampedPropertyChanged(
00253     winrt::DependencyObject const& sender,
00254     winrt::DependencyPropertyChangedEventArgs const& args)
00255 {
00256     auto owner = sender.as<winrt::ParallaxView>();
00257     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00258 }
00259
00260 void ParallaxViewProperties::OnIsVerticalShiftClampedPropertyChanged(
00261     winrt::DependencyObject const& sender,
00262     winrt::DependencyPropertyChangedEventArgs const& args)
00263 {
00264     auto owner = sender.as<winrt::ParallaxView>();
00265     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00266 }
00267
00268 void ParallaxViewProperties::OnMaxHorizontalShiftRatioPropertyChanged(
00269     winrt::DependencyObject const& sender,
00270     winrt::DependencyPropertyChangedEventArgs const& args)
00271 {
00272     auto owner = sender.as<winrt::ParallaxView>();
00273     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00274 }
00275
00276 void ParallaxViewProperties::OnMaxVerticalShiftRatioPropertyChanged(
00277     winrt::DependencyObject const& sender,
00278     winrt::DependencyPropertyChangedEventArgs const& args)
00279 {
00280     auto owner = sender.as<winrt::ParallaxView>();
00281     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00282 }
00283
00284 void ParallaxViewProperties::OnSourcePropertyChanged(
00285     winrt::DependencyObject const& sender,
00286     winrt::DependencyPropertyChangedEventArgs const& args)
00287 {
00288     auto owner = sender.as<winrt::ParallaxView>();
00289     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00290 }
00291
00292 void ParallaxViewProperties::OnVerticalShiftPropertyChanged(
00293     winrt::DependencyObject const& sender,
00294     winrt::DependencyPropertyChangedEventArgs const& args)
00295 {
00296     auto owner = sender.as<winrt::ParallaxView>();
00297     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00298 }
00299
00300 void ParallaxViewProperties::OnVerticalSourceEndOffsetPropertyChanged(
00301     winrt::DependencyObject const& sender,
00302     winrt::DependencyPropertyChangedEventArgs const& args)
00303 {
00304     auto owner = sender.as<winrt::ParallaxView>();
00305     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00306 }
00307
00308 void ParallaxViewProperties::OnVerticalSourceOffsetKindPropertyChanged(
00309     winrt::DependencyObject const& sender,
00310     winrt::DependencyPropertyChangedEventArgs const& args)
00311 {
00312     auto owner = sender.as<winrt::ParallaxView>();
00313     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00314 }
00315
00316 void ParallaxViewProperties::OnVerticalSourceStartOffsetPropertyChanged(
00317     winrt::DependencyObject const& sender,
00318     winrt::DependencyPropertyChangedEventArgs const& args)
00319 {
00320     auto owner = sender.as<winrt::ParallaxView>();
00321     winrt::get_self<ParallaxView>(owner)->OnPropertyChanged(args);
00322 }
00323
00324 void ParallaxViewProperties::Child(winrt::UIElement const& value)
00325 {
00326     [[gsl::suppress(con)]]
00327     {
00328     static_cast<ParallaxView*>(this)->SetValue(s_ChildProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00329     }
00330 }
00331
00332 winrt::UIElement ParallaxViewProperties::Child()
00333 {
00334     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_ChildProperty));
00335 }
00336
00337 void ParallaxViewProperties::HorizontalShift(double value)
00338 {
00339     [[gsl::suppress(con)]]
00340     {
00341     static_cast<ParallaxView*>(this)->SetValue(s_HorizontalShiftProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00342     }
00343 }
00344
00345 double ParallaxViewProperties::HorizontalShift()
00346 {
00347     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalShiftProperty));
00348 }
00349
00350 void ParallaxViewProperties::HorizontalSourceEndOffset(double value)
00351 {
00352     [[gsl::suppress(con)]]
00353     {
00354     static_cast<ParallaxView*>(this)->SetValue(s_HorizontalSourceEndOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00355     }
00356 }
00357
00358 double ParallaxViewProperties::HorizontalSourceEndOffset()
00359 {
00360     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalSourceEndOffsetProperty));
00361 }
00362
00363 void ParallaxViewProperties::HorizontalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const& value)
00364 {
00365     [[gsl::suppress(con)]]
00366     {
00367     static_cast<ParallaxView*>(this)->SetValue(s_HorizontalSourceOffsetKindProperty, ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(value));
00368     }
00369 }
00370
00371 winrt::ParallaxSourceOffsetKind ParallaxViewProperties::HorizontalSourceOffsetKind()
00372 {
00373     return ValueHelper<winrt::ParallaxSourceOffsetKind>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalSourceOffsetKindProperty));
00374 }
00375
00376 void ParallaxViewProperties::HorizontalSourceStartOffset(double value)
00377 {
00378     [[gsl::suppress(con)]]
00379     {
00380     static_cast<ParallaxView*>(this)->SetValue(s_HorizontalSourceStartOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00381     }
00382 }
00383
00384 double ParallaxViewProperties::HorizontalSourceStartOffset()
00385 {
00386     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_HorizontalSourceStartOffsetProperty));
00387 }
00388
00389 void ParallaxViewProperties::IsHorizontalShiftClamped(bool value)
00390 {
00391     [[gsl::suppress(con)]]
00392     {
00393     static_cast<ParallaxView*>(this)->SetValue(s_IsHorizontalShiftClampedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00394     }
00395 }
00396
00397 bool ParallaxViewProperties::IsHorizontalShiftClamped()
00398 {
00399     return ValueHelper<bool>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_IsHorizontalShiftClampedProperty));
00400 }
00401
00402 void ParallaxViewProperties::IsVerticalShiftClamped(bool value)
00403 {
00404     [[gsl::suppress(con)]]
00405     {
00406     static_cast<ParallaxView*>(this)->SetValue(s_IsVerticalShiftClampedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00407     }
00408 }
00409
00410 bool ParallaxViewProperties::IsVerticalShiftClamped()
00411 {
00412     return ValueHelper<bool>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_IsVerticalShiftClampedProperty));
00413 }
00414
00415 void ParallaxViewProperties::MaxHorizontalShiftRatio(double value)
00416 {
00417     [[gsl::suppress(con)]]
00418     {
00419     static_cast<ParallaxView*>(this)->SetValue(s_MaxHorizontalShiftRatioProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00420     }
00421 }
00422
00423 double ParallaxViewProperties::MaxHorizontalShiftRatio()
00424 {
00425     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_MaxHorizontalShiftRatioProperty));
00426 }
00427
00428 void ParallaxViewProperties::MaxVerticalShiftRatio(double value)
00429 {
00430     [[gsl::suppress(con)]]
00431     {
00432     static_cast<ParallaxView*>(this)->SetValue(s_MaxVerticalShiftRatioProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00433     }
00434 }
00435
00436 double ParallaxViewProperties::MaxVerticalShiftRatio()
00437 {
00438     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_MaxVerticalShiftRatioProperty));
00439 }
00440
00441 void ParallaxViewProperties::Source(winrt::UIElement const& value)
00442 {
00443     [[gsl::suppress(con)]]
00444     {
00445     static_cast<ParallaxView*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00446     }
00447 }
00448
00449 winrt::UIElement ParallaxViewProperties::Source()
00450 {
00451     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_SourceProperty));
00452 }
00453
00454 void ParallaxViewProperties::VerticalShift(double value)
00455 {
00456     [[gsl::suppress(con)]]
00457     {
00458     static_cast<ParallaxView*>(this)->SetValue(s_VerticalShiftProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00459     }
00460 }
00461
00462 double ParallaxViewProperties::VerticalShift()
00463 {
00464     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalShiftProperty));
00465 }
00466
00467 void ParallaxViewProperties::VerticalSourceEndOffset(double value)
00468 {
00469     [[gsl::suppress(con)]]
00470     {
00471     static_cast<ParallaxView*>(this)->SetValue(s_VerticalSourceEndOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00472     }
00473 }
00474
00475 double ParallaxViewProperties::VerticalSourceEndOffset()
00476 {
00477     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalSourceEndOffsetProperty));
00478 }
00479
00480 void ParallaxViewProperties::VerticalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const& value)
00481 {
00482     [[gsl::suppress(con)]]
00483     {
00484     static_cast<ParallaxView*>(this)->SetValue(s_VerticalSourceOffsetKindProperty, ValueHelper<winrt::ParallaxSourceOffsetKind>::BoxValueIfNecessary(value));
00485     }
00486 }
00487
00488 winrt::ParallaxSourceOffsetKind ParallaxViewProperties::VerticalSourceOffsetKind()
00489 {
00490     return ValueHelper<winrt::ParallaxSourceOffsetKind>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalSourceOffsetKindProperty));
00491 }
00492
00493 void ParallaxViewProperties::VerticalSourceStartOffset(double value)
00494 {
00495     [[gsl::suppress(con)]]
00496     {
00497     static_cast<ParallaxView*>(this)->SetValue(s_VerticalSourceStartOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00498     }
00499 }
00500
00501 double ParallaxViewProperties::VerticalSourceStartOffset()
00502 {
00503     return ValueHelper<double>::CastOrUnbox(static_cast<ParallaxView*>(this)->GetValue(s_VerticalSourceStartOffsetProperty));
00504 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealBasicPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealBasicPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.UI;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008
00009 using System.Linq;
00010
00011 namespace MUXControlsTestApp
00012 {
00013     public sealed partial class RevealBasicPage : TestPage
00014     {
00015         public RevealBasicPage()
00016         {
00017             this.InitializeComponent();
00018         }
00019
00020         private void OnBackgroundColorButtonClick(object sender, RoutedEventArgs e)
00021         {
00022             if (RequestedTheme == ElementTheme.Dark)
00023             {
00024                 RequestedTheme = ElementTheme.Light;
00025                 RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.White);
00026             }
00027             else
00028             {
00029                 RequestedTheme = ElementTheme.Dark;
00030                 RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.Black);
00031             }
00032         }
00033
00034         private void OnChangeDefaultPositionClick(object sender, RoutedEventArgs e)
00035         {
00036             if (TopCmdBar.DefaultLabelPosition == Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Bottom)
00037             {
00038                 TopCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Collapsed;
00039                 BottomCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Collapsed;
00040             }
00041             else if (TopCmdBar.DefaultLabelPosition == Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Collapsed)
00042             {
00043                 TopCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Right;
00044                 BottomCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Right;
00045             }
00046             else
00047             {
00048                 TopCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Bottom;
00049                 BottomCmdBar.DefaultLabelPosition = Microsoft.UI.Xaml.Controls.CommandBarDefaultLabelPosition.Bottom;
00050             }
00051         }
00052     }
00053 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBorderSpotlightStateDesc Member List

This is the complete list of members for RevealBorderSpotlightStateDesc, including all inherited members.
ConstantAttenuation | RevealBorderSpotlightStateDesc
Height | RevealBorderSpotlightStateDesc
InnerConeAngleInDegrees | RevealBorderSpotlightStateDesc
InnerConeColor | RevealBorderSpotlightStateDesc
LinearAttenuation | RevealBorderSpotlightStateDesc
OuterAngleScale | RevealBorderSpotlightStateDesc
OuterConeAngleInDegrees | RevealBorderSpotlightStateDesc
OuterConeColor | RevealBorderSpotlightStateDesc
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/InspectingDataSource.cpp Source File

  • File List
  • File Members
  • Repeater

InspectingDataSource.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include <BindableVector.h>
00007 #include "ItemsRepeater.common.h"
00008 #include "InspectingDataSource.h"
00009
00010 InspectingDataSource::InspectingDataSource(const winrt::IInspectable& source)
00011 {
00012     if (!source)
00013     {
00014         throw winrt::hresult_invalid_argument(L"Argument 'source' is null.");
00015     }
00016
00017     if (const auto vector = source.try_as<winrt::IVector<winrt::IInspectable>>())
00018     {
00019         m_vector.set(vector);
00020         ListenToCollectionChanges();
00021     }
00022     else if (const auto bindableVector = source.try_as<winrt::IBindableVector>())
00023     {
00024         m_vector.set(reinterpret_cast<const winrt::IVector<winrt::IInspectable>&>(bindableVector));
00025         ListenToCollectionChanges();
00026     }
00027     else if (const auto vectorView = source.try_as<winrt::IVectorView<winrt::IInspectable>>())
00028     {
00029         m_vectorView.set(vectorView);
00030         ListenToCollectionChanges();
00031     }
00032     else if (const auto iterable = source.try_as<winrt::IIterable<winrt::IInspectable>>())
00033     {
00034         m_vector.set(WrapIterable(iterable));
00035     }
00036     else if (const auto bindableIterable = source.try_as<winrt::IBindableIterable>())
00037     {
00038         m_vector.set(WrapIterable(reinterpret_cast<const winrt::IIterable<winrt::IInspectable>&>(bindableIterable)));
00039     }
00040     else
00041     {
00042         throw winrt::hresult_invalid_argument(L"Argument 'source' is not a supported vector.");
00043     }
00044
00045     m_uniqueIdMaping = source.try_as<winrt::IKeyIndexMapping>();
00046 }
00047
00048 InspectingDataSource::~InspectingDataSource()
00049 {
00050     UnListenToCollectionChanges();
00051 }
00052
00053 #pragma region IDataSourceOverrides
00054
00055 int32_t InspectingDataSource::GetSizeCore()
00056 {
00057     if (m_vectorView)
00058     {
00059         return static_cast<int>(m_vectorView.get().Size());
00060     }
00061     else
00062     {
00063         return static_cast<int>(m_vector.get().Size());
00064     }
00065 }
00066
00067 winrt::IInspectable InspectingDataSource::GetAtCore(int index)
00068 {
00069     if (m_vectorView)
00070     {
00071         return m_vectorView.get().GetAt(static_cast<unsigned>(index));
00072     }
00073     else
00074     {
00075         return m_vector.get().GetAt(static_cast<unsigned>(index));
00076     }
00077 }
00078
00079 bool InspectingDataSource::HasKeyIndexMappingCore()
00080 {
00081     return m_uniqueIdMaping != nullptr;
00082 }
00083
00084 winrt::hstring InspectingDataSource::KeyFromIndexCore(int index)
00085 {
00086     if (m_uniqueIdMaping)
00087     {
00088         return m_uniqueIdMaping.KeyFromIndex(index);
00089     }
00090     else
00091     {
00092         throw winrt::hresult_not_implemented();
00093     }
00094 }
00095
00096 int InspectingDataSource::IndexFromKeyCore(winrt::hstring const& id)
00097 {
00098     if (m_uniqueIdMaping)
00099     {
00100         return m_uniqueIdMaping.IndexFromKey(id);
00101     }
00102     else
00103     {
00104         throw winrt::hresult_not_implemented();
00105     }
00106 }
00107
00108 int InspectingDataSource::IndexOfCore(winrt::IInspectable const& value)
00109 {
00110     int index = -1;
00111     if (m_vectorView)
00112     {
00113         auto v = static_cast<uint32_t>(-1);
00114         if (m_vectorView.get().IndexOf(value, v))
00115         {
00116             index = static_cast<int>(v);
00117         }
00118     }
00119     else if (m_vector)
00120     {
00121         auto v = static_cast<uint32_t>(-1);
00122         if (m_vector.get().IndexOf(value, v))
00123         {
00124             index = static_cast<int>(v);
00125         }
00126     }
00127     return index;
00128 }
00129
00130 #pragma endregion
00131
00132 winrt::IVector<winrt::IInspectable>
00133 InspectingDataSource::WrapIterable(const winrt::IIterable<winrt::IInspectable>& iterable)
00134 {
00135     auto vector = winrt::make<Vector<winrt::IInspectable, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>();
00136     auto iterator = iterable.First();
00137     while (iterator.HasCurrent())
00138     {
00139         vector.Append(iterator.Current());
00140         iterator.MoveNext();
00141     }
00142
00143     return vector;
00144 }
00145
00146 void InspectingDataSource::UnListenToCollectionChanges()
00147 {
00148     if (auto notifyCollection = m_notifyCollectionChanged.safe_get())
00149     {
00150         notifyCollection.CollectionChanged(m_eventToken);
00151     }
00152     else if (auto bindableObservableCollection = m_bindableObservableVector.safe_get())
00153     {
00154         bindableObservableCollection.VectorChanged(m_eventToken);
00155     }
00156     else if (auto observableCollection = m_observableVector.safe_get())
00157     {
00158         observableCollection.VectorChanged(m_eventToken);
00159     }
00160 }
00161
00162 void InspectingDataSource::ListenToCollectionChanges()
00163 {
00164     if (!m_vector)
00165     {
00166         MUX_ASSERT(m_vectorView);
00167     }
00168     else
00169     {
00170         MUX_ASSERT(m_vector);
00171     }
00172     const auto incc = [this]() {
00173         if (m_vectorView)
00174         {
00175             return m_vectorView.try_as<winrt::INotifyCollectionChanged>();
00176         }
00177         else
00178         {
00179             return m_vector.try_as<winrt::INotifyCollectionChanged>();
00180         }
00181     }();
00182
00183     if(incc)
00184     {
00185         m_eventToken = incc.CollectionChanged({ this, &InspectingDataSource::OnCollectionChanged });
00186         m_notifyCollectionChanged.set(incc);
00187     }
00188     else if (const auto bindableObservableVector = m_vector.try_as<winrt::IBindableObservableVector>())
00189     {
00190         m_eventToken = bindableObservableVector.VectorChanged({ this, &InspectingDataSource::OnBindableVectorChanged });
00191         m_bindableObservableVector.set(bindableObservableVector);
00192
00193     }
00194     else if(const auto observableVector = m_vector.try_as<winrt::IObservableVector<winrt::IInspectable>>()){
00195         m_eventToken = observableVector.VectorChanged({ this, &InspectingDataSource::OnVectorChanged });
00196         m_observableVector.set(observableVector);
00197     }
00198 }
00199
00200 void InspectingDataSource::OnCollectionChanged(
00201     const winrt::IInspectable& /*sender*/,
00202     const winrt::NotifyCollectionChangedEventArgs& e)
00203 {
00204     OnItemsSourceChanged(e);
00205 }
00206
00207 void InspectingDataSource::OnBindableVectorChanged(
00208     const winrt::IBindableObservableVector& sender,
00209     const winrt::IInspectable& e)
00210 {
00211     OnVectorChanged(
00212         reinterpret_cast<const winrt::IObservableVector<winrt::IInspectable>&>(sender),
00213         reinterpret_cast<const winrt::Collections::IVectorChangedEventArgs&>(e));
00214 }
00215
00216 void InspectingDataSource::OnVectorChanged(
00217     const winrt::Collections::IObservableVector<winrt::IInspectable>& /*sender*/,
00218     const winrt::Collections::IVectorChangedEventArgs& e)
00219 {
00220     // We need to build up NotifyCollectionChangedEventArgs here to raise the event.
00221     // There is opportunity to make this faster by caching the args if it does
00222     // show up as a perf issue.
00223     // Also note that we do not access the data - we just add nullptr. We just
00224     // need the count.
00225
00226     winrt::NotifyCollectionChangedAction action{};
00227     int oldStartingIndex = -1;
00228     int newStartingIndex = -1;
00229
00230     auto oldItems = winrt::make<Vector<winrt::IInspectable, MakeVectorParam<VectorFlag::Bindable>()>>();
00231     auto newItems = winrt::make<Vector<winrt::IInspectable, MakeVectorParam<VectorFlag::Bindable>()>>();
00232
00233     switch (e.CollectionChange())
00234     {
00235     case winrt::Collections::CollectionChange::ItemInserted:
00236         action = winrt::NotifyCollectionChangedAction::Add;
00237         newStartingIndex = static_cast<int>(e.Index());
00238         newItems.Append(nullptr);
00239         break;
00240     case winrt::Collections::CollectionChange::ItemRemoved:
00241         action = winrt::NotifyCollectionChangedAction::Remove;
00242         oldStartingIndex = static_cast<int>(e.Index());
00243         oldItems.Append(nullptr);
00244         break;
00245     case winrt::Collections::CollectionChange::ItemChanged:
00246         action = winrt::NotifyCollectionChangedAction::Replace;
00247         oldStartingIndex = static_cast<int>(e.Index());
00248         newStartingIndex = oldStartingIndex;
00249         newItems.Append(nullptr);
00250         oldItems.Append(nullptr);
00251         break;
00252     case winrt::Collections::CollectionChange::Reset:
00253         action = winrt::NotifyCollectionChangedAction::Reset;
00254         break;
00255     default:
00256         MUX_ASSERT(false);
00257         break;
00258     }
00259
00260     OnItemsSourceChanged(
00261         winrt::NotifyCollectionChangedEventArgs(
00262             action,
00263             newItems,
00264             oldItems,
00265             newStartingIndex,
00266             oldStartingIndex));
00267 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewSelectionChangedEventArgs.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewSelectionChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Vector.h"
00007 #include "TreeViewSelectionChangedEventArgs.h"
00008
00009 TreeViewSelectionChangedEventArgs::TreeViewSelectionChangedEventArgs(const winrt::IVector<winrt::IInspectable> addedItems, const winrt::IVector<winrt::IInspectable> removedItems)
00010 {
00011     m_addedItems.set(addedItems);
00012     m_removedItems.set(removedItems);
00013 }
00014
00015 winrt::IVector<winrt::IInspectable> TreeViewSelectionChangedEventArgs::AddedItems()
00016 {
00017     return m_addedItems.get();
00018 }
00019
00020 winrt::IVector<winrt::IInspectable> TreeViewSelectionChangedEventArgs::RemovedItems()
00021 {
00022     return m_removedItems.get();
00023 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2Tests::WebView2TestSetupHelper Member List

This is the complete list of members for WebView2Tests::WebView2TestSetupHelper, including all inherited members.
Dispose(bool isDisposing) | WebView2Tests::WebView2TestSetupHelper | [inline, protected]
WebView2TestSetupHelper(global::System.Collections.Generic.ICollection< string > testNames) | WebView2Tests::WebView2TestSetupHelper | [inline]
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterLayoutContext.h Source File

  • File List
  • File Members
  • Repeater

RepeaterLayoutContext.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "VirtualizingLayoutContext.h"
00007
00008 class RepeaterLayoutContext :
00009     public winrt::implements<RepeaterLayoutContext, VirtualizingLayoutContext>
00010 {
00011 public:
00012     RepeaterLayoutContext(const winrt::ItemsRepeater& owner);
00013
00014     // Explicitly implement GetRuntimeClassName because winrt::implements chooses the first interface
00015     // as our name and we want the concrete VirtualizingLayoutContext as our name.
00016     hstring GetRuntimeClassName() const
00017     {
00018         return VirtualizingLayoutContext::GetRuntimeClassName();
00019     }
00020
00021 #pragma region ILayoutContextOverrides
00022
00023     winrt::IInspectable LayoutStateCore();
00024     void LayoutStateCore(winrt::IInspectable const& state);
00025
00026 #pragma endregion
00027
00028 #pragma region IVirtualizingLayoutContextOverrides
00029
00030     int32_t ItemCountCore();
00031     winrt::UIElement GetOrCreateElementAtCore(int index, winrt::ElementRealizationOptions const& options);
00032
00033     winrt::IInspectable GetItemAtCore(int index);
00034     void RecycleElementCore(winrt::UIElement const& element);
00035
00036     winrt::Rect VisibleRectCore();
00037     winrt::Rect RealizationRectCore();
00038
00039     int32_t RecommendedAnchorIndexCore();
00040
00041     winrt::Point LayoutOriginCore();
00042     void LayoutOriginCore(winrt::Point const& value);
00043
00044 #pragma endregion
00045
00046 private:
00047     winrt::ItemsRepeater GetOwner();
00048
00049     // We hold a weak reference to prevent a leaking reference
00050     // cycle between the ItemsRepeater and its layout.
00051     winrt::weak_ref<winrt::ItemsRepeater> m_owner;
00052 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/APITests/LayoutPanelTests.cs Source File

  • File List
  • File Members
  • LayoutPanel
  • APITests

LayoutPanelTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Controls.Primitives;
00007 using Microsoft.UI.Xaml;
00008 using System.Threading;
00009 using System;
00010 using Microsoft.UI.Xaml.Media;
00011 using Windows.UI;
00012 using Windows.Foundation;
00013 using Common;
00014
00015 using WEX.TestExecution;
00016 using WEX.TestExecution.Markup;
00017 using WEX.Logging.Interop;
00018
00019 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00020 {
00021     [TestClass]
00022     public partial class LayoutPanelTests : ApiTestBase
00023     {
00024         [ClassInitialize]
00025         [TestProperty("Classification", "Integration")]
00026         public static void ClassInitialize(TestContext context) { }
00027
00028         [TestMethod]
00029         public void VerifyPaddingAndBorderThicknessLayoutOffset()
00030         {
00031             RunOnUIThread.Execute(() =>
00032             {
00033                 double width = 400;
00034                 double height = 400;
00035                 Thickness borderThickness = new Thickness(5, 10, 15, 20);
00036                 Thickness padding = new Thickness(2, 4, 6, 8);
00037
00038                 LayoutPanel panel = new LayoutPanel();
00039                 panel.Width = width;
00040                 panel.Height = height;
00041                 panel.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
00042                 panel.BorderThickness = borderThickness;
00043                 panel.Padding = padding;
00044
00045                 var button = new Button { Content = "Button", VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch };
00046                 var expectedButtonLayoutSlot = new Rect
00047                 {
00048                     Width = width - borderThickness.Left - borderThickness.Right - padding.Left - padding.Right,
00049                     Height = height - borderThickness.Top - borderThickness.Bottom - padding.Top - padding.Bottom,
00050                     X = borderThickness.Left + padding.Left,
00051                     Y = borderThickness.Top + padding.Top,
00052                 };
00053                 panel.Children.Add(button);
00054
00055                 Content = panel;
00056                 Content.UpdateLayout();
00057
00058                 Verify.AreEqual(expectedButtonLayoutSlot, LayoutInformation.GetLayoutSlot(button), "Verify LayoutSlot of child Button");
00059             });
00060         }
00061
00062         [TestMethod]
00063         public void VerifyPaddingAndBorderThicknessLayoutOffset_StackLayout()
00064         {
00065             RunOnUIThread.Execute(() =>
00066             {
00067                 double width = 400;
00068                 double height = 400;
00069                 Thickness borderThickness = new Thickness(5, 10, 15, 20);
00070                 Thickness padding = new Thickness(2, 4, 6, 8);
00071
00072                 LayoutPanel panel = new LayoutPanel();
00073                 panel.Layout = new StackLayout();
00074                 panel.Width = width;
00075                 panel.Height = height;
00076                 panel.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
00077                 panel.BorderThickness = borderThickness;
00078                 panel.Padding = padding;
00079
00080                 double unpaddedWidth = width - borderThickness.Left - borderThickness.Right - padding.Left - padding.Right;
00081                 double itemHeight = 50;
00082                 double unpaddedX = borderThickness.Left + padding.Left;
00083                 double unpaddedY = borderThickness.Top + padding.Top;
00084
00085                 var button1 = new Button { Content = "Button", Height = itemHeight, HorizontalAlignment = HorizontalAlignment.Stretch };
00086                 var button2 = new Button { Content = "Button", Height = itemHeight, HorizontalAlignment = HorizontalAlignment.Stretch };
00087                 var expectedButton1LayoutSlot = new Rect
00088                 {
00089                     Width = unpaddedWidth,
00090                     Height = itemHeight,
00091                     X = unpaddedX,
00092                     Y = unpaddedY,
00093                 };
00094                 var expectedButton2LayoutSlot = new Rect
00095                 {
00096                     Width = unpaddedWidth,
00097                     Height = itemHeight,
00098                     X = unpaddedX,
00099                     Y = unpaddedY + itemHeight,
00100                 };
00101                 panel.Children.Add(button1);
00102                 panel.Children.Add(button2);
00103
00104                 Content = panel;
00105                 Content.UpdateLayout();
00106
00107                 Verify.AreEqual(expectedButton1LayoutSlot, LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
00108                 Verify.AreEqual(expectedButton2LayoutSlot, LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
00109             });
00110         }
00111
00112         [TestMethod]
00113         public void VerifySwitchingLayoutDynamically()
00114         {
00115             LayoutPanel panel = null;
00116             Button button1 = null;
00117             Button button2 = null;
00118
00119             RunOnUIThread.Execute(() =>
00120             {
00121                 Log.Comment("Create LayoutPanel with StackLayout");
00122
00123                 panel = new LayoutPanel() { Width = 400, Height = 400 };
00124
00125                 var stackLayout = new StackLayout
00126                 {
00127                     Orientation = Orientation.Vertical
00128                 };
00129                 panel.Layout = stackLayout;
00130
00131                 button1 = new Button { Height = 100, Content = "1" };
00132                 button2 = new Button { Height = 100, Content = "2" };
00133                 panel.Children.Add(button1);
00134                 panel.Children.Add(button2);
00135
00136                 Content = panel;
00137                 Content.UpdateLayout();
00138
00139                 Log.Comment("Verify layout for StackLayout:");
00140                 Verify.AreEqual(new Rect(0, 0, 400, 100), LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
00141                 Verify.AreEqual(new Rect(0, 100, 400, 100), LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
00142             });
00143
00144             IdleSynchronizer.Wait();
00145
00146             RunOnUIThread.Execute(() =>
00147             {
00148                 Log.Comment("Switch LayoutPanel to UniformGridLayout");
00149                 UniformGridLayout gridLayout = new UniformGridLayout();
00150                 gridLayout.MinItemWidth = 100;
00151                 gridLayout.MinItemHeight = 100;
00152                 panel.Layout = gridLayout;
00153
00154                 Content.UpdateLayout();
00155
00156                 Log.Comment("Verify layout for UniformGridLayout:");
00157                 Verify.AreEqual(new Rect(0, 0, 100, 100), LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
00158                 Verify.AreEqual(new Rect(100, 0, 100, 100), LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
00159             });
00160         }
00161
00162         [TestMethod]
00163         public void VerifyCustomNonVirtualizingLayout()
00164         {
00165             LayoutPanel panel = null;
00166             Button button1 = null;
00167             Button button2 = null;
00168
00169             RunOnUIThread.Execute(() =>
00170             {
00171                 Log.Comment("Create LayoutPanel with MyCustomNonVirtualizingStackLayout");
00172
00173                 panel = new LayoutPanel() { Width = 400, Height = 400 };
00174
00175                 var customStackLayout = new MyCustomNonVirtualizingStackLayout();
00176                 panel.Layout = customStackLayout;
00177
00178                 button1 = new Button { Height = 100, Width = 400, Content = "1" };
00179                 button2 = new Button { Height = 100, Width = 400, Content = "2" };
00180                 panel.Children.Add(button1);
00181                 panel.Children.Add(button2);
00182
00183                 Content = panel;
00184                 Content.UpdateLayout();
00185
00186                 Log.Comment("Verify layout for StackLayout:");
00187                 Verify.AreEqual(new Rect(0, 0, 400, 100), LayoutInformation.GetLayoutSlot(button1), "Verify LayoutSlot of child 1");
00188                 Verify.AreEqual(new Rect(0, 100, 400, 100), LayoutInformation.GetLayoutSlot(button2), "Verify LayoutSlot of child 2");
00189             });
00190
00191             IdleSynchronizer.Wait();
00192         }
00193     }
00194
00195     public class MyCustomNonVirtualizingStackLayout: NonVirtualizingLayout
00196     {
00197         protected override Size MeasureOverride(NonVirtualizingLayoutContext context, Size availableSize)
00198         {
00199             double extentHeight = 0.0;
00200             double extentWidth = 0.0;
00201             foreach (var element in context.Children)
00202             {
00203                 element.Measure(availableSize);
00204                 extentHeight += element.DesiredSize.Height;
00205                 extentWidth = Math.Max(extentWidth, element.DesiredSize.Width);
00206             }
00207
00208             return new Size(extentWidth, extentHeight);
00209         }
00210
00211         protected override Size ArrangeOverride(NonVirtualizingLayoutContext context, Size finalSize)
00212         {
00213             double offset = 0.0;
00214             foreach (var element in context.Children)
00215             {
00216                 element.Arrange(new Rect(0, offset, element.DesiredSize.Width, element.DesiredSize.Height));
00217                 offset += element.DesiredSize.Height;
00218             }
00219
00220             return finalSize;
00221         }
00222     }
00223 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemInvokedEventArgs.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationViewItemInvokedEventArgs.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationViewItemInvokedEventArgs.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(NavigationViewItemInvokedEventArgs)
00012 }
00013
00014 #include "NavigationViewItemInvokedEventArgs.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRingAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ProgressRingAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ProgressRingAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ProgressRingAutomationPeer)
00012 }
00013
00014 #include "ProgressRingAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/InteractionTests/RadioButtonsTestPageElements.cs Source File

  • File List
  • File Members
  • RadioButtons
  • InteractionTests

RadioButtonsTestPageElements.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00006 using System;
00007 using System.Numerics;
00008 using Common;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00016 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00017 using Microsoft.Windows.Apps.Test.Foundation;
00018
00019 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00020 {
00021     class RadioButtonsTestPageElements
00022     {
00023         public UIObject GetTestRadioButtons()
00024         {
00025             return GetElement(ref TestRadioButtons, "TestRadioButtons");
00026         }
00027         private UIObject TestRadioButtons;
00028
00029         public Edit GetMaxColumnsTextBlock()
00030         {
00031             return GetElement(ref MaxColumnsTextBlock, "MaxColumnsTextBlock");
00032         }
00033         private Edit MaxColumnsTextBlock;
00034
00035         public Button GetSetMaxColumnsButton()
00036         {
00037             return GetElement(ref SetMaxColumnsButton, "SetMaxColumnsButton");
00038         }
00039         private Button SetMaxColumnsButton;
00040
00041         public Edit GetNumberOfItemsTextBlock()
00042         {
00043             return GetElement(ref NumberOfItemsTextBlock, "NumberOfItemsTextBlock");
00044         }
00045         private Edit NumberOfItemsTextBlock;
00046
00047         public Button GetSetNumberOfItemsButton()
00048         {
00049             return GetElement(ref SetNumberOfItemsButton, "SetNumberOfItemsButton");
00050         }
00051         private Button SetNumberOfItemsButton;
00052
00053         public Edit GetIndexToSelectTextBlock()
00054         {
00055             return GetElement(ref IndexToSelectTextBlock, "IndexToSelectTextBlock");
00056         }
00057         private Edit IndexToSelectTextBlock;
00058
00059         public Button GetSelectByIndexButton()
00060         {
00061             return GetElement(ref SelectByIndexButton, "SelectByIndexButton");
00062         }
00063         private Button SelectByIndexButton;
00064
00065         public Button GetSelectByItemButton()
00066         {
00067             return GetElement(ref SelectByItemButton, "SelectByItemButton");
00068         }
00069         private Button SelectByItemButton;
00070
00071         public Button GetInsertDisplayRadioButtonButton()
00072         {
00073             return GetElement(ref InsertDisplayRadioButtonButton, "InsertDisplayRadioButtonButton");
00074         }
00075         private Button InsertDisplayRadioButtonButton;
00076
00077         public Edit GetCustomIndexTextBox()
00078         {
00079             return GetElement(ref CustomIndexTextBox, "CustomIndexTextBox");
00080         }
00081         private Edit CustomIndexTextBox;
00082
00083         public Edit GetCustomContentTextBox()
00084         {
00085             return GetElement(ref CustomContentTextBox, "CustomContentTextBox");
00086         }
00087         private Edit CustomContentTextBox;
00088
00089         public CheckBox GetCustomDisabledCheckBox()
00090         {
00091             return GetElement(ref CustomDisabledCheckBox, "CustomDisabledCheckBox");
00092         }
00093         private CheckBox CustomDisabledCheckBox;
00094
00095         public CheckBox GetCustomCheckedCheckBox()
00096         {
00097             return GetElement(ref CustomCheckedCheckBox, "CustomCheckedCheckBox");
00098         }
00099         private CheckBox CustomCheckedCheckBox;
00100
00101         public TextBlock GetSelectedIndexTextBlock()
00102         {
00103             return GetElement(ref SelectedIndexTextBlock, "SelectedIndexTextBlock");
00104         }
00105         private TextBlock SelectedIndexTextBlock;
00106
00107         public TextBlock GetReproTextBlock()
00108         {
00109             return GetElement(ref ReproTextBlock, "ReproTextBlock");
00110         }
00111         private TextBlock ReproTextBlock;
00112
00113         public TextBlock GetSelectedItemTextBlock()
00114         {
00115             return GetElement(ref SelectedItemTextBlock, "SelectedItemTextBlock");
00116         }
00117         private TextBlock SelectedItemTextBlock;
00118
00119         public TextBlock GetSelectedPositionInSetTextBlock()
00120         {
00121             return GetElement(ref SelectedPositionInSetTextBlock, "SelectedPositionInSetTextBlock");
00122         }
00123         private TextBlock SelectedPositionInSetTextBlock;
00124
00125         public TextBlock GetSelectedSizeOfSetTextBlock()
00126         {
00127             return GetElement(ref SelectedSizeOfSetTextBlock, "SelectedSizeOfSetTextBlock");
00128         }
00129         private TextBlock SelectedSizeOfSetTextBlock;
00130
00131         public CheckBox GetRadioButtonsHasFocusCheckBox()
00132         {
00133             return GetElement(ref RadioButtonsHasFocusCheckBox, "RadioButtonsHasFocusCheckBox");
00134         }
00135         private CheckBox RadioButtonsHasFocusCheckBox;
00136
00137         public TextBlock GetFocusedIndexTextBlock()
00138         {
00139             return GetElement(ref FocusedIndexTextBlock, "FocusedIndexTextBlock");
00140         }
00141         private TextBlock FocusedIndexTextBlock;
00142
00143         public TextBlock GetFocusedItemTextBlock()
00144         {
00145             return GetElement(ref FocusedItemTextBlock, "FocusedItemTextBlock");
00146         }
00147         private TextBlock FocusedItemTextBlock;
00148
00149         public TextBlock GetLayoutNumberOfRowsTextBlock()
00150         {
00151             return GetElement(ref LayoutNumberOfRowsTextBlock, "LayoutNumberOfRowsTextBlock");
00152         }
00153         private TextBlock LayoutNumberOfRowsTextBlock;
00154
00155         public TextBlock GetLayoutNumberOfColumnsTextBlock()
00156         {
00157             return GetElement(ref LayoutNumberOfColumnsTextBlock, "LayoutNumberOfColumnsTextBlock");
00158         }
00159         private TextBlock LayoutNumberOfColumnsTextBlock;
00160
00161         public TextBlock GetLayoutNumberOfLargerColumnsTextBlock()
00162         {
00163             return GetElement(ref LayoutNumberOfLargerColumnsTextBlock, "LayoutNumberOfLargerColumnsTextBlock");
00164         }
00165         private TextBlock LayoutNumberOfLargerColumnsTextBlock;
00166
00167         public Button GetClearRadioButtonsEventsButton()
00168         {
00169             return GetElement(ref ClearRadioButtonsEventsButton, "ClearRadioButtonsEventsButton");
00170         }
00171         private Button ClearRadioButtonsEventsButton;
00172
00173         public ComboBox GetItemTypeComboBox()
00174         {
00175             return GetElement(ref ItemTypeComboBox, "ItemTypeComboBox");
00176         }
00177         private ComboBox ItemTypeComboBox;
00178
00179         public ComboBox GetSourceComboBox()
00180         {
00181             return GetElement(ref SourceComboBox, "SourceComboBox");
00182         }
00183         private ComboBox SourceComboBox;
00184
00185         public Edit GetBorderWidthTextBox()
00186         {
00187             return GetElement(ref BorderWidthTextBox, "BorderWidthTextBox");
00188         }
00189         private Edit BorderWidthTextBox;
00190
00191         public Button GetSetBorderWidthButton()
00192         {
00193             return GetElement(ref SetBorderWidthButton, "SetBorderWidthButton");
00194         }
00195         private Button SetBorderWidthButton;
00196
00197         public Button GetFocusSelectedItemButton()
00198         {
00199             return GetElement(ref FocusSelectedItemButton, "FocusSelectedItemButton");
00200         }
00201         private Button FocusSelectedItemButton;
00202
00203         public ListBox GetRadioButtonsEventsList()
00204         {
00205             return GetElement(ref RadioButtonsEventsList, "RadioButtonsEventsList");
00206         }
00207         private ListBox RadioButtonsEventsList;
00208
00209         private T GetElement<T>(ref T element, string elementName) where T : UIObject
00210         {
00211             if (element == null)
00212             {
00213                 Log.Comment("Find the " + elementName);
00214                 element = FindElement.ByNameOrId<T>(elementName);
00215                 Verify.IsNotNull(element);
00216             }
00217             return element;
00218         }
00219
00220         public enum RadioButtonsSourceType
00221         {
00222             String,
00223             RadioButton
00224         }
00225
00226         public enum RadioButtonsSourceLocation
00227         {
00228             Items,
00229             ItemSource
00230         }
00231     }
00232 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

PinterestLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using System.Diagnostics;
00006 using Windows.Foundation;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009
00010 namespace MUXControlsTestApp.Samples
00011 {
00012     public class PinterestLayout : VirtualizingLayout
00013     {
00014         public PinterestLayout()
00015         {
00016             Width = 150.0;
00017         }
00018
00019         public double Width { get; set; }
00020
00021         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00022         {
00023             var viewport = context.RealizationRect;
00024             Debug.WriteLine("Measure: " + viewport);
00025
00026             if (availableSize.Width != m_lastAvailableWidth)
00027             {
00028                 UpdateCachedBounds(availableSize);
00029                 m_lastAvailableWidth = availableSize.Width;
00030             }
00031
00032             // Initialize column offsets
00033             int numColumns = (int)(availableSize.Width / Width);
00034             if (m_columnOffsets.Count == 0)
00035             {
00036                 for (int i = 0; i < numColumns; i++)
00037                 {
00038                     m_columnOffsets.Add(0);
00039                 }
00040             }
00041
00042             m_firstIndex = GetStartIndex(viewport);
00043             int currentIndex = m_firstIndex;
00044             double nextOffset = -1.0;
00045
00046             // Measure items from start index to when we hit the end of the viewport.
00047             while (currentIndex < context.ItemCount && nextOffset < viewport.Bottom)
00048             {
00049                 Debug.WriteLine("Measuring " + currentIndex);
00050                 var child = context.GetOrCreateElementAt(currentIndex);
00051                 child.Measure(new Size(Width, availableSize.Height));
00052
00053                 if (currentIndex >= m_cachedBounds.Count)
00054                 {
00055                     // We do not have bounds for this index. Lay it out and cache it.
00056                     int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out nextOffset);
00057                     m_cachedBounds.Add(new Rect(columnIndex * Width, nextOffset, Width, child.DesiredSize.Height));
00058                     m_columnOffsets[columnIndex] += child.DesiredSize.Height;
00059                 }
00060                 else
00061                 {
00062                     if (currentIndex + 1 == m_cachedBounds.Count)
00063                     {
00064                         // Last element. Use the next offset.
00065                         GetIndexOfLowestColumn(m_columnOffsets, out nextOffset);
00066                     }
00067                     else
00068                     {
00069                         nextOffset = m_cachedBounds[currentIndex + 1].Top;
00070                     }
00071                 }
00072
00073                 child.Arrange(m_cachedBounds[currentIndex]);
00074
00075                 m_lastIndex = currentIndex;
00076                 currentIndex++;
00077             }
00078
00079             var extent = GetExtentSize(availableSize);
00080             return extent;
00081         }
00082
00083         // The children are arranged during measure, so ArrangeOverride can be a no-op.
00084         //protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00085         //{
00086         //    Debug.WriteLine("Arrange: " + context.RealizationRect);
00087         //    for (int index = m_firstIndex; index <= m_lastIndex; index++)
00088         //    {
00089         //        Debug.WriteLine("Arranging " + index);
00090         //        var child = context.GetElementAt(index);
00091         //        child.Arrange(m_cachedBounds[index]);
00092         //    }
00093         //    return finalSize;
00094         //}
00095
00096         private void UpdateCachedBounds(Size availableSize)
00097         {
00098             int numColumns = (int)(availableSize.Width / Width);
00099             m_columnOffsets.Clear();
00100             for (int i = 0; i < numColumns; i++)
00101             {
00102                 m_columnOffsets.Add(0);
00103             }
00104
00105             for (int index = 0; index < m_cachedBounds.Count; index++)
00106             {
00107                 double nextOffset = 0.0;
00108                 int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out nextOffset);
00109                 var oldHeight = m_cachedBounds[index].Height;
00110                 m_cachedBounds[index] = new Rect(columnIndex * Width, nextOffset, Width, oldHeight);
00111                 m_columnOffsets[columnIndex] += oldHeight;
00112             }
00113         }
00114
00115         private int GetStartIndex(Rect viewport)
00116         {
00117             int startIndex = 0;
00118             if (m_cachedBounds.Count == 0)
00119             {
00120                 startIndex = 0;
00121             }
00122             else
00123             {
00124                 // find first index that intersects the viewport
00125                 // perhaps this can be done more efficiently than walking
00126                 // from the start of the list.
00127                 for (int i = 0; i < m_cachedBounds.Count; i++)
00128                 {
00129                     var currentBounds = m_cachedBounds[i];
00130                     if (currentBounds.Y < viewport.Bottom &&
00131                         currentBounds.Bottom > viewport.Top)
00132                     {
00133                         startIndex = i;
00134                         break;
00135                     }
00136                 }
00137             }
00138
00139             return startIndex;
00140         }
00141
00142         private int GetIndexOfLowestColumn(List<double> columnOffsets, out double lowestOffset)
00143         {
00144             int lowestIndex = 0;
00145             lowestOffset = columnOffsets[lowestIndex];
00146             for (int index = 0; index < columnOffsets.Count; index++)
00147             {
00148                 var currentOffset = columnOffsets[index];
00149                 if (lowestOffset > currentOffset)
00150                 {
00151                     lowestOffset = currentOffset;
00152                     lowestIndex = index;
00153                 }
00154             }
00155
00156             return lowestIndex;
00157         }
00158
00159         private Size GetExtentSize(Size availableSize)
00160         {
00161             double largestColumnOffset = m_columnOffsets[0];
00162             for (int index = 0; index < m_columnOffsets.Count; index++)
00163             {
00164                 var currentOffset = m_columnOffsets[index];
00165                 if (largestColumnOffset < currentOffset)
00166                 {
00167                     largestColumnOffset = currentOffset;
00168                 }
00169             }
00170
00171             return new Size(availableSize.Width, largestColumnOffset);
00172         }
00173
00174         int m_firstIndex = 0;
00175         int m_lastIndex = 0;
00176         double m_lastAvailableWidth = 0.0;
00177         List<double> m_columnOffsets = new List<double>();
00178         List<Rect> m_cachedBounds = new List<Rect>();
00179     }
00180 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CommandBarPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

CommandBarPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006
00007 namespace MUXControlsTestApp
00008 {
00009     public sealed partial class CommandBarPage : Page
00010     {
00011         public CommandBarPage()
00012         {
00013             this.InitializeComponent();
00014         }
00015
00016         public void TopAppBarButton_Click(object sender, RoutedEventArgs args)
00017         {
00018             this.TopAppBar = null;
00019         }
00020
00021         public void BottomAppBarButton_Click(object sender, RoutedEventArgs args)
00022         {
00023             if (this.BottomCmdBar.Visibility == Visibility.Visible)
00024             {
00025                 this.BottomCmdBar.Visibility = Visibility.Collapsed;
00026             }
00027             else
00028             {
00029                 this.BottomCmdBar.Visibility = Visibility.Visible;
00030             }
00031         }
00032
00033         public void OpenCloseAppBarsButton_Click(object sender, RoutedEventArgs args)
00034         {
00035             TopAppBar.IsOpen = !TopAppBar.IsOpen;
00036             BottomAppBar.IsOpen = !BottomAppBar.IsOpen;
00037
00038             if (TopAppBar.IsOpen)
00039             {
00040                 OpenCloseAppBarsButton.Content = "Close App Bars";
00041             }
00042             else
00043             {
00044                 OpenCloseAppBarsButton.Content = "Open App Bars";
00045             }
00046         }
00047
00048         public void StickyUnstickyAppBarsButton_Click(object sender, RoutedEventArgs args)
00049         {
00050             TopAppBar.IsSticky = !TopAppBar.IsSticky;
00051             BottomAppBar.IsSticky = !BottomAppBar.IsSticky;
00052
00053             if (TopAppBar.IsSticky)
00054             {
00055                 StickyUnstickyAppBarsButton.Content = "Make App Bars Unsticky";
00056             }
00057             else
00058             {
00059                 StickyUnstickyAppBarsButton.Content = "Make App Bars Sticky";
00060             }
00061         }
00062     }
00063 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/SharedHelpers.h Source File

  • File List
  • File Members
  • inc

SharedHelpers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "AutoHandle.h"
00007 #include "StaticAssertFalse.h"
00008
00009 class SharedHelpers
00010 {
00011 public:
00012     static bool IsAnimationsEnabled();
00013     static winrt::IInspectable FindResource(const std::wstring_view& resource, const winrt::ResourceDictionary& resources, const winrt::IInspectable& defaultValue = nullptr);
00014     static winrt::IInspectable FindInApplicationResources(const std::wstring_view& resource, const winrt::IInspectable& defaultValue = nullptr);
00015     static bool IsInDesignMode();
00016     static bool IsInDesignModeV1();
00017     static bool IsInDesignModeV2();
00018
00019     static bool IsCoreWindowActivationModeAvailable();
00020
00021     static bool IsApplicationViewGetDisplayRegionsAvailable();
00022
00023     static bool IsInFrameworkPackage();
00024
00025     static bool IsInFrameworkPackage(winrt::hstring& frameworkPackageInstallLocation);
00026
00027     static bool IsBringIntoViewOptionsVerticalAlignmentRatioAvailable();
00028
00029     // Platform scale helper
00030     static winrt::Rect ConvertDipsToPhysical(winrt::UIElement const& xamlRootReference, const winrt::Rect& dipsRect);
00031
00032     static bool IsOnXbox();
00033     static bool IsMouseModeEnabled();
00034
00035     // Rect helpers
00036     static bool DoesRectContainPoint(const winrt::Rect& rect, const winrt::Point& point);
00037     static bool DoesRectContainPoint(const winrt::RectInt32& rect, const winrt::PointInt32& point);
00038     static bool DoRectsIntersect(const winrt::Rect& rect1, const winrt::Rect& rect2);
00039
00040     // DependencyObject helpers
00041     static bool IsAncestor(const winrt::DependencyObject& child, const winrt::DependencyObject& parent, bool checkVisibility = false);
00042
00043     // UIElement helpers
00044     static bool IsFocusableElement(winrt::UIElement const& element);
00045
00046     static void SyncWait(const winrt::IAsyncAction& asyncAction)
00047     {
00048         MUXControls::Common::Handle synchronizationHandle(::CreateEvent(nullptr, FALSE, FALSE, nullptr));
00049
00050         asyncAction.Completed(winrt::AsyncActionCompletedHandler(
00051             [&synchronizationHandle](winrt::IAsyncAction asyncAction, winrt::AsyncStatus asyncStatus)
00052         {
00053             if (asyncStatus == winrt::AsyncStatus::Completed)
00054             {
00055                 SetEvent(synchronizationHandle);
00056             }
00057             else if (asyncStatus == winrt::AsyncStatus::Error)
00058             {
00059                 throw winrt::hresult_error(E_FAIL, L"Async operation failed!");
00060             }
00061         }));
00062
00063         WaitForSingleObject(synchronizationHandle, INFINITE);
00064     }
00065
00066     template <typename T>
00067     static T SyncWait(winrt::IAsyncOperation<T> asyncOperation)
00068     {
00069         T returnValue{};
00070         MUXControls::Common::Handle synchronizationHandle(::CreateEvent(nullptr, FALSE, FALSE, nullptr));
00071
00072         asyncOperation.Completed(winrt::AsyncOperationCompletedHandler<T>(
00073             [&synchronizationHandle, &returnValue](winrt::IAsyncOperation<T> asyncOperation, winrt::AsyncStatus asyncStatus)
00074         {
00075             if (asyncStatus == winrt::AsyncStatus::Completed)
00076             {
00077                 SetEvent(synchronizationHandle);
00078                 returnValue = asyncOperation.GetResults();
00079             }
00080             else if (asyncStatus == winrt::AsyncStatus::Error)
00081             {
00082                 throw winrt::hresult_error(E_FAIL, L"Async operation failed!");
00083             }
00084         }));
00085
00086         WaitForSingleObject(synchronizationHandle, INFINITE);
00087         return returnValue;
00088     }
00089
00090     static void ScheduleActionAfterWait(
00091         std::function<void()> const& action,
00092         unsigned int millisecondWait);
00093
00094     static winrt::InMemoryRandomAccessStream CreateStreamFromBytes(const winrt::array_view<const byte>& bytes);
00095
00096     static void QueueCallbackForCompositionRendering(std::function<void()> callback);
00097
00098     static winrt::FrameworkElement FindInVisualTreeByName(winrt::FrameworkElement const& parent, std::wstring_view const& name)
00099     {
00100         return FindInVisualTree(parent,
00101             [name](const winrt::FrameworkElement& element)
00102             {
00103                 return (element.Name() == name);
00104             });
00105     }
00106
00107     template <typename ElementType>
00108     static ElementType FindInVisualTreeByType(winrt::FrameworkElement const& parent)
00109     {
00110         auto element = FindInVisualTree(parent,
00111             [](const winrt::FrameworkElement& element)
00112             {
00113                 return (element.try_as<ElementType>() != nullptr);
00114             });
00115         return element.as<ElementType>();
00116     }
00117
00118     static winrt::FrameworkElement FindInVisualTree(winrt::FrameworkElement const& parent, std::function<bool(winrt::FrameworkElement element)> const& isMatch)
00119     {
00120         int numChildren = winrt::VisualTreeHelper::GetChildrenCount(parent);
00121
00122         winrt::FrameworkElement foundElement = parent;
00123         if (isMatch(foundElement))
00124         {
00125             return foundElement;
00126         }
00127
00128         for (int i = 0; i < numChildren; i++)
00129         {
00130             if (auto dp = winrt::VisualTreeHelper::GetChild(parent, i))
00131             {
00132                 if (auto fe = dp.as<winrt::FrameworkElement>())
00133                 {
00134                     foundElement = FindInVisualTree(fe, isMatch);
00135                     if (foundElement)
00136                     {
00137                         return foundElement;
00138                     }
00139                 }
00140             }
00141         }
00142
00143         return nullptr;
00144     }
00145
00146     static bool IsTrue(winrt::IReference<bool> const& nullableBool)
00147     {
00148         if (nullableBool)
00149         {
00150             return nullableBool.GetBoolean();
00151         }
00152         return false;
00153     }
00154
00155     template<typename AncestorType>
00156     static AncestorType GetAncestorOfType(winrt::DependencyObject const& firstGuess)
00157     {
00158         auto obj = firstGuess;
00159         AncestorType matchedAncestor{ nullptr };
00160         while (obj && !matchedAncestor)
00161         {
00162             matchedAncestor = obj.try_as<AncestorType>();
00163             obj = winrt::VisualTreeHelper::GetParent(obj);
00164         }
00165
00166         if (matchedAncestor)
00167         {
00168             return matchedAncestor.as<AncestorType>();
00169         }
00170         else
00171         {
00172             return nullptr;
00173         }
00174     }
00175
00176     static winrt::hstring TryGetStringRepresentationFromObject(winrt::IInspectable obj);
00177
00178 #if defined(TITLEBAR_INCLUDED) || defined(SWIPECONTROL_INCLUDED) || defined(TEACHINGTIP_INCLUDED) || defined(TABVIEW_INCLUDED)
00179     static winrt::IconElement MakeIconElementFrom(winrt::IconSource const& iconSource);
00180 #endif
00181
00182     static void SetBinding(
00183         std::wstring_view const& pathString,
00184         winrt::DependencyObject const& target,
00185         winrt::DependencyProperty const& targetProperty);
00186
00187     static void SetBinding(
00188         winrt::IInspectable const& source,
00189         std::wstring_view const& pathString,
00190         winrt::DependencyObject const& target,
00191         winrt::DependencyProperty const& targetProperty,
00192         winrt::IValueConverter const& converter = nullptr,
00193         winrt::BindingMode mode = winrt::BindingMode::OneWay);
00194
00195     template <class ElementType>
00196     static void CopyVector(
00197         winrt::IObservableVector<ElementType> const& source,
00198         winrt::IObservableVector<ElementType> const& destination)
00199     {
00200         destination.Clear();
00201
00202         for (auto const& element : source)
00203         {
00204             destination.Append(element);
00205         }
00206     }
00207
00208     template <class ElementType>
00209     static void ForwardVectorChange(
00210         winrt::IObservableVector<ElementType> const& source,
00211         winrt::IObservableVector<ElementType> const& destination,
00212         winrt::IVectorChangedEventArgs const& args)
00213     {
00214         const uint32_t index = args.Index();
00215
00216         switch (args.CollectionChange())
00217         {
00218         case winrt::CollectionChange::ItemChanged:
00219             destination.SetAt(index, source.GetAt(index));
00220             break;
00221         case winrt::CollectionChange::ItemInserted:
00222             destination.InsertAt(index, source.GetAt(index));
00223             break;
00224         case winrt::CollectionChange::ItemRemoved:
00225             destination.RemoveAt(index);
00226             break;
00227         case winrt::CollectionChange::Reset:
00228             CopyVector(source, destination);
00229             break;
00230         default:
00231             MUX_ASSERT(false);
00232         }
00233     }
00234
00235     static winrt::ITextSelection GetRichTextSelection(winrt::RichEditBox const& richEditBox);
00236
00237     static winrt::VirtualKey GetVirtualKeyFromChar(WCHAR c);
00238
00239     template <typename IndexType, typename ElementType>
00240     static void EraseIfExists(std::map<IndexType, ElementType>& map, IndexType const& index)
00241     {
00242         const auto it = map.find(index);
00243         if (it != map.end())
00244         {
00245             map.erase(it);
00246         }
00247     }
00248
00249     template <typename ParameterType>
00250     static void RaiseAutomationPropertyChangedEvent(winrt::UIElement const& element, ParameterType oldValue, ParameterType newValue)
00251     {
00252         if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(element))
00253         {
00254             peer.RaisePropertyChangedEvent(
00255                 winrt::ExpandCollapsePatternIdentifiers::ExpandCollapseStateProperty(),
00256                 winrt::box_value(oldValue),
00257                 winrt::box_value(newValue));
00258         }
00259     }
00260
00261     static winrt::float4 RgbaColor(winrt::Color const& color);
00262
00263     static winrt::CoreApplicationView TryGetCurrentCoreApplicationView();
00264
00265 private:
00266     SharedHelpers() = default;
00267
00268     static bool s_isOnXboxInitialized;
00269     static bool s_isOnXbox;
00270     static bool s_isMouseModeEnabledInitialized;
00271     static bool s_isMouseModeEnabled;
00272 };
00273
00274 // Any time you declare a flag enum, you should use this macro to provide
00275 // operator overloads in order to make working with that flag enum a lot easier.
00276 //
00277 // Example usage:
00278 //
00279 //     enum class MyFlagEnum
00280 //     {
00281 //        None = 0x0000,
00282 //        Foo = 0x0001,
00283 //        Bar = 0x0002,
00284 //        Baz = 0x0004,
00285 //     };
00286 //
00287 //     DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS(MyFlagEnum);
00288 //
00289 // This makes it so that, for example, instead of needing to do all this:
00290 //
00291 //     MyFlagEnum enum = MyFlagEnum::None;
00292 //     enum = static_cast<int>(enum) | static_cast<int>(MyFlagEnum::Foo);
00293 //     enum = static_cast<int>(enum) | static_cast<int>(MyFlagEnum::Bar);
00294 //     enum = static_cast<int>(enum) | static_cast<int>(MyFlagEnum::Baz);
00295 //
00296 // ...you can instead just do this:
00297 //
00298 //     MyFlagEnum enum = MyFlagEnum::None;
00299 //     enum |= MyFlagEnum::Foo;
00300 //     enum |= MyFlagEnum::Bar;
00301 //     enum |= MyFlagEnum::Baz;
00302 //
00303 // This is needed because the bitwise & and | operators only operate out of the box
00304 // on built-in numeric types, so they need to be told how to interact with a flag enum.
00305 //
00306 #define DECLARE_FLAG_ENUM_OPERATOR_OVERLOADS(EnumType) \
00307 inline EnumType operator | (EnumType lhs, EnumType rhs) \
00308 { \
00309     return static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) | static_cast<std::underlying_type_t<EnumType>>(rhs)); \
00310 } \
00311  \
00312 inline EnumType& operator |= (EnumType& lhs, EnumType rhs) \
00313 { \
00314     lhs = static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) | static_cast<std::underlying_type_t<EnumType>>(rhs)); \
00315     return lhs; \
00316 } \
00317  \
00318 inline EnumType operator & (EnumType lhs, EnumType rhs) \
00319 { \
00320     return static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) & static_cast<std::underlying_type_t<EnumType>>(rhs)); \
00321 } \
00322 \
00323 inline EnumType& operator &= (EnumType& lhs, EnumType rhs) \
00324 { \
00325     lhs = static_cast<EnumType>(static_cast<std::underlying_type_t<EnumType>>(lhs) & static_cast<std::underlying_type_t<EnumType>>(rhs)); \
00326     return lhs; \
00327 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealRegressionTestsPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealRegressionTestsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.Foundation.Metadata;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Automation;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Xaml.Navigation;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Private.Media;
00012 using Common;
00013
00014 namespace MUXControlsTestApp
00015 {
00016     public sealed partial class RevealRegressionTestsPage : TestPage
00017     {
00018         Button _test1_RevealButton;
00019
00020         public RevealRegressionTestsPage()
00021         {
00022             this.InitializeComponent();
00023
00024             AutomationProperties.SetName(this, "RevealRegressionTestsPage");
00025             AutomationProperties.SetAutomationId(this, "RevealRegressionTestsPage");
00026
00027             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00028             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00029         }
00030
00031         protected override void OnNavigatedFrom(NavigationEventArgs e)
00032         {
00033             // Unset all override flags to avoid impacting subsequent tests
00034             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00035             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00036             base.OnNavigatedFrom(e);
00037         }
00038
00039         private void AddRevealButton_Click(object sender, RoutedEventArgs e)
00040         {
00041             _test1_RevealButton = (Button)XamlReader.Load(@"
00042                         <Button xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00043                                 xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00044                                 x:Name='Test1_RevealButton' Style='{StaticResource ButtonRevealStyle}'
00045                                 Content='Test1 Reveal Button' AutomationProperties.AutomationId='Test1_RevealButton' AutomationProperties.Name='Test1_RevealButton'/>");
00046             Test1_RevealButtonContainer.Children.Add(_test1_RevealButton);
00047         }
00048
00049         private void _test1_RevealButton_Click(object sender, RoutedEventArgs e)
00050         {
00051             throw new System.NotImplementedException();
00052         }
00053
00054         private void RemoveRevealButton_Click(object sender, RoutedEventArgs e)
00055         {
00056             Test1_RevealButtonContainer.Children.Remove(_test1_RevealButton);
00057         }
00058
00059         private void AddBackRevealButton_Click(object sender, RoutedEventArgs e)
00060         {
00061             Test1_RevealButtonContainer.Children.Add(_test1_RevealButton);
00062
00063             // Add handler for validation
00064             _test1_RevealButton.Click += RevealButton_Click;
00065         }
00066
00067         private UIElement GetElementForHoverLight(object element)
00068         {
00069             var target = element as Control;
00070             return VisualTreeHelper.GetChild(target, 0) as UIElement;
00071         }
00072
00073         private void RevealButton_Click(object sender, RoutedEventArgs e)
00074         {
00075             using (var logger = new ResultsLogger("RevealCreateThenEnableEffects", TestResult))
00076             {
00077                 UIElement lightsElement = GetElementForHoverLight(sender);
00078                 var lights = lightsElement.Lights;
00079
00080                 bool lightCountResult = lights.Count == 2;          // Reveal Press light is also present
00081                 logger.Verify(lightCountResult, "lightCountResult:" + lightCountResult);
00082             }
00083         }
00084
00085         private void SimluateDisabledByPolicyToggleButton_Checked(object sender, RoutedEventArgs e)
00086         {
00087             MaterialHelperTestApi.SimulateDisabledByPolicy = true;
00088         }
00089
00090         private void SimluateDisabledByPolicyToggleButton_Unchecked(object sender, RoutedEventArgs e)
00091         {
00092             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00093         }
00094     }
00095 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButton Member List

This is the complete list of members for SplitButton, including all inherited members.
abi_enter() | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
CheckThread() | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
ClearProperties() | SplitButtonProperties | [static]
Click(winrt::TypedEventHandler< winrt::SplitButton, winrt::SplitButtonClickEventArgs > const &value) | SplitButtonProperties |
Click(winrt::event_token const &token) | SplitButtonProperties |
CloseFlyout() | SplitButton |
Command(winrt::ICommand const &value) | SplitButtonProperties |
Command() | SplitButtonProperties |
CommandParameter(winrt::IInspectable const &value) | SplitButtonProperties |
CommandParameter() | SplitButtonProperties |
CommandParameterProperty() | SplitButtonProperties | [inline, static]
CommandProperty() | SplitButtonProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< SplitButton > &&self) noexcept | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline, static]
EnsureProperties() | SplitButtonProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
ExecuteCommand() | SplitButton | [private]
final_release(std::unique_ptr< SplitButton > &&self) | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline, static]
Flyout(winrt::FlyoutBase const &value) | SplitButtonProperties |
Flyout() | SplitButtonProperties |
FlyoutProperty() | SplitButtonProperties | [inline, static]
GetBase() | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
GetInner() | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
InternalIsChecked() | SplitButton | [inline, virtual]
Invoke() | SplitButton |
IsFlyoutOpen() | SplitButton | [inline]
IsOnThread() | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
m_clickEventSource | SplitButtonProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
OnApplyTemplate() | SplitButton |
OnClickPrimary(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | SplitButton | [protected, virtual]
OnClickSecondary(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | SplitButton | [private]
OnCommandParameterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SplitButtonProperties | [static]
OnCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SplitButtonProperties | [static]
OnCreateAutomationPeer() | SplitButton | [virtual]
OnFlyoutChanged() | SplitButton | [private]
OnFlyoutClosed(const winrt::IInspectable &sender, const winrt::IInspectable &args) | SplitButton | [private]
OnFlyoutOpened(const winrt::IInspectable &sender, const winrt::IInspectable &args) | SplitButton | [private]
OnFlyoutPlacementChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | SplitButton | [private]
OnFlyoutPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SplitButtonProperties | [static]
OnPointerEvent(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | SplitButton | [private]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | SplitButton |
OnSplitButtonKeyDown(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | SplitButton | [private]
OnSplitButtonKeyUp(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | SplitButton | [private]
OnVisualPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | SplitButton | [private]
OpenFlyout() | SplitButton |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SplitButton, winrt::implementation::SplitButtonT > | [inline]
RegisterFlyoutEvents() | SplitButton | [private]
s_CommandParameterProperty | SplitButtonProperties | [static]
s_CommandProperty | SplitButtonProperties | [static]
s_FlyoutProperty | SplitButtonProperties | [static]
SplitButton() | SplitButton |
SplitButtonProperties() | SplitButtonProperties |
UnregisterEvents() | SplitButton | [private]
UpdateVisualStates(bool useTransitions=true) | SplitButton |
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTemplateSettings Member List

This is the complete list of members for NavigationViewTemplateSettings, including all inherited members.
BackButtonVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
BackButtonVisibility() | NavigationViewTemplateSettingsProperties |
BackButtonVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
ClearProperties() | NavigationViewTemplateSettingsProperties | [static]
EnsureProperties() | NavigationViewTemplateSettingsProperties | [static]
LeftPaneVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
LeftPaneVisibility() | NavigationViewTemplateSettingsProperties |
LeftPaneVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
NavigationViewTemplateSettingsProperties() | NavigationViewTemplateSettingsProperties |
OpenPaneLength(double value) | NavigationViewTemplateSettingsProperties |
OpenPaneLength() | NavigationViewTemplateSettingsProperties |
OpenPaneLengthProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
OverflowButtonVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
OverflowButtonVisibility() | NavigationViewTemplateSettingsProperties |
OverflowButtonVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
PaneToggleButtonVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
PaneToggleButtonVisibility() | NavigationViewTemplateSettingsProperties |
PaneToggleButtonVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
PaneToggleButtonWidth(double value) | NavigationViewTemplateSettingsProperties |
PaneToggleButtonWidth() | NavigationViewTemplateSettingsProperties |
PaneToggleButtonWidthProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
s_BackButtonVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_LeftPaneVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_OpenPaneLengthProperty | NavigationViewTemplateSettingsProperties | [static]
s_OverflowButtonVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_PaneToggleButtonVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_PaneToggleButtonWidthProperty | NavigationViewTemplateSettingsProperties | [static]
s_SingleSelectionFollowsFocusProperty | NavigationViewTemplateSettingsProperties | [static]
s_SmallerPaneToggleButtonWidthProperty | NavigationViewTemplateSettingsProperties | [static]
s_TopPaddingProperty | NavigationViewTemplateSettingsProperties | [static]
s_TopPaneVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
SingleSelectionFollowsFocus(bool value) | NavigationViewTemplateSettingsProperties |
SingleSelectionFollowsFocus() | NavigationViewTemplateSettingsProperties |
SingleSelectionFollowsFocusProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
SmallerPaneToggleButtonWidth(double value) | NavigationViewTemplateSettingsProperties |
SmallerPaneToggleButtonWidth() | NavigationViewTemplateSettingsProperties |
SmallerPaneToggleButtonWidthProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
TopPadding(double value) | NavigationViewTemplateSettingsProperties |
TopPadding() | NavigationViewTemplateSettingsProperties |
TopPaddingProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
TopPaneVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
TopPaneVisibility() | NavigationViewTemplateSettingsProperties |
TopPaneVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItemFlyout.properties.cpp Source File

  • File List
  • File Members
  • Generated

MenuBarItemFlyout.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MenuBarItemFlyout.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(MenuBarItemFlyout)
00012 }
00013
00014 #include "MenuBarItemFlyout.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ILuminanceToAlphaEffect Member List

This is the complete list of members for ILuminanceToAlphaEffect, including all inherited members.
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ILuminanceToAlphaEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ILuminanceToAlphaEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemAutomationPeer.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewItem.h"
00007
00008 #include "NavigationViewItemAutomationPeer.g.h"
00009
00010 class NavigationViewItemAutomationPeer :
00011     public ReferenceTracker<
00012         NavigationViewItemAutomationPeer,
00013         winrt::implementation::NavigationViewItemAutomationPeerT,
00014         winrt::IInvokeProvider, winrt::ISelectionItemProvider>
00015 {
00016 public:
00017     NavigationViewItemAutomationPeer(winrt::NavigationViewItem const& owner);
00018
00019     // IAutomationPeerOverrides
00020     winrt::hstring GetNameCore();
00021     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00022     winrt::AutomationControlType GetAutomationControlTypeCore();
00023     winrt::hstring GetClassNameCore();
00024
00025     // IAutomationPeerOverrides3
00026     int32_t GetPositionInSetCore();
00027     int32_t GetSizeOfSetCore();
00028     int32_t GetLevelCore();
00029
00030     // IInvokeProvider
00031     void Invoke();
00032
00033     // ISelectionItemProvider
00034     bool IsSelected();
00035     winrt::IRawElementProviderSimple SelectionContainer();
00036     void AddToSelection();
00037     void RemoveFromSelection();
00038     void Select();
00039
00040     // IExpandCollapseProvider
00041     winrt::ExpandCollapseState ExpandCollapseState();
00042     void Collapse();
00043     void Expand();
00044     void RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState newState);
00045
00046 private:
00047
00048     enum class AutomationOutput
00049     {
00050         Position,
00051         Size,
00052     };
00053
00054     winrt::NavigationView GetParentNavigationView();
00055     winrt::ItemsRepeater GetParentItemsRepeater();
00056     bool IsOnTopNavigation();
00057     bool IsOnTopNavigationOverflow();
00058     bool IsOnFooterNavigation();
00059     bool IsSettingsItem();
00060     NavigationViewRepeaterPosition GetNavigationViewRepeaterPosition();
00061     int32_t GetNavigationViewItemCountInPrimaryList();
00062     int32_t GetNavigationViewItemCountInTopNav();
00063     int32_t GetPositionOrSetCountHelper(AutomationOutput automationOutput);
00064     void ChangeSelection(bool isSelected);
00065     bool HasChildren();
00066 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CoreWebView2InitializedEventArgs Member List

This is the complete list of members for CoreWebView2InitializedEventArgs, including all inherited members.
CoreWebView2InitializedEventArgs(winrt::hresult Exception) | CoreWebView2InitializedEventArgs | [inline]
Exception(winrt::hresult exception) | CoreWebView2InitializedEventArgs | [inline]
Exception() | CoreWebView2InitializedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/TestUI/ItemContainerSummaryPage.xaml.cs Source File

  • File List
  • File Members
  • ItemContainer
  • TestUI

ItemContainerSummaryPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Controls;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public sealed partial class ItemContainerSummaryPage : TestPage
00018     {
00019 #if MUX_PRERELEASE
00020         private double itemInvoked = 0;
00021 #endif
00022
00023         public ItemContainerSummaryPage()
00024         {
00025             this.InitializeComponent();
00026             this.Loaded += ItemContainerSummaryPage_Loaded;
00027
00028 #if MUX_PRERELEASE
00029             RoutedEventsItemContainer.ItemInvoked += ItemContainer_OnItemInvoked;
00030             ItemContainerWithButtons.ItemInvoked += ItemContainer_OnItemInvoked;
00031 #endif
00032         }
00033
00034         private void ItemContainerSummaryPage_Loaded(object sender, RoutedEventArgs e)
00035         {
00036             // Workaround for xaml parsing error crash: Bug 41701000
00037 #if MUX_PRERELEASE
00038             ItemContainerWithButtons.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
00039 #endif
00040         }
00041
00042 #if MUX_PRERELEASE
00043         private void ItemContainer_OnItemInvoked(object sender, ItemContainerInvokedEventArgs e)
00044         {
00045
00046             var itemContainer = sender as ItemContainer;
00047
00048             if (itemContainer.IsSelected == true)
00049             {
00050                 itemContainer.IsSelected = false;
00051             }
00052             else
00053             {
00054                 itemContainer.IsSelected = true;
00055             }
00056
00057             itemInvoked++;
00058
00059             ItemInvokedEventTextBlock.Text = itemInvoked.ToString();
00060         }
00061 #endif
00062
00063         private void BtnGetIsSelected_Click(object sender, RoutedEventArgs e)
00064         {
00065             IsSelectedTextBlock.Text = RoutedEventsItemContainer.IsSelected.ToString();
00066         }
00067
00068
00069         private void IsMultiSelectComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00070         {
00071 #if MUX_PRERELEASE
00072             string multiSelectName = e.AddedItems[0].ToString();
00073             ItemContainerMultiSelectMode multiSelectMode;
00074
00075             switch (multiSelectName)
00076             {
00077                 case "Auto":
00078                     multiSelectMode = ItemContainerMultiSelectMode.Auto;
00079                     break;
00080                 case "Single":
00081                     multiSelectMode = ItemContainerMultiSelectMode.Single;
00082                     break;
00083                 case "Extended":
00084                     multiSelectMode = ItemContainerMultiSelectMode.Extended;
00085                     break;
00086                 case "Multiple":
00087                     multiSelectMode = ItemContainerMultiSelectMode.Multiple;
00088                     break;
00089                 default:
00090                     throw new Exception($"Invalid argument: {multiSelectName}");
00091             }
00092
00093             RoutedEventsItemContainer.MultiSelectMode = multiSelectMode;
00094 #endif
00095         }
00096
00097         private void IsSelectedComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00098         {
00099             string isSelectedName = e.AddedItems[0].ToString();
00100             bool isSelected;
00101
00102             switch (isSelectedName)
00103             {
00104                 case "True":
00105                     isSelected = true;
00106                     break;
00107                 case "False":
00108                     isSelected = false;
00109                     break;
00110                 default:
00111                     throw new Exception($"Invalid argument: {isSelectedName}");
00112             }
00113
00114             RoutedEventsItemContainer.IsSelected = isSelected;
00115         }
00116
00117         private void IsEnabledComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00118         {
00119             string isEnabledName = e.AddedItems[0].ToString();
00120             bool isEnabled;
00121
00122             switch (isEnabledName)
00123             {
00124                 case "True":
00125                     isEnabled = true;
00126                     break;
00127                 case "False":
00128                     isEnabled = false;
00129                     break;
00130                 default:
00131                     throw new Exception($"Invalid argument: {isEnabledName}");
00132             }
00133
00134             RoutedEventsItemContainer.IsEnabled = isEnabled;
00135         }
00136
00137         private void HeartButton_Click(object sender, RoutedEventArgs e)
00138         {
00139             //HeartToggleButtonHandled = true;
00140         }
00141
00142         private void CanUserSelectComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00143         {
00144 #if MUX_PRERELEASE
00145             ComboBoxItem selectedItem = CanUserSelectComboBox.SelectedItem as ComboBoxItem;
00146             string CanUserSelectName = selectedItem.Content.ToString();
00147             ItemContainerUserSelectMode canUserSelect;
00148
00149             switch (CanUserSelectName)
00150             {
00151                 case "Auto":
00152                     canUserSelect = ItemContainerUserSelectMode.Auto;
00153                     break;
00154                 case "UserCanSelect":
00155                     canUserSelect = ItemContainerUserSelectMode.UserCanSelect;
00156                     break;
00157                 case "UserCannotSelect":
00158                     canUserSelect = ItemContainerUserSelectMode.UserCannotSelect;
00159                     break;
00160                 default:
00161                     throw new Exception($"Invalid argument: {CanUserSelectName}");
00162             }
00163
00164             RoutedEventsItemContainer.CanUserSelect = canUserSelect;
00165 #endif
00166         }
00167
00168         private void CanUserInvokeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00169         {
00170 #if MUX_PRERELEASE
00171             string CanUserInvokeName = e.AddedItems[0].ToString();
00172             ItemContainerUserInvokeMode canUserInvoke;
00173
00174             switch (CanUserInvokeName)
00175             {
00176                 case "Auto":
00177                     canUserInvoke = ItemContainerUserInvokeMode.Auto;
00178                     break;
00179                 case "UserCanInvoke":
00180                     canUserInvoke = ItemContainerUserInvokeMode.UserCanInvoke;
00181                     break;
00182                 case "UserCannotInvoke":
00183                     canUserInvoke = ItemContainerUserInvokeMode.UserCannotInvoke;
00184                     break;
00185                 default:
00186                     throw new Exception($"Invalid argument: {CanUserInvokeName}");
00187             }
00188
00189             RoutedEventsItemContainer.CanUserInvoke = canUserInvoke;
00190 #endif
00191         }
00192     }
00193 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DatePickerPage Member List

This is the complete list of members for DatePickerPage, including all inherited members.
DatePickerPage() DatePickerPage [inline]
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewListAutomationPeer Member List

This is the complete list of members for TreeViewListAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
CanSelectMultiple() | TreeViewListAutomationPeer |
CheckThread() | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewListAutomationPeer > &&self) noexcept | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline, static]
DropEffect() | TreeViewListAutomationPeer |
DropEffects() | TreeViewListAutomationPeer |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
final_release(std::unique_ptr< TreeViewListAutomationPeer > &&self) | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline, static]
GetAutomationControlTypeCore() | TreeViewListAutomationPeer |
GetBase() | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
GetInner() | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
GetPatternCore(winrt::PatternInterface const &patternInterface) | TreeViewListAutomationPeer |
GetSelection() | TreeViewListAutomationPeer |
IsMultiselect() | TreeViewListAutomationPeer | [private]
IsOnThread() | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
IsSelectionRequired() | TreeViewListAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
OnCreateItemAutomationPeer(winrt::IInspectable const &item) | TreeViewListAutomationPeer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewListAutomationPeer, winrt::implementation::TreeViewListAutomationPeerT, winrt::IDropTargetProvider, winrt::ISelectionProvider > | [inline]
TreeViewListAutomationPeer(winrt::TreeViewList const &owner) | TreeViewListAutomationPeer |
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewProperties Member List

This is the complete list of members for NavigationViewProperties, including all inherited members.
AlwaysShowHeader(bool value) | NavigationViewProperties |
AlwaysShowHeader() | NavigationViewProperties |
AlwaysShowHeaderProperty() | NavigationViewProperties | [inline, static]
AutoSuggestBox(winrt::AutoSuggestBox const &value) | NavigationViewProperties |
AutoSuggestBox() | NavigationViewProperties |
AutoSuggestBoxProperty() | NavigationViewProperties | [inline, static]
BackRequested(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs > const &value) | NavigationViewProperties |
BackRequested(winrt::event_token const &token) | NavigationViewProperties |
ClearProperties() | NavigationViewProperties | [static]
Collapsed(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs > const &value) | NavigationViewProperties |
Collapsed(winrt::event_token const &token) | NavigationViewProperties |
CompactModeThresholdWidth(double value) | NavigationViewProperties |
CompactModeThresholdWidth() | NavigationViewProperties |
CompactModeThresholdWidthProperty() | NavigationViewProperties | [inline, static]
CompactPaneLength(double value) | NavigationViewProperties |
CompactPaneLength() | NavigationViewProperties |
CompactPaneLengthProperty() | NavigationViewProperties | [inline, static]
ContentOverlay(winrt::UIElement const &value) | NavigationViewProperties |
ContentOverlay() | NavigationViewProperties |
ContentOverlayProperty() | NavigationViewProperties | [inline, static]
DisplayMode(winrt::NavigationViewDisplayMode const &value) | NavigationViewProperties |
DisplayMode() | NavigationViewProperties |
DisplayModeChanged(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs > const &value) | NavigationViewProperties |
DisplayModeChanged(winrt::event_token const &token) | NavigationViewProperties |
DisplayModeProperty() | NavigationViewProperties | [inline, static]
EnsureProperties() | NavigationViewProperties | [static]
ExpandedModeThresholdWidth(double value) | NavigationViewProperties |
ExpandedModeThresholdWidth() | NavigationViewProperties |
ExpandedModeThresholdWidthProperty() | NavigationViewProperties | [inline, static]
Expanding(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs > const &value) | NavigationViewProperties |
Expanding(winrt::event_token const &token) | NavigationViewProperties |
FooterMenuItems(winrt::IVector< winrt::IInspectable > const &value) | NavigationViewProperties |
FooterMenuItems() | NavigationViewProperties |
FooterMenuItemsProperty() | NavigationViewProperties | [inline, static]
FooterMenuItemsSource(winrt::IInspectable const &value) | NavigationViewProperties |
FooterMenuItemsSource() | NavigationViewProperties |
FooterMenuItemsSourceProperty() | NavigationViewProperties | [inline, static]
Header(winrt::IInspectable const &value) | NavigationViewProperties |
Header() | NavigationViewProperties |
HeaderProperty() | NavigationViewProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | NavigationViewProperties |
HeaderTemplate() | NavigationViewProperties |
HeaderTemplateProperty() | NavigationViewProperties | [inline, static]
IsBackButtonVisible(winrt::NavigationViewBackButtonVisible const &value) | NavigationViewProperties |
IsBackButtonVisible() | NavigationViewProperties |
IsBackButtonVisibleProperty() | NavigationViewProperties | [inline, static]
IsBackEnabled(bool value) | NavigationViewProperties |
IsBackEnabled() | NavigationViewProperties |
IsBackEnabledProperty() | NavigationViewProperties | [inline, static]
IsPaneOpen(bool value) | NavigationViewProperties |
IsPaneOpen() | NavigationViewProperties |
IsPaneOpenProperty() | NavigationViewProperties | [inline, static]
IsPaneToggleButtonVisible(bool value) | NavigationViewProperties |
IsPaneToggleButtonVisible() | NavigationViewProperties |
IsPaneToggleButtonVisibleProperty() | NavigationViewProperties | [inline, static]
IsPaneVisible(bool value) | NavigationViewProperties |
IsPaneVisible() | NavigationViewProperties |
IsPaneVisibleProperty() | NavigationViewProperties | [inline, static]
IsSettingsVisible(bool value) | NavigationViewProperties |
IsSettingsVisible() | NavigationViewProperties |
IsSettingsVisibleProperty() | NavigationViewProperties | [inline, static]
IsTitleBarAutoPaddingEnabled(bool value) | NavigationViewProperties |
IsTitleBarAutoPaddingEnabled() | NavigationViewProperties |
IsTitleBarAutoPaddingEnabledProperty() | NavigationViewProperties | [inline, static]
ItemInvoked(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs > const &value) | NavigationViewProperties |
ItemInvoked(winrt::event_token const &token) | NavigationViewProperties |
m_backRequestedEventSource | NavigationViewProperties |
m_collapsedEventSource | NavigationViewProperties |
m_displayModeChangedEventSource | NavigationViewProperties |
m_expandingEventSource | NavigationViewProperties |
m_itemInvokedEventSource | NavigationViewProperties |
m_paneClosedEventSource | NavigationViewProperties |
m_paneClosingEventSource | NavigationViewProperties |
m_paneOpenedEventSource | NavigationViewProperties |
m_paneOpeningEventSource | NavigationViewProperties |
m_selectionChangedEventSource | NavigationViewProperties |
MenuItemContainerStyle(winrt::Style const &value) | NavigationViewProperties |
MenuItemContainerStyle() | NavigationViewProperties |
MenuItemContainerStyleProperty() | NavigationViewProperties | [inline, static]
MenuItemContainerStyleSelector(winrt::StyleSelector const &value) | NavigationViewProperties |
MenuItemContainerStyleSelector() | NavigationViewProperties |
MenuItemContainerStyleSelectorProperty() | NavigationViewProperties | [inline, static]
MenuItems(winrt::IVector< winrt::IInspectable > const &value) | NavigationViewProperties |
MenuItems() | NavigationViewProperties |
MenuItemsProperty() | NavigationViewProperties | [inline, static]
MenuItemsSource(winrt::IInspectable const &value) | NavigationViewProperties |
MenuItemsSource() | NavigationViewProperties |
MenuItemsSourceProperty() | NavigationViewProperties | [inline, static]
MenuItemTemplate(winrt::DataTemplate const &value) | NavigationViewProperties |
MenuItemTemplate() | NavigationViewProperties |
MenuItemTemplateProperty() | NavigationViewProperties | [inline, static]
MenuItemTemplateSelector(winrt::DataTemplateSelector const &value) | NavigationViewProperties |
MenuItemTemplateSelector() | NavigationViewProperties |
MenuItemTemplateSelectorProperty() | NavigationViewProperties | [inline, static]
NavigationViewProperties() | NavigationViewProperties |
OnAlwaysShowHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnAutoSuggestBoxPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnCompactModeThresholdWidthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnCompactPaneLengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnDisplayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnExpandedModeThresholdWidthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnFooterMenuItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnFooterMenuItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnHeaderTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsBackButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsBackEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsPaneOpenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsPaneToggleButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsPaneVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsSettingsVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsTitleBarAutoPaddingEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemContainerStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemContainerStyleSelectorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemTemplateSelectorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnOpenPaneLengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnOverflowLabelModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneDisplayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneFooterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneTitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneToggleButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnSelectionFollowsFocusPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnSettingsItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnShoulderNavigationEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OpenPaneLength(double value) | NavigationViewProperties |
OpenPaneLength() | NavigationViewProperties |
OpenPaneLengthProperty() | NavigationViewProperties | [inline, static]
OverflowLabelMode(winrt::NavigationViewOverflowLabelMode const &value) | NavigationViewProperties |
OverflowLabelMode() | NavigationViewProperties |
OverflowLabelModeProperty() | NavigationViewProperties | [inline, static]
PaneClosed(winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value) | NavigationViewProperties |
PaneClosed(winrt::event_token const &token) | NavigationViewProperties |
PaneClosing(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs > const &value) | NavigationViewProperties |
PaneClosing(winrt::event_token const &token) | NavigationViewProperties |
PaneCustomContent(winrt::UIElement const &value) | NavigationViewProperties |
PaneCustomContent() | NavigationViewProperties |
PaneCustomContentProperty() | NavigationViewProperties | [inline, static]
PaneDisplayMode(winrt::NavigationViewPaneDisplayMode const &value) | NavigationViewProperties |
PaneDisplayMode() | NavigationViewProperties |
PaneDisplayModeProperty() | NavigationViewProperties | [inline, static]
PaneFooter(winrt::UIElement const &value) | NavigationViewProperties |
PaneFooter() | NavigationViewProperties |
PaneFooterProperty() | NavigationViewProperties | [inline, static]
PaneHeader(winrt::UIElement const &value) | NavigationViewProperties |
PaneHeader() | NavigationViewProperties |
PaneHeaderProperty() | NavigationViewProperties | [inline, static]
PaneOpened(winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value) | NavigationViewProperties |
PaneOpened(winrt::event_token const &token) | NavigationViewProperties |
PaneOpening(winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value) | NavigationViewProperties |
PaneOpening(winrt::event_token const &token) | NavigationViewProperties |
PaneTitle(winrt::hstring const &value) | NavigationViewProperties |
PaneTitle() | NavigationViewProperties |
PaneTitleProperty() | NavigationViewProperties | [inline, static]
PaneToggleButtonStyle(winrt::Style const &value) | NavigationViewProperties |
PaneToggleButtonStyle() | NavigationViewProperties |
PaneToggleButtonStyleProperty() | NavigationViewProperties | [inline, static]
s_AlwaysShowHeaderProperty | NavigationViewProperties | [static]
s_AutoSuggestBoxProperty | NavigationViewProperties | [static]
s_CompactModeThresholdWidthProperty | NavigationViewProperties | [static]
s_CompactPaneLengthProperty | NavigationViewProperties | [static]
s_ContentOverlayProperty | NavigationViewProperties | [static]
s_DisplayModeProperty | NavigationViewProperties | [static]
s_ExpandedModeThresholdWidthProperty | NavigationViewProperties | [static]
s_FooterMenuItemsProperty | NavigationViewProperties | [static]
s_FooterMenuItemsSourceProperty | NavigationViewProperties | [static]
s_HeaderProperty | NavigationViewProperties | [static]
s_HeaderTemplateProperty | NavigationViewProperties | [static]
s_IsBackButtonVisibleProperty | NavigationViewProperties | [static]
s_IsBackEnabledProperty | NavigationViewProperties | [static]
s_IsPaneOpenProperty | NavigationViewProperties | [static]
s_IsPaneToggleButtonVisibleProperty | NavigationViewProperties | [static]
s_IsPaneVisibleProperty | NavigationViewProperties | [static]
s_IsSettingsVisibleProperty | NavigationViewProperties | [static]
s_IsTitleBarAutoPaddingEnabledProperty | NavigationViewProperties | [static]
s_MenuItemContainerStyleProperty | NavigationViewProperties | [static]
s_MenuItemContainerStyleSelectorProperty | NavigationViewProperties | [static]
s_MenuItemsProperty | NavigationViewProperties | [static]
s_MenuItemsSourceProperty | NavigationViewProperties | [static]
s_MenuItemTemplateProperty | NavigationViewProperties | [static]
s_MenuItemTemplateSelectorProperty | NavigationViewProperties | [static]
s_OpenPaneLengthProperty | NavigationViewProperties | [static]
s_OverflowLabelModeProperty | NavigationViewProperties | [static]
s_PaneCustomContentProperty | NavigationViewProperties | [static]
s_PaneDisplayModeProperty | NavigationViewProperties | [static]
s_PaneFooterProperty | NavigationViewProperties | [static]
s_PaneHeaderProperty | NavigationViewProperties | [static]
s_PaneTitleProperty | NavigationViewProperties | [static]
s_PaneToggleButtonStyleProperty | NavigationViewProperties | [static]
s_SelectedItemProperty | NavigationViewProperties | [static]
s_SelectionFollowsFocusProperty | NavigationViewProperties | [static]
s_SettingsItemProperty | NavigationViewProperties | [static]
s_ShoulderNavigationEnabledProperty | NavigationViewProperties | [static]
s_TemplateSettingsProperty | NavigationViewProperties | [static]
SelectedItem(winrt::IInspectable const &value) | NavigationViewProperties |
SelectedItem() | NavigationViewProperties |
SelectedItemProperty() | NavigationViewProperties | [inline, static]
SelectionChanged(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs > const &value) | NavigationViewProperties |
SelectionChanged(winrt::event_token const &token) | NavigationViewProperties |
SelectionFollowsFocus(winrt::NavigationViewSelectionFollowsFocus const &value) | NavigationViewProperties |
SelectionFollowsFocus() | NavigationViewProperties |
SelectionFollowsFocusProperty() | NavigationViewProperties | [inline, static]
SettingsItem(winrt::IInspectable const &value) | NavigationViewProperties |
SettingsItem() | NavigationViewProperties |
SettingsItemProperty() | NavigationViewProperties | [inline, static]
ShoulderNavigationEnabled(winrt::NavigationViewShoulderNavigationEnabled const &value) | NavigationViewProperties |
ShoulderNavigationEnabled() | NavigationViewProperties |
ShoulderNavigationEnabledProperty() | NavigationViewProperties | [inline, static]
TemplateSettings(winrt::NavigationViewTemplateSettings const &value) | NavigationViewProperties |
TemplateSettings() | NavigationViewProperties |
TemplateSettingsProperty() | NavigationViewProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

EnumToStringConverter Member List

This is the complete list of members for EnumToStringConverter, including all inherited members.
Convert(object value, Type targetType, object parameter, string language) | EnumToStringConverter | [inline]
ConvertBack(object value, Type targetType, object parameter, string language) | EnumToStringConverter | [inline]
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewTests Member List

This is the complete list of members for TreeViewTests, including all inherited members.
CreateItems(int itemsPerLevel=3, int depth=3) | TreeViewTests | [inline, private]
CreateItemsImpl(int numItems, int depth, string prefix="") | TreeViewTests | [inline, private]
CreateTreeViewItemsSource() | TreeViewTests | [inline]
IsMultiSelectCheckBoxChecked(TreeView tree, TreeViewNode node) | TreeViewTests | [inline, private]
RemovingLastChildrenSetsIsExpandedToFalse() | TreeViewTests | [inline]
SelectedItemsTest() | TreeViewTests | [inline]
TreeViewBackgroundTest() | TreeViewTests | [inline]
TreeViewClearAndSetAtTest() | TreeViewTests | [inline]
TreeViewInheritanceTest() | TreeViewTests | [inline]
TreeViewItemContainerStyleTest() | TreeViewTests | [inline]
TreeViewItemContainerTransitionTest() | TreeViewTests | [inline]
TreeViewItemSourceResetRecreateItems() | TreeViewTests | [inline]
TreeViewItemsSourceTest() | TreeViewTests | [inline]
TreeViewItemsSourceUpdateTest() | TreeViewTests | [inline]
TreeViewItemTemplateTest() | TreeViewTests | [inline]
TreeViewNodeDPTest() | TreeViewTests | [inline]
TreeViewNodeStringableTest() | TreeViewTests | [inline]
TreeViewNodeTest() | TreeViewTests | [inline]
TreeViewPendingSelectedNodesTest() | TreeViewTests | [inline]
TreeViewSelectionChangedMultipleMode() | TreeViewTests | [inline]
TreeViewSelectionChangedSingleMode() | TreeViewTests | [inline]
TreeViewUpdateTest() | TreeViewTests | [inline]
ValidateTreeViewItemSourceChangeUpdatesChevronOpacity() | TreeViewTests | [inline]
VerifyClearingNodeWithNoChildren() | TreeViewTests | [inline]
VerifySelectedNodesAndSelectedItems(TreeView treeView, string[] expected) | TreeViewTests | [inline, private]
VerifySettingSelectionDoesNotCrash() | TreeViewTests | [inline]
VerifyTreeViewIsNotTabStop() | TreeViewTests | [inline]
VerifyVisualTree() | TreeViewTests | [inline]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ImageIconSource.properties.cpp Source File

  • File List
  • File Members
  • Generated

ImageIconSource.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ImageIconSource.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ImageIconSource)
00012 }
00013
00014 #include "ImageIconSource.g.cpp"
00015
00016 GlobalDependencyProperty ImageIconSourceProperties::s_ImageSourceProperty{ nullptr };
00017
00018 ImageIconSourceProperties::ImageIconSourceProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void ImageIconSourceProperties::EnsureProperties()
00024 {
00025     if (!s_ImageSourceProperty)
00026     {
00027         s_ImageSourceProperty =
00028             InitializeDependencyProperty(
00029                 L"ImageSource",
00030                 winrt::name_of<winrt::ImageSource>(),
00031                 winrt::name_of<winrt::ImageIconSource>(),
00032                 false /* isAttached */,
00033                 ValueHelper<winrt::ImageSource>::BoxedDefaultValue(),
00034                 nullptr);
00035     }
00036 }
00037
00038 void ImageIconSourceProperties::ClearProperties()
00039 {
00040     s_ImageSourceProperty = nullptr;
00041 }
00042
00043 void ImageIconSourceProperties::ImageSource(winrt::ImageSource const& value)
00044 {
00045     [[gsl::suppress(con)]]
00046     {
00047     static_cast<ImageIconSource*>(this)->SetValue(s_ImageSourceProperty, ValueHelper<winrt::ImageSource>::BoxValueIfNecessary(value));
00048     }
00049 }
00050
00051 winrt::ImageSource ImageIconSourceProperties::ImageSource()
00052 {
00053     return ValueHelper<winrt::ImageSource>::CastOrUnbox(static_cast<ImageIconSource*>(this)->GetValue(s_ImageSourceProperty));
00054 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/AutoSuggestBoxHelper.cpp Source File

  • File List
  • File Members
  • AutoSuggestBox

AutoSuggestBoxHelper.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "AutoSuggestBoxHelper.h"
00007 #include "CornerRadiusFilterConverter.h"
00008 #include "ResourceAccessor.h"
00009
00010 static constexpr auto c_popupName = L"SuggestionsPopup"sv;
00011 static constexpr auto c_popupBorderName = L"SuggestionsContainer"sv;
00012 static constexpr auto c_textBoxName = L"TextBox"sv;
00013 static constexpr auto c_textBoxBorderName = L"BorderElement"sv;
00014 static constexpr auto c_overlayCornerRadiusKey = L"OverlayCornerRadius"sv;
00015 GlobalDependencyProperty AutoSuggestBoxHelper::s_AutoSuggestEventRevokersProperty{ nullptr };
00016
00017 AutoSuggestBoxHelper::AutoSuggestBoxHelper()
00018 {
00019     EnsureProperties();
00020 }
00021
00022 void AutoSuggestBoxHelper::EnsureProperties()
00023 {
00024     if (!s_AutoSuggestEventRevokersProperty)
00025     {
00026         s_AutoSuggestEventRevokersProperty =
00027             InitializeDependencyProperty(
00028                 L"AutoSuggestEventRevokers",
00029                 winrt::name_of<winrt::IInspectable>(),
00030                 winrt::name_of<winrt::AutoSuggestBoxHelper>(),
00031                 true /* isAttached */,
00032                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00033                 nullptr);
00034     }
00035
00036     AutoSuggestBoxHelperProperties::EnsureProperties();
00037 }
00038
00039 void AutoSuggestBoxHelper::ClearProperties()
00040 {
00041     s_AutoSuggestEventRevokersProperty = nullptr;
00042     AutoSuggestBoxHelperProperties::ClearProperties();
00043 }
00044
00045
00046 // The corner radius needs to be updated dynamically depending on whether the suggestion list is opening up or down.
00047 // Xaml is not lifted yet when we implementing this feature so we don't have access to AutoSuggestBox code.
00048 // Creating this attached property to help us plug in some extra logic without touching the actual code.
00049 void AutoSuggestBoxHelper::OnKeepInteriorCornersSquarePropertyChanged(
00050     const winrt::DependencyObject& sender,
00051     const winrt::DependencyPropertyChangedEventArgs& args)
00052 {
00053     if (auto autoSuggestBox = sender.try_as<winrt::AutoSuggestBox>())
00054     {
00055         bool shouldMonitorAutoSuggestEvents = unbox_value<bool>(args.NewValue());
00056         if (shouldMonitorAutoSuggestEvents)
00057         {
00058             auto revokersInspectable = winrt::make<AutoSuggestEventRevokers>();
00059             auto revokers = revokersInspectable.as<AutoSuggestEventRevokers>();
00060
00061             revokers->m_autoSuggestBoxLoadedRevoker = autoSuggestBox.Loaded(winrt::auto_revoke, AutoSuggestBoxHelper::OnAutoSuggestBoxLoaded);
00062             autoSuggestBox.SetValue(AutoSuggestEventRevokersProperty(), revokersInspectable);
00063         }
00064         else
00065         {
00066             autoSuggestBox.SetValue(AutoSuggestEventRevokersProperty(), nullptr);
00067         }
00068     }
00069 }
00070
00071 void AutoSuggestBoxHelper::OnAutoSuggestBoxLoaded(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00072 {
00073     auto autoSuggestBox = sender.as<winrt::AutoSuggestBox>();
00074     auto revokers = autoSuggestBox.GetValue(AutoSuggestEventRevokersProperty()).as<AutoSuggestEventRevokers>();
00075
00076     if (!revokers->m_popupOpenedRevoker || !revokers->m_popupClosedRevoker)
00077     {
00078         if (auto popup = GetTemplateChildT<winrt::Popup>(c_popupName, autoSuggestBox))
00079         {
00080             auto autoSuggestBoxWeakRef = winrt::make_weak(autoSuggestBox);
00081
00082             revokers->m_popupOpenedRevoker = popup.Opened(winrt::auto_revoke,
00083                 [autoSuggestBoxWeakRef](const winrt::IInspectable& sender, const winrt::IInspectable& args)
00084                 {
00085                     if (auto autoSuggestBox = autoSuggestBoxWeakRef.get())
00086                     {
00087                         UpdateCornerRadius(autoSuggestBox, /*IsDropDownOpen=*/true);
00088                     }
00089                 });
00090
00091             revokers->m_popupClosedRevoker = popup.Closed(winrt::auto_revoke,
00092                 [autoSuggestBoxWeakRef](const winrt::IInspectable& sender, const winrt::IInspectable& args)
00093                 {
00094                     if (auto autoSuggestBox = autoSuggestBoxWeakRef.get())
00095                     {
00096                         UpdateCornerRadius(autoSuggestBox, /*IsDropDownOpen=*/false);
00097                     }
00098                 });
00099         }
00100     }
00101 }
00102
00103 void AutoSuggestBoxHelper::UpdateCornerRadius(const winrt::AutoSuggestBox& autoSuggestBox, bool isPopupOpen)
00104 {
00105     auto popupRadius = unbox_value<winrt::CornerRadius>(ResourceAccessor::ResourceLookup(autoSuggestBox, box_value(c_overlayCornerRadiusKey)));
00106
00107     auto textBoxRadius = autoSuggestBox.CornerRadius();
00108
00109     if (isPopupOpen)
00110     {
00111         auto const isOpenDown = IsPopupOpenDown(autoSuggestBox);
00112         auto cornerRadiusConverter = winrt::make_self<CornerRadiusFilterConverter>();
00113
00114         const auto popupRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Bottom : winrt::CornerRadiusFilterKind::Top;
00115         popupRadius = cornerRadiusConverter->Convert(popupRadius, popupRadiusFilter);
00116
00117         const auto textBoxRadiusFilter = isOpenDown ? winrt::CornerRadiusFilterKind::Top : winrt::CornerRadiusFilterKind::Bottom;
00118         textBoxRadius = cornerRadiusConverter->Convert(textBoxRadius, textBoxRadiusFilter);
00119     }
00120
00121     if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, autoSuggestBox))
00122     {
00123         popupBorder.CornerRadius(popupRadius);
00124     }
00125
00126     if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_textBoxName, autoSuggestBox))
00127     {
00128         textBox.CornerRadius(textBoxRadius);
00129     }
00130 }
00131
00132 bool AutoSuggestBoxHelper::IsPopupOpenDown(const winrt::AutoSuggestBox& autoSuggestBox)
00133 {
00134     double verticalOffset = 0;
00135     if (auto popupBorder = GetTemplateChildT<winrt::Border>(c_popupBorderName, autoSuggestBox))
00136     {
00137         if (auto textBox = GetTemplateChildT<winrt::TextBox>(c_textBoxName, autoSuggestBox))
00138         {
00139             const auto transform = popupBorder.TransformToVisual(textBox);
00140             const auto popupTop = transform.TransformPoint(winrt::Point(0, 0));
00141             verticalOffset = popupTop.Y;
00142         }
00143     }
00144     return verticalOffset >= 0;
00145 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButtonTestApi.properties.cpp Source File

  • File List
  • File Members
  • Generated

SplitButtonTestApi.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SplitButtonTestApi.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(SplitButtonTestApi)
00012 }
00013
00014 #include "SplitButtonTestApi.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PhasingTests::CustomElementFactory Member List

This is the complete list of members for PhasingTests::CustomElementFactory, including all inherited members.
_numPhases | PhasingTests::CustomElementFactory | [private]
_recyclePool | PhasingTests::CustomElementFactory | [private]
CustomElementFactory(int numPhases) | PhasingTests::CustomElementFactory | [inline]
GetElementCore(ElementFactoryGetArgs args) | PhasingTests::CustomElementFactory | [inline, protected]
key | PhasingTests::CustomElementFactory | [private]
RecycleElementCore(ElementFactoryRecycleArgs args) | PhasingTests::CustomElementFactory | [inline, protected]
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AppBarPage Member List

This is the complete list of members for AppBarPage, including all inherited members.
AppBarPage() | AppBarPage | [inline]
CmbClosedDisplayMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | AppBarPage | [inline, private]
CmbIsOpen_SelectionChanged(object sender, SelectionChangedEventArgs e) | AppBarPage | [inline, private]
CmbLabelPosition_SelectionChanged(object sender, SelectionChangedEventArgs e) | AppBarPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterScrollSnapPointsPage Member List

This is the complete list of members for ScrollPresenterScrollSnapPointsPage, including all inherited members.
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
btnClearFullLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
btnGetFullLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
BtnMIAddSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
BtnMRAddSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
BtnOffsetPlus10With_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
BtnOffsetPlus10Without_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
BtnRemoveAll_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
BtnRemoveFirst_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
BtnScrollPresenterOffsetChange_Click(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
colorIndex | ScrollPresenterScrollSnapPointsPage | [private]
FillSnapPoint(List< double > values, double min, double max, int minColumn=0) | ScrollPresenterScrollSnapPointsPage | [inline, private]
FillSnapPoint(List< double > values, double min, double max, Color fillColor, int minColumn=0) | ScrollPresenterScrollSnapPointsPage | [inline, private]
FixConsolidatedView() | ScrollPresenterScrollSnapPointsPage | [inline, private]
fullLogs | ScrollPresenterScrollSnapPointsPage | [private]
GetFirstRepeatedSnapPoint(double offset, double interval, double start) | ScrollPresenterScrollSnapPointsPage | [inline, private]
GetNewColor() | ScrollPresenterScrollSnapPointsPage | [inline, private]
MarkupScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollPresenterScrollSnapPointsPage | [inline, private]
MarkupScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollPresenterScrollSnapPointsPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollPresenterScrollSnapPointsPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, protected]
ScrollPresenterScrollSnapPointsPage() | ScrollPresenterScrollSnapPointsPage | [inline]
ScrollPresenterScrollSnapPointsPage_Loaded(object sender, RoutedEventArgs e) | ScrollPresenterScrollSnapPointsPage | [inline, private]
snapPointColumnHeight | ScrollPresenterScrollSnapPointsPage | [private]
snapPointColumns | ScrollPresenterScrollSnapPointsPage | [private]
snapPointColumnWidth | ScrollPresenterScrollSnapPointsPage | [private]
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/FlowLayout.properties.h Source File

  • File List
  • File Members
  • Generated

FlowLayout.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class FlowLayoutProperties
00008 {
00009 public:
00010     FlowLayoutProperties();
00011
00012     void LineAlignment(winrt::FlowLayoutLineAlignment const& value);
00013     winrt::FlowLayoutLineAlignment LineAlignment();
00014
00015     void MinColumnSpacing(double value);
00016     double MinColumnSpacing();
00017
00018     void MinRowSpacing(double value);
00019     double MinRowSpacing();
00020
00021     void Orientation(winrt::Orientation const& value);
00022     winrt::Orientation Orientation();
00023
00024     static winrt::DependencyProperty LineAlignmentProperty() { return s_LineAlignmentProperty; }
00025     static winrt::DependencyProperty MinColumnSpacingProperty() { return s_MinColumnSpacingProperty; }
00026     static winrt::DependencyProperty MinRowSpacingProperty() { return s_MinRowSpacingProperty; }
00027     static winrt::DependencyProperty OrientationProperty() { return s_OrientationProperty; }
00028
00029     static GlobalDependencyProperty s_LineAlignmentProperty;
00030     static GlobalDependencyProperty s_MinColumnSpacingProperty;
00031     static GlobalDependencyProperty s_MinRowSpacingProperty;
00032     static GlobalDependencyProperty s_OrientationProperty;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036
00037     static void OnLineAlignmentPropertyChanged(
00038         winrt::DependencyObject const& sender,
00039         winrt::DependencyPropertyChangedEventArgs const& args);
00040
00041     static void OnMinColumnSpacingPropertyChanged(
00042         winrt::DependencyObject const& sender,
00043         winrt::DependencyPropertyChangedEventArgs const& args);
00044
00045     static void OnMinRowSpacingPropertyChanged(
00046         winrt::DependencyObject const& sender,
00047         winrt::DependencyPropertyChangedEventArgs const& args);
00048
00049     static void OnOrientationPropertyChanged(
00050         winrt::DependencyObject const& sender,
00051         winrt::DependencyPropertyChangedEventArgs const& args);
00052 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionProvider.cpp Source File

  • File List
  • File Members
  • Repeater

ItemCollectionTransitionProvider.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "ItemCollectionTransitionProvider.h"
00008 #include "ItemCollectionTransitionCompletedEventArgs.h"
00009 #include "ItemCollectionTransitionProvider.properties.cpp"
00010
00011 #pragma region IItemCollectionTransitionProvider
00012
00013 ItemCollectionTransitionProvider::~ItemCollectionTransitionProvider()
00014 {
00015     for (auto const& keepAliveTimerBatchPair : m_keepAliveTimersMap)
00016     {
00017         if (auto const& keepAliveTimer = keepAliveTimerBatchPair.first)
00018         {
00019             keepAliveTimer.Stop();
00020         }
00021     }
00022 }
00023
00024 void ItemCollectionTransitionProvider::QueueTransition(winrt::ItemCollectionTransition const& transition)
00025 {
00026     // When usesNewTransitionsBatch remains 'false', the provided transition is added to the current batch
00027     // identified by the current m_transitionsBatch value.
00028     bool usesNewTransitionsBatch = false;
00029
00030     if (!m_rendering)
00031     {
00032         // This marks the beginning of a new batch of transitions.
00033         usesNewTransitionsBatch = true;
00034         // The batch gets a new id.
00035         m_transitionsBatch++;
00036         m_rendering = winrt::CompositionTarget::Rendering(winrt::auto_revoke, { this, &ItemCollectionTransitionProvider::OnRendering });
00037     }
00038
00039     // We'll animate if animations are enabled and the transition provider has indicated we should animate this transition.
00040     if (SharedHelpers::IsAnimationsEnabled() && ShouldAnimate(transition))
00041     {
00042         if (usesNewTransitionsBatch)
00043         {
00044             // Allocating a new array of ItemCollectionTransition with animations for this new batch.
00045             const auto batchTransitionsPair = std::make_pair(m_transitionsBatch, winrt::single_threaded_vector<winrt::ItemCollectionTransition>());
00046
00047             m_transitionsWithAnimationsMap.insert(batchTransitionsPair);
00048         }
00049
00050         const auto transitionsWithAnimations = m_transitionsWithAnimationsMap[m_transitionsBatch];
00051
00052         transitionsWithAnimations.Append(transition);
00053     }
00054
00055     // To ensure proper VirtualizationInfo ordering, we still need to raise TransitionCompleted in a
00056     // CompositionTarget.Rendering handler, even if we aren't going to animate anything for this transition.
00057     if (usesNewTransitionsBatch)
00058     {
00059         // Allocating a new array of ItemCollectionTransition for this new batch.
00060         const auto batchTransitionsPair = std::make_pair(m_transitionsBatch, winrt::single_threaded_vector<winrt::ItemCollectionTransition>());
00061
00062         m_transitionsMap.insert(batchTransitionsPair);
00063     }
00064
00065     const auto transitions = m_transitionsMap[m_transitionsBatch];
00066
00067     transitions.Append(transition);
00068 }
00069
00070 bool ItemCollectionTransitionProvider::ShouldAnimate(winrt::ItemCollectionTransition const& transition)
00071 {
00072     return overridable().ShouldAnimateCore(transition);
00073 }
00074
00075 #pragma endregion
00076
00077 #pragma region IItemCollectionTransitionProviderOverrides
00078
00079 void ItemCollectionTransitionProvider::StartTransitions(winrt::IVector<winrt::ItemCollectionTransition> const& /* transitions */)
00080 {
00081     throw winrt::hresult_not_implemented();
00082 }
00083
00084 bool ItemCollectionTransitionProvider::ShouldAnimateCore(winrt::ItemCollectionTransition const& /* transition */)
00085 {
00086     throw winrt::hresult_not_implemented();
00087 }
00088
00089 #pragma endregion
00090
00091 void ItemCollectionTransitionProvider::NotifyTransitionCompleted(winrt::ItemCollectionTransition const& transition)
00092 {
00093     m_transitionCompletedEventSource(*this, winrt::make<ItemCollectionTransitionCompletedEventArgs>(transition));
00094 }
00095
00096 void ItemCollectionTransitionProvider::CleanTransitionsBatch()
00097 {
00098     // Called when none of a batch's transitions required a timer to keep them alive.
00099     // No completion notification is expected and all transitions can be released.
00100     m_transitionsWithAnimationsMap.erase(m_transitionsBatch);
00101     m_transitionsMap.erase(m_transitionsBatch);
00102 }
00103
00104 void ItemCollectionTransitionProvider::OnKeepAliveTimerTick(winrt::IInspectable const& sender, winrt::IInspectable const& /*args*/)
00105 {
00106     // By the time this timer expires, all transitions associated with it are considered completed and they no longer need to be kept alive for
00107     // ItemCollectionTransitionProgress::Complete() to successfully trigger a ItemCollectionTransitionProvider::NotifyTransitionCompleted call.
00108     const auto keepAliveTimer = sender.try_as<winrt::DispatcherTimer>();
00109
00110     if (keepAliveTimer)
00111     {
00112         // The timer is stopped, all its associated transitions are released and so is the timer itself.
00113         keepAliveTimer.Stop();
00114
00115         const auto keepAliveTimersIterator = m_keepAliveTimersMap.find(keepAliveTimer);
00116
00117         if (keepAliveTimersIterator == m_keepAliveTimersMap.end())
00118         {
00119             return;
00120         }
00121
00122         const auto transitionsBatch = keepAliveTimersIterator->second;
00123
00124         m_transitionsWithAnimationsMap.erase(transitionsBatch);
00125         m_transitionsMap.erase(transitionsBatch);
00126
00127         m_keepAliveTimersMap.erase(keepAliveTimersIterator);
00128     }
00129 }
00130
00131 void ItemCollectionTransitionProvider::OnRendering(winrt::IInspectable const& /*sender*/, winrt::IInspectable const& /*args*/)
00132 {
00133     m_rendering.revoke();
00134
00135     bool keepAliveTimerRequired = false;
00136
00137     auto scopeGuard = gsl::finally([this, &keepAliveTimerRequired]()
00138     {
00139         if (keepAliveTimerRequired)
00140         {
00141             // At least one transition in the batch requires a new 'keep alive' timer.
00142             StartNewKeepAliveTimer();
00143         }
00144         else
00145         {
00146             // None of the transitions in the batch requires a 'keep alive' timer. Simply discard them all.
00147             CleanTransitionsBatch();
00148         }
00149     });
00150
00151     const auto transitionsWithAnimations = m_transitionsWithAnimationsMap[m_transitionsBatch];
00152
00153     if (transitionsWithAnimations)
00154     {
00155         overridable().StartTransitions(transitionsWithAnimations);
00156     }
00157
00158     // We'll automatically raise TransitionCompleted on all of the transitions that were not actually animated
00159     // in order to guarantee that every transition queued receives a corresponding TransitionCompleted event.
00160     const auto transitions = m_transitionsMap[m_transitionsBatch];
00161
00162     if (transitions)
00163     {
00164         for (auto const& transition : transitions)
00165         {
00166             if (transition.HasStarted())
00167             {
00168                 keepAliveTimerRequired = true;
00169             }
00170             else
00171             {
00172                 NotifyTransitionCompleted(transition);
00173             }
00174         }
00175     }
00176 }
00177
00178 void ItemCollectionTransitionProvider::StartNewKeepAliveTimer()
00179 {
00180     // This timer delays the release of the batch's transitions so that ItemCollectionTransitionProgress::Complete()
00181     // which uses transition weak references is able to trigger an ItemCollectionTransitionProvider::NotifyTransitionCompleted
00182     // call for completion. This is important for TransitionManager::OnTransitionProviderTransitionCompleted to be able to
00183     // update the ItemsRepeater's items ownership.
00184     MUX_ASSERT(m_transitionsMap[m_transitionsBatch].Size() > 0);
00185
00186     auto timerDuration = 5s;
00187     const auto keepAliveTimer = winrt::DispatcherTimer();
00188
00189     keepAliveTimer.Interval(winrt::TimeSpan::duration(timerDuration));
00190     keepAliveTimer.Tick({ this, &ItemCollectionTransitionProvider::OnKeepAliveTimerTick });
00191     keepAliveTimer.Start();
00192
00193     const auto keepAliveTimerBatchPair = std::make_pair(keepAliveTimer, m_transitionsBatch);
00194
00195     m_keepAliveTimersMap.insert(keepAliveTimerBatchPair);
00196 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewportManagerDownLevel::ScrollerInfo Member List

This is the complete list of members for ViewportManagerDownLevel::ScrollerInfo, including all inherited members.
m_scroller | ViewportManagerDownLevel::ScrollerInfo | [private]
Scroller() const | ViewportManagerDownLevel::ScrollerInfo | [inline]
ScrollerInfo(const ITrackerHandleManager *owner, winrt::IRepeaterScrollingSurface scroller) | ViewportManagerDownLevel::ScrollerInfo | [inline]
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPictureAutomationPeer.h Source File

  • File List
  • File Members
  • PersonPicture

PersonPictureAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PersonPicture.h"
00007
00008 #include "PersonPictureAutomationPeer.g.h"
00009
00010 class PersonPictureAutomationPeer :
00011     public ReferenceTracker<PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT>
00012 {
00013 public:
00014     PersonPictureAutomationPeer(winrt::PersonPicture const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::AutomationControlType GetAutomationControlTypeCore();
00018     winrt::hstring GetClassNameCore();
00019 };
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooksFactory.cpp Source File

  • File List
  • File Members
  • ItemsView

ItemsViewTestHooksFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsViewTestHooksFactory.h"
00007
00008 #include "ItemsViewTestHooks.properties.cpp"
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainer Member List

This is the complete list of members for ItemContainer, including all inherited members.
abi_enter() | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
CanRaiseItemInvoked() | ItemContainer | [private]
CanUserInvoke(winrt::ItemContainerUserInvokeMode const &value) | ItemContainerProperties |
CanUserInvoke() | ItemContainerProperties |
CanUserInvokeInternal() const | ItemContainer | [inline]
CanUserInvokeInternal(const winrt::ItemContainerUserInvokeMode &value) | ItemContainer | [inline]
CanUserInvokeProperty() | ItemContainerProperties | [inline, static]
CanUserSelect(winrt::ItemContainerUserSelectMode const &value) | ItemContainerProperties |
CanUserSelect() | ItemContainerProperties |
CanUserSelectInternal() const | ItemContainer | [inline]
CanUserSelectInternal(const winrt::ItemContainerUserSelectMode &value) | ItemContainer | [inline]
CanUserSelectProperty() | ItemContainerProperties | [inline, static]
CheckThread() | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
Child(winrt::UIElement const &value) | ItemContainerProperties |
Child() | ItemContainerProperties |
ChildProperty() | ItemContainerProperties | [inline, static]
ClearProperties() | ItemContainerProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< ItemContainer > &&self) noexcept | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline, static]
EnsureProperties() | ItemContainerProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
final_release(std::unique_ptr< ItemContainer > &&self) | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline, static]
GetBase() | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
GetInner() | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
GoToState(std::wstring_view const &stateName, bool useTransitions) | ItemContainer | [private]
IsOnThread() | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
IsSelected(bool value) | ItemContainerProperties |
IsSelected() | ItemContainerProperties |
IsSelectedProperty() | ItemContainerProperties | [inline, static]
ItemContainer() | ItemContainer |
ItemContainerProperties() | ItemContainerProperties |
ItemInvoked(winrt::TypedEventHandler< winrt::ItemContainer, winrt::ItemContainerInvokedEventArgs > const &value) | ItemContainerProperties |
ItemInvoked(winrt::event_token const &token) | ItemContainerProperties |
LoadSelectionCheckbox() | ItemContainer | [private]
m_itemInvokedEventSource | ItemContainerProperties |
MultiSelectMode(winrt::ItemContainerMultiSelectMode const &value) | ItemContainerProperties |
MultiSelectMode() | ItemContainerProperties |
MultiSelectModeInternal() const | ItemContainer | [inline]
MultiSelectModeInternal(const winrt::ItemContainerMultiSelectMode &value) | ItemContainer | [inline]
MultiSelectModeProperty() | ItemContainerProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
OnApplyTemplate() | ItemContainer | [virtual]
OnCanUserInvokePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemContainerProperties | [static]
OnCanUserSelectPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemContainerProperties | [static]
OnCheckToggle(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | ItemContainer | [private]
OnChildPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemContainerProperties | [static]
OnCreateAutomationPeer() | ItemContainer | [virtual]
OnDoubleTapped(winrt::DoubleTappedRoutedEventArgs const &args) | ItemContainer |
OnIsEnabledChanged(winrt::IInspectable const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemContainer | [private]
OnIsSelectedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemContainerProperties | [static]
OnKeyDown(winrt::KeyRoutedEventArgs const &args) | ItemContainer |
OnMultiSelectModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemContainerProperties | [static]
OnPointerCanceled(winrt::PointerRoutedEventArgs const &args) | ItemContainer |
OnPointerCaptureLost(winrt::PointerRoutedEventArgs const &args) | ItemContainer |
OnPointerEntered(winrt::PointerRoutedEventArgs const &args) | ItemContainer |
OnPointerExited(winrt::PointerRoutedEventArgs const &args) | ItemContainer |
OnPointerMoved(winrt::PointerRoutedEventArgs const &args) | ItemContainer |
OnPointerPressed(winrt::PointerRoutedEventArgs const &args) | ItemContainer |
OnPointerReleased(winrt::PointerRoutedEventArgs const &args) | ItemContainer |
OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ItemContainer |
OnTapped(winrt::TappedRoutedEventArgs const &args) | ItemContainer |
ProcessPointerCanceled(winrt::PointerRoutedEventArgs const &args) | ItemContainer | [private]
ProcessPointerOver(winrt::PointerRoutedEventArgs const &args, bool isPointerOver) | ItemContainer | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
RaiseItemInvoked(const winrt::ItemContainerInteractionTrigger &interactionTrigger, const winrt::IInspectable &originalSource) | ItemContainer |
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemContainer, winrt::implementation::ItemContainerT > | [inline]
s_CanUserInvokeProperty | ItemContainerProperties | [static]
s_CanUserSelectProperty | ItemContainerProperties | [static]
s_ChildProperty | ItemContainerProperties | [static]
s_IsSelectedProperty | ItemContainerProperties | [static]
s_MultiSelectModeProperty | ItemContainerProperties | [static]
UpdateCheckboxState() | ItemContainer | [private]
UpdateMousePointerOverInstance(bool isPointerOver) | ItemContainer | [private]
UpdateMultiSelectState(bool useTransitions) | ItemContainer | [private]
UpdateVisualState(bool useTransitions) | ItemContainer | [private]
~ItemContainer() | ItemContainer |
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressBarTests Member List

This is the complete list of members for ProgressBarTests, including all inherited members.
ChangeStateTest() | ProgressBarTests | [inline]
ChangeValueTest() | ProgressBarTests | [inline]
ClassInitialize(TestContext testContext) | ProgressBarTests | [inline, static]
PaddingOffsetTest() | ProgressBarTests | [inline]
ReTemplateChangeStateTest() | ProgressBarTests | [inline]
RetemplateUpdateIndicatorWidthTest() | ProgressBarTests | [inline]
TestCleanup() | ProgressBarTests | [inline]
UpdateIndicatorWidthTest() | ProgressBarTests | [inline]
UpdateMinMaxTest() | ProgressBarTests | [inline]
VerifyAxeScanPasses() | ProgressBarTests | [inline]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTestHooksInteractionSourcesChangedEventArgs Member List

This is the complete list of members for ScrollPresenterTestHooksInteractionSourcesChangedEventArgs, including all inherited members.
InteractionSources() | ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
ScrollPresenterTestHooksInteractionSourcesChangedEventArgs(const winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection &interactionSources) | ScrollPresenterTestHooksInteractionSourcesChangedEventArgs
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CustomContent Member List

This is the complete list of members for CustomContent, including all inherited members.
Children | CustomContent |
CustomContent(int nestingLevel=3, int index=0) | CustomContent | [inline]
GetTreeViewNode() | CustomContent | [inline]
index | CustomContent | [private]
nestingLevel | CustomContent | [private]
ToString() | CustomContent | [inline]
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutTrace.h Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayoutTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsLinedFlowLayoutTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_LINEDFLOWLAYOUT || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsLinedFlowLayoutVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_LINEDFLOWLAYOUT || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsLinedFlowLayoutPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_LINEDFLOWLAYOUT || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define LINEDFLOWLAYOUT_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 LinedFlowLayoutTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define LINEDFLOWLAYOUT_TRACE_INFO(sender, message, ...) \
00036 if (IsLinedFlowLayoutTracingEnabled()) \
00037 { \
00038     LINEDFLOWLAYOUT_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (LinedFlowLayoutTrace::s_IsDebugOutputEnabled || LinedFlowLayoutTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     LINEDFLOWLAYOUT_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 LinedFlowLayoutTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define LINEDFLOWLAYOUT_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsLinedFlowLayoutVerboseTracingEnabled()) \
00050 { \
00051     LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (LinedFlowLayoutTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     LINEDFLOWLAYOUT_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define LINEDFLOWLAYOUT_TRACE_PERF(info) \
00059 if (IsLinedFlowLayoutPerfTracingEnabled()) \
00060 { \
00061     LINEDFLOWLAYOUTTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define LINEDFLOWLAYOUT_TRACE_INFO_DBG(sender, message, ...)    LINEDFLOWLAYOUT_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(sender, message, ...) LINEDFLOWLAYOUT_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define LINEDFLOWLAYOUT_TRACE_PERF_DBG(info)                    LINEDFLOWLAYOUT_TRACE_PERF(info)
00068 #else
00069 #define LINEDFLOWLAYOUT_TRACE_INFO_DBG(sender, message, ...)
00070 #define LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define LINEDFLOWLAYOUT_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class LinedFlowLayoutTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[384]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "LinedFlowLayoutInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_LINEDFLOWLAYOUT),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"LinedFlowLayout") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[1024]{};
00121         const HRESULT hr = StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args);
00122         if (SUCCEEDED(hr) || hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
00123         {
00124             if (includeTraceLogging)
00125             {
00126                 // TraceViewers
00127                 // http://toolbox/pef
00128                 // http://fastetw/index.aspx
00129                 TraceLoggingWrite(
00130                     g_hLoggingProvider,
00131                     "LinedFlowLayoutVerbose" /* eventName */,
00132                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00133                     TraceLoggingKeyword(KEYWORD_LINEDFLOWLAYOUT),
00134                     TraceLoggingWideString(buffer, "Message"));
00135             }
00136
00137             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00138             {
00139                 OutputDebugStringW(buffer);
00140             }
00141
00142             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00143
00144             if (globalTestHooks &&
00145                 (globalTestHooks->GetLoggingLevelForType(L"LinedFlowLayout") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00146             {
00147                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00148             }
00149         }
00150         va_end(args);
00151     }
00152
00153     static void TracePerfInfo(PCWSTR info) noexcept
00154     {
00155         // TraceViewers
00156         // http://toolbox/pef
00157         // http://fastetw/index.aspx
00158         TraceLoggingWrite(
00159             g_hPerfProvider,
00160             "LinedFlowLayoutPerf" /* eventName */,
00161             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00162             TraceLoggingKeyword(KEYWORD_LINEDFLOWLAYOUT),
00163             TraceLoggingWideString(info, "Info"));
00164     }
00165 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComboBoxDropDownEventRevokers Member List

This is the complete list of members for ComboBoxDropDownEventRevokers, including all inherited members.
m_dropDownClosedRevoker | ComboBoxDropDownEventRevokers |
m_dropDownOpenedRevoker | ComboBoxDropDownEventRevokers |
RevokeAll() | ComboBoxDropDownEventRevokers | [inline]
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomOptions.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomOptions.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenter.h"
00007 #include "ScrollingZoomOptions.g.h"
00008
00009 class ScrollingZoomOptions :
00010     public winrt::implementation::ScrollingZoomOptionsT<ScrollingZoomOptions>
00011 {
00012 public:
00013     ScrollingZoomOptions(winrt::ScrollingAnimationMode const& animationMode);
00014     ScrollingZoomOptions(winrt::ScrollingAnimationMode const& animationMode, winrt::ScrollingSnapPointsMode const& snapPointsMode);
00015
00016     ~ScrollingZoomOptions()
00017     {
00018         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00019     }
00020
00021     static constexpr winrt::ScrollingAnimationMode s_defaultAnimationMode{ winrt::ScrollingAnimationMode::Auto };
00022     static constexpr winrt::ScrollingSnapPointsMode s_defaultSnapPointsMode{ winrt::ScrollingSnapPointsMode::Default };
00023
00024     winrt::ScrollingAnimationMode AnimationMode() const;
00025     void AnimationMode(winrt::ScrollingAnimationMode const& animationMode);
00026
00027     winrt::ScrollingSnapPointsMode SnapPointsMode() const;
00028     void SnapPointsMode(winrt::ScrollingSnapPointsMode const& snapPointsMode);
00029
00030 private:
00031     winrt::ScrollingAnimationMode m_animationMode{ s_defaultAnimationMode };
00032     winrt::ScrollingSnapPointsMode m_snapPointsMode{ s_defaultSnapPointsMode };
00033 };
00034
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ICrossFadeEffect Member List

This is the complete list of members for ICrossFadeEffect, including all inherited members.
Source1([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ICrossFadeEffect
Source1([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ICrossFadeEffect
Source2([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ICrossFadeEffect
Source2([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ICrossFadeEffect
Weight([out, retval] float *value) | ICrossFadeEffect
Weight([in] float value) | ICrossFadeEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/RuntimeClassHelpers.h Source File

  • File List
  • File Members
  • inc

RuntimeClassHelpers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "tracker_ref.h"
00007
00008 #include <winrt\Microsoft.UI.Xaml.h>
00009
00010 // This type is a helper to make ReferenceTracker work with winrt::implements intead of a concrete implementation type
00011 template <typename D, typename WinRTClassType, template <typename, typename ...> class ImplT, typename ... I>
00012 struct reference_tracker_implements :
00013     public ImplT<D, WinRTClassType, I ..., winrt::composable, winrt::composing>
00014 {
00015     using class_type = typename WinRTClassType;
00016
00017     reference_tracker_implements()
00018     {
00019     }
00020 };
00021
00022 template <typename WinRTClassType>
00023 struct reference_tracker_implements_t
00024 {
00025     template <typename D, typename ... I>
00026     using type = reference_tracker_implements<D, WinRTClassType, winrt::implements, I ...>;
00027 };
00028
00029 template <typename WinRTClassType, template <typename, typename ...> class ImplT>
00030 struct reference_tracker_custom_implements_t
00031 {
00032     template <typename D, typename ... I>
00033     using type = reference_tracker_implements<D, WinRTClassType, ImplT, I ...>;
00034 };
00035
00036 template <typename D, template <typename, typename ...> class ImplT, typename ... I>
00037 struct ReferenceTracker : public ImplT<D, I ..., ::IReferenceTrackerExtension>, public ITrackerHandleManager
00038 {
00039     using impl_type = typename ImplT<D, I ..., ::IReferenceTrackerExtension>;
00040
00041     template <typename... Args>
00042     ReferenceTracker(Args&&... args) : impl_type(std::forward<Args>(args) ...)
00043     {
00044         m_owningThreadId = ::GetCurrentThreadId();
00045         m_dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread();
00046
00047         EnsureReferenceTrackerInterfaces();
00048     }
00049
00050     void abi_enter()
00051     {
00052         CheckThread();
00053     }
00054
00055
00056     bool IsOnThread()
00057     {
00058         return ::GetCurrentThreadId() == m_owningThreadId;
00059     }
00060
00061     void CheckThread()
00062     {
00063         if (!IsOnThread())
00064         {
00065             throw winrt::hresult_wrong_thread();
00066         }
00067     }
00068
00069     template <typename BaseType>
00070     auto GetBase()
00071     {
00072         return this->m_inner.as<BaseType>();
00073     }
00074
00075     // Generally callers should use This(), but inner is a non-delegating inspectable so
00076     // it is necessary to use for calling through to base methods in Override situations.
00077     winrt::IInspectable GetInner()
00078     {
00079         return this->m_inner;
00080     }
00081
00082     int32_t __stdcall NonDelegatingQueryInterface(winrt::guid const& riid, void** value) noexcept
00083     {
00084         // In order for the reference tracking mechanism to work, we actually need to hand out XAML's
00085         // implementation of IWeakReferenceSource. However there are some bugs on RS2 where XAML calls
00086         // back out to the outer during initialization for IWeakReferenceSource and so our m_inner is null.
00087         // In that case we allow our "self" implementation to leak out (if we returned null, XAML would crash).
00088         if (InlineIsEqualGUID(riid, __uuidof(::IWeakReferenceSource)) && this->m_inner)
00089         {
00090             return winrt::get_unknown(this->m_inner)->QueryInterface(riid, value);
00091         }
00092         else
00093         {
00094             // We only implement IReferenceTrackerExtension if we're not composed (subclassed)
00095             // by another class; this interface has to be implemented by the controlling unknown,
00096             // because that's the object that controls the ref count.  Implementing this interface
00097             // communicates that you return valid ref counts from Release().
00098             if (InlineIsEqualGUID(riid, __uuidof(::IReferenceTrackerExtension)) && !this->outer())
00099             {
00100                 *value = static_cast<::IReferenceTrackerExtension*>(this);
00101                 static_cast<IUnknown*>(*value)->AddRef();
00102             }
00103             else
00104             {
00105                 return impl_type::NonDelegatingQueryInterface(riid, value);
00106             }
00107         }
00108
00109         return S_OK;
00110     }
00111
00112     // TODO: Remove once CppWinRT always calls shim for NonDelegatingAddRef/Release
00113
00114     // TEMP-BEGIN
00115
00116     HRESULT __stdcall QueryInterface(GUID const& id_abi, void** object) noexcept
00117     {
00118         auto& id = reinterpret_cast<winrt::guid const&>(id_abi);
00119         if (this->outer())
00120         {
00121             return this->outer()->QueryInterface(id, object);
00122         }
00123
00124         return NonDelegatingQueryInterface(id, object);
00125     }
00126
00127     // TEMP-END
00128
00129     static void final_release(std::unique_ptr<D>&& self)
00130     {
00131         // Add an extra ref to prevent a crash due to double deletion.  There can be multiple reasons why it's good to
00132         // add an extra "safety ref" during destruction, but here's one such example:
00133         // C++/WinRT calls final_release when the ref-count goes to zero, and we call DeleteInstanceOnUIThread so that
00134         // if we're not on the UIThread, we dispatch a task to the UI thread to do the final delete there.  The problem
00135         // is that it's possible that while this final delete is happening on the UI thread, the same object is being
00136         // processed during the ReferenceTracker walk, which does an AddRef/Release to get the current ref count of the
00137         // object (see ComposingTrackerExtensionWrapper::GetActualRefCount).  If the refcount is zero, the AddRef/Release
00138         // will trigger another deletion (another call to this function), and we'll be in a bad state because the object
00139         // gets deleted twice.  The fix is to just add an extra ref, so it won't go to zero again.
00140         // C++/WinRT actually does this trick as well in root_implements<>::NonDelegatingRelease, which calls this function.
00141         // But the dtor for root_implements<> does one extra release, taking the refcount back down to zero again, so this
00142         // doesn't fix our problem.
00143         self->AddRef();
00144         DeleteInstanceOnUIThread(std::move(self));
00145     }
00146
00147     // Post a call to DeleteInstance() to the UI thread.  If we're already on the UI thread, then just
00148     // return false.  If we're off the UI thread but can't get to it, then do the DeleteInstance() here (asynchronously).
00149     static void DeleteInstanceOnUIThread(std::unique_ptr<D>&& self) noexcept
00150     {
00151         bool queued = false;
00152
00153         // See if we're on the UI thread
00154         if(!self->IsOnThread())
00155         {
00156             // We're not on the UI thread
00157             if(auto dispatcherQueue = static_cast<ReferenceTracker<D, ImplT, I...>*>(self.get())->m_dispatcherQueue)
00158             {
00159                 dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler(
00160                     [instance = self.release()]()
00161                 {
00162                     delete instance;
00163                 }));
00164
00165                 queued = true;
00166             }
00167             else
00168             {
00169                 // We expect to always have a dispatcherQueue.  If m_dispatcherQueue is null here,
00170                 // it may be that "self" is in the middle of getting cleaned up, and its dtor has
00171                 // already run.
00172                 MUX_ASSERT(FALSE);
00173             }
00174         }
00175
00176         if (!queued)
00177         {
00178             self.reset();
00179         }
00180     }
00181
00182     void EnsureReferenceTrackerInterfaces()
00183     {
00184         // Should be called once after the object is initialized.
00185 #if DBG
00186         MUX_ASSERT_NOASSUME(!m_wasEnsureCalled);
00187 #endif
00188         if (!this->m_inner) // We need to derive from DependencyObject. Do so if it didn't happen yet.
00189         {
00190 #pragma warning(push)
00191 #pragma warning(disable : 26444) // Disable es.84, there is sometimes a return value that needs to be assigned and ignored
00192             // Internally derive from DependencyObject to get ReferenceTracker behavior.
00193             winrt::impl::call_factory<winrt::DependencyObject, winrt::IDependencyObjectFactory>([&](auto&& f) { f.CreateInstance(*this, this->m_inner); });
00194             //winrt::get_activation_factory<winrt::DependencyObject, winrt::IDependencyObjectFactory>().CreateInstance(*this, this->m_inner);
00195 #pragma warning(pop)
00196         }
00197         if (this->m_inner)
00198         {
00199             if (auto trackerOwnerInner = this->m_inner.try_as<::ITrackerOwner>()) // Only exists on RS2+
00200             {
00201                 m_trackerOwnerInnerNoRef = static_cast<::ITrackerOwner*>(winrt::get_abi(trackerOwnerInner));
00202             }
00203         }
00204
00205 #if DBG
00206         m_wasEnsureCalled = true;
00207 #endif
00208     }
00209
00210     winrt::DispatcherQueue m_dispatcherQueue{ nullptr };
00211
00212 private:
00213     DWORD m_owningThreadId{};
00214 };
00215
00216 #define CppWinRTActivatableClassWithFactory(className, factory) \
00217     namespace factory_implementation { using className = factory; }; \
00218     namespace implementation { using className = ::className; }; \
00219
00220 #define CppWinRTActivatableClass(className) \
00221     CppWinRTActivatableClassWithFactory(className, className##Factory)
00222
00223 #define CppWinRTActivatableClassWithBasicFactory(className) \
00224     struct className##Factory : public winrt::factory_implementation::className##T<className##Factory, ::className> {}; \
00225     CppWinRTActivatableClassWithFactory(className, className##Factory)
00226
00227 #define CppWinRTActivatableClassWithDPFactory(className) \
00228     struct className##Factory : public winrt::factory_implementation::className##T<className##Factory, ::className> \
00229     { \
00230         className##Factory() { EnsureProperties(); } \
00231         static void ClearProperties() { ::className::ClearProperties(); }\
00232         static void EnsureProperties() { ::className::EnsureProperties(); }\
00233     }; \
00234     CppWinRTActivatableClassWithFactory(className, className##Factory)
00235
00236 // A workaround for BUG 17986411
00237 // If we defined ReferenceTracker on a base class, then subclass of it should ForwardRefToBaseReferenceTracker
00238 // For example, we need to ForwardRefToBaseReferenceTracker(NavigationViewItemBase) in NavigationViewItem
00239 //      class NavigationViewItem :  public winrt::implementation::NavigationViewItemT<NavigationViewItem, NavigationViewItemBase>
00240 //      class NavigationViewItemBase : public ReferenceTracker<NavigationViewItemBase, winrt::implementation::NavigationViewItemBaseT, winrt::composable>
00241 #define ForwardRefToBaseReferenceTracker(baseClass) \
00242     HRESULT __stdcall QueryInterface(GUID const& id, void** object) noexcept override \
00243     { \
00244         return baseClass##::QueryInterface(id, object); \
00245     } \
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualLayoutContextAdapter.h Source File

  • File List
  • File Members
  • Repeater

VirtualLayoutContextAdapter.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "LayoutContext.h"
00007 #include "VirtualizingLayoutContext.h"
00008 #include "NonvirtualizingLayoutContext.h"
00009
00010 class VirtualLayoutContextAdapter :
00011     public winrt::implements<VirtualLayoutContextAdapter, NonVirtualizingLayoutContext>
00012 {
00013 public:
00014     VirtualLayoutContextAdapter(winrt::VirtualizingLayoutContext const& virtualizingContext);
00015
00016 #pragma region ILayoutContextOverrides
00017     winrt::IInspectable LayoutStateCore();
00018     void LayoutStateCore(winrt::IInspectable const& state);
00019 #pragma endregion
00020
00021 #pragma region INonVirtualizingLayoutContextOverrides
00022     winrt::IVectorView<winrt::UIElement> ChildrenCore();
00023 #pragma endregion
00024
00025 private:
00026     winrt::weak_ref<winrt::VirtualizingLayoutContext> m_virtualizingContext{ nullptr };
00027     winrt::IVectorView<winrt::UIElement> m_children{ nullptr };
00028
00029     template <typename T>
00030     class ChildrenCollection :
00031         public ReferenceTracker<ChildrenCollection<T>,
00032         typename reference_tracker_implements_t<typename winrt::IVectorView<T>>::type,
00033         typename winrt::IIterable<T>>
00034     {
00035     public:
00036         ChildrenCollection(winrt::VirtualizingLayoutContext const& context)
00037         {
00038             m_context = context;
00039         }
00040
00041 #pragma region IVectorView<T>
00042         uint32_t Size()
00043         {
00044             return m_context.ItemCount();
00045         }
00046
00047         T GetAt(uint32_t index)
00048         {
00049             return m_context.GetOrCreateElementAt(index, winrt::ElementRealizationOptions::None);
00050         }
00051
00052         bool IndexOf(T const& value, uint32_t &index) noexcept
00053         {
00054             winrt::throw_hresult(E_NOTIMPL);
00055         }
00056
00057         uint32_t GetMany(uint32_t startIndex, winrt::array_view<T> const& values) noexcept
00058         {
00059             winrt::throw_hresult(E_NOTIMPL);
00060         }
00061
00062 #pragma endregion
00063
00064 #pragma region winrt::IIterable<T>
00065         winrt::IIterator<T> First()
00066         {
00067             return winrt::make<ChildrenCollection<T>::Iterator>(*this);
00068         }
00069 #pragma endregion
00070
00071     private:
00072         class Iterator :
00073             public ReferenceTracker<Iterator, reference_tracker_implements_t<winrt::IIterator<T>>::type>
00074         {
00075         public:
00076             Iterator(const winrt::IVectorView<T>& childCollection)
00077             {
00078                 m_childCollection = childCollection;
00079             }
00080
00081             ~Iterator()
00082             {
00083
00084             }
00085
00086             T Current()
00087             {
00088                 if (m_currentIndex < m_childCollection.Size())
00089                 {
00090                     return m_childCollection.GetAt(m_currentIndex);
00091                 }
00092                 else
00093                 {
00094                     throw winrt::hresult_out_of_bounds();
00095                 }
00096             }
00097
00098             bool HasCurrent()
00099             {
00100                 return (m_currentIndex < m_childCollection.Size());
00101             }
00102
00103             bool MoveNext()
00104             {
00105                 if (m_currentIndex < m_childCollection.Size())
00106                 {
00107                     ++m_currentIndex;
00108                     return (m_currentIndex < m_childCollection.Size());
00109                 }
00110                 else
00111                 {
00112                     throw winrt::hresult_out_of_bounds();
00113                 }
00114             }
00115
00116             uint32_t GetMany(winrt::array_view<T> values)
00117             {
00118                 uint32_t howMany = 0;
00119                 if (HasCurrent())
00120                 {
00121                     do
00122                     {
00123                         if (howMany >= values.size()) break;
00124                         values[howMany] = Current();
00125                         howMany++;
00126                     } while (MoveNext());
00127                 }
00128
00129                 return howMany;
00130             }
00131
00132         private:
00133             winrt::IVectorView<T> m_childCollection{ nullptr };
00134             unsigned int m_currentIndex = 0;
00135         };
00136
00137         winrt::VirtualizingLayoutContext m_context;
00138     };
00139 };
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTrace Member List

This is the complete list of members for NavigationViewTrace, including all inherited members.
s_IsDebugOutputEnabled | NavigationViewTrace | [static]
s_IsVerboseDebugOutputEnabled | NavigationViewTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | NavigationViewTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | NavigationViewTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | NavigationViewTrace | [inline, static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewSelectionChangedEventArgs Member List

This is the complete list of members for TreeViewSelectionChangedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
AddedItems() | TreeViewSelectionChangedEventArgs |
CheckThread() | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewSelectionChangedEventArgs > &&self) noexcept | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< TreeViewSelectionChangedEventArgs > &&self) | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewSelectionChangedEventArgs, winrt::implementation::TreeViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
RemovedItems() | TreeViewSelectionChangedEventArgs |
TreeViewSelectionChangedEventArgs(const winrt::IVector< winrt::IInspectable > addedItems, const winrt::IVector< winrt::IInspectable > removedItems) | TreeViewSelectionChangedEventArgs |
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/RoutedEventHelpers.h Source File

  • File List
  • File Members
  • inc

RoutedEventHelpers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // These helpers are for attaching to UIElement AddHandler RoutedEvents. In C++/WinRT the pattern
00007 // is more obtuse than in C# because you have to manually box the delegate. But even in C# the pattern
00008 // is not type-safe. These helpers do two things:
00009 // 1) Add type safety by templating over an enum of the supported RoutedEvent types to make sure that the
00010 //    event and the delegate are always correctly paired.
00011 // 2) Adds auto_revoke semantics to AddHandler to avoid manual RemoveHandler calls and manual tracking
00012 //    of the boxed delegate.
00013
00014
00015 struct RoutedEventHandler_revoker
00016 {
00017     RoutedEventHandler_revoker() noexcept = default;
00018     RoutedEventHandler_revoker(RoutedEventHandler_revoker const&) = delete;
00019     RoutedEventHandler_revoker& operator=(RoutedEventHandler_revoker const&) = delete;
00020     RoutedEventHandler_revoker(RoutedEventHandler_revoker&& other) noexcept
00021     {
00022         move_from(other);
00023     }
00024
00025     RoutedEventHandler_revoker& operator=(RoutedEventHandler_revoker&& other) noexcept
00026     {
00027         move_from(other);
00028         return *this;
00029     }
00030
00031     RoutedEventHandler_revoker(winrt::UIElement const& object, winrt::RoutedEvent event, winrt::IInspectable handler) :
00032         m_object(object),
00033         m_event(std::move(event)),
00034         m_handler(std::move(handler))
00035     {}
00036
00037     ~RoutedEventHandler_revoker() noexcept
00038     {
00039         revoke();
00040     }
00041
00042     void revoke() noexcept
00043     {
00044         if (!m_object)
00045         {
00046             return;
00047         }
00048
00049         if (auto object = m_object.get())
00050         {
00051             object.RemoveHandler(m_event, m_handler);
00052         }
00053
00054         m_object = nullptr;
00055     }
00056
00057     explicit operator bool() const noexcept
00058     {
00059         return static_cast<bool>(m_object);
00060     }
00061 private:
00062     void move_from(RoutedEventHandler_revoker& other)
00063     {
00064         if (this != &other)
00065         {
00066             revoke();
00067             std::swap(m_object, other.m_object);
00068             std::swap(m_event, other.m_event);
00069             std::swap(m_handler, other.m_handler);
00070         }
00071     }
00072
00073     weak_ref<winrt::UIElement> m_object;
00074     winrt::RoutedEvent m_event{ nullptr };
00075     winrt::IInspectable m_handler{};
00076 };
00077
00078 // Enum to help with type traits
00079 enum class RoutedEventType
00080 {
00081     GettingFocus,
00082     LosingFocus,
00083     KeyDown,
00084     PointerPressed,
00085     PointerReleased,
00086     PointerExited,
00087     PointerCanceled,
00088     PointerCaptureLost,
00089     DragEnter,
00090     DragLeave,
00091     Drop
00092 };
00093
00094 template<RoutedEventType eventType>
00095 struct RoutedEventTraits
00096 {
00097 };
00098
00099 template <>
00100 struct RoutedEventTraits<RoutedEventType::GettingFocus>
00101 {
00102     static winrt::RoutedEvent Event() { return winrt::UIElement::GettingFocusEvent(); }
00103     using HandlerT = winrt::TypedEventHandler<winrt::UIElement, winrt::GettingFocusEventArgs>;
00104 };
00105
00106 template <>
00107 struct RoutedEventTraits<RoutedEventType::LosingFocus>
00108 {
00109     static winrt::RoutedEvent Event() { return winrt::UIElement::LosingFocusEvent(); }
00110     using HandlerT = winrt::TypedEventHandler<winrt::UIElement, winrt::LosingFocusEventArgs>;
00111 };
00112
00113 template <>
00114 struct RoutedEventTraits<RoutedEventType::KeyDown>
00115 {
00116     static winrt::RoutedEvent Event() { return winrt::UIElement::KeyDownEvent(); }
00117     using HandlerT = winrt::KeyEventHandler;
00118 };
00119
00120 template <>
00121 struct RoutedEventTraits<RoutedEventType::PointerPressed>
00122 {
00123     static winrt::RoutedEvent Event() { return winrt::UIElement::PointerPressedEvent(); }
00124     using HandlerT = winrt::PointerEventHandler;
00125 };
00126
00127 template <>
00128 struct RoutedEventTraits<RoutedEventType::PointerReleased>
00129 {
00130     static winrt::RoutedEvent Event() { return winrt::UIElement::PointerReleasedEvent(); }
00131     using HandlerT = winrt::PointerEventHandler;
00132 };
00133
00134 template <>
00135 struct RoutedEventTraits<RoutedEventType::PointerExited>
00136 {
00137     static winrt::RoutedEvent Event() { return winrt::UIElement::PointerExitedEvent(); }
00138     using HandlerT = winrt::PointerEventHandler;
00139 };
00140
00141 template <>
00142 struct RoutedEventTraits<RoutedEventType::PointerCanceled>
00143 {
00144     static winrt::RoutedEvent Event() { return winrt::UIElement::PointerCanceledEvent(); }
00145     using HandlerT = winrt::PointerEventHandler;
00146 };
00147
00148 template <>
00149 struct RoutedEventTraits<RoutedEventType::PointerCaptureLost>
00150 {
00151     static winrt::RoutedEvent Event() { return winrt::UIElement::PointerCaptureLostEvent(); }
00152     using HandlerT = winrt::PointerEventHandler;
00153 };
00154
00155 template <>
00156 struct RoutedEventTraits<RoutedEventType::DragEnter>
00157 {
00158     static winrt::RoutedEvent Event() { return winrt::UIElement::DragEnterEvent(); }
00159     using HandlerT = winrt::DragEventHandler;
00160 };
00161
00162 template <>
00163 struct RoutedEventTraits<RoutedEventType::DragLeave>
00164 {
00165     static winrt::RoutedEvent Event() { return winrt::UIElement::DragLeaveEvent(); }
00166     using HandlerT = winrt::DragEventHandler;
00167 };
00168
00169 template <>
00170 struct RoutedEventTraits<RoutedEventType::Drop>
00171 {
00172     static winrt::RoutedEvent Event() { return winrt::UIElement::DropEvent(); }
00173     using HandlerT = winrt::DragEventHandler;
00174 };
00175
00176 template<RoutedEventType eventType, typename traits = RoutedEventTraits<eventType>>
00177 inline RoutedEventHandler_revoker AddRoutedEventHandler(winrt::UIElement const& object, typename traits::HandlerT const& callback, bool handledEventsToo)
00178 {
00179     auto handler = winrt::box_value<typename traits::HandlerT>(callback);
00180     auto event = traits::Event();
00181     object.AddHandler(event, handler, handledEventsToo);
00182     return { object, event, handler };
00183 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderAutomationPeer.cpp Source File

  • File List
  • File Members
  • Expander

ExpanderAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ExpanderAutomationPeer.h"
00007 #include "Utils.h"
00008 #include "ResourceAccessor.h"
00009 #include <Vector.h>
00010
00011 #include "ExpanderAutomationPeer.properties.cpp"
00012
00013 static constexpr wstring_view s_ExpanderToggleButtonName{ L"ExpanderToggleButton"sv };
00014
00015 // WPF ExpanderAutomationPeer:
00016 // https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ExpanderAutomationPeer.cs
00017
00018 ExpanderAutomationPeer::ExpanderAutomationPeer(winrt::Expander const& owner)
00019     : ReferenceTracker(owner)
00020 {
00021 }
00022
00023 // IAutomationPeerOverrides
00024
00025 winrt::IInspectable ExpanderAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00026 {
00027     if (patternInterface == winrt::PatternInterface::ExpandCollapse)
00028     {
00029         return *this;
00030     }
00031
00032     return __super::GetPatternCore(patternInterface);
00033 }
00034
00035 hstring ExpanderAutomationPeer::GetClassNameCore()
00036 {
00037     // WPF uses "Expander" as its class name
00038     return winrt::hstring_name_of<winrt::Expander>();
00039 }
00040
00041 hstring ExpanderAutomationPeer::GetNameCore()
00042 {
00043     return __super::GetNameCore();
00044 }
00045
00046 winrt::AutomationControlType ExpanderAutomationPeer::GetAutomationControlTypeCore()
00047 {
00048     // WPF uses "Group" as its control type core
00049     return winrt::AutomationControlType::Group;
00050 }
00051
00052 winrt::AutomationPeer ExpanderAutomationPeer::GetExpanderToggleButtonPeer()
00053 {
00054     // We are not going to call the overriden one because that one doesn't have the toggle button.
00055     auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();
00056
00057     for (auto peer : childrenPeers)
00058     {
00059         if (peer.GetAutomationId() == s_ExpanderToggleButtonName)
00060         {
00061             return peer;
00062         }
00063     }
00064
00065     return nullptr;
00066 }
00067
00068 bool ExpanderAutomationPeer::HasKeyboardFocusCore()
00069 {
00070     if(auto toggleButtonPeer = GetExpanderToggleButtonPeer())
00071     {
00072         // Since the EventsSource of the toggle button
00073         // is the same as the expander's, we need to
00074         // redirect the focus of the expander and base it on the toggle button's.
00075         return toggleButtonPeer.HasKeyboardFocus();
00076     }
00077
00078     // If the toggle button doesn't have the current focus, then
00079     // the expander's not focused.
00080     return false;
00081 }
00082
00083 bool ExpanderAutomationPeer::IsKeyboardFocusableCore()
00084 {
00085     if(auto toggleButtonPeer = GetExpanderToggleButtonPeer())
00086     {
00087         return toggleButtonPeer.IsKeyboardFocusable();
00088     }
00089
00090     return false;
00091 }
00092
00093 // This function gets called when there's narrator and the user is trying to touch the expander
00094 // If this happens, we will return the toggle button's peer and focus it programmatically,
00095 // to synchronize this touch focus with the keyboard one.
00096 winrt::AutomationPeer ExpanderAutomationPeer::GetPeerFromPointCore(winrt::Point point)
00097 {
00098     auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();
00099
00100     if(auto toggleButtonPeer = GetExpanderToggleButtonPeer())
00101     {
00102         auto frameworkElementPeer = toggleButtonPeer.as<winrt::FrameworkElementAutomationPeer>();
00103         auto toggleButton = frameworkElementPeer.Owner().as<winrt::ToggleButton>();
00104         toggleButton.Focus(winrt::FocusState::Programmatic);
00105         return toggleButtonPeer;
00106     }
00107
00108     return __super::GetPeerFromPointCore(point);
00109 }
00110
00111 // We are going to take out the toggle button off the children, because we are setting
00112 // the toggle button's event source to this automation peer. This removes any cyclical
00113 // dependency.
00114 winrt::IVector<winrt::AutomationPeer> ExpanderAutomationPeer::GetChildrenCore()
00115 {
00116     auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();
00117     auto peers = winrt::make<Vector<winrt::AutomationPeer, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>(
00118                                         static_cast<int>(childrenPeers.Size() - 1) /* capacity */);
00119     for (auto peer : childrenPeers)
00120     {
00121         if (peer.GetAutomationId() != s_ExpanderToggleButtonName)
00122         {
00123             peers.Append(peer);
00124         }
00125         else
00126         {
00127             // If it is ExpanderToggleButton, we want to exclude it but add its children into the peer
00128             auto expanderToggleButtonChildrenPeers = peer.GetChildrenCore();
00129             for (auto expanderHeaderPeer : expanderToggleButtonChildrenPeers)
00130             {
00131                 peers.Append(expanderHeaderPeer);
00132             }
00133         }
00134     }
00135
00136     return peers;
00137 }
00138
00139 // IExpandCollapseProvider
00140
00141 winrt::ExpandCollapseState ExpanderAutomationPeer::ExpandCollapseState()
00142 {
00143     auto state = winrt::ExpandCollapseState::Collapsed;
00144     if (auto const expander = Owner().try_as<winrt::Expander>())
00145     {
00146         state = expander.IsExpanded() ?
00147             winrt::ExpandCollapseState::Expanded :
00148             winrt::ExpandCollapseState::Collapsed;
00149     }
00150
00151     return state;
00152 }
00153
00154 void ExpanderAutomationPeer::Expand()
00155 {
00156     if (auto const expander = Owner().try_as<winrt::Expander>())
00157     {
00158         expander.IsExpanded(true);
00159         RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Expanded);
00160     }
00161 }
00162
00163 void ExpanderAutomationPeer::Collapse()
00164 {
00165     if (auto const expander = Owner().try_as<winrt::Expander>())
00166     {
00167         expander.IsExpanded(false);
00168         RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Collapsed);
00169     }
00170 }
00171
00172 void ExpanderAutomationPeer::RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState newState)
00173 {
00174     if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
00175     {
00176         const winrt::ExpandCollapseState oldState = (newState == winrt::ExpandCollapseState::Expanded) ?
00177             winrt::ExpandCollapseState::Collapsed :
00178             winrt::ExpandCollapseState::Expanded;
00179
00180         // if box_value(oldState) doesn't work here, use ReferenceWithABIRuntimeClassName to make Narrator unbox it.
00181         RaisePropertyChangedEvent(winrt::ExpandCollapsePatternIdentifiers::ExpandCollapseStateProperty(),
00182             box_value(oldState),
00183             box_value(newState));
00184     }
00185 }
00186
00187 com_ptr<Expander> ExpanderAutomationPeer::GetImpl()
00188 {
00189     com_ptr<Expander> impl = nullptr;
00190
00191     if (auto expander = Owner().try_as<winrt::Expander>())
00192     {
00193         impl = winrt::get_self<Expander>(expander)->get_strong();
00194     }
00195
00196     return impl;
00197 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimationsDemoPage::AnimationElementFactory Member List

This is the complete list of members for AnimationsDemoPage::AnimationElementFactory, including all inherited members.
_groupTemplate | AnimationsDemoPage::AnimationElementFactory | [private]
_innerRepeaters | AnimationsDemoPage::AnimationElementFactory | [private]
_isInnerLayoutGrid | AnimationsDemoPage::AnimationElementFactory | [private]
_KeyFromIndexFunc | AnimationsDemoPage::AnimationElementFactory | [private]
_recipeTemplate | AnimationsDemoPage::AnimationElementFactory | [private]
_recyclePool | AnimationsDemoPage::AnimationElementFactory | [private]
_transitionProvider | AnimationsDemoPage::AnimationElementFactory | [private]
AnimationElementFactory(DataTemplate groupTemplate, DataTemplate recipeTemplate, ItemCollectionTransitionProvider transitionProvider, Func< DelegatingItemsSource, int, string > KeyFromIndexFunc) | AnimationsDemoPage::AnimationElementFactory | [inline]
GetElementCore(ElementFactoryGetArgs args) | AnimationsDemoPage::AnimationElementFactory | [inline, protected]
IsInnerLayoutGrid | AnimationsDemoPage::AnimationElementFactory |
RecycleElementCore(ElementFactoryRecycleArgs args) | AnimationsDemoPage::AnimationElementFactory | [inline, protected]
UpdateInnerLayouts() | AnimationsDemoPage::AnimationElementFactory | [inline]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarMenuButtonAutomationPeer Member List

This is the complete list of members for InkToolBarMenuButtonAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< InkToolBarMenuButtonAutomationPeer > &&self) noexcept | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
final_release(std::unique_ptr< InkToolBarMenuButtonAutomationPeer > &&self) | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline, static]
GetBase() | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
GetInner() | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
InkToolBarMenuButtonAutomationPeer(winrt::InkToolBarMenuButton owner) | InkToolBarMenuButtonAutomationPeer | [inline]
IsOnThread() | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AutoSuggestBoxHelperProperties Member List

This is the complete list of members for AutoSuggestBoxHelperProperties, including all inherited members.
AutoSuggestBoxHelperProperties() | AutoSuggestBoxHelperProperties |
ClearProperties() | AutoSuggestBoxHelperProperties | [static]
EnsureProperties() | AutoSuggestBoxHelperProperties | [static]
GetKeepInteriorCornersSquare(winrt::AutoSuggestBox const &target) | AutoSuggestBoxHelperProperties | [static]
KeepInteriorCornersSquareProperty() | AutoSuggestBoxHelperProperties | [inline, static]
s_KeepInteriorCornersSquareProperty | AutoSuggestBoxHelperProperties | [static]
SetKeepInteriorCornersSquare(winrt::AutoSuggestBox const &target, bool value) | AutoSuggestBoxHelperProperties | [static]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualizingLayoutContext.h Source File

  • File List
  • File Members
  • Repeater

VirtualizingLayoutContext.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "LayoutContext.h"
00007 #include "VirtualizingLayoutContext.g.h"
00008
00009 class VirtualizingLayoutContext :
00010     public winrt::implementation::VirtualizingLayoutContextT<VirtualizingLayoutContext, LayoutContext>
00011 {
00012 public:
00013
00014 #pragma region IVirtualizingLayoutContext
00015     int32_t ItemCount();
00016     winrt::IInspectable GetItemAt(int index);
00017     winrt::UIElement GetOrCreateElementAt(int index);
00018     winrt::UIElement GetOrCreateElementAt(int index, winrt::ElementRealizationOptions const& options);
00019     void RecycleElement(winrt::UIElement const& element);
00020
00021     winrt::Rect VisibleRect();
00022     winrt::Rect RealizationRect();
00023
00024     int32_t RecommendedAnchorIndex();
00025
00026     winrt::Point LayoutOrigin();
00027     void LayoutOrigin(winrt::Point const& result);
00028 #pragma endregion
00029
00030 #pragma region IVirtualizingLayoutContextOverrides
00031     virtual int32_t ItemCountCore();
00032     virtual winrt::IInspectable GetItemAtCore(int index);
00033     virtual winrt::UIElement GetOrCreateElementAtCore(int index, winrt::ElementRealizationOptions const& options);
00034     virtual void RecycleElementCore(winrt::UIElement const& element);
00035
00036     virtual winrt::Rect VisibleRectCore();
00037     virtual winrt::Rect RealizationRectCore();
00038
00039     virtual int32_t RecommendedAnchorIndexCore();
00040
00041     virtual winrt::Point LayoutOriginCore();
00042     virtual void LayoutOriginCore(winrt::Point const& value);
00043 #pragma endregion
00044
00045     winrt::NonVirtualizingLayoutContext GetNonVirtualizingContextAdapter();
00046
00047 private:
00048     winrt::NonVirtualizingLayoutContext m_contextAdapter{ nullptr };
00049 };
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScopedBatchCompleted_revoker Member List

This is the complete list of members for ScopedBatchCompleted_revoker, including all inherited members.
move_from(ScopedBatchCompleted_revoker &other) | ScopedBatchCompleted_revoker | [inline, private]
operator bool() const noexcept | ScopedBatchCompleted_revoker | [inline, explicit]
operator=(ScopedBatchCompleted_revoker const &) | ScopedBatchCompleted_revoker |
operator=(ScopedBatchCompleted_revoker &&other) noexcept | ScopedBatchCompleted_revoker | [inline]
revoke() noexcept | ScopedBatchCompleted_revoker | [inline]
ScopedBatchCompleted_revoker() noexcept | ScopedBatchCompleted_revoker |
ScopedBatchCompleted_revoker(ScopedBatchCompleted_revoker const &) | ScopedBatchCompleted_revoker |
ScopedBatchCompleted_revoker(ScopedBatchCompleted_revoker &&other) noexcept | ScopedBatchCompleted_revoker | [inline]
ScopedBatchCompleted_revoker(winrt::CompositionScopedBatch const &batch, winrt::event_token token) | ScopedBatchCompleted_revoker | [inline]
~ScopedBatchCompleted_revoker() noexcept | ScopedBatchCompleted_revoker | [inline]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionProviderTests Member List

This is the complete list of members for ItemCollectionTransitionProviderTests, including all inherited members.
ValidateItemCollectionTransitionProvider() ItemCollectionTransitionProviderTests [inline]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControl.h Source File

  • File List
  • File Members
  • MapControl

MapControl.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include "MapControl.g.h"
00009 #include "MapControl.properties.h"
00010 #include "WebView2.h"
00011 #include "MapElementsLayer.h"
00012 #include "winrt/Windows.Foundation.h"
00013 #include <winrt/Windows.Devices.Geolocation.h>
00014
00015
00016 class MapControl :
00017     public ReferenceTracker<MapControl, winrt::implementation::MapControlT>,
00018     public MapControlProperties
00019 {
00020
00021 public:
00022     MapControl();
00023
00024     void OnApplyTemplate();
00025     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00026
00027     winrt::IAsyncAction LayerElementsChanged(const winrt::MapElementsLayer& layer, winrt::IVector<winrt::MapElement> elements, const winrt::Collections::IVectorChangedEventArgs& args, winrt::hstring elementId);
00028     winrt::fire_and_forget MapControl::UpdateMapIcon(winrt::Geopoint mapIconPoint, winrt::hstring pointId, winrt::hstring layerId);
00029
00030 private:
00031
00032     tracker_ref<winrt::WebView2> m_webView{ this };
00033
00034     winrt::IAsyncOperation<winrt::hstring> InitializeWebMap();
00035     winrt::fire_and_forget SetUpWebView();
00036     winrt::fire_and_forget OnLayerAdded(const winrt::MapElementsLayer layer);
00037     winrt::IAsyncOperation<winrt::hstring> AddMapIcon(winrt::Geopoint mapIconPoint, winrt::hstring layerId);
00038     winrt::IAsyncOperation<winrt::CoreWebView2> MapControl::GetCoreWebView2();
00039     winrt::fire_and_forget RemoveMapIcon(winrt::hstring pointId, winrt::hstring layerId);
00040     winrt::fire_and_forget ClearLayer(winrt::hstring layerId);
00041     winrt::fire_and_forget ResetLayerCollection();
00042     void OnLayersVectorChanged(const winrt::IObservableVector<winrt::MapLayer>&, const winrt::Collections::IVectorChangedEventArgs& args);
00043     void WebMessageReceived(winrt::WebView2 sender, winrt::CoreWebView2WebMessageReceivedEventArgs args);
00044
00045     winrt::WebView2::WebMessageReceived_revoker m_webviewWebMessageReceivedRevoker{};
00046     winrt::WebView2::NavigationCompleted_revoker m_webviewNavigationCompletedRevoker{};
00047
00048     winrt::fire_and_forget UpdateMapServiceTokenInWebPage();
00049     winrt::fire_and_forget UpdateCenterInWebPage();
00050     winrt::fire_and_forget UpdateZoomLevelInWebPage();
00051     winrt::fire_and_forget UpdateControlsInWebPage();
00052
00053     winrt::event_token m_layersVectorChangedToken{};
00054
00055     static winrt::IAsyncOperation<winrt::hstring> GetMapHtmlContent();
00056     static winrt::hstring s_mapHtmlContent;
00057 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/InteractionTests/WebView2Tests.cs Source File

  • File List
  • File Members
  • WebView2
  • InteractionTests

WebView2Tests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007
00008 using Microsoft.Windows.Apps.Test.Automation;
00009 using Microsoft.Windows.Apps.Test.Foundation;
00010 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00011 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00012
00013 using WEX.TestExecution;
00014 using WEX.TestExecution.Markup;
00015 using WEX.Logging.Interop;
00016
00017 using System;
00018 using System.Diagnostics;
00019 using System.Drawing;
00020 using System.IO;
00021 using System.Runtime.InteropServices;
00022 using System.Security.Principal;
00023
00024 using Button = Microsoft.Windows.Apps.Test.Foundation.Controls.Button;
00025
00026 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00027 {
00028     [TestClass]
00029     public class WebView2Tests
00030     {
00031         [ClassInitialize]
00032         [TestProperty("RunAs", "User")]
00033         [TestProperty("Classification", "Integration")]
00034         [TestProperty("Platform", "Any")]
00035         [TestProperty("TestSuite", "A")]
00036         public static void ClassInitialize(TestContext testContext)
00037         {
00038             if (!(new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator)))
00039             {
00040                 Verify.Fail("WebView2 tests must be run elevated, as they required write access to the registry.");
00041             }
00042
00043             TestEnvironment.Initialize(testContext);
00044             EnsureBrowser();
00045         }
00046
00047         // Ensure a suitable version of Edge browser or WebView2 runtime is present. If not, use mini_installer to install the runtime.
00048         public static void EnsureBrowser()
00049         {
00050             // If a previous run of CoreWebView2Initialized_FailedTest failed to clean up the
00051             // fake browser executable folder key it set, remove it here.
00052             RemoveFakeBrowserExecutableFolderKey();
00053
00054             // 1. Get installed Edge browser (or WebView2 Runtime) build version info.
00055             int browserBuildVersion = GetInstalledBrowserVersion();
00056
00057             // 2. Get Microsoft.Web.WebView2.Core.dll build version info.
00058             int sdkBuildVersion = GetSdkBuildVersion();
00059
00060             // 3. Check if a runtime is already installed, and if it's compatible.
00061             bool hasCompatibleRuntimeInstalled = GetHasCompatibleRuntimeInstalled(browserBuildVersion, sdkBuildVersion);
00062
00063             // 4a. If we have a compatible runtime installed, continue on to the tests!
00064             if (hasCompatibleRuntimeInstalled)
00065             {
00066                 return;
00067             }
00068
00069             // 4b. If we don't have a compatible runtime, try to install one.
00070
00071             // 5. Before installing, check if Edge is already installing/updating. We can't run the standalone installer if it is.
00072             bool didWait = WaitForEdgeIfAlreadyInstalling();
00073
00074             if (didWait && IsEdgeAlreadyInstalling())
00075             {
00076                 Log.Error("WebView2Tests Init: Edge took more than 3 minutes to install, give up.");
00077             }
00078             else if (didWait)
00079             {
00080                 // If we waited for Edge to finish installing/updating and it finished, check the versions again
00081                 browserBuildVersion = GetInstalledBrowserVersion();
00082                 hasCompatibleRuntimeInstalled = GetHasCompatibleRuntimeInstalled(browserBuildVersion, sdkBuildVersion);
00083                 if (hasCompatibleRuntimeInstalled)
00084                 {
00085                     return;
00086                 }
00087             }
00088
00089             // 6. If Edge wasn't already installing/updating, or it was but installed something old (unlikely),
00090             // run the standalone installer to install it.
00091             // This installation can sometimes fail, so we'll try a number of times before failing out.
00092             int attemptsLeft = 5;
00093             bool successfullyInstalled = false;
00094             while (attemptsLeft > 0)
00095             {
00096                 attemptsLeft--;
00097                 successfullyInstalled = TryInstallingBrowser(attemptsLeft);
00098                 if (successfullyInstalled) break;
00099             }
00100             if (attemptsLeft == 0 && !successfullyInstalled)
00101             {
00102                 Log.Error("WebView2Tests Init: Browser installation failed, out of retries.");
00103             }
00104         }
00105
00106         private static void RemoveFakeBrowserExecutableFolderKey()
00107         {
00108             var browserExecutableKey = GetBrowserExecutableFolderKey();
00109             var browserExecutableFolder = browserExecutableKey.GetValue(TestApplicationInfo.MUXControlsTestApp.ProcessName);
00110             if (browserExecutableFolder != null)
00111             {
00112                 browserExecutableKey.DeleteValue(TestApplicationInfo.MUXControlsTestApp.ProcessName);
00113                 Log.Comment("Removed key for {0}", TestApplicationInfo.MUXControlsTestApp.ProcessName);
00114             }
00115         }
00116
00117         private static int GetInstalledBrowserVersion()
00118         {
00119             string browserVersionString = string.Empty;
00120             IntPtr browserVersionPtr;
00121             int retval = NativeMethods.GetAvailableCoreWebView2BrowserVersionString(string.Empty, out browserVersionPtr);
00122             if (retval != (int)NativeMethods.HResults.S_OK)
00123             {
00124                 Log.Warning("WebView2Tests Init: Error: got hresult {0:x8} retrieving GetAvailableCoreWebView2BrowserVersionString", retval);
00125             }
00126             else if (browserVersionPtr == IntPtr.Zero)
00127             {
00128                 Log.Warning("WebView2Tests Init: GetAvailableCoreWebView2BrowserVersionString returned version of 0");
00129             }
00130             else
00131             {
00132                 // eg "80.0.361.48 beta", 361 is the build version
00133                 browserVersionString = Marshal.PtrToStringUni(browserVersionPtr);
00134                 Marshal.FreeCoTaskMem(browserVersionPtr);
00135             }
00136
00137             int browserBuildVersion = 0;
00138             string installedBrowser;
00139
00140             if (string.IsNullOrEmpty(browserVersionString))
00141             {
00142                 installedBrowser = "none";
00143             }
00144             else
00145             {
00146                 browserBuildVersion = int.Parse(browserVersionString.Split('.')[2]);
00147                 installedBrowser = string.Format("version {0} [build version: {1}]", browserVersionString, browserBuildVersion);
00148             }
00149             Log.Comment("WebView2Tests Init: Found Edge browser/WV2Runtime: {0}", installedBrowser);
00150             return browserBuildVersion;
00151         }
00152
00153         private static int GetSdkBuildVersion()
00154         {
00155             int sdkBuildVersion = 0;
00156             string dllName = "Microsoft.Web.WebView2.Core.dll";
00157             string dllPath = Path.Combine(Environment.CurrentDirectory , "test", dllName);
00158
00159             try
00160             {
00161                 FileVersionInfo sdkVersionInfo = FileVersionInfo.GetVersionInfo(dllPath);
00162                 sdkBuildVersion = sdkVersionInfo.ProductBuildPart;
00163                 Log.Comment("WebView2Tests Init: Found {0}: version {1} [build version: {2}] (file: {3})",
00164                             dllName,
00165                             sdkVersionInfo.ProductVersion,
00166                             sdkBuildVersion,
00167                             sdkVersionInfo.FileName);
00168             }
00169             catch (Exception e)
00170             {
00171                 Log.Error("WebView2Tests Init: could not find loader at {0} [exception: {1}]", dllPath, e.ToString());
00172             }
00173             return sdkBuildVersion;
00174         }
00175
00176         private static bool GetHasCompatibleRuntimeInstalled(int browserBuildVersion, int sdkBuildVersion)
00177         {
00178             bool hasCompatibleRuntime = false;
00179             // The full versions of browser/runtime and WebView2 SDK are not directly comparable:
00180             // Browser/Runtime version ex: 80.0.361.48
00181             // WebView2 SDK version ex: 0.8.355
00182             // Webview2Loader compares the build versions (361 and 355 in above example), we do so here as well
00183             if (browserBuildVersion >= sdkBuildVersion)
00184             {
00185                 Log.Comment("WebView2Tests Init: Installed Edge build will be used for testing... ");
00186                 hasCompatibleRuntime = true;
00187             }
00188             return hasCompatibleRuntime;
00189         }
00190
00191         private static bool WaitForEdgeIfAlreadyInstalling()
00192         {
00193             bool didWait = false;
00194             int curWait = 0;
00195             int maxWait = 180; // wait for 3 minutes, should finish in 1-2
00196             while (IsEdgeAlreadyInstalling() && curWait < maxWait)
00197             {
00198                 Log.Comment("Note: Edge is updating, wait up to 180 seconds for it to finish. Waited {0} seconds so far, wait another 10...", curWait);
00199                 Wait.ForSeconds(10);
00200                 curWait += 10;
00201                 didWait = true;
00202             }
00203             return didWait;
00204         }
00205
00206         private static bool IsEdgeAlreadyInstalling()
00207         {
00208             bool edgeUpdateIsRunning = false;
00209             // Print if there are any Edge processes running that might interfere with installation
00210             // (specifically, MicrosoftEdge<Version> or MicrosoftEdgeUpdate).
00211             foreach (var process in Process.GetProcesses())
00212             {
00213                 if (process.ProcessName.ToLower().ToString().Contains("edge"))
00214                 {
00215                     Log.Comment("Note: process '{0}' ({1}) is running", process.ProcessName, process.Id);
00216                     if (process.ProcessName.ToString().Equals("MicrosoftEdgeUpdate"))
00217                     {
00218                         edgeUpdateIsRunning = true;
00219                     }
00220                 }
00221             }
00222             return edgeUpdateIsRunning;
00223         }
00224
00225         private static bool TryInstallingBrowser(int attemptsLeft)
00226         {
00227             bool successfullyInstalled = false;
00228             string installer = "mini_installer.exe";
00229             // Note: Starting with SDK 0.9.488 / Edge version 83, evergreen WebView2 no longer targets the Stable
00230             //       browser channel. Instead, it targets another set of binaries, branded Evergreen WebView2 Runtime.
00231             //       (See https://docs.microsoft.com/en-us/microsoft-edge/webview2/releasenotes).
00232             //
00233             //       Accordingly, Update mini_installer args to install WV2Runtime instead of full browser.
00234             string installerArgs_WV2Runtime = "--msedgewebview --system-level";
00235             Log.Comment(@"WebView2Tests Init: Installing WebView2 runtime: '{0} {1}'", installer, installerArgs_WV2Runtime);
00236             ProcessStartInfo installerStartInfo = new ProcessStartInfo(installer, installerArgs_WV2Runtime);
00237
00238             Process installerProcess = Process.Start(installerStartInfo);
00239             installerProcess.WaitForExit();
00240
00241             if (installerProcess.ExitCode == 0)
00242             {
00243                 Log.Comment("WebView2Tests Init: {0} exited successfully", installer);
00244                 successfullyInstalled = true;
00245             }
00246             else
00247             {
00248                 Log.Warning("WebView2Tests Init: {0} failed with exit code {1}! Attempts left: {2}", installer, installerProcess.ExitCode, attemptsLeft);
00249                 // Print information about some of the error codes we sometimes hit
00250                 if (installerProcess.ExitCode == 4)
00251                 {
00252                     Log.Comment("Exit code 4 = HIGHER_VERSION_EXISTS, Higher version already exists");
00253                 }
00254                 else if (installerProcess.ExitCode == 60)
00255                 {
00256                     Log.Comment("Exit code 60 = SETUP_SINGLETON_ACQUISITION_FAILED, The setup process could not acquire the exclusive right to modify the installation.");
00257                 }
00258             }
00259             return successfullyInstalled;
00260         }
00261
00262         [TestCleanup]
00263         public void TestCleanup()
00264         {
00265             TestCleanupHelper.Cleanup();
00266         }
00267
00268         internal class WebView2TestSetupHelper : TestSetupHelper
00269         {
00270             public WebView2TestSetupHelper(global::System.Collections.Generic.ICollection<string> testNames)
00271                 : base(testNames)
00272             {
00273             }
00274
00275             protected override void Dispose(bool isDisposing)
00276             {
00277                 var result = new Edit(FindElement.ById("CleanupResultTextBox"));
00278                 Button CleanupTestButton = new Button(FindElement.ById("CleanupTest"));
00279                 string expectedValue = "Cleanup completed.";
00280
00281                 Log.Comment("Waiting for cleanup...");
00282                 using (var waiter = new ValueChangedEventWaiter(result, expectedValue))
00283                 {
00284                     CleanupTestButton.Invoke();
00285                     if (!waiter.TryWait())
00286                     {
00287                         Log.Warning("Cleanup may have failed.");
00288                     }
00289                 }
00290
00291                 base.Dispose(isDisposing);
00292             }
00293         }
00294
00295         private static void WaitForWebMessageResult(string selectedTest)
00296         {
00297             var result = new Edit(FindElement.ById("TestResult"));
00298             var check = new CheckBox(FindElement.ById("MessageReceived"));
00299             string expectedValue = selectedTest + ": Passed []";
00300
00301             Log.Comment("Waiting for result...");
00302             using (var waiter = check.GetToggledWaiter())
00303             {
00304                 // If the web message hasn't been received, wait for it
00305                 if (check.ToggleState != ToggleState.On && !waiter.TryWait())
00306                 {
00307                     Log.Error("Expected web message was never received.");
00308                 }
00309             }
00310
00311             // By now, we'll have gotten a pass/fail result
00312             Verify.AreEqual(expectedValue, result.Value);
00313         }
00314
00315         private static void CompleteTestAndWaitForWebMessageResult(string selectedTest)
00316         {
00317             var result = new Edit(FindElement.ById("TestResult"));
00318             var check = new CheckBox(FindElement.ById("MessageReceived"));
00319             Button CompleteTestButton = new Button(FindElement.ById("CompleteTest"));
00320             string expectedValue = selectedTest + ": Passed []";
00321
00322             Log.Comment("Waiting for result...");
00323             CompleteTestButton.Invoke();
00324
00325             // If the web message hasn't been received, wait for it
00326             using (var waiter = check.GetToggledWaiter())
00327             {
00328                 if (check.ToggleState != ToggleState.On && !waiter.TryWait())
00329                 {
00330                     Log.Error("Expected web message was never received.");
00331                 }
00332             }
00333
00334             // By now, we'll have gotten a pass/fail result
00335             Verify.AreEqual(expectedValue, result.Value);
00336         }
00337
00338         private static void CompleteTestAndWaitForResult(string selectedTest, bool shouldDumpMessageLog = false)
00339         {
00340             var result = new Edit(FindElement.ById("TestResult"));
00341             Button CompleteTestButton = new Button(FindElement.ById("CompleteTest"));
00342             string expectedValue = selectedTest + ": Passed []";
00343
00344             Log.Comment("Waiting for result...");
00345             using (var waiter = new ValueChangedEventWaiter(result, expectedValue))
00346             {
00347                 CompleteTestButton.Invoke();
00348                 waiter.TryWait();
00349             }
00350
00351             if(shouldDumpMessageLog)
00352             {
00353                 var logBox = new Edit(FindElement.ById("MessageLog"));
00354                 if (logBox != null)
00355                 {
00356                     Log.Comment("Dumping MessageLog:");
00357                     Log.Comment(logBox.GetText());
00358                 }
00359             }
00360
00361             Verify.AreEqual(expectedValue, result.Value);
00362         }
00363
00364         private static void WaitForTextBoxValue(Edit textbox, string expectedValue, bool match = true)
00365         {
00366             // if value is empty, wait for it
00367             if (textbox.Value == string.Empty)
00368             {
00369                 using (var waiter = new ValueChangedEventWaiter(textbox, expectedValue))
00370                 {
00371                     waiter.Wait();
00372                 }
00373             }
00374
00375             if (match == false)
00376             {
00377                 if (textbox.Value == expectedValue)
00378                 {
00379                     return;
00380                 }
00381             }
00382             else
00383             {
00384                 if (textbox.Value != expectedValue)
00385                 {
00386                     return;
00387                 }
00388             }
00389         }
00390
00391         private static void DoSelectAllByKeyboard()
00392         {
00393             Log.Comment("Do Select All");
00394             KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00395             TextInput.SendText("a");
00396             KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00397         }
00398
00399         private static void CopySelected()
00400         {
00401             Log.Comment("Do Copy");
00402             KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00403             TextInput.SendText("c");
00404             KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00405         }
00406
00407         private static void PasteClipboard()
00408         {
00409             Log.Comment("Do Paste");
00410             KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00411             TextInput.SendText("v");
00412             KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00413         }
00414
00415         private static void WaitForCopyCompleted()
00416         {
00417             string expectedValue = "HTML files ready";
00418             var status1 = new Edit(FindElement.ById("Status1"));
00419             WaitForTextBoxValue(status1, expectedValue);
00420         }
00421
00422         private static void WaitForLoadCompleted()
00423         {
00424             // if load completed then status2 will have name of the webview
00425             var status2 = new Edit(FindElement.ById("Status2"));
00426             WaitForTextBoxValue(status2, string.Empty, false /* match = false for not match */);
00427         }
00428
00429         private static void WaitForEnsureCompleted()
00430         {
00431             var status1 = new Edit(FindElement.ById("Status1"));
00432             WaitForTextBoxValue(status1, "EnsureCoreWebView2Async() completed", true);
00433         }
00434
00435         private static void ChooseTest(string testName, bool waitForLoadCompleted = true)
00436         {
00437             WaitForCopyCompleted();
00438
00439             string comboBoxName = "TestNameComboBox";
00440             Log.Comment("Retrieve ComboBox item with name '{0}'.", comboBoxName);
00441             ComboBox comboBox = new ComboBox(FindElement.ById(comboBoxName));
00442             comboBox.SelectItemByName(testName);
00443             Wait.ForIdle();
00444
00445             if (waitForLoadCompleted)
00446             {
00447                 WaitForLoadCompleted();
00448             }
00449         }
00450
00451         // Replace calls to WaitForFocus with waiters when task 23527231 is completed making WebMessageReceivedHandler available.
00452         private static void WaitForFocus(string target)
00453         {
00454             var anaheimFocusTextBox = new Edit(FindElement.ById("AnaheimFocusTextBox"));
00455             var expectedFocusMessage = "Focus on: " + target;
00456             WaitForTextBoxValue(anaheimFocusTextBox, expectedFocusMessage);
00457             Log.Comment("Focus is on " + UIObject.Focused);
00458             Verify.AreEqual(anaheimFocusTextBox.Value, expectedFocusMessage);
00459         }
00460
00461         // 'target' and 'tabs' should be in accordance with the html page being navigated on.
00462         private static void SetWebViewElementFocus(string target, uint tabs)
00463         {
00464             Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
00465             x1.SetFocus();
00466             Wait.ForIdle();
00467             Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00468
00469             // As of the change in PR 6834432, calling Wait.ForIdle() when a WebView2 has focus causes the WebView2
00470             // to lose focus. The regular version of KeyboardHelper.PressKey() calls Wait.ForIdle(), so in tests where
00471             // the WebView2 has focus, PressKey() should be called with the skipWait parameter set to true.
00472             KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, tabs, true);
00473             WaitForFocus(target);
00474         }
00475
00476         [TestMethod]
00477         [TestProperty("TestSuite", "A")]
00478         public void BasicRenderingTest()
00479         {
00480             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00481             {
00482                 ChooseTest("BasicRenderingTest");
00483                 Wait.ForMilliseconds(100); // rendering a webpage takes some time after navigation completed
00484
00485                 // To verify, check for the appropriate pixel(s) using User32 and GDI32 calls here in the test runner.
00486                 WebView2Temporary.WebView2RenderingVerifier.VerifyInstances("BasicRenderingTest");
00487                 CompleteTestAndWaitForResult("BasicRenderingTest");
00488             }
00489         }
00490
00491         private static void MouseClickTestCommon(PointerButtons mouseButton)
00492         {
00493             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00494             {
00495                 string selectedTest = "Invalid";
00496                 if (mouseButton == PointerButtons.Primary)
00497                 {
00498                     selectedTest = "MouseLeftClickTest";
00499                 }
00500                 else if (mouseButton == PointerButtons.Middle)
00501                 {
00502                     selectedTest = "MouseMiddleClickTest";
00503                 }
00504                 else if (mouseButton == PointerButtons.Secondary)
00505                 {
00506                     selectedTest = "MouseRightClickTest";
00507                 }
00508                 else if (mouseButton == PointerButtons.XButton1)
00509                 {
00510                     selectedTest = "MouseXButton1ClickTest";
00511                 }
00512                 else if (mouseButton == PointerButtons.XButton2)
00513                 {
00514                     selectedTest = "MouseXButton2ClickTest";
00515                 }
00516                 ChooseTest(selectedTest);
00517
00518                 var webview = FindElement.ById("MyWebView2");
00519                 Rectangle bounds = webview.BoundingRectangle;
00520                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
00521                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
00522                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
00523                 /*
00524                 var point = webview.GetClickablePoint();
00525                 Log.Comment("ClickablePoint = X:{0}, Y:{1}", point.X, point.Y);
00526                 // Move mouse to top left coordinate (location of web button) relative from the center of webview
00527                 InputHelper.MoveMouse(webview,
00528                     -bounds.Width/2 + 20, -bounds.Height/2 + 20);
00529                 */
00530                 var point = new Point(bounds.X + 20, bounds.Y + 20);
00531                 Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
00532                 PointerInput.Move(point);
00533
00534                 PointerInput.Press(mouseButton);
00535                 PointerInput.Release(mouseButton);
00536                 Wait.ForIdle();
00537
00538                 WaitForWebMessageResult(selectedTest);
00539             }
00540         }
00541
00542         [TestMethod]
00543         [TestProperty("TestSuite", "A")]
00544         public void MouseLeftClickTest()
00545         {
00546             MouseClickTestCommon(PointerButtons.Primary);
00547         }
00548
00549         [TestMethod]
00550         [TestProperty("TestSuite", "A")]
00551         public void MouseMiddleClickTest()
00552         {
00553             MouseClickTestCommon(PointerButtons.Middle);
00554         }
00555
00556         [TestMethod]
00557         [TestProperty("TestSuite", "A")]
00558         public void MouseRightClickTest()
00559         {
00560             MouseClickTestCommon(PointerButtons.Secondary);
00561         }
00562
00563         [TestMethod]
00564         [TestProperty("TestSuite", "A")]
00565         public void MouseXButton1ClickTest()
00566         {
00567             MouseClickTestCommon(PointerButtons.XButton1);
00568         }
00569
00570         [TestMethod]
00571         [TestProperty("TestSuite", "A")]
00572         public void MouseXButton2ClickTest()
00573         {
00574             MouseClickTestCommon(PointerButtons.XButton2);
00575         }
00576
00577         [TestMethod]
00578         [TestProperty("TestSuite", "A")]
00579         public void MouseWheelScrollTest()
00580         {
00581             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00582             {
00583                 ChooseTest("MouseWheelScrollTest");
00584
00585                 var webview = FindElement.ById("MyWebView2");
00586                 // Mouse wheel delta amount required per initial velocity unit
00587                 const int mouseWheelDeltaForVelocityUnit = -4000;  // scroll downwards
00588                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
00589                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
00590                 /*
00591                 InputHelper.RotateWheel(webview, mouseWheelDeltaForVelocityUnit);
00592                 */
00593                 Rectangle bounds = webview.BoundingRectangle;
00594                 var point = new Point(bounds.X + bounds.Width/2, bounds.Y + bounds.Height/2);
00595                 PointerInput.Move(point);
00596                 MouseWheelInput.RotateWheel(mouseWheelDeltaForVelocityUnit);
00597
00598                 WaitForWebMessageResult("MouseWheelScrollTest");
00599             }
00600         }
00601
00602         [TestMethod]
00603         [TestProperty("TestSuite", "A")]
00604         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
00605         public void CursorUpdateTest()
00606         {
00607             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00608             {
00609                 // On ChooseTest, replace the default webview with one that exposes the ProtectedCursor member
00610                 ChooseTest("CursorUpdateTest");
00611
00612                 // Clear the cache so we can find the new webview
00613                 ElementCache.Clear();
00614                 var webview = FindElement.ById("MyWebView2");
00615                 Rectangle bounds = webview.BoundingRectangle;
00616                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
00617
00618                 // Top left coordinate (location of web button) relative from the center of webview
00619                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
00620                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
00621                 /*
00622                 InputHelper.MoveMouse(webview, -bounds.Width / 2 + 20, -bounds.Height / 2 + 20);
00623                 */
00624                 var point = new Point(bounds.X + 20, bounds.Y + 20);
00625                 PointerInput.Move(point);
00626                 Wait.ForIdle();
00627
00628                 // Checks that the ProtectedCursor type has changed to the one we expect
00629                 CompleteTestAndWaitForResult("CursorUpdateTest");
00630             }
00631         }
00632
00633         [TestMethod]
00634         [TestProperty("TestSuite", "A")]
00635         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
00636         public void CursorClickUpdateTest()
00637         {
00638             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00639             {
00640                 // On ChooseTest, replace the default webview with one that exposes the ProtectedCursor member
00641                 ChooseTest("CursorClickUpdateTest");
00642
00643                 // Clear the cache so we can find the new webview
00644                 ElementCache.Clear();
00645                 var webview = FindElement.ById("MyWebView2");
00646                 Rectangle bounds = webview.BoundingRectangle;
00647                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
00648
00649                 // Click somewhere in the webview that's not the button a few times
00650                 var centerOfWebView = new Point(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2);
00651                 PointerInput.Move(centerOfWebView);
00652
00653                 PointerInput.Press(PointerButtons.Primary);
00654                 PointerInput.Release(PointerButtons.Primary);
00655
00656                 PointerInput.Press(PointerButtons.Primary);
00657                 PointerInput.Release(PointerButtons.Primary);
00658
00659                 PointerInput.Press(PointerButtons.Primary);
00660                 PointerInput.Release(PointerButtons.Primary);
00661
00662                 var insideButton = new Point(bounds.X + 20, bounds.Y + 20);
00663                 PointerInput.Move(insideButton);
00664                 Wait.ForIdle();
00665
00666                 // Checks that the ProtectedCursor type has changed to the one we expect
00667                 CompleteTestAndWaitForResult("CursorClickUpdateTest");
00668             }
00669         }
00670
00671         [TestMethod]
00672         [TestProperty("TestSuite", "A")]
00673         public void NavigationErrorTest()
00674         {
00675             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00676             {
00677                 ChooseTest("NavigationErrorTest");
00678                 CompleteTestAndWaitForResult("NavigationErrorTest");
00679             }
00680         }
00681
00682         // For each of the Focus_* tests:
00683         // 1) We Tab/Shift+Tab/Click amongst xaml controls(x1, x2) and web controls(w1, w2).
00684         // 2) After each such change:
00685         //     a. Validate Edge focus state by waiting for web message sent when an element gets focus
00686         //     b. Validate Xaml focus using MITA APIs directly
00687         [TestMethod]
00688         [TestProperty("TestSuite", "A")]
00689         public void Focus_BasicTabTest()
00690         {
00691             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00692             {
00693                 ChooseTest("Focus_BasicTabTest");
00694
00695                 Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
00696                 Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2
00697
00698                 Log.Comment("Description: x1 -> w1 -> w2 -> x2 ");
00699                 Log.Comment("Focus on x1");
00700                 x1.SetFocus();
00701                 Wait.ForIdle();
00702                 Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00703
00704                 Log.Comment("Tab x1 -> w1");
00705                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00706                 WaitForFocus("w1");
00707
00708                 Log.Comment("Tab w1 -> w2");
00709                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00710                 WaitForFocus("w2");
00711
00712                 Log.Comment("Tab w2 -> x2");
00713                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
00714                 {
00715                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00716                     xamlFocusWaiter.Wait();
00717                     Log.Comment("Focus is on " + UIObject.Focused);
00718                     Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
00719                 }
00720
00721                 CompleteTestAndWaitForResult("Focus_BasicTabTest");
00722             }
00723         }
00724
00725         // See comment on Focus_BasicTabTest() for details on test mechanism.
00726         [TestMethod]
00727         [TestProperty("TestSuite", "A")]
00728         public void Focus_ReverseTabTest()
00729         {
00730             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00731             {
00732                 ChooseTest("Focus_ReverseTabTest");
00733
00734                 Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
00735                 Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2
00736
00737                 Log.Comment("Description: x2 shift-> w2 shift-> w1 shift-> x1");
00738                 Log.Comment("Focus on x2");
00739                 x2.SetFocus();
00740                 Wait.ForIdle();
00741                 Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
00742
00743                 Log.Comment("Shift+Tab x2 -> w2");
00744                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
00745                 WaitForFocus("w2");
00746
00747                 Log.Comment("Shift+Tab w2 -> w1");
00748                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
00749                 WaitForFocus("w1");
00750
00751                 Log.Comment("Shift+Tab w1 -> x1");
00752                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
00753                 {
00754
00755                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
00756                     xamlFocusWaiter.Wait();
00757                     Log.Comment("Focus is on " + UIObject.Focused);
00758                     Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00759                 }
00760
00761                 CompleteTestAndWaitForResult("Focus_ReverseTabTest");
00762             }
00763         }
00764
00765         // See comment on Focus_BasicTabTest() for details on test mechanism.
00766         [TestMethod]
00767         [TestProperty("TestSuite", "A")]
00768         public void Focus_BackAndForthTabTest()
00769         {
00770             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00771             {
00772                 ChooseTest("Focus_BackAndForthTabTest");
00773
00774                 Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
00775
00776                 Log.Comment("Description: x1 -> w1 shift-> x1 -> w1 -> x1");
00777                 Log.Comment("Focus on x1");
00778                 x1.SetFocus();
00779                 Wait.ForIdle();
00780                 Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00781
00782                 Log.Comment("Tab x1 -> w1");
00783                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00784                 WaitForFocus("w1");
00785
00786                 Log.Comment("Shift+Tab w1 -> x1");
00787                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
00788                 {
00789                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
00790                     xamlFocusWaiter.Wait();
00791                     Log.Comment("Focus is on " + UIObject.Focused);
00792                     Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00793                 }
00794
00795                 Log.Comment("Tab x1 -> w1");
00796                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00797                 WaitForFocus("w1");
00798
00799                 Log.Comment("Shift+Tab w1 -> x1");
00800                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
00801                 {
00802                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
00803                     xamlFocusWaiter.Wait();
00804                     Log.Comment("Focus is on " + UIObject.Focused);
00805                     Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00806                 }
00807
00808                 CompleteTestAndWaitForResult("Focus_BackAndForthTabTest");
00809             }
00810         }
00811
00812         // See comment on Focus_BasicTabTest() for details on test mechanism.
00813         [TestMethod]
00814         [TestProperty("TestSuite", "A")]
00815         public void Focus_MouseActivateTest()
00816         {
00817             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00818             {
00819                 ChooseTest("Focus_MouseActivateTest");
00820
00821                 Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
00822
00823                 Log.Comment("Test1: Focus on x1, Click on w1, Shift+Tab w2 -> w1, Click on x2");
00824                 Log.Comment("Focus on x1");
00825                 x1.SetFocus();
00826                 Wait.ForIdle();
00827                 Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00828
00829                 Log.Comment("Click on w2");
00830
00831                 Rectangle bounds = FindElement.ById("MyWebView2").BoundingRectangle;
00832                 const int w2_offsetX = 100;
00833                 const int w2_offsetY = 200;
00834
00835                 // top left coordinate (location of web button) relative from the center of webview
00836
00837                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
00838                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
00839                 var clickPoint = new Point(bounds.X + w2_offsetX, bounds.Y + w2_offsetY);
00840                 PointerInput.Move(clickPoint);
00841                 PointerInput.Press(PointerButtons.Primary);
00842                 PointerInput.Release(PointerButtons.Primary);
00843
00844                 WaitForFocus("w2");
00845
00846                 Log.Comment("Shift+Tab w2 -> w1");
00847                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
00848                 WaitForFocus("w1");
00849
00850                 Log.Comment("Click on x1");
00851                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton1"))
00852                 {
00853                     InputHelper.MoveMouse(x1, 10, 10);
00854                     PointerInput.Press(PointerButtons.Primary);
00855                     PointerInput.Release(PointerButtons.Primary);
00856                     xamlFocusWaiter.Wait();
00857                     Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00858                 }
00859
00860                 CompleteTestAndWaitForResult("Focus_MouseActivateTest");
00861             }
00862         }
00863
00864         [TestMethod]
00865         [TestProperty("TestSuite", "A")]
00866         public void ExecuteScriptTest()
00867         {
00868             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00869             {
00870                 ChooseTest("ExecuteScriptTest");
00871                 CompleteTestAndWaitForResult("ExecuteScriptTest");
00872             }
00873         }
00874
00875         [TestMethod]
00876         [TestProperty("TestSuite", "A")]
00877         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
00878         public void MultipleWebviews_FocusTest()
00879         {
00880             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00881             {
00882                 ChooseTest("MultipleWebviews_FocusTest");
00883
00884                 Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
00885                 Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2
00886                 UIObject webviewControl = new UIObject(FindElement.ById("MyWebView2"));
00887                 UIObject webviewControlB = new UIObject(FindElement.ById("MyWebView2B"));
00888
00889                 Log.Comment("Description: first tabstop1 -> webview1 -> second tabstop2 -> WebView2");
00890                 Log.Comment("Focus on tabstop1");
00891                 x1.SetFocus();
00892                 Wait.ForIdle();
00893                 Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
00894
00895                 Log.Comment("Tab tabstop1 -> MyWebView2");
00896                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00897                 WaitForFocus("w1");
00898
00899                 Log.Comment("Tab to move to next element within first webview page");
00900                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00901
00902                 Log.Comment("Tab MyWebView2 -> tabstop2");
00903                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
00904                 {
00905                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00906                     xamlFocusWaiter.Wait();
00907                     Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
00908                 }
00909
00910                 Log.Comment("Tab tabstop2 -> MyWebView2B");
00911                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
00912                 WaitForFocus("w1B");
00913
00914                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
00915                 {
00916                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1, true);
00917                     xamlFocusWaiter.Wait();
00918                     Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
00919                 }
00920
00921                 CompleteTestAndWaitForResult("MultipleWebviews_FocusTest");
00922             }
00923         }
00924
00925         [TestMethod]
00926         [TestProperty("TestSuite", "B")]
00927         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
00928         public void MultipleWebviews_BasicRenderingTest()
00929         {
00930             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00931             {
00932                 ChooseTest("MultipleWebviews_BasicRenderingTest");
00933                 CompleteTestAndWaitForResult("MultipleWebviews_BasicRenderingTest");
00934                 Wait.ForIdle();
00935                 ElementCache.Clear();
00936                 WebView2Temporary.WebView2RenderingVerifier.VerifyInstances("MultipleWebviews_BasicRenderingTest");
00937             }
00938         }
00939
00940         [TestMethod]
00941         [TestProperty("TestSuite", "B")]
00942         [TestProperty("Ignore", "True")] // Task 34034748: WebView2.MultipleWebviews_LanguageTest is unstable
00943         public void MultipleWebviews_LanguageTest()
00944         {
00945             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00946             {
00947                 ChooseTest("MultipleWebviews_LanguageTest");
00948                 CompleteTestAndWaitForResult("MultipleWebviews_LanguageTest");
00949             }
00950         }
00951
00952         // CopyPasteTest tests basic copy and pasting scenarios involving the WebView2 control as follows:
00953         // 1) Copying from text housed in a XAML control in the app to the webview's textbox.
00954         // 2) [Xaml text -> WebView2] After overwriting the clipboard's DataPackage, verify successful 'copy to webview'
00955         //    by copying from the textbox and pasting to an external Xaml textbox for verification.
00956         // 3) [WebView2 text -> Xaml] Overwrite webview textbox's contents and attempt to copy this out to
00957         //    the Xaml app to provide an isolated 'copy from webview' test.
00958         [TestMethod]
00959         [TestProperty("TestSuite", "B")]
00960         public void CopyPasteTest()
00961         {
00962             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
00963             {
00964                 ChooseTest("CopyPasteTest");
00965
00966                 var CopyPasteTextBox1 = new Edit(FindElement.ById("CopyPasteTextBox1"));
00967                 var CopyPasteTextBox2 = new Edit(FindElement.ById("CopyPasteTextBox2"));
00968
00969                 // Copy text to SimpleInputPage's text box page.
00970                 Log.Comment("Copy and paste text to SimpleInputPage's text box page...");
00971                 CopyPasteTextBox1.SetFocus();
00972                 DoSelectAllByKeyboard();
00973                 CopySelected();
00974                 SetWebViewElementFocus("w2", 2);
00975                 // Do ctrl+V to paste into html.
00976                 PasteClipboard();
00977
00978                 using (var clearClipboardWaiter = new ValueChangedEventWaiter(CopyPasteTextBox2, "Clear"))
00979                 {
00980                     // "Clear" clipboard by copying text between TextBoxes on Xaml page.
00981                     Log.Comment("Clear clipboard by copying text between TextBoxes on Xaml page...");
00982                     CopyPasteTextBox1.SetValue("Clear");
00983                     CopyPasteTextBox1.SetFocus();
00984                     Wait.ForIdle();
00985                     Verify.IsTrue(CopyPasteTextBox1.HasKeyboardFocus);
00986                     DoSelectAllByKeyboard();
00987                     CopySelected();
00988                     CopyPasteTextBox2.SetFocus();
00989                     Wait.ForIdle();
00990                     Verify.IsTrue(CopyPasteTextBox2.HasKeyboardFocus);
00991                     DoSelectAllByKeyboard();
00992                     PasteClipboard();
00993                     clearClipboardWaiter.Wait();
00994                 }
00995
00996                 // Selecting html content from step 1 and copying out of webview for verification.
00997                 SetWebViewElementFocus("w2", 2);
00998                 using (var pasteTestWaiter = new ValueChangedEventWaiter(CopyPasteTextBox2, "PasteTest"))
00999                 {
01000                     Log.Comment("Selecting html content from step 1 and copying out of webview for verification...");
01001                     DoSelectAllByKeyboard();
01002                     CopySelected();
01003                     CopyPasteTextBox2.SetFocus();
01004                     DoSelectAllByKeyboard();
01005                     PasteClipboard();
01006                     pasteTestWaiter.Wait();
01007                 }
01008
01009                 // Inject new text into html textbox and copy out to verify copy from webview.
01010                 SetWebViewElementFocus("w2", 2);
01011                 using (var copyTestWaiter = new ValueChangedEventWaiter(CopyPasteTextBox1, "CopyTest"))
01012                 {
01013                     Log.Comment("Inject new text into html textbox and copy out to verify copy from webview...");
01014                     TextInput.SendText("CopyTest");
01015                     DoSelectAllByKeyboard();
01016                     CopySelected();
01017                     CopyPasteTextBox1.SetFocus();
01018                     DoSelectAllByKeyboard();
01019                     PasteClipboard();
01020                     copyTestWaiter.Wait();
01021                 }
01022
01023                 CompleteTestAndWaitForResult("CopyPasteTest");
01024             }
01025         }
01026
01027         [TestMethod]
01028         [TestProperty("TestSuite", "B")]
01029         public void DragDropIntoWebView2Test()
01030         {
01031             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01032             {
01033                 ChooseTest("DragDropIntoWebView2Test");
01034
01035                 var wv2 = FindElement.ById("MyWebView2");
01036                 Rectangle wv2_bounds = wv2.BoundingRectangle;
01037                 Log.Comment("[MyWebView2] Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", wv2_bounds.X, wv2_bounds.Y, wv2_bounds.Width, wv2_bounds.Height);
01038
01039                 // Drag & Drop Source - TextBlock with AllowDrop set
01040                 var draggableTextTextBlock = new Edit(FindElement.ById("DraggableTextTextBlock"));
01041                 var allowDropCheckBox = new CheckBox(FindElement.ById("AllowDropCheckbox"));
01042                 allowDropCheckBox.Check();
01043
01044                 // Drag & Drop Target - HTML Input/Text control 'w2'
01045                 var miscTextBox = new Edit(FindElement.ById("MiscTextBox"));
01046                 WaitForTextBoxValue(miscTextBox, string.Empty, false /* match = false for not match */);
01047                 string wv2CenterFullString = miscTextBox.Value;
01048                 Verify.IsTrue(wv2CenterFullString.StartsWith("w2 CenterPoint:"), "w2 Center information is available");
01049
01050                 // Read center point of Input control reported by webpage (expected format: "w2 CenterPoint: (CenterX,CenterY)")
01051                 string[] w2_xy = ((wv2CenterFullString.Split('(')[1]).Split(')')[0]).Split(',');
01052                 int w2_centerX = int.Parse(w2_xy[0]);
01053                 int w2_centerY = int.Parse(w2_xy[1]);
01054                 Log.Comment("w2: CenterX=" + w2_centerX + ", CenterY=" + w2_centerY);
01055
01056                 // Final target offset computed by adjusting w2 CenterPoint from WV2 center to it's top/left corner
01057                 int w2_effectiveOffsetX = w2_centerX - wv2_bounds.Width / 2;
01058                 int w2_effectiveOffsetY = w2_centerY - wv2_bounds.Height / 2;
01059
01060                 Log.Comment("Drag and drop text from DraggableTextTextBlock (XAML) to w2 Input/text (Web)");
01061                 InputHelper.DragToTarget(draggableTextTextBlock, wv2, w2_effectiveOffsetX, w2_effectiveOffsetY);
01062                 Log.Comment("Done with drag and drop");
01063
01064                 CompleteTestAndWaitForWebMessageResult("DragDropIntoWebView2Test");
01065             }
01066         }
01067
01068         [TestMethod]
01069         [TestProperty("TestSuite", "B")]
01070         public void BasicKeyboardTest()
01071         {
01072             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01073             {
01074                 ChooseTest("BasicKeyboardTest");
01075
01076                 var CopyPasteTextBox2 = new Edit(FindElement.ById("CopyPasteTextBox2"));
01077                 // Result should be "Hello 123 World" via:
01078                 // Write Hello Wor after navigating to textbox in webview.
01079                 Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
01080                 x1.SetFocus();
01081                 Wait.ForIdle();
01082                 Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
01083
01084                 Log.Comment("Tab to w1...");
01085                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
01086                 WaitForFocus("w1");
01087
01088                 Log.Comment("Inject 'Hello Wor'...");
01089                 TextInput.SendText("Hello Wor");
01090
01091                 Log.Comment("Inject left arrow three times...");
01092                 KeyboardHelper.PressKey(Key.Left, ModifierKey.None, 1, true);
01093                 KeyboardHelper.PressKey(Key.Left, ModifierKey.None, 1, true);
01094                 KeyboardHelper.PressKey(Key.Left, ModifierKey.None, 1, true);
01095
01096                 Log.Comment("Inject '123 '...");
01097                 TextInput.SendText("123 ");
01098
01099                 Log.Comment("Inject right arrow three times...");
01100                 KeyboardHelper.PressKey(Key.Right, ModifierKey.None, 1, true);
01101                 KeyboardHelper.PressKey(Key.Right, ModifierKey.None, 1, true);
01102                 KeyboardHelper.PressKey(Key.Right, ModifierKey.None, 1, true);
01103
01104                 Log.Comment("Inject 'ld'...");
01105                 TextInput.SendText("ld");
01106
01107                 Log.Comment("Test simultaneous keyboard inputs by injecting shift+left twice...");
01108                 KeyboardHelper.PressKey(Key.Left, ModifierKey.Shift, 1, true);
01109                 KeyboardHelper.PressKey(Key.Left, ModifierKey.Shift, 1, true);
01110                 TextInput.SendText("m");
01111
01112                 // Copy out to PasteBox1 for verification.
01113                 DoSelectAllByKeyboard();
01114                 CopySelected();
01115                 CopyPasteTextBox2.SetFocus();
01116                 PasteClipboard();
01117
01118                 // On app side, validate pasted text
01119
01120                 CompleteTestAndWaitForResult("BasicKeyboardTest");
01121             }
01122         }
01123
01124         [TestMethod]
01125         [TestProperty("TestSuite", "B")]
01126         public void WebMessageReceivedTest()
01127         {
01128             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01129             {
01130                 ChooseTest("WebMessageReceivedTest");
01131
01132                 // Tab to button
01133                 Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
01134                 x1.SetFocus();
01135                 Wait.ForIdle();
01136                 Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
01137                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
01138                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
01139                 WaitForFocus("b1");
01140
01141                 // Trigger WebMessage from button press.
01142                 KeyboardHelper.PressKey(Key.Enter);
01143
01144                 WaitForWebMessageResult("WebMessageReceivedTest");
01145             }
01146         }
01147
01148         [TestMethod]
01149         [TestProperty("TestSuite", "B")]
01150         public void MouseCaptureTest()
01151         {
01152             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01153             {
01154                 ChooseTest("MouseCaptureTest");
01155
01156                 var CopyPasteTextBox2 = new Edit(FindElement.ById("CopyPasteTextBox2"));
01157                 Rectangle bounds = FindElement.ById("MyWebView2").BoundingRectangle;
01158                 // Offsets map pointer to the start of the textbox
01159                 const int w2_offsetX = 30;
01160                 const int w2_offsetY = 60;
01161
01162                 // Inject text into text box.
01163                 Button x1 = new Button(FindElement.ById("TabStopButton1")); // Xaml TabStop 1
01164                 x1.SetFocus();
01165                 Wait.ForIdle();
01166                 Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
01167                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
01168                 WaitForFocus("w1");
01169
01170                 TextInput.SendText("MouseCaptureResult");
01171
01172                 // Select text with mouse left-click, drag to outside of wv2, then release
01173                 var startPoint = new Point(bounds.X + w2_offsetX, bounds.Y + w2_offsetY);
01174                 var outsidePoint = new Point(bounds.X + w2_offsetX + bounds.Width, bounds.Y + w2_offsetY);
01175
01176                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01177                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01178                 PointerInput.Move(startPoint);
01179
01180                 // Click once in edit box - this helps selection work in MITA, but is not necessary in manual testing
01181                 PointerInput.Press(PointerButtons.Primary);
01182                 PointerInput.Release(PointerButtons.Primary);
01183
01184                 PointerInput.Press(PointerButtons.Primary);
01185                 PointerInput.Move(outsidePoint);
01186                 PointerInput.Release(PointerButtons.Primary);
01187
01188                 // Move mouse back across text
01189                 // If the WebView did not correctly handle captured mouse input then the text will be deselected
01190                 // due to the WebView still thinking that the mouse's left-button is pressed.
01191                 PointerInput.Move(startPoint);
01192
01193                 using (var pasteTestWaiter = new ValueChangedEventWaiter(CopyPasteTextBox2, "MouseCaptureResult"))
01194                 {
01195                     CopySelected();
01196                     CopyPasteTextBox2.SetFocus();
01197                     DoSelectAllByKeyboard();
01198                     PasteClipboard();
01199                     pasteTestWaiter.Wait();
01200                 }
01201
01202                 CompleteTestAndWaitForResult("MouseCaptureTest");
01203             }
01204         }
01205
01206         [TestMethod]
01207         [TestProperty("TestSuite", "B")]
01208         public void ReloadTest()
01209         {
01210             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01211             {
01212                 ChooseTest("ReloadTest");
01213                 CompleteTestAndWaitForResult("ReloadTest");
01214             }
01215         }
01216
01217         [TestMethod]
01218         [TestProperty("TestSuite", "B")]
01219         public void NavigateToStringTest()
01220         {
01221             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01222             {
01223                 ChooseTest("NavigateToStringTest");
01224                 CompleteTestAndWaitForResult("NavigateToStringTest");
01225             }
01226         }
01227
01228         // A textblock is bound to the webview's Source property with TwoWay binding and is
01229         // validated as follows:
01230         // Initial page is loaded, the uri is copied from the textblock and modified in a textbox which on
01231         // Enter-pressed updates the textBlock/Source value. This should cause the webview to load the
01232         // new value in the textBlock, demonstrating binding from textBlock text->Source. The success of this is
01233         // validated by invoking the 'navigateToPageWithText' script on the currently loaded page,
01234         // if 'SimplePage.html' is not loaded this will fail. If 'navigateToPageWithText' succeeds,
01235         // the webview should load 'SimplePageWithText.html' and the uri should be reflected in the
01236         // bound textbox, demonstrating binding from Source->textBlock text.
01237         [TestMethod]
01238         [TestProperty("TestSuite", "B")]
01239         public void SourceBindingTest()
01240         {
01241             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01242             {
01243                 ChooseTest("SourceBindingTest");
01244
01245                 var uriTextBox = new Edit(FindElement.ById("UriTextBox"));
01246                 var actualUriTextBlock = new Edit(FindElement.ById("ActualUriTextBlock"));
01247
01248                 actualUriTextBlock.SetFocus();
01249                 DoSelectAllByKeyboard();
01250                 CopySelected();
01251                 uriTextBox.SetFocus();
01252                 DoSelectAllByKeyboard();
01253                 PasteClipboard();
01254
01255                 // Modify local resource Uri to load SimplePage.html
01256                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
01257                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift);
01258                 for (int tab = 0; tab < 3; tab++)
01259                 {
01260                     KeyboardHelper.PressKey(Key.Left);
01261                 }
01262                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift);
01263                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
01264                 TextInput.SendText("SimplePage.html");
01265
01266                 KeyboardHelper.PressKey(Key.Enter);
01267
01268                 CompleteTestAndWaitForResult("SourceBindingTest");
01269             }
01270         }
01271
01272         // CanGoBack and CanGoForward properties and used in implementation of methods, tested by proxy.
01273         [TestMethod]
01274         [TestProperty("TestSuite", "B")]
01275         public void GoBackAndForwardTest()
01276         {
01277             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01278             {
01279                 ChooseTest("GoBackAndForwardTest");
01280                 CompleteTestAndWaitForResult("GoBackAndForwardTest");
01281             }
01282         }
01283
01284         [TestMethod]
01285         [TestProperty("TestSuite", "B")]
01286         public void NavigationStartingTest()
01287         {
01288             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01289             {
01290                 ChooseTest("NavigationStartingTest");
01291                 CompleteTestAndWaitForResult("NavigationStartingTest");
01292             }
01293         }
01294
01295         [TestMethod]
01296         [TestProperty("TestSuite", "B")]
01297         public void NavigationStartingInvalidTest()
01298         {
01299             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01300             {
01301                 ChooseTest("NavigationStartingInvalidTest");
01302                 CompleteTestAndWaitForResult("NavigationStartingInvalidTest");
01303             }
01304         }
01305
01306         [TestMethod]
01307         [TestProperty("TestSuite", "B")]
01308         public void ResizeTest()
01309         {
01310             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01311             {
01312                 ChooseTest("ResizeTest");
01313                 CompleteTestAndWaitForWebMessageResult("ResizeTest");
01314             }
01315         }
01316
01317         [TestMethod]
01318         [TestProperty("Ignore", "True")] // Task 31708332: WebView2 Touch Tests still failing on Helix
01319         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01320         [TestProperty("TestSuite", "B")]
01321         public void BasicTapTouchTest()
01322         {
01323             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01324             {
01325                 ChooseTest("BasicTapTouchTest");
01326
01327                 var webview = FindElement.ById("MyWebView2");
01328                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01329                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01330                 /*
01331                 InputHelper.Tap(webview);
01332                 */
01333                 Rectangle bounds = webview.BoundingRectangle;
01334                 webview.Tap(bounds.Width / 2, bounds.Height / 2);
01335                 WaitForWebMessageResult("BasicTapTouchTest");
01336             }
01337         }
01338
01339         [TestMethod]
01340         [TestProperty("Ignore", "True")] // Task 31708332: WebView2 Touch Tests still failing on Helix
01341         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01342         [TestProperty("TestSuite", "B")]
01343         public void BasicFlingTouchTest()
01344         {
01345             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01346             {
01347                 ChooseTest("BasicFlingTouchTest");
01348
01349                 var webview = FindElement.ById("MyWebView2");
01350
01351                 // Use tap to initialize status text box so that subsequent waiter isn't triggered by flick's initial tap.
01352                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01353                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01354                 /*
01355                 InputHelper.Tap(webview);
01356                 */
01357                 Rectangle bounds = webview.BoundingRectangle;
01358                 webview.Tap(bounds.Width / 2, bounds.Height / 2);
01359
01360                 // Basic Flick Injection to the West (causing scroll to the East) to the end of the page.
01361                 /*
01362                 InputHelper.Flick(webview, 250, Direction.West);
01363                 */
01364                 Point center = new Point(bounds.Width / 2, bounds.Height / 2);
01365                 InputHelper.Flick(webview, center, 300, Direction.West);
01366                 WaitForWebMessageResult("BasicFlingTouchTest");
01367             }
01368         }
01369
01370         [TestMethod]
01371         [TestProperty("Ignore", "True")] // Task 25510116: WebView2Tests.BasicStretchTouchTest is failing on Helix
01372         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01373         [TestProperty("TestSuite", "B")]
01374         public void BasicStretchTouchTest()
01375         {
01376             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01377             {
01378                 ChooseTest("BasicStretchTouchTest");
01379
01380                 var webview = FindElement.ById("MyWebView2");
01381
01382                 // Stretch webview by 200 pixels with one finger stationary.
01383                 InputHelper.Stretch(webview, 200, Direction.East, true);
01384                 Log.Comment("Waiting for webview stretch completion");
01385                 InputHelper.Tap(webview);
01386
01387                 WaitForWebMessageResult("BasicStretchTouchTest");
01388             }
01389         }
01390
01391         [TestMethod]
01392         [TestProperty("TestSuite", "C")]
01393         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01394         public void BasicPanTouchTest()
01395         {
01396             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01397             {
01398                 ChooseTest("BasicPanTouchTest");
01399
01400                 var webview = FindElement.ById("MyWebView2");
01401                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01402                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01403                 /*
01404                 InputHelper.Pan(webview, 250, Direction.West);
01405                 */
01406                 Rectangle bounds = webview.BoundingRectangle;
01407                 Point center = new Point(bounds.Width / 2 + bounds.X, bounds.Height / 2 + bounds.Y);
01408                 InputHelper.Pan(webview, center, 250, Direction.West);
01409
01410                 WaitForWebMessageResult("BasicPanTouchTest");
01411             }
01412         }
01413
01414         [TestMethod]
01415         [TestProperty("TestSuite", "C")]
01416         [TestProperty("Ignore", "True")] // Task 31708332: WebView2 Touch Tests still failing on Helix
01417         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
01418         public void BasicLongPressTouchTest()
01419         {
01420             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01421             {
01422                 ChooseTest("BasicLongPressTouchTest");
01423
01424                 var webview = FindElement.ById("MyWebView2");
01425                 // Long Press for 2 seconds, triggering commandView.
01426                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01427                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01428                 /*
01429                 InputHelper.TapAndHold(webview, 2000);
01430                 */
01431                 Rectangle bounds = webview.BoundingRectangle;
01432                 InputHelper.TapAndHold(webview, bounds.Width/2, bounds.Height/2, 2000);
01433
01434                 WaitForWebMessageResult("BasicLongPressTouchTest");
01435             }
01436         }
01437
01438         [TestMethod]
01439         [TestProperty("TestSuite", "C")]
01440         public void ScaledTouchTest()
01441         {
01442             using (IDisposable page1 = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01443             {
01444                 ChooseTest("ScaledTouchTest");
01445
01446                 var webview = FindElement.ById("MyWebView2");
01447                 // Get the bounds of the webview without any scaling
01448                 Rectangle preScaleBounds = webview.BoundingRectangle;
01449
01450                 // Scale the webview up by 1.2 in both directions and get the new bounds
01451                 CompleteTestAndWaitForResult("ScaledTouchTest");
01452                 Rectangle postScaleBounds = webview.BoundingRectangle;
01453                 int halfDelta = (postScaleBounds.Width - preScaleBounds.Width) / 2;
01454
01455                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01456                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01457                 /*
01458                 // Test tap injection outside of bounds of unscaled button.
01459                 InputHelper.Tap(webview, preScaleBounds.Width + halfDelta, preScaleBounds.Height / 2);
01460                 */
01461                 webview.Tap(preScaleBounds.Width + halfDelta, preScaleBounds.Height / 2);
01462
01463                 WaitForWebMessageResult("ScaledTouchTest");
01464             }
01465         }
01466
01467         [TestMethod]
01468         [TestProperty("TestSuite", "C")]
01469         public void MoveTest()
01470         {
01471             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01472             {
01473                 ChooseTest("MoveTest");
01474                 CompleteTestAndWaitForResult("MoveTest");
01475             }
01476         }
01477
01478         [TestMethod]
01479         [TestProperty("TestSuite", "C")]
01480         public void ReparentElementTest()
01481         {
01482             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01483             {
01484                 ChooseTest("ReparentElementTest");
01485                 Wait.ForMilliseconds(100); // The rendering verifier needs extra time for the webview to finish rendering
01486
01487                 // TODO_WebView2: Check that the webview is not visible when it is out of the tree.
01488
01489                 CompleteTestAndWaitForResult("ReparentElementTest");
01490
01491                 // Ensure that the moved WebView is still visible
01492                 WebView2Temporary.WebView2RenderingVerifier.VerifyInstances("ReparentElementTest");
01493             }
01494         }
01495
01496         [TestMethod]
01497         [TestProperty("TestSuite", "C")]
01498         public void SourceBeforeLoadTest()
01499         {
01500             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01501             {
01502                 ChooseTest("SourceBeforeLoadTest");
01503                 CompleteTestAndWaitForResult("SourceBeforeLoadTest");
01504             }
01505         }
01506
01507         [TestMethod]
01508         [TestProperty("TestSuite", "C")]
01509         public void VisibilityHiddenTest()
01510         {
01511             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01512             {
01513                 ChooseTest("VisibilityHiddenTest");
01514                 CompleteTestAndWaitForWebMessageResult("VisibilityHiddenTest");
01515             }
01516         }
01517
01518         [TestMethod]
01519         [TestProperty("TestSuite", "C")]
01520         public void VisibilityTurnedOnTest()
01521         {
01522             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01523             {
01524                 ChooseTest("VisibilityTurnedOnTest");
01525
01526                 // If we got a visibility message when the web view first appeared, make sure we get it again
01527                 var check = new CheckBox(FindElement.ById("MessageReceived"));
01528                 check.Uncheck();
01529
01530                 CompleteTestAndWaitForWebMessageResult("VisibilityTurnedOnTest");
01531             }
01532         }
01533
01534         [TestMethod]
01535         [TestProperty("TestSuite", "C")]
01536         public void ParentVisibilityHiddenTest()
01537         {
01538             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01539             {
01540                 ChooseTest("ParentVisibilityHiddenTest");
01541                 CompleteTestAndWaitForWebMessageResult("ParentVisibilityHiddenTest");
01542             }
01543         }
01544
01545         [TestMethod]
01546         [TestProperty("TestSuite", "C")]
01547         public void ParentVisibilityTurnedOnTest()
01548         {
01549             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01550             {
01551                 ChooseTest("ParentVisibilityTurnedOnTest");
01552
01553                 // If we got a visibility message when the web view first appeared, make sure we get it again
01554                 var check = new CheckBox(FindElement.ById("MessageReceived"));
01555                 check.Uncheck();
01556
01557                 CompleteTestAndWaitForWebMessageResult("ParentVisibilityTurnedOnTest");
01558             }
01559         }
01560
01561         [TestMethod]
01562         [TestProperty("Ignore", "True")] // TODO_WebView2: Enable when we can change DPI for a test
01563         [TestProperty("TestSuite", "C")]
01564         public void SpecificTouchTest()
01565         {
01566             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01567             {
01568                 ChooseTest("SpecificTouchTest");
01569
01570                 var webview = FindElement.ById("MyWebView2");
01571                 var status2 = new Edit(FindElement.ById("Status2"));
01572
01573                 // Click the button in the middle of the webview. It should be square 35.
01574                 InputHelper.MoveMouse(webview, 0, 0);
01575                 Log.Comment("Do left click...");
01576                 PointerInput.Press(PointerButtons.Primary);
01577                 PointerInput.Release(PointerButtons.Primary);
01578                 Log.Comment("Done clicking");
01579                 WaitForWebMessageResult("SpecificTouchTest");
01580                 var clickResult = status2.GetText();
01581
01582                 // Tap that same button
01583                 Log.Comment("Do tap...");
01584                 InputHelper.Tap(webview);
01585                 Log.Comment("Done tapping");
01586                 WaitForWebMessageResult("SpecificTouchTest");
01587                 var tapResult = status2.GetText();
01588
01589                 Verify.AreEqual(clickResult, tapResult);
01590             }
01591         }
01592
01593         [TestMethod]
01594         [TestProperty("TestSuite", "C")]
01595         public void QueryCoreWebView2BasicTest()
01596         {
01597             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01598             {
01599                 ChooseTest("QueryCoreWebView2BasicTest", false /* waitForLoadCompleted */);
01600                 CompleteTestAndWaitForResult("QueryCoreWebView2BasicTest");
01601             }
01602         }
01603
01604         [TestMethod]
01605         [TestProperty("TestSuite", "C")]
01606         public void CoreWebView2InitializedTest()
01607         {
01608             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01609             {
01610                 ChooseTest("CoreWebView2InitializedTest", false /* waitForLoadCompleted */);
01611                 CompleteTestAndWaitForResult("CoreWebView2InitializedTest");
01612             }
01613         }
01614
01615         [TestMethod]
01616         [TestProperty("TestSuite", "C")]
01617         public void CoreWebView2Initialized_FailedTest()
01618         {
01619             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01620             {
01621                 ChooseTest("CoreWebView2Initialized_FailedTest", false /* waitForLoadCompleted */);
01622
01623                 // Imitate Edge not being installed by setting a reg key to point Edge at a location where the WebView2 runtime does not exist
01624                 // https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.865-prerelease#createcorewebview2environmentwithoptions
01625                 var browserExecutableKey = GetBrowserExecutableFolderKey();
01626                 Log.Comment("Setting key for {0}", TestApplicationInfo.MUXControlsTestApp.ProcessName);
01627                 browserExecutableKey.SetValue(TestApplicationInfo.MUXControlsTestApp.ProcessName, "c:\\badpath");
01628
01629                 try
01630                 {
01631                     CompleteTestAndWaitForResult("CoreWebView2Initialized_FailedTest");
01632                 }
01633                 finally
01634                 {
01635                     browserExecutableKey.DeleteValue(TestApplicationInfo.MUXControlsTestApp.ProcessName);
01636                     Log.Comment("Removed key for {0}", TestApplicationInfo.MUXControlsTestApp.ProcessName);
01637                 }
01638             }
01639         }
01640
01641         private static Win32.RegistryKey GetBrowserExecutableFolderKey()
01642         {
01643             return Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@"Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", true);
01644         }
01645
01646         [TestMethod]
01647         [TestProperty("TestSuite", "C")]
01648         [TestProperty("Ignore", "True")] // Disabled due to 37434508
01649         public void WebView2CleanedUpTest()
01650         {
01651             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01652             {
01653                 // Go back a page (WebView2 should be cleaned up)
01654                 Log.Comment("Go back a page");
01655                 Button backButton = new Button(FindElement.ByNameOrId("__BackButton"));
01656                 backButton.Invoke();
01657                 Wait.ForMilliseconds(1000);
01658
01659                 // Go forward again to the test page
01660                 // Clear element cache so we build a new one for the current page
01661                 Log.Comment("Return to WebView2 test page");
01662                 ElementCache.Clear();
01663                 Button forwardButton = new Button(FindElement.ByNameOrId("navigateToBasicWebView2"));
01664                 forwardButton.Invoke();
01665                 Wait.ForMilliseconds(1000);
01666
01667                 Log.Comment("Find Minimize and Maximize buttons");
01668                 ElementCache.Clear();
01669                 var minimizeButton = new Button(FindElement.ByNameOrId("Minimize"));
01670                 var maximizeButton = new Button(FindElement.ByNameOrId("Restore"));
01671
01672                 // Choose test without any extra waiting. We want to minimize and maximize the app
01673                 // while the page is loading
01674                 string comboBoxName = "TestNameComboBox";
01675                 Log.Comment("Retrieve ComboBox item with name '{0}'.", comboBoxName);
01676                 ComboBox comboBox = new ComboBox(FindElement.ById(comboBoxName));
01677                 comboBox.SelectItemByName("WebView2CleanedUpTest");
01678
01679                 // Minimize and restore the app to trigger the XamlRootChanged event. We are ensuring
01680                 // that we only handle the event when the WebView2 (and its XamlRoot) are valid.
01681                 // Otherwise, a bad pointer to an invalid WebView2 will crash the app
01682                 minimizeButton.Invoke();
01683                 Log.Comment("Invoked minimize button");
01684                 Wait.ForMilliseconds(1000);
01685                 maximizeButton.Invoke();
01686                 Log.Comment("Invoked maximize button");
01687                 Wait.ForMilliseconds(1000);
01688             }
01689         }
01690
01691         [TestMethod]
01692         [TestProperty("TestSuite", "D")]
01693         public void WindowHiddenTest()
01694         {
01695             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01696             {
01697                 ChooseTest("WindowHiddenTest");
01698
01699                 var minimizeButton = new Button(FindElement.ByNameOrId("Minimize"));
01700                 var maximizeButton = new Button(FindElement.ByNameOrId("Restore"));
01701                 // If we got a visibility message when the web view first appeared, make sure we get it again
01702                 var check = new CheckBox(FindElement.ById("MessageReceived"));
01703                 check.Uncheck();
01704
01705                 // Minimize and restore the app to trigger the XamlRootChanged event. The CoreWebView2
01706                 // should be hidden and unhidden as well, each of which will send a web message. We
01707                 // then listen for the second message.
01708                 Log.Comment("Invoke minimize button");
01709                 minimizeButton.Invoke();
01710                 Wait.ForMilliseconds(1000);
01711
01712                 Log.Comment("Invoke maximize button");
01713                 maximizeButton.Invoke();
01714                 Wait.ForMilliseconds(1000);
01715
01716                 WaitForWebMessageResult("WindowHiddenTest");
01717             }
01718         }
01719
01720         [TestMethod]
01721         [TestProperty("TestSuite", "D")]
01722         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
01723         public void WindowlessPopupTest()
01724         {
01725             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01726             {
01727                 // Insert popup with empty webview
01728                 ChooseTest("WindowlessPopupTest", false /* waitForLoadCompleted */);
01729
01730                 // Navigates popup to a page
01731                 CompleteTestAndWaitForResult("WindowlessPopupTest");
01732
01733                 // Click button in webview to verify interaction works
01734                 var webview = FindElement.ById("popWebView2");
01735                 Rectangle bounds = webview.BoundingRectangle;
01736                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
01737                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01738                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01739                 /*
01740                 var point = webview.GetClickablePoint();
01741                 Log.Comment("ClickablePoint = X:{0}, Y:{1}", point.X, point.Y);
01742                 // Move mouse to top left coordinate (location of web button) relative from the center of webview
01743                 Log.Comment("MoveMouse to offset = X:{0}, Y:{1}", -bounds.Width / 2 + 20, -bounds.Height / 2 + 20);
01744                 InputHelper.MoveMouse(webview,
01745                     -bounds.Width / 2 + 20, -bounds.Height / 2 + 20);
01746                 */
01747                 var point = new Point(bounds.X + 20, bounds.Y + 20);
01748                 Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
01749                 PointerInput.Move(point);
01750                 PointerInput.Press(PointerButtons.Primary);
01751                 PointerInput.Release(PointerButtons.Primary);
01752                 Wait.ForIdle();
01753
01754                 WaitForWebMessageResult("WindowlessPopupTest");
01755             }
01756         }
01757
01758         [TestMethod]
01759         [TestProperty("TestSuite", "D")]
01760         public void PointerReleaseWithoutPressTest()
01761         {
01762             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01763             {
01764                 ChooseTest("PointerReleaseWithoutPressTest");
01765
01766                 var webview = FindElement.ById("MyWebView2");
01767                 Rectangle bounds = webview.BoundingRectangle;
01768
01769                 // First, click outside the webview. Then with the mouse button still pressed,
01770                 // drag into the webview and release the mouse button. This should neither
01771                 // send a message to CoreWebView2, nor should it crash the app.
01772
01773                 var point = new Point(bounds.X + bounds.Width + 20, bounds.Y + 20);
01774                 PointerInput.Move(point);
01775                 PointerInput.Press(PointerButtons.Primary);
01776                 point = new Point(bounds.X + bounds.Width - 20, bounds.Y + 20);
01777                 PointerInput.Move(point);
01778                 PointerInput.Release(PointerButtons.Primary);
01779
01780                 CompleteTestAndWaitForResult("PointerReleaseWithoutPressTest");
01781             }
01782         }
01783
01784         [TestMethod]
01785         [TestProperty("TestSuite", "D")]
01786         public void HostNameToFolderMappingTest()
01787         {
01788             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01789             {
01790                 ChooseTest("HostNameToFolderMappingTest");
01791
01792                 CompleteTestAndWaitForResult("HostNameToFolderMappingTest");
01793
01794                 var webview = FindElement.ById("MyWebView2");
01795                 Rectangle bounds = webview.BoundingRectangle;
01796                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
01797
01798                 var point = new Point(bounds.X + 20, bounds.Y + 20);
01799                 Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
01800                 PointerInput.Move(point);
01801
01802                 PointerButtons mouseButton = PointerButtons.Primary;
01803                 PointerInput.Press(mouseButton);
01804                 PointerInput.Release(mouseButton);
01805
01806                 WaitForWebMessageResult("HostNameToFolderMappingTest");
01807             }
01808         }
01809
01810         [TestMethod]
01811         [TestProperty("TestSuite", "D")]
01812         public void NavigateToVideoTest()
01813         {
01814             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01815             {
01816                 ChooseTest("NavigateToVideoTest");
01817                 CompleteTestAndWaitForResult("NavigateToVideoTest");
01818             }
01819         }
01820
01821         [TestMethod]
01822         [TestProperty("TestSuite", "D")]
01823         public void NavigateToLocalImageTest()
01824         {
01825             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01826             {
01827                 ChooseTest("NavigateToLocalImageTest");
01828                 CompleteTestAndWaitForWebMessageResult("NavigateToLocalImageTest");
01829             }
01830         }
01831
01832         [TestMethod]
01833         [TestProperty("Ignore", "True")] // TODO_WebView2: Enable when we can change DPI for a test
01834         [TestProperty("TestSuite", "D")]
01835         public void CloseThenDPIChangeTest()
01836         {
01837             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01838             {
01839                 ChooseTest("CloseThenDPIChangeTest");
01840                 // Close the webview
01841                 CompleteTestAndWaitForResult("CloseThenDPIChangeTest");
01842                 // TODO: somehow change the DPI and ensure there is no crash
01843                 // This test can be run manually by choosing the test, clicking the "Complete Test" button,
01844                 // and then moving the application window to a monitor with a different DPI
01845             }
01846         }
01847
01848         [TestMethod]
01849         [TestProperty("TestSuite", "D")]
01850         [TestProperty("Ignore", "True")] // 32510465
01851         public void AddHostObjectToScriptTest()
01852         {
01853             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01854             {
01855                 ChooseTest("AddHostObjectToScriptTest");
01856                 CompleteTestAndWaitForWebMessageResult("AddHostObjectToScriptTest");
01857             }
01858         }
01859
01860         [TestMethod]
01861         [TestProperty("TestSuite", "D")]
01862         public void UserAgentTest()
01863         {
01864             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01865             {
01866                 ChooseTest("UserAgentTest");
01867                 CompleteTestAndWaitForResult("UserAgentTest");
01868             }
01869         }
01870
01871         [TestMethod]
01872         [TestProperty("TestSuite", "D")]
01873         public void KeyboardAcceleratorTest()
01874         {
01875             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01876             {
01877                 ChooseTest("KeyboardAcceleratorTest");
01878                 // Type "t" in the textbox in the webview. This should NOT invoke the F5 accelerator key handler in the app.
01879                 SetWebViewElementFocus("w1", 1);
01880                 KeyboardHelper.PressKey(Key.t);
01881                 CompleteTestAndWaitForResult("KeyboardAcceleratorTest");
01882             }
01883         }
01884
01885         [TestMethod]
01886         [TestProperty("TestSuite", "D")]
01887         public static void AccessKeyTest()
01888         {
01889             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01890             {
01891                 ChooseTest("AccessKeyTest");
01892
01893                 // Set focus somewhere besides the webview
01894                 Button x2 = new Button(FindElement.ById("TabStopButton2"));
01895                 x2.SetFocus();
01896                 Wait.ForIdle();
01897
01898                 // Bring up access keys
01899                 Keyboard keyboard = Keyboard.Instance;
01900                 keyboard.SendText("%"); // ALT
01901                 Wait.ForIdle();
01902
01903                 string keyTipText = "W";
01904                 var keytip = TryFindElement.ByName(keyTipText);
01905                 Verify.IsNotNull(keytip, "keytip");
01906
01907                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("MyWebView2"))
01908                 {
01909                     // Invoke the AccessKey
01910                     keyboard.SendText(keyTipText);
01911                     xamlFocusWaiter.Wait();
01912                     Log.Comment("Focus is on " + UIObject.Focused);
01913                 }
01914
01915                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to text box
01916                 WaitForFocus("w1");
01917                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to input button
01918                 WaitForFocus("b1");
01919                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to dropdown
01920                 WaitForFocus("s1");
01921                 using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
01922                 {
01923                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true); // tab to tabStopButton2
01924                     xamlFocusWaiter.Wait();
01925                     Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
01926                 }
01927
01928                 CompleteTestAndWaitForResult("AccessKeyTest");
01929             }
01930         }
01931
01932         [TestMethod]
01933         [TestProperty("TestSuite", "D")]
01934         public void NonAsciiUriTest()
01935         {
01936             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01937             {
01938                 // Navigate to a uri with a non-ascii characters
01939                 ChooseTest("NonAsciiUriTest");
01940                 CompleteTestAndWaitForResult("NonAsciiUriTest");
01941
01942                 // At the end of the test, we should only have gotten one NavigationStarting message.
01943                 // All messages would have been printed to the MessageLog, so count the NavigationStarting
01944                 // messages there.
01945                 int count = 0;
01946                 var logBox = new Edit(FindElement.ById("MessageLog"));
01947                 var messageWords = logBox.GetText().Split(' ');
01948                 foreach (string word in messageWords)
01949                 {
01950                     if (word.Equals("NavigationStarting")) count++;
01951                 }
01952
01953                 Verify.AreEqual(count, 1);
01954             }
01955         }
01956
01957         [TestMethod]
01958         [TestProperty("TestSuite", "D")]
01959         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
01960         public void OffTreeWebViewInputTest()
01961         {
01962             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
01963             {
01964                 // Remove the existing webview that was already added to the xaml tree
01965                 ChooseTest("OffTreeWebViewInputTest", false /* waitForLoadCompleted */);
01966
01967                 // Create a new webview, and call EnsureCoreWebView2Async() on it without adding it to the tree.
01968                 // Then, add it to the tree so we can see it, and navigate
01969                 CompleteTestAndWaitForResult("OffTreeWebViewInputTest");
01970                 WaitForLoadCompleted();
01971
01972                 // Clear the cache so we can find the new webview
01973                 ElementCache.Clear();
01974                 var webview = FindElement.ById("MyWebView2");
01975
01976                 // Click in the webview, to ensure we can interact with it, and its HWNDs are parented correctly
01977                 Rectangle bounds = webview.BoundingRectangle;
01978                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
01979                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
01980                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
01981                 /*
01982                 var point = webview.GetClickablePoint();
01983                 Log.Comment("ClickablePoint = X:{0}, Y:{1}", point.X, point.Y);
01984                 // Move mouse to top left coordinate (location of web button) relative from the center of webview
01985                 InputHelper.MoveMouse(webview,
01986                     -bounds.Width/2 + 20, -bounds.Height/2 + 20);
01987                 */
01988                 var point = new Point(bounds.X + 20, bounds.Y + 20);
01989                 Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
01990                 PointerInput.Move(point);
01991
01992                 PointerInput.Press(PointerButtons.Primary);
01993                 PointerInput.Release(PointerButtons.Primary);
01994                 Wait.ForIdle();
01995
01996                 WaitForWebMessageResult("OffTreeWebViewInputTest");
01997             }
01998         }
01999
02000         [TestMethod]
02001         [TestProperty("TestSuite", "D")]
02002         [TestProperty("Ignore", "True")] // Bug 39699234: WebView2.HtmlDropdownTest fails after WinUI 2.8 port
02003         public void HtmlDropdownTest()
02004         {
02005             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
02006             {
02007                 ChooseTest("HtmlDropdownTest");
02008
02009                 // Click on the select (dropdown) element, which covers the center of the WebView2
02010                 var webview = FindElement.ById("MyWebView2");
02011                 Rectangle bounds = webview.BoundingRectangle;
02012                 // TODO_WebView2Input - Task 30555367 - Stack Overflow in WebView2 pointer tests when (MUXC) test infra calls WV2.GetClickablePoint()
02013                 //                      Workaround to avoid any calls to WebView2.GetClickablePoint
02014                 var point = new Point(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2);
02015                 Log.Comment("Move mouse to ({0}, {1})", bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2);
02016                 PointerInput.Move(point);
02017                 PointerInput.Press(PointerButtons.Primary);
02018                 PointerInput.Release(PointerButtons.Primary);
02019
02020                 var newPoint = new Point(point.X, bounds.Y + bounds.Height - 10);
02021                 Log.Comment("Move mouse to another dropdown option");
02022                 PointerInput.Move(newPoint);
02023                 PointerInput.Press(PointerButtons.Primary);
02024                 PointerInput.Release(PointerButtons.Primary);
02025
02026                 Verify.AreEqual(webview, UIObject.Focused);
02027                 Verify.IsTrue(webview.HasKeyboardFocus);
02028
02029                 CompleteTestAndWaitForResult("HtmlDropdownTest");
02030             }
02031         }
02032
02033         [TestMethod]
02034         [TestProperty("TestSuite", "D")]
02035         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
02036         public void HiddenThenVisibleTest()
02037         {
02038             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
02039             {
02040                 ChooseTest("HiddenThenVisibleTest");
02041                 CompleteTestAndWaitForResult("HiddenThenVisibleTest");
02042
02043                 // Clear the cache so we can find the new webview
02044                 ElementCache.Clear();
02045                 var webview = FindElement.ById("MyWebView2");
02046                 Verify.IsTrue(webview.IsOffscreen == false);
02047
02048                 // Click in the webview to ensure we can interact with it
02049                 Rectangle bounds = webview.BoundingRectangle;
02050                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
02051                 var point = new Point(bounds.X + 20, bounds.Y + 20);
02052                 Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
02053                 PointerInput.Move(point);
02054
02055                 PointerInput.Press(PointerButtons.Primary);
02056                 PointerInput.Release(PointerButtons.Primary);
02057                 Wait.ForIdle();
02058
02059                 WaitForWebMessageResult("HiddenThenVisibleTest");
02060             }
02061         }
02062
02063         [TestMethod]
02064         [TestProperty("TestSuite", "D")]
02065         [TestProperty("Ignore", "True")] // Disabled due to instability, re-enable with http://task.ms/45673900
02066         public void ParentHiddenThenVisibleTest()
02067         {
02068             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
02069             {
02070                 ChooseTest("ParentHiddenThenVisibleTest");
02071                 CompleteTestAndWaitForResult("ParentHiddenThenVisibleTest");
02072
02073                 // Clear the cache so we can find the new webview
02074                 ElementCache.Clear();
02075                 var webview = FindElement.ById("MyWebView2");
02076                 Verify.IsTrue(webview.IsOffscreen == false);
02077
02078                 // Click in the webview to ensure we can interact with it
02079                 Rectangle bounds = webview.BoundingRectangle;
02080                 Log.Comment("Bounds = X:{0}, Y:{1}, Width:{2}, Height:{3}", bounds.X, bounds.Y, bounds.Width, bounds.Height);
02081                 var point = new Point(bounds.X + 20, bounds.Y + 20);
02082                 Log.Comment("Move mouse to ({0}, {1})", bounds.X + 20, bounds.Y + 20);
02083                 PointerInput.Move(point);
02084
02085                 PointerInput.Press(PointerButtons.Primary);
02086                 PointerInput.Release(PointerButtons.Primary);
02087                 Wait.ForIdle();
02088
02089                 WaitForWebMessageResult("ParentHiddenThenVisibleTest");
02090             }
02091         }
02092
02093         [TestMethod]
02094         [TestProperty("TestSuite", "D")]
02095         public void LifetimeTabTest()
02096         {
02097             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
02098             {
02099                 // Part 1: Tab with no core webview
02100
02101                 Log.Comment("Part 1: Tab with no core webview");
02102                 TabTwicePastWebView2();
02103
02104                 // Part 2: Tab with core webview, ensured but not navigated
02105
02106                 /*  TODO investigate why this needs three tabs sometimes
02107                 Log.Comment("Part 2: Tab with core webview, not navigated");
02108                 Button ensureButton = new Button(FindElement.ById("EnsureCWV2Button"));
02109                 ensureButton.Invoke();
02110                 WaitForEnsureCompleted();
02111                 TabTwicePastWebView2();
02112                 */
02113
02114                 // Part 3: Tab with closed core webview
02115
02116                 Log.Comment("Part 3: Tab with closed core webview");
02117                 ChooseTest("LifetimeTabTest" /* waitForLoadCompleted */);
02118                 CompleteTestAndWaitForResult("LifetimeTabTest");  // Closes the CoreWebView2
02119                 TabTwicePastWebView2();
02120             }
02121         }
02122
02123         private static void TabTwicePastWebView2()
02124         {
02125             Button x1 = new Button(FindElement.ById("TabStopButton1"));     // Xaml TabStop 1
02126             Button x2 = new Button(FindElement.ById("TabStopButton2"));     // Xaml TabStop 2
02127
02128             Log.Comment("Focus on x1");
02129             x1.SetFocus();
02130             Wait.ForIdle();
02131             Verify.IsTrue(x1.HasKeyboardFocus, "TabStopButton1 has keyboard focus");
02132
02133             Log.Comment("Tab x1 -> webview -> x2");
02134             using (var xamlFocusWaiter = new FocusAcquiredWaiter("TabStopButton2"))
02135             {
02136                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
02137                 KeyboardHelper.PressKey(Key.Tab, ModifierKey.None, 1, true);
02138                 xamlFocusWaiter.Wait();
02139                 Log.Comment("Focus is on " + UIObject.Focused);
02140                 Verify.IsTrue(x2.HasKeyboardFocus, "TabStopButton2 has keyboard focus");
02141             }
02142         }
02143
02144         [TestMethod]
02145         [TestProperty("TestSuite", "D")]
02146         public void CustomConfiguration_BasicTest()
02147         {
02148             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
02149             {
02150                 // We have to load page in CompleteTest so that we can use a custom environment. Don't wait for the load here.
02151                 ChooseTest("CustomConfiguration_BasicTest", false /* waitForLoadCompleted */);
02152
02153                 CompleteTestAndWaitForResult("CustomConfiguration_BasicTest");
02154             }
02155         }
02156
02157         [TestMethod]
02158         [TestProperty("TestSuite", "D")]
02159         public void CustomConfiguration_EnsureAgainAfterDefaultTest()
02160         {
02161             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
02162             {
02163                 // We have to load page in CompleteTest so that we can use a custom environment. Don't wait for the load here.
02164                 ChooseTest("CustomConfiguration_EnsureAgainAfterDefaultTest");
02165
02166                 CompleteTestAndWaitForResult("CustomConfiguration_EnsureAgainAfterDefaultTest", true /* shouldDumpMessageLog */ );
02167             }
02168         }
02169
02170         [TestMethod]
02171         [TestProperty("TestSuite", "D")]
02172         public void CustomConfiguration_EnsureAgainAfterCustomTest()
02173         {
02174             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))
02175             {
02176                 // We have to load page in CompleteTest so that we can use a custom environment. Don't wait for the load here.
02177                 ChooseTest("CustomConfiguration_EnsureAgainAfterCustomTest", false /* waitForLoadCompleted */);
02178
02179                 CompleteTestAndWaitForResult("CustomConfiguration_EnsureAgainAfterCustomTest", true /* shouldDumpMessageLog */ );
02180             }
02181         }
02182
02183         private static void BeginSubTest(string testName, string testDescription)
02184         {
02185             Log.Comment(Environment.NewLine + testName + ": " + testDescription);
02186
02187             Log.Comment("Resetting event and exception counts...");
02188             Button resetCounts_Button = new Button(FindElement.ById("ResetCounts_Button"));
02189             resetCounts_Button.Invoke();
02190             Wait.ForIdle();
02191         }
02192
02193         private static void EndSubTest(string testName)
02194         {
02195             Log.Comment(testName + " finished...");
02196         }
02197
02198         public static void ValidateExceptionCounts(
02199             int closedExceptionCountExpected,
02200             string caption = null
02201         )
02202         {
02203             Log.Comment("ValidateExceptionCounts: " + caption);
02204
02205             Verify.AreEqual(closedExceptionCountExpected.ToString(),
02206                             (new Edit(FindElement.ById("ClosedExceptionCount"))).Value,
02207                             "ClosedExceptionCount should be " + closedExceptionCountExpected);
02208         }
02209
02210         public static void ValidateEventCounts(
02211             int coreWebView2InitializedCountExpected,
02212             int ensureCoreWebView2CompletionCountExpected,
02213             int navigationStartingCountExpected,
02214             int navigationCompletedCountExpected,
02215             int loadedCountExpected,
02216             int unloadedCountExpected,
02217             int coreProcessFailedCountExpected,
02218             string caption = null
02219         )
02220         {
02221             Log.Comment("ValidateEventCounts: " + caption);
02222
02223             Verify.AreEqual(coreWebView2InitializedCountExpected.ToString(),
02224                             (new Edit(FindElement.ById("CoreWebView2InitializedCount"))).Value,
02225                             "CoreWebView2InitializedCount should be " + coreWebView2InitializedCountExpected);
02226
02227             Verify.AreEqual(ensureCoreWebView2CompletionCountExpected.ToString(),
02228                             (new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"))).Value,
02229                             "EnsureCoreWebView2CompletionCount should be " + ensureCoreWebView2CompletionCountExpected);
02230
02231             Verify.AreEqual(navigationStartingCountExpected.ToString(),
02232                             (new Edit(FindElement.ById("NavigationStartingCount"))).Value,
02233                             "NavigationStartingCount should be " + navigationStartingCountExpected);
02234
02235             Verify.AreEqual(navigationCompletedCountExpected.ToString(),
02236                             (new Edit(FindElement.ById("NavigationCompletedCount"))).Value,
02237                             "NavigationCompletedCount should be " + navigationCompletedCountExpected);
02238
02239             Verify.AreEqual(loadedCountExpected.ToString(),
02240                             (new Edit(FindElement.ById("LoadedCount"))).Value,
02241                             "LoadedCount should be " + loadedCountExpected);
02242
02243             Verify.AreEqual(unloadedCountExpected.ToString(),
02244                             (new Edit(FindElement.ById("UnloadedCount"))).Value,
02245                             "UnloadedCount should be " + unloadedCountExpected);
02246
02247             Verify.AreEqual(coreProcessFailedCountExpected.ToString(),
02248                             (new Edit(FindElement.ById("CoreProcessFailedCount"))).Value,
02249                             "CoreProcessFailedCount should be " + coreProcessFailedCountExpected);
02250         }
02251
02252         [TestMethod]
02253         [TestProperty("TestSuite", "D")]
02254         public void BasicCoreObjectCreationAndDestructionTest()
02255         {
02256             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToCoreObjectsWebView2" }))
02257             {
02258                 ChooseTest("BasicCoreObjectCreationAndDestructionTest", false /* waitForLoadCompleted */);
02259
02260                 Button resetCounts_Button = new Button(FindElement.ById("ResetCounts_Button"));
02261                 resetCounts_Button.Invoke();
02262                 Wait.ForIdle();
02263
02264                 var coreWebView2InitializedCount = new Edit(FindElement.ById("CoreWebView2InitializedCount"));
02265                 var ensureCoreWebView2CompletionCount = new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"));
02266                 var navigationCompletedCount = new Edit(FindElement.ById("NavigationCompletedCount"));
02267                 var loadedCount = new Edit(FindElement.ById("LoadedCount"));
02268                 var unloadedCount = new Edit(FindElement.ById("UnloadedCount"));
02269
02270                 BeginSubTest("Preload Test #1", "CreateOffline -> SetSource -> Wait(NavCompleted) -> EnterTree -> Wait(Loaded)");
02271                 Button create_OfflineElement_Button = new Button(FindElement.ById("Create_OfflineElement_Button"));
02272                 Button setSource_OfflineElement_Button = new Button(FindElement.ById("SetSource_OfflineElement_Button"));
02273                 Button add_OfflineElement_Button = new Button(FindElement.ById("Add_OfflineElement_Button"));
02274
02275                 // Create offline element and set source
02276                 Log.Comment("Create offline element and set source...");
02277                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02278                 {
02279                     create_OfflineElement_Button.Invoke();
02280                     setSource_OfflineElement_Button.Invoke();
02281                     navigationCompletedWaiter.Wait();
02282                 }
02283
02284                 ValidateEventCounts(
02285                     1,      // coreWebView2InitializedCountExpected
02286                     0,      // ensureCoreWebView2CompletionCountExpected
02287                     1,      // navigationStartingCountExpected
02288                     1,      // navigationCompletedCountExpected
02289                     0,      // loadedCountExpected
02290                     0,      // unloadedCountExpected
02291                     0,      // coreProcessFailedCountExpected
02292                     "Created offline w/ source (not live yet)"
02293                 );
02294
02295                 Log.Comment("Add to tree...");
02296                 using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02297                 {
02298                     add_OfflineElement_Button.Invoke();
02299                     loadedWaiter.Wait();
02300                 }
02301
02302                 ValidateEventCounts(
02303                     1,      // coreWebView2InitializedCountExpected
02304                     0,      // ensureCoreWebView2CompletionCountExpected
02305                     1,      // navigationStartingCountExpected
02306                     1,      // navigationCompletedCountExpected
02307                     1,      // loadedCountExpected
02308                     0,      // unloadedCountExpected
02309                     0,      // coreProcessFailedCountExpected
02310                     "Added to tree"
02311                 );
02312                 EndSubTest("Preload Test #1");
02313
02314                 BeginSubTest("Preload Test #2", "CreateOffline -> EnsureCWV2() -> Wait(EnsureCWV2_Completion) -> EnterTree -> Wait(Loaded) -> SetSource");
02315                 Button ensureCoreWebView2_OfflineElement_Button = new Button(FindElement.ById("EnsureCoreWebView2_OfflineElement_Button"));
02316
02317                 Log.Comment("Create offline element and EnsureCWV2()...");
02318                 using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "1"))
02319                 {
02320                     create_OfflineElement_Button.Invoke();
02321                     ensureCoreWebView2_OfflineElement_Button.Invoke();
02322                     ensureCoreWebView2CompletionWaiter.Wait();
02323                 }
02324
02325                 ValidateEventCounts(
02326                     1,      // coreWebView2InitializedCountExpected
02327                     1,      // ensureCoreWebView2CompletionCountExpected
02328                     0,      // navigationStartingCountExpected
02329                     0,      // navigationCompletedCountExpected
02330                     0,      // loadedCountExpected
02331                     0,      // unloadedCountExpected
02332                     0,      // coreProcessFailedCountExpected
02333                     "Created offline without source (not live yet)"
02334                 );
02335
02336                 Log.Comment("Add to tree...");
02337                 using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02338                 {
02339                     add_OfflineElement_Button.Invoke();
02340                     loadedWaiter.Wait();
02341                 }
02342
02343                 ValidateEventCounts(
02344                     1,      // coreWebView2InitializedCountExpected
02345                     1,      // ensureCoreWebView2CompletionCountExpected
02346                     0,      // navigationStartingCountExpected
02347                     0,      // navigationCompletedCountExpected
02348                     1,      // loadedCountExpected
02349                     0,      // unloadedCountExpected
02350                     0,      // coreProcessFailedCountExpected
02351                     "Added to tree"
02352                 );
02353
02354                 Log.Comment("Set source...");
02355                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02356                 {
02357                     setSource_OfflineElement_Button.Invoke();
02358                     navigationCompletedWaiter.Wait();
02359                 }
02360
02361                 ValidateEventCounts(
02362                     1,      // coreWebView2InitializedCountExpected
02363                     1,      // ensureCoreWebView2CompletionCountExpected
02364                     1,      // navigationStartingCountExpected
02365                     1,      // navigationCompletedCountExpected
02366                     1,      // loadedCountExpected
02367                     0,      // unloadedCountExpected
02368                     0,      // coreProcessFailedCountExpected
02369                     "Set source"
02370                 );
02371                 EndSubTest("Preload Test #2");
02372
02373                 BeginSubTest("Live Element Test #1", "CreateLive -> Set Source -> Wait(NavCompleted/Loaded)");
02374                 Button create_LiveElement_Button = new Button(FindElement.ById("Create_LiveElement_Button"));
02375                 Button setSource_LiveElement_Button = new Button(FindElement.ById("SetSource_LiveElement_Button"));
02376
02377                 // Notice logic in the waiters here to handle race between NavCompleted and Loaded
02378                 Log.Comment("Create live element and set source...");
02379                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02380                 {
02381                     create_LiveElement_Button.Invoke();
02382                     setSource_LiveElement_Button.Invoke();
02383                     navigationCompletedWaiter.Wait();
02384                 }
02385
02386                 if (loadedCount.Value != "1")
02387                 {
02388                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02389                     {
02390                         loadedWaiter.Wait();
02391                     }
02392                 }
02393
02394                 ValidateEventCounts(
02395                     1,      // coreWebView2InitializedCountExpected
02396                     0,      // ensureCoreWebView2CompletionCountExpected
02397                     1,      // navigationStartingCountExpected
02398                     1,      // navigationCompletedCountExpected
02399                     1,      // loadedCountExpected
02400                     0,      // unloadedCountExpected
02401                     0,      // coreProcessFailedCountExpected
02402                     "Create live with source"
02403                 );
02404                 EndSubTest("Live Element Test #1");
02405
02406                 BeginSubTest("Live Element Test #2", "CreateLive -> EnsureCWV2() -> Wait(EnsureCWV2_Completion/Loaded) -> SetSource");
02407                 Button ensureCoreWebView2_LiveElement_Button = new Button(FindElement.ById("EnsureCoreWebView2_LiveElement_Button"));
02408
02409                 Log.Comment("Create live element and EnsureCWV2()...");
02410                 using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "1"))
02411                 {
02412                     create_LiveElement_Button.Invoke();
02413                     ensureCoreWebView2_LiveElement_Button.Invoke();
02414                     ensureCoreWebView2CompletionWaiter.Wait();
02415                 }
02416
02417                 if (loadedCount.Value != "1")
02418                 {
02419                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02420                     {
02421                         loadedWaiter.Wait();
02422                     }
02423                 }
02424                 ValidateEventCounts(
02425                     1,      // coreWebView2InitializedCountExpected
02426                     1,      // ensureCoreWebView2CompletionCountExpected
02427                     0,      // navigationStartingCountExpected
02428                     0,      // navigationCompletedCountExpected
02429                     1,      // loadedCountExpected
02430                     0,      // unloadedCountExpected
02431                     0,      // coreProcessFailedCountExpected
02432                     "Create live without source"
02433                 );
02434
02435                 Log.Comment("Set source...");
02436                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02437                 {
02438                     setSource_LiveElement_Button.Invoke();
02439                     navigationCompletedWaiter.Wait();
02440                 }
02441
02442                 ValidateEventCounts(
02443                     1,      // coreWebView2InitializedCountExpected
02444                     1,      // ensureCoreWebView2CompletionCountExpected
02445                     1,      // navigationStartingCountExpected
02446                     1,      // navigationCompletedCountExpected
02447                     1,      // loadedCountExpected
02448                     0,      // unloadedCountExpected
02449                     0,      // coreProcessFailedCountExpected
02450                     "Source set"
02451                 );
02452                 EndSubTest("Live Element Test #2");
02453
02454                 BeginSubTest("Markup Test #1", "Create_XamlReaderLoad -> EnterTree-> EnsureCWV2() -> Wait(EnsureCWV2_Completion/Loaded) -> SetSource");
02455                 Button create_MarkupElement_Blank_Button = new Button(FindElement.ById("Create_MarkupElement_Blank_Button"));
02456                 Button ensureCoreWebView2_MarkupElement_Button = new Button(FindElement.ById("EnsureCoreWebView2_MarkupElement_Button"));
02457                 Button setSource_MarkupElement_Button = new Button(FindElement.ById("SetSource_MarkupElement_Button"));
02458
02459                 Log.Comment("Load from Markup and add to tree");
02460                 using (var loadedWwaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02461                 {
02462                     create_MarkupElement_Blank_Button.Invoke();
02463                     loadedWwaiter.Wait();
02464                 }
02465                 ValidateEventCounts(
02466                     0,      // coreWebView2InitializedCountExpected
02467                     0,      // ensureCoreWebView2CompletionCountExpected
02468                     0,      // navigationStartingCountExpected
02469                     0,      // navigationCompletedCountExpected
02470                     1,      // loadedCountExpected
02471                     0,      // unloadedCountExpected
02472                     0,      // coreProcessFailedCountExpected
02473                     "Loaded from markup and added to tree"
02474                 );
02475
02476                 Log.Comment("Call EnsureCWV2()");
02477                 using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "1"))
02478                 {
02479                     ensureCoreWebView2_MarkupElement_Button.Invoke();
02480                     ensureCoreWebView2CompletionWaiter.Wait();
02481                 }
02482                 ValidateEventCounts(
02483                     1,      // coreWebView2InitializedCountExpected
02484                     1,      // ensureCoreWebView2CompletionCountExpected
02485                     0,      // navigationStartingCountExpected
02486                     0,      // navigationCompletedCountExpected
02487                     1,      // loadedCountExpected
02488                     0,      // unloadedCountExpected
02489                     0,      // coreProcessFailedCountExpected
02490                     "Loaded from markup and added to tree"
02491                 );
02492
02493                 Log.Comment("Set Source");
02494                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02495                 {
02496                     setSource_MarkupElement_Button.Invoke();
02497                     navigationCompletedWaiter.Wait();
02498                 }
02499
02500                 ValidateEventCounts(
02501                     1,      // coreWebView2InitializedCountExpected
02502                     1,      // ensureCoreWebView2CompletionCountExpected
02503                     1,      // navigationStartingCountExpected
02504                     1,      // navigationCompletedCountExpected
02505                     1,      // loadedCountExpected
02506                     0,      // unloadedCountExpected
02507                     0,      // coreProcessFailedCountExpected
02508                     "Source set"
02509                 );
02510                 EndSubTest("Markup Test #1");
02511
02512                 // MarkupTest #2: XamlReader.Load() WV2 with Source Set
02513                 BeginSubTest("Markup Test #2", "Create_XamlReaderLoad (with Source set)");
02514                 Button create_MarkupElement_Source_Button = new Button(FindElement.ById("Create_MarkupElement_Source_Button"));
02515
02516                 Log.Comment("Create Live element w/ Source");
02517                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02518                 {
02519                     create_MarkupElement_Source_Button.Invoke();
02520                     navigationCompletedWaiter.Wait();
02521                 }
02522
02523                 if (loadedCount.Value != "1")
02524                 {
02525                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02526                     {
02527                         loadedWaiter.Wait();
02528                     }
02529                 }
02530
02531                 ValidateEventCounts(
02532                     1,      // coreWebView2InitializedCountExpected
02533                     0,      // ensureCoreWebView2CompletionCountExpected
02534                     1,      // navigationStartingCountExpected
02535                     1,      // navigationCompletedCountExpected
02536                     1,      // loadedCountExpected
02537                     0,      // unloadedCountExpected
02538                     0,      // coreProcessFailedCountExpected
02539                     "Loaded from markup w/ Source"
02540                 );
02541                 EndSubTest("Markup Test #2");
02542
02543                 Log.Comment("Close() API Tests: Force close the 3 WV2s we created above");
02544                 // Close() API Test: Force close the 3 WV2' we created above
02545                 //   Part A: Close WV2 element used earlier for "Offline (pre-load) Creation" test
02546                 BeginSubTest("Close Test #1", "Close WV2 element used earlier for 'Offline (pre-load) Creation' test");
02547                 Button releaseReference_OfflineElement_Button = new Button(FindElement.ById("ReleaseReference_OfflineElement_Button"));
02548                 Button close_OfflineElement_Button = new Button(FindElement.ById("Close_OfflineElement_Button"));
02549                 Button remove_OfflineElement_Button = new Button(FindElement.ById("Remove_OfflineElement_Button"));
02550
02551                 Log.Comment("Remove from tree, then Close");
02552                 using (var unloadedWaiter = new ValueChangedEventWaiter(unloadedCount, "1"))
02553                 {
02554                     remove_OfflineElement_Button.Invoke();
02555                     close_OfflineElement_Button.Invoke();
02556                     unloadedWaiter.Wait();
02557                 }
02558                 ValidateEventCounts(
02559                     0,      // coreWebView2InitializedCountExpected
02560                     0,      // ensureCoreWebView2CompletionCountExpected
02561                     0,      // navigationStartingCountExpected
02562                     0,      // navigationCompletedCountExpected
02563                     0,      // loadedCountExpected
02564                     1,      // unloadedCountExpected
02565                     0,      // coreProcessFailedCountExpected
02566                     "Remove, Close"
02567                 );
02568
02569                 Log.Comment("Try to set Source -> expect RO_E_CLOSED");
02570                 setSource_OfflineElement_Button.Invoke();
02571                 ValidateExceptionCounts(
02572                     1       // closedExceptionCountExpected
02573                 );
02574                 EndSubTest("Close Test #1");
02575
02576                 BeginSubTest("Close Test #2", "Close WV2 element used earlier for 'Live (in-tree) Creation' test");
02577                 Button remove_LiveElement_Button = new Button(FindElement.ById("Remove_LiveElement_Button"));
02578                 Button close_LiveElement_Button = new Button(FindElement.ById("Close_LiveElement_Button"));
02579
02580                 // Test just Close(). No events to wait on here.
02581                 Log.Comment("Close");
02582                 close_LiveElement_Button.Invoke();
02583
02584                 ValidateEventCounts(
02585                     0,      // coreWebView2InitializedCountExpected
02586                     0,      // ensureCoreWebView2CompletionCountExpected
02587                     0,      // navigationStartingCountExpected
02588                     0,      // navigationCompletedCountExpected
02589                     0,      // loadedCountExpected
02590                     0,      // unloadedCountExpected
02591                     0,      // coreProcessFailedCountExpected
02592                     "Close"
02593                 );
02594
02595                 Log.Comment("Try EnsureCWV2 -> expect RO_E_CLOSED");
02596                 ensureCoreWebView2_LiveElement_Button.Invoke();
02597                 ValidateExceptionCounts(
02598                     1       // closedExceptionCountExpected
02599                 );
02600                 EndSubTest("Close Test #2");
02601
02602                 BeginSubTest("Close Test #3", "Close WV2 element used earlier for 'Markup-based Creation' test");
02603                 Button remove_MarkupElement_Button = new Button(FindElement.ById("Remove_MarkupElement_Button"));
02604                 Button close_MarkupElement_Button = new Button(FindElement.ById("Close_MarkupElement_Button"));
02605
02606                 Log.Comment("Close, then Remove from tree");
02607                 using (var unloadedWaiter = new ValueChangedEventWaiter(unloadedCount, "1"))
02608                 {
02609                     close_MarkupElement_Button.Invoke();
02610                     remove_MarkupElement_Button.Invoke();
02611                     unloadedWaiter.Wait();
02612                 }
02613
02614                 ValidateEventCounts(
02615                     0,      // coreWebView2InitializedCountExpected
02616                     0,      // ensureCoreWebView2CompletionCountExpected
02617                     0,      // navigationStartingCountExpected
02618                     0,      // navigationCompletedCountExpected
02619                     0,      // loadedCountExpected
02620                     1,      // unloadedCountExpected
02621                     0,      // coreProcessFailedCountExpected
02622                     "Close, Remove"
02623                 );
02624
02625                 Log.Comment("Try EnsureCWV2 -> expect RO_E_CLOSED");
02626                 ensureCoreWebView2_MarkupElement_Button.Invoke();
02627                 ValidateExceptionCounts(
02628                     1       // closedExceptionCountExpected
02629                 );
02630                 EndSubTest("Close Test #3");
02631             }
02632         }
02633
02634         // Check Status3 textbox to ensure the right web page is loadeed
02635         private static void ValidateLoadedSource(string loadedSource)
02636         {
02637             string status3Text = (new Edit(FindElement.ById("Status3"))).Value;
02638             Verify.IsTrue(status3Text.Contains(loadedSource), "NavigationStarting path should contain the source (" + loadedSource + ")");
02639         }
02640
02641         private static void ValidateEventDetail(string eventDetail)
02642         {
02643             string eventDetailText = (new Edit(FindElement.ById("EventDetail"))).Value;
02644             Verify.IsTrue(eventDetailText.Contains(eventDetail), "EventDetail should contain (" + eventDetail + ")");
02645         }
02646
02647
02648         [TestMethod]
02649         [TestProperty("TestSuite", "D")]
02650         [TestProperty("Ignore", "True")] // Bug 43584062: WebView2Tests.ConcurrentCreationRequestsTest is unreliable
02651         public void ConcurrentCreationRequestsTest()
02652         {
02653             // Use two sources to test that concurrent creations/navigations end up in the expected state
02654             string source1_filename = "SimplePage.html";
02655             string source2_filename = "SimplePageWithButton.html";
02656
02657             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToCoreObjectsWebView2" }))
02658             {
02659                 ChooseTest("ConcurrentCreationRequestsTest", false /* waitForLoadCompleted */);
02660
02661                 var coreWebView2InitializedCount = new Edit(FindElement.ById("CoreWebView2InitializedCount"));
02662                 var ensureCoreWebView2CompletionCount = new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"));
02663                 var navigationCompletedCount = new Edit(FindElement.ById("NavigationCompletedCount"));
02664                 var loadedCount = new Edit(FindElement.ById("LoadedCount"));
02665
02666                 Button create_ConcurrentCreationElement_Button = new Button(FindElement.ById("Create_ConcurrentCreationElement_Button"));
02667                 Button source_Source_Button = new Button(FindElement.ById("Source_Source_Button"));
02668                 Button source_Ensure_Button = new Button(FindElement.ById("Source_Ensure_Button"));
02669                 Button ensure_Source_Button = new Button(FindElement.ById("Ensure_Source_Button"));
02670                 Button ensure_Ensure_Button = new Button(FindElement.ById("Ensure_Ensure_Button"));
02671                 Button remove_ConcurrentCreationElement_Button = new Button(FindElement.ById("Remove_ConcurrentCreationElement_Button"));
02672                 Button close_ConcurrentCreationElement_Button = new Button(FindElement.ById("Close_ConcurrentCreationElement_Button"));
02673
02674                 BeginSubTest("Concurrent Creation Test #1: Source, Source","Set Source #1, then Source #2. Expect creation to run once and navigate to Source #2 only.");
02675                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02676                 {
02677                     create_ConcurrentCreationElement_Button.Invoke();
02678                     source_Source_Button.Invoke();
02679                     navigationCompletedWaiter.Wait();
02680                 }
02681
02682                 if (loadedCount.Value != "1")
02683                 {
02684                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02685                     {
02686                         loadedWaiter.Wait();
02687                     }
02688                 }
02689
02690                 ValidateLoadedSource(source2_filename);
02691
02692                 ValidateEventCounts(
02693                     1,      // coreWebView2InitializedCountExpected
02694                     0,      // ensureCoreWebView2CompletionCountExpected
02695                     1,      // navigationStartingCountExpected
02696                     1,      // navigationCompletedCountExpected
02697                     1,      // loadedCountExpected
02698                     0,      // unloadedCountExpected
02699                     0,      // coreProcessFailedCountExpected
02700                     "Source, Source"
02701
02702                 );
02703                 EndSubTest("Concurrent Creation Test #1: Source, Source");
02704
02705                 BeginSubTest("Concurrent Creation Test #2: Source, EnsureCWV2", "Set Source, then call EnsureCoreWebView2(). Both calls should succeed.");
02706                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02707                 {
02708                     create_ConcurrentCreationElement_Button.Invoke();
02709                     source_Ensure_Button.Invoke();
02710                     navigationCompletedWaiter.Wait();
02711                 }
02712
02713                 if (loadedCount.Value != "1")
02714                 {
02715                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02716                     {
02717                         loadedWaiter.Wait();
02718                     }
02719                 }
02720
02721                 ValidateLoadedSource(source1_filename);
02722
02723                 ValidateEventCounts(
02724                     1,      // coreWebView2InitializedCountExpected
02725                     1,      // ensureCoreWebView2CompletionCountExpected
02726                     1,      // navigationStartingCountExpected
02727                     1,      // navigationCompletedCountExpected
02728                     1,      // loadedCountExpected
02729                     0,      // unloadedCountExpected
02730                     0,      // coreProcessFailedCountExpected
02731                     "Source, EnsureCWV2"
02732                     );
02733                 EndSubTest("Concurrent Creation Test #2: Source, EnsureCWV2");
02734
02735                 BeginSubTest("Concurrent Creation Test #3: EnsureCWV2, Source", "Call EnsureCWV(), then set Source. Both calls should succeed.");
02736                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02737                 {
02738                     create_ConcurrentCreationElement_Button.Invoke();
02739                     ensure_Source_Button.Invoke();
02740                     navigationCompletedWaiter.Wait();
02741                 }
02742
02743                 if (loadedCount.Value != "1")
02744                 {
02745                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02746                     {
02747                         loadedWaiter.Wait();
02748                     }
02749                 }
02750
02751                 ValidateLoadedSource(source2_filename);
02752
02753                 ValidateEventCounts(
02754                     1,      // coreWebView2InitializedCountExpected
02755                     1,      // ensureCoreWebView2CompletionCountExpected
02756                     1,      // navigationStartingCountExpected
02757                     1,      // navigationCompletedCountExpected
02758                     1,      // loadedCountExpected
02759                     0,      // unloadedCountExpected
02760                     0,      // coreProcessFailedCountExpected
02761                     "Source, EnsureCWV2"
02762                     );
02763                 EndSubTest("Concurrent Creation Test #3: Source, EnsureCWV2");
02764
02765                 BeginSubTest("Concurrent Creation Test #4: EnsureCWV2, EnsureCWV2", "Call EnsureCWV(), then  EnsureCWV() again.");
02766                 using (var ensureCoreWebView2CompletionWaiter = new ValueChangedEventWaiter(ensureCoreWebView2CompletionCount, "2"))
02767                 {
02768                     create_ConcurrentCreationElement_Button.Invoke();
02769                     ensure_Ensure_Button.Invoke();
02770                 }
02771
02772                 if (coreWebView2InitializedCount.Value != "1")
02773                 {
02774                     using (var coreWebView2InitializedWaiter = new ValueChangedEventWaiter(coreWebView2InitializedCount, "1"))
02775                     {
02776                         coreWebView2InitializedWaiter.Wait();
02777                     }
02778                 }
02779
02780                 if (loadedCount.Value != "1")
02781                 {
02782                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02783                     {
02784                         loadedWaiter.Wait();
02785                     }
02786                 }
02787
02788                 // No source specified, so skip ValidateLoadedSource()
02789
02790                 ValidateEventCounts(
02791                     1,      // coreWebView2InitializedCountExpected
02792                     2,      // ensureCoreWebView2CompletionCountExpected
02793                     0,      // navigationStartingCountExpected
02794                     0,      // navigationCompletedCountExpected
02795                     1,      // loadedCountExpected
02796                     0,      // unloadedCountExpected
02797                     0,      // coreProcessFailedCountExpected
02798                     "EnsureCWV2, EnsureCWV2"
02799                     );
02800                 EndSubTest("Concurrent Creation Test #4: EnsureCWV2, EnsureCWV2");
02801             }
02802         }
02803
02804         [TestMethod]
02805         [TestProperty("TestSuite", "D")]
02806         public void EdgeProcessFailedTest()
02807         {
02808             using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToCoreObjectsWebView2" }))
02809             {
02810                 ChooseTest("EdgeProcessFailedTest", false /* waitForLoadCompleted */);
02811
02812                 var coreWebView2InitializedCount = new Edit(FindElement.ById("CoreWebView2InitializedCount"));
02813                 var ensureCoreWebView2CompletionCount = new Edit(FindElement.ById("EnsureCoreWebView2CompletionCount"));
02814                 var navigationCompletedCount = new Edit(FindElement.ById("NavigationCompletedCount"));
02815                 var loadedCount = new Edit(FindElement.ById("LoadedCount"));
02816                 var coreProcessFailedCount = new Edit(FindElement.ById("CoreProcessFailedCount"));
02817
02818                 Button Create_CoreProcessFailed_Button = new Button(FindElement.ById("Create_CoreProcessFailed_Button"));
02819                 Button Bad_Source_Browser_Button = new Button(FindElement.ById("Bad_Source_Browser_Button"));
02820                 Button Bad_Source_Render_Button = new Button(FindElement.ById("Bad_Source_Render_Button"));
02821                 Button Good_Source_Button = new Button(FindElement.ById("Good_Source_Button"));
02822                 Button Reload_Button = new Button(FindElement.ById("Reload_Button"));
02823
02824                 BeginSubTest("CoreProcessFailed Event Test", "Set bad source #1 (browser crash) -> Set good source -> Set bad source #2 (tab crash) -> Reload");
02825                 using (var coreProcessFailedWaiter = new ValueChangedEventWaiter(coreProcessFailedCount, "1"))
02826                 {
02827                     Create_CoreProcessFailed_Button.Invoke();
02828                     Bad_Source_Browser_Button.Invoke();
02829                     coreProcessFailedWaiter.Wait(TimeSpan.FromSeconds(60));
02830                 }
02831
02832                 if (loadedCount.Value != "1")
02833                 {
02834                     using (var loadedWaiter = new ValueChangedEventWaiter(loadedCount, "1"))
02835                     {
02836                         loadedWaiter.Wait();
02837                     }
02838                 }
02839
02840                 ValidateEventCounts(
02841                     1,      // coreWebView2InitializedCountExpected
02842                     0,      // ensureCoreWebView2CompletionCountExpected
02843                     0,      // navigationStartingCountExpected
02844                     0,      // navigationCompletedCountExpected
02845                     1,      // loadedCountExpected
02846                     0,      // unloadedCountExpected
02847                     1,      // coreProcessFailedCountExpected
02848                     "Bad Source #1 (browser crash)"
02849                 );
02850
02851                 // Make sure we bad source #1 led to WebView2ProcessFailedKind.BrowserProcessExited
02852                 ValidateEventDetail("BrowserProcessExited");
02853
02854                 using (var navigationCompletedWaiter = new ValueChangedEventWaiter(navigationCompletedCount, "1"))
02855                 {
02856                     Good_Source_Button.Invoke();
02857                     navigationCompletedWaiter.Wait();
02858                 }
02859
02860                 ValidateEventCounts(
02861                     2,      // coreWebView2InitializedCountExpected
02862                     0,      // ensureCoreWebView2CompletionCountExpected
02863                     1,      // navigationStartingCountExpected
02864                     1,      // navigationCompletedCountExpected
02865                     1,      // loadedCountExpected
02866                     0,      // unloadedCountExpected
02867                     1,      // coreProcessFailedCountExpected
02868                     "Good source"
02869                 );
02870
02871                 using (var coreProcessFailedWaiter2 = new ValueChangedEventWaiter(coreProcessFailedCount, "2"))
02872                 {
02873                     Bad_Source_Render_Button.Invoke();
02874                     coreProcessFailedWaiter2.Wait(TimeSpan.FromSeconds(60));
02875                 }
02876
02877                 ValidateEventCounts(
02878                     2,      // coreWebView2InitializedCountExpected
02879                     0,      // ensureCoreWebView2CompletionCountExpected
02880                     1,      // navigationStartingCountExpected
02881                     1,      // navigationCompletedCountExpected
02882                     1,      // loadedCountExpected
02883                     0,      // unloadedCountExpected
02884                     2,      // coreProcessFailedCountExpected
02885                     "Bad Source #2 (tab crash)"
02886                 );
02887
02888                 // Make sure we bad source #2 led to WebView2ProcessFailedKind.RenderProcessExited
02889                 ValidateEventDetail("RenderProcessExited");
02890
02891                 using (var navigationCompletedWaiter2 = new ValueChangedEventWaiter(navigationCompletedCount, "2"))
02892                 {
02893                     Reload_Button.Invoke();
02894                     navigationCompletedWaiter2.Wait();
02895                 }
02896
02897                 ValidateEventCounts(
02898                     2,      // coreWebView2InitializedCountExpected
02899                     0,      // ensureCoreWebView2CompletionCountExpected
02900                     2,      // navigationStartingCountExpected
02901                     2,      // navigationCompletedCountExpected
02902                     1,      // loadedCountExpected
02903                     0,      // unloadedCountExpected
02904                     2,      // coreProcessFailedCountExpected
02905                     "Reload() [should succeed after tab crash]]"
02906                 );
02907
02908                 EndSubTest("ProcessFailed Test");
02909             }
02910         }
02911
02912         private static class NativeMethods
02913         {
02914             public const string LoaderName = "WebView2Loader.dll";
02915             [DllImport(LoaderName, CharSet = CharSet.Unicode)]
02916             // HRESULT WINAPI GetAvailableCoreWebView2BrowserVersionString(PCWSTR browserExecutableFolder, PWSTR* versionInfo)
02917             public static extern int GetAvailableCoreWebView2BrowserVersionString(string browserExecutableFolder, out IntPtr versionInfo);
02918
02919             public enum HResults : long
02920             {
02921                 S_OK = 0x0
02922             }
02923         }
02924     }
02925 }
02926
02927 // for our webview rendering verification hack.  Because we don't currently have a RenderTargetBitmap yet,
02928 // we need to use some GDI32 and User32 functions to do it.
02929 namespace WebView2Temporary
02930 {
02931     using System.Runtime.InteropServices;
02932
02933     public class WebView2RenderingVerifier
02934     {
02935         private static class NativeMethods
02936         {
02937             public static uint PW_RENDERFULLCONTENT = 2;
02938             [DllImport("user32.dll")] public static extern bool PrintWindow(IntPtr hWnd, IntPtr hdc, uint flags);
02939             [DllImport("user32.dll")] public static extern IntPtr GetDC(IntPtr hWnd);
02940             [DllImport("user32.dll")] public static extern IntPtr ReleaseDC(IntPtr hWnd, IntPtr hdc);
02941             [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);
02942             [DllImport("user32.dll")] public static extern int GetWindowRect(IntPtr hWnd, ref RECT rectangle);
02943             [DllImport("user32.dll")] public static extern int GetDpiForWindow([In] IntPtr hWnd);
02944
02945             [StructLayout(LayoutKind.Sequential)]
02946             public struct RECT
02947             {
02948                 public int Left;        // x position of upper-left corner
02949                 public int Top;         // y position of upper-left corner
02950                 public int Right;       // x position of lower-right corner
02951                 public int Bottom;      // y position of lower-right corner
02952             }
02953
02954             [DllImport("gdi32.dll")] public static extern IntPtr CreateCompatibleDC(IntPtr hdc);
02955             [DllImport("gdi32.dll")] public static extern bool DeleteDC(IntPtr hdc);
02956             [DllImport("gdi32.dll")] public static extern IntPtr CreateCompatibleBitmap(IntPtr hdc, int width, int height);
02957             [DllImport("gdi32.dll")] public static extern IntPtr SelectObject(IntPtr hdc, IntPtr obj);
02958             [DllImport("gdi32.dll")] public static extern bool DeleteObject(IntPtr obj);
02959             [DllImport("gdi32.dll")] public static extern uint GetPixel(IntPtr hdc, int x, int y);
02960         }
02961
02962         public static void VerifyInstances(string testName)
02963         {
02964             // Get HWND of application window
02965             UIObject root = TestEnvironment.Application.ApplicationFrameWindow ?? TestEnvironment.Application.CoreWindow;
02966             var windowHandle = root.NativeWindowHandle;
02967
02968             CheckWindowPixel(windowHandle, testName);
02969         }
02970
02971         static void CheckWindowPixel(IntPtr targetHwnd, string testName)
02972         {
02973             Log.Comment("Checking hwnd 0x{0:x6} for rendering.", targetHwnd);
02974
02975             var targetRect = new NativeMethods.RECT();
02976             _ = NativeMethods.GetWindowRect(targetHwnd, ref targetRect);
02977
02978             // Create a device context and bitmap consistent with the target hwnd and check the pixel.
02979             IntPtr targetHdc = NativeMethods.GetDC(targetHwnd);
02980             if (targetHdc == IntPtr.Zero)
02981             {
02982                 Log.Warning(string.Format("Test:{0}: Unable to get chrome hdc", testName));
02983             }
02984             Verify.AreNotEqual(targetHdc, IntPtr.Zero);
02985             if (targetHdc != IntPtr.Zero)
02986             {
02987                 IntPtr memoryHdc = NativeMethods.CreateCompatibleDC(targetHdc);
02988                 if (memoryHdc == IntPtr.Zero)
02989                 {
02990                     Log.Warning(string.Format("Test:{0}: Failed to create memory DC", testName));
02991                 }
02992                 Verify.AreNotEqual(memoryHdc, IntPtr.Zero);
02993                 if (memoryHdc != IntPtr.Zero)
02994                 {
02995                     var width = targetRect.Right - targetRect.Left;
02996                     var height = targetRect.Bottom - targetRect.Top;
02997
02998                     IntPtr memoryBitmap = NativeMethods.CreateCompatibleBitmap(targetHdc, width, height);
02999                     if (memoryBitmap == IntPtr.Zero)
03000                     {
03001                         Log.Warning(string.Format("Test:{0}: Failed to create bitmap", testName));
03002                     }
03003                     Verify.AreNotEqual(memoryBitmap, IntPtr.Zero);
03004                     if (memoryBitmap != IntPtr.Zero)
03005                     {
03006                         NativeMethods.SelectObject(memoryHdc, memoryBitmap);
03007
03008                         // Print the window into the memory Hdc.
03009                         NativeMethods.PrintWindow(targetHwnd, memoryHdc, NativeMethods.PW_RENDERFULLCONTENT);
03010
03011                         var dpi = NativeMethods.GetDpiForWindow(targetHwnd);
03012                         var scale = dpi / 96.0;
03013
03014                         // Look at the pixel.
03015                         const uint targetPixelColor = 0x0080ff; // Orange
03016
03017                         // The tests that use this verification may not always pass locally, depending on the DPI.
03018                         // All pass at 100% DPI, and BasicRenderingTest and ReparentElementTest will also pass at 150%.
03019                         // When we complete Task 25907893 - Adding WebView tests for DPI changes, we will want to ensure that these tests are consistent in either passing or failing at high DPI.
03020                         Log.Warning(string.Format("These tests may fail locally if monitor DPI is not set to 100%. However, they pass in the lab."));
03021                         CheckWebViewPixel("MyWebView2", scale, targetPixelColor, memoryHdc);
03022
03023                         if (testName == "MultipleWebviews_BasicRenderingTest")
03024                         {
03025                             CheckWebViewPixel("MyWebView2B", scale, targetPixelColor, memoryHdc);
03026                             CheckWebViewPixel("MyWebView2C", scale, targetPixelColor, memoryHdc);
03027                         }
03028                     }
03029                     NativeMethods.DeleteDC(memoryHdc);
03030                 }
03031                 NativeMethods.ReleaseDC(targetHwnd, targetHdc);
03032             }
03033         }
03034         static void CheckWebViewPixel(string webViewName, double scale, uint targetPixelColor, IntPtr memoryHdc)
03035         {
03036             var webview = FindElement.ById(webViewName);
03037             Rectangle bounds = webview.BoundingRectangle;
03038
03039             int xPosition = Convert.ToInt32(50 + (bounds.X * scale));
03040             int yPosition = Convert.ToInt32(50 + (bounds.Y * scale));
03041             uint pixelColor = NativeMethods.GetPixel(memoryHdc, xPosition, yPosition);
03042
03043             Verify.AreEqual<UInt32>(
03044                 pixelColor, targetPixelColor,
03045                 string.Format("Pixel at {0},{1}(actual color is 0x{2:x6}) should match target color of orange (0x{3:x6})",
03046                     xPosition, yPosition, pixelColor, targetPixelColor));
03047         }
03048     }
03049 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/AutoSuggestBoxHelper.idl Source File

  • File List
  • File Members
  • AutoSuggestBox

AutoSuggestBoxHelper.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XCP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [default_interface]
00007 runtimeclass AutoSuggestBoxHelper
00008 {
00009     [MUX_DEFAULT_VALUE("false")]
00010     [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnKeepInteriorCornersSquarePropertyChanged")]
00011     static Microsoft.UI.Xaml.DependencyProperty KeepInteriorCornersSquareProperty { get; };
00012     static void SetKeepInteriorCornersSquare(Microsoft.UI.Xaml.Controls.AutoSuggestBox autoSuggestBox, Boolean value);
00013     static Boolean GetKeepInteriorCornersSquare(Microsoft.UI.Xaml.Controls.AutoSuggestBox autoSuggestBox);
00014 };
00015
00016 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.cpp Source File

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarPanningInfo.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "AnnotatedScrollBarPanningInfo.h"
00007 #include "AnnotatedScrollBarTrace.h"
00008 #include "ScrollControllerPanRequestedEventArgs.h"
00009
00010 AnnotatedScrollBarPanningInfo::AnnotatedScrollBarPanningInfo()
00011 {
00012     ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00013 }
00014
00015 AnnotatedScrollBarPanningInfo::~AnnotatedScrollBarPanningInfo()
00016 {
00017     ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00018 }
00019
00020 #pragma region IScrollControllerPanningInfo
00021
00022 bool AnnotatedScrollBarPanningInfo::IsRailEnabled()
00023 {
00024     return true;
00025 }
00026
00027 winrt::Orientation AnnotatedScrollBarPanningInfo::PanOrientation()
00028 {
00029     return winrt::Orientation::Vertical;
00030 }
00031
00032 winrt::UIElement AnnotatedScrollBarPanningInfo::PanningElementAncestor()
00033 {
00034     return m_panningElementAncestor.get();
00035 }
00036
00037 void AnnotatedScrollBarPanningInfo::SetPanningElementExpressionAnimationSources(
00038     const winrt::CompositionPropertySet& propertySet,
00039     const winrt::hstring& minOffsetPropertyName,
00040     const winrt::hstring& maxOffsetPropertyName,
00041     const winrt::hstring& offsetPropertyName,
00042     const winrt::hstring& multiplierPropertyName)
00043 {
00044     m_expressionAnimationSources = propertySet;
00045
00046     if (m_expressionAnimationSources)
00047     {
00048         m_minOffsetPropertyName = minOffsetPropertyName;
00049         m_maxOffsetPropertyName = maxOffsetPropertyName;
00050         m_offsetPropertyName = offsetPropertyName;
00051         m_multiplierPropertyName = multiplierPropertyName;
00052
00053         UpdatePanningElementOffsetMultiplier();
00054
00055         if (!m_thumbOffsetAnimation)
00056         {
00057             EnsureThumbAnimation();
00058             UpdateThumbExpression();
00059             StartThumbAnimation();
00060         }
00061     }
00062     else
00063     {
00064         m_minOffsetPropertyName = L"";
00065         m_maxOffsetPropertyName = L"";
00066         m_offsetPropertyName = L"";
00067         m_multiplierPropertyName = L"";
00068         m_thumbOffsetAnimation = nullptr;
00069         StopThumbAnimation();
00070     }
00071 }
00072
00073 winrt::event_token AnnotatedScrollBarPanningInfo::Changed(const winrt::TypedEventHandler<winrt::IScrollControllerPanningInfo, winrt::IInspectable>& handler)
00074 {
00075     ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
00076
00077     return m_changedEventSource.add(handler);
00078 }
00079
00080 void AnnotatedScrollBarPanningInfo::Changed(const winrt::event_token& token)
00081 {
00082     ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
00083
00084     m_changedEventSource.remove(token);
00085 }
00086
00087 winrt::event_token AnnotatedScrollBarPanningInfo::PanRequested(const winrt::TypedEventHandler<winrt::IScrollControllerPanningInfo, winrt::ScrollControllerPanRequestedEventArgs>& handler)
00088 {
00089     ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Add Handler");
00090
00091     return m_panRequestedEventSource.add(handler);
00092 }
00093
00094 void AnnotatedScrollBarPanningInfo::PanRequested(const winrt::event_token& token)
00095 {
00096     ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"Remove Handler");
00097
00098     m_panRequestedEventSource.remove(token);
00099 }
00100
00101 #pragma endregion
00102
00103 void AnnotatedScrollBarPanningInfo::PanningFrameworkElement(const winrt::FrameworkElement& value)
00104 {
00105     if (m_panningFrameworkElement.get() != value)
00106     {
00107         m_panningFrameworkElement.set(value);
00108
00109         if (m_panningFrameworkElement)
00110         {
00111             m_panningVisual.set(winrt::ElementCompositionPreview::GetElementVisual(m_panningFrameworkElement.get()));
00112             winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_panningFrameworkElement.get(), true);
00113             StartThumbAnimation();
00114         }
00115         else
00116         {
00117             StopThumbAnimation();
00118             m_panningVisual.set(nullptr);
00119         }
00120     }
00121 }
00122
00123 void AnnotatedScrollBarPanningInfo::PanningElementAncestor(const winrt::UIElement& value)
00124 {
00125     if (m_panningElementAncestor.get() != value)
00126     {
00127         m_panningElementAncestor.set(value);
00128         RaiseChanged();
00129     }
00130 }
00131
00132 void AnnotatedScrollBarPanningInfo::PanningElementOffsetMultiplier(float value)
00133 {
00134     if (m_panningElementOffsetMultiplier != value)
00135     {
00136         m_panningElementOffsetMultiplier = value;
00137
00138         UpdatePanningElementOffsetMultiplier();
00139     }
00140 }
00141
00142 void AnnotatedScrollBarPanningInfo::RaiseChanged()
00143 {
00144     ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00145
00146     if (m_changedEventSource)
00147     {
00148         m_changedEventSource(*this, nullptr);
00149     }
00150 }
00151
00152 bool AnnotatedScrollBarPanningInfo::RaisePanRequested(const winrt::PointerPoint& pointerPoint)
00153 {
00154     ANNOTATEDSCROLLBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00155
00156     if (m_panRequestedEventSource)
00157     {
00158         auto scrollControllerPanRequestedEventArgs = winrt::make<ScrollControllerPanRequestedEventArgs>(pointerPoint);
00159
00160         m_panRequestedEventSource(*this, scrollControllerPanRequestedEventArgs);
00161
00162         return scrollControllerPanRequestedEventArgs.Handled();
00163     }
00164
00165     return false;
00166 }
00167
00168 // Creates the thumbOffsetAnimation Composition expression animation used to
00169 // position the vertical pannable thumb within its track.
00170 void AnnotatedScrollBarPanningInfo::EnsureThumbAnimation()
00171 {
00172     if (!m_thumbOffsetAnimation &&
00173         m_expressionAnimationSources &&
00174         m_offsetPropertyName != L"" &&
00175         m_minOffsetPropertyName != L"" &&
00176         m_maxOffsetPropertyName != L"" &&
00177         m_multiplierPropertyName != L"")
00178     {
00179         m_thumbOffsetAnimation = m_expressionAnimationSources.Compositor().CreateExpressionAnimation();
00180         m_thumbOffsetAnimation.SetReferenceParameter(L"sources", m_expressionAnimationSources);
00181     }
00182 }
00183
00184 void AnnotatedScrollBarPanningInfo::StartThumbAnimation()
00185 {
00186     if (m_panningVisual && m_thumbOffsetAnimation)
00187     {
00188         m_panningVisual.get().StartAnimation(L"Translation.Y", m_thumbOffsetAnimation);
00189     }
00190 }
00191
00192 void AnnotatedScrollBarPanningInfo::StopThumbAnimation()
00193 {
00194     if (m_panningVisual)
00195     {
00196         m_panningVisual.get().StopAnimation(L"Translation.Y");
00197     }
00198 }
00199
00200 // Updates the thumbOffsetAnimation Composition expression animation using the PropertySet provided
00201 // in the SetPanningElementExpressionAnimationSources call.
00202 void AnnotatedScrollBarPanningInfo::UpdateThumbExpression()
00203 {
00204     if (m_thumbOffsetAnimation)
00205     {
00206         m_thumbOffsetAnimation.Expression(
00207             L"min(sources." + m_maxOffsetPropertyName +
00208             L",max(sources." + m_minOffsetPropertyName +
00209             L",sources." + m_offsetPropertyName +
00210             L"))/(-sources." + m_multiplierPropertyName + L")");
00211     }
00212 }
00213
00214 void AnnotatedScrollBarPanningInfo::UpdatePanningElementOffsetMultiplier()
00215 {
00216     if (m_expressionAnimationSources && m_multiplierPropertyName != L"")
00217     {
00218         m_expressionAnimationSources.InsertScalar(m_multiplierPropertyName, m_panningElementOffsetMultiplier);
00219     }
00220 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/NonVirtualizingLayout.h Source File

  • File List
  • File Members
  • Repeater

NonVirtualizingLayout.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "Layout.h"
00007 #include "NonVirtualizingLayout.g.h"
00008
00009 class NonVirtualizingLayout :
00010     public winrt::implementation::NonVirtualizingLayoutT<NonVirtualizingLayout, Layout>
00011 {
00012 public:
00013     NonVirtualizingLayout();
00014
00015 #pragma region INonVirtualizingLayoutOverrides
00016     virtual void InitializeForContextCore(winrt::LayoutContext const& context);
00017     virtual void UninitializeForContextCore(winrt::LayoutContext const& context);
00018
00019     virtual winrt::Size MeasureOverride(winrt::NonVirtualizingLayoutContext const& context, winrt::Size const& availableSize);
00020     virtual winrt::Size ArrangeOverride(winrt::NonVirtualizingLayoutContext const& context, winrt::Size const& finalSize);
00021 #pragma endregion
00022 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TwoPaneView.properties.h Source File

  • File List
  • File Members
  • Generated

TwoPaneView.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TwoPaneViewProperties
00008 {
00009 public:
00010     TwoPaneViewProperties();
00011
00012     void MinTallModeHeight(double value);
00013     double MinTallModeHeight();
00014
00015     void MinWideModeWidth(double value);
00016     double MinWideModeWidth();
00017
00018     void Mode(winrt::TwoPaneViewMode const& value);
00019     winrt::TwoPaneViewMode Mode();
00020
00021     void Pane1(winrt::UIElement const& value);
00022     winrt::UIElement Pane1();
00023
00024     void Pane1Length(winrt::GridLength const& value);
00025     winrt::GridLength Pane1Length();
00026
00027     void Pane2(winrt::UIElement const& value);
00028     winrt::UIElement Pane2();
00029
00030     void Pane2Length(winrt::GridLength const& value);
00031     winrt::GridLength Pane2Length();
00032
00033     void PanePriority(winrt::TwoPaneViewPriority const& value);
00034     winrt::TwoPaneViewPriority PanePriority();
00035
00036     void TallModeConfiguration(winrt::TwoPaneViewTallModeConfiguration const& value);
00037     winrt::TwoPaneViewTallModeConfiguration TallModeConfiguration();
00038
00039     void WideModeConfiguration(winrt::TwoPaneViewWideModeConfiguration const& value);
00040     winrt::TwoPaneViewWideModeConfiguration WideModeConfiguration();
00041
00042     static winrt::DependencyProperty MinTallModeHeightProperty() { return s_MinTallModeHeightProperty; }
00043     static winrt::DependencyProperty MinWideModeWidthProperty() { return s_MinWideModeWidthProperty; }
00044     static winrt::DependencyProperty ModeProperty() { return s_ModeProperty; }
00045     static winrt::DependencyProperty Pane1Property() { return s_Pane1Property; }
00046     static winrt::DependencyProperty Pane1LengthProperty() { return s_Pane1LengthProperty; }
00047     static winrt::DependencyProperty Pane2Property() { return s_Pane2Property; }
00048     static winrt::DependencyProperty Pane2LengthProperty() { return s_Pane2LengthProperty; }
00049     static winrt::DependencyProperty PanePriorityProperty() { return s_PanePriorityProperty; }
00050     static winrt::DependencyProperty TallModeConfigurationProperty() { return s_TallModeConfigurationProperty; }
00051     static winrt::DependencyProperty WideModeConfigurationProperty() { return s_WideModeConfigurationProperty; }
00052
00053     static GlobalDependencyProperty s_MinTallModeHeightProperty;
00054     static GlobalDependencyProperty s_MinWideModeWidthProperty;
00055     static GlobalDependencyProperty s_ModeProperty;
00056     static GlobalDependencyProperty s_Pane1Property;
00057     static GlobalDependencyProperty s_Pane1LengthProperty;
00058     static GlobalDependencyProperty s_Pane2Property;
00059     static GlobalDependencyProperty s_Pane2LengthProperty;
00060     static GlobalDependencyProperty s_PanePriorityProperty;
00061     static GlobalDependencyProperty s_TallModeConfigurationProperty;
00062     static GlobalDependencyProperty s_WideModeConfigurationProperty;
00063
00064     winrt::event_token ModeChanged(winrt::TypedEventHandler<winrt::TwoPaneView, winrt::IInspectable> const& value);
00065     void ModeChanged(winrt::event_token const& token);
00066
00067     event_source<winrt::TypedEventHandler<winrt::TwoPaneView, winrt::IInspectable>> m_modeChangedEventSource;
00068
00069     static void EnsureProperties();
00070     static void ClearProperties();
00071
00072     static void OnMinTallModeHeightPropertyChanged(
00073         winrt::DependencyObject const& sender,
00074         winrt::DependencyPropertyChangedEventArgs const& args);
00075
00076     static void OnMinWideModeWidthPropertyChanged(
00077         winrt::DependencyObject const& sender,
00078         winrt::DependencyPropertyChangedEventArgs const& args);
00079
00080     static void OnPane1PropertyChanged(
00081         winrt::DependencyObject const& sender,
00082         winrt::DependencyPropertyChangedEventArgs const& args);
00083
00084     static void OnPane1LengthPropertyChanged(
00085         winrt::DependencyObject const& sender,
00086         winrt::DependencyPropertyChangedEventArgs const& args);
00087
00088     static void OnPane2PropertyChanged(
00089         winrt::DependencyObject const& sender,
00090         winrt::DependencyPropertyChangedEventArgs const& args);
00091
00092     static void OnPane2LengthPropertyChanged(
00093         winrt::DependencyObject const& sender,
00094         winrt::DependencyPropertyChangedEventArgs const& args);
00095
00096     static void OnPanePriorityPropertyChanged(
00097         winrt::DependencyObject const& sender,
00098         winrt::DependencyPropertyChangedEventArgs const& args);
00099
00100     static void OnTallModeConfigurationPropertyChanged(
00101         winrt::DependencyObject const& sender,
00102         winrt::DependencyPropertyChangedEventArgs const& args);
00103
00104     static void OnWideModeConfigurationPropertyChanged(
00105         winrt::DependencyObject const& sender,
00106         winrt::DependencyPropertyChangedEventArgs const& args);
00107 };
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/DoubleToStringConverter.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • TestUI

DoubleToStringConverter.cs

Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using Microsoft.UI.Xaml.Data;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     class DoubleToStringConverter : IValueConverter
00009     {
00010         public object Convert(object value, Type targetType, object parameter, string language)
00011         {
00012             double parsedValue = 0.0;
00013             return Double.TryParse((string)value, out parsedValue) ? parsedValue * 100 : 0.0;
00014         }
00015
00016         public object ConvertBack(object value, Type targetType, object parameter, string language)
00017         {
00018             return (((double)value)/100).ToString();
00019         }
00020     }
00021 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomCompletedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomCompletedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenter.h"
00007 #include "ScrollingZoomCompletedEventArgs.g.h"
00008
00009 class ScrollingZoomCompletedEventArgs :
00010     public winrt::implementation::ScrollingZoomCompletedEventArgsT<ScrollingZoomCompletedEventArgs>
00011 {
00012 public:
00013     ScrollingZoomCompletedEventArgs()
00014     {
00015         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00016     }
00017
00018     ~ScrollingZoomCompletedEventArgs()
00019     {
00020         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00021     }
00022
00023     // IScrollingZoomCompletedEventArgs overrides
00024     int32_t CorrelationId();
00025     ScrollPresenterViewChangeResult Result();
00026
00027     void ZoomFactorChangeCorrelationId(int32_t zoomFactorChangeCorrelationId);
00028     void Result(ScrollPresenterViewChangeResult result);
00029
00030 private:
00031     int32_t m_zoomFactorChangeCorrelationId{ -1 };
00032     ScrollPresenterViewChangeResult m_result{ ScrollPresenterViewChangeResult::Completed };
00033 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMetadataProvider.h Source File

  • File List
  • File Members
  • dll

XamlMetadataProvider.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include <mutex>
00007 #include "XamlType.h"
00008 #include "XamlControlsXamlMetaDataProvider.g.h"
00009
00010 //
00011 // XamlMetadataProvider
00012 //
00013 // This is an auto-generated implementation for this native C++ project of what the XamlCompiler would generate for us.
00014 // But, since the XamlCompiler was written to assume third-party code and thus ignores types in the Microsoft.UI.Xaml
00015 // namespace (tracked by http://task.ms/44125040), we have to implement a stop-gap solution. This implementation is also
00016 // only as complete as it needs to be to support our needs now. For example it doesn't support x:Class or Binding because
00017 // we don't use those features. It just needs to provide metadata for Style/Template and even then only for the inner
00018 // types that may incidentally be used as an implementation detail of another control. For example ColorPicker uses a
00019 // ColorSpectrum control internally, the app only ever  references ColorPicker so it generates xaml metadata for that in
00020 // the app but there's no automatic metadata for the ColorSpectrum control.
00021 //
00022 // This class is hand-written and the generated registrations for each type/property are in XamlMetadataGenerated.h.
00023 // It is generated by reflecting through the winmd file and generating the code from XamlMetatadataGenerated.tt file. The
00024 // t4 template transform happens after the mdmerge target but before the clcompile target in the project.
00025
00026 class XamlMetadataProvider :
00027     // NOTE: Runtime class name is different than the implementation but we're just doing this to hide our IXMP implementation
00028     public winrt::implementation::XamlControlsXamlMetaDataProviderT<XamlMetadataProvider>
00029 {
00030 public:
00031     XamlMetadataProvider() = default;
00032
00033     static void Initialize();
00034     static void ClearTypes();
00035     static winrt::IXamlType LookupXamlType(const wstring_view& typeName);
00036
00037     // IXamlMetadataProvider
00038     winrt::IXamlType GetXamlType(winrt::TypeName const& type);
00039     winrt::IXamlType GetXamlType(winrt::hstring const& fullName);
00040     winrt::com_array<winrt::XmlnsDefinition> GetXmlnsDefinitions();
00041
00042 private:
00043     static std::recursive_mutex s_typeEntriesMutex;
00044 };
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooks.cpp Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooks.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "LayoutsTestHooksFactory.h"
00007 #include "LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h"
00008 #include "LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h"
00009 #include "LinedFlowLayout.h"
00010
00011 /* static */
00012 winrt::IndexBasedLayoutOrientation LayoutsTestHooks::GetLayoutForcedIndexBasedLayoutOrientation(
00013     winrt::IInspectable const& layout)
00014 {
00015     if (auto instance = layout.as<Layout>())
00016     {
00017         return instance->GetForcedIndexBasedLayoutOrientation();
00018     }
00019
00020     return winrt::IndexBasedLayoutOrientation::None;
00021 }
00022
00023 /* static */
00024 void LayoutsTestHooks::SetLayoutForcedIndexBasedLayoutOrientation(
00025     winrt::IInspectable const& layout,
00026     winrt::IndexBasedLayoutOrientation forcedIndexBasedLayoutOrientation)
00027 {
00028     if (auto instance = layout.as<Layout>())
00029     {
00030         instance->SetForcedIndexBasedLayoutOrientation(forcedIndexBasedLayoutOrientation);
00031     }
00032 }
00033
00034 /* static */
00035 void LayoutsTestHooks::ResetLayoutForcedIndexBasedLayoutOrientation(
00036     winrt::IInspectable const& layout)
00037 {
00038     if (auto instance = layout.as<Layout>())
00039     {
00040         instance->ResetForcedIndexBasedLayoutOrientation();
00041     }
00042 }
00043
00044 /* static */
00045 void LayoutsTestHooks::LayoutInvalidateMeasure(
00046     winrt::IInspectable const& layout,
00047     bool relayout)
00048 {
00049     if (relayout)
00050     {
00051         if (auto instance = layout.as<LinedFlowLayout>())
00052         {
00053             instance->InvalidateLayout();
00054             return;
00055         }
00056     }
00057
00058     if (auto instance = layout.as<Layout>())
00059     {
00060         instance->InvalidateMeasure();
00061     }
00062 }
00063
00064 /* static */
00065 int LayoutsTestHooks::GetLayoutFirstRealizedItemIndex(
00066     winrt::IInspectable const& layout)
00067 {
00068     if (auto instance = layout.as<LinedFlowLayout>())
00069     {
00070         return instance->FirstRealizedItemIndexDbg();
00071     }
00072
00073     return -1;
00074 }
00075
00076 /* static */
00077 int LayoutsTestHooks::GetLayoutLastRealizedItemIndex(
00078     winrt::IInspectable const& layout)
00079 {
00080     if (auto instance = layout.as<LinedFlowLayout>())
00081     {
00082         return instance->LastRealizedItemIndexDbg();
00083     }
00084
00085     return -1;
00086 }
00087
00088 /* static */
00089 int LayoutsTestHooks::GetLinedFlowLayoutFirstFrozenItemIndex(
00090     winrt::IInspectable const& linedFlowLayout)
00091 {
00092     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00093     {
00094         return instance->FirstFrozenItemIndexDbg();
00095     }
00096
00097     return -1;
00098 }
00099
00100 /* static */
00101 int LayoutsTestHooks::GetLinedFlowLayoutLastFrozenItemIndex(
00102     winrt::IInspectable const& linedFlowLayout)
00103 {
00104     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00105     {
00106         return instance->LastFrozenItemIndexDbg();
00107     }
00108
00109     return -1;
00110 }
00111
00112 /* static */
00113 double LayoutsTestHooks::GetLinedFlowLayoutAverageItemAspectRatio(
00114     winrt::IInspectable const& linedFlowLayout)
00115 {
00116     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00117     {
00118         return instance->AverageItemAspectRatioDbg();
00119     }
00120
00121     return 0.0;
00122 }
00123
00124 /* static */
00125 double LayoutsTestHooks::GetLinedFlowLayoutRawAverageItemsPerLine(
00126     winrt::IInspectable const& linedFlowLayout)
00127 {
00128     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00129     {
00130         return instance->RawAverageItemsPerLineDbg();
00131     }
00132
00133     return 0.0;
00134 }
00135
00136 /* static */
00137 double LayoutsTestHooks::GetLinedFlowLayoutSnappedAverageItemsPerLine(
00138     winrt::IInspectable const& linedFlowLayout)
00139 {
00140     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00141     {
00142         return instance->SnappedAverageItemsPerLineDbg();
00143     }
00144
00145     return 0.0;
00146 }
00147
00148 /* static */
00149 double LayoutsTestHooks::GetLinedFlowLayoutForcedAverageItemAspectRatio(
00150     winrt::IInspectable const& linedFlowLayout)
00151 {
00152     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00153     {
00154         return instance->ForcedAverageItemAspectRatioDbg();
00155     }
00156
00157     return 0.0;
00158 }
00159
00160 /* static */
00161 void LayoutsTestHooks::SetLinedFlowLayoutForcedAverageItemAspectRatio(
00162     winrt::IInspectable const& linedFlowLayout,
00163     double forcedAverageItemAspectRatio)
00164 {
00165     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00166     {
00167         instance->ForcedAverageItemAspectRatioDbg(forcedAverageItemAspectRatio);
00168     }
00169 }
00170
00171 /* static */
00172 double LayoutsTestHooks::GetLinedFlowLayoutForcedAverageItemsPerLineDivider(
00173     winrt::IInspectable const& linedFlowLayout)
00174 {
00175     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00176     {
00177         return instance->ForcedAverageItemsPerLineDividerDbg();
00178     }
00179
00180     return 0.0;
00181 }
00182
00183 /* static */
00184 void LayoutsTestHooks::SetLinedFlowLayoutForcedAverageItemsPerLineDivider(
00185     winrt::IInspectable const& linedFlowLayout,
00186     double forcedAverageItemsPerLineDivider)
00187 {
00188     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00189     {
00190         instance->ForcedAverageItemsPerLineDividerDbg(forcedAverageItemsPerLineDivider);
00191     }
00192 }
00193
00194 /* static */
00195 double LayoutsTestHooks::GetLinedFlowLayoutForcedWrapMultiplier(
00196     winrt::IInspectable const& linedFlowLayout)
00197 {
00198     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00199     {
00200         return instance->ForcedWrapMultiplierDbg();
00201     }
00202
00203     return 0.0;
00204 }
00205
00206 /* static */
00207 void LayoutsTestHooks::SetLinedFlowLayoutForcedWrapMultiplier(
00208     winrt::IInspectable const& linedFlowLayout,
00209     double forcedWrapMultiplier)
00210 {
00211     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00212     {
00213         instance->ForcedWrapMultiplierDbg(forcedWrapMultiplier);
00214     }
00215 }
00216
00217 /* static */
00218 bool LayoutsTestHooks::GetLinedFlowLayoutIsFastPathSupported(
00219     winrt::IInspectable const& linedFlowLayout)
00220 {
00221     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00222     {
00223         return instance->IsFastPathSupportedDbg();
00224     }
00225
00226     return false;
00227 }
00228
00229 /* static */
00230 void LayoutsTestHooks::SetLinedFlowLayoutIsFastPathSupported(
00231     winrt::IInspectable const& linedFlowLayout,
00232     bool isFastPathSupported)
00233 {
00234     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00235     {
00236         instance->IsFastPathSupportedDbg(isFastPathSupported);
00237     }
00238 }
00239
00240 /* static */
00241 int LayoutsTestHooks::GetLinedFlowLayoutLogItemIndex(
00242     winrt::IInspectable const& linedFlowLayout)
00243 {
00244     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00245     {
00246         return instance->LogItemIndexDbg();
00247     }
00248
00249     return -1;
00250 }
00251
00252 /* static */
00253 void LayoutsTestHooks::SetLinedFlowLayoutLogItemIndex(
00254     winrt::IInspectable const& linedFlowLayout,
00255     int logItemIndex)
00256 {
00257     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00258     {
00259         instance->LogItemIndexDbg(logItemIndex);
00260     }
00261 }
00262
00263 /* static */
00264 int LayoutsTestHooks::GetLinedFlowLayoutLineIndex(
00265     winrt::IInspectable const& linedFlowLayout,
00266     int itemIndex)
00267 {
00268     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00269     {
00270         return instance->GetLineIndexDbg(itemIndex);
00271     }
00272
00273     return -1;
00274 }
00275
00276 /* static */
00277 void LayoutsTestHooks::ClearLinedFlowLayoutItemAspectRatios(
00278     winrt::IInspectable const& linedFlowLayout)
00279 {
00280     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00281     {
00282         instance->ClearItemAspectRatios();
00283     }
00284 }
00285
00286 /* static */
00287 void LayoutsTestHooks::UnlockLinedFlowLayoutItems(
00288     winrt::IInspectable const& linedFlowLayout)
00289 {
00290     if (auto instance = linedFlowLayout.as<LinedFlowLayout>())
00291     {
00292         instance->UnlockItems();
00293     }
00294 }
00295
00296 /* static */
00297 winrt::event_token LayoutsTestHooks::LinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> const& value)
00298 {
00299     EnsureHooks();
00300
00301     return s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource.add(value);
00302 }
00303
00304 /* static */
00305 void LayoutsTestHooks::LinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::event_token const& token)
00306 {
00307     EnsureHooks();
00308
00309     s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource.remove(token);
00310 }
00311
00312 /* static */
00313 void LayoutsTestHooks::NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged(
00314     winrt::IInspectable const& linedFlowLayout)
00315 {
00316     EnsureHooks();
00317
00318     if (s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource)
00319     {
00320         s_testHooks->m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource(linedFlowLayout, nullptr);
00321     }
00322 }
00323
00324 /* static */
00325 winrt::event_token LayoutsTestHooks::LinedFlowLayoutInvalidated(winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs> const& value)
00326 {
00327     EnsureHooks();
00328
00329     return s_testHooks->m_linedFlowLayoutInvalidatedEventSource.add(value);
00330 }
00331
00332 /* static */
00333 void LayoutsTestHooks::LinedFlowLayoutInvalidated(winrt::event_token const& token)
00334 {
00335     EnsureHooks();
00336
00337     s_testHooks->m_linedFlowLayoutInvalidatedEventSource.remove(token);
00338 }
00339
00340 /* static */
00341 void LayoutsTestHooks::NotifyLinedFlowLayoutInvalidated(
00342     winrt::IInspectable const& linedFlowLayout,
00343     winrt::LinedFlowLayoutInvalidationTrigger const& invalidationTrigger)
00344 {
00345     EnsureHooks();
00346
00347     if (s_testHooks->m_linedFlowLayoutInvalidatedEventSource)
00348     {
00349         auto linedFlowLayoutInvalidatedEventArgs = winrt::make<LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs>(invalidationTrigger);
00350
00351         s_testHooks->m_linedFlowLayoutInvalidatedEventSource(linedFlowLayout, linedFlowLayoutInvalidatedEventArgs);
00352     }
00353 }
00354
00355 /* static */
00356 winrt::event_token LayoutsTestHooks::LinedFlowLayoutItemLocked(winrt::TypedEventHandler<winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs> const& value)
00357 {
00358     EnsureHooks();
00359
00360     return s_testHooks->m_linedFlowLayoutItemLockedEventSource.add(value);
00361 }
00362
00363 /* static */
00364 void LayoutsTestHooks::LinedFlowLayoutItemLocked(winrt::event_token const& token)
00365 {
00366     EnsureHooks();
00367
00368     s_testHooks->m_linedFlowLayoutItemLockedEventSource.remove(token);
00369 }
00370
00371 /* static */
00372 void LayoutsTestHooks::NotifyLinedFlowLayoutItemLocked(
00373     winrt::IInspectable const& linedFlowLayout,
00374     int itemIndex,
00375     int lineIndex)
00376 {
00377     EnsureHooks();
00378
00379     if (s_testHooks->m_linedFlowLayoutItemLockedEventSource)
00380     {
00381         auto linedFlowLayoutItemLockedEventArgs = winrt::make<LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs>(itemIndex, lineIndex);
00382
00383         s_testHooks->m_linedFlowLayoutItemLockedEventSource(linedFlowLayout, linedFlowLayoutItemLockedEventArgs);
00384     }
00385 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerTestBase Member List

This is the complete list of members for PipsPagerTestBase, including all inherited members.
ButtonType enum name | PipsPagerTestBase |
ButtonVisibilityMode enum name | PipsPagerTestBase |
ChangeNumberOfPages(NumberOfPagesOptions numberOfPages) | PipsPagerTestBase | [inline, protected]
elements | PipsPagerTestBase | [protected]
ExtractNumberFromString(string text) | PipsPagerTestBase | [inline, private]
GetButtonIsHiddenOnEdgeFunction() | PipsPagerTestBase | [protected]
GetCurrentOrientation() | PipsPagerTestBase | [inline, protected]
GetCurrentPage() | PipsPagerTestBase | [inline, protected]
GetCurrentPageAsInt32() | PipsPagerTestBase | [inline, protected]
GetFocusedPage() | PipsPagerTestBase | [inline, protected]
GetFocusedPageAsInt32() | PipsPagerTestBase | [inline, protected]
GetSelectedNumberOfPages() | PipsPagerTestBase | [inline, protected]
GetSelectedNumberOfPagesAsInt32() | PipsPagerTestBase | [inline, protected]
NumberOfPagesOptions enum name | PipsPagerTestBase |
SelectPageInPager(int index) | PipsPagerTestBase | [inline, protected]
SetButtonVisibilityModeFunction(ButtonVisibilityMode mode) | PipsPagerTestBase | [protected]
SetNextPageButtonVisibilityMode(ButtonVisibilityMode mode) | PipsPagerTestBase | [inline, protected]
SetOrientation(OrientationType orientation) | PipsPagerTestBase | [inline, protected]
SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode mode) | PipsPagerTestBase | [inline, protected]
SetWrapMode(WrapMode wrapMode) | PipsPagerTestBase | [inline, protected]
VerifyFocusedPageIndex(int index) | PipsPagerTestBase | [inline, protected]
VerifyNextPageButtonVisibility(Visibility expected) | PipsPagerTestBase | [inline, protected]
VerifyNumberOfPages(string numberOfPages) | PipsPagerTestBase | [inline, protected]
VerifyOrientationChanged(OrientationType orientation) | PipsPagerTestBase | [inline, protected]
VerifyPageButtonWithVisibilityModeSet(ButtonType btnType, ButtonVisibilityMode modeSet, bool isPagerInFocus=false) | PipsPagerTestBase | [inline, protected]
VerifySelectedFocusedIndex(int index) | PipsPagerTestBase | [inline, protected]
VerifySelectedPageIndex(int expectedPage) | PipsPagerTestBase | [inline, protected]
WrapMode enum name | PipsPagerTestBase |
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeItemInvokedEventArgs Member List

This is the complete list of members for SwipeItemInvokedEventArgs, including all inherited members.
m_swipeControl | SwipeItemInvokedEventArgs | [private]
SwipeControl() | SwipeItemInvokedEventArgs |
SwipeControl(const winrt::SwipeControl &value) | SwipeItemInvokedEventArgs |
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeControlInteractionTrackerOwner Member List

This is the complete list of members for SwipeControlInteractionTrackerOwner, including all inherited members.
CustomAnimationStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs &args) | SwipeControlInteractionTrackerOwner
IdleStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerIdleStateEnteredArgs &args) | SwipeControlInteractionTrackerOwner
InertiaStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInertiaStateEnteredArgs &args) | SwipeControlInteractionTrackerOwner
InteractingStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInteractingStateEnteredArgs &args) | SwipeControlInteractionTrackerOwner
RequestIgnored(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerRequestIgnoredArgs &args) | SwipeControlInteractionTrackerOwner
SwipeControlInteractionTrackerOwner(const winrt::SwipeControl &swipeControl) | SwipeControlInteractionTrackerOwner
ValuesChanged(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerValuesChangedArgs &args) | SwipeControlInteractionTrackerOwner
~SwipeControlInteractionTrackerOwner() | SwipeControlInteractionTrackerOwner
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlowLayoutTests Member List

This is the complete list of members for FlowLayoutTests, including all inherited members.
CreateAndInitializeRepeater(OrientationBasedMeasures om, object itemsSource, VirtualizingLayout layout, ElementFactory elementFactory, ref ItemsRepeater repeater, ref ScrollViewer scrollViewer) | FlowLayoutTests | [inline, private]
DefaultWaitTime | FlowLayoutTests | [private]
DimensionChoice enum name | FlowLayoutTests | [private]
GetDataTemplate(string content) | FlowLayoutTests | [inline, private]
LayoutChoice enum name | FlowLayoutTests | [private]
ModifyElementSize(LayoutPanel panel, int index, double itemWidth, double itemHeight) | FlowLayoutTests | [inline, private, static]
PopulatePanelWithButtons(LayoutPanel panel, int numItems) | FlowLayoutTests | [inline, private]
SetPanelMinorSize(LayoutPanel panel, OrientationBasedMeasures om, double value) | FlowLayoutTests | [inline, private]
SetUpScrollViewerOrientation(ScrollViewer scrollViewer, ScrollOrientation scrollOrientation) | FlowLayoutTests | [inline, private, static]
ValidateAdaptabilityWhenChangingFirstElementHeightForGridLayout() | FlowLayoutTests | [inline]
ValidateAdaptabilityWhenChangingFirstElementSizeForGridLayout() | FlowLayoutTests | [inline]
ValidateAdaptabilityWhenChangingFirstElementWidthForGridLayout() | FlowLayoutTests | [inline]
ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice dimension) | FlowLayoutTests | [inline, private]
ValidateChildBounds(LayoutPanel panel, List< Rect > list) | FlowLayoutTests | [inline, private]
ValidateDefaultHeightForGridLayoutItemsIsBasedOnFirstItem() | FlowLayoutTests | [inline]
ValidateDefaultSizeForFirstItemDoesntOverridePresetOne() | FlowLayoutTests | [inline]
ValidateDefaultSizeForGridLayoutItemsIsBasedOnFirstItem() | FlowLayoutTests | [inline]
ValidateDefaultWidthForGridLayoutItemsIsBasedOnFirstItem() | FlowLayoutTests | [inline]
ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice dimension) | FlowLayoutTests | [inline, private]
ValidateElementsSizeInGridLayout(LayoutPanel panel, double itemWidth, double itemHeight) | FlowLayoutTests | [inline, private, static]
ValidateEstimations_Flow_Horizontal() | FlowLayoutTests | [inline]
ValidateEstimations_Flow_Vertical() | FlowLayoutTests | [inline]
ValidateEstimations_Grid_Horizontal() | FlowLayoutTests | [inline]
ValidateEstimations_Grid_Vertical() | FlowLayoutTests | [inline]
ValidateEstimations_Stack_Horizontal() | FlowLayoutTests | [inline]
ValidateEstimations_Stack_Vertical() | FlowLayoutTests | [inline]
ValidateFlowLayout() | FlowLayoutTests | [inline]
ValidateFlowLayoutChildrenLayoutBounds(OrientationBasedMeasures om, Func< int, UIElement > elementAtIndexFunc, double minItemSpacing, double lineSpacing, int childCount, Size desiredSize, float?expectedItemWidth=null, float?expectedItemHeight=null) | FlowLayoutTests | [inline, private]
ValidateFlowLayoutLineAlignment() | FlowLayoutTests | [inline]
ValidateFlowLayoutVaryingHeights() | FlowLayoutTests | [inline]
ValidateFlowLayoutWithOneItemHasNonZeroExtent() | FlowLayoutTests | [inline]
ValidateGridLayout() | FlowLayoutTests | [inline]
ValidateGridLayoutChildrenLayoutBounds(OrientationBasedMeasures om, Func< int, UIElement > elementAtIndexFunc, double itemMinorSize, double itemMajorSize, double minRowSpacing, double minColumnSpacing, int childCount, Size desiredSize) | FlowLayoutTests | [inline, private]
ValidateGridLayoutDesiredSizingWithMaxRowsOrColumnsSet() | FlowLayoutTests | [inline]
ValidateGridLayoutJustificationAndStretch() | FlowLayoutTests | [inline]
ValidateGridLayoutMaximumRowsOrColumns() | FlowLayoutTests | [inline]
ValidateGridLayoutWithSameOrientationAsScrolling() | FlowLayoutTests | [inline]
ValidateIntersectionWithRealizationWindow() | FlowLayoutTests | [inline]
ValidateLayoutEstimations(ScrollOrientation scrollOrientation, LayoutChoice layoutChoice) | FlowLayoutTests | [inline, private]
ValidateLayoutSharing() | FlowLayoutTests | [inline]
ValidateLayoutWithInfiniteMeasureSizeInNonVirtualizingDirection() | FlowLayoutTests | [inline]
ValidateMakeAnchor() | FlowLayoutTests | [inline]
ValidateResizingFirstItemResizesOtherItemsInGridLayout() | FlowLayoutTests | [inline]
ValidateStackLayout() | FlowLayoutTests | [inline]
ValidateStackLayoutArrangeWithInsertion() | FlowLayoutTests | [inline]
ValidateStackLayoutArrangeWithStretch() | FlowLayoutTests | [inline]
ValidateStackLayoutChildrenLayoutBounds(OrientationBasedMeasures om, Func< int, UIElement > elementAtIndexFunc, int panelMinorSize, int numItems, int itemMajorSize, int itemSpacing, Size desiredSize) | FlowLayoutTests | [inline, private]
ValidateUniformGridWithItemsRelyingOnAspectRatio() | FlowLayoutTests | [inline]
ValidateUniformGridWithNoItems() | FlowLayoutTests | [inline]
VerifyFlowLayoutOnLineArranged() | FlowLayoutTests | [inline]
VerifyItemsGetFullSpaceInMajorDirectionWhenSmallerThanLineSize() | FlowLayoutTests | [inline]
VerifyRealizedRange(int expectedStartindex, int expectedCount, List< int > actualIndices) | FlowLayoutTests | [inline, private, static]
VerifyUnconstrainedUniformGridLayout() | FlowLayoutTests | [inline]
VerifyWithinTolerance(double expected, double actual, double tolerance) | FlowLayoutTests | [inline, private, static]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBoxProperties Member List

This is the complete list of members for NumberBoxProperties, including all inherited members.
AcceptsExpression(bool value) | NumberBoxProperties |
AcceptsExpression() | NumberBoxProperties |
AcceptsExpressionProperty() | NumberBoxProperties | [inline, static]
ClearProperties() | NumberBoxProperties | [static]
Description(winrt::IInspectable const &value) | NumberBoxProperties |
Description() | NumberBoxProperties |
DescriptionProperty() | NumberBoxProperties | [inline, static]
EnsureProperties() | NumberBoxProperties | [static]
Header(winrt::IInspectable const &value) | NumberBoxProperties |
Header() | NumberBoxProperties |
HeaderProperty() | NumberBoxProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | NumberBoxProperties |
HeaderTemplate() | NumberBoxProperties |
HeaderTemplateProperty() | NumberBoxProperties | [inline, static]
InputScope(winrt::InputScope const &value) | NumberBoxProperties |
InputScope() | NumberBoxProperties |
InputScopeProperty() | NumberBoxProperties | [inline, static]
IsWrapEnabled(bool value) | NumberBoxProperties |
IsWrapEnabled() | NumberBoxProperties |
IsWrapEnabledProperty() | NumberBoxProperties | [inline, static]
LargeChange(double value) | NumberBoxProperties |
LargeChange() | NumberBoxProperties |
LargeChangeProperty() | NumberBoxProperties | [inline, static]
m_valueChangedEventSource | NumberBoxProperties |
Maximum(double value) | NumberBoxProperties |
Maximum() | NumberBoxProperties |
MaximumProperty() | NumberBoxProperties | [inline, static]
Minimum(double value) | NumberBoxProperties |
Minimum() | NumberBoxProperties |
MinimumProperty() | NumberBoxProperties | [inline, static]
NumberBoxProperties() | NumberBoxProperties |
NumberFormatter(winrt::INumberFormatter2 const &value) | NumberBoxProperties |
NumberFormatter() | NumberBoxProperties |
NumberFormatterProperty() | NumberBoxProperties | [inline, static]
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnHeaderTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnIsWrapEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnMaximumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnMinimumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnNumberFormatterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnSmallChangePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnSpinButtonPlacementModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnValidationModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
PlaceholderText(winrt::hstring const &value) | NumberBoxProperties |
PlaceholderText() | NumberBoxProperties |
PlaceholderTextProperty() | NumberBoxProperties | [inline, static]
PreventKeyboardDisplayOnProgrammaticFocus(bool value) | NumberBoxProperties |
PreventKeyboardDisplayOnProgrammaticFocus() | NumberBoxProperties |
PreventKeyboardDisplayOnProgrammaticFocusProperty() | NumberBoxProperties | [inline, static]
s_AcceptsExpressionProperty | NumberBoxProperties | [static]
s_DescriptionProperty | NumberBoxProperties | [static]
s_HeaderProperty | NumberBoxProperties | [static]
s_HeaderTemplateProperty | NumberBoxProperties | [static]
s_InputScopeProperty | NumberBoxProperties | [static]
s_IsWrapEnabledProperty | NumberBoxProperties | [static]
s_LargeChangeProperty | NumberBoxProperties | [static]
s_MaximumProperty | NumberBoxProperties | [static]
s_MinimumProperty | NumberBoxProperties | [static]
s_NumberFormatterProperty | NumberBoxProperties | [static]
s_PlaceholderTextProperty | NumberBoxProperties | [static]
s_PreventKeyboardDisplayOnProgrammaticFocusProperty | NumberBoxProperties | [static]
s_SelectionFlyoutProperty | NumberBoxProperties | [static]
s_SelectionHighlightColorProperty | NumberBoxProperties | [static]
s_SmallChangeProperty | NumberBoxProperties | [static]
s_SpinButtonPlacementModeProperty | NumberBoxProperties | [static]
s_TextAlignmentProperty | NumberBoxProperties | [static]
s_TextProperty | NumberBoxProperties | [static]
s_TextReadingOrderProperty | NumberBoxProperties | [static]
s_ValidationModeProperty | NumberBoxProperties | [static]
s_ValueProperty | NumberBoxProperties | [static]
SelectionFlyout(winrt::FlyoutBase const &value) | NumberBoxProperties |
SelectionFlyout() | NumberBoxProperties |
SelectionFlyoutProperty() | NumberBoxProperties | [inline, static]
SelectionHighlightColor(winrt::SolidColorBrush const &value) | NumberBoxProperties |
SelectionHighlightColor() | NumberBoxProperties |
SelectionHighlightColorProperty() | NumberBoxProperties | [inline, static]
SmallChange(double value) | NumberBoxProperties |
SmallChange() | NumberBoxProperties |
SmallChangeProperty() | NumberBoxProperties | [inline, static]
SpinButtonPlacementMode(winrt::NumberBoxSpinButtonPlacementMode const &value) | NumberBoxProperties |
SpinButtonPlacementMode() | NumberBoxProperties |
SpinButtonPlacementModeProperty() | NumberBoxProperties | [inline, static]
Text(winrt::hstring const &value) | NumberBoxProperties |
Text() | NumberBoxProperties |
TextAlignment(winrt::TextAlignment const &value) | NumberBoxProperties |
TextAlignment() | NumberBoxProperties |
TextAlignmentProperty() | NumberBoxProperties | [inline, static]
TextProperty() | NumberBoxProperties | [inline, static]
TextReadingOrder(winrt::TextReadingOrder const &value) | NumberBoxProperties |
TextReadingOrder() | NumberBoxProperties |
TextReadingOrderProperty() | NumberBoxProperties | [inline, static]
ValidationMode(winrt::NumberBoxValidationMode const &value) | NumberBoxProperties |
ValidationMode() | NumberBoxProperties |
ValidationModeProperty() | NumberBoxProperties | [inline, static]
Value(double value) | NumberBoxProperties |
Value() | NumberBoxProperties |
ValueChanged(winrt::TypedEventHandler< winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs > const &value) | NumberBoxProperties |
ValueChanged(winrt::event_token const &token) | NumberBoxProperties |
ValueProperty() | NumberBoxProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorItem Member List

This is the complete list of members for ColorItem, including all inherited members.
colorBrush | ColorItem | [private]
ColorBrush | ColorItem |
Title | ColorItem |
title | ColorItem | [private]
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBar.properties.h Source File

  • File List
  • File Members
  • Generated

ProgressBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ProgressBarProperties
00008 {
00009 public:
00010     ProgressBarProperties();
00011
00012     void IsIndeterminate(bool value);
00013     bool IsIndeterminate();
00014
00015     void ShowError(bool value);
00016     bool ShowError();
00017
00018     void ShowPaused(bool value);
00019     bool ShowPaused();
00020
00021     void TemplateSettings(winrt::ProgressBarTemplateSettings const& value);
00022     winrt::ProgressBarTemplateSettings TemplateSettings();
00023
00024     static winrt::DependencyProperty IsIndeterminateProperty() { return s_IsIndeterminateProperty; }
00025     static winrt::DependencyProperty ShowErrorProperty() { return s_ShowErrorProperty; }
00026     static winrt::DependencyProperty ShowPausedProperty() { return s_ShowPausedProperty; }
00027     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00028
00029     static GlobalDependencyProperty s_IsIndeterminateProperty;
00030     static GlobalDependencyProperty s_ShowErrorProperty;
00031     static GlobalDependencyProperty s_ShowPausedProperty;
00032     static GlobalDependencyProperty s_TemplateSettingsProperty;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036
00037     static void OnIsIndeterminatePropertyChanged(
00038         winrt::DependencyObject const& sender,
00039         winrt::DependencyPropertyChangedEventArgs const& args);
00040
00041     static void OnShowErrorPropertyChanged(
00042         winrt::DependencyObject const& sender,
00043         winrt::DependencyPropertyChangedEventArgs const& args);
00044
00045     static void OnShowPausedPropertyChanged(
00046         winrt::DependencyObject const& sender,
00047         winrt::DependencyPropertyChangedEventArgs const& args);
00048 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollView
  • TestUI

ScrollViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Private.Controls;
00008
00009 using WEX.TestExecution;
00010 using WEX.TestExecution.Markup;
00011 using WEX.Logging.Interop;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     [TopLevelTestPage(Name = "ScrollView", Icon = "ScrollView.png")]
00016     public sealed partial class ScrollViewPage : TestPage
00017     {
00018         public ScrollViewPage()
00019         {
00020             LogController.InitializeLogging();
00021             this.InitializeComponent();
00022
00023             navigateToSimpleContents.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewsWithSimpleContentsPage), 0); };
00024             navigateToDynamic.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewDynamicPage), 0); };
00025             navigateToScrollControllers.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewWithScrollControllersPage), 0); };
00026             navigateToRTL.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewWithRTLFlowDirectionPage), 0); };
00027             navigateToKeyboardAndGamepadNavigation.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewKeyboardAndGamepadNavigationPage), 0); };
00028             navigateToBringIntoView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewBringIntoViewPage), 0); };
00029             navigateToBlank.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ScrollViewBlankPage), 0); };
00030         }
00031
00032         private void CmbScrollViewOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e)
00033         {
00034             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00035                 "ScrollView",
00036                 cmbScrollViewOutputDebugStringLevel.SelectedIndex == 1 || cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2,
00037                 cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2);
00038
00039             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00040                 "ScrollPresenter",
00041                 cmbScrollViewOutputDebugStringLevel.SelectedIndex == 1 || cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2,
00042                 cmbScrollViewOutputDebugStringLevel.SelectedIndex == 2);
00043         }
00044     }
00045 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ScrollViewerPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ScrollViewerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Windows.Foundation;
00006 using Windows.UI.ViewManagement;
00007 using Microsoft.UI.Dispatching;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Media.Imaging;
00014 using Microsoft.UI.Xaml.Shapes;
00015 using MUXControlsTestApp.Utilities;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     [TopLevelTestPage(Name="ScrollViewer", Icon="ScrollView.png")]
00020     public sealed partial class ScrollViewerPage : TestPage
00021     {
00022         private TextBlock textBlock;
00023         private Viewbox viewbox;
00024         private TilePanel tilePanel;
00025         private Image largeImg;
00026         private Rectangle rectangle;
00027         private Button button;
00028         private RepeatButton repeatButton;
00029         private Border border;
00030         private Border populatedBorder;
00031         private StackPanel horizontalStackPanel;
00032         private StackPanel verticalStackPanel;
00033         private Rectangle rectangleTopLeftHeader;
00034         private Rectangle rectangleLeftHeader;
00035         private Rectangle rectangleTopHeader;
00036
00037         public ScrollViewerPage()
00038         {
00039             this.InitializeComponent();
00040             this.Loaded += ScrollViewerPage_Loaded;
00041
00042             UseScrollViewer();
00043             CreateChildren();
00044         }
00045
00046         ~ScrollViewerPage()
00047         {
00048         }
00049
00050         private void UseScrollViewer()
00051         {
00052             try
00053             {
00054                 UpdateCmbHorizontalScrollBarVisibility();
00055                 UpdateCmbHorizontalScrollMode();
00056                 UpdateChkIsHorizontalScrollChainingEnabled();
00057                 UpdateChkIsHorizontalRailEnabled();
00058                 UpdateCmbVerticalScrollBarVisibility();
00059                 UpdateCmbVerticalScrollMode();
00060                 UpdateChkIsVerticalScrollChainingEnabled();
00061                 UpdateChkIsVerticalRailEnabled();
00062                 UpdateCmbZoomMode();
00063                 UpdateChkIsZoomChainingEnabled();
00064                 UpdateCmbContentHorizontalAlignment();
00065                 UpdateCmbContentVerticalAlignment();
00066                 UpdateCmbScrollViewerManipulationMode();
00067                 UpdateCmbContentManipulationMode();
00068                 UpdateCmbBackground();
00069                 UpdateCmbContent();
00070                 UpdateCmbXYFocusKeyboardNavigation();
00071                 UpdateTxtMinZoomFactor();
00072                 UpdateTxtMaxZoomFactor();
00073                 UpdateTxtMargin();
00074                 UpdateTxtPadding();
00075                 UpdateChkIsEnabled();
00076                 UpdateChkIsTabStop();
00077
00078                 scrollViewer.ViewChanging += ScrollViewer_ViewChanging;
00079                 scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
00080             }
00081             catch (Exception ex)
00082             {
00083                 txtExceptionReport.Text = ex.ToString();
00084                 lstScrollViewerEvents.Items.Add(ex.ToString());
00085             }
00086         }
00087
00088         private void CreateChildren()
00089         {
00090             textBlock = new TextBlock();
00091             textBlock.TextWrapping = TextWrapping.Wrap;
00092             string textBlockText = string.Empty;
00093             for (int i = 0; i < 50; i++)
00094             {
00095                 textBlockText += "Large TextBlock Text. ";
00096             }
00097             textBlock.Text = textBlockText;
00098
00099             viewbox = new Viewbox();
00100             tilePanel = new TilePanel();
00101             tilePanel.TileCount = 100;
00102             tilePanel.Background = new SolidColorBrush(Microsoft.UI.Colors.Orange);
00103             largeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
00104             SolidColorBrush chartreuseBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00105             SolidColorBrush blanchedAlmondBrush = new SolidColorBrush(Microsoft.UI.Colors.BlanchedAlmond);
00106             SolidColorBrush interBrush = new SolidColorBrush(Microsoft.UI.Colors.Yellow);
00107             LinearGradientBrush lgb = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };
00108             GradientStop gs = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
00109             lgb.GradientStops.Add(gs);
00110             gs = new GradientStop() { Color = Microsoft.UI.Colors.White, Offset = 0.5 };
00111             lgb.GradientStops.Add(gs);
00112             gs = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
00113             lgb.GradientStops.Add(gs);
00114             rectangle = new Rectangle() { Fill = lgb };
00115             button = new Button() { Content = "Button" };
00116             Rectangle viewboxChild = new Rectangle()
00117             {
00118                 Fill = lgb,
00119                 Width = 600,
00120                 Height = 500
00121             };
00122             viewbox.Child = viewboxChild;
00123             Rectangle borderChild = new Rectangle()
00124             {
00125                 Fill = lgb
00126             };
00127             border = new Border()
00128             {
00129                 BorderBrush = chartreuseBrush,
00130                 BorderThickness = new Thickness(5),
00131                 Child = borderChild
00132             };
00133             StackPanel populatedBorderChild = new StackPanel();
00134             populatedBorderChild.Margin = new Thickness(30);
00135             for (int i = 0; i < 16; i++)
00136             {
00137                 TextBlock textBlock = new TextBlock()
00138                 {
00139                     Text = "TB#" + populatedBorderChild.Children.Count,
00140                     HorizontalAlignment = HorizontalAlignment.Center,
00141                     VerticalAlignment = VerticalAlignment.Center
00142                 };
00143
00144                 Border borderInSP = new Border()
00145                 {
00146                     BorderThickness = border.Margin = new Thickness(3),
00147                     BorderBrush = chartreuseBrush,
00148                     Background = blanchedAlmondBrush,
00149                     Width = 170,
00150                     Height = 120,
00151                     Child = textBlock
00152                 };
00153
00154                 populatedBorderChild.Children.Add(borderInSP);
00155             }
00156             populatedBorder = new Border()
00157             {
00158                 BorderBrush = chartreuseBrush,
00159                 BorderThickness = new Thickness(3),
00160                 Margin = new Thickness(15),
00161                 Background = new SolidColorBrush(Microsoft.UI.Colors.Beige),
00162                 Child = populatedBorderChild
00163             };
00164             horizontalStackPanel = new StackPanel()
00165             {
00166                 Orientation = Orientation.Horizontal
00167             };
00168             for (int index = 0; index < 10; index++)
00169             {
00170                 horizontalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Width = 95 });
00171                 horizontalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Width = 5 });
00172             }
00173             verticalStackPanel = new StackPanel();
00174             for (int index = 0; index < 10; index++)
00175             {
00176                 verticalStackPanel.Children.Add(new Rectangle() { Fill = lgb, Height = 95 });
00177                 verticalStackPanel.Children.Add(new Rectangle() { Fill = interBrush, Height = 5 });
00178             }
00179             repeatButton = new RepeatButton() { Content = "RepeatButton" };
00180         }
00181
00182         private void ScrollViewerPage_Loaded(object sender, RoutedEventArgs args)
00183         {
00184             rectangleTopLeftHeader = scrollViewer.TopLeftHeader as Rectangle;
00185             scrollViewer.TopLeftHeader = null;
00186
00187             rectangleLeftHeader = scrollViewer.LeftHeader as Rectangle;
00188             scrollViewer.LeftHeader = null;
00189
00190             rectangleTopHeader = scrollViewer.TopHeader as Rectangle;
00191             scrollViewer.TopHeader = null;
00192         }
00193
00194         private string ScrollViewerViewToString(ScrollViewerView scrollViewerView)
00195         {
00196             return "H=" + scrollViewerView.HorizontalOffset.ToString() + ", V=" + scrollViewerView.VerticalOffset + ", ZF=" + scrollViewerView.ZoomFactor;
00197         }
00198
00199         private void ScrollViewer_ViewChanging(object sender, ScrollViewerViewChangingEventArgs args)
00200         {
00201             AppendEventMessage("ViewChanging IsInertial=" + args.IsInertial + ", NextView=(" + ScrollViewerViewToString(args.NextView) + "), FinalView=(" + ScrollViewerViewToString(args.FinalView) + ")");
00202         }
00203
00204         private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs args)
00205         {
00206             AppendEventMessage("ViewChanged IsIntermediate=" + args.IsIntermediate + ", H=" + scrollViewer.HorizontalOffset.ToString() + ", V=" + scrollViewer.VerticalOffset + ", ZF=" + scrollViewer.ZoomFactor);
00207         }
00208
00209         private void ChkScrollViewerProperties_Checked(object sender, RoutedEventArgs e)
00210         {
00211             if (svScrollViewerProperties != null)
00212                 svScrollViewerProperties.Visibility = Visibility.Visible;
00213         }
00214
00215         private void ChkScrollViewerProperties_Unchecked(object sender, RoutedEventArgs e)
00216         {
00217             if (svScrollViewerProperties != null)
00218                 svScrollViewerProperties.Visibility = Visibility.Collapsed;
00219         }
00220
00221         private void ChkContentProperties_Checked(object sender, RoutedEventArgs e)
00222         {
00223             if (grdContentProperties != null)
00224                 grdContentProperties.Visibility = Visibility.Visible;
00225         }
00226
00227         private void ChkContentProperties_Unchecked(object sender, RoutedEventArgs e)
00228         {
00229             if (grdContentProperties != null)
00230                 grdContentProperties.Visibility = Visibility.Collapsed;
00231         }
00232
00233         private void ChkScrollViewerMethods_Checked(object sender, RoutedEventArgs e)
00234         {
00235             if (svScrollViewerMethods != null)
00236                 svScrollViewerMethods.Visibility = Visibility.Visible;
00237         }
00238
00239         private void ChkScrollViewerMethods_Unchecked(object sender, RoutedEventArgs e)
00240         {
00241             if (svScrollViewerMethods != null)
00242                 svScrollViewerMethods.Visibility = Visibility.Collapsed;
00243         }
00244
00245         private void ChkScrollViewerEvents_Checked(object sender, RoutedEventArgs e)
00246         {
00247             if (grdScrollViewerEvents != null)
00248                 grdScrollViewerEvents.Visibility = Visibility.Visible;
00249         }
00250
00251         private void ChkScrollViewerEvents_Unchecked(object sender, RoutedEventArgs e)
00252         {
00253             if (grdScrollViewerEvents != null)
00254                 grdScrollViewerEvents.Visibility = Visibility.Collapsed;
00255         }
00256
00257         private void CmbHorizontalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e)
00258         {
00259             if (scrollViewer != null)
00260                 scrollViewer.HorizontalScrollBarVisibility = (ScrollBarVisibility)cmbHorizontalScrollBarVisibility.SelectedIndex;
00261         }
00262
00263         private void CmbHorizontalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00264         {
00265             if (scrollViewer != null)
00266                 scrollViewer.HorizontalScrollMode = (ScrollMode)cmbHorizontalScrollMode.SelectedIndex;
00267         }
00268
00269         private void UpdateCmbHorizontalScrollBarVisibility()
00270         {
00271             cmbHorizontalScrollBarVisibility.SelectedIndex = (int)scrollViewer.HorizontalScrollBarVisibility;
00272         }
00273
00274         private void UpdateCmbHorizontalScrollMode()
00275         {
00276             cmbHorizontalScrollMode.SelectedIndex = (int)scrollViewer.HorizontalScrollMode;
00277         }
00278
00279         private void ChkIsHorizontalScrollChainingEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
00280         {
00281             if (scrollViewer != null)
00282                 scrollViewer.IsHorizontalScrollChainingEnabled = (bool)chkIsHorizontalScrollChainingEnabled.IsChecked;
00283         }
00284
00285         private void UpdateChkIsHorizontalScrollChainingEnabled()
00286         {
00287             chkIsHorizontalScrollChainingEnabled.IsChecked = scrollViewer.IsHorizontalScrollChainingEnabled;
00288         }
00289
00290         private void ChkIsHorizontalRailEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
00291         {
00292             if (scrollViewer != null)
00293                 scrollViewer.IsHorizontalRailEnabled = (bool)chkIsHorizontalRailEnabled.IsChecked;
00294         }
00295
00296         private void UpdateChkIsHorizontalRailEnabled()
00297         {
00298             chkIsHorizontalRailEnabled.IsChecked = scrollViewer.IsHorizontalRailEnabled;
00299         }
00300
00301         private void CmbVerticalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e)
00302         {
00303             if (scrollViewer != null)
00304                 scrollViewer.VerticalScrollBarVisibility = (ScrollBarVisibility)cmbVerticalScrollBarVisibility.SelectedIndex;
00305         }
00306
00307         private void CmbVerticalScrollMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00308         {
00309             if (scrollViewer != null)
00310                 scrollViewer.VerticalScrollMode = (ScrollMode)cmbVerticalScrollMode.SelectedIndex;
00311         }
00312
00313         private void UpdateCmbVerticalScrollBarVisibility()
00314         {
00315             cmbVerticalScrollBarVisibility.SelectedIndex = (int)scrollViewer.VerticalScrollBarVisibility;
00316         }
00317
00318         private void UpdateCmbVerticalScrollMode()
00319         {
00320             cmbVerticalScrollMode.SelectedIndex = (int)scrollViewer.VerticalScrollMode;
00321         }
00322
00323         private void ChkIsVerticalScrollChainingEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
00324         {
00325             if (scrollViewer != null)
00326                 scrollViewer.IsVerticalScrollChainingEnabled = (bool)chkIsVerticalScrollChainingEnabled.IsChecked;
00327         }
00328
00329         private void UpdateChkIsVerticalScrollChainingEnabled()
00330         {
00331             chkIsVerticalScrollChainingEnabled.IsChecked = scrollViewer.IsVerticalScrollChainingEnabled;
00332         }
00333
00334         private void ChkIsVerticalRailEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
00335         {
00336             if (scrollViewer != null)
00337                 scrollViewer.IsVerticalRailEnabled = (bool)chkIsVerticalRailEnabled.IsChecked;
00338         }
00339
00340         private void UpdateChkIsVerticalRailEnabled()
00341         {
00342             chkIsVerticalRailEnabled.IsChecked = scrollViewer.IsVerticalRailEnabled;
00343         }
00344
00345         private void CmbZoomMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00346         {
00347             if (scrollViewer != null)
00348                 scrollViewer.ZoomMode = (ZoomMode)cmbZoomMode.SelectedIndex;
00349         }
00350
00351         private void UpdateCmbZoomMode()
00352         {
00353             cmbZoomMode.SelectedIndex = (int)scrollViewer.ZoomMode;
00354         }
00355
00356         private void ChkIsZoomChainingEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
00357         {
00358             if (scrollViewer != null)
00359                 scrollViewer.IsZoomChainingEnabled = (bool)chkIsZoomChainingEnabled.IsChecked;
00360         }
00361
00362         private void UpdateChkIsZoomChainingEnabled()
00363         {
00364             chkIsZoomChainingEnabled.IsChecked = scrollViewer.IsZoomChainingEnabled;
00365         }
00366
00367         private void CmbContentHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00368         {
00369             if (scrollViewer.Content is FrameworkElement)
00370             {
00371                 ((FrameworkElement)scrollViewer.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
00372             }
00373         }
00374
00375         private void UpdateCmbContentHorizontalAlignment()
00376         {
00377             if (scrollViewer.Content is FrameworkElement)
00378             {
00379                 cmbContentHorizontalAlignment.SelectedIndex = (int)((FrameworkElement)scrollViewer.Content).HorizontalAlignment;
00380             }
00381         }
00382
00383         private void CmbContentVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
00384         {
00385             if (scrollViewer.Content is FrameworkElement)
00386             {
00387                 ((FrameworkElement)scrollViewer.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
00388             }
00389         }
00390
00391         private void UpdateCmbContentVerticalAlignment()
00392         {
00393             if (scrollViewer.Content is FrameworkElement)
00394             {
00395                 cmbContentVerticalAlignment.SelectedIndex = (int)((FrameworkElement)scrollViewer.Content).VerticalAlignment;
00396             }
00397         }
00398
00399         private void CmbScrollViewerManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00400         {
00401             switch (cmbScrollViewerManipulationMode.SelectedIndex)
00402             {
00403                 case 0:
00404                     scrollViewer.ManipulationMode = ManipulationModes.System;
00405                     break;
00406                 case 1:
00407                     scrollViewer.ManipulationMode = ManipulationModes.None;
00408                     break;
00409             }
00410         }
00411
00412         private void UpdateCmbScrollViewerManipulationMode()
00413         {
00414             switch (scrollViewer.ManipulationMode)
00415             {
00416                 case ManipulationModes.System:
00417                     cmbScrollViewerManipulationMode.SelectedIndex = 0;
00418                     break;
00419                 case ManipulationModes.None:
00420                     cmbScrollViewerManipulationMode.SelectedIndex = 1;
00421                     break;
00422             }
00423         }
00424
00425         private void CmbContentManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00426         {
00427             if (scrollViewer.Content is UIElement scrollViewerContentAsUIE)
00428             {
00429                 switch (cmbContentManipulationMode.SelectedIndex)
00430                 {
00431                     case 0:
00432                         scrollViewerContentAsUIE.ManipulationMode = ManipulationModes.System;
00433                         break;
00434                     case 1:
00435                         scrollViewerContentAsUIE.ManipulationMode = ManipulationModes.None;
00436                         break;
00437                 }
00438             }
00439         }
00440
00441         private void UpdateCmbContentManipulationMode()
00442         {
00443             if (scrollViewer.Content is UIElement scrollViewerContentAsUIE)
00444             {
00445                 switch (scrollViewerContentAsUIE.ManipulationMode)
00446                 {
00447                     case ManipulationModes.System:
00448                         cmbContentManipulationMode.SelectedIndex = 0;
00449                         break;
00450                     case ManipulationModes.None:
00451                         cmbContentManipulationMode.SelectedIndex = 1;
00452                         break;
00453                 }
00454             }
00455         }
00456
00457         private void CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e)
00458         {
00459             switch (cmbBackground.SelectedIndex)
00460             {
00461                 case 0:
00462                     scrollViewer.Background = null;
00463                     break;
00464                 case 1:
00465                     scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
00466                     break;
00467                 case 2:
00468                     scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
00469                     break;
00470                 case 3:
00471                     scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.Aqua);
00472                     break;
00473             }
00474         }
00475
00476         private void UpdateCmbBackground()
00477         {
00478             SolidColorBrush bg = scrollViewer.Background as SolidColorBrush;
00479
00480             if (bg == null)
00481             {
00482                 cmbBackground.SelectedIndex = 0;
00483             }
00484             else if (bg.Color == Microsoft.UI.Colors.Transparent)
00485             {
00486                 cmbBackground.SelectedIndex = 1;
00487             }
00488             else if (bg.Color == Microsoft.UI.Colors.AliceBlue)
00489             {
00490                 cmbBackground.SelectedIndex = 2;
00491             }
00492             else if (bg.Color == Microsoft.UI.Colors.Aqua)
00493             {
00494                 cmbBackground.SelectedIndex = 3;
00495             }
00496         }
00497
00498         private void CmbContent_SelectionChanged(object sender, SelectionChangedEventArgs e)
00499         {
00500             try
00501             {
00502                 FrameworkElement currentContent = scrollViewer.Content as FrameworkElement;
00503                 FrameworkElement newContent = null;
00504
00505                 switch (cmbContent.SelectedIndex)
00506                 {
00507                     case 0:
00508                         newContent = null;
00509                         break;
00510                     case 1:
00511                         newContent = smallImg;
00512                         break;
00513                     case 2:
00514                         newContent = largeImg;
00515                         break;
00516                     case 3:
00517                         newContent = rectangle;
00518                         break;
00519                     case 4:
00520                         newContent = button;
00521                         break;
00522                     case 5:
00523                         newContent = border;
00524                         break;
00525                     case 6:
00526                         newContent = populatedBorder;
00527                         break;
00528                     case 7:
00529                         newContent = horizontalStackPanel;
00530                         break;
00531                     case 8:
00532                         newContent = verticalStackPanel;
00533                         break;
00534                     case 9:
00535                         newContent = tilePanel;
00536                         break;
00537                     case 10:
00538                         newContent = viewbox;
00539                         break;
00540                     case 11:
00541                         newContent = textBlock;
00542                         break;
00543                     case 12:
00544                         newContent = repeatButton;
00545                         break;
00546                 }
00547
00548                 if (newContent != null)
00549                 {
00550                     if (chkPreserveProperties.IsChecked == true && currentContent != null)
00551                     {
00552                         newContent.Width = currentContent.Width;
00553                         newContent.Height = currentContent.Height;
00554                         newContent.Margin = currentContent.Margin;
00555                         newContent.HorizontalAlignment = currentContent.HorizontalAlignment;
00556                         newContent.VerticalAlignment = currentContent.VerticalAlignment;
00557
00558                         if (currentContent is Control && newContent is Control)
00559                         {
00560                             ((Control)newContent).Padding = ((Control)currentContent).Padding;
00561                         }
00562                     }
00563
00564                     if ((bool)chkUseTopLeftHeader.IsChecked || (bool)chkUseLeftHeader.IsChecked || (bool)chkUseTopHeader.IsChecked)
00565                     {
00566                         newContent.HorizontalAlignment = HorizontalAlignment.Left;
00567                         newContent.VerticalAlignment = VerticalAlignment.Top;
00568                     }
00569                 }
00570
00571                 scrollViewer.Content = newContent;
00572
00573                 UpdateCmbContentHorizontalAlignment();
00574                 UpdateCmbContentVerticalAlignment();
00575
00576                 _ = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateHeaderSizes);
00577             }
00578             catch (Exception ex)
00579             {
00580                 txtExceptionReport.Text = ex.ToString();
00581                 lstScrollViewerEvents.Items.Add(ex.ToString());
00582
00583                 UpdateCmbContent();
00584             }
00585         }
00586
00587         private void UpdateCmbContent()
00588         {
00589             if (scrollViewer.Content == null)
00590             {
00591                 cmbContent.SelectedIndex = 0;
00592             }
00593             else if (scrollViewer.Content is Image)
00594             {
00595                 if (((scrollViewer.Content as Image).Source as BitmapImage).UriSource.AbsolutePath.ToLower().Contains("large"))
00596                 {
00597                     cmbContent.SelectedIndex = 2;
00598                 }
00599                 else
00600                 {
00601                     cmbContent.SelectedIndex = 1;
00602                 }
00603             }
00604             else if (scrollViewer.Content is Rectangle)
00605             {
00606                 cmbContent.SelectedIndex = 3;
00607             }
00608             else if (scrollViewer.Content is Button)
00609             {
00610                 cmbContent.SelectedIndex = 4;
00611             }
00612             else if (scrollViewer.Content is Border)
00613             {
00614                 if ((scrollViewer.Content as Border).Child is Rectangle)
00615                 {
00616                     cmbContent.SelectedIndex = 5;
00617                 }
00618                 else
00619                 {
00620                     cmbContent.SelectedIndex = 6;
00621                 }
00622             }
00623             else if (scrollViewer.Content is StackPanel)
00624             {
00625                 if ((scrollViewer.Content as StackPanel).Orientation == Orientation.Horizontal)
00626                 {
00627                     cmbContent.SelectedIndex = 7;
00628                 }
00629                 else
00630                 {
00631                     cmbContent.SelectedIndex = 8;
00632                 }
00633             }
00634             else if (scrollViewer.Content is TilePanel)
00635             {
00636                 cmbContent.SelectedIndex = 9;
00637             }
00638             else if (scrollViewer.Content is Viewbox)
00639             {
00640                 cmbContent.SelectedIndex = 10;
00641             }
00642             else if (scrollViewer.Content is TextBlock)
00643             {
00644                 cmbContent.SelectedIndex = 11;
00645             }
00646             else if (scrollViewer.Content is RepeatButton)
00647             {
00648                 cmbContent.SelectedIndex = 12;
00649             }
00650         }
00651
00652         private void UpdateTxtMargin()
00653         {
00654             txtMargin.Text = scrollViewer.Margin.ToString();
00655         }
00656
00657         private void UpdateTxtPadding()
00658         {
00659             txtPadding.Text = scrollViewer.Padding.ToString();
00660         }
00661
00662         private void BtnGetMargin_Click(object sender, RoutedEventArgs e)
00663         {
00664             UpdateTxtMargin();
00665         }
00666
00667         private void BtnSetMargin_Click(object sender, RoutedEventArgs e)
00668         {
00669             try
00670             {
00671                 scrollViewer.Margin = GetThicknessFromString(txtMargin.Text);
00672             }
00673             catch (Exception ex)
00674             {
00675                 txtExceptionReport.Text = ex.ToString();
00676                 lstScrollViewerEvents.Items.Add(ex.ToString());
00677             }
00678         }
00679
00680         private void BtnGetPadding_Click(object sender, RoutedEventArgs e)
00681         {
00682             UpdateTxtPadding();
00683         }
00684
00685         private void BtnSetPadding_Click(object sender, RoutedEventArgs e)
00686         {
00687             try
00688             {
00689                 scrollViewer.Padding = GetThicknessFromString(txtPadding.Text);
00690             }
00691             catch (Exception ex)
00692             {
00693                 txtExceptionReport.Text = ex.ToString();
00694                 lstScrollViewerEvents.Items.Add(ex.ToString());
00695             }
00696         }
00697
00698         private void UpdateChkIsEnabled()
00699         {
00700             chkIsEnabled.IsChecked = scrollViewer.IsEnabled;
00701         }
00702
00703         private void ChkIsEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
00704         {
00705             scrollViewer.IsEnabled = (bool)chkIsEnabled.IsChecked;
00706         }
00707
00708         private void UpdateChkIsTabStop()
00709         {
00710             chkIsTabStop.IsChecked = scrollViewer.IsTabStop;
00711         }
00712
00713         private void ChkIsTabStop_IsCheckedChanged(object sender, RoutedEventArgs e)
00714         {
00715             scrollViewer.IsTabStop = (bool)chkIsTabStop.IsChecked;
00716             UpdateHeaderSizes();
00717         }
00718
00719         private void ChkUseTopLeftHeader_IsCheckedChanged(object sender, RoutedEventArgs e)
00720         {
00721             scrollViewer.TopLeftHeader = (bool)chkUseTopLeftHeader.IsChecked ? rectangleTopLeftHeader : null;
00722             UpdateHeaderSizes();
00723         }
00724
00725         private void ChkUseLeftHeader_IsCheckedChanged(object sender, RoutedEventArgs e)
00726         {
00727             scrollViewer.LeftHeader = (bool)chkUseLeftHeader.IsChecked ? rectangleLeftHeader : null;
00728             UpdateHeaderSizes();
00729         }
00730
00731         private void ChkUseTopHeader_IsCheckedChanged(object sender, RoutedEventArgs e)
00732         {
00733             scrollViewer.TopHeader = (bool)chkUseTopHeader.IsChecked ? rectangleTopHeader : null;
00734         }
00735
00736         private void UpdateHeaderSizes()
00737         {
00738             if (scrollViewer.Content == null)
00739             {
00740                 if (rectangleLeftHeader != null)
00741                 {
00742                     rectangleLeftHeader.Height = 0;
00743                 }
00744                 if (rectangleTopHeader != null)
00745                 {
00746                     rectangleTopHeader.Width = 0;
00747                 }
00748             }
00749             else
00750             {
00751                 if (rectangleLeftHeader != null)
00752                 {
00753                     rectangleLeftHeader.Height = (scrollViewer.Content as FrameworkElement).ActualHeight;
00754                 }
00755                 if (rectangleTopHeader != null)
00756                 {
00757                     rectangleTopHeader.Width = (scrollViewer.Content as FrameworkElement).ActualWidth;
00758                 }
00759             }
00760         }
00761
00762         private void UpdateCmbXYFocusKeyboardNavigation()
00763         {
00764             cmbXYFocusKeyboardNavigation.SelectedIndex = (int)scrollViewer.XYFocusKeyboardNavigation;
00765         }
00766
00767         private void CmbXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00768         {
00769             try
00770             {
00771                 scrollViewer.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;
00772             }
00773             catch (Exception ex)
00774             {
00775                 txtExceptionReport.Text = ex.ToString();
00776                 lstScrollViewerEvents.Items.Add(ex.ToString());
00777             }
00778         }
00779
00780         private void BtnGetContentMinWidth_Click(object sender, RoutedEventArgs e)
00781         {
00782             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00783                 txtContentMinWidth.Text = string.Empty;
00784             else
00785                 txtContentMinWidth.Text = ((FrameworkElement)(scrollViewer.Content)).MinWidth.ToString();
00786         }
00787
00788         private void BtnGetContentWidth_Click(object sender, RoutedEventArgs e)
00789         {
00790             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00791                 txtContentWidth.Text = string.Empty;
00792             else
00793                 txtContentWidth.Text = ((FrameworkElement)(scrollViewer.Content)).Width.ToString();
00794         }
00795
00796         private void BtnGetContentMaxWidth_Click(object sender, RoutedEventArgs e)
00797         {
00798             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00799                 txtContentMaxWidth.Text = string.Empty;
00800             else
00801                 txtContentMaxWidth.Text = ((FrameworkElement)(scrollViewer.Content)).MaxWidth.ToString();
00802         }
00803
00804         private void BtnSetContentMinWidth_Click(object sender, RoutedEventArgs e)
00805         {
00806             try
00807             {
00808                 if (scrollViewer.Content is FrameworkElement)
00809                 {
00810                     ((FrameworkElement)(scrollViewer.Content)).MinWidth = Convert.ToDouble(txtContentMinWidth.Text);
00811                 }
00812             }
00813             catch (Exception ex)
00814             {
00815                 txtExceptionReport.Text = ex.ToString();
00816                 lstScrollViewerEvents.Items.Add(ex.ToString());
00817             }
00818         }
00819
00820         private void BtnSetContentWidth_Click(object sender, RoutedEventArgs e)
00821         {
00822             try
00823             {
00824                 if (scrollViewer.Content is FrameworkElement)
00825                 {
00826                     ((FrameworkElement)(scrollViewer.Content)).Width = Convert.ToDouble(txtContentWidth.Text);
00827                 }
00828             }
00829             catch (Exception ex)
00830             {
00831                 txtExceptionReport.Text = ex.ToString();
00832                 lstScrollViewerEvents.Items.Add(ex.ToString());
00833             }
00834         }
00835
00836         private void BtnSetContentMaxWidth_Click(object sender, RoutedEventArgs e)
00837         {
00838             try
00839             {
00840                 if (scrollViewer.Content is FrameworkElement)
00841                 {
00842                     ((FrameworkElement)(scrollViewer.Content)).MaxWidth = Convert.ToDouble(txtContentMaxWidth.Text);
00843                 }
00844             }
00845             catch (Exception ex)
00846             {
00847                 txtExceptionReport.Text = ex.ToString();
00848                 lstScrollViewerEvents.Items.Add(ex.ToString());
00849             }
00850         }
00851
00852         private void BtnGetContentMinHeight_Click(object sender, RoutedEventArgs e)
00853         {
00854             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00855                 txtContentMinHeight.Text = string.Empty;
00856             else
00857                 txtContentMinHeight.Text = ((FrameworkElement)(scrollViewer.Content)).MinHeight.ToString();
00858         }
00859
00860         private void BtnGetContentHeight_Click(object sender, RoutedEventArgs e)
00861         {
00862             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00863                 txtContentHeight.Text = string.Empty;
00864             else
00865                 txtContentHeight.Text = ((FrameworkElement)(scrollViewer.Content)).Height.ToString();
00866         }
00867
00868         private void BtnGetContentMaxHeight_Click(object sender, RoutedEventArgs e)
00869         {
00870             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00871                 txtContentMaxHeight.Text = string.Empty;
00872             else
00873                 txtContentMaxHeight.Text = ((FrameworkElement)(scrollViewer.Content)).MaxHeight.ToString();
00874         }
00875
00876         private void BtnSetContentMinHeight_Click(object sender, RoutedEventArgs e)
00877         {
00878             try
00879             {
00880                 if (scrollViewer.Content is FrameworkElement)
00881                 {
00882                     ((FrameworkElement)(scrollViewer.Content)).MinHeight = Convert.ToDouble(txtContentMinHeight.Text);
00883                 }
00884             }
00885             catch (Exception ex)
00886             {
00887                 txtExceptionReport.Text = ex.ToString();
00888                 lstScrollViewerEvents.Items.Add(ex.ToString());
00889             }
00890         }
00891
00892         private void BtnSetContentHeight_Click(object sender, RoutedEventArgs e)
00893         {
00894             try
00895             {
00896                 if (scrollViewer.Content is FrameworkElement)
00897                 {
00898                     ((FrameworkElement)(scrollViewer.Content)).Height = Convert.ToDouble(txtContentHeight.Text);
00899                 }
00900             }
00901             catch (Exception ex)
00902             {
00903                 txtExceptionReport.Text = ex.ToString();
00904                 lstScrollViewerEvents.Items.Add(ex.ToString());
00905             }
00906         }
00907
00908         private void BtnSetContentMaxHeight_Click(object sender, RoutedEventArgs e)
00909         {
00910             try
00911             {
00912                 if (scrollViewer.Content is FrameworkElement)
00913                 {
00914                     ((FrameworkElement)(scrollViewer.Content)).MaxHeight = Convert.ToDouble(txtContentMaxHeight.Text);
00915                 }
00916             }
00917             catch (Exception ex)
00918             {
00919                 txtExceptionReport.Text = ex.ToString();
00920                 lstScrollViewerEvents.Items.Add(ex.ToString());
00921             }
00922         }
00923
00924         private void BtnGetContentMargin_Click(object sender, RoutedEventArgs e)
00925         {
00926             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00927                 txtContentMargin.Text = string.Empty;
00928             else
00929                 txtContentMargin.Text = ((FrameworkElement)(scrollViewer.Content)).Margin.ToString();
00930         }
00931
00932         private void BtnSetContentMargin_Click(object sender, RoutedEventArgs e)
00933         {
00934             try
00935             {
00936                 if (scrollViewer.Content is FrameworkElement)
00937                 {
00938                     ((FrameworkElement)(scrollViewer.Content)).Margin = GetThicknessFromString(txtContentMargin.Text);
00939                 }
00940             }
00941             catch (Exception ex)
00942             {
00943                 txtExceptionReport.Text = ex.ToString();
00944                 lstScrollViewerEvents.Items.Add(ex.ToString());
00945             }
00946         }
00947
00948         private void BtnGetContentPadding_Click(object sender, RoutedEventArgs e)
00949         {
00950             if (scrollViewer.Content == null || !(scrollViewer.Content is Control || scrollViewer.Content is Border || scrollViewer.Content is StackPanel))
00951                 txtContentPadding.Text = string.Empty;
00952             else if (scrollViewer.Content is Control)
00953                 txtContentPadding.Text = ((Control)(scrollViewer.Content)).Padding.ToString();
00954             else if (scrollViewer.Content is Border)
00955                 txtContentPadding.Text = ((Border)(scrollViewer.Content)).Padding.ToString();
00956             else
00957                 txtContentPadding.Text = ((StackPanel)(scrollViewer.Content)).Padding.ToString();
00958         }
00959
00960         private void BtnSetContentPadding_Click(object sender, RoutedEventArgs e)
00961         {
00962             try
00963             {
00964                 if (scrollViewer.Content is Control)
00965                 {
00966                     ((Control)(scrollViewer.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
00967                 }
00968                 else if (scrollViewer.Content is Border)
00969                 {
00970                     ((Border)(scrollViewer.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
00971                 }
00972                 else if (scrollViewer.Content is StackPanel)
00973                 {
00974                     ((StackPanel)(scrollViewer.Content)).Padding = GetThicknessFromString(txtContentPadding.Text);
00975                 }
00976             }
00977             catch (Exception ex)
00978             {
00979                 txtExceptionReport.Text = ex.ToString();
00980                 lstScrollViewerEvents.Items.Add(ex.ToString());
00981             }
00982         }
00983
00984         private void BtnGetContentActualWidth_Click(object sender, RoutedEventArgs e)
00985         {
00986             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00987                 txtContentActualWidth.Text = string.Empty;
00988             else
00989                 txtContentActualWidth.Text = (scrollViewer.Content as FrameworkElement).ActualWidth.ToString();
00990         }
00991
00992         private void BtnGetContentActualHeight_Click(object sender, RoutedEventArgs e)
00993         {
00994             if (scrollViewer.Content == null || !(scrollViewer.Content is FrameworkElement))
00995                 txtContentActualHeight.Text = string.Empty;
00996             else
00997                 txtContentActualHeight.Text = (scrollViewer.Content as FrameworkElement).ActualHeight.ToString();
00998         }
00999
01000         private void BtnGetContentDesiredSize_Click(object sender, RoutedEventArgs e)
01001         {
01002             if (scrollViewer.Content == null || !(scrollViewer.Content is UIElement))
01003                 txtContentDesiredSize.Text = string.Empty;
01004             else
01005                 txtContentDesiredSize.Text = (scrollViewer.Content as UIElement).DesiredSize.ToString();
01006         }
01007
01008         private void BtnGetContentRenderSize_Click(object sender, RoutedEventArgs e)
01009         {
01010             if (scrollViewer.Content == null || !(scrollViewer.Content is UIElement))
01011                 txtContentRenderSize.Text = string.Empty;
01012             else
01013                 txtContentRenderSize.Text = (scrollViewer.Content as UIElement).RenderSize.ToString();
01014         }
01015
01016         private void UpdateTxtMinZoomFactor()
01017         {
01018             txtMinZoomFactor.Text = scrollViewer.MinZoomFactor.ToString();
01019         }
01020
01021         private void UpdateTxtMaxZoomFactor()
01022         {
01023             txtMaxZoomFactor.Text = scrollViewer.MaxZoomFactor.ToString();
01024         }
01025
01026         private void BtnGetMinZoomFactor_Click(object sender, RoutedEventArgs e)
01027         {
01028             UpdateTxtMinZoomFactor();
01029         }
01030
01031         private void BtnSetMinZoomFactor_Click(object sender, RoutedEventArgs e)
01032         {
01033             try
01034             {
01035                 scrollViewer.MinZoomFactor = Convert.ToSingle(txtMinZoomFactor.Text);
01036             }
01037             catch (Exception ex)
01038             {
01039                 txtExceptionReport.Text = ex.ToString();
01040                 lstScrollViewerEvents.Items.Add(ex.ToString());
01041             }
01042         }
01043
01044         private void BtnGetMaxZoomFactor_Click(object sender, RoutedEventArgs e)
01045         {
01046             UpdateTxtMaxZoomFactor();
01047         }
01048
01049         private void BtnSetMaxZoomFactor_Click(object sender, RoutedEventArgs e)
01050         {
01051             try
01052             {
01053                 scrollViewer.MaxZoomFactor = Convert.ToSingle(txtMaxZoomFactor.Text);
01054             }
01055             catch (Exception ex)
01056             {
01057                 txtExceptionReport.Text = ex.ToString();
01058                 lstScrollViewerEvents.Items.Add(ex.ToString());
01059             }
01060         }
01061
01062         private void BtnGetHorizontalOffset_Click(object sender, RoutedEventArgs e)
01063         {
01064             tblHorizontalOffset.Text = scrollViewer.HorizontalOffset.ToString();
01065         }
01066
01067         private void BtnGetVerticalOffset_Click(object sender, RoutedEventArgs e)
01068         {
01069             tblVerticalOffset.Text = scrollViewer.VerticalOffset.ToString();
01070         }
01071
01072         private void BtnGetZoomFactor_Click(object sender, RoutedEventArgs e)
01073         {
01074             tblZoomFactor.Text = scrollViewer.ZoomFactor.ToString();
01075         }
01076
01077         private void BtnGetExtentWidth_Click(object sender, RoutedEventArgs e)
01078         {
01079             tblExtentWidth.Text = scrollViewer.ExtentWidth.ToString();
01080         }
01081
01082         private void BtnGetExtentHeight_Click(object sender, RoutedEventArgs e)
01083         {
01084             tblExtentHeight.Text = scrollViewer.ExtentHeight.ToString();
01085         }
01086
01087         private void BtnGetViewportWidth_Click(object sender, RoutedEventArgs e)
01088         {
01089             tblViewportWidth.Text = scrollViewer.ViewportWidth.ToString();
01090         }
01091
01092         private void BtnGetViewportHeight_Click(object sender, RoutedEventArgs e)
01093         {
01094             tblViewportHeight.Text = scrollViewer.ViewportHeight.ToString();
01095         }
01096
01097         private void BtnGetWidth_Click(object sender, RoutedEventArgs e)
01098         {
01099             txtWidth.Text = scrollViewer.Width.ToString();
01100         }
01101
01102         private void BtnSetWidth_Click(object sender, RoutedEventArgs e)
01103         {
01104             try
01105             {
01106                 scrollViewer.Width = Convert.ToDouble(txtWidth.Text);
01107             }
01108             catch (Exception ex)
01109             {
01110                 txtExceptionReport.Text = ex.ToString();
01111                 lstScrollViewerEvents.Items.Add(ex.ToString());
01112             }
01113         }
01114
01115         private void BtnGetMaxWidth_Click(object sender, RoutedEventArgs e)
01116         {
01117             txtMaxWidth.Text = scrollViewer.MaxWidth.ToString();
01118         }
01119
01120         private void BtnSetMaxWidth_Click(object sender, RoutedEventArgs e)
01121         {
01122             try
01123             {
01124                 scrollViewer.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
01125             }
01126             catch (Exception ex)
01127             {
01128                 txtExceptionReport.Text = ex.ToString();
01129                 lstScrollViewerEvents.Items.Add(ex.ToString());
01130             }
01131         }
01132
01133         private void BtnGetHeight_Click(object sender, RoutedEventArgs e)
01134         {
01135             txtHeight.Text = scrollViewer.Height.ToString();
01136         }
01137
01138         private void BtnSetHeight_Click(object sender, RoutedEventArgs e)
01139         {
01140             try
01141             {
01142                 scrollViewer.Height = Convert.ToDouble(txtHeight.Text);
01143             }
01144             catch (Exception ex)
01145             {
01146                 txtExceptionReport.Text = ex.ToString();
01147                 lstScrollViewerEvents.Items.Add(ex.ToString());
01148             }
01149         }
01150
01151         private void BtnGetMaxHeight_Click(object sender, RoutedEventArgs e)
01152         {
01153             txtMaxHeight.Text = scrollViewer.MaxHeight.ToString();
01154         }
01155
01156         private void BtnSetMaxHeight_Click(object sender, RoutedEventArgs e)
01157         {
01158             try
01159             {
01160                 scrollViewer.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
01161             }
01162             catch (Exception ex)
01163             {
01164                 txtExceptionReport.Text = ex.ToString();
01165                 lstScrollViewerEvents.Items.Add(ex.ToString());
01166             }
01167         }
01168
01169         private void BtnGetActualWidth_Click(object sender, RoutedEventArgs e)
01170         {
01171             tblActualWidth.Text = scrollViewer.ActualWidth.ToString();
01172         }
01173
01174         private void BtnGetActualHeight_Click(object sender, RoutedEventArgs e)
01175         {
01176             tblActualHeight.Text = scrollViewer.ActualHeight.ToString();
01177         }
01178
01179         private void BtnClearScrollViewerEvents_Click(object sender, RoutedEventArgs e)
01180         {
01181             lstScrollViewerEvents.Items.Clear();
01182         }
01183
01184         private void BtnChangeView_Click(object sender, RoutedEventArgs e)
01185         {
01186             try
01187             {
01188                 double? horizontalOffset = string.IsNullOrWhiteSpace(txtChangeViewHorizontalOffset.Text) ? (double?)null : Convert.ToDouble(txtChangeViewHorizontalOffset.Text);
01189                 double? verticalOffset = string.IsNullOrWhiteSpace(txtChangeViewVerticalOffset.Text) ? (double?)null : Convert.ToDouble(txtChangeViewVerticalOffset.Text);
01190                 float? zoomFactor = string.IsNullOrWhiteSpace(txtChangeViewZoomFactor.Text) ? (float?)null : Convert.ToSingle(txtChangeViewZoomFactor.Text);
01191                 bool disableAnimation = true;
01192
01193                 if (horizontalOffset == null && verticalOffset == null && zoomFactor == null)
01194                 {
01195                     return;
01196                 }
01197
01198                 switch (cmbChangeViewAnimationMode.SelectedIndex)
01199                 {
01200                     case 0: // Disabled
01201                         break;
01202                     case 1: // Enabled
01203                         disableAnimation = false;
01204                         break;
01205                     default: // Auto
01206                         disableAnimation = !new UISettings().AnimationsEnabled;
01207                         break;
01208                 }
01209
01210                 AppendEventMessage($"ChangeView(horizontalOffset:{horizontalOffset}, verticalOffset:{verticalOffset}, zoomFactor:{zoomFactor}, disableAnimation:{disableAnimation}) from horizontalOffset:{scrollViewer.HorizontalOffset}, verticalOffset:{scrollViewer.VerticalOffset}, zoomFactor:{scrollViewer.ZoomFactor}");
01211
01212                 bool result = scrollViewer.ChangeView(horizontalOffset, verticalOffset, zoomFactor, disableAnimation);
01213             }
01214             catch (Exception ex)
01215             {
01216                 txtExceptionReport.Text = ex.ToString();
01217                 lstScrollViewerEvents.Items.Add(ex.ToString());
01218             }
01219         }
01220
01221         private void AppendEventMessage(string message)
01222         {
01223             lstScrollViewerEvents.Items.Add(message);
01224         }
01225
01226         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
01227         {
01228             txtExceptionReport.Text = string.Empty;
01229         }
01230
01231         private Thickness GetThicknessFromString(string thickness)
01232         {
01233             string[] lengths = thickness.Split(',');
01234             if (lengths.Length < 4)
01235                 return new Thickness(Convert.ToDouble(lengths[0]));
01236             else
01237                 return new Thickness(
01238                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
01239         }
01240     }
01241 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComboBoxHelper Member List

This is the complete list of members for ComboBoxHelper, including all inherited members.
ClearProperties() | ComboBoxHelper | [static]
ComboBoxHelper() | ComboBoxHelper |
ComboBoxHelperProperties() | ComboBoxHelperProperties |
DropDownEventRevokersProperty() | ComboBoxHelper | [inline, static]
EnsureProperties() | ComboBoxHelper | [static]
GetKeepInteriorCornersSquare(winrt::ComboBox const &target) | ComboBoxHelperProperties | [static]
IsPopupOpenDown(const winrt::ComboBox &comboBox) | ComboBoxHelper | [private, static]
KeepInteriorCornersSquareProperty() | ComboBoxHelperProperties | [inline, static]
OnDropDownClosed(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ComboBoxHelper | [private, static]
OnDropDownOpened(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ComboBoxHelper | [private, static]
OnKeepInteriorCornersSquarePropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args) | ComboBoxHelper | [static]
s_DropDownEventRevokersProperty | ComboBoxHelper | [static]
s_KeepInteriorCornersSquareProperty | ComboBoxHelperProperties | [static]
SetKeepInteriorCornersSquare(winrt::ComboBox const &target, bool value) | ComboBoxHelperProperties | [static]
UpdateCornerRadius(const winrt::ComboBox &comboBox, bool isDropDownOpen) | ComboBoxHelper | [private, static]
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ZoomFactorChange Member List

This is the complete list of members for ZoomFactorChange, including all inherited members.
CenterPoint() const | ZoomFactorChange | [inline]
Options() const | ViewChange | [inline]
ViewChange(ScrollPresenterViewKind viewKind, winrt::IInspectable const &options) | ViewChange |
ViewKind() const | ViewChange | [inline]
ZoomFactor() const | ZoomFactorChange | [inline]
ZoomFactorChange(float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, ScrollPresenterViewKind zoomFactorKind, winrt::IInspectable const &options) | ZoomFactorChange |
~ViewChange() | ViewChange |
~ZoomFactorChange() | ZoomFactorChange |
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControlTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

PagerControlTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class PagerControlTemplateSettingsProperties
00008 {
00009 public:
00010     PagerControlTemplateSettingsProperties();
00011
00012     void NumberPanelItems(winrt::IVector<winrt::IInspectable> const& value);
00013     winrt::IVector<winrt::IInspectable> NumberPanelItems();
00014
00015     void Pages(winrt::IVector<winrt::IInspectable> const& value);
00016     winrt::IVector<winrt::IInspectable> Pages();
00017
00018     static winrt::DependencyProperty NumberPanelItemsProperty() { return s_NumberPanelItemsProperty; }
00019     static winrt::DependencyProperty PagesProperty() { return s_PagesProperty; }
00020
00021     static GlobalDependencyProperty s_NumberPanelItemsProperty;
00022     static GlobalDependencyProperty s_PagesProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonElementFactory Member List

This is the complete list of members for PersonElementFactory, including all inherited members.
_personTemplate | PersonElementFactory | [private]
GetElementCore(ElementFactoryGetArgs args) | PersonElementFactory | [inline, protected]
PersonElementFactory(DataTemplate personTemplate) | PersonElementFactory | [inline]
RecycleElementCore(ElementFactoryRecycleArgs args) | PersonElementFactory | [inline, protected]
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanelLayoutContext.cpp Source File

  • File List
  • File Members
  • LayoutPanel

LayoutPanelLayoutContext.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "LayoutPanel.h"
00007 #include "LayoutPanelLayoutContext.h"
00008
00009 LayoutPanelLayoutContext::LayoutPanelLayoutContext(winrt::LayoutPanel const& owner)
00010 {
00011     m_owner = winrt::make_weak(owner);
00012 }
00013
00014 winrt::IVectorView<winrt::UIElement> LayoutPanelLayoutContext::ChildrenCore()
00015 {
00016     return winrt::get_self<LayoutPanel>(GetOwner())->Children().GetView();
00017 }
00018
00019 winrt::IInspectable LayoutPanelLayoutContext::LayoutStateCore()
00020 {
00021     return winrt::get_self<LayoutPanel>(GetOwner())->LayoutState();
00022 }
00023
00024 void LayoutPanelLayoutContext::LayoutStateCore(winrt::IInspectable const& value)
00025 {
00026     winrt::get_self<LayoutPanel>(GetOwner())->LayoutState(value);
00027 }
00028
00029 winrt::LayoutPanel LayoutPanelLayoutContext::GetOwner()
00030 {
00031     return m_owner.get();
00032 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/InteractionTests/TeachingTipFocusTestPageElements.cs Source File

  • File List
  • File Members
  • TeachingTip
  • InteractionTests

TeachingTipFocusTestPageElements.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00006
00007 using WEX.TestExecution;
00008 using WEX.TestExecution.Markup;
00009 using WEX.Logging.Interop;
00010
00011 using Microsoft.Windows.Apps.Test.Automation;
00012 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00013 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00014 using Microsoft.Windows.Apps.Test.Foundation;
00015
00016 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00017 {
00018     class TeachingTipFocusTestPageElements
00019     {
00020         public Button GetOpenButton()
00021         {
00022             return GetElement(ref openButton, "OpenButton");
00023         }
00024         private Button openButton;
00025
00026         public Button GetCloseButton()
00027         {
00028             return GetElement(ref closeButton, "CloseButton");
00029         }
00030         private Button closeButton;
00031
00032         public CheckBox GetIsOpenCheckBox()
00033         {
00034             return GetElement(ref isOpenCheckBox, "IsOpenCheckBox");
00035         }
00036         private CheckBox isOpenCheckBox;
00037
00038         public CheckBox GetIsIdleCheckBox()
00039         {
00040             return GetElement(ref isIdleCheckBox, "IsIdleCheckBox");
00041         }
00042         private CheckBox isIdleCheckBox;
00043
00044         public CheckBox GetIsLightDismissEnabledCheckBox()
00045         {
00046             return GetElement(ref isLightDismissEnabledCheckBox, "IsLightDismissEnabledCheckBox");
00047         }
00048         private CheckBox isLightDismissEnabledCheckBox;
00049
00050         public UIObject GetTeachingTipCloseButton()
00051         {
00052             ElementCache.Clear();
00053             var element = GetElement(ref teachingTipCloseButton, "Close TeachingTip");
00054             teachingTipCloseButton = null;
00055             return element;
00056         }
00057         private UIObject teachingTipCloseButton;
00058
00059         private T GetElement<T>(ref T element, string elementName) where T : UIObject
00060         {
00061             if (element == null)
00062             {
00063                 Log.Comment("Find the " + elementName);
00064                 element = FindElement.ByNameOrId<T>(elementName);
00065                 Verify.IsNotNull(element);
00066             }
00067             return element;
00068         }
00069     }
00070 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvasAutomationPeer.idl Source File

  • File List
  • File Members
  • InkCanvas

InkCanvasAutomationPeer.idl

Go to the documentation of this file.
00001 namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PREVIEW]
00005 unsealed runtimeclass InkCanvasAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00006 {
00007     InkCanvasAutomationPeer(MU_XC_NAMESPACE.InkCanvas owner);
00008 }
00009
00010 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPictureTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

PersonPictureTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PersonPictureTemplateSettings.h"
00008
00009 GlobalDependencyProperty PersonPictureTemplateSettingsProperties::s_ActualImageBrushProperty{ nullptr };
00010 GlobalDependencyProperty PersonPictureTemplateSettingsProperties::s_ActualInitialsProperty{ nullptr };
00011
00012 PersonPictureTemplateSettingsProperties::PersonPictureTemplateSettingsProperties()
00013 {
00014     EnsureProperties();
00015 }
00016
00017 void PersonPictureTemplateSettingsProperties::EnsureProperties()
00018 {
00019     if (!s_ActualImageBrushProperty)
00020     {
00021         s_ActualImageBrushProperty =
00022             InitializeDependencyProperty(
00023                 L"ActualImageBrush",
00024                 winrt::name_of<winrt::ImageBrush>(),
00025                 winrt::name_of<winrt::PersonPictureTemplateSettings>(),
00026                 false /* isAttached */,
00027                 ValueHelper<winrt::ImageBrush>::BoxedDefaultValue(),
00028                 nullptr);
00029     }
00030     if (!s_ActualInitialsProperty)
00031     {
00032         s_ActualInitialsProperty =
00033             InitializeDependencyProperty(
00034                 L"ActualInitials",
00035                 winrt::name_of<winrt::hstring>(),
00036                 winrt::name_of<winrt::PersonPictureTemplateSettings>(),
00037                 false /* isAttached */,
00038                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00039                 nullptr);
00040     }
00041 }
00042
00043 void PersonPictureTemplateSettingsProperties::ClearProperties()
00044 {
00045     s_ActualImageBrushProperty = nullptr;
00046     s_ActualInitialsProperty = nullptr;
00047 }
00048
00049 void PersonPictureTemplateSettingsProperties::ActualImageBrush(winrt::ImageBrush const& value)
00050 {
00051     [[gsl::suppress(con)]]
00052     {
00053     static_cast<PersonPictureTemplateSettings*>(this)->SetValue(s_ActualImageBrushProperty, ValueHelper<winrt::ImageBrush>::BoxValueIfNecessary(value));
00054     }
00055 }
00056
00057 winrt::ImageBrush PersonPictureTemplateSettingsProperties::ActualImageBrush()
00058 {
00059     return ValueHelper<winrt::ImageBrush>::CastOrUnbox(static_cast<PersonPictureTemplateSettings*>(this)->GetValue(s_ActualImageBrushProperty));
00060 }
00061
00062 void PersonPictureTemplateSettingsProperties::ActualInitials(winrt::hstring const& value)
00063 {
00064     [[gsl::suppress(con)]]
00065     {
00066     static_cast<PersonPictureTemplateSettings*>(this)->SetValue(s_ActualInitialsProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00067     }
00068 }
00069
00070 winrt::hstring PersonPictureTemplateSettingsProperties::ActualInitials()
00071 {
00072     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PersonPictureTemplateSettings*>(this)->GetValue(s_ActualInitialsProperty));
00073 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ElementFactory.properties.cpp Source File

  • File List
  • File Members
  • Generated

ElementFactory.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ElementFactory.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ElementFactory)
00012 }
00013
00014 #include "ElementFactory.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MUXControlsTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

MUXControlsTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MUXControlsTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(MUXControlsTestHooks)
00012 }
00013
00014 #include "MUXControlsTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRingTemplateSettings.cpp Source File

  • File List
  • File Members
  • ProgressRing

ProgressRingTemplateSettings.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ProgressRingTemplateSettings.h"
00007
00008 ProgressRingTemplateSettings::ProgressRingTemplateSettings()
00009 {
00010     EnsureProperties();
00011 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTip.cpp Source File

  • File List
  • File Members
  • TeachingTip

TeachingTip.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TeachingTip.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009 #include "TeachingTipClosingEventArgs.h"
00010 #include "TeachingTipClosedEventArgs.h"
00011 #include "TeachingTipTestHooks.h"
00012 #include "TeachingTipAutomationPeer.h"
00013 #include "../ResourceHelper/Utils.h"
00014 #include <enum_array.h>
00015
00016 static constexpr auto c_TitleTextBlockVisibleStateName = L"ShowTitleTextBlock"sv;
00017 static constexpr auto c_TitleTextBlockCollapsedStateName = L"CollapseTitleTextBlock"sv;
00018 static constexpr auto c_SubtitleTextBlockVisibleStateName = L"ShowSubtitleTextBlock"sv;
00019 static constexpr auto c_SubtitleTextBlockCollapsedStateName = L"CollapseSubtitleTextBlock"sv;
00020
00021 static constexpr auto c_OverlayCornerRadiusName = L"OverlayCornerRadius"sv;
00022
00023 TeachingTip::TeachingTip()
00024 {
00025     __RP_Marker_ClassById(RuntimeProfiler::ProfId_TeachingTip);
00026     SetDefaultStyleKey(this);
00027     EnsureProperties();
00028     Unloaded({ this, &TeachingTip::ClosePopupOnUnloadEvent });
00029     m_automationNameChangedRevoker = RegisterPropertyChanged(*this, winrt::AutomationProperties::NameProperty(), { this, &TeachingTip::OnAutomationNameChanged });
00030     m_automationIdChangedRevoker = RegisterPropertyChanged(*this, winrt::AutomationProperties::AutomationIdProperty(), { this, &TeachingTip::OnAutomationIdChanged });
00031     SetValue(s_TemplateSettingsProperty, winrt::make<::TeachingTipTemplateSettings>());
00032 }
00033
00034 winrt::AutomationPeer TeachingTip::OnCreateAutomationPeer()
00035 {
00036     return winrt::make<TeachingTipAutomationPeer>(*this);
00037 }
00038
00039 void TeachingTip::OnApplyTemplate()
00040 {
00041     base_type::OnApplyTemplate();
00042
00043     m_acceleratorKeyActivatedRevoker.revoke();
00044     m_previewKeyDownForF6Revoker.revoke();
00045     m_effectiveViewportChangedRevoker.revoke();
00046     m_contentSizeChangedRevoker.revoke();
00047     m_closeButtonClickedRevoker.revoke();
00048     m_alternateCloseButtonClickedRevoker.revoke();
00049     m_actionButtonClickedRevoker.revoke();
00050
00051     winrt::IControlProtected controlProtected{ *this };
00052
00053     m_container.set(GetTemplateChildT<winrt::Border>(s_containerName, controlProtected));
00054     m_rootElement.set(m_container.get().Child());
00055     m_tailOcclusionGrid.set(GetTemplateChildT<winrt::Grid>(s_tailOcclusionGridName, controlProtected));
00056     m_contentRootGrid.set(GetTemplateChildT<winrt::Grid>(s_contentRootGridName, controlProtected));
00057     m_nonHeroContentRootGrid.set(GetTemplateChildT<winrt::Grid>(s_nonHeroContentRootGridName, controlProtected));
00058     m_heroContentBorder.set(GetTemplateChildT<winrt::Border>(s_heroContentBorderName, controlProtected));
00059     m_actionButton.set(GetTemplateChildT<winrt::Button>(s_actionButtonName, controlProtected));
00060     m_alternateCloseButton.set(GetTemplateChildT<winrt::Button>(s_alternateCloseButtonName, controlProtected));
00061     m_closeButton.set(GetTemplateChildT<winrt::Button>(s_closeButtonName, controlProtected));
00062     m_tailEdgeBorder.set(GetTemplateChildT<winrt::Grid>(s_tailEdgeBorderName, controlProtected));
00063     m_tailPolygon.set(GetTemplateChildT<winrt::Polygon>(s_tailPolygonName, controlProtected));
00064     ToggleVisibilityForEmptyContent(c_TitleTextBlockVisibleStateName, c_TitleTextBlockCollapsedStateName, Title());
00065     ToggleVisibilityForEmptyContent(c_SubtitleTextBlockVisibleStateName, c_SubtitleTextBlockCollapsedStateName, Subtitle());
00066
00067
00068     if (auto&& container = m_container.get())
00069     {
00070         container.Child(nullptr);
00071     }
00072
00073     m_contentSizeChangedRevoker = [this]()
00074     {
00075         if (auto && tailOcclusionGrid = m_tailOcclusionGrid.get())
00076         {
00077             return tailOcclusionGrid.SizeChanged(winrt::auto_revoke, { this, &TeachingTip::OnContentSizeChanged });
00078         }
00079         return winrt::FrameworkElement::SizeChanged_revoker{};
00080     }();
00081
00082     if (auto&& contentRootGrid = m_contentRootGrid.get())
00083     {
00084         winrt::AutomationProperties::SetLocalizedLandmarkType(contentRootGrid, ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipCustomLandmarkName));
00085     }
00086
00087     m_closeButtonClickedRevoker = [this]()
00088     {
00089         if (auto&& closeButton = m_closeButton.get())
00090         {
00091             return closeButton.Click(winrt::auto_revoke, { this, &TeachingTip::OnCloseButtonClicked });
00092         }
00093         return winrt::Button::Click_revoker{};
00094     }();
00095
00096     m_alternateCloseButtonClickedRevoker = [this]()
00097     {
00098         if (auto&& alternateCloseButton = m_alternateCloseButton.get())
00099         {
00100             winrt::AutomationProperties::SetName(alternateCloseButton, ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipAlternateCloseButtonName));
00101             winrt::ToolTip tooltip = winrt::ToolTip();
00102             tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipAlternateCloseButtonTooltip)));
00103             winrt::ToolTipService::SetToolTip(alternateCloseButton, tooltip);
00104             return alternateCloseButton.Click(winrt::auto_revoke, { this, &TeachingTip::OnCloseButtonClicked });
00105         }
00106         return winrt::Button::Click_revoker{};
00107     }();
00108
00109     m_actionButtonClickedRevoker = [this]()
00110     {
00111         if (auto&& actionButton = m_actionButton.get())
00112         {
00113             return actionButton.Click(winrt::auto_revoke, { this, &TeachingTip::OnActionButtonClicked });
00114         }
00115         return winrt::Button::Click_revoker{};
00116     }();
00117
00118     UpdateButtonsState();
00119     OnIsLightDismissEnabledChanged();
00120     OnIconSourceChanged();
00121     OnHeroContentPlacementChanged();
00122
00123     UpdateButtonAutomationProperties(m_actionButton.get(), ActionButtonContent());
00124     UpdateButtonAutomationProperties(m_closeButton.get(), CloseButtonContent());
00125
00126     EstablishShadows();
00127
00128     m_isTemplateApplied = true;
00129 }
00130
00131 void TeachingTip::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00132 {
00133     winrt::IDependencyProperty property = args.Property();
00134
00135     if (property == s_IsOpenProperty)
00136     {
00137         OnIsOpenChanged();
00138     }
00139     else if (property == s_TargetProperty)
00140     {
00141         // Unregister from old target if it exists
00142         if (args.OldValue()) {
00143             m_TargetUnloadedRevoker.revoke();
00144         }
00145
00146         // Register to new target if it exists
00147         if (const auto& value = args.NewValue()) {
00148             winrt::FrameworkElement newTarget = unbox_value<winrt::FrameworkElement >(value);
00149             m_TargetUnloadedRevoker = newTarget.Unloaded(winrt::auto_revoke, { this,&TeachingTip::ClosePopupOnUnloadEvent });
00150         }
00151         OnTargetChanged();
00152     }
00153     else if (property == s_PlacementMarginProperty)
00154     {
00155         OnPlacementMarginChanged();
00156     }
00157     else if (property == s_IsLightDismissEnabledProperty)
00158     {
00159         OnIsLightDismissEnabledChanged();
00160     }
00161     else if (property == s_ShouldConstrainToRootBoundsProperty)
00162     {
00163         OnShouldConstrainToRootBoundsChanged();
00164     }
00165     else if (property == s_TailVisibilityProperty)
00166     {
00167         OnTailVisibilityChanged();
00168     }
00169     else if (property == s_PreferredPlacementProperty)
00170     {
00171         if (IsOpen())
00172         {
00173             PositionPopup();
00174         }
00175     }
00176     else if (property == s_HeroContentPlacementProperty)
00177     {
00178         OnHeroContentPlacementChanged();
00179     }
00180     else if (property == s_IconSourceProperty)
00181     {
00182         OnIconSourceChanged();
00183     }
00184     else if (property == s_TitleProperty)
00185     {
00186         SetPopupAutomationProperties();
00187         if (ToggleVisibilityForEmptyContent(c_TitleTextBlockVisibleStateName, c_TitleTextBlockCollapsedStateName, Title()))
00188         {
00189             TeachingTipTestHooks::NotifyTitleVisibilityChanged(*this);
00190         }
00191     }
00192     else if (property == s_SubtitleProperty)
00193     {
00194         if (ToggleVisibilityForEmptyContent(c_SubtitleTextBlockVisibleStateName, c_SubtitleTextBlockCollapsedStateName, Subtitle()))
00195         {
00196             TeachingTipTestHooks::NotifySubtitleVisibilityChanged(*this);
00197         }
00198     }
00199     else if (property == s_ActionButtonContentProperty)
00200     {
00201         UpdateButtonsState();
00202         winrt::IInspectable value = args.NewValue();
00203         UpdateButtonAutomationProperties(m_actionButton.get(), value);
00204     }
00205     else if (property == s_CloseButtonContentProperty)
00206     {
00207         UpdateButtonsState();
00208         winrt::IInspectable value = args.NewValue();
00209         UpdateButtonAutomationProperties(m_closeButton.get(), value);
00210     }
00211
00212 }
00213
00214 void TeachingTip::UpdateButtonAutomationProperties(const winrt::Button button, const winrt::IInspectable content)
00215 {
00216     if (button)
00217     {
00218         winrt::hstring nameHString = SharedHelpers::TryGetStringRepresentationFromObject(content);
00219         winrt::AutomationProperties::SetName(button, nameHString);
00220     }
00221 }
00222
00223 bool TeachingTip::ToggleVisibilityForEmptyContent(const wstring_view visibleStateName, const wstring_view collapsedStateName, const winrt::hstring& content)
00224 {
00225
00226     if (content != L"")
00227     {
00228         winrt::VisualStateManager::GoToState(*this, visibleStateName, false);
00229         return true;
00230     }
00231     else
00232     {
00233         winrt::VisualStateManager::GoToState(*this, collapsedStateName, false);
00234         return true;
00235     }
00236     return false;
00237 }
00238
00239 void TeachingTip::OnContentChanged(const winrt::IInspectable& oldContent, const winrt::IInspectable& newContent)
00240 {
00241     if (newContent)
00242     {
00243         winrt::VisualStateManager::GoToState(*this, L"Content"sv, false);
00244     }
00245     else
00246     {
00247         winrt::VisualStateManager::GoToState(*this, L"NoContent"sv, false);
00248     }
00249 }
00250
00251 void TeachingTip::SetPopupAutomationProperties()
00252 {
00253     if (auto&& popup = m_popup.get())
00254     {
00255         auto name = winrt::AutomationProperties::GetName(*this);
00256         if (name.empty())
00257         {
00258             name = Title();
00259         }
00260         winrt::AutomationProperties::SetName(popup, name);
00261
00262         winrt::AutomationProperties::SetAutomationId(popup, winrt::AutomationProperties::GetAutomationId(*this));
00263     }
00264 }
00265
00266 // Playing a closing animation when the Teaching Tip is closed via light dismiss requires this work around.
00267 // This is because there is no event that occurs when a popup is closing due to light dismiss so we have no way to intercept
00268 // the close and play our animation first. To work around this we've created a second popup which has no content and sits
00269 // underneath the teaching tip and is put into light dismiss mode instead of the primary popup. Then when this popup closes
00270 // due to light dismiss we know we are supposed to close the primary popup as well. To ensure that this popup does not block
00271 // interaction to the primary popup we need to make sure that the LightDismissIndicatorPopup is always opened first, so that
00272 // it is Z ordered underneath the primary popup.
00273 void TeachingTip::CreateLightDismissIndicatorPopup()
00274 {
00275     auto const popup = winrt::Popup();
00276     // Set XamlRoot on the popup to handle XamlIsland/AppWindow scenarios.
00277     popup.XamlRoot(this->XamlRoot());
00278     // A Popup needs contents to open, so set a child that doesn't do anything.
00279     auto const grid = winrt::Grid();
00280     popup.Child(grid);
00281
00282     m_lightDismissIndicatorPopup.set(popup);
00283 }
00284
00285 bool TeachingTip::UpdateTail()
00286 {
00287     // An effective placement of auto indicates that no tail should be shown.
00288     auto const [placement, tipDoesNotFit] = DetermineEffectivePlacement();
00289     m_currentEffectiveTailPlacementMode = placement;
00290     const auto tailVisibility = TailVisibility();
00291     if (tailVisibility == winrt::TeachingTipTailVisibility::Collapsed || (!m_target && tailVisibility != winrt::TeachingTipTailVisibility::Visible))
00292     {
00293         m_currentEffectiveTailPlacementMode = winrt::TeachingTipPlacementMode::Auto;
00294     }
00295
00296     if (placement != m_currentEffectiveTipPlacementMode)
00297     {
00298         m_currentEffectiveTipPlacementMode = placement;
00299         TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
00300     }
00301
00302     auto&& nullableTailOcclusionGrid = m_tailOcclusionGrid.get();
00303
00304     auto const height = nullableTailOcclusionGrid ? static_cast<float>(nullableTailOcclusionGrid.ActualHeight()) : 0;
00305     auto const width = nullableTailOcclusionGrid ? static_cast<float>(nullableTailOcclusionGrid.ActualWidth()) : 0;
00306
00307     auto const [firstColumnWidth, secondColumnWidth, nextToLastColumnWidth, lastColumnWidth] = [this, nullableTailOcclusionGrid]()
00308     {
00309         if (auto const columnDefinitions = nullableTailOcclusionGrid ? nullableTailOcclusionGrid.ColumnDefinitions() : nullptr)
00310         {
00311             auto const firstColumnWidth = columnDefinitions.Size() > 0 ? static_cast<float>(columnDefinitions.GetAt(0).ActualWidth()) : 0.0f;
00312             auto const secondColumnWidth = columnDefinitions.Size() > 1 ? static_cast<float>(columnDefinitions.GetAt(1).ActualWidth()) : 0.0f;
00313             auto const nextToLastColumnWidth = columnDefinitions.Size() > 1 ? static_cast<float>(columnDefinitions.GetAt(columnDefinitions.Size() - 2).ActualWidth()) : 0.0f;
00314             auto const lastColumnWidth = columnDefinitions.Size() > 0 ? static_cast<float>(columnDefinitions.GetAt(columnDefinitions.Size() - 1).ActualWidth()) : 0.0f;
00315
00316             return std::make_tuple(firstColumnWidth, secondColumnWidth, nextToLastColumnWidth, lastColumnWidth);
00317         }
00318         return std::make_tuple(0.0f, 0.0f, 0.0f, 0.0f);
00319     }();
00320
00321     auto const [firstRowHeight, secondRowHeight, nextToLastRowHeight, lastRowHeight] = [this, nullableTailOcclusionGrid]()
00322     {
00323         if (auto const rowDefinitions = nullableTailOcclusionGrid ? nullableTailOcclusionGrid.RowDefinitions() : nullptr)
00324         {
00325             auto const firstRowHeight = rowDefinitions.Size() > 0 ? static_cast<float>(rowDefinitions.GetAt(0).ActualHeight()) : 0.0f;
00326             auto const secondRowHeight = rowDefinitions.Size() > 1 ? static_cast<float>(rowDefinitions.GetAt(1).ActualHeight()) : 0.0f;
00327             auto const nextToLastRowHeight = rowDefinitions.Size() > 1 ? static_cast<float>(rowDefinitions.GetAt(rowDefinitions.Size() - 2).ActualHeight()) : 0.0f;
00328             auto const lastRowHeight = rowDefinitions.Size() > 0 ? static_cast<float>(rowDefinitions.GetAt(rowDefinitions.Size() - 1).ActualHeight()) : 0.0f;
00329
00330             return std::make_tuple(firstRowHeight, secondRowHeight, nextToLastRowHeight, lastRowHeight);
00331         }
00332         return std::make_tuple(0.0f, 0.0f, 0.0f, 0.0f);
00333     }();
00334
00335     UpdateSizeBasedTemplateSettings();
00336
00337     switch (m_currentEffectiveTailPlacementMode)
00338     {
00339     // An effective placement of auto means the tip should not display a tail.
00340     case winrt::TeachingTipPlacementMode::Auto:
00341         TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, height / 2, 0.0f });
00342         UpdateDynamicHeroContentPlacementToTop();
00343         winrt::VisualStateManager::GoToState(*this, L"Untargeted"sv, false);
00344         break;
00345
00346     case winrt::TeachingTipPlacementMode::Top:
00347         TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, height - lastRowHeight, 0.0f });
00348         TrySetCenterPoint(m_tailEdgeBorder.get(), { (width / 2) - firstColumnWidth, 0.0f, 0.0f });
00349         UpdateDynamicHeroContentPlacementToTop();
00350         winrt::VisualStateManager::GoToState(*this, L"Top"sv, false);
00351         break;
00352
00353     case winrt::TeachingTipPlacementMode::Bottom:
00354         TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, firstRowHeight, 0.0f });
00355         TrySetCenterPoint(m_tailEdgeBorder.get(), { (width / 2) - firstColumnWidth, 0.0f, 0.0f });
00356         UpdateDynamicHeroContentPlacementToBottom();
00357         winrt::VisualStateManager::GoToState(*this, L"Bottom"sv, false);
00358         break;
00359
00360     case winrt::TeachingTipPlacementMode::Left:
00361         TrySetCenterPoint(nullableTailOcclusionGrid, { width - lastColumnWidth, (height / 2), 0.0f });
00362         TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, (height / 2) - firstRowHeight, 0.0f });
00363         UpdateDynamicHeroContentPlacementToTop();
00364         winrt::VisualStateManager::GoToState(*this, L"Left"sv, false);
00365         break;
00366
00367     case winrt::TeachingTipPlacementMode::Right:
00368         TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth, height / 2, 0.0f });
00369         TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, (height / 2) - firstRowHeight, 0.0f });
00370         UpdateDynamicHeroContentPlacementToTop();
00371         winrt::VisualStateManager::GoToState(*this, L"Right"sv, false);
00372         break;
00373
00374     case winrt::TeachingTipPlacementMode::TopRight:
00375         TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth + secondColumnWidth + 1, height - lastRowHeight, 0.0f });
00376         TrySetCenterPoint(m_tailEdgeBorder.get(), { secondColumnWidth, 0.0f, 0.0f });
00377         UpdateDynamicHeroContentPlacementToTop();
00378         winrt::VisualStateManager::GoToState(*this, L"TopRight"sv, false);
00379         break;
00380
00381     case winrt::TeachingTipPlacementMode::TopLeft:
00382         TrySetCenterPoint(nullableTailOcclusionGrid, { width - (nextToLastColumnWidth + lastColumnWidth + 1), height - lastRowHeight, 0.0f });
00383         TrySetCenterPoint(m_tailEdgeBorder.get(), { width - (nextToLastColumnWidth + firstColumnWidth + lastColumnWidth), 0.0f, 0.0f });
00384         UpdateDynamicHeroContentPlacementToTop();
00385         winrt::VisualStateManager::GoToState(*this, L"TopLeft"sv, false);
00386         break;
00387
00388     case winrt::TeachingTipPlacementMode::BottomRight:
00389         TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth + secondColumnWidth + 1, firstRowHeight, 0.0f });
00390         TrySetCenterPoint(m_tailEdgeBorder.get(), { secondColumnWidth, 0.0f, 0.0f });
00391         UpdateDynamicHeroContentPlacementToBottom();
00392         winrt::VisualStateManager::GoToState(*this, L"BottomRight"sv, false);
00393         break;
00394
00395     case winrt::TeachingTipPlacementMode::BottomLeft:
00396         TrySetCenterPoint(nullableTailOcclusionGrid, { width - (nextToLastColumnWidth + lastColumnWidth + 1), firstRowHeight, 0.0f });
00397         TrySetCenterPoint(m_tailEdgeBorder.get(), { width - (nextToLastColumnWidth + firstColumnWidth + lastColumnWidth), 0.0f, 0.0f });
00398         UpdateDynamicHeroContentPlacementToBottom();
00399         winrt::VisualStateManager::GoToState(*this, L"BottomLeft"sv, false);
00400         break;
00401
00402     case winrt::TeachingTipPlacementMode::LeftTop:
00403         TrySetCenterPoint(nullableTailOcclusionGrid, { width - lastColumnWidth,  height - (nextToLastRowHeight + lastRowHeight + 1), 0.0f });
00404         TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f,  height - (nextToLastRowHeight + firstRowHeight + lastRowHeight), 0.0f });
00405         UpdateDynamicHeroContentPlacementToTop();
00406         winrt::VisualStateManager::GoToState(*this, L"LeftTop"sv, false);
00407         break;
00408
00409     case winrt::TeachingTipPlacementMode::LeftBottom:
00410         TrySetCenterPoint(nullableTailOcclusionGrid, { width - lastColumnWidth, (firstRowHeight + secondRowHeight + 1), 0.0f });
00411         TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, secondRowHeight, 0.0f });
00412         UpdateDynamicHeroContentPlacementToBottom();
00413         winrt::VisualStateManager::GoToState(*this, L"LeftBottom"sv, false);
00414         break;
00415
00416     case winrt::TeachingTipPlacementMode::RightTop:
00417         TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth, height - (nextToLastRowHeight + lastRowHeight + 1), 0.0f });
00418         TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, height - (nextToLastRowHeight + firstRowHeight + lastRowHeight), 0.0f });
00419         UpdateDynamicHeroContentPlacementToTop();
00420         winrt::VisualStateManager::GoToState(*this, L"RightTop"sv, false);
00421         break;
00422
00423     case winrt::TeachingTipPlacementMode::RightBottom:
00424         TrySetCenterPoint(nullableTailOcclusionGrid, { firstColumnWidth, (firstRowHeight + secondRowHeight + 1), 0.0f });
00425         TrySetCenterPoint(m_tailEdgeBorder.get(), { 0.0f, secondRowHeight, 0.0f });
00426         UpdateDynamicHeroContentPlacementToBottom();
00427         winrt::VisualStateManager::GoToState(*this, L"RightBottom"sv, false);
00428         break;
00429
00430     case winrt::TeachingTipPlacementMode::Center:
00431         TrySetCenterPoint(nullableTailOcclusionGrid, { width / 2, height - lastRowHeight, 0.0f });
00432         TrySetCenterPoint(m_tailEdgeBorder.get(), { (width / 2) - firstColumnWidth, 0.0f, 0.0f });
00433         UpdateDynamicHeroContentPlacementToTop();
00434         winrt::VisualStateManager::GoToState(*this, L"Center"sv, false);
00435         break;
00436
00437     default:
00438         break;
00439     }
00440
00441     return tipDoesNotFit;
00442 }
00443
00444 void TeachingTip::PositionPopup()
00445 {
00446     bool tipDoesNotFit = false;
00447     if (m_target)
00448     {
00449         tipDoesNotFit = PositionTargetedPopup();
00450     }
00451     else
00452     {
00453         tipDoesNotFit = PositionUntargetedPopup();
00454     }
00455     if (tipDoesNotFit)
00456     {
00457         IsOpen(false);
00458     }
00459
00460     TeachingTipTestHooks::NotifyOffsetChanged(*this);
00461 }
00462
00463 bool TeachingTip::PositionTargetedPopup()
00464 {
00465     const bool tipDoesNotFit = UpdateTail();
00466     auto const offset = PlacementMargin();
00467
00468     auto const [tipHeight, tipWidth] = [this]()
00469     {
00470         if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
00471         {
00472             auto const tipHeight = tailOcclusionGrid.ActualHeight();
00473             auto const tipWidth = tailOcclusionGrid.ActualWidth();
00474             return std::make_tuple(tipHeight, tipWidth);
00475         }
00476         return std::make_tuple(0.0, 0.0);
00477     }();
00478
00479     if (auto&& popup = m_popup.get())
00480     {
00481         // Depending on the effective placement mode of the tip we use a combination of the tip's size, the target's position within the app, the target's
00482         // size, and the target offset property to determine the appropriate vertical and horizontal offsets of the popup that the tip is contained in.
00483         switch (m_currentEffectiveTipPlacementMode)
00484         {
00485         case winrt::TeachingTipPlacementMode::Top:
00486             popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y - tipHeight - offset.Top);
00487             popup.HorizontalOffset((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width - tipWidth) / 2.0));
00488             break;
00489
00490         case winrt::TeachingTipPlacementMode::Bottom:
00491             popup.VerticalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height + offset.Bottom);
00492             popup.HorizontalOffset((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width - tipWidth) / 2.0));
00493             break;
00494
00495         case winrt::TeachingTipPlacementMode::Left:
00496             popup.VerticalOffset(((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height - tipHeight) / 2.0);
00497             popup.HorizontalOffset(m_currentTargetBoundsInCoreWindowSpace.X - tipWidth - offset.Left);
00498             break;
00499
00500         case winrt::TeachingTipPlacementMode::Right:
00501             popup.VerticalOffset(((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height - tipHeight) / 2.0);
00502             popup.HorizontalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width + offset.Right);
00503             break;
00504
00505         case winrt::TeachingTipPlacementMode::TopRight:
00506             popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y - tipHeight - offset.Top);
00507             popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - MinimumTipEdgeToTailCenter()));
00508             break;
00509
00510         case winrt::TeachingTipPlacementMode::TopLeft:
00511             popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y - tipHeight - offset.Top);
00512             popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - tipWidth + MinimumTipEdgeToTailCenter()));
00513             break;
00514
00515         case winrt::TeachingTipPlacementMode::BottomRight:
00516             popup.VerticalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height + offset.Bottom);
00517             popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - MinimumTipEdgeToTailCenter()));
00518             break;
00519
00520         case winrt::TeachingTipPlacementMode::BottomLeft:
00521             popup.VerticalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height + offset.Bottom);
00522             popup.HorizontalOffset(((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width) / 2.0) - tipWidth + MinimumTipEdgeToTailCenter()));
00523             break;
00524
00525         case winrt::TeachingTipPlacementMode::LeftTop:
00526             popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - tipHeight + MinimumTipEdgeToTailCenter());
00527             popup.HorizontalOffset(m_currentTargetBoundsInCoreWindowSpace.X - tipWidth - offset.Left);
00528             break;
00529
00530         case winrt::TeachingTipPlacementMode::LeftBottom:
00531             popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - MinimumTipEdgeToTailCenter());
00532             popup.HorizontalOffset(m_currentTargetBoundsInCoreWindowSpace.X - tipWidth - offset.Left);
00533             break;
00534
00535         case winrt::TeachingTipPlacementMode::RightTop:
00536             popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - tipHeight + MinimumTipEdgeToTailCenter());
00537             popup.HorizontalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width + offset.Right);
00538             break;
00539
00540         case winrt::TeachingTipPlacementMode::RightBottom:
00541             popup.VerticalOffset((((m_currentTargetBoundsInCoreWindowSpace.Y * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Height) / 2.0) - MinimumTipEdgeToTailCenter());
00542             popup.HorizontalOffset(static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width + offset.Right);
00543             break;
00544
00545         case winrt::TeachingTipPlacementMode::Center:
00546             popup.VerticalOffset(m_currentTargetBoundsInCoreWindowSpace.Y + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0) - tipHeight - offset.Top);
00547             popup.HorizontalOffset((((m_currentTargetBoundsInCoreWindowSpace.X * 2.0) + m_currentTargetBoundsInCoreWindowSpace.Width - tipWidth) / 2.0));
00548             break;
00549
00550         default:
00551             MUX_FAIL_FAST();
00552         }
00553     }
00554     return tipDoesNotFit;
00555 }
00556
00557 bool TeachingTip::PositionUntargetedPopup()
00558 {
00559     auto const windowBoundsInCoreWindowSpace = GetEffectiveWindowBoundsInCoreWindowSpace(GetWindowBounds());
00560
00561     auto const [finalTipHeight, finalTipWidth] = [this]()
00562     {
00563         if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
00564         {
00565             auto const finalTipHeight = tailOcclusionGrid.ActualHeight();
00566             auto const finalTipWidth = tailOcclusionGrid.ActualWidth();
00567             return std::make_tuple(finalTipHeight, finalTipWidth);
00568         }
00569         return std::make_tuple(0.0, 0.0);
00570     }();
00571
00572     const bool tipDoesNotFit = UpdateTail();
00573
00574     auto const offset = PlacementMargin();
00575
00576     // Depending on the effective placement mode of the tip we use a combination of the tip's size, the window's size, and the target
00577     // offset property to determine the appropriate vertical and horizontal offsets of the popup that the tip is contained in.
00578     if (auto&& popup = m_popup.get())
00579     {
00580         switch (GetFlowDirectionAdjustedPlacement(PreferredPlacement()))
00581         {
00582         case winrt::TeachingTipPlacementMode::Auto:
00583         case winrt::TeachingTipPlacementMode::Bottom:
00584             popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
00585             popup.HorizontalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.X, windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Left, offset.Right));
00586             break;
00587
00588         case winrt::TeachingTipPlacementMode::Top:
00589             popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
00590             popup.HorizontalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.X, windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Left, offset.Right));
00591             break;
00592
00593         case winrt::TeachingTipPlacementMode::Left:
00594             popup.VerticalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.Y, windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Top, offset.Bottom));
00595             popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
00596             break;
00597
00598         case winrt::TeachingTipPlacementMode::Right:
00599             popup.VerticalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.Y, windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Top, offset.Bottom));
00600             popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
00601             break;
00602
00603         case winrt::TeachingTipPlacementMode::TopRight:
00604             popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
00605             popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
00606             break;
00607
00608         case winrt::TeachingTipPlacementMode::TopLeft:
00609             popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
00610             popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
00611             break;
00612
00613         case winrt::TeachingTipPlacementMode::BottomRight:
00614             popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
00615             popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
00616             break;
00617
00618         case winrt::TeachingTipPlacementMode::BottomLeft:
00619             popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
00620             popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
00621             break;
00622
00623         case winrt::TeachingTipPlacementMode::LeftTop:
00624             popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
00625             popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
00626             break;
00627
00628         case winrt::TeachingTipPlacementMode::LeftBottom:
00629             popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
00630             popup.HorizontalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.X, offset.Left));
00631             break;
00632
00633         case winrt::TeachingTipPlacementMode::RightTop:
00634             popup.VerticalOffset(UntargetedTipNearPlacementOffset(windowBoundsInCoreWindowSpace.Y, offset.Top));
00635             popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
00636             break;
00637
00638         case winrt::TeachingTipPlacementMode::RightBottom:
00639             popup.VerticalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Bottom));
00640             popup.HorizontalOffset(UntargetedTipFarPlacementOffset(windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Right));
00641             break;
00642
00643         case winrt::TeachingTipPlacementMode::Center:
00644             popup.VerticalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.Y, windowBoundsInCoreWindowSpace.Height, finalTipHeight, offset.Top, offset.Bottom));
00645             popup.HorizontalOffset(UntargetedTipCenterPlacementOffset(windowBoundsInCoreWindowSpace.X, windowBoundsInCoreWindowSpace.Width, finalTipWidth, offset.Left, offset.Right));
00646             break;
00647
00648         default:
00649             MUX_FAIL_FAST();
00650         }
00651     }
00652
00653     return tipDoesNotFit;
00654 }
00655
00656 void TeachingTip::UpdateSizeBasedTemplateSettings()
00657 {
00658     auto const templateSettings = winrt::get_self<::TeachingTipTemplateSettings>(TemplateSettings());
00659     auto const [width, height] = [this]()
00660     {
00661         if (auto&& contentRootGrid = m_contentRootGrid.get())
00662         {
00663             auto const width = contentRootGrid.ActualWidth();
00664             auto const height = contentRootGrid.ActualHeight();
00665             return std::make_tuple(width, height);
00666         }
00667         return std::make_tuple(0.0, 0.0);
00668     }();
00669
00670     switch (m_currentEffectiveTailPlacementMode)
00671     {
00672     case winrt::TeachingTipPlacementMode::Top:
00673         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00674         templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
00675         break;
00676     case winrt::TeachingTipPlacementMode::Bottom:
00677         templateSettings->TopRightHighlightMargin(BottomPlacementTopRightHighlightMargin(width, height));
00678         templateSettings->TopLeftHighlightMargin(BottomPlacementTopLeftHighlightMargin(width, height));
00679         break;
00680     case winrt::TeachingTipPlacementMode::Left:
00681         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00682         templateSettings->TopLeftHighlightMargin(LeftEdgePlacementTopLeftHighlightMargin(width, height));
00683         break;
00684     case winrt::TeachingTipPlacementMode::Right:
00685         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00686         templateSettings->TopLeftHighlightMargin(RightEdgePlacementTopLeftHighlightMargin(width, height));
00687         break;
00688     case winrt::TeachingTipPlacementMode::TopLeft:
00689         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00690         templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
00691         break;
00692     case winrt::TeachingTipPlacementMode::TopRight:
00693         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00694         templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
00695         break;
00696     case winrt::TeachingTipPlacementMode::BottomLeft:
00697         templateSettings->TopRightHighlightMargin(BottomLeftPlacementTopRightHighlightMargin(width, height));
00698         templateSettings->TopLeftHighlightMargin(BottomLeftPlacementTopLeftHighlightMargin(width, height));
00699         break;
00700     case winrt::TeachingTipPlacementMode::BottomRight:
00701         templateSettings->TopRightHighlightMargin(BottomRightPlacementTopRightHighlightMargin(width, height));
00702         templateSettings->TopLeftHighlightMargin(BottomRightPlacementTopLeftHighlightMargin(width, height));
00703         break;
00704     case winrt::TeachingTipPlacementMode::LeftTop:
00705         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00706         templateSettings->TopLeftHighlightMargin(LeftEdgePlacementTopLeftHighlightMargin(width, height));
00707         break;
00708     case winrt::TeachingTipPlacementMode::LeftBottom:
00709         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00710         templateSettings->TopLeftHighlightMargin(LeftEdgePlacementTopLeftHighlightMargin(width, height));
00711         break;
00712     case winrt::TeachingTipPlacementMode::RightTop:
00713         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00714         templateSettings->TopLeftHighlightMargin(RightEdgePlacementTopLeftHighlightMargin(width, height));
00715         break;
00716     case winrt::TeachingTipPlacementMode::RightBottom:
00717         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00718         templateSettings->TopLeftHighlightMargin(RightEdgePlacementTopLeftHighlightMargin(width, height));
00719         break;
00720     case winrt::TeachingTipPlacementMode::Auto:
00721         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00722         templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
00723         break;
00724     case winrt::TeachingTipPlacementMode::Center:
00725         templateSettings->TopRightHighlightMargin(OtherPlacementTopRightHighlightMargin(width, height));
00726         templateSettings->TopLeftHighlightMargin(TopEdgePlacementTopLeftHighlightMargin(width, height));
00727         break;
00728     }
00729 }
00730
00731 void TeachingTip::UpdateButtonsState()
00732 {
00733     auto const actionContent = ActionButtonContent();
00734     auto const closeContent = CloseButtonContent();
00735     const bool isLightDismiss = IsLightDismissEnabled();
00736     if (actionContent && closeContent)
00737     {
00738         winrt::VisualStateManager::GoToState(*this, L"BothButtonsVisible"sv, false);
00739         winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
00740     }
00741     else if (actionContent && isLightDismiss)
00742     {
00743         winrt::VisualStateManager::GoToState(*this, L"ActionButtonVisible"sv, false);
00744         winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
00745     }
00746     else if (actionContent)
00747     {
00748         winrt::VisualStateManager::GoToState(*this, L"ActionButtonVisible"sv, false);
00749         winrt::VisualStateManager::GoToState(*this, L"HeaderCloseButton"sv, false);
00750     }
00751     else if (closeContent)
00752     {
00753         winrt::VisualStateManager::GoToState(*this, L"CloseButtonVisible"sv, false);
00754         winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
00755     }
00756     else if (isLightDismiss)
00757     {
00758         winrt::VisualStateManager::GoToState(*this, L"NoButtonsVisible"sv, false);
00759         winrt::VisualStateManager::GoToState(*this, L"FooterCloseButton"sv, false);
00760     }
00761     else
00762     {
00763         winrt::VisualStateManager::GoToState(*this, L"NoButtonsVisible"sv, false);
00764         winrt::VisualStateManager::GoToState(*this, L"HeaderCloseButton"sv, false);
00765     }
00766 }
00767
00768 void TeachingTip::UpdateDynamicHeroContentPlacementToTop()
00769 {
00770     if (HeroContentPlacement() == winrt::TeachingTipHeroContentPlacementMode::Auto)
00771     {
00772         UpdateDynamicHeroContentPlacementToTopImpl();
00773     }
00774 }
00775
00776 void TeachingTip::UpdateDynamicHeroContentPlacementToTopImpl()
00777 {
00778     winrt::VisualStateManager::GoToState(*this, L"HeroContentTop"sv, false);
00779     if (m_currentHeroContentEffectivePlacementMode != winrt::TeachingTipHeroContentPlacementMode::Top)
00780     {
00781         m_currentHeroContentEffectivePlacementMode = winrt::TeachingTipHeroContentPlacementMode::Top;
00782         TeachingTipTestHooks::NotifyEffectiveHeroContentPlacementChanged(*this);
00783     }
00784 }
00785
00786 void TeachingTip::UpdateDynamicHeroContentPlacementToBottom()
00787 {
00788     if (HeroContentPlacement() == winrt::TeachingTipHeroContentPlacementMode::Auto)
00789     {
00790         UpdateDynamicHeroContentPlacementToBottomImpl();
00791     }
00792 }
00793
00794 void TeachingTip::UpdateDynamicHeroContentPlacementToBottomImpl()
00795 {
00796     winrt::VisualStateManager::GoToState(*this, L"HeroContentBottom"sv, false);
00797     if (m_currentHeroContentEffectivePlacementMode != winrt::TeachingTipHeroContentPlacementMode::Bottom)
00798     {
00799         m_currentHeroContentEffectivePlacementMode = winrt::TeachingTipHeroContentPlacementMode::Bottom;
00800         TeachingTipTestHooks::NotifyEffectiveHeroContentPlacementChanged(*this);
00801     }
00802 }
00803
00804 void TeachingTip::OnIsOpenChanged()
00805 {
00806     if (m_ignoreNextIsOpenChanged) {
00807         m_ignoreNextIsOpenChanged = false;
00808     }
00809     else
00810     {
00811         SharedHelpers::QueueCallbackForCompositionRendering([strongThis = get_strong()]()
00812         {
00813             if (strongThis->m_isIdle) {
00814                 if (strongThis->IsOpen())
00815                 {
00816                     strongThis->IsOpenChangedToOpen();
00817                 }
00818                 else
00819                 {
00820                     strongThis->IsOpenChangedToClose();
00821                 }
00822                 TeachingTipTestHooks::NotifyOpenedStatusChanged(*strongThis);
00823             }
00824             else
00825             {
00826                 strongThis->m_ignoreNextIsOpenChanged = true;
00827                 strongThis->IsOpen(!strongThis->IsOpen());
00828             }
00829         });
00830     }
00831 }
00832
00833 void TeachingTip::IsOpenChangedToOpen()
00834 {
00835     //Reset the close reason to the default value of programmatic.
00836     m_lastCloseReason = winrt::TeachingTipCloseReason::Programmatic;
00837
00838     m_currentBoundsInCoreWindowSpace = this->TransformToVisual(nullptr).TransformBounds({
00839         0.0,
00840         0.0,
00841         static_cast<float>(this->ActualWidth()),
00842         static_cast<float>(this->ActualHeight())
00843         });
00844
00845     m_currentTargetBoundsInCoreWindowSpace = [this]()
00846     {
00847         if (auto&& target = m_target.get())
00848         {
00849             SetViewportChangedEvent(gsl::make_strict_not_null(target));
00850             return target.TransformToVisual(nullptr).TransformBounds({
00851                 0.0,
00852                 0.0,
00853                 static_cast<float>(target.as<winrt::FrameworkElement>().ActualWidth()),
00854                 static_cast<float>(target.as<winrt::FrameworkElement>().ActualHeight())
00855                 });
00856         }
00857         return winrt::Rect{ 0,0,0,0 };
00858     }();
00859
00860     if (!m_lightDismissIndicatorPopup)
00861     {
00862         CreateLightDismissIndicatorPopup();
00863     }
00864     OnIsLightDismissEnabledChanged();
00865
00866     if (!m_contractAnimation)
00867     {
00868         CreateContractAnimation();
00869     }
00870     if (!m_expandAnimation)
00871     {
00872         CreateExpandAnimation();
00873     }
00874
00875     //If the developer defines their TeachingTip in a resource dictionary it is possible that it's template will have never been applied
00876     if (!m_isTemplateApplied)
00877     {
00878         this->ApplyTemplate();
00879     }
00880
00881     if (!m_popup || m_createNewPopupOnOpen)
00882     {
00883         CreateNewPopup();
00884     }
00885
00886     // If the tip is not going to open because it does not fit we need to make sure that
00887     // the open, closing, closed life cycle still fires so that we don't cause apps to leak
00888     // that depend on this sequence.
00889     auto const [ignored, tipDoesNotFit] = DetermineEffectivePlacement();
00890     if (tipDoesNotFit)
00891     {
00892         __RP_Marker_ClassMemberById(RuntimeProfiler::ProfId_TeachingTip, RuntimeProfiler::ProfMemberId_TeachingTip_TipDidNotOpenDueToSize);
00893         RaiseClosingEvent(false);
00894         auto const closedArgs = winrt::make_self<TeachingTipClosedEventArgs>();
00895         closedArgs->Reason(m_lastCloseReason);
00896         m_closedEventSource(*this, *closedArgs);
00897         IsOpen(false);
00898     }
00899     else
00900     {
00901         if (auto&& popup = m_popup.get())
00902         {
00903             if (!popup.IsOpen())
00904             {
00905                 // We are about to begin the process of trying to open the teaching tip, so notify that we are no longer idle.
00906                 SetIsIdle(false);
00907                 UpdatePopupRequestedTheme();
00908                 popup.Child(m_rootElement.get());
00909                 if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
00910                 {
00911                     lightDismissIndicatorPopup.IsOpen(true);
00912                 }
00913                 popup.IsOpen(true);
00914                 if (SharedHelpers::IsAnimationsEnabled())
00915                 {
00916                     StartExpandToOpen();
00917                 }
00918                 else
00919                 {
00920                     // We won't be playing an animation so we're immediately idle.
00921                     SetIsIdle(true);
00922                 }
00923             }
00924             else
00925             {
00926                 // We have become Open but our popup was already open. This can happen when a close is canceled by the closing event, so make sure the idle status is correct.
00927                 if (!m_isExpandAnimationPlaying && !m_isContractAnimationPlaying)
00928                 {
00929                     SetIsIdle(true);
00930                 }
00931             }
00932         }
00933     }
00934
00935     [this]()
00936     {
00937         if (auto const xamlRoot = XamlRoot())
00938         {
00939             if (auto const content = xamlRoot.Content())
00940             {
00941                 m_previewKeyDownForF6Revoker = content.PreviewKeyDown(winrt::auto_revoke, { this, &TeachingTip::OnF6PreviewKeyDownClicked });
00942                 return;
00943             }
00944         }
00945
00946         // TODO: We do not have direct analogue for AcceleratorKeyActivated with DispatcherQueue in Islands/ win32. Please refer Task# 30013704 for  more details.
00947         if (auto coreWindow = winrt::CoreWindow::GetForCurrentThread())
00948         {
00949             m_acceleratorKeyActivatedRevoker = Dispatcher().AcceleratorKeyActivated(winrt::auto_revoke, { this, &TeachingTip::OnF6AcceleratorKeyClicked });
00950         }
00951
00952         return;
00953     }();
00954
00955
00956     // Make sure we are in the correct VSM state after ApplyTemplate and moving the template content from the Control to the Popup:
00957     OnIsLightDismissEnabledChanged();
00958 }
00959
00960 void TeachingTip::IsOpenChangedToClose()
00961 {
00962     if (auto&& popup = m_popup.get())
00963     {
00964         if (popup.IsOpen())
00965         {
00966             // We are about to begin the process of trying to close the teaching tip, so notify that we are no longer idle.
00967             SetIsIdle(false);
00968             RaiseClosingEvent(true);
00969         }
00970         else
00971         {
00972             // We have become not Open but our popup was already not open. Lets make sure the idle status is correct.
00973             if (!m_isExpandAnimationPlaying && !m_isContractAnimationPlaying)
00974             {
00975                 SetIsIdle(true);
00976             }
00977         }
00978     }
00979
00980     m_acceleratorKeyActivatedRevoker.revoke();
00981     m_previewKeyDownForF6Revoker.revoke();
00982     m_popupPreviewKeyDownForF6Revoker.revoke();
00983     m_currentEffectiveTipPlacementMode = winrt::TeachingTipPlacementMode::Auto;
00984     TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
00985 }
00986
00987 void TeachingTip::CreateNewPopup()
00988 {
00989     m_popupOpenedRevoker.revoke();
00990     m_popupClosedRevoker.revoke();
00991
00992     auto const popup = winrt::Popup();
00993     // Set XamlRoot on the popup to handle XamlIsland/AppWindow scenarios.
00994     popup.XamlRoot(this->XamlRoot());
00995
00996     m_popupOpenedRevoker = popup.Opened(winrt::auto_revoke, { this, &TeachingTip::OnPopupOpened });
00997     m_popupClosedRevoker = popup.Closed(winrt::auto_revoke, { this, &TeachingTip::OnPopupClosed });
00998     popup.ShouldConstrainToRootBounds(ShouldConstrainToRootBounds());
00999     m_popup.set(popup);
01000     SetPopupAutomationProperties();
01001     m_createNewPopupOnOpen = false;
01002 }
01003
01004 void TeachingTip::OnTailVisibilityChanged()
01005 {
01006     UpdateTail();
01007 }
01008
01009 void TeachingTip::OnIconSourceChanged()
01010 {
01011     auto const templateSettings = winrt::get_self<::TeachingTipTemplateSettings>(TemplateSettings());
01012     if (auto const source = IconSource())
01013     {
01014         templateSettings->IconElement(SharedHelpers::MakeIconElementFrom(source));
01015         winrt::VisualStateManager::GoToState(*this, L"Icon"sv, false);
01016     }
01017     else
01018     {
01019         templateSettings->IconElement(nullptr);
01020         winrt::VisualStateManager::GoToState(*this, L"NoIcon"sv, false);
01021     }
01022 }
01023
01024 void TeachingTip::OnPlacementMarginChanged()
01025 {
01026     if (IsOpen())
01027     {
01028         PositionPopup();
01029     }
01030 }
01031
01032 void TeachingTip::OnIsLightDismissEnabledChanged()
01033 {
01034     if (IsLightDismissEnabled())
01035     {
01036         winrt::VisualStateManager::GoToState(*this, L"LightDismiss"sv, false);
01037         if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
01038         {
01039             lightDismissIndicatorPopup.IsLightDismissEnabled(true);
01040             m_lightDismissIndicatorPopupClosedRevoker = lightDismissIndicatorPopup.Closed(winrt::auto_revoke, { this, &TeachingTip::OnLightDismissIndicatorPopupClosed });
01041             m_lightDismissIndicatorPopupPreviewKeyDownForF6Revoker = lightDismissIndicatorPopup.PreviewKeyDown(winrt::auto_revoke, { this, &TeachingTip::OnF6PreviewKeyDownClicked });
01042         }
01043     }
01044     else
01045     {
01046         winrt::VisualStateManager::GoToState(*this, L"NormalDismiss"sv, false);
01047         if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
01048         {
01049             lightDismissIndicatorPopup.IsLightDismissEnabled(false);
01050         }
01051         m_lightDismissIndicatorPopupClosedRevoker.revoke();
01052         m_lightDismissIndicatorPopupPreviewKeyDownForF6Revoker.revoke();
01053     }
01054     UpdateButtonsState();
01055 }
01056
01057 void TeachingTip::OnShouldConstrainToRootBoundsChanged()
01058 {
01059     // ShouldConstrainToRootBounds is a property that can only be set on a popup before it is opened.
01060     // If we have opened the tip's popup and then this property changes we will need to discard the old popup
01061     // and replace it with a new popup.  This variable indicates this state.
01062
01063     if (m_popup.get())
01064     {
01065         m_createNewPopupOnOpen = true;
01066     }
01067 }
01068
01069 void TeachingTip::OnHeroContentPlacementChanged()
01070 {
01071     switch (HeroContentPlacement())
01072     {
01073     case winrt::TeachingTipHeroContentPlacementMode::Auto:
01074         break;
01075     case winrt::TeachingTipHeroContentPlacementMode::Top:
01076         UpdateDynamicHeroContentPlacementToTopImpl();
01077         break;
01078     case winrt::TeachingTipHeroContentPlacementMode::Bottom:
01079         UpdateDynamicHeroContentPlacementToBottomImpl();
01080         break;
01081     }
01082
01083     // Setting m_currentEffectiveTipPlacementMode to auto ensures that the next time position popup is called we'll rerun the DetermineEffectivePlacement
01084     // algorithm. If we did not do this and the popup was opened the algorithm would maintain the current effective placement mode, which we don't want
01085     // since the hero content placement contributes to the choice of tip placement mode.
01086     m_currentEffectiveTipPlacementMode = winrt::TeachingTipPlacementMode::Auto;
01087     TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
01088     if (IsOpen())
01089     {
01090         PositionPopup();
01091     }
01092 }
01093
01094 void TeachingTip::OnContentSizeChanged(const winrt::IInspectable&, const winrt::SizeChangedEventArgs& args)
01095 {
01096     UpdateSizeBasedTemplateSettings();
01097     // Reset the currentEffectivePlacementMode so that the tail will be updated for the new size as well.
01098     m_currentEffectiveTipPlacementMode = winrt::TeachingTipPlacementMode::Auto;
01099     TeachingTipTestHooks::NotifyEffectivePlacementChanged(*this);
01100     if (IsOpen())
01101     {
01102         PositionPopup();
01103     }
01104     if (auto&& expandAnimation = m_expandAnimation.get())
01105     {
01106         expandAnimation.SetScalarParameter(L"Width", args.NewSize().Width);
01107         expandAnimation.SetScalarParameter(L"Height", args.NewSize().Height);
01108     }
01109     if (auto&& contractAnimation = m_contractAnimation.get())
01110     {
01111         contractAnimation.SetScalarParameter(L"Width", args.NewSize().Width);
01112         contractAnimation.SetScalarParameter(L"Height", args.NewSize().Height);
01113     }
01114 }
01115
01116 void TeachingTip::OnF6AcceleratorKeyClicked(const winrt::CoreDispatcher&, const winrt::AcceleratorKeyEventArgs& args)
01117 {
01118     if (!args.Handled() &&
01119         IsOpen() &&
01120         args.VirtualKey() == winrt::VirtualKey::F6 &&
01121         args.EventType() == winrt::CoreAcceleratorKeyEventType::KeyDown)
01122     {
01123         args.Handled(HandleF6Clicked());
01124     }
01125 }
01126
01127 void TeachingTip::OnF6PreviewKeyDownClicked(const winrt::IInspectable&, const winrt::KeyRoutedEventArgs& args)
01128 {
01129     if (!args.Handled() &&
01130         IsOpen() &&
01131         args.Key() == winrt::VirtualKey::F6)
01132     {
01133         args.Handled(HandleF6Clicked());
01134     }
01135 }
01136
01137 void TeachingTip::OnF6PopupPreviewKeyDownClicked(const winrt::IInspectable&, const winrt::KeyRoutedEventArgs& args)
01138 {
01139     if (!args.Handled() &&
01140         IsOpen() &&
01141         args.Key() == winrt::VirtualKey::F6)
01142     {
01143         args.Handled(HandleF6Clicked(/*fromPopup*/true));
01144     }
01145 }
01146
01147 bool TeachingTip::HandleF6Clicked(bool fromPopup)
01148 {
01149     //  Logging usage telemetry
01150     if (m_hasF6BeenInvoked)
01151     {
01152         __RP_Marker_ClassMemberById(RuntimeProfiler::ProfId_TeachingTip, RuntimeProfiler::ProfMemberId_TeachingTip_F6AccessKey_SubsequentInvocation);
01153     }
01154     else
01155     {
01156         __RP_Marker_ClassMemberById(RuntimeProfiler::ProfId_TeachingTip, RuntimeProfiler::ProfMemberId_TeachingTip_F6AccessKey_FirstInvocation);
01157         m_hasF6BeenInvoked = true;
01158     }
01159
01160     auto const hasFocusInSubtree = [this]()
01161     {
01162         if (auto const rootElement = m_rootElement.get())
01163         {
01164             auto current = [rootElement]() {
01165                 return winrt::FocusManager::GetFocusedElement(rootElement.XamlRoot()).try_as<winrt::DependencyObject>();
01166             }();
01167
01168             while (current)
01169             {
01170                 if (current.try_as<winrt::UIElement>() == rootElement)
01171                 {
01172                     return true;
01173                 }
01174                 current = winrt::VisualTreeHelper::GetParent(current);
01175             }
01176         }
01177         return false;
01178     }();
01179
01180     if (hasFocusInSubtree && fromPopup)
01181     {
01182         bool setFocus = SetFocus(m_previouslyFocusedElement.get(), winrt::FocusState::Programmatic);
01183         m_previouslyFocusedElement = nullptr;
01184         return setFocus;
01185     }
01186     else if (!hasFocusInSubtree && !fromPopup)
01187     {
01188         if (IsLightDismissEnabled())
01189         {
01190             auto focusable = winrt::FocusManager::FindFirstFocusableElement(m_rootElement.get());
01191             if (focusable)
01192             {
01193                 SetFocus(focusable, winrt::FocusState::Keyboard);
01194                 return true;
01195             }
01196         }
01197
01198         const winrt::Button f6Button = [this]() -> winrt::Button
01199         {
01200             auto firstButton = m_closeButton.get();
01201             auto secondButton = m_alternateCloseButton.get();
01202             //Prefer the close button to the alternate, except when there is no content.
01203             if (!CloseButtonContent())
01204             {
01205                 std::swap(firstButton, secondButton);
01206             }
01207             if (firstButton && firstButton.Visibility() == winrt::Visibility::Visible)
01208             {
01209                 return firstButton;
01210             }
01211             else if (secondButton && secondButton.Visibility() == winrt::Visibility::Visible)
01212             {
01213                 return secondButton;
01214             }
01215             return nullptr;
01216         }();
01217
01218         if (f6Button)
01219         {
01220             auto const scopedRevoker = f6Button.GettingFocus(winrt::auto_revoke, [this](auto const&, auto const& args) {
01221                 m_previouslyFocusedElement = winrt::make_weak(args.OldFocusedElement());
01222                 });
01223             const bool setFocus = f6Button.Focus(winrt::FocusState::Keyboard);
01224             return setFocus;
01225         }
01226     }
01227     return false;
01228 }
01229
01230 void TeachingTip::OnAutomationNameChanged(const winrt::IInspectable&, const winrt::IInspectable&)
01231 {
01232     SetPopupAutomationProperties();
01233 }
01234
01235 void TeachingTip::OnAutomationIdChanged(const winrt::IInspectable&, const winrt::IInspectable&)
01236 {
01237     SetPopupAutomationProperties();
01238 }
01239
01240 void TeachingTip::OnCloseButtonClicked(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
01241 {
01242     m_closeButtonClickEventSource(*this, nullptr);
01243     m_lastCloseReason = winrt::TeachingTipCloseReason::CloseButton;
01244     IsOpen(false);
01245 }
01246
01247 void TeachingTip::OnActionButtonClicked(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
01248 {
01249     m_actionButtonClickEventSource(*this, nullptr);
01250 }
01251
01252 void TeachingTip::OnPopupOpened(const winrt::IInspectable&, const winrt::IInspectable&)
01253 {
01254     if (auto xamlRoot = this->XamlRoot())
01255     {
01256         m_currentXamlRootSize = xamlRoot.Size();
01257         m_xamlRootChangedRevoker = xamlRoot.Changed(winrt::auto_revoke, { this, &TeachingTip::XamlRootChanged });
01258
01259         if (auto&& popup = m_popup.get())
01260         {
01261             if (auto const popupContent = popup.Child())
01262             {
01263                 // This handler is not required for Winui3 because the framework bug this works around has been fixed.
01264                 m_popupPreviewKeyDownForF6Revoker = popupContent.PreviewKeyDown(winrt::auto_revoke, { this, &TeachingTip::OnF6PopupPreviewKeyDownClicked });
01265             }
01266         }
01267     }
01268
01269     if (auto const teachingTipPeer = winrt::FrameworkElementAutomationPeer::FromElement(*this).try_as<winrt::TeachingTipAutomationPeer>())
01270     {
01271         auto const notificationString = [this]()
01272         {
01273             auto const appName = []()
01274             {
01275                 try
01276                 {
01277                     if (const auto package = winrt::ApplicationModel::Package::Current())
01278                     {
01279                         return package.DisplayName();
01280                     }
01281                 }
01282                 catch (...) {}
01283
01284                 return winrt::hstring{};
01285             }();
01286
01287             if (!appName.empty())
01288             {
01289                 return StringUtil::FormatString(
01290                     ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipNotification),
01291                     appName.data(),
01292                     winrt::AutomationProperties::GetName(m_popup.get()).data());
01293             }
01294             else
01295             {
01296                 return StringUtil::FormatString(
01297                     ResourceAccessor::GetLocalizedStringResource(SR_TeachingTipNotificationWithoutAppName),
01298                     winrt::AutomationProperties::GetName(m_popup.get()).data());
01299             }
01300         }();
01301
01302         winrt::get_self<TeachingTipAutomationPeer>(teachingTipPeer)->RaiseWindowOpenedEvent(notificationString);
01303     }
01304
01305     if(IsLightDismissEnabled())
01306     {
01307         auto focusable = winrt::FocusManager::FindFirstFocusableElement(m_rootElement.get());
01308         if (focusable)
01309         {
01310             SetFocus(focusable, winrt::FocusState::Programmatic);
01311         }
01312     }
01313 }
01314
01315 void TeachingTip::OnPopupClosed(const winrt::IInspectable&, const winrt::IInspectable&)
01316 {
01317     m_xamlRootChangedRevoker.revoke();
01318     if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
01319     {
01320         lightDismissIndicatorPopup.IsOpen(false);
01321     }
01322     if (auto&& popup = m_popup.get())
01323     {
01324         popup.Child(nullptr);
01325     }
01326     auto const myArgs = winrt::make_self<TeachingTipClosedEventArgs>();
01327
01328     myArgs->Reason(m_lastCloseReason);
01329     m_closedEventSource(*this, *myArgs);
01330
01331     //If we were closed by the close button and we have tracked a previously focused element because F6 was used
01332     //To give the tip focus, then we return focus when the popup closes.
01333     if (m_lastCloseReason == winrt::TeachingTipCloseReason::CloseButton)
01334     {
01335         SetFocus(m_previouslyFocusedElement.get(), winrt::FocusState::Programmatic);
01336     }
01337     m_previouslyFocusedElement = nullptr;
01338
01339     if (auto const teachingTipPeer = winrt::FrameworkElementAutomationPeer::FromElement(*this).try_as<winrt::TeachingTipAutomationPeer>())
01340     {
01341         winrt::get_self<TeachingTipAutomationPeer>(teachingTipPeer)->RaiseWindowClosedEvent();
01342     }
01343 }
01344
01345 void TeachingTip::ClosePopupOnUnloadEvent(winrt::IInspectable const&, winrt::RoutedEventArgs const&)
01346 {
01347     IsOpen(false);
01348     ClosePopup();
01349 }
01350
01351 void TeachingTip::OnLightDismissIndicatorPopupClosed(const winrt::IInspectable&, const winrt::IInspectable&)
01352 {
01353     if (IsOpen())
01354     {
01355         m_lastCloseReason = winrt::TeachingTipCloseReason::LightDismiss;
01356     }
01357     IsOpen(false);
01358 }
01359
01360 void TeachingTip::RaiseClosingEvent(bool attachDeferralCompletedHandler)
01361 {
01362     auto const args = winrt::make_self<TeachingTipClosingEventArgs>();
01363     args->Reason(m_lastCloseReason);
01364
01365     if (attachDeferralCompletedHandler)
01366     {
01367         winrt::Deferral instance{ [strongThis = get_strong(), args]()
01368             {
01369                 strongThis->CheckThread();
01370                 if (!args->Cancel())
01371                 {
01372                     strongThis->ClosePopupWithAnimationIfAvailable();
01373                 }
01374                 else
01375                 {
01376                     // The developer has changed the Cancel property to true, indicating that they wish to Cancel the
01377                     // closing of this tip, so we need to revert the IsOpen property to true.
01378                     strongThis->IsOpen(true);
01379                 }
01380             }
01381         };
01382
01383         args->SetDeferral(instance);
01384
01385         args->IncrementDeferralCount();
01386         m_closingEventSource(*this, *args);
01387         args->DecrementDeferralCount();
01388     }
01389     else
01390     {
01391         m_closingEventSource(*this, *args);
01392     }
01393 }
01394
01395 void TeachingTip::ClosePopupWithAnimationIfAvailable()
01396 {
01397     if (m_popup && m_popup.get().IsOpen())
01398     {
01399         // Contract animation
01400         if (SharedHelpers::IsAnimationsEnabled())
01401         {
01402             StartContractToClose();
01403         }
01404         else
01405         {
01406             ClosePopup();
01407         }
01408
01409         // Under normal circumstances we would have launched an animation just now, if we did not then we should make sure
01410         // that the idle state is correct.
01411         if (!m_isContractAnimationPlaying && !m_isExpandAnimationPlaying)
01412         {
01413             SetIsIdle(true);
01414         }
01415     }
01416 }
01417
01418 void TeachingTip::ClosePopup()
01419 {
01420     if (auto&& popup = m_popup.get())
01421     {
01422         popup.IsOpen(false);
01423     }
01424     if (auto&& lightDismissIndicatorPopup = m_lightDismissIndicatorPopup.get())
01425     {
01426         lightDismissIndicatorPopup.IsOpen(false);
01427     }
01428
01429     if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
01430     {
01431         // A previous close animation may have left the rootGrid's scale at a very small value and if this teaching tip
01432         // is shown again then its text would be rasterized at this small scale and blown up ~20x. To fix this we have to
01433         // reset the scale after the popup has closed so that if the teaching tip is re-shown the render pass does not use the
01434         // small scale.
01435         tailOcclusionGrid.Scale({ 1.0f,1.0f,1.0f });
01436     }
01437 }
01438
01439 winrt::TeachingTipPlacementMode TeachingTip::GetFlowDirectionAdjustedPlacement(const winrt::TeachingTipPlacementMode& placementMode)
01440 {
01441     if (FlowDirection() == winrt::FlowDirection::LeftToRight)
01442     {
01443         return placementMode;
01444     }
01445     else
01446     {
01447         switch (placementMode)
01448         {
01449             case winrt::TeachingTipPlacementMode::Auto:
01450                 return winrt::TeachingTipPlacementMode::Auto;
01451             case winrt::TeachingTipPlacementMode::Left:
01452                 return winrt::TeachingTipPlacementMode::Right;
01453             case winrt::TeachingTipPlacementMode::Right:
01454                 return winrt::TeachingTipPlacementMode::Left;
01455             case winrt::TeachingTipPlacementMode::Top:
01456                 return winrt::TeachingTipPlacementMode::Top;
01457             case winrt::TeachingTipPlacementMode::Bottom:
01458                 return winrt::TeachingTipPlacementMode::Bottom;
01459             case winrt::TeachingTipPlacementMode::LeftBottom:
01460                 return winrt::TeachingTipPlacementMode::RightBottom;
01461             case winrt::TeachingTipPlacementMode::LeftTop:
01462                 return winrt::TeachingTipPlacementMode::RightTop;
01463             case winrt::TeachingTipPlacementMode::TopLeft:
01464                 return winrt::TeachingTipPlacementMode::TopRight;
01465             case winrt::TeachingTipPlacementMode::TopRight:
01466                 return winrt::TeachingTipPlacementMode::TopLeft;
01467             case winrt::TeachingTipPlacementMode::RightTop:
01468                 return winrt::TeachingTipPlacementMode::LeftTop;
01469             case winrt::TeachingTipPlacementMode::RightBottom:
01470                 return winrt::TeachingTipPlacementMode::LeftBottom;
01471             case winrt::TeachingTipPlacementMode::BottomRight:
01472                 return winrt::TeachingTipPlacementMode::BottomLeft;
01473             case winrt::TeachingTipPlacementMode::BottomLeft:
01474                 return winrt::TeachingTipPlacementMode::BottomRight;
01475             case winrt::TeachingTipPlacementMode::Center:
01476                 return winrt::TeachingTipPlacementMode::Center;
01477         }
01478     }
01479     return winrt::TeachingTipPlacementMode::Auto;
01480 }
01481
01482 void TeachingTip::OnTargetChanged()
01483 {
01484     m_targetEffectiveViewportChangedRevoker.revoke();
01485     m_targetLoadedRevoker.revoke();
01486
01487     auto const target = Target();
01488     m_target.set(target);
01489
01490     bool isTargetLoaded = false;
01491
01492     if (target)
01493     {
01494         // We need to check if the target is loaded before registering for its
01495         // loaded event. This is because the act of registering for the loaded event
01496         // will cause the target to report that it is not loaded.
01497         isTargetLoaded = target.IsLoaded();
01498         m_targetLoadedRevoker = target.Loaded(winrt::auto_revoke, { this, &TeachingTip::OnTargetLoaded });
01499     }
01500
01501     if (IsOpen())
01502     {
01503         if (target && isTargetLoaded)
01504         {
01505             m_currentTargetBoundsInCoreWindowSpace = target.TransformToVisual(nullptr).TransformBounds({
01506                 0.0,
01507                 0.0,
01508                 static_cast<float>(target.ActualWidth()),
01509                 static_cast<float>(target.ActualHeight())
01510                 });
01511             SetViewportChangedEvent(gsl::make_strict_not_null(target));
01512         }
01513
01514         // if we have a target that is not yet loaded, skip positioning the flayout for now, that will happen once the target loads.
01515         if (!target || (target && isTargetLoaded))
01516         {
01517             PositionPopup();
01518         }
01519     }
01520 }
01521
01522 void TeachingTip::SetViewportChangedEvent(const gsl::strict_not_null<winrt::FrameworkElement>& target)
01523 {
01524     if (m_tipFollowsTarget)
01525     {
01526         m_targetEffectiveViewportChangedRevoker = target.get().EffectiveViewportChanged(winrt::auto_revoke, { this, &TeachingTip::OnTargetLayoutUpdated });
01527         m_effectiveViewportChangedRevoker = this->EffectiveViewportChanged(winrt::auto_revoke, { this, &TeachingTip::OnTargetLayoutUpdated });
01528     }
01529 }
01530
01531 void TeachingTip::RevokeViewportChangedEvent()
01532 {
01533     m_targetEffectiveViewportChangedRevoker.revoke();
01534     m_effectiveViewportChangedRevoker.revoke();
01535 }
01536
01537 void TeachingTip::XamlRootChanged(const winrt::XamlRoot& xamlRoot, const winrt::XamlRootChangedEventArgs&)
01538 {
01539     // Reposition popup when target has finished determining its own position.
01540     SharedHelpers::QueueCallbackForCompositionRendering(
01541         [strongThis = get_strong(),xamlRootSize = xamlRoot.Size()](){
01542             if (xamlRootSize != strongThis->m_currentXamlRootSize)
01543             {
01544                 strongThis->m_currentXamlRootSize = xamlRootSize;
01545                 strongThis->RepositionPopup();
01546             }
01547         }
01548     );
01549
01550 }
01551
01552 void TeachingTip::RepositionPopup()
01553 {
01554     if (IsOpen())
01555     {
01556         auto const newTargetBounds = [this]()
01557         {
01558             if (auto&& target = m_target.get())
01559             {
01560                 return target.TransformToVisual(nullptr).TransformBounds({
01561                     0.0,
01562                     0.0,
01563                     static_cast<float>(target.as<winrt::FrameworkElement>().ActualWidth()),
01564                     static_cast<float>(target.as<winrt::FrameworkElement>().ActualHeight())
01565                     });
01566             }
01567             return winrt::Rect{};
01568         }();
01569
01570         auto const newCurrentBounds = this->TransformToVisual(nullptr).TransformBounds({
01571             0.0,
01572             0.0,
01573             static_cast<float>(this->ActualWidth()),
01574             static_cast<float>(this->ActualHeight())
01575             });
01576
01577         if (newTargetBounds != m_currentTargetBoundsInCoreWindowSpace || newCurrentBounds != m_currentBoundsInCoreWindowSpace)
01578         {
01579             m_currentBoundsInCoreWindowSpace = newCurrentBounds;
01580             m_currentTargetBoundsInCoreWindowSpace = newTargetBounds;
01581             PositionPopup();
01582         }
01583     }
01584 }
01585
01586 void TeachingTip::OnTargetLoaded(const winrt::IInspectable&, const winrt::IInspectable&)
01587 {
01588     RepositionPopup();
01589 }
01590
01591 void TeachingTip::OnTargetLayoutUpdated(const winrt::IInspectable&, const winrt::IInspectable&)
01592 {
01593     RepositionPopup();
01594 }
01595
01596 void TeachingTip::CreateExpandAnimation()
01597 {
01598     auto const compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
01599
01600     auto&& expandEasingFunction = [this, compositor]()
01601     {
01602         if (!m_expandEasingFunction)
01603         {
01604             auto const easingFunction = compositor.CreateCubicBezierEasingFunction(s_expandAnimationEasingCurveControlPoint1, s_expandAnimationEasingCurveControlPoint2);
01605             m_expandEasingFunction.set(easingFunction);
01606             return static_cast<winrt::CompositionEasingFunction>(easingFunction);
01607         }
01608         return m_expandEasingFunction.get();
01609     }();
01610
01611     m_expandAnimation.set([this, compositor, expandEasingFunction]()
01612     {
01613         auto const expandAnimation = compositor.CreateVector3KeyFrameAnimation();
01614
01615         auto widthToUse = s_defaultTipHeightAndWidth;
01616         auto heightToUse = s_defaultTipHeightAndWidth;
01617
01618         if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
01619         {
01620             if ((tailOcclusionGrid.ActualWidth() != 0) && (tailOcclusionGrid.ActualHeight() != 0))
01621             {
01622                 widthToUse = static_cast<float>(tailOcclusionGrid.ActualWidth());
01623                 heightToUse = static_cast<float>(tailOcclusionGrid.ActualHeight());
01624             }
01625         }
01626         expandAnimation.SetScalarParameter(L"Width", widthToUse);
01627         expandAnimation.SetScalarParameter(L"Height", heightToUse);
01628
01629         expandAnimation.InsertExpressionKeyFrame(0.0f, L"Vector3(Min(0.01, 20.0 / Width), Min(0.01, 20.0 / Height), 1.0)");
01630         expandAnimation.InsertKeyFrame(1.0f, { 1.0f, 1.0f, 1.0f }, expandEasingFunction);
01631         expandAnimation.Duration(m_expandAnimationDuration);
01632         expandAnimation.Target(s_scaleTargetName);
01633         return expandAnimation;
01634     }());
01635
01636     m_expandElevationAnimation.set([this, compositor, expandEasingFunction]()
01637     {
01638         auto const expandElevationAnimation = compositor.CreateVector3KeyFrameAnimation();
01639         expandElevationAnimation.InsertExpressionKeyFrame(1.0f, L"Vector3(this.Target.Translation.X, this.Target.Translation.Y, contentElevation)", expandEasingFunction);
01640         expandElevationAnimation.SetScalarParameter(L"contentElevation", m_contentElevation);
01641         expandElevationAnimation.Duration(m_expandAnimationDuration);
01642         expandElevationAnimation.Target(s_translationTargetName);
01643         return expandElevationAnimation;
01644     }());
01645 }
01646
01647 void TeachingTip::CreateContractAnimation()
01648 {
01649     auto const compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
01650
01651     auto&& contractEasingFunction = [this, compositor]()
01652     {
01653         if (!m_contractEasingFunction)
01654         {
01655             auto const easingFunction = compositor.CreateCubicBezierEasingFunction(s_contractAnimationEasingCurveControlPoint1, s_contractAnimationEasingCurveControlPoint2);
01656             m_contractEasingFunction.set(easingFunction);
01657             return static_cast<winrt::CompositionEasingFunction>(easingFunction);
01658         }
01659         return m_contractEasingFunction.get();
01660     }();
01661
01662     m_contractAnimation.set([this, compositor, contractEasingFunction]()
01663     {
01664         auto const contractAnimation = compositor.CreateVector3KeyFrameAnimation();
01665         if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
01666         {
01667             contractAnimation.SetScalarParameter(L"Width", static_cast<float>(tailOcclusionGrid.ActualWidth()));
01668             contractAnimation.SetScalarParameter(L"Height", static_cast<float>(tailOcclusionGrid.ActualHeight()));
01669         }
01670         else
01671         {
01672             contractAnimation.SetScalarParameter(L"Width", s_defaultTipHeightAndWidth);
01673             contractAnimation.SetScalarParameter(L"Height", s_defaultTipHeightAndWidth);
01674         }
01675
01676         contractAnimation.InsertKeyFrame(0.0f, { 1.0f, 1.0f, 1.0f });
01677         contractAnimation.InsertExpressionKeyFrame(1.0f, L"Vector3(20.0 / Width, 20.0 / Height, 1.0)", contractEasingFunction);
01678         contractAnimation.Duration(m_contractAnimationDuration);
01679         contractAnimation.Target(s_scaleTargetName);
01680         return contractAnimation;
01681     }());
01682
01683     m_contractElevationAnimation.set([this, compositor, contractEasingFunction]()
01684     {
01685         auto const contractElevationAnimation = compositor.CreateVector3KeyFrameAnimation();
01686         // animating to 0.01f instead of 0.0f as work around to internal issue 26001712 which was causing text clipping.
01687         contractElevationAnimation.InsertExpressionKeyFrame(1.0f, L"Vector3(this.Target.Translation.X, this.Target.Translation.Y, 0.01f)", contractEasingFunction);
01688         contractElevationAnimation.Duration(m_contractAnimationDuration);
01689         contractElevationAnimation.Target(s_translationTargetName);
01690         return contractElevationAnimation;
01691     }());
01692 }
01693
01694 void TeachingTip::StartExpandToOpen()
01695 {
01696     if (!m_expandAnimation)
01697     {
01698         CreateExpandAnimation();
01699     }
01700
01701     auto const scopedBatch = [this]()
01702     {
01703         auto const scopedBatch = winrt::CompositionTarget::GetCompositorForCurrentThread().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
01704
01705         if (auto&& expandAnimation = m_expandAnimation.get())
01706         {
01707             if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
01708             {
01709                 tailOcclusionGrid.StartAnimation(expandAnimation);
01710                 m_isExpandAnimationPlaying = true;
01711             }
01712             if (auto&& tailEdgeBorder = m_tailEdgeBorder.get())
01713             {
01714                 tailEdgeBorder.StartAnimation(expandAnimation);
01715                 m_isExpandAnimationPlaying = true;
01716             }
01717         }
01718         if (auto&& expandElevationAnimation = m_expandElevationAnimation.get())
01719         {
01720             if (auto&& contentRootGrid = m_contentRootGrid.get())
01721             {
01722                 contentRootGrid.StartAnimation(expandElevationAnimation);
01723                 m_isExpandAnimationPlaying = true;
01724             }
01725         }
01726         return scopedBatch;
01727     }();
01728     scopedBatch.End();
01729
01730     scopedBatch.Completed([strongThis = get_strong()](auto, auto)
01731     {
01732         strongThis->m_isExpandAnimationPlaying = false;
01733         if (!strongThis->m_isContractAnimationPlaying)
01734         {
01735             strongThis->SetIsIdle(true);
01736         }
01737     });
01738
01739     // Under normal circumstances we would have launched an animation just now, if we did not then we should make sure that the idle state is correct
01740     if (!m_isExpandAnimationPlaying && !m_isContractAnimationPlaying)
01741     {
01742         SetIsIdle(true);
01743     }
01744 }
01745
01746 void TeachingTip::StartContractToClose()
01747 {
01748     if (!m_contractAnimation)
01749     {
01750         CreateContractAnimation();
01751     }
01752
01753     auto const scopedBatch = [this]()
01754     {
01755         auto const scopedBatch = winrt::CompositionTarget::GetCompositorForCurrentThread().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
01756         if (auto&& contractAnimation = m_contractAnimation.get())
01757         {
01758             if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
01759             {
01760                 tailOcclusionGrid.StartAnimation(contractAnimation);
01761                 m_isContractAnimationPlaying = true;
01762             }
01763             if (auto&& tailEdgeBorder = m_tailEdgeBorder.get())
01764             {
01765                 tailEdgeBorder.StartAnimation(contractAnimation);
01766                 m_isContractAnimationPlaying = true;
01767             }
01768         }
01769         if (auto&& contractElevationAnimation = m_contractElevationAnimation.get())
01770         {
01771             if (auto&& contentRootGrid = m_contentRootGrid.get())
01772             {
01773                 contentRootGrid.StartAnimation(contractElevationAnimation);
01774                 m_isContractAnimationPlaying = true;
01775             }
01776         }
01777         return scopedBatch;
01778     }();
01779     scopedBatch.End();
01780
01781     scopedBatch.Completed([strongThis = get_strong()](auto, auto)
01782     {
01783         strongThis->m_isContractAnimationPlaying = false;
01784         strongThis->ClosePopup();
01785         if (!strongThis->m_isExpandAnimationPlaying)
01786         {
01787             strongThis->SetIsIdle(true);
01788         }
01789     });
01790 }
01791
01792 std::tuple<winrt::TeachingTipPlacementMode, bool> TeachingTip::DetermineEffectivePlacement()
01793 {
01794     // Because we do not have access to APIs to give us details about multi monitor scenarios we do not have the ability to correctly
01795     // Place the tip in scenarios where we have an out of root bounds tip. Since this is the case we have decided to do no special
01796     // calculations and return the provided value or top if auto was set. This behavior can be removed via the
01797     // SetReturnTopForOutOfWindowBounds test hook.
01798     if (!ShouldConstrainToRootBounds() && m_returnTopForOutOfWindowPlacement)
01799     {
01800         auto const placement =  GetFlowDirectionAdjustedPlacement(PreferredPlacement());
01801         if (placement == winrt::TeachingTipPlacementMode::Auto)
01802         {
01803             return std::make_tuple(winrt::TeachingTipPlacementMode::Top, false);
01804         }
01805         return std::make_tuple(placement, false);
01806     }
01807
01808     if (IsOpen() && m_currentEffectiveTipPlacementMode != winrt::TeachingTipPlacementMode::Auto)
01809     {
01810         return std::make_tuple(m_currentEffectiveTipPlacementMode, false);
01811     }
01812
01813     auto const [contentHeight, contentWidth] = [this]()
01814     {
01815         if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
01816         {
01817             double contentHeight = tailOcclusionGrid.ActualHeight();
01818             double contentWidth = tailOcclusionGrid.ActualWidth();
01819             return std::make_tuple(contentHeight, contentWidth);
01820         }
01821         return std::make_tuple(0.0, 0.0);
01822     }();
01823
01824     if (m_target)
01825     {
01826         return DetermineEffectivePlacementTargeted(contentHeight, contentWidth);
01827     }
01828     else
01829     {
01830         return DetermineEffectivePlacementUntargeted(contentHeight, contentWidth);
01831     }
01832 }
01833
01834 std::tuple<winrt::TeachingTipPlacementMode, bool> TeachingTip::DetermineEffectivePlacementTargeted(double contentHeight, double contentWidth)
01835 {
01836     // These variables will track which positions the tip will fit in. They all start true and are
01837     // flipped to false when we find a display condition that is not met.
01838     enum_array <winrt::TeachingTipPlacementMode, bool, 14> availability;
01839     availability[winrt::TeachingTipPlacementMode::Auto] = false;
01840     availability[winrt::TeachingTipPlacementMode::Top] = true;
01841     availability[winrt::TeachingTipPlacementMode::Bottom] = true;
01842     availability[winrt::TeachingTipPlacementMode::Right] = true;
01843     availability[winrt::TeachingTipPlacementMode::Left] = true;
01844     availability[winrt::TeachingTipPlacementMode::TopLeft] = true;
01845     availability[winrt::TeachingTipPlacementMode::TopRight] = true;
01846     availability[winrt::TeachingTipPlacementMode::BottomLeft] = true;
01847     availability[winrt::TeachingTipPlacementMode::BottomRight] = true;
01848     availability[winrt::TeachingTipPlacementMode::LeftTop] = true;
01849     availability[winrt::TeachingTipPlacementMode::LeftBottom] = true;
01850     availability[winrt::TeachingTipPlacementMode::RightTop] = true;
01851     availability[winrt::TeachingTipPlacementMode::RightBottom] = true;
01852     availability[winrt::TeachingTipPlacementMode::Center] = true;
01853
01854     const double tipHeight = contentHeight + TailShortSideLength();
01855     const double tipWidth = contentWidth + TailShortSideLength();
01856
01857     // We try to avoid having the tail touch the HeroContent so rule out positions where this would be required
01858     if (HeroContent())
01859     {
01860         if (auto&& heroContentBorder = m_heroContentBorder.get())
01861         {
01862             if (auto&& nonHeroContentRootGrid = m_nonHeroContentRootGrid.get())
01863             {
01864                 if (heroContentBorder.ActualHeight() > nonHeroContentRootGrid.ActualHeight() - TailLongSideActualLength())
01865                 {
01866                     availability[winrt::TeachingTipPlacementMode::Left] = false;
01867                     availability[winrt::TeachingTipPlacementMode::Right] = false;
01868                 }
01869             }
01870         }
01871
01872         switch (HeroContentPlacement())
01873         {
01874         case winrt::TeachingTipHeroContentPlacementMode::Bottom:
01875             availability[winrt::TeachingTipPlacementMode::Top] = false;
01876             availability[winrt::TeachingTipPlacementMode::TopRight] = false;
01877             availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
01878             availability[winrt::TeachingTipPlacementMode::RightTop] = false;
01879             availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
01880             availability[winrt::TeachingTipPlacementMode::Center] = false;
01881             break;
01882         case winrt::TeachingTipHeroContentPlacementMode::Top:
01883             availability[winrt::TeachingTipPlacementMode::Bottom] = false;
01884             availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
01885             availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
01886             availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
01887             availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
01888             break;
01889         }
01890     }
01891
01892     // When ShouldConstrainToRootBounds is true clippedTargetBounds == availableBoundsAroundTarget
01893     // We have to separate them because there are checks which care about both.
01894     auto const [clippedTargetBounds, availableBoundsAroundTarget] = DetermineSpaceAroundTarget();
01895
01896     // If the edge of the target isn't in the window.
01897     if (clippedTargetBounds.Left < 0)
01898     {
01899         availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
01900         availability[winrt::TeachingTipPlacementMode::Left] = false;
01901         availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
01902     }
01903     // If the right edge of the target isn't in the window.
01904     if (clippedTargetBounds.Right < 0)
01905     {
01906         availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
01907         availability[winrt::TeachingTipPlacementMode::Right] = false;
01908         availability[winrt::TeachingTipPlacementMode::RightTop] = false;
01909     }
01910     // If the top edge of the target isn't in the window.
01911     if (clippedTargetBounds.Top < 0)
01912     {
01913         availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
01914         availability[winrt::TeachingTipPlacementMode::Top] = false;
01915         availability[winrt::TeachingTipPlacementMode::TopRight] = false;
01916     }
01917     // If the bottom edge of the target isn't in the window
01918     if (clippedTargetBounds.Bottom < 0)
01919     {
01920         availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
01921         availability[winrt::TeachingTipPlacementMode::Bottom] = false;
01922         availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
01923     }
01924
01925     // If the horizontal midpoint is out of the window.
01926     if (clippedTargetBounds.Left < -m_currentTargetBoundsInCoreWindowSpace.Width / 2 ||
01927         clippedTargetBounds.Right < -m_currentTargetBoundsInCoreWindowSpace.Width / 2)
01928     {
01929         availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
01930         availability[winrt::TeachingTipPlacementMode::Top] = false;
01931         availability[winrt::TeachingTipPlacementMode::TopRight] = false;
01932         availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
01933         availability[winrt::TeachingTipPlacementMode::Bottom] = false;
01934         availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
01935         availability[winrt::TeachingTipPlacementMode::Center] = false;
01936     }
01937
01938     // If the vertical midpoint is out of the window.
01939     if (clippedTargetBounds.Top < -m_currentTargetBoundsInCoreWindowSpace.Height / 2 ||
01940         clippedTargetBounds.Bottom < -m_currentTargetBoundsInCoreWindowSpace.Height / 2)
01941     {
01942         availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
01943         availability[winrt::TeachingTipPlacementMode::Left] = false;
01944         availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
01945         availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
01946         availability[winrt::TeachingTipPlacementMode::Right] = false;
01947         availability[winrt::TeachingTipPlacementMode::RightTop] = false;
01948         availability[winrt::TeachingTipPlacementMode::Center] = false;
01949     }
01950
01951     // If the tip is too tall to fit between the top of the target and the top edge of the window or screen.
01952     if (tipHeight > availableBoundsAroundTarget.Top)
01953     {
01954         availability[winrt::TeachingTipPlacementMode::Top] = false;
01955         availability[winrt::TeachingTipPlacementMode::TopRight] = false;
01956         availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
01957     }
01958     // If the total tip is too tall to fit between the center of the target and the top of the window.
01959     if (tipHeight > availableBoundsAroundTarget.Top + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
01960     {
01961         availability[winrt::TeachingTipPlacementMode::Center] = false;
01962     }
01963     // If the tip is too tall to fit between the center of the target and the top edge of the window.
01964     if (contentHeight - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Top + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
01965     {
01966         availability[winrt::TeachingTipPlacementMode::RightTop] = false;
01967         availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
01968     }
01969     // If the tip is too tall to fit in the window when the tail is centered vertically on the target and the tip.
01970     if (contentHeight / 2.0f > availableBoundsAroundTarget.Top + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f) ||
01971         contentHeight / 2.0f > availableBoundsAroundTarget.Bottom + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
01972     {
01973         availability[winrt::TeachingTipPlacementMode::Right] = false;
01974         availability[winrt::TeachingTipPlacementMode::Left] = false;
01975     }
01976     // If the tip is too tall to fit between the center of the target and the bottom edge of the window.
01977     if (contentHeight - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Bottom + (m_currentTargetBoundsInCoreWindowSpace.Height / 2.0f))
01978     {
01979         availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
01980         availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
01981     }
01982     // If the tip is too tall to fit between the bottom of the target and the bottom edge of the window.
01983     if (tipHeight > availableBoundsAroundTarget.Bottom)
01984     {
01985         availability[winrt::TeachingTipPlacementMode::Bottom] = false;
01986         availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
01987         availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
01988     }
01989
01990     // If the tip is too wide to fit between the left edge of the target and the left edge of the window.
01991     if (tipWidth > availableBoundsAroundTarget.Left)
01992     {
01993         availability[winrt::TeachingTipPlacementMode::Left] = false;
01994         availability[winrt::TeachingTipPlacementMode::LeftTop] = false;
01995         availability[winrt::TeachingTipPlacementMode::LeftBottom] = false;
01996     }
01997     // If the tip is too wide to fit between the center of the target and the left edge of the window.
01998     if (contentWidth - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Left + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f))
01999     {
02000         availability[winrt::TeachingTipPlacementMode::TopLeft] = false;
02001         availability[winrt::TeachingTipPlacementMode::BottomLeft] = false;
02002     }
02003     // If the tip is too wide to fit in the window when the tail is centered horizontally on the target and the tip.
02004     if (contentWidth / 2.0f > availableBoundsAroundTarget.Left + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f) ||
02005         contentWidth / 2.0f > availableBoundsAroundTarget.Right + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f))
02006     {
02007         availability[winrt::TeachingTipPlacementMode::Top] = false;
02008         availability[winrt::TeachingTipPlacementMode::Bottom] = false;
02009         availability[winrt::TeachingTipPlacementMode::Center] = false;
02010     }
02011     // If the tip is too wide to fit between the center of the target and the right edge of the window.
02012     if (contentWidth - MinimumTipEdgeToTailCenter() > availableBoundsAroundTarget.Right + (m_currentTargetBoundsInCoreWindowSpace.Width / 2.0f))
02013     {
02014         availability[winrt::TeachingTipPlacementMode::TopRight] = false;
02015         availability[winrt::TeachingTipPlacementMode::BottomRight] = false;
02016     }
02017     // If the tip is too wide to fit between the right edge of the target and the right edge of the window.
02018     if (tipWidth > availableBoundsAroundTarget.Right)
02019     {
02020         availability[winrt::TeachingTipPlacementMode::Right] = false;
02021         availability[winrt::TeachingTipPlacementMode::RightTop] = false;
02022         availability[winrt::TeachingTipPlacementMode::RightBottom] = false;
02023     }
02024
02025     auto const wantedDirection = GetFlowDirectionAdjustedPlacement(PreferredPlacement());
02026     auto const priorities = GetPlacementFallbackOrder(wantedDirection);
02027
02028     for (auto const mode : priorities)
02029     {
02030         if (availability[mode])
02031         {
02032             return std::make_tuple(mode, false);
02033         }
02034     }
02035     // The teaching tip wont fit anywhere, set tipDoesNotFit to indicate that we should not open.
02036     return std::make_tuple(winrt::TeachingTipPlacementMode::Top, true);
02037 }
02038
02039 std::tuple<winrt::TeachingTipPlacementMode, bool> TeachingTip::DetermineEffectivePlacementUntargeted(double contentHeight, double contentWidth)
02040 {
02041     auto const windowBounds = GetWindowBounds();
02042     if (!ShouldConstrainToRootBounds())
02043     {
02044         auto const screenBoundsInCoreWindowSpace = GetEffectiveScreenBoundsInCoreWindowSpace(windowBounds);
02045         if (screenBoundsInCoreWindowSpace.Height > contentHeight && screenBoundsInCoreWindowSpace.Width > contentWidth)
02046         {
02047             return std::make_tuple(winrt::TeachingTipPlacementMode::Bottom, false);
02048         }
02049     }
02050     else
02051     {
02052         auto const windowBoundsInCoreWindowSpace = GetEffectiveWindowBoundsInCoreWindowSpace(windowBounds);
02053         if (windowBoundsInCoreWindowSpace.Height > contentHeight && windowBoundsInCoreWindowSpace.Width > contentWidth)
02054         {
02055             return std::make_tuple(winrt::TeachingTipPlacementMode::Bottom, false);
02056         }
02057     }
02058
02059     // The teaching tip doesn't fit in the window/screen set tipDoesNotFit to indicate that we should not open.
02060     return std::make_tuple(winrt::TeachingTipPlacementMode::Top, true);
02061 }
02062
02063 std::tuple<winrt::Thickness, winrt::Thickness> TeachingTip::DetermineSpaceAroundTarget()
02064 {
02065     auto const shouldConstrainToRootBounds = ShouldConstrainToRootBounds();
02066
02067     auto const [windowBoundsInCoreWindowSpace, screenBoundsInCoreWindowSpace] = [this]()
02068     {
02069         auto const windowBounds = GetWindowBounds();
02070         return std::make_tuple(GetEffectiveWindowBoundsInCoreWindowSpace(windowBounds),
02071                                GetEffectiveScreenBoundsInCoreWindowSpace(windowBounds));
02072     }();
02073
02074
02075     const winrt::Thickness windowSpaceAroundTarget{
02076         // Target.Left - Window.Left
02077         static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) - /* 0 except with test window bounds */ windowBoundsInCoreWindowSpace.X,
02078         // Target.Top - Window.Top
02079         static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) - /* 0 except with test window bounds */ windowBoundsInCoreWindowSpace.Y,
02080         // Window.Right - Target.Right
02081         (static_cast<double>(windowBoundsInCoreWindowSpace.X) + windowBoundsInCoreWindowSpace.Width) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width),
02082         // Screen.Right - Target.Right
02083         (static_cast<double>(windowBoundsInCoreWindowSpace.Y) + windowBoundsInCoreWindowSpace.Height) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height) };
02084
02085
02086     const winrt::Thickness screenSpaceAroundTarget = [this, screenBoundsInCoreWindowSpace, windowSpaceAroundTarget]()
02087     {
02088         if (!ShouldConstrainToRootBounds())
02089         {
02090             return winrt::Thickness{
02091                 // Target.Left - Screen.Left
02092                 static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) - screenBoundsInCoreWindowSpace.X,
02093                 // Target.Top - Screen.Top
02094                 static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) - screenBoundsInCoreWindowSpace.Y,
02095                 // Screen.Right - Target.Right
02096                 (static_cast<double>(screenBoundsInCoreWindowSpace.X) + screenBoundsInCoreWindowSpace.Width) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.X) + m_currentTargetBoundsInCoreWindowSpace.Width),
02097                 // Screen.Bottom - Target.Bottom
02098                 (static_cast<double>(screenBoundsInCoreWindowSpace.Y) + screenBoundsInCoreWindowSpace.Height) - (static_cast<double>(m_currentTargetBoundsInCoreWindowSpace.Y) + m_currentTargetBoundsInCoreWindowSpace.Height) };
02099         }
02100         return windowSpaceAroundTarget;
02101     }();
02102
02103     return std::make_tuple(windowSpaceAroundTarget, screenSpaceAroundTarget);
02104 }
02105
02106 winrt::Rect TeachingTip::GetEffectiveWindowBoundsInCoreWindowSpace(const winrt::Rect& windowBounds)
02107 {
02108     if (m_useTestWindowBounds)
02109     {
02110         return m_testWindowBoundsInCoreWindowSpace;
02111     }
02112     else
02113     {
02114         return winrt::Rect{ 0, 0, windowBounds.Width, windowBounds.Height };
02115     }
02116
02117 }
02118
02119 winrt::Rect TeachingTip::GetEffectiveScreenBoundsInCoreWindowSpace(const winrt::Rect& windowBounds)
02120 {
02121     if (!m_useTestScreenBounds && !ShouldConstrainToRootBounds())
02122     {
02123         MUX_ASSERT_MSG(!m_returnTopForOutOfWindowPlacement, "When returnTopForOutOfWindowPlacement is true we will never need to get the screen bounds");
02124         auto const displayInfo = winrt::DisplayInformation::GetForCurrentView();
02125         auto const scaleFactor = displayInfo.RawPixelsPerViewPixel();
02126         return winrt::Rect(-windowBounds.X,
02127             -windowBounds.Y,
02128             displayInfo.ScreenHeightInRawPixels() / static_cast<float>(scaleFactor),
02129             displayInfo.ScreenWidthInRawPixels() / static_cast<float>(scaleFactor));
02130     }
02131     return m_testScreenBoundsInCoreWindowSpace;
02132 }
02133
02134 winrt::Rect TeachingTip::GetWindowBounds()
02135 {
02136     if (auto const xamlRoot = this->XamlRoot())
02137     {
02138         return winrt::Rect{ 0, 0, xamlRoot.Size().Width, xamlRoot.Size().Height };
02139     }
02140     return winrt::Rect{ 0, 0, 0, 0 };
02141 }
02142
02143 std::array<winrt::TeachingTipPlacementMode, 13> TeachingTip::GetPlacementFallbackOrder(winrt::TeachingTipPlacementMode preferredPlacement)
02144 {
02145     auto priorityList = std::array<winrt::TeachingTipPlacementMode, 13>();
02146     priorityList[0] = winrt::TeachingTipPlacementMode::Top;
02147     priorityList[1] = winrt::TeachingTipPlacementMode::Bottom;
02148     priorityList[2] = winrt::TeachingTipPlacementMode::Left;
02149     priorityList[3] = winrt::TeachingTipPlacementMode::Right;
02150     priorityList[4] = winrt::TeachingTipPlacementMode::TopLeft;
02151     priorityList[5] = winrt::TeachingTipPlacementMode::TopRight;
02152     priorityList[6] = winrt::TeachingTipPlacementMode::BottomLeft;
02153     priorityList[7] = winrt::TeachingTipPlacementMode::BottomRight;
02154     priorityList[8] = winrt::TeachingTipPlacementMode::LeftTop;
02155     priorityList[9] = winrt::TeachingTipPlacementMode::LeftBottom;
02156     priorityList[10] = winrt::TeachingTipPlacementMode::RightTop;
02157     priorityList[11] = winrt::TeachingTipPlacementMode::RightBottom;
02158     priorityList[12] = winrt::TeachingTipPlacementMode::Center;
02159
02160
02161     if (IsPlacementBottom(preferredPlacement))
02162     {
02163         // Swap to bottom > top
02164         std::swap(priorityList[0], priorityList[1]);
02165         std::swap(priorityList[4], priorityList[6]);
02166         std::swap(priorityList[5], priorityList[7]);
02167     }
02168     else if (IsPlacementLeft(preferredPlacement))
02169     {
02170         // swap to lateral > vertical
02171         std::swap(priorityList[0], priorityList[2]);
02172         std::swap(priorityList[1], priorityList[3]);
02173         std::swap(priorityList[4], priorityList[8]);
02174         std::swap(priorityList[5], priorityList[9]);
02175         std::swap(priorityList[6], priorityList[10]);
02176         std::swap(priorityList[7], priorityList[11]);
02177     }
02178     else if (IsPlacementRight(preferredPlacement))
02179     {
02180         // swap to lateral > vertical
02181         std::swap(priorityList[0], priorityList[2]);
02182         std::swap(priorityList[1], priorityList[3]);
02183         std::swap(priorityList[4], priorityList[8]);
02184         std::swap(priorityList[5], priorityList[9]);
02185         std::swap(priorityList[6], priorityList[10]);
02186         std::swap(priorityList[7], priorityList[11]);
02187
02188         // swap to right > left
02189         std::swap(priorityList[0], priorityList[1]);
02190         std::swap(priorityList[4], priorityList[6]);
02191         std::swap(priorityList[5], priorityList[7]);
02192     }
02193
02194     //Switch the preferred placement to first.
02195     auto const pivot = std::find_if(priorityList.begin(),
02196         priorityList.end(),
02197         [preferredPlacement](const winrt::TeachingTipPlacementMode mode) -> bool {
02198             return mode == preferredPlacement;
02199         });
02200     if (pivot != priorityList.end()) {
02201         std::rotate(priorityList.begin(), pivot, pivot + 1);
02202     }
02203
02204     return priorityList;
02205 }
02206
02207
02208 void TeachingTip::EstablishShadows()
02209 {
02210 #ifdef TAIL_SHADOW
02211 #ifdef DBG
02212     if (m_tipShadow)
02213     {
02214         auto&& tailPolygon = m_tailPolygon.get()
02215         if (tailPolygon && !tailPolygon.Shadow())
02216         {
02217             // This facilitates an experiment around faking a proper tail shadow, shadows are expensive though so we don't want it present for release builds.
02218             auto const tailShadow = winrt::Microsoft::UI::Xaml::Media::ThemeShadow{};
02219             tailShadow.Receivers().Append(m_target.get());
02220             tailPolygon.Shadow(tailShadow);
02221             auto const tailPolygonTranslation = tailPolygon.Translation()
02222             tailPolygon.Translation({ tailPolygonTranslation.x, tailPolygonTranslation.y, m_tailElevation });
02223         }
02224     }
02225     else
02226     {
02227         m_tailPolygon.get().Shadow(nullptr);
02228     }
02229 #endif
02230 #endif
02231     if (m_tipShouldHaveShadow)
02232     {
02233         if (!m_contentRootGrid.get().Shadow())
02234         {
02235             m_contentRootGrid.get().Shadow(winrt::ThemeShadow{});
02236             if (auto&& contentRootGrid = m_contentRootGrid.get())
02237             {
02238                 const auto contentRootGridTranslation = contentRootGrid.Translation();
02239                 contentRootGrid.Translation({ contentRootGridTranslation.x, contentRootGridTranslation.y, m_contentElevation });
02240             }
02241         }
02242     }
02243     else
02244     {
02245         m_contentRootGrid.get().Shadow(nullptr);
02246     }
02247 }
02248
02249 void TeachingTip::TrySetCenterPoint(const winrt::IUIElement& element, const winrt::float3& centerPoint)
02250 {
02251     if (element)
02252     {
02253         element.CenterPoint(centerPoint);
02254     }
02255 }
02256
02257 void TeachingTip::OnPropertyChanged(
02258     const winrt::DependencyObject& sender,
02259     const winrt::DependencyPropertyChangedEventArgs& args)
02260 {
02261     winrt::get_self<TeachingTip>(sender.as<winrt::TeachingTip>())->OnPropertyChanged(args);
02262 }
02263
02264 double TeachingTip::TailLongSideActualLength()
02265 {
02266     if (auto&& tailPolygon = m_tailPolygon.get())
02267     {
02268         return std::max(tailPolygon.ActualHeight(), tailPolygon.ActualWidth());
02269     }
02270     return 0;
02271 }
02272
02273 double TeachingTip::TailLongSideLength()
02274 {
02275     return TailLongSideActualLength() - (2 * static_cast<double>(s_tailOcclusionAmount));
02276 }
02277
02278 double TeachingTip::TailShortSideLength()
02279 {
02280     if (auto&& tailPolygon = m_tailPolygon.get())
02281     {
02282         return std::min(tailPolygon.ActualHeight(), tailPolygon.ActualWidth()) - s_tailOcclusionAmount;
02283     }
02284     return 0;
02285 }
02286
02287 double TeachingTip::MinimumTipEdgeToTailEdgeMargin()
02288 {
02289     if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
02290     {
02291         return tailOcclusionGrid.ColumnDefinitions().Size() > 1 ?
02292             tailOcclusionGrid.ColumnDefinitions().GetAt(1).ActualWidth() + s_tailOcclusionAmount
02293             : 0.0;
02294     }
02295     return 0;
02296 }
02297
02298 double TeachingTip::MinimumTipEdgeToTailCenter()
02299 {
02300     if (auto&& tailOcclusionGrid = m_tailOcclusionGrid.get())
02301     {
02302         if (auto&& tailPolygon = m_tailPolygon.get())
02303         {
02304             return tailOcclusionGrid.ColumnDefinitions().Size() > 1 ?
02305                 tailOcclusionGrid.ColumnDefinitions().GetAt(0).ActualWidth() +
02306                 tailOcclusionGrid.ColumnDefinitions().GetAt(1).ActualWidth() +
02307                 (std::max(tailPolygon.ActualHeight(), tailPolygon.ActualWidth()) / 2)
02308                 : 0.0;
02309         }
02310     }
02311     return 0;
02312 }
02313
02314 winrt::CornerRadius TeachingTip::GetTeachingTipCornerRadius()
02315 {
02316     return CornerRadius();
02317 }
02318
02319 ////////////////
02320 // Test Hooks //
02321 ////////////////
02322 void TeachingTip::SetExpandEasingFunction(const winrt::CompositionEasingFunction& easingFunction)
02323 {
02324     m_expandEasingFunction.set(easingFunction);
02325     CreateExpandAnimation();
02326 }
02327
02328 void TeachingTip::SetContractEasingFunction(const winrt::CompositionEasingFunction& easingFunction)
02329 {
02330     m_contractEasingFunction.set(easingFunction);
02331     CreateContractAnimation();
02332 }
02333
02334 void TeachingTip::SetTipShouldHaveShadow(bool tipShouldHaveShadow)
02335 {
02336     if (m_tipShouldHaveShadow != tipShouldHaveShadow)
02337     {
02338         m_tipShouldHaveShadow = tipShouldHaveShadow;
02339         EstablishShadows();
02340     }
02341 }
02342
02343 void TeachingTip::SetContentElevation(float elevation)
02344 {
02345     m_contentElevation = elevation;
02346
02347     if (auto&& contentRootGrid = m_contentRootGrid.get())
02348     {
02349         auto const contentRootGridTranslation = contentRootGrid.Translation();
02350         m_contentRootGrid.get().Translation({ contentRootGridTranslation.x, contentRootGridTranslation.y, m_contentElevation });
02351     }
02352     if (m_expandElevationAnimation)
02353     {
02354         m_expandElevationAnimation.get().SetScalarParameter(L"contentElevation", m_contentElevation);
02355     }
02356 }
02357
02358 void TeachingTip::SetTailElevation(float elevation)
02359 {
02360     m_tailElevation = elevation;
02361     if (m_tailPolygon)
02362     {
02363         if (auto&& tailPolygon = m_tailPolygon.get())
02364         {
02365             auto const tailPolygonTranslation = tailPolygon.Translation();
02366             tailPolygon.Translation({ tailPolygonTranslation.x, tailPolygonTranslation.y, m_tailElevation });
02367         }
02368     }
02369 }
02370
02371 void TeachingTip::SetUseTestWindowBounds(bool useTestWindowBounds)
02372 {
02373     m_useTestWindowBounds = useTestWindowBounds;
02374 }
02375
02376 void TeachingTip::SetTestWindowBounds(const winrt::Rect& testWindowBounds)
02377 {
02378     m_testWindowBoundsInCoreWindowSpace = testWindowBounds;
02379 }
02380
02381 void TeachingTip::SetUseTestScreenBounds(bool useTestScreenBounds)
02382 {
02383     m_useTestScreenBounds = useTestScreenBounds;
02384 }
02385
02386 void TeachingTip::SetTestScreenBounds(const winrt::Rect& testScreenBounds)
02387 {
02388     m_testScreenBoundsInCoreWindowSpace = testScreenBounds;
02389 }
02390
02391 void TeachingTip::SetTipFollowsTarget(bool tipFollowsTarget)
02392 {
02393     if (m_tipFollowsTarget != tipFollowsTarget)
02394     {
02395         m_tipFollowsTarget = tipFollowsTarget;
02396         if (tipFollowsTarget)
02397         {
02398             if (auto&& target = m_target.get())
02399             {
02400                 SetViewportChangedEvent(gsl::make_strict_not_null(target));
02401             }
02402         }
02403         else
02404         {
02405             RevokeViewportChangedEvent();
02406         }
02407     }
02408 }
02409
02410 void TeachingTip::SetReturnTopForOutOfWindowPlacement(bool returnTopForOutOfWindowPlacement)
02411 {
02412     m_returnTopForOutOfWindowPlacement = returnTopForOutOfWindowPlacement;
02413 }
02414
02415 void TeachingTip::SetExpandAnimationDuration(const winrt::TimeSpan& expandAnimationDuration)
02416 {
02417     m_expandAnimationDuration = expandAnimationDuration;
02418     if (auto&& expandAnimation = m_expandAnimation.get())
02419     {
02420         expandAnimation.Duration(m_expandAnimationDuration);
02421     }
02422     if (auto&& expandElevationAnimation = m_expandElevationAnimation.get())
02423     {
02424         expandElevationAnimation.Duration(m_expandAnimationDuration);
02425     }
02426 }
02427
02428 void TeachingTip::SetContractAnimationDuration(const winrt::TimeSpan& contractAnimationDuration)
02429 {
02430     m_contractAnimationDuration = contractAnimationDuration;
02431     if (auto&& contractAnimation = m_contractAnimation.get())
02432     {
02433         contractAnimation.Duration(m_contractAnimationDuration);
02434     }
02435     if (auto&& contractElevationAnimation = m_contractElevationAnimation.get())
02436     {
02437         contractElevationAnimation.Duration(m_contractAnimationDuration);
02438     }
02439 }
02440
02441 bool TeachingTip::GetIsIdle()
02442 {
02443     return m_isIdle;
02444 }
02445
02446 void TeachingTip::SetIsIdle(bool isIdle)
02447 {
02448     if (m_isIdle != isIdle)
02449     {
02450         m_isIdle = isIdle;
02451         TeachingTipTestHooks::NotifyIdleStatusChanged(*this);
02452     }
02453 }
02454
02455 winrt::TeachingTipPlacementMode TeachingTip::GetEffectivePlacement()
02456 {
02457     return m_currentEffectiveTipPlacementMode;
02458 }
02459
02460 winrt::TeachingTipHeroContentPlacementMode TeachingTip::GetEffectiveHeroContentPlacement()
02461 {
02462     return m_currentHeroContentEffectivePlacementMode;
02463 }
02464
02465 double TeachingTip::GetHorizontalOffset()
02466 {
02467     if (auto&& popup = m_popup.get())
02468     {
02469         return popup.HorizontalOffset();
02470     }
02471     return 0.0;
02472 }
02473
02474 double TeachingTip::GetVerticalOffset()
02475 {
02476     if (auto&& popup = m_popup.get())
02477     {
02478         return popup.VerticalOffset();
02479     }
02480     return 0.0;
02481 }
02482
02483 winrt::Visibility TeachingTip::GetTitleVisibility()
02484 {
02485     if (auto&& titleTextBox = GetTemplateChildT<winrt::UIElement>(s_titleTextBoxName, *this))
02486     {
02487         return titleTextBox.Visibility();
02488     }
02489     return winrt::Visibility::Collapsed;
02490 }
02491
02492 winrt::Visibility TeachingTip::GetSubtitleVisibility()
02493 {
02494     if (auto&& subtitleTextBox = GetTemplateChildT<winrt::UIElement>(s_subtitleTextBoxName, *this))
02495     {
02496         return subtitleTextBox.Visibility();
02497     }
02498     return winrt::Visibility::Collapsed;
02499 }
02500
02501 void TeachingTip::UpdatePopupRequestedTheme()
02502 {
02503     // The way that TeachingTip reparents its content tree breaks ElementTheme calculations. Hook up a listener to
02504     // ActualTheme on the TeachingTip and then set the Popup's RequestedTheme to match when it changes.
02505
02506     if (!m_actualThemeChangedRevoker)
02507     {
02508         m_actualThemeChangedRevoker = this->ActualThemeChanged(winrt::auto_revoke,
02509             [this](auto&&, auto&&) { UpdatePopupRequestedTheme(); });
02510     }
02511
02512     if (auto && popup = m_popup.get())
02513     {
02514         popup.RequestedTheme(this->ActualTheme());
02515     }
02516 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtons.idl Source File

  • File List
  • File Members
  • RadioButtons

RadioButtons.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [contentproperty("Items")]
00007 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00008 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00009 unsealed runtimeclass RadioButtons : Microsoft.UI.Xaml.Controls.Control
00010 {
00011     RadioButtons();
00012
00013     Object ItemsSource;
00014     Windows.Foundation.Collections.IVector<Object> Items{ get; };
00015     Object ItemTemplate;
00016
00017     Microsoft.UI.Xaml.UIElement ContainerFromIndex(Int32 index);
00018
00019     [MUX_DEFAULT_VALUE("-1")]
00020     Int32 SelectedIndex;
00021     Object SelectedItem;
00022     event Microsoft.UI.Xaml.Controls.SelectionChangedEventHandler SelectionChanged;
00023
00024     [MUX_DEFAULT_VALUE("1")]
00025     Int32 MaxColumns;
00026
00027     Object Header;
00028     Microsoft.UI.Xaml.DataTemplate HeaderTemplate;
00029
00030     static Microsoft.UI.Xaml.DependencyProperty ItemsSourceProperty{ get; };
00031     static Microsoft.UI.Xaml.DependencyProperty ItemsProperty{ get; };
00032     static Microsoft.UI.Xaml.DependencyProperty ItemTemplateProperty{ get; };
00033     static Microsoft.UI.Xaml.DependencyProperty SelectedIndexProperty{ get; };
00034     static Microsoft.UI.Xaml.DependencyProperty SelectedItemProperty{ get; };
00035     static Microsoft.UI.Xaml.DependencyProperty MaxColumnsProperty{ get; };
00036     static Microsoft.UI.Xaml.DependencyProperty HeaderProperty{ get; };
00037     static Microsoft.UI.Xaml.DependencyProperty HeaderTemplateProperty{ get; };
00038 }
00039
00040 }
00041
00042 namespace MU_XAP_NAMESPACE
00043 {
00044
00045 [MUX_PUBLIC]
00046 [webhosthidden]
00047 unsealed runtimeclass RadioButtonsAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00048 {
00049     RadioButtonsAutomationPeer(MU_XC_NAMESPACE.RadioButtons owner);
00050 }
00051
00052 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutPanelTests Member List

This is the complete list of members for LayoutPanelTests, including all inherited members.
ClassInitialize(TestContext context) | LayoutPanelTests | [inline, static]
VerifyCustomNonVirtualizingLayout() | LayoutPanelTests | [inline]
VerifyPaddingAndBorderThicknessLayoutOffset() | LayoutPanelTests | [inline]
VerifyPaddingAndBorderThicknessLayoutOffset_StackLayout() | LayoutPanelTests | [inline]
VerifySwitchingLayoutDynamically() | LayoutPanelTests | [inline]
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbTests Member List

This is the complete list of members for BreadcrumbTests, including all inherited members.
VerifyBreadcrumbDefaultAPIValues() | BreadcrumbTests | [inline]
VerifyCollectionChangeGetsRespected() | BreadcrumbTests | [inline]
VerifyCustomItemTemplate() | BreadcrumbTests | [inline]
VerifyDefaultBreadcrumb() | BreadcrumbTests | [inline]
VerifyDropdownItemTemplate() | BreadcrumbTests | [inline]
VerifyDropdownItemTemplateWithNoControl() | BreadcrumbTests | [inline]
VerifyNumericItemsSource() | BreadcrumbTests | [inline]
VerifyObjectItemsSource() | BreadcrumbTests | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewAutomationPeer.cpp Source File

  • File List
  • File Members
  • TabView

TabViewAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "TabView.h"
00008 #include "TabViewAutomationPeer.h"
00009 #include "Utils.h"
00010
00011 #include "TabViewAutomationPeer.properties.cpp"
00012
00013 TabViewAutomationPeer::TabViewAutomationPeer(winrt::TabView const& owner)
00014     : ReferenceTracker(owner)
00015 {
00016 }
00017
00018 // IAutomationPeerOverrides
00019 winrt::IInspectable TabViewAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00020 {
00021     if (patternInterface == winrt::PatternInterface::Selection)
00022     {
00023         return *this;
00024     }
00025     return __super::GetPatternCore(patternInterface);
00026 }
00027
00028 hstring TabViewAutomationPeer::GetClassNameCore()
00029 {
00030     return winrt::hstring_name_of<winrt::TabView>();
00031 }
00032
00033 winrt::AutomationControlType TabViewAutomationPeer::GetAutomationControlTypeCore()
00034 {
00035     return winrt::AutomationControlType::Tab;
00036 }
00037
00038 bool TabViewAutomationPeer::CanSelectMultiple()
00039 {
00040     return false;
00041 }
00042
00043 bool TabViewAutomationPeer::IsSelectionRequired()
00044 {
00045     return true;
00046 }
00047
00048 winrt::com_array<winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple> TabViewAutomationPeer::GetSelection()
00049 {
00050     if (auto tabView = Owner().try_as<TabView>())
00051     {
00052         if (auto tabViewItem = tabView->ContainerFromIndex(tabView->SelectedIndex()).try_as<winrt::TabViewItem>())
00053         {
00054             if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(tabViewItem))
00055             {
00056                 return { ProviderFromPeer(peer) };
00057             }
00058         }
00059     }
00060     return {};
00061 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenter Member List

This is the complete list of members for ScrollPresenter, including all inherited members.
abi_enter() | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
AddScrollVelocity(winrt::float2 offsetsVelocity, winrt::IReference< winrt::float2 > inertiaDecayRate) | ScrollPresenter |
AddZoomVelocity(float zoomFactorVelocity, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate) | ScrollPresenter |
AnchorElement() | ScrollPresenter |
AnchorRequested(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingAnchorRequestedEventArgs > const &value) | ScrollPresenterProperties |
AnchorRequested(winrt::event_token const &token) | ScrollPresenterProperties |
AnticipatedScrollableHeight() const | ScrollPresenter | [private]
AnticipatedScrollableWidth() const | ScrollPresenter | [private]
AnticipatedZoomedHorizontalOffset() const | ScrollPresenter | [private]
AnticipatedZoomedVerticalOffset() const | ScrollPresenter | [private]
AnticipatedZoomFactor() const | ScrollPresenter | [private]
ArrangeContent(const winrt::UIElement &content, const winrt::Thickness &contentMargin, winrt::Rect &finalContentRect, bool wasContentArrangeWidthStretched, bool wasContentArrangeHeightStretched) | ScrollPresenter | [private]
ArrangeOverride(winrt::Size const &finalSize) | ScrollPresenter |
Background(winrt::Brush const &value) | ScrollPresenterProperties |
Background() | ScrollPresenterProperties |
BackgroundProperty() | ScrollPresenterProperties | [inline, static]
BringingIntoView(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingBringingIntoViewEventArgs > const &value) | ScrollPresenterProperties |
BringingIntoView(winrt::event_token const &token) | ScrollPresenterProperties |
ChangeOffsetsPrivate(double zoomedHorizontalOffset, double zoomedVerticalOffset, ScrollPresenterViewKind offsetsKind, winrt::ScrollingScrollOptions const &options, winrt::BringIntoViewRequestedEventArgs const &bringIntoViewRequestedEventArgs, InteractionTrackerAsyncOperationTrigger operationTrigger, int32_t existingViewChangeCorrelationId, _Out_opt_ int32_t *viewChangeCorrelationId) | ScrollPresenter | [private]
ChangeOffsetsWithAdditionalVelocityPrivate(winrt::float2 offsetsVelocity, winrt::float2 anticipatedOffsetsChange, winrt::IReference< winrt::float2 > inertiaDecayRate, InteractionTrackerAsyncOperationTrigger operationTrigger, _Out_opt_ int32_t *viewChangeCorrelationId) | ScrollPresenter | [private]
ChangeZoomFactorPrivate(float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, ScrollPresenterViewKind zoomFactorKind, winrt::ScrollingZoomOptions const &options, _Out_opt_ int32_t *viewChangeCorrelationId) | ScrollPresenter | [private]
ChangeZoomFactorWithAdditionalVelocityPrivate(float zoomFactorVelocity, float anticipatedZoomFactorChange, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate, InteractionTrackerAsyncOperationTrigger operationTrigger, _Out_opt_ int32_t *viewChangeCorrelationId) | ScrollPresenter | [private]
CheckThread() | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
ClearAnchorCandidates() | ScrollPresenter | [private]
ClearProperties() | ScrollPresenterProperties | [static]
CompleteDelayedOperations() | ScrollPresenter | [private]
CompleteInteractionTrackerOperations(int requestId, ScrollPresenterViewChangeResult operationResult, ScrollPresenterViewChangeResult priorNonAnimatedOperationsResult, ScrollPresenterViewChangeResult priorAnimatedOperationsResult, bool completeNonAnimatedOperation, bool completeAnimatedOperation, bool completePriorNonAnimatedOperations, bool completePriorAnimatedOperations) | ScrollPresenter | [private]
CompleteViewChange(std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation, ScrollPresenterViewChangeResult result) | ScrollPresenter | [private]
ComputeAnchorPoint(const winrt::Rect &anchorBounds, _Out_ double *anchorPointX, _Out_ double *anchorPointY) | ScrollPresenter | [private]
ComputeBringIntoViewTargetOffsets(const winrt::UIElement &content, const winrt::UIElement &element, const winrt::Rect &elementRect, const winrt::ScrollingSnapPointsMode &snapPointsMode, double horizontalAlignmentRatio, double verticalAlignmentRatio, double horizontalOffset, double verticalOffset, _Out_ double *targetZoomedHorizontalOffset, _Out_ double *targetZoomedVerticalOffset, _Out_opt_ double *appliedOffsetX, _Out_opt_ double *appliedOffsetY, _Out_opt_ winrt::Rect *targetRect) | ScrollPresenter | [private]
ComputeBringIntoViewTargetOffsetsFromRequestEventArgs(const winrt::UIElement &content, const winrt::ScrollingSnapPointsMode &snapPointsMode, const winrt::BringIntoViewRequestedEventArgs &requestEventArgs, _Out_ double *targetZoomedHorizontalOffset, _Out_ double *targetZoomedVerticalOffset, _Out_ double *appliedOffsetX, _Out_ double *appliedOffsetY, _Out_ winrt::Rect *targetRect) | ScrollPresenter | [private]
ComputeBringIntoViewUpdatedTargetOffsets(const winrt::UIElement &content, const winrt::UIElement &element, const winrt::Rect &elementRect, const winrt::ScrollingSnapPointsMode &snapPointsMode, double horizontalAlignmentRatio, double verticalAlignmentRatio, double horizontalOffset, double verticalOffset, _Out_ double *targetZoomedHorizontalOffset, _Out_ double *targetZoomedVerticalOffset) | ScrollPresenter | [private]
ComputeContentLayoutOffsetDelta(ScrollPresenterDimension dimension, float unzoomedDelta) const | ScrollPresenter | [private]
ComputedHorizontalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollPresenterProperties |
ComputedHorizontalScrollMode() | ScrollPresenterProperties |
ComputedHorizontalScrollModeProperty() | ScrollPresenterProperties | [inline, static]
ComputedVerticalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollPresenterProperties |
ComputedVerticalScrollMode() | ScrollPresenterProperties |
ComputedVerticalScrollModeProperty() | ScrollPresenterProperties | [inline, static]
ComputeElementAnchorPoint(bool isForPreArrange, _Out_ double *elementAnchorPointHorizontalOffset, _Out_ double *elementAnchorPointVerticalOffset) | ScrollPresenter | [private]
ComputeEndOfInertiaZoomFactor() const | ScrollPresenter | [private]
ComputeMinMaxPositions(float zoomFactor, _Out_opt_ winrt::float2 *minPosition, _Out_opt_ winrt::float2 *maxPosition) | ScrollPresenter | [private]
ComputePositionFromOffsets(double zoomedHorizontalOffset, double zoomedVerticalOffset) | ScrollPresenter | [private]
ComputeValueAfterSnapPoints(double value, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> const &snapPointsSet) | ScrollPresenter | [private]
ComputeValueAfterSnapPoints(double value, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> const &snapPointsSet) | ScrollPresenter |
ComputeViewportAnchorPoint(double viewportWidth, double viewportHeight, _Out_ double *viewportAnchorPointHorizontalOffset, _Out_ double *viewportAnchorPointVerticalOffset) | ScrollPresenter | [private]
ComputeViewportToElementAnchorPointsDistance(double viewportWidth, double viewportHeight, bool isForPreArrange) | ScrollPresenter | [private]
ComputeZoomedOffsetWithMinimalChange(double viewportStart, double viewportEnd, double childStart, double childEnd) | ScrollPresenter | [private, static]
ConfigurationChanged(winrt::ConfigurationChangedEventHandler const &value) | ScrollPresenter |
ConfigurationChanged(winrt::event_token const &token) | ScrollPresenter |
Content(winrt::UIElement const &value) | ScrollPresenterProperties |
Content() | ScrollPresenterProperties |
ContentOrientation(winrt::ScrollingContentOrientation const &value) | ScrollPresenterProperties |
ContentOrientation() | ScrollPresenterProperties |
ContentOrientationProperty() | ScrollPresenterProperties | [inline, static]
ContentProperty() | ScrollPresenterProperties | [inline, static]
CurrentAnchor() | ScrollPresenter |
CustomAnimationStateEntered(const winrt::InteractionTrackerCustomAnimationStateEnteredArgs &args) | ScrollPresenter |
DeleteInstanceOnUIThread(std::unique_ptr< ScrollPresenter > &&self) noexcept | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline, static]
EnsureAnchorElementSelection() | ScrollPresenter | [private]
EnsureExpressionAnimationSources() | ScrollPresenter | [private]
EnsureInteractionTracker() | ScrollPresenter | [private]
EnsurePositionBoundariesExpressionAnimations() | ScrollPresenter | [private]
EnsureProperties() | ScrollPresenterProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
EnsureScrollControllerExpressionAnimationSources(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
EnsureScrollControllerVisualInteractionSource(const winrt::Visual &panningElementAncestorVisual, ScrollPresenterDimension dimension) | ScrollPresenter | [private]
EnsureScrollPresenterVisualInteractionSource() | ScrollPresenter | [private]
EnsureTransformExpressionAnimations() | ScrollPresenter | [private]
ExpressionAnimationSources() | ScrollPresenter |
ExtentChanged(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value) | ScrollPresenterProperties |
ExtentChanged(winrt::event_token const &token) | ScrollPresenterProperties |
ExtentHeight() const | ScrollPresenter |
ExtentWidth() const | ScrollPresenter |
final_release(std::unique_ptr< ScrollPresenter > &&self) | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline, static]
GetArrangeRenderSizesDelta(const winrt::UIElement &content) const | ScrollPresenter | [private]
GetArrangeRenderSizesDeltaDbg() | ScrollPresenter |
GetBase() | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
GetComputedAnimationMode(winrt::ScrollingAnimationMode const &animationMode) | ScrollPresenter | [private, static]
GetComputedMaxHeight(double defaultMaxHeight, const winrt::FrameworkElement &content) const | ScrollPresenter | [private]
GetComputedMaxWidth(double defaultMaxWidth, const winrt::FrameworkElement &content) const | ScrollPresenter | [private]
GetComputedScrollMode(ScrollPresenterDimension dimension, bool ignoreZoomMode=false) | ScrollPresenter | [private]
GetConsolidatedHorizontalScrollSnapPointsDbg() | ScrollPresenter | [inline]
GetConsolidatedScrollSnapPointsDbg(ScrollPresenterDimension dimension) | ScrollPresenter |
GetConsolidatedVerticalScrollSnapPointsDbg() | ScrollPresenter | [inline]
GetConsolidatedZoomSnapPointsDbg() | ScrollPresenter |
GetContentLayoutOffsetXDbg() const | ScrollPresenter | [inline]
GetContentLayoutOffsetYDbg() const | ScrollPresenter | [inline]
GetDescendantBounds(const winrt::UIElement &content, const winrt::UIElement &descendant) | ScrollPresenter | [private, static]
GetDescendantBounds(const winrt::UIElement &content, const winrt::UIElement &descendant, const winrt::Rect &descendantRect) | ScrollPresenter | [private, static]
GetHorizontalSnapPointWrapperDbg(winrt::ScrollSnapPointBase const &scrollSnapPoint) | ScrollPresenter | [inline]
GetInertiaRestingValue(std::shared_ptr< SnapPointWrapper< T >> snapPointWrapper, winrt::Compositor const &compositor, winrt::hstring const &target, winrt::hstring const &scale) const | ScrollPresenter | [private]
GetInertiaRestingValue(std::shared_ptr< SnapPointWrapper< T >> snapPointWrapper, winrt::Compositor const &compositor, winrt::hstring const &target, winrt::hstring const &scale) const | ScrollPresenter |
GetInner() | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
GetInteractionTrackerOperationFromKinds(bool isOperationTypeForOffsetsChange, InteractionTrackerAsyncOperationTrigger operationTrigger, ScrollPresenterViewKind const &viewKind, winrt::ScrollingScrollOptions const &options) const | ScrollPresenter | [private]
GetInteractionTrackerOperationFromRequestId(int requestId) const | ScrollPresenter | [private]
GetInteractionTrackerOperationsCount(bool includeAnimatedOperations, bool includeNonAnimatedOperations) const | ScrollPresenter | [private]
GetInteractionTrackerOperationsTicksCountdown() const | ScrollPresenter | [private]
GetInteractionTrackerOperationWithAdditionalVelocity(bool isOperationTypeForOffsetsChange, InteractionTrackerAsyncOperationTrigger operationTrigger) const | ScrollPresenter | [private]
GetLastNonAnimatedInteractionTrackerOperation(std::shared_ptr< InteractionTrackerAsyncOperation > priorToInteractionTrackerOperation) const | ScrollPresenter | [private]
GetMaxPositionDbg() | ScrollPresenter |
GetMaxPositionExpression(const winrt::UIElement &content) const | ScrollPresenter | [private]
GetMaxPositionExpressionAnimationExpressionDbg() const | ScrollPresenter |
GetMaxPositionXExpression(const winrt::UIElement &content) const | ScrollPresenter | [private]
GetMaxPositionYExpression(const winrt::UIElement &content) const | ScrollPresenter | [private]
GetMinPositionDbg() | ScrollPresenter |
GetMinPositionExpression(const winrt::UIElement &content) const | ScrollPresenter | [private]
GetMinPositionExpressionAnimationExpressionDbg() const | ScrollPresenter |
GetMinPositionXExpression(const winrt::UIElement &content) const | ScrollPresenter | [private]
GetMinPositionYExpression(const winrt::UIElement &content) const | ScrollPresenter | [private]
GetNextViewChangeCorrelationId() | ScrollPresenter | [private]
GetPositionAnimation(double zoomedHorizontalOffset, double zoomedVerticalOffset, InteractionTrackerAsyncOperationTrigger operationTrigger, int32_t offsetsChangeCorrelationId) | ScrollPresenter | [private]
GetPositionDbg() | ScrollPresenter |
GetRelativeViewport(winrt::UIElement const &content) | ScrollPresenter |
GetScrollSnapPointWrapperDbg(ScrollPresenterDimension dimension, winrt::ScrollSnapPointBase const &scrollSnapPoint) | ScrollPresenter |
GetTransformExpressionAnimationExpressionDbg() const | ScrollPresenter |
GetVerticalSnapPointWrapperDbg(winrt::ScrollSnapPointBase const &scrollSnapPoint) | ScrollPresenter | [inline]
GetVisualTargetedPropertyName(ScrollPresenterDimension dimension) | ScrollPresenter | [private, static]
GetZoomedExtentHeight() const | ScrollPresenter |
GetZoomedExtentWidth() const | ScrollPresenter |
GetZoomFactorAnimation(float zoomFactor, const winrt::float2 &centerPoint, int32_t zoomFactorChangeCorrelationId) | ScrollPresenter | [private]
GetZoomSnapPointWrapperDbg(winrt::ZoomSnapPointBase const &zoomSnapPoint) | ScrollPresenter |
HasBringingIntoViewListener() const | ScrollPresenter | [inline, private]
HookCompositionTargetRendering() | ScrollPresenter | [private]
HookContentPropertyChanged(const winrt::UIElement &content) | ScrollPresenter | [private]
HookHorizontalScrollControllerEvents(const winrt::IScrollController &horizontalScrollController) | ScrollPresenter | [private]
HookHorizontalScrollControllerInteractionSourceEvents(const winrt::IScrollControllerPanningInfo &horizontalScrollControllerPanningInfo) | ScrollPresenter | [private]
HookHorizontalScrollControllerPanningInfoEvents(const winrt::IScrollControllerPanningInfo &horizontalScrollControllerPanningInfo, bool hasInteractionSource) | ScrollPresenter | [private]
HookScrollPresenterEvents() | ScrollPresenter | [private]
HookVerticalScrollControllerEvents(const winrt::IScrollController &verticalScrollController) | ScrollPresenter | [private]
HookVerticalScrollControllerInteractionSourceEvents(const winrt::IScrollControllerPanningInfo &verticalScrollControllerPanningInfo) | ScrollPresenter | [private]
HookVerticalScrollControllerPanningInfoEvents(const winrt::IScrollControllerPanningInfo &verticalScrollControllerPanningInfo, bool hasInteractionSource) | ScrollPresenter | [private]
HorizontalAnchorRatio(double value) | ScrollPresenterProperties |
HorizontalAnchorRatio() | ScrollPresenterProperties |
HorizontalAnchorRatioProperty() | ScrollPresenterProperties | [inline, static]
HorizontalOffset() const | ScrollPresenter |
HorizontalScroll enum value | ScrollPresenter |
HorizontalScrollChainMode(winrt::ScrollingChainMode const &value) | ScrollPresenterProperties |
HorizontalScrollChainMode() | ScrollPresenterProperties |
HorizontalScrollChainModeProperty() | ScrollPresenterProperties | [inline, static]
HorizontalScrollController() const | ScrollPresenter |
HorizontalScrollController(winrt::IScrollController const &value) | ScrollPresenter |
HorizontalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollPresenterProperties |
HorizontalScrollMode() | ScrollPresenterProperties |
HorizontalScrollModeProperty() | ScrollPresenterProperties | [inline, static]
HorizontalScrollRailMode(winrt::ScrollingRailMode const &value) | ScrollPresenterProperties |
HorizontalScrollRailMode() | ScrollPresenterProperties |
HorizontalScrollRailModeProperty() | ScrollPresenterProperties | [inline, static]
HorizontalSnapPoints() | ScrollPresenter |
HorizontalZoomFactor enum value | ScrollPresenter |
IdleStateEntered(const winrt::InteractionTrackerIdleStateEnteredArgs &args) | ScrollPresenter |
IgnoredInputKinds() const | ScrollPresenter |
IgnoredInputKinds(winrt::ScrollingInputKinds const &value) | ScrollPresenter |
ScrollPresenterProperties::IgnoredInputKinds() | ScrollPresenterProperties |
IgnoredInputKindsProperty() | ScrollPresenterProperties | [inline, static]
InertiaStateEntered(const winrt::InteractionTrackerInertiaStateEnteredArgs &args) | ScrollPresenter |
InteractingStateEntered(const winrt::InteractionTrackerInteractingStateEnteredArgs &args) | ScrollPresenter |
InteractionChainingModeFromChainingMode(const winrt::ScrollingChainMode &chainingMode) | ScrollPresenter | [private, static]
InteractionSourceModeFromScrollMode(const winrt::ScrollingScrollMode &scrollMode) | ScrollPresenter | [private, static]
InteractionSourceModeFromZoomMode(const winrt::ScrollingZoomMode &zoomMode) | ScrollPresenter | [private, static]
IsAnchoring(_Out_ bool *isAnchoringElementHorizontally, _Out_ bool *isAnchoringElementVertically, _Out_opt_ bool *isAnchoringFarEdgeHorizontally=nullptr, _Out_opt_ bool *isAnchoringFarEdgeVertically=nullptr) | ScrollPresenter | [private]
IsAnchorRatioValid(double value) | ScrollPresenter | [static]
IsElementValidAnchor(const winrt::UIElement &element) | ScrollPresenter |
IsElementValidAnchor(const winrt::UIElement &element, const winrt::UIElement &content) | ScrollPresenter | [private, static]
IsHorizontallyScrollable() | ScrollPresenter |
IsInertiaFromImpulse() const | ScrollPresenter | [private]
IsInputKindIgnored(winrt::ScrollingInputKinds const &inputKind) | ScrollPresenter | [private]
IsLoadedAndSetUp() const | ScrollPresenter | [private]
IsOnThread() | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
IsVerticallyScrollable() | ScrollPresenter |
IsZoomFactorBoundaryValid(double value) | ScrollPresenter | [static]
LineDown() | ScrollPresenter |
LineLeft() | ScrollPresenter |
LineRight() | ScrollPresenter |
LineUp() | ScrollPresenter |
m_anchorCandidates | ScrollPresenter | [private]
m_anchorRequestedEventSource | ScrollPresenterProperties |
m_bringingIntoViewEventSource | ScrollPresenterProperties |
m_extentChangedEventSource | ScrollPresenterProperties |
m_interactionTrackerAsyncOperations | ScrollPresenter | [private]
m_scrollAnimationStartingEventSource | ScrollPresenterProperties |
m_scrollCompletedEventSource | ScrollPresenterProperties |
m_scrollStartingEventSource | ScrollPresenterProperties |
m_stateChangedEventSource | ScrollPresenterProperties |
m_viewChangedEventSource | ScrollPresenterProperties |
m_zoomAnimationStartingEventSource | ScrollPresenterProperties |
m_zoomCompletedEventSource | ScrollPresenterProperties |
m_zoomStartingEventSource | ScrollPresenterProperties |
MaximizeInteractionTrackerOperationsTicksCountdown() | ScrollPresenter | [private]
MaxZoomFactor(double value) | ScrollPresenterProperties |
MaxZoomFactor() | ScrollPresenterProperties |
MaxZoomFactorProperty() | ScrollPresenterProperties | [inline, static]
MeasureOverride(winrt::Size const &availableSize) | ScrollPresenter |
MinZoomFactor(double value) | ScrollPresenterProperties |
MinZoomFactor() | ScrollPresenterProperties |
MinZoomFactorProperty() | ScrollPresenterProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
OnBackgroundPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnBringIntoViewRequestedHandler(const winrt::IInspectable &sender, const winrt::BringIntoViewRequestedEventArgs &args) | ScrollPresenter | [private]
OnCompositionTargetRendering(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollPresenter | [private]
OnComputedHorizontalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnComputedVerticalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnContentLayoutOffsetChanged(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
OnContentOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnContentPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | ScrollPresenter |
ScrollPresenterProperties::OnContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnContentSizeChanged(const winrt::UIElement &content) | ScrollPresenter | [private]
OnCreateAutomationPeer() | ScrollPresenter |
OnFlowDirectionChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | ScrollPresenter | [private]
OnHorizontalAnchorRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnHorizontalScrollChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnHorizontalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnHorizontalScrollRailModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnHorizontalSnapPointsVectorChanged(const winrt::IObservableVector< winrt::ScrollSnapPointBase > &sender, const winrt::IVectorChangedEventArgs event) | ScrollPresenter | [private]
OnIgnoredInputKindsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | ScrollPresenter | [private]
OnMaxZoomFactorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnMinZoomFactorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnPointerPressed(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollPresenter | [private]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ScrollPresenter |
OnScrollControllerAddScrollVelocityRequested(const winrt::IScrollController &sender, const winrt::ScrollControllerAddScrollVelocityRequestedEventArgs &args) | ScrollPresenter | [private]
OnScrollControllerPanningInfoChanged(const winrt::IScrollControllerPanningInfo &sender, const winrt::IInspectable &args) | ScrollPresenter | [private]
OnScrollControllerPanningInfoPanRequested(const winrt::IScrollControllerPanningInfo &sender, const winrt::ScrollControllerPanRequestedEventArgs &args) | ScrollPresenter | [private]
OnScrollControllerScrollByRequested(const winrt::IScrollController &sender, const winrt::ScrollControllerScrollByRequestedEventArgs &args) | ScrollPresenter | [private]
OnScrollControllerScrollToRequested(const winrt::IScrollController &sender, const winrt::ScrollControllerScrollToRequestedEventArgs &args) | ScrollPresenter | [private]
OnUnloaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | ScrollPresenter | [private]
OnVerticalAnchorRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnVerticalScrollChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnVerticalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnVerticalScrollRailModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnVerticalSnapPointsVectorChanged(const winrt::IObservableVector< winrt::ScrollSnapPointBase > &sender, const winrt::IVectorChangedEventArgs event) | ScrollPresenter | [private]
OnViewChanged(bool horizontalOffsetChanged, bool verticalOffsetChanged) | ScrollPresenter | [private]
OnZoomChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnZoomModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollPresenterProperties | [static]
OnZoomSnapPointsVectorChanged(const winrt::IObservableVector< winrt::ZoomSnapPointBase > &sender, const winrt::IVectorChangedEventArgs event) | ScrollPresenter | [private]
PageDown() | ScrollPresenter |
PageLeft() | ScrollPresenter |
PageRight() | ScrollPresenter |
PageUp() | ScrollPresenter |
Parent() | ScrollPresenter | [inline]
Parent(winrt::Controls::IScrollAnchorProvider const &value) | ScrollPresenter | [inline]
PostArrange(winrt::PostArrangeEventHandler const &value) | ScrollPresenter |
PostArrange(winrt::event_token const &token) | ScrollPresenter |
PostProcessOffsetsChange(std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation) | ScrollPresenter | [private]
PostProcessZoomFactorChange(std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation) | ScrollPresenter | [private]
ProcessAnchorCandidate(const winrt::UIElement &anchorCandidate, const winrt::UIElement &content, const winrt::Rect &viewportAnchorBounds, double viewportAnchorPointHorizontalOffset, double viewportAnchorPointVerticalOffset, _Inout_ double *bestAnchorCandidateDistance, _Inout_ winrt::UIElement *bestAnchorCandidate, _Inout_ winrt::Rect *bestAnchorCandidateBounds) const | ScrollPresenter | [private]
ProcessDequeuedViewChange(std::shared_ptr< InteractionTrackerAsyncOperation > interactionTrackerAsyncOperation) | ScrollPresenter | [private]
ProcessOffsetsChange(InteractionTrackerAsyncOperationTrigger operationTrigger, std::shared_ptr< OffsetsChange > offsetsChange, int32_t offsetsChangeCorrelationId, bool isForAsyncOperation) | ScrollPresenter | [private]
ProcessOffsetsChange(InteractionTrackerAsyncOperationTrigger operationTrigger, std::shared_ptr< OffsetsChangeWithAdditionalVelocity > offsetsChangeWithAdditionalVelocity) | ScrollPresenter | [private]
ProcessZoomFactorChange(std::shared_ptr< ZoomFactorChange > zoomFactorChange, int32_t zoomFactorChangeCorrelationId) | ScrollPresenter | [private]
ProcessZoomFactorChange(InteractionTrackerAsyncOperationTrigger operationTrigger, std::shared_ptr< ZoomFactorChangeWithAdditionalVelocity > zoomFactorChangeWithAdditionalVelocity) | ScrollPresenter | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
RaiseAnchorRequested() | ScrollPresenter | [private]
RaiseBringingIntoView(double targetZoomedHorizontalOffset, double targetZoomedVerticalOffset, const winrt::BringIntoViewRequestedEventArgs &requestEventArgs, int32_t offsetsChangeCorrelationId, _Inout_ winrt::ScrollingSnapPointsMode *snapPointsMode) | ScrollPresenter | [private]
RaiseConfigurationChanged() | ScrollPresenter | [private]
RaiseExpressionAnimationStatusChanged(bool isExpressionAnimationStarted, wstring_view const &propertyName) | ScrollPresenter | [private]
RaiseExtentChanged() | ScrollPresenter | [private]
RaiseInteractionSourcesChanged() | ScrollPresenter | [private]
RaisePostArrange() | ScrollPresenter | [private]
RaiseScrollAnimationStarting(const winrt::Vector3KeyFrameAnimation &positionAnimation, const winrt::float2 &startPosition, const winrt::float2 &endPosition, int32_t offsetsChangeCorrelationId) | ScrollPresenter | [private]
RaiseScrollStarting(int32_t offsetsChangeCorrelationId, double anticipatedHorizontalOffset, double anticipatedVerticalOffset, float anticipatedZoomFactor) | ScrollPresenter | [private]
RaiseStateChanged() | ScrollPresenter | [private]
RaiseViewChangeCompleted(bool isForScroll, ScrollPresenterViewChangeResult result, int32_t viewChangeCorrelationId) | ScrollPresenter | [private]
RaiseViewChanged() | ScrollPresenter | [private]
RaiseViewportChanged(const bool isFinal) | ScrollPresenter | [private]
RaiseZoomAnimationStarting(const winrt::ScalarKeyFrameAnimation &zoomFactorAnimation, const float endZoomFactor, const winrt::float2 &centerPoint, int32_t zoomFactorChangeCorrelationId) | ScrollPresenter | [private]
RaiseZoomStarting(int32_t zoomFactorChangeCorrelationId, double anticipatedHorizontalOffset, double anticipatedVerticalOffset, float anticipatedZoomFactor) | ScrollPresenter | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< ScrollPresenter, DeriveFromPanelHelper_base, winrt::ScrollPresenter, winrt::IScrollPresenter2, winrt::Controls::IScrollAnchorProvider, winrt::IRepeaterScrollingSurface > | [inline]
RegenerateSnapPointsSet(winrt::IObservableVector< T > const &userVector, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *internalSet) | ScrollPresenter | [private]
RegenerateSnapPointsSet(winrt::IObservableVector< T > const &userVector, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *internalSet) | ScrollPresenter |
RegisterAnchorCandidate(winrt::UIElement const &element) | ScrollPresenter |
RequestIgnored(const winrt::InteractionTrackerRequestIgnoredArgs &args) | ScrollPresenter |
ResetAnchorElement() | ScrollPresenter | [private]
ResetAnticipatedView() | ScrollPresenter | [private]
ResetOffsetsInertiaDecayRate() | ScrollPresenter | [private]
ResetZoomFactorInertiaDecayRate() | ScrollPresenter | [private]
s_BackgroundProperty | ScrollPresenterProperties | [static]
s_ComputedHorizontalScrollModeProperty | ScrollPresenterProperties | [static]
s_ComputedVerticalScrollModeProperty | ScrollPresenterProperties | [static]
s_ContentOrientationProperty | ScrollPresenterProperties | [static]
s_ContentProperty | ScrollPresenterProperties | [static]
s_HorizontalAnchorRatioProperty | ScrollPresenterProperties | [static]
s_HorizontalScrollChainModeProperty | ScrollPresenterProperties | [static]
s_HorizontalScrollModeProperty | ScrollPresenterProperties | [static]
s_HorizontalScrollRailModeProperty | ScrollPresenterProperties | [static]
s_IgnoredInputKindsProperty | ScrollPresenterProperties | [static]
s_MaxZoomFactorProperty | ScrollPresenterProperties | [static]
s_MinZoomFactorProperty | ScrollPresenterProperties | [static]
s_noOpCorrelationId | ScrollPresenter | [static]
s_translationAndZoomFactorAnimationsRestartTicks | ScrollPresenter | [static]
s_VerticalAnchorRatioProperty | ScrollPresenterProperties | [static]
s_VerticalScrollChainModeProperty | ScrollPresenterProperties | [static]
s_VerticalScrollModeProperty | ScrollPresenterProperties | [static]
s_VerticalScrollRailModeProperty | ScrollPresenterProperties | [static]
s_ZoomChainModeProperty | ScrollPresenterProperties | [static]
s_ZoomModeProperty | ScrollPresenterProperties | [static]
Scroll enum value | ScrollPresenter |
ScrollableHeight() const | ScrollPresenter |
ScrollableWidth() const | ScrollPresenter |
ScrollAnimationStarting(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollAnimationStartingEventArgs > const &value) | ScrollPresenterProperties |
ScrollAnimationStarting(winrt::event_token const &token) | ScrollPresenterProperties |
ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta) | ScrollPresenter |
ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta, winrt::ScrollingScrollOptions const &options) | ScrollPresenter |
ScrollCompleted(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs > const &value) | ScrollPresenterProperties |
ScrollCompleted(winrt::event_token const &token) | ScrollPresenterProperties |
ScrollPresenter() | ScrollPresenter |
ScrollPresenterDimension enum name | ScrollPresenter |
ScrollPresenterProperties() | ScrollPresenterProperties |
ScrollStarting(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs > const &value) | ScrollPresenterProperties |
ScrollStarting(winrt::event_token const &token) | ScrollPresenterProperties |
ScrollTo(double horizontalOffset, double verticalOffset) | ScrollPresenter |
ScrollTo(double horizontalOffset, double verticalOffset, winrt::ScrollingScrollOptions const &options) | ScrollPresenter |
ScrollToHorizontalOffset(double offset) | ScrollPresenter |
ScrollToOffsets(double horizontalOffset, double verticalOffset) | ScrollPresenter |
ScrollToVerticalOffset(double offset) | ScrollPresenter |
SetContentLayoutOffsetXDbg(float contentLayoutOffsetX) | ScrollPresenter |
SetContentLayoutOffsetYDbg(float contentLayoutOffsetY) | ScrollPresenter |
SetMaxPositionDbg(winrt::float2 maxPosition) | ScrollPresenter |
SetMaxPositionExpressionAnimationExpressionDbg(winrt::hstring const &maxPositionExpressionAnimationExpression) | ScrollPresenter |
SetMinPositionDbg(winrt::float2 minPosition) | ScrollPresenter |
SetMinPositionExpressionAnimationExpressionDbg(winrt::hstring const &minPositionExpressionAnimationExpression) | ScrollPresenter |
SetTransformExpressionAnimationExpressionDbg(winrt::hstring const &transformExpressionAnimationExpression) | ScrollPresenter |
SetupInteractionTrackerBoundaries() | ScrollPresenter | [private]
SetupInteractionTrackerZoomFactorBoundaries(double minZoomFactor, double maxZoomFactor) | ScrollPresenter | [private]
SetupPositionBoundariesExpressionAnimations(const winrt::UIElement &content) | ScrollPresenter | [private]
SetupScrollControllerVisualInterationSource(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
SetupScrollControllerVisualInterationSourcePositionModifiers(ScrollPresenterDimension dimension, const winrt::Orientation &orientation) | ScrollPresenter | [private]
SetupScrollPresenterVisualInteractionSource() | ScrollPresenter | [private]
SetupSnapPoints(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension) | ScrollPresenter | [private]
SetupSnapPoints(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension) | ScrollPresenter |
SetupTransformExpressionAnimations(const winrt::UIElement &content) | ScrollPresenter | [private]
SetupVisualInteractionSourceCenterPointModifier(const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, bool flowDirectionChanged) | ScrollPresenter | [private]
SetupVisualInteractionSourceChainingMode(const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, const winrt::ScrollingChainMode &chainingMode) | ScrollPresenter | [private]
SetupVisualInteractionSourceMode(const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, const winrt::ScrollingScrollMode &scrollMode) | ScrollPresenter | [private]
SetupVisualInteractionSourceMode(const winrt::VisualInteractionSource &visualInteractionSource, const winrt::ScrollingZoomMode &zoomMode) | ScrollPresenter | [private]
SetupVisualInteractionSourceRailingMode(const winrt::VisualInteractionSource &visualInteractionSource, ScrollPresenterDimension dimension, const winrt::ScrollingRailMode &railingMode) | ScrollPresenter | [private]
SetupVisualInteractionSourceRedirectionMode(const winrt::VisualInteractionSource &visualInteractionSource) | ScrollPresenter | [private]
SnapPointsVectorChangedHelper(winrt::IObservableVector< T > const &scrollSnapPoints, winrt::IVectorChangedEventArgs const &args, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension) | ScrollPresenter | [private]
SnapPointsVectorChangedHelper(winrt::IObservableVector< T > const &snapPoints, winrt::IVectorChangedEventArgs const &args, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension) | ScrollPresenter |
SnapPointsVectorItemInsertedHelper(std::shared_ptr< SnapPointWrapper< T >> insertedItem, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet) | ScrollPresenter | [private]
SnapPointsVectorItemInsertedHelper(std::shared_ptr< SnapPointWrapper< T >> insertedItem, std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet) | ScrollPresenter |
SnapPointsViewportChangedHelper(winrt::IObservableVector< T > const &snapPoints, double viewport) | ScrollPresenter | [private]
SnapPointsViewportChangedHelper(winrt::IObservableVector< T > const &snapPoints, double viewport) | ScrollPresenter |
StartExpressionAnimationSourcesAnimations() | ScrollPresenter | [private]
StartScrollControllerExpressionAnimationSourcesAnimations(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
StartTransformExpressionAnimations(const winrt::UIElement &content) | ScrollPresenter | [private]
StartTranslationAndZoomFactorExpressionAnimations(bool interruptCountdown=false) | ScrollPresenter | [private]
State() const | ScrollPresenter |
StateChanged(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value) | ScrollPresenterProperties |
StateChanged(winrt::event_token const &token) | ScrollPresenterProperties |
StopScrollControllerExpressionAnimationSourcesAnimations(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
StopTransformExpressionAnimations(const winrt::UIElement &content) | ScrollPresenter | [private]
StopTranslationAndZoomFactorExpressionAnimations() | ScrollPresenter | [private]
UnhookCompositionTargetRendering() | ScrollPresenter | [private]
UnhookContentPropertyChanged(const winrt::UIElement &content) | ScrollPresenter | [private]
UnhookHorizontalScrollControllerEvents() | ScrollPresenter | [private]
UnhookHorizontalScrollControllerPanningInfoEvents() | ScrollPresenter | [private]
UnhookScrollPresenterEvents() | ScrollPresenter | [private]
UnhookVerticalScrollControllerEvents() | ScrollPresenter | [private]
UnhookVerticalScrollControllerPanningInfoEvents() | ScrollPresenter | [private]
UnregisterAnchorCandidate(winrt::UIElement const &element) | ScrollPresenter |
UpdateAnticipatedOffset(ScrollPresenterDimension dimension, double zoomedOffset) | ScrollPresenter | [private]
UpdateAnticipatedZoomFactor(float zoomFactor) | ScrollPresenter | [private]
UpdateContent(const winrt::UIElement &oldContent, const winrt::UIElement &newContent) | ScrollPresenter | [private]
UpdateExpressionAnimationSources() | ScrollPresenter | [private]
UpdateManipulationRedirectionMode() | ScrollPresenter | [private]
UpdateOffset(ScrollPresenterDimension dimension, double zoomedOffset) | ScrollPresenter | [private]
UpdatePositionBoundaries(const winrt::UIElement &content) | ScrollPresenter | [private]
UpdateScrollAutomationPatternProperties() | ScrollPresenter | [private]
UpdateScrollControllerIsScrollable(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
UpdateScrollControllerValues(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
UpdateSnapPointsIgnoredValue(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension) | ScrollPresenter | [private]
UpdateSnapPointsIgnoredValue(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, double newIgnoredValue) | ScrollPresenter | [private]
UpdateSnapPointsIgnoredValue(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, ScrollPresenterDimension dimension) | ScrollPresenter |
UpdateSnapPointsIgnoredValue(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, double newIgnoredValue) | ScrollPresenter |
UpdateSnapPointsRanges(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, bool forImpulseOnly) | ScrollPresenter | [private]
UpdateSnapPointsRanges(std::set< std::shared_ptr< SnapPointWrapper< T >>, SnapPointWrapperComparator< T >> *snapPointsSet, bool forImpulseOnly) | ScrollPresenter |
UpdateState(const winrt::ScrollingInteractionState &state) | ScrollPresenter | [private]
UpdateTransformSource(const winrt::UIElement &oldContent, const winrt::UIElement &newContent) | ScrollPresenter | [private]
UpdateUnzoomedExtentAndViewport(bool renderSizeChanged, double unzoomedExtentWidth, double unzoomedExtentHeight, double viewportWidth, double viewportHeight) | ScrollPresenter | [private]
UpdateVisualInteractionSourceMode(ScrollPresenterDimension dimension) | ScrollPresenter | [private]
ValidateAnchorRatio(double value) | ScrollPresenter | [static]
ValidateZoomFactoryBoundary(double value) | ScrollPresenter | [static]
ValuesChanged(const winrt::InteractionTrackerValuesChangedArgs &args) | ScrollPresenter |
VerticalAnchorRatio(double value) | ScrollPresenterProperties |
VerticalAnchorRatio() | ScrollPresenterProperties |
VerticalAnchorRatioProperty() | ScrollPresenterProperties | [inline, static]
VerticalOffset() const | ScrollPresenter |
VerticalScroll enum value | ScrollPresenter |
VerticalScrollChainMode(winrt::ScrollingChainMode const &value) | ScrollPresenterProperties |
VerticalScrollChainMode() | ScrollPresenterProperties |
VerticalScrollChainModeProperty() | ScrollPresenterProperties | [inline, static]
VerticalScrollController() const | ScrollPresenter |
VerticalScrollController(winrt::IScrollController const &value) | ScrollPresenter |
VerticalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollPresenterProperties |
VerticalScrollMode() | ScrollPresenterProperties |
VerticalScrollModeProperty() | ScrollPresenterProperties | [inline, static]
VerticalScrollRailMode(winrt::ScrollingRailMode const &value) | ScrollPresenterProperties |
VerticalScrollRailMode() | ScrollPresenterProperties |
VerticalScrollRailModeProperty() | ScrollPresenterProperties | [inline, static]
VerticalSnapPoints() | ScrollPresenter |
VerticalZoomFactor enum value | ScrollPresenter |
ViewChanged(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value) | ScrollPresenterProperties |
ViewChanged(winrt::event_token const &token) | ScrollPresenterProperties |
ViewportChanged(winrt::ViewportChangedEventHandler const &value) | ScrollPresenter |
ViewportChanged(winrt::event_token const &token) | ScrollPresenter |
ViewportHeight() const | ScrollPresenter |
ViewportWidth() const | ScrollPresenter |
ZoomAnimationStarting(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs > const &value) | ScrollPresenterProperties |
ZoomAnimationStarting(winrt::event_token const &token) | ScrollPresenterProperties |
ZoomBy(float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint) | ScrollPresenter |
ZoomBy(float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options) | ScrollPresenter |
ZoomChainMode(winrt::ScrollingChainMode const &value) | ScrollPresenterProperties |
ZoomChainMode() | ScrollPresenterProperties |
ZoomChainModeProperty() | ScrollPresenterProperties | [inline, static]
ZoomCompleted(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs > const &value) | ScrollPresenterProperties |
ZoomCompleted(winrt::event_token const &token) | ScrollPresenterProperties |
ZoomFactor enum value | ScrollPresenter |
ZoomFactor() const | ScrollPresenter |
ZoomMode(winrt::ScrollingZoomMode const &value) | ScrollPresenterProperties |
ZoomMode() | ScrollPresenterProperties |
ZoomModeProperty() | ScrollPresenterProperties | [inline, static]
ZoomSnapPoints() | ScrollPresenter |
ZoomStarting(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs > const &value) | ScrollPresenterProperties |
ZoomStarting(winrt::event_token const &token) | ScrollPresenterProperties |
ZoomTo(float zoomFactor, winrt::IReference< winrt::float2 > centerPoint) | ScrollPresenter |
ZoomTo(float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options) | ScrollPresenter |
~ScrollPresenter() | ScrollPresenter |
Generated on Sun Dec 1 2024 20:53:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPictureAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

PersonPictureAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PersonPictureAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(PersonPictureAutomationPeer)
00012 }
00013
00014 #include "PersonPictureAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewerAdapterTests Member List

This is the complete list of members for ScrollViewerAdapterTests, including all inherited members.
AdaptOnNullThrows() | ScrollViewerAdapterTests | [inline]
AdaptOnSV() | ScrollViewerAdapterTests | [inline]
AdaptOnSVWithNonUIElementContentThrows() | ScrollViewerAdapterTests | [inline]
AdaptOnSVWithoutContentThrows() | ScrollViewerAdapterTests | [inline]
AdaptOnSVWithoutWaitingForLoaded() | ScrollViewerAdapterTests | [inline]
CanInstantiate() | ScrollViewerAdapterTests | [inline]
CheckLeaks(Dictionary< string, WeakReference > objects) | ScrollViewerAdapterTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerRevokers.h Source File

  • File List
  • File Members
  • ItemContainer

ItemContainerRevokers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class ItemContainerRevokers : public winrt::implements<ItemContainerRevokers, winrt::IInspectable>
00007 {
00008 public:
00009     void RevokeAll(const winrt::ItemContainer& itemContainer)
00010     {
00011         if (m_isSelectedPropertyChangedRevoker)
00012         {
00013             m_isSelectedPropertyChangedRevoker.revoke();
00014         }
00015
00016         if (m_gettingFocusRevoker)
00017         {
00018             m_gettingFocusRevoker.revoke();
00019         }
00020
00021         if (m_losingFocusRevoker)
00022         {
00023             m_losingFocusRevoker.revoke();
00024         }
00025
00026         if (m_keyDownRevoker)
00027         {
00028             m_keyDownRevoker.revoke();
00029         }
00030
00031         if (m_itemInvokedRevoker)
00032         {
00033             m_itemInvokedRevoker.revoke();
00034         }
00035
00036 #ifdef DBG_VERBOSE
00037         if (m_sizeChangedRevokerDbg)
00038         {
00039             m_sizeChangedRevokerDbg.revoke();
00040         }
00041 #endif
00042     }
00043
00044     winrt::ItemContainer::ItemInvoked_revoker m_itemInvokedRevoker{};
00045
00046     winrt::UIElement::KeyDown_revoker m_keyDownRevoker{};
00047     winrt::UIElement::GettingFocus_revoker m_gettingFocusRevoker{};
00048     winrt::UIElement::LosingFocus_revoker m_losingFocusRevoker{};
00049
00050     PropertyChanged_revoker m_isSelectedPropertyChangedRevoker{};
00051
00052 #ifdef DBG_VERBOSE
00053     winrt::FrameworkElement::SizeChanged_revoker m_sizeChangedRevokerDbg;
00054 #endif
00055 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewTestHooks Member List

This is the complete list of members for ScrollViewTestHooks, including all inherited members.
EnsureGlobalTestHooks() | ScrollViewTestHooks | [static]
GetAutoHideScrollControllers(const winrt::ScrollView &scrollView) | ScrollViewTestHooks | [static]
GetGlobalTestHooks() | ScrollViewTestHooks | [inline, static]
m_autoHideScrollControllersMap | ScrollViewTestHooks | [private]
s_testHooks | ScrollViewTestHooks | [private, static]
SetAutoHideScrollControllers(const winrt::ScrollView &scrollView, winrt::IReference< bool > value) | ScrollViewTestHooks | [static]
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTests/ScrollPresenterTestsWithAutomationPeer.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • InteractionTests

ScrollPresenterTestsWithAutomationPeer.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00006 using System;
00007 using Common;
00008
00009 using WEX.TestExecution;
00010 using WEX.TestExecution.Markup;
00011 using WEX.Logging.Interop;
00012
00013 using Microsoft.Windows.Apps.Test.Automation;
00014 using Microsoft.Windows.Apps.Test.Foundation;
00015 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00016 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00017 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00018
00019 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00020 {
00021     [TestClass]
00022     public class ScrollPresenterTestsWithAutomationPeer : ScrollPresenterTestsBase
00023     {
00024         [ClassInitialize]
00025         [TestProperty("RunAs", "User")]
00026         [TestProperty("Classification", "Integration")]
00027         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00028         public static void ClassInitialize(TestContext testContext)
00029         {
00030             TestEnvironment.Initialize(testContext);
00031         }
00032
00033         [TestCleanup]
00034         public void TestCleanup()
00035         {
00036             TestCleanupHelper.Cleanup();
00037         }
00038
00039         [TestMethod]
00040         [TestProperty("Description", "Vertically scrolls a Rectangle in a ScrollPresenter, using its automation peer.")]
00041         public void ScrollVertically()
00042         {
00043             Log.Comment("Selecting ScrollPresenter tests");
00044
00045             using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
00046             {
00047                 Log.Comment("Navigating to ScrollPresentersWithSimpleContentsPage");
00048                 UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
00049                 Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");
00050
00051                 Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
00052                 navigateToSimpleContentsButton.Invoke();
00053                 Wait.ForIdle();
00054
00055                 Log.Comment("Retrieving ScrollPresenter");
00056                 ScrollPresenter scrollPresenter11UIObject = new ScrollPresenter(FindElement.ByName("ScrollPresenter11"));
00057                 Verify.IsNotNull(scrollPresenter11UIObject, "Verifying that ScrollPresenter was found");
00058
00059                 Verify.IsTrue(scrollPresenter11UIObject.VerticallyScrollable, "Verifying VerticallyScrollable is true");
00060                 Verify.IsTrue(scrollPresenter11UIObject.VerticalViewSize > 0.0, "Verifying VerticalViewSize is positive");
00061                 Verify.AreEqual(scrollPresenter11UIObject.VerticalScrollPercent, 0.0, "Verifying VerticalScrollPercent is zero");
00062
00063                 Log.Comment("Scrolling ScrollPresenter vertically");
00064                 scrollPresenter11UIObject.ScrollVertical(ScrollAmount.LargeIncrement);
00065
00066                 Log.Comment("Waiting for VerticalScrollPercent={0} to change", scrollPresenter11UIObject.VerticalScrollPercent);
00067                 Wait.ForScrollChanged(scrollPresenter11UIObject, ScrollProperty.VerticalScrollPercent);
00068
00069                 Log.Comment("Final VerticalScrollPercent={0}", scrollPresenter11UIObject.VerticalScrollPercent);
00070
00071                 Verify.IsTrue(scrollPresenter11UIObject.VerticallyScrollable, "Verifying VerticallyScrollable is true");
00072                 Verify.IsTrue(scrollPresenter11UIObject.VerticalViewSize > 0.0, "Verifying VerticalViewSize is positive");
00073                 Verify.IsTrue(scrollPresenter11UIObject.VerticalScrollPercent > 0.0, "Verifying VerticalScrollPercent is positive");
00074
00075                 Log.Comment("Returning to the main ScrollPresenter test page");
00076                 TestSetupHelper.GoBack();
00077             }
00078         }
00079
00080         [TestMethod]
00081         [TestProperty("Description", "Horizontally scrolls an Image in a ScrollPresenter, using its automation peer.")]
00082         public void ScrollHorizontally()
00083         {
00084             Log.Comment("Selecting ScrollPresenter tests");
00085
00086             using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
00087             {
00088                 Log.Comment("Navigating to ScrollPresentersWithSimpleContentsPage");
00089                 UIObject navigateToSimpleContentsUIObject = FindElement.ByName("navigateToSimpleContents");
00090                 Verify.IsNotNull(navigateToSimpleContentsUIObject, "Verifying that navigateToSimpleContents Button was found");
00091
00092                 Button navigateToSimpleContentsButton = new Button(navigateToSimpleContentsUIObject);
00093                 navigateToSimpleContentsButton.Invoke();
00094                 Wait.ForIdle();
00095
00096                 Log.Comment("Retrieving ScrollPresenter");
00097                 ScrollPresenter scrollPresenter31UIObject = new ScrollPresenter(FindElement.ByName("ScrollPresenter31"));
00098                 Verify.IsNotNull(scrollPresenter31UIObject, "Verifying that ScrollPresenter was found");
00099
00100                 Verify.IsTrue(scrollPresenter31UIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
00101                 Verify.IsTrue(scrollPresenter31UIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
00102                 Verify.AreEqual(scrollPresenter31UIObject.HorizontalScrollPercent, 0.0, "Verifying HorizontalScrollPercent is zero");
00103
00104                 Log.Comment("Scrolling ScrollPresenter horizontally");
00105                 scrollPresenter31UIObject.ScrollHorizontal(ScrollAmount.LargeIncrement);
00106
00107                 Log.Comment("Waiting for HorizontalScrollPercent={0} to change", scrollPresenter31UIObject.HorizontalScrollPercent);
00108                 Wait.ForScrollChanged(scrollPresenter31UIObject, ScrollProperty.HorizontalScrollPercent);
00109
00110                 Log.Comment("Final HorizontalScrollPercent={0}", scrollPresenter31UIObject.HorizontalScrollPercent);
00111
00112                 Verify.IsTrue(scrollPresenter31UIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
00113                 Verify.IsTrue(scrollPresenter31UIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
00114                 Verify.IsTrue(scrollPresenter31UIObject.HorizontalScrollPercent > 0.0, "Verifying HorizontalScrollPercent is positive");
00115
00116                 Log.Comment("Returning to the main ScrollPresenter test page");
00117                 TestSetupHelper.GoBack();
00118             }
00119         }
00120
00121         [TestMethod]
00122         [TestProperty("Description", "Scrolls an Image, using the ScrollPresenter automation peer, while its ExpressionAnimationSources property is being consumed.")]
00123         public void ScrollWhileUsingExpressionAnimationSources()
00124         {
00125             Log.Comment("Selecting ScrollPresenter tests");
00126
00127             using (var setup = new TestSetupHelper("ScrollPresenter Tests"))
00128             {
00129                 SetOutputDebugStringLevel("Verbose");
00130
00131                 Log.Comment("Navigating to ScrollPresenterExpressionAnimationSourcesPage");
00132                 UIObject navigateToExpressionAnimationSourcesUIObject = FindElement.ByName("navigateToExpressionAnimationSources");
00133                 Verify.IsNotNull(navigateToExpressionAnimationSourcesUIObject, "Verifying that navigateToExpressionAnimationSources Button was found");
00134
00135                 Button navigateToExpressionAnimationSourcesButton = new Button(navigateToExpressionAnimationSourcesUIObject);
00136                 navigateToExpressionAnimationSourcesButton.Invoke();
00137                 Wait.ForIdle();
00138
00139                 SetLoggingLevel(isPrivateLoggingEnabled: true);
00140
00141                 Log.Comment("Retrieving ScrollPresenter");
00142                 ScrollPresenter scrollPresenterUIObject = new ScrollPresenter(FindElement.ByName("scrollPresenter"));
00143                 Verify.IsNotNull(scrollPresenterUIObject, "Verifying that ScrollPresenter was found");
00144
00145                 Verify.IsTrue(scrollPresenterUIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
00146                 Verify.IsTrue(scrollPresenterUIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
00147                 Verify.AreEqual(scrollPresenterUIObject.HorizontalScrollPercent, 0.0, "Verifying HorizontalScrollPercent is zero");
00148
00149                 Log.Comment("Waiting for final layout");
00150                 WaitForEditValue(editName: "txtLayoutCompleted", editValue: "Yes");
00151
00152                 Edit textBox = new Edit(FindElement.ById("txtViewport"));
00153                 Log.Comment("Viewport: " + textBox.Value);
00154                 textBox = new Edit(FindElement.ById("txtExtent"));
00155                 Log.Comment("Extent: " + textBox.Value);
00156                 textBox = new Edit(FindElement.ById("txtBarVisualWidth"));
00157
00158                 Log.Comment("Scrolling ScrollPresenter horizontally and vertically");
00159                 scrollPresenterUIObject.SetScrollPercent(10.0, 20.0);
00160
00161                 Log.Comment("Waiting for HorizontalScrollPercent={0} to change", scrollPresenterUIObject.HorizontalScrollPercent);
00162                 Wait.ForScrollChanged(scrollPresenterUIObject, ScrollProperty.HorizontalScrollPercent);
00163
00164                 Log.Comment("Final HorizontalScrollPercent={0}", scrollPresenterUIObject.HorizontalScrollPercent);
00165                 Log.Comment("Final VerticalScrollPercent={0}", scrollPresenterUIObject.VerticalScrollPercent);
00166
00167                 if (Math.Abs(scrollPresenterUIObject.HorizontalScrollPercent - 10.0) >= 0.0001 ||
00168                     Math.Abs(scrollPresenterUIObject.VerticalScrollPercent - 20.0) >= 0.0001)
00169                 {
00170                     LogAndClearTraces();
00171                 }
00172
00173                 SetLoggingLevel(isPrivateLoggingEnabled: false);
00174
00175                 Verify.IsTrue(scrollPresenterUIObject.HorizontallyScrollable, "Verifying HorizontallyScrollable is true");
00176                 Verify.IsTrue(scrollPresenterUIObject.HorizontalViewSize > 0.0, "Verifying HorizontalViewSize is positive");
00177                 Verify.IsLessThan(Math.Abs(scrollPresenterUIObject.HorizontalScrollPercent - 10.0), 0.0001, "Verifying HorizontalScrollPercent is close to 10.0");
00178
00179                 Verify.IsTrue(scrollPresenterUIObject.VerticallyScrollable, "Verifying VerticallyScrollable is true");
00180                 Verify.IsTrue(scrollPresenterUIObject.VerticalViewSize > 0.0, "Verifying VerticalViewSize is positive");
00181                 Verify.IsLessThan(Math.Abs(scrollPresenterUIObject.VerticalScrollPercent - 20.0), 0.0001, "Verifying VerticalScrollPercent is close to 20.0");
00182
00183                 Log.Comment("Returning to the main ScrollPresenter test page");
00184                 TestSetupHelper.GoBack();
00185                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollPresenter test page.
00186             }
00187         }
00188     }
00189 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewMenuItemStretchPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewMenuItemStretchPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     public sealed partial class NavigationViewMenuItemStretchPage : TestPage
00007     {
00008         public NavigationViewMenuItemStretchPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommonStylesPage Member List

This is the complete list of members for CommonStylesPage, including all inherited members.
AppBarButtonDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
AppBarToggleButtonDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) | CommonStylesPage | [inline, private]
AutoSuggestBoxDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
BlueBackground_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
ChkGridViewIsEnabled_Checked(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
ChkGridViewIsEnabled_Unchecked(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
ChkListViewIsEnabled_Checked(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
ChkListViewIsEnabled_Unchecked(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
CmbGridViewSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | CommonStylesPage | [inline, private]
CmbListViewSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | CommonStylesPage | [inline, private]
ComboBoxDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
CommonStylesPage() | CommonStylesPage | [inline]
DatePickerDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
fonts | CommonStylesPage | [private]
HeaderContentPresenterMarginTest(DependencyObject control) | CommonStylesPage | [inline, private]
ListViewItemDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
miscellaneousGridViewSource | CommonStylesPage | [private]
NavigateToNewPageButton_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
PasswordBoxDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
RichEditBoxDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
SliderDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
StandardBackground_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
TextBoxDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
TimePickerDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
ToggleSwitchDensityTest_Click(object sender, RoutedEventArgs e) | CommonStylesPage | [inline, private]
VerifyHeight(FrameworkElement[] frameworkElements, SimpleVerify simpleVerify, int height) | CommonStylesPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerExamples Member List

This is the complete list of members for PipsPagerExamples, including all inherited members.
ButtonListPager_SelectedIndexChanged(PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args) | PipsPagerExamples | [inline, private]
ButtonListPreviousOffset | PipsPagerExamples | [private]
ButtonListScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) | PipsPagerExamples | [inline, private]
CreateButtonListItems() | PipsPagerExamples | [inline, private]
CreatePersonInfoList() | PipsPagerExamples | [inline, private]
FindInnerScrollViewer(ListView lv) | PipsPagerExamples | [inline, private]
MinRowSpacing | PipsPagerExamples | [private]
OnLoaded(object sender, RoutedEventArgs e) | PipsPagerExamples | [inline, private]
OnViewChanged(ScrollViewer sv, PipsPager pager, ref double previousVerticalOffset, double rowSpacing=0.0) | PipsPagerExamples | [inline, private]
PersonInfoList_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) | PipsPagerExamples | [inline, private]
PersonInfoListPager_SelectedIndexChanged(PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args) | PipsPagerExamples | [inline, private]
PersonInfoListPreviousOffset | PipsPagerExamples | [private]
PersonInfoListScrollViewer | PipsPagerExamples | [private]
Pictures | PipsPagerExamples |
PipsPagerExamples() | PipsPagerExamples | [inline]
SetButtonListRepeaterSize() | PipsPagerExamples | [inline, private]
TotalNumberOfDisplayedObjects | PipsPagerExamples | [private]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RepeaterTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

RepeaterTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RepeaterTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RepeaterTestHooks)
00012 }
00013
00014 #include "RepeaterTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SepiaEffect Member List

This is the complete list of members for SepiaEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1Sepia) | SepiaEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"Intensity", D2D1_SEPIA_PROP_INTENSITY, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaMode", D2D1_SEPIA_PROP_ALPHA_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE}) | SepiaEffect |
DECLARE_POD_PROPERTY(Intensity, float, 0.5f, value >=0.0f &&value<=1.0f) | SepiaEffect |
DECLARE_POD_PROPERTY(AlphaMode, winrt::CanvasAlphaMode, winrt::CanvasAlphaMode::Premultiplied, value!=winrt::CanvasAlphaMode::Ignore) | SepiaEffect |
DECLARE_SINGLE_SOURCE(Source) | SepiaEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | SepiaEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | SepiaEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBarAutomationPeer.idl Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBarAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass BreadcrumbBarItemAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer,
00007 Microsoft.UI.Xaml.Automation.Provider.IInvokeProvider
00008 {
00009     BreadcrumbBarItemAutomationPeer(MU_XC_NAMESPACE.BreadcrumbBarItem owner);
00010 }
00011
00012 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IAnimatedVisualSource Member List

This is the complete list of members for IAnimatedVisualSource, including all inherited members.
AnimatedVisualInvalidated | IAnimatedVisualSource
SetColorProperty(String propertyName, Windows.UI.Color value) | IAnimatedVisualSource
TryCreateAnimatedVisual(Microsoft.UI.Composition.Compositor compositor, out Object diagnostics) | IAnimatedVisualSource
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/AnimationSamples/ScaleAnimatedVerticalListDemo.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • AnimationSamples

ScaleAnimatedVerticalListDemo.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Linq;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Hosting;
00008
00009 namespace MUXControlsTestApp.Samples
00010 {
00011     public sealed partial class ScaleAnimatedVerticalListDemo : Page
00012     {
00013         public ScaleAnimatedVerticalListDemo()
00014         {
00015             this.InitializeComponent();
00016             repeater.ItemsSource = Enumerable.Range(0, 100);
00017             repeater.ElementPrepared += OnElementPrepared;
00018         }
00019
00020         private void OnElementPrepared(Microsoft.UI.Xaml.Controls.ItemsRepeater sender, Microsoft.UI.Xaml.Controls.ItemsRepeaterElementPreparedEventArgs args)
00021         {
00022             var item = ElementCompositionPreview.GetElementVisual(args.Element);
00023             var svVisual = ElementCompositionPreview.GetElementVisual(sv);
00024             var scrollProperties = ElementCompositionPreview.GetScrollViewerManipulationPropertySet(sv);
00025
00026             var scaleExpresion = scrollProperties.Compositor.CreateExpressionAnimation();
00027             scaleExpresion.SetReferenceParameter("svVisual", svVisual);
00028             scaleExpresion.SetReferenceParameter("scrollProperties", scrollProperties);
00029             scaleExpresion.SetReferenceParameter("item", item);
00030
00031             // scale the item based on the distance of the item relative to the center of the viewport.
00032             scaleExpresion.Expression = "1 - abs((svVisual.Size.Y/2 - scrollProperties.Translation.Y) - (item.Offset.Y + item.Size.Y/2))*(.25/(svVisual.Size.Y/2))";
00033             item.StartAnimation("Scale.X", scaleExpresion);
00034             item.StartAnimation("Scale.Y", scaleExpresion);
00035
00036             var centerPointExpression = scrollProperties.Compositor.CreateExpressionAnimation();
00037             centerPointExpression.SetReferenceParameter("item", item);
00038             centerPointExpression.Expression = "Vector3(item.Size.X/2, item.Size.Y/2, 0)";
00039             item.StartAnimation("CenterPoint", centerPointExpression);
00040         }
00041
00042         private void OnItemGotFocus(object sender, RoutedEventArgs e)
00043         {
00044             ScrollToCenterOfViewport(sender);
00045         }
00046
00047         private void OnItemClicked(object sender, RoutedEventArgs e)
00048         {
00049             ScrollToCenterOfViewport(sender);
00050         }
00051
00052         private static void ScrollToCenterOfViewport(object sender)
00053         {
00054             var item = sender as FrameworkElement;
00055             item.StartBringIntoView(new BringIntoViewOptions() {
00056                 VerticalAlignmentRatio = 0.5,
00057                 AnimationDesired = true,
00058             });
00059         }
00060     }
00061 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NumberBoxAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

NumberBoxAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NumberBoxAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(NumberBoxAutomationPeer)
00012 }
00013
00014 #include "NumberBoxAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GroupedListViewBaseViewModel Member List

This is the complete list of members for GroupedListViewBaseViewModel, including all inherited members.
GroupedListViewBaseViewModel() | GroupedListViewBaseViewModel | [inline]
Items | GroupedListViewBaseViewModel |
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/TopMode/NavigationViewTopNavPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • TopMode

NavigationViewTopNavPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Controls.Primitives;
00007 using Microsoft.UI.Xaml.Media;
00008 using Microsoft.UI.Xaml.Navigation;
00009 using Microsoft.UI.Xaml.Automation;
00010 using Microsoft.UI.Private.Media;
00011 using System;
00012 using Windows.ApplicationModel.Core;
00013 using Windows.UI.Core;
00014 using MUXControlsTestApp.Utilities;
00015
00016 namespace MUXControlsTestApp
00017 {
00018     public sealed partial class NavigationViewTopNavPage : TestPage
00019     {
00020         private int m_newItemIndex = 0;
00021         private int m_newFooterItemIndex = 0;
00022         private int m_closingEventsFired = 0;
00023         private int m_closedEventsFired = 0;
00024         private bool m_initializeComponentComplete = false;
00025         public NavigationViewTopNavPage()
00026         {
00027             this.InitializeComponent();
00028             m_initializeComponentComplete = true;
00029
00030             this.Loaded += NavigationViewTopNavPage_Loaded;
00031
00032             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00033             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00034
00035             IntegerItem.Content = 7; // Testing that boxed ints don't cause crashes in tooltips
00036         }
00037
00038         protected override void OnNavigatedFrom(NavigationEventArgs e)
00039         {
00040             // Unset all override flags to avoid impacting subsequent tests
00041             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00042             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00043
00044             base.OnNavigatedFrom(e);
00045         }
00046
00047         private void NavigationViewTopNavPage_Loaded(object sender, RoutedEventArgs e)
00048         {
00049             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00050             if (rootGrid != null)
00051             {
00052                 Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
00053                 if (paneContentGrid != null)
00054                 {
00055                     Button toggleButton = paneContentGrid.FindName("TogglePaneButton") as Button;
00056                     if (toggleButton != null)
00057                     {
00058                         toggleButton.RegisterPropertyChangedCallback(Button.BackgroundProperty, new DependencyPropertyChangedCallback(ToggleBackgroundChanged));
00059                         UpdateToggleBackgroundColor(toggleButton);
00060                     }
00061                 }
00062             }
00063
00064             SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
00065             PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
00066             HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;
00067
00068             NavView.SelectedItem = HomeItem;
00069
00070             FindAndGiveAutomationNameToVisualChild("NavigationViewBackButton");
00071             FindAndGiveAutomationNameToVisualChild("SettingsTopNavPaneItem");
00072         }
00073
00074         private void ToggleBackgroundChanged(DependencyObject o, DependencyProperty p)
00075         {
00076             UpdateToggleBackgroundColor(o as Button);
00077         }
00078
00079         private void UpdateToggleBackgroundColor(Button toggleButton)
00080         {
00081             if (toggleButton.Background != null && toggleButton.Background is SolidColorBrush)
00082             {
00083                 ToggleButtonBackgroundColor.Text = (toggleButton.Background as SolidColorBrush).Color.ToString();
00084             }
00085             else
00086             {
00087                 ToggleButtonBackgroundColor.Text = String.Empty;
00088             }
00089         }
00090
00091         private void OpenPaneButton_Click(object sender, RoutedEventArgs e)
00092         {
00093             NavView.IsPaneOpen = true;
00094         }
00095
00096         private void ChangeContent_Click(object sender, RoutedEventArgs e)
00097         {
00098             NavView.Content = new TextBox();
00099         }
00100
00101         private void CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00102         {
00103             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00104             NavView.CompactModeThresholdWidth = tag;
00105         }
00106
00107         private void ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00108         {
00109             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00110             NavView.ExpandedModeThresholdWidth = tag;
00111         }
00112
00113         private void TestPage_Loaded(object sender, RoutedEventArgs e)
00114         {
00115         }
00116
00117         private void SelectedItemCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00118         {
00119             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00120             if (tag == "Home")
00121             {
00122                 NavView.SelectedItem = HomeItem;
00123             }
00124             else if (tag == "Apps")
00125             {
00126                 AppsItem.IsSelected = true;
00127             }
00128             else if (tag == "Games")
00129             {
00130                 NavView.SelectedItem = GamesItem;
00131             }
00132             else if (tag == "Music")
00133             {
00134                 NavView.SelectedItem = MusicItem;
00135             }
00136             else if (tag == "Movies")
00137             {
00138                 NavView.SelectedItem = MoviesItem;
00139             }
00140             else if (tag == "TV")
00141             {
00142                 NavView.SelectedItem = TVItem;
00143             }
00144             else if (tag == "Settings")
00145             {
00146                 NavView.SelectedItem = NavView.SettingsItem;
00147             }
00148         }
00149
00150         private void SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00151         {
00152             NavView.IsSettingsVisible = true;
00153         }
00154
00155         private void SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00156         {
00157             NavView.IsSettingsVisible = false;
00158         }
00159
00160         private void PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00161         {
00162             NavView.IsPaneToggleButtonVisible = true;
00163         }
00164
00165         private void PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00166         {
00167             NavView.IsPaneToggleButtonVisible = false;
00168         }
00169
00170         private void ToggleButtonStyleCheckbox_Checked(object sender, RoutedEventArgs e)
00171         {
00172             NavView.PaneToggleButtonStyle = this.Resources["AlternateToggleButtonStyle"] as Style;
00173         }
00174
00175         private void ToggleButtonStyleCheckbox_Unchecked(object sender, RoutedEventArgs e)
00176         {
00177             NavView.PaneToggleButtonStyle = Application.Current.Resources["PaneToggleButtonStyle"] as Style;
00178         }
00179
00180         private void CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00181         {
00182             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00183             NavView.CompactPaneLength = tag;
00184         }
00185
00186         private void OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00187         {
00188             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00189             NavView.OpenPaneLength = tag;
00190         }
00191
00192         private void NavView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
00193         {
00194             if (m_initializeComponentComplete)
00195             {
00196                 switch (args.DisplayMode)
00197                 {
00198                     case NavigationViewDisplayMode.Minimal:
00199                         DisplayModeTextBox.Text = "Minimal";
00200                         DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DodgerBlue);
00201                         break;
00202                     case NavigationViewDisplayMode.Compact:
00203                         DisplayModeTextBox.Text = "Compact";
00204                         DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkMagenta);
00205                         break;
00206                     case NavigationViewDisplayMode.Expanded:
00207                         DisplayModeTextBox.Text = "Expanded";
00208                         DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkRed);
00209                         break;
00210                 }
00211             }
00212         }
00213
00214         private void HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00215         {
00216             NavView.AlwaysShowHeader = true;
00217         }
00218
00219         private void HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00220         {
00221             NavView.AlwaysShowHeader = false;
00222         }
00223
00224         private void FindAndGiveAutomationNameToVisualChild(string childName)
00225         {
00226             DependencyObject obj = FindVisualChildByName(this.NavView, childName);
00227
00228             if (obj != null)
00229             {
00230                 AutomationProperties.SetName(obj, childName);
00231             }
00232         }
00233
00234         private void WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00235         {
00236             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00237             NavView.Width = tag;
00238         }
00239
00240         private void AddItemButton_Click(object sender, RoutedEventArgs e)
00241         {
00242             var menuItem = new NavigationViewItem();
00243             menuItem.Content = "New Menu Item " + m_newItemIndex.ToString();
00244             menuItem.Icon = new SymbolIcon(Symbol.AllApps);
00245             NavView.MenuItems.Add(menuItem);
00246             m_newItemIndex++;
00247         }
00248
00249         private void RemoveItemButton_Click(object sender, RoutedEventArgs e)
00250         {
00251             if (NavView.MenuItems.Count > 0)
00252             {
00253                 NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
00254             }
00255         }
00256
00257         private void AddFooterItemButton_Click(object sender, RoutedEventArgs e)
00258         {
00259             var menuItem = new NavigationViewItem();
00260             menuItem.Content = "New Footer Menu Item " + m_newFooterItemIndex.ToString();
00261             menuItem.Icon = new SymbolIcon(Symbol.AllApps);
00262             NavView.FooterMenuItems.Add(menuItem);
00263             m_newFooterItemIndex++;
00264         }
00265
00266         private void RemoveFooterItemButton_Click(object sender, RoutedEventArgs e)
00267         {
00268             if (NavView.FooterMenuItems.Count > 0)
00269             {
00270                 NavView.FooterMenuItems.RemoveAt(NavView.FooterMenuItems.Count - 1);
00271             }
00272         }
00273
00274         private void ClearMenuButton_Click(object sender, RoutedEventArgs e)
00275         {
00276             NavView.MenuItems.Clear();
00277         }
00278
00279         private void HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00280         {
00281             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00282             if (tag == "Default")
00283             {
00284                 MainGridRow.Height = new GridLength(1, GridUnitType.Star);
00285             }
00286             else if (tag == "300")
00287             {
00288                 MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
00289             }
00290         }
00291
00292         private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
00293         {
00294             if (args.SelectedItem != null)
00295             {
00296                 var itemdata = args.SelectedItem as NavigationViewItem;
00297                 if (itemdata != null)
00298                 {
00299                     if (itemdata.Content != null)
00300                     {
00301                         NavView.Header = itemdata.Content + " as header";
00302                     }
00303                     else if (args.IsSettingsSelected) // to handle settings without content case in top nav
00304                     {
00305                         NavView.Header = "Settings as header";
00306                     }
00307                 }
00308             }
00309         }
00310
00311         private void MoviesEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00312         {
00313             MoviesItem.IsEnabled = true;
00314             TVItem.IsEnabled = true;
00315         }
00316
00317         private void MoviesEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00318         {
00319             MoviesItem.IsEnabled = false;
00320             TVItem.IsEnabled = false;
00321         }
00322
00323         private void TitleBarCheckbox_Checked(object sender, RoutedEventArgs e)
00324         {
00325             if (CoreWindow.GetForCurrentThread() != null)
00326             {
00327                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00328                 titleBar.ExtendViewIntoTitleBar = false;
00329             }
00330         }
00331
00332         private void TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e)
00333         {
00334             if (CoreWindow.GetForCurrentThread() != null)
00335             {
00336                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00337                 titleBar.ExtendViewIntoTitleBar = true;
00338             }
00339         }
00340
00341         private void TestFrameCheckbox_Checked(object sender, RoutedEventArgs e)
00342         {
00343             UpdateTestFrameVisibility(Visibility.Visible);
00344         }
00345
00346         private void TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e)
00347         {
00348             UpdateTestFrameVisibility(Visibility.Collapsed);
00349         }
00350
00351         private void AutoSuggestCheckbox_Checked(object sender, RoutedEventArgs e)
00352         {
00353             // recreate AutoSuggestBox
00354             var autoSuggestBox = new AutoSuggestBox();
00355             AutomationProperties.SetName(autoSuggestBox, "PaneAutoSuggestBox");
00356             NavView.AutoSuggestBox = autoSuggestBox;
00357         }
00358
00359         private void AutoSuggestCheckbox_Unchecked(object sender, RoutedEventArgs e)
00360         {
00361             NavView.AutoSuggestBox = null;
00362         }
00363
00364         private void ScrambleButton_Click(object sender, RoutedEventArgs e)
00365         {
00366             foreach (var entry in NavView.MenuItems)
00367             {
00368                 NavigationViewItem item = entry as NavigationViewItem;
00369
00370                 if (item != null)
00371                 {
00372                     char[] newTitle = item.Content.ToString().ToCharArray();
00373                     Array.Reverse(newTitle);
00374                     item.Content = new string(newTitle);
00375                 }
00376             }
00377         }
00378
00379         private void CopyGamesLabelButton_Click(object sender, RoutedEventArgs e)
00380         {
00381             var popups = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot);
00382             if (popups != null && popups.Count > 0)
00383             {
00384                 Popup popup = popups[0];
00385                 ToolTip toolTip = popup.Child as ToolTip;
00386                 ToolTipStatusTextBlock.Text = toolTip.Content.ToString();
00387             }
00388             else
00389             {
00390                 ToolTipStatusTextBlock.Text = "There are no popups";
00391             }
00392         }
00393
00394         private void ClosingEventCountResetButton_Click(object sender, RoutedEventArgs e)
00395         {
00396             LastIngEventText.Text = "";
00397             LastEdEventText.Text = "";
00398             m_closingEventsFired = 0;
00399             m_closedEventsFired = 0;
00400             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00401         }
00402
00403         private void NavView_PaneClosing(NavigationView sender, NavigationViewPaneClosingEventArgs args)
00404         {
00405             if (CancelClosingEvents != null && (bool)CancelClosingEvents.IsChecked)
00406             {
00407                 args.Cancel = true;
00408             }
00409
00410             LastIngEventText.Text = "PaneClosing event fired";
00411
00412             m_closingEventsFired++;
00413             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00414
00415         }
00416
00417         private void NavView_PaneClosed(NavigationView sender, object args)
00418         {
00419             LastEdEventText.Text = "PaneClosed event fired";
00420
00421             m_closedEventsFired++;
00422             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00423             PaneOpenedOrClosedEvent.Text = "Closed";
00424         }
00425
00426         private void NavView_PaneOpening(NavigationView sender, object args)
00427         {
00428             LastIngEventText.Text = "PaneOpening event fired";
00429         }
00430
00431         private void NavView_PaneOpened(NavigationView sender, object args)
00432         {
00433             LastEdEventText.Text = "PaneOpened event fired";
00434             PaneOpenedOrClosedEvent.Text = "Opened";
00435         }
00436
00437         private void ChangePaneTitle_Click(object sender, RoutedEventArgs e)
00438         {
00439             NavView.PaneTitle = "";
00440         }
00441
00442         private void CopyVolumeToolTipButton_Click(object sender, RoutedEventArgs e)
00443         {
00444             var contentGrid = FindVisualChildByName(VolumeItem, "ContentGrid") as Grid;
00445             ToolTip tooltip = ToolTipService.GetToolTip(contentGrid) as ToolTip;
00446             if (tooltip == null || tooltip.Content == null)
00447             {
00448                 ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is null";
00449             }
00450             else
00451             {
00452                 ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is definitely not null";
00453             }
00454         }
00455
00456         private void SetHeaderButton_Click(object sender, RoutedEventArgs args)
00457         {
00458             NavView.Header = new TextBlock() { Text = "Bananas" };
00459         }
00460
00461         private void BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00462         {
00463             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00464         }
00465
00466         private void BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00467         {
00468             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
00469         }
00470
00471         private void BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00472         {
00473             NavView.IsBackEnabled = true;
00474         }
00475
00476         private void BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00477         {
00478             NavView.IsBackEnabled = false;
00479         }
00480
00481         private void SelectionFollowFocus_Checked(object sender, RoutedEventArgs e)
00482         {
00483             NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
00484         }
00485
00486         private void SelectionFollowFocus_Unchecked(object sender, RoutedEventArgs e)
00487         {
00488             NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
00489         }
00490
00491         private void NavView_BackRequested(NavigationView nv, NavigationViewBackRequestedEventArgs args)
00492         {
00493             BackRequestedStateTextBlock.Text = "Back was requested";
00494         }
00495
00496         private void BackRequestedStateResetButton_Click(object sender, RoutedEventArgs args)
00497         {
00498             BackRequestedStateTextBlock.Text = "Test reset";
00499         }
00500
00501         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00502         {
00503             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00504         }
00505
00506         private void ClearSelectedItem_Click(object sender, RoutedEventArgs e)
00507         {
00508             NavView.SelectedItem = null;
00509         }
00510
00511         private void GetOverflowMenuCornerRadiusButton_Click(object sender, RoutedEventArgs e)
00512         {
00513             var lastMenuItem = NavView.MenuItems[NavView.MenuItems.Count - 1] as NavigationViewItem;
00514             var parent = lastMenuItem.FindVisualParentByType<FlyoutPresenter>();
00515             if (parent is FlyoutPresenter flyoutPresenter)
00516             {
00517                 var contentPresenter = flyoutPresenter.FindVisualChildByName("ContentPresenter") as ContentPresenter;
00518                 OverflowMenuCornerRadiusTextBlock.Text = contentPresenter?.CornerRadius.ToString() ?? "Internal ContentPresenter not found";
00519             }
00520         }
00521     }
00522 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclePoolFactory.h Source File

  • File List
  • File Members
  • Repeater

RecyclePoolFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RecyclePool.h"
00007
00008 // For MuxFinal builds we don't include RecyclePool in the WinMD
00009 // and we use custom definition of the dependency properties
00010 #ifdef MUX_PRERELEASE
00011 #include "RecyclePool.properties.cpp"
00012 #else
00013 namespace winrt::Microsoft::UI::Xaml::Controls
00014 {
00015     CppWinRTActivatableClassWithDPFactory(RecyclePool)
00016 }
00017 #include "RecyclePool.g.cpp"
00018 #endif
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BrightnessSun::BrightnessSun_AnimatedVisual Member List

This is the complete list of members for BrightnessSun::BrightnessSun_AnimatedVisual, including all inherited members.
_c | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_colorBrush_AlmostGoldenrod_FFE4950C | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_holdThenStepEasingFunction | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_path | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_reusableExpressionAnimation | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_root | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_rootProgress | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_tEndScalarAnimation_1_to_0 | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
_tStartScalarAnimation_1_to_0 | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
BindProperty(CompositionObject target, string animatedPropertyName, string expression, string referenceParameterName, CompositionObject referencedObject) | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
BrightnessSun_AnimatedVisual(Compositor compositor) | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
c_durationTicks | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
ColorBrush_AlmostDarkOrange_FFF18F13() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
ColorBrush_AlmostGoldenrod_FFE4950C() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
ColorBrush_SemiTransparentWhite() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix) | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix, CompositionBrush fillBrush) | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
Dispose() | BrightnessSun::BrightnessSun_AnimatedVisual | [private]
Duration | BrightnessSun::BrightnessSun_AnimatedVisual |
Ellipse_74p5() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
Geometry_0() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
Geometry_1() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
Path() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_00() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_01() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_02() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_03() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_04() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_05() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_06() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_07() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_08() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_09() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_10() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_11() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_12() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_13() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
PathGeometry_14() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
Root() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
RootProgress() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
RootVisual | BrightnessSun::BrightnessSun_AnimatedVisual |
ShapeVisual_0() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
Size | BrightnessSun::BrightnessSun_AnimatedVisual |
SpriteShape_00() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_01() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_02() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_03() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_04() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_05() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_06() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_07() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_08() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_09() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_10() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_11() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_12() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_13() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_14() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
SpriteShape_15() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, string animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
TEndScalarAnimation_1_to_0() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
TStartScalarAnimation_1_to_0() | BrightnessSun::BrightnessSun_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapControl.properties.cpp Source File

  • File List
  • File Members
  • Generated

MapControl.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MapControl.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(MapControl)
00012 }
00013
00014 #include "MapControl.g.cpp"
00015
00016 GlobalDependencyProperty MapControlProperties::s_CenterProperty{ nullptr };
00017 GlobalDependencyProperty MapControlProperties::s_InteractiveControlsVisibleProperty{ nullptr };
00018 GlobalDependencyProperty MapControlProperties::s_LayersProperty{ nullptr };
00019 GlobalDependencyProperty MapControlProperties::s_MapServiceTokenProperty{ nullptr };
00020 GlobalDependencyProperty MapControlProperties::s_ZoomLevelProperty{ nullptr };
00021
00022 MapControlProperties::MapControlProperties()
00023     : m_mapElementClickEventSource{static_cast<MapControl*>(this)}
00024     , m_mapServiceErrorOccurredEventSource{static_cast<MapControl*>(this)}
00025 {
00026     EnsureProperties();
00027 }
00028
00029 void MapControlProperties::EnsureProperties()
00030 {
00031     if (!s_CenterProperty)
00032     {
00033         s_CenterProperty =
00034             InitializeDependencyProperty(
00035                 L"Center",
00036                 winrt::name_of<winrt::Geopoint>(),
00037                 winrt::name_of<winrt::MapControl>(),
00038                 false /* isAttached */,
00039                 ValueHelper<winrt::Geopoint>::BoxedDefaultValue(),
00040                 winrt::PropertyChangedCallback(&OnCenterPropertyChanged));
00041     }
00042     if (!s_InteractiveControlsVisibleProperty)
00043     {
00044         s_InteractiveControlsVisibleProperty =
00045             InitializeDependencyProperty(
00046                 L"InteractiveControlsVisible",
00047                 winrt::name_of<bool>(),
00048                 winrt::name_of<winrt::MapControl>(),
00049                 false /* isAttached */,
00050                 ValueHelper<bool>::BoxedDefaultValue(),
00051                 winrt::PropertyChangedCallback(&OnInteractiveControlsVisiblePropertyChanged));
00052     }
00053     if (!s_LayersProperty)
00054     {
00055         s_LayersProperty =
00056             InitializeDependencyProperty(
00057                 L"Layers",
00058                 winrt::name_of<winrt::IVector<winrt::MapLayer>>(),
00059                 winrt::name_of<winrt::MapControl>(),
00060                 false /* isAttached */,
00061                 ValueHelper<winrt::IVector<winrt::MapLayer>>::BoxedDefaultValue(),
00062                 winrt::PropertyChangedCallback(&OnLayersPropertyChanged));
00063     }
00064     if (!s_MapServiceTokenProperty)
00065     {
00066         s_MapServiceTokenProperty =
00067             InitializeDependencyProperty(
00068                 L"MapServiceToken",
00069                 winrt::name_of<winrt::hstring>(),
00070                 winrt::name_of<winrt::MapControl>(),
00071                 false /* isAttached */,
00072                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00073                 winrt::PropertyChangedCallback(&OnMapServiceTokenPropertyChanged));
00074     }
00075     if (!s_ZoomLevelProperty)
00076     {
00077         s_ZoomLevelProperty =
00078             InitializeDependencyProperty(
00079                 L"ZoomLevel",
00080                 winrt::name_of<double>(),
00081                 winrt::name_of<winrt::MapControl>(),
00082                 false /* isAttached */,
00083                 ValueHelper<double>::BoxedDefaultValue(),
00084                 winrt::PropertyChangedCallback(&OnZoomLevelPropertyChanged));
00085     }
00086 }
00087
00088 void MapControlProperties::ClearProperties()
00089 {
00090     s_CenterProperty = nullptr;
00091     s_InteractiveControlsVisibleProperty = nullptr;
00092     s_LayersProperty = nullptr;
00093     s_MapServiceTokenProperty = nullptr;
00094     s_ZoomLevelProperty = nullptr;
00095 }
00096
00097 void MapControlProperties::OnCenterPropertyChanged(
00098     winrt::DependencyObject const& sender,
00099     winrt::DependencyPropertyChangedEventArgs const& args)
00100 {
00101     auto owner = sender.as<winrt::MapControl>();
00102     winrt::get_self<MapControl>(owner)->OnPropertyChanged(args);
00103 }
00104
00105 void MapControlProperties::OnInteractiveControlsVisiblePropertyChanged(
00106     winrt::DependencyObject const& sender,
00107     winrt::DependencyPropertyChangedEventArgs const& args)
00108 {
00109     auto owner = sender.as<winrt::MapControl>();
00110     winrt::get_self<MapControl>(owner)->OnPropertyChanged(args);
00111 }
00112
00113 void MapControlProperties::OnLayersPropertyChanged(
00114     winrt::DependencyObject const& sender,
00115     winrt::DependencyPropertyChangedEventArgs const& args)
00116 {
00117     auto owner = sender.as<winrt::MapControl>();
00118     winrt::get_self<MapControl>(owner)->OnPropertyChanged(args);
00119 }
00120
00121 void MapControlProperties::OnMapServiceTokenPropertyChanged(
00122     winrt::DependencyObject const& sender,
00123     winrt::DependencyPropertyChangedEventArgs const& args)
00124 {
00125     auto owner = sender.as<winrt::MapControl>();
00126     winrt::get_self<MapControl>(owner)->OnPropertyChanged(args);
00127 }
00128
00129 void MapControlProperties::OnZoomLevelPropertyChanged(
00130     winrt::DependencyObject const& sender,
00131     winrt::DependencyPropertyChangedEventArgs const& args)
00132 {
00133     auto owner = sender.as<winrt::MapControl>();
00134     winrt::get_self<MapControl>(owner)->OnPropertyChanged(args);
00135 }
00136
00137 void MapControlProperties::Center(winrt::Geopoint const& value)
00138 {
00139     [[gsl::suppress(con)]]
00140     {
00141     static_cast<MapControl*>(this)->SetValue(s_CenterProperty, ValueHelper<winrt::Geopoint>::BoxValueIfNecessary(value));
00142     }
00143 }
00144
00145 winrt::Geopoint MapControlProperties::Center()
00146 {
00147     return ValueHelper<winrt::Geopoint>::CastOrUnbox(static_cast<MapControl*>(this)->GetValue(s_CenterProperty));
00148 }
00149
00150 void MapControlProperties::InteractiveControlsVisible(bool value)
00151 {
00152     [[gsl::suppress(con)]]
00153     {
00154     static_cast<MapControl*>(this)->SetValue(s_InteractiveControlsVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00155     }
00156 }
00157
00158 bool MapControlProperties::InteractiveControlsVisible()
00159 {
00160     return ValueHelper<bool>::CastOrUnbox(static_cast<MapControl*>(this)->GetValue(s_InteractiveControlsVisibleProperty));
00161 }
00162
00163 void MapControlProperties::Layers(winrt::IVector<winrt::MapLayer> const& value)
00164 {
00165     [[gsl::suppress(con)]]
00166     {
00167     static_cast<MapControl*>(this)->SetValue(s_LayersProperty, ValueHelper<winrt::IVector<winrt::MapLayer>>::BoxValueIfNecessary(value));
00168     }
00169 }
00170
00171 winrt::IVector<winrt::MapLayer> MapControlProperties::Layers()
00172 {
00173     return ValueHelper<winrt::IVector<winrt::MapLayer>>::CastOrUnbox(static_cast<MapControl*>(this)->GetValue(s_LayersProperty));
00174 }
00175
00176 void MapControlProperties::MapServiceToken(winrt::hstring const& value)
00177 {
00178     [[gsl::suppress(con)]]
00179     {
00180     static_cast<MapControl*>(this)->SetValue(s_MapServiceTokenProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00181     }
00182 }
00183
00184 winrt::hstring MapControlProperties::MapServiceToken()
00185 {
00186     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<MapControl*>(this)->GetValue(s_MapServiceTokenProperty));
00187 }
00188
00189 void MapControlProperties::ZoomLevel(double value)
00190 {
00191     [[gsl::suppress(con)]]
00192     {
00193     static_cast<MapControl*>(this)->SetValue(s_ZoomLevelProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00194     }
00195 }
00196
00197 double MapControlProperties::ZoomLevel()
00198 {
00199     return ValueHelper<double>::CastOrUnbox(static_cast<MapControl*>(this)->GetValue(s_ZoomLevelProperty));
00200 }
00201
00202 winrt::event_token MapControlProperties::MapElementClick(winrt::TypedEventHandler<winrt::MapControl, winrt::MapElementClickEventArgs> const& value)
00203 {
00204     return m_mapElementClickEventSource.add(value);
00205 }
00206
00207 void MapControlProperties::MapElementClick(winrt::event_token const& token)
00208 {
00209     m_mapElementClickEventSource.remove(token);
00210 }
00211
00212 winrt::event_token MapControlProperties::MapServiceErrorOccurred(winrt::TypedEventHandler<winrt::MapControl, winrt::MapControlMapServiceErrorOccurredEventArgs> const& value)
00213 {
00214     return m_mapServiceErrorOccurredEventSource.add(value);
00215 }
00216
00217 void MapControlProperties::MapServiceErrorOccurred(winrt::event_token const& token)
00218 {
00219     m_mapServiceErrorOccurredEventSource.remove(token);
00220 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerPanRequestedEventArgs.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollControllerPanRequestedEventArgs.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollControllerPanRequestedEventArgs.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollControllerPanRequestedEventArgs)
00012 }
00013
00014 #include "ScrollControllerPanRequestedEventArgs.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBar Member List

This is the complete list of members for AnnotatedScrollBar, including all inherited members.
abi_enter() | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
AddScrollVelocityRequested(winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerAddScrollVelocityRequestedEventArgs > const &value) | AnnotatedScrollBar |
AddScrollVelocityRequested(winrt::event_token const &token) | AnnotatedScrollBar |
AnnotatedScrollBar() | AnnotatedScrollBar |
AnnotatedScrollBarProperties() | AnnotatedScrollBarProperties |
CanScroll() | AnnotatedScrollBar |
CanScrollChanged(winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value) | AnnotatedScrollBar |
CanScrollChanged(winrt::event_token const &token) | AnnotatedScrollBar |
CheckThread() | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
ClearProperties() | AnnotatedScrollBarProperties | [static]
CollapseCollidingAndOutOfBoundsLabels() | AnnotatedScrollBar | [private]
CreateLabelContainers() | AnnotatedScrollBar | [private]
DeleteInstanceOnUIThread(std::unique_ptr< AnnotatedScrollBar > &&self) noexcept | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline, static]
DetailLabelRequested(winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs > const &value) | AnnotatedScrollBarProperties |
DetailLabelRequested(winrt::event_token const &token) | AnnotatedScrollBarProperties |
DetailLabelTemplate(winrt::IElementFactory const &value) | AnnotatedScrollBarProperties |
DetailLabelTemplate() | AnnotatedScrollBarProperties |
DetailLabelTemplateProperty() | AnnotatedScrollBarProperties | [inline, static]
EnsurePanningInfo() | AnnotatedScrollBar | [private]
EnsureProperties() | AnnotatedScrollBarProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
EnsureSmallChangeValue() | AnnotatedScrollBar | [private]
final_release(std::unique_ptr< AnnotatedScrollBar > &&self) | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline, static]
GetBase() | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
GetInner() | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
GetLabelVerticalOffset(winrt::AnnotatedScrollBarLabel label) | AnnotatedScrollBar | [private]
GetScrollAnimation(int correlationId, winrt::float2 const &startPosition, winrt::float2 const &endPosition, winrt::CompositionAnimation const &defaultAnimation) | AnnotatedScrollBar |
HideHoverVisuals() | AnnotatedScrollBar | [private]
HookInputEvents() | AnnotatedScrollBar | [private]
IgnorePointerId(const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
IsOnThread() | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
IsOutOfVerticalGridBounds(const winrt::Point &point) | AnnotatedScrollBar | [private]
IsScrollingWithMouse() | AnnotatedScrollBar |
IsScrollingWithMouseChanged(winrt::TypedEventHandler< winrt::IScrollController, winrt::IInspectable > const &value) | AnnotatedScrollBar |
IsScrollingWithMouseChanged(winrt::event_token const &token) | AnnotatedScrollBar |
Labels(winrt::IVector< winrt::AnnotatedScrollBarLabel > const &value) | AnnotatedScrollBarProperties |
Labels() | AnnotatedScrollBarProperties |
LabelsProperty() | AnnotatedScrollBarProperties | [inline, static]
LabelTemplate(winrt::IElementFactory const &value) | AnnotatedScrollBarProperties |
LabelTemplate() | AnnotatedScrollBarProperties |
LabelTemplateProperty() | AnnotatedScrollBarProperties | [inline, static]
LayoutLabels() | AnnotatedScrollBar | [private]
m_detailLabelRequestedEventSource | AnnotatedScrollBarProperties |
m_scrollingEventSource | AnnotatedScrollBarProperties |
Maximum(double maximum) | AnnotatedScrollBar | [private]
Maximum() | AnnotatedScrollBar | [private]
Minimum(double minimum) | AnnotatedScrollBar | [private]
Minimum() | AnnotatedScrollBar | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
NotifyRequestedScrollCompleted(int correlationId) | AnnotatedScrollBar |
OnApplyTemplate() | AnnotatedScrollBar |
OnDecrementRepeatButtonClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnDetailLabelTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
OnDetailLabelToolTipOpened(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnIncrementRepeatButtonClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnIsEnabledChanged(const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args) | AnnotatedScrollBar | [private]
OnLabelsCollectionChanged(const winrt::IInspectable &, const winrt::IInspectable &) | AnnotatedScrollBar | [private]
OnLabelsGridSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | AnnotatedScrollBar | [private]
OnLabelsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
OnLabelTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | AnnotatedScrollBar |
OnSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | AnnotatedScrollBar | [private]
OnSmallChangePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
OnVerticalGridPointerCanceled(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnVerticalGridPointerCaptureLost(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnVerticalGridPointerEntered(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnVerticalGridPointerExited(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnVerticalGridPointerMoved(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnVerticalGridPointerPressed(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
OnVerticalGridPointerReleased(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
PanningInfo() | AnnotatedScrollBar |
ProcessVerticalGridPointerCanceled(const winrt::PointerRoutedEventArgs &args) | AnnotatedScrollBar | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
QueueLayoutLabels(unsigned int millisecondWait) | AnnotatedScrollBar | [private]
RaiseAddScrollVelocityRequested(double offsetDelta) | AnnotatedScrollBar | [private]
RaiseCanScrollChanged() | AnnotatedScrollBar | [private]
RaiseDetailLabelRequested(double offsetFromTop) | AnnotatedScrollBar | [private]
RaiseIsScrollingWithMouseChanged() | AnnotatedScrollBar | [private]
RaiseScrollByRequested(double offsetDelta) | AnnotatedScrollBar | [private]
RaiseScrolling(double offset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind) | AnnotatedScrollBar | [private]
RaiseScrollToRequested(double offset) | AnnotatedScrollBar | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< AnnotatedScrollBar, winrt::implementation::AnnotatedScrollBarT, winrt::cloaked< winrt::IScrollController > > | [inline]
ResetTrackedPointerId() | AnnotatedScrollBar | [private]
s_DetailLabelTemplateProperty | AnnotatedScrollBarProperties | [static]
s_LabelsProperty | AnnotatedScrollBarProperties | [static]
s_LabelTemplateProperty | AnnotatedScrollBarProperties | [static]
s_SmallChangeProperty | AnnotatedScrollBarProperties | [static]
ScrollByRequested(winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollByRequestedEventArgs > const &value) | AnnotatedScrollBar |
ScrollByRequested(winrt::event_token const &token) | AnnotatedScrollBar |
ScrollController() | AnnotatedScrollBar |
Scrolling(winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs > const &value) | AnnotatedScrollBarProperties |
Scrolling(winrt::event_token const &token) | AnnotatedScrollBarProperties |
ScrollTo(double offset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind) | AnnotatedScrollBar | [private]
ScrollToRequested(winrt::TypedEventHandler< winrt::IScrollController, winrt::ScrollControllerScrollToRequestedEventArgs > const &value) | AnnotatedScrollBar |
ScrollToRequested(winrt::event_token const &token) | AnnotatedScrollBar |
SetIsScrollable(bool isScrollable) | AnnotatedScrollBar |
SetThumbGhostVisibility(winrt::Visibility visibility) | AnnotatedScrollBar | [private]
SetToolTipIsOpen(bool isOpen) | AnnotatedScrollBar | [private]
SetUpInteractionElements() | AnnotatedScrollBar | [private]
SetValues(double minOffset, double maxOffset, double offset, double viewportLength) | AnnotatedScrollBar |
ShowHoverVisuals(double offsetFromTopToolTip, double offsetFromTopThumbGhost) | AnnotatedScrollBar | [private]
ShowThumbGhostAtOffset(double offsetFromTop) | AnnotatedScrollBar | [private]
ShowToolTipAtOffset(double offsetFromTop) | AnnotatedScrollBar | [private]
SmallChange(double value) | AnnotatedScrollBarProperties |
SmallChange() | AnnotatedScrollBarProperties |
SmallChangeProperty() | AnnotatedScrollBarProperties | [inline, static]
UnhookHandlers(bool isFromDestructor) | AnnotatedScrollBar | [private]
UpdateCanScroll() | AnnotatedScrollBar | [private]
UpdateLabelContainersOffsets() | AnnotatedScrollBar | [private]
UpdatePositionsOfAnchoredElements() | AnnotatedScrollBar | [private]
UpdateScrollOffsetToLabelOffsetFactor() | AnnotatedScrollBar | [private]
Value(double value) | AnnotatedScrollBar | [private]
Value() | AnnotatedScrollBar | [private]
ViewportSize(double viewportSize) | AnnotatedScrollBar | [private]
ViewportSize() | AnnotatedScrollBar | [private]
~AnnotatedScrollBar() | AnnotatedScrollBar |
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AcrylicBrush.properties.h Source File

  • File List
  • File Members
  • Generated

AcrylicBrush.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class AcrylicBrushProperties
00008 {
00009 public:
00010     AcrylicBrushProperties();
00011
00012     void AlwaysUseFallback(bool value);
00013     bool AlwaysUseFallback();
00014
00015     void TintColor(winrt::Color const& value);
00016     winrt::Color TintColor();
00017
00018     void TintLuminosityOpacity(winrt::IReference<double> const& value);
00019     winrt::IReference<double> TintLuminosityOpacity();
00020
00021     void TintOpacity(double value);
00022     double TintOpacity();
00023
00024     void TintTransitionDuration(winrt::TimeSpan const& value);
00025     winrt::TimeSpan TintTransitionDuration();
00026
00027     static winrt::DependencyProperty AlwaysUseFallbackProperty() { return s_AlwaysUseFallbackProperty; }
00028     static winrt::DependencyProperty TintColorProperty() { return s_TintColorProperty; }
00029     static winrt::DependencyProperty TintLuminosityOpacityProperty() { return s_TintLuminosityOpacityProperty; }
00030     static winrt::DependencyProperty TintOpacityProperty() { return s_TintOpacityProperty; }
00031     static winrt::DependencyProperty TintTransitionDurationProperty() { return s_TintTransitionDurationProperty; }
00032
00033     static GlobalDependencyProperty s_AlwaysUseFallbackProperty;
00034     static GlobalDependencyProperty s_TintColorProperty;
00035     static GlobalDependencyProperty s_TintLuminosityOpacityProperty;
00036     static GlobalDependencyProperty s_TintOpacityProperty;
00037     static GlobalDependencyProperty s_TintTransitionDurationProperty;
00038
00039     static void EnsureProperties();
00040     static void ClearProperties();
00041
00042     static void OnAlwaysUseFallbackPropertyChanged(
00043         winrt::DependencyObject const& sender,
00044         winrt::DependencyPropertyChangedEventArgs const& args);
00045
00046     static void OnTintColorPropertyChanged(
00047         winrt::DependencyObject const& sender,
00048         winrt::DependencyPropertyChangedEventArgs const& args);
00049
00050     static void OnTintLuminosityOpacityPropertyChanged(
00051         winrt::DependencyObject const& sender,
00052         winrt::DependencyPropertyChangedEventArgs const& args);
00053
00054     static void OnTintOpacityPropertyChanged(
00055         winrt::DependencyObject const& sender,
00056         winrt::DependencyPropertyChangedEventArgs const& args);
00057
00058     static void OnTintTransitionDurationPropertyChanged(
00059         winrt::DependencyObject const& sender,
00060         winrt::DependencyPropertyChangedEventArgs const& args);
00061 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/InteractionTests/PipsPagerElements.cs Source File

  • File List
  • File Members
  • PipsPager
  • InteractionTests

PipsPagerElements.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00002 using Common;
00003 using Microsoft.Windows.Apps.Test.Foundation;
00004 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00005
00006 using WEX.TestExecution;
00007 using WEX.TestExecution.Markup;
00008 using WEX.Logging.Interop;
00009
00010 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00011 {
00012     public class PipsPagerElements
00013     {
00014         private UIObject PipsPager;
00015         private UIObject NextPageButton;
00016         private UIObject PreviousPageButton;
00017         private Button RetrievePipsPagerButtonSizesButton;
00018         private ComboBox PreviousPageButtonVisibilityComboBox;
00019         private ComboBox NextPageButtonVisibilityComboBox;
00020         private ComboBox NumberOfPagesComboBox;
00021         private ComboBox MaxVisualIndicatorsComboBox;
00022         private ComboBox OrientationComboBox;
00023         private ComboBox WrapModeComboBox;
00024         private CheckBox PreviousPageButtonIsVisibleCheckBox;
00025         private CheckBox PreviousPageButtonIsEnabledCheckBox;
00026         private CheckBox NextPageButtonIsVisibleCheckBox;
00027         private CheckBox NextPageButtonIsEnabledCheckBox;
00028         private TextBlock CurrentPageTextBlock;
00029         private TextBlock FocusedPageIndexTextBlock;
00030         private TextBlock CurrentNumberOfPagesTextBlock;
00031         private TextBlock CurrentMaxVisualIndicatorsTextBlock;
00032         private TextBlock CurrentOrientationTextBlock;
00033         private TextBlock HorizontalOrientationPipsPagerButtonWidthTextBlock;
00034         private TextBlock HorizontalOrientationPipsPagerButtonHeightTextBlock;
00035         private TextBlock VerticalOrientationPipsPagerButtonWidthTextBlock;
00036         private TextBlock VerticalOrientationPipsPagerButtonHeightTextBlock;
00037         public UIObject GetPipsPager()
00038         {
00039             return GetElement(ref PipsPager, "TestPipsPager");
00040         }
00041         public UIObject GetPreviousPageButton()
00042         {
00043             return GetElementWithinPager(ref PreviousPageButton, "PreviousPageButton");
00044         }
00045
00046         public UIObject GetNextPageButton()
00047         {
00048             return GetElementWithinPager(ref NextPageButton, "NextPageButton");
00049         }
00050
00051         public ComboBox GetPreviousPageButtonVisibilityComboBox()
00052         {
00053             return GetElement(ref PreviousPageButtonVisibilityComboBox, "PreviousPageButtonVisibilityComboBox");
00054         }
00055
00056         public ComboBox GetNextPageButtonVisibilityComboBox()
00057         {
00058             return GetElement(ref NextPageButtonVisibilityComboBox, "NextPageButtonVisibilityComboBox");
00059         }
00060
00061         public CheckBox GetPreviousPageButtonIsVisibleCheckBox()
00062         {
00063             return GetElement(ref PreviousPageButtonIsVisibleCheckBox, "PreviousPageButtonIsVisibleCheckBox");
00064         }
00065         public CheckBox GetPreviousPageButtonIsEnabledCheckBox()
00066         {
00067             return GetElement(ref PreviousPageButtonIsEnabledCheckBox, "PreviousPageButtonIsEnabledCheckBox");
00068         }
00069         public CheckBox GetNextPageButtonIsVisibleCheckBox()
00070         {
00071             return GetElement(ref NextPageButtonIsVisibleCheckBox, "NextPageButtonIsVisibleCheckBox");
00072         }
00073         public CheckBox GetNextPageButtonIsEnabledCheckBox()
00074         {
00075             return GetElement(ref NextPageButtonIsEnabledCheckBox, "NextPageButtonIsEnabledCheckBox");
00076         }
00077
00078         public ComboBox GetNumberOfPagesComboBox()
00079         {
00080             return GetElement(ref NumberOfPagesComboBox, "TestPipsPagerNumberOfPagesComboBox");
00081         }
00082
00083         public ComboBox GetMaxVisualIndicatorsComboBox()
00084         {
00085             return GetElement(ref MaxVisualIndicatorsComboBox, "TestPipsPagerMaxVisualIndicatorsComboBox");
00086         }
00087         public ComboBox GetOrientationComboBox()
00088         {
00089             return GetElement(ref OrientationComboBox, "TestPipsPagerOrientationComboBox");
00090         }
00091         public ComboBox GetWrapModeComboBox()
00092         {
00093             return GetElement(ref WrapModeComboBox, "TestPipsPagerWrapModeComboBox");
00094         }
00095         public TextBlock GetCurrentPageTextBlock()
00096         {
00097             return GetElement(ref CurrentPageTextBlock, "CurrentPageIndexTextBlock");
00098         }
00099
00100         public TextBlock GetFocusedPageIndexTextBlock()
00101         {
00102             return GetElement(ref FocusedPageIndexTextBlock, "FocusedPageIndexTextBlock");
00103         }
00104
00105         public TextBlock GetCurrentMaxVisualIndicatorsTextBlock()
00106         {
00107             return GetElement(ref CurrentMaxVisualIndicatorsTextBlock, "CurrentMaxVisualIndicatorsTextBlock");
00108         }
00109
00110         public TextBlock GetCurrentNumberOfPagesTextBlock()
00111         {
00112             return GetElement(ref CurrentNumberOfPagesTextBlock, "CurrentNumberOfPagesTextBlock");
00113         }
00114
00115         public TextBlock GetCurrentOrientationTextBlock()
00116         {
00117             return GetElement(ref CurrentOrientationTextBlock, "CurrentOrientationTextBlock");
00118         }
00119
00120         public TextBlock GetHorizontalOrientationPipsPagerButtonWidthTextBlock()
00121         {
00122             return GetElement(ref HorizontalOrientationPipsPagerButtonWidthTextBlock, "HorizontalOrientationPipsPagerButtonWidthTextBlock");
00123         }
00124         public TextBlock GetHorizontalOrientationPipsPagerButtonHeightTextBlock()
00125         {
00126             return GetElement(ref HorizontalOrientationPipsPagerButtonHeightTextBlock, "HorizontalOrientationPipsPagerButtonHeightTextBlock");
00127         }
00128         public TextBlock GetVerticalOrientationPipsPagerButtonWidthTextBlock()
00129         {
00130             return GetElement(ref VerticalOrientationPipsPagerButtonWidthTextBlock, "VerticalOrientationPipsPagerButtonWidthTextBlock");
00131         }
00132         public TextBlock GetVerticalOrientationPipsPagerButtonHeightTextBlock()
00133         {
00134             return GetElement(ref VerticalOrientationPipsPagerButtonHeightTextBlock, "VerticalOrientationPipsPagerButtonHeightTextBlock");
00135         }
00136
00137         public Button GetPipsPagerButtonSizesButton()
00138         {
00139             return GetElement(ref RetrievePipsPagerButtonSizesButton, "GetPipsPagersButtonSizesButton");
00140         }
00141
00142         public UIObject GetPipWithPageNumber(string elementName)
00143         {
00144             foreach (var element in GetPipsPager().Children)
00145             {
00146                 if (element.Name == elementName)
00147                 {
00148                     return element;
00149                 }
00150             }
00151             return null;
00152         }
00153         private T GetElement<T>(ref T element, string elementName) where T : UIObject
00154         {
00155             if (element == null)
00156             {
00157                 Log.Comment("Find the " + elementName);
00158                 element = FindElement.ByNameOrId<T>(elementName);
00159                 Verify.IsNotNull(element);
00160             }
00161             return element;
00162         }
00163         private T GetElementWithinPager<T>(ref T element, string elementName) where T : UIObject
00164         {
00165             if (element == null)
00166             {
00167                 Log.Comment("Find the " + elementName);
00168
00169                 foreach (T child in GetPipsPager().Children)
00170                 {
00171                     if (child.AutomationId == elementName)
00172                     {
00173                         element = child;
00174                         break;
00175                     }
00176                 }
00177                 Verify.IsNotNull(element);
00178             }
00179             return element;
00180         }
00181     }
00182 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerScrollByRequestedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerScrollByRequestedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollControllerScrollByRequestedEventArgs.g.h"
00007
00008 class ScrollControllerScrollByRequestedEventArgs :
00009     public winrt::implementation::ScrollControllerScrollByRequestedEventArgsT<ScrollControllerScrollByRequestedEventArgs>
00010 {
00011 public:
00012     ~ScrollControllerScrollByRequestedEventArgs()
00013     {
00014         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00015     }
00016
00017     ScrollControllerScrollByRequestedEventArgs(
00018         double offsetDelta,
00019         winrt::ScrollingScrollOptions const & options);
00020
00021     double OffsetDelta() const;
00022     winrt::ScrollingScrollOptions Options() const;
00023     int32_t CorrelationId() const;
00024     void CorrelationId(int32_t correlationId);
00025
00026 private:
00027     double m_offsetDelta{ 0.0 };
00028     winrt::ScrollingScrollOptions m_options{ nullptr };
00029     int32_t m_correlationId{ -1 };
00030 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< RoutedEventType::Drop > Member List

This is the complete list of members for RoutedEventTraits< RoutedEventType::Drop >, including all inherited members.
Event() RoutedEventTraits< RoutedEventType::Drop > [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTopNavOnlyPage Member List

This is the complete list of members for NavigationViewTopNavOnlyPage, including all inherited members.
AddLongNavItem_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
AddRemoveContentOverlay_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
AddTenItems_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
ChangeDataSource_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
ChangeGamesContent_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
ChangeOverflowLabelVisibility_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
ChangeOverflowLabelVisibility_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
ChangeTopNavVisibility_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
ClearNavItemContent_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
contentOverlay | NavigationViewTopNavOnlyPage | [private]
ExpectNullSelectedItemInItemInvoke_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
FlipExtendViewIntoTitleBar_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
FlipOrientation_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
GetActiveVisualState_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
GetAndVerifyTheContainer(object content, NavigationViewItem container) | NavigationViewTopNavOnlyPage | [inline, private]
m_expectNullSelectedItemInNextInvoke | NavigationViewTopNavOnlyPage | [private]
m_numberOfItemAdded | NavigationViewTopNavOnlyPage | [private]
NavigationViewTopNavOnlyPage() | NavigationViewTopNavOnlyPage | [inline]
NavInvalidateMeasure_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
RecommendedNavigationTransitionInfoToString(NavigationTransitionInfo info) | NavigationViewTopNavOnlyPage | [inline, private]
ResetResult_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
SelectionFollowsFocusSetter_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
SetInvalidSelectedItem_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
ShoulderNavigationEnabledSetter_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
TestFrameCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavOnlyPage | [inline, private]
UpdateAppTitle() | NavigationViewTopNavOnlyPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/LayoutHelper.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples

LayoutHelper.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml.Controls;
00006
00007 namespace MUXControlsTestApp.Samples
00008 {
00009     public static class LayoutHelper
00010     {
00011         public static void SetMaxRowsOrColumns(Layout layout, int value)
00012         {
00013             if (layout is UniformGridLayout)
00014             {
00015                 ((UniformGridLayout)layout).MaximumRowsOrColumns = value;
00016             }
00017         }
00018
00019         public static void SetMinRowSpacing(Layout layout, double value)
00020         {
00021             if (layout is UniformGridLayout)
00022             {
00023                 ((UniformGridLayout)layout).MinRowSpacing = value;
00024             }
00025             else if (layout is FlowLayout)
00026             {
00027                 ((FlowLayout)layout).MinRowSpacing = value;
00028             }
00029             else if (layout is StackLayout)
00030             {
00031                 // no-op
00032             }
00033         }
00034
00035         public static void SetMinColumnSpacing(Layout layout, double value)
00036         {
00037             if (layout is UniformGridLayout)
00038             {
00039                 ((UniformGridLayout)layout).MinColumnSpacing = value;
00040             }
00041             else if (layout is FlowLayout)
00042             {
00043                 ((FlowLayout)layout).MinColumnSpacing = value;
00044             }
00045             else if (layout is StackLayout)
00046             {
00047                 ((StackLayout)layout).Spacing = value;
00048             }
00049         }
00050
00051         public static void SetLineAlignment(Layout layout, string value)
00052         {
00053             if (layout is UniformGridLayout)
00054             {
00055                 var alignment = (UniformGridLayoutItemsJustification)Enum.Parse(typeof(UniformGridLayoutItemsJustification), value);
00056                 ((UniformGridLayout)layout).ItemsJustification = alignment;
00057             }
00058             else if (layout is FlowLayout)
00059             {
00060                 var alignment = (FlowLayoutLineAlignment)Enum.Parse(typeof(FlowLayoutLineAlignment), value);
00061                 ((FlowLayout)layout).LineAlignment = alignment;
00062             }
00063             else if (layout is StackLayout)
00064             {
00065                 // no-op
00066             }
00067         }
00068
00069         public static void SetItemsStretch(Layout layout, string value)
00070         {
00071             if (layout is UniformGridLayout)
00072             {
00073                 var stretch = (UniformGridLayoutItemsStretch)Enum.Parse(typeof(UniformGridLayoutItemsStretch), value);
00074                 ((UniformGridLayout)layout).ItemsStretch = stretch;
00075             }
00076             else
00077             {
00078                 // no-op
00079             }
00080         }
00081     }
00082 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerTests Member List

This is the complete list of members for PipsPagerTests, including all inherited members.
ButtonType enum name | PipsPagerTestBase |
ButtonVisibilityMode enum name | PipsPagerTestBase |
ChangeNumberOfPages(NumberOfPagesOptions numberOfPages) | PipsPagerTestBase | [inline, protected]
ClassInitialize(TestContext testContext) | PipsPagerTests | [inline, static]
elements | PipsPagerTestBase | [protected]
FirstFocusedPageTest() | PipsPagerTests | [inline]
GetButtonIsHiddenOnEdgeFunction() | PipsPagerTestBase | [protected]
GetCurrentOrientation() | PipsPagerTestBase | [inline, protected]
GetCurrentPage() | PipsPagerTestBase | [inline, protected]
GetCurrentPageAsInt32() | PipsPagerTestBase | [inline, protected]
GetFocusedPage() | PipsPagerTestBase | [inline, protected]
GetFocusedPageAsInt32() | PipsPagerTestBase | [inline, protected]
GetSelectedNumberOfPages() | PipsPagerTestBase | [inline, protected]
GetSelectedNumberOfPagesAsInt32() | PipsPagerTestBase | [inline, protected]
KeyboardPageSelectTest() | PipsPagerTests | [inline]
NextPageButtonChangingPageTest() | PipsPagerTests | [inline]
NextPageButtonVisibilityOptionsTest() | PipsPagerTests | [inline]
NumberOfPagesOptions enum name | PipsPagerTestBase |
OrientationChangeTest() | PipsPagerTests | [inline]
PipSizeAfterOrientationChangeTest() | PipsPagerTests | [inline]
PipSizeWithDifferentOrientationsTest() | PipsPagerTests | [inline]
PipsPagerChangingPageTest() | PipsPagerTests | [inline]
PipsPagerInfinitePagesTest() | PipsPagerTests | [inline]
PipsPagerRTLDoesNotCrash() | PipsPagerTests | [inline]
PipsPagerWrapModeNavigation() | PipsPagerTests | [inline]
PipsPagerWrapModeNavigationButtonsHiddenInOnePageScenario() | PipsPagerTests | [inline]
PipsPagerWrapModeNavigationInfinitePages() | PipsPagerTests | [inline]
PreviousPageButtonChangingPageTest() | PipsPagerTests | [inline]
PreviousPageButtonVisibilityOptionsTest() | PipsPagerTests | [inline]
SelectPageInPager(int index) | PipsPagerTestBase | [inline, protected]
SetButtonVisibilityModeFunction(ButtonVisibilityMode mode) | PipsPagerTestBase | [protected]
SetNextPageButtonVisibilityMode(ButtonVisibilityMode mode) | PipsPagerTestBase | [inline, protected]
SetOrientation(OrientationType orientation) | PipsPagerTestBase | [inline, protected]
SetPreviousPageButtonVisibilityMode(ButtonVisibilityMode mode) | PipsPagerTestBase | [inline, protected]
SetWrapMode(WrapMode wrapMode) | PipsPagerTestBase | [inline, protected]
TestCleanup() | PipsPagerTests | [inline]
VerifyAxeScanPasses() | PipsPagerTests | [inline]
VerifyFocusedPageIndex(int index) | PipsPagerTestBase | [inline, protected]
VerifyNextPageButtonVisibility(Visibility expected) | PipsPagerTestBase | [inline, protected]
VerifyNumberOfPages(string numberOfPages) | PipsPagerTestBase | [inline, protected]
VerifyOrientationChanged(OrientationType orientation) | PipsPagerTestBase | [inline, protected]
VerifyPageButtonWithVisibilityModeSet(ButtonType btnType, ButtonVisibilityMode modeSet, bool isPagerInFocus=false) | PipsPagerTestBase | [inline, protected]
VerifySelectedFocusedIndex(int index) | PipsPagerTestBase | [inline, protected]
VerifySelectedPageIndex(int expectedPage) | PipsPagerTestBase | [inline, protected]
WrapMode enum name | PipsPagerTestBase |
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TestControl Member List

This is the complete list of members for TestControl, including all inherited members.
OnCreateAutomationPeer() TestControl [inline, protected]
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarStencilButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarStencilButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarStencilButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarStencilButton)
00012 }
00013
00014 #include "InkToolBarStencilButton.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarStencilButtonProperties::s_IsProtractorItemVisibleProperty{ nullptr };
00017 GlobalDependencyProperty InkToolBarStencilButtonProperties::s_IsRulerItemVisibleProperty{ nullptr };
00018 GlobalDependencyProperty InkToolBarStencilButtonProperties::s_ProtractorProperty{ nullptr };
00019 GlobalDependencyProperty InkToolBarStencilButtonProperties::s_RulerProperty{ nullptr };
00020 GlobalDependencyProperty InkToolBarStencilButtonProperties::s_SelectedStencilProperty{ nullptr };
00021
00022 InkToolBarStencilButtonProperties::InkToolBarStencilButtonProperties()
00023 {
00024     EnsureProperties();
00025 }
00026
00027 void InkToolBarStencilButtonProperties::EnsureProperties()
00028 {
00029     InkToolBarMenuButton::EnsureProperties();
00030     if (!s_IsProtractorItemVisibleProperty)
00031     {
00032         s_IsProtractorItemVisibleProperty =
00033             InitializeDependencyProperty(
00034                 L"IsProtractorItemVisible",
00035                 winrt::name_of<bool>(),
00036                 winrt::name_of<winrt::InkToolBarStencilButton>(),
00037                 false /* isAttached */,
00038                 ValueHelper<bool>::BoxedDefaultValue(),
00039                 nullptr);
00040     }
00041     if (!s_IsRulerItemVisibleProperty)
00042     {
00043         s_IsRulerItemVisibleProperty =
00044             InitializeDependencyProperty(
00045                 L"IsRulerItemVisible",
00046                 winrt::name_of<bool>(),
00047                 winrt::name_of<winrt::InkToolBarStencilButton>(),
00048                 false /* isAttached */,
00049                 ValueHelper<bool>::BoxedDefaultValue(),
00050                 nullptr);
00051     }
00052     if (!s_ProtractorProperty)
00053     {
00054         s_ProtractorProperty =
00055             InitializeDependencyProperty(
00056                 L"Protractor",
00057                 winrt::name_of<winrt::InkPresenterProtractor>(),
00058                 winrt::name_of<winrt::InkToolBarStencilButton>(),
00059                 false /* isAttached */,
00060                 ValueHelper<winrt::InkPresenterProtractor>::BoxedDefaultValue(),
00061                 nullptr);
00062     }
00063     if (!s_RulerProperty)
00064     {
00065         s_RulerProperty =
00066             InitializeDependencyProperty(
00067                 L"Ruler",
00068                 winrt::name_of<winrt::InkPresenterRuler>(),
00069                 winrt::name_of<winrt::InkToolBarStencilButton>(),
00070                 false /* isAttached */,
00071                 ValueHelper<winrt::InkPresenterRuler>::BoxedDefaultValue(),
00072                 nullptr);
00073     }
00074     if (!s_SelectedStencilProperty)
00075     {
00076         s_SelectedStencilProperty =
00077             InitializeDependencyProperty(
00078                 L"SelectedStencil",
00079                 winrt::name_of<winrt::InkToolBarStencilKind>(),
00080                 winrt::name_of<winrt::InkToolBarStencilButton>(),
00081                 false /* isAttached */,
00082                 ValueHelper<winrt::InkToolBarStencilKind>::BoxedDefaultValue(),
00083                 nullptr);
00084     }
00085 }
00086
00087 void InkToolBarStencilButtonProperties::ClearProperties()
00088 {
00089     s_IsProtractorItemVisibleProperty = nullptr;
00090     s_IsRulerItemVisibleProperty = nullptr;
00091     s_ProtractorProperty = nullptr;
00092     s_RulerProperty = nullptr;
00093     s_SelectedStencilProperty = nullptr;
00094     InkToolBarMenuButton::ClearProperties();
00095 }
00096
00097 void InkToolBarStencilButtonProperties::IsProtractorItemVisible(bool value)
00098 {
00099     [[gsl::suppress(con)]]
00100     {
00101     static_cast<InkToolBarStencilButton*>(this)->SetValue(s_IsProtractorItemVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00102     }
00103 }
00104
00105 bool InkToolBarStencilButtonProperties::IsProtractorItemVisible()
00106 {
00107     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_IsProtractorItemVisibleProperty));
00108 }
00109
00110 void InkToolBarStencilButtonProperties::IsRulerItemVisible(bool value)
00111 {
00112     [[gsl::suppress(con)]]
00113     {
00114     static_cast<InkToolBarStencilButton*>(this)->SetValue(s_IsRulerItemVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00115     }
00116 }
00117
00118 bool InkToolBarStencilButtonProperties::IsRulerItemVisible()
00119 {
00120     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_IsRulerItemVisibleProperty));
00121 }
00122
00123 void InkToolBarStencilButtonProperties::Protractor(winrt::InkPresenterProtractor const& value)
00124 {
00125     [[gsl::suppress(con)]]
00126     {
00127     static_cast<InkToolBarStencilButton*>(this)->SetValue(s_ProtractorProperty, ValueHelper<winrt::InkPresenterProtractor>::BoxValueIfNecessary(value));
00128     }
00129 }
00130
00131 winrt::InkPresenterProtractor InkToolBarStencilButtonProperties::Protractor()
00132 {
00133     return ValueHelper<winrt::InkPresenterProtractor>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_ProtractorProperty));
00134 }
00135
00136 void InkToolBarStencilButtonProperties::Ruler(winrt::InkPresenterRuler const& value)
00137 {
00138     [[gsl::suppress(con)]]
00139     {
00140     static_cast<InkToolBarStencilButton*>(this)->SetValue(s_RulerProperty, ValueHelper<winrt::InkPresenterRuler>::BoxValueIfNecessary(value));
00141     }
00142 }
00143
00144 winrt::InkPresenterRuler InkToolBarStencilButtonProperties::Ruler()
00145 {
00146     return ValueHelper<winrt::InkPresenterRuler>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_RulerProperty));
00147 }
00148
00149 void InkToolBarStencilButtonProperties::SelectedStencil(winrt::InkToolBarStencilKind const& value)
00150 {
00151     [[gsl::suppress(con)]]
00152     {
00153     static_cast<InkToolBarStencilButton*>(this)->SetValue(s_SelectedStencilProperty, ValueHelper<winrt::InkToolBarStencilKind>::BoxValueIfNecessary(value));
00154     }
00155 }
00156
00157 winrt::InkToolBarStencilKind InkToolBarStencilButtonProperties::SelectedStencil()
00158 {
00159     return ValueHelper<winrt::InkToolBarStencilKind>::CastOrUnbox(static_cast<InkToolBarStencilButton*>(this)->GetValue(s_SelectedStencilProperty));
00160 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

HashMap< K, V >::Iterator Member List

This is the complete list of members for HashMap< K, V >::Iterator, including all inherited members.
abi_enter() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
CheckMutationCount() const | HashMap< K, V >::Iterator | [inline, private]
CheckThread() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
Current() | HashMap< K, V >::Iterator | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< Iterator > &&self) noexcept | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
final_release(std::unique_ptr< Iterator > &&self) | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline, static]
GetBase() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
GetInner() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
GetMany(winrt::array_view< KVP > values) | HashMap< K, V >::Iterator | [inline]
HasCurrent() | HashMap< K, V >::Iterator | [inline]
IsOnThread() | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
Iterator(HashMap< K, V > *map) | HashMap< K, V >::Iterator | [inline]
m_expectedMutationCount | HashMap< K, V >::Iterator | [private]
m_iterator | HashMap< K, V >::Iterator | [private]
MoveNext() | HashMap< K, V >::Iterator | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< Iterator, reference_tracker_implements_t< winrt::IIterator< KVP > >::type > | [inline]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ValueHelper< T, Enable > Member List

This is the complete list of members for ValueHelper< T, Enable >, including all inherited members.
BoxedDefaultValue() | ValueHelper< T, Enable > | [inline, static]
BoxValueIfNecessary(T const &value) | ValueHelper< T, Enable > | [inline, static]
CastOrUnbox(winrt::IInspectable const &value) | ValueHelper< T, Enable > | [inline, static]
GetDefaultValue() | ValueHelper< T, Enable > | [inline, static]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewAnimationPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewAnimationPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     public sealed partial class NavigationViewAnimationPage : TestPage
00011     {
00012         public NavigationViewAnimationPage()
00013         {
00014             this.InitializeComponent();
00015         }
00016         private void NavView_OnItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
00017         {
00018             NavigateToPage(args.InvokedItemContainer.Tag);
00019         }
00020
00021         private void NavigateToPage(object pageTag)
00022         {
00023             if (pageTag == null)
00024             {
00025                 pageTag = "BlankPage1";
00026             }
00027             var pageName = "MUXControlsTestApp.NavigationView" + pageTag;
00028             var pageType = Type.GetType(pageName);
00029
00030             ContentFrame.Navigate(pageType);
00031         }
00032
00033         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00034         {
00035             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00036         }
00037     }
00038 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeItem Member List

This is the complete list of members for SwipeItem, including all inherited members.
abi_enter() | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
AttachEventHandlers(const winrt::AppBarButton &appBarButton) | SwipeItem | [private]
Background(winrt::Brush const &value) | SwipeItemProperties |
Background() | SwipeItemProperties |
BackgroundProperty() | SwipeItemProperties | [inline, static]
BehaviorOnInvoked(winrt::SwipeBehaviorOnInvoked const &value) | SwipeItemProperties |
BehaviorOnInvoked() | SwipeItemProperties |
BehaviorOnInvokedProperty() | SwipeItemProperties | [inline, static]
CheckThread() | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
ClearProperties() | SwipeItemProperties | [static]
Command(winrt::ICommand const &value) | SwipeItemProperties |
Command() | SwipeItemProperties |
CommandParameter(winrt::IInspectable const &value) | SwipeItemProperties |
CommandParameter() | SwipeItemProperties |
CommandParameterProperty() | SwipeItemProperties | [inline, static]
CommandProperty() | SwipeItemProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< SwipeItem > &&self) noexcept | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline, static]
EnsureProperties() | SwipeItemProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
final_release(std::unique_ptr< SwipeItem > &&self) | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline, static]
Foreground(winrt::Brush const &value) | SwipeItemProperties |
Foreground() | SwipeItemProperties |
ForegroundProperty() | SwipeItemProperties | [inline, static]
GenerateControl(const winrt::AppBarButton &appBarButton, const winrt::Style &swipeItemStyle) | SwipeItem |
GetBase() | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
GetInner() | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
IconSource(winrt::IconSource const &value) | SwipeItemProperties |
IconSource() | SwipeItemProperties |
IconSourceProperty() | SwipeItemProperties | [inline, static]
Invoked(winrt::TypedEventHandler< winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs > const &value) | SwipeItemProperties |
Invoked(winrt::event_token const &token) | SwipeItemProperties |
InvokeSwipe(const winrt::SwipeControl &content) | SwipeItem |
IsOnThread() | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
m_invokedEventSource | SwipeItemProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
OnBackgroundPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnBehaviorOnInvokedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnCommandChanged(const winrt::ICommand &oldCommand, const winrt::ICommand &newCommand) | SwipeItem | [private]
OnCommandParameterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnForegroundPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnItemTapped(const winrt::IInspectable &sender, const winrt::TappedRoutedEventArgs &args) | SwipeItem | [private]
OnPointerPressed(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | SwipeItem | [private]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | SwipeItem |
OnTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SwipeItem, winrt::implementation::SwipeItemT > | [inline]
s_BackgroundProperty | SwipeItemProperties | [static]
s_BehaviorOnInvokedProperty | SwipeItemProperties | [static]
s_CommandParameterProperty | SwipeItemProperties | [static]
s_CommandProperty | SwipeItemProperties | [static]
s_ForegroundProperty | SwipeItemProperties | [static]
s_IconSourceProperty | SwipeItemProperties | [static]
s_TextProperty | SwipeItemProperties | [static]
SwipeItem() | SwipeItem |
SwipeItemProperties() | SwipeItemProperties |
Text(winrt::hstring const &value) | SwipeItemProperties |
Text() | SwipeItemProperties |
TextProperty() | SwipeItemProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarHighlighterButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarHighlighterButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarHighlighterButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InkToolBarHighlighterButton)
00012 }
00013
00014 #include "InkToolBarHighlighterButton.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CustomNavigationViewItem Member List

This is the complete list of members for CustomNavigationViewItem, including all inherited members.
CustomNavigationViewItem() | CustomNavigationViewItem | [inline]
Text | CustomNavigationViewItem |
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControl.properties.cpp Source File

  • File List
  • File Members
  • Generated

PagerControl.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PagerControl.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(PagerControl)
00012 }
00013
00014 #include "PagerControl.g.cpp"
00015
00016 GlobalDependencyProperty PagerControlProperties::s_ButtonPanelAlwaysShowFirstLastPageIndexProperty{ nullptr };
00017 GlobalDependencyProperty PagerControlProperties::s_DisplayModeProperty{ nullptr };
00018 GlobalDependencyProperty PagerControlProperties::s_FirstButtonCommandProperty{ nullptr };
00019 GlobalDependencyProperty PagerControlProperties::s_FirstButtonStyleProperty{ nullptr };
00020 GlobalDependencyProperty PagerControlProperties::s_FirstButtonVisibilityProperty{ nullptr };
00021 GlobalDependencyProperty PagerControlProperties::s_LastButtonCommandProperty{ nullptr };
00022 GlobalDependencyProperty PagerControlProperties::s_LastButtonStyleProperty{ nullptr };
00023 GlobalDependencyProperty PagerControlProperties::s_LastButtonVisibilityProperty{ nullptr };
00024 GlobalDependencyProperty PagerControlProperties::s_NextButtonCommandProperty{ nullptr };
00025 GlobalDependencyProperty PagerControlProperties::s_NextButtonStyleProperty{ nullptr };
00026 GlobalDependencyProperty PagerControlProperties::s_NextButtonVisibilityProperty{ nullptr };
00027 GlobalDependencyProperty PagerControlProperties::s_NumberOfPagesProperty{ nullptr };
00028 GlobalDependencyProperty PagerControlProperties::s_PagerInputCommandProperty{ nullptr };
00029 GlobalDependencyProperty PagerControlProperties::s_PrefixTextProperty{ nullptr };
00030 GlobalDependencyProperty PagerControlProperties::s_PreviousButtonCommandProperty{ nullptr };
00031 GlobalDependencyProperty PagerControlProperties::s_PreviousButtonStyleProperty{ nullptr };
00032 GlobalDependencyProperty PagerControlProperties::s_PreviousButtonVisibilityProperty{ nullptr };
00033 GlobalDependencyProperty PagerControlProperties::s_SelectedPageIndexProperty{ nullptr };
00034 GlobalDependencyProperty PagerControlProperties::s_SuffixTextProperty{ nullptr };
00035 GlobalDependencyProperty PagerControlProperties::s_TemplateSettingsProperty{ nullptr };
00036
00037 PagerControlProperties::PagerControlProperties()
00038     : m_selectedIndexChangedEventSource{static_cast<PagerControl*>(this)}
00039 {
00040     EnsureProperties();
00041 }
00042
00043 void PagerControlProperties::EnsureProperties()
00044 {
00045     if (!s_ButtonPanelAlwaysShowFirstLastPageIndexProperty)
00046     {
00047         s_ButtonPanelAlwaysShowFirstLastPageIndexProperty =
00048             InitializeDependencyProperty(
00049                 L"ButtonPanelAlwaysShowFirstLastPageIndex",
00050                 winrt::name_of<bool>(),
00051                 winrt::name_of<winrt::PagerControl>(),
00052                 false /* isAttached */,
00053                 ValueHelper<bool>::BoxValueIfNecessary(true),
00054                 winrt::PropertyChangedCallback(&OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged));
00055     }
00056     if (!s_DisplayModeProperty)
00057     {
00058         s_DisplayModeProperty =
00059             InitializeDependencyProperty(
00060                 L"DisplayMode",
00061                 winrt::name_of<winrt::PagerControlDisplayMode>(),
00062                 winrt::name_of<winrt::PagerControl>(),
00063                 false /* isAttached */,
00064                 ValueHelper<winrt::PagerControlDisplayMode>::BoxedDefaultValue(),
00065                 winrt::PropertyChangedCallback(&OnDisplayModePropertyChanged));
00066     }
00067     if (!s_FirstButtonCommandProperty)
00068     {
00069         s_FirstButtonCommandProperty =
00070             InitializeDependencyProperty(
00071                 L"FirstButtonCommand",
00072                 winrt::name_of<winrt::ICommand>(),
00073                 winrt::name_of<winrt::PagerControl>(),
00074                 false /* isAttached */,
00075                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00076                 winrt::PropertyChangedCallback(&OnFirstButtonCommandPropertyChanged));
00077     }
00078     if (!s_FirstButtonStyleProperty)
00079     {
00080         s_FirstButtonStyleProperty =
00081             InitializeDependencyProperty(
00082                 L"FirstButtonStyle",
00083                 winrt::name_of<winrt::Style>(),
00084                 winrt::name_of<winrt::PagerControl>(),
00085                 false /* isAttached */,
00086                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00087                 winrt::PropertyChangedCallback(&OnFirstButtonStylePropertyChanged));
00088     }
00089     if (!s_FirstButtonVisibilityProperty)
00090     {
00091         s_FirstButtonVisibilityProperty =
00092             InitializeDependencyProperty(
00093                 L"FirstButtonVisibility",
00094                 winrt::name_of<winrt::PagerControlButtonVisibility>(),
00095                 winrt::name_of<winrt::PagerControl>(),
00096                 false /* isAttached */,
00097                 ValueHelper<winrt::PagerControlButtonVisibility>::BoxedDefaultValue(),
00098                 winrt::PropertyChangedCallback(&OnFirstButtonVisibilityPropertyChanged));
00099     }
00100     if (!s_LastButtonCommandProperty)
00101     {
00102         s_LastButtonCommandProperty =
00103             InitializeDependencyProperty(
00104                 L"LastButtonCommand",
00105                 winrt::name_of<winrt::ICommand>(),
00106                 winrt::name_of<winrt::PagerControl>(),
00107                 false /* isAttached */,
00108                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00109                 winrt::PropertyChangedCallback(&OnLastButtonCommandPropertyChanged));
00110     }
00111     if (!s_LastButtonStyleProperty)
00112     {
00113         s_LastButtonStyleProperty =
00114             InitializeDependencyProperty(
00115                 L"LastButtonStyle",
00116                 winrt::name_of<winrt::Style>(),
00117                 winrt::name_of<winrt::PagerControl>(),
00118                 false /* isAttached */,
00119                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00120                 winrt::PropertyChangedCallback(&OnLastButtonStylePropertyChanged));
00121     }
00122     if (!s_LastButtonVisibilityProperty)
00123     {
00124         s_LastButtonVisibilityProperty =
00125             InitializeDependencyProperty(
00126                 L"LastButtonVisibility",
00127                 winrt::name_of<winrt::PagerControlButtonVisibility>(),
00128                 winrt::name_of<winrt::PagerControl>(),
00129                 false /* isAttached */,
00130                 ValueHelper<winrt::PagerControlButtonVisibility>::BoxedDefaultValue(),
00131                 winrt::PropertyChangedCallback(&OnLastButtonVisibilityPropertyChanged));
00132     }
00133     if (!s_NextButtonCommandProperty)
00134     {
00135         s_NextButtonCommandProperty =
00136             InitializeDependencyProperty(
00137                 L"NextButtonCommand",
00138                 winrt::name_of<winrt::ICommand>(),
00139                 winrt::name_of<winrt::PagerControl>(),
00140                 false /* isAttached */,
00141                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00142                 winrt::PropertyChangedCallback(&OnNextButtonCommandPropertyChanged));
00143     }
00144     if (!s_NextButtonStyleProperty)
00145     {
00146         s_NextButtonStyleProperty =
00147             InitializeDependencyProperty(
00148                 L"NextButtonStyle",
00149                 winrt::name_of<winrt::Style>(),
00150                 winrt::name_of<winrt::PagerControl>(),
00151                 false /* isAttached */,
00152                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00153                 winrt::PropertyChangedCallback(&OnNextButtonStylePropertyChanged));
00154     }
00155     if (!s_NextButtonVisibilityProperty)
00156     {
00157         s_NextButtonVisibilityProperty =
00158             InitializeDependencyProperty(
00159                 L"NextButtonVisibility",
00160                 winrt::name_of<winrt::PagerControlButtonVisibility>(),
00161                 winrt::name_of<winrt::PagerControl>(),
00162                 false /* isAttached */,
00163                 ValueHelper<winrt::PagerControlButtonVisibility>::BoxedDefaultValue(),
00164                 winrt::PropertyChangedCallback(&OnNextButtonVisibilityPropertyChanged));
00165     }
00166     if (!s_NumberOfPagesProperty)
00167     {
00168         s_NumberOfPagesProperty =
00169             InitializeDependencyProperty(
00170                 L"NumberOfPages",
00171                 winrt::name_of<int>(),
00172                 winrt::name_of<winrt::PagerControl>(),
00173                 false /* isAttached */,
00174                 ValueHelper<int>::BoxValueIfNecessary(0),
00175                 winrt::PropertyChangedCallback(&OnNumberOfPagesPropertyChanged));
00176     }
00177     if (!s_PagerInputCommandProperty)
00178     {
00179         s_PagerInputCommandProperty =
00180             InitializeDependencyProperty(
00181                 L"PagerInputCommand",
00182                 winrt::name_of<winrt::ICommand>(),
00183                 winrt::name_of<winrt::PagerControl>(),
00184                 false /* isAttached */,
00185                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00186                 winrt::PropertyChangedCallback(&OnPagerInputCommandPropertyChanged));
00187     }
00188     if (!s_PrefixTextProperty)
00189     {
00190         s_PrefixTextProperty =
00191             InitializeDependencyProperty(
00192                 L"PrefixText",
00193                 winrt::name_of<winrt::hstring>(),
00194                 winrt::name_of<winrt::PagerControl>(),
00195                 false /* isAttached */,
00196                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00197                 winrt::PropertyChangedCallback(&OnPrefixTextPropertyChanged));
00198     }
00199     if (!s_PreviousButtonCommandProperty)
00200     {
00201         s_PreviousButtonCommandProperty =
00202             InitializeDependencyProperty(
00203                 L"PreviousButtonCommand",
00204                 winrt::name_of<winrt::ICommand>(),
00205                 winrt::name_of<winrt::PagerControl>(),
00206                 false /* isAttached */,
00207                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00208                 winrt::PropertyChangedCallback(&OnPreviousButtonCommandPropertyChanged));
00209     }
00210     if (!s_PreviousButtonStyleProperty)
00211     {
00212         s_PreviousButtonStyleProperty =
00213             InitializeDependencyProperty(
00214                 L"PreviousButtonStyle",
00215                 winrt::name_of<winrt::Style>(),
00216                 winrt::name_of<winrt::PagerControl>(),
00217                 false /* isAttached */,
00218                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00219                 winrt::PropertyChangedCallback(&OnPreviousButtonStylePropertyChanged));
00220     }
00221     if (!s_PreviousButtonVisibilityProperty)
00222     {
00223         s_PreviousButtonVisibilityProperty =
00224             InitializeDependencyProperty(
00225                 L"PreviousButtonVisibility",
00226                 winrt::name_of<winrt::PagerControlButtonVisibility>(),
00227                 winrt::name_of<winrt::PagerControl>(),
00228                 false /* isAttached */,
00229                 ValueHelper<winrt::PagerControlButtonVisibility>::BoxedDefaultValue(),
00230                 winrt::PropertyChangedCallback(&OnPreviousButtonVisibilityPropertyChanged));
00231     }
00232     if (!s_SelectedPageIndexProperty)
00233     {
00234         s_SelectedPageIndexProperty =
00235             InitializeDependencyProperty(
00236                 L"SelectedPageIndex",
00237                 winrt::name_of<int>(),
00238                 winrt::name_of<winrt::PagerControl>(),
00239                 false /* isAttached */,
00240                 ValueHelper<int>::BoxValueIfNecessary(0),
00241                 winrt::PropertyChangedCallback(&OnSelectedPageIndexPropertyChanged));
00242     }
00243     if (!s_SuffixTextProperty)
00244     {
00245         s_SuffixTextProperty =
00246             InitializeDependencyProperty(
00247                 L"SuffixText",
00248                 winrt::name_of<winrt::hstring>(),
00249                 winrt::name_of<winrt::PagerControl>(),
00250                 false /* isAttached */,
00251                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00252                 winrt::PropertyChangedCallback(&OnSuffixTextPropertyChanged));
00253     }
00254     if (!s_TemplateSettingsProperty)
00255     {
00256         s_TemplateSettingsProperty =
00257             InitializeDependencyProperty(
00258                 L"TemplateSettings",
00259                 winrt::name_of<winrt::PagerControlTemplateSettings>(),
00260                 winrt::name_of<winrt::PagerControl>(),
00261                 false /* isAttached */,
00262                 ValueHelper<winrt::PagerControlTemplateSettings>::BoxedDefaultValue(),
00263                 winrt::PropertyChangedCallback(&OnTemplateSettingsPropertyChanged));
00264     }
00265 }
00266
00267 void PagerControlProperties::ClearProperties()
00268 {
00269     s_ButtonPanelAlwaysShowFirstLastPageIndexProperty = nullptr;
00270     s_DisplayModeProperty = nullptr;
00271     s_FirstButtonCommandProperty = nullptr;
00272     s_FirstButtonStyleProperty = nullptr;
00273     s_FirstButtonVisibilityProperty = nullptr;
00274     s_LastButtonCommandProperty = nullptr;
00275     s_LastButtonStyleProperty = nullptr;
00276     s_LastButtonVisibilityProperty = nullptr;
00277     s_NextButtonCommandProperty = nullptr;
00278     s_NextButtonStyleProperty = nullptr;
00279     s_NextButtonVisibilityProperty = nullptr;
00280     s_NumberOfPagesProperty = nullptr;
00281     s_PagerInputCommandProperty = nullptr;
00282     s_PrefixTextProperty = nullptr;
00283     s_PreviousButtonCommandProperty = nullptr;
00284     s_PreviousButtonStyleProperty = nullptr;
00285     s_PreviousButtonVisibilityProperty = nullptr;
00286     s_SelectedPageIndexProperty = nullptr;
00287     s_SuffixTextProperty = nullptr;
00288     s_TemplateSettingsProperty = nullptr;
00289 }
00290
00291 void PagerControlProperties::OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged(
00292     winrt::DependencyObject const& sender,
00293     winrt::DependencyPropertyChangedEventArgs const& args)
00294 {
00295     auto owner = sender.as<winrt::PagerControl>();
00296     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00297 }
00298
00299 void PagerControlProperties::OnDisplayModePropertyChanged(
00300     winrt::DependencyObject const& sender,
00301     winrt::DependencyPropertyChangedEventArgs const& args)
00302 {
00303     auto owner = sender.as<winrt::PagerControl>();
00304     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00305 }
00306
00307 void PagerControlProperties::OnFirstButtonCommandPropertyChanged(
00308     winrt::DependencyObject const& sender,
00309     winrt::DependencyPropertyChangedEventArgs const& args)
00310 {
00311     auto owner = sender.as<winrt::PagerControl>();
00312     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00313 }
00314
00315 void PagerControlProperties::OnFirstButtonStylePropertyChanged(
00316     winrt::DependencyObject const& sender,
00317     winrt::DependencyPropertyChangedEventArgs const& args)
00318 {
00319     auto owner = sender.as<winrt::PagerControl>();
00320     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00321 }
00322
00323 void PagerControlProperties::OnFirstButtonVisibilityPropertyChanged(
00324     winrt::DependencyObject const& sender,
00325     winrt::DependencyPropertyChangedEventArgs const& args)
00326 {
00327     auto owner = sender.as<winrt::PagerControl>();
00328     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00329 }
00330
00331 void PagerControlProperties::OnLastButtonCommandPropertyChanged(
00332     winrt::DependencyObject const& sender,
00333     winrt::DependencyPropertyChangedEventArgs const& args)
00334 {
00335     auto owner = sender.as<winrt::PagerControl>();
00336     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00337 }
00338
00339 void PagerControlProperties::OnLastButtonStylePropertyChanged(
00340     winrt::DependencyObject const& sender,
00341     winrt::DependencyPropertyChangedEventArgs const& args)
00342 {
00343     auto owner = sender.as<winrt::PagerControl>();
00344     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00345 }
00346
00347 void PagerControlProperties::OnLastButtonVisibilityPropertyChanged(
00348     winrt::DependencyObject const& sender,
00349     winrt::DependencyPropertyChangedEventArgs const& args)
00350 {
00351     auto owner = sender.as<winrt::PagerControl>();
00352     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00353 }
00354
00355 void PagerControlProperties::OnNextButtonCommandPropertyChanged(
00356     winrt::DependencyObject const& sender,
00357     winrt::DependencyPropertyChangedEventArgs const& args)
00358 {
00359     auto owner = sender.as<winrt::PagerControl>();
00360     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00361 }
00362
00363 void PagerControlProperties::OnNextButtonStylePropertyChanged(
00364     winrt::DependencyObject const& sender,
00365     winrt::DependencyPropertyChangedEventArgs const& args)
00366 {
00367     auto owner = sender.as<winrt::PagerControl>();
00368     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00369 }
00370
00371 void PagerControlProperties::OnNextButtonVisibilityPropertyChanged(
00372     winrt::DependencyObject const& sender,
00373     winrt::DependencyPropertyChangedEventArgs const& args)
00374 {
00375     auto owner = sender.as<winrt::PagerControl>();
00376     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00377 }
00378
00379 void PagerControlProperties::OnNumberOfPagesPropertyChanged(
00380     winrt::DependencyObject const& sender,
00381     winrt::DependencyPropertyChangedEventArgs const& args)
00382 {
00383     auto owner = sender.as<winrt::PagerControl>();
00384     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00385 }
00386
00387 void PagerControlProperties::OnPagerInputCommandPropertyChanged(
00388     winrt::DependencyObject const& sender,
00389     winrt::DependencyPropertyChangedEventArgs const& args)
00390 {
00391     auto owner = sender.as<winrt::PagerControl>();
00392     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00393 }
00394
00395 void PagerControlProperties::OnPrefixTextPropertyChanged(
00396     winrt::DependencyObject const& sender,
00397     winrt::DependencyPropertyChangedEventArgs const& args)
00398 {
00399     auto owner = sender.as<winrt::PagerControl>();
00400     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00401 }
00402
00403 void PagerControlProperties::OnPreviousButtonCommandPropertyChanged(
00404     winrt::DependencyObject const& sender,
00405     winrt::DependencyPropertyChangedEventArgs const& args)
00406 {
00407     auto owner = sender.as<winrt::PagerControl>();
00408     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00409 }
00410
00411 void PagerControlProperties::OnPreviousButtonStylePropertyChanged(
00412     winrt::DependencyObject const& sender,
00413     winrt::DependencyPropertyChangedEventArgs const& args)
00414 {
00415     auto owner = sender.as<winrt::PagerControl>();
00416     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00417 }
00418
00419 void PagerControlProperties::OnPreviousButtonVisibilityPropertyChanged(
00420     winrt::DependencyObject const& sender,
00421     winrt::DependencyPropertyChangedEventArgs const& args)
00422 {
00423     auto owner = sender.as<winrt::PagerControl>();
00424     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00425 }
00426
00427 void PagerControlProperties::OnSelectedPageIndexPropertyChanged(
00428     winrt::DependencyObject const& sender,
00429     winrt::DependencyPropertyChangedEventArgs const& args)
00430 {
00431     auto owner = sender.as<winrt::PagerControl>();
00432     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00433 }
00434
00435 void PagerControlProperties::OnSuffixTextPropertyChanged(
00436     winrt::DependencyObject const& sender,
00437     winrt::DependencyPropertyChangedEventArgs const& args)
00438 {
00439     auto owner = sender.as<winrt::PagerControl>();
00440     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00441 }
00442
00443 void PagerControlProperties::OnTemplateSettingsPropertyChanged(
00444     winrt::DependencyObject const& sender,
00445     winrt::DependencyPropertyChangedEventArgs const& args)
00446 {
00447     auto owner = sender.as<winrt::PagerControl>();
00448     winrt::get_self<PagerControl>(owner)->OnPropertyChanged(args);
00449 }
00450
00451 void PagerControlProperties::ButtonPanelAlwaysShowFirstLastPageIndex(bool value)
00452 {
00453     [[gsl::suppress(con)]]
00454     {
00455     static_cast<PagerControl*>(this)->SetValue(s_ButtonPanelAlwaysShowFirstLastPageIndexProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00456     }
00457 }
00458
00459 bool PagerControlProperties::ButtonPanelAlwaysShowFirstLastPageIndex()
00460 {
00461     return ValueHelper<bool>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_ButtonPanelAlwaysShowFirstLastPageIndexProperty));
00462 }
00463
00464 void PagerControlProperties::DisplayMode(winrt::PagerControlDisplayMode const& value)
00465 {
00466     [[gsl::suppress(con)]]
00467     {
00468     static_cast<PagerControl*>(this)->SetValue(s_DisplayModeProperty, ValueHelper<winrt::PagerControlDisplayMode>::BoxValueIfNecessary(value));
00469     }
00470 }
00471
00472 winrt::PagerControlDisplayMode PagerControlProperties::DisplayMode()
00473 {
00474     return ValueHelper<winrt::PagerControlDisplayMode>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_DisplayModeProperty));
00475 }
00476
00477 void PagerControlProperties::FirstButtonCommand(winrt::ICommand const& value)
00478 {
00479     [[gsl::suppress(con)]]
00480     {
00481     static_cast<PagerControl*>(this)->SetValue(s_FirstButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00482     }
00483 }
00484
00485 winrt::ICommand PagerControlProperties::FirstButtonCommand()
00486 {
00487     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_FirstButtonCommandProperty));
00488 }
00489
00490 void PagerControlProperties::FirstButtonStyle(winrt::Style const& value)
00491 {
00492     [[gsl::suppress(con)]]
00493     {
00494     static_cast<PagerControl*>(this)->SetValue(s_FirstButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00495     }
00496 }
00497
00498 winrt::Style PagerControlProperties::FirstButtonStyle()
00499 {
00500     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_FirstButtonStyleProperty));
00501 }
00502
00503 void PagerControlProperties::FirstButtonVisibility(winrt::PagerControlButtonVisibility const& value)
00504 {
00505     [[gsl::suppress(con)]]
00506     {
00507     static_cast<PagerControl*>(this)->SetValue(s_FirstButtonVisibilityProperty, ValueHelper<winrt::PagerControlButtonVisibility>::BoxValueIfNecessary(value));
00508     }
00509 }
00510
00511 winrt::PagerControlButtonVisibility PagerControlProperties::FirstButtonVisibility()
00512 {
00513     return ValueHelper<winrt::PagerControlButtonVisibility>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_FirstButtonVisibilityProperty));
00514 }
00515
00516 void PagerControlProperties::LastButtonCommand(winrt::ICommand const& value)
00517 {
00518     [[gsl::suppress(con)]]
00519     {
00520     static_cast<PagerControl*>(this)->SetValue(s_LastButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00521     }
00522 }
00523
00524 winrt::ICommand PagerControlProperties::LastButtonCommand()
00525 {
00526     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_LastButtonCommandProperty));
00527 }
00528
00529 void PagerControlProperties::LastButtonStyle(winrt::Style const& value)
00530 {
00531     [[gsl::suppress(con)]]
00532     {
00533     static_cast<PagerControl*>(this)->SetValue(s_LastButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00534     }
00535 }
00536
00537 winrt::Style PagerControlProperties::LastButtonStyle()
00538 {
00539     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_LastButtonStyleProperty));
00540 }
00541
00542 void PagerControlProperties::LastButtonVisibility(winrt::PagerControlButtonVisibility const& value)
00543 {
00544     [[gsl::suppress(con)]]
00545     {
00546     static_cast<PagerControl*>(this)->SetValue(s_LastButtonVisibilityProperty, ValueHelper<winrt::PagerControlButtonVisibility>::BoxValueIfNecessary(value));
00547     }
00548 }
00549
00550 winrt::PagerControlButtonVisibility PagerControlProperties::LastButtonVisibility()
00551 {
00552     return ValueHelper<winrt::PagerControlButtonVisibility>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_LastButtonVisibilityProperty));
00553 }
00554
00555 void PagerControlProperties::NextButtonCommand(winrt::ICommand const& value)
00556 {
00557     [[gsl::suppress(con)]]
00558     {
00559     static_cast<PagerControl*>(this)->SetValue(s_NextButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00560     }
00561 }
00562
00563 winrt::ICommand PagerControlProperties::NextButtonCommand()
00564 {
00565     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_NextButtonCommandProperty));
00566 }
00567
00568 void PagerControlProperties::NextButtonStyle(winrt::Style const& value)
00569 {
00570     [[gsl::suppress(con)]]
00571     {
00572     static_cast<PagerControl*>(this)->SetValue(s_NextButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00573     }
00574 }
00575
00576 winrt::Style PagerControlProperties::NextButtonStyle()
00577 {
00578     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_NextButtonStyleProperty));
00579 }
00580
00581 void PagerControlProperties::NextButtonVisibility(winrt::PagerControlButtonVisibility const& value)
00582 {
00583     [[gsl::suppress(con)]]
00584     {
00585     static_cast<PagerControl*>(this)->SetValue(s_NextButtonVisibilityProperty, ValueHelper<winrt::PagerControlButtonVisibility>::BoxValueIfNecessary(value));
00586     }
00587 }
00588
00589 winrt::PagerControlButtonVisibility PagerControlProperties::NextButtonVisibility()
00590 {
00591     return ValueHelper<winrt::PagerControlButtonVisibility>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_NextButtonVisibilityProperty));
00592 }
00593
00594 void PagerControlProperties::NumberOfPages(int value)
00595 {
00596     [[gsl::suppress(con)]]
00597     {
00598     static_cast<PagerControl*>(this)->SetValue(s_NumberOfPagesProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00599     }
00600 }
00601
00602 int PagerControlProperties::NumberOfPages()
00603 {
00604     return ValueHelper<int>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_NumberOfPagesProperty));
00605 }
00606
00607 void PagerControlProperties::PagerInputCommand(winrt::ICommand const& value)
00608 {
00609     [[gsl::suppress(con)]]
00610     {
00611     static_cast<PagerControl*>(this)->SetValue(s_PagerInputCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00612     }
00613 }
00614
00615 winrt::ICommand PagerControlProperties::PagerInputCommand()
00616 {
00617     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_PagerInputCommandProperty));
00618 }
00619
00620 void PagerControlProperties::PrefixText(winrt::hstring const& value)
00621 {
00622     [[gsl::suppress(con)]]
00623     {
00624     static_cast<PagerControl*>(this)->SetValue(s_PrefixTextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00625     }
00626 }
00627
00628 winrt::hstring PagerControlProperties::PrefixText()
00629 {
00630     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_PrefixTextProperty));
00631 }
00632
00633 void PagerControlProperties::PreviousButtonCommand(winrt::ICommand const& value)
00634 {
00635     [[gsl::suppress(con)]]
00636     {
00637     static_cast<PagerControl*>(this)->SetValue(s_PreviousButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00638     }
00639 }
00640
00641 winrt::ICommand PagerControlProperties::PreviousButtonCommand()
00642 {
00643     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_PreviousButtonCommandProperty));
00644 }
00645
00646 void PagerControlProperties::PreviousButtonStyle(winrt::Style const& value)
00647 {
00648     [[gsl::suppress(con)]]
00649     {
00650     static_cast<PagerControl*>(this)->SetValue(s_PreviousButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00651     }
00652 }
00653
00654 winrt::Style PagerControlProperties::PreviousButtonStyle()
00655 {
00656     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_PreviousButtonStyleProperty));
00657 }
00658
00659 void PagerControlProperties::PreviousButtonVisibility(winrt::PagerControlButtonVisibility const& value)
00660 {
00661     [[gsl::suppress(con)]]
00662     {
00663     static_cast<PagerControl*>(this)->SetValue(s_PreviousButtonVisibilityProperty, ValueHelper<winrt::PagerControlButtonVisibility>::BoxValueIfNecessary(value));
00664     }
00665 }
00666
00667 winrt::PagerControlButtonVisibility PagerControlProperties::PreviousButtonVisibility()
00668 {
00669     return ValueHelper<winrt::PagerControlButtonVisibility>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_PreviousButtonVisibilityProperty));
00670 }
00671
00672 void PagerControlProperties::SelectedPageIndex(int value)
00673 {
00674     [[gsl::suppress(con)]]
00675     {
00676     static_cast<PagerControl*>(this)->SetValue(s_SelectedPageIndexProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00677     }
00678 }
00679
00680 int PagerControlProperties::SelectedPageIndex()
00681 {
00682     return ValueHelper<int>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_SelectedPageIndexProperty));
00683 }
00684
00685 void PagerControlProperties::SuffixText(winrt::hstring const& value)
00686 {
00687     [[gsl::suppress(con)]]
00688     {
00689     static_cast<PagerControl*>(this)->SetValue(s_SuffixTextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00690     }
00691 }
00692
00693 winrt::hstring PagerControlProperties::SuffixText()
00694 {
00695     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_SuffixTextProperty));
00696 }
00697
00698 void PagerControlProperties::TemplateSettings(winrt::PagerControlTemplateSettings const& value)
00699 {
00700     [[gsl::suppress(con)]]
00701     {
00702     static_cast<PagerControl*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::PagerControlTemplateSettings>::BoxValueIfNecessary(value));
00703     }
00704 }
00705
00706 winrt::PagerControlTemplateSettings PagerControlProperties::TemplateSettings()
00707 {
00708     return ValueHelper<winrt::PagerControlTemplateSettings>::CastOrUnbox(static_cast<PagerControl*>(this)->GetValue(s_TemplateSettingsProperty));
00709 }
00710
00711 winrt::event_token PagerControlProperties::SelectedIndexChanged(winrt::TypedEventHandler<winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs> const& value)
00712 {
00713     return m_selectedIndexChangedEventSource.add(value);
00714 }
00715
00716 void PagerControlProperties::SelectedIndexChanged(winrt::event_token const& token)
00717 {
00718     m_selectedIndexChangedEventSource.remove(token);
00719 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipCaseBundle Member List

This is the complete list of members for TeachingTipCaseBundle, including all inherited members.
TeachingTipCaseBundle() TeachingTipCaseBundle [inline]
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ExpanderTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

ExpanderTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ExpanderTemplateSettings.h"
00008
00009 GlobalDependencyProperty ExpanderTemplateSettingsProperties::s_ContentHeightProperty{ nullptr };
00010 GlobalDependencyProperty ExpanderTemplateSettingsProperties::s_NegativeContentHeightProperty{ nullptr };
00011
00012 ExpanderTemplateSettingsProperties::ExpanderTemplateSettingsProperties()
00013 {
00014     EnsureProperties();
00015 }
00016
00017 void ExpanderTemplateSettingsProperties::EnsureProperties()
00018 {
00019     if (!s_ContentHeightProperty)
00020     {
00021         s_ContentHeightProperty =
00022             InitializeDependencyProperty(
00023                 L"ContentHeight",
00024                 winrt::name_of<double>(),
00025                 winrt::name_of<winrt::ExpanderTemplateSettings>(),
00026                 false /* isAttached */,
00027                 ValueHelper<double>::BoxedDefaultValue(),
00028                 nullptr);
00029     }
00030     if (!s_NegativeContentHeightProperty)
00031     {
00032         s_NegativeContentHeightProperty =
00033             InitializeDependencyProperty(
00034                 L"NegativeContentHeight",
00035                 winrt::name_of<double>(),
00036                 winrt::name_of<winrt::ExpanderTemplateSettings>(),
00037                 false /* isAttached */,
00038                 ValueHelper<double>::BoxedDefaultValue(),
00039                 nullptr);
00040     }
00041 }
00042
00043 void ExpanderTemplateSettingsProperties::ClearProperties()
00044 {
00045     s_ContentHeightProperty = nullptr;
00046     s_NegativeContentHeightProperty = nullptr;
00047 }
00048
00049 void ExpanderTemplateSettingsProperties::ContentHeight(double value)
00050 {
00051     [[gsl::suppress(con)]]
00052     {
00053     static_cast<ExpanderTemplateSettings*>(this)->SetValue(s_ContentHeightProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00054     }
00055 }
00056
00057 double ExpanderTemplateSettingsProperties::ContentHeight()
00058 {
00059     return ValueHelper<double>::CastOrUnbox(static_cast<ExpanderTemplateSettings*>(this)->GetValue(s_ContentHeightProperty));
00060 }
00061
00062 void ExpanderTemplateSettingsProperties::NegativeContentHeight(double value)
00063 {
00064     [[gsl::suppress(con)]]
00065     {
00066     static_cast<ExpanderTemplateSettings*>(this)->SetValue(s_NegativeContentHeightProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00067     }
00068 }
00069
00070 double ExpanderTemplateSettingsProperties::NegativeContentHeight()
00071 {
00072     return ValueHelper<double>::CastOrUnbox(static_cast<ExpanderTemplateSettings*>(this)->GetValue(s_NegativeContentHeightProperty));
00073 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ZoomFactorChangeWithAdditionalVelocity.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ScrollPresenterTypeLogging.h"
00008 #include "ZoomFactorChangeWithAdditionalVelocity.h"
00009
00010 ZoomFactorChangeWithAdditionalVelocity::ZoomFactorChangeWithAdditionalVelocity(
00011     float zoomFactorVelocity,
00012     float anticipatedZoomFactorChange,
00013     winrt::IReference<winrt::float2> centerPoint,
00014     winrt::IReference<float> inertiaDecayRate) :
00015         m_zoomFactorVelocity(zoomFactorVelocity),
00016         m_anticipatedZoomFactorChange(anticipatedZoomFactorChange),
00017         m_centerPoint(centerPoint),
00018         m_inertiaDecayRate(inertiaDecayRate)
00019 {
00020     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_FLT_FLT, METH_NAME, this,
00021         zoomFactorVelocity, anticipatedZoomFactorChange);
00022     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this,
00023         TypeLogging::NullableFloat2ToString(centerPoint).c_str(), TypeLogging::NullableFloatToString(inertiaDecayRate).c_str());
00024 }
00025
00026 ZoomFactorChangeWithAdditionalVelocity::~ZoomFactorChangeWithAdditionalVelocity()
00027 {
00028     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00029 }
00030
00031 void ZoomFactorChangeWithAdditionalVelocity::ZoomFactorVelocity(float zoomFactorVelocity)
00032 {
00033     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_FLT, METH_NAME, this, zoomFactorVelocity);
00034
00035     m_zoomFactorVelocity = zoomFactorVelocity;
00036 }
00037
00038 void ZoomFactorChangeWithAdditionalVelocity::AnticipatedZoomFactorChange(float anticipatedZoomFactorChange)
00039 {
00040     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_FLT, METH_NAME, this, anticipatedZoomFactorChange);
00041
00042     m_anticipatedZoomFactorChange = anticipatedZoomFactorChange;
00043 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelper.h Source File

  • File List
  • File Members
  • Lights

MaterialHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "AcrylicTestApi.h"
00006
00007 //
00008 // The MaterialHelper class embodies the common policy that all the RS2 materials need to pay attention to.
00009 // In particular if any of the following are on, lighting and effects should be disabled:
00010 // * PowerManager.EnergySaverStatus == On
00011 // * !CompositionCapabilities.AreEffectsFast
00012 // * !UISettings.AdvancedEffectsEnabled
00013 //
00014 // This helper listens for all of those changes and calls back to the owner via OnMaterialPolicyStatusChanged().
00015 // The owner can call IsDisabledByMaterialPolicy() to see whether the material should be off according to this policy.
00016 //
00017 // NOTE: To make AreEffectsFast return true in a VM, set HKLM\Software\Microsoft\Windows\Dwm, value ForceEffectMode = dword:2
00018 //
00019 //
00020 // In RS5, as part of work to support Materials in XamlIslandRoots, the responsibility of managing and broadcasting fallback policy
00021 // was moved to Windows.UI.MaterialProperties (owned by Shell). Below is a comparison of legacy vs new MaterialHelper role:
00022 //
00023 // Legacy (MUX, pre-RS5):
00024 // (1) Notify brushes and lights of changes to fallback policy
00025 // (2) Provide single noise texture to brushes.
00026 // (3) Serve as host of assorted statics/helpers used by Fluent brushes & lights (example: hold AcrylicEffectFactory cache)
00027 // (4) Support RS2 workarounds where noise LIS becomes invalid and needs to be recreated
00028 //
00029 // New (WUXC, RS5+):
00030 // (1) Provide DPI-Scaled noise texture to brushes (two islands are on same thread, but can be on different monitor & DPI)
00031 // (2) Serve as host of assorted statics/helpers used by Fluent brushes & lights
00032 //
00033 // To support this, the class was factored into MaterialHelperBase (shared functionality), and conditionally compiled
00034 // derived MaterialHelper (New vs legacy functionality).
00035
00036 class MaterialHelperBase :
00037     public winrt::implements<MaterialHelperBase, winrt::IInspectable>
00038 {
00039 public:
00040     static void SimulateDisabledByPolicy(bool value);
00041     static bool SimulateDisabledByPolicy();
00042
00043     static void IgnoreAreEffectsFast(bool value);
00044     static bool IgnoreAreEffectsFast();
00045
00046     static void OnRevealBrushConnected();
00047     static void OnRevealBrushDisconnected();
00048
00049     static void TrackRevealLightsToRemove(const winrt::IVector<winrt::XamlLight>& lights, const std::vector<winrt::XamlLight>& revealLightsToRemove);
00050
00051     static winrt::CompositionEffectFactory GetOrCreateAcrylicBrushCompositionEffectFactoryFromCache(
00052         const winrt::Compositor& compositor,
00053         bool shouldBrushBeOpaque,
00054         bool useCrossFadeEffect,
00055         bool useCache,
00056         std::function<winrt::CompositionEffectFactory()> cacheMissingCallback);
00057
00058     static winrt::CompositionEffectFactory GetOrCreateRevealBrushCompositionEffectFactoryFromCache(
00059         bool isBorder,
00060         bool isInverted,
00061         bool hasBaseColor,
00062         std::function<winrt::CompositionEffectFactory()> cacheMissingCallback);
00063
00064     template <typename T> static void LightPolicyChangedHelper(T* instance, bool isDisabledByMaterialPolicy);
00065
00066     // Number of connected RevealBrushes in the tree (i.e. # of brushes that need lights)
00067     int m_revealBrushConnectedCount{};
00068     std::vector<std::pair<winrt::IVector<winrt::XamlLight>, std::vector<winrt::XamlLight>>> m_revealLightsToRemove;
00069
00070
00071     enum AcrylicBrushCacheHelperParam
00072     {
00073         ShouldBrushBeOpaque = 1,
00074         UseCrossFadeEffect = 4,
00075         // If you add more value in, please update MaxCacheSize too
00076         MaxCacheSize = 8
00077     };
00078
00079     enum class RevealBrushCacheFlags
00080     {
00081         IsBorder = 1,
00082         IsInverted = 2,
00083         HasBaseColor = 4,
00084         MaxCacheSize = 8,
00085     };
00086
00087     // Acrylic Brush
00088     static int constexpr BuildAcrylicBrushCompositionEffectFactoryKey(bool shouldBrushBeOpaque, bool useCrossFadeEffect);
00089     void AssertUniqueCompositorOrUpdate(const winrt::Compositor& compositor);
00090
00091     // cache storage for AcrylicBrushEffectory
00092     std::array<winrt::ICompositionEffectFactory, AcrylicBrushCacheHelperParam::MaxCacheSize>
00093         m_acrylicBrushCompositionEffectFactoryCache;
00094
00095     // This is only a defensive assert to check that Compositor should be the same in the same thread
00096     // m_acrylicCompositor is used keep a copy of it and then assert in each following query.
00097     // If Compositor is not the same, current implementation would return wrong EffectFactory
00098     winrt::Compositor m_acrylicCompositor{ nullptr };
00099
00100     // Reveal
00101     std::array<winrt::ICompositionEffectFactory, (size_t)RevealBrushCacheFlags::MaxCacheSize>
00102         m_revealBrushCompositionEffectFactoryCache;
00103
00104     winrt::CompositionSurfaceBrush CreateScaledBrush(int dpiScale);
00105
00106 protected:
00107     bool m_simulateDisabledByPolicy{};   // Test use only: Simulate that material is disabled by policy - for test use only
00108     bool m_ignoreAreEffectsFast{};       // Test use only: Ignore CompositionCapabilities.AreEffectFasts so tests can get Neon on VMs
00109
00110 };
00111
00112 // **************************************** MUX version of MaterialHelper *****************************************
00113 class MaterialHelper : public winrt::implements<MaterialHelper, MaterialHelperBase>
00114 {
00115 public:
00116     MaterialHelper();
00117     virtual ~MaterialHelper();
00118
00119     // Notifies listeners of all policy changes (including those due to test overrides).
00120     static winrt::event_token PolicyChanged(const std::function<void(const com_ptr<MaterialHelperBase>&, bool)>& handler);
00121     static void PolicyChanged(winrt::event_token removeToken);
00122
00123     static winrt::event_token NoiseChanged(const std::function<void(const com_ptr<MaterialHelperBase>&)>& handler);
00124     static void  NoiseChanged(winrt::event_token removeToken);
00125
00126     static winrt::CompositionSurfaceBrush GetNoiseBrush();
00127     static bool RS2IsSafeToCreateNoise();
00128
00129     void UpdatePolicyStatus(bool onUIThread = false);
00130
00131     static void SetShouldBeginAttachingLights(bool shouldBeginAttachingLights);
00132     static bool ShouldBeginAttachingLights();
00133     static void SetShouldContinueAttachingLights(bool shouldContinueAttachingLights);
00134     static bool ShouldContinueAttachingLights();
00135
00136     // Currently used only to work around Bug 18005612 on MUX + RS4 or earlier
00137     static bool IncrementAndCheckFailedToAttachLightsCount();
00138     static void ResetFailedToAttachLightsCount();
00139
00140 private:
00141     bool IsFullScreenOrTabletModeImpl();
00142     void EnsureCompositionCapabilities();
00143
00144     void OnEnergySaverStatusChanged(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/);
00145     void OnCompositionCapabilitiesChanged(const winrt::CompositionCapabilities& /*sender*/, const winrt::IInspectable& /*args*/);
00146     void OnUISettingsChanged(const winrt::UISettings& /*sender*/, const winrt::IInspectable& /*args*/);
00147     void OnDpiChanged(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00148
00149     void HookupDpiChangedHandler();
00150
00151     winrt::CompositionSurfaceBrush GetNoiseBrushImpl();
00152     void ResetNoise();
00153
00154     bool FailedToAttachLights();
00155
00156     bool m_isDisabledByMaterialPolicy{};
00157     float m_logicalDpi{};
00158
00159     winrt::PowerManager::EnergySaverStatusChanged_revoker m_energySaverStatusChangedRevoker{};
00160     winrt::event_token m_compositionCapabilitiesChangedToken{};
00161     winrt::event_token m_advancedEffectsEnabledChangedToken{};
00162     winrt::DisplayInformation::DpiChanged_revoker m_dpiChangedRevoker{};
00163     winrt::CoreWindow::VisibilityChanged_revoker m_visibilityChangedRevoker;
00164     winrt::CompositionCapabilities m_compositionCapabilities{ nullptr };
00165     winrt::IUISettings4 m_uiSettings{ nullptr };
00166     winrt::DispatcherQueue m_dispatcherQueue{ nullptr };
00167     winrt::CompositionSurfaceBrush m_noiseBrush{ nullptr };
00168     winrt::LoadedImageSurface m_noiseSurface{ nullptr };
00169
00170     // Cache these objects for the view as they are expensive to query via GetForCurrentView() calls.
00171     winrt::ViewManagement::ApplicationView m_applicationView{ nullptr };
00172     winrt::ViewManagement::UIViewSettings m_uiViewSettings{ nullptr };
00173
00174     bool m_wasWindowHidden{};                           // True if we've received CoreWindow.VisiblityChanged w/ Visibility == false
00175     bool m_waitingForRenderingAfterBecomingVisible{};   // True if we got a VisibilityChanged(True) and are waiting for a CT.Rendering to complete the RS2 workaround for Bug 11159685
00176     bool m_energySaverStatusChangedRevokerValid{};
00177     bool m_isFullScreenModeValid{};
00178     bool m_isFullScreenMode{};
00179
00180     event<std::function<void(com_ptr<MaterialHelperBase>, bool)>> m_policyChangedListeners;
00181     event<std::function<void(com_ptr<MaterialHelperBase>)>> m_noiseChangedListeners;
00182
00183     winrt::Window m_currentWindow{ nullptr };
00184
00185     // On RS4 and lower, Bug 18005612 is not fixed and we may need to re-try light attachment on CT.Rendering event.
00186     // This flag ensures that we only attempt to attach the lights once per tick (in case 1st reveal brush re-enters tree on same tick).
00187     bool m_shouldBeginAttachingLights{};
00188
00189     // On RS2 lights are attached in multiple steps. First they're attached to the RootScrollViewer, then on the next
00190     // CompositionTarget.Rendering event we open a popup, then on that popup's Opened event we attach lights to the popup
00191     // root. If at any point during this process, all reveal brushes leave the tree, then we should abort the process and
00192     // stop attaching lights, because we're going to remove all lights from the tree. Otherwise we'll leave the tree in a
00193     // partially-lit state because we added lights to the popup root after all lights were removed from the RootScrollViewer.
00194     // After that point, brushes under the RSV will not be lit, and we won't add lights to the RSV because we think lights
00195     // already exist in the tree.
00196     bool m_shouldContinueAttachingLights{};
00197
00198     // For Bug 18005612 workaround, we may ave to defer light attachment by a few ticks.
00199     // If we retry many more times but are not successful, something else is wrong - give up and log an assert in that case.
00200     static const unsigned int sc_maxFailedToAttachLightsCount = 100;
00201     unsigned int m_failedToAttachLightsCount{ 0 };
00202 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerTrace Member List

This is the complete list of members for ItemContainerTrace, including all inherited members.
s_IsDebugOutputEnabled | ItemContainerTrace | [static]
s_IsVerboseDebugOutputEnabled | ItemContainerTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ItemContainerTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | ItemContainerTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ItemContainerTrace | [inline, static]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTipTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

TeachingTipTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TeachingTipTemplateSettings.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TeachingTipTemplateSettings)
00012 }
00013
00014 #include "TeachingTipTemplateSettings.g.cpp"
00015
00016 GlobalDependencyProperty TeachingTipTemplateSettingsProperties::s_IconElementProperty{ nullptr };
00017 GlobalDependencyProperty TeachingTipTemplateSettingsProperties::s_TopLeftHighlightMarginProperty{ nullptr };
00018 GlobalDependencyProperty TeachingTipTemplateSettingsProperties::s_TopRightHighlightMarginProperty{ nullptr };
00019
00020 TeachingTipTemplateSettingsProperties::TeachingTipTemplateSettingsProperties()
00021 {
00022     EnsureProperties();
00023 }
00024
00025 void TeachingTipTemplateSettingsProperties::EnsureProperties()
00026 {
00027     if (!s_IconElementProperty)
00028     {
00029         s_IconElementProperty =
00030             InitializeDependencyProperty(
00031                 L"IconElement",
00032                 winrt::name_of<winrt::IconElement>(),
00033                 winrt::name_of<winrt::TeachingTipTemplateSettings>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
00036                 nullptr);
00037     }
00038     if (!s_TopLeftHighlightMarginProperty)
00039     {
00040         s_TopLeftHighlightMarginProperty =
00041             InitializeDependencyProperty(
00042                 L"TopLeftHighlightMargin",
00043                 winrt::name_of<winrt::Thickness>(),
00044                 winrt::name_of<winrt::TeachingTipTemplateSettings>(),
00045                 false /* isAttached */,
00046                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00047                 nullptr);
00048     }
00049     if (!s_TopRightHighlightMarginProperty)
00050     {
00051         s_TopRightHighlightMarginProperty =
00052             InitializeDependencyProperty(
00053                 L"TopRightHighlightMargin",
00054                 winrt::name_of<winrt::Thickness>(),
00055                 winrt::name_of<winrt::TeachingTipTemplateSettings>(),
00056                 false /* isAttached */,
00057                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00058                 nullptr);
00059     }
00060 }
00061
00062 void TeachingTipTemplateSettingsProperties::ClearProperties()
00063 {
00064     s_IconElementProperty = nullptr;
00065     s_TopLeftHighlightMarginProperty = nullptr;
00066     s_TopRightHighlightMarginProperty = nullptr;
00067 }
00068
00069 void TeachingTipTemplateSettingsProperties::IconElement(winrt::IconElement const& value)
00070 {
00071     [[gsl::suppress(con)]]
00072     {
00073     static_cast<TeachingTipTemplateSettings*>(this)->SetValue(s_IconElementProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
00074     }
00075 }
00076
00077 winrt::IconElement TeachingTipTemplateSettingsProperties::IconElement()
00078 {
00079     return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<TeachingTipTemplateSettings*>(this)->GetValue(s_IconElementProperty));
00080 }
00081
00082 void TeachingTipTemplateSettingsProperties::TopLeftHighlightMargin(winrt::Thickness const& value)
00083 {
00084     [[gsl::suppress(con)]]
00085     {
00086     static_cast<TeachingTipTemplateSettings*>(this)->SetValue(s_TopLeftHighlightMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00087     }
00088 }
00089
00090 winrt::Thickness TeachingTipTemplateSettingsProperties::TopLeftHighlightMargin()
00091 {
00092     return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<TeachingTipTemplateSettings*>(this)->GetValue(s_TopLeftHighlightMarginProperty));
00093 }
00094
00095 void TeachingTipTemplateSettingsProperties::TopRightHighlightMargin(winrt::Thickness const& value)
00096 {
00097     [[gsl::suppress(con)]]
00098     {
00099     static_cast<TeachingTipTemplateSettings*>(this)->SetValue(s_TopRightHighlightMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00100     }
00101 }
00102
00103 winrt::Thickness TeachingTipTemplateSettingsProperties::TopRightHighlightMargin()
00104 {
00105     return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<TeachingTipTemplateSettings*>(this)->GetValue(s_TopRightHighlightMarginProperty));
00106 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItem.h Source File

  • File List
  • File Members
  • TabView

TabViewItem.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "TabView.h"
00010 #include "TabViewItem.g.h"
00011 #include "TabViewItem.properties.h"
00012 #include "TabViewItemAutomationPeer.h"
00013 #include "TabViewItemTemplateSettings.h"
00014 #include "TabViewTrace.h"
00015 #include "PointerInfo.h"
00016
00017 #include "DispatcherHelper.h"
00018
00019 class TabViewItem :
00020     public ReferenceTracker<TabViewItem, winrt::implementation::TabViewItemT>,
00021     public TabViewItemProperties
00022 {
00023
00024 public:
00025     TabViewItem();
00026
00027     // IFrameworkElement
00028     void OnApplyTemplate();
00029     void OnLoaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00030     // IUIElement
00031     winrt::AutomationPeer OnCreateAutomationPeer();
00032
00033     void OnIsClosablePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00034     void OnHeaderPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00035     void OnIconSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00036
00037     void OnPointerEntered(winrt::PointerRoutedEventArgs const& args);
00038     void OnPointerExited(winrt::PointerRoutedEventArgs const& args);
00039     void OnPointerPressed(winrt::PointerRoutedEventArgs const& args);
00040     void OnPointerMoved(winrt::PointerRoutedEventArgs const& args);
00041     void OnPointerReleased(winrt::PointerRoutedEventArgs const& args);
00042     void OnPointerCanceled(winrt::PointerRoutedEventArgs const& args);
00043     void OnPointerCaptureLost(winrt::PointerRoutedEventArgs const& args);
00044
00045     // Control
00046     void OnKeyDown(winrt::KeyRoutedEventArgs const& e);
00047
00048     void RaiseRequestClose(TabViewTabCloseRequestedEventArgs const& args);
00049     void OnTabViewWidthModeChanged(winrt::TabViewWidthMode const& mode);
00050     void OnCloseButtonOverlayModeChanged(winrt::TabViewCloseButtonOverlayMode const& mode);
00051
00052     winrt::TabView GetParentTabView();
00053     void SetParentTabView(winrt::TabView const& tabView);
00054
00055     void StartBringTabIntoView();
00056
00057     winrt::Button GetCloseButton() const { return m_closeButton.get(); }
00058     bool IsBeingDragged() const { return m_isBeingDragged; }
00059
00060 private:
00061     void UpdateCloseButton();
00062     void UpdateForeground();
00063     void RequestClose();
00064     void OnHeaderChanged();
00065     void OnIconSourceChanged();
00066     void UpdateWidthModeVisualState();
00067     void UpdateDragDropVisualState(bool isVisible);
00068
00069     void OnSizeChanged(const winrt::IInspectable&, const winrt::SizeChangedEventArgs& args);
00070     void UpdateTabGeometry();
00071
00072     void OnCloseButtonClick(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00073
00074     void OnIsSelectedPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00075     void OnForegroundPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00076
00077     void OnTabDragStarting(const winrt::IInspectable& sender, const winrt::TabViewTabDragStartingEventArgs& args);
00078     void OnTabDragCompleted(const winrt::IInspectable& sender, const winrt::TabViewTabDragCompletedEventArgs& args);
00079
00080     void HideLeftAdjacentTabSeparator();
00081     void RestoreLeftAdjacentTabSeparatorVisibility();
00082
00083     void UpdateSelectedBackgroundPathTranslateTransform();
00084
00085     void BeginCheckingForDrag(const uint32_t& pointerId);
00086     void StopCheckingForDrag(const uint32_t& pointerId);
00087
00088     bool IsOutsideDragRectangle(const winrt::Point& testPoint, const winrt::Point& dragRectangleCenter);
00089     bool ShouldStartDrag(winrt::PointerRoutedEventArgs const& args);
00090
00091     bool m_hasPointerCapture = false;
00092     bool m_isMiddlePointerButtonPressed = false;
00093     bool m_isBeingDragged = false;
00094     bool m_isPointerOver = false;
00095     bool m_isCheckingforDrag = false;
00096     bool m_firstTimeSettingToolTip{ true };
00097
00098     tracker_ref<winrt::Path> m_selectedBackgroundPath{ this };
00099     tracker_ref<winrt::Button> m_closeButton{ this };
00100     tracker_ref<winrt::ToolTip> m_toolTip{ this };
00101     tracker_ref<winrt::ContentPresenter> m_headerContentPresenter{ this };
00102
00103     winrt::TabViewWidthMode m_tabViewWidthMode{ winrt::TabViewWidthMode::Equal };
00104     winrt::TabViewCloseButtonOverlayMode m_closeButtonOverlayMode{ winrt::TabViewCloseButtonOverlayMode::Auto };
00105
00106     winrt::FrameworkElement::SizeChanged_revoker m_selectedBackgroundPathSizeChangedRevoker{};
00107     winrt::ButtonBase::Click_revoker m_closeButtonClickRevoker{};
00108     winrt::TabView::TabDragStarting_revoker m_tabDragStartingRevoker{};
00109     winrt::TabView::TabDragCompleted_revoker m_tabDragCompletedRevoker{};
00110     winrt::Point m_lastPointerPressedPosition{};
00111
00112     winrt::weak_ref<winrt::TabView> m_parentTabView{ nullptr };
00113
00114     DispatcherHelper m_dispatcherHelper{ *this };
00115
00116     uint32_t m_dragPointerId{ 0 };
00117
00118     double c_tabViewItemMouseDragThresholdMultiplier{ 2.0 };
00119     static constexpr auto c_overlayCornerRadiusKey = L"OverlayCornerRadius"sv;
00120     static constexpr int c_targetRectWidthIncrement = 2;
00121
00122     static constexpr std::wstring_view s_dragDropVisualVisibleStateName{ L"DragDropVisualVisible"sv };
00123     static constexpr std::wstring_view s_dragDropVisualNotVisibleStateName{ L"DragDropVisualNotVisible"sv };
00124     static constexpr std::wstring_view s_closeButtonCollapsedStateName{ L"CloseButtonCollapsed"sv };
00125     static constexpr std::wstring_view s_closeButtonVisibleStateName{ L"CloseButtonVisible"sv };
00126     static constexpr std::wstring_view s_compactStateName{ L"Compact"sv };
00127     static constexpr std::wstring_view s_standardWidthStateName{ L"StandardWidth"sv };
00128     static constexpr std::wstring_view s_iconStateName{ L"Icon"sv };
00129     static constexpr std::wstring_view s_noIconStateName{ L"NoIcon"sv };
00130     static constexpr std::wstring_view s_foregroundSetStateName{ L"ForegroundNotSet"sv };
00131     static constexpr std::wstring_view s_foregroundNotSetStateName{ L"ForegroundSet"sv };
00132     static constexpr std::wstring_view s_selectedBackgroundPathName{ L"SelectedBackgroundPath" };
00133     static constexpr std::wstring_view s_contentPresenterName{ L"ContentPresenter" };
00134     static constexpr std::wstring_view s_closeButtonName{ L"CloseButton" };
00135     static constexpr std::wstring_view s_tabDragVisualContainer{ L"TabDragVisualContainer" };
00136 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApi.cpp Source File

  • File List
  • File Members
  • TwoPaneView

DisplayRegionHelperTestApi.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "DisplayRegionHelper.h"
00007 #include "DisplayRegionHelperTestApi.h"
00008
00009 bool DisplayRegionHelperTestApi::SimulateDisplayRegions()
00010 {
00011     return DisplayRegionHelper::SimulateDisplayRegions();
00012 }
00013
00014 void DisplayRegionHelperTestApi::SimulateDisplayRegions(bool value)
00015 {
00016     DisplayRegionHelper::SimulateDisplayRegions(value);
00017 }
00018
00019 winrt::TwoPaneViewMode DisplayRegionHelperTestApi::SimulateMode()
00020 {
00021     return DisplayRegionHelper::SimulateMode();
00022 }
00023
00024 void DisplayRegionHelperTestApi::SimulateMode(winrt::TwoPaneViewMode const& value)
00025 {
00026     DisplayRegionHelper::SimulateMode(value);
00027 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2AutomationPeer.cpp Source File

  • File List
  • File Members
  • WebView2

WebView2AutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "WebView2AutomationPeer.h"
00007
00008 WebView2AutomationPeer::WebView2AutomationPeer(winrt::WebView2 const& owner)
00009     : ReferenceTracker(owner)
00010 {}
00011
00012 com_ptr<WebView2> WebView2AutomationPeer::GetImpl()
00013 {
00014     com_ptr<WebView2> impl;
00015     winrt::WebView2 webview = Owner().try_as<winrt::WebView2>();
00016
00017     if (webview)
00018     {
00019         impl = winrt::get_self<WebView2>(webview)->get_strong();
00020     }
00021
00022     return impl;
00023 }
00024
00025 hstring WebView2AutomationPeer::GetClassNameCore()
00026 {
00027     return winrt::hstring_name_of<winrt::WebView2>();
00028 }
00029
00030 winrt::AutomationControlType WebView2AutomationPeer::GetAutomationControlTypeCore()
00031 {
00032     return winrt::AutomationControlType::Pane;
00033 }
00034
00035 HRESULT WebView2AutomationPeer::GetRawElementProviderSimple(_Outptr_opt_ IRawElementProviderSimple** value)
00036 {
00037     InitProvider();
00038     m_provider.copy_to(value);
00039     return S_OK;
00040 }
00041
00042 HRESULT WebView2AutomationPeer::IsCorrectPeerForHwnd(HWND hwnd, _Out_ bool* value)
00043 {
00044     *value = false;
00045     if (!InitProvider())
00046     {
00047         return S_OK;
00048     }
00049
00050     auto hwndProvider = GetImpl()->GetProviderForHwnd(hwnd).try_as<IRawElementProviderSimple>();
00051     if (hwndProvider && hwndProvider == m_provider)
00052     {
00053         *value = true;
00054     }
00055     return S_OK;
00056 }
00057
00058 bool WebView2AutomationPeer::InitProvider()
00059 {
00060     if (!m_provider)
00061     {
00062         m_provider = GetImpl()->GetWebView2Provider().try_as<IRawElementProviderSimple>();
00063     }
00064     return !!m_provider;
00065 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/TwoPaneView.idl Source File

  • File List
  • File Members
  • TwoPaneView

TwoPaneView.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 enum TwoPaneViewPriority
00007 {
00008     Pane1 = 0,
00009     Pane2 = 1,
00010 };
00011
00012 [MUX_PUBLIC]
00013 [webhosthidden]
00014 enum TwoPaneViewMode
00015 {
00016     SinglePane = 0,
00017     Wide = 1,
00018     Tall = 2,
00019 };
00020
00021 [MUX_PUBLIC]
00022 [webhosthidden]
00023 enum TwoPaneViewWideModeConfiguration
00024 {
00025     SinglePane = 0,
00026     LeftRight = 1,
00027     RightLeft = 2,
00028 };
00029
00030 [MUX_PUBLIC]
00031 [webhosthidden]
00032 enum TwoPaneViewTallModeConfiguration
00033 {
00034     SinglePane = 0,
00035     TopBottom = 1,
00036     BottomTop = 2,
00037 };
00038
00039 [MUX_PUBLIC]
00040 [webhosthidden]
00041 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00042 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00043 unsealed runtimeclass TwoPaneView : Microsoft.UI.Xaml.Controls.Control
00044 {
00045     TwoPaneView();
00046
00047     Microsoft.UI.Xaml.UIElement Pane1 { get; set; };
00048     Microsoft.UI.Xaml.UIElement Pane2 { get; set; };
00049     [MUX_DEFAULT_VALUE("c_pane1LengthDefault")]
00050     Microsoft.UI.Xaml.GridLength Pane1Length { get; set; };
00051     [MUX_DEFAULT_VALUE("c_pane2LengthDefault")]
00052     Microsoft.UI.Xaml.GridLength Pane2Length { get; set; };
00053     [MUX_DEFAULT_VALUE("winrt::TwoPaneViewPriority::Pane1")]
00054     TwoPaneViewPriority PanePriority { get; set; };
00055     [MUX_DEFAULT_VALUE("winrt::TwoPaneViewMode::SinglePane")]
00056     [MUX_PROPERTY_CHANGED_CALLBACK(FALSE)]
00057     TwoPaneViewMode Mode { get; };
00058     [MUX_DEFAULT_VALUE("winrt::TwoPaneViewWideModeConfiguration::LeftRight")]
00059     TwoPaneViewWideModeConfiguration WideModeConfiguration { get; set; };
00060     [MUX_DEFAULT_VALUE("winrt::TwoPaneViewTallModeConfiguration::TopBottom")]
00061     TwoPaneViewTallModeConfiguration TallModeConfiguration{ get; set; };
00062     [MUX_DEFAULT_VALUE("c_defaultMinWideModeWidth")]
00063     Double MinWideModeWidth { get; set; };
00064     [MUX_DEFAULT_VALUE("c_defaultMinTallModeHeight")]
00065     Double MinTallModeHeight { get; set; };
00066     event Windows.Foundation.TypedEventHandler<TwoPaneView, Object> ModeChanged;
00067
00068     static Microsoft.UI.Xaml.DependencyProperty Pane1Property { get; };
00069     static Microsoft.UI.Xaml.DependencyProperty Pane2Property { get; };
00070     static Microsoft.UI.Xaml.DependencyProperty Pane1LengthProperty { get; };
00071     static Microsoft.UI.Xaml.DependencyProperty Pane2LengthProperty { get; };
00072     static Microsoft.UI.Xaml.DependencyProperty PanePriorityProperty { get; };
00073     static Microsoft.UI.Xaml.DependencyProperty ModeProperty { get; };
00074     static Microsoft.UI.Xaml.DependencyProperty WideModeConfigurationProperty { get; };
00075     static Microsoft.UI.Xaml.DependencyProperty TallModeConfigurationProperty { get; };
00076     static Microsoft.UI.Xaml.DependencyProperty MinWideModeWidthProperty { get; };
00077     static Microsoft.UI.Xaml.DependencyProperty MinTallModeHeightProperty { get; };
00078 }
00079
00080 // TODO: Once IApplicationViewSpanningRects is available in the official SDK, remove this.
00081 [MUX_INTERNAL]
00082 [webhosthidden]
00083 [uuid(645737E4-A882-4E16-B289-FD860560106A)]
00084 interface IApplicationViewSpanningRects : IInspectable
00085 {
00086     Windows.Foundation.Collections.IVectorView<Windows.Foundation.Rect> GetSpanningRects();
00087 }
00088
00089 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemProperties Member List

This is the complete list of members for TreeViewItemProperties, including all inherited members.
ClearProperties() | TreeViewItemProperties | [static]
CollapsedGlyph(winrt::hstring const &value) | TreeViewItemProperties |
CollapsedGlyph() | TreeViewItemProperties |
CollapsedGlyphProperty() | TreeViewItemProperties | [inline, static]
EnsureProperties() | TreeViewItemProperties | [static]
ExpandedGlyph(winrt::hstring const &value) | TreeViewItemProperties |
ExpandedGlyph() | TreeViewItemProperties |
ExpandedGlyphProperty() | TreeViewItemProperties | [inline, static]
GlyphBrush(winrt::Brush const &value) | TreeViewItemProperties |
GlyphBrush() | TreeViewItemProperties |
GlyphBrushProperty() | TreeViewItemProperties | [inline, static]
GlyphOpacity(double value) | TreeViewItemProperties |
GlyphOpacity() | TreeViewItemProperties |
GlyphOpacityProperty() | TreeViewItemProperties | [inline, static]
GlyphSize(double value) | TreeViewItemProperties |
GlyphSize() | TreeViewItemProperties |
GlyphSizeProperty() | TreeViewItemProperties | [inline, static]
HasUnrealizedChildren(bool value) | TreeViewItemProperties |
HasUnrealizedChildren() | TreeViewItemProperties |
HasUnrealizedChildrenProperty() | TreeViewItemProperties | [inline, static]
IsExpanded(bool value) | TreeViewItemProperties |
IsExpanded() | TreeViewItemProperties |
IsExpandedProperty() | TreeViewItemProperties | [inline, static]
ItemsSource(winrt::IInspectable const &value) | TreeViewItemProperties |
ItemsSource() | TreeViewItemProperties |
ItemsSourceProperty() | TreeViewItemProperties | [inline, static]
OnHasUnrealizedChildrenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewItemProperties | [static]
OnIsExpandedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewItemProperties | [static]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewItemProperties | [static]
s_CollapsedGlyphProperty | TreeViewItemProperties | [static]
s_ExpandedGlyphProperty | TreeViewItemProperties | [static]
s_GlyphBrushProperty | TreeViewItemProperties | [static]
s_GlyphOpacityProperty | TreeViewItemProperties | [static]
s_GlyphSizeProperty | TreeViewItemProperties | [static]
s_HasUnrealizedChildrenProperty | TreeViewItemProperties | [static]
s_IsExpandedProperty | TreeViewItemProperties | [static]
s_ItemsSourceProperty | TreeViewItemProperties | [static]
s_TreeViewItemTemplateSettingsProperty | TreeViewItemProperties | [static]
TreeViewItemProperties() | TreeViewItemProperties |
TreeViewItemTemplateSettings(winrt::TreeViewItemTemplateSettings const &value) | TreeViewItemProperties |
TreeViewItemTemplateSettings() | TreeViewItemProperties |
TreeViewItemTemplateSettingsProperty() | TreeViewItemProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ZoomFactorChangeWithAdditionalVelocity Member List

This is the complete list of members for ZoomFactorChangeWithAdditionalVelocity, including all inherited members.
AnticipatedZoomFactorChange() const | ZoomFactorChangeWithAdditionalVelocity | [inline]
AnticipatedZoomFactorChange(float anticipatedZoomFactorChange) | ZoomFactorChangeWithAdditionalVelocity |
CenterPoint() const | ZoomFactorChangeWithAdditionalVelocity | [inline]
InertiaDecayRate() const | ZoomFactorChangeWithAdditionalVelocity | [inline]
ZoomFactorChangeWithAdditionalVelocity(float zoomFactorVelocity, float anticipatedZoomFactorChange, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate) | ZoomFactorChangeWithAdditionalVelocity |
ZoomFactorVelocity() const | ZoomFactorChangeWithAdditionalVelocity | [inline]
ZoomFactorVelocity(float zoomFactorVelocity) | ZoomFactorChangeWithAdditionalVelocity |
~ZoomFactorChangeWithAdditionalVelocity() | ZoomFactorChangeWithAdditionalVelocity |
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingCustomLottieSourcePage Member List

This is the complete list of members for ProgressRingCustomLottieSourcePage, including all inherited members.
ChangeValue_Click(object sender, RoutedEventArgs e) | ProgressRingCustomLottieSourcePage | [inline]
ProgressRingCustomLottieSourcePage() | ProgressRingCustomLottieSourcePage | [inline]
ProgressRingCustomLottieSourcePage_CurrentStateChanged(object sender, VisualStateChangedEventArgs e) | ProgressRingCustomLottieSourcePage | [inline, private]
ProgressRingCustomLottieSourcePage_Loaded(object sender, RoutedEventArgs e) | ProgressRingCustomLottieSourcePage | [inline, private]
UpdateMinMax_Click(object sender, RoutedEventArgs e) | ProgressRingCustomLottieSourcePage | [inline]
UpdateValue_Click(object sender, RoutedEventArgs e) | ProgressRingCustomLottieSourcePage | [inline]
UpdateWidth_Click(object sender, RoutedEventArgs e) | ProgressRingCustomLottieSourcePage | [inline]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ITransform2DEffect Member List

This is the complete list of members for ITransform2DEffect, including all inherited members.
BorderMode([out, retval] EffectBorderMode *value) | ITransform2DEffect
BorderMode([in] EffectBorderMode value) | ITransform2DEffect
InterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value) | ITransform2DEffect
InterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value) | ITransform2DEffect
Sharpness([out, retval] float *value) | ITransform2DEffect
Sharpness([in] float value) | ITransform2DEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ITransform2DEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ITransform2DEffect
TransformMatrix([out, retval] Windows.Foundation.Numerics.Matrix3x2 *value) | ITransform2DEffect
TransformMatrix([in] Windows.Foundation.Numerics.Matrix3x2 value) | ITransform2DEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapIcon.h Source File

  • File List
  • File Members
  • MapControl

MapIcon.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "MapIcon.g.h"
00010 #include "MapIcon.properties.h"
00011 #include "MapElement.h"
00012
00013 class MapIcon :
00014     public ReferenceTracker<MapIcon, winrt::implementation::MapIconT, MapElement>,
00015     public MapIconProperties
00016 {
00017
00018 public:
00019     MapIcon();
00020
00021
00022     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00023 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutTests Member List

This is the complete list of members for CommandBarFlyoutTests, including all inherited members.
BoundsRegex() | CommandBarFlyoutTests | [private, static]
CanHideCommandBarFlyoutInFlyoutClosedHandler() | CommandBarFlyoutTests | [inline]
CanHideCommandBarFlyoutInFlyoutClosedHandler(bool useAnimations) | CommandBarFlyoutTests | [inline, private]
CanTapOnPrimaryItems() | CommandBarFlyoutTests | [inline]
CanTapOnSecondaryItems() | CommandBarFlyoutTests | [inline]
CanTapOnSecondaryItemWithFlyoutWithoutClosing() | CommandBarFlyoutTests | [inline]
ClassInitialize(TestContext testContext) | CommandBarFlyoutTests | [inline, static]
CommandBarFlyoutCommandBecomingVisibleHasCorrectVisuals() | CommandBarFlyoutTests | [inline]
TestCleanup() | CommandBarFlyoutTests | [inline]
UIA_FlowsFromPropertyId | CommandBarFlyoutTests | [private]
UIA_FlowsToPropertyId | CommandBarFlyoutTests | [private]
UIA_PositionInSetPropertyId | CommandBarFlyoutTests | [private]
UIA_SizeOfSetPropertyId | CommandBarFlyoutTests | [private]
VerifyAddPrimaryCommandsDynamically() | CommandBarFlyoutTests | [inline]
VerifyAlwaysExpandedBehavior() | CommandBarFlyoutTests | [inline]
VerifyDynamicOverflowContentRootWidth() | CommandBarFlyoutTests | [inline]
VerifyDynamicSecondaryCommandLabel() | CommandBarFlyoutTests | [inline]
VerifyDynamicSecondaryCommandVisibility() | CommandBarFlyoutTests | [inline]
VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommands() | CommandBarFlyoutTests | [inline]
VerifyFlowsToAndFromConnectsPrimaryAndSecondaryCommandsWithAlwaysExpanded() | CommandBarFlyoutTests | [inline]
VerifyFlowsToAndFromIsNotSetWithoutPrimaryCommands() | CommandBarFlyoutTests | [inline]
VerifyFlyoutCloseKeyboardBehavior() | CommandBarFlyoutTests | [inline]
VerifyFlyoutClosingBehavior() | CommandBarFlyoutTests | [inline]
VerifyFlyoutOpenKeyboardBehavior() | CommandBarFlyoutTests | [inline]
VerifyIsFlyoutKeyboardAccessibleWithNoPrimaryCommands() | CommandBarFlyoutTests | [inline]
VerifyLeftAndRightNavigationBetweenPrimaryCommands() | CommandBarFlyoutTests | [inline]
VerifyLeftAndRightNavigationBetweenPrimaryCommands(bool inRTL, bool useUpDownKeys) | CommandBarFlyoutTests | [inline, private]
VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTL() | CommandBarFlyoutTests | [inline]
VerifyLeftAndRightNavigationBetweenPrimaryCommandsRTLUpAndDown() | CommandBarFlyoutTests | [inline]
VerifyLeftAndRightNavigationBetweenPrimaryCommandsUpAndDown() | CommandBarFlyoutTests | [inline]
VerifyPrimaryCommandsAutomationSet() | CommandBarFlyoutTests | [inline]
VerifyPrimaryCommandsAutomationSetWithAlwaysExpanded() | CommandBarFlyoutTests | [inline]
VerifyTabNavigationBetweenPrimaryAndSecondaryCommands() | CommandBarFlyoutTests | [inline]
VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommands() | CommandBarFlyoutTests | [inline]
VerifyUpAndDownNavigationBetweenPrimaryAndSecondaryCommandsWithAlwaysExpanded() | CommandBarFlyoutTests | [inline]
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LinedFlowLayout.properties.cpp Source File

  • File List
  • File Members
  • Generated

LinedFlowLayout.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "LinedFlowLayout.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(LinedFlowLayout)
00012 }
00013
00014 #include "LinedFlowLayout.g.cpp"
00015
00016 GlobalDependencyProperty LinedFlowLayoutProperties::s_ActualLineHeightProperty{ nullptr };
00017 GlobalDependencyProperty LinedFlowLayoutProperties::s_ItemsJustificationProperty{ nullptr };
00018 GlobalDependencyProperty LinedFlowLayoutProperties::s_ItemsStretchProperty{ nullptr };
00019 GlobalDependencyProperty LinedFlowLayoutProperties::s_LineHeightProperty{ nullptr };
00020 GlobalDependencyProperty LinedFlowLayoutProperties::s_LineSpacingProperty{ nullptr };
00021 GlobalDependencyProperty LinedFlowLayoutProperties::s_MinItemSpacingProperty{ nullptr };
00022
00023 LinedFlowLayoutProperties::LinedFlowLayoutProperties()
00024     : m_itemsInfoRequestedEventSource{static_cast<LinedFlowLayout*>(this)}
00025     , m_itemsUnlockedEventSource{static_cast<LinedFlowLayout*>(this)}
00026 {
00027     EnsureProperties();
00028 }
00029
00030 void LinedFlowLayoutProperties::EnsureProperties()
00031 {
00032     if (!s_ActualLineHeightProperty)
00033     {
00034         s_ActualLineHeightProperty =
00035             InitializeDependencyProperty(
00036                 L"ActualLineHeight",
00037                 winrt::name_of<double>(),
00038                 winrt::name_of<winrt::LinedFlowLayout>(),
00039                 false /* isAttached */,
00040                 ValueHelper<double>::BoxValueIfNecessary(LinedFlowLayout::s_defaultActualLineHeight),
00041                 winrt::PropertyChangedCallback(&OnActualLineHeightPropertyChanged));
00042     }
00043     if (!s_ItemsJustificationProperty)
00044     {
00045         s_ItemsJustificationProperty =
00046             InitializeDependencyProperty(
00047                 L"ItemsJustification",
00048                 winrt::name_of<winrt::LinedFlowLayoutItemsJustification>(),
00049                 winrt::name_of<winrt::LinedFlowLayout>(),
00050                 false /* isAttached */,
00051                 ValueHelper<winrt::LinedFlowLayoutItemsJustification>::BoxValueIfNecessary(LinedFlowLayout::s_defaultItemsJustification),
00052                 winrt::PropertyChangedCallback(&OnItemsJustificationPropertyChanged));
00053     }
00054     if (!s_ItemsStretchProperty)
00055     {
00056         s_ItemsStretchProperty =
00057             InitializeDependencyProperty(
00058                 L"ItemsStretch",
00059                 winrt::name_of<winrt::LinedFlowLayoutItemsStretch>(),
00060                 winrt::name_of<winrt::LinedFlowLayout>(),
00061                 false /* isAttached */,
00062                 ValueHelper<winrt::LinedFlowLayoutItemsStretch>::BoxValueIfNecessary(LinedFlowLayout::s_defaultItemsStretch),
00063                 winrt::PropertyChangedCallback(&OnItemsStretchPropertyChanged));
00064     }
00065     if (!s_LineHeightProperty)
00066     {
00067         s_LineHeightProperty =
00068             InitializeDependencyProperty(
00069                 L"LineHeight",
00070                 winrt::name_of<double>(),
00071                 winrt::name_of<winrt::LinedFlowLayout>(),
00072                 false /* isAttached */,
00073                 ValueHelper<double>::BoxValueIfNecessary(LinedFlowLayout::s_defaultLineHeight),
00074                 winrt::PropertyChangedCallback(&OnLineHeightPropertyChanged));
00075     }
00076     if (!s_LineSpacingProperty)
00077     {
00078         s_LineSpacingProperty =
00079             InitializeDependencyProperty(
00080                 L"LineSpacing",
00081                 winrt::name_of<double>(),
00082                 winrt::name_of<winrt::LinedFlowLayout>(),
00083                 false /* isAttached */,
00084                 ValueHelper<double>::BoxValueIfNecessary(LinedFlowLayout::s_defaultLineSpacing),
00085                 winrt::PropertyChangedCallback(&OnLineSpacingPropertyChanged));
00086     }
00087     if (!s_MinItemSpacingProperty)
00088     {
00089         s_MinItemSpacingProperty =
00090             InitializeDependencyProperty(
00091                 L"MinItemSpacing",
00092                 winrt::name_of<double>(),
00093                 winrt::name_of<winrt::LinedFlowLayout>(),
00094                 false /* isAttached */,
00095                 ValueHelper<double>::BoxValueIfNecessary(LinedFlowLayout::s_defaultMinItemSpacing),
00096                 winrt::PropertyChangedCallback(&OnMinItemSpacingPropertyChanged));
00097     }
00098 }
00099
00100 void LinedFlowLayoutProperties::ClearProperties()
00101 {
00102     s_ActualLineHeightProperty = nullptr;
00103     s_ItemsJustificationProperty = nullptr;
00104     s_ItemsStretchProperty = nullptr;
00105     s_LineHeightProperty = nullptr;
00106     s_LineSpacingProperty = nullptr;
00107     s_MinItemSpacingProperty = nullptr;
00108 }
00109
00110 void LinedFlowLayoutProperties::OnActualLineHeightPropertyChanged(
00111     winrt::DependencyObject const& sender,
00112     winrt::DependencyPropertyChangedEventArgs const& args)
00113 {
00114     auto owner = sender.as<winrt::LinedFlowLayout>();
00115     winrt::get_self<LinedFlowLayout>(owner)->OnPropertyChanged(args);
00116 }
00117
00118 void LinedFlowLayoutProperties::OnItemsJustificationPropertyChanged(
00119     winrt::DependencyObject const& sender,
00120     winrt::DependencyPropertyChangedEventArgs const& args)
00121 {
00122     auto owner = sender.as<winrt::LinedFlowLayout>();
00123     winrt::get_self<LinedFlowLayout>(owner)->OnPropertyChanged(args);
00124 }
00125
00126 void LinedFlowLayoutProperties::OnItemsStretchPropertyChanged(
00127     winrt::DependencyObject const& sender,
00128     winrt::DependencyPropertyChangedEventArgs const& args)
00129 {
00130     auto owner = sender.as<winrt::LinedFlowLayout>();
00131     winrt::get_self<LinedFlowLayout>(owner)->OnPropertyChanged(args);
00132 }
00133
00134 void LinedFlowLayoutProperties::OnLineHeightPropertyChanged(
00135     winrt::DependencyObject const& sender,
00136     winrt::DependencyPropertyChangedEventArgs const& args)
00137 {
00138     auto owner = sender.as<winrt::LinedFlowLayout>();
00139     winrt::get_self<LinedFlowLayout>(owner)->OnPropertyChanged(args);
00140 }
00141
00142 void LinedFlowLayoutProperties::OnLineSpacingPropertyChanged(
00143     winrt::DependencyObject const& sender,
00144     winrt::DependencyPropertyChangedEventArgs const& args)
00145 {
00146     auto owner = sender.as<winrt::LinedFlowLayout>();
00147     winrt::get_self<LinedFlowLayout>(owner)->OnPropertyChanged(args);
00148 }
00149
00150 void LinedFlowLayoutProperties::OnMinItemSpacingPropertyChanged(
00151     winrt::DependencyObject const& sender,
00152     winrt::DependencyPropertyChangedEventArgs const& args)
00153 {
00154     auto owner = sender.as<winrt::LinedFlowLayout>();
00155     winrt::get_self<LinedFlowLayout>(owner)->OnPropertyChanged(args);
00156 }
00157
00158 void LinedFlowLayoutProperties::ActualLineHeight(double value)
00159 {
00160     [[gsl::suppress(con)]]
00161     {
00162     static_cast<LinedFlowLayout*>(this)->SetValue(s_ActualLineHeightProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00163     }
00164 }
00165
00166 double LinedFlowLayoutProperties::ActualLineHeight()
00167 {
00168     return ValueHelper<double>::CastOrUnbox(static_cast<LinedFlowLayout*>(this)->GetValue(s_ActualLineHeightProperty));
00169 }
00170
00171 void LinedFlowLayoutProperties::ItemsJustification(winrt::LinedFlowLayoutItemsJustification const& value)
00172 {
00173     [[gsl::suppress(con)]]
00174     {
00175     static_cast<LinedFlowLayout*>(this)->SetValue(s_ItemsJustificationProperty, ValueHelper<winrt::LinedFlowLayoutItemsJustification>::BoxValueIfNecessary(value));
00176     }
00177 }
00178
00179 winrt::LinedFlowLayoutItemsJustification LinedFlowLayoutProperties::ItemsJustification()
00180 {
00181     return ValueHelper<winrt::LinedFlowLayoutItemsJustification>::CastOrUnbox(static_cast<LinedFlowLayout*>(this)->GetValue(s_ItemsJustificationProperty));
00182 }
00183
00184 void LinedFlowLayoutProperties::ItemsStretch(winrt::LinedFlowLayoutItemsStretch const& value)
00185 {
00186     [[gsl::suppress(con)]]
00187     {
00188     static_cast<LinedFlowLayout*>(this)->SetValue(s_ItemsStretchProperty, ValueHelper<winrt::LinedFlowLayoutItemsStretch>::BoxValueIfNecessary(value));
00189     }
00190 }
00191
00192 winrt::LinedFlowLayoutItemsStretch LinedFlowLayoutProperties::ItemsStretch()
00193 {
00194     return ValueHelper<winrt::LinedFlowLayoutItemsStretch>::CastOrUnbox(static_cast<LinedFlowLayout*>(this)->GetValue(s_ItemsStretchProperty));
00195 }
00196
00197 void LinedFlowLayoutProperties::LineHeight(double value)
00198 {
00199     [[gsl::suppress(con)]]
00200     {
00201     static_cast<LinedFlowLayout*>(this)->SetValue(s_LineHeightProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00202     }
00203 }
00204
00205 double LinedFlowLayoutProperties::LineHeight()
00206 {
00207     return ValueHelper<double>::CastOrUnbox(static_cast<LinedFlowLayout*>(this)->GetValue(s_LineHeightProperty));
00208 }
00209
00210 void LinedFlowLayoutProperties::LineSpacing(double value)
00211 {
00212     [[gsl::suppress(con)]]
00213     {
00214     static_cast<LinedFlowLayout*>(this)->SetValue(s_LineSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00215     }
00216 }
00217
00218 double LinedFlowLayoutProperties::LineSpacing()
00219 {
00220     return ValueHelper<double>::CastOrUnbox(static_cast<LinedFlowLayout*>(this)->GetValue(s_LineSpacingProperty));
00221 }
00222
00223 void LinedFlowLayoutProperties::MinItemSpacing(double value)
00224 {
00225     [[gsl::suppress(con)]]
00226     {
00227     static_cast<LinedFlowLayout*>(this)->SetValue(s_MinItemSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00228     }
00229 }
00230
00231 double LinedFlowLayoutProperties::MinItemSpacing()
00232 {
00233     return ValueHelper<double>::CastOrUnbox(static_cast<LinedFlowLayout*>(this)->GetValue(s_MinItemSpacingProperty));
00234 }
00235
00236 winrt::event_token LinedFlowLayoutProperties::ItemsInfoRequested(winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs> const& value)
00237 {
00238     return m_itemsInfoRequestedEventSource.add(value);
00239 }
00240
00241 void LinedFlowLayoutProperties::ItemsInfoRequested(winrt::event_token const& token)
00242 {
00243     m_itemsInfoRequestedEventSource.remove(token);
00244 }
00245
00246 winrt::event_token LinedFlowLayoutProperties::ItemsUnlocked(winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::IInspectable> const& value)
00247 {
00248     return m_itemsUnlockedEventSource.add(value);
00249 }
00250
00251 void LinedFlowLayoutProperties::ItemsUnlocked(winrt::event_token const& token)
00252 {
00253     m_itemsUnlockedEventSource.remove(token);
00254 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusFilterConverter.cpp Source File

  • File List
  • File Members
  • Common

CornerRadiusFilterConverter.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "CornerRadiusFilterConverter.h"
00007
00008 winrt::CornerRadius CornerRadiusFilterConverter::Convert(winrt::CornerRadius const& radius, winrt::CornerRadiusFilterKind const& filterKind)
00009 {
00010     winrt::CornerRadius result = radius;
00011
00012     switch (filterKind)
00013     {
00014     case winrt::CornerRadiusFilterKind::Top:
00015         result.BottomLeft = 0;
00016         result.BottomRight = 0;
00017         break;
00018     case winrt::CornerRadiusFilterKind::Right:
00019         result.TopLeft = 0;
00020         result.BottomLeft = 0;
00021         break;
00022     case winrt::CornerRadiusFilterKind::Bottom:
00023         result.TopLeft = 0;
00024         result.TopRight = 0;
00025         break;
00026     case winrt::CornerRadiusFilterKind::Left:
00027         result.TopRight = 0;
00028         result.BottomRight = 0;
00029         break;
00030     }
00031
00032     return result;
00033 }
00034
00035 double CornerRadiusFilterConverter::GetDoubleValue(winrt::CornerRadius const& radius, winrt::CornerRadiusFilterKind const& filterKind)
00036 {
00037     switch (filterKind)
00038     {
00039     case winrt::CornerRadiusFilterKind::TopLeftValue:
00040         return radius.TopLeft;
00041     case winrt::CornerRadiusFilterKind::BottomRightValue:
00042         return radius.BottomRight;
00043     }
00044     return 0;
00045 }
00046
00047 winrt::IInspectable CornerRadiusFilterConverter::Convert(
00048     winrt::IInspectable const& value,
00049     winrt::TypeName const& targetType,
00050     winrt::IInspectable const& parameter,
00051     winrt::hstring const& language)
00052 {
00053     auto cornerRadius = unbox_value<winrt::CornerRadius>(value);
00054
00055     const auto scale = Scale();
00056     if (!std::isnan(scale))
00057     {
00058         cornerRadius.TopLeft *= scale;
00059         cornerRadius.TopRight *= scale;
00060         cornerRadius.BottomRight *= scale;
00061         cornerRadius.BottomLeft *= scale;
00062     }
00063
00064     const auto filterType = Filter();
00065     if (filterType == winrt::CornerRadiusFilterKind::TopLeftValue ||
00066         filterType == winrt::CornerRadiusFilterKind::BottomRightValue)
00067     {
00068         return box_value(GetDoubleValue(cornerRadius, Filter()));
00069     }
00070
00071     return box_value(Convert(cornerRadius, Filter()));
00072 }
00073
00074 winrt::IInspectable CornerRadiusFilterConverter::ConvertBack(
00075     winrt::IInspectable const& value,
00076     winrt::TypeName const& targetType,
00077     winrt::IInspectable const& parameter,
00078     winrt::hstring const& language)
00079 {
00080     winrt::throw_hresult(E_NOTIMPL);
00081 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadialGradientBrushProperties Member List

This is the complete list of members for RadialGradientBrushProperties, including all inherited members.
Center(winrt::Point const &value) | RadialGradientBrushProperties |
Center() | RadialGradientBrushProperties |
CenterProperty() | RadialGradientBrushProperties | [inline, static]
ClearProperties() | RadialGradientBrushProperties | [static]
EnsureProperties() | RadialGradientBrushProperties | [static]
GradientOrigin(winrt::Point const &value) | RadialGradientBrushProperties |
GradientOrigin() | RadialGradientBrushProperties |
GradientOriginProperty() | RadialGradientBrushProperties | [inline, static]
InterpolationSpace(winrt::CompositionColorSpace const &value) | RadialGradientBrushProperties |
InterpolationSpace() | RadialGradientBrushProperties |
InterpolationSpaceProperty() | RadialGradientBrushProperties | [inline, static]
MappingMode(winrt::BrushMappingMode const &value) | RadialGradientBrushProperties |
MappingMode() | RadialGradientBrushProperties |
MappingModeProperty() | RadialGradientBrushProperties | [inline, static]
OnCenterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnGradientOriginPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnInterpolationSpacePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnMappingModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnRadiusXPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnRadiusYPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnSpreadMethodPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
RadialGradientBrushProperties() | RadialGradientBrushProperties |
RadiusX(double value) | RadialGradientBrushProperties |
RadiusX() | RadialGradientBrushProperties |
RadiusXProperty() | RadialGradientBrushProperties | [inline, static]
RadiusY(double value) | RadialGradientBrushProperties |
RadiusY() | RadialGradientBrushProperties |
RadiusYProperty() | RadialGradientBrushProperties | [inline, static]
s_CenterProperty | RadialGradientBrushProperties | [static]
s_GradientOriginProperty | RadialGradientBrushProperties | [static]
s_InterpolationSpaceProperty | RadialGradientBrushProperties | [static]
s_MappingModeProperty | RadialGradientBrushProperties | [static]
s_RadiusXProperty | RadialGradientBrushProperties | [static]
s_RadiusYProperty | RadialGradientBrushProperties | [static]
s_SpreadMethodProperty | RadialGradientBrushProperties | [static]
SpreadMethod(winrt::GradientSpreadMethod const &value) | RadialGradientBrushProperties |
SpreadMethod() | RadialGradientBrushProperties |
SpreadMethodProperty() | RadialGradientBrushProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedSettingsVisualSource.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedSettingsVisualSource.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedSettingsVisualSource.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(AnimatedSettingsVisualSource)
00012 }
00013
00014 #include "AnimatedSettingsVisualSource.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApiFactory.cpp Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

PullToRefreshHelperTestApiFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RefreshVisualizerEventArgs.h"
00007 #include "RefreshInteractionRatioChangedEventArgs.h"
00008 #include "PullToRefreshHelperTestApi.h"
00009 #include "PullToRefreshHelperTestApiFactory.h"
00010
00011 #include "PullToRefreshHelperTestApi.properties.cpp"
00012
00013 winrt::RefreshInteractionRatioChangedEventArgs PullToRefreshHelperTestApi::CreateRefreshInteractionRatioChangedEventArgsInstance(double value)
00014 {
00015     return winrt::make<RefreshInteractionRatioChangedEventArgs>(value);
00016 }
00017
00018 winrt::RefreshStateChangedEventArgs PullToRefreshHelperTestApi::CreateRefreshStateChangedEventArgsInstance(winrt::RefreshVisualizerState const& oldValue, winrt::RefreshVisualizerState const& newValue)
00019 {
00020     return winrt::make<RefreshStateChangedEventArgs>(oldValue, newValue);
00021 }
00022
00023 winrt::RefreshRequestedEventArgs PullToRefreshHelperTestApi::CreateRefreshRequestedEventArgsInstance(winrt::Deferral const& handler)
00024 {
00025     return winrt::make<RefreshRequestedEventArgs>(handler);
00026 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ValueProviderThunk< Owner > Member List

This is the complete list of members for ValueProviderThunk< Owner >, including all inherited members.
IsReadOnly() | ValueProviderThunk< Owner > | [inline]
SetValue(hstring const &value) | ValueProviderThunk< Owner > | [inline]
Value() | ValueProviderThunk< Owner > | [inline]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingAnchorRequestedEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingAnchorRequestedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Vector.h"
00007 #include "ScrollPresenter.h"
00008 #include "ScrollPresenterTrace.h"
00009 #include "ScrollingAnchorRequestedEventArgs.h"
00010
00011 ScrollingAnchorRequestedEventArgs::ScrollingAnchorRequestedEventArgs(const winrt::ScrollPresenter& scrollPresenter)
00012 {
00013     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, scrollPresenter);
00014
00015     m_scrollPresenter.set(scrollPresenter);
00016 }
00017
00018 #pragma region IScrollingAnchorRequestedEventArgs
00019
00020 winrt::IVector<winrt::UIElement> ScrollingAnchorRequestedEventArgs::AnchorCandidates()
00021 {
00022     return m_anchorCandidates.get();
00023 }
00024
00025 winrt::UIElement ScrollingAnchorRequestedEventArgs::AnchorElement()
00026 {
00027     return m_anchorElement.get();
00028 }
00029
00030 void ScrollingAnchorRequestedEventArgs::AnchorElement(winrt::UIElement const& value)
00031 {
00032     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, value);
00033
00034     const winrt::UIElement& anchorElement{ value };
00035     com_ptr<ScrollPresenter> scrollPresenter = winrt::get_self<ScrollPresenter>(m_scrollPresenter.get())->get_strong();
00036
00037     if (!anchorElement || scrollPresenter->IsElementValidAnchor(anchorElement))
00038     {
00039         m_anchorElement.set(anchorElement);
00040     }
00041     else
00042     {
00043         throw winrt::hresult_error(E_INVALIDARG);
00044     }
00045 }
00046
00047 #pragma endregion
00048
00049 winrt::IVector<winrt::UIElement> ScrollingAnchorRequestedEventArgs::GetAnchorCandidates()
00050 {
00051     return m_anchorCandidates.get();
00052 }
00053
00054 void ScrollingAnchorRequestedEventArgs::SetAnchorCandidates(const std::vector<tracker_ref<winrt::UIElement>>& anchorCandidates)
00055 {
00056     winrt::IVector<winrt::UIElement> anchorCandidatesTmp = winrt::make<Vector<winrt::UIElement, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>();
00057
00058     for (tracker_ref<winrt::UIElement> anchorCandidate : anchorCandidates)
00059     {
00060         anchorCandidatesTmp.Append(anchorCandidate.get());
00061     }
00062     m_anchorCandidates.set(anchorCandidatesTmp);
00063 }
00064
00065 winrt::UIElement ScrollingAnchorRequestedEventArgs::GetAnchorElement() const
00066 {
00067     return m_anchorElement.get();
00068 }
00069
00070 void ScrollingAnchorRequestedEventArgs::SetAnchorElement(const winrt::UIElement& anchorElement)
00071 {
00072     m_anchorElement.set(anchorElement);
00073 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicTestApi Member List

This is the complete list of members for AcrylicTestApi, including all inherited members.
abi_enter() | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
AcrylicBrush() | AcrylicTestApi |
AcrylicBrush(winrt::AcrylicBrush const &value) | AcrylicTestApi |
CheckThread() | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
CompositionBrush() | AcrylicTestApi |
DeleteInstanceOnUIThread(std::unique_ptr< AcrylicTestApi > &&self) noexcept | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
final_release(std::unique_ptr< AcrylicTestApi > &&self) | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline, static]
ForceCreateAcrylicBrush(bool useCrossFadeEffect) | AcrylicTestApi |
GetBase() | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
GetInner() | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
IsUsingAcrylicBrush() | AcrylicTestApi |
NoiseBrush() | AcrylicTestApi |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable > | [inline]
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/BrightnessSun.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • TestUI

BrightnessSun.cs

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.0.0-build.101+g12769c43d3
00007 //
00008 //       Command:
00009 //           LottieGen -Language CSharp -Public -WinUIVersion 2.4 -InputFile BrightnessSun.json
00010 //
00011 //       Input file:
00012 //           BrightnessSun.json (3791 bytes created 15:52-08:00 Feb 25 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 // ____________________________________
00022 // |       Object stats       | Count |
00023 // |__________________________|_______|
00024 // | All CompositionObjects   |   200 |
00025 // |--------------------------+-------|
00026 // | Expression animators     |    56 |
00027 // | KeyFrame animators       |    28 |
00028 // | Reference parameters     |    56 |
00029 // | Expression operations    |     0 |
00030 // |--------------------------+-------|
00031 // | Animated brushes         |     - |
00032 // | Animated gradient stops  |     - |
00033 // | ExpressionAnimations     |    29 |
00034 // | PathKeyFrameAnimations   |     - |
00035 // |--------------------------+-------|
00036 // | ContainerVisuals         |     1 |
00037 // | ShapeVisuals             |     1 |
00038 // |--------------------------+-------|
00039 // | ContainerShapes          |     - |
00040 // | CompositionSpriteShapes  |    16 |
00041 // |--------------------------+-------|
00042 // | Brushes                  |     3 |
00043 // | Gradient stops           |     - |
00044 // | CompositionVisualSurface |     - |
00045 // ------------------------------------
00046 using Microsoft.Graphics.Canvas.Geometry;
00047 using System;
00048 using System.Collections.Generic;
00049 using System.Numerics;
00050 using Windows.Graphics;
00051 using Windows.UI;
00052 using Microsoft.UI.Composition;
00053
00054 namespace AnimatedVisuals
00055 {
00056     // Name:        Sun Animation
00057     // Frame rate:  25 fps
00058     // Frame count: 40
00059     // Duration:    1600.0 mS
00060     sealed class BrightnessSun
00061         : Microsoft.UI.Xaml.Controls.IAnimatedVisualSource, Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
00062     {
00063         // Animation duration: 1.600 seconds.
00064         internal const long c_durationTicks = 16000000;
00065
00066         public Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor)
00067         {
00068             object ignored = null;
00069             return TryCreateAnimatedVisual(compositor, out ignored);
00070         }
00071
00072         public Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics)
00073         {
00074             diagnostics = null;
00075
00076             return
00077                 new BrightnessSun_AnimatedVisual(
00078                     compositor
00079                     );
00080         }
00081
00082         /// <summary>
00083         /// Gets the number of frames in the animation.
00084         /// </summary>
00085         public double FrameCount => 40d;
00086
00087         /// <summary>
00088         /// Gets the frame rate of the animation.
00089         /// </summary>
00090         public double Framerate => 25d;
00091
00092         /// <summary>
00093         /// Gets the duration of the animation.
00094         /// </summary>
00095         public TimeSpan Duration => TimeSpan.FromTicks(c_durationTicks);
00096
00097         /// <summary>
00098         /// Converts a zero-based frame number to the corresponding progress value denoting the
00099         /// start of the frame.
00100         /// </summary>
00101         public double FrameToProgress(double frameNumber)
00102         {
00103             return frameNumber / 40d;
00104         }
00105
00106         /// <summary>
00107         /// Returns a map from marker names to corresponding progress values.
00108         /// </summary>
00109         public IReadOnlyDictionary<string, double> Markers =>
00110             new Dictionary<string, double>
00111             {
00112             };
00113
00114         /// <summary>
00115         /// Sets the color property with the given name, or does nothing if no such property
00116         /// exists.
00117         /// </summary>
00118         public void SetColorProperty(string propertyName, Color value)
00119         {
00120         }
00121
00122         /// <summary>
00123         /// Sets the scalar property with the given name, or does nothing if no such property
00124         /// exists.
00125         /// </summary>
00126         public void SetScalarProperty(string propertyName, double value)
00127         {
00128         }
00129
00130         sealed class BrightnessSun_AnimatedVisual : Microsoft.UI.Xaml.Controls.IAnimatedVisual
00131         {
00132             const long c_durationTicks = 16000000;
00133             readonly Compositor _c;
00134             readonly ExpressionAnimation _reusableExpressionAnimation;
00135             CompositionColorBrush _colorBrush_AlmostGoldenrod_FFE4950C;
00136             CompositionPath _path;
00137             ContainerVisual _root;
00138             ExpressionAnimation _rootProgress;
00139             ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0;
00140             ScalarKeyFrameAnimation _tStartScalarAnimation_1_to_0;
00141             StepEasingFunction _holdThenStepEasingFunction;
00142
00143             static void StartProgressBoundAnimation(
00144                 CompositionObject target,
00145                 string animatedPropertyName,
00146                 CompositionAnimation animation,
00147                 ExpressionAnimation controllerProgressExpression)
00148             {
00149                 target.StartAnimation(animatedPropertyName, animation);
00150                 var controller = target.TryGetAnimationController(animatedPropertyName);
00151                 controller.Pause();
00152                 controller.StartAnimation("Progress", controllerProgressExpression);
00153             }
00154
00155             void BindProperty(
00156                 CompositionObject target,
00157                 string animatedPropertyName,
00158                 string expression,
00159                 string referenceParameterName,
00160                 CompositionObject referencedObject)
00161             {
00162                 _reusableExpressionAnimation.ClearAllParameters();
00163                 _reusableExpressionAnimation.Expression = expression;
00164                 _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00165                 target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00166             }
00167
00168             ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00169             {
00170                 var result = _c.CreateScalarKeyFrameAnimation();
00171                 result.Duration = TimeSpan.FromTicks(c_durationTicks);
00172                 result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00173                 return result;
00174             }
00175
00176             CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix)
00177             {
00178                 var result = _c.CreateSpriteShape(geometry);
00179                 result.TransformMatrix = transformMatrix;
00180                 return result;
00181             }
00182
00183             CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix, CompositionBrush fillBrush)
00184             {
00185                 var result = _c.CreateSpriteShape(geometry);
00186                 result.TransformMatrix = transformMatrix;
00187                 result.FillBrush = fillBrush;
00188                 return result;
00189             }
00190
00191             CanvasGeometry Geometry_0()
00192             {
00193                 CanvasGeometry result;
00194                 using (var builder = new CanvasPathBuilder(null))
00195                 {
00196                     builder.BeginFigure(new Vector2(-9F, -134F));
00197                     builder.AddLine(new Vector2(-9F, -68F));
00198                     builder.EndFigure(CanvasFigureLoop.Open);
00199                     result = CanvasGeometry.CreatePath(builder);
00200                 }
00201                 return result;
00202             }
00203
00204             // - - - Layer aggregator
00205             // - -  Scale:0.70016,1.05751, Offset:<202, 162>
00206             CanvasGeometry Geometry_1()
00207             {
00208                 CanvasGeometry result;
00209                 using (var builder = new CanvasPathBuilder(null))
00210                 {
00211                     builder.SetFilledRegionDetermination(CanvasFilledRegionDetermination.Winding);
00212                     builder.BeginFigure(new Vector2(3F, -54F));
00213                     builder.AddCubicBezier(new Vector2(22.2800007F, -39.7159996F), new Vector2(51F, 26F), new Vector2(0F, 53F));
00214                     builder.AddCubicBezier(new Vector2(17.1389999F, 58.6279984F), new Vector2(43.5250015F, 26.9519997F), new Vector2(40.9780006F, -6.6079998F));
00215                     builder.AddCubicBezier(new Vector2(39.7750015F, -22.4619999F), new Vector2(30.8500004F, -43.4980011F), new Vector2(3F, -54F));
00216                     builder.EndFigure(CanvasFigureLoop.Closed);
00217                     result = CanvasGeometry.CreatePath(builder);
00218                 }
00219                 return result;
00220             }
00221
00222             // - Layer aggregator
00223             // Scale:0.8,0.8, Offset:<178.4, 151.2>
00224             CompositionColorBrush ColorBrush_AlmostDarkOrange_FFF18F13()
00225             {
00226                 return _c.CreateColorBrush(Color.FromArgb(0xFF, 0xF1, 0x8F, 0x13));
00227             }
00228
00229             CompositionColorBrush ColorBrush_AlmostGoldenrod_FFE4950C()
00230             {
00231                 return _colorBrush_AlmostGoldenrod_FFE4950C = _c.CreateColorBrush(Color.FromArgb(0xFF, 0xE4, 0x95, 0x0C));
00232             }
00233
00234             // - Layer aggregator
00235             // Scale:0.70016,1.05751, Offset:<202, 162>
00236             CompositionColorBrush ColorBrush_SemiTransparentWhite()
00237             {
00238                 return _c.CreateColorBrush(Color.FromArgb(0x38, 0xFF, 0xFF, 0xFF));
00239             }
00240
00241             // - Layer aggregator
00242             // Scale:0.8,0.8, Offset:<178.4, 151.2>
00243             // Ellipse Path 1.EllipseGeometry
00244             CompositionEllipseGeometry Ellipse_74p5()
00245             {
00246                 var result = _c.CreateEllipseGeometry();
00247                 result.Radius = new Vector2(74.5F, 74.5F);
00248                 return result;
00249             }
00250
00251             CompositionPath Path()
00252             {
00253                 var result = _path = new CompositionPath(Geometry_0());
00254                 return result;
00255             }
00256
00257             CompositionPathGeometry PathGeometry_00()
00258             {
00259                 var result = _c.CreatePathGeometry(Path());
00260                 var propertySet = result.Properties;
00261                 propertySet.InsertScalar("TEnd", 1F);
00262                 propertySet.InsertScalar("TStart", 1F);
00263                 StartProgressBoundAnimation(result, "TStart", TStartScalarAnimation_1_to_0(), RootProgress());
00264                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00265                 StartProgressBoundAnimation(result, "TEnd", TEndScalarAnimation_1_to_0(), _rootProgress);
00266                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00267                 return result;
00268             }
00269
00270             CompositionPathGeometry PathGeometry_01()
00271             {
00272                 var result = _c.CreatePathGeometry(_path);
00273                 var propertySet = result.Properties;
00274                 propertySet.InsertScalar("TEnd", 1F);
00275                 propertySet.InsertScalar("TStart", 1F);
00276                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00277                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00278                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00279                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00280                 return result;
00281             }
00282
00283             CompositionPathGeometry PathGeometry_02()
00284             {
00285                 var result = _c.CreatePathGeometry(_path);
00286                 var propertySet = result.Properties;
00287                 propertySet.InsertScalar("TEnd", 1F);
00288                 propertySet.InsertScalar("TStart", 1F);
00289                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00290                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00291                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00292                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00293                 return result;
00294             }
00295
00296             CompositionPathGeometry PathGeometry_03()
00297             {
00298                 var result = _c.CreatePathGeometry(_path);
00299                 var propertySet = result.Properties;
00300                 propertySet.InsertScalar("TEnd", 1F);
00301                 propertySet.InsertScalar("TStart", 1F);
00302                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00303                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00304                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00305                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00306                 return result;
00307             }
00308
00309             CompositionPathGeometry PathGeometry_04()
00310             {
00311                 var result = _c.CreatePathGeometry(_path);
00312                 var propertySet = result.Properties;
00313                 propertySet.InsertScalar("TEnd", 1F);
00314                 propertySet.InsertScalar("TStart", 1F);
00315                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00316                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00317                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00318                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00319                 return result;
00320             }
00321
00322             CompositionPathGeometry PathGeometry_05()
00323             {
00324                 var result = _c.CreatePathGeometry(_path);
00325                 var propertySet = result.Properties;
00326                 propertySet.InsertScalar("TEnd", 1F);
00327                 propertySet.InsertScalar("TStart", 1F);
00328                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00329                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00330                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00331                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00332                 return result;
00333             }
00334
00335             CompositionPathGeometry PathGeometry_06()
00336             {
00337                 var result = _c.CreatePathGeometry(_path);
00338                 var propertySet = result.Properties;
00339                 propertySet.InsertScalar("TEnd", 1F);
00340                 propertySet.InsertScalar("TStart", 1F);
00341                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00342                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00343                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00344                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00345                 return result;
00346             }
00347
00348             CompositionPathGeometry PathGeometry_07()
00349             {
00350                 var result = _c.CreatePathGeometry(_path);
00351                 var propertySet = result.Properties;
00352                 propertySet.InsertScalar("TEnd", 1F);
00353                 propertySet.InsertScalar("TStart", 1F);
00354                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00355                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00356                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00357                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00358                 return result;
00359             }
00360
00361             CompositionPathGeometry PathGeometry_08()
00362             {
00363                 var result = _c.CreatePathGeometry(_path);
00364                 var propertySet = result.Properties;
00365                 propertySet.InsertScalar("TEnd", 1F);
00366                 propertySet.InsertScalar("TStart", 1F);
00367                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00368                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00369                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00370                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00371                 return result;
00372             }
00373
00374             CompositionPathGeometry PathGeometry_09()
00375             {
00376                 var result = _c.CreatePathGeometry(_path);
00377                 var propertySet = result.Properties;
00378                 propertySet.InsertScalar("TEnd", 1F);
00379                 propertySet.InsertScalar("TStart", 1F);
00380                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00381                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00382                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00383                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00384                 return result;
00385             }
00386
00387             CompositionPathGeometry PathGeometry_10()
00388             {
00389                 var result = _c.CreatePathGeometry(_path);
00390                 var propertySet = result.Properties;
00391                 propertySet.InsertScalar("TEnd", 1F);
00392                 propertySet.InsertScalar("TStart", 1F);
00393                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00394                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00395                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00396                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00397                 return result;
00398             }
00399
00400             CompositionPathGeometry PathGeometry_11()
00401             {
00402                 var result = _c.CreatePathGeometry(_path);
00403                 var propertySet = result.Properties;
00404                 propertySet.InsertScalar("TEnd", 1F);
00405                 propertySet.InsertScalar("TStart", 1F);
00406                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00407                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00408                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00409                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00410                 return result;
00411             }
00412
00413             CompositionPathGeometry PathGeometry_12()
00414             {
00415                 var result = _c.CreatePathGeometry(_path);
00416                 var propertySet = result.Properties;
00417                 propertySet.InsertScalar("TEnd", 1F);
00418                 propertySet.InsertScalar("TStart", 1F);
00419                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00420                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00421                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00422                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00423                 return result;
00424             }
00425
00426             CompositionPathGeometry PathGeometry_13()
00427             {
00428                 var result = _c.CreatePathGeometry(_path);
00429                 var propertySet = result.Properties;
00430                 propertySet.InsertScalar("TEnd", 1F);
00431                 propertySet.InsertScalar("TStart", 1F);
00432                 StartProgressBoundAnimation(result, "TStart", _tStartScalarAnimation_1_to_0, _rootProgress);
00433                 BindProperty(result, "TrimStart", "Min(my.TStart,my.TEnd)", "my", result);
00434                 StartProgressBoundAnimation(result, "TEnd", _tEndScalarAnimation_1_to_0, _rootProgress);
00435                 BindProperty(result, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", result);
00436                 return result;
00437             }
00438
00439             // - Layer aggregator
00440             // Scale:0.70016,1.05751, Offset:<202, 162>
00441             CompositionPathGeometry PathGeometry_14()
00442             {
00443                 return _c.CreatePathGeometry(new CompositionPath(Geometry_1()));
00444             }
00445
00446             // Layer aggregator
00447             // Ellipse Path 1
00448             CompositionSpriteShape SpriteShape_00()
00449             {
00450                 // Offset:<190, 162>, Rotation:-0.011598425070025746 degrees, Scale:<0.8, 0.8>
00451                 var result = CreateSpriteShape(Ellipse_74p5(), new Matrix3x2(0.800000012F, 0F, 0F, 0.800000012F, 190F, 162F), ColorBrush_AlmostDarkOrange_FFF18F13());
00452                 return result;
00453             }
00454
00455             // Layer aggregator
00456             // Path 1
00457             CompositionSpriteShape SpriteShape_01()
00458             {
00459                 // Offset:<193.31511, 158.30362>, Rotation:25.999998864742253 degrees
00460                 var result = CreateSpriteShape(PathGeometry_00(), new Matrix3x2(0.898794055F, 0.438371152F, -0.438371152F, 0.898794055F, 193.315109F, 158.303619F));
00461                 result.StrokeBrush = ColorBrush_AlmostGoldenrod_FFE4950C();
00462                 result.StrokeDashCap = CompositionStrokeCap.Round;
00463                 result.StrokeStartCap = CompositionStrokeCap.Round;
00464                 result.StrokeEndCap = CompositionStrokeCap.Round;
00465                 result.StrokeMiterLimit = 2F;
00466                 result.StrokeThickness = 10F;
00467                 return result;
00468             }
00469
00470             // Layer aggregator
00471             // Path 1
00472             CompositionSpriteShape SpriteShape_02()
00473             {
00474                 // Offset:<195.67914, 156.45663>, Rotation:52.00000073708994 degrees, Scale:<1, 1>
00475                 var result = CreateSpriteShape(PathGeometry_01(), new Matrix3x2(0.615661502F, 0.788010776F, -0.788010776F, 0.615661502F, 195.679138F, 156.456635F));
00476                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00477                 result.StrokeDashCap = CompositionStrokeCap.Round;
00478                 result.StrokeStartCap = CompositionStrokeCap.Round;
00479                 result.StrokeEndCap = CompositionStrokeCap.Round;
00480                 result.StrokeMiterLimit = 2F;
00481                 result.StrokeThickness = 10F;
00482                 return result;
00483             }
00484
00485             // Layer aggregator
00486             // Path 1
00487             CompositionSpriteShape SpriteShape_03()
00488             {
00489                 // Offset:<198.61359, 155.8329>, Rotation:78.00000018744032 degrees, Scale:<1, 1>
00490                 var result = CreateSpriteShape(PathGeometry_02(), new Matrix3x2(0.2079117F, 0.978147626F, -0.978147626F, 0.2079117F, 198.613586F, 155.832901F));
00491                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00492                 result.StrokeDashCap = CompositionStrokeCap.Round;
00493                 result.StrokeStartCap = CompositionStrokeCap.Round;
00494                 result.StrokeEndCap = CompositionStrokeCap.Round;
00495                 result.StrokeMiterLimit = 2F;
00496                 result.StrokeThickness = 10F;
00497                 return result;
00498             }
00499
00500             // Layer aggregator
00501             // Path 1
00502             CompositionSpriteShape SpriteShape_04()
00503             {
00504                 // Offset:<201.52448, 156.55867>, Rotation:104.00000036039357 degrees
00505                 var result = CreateSpriteShape(PathGeometry_03(), new Matrix3x2(-0.241921902F, 0.970295727F, -0.970295727F, -0.241921902F, 201.524475F, 156.55867F));
00506                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00507                 result.StrokeDashCap = CompositionStrokeCap.Round;
00508                 result.StrokeStartCap = CompositionStrokeCap.Round;
00509                 result.StrokeEndCap = CompositionStrokeCap.Round;
00510                 result.StrokeMiterLimit = 2F;
00511                 result.StrokeThickness = 10F;
00512                 return result;
00513             }
00514
00515             // Layer aggregator
00516             // Path 1
00517             CompositionSpriteShape SpriteShape_05()
00518             {
00519                 // Offset:<203.8226, 158.48703>, Rotation:130.0000019177151 degrees
00520                 var result = CreateSpriteShape(PathGeometry_04(), new Matrix3x2(-0.642787635F, 0.766044438F, -0.766044438F, -0.642787635F, 203.822601F, 158.48703F));
00521                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00522                 result.StrokeDashCap = CompositionStrokeCap.Round;
00523                 result.StrokeStartCap = CompositionStrokeCap.Round;
00524                 result.StrokeEndCap = CompositionStrokeCap.Round;
00525                 result.StrokeMiterLimit = 2F;
00526                 result.StrokeThickness = 10F;
00527                 return result;
00528             }
00529
00530             // Layer aggregator
00531             // Path 1
00532             CompositionSpriteShape SpriteShape_06()
00533             {
00534                 // Offset:<205.04282, 161.22766>, Rotation:156.0000044610642 degrees
00535                 var result = CreateSpriteShape(PathGeometry_05(), new Matrix3x2(-0.913545489F, 0.406736642F, -0.406736642F, -0.913545489F, 205.042816F, 161.227661F));
00536                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00537                 result.StrokeDashCap = CompositionStrokeCap.Round;
00538                 result.StrokeStartCap = CompositionStrokeCap.Round;
00539                 result.StrokeEndCap = CompositionStrokeCap.Round;
00540                 result.StrokeMiterLimit = 2F;
00541                 result.StrokeThickness = 10F;
00542                 return result;
00543             }
00544
00545             // Layer aggregator
00546             // Path 1
00547             CompositionSpriteShape SpriteShape_07()
00548             {
00549                 // Offset:<204.93811, 164.22583>, Rotation:-178.0000222417307 degrees, Scale:<1, 1>
00550                 var result = CreateSpriteShape(PathGeometry_06(), new Matrix3x2(-0.9993909F, -0.034899503F, 0.034899503F, -0.9993909F, 204.93811F, 164.22583F));
00551                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00552                 result.StrokeDashCap = CompositionStrokeCap.Round;
00553                 result.StrokeStartCap = CompositionStrokeCap.Round;
00554                 result.StrokeEndCap = CompositionStrokeCap.Round;
00555                 result.StrokeMiterLimit = 2F;
00556                 result.StrokeThickness = 10F;
00557                 return result;
00558             }
00559
00560             // Layer aggregator
00561             // Path 1
00562             CompositionSpriteShape SpriteShape_08()
00563             {
00564                 // Offset:<203.5297, 166.87468>, Rotation:-151.99999734470822 degrees, Scale:<1, 1>
00565                 var result = CreateSpriteShape(PathGeometry_07(), new Matrix3x2(-0.882947624F, -0.469471633F, 0.469471633F, -0.882947624F, 203.529694F, 166.87468F));
00566                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00567                 result.StrokeDashCap = CompositionStrokeCap.Round;
00568                 result.StrokeStartCap = CompositionStrokeCap.Round;
00569                 result.StrokeEndCap = CompositionStrokeCap.Round;
00570                 result.StrokeMiterLimit = 2F;
00571                 result.StrokeThickness = 10F;
00572                 return result;
00573             }
00574
00575             // Layer aggregator
00576             // Path 1
00577             CompositionSpriteShape SpriteShape_09()
00578             {
00579                 // Offset:<201.10265, 168.63803>, Rotation:-125.99999693065644 degrees, Scale:<1, 1>
00580                 var result = CreateSpriteShape(PathGeometry_08(), new Matrix3x2(-0.587785244F, -0.809017062F, 0.809017062F, -0.587785244F, 201.102646F, 168.638031F));
00581                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00582                 result.StrokeDashCap = CompositionStrokeCap.Round;
00583                 result.StrokeStartCap = CompositionStrokeCap.Round;
00584                 result.StrokeEndCap = CompositionStrokeCap.Round;
00585                 result.StrokeMiterLimit = 2F;
00586                 result.StrokeThickness = 10F;
00587                 return result;
00588             }
00589
00590             // Layer aggregator
00591             // Path 1
00592             CompositionSpriteShape SpriteShape_10()
00593             {
00594                 // Offset:<198.14822, 169.15898>, Rotation:-99.99999771691004 degrees, Scale:<1, 1>
00595                 var result = CreateSpriteShape(PathGeometry_09(), new Matrix3x2(-0.173648149F, -0.984807849F, 0.984807849F, -0.173648149F, 198.148224F, 169.158981F));
00596                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00597                 result.StrokeDashCap = CompositionStrokeCap.Round;
00598                 result.StrokeStartCap = CompositionStrokeCap.Round;
00599                 result.StrokeEndCap = CompositionStrokeCap.Round;
00600                 result.StrokeMiterLimit = 2F;
00601                 result.StrokeThickness = 10F;
00602                 return result;
00603             }
00604
00605             // Layer aggregator
00606             // Path 1
00607             CompositionSpriteShape SpriteShape_11()
00608             {
00609                 // Offset:<195.26443, 168.33206>, Rotation:-73.999998250233 degrees,
00610                 // Scale:<1.0000001, 1.0000001>
00611                 var result = CreateSpriteShape(PathGeometry_10(), new Matrix3x2(0.275637418F, -0.961261809F, 0.961261809F, 0.275637418F, 195.264435F, 168.332062F));
00612                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00613                 result.StrokeDashCap = CompositionStrokeCap.Round;
00614                 result.StrokeStartCap = CompositionStrokeCap.Round;
00615                 result.StrokeEndCap = CompositionStrokeCap.Round;
00616                 result.StrokeMiterLimit = 2F;
00617                 result.StrokeThickness = 10F;
00618                 return result;
00619             }
00620
00621             // Layer aggregator
00622             // Path 1
00623             CompositionSpriteShape SpriteShape_12()
00624             {
00625                 // Offset:<193.035, 166.32468>, Rotation:-47.9999987246911 degrees,
00626                 // Scale:<1.0000001, 1.0000001>
00627                 var result = CreateSpriteShape(PathGeometry_11(), new Matrix3x2(0.669130743F, -0.743144929F, 0.743144929F, 0.669130743F, 193.035004F, 166.324677F));
00628                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00629                 result.StrokeDashCap = CompositionStrokeCap.Round;
00630                 result.StrokeStartCap = CompositionStrokeCap.Round;
00631                 result.StrokeEndCap = CompositionStrokeCap.Round;
00632                 result.StrokeMiterLimit = 2F;
00633                 result.StrokeThickness = 10F;
00634                 return result;
00635             }
00636
00637             // Layer aggregator
00638             // Path 1
00639             CompositionSpriteShape SpriteShape_13()
00640             {
00641                 // Offset:<191.91118, 163.54312>, Rotation:-22.000004635862652 degrees,
00642                 // Scale:<1.0000002, 1.0000002>
00643                 var result = CreateSpriteShape(PathGeometry_12(), new Matrix3x2(0.927184045F, -0.374606639F, 0.374606639F, 0.927184045F, 191.911179F, 163.543121F));
00644                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00645                 result.StrokeDashCap = CompositionStrokeCap.Round;
00646                 result.StrokeStartCap = CompositionStrokeCap.Round;
00647                 result.StrokeEndCap = CompositionStrokeCap.Round;
00648                 result.StrokeMiterLimit = 2F;
00649                 result.StrokeThickness = 10F;
00650                 return result;
00651             }
00652
00653             // Layer aggregator
00654             // Path 1
00655             CompositionSpriteShape SpriteShape_14()
00656             {
00657                 // Offset:<192.12045, 160.55043>, Rotation:4.000026206779586 degrees,
00658                 // Scale:<1.0000002, 1.0000002>
00659                 var result = CreateSpriteShape(PathGeometry_13(), new Matrix3x2(0.997564256F, 0.0697565377F, -0.0697565377F, 0.997564256F, 192.120453F, 160.55043F));
00660                 result.StrokeBrush = _colorBrush_AlmostGoldenrod_FFE4950C;
00661                 result.StrokeDashCap = CompositionStrokeCap.Round;
00662                 result.StrokeStartCap = CompositionStrokeCap.Round;
00663                 result.StrokeEndCap = CompositionStrokeCap.Round;
00664                 result.StrokeMiterLimit = 2F;
00665                 result.StrokeThickness = 10F;
00666                 return result;
00667             }
00668
00669             // Layer aggregator
00670             // Path 1
00671             CompositionSpriteShape SpriteShape_15()
00672             {
00673                 // Offset:<202, 162>, Rotation:-0.008999309291422224 degrees,
00674                 // Scale:<1.1669357, 1.05751>
00675                 var result = CreateSpriteShape(PathGeometry_14(), new Matrix3x2(1.16693568F, 0F, 0F, 1.05751002F, 202F, 162F), ColorBrush_SemiTransparentWhite());
00676                 return result;
00677             }
00678
00679             // The root of the composition.
00680             ContainerVisual Root()
00681             {
00682                 var result = _root = _c.CreateContainerVisual();
00683                 var propertySet = result.Properties;
00684                 propertySet.InsertScalar("Progress", 0F);
00685                 // Layer aggregator
00686                 result.Children.InsertAtTop(ShapeVisual_0());
00687                 return result;
00688             }
00689
00690             ExpressionAnimation RootProgress()
00691             {
00692                 var result = _rootProgress = _c.CreateExpressionAnimation("_.Progress");
00693                 result.SetReferenceParameter("_", _root);
00694                 return result;
00695             }
00696
00697             // TEnd
00698             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0()
00699             {
00700                 var result = _tEndScalarAnimation_1_to_0 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
00701                 result.InsertKeyFrame(0.125F, 1F, _holdThenStepEasingFunction);
00702                 result.InsertKeyFrame(0.75F, 0F, _c.CreateCubicBezierEasingFunction(new Vector2(0F, 0F), new Vector2(0F, 0.899999976F)));
00703                 return result;
00704             }
00705
00706             // TStart
00707             ScalarKeyFrameAnimation TStartScalarAnimation_1_to_0()
00708             {
00709                 var result = _tStartScalarAnimation_1_to_0 = CreateScalarKeyFrameAnimation(0F, 1F, HoldThenStepEasingFunction());
00710                 result.InsertKeyFrame(0.649999976F, 0F, _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0F), new Vector2(0F, 0.896000028F)));
00711                 return result;
00712             }
00713
00714             // Layer aggregator
00715             ShapeVisual ShapeVisual_0()
00716             {
00717                 var result = _c.CreateShapeVisual();
00718                 result.Size = new Vector2(380F, 324F);
00719                 var shapes = result.Shapes;
00720                 // Scale:0.8,0.8, Offset:<178.4, 151.2>
00721                 shapes.Add(SpriteShape_00());
00722                 // Offset:<192, 161>
00723                 shapes.Add(SpriteShape_01());
00724                 // Offset:<192, 161>
00725                 shapes.Add(SpriteShape_02());
00726                 // Offset:<192, 161>
00727                 shapes.Add(SpriteShape_03());
00728                 // Offset:<192, 161>
00729                 shapes.Add(SpriteShape_04());
00730                 // Offset:<192, 161>
00731                 shapes.Add(SpriteShape_05());
00732                 // Offset:<192, 161>
00733                 shapes.Add(SpriteShape_06());
00734                 // Offset:<192, 161>
00735                 shapes.Add(SpriteShape_07());
00736                 // Offset:<192, 161>
00737                 shapes.Add(SpriteShape_08());
00738                 // Offset:<192, 161>
00739                 shapes.Add(SpriteShape_09());
00740                 // Offset:<192, 161>
00741                 shapes.Add(SpriteShape_10());
00742                 // Offset:<192, 161>
00743                 shapes.Add(SpriteShape_11());
00744                 // Offset:<192, 161>
00745                 shapes.Add(SpriteShape_12());
00746                 // Offset:<192, 161>
00747                 shapes.Add(SpriteShape_13());
00748                 // Offset:<192, 161>
00749                 shapes.Add(SpriteShape_14());
00750                 // Scale:0.70016,1.05751, Offset:<202, 162>
00751                 shapes.Add(SpriteShape_15());
00752                 return result;
00753             }
00754
00755             StepEasingFunction HoldThenStepEasingFunction()
00756             {
00757                 var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
00758                 result.IsFinalStepSingleFrame = true;
00759                 return result;
00760             }
00761
00762             // TEnd
00763             StepEasingFunction StepThenHoldEasingFunction()
00764             {
00765                 var result = _c.CreateStepEasingFunction();
00766                 result.IsInitialStepSingleFrame = true;
00767                 return result;
00768             }
00769
00770             internal BrightnessSun_AnimatedVisual(
00771                 Compositor compositor
00772                 )
00773             {
00774                 _c = compositor;
00775                 _reusableExpressionAnimation = compositor.CreateExpressionAnimation();
00776                 Root();
00777             }
00778
00779             public Visual RootVisual => _root;
00780             public TimeSpan Duration => TimeSpan.FromTicks(c_durationTicks);
00781             public Vector2 Size => new Vector2(380F, 324F);
00782             void IDisposable.Dispose() => _root?.Dispose();
00783         }
00784     }
00785 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar_TestUI/MenuBarPage.xaml.cs Source File

  • File List
  • File Members
  • MenuBar
  • MenuBar_TestUI

MenuBarPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.Foundation.Metadata;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Automation;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Xaml.Input;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     [TopLevelTestPage(Name = "MenuBar", Icon = "MenuBar.png")]
00013     [AxeScanTestPage(Name = "MenuBar-Axe")]
00014     public sealed partial class MenuBarPage : TestPage
00015     {
00016         public MenuBarPage()
00017         {
00018             this.InitializeComponent();
00019
00020             FileItem.AccessKey = "A";
00021             NewItem.AccessKey = "B";
00022
00023             var cutCommand = new StandardUICommand(StandardUICommandKind.Cut);
00024             cutCommand.ExecuteRequested += CutCommand_ExecuteRequested;
00025             CutItem.Command = cutCommand;
00026
00027             var accelerator = new KeyboardAccelerator();
00028             accelerator.Modifiers = Windows.System.VirtualKeyModifiers.Control;
00029             accelerator.Key = Windows.System.VirtualKey.Z;
00030             UndoItem.KeyboardAccelerators.Add(accelerator);
00031
00032             UndoItem.Click += UndoItem_Click;
00033         }
00034
00035         private void UndoItem_Click(object sender, RoutedEventArgs e)
00036         {
00037             TextOutput.Text = "Undo Clicked";
00038         }
00039
00040         private void CutCommand_ExecuteRequested(XamlUICommand sender, ExecuteRequestedEventArgs args)
00041         {
00042             TextOutput.Text = "Cut Clicked";
00043         }
00044
00045         private void AddMenuBarItem_Click(object sender, RoutedEventArgs e)
00046         {
00047             var item = new MenuBarItem();
00048             item.Title = "New Menu Bar Item";
00049             menuBar.Items.Add(item);
00050         }
00051
00052         private void RemoveMenuBarItem_Click(object sender, RoutedEventArgs e)
00053         {
00054             var size = menuBar.Items.Count;
00055             menuBar.Items.RemoveAt(size - 1);
00056         }
00057
00058         private void AddFlyoutItem_Click(object sender, RoutedEventArgs e)
00059         {
00060             var item = new MenuFlyoutItem();
00061             item.Text = "New Flyout Item";
00062             FileItem.Items.Add(item);
00063         }
00064
00065         private void RemoveFlyoutItem_Click(object sender, RoutedEventArgs e)
00066         {
00067             var size = FileItem.Items.Count;
00068             FileItem.Items.RemoveAt(size - 1);
00069         }
00070
00071         private void NewItem_Click(object sender, RoutedEventArgs e)
00072         {
00073             TextOutput.Text = "New Clicked";
00074         }
00075
00076         private void TestFrameCheckbox_Checked(object sender, RoutedEventArgs e)
00077         {
00078             UpdateTestFrameVisibility(Visibility.Visible);
00079         }
00080
00081         private void TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e)
00082         {
00083             UpdateTestFrameVisibility(Visibility.Collapsed);
00084         }
00085
00086         private void AddMenuBarToEmptyMenuBarItem_Click(object sender, RoutedEventArgs e)
00087         {
00088             int eCount = EmptyMenuBar.Items.Count;
00089             MenuBarItem mainMenuBarHelp = new MenuBarItem();
00090             mainMenuBarHelp.Title = "Help" + eCount;
00091             mainMenuBarHelp.SetValue(AutomationProperties.NameProperty, "Help" + eCount);
00092             MenuFlyoutItem newFlyout = new MenuFlyoutItem() { Text = "Add" + eCount };
00093             // UIA Name for interaction test
00094             newFlyout.SetValue(AutomationProperties.NameProperty, "Add" + eCount);
00095             mainMenuBarHelp.Items.Add(newFlyout);
00096
00097             mainMenuBarHelp.Items.Add(new MenuFlyoutItem() { Text = "Remove" + eCount });
00098             EmptyMenuBar.Items.Add(mainMenuBarHelp);
00099         }
00100
00101         private void RemoveItemsFromOneChildrenItem_Click(object sender, RoutedEventArgs e)
00102         {
00103             OneChildrenFlyoutMenuBarItem.Items.Clear();
00104         }
00105     }
00106 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorSpectrumProperties Member List

This is the complete list of members for ColorSpectrumProperties, including all inherited members.
ClearProperties() | ColorSpectrumProperties | [static]
Color(winrt::Color const &value) | ColorSpectrumProperties |
Color() | ColorSpectrumProperties |
ColorChanged(winrt::TypedEventHandler< winrt::ColorSpectrum, winrt::ColorChangedEventArgs > const &value) | ColorSpectrumProperties |
ColorChanged(winrt::event_token const &token) | ColorSpectrumProperties |
ColorProperty() | ColorSpectrumProperties | [inline, static]
ColorSpectrumProperties() | ColorSpectrumProperties |
Components(winrt::ColorSpectrumComponents const &value) | ColorSpectrumProperties |
Components() | ColorSpectrumProperties |
ComponentsProperty() | ColorSpectrumProperties | [inline, static]
EnsureProperties() | ColorSpectrumProperties | [static]
HsvColor(winrt::float4 const &value) | ColorSpectrumProperties |
HsvColor() | ColorSpectrumProperties |
HsvColorProperty() | ColorSpectrumProperties | [inline, static]
m_colorChangedEventSource | ColorSpectrumProperties |
MaxHue(int value) | ColorSpectrumProperties |
MaxHue() | ColorSpectrumProperties |
MaxHueProperty() | ColorSpectrumProperties | [inline, static]
MaxSaturation(int value) | ColorSpectrumProperties |
MaxSaturation() | ColorSpectrumProperties |
MaxSaturationProperty() | ColorSpectrumProperties | [inline, static]
MaxValue(int value) | ColorSpectrumProperties |
MaxValue() | ColorSpectrumProperties |
MaxValueProperty() | ColorSpectrumProperties | [inline, static]
MinHue(int value) | ColorSpectrumProperties |
MinHue() | ColorSpectrumProperties |
MinHueProperty() | ColorSpectrumProperties | [inline, static]
MinSaturation(int value) | ColorSpectrumProperties |
MinSaturation() | ColorSpectrumProperties |
MinSaturationProperty() | ColorSpectrumProperties | [inline, static]
MinValue(int value) | ColorSpectrumProperties |
MinValue() | ColorSpectrumProperties |
MinValueProperty() | ColorSpectrumProperties | [inline, static]
OnColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnComponentsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnHsvColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMaxHuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMaxSaturationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMaxValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMinHuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMinSaturationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnMinValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
OnShapePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColorSpectrumProperties | [static]
s_ColorProperty | ColorSpectrumProperties | [static]
s_ComponentsProperty | ColorSpectrumProperties | [static]
s_HsvColorProperty | ColorSpectrumProperties | [static]
s_MaxHueProperty | ColorSpectrumProperties | [static]
s_MaxSaturationProperty | ColorSpectrumProperties | [static]
s_MaxValueProperty | ColorSpectrumProperties | [static]
s_MinHueProperty | ColorSpectrumProperties | [static]
s_MinSaturationProperty | ColorSpectrumProperties | [static]
s_MinValueProperty | ColorSpectrumProperties | [static]
s_ShapeProperty | ColorSpectrumProperties | [static]
Shape(winrt::ColorSpectrumShape const &value) | ColorSpectrumProperties |
Shape() | ColorSpectrumProperties |
ShapeProperty() | ColorSpectrumProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerAddScrollVelocityRequestedEventArgs.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollControllerAddScrollVelocityRequestedEventArgs.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollControllerAddScrollVelocityRequestedEventArgs.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollControllerAddScrollVelocityRequestedEventArgs)
00012 }
00013
00014 #include "ScrollControllerAddScrollVelocityRequestedEventArgs.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

OffsetsChangeWithAdditionalVelocity Member List

This is the complete list of members for OffsetsChangeWithAdditionalVelocity, including all inherited members.
AnticipatedOffsetsChange() const | OffsetsChangeWithAdditionalVelocity | [inline]
AnticipatedOffsetsChange(winrt::float2 const &anticipatedOffsetsChange) | OffsetsChangeWithAdditionalVelocity |
InertiaDecayRate() const | OffsetsChangeWithAdditionalVelocity | [inline]
InertiaDecayRate(winrt::IReference< winrt::float2 > const &inertiaDecayRate) | OffsetsChangeWithAdditionalVelocity |
OffsetsChangeWithAdditionalVelocity(winrt::float2 offsetsVelocity, winrt::float2 anticipatedOffsetsChange, winrt::IReference< winrt::float2 > inertiaDecayRate) | OffsetsChangeWithAdditionalVelocity |
OffsetsVelocity() const | OffsetsChangeWithAdditionalVelocity | [inline]
OffsetsVelocity(winrt::float2 const &offsetsVelocity) | OffsetsChangeWithAdditionalVelocity |
~OffsetsChangeWithAdditionalVelocity() | OffsetsChangeWithAdditionalVelocity |
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControl.cpp Source File

  • File List
  • File Members
  • MapControl

MapControl.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MapControl.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009 #include "WebView2.h"
00010 #include <winrt/Microsoft.UI.Xaml.Controls.h>
00011 #include <winrt/Windows.Devices.Geolocation.h>
00012 #include <winrt/Windows.Foundation.h>
00013 #include <winrt/windows.data.json.h>
00014 #include "MapElementClickEventArgs.h"
00015 #include "MapControlMapServiceErrorOccurredEventArgs.h"
00016 #include "MapElementsLayer.h"
00017 #include "Vector.h"
00018 #include "MuxcTraceLogging.h"
00019
00020 winrt::hstring MapControl::s_mapHtmlContent{};
00021
00022 MapControl::MapControl()
00023 {
00024     SetDefaultStyleKey(this);
00025
00026     // Create layers vector that can hold MapElements to display information and be interacted with on the map
00027     auto layers = winrt::make<Vector<winrt::MapLayer>>().as<winrt::IObservableVector<winrt::MapLayer>>();
00028     layers.VectorChanged({ this, &MapControl::OnLayersVectorChanged });
00029     SetValue(s_LayersProperty, layers);
00030 }
00031
00032 void MapControl::OnApplyTemplate()
00033 {
00034     m_webviewWebMessageReceivedRevoker.revoke();
00035     m_webviewNavigationCompletedRevoker.revoke();
00036
00037     winrt::IControlProtected thisAsControlProtected = *this;
00038     if (auto webview = GetTemplateChildT<winrt::WebView2>(L"PART_WebView2", thisAsControlProtected))
00039     {
00040         m_webView.set(webview);
00041
00042         m_webviewWebMessageReceivedRevoker = webview.WebMessageReceived(winrt::auto_revoke, { this, &MapControl::WebMessageReceived });
00043         m_webviewNavigationCompletedRevoker = webview.NavigationCompleted(winrt::auto_revoke, {
00044         [this](auto const&, winrt::CoreWebView2NavigationCompletedEventArgs const& args)
00045         {
00046             XamlTelemetry::MapControl_WebViewNavigationCompleted(reinterpret_cast<uint64_t>(this));
00047             InitializeWebMap();
00048         }});
00049
00050         SetUpWebView();
00051     }
00052 }
00053
00054 winrt::IAsyncOperation<winrt::CoreWebView2> MapControl::GetCoreWebView2()
00055 {
00056     if (auto webView = m_webView.get())
00057     {
00058         co_await webView.EnsureCoreWebView2Async();
00059         co_return webView.CoreWebView2();
00060     }
00061     co_return nullptr;
00062 }
00063
00064 winrt::fire_and_forget MapControl::SetUpWebView()
00065 {
00066     if (auto webView = m_webView.get())
00067     {
00068         auto core = co_await GetCoreWebView2();
00069
00070         // azure maps might not be displayed correctly with tracking prevention enabled
00071         core.Profile().PreferredTrackingPreventionLevel(winrt::CoreWebView2TrackingPreventionLevel::None);
00072         webView.NavigateToString(co_await GetMapHtmlContent());
00073     }
00074 }
00075
00076 winrt::IAsyncOperation<winrt::hstring> MapControl::InitializeWebMap()
00077 {
00078     XamlTelemetry::MapControl_InitializeWebMap(true, reinterpret_cast<uint64_t>(this));
00079
00080     winrt::hstring returnedValue{};
00081     auto center = Center();
00082     winrt::hstring pos = L"0,0";
00083     if (center != nullptr)
00084     {
00085         const auto centerPosition = center.Position();
00086         pos = std::format(L"{},{}", centerPosition.Longitude, centerPosition.Latitude);
00087     }
00088
00089     auto token = winrt::Windows::Data::Json::JsonValue::CreateStringValue(MapServiceToken());
00090     // Initializing Azure Maps on WebView
00091     // params: longitude, latitude, mapServiceToken
00092     auto script = std::format(L"initializeMap({},{});", pos, token.Stringify().c_str());
00093
00094     if (auto webView = m_webView.get())
00095     {
00096         auto core = webView.CoreWebView2();
00097         returnedValue = co_await core.ExecuteScriptAsync(script);
00098
00099         for (uint32_t i = 0; i < Layers().Size(); i++)
00100         {
00101             winrt::MapElementsLayer layer = Layers().GetAt(i).as<winrt::MapElementsLayer>();
00102             OnLayerAdded(layer);
00103         }
00104     }
00105     UpdateControlsInWebPage();
00106
00107     XamlTelemetry::MapControl_InitializeWebMap(false, reinterpret_cast<uint64_t>(this));
00108     co_return returnedValue;
00109 }
00110
00111 void MapControl::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00112 {
00113     winrt::IDependencyProperty property = args.Property();
00114
00115     if (property == s_MapServiceTokenProperty)
00116     {
00117         UpdateMapServiceTokenInWebPage();
00118     }
00119     else if (property == s_CenterProperty)
00120     {
00121         UpdateCenterInWebPage();
00122     }
00123     else if (property == s_ZoomLevelProperty)
00124     {
00125         UpdateZoomLevelInWebPage();
00126     }
00127     else if (property == s_InteractiveControlsVisibleProperty)
00128     {
00129         UpdateControlsInWebPage();
00130     }
00131 }
00132
00133 // Updates Azure Maps Authentication Key on WebView
00134 winrt::fire_and_forget MapControl::UpdateMapServiceTokenInWebPage()
00135 {
00136     if (auto webView = m_webView.get())
00137     {
00138         auto core = co_await GetCoreWebView2();
00139         // Sends new token to WebView
00140         // params: mapServiceToken
00141         auto token = winrt::Windows::Data::Json::JsonValue::CreateStringValue(MapServiceToken());
00142         auto script = std::format(L"updateMapServiceToken({});", token.Stringify().c_str());
00143         co_await core.ExecuteScriptAsync(script);
00144
00145         for (uint32_t i = 0; i < Layers().Size(); i++)
00146         {
00147             winrt::MapElementsLayer layer = Layers().GetAt(i).try_as<winrt::MapElementsLayer>();
00148             OnLayerAdded(layer);
00149         }
00150
00151         UpdateControlsInWebPage();
00152         UpdateCenterInWebPage();
00153         UpdateZoomLevelInWebPage();
00154     }
00155 }
00156
00157 winrt::fire_and_forget MapControl::UpdateCenterInWebPage()
00158 {
00159     if (auto webView = m_webView.get())
00160     {
00161         auto core = co_await GetCoreWebView2();
00162
00163         auto newCenter = Center().Position();
00164         auto pos = std::format(L"{},{}", newCenter.Longitude, newCenter.Latitude);
00165         // Updates center of map in WebView
00166         // params: longitude, latitude
00167         co_await core.ExecuteScriptAsync(L"updateCenter(" + pos + L")");
00168     }
00169 }
00170
00171 winrt::fire_and_forget MapControl::UpdateZoomLevelInWebPage()
00172 {
00173     if (auto webView = m_webView.get())
00174     {
00175         auto core = co_await GetCoreWebView2();
00176         core.ExecuteScriptAsync(L"updateZoom(" + winrt::to_hstring(ZoomLevel()) + L")");
00177     }
00178 }
00179
00180 winrt::fire_and_forget MapControl::UpdateControlsInWebPage()
00181 {
00182     if (auto webView = m_webView.get())
00183     {
00184         auto core = co_await GetCoreWebView2();
00185         core.ExecuteScriptAsync(L"interactiveControlsVisible(" + winrt::to_hstring(InteractiveControlsVisible()) + L")");
00186     }
00187 }
00188
00189 void MapControl::WebMessageReceived(winrt::WebView2 sender, winrt::CoreWebView2WebMessageReceivedEventArgs args)
00190 {
00191     auto jsonAsString = args.WebMessageAsJson();
00192     if (!jsonAsString.empty())
00193     {
00194         winrt::Windows::Data::Json::JsonObject obj = winrt::Windows::Data::Json::JsonObject();
00195         if (winrt::Windows::Data::Json::JsonObject::TryParse(jsonAsString, obj))
00196         {
00197             auto type = obj.TryLookup(L"type");
00198             // Handles click events on MapElements
00199             if (type.GetString() == L"pushpinClickEvent")
00200             {
00201                 auto clickedLayer = Layers().GetAt(static_cast<uint32_t>(obj.TryLookup(L"layer").GetNumber())).try_as<MapElementsLayer>();
00202                 auto location = winrt::Geopoint{ winrt::BasicGeoposition{
00203                     obj.TryLookup(L"coordinate").GetObject().TryLookup(L"longitude").GetNumber(),
00204                     obj.TryLookup(L"coordinate").GetObject().TryLookup(L"latitude").GetNumber() }};
00205
00206                 auto pointId = obj.TryLookup(L"point").GetNumber();
00207                 winrt::MapElement clickedElement{nullptr};
00208                 auto elements = clickedLayer->MapElements();
00209                 for (uint32_t i = 0; i < elements.Size(); i++)
00210                 {
00211                     auto elem = elements.GetAt(i);
00212                     if (winrt::get_self<MapElement>(elem)->Id == winrt::to_hstring(pointId))
00213                     {
00214                         clickedElement = elem.try_as<winrt::MapElement>();
00215                     }
00216                 }
00217                 auto clickArgs = winrt::make_self<MapElementClickEventArgs>(location, clickedElement);
00218                 m_mapElementClickEventSource(*this, *clickArgs);
00219
00220                 clickedLayer->RaiseMapElementClick(*clickArgs);
00221             }
00222             // Raises error events from WebView
00223             else if (type.GetString() == L"javascriptError")
00224             {
00225                 auto errorArgs = winrt::make_self<MapControlMapServiceErrorOccurredEventArgs>(jsonAsString);
00226                 XamlTelemetry::MapControl_WebMessageReceived_Error(reinterpret_cast<uint64_t>(this), jsonAsString.data());
00227                 m_mapServiceErrorOccurredEventSource(*this, *errorArgs);
00228             }
00229         }
00230     }
00231 }
00232
00233 winrt::fire_and_forget MapControl::ClearLayer(winrt::hstring layerId)
00234 {
00235     if (auto webView = m_webView.get())
00236     {
00237         auto core = co_await GetCoreWebView2();
00238         co_await core.ExecuteScriptAsync(L"clearLayer(" + layerId + L");");
00239     }
00240 }
00241
00242 winrt::fire_and_forget MapControl::ResetLayerCollection()
00243 {
00244     if (auto webView = m_webView.get())
00245     {
00246         auto core = co_await GetCoreWebView2();
00247
00248         for (uint32_t i = 0; i < Layers().Size(); i++)
00249         {
00250             winrt::MapElementsLayer layer = Layers().GetAt(i).as<winrt::MapElementsLayer>();
00251             auto layerId = winrt::get_self<MapElementsLayer>(layer)->Id;
00252             co_await core.ExecuteScriptAsync(L"clearLayer(" + winrt::to_hstring(layerId) + L");");
00253
00254             auto elements = layer.MapElements();
00255             for (uint32_t j = 0; j < elements.Size(); j++)
00256             {
00257                 auto element = elements.GetAt(j);
00258                 auto location = element.as<winrt::MapIcon>().Location();
00259                 winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(location,  layerId);
00260             }
00261         }
00262     }
00263 }
00264
00265 void MapControl::OnLayersVectorChanged(const winrt::IObservableVector<winrt::MapLayer>&, const winrt::Collections::IVectorChangedEventArgs& args)
00266 {
00267     if (args.CollectionChange() == winrt::Collections::CollectionChange::ItemInserted)
00268     {
00269         if (winrt::MapElementsLayer elementLayer = Layers().GetAt(args.Index()).try_as<winrt::MapElementsLayer>())
00270         {
00271             OnLayerAdded(elementLayer);
00272         }
00273     }
00274     else if (args.CollectionChange() == winrt::Collections::CollectionChange::ItemRemoved)
00275     {
00276
00277         if (winrt::MapElementsLayer elementLayer = Layers().GetAt(args.Index()).try_as<winrt::MapElementsLayer>())
00278         {
00279             auto layerId = winrt::get_self<MapElementsLayer>(elementLayer)->Id;
00280             ClearLayer(layerId);
00281         }
00282     }
00283     else if (args.CollectionChange() == winrt::Collections::CollectionChange::Reset)
00284     {
00285         ResetLayerCollection();
00286     }
00287 }
00288
00289 winrt::fire_and_forget MapControl::OnLayerAdded(const winrt::MapElementsLayer layer)
00290 {
00291     auto mapLayer = winrt::get_self<MapElementsLayer>(layer);
00292     mapLayer->SetParentMapControl(*this);
00293     if (auto webView = m_webView.get())
00294     {
00295         auto core = co_await GetCoreWebView2();
00296         auto layerId = winrt::get_self<MapElementsLayer>(layer)->Id;
00297         winrt::get_self<MapElementsLayer>(layer)->Id = co_await core.ExecuteScriptAsync(L"addSymbolLayer();");
00298
00299         auto elements = layer.MapElements();
00300         for (uint32_t i = 0; i < elements.Size(); i++)
00301         {
00302             auto element = elements.GetAt(i);
00303             auto location = element.as<winrt::MapIcon>().Location();
00304             winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(location,  winrt::get_self<MapElementsLayer>(layer)->Id);
00305         }
00306     }
00307 }
00308
00309 winrt::IAsyncOperation<winrt::hstring> MapControl::AddMapIcon(winrt::Geopoint mapIconPoint, winrt::hstring layerId)
00310 {
00311     winrt::hstring returnedValue{};
00312     if (auto webView = m_webView.get())
00313     {
00314         auto core = co_await GetCoreWebView2();
00315
00316         const auto mapIconPosition = mapIconPoint.Position();
00317         const auto latitude = winrt::to_hstring(mapIconPosition.Latitude);
00318         const auto longitude = winrt::to_hstring(mapIconPosition.Longitude);
00319
00320         returnedValue = co_await core.ExecuteScriptAsync(L"addPoint(" + longitude + L", " + latitude + L"," + layerId + L");");
00321     }
00322     co_return returnedValue;
00323 }
00324
00325 winrt::fire_and_forget MapControl::RemoveMapIcon(winrt::hstring pointId, winrt::hstring layerId)
00326 {
00327     if (auto webView = m_webView.get())
00328     {
00329         auto core = co_await GetCoreWebView2();
00330
00331         auto result = co_await core.ExecuteScriptAsync(L"removePoint(" + pointId + L"," + layerId + L");");
00332     }
00333 }
00334
00335 winrt::fire_and_forget MapControl::UpdateMapIcon(winrt::Geopoint mapIconPoint, winrt::hstring pointId, winrt::hstring layerId)
00336 {
00337     if (auto webView = m_webView.get())
00338     {
00339         auto core = co_await GetCoreWebView2();
00340
00341         const auto mapIconPosition = mapIconPoint.Position();
00342         const auto latitude = winrt::to_hstring(mapIconPosition.Latitude);
00343         const auto longitude = winrt::to_hstring(mapIconPosition.Longitude);
00344
00345         co_await core.ExecuteScriptAsync(L"updatePoint(" + longitude + L", " + latitude + L"," + pointId + L"," + layerId + L");");
00346     }
00347 }
00348
00349 winrt::IAsyncAction MapControl::LayerElementsChanged(const winrt::MapElementsLayer& layer, winrt::IVector<winrt::MapElement> elements, const winrt::Collections::IVectorChangedEventArgs& args, winrt::hstring elementId)
00350 {
00351     const auto index = args.Index();
00352     auto layerId = winrt::get_self<MapElementsLayer>(layer)->Id;
00353
00354     switch (args.CollectionChange())
00355     {
00356     case winrt::Collections::CollectionChange::ItemInserted:
00357     {
00358         auto element = elements.GetAt(index);
00359         winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(element.as<winrt::MapIcon>().Location(), layerId);
00360         break;
00361     }
00362     case winrt::Collections::CollectionChange::ItemRemoved:
00363         RemoveMapIcon(elementId,  layerId);
00364         break;
00365     case winrt::Collections::CollectionChange::ItemChanged:
00366     {
00367         auto element = elements.GetAt(index);
00368         RemoveMapIcon(elementId, layerId);
00369         winrt::get_self<MapElement>(element)->Id = co_await AddMapIcon(element.as<winrt::MapIcon>().Location(), layerId);
00370         break;
00371     }
00372     case winrt::Collections::CollectionChange::Reset:
00373     {
00374         OnLayerAdded(layer);
00375         break;
00376     }
00377     }
00378     co_return;
00379 }
00380
00381 winrt::IAsyncOperation<winrt::hstring> MapControl::GetMapHtmlContent()
00382 {
00383     if (s_mapHtmlContent.size() == 0)
00384     {
00385         s_mapHtmlContent = co_await ResourceAccessor::GetFileContents(FR_Map_Html);
00386     }
00387
00388     co_return s_mapHtmlContent;
00389 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterBringIntoViewTests.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • APITests

ScrollPresenterBringIntoViewTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using System.Threading;
00007 using Windows.Foundation;
00008 using Windows.UI;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Controls.Primitives;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Shapes;
00014 using Microsoft.UI.Private.Controls;
00015
00016 using WEX.TestExecution;
00017 using WEX.TestExecution.Markup;
00018 using WEX.Logging.Interop;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00021 {
00022     partial class ScrollPresenterTests : ApiTestBase
00023     {
00024         private const double c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize = 600.0;
00025         private const double c_defaultBringIntoViewUIScrollPresenterConstrainedSize = 300.0;
00026         private const int c_defaultBringIntoViewUIStackPanelChildrenCount = 16;
00027
00028         [TestMethod]
00029         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view.")]
00030         public void BringElementIntoHorizontalScrollPresenterViewFromNearEdge()
00031         {
00032             BringElementIntoView(Orientation.Horizontal, 1083.0 /*expectedHorizontalOffset*/, 0.0 /*expectedVerticalOffset*/);
00033         }
00034
00035         [TestMethod]
00036         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view, with snap points.")]
00037         public void BringElementIntoHorizontalScrollPresenterViewWithSnapPoints()
00038         {
00039             BringElementIntoView(
00040                 orientation: Orientation.Horizontal,
00041                 expectedHorizontalOffset: 1134.0,
00042                 expectedVerticalOffset: 0.0,
00043                 options: null,
00044                 originalHorizontalOffset: 0.0,
00045                 originalVerticalOffset: 0.0,
00046                 originalZoomFactor: 1.0f,
00047                 applyOptionsInBringingIntoViewHandler: false,
00048                 applySnapPointsInBringingIntoViewHandler: true);
00049         }
00050
00051         [TestMethod]
00052         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view.")]
00053         public void BringElementIntoVerticalScrollPresenterViewFromNearEdge()
00054         {
00055             BringElementIntoView(Orientation.Vertical, 0.0 /*expectedHorizontalOffset*/, 1083.0 /*expectedVerticalOffset*/);
00056         }
00057
00058         [TestMethod]
00059         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view, with snap points.")]
00060         public void BringElementIntoVerticalScrollPresenterViewWithSnapPoints()
00061         {
00062             BringElementIntoView(
00063                 orientation: Orientation.Vertical,
00064                 expectedHorizontalOffset: 0.0,
00065                 expectedVerticalOffset: 1134.0,
00066                 options: null,
00067                 originalHorizontalOffset: 0.0,
00068                 originalVerticalOffset: 0.0,
00069                 originalZoomFactor: 1.0f,
00070                 applyOptionsInBringingIntoViewHandler: false,
00071                 applySnapPointsInBringingIntoViewHandler: true);
00072         }
00073
00074         [TestMethod]
00075         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view, starting from the maximum offset.")]
00076         public void BringElementIntoHorizontalScrollPresenterViewFromFarEdge()
00077         {
00078             BringElementIntoView(
00079                 Orientation.Horizontal,
00080                 3126.0 /*expectedHorizontalOffset*/,
00081                 130.0 /*expectedVerticalOffset*/,
00082                 null /*options*/,
00083                 3624.0 /*originalHorizontalOffset*/,
00084                 0.0 /*originalVerticalOffset*/,
00085                 2.0f /*originalZoomFactor*/);
00086         }
00087
00088         [TestMethod]
00089         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view, starting from the maximum offset.")]
00090         public void BringElementIntoVerticalScrollPresenterViewFromFarEdge()
00091         {
00092             BringElementIntoView(
00093                 Orientation.Vertical,
00094                 130.0 /*expectedHorizontalOffset*/,
00095                 3126.0 /*expectedVerticalOffset*/,
00096                 null /*options*/,
00097                 0.0 /*originalHorizontalOffset*/,
00098                 3624.0 /*originalVerticalOffset*/,
00099                 2.0f /*originalZoomFactor*/);
00100         }
00101
00102         [TestMethod]
00103         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view, with left alignment.")]
00104         public void BringElementIntoHorizontalScrollPresenterViewWithNearAlignment()
00105         {
00106             BringElementIntoViewWithAlignment(
00107                 Orientation.Horizontal,
00108                 0.0 /*alignmentRatio*/,
00109                 1512.0 /*expectedHorizontalOffset*/,
00110                 0.0 /*expectedVerticalOffset*/);
00111         }
00112
00113         [TestMethod]
00114         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view, with center alignment.")]
00115         public void BringElementIntoHorizontalScrollPresenterViewWithMiddleAlignment()
00116         {
00117             BringElementIntoViewWithAlignment(
00118                 Orientation.Horizontal,
00119                 0.5 /*alignmentRatio*/,
00120                 1323.0 /*expectedHorizontalOffset*/,
00121                 0.0 /*expectedVerticalOffset*/);
00122         }
00123
00124         [TestMethod]
00125         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view, with right alignment.")]
00126         public void BringElementIntoHorizontalScrollPresenterViewWithFarAlignment()
00127         {
00128             BringElementIntoViewWithAlignment(
00129                 Orientation.Horizontal,
00130                 1.0 /*alignmentRatio*/,
00131                 1083.0 /*expectedHorizontalOffset*/,
00132                 0.0 /*expectedVerticalOffset*/);
00133         }
00134
00135         [TestMethod]
00136         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view, with left alignment.")]
00137         public void BringElementIntoVerticalScrollPresenterViewWithNearAlignment()
00138         {
00139             BringElementIntoViewWithAlignment(
00140                 Orientation.Vertical,
00141                 0.0 /*alignmentRatio*/,
00142                 0.0 /*expectedHorizontalOffset*/,
00143                 1512.0 /*expectedVerticalOffset*/);
00144         }
00145
00146         [TestMethod]
00147         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view, with center alignment.")]
00148         public void BringElementIntoVerticalScrollPresenterViewWithMiddleAlignment()
00149         {
00150             BringElementIntoViewWithAlignment(
00151                 Orientation.Vertical,
00152                 0.5 /*alignmentRatio*/,
00153                 0.0 /*expectedHorizontalOffset*/,
00154                 1323.0 /*expectedVerticalOffset*/);
00155         }
00156
00157         [TestMethod]
00158         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view, with right alignment.")]
00159         public void BringElementIntoVerticalScrollPresenterViewWithFarAlignment()
00160         {
00161             BringElementIntoViewWithAlignment(
00162                 Orientation.Vertical,
00163                 1.0 /*alignmentRatio*/,
00164                 0.0 /*expectedHorizontalOffset*/,
00165                 1083.0 /*expectedVerticalOffset*/);
00166         }
00167
00168         [TestMethod]
00169         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view, with a shift.")]
00170         public void BringElementIntoHorizontalScrollPresenterViewWithOffset()
00171         {
00172             BringElementIntoViewWithOffset(
00173                 Orientation.Horizontal,
00174                 10.0 /*offset*/,
00175                 1073.0 /*expectedHorizontalOffset*/,
00176                 0.0 /*expectedVerticalOffset*/);
00177         }
00178
00179         [TestMethod]
00180         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view, with a shift.")]
00181         public void BringElementIntoVerticalScrollPresenterViewWithOffset()
00182         {
00183             BringElementIntoViewWithOffset(
00184                 Orientation.Vertical,
00185                 -10.0 /*offset*/,
00186                 0.0 /*expectedHorizontalOffset*/,
00187                 1093.0 /*expectedVerticalOffset*/);
00188         }
00189
00190         [TestMethod]
00191         [TestProperty("Description", "Brings an element within a horizontal ScrollPresenter into view, with a shift, starting from the maximum offset.")]
00192         public void BringElementIntoHorizontalScrollPresenterViewWithOffsetFromFarEdge()
00193         {
00194             BringElementIntoViewWithOffset(
00195                 Orientation.Horizontal,
00196                 10.0 /*offset*/,
00197                 3116.0 /*expectedHorizontalOffset*/,
00198                 130.0 /*expectedVerticalOffset*/,
00199                 3624.0 /*originalHorizontalOffset*/,
00200                 0.0 /*originalVerticalOffset*/,
00201                 2.0f /*originalZoomFactor*/);
00202         }
00203
00204         [TestMethod]
00205         [TestProperty("Description", "Brings an element within a vertical ScrollPresenter into view, with a shift, starting from the maximum offset.")]
00206         public void BringElementIntoVerticalScrollPresenterViewWithOffsetFromFarEdge()
00207         {
00208             BringElementIntoViewWithOffset(
00209                 Orientation.Vertical,
00210                 -10.0 /*offset*/,
00211                 130.0 /*expectedHorizontalOffset*/,
00212                 3136.0 /*expectedVerticalOffset*/,
00213                 0.0 /*originalHorizontalOffset*/,
00214                 3624.0 /*originalVerticalOffset*/,
00215                 2.0f /*originalZoomFactor*/);
00216         }
00217
00218         [TestMethod]
00219         [TestProperty("Description", "Brings an element within a ScrollPresenter into view, with a TargetRect.")]
00220         public void BringElementIntoViewWithTargetRect()
00221         {
00222             BringIntoViewOptions options = null;
00223
00224             RunOnUIThread.Execute(() =>
00225             {
00226                 options = new BringIntoViewOptions();
00227                 options.TargetRect = new Rect(15, 0, 50, 100);
00228             });
00229
00230             BringElementIntoView(
00231                 Orientation.Horizontal,
00232                 1028.0 /*expectedHorizontalOffset*/,
00233                 0.0 /*expectedVerticalOffset*/,
00234                 options);
00235         }
00236
00237         [TestMethod]
00238         [TestProperty("Description", "Brings an element within a ScrollPresenter into view, with a TargetRect and VerticalOffset.")]
00239         public void BringElementIntoViewWithAdjustmentInBringingIntoViewHandler()
00240         {
00241             BringIntoViewOptions options = null;
00242
00243             RunOnUIThread.Execute(() =>
00244             {
00245                 options = new BringIntoViewOptions();
00246                 options.TargetRect = new Rect(0, -15, 100, 50);
00247                 options.AnimationDesired = false;
00248                 options.VerticalOffset = -10.0;
00249             });
00250
00251             BringElementIntoView(
00252                 Orientation.Vertical,
00253                 0.0 /*expectedHorizontalOffset*/,
00254                 1008.0 /*expectedVerticalOffset*/,
00255                 options,
00256                 0.0 /*originalHorizontalOffset*/,
00257                 0.0 /*originalVerticalOffset*/,
00258                 1.0f /*originalZoomFactor*/,
00259                 true /*applyOptionsInBringingIntoViewHandler*/);
00260         }
00261
00262         [TestMethod]
00263         [TestProperty("Description", "Brings a nested element inside horizontal ScrollPresenters into view.")]
00264         public void BringNestedElementIntoHorizontalScrollPresenterView()
00265         {
00266             BringElementInNestedScrollPresentersIntoView(
00267                 Orientation.Horizontal,
00268                 1056.0 /*expectedOuterHorizontalOffset*/,
00269                 0.0 /*expectedOuterVerticalOffset*/,
00270                 1083.0 /*expectedInnerHorizontalOffset*/,
00271                 0.0 /*expectedInnerVerticalOffset*/);
00272         }
00273
00274         [TestMethod]
00275         [TestProperty("Description", "Brings a nested element inside vertical ScrollPresenters into view.")]
00276         public void BringNestedElementIntoVerticalScrollPresenterView()
00277         {
00278             BringElementInNestedScrollPresentersIntoView(
00279                 Orientation.Vertical,
00280                 0.0 /*expectedOuterHorizontalOffset*/,
00281                 1056.0 /*expectedOuterVerticalOffset*/,
00282                 0.0 /*expectedInnerHorizontalOffset*/,
00283                 1083.0 /*expectedInnerVerticalOffset*/);
00284         }
00285
00286         [TestMethod]
00287         [TestProperty("Description", "Brings a nested element inside horizontal ScrollViewers into view.")]
00288         public void BringNestedElementIntoHorizontalScrollViewerView()
00289         {
00290             BringElementInNestedScrollViewersIntoView(
00291                 Orientation.Horizontal,
00292                 1056.0 /*expectedOuterHorizontalOffset*/,
00293                 0.0 /*expectedOuterVerticalOffset*/,
00294                 1083.0 /*expectedInnerHorizontalOffset*/,
00295                 0.0 /*expectedInnerVerticalOffset*/);
00296         }
00297
00298         [TestMethod]
00299         [TestProperty("Description", "Brings a nested element inside vertical ScrollViewers into view.")]
00300         public void BringNestedElementIntoVerticalScrollViewerView()
00301         {
00302             BringElementInNestedScrollViewersIntoView(
00303                 Orientation.Vertical,
00304                 0.0 /*expectedOuterHorizontalOffset*/,
00305                 1056.0 /*expectedOuterVerticalOffset*/,
00306                 0.0 /*expectedInnerHorizontalOffset*/,
00307                 1083.0 /*expectedInnerVerticalOffset*/);
00308         }
00309
00310         [TestMethod]
00311         [TestProperty("Description", "Brings a nested element inside horizontal ScrollPresenters into view, starting from the maximum offsets.")]
00312         public void BringNestedElementIntoHorizontalScrollPresenterViewFromFarEdge()
00313         {
00314             BringElementInNestedScrollPresentersIntoView(
00315                 Orientation.Horizontal,
00316                 528.0 /*expectedOuterHorizontalOffset*/,
00317                 0.0 /*expectedOuterVerticalOffset*/,
00318                 2344.5 /*expectedInnerHorizontalOffset*/,
00319                 52.5 /*expectedInnerVerticalOffset*/,
00320                 null /*options*/,
00321                 756.0 /*originalOuterHorizontalOffset*/,
00322                 0.0 /*originalOuterVerticalOffset*/,
00323                 0.5f /*originalOuterZoomFactor*/,
00324                 2568.0 /*originalInnerHorizontalOffset*/,
00325                 0.0 /*originalInnerVerticalOffset*/,
00326                 1.5f /*originalInnerZoomFactor*/);
00327         }
00328
00329         [TestMethod]
00330         [TestProperty("Description", "Brings a nested element inside vertical ScrollPresenters into view, starting from the maximum offsets.")]
00331         public void BringNestedElementIntoVerticalScrollPresenterViewFromFarEdge()
00332         {
00333             BringElementInNestedScrollPresentersIntoView(
00334                 Orientation.Vertical,
00335                 0.0 /*expectedOuterHorizontalOffset*/,
00336                 528.0 /*expectedOuterVerticalOffset*/,
00337                 52.5 /*expectedInnerHorizontalOffset*/,
00338                 2344.5 /*expectedInnerVerticalOffset*/,
00339                 null /*options*/,
00340                 0.0 /*originalOuterHorizontalOffset*/,
00341                 756.0 /*originalOuterVerticalOffset*/,
00342                 0.5f /*originalOuterZoomFactor*/,
00343                 0.0 /*originalInnerHorizontalOffset*/,
00344                 2568.0 /*originalInnerVerticalOffset*/,
00345                 1.5f /*originalInnerZoomFactor*/);
00346         }
00347
00348         [TestMethod]
00349         [TestProperty("Description", "Brings a nested element inside horizontal ScrollPresenters into view, with left alignment.")]
00350         public void BringNestedElementIntoHorizontalScrollPresenterViewWithNearAlignment()
00351         {
00352             BringIntoViewOptions options = null;
00353
00354             RunOnUIThread.Execute(() =>
00355             {
00356                 options = new BringIntoViewOptions() { HorizontalAlignmentRatio = 0.0 };
00357             });
00358
00359             BringElementInNestedScrollPresentersIntoView(
00360                 Orientation.Horizontal,
00361                 1107.0 /*expectedOuterHorizontalOffset*/,
00362                 0.0 /*expectedOuterVerticalOffset*/,
00363                 1512.0 /*expectedInnerHorizontalOffset*/,
00364                 0.0 /*expectedInnerVerticalOffset*/,
00365                 options);
00366         }
00367
00368         [TestMethod]
00369         [TestProperty("Description", "Brings a nested element inside horizontal ScrollPresenters into view, with snap points.")]
00370         public void BringNestedElementIntoHorizontalScrollPresenterViewWithSnapPoints()
00371         {
00372             BringElementInNestedScrollPresentersIntoView(
00373                 orientation: Orientation.Horizontal,
00374                 expectedOuterHorizontalOffset: 1008.0,
00375                 expectedOuterVerticalOffset: 0.0,
00376                 expectedInnerHorizontalOffset: 1134.0,
00377                 expectedInnerVerticalOffset: 0.0,
00378                 options: null,
00379                 originalOuterHorizontalOffset: 0.0,
00380                 originalOuterVerticalOffset: 0.0,
00381                 originalOuterZoomFactor: 1.0f,
00382                 originalInnerHorizontalOffset: 0.0,
00383                 originalInnerVerticalOffset: 0.0,
00384                 originalInnerZoomFactor: 1.0f,
00385                 applySnapPointsInBringingIntoViewHandler: true);
00386         }
00387
00388         [TestMethod]
00389         [TestProperty("Description", "Brings a nested element inside vertical ScrollPresenters into view, with center alignment.")]
00390         public void BringNestedElementIntoVerticalScrollPresenterViewWithMiddleAlignment()
00391         {
00392             BringIntoViewOptions options = null;
00393
00394             RunOnUIThread.Execute(() =>
00395             {
00396                 options = new BringIntoViewOptions() { VerticalAlignmentRatio = 0.5 };
00397             });
00398
00399             BringElementInNestedScrollPresentersIntoView(
00400                 Orientation.Vertical,
00401                 0.0 /*expectedOuterHorizontalOffset*/,
00402                 1056.0 /*expectedOuterVerticalOffset*/,
00403                 0.0 /*expectedInnerHorizontalOffset*/,
00404                 1323.0 /*expectedInnerVerticalOffset*/,
00405                 options);
00406         }
00407
00408         [TestMethod]
00409         [TestProperty("Description", "Brings a nested element inside horizontal ScrollViewers into view, with left alignment.")]
00410         public void BringNestedElementIntoHorizontalScrollViewerViewWithNearAlignment()
00411         {
00412             BringIntoViewOptions options = null;
00413
00414             RunOnUIThread.Execute(() =>
00415             {
00416                 options = new BringIntoViewOptions() { HorizontalAlignmentRatio = 0.0 };
00417             });
00418
00419             BringElementInNestedScrollViewersIntoView(
00420                 Orientation.Horizontal,
00421                 1107.0 /*expectedOuterHorizontalOffset*/,
00422                 0.0 /*expectedOuterVerticalOffset*/,
00423                 1512.0 /*expectedInnerHorizontalOffset*/,
00424                 0.0 /*expectedInnerVerticalOffset*/,
00425                 options);
00426         }
00427
00428         [TestMethod]
00429         [TestProperty("Description", "Brings a nested element inside vertical ScrollViewers into view, with center alignment.")]
00430         public void BringNestedElementIntoVerticalScrollViewerViewWithMiddleAlignment()
00431         {
00432             BringIntoViewOptions options = null;
00433
00434             RunOnUIThread.Execute(() =>
00435             {
00436                 options = new BringIntoViewOptions() { VerticalAlignmentRatio = 0.5 };
00437             });
00438
00439             BringElementInNestedScrollViewersIntoView(
00440                 Orientation.Vertical,
00441                 0.0 /*expectedOuterHorizontalOffset*/,
00442                 1056.0 /*expectedOuterVerticalOffset*/,
00443                 0.0 /*expectedInnerHorizontalOffset*/,
00444                 1323.0 /*expectedInnerVerticalOffset*/,
00445                 options);
00446         }
00447
00448         [TestMethod]
00449         [TestProperty("Description", "Brings a nested element inside horizontal ScrollPresenters into view, with offset.")]
00450         public void BringNestedElementIntoHorizontalScrollPresenterViewWithOffset()
00451         {
00452             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00453             {
00454                 BringIntoViewOptions options = null;
00455
00456                 RunOnUIThread.Execute(() =>
00457                 {
00458                     options = new BringIntoViewOptions() { HorizontalOffset = -20.0 };
00459                 });
00460
00461                 BringElementInNestedScrollPresentersIntoView(
00462                     Orientation.Horizontal,
00463                     1056.0 /*expectedOuterHorizontalOffset*/,
00464                     0.0 /*expectedOuterVerticalOffset*/,
00465                     1103.0 /*expectedInnerHorizontalOffset*/,
00466                     0.0 /*expectedInnerVerticalOffset*/,
00467                     options);
00468             }
00469         }
00470
00471         [TestMethod]
00472         [TestProperty("Description", "Brings a nested element inside vertical ScrollPresenters into view, with offset.")]
00473         public void BringNestedElementIntoVerticalScrollPresenterViewWithOffset()
00474         {
00475             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00476             {
00477                 BringIntoViewOptions options = null;
00478
00479                 RunOnUIThread.Execute(() =>
00480                 {
00481                     options = new BringIntoViewOptions() { VerticalOffset = -20.0 };
00482                 });
00483
00484                 BringElementInNestedScrollPresentersIntoView(
00485                     Orientation.Vertical,
00486                     0.0 /*expectedOuterHorizontalOffset*/,
00487                     1056.0 /*expectedOuterVerticalOffset*/,
00488                     0.0 /*expectedInnerHorizontalOffset*/,
00489                     1103.0 /*expectedInnerVerticalOffset*/,
00490                     options);
00491             }
00492         }
00493
00494         [TestMethod]
00495         [TestProperty("Description", "Brings a nested element inside horizontal ScrollPresenters into view, with offset.")]
00496         public void BringNestedElementIntoHorizontalScrollViewerViewWithOffset()
00497         {
00498             BringIntoViewOptions options = null;
00499
00500             RunOnUIThread.Execute(() =>
00501             {
00502                 options = new BringIntoViewOptions() { HorizontalOffset = -20.0 };
00503             });
00504
00505             BringElementInNestedScrollViewersIntoView(
00506                 Orientation.Horizontal,
00507                 1056.0 /*expectedOuterHorizontalOffset*/,
00508                 0.0 /*expectedOuterVerticalOffset*/,
00509                 1103.0 /*expectedInnerHorizontalOffset*/,
00510                 0.0 /*expectedInnerVerticalOffset*/,
00511                 options);
00512         }
00513
00514         [TestMethod]
00515         [TestProperty("Description", "Brings a nested element inside vertical ScrollPresenters into view, with offset.")]
00516         public void BringNestedElementIntoVerticalScrollViewerViewWithOffset()
00517         {
00518             BringIntoViewOptions options = null;
00519
00520             RunOnUIThread.Execute(() =>
00521             {
00522                 options = new BringIntoViewOptions() { VerticalOffset = -20.0 };
00523             });
00524
00525             BringElementInNestedScrollViewersIntoView(
00526                 Orientation.Vertical,
00527                 0.0 /*expectedOuterHorizontalOffset*/,
00528                 1056.0 /*expectedOuterVerticalOffset*/,
00529                 0.0 /*expectedInnerHorizontalOffset*/,
00530                 1103.0 /*expectedInnerVerticalOffset*/,
00531                 options);
00532         }
00533
00534         [TestMethod]
00535         [TestProperty("Description", "ScrollPresenter should handle BringIntoView for its direct content.")]
00536         public void BringContentWithMarginIntoView()
00537         {
00538             ScrollPresenter scrollPresenter = null;
00539             Rectangle rectangleScrollPresenterContent = null;
00540             AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
00541             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00542
00543             RunOnUIThread.Execute(() =>
00544             {
00545                 rectangleScrollPresenterContent = new Rectangle() { Margin = new Thickness(0, 500, 0, 0) };
00546                 scrollPresenter = new ScrollPresenter();
00547
00548                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00549             });
00550
00551             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00552
00553             RunOnUIThread.Execute(() =>
00554             {
00555                 scrollPresenter.ViewChanged += (s, e) =>
00556                 {
00557                     scrollPresenterViewChangedEvent.Set();
00558                 };
00559
00560                 rectangleScrollPresenterContent.StartBringIntoView(new BringIntoViewOptions() { AnimationDesired = false });
00561             });
00562
00563             WaitForEvent("Waiting for ViewChanged event", scrollPresenterViewChangedEvent);
00564
00565             RunOnUIThread.Execute(() =>
00566             {
00567                 Verify.AreEqual(500.0, scrollPresenter.VerticalOffset);
00568             });
00569         }
00570
00571         private void BringElementIntoViewWithAlignment(
00572             Orientation orientation,
00573             double alignmentRatio,
00574             double expectedHorizontalOffset,
00575             double expectedVerticalOffset)
00576         {
00577             BringIntoViewOptions options = null;
00578
00579             RunOnUIThread.Execute(() =>
00580             {
00581                 options = new BringIntoViewOptions();
00582                 if (orientation == Orientation.Horizontal)
00583                     options.HorizontalAlignmentRatio = alignmentRatio;
00584                 else
00585                     options.VerticalAlignmentRatio = alignmentRatio;
00586             });
00587
00588             BringElementIntoView(
00589                 orientation,
00590                 expectedHorizontalOffset,
00591                 expectedVerticalOffset,
00592                 options);
00593         }
00594
00595         private void BringElementIntoViewWithOffset(
00596             Orientation orientation,
00597             double offset,
00598             double expectedHorizontalOffset,
00599             double expectedVerticalOffset,
00600             double originalHorizontalOffset = 0.0,
00601             double originalVerticalOffset = 0.0,
00602             float originalZoomFactor = 1.0f)
00603         {
00604             BringIntoViewOptions options = null;
00605
00606             RunOnUIThread.Execute(() =>
00607             {
00608                 options = new BringIntoViewOptions();
00609                 if (orientation == Orientation.Horizontal)
00610                     options.HorizontalOffset = offset;
00611                 else
00612                     options.VerticalOffset = offset;
00613             });
00614
00615             BringElementIntoView(
00616                 orientation,
00617                 expectedHorizontalOffset,
00618                 expectedVerticalOffset,
00619                 options,
00620                 originalHorizontalOffset,
00621                 originalVerticalOffset,
00622                 originalZoomFactor);
00623         }
00624
00625         private void BringElementIntoView(
00626             Orientation orientation,
00627             double expectedHorizontalOffset,
00628             double expectedVerticalOffset,
00629             BringIntoViewOptions options = null,
00630             double originalHorizontalOffset = 0.0,
00631             double originalVerticalOffset = 0.0,
00632             float originalZoomFactor = 1.0f,
00633             bool applyOptionsInBringingIntoViewHandler = false,
00634             bool applySnapPointsInBringingIntoViewHandler = false)
00635         {
00636             ScrollPresenter scrollPresenter = null;
00637             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00638             AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
00639             AutoResetEvent bringIntoViewCompletedEvent = new AutoResetEvent(false);
00640             int bringIntoViewChangeCorrelationId = -1;
00641
00642             RunOnUIThread.Execute(() =>
00643             {
00644                 scrollPresenter = new ScrollPresenter();
00645
00646                 SetupDefaultBringIntoViewUI(orientation, scrollPresenter, scrollPresenterLoadedEvent);
00647             });
00648
00649             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00650
00651             if (originalZoomFactor != 1.0f)
00652             {
00653                 ZoomTo(scrollPresenter, originalZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00654             }
00655
00656             if (originalHorizontalOffset != 0 || originalVerticalOffset != 0)
00657             {
00658                 ScrollTo(scrollPresenter, originalHorizontalOffset, originalVerticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, originalZoomFactor == 1.0f /*hookViewChangingAndChanged*/);
00659             }
00660
00661             RunOnUIThread.Execute(() =>
00662             {
00663                 scrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
00664                 {
00665                     Log.Comment("ViewChanged - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00666                         sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
00667                     scrollPresenterViewChangedEvent.Set();
00668                 };
00669
00670                 scrollPresenter.ScrollCompleted += delegate (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
00671                 {
00672                     ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00673                     Log.Comment("ScrollPresenter bring-into-view OffsetsChangeCorrelationId={0} completed with Result={1}", args.CorrelationId, result);
00674                     if (bringIntoViewChangeCorrelationId == args.CorrelationId)
00675                         bringIntoViewCompletedEvent.Set();
00676                 };
00677
00678                 scrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
00679                 {
00680                     Log.Comment("ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
00681                         sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
00682                     bringIntoViewChangeCorrelationId = args.CorrelationId;
00683
00684                     if (applyOptionsInBringingIntoViewHandler && options != null)
00685                     {
00686                         Log.Comment("ScrollPresenter.BringingIntoView - Applying custom options");
00687                         args.RequestEventArgs.AnimationDesired = options.AnimationDesired;
00688                         args.RequestEventArgs.HorizontalOffset = options.HorizontalOffset;
00689                         args.RequestEventArgs.VerticalOffset = options.VerticalOffset;
00690                         if (options.TargetRect != null)
00691                         {
00692                             args.RequestEventArgs.TargetRect = (Rect)options.TargetRect;
00693                         }
00694                     }
00695
00696                     if (applySnapPointsInBringingIntoViewHandler)
00697                     {
00698                         Log.Comment("ScrollPresenter.BringingIntoView - Applying mandatory snap points");
00699                         AddSnapPoints(scrollPresenter: sender, stackPanel: (sender.Content as Border).Child as StackPanel);
00700                         args.SnapPointsMode = ScrollingSnapPointsMode.Default;
00701                     }
00702                 };
00703
00704                 UIElement targetElement = ((scrollPresenter.Content as Border).Child as StackPanel).Children[12];
00705                 BringIntoViewOptions startingOptions = null;
00706
00707                 if (options == null)
00708                 {
00709                     targetElement.StartBringIntoView();
00710                 }
00711                 else
00712                 {
00713                     if (applyOptionsInBringingIntoViewHandler)
00714                     {
00715                         startingOptions = new BringIntoViewOptions();
00716                         startingOptions.HorizontalAlignmentRatio = options.HorizontalAlignmentRatio;
00717                         startingOptions.VerticalAlignmentRatio = options.VerticalAlignmentRatio;
00718                     }
00719                     else
00720                     {
00721                         startingOptions = options;
00722                     }
00723                     targetElement.StartBringIntoView(startingOptions);
00724                 }
00725             });
00726
00727             WaitForEvent("Waiting for ScrollPresenter.ViewChanged event", scrollPresenterViewChangedEvent);
00728             WaitForEvent("Waiting for bring-into-view operation completion event", bringIntoViewCompletedEvent);
00729             IdleSynchronizer.Wait();
00730
00731             RunOnUIThread.Execute(() =>
00732             {
00733                 Log.Comment("Final view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00734                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00735                 Verify.AreEqual(expectedHorizontalOffset, scrollPresenter.HorizontalOffset);
00736                 Verify.AreEqual(expectedVerticalOffset, scrollPresenter.VerticalOffset);
00737                 Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
00738             });
00739         }
00740
00741         private void BringElementInNestedScrollPresentersIntoView(
00742             Orientation orientation,
00743             double expectedOuterHorizontalOffset,
00744             double expectedOuterVerticalOffset,
00745             double expectedInnerHorizontalOffset,
00746             double expectedInnerVerticalOffset,
00747             BringIntoViewOptions options = null,
00748             double originalOuterHorizontalOffset = 0.0,
00749             double originalOuterVerticalOffset = 0.0,
00750             float originalOuterZoomFactor = 1.0f,
00751             double originalInnerHorizontalOffset = 0.0,
00752             double originalInnerVerticalOffset = 0.0,
00753             float originalInnerZoomFactor = 1.0f,
00754             bool applySnapPointsInBringingIntoViewHandler = false)
00755         {
00756             ScrollPresenter outerScrollPresenter = null;
00757             ScrollPresenter innerScrollPresenter = null;
00758             AutoResetEvent outerScrollPresenterLoadedEvent = new AutoResetEvent(false);
00759             AutoResetEvent innerScrollPresenterLoadedEvent = new AutoResetEvent(false);
00760             AutoResetEvent outerScrollPresenterViewChangedEvent = new AutoResetEvent(false);
00761             AutoResetEvent innerScrollPresenterViewChangedEvent = new AutoResetEvent(false);
00762             AutoResetEvent outerBringIntoViewCompletedEvent = new AutoResetEvent(false);
00763             AutoResetEvent innerBringIntoViewCompletedEvent = new AutoResetEvent(false);
00764             int outerBringIntoViewChangeCorrelationId = -1;
00765             int innerBringIntoViewChangeCorrelationId = -1;
00766
00767             RunOnUIThread.Execute(() =>
00768             {
00769                 outerScrollPresenter = new ScrollPresenter();
00770                 innerScrollPresenter = new ScrollPresenter();
00771
00772                 SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter(orientation, outerScrollPresenter, innerScrollPresenter, outerScrollPresenterLoadedEvent, innerScrollPresenterLoadedEvent);
00773             });
00774
00775             WaitForEvent("Waiting for Inner Loaded event", innerScrollPresenterLoadedEvent);
00776             WaitForEvent("Waiting for Outer Loaded event", outerScrollPresenterLoadedEvent);
00777
00778             if (originalOuterZoomFactor != 1.0f)
00779             {
00780                 ZoomTo(outerScrollPresenter, originalOuterZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00781             }
00782
00783             if (originalOuterHorizontalOffset != 0 || originalOuterVerticalOffset != 0)
00784             {
00785                 ScrollTo(outerScrollPresenter, originalOuterHorizontalOffset, originalOuterVerticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, originalOuterZoomFactor == 1.0f /*hookViewChangingAndChanged*/);
00786             }
00787
00788             if (originalInnerZoomFactor != 1.0f)
00789             {
00790                 ZoomTo(innerScrollPresenter, originalInnerZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00791             }
00792
00793             if (originalInnerHorizontalOffset != 0 || originalInnerVerticalOffset != 0)
00794             {
00795                 ScrollTo(innerScrollPresenter, originalInnerHorizontalOffset, originalInnerVerticalOffset, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, originalInnerZoomFactor == 1.0f /*hookViewChangingAndChanged*/);
00796             }
00797
00798             RunOnUIThread.Execute(() =>
00799             {
00800                 innerScrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
00801                 {
00802                     Log.Comment("Inner ViewChanged ScrollPresenter={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
00803                         sender.Name, sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
00804                     innerScrollPresenterViewChangedEvent.Set();
00805                 };
00806
00807                 innerScrollPresenter.ScrollCompleted += delegate (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
00808                 {
00809                     ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00810
00811                     Log.Comment("Inner ScrollPresenter bring-into-view OffsetsChangeCorrelationId={0} completed with Result={1}", args.CorrelationId, result);
00812                     if (innerBringIntoViewChangeCorrelationId == args.CorrelationId)
00813                         innerBringIntoViewCompletedEvent.Set();
00814                 };
00815
00816                 innerScrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
00817                 {
00818                     Log.Comment("Inner ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
00819                         sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
00820                     innerBringIntoViewChangeCorrelationId = args.CorrelationId;
00821
00822                     if (applySnapPointsInBringingIntoViewHandler)
00823                     {
00824                         Log.Comment("ScrollPresenter.BringingIntoView - Applying mandatory snap points");
00825                         AddSnapPoints(scrollPresenter: sender, stackPanel: (sender.Content as Border).Child as StackPanel);
00826                         args.SnapPointsMode = ScrollingSnapPointsMode.Default;
00827                     }
00828                 };
00829
00830                 outerScrollPresenter.ViewChanged += delegate (ScrollPresenter sender, object args)
00831                 {
00832                     Log.Comment("Outer ViewChanged ScrollPresenter={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
00833                         sender.Name, sender.HorizontalOffset, sender.VerticalOffset, sender.ZoomFactor);
00834                     outerScrollPresenterViewChangedEvent.Set();
00835                 };
00836
00837                 outerScrollPresenter.ScrollCompleted += delegate (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
00838                 {
00839                     ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00840                     Log.Comment("Outer ScrollPresenter bring-into-view OffsetsChangeCorrelationId={0} completed with Result={1}", args.CorrelationId, result);
00841                     if (outerBringIntoViewChangeCorrelationId == args.CorrelationId)
00842                         outerBringIntoViewCompletedEvent.Set();
00843                 };
00844
00845                 outerScrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
00846                 {
00847                     Log.Comment("Outer ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
00848                         sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
00849                     outerBringIntoViewChangeCorrelationId = args.CorrelationId;
00850
00851                     if (applySnapPointsInBringingIntoViewHandler)
00852                     {
00853                         Log.Comment("ScrollPresenter.BringingIntoView - Applying mandatory snap points");
00854                         AddSnapPoints(scrollPresenter: sender, stackPanel: (sender.Content as Border).Child as StackPanel);
00855                         args.SnapPointsMode = ScrollingSnapPointsMode.Default;
00856                     }
00857                 };
00858
00859                 UIElement targetElement = ((innerScrollPresenter.Content as Border).Child as StackPanel).Children[12];
00860
00861                 if (options == null)
00862                 {
00863                     targetElement.StartBringIntoView();
00864                 }
00865                 else
00866                 {
00867                     targetElement.StartBringIntoView(options);
00868                 }
00869             });
00870
00871             WaitForEvent("Waiting for inner ScrollPresenter.ViewChanged event", innerScrollPresenterViewChangedEvent);
00872             WaitForEvent("Waiting for outer ScrollPresenter.ViewChanged event", outerScrollPresenterViewChangedEvent);
00873             WaitForEvent("Waiting for inner bring-into-view operation completion event", innerBringIntoViewCompletedEvent);
00874             WaitForEvent("Waiting for outer bring-into-view operation completion event", outerBringIntoViewCompletedEvent);
00875             IdleSynchronizer.Wait();
00876
00877             RunOnUIThread.Execute(() =>
00878             {
00879                 Log.Comment("Final inner view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00880                     innerScrollPresenter.HorizontalOffset, innerScrollPresenter.VerticalOffset, innerScrollPresenter.ZoomFactor);
00881                 Log.Comment("Final outer view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00882                     outerScrollPresenter.HorizontalOffset, outerScrollPresenter.VerticalOffset, outerScrollPresenter.ZoomFactor);
00883
00884                 Verify.AreEqual(expectedInnerHorizontalOffset, innerScrollPresenter.HorizontalOffset);
00885                 Verify.AreEqual(expectedInnerVerticalOffset, innerScrollPresenter.VerticalOffset);
00886                 Verify.AreEqual(originalInnerZoomFactor, innerScrollPresenter.ZoomFactor);
00887
00888                 Verify.AreEqual(expectedOuterHorizontalOffset, outerScrollPresenter.HorizontalOffset);
00889                 Verify.AreEqual(expectedOuterVerticalOffset, outerScrollPresenter.VerticalOffset);
00890                 Verify.AreEqual(originalOuterZoomFactor, outerScrollPresenter.ZoomFactor);
00891             });
00892         }
00893
00894         private void BringElementInNestedScrollViewersIntoView(
00895             Orientation orientation,
00896             double expectedOuterHorizontalOffset,
00897             double expectedOuterVerticalOffset,
00898             double expectedInnerHorizontalOffset,
00899             double expectedInnerVerticalOffset,
00900             BringIntoViewOptions options = null)
00901         {
00902             ScrollViewer outerScrollViewer = null;
00903             ScrollViewer innerScrollViewer = null;
00904             AutoResetEvent outerScrollViewerLoadedEvent = new AutoResetEvent(false);
00905             AutoResetEvent innerScrollViewerLoadedEvent = new AutoResetEvent(false);
00906             AutoResetEvent outerScrollViewerViewChangedEvent = new AutoResetEvent(false);
00907             AutoResetEvent innerScrollViewerViewChangedEvent = new AutoResetEvent(false);
00908             AutoResetEvent outerBringIntoViewCompletedEvent = new AutoResetEvent(false);
00909             AutoResetEvent innerBringIntoViewCompletedEvent = new AutoResetEvent(false);
00910
00911             RunOnUIThread.Execute(() =>
00912             {
00913                 outerScrollViewer = new ScrollViewer();
00914                 innerScrollViewer = new ScrollViewer();
00915
00916                 SetupBringIntoViewUIWithScrollViewerInsideScrollViewer(orientation, outerScrollViewer, innerScrollViewer, outerScrollViewerLoadedEvent, innerScrollViewerLoadedEvent);
00917             });
00918
00919             WaitForEvent("Waiting for Inner Loaded event", innerScrollViewerLoadedEvent);
00920             WaitForEvent("Waiting for Outer Loaded event", outerScrollViewerLoadedEvent);
00921
00922             RunOnUIThread.Execute(() =>
00923             {
00924                 innerScrollViewer.ViewChanged += delegate (object sender, ScrollViewerViewChangedEventArgs args)
00925                 {
00926                     ScrollViewer sv = sender as ScrollViewer;
00927                     Log.Comment("Inner ViewChanged ScrollViewer={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
00928                         sv.Name, sv.HorizontalOffset, sv.VerticalOffset, sv.ZoomFactor);
00929                     if (!args.IsIntermediate)
00930                         innerScrollViewerViewChangedEvent.Set();
00931                 };
00932
00933                 outerScrollViewer.ViewChanged += delegate (object sender, ScrollViewerViewChangedEventArgs args)
00934                 {
00935                     ScrollViewer sv = sender as ScrollViewer;
00936                     Log.Comment("Outer ViewChanged ScrollViewer={0} - HorizontalOffset={1}, VerticalOffset={2}, ZoomFactor={3}",
00937                         sv.Name, sv.HorizontalOffset, sv.VerticalOffset, sv.ZoomFactor);
00938                     if (!args.IsIntermediate)
00939                         outerScrollViewerViewChangedEvent.Set();
00940                 };
00941
00942                 UIElement targetElement = ((innerScrollViewer.Content as Border).Child as StackPanel).Children[12];
00943
00944                 if (options == null)
00945                 {
00946                     targetElement.StartBringIntoView();
00947                 }
00948                 else
00949                 {
00950                     targetElement.StartBringIntoView(options);
00951                 }
00952             });
00953
00954             WaitForEvent("Waiting for inner ScrollViewer.ViewChanged event", innerScrollViewerViewChangedEvent);
00955             WaitForEvent("Waiting for outer ScrollViewer.ViewChanged event", outerScrollViewerViewChangedEvent);
00956             IdleSynchronizer.Wait();
00957
00958             RunOnUIThread.Execute(() =>
00959             {
00960                 Log.Comment("Final inner view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00961                     innerScrollViewer.HorizontalOffset, innerScrollViewer.VerticalOffset, innerScrollViewer.ZoomFactor);
00962                 Log.Comment("Final outer view - HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00963                     outerScrollViewer.HorizontalOffset, outerScrollViewer.VerticalOffset, outerScrollViewer.ZoomFactor);
00964
00965                 Verify.AreEqual(expectedInnerHorizontalOffset, innerScrollViewer.HorizontalOffset);
00966                 Verify.AreEqual(expectedInnerVerticalOffset, innerScrollViewer.VerticalOffset);
00967
00968                 Verify.AreEqual(expectedOuterHorizontalOffset, outerScrollViewer.HorizontalOffset);
00969                 Verify.AreEqual(expectedOuterVerticalOffset, outerScrollViewer.VerticalOffset);
00970             });
00971         }
00972
00973         private void SetupDefaultBringIntoViewUI(
00974             Orientation orientation,
00975             ScrollPresenter scrollPresenter,
00976             AutoResetEvent scrollPresenterLoadedEvent,
00977             bool setAsContentRoot = true)
00978         {
00979             Log.Comment("Setting up default bring-into-view UI with ScrollPresenter");
00980
00981             StackPanel stackPanel = new StackPanel();
00982             stackPanel.Name = "stackPanel";
00983             stackPanel.Orientation = orientation;
00984             stackPanel.Margin = new Thickness(30);
00985
00986             Border border = new Border();
00987             border.Name = "border";
00988             border.BorderThickness = new Thickness(3);
00989             border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00990             border.Margin = new Thickness(15);
00991             border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
00992             border.Child = stackPanel;
00993
00994             Verify.IsNotNull(scrollPresenter);
00995             scrollPresenter.Name = "scrollPresenter";
00996             if (orientation == Orientation.Vertical)
00997             {
00998                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
00999                 scrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01000                 scrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01001             }
01002             else
01003             {
01004                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
01005                 scrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01006                 scrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01007             }
01008             scrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
01009             scrollPresenter.Content = border;
01010
01011             InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount /*newCount*/);
01012
01013             if (scrollPresenterLoadedEvent != null)
01014             {
01015                 scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
01016                 {
01017                     Log.Comment("ScrollPresenter.Loaded event handler");
01018                     scrollPresenterLoadedEvent.Set();
01019                 };
01020             }
01021
01022             scrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
01023             {
01024                 Log.Comment("ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}",
01025                     sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId);
01026                 Log.Comment("RequestEventArgs - AnimationDesired={0}, Handled={1}, HorizontalAlignmentRatio={2}, VerticalAlignmentRatio={3}",
01027                     args.RequestEventArgs.AnimationDesired,
01028                     args.RequestEventArgs.Handled,
01029                     args.RequestEventArgs.HorizontalAlignmentRatio,
01030                     args.RequestEventArgs.VerticalAlignmentRatio);
01031                 Log.Comment("RequestEventArgs - HorizontalOffset={0}, VerticalOffset={1}, TargetElement={2}, TargetRect={3}",
01032                     args.RequestEventArgs.HorizontalOffset,
01033                     args.RequestEventArgs.VerticalOffset,
01034                     (args.RequestEventArgs.TargetElement as FrameworkElement).Name,
01035                     args.RequestEventArgs.TargetRect.ToString());
01036             };
01037
01038             if (setAsContentRoot)
01039             {
01040                 Log.Comment("Setting window content");
01041                 Content = scrollPresenter;
01042             }
01043         }
01044
01045         private void SetupDefaultBringIntoViewUIWithScrollViewer(
01046             Orientation orientation,
01047             ScrollViewer scrollViewer,
01048             AutoResetEvent scrollViewerLoadedEvent,
01049             bool setAsContentRoot = true)
01050         {
01051             Log.Comment("Setting up default bring-into-view UI with ScrollViewer");
01052
01053             StackPanel stackPanel = new StackPanel();
01054             stackPanel.Name = "stackPanel";
01055             stackPanel.Orientation = orientation;
01056             stackPanel.Margin = new Thickness(30);
01057
01058             Border border = new Border();
01059             border.Name = "border";
01060             border.BorderThickness = new Thickness(3);
01061             border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
01062             border.Margin = new Thickness(15);
01063             border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
01064             border.Child = stackPanel;
01065
01066             Verify.IsNotNull(scrollViewer);
01067             scrollViewer.Name = "scrollViewer";
01068             if (orientation == Orientation.Vertical)
01069             {
01070                 scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
01071                 scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
01072                 scrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01073                 scrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01074             }
01075             else
01076             {
01077                 scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
01078                 scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
01079                 scrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01080                 scrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01081             }
01082             scrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
01083             scrollViewer.Content = border;
01084
01085             InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount /*newCount*/);
01086
01087             if (scrollViewerLoadedEvent != null)
01088             {
01089                 scrollViewer.Loaded += (object sender, RoutedEventArgs e) =>
01090                 {
01091                     Log.Comment("ScrollViewer.Loaded event handler");
01092                     scrollViewerLoadedEvent.Set();
01093                 };
01094             }
01095
01096             if (setAsContentRoot)
01097             {
01098                 Log.Comment("Setting window content");
01099                 Content = scrollViewer;
01100             }
01101         }
01102
01103         private void SetupBringIntoViewUIWithScrollPresenterInsideScrollPresenter(
01104             Orientation orientation,
01105             ScrollPresenter outerScrollPresenter,
01106             ScrollPresenter innerScrollPresenter,
01107             AutoResetEvent outerScrollPresenterLoadedEvent,
01108             AutoResetEvent innerScrollPresenterLoadedEvent)
01109         {
01110             Log.Comment("Setting up bring-into-view UI with ScrollPresenter inside ScrollPresenter");
01111
01112             Log.Comment("Setting up inner ScrollPresenter");
01113             SetupDefaultBringIntoViewUI(
01114                 orientation,
01115                 innerScrollPresenter,
01116                 innerScrollPresenterLoadedEvent,
01117                 false /*setAsContentRoot*/);
01118
01119             Log.Comment("Setting up outer ScrollPresenter");
01120             StackPanel stackPanel = new StackPanel();
01121             stackPanel.Name = "outerStackPanel";
01122             stackPanel.Orientation = orientation;
01123             stackPanel.Margin = new Thickness(30);
01124
01125             Border border = new Border();
01126             border.Name = "outerBorder";
01127             border.BorderThickness = new Thickness(3);
01128             border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
01129             border.Margin = new Thickness(15);
01130             border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
01131             border.Child = stackPanel;
01132
01133             Verify.IsNotNull(outerScrollPresenter);
01134             outerScrollPresenter.Name = "outerScrollPresenter";
01135             if (orientation == Orientation.Vertical)
01136             {
01137                 outerScrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
01138                 outerScrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01139                 outerScrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01140             }
01141             else
01142             {
01143                 outerScrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
01144                 outerScrollPresenter.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01145                 outerScrollPresenter.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01146             }
01147             outerScrollPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
01148             outerScrollPresenter.Content = border;
01149
01150             InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);
01151
01152             stackPanel.Children.Add(innerScrollPresenter);
01153
01154             InsertStackPanelChild(stackPanel, 0 /*operationCount*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 + 1 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);
01155
01156             if (outerScrollPresenterLoadedEvent != null)
01157             {
01158                 outerScrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
01159                 {
01160                     Log.Comment("Outer ScrollPresenter.Loaded event handler");
01161                     outerScrollPresenterLoadedEvent.Set();
01162                 };
01163             }
01164
01165             outerScrollPresenter.BringingIntoView += (ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args) =>
01166             {
01167                 Log.Comment("Outer ScrollPresenter.BringingIntoView ScrollPresenter={0} - TargetHorizontalOffset={1}, TargetVerticalOffset={2}, OffsetsChangeCorrelationId={3}, SnapPointsMode={4}",
01168                     sender.Name, args.TargetHorizontalOffset, args.TargetVerticalOffset, args.CorrelationId, args.SnapPointsMode);
01169                 Log.Comment("RequestEventArgs - AnimationDesired={0}, Handled={1}, HorizontalAlignmentRatio={2}, VerticalAlignmentRatio={3}",
01170                     args.RequestEventArgs.AnimationDesired,
01171                     args.RequestEventArgs.Handled,
01172                     args.RequestEventArgs.HorizontalAlignmentRatio,
01173                     args.RequestEventArgs.VerticalAlignmentRatio);
01174                 Log.Comment("RequestEventArgs - HorizontalOffset={0}, VerticalOffset={1}, TargetElement={2}, TargetRect={3}",
01175                     args.RequestEventArgs.HorizontalOffset,
01176                     args.RequestEventArgs.VerticalOffset,
01177                     (args.RequestEventArgs.TargetElement as FrameworkElement).Name,
01178                     args.RequestEventArgs.TargetRect.ToString());
01179             };
01180
01181             Log.Comment("Setting window content");
01182             Content = outerScrollPresenter;
01183         }
01184
01185         private void SetupBringIntoViewUIWithScrollViewerInsideScrollViewer(
01186             Orientation orientation,
01187             ScrollViewer outerScrollViewer,
01188             ScrollViewer innerScrollViewer,
01189             AutoResetEvent outerScrollViewerLoadedEvent,
01190             AutoResetEvent innerScrollViewerLoadedEvent)
01191         {
01192             Log.Comment("Setting up bring-into-view UI with ScrollViewer inside ScrollViewer");
01193
01194             Log.Comment("Setting up inner ScrollViewer");
01195             SetupDefaultBringIntoViewUIWithScrollViewer(
01196                 orientation,
01197                 innerScrollViewer,
01198                 innerScrollViewerLoadedEvent,
01199                 false /*setAsContentRoot*/);
01200
01201             Log.Comment("Setting up outer ScrollViewer");
01202             StackPanel stackPanel = new StackPanel();
01203             stackPanel.Name = "outerStackPanel";
01204             stackPanel.Orientation = orientation;
01205             stackPanel.Margin = new Thickness(30);
01206
01207             Border border = new Border();
01208             border.Name = "outerBorder";
01209             border.BorderThickness = new Thickness(3);
01210             border.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
01211             border.Margin = new Thickness(15);
01212             border.Background = new SolidColorBrush(Microsoft.UI.Colors.Beige);
01213             border.Child = stackPanel;
01214
01215             Verify.IsNotNull(outerScrollViewer);
01216             outerScrollViewer.Name = "outerScrollViewer";
01217             if (orientation == Orientation.Vertical)
01218             {
01219                 outerScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
01220                 outerScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
01221                 outerScrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01222                 outerScrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01223             }
01224             else
01225             {
01226                 outerScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
01227                 outerScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
01228                 outerScrollViewer.Width = c_defaultBringIntoViewUIScrollPresenterNonConstrainedSize;
01229                 outerScrollViewer.Height = c_defaultBringIntoViewUIScrollPresenterConstrainedSize;
01230             }
01231             outerScrollViewer.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
01232             outerScrollViewer.Content = border;
01233
01234             InsertStackPanelChild(stackPanel, 0 /*operationCount*/, 0 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);
01235
01236             stackPanel.Children.Add(innerScrollViewer);
01237
01238             InsertStackPanelChild(stackPanel, 0 /*operationCount*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 + 1 /*newIndex*/, c_defaultBringIntoViewUIStackPanelChildrenCount / 2 /*newCount*/, "outer" /*namePrefix*/);
01239
01240             if (outerScrollViewerLoadedEvent != null)
01241             {
01242                 outerScrollViewer.Loaded += (object sender, RoutedEventArgs e) =>
01243                 {
01244                     Log.Comment("Outer ScrollViewer.Loaded event handler");
01245                     outerScrollViewerLoadedEvent.Set();
01246                 };
01247             }
01248
01249             Log.Comment("Setting window content");
01250             Content = outerScrollViewer;
01251         }
01252
01253         private void AddSnapPoints(ScrollPresenter scrollPresenter, StackPanel stackPanel)
01254         {
01255             Verify.IsNotNull(scrollPresenter);
01256
01257             if (stackPanel == null || stackPanel.Children.Count == 0)
01258             {
01259                 return;
01260             }
01261
01262             Log.Comment("Populating snap points for " + scrollPresenter.Name + ":");
01263
01264             ScrollSnapPoint scrollSnapPoint;
01265             GeneralTransform gt = stackPanel.TransformToVisual(scrollPresenter.Content);
01266             Point stackPanelOriginPoint = new Point();
01267             stackPanelOriginPoint = gt.TransformPoint(stackPanelOriginPoint);
01268
01269             if (stackPanel.Orientation == Orientation.Horizontal)
01270             {
01271                 scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.X, ScrollSnapPointsAlignment.Near);
01272                 Log.Comment("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.X);
01273                 scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
01274             }
01275             else
01276             {
01277                 scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.Y, ScrollSnapPointsAlignment.Near);
01278                 Log.Comment("Adding vertical snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.Y);
01279                 scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
01280             }
01281
01282             foreach (UIElement child in stackPanel.Children)
01283             {
01284                 FrameworkElement childAsFE = child as FrameworkElement;
01285
01286                 if (childAsFE != null)
01287                 {
01288                     gt = childAsFE.TransformToVisual(stackPanel);
01289                     Point childOriginPoint = new Point();
01290                     childOriginPoint = gt.TransformPoint(childOriginPoint);
01291
01292                     double snapPointValue = 0.0;
01293                     Thickness margin = childAsFE.Margin;
01294
01295                     if (stackPanel.Orientation == Orientation.Horizontal)
01296                     {
01297                         snapPointValue = margin.Right + childAsFE.ActualWidth + childOriginPoint.X;
01298                         if (snapPointValue <= scrollPresenter.ScrollableWidth)
01299                         {
01300                             scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
01301                             Log.Comment("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
01302                             scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
01303                         }
01304                         else
01305                         {
01306                             break;
01307                         }
01308                     }
01309                     else
01310                     {
01311                         snapPointValue = margin.Bottom + childAsFE.ActualHeight + childOriginPoint.Y;
01312                         if (snapPointValue <= scrollPresenter.ScrollableHeight)
01313                         {
01314                             scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
01315                             Log.Comment("Adding vertical snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
01316                             scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
01317                         }
01318                         else
01319                         {
01320                             break;
01321                         }
01322                     }
01323                 }
01324
01325                 AddSnapPoints(scrollPresenter, child as StackPanel);
01326             }
01327         }
01328     }
01329 }
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/OffsetsChange.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

OffsetsChange.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ScrollPresenterTrace.h"
00008 #include "OffsetsChange.h"
00009
00010 OffsetsChange::OffsetsChange(
00011     double zoomedHorizontalOffset,
00012     double zoomedVerticalOffset,
00013     ScrollPresenterViewKind offsetsKind,
00014     winrt::IInspectable const& options) :
00015         m_zoomedHorizontalOffset(zoomedHorizontalOffset),
00016         m_zoomedVerticalOffset(zoomedVerticalOffset),
00017         ViewChange(offsetsKind, options)
00018 {
00019     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL_DBL, METH_NAME, this,
00020         zoomedHorizontalOffset, zoomedVerticalOffset);
00021 }
00022
00023 OffsetsChange::~OffsetsChange()
00024 {
00025     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00026 }
00027
00028 void OffsetsChange::ZoomedHorizontalOffset(double zoomedHorizontalOffset)
00029 {
00030     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, zoomedHorizontalOffset);
00031
00032     m_zoomedHorizontalOffset = zoomedHorizontalOffset;
00033 }
00034
00035 void OffsetsChange::ZoomedVerticalOffset(double zoomedVerticalOffset)
00036 {
00037     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_DBL, METH_NAME, this, zoomedVerticalOffset);
00038
00039     m_zoomedVerticalOffset = zoomedVerticalOffset;
00040 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBrushProperties Member List

This is the complete list of members for RevealBrushProperties, including all inherited members.
AlwaysUseFallback(bool value) | RevealBrushProperties |
AlwaysUseFallback() | RevealBrushProperties |
AlwaysUseFallbackProperty() | RevealBrushProperties | [inline, static]
ClearProperties() | RevealBrushProperties | [static]
Color(winrt::Color const &value) | RevealBrushProperties |
Color() | RevealBrushProperties |
ColorProperty() | RevealBrushProperties | [inline, static]
EnsureProperties() | RevealBrushProperties | [static]
GetState(winrt::UIElement const &target) | RevealBrushProperties | [static]
OnAlwaysUseFallbackPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RevealBrushProperties | [static]
OnColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RevealBrushProperties | [static]
OnTargetThemePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RevealBrushProperties | [static]
RevealBrushProperties() | RevealBrushProperties |
s_AlwaysUseFallbackProperty | RevealBrushProperties | [static]
s_ColorProperty | RevealBrushProperties | [static]
s_StateProperty | RevealBrushProperties | [static]
s_TargetThemeProperty | RevealBrushProperties | [static]
SetState(winrt::UIElement const &target, winrt::RevealBrushState const &value) | RevealBrushProperties | [static]
StateProperty() | RevealBrushProperties | [inline, static]
TargetTheme(winrt::ApplicationTheme const &value) | RevealBrushProperties |
TargetTheme() | RevealBrushProperties |
TargetThemeProperty() | RevealBrushProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpectrumBrush Member List

This is the complete list of members for SpectrumBrush, including all inherited members.
abi_enter() | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
ClearProperties() | SpectrumBrushProperties | [static]
CreateSpectrumBrush() | SpectrumBrush | [private]
DeleteInstanceOnUIThread(std::unique_ptr< SpectrumBrush > &&self) noexcept | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline, static]
EnsureProperties() | SpectrumBrushProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
final_release(std::unique_ptr< SpectrumBrush > &&self) | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
GetInner() | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
MaxSurface(winrt::LoadedImageSurface const &value) | SpectrumBrushProperties |
MaxSurface() | SpectrumBrushProperties |
MaxSurfaceOpacity(double value) | SpectrumBrushProperties |
MaxSurfaceOpacity() | SpectrumBrushProperties |
MaxSurfaceOpacityProperty() | SpectrumBrushProperties | [inline, static]
MaxSurfaceProperty() | SpectrumBrushProperties | [inline, static]
MinSurface(winrt::LoadedImageSurface const &value) | SpectrumBrushProperties |
MinSurface() | SpectrumBrushProperties |
MinSurfaceProperty() | SpectrumBrushProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
OnConnected() | SpectrumBrush |
OnDisconnected() | SpectrumBrush |
OnMaxSurfaceOpacityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SpectrumBrushProperties | [static]
OnMaxSurfacePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SpectrumBrushProperties | [static]
OnMinSurfacePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SpectrumBrushProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | SpectrumBrush |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable > | [inline]
s_MaxSurfaceOpacityProperty | SpectrumBrushProperties | [static]
s_MaxSurfaceProperty | SpectrumBrushProperties | [static]
s_MinSurfaceProperty | SpectrumBrushProperties | [static]
SpectrumBrushProperties() | SpectrumBrushProperties |
UpdateSpectrumBrush() | SpectrumBrush | [private]
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/APITests/ComboBoxTests.cs Source File

  • File List
  • File Members
  • ComboBox
  • APITests

ComboBoxTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using System.Linq;
00009 using MUXControlsTestApp;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00016 {
00017     [TestClass]
00018     public class ComboBoxTests : ApiTestBase
00019     {
00020         [TestMethod]
00021         public void VerifyComboBoxOverlayCornerRadius()
00022         {
00023             var comboBox = SetupComboBox();
00024             RunOnUIThread.Execute(() =>
00025             {
00026                 comboBox.CornerRadius = new CornerRadius(2);
00027                 comboBox.IsDropDownOpen = true;
00028             });
00029             IdleSynchronizer.Wait();
00030
00031             RunOnUIThread.Execute(() =>
00032             {
00033                 var background = TestUtilities.FindDescendents<Border>(comboBox).Where(e => e.Name == "Background").Single();
00034                 Verify.AreEqual(new CornerRadius(2, 2, 2, 2), background.CornerRadius);
00035
00036                 var overlayCornerRadius = new CornerRadius(0, 0, 0, 0);
00037                 var radius = App.Current.Resources["OverlayCornerRadius"];
00038                 if (radius != null)
00039                 {
00040                     overlayCornerRadius = (CornerRadius)radius;
00041                 }
00042                 var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(comboBox.XamlRoot).Last();
00043                 var popupBorder = TestUtilities.FindDescendents<Border>(popup).Where(e => e.Name=="PopupBorder").Single();
00044                 Verify.AreEqual(overlayCornerRadius, popupBorder.CornerRadius);
00045             });
00046         }
00047
00048         [TestMethod]
00049         public void VerifyComboBoxEditModeCornerRadius()
00050         {
00051             var comboBox = SetupComboBox();
00052             RunOnUIThread.Execute(() =>
00053             {
00054                 comboBox.CornerRadius = new CornerRadius(2);
00055                 comboBox.IsEditable = true;
00056                 comboBox.IsDropDownOpen = true;
00057             });
00058             IdleSynchronizer.Wait();
00059
00060             RunOnUIThread.Execute(() =>
00061             {
00062                 var editableText = TestUtilities.FindDescendents<TextBox>(comboBox).Where(e => e.Name == "EditableText").Single();
00063                 Verify.AreEqual(new CornerRadius(2, 2, 0, 0), editableText.CornerRadius);
00064
00065                 var overlayCornerRadius = new CornerRadius(0, 0, 0, 0);
00066                 var radius = App.Current.Resources["OverlayCornerRadius"];
00067                 if (radius != null)
00068                 {
00069                     overlayCornerRadius = (CornerRadius)radius;
00070                 }
00071                 var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(comboBox.XamlRoot).Last();
00072                 var popupBorder = TestUtilities.FindDescendents<Border>(popup).Where(e => e.Name == "PopupBorder").Single();
00073                 Verify.AreEqual(new CornerRadius(0, 0, overlayCornerRadius.BottomRight, overlayCornerRadius.BottomLeft), popupBorder.CornerRadius);
00074             });
00075         }
00076
00077         [TestMethod]
00078         public void VerifyVisualTree()
00079         {
00080             var comboBox = SetupComboBox(useContent: false);
00081             RunOnUIThread.Execute(() =>
00082             {
00083                 comboBox.IsDropDownOpen = true;
00084             });
00085             IdleSynchronizer.Wait();
00086
00087             VisualTreeTestHelper.VerifyVisualTree(root: comboBox, verificationFileNamePrefix: "ComboBox");
00088         }
00089
00090         private ComboBox SetupComboBox(bool useContent = true)
00091         {
00092             ComboBox comboBox = null;
00093             RunOnUIThread.Execute(() =>
00094             {
00095                 comboBox = new ComboBox();
00096                 comboBox.Items.Add("Item 1");
00097                 comboBox.Items.Add("Item 2");
00098                 comboBox.Items.Add("Item 3");
00099                 comboBox.Items.Add("Item 4");
00100                 comboBox.Items.Add("Item 5");
00101                 comboBox.Items.Add("Item 6");
00102                 if (useContent)
00103                 {
00104                     Content = comboBox;
00105                     Content.UpdateLayout();
00106                 }
00107             });
00108             if(!useContent)
00109             {
00110                 TestUtilities.SetAsVisualTreeRoot(comboBox);
00111             }
00112             Verify.IsNotNull(comboBox);
00113             return comboBox;
00114         }
00115
00116     }
00117 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.cpp Source File

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarScrollingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "AnnotatedScrollBarScrollingEventArgs.h"
00007
00008 AnnotatedScrollBarScrollingEventArgs::AnnotatedScrollBarScrollingEventArgs(double scrollOffset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind)
00009 {
00010     m_scrollOffset = scrollOffset;
00011     m_scrollingEventKind = scrollingEventKind;
00012 }
00013
00014 #pragma region IAnnotatedScrollBarScrollingEventArgs
00015
00016 winrt::AnnotatedScrollBarScrollingEventKind AnnotatedScrollBarScrollingEventArgs::ScrollingEventKind()
00017 {
00018     return m_scrollingEventKind;
00019 }
00020
00021 double AnnotatedScrollBarScrollingEventArgs::ScrollOffset()
00022 {
00023     return m_scrollOffset;
00024 }
00025
00026 void AnnotatedScrollBarScrollingEventArgs::Cancel(bool cancel)
00027 {
00028     m_cancel = cancel;
00029 }
00030
00031 bool AnnotatedScrollBarScrollingEventArgs::Cancel()
00032 {
00033     return m_cancel;
00034 }
00035
00036 #pragma endregion
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrum.h Source File

  • File List
  • File Members
  • ColorPicker

ColorSpectrum.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ColorHelpers.h"
00007 #include "ColorChangedEventArgs.h"
00008
00009 #include "ColorSpectrum.g.h"
00010 #include "ColorSpectrum.properties.h"
00011
00012 class ColorSpectrum :
00013     public ReferenceTracker<ColorSpectrum, winrt::implementation::ColorSpectrumT>,
00014     public ColorSpectrumProperties
00015 {
00016 public:
00017     ColorSpectrum();
00018
00019     // IUIElementOverridesHelper overrides
00020     winrt::AutomationPeer OnCreateAutomationPeer();
00021
00022     // IFrameworkElementOverrides overrides
00023     void OnApplyTemplate();
00024
00025     // IControlOverrides overrides
00026     void OnKeyDown(winrt::KeyRoutedEventArgs const& e);
00027     void OnGotFocus(winrt::RoutedEventArgs const& e);
00028     void OnLostFocus(winrt::RoutedEventArgs const& e);
00029
00030     // Property changed handler.
00031     void OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00032
00033     winrt::Rect GetBoundingRectangle();
00034     void RaiseColorChanged();
00035
00036 private:
00037
00038     // DependencyProperty changed event handlers
00039     void OnColorChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00040     void OnHsvColorChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00041     void OnMinMaxHueChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00042     void OnMinMaxSaturationChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00043     void OnMinMaxValueChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00044     void OnShapeChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00045     void OnComponentsChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00046
00047     // ColorSpectrum event handlers
00048     void OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00049
00050     // Template part event handlers
00051     void OnLayoutRootSizeChanged(winrt::IInspectable const& sender, winrt::SizeChangedEventArgs const& args);
00052     void OnInputTargetPointerEntered(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00053     void OnInputTargetPointerExited(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00054     void OnInputTargetPointerMoved(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00055     void OnInputTargetPointerReleased(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00056     void OnInputTargetPointerPressed(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00057     void OnSelectionEllipseFlowDirectionChanged(winrt::DependencyObject const& o, winrt::DependencyProperty const& p);
00058
00059     // Helper functions
00060     void SetColor();
00061
00062     void UpdateVisualState(bool useTransitions);
00063     void UpdateColor(Hsv newHsv);
00064     void UpdateColorFromPoint(const winrt::PointerPoint& point);
00065     void UpdateEllipse();
00066
00067     void CreateBitmapsAndColorMap();
00068     void UpdateBitmapSources();
00069
00070     bool SelectionEllipseShouldBeLight();
00071
00072     // Helpers used by CreateBitmapsAndColorMap() to fill pixel data and create bitmaps from that data.
00073     static void FillPixelForBox(
00074         double x,
00075         double y,
00076         const Hsv &baseHsv,
00077         double minDimension,
00078         winrt::ColorSpectrumComponents components,
00079         double minHue,
00080         double maxHue,
00081         double minSaturation,
00082         double maxSaturation,
00083         double minValue,
00084         double maxValue,
00085         std::shared_ptr<std::vector<byte>> bgraMinPixelData,
00086         std::shared_ptr<std::vector<byte>> bgraMiddle1PixelData,
00087         std::shared_ptr<std::vector<byte>> bgraMiddle2PixelData,
00088         std::shared_ptr<std::vector<byte>> bgraMiddle3PixelData,
00089         std::shared_ptr<std::vector<byte>> bgraMiddle4PixelData,
00090         std::shared_ptr<std::vector<byte>> bgraMaxPixelData,
00091         std::shared_ptr<std::vector<Hsv>> newHsvValues);
00092     static void FillPixelForRing(
00093         double x,
00094         double y,
00095         double radius,
00096         const Hsv &baseHsv,
00097         winrt::ColorSpectrumComponents components,
00098         double minHue,
00099         double maxHue,
00100         double minSaturation,
00101         double maxSaturation,
00102         double minValue,
00103         double maxValue,
00104         std::shared_ptr<std::vector<byte>> bgraMinPixelData,
00105         std::shared_ptr<std::vector<byte>> bgraMiddle1PixelData,
00106         std::shared_ptr<std::vector<byte>> bgraMiddle2PixelData,
00107         std::shared_ptr<std::vector<byte>> bgraMiddle3PixelData,
00108         std::shared_ptr<std::vector<byte>> bgraMiddle4PixelData,
00109         std::shared_ptr<std::vector<byte>> bgraMaxPixelData,
00110         std::shared_ptr<std::vector<Hsv>> newHsvValues);
00111
00112     bool m_updatingColor;
00113     bool m_updatingHsvColor;
00114     bool m_isPointerOver;
00115     bool m_isPointerPressed;
00116     bool m_shouldShowLargeSelection;
00117     std::vector<Hsv> m_hsvValues;
00118
00119     // XAML elements
00120     tracker_ref<winrt::Grid> m_layoutRoot{ this };
00121     tracker_ref<winrt::Grid> m_sizingGrid{ this };
00122
00123     tracker_ref<winrt::Rectangle> m_spectrumRectangle{ this };
00124     tracker_ref<winrt::Ellipse> m_spectrumEllipse{ this };
00125     tracker_ref<winrt::Rectangle> m_spectrumOverlayRectangle{ this };
00126     tracker_ref<winrt::Ellipse> m_spectrumOverlayEllipse{ this };
00127
00128     tracker_ref<winrt::FrameworkElement> m_inputTarget{ this };
00129     tracker_ref<winrt::Panel> m_selectionEllipsePanel{ this };
00130
00131     tracker_ref<winrt::ToolTip> m_colorNameToolTip{ this };
00132
00133     winrt::IAsyncAction m_createImageBitmapAction{ nullptr };
00134
00135     // On RS1 and before, we put the spectrum images in a bitmap,
00136     // which we then give to an ImageBrush.
00137     winrt::WriteableBitmap m_hueRedBitmap{ nullptr };
00138     winrt::WriteableBitmap m_hueYellowBitmap{ nullptr };
00139     winrt::WriteableBitmap m_hueGreenBitmap{ nullptr };
00140     winrt::WriteableBitmap m_hueCyanBitmap{ nullptr };
00141     winrt::WriteableBitmap m_hueBlueBitmap{ nullptr };
00142     winrt::WriteableBitmap m_huePurpleBitmap{ nullptr };
00143
00144     winrt::WriteableBitmap m_saturationMinimumBitmap{ nullptr };
00145     winrt::WriteableBitmap m_saturationMaximumBitmap{ nullptr };
00146
00147     winrt::WriteableBitmap m_valueBitmap{ nullptr };
00148
00149     // On RS2 and later, we put the spectrum images in a loaded image surface,
00150     // which we then put into a SpectrumBrush.
00151     winrt::LoadedImageSurface m_hueRedSurface{ nullptr };
00152     winrt::LoadedImageSurface m_hueYellowSurface{ nullptr };
00153     winrt::LoadedImageSurface m_hueGreenSurface{ nullptr };
00154     winrt::LoadedImageSurface m_hueCyanSurface{ nullptr };
00155     winrt::LoadedImageSurface m_hueBlueSurface{ nullptr };
00156     winrt::LoadedImageSurface m_huePurpleSurface{ nullptr };
00157
00158     winrt::LoadedImageSurface m_saturationMinimumSurface{ nullptr };
00159     winrt::LoadedImageSurface m_saturationMaximumSurface{ nullptr };
00160
00161     winrt::LoadedImageSurface m_valueSurface{ nullptr };
00162
00163     // Fields used by UpdateEllipse() to ensure that it's using the data
00164     // associated with the last call to CreateBitmapsAndColorMap(),
00165     // in order to function properly while the asynchronous bitmap creation
00166     // is in progress.
00167     winrt::ColorSpectrumShape m_shapeFromLastBitmapCreation{ winrt::ColorSpectrumShape::Box };
00168     winrt::ColorSpectrumComponents m_componentsFromLastBitmapCreation{ winrt::ColorSpectrumComponents::HueSaturation };
00169     double m_imageWidthFromLastBitmapCreation{ 0.0 };
00170     double m_imageHeightFromLastBitmapCreation{ 0.0 };
00171     int m_minHueFromLastBitmapCreation{ 0 };
00172     int m_maxHueFromLastBitmapCreation{ 0 };
00173     int m_minSaturationFromLastBitmapCreation{ 0 };
00174     int m_maxSaturationFromLastBitmapCreation{ 0 };
00175     int m_minValueFromLastBitmapCreation{ 0 };
00176     int m_maxValueFromLastBitmapCreation{ 0 };
00177
00178     winrt::Color m_oldColor{ 255, 255, 255, 255 };
00179     winrt::float4 m_oldHsvColor{ 0.0, 0.0, 1.0, 1.0 };
00180
00181 };
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarios.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealScenarios.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Diagnostics;
00008 using System.IO;
00009 using System.Linq;
00010 using System.Runtime.InteropServices.WindowsRuntime;
00011 using Windows.Foundation;
00012 using Windows.Foundation.Collections;
00013 using Microsoft.UI.Xaml;
00014 using Microsoft.UI.Xaml.Controls;
00015 using Microsoft.UI.Xaml.Controls.Primitives;
00016 using Microsoft.UI.Xaml.Data;
00017 using Microsoft.UI.Xaml.Input;
00018 using Microsoft.UI.Xaml.Media;
00019 using Microsoft.UI.Xaml.Navigation;
00020 using MUXControlsTestApp.Utilities;
00021
00022 namespace MUXControlsTestApp
00023 {
00024     public sealed partial class RevealScenarios : TestPage
00025     {
00026         private ObservableCollection<RevealScenarioItem> listSource;
00027         ObservableCollection<RevealThemeItem> themeSource;
00028         public RevealScenarios()
00029         {
00030             this.InitializeComponent();
00031
00032             listSource = new ObservableCollection<RevealScenarioItem>();
00033             listSource.Add(new RevealScenarioItem { Header = "Adjust Lights", SubHeader = "Click to adjust light props", Icon = "\uE105", Page = typeof(RevealScenarioLights) });
00034             listSource.Add(new RevealScenarioItem { Header = "Adjust Colors", SubHeader = "Click to adjust color props", Icon = "\uE105", Page = typeof(RevealScenarioColors) });
00035             listSource.Add(new RevealScenarioItem { Header = "Grid Test", SubHeader = "Click to see GridView tests", Icon = "\uE105", Page = typeof(RevealScenarioGrid) });
00036             listSource.Add(new RevealScenarioItem { Header = "List Test", SubHeader = "Click to see ListView", Icon = "\uE105", Page = typeof(RevealScenarioList) });
00037             listSource.Add(new RevealScenarioItem { Header = "Make another view", SubHeader = "Make secondary views", Icon = "\uE105", Page = typeof(RevealScenarioSecondaryView) });
00038             listSource.Add(new RevealScenarioItem { Header = "Test Item 4", SubHeader = "Click to do nothing", Icon = "\uE105" });
00039
00040             themeSource = new ObservableCollection<RevealThemeItem>();
00041             foreach (ElementTheme theme in Enum.GetValues(typeof(ElementTheme)))
00042             {
00043                 themeSource.Add(new RevealThemeItem { Name = Enum.GetName(typeof(ElementTheme), theme), Theme = theme });
00044             }
00045         }
00046
00047         private void RevealList_SelectionChanged(object sender, SelectionChangedEventArgs e)
00048         {
00049             ListView list = (ListView)sender;
00050             RevealScenarioItem item = (RevealScenarioItem)list.SelectedItem;
00051             if (item.Page != null)
00052             {
00053                 ContentFrame.NavigateWithoutAnimation(item.Page);
00054             }
00055         }
00056
00057         private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00058         {
00059             ComboBox box = (ComboBox)sender;
00060             this.RequestedTheme = ((RevealThemeItem)box.SelectedItem).Theme;
00061         }
00062
00063         private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
00064         {
00065             ToggleSwitch toggle = (ToggleSwitch)sender;
00066             if (toggle.IsOn)
00067             {
00068                 VisualStateManager.GoToState(this, "UseAcrylic", false);
00069             }
00070             else
00071             {
00072                 VisualStateManager.GoToState(this, "NoAcrylic", false);
00073             }
00074         }
00075     }
00076     public class RevealScenarioItem
00077     {
00078         public string Header;
00079         public string SubHeader;
00080         public string Icon;
00081         public Type Page;
00082     }
00083
00084     public class RevealThemeItem
00085     {
00086         public string Name;
00087         public ElementTheme Theme;
00088     }
00089 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/XamlAmbientLight.cpp Source File

  • File List
  • File Members
  • Lights

XamlAmbientLight.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "XamlAmbientLight.h"
00007 #include "IsTargetDPHelper.h"
00008
00009 #pragma warning(push)
00010 #pragma warning(disable: 6101)  // Returning uninitialized memory '<value>'.  A successful path through the function does not set the named _Out_ parameter.
00011 #include "Microsoft.UI.Private.Composition.Effects_impl.h"
00012 #pragma warning(pop)
00013
00014 const winrt::Color XamlAmbientLight::sc_defaultColor{ 255, 255, 255, 255 };
00015
00016 XamlAmbientLight::XamlAmbientLight()
00017 {
00018     m_ambientLightColor = sc_defaultColor;
00019 }
00020
00021 winrt::hstring& XamlAmbientLight::GetLightIdStatic()
00022 {
00023     static winrt::hstring s_XamlAmbientLightId{ MUXCONTROLSMEDIA_NAMESPACE_STR L".XamlAmbientLight" };
00024     return s_XamlAmbientLightId;
00025 }
00026
00027 winrt::hstring XamlAmbientLight::GetId()
00028 {
00029     return GetLightIdStatic();
00030 }
00031
00032 void XamlAmbientLight::OnConnected(winrt::UIElement const& /*newElement*/)
00033 {
00034     m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });
00035
00036     if (!m_isDisabledByMaterialPolicy)
00037     {
00038         EnsureCompositionResources();
00039     }
00040
00041 }
00042
00043 void XamlAmbientLight::OnDisconnected(winrt::UIElement const& /*oldElement*/)
00044 {
00045     ReleaseCompositionResources();
00046
00047     MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
00048     m_materialPolicyChangedToken.value = 0;
00049 }
00050
00051 void XamlAmbientLight::EnsureCompositionResources()
00052 {
00053     if (!m_compositionAmbientLight)
00054     {
00055         auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00056         m_compositionAmbientLight = compositor.CreateAmbientLight();
00057         m_compositionAmbientLight.Color(m_ambientLightColor);
00058         CompositionLight(m_compositionAmbientLight);
00059     }
00060 }
00061
00062 void XamlAmbientLight::ReleaseCompositionResources()
00063 {
00064     if (m_compositionAmbientLight)
00065     {
00066         m_compositionAmbientLight = nullptr;
00067         CompositionLight(nullptr);
00068     }
00069 }
00070
00071 void XamlAmbientLight::OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy)
00072 {
00073     // MaterialHelper::LightPolicyChangedHelper<XamlAmbientLight>(this, isDisabledByMaterialPolicy); // Bug 24355584: DCPP: Reveal is disabled
00074     MaterialHelper::LightPolicyChangedHelper<XamlAmbientLight>(this, true);
00075 }
00076
00077 void XamlAmbientLight::OnColorPropertyChanged(
00078     const winrt::DependencyPropertyChangedEventArgs& args)
00079 {
00080     m_ambientLightColor = unbox_value<winrt::Color>(args.NewValue());
00081     if (m_compositionAmbientLight)
00082     {
00083         m_compositionAmbientLight.Color(m_ambientLightColor);
00084     }
00085 }
00086
00087 void XamlAmbientLight::OnIsTargetPropertyChanged(
00088     const winrt::DependencyObject& sender,
00089     const winrt::DependencyPropertyChangedEventArgs& args)
00090 {
00091     OnAttachedIsTargetPropertyChanged<XamlAmbientLight>(sender, args);
00092 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooksFactory.cpp Source File

  • File List
  • File Members
  • SwipeControl

SwipeTestHooksFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SwipeTestHooksFactory.h"
00007
00008 #include "SwipeTestHooks.properties.cpp"
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Awaitable Member List

This is the complete list of members for Awaitable, including all inherited members.
await_ready() const noexcept | Awaitable | [inline]
await_resume() const noexcept | Awaitable | [inline]
await_suspend(std::experimental::coroutine_handle<> resume) | Awaitable | [inline]
Awaitable() | Awaitable | [inline]
CompleteAwaits() const noexcept | Awaitable | [inline, protected]
CoroutineCompletedCallback(PTP_CALLBACK_INSTANCE, void *context, PTP_WAIT, TP_WAIT_RESULT) noexcept | Awaitable | [inline, private, static]
m_signal | Awaitable | [private]
m_wait | Awaitable | [private]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooks.cpp Source File

  • File List
  • File Members
  • ScrollView

ScrollViewTestHooks.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollViewTestHooksFactory.h"
00007
00008 com_ptr<ScrollViewTestHooks> ScrollViewTestHooks::s_testHooks{};
00009
00010 com_ptr<ScrollViewTestHooks> ScrollViewTestHooks::EnsureGlobalTestHooks()
00011 {
00012     static bool s_initialized = []()
00013     {
00014         s_testHooks = winrt::make_self<ScrollViewTestHooks>();
00015         return true;
00016     }();
00017     return s_testHooks;
00018 }
00019
00020 winrt::IReference<bool> ScrollViewTestHooks::GetAutoHideScrollControllers(const winrt::ScrollView& scrollView)
00021 {
00022     if (scrollView && s_testHooks)
00023     {
00024         const auto hooks = EnsureGlobalTestHooks();
00025         const auto iterator = hooks->m_autoHideScrollControllersMap.find(scrollView);
00026
00027         if (iterator != hooks->m_autoHideScrollControllersMap.end())
00028         {
00029             return iterator->second;
00030         }
00031     }
00032
00033     return nullptr;
00034 }
00035
00036 void ScrollViewTestHooks::SetAutoHideScrollControllers(const winrt::ScrollView& scrollView, winrt::IReference<bool> value)
00037 {
00038     if (scrollView && (s_testHooks || value))
00039     {
00040         const auto hooks = EnsureGlobalTestHooks();
00041         const auto iterator = hooks->m_autoHideScrollControllersMap.find(scrollView);
00042
00043         if (iterator != hooks->m_autoHideScrollControllersMap.end())
00044         {
00045             if (value)
00046             {
00047                 iterator->second = value;
00048             }
00049             else
00050             {
00051                 hooks->m_autoHideScrollControllersMap.erase(iterator);
00052             }
00053         }
00054         else if (value)
00055         {
00056             hooks->m_autoHideScrollControllersMap.emplace(scrollView, value);
00057         }
00058
00059         winrt::get_self<ScrollView>(scrollView)->ScrollControllersAutoHidingChangedDbg();
00060     }
00061 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingDeterminate Member List

This is the complete list of members for ProgressRingDeterminate, including all inherited members.
Background() | ProgressRingDeterminate | [inline, private]
Background(winrt::Windows::UI::Color value) | ProgressRingDeterminate | [private]
ColorAsVector4(winrt::Windows::UI::Color color) | ProgressRingDeterminate | [private]
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | ProgressRingDeterminate | [private]
Foreground() | ProgressRingDeterminate | [private]
Foreground(winrt::Windows::UI::Color value) | ProgressRingDeterminate | [private]
GetThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | ProgressRingDeterminate | [virtual]
IsRuntimeCompatible() | ProgressRingDeterminate | [inline, private, static]
TryCreateAnimatedVisual(const winrt::Microsoft::UI::Composition::Compositor &compositor, winrt::IInspectable &diagnostics) | ProgressRingDeterminate | [virtual]
TryCreateAnimatedVisual(Compositor compositor, out object diagnostics) | ProgressRingDeterminate | [inline]
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CustomItemsSourceWithUniqueId Member List

This is the complete list of members for CustomItemsSourceWithUniqueId, including all inherited members.
Add(object value) | CustomItemsSourceView | [inline]
Clear() | CustomItemsSource | [inline]
CollectionChanged | CustomItemsSourceView |
Contains(object value) | CustomItemsSourceView | [inline]
CopyTo(Array array, int index) | CustomItemsSourceView | [inline]
Count | CustomItemsSourceView |
CustomItemsSource(List< int > source) | CustomItemsSource | [inline]
CustomItemsSourceWithUniqueId(List< int > source) | CustomItemsSourceWithUniqueId | [inline]
GetAt(int index) | CustomItemsSource | [inline]
GetAtCallCount | CustomItemsSource |
GetAtCore(int index) | CustomItemsSource | [inline, protected, virtual]
GetEnumerator() | CustomItemsSourceView | [inline]
GetSizeCore() | CustomItemsSource | [inline, protected, virtual]
IndexFromKey(string id) | CustomItemsSourceWithUniqueId | [inline]
IndexOf(object value) | CustomItemsSourceView | [inline]
Inner | CustomItemsSource |
Insert(int index, int count, bool reset, int valueStart=1000) | CustomItemsSource | [inline]
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceView::Insert(int index, object value) | CustomItemsSourceView | [inline]
IsFixedSize | CustomItemsSourceView |
IsReadOnly | CustomItemsSourceView |
IsSynchronized | CustomItemsSourceView |
KeyFromIndex(int index) | CustomItemsSourceWithUniqueId | [inline]
Move(int oldIndex, int newIndex, int count, bool reset) | CustomItemsSource | [inline]
OnItemsSourceChanged(NotifyCollectionChangedEventArgs args) | CustomItemsSourceView | [inline, protected]
Remove(int index, int count, bool reset) | CustomItemsSource | [inline]
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceView::Remove(object value) | CustomItemsSourceView | [inline]
RemoveAt(int index) | CustomItemsSourceView | [inline]
Replace(int index, int oldCount, int newCount, bool reset) | CustomItemsSource | [inline]
Reset() | CustomItemsSource | [inline]
SyncRoot | CustomItemsSourceView |
this | CustomItemsSourceView |
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2CoreObjectsPage.xaml.cs Source File

  • File List
  • File Members
  • WebView2
  • TestUI

WebView2CoreObjectsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Markup;
00007 using Microsoft.UI.Xaml.Navigation;
00008 using Microsoft.Web.WebView2.Core;
00009 using System;
00010 using System.Diagnostics;
00011 using System.Threading.Tasks;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     public sealed partial class WebView2CoreObjectsPage : TestPage
00016     {
00017         enum TestList
00018         {
00019             BasicCoreObjectCreationAndDestructionTest,
00020             ConcurrentCreationRequestsTest,
00021             EdgeProcessFailedTest
00022         };
00023
00024         readonly WebView2Common _helpers;
00025         WebView2 _wv2_Programmatic_Offline;
00026         WebView2 _wv2_Programmatic_Live;
00027         WebView2 _wv2_Markup;
00028         WebView2 _wv2_ConcurrentCreation;
00029
00030         WebView2 _wv2_CoreProcessFailed;
00031
00032         int _coreWebView2InitializedCount = 0;
00033         int _ensureCoreWebView2CompletionCount = 0;
00034         int _navigationStartingCount = 0;
00035         int _navigationCompletedCount = 0;
00036         int _loadedCount = 0;
00037         int _unloadedCount = 0;
00038         int _closedExceptionCount = 0;
00039         int _coreProcessFailedCount = 0;
00040
00041         bool _areWebviewElementsCleanedUp = false;
00042
00043         public WebView2CoreObjectsPage()
00044         {
00045             InitializeComponent();
00046             _helpers = new WebView2Common(this);
00047             Loaded += Page_Loaded;
00048         }
00049
00050         private void Page_Loaded(object sender, RoutedEventArgs e)
00051         {
00052             _helpers.ClearStatus();
00053             _helpers.CopyTestPagesLocally();
00054         }
00055
00056         void SetCoreWebView2InitializedCount(int value)
00057         {
00058             CoreWebView2InitializedCount.Text = value.ToString();
00059             _coreWebView2InitializedCount = value;
00060         }
00061         void SetEnsureCoreWebView2CompletionCount(int value)
00062         {
00063             EnsureCoreWebView2CompletionCount.Text = value.ToString();
00064             _ensureCoreWebView2CompletionCount = value;
00065         }
00066
00067         void SetNavigationStartingCount(int value)
00068         {
00069             NavigationStartingCount.Text = value.ToString();
00070             _navigationStartingCount = value;
00071         }
00072
00073         void SetNavigationCompletedCount(int value)
00074         {
00075             NavigationCompletedCount.Text = value.ToString();
00076             _navigationCompletedCount = value;
00077         }
00078
00079         void SetLoadedCount(int value)
00080         {
00081             LoadedCount.Text = value.ToString();
00082             _loadedCount = value;
00083         }
00084
00085         void SetUnloadedCount(int value)
00086         {
00087             UnloadedCount.Text = value.ToString();
00088             _unloadedCount = value;
00089         }
00090
00091         void SetClosedExceptionCount(int value)
00092         {
00093             ClosedExceptionCount.Text = value.ToString();
00094             _closedExceptionCount = value;
00095         }
00096
00097         void SetCoreProcessFailedCount(int value)
00098         {
00099             CoreProcessFailedCount.Text = value.ToString();
00100             _coreProcessFailedCount = value;
00101         }
00102
00103         void ResetCounts()
00104         {
00105             SetCoreWebView2InitializedCount(0);
00106             SetEnsureCoreWebView2CompletionCount(0);
00107             SetNavigationStartingCount(0);
00108             SetNavigationCompletedCount(0);
00109             SetLoadedCount(0);
00110             SetUnloadedCount(0);
00111             SetClosedExceptionCount(0);
00112             SetCoreProcessFailedCount(0);
00113         }
00114
00115         void AddWebViewEventHandlers(WebView2 webview)
00116         {
00117             ResetCounts();
00118
00119             webview.NavigationStarting += OnNavigationStarting;
00120             webview.NavigationCompleted += OnNavigationCompleted;
00121             webview.CoreWebView2Initialized += OnCoreWebView2Initialized;
00122             webview.Loaded += OnLoaded;
00123             webview.Unloaded += OnUnloaded;
00124             webview.CoreProcessFailed += OnCoreProcessFailed;
00125         }
00126
00127         void RemoveWebViewEventHandlers(WebView2 webview)
00128         {
00129             ResetCounts();
00130
00131             webview.NavigationStarting -= OnNavigationStarting;
00132             webview.NavigationCompleted -= OnNavigationCompleted;
00133             webview.CoreWebView2Initialized -= OnCoreWebView2Initialized;
00134             webview.Loaded -= OnLoaded;
00135             webview.Unloaded -= OnUnloaded;
00136             webview.CoreProcessFailed -= OnCoreProcessFailed;
00137         }
00138
00139         private void TestNameComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00140         {
00141             // TestList test = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
00142             // Nothing needed per test?
00143         }
00144
00145         private void OnCoreWebView2Initialized(WebView2 sender, object args)
00146         {
00147             SetCoreWebView2InitializedCount(_coreWebView2InitializedCount + 1);
00148
00149             string s = string.Format("[{0}]: Got CoreWebView2Initialized, ", sender.Name);
00150             _helpers.AppendMessage(s);
00151             Status2.Text = Status2.Text + " " + s;
00152         }
00153
00154         // Set Source from OnCoreWebView2Initialized handler (for ConcurrentCreationRequestsTest)
00155         private void OnCoreWebView2Initialized_Source(WebView2 sender, object args)
00156         {
00157             sender.CoreWebView2Initialized -= OnCoreWebView2Initialized_Source; // Don't spin creation on next CWV2Initialized!
00158             WebView2Common.NavigateToUri(sender, WebView2Common.GetTestPageUri("SimplePageWithButton.html"));
00159         }
00160
00161         private async void OnCoreWebView2Initialized_Ensure(WebView2 sender, object args)
00162         {
00163             sender.CoreWebView2Initialized -= OnCoreWebView2Initialized_Ensure; // Don't spin creation on next CWV2Initialized!
00164             await sender.EnsureCoreWebView2Async();
00165             {
00166                 SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);
00167
00168                 string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", sender.Name);
00169                 _helpers.AppendMessage(s);
00170                 Status2.Text = Status2.Text + " " + s;
00171             }
00172         }
00173
00174         private void OnNavigationStarting(WebView2 sender, CoreWebView2NavigationStartingEventArgs args)
00175         {
00176             SetNavigationStartingCount(_navigationStartingCount + 1);
00177
00178             string s = string.Format("[{0}]: Got NavigationStarting ({1}), ", sender.Name, args.Uri);
00179             _helpers.AppendMessage(s);
00180             Status1.Text = s;
00181             Status3.Text = args.Uri;
00182         }
00183
00184         private void OnNavigationCompleted(WebView2 sender, CoreWebView2NavigationCompletedEventArgs args)
00185         {
00186             SetNavigationCompletedCount(_navigationCompletedCount + 1);
00187
00188             string s = string.Format("[{0}]: Got NavigationcOompleted, ", sender.Name);
00189             _helpers.AppendMessage(s);
00190             Status2.Text = Status2.Text + " " + s;
00191         }
00192
00193         private void OnLoaded(object sender, RoutedEventArgs e)
00194         {
00195             SetLoadedCount(_loadedCount + 1);
00196
00197             string s = string.Format("[{0}]: Got Loaded, ", (sender as WebView2).Name);
00198             _helpers.AppendMessage(s);
00199             Status2.Text = Status2.Text + " " + s;
00200         }
00201
00202         private void OnUnloaded(object sender, RoutedEventArgs e)
00203         {
00204             SetUnloadedCount(_unloadedCount + 1);
00205
00206             string s = string.Format("[{0}]: Got Unloaded, ", (sender as WebView2).Name);
00207             _helpers.AppendMessage(s);
00208             Status2.Text = Status2.Text + " " + s;
00209         }
00210
00211         private void OnCoreProcessFailed(object sender, CoreWebView2ProcessFailedEventArgs e)
00212         {
00213             var error = e.ProcessFailedKind;
00214             EventDetail.Text = error.ToString();
00215
00216             string s = string.Format("[{0}]: Got CoreProcessFailed ({1}), ", (sender as WebView2).Name, error.ToString());
00217             _helpers.AppendMessage(s);
00218             Status2.Text = Status2.Text + " " + s;
00219
00220             SetCoreProcessFailedCount(_coreProcessFailedCount + 1);
00221         }
00222
00223         public void OnResetCounts_ButtonClicked(object sender, RoutedEventArgs args)
00224         {
00225             ResetCounts();
00226         }
00227
00228         public void OnCreate_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00229         {
00230             if (_wv2_Programmatic_Offline != null)
00231             {
00232                 RemoveWebViewEventHandlers(_wv2_Programmatic_Offline);
00233                 _wv2_Programmatic_Offline.Close();
00234             }
00235
00236             var myWebView = new WebView2 {
00237                 Name = "WV2_Programmatic_Offline"
00238             };
00239             AddWebViewEventHandlers(myWebView);
00240             _wv2_Programmatic_Offline = myWebView;
00241         }
00242
00243         public void OnSetSource_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00244         {
00245             if (_wv2_Programmatic_Offline != null)
00246             {
00247                 try
00248                 {
00249                     Uri newUri = WebView2Common.GetTestPageUri("SimplePage.html");
00250                     _wv2_Programmatic_Offline.Source = newUri;
00251                 }
00252                 catch (Exception e)
00253                 {
00254                     SetClosedExceptionCount(_closedExceptionCount + 1);
00255
00256                     string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Offline.Name, e.ToString());
00257                     _helpers.AppendMessage(s);
00258                     Status2.Text = Status2.Text + " " + s;
00259                 }
00260             }
00261         }
00262
00263         public async void OnEnsureCoreWebView2_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00264         {
00265             if (_wv2_Programmatic_Offline != null)
00266             {
00267                 try
00268                 {
00269                     await _wv2_Programmatic_Offline.EnsureCoreWebView2Async();
00270                     {
00271                         SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);
00272
00273                         string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_Programmatic_Offline.Name);
00274                         _helpers.AppendMessage(s);
00275                         Status2.Text = Status2.Text + " " + s;
00276                     }
00277                 }
00278                 catch (Exception e)
00279                 {
00280                     SetClosedExceptionCount(_closedExceptionCount + 1);
00281
00282                     string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Offline.Name, e.ToString());
00283                     _helpers.AppendMessage(s);
00284                     Status2.Text = Status2.Text + " " + s;
00285                 }
00286
00287             }
00288         }
00289
00290         public void OnAdd_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00291         {
00292             if (_wv2_Programmatic_Offline != null)
00293             {
00294                 WebView2_Container1.Child = _wv2_Programmatic_Offline;
00295             }
00296         }
00297
00298         public void OnRemove_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00299         {
00300             if (_wv2_Programmatic_Offline != null)
00301             {
00302                 WebView2_Container1.Child = null;
00303             }
00304         }
00305
00306         public void OnReleaseReference_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00307         {
00308             if (_wv2_Programmatic_Offline != null)
00309             {
00310                 _wv2_Programmatic_Offline = null;
00311             }
00312         }
00313
00314         public void OnClose_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00315         {
00316             if (_wv2_Programmatic_Offline != null)
00317             {
00318                 _wv2_Programmatic_Offline.Close();
00319             }
00320         }
00321
00322         public void OnSetCustomSource_OfflineElement_ButtonClicked(object sender, RoutedEventArgs args)
00323         {
00324             if (_wv2_Programmatic_Offline != null)
00325             {
00326                 try
00327                 {
00328                     Uri newUri;
00329                     string newUriString = CustomSource_UriTextBox.Text;
00330                     Uri.TryCreate(newUriString, UriKind.RelativeOrAbsolute, out newUri);
00331                     _wv2_Programmatic_Offline.Source = newUri;
00332                 }
00333                 catch (Exception e)
00334                 {
00335                     SetClosedExceptionCount(_closedExceptionCount + 1);
00336
00337                     string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Offline.Name, e.ToString());
00338                     _helpers.AppendMessage(s);
00339                     Status2.Text = Status2.Text + " " + s;
00340                 }
00341             }
00342         }
00343
00344         public void OnCreate_LiveElement_ButtonClicked(object sender, RoutedEventArgs args)
00345         {
00346             if (_wv2_Programmatic_Live != null)
00347             {
00348                 RemoveWebViewEventHandlers(_wv2_Programmatic_Live);
00349                 _wv2_Programmatic_Live.Close();
00350             }
00351
00352             var myWebView = new WebView2 {
00353                 Name = "WV2_Programmatic_Live"
00354             };
00355             AddWebViewEventHandlers(myWebView);
00356             _wv2_Programmatic_Live = myWebView;
00357             WebView2_Container2.Child = _wv2_Programmatic_Live;
00358         }
00359
00360         public void OnSetSource_LiveElement_ButtonClicked(object sender, RoutedEventArgs args)
00361         {
00362             if (_wv2_Programmatic_Live != null)
00363             {
00364                 try
00365                 {
00366                     WebView2Common.NavigateToUri(_wv2_Programmatic_Live, WebView2Common.GetTestPageUri("SimplePage.html"));
00367                 }
00368                 catch (Exception e)
00369                 {
00370                     SetClosedExceptionCount(_closedExceptionCount + 1);
00371
00372                     string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Live.Name, e.ToString());
00373                     _helpers.AppendMessage(s);
00374                     Status2.Text = Status2.Text + " " + s;
00375                 }
00376             }
00377         }
00378
00379         public async void OnEnsureCoreWebView2_LiveElement_ButtonClicked(object sender, RoutedEventArgs args)
00380         {
00381             if (_wv2_Programmatic_Live != null)
00382             {
00383                 try
00384                 {
00385                     await _wv2_Programmatic_Live.EnsureCoreWebView2Async();
00386                     {
00387                         SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);
00388
00389                         string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_Programmatic_Live.Name);
00390                         _helpers.AppendMessage(s);
00391                         Status2.Text = Status2.Text + " " + s;
00392                     }
00393                 }
00394                 catch (Exception e)
00395                 {
00396                     SetClosedExceptionCount(_closedExceptionCount + 1);
00397
00398                     string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Live.Name, e.ToString());
00399                     _helpers.AppendMessage(s);
00400                     Status2.Text = Status2.Text + " " + s;
00401                 }
00402             }
00403         }
00404
00405         public void OnRemove_LiveElement_ButtonClicked(object sender, RoutedEventArgs args)
00406         {
00407             if (_wv2_Programmatic_Live != null)
00408             {
00409                 WebView2_Container2.Child = null;
00410             }
00411         }
00412
00413         public void OnReleaseReference_LiveElement_ButtonClicked(object sender, RoutedEventArgs args)
00414         {
00415             if (_wv2_Programmatic_Live != null)
00416             {
00417                 _wv2_Programmatic_Live = null;
00418             }
00419         }
00420
00421         public void OnClose_LiveElement_ButtonClicked(object sender, RoutedEventArgs args)
00422         {
00423             if (_wv2_Programmatic_Live != null)
00424             {
00425                 _wv2_Programmatic_Live.Close();
00426             }
00427         }
00428
00429         public void OnSetCustomSource_LiveElement_ButtonClicked(object sender, RoutedEventArgs args)
00430         {
00431             if (_wv2_Programmatic_Live != null)
00432             {
00433                 try
00434                 {
00435                     Uri newUri;
00436                     string newUriString = CustomSource_UriTextBox.Text;
00437                     Uri.TryCreate(newUriString, UriKind.RelativeOrAbsolute, out newUri);
00438                     _wv2_Programmatic_Live.Source = newUri;
00439                 }
00440                 catch (Exception e)
00441                 {
00442                     SetClosedExceptionCount(_closedExceptionCount + 1);
00443
00444                     string s = string.Format("{0} Caught exception: {1}", _wv2_Programmatic_Live.Name, e.ToString());
00445                     _helpers.AppendMessage(s);
00446                     Status2.Text = Status2.Text + " " + s;
00447                 }
00448             }
00449         }
00450
00451         public void OnCreate_MarkupElement_Blank_ButtonClicked(object sender, RoutedEventArgs args)
00452         {
00453             if (_wv2_Markup != null)
00454             {
00455                 RemoveWebViewEventHandlers(_wv2_Markup);
00456                 _wv2_Markup.Close();
00457             }
00458
00459             var myWebView = (WebView2) XamlReader.Load(@"
00460                 <WebView2 xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00461                           xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00462                           x:Name='WV2_Markup'/>");
00463
00464             AddWebViewEventHandlers(myWebView);
00465             _wv2_Markup = myWebView;
00466             WebView2_Container3.Child = _wv2_Markup;
00467         }
00468
00469         public void OnCreate_MarkupElement_Source_ButtonClicked(object sender, RoutedEventArgs args)
00470         {
00471             if (_wv2_Markup != null)
00472             {
00473                 _wv2_Markup.Close();
00474                 RemoveWebViewEventHandlers(_wv2_Markup);
00475             }
00476
00477             string uriString = WebView2Common.GetTestPageUri("SimplePage.html").ToString();
00478
00479             var myWebView = (WebView2) XamlReader.Load(@"
00480                 <WebView2 xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00481                           xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00482                           x:Name='_wv2_Markup'
00483                           Source='" +  uriString + @"'/>");
00484
00485             AddWebViewEventHandlers(myWebView);
00486             _wv2_Markup = myWebView;
00487             WebView2_Container3.Child = _wv2_Markup;
00488         }
00489
00490         public void OnSetSource_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args)
00491         {
00492             if (_wv2_Markup != null)
00493             {
00494                 try
00495                 {
00496                     WebView2Common.NavigateToUri(_wv2_Markup, WebView2Common.GetTestPageUri("SimplePage.html"));
00497                 }
00498                 catch (Exception e)
00499                 {
00500                     SetClosedExceptionCount(_closedExceptionCount + 1);
00501
00502                     string s = string.Format("{0} Caught exception: {1}", _wv2_Markup.Name, e.ToString());
00503                     _helpers.AppendMessage(s);
00504                     Status2.Text = Status2.Text + " " + s;
00505                 }
00506             }
00507         }
00508
00509         public async void OnEnsureCoreWebView2_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args)
00510         {
00511             if (_wv2_Markup != null)
00512             {
00513                 try
00514                 {
00515                     await _wv2_Markup.EnsureCoreWebView2Async();
00516                     {
00517                         SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);
00518
00519                         string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_Markup.Name);
00520                         _helpers.AppendMessage(s);
00521                         Status2.Text = Status2.Text + " " + s;
00522                     }
00523                 }
00524                 catch (Exception e)
00525                 {
00526                     SetClosedExceptionCount(_closedExceptionCount + 1);
00527
00528                     string s = string.Format("{0} Caught exception: {1}", _wv2_Markup.Name, e.ToString());
00529                     _helpers.AppendMessage(s);
00530                     Status2.Text = Status2.Text + " " + s;
00531                 }
00532             }
00533         }
00534
00535         public void OnRemove_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args)
00536         {
00537             if (_wv2_Markup != null)
00538             {
00539                 WebView2_Container3.Child = null;
00540             }
00541         }
00542
00543         public void OnClose_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args)
00544         {
00545             if (_wv2_Markup != null)
00546             {
00547                 _wv2_Markup.Close();
00548             }
00549         }
00550
00551         public void OnSetCustomSource_MarkupElement_ButtonClicked(object sender, RoutedEventArgs args)
00552         {
00553             if (_wv2_Markup != null)
00554             {
00555                 try
00556                 {
00557                     Uri newUri;
00558                     string newUriString = CustomSource_UriTextBox.Text;
00559                     Uri.TryCreate(newUriString, UriKind.RelativeOrAbsolute, out newUri);
00560                     _wv2_Markup.Source = newUri;
00561                 }
00562                 catch (Exception e)
00563                 {
00564                     SetClosedExceptionCount(_closedExceptionCount + 1);
00565
00566                     string s = string.Format("{0} Caught exception: {1}", _wv2_Markup.Name, e.ToString());
00567                     _helpers.AppendMessage(s);
00568                     Status2.Text = Status2.Text + " " + s;
00569                 }
00570             }
00571         }
00572
00573
00574         public void OnCreate_ConcurrentCreationElement_ButtonClicked(object sender, RoutedEventArgs args)
00575         {
00576             if (_wv2_ConcurrentCreation != null)
00577             {
00578                 RemoveWebViewEventHandlers(_wv2_ConcurrentCreation);
00579                 _wv2_ConcurrentCreation.Close();
00580             }
00581
00582             var myWebView = new WebView2 {
00583                 Name = "WV2_ConcurrentCreation"
00584             };
00585             AddWebViewEventHandlers(myWebView);
00586             _wv2_ConcurrentCreation = myWebView;
00587             WebView2_Container4.Child = _wv2_ConcurrentCreation;
00588         }
00589
00590         // Kick off Source1 (trigger creation), then Source2 while 1 is in progress
00591         public void OnSource_Source_ButtonClicked(object sender, RoutedEventArgs args)
00592         {
00593             if (_wv2_ConcurrentCreation != null)
00594             {
00595                 // We'll set Source #2 in this special CWV2Initialized Handler
00596                 _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Source;
00597
00598                 // Set Source #1 and attach  special CoreWebView2Initialized handler to apply Source #2 at that time
00599                 WebView2Common.NavigateToUri(_wv2_ConcurrentCreation, WebView2Common.GetTestPageUri("SimplePage.html"));
00600             }
00601         }
00602
00603         public void OnSource_Ensure_ButtonClicked(object sender, RoutedEventArgs args)
00604         {
00605             if (_wv2_ConcurrentCreation != null)
00606             {
00607                 // We'll call EnsureCWV2() in this special CWV2Initialized Handler
00608                 _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Ensure;
00609
00610                 // Set Source #1
00611                 WebView2Common.NavigateToUri(_wv2_ConcurrentCreation, WebView2Common.GetTestPageUri("SimplePage.html"));
00612             }
00613         }
00614
00615         public async void OnEnsure_Source_ButtonClicked(object sender, RoutedEventArgs args)
00616         {
00617             if (_wv2_ConcurrentCreation != null)
00618             {
00619                 // We'll set Source in this special CWV2Initialized Handler
00620                 _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Source;
00621
00622                 // EnsureCWV2()
00623                 await _wv2_ConcurrentCreation.EnsureCoreWebView2Async();
00624                 {
00625                     SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);
00626
00627                     string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_ConcurrentCreation.Name);
00628                     _helpers.AppendMessage(s);
00629                     Status2.Text = Status2.Text + " " + s;
00630                 }
00631             }
00632         }
00633
00634         public async void OnEnsure_Ensure_ButtonClicked(object sender, RoutedEventArgs args)
00635         {
00636             if (_wv2_ConcurrentCreation != null)
00637             {
00638                 // We'll call EnsureCWV2() (#2) in this special CWV2Initialized Handler
00639                 _wv2_ConcurrentCreation.CoreWebView2Initialized += OnCoreWebView2Initialized_Ensure;
00640
00641                 // EnsureCWV2()
00642                 await _wv2_ConcurrentCreation.EnsureCoreWebView2Async();
00643                 {
00644                     SetEnsureCoreWebView2CompletionCount(_ensureCoreWebView2CompletionCount + 1);
00645
00646                     string s = string.Format("[{0}]: Got EnsureCWV2 Completion, ", _wv2_ConcurrentCreation.Name);
00647                     _helpers.AppendMessage(s);
00648                     Status2.Text = Status2.Text + " " + s;
00649                 }
00650             }
00651         }
00652
00653         public void OnRemove_ConcurrentCreationElement_ButtonClicked(object sender, RoutedEventArgs args)
00654         {
00655             if (_wv2_ConcurrentCreation != null)
00656             {
00657                 WebView2_Container4.Child = null;
00658             }
00659         }
00660
00661         public void OnClose_ConcurrentCreationElement_ButtonClicked(object sender, RoutedEventArgs args)
00662         {
00663             if (_wv2_ConcurrentCreation != null)
00664             {
00665                 _wv2_ConcurrentCreation.Close();
00666             }
00667         }
00668         public void OnCreate_CoreProcessFailed_ButtonClicked(object sender, RoutedEventArgs args)
00669         {
00670             if (_wv2_CoreProcessFailed != null)
00671             {
00672                 RemoveWebViewEventHandlers(_wv2_CoreProcessFailed);
00673                 _wv2_CoreProcessFailed.Close();
00674             }
00675
00676             var myWebView = new WebView2 {
00677                 Name = "WV2_CoreProcessFailed"
00678             };
00679             AddWebViewEventHandlers(myWebView);
00680             _wv2_CoreProcessFailed = myWebView;
00681             WebView2_Container5.Child = _wv2_CoreProcessFailed;
00682         }
00683
00684         public void OnBad_Source_Browser_ButtonClicked(object sender, RoutedEventArgs args)
00685         {
00686             // Crashes the browser - recover by re-creating CoreWebView2
00687             OnBadSourceButtonClickedHelper("edge://inducebrowsercrashforrealz/");
00688         }
00689
00690         public void OnBad_Source_Render_ButtonClicked(object sender, RoutedEventArgs args)
00691         {
00692             // Crashes the current rendering process - recover with Reload()
00693             OnBadSourceButtonClickedHelper("edge://crash");
00694         }
00695
00696         private void OnBadSourceButtonClickedHelper(string badUri)
00697         {
00698             if (_wv2_CoreProcessFailed != null)
00699             {
00700                 try
00701                 {
00702                     WebView2Common.NavigateToUri(_wv2_CoreProcessFailed, new Uri(badUri));
00703                 }
00704                 catch (Exception e)
00705                 {
00706                     SetClosedExceptionCount(_closedExceptionCount + 1);
00707
00708                     string s = string.Format("{0} Caught exception: {1}", _wv2_CoreProcessFailed.Name, e.ToString());
00709                     _helpers.AppendMessage(s);
00710                     Status2.Text = Status2.Text + " " + s;
00711                 }
00712             }
00713         }
00714
00715         public void OnGood_Source_ButtonClicked(object sender, RoutedEventArgs args)
00716         {
00717             if (_wv2_CoreProcessFailed != null)
00718             {
00719                 try
00720                 {
00721                     WebView2Common.NavigateToUri(_wv2_CoreProcessFailed, WebView2Common.GetTestPageUri("SimplePage.html"));
00722                 }
00723                 catch (Exception e)
00724                 {
00725                     SetClosedExceptionCount(_closedExceptionCount + 1);
00726
00727                     string s = string.Format("{0} Caught exception: {1}", _wv2_CoreProcessFailed.Name, e.ToString());
00728                     _helpers.AppendMessage(s);
00729                     Status2.Text = Status2.Text + " " + s;
00730                 }
00731             }
00732         }
00733
00734         private void OnReloadButtonClicked(object sender, RoutedEventArgs args)
00735         {
00736             if (_wv2_CoreProcessFailed != null)
00737             {
00738                 try
00739                 {
00740                     _wv2_CoreProcessFailed.Reload();
00741                 }
00742                 catch (Exception e)
00743                 {
00744                     SetClosedExceptionCount(_closedExceptionCount + 1);
00745
00746                     string s = string.Format("{0} Caught exception: {1}", _wv2_CoreProcessFailed.Name, e.ToString());
00747                     _helpers.AppendMessage(s);
00748                     Status2.Text = Status2.Text + " " + s;
00749                 }
00750             }
00751         }
00752
00753
00754         // Ensure destruction and cleanup (including UIA tree of web content) of all webviews
00755         //
00756         // NOTE: We need a small wait a bit before completing this test, otherwise WebView2 tests were failing sporadically in CatGats.
00757         // This is because the UIA tree from the browser HWND does not get disconnected synchronously on WebView2 Element destruction,
00758         // and its presence after leaving the test page prevents the test runner from activating (also via UIA) the next test.
00759         //
00760         // TODO_WebView2: Work with Anaheim to provide a "Disconnect" method on CoreWebView2 that syncrhonously removes web UIA tree.
00761         private async Task CleanupWebViewElements()
00762         {
00763             RemoveAllWebViewControls();
00764             GC.Collect();
00765             await Task.Delay(3000);
00766         }
00767
00768         void RemoveAllWebViewControls()
00769         {
00770             if (_wv2_Programmatic_Offline != null)
00771             {
00772                 RemoveWebViewEventHandlers(_wv2_Programmatic_Offline);
00773                 _wv2_Programmatic_Offline.Close();
00774                 WebView2_Container1.Child = null;
00775             }
00776
00777             if (_wv2_Programmatic_Live != null)
00778             {
00779                 RemoveWebViewEventHandlers(_wv2_Programmatic_Live);
00780                 _wv2_Programmatic_Live.Close();
00781                 WebView2_Container2.Child = null;
00782             }
00783
00784             if (_wv2_Markup != null)
00785             {
00786                 RemoveWebViewEventHandlers(_wv2_Markup);
00787                 _wv2_Markup.Close();
00788                 WebView2_Container3.Child = null;
00789             }
00790
00791             if (_wv2_ConcurrentCreation != null)
00792             {
00793                 RemoveWebViewEventHandlers(_wv2_ConcurrentCreation);
00794                 _wv2_ConcurrentCreation.Close();
00795                 WebView2_Container4.Child = null;
00796             }
00797
00798             _areWebviewElementsCleanedUp = true;
00799         }
00800
00801         async public void CleanupCurrentTest(object sender, RoutedEventArgs args)
00802         {
00803             // Ensure any WebViewElements are destroyed + removed from UIA tree prior to signaling test completion
00804             // to avoid impacting next test.
00805             await CleanupWebViewElements();
00806             CleanupResultTextBox.Text = "Cleanup completed.";
00807         }
00808
00809         protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
00810         {
00811             // For test stability, webviews should be fully cleaned up before we leave the test page.
00812             Debug.Assert(_areWebviewElementsCleanedUp);
00813         }
00814     }
00815 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IBlendEffect Member List

This is the complete list of members for IBlendEffect, including all inherited members.
Background([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IBlendEffect
Background([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IBlendEffect
Foreground([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IBlendEffect
Foreground([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IBlendEffect
Mode([out, retval] BlendEffectMode *value) | IBlendEffect
Mode([in] BlendEffectMode value) | IBlendEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomFactorChange.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ZoomFactorChange.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ScrollPresenterTypeLogging.h"
00008 #include "ZoomFactorChange.h"
00009
00010 ZoomFactorChange::ZoomFactorChange(
00011     float zoomFactor,
00012     winrt::IReference<winrt::float2> centerPoint,
00013     ScrollPresenterViewKind zoomFactorKind,
00014     winrt::IInspectable const& options) :
00015         m_zoomFactor(zoomFactor),
00016         m_centerPoint(centerPoint),
00017         ViewChange(zoomFactorKind, options)
00018 {
00019     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this,
00020         TypeLogging::NullableFloat2ToString(centerPoint).c_str(), zoomFactor);
00021 }
00022
00023 ZoomFactorChange::~ZoomFactorChange()
00024 {
00025     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00026 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectTemplateEventArgs Member List

This is the complete list of members for SelectTemplateEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
DataContext() | SelectTemplateEventArgs |
DataContext(winrt::IInspectable const &value) | SelectTemplateEventArgs |
DeleteInstanceOnUIThread(std::unique_ptr< SelectTemplateEventArgs > &&self) noexcept | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< SelectTemplateEventArgs > &&self) | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
IsOnThread() | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
Owner() | SelectTemplateEventArgs |
Owner(const winrt::UIElement &value) | SelectTemplateEventArgs |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SelectTemplateEventArgs, winrt::implementation::SelectTemplateEventArgsT, winrt::composable, winrt::composing > | [inline]
TemplateKey() | SelectTemplateEventArgs |
TemplateKey(winrt::hstring const &value) | SelectTemplateEventArgs |
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionContainer Member List

This is the complete list of members for SelectionContainer, including all inherited members.
OnCreateAutomationPeer() | SelectionContainer | [inline, protected]
OnSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args) | SelectionContainer | [inline, private]
OnSelectionModelChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) | SelectionContainer | [inline, private, static]
SelectionContainer() | SelectionContainer | [inline]
SelectionModel | SelectionContainer |
SelectionModelProperty | SelectionContainer | [static]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/SliderInteraction.h Source File

  • File List
  • File Members
  • Interactions
  • SliderInteraction

SliderInteraction.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SliderInteraction.g.h"
00007 #include "SliderInteraction.properties.h"
00008
00009 class SliderInteraction :
00010     public ReferenceTracker<SliderInteraction, winrt::implementation::SliderInteractionT>,
00011     public SliderInteractionProperties
00012 {
00013 public:
00014     // ISliderInteraction
00015     winrt::Orientation Orientation();
00016     void Orientation(winrt::Orientation const& value);
00017
00018     double Minimum();
00019     void Minimum(double value);
00020
00021     double Maximum();
00022     void Maximum(double value);
00023
00024     double Position();
00025
00026     double SmallChange();
00027     void SmallChange(double value);
00028
00029     double LargeChange();
00030     void LargeChange(double value);
00031
00032     // INotifyPropertyChanged
00033     winrt::event_token PropertyChanged(winrt::PropertyChangedEventHandler const& value);
00034     void PropertyChanged(winrt::event_token const& token);
00035
00036     winrt::IVectorView<winrt::RoutedEvent> GetSupportedEventsCore();
00037
00038     void OnKeyDown(winrt::UIElement const& sender, winrt::KeyRoutedEventArgs const& args);
00039
00040     void OnPointerMoved(winrt::UIElement const& sender, winrt::PointerRoutedEventArgs const& args);
00041     void OnPointerPressed(winrt::UIElement const& sender, winrt::PointerRoutedEventArgs const& args);
00042     void OnPointerReleased(winrt::UIElement const& sender, winrt::PointerRoutedEventArgs const& args);
00043     void OnPointerCanceled(winrt::UIElement const& sender, winrt::PointerRoutedEventArgs const& args);
00044     void OnPointerCaptureLost(winrt::UIElement const& sender, winrt::PointerRoutedEventArgs const& args);
00045
00046 private:
00047     void ConfigureTargetElement(const winrt::UIElement& target);
00048     void UpdatePosition(double delta);
00049     void UpdateTransform();
00050
00051     winrt::Orientation m_orientation{ winrt::Orientation::Horizontal };
00052
00053     double m_minimum{ 0.0 };
00054     double m_maximum{ 100.0 };
00055     double m_position{ 0.0 };
00056
00057     double m_smallChange{ 1.0 };
00058     double m_largeChange{ 10.0 };
00059
00060     bool m_hasPointerCapture{ false };
00061     winrt::Point m_capturePosition{};
00062
00063     tracker_ref<winrt::TranslateTransform> m_translateTransform{ this };
00064
00065     event_source<winrt::PropertyChangedEventHandler> m_propertyChangedEventSource{ this };
00066 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/VirtualLayoutContextAdapter.cpp Source File

  • File List
  • File Members
  • Repeater

VirtualLayoutContextAdapter.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "VirtualizingLayoutContext.h"
00008 #include "VirtualLayoutContextAdapter.h"
00009
00010 VirtualLayoutContextAdapter::VirtualLayoutContextAdapter(winrt::VirtualizingLayoutContext const& virtualizingContext)
00011 {
00012     m_virtualizingContext = winrt::make_weak(virtualizingContext);
00013 }
00014
00015 #pragma region ILayoutContextOverrides
00016
00017 winrt::IInspectable VirtualLayoutContextAdapter::LayoutStateCore()
00018 {
00019     if (auto context = m_virtualizingContext.get())
00020     {
00021         return context.LayoutState();
00022     }
00023     return nullptr;
00024 }
00025
00026 void VirtualLayoutContextAdapter::LayoutStateCore(winrt::IInspectable const& state)
00027 {
00028     if (auto context = m_virtualizingContext.get())
00029     {
00030         context.LayoutStateCore(state);
00031     }
00032 }
00033
00034 #pragma endregion
00035
00036 #pragma region INonVirtualizingLayoutContextOverrides
00037
00038 winrt::IVectorView<winrt::UIElement> VirtualLayoutContextAdapter::ChildrenCore()
00039 {
00040     if (!m_children)
00041     {
00042         m_children = winrt::make<ChildrenCollection<winrt::UIElement>>(m_virtualizingContext.get());
00043     }
00044
00045     return m_children;
00046 }
00047
00048 #pragma endregion
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/TestUI/nullsource.cs Source File

  • File List
  • File Members
  • AnimatedVisualPlayer
  • TestUI

nullsource.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005 using Microsoft.UI.Composition;
00006
00007 namespace AnimatedVisuals
00008 {
00009     // An IAnimatedVisualSource that always fails to create an animated visual.
00010     // Used for testing of the fallback path in AnimatedVisualPlayer.
00011     sealed class Nullsource : IAnimatedVisualSource
00012     {
00013         public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics)
00014         {
00015             diagnostics = null;
00016             // Return null to indicate failure.
00017             return null;
00018         }
00019     }
00020 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/VectorChangedEventArgs.h Source File

  • File List
  • File Members
  • Collections

VectorChangedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 class VectorChangedEventArgs : public winrt::implements<VectorChangedEventArgs, winrt::IVectorChangedEventArgs>
00006 {
00007 public:
00008     VectorChangedEventArgs(winrt::CollectionChange action, unsigned int index)
00009     {
00010         m_action = action;
00011         m_index = index;
00012     }
00013
00014     winrt::CollectionChange CollectionChange() { return m_action; }
00015     uint32_t Index() { return m_index; }
00016
00017 private:
00018     winrt::CollectionChange m_action;
00019     unsigned int m_index;
00020 };
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerTrace.h Source File

  • File List
  • File Members
  • ItemContainer

ItemContainerTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsItemContainerTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMCONTAINER || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsItemContainerVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMCONTAINER || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsItemContainerPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_ITEMCONTAINER || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define ITEMCONTAINER_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 ItemContainerTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define ITEMCONTAINER_TRACE_INFO(sender, message, ...) \
00036 if (IsItemContainerTracingEnabled()) \
00037 { \
00038     ITEMCONTAINER_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (ItemContainerTrace::s_IsDebugOutputEnabled || ItemContainerTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     ITEMCONTAINER_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define ITEMCONTAINER_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 ItemContainerTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define ITEMCONTAINER_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsItemContainerVerboseTracingEnabled()) \
00050 { \
00051     ITEMCONTAINER_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (ItemContainerTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     ITEMCONTAINER_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define ITEMCONTAINER_TRACE_PERF(info) \
00059 if (IsItemContainerPerfTracingEnabled()) \
00060 { \
00061     ItemContainerTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define ITEMCONTAINER_TRACE_INFO_DBG(sender, message, ...)    ITEMCONTAINER_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define ITEMCONTAINER_TRACE_VERBOSE_DBG(sender, message, ...) ITEMCONTAINER_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define ITEMCONTAINER_TRACE_PERF_DBG(info)                    ITEMCONTAINER_TRACE_PERF(info)
00068 #else
00069 #define ITEMCONTAINER_TRACE_INFO_DBG(sender, message, ...)
00070 #define ITEMCONTAINER_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define ITEMCONTAINER_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class ItemContainerTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[256]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "ItemContainerInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_ITEMCONTAINER),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"ItemContainer") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[256]{};
00121         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00122         {
00123             if (includeTraceLogging)
00124             {
00125                 // TraceViewers
00126                 // http://toolbox/pef
00127                 // http://fastetw/index.aspx
00128                 TraceLoggingWrite(
00129                     g_hLoggingProvider,
00130                     "ItemContainerVerbose" /* eventName */,
00131                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00132                     TraceLoggingKeyword(KEYWORD_ITEMCONTAINER),
00133                     TraceLoggingWideString(buffer, "Message"));
00134             }
00135
00136             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00137             {
00138                 OutputDebugStringW(buffer);
00139             }
00140
00141             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00142
00143             if (globalTestHooks &&
00144                 (globalTestHooks->GetLoggingLevelForType(L"ItemContainer") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00145             {
00146                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00147             }
00148         }
00149         va_end(args);
00150     }
00151
00152     static void TracePerfInfo(PCWSTR info) noexcept
00153     {
00154         // TraceViewers
00155         // http://toolbox/pef
00156         // http://fastetw/index.aspx
00157         TraceLoggingWrite(
00158             g_hPerfProvider,
00159             "ItemContainerPerf" /* eventName */,
00160             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00161             TraceLoggingKeyword(KEYWORD_ITEMCONTAINER),
00162             TraceLoggingWideString(info, "Info"));
00163     }
00164 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorFlagHelper< flag > Member List

This is the complete list of members for VectorFlagHelper< flag >, including all inherited members.
isBindable | VectorFlagHelper< flag > | [static]
isDependencyObjectBase | VectorFlagHelper< flag > | [static]
isNoTrackerRef | VectorFlagHelper< flag > | [static]
isObservable | VectorFlagHelper< flag > | [static]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarCustomPenButton.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarCustomPenButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarCustomPenButton.g.h"
00011 #include "InkToolBarCustomPenButton.properties.h"
00012
00013 #include "InkToolBarPenButton.h"
00014
00015 class InkToolBarCustomPenButton :
00016     public winrt::implementation::InkToolBarCustomPenButtonT<InkToolBarCustomPenButton, InkToolBarPenButton>,
00017     public InkToolBarCustomPenButtonProperties
00018 {
00019 public:
00020     ForwardRefToBaseReferenceTracker(InkToolBarPenButton)
00021
00022     // These functions are ambiguous with InkToolBarPenButton, disambiguate
00023     using InkToolBarCustomPenButtonProperties::EnsureProperties;
00024     using InkToolBarCustomPenButtonProperties::ClearProperties;
00025
00026     winrt::InkToolBarCustomPen CustomPen() { winrt::throw_hresult(E_NOTIMPL); }
00027     void CustomPen(winrt::InkToolBarCustomPen value) { winrt::throw_hresult(E_NOTIMPL); }
00028     winrt::UIElement ConfigurationContent() { winrt::throw_hresult(E_NOTIMPL); }
00029     void ConfigurationContent(winrt::UIElement value) { winrt::throw_hresult(E_NOTIMPL); }
00030 };
00031
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBrush Member List

This is the complete list of members for RevealBrush, including all inherited members.
AlwaysUseFallback(bool value) | RevealBrushProperties |
AlwaysUseFallback() | RevealBrushProperties |
AlwaysUseFallbackProperty() | RevealBrushProperties | [inline, static]
AttachLights() | RevealBrush | [static]
AttachLightsImpl() | RevealBrush | [private, static]
AttachLightsToAncestor(const winrt::UIElement &root, bool trackRootToDisconnectFrom) | RevealBrush | [static]
AttachLightsToElement(const winrt::UIElement &element, bool trackAsRootToDisconnectFrom) | RevealBrush | [private, static]
ClearProperties() | RevealBrush | [static]
Color(winrt::Color const &value) | RevealBrushProperties |
Color() | RevealBrushProperties |
ColorProperty() | RevealBrushProperties | [inline, static]
CreateRevealBorderEffect(bool isInverted, bool hasBaseColor) | RevealBrush | [protected, static]
CreateRevealBrush() | RevealBrush | [protected]
CreateRevealHoverEffect() | RevealBrush | [protected, static]
EnsureNoiseBrush() | RevealBrush | [private]
EnsureProperties() | RevealBrush | [static]
GetAncestor(const winrt::UIElement &root) | RevealBrush | [private, static]
GetOrCreateRevealBrushCompositionEffectFactory(bool isBorder, bool isInverted, bool hasBaseColor, const winrt::Compositor &compositor) | RevealBrush | [private]
GetState(winrt::UIElement const &target) | RevealBrushProperties | [static]
IsInFallbackMode() | RevealBrush | [protected]
IsOnXboxAndNotMouseMode() | RevealBrush | [private, static]
MaterialHelper | RevealBrush | [private]
OnAlwaysUseFallbackPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RevealBrushProperties | [static]
OnColorChanged() | RevealBrush | [protected]
OnColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RevealBrushProperties | [static]
OnConnected() | RevealBrush |
OnDisconnected() | RevealBrush |
OnFallbackColorChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | RevealBrush | [protected]
OnIsContainerPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args) | RevealBrush | [private, static]
OnMaterialPolicyStatusChanged(const com_ptr< MaterialHelperBase > &sender, bool isDisabledByMaterialPolicy) | RevealBrush |
OnNoiseChanged(const com_ptr< MaterialHelperBase > &sender) | RevealBrush |
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RevealBrush |
OnStatePropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args) | RevealBrush | [static]
OnTargetThemeChanged() | RevealBrush | [protected]
OnTargetThemePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RevealBrushProperties | [static]
PolicyStatusChangedHelper(bool isDisabledByMaterialPolicy) | RevealBrush | [private]
RemoveTargetBrush(const wstring_view &lightID) | RevealBrush | [private]
RevealBrush() | RevealBrush |
RevealBrushProperties() | RevealBrushProperties |
RevealBrushTestApi | RevealBrush | [private]
s_AlwaysUseFallbackProperty | RevealBrushProperties | [static]
s_ColorProperty | RevealBrushProperties | [static]
s_IsContainerProperty | RevealBrush | [static]
s_StateProperty | RevealBrushProperties | [static]
s_TargetThemeProperty | RevealBrushProperties | [static]
sc_ambientContributionColor | RevealBrush | [protected, static]
sc_colorToAlphaMatrix | RevealBrush | [protected, static]
sc_defaultColor | RevealBrush | [static]
sc_diffuseAmount | RevealBrush | [protected, static]
sc_diffuseAmountBorder | RevealBrush | [protected, static]
sc_luminanceToAlphaMatrix | RevealBrush | [protected, static]
sc_specularAmount | RevealBrush | [protected, static]
sc_specularAmountBorder | RevealBrush | [protected, static]
sc_specularShine | RevealBrush | [protected, static]
sc_specularShineBorder | RevealBrush | [protected, static]
SetState(winrt::UIElement const &target, winrt::RevealBrushState const &value) | RevealBrushProperties | [static]
StateProperty() | RevealBrushProperties | [inline, static]
StopAttachingLights() | RevealBrush | [static]
TargetTheme(winrt::ApplicationTheme const &value) | RevealBrushProperties |
TargetTheme() | RevealBrushProperties |
TargetThemeProperty() | RevealBrushProperties | [inline, static]
UpdateLightTargets(bool ambientToo) | RevealBrush | [protected]
UpdateRevealBrush() | RevealBrush | [protected]
ValidatePublicRootAncestor() | RevealBrush | [private, static]
~RevealBrush() | RevealBrush | [virtual]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedVisualPlayer.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedVisualPlayer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedVisualPlayer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(AnimatedVisualPlayer)
00012 }
00013
00014 #include "AnimatedVisualPlayer.g.cpp"
00015
00016 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_AnimationOptimizationProperty{ nullptr };
00017 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_AutoPlayProperty{ nullptr };
00018 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_DiagnosticsProperty{ nullptr };
00019 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_DurationProperty{ nullptr };
00020 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_FallbackContentProperty{ nullptr };
00021 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_IsAnimatedVisualLoadedProperty{ nullptr };
00022 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_IsPlayingProperty{ nullptr };
00023 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_PlaybackRateProperty{ nullptr };
00024 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_SourceProperty{ nullptr };
00025 GlobalDependencyProperty AnimatedVisualPlayerProperties::s_StretchProperty{ nullptr };
00026
00027 AnimatedVisualPlayerProperties::AnimatedVisualPlayerProperties()
00028 {
00029     EnsureProperties();
00030 }
00031
00032 void AnimatedVisualPlayerProperties::EnsureProperties()
00033 {
00034     if (!s_AnimationOptimizationProperty)
00035     {
00036         s_AnimationOptimizationProperty =
00037             InitializeDependencyProperty(
00038                 L"AnimationOptimization",
00039                 winrt::name_of<winrt::PlayerAnimationOptimization>(),
00040                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00041                 false /* isAttached */,
00042                 ValueHelper<winrt::PlayerAnimationOptimization>::BoxValueIfNecessary(winrt::PlayerAnimationOptimization::Latency),
00043                 winrt::PropertyChangedCallback(&OnAnimationOptimizationPropertyChanged));
00044     }
00045     if (!s_AutoPlayProperty)
00046     {
00047         s_AutoPlayProperty =
00048             InitializeDependencyProperty(
00049                 L"AutoPlay",
00050                 winrt::name_of<bool>(),
00051                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00052                 false /* isAttached */,
00053                 ValueHelper<bool>::BoxValueIfNecessary(true),
00054                 winrt::PropertyChangedCallback(&OnAutoPlayPropertyChanged));
00055     }
00056     if (!s_DiagnosticsProperty)
00057     {
00058         s_DiagnosticsProperty =
00059             InitializeDependencyProperty(
00060                 L"Diagnostics",
00061                 winrt::name_of<winrt::IInspectable>(),
00062                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00063                 false /* isAttached */,
00064                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00065                 nullptr);
00066     }
00067     if (!s_DurationProperty)
00068     {
00069         s_DurationProperty =
00070             InitializeDependencyProperty(
00071                 L"Duration",
00072                 winrt::name_of<winrt::TimeSpan>(),
00073                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00074                 false /* isAttached */,
00075                 ValueHelper<winrt::TimeSpan>::BoxedDefaultValue(),
00076                 nullptr);
00077     }
00078     if (!s_FallbackContentProperty)
00079     {
00080         s_FallbackContentProperty =
00081             InitializeDependencyProperty(
00082                 L"FallbackContent",
00083                 winrt::name_of<winrt::DataTemplate>(),
00084                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00085                 false /* isAttached */,
00086                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00087                 winrt::PropertyChangedCallback(&OnFallbackContentPropertyChanged));
00088     }
00089     if (!s_IsAnimatedVisualLoadedProperty)
00090     {
00091         s_IsAnimatedVisualLoadedProperty =
00092             InitializeDependencyProperty(
00093                 L"IsAnimatedVisualLoaded",
00094                 winrt::name_of<bool>(),
00095                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00096                 false /* isAttached */,
00097                 ValueHelper<bool>::BoxedDefaultValue(),
00098                 nullptr);
00099     }
00100     if (!s_IsPlayingProperty)
00101     {
00102         s_IsPlayingProperty =
00103             InitializeDependencyProperty(
00104                 L"IsPlaying",
00105                 winrt::name_of<bool>(),
00106                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00107                 false /* isAttached */,
00108                 ValueHelper<bool>::BoxedDefaultValue(),
00109                 nullptr);
00110     }
00111     if (!s_PlaybackRateProperty)
00112     {
00113         s_PlaybackRateProperty =
00114             InitializeDependencyProperty(
00115                 L"PlaybackRate",
00116                 winrt::name_of<double>(),
00117                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00118                 false /* isAttached */,
00119                 ValueHelper<double>::BoxValueIfNecessary(1),
00120                 winrt::PropertyChangedCallback(&OnPlaybackRatePropertyChanged));
00121     }
00122     if (!s_SourceProperty)
00123     {
00124         s_SourceProperty =
00125             InitializeDependencyProperty(
00126                 L"Source",
00127                 winrt::name_of<winrt::IAnimatedVisualSource>(),
00128                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00129                 false /* isAttached */,
00130                 ValueHelper<winrt::IAnimatedVisualSource>::BoxedDefaultValue(),
00131                 winrt::PropertyChangedCallback(&OnSourcePropertyChanged));
00132     }
00133     if (!s_StretchProperty)
00134     {
00135         s_StretchProperty =
00136             InitializeDependencyProperty(
00137                 L"Stretch",
00138                 winrt::name_of<winrt::Stretch>(),
00139                 winrt::name_of<winrt::AnimatedVisualPlayer>(),
00140                 false /* isAttached */,
00141                 ValueHelper<winrt::Stretch>::BoxValueIfNecessary(winrt::Stretch::Uniform),
00142                 winrt::PropertyChangedCallback(&OnStretchPropertyChanged));
00143     }
00144 }
00145
00146 void AnimatedVisualPlayerProperties::ClearProperties()
00147 {
00148     s_AnimationOptimizationProperty = nullptr;
00149     s_AutoPlayProperty = nullptr;
00150     s_DiagnosticsProperty = nullptr;
00151     s_DurationProperty = nullptr;
00152     s_FallbackContentProperty = nullptr;
00153     s_IsAnimatedVisualLoadedProperty = nullptr;
00154     s_IsPlayingProperty = nullptr;
00155     s_PlaybackRateProperty = nullptr;
00156     s_SourceProperty = nullptr;
00157     s_StretchProperty = nullptr;
00158 }
00159
00160 void AnimatedVisualPlayerProperties::OnAnimationOptimizationPropertyChanged(
00161     winrt::DependencyObject const& sender,
00162     winrt::DependencyPropertyChangedEventArgs const& args)
00163 {
00164     auto owner = sender.as<winrt::AnimatedVisualPlayer>();
00165     winrt::get_self<AnimatedVisualPlayer>(owner)->OnAnimationOptimizationPropertyChanged(args);
00166 }
00167
00168 void AnimatedVisualPlayerProperties::OnAutoPlayPropertyChanged(
00169     winrt::DependencyObject const& sender,
00170     winrt::DependencyPropertyChangedEventArgs const& args)
00171 {
00172     auto owner = sender.as<winrt::AnimatedVisualPlayer>();
00173     winrt::get_self<AnimatedVisualPlayer>(owner)->OnAutoPlayPropertyChanged(args);
00174 }
00175
00176 void AnimatedVisualPlayerProperties::OnFallbackContentPropertyChanged(
00177     winrt::DependencyObject const& sender,
00178     winrt::DependencyPropertyChangedEventArgs const& args)
00179 {
00180     auto owner = sender.as<winrt::AnimatedVisualPlayer>();
00181     winrt::get_self<AnimatedVisualPlayer>(owner)->OnFallbackContentPropertyChanged(args);
00182 }
00183
00184 void AnimatedVisualPlayerProperties::OnPlaybackRatePropertyChanged(
00185     winrt::DependencyObject const& sender,
00186     winrt::DependencyPropertyChangedEventArgs const& args)
00187 {
00188     auto owner = sender.as<winrt::AnimatedVisualPlayer>();
00189     winrt::get_self<AnimatedVisualPlayer>(owner)->OnPlaybackRatePropertyChanged(args);
00190 }
00191
00192 void AnimatedVisualPlayerProperties::OnSourcePropertyChanged(
00193     winrt::DependencyObject const& sender,
00194     winrt::DependencyPropertyChangedEventArgs const& args)
00195 {
00196     auto owner = sender.as<winrt::AnimatedVisualPlayer>();
00197     winrt::get_self<AnimatedVisualPlayer>(owner)->OnSourcePropertyChanged(args);
00198 }
00199
00200 void AnimatedVisualPlayerProperties::OnStretchPropertyChanged(
00201     winrt::DependencyObject const& sender,
00202     winrt::DependencyPropertyChangedEventArgs const& args)
00203 {
00204     auto owner = sender.as<winrt::AnimatedVisualPlayer>();
00205     winrt::get_self<AnimatedVisualPlayer>(owner)->OnStretchPropertyChanged(args);
00206 }
00207
00208 void AnimatedVisualPlayerProperties::AnimationOptimization(winrt::PlayerAnimationOptimization const& value)
00209 {
00210     [[gsl::suppress(con)]]
00211     {
00212     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_AnimationOptimizationProperty, ValueHelper<winrt::PlayerAnimationOptimization>::BoxValueIfNecessary(value));
00213     }
00214 }
00215
00216 winrt::PlayerAnimationOptimization AnimatedVisualPlayerProperties::AnimationOptimization()
00217 {
00218     return ValueHelper<winrt::PlayerAnimationOptimization>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_AnimationOptimizationProperty));
00219 }
00220
00221 void AnimatedVisualPlayerProperties::AutoPlay(bool value)
00222 {
00223     [[gsl::suppress(con)]]
00224     {
00225     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_AutoPlayProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00226     }
00227 }
00228
00229 bool AnimatedVisualPlayerProperties::AutoPlay()
00230 {
00231     return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_AutoPlayProperty));
00232 }
00233
00234 void AnimatedVisualPlayerProperties::Diagnostics(winrt::IInspectable const& value)
00235 {
00236     [[gsl::suppress(con)]]
00237     {
00238     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_DiagnosticsProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00239     }
00240 }
00241
00242 winrt::IInspectable AnimatedVisualPlayerProperties::Diagnostics()
00243 {
00244     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_DiagnosticsProperty));
00245 }
00246
00247 void AnimatedVisualPlayerProperties::Duration(winrt::TimeSpan const& value)
00248 {
00249     [[gsl::suppress(con)]]
00250     {
00251     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_DurationProperty, ValueHelper<winrt::TimeSpan>::BoxValueIfNecessary(value));
00252     }
00253 }
00254
00255 winrt::TimeSpan AnimatedVisualPlayerProperties::Duration()
00256 {
00257     return ValueHelper<winrt::TimeSpan>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_DurationProperty));
00258 }
00259
00260 void AnimatedVisualPlayerProperties::FallbackContent(winrt::DataTemplate const& value)
00261 {
00262     [[gsl::suppress(con)]]
00263     {
00264     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_FallbackContentProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00265     }
00266 }
00267
00268 winrt::DataTemplate AnimatedVisualPlayerProperties::FallbackContent()
00269 {
00270     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_FallbackContentProperty));
00271 }
00272
00273 void AnimatedVisualPlayerProperties::IsAnimatedVisualLoaded(bool value)
00274 {
00275     [[gsl::suppress(con)]]
00276     {
00277     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_IsAnimatedVisualLoadedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00278     }
00279 }
00280
00281 bool AnimatedVisualPlayerProperties::IsAnimatedVisualLoaded()
00282 {
00283     return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_IsAnimatedVisualLoadedProperty));
00284 }
00285
00286 void AnimatedVisualPlayerProperties::IsPlaying(bool value)
00287 {
00288     [[gsl::suppress(con)]]
00289     {
00290     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_IsPlayingProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00291     }
00292 }
00293
00294 bool AnimatedVisualPlayerProperties::IsPlaying()
00295 {
00296     return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_IsPlayingProperty));
00297 }
00298
00299 void AnimatedVisualPlayerProperties::PlaybackRate(double value)
00300 {
00301     [[gsl::suppress(con)]]
00302     {
00303     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_PlaybackRateProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00304     }
00305 }
00306
00307 double AnimatedVisualPlayerProperties::PlaybackRate()
00308 {
00309     return ValueHelper<double>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_PlaybackRateProperty));
00310 }
00311
00312 void AnimatedVisualPlayerProperties::Source(winrt::IAnimatedVisualSource const& value)
00313 {
00314     [[gsl::suppress(con)]]
00315     {
00316     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::IAnimatedVisualSource>::BoxValueIfNecessary(value));
00317     }
00318 }
00319
00320 winrt::IAnimatedVisualSource AnimatedVisualPlayerProperties::Source()
00321 {
00322     return ValueHelper<winrt::IAnimatedVisualSource>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_SourceProperty));
00323 }
00324
00325 void AnimatedVisualPlayerProperties::Stretch(winrt::Stretch const& value)
00326 {
00327     [[gsl::suppress(con)]]
00328     {
00329     static_cast<AnimatedVisualPlayer*>(this)->SetValue(s_StretchProperty, ValueHelper<winrt::Stretch>::BoxValueIfNecessary(value));
00330     }
00331 }
00332
00333 winrt::Stretch AnimatedVisualPlayerProperties::Stretch()
00334 {
00335     return ValueHelper<winrt::Stretch>::CastOrUnbox(static_cast<AnimatedVisualPlayer*>(this)->GetValue(s_StretchProperty));
00336 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingStackLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • Virtual

VirtualizingStackLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utils;
00005 using System;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Specialized;
00008 using System.Linq;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using MUXControlsTestApp.Samples.Model;
00012 using MUXControlsTestApp.Utilities;
00013
00014 namespace MUXControlsTestApp.Samples
00015 {
00016     public sealed partial class VirtualizingStackLayoutSamplePage : Page
00017     {
00018         private string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00019
00020         public VirtualizingStackLayoutSamplePage()
00021         {
00022             this.InitializeComponent();
00023             repeater.ItemTemplate = elementFactory;
00024
00025             var rnd = new Random();
00026             var data = new TestObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
00027                            new Recipe
00028                            {
00029                                ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00030                                Description = k + " - " + _lorem.Substring(0, rnd.Next(50, 350))
00031                            }));
00032
00033             repeater.ItemsSource = data;
00034             bringIntoView.Click += BringIntoView_Click;
00035         }
00036
00037         private void BringIntoView_Click(object sender, RoutedEventArgs e)
00038         {
00039             int index = 0;
00040             if (int.TryParse(tb.Text, out index))
00041             {
00042                 var anchor = repeater.GetOrCreateElement(index);
00043                 anchor.StartBringIntoView();
00044             }
00045         }
00046     }
00047 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/APITests/ButtonInteractionTests.cs Source File

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
  • APITests

ButtonInteractionTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using MUXControlsTestApp.Utilities;
00007
00008 using Microsoft.UI.Private.Controls;
00009
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Media;
00012 using Windows.UI.Text;
00013 using Windows.Foundation.Metadata;
00014 using Common;
00015
00016 using WEX.TestExecution;
00017 using WEX.TestExecution.Markup;
00018 using WEX.Logging.Interop;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00021 {
00022     //[TestClass] This feature requires the Xaml2018 feature, which is currently disabled by Velocity
00023     public class ButtonInteractionTests
00024     {
00025         [TestMethod]
00026         public void ValidateDefaultValues()
00027         {
00028             if (!ApiInformation.IsPropertyPresent("Microsoft.UI.Xaml.UIElement", "Interactions"))
00029             {
00030                 Log.Warning("UIElement.Interactions not supported on this build.");
00031                 return;
00032             }
00033
00034             RunOnUIThread.Execute(() =>
00035             {
00036                 var interaction = new ButtonInteraction();
00037
00038                 Verify.AreEqual(ButtonInteractionInvokeMode.Release, interaction.InvokeMode);
00039                 Verify.AreEqual(false, interaction.IsHovering);
00040                 Verify.AreEqual(false, interaction.IsPressing);
00041             });
00042         }
00043
00044         [TestMethod]
00045         public void DoesAdvertiseSupportedEvents()
00046         {
00047             if (!ApiInformation.IsPropertyPresent("Microsoft.UI.Xaml.UIElement", "Interactions"))
00048             {
00049                 Log.Warning("UIElement.Interactions not supported on this build.");
00050                 return;
00051             }
00052
00053             RunOnUIThread.Execute(() =>
00054             {
00055                 var interaction = new ButtonInteraction();
00056                 var supportedEvents = interaction.GetSupportedEvents();
00057
00058                 Verify.IsGreaterThan(supportedEvents.Count, 0);
00059             });
00060         }
00061     }
00062 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: IconSource/IconSource.idl Source File

  • File List
  • File Members
  • IconSource

IconSource.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass ImageIconSource : Microsoft.UI.Xaml.Controls.IconSource
00007 {
00008     ImageIconSource();
00009
00010     Microsoft.UI.Xaml.Media.ImageSource ImageSource{ get; set; };
00011
00012     static Microsoft.UI.Xaml.DependencyProperty ImageSourceProperty{ get; };
00013 }
00014
00015 [MUX_PUBLIC]
00016 [webhosthidden]
00017 unsealed runtimeclass AnimatedIconSource : Microsoft.UI.Xaml.Controls.IconSource
00018 {
00019     AnimatedIconSource();
00020
00021     IAnimatedVisualSource2 Source{ get; set; };
00022     IconSource FallbackIconSource{ get; set; };
00023     Boolean MirroredWhenRightToLeft{ get; set; };
00024
00025     static Microsoft.UI.Xaml.DependencyProperty SourceProperty { get; };
00026     static Microsoft.UI.Xaml.DependencyProperty FallbackIconSourceProperty { get; };
00027     static Microsoft.UI.Xaml.DependencyProperty MirroredWhenRightToLeftProperty{ get; };
00028 }
00029
00030 }
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedVisualPlayerAutomationPeer Member List

This is the complete list of members for AnimatedVisualPlayerAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
AnimatedVisualPlayerAutomationPeer(winrt::AnimatedVisualPlayer const &owner) | AnimatedVisualPlayerAutomationPeer |
CheckThread() | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< AnimatedVisualPlayerAutomationPeer > &&self) noexcept | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
final_release(std::unique_ptr< AnimatedVisualPlayerAutomationPeer > &&self) | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | AnimatedVisualPlayerAutomationPeer |
GetBase() | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
GetClassNameCore() | AnimatedVisualPlayerAutomationPeer |
GetInner() | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
IsOnThread() | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarCustomToolButton Member List

This is the complete list of members for InkToolBarCustomToolButton, including all inherited members.
ClearProperties() | InkToolBarCustomToolButtonProperties | [static]
ConfigurationContent() | InkToolBarCustomToolButton | [inline]
ConfigurationContent(winrt::UIElement value) | InkToolBarCustomToolButton | [inline]
InkToolBarCustomToolButtonProperties::ConfigurationContent(winrt::UIElement const &value) | InkToolBarCustomToolButtonProperties |
ConfigurationContentProperty() | InkToolBarCustomToolButtonProperties | [inline, static]
EnsureProperties() | InkToolBarCustomToolButtonProperties | [static]
InkToolBarCustomToolButtonProperties() | InkToolBarCustomToolButtonProperties |
s_ConfigurationContentProperty | InkToolBarCustomToolButtonProperties | [static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlowLayoutAlgorithm Member List

This is the complete list of members for FlowLayoutAlgorithm, including all inherited members.
Arrange(const winrt::Size &finalSize, const winrt::VirtualizingLayoutContext &context, bool isWrapping, FlowLayoutAlgorithm::LineAlignment lineAlignment, const wstring_view &layoutId) | FlowLayoutAlgorithm |
ArrangeVirtualizingLayout(const winrt::Size &finalSize, FlowLayoutAlgorithm::LineAlignment lineAlignment, bool isWrapping, const wstring_view &layoutId) | FlowLayoutAlgorithm | [private]
Backward enum value | FlowLayoutAlgorithm | [private]
Center enum value | FlowLayoutAlgorithm |
End enum value | FlowLayoutAlgorithm |
EstimateExtent(const winrt::Size &availableSize, const wstring_view &layoutId) | FlowLayoutAlgorithm | [private]
FlowLayoutAlgorithm(const ITrackerHandleManager *owner) | FlowLayoutAlgorithm | [inline]
Forward enum value | FlowLayoutAlgorithm | [private]
Generate(GenerateDirection direction, int anchorIndex, const winrt::Size &availableSize, bool isWrapping, double minItemSpacing, double lineSpacing, unsigned int maxItemsPerLine, const bool isVirtualizationEnabled, const wstring_view &layoutId) | FlowLayoutAlgorithm | [private]
GenerateDirection enum name | FlowLayoutAlgorithm | [private]
GetAnchorIndex(const winrt::Size &availableSize, bool isWrapping, double minItemSpacing, const bool isVirtualizationEnabled, const wstring_view &layoutId) | FlowLayoutAlgorithm | [private]
GetElementIfRealized(int dataindex) | FlowLayoutAlgorithm |
GetScrollOrientation() const | OrientationBasedMeasures | [inline, private]
InitializeForContext(const winrt::VirtualizingLayoutContext &context, IFlowLayoutAlgorithmDelegates *callbacks) | FlowLayoutAlgorithm |
IsReflowRequired() const | FlowLayoutAlgorithm | [private]
IsVirtualizingContext() | FlowLayoutAlgorithm | [private]
LastExtent() const | FlowLayoutAlgorithm | [inline]
LineAlignment enum name | FlowLayoutAlgorithm |
m_context | FlowLayoutAlgorithm | [private]
m_elementManager | FlowLayoutAlgorithm | [private]
m_owner | FlowLayoutAlgorithm | [private]
Major(const winrt::Size &size) | OrientationBasedMeasures | [private]
MajorEnd(const winrt::Rect &rect) const | OrientationBasedMeasures | [private]
MajorSize(const winrt::Rect &rect) | OrientationBasedMeasures | [private]
MajorStart(const winrt::Rect &rect) | OrientationBasedMeasures | [private]
MakeAnchor(const winrt::VirtualizingLayoutContext &context, int index, const winrt::Size &availableSize) | FlowLayoutAlgorithm | [private]
Measure(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, bool isWrapping, double minItemSpacing, double lineSpacing, unsigned int maxItemsPerLine, const ScrollOrientation &orientation, const bool isVirtualizationEnabled, const wstring_view &layoutId) | FlowLayoutAlgorithm |
MeasureElement(const winrt::UIElement &element, int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) | FlowLayoutAlgorithm |
Minor(const winrt::Size &size) | OrientationBasedMeasures | [private]
MinorEnd(const winrt::Rect &rect) const | OrientationBasedMeasures | [private]
MinorMajorPoint(float minor, float major) | OrientationBasedMeasures | [private]
MinorMajorRect(float minor, float major, float minorSize, float majorSize) | OrientationBasedMeasures | [private]
MinorMajorSize(float minor, float major) | OrientationBasedMeasures | [private]
MinorSize(const winrt::Rect &rect) | OrientationBasedMeasures | [private]
MinorStart(const winrt::Rect &rect) | OrientationBasedMeasures | [private]
OnItemsSourceChanged(const winrt::IInspectable &source, winrt::NotifyCollectionChangedEventArgs const &args, const winrt::IVirtualizingLayoutContext &context) | FlowLayoutAlgorithm |
PerformLineAlignment(int lineStartIndex, int countInLine, float spaceAtLineStart, float spaceAtLineEnd, float lineSize, FlowLayoutAlgorithm::LineAlignment lineAlignment, bool isWrapping, const winrt::Size &finalSize, const wstring_view &layoutId) | FlowLayoutAlgorithm | [private]
RaiseLineArranged() | FlowLayoutAlgorithm | [private]
RealizationRect() | FlowLayoutAlgorithm | [private]
SetLayoutOrigin() | FlowLayoutAlgorithm | [private]
SetScrollOrientation(ScrollOrientation value) | OrientationBasedMeasures | [inline, private]
ShouldContinueFillingUpSpace(int index, GenerateDirection direction) | FlowLayoutAlgorithm | [private]
SpaceAround enum value | FlowLayoutAlgorithm |
SpaceBetween enum value | FlowLayoutAlgorithm |
SpaceEvenly enum value | FlowLayoutAlgorithm |
Start enum value | FlowLayoutAlgorithm |
UninitializeForContext(const winrt::VirtualizingLayoutContext &context) | FlowLayoutAlgorithm |
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/TestUI/ProgressBarAxeTestPage.xaml.cs Source File

  • File List
  • File Members
  • ProgressBar
  • TestUI

ProgressBarAxeTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 namespace MUXControlsTestApp
00004 {
00005     [AxeScanTestPage(Name = "ProgressBar-Axe")]
00006     public sealed partial class ProgressBarAxeTestPage : TestPage
00007     {
00008         public ProgressBarAxeTestPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SecondaryWindowLightConfiguration Member List

This is the complete list of members for SecondaryWindowLightConfiguration, including all inherited members.
Dispose() | SecondaryWindowLightConfiguration | [inline]
SecondaryWindowLightConfiguration() | SecondaryWindowLightConfiguration | [inline]
View | SecondaryWindowLightConfiguration |
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushLuminosityTestPage Member List

This is the complete list of members for AcrylicBrushLuminosityTestPage, including all inherited members.
AcrylicBrushLuminosityTestPage() AcrylicBrushLuminosityTestPage [inline]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/FloatUtil.h Source File

  • File List
  • File Members
  • inc

FloatUtil.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class FloatUtil
00007 {
00008 public:
00009     // Represents a value that is not a number (NaN).
00010     static const float NaN;
00011 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBar.properties.h Source File

  • File List
  • File Members
  • Generated

TitleBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TitleBarProperties
00008 {
00009 public:
00010     TitleBarProperties();
00011
00012     void Content(winrt::IInspectable const& value);
00013     winrt::IInspectable Content();
00014
00015     void Footer(winrt::IInspectable const& value);
00016     winrt::IInspectable Footer();
00017
00018     void Header(winrt::IInspectable const& value);
00019     winrt::IInspectable Header();
00020
00021     void IconSource(winrt::IconSource const& value);
00022     winrt::IconSource IconSource();
00023
00024     void IsBackButtonVisible(bool value);
00025     bool IsBackButtonVisible();
00026
00027     void IsBackEnabled(bool value);
00028     bool IsBackEnabled();
00029
00030     void IsPaneToggleButtonVisible(bool value);
00031     bool IsPaneToggleButtonVisible();
00032
00033     void Subtitle(winrt::hstring const& value);
00034     winrt::hstring Subtitle();
00035
00036     void TemplateSettings(winrt::TitleBarTemplateSettings const& value);
00037     winrt::TitleBarTemplateSettings TemplateSettings();
00038
00039     void Title(winrt::hstring const& value);
00040     winrt::hstring Title();
00041
00042     static winrt::DependencyProperty ContentProperty() { return s_ContentProperty; }
00043     static winrt::DependencyProperty FooterProperty() { return s_FooterProperty; }
00044     static winrt::DependencyProperty HeaderProperty() { return s_HeaderProperty; }
00045     static winrt::DependencyProperty IconSourceProperty() { return s_IconSourceProperty; }
00046     static winrt::DependencyProperty IsBackButtonVisibleProperty() { return s_IsBackButtonVisibleProperty; }
00047     static winrt::DependencyProperty IsBackEnabledProperty() { return s_IsBackEnabledProperty; }
00048     static winrt::DependencyProperty IsPaneToggleButtonVisibleProperty() { return s_IsPaneToggleButtonVisibleProperty; }
00049     static winrt::DependencyProperty SubtitleProperty() { return s_SubtitleProperty; }
00050     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00051     static winrt::DependencyProperty TitleProperty() { return s_TitleProperty; }
00052
00053     static GlobalDependencyProperty s_ContentProperty;
00054     static GlobalDependencyProperty s_FooterProperty;
00055     static GlobalDependencyProperty s_HeaderProperty;
00056     static GlobalDependencyProperty s_IconSourceProperty;
00057     static GlobalDependencyProperty s_IsBackButtonVisibleProperty;
00058     static GlobalDependencyProperty s_IsBackEnabledProperty;
00059     static GlobalDependencyProperty s_IsPaneToggleButtonVisibleProperty;
00060     static GlobalDependencyProperty s_SubtitleProperty;
00061     static GlobalDependencyProperty s_TemplateSettingsProperty;
00062     static GlobalDependencyProperty s_TitleProperty;
00063
00064     winrt::event_token BackRequested(winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable> const& value);
00065     void BackRequested(winrt::event_token const& token);
00066     winrt::event_token PaneToggleRequested(winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable> const& value);
00067     void PaneToggleRequested(winrt::event_token const& token);
00068
00069     event_source<winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable>> m_backRequestedEventSource;
00070     event_source<winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable>> m_paneToggleRequestedEventSource;
00071
00072     static void EnsureProperties();
00073     static void ClearProperties();
00074
00075     static void OnContentPropertyChanged(
00076         winrt::DependencyObject const& sender,
00077         winrt::DependencyPropertyChangedEventArgs const& args);
00078
00079     static void OnFooterPropertyChanged(
00080         winrt::DependencyObject const& sender,
00081         winrt::DependencyPropertyChangedEventArgs const& args);
00082
00083     static void OnHeaderPropertyChanged(
00084         winrt::DependencyObject const& sender,
00085         winrt::DependencyPropertyChangedEventArgs const& args);
00086
00087     static void OnIconSourcePropertyChanged(
00088         winrt::DependencyObject const& sender,
00089         winrt::DependencyPropertyChangedEventArgs const& args);
00090
00091     static void OnIsBackButtonVisiblePropertyChanged(
00092         winrt::DependencyObject const& sender,
00093         winrt::DependencyPropertyChangedEventArgs const& args);
00094
00095     static void OnIsBackEnabledPropertyChanged(
00096         winrt::DependencyObject const& sender,
00097         winrt::DependencyPropertyChangedEventArgs const& args);
00098
00099     static void OnIsPaneToggleButtonVisiblePropertyChanged(
00100         winrt::DependencyObject const& sender,
00101         winrt::DependencyPropertyChangedEventArgs const& args);
00102
00103     static void OnSubtitlePropertyChanged(
00104         winrt::DependencyObject const& sender,
00105         winrt::DependencyPropertyChangedEventArgs const& args);
00106
00107     static void OnTemplateSettingsPropertyChanged(
00108         winrt::DependencyObject const& sender,
00109         winrt::DependencyPropertyChangedEventArgs const& args);
00110
00111     static void OnTitlePropertyChanged(
00112         winrt::DependencyObject const& sender,
00113         winrt::DependencyPropertyChangedEventArgs const& args);
00114 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/DelegatingItemsSource.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples

DelegatingItemsSource.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00005 using System;
00006 using System.Collections;
00007 using System.Collections.Specialized;
00008 using Microsoft.UI.Xaml.Controls;
00009
00010 namespace MUXControlsTestApp.Samples
00011 {
00012     class DelegatingItemsSource : CustomItemsSourceViewWithUniqueIdMapping
00013     {
00014         private IList _data;
00015
00016         public Func<DelegatingItemsSource, int, string> KeyFromIndexFunc { get; set; }
00017
00018         protected override int GetSizeCore() { return _data.Count; }
00019
00020         public DelegatingItemsSource(IList data)
00021         {
00022             _data = data;
00023             var incc = data as INotifyCollectionChanged;
00024             if (incc != null)
00025             {
00026                 incc.CollectionChanged += OnCollectionChanged;
00027             }
00028         }
00029
00030         public object GetAt(int index)
00031         {
00032             return _data[index];
00033         }
00034
00035         protected override object GetAtCore(int index)
00036         {
00037             return _data[index];
00038         }
00039
00040         protected override string KeyFromIndexCore(int index)
00041         {
00042             return KeyFromIndexFunc(this, index);
00043         }
00044
00045         private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
00046         {
00047             var args = CollectionChangeEventArgsConverters.CreateNotifyArgs(
00048                 e.Action,
00049                 e.OldStartingIndex,
00050                 e.OldItems == null ? -1 : e.OldItems.Count,
00051                 e.NewStartingIndex,
00052                 e.NewItems == null ? -1 : e.NewItems.Count);
00053
00054             OnItemsSourceChanged(args);
00055         }
00056     }
00057 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollStartingEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollStartingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "ScrollingScrollStartingEventArgs.h"
00006
00007 int32_t ScrollingScrollStartingEventArgs::CorrelationId() const
00008 {
00009     return m_correlationId;
00010 }
00011
00012 void ScrollingScrollStartingEventArgs::SetCorrelationId(int32_t correlationId)
00013 {
00014     m_correlationId = correlationId;
00015 }
00016
00017 double ScrollingScrollStartingEventArgs::HorizontalOffset() const
00018 {
00019     return m_horizontalOffset;
00020 }
00021
00022 void ScrollingScrollStartingEventArgs::SetHorizontalOffset(double horizontalOffset)
00023 {
00024     m_horizontalOffset = horizontalOffset;
00025 }
00026
00027 double ScrollingScrollStartingEventArgs::VerticalOffset() const
00028 {
00029     return m_verticalOffset;
00030 }
00031
00032 void ScrollingScrollStartingEventArgs::SetVerticalOffset(double verticalOffset)
00033 {
00034     m_verticalOffset = verticalOffset;
00035 }
00036
00037 float ScrollingScrollStartingEventArgs::ZoomFactor() const
00038 {
00039     return m_zoomFactor;
00040 }
00041
00042 void ScrollingScrollStartingEventArgs::SetZoomFactor(float zoomFactor)
00043 {
00044     m_zoomFactor = zoomFactor;
00045 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AspectRatioRespectingControl Member List

This is the complete list of members for AspectRatioRespectingControl, including all inherited members.
ArrangeOverride(Size finalSize) | AspectRatioRespectingControl | [inline, protected]
MeasureOverride(Size availableSize) | AspectRatioRespectingControl | [inline, protected]
TwoByOneifySize(Size initialSize) | AspectRatioRespectingControl | [inline, private]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FallbackGrid Member List

This is the complete list of members for FallbackGrid, including all inherited members.
FallbackGrid() | FallbackGrid | [inline]
Latest | FallbackGrid | [private, static]
RectangleColor | FallbackGrid | [private, static]
RectangleHeight | FallbackGrid | [private]
RectangleWidth | FallbackGrid | [private]
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/TestUI/SelectorBarSummaryPage.xaml.cs Source File

  • File List
  • File Members
  • SelectorBar
  • TestUI

SelectorBarSummaryPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using Microsoft.UI;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Input;
00011 using Microsoft.UI.Xaml.Media;
00012 using Microsoft.UI.Xaml.Navigation;
00013 using Microsoft.UI.Private.Controls;
00014 using Windows.Foundation;
00015 using MUXControlsTestApp.Samples.Model;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed partial class SelectorBarSummaryPage : TestPage
00020     {
00021         private List<string> _fullLogs = new List<string>();
00022         private SelectorBarItem _otherSelectorBarItem = new SelectorBarItem();
00023
00024         public SelectorBarSummaryPage()
00025         {
00026             this.InitializeComponent();
00027
00028             PopulateCmbSelectorBarSelectedItem();
00029             UpdateBackground();
00030             UpdateBorderBrush();
00031             UpdateBorderThickness();
00032             UpdateMargin();
00033             UpdatePadding();
00034             UpdateMaxWidth();
00035             UpdateMaxHeight();
00036             UpdateCornerRadius();
00037             UpdateTabNavigation();
00038             UpdateXYFocusKeyboardNavigation();
00039             UpdateIsEnabled();
00040             UpdateIsTabStop();
00041             UpdateSelectedItem();
00042
00043             if (chkLogItemContainerMessages.IsChecked == true)
00044             {
00045                 MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00046             }
00047             if (chkLogItemsRepeaterMessages.IsChecked == true)
00048             {
00049                 MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00050             }
00051             if (chkLogItemsViewMessages.IsChecked == true)
00052             {
00053                 MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00054             }
00055             if (chkLogSelectorBarMessages.IsChecked == true)
00056             {
00057                 MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00058             }
00059
00060             if (chkLogSelectorBarMessages.IsChecked == true ||
00061                 chkLogItemsViewMessages.IsChecked == true ||
00062                 chkLogItemsRepeaterMessages.IsChecked == true ||
00063                 chkLogItemContainerMessages.IsChecked == true)
00064             {
00065                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00066             }
00067         }
00068
00069         ~SelectorBarSummaryPage()
00070         {
00071         }
00072
00073         protected override void OnNavigatedFrom(NavigationEventArgs e)
00074         {
00075             MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00076             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00077             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00078             MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00079
00080             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00081
00082             if (selectorBar != null)
00083             {
00084                 ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);
00085
00086                 if (itemsView != null)
00087                 {
00088                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
00089
00090                     if (itemsRepeater != null)
00091                     {
00092                         UnhookItemsRepeaterEvents(itemsRepeater);
00093                     }
00094
00095                     UnhookItemsViewEvents(itemsView);
00096                 }
00097
00098                 UnhookSelectorBarEvents();
00099             }
00100
00101             base.OnNavigatedFrom(e);
00102         }
00103
00104         private void SelectorBar_Loaded(object sender, RoutedEventArgs e)
00105         {
00106             AppendEventMessage($"SelectorBar.Loaded");
00107         }
00108
00109         private void SelectorBar_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args)
00110         {
00111             string selectedItem = (sender.SelectedItem == null) ? "<null>" : GetStringFromSelectorBarItem(sender.SelectedItem);
00112
00113             AppendEventMessage($"SelectorBar.SelectionChanged SelectedItem={selectedItem}");
00114         }
00115
00116         private void ItemsView_ItemInvoked(ItemsView sender, ItemsViewItemInvokedEventArgs args)
00117         {
00118             AppendEventMessage($"ItemsView.ItemInvoked InvokedItem={args.InvokedItem.ToString().Substring(0, 50)}");
00119         }
00120
00121         private void ItemsView_Loaded(object sender, RoutedEventArgs e)
00122         {
00123             AppendEventMessage($"ItemsView.Loaded");
00124             if (chkLogItemsRepeaterEvents.IsChecked == true)
00125             {
00126                 LogItemsRepeaterInfo();
00127             }
00128
00129             ItemsView itemsView = sender as ItemsView;
00130
00131             if (itemsView != null)
00132             {
00133                 ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
00134
00135                 if (itemsRepeater != null)
00136                 {
00137                     HookItemsRepeaterEvents(itemsRepeater);
00138                 }
00139             }
00140         }
00141
00142         private void ItemsView_SelectionChanged(ItemsView sender, ItemsViewSelectionChangedEventArgs args)
00143         {
00144             string selectedItems = String.Empty;
00145
00146             foreach (var selectedItem in sender.SelectedItems)
00147             {
00148                 selectedItems += (selectedItem == null) ? "<null>, " : selectedItem.ToString().Substring(0, 9) + ", ";
00149             }
00150
00151             AppendEventMessage($"ItemsView.SelectionChanged SelectedItems={selectedItems}");
00152         }
00153
00154         private void ItemsView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
00155         {
00156             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00157             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00158             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00159             string newFEName = (newFE == null) ? "null" : newFE.Name;
00160
00161             AppendEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00162         }
00163
00164         private void ItemsView_LostFocus(object sender, RoutedEventArgs e)
00165         {
00166             AppendEventMessage("ItemsView.LostFocus");
00167         }
00168
00169         private void ItemsView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
00170         {
00171             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00172             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00173             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00174             string newFEName = (newFE == null) ? "null" : newFE.Name;
00175
00176             AppendEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00177         }
00178
00179         private void ItemsView_GotFocus(object sender, RoutedEventArgs e)
00180         {
00181             AppendEventMessage("ItemsView.GotFocus");
00182         }
00183
00184         private void ItemsRepeater_Loaded(object sender, RoutedEventArgs e)
00185         {
00186             if (chkLogItemsRepeaterEvents.IsChecked == true)
00187             {
00188                 AppendEventMessage($"ItemsRepeater.Loaded");
00189                 LogItemsRepeaterInfo();
00190             }
00191         }
00192
00193         private void ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
00194         {
00195             if (chkLogItemsRepeaterEvents.IsChecked == true)
00196             {
00197                 AppendEventMessage($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}");
00198             }
00199         }
00200
00201         private void ItemsRepeater_ElementClearing(ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
00202         {
00203             if (chkLogItemsRepeaterEvents.IsChecked == true)
00204             {
00205                 AppendEventMessage($"ItemsRepeater.ElementClearing Element={args.Element}");
00206             }
00207         }
00208
00209         private void LogItemsRepeaterInfo()
00210         {
00211             if (selectorBar != null)
00212             {
00213                 ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);
00214
00215                 if (itemsView != null)
00216                 {
00217                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
00218
00219                     if (itemsRepeater != null)
00220                     {
00221                         AppendEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}, ChildrenCount={VisualTreeHelper.GetChildrenCount(itemsRepeater)}");
00222                     }
00223                 }
00224             }
00225         }
00226
00227         #region UI Controls Updates
00228
00229         private void UpdateMargin()
00230         {
00231             if (selectorBar != null && txtMargin != null)
00232             {
00233                 txtMargin.Text = selectorBar.Margin.ToString();
00234             }
00235         }
00236
00237         private void UpdateMaxHeight()
00238         {
00239             if (selectorBar != null && txtMaxHeight != null)
00240             {
00241                 txtMaxHeight.Text = selectorBar.MaxHeight.ToString();
00242             }
00243         }
00244
00245         private void UpdateMaxWidth()
00246         {
00247             if (selectorBar != null && txtMaxWidth != null)
00248             {
00249                 txtMaxWidth.Text = selectorBar.MaxWidth.ToString();
00250             }
00251         }
00252
00253         private void UpdatePadding()
00254         {
00255             if (selectorBar != null && txtPadding != null)
00256             {
00257                 txtPadding.Text = selectorBar.Padding.ToString();
00258             }
00259         }
00260
00261         private void UpdateBackground()
00262         {
00263             if (selectorBar != null && cmbBackground != null)
00264             {
00265                 SolidColorBrush bg = selectorBar.Background as SolidColorBrush;
00266
00267                 if (bg == null)
00268                 {
00269                     cmbBackground.SelectedIndex = 0;
00270                 }
00271                 else if (bg.Color == Colors.Transparent)
00272                 {
00273                     cmbBackground.SelectedIndex = 1;
00274                 }
00275                 else if (bg.Color == Colors.AliceBlue)
00276                 {
00277                     cmbBackground.SelectedIndex = 2;
00278                 }
00279                 else if (bg.Color == Colors.Aqua)
00280                 {
00281                     cmbBackground.SelectedIndex = 3;
00282                 }
00283                 else
00284                 {
00285                     cmbBackground.SelectedIndex = -1;
00286                 }
00287             }
00288         }
00289
00290         private void UpdateBorderBrush()
00291         {
00292             if (selectorBar != null && cmbBorderBrush != null)
00293             {
00294                 SolidColorBrush bb = selectorBar.BorderBrush as SolidColorBrush;
00295
00296                 if (bb == null)
00297                 {
00298                     cmbBorderBrush.SelectedIndex = 0;
00299                 }
00300                 else if (bb.Color == Colors.Transparent)
00301                 {
00302                     cmbBorderBrush.SelectedIndex = 1;
00303                 }
00304                 else if (bb.Color == Colors.Blue)
00305                 {
00306                     cmbBorderBrush.SelectedIndex = 2;
00307                 }
00308                 else if (bb.Color == Colors.Green)
00309                 {
00310                     cmbBorderBrush.SelectedIndex = 3;
00311                 }
00312                 else
00313                 {
00314                     cmbBorderBrush.SelectedIndex = -1;
00315                 }
00316             }
00317         }
00318
00319         private void UpdateBorderThickness()
00320         {
00321             if (selectorBar != null && txtBorderThickness != null)
00322             {
00323                 txtBorderThickness.Text = selectorBar.BorderThickness.ToString();
00324             }
00325         }
00326
00327         private void UpdateCornerRadius()
00328         {
00329             if (selectorBar != null && txtCornerRadius != null)
00330             {
00331                 txtCornerRadius.Text = selectorBar.CornerRadius.ToString();
00332             }
00333         }
00334
00335         private void UpdateTabNavigation()
00336         {
00337             try
00338             {
00339                 if (selectorBar != null && cmbTabNavigation != null)
00340                 {
00341                     cmbTabNavigation.SelectedIndex = (int)selectorBar.TabNavigation;
00342                 }
00343             }
00344             catch (Exception ex)
00345             {
00346                 txtExceptionReport.Text = ex.ToString();
00347                 AppendEventMessage(ex.ToString());
00348             }
00349         }
00350
00351         private void UpdateXYFocusKeyboardNavigation()
00352         {
00353             try
00354             {
00355                 if (selectorBar != null && cmbXYFocusKeyboardNavigation != null)
00356                 {
00357                     cmbXYFocusKeyboardNavigation.SelectedIndex = (int)selectorBar.XYFocusKeyboardNavigation;
00358                 }
00359             }
00360             catch (Exception ex)
00361             {
00362                 txtExceptionReport.Text = ex.ToString();
00363                 AppendEventMessage(ex.ToString());
00364             }
00365         }
00366
00367         private void UpdateItemsCount()
00368         {
00369             // TODO
00370         }
00371
00372         private void UpdateIsEnabled()
00373         {
00374             try
00375             {
00376                 if (selectorBar != null && chkIsEnabled != null)
00377                 {
00378                     chkIsEnabled.IsChecked = selectorBar.IsEnabled;
00379                 }
00380             }
00381             catch (Exception ex)
00382             {
00383                 txtExceptionReport.Text = ex.ToString();
00384                 AppendEventMessage(ex.ToString());
00385             }
00386         }
00387
00388         private void UpdateIsTabStop()
00389         {
00390             try
00391             {
00392                 if (selectorBar != null && chkIsTabStop != null)
00393                 {
00394                     chkIsTabStop.IsChecked = selectorBar.IsTabStop;
00395                 }
00396             }
00397             catch (Exception ex)
00398             {
00399                 txtExceptionReport.Text = ex.ToString();
00400                 AppendEventMessage(ex.ToString());
00401             }
00402         }
00403
00404         private void PopulateCmbSelectorBarSelectedItem()
00405         {
00406             if (selectorBar != null && cmbSelectorBarSelectedItem != null)
00407             {
00408                 cmbSelectorBarSelectedItem.Items.Clear();
00409
00410                 cmbSelectorBarSelectedItem.Items.Add(new ComboBoxItem()
00411                 {
00412                     Content = "null"
00413                 });
00414
00415                 if (selectorBar.Items != null)
00416                 {
00417                     foreach (SelectorBarItem selectorBarItem in selectorBar.Items)
00418                     {
00419                         cmbSelectorBarSelectedItem.Items.Add(new ComboBoxItem()
00420                         {
00421                             Content = GetStringFromSelectorBarItem(selectorBarItem),
00422                             Tag = selectorBarItem
00423                         });
00424                     }
00425                 }
00426
00427                 cmbSelectorBarSelectedItem.Items.Add(new ComboBoxItem()
00428                 {
00429                     Content = "Other",
00430                     Tag = _otherSelectorBarItem
00431                 });
00432             }
00433         }
00434
00435         private void UpdateSelectedItem()
00436         {
00437             if (selectorBar != null && cmbSelectorBarSelectedItem != null)
00438             {
00439                 if (selectorBar.SelectedItem == null)
00440                 {
00441                     cmbSelectorBarSelectedItem.SelectedIndex = 0;
00442                 }
00443                 else
00444                 {
00445                     int selectedIndex = 1;
00446
00447                     if (selectorBar.Items != null)
00448                     {
00449                         foreach (SelectorBarItem selectorBarItem in selectorBar.Items)
00450                         {
00451                             if (selectorBarItem == selectorBar.SelectedItem)
00452                             {
00453                                 cmbSelectorBarSelectedItem.SelectedIndex = selectedIndex;
00454                                 break;
00455                             }
00456
00457                             selectedIndex++;
00458                         }
00459                     }
00460
00461                     cmbSelectorBarSelectedItem.SelectedIndex = selectedIndex;
00462                 }
00463             }
00464         }
00465
00466         #endregion
00467
00468         #region Property Getters
00469
00470         private void BtnGetBorderThickness_Click(object sender, RoutedEventArgs e)
00471         {
00472             UpdateBorderThickness();
00473         }
00474
00475         private void BtnGetCornerRadius_Click(object sender, RoutedEventArgs e)
00476         {
00477             UpdateCornerRadius();
00478         }
00479
00480         private void BtnGetMargin_Click(object sender, RoutedEventArgs e)
00481         {
00482             UpdateMargin();
00483         }
00484
00485         private void BtnGetMaxHeight_Click(object sender, RoutedEventArgs e)
00486         {
00487             UpdateMaxHeight();
00488         }
00489
00490         private void BtnGetMaxWidth_Click(object sender, RoutedEventArgs e)
00491         {
00492             UpdateMaxWidth();
00493         }
00494
00495         private void BtnGetPadding_Click(object sender, RoutedEventArgs e)
00496         {
00497             UpdatePadding();
00498         }
00499
00500         private void BtnGetSelectorBarSelectedItem_Click(object sender, RoutedEventArgs e)
00501         {
00502             UpdateSelectedItem();
00503         }
00504
00505         #endregion
00506
00507         #region Property Setters
00508
00509         private void ChkIsEnabled_CheckedChanged(object sender, RoutedEventArgs e)
00510         {
00511             try
00512             {
00513                 if (selectorBar != null && chkIsEnabled != null)
00514                 {
00515                     selectorBar.IsEnabled = (bool)chkIsEnabled.IsChecked;
00516                 }
00517             }
00518             catch (Exception ex)
00519             {
00520                 txtExceptionReport.Text = ex.ToString();
00521                 AppendEventMessage(ex.ToString());
00522             }
00523         }
00524
00525         private void ChkIsTabStop_CheckedChanged(object sender, RoutedEventArgs e)
00526         {
00527             try
00528             {
00529                 if (selectorBar != null && chkIsTabStop != null)
00530                 {
00531                     selectorBar.IsTabStop = (bool)chkIsTabStop.IsChecked;
00532                 }
00533             }
00534             catch (Exception ex)
00535             {
00536                 txtExceptionReport.Text = ex.ToString();
00537                 AppendEventMessage(ex.ToString());
00538             }
00539         }
00540
00541         private void BtnSetCornerRadius_Click(object sender, RoutedEventArgs e)
00542         {
00543             try
00544             {
00545                 if (selectorBar != null && txtCornerRadius != null)
00546                 {
00547                     selectorBar.CornerRadius = GetCornerRadiusFromString(txtCornerRadius.Text);
00548                 }
00549             }
00550             catch (Exception ex)
00551             {
00552                 txtExceptionReport.Text = ex.ToString();
00553                 AppendEventMessage(ex.ToString());
00554             }
00555         }
00556
00557         private void BtnSetMargin_Click(object sender, RoutedEventArgs e)
00558         {
00559             try
00560             {
00561                 if (selectorBar != null && txtMargin != null)
00562                 {
00563                     selectorBar.Margin = GetThicknessFromString(txtMargin.Text);
00564                 }
00565             }
00566             catch (Exception ex)
00567             {
00568                 txtExceptionReport.Text = ex.ToString();
00569                 AppendEventMessage(ex.ToString());
00570             }
00571         }
00572
00573         private void BtnSetMaxHeight_Click(object sender, RoutedEventArgs e)
00574         {
00575             try
00576             {
00577                 if (selectorBar != null && txtMaxHeight != null)
00578                 {
00579                     selectorBar.MaxHeight = Convert.ToDouble(txtMaxHeight.Text);
00580                 }
00581             }
00582             catch (Exception ex)
00583             {
00584                 txtExceptionReport.Text = ex.ToString();
00585                 AppendEventMessage(ex.ToString());
00586             }
00587         }
00588
00589         private void BtnSetMaxWidth_Click(object sender, RoutedEventArgs e)
00590         {
00591             try
00592             {
00593                 if (selectorBar != null && txtMaxWidth != null)
00594                 {
00595                     selectorBar.MaxWidth = Convert.ToDouble(txtMaxWidth.Text);
00596                 }
00597             }
00598             catch (Exception ex)
00599             {
00600                 txtExceptionReport.Text = ex.ToString();
00601                 AppendEventMessage(ex.ToString());
00602             }
00603         }
00604
00605         private void BtnSetPadding_Click(object sender, RoutedEventArgs e)
00606         {
00607             try
00608             {
00609                 if (selectorBar != null && txtPadding != null)
00610                 {
00611                     selectorBar.Padding = GetThicknessFromString(txtPadding.Text);
00612                 }
00613             }
00614             catch (Exception ex)
00615             {
00616                 txtExceptionReport.Text = ex.ToString();
00617                 AppendEventMessage(ex.ToString());
00618             }
00619         }
00620
00621         private void BtnSetSelectorBarSelectedItem_Click(object sender, RoutedEventArgs e)
00622         {
00623             try
00624             {
00625                 if (selectorBar != null && cmbSelectorBarSelectedItem != null)
00626                 {
00627                     selectorBar.SelectedItem = (cmbSelectorBarSelectedItem.SelectedItem as ComboBoxItem).Tag as SelectorBarItem;
00628                 }
00629             }
00630             catch (Exception ex)
00631             {
00632                 txtExceptionReport.Text = ex.ToString();
00633                 AppendEventMessage(ex.ToString());
00634             }
00635         }
00636
00637         private void BtnSetBorderThickness_Click(object sender, RoutedEventArgs e)
00638         {
00639             try
00640             {
00641                 if (selectorBar != null)
00642                 {
00643                     selectorBar.BorderThickness = GetThicknessFromString(txtBorderThickness.Text);
00644                 }
00645             }
00646             catch (Exception ex)
00647             {
00648                 txtExceptionReport.Text = ex.ToString();
00649                 AppendEventMessage(ex.ToString());
00650             }
00651         }
00652
00653         private void CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e)
00654         {
00655             try
00656             {
00657                 if (selectorBar != null)
00658                 {
00659                     switch (cmbBackground.SelectedIndex)
00660                     {
00661                         case 0:
00662                             selectorBar.Background = null;
00663                             break;
00664                         case 1:
00665                             selectorBar.Background = new SolidColorBrush(Colors.Transparent);
00666                             break;
00667                         case 2:
00668                             selectorBar.Background = new SolidColorBrush(Colors.AliceBlue);
00669                             break;
00670                         case 3:
00671                             selectorBar.Background = new SolidColorBrush(Colors.Aqua);
00672                             break;
00673                     }
00674                 }
00675             }
00676             catch (Exception ex)
00677             {
00678                 txtExceptionReport.Text = ex.ToString();
00679                 AppendEventMessage(ex.ToString());
00680             }
00681         }
00682
00683         private void CmbBorderBrush_SelectionChanged(object sender, SelectionChangedEventArgs e)
00684         {
00685             try
00686             {
00687                 if (selectorBar != null)
00688                 {
00689                     switch (cmbBorderBrush.SelectedIndex)
00690                     {
00691                         case 0:
00692                             selectorBar.BorderBrush = null;
00693                             break;
00694                         case 1:
00695                             selectorBar.BorderBrush = new SolidColorBrush(Colors.Transparent);
00696                             break;
00697                         case 2:
00698                             selectorBar.BorderBrush = new SolidColorBrush(Colors.Blue);
00699                             break;
00700                         case 3:
00701                             selectorBar.BorderBrush = new SolidColorBrush(Colors.Green);
00702                             break;
00703                     }
00704                 }
00705             }
00706             catch (Exception ex)
00707             {
00708                 txtExceptionReport.Text = ex.ToString();
00709                 AppendEventMessage(ex.ToString());
00710             }
00711         }
00712
00713         private void CmbTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00714         {
00715             try
00716             {
00717                 if (selectorBar != null && cmbTabNavigation != null && selectorBar.TabNavigation != (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex)
00718                 {
00719                     selectorBar.TabNavigation = (KeyboardNavigationMode)cmbTabNavigation.SelectedIndex;
00720                 }
00721             }
00722             catch (Exception ex)
00723             {
00724                 txtExceptionReport.Text = ex.ToString();
00725                 AppendEventMessage(ex.ToString());
00726             }
00727         }
00728
00729         private void CmbXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00730         {
00731             try
00732             {
00733                 if (selectorBar != null && cmbXYFocusKeyboardNavigation != null && selectorBar.XYFocusKeyboardNavigation != (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex)
00734                 {
00735                     selectorBar.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;
00736                 }
00737             }
00738             catch (Exception ex)
00739             {
00740                 txtExceptionReport.Text = ex.ToString();
00741                 AppendEventMessage(ex.ToString());
00742             }
00743         }
00744
00745         #endregion
00746
00747         #region Items methods
00748
00749         private void BtnGetSelectorBarItemsCount_Click(object sender, RoutedEventArgs e)
00750         {
00751             try
00752             {
00753                 if (selectorBar != null && txtSelectorBarItemsCount != null)
00754                 {
00755                     if (selectorBar.Items == null)
00756                     {
00757                         txtSelectorBarItemsCount.Text = "null";
00758                     }
00759                     else
00760                     {
00761                         txtSelectorBarItemsCount.Text = selectorBar.Items.Count.ToString();
00762                     }
00763                 }
00764             }
00765             catch (Exception ex)
00766             {
00767                 txtExceptionReport.Text = ex.ToString();
00768                 AppendEventMessage(ex.ToString());
00769             }
00770         }
00771
00772         private void BtnGetSelectorBarItemIsEnabled_Click(object sender, RoutedEventArgs e)
00773         {
00774             try
00775             {
00776                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsEnabled != null)
00777                 {
00778                     cmbSelectorBarItemIsEnabled.SelectedIndex = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsEnabled ? 1 : 0;
00779                 }
00780             }
00781             catch (Exception ex)
00782             {
00783                 txtExceptionReport.Text = ex.ToString();
00784                 AppendEventMessage(ex.ToString());
00785             }
00786         }
00787
00788         private void BtnSetSelectorBarItemIsEnabled_Click(object sender, RoutedEventArgs e)
00789         {
00790             try
00791             {
00792                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsEnabled != null)
00793                 {
00794                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsEnabled = cmbSelectorBarItemIsEnabled.SelectedIndex == 1;
00795                 }
00796             }
00797             catch (Exception ex)
00798             {
00799                 txtExceptionReport.Text = ex.ToString();
00800                 AppendEventMessage(ex.ToString());
00801             }
00802         }
00803
00804         private void BtnGetSelectorBarItemIsSelected_Click(object sender, RoutedEventArgs e)
00805         {
00806             try
00807             {
00808                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsSelected != null)
00809                 {
00810                     cmbSelectorBarItemIsSelected.SelectedIndex = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsSelected ? 1 : 0;
00811                 }
00812             }
00813             catch (Exception ex)
00814             {
00815                 txtExceptionReport.Text = ex.ToString();
00816                 AppendEventMessage(ex.ToString());
00817             }
00818         }
00819
00820         private void BtnSetSelectorBarItemIsSelected_Click(object sender, RoutedEventArgs e)
00821         {
00822             try
00823             {
00824                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIsSelected != null)
00825                 {
00826                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].IsSelected = cmbSelectorBarItemIsSelected.SelectedIndex == 1;
00827                 }
00828             }
00829             catch (Exception ex)
00830             {
00831                 txtExceptionReport.Text = ex.ToString();
00832                 AppendEventMessage(ex.ToString());
00833             }
00834         }
00835
00836         private void BtnGetSelectorBarItemVisibility_Click(object sender, RoutedEventArgs e)
00837         {
00838             try
00839             {
00840                 if (cmbSelectorBarItemVisibility != null)
00841                 {
00842                     if (selectorBar == null || txtSelectorBarItemIndex == null)
00843                     {
00844                         cmbSelectorBarItemVisibility.SelectedIndex = -1;
00845                     }
00846                     else
00847                     {
00848                         cmbSelectorBarItemVisibility.SelectedIndex = (int)selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Visibility;
00849                     }
00850                 }
00851             }
00852             catch (Exception ex)
00853             {
00854                 txtExceptionReport.Text = ex.ToString();
00855                 AppendEventMessage(ex.ToString());
00856             }
00857         }
00858
00859         private void BtnSetSelectorBarItemVisibility_Click(object sender, RoutedEventArgs e)
00860         {
00861             try
00862             {
00863                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemVisibility != null && cmbSelectorBarItemVisibility.SelectedIndex != -1)
00864                 {
00865                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Visibility = (Visibility)cmbSelectorBarItemVisibility.SelectedIndex;
00866                 }
00867             }
00868             catch (Exception ex)
00869             {
00870                 txtExceptionReport.Text = ex.ToString();
00871                 AppendEventMessage(ex.ToString());
00872             }
00873         }
00874
00875         private void BtnGetSelectorBarItemForeground_Click(object sender, RoutedEventArgs e)
00876         {
00877             try
00878             {
00879                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemForeground != null)
00880                 {
00881                     SolidColorBrush fg = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Foreground as SolidColorBrush;
00882
00883                     if (fg == null)
00884                     {
00885                         cmbSelectorBarItemForeground.SelectedIndex = 0;
00886                     }
00887                     else if (fg.Color == Colors.Black)
00888                     {
00889                         cmbSelectorBarItemForeground.SelectedIndex = 1;
00890                     }
00891                     else if (fg.Color == Colors.Red)
00892                     {
00893                         cmbSelectorBarItemForeground.SelectedIndex = 2;
00894                     }
00895                     else if (fg.Color == Colors.Green)
00896                     {
00897                         cmbSelectorBarItemForeground.SelectedIndex = 3;
00898                     }
00899                     else
00900                     {
00901                         cmbSelectorBarItemForeground.SelectedIndex = -1;
00902                     }
00903                 }
00904             }
00905             catch (Exception ex)
00906             {
00907                 txtExceptionReport.Text = ex.ToString();
00908                 AppendEventMessage(ex.ToString());
00909             }
00910         }
00911
00912         private void BtnSetSelectorBarItemForeground_Click(object sender, RoutedEventArgs e)
00913         {
00914             try
00915             {
00916                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemForeground != null)
00917                 {
00918                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Foreground = GetForeground();
00919                 }
00920             }
00921             catch (Exception ex)
00922             {
00923                 txtExceptionReport.Text = ex.ToString();
00924                 AppendEventMessage(ex.ToString());
00925             }
00926         }
00927
00928         private void BtnGetSelectorBarItemMargin_Click(object sender, RoutedEventArgs e)
00929         {
00930             try
00931             {
00932                 if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemMargin != null)
00933                 {
00934                     txtSelectorBarItemMargin.Text = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Margin.ToString();
00935                 }
00936             }
00937             catch (Exception ex)
00938             {
00939                 txtExceptionReport.Text = ex.ToString();
00940                 AppendEventMessage(ex.ToString());
00941             }
00942         }
00943
00944         private void BtnSetSelectorBarItemMargin_Click(object sender, RoutedEventArgs e)
00945         {
00946             try
00947             {
00948                 if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemMargin != null)
00949                 {
00950                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Margin = GetThicknessFromString(txtSelectorBarItemMargin.Text);
00951                 }
00952             }
00953             catch (Exception ex)
00954             {
00955                 txtExceptionReport.Text = ex.ToString();
00956                 AppendEventMessage(ex.ToString());
00957             }
00958         }
00959
00960         private void BtnGetSelectorBarItemPadding_Click(object sender, RoutedEventArgs e)
00961         {
00962             try
00963             {
00964                 if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemPadding != null)
00965                 {
00966                     txtSelectorBarItemPadding.Text = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Padding.ToString();
00967                 }
00968             }
00969             catch (Exception ex)
00970             {
00971                 txtExceptionReport.Text = ex.ToString();
00972                 AppendEventMessage(ex.ToString());
00973             }
00974         }
00975
00976         private void BtnSetSelectorBarItemPadding_Click(object sender, RoutedEventArgs e)
00977         {
00978             try
00979             {
00980                 if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemPadding != null)
00981                 {
00982                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Padding = GetThicknessFromString(txtSelectorBarItemPadding.Text);
00983                 }
00984             }
00985             catch (Exception ex)
00986             {
00987                 txtExceptionReport.Text = ex.ToString();
00988                 AppendEventMessage(ex.ToString());
00989             }
00990         }
00991
00992         private void BtnGetSelectorBarItemText_Click(object sender, RoutedEventArgs e)
00993         {
00994             try
00995             {
00996                 if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemText != null)
00997                 {
00998                     txtSelectorBarItemText.Text = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Text;
00999                 }
01000             }
01001             catch (Exception ex)
01002             {
01003                 txtExceptionReport.Text = ex.ToString();
01004                 AppendEventMessage(ex.ToString());
01005             }
01006         }
01007
01008         private void BtnSetSelectorBarItemText_Click(object sender, RoutedEventArgs e)
01009         {
01010             try
01011             {
01012                 if (selectorBar != null && txtSelectorBarItemIndex != null && txtSelectorBarItemText != null)
01013                 {
01014                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Text = txtSelectorBarItemText.Text;
01015                     PopulateCmbSelectorBarSelectedItem();
01016                 }
01017             }
01018             catch (Exception ex)
01019             {
01020                 txtExceptionReport.Text = ex.ToString();
01021                 AppendEventMessage(ex.ToString());
01022             }
01023         }
01024
01025         private void BtnGetSelectorBarItemIcon_Click(object sender, RoutedEventArgs e)
01026         {
01027             try
01028             {
01029                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIcon != null)
01030                 {
01031                     cmbSelectorBarItemIcon.SelectedIndex = -1;
01032
01033                     SymbolIcon symbolIcon = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)].Icon as SymbolIcon;
01034
01035                     if (symbolIcon == null)
01036                     {
01037                         cmbSelectorBarItemIcon.SelectedIndex = 0;
01038                         return;
01039                     }
01040
01041                     cmbSelectorBarItemIcon.SelectedIndex = GetIntFromSymbol(symbolIcon.Symbol);
01042                 }
01043             }
01044             catch (Exception ex)
01045             {
01046                 txtExceptionReport.Text = ex.ToString();
01047                 AppendEventMessage(ex.ToString());
01048             }
01049         }
01050
01051         private void BtnSetSelectorBarItemIcon_Click(object sender, RoutedEventArgs e)
01052         {
01053             try
01054             {
01055                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemIcon != null)
01056                 {
01057                     SelectorBarItem selectorBarItem = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)];
01058
01059                     if (cmbSelectorBarItemIcon.SelectedIndex < 1)
01060                     {
01061                         selectorBarItem.Icon = null;
01062                         return;
01063                     }
01064
01065                     SymbolIcon symbolIcon = selectorBarItem.Icon as SymbolIcon;
01066
01067                     if (symbolIcon == null)
01068                     {
01069                         symbolIcon = new SymbolIcon();
01070                     }
01071
01072                     symbolIcon.Symbol = GetSymbolFromInt(cmbSelectorBarItemIcon.SelectedIndex);
01073                     selectorBarItem.Icon = symbolIcon;
01074                     PopulateCmbSelectorBarSelectedItem();
01075                 }
01076             }
01077             catch (Exception ex)
01078             {
01079                 txtExceptionReport.Text = ex.ToString();
01080                 AppendEventMessage(ex.ToString());
01081             }
01082         }
01083
01084         private void BtnGetSelectorBarItemChild_Click(object sender, RoutedEventArgs e)
01085         {
01086             try
01087             {
01088                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemChild != null)
01089                 {
01090                     cmbSelectorBarItemChild.SelectedIndex = -1;
01091
01092                     SelectorBarItem selectorBarItem = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)];
01093
01094                     if (selectorBarItem.Child == null)
01095                     {
01096                         cmbSelectorBarItemChild.SelectedIndex = 0;
01097                     }
01098                     else if (selectorBarItem.Child is TextBlock)
01099                     {
01100                         cmbSelectorBarItemChild.SelectedIndex = 1;
01101                     }
01102                     else if (selectorBarItem.Child is TextBox)
01103                     {
01104                         cmbSelectorBarItemChild.SelectedIndex = 2;
01105                     }
01106                 }
01107             }
01108             catch (Exception ex)
01109             {
01110                 txtExceptionReport.Text = ex.ToString();
01111                 AppendEventMessage(ex.ToString());
01112             }
01113         }
01114
01115         private void BtnSetSelectorBarItemChild_Click(object sender, RoutedEventArgs e)
01116         {
01117             try
01118             {
01119                 if (selectorBar != null && txtSelectorBarItemIndex != null && cmbSelectorBarItemChild != null)
01120                 {
01121                     SelectorBarItem selectorBarItem = selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)];
01122
01123                     switch (cmbSelectorBarItemChild.SelectedIndex)
01124                     {
01125                         case -1:
01126                         case 0:
01127                             selectorBarItem.Child = null;
01128                             break;
01129                         case 1:
01130                             selectorBarItem.Child = GetTextBlockChild();
01131                             break;
01132                         case 2:
01133                             selectorBarItem.Child = GetTextBoxChild();
01134                             break;
01135                     }
01136                 }
01137             }
01138             catch (Exception ex)
01139             {
01140                 txtExceptionReport.Text = ex.ToString();
01141                 AppendEventMessage(ex.ToString());
01142             }
01143         }
01144
01145         private void BtnAddSelectorBarItem_Click(object sender, RoutedEventArgs e)
01146         {
01147             try
01148             {
01149                 if (selectorBar != null)
01150                 {
01151                     selectorBar.Items.Add(GetSelectorBarItem());
01152                     PopulateCmbSelectorBarSelectedItem();
01153                 }
01154             }
01155             catch (Exception ex)
01156             {
01157                 txtExceptionReport.Text = ex.ToString();
01158                 AppendEventMessage(ex.ToString());
01159             }
01160         }
01161
01162         private void BtnRemoveAllSelectorBarItems_Click(object sender, RoutedEventArgs e)
01163         {
01164             try
01165             {
01166                 if (selectorBar != null)
01167                 {
01168                     selectorBar.Items.Clear();
01169                     PopulateCmbSelectorBarSelectedItem();
01170                 }
01171             }
01172             catch (Exception ex)
01173             {
01174                 txtExceptionReport.Text = ex.ToString();
01175                 AppendEventMessage(ex.ToString());
01176             }
01177         }
01178
01179         private void BtnReplaceSelectorBarItem_Click(object sender, RoutedEventArgs e)
01180         {
01181             try
01182             {
01183                 if (selectorBar != null && txtSelectorBarItemIndex != null)
01184                 {
01185                     selectorBar.Items[int.Parse(txtSelectorBarItemIndex.Text)] = GetSelectorBarItem();
01186                     PopulateCmbSelectorBarSelectedItem();
01187                 }
01188             }
01189             catch (Exception ex)
01190             {
01191                 txtExceptionReport.Text = ex.ToString();
01192                 AppendEventMessage(ex.ToString());
01193             }
01194         }
01195
01196         private void BtnInsertSelectorBarItem_Click(object sender, RoutedEventArgs e)
01197         {
01198             try
01199             {
01200                 if (selectorBar != null && txtSelectorBarItemIndex != null)
01201                 {
01202                     selectorBar.Items.Insert(int.Parse(txtSelectorBarItemIndex.Text), GetSelectorBarItem());
01203                     PopulateCmbSelectorBarSelectedItem();
01204                 }
01205             }
01206             catch (Exception ex)
01207             {
01208                 txtExceptionReport.Text = ex.ToString();
01209                 AppendEventMessage(ex.ToString());
01210             }
01211         }
01212
01213         private void BtnRemoveSelectorBarItem_Click(object sender, RoutedEventArgs e)
01214         {
01215             try
01216             {
01217                 if (selectorBar != null && txtSelectorBarItemIndex != null)
01218                 {
01219                     selectorBar.Items.RemoveAt(int.Parse(txtSelectorBarItemIndex.Text));
01220                     PopulateCmbSelectorBarSelectedItem();
01221                 }
01222             }
01223             catch (Exception ex)
01224             {
01225                 txtExceptionReport.Text = ex.ToString();
01226                 AppendEventMessage(ex.ToString());
01227             }
01228         }
01229
01230 #endregion
01231
01232         private void ChkSelectorBarProperties_Checked(object sender, RoutedEventArgs e)
01233         {
01234             if (svSelectorBarProperties != null)
01235                 svSelectorBarProperties.Visibility = Visibility.Visible;
01236         }
01237
01238         private void ChkSelectorBarProperties_Unchecked(object sender, RoutedEventArgs e)
01239         {
01240             if (svSelectorBarProperties != null)
01241                 svSelectorBarProperties.Visibility = Visibility.Collapsed;
01242         }
01243
01244         private void ChkSelectorBarItems_Checked(object sender, RoutedEventArgs e)
01245         {
01246             if (svSelectorBarItems != null)
01247                 svSelectorBarItems.Visibility = Visibility.Visible;
01248         }
01249
01250         private void ChkSelectorBarItems_Unchecked(object sender, RoutedEventArgs e)
01251         {
01252             if (svSelectorBarItems != null)
01253                 svSelectorBarItems.Visibility = Visibility.Collapsed;
01254         }
01255
01256         private void ChkLogs_Checked(object sender, RoutedEventArgs e)
01257         {
01258             if (grdLogs != null)
01259                 grdLogs.Visibility = Visibility.Visible;
01260         }
01261
01262         private void ChkLogs_Unchecked(object sender, RoutedEventArgs e)
01263         {
01264             if (grdLogs != null)
01265                 grdLogs.Visibility = Visibility.Collapsed;
01266         }
01267
01268         private void BtnGetFullLog_Click(object sender, RoutedEventArgs e)
01269         {
01270             GetFullLog();
01271         }
01272
01273         private void BtnClearFullLog_Click(object sender, RoutedEventArgs e)
01274         {
01275             ClearFullLog();
01276         }
01277
01278         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
01279         {
01280             lstLogs.Items.Clear();
01281         }
01282
01283         private void BtnCopyEvents_Click(object sender, RoutedEventArgs e)
01284         {
01285             string logs = string.Empty;
01286
01287             foreach (object log in lstLogs.Items)
01288             {
01289                 logs += log.ToString() + "\n";
01290             }
01291
01292             var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
01293             dataPackage.SetText(logs);
01294             Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
01295         }
01296
01297         private void ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs e)
01298         {
01299             if (selectorBar != null)
01300             {
01301                 ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);
01302
01303                 if (itemsView != null)
01304                 {
01305                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
01306
01307                     if (itemsRepeater != null)
01308                     {
01309                         HookItemsRepeaterEvents(itemsRepeater);
01310                     }
01311                 }
01312             }
01313         }
01314
01315         private void ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs e)
01316         {
01317             if (selectorBar != null)
01318             {
01319                 ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);
01320
01321                 if (itemsView != null)
01322                 {
01323                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
01324
01325                     if (itemsRepeater != null)
01326                     {
01327                         UnhookItemsRepeaterEvents(itemsRepeater);
01328                     }
01329                 }
01330             }
01331         }
01332
01333         private void ChkLogItemsViewEvents_Checked(object sender, RoutedEventArgs e)
01334         {
01335             if (selectorBar != null)
01336             {
01337                 ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);
01338
01339                 if (itemsView != null)
01340                 {
01341                     HookItemsViewEvents(itemsView);
01342                 }
01343             }
01344         }
01345
01346         private void ChkLogItemsViewEvents_Unchecked(object sender, RoutedEventArgs e)
01347         {
01348             if (selectorBar != null)
01349             {
01350                 ItemsView itemsView = SelectorBarTestHooks.GetItemsViewPart(selectorBar);
01351
01352                 if (itemsView != null)
01353                 {
01354                     UnhookItemsViewEvents(itemsView);
01355                 }
01356             }
01357         }
01358
01359         private void ChkLogSelectorBarEvents_Checked(object sender, RoutedEventArgs e)
01360         {
01361             HookSelectorBarEvents();
01362         }
01363
01364         private void ChkLogSelectorBarEvents_Unchecked(object sender, RoutedEventArgs e)
01365         {
01366             UnhookSelectorBarEvents();
01367         }
01368
01369         private void ChkLogItemContainerMessages_Checked(object sender, RoutedEventArgs e)
01370         {
01371             MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01372             if (chkLogSelectorBarMessages != null && chkLogSelectorBarMessages.IsChecked == false &&
01373                 chkLogItemsViewMessages != null && chkLogItemsViewMessages.IsChecked == false &&
01374                 chkLogItemsRepeaterMessages != null && chkLogItemsRepeaterMessages.IsChecked == false)
01375                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01376         }
01377
01378         private void ChkLogItemContainerMessages_Unchecked(object sender, RoutedEventArgs e)
01379         {
01380             MUXControlsTestHooks.SetLoggingLevelForType("ItemContainer", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01381             if (chkLogSelectorBarMessages.IsChecked == false &&
01382                 chkLogItemsViewMessages.IsChecked == false &&
01383                 chkLogItemsRepeaterMessages.IsChecked == false)
01384                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01385         }
01386
01387         private void ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e)
01388         {
01389             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01390             if (chkLogSelectorBarMessages != null && chkLogSelectorBarMessages.IsChecked == false &&
01391                 chkLogItemsViewMessages != null && chkLogItemsViewMessages.IsChecked == false &&
01392                 chkLogItemContainerMessages != null && chkLogItemContainerMessages.IsChecked == false)
01393                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01394         }
01395
01396         private void ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e)
01397         {
01398             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01399             if (chkLogSelectorBarMessages.IsChecked == false &&
01400                 chkLogItemsViewMessages.IsChecked == false &&
01401                 chkLogItemContainerMessages.IsChecked == false)
01402                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01403         }
01404
01405         private void ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs e)
01406         {
01407             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01408             if (chkLogSelectorBarMessages != null && chkLogSelectorBarMessages.IsChecked == false &&
01409                 chkLogItemsRepeaterMessages != null && chkLogItemsRepeaterMessages.IsChecked == false &&
01410                 chkLogItemContainerMessages != null && chkLogItemContainerMessages.IsChecked == false)
01411                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01412         }
01413
01414         private void ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs e)
01415         {
01416             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01417             if (chkLogSelectorBarMessages.IsChecked == false &&
01418                 chkLogItemsRepeaterMessages.IsChecked == false &&
01419                 chkLogItemContainerMessages.IsChecked == false)
01420                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01421         }
01422
01423         private void ChkLogSelectorBarMessages_Checked(object sender, RoutedEventArgs e)
01424         {
01425             MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01426             if (chkLogItemsViewMessages != null && chkLogItemsViewMessages.IsChecked == false &&
01427                 chkLogItemsRepeaterMessages != null && chkLogItemsRepeaterMessages.IsChecked == false &&
01428                 chkLogItemContainerMessages != null && chkLogItemContainerMessages.IsChecked == false)
01429                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01430         }
01431
01432         private void ChkLogSelectorBarMessages_Unchecked(object sender, RoutedEventArgs e)
01433         {
01434             MUXControlsTestHooks.SetLoggingLevelForType("SelectorBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01435             if (chkLogItemsViewMessages.IsChecked == false &&
01436                 chkLogItemsRepeaterMessages.IsChecked == false &&
01437                 chkLogItemContainerMessages.IsChecked == false)
01438                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01439         }
01440
01441         private void HookItemsRepeaterEvents(ItemsRepeater itemsRepeater)
01442         {
01443             if (itemsRepeater != null)
01444             {
01445                 itemsRepeater.Loaded += ItemsRepeater_Loaded;
01446                 itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
01447                 itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
01448             }
01449         }
01450
01451         private void UnhookItemsRepeaterEvents(ItemsRepeater itemsRepeater)
01452         {
01453             if (itemsRepeater != null)
01454             {
01455                 itemsRepeater.Loaded -= ItemsRepeater_Loaded;
01456                 itemsRepeater.ElementPrepared -= ItemsRepeater_ElementPrepared;
01457                 itemsRepeater.ElementClearing -= ItemsRepeater_ElementClearing;
01458             }
01459         }
01460
01461         private void HookItemsViewEvents(ItemsView itemsView)
01462         {
01463             if (itemsView != null)
01464             {
01465                 itemsView.ItemInvoked += ItemsView_ItemInvoked;
01466                 itemsView.GettingFocus += ItemsView_GettingFocus;
01467                 itemsView.GotFocus += ItemsView_GotFocus;
01468                 itemsView.LosingFocus += ItemsView_LosingFocus;
01469                 itemsView.LostFocus += ItemsView_LostFocus;
01470                 itemsView.Loaded += ItemsView_Loaded;
01471                 itemsView.SelectionChanged += ItemsView_SelectionChanged;
01472             }
01473         }
01474
01475         private void UnhookItemsViewEvents(ItemsView itemsView)
01476         {
01477             if (itemsView != null)
01478             {
01479                 itemsView.ItemInvoked -= ItemsView_ItemInvoked;
01480                 itemsView.GettingFocus -= ItemsView_GettingFocus;
01481                 itemsView.GotFocus -= ItemsView_GotFocus;
01482                 itemsView.LosingFocus -= ItemsView_LosingFocus;
01483                 itemsView.LostFocus -= ItemsView_LostFocus;
01484                 itemsView.Loaded -= ItemsView_Loaded;
01485                 itemsView.SelectionChanged -= ItemsView_SelectionChanged;
01486             }
01487         }
01488
01489         private void HookSelectorBarEvents()
01490         {
01491             if (selectorBar != null)
01492             {
01493                 selectorBar.Loaded += SelectorBar_Loaded;
01494                 selectorBar.SelectionChanged += SelectorBar_SelectionChanged;
01495             }
01496         }
01497
01498         private void UnhookSelectorBarEvents()
01499         {
01500             if (selectorBar != null)
01501             {
01502                 selectorBar.Loaded -= SelectorBar_Loaded;
01503                 selectorBar.SelectionChanged -= SelectorBar_SelectionChanged;
01504             }
01505         }
01506
01507         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
01508         {
01509             // Cut off the terminating new line.
01510             string msg = args.Message.Substring(0, args.Message.Length - 1);
01511             string eventMessage;
01512             string senderName = string.Empty;
01513
01514             try
01515             {
01516                 FrameworkElement fe = sender as FrameworkElement;
01517
01518                 if (fe != null)
01519                 {
01520                     senderName = "s:" + fe.Name + ", ";
01521                 }
01522             }
01523             catch
01524             {
01525             }
01526
01527             if (args.IsVerboseLevel)
01528             {
01529                 eventMessage = "Verbose: " + senderName + "m:" + msg;
01530             }
01531             else
01532             {
01533                 eventMessage = "Info: " + senderName + "m:" + msg;
01534             }
01535
01536             AppendEventMessage(eventMessage);
01537         }
01538
01539         private void AppendEventMessage(string eventMessage)
01540         {
01541             while (eventMessage.Length > 0)
01542             {
01543                 string msgHead = eventMessage;
01544
01545                 if (eventMessage.Length > 110)
01546                 {
01547                     int commaIndex = eventMessage.IndexOf(',', 110);
01548                     if (commaIndex != -1)
01549                     {
01550                         msgHead = eventMessage.Substring(0, commaIndex);
01551                         eventMessage = eventMessage.Substring(commaIndex + 1);
01552                     }
01553                     else
01554                     {
01555                         eventMessage = string.Empty;
01556                     }
01557                 }
01558                 else
01559                 {
01560                     eventMessage = string.Empty;
01561                 }
01562
01563                 lstLogs.Items.Add(msgHead);
01564                 _fullLogs.Add(msgHead);
01565
01566                 if ((bool)chkOutputDebugString.IsChecked)
01567                 {
01568                     System.Diagnostics.Debug.WriteLine(msgHead);
01569                 }
01570             }
01571         }
01572
01573         private void GetFullLog()
01574         {
01575             this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
01576             chkLogCleared.IsChecked = false;
01577             foreach (string log in _fullLogs)
01578             {
01579                 this.cmbFullLog.Items.Add(log);
01580             }
01581             chkLogUpdated.IsChecked = true;
01582             this.txtStatus.Text = "GetFullLog. Done.";
01583         }
01584
01585         private void ClearFullLog()
01586         {
01587             this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
01588             chkLogUpdated.IsChecked = false;
01589             _fullLogs.Clear();
01590             this.cmbFullLog.Items.Clear();
01591             chkLogCleared.IsChecked = true;
01592             this.txtStatus.Text = "ClearFullLog. Done.";
01593         }
01594
01595         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
01596         {
01597             txtExceptionReport.Text = string.Empty;
01598         }
01599
01600         private Thickness GetThicknessFromString(string thickness)
01601         {
01602             string[] lengths = thickness.Split(',');
01603             if (lengths.Length < 4)
01604                 return new Thickness(
01605                     Convert.ToDouble(lengths[0]));
01606             else
01607                 return new Thickness(
01608                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
01609         }
01610
01611         private CornerRadius GetCornerRadiusFromString(string cornerRadius)
01612         {
01613             string[] lengths = cornerRadius.Split(',');
01614             if (lengths.Length < 4)
01615                 return new CornerRadius(
01616                     Convert.ToDouble(lengths[0]));
01617             else
01618                 return new CornerRadius(
01619                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
01620         }
01621
01622         private IconElement GetIconElementFromString(string icon)
01623         {
01624             switch (icon)
01625             {
01626                 case "Cut":
01627                     return new SymbolIcon(Symbol.Cut);
01628                 case "Copy":
01629                     return new SymbolIcon(Symbol.Copy);
01630                 case "Paste":
01631                     return new SymbolIcon(Symbol.Paste);
01632                 case "Bold":
01633                     return new SymbolIcon(Symbol.Bold);
01634                 case "Italic":
01635                     return new SymbolIcon(Symbol.Italic);
01636                 case "Underline":
01637                     return new SymbolIcon(Symbol.Underline);
01638             }
01639
01640             return null;
01641         }
01642
01643         private string GetStringFromIconElement(IconElement iconElement)
01644         {
01645             SymbolIcon symbolIcon = iconElement as SymbolIcon;
01646
01647             if (symbolIcon == null)
01648             {
01649                 return "null";
01650             }
01651
01652             return symbolIcon.Symbol.ToString();
01653         }
01654
01655         private string GetStringFromChild(SelectorBarItem selectorBarItem)
01656         {
01657             if (selectorBarItem == null || selectorBarItem.Child == null)
01658             {
01659                 return "null";
01660             }
01661
01662             if (selectorBarItem.Child is TextBlock)
01663             {
01664                 return (selectorBarItem.Child as TextBlock).Text;
01665             }
01666             else
01667             {
01668                 return (selectorBarItem.Child as TextBox).Text;
01669             }
01670         }
01671
01672         private string GetStringFromSelectorBarItem(SelectorBarItem selectorBarItem)
01673         {
01674             return "Icon:" + GetStringFromIconElement(selectorBarItem.Icon) + ", Text:" + selectorBarItem.Text + ", Child:" + GetStringFromChild(selectorBarItem);
01675         }
01676
01677         private Symbol GetSymbolFromInt(int symbolIndex)
01678         {
01679             switch (symbolIndex)
01680             {
01681                 case 1:
01682                     return Symbol.Cut;
01683                 case 2:
01684                     return Symbol.Copy;
01685                 case 3:
01686                     return Symbol.Paste;
01687                 case 4:
01688                     return Symbol.Bold;
01689                 case 5:
01690                     return Symbol.Italic;
01691                 default:
01692                     return Symbol.Underline;
01693             }
01694         }
01695
01696         private int GetIntFromSymbol(Symbol symbol)
01697         {
01698             switch (symbol)
01699             {
01700                 case Symbol.Cut:
01701                     return 1;
01702                 case Symbol.Copy:
01703                     return 2;
01704                 case Symbol.Paste:
01705                     return 3;
01706                 case Symbol.Bold:
01707                     return 4;
01708                 case Symbol.Italic:
01709                     return 5;
01710                 case Symbol.Underline:
01711                     return 6;
01712                 default:
01713                     return -1;
01714             }
01715         }
01716
01717         private SelectorBarItem GetSelectorBarItem()
01718         {
01719             SelectorBarItem selectorBarItem = new SelectorBarItem();
01720
01721             if (txtSelectorBarItemText != null)
01722             {
01723                 selectorBarItem.Text = txtSelectorBarItemText.Text;
01724             }
01725
01726             if (cmbSelectorBarItemIcon != null && cmbSelectorBarItemIcon.SelectedIndex > 0)
01727             {
01728                 selectorBarItem.Icon = new SymbolIcon(GetSymbolFromInt(cmbSelectorBarItemIcon.SelectedIndex));
01729             }
01730
01731             if (cmbSelectorBarItemChild != null && cmbSelectorBarItemChild.SelectedIndex > 0)
01732             {
01733                 selectorBarItem.Child = cmbSelectorBarItemChild.SelectedIndex == 1 ? GetTextBlockChild() : GetTextBoxChild();
01734             }
01735
01736             return selectorBarItem;
01737         }
01738
01739         private TextBlock GetTextBlockChild()
01740         {
01741             TextBlock textBlock = new TextBlock()
01742             {
01743                 Text = "TextBlock",
01744                 VerticalAlignment = VerticalAlignment.Center
01745             };
01746
01747             return textBlock;
01748         }
01749
01750         private TextBox GetTextBoxChild()
01751         {
01752             TextBox textBox = new TextBox()
01753             {
01754                 Text = "TextBox",
01755                 VerticalAlignment = VerticalAlignment.Center
01756             };
01757
01758             return textBox;
01759         }
01760
01761         private Brush GetForeground()
01762         {
01763             switch (cmbSelectorBarItemForeground.SelectedIndex)
01764             {
01765                 case -1:
01766                 case 0:
01767                     return null;
01768                 case 1:
01769                     return new SolidColorBrush(Colors.Black);
01770                 case 2:
01771                     return new SolidColorBrush(Colors.Red);
01772                 default:
01773                     return new SolidColorBrush(Colors.Green);
01774             }
01775         }
01776     }
01777 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

HashMap< K, V > Member List

This is the complete list of members for HashMap< K, V >, including all inherited members.
abi_enter() | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
Begin() const | HashMap< K, V > | [inline]
CheckThread() | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
Clear() | HashMap< K, V > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< HashMap< K, V > > &&self) noexcept | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline, static]
End() const | HashMap< K, V > | [inline]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
final_release(std::unique_ptr< HashMap< K, V > > &&self) | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline, static]
FindKey(K const &key) | HashMap< K, V > | [inline, private]
First() | HashMap< K, V > | [inline]
GetBase() | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
GetInner() | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
GetMutationCount() const | HashMap< K, V > | [inline]
GetView() | HashMap< K, V > | [inline]
HasKey(K const &key) | HashMap< K, V > | [inline]
Insert(K const &key, V const &value) | HashMap< K, V > | [inline]
IsOnThread() | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
KVP typedef | HashMap< K, V > | [private]
Lookup(K const &key) | HashMap< K, V > | [inline]
m_map | HashMap< K, V > | [private]
m_mutationCount | HashMap< K, V > | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< HashMap< K, V >, reference_tracker_implements_t< winrt::IMap< K, V > >::type, winrt::IMapView< K, V >, winrt::IIterable< winrt::IKeyValuePair< K, V > > > | [inline]
Remove(K const &key) | HashMap< K, V > | [inline]
Size() | HashMap< K, V > | [inline]
Split(winrt::IMapView< K, V > &firstPartition, winrt::IMapView< K, V > &secondPartition) | HashMap< K, V > | [inline]
T_iterator typedef | HashMap< K, V > | [private]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewProperties Member List

This is the complete list of members for ScrollViewProperties, including all inherited members.
AnchorRequested(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs > const &value) | ScrollViewProperties |
AnchorRequested(winrt::event_token const &token) | ScrollViewProperties |
BringingIntoView(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs > const &value) | ScrollViewProperties |
BringingIntoView(winrt::event_token const &token) | ScrollViewProperties |
ClearProperties() | ScrollViewProperties | [static]
ComputedHorizontalScrollBarVisibility(winrt::Visibility const &value) | ScrollViewProperties |
ComputedHorizontalScrollBarVisibility() | ScrollViewProperties |
ComputedHorizontalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
ComputedHorizontalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
ComputedHorizontalScrollMode() | ScrollViewProperties |
ComputedHorizontalScrollModeProperty() | ScrollViewProperties | [inline, static]
ComputedVerticalScrollBarVisibility(winrt::Visibility const &value) | ScrollViewProperties |
ComputedVerticalScrollBarVisibility() | ScrollViewProperties |
ComputedVerticalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
ComputedVerticalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
ComputedVerticalScrollMode() | ScrollViewProperties |
ComputedVerticalScrollModeProperty() | ScrollViewProperties | [inline, static]
Content(winrt::UIElement const &value) | ScrollViewProperties |
Content() | ScrollViewProperties |
ContentOrientation(winrt::ScrollingContentOrientation const &value) | ScrollViewProperties |
ContentOrientation() | ScrollViewProperties |
ContentOrientationProperty() | ScrollViewProperties | [inline, static]
ContentProperty() | ScrollViewProperties | [inline, static]
EnsureProperties() | ScrollViewProperties | [static]
ExtentChanged(winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value) | ScrollViewProperties |
ExtentChanged(winrt::event_token const &token) | ScrollViewProperties |
HorizontalAnchorRatio(double value) | ScrollViewProperties |
HorizontalAnchorRatio() | ScrollViewProperties |
HorizontalAnchorRatioProperty() | ScrollViewProperties | [inline, static]
HorizontalScrollBarVisibility(winrt::ScrollingScrollBarVisibility const &value) | ScrollViewProperties |
HorizontalScrollBarVisibility() | ScrollViewProperties |
HorizontalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
HorizontalScrollChainMode(winrt::ScrollingChainMode const &value) | ScrollViewProperties |
HorizontalScrollChainMode() | ScrollViewProperties |
HorizontalScrollChainModeProperty() | ScrollViewProperties | [inline, static]
HorizontalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
HorizontalScrollMode() | ScrollViewProperties |
HorizontalScrollModeProperty() | ScrollViewProperties | [inline, static]
HorizontalScrollRailMode(winrt::ScrollingRailMode const &value) | ScrollViewProperties |
HorizontalScrollRailMode() | ScrollViewProperties |
HorizontalScrollRailModeProperty() | ScrollViewProperties | [inline, static]
IgnoredInputKinds(winrt::ScrollingInputKinds const &value) | ScrollViewProperties |
IgnoredInputKinds() | ScrollViewProperties |
IgnoredInputKindsProperty() | ScrollViewProperties | [inline, static]
m_anchorRequestedEventSource | ScrollViewProperties |
m_bringingIntoViewEventSource | ScrollViewProperties |
m_extentChangedEventSource | ScrollViewProperties |
m_scrollAnimationStartingEventSource | ScrollViewProperties |
m_scrollCompletedEventSource | ScrollViewProperties |
m_scrollStartingEventSource | ScrollViewProperties |
m_stateChangedEventSource | ScrollViewProperties |
m_viewChangedEventSource | ScrollViewProperties |
m_zoomAnimationStartingEventSource | ScrollViewProperties |
m_zoomCompletedEventSource | ScrollViewProperties |
m_zoomStartingEventSource | ScrollViewProperties |
MaxZoomFactor(double value) | ScrollViewProperties |
MaxZoomFactor() | ScrollViewProperties |
MaxZoomFactorProperty() | ScrollViewProperties | [inline, static]
MinZoomFactor(double value) | ScrollViewProperties |
MinZoomFactor() | ScrollViewProperties |
MinZoomFactorProperty() | ScrollViewProperties | [inline, static]
OnComputedHorizontalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnComputedHorizontalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnComputedVerticalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnComputedVerticalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnContentOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalAnchorRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollRailModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnIgnoredInputKindsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnMaxZoomFactorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnMinZoomFactorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnScrollPresenterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalAnchorRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollRailModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnZoomChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnZoomModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
s_ComputedHorizontalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_ComputedHorizontalScrollModeProperty | ScrollViewProperties | [static]
s_ComputedVerticalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_ComputedVerticalScrollModeProperty | ScrollViewProperties | [static]
s_ContentOrientationProperty | ScrollViewProperties | [static]
s_ContentProperty | ScrollViewProperties | [static]
s_HorizontalAnchorRatioProperty | ScrollViewProperties | [static]
s_HorizontalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_HorizontalScrollChainModeProperty | ScrollViewProperties | [static]
s_HorizontalScrollModeProperty | ScrollViewProperties | [static]
s_HorizontalScrollRailModeProperty | ScrollViewProperties | [static]
s_IgnoredInputKindsProperty | ScrollViewProperties | [static]
s_MaxZoomFactorProperty | ScrollViewProperties | [static]
s_MinZoomFactorProperty | ScrollViewProperties | [static]
s_ScrollPresenterProperty | ScrollViewProperties | [static]
s_VerticalAnchorRatioProperty | ScrollViewProperties | [static]
s_VerticalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_VerticalScrollChainModeProperty | ScrollViewProperties | [static]
s_VerticalScrollModeProperty | ScrollViewProperties | [static]
s_VerticalScrollRailModeProperty | ScrollViewProperties | [static]
s_ZoomChainModeProperty | ScrollViewProperties | [static]
s_ZoomModeProperty | ScrollViewProperties | [static]
ScrollAnimationStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs > const &value) | ScrollViewProperties |
ScrollAnimationStarting(winrt::event_token const &token) | ScrollViewProperties |
ScrollCompleted(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs > const &value) | ScrollViewProperties |
ScrollCompleted(winrt::event_token const &token) | ScrollViewProperties |
ScrollPresenter(winrt::ScrollPresenter const &value) | ScrollViewProperties |
ScrollPresenter() | ScrollViewProperties |
ScrollPresenterProperty() | ScrollViewProperties | [inline, static]
ScrollStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs > const &value) | ScrollViewProperties |
ScrollStarting(winrt::event_token const &token) | ScrollViewProperties |
ScrollViewProperties() | ScrollViewProperties |
StateChanged(winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value) | ScrollViewProperties |
StateChanged(winrt::event_token const &token) | ScrollViewProperties |
VerticalAnchorRatio(double value) | ScrollViewProperties |
VerticalAnchorRatio() | ScrollViewProperties |
VerticalAnchorRatioProperty() | ScrollViewProperties | [inline, static]
VerticalScrollBarVisibility(winrt::ScrollingScrollBarVisibility const &value) | ScrollViewProperties |
VerticalScrollBarVisibility() | ScrollViewProperties |
VerticalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
VerticalScrollChainMode(winrt::ScrollingChainMode const &value) | ScrollViewProperties |
VerticalScrollChainMode() | ScrollViewProperties |
VerticalScrollChainModeProperty() | ScrollViewProperties | [inline, static]
VerticalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
VerticalScrollMode() | ScrollViewProperties |
VerticalScrollModeProperty() | ScrollViewProperties | [inline, static]
VerticalScrollRailMode(winrt::ScrollingRailMode const &value) | ScrollViewProperties |
VerticalScrollRailMode() | ScrollViewProperties |
VerticalScrollRailModeProperty() | ScrollViewProperties | [inline, static]
ViewChanged(winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value) | ScrollViewProperties |
ViewChanged(winrt::event_token const &token) | ScrollViewProperties |
ZoomAnimationStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs > const &value) | ScrollViewProperties |
ZoomAnimationStarting(winrt::event_token const &token) | ScrollViewProperties |
ZoomChainMode(winrt::ScrollingChainMode const &value) | ScrollViewProperties |
ZoomChainMode() | ScrollViewProperties |
ZoomChainModeProperty() | ScrollViewProperties | [inline, static]
ZoomCompleted(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs > const &value) | ScrollViewProperties |
ZoomCompleted(winrt::event_token const &token) | ScrollViewProperties |
ZoomMode(winrt::ScrollingZoomMode const &value) | ScrollViewProperties |
ZoomMode() | ScrollViewProperties |
ZoomModeProperty() | ScrollViewProperties | [inline, static]
ZoomStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs > const &value) | ScrollViewProperties |
ZoomStarting(winrt::event_token const &token) | ScrollViewProperties |
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/APITests/ProgressBarTests.cs Source File

  • File List
  • File Members
  • ProgressBar
  • APITests

ProgressBarTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Controls;
00006 using MUXControlsTestApp.Utilities;
00007 using Microsoft.UI.Xaml.Automation.Peers;
00008 using Microsoft.UI.Xaml.Automation.Provider;
00009 using Microsoft.UI.Xaml.Automation.Peers;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Automation;
00012 using Microsoft.UI.Xaml.Shapes;
00013 using Microsoft.UI.Xaml.Markup;
00014 using Microsoft.UI.Xaml.Controls;
00015 using WEX.TestExecution;
00016 using WEX.TestExecution.Markup;
00017 using WEX.Logging.Interop;
00018
00019 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00020 {
00021     [TestClass]
00022     public class ProgressBarTests : ApiTestBase
00023     {
00024         [TestMethod]
00025         public void ResourceOverridablity()
00026         {
00027             RunOnUIThread.Execute(() =>
00028             {
00029                 var root = (StackPanel)XamlReader.Load(
00030     @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00031                              xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00032                              xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'
00033                              xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
00034                              <Grid>
00035                                 <Grid.Resources>
00036                                     <x:Double x:Key='ProgressBarTrackHeight'>3</x:Double>
00037                                 </Grid.Resources>
00038                                 <controls:ProgressBar/>
00039                             </Grid>
00040                             <controls:ProgressBar/>
00041                        </StackPanel>");
00042
00043                 Content = root;
00044                 Content.UpdateLayout();
00045
00046                 var grid = VisualTreeHelper.GetChild(root, 0);
00047                 var progressBar1 = VisualTreeHelper.GetChild(grid, 0);
00048                 var templateRoot1 = VisualTreeHelper.GetChild(progressBar1, 0);
00049                 var Border11 = VisualTreeHelper.GetChild(templateRoot1, 0);
00050                 var Border12 = VisualTreeHelper.GetChild(Border11, 0);
00051                 var grid1 = VisualTreeHelper.GetChild(Border12, 0);
00052                 var rect1 = VisualTreeHelper.GetChild(grid1, 0) as Rectangle;
00053                 Verify.AreEqual(3, rect1.Height);
00054
00055                 var progressBar2 = VisualTreeHelper.GetChild(root, 1);
00056                 var templateRoot2 = VisualTreeHelper.GetChild(progressBar2, 0);
00057                 var Border21 = VisualTreeHelper.GetChild(templateRoot2, 0);
00058                 var Border22 = VisualTreeHelper.GetChild(Border21, 0);
00059                 var grid2 = VisualTreeHelper.GetChild(Border22, 0);
00060                 var rect2 = VisualTreeHelper.GetChild(grid2, 0) as Rectangle;
00061                 Verify.AreEqual(1, rect2.Height);
00062             });
00063         }
00064     }
00065 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockAnimatedIconSource Member List

This is the complete list of members for MockAnimatedIconSource, including all inherited members.
markers | MockAnimatedIconSource | [private]
Markers | MockAnimatedIconSource |
MockAnimatedIconSource() | MockAnimatedIconSource | [inline]
SetColorProperty(string propertyName, Color value) | MockAnimatedIconSource | [inline]
TryCreateAnimatedVisual(Compositor compositor) | MockAnimatedIconSource | [inline]
visual | MockAnimatedIconSource | [private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementClearingEventArgs.cpp Source File

  • File List
  • File Members
  • Repeater

ItemsRepeaterElementClearingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsRepeater.common.h"
00007 #include "ItemsRepeaterElementClearingEventArgs.h"
00008
00009 ItemsRepeaterElementClearingEventArgs::ItemsRepeaterElementClearingEventArgs(const winrt::UIElement& element)
00010 {
00011     Update(element);
00012 }
00013
00014 #pragma region IElementClearingEventArgs
00015
00016 winrt::UIElement ItemsRepeaterElementClearingEventArgs::Element()
00017 {
00018     return m_element.get();
00019 }
00020
00021 #pragma endregion
00022
00023 void ItemsRepeaterElementClearingEventArgs::Update(const winrt::UIElement& element)
00024 {
00025     m_element.set(element);
00026 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutPanelLayoutContext Member List

This is the complete list of members for LayoutPanelLayoutContext, including all inherited members.
ChildrenCore() | LayoutPanelLayoutContext |
GetOwner() | LayoutPanelLayoutContext | [private]
LayoutPanelLayoutContext(winrt::LayoutPanel const &owner) | LayoutPanelLayoutContext |
LayoutStateCore() | LayoutPanelLayoutContext |
LayoutStateCore(winrt::IInspectable const &state) | LayoutPanelLayoutContext |
m_owner | LayoutPanelLayoutContext | [private]
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipInXamlPage Member List

This is the complete list of members for TeachingTipInXamlPage, including all inherited members.
CloseTeachingTipButton_Click(object sender, RoutedEventArgs e) | TeachingTipInXamlPage | [inline, private]
OpenTeachingTipButton_Click(object sender, RoutedEventArgs e) | TeachingTipInXamlPage | [inline, private]
TeachingTipInXamlPage() | TeachingTipInXamlPage | [inline]
TeachingTipTestHooks_IdleStatusChanged(TeachingTip sender, object args) | TeachingTipInXamlPage | [inline, private]
TeachingTipTestHooks_OpenedStatusChanged(TeachingTip sender, object args) | TeachingTipInXamlPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemSeparator.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemSeparator.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewItemBase.h"
00007 #include "NavigationViewItemSeparator.g.h"
00008
00009 class NavigationViewItemSeparator :
00010     public winrt::implementation::NavigationViewItemSeparatorT<NavigationViewItemSeparator, NavigationViewItemBase>
00011 {
00012 public:
00013     ForwardRefToBaseReferenceTracker(NavigationViewItemBase)
00014
00015     NavigationViewItemSeparator();
00016     void OnApplyTemplate() override;
00017
00018 private:
00019     void OnNavigationViewItemBasePositionChanged() override;
00020     void OnNavigationViewItemBaseDepthChanged() override;
00021     void UpdateVisualState(bool useTransitions);
00022     void UpdateItemIndentation();
00023
00024     void OnSplitViewPropertyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& /*args*/);
00025     void UpdateIsClosedCompact(bool updateVisualState);
00026
00027     bool m_appliedTemplate{ false };
00028     bool m_isClosedCompact{ false };
00029
00030     tracker_ref<winrt::Grid> m_rootGrid{ this };
00031
00032     PropertyChanged_revoker m_splitViewIsPaneOpenChangedRevoker{};
00033     PropertyChanged_revoker m_splitViewDisplayModeChangedRevoker{};
00034 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTabTearOutWindowRequestedEventArgs Member List

This is the complete list of members for TabViewTabTearOutWindowRequestedEventArgs, including all inherited members.
Items() const | TabViewTabTearOutWindowRequestedEventArgs | [inline]
m_items | TabViewTabTearOutWindowRequestedEventArgs | [private]
m_tabs | TabViewTabTearOutWindowRequestedEventArgs | [private]
NewWindowId() const | TabViewTabTearOutWindowRequestedEventArgs | [inline]
NewWindowId(winrt::Microsoft::UI::WindowId const &value) | TabViewTabTearOutWindowRequestedEventArgs | [inline]
Tabs() const | TabViewTabTearOutWindowRequestedEventArgs | [inline]
TabViewTabTearOutWindowRequestedEventArgs(winrt::IInspectable const &item, winrt::UIElement const &tab) | TabViewTabTearOutWindowRequestedEventArgs |
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/TestUI/DropDownButtonPage.xaml.cs Source File

  • File List
  • File Members
  • DropDownButton
  • TestUI

DropDownButtonPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012
00013 namespace MUXControlsTestApp
00014 {
00015
00016     [TopLevelTestPage(Name = "DropDownButton", Icon = "DropDownButton.png")]
00017     public sealed partial class DropDownButtonPage : TestPage
00018     {
00019         private int _clickCount = 0;
00020         private int _flyoutOpenedCount = 0;
00021         private int _flyoutClosedCount = 0;
00022
00023         private Flyout _flyout;
00024
00025         public DropDownButtonPage()
00026         {
00027             this.InitializeComponent();
00028
00029             _flyout = new Flyout();
00030             _flyout.Placement = FlyoutPlacementMode.Bottom;
00031             TextBlock textBlock = new TextBlock();
00032             textBlock.Text = "New Flyout";
00033             _flyout.Content = textBlock;
00034             _flyout.Opened += TestDropDownButtonFlyout_Opened;
00035             _flyout.Closed += TestDropDownButtonFlyout_Closed;
00036         }
00037
00038         private void TestDropDownButton_Click(object sender, object e)
00039         {
00040             ClickCountTextBlock.Text = (++_clickCount).ToString();
00041         }
00042
00043         private void TestDropDownButtonFlyout_Opened(object sender, object e)
00044         {
00045             FlyoutOpenedCountTextBlock.Text = (++_flyoutOpenedCount).ToString();
00046         }
00047
00048         private void TestDropDownButtonFlyout_Closed(object sender, object e)
00049         {
00050             FlyoutClosedCountTextBlock.Text = (++_flyoutClosedCount).ToString();
00051         }
00052
00053         private void SetFlyoutCheckbox_Checked(object sender, RoutedEventArgs e)
00054         {
00055             if (TestDropDownButton != null && _flyout != null)
00056             {
00057                 TestDropDownButton.Flyout = _flyout;
00058             }
00059         }
00060
00061         private void SetFlyoutCheckbox_Unchecked(object sender, RoutedEventArgs e)
00062         {
00063             if (TestDropDownButton != null)
00064             {
00065                 TestDropDownButton.Flyout = null;
00066             }
00067         }
00068     }
00069 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedIcon Member List

This is the complete list of members for AnimatedIcon, including all inherited members.
abi_enter() | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
AnimatedIcon() | AnimatedIcon |
AnimatedIconProperties() | AnimatedIconProperties |
AnimatedIconStateProperty() | AnimatedIcon | [inline, static]
ArrangeOverride(winrt::Size const &finalSize) | AnimatedIcon |
CheckThread() | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
ClearProperties() | AnimatedIconProperties | [static]
ConstructVisual() | AnimatedIcon | [private]
DeleteInstanceOnUIThread(std::unique_ptr< AnimatedIcon > &&self) noexcept | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline, static]
EnsureProperties() | AnimatedIconProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
FallbackIconSource(winrt::IconSource const &value) | AnimatedIconProperties |
FallbackIconSource() | AnimatedIconProperties |
FallbackIconSourceProperty() | AnimatedIconProperties | [inline, static]
final_release(std::unique_ptr< AnimatedIcon > &&self) | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline, static]
GetBase() | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
GetInner() | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
GetLastAnimationSegment() | AnimatedIcon |
GetLastAnimationSegmentEnd() | AnimatedIcon |
GetLastAnimationSegmentStart() | AnimatedIcon |
GetState(winrt::DependencyObject const &target) | AnimatedIconProperties | [static]
InsertVisual(winrt::Visual visual) | AnimatedIcon | [private]
IsOnThread() | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
MeasureOverride(winrt::Size const &availableSize) | AnimatedIcon |
MirroredWhenRightToLeft(bool value) | AnimatedIconProperties |
MirroredWhenRightToLeft() | AnimatedIconProperties |
MirroredWhenRightToLeftProperty() | AnimatedIconProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
OnAncestorAnimatedIconStatePropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | AnimatedIcon |
OnAnimatedIconStatePropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args) | AnimatedIcon | [static]
OnAnimationCompleted(winrt::IInspectable const &, winrt::CompositionBatchCompletedEventArgs const &) | AnimatedIcon | [private]
OnApplyTemplate() | AnimatedIcon |
OnFallbackIconSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &) | AnimatedIcon |
AnimatedIconProperties::OnFallbackIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedIconProperties | [static]
OnFlowDirectionPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | AnimatedIcon | [private]
OnForegroundBrushColorPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | AnimatedIcon | [private]
OnForegroundPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | AnimatedIcon | [private]
OnLayoutUpdatedAfterStateChanged(winrt::IInspectable const &sender, winrt::IInspectable const &args) | AnimatedIcon |
OnLoaded(winrt::IInspectable const &, winrt::RoutedEventArgs const &) | AnimatedIcon |
OnMirroredWhenRightToLeftPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &) | AnimatedIcon |
AnimatedIconProperties::OnMirroredWhenRightToLeftPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedIconProperties | [static]
OnSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &) | AnimatedIcon |
AnimatedIconProperties::OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedIconProperties | [static]
OnStatePropertyChanged() | AnimatedIcon |
PlaySegment(float from, float to, const std::function< void()> &cleanupAction=nullptr, float playbackMultiplier=1.0f) | AnimatedIcon | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon > | [inline]
s_FallbackIconSourceProperty | AnimatedIconProperties | [static]
s_MirroredWhenRightToLeftProperty | AnimatedIconProperties | [static]
s_SourceProperty | AnimatedIconProperties | [static]
s_StateProperty | AnimatedIconProperties | [static]
SetAnimationQueueBehavior(winrt::AnimatedIconAnimationQueueBehavior behavior) | AnimatedIcon |
SetDurationMultiplier(float multiplier) | AnimatedIcon |
SetQueueLength(unsigned int length) | AnimatedIcon |
SetRootPanelChildToFallbackIcon() | AnimatedIcon | [private]
SetSpeedUpMultiplier(float multiplier) | AnimatedIcon |
SetState(winrt::DependencyObject const &target, winrt::hstring const &value) | AnimatedIconProperties | [static]
Source(winrt::IAnimatedVisualSource2 const &value) | AnimatedIconProperties |
Source() | AnimatedIconProperties |
SourceProperty() | AnimatedIconProperties | [inline, static]
StateProperty() | AnimatedIconProperties | [inline, static]
TransitionAndUpdateStates(const winrt::hstring &fromState, const winrt::hstring &toState, float playbackMultiplier=1.0f) | AnimatedIcon | [private]
TransitionStates(const winrt::hstring &fromState, const winrt::hstring &toState, const std::function< void()> &cleanupAction, float playtbackMultiplier=1.0f) | AnimatedIcon | [private]
TrySetForegroundProperty(winrt::Color color, winrt::IAnimatedVisualSource2 const &source=nullptr) | AnimatedIcon | [private]
TrySetForegroundProperty(winrt::IAnimatedVisualSource2 const &source=nullptr) | AnimatedIcon | [private]
UpdateMirrorTransform() | AnimatedIcon | [private]
~AnimatedIcon() | AnimatedIcon | [inline]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewInfoBadgeTestPage Member List

This is the complete list of members for NavigationViewInfoBadgeTestPage, including all inherited members.
FlipOrientationButton_Clicked(object sender, RoutedEventArgs e) | NavigationViewInfoBadgeTestPage | [inline, private]
NavigationViewInfoBadgeTestPage() | NavigationViewInfoBadgeTestPage | [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizer.h Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

RefreshVisualizer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RefreshVisualizer.g.h"
00007 #include "RefreshVisualizer.properties.h"
00008
00009 class RefreshVisualizer :
00010     public ReferenceTracker<RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate>,
00011     public RefreshVisualizerProperties
00012 {
00013 public:
00014     RefreshVisualizer();
00015     ~RefreshVisualizer();
00016
00017     // Property changed handler.
00018     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00019
00020     // IFrameworkElementOverrides
00021     void OnApplyTemplate();
00022
00023     // IRefreshVisualizer overrides
00024     void RequestRefresh();
00025
00026     //Private Interface members
00027     winrt::IRefreshInfoProvider InfoProvider();
00028     void InfoProvider(winrt::IRefreshInfoProvider const& value);
00029
00030     void SetInternalPullDirection(winrt::RefreshPullDirection const& value);
00031
00032 private:
00033     //////////////////////////////////////////////////////
00034     ////  OnDependencyPropertyChanged    handlers   //////
00035     //////////////////////////////////////////////////////
00036     void OnRefreshInfoProviderChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00037
00038     void OnOrientationChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00039     void OnOrientationChangedImpl();
00040
00041     void OnStateChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00042
00043     void OnContentChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00044     void OnContentChangedImpl();
00045
00046     ///////////////////////////////////////////////
00047     /////         Internal Methods            /////
00048     ///////////////////////////////////////////////
00049     void UpdateContent();
00050     void ExecuteInteractingAnimations();
00051     void ExecuteScaleUpAnimation();
00052     void ExecuteExecutingRotationAnimation();
00053     void UpdateRefreshState(const winrt::RefreshVisualizerState& newState);
00054     void RaiseRefreshStateChanged(const winrt::RefreshVisualizerState& oldState, const winrt::RefreshVisualizerState& newState);
00055     void RaiseRefreshRequested();
00056     void RefreshCompleted();
00057
00058     ///////////////////////////////////////////////
00059     ///// IRefreshInfoProvider Event Handlers /////
00060     ///////////////////////////////////////////////
00061     void RefreshInfoProvider_InteractingForRefreshChanged(const winrt::IInspectable& sender, const winrt::IInspectable& e);
00062     void RefreshInfoProvider_InteractionRatioChanged(const winrt::IRefreshInfoProvider& sender, const winrt::RefreshInteractionRatioChangedEventArgs& e);
00063
00064     ///////////////////////////////////////////////
00065     ///// Private Dependency Property Setters /////
00066     ///////////////////////////////////////////////
00067     void put_State (const winrt::RefreshVisualizerState& value);
00068
00069     //Helpers
00070     bool IsPullDirectionVertical();
00071     bool IsPullDirectionFar();
00072
00073     //////////////////////////////////////////////////////
00074     ////             DependencyPropertyBackers      //////
00075     //////////////////////////////////////////////////////
00076     winrt::RefreshVisualizerOrientation m_orientation{ winrt::RefreshVisualizerOrientation::Auto };
00077     winrt::RefreshVisualizerState m_state{ winrt::RefreshVisualizerState::Idle };
00078     tracker_ref<winrt::IRefreshInfoProvider> m_refreshInfoProvider{ this };
00079     tracker_ref<winrt::UIElement> m_content{ this };
00080
00081     ///////////////////////////////////////////////
00082     /////////   Event Tokens and Sources   ////////
00083     ///////////////////////////////////////////////
00084     winrt::event_token m_RefreshInfoProvider_InteractingForRefreshChangedToken{};
00085     winrt::event_token m_RefreshInfoProvider_InteractionRatioChangedToken{};
00086
00087     ///////////////////////////////////////////////
00088     /////////   Internal Reference Vars   /////////
00089     ///////////////////////////////////////////////
00090     bool m_isInteractingForRefresh{ false };
00091     double m_executionRatio{ 0.8f };
00092     double m_interactionRatio{ 0.0f };
00093     tracker_ref<winrt::Compositor> m_compositor{ this };
00094     tracker_ref<winrt::Panel> m_containerPanel{ this };
00095     tracker_ref<winrt::Panel> m_root{ this };
00096     float m_startingRotationAngle{ 0.0f };
00097     winrt::RefreshPullDirection m_pullDirection{ winrt::RefreshPullDirection::TopToBottom };
00098 };
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BindableVector< flags, Helper > Member List

This is the complete list of members for BindableVector< flags, Helper >, including all inherited members.
abi_enter() | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
CheckThread() | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > > > &&self) noexcept | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
final_release(std::unique_ptr< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > > > &&self) | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline, static]
GetBase() | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
GetCustomIndexOfFunction | VectorBase< winrt::IInspectable, Helper::isObservable, true, Helper::isDependencyObjectBase, Helper::isNoTrackerRef > | [inline, protected]
GetInner() | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
IsOnThread() | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< VectorBase< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef > >, reference_tracker_implements_t< VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::VectorType >::type, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::IterableType, std::conditional_t< isObservable, VectorOptions< winrt::IInspectable, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef >::ObservableVectorType, void > > | [inline]
SetCustomIndexOfFunction(std::function< bool(winrt::IInspectableconst &value, uint32_t &index)> indexOfFunction) | VectorBase< winrt::IInspectable, Helper::isObservable, true, Helper::isDependencyObjectBase, Helper::isNoTrackerRef > | [inline, protected]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/DropDownButtonAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

DropDownButtonAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "DropDownButtonAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(DropDownButtonAutomationPeer)
00012 }
00013
00014 #include "DropDownButtonAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarItemProperties Member List

This is the complete list of members for SelectorBarItemProperties, including all inherited members.
ClearProperties() | SelectorBarItemProperties | [static]
EnsureProperties() | SelectorBarItemProperties | [static]
Icon(winrt::IconElement const &value) | SelectorBarItemProperties |
Icon() | SelectorBarItemProperties |
IconProperty() | SelectorBarItemProperties | [inline, static]
OnIconPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBarItemProperties | [static]
OnTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBarItemProperties | [static]
s_IconProperty | SelectorBarItemProperties | [static]
s_TextProperty | SelectorBarItemProperties | [static]
SelectorBarItemProperties() | SelectorBarItemProperties |
Text(winrt::hstring const &value) | SelectorBarItemProperties |
Text() | SelectorBarItemProperties |
TextProperty() | SelectorBarItemProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewHelper.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 enum class NavigationViewVisualStateDisplayMode
00007 {
00008     Compact,
00009     Expanded,
00010     Minimal,
00011     MinimalWithBackButton
00012 };
00013
00014 enum class NavigationViewRepeaterPosition
00015 {
00016     LeftNav,
00017     TopPrimary,
00018     TopOverflow,
00019     LeftFooter,
00020     TopFooter
00021 };
00022
00023 enum class NavigationViewPropagateTarget
00024 {
00025     LeftListView,
00026     TopListView,
00027     OverflowListView,
00028     All
00029 };
00030
00031 // Since RS5, a lot of functions in NavigationViewItem is moved to NavigationViewItemPresenter. So they both share some common codes.
00032 // This class helps to initialize and maintain the status of SelectionIndicator and ToolTip
00033 template<typename T>
00034 class NavigationViewItemHelper
00035 {
00036 public:
00037     NavigationViewItemHelper(const ITrackerHandleManager* owner): m_owner(owner)
00038     {
00039     }
00040
00041     winrt::UIElement GetSelectionIndicator() const { return m_selectionIndicator.get(); }
00042
00043     void Init(const winrt::IControlProtected & controlProtected)
00044     {
00045         m_selectionIndicator.set(GetTemplateChildT<winrt::UIElement>(c_selectionIndicatorName, controlProtected));
00046     }
00047
00048 private:
00049     const ITrackerHandleManager* m_owner;
00050     tracker_ref<winrt::UIElement> m_selectionIndicator{ m_owner };
00051
00052     static constexpr wstring_view c_selectionIndicatorName = L"SelectionIndicator"sv;
00053 };
00054
00055 static constexpr wstring_view c_OnLeftNavigationReveal = L"OnLeftNavigationReveal"sv;
00056 static constexpr wstring_view c_OnLeftNavigation = L"OnLeftNavigation"sv;
00057 static constexpr wstring_view c_OnTopNavigationPrimary = L"OnTopNavigationPrimary"sv;
00058 static constexpr wstring_view c_OnTopNavigationPrimaryReveal = L"OnTopNavigationPrimaryReveal"sv;
00059 static constexpr wstring_view c_OnTopNavigationOverflow = L"OnTopNavigationOverflow"sv;
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FocusBehaviorTests Member List

This is the complete list of members for FocusBehaviorTests, including all inherited members.
ArrowKeyHierarchicalNavigationTest() | FocusBehaviorTests | [inline]
ArrowKeyNavigationTest() | FocusBehaviorTests | [inline]
CanDoSelectionChangedOfItemTemplate() | FocusBehaviorTests | [inline]
ClassInitialize(TestContext testContext) | FocusBehaviorTests | [inline, static]
ClickClearSelectionButton() | NavigationViewTestsBase | [inline, protected]
ComboBoxName enum name | NavigationViewTestsBase | [protected]
compact | NavigationViewTestsBase | [protected]
ControlHeight enum name | NavigationViewTestsBase | [protected]
ControlWidth enum name | NavigationViewTestsBase | [protected]
EnsureLeftSettingsRetainsFocusAfterOrientationChanges() | FocusBehaviorTests | [inline]
EnsureNavViewClosed() | NavigationViewTestsBase | [inline, protected]
EnsurePaneHeaderCanBeModifiedHelper(RegressionTestType navviewMode) | NavigationViewTestsBase | [inline, protected]
EnsureTopSettingsRetainsFocusAfterOrientationChanges() | FocusBehaviorTests | [inline]
expanded | NavigationViewTestsBase | [protected]
GetTopNavigationItems(TopNavPosition position) | NavigationViewTestsBase | [inline, protected]
HomeEndNavigationTest() | FocusBehaviorTests | [inline]
InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement(string expectedKeyTipTargetElementId) | NavigationViewTestsBase | [inline, protected]
InvokeOverflowButton() | NavigationViewTestsBase | [inline, protected]
IsItemInTopNavPrimaryList(string text) | NavigationViewTestsBase | [inline, protected]
minimal | NavigationViewTestsBase | [protected]
OpenOverflowMenuAndInvokeItem(string itemName) | NavigationViewTestsBase | [inline, protected]
PaneOpenCloseTestCaseRetry(int retryNumber, Action action) | NavigationViewTestsBase | [inline, protected]
PaneOpenStatus enum name | NavigationViewTestsBase | [protected]
SetNavViewHeight(ControlHeight height) | NavigationViewTestsBase | [inline, protected]
SetNavViewWidth(ControlWidth width) | NavigationViewTestsBase | [inline, protected]
SetThreshold(Threshold threshold, ComboBoxName name) | NavigationViewTestsBase | [inline, protected]
TabNavigationHierarchicalTest() | FocusBehaviorTests | [inline]
TabNavigationTest() | FocusBehaviorTests | [inline]
TestCleanup() | NavigationViewTestsBase | [inline]
Threshold enum name | NavigationViewTestsBase | [protected]
TopNavPosition enum name | NavigationViewTestsBase | [protected]
UIObjectContains(UIObject uIObject, string itemName) | NavigationViewTestsBase | [inline, protected]
UIObjectToString(UIObject uIObject) | NavigationViewTestsBase | [inline, protected]
VerifyBackAndCloseButtonsVisibility(bool inLeftMinimalPanelDisplayMode) | NavigationViewTestsBase | [inline, protected]
VerifyFocusNotLostWhenTabbingWithBackButtonEnabled() | FocusBehaviorTests | [inline]
VerifyShoulderNavigationEnabledAlwaysIsConsistent() | FocusBehaviorTests | [inline]
VerifyShoulderNavigationEnabledOnlySelectionFollowsFocusIsCorrect() | FocusBehaviorTests | [inline]
WaitAndAssertPaneStatus(PaneOpenStatus status) | NavigationViewTestsBase | [inline, protected]
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IGrayscaleEffect Member List

This is the complete list of members for IGrayscaleEffect, including all inherited members.
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IGrayscaleEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IGrayscaleEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CustomSelectionModel Member List

This is the complete list of members for CustomSelectionModel, including all inherited members.
_intProperty | CustomSelectionModel | [private]
abi_enter() | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
AnchorIndex() | SelectionModel |
AnchorIndex(winrt::IndexPath const &value) | SelectionModel |
CheckThread() | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
ChildrenRequested(winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelChildrenRequestedEventArgs > const &value) | SelectionModelProperties |
ChildrenRequested(winrt::event_token const &token) | SelectionModelProperties |
ClearProperties() | SelectionModelProperties | [static]
ClearSelection() | SelectionModel |
DeleteInstanceOnUIThread(std::unique_ptr< SelectionModel > &&self) noexcept | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline, static]
Deselect(int index) | SelectionModel |
Deselect(int groupIndex, int itemIndex) | SelectionModel |
DeselectAt(winrt::IndexPath const &index) | SelectionModel |
DeselectRange(winrt::IndexPath const &start, winrt::IndexPath const &end) | SelectionModel |
DeselectRangeFromAnchor(int32_t index) | SelectionModel |
DeselectRangeFromAnchor(int groupIndex, int itemIndex) | SelectionModel |
DeselectRangeFromAnchorTo(winrt::IndexPath const &index) | SelectionModel |
EnsureProperties() | SelectionModelProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
final_release(std::unique_ptr< SelectionModel > &&self) | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
GetCustomProperty(hstring const &name) | SelectionModel |
GetIndexedProperty(hstring const &name, winrt::TypeName const &type) | SelectionModel |
GetInner() | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
GetStringRepresentation() | SelectionModel |
IntProperty | CustomSelectionModel |
IsOnThread() | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
IsSelected(int index) | SelectionModel |
IsSelected(int groupIndex, int itemIndex) | SelectionModel |
IsSelectedAt(winrt::IndexPath const &index) | SelectionModel |
m_childrenRequestedEventSource | SelectionModelProperties |
m_propertyChangedEventSource | SelectionModelProperties |
m_selectionChangedEventSource | SelectionModelProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
OnPropertyChanged(winrt::hstring const &propertyName) | SelectionModel |
OnSelectionInvalidatedDueToCollectionChange() | SelectionModel |
PropertyChanged(winrt::PropertyChangedEventHandler const &value) | SelectionModel |
PropertyChanged(winrt::event_token const &token) | SelectionModel |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SelectionModel, winrt::implementation::SelectionModelT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::composing > | [inline]
ResolvePath(const winrt::IInspectable &data, const winrt::IndexPath &dataIndexPath) | SelectionModel |
Select(int index) | SelectionModel |
Select(int groupIndex, int itemIndex) | SelectionModel |
SelectAll() | SelectionModel |
SelectAllFlat() | SelectionModel |
SelectAt(winrt::IndexPath const &index) | SelectionModel |
SelectedIndex() | SelectionModel |
SelectedIndex(winrt::IndexPath const &value) | SelectionModel |
SelectedIndices() | SelectionModel |
SelectedItem() | SelectionModel |
SelectedItems() | SelectionModel |
SelectionChanged(winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelSelectionChangedEventArgs > const &value) | SelectionModelProperties |
SelectionChanged(winrt::event_token const &token) | SelectionModelProperties |
SelectionInvalidatedDueToCollectionChange() const | SelectionModel | [inline]
SelectionModel() | SelectionModel |
SelectionModelProperties() | SelectionModelProperties |
SelectRange(winrt::IndexPath const &start, winrt::IndexPath const &end) | SelectionModel |
SelectRangeFromAnchor(int32_t index) | SelectionModel |
SelectRangeFromAnchor(int groupIndex, int itemIndex) | SelectionModel |
SelectRangeFromAnchorTo(winrt::IndexPath const &index) | SelectionModel |
SetAnchorIndex(int32_t index) | SelectionModel |
SetAnchorIndex(int groupIndex, int itemIndex) | SelectionModel |
SharedLeafNode() | SelectionModel | [inline]
SingleSelect() | SelectionModel |
SingleSelect(bool value) | SelectionModel |
Source() | SelectionModel |
Source(winrt::IInspectable const &value) | SelectionModel |
Type() | SelectionModel |
~SelectionModel() | SelectionModel |
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemInvokedEventArgs.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemInvokedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewItemInvokedEventArgs.h"
00007 #include "NavigationView.h"
00008
00009 #include "NavigationViewItemInvokedEventArgs.properties.cpp"
00010
00011 winrt::IInspectable NavigationViewItemInvokedEventArgs::InvokedItem()
00012 {
00013     return m_invokedItem.get();
00014 }
00015
00016 bool NavigationViewItemInvokedEventArgs::IsSettingsInvoked()
00017 {
00018     return m_isSettingsInvoked;
00019 }
00020
00021 void NavigationViewItemInvokedEventArgs::InvokedItem(const winrt::IInspectable& value)
00022 {
00023     m_invokedItem.set(value);
00024 }
00025
00026 void NavigationViewItemInvokedEventArgs::IsSettingsInvoked(bool value)
00027 {
00028     m_isSettingsInvoked = value;
00029 }
00030
00031 winrt::NavigationViewItemBase NavigationViewItemInvokedEventArgs::InvokedItemContainer()
00032 {
00033     return m_invokedItemContainer.get();
00034 }
00035
00036 void NavigationViewItemInvokedEventArgs::InvokedItemContainer(winrt::NavigationViewItemBase const& value)
00037 {
00038     m_invokedItemContainer.set(value);
00039 }
00040
00041 winrt::NavigationTransitionInfo NavigationViewItemInvokedEventArgs::RecommendedNavigationTransitionInfo()
00042 {
00043     return m_recommendedNavigationTransitionInfo.get();
00044 }
00045
00046 void NavigationViewItemInvokedEventArgs::RecommendedNavigationTransitionInfo(winrt::NavigationTransitionInfo const& value)
00047 {
00048     m_recommendedNavigationTransitionInfo.set(value);
00049 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBoxAutomationPeer Member List

This is the complete list of members for NumberBoxAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
CheckThread() | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< NumberBoxAutomationPeer > &&self) noexcept | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
final_release(std::unique_ptr< NumberBoxAutomationPeer > &&self) | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline, static]
GetAutomationControlTypeCore() | NumberBoxAutomationPeer |
GetBase() | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
GetClassNameCore() | NumberBoxAutomationPeer |
GetImpl() | NumberBoxAutomationPeer | [private]
GetInner() | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
GetNameCore() | NumberBoxAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | NumberBoxAutomationPeer |
IsOnThread() | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
IsReadOnly() | NumberBoxAutomationPeer | [inline]
LargeChange() | NumberBoxAutomationPeer |
Maximum() | NumberBoxAutomationPeer |
Minimum() | NumberBoxAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
NumberBoxAutomationPeer(winrt::NumberBox const &owner) | NumberBoxAutomationPeer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
RaiseValueChangedEvent(double oldValue, double newValue) | NumberBoxAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< NumberBoxAutomationPeer, winrt::implementation::NumberBoxAutomationPeerT, winrt::IRangeValueProvider > | [inline]
SetValue(double value) | NumberBoxAutomationPeer |
SmallChange() | NumberBoxAutomationPeer |
Value() | NumberBoxAutomationPeer |
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlatItemsControlPage Member List

This is the complete list of members for FlatItemsControlPage, including all inherited members.
_colEntities | FlatItemsControlPage | [private]
_itemTemplates | FlatItemsControlPage | [private]
_modernPanelTemplate | FlatItemsControlPage | [private]
AppendEventMessage(string eventMessage) | FlatItemsControlPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnDataSourceAddItem_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnDataSourceGetItemCount_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnDataSourceInsertItem_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnDataSourceRemoveAllItems_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnDataSourceRemoveItem_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnDataSourceReplaceItem_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnDataSourceSetItemCount_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnGetItemsControlTabNavigation_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnGetItemsControlXYFocusKeyboardNavigation_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnGetItemsPanelMargin_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnGetItemsPanelOrientation_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnSetItemsControlTabNavigation_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnSetItemsControlXYFocusKeyboardNavigation_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnSetItemsPanelMargin_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
BtnSetItemsPanelOrientation_Click(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
ChkDataSource_Checked(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
ChkDataSource_Unchecked(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
ChkItemsControlIsTabStop_IsCheckedChanged(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
ChkItemsControlProperties_Checked(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
ChkItemsControlProperties_Unchecked(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
CmbItemsControlItemsPanelType_SelectionChanged(object sender, SelectionChangedEventArgs e) | FlatItemsControlPage | [inline, private]
CmbItemsControlItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) | FlatItemsControlPage | [inline, private]
CmbItemsPresenterFooter_SelectionChanged(object sender, SelectionChangedEventArgs e) | FlatItemsControlPage | [inline, private]
CmbItemsPresenterHeader_SelectionChanged(object sender, SelectionChangedEventArgs e) | FlatItemsControlPage | [inline, private]
DataSourceAddItem() | FlatItemsControlPage | [inline, private]
DataSourceInsertItem(int newItemIndex) | FlatItemsControlPage | [inline, private]
DataSourceRemoveAllItems() | FlatItemsControlPage | [inline, private]
DataSourceRemoveItem(int oldItemIndex) | FlatItemsControlPage | [inline, private]
DataSourceReplaceItem(int itemIndex) | FlatItemsControlPage | [inline, private]
FindElementOfTypeInSubtree< T >(DependencyObject element) | FlatItemsControlPage | [inline, private, static]
FlatItemsControlPage() | FlatItemsControlPage | [inline]
FlatItemsControlPage_Loaded(object sender, RoutedEventArgs e) | FlatItemsControlPage | [inline, private]
GetBitmapImage(int index) | FlatItemsControlPage | [inline, private]
GetThicknessFromString(string thickness) | FlatItemsControlPage | [inline, private]
NbItemsWrapGridMaximumRowsOrColumns_ValueChanged(object sender, object e) | FlatItemsControlPage | [inline, private]
UpdateDataSourceItemCount() | FlatItemsControlPage | [inline, private]
UpdateItemsControlIsTabStop() | FlatItemsControlPage | [inline, private]
UpdateItemsControlItemTemplate() | FlatItemsControlPage | [inline, private]
UpdateItemsControlTabNavigation() | FlatItemsControlPage | [inline, private]
UpdateItemsControlXYFocusKeyboardNavigation() | FlatItemsControlPage | [inline, private]
UpdateItemsPanelMargin() | FlatItemsControlPage | [inline, private]
UpdateItemsPanelOrientation() | FlatItemsControlPage | [inline, private]
UpdateItemsPanelProperties() | FlatItemsControlPage | [inline, private]
UpdateItemsPanelType() | FlatItemsControlPage | [inline, private]
UpdateItemsWrapGridMaximumRowsOrColumns() | FlatItemsControlPage | [inline, private]
UpdateModernPanelUIVisibility() | FlatItemsControlPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarTests Member List

This is the complete list of members for AnnotatedScrollBarTests, including all inherited members.
LogAnnotatedScrollBarProperties(AnnotatedScrollBar annotatedScrollBar) | AnnotatedScrollBarTests | [inline, private]
VerifyDefaultPropertyValues() | AnnotatedScrollBarTests | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UniformGridLayoutDemo Member List

This is the complete list of members for UniformGridLayoutDemo, including all inherited members.
CmbScrollViewerHorizontalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e) | UniformGridLayoutDemo | [inline, private]
CmbUniformGridLayoutItemsJustification_SelectionChanged(object sender, SelectionChangedEventArgs e) | UniformGridLayoutDemo | [inline, private]
CmbUniformGridLayoutItemsStretch_SelectionChanged(object sender, SelectionChangedEventArgs e) | UniformGridLayoutDemo | [inline, private]
CmbUniformGridLayoutOrientation_SelectionChanged(object sender, SelectionChangedEventArgs e) | UniformGridLayoutDemo | [inline, private]
collection | UniformGridLayoutDemo |
GetRepeaterActualHeightButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline]
GetScrollViewerHorizontalOffsetButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetScrollViewerMaxHeightButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetScrollViewerMaxWidthButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetScrollViewerVerticalOffsetButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetUniformGridLayoutMaximumRowsOrColumnsButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetUniformGridLayoutMinColumnSpacingButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetUniformGridLayoutMinItemHeightButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetUniformGridLayoutMinItemWidthButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
GetUniformGridLayoutMinRowSpacingButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetScrollViewerHorizontalOffsetButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetScrollViewerMaxHeightButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetScrollViewerMaxWidthButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetScrollViewerVerticalOffsetButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetUniformGridLayoutMaximumRowsOrColumnsButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetUniformGridLayoutMinColumnSpacingButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetUniformGridLayoutMinItemHeightButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetUniformGridLayoutMinItemWidthButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
SetUniformGridLayoutMinRowSpacingButtonClick(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
UniformGridLayoutDemo() | UniformGridLayoutDemo | [inline]
UniformGridLayoutDemo_Loaded(object sender, RoutedEventArgs e) | UniformGridLayoutDemo | [inline, private]
~UniformGridLayoutDemo() | UniformGridLayoutDemo | [inline, private]
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/SelectorBase.h Source File

  • File List
  • File Members
  • ItemsView

SelectorBase.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsViewTrace.h"
00007
00008 class SelectorBase
00009 {
00010 public:
00011     SelectorBase();
00012     ~SelectorBase();
00013
00014     void SetSelectionModel(winrt::SelectionModel const& selectionModel);
00015     void DeselectWithAnchorPreservation(int index);
00016     virtual void SelectAll();
00017     virtual void Clear();
00018
00019     virtual void OnInteractedAction(winrt::IndexPath const& index, bool ctrl, bool shift) { };
00020     virtual void OnFocusedAction(winrt::IndexPath const& index, bool ctrl, bool shift) { };
00021
00022 protected:
00023     winrt::SelectionModel GetSelectionModel()
00024     {
00025         return m_selectionModel;
00026     }
00027
00028     bool IsSelected(winrt::IndexPath const& index);
00029     virtual bool CanSelect(winrt::IndexPath const& index);
00030
00031 private:
00032     winrt::SelectionModel m_selectionModel{ nullptr };
00033 };
Generated on Sun Dec 1 2024 20:51:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicTestApi.idl Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicTestApi.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_MEDIA_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 runtimeclass AcrylicTestApi : Microsoft.UI.Xaml.DependencyObject
00007 {
00008     AcrylicTestApi();
00009
00010     MU_XM_NAMESPACE.AcrylicBrush AcrylicBrush { get; set; };
00011     Boolean IsUsingAcrylicBrush { get; };
00012     Microsoft.UI.Composition.CompositionBrush CompositionBrush { get; };
00013     Microsoft.UI.Composition.CompositionBrush NoiseBrush { get; };
00014     void ForceCreateAcrylicBrush(Boolean useCrossFadeEffect);
00015
00016 }
00017
00018 [MUX_INTERNAL]
00019 [webhosthidden]
00020 interface IAcrylicBrushStaticsPrivate
00021 {
00022     Microsoft.UI.Composition.CompositionEffectBrush CreateBackdropAcrylicEffectBrush(Microsoft.UI.Composition.Compositor compositor, Windows.UI.Color initialTintColor, Windows.UI.Color initialFallbackColor, Boolean willTintColorAlwaysBeOpaque);
00023     Microsoft.UI.Composition.CompositionEffectBrush CreateBackdropAcrylicEffectBrushWithLuminosity(Microsoft.UI.Composition.Compositor compositor, Windows.UI.Color initialTintColor, Windows.Foundation.IReference<double> luminosityOpacity, Windows.UI.Color initialFallbackColor, Boolean willTintColorAlwaysBeOpaque);
00024 }
00025
00026 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TextCommandBarFlyout.cpp Source File

  • File List
  • File Members
  • CommandBarFlyout

TextCommandBarFlyout.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TextCommandBarFlyout.h"
00007 #include "CommandBarFlyoutCommandBar.h"
00008 #include "ResourceAccessor.h"
00009 #include "RuntimeProfiler.h"
00010
00011 #include "TextCommandBarFlyout.properties.cpp"
00012
00013 TextCommandBarFlyout::TextCommandBarFlyout()
00014 {
00015     __RP_Marker_ClassById(RuntimeProfiler::ProfId_TextCommandBarFlyout);
00016
00017     Opening({
00018         [this](auto const&, auto const&)
00019         {
00020             UpdateButtons();
00021         }
00022     });
00023
00024     Opened({
00025         [this](auto const&, auto const&)
00026         {
00027             // If there aren't any primary commands and we aren't opening expanded,
00028             // or if there are just no commands at all, then we'll have literally no UI to show.
00029             // We'll just close the flyout in that case - nothing should be opening us
00030             // in this state anyway, but this makes sure we don't have a light-dismiss layer
00031             // with nothing visible to light dismiss.
00032
00033             if (PrimaryCommands().Size() == 0 &&
00034                 (SecondaryCommands().Size() == 0 || (!m_commandBar.get().IsOpen() && ShowMode() != winrt::FlyoutShowMode::Standard)))
00035             {
00036                 Hide();
00037             }
00038         }
00039     });
00040 }
00041
00042 void TextCommandBarFlyout::InitializeButtonWithUICommand(
00043     winrt::ButtonBase const& button,
00044     winrt::XamlUICommand const& uiCommand,
00045     std::function<void()> const& executeFunc)
00046 {
00047     m_buttonCommandRevokers.push_back(uiCommand.ExecuteRequested(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
00048     button.Command(uiCommand);
00049 }
00050
00051 void TextCommandBarFlyout::InitializeButtonWithProperties(
00052     winrt::ButtonBase const& button,
00053     ResourceIdType labelResourceId,
00054     ResourceIdType acceleratorKeyResourceId,
00055     ResourceIdType descriptionResourceId,
00056     std::function<void()> const& executeFunc)
00057 {
00058     winrt::AppBarButton elementAsButton = button.try_as<winrt::AppBarButton>();
00059     winrt::AppBarToggleButton elementAsToggleButton = button.try_as<winrt::AppBarToggleButton>();
00060
00061     MUX_ASSERT(elementAsButton || elementAsToggleButton);
00062
00063     if (!ResourceAccessor::IsResourceIdNull(labelResourceId))
00064     {
00065         winrt::hstring label{ ResourceAccessor::GetLocalizedStringResource(labelResourceId) };
00066
00067         if (elementAsButton)
00068         {
00069             elementAsButton.Label(label);
00070         }
00071         else
00072         {
00073             elementAsToggleButton.Label(label);
00074         }
00075     }
00076
00077     if (!ResourceAccessor::IsResourceIdNull(descriptionResourceId))
00078     {
00079         winrt::hstring description{ ResourceAccessor::GetLocalizedStringResource(descriptionResourceId) };
00080
00081         winrt::AutomationProperties::SetHelpText(button, description);
00082         winrt::ToolTipService::SetToolTip(button, box_value(description));
00083     }
00084
00085     if (elementAsToggleButton)
00086     {
00087         m_toggleButtonCheckedRevokers.push_back(elementAsToggleButton.Checked(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
00088         m_toggleButtonUncheckedRevokers.push_back(elementAsToggleButton.Unchecked(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
00089     }
00090     else
00091     {
00092         m_buttonClickRevokers.push_back(button.Click(winrt::auto_revoke, [executeFunc](auto const&, auto const&) { executeFunc(); }));
00093     }
00094
00095     if (!ResourceAccessor::IsResourceIdNull(acceleratorKeyResourceId))
00096     {
00097         winrt::hstring acceleratorKeyString{ ResourceAccessor::GetLocalizedStringResource(acceleratorKeyResourceId) };
00098
00099         if (acceleratorKeyString.size() > 0)
00100         {
00101             WCHAR acceleratorKeyChar = acceleratorKeyString[0];
00102             winrt::VirtualKey acceleratorKey = SharedHelpers::GetVirtualKeyFromChar(acceleratorKeyChar);
00103
00104             if (acceleratorKey != winrt::VirtualKey::None)
00105             {
00106                 winrt::KeyboardAccelerator keyboardAccelerator;
00107                 keyboardAccelerator.Key(acceleratorKey);
00108                 keyboardAccelerator.Modifiers(winrt::VirtualKeyModifiers::Control);
00109
00110                 button.KeyboardAccelerators().Append(keyboardAccelerator);
00111             }
00112         }
00113     }
00114 }
00115
00116 void TextCommandBarFlyout::InitializeButtonWithProperties(
00117     winrt::ButtonBase const& button,
00118     ResourceIdType labelResourceId,
00119     winrt::Symbol const& symbol,
00120     ResourceIdType acceleratorKeyResourceId,
00121     ResourceIdType descriptionResourceId,
00122     std::function<void()> const& executeFunc)
00123 {
00124     InitializeButtonWithProperties(
00125         button,
00126         labelResourceId,
00127         acceleratorKeyResourceId,
00128         descriptionResourceId,
00129         executeFunc);
00130
00131     winrt::AppBarButton elementAsButton = button.try_as<winrt::AppBarButton>();
00132     winrt::AppBarToggleButton elementAsToggleButton = button.try_as<winrt::AppBarToggleButton>();
00133
00134     MUX_ASSERT(elementAsButton || elementAsToggleButton);
00135
00136     winrt::SymbolIcon symbolIcon{ winrt::SymbolIcon(symbol) };
00137
00138     if (elementAsButton)
00139     {
00140         elementAsButton.Icon(symbolIcon);
00141     }
00142     else
00143     {
00144         elementAsToggleButton.Icon(symbolIcon);
00145     }
00146 }
00147
00148 void TextCommandBarFlyout::UpdateButtons()
00149 {
00150     PrimaryCommands().Clear();
00151     SecondaryCommands().Clear();
00152
00153     const auto buttonsToAdd = GetButtonsToAdd();
00154     const auto addButtonToCommandsIfPresent =
00155         [buttonsToAdd, this](auto buttonType, auto commandsList)
00156         {
00157             if ((buttonsToAdd & buttonType) != TextControlButtons::None)
00158             {
00159                 commandsList.Append(GetButton(buttonType));
00160             }
00161         };
00162     const auto addRichEditButtonToCommandsIfPresent =
00163         [buttonsToAdd, this](auto buttonType, auto commandsList, auto getIsChecked)
00164         {
00165             if ((buttonsToAdd & buttonType) != TextControlButtons::None)
00166             {
00167                 auto richEditBoxTarget = Target().try_as<winrt::RichEditBox>();
00168                 auto toggleButton{ GetButton(buttonType).as<winrt::AppBarToggleButton>() };
00169                 auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00170
00171                 if (selection)
00172                 {
00173                     auto initializingButtons = gsl::finally([this]()
00174                     {
00175                         m_isSettingToggleButtonState = false;
00176                     });
00177                     m_isSettingToggleButtonState = true;
00178                     toggleButton.IsChecked(getIsChecked(selection));
00179                 }
00180
00181                 commandsList.Append(toggleButton);
00182             }
00183         };
00184
00185     winrt::FlyoutBase proofingFlyout{ nullptr };
00186
00187     if (auto textBoxTarget = Target().try_as<winrt::ITextBox>())
00188     {
00189         proofingFlyout = textBoxTarget.ProofingMenuFlyout();
00190     }
00191     else if (auto richEditBoxTarget = Target().try_as<winrt::IRichEditBox>())
00192     {
00193         proofingFlyout = richEditBoxTarget.ProofingMenuFlyout();
00194     }
00195
00196     winrt::MenuFlyout proofingMenuFlyout = proofingFlyout.try_as<winrt::MenuFlyout>();
00197
00198     bool shouldIncludeProofingMenu =
00199         static_cast<bool>(proofingFlyout) &&
00200         (!proofingMenuFlyout || proofingMenuFlyout.Items().Size() > 0);
00201
00202     if (shouldIncludeProofingMenu)
00203     {
00204         m_proofingButton = winrt::AppBarButton{};
00205         m_proofingButton.Label(ResourceAccessor::GetLocalizedStringResource(SR_ProofingMenuItemLabel));
00206         m_proofingButton.Flyout(proofingFlyout);
00207
00208         m_proofingButtonLoadedRevoker = m_proofingButton.Loaded(winrt::auto_revoke,
00209             [this](auto const&, auto const&)
00210             {
00211                 // If we have a proofing menu, we'll start with it open by invoking the button
00212                 // as soon as the CommandBar opening animation completes.
00213                 // We invoke the button instead of just showing the flyout to make the button
00214                 // properly update its visual state as well.
00215                 // If we have an open animation that we'll be executing, we'll postpone showing
00216                 // the proofing menu until it's given a chance to get underway.
00217                 // Otherwise, we'll just show the proofing menu immediately.
00218                 if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
00219                 {
00220                     auto strongThis = get_strong();
00221                     auto openProofingMenuAction = [strongThis]()
00222                     {
00223                         // There isn't likely to be any way that the proofing button was deleted
00224                         // between us scheduling this action and us actually executing it,
00225                         // but it doesn't hurt to be resilient when we're scheduling an action
00226                         // to occur in the future.
00227                         if (strongThis->m_proofingButton)
00228                         {
00229                             auto peer = strongThis->m_proofingButton.OnCreateAutomationPeer().as<winrt::ButtonAutomationPeer>();
00230                             peer.Invoke();
00231                         }
00232                     };
00233
00234                     if (commandBar->HasOpenAnimation() && commandBar->IsOpen())
00235                     {
00236                         // Allowing 100 ms to elapse before we open the proofing menu gives the proofing menu enough time
00237                         // to be mostly open when the proofing menu opens (so the menu doesn't look detached from the CommandBarFlyout UI),
00238                         // but doesn't wait long enough that there's a noticeable pause in between the user feeling like
00239                         // the CommandBarFlyout is fully open and the proofing menu finally opening.
00240                         // The exact number comes from design.
00241                         SharedHelpers::ScheduleActionAfterWait(openProofingMenuAction, 100);
00242                     }
00243                     else
00244                     {
00245                         openProofingMenuAction();
00246                     }
00247                 }
00248             });
00249
00250         // We want interactions with any proofing menu element to close the entire flyout,
00251         // same as interactions with secondary commands, so we'll attach click event handlers
00252         // to the proofing menu items (if they exist) to handle that.
00253         if (proofingMenuFlyout)
00254         {
00255             m_proofingMenuItemClickRevokers.clear();
00256             m_proofingMenuToggleItemClickRevokers.clear();
00257
00258             const auto closeFlyoutFunc = [this](auto const& sender, auto const& args) { Hide(); };
00259
00260             // We might encounter MenuFlyoutSubItems, so we'll add them to this list
00261             // in order to ensure that we hook up handlers to their entries as well.
00262             std::list<winrt::IVector<winrt::MenuFlyoutItemBase>> itemsList;
00263             itemsList.push_back(proofingMenuFlyout.Items());
00264
00265             while (!itemsList.empty())
00266             {
00267                 auto currentItems = itemsList.front();
00268                 itemsList.pop_front();
00269
00270                 for (uint32_t i = 0; i < currentItems.Size(); i++)
00271                 {
00272                     if (auto menuFlyoutItem = currentItems.GetAt(i).try_as<winrt::MenuFlyoutItem>())
00273                     {
00274                         m_proofingMenuItemClickRevokers.push_back(menuFlyoutItem.Click(winrt::auto_revoke, closeFlyoutFunc));
00275                     }
00276                     else if (auto toggleMenuFlyoutItem = currentItems.GetAt(i).try_as<winrt::ToggleMenuFlyoutItem>())
00277                     {
00278                         m_proofingMenuToggleItemClickRevokers.push_back(toggleMenuFlyoutItem.Click(winrt::auto_revoke, closeFlyoutFunc));
00279                     }
00280                     else if (auto menuFlyoutSubItem = currentItems.GetAt(i).try_as<winrt::MenuFlyoutSubItem>())
00281                     {
00282                         itemsList.push_back(menuFlyoutSubItem.Items());
00283                     }
00284                 }
00285             }
00286         }
00287
00288         SecondaryCommands().Append(m_proofingButton);
00289     }
00290     else
00291     {
00292         m_proofingButton = nullptr;
00293     }
00294
00295     winrt::IFlyoutBase thisAsFlyoutBase = *this;
00296
00297     auto commandListForCutCopyPaste =
00298         thisAsFlyoutBase && thisAsFlyoutBase.InputDevicePrefersPrimaryCommands() ?
00299         PrimaryCommands() :
00300         SecondaryCommands();
00301
00302     addButtonToCommandsIfPresent(TextControlButtons::Cut, commandListForCutCopyPaste);
00303     addButtonToCommandsIfPresent(TextControlButtons::Copy, commandListForCutCopyPaste);
00304     addButtonToCommandsIfPresent(TextControlButtons::Paste, commandListForCutCopyPaste);
00305
00306     addRichEditButtonToCommandsIfPresent(TextControlButtons::Bold, PrimaryCommands(),
00307         [](winrt::ITextSelection textSelection) { return textSelection.CharacterFormat().Bold() == winrt::FormatEffect::On; });
00308     addRichEditButtonToCommandsIfPresent(TextControlButtons::Italic, PrimaryCommands(),
00309         [](winrt::ITextSelection textSelection) { return textSelection.CharacterFormat().Italic() == winrt::FormatEffect::On; });
00310     addRichEditButtonToCommandsIfPresent(TextControlButtons::Underline, PrimaryCommands(),
00311         [](winrt::ITextSelection textSelection)
00312     {
00313         auto underline = textSelection.CharacterFormat().Underline();
00314         return (underline != winrt::UnderlineType::None) && (underline != winrt::UnderlineType::Undefined);
00315     });
00316
00317     addButtonToCommandsIfPresent(TextControlButtons::Undo, SecondaryCommands());
00318     addButtonToCommandsIfPresent(TextControlButtons::Redo, SecondaryCommands());
00319     addButtonToCommandsIfPresent(TextControlButtons::SelectAll, SecondaryCommands());
00320 }
00321
00322 TextControlButtons TextCommandBarFlyout::GetButtonsToAdd()
00323 {
00324     TextControlButtons buttonsToAdd = TextControlButtons::None;
00325     auto target = Target();
00326
00327     if (auto textBoxTarget = target.try_as<winrt::TextBox>())
00328     {
00329         buttonsToAdd = GetTextBoxButtonsToAdd(textBoxTarget);
00330     }
00331     else if (auto textBlockTarget = target.try_as<winrt::TextBlock>())
00332     {
00333         buttonsToAdd = GetTextBlockButtonsToAdd(textBlockTarget);
00334     }
00335     else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00336     {
00337         buttonsToAdd = GetRichEditBoxButtonsToAdd(richEditBoxTarget);
00338     }
00339     else if (auto richTextBlockTarget = target.try_as<winrt::RichTextBlock>())
00340     {
00341         buttonsToAdd = GetRichTextBlockButtonsToAdd(richTextBlockTarget);
00342     }
00343     else if (auto richTextBlockOverflowTarget = target.try_as<winrt::RichTextBlockOverflow>())
00344     {
00345         if (auto richTextBlockSource = richTextBlockOverflowTarget.ContentSource())
00346         {
00347             buttonsToAdd = GetRichTextBlockButtonsToAdd(richTextBlockSource);
00348         }
00349     }
00350     else if (auto passwordBoxTarget = target.try_as<winrt::PasswordBox>())
00351     {
00352         buttonsToAdd = GetPasswordBoxButtonsToAdd(passwordBoxTarget);
00353     }
00354
00355     return buttonsToAdd;
00356 }
00357
00358 TextControlButtons TextCommandBarFlyout::GetTextBoxButtonsToAdd(winrt::TextBox const& textBox)
00359 {
00360     TextControlButtons buttonsToAdd = TextControlButtons::None;
00361
00362     if (!textBox.IsReadOnly())
00363     {
00364         if (textBox.SelectionLength() > 0)
00365         {
00366             buttonsToAdd |= TextControlButtons::Cut;
00367         }
00368
00369         if (textBox.CanPasteClipboardContent())
00370         {
00371             buttonsToAdd |= TextControlButtons::Paste;
00372         }
00373
00374         if (textBox.CanUndo())
00375         {
00376             buttonsToAdd |= TextControlButtons::Undo;
00377         }
00378
00379         if (textBox.CanRedo())
00380         {
00381             buttonsToAdd |= TextControlButtons::Redo;
00382         }
00383     }
00384
00385     if (textBox.SelectionLength() > 0)
00386     {
00387         buttonsToAdd |= TextControlButtons::Copy;
00388     }
00389
00390     if (textBox.Text().size() > 0)
00391     {
00392         buttonsToAdd |= TextControlButtons::SelectAll;
00393     }
00394
00395     return buttonsToAdd;
00396 }
00397
00398 TextControlButtons TextCommandBarFlyout::GetTextBlockButtonsToAdd(winrt::TextBlock const& textBlock)
00399 {
00400     TextControlButtons buttonsToAdd = TextControlButtons::None;
00401
00402     if (textBlock.SelectedText().size() > 0)
00403     {
00404         buttonsToAdd |= TextControlButtons::Copy;
00405     }
00406
00407     if (textBlock.Text().size() > 0)
00408     {
00409         buttonsToAdd |= TextControlButtons::SelectAll;
00410     }
00411
00412     return buttonsToAdd;
00413 }
00414
00415 TextControlButtons TextCommandBarFlyout::GetRichEditBoxButtonsToAdd(winrt::RichEditBox const& richEditBox)
00416 {
00417     TextControlButtons buttonsToAdd = TextControlButtons::None;
00418     auto document{ richEditBox.Document() };
00419     auto selection{ document ? document.Selection() : nullptr };
00420
00421     if (!richEditBox.IsReadOnly())
00422     {
00423         const auto disabledFormattingAccelerators = richEditBox.DisabledFormattingAccelerators();
00424
00425         if ((disabledFormattingAccelerators & winrt::DisabledFormattingAccelerators::Bold) != winrt::DisabledFormattingAccelerators::Bold)
00426         {
00427             buttonsToAdd |= TextControlButtons::Bold;
00428         }
00429
00430         if ((disabledFormattingAccelerators & winrt::DisabledFormattingAccelerators::Italic) != winrt::DisabledFormattingAccelerators::Italic)
00431         {
00432             buttonsToAdd |= TextControlButtons::Italic;
00433         }
00434
00435         if ((disabledFormattingAccelerators & winrt::DisabledFormattingAccelerators::Underline) != winrt::DisabledFormattingAccelerators::Underline)
00436         {
00437             buttonsToAdd |= TextControlButtons::Underline;
00438         }
00439
00440         if (document && document.CanCopy() && selection && selection.Length() != 0)
00441         {
00442             buttonsToAdd |= TextControlButtons::Cut;
00443         }
00444
00445         if (selection && selection.CanPaste(0))
00446         {
00447             buttonsToAdd |= TextControlButtons::Paste;
00448         }
00449
00450         if (document && document.CanUndo())
00451         {
00452             buttonsToAdd |= TextControlButtons::Undo;
00453         }
00454
00455         if (document && document.CanRedo())
00456         {
00457             buttonsToAdd |= TextControlButtons::Redo;
00458         }
00459     }
00460
00461     if (document && document.CanCopy() && selection && selection.Length() != 0)
00462     {
00463         buttonsToAdd |= TextControlButtons::Copy;
00464     }
00465
00466     if (document)
00467     {
00468         winrt::hstring text;
00469         document.GetText(winrt::TextGetOptions::None, text);
00470
00471         if (text.size() > 0)
00472         {
00473             buttonsToAdd |= TextControlButtons::SelectAll;
00474         }
00475     }
00476
00477     return buttonsToAdd;
00478 }
00479
00480 TextControlButtons TextCommandBarFlyout::GetRichTextBlockButtonsToAdd(winrt::RichTextBlock const& richTextBlock)
00481 {
00482     TextControlButtons buttonsToAdd = TextControlButtons::None;
00483
00484     if (richTextBlock.SelectedText().size() > 0)
00485     {
00486         buttonsToAdd |= TextControlButtons::Copy;
00487     }
00488
00489     if (richTextBlock.Blocks().Size() > 0)
00490     {
00491         buttonsToAdd |= TextControlButtons::SelectAll;
00492     }
00493
00494     return buttonsToAdd;
00495 }
00496
00497 TextControlButtons TextCommandBarFlyout::GetPasswordBoxButtonsToAdd(winrt::PasswordBox const& passwordBox)
00498 {
00499     TextControlButtons buttonsToAdd = TextControlButtons::None;
00500
00501     if (passwordBox.CanPasteClipboardContent())
00502     {
00503         buttonsToAdd |= TextControlButtons::Paste;
00504     }
00505
00506     if (passwordBox.Password().size() > 0)
00507     {
00508         buttonsToAdd |= TextControlButtons::SelectAll;
00509     }
00510
00511     return buttonsToAdd;
00512 }
00513
00514 bool TextCommandBarFlyout::IsButtonInPrimaryCommands(TextControlButtons button)
00515 {
00516     uint32_t buttonIndex = 0;
00517     bool wasFound = PrimaryCommands().IndexOf(GetButton(button), buttonIndex);
00518     return wasFound;
00519 }
00520
00521 void TextCommandBarFlyout::ExecuteCutCommand()
00522 {
00523     auto target = Target();
00524
00525     try
00526     {
00527         if (auto textBoxTarget = target.try_as<winrt::TextBox>())
00528         {
00529             textBoxTarget.CutSelectionToClipboard();
00530         }
00531         else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00532         {
00533             auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00534
00535             if (selection)
00536             {
00537                 selection.Cut();
00538             }
00539         }
00540     }
00541     catch (winrt::hresult_error e)
00542     {
00543         // If we got a clipboard error, we don't want to crash as a result of that - that can happen (e.g.)
00544         // if the app isn't the foreground window when we try to execute a clipboard operation.
00545         if (e.code().value < CLIPBRD_E_FIRST || e.code().value > CLIPBRD_E_LAST)
00546         {
00547             throw;
00548         }
00549     }
00550
00551     if (IsButtonInPrimaryCommands(TextControlButtons::Cut))
00552     {
00553         UpdateButtons();
00554     }
00555 }
00556
00557 void TextCommandBarFlyout::ExecuteCopyCommand()
00558 {
00559     auto target = Target();
00560
00561     try
00562     {
00563         const auto executeRichTextBlockCopyCommand =
00564             [this](winrt::RichTextBlock const& richTextBlockTarget)
00565         {
00566             richTextBlockTarget.CopySelectionToClipboard();
00567         };
00568
00569         if (auto textBoxTarget = target.try_as<winrt::TextBox>())
00570         {
00571             textBoxTarget.CopySelectionToClipboard();
00572         }
00573         else if (auto textBlockTarget = target.try_as<winrt::TextBlock>())
00574         {
00575             textBlockTarget.CopySelectionToClipboard();
00576         }
00577         else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00578         {
00579             auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00580
00581             if (selection)
00582             {
00583                 selection.Copy();
00584             }
00585         }
00586         else if (auto richTextBlockTarget = target.try_as<winrt::RichTextBlock>())
00587         {
00588             executeRichTextBlockCopyCommand(richTextBlockTarget);
00589         }
00590         else if (auto richTextBlockOverflowTarget = target.try_as<winrt::RichTextBlockOverflow>())
00591         {
00592             if (auto richTextBoxSource = richTextBlockOverflowTarget.ContentSource())
00593             {
00594                 executeRichTextBlockCopyCommand(richTextBoxSource);
00595             }
00596         }
00597     }
00598     catch (winrt::hresult_error e)
00599     {
00600         // If we got a clipboard error, we don't want to crash as a result of that - that can happen (e.g.)
00601         // if the app isn't the foreground window when we try to execute a clipboard operation.
00602         if (e.code().value < CLIPBRD_E_FIRST || e.code().value > CLIPBRD_E_LAST)
00603         {
00604             throw;
00605         }
00606     }
00607
00608     if (IsButtonInPrimaryCommands(TextControlButtons::Copy))
00609     {
00610         UpdateButtons();
00611     }
00612 }
00613
00614 void TextCommandBarFlyout::ExecutePasteCommand()
00615 {
00616     auto target = Target();
00617
00618     try
00619     {
00620         if (auto textBoxTarget = target.try_as<winrt::TextBox>())
00621         {
00622             textBoxTarget.PasteFromClipboard();
00623         }
00624         else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00625         {
00626             auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00627
00628             if (selection)
00629             {
00630                 selection.Paste(0);
00631             }
00632         }
00633         else if (auto passwordBoxTarget = target.try_as<winrt::PasswordBox>())
00634         {
00635             passwordBoxTarget.PasteFromClipboard();
00636         }
00637     }
00638     catch (winrt::hresult_error e)
00639     {
00640         // If we got a clipboard error, we don't want to crash as a result of that - that can happen (e.g.)
00641         // if the app isn't the foreground window when we try to execute a clipboard operation.
00642         if (e.code().value < CLIPBRD_E_FIRST || e.code().value > CLIPBRD_E_LAST)
00643         {
00644             throw;
00645         }
00646     }
00647
00648     if (IsButtonInPrimaryCommands(TextControlButtons::Paste))
00649     {
00650         UpdateButtons();
00651     }
00652 }
00653
00654 void TextCommandBarFlyout::ExecuteBoldCommand()
00655 {
00656     if (!m_isSettingToggleButtonState)
00657     {
00658         auto target = Target();
00659
00660         if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00661         {
00662             auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00663
00664             if (selection)
00665             {
00666                 auto characterFormat = selection.CharacterFormat();
00667                 if (characterFormat.Bold() == winrt::FormatEffect::On)
00668                 {
00669                     characterFormat.Bold(winrt::FormatEffect::Off);
00670                 }
00671                 else
00672                 {
00673                     characterFormat.Bold(winrt::FormatEffect::On);
00674                 }
00675             }
00676         }
00677     }
00678 }
00679
00680 void TextCommandBarFlyout::ExecuteItalicCommand()
00681 {
00682     if (!m_isSettingToggleButtonState)
00683     {
00684         auto target = Target();
00685
00686         if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00687         {
00688             auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00689
00690             if (selection)
00691             {
00692                 auto characterFormat = selection.CharacterFormat();
00693                 if (characterFormat.Italic() == winrt::FormatEffect::On)
00694                 {
00695                     characterFormat.Italic(winrt::FormatEffect::Off);
00696                 }
00697                 else
00698                 {
00699                     characterFormat.Italic(winrt::FormatEffect::On);
00700                 }
00701             }
00702         }
00703     }
00704 }
00705
00706 void TextCommandBarFlyout::ExecuteUnderlineCommand()
00707 {
00708     if (!m_isSettingToggleButtonState)
00709     {
00710         auto target = Target();
00711
00712         if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00713         {
00714             auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00715
00716             if (selection)
00717             {
00718                 auto characterFormat = selection.CharacterFormat();
00719                 if (characterFormat.Underline() == winrt::UnderlineType::None || characterFormat.Underline() == winrt::UnderlineType::Undefined)
00720                 {
00721                     characterFormat.Underline(winrt::UnderlineType::Single);
00722                 }
00723                 else
00724                 {
00725                     characterFormat.Underline(winrt::UnderlineType::None);
00726                 }
00727             }
00728         }
00729     }
00730 }
00731
00732 void TextCommandBarFlyout::ExecuteUndoCommand()
00733 {
00734     auto target = Target();
00735
00736     if (auto textBoxTarget = target.try_as<winrt::TextBox>())
00737     {
00738         textBoxTarget.Undo();
00739     }
00740     else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00741     {
00742         richEditBoxTarget.Document().Undo();
00743     }
00744
00745     if (IsButtonInPrimaryCommands(TextControlButtons::Undo))
00746     {
00747         UpdateButtons();
00748     }
00749 }
00750
00751 void TextCommandBarFlyout::ExecuteRedoCommand()
00752 {
00753     auto target = Target();
00754
00755     if (auto textBoxTarget = target.try_as<winrt::TextBox>())
00756     {
00757         textBoxTarget.Redo();
00758     }
00759     else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00760     {
00761         richEditBoxTarget.Document().Redo();
00762     }
00763
00764     if (IsButtonInPrimaryCommands(TextControlButtons::Redo))
00765     {
00766         UpdateButtons();
00767     }
00768 }
00769
00770 void TextCommandBarFlyout::ExecuteSelectAllCommand()
00771 {
00772     auto target = Target();
00773
00774     if (auto textBoxTarget = target.try_as<winrt::TextBox>())
00775     {
00776         textBoxTarget.SelectAll();
00777     }
00778     else if (auto textBlockTarget = target.try_as<winrt::TextBlock>())
00779     {
00780         textBlockTarget.SelectAll();
00781     }
00782     else if (auto richEditBoxTarget = target.try_as<winrt::RichEditBox>())
00783     {
00784         auto selection{ SharedHelpers::GetRichTextSelection(richEditBoxTarget) };
00785
00786         if (selection)
00787         {
00788             selection.Expand(winrt::TextRangeUnit::Story);
00789         }
00790     }
00791     else if (auto richTextBlockTarget = target.try_as<winrt::RichTextBlock>())
00792     {
00793         richTextBlockTarget.SelectAll();
00794     }
00795     else if (auto richTextBlockOverflowTarget = target.try_as<winrt::RichTextBlockOverflow>())
00796     {
00797         if (auto richTextBlockSource = richTextBlockOverflowTarget.ContentSource())
00798         {
00799             richTextBlockSource.SelectAll();
00800         }
00801     }
00802     else if (auto passwordBoxTarget = target.try_as<winrt::PasswordBox>())
00803     {
00804         passwordBoxTarget.SelectAll();
00805     }
00806
00807     if (IsButtonInPrimaryCommands(TextControlButtons::SelectAll))
00808     {
00809         UpdateButtons();
00810     }
00811 }
00812
00813 winrt::ICommandBarElement TextCommandBarFlyout::GetButton(TextControlButtons textControlButton)
00814 {
00815     const auto foundButton = m_buttons.find(textControlButton);
00816
00817     if (foundButton != m_buttons.end())
00818     {
00819         return foundButton->second;
00820     }
00821     else
00822     {
00823         switch (textControlButton)
00824         {
00825         case TextControlButtons::Cut:
00826             {
00827                 winrt::AppBarButton button;
00828                 const auto executeFunc = [this]() { ExecuteCutCommand(); };
00829                 InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Cut), executeFunc);
00830                 m_buttons[TextControlButtons::Cut] = button;
00831                 return button;
00832             }
00833         case TextControlButtons::Copy:
00834             {
00835                 winrt::AppBarButton button;
00836                 const auto executeFunc = [this]() { ExecuteCopyCommand(); };
00837                 InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Copy), executeFunc);
00838                 m_buttons[TextControlButtons::Copy] = button;
00839                 return button;
00840             }
00841         case TextControlButtons::Paste:
00842             {
00843                 winrt::AppBarButton button;
00844                 const auto executeFunc = [this]() { ExecutePasteCommand(); };
00845                 InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Paste), executeFunc);
00846                 m_buttons[TextControlButtons::Paste] = button;
00847                 return button;
00848             }
00849         // Bold, Italic, and Underline don't have command library commands associated with them,
00850         // so we'll just unconditionally initialize them with properties.
00851         case TextControlButtons::Bold:
00852             {
00853                 winrt::AppBarToggleButton button;
00854                 InitializeButtonWithProperties(
00855                     button,
00856                     SR_TextCommandLabelBold,
00857                     winrt::Symbol::Bold,
00858                     SR_TextCommandKeyboardAcceleratorKeyBold,
00859                     SR_TextCommandDescriptionBold,
00860                     [this]() { ExecuteBoldCommand(); });
00861
00862                 m_buttons[TextControlButtons::Bold] = button;
00863                 return button;
00864             }
00865         case TextControlButtons::Italic:
00866             {
00867                 winrt::AppBarToggleButton button;
00868                 InitializeButtonWithProperties(
00869                     button,
00870                     SR_TextCommandLabelItalic,
00871                     winrt::Symbol::Italic,
00872                     SR_TextCommandKeyboardAcceleratorKeyItalic,
00873                     SR_TextCommandDescriptionItalic,
00874                     [this]() { ExecuteItalicCommand(); });
00875
00876                 m_buttons[TextControlButtons::Italic] = button;
00877                 return button;
00878             }
00879         case TextControlButtons::Underline:
00880             {
00881                 winrt::AppBarToggleButton button;
00882                 InitializeButtonWithProperties(
00883                     button,
00884                     SR_TextCommandLabelUnderline,
00885                     winrt::Symbol::Underline,
00886                     SR_TextCommandKeyboardAcceleratorKeyUnderline,
00887                     SR_TextCommandDescriptionUnderline,
00888                     [this]() { ExecuteUnderlineCommand(); });
00889
00890                 m_buttons[TextControlButtons::Underline] = button;
00891                 return button;
00892             }
00893         case TextControlButtons::Undo:
00894             {
00895                 winrt::AppBarButton button;
00896                 const auto executeFunc = [this]() { ExecuteUndoCommand(); };
00897                 InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Undo), executeFunc);
00898                 m_buttons[TextControlButtons::Undo] = button;
00899                 return button;
00900             }
00901         case TextControlButtons::Redo:
00902             {
00903                 winrt::AppBarButton button;
00904                 const auto executeFunc = [this]() { ExecuteRedoCommand(); };
00905                 InitializeButtonWithUICommand(button, winrt::StandardUICommand(winrt::StandardUICommandKind::Redo), executeFunc);
00906                 m_buttons[TextControlButtons::Redo] = button;
00907                 return button;
00908             }
00909         case TextControlButtons::SelectAll:
00910             {
00911                 winrt::AppBarButton button;
00912                 const auto executeFunc = [this]() { ExecuteSelectAllCommand(); };
00913
00914                 auto command = winrt::StandardUICommand(winrt::StandardUICommandKind::SelectAll);
00915                 command.IconSource(nullptr);
00916
00917                 InitializeButtonWithUICommand(button, command, executeFunc);
00918
00919                 m_buttons[TextControlButtons::SelectAll] = button;
00920                 return button;
00921             }
00922         default:
00923             MUX_ASSERT(false);
00924             return nullptr;
00925         }
00926     }
00927 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColumnMajorUniformToLargestGridLayout.properties.cpp Source File

  • File List
  • File Members
  • Generated

ColumnMajorUniformToLargestGridLayout.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ColumnMajorUniformToLargestGridLayout.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ColumnMajorUniformToLargestGridLayout)
00012 }
00013
00014 #include "ColumnMajorUniformToLargestGridLayout.g.cpp"
00015
00016 GlobalDependencyProperty ColumnMajorUniformToLargestGridLayoutProperties::s_ColumnSpacingProperty{ nullptr };
00017 GlobalDependencyProperty ColumnMajorUniformToLargestGridLayoutProperties::s_MaxColumnsProperty{ nullptr };
00018 GlobalDependencyProperty ColumnMajorUniformToLargestGridLayoutProperties::s_RowSpacingProperty{ nullptr };
00019
00020 ColumnMajorUniformToLargestGridLayoutProperties::ColumnMajorUniformToLargestGridLayoutProperties()
00021 {
00022     EnsureProperties();
00023 }
00024
00025 void ColumnMajorUniformToLargestGridLayoutProperties::EnsureProperties()
00026 {
00027     if (!s_ColumnSpacingProperty)
00028     {
00029         s_ColumnSpacingProperty =
00030             InitializeDependencyProperty(
00031                 L"ColumnSpacing",
00032                 winrt::name_of<double>(),
00033                 winrt::name_of<winrt::ColumnMajorUniformToLargestGridLayout>(),
00034                 false /* isAttached */,
00035                 ValueHelper<double>::BoxedDefaultValue(),
00036                 winrt::PropertyChangedCallback(&OnColumnSpacingPropertyChanged));
00037     }
00038     if (!s_MaxColumnsProperty)
00039     {
00040         s_MaxColumnsProperty =
00041             InitializeDependencyProperty(
00042                 L"MaxColumns",
00043                 winrt::name_of<int>(),
00044                 winrt::name_of<winrt::ColumnMajorUniformToLargestGridLayout>(),
00045                 false /* isAttached */,
00046                 ValueHelper<int>::BoxedDefaultValue(),
00047                 winrt::PropertyChangedCallback(&OnMaxColumnsPropertyChanged));
00048     }
00049     if (!s_RowSpacingProperty)
00050     {
00051         s_RowSpacingProperty =
00052             InitializeDependencyProperty(
00053                 L"RowSpacing",
00054                 winrt::name_of<double>(),
00055                 winrt::name_of<winrt::ColumnMajorUniformToLargestGridLayout>(),
00056                 false /* isAttached */,
00057                 ValueHelper<double>::BoxedDefaultValue(),
00058                 winrt::PropertyChangedCallback(&OnRowSpacingPropertyChanged));
00059     }
00060 }
00061
00062 void ColumnMajorUniformToLargestGridLayoutProperties::ClearProperties()
00063 {
00064     s_ColumnSpacingProperty = nullptr;
00065     s_MaxColumnsProperty = nullptr;
00066     s_RowSpacingProperty = nullptr;
00067 }
00068
00069 void ColumnMajorUniformToLargestGridLayoutProperties::OnColumnSpacingPropertyChanged(
00070     winrt::DependencyObject const& sender,
00071     winrt::DependencyPropertyChangedEventArgs const& args)
00072 {
00073     auto owner = sender.as<winrt::ColumnMajorUniformToLargestGridLayout>();
00074     winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->OnColumnSpacingPropertyChanged(args);
00075 }
00076
00077 void ColumnMajorUniformToLargestGridLayoutProperties::OnMaxColumnsPropertyChanged(
00078     winrt::DependencyObject const& sender,
00079     winrt::DependencyPropertyChangedEventArgs const& args)
00080 {
00081     auto owner = sender.as<winrt::ColumnMajorUniformToLargestGridLayout>();
00082
00083     auto value = winrt::unbox_value<int>(args.NewValue());
00084     auto coercedValue = value;
00085     winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->ValidateGreaterThanZero(coercedValue);
00086     if (value != coercedValue)
00087     {
00088         sender.SetValue(args.Property(), winrt::box_value<int>(coercedValue));
00089         return;
00090     }
00091
00092     winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->OnMaxColumnsPropertyChanged(args);
00093 }
00094
00095 void ColumnMajorUniformToLargestGridLayoutProperties::OnRowSpacingPropertyChanged(
00096     winrt::DependencyObject const& sender,
00097     winrt::DependencyPropertyChangedEventArgs const& args)
00098 {
00099     auto owner = sender.as<winrt::ColumnMajorUniformToLargestGridLayout>();
00100     winrt::get_self<ColumnMajorUniformToLargestGridLayout>(owner)->OnRowSpacingPropertyChanged(args);
00101 }
00102
00103 void ColumnMajorUniformToLargestGridLayoutProperties::ColumnSpacing(double value)
00104 {
00105     [[gsl::suppress(con)]]
00106     {
00107     static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->SetValue(s_ColumnSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00108     }
00109 }
00110
00111 double ColumnMajorUniformToLargestGridLayoutProperties::ColumnSpacing()
00112 {
00113     return ValueHelper<double>::CastOrUnbox(static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->GetValue(s_ColumnSpacingProperty));
00114 }
00115
00116 void ColumnMajorUniformToLargestGridLayoutProperties::MaxColumns(int value)
00117 {
00118     [[gsl::suppress(con)]]
00119     {
00120     int coercedValue = value;
00121     static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->ValidateGreaterThanZero(coercedValue);
00122     static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->SetValue(s_MaxColumnsProperty, ValueHelper<int>::BoxValueIfNecessary(coercedValue));
00123     }
00124 }
00125
00126 int ColumnMajorUniformToLargestGridLayoutProperties::MaxColumns()
00127 {
00128     return ValueHelper<int>::CastOrUnbox(static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->GetValue(s_MaxColumnsProperty));
00129 }
00130
00131 void ColumnMajorUniformToLargestGridLayoutProperties::RowSpacing(double value)
00132 {
00133     [[gsl::suppress(con)]]
00134     {
00135     static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->SetValue(s_RowSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00136     }
00137 }
00138
00139 double ColumnMajorUniformToLargestGridLayoutProperties::RowSpacing()
00140 {
00141     return ValueHelper<double>::CastOrUnbox(static_cast<ColumnMajorUniformToLargestGridLayout*>(this)->GetValue(s_RowSpacingProperty));
00142 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/InteractionTests/ScrollViewTestsWithInputHelper.cs Source File

  • File List
  • File Members
  • ScrollView
  • InteractionTests

ScrollViewTestsWithInputHelper.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Threading;
00007 using Windows.UI.ViewManagement;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015
00016 using Microsoft.Windows.Apps.Test.Automation;
00017 using Microsoft.Windows.Apps.Test.Foundation;
00018 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00019 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00020 using Point = System.Drawing.Point;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00023 {
00024     [TestClass]
00025     public class ScrollViewTestsWithInputHelper
00026     {
00027         [ClassInitialize]
00028         [TestProperty("RunAs", "User")]
00029         [TestProperty("Classification", "Integration")]
00030         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00031         public static void ClassInitialize(TestContext testContext)
00032         {
00033             TestEnvironment.Initialize(testContext);
00034         }
00035
00036         [TestCleanup]
00037         public void TestCleanup()
00038         {
00039             TestCleanupHelper.Cleanup();
00040         }
00041
00042         [TestMethod]
00043         [TestProperty("Description", "Pans an Image in a ScrollView.")]
00044         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00045         public void PanScrollViewer()
00046         {
00047             const double minHorizontalScrollPercent = 35.0;
00048             const double minVerticalScrollPercent = 35.0;
00049
00050             Log.Comment("Selecting ScrollView tests");
00051
00052             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00053             {
00054                 Log.Comment("Retrieving cmbShowScrollView");
00055                 ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
00056                 Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");
00057
00058                 Log.Comment("Changing ScrollView selection to scrollView51");
00059                 cmbShowScrollView.SelectItemByName("scrollView_51");
00060                 Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);
00061
00062                 Log.Comment("Retrieving img51");
00063                 UIObject img51UIObject = FindElement.ByName("img51");
00064                 Verify.IsNotNull(img51UIObject, "Verifying that img51 was found");
00065
00066                 Log.Comment("Retrieving scrollPresenter51");
00067                 ScrollPresenter scrollPresenter51 = new ScrollPresenter(img51UIObject.Parent);
00068                 Verify.IsNotNull(scrollPresenter51, "Verifying that scrollPresenter51 was found");
00069
00070                 WaitForScrollViewFinalSize(scrollPresenter51, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);
00071
00072                 // Tapping button before attempting pan operation to guarantee effective touch input
00073                 TapResetViewsButton();
00074
00075                 Log.Comment("Panning ScrollView in diagonal");
00076                 PrepareForScrollViewManipulationStart();
00077
00078                 InputHelper.Pan(
00079                     scrollPresenter51,
00080                     new Point(scrollPresenter51.BoundingRectangle.Left + 25, scrollPresenter51.BoundingRectangle.Top + 25),
00081                     new Point(scrollPresenter51.BoundingRectangle.Left - 25, scrollPresenter51.BoundingRectangle.Top - 25));
00082
00083                 Log.Comment("Waiting for scrollView51 pan completion");
00084                 WaitForScrollViewManipulationEnd("scrollView51");
00085
00086                 Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
00087                 Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);
00088
00089                 if (scrollPresenter51.HorizontalScrollPercent <= minHorizontalScrollPercent || scrollPresenter51.VerticalScrollPercent <= minVerticalScrollPercent)
00090                 {
00091                     LogAndClearTraces();
00092                 }
00093
00094                 Verify.IsTrue(scrollPresenter51.HorizontalScrollPercent > minHorizontalScrollPercent, "Verifying scrollPresenter51 HorizontalScrollPercent is greater than " + minHorizontalScrollPercent + "%");
00095                 Verify.IsTrue(scrollPresenter51.VerticalScrollPercent > minVerticalScrollPercent, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + minVerticalScrollPercent + "%");
00096
00097                 // scrollPresenter51's Content size is 800x800px.
00098                 double horizontalOffset;
00099                 double verticalOffset;
00100                 double minHorizontalOffset = 800.0 * (1.0 - scrollPresenter51.HorizontalViewSize / 100.0) * minHorizontalScrollPercent / 100.0;
00101                 double minVerticalOffset = 800.0 * (1.0 - scrollPresenter51.VerticalViewSize / 100.0) * minVerticalScrollPercent / 100.0;
00102                 float zoomFactor;
00103
00104                 GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
00105                 Log.Comment("horizontalOffset={0}", horizontalOffset);
00106                 Log.Comment("verticalOffset={0}", verticalOffset);
00107                 Log.Comment("zoomFactor={0}", zoomFactor);
00108                 Verify.IsTrue(horizontalOffset > minHorizontalOffset, "Verifying horizontalOffset is greater than " + minHorizontalOffset);
00109                 Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
00110                 Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");
00111
00112                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
00113             }
00114         }
00115
00116         [TestMethod]
00117         [TestProperty("Description", "Scrolls an Image in a ScrollView using the mouse on the ScrollBar thumb, then pans it with touch.")]
00118         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)] // Touch input injection is only supported on RS5 and up
00119         public void ScrollThenPanScrollView()
00120         {
00121             Log.Comment("Selecting ScrollView tests");
00122
00123             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00124             {
00125                 const double minVerticalScrollPercentAfterScroll = 15.0;
00126                 const double minHorizontalScrollPercentAfterPan = 35.0;
00127                 const double minVerticalScrollPercentAfterPan = 50.0;
00128
00129                 double verticalScrollPercentAfterScroll = 0.0;
00130
00131                 Log.Comment("Retrieving cmbShowScrollView");
00132                 ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
00133                 Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");
00134
00135                 Log.Comment("Changing ScrollView selection to scrollView51");
00136                 cmbShowScrollView.SelectItemByName("scrollView_51");
00137                 Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);
00138
00139                 Log.Comment("Retrieving img51");
00140                 UIObject img51UIObject = FindElement.ByName("img51");
00141                 Verify.IsNotNull(img51UIObject, "Verifying that img51 was found");
00142
00143                 Log.Comment("Retrieving scrollPresenter51");
00144                 ScrollPresenter scrollPresenter51 = new ScrollPresenter(img51UIObject.Parent);
00145                 Verify.IsNotNull(scrollPresenter51, "Verifying that scrollPresenter51 was found");
00146
00147                 WaitForScrollViewFinalSize(scrollPresenter51, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);
00148
00149                 // Tapping button before attempting pan operation to guarantee effective touch input
00150                 TapResetViewsButton();
00151
00152                 Log.Comment("Left mouse buttom down over ScrollBar thumb");
00153                 InputHelper.LeftMouseButtonDown(scrollPresenter51, 140 /*offsetX*/, -100 /*offsetY*/);
00154
00155                 Log.Comment("Mouse drag and left mouse buttom up over ScrollBar thumb");
00156                 InputHelper.LeftMouseButtonUp(scrollPresenter51, 140 /*offsetX*/, -50 /*offsetY*/);
00157
00158                 Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
00159                 Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);
00160
00161                 verticalScrollPercentAfterScroll = scrollPresenter51.VerticalScrollPercent;
00162
00163                 if (scrollPresenter51.HorizontalScrollPercent != 0.0 || scrollPresenter51.VerticalScrollPercent <= minVerticalScrollPercentAfterScroll)
00164                 {
00165                     LogAndClearTraces();
00166                 }
00167
00168                 Verify.AreEqual(scrollPresenter51.HorizontalScrollPercent, 0.0, "Verifying scrollPresenter51 HorizontalScrollPercent is still 0%");
00169                 Verify.IsTrue(verticalScrollPercentAfterScroll > minVerticalScrollPercentAfterScroll, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + minVerticalScrollPercentAfterScroll + "%");
00170
00171                 Log.Comment("Panning ScrollView in diagonal");
00172                 PrepareForScrollViewManipulationStart();
00173
00174                 // Using a large enough span and duration for this diagonal pan so that it is not erroneously recognized as a horizontal pan.
00175                 InputHelper.Pan(
00176                     scrollPresenter51,
00177                     new Point(scrollPresenter51.BoundingRectangle.Left + 30, scrollPresenter51.BoundingRectangle.Top + 30),
00178                     new Point(scrollPresenter51.BoundingRectangle.Left - 30, scrollPresenter51.BoundingRectangle.Top - 30),
00179                     InputHelper.DefaultPanHoldDuration,
00180                     InputHelper.DefaultPanAcceleration / 2.4f);
00181
00182                 Log.Comment("Waiting for scrollView51 pan completion");
00183                 WaitForScrollViewManipulationEnd("scrollView51");
00184
00185                 Log.Comment("scrollPresenter51.HorizontalScrollPercent={0}", scrollPresenter51.HorizontalScrollPercent);
00186                 Log.Comment("scrollPresenter51.VerticalScrollPercent={0}", scrollPresenter51.VerticalScrollPercent);
00187
00188                 if (scrollPresenter51.HorizontalScrollPercent <= minHorizontalScrollPercentAfterPan ||
00189                     scrollPresenter51.VerticalScrollPercent <= minVerticalScrollPercentAfterPan ||
00190                     scrollPresenter51.VerticalScrollPercent <= verticalScrollPercentAfterScroll)
00191                 {
00192                     LogAndClearTraces();
00193                 }
00194
00195                 Verify.IsTrue(scrollPresenter51.HorizontalScrollPercent > minHorizontalScrollPercentAfterPan, "Verifying scrollPresenter51 HorizontalScrollPercent is greater than " + minHorizontalScrollPercentAfterPan + "%");
00196                 Verify.IsTrue(scrollPresenter51.VerticalScrollPercent > minVerticalScrollPercentAfterPan, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + minVerticalScrollPercentAfterPan + "%");
00197                 Verify.IsTrue(scrollPresenter51.VerticalScrollPercent > verticalScrollPercentAfterScroll, "Verifying scrollPresenter51 VerticalScrollPercent is greater than " + verticalScrollPercentAfterScroll + "%");
00198
00199                 // scrollPresenter51's Content size is 800x800px.
00200                 double horizontalOffset;
00201                 double verticalOffset;
00202                 double minHorizontalOffset = 800.0 * (1.0 - scrollPresenter51.HorizontalViewSize / 100.0) * minHorizontalScrollPercentAfterPan / 100.0;
00203                 double minVerticalOffset = 800.0 * (1.0 - scrollPresenter51.VerticalViewSize / 100.0) * minVerticalScrollPercentAfterPan / 100.0;
00204                 float zoomFactor;
00205
00206                 GetScrollPresenterView(out horizontalOffset, out verticalOffset, out zoomFactor);
00207                 Log.Comment("horizontalOffset={0}", horizontalOffset);
00208                 Log.Comment("verticalOffset={0}", verticalOffset);
00209                 Log.Comment("zoomFactor={0}", zoomFactor);
00210                 Verify.IsTrue(horizontalOffset > minHorizontalOffset, "Verifying horizontalOffset is greater than " + minHorizontalOffset);
00211                 Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
00212                 Verify.AreEqual(zoomFactor, 1.0f, "Verifying zoomFactor is 1.0f");
00213             }
00214         }
00215
00216         [TestMethod]
00217         [TestProperty("Description", "Tests Keyboard interaction (Up, Down, Left, Right, PageUp, PageDown, Home, End)")]
00218         public void VerifyScrollViewKeyboardInteraction()
00219         {
00220             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00221             {
00222                 UIObject buttonInScrollView11;
00223                 ScrollPresenter scrollPresenter11;
00224                 SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);
00225
00226                 var scrollAmountForDownOrUpKey = scrollPresenter11.BoundingRectangle.Height * 0.15;
00227                 var scrollAmountForPageUpOrPageDownKey = scrollPresenter11.BoundingRectangle.Height;
00228                 var scrollAmountForRightOrLeftKey = scrollPresenter11.BoundingRectangle.Width * 0.15;
00229                 var maxScrollOffset = 2000 - scrollPresenter11.BoundingRectangle.Height;
00230
00231                 double expectedVerticalOffset = 0;
00232                 double expectedHorizontalOffset = 0;
00233
00234                 Log.Comment("Pressing Down key");
00235                 KeyboardHelper.PressKey(buttonInScrollView11, Key.Down, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00236                 expectedVerticalOffset += scrollAmountForDownOrUpKey;
00237                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00238
00239                 Log.Comment("Pressing PageDown key");
00240                 KeyboardHelper.PressKey(buttonInScrollView11, Key.PageDown, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00241                 expectedVerticalOffset += scrollAmountForPageUpOrPageDownKey;
00242                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00243
00244                 Log.Comment("Pressing Home key");
00245                 KeyboardHelper.PressKey(buttonInScrollView11, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00246                 expectedVerticalOffset = 0;
00247                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00248
00249                 Log.Comment("Pressing End key");
00250                 KeyboardHelper.PressKey(buttonInScrollView11, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00251                 expectedVerticalOffset = maxScrollOffset;
00252                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00253
00254                 Log.Comment("Pressing Up key");
00255                 KeyboardHelper.PressKey(buttonInScrollView11, Key.Up, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00256                 expectedVerticalOffset -= scrollAmountForDownOrUpKey;
00257                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00258
00259                 Log.Comment("Pressing PageUp key");
00260                 KeyboardHelper.PressKey(buttonInScrollView11, Key.PageUp, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00261                 expectedVerticalOffset -= scrollAmountForPageUpOrPageDownKey;
00262                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00263
00264                 Log.Comment("Pressing Right key");
00265                 KeyboardHelper.PressKey(buttonInScrollView11, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00266                 expectedHorizontalOffset += scrollAmountForRightOrLeftKey;
00267                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00268
00269                 Log.Comment("Pressing Left key");
00270                 KeyboardHelper.PressKey(buttonInScrollView11, Key.Left, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00271                 expectedHorizontalOffset -= scrollAmountForRightOrLeftKey;
00272                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00273
00274                 Log.Comment("Pressing Down key three times");
00275                 KeyboardHelper.PressKey(buttonInScrollView11, Key.Down, modifierKey: ModifierKey.None, numPresses: 3, useDebugMode: true);
00276                 expectedVerticalOffset += 3 * scrollAmountForDownOrUpKey;
00277                 WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00278             }
00279         }
00280
00281         [TestMethod]
00282         [TestProperty("Description", "Verifies keyboard input is ignored when ScrollView.IgnoredInputKinds is Keyboard.")]
00283         public void VerifyScrollViewIgnoresKeyboardInput()
00284         {
00285             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00286             {
00287                 UIObject img51;
00288                 ScrollPresenter scrollPresenter51;
00289
00290                 SetupScrollViewTestWithImage("51", out img51, out scrollPresenter51);
00291
00292                 Log.Comment("Retrieving cmbIgnoredInputKinds");
00293                 ComboBox cmbIgnoredInputKinds = new ComboBox(FindElement.ByName("cmbIgnoredInputKinds"));
00294                 Verify.IsNotNull(cmbIgnoredInputKinds, "Verifying that cmbIgnoredInputKinds was found");
00295
00296                 Log.Comment("Changing ScrollView.IgnoredInputKinds to Keyboard");
00297                 cmbIgnoredInputKinds.SelectItemByName("Keyboard");
00298                 Log.Comment("Selection is now {0}", cmbIgnoredInputKinds.Selection[0].Name);
00299
00300                 Log.Comment("Pressing Down key");
00301                 KeyboardHelper.PressKey(scrollPresenter51, Key.Down, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00302                 VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);
00303
00304                 Log.Comment("Pressing Right key");
00305                 KeyboardHelper.PressKey(scrollPresenter51, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00306                 VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);
00307             }
00308         }
00309
00310         [TestMethod]
00311         [TestProperty("Description", "Tests keyboard interaction (Down, Up, PageDown, PageUp, End, Home, Right, Left) when ScrollView.XYFocusKeyboardNavigation is Enabled.")]
00312         public void VerifyScrollViewKeyboardInteractionWithXYFocusEnabled()
00313         {
00314             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00315             {
00316                 UIObject img51;
00317                 ScrollPresenter scrollPresenter51;
00318
00319                 SetupScrollViewTestWithImage("51", out img51, out scrollPresenter51);
00320
00321                 var scrollAmountForDownOrUpKey = scrollPresenter51.BoundingRectangle.Height * 0.5;
00322                 var scrollAmountForPageUpOrPageDownKey = scrollPresenter51.BoundingRectangle.Height;
00323                 var scrollAmountForRightOrLeftKey = scrollPresenter51.BoundingRectangle.Width * 0.5;
00324                 var maxScrollOffset = 800 - scrollPresenter51.BoundingRectangle.Height;
00325
00326                 Log.Comment("Pressing Down key");
00327                 KeyboardHelper.PressKey(scrollPresenter51, Key.Down, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00328                 WaitForScrollViewOffsets(0, scrollAmountForDownOrUpKey);
00329
00330                 Log.Comment("Pressing Up key");
00331                 KeyboardHelper.PressKey(scrollPresenter51, Key.Up, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00332                 WaitForScrollViewOffsets(0, 0);
00333
00334                 Log.Comment("Pressing PageDown key");
00335                 KeyboardHelper.PressKey(scrollPresenter51, Key.PageDown, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00336                 WaitForScrollViewOffsets(0, scrollAmountForPageUpOrPageDownKey);
00337
00338                 Log.Comment("Pressing PageUp key");
00339                 KeyboardHelper.PressKey(scrollPresenter51, Key.PageUp, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00340                 WaitForScrollViewOffsets(0, 0);
00341
00342                 Log.Comment("Pressing End key");
00343                 KeyboardHelper.PressKey(scrollPresenter51, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00344                 WaitForScrollViewOffsets(0, maxScrollOffset);
00345
00346                 Log.Comment("Pressing Home key");
00347                 KeyboardHelper.PressKey(scrollPresenter51, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00348                 WaitForScrollViewOffsets(0, 0);
00349
00350                 Log.Comment("Pressing Right key");
00351                 KeyboardHelper.PressKey(scrollPresenter51, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00352                 WaitForScrollViewOffsets(scrollAmountForRightOrLeftKey, 0);
00353
00354                 Log.Comment("Pressing Left key");
00355                 KeyboardHelper.PressKey(scrollPresenter51, Key.Left, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00356                 WaitForScrollViewOffsets(0, 0);
00357             }
00358         }
00359
00360         [TestMethod]
00361         [TestProperty("Description", "Tests End and Home keys when ScrollView.VerticalScrollMode is Disabled.")]
00362         public void ScrollHorizontallyWithEndHomeKeys()
00363         {
00364             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00365             {
00366                 UIObject img31;
00367                 ScrollPresenter scrollPresenter31;
00368
00369                 SetupScrollViewTestWithImage("31", out img31, out scrollPresenter31);
00370
00371                 Log.Comment("Pressing End key");
00372                 KeyboardHelper.PressKey(scrollPresenter31, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00373                 WaitForScrollViewOffsets(900 - scrollPresenter31.BoundingRectangle.Width, 0);
00374
00375                 Log.Comment("Pressing Home key");
00376                 KeyboardHelper.PressKey(scrollPresenter31, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00377                 WaitForScrollViewOffsets(0, 0);
00378             }
00379         }
00380
00381         [TestMethod]
00382         [TestProperty("Description", "Tests End and Home keys when ScrollView.VerticalScrollMode is Disabled in RightToLeft flow direction.")]
00383         public void ScrollHorizontallyWithEndHomeKeysInRTL()
00384         {
00385             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00386             {
00387                 UIObject img32;
00388                 ScrollPresenter scrollPresenter32;
00389
00390                 SetupScrollViewTestWithImage("32", out img32, out scrollPresenter32);
00391
00392                 Log.Comment("Pressing Home key");
00393                 KeyboardHelper.PressKey(scrollPresenter32, Key.Home, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00394                 WaitForScrollViewOffsets(900 - scrollPresenter32.BoundingRectangle.Width, 0);
00395
00396                 Log.Comment("Pressing End key");
00397                 KeyboardHelper.PressKey(scrollPresenter32, Key.End, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
00398                 WaitForScrollViewOffsets(0, 0);
00399             }
00400         }
00401
00402         [TestMethod]
00403         [TestProperty("Description", "Tests GamePad interaction")]
00404         public void VerifyScrollViewGamePadInteraction()
00405         {
00406             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00407             {
00408                 using (var loggingHelper = new LoggingHelper(this))
00409                 {
00410                     UISettings settings = new UISettings();
00411                     bool areAnimationsEnabled = settings.AnimationsEnabled;
00412
00413                     UIObject buttonInScrollView11;
00414                     ScrollPresenter scrollPresenter11;
00415                     SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);
00416
00417                     Log.Comment("Tapping Button 1");
00418                     InputHelper.Tap(buttonInScrollView11);
00419
00420                     Log.Comment($"Focused element. Expected=Button 1, Actual={UIObject.Focused.Name}.");
00421                     Verify.AreEqual("Button 1", UIObject.Focused.Name, "Verify focused element");
00422
00423                     var scrollAmountForGamepadUpDown = scrollPresenter11.BoundingRectangle.Height * 0.5;
00424                     Log.Comment($"scrollAmountForGamepadUpDown={scrollAmountForGamepadUpDown}.");
00425
00426                     double expectedVerticalOffset = 0;
00427                     double expectedHorizontalOffset = 0;
00428                     int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;
00429
00430                     //Down. Change focus. Don't scroll.
00431                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 2", expectedHorizontalOffset, expectedVerticalOffset, 0);
00432
00433                     //Down. Change focus. Scroll.
00434                     expectedVerticalOffset = 220;
00435                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00436
00437                     //Down. Don't change focus. Scroll.
00438                     expectedVerticalOffset += scrollAmountForGamepadUpDown;
00439                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00440
00441                     //Down. Change focus. Scroll.
00442                     expectedVerticalOffset = 920;
00443                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 4", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00444
00445                     //Down. Change focus. Scroll.
00446                     expectedVerticalOffset = 1020;
00447                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickDown, "Button 5", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00448
00449                     //Up. Change focus. Don't scroll.
00450                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickUp, "Button 4", expectedHorizontalOffset, expectedVerticalOffset, 0);
00451
00452                     //Up. Don't change focus. Scroll.
00453                     expectedVerticalOffset -= scrollAmountForGamepadUpDown;
00454                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickUp, "Button 4", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00455
00456                     //Up. Change focus. Scroll.
00457                     expectedVerticalOffset = 480;
00458                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickUp, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00459                 }
00460             }
00461         }
00462
00463         [TestMethod]
00464         [TestProperty("Description", "Verifies gamepad input is ignored when ScrollView.IgnoredInputKinds is Gamepad.")]
00465         public void VerifyScrollViewIgnoresGamepadInput()
00466         {
00467             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00468             {
00469                 UIObject img51;
00470                 ScrollPresenter scrollPresenter51;
00471
00472                 SetupScrollViewTestWithImage("51", out img51, out scrollPresenter51);
00473
00474                 Log.Comment("Retrieving cmbIgnoredInputKinds");
00475                 ComboBox cmbIgnoredInputKinds = new ComboBox(FindElement.ByName("cmbIgnoredInputKinds"));
00476                 Verify.IsNotNull(cmbIgnoredInputKinds, "Verifying that cmbIgnoredInputKinds was found");
00477
00478                 Log.Comment("Changing ScrollView.IgnoredInputKinds to Gamepad");
00479                 cmbIgnoredInputKinds.SelectItemByName("Gamepad");
00480                 Log.Comment("Selection is now {0}", cmbIgnoredInputKinds.Selection[0].Name);
00481
00482                 Log.Comment("Pressing LeftThumbstick Down");
00483                 GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickDown);
00484
00485                 Log.Comment("Pressing LeftThumbstick Down");
00486                 GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickDown);
00487                 VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);
00488
00489                 Log.Comment("Pressing LeftThumbstick Right");
00490                 GamepadHelper.PressButton(null, GamepadButton.LeftThumbstickRight);
00491                 VerifyScrollViewRemainsAtView(0.0, 0.0, 1.0f);
00492             }
00493         }
00494
00495         [TestMethod]
00496         [TestProperty("Description", "Tests GamePad interaction")]
00497         [TestProperty("Ignore", "True")] // Disabled due to #37221240
00498         public void VerifyScrollViewGamePadHorizontalInteraction()
00499         {
00500             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00501             {
00502                 using (var loggingHelper = new LoggingHelper(this))
00503                 {
00504                     UISettings settings = new UISettings();
00505                     bool areAnimationsEnabled = settings.AnimationsEnabled;
00506
00507                     UIObject buttonInScrollView11;
00508                     ScrollPresenter scrollPresenter11;
00509                     SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);
00510
00511                     var scrollAmountForGamepadLeftRight = scrollPresenter11.BoundingRectangle.Width * 0.5;
00512
00513                     double expectedVerticalOffset = 0;
00514                     double expectedHorizontalOffset = 0;
00515                     int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;
00516
00517                     //Right. Change focus. Don't scroll.
00518                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1B", expectedHorizontalOffset, expectedVerticalOffset, 0);
00519
00520                     //Left. Change focus. Don't scroll.
00521                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickLeft, "Button 1", expectedHorizontalOffset, expectedVerticalOffset, 0);
00522
00523                     //Right. Change focus. Don't scroll.
00524                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1B", expectedHorizontalOffset, expectedVerticalOffset, 0);
00525
00526                     //Right. Change focus. Scroll.
00527                     expectedHorizontalOffset = 320;
00528                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00529
00530                     //Right. Don't Change focus. Scroll.
00531                     expectedHorizontalOffset += scrollAmountForGamepadLeftRight;
00532                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00533
00534                     //Right. Don't Change focus. Scroll.
00535                     expectedHorizontalOffset += scrollAmountForGamepadLeftRight;
00536                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickRight, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00537
00538                     //Left. Don't Change focus. Scroll.
00539                     expectedHorizontalOffset -= scrollAmountForGamepadLeftRight;
00540                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickLeft, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00541
00542                     //Left. Change focus. Scroll.
00543                     expectedHorizontalOffset = 80;
00544                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftThumbstickLeft, "Button 1B", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00545                 }
00546             }
00547         }
00548
00549         [TestMethod]
00550         [TestProperty("Description", "Tests GamePad interaction")]
00551         public void VerifyScrollViewGamePadTriggerInteraction()
00552         {
00553             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00554             {
00555                 using (var loggingHelper = new LoggingHelper(this))
00556                 {
00557                     UISettings settings = new UISettings();
00558                     bool areAnimationsEnabled = settings.AnimationsEnabled;
00559
00560                     UIObject buttonInScrollView11;
00561                     ScrollPresenter scrollPresenter11;
00562                     SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);
00563
00564                     var scrollAmountForGamepadTrigger = scrollPresenter11.BoundingRectangle.Height;
00565
00566                     double expectedVerticalOffset = 0;
00567                     double expectedHorizontalOffset = 0;
00568                     int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;
00569
00570                     //Down. Change focus. Scroll.
00571                     expectedVerticalOffset = areAnimationsEnabled ? scrollAmountForGamepadTrigger : 220.0;
00572                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightTrigger, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00573
00574                     //Down. Don't change focus. Scroll.
00575                     expectedVerticalOffset += scrollAmountForGamepadTrigger;
00576                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightTrigger, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00577
00578                     //Up. Don't change focus. Scroll.
00579                     expectedVerticalOffset -= scrollAmountForGamepadTrigger;
00580                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftTrigger, "Button 3", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00581
00582                     double actualHorizontalOffset;
00583                     double actualVerticalOffset;
00584                     float actualZoomFactor;
00585                     GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
00586
00587                     //Up. Change focus. Scroll.
00588                     expectedVerticalOffset = 0;
00589                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftTrigger, actualVerticalOffset < scrollAmountForGamepadTrigger ? "Button 1" : "Button 2", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00590                 }
00591             }
00592         }
00593
00594         [TestMethod]
00595         [TestProperty("Description", "Tests GamePad interaction")]
00596         public void VerifyScrollViewGamePadBumperInteraction()
00597         {
00598             using (var setup = new TestSetupHelper(new[] { "ScrollView Tests", "navigateToSimpleContents" }))
00599             {
00600                 using (var loggingHelper = new LoggingHelper(this))
00601                 {
00602                     UISettings settings = new UISettings();
00603                     bool areAnimationsEnabled = settings.AnimationsEnabled;
00604
00605                     UIObject buttonInScrollView11;
00606                     ScrollPresenter scrollPresenter11;
00607                     SetupSimpleSingleScrollViewTest(out buttonInScrollView11, out scrollPresenter11);
00608
00609                     var scrollAmountForBumper = scrollPresenter11.BoundingRectangle.Width;
00610
00611                     double expectedVerticalOffset = 0;
00612                     double expectedHorizontalOffset = 0;
00613                     int? expectedViewChangeCount = areAnimationsEnabled ? null : (int?)1;
00614
00615                     //Right. Change focus. Scroll.
00616                     expectedHorizontalOffset = areAnimationsEnabled ? scrollAmountForBumper : 320.0;
00617                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightShoulder, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00618
00619                     //Right. Don't change focus. Scroll.
00620                     expectedHorizontalOffset += scrollAmountForBumper;
00621                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.RightShoulder, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00622
00623                     //Left. Don't change focus. Scroll.
00624                     expectedHorizontalOffset -= scrollAmountForBumper;
00625                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftShoulder, "Button 1C", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00626
00627                     double actualHorizontalOffset;
00628                     double actualVerticalOffset;
00629                     float actualZoomFactor;
00630                     GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
00631
00632                     //Left. Change focus. Scroll.
00633                     expectedHorizontalOffset = areAnimationsEnabled ? 0 : 80.0;
00634                     PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton.LeftShoulder, actualHorizontalOffset > scrollAmountForBumper ? "Button 1B" : "Button 1", expectedHorizontalOffset, expectedVerticalOffset, expectedViewChangeCount);
00635                 }
00636             }
00637         }
00638
00639         private void SetupSimpleSingleScrollViewTest(out UIObject buttonInScrollView11, out ScrollPresenter scrollPresenter11)
00640         {
00641             Log.Comment("Retrieving cmbShowScrollView");
00642             ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
00643             Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");
00644
00645             Log.Comment("Changing ScrollView selection to scrollView11");
00646             cmbShowScrollView.SelectItemByName("scrollView_11");
00647             Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);
00648
00649             Log.Comment("Retrieving buttonInScrollView11");
00650             buttonInScrollView11 = FindElement.ById("buttonInScrollView11");
00651             Verify.IsNotNull(buttonInScrollView11, "Verifying that buttonInScrollView11 was found");
00652
00653             Log.Comment("Retrieving scrollPresenter11");
00654             scrollPresenter11 = new ScrollPresenter(buttonInScrollView11.Parent);
00655             Verify.IsNotNull(scrollPresenter11, "Verifying that scrollPresenter11 was found");
00656
00657             WaitForScrollViewFinalSize(scrollPresenter11, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);
00658
00659             buttonInScrollView11.Click();
00660             Wait.ForIdle();
00661         }
00662
00663         private void SetupScrollViewTestWithImage(string suffix, out UIObject imageInScrollView, out ScrollPresenter scrollPresenter)
00664         {
00665             Log.Comment("Retrieving cmbShowScrollView");
00666             ComboBox cmbShowScrollView = new ComboBox(FindElement.ByName("cmbShowScrollView"));
00667             Verify.IsNotNull(cmbShowScrollView, "Verifying that cmbShowScrollView was found");
00668
00669             Log.Comment("Changing ScrollView selection to scrollView" + suffix);
00670             cmbShowScrollView.SelectItemByName("scrollView_" + suffix);
00671             Log.Comment("Selection is now {0}", cmbShowScrollView.Selection[0].Name);
00672
00673             Log.Comment("Retrieving img" + suffix);
00674             imageInScrollView = FindElement.ById("img" + suffix);
00675             Verify.IsNotNull(imageInScrollView, "Verifying that img" + suffix + " was found");
00676
00677             Log.Comment("Retrieving ScrollPresenter");
00678             scrollPresenter = new ScrollPresenter(imageInScrollView.Parent);
00679             Verify.IsNotNull(scrollPresenter, "Verifying that ScrollPresenter was found");
00680
00681             WaitForScrollViewFinalSize(scrollPresenter, 300.0 /*expectedWidth*/, 400.0 /*expectedHeight*/);
00682
00683             imageInScrollView.Click();
00684             Wait.ForIdle();
00685         }
00686
00687         private void PressGamepadButtonAndVerifyOffsetAndFocus(
00688             GamepadButton gamepadButton,
00689             string expectedFocusedItemName,
00690             double expectedHorizontalOffset,
00691             double expectedVerticalOffset,
00692             int? expectedViewChangeCount = null)
00693         {
00694             Log.Comment($"PressGamepadButtonAndVerifyOffsetAndFocus. gamepadButton={gamepadButton}, expectedFocusedItemName={expectedFocusedItemName}, expectedViewChangeCount={expectedViewChangeCount}.");
00695
00696             bool waitForFocusChange = UIObject.Focused.Name != expectedFocusedItemName;
00697
00698             GamepadHelper.PressButton(null, gamepadButton);
00699
00700             if (waitForFocusChange)
00701             {
00702                 var focusChangedWaiter = new FocusAcquiredWaiter();
00703
00704                 focusChangedWaiter.Wait(TimeSpan.FromSeconds(2));
00705             }
00706
00707             WaitForScrollViewOffsets(expectedHorizontalOffset, expectedVerticalOffset);
00708
00709             Log.Comment($"Focused element. Expected={expectedFocusedItemName}, Actual={UIObject.Focused.Name}.");
00710             Verify.AreEqual(expectedFocusedItemName, UIObject.Focused.Name, "Verify focused element");
00711
00712             int viewChangeCount = ViewChangeCount();
00713             if (expectedViewChangeCount == null)
00714             {
00715                 Verify.IsGreaterThan(viewChangeCount, 1);
00716             }
00717             else
00718             {
00719                 Verify.AreEqual(viewChangeCount, expectedViewChangeCount);
00720             }
00721         }
00722
00723         private void WaitForScrollViewOffsets(double expectedHorizontalOffset, double expectedVerticalOffset)
00724         {
00725             Log.Comment("Waiting for ScrollView offsets: {0}, {1}", expectedHorizontalOffset, expectedVerticalOffset);
00726
00727             double actualHorizontalOffset;
00728             double actualVerticalOffset;
00729             float actualZoomFactor;
00730             GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
00731
00732             Func<bool> areOffsetsCorrect = () => AreClose(expectedHorizontalOffset, actualHorizontalOffset) && AreClose(expectedVerticalOffset, actualVerticalOffset);
00733
00734             int triesRemaining = 10;
00735             while (!areOffsetsCorrect() && triesRemaining-- > 0)
00736             {
00737                 Thread.Sleep(500);
00738                 GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
00739             }
00740
00741             if (triesRemaining >= 0)
00742             {
00743                 // Allow the view to settle and the STateChanged, ScrollCompleted or ZoomCompleted events to be raised.
00744                 Thread.Sleep(250);
00745                 GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
00746             }
00747
00748             Log.Comment($"Final ScrollView offsets. Expected={expectedHorizontalOffset},{expectedVerticalOffset}, Actual={actualHorizontalOffset},{actualVerticalOffset}.");
00749             if (!areOffsetsCorrect())
00750             {
00751                 LogAndClearTraces();
00752             }
00753             Verify.IsTrue(areOffsetsCorrect(), String.Format("Verify ScrollView offsets. Expected={0},{1}, Actual={2},{3}.",
00754                 expectedHorizontalOffset, expectedVerticalOffset, actualHorizontalOffset, actualVerticalOffset));
00755         }
00756
00757         private void VerifyScrollViewRemainsAtView(double expectedHorizontalOffset, double expectedVerticalOffset, float expectedZoomFactor)
00758         {
00759             Log.Comment("Verifying ScrollView view remains at: {0}, {1}, {2}",
00760                 expectedHorizontalOffset, expectedVerticalOffset, expectedZoomFactor);
00761
00762             double actualHorizontalOffset;
00763             double actualVerticalOffset;
00764             float actualZoomFactor;
00765
00766             GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
00767
00768             Func<bool> isViewCorrect = () =>
00769                 AreClose(expectedHorizontalOffset, actualHorizontalOffset) &&
00770                 AreClose(expectedVerticalOffset, actualVerticalOffset) &&
00771                 AreClose(expectedZoomFactor, actualZoomFactor);
00772
00773             Verify.IsTrue(isViewCorrect(), String.Format("Verify ScrollView initial view. Expected={0},{1},{2}, Actual={3},{4},{5}.",
00774                     expectedHorizontalOffset, expectedVerticalOffset, expectedZoomFactor,
00775                     actualHorizontalOffset, actualVerticalOffset, actualZoomFactor));
00776
00777             Thread.Sleep(750);
00778
00779             GetScrollPresenterView(out actualHorizontalOffset, out actualVerticalOffset, out actualZoomFactor);
00780
00781             Verify.IsTrue(isViewCorrect(), String.Format("Verify ScrollView final view. Expected={0},{1},{2}, Actual={3},{4},{5}.",
00782                     expectedHorizontalOffset, expectedVerticalOffset, expectedZoomFactor,
00783                     actualHorizontalOffset, actualVerticalOffset, actualZoomFactor));
00784         }
00785
00786         private bool AreClose(double expected, double actual, double delta = 0.1)
00787         {
00788             return Math.Abs(expected - actual) <= delta;
00789         }
00790
00791         private void VerifyAreClose(double expected, double actual, double delta, string message)
00792         {
00793             Verify.IsTrue(AreClose(expected, actual, delta), String.Format("{0}, expected={1}, actual={2}, delta={3}", message, expected, actual, delta));
00794         }
00795
00796         private void TapResetViewsButton()
00797         {
00798             Log.Comment("Retrieving btnResetViews");
00799             UIObject resetViewsUIObject = FindElement.ByName("btnResetViews");
00800             Verify.IsNotNull(resetViewsUIObject, "Verifying that btnResetViews Button was found");
00801
00802             Button resetViewsButton = new Button(resetViewsUIObject);
00803             InputHelper.Tap(resetViewsButton);
00804             if (!WaitForEditValue("txtResetStatus" /*editName*/, "Views reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/))
00805             {
00806                 InputHelper.Tap(resetViewsButton);
00807                 WaitForEditValue("txtResetStatus" /*editName*/, "Views reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
00808             }
00809         }
00810
00811         private void GetScrollPresenterView(out double horizontalOffset, out double verticalOffset, out float zoomFactor)
00812         {
00813             horizontalOffset = 0.0;
00814             verticalOffset = 0.0;
00815             zoomFactor = 1.0f;
00816
00817             UIObject viewUIObject = FindElement.ById("txtScrollPresenterHorizontalOffset");
00818             Edit viewTextBox = new Edit(viewUIObject);
00819             Log.Comment("Current HorizontalOffset: " + viewTextBox.Value);
00820             horizontalOffset = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);
00821
00822             viewUIObject = FindElement.ById("txtScrollPresenterVerticalOffset");
00823             viewTextBox = new Edit(viewUIObject);
00824             Log.Comment("Current VerticalOffset: " + viewTextBox.Value);
00825             verticalOffset = String.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);
00826
00827             viewUIObject = FindElement.ById("txtScrollPresenterZoomFactor");
00828             viewTextBox = new Edit(viewUIObject);
00829             Log.Comment("Current ZoomFactor: " + viewTextBox.Value);
00830             zoomFactor = String.IsNullOrWhiteSpace(viewTextBox.Value) ? float.NaN : Convert.ToSingle(viewTextBox.Value);
00831         }
00832
00833         private void PrepareForScrollViewManipulationStart(string stateTextBoxName = "txtScrollPresenterState")
00834         {
00835             UIObject scrollPresenterStateUIObject = FindElement.ById(stateTextBoxName);
00836             Edit scrollPresenterStateTextBox = new Edit(scrollPresenterStateUIObject);
00837             Log.Comment("Pre-manipulation ScrollPresenterState: " + scrollPresenterStateTextBox.Value);
00838             Wait.ForIdle();
00839         }
00840
00841         private void LogEditValue(string editName)
00842         {
00843             Edit edit = new Edit(FindElement.ById(editName));
00844             Verify.IsNotNull(edit);
00845             LogEditValue(editName, edit);
00846         }
00847
00848         private void LogEditValue(string editName, Edit edit)
00849         {
00850             Log.Comment("Current value for " + editName + ": " + edit.Value);
00851         }
00852
00853         private bool WaitForEditValue(string editName, string editValue, double secondsTimeout = 2.0, bool throwOnError = true)
00854         {
00855             Edit edit = new Edit(FindElement.ById(editName));
00856             Verify.IsNotNull(edit);
00857             LogEditValue(editName, edit);
00858             if (edit.Value != editValue)
00859             {
00860                 using (var waiter = new ValueChangedEventWaiter(edit, editValue))
00861                 {
00862                     Log.Comment("Waiting for " + editName + " to be set to " + editValue);
00863
00864                     bool success = waiter.TryWait(TimeSpan.FromSeconds(secondsTimeout));
00865                     Log.Comment("Current value for " + editName + ": " + edit.Value);
00866
00867                     if (success)
00868                     {
00869                         Log.Comment("Wait succeeded");
00870                     }
00871                     else
00872                     {
00873                         if (edit.Value == editValue)
00874                         {
00875                             Log.Warning("Wait failed but TextBox contains expected Text");
00876                             LogAndClearTraces();
00877                         }
00878                         else
00879                         {
00880                             if (throwOnError)
00881                             {
00882                                 Log.Error("Wait for edit value failed");
00883                                 LogAndClearTraces();
00884                                 throw new WaiterException();
00885                             }
00886                             else
00887                             {
00888                                 Log.Warning("Wait for edit value failed");
00889                                 LogAndClearTraces();
00890                                 return false;
00891                             }
00892                         }
00893                     }
00894                 }
00895             }
00896             return true;
00897         }
00898
00899         private void WaitForScrollViewManipulationEnd(string scrollViewName, string stateTextBoxName = "txtScrollPresenterState")
00900         {
00901             WaitForManipulationEnd(scrollViewName, stateTextBoxName);
00902         }
00903
00904         private bool TryWaitForScrollViewManipulationEnd(string scrollViewName, string stateTextBoxName = "txtScrollPresenterState")
00905         {
00906             return WaitForManipulationEnd(scrollViewName, stateTextBoxName, false /*throwOnError*/);
00907         }
00908
00909         private bool WaitForManipulationEnd(string elementName, string stateTextBoxName, bool throwOnError = true)
00910         {
00911             UIObject elementStateUIObject = FindElement.ById(stateTextBoxName);
00912             Edit elementStateTextBox = new Edit(elementStateUIObject);
00913             Log.Comment("Current State: " + elementStateTextBox.Value);
00914             if (elementStateTextBox.Value != elementName + ".PART_Root.PART_ScrollPresenter Idle")
00915             {
00916                 using (var waiter = new ValueChangedEventWaiter(elementStateTextBox, elementName + ".PART_Root.PART_ScrollPresenter Idle"))
00917                 {
00918                     int loops = 0;
00919
00920                     Log.Comment("Waiting for " + elementName + "'s manipulation end.");
00921                     while (true)
00922                     {
00923                         bool success = waiter.TryWait(TimeSpan.FromMilliseconds(250));
00924
00925                         Log.Comment("Current State: " + elementStateTextBox.Value);
00926
00927                         if (success)
00928                         {
00929                             Log.Comment("Wait succeeded");
00930                             break;
00931                         }
00932                         else
00933                         {
00934                             if (elementStateTextBox.Value == elementName + ".PART_Root.PART_ScrollPresenter Idle")
00935                             {
00936                                 Log.Warning("Wait failed but TextBox contains expected text");
00937                                 LogAndClearTraces();
00938                                 break;
00939                             }
00940                             else if (loops < 20)
00941                             {
00942                                 loops++;
00943                                 waiter.Reset();
00944                             }
00945                             else
00946                             {
00947                                 if (throwOnError)
00948                                 {
00949                                     Log.Error("Wait for manipulation end failed");
00950                                     LogAndClearTraces();
00951                                     throw new WaiterException();
00952                                 }
00953                                 else
00954                                 {
00955                                     Log.Warning("Wait for manipulation end failed");
00956                                     LogAndClearTraces();
00957                                     return false;
00958                                 }
00959                             }
00960                         }
00961                     }
00962                 }
00963             }
00964             return true;
00965         }
00966
00967         private void WaitForScrollViewFinalSize(UIObject scrollViewUIObject, double expectedWidth, double expectedHeight)
00968         {
00969             int pauses = 0;
00970             int widthDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Width - (int)expectedWidth);
00971             int heightDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Height - (int)expectedHeight);
00972
00973             Log.Comment("scrollViewUIObject.BoundingRectangle={0}", scrollViewUIObject.BoundingRectangle);
00974
00975             while (widthDelta > 1 || heightDelta > 1 && pauses < 5)
00976             {
00977                 Wait.ForMilliseconds(60);
00978                 pauses++;
00979                 Log.Comment("scrollViewUIObject.BoundingRectangle={0}", scrollViewUIObject.BoundingRectangle);
00980                 widthDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Width - (int)expectedWidth);
00981                 heightDelta = Math.Abs(scrollViewUIObject.BoundingRectangle.Height - (int)expectedHeight);
00982             };
00983
00984             Verify.IsLessThanOrEqual(widthDelta, 1);
00985             Verify.IsLessThanOrEqual(heightDelta, 1);
00986         }
00987
00988         private void WaitForBoxChecked(string checkBoxName)
00989         {
00990             Log.Comment($"Waiting for checkbox {checkBoxName} checked...");
00991             LogEditValue("txtResetStatus");
00992
00993             UIObject checkBoxUIObject = FindElement.ById(checkBoxName);
00994             Verify.IsNotNull(checkBoxUIObject);
00995             CheckBox checkBox = new CheckBox(checkBoxUIObject);
00996             Verify.IsNotNull(checkBox);
00997
00998             using (var waiter = checkBox.GetToggledWaiter())
00999             {
01000                 if (checkBox.ToggleState == ToggleState.On)
01001                 {
01002                     Log.Comment("CheckBox already checked.");
01003                 }
01004                 else
01005                 {
01006                     waiter.TryWait();
01007                     if (checkBox.ToggleState != ToggleState.On)
01008                     {
01009                         Log.Warning($"{checkBoxName} was not checked.");
01010                         throw new WaiterException();
01011                     }
01012                     Log.Comment("CheckBox checked.");
01013                 }
01014             }
01015         }
01016
01017         private void UpdateTraces()
01018         {
01019             Log.Comment("Updating full log:");
01020             LogEditValue("txtResetStatus");
01021
01022             // Triggering ScrollViewsWithSimpleContentsPage.GetFullLog() call.
01023             TextInput.SendText("g");
01024             WaitForBoxChecked("chkLogUpdated");
01025         }
01026
01027         private void LogTraces()
01028         {
01029             UpdateTraces();
01030
01031             Log.Comment("Reading full log:");
01032
01033             UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
01034             Verify.IsNotNull(fullLogUIObject);
01035             ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
01036             Verify.IsNotNull(cmbFullLog);
01037
01038             foreach (ComboBoxItem item in cmbFullLog.AllItems)
01039             {
01040                 Log.Comment(item.Name);
01041             }
01042         }
01043
01044         private void ClearTraces()
01045         {
01046             Log.Comment("Clearing full log.");
01047             LogEditValue("txtResetStatus");
01048
01049             // Triggering ScrollViewsWithSimpleContentsPage.ClearFullLog() call.
01050             TextInput.SendText("c");
01051             WaitForBoxChecked("chkLogCleared");
01052         }
01053
01054         private void LogAndClearTraces()
01055         {
01056             LogTraces();
01057             ClearTraces();
01058         }
01059
01060         private int ViewChangeCount()
01061         {
01062             int viewChangeCount = 0;
01063
01064             Log.Comment("Counting ViewChanged events in full log:");
01065
01066             UpdateTraces();
01067
01068             UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
01069             Verify.IsNotNull(fullLogUIObject);
01070             ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
01071             Verify.IsNotNull(cmbFullLog);
01072
01073             foreach (ComboBoxItem item in cmbFullLog.AllItems)
01074             {
01075                 if (item.Name.Contains("PART_Root.PART_ScrollPresenter ViewChanged"))
01076                 {
01077                     viewChangeCount++;
01078                 }
01079             }
01080
01081             Log.Comment($"Log Entries Count={cmbFullLog.AllItems.Count}.");
01082             Log.Comment($"ViewChanged Count={viewChangeCount}.");
01083
01084             ClearTraces();
01085
01086             return viewChangeCount;
01087         }
01088
01089         private void SetScrollPresenterLoggingLevel(bool isPrivateLoggingEnabled)
01090         {
01091             Log.Comment("Retrieving chkLogScrollPresenterMessages");
01092             CheckBox chkLogScrollPresenterMessages = new CheckBox(FindElement.ById("chkLogScrollPresenterMessages"));
01093             Verify.IsNotNull(chkLogScrollPresenterMessages, "Verifying that chkLogScrollPresenterMessages was found");
01094
01095             if (isPrivateLoggingEnabled && chkLogScrollPresenterMessages.ToggleState != ToggleState.On ||
01096                 !isPrivateLoggingEnabled && chkLogScrollPresenterMessages.ToggleState != ToggleState.Off)
01097             {
01098                 Log.Comment("Toggling chkLogScrollPresenterMessages.IsChecked to " + isPrivateLoggingEnabled);
01099                 chkLogScrollPresenterMessages.Toggle();
01100                 Wait.ForIdle();
01101             }
01102         }
01103
01104         private void SetScrollViewLoggingLevel(bool isPrivateLoggingEnabled)
01105         {
01106             Log.Comment("Retrieving chkLogScrollViewMessages");
01107             CheckBox chkLogScrollViewMessages = new CheckBox(FindElement.ById("chkLogScrollViewMessages"));
01108             Verify.IsNotNull(chkLogScrollViewMessages, "Verifying that chkLogScrollViewMessages was found");
01109
01110             if (isPrivateLoggingEnabled && chkLogScrollViewMessages.ToggleState != ToggleState.On ||
01111                 !isPrivateLoggingEnabled && chkLogScrollViewMessages.ToggleState != ToggleState.Off)
01112             {
01113                 Log.Comment("Toggling chkLogScrollViewMessages.IsChecked to " + isPrivateLoggingEnabled);
01114                 chkLogScrollViewMessages.Toggle();
01115                 Wait.ForIdle();
01116             }
01117         }
01118
01119         private class LoggingHelper : IDisposable
01120         {
01121             private ScrollViewTestsWithInputHelper m_owner;
01122
01123             public LoggingHelper(ScrollViewTestsWithInputHelper owner)
01124             {
01125                 m_owner = owner;
01126
01127                 m_owner.SetScrollPresenterLoggingLevel(isPrivateLoggingEnabled: true);
01128                 m_owner.SetScrollViewLoggingLevel(isPrivateLoggingEnabled: true);
01129             }
01130
01131             public void Dispose()
01132             {
01133                 m_owner.SetScrollPresenterLoggingLevel(isPrivateLoggingEnabled: false);
01134                 m_owner.SetScrollViewLoggingLevel(isPrivateLoggingEnabled: false);
01135             }
01136         }
01137     }
01138 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarItem.properties.cpp Source File

  • File List
  • File Members
  • Generated

MenuBarItem.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MenuBarItem.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(MenuBarItem)
00012 }
00013
00014 #include "MenuBarItem.g.cpp"
00015
00016 GlobalDependencyProperty MenuBarItemProperties::s_ItemsProperty{ nullptr };
00017 GlobalDependencyProperty MenuBarItemProperties::s_TitleProperty{ nullptr };
00018
00019 MenuBarItemProperties::MenuBarItemProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void MenuBarItemProperties::EnsureProperties()
00025 {
00026     if (!s_ItemsProperty)
00027     {
00028         s_ItemsProperty =
00029             InitializeDependencyProperty(
00030                 L"Items",
00031                 winrt::name_of<winrt::IVector<winrt::MenuFlyoutItemBase>>(),
00032                 winrt::name_of<winrt::MenuBarItem>(),
00033                 false /* isAttached */,
00034                 ValueHelper<winrt::IVector<winrt::MenuFlyoutItemBase>>::BoxedDefaultValue(),
00035                 nullptr);
00036     }
00037     if (!s_TitleProperty)
00038     {
00039         s_TitleProperty =
00040             InitializeDependencyProperty(
00041                 L"Title",
00042                 winrt::name_of<winrt::hstring>(),
00043                 winrt::name_of<winrt::MenuBarItem>(),
00044                 false /* isAttached */,
00045                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00046                 nullptr);
00047     }
00048 }
00049
00050 void MenuBarItemProperties::ClearProperties()
00051 {
00052     s_ItemsProperty = nullptr;
00053     s_TitleProperty = nullptr;
00054 }
00055
00056 void MenuBarItemProperties::Items(winrt::IVector<winrt::MenuFlyoutItemBase> const& value)
00057 {
00058     [[gsl::suppress(con)]]
00059     {
00060     static_cast<MenuBarItem*>(this)->SetValue(s_ItemsProperty, ValueHelper<winrt::IVector<winrt::MenuFlyoutItemBase>>::BoxValueIfNecessary(value));
00061     }
00062 }
00063
00064 winrt::IVector<winrt::MenuFlyoutItemBase> MenuBarItemProperties::Items()
00065 {
00066     return ValueHelper<winrt::IVector<winrt::MenuFlyoutItemBase>>::CastOrUnbox(static_cast<MenuBarItem*>(this)->GetValue(s_ItemsProperty));
00067 }
00068
00069 void MenuBarItemProperties::Title(winrt::hstring const& value)
00070 {
00071     [[gsl::suppress(con)]]
00072     {
00073     static_cast<MenuBarItem*>(this)->SetValue(s_TitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00074     }
00075 }
00076
00077 winrt::hstring MenuBarItemProperties::Title()
00078 {
00079     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<MenuBarItem*>(this)->GetValue(s_TitleProperty));
00080 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FocusHelper Member List

This is the complete list of members for FocusHelper, including all inherited members.
GetNavigationDirection(winrt::VirtualKey key) | FocusHelper | [inline, static]
GetOppositeDirection(winrt::FocusNavigationDirection direction) | FocusHelper | [inline, static]
GetPageNavigationDirection(winrt::VirtualKey key) | FocusHelper | [inline, static]
GetUIElementForFocusCandidate(const winrt::DependencyObject &dobj) | FocusHelper | [inline, static]
IsGamepadNavigationDirection(winrt::VirtualKey key) | FocusHelper | [inline, static]
IsGamepadPageNavigationDirection(winrt::VirtualKey key) | FocusHelper | [inline, static]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/NonvirtualizingLayoutContext.cpp Source File

  • File List
  • File Members
  • Repeater

NonvirtualizingLayoutContext.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "NonVirtualizingLayoutContext.h"
00008 #include "LayoutContextAdapter.h"
00009
00010 #include "NonVirtualizingLayoutContext.properties.cpp"
00011
00012 #pragma region INonVirtualizingLayoutContext
00013
00014 winrt::IVectorView<winrt::UIElement> NonVirtualizingLayoutContext::Children()
00015 {
00016     return overridable().ChildrenCore();
00017 }
00018
00019 #pragma endregion
00020
00021 #pragma region INonVirtualizingLayoutContextOverrides
00022
00023 winrt::IVectorView<winrt::UIElement> NonVirtualizingLayoutContext::ChildrenCore()
00024 {
00025     throw winrt::hresult_not_implemented();
00026 }
00027
00028 #pragma endregion
00029
00030 winrt::VirtualizingLayoutContext NonVirtualizingLayoutContext::GetVirtualizingContextAdapter()
00031 {
00032     if (!m_contextAdapter)
00033     {
00034         m_contextAdapter = winrt::make<LayoutContextAdapter>(get_strong().as<winrt::NonVirtualizingLayoutContext>());
00035     }
00036     return m_contextAdapter;
00037 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbLayout.cpp Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbLayout.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "BreadcrumbLayout.h"
00007 #include "BreadcrumbBar.h"
00008 #include "BreadcrumbBarItem.h"
00009
00010 BreadcrumbLayout::BreadcrumbLayout()
00011 {
00012 }
00013
00014 BreadcrumbLayout::BreadcrumbLayout(const winrt::BreadcrumbBar& breadcrumb)
00015 {
00016     m_breadcrumb = winrt::make_weak(breadcrumb);
00017 }
00018
00019 BreadcrumbLayout::~BreadcrumbLayout()
00020 {
00021 }
00022
00023 uint32_t BreadcrumbLayout::GetItemCount(winrt::NonVirtualizingLayoutContext const& context)
00024 {
00025     return static_cast<uint32_t>(context.Children().Size());
00026 }
00027
00028 winrt::UIElement BreadcrumbLayout::GetElementAt(winrt::NonVirtualizingLayoutContext const& context, uint32_t index)
00029 {
00030     return context.Children().GetAt(index);
00031 }
00032
00033 // Measuring is performed in a single step, every element is measured, including the ellipsis
00034 // item, but the total amount of space needed is only composed of the non-ellipsis breadcrumbs
00035 winrt::Size BreadcrumbLayout::MeasureOverride(winrt::NonVirtualizingLayoutContext const& context, winrt::Size const& availableSize)
00036 {
00037     m_availableSize = availableSize;
00038
00039     winrt::Size accumulatedCrumbsSize(0, 0);
00040
00041     for (uint32_t i = 0; i < GetItemCount(context); ++i)
00042     {
00043         auto breadcrumbItem = GetElementAt(context, i).as<BreadcrumbBarItem>();
00044         breadcrumbItem->Measure(availableSize);
00045
00046         if (i != 0)
00047         {
00048             accumulatedCrumbsSize.Width += breadcrumbItem->DesiredSize().Width;
00049             accumulatedCrumbsSize.Height = std::max(accumulatedCrumbsSize.Height, breadcrumbItem->DesiredSize().Height);
00050         }
00051     }
00052
00053     // Save a reference to the ellipsis button to avoid querying for it multiple times
00054     if (GetItemCount(context) > 0)
00055     {
00056         if (const auto& ellipsisButton = GetElementAt(context, 0).try_as<winrt::BreadcrumbBarItem>())
00057         {
00058             m_ellipsisButton = ellipsisButton;
00059         }
00060     }
00061
00062     if (accumulatedCrumbsSize.Width > availableSize.Width)
00063     {
00064         m_ellipsisIsRendered = true;
00065     }
00066     else
00067     {
00068         m_ellipsisIsRendered = false;
00069     }
00070
00071     return accumulatedCrumbsSize;
00072 }
00073
00074 void BreadcrumbLayout::ArrangeItem(const winrt::UIElement& breadcrumbItem, float& accumulatedWidths, float maxElementHeight)
00075 {
00076     const winrt::Size elementSize = breadcrumbItem.DesiredSize();
00077     const winrt::Rect arrangeRect(accumulatedWidths, 0, elementSize.Width, maxElementHeight);
00078     breadcrumbItem.Arrange(arrangeRect);
00079
00080     accumulatedWidths += elementSize.Width;
00081 }
00082
00083 void BreadcrumbLayout::ArrangeItem(const winrt::NonVirtualizingLayoutContext& context, int index, float& accumulatedWidths, float maxElementHeight)
00084 {
00085     const auto& element = GetElementAt(context, index);
00086     ArrangeItem(element, accumulatedWidths, maxElementHeight);
00087 }
00088
00089 void BreadcrumbLayout::HideItem(const winrt::UIElement& breadcrumbItem)
00090 {
00091     const winrt::Rect arrangeRect(0, 0, 0, 0);
00092     breadcrumbItem.Arrange(arrangeRect);
00093 }
00094
00095 void BreadcrumbLayout::HideItem(const winrt::NonVirtualizingLayoutContext& context, int index)
00096 {
00097     const auto& element = GetElementAt(context, index);
00098     HideItem(element);
00099 }
00100
00101 int BreadcrumbLayout::GetFirstBreadcrumbBarItemToArrange(winrt::NonVirtualizingLayoutContext const& context)
00102 {
00103     const int itemCount = GetItemCount(context);
00104     float accumLength = GetElementAt(context, itemCount - 1).DesiredSize().Width +
00105         m_ellipsisButton.DesiredSize().Width;
00106
00107     for (int i = itemCount - 2; i >= 0; --i)
00108     {
00109         float newAccumLength = accumLength + GetElementAt(context, i).DesiredSize().Width;
00110         if (newAccumLength > m_availableSize.Width)
00111         {
00112             return i + 1;
00113         }
00114         accumLength = newAccumLength;
00115     }
00116
00117     return 0;
00118 }
00119
00120 float BreadcrumbLayout::GetBreadcrumbBarItemsHeight(winrt::NonVirtualizingLayoutContext const& context, int firstItemToRender)
00121 {
00122     float maxElementHeight{};
00123
00124     if (m_ellipsisIsRendered)
00125     {
00126         maxElementHeight = m_ellipsisButton.DesiredSize().Height;
00127     }
00128
00129     for (uint32_t i = firstItemToRender; i < GetItemCount(context); ++i)
00130     {
00131         maxElementHeight = std::max(maxElementHeight, GetElementAt(context, i).DesiredSize().Height);
00132     }
00133
00134     return maxElementHeight;
00135 }
00136
00137 // Arranging is performed in a single step, as many elements are tried to be drawn going from the last element
00138 // towards the first one, if there's not enough space, then the ellipsis button is drawn
00139 winrt::Size BreadcrumbLayout::ArrangeOverride(winrt::NonVirtualizingLayoutContext const& context, winrt::Size const& finalSize)
00140 {
00141     const int itemCount = GetItemCount(context);
00142     int firstElementToRender{};
00143     m_firstRenderedItemIndexAfterEllipsis = itemCount - 1;
00144     m_visibleItemsCount = 0;
00145
00146     // If the ellipsis must be drawn, then we find the index (x) of the first element to be rendered, any element with
00147     // a lower index than x will be hidden (except for the ellipsis button) and every element after x (including x) will
00148     // be drawn. At the very least, the ellipis and the last item will be rendered
00149     if (m_ellipsisIsRendered)
00150     {
00151         firstElementToRender = GetFirstBreadcrumbBarItemToArrange(context);
00152         m_firstRenderedItemIndexAfterEllipsis = firstElementToRender;
00153     }
00154
00155     float accumulatedWidths{};
00156     const float maxElementHeight = GetBreadcrumbBarItemsHeight(context, firstElementToRender);
00157
00158     // If there is at least one element, we may render the ellipsis item
00159     if (itemCount > 0)
00160     {
00161         const auto& ellipsisButton = m_ellipsisButton;
00162
00163         if (m_ellipsisIsRendered)
00164         {
00165             ArrangeItem(ellipsisButton, accumulatedWidths, maxElementHeight);
00166         }
00167         else
00168         {
00169             HideItem(ellipsisButton);
00170         }
00171     }
00172
00173     // For each item, if the item has an equal or larger index to the first element to render, then
00174     // render it, otherwise, hide it and add it to the list of hidden items
00175     for (int i = 1; i < itemCount; ++i)
00176     {
00177         if (i < firstElementToRender)
00178         {
00179             HideItem(context, i);
00180         }
00181         else
00182         {
00183             ArrangeItem(context, i, accumulatedWidths, maxElementHeight);
00184             ++m_visibleItemsCount;
00185         }
00186     }
00187
00188     if (const auto& breadcrumb = m_breadcrumb.get())
00189     {
00190         auto breadcrumbImpl = winrt::get_self<BreadcrumbBar>(breadcrumb);
00191         breadcrumbImpl->ReIndexVisibleElementsForAccessibility();
00192     }
00193
00194     return finalSize;
00195 }
00196
00197 bool BreadcrumbLayout::EllipsisIsRendered()
00198 {
00199     return m_ellipsisIsRendered;
00200 }
00201
00202 uint32_t BreadcrumbLayout::FirstRenderedItemIndexAfterEllipsis()
00203 {
00204     return m_firstRenderedItemIndexAfterEllipsis;
00205 }
00206
00207 uint32_t BreadcrumbLayout::GetVisibleItemsCount()
00208 {
00209     return m_visibleItemsCount;
00210 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingItemFontInfoProperties Member List

This is the complete list of members for RatingItemFontInfoProperties, including all inherited members.
ClearProperties() | RatingItemFontInfoProperties | [static]
DisabledGlyph(winrt::hstring const &value) | RatingItemFontInfoProperties |
DisabledGlyph() | RatingItemFontInfoProperties |
DisabledGlyphProperty() | RatingItemFontInfoProperties | [inline, static]
EnsureProperties() | RatingItemFontInfoProperties | [static]
Glyph(winrt::hstring const &value) | RatingItemFontInfoProperties |
Glyph() | RatingItemFontInfoProperties |
GlyphProperty() | RatingItemFontInfoProperties | [inline, static]
PlaceholderGlyph(winrt::hstring const &value) | RatingItemFontInfoProperties |
PlaceholderGlyph() | RatingItemFontInfoProperties |
PlaceholderGlyphProperty() | RatingItemFontInfoProperties | [inline, static]
PointerOverGlyph(winrt::hstring const &value) | RatingItemFontInfoProperties |
PointerOverGlyph() | RatingItemFontInfoProperties |
PointerOverGlyphProperty() | RatingItemFontInfoProperties | [inline, static]
PointerOverPlaceholderGlyph(winrt::hstring const &value) | RatingItemFontInfoProperties |
PointerOverPlaceholderGlyph() | RatingItemFontInfoProperties |
PointerOverPlaceholderGlyphProperty() | RatingItemFontInfoProperties | [inline, static]
RatingItemFontInfoProperties() | RatingItemFontInfoProperties |
s_DisabledGlyphProperty | RatingItemFontInfoProperties | [static]
s_GlyphProperty | RatingItemFontInfoProperties | [static]
s_PlaceholderGlyphProperty | RatingItemFontInfoProperties | [static]
s_PointerOverGlyphProperty | RatingItemFontInfoProperties | [static]
s_PointerOverPlaceholderGlyphProperty | RatingItemFontInfoProperties | [static]
s_UnsetGlyphProperty | RatingItemFontInfoProperties | [static]
UnsetGlyph(winrt::hstring const &value) | RatingItemFontInfoProperties |
UnsetGlyph() | RatingItemFontInfoProperties |
UnsetGlyphProperty() | RatingItemFontInfoProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipePage Member List

This is the complete list of members for SwipePage, including all inherited members.
CmbSwipeControlOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | SwipePage | [inline, private]
SwipePage() | SwipePage | [inline]
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RepeatedZoomSnapPoint.properties.cpp Source File

  • File List
  • File Members
  • Generated

RepeatedZoomSnapPoint.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RepeatedZoomSnapPoint.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RepeatedZoomSnapPoint)
00012 }
00013
00014 #include "RepeatedZoomSnapPoint.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/BoxHelpers.h Source File

  • File List
  • File Members
  • inc

BoxHelpers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 ///////////////////////////////////////////////////////////////////////////////
00007 //
00008 // unbox
00009 //
00010 ///////////////////////////////////////////////////////////////////////////////
00011
00012 #include "CppWinRTHelpers.h"
00013
00014 using winrt::box_value;
00015 using winrt::unbox_value;
00016
00017 struct auto_unbox
00018 {
00019     explicit auto_unbox(winrt::IInspectable const& value) : m_value(value)
00020     {
00021     }
00022
00023     template <typename T>
00024     operator T() const
00025     {
00026         return unbox_value<T>(m_value);
00027     }
00028
00029 private:
00030     winrt::IInspectable const& m_value;
00031 };
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewAutomationPeers.idl Source File

  • File List
  • File Members
  • TreeView

TreeViewAutomationPeers.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass TreeViewListAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.ListViewAutomationPeer
00007 {
00008     [method_name("CreateInstanceWithOwner")] TreeViewListAutomationPeer(MU_XC_NAMESPACE.TreeViewList owner);
00009 }
00010
00011 [MUX_PUBLIC]
00012 [webhosthidden]
00013 unsealed runtimeclass TreeViewItemAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.ListViewItemAutomationPeer, Microsoft.UI.Xaml.Automation.Provider.IExpandCollapseProvider
00014 {
00015     [method_name("CreateInstanceWithOwner")] TreeViewItemAutomationPeer(MU_XC_NAMESPACE.TreeViewItem owner);
00016 }
00017
00018 [MUX_PUBLIC]
00019 [webhosthidden]
00020 unsealed runtimeclass TreeViewItemDataAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.ItemAutomationPeer, Microsoft.UI.Xaml.Automation.Provider.IExpandCollapseProvider
00021 {
00022     [method_name("CreateInstanceWithOwner")] TreeViewItemDataAutomationPeer(IInspectable item, MU_XAP_NAMESPACE.TreeViewListAutomationPeer parent);
00023 }
00024
00025 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControl.cpp Source File

  • File List
  • File Members
  • RatingControl

RatingControl.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RatingControl.h"
00007 #include "RatingControlAutomationPeer.h"
00008 #include "RuntimeProfiler.h"
00009 #include "XamlControlsResources.h"
00010
00011 #include <RatingItemFontInfo.h>
00012 #include <RatingItemImageInfo.h>
00013
00014 const float c_horizontalScaleAnimationCenterPoint = 0.5f;
00015 const float c_verticalScaleAnimationCenterPoint = 0.8f;
00016
00017 const float c_captionTopMarginSlope = 0.3f;
00018 const float c_captionTopMarginIntercept = -20.4f;
00019
00020 const float c_mouseOverScale = 0.8f;
00021 const float c_touchOverScale = 1.0f;
00022 const float c_noPointerOverMagicNumber = -100;
00023
00024 const int c_noValueSetSentinel = -1;
00025
00026 const wchar_t c_fontSizeForRenderingKey[] = L"RatingControlFontSizeForRendering";
00027 const wchar_t c_itemSpacingKey[] = L"RatingControlItemSpacing";
00028
00029 RatingControl::RatingControl()
00030 {
00031     __RP_Marker_ClassById(RuntimeProfiler::ProfId_RatingControl);
00032
00033     SetDefaultStyleKey(this);
00034 }
00035
00036 RatingControl::~RatingControl()
00037 {
00038     // We only need to use safe_get in the deconstruction loop
00039     RecycleEvents(true /* useSafeGet */);
00040 }
00041
00042 float RatingControl::RenderingRatingFontSize()
00043 {
00044     EnsureResourcesLoaded();
00045
00046     // MSFT #10030063 Replacing with Rating size DPs
00047     return (float)(m_fontSizeForRendering * GetUISettings().TextScaleFactor());
00048 }
00049
00050 float RatingControl::ActualRatingFontSize()
00051 {
00052     return RenderingRatingFontSize() / 2;
00053 }
00054
00055 // TODO MSFT #10030063: Convert to itemspacing DP
00056 double RatingControl::ItemSpacing()
00057 {
00058     EnsureResourcesLoaded();
00059
00060     // Stars are rendered 2x size and we use expression animation to shrink them down to desired size,
00061     // which will create those spacings (not system margin).
00062     // Since text scale factor won't affect system margins,
00063     // when stars get bigger, the spacing will become smaller.
00064     // Therefore we should include TextScaleFactor when calculating item spacing
00065     // in order to get correct total width and star center positions.
00066     const double defaultFontSize = m_fontSizeForRendering / 2;
00067     return m_itemSpacing - (GetUISettings().TextScaleFactor() - 1.0) * defaultFontSize / 2;
00068 }
00069
00070 void RatingControl::UpdateCaptionMargins()
00071 {
00072     // We manually set margins to caption text to make it center-aligned with the stars
00073     // When text scale changes we need to update top margin to make the text follow start center.
00074     if (auto captionTextBlock = m_captionTextBlock.safe_get())
00075     {
00076         double captionStackPanelTopMargin = 0;
00077
00078         if (auto captionStackPanel = m_captionStackPanel.safe_get())
00079         {
00080             captionStackPanelTopMargin = captionStackPanel.Margin().Top;
00081         }
00082
00083         EnsureResourcesLoaded();
00084
00085         double textScaleFactor = GetUISettings().TextScaleFactor();
00086         winrt::Thickness margin = captionTextBlock.Margin();
00087         margin.Top = static_cast<double>(c_captionTopMarginSlope * RenderingRatingFontSize() + c_captionTopMarginIntercept - captionStackPanelTopMargin);
00088
00089         captionTextBlock.Margin(margin);
00090     }
00091 }
00092
00093 void RatingControl::OnApplyTemplate()
00094 {
00095     RecycleEvents();
00096
00097     // Retrieve pointers to stable controls
00098     winrt::IControlProtected thisAsControlProtected = *this;
00099
00100     if (auto captionStackPanel = GetTemplateChildT<winrt::StackPanel>(L"CaptionStackPanel", thisAsControlProtected))
00101     {
00102         m_captionStackPanel.set(captionStackPanel);
00103     }
00104
00105     if (auto captionTextBlock = GetTemplateChildT<winrt::TextBlock>(L"Caption", thisAsControlProtected))
00106     {
00107         m_captionTextBlock.set(captionTextBlock);
00108         m_captionSizeChangedToken = captionTextBlock.SizeChanged({ this, &RatingControl::OnCaptionSizeChanged });
00109         UpdateCaptionMargins();
00110     }
00111
00112     if (auto backgroundStackPanel = GetTemplateChildT<winrt::StackPanel>(L"RatingBackgroundStackPanel", thisAsControlProtected))
00113     {
00114         m_backgroundStackPanel.set(backgroundStackPanel);
00115         m_pointerCancelledToken = backgroundStackPanel.PointerCanceled({ this, &RatingControl::OnPointerCancelledBackgroundStackPanel });
00116         m_pointerCaptureLostToken = backgroundStackPanel.PointerCaptureLost({ this, &RatingControl::OnPointerCaptureLostBackgroundStackPanel });
00117         m_pointerMovedToken = backgroundStackPanel.PointerMoved({ this, &RatingControl::OnPointerMovedOverBackgroundStackPanel });
00118         m_pointerEnteredToken = backgroundStackPanel.PointerEntered({ this, &RatingControl::OnPointerEnteredBackgroundStackPanel });
00119         m_pointerExitedToken = backgroundStackPanel.PointerExited({ this, &RatingControl::OnPointerExitedBackgroundStackPanel });
00120         m_pointerPressedToken = backgroundStackPanel.PointerPressed({ this, &RatingControl::OnPointerPressedBackgroundStackPanel });
00121         m_pointerReleasedToken = backgroundStackPanel.PointerReleased({ this, &RatingControl::OnPointerReleasedBackgroundStackPanel });
00122     }
00123
00124     m_foregroundStackPanel.set(GetTemplateChildT<winrt::StackPanel>(L"RatingForegroundStackPanel", thisAsControlProtected));
00125
00126     // FUTURE: Ideally these would be in template overrides:
00127
00128     // IsFocusEngagementEnabled means the control has to be "engaged" with
00129     // using the A button before it actually receives key input from gamepad.
00130     FocusEngaged({ this, &RatingControl::OnFocusEngaged });
00131     FocusDisengaged({ this, &RatingControl::OnFocusDisengaged });
00132
00133     IsEnabledChanged({ this, &RatingControl::OnIsEnabledChanged });
00134     m_fontFamilyChangedToken.value = RegisterPropertyChangedCallback(
00135         winrt::Control::FontFamilyProperty(), { this, &RatingControl::OnFontFamilyChanged });
00136
00137     winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(*this);
00138     winrt::Compositor comp = visual.Compositor();
00139
00140     m_sharedPointerPropertySet = comp.CreatePropertySet();
00141
00142     m_sharedPointerPropertySet.InsertScalar(L"starsScaleFocalPoint", c_noPointerOverMagicNumber);
00143     m_sharedPointerPropertySet.InsertScalar(L"pointerScalar", c_mouseOverScale);
00144
00145     StampOutRatingItems();
00146     m_textScaleChangedRevoker = GetUISettings().TextScaleFactorChanged(winrt::auto_revoke, { this, &RatingControl::OnTextScaleFactorChanged });
00147 }
00148
00149
00150 double RatingControl::CoerceValueBetweenMinAndMax(double value)
00151 {
00152     if (value < 0.0) // Force all negative values to the sentinel "unset" value.
00153     {
00154         value = c_noValueSetSentinel;
00155     }
00156     else if (value <= 1.0)
00157     {
00158         value = 1.0;
00159     }
00160     else if (value > MaxRating())
00161     {
00162         value = MaxRating();
00163     }
00164
00165     return value;
00166 }
00167
00168 // IUIElement / IUIElementOverridesHelper
00169 winrt::AutomationPeer RatingControl::OnCreateAutomationPeer()
00170 {
00171     return winrt::make<RatingControlAutomationPeer>(*this);
00172 }
00173
00174 // private methods
00175
00176 // TODO: call me when font size changes, and stuff like that, glyph, etc
00177 void RatingControl::StampOutRatingItems()
00178 {
00179     if (!m_backgroundStackPanel || !m_foregroundStackPanel)
00180     {
00181         // OnApplyTemplate() hasn't executed yet, this is being called
00182         // from a property value changed handler for markup set values.
00183
00184         return;
00185     }
00186
00187     // Background initialization:
00188
00189     m_backgroundStackPanel.get().Children().Clear();
00190
00191     if (IsItemInfoPresentAndFontInfo())
00192     {
00193         PopulateStackPanelWithItems(L"BackgroundGlyphDefaultTemplate", m_backgroundStackPanel.get(), RatingControlStates::Unset);
00194     }
00195     else if (IsItemInfoPresentAndImageInfo())
00196     {
00197         PopulateStackPanelWithItems(L"BackgroundImageDefaultTemplate", m_backgroundStackPanel.get(), RatingControlStates::Unset);
00198     }
00199
00200     // Foreground initialization:
00201     m_foregroundStackPanel.get().Children().Clear();
00202     if (IsItemInfoPresentAndFontInfo())
00203     {
00204         PopulateStackPanelWithItems(L"ForegroundGlyphDefaultTemplate", m_foregroundStackPanel.get(), RatingControlStates::Set);
00205     }
00206     else if (IsItemInfoPresentAndImageInfo())
00207     {
00208         PopulateStackPanelWithItems(L"ForegroundImageDefaultTemplate", m_foregroundStackPanel.get(), RatingControlStates::Set);
00209     }
00210
00211     UpdateRatingItemsAppearance();
00212 }
00213
00214 void RatingControl::ReRenderCaption()
00215 {
00216     if (auto captionTextBlock = m_captionTextBlock.get())
00217     {
00218         ResetControlWidth();
00219     }
00220 }
00221
00222 void RatingControl::UpdateRatingItemsAppearance()
00223 {
00224     if (m_foregroundStackPanel)
00225     {
00226         // TODO: MSFT 11521414 - complete disabled state functionality
00227
00228         const double placeholderValue = PlaceholderValue();
00229         const double ratingValue = Value();
00230         double value = 0.0;
00231
00232         if (m_isPointerOver)
00233         {
00234             value = ceil(m_mousePercentage * MaxRating());
00235             if (ratingValue == c_noValueSetSentinel)
00236             {
00237                 if (placeholderValue == -1)
00238                 {
00239                     winrt::VisualStateManager::GoToState(*this, L"PointerOverPlaceholder", false);
00240                     CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::PointerOverPlaceholder);
00241                 }
00242                 else
00243                 {
00244                     winrt::VisualStateManager::GoToState(*this, L"PointerOverUnselected", false);
00245                     // The API is locked, so we can't change this part to be consistent any more:
00246                     CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::PointerOverPlaceholder);
00247                 }
00248             }
00249             else
00250             {
00251                 winrt::VisualStateManager::GoToState(*this, L"PointerOverSet", false);
00252                 CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::PointerOverSet);
00253             }
00254         }
00255         else if (ratingValue > c_noValueSetSentinel)
00256         {
00257             value = ratingValue;
00258             winrt::VisualStateManager::GoToState(*this, L"Set", false);
00259             CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::Set);
00260         }
00261         else if (placeholderValue > c_noValueSetSentinel)
00262         {
00263             value = placeholderValue;
00264             winrt::VisualStateManager::GoToState(*this, L"Placeholder", false);
00265             CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::Placeholder);
00266         } // there's no "unset" state because the foreground items are simply cropped out
00267
00268         if (!IsEnabled())
00269         {
00270             // TODO: MSFT 11521414 - complete disabled state functionality [merge this code block with ifs above]
00271             winrt::VisualStateManager::GoToState(*this, L"Disabled", false);
00272             CustomizeStackPanel(m_foregroundStackPanel.get(), RatingControlStates::Disabled);
00273         }
00274
00275         unsigned int i = 0;
00276         for (const auto& uiElement : m_foregroundStackPanel.get().Children())
00277         {
00278             // Handle clips on stars
00279             float width = RenderingRatingFontSize();
00280             if (static_cast<double>(i) + 1 > value)
00281             {
00282                 if (i < value)
00283                 {
00284                     // partial stars
00285                     width *= static_cast<float>(value - floor(value));
00286                 }
00287                 else
00288                 {
00289                     // empty stars
00290                     width = 0.0;
00291                 }
00292             }
00293
00294             winrt::Rect rect;
00295             rect.X = 0;
00296             rect.Y = 0;
00297             rect.Height = RenderingRatingFontSize();
00298             rect.Width = width;
00299
00300             winrt::RectangleGeometry rg;
00301             rg.Rect(rect);
00302             uiElement.as<winrt::UIElement>().Clip(rg);
00303
00304             i++;
00305         }
00306
00307         ResetControlWidth();
00308     }
00309 }
00310
00311 void RatingControl::ApplyScaleExpressionAnimation(const winrt::UIElement& uiElement, int starIndex)
00312 {
00313     const winrt::Visual uiElementVisual = winrt::ElementCompositionPreview::GetElementVisual(uiElement);
00314     const winrt::Compositor comp = uiElementVisual.Compositor();
00315
00316     // starsScaleFocalPoint is updated in OnPointerMovedOverBackgroundStackPanel.
00317     // This expression uses the horizontal delta between pointer position and star center to calculate the star scale.
00318     // Star gets larger when pointer is closer to its center, and gets smaller when pointer moves further away.
00319     const winrt::ExpressionAnimation ea = comp.CreateExpressionAnimation(
00320         L"max( (-0.0005 * sharedPropertySet.pointerScalar * ((starCenterX - sharedPropertySet.starsScaleFocalPoint)*(starCenterX - sharedPropertySet.starsScaleFocalPoint))) + 1.0*sharedPropertySet.pointerScalar, 0.5)"
00321     );
00322     const auto starCenter = static_cast<float>(CalculateStarCenter(starIndex));
00323     ea.SetScalarParameter(L"starCenterX", starCenter);
00324     ea.SetReferenceParameter(L"sharedPropertySet", m_sharedPointerPropertySet);
00325
00326     uiElementVisual.StartAnimation(L"Scale.X", ea);
00327     uiElementVisual.StartAnimation(L"Scale.Y", ea);
00328
00329     EnsureResourcesLoaded();
00330
00331     uiElementVisual.CenterPoint(winrt::float3(static_cast<float>(m_fontSizeForRendering * c_horizontalScaleAnimationCenterPoint), static_cast<float>(m_fontSizeForRendering * c_verticalScaleAnimationCenterPoint), 0.0f));
00332 }
00333
00334 void RatingControl::PopulateStackPanelWithItems(wstring_view templateName, const winrt::StackPanel& stackPanel, RatingControlStates state)
00335 {
00336     winrt::IInspectable lookup = winrt::Application::Current().Resources().Lookup(box_value(templateName));
00337     auto dt = lookup.as<winrt::DataTemplate>();
00338
00339     EnsureResourcesLoaded();
00340
00341     for (int i = 0; i < MaxRating(); i++)
00342     {
00343         if (auto ui = dt.LoadContent().as<winrt::UIElement>())
00344         {
00345             CustomizeRatingItem(ui, state);
00346             stackPanel.Children().Append(ui);
00347             ApplyScaleExpressionAnimation(ui, i);
00348         }
00349     }
00350
00351     // If we have at least one item, we'll use the first item as a representative element to determine some values.
00352     if (MaxRating() >= 1)
00353     {
00354         auto firstItem = stackPanel.Children().GetAt(0).as<winrt::UIElement>();
00355         firstItem.Measure({ std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() });
00356         auto defaultItemSpacing = firstItem.DesiredSize().Width - ActualRatingFontSize();
00357
00358         // We want the caption to be 12 pixels away from the right-hand side of the last item,
00359         // so we'll give it a left margin that accounts for the built-in item spacing.
00360         if (auto captionTextBlock = m_captionTextBlock.get())
00361         {
00362             auto margin = captionTextBlock.Margin();
00363             margin.Left = 12 - defaultItemSpacing;
00364             captionTextBlock.Margin(margin);
00365         }
00366
00367         // If we have at least two items, we'll need to apply the item spacing.
00368         // We'll calculate the default item spacing using the first item, and then
00369         // subtract it from the desired item spacing to get the Spacing property
00370         // to apply to the stack panel.
00371         if (MaxRating() >= 2)
00372         {
00373             stackPanel.Spacing(ItemSpacing() - defaultItemSpacing);
00374         }
00375     }
00376 }
00377
00378 void RatingControl::CustomizeRatingItem(const winrt::UIElement& ui, RatingControlStates type)
00379 {
00380     if (IsItemInfoPresentAndFontInfo())
00381     {
00382         if (auto textBlock = ui.as<winrt::TextBlock>())
00383         {
00384             textBlock.FontFamily(FontFamily());
00385             textBlock.Text(GetAppropriateGlyph(type));
00386             textBlock.FontSize(m_fontSizeForRendering);
00387         }
00388     }
00389     else if (IsItemInfoPresentAndImageInfo())
00390     {
00391         if (auto image = ui.as<winrt::Image>())
00392         {
00393             image.Source(GetAppropriateImageSource(type));
00394             image.Width(RenderingRatingFontSize()); //
00395             image.Height(RenderingRatingFontSize()); // MSFT #10030063 Replacing with Rating size DPs
00396         }
00397     }
00398     else
00399     {
00400         MUX_FAIL_FAST_MSG("Runtime error, ItemInfo property is null");
00401     }
00402
00403     if (auto fe = ui.try_as<winrt::FrameworkElement>())
00404     {
00405         // The default top margin is -8, but we want to increase or decrease that so that the center of the stars stays in a consistent place.
00406         // To do that, we'll add on half of the difference between the actual font size and its default value.
00407         auto margin = fe.Margin();
00408         margin.Top = -8 + (16 - ActualRatingFontSize());
00409         fe.Margin(margin);
00410     }
00411 }
00412
00413 void RatingControl::CustomizeStackPanel(const winrt::StackPanel& stackPanel, RatingControlStates state)
00414 {
00415     for (winrt::UIElement child : stackPanel.Children())
00416     {
00417         CustomizeRatingItem(child, state);
00418     }
00419 }
00420
00421 winrt::hstring RatingControl::GetAppropriateGlyph(RatingControlStates type)
00422 {
00423     if (!IsItemInfoPresentAndFontInfo())
00424     {
00425         MUX_FAIL_FAST_MSG("Runtime error, tried to retrieve a glyph when the ItemInfo is not a RatingItemGlyphInfo");
00426     }
00427
00428     winrt::RatingItemFontInfo rifi = ItemInfo().as<winrt::RatingItemFontInfo>();
00429
00430     switch (type)
00431     {
00432     case RatingControlStates::Disabled:
00433         return GetNextGlyphIfNull(rifi.DisabledGlyph(), RatingControlStates::Set);
00434         break;
00435     case RatingControlStates::PointerOverSet:
00436         return GetNextGlyphIfNull(rifi.PointerOverGlyph(), RatingControlStates::Set);
00437         break;
00438     case RatingControlStates::PointerOverPlaceholder:
00439         return GetNextGlyphIfNull(rifi.PointerOverPlaceholderGlyph(), RatingControlStates::Placeholder);
00440         break;
00441     case RatingControlStates::Placeholder:
00442         return GetNextGlyphIfNull(rifi.PlaceholderGlyph(), RatingControlStates::Set);
00443         break;
00444     case RatingControlStates::Unset:
00445         return GetNextGlyphIfNull(rifi.UnsetGlyph(), RatingControlStates::Set);
00446         break;
00447     case RatingControlStates::Null:
00448         return {};
00449         break;
00450     default:
00451         return rifi.Glyph(); // "Set" state
00452         break;
00453     }
00454 }
00455
00456 winrt::hstring RatingControl::GetNextGlyphIfNull(winrt::hstring glyph, RatingControlStates fallbackType)
00457 {
00458     if (glyph.size() == 0)
00459     {
00460         if (fallbackType == RatingControlStates::Null)
00461         {
00462             return {};
00463         }
00464         return GetAppropriateGlyph(fallbackType);
00465     }
00466     return glyph;
00467 }
00468
00469 winrt::ImageSource RatingControl::GetAppropriateImageSource(RatingControlStates type)
00470 {
00471     if (!IsItemInfoPresentAndImageInfo())
00472     {
00473         MUX_ASSERT_MSG(false, "Runtime error, tried to retrieve an image when the ItemInfo is not a RatingItemImageInfo");
00474     }
00475
00476     winrt::RatingItemImageInfo imageInfo = ItemInfo().as<winrt::RatingItemImageInfo>();
00477
00478     switch (type)
00479     {
00480     case RatingControlStates::Disabled:
00481         return GetNextImageIfNull(imageInfo.DisabledImage(), RatingControlStates::Set);
00482         break;
00483     case RatingControlStates::PointerOverSet:
00484         return GetNextImageIfNull(imageInfo.PointerOverImage(), RatingControlStates::Set);
00485         break;
00486     case RatingControlStates::PointerOverPlaceholder:
00487         return GetNextImageIfNull(imageInfo.PointerOverPlaceholderImage(), RatingControlStates::Placeholder);
00488         break;
00489     case RatingControlStates::Placeholder:
00490         return GetNextImageIfNull(imageInfo.PlaceholderImage(), RatingControlStates::Set);
00491         break;
00492     case RatingControlStates::Unset:
00493         return GetNextImageIfNull(imageInfo.UnsetImage(), RatingControlStates::Set);
00494         break;
00495     case RatingControlStates::Null:
00496         return nullptr;
00497         break;
00498     default:
00499         return imageInfo.Image(); // "Set" state
00500         break;
00501     }
00502 }
00503
00504 winrt::ImageSource RatingControl::GetNextImageIfNull(winrt::ImageSource image, RatingControlStates fallbackType)
00505 {
00506     if (!image)
00507     {
00508         if (fallbackType == RatingControlStates::Null)
00509         {
00510             return nullptr;
00511         }
00512         return GetAppropriateImageSource(fallbackType);
00513     }
00514     return image;
00515 }
00516
00517 void RatingControl::ResetControlWidth()
00518 {
00519     const double newWidth = CalculateTotalRatingControlWidth();
00520     const winrt::Control thisAsControl = *this;
00521     thisAsControl.Width(newWidth);
00522 }
00523
00524 void RatingControl::ChangeRatingBy(double change, bool originatedFromMouse)
00525 {
00526     if (change != 0.0)
00527     {
00528         double ratingValue = 0.0;
00529         double oldRatingValue = Value();
00530         if (oldRatingValue != c_noValueSetSentinel)
00531         {
00532             // If the Value was programmatically set to a fraction, drop that fraction before we modify it
00533             if ((int)Value() != Value())
00534             {
00535                 if (change == -1)
00536                 {
00537                     ratingValue = (int)Value();
00538                 }
00539                 else
00540                 {
00541                     ratingValue = (int)Value() + change;
00542                 }
00543             }
00544             else
00545             {
00546                 oldRatingValue = ratingValue = oldRatingValue;
00547                 ratingValue += change;
00548             }
00549         }
00550         else
00551         {
00552             ratingValue = InitialSetValue();
00553         }
00554
00555         SetRatingTo(ratingValue, originatedFromMouse);
00556     }
00557 }
00558
00559 void RatingControl::SetRatingTo(double newRating, bool originatedFromMouse)
00560 {
00561     double ratingValue = 0.0;
00562     const double oldRatingValue = Value();
00563
00564     ratingValue = std::min(newRating, static_cast<double>(MaxRating()));
00565     ratingValue = std::max(ratingValue, 0.0);
00566
00567     // The base case, and the you have no rating, and you pressed left case [wherein nothing should happen]
00568     if (oldRatingValue > c_noValueSetSentinel || ratingValue != 0.0)
00569     {
00570         if (!IsClearEnabled() && ratingValue <= 0.0)
00571         {
00572             Value(1.0);
00573         }
00574         else if (ratingValue == oldRatingValue && IsClearEnabled() && (ratingValue != MaxRating() || originatedFromMouse))
00575         {
00576             // If you increase the Rating via the keyboard/gamepad when it's maxed, the value should stay stable.
00577             // But if you click a star that represents the current Rating value, it should clear the rating.
00578
00579             Value(c_noValueSetSentinel);
00580         }
00581         else if (ratingValue > 0.0)
00582         {
00583             Value(ratingValue);
00584         }
00585         else
00586         {
00587             Value(c_noValueSetSentinel);
00588         }
00589
00590         // Notify that the Value has changed
00591         m_valueChangedEventSource(*this, nullptr);
00592     }
00593 }
00594
00595 void RatingControl::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00596 {
00597     auto property = args.Property();
00598     // Do coercion first.
00599     if (property == s_MaxRatingProperty)
00600     {
00601         // Enforce minimum MaxRating
00602         auto value = winrt::unbox_value<int>(args.NewValue());
00603         auto coercedValue = std::max(1, value);
00604
00605         if (Value() > coercedValue)
00606         {
00607             Value(coercedValue);
00608         }
00609
00610         if (PlaceholderValue() > coercedValue)
00611         {
00612             PlaceholderValue(coercedValue);
00613         }
00614
00615         if (coercedValue != value)
00616         {
00617             SetValue(property, winrt::box_value(coercedValue));
00618             return;
00619         }
00620     }
00621     else if (property == s_PlaceholderValueProperty || property == s_ValueProperty)
00622     {
00623         const auto value = winrt::unbox_value<double>(args.NewValue());
00624         const auto coercedValue = CoerceValueBetweenMinAndMax(value);
00625         if (value != coercedValue)
00626         {
00627             SetValue(property, winrt::box_value(coercedValue));
00628             // early return, we'll come back to handle the change to the corced value.
00629             return;
00630         }
00631     }
00632
00633     // Property value changed handling.
00634     if (property == s_CaptionProperty)
00635     {
00636         OnCaptionChanged(args);
00637     }
00638     else if (property == s_InitialSetValueProperty)
00639     {
00640         OnInitialSetValueChanged(args);
00641     }
00642     else if (property == s_IsClearEnabledProperty)
00643     {
00644         OnIsClearEnabledChanged(args);
00645     }
00646     else if (property == s_IsReadOnlyProperty)
00647     {
00648         OnIsReadOnlyChanged(args);
00649     }
00650     else if (property == s_ItemInfoProperty)
00651     {
00652         OnItemInfoChanged(args);
00653     }
00654     else if (property == s_MaxRatingProperty)
00655     {
00656         OnMaxRatingChanged(args);
00657     }
00658     else if (property == s_PlaceholderValueProperty)
00659     {
00660         OnPlaceholderValueChanged(args);
00661     }
00662     else if (property == s_ValueProperty)
00663     {
00664         OnValueChanged(args);
00665     }
00666 }
00667
00668 void RatingControl::OnCaptionChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00669 {
00670     ReRenderCaption();
00671 }
00672
00673 void RatingControl::OnFontFamilyChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& /*args*/)
00674 {
00675     if (m_backgroundStackPanel) // We don't want to do this for the initial property set
00676     {
00677         for (int i = 0; i < MaxRating(); i++)
00678         {
00679             // FUTURE: handle image rating items
00680             if (auto backgroundTB = m_backgroundStackPanel.get().Children().GetAt(i).try_as<winrt::TextBlock>())
00681             {
00682                 CustomizeRatingItem(backgroundTB, RatingControlStates::Unset);
00683             }
00684
00685             if (auto foregroundTB = m_foregroundStackPanel.get().Children().GetAt(i).try_as<winrt::TextBlock>())
00686             {
00687                 CustomizeRatingItem(foregroundTB, RatingControlStates::Set);
00688             }
00689         }
00690     }
00691
00692     UpdateRatingItemsAppearance();
00693 }
00694
00695 void RatingControl::OnInitialSetValueChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00696 {
00697
00698 }
00699
00700 void RatingControl::OnIsClearEnabledChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00701 {
00702
00703 }
00704
00705 void RatingControl::OnIsReadOnlyChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00706 {
00707     // TODO: Colour changes - see spec
00708 }
00709
00710 void RatingControl::OnItemInfoChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00711 {
00712     bool changedType = false;
00713
00714     if (!ItemInfo())
00715     {
00716         m_infoType = RatingInfoType::None;
00717     }
00718     else if (ItemInfo().try_as<winrt::RatingItemFontInfo>())
00719     {
00720         if (m_infoType != RatingInfoType::Font && m_backgroundStackPanel /* prevent calling StampOutRatingItems() twice at initialisation */)
00721         {
00722             m_infoType = RatingInfoType::Font;
00723             StampOutRatingItems();
00724             changedType = true;
00725         }
00726     }
00727     else
00728     {
00729         if (m_infoType != RatingInfoType::Image)
00730         {
00731             m_infoType = RatingInfoType::Image;
00732             StampOutRatingItems();
00733             changedType = true;
00734         }
00735     }
00736
00737     // We don't want to do this for the initial property set
00738     // Or if we just stamped them out
00739     if (m_backgroundStackPanel && !changedType)
00740     {
00741         for (int i = 0; i < MaxRating(); i++)
00742         {
00743             CustomizeRatingItem(m_backgroundStackPanel.get().Children().GetAt(i), RatingControlStates::Unset);
00744             CustomizeRatingItem(m_foregroundStackPanel.get().Children().GetAt(i), RatingControlStates::Set);
00745         }
00746     }
00747
00748     UpdateRatingItemsAppearance();
00749 }
00750
00751 void RatingControl::OnMaxRatingChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00752 {
00753     StampOutRatingItems();
00754 }
00755
00756 void RatingControl::OnPlaceholderValueChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00757 {
00758     UpdateRatingItemsAppearance();
00759 }
00760
00761 void RatingControl::OnValueChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00762 {
00763     // Fire property change for UIA
00764     if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00765     {
00766         auto ratingPeer = peer.as<winrt::RatingControlAutomationPeer>();
00767         winrt::get_self<RatingControlAutomationPeer>(ratingPeer)->RaisePropertyChangedEvent(Value());
00768     }
00769
00770     UpdateRatingItemsAppearance();
00771 }
00772
00773 void RatingControl::OnIsEnabledChanged(const winrt::IInspectable& /*sender*/, const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00774 {
00775     // MSFT 11521414 TODO: change states (add a state)
00776     UpdateRatingItemsAppearance();
00777 }
00778
00779 void RatingControl::OnCaptionSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& /*args*/)
00780 {
00781     ResetControlWidth();
00782 }
00783
00784 void RatingControl::OnPointerCancelledBackgroundStackPanel(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& args)
00785 {
00786     PointerExitedImpl(args);
00787 }
00788
00789 void RatingControl::OnPointerCaptureLostBackgroundStackPanel(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& args)
00790 {
00791     // We capture the pointer because we want to support the drag off the
00792     // left side to clear the rating scenario. However, this means that
00793     // when we simply click to set values - we get here, but we don't want
00794     // to reset the scaling on the stars underneath the pointer.
00795     PointerExitedImpl(args, false /* resetScaleAnimation */);
00796     m_hasPointerCapture = false;
00797 }
00798
00799 void RatingControl::OnPointerMovedOverBackgroundStackPanel(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& args)
00800 {
00801     if (!IsReadOnly())
00802     {
00803         if (auto backgroundStackPanel = m_backgroundStackPanel.get())
00804         {
00805             const auto point = args.GetCurrentPoint(backgroundStackPanel);
00806             const float xPosition = point.Position().X;
00807
00808             m_mousePercentage = static_cast<double>(xPosition - m_firstItemOffset) / CalculateActualRatingWidth();
00809
00810             UpdateRatingItemsAppearance();
00811             args.Handled(true);
00812         }
00813     }
00814 }
00815
00816 void RatingControl::OnPointerEnteredBackgroundStackPanel(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& args)
00817 {
00818     if (!IsReadOnly())
00819     {
00820         m_isPointerOver = true;
00821
00822         if (auto backgroundStackPanel = m_backgroundStackPanel.get())
00823         {
00824             if (MaxRating() >= 1)
00825             {
00826                 auto firstItem = backgroundStackPanel.Children().GetAt(0).as<winrt::UIElement>();
00827                 auto firstItemOffsetPoint = firstItem.TransformToVisual(backgroundStackPanel).TransformPoint({ 0, 0 });
00828                 m_firstItemOffset = firstItemOffsetPoint.X;
00829             }
00830         }
00831
00832         args.Handled(true);
00833     }
00834 }
00835
00836 void RatingControl::OnPointerExitedBackgroundStackPanel(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& args)
00837 {
00838     PointerExitedImpl(args);
00839 }
00840
00841 void RatingControl::PointerExitedImpl(const winrt::PointerRoutedEventArgs& args, bool resetScaleAnimation)
00842 {
00843     if (resetScaleAnimation)
00844     {
00845         m_isPointerOver = false;
00846     }
00847
00848     if (!m_isPointerDown)
00849     {
00850         // Only clear pointer capture when not holding pointer down for drag left to clear value scenario.
00851         if (m_hasPointerCapture)
00852         {
00853             m_backgroundStackPanel.get().ReleasePointerCapture(args.Pointer());
00854             m_hasPointerCapture = false;
00855         }
00856
00857         if (resetScaleAnimation)
00858         {
00859             m_sharedPointerPropertySet.InsertScalar(L"starsScaleFocalPoint", c_noPointerOverMagicNumber);
00860         }
00861         UpdateRatingItemsAppearance();
00862     }
00863
00864     args.Handled(true);
00865 }
00866
00867 void RatingControl::OnPointerPressedBackgroundStackPanel(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& args)
00868 {
00869     if (!IsReadOnly())
00870     {
00871         m_isPointerDown = true;
00872
00873         // We capture the pointer on pointer down because we want to support
00874         // the drag off the left side to clear the rating scenario.
00875         m_backgroundStackPanel.get().CapturePointer(args.Pointer());
00876         m_hasPointerCapture = true;
00877     }
00878 }
00879
00880 void RatingControl::OnPointerReleasedBackgroundStackPanel(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& args)
00881 {
00882     if (!IsReadOnly())
00883     {
00884         const auto point = args.GetCurrentPoint(m_backgroundStackPanel.get());
00885         const auto xPosition = point.Position().X;
00886
00887         const double mousePercentage = xPosition / CalculateActualRatingWidth();
00888         SetRatingTo(ceil(mousePercentage * MaxRating()), true);
00889
00890         winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::Invoke);
00891     }
00892
00893     if (m_isPointerDown)
00894     {
00895         m_isPointerDown = false;
00896         UpdateRatingItemsAppearance();
00897     }
00898 }
00899
00900 double RatingControl::CalculateTotalRatingControlWidth()
00901 {
00902     const double ratingStarsWidth = CalculateActualRatingWidth();
00903     const auto captionAsWinRT = unbox_value<winrt::hstring>(GetValue(s_CaptionProperty));
00904     double textSpacing = 0.0;
00905
00906     if (captionAsWinRT.size() > 0)
00907     {
00908         textSpacing = ItemSpacing();
00909     }
00910
00911     double captionWidth = 0.0;
00912
00913     if (m_captionTextBlock)
00914     {
00915         captionWidth = m_captionTextBlock.get().ActualWidth();
00916     }
00917
00918     return ratingStarsWidth + textSpacing + captionWidth;
00919 }
00920
00921 double RatingControl::CalculateStarCenter(int starIndex)
00922 {
00923     // TODO: sub in real API DP values
00924     // MSFT #10030063
00925     // [real Rating Size * (starIndex + 0.5)] + (starIndex * itemSpacing)
00926     return (ActualRatingFontSize() * (starIndex + 0.5)) + (starIndex * ItemSpacing());
00927 }
00928
00929 double RatingControl::CalculateActualRatingWidth()
00930 {
00931     // TODO: replace hardcoding
00932     // MSFT #10030063
00933     // (max rating * rating size) + ((max rating - 1) * item spacing)
00934     return (static_cast<double>(MaxRating()) * ActualRatingFontSize()) + ((static_cast<double>(MaxRating()) - 1) * ItemSpacing());
00935 }
00936
00937 // IControlOverrides
00938 void RatingControl::OnKeyDown(winrt::KeyRoutedEventArgs const& eventArgs)
00939 {
00940     if (eventArgs.Handled())
00941     {
00942         return;
00943     }
00944
00945     if (!IsReadOnly())
00946     {
00947         bool handled = false;
00948         winrt::VirtualKey key = eventArgs.as<winrt::KeyRoutedEventArgs>().Key();
00949
00950         double flowDirectionReverser = 1.0;
00951
00952         if (FlowDirection() == winrt::FlowDirection::RightToLeft)
00953         {
00954             flowDirectionReverser *= -1.0;
00955         }
00956
00957         auto originalKey = eventArgs.as<winrt::KeyRoutedEventArgs>().OriginalKey();
00958
00959         // Up down are right/left in keyboard only
00960         if (originalKey == winrt::VirtualKey::Up)
00961         {
00962             key = winrt::VirtualKey::Right;
00963             flowDirectionReverser = 1.0;
00964         }
00965         else if (originalKey == winrt::VirtualKey::Down)
00966         {
00967             key = winrt::VirtualKey::Left;
00968             flowDirectionReverser = 1.0;
00969         }
00970
00971         if (originalKey == winrt::VirtualKey::GamepadDPadLeft || originalKey == winrt::VirtualKey::GamepadDPadRight ||
00972             originalKey == winrt::VirtualKey::GamepadLeftThumbstickLeft || originalKey == winrt::VirtualKey::GamepadLeftThumbstickRight)
00973         {
00974             winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::Focus);
00975         }
00976
00977         switch (key)
00978         {
00979         case winrt::VirtualKey::Left:
00980             ChangeRatingBy(-1.0 * flowDirectionReverser, false);
00981             handled = true;
00982             break;
00983         case winrt::VirtualKey::Right:
00984             ChangeRatingBy(1.0 * flowDirectionReverser, false);
00985             handled = true;
00986             break;
00987         case winrt::VirtualKey::Home:
00988             SetRatingTo(0.0, false);
00989             handled = true;
00990             break;
00991         case winrt::VirtualKey::End:
00992             SetRatingTo(static_cast<double>(MaxRating()), false);
00993             handled = true;
00994             break;
00995         default:
00996             break;
00997         }
00998
00999         eventArgs.Handled(handled);
01000     }
01001
01002     __super::OnKeyDown(eventArgs);
01003 }
01004
01005 // We use the same engagement model as Slider/sorta like ComboBox
01006 // Pressing GamepadA engages, pressing either GamepadA or GamepadB disengages,
01007 // where GamepadA commits the new value, and GamepadB discards and restores the old value.
01008
01009 // The reason we do this in the OnPreviewKey* virtuals is we need
01010 // to beat the framework to handling this event. Because disengagement
01011 // happens on key down, and engagement happens on key up...
01012 // if we disengage on GamepadA, the framework would otherwise
01013 // automatically reengage us.
01014
01015 // Order:
01016 // OnPreviewKey* virtuals
01017 // PreviewKey subscribed events
01018 // [regular key events]
01019
01020 void RatingControl::OnPreviewKeyDown(winrt::KeyRoutedEventArgs const& eventArgs)
01021 {
01022     if (eventArgs.Handled())
01023     {
01024         return;
01025     }
01026
01027     if (!IsReadOnly() && IsFocusEngaged() && IsFocusEngagementEnabled())
01028     {
01029         auto originalKey = eventArgs.as<winrt::KeyRoutedEventArgs>().OriginalKey();
01030         if (originalKey == winrt::VirtualKey::GamepadA)
01031         {
01032             m_shouldDiscardValue = false;
01033             m_preEngagementValue = -1.0;
01034             RemoveFocusEngagement();
01035             m_disengagedWithA = true;
01036             eventArgs.Handled(true);
01037         }
01038         else if (originalKey == winrt::VirtualKey::GamepadB)
01039         {
01040             bool valueChanged = false;
01041             m_shouldDiscardValue = false;
01042
01043             if (Value() != m_preEngagementValue)
01044             {
01045                 valueChanged = true;
01046             }
01047
01048             Value(m_preEngagementValue);
01049
01050             if (valueChanged)
01051             {
01052                 m_valueChangedEventSource(*this, nullptr);
01053             }
01054
01055             m_preEngagementValue = -1.0;
01056             RemoveFocusEngagement();
01057             eventArgs.Handled(true);
01058         }
01059     }
01060 }
01061
01062 void RatingControl::OnPreviewKeyUp(winrt::KeyRoutedEventArgs const& eventArgs)
01063 {
01064     auto originalKey = eventArgs.as<winrt::KeyRoutedEventArgs>().OriginalKey();
01065
01066     if (IsFocusEngagementEnabled() && originalKey == winrt::VirtualKey::GamepadA && m_disengagedWithA)
01067     {
01068         // Block the re-engagement
01069         m_disengagedWithA = false; // We want to do this regardless of handled
01070         eventArgs.Handled(true);
01071     }
01072 }
01073
01074 void RatingControl::OnFocusEngaged(const winrt::Control& /*sender*/, const winrt::FocusEngagedEventArgs& /*args*/)
01075 {
01076     if (!IsReadOnly())
01077     {
01078         EnterGamepadEngagementMode();
01079     }
01080 }
01081
01082 void RatingControl::OnFocusDisengaged(const winrt::Control& /*sender*/, const winrt::FocusDisengagedEventArgs& /*args*/)
01083 {
01084     // Revert value:
01085     // for catching programmatic disengagements, gamepad ones are handled in OnPreviewKeyDown
01086     if (m_shouldDiscardValue)
01087     {
01088         bool valueChanged = false;
01089
01090         if (Value() != m_preEngagementValue)
01091         {
01092             valueChanged = true;
01093         }
01094
01095         Value(m_preEngagementValue);
01096         m_preEngagementValue = -1.0f;
01097
01098         if (valueChanged)
01099         {
01100             m_valueChangedEventSource(*this, nullptr);
01101         }
01102     }
01103
01104     ExitGamepadEngagementMode();
01105 }
01106
01107 void RatingControl::EnterGamepadEngagementMode()
01108 {
01109     double currentValue = Value();
01110     m_shouldDiscardValue = true;
01111
01112     if (currentValue == c_noValueSetSentinel)
01113     {
01114         Value(InitialSetValue());
01115         // Notify that the Value has changed
01116         m_valueChangedEventSource(*this, nullptr);
01117         currentValue = InitialSetValue();
01118         m_preEngagementValue = -1;
01119     }
01120     else
01121     {
01122         currentValue = Value();
01123         m_preEngagementValue = currentValue;
01124     }
01125
01126     winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::Invoke);
01127 }
01128
01129 void RatingControl::ExitGamepadEngagementMode()
01130 {
01131     winrt::ElementSoundPlayer::Play(winrt::ElementSoundKind::GoBack);
01132
01133     m_sharedPointerPropertySet.InsertScalar(L"starsScaleFocalPoint", c_noPointerOverMagicNumber);
01134     m_disengagedWithA = false;
01135 }
01136
01137 void RatingControl::RecycleEvents(bool useSafeGet)
01138 {
01139     if (auto backgroundStackPanel = m_backgroundStackPanel.safe_get(useSafeGet))
01140     {
01141         if (m_pointerCancelledToken.value)
01142         {
01143             backgroundStackPanel.PointerCanceled(m_pointerCancelledToken);
01144             m_pointerCancelledToken.value = 0;
01145         }
01146
01147         if (m_pointerCaptureLostToken.value)
01148         {
01149             backgroundStackPanel.PointerCaptureLost(m_pointerCaptureLostToken);
01150             m_pointerCaptureLostToken.value = 0;
01151         }
01152
01153         if (m_pointerMovedToken.value)
01154         {
01155             backgroundStackPanel.PointerMoved(m_pointerMovedToken);
01156             m_pointerMovedToken.value = 0;
01157         }
01158
01159         if (m_pointerEnteredToken.value)
01160         {
01161             backgroundStackPanel.PointerEntered(m_pointerEnteredToken);
01162             m_pointerEnteredToken.value = 0;
01163         }
01164
01165         if (m_pointerExitedToken.value)
01166         {
01167             backgroundStackPanel.PointerExited(m_pointerExitedToken);
01168             m_pointerExitedToken.value = 0;
01169         }
01170
01171         if (m_pointerPressedToken.value)
01172         {
01173             backgroundStackPanel.PointerPressed(m_pointerPressedToken);
01174             m_pointerPressedToken.value = 0;
01175         }
01176
01177         if (m_pointerReleasedToken.value)
01178         {
01179             backgroundStackPanel.PointerReleased(m_pointerReleasedToken);
01180             m_pointerReleasedToken.value = 0;
01181         }
01182     }
01183
01184     if (auto captionTextBlock = m_captionTextBlock.safe_get(useSafeGet))
01185     {
01186         if (m_captionSizeChangedToken.value)
01187         {
01188             captionTextBlock.SizeChanged(m_captionSizeChangedToken);
01189             m_captionSizeChangedToken.value = 0;
01190         }
01191     }
01192 }
01193
01194 void RatingControl::OnTextScaleFactorChanged(const winrt::UISettings& setting, const winrt::IInspectable& args)
01195 {
01196     // OnTextScaleFactorChanged happens in non-UI thread, use dispatcher to call StampOutRatingItems in UI thread.
01197     auto strongThis = get_strong();
01198     m_dispatcherHelper.RunAsync([strongThis]()
01199         {
01200             strongThis->StampOutRatingItems();
01201             strongThis->UpdateCaptionMargins();
01202         });
01203
01204 }
01205
01206 winrt::UISettings RatingControl::GetUISettings()
01207 {
01208     static winrt::UISettings uiSettings = winrt::UISettings();
01209     return uiSettings;
01210 }
01211
01212 void RatingControl::EnsureResourcesLoaded()
01213 {
01214     if (!m_resourcesLoaded)
01215     {
01216         auto fontSizeForRenderingKey = box_value(c_fontSizeForRenderingKey);
01217         auto itemSpacingKey = box_value(c_itemSpacingKey);
01218
01219         if (Resources().HasKey(fontSizeForRenderingKey))
01220         {
01221             m_fontSizeForRendering = unbox_value<double>(Resources().Lookup(fontSizeForRenderingKey));
01222         }
01223         else if (winrt::Application::Current().Resources().HasKey(fontSizeForRenderingKey))
01224         {
01225             m_fontSizeForRendering = unbox_value<double>(winrt::Application::Current().Resources().Lookup(fontSizeForRenderingKey));
01226         }
01227         else
01228         {
01229             m_fontSizeForRendering = c_defaultFontSizeForRendering;
01230         }
01231
01232         if (Resources().HasKey(itemSpacingKey))
01233         {
01234             m_itemSpacing = unbox_value<double>(Resources().Lookup(itemSpacingKey));
01235         }
01236         else if (winrt::Application::Current().Resources().HasKey(itemSpacingKey))
01237         {
01238             m_itemSpacing = unbox_value<double>(winrt::Application::Current().Resources().Lookup(itemSpacingKey));
01239         }
01240         else
01241         {
01242             m_itemSpacing = c_defaultItemSpacing;
01243         }
01244
01245         m_resourcesLoaded = true;
01246     }
01247 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockItemsSource.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks

MockItemsSource.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Specialized;
00008 using Microsoft.UI.Xaml.Controls;
00009 using MUXControlsTestApp.Utilities;
00010 using Common;
00011
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks
00017 {
00018     public class MockItemsSource : CustomItemsSourceView
00019     {
00020         private List<GetAtCallInfo> _recordedGetAtCalls = new List<GetAtCallInfo>();
00021         protected List<KeyFromIndexCallInfo> _recordedKeyFromIndexCalls = new List<KeyFromIndexCallInfo>();
00022         private int _getSizeCallsCount;
00023
00024         public Func<int> GetSizeFunc { get; set; }
00025         public Func<int, object> GetAtFunc { get; set; }
00026         public Func<bool> HasKeyIndexMappingFunc { get; set; }
00027         public Func<int, string> GetItemIdFunc { get; set; }
00028
00029         public static MockItemsSource CreateDataSource<T>(ObservableCollection<T> data, bool supportsUniqueIds)
00030         {
00031             var mock = new MockItemsSource
00032             {
00033                 GetSizeFunc = () => data.Count,
00034                 GetAtFunc = (index) => data[index],
00035                 HasKeyIndexMappingFunc = () => supportsUniqueIds,
00036                 GetItemIdFunc = (index) =>
00037                 {
00038                     if (supportsUniqueIds)
00039                     {
00040                         return data[index].ToString();
00041                     }
00042                     else
00043                     {
00044                         throw new InvalidOperationException();
00045                     }
00046                 }
00047             };
00048
00049             data.CollectionChanged += (s, e) => mock.OnItemsSourceChanged(e);
00050
00051             return mock;
00052         }
00053
00054         public static MockItemsSource CreateDataSource(WinRTCollection data, bool supportsUniqueIds)
00055         {
00056             MockItemsSource mock = null;
00057             if (supportsUniqueIds)
00058             {
00059                 mock = new MockItemsSourceWithUniqueIdMapping
00060                 {
00061                     GetSizeFunc = () => data.Count,
00062                     GetAtFunc = (index) => data[index],
00063                     GetItemIdFunc = (index) =>
00064                     {
00065                         if (supportsUniqueIds)
00066                         {
00067                             return data[index].ToString();
00068                         }
00069                         else
00070                         {
00071                             throw new InvalidOperationException();
00072                         }
00073                     }
00074                 };
00075             }
00076             else
00077             {
00078                 mock = new MockItemsSource
00079                 {
00080                     GetSizeFunc = () => data.Count,
00081                     GetAtFunc = (index) => data[index],
00082                     GetItemIdFunc = (index) =>
00083                     {
00084                         if (supportsUniqueIds)
00085                         {
00086                             return data[index].ToString();
00087                         }
00088                         else
00089                         {
00090                             throw new InvalidOperationException();
00091                         }
00092                     }
00093                 };
00094
00095             }
00096
00097             data.VectorChanged += (s, e) => mock.OnItemsSourceChanged(e.ConvertToDataSourceChangedEventArgs());
00098
00099             return mock;
00100         }
00101
00102         public void ValidateGetSizeCalls(int expectedCallCount)
00103         {
00104             Log.Comment("Validating GetSize calls");
00105             Verify.AreEqual(expectedCallCount, _getSizeCallsCount);
00106             _getSizeCallsCount = 0;
00107         }
00108
00109         public void ValidateGetAtCalls(params GetAtCallInfo[] expected)
00110         {
00111             Log.Comment("Validating GetAt calls");
00112             Verify.AreEqual(expected.Length, _recordedGetAtCalls.Count);
00113             for (int i = 0; i < expected.Length; ++i)
00114             {
00115                 Verify.AreEqual(expected[i].Index, _recordedGetAtCalls[i].Index);
00116             }
00117
00118             _recordedGetAtCalls.Clear();
00119         }
00120
00121         public void ValidateGetItemIdCalls(params KeyFromIndexCallInfo[] expected)
00122         {
00123             Log.Comment("Validating GetItemId calls");
00124             Verify.AreEqual(expected.Length, _recordedKeyFromIndexCalls.Count);
00125             for (int i = 0; i < expected.Length; ++i)
00126             {
00127                 Verify.AreEqual(expected[i].Index, _recordedKeyFromIndexCalls[i].Index);
00128             }
00129
00130             _recordedKeyFromIndexCalls.Clear();
00131         }
00132
00133         public new void OnItemsSourceChanged(NotifyCollectionChangedEventArgs args)
00134         {
00135             base.OnItemsSourceChanged(args);
00136         }
00137
00138         protected override int GetSizeCore()
00139         {
00140             ++_getSizeCallsCount;
00141             return GetSizeFunc != null ? GetSizeFunc() : default(int);
00142         }
00143
00144         protected override object GetAtCore(int index)
00145         {
00146             _recordedGetAtCalls.Add(new GetAtCallInfo(index));
00147             return GetAtFunc != null ? GetAtFunc(index) : null;
00148         }
00149
00150         public class GetAtCallInfo
00151         {
00152             public int Index { get; private set; }
00153
00154             public GetAtCallInfo(int index)
00155             {
00156                 Index = index;
00157             }
00158         }
00159
00160         public class KeyFromIndexCallInfo
00161         {
00162             public int Index { get; private set; }
00163
00164             public KeyFromIndexCallInfo(int index)
00165             {
00166                 Index = index;
00167             }
00168         }
00169     }
00170
00171     public class MockItemsSourceWithUniqueIdMapping : MockItemsSource, IKeyIndexMapping
00172     {
00173         public string KeyFromIndex(int index)
00174         {
00175             _recordedKeyFromIndexCalls.Add(new KeyFromIndexCallInfo(index));
00176             return GetItemIdFunc != null ? GetItemIdFunc(index) : null;
00177         }
00178
00179         public int IndexFromKey(string id)
00180         {
00181             throw new NotImplementedException();
00182         }
00183     }
00184 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBarTemplateSettings.h Source File

  • File List
  • File Members
  • ProgressBar

ProgressBarTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ProgressBarTemplateSettings.g.h"
00007 #include "ProgressBarTemplateSettings.properties.h"
00008
00009 class ProgressBarTemplateSettings :
00010     public winrt::implementation::ProgressBarTemplateSettingsT<ProgressBarTemplateSettings>,
00011     public ProgressBarTemplateSettingsProperties
00012 {
00013 public:
00014     ProgressBarTemplateSettings();
00015 };
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

EffectiveViewportTests Member List

This is the complete list of members for EffectiveViewportTests, including all inherited members.
CanBringIntoViewElements() | EffectiveViewportTests | [inline]
CanGrowCacheBufferWithScrollViewer() | EffectiveViewportTests | [inline]
GetMonitoringLayout(Size desiredSize, List< Rect > realizationRects, ManualResetEvent layoutMeasured=null) | EffectiveViewportTests | [inline, private, static]
ValidateBasicScrollViewerScenario() | EffectiveViewportTests | [inline]
ValidateOneScrollViewerScenario() | EffectiveViewportTests | [inline]
ValidateRealizedRange(ItemsRepeater itemsRepeater, int expectedFirstItemIndex, int expectedLastItemIndex) | EffectiveViewportTests | [inline, private]
ValidateTwoScrollViewerScenario() | EffectiveViewportTests | [inline]
Generated on Sun Dec 1 2024 20:53:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollView Member List

This is the complete list of members for ScrollView, including all inherited members.
abi_enter() | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
AddScrollVelocity(winrt::float2 offsetsVelocity, winrt::IReference< winrt::float2 > inertiaDecayRate) | ScrollView |
AddZoomVelocity(float zoomFactorVelocity, winrt::IReference< winrt::float2 > centerPoint, winrt::IReference< float > inertiaDecayRate) | ScrollView |
AnchorRequested(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs > const &value) | ScrollViewProperties |
AnchorRequested(winrt::event_token const &token) | ScrollViewProperties |
AreAllScrollControllersCollapsed(bool useSafeGet=false) const | ScrollView | [private]
AreBothScrollControllersVisible() const | ScrollView | [private]
AreScrollControllersAutoHiding() | ScrollView | [private]
BringingIntoView(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs > const &value) | ScrollViewProperties |
BringingIntoView(winrt::event_token const &token) | ScrollViewProperties |
CanScrollDown() | ScrollView | [private]
CanScrollHorizontallyInDirection(bool inPositiveDirection) | ScrollView | [private]
CanScrollInDirection(winrt::FocusNavigationDirection drection) | ScrollView | [private]
CanScrollLeft() | ScrollView | [private]
CanScrollRight() | ScrollView | [private]
CanScrollUp() | ScrollView | [private]
CanScrollVerticallyInDirection(bool inPositiveDirection) | ScrollView | [private]
CheckThread() | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
ClearProperties() | ScrollViewProperties | [static]
ComputedHorizontalScrollBarVisibility(winrt::Visibility const &value) | ScrollViewProperties |
ComputedHorizontalScrollBarVisibility() | ScrollViewProperties |
ComputedHorizontalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
ComputedHorizontalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
ComputedHorizontalScrollMode() | ScrollViewProperties |
ComputedHorizontalScrollModeProperty() | ScrollViewProperties | [inline, static]
ComputedVerticalScrollBarVisibility(winrt::Visibility const &value) | ScrollViewProperties |
ComputedVerticalScrollBarVisibility() | ScrollViewProperties |
ComputedVerticalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
ComputedVerticalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
ComputedVerticalScrollMode() | ScrollViewProperties |
ComputedVerticalScrollModeProperty() | ScrollViewProperties | [inline, static]
Content(winrt::UIElement const &value) | ScrollViewProperties |
Content() | ScrollViewProperties |
ContentOrientation(winrt::ScrollingContentOrientation const &value) | ScrollViewProperties |
ContentOrientation() | ScrollViewProperties |
ContentOrientationProperty() | ScrollViewProperties | [inline, static]
ContentProperty() | ScrollViewProperties | [inline, static]
CurrentAnchor() | ScrollView |
DeleteInstanceOnUIThread(std::unique_ptr< ScrollView > &&self) noexcept | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline, static]
DoScroll(double offsetAmount, winrt::Orientation orientation) | ScrollView | [private]
DoScrollForKey(winrt::VirtualKey key, double scrollProportion) | ScrollView | [private]
EnsureProperties() | ScrollViewProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
ExpressionAnimationSources() | ScrollView |
ExtentChanged(winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value) | ScrollViewProperties |
ExtentChanged(winrt::event_token const &token) | ScrollViewProperties |
ExtentHeight() | ScrollView |
ExtentWidth() | ScrollView |
final_release(std::unique_ptr< ScrollView > &&self) | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline, static]
GetBase() | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
GetInner() | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
GetNextFocusCandidate(winrt::FocusNavigationDirection direction, bool isPageNavigation) | ScrollView | [private]
GoToState(std::wstring_view const &stateName, bool useTransitions=true) | ScrollView | [private]
HandleKeyDownForStandardScroll(winrt::KeyRoutedEventArgs) | ScrollView | [private]
HandleKeyDownForXYNavigation(winrt::KeyRoutedEventArgs) | ScrollView | [private]
HandleScrollControllerPointerEntered(bool isForHorizontalScrollController) | ScrollView | [private]
HandleScrollControllerPointerExited(bool isForHorizontalScrollController) | ScrollView | [private]
HideIndicators(bool useTransitions=true, bool useSafeGet=false) | ScrollView | [private]
HideIndicatorsAfterDelay() | ScrollView | [private]
HookCompositionTargetRendering() | ScrollView | [private]
HookHorizontalScrollControllerEvents() | ScrollView | [private]
HookScrollPresenterEvents() | ScrollView | [private]
HookScrollViewEvents() | ScrollView | [private]
HookUISettingsEvent() | ScrollView | [private]
HookVerticalScrollControllerEvents() | ScrollView | [private]
HorizontalAnchorRatio(double value) | ScrollViewProperties |
HorizontalAnchorRatio() | ScrollViewProperties |
HorizontalAnchorRatioProperty() | ScrollViewProperties | [inline, static]
HorizontalOffset() | ScrollView |
HorizontalScrollBarVisibility(winrt::ScrollingScrollBarVisibility const &value) | ScrollViewProperties |
HorizontalScrollBarVisibility() | ScrollViewProperties |
HorizontalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
HorizontalScrollChainMode(winrt::ScrollingChainMode const &value) | ScrollViewProperties |
HorizontalScrollChainMode() | ScrollViewProperties |
HorizontalScrollChainModeProperty() | ScrollViewProperties | [inline, static]
HorizontalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
HorizontalScrollMode() | ScrollViewProperties |
HorizontalScrollModeProperty() | ScrollViewProperties | [inline, static]
HorizontalScrollRailMode(winrt::ScrollingRailMode const &value) | ScrollViewProperties |
HorizontalScrollRailMode() | ScrollViewProperties |
HorizontalScrollRailModeProperty() | ScrollViewProperties | [inline, static]
IgnoredInputKinds() | ScrollView |
IgnoredInputKinds(winrt::ScrollingInputKinds const &value) | ScrollView |
IgnoredInputKindsProperty() | ScrollViewProperties | [inline, static]
IsInputKindIgnored(winrt::ScrollingInputKinds const &inputKind) | ScrollView | [private]
IsOnThread() | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
IsScrollControllersSeparatorVisible() const | ScrollView | [private]
m_anchorRequestedEventSource | ScrollViewProperties |
m_autoHideScrollBarsState | ScrollView | [private]
m_bringingIntoViewEventSource | ScrollViewProperties |
m_extentChangedEventSource | ScrollViewProperties |
m_scrollAnimationStartingEventSource | ScrollViewProperties |
m_scrollCompletedEventSource | ScrollViewProperties |
m_scrollStartingEventSource | ScrollViewProperties |
m_stateChangedEventSource | ScrollViewProperties |
m_viewChangedEventSource | ScrollViewProperties |
m_zoomAnimationStartingEventSource | ScrollViewProperties |
m_zoomCompletedEventSource | ScrollViewProperties |
m_zoomStartingEventSource | ScrollViewProperties |
MakeAutoHideScrollBarsState() | ScrollView | [private, static]
MaxZoomFactor(double value) | ScrollViewProperties |
MaxZoomFactor() | ScrollViewProperties |
MaxZoomFactorProperty() | ScrollViewProperties | [inline, static]
MinZoomFactor(double value) | ScrollViewProperties |
MinZoomFactor() | ScrollViewProperties |
MinZoomFactorProperty() | ScrollViewProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
OnApplyTemplate() | ScrollView |
OnAutoHideScrollBarsChanged(winrt::UISettings const &uiSettings, winrt::UISettingsAutoHideScrollBarsChangedEventArgs const &args) | ScrollView | [private]
OnCompositionTargetRendering(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnComputedHorizontalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnComputedHorizontalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnComputedVerticalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnComputedVerticalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnContentOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnGotFocus(winrt::RoutedEventArgs const &args) | ScrollView |
OnHideIndicatorsTimerTick(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnHorizontalAnchorRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollControllerPointerEntered(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnHorizontalScrollControllerPointerExited(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnHorizontalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnHorizontalScrollRailModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnIgnoredInputKindsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnIndicatorStateStoryboardCompleted(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnKeyDown(winrt::KeyRoutedEventArgs const &args) | ScrollView |
OnMaxZoomFactorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnMinZoomFactorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnNoIndicatorStateStoryboardCompleted(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ScrollView |
OnScrollAnimationStarting(const winrt::IInspectable &sender, const winrt::ScrollingScrollAnimationStartingEventArgs &args) | ScrollView | [private]
OnScrollControllerCanScrollChanged(const winrt::IScrollController &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnScrollControllerIsScrollingWithMouseChanged(const winrt::IScrollController &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnScrollPresenterAnchorRequested(const winrt::IInspectable &sender, const winrt::ScrollingAnchorRequestedEventArgs &args) | ScrollView | [private]
OnScrollPresenterBringingIntoView(const winrt::IInspectable &sender, const winrt::ScrollingBringingIntoViewEventArgs &args) | ScrollView | [private]
OnScrollPresenterExtentChanged(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnScrollPresenterPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | ScrollView | [private]
ScrollViewProperties::OnScrollPresenterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnScrollPresenterScrollCompleted(const winrt::IInspectable &sender, const winrt::ScrollingScrollCompletedEventArgs &args) | ScrollView | [private]
OnScrollPresenterScrollStarting(const winrt::IInspectable &sender, const winrt::ScrollingScrollStartingEventArgs &args) | ScrollView | [private]
OnScrollPresenterStateChanged(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnScrollPresenterViewChanged(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollView | [private]
OnScrollPresenterZoomCompleted(const winrt::IInspectable &sender, const winrt::ScrollingZoomCompletedEventArgs &args) | ScrollView | [private]
OnScrollPresenterZoomStarting(const winrt::IInspectable &sender, const winrt::ScrollingZoomStartingEventArgs &args) | ScrollView | [private]
OnScrollViewGettingFocus(const winrt::IInspectable &sender, const winrt::GettingFocusEventArgs &args) | ScrollView | [private]
OnScrollViewIsEnabledChanged(const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args) | ScrollView | [private]
OnScrollViewPointerCanceled(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnScrollViewPointerEntered(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnScrollViewPointerExited(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnScrollViewPointerMoved(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnScrollViewPointerPressed(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnScrollViewPointerReleased(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnScrollViewUnloaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | ScrollView | [private]
OnVerticalAnchorRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollBarVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollControllerPointerEntered(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnVerticalScrollControllerPointerExited(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | ScrollView | [private]
OnVerticalScrollModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnVerticalScrollRailModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnZoomAnimationStarting(const winrt::IInspectable &sender, const winrt::ScrollingZoomAnimationStartingEventArgs &args) | ScrollView | [private]
OnZoomChainModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
OnZoomModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ScrollViewProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ScrollView, winrt::implementation::ScrollViewT > | [inline]
RegisterAnchorCandidate(winrt::UIElement const &element) | ScrollView |
ResetHideIndicatorsTimer(bool restart=false) | ScrollView | [private]
s_ComputedHorizontalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_ComputedHorizontalScrollModeProperty | ScrollViewProperties | [static]
s_ComputedVerticalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_ComputedVerticalScrollModeProperty | ScrollViewProperties | [static]
s_ContentOrientationProperty | ScrollViewProperties | [static]
s_ContentProperty | ScrollViewProperties | [static]
s_HorizontalAnchorRatioProperty | ScrollViewProperties | [static]
s_HorizontalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_HorizontalScrollChainModeProperty | ScrollViewProperties | [static]
s_HorizontalScrollModeProperty | ScrollViewProperties | [static]
s_HorizontalScrollRailModeProperty | ScrollViewProperties | [static]
s_IgnoredInputKindsProperty | ScrollViewProperties | [static]
s_MaxZoomFactorProperty | ScrollViewProperties | [static]
s_MinZoomFactorProperty | ScrollViewProperties | [static]
s_noOpCorrelationId | ScrollView | [static]
s_ScrollPresenterProperty | ScrollViewProperties | [static]
s_VerticalAnchorRatioProperty | ScrollViewProperties | [static]
s_VerticalScrollBarVisibilityProperty | ScrollViewProperties | [static]
s_VerticalScrollChainModeProperty | ScrollViewProperties | [static]
s_VerticalScrollModeProperty | ScrollViewProperties | [static]
s_VerticalScrollRailModeProperty | ScrollViewProperties | [static]
s_ZoomChainModeProperty | ScrollViewProperties | [static]
s_ZoomModeProperty | ScrollViewProperties | [static]
ScrollableHeight() | ScrollView |
ScrollableWidth() | ScrollView |
ScrollAnimationStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs > const &value) | ScrollViewProperties |
ScrollAnimationStarting(winrt::event_token const &token) | ScrollViewProperties |
ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta) | ScrollView |
ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta, winrt::ScrollingScrollOptions const &options) | ScrollView |
ScrollCompleted(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs > const &value) | ScrollViewProperties |
ScrollCompleted(winrt::event_token const &token) | ScrollViewProperties |
ScrollControllersAutoHidingChangedDbg() | ScrollView |
ScrollPresenter() const | ScrollView |
ScrollViewProperties::ScrollPresenter(winrt::ScrollPresenter const &value) | ScrollViewProperties |
ScrollViewProperties::ScrollPresenter() | ScrollViewProperties |
ScrollPresenterProperty() | ScrollViewProperties | [inline, static]
ScrollStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs > const &value) | ScrollViewProperties |
ScrollStarting(winrt::event_token const &token) | ScrollViewProperties |
ScrollTo(double horizontalOffset, double verticalOffset) | ScrollView |
ScrollTo(double horizontalOffset, double verticalOffset, winrt::ScrollingScrollOptions const &options) | ScrollView |
ScrollView() | ScrollView |
ScrollViewProperties() | ScrollViewProperties |
State() | ScrollView |
StateChanged(winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value) | ScrollViewProperties |
StateChanged(winrt::event_token const &token) | ScrollViewProperties |
UnhookCompositionTargetRendering() | ScrollView | [private]
UnhookHorizontalScrollControllerEvents(bool isForDestructor) | ScrollView | [private]
UnhookScrollPresenterEvents(bool isForDestructor) | ScrollView | [private]
UnhookScrollViewEvents() | ScrollView | [private]
UnhookVerticalScrollControllerEvents(bool isForDestructor) | ScrollView | [private]
UnregisterAnchorCandidate(winrt::UIElement const &element) | ScrollView |
UpdateHorizontalScrollController(const winrt::IScrollController &horizontalScrollController, const winrt::IUIElement &horizontalScrollControllerElement) | ScrollView | [private]
UpdateScrollControllersAutoHiding(bool forceUpdate=false) | ScrollView | [private]
UpdateScrollControllersSeparator(const winrt::IUIElement &scrollControllersSeparator) | ScrollView | [private]
UpdateScrollControllersSeparatorVisualState(bool useTransitions=true, bool scrollControllersAutoHidingChanged=false) | ScrollView | [private]
UpdateScrollControllersVisibility(bool horizontalChange, bool verticalChange) | ScrollView | [private]
UpdateScrollControllersVisualState(bool useTransitions=true, bool showIndicators=false, bool hideIndicators=false) | ScrollView | [private]
UpdateScrollPresenter(const winrt::ScrollPresenter &scrollPresenter) | ScrollView | [private]
UpdateScrollPresenterHorizontalScrollController(const winrt::IScrollController &horizontalScrollController) | ScrollView | [private]
UpdateScrollPresenterVerticalScrollController(const winrt::IScrollController &verticalScrollController) | ScrollView | [private]
UpdateVerticalScrollController(const winrt::IScrollController &verticalScrollController, const winrt::IUIElement &verticalScrollControllerElement) | ScrollView | [private]
UpdateVisualStates(bool useTransitions=true, bool showIndicators=false, bool hideIndicators=false, bool scrollControllersAutoHidingChanged=false, bool updateScrollControllersAutoHiding=false, bool onlyForAutoHidingScrollControllers=false) | ScrollView | [private]
ValidateAnchorRatio(double value) | ScrollView | [static]
ValidateZoomFactoryBoundary(double value) | ScrollView | [static]
VerticalAnchorRatio(double value) | ScrollViewProperties |
VerticalAnchorRatio() | ScrollViewProperties |
VerticalAnchorRatioProperty() | ScrollViewProperties | [inline, static]
VerticalOffset() | ScrollView |
VerticalScrollBarVisibility(winrt::ScrollingScrollBarVisibility const &value) | ScrollViewProperties |
VerticalScrollBarVisibility() | ScrollViewProperties |
VerticalScrollBarVisibilityProperty() | ScrollViewProperties | [inline, static]
VerticalScrollChainMode(winrt::ScrollingChainMode const &value) | ScrollViewProperties |
VerticalScrollChainMode() | ScrollViewProperties |
VerticalScrollChainModeProperty() | ScrollViewProperties | [inline, static]
VerticalScrollMode(winrt::ScrollingScrollMode const &value) | ScrollViewProperties |
VerticalScrollMode() | ScrollViewProperties |
VerticalScrollModeProperty() | ScrollViewProperties | [inline, static]
VerticalScrollRailMode(winrt::ScrollingRailMode const &value) | ScrollViewProperties |
VerticalScrollRailMode() | ScrollViewProperties |
VerticalScrollRailModeProperty() | ScrollViewProperties | [inline, static]
ViewChanged(winrt::TypedEventHandler< winrt::ScrollView, winrt::IInspectable > const &value) | ScrollViewProperties |
ViewChanged(winrt::event_token const &token) | ScrollViewProperties |
ViewportHeight() | ScrollView |
ViewportWidth() | ScrollView |
ZoomAnimationStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs > const &value) | ScrollViewProperties |
ZoomAnimationStarting(winrt::event_token const &token) | ScrollViewProperties |
ZoomBy(float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint) | ScrollView |
ZoomBy(float zoomFactorDelta, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options) | ScrollView |
ZoomChainMode(winrt::ScrollingChainMode const &value) | ScrollViewProperties |
ZoomChainMode() | ScrollViewProperties |
ZoomChainModeProperty() | ScrollViewProperties | [inline, static]
ZoomCompleted(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs > const &value) | ScrollViewProperties |
ZoomCompleted(winrt::event_token const &token) | ScrollViewProperties |
ZoomFactor() | ScrollView |
ZoomMode(winrt::ScrollingZoomMode const &value) | ScrollViewProperties |
ZoomMode() | ScrollViewProperties |
ZoomModeProperty() | ScrollViewProperties | [inline, static]
ZoomStarting(winrt::TypedEventHandler< winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs > const &value) | ScrollViewProperties |
ZoomStarting(winrt::event_token const &token) | ScrollViewProperties |
ZoomTo(float zoomFactor, winrt::IReference< winrt::float2 > centerPoint) | ScrollView |
ZoomTo(float zoomFactor, winrt::IReference< winrt::float2 > centerPoint, winrt::ScrollingZoomOptions const &options) | ScrollView |
~ScrollView() | ScrollView |
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MaterialHelperBase Member List

This is the complete list of members for MaterialHelperBase, including all inherited members.
AcrylicBrushCacheHelperParam enum name | MaterialHelperBase |
AssertUniqueCompositorOrUpdate(const winrt::Compositor &compositor) | MaterialHelperBase |
BuildAcrylicBrushCompositionEffectFactoryKey(bool shouldBrushBeOpaque, bool useCrossFadeEffect) | MaterialHelperBase | [static]
CreateScaledBrush(int dpiScale) | MaterialHelperBase |
GetOrCreateAcrylicBrushCompositionEffectFactoryFromCache(const winrt::Compositor &compositor, bool shouldBrushBeOpaque, bool useCrossFadeEffect, bool useCache, std::function< winrt::CompositionEffectFactory()> cacheMissingCallback) | MaterialHelperBase | [static]
GetOrCreateRevealBrushCompositionEffectFactoryFromCache(bool isBorder, bool isInverted, bool hasBaseColor, std::function< winrt::CompositionEffectFactory()> cacheMissingCallback) | MaterialHelperBase | [static]
HasBaseColor enum value | MaterialHelperBase |
IgnoreAreEffectsFast(bool value) | MaterialHelperBase | [static]
IgnoreAreEffectsFast() | MaterialHelperBase | [static]
IsBorder enum value | MaterialHelperBase |
IsInverted enum value | MaterialHelperBase |
LightPolicyChangedHelper(T *instance, bool isDisabledByMaterialPolicy) | MaterialHelperBase | [static]
m_acrylicBrushCompositionEffectFactoryCache | MaterialHelperBase |
m_revealBrushCompositionEffectFactoryCache | MaterialHelperBase |
m_revealLightsToRemove | MaterialHelperBase |
MaxCacheSize enum value | MaterialHelperBase |
OnRevealBrushConnected() | MaterialHelperBase | [static]
OnRevealBrushDisconnected() | MaterialHelperBase | [static]
RevealBrushCacheFlags enum name | MaterialHelperBase |
ShouldBrushBeOpaque enum value | MaterialHelperBase |
SimulateDisabledByPolicy(bool value) | MaterialHelperBase | [static]
SimulateDisabledByPolicy() | MaterialHelperBase | [static]
TrackRevealLightsToRemove(const winrt::IVector< winrt::XamlLight > &lights, const std::vector< winrt::XamlLight > &revealLightsToRemove) | MaterialHelperBase | [static]
UseCrossFadeEffect enum value | MaterialHelperBase |
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactoryRecycleArgsDownlevel.h Source File

  • File List
  • File Members
  • Repeater

ElementFactoryRecycleArgsDownlevel.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // We do some fakery here to make this work downlevel.
00007 // Microsoft::UI::Xaml:ElementFactoryRecycleArgs type has been added to WUX in RS5. However, we want Repeater to use it downlevel.
00008 // The way we achieve this is by implementing the Window::UI::Xaml::IElementFactoryRecycleArgs
00009 // interface here on our own type and 'lie' that our runtime class name is Microsoft.UI.Xaml.ElementFactoryRecycleArgs !
00010
00011 class ElementFactoryRecycleArgsDownlevel
00012     : public ReferenceTracker<
00013         ElementFactoryRecycleArgsDownlevel,
00014         reference_tracker_implements_t<winrt::Microsoft::UI::Xaml::IElementFactoryRecycleArgs>::type>
00015 {
00016 public:
00017     using class_type = winrt::ElementFactoryRecycleArgs;
00018
00019     operator class_type() const noexcept
00020     {
00021         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00022     }
00023
00024     hstring GetRuntimeClassName() const
00025     {
00026         // The type name being in windows namespace is intentional.
00027         return L"Microsoft.UI.Xaml.ElementFactoryRecycleArgs";
00028     }
00029
00030 #pragma region IElementFactoryRecycleArgs
00031     winrt::UIElement Element();
00032     void Element(winrt::UIElement const& value);
00033
00034     winrt::UIElement Parent();
00035     void Parent(winrt::UIElement const& value);
00036 #pragma endregion
00037
00038 private:
00039     tracker_ref<winrt::UIElement> m_element{ this };
00040     tracker_ref<winrt::UIElement> m_parent{ this };
00041 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItem.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItem.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 struct bringintoview_event_revoker;
00007
00008 #include "NavigationViewItemBase.h"
00009 #include "NavigationViewItem.g.h"
00010 #include "NavigationViewItemPresenter.h"
00011 #include "NavigationViewItem.properties.h"
00012 #include "NavigationViewTrace.h"
00013
00014 class NavigationViewItem :
00015     public winrt::implementation::NavigationViewItemT<NavigationViewItem, NavigationViewItemBase>,
00016     public NavigationViewItemProperties
00017 {
00018 public:
00019     ForwardRefToBaseReferenceTracker(NavigationViewItemBase)
00020
00021     NavigationViewItem();
00022
00023     // These functions are ambiguous with NavigationViewItemBase, disambiguate
00024     using NavigationViewItemProperties::EnsureProperties;
00025     using NavigationViewItemProperties::ClearProperties;
00026
00027     // IFrameworkElementOverrides
00028     void OnApplyTemplate() override;
00029
00030     void OnLoaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&);
00031
00032     // Property change callbacks
00033     void OnIsExpandedPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00034     void OnIconPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00035     void OnInfoBadgePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00036     void OnMenuItemsPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00037     void OnMenuItemsSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00038     void OnHasUnrealizedChildrenPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00039
00040     winrt::UIElement GetSelectionIndicator() const;
00041
00042     // IUIElement / IUIElementOverridesHelper
00043     winrt::AutomationPeer OnCreateAutomationPeer() override;
00044
00045     // IContentControlOverrides / IContentControlOverridesHelper
00046     void OnContentChanged(winrt::IInspectable const& oldContent, winrt::IInspectable const& newContent) override;
00047
00048     // IControlOverrides overrides
00049     void OnGotFocus(winrt::RoutedEventArgs const& e) override;
00050     void OnLostFocus(winrt::RoutedEventArgs const& e) override;
00051
00052     // VisualState is maintained by NavigationViewItem. but actual state should be apply to
00053     // NavigationViewItemPresenter. But NavigationViewItemPresenter is created after NavigationViewItem.
00054     // It provides a chance for NavigationViewItemPresenter to request visualstate refresh
00055     void UpdateVisualStateNoTransition();
00056
00057     void ShowHideChildren();
00058     bool ShouldRepeaterShowInFlyout() const;
00059
00060     winrt::ItemsRepeater GetRepeater() const { return m_repeater.get(); };
00061
00062     void OnExpandCollapseChevronPointerReleased();
00063     void RotateExpandCollapseChevron(bool isExpanded);
00064     bool IsRepeaterVisible() const;
00065     void PropagateDepthToChildren(int depth);
00066     bool HasChildren();
00067     // Needed for scenarios where the ItemsRepeater is not loaded (OnApplyTemplate) therefore we cannot guarantee a non-null MenuItemsSource actually contains items
00068     bool HasPotentialChildren();
00069
00070 private:
00071     winrt::UIElement const GetPresenterOrItem() const;
00072     NavigationViewItemPresenter* GetPresenter() const;
00073
00074     void UpdateNavigationViewItemToolTip();
00075     void SuggestedToolTipChanged(winrt::IInspectable const& newContent);
00076     void OnNavigationViewItemBaseDepthChanged() override;
00077     void OnNavigationViewItemBaseIsSelectedChanged() override;
00078     void OnNavigationViewItemBasePositionChanged() override;
00079
00080     void OnPresenterPointerPressed(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00081     void OnPresenterPointerReleased(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00082     void OnPresenterPointerEntered(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00083     void OnPresenterPointerMoved(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00084     void OnPresenterPointerExited(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00085     void OnPresenterPointerCanceled(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00086     void OnPresenterPointerCaptureLost(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00087     void OnIsEnabledChanged(const winrt::IInspectable& sender, const winrt::DependencyPropertyChangedEventArgs& args);
00088     void OnMenuItemsVectorChanged(const winrt::Collections::IObservableVector<winrt::IInspectable>& sender, const winrt::Collections::IVectorChangedEventArgs& args);
00089
00090
00091     void ResetTrackedPointerId();
00092     bool IgnorePointerId(const winrt::PointerRoutedEventArgs& args);
00093     void OnSplitViewPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00094     void UpdateCompactPaneLength();
00095     void UpdateIsClosedCompact();
00096
00097     void UpdateVisualStateForIconAndContent(bool showIcon, bool showContent);
00098     void UpdateVisualStateForInfoBadge();
00099     void UpdateVisualStateForNavigationViewPositionChange();
00100     void UpdateVisualStateForKeyboardFocusedState();
00101     void UpdateVisualStateForToolTip();
00102     void UpdateVisualStateForPointer();
00103     void UpdateVisualStateForChevron();
00104     void UpdateVisualStateForClosedCompact();
00105
00106     void UpdateVisualState(bool useTransitions);
00107     bool ShouldShowIcon();
00108     bool ShouldShowInfoBadge();
00109     bool ShouldShowContent();
00110     bool ShouldEnableToolTip() const;
00111     bool IsOnLeftNav() const;
00112     bool IsOnTopPrimary() const;
00113     bool IsOutOfControlBounds(const winrt::Point& point);
00114
00115     void UpdateRepeaterItemsSource();
00116     void OnItemsSourceViewChanged(const winrt::IInspectable& sender, const winrt::NotifyCollectionChangedEventArgs& args);
00117     void ReparentRepeater();
00118     void OnFlyoutClosing(const winrt::IInspectable& sender, const winrt::FlyoutBaseClosingEventArgs& args);
00119     void UpdateItemIndentation();
00120     void ShowSelectionIndicator(bool visible);
00121     void ProcessPointerCanceled(const winrt::PointerRoutedEventArgs& args);
00122     void ProcessPointerOver(const winrt::PointerRoutedEventArgs& args);
00123     void HookInputEvents(const winrt::IControlProtected& controlProtected);
00124     void UnhookInputEvents();
00125     void UnhookEventsAndClearFields();
00126
00127     void PrepNavigationViewItem(const winrt::SplitView& splitView);
00128     void LoadElementsForDisplayingChildren();
00129     void LoadMenuItemsHost();
00130
00131     // Needed for scenarios where NavigationView needs to force collapse top level items when the pane closes.
00132     void ForceCollapse();
00133     void RestoreExpandedState();
00134     void HandleExpansionStateMemory();
00135
00136     PropertyChanged_revoker m_splitViewIsPaneOpenChangedRevoker{};
00137     PropertyChanged_revoker m_splitViewDisplayModeChangedRevoker{};
00138     PropertyChanged_revoker m_splitViewCompactPaneLengthChangedRevoker{};
00139
00140     winrt::UIElement::PointerPressed_revoker m_presenterPointerPressedRevoker{};
00141     winrt::UIElement::PointerEntered_revoker m_presenterPointerEnteredRevoker{};
00142     winrt::UIElement::PointerMoved_revoker m_presenterPointerMovedRevoker{};
00143     RoutedEventHandler_revoker m_presenterPointerReleasedRevoker{};
00144     RoutedEventHandler_revoker m_presenterPointerExitedRevoker{};
00145     RoutedEventHandler_revoker m_presenterPointerCanceledRevoker{};
00146     RoutedEventHandler_revoker m_presenterPointerCaptureLostRevoker{};
00147
00148     winrt::ItemsRepeater::ElementPrepared_revoker m_repeaterElementPreparedRevoker{};
00149     winrt::ItemsRepeater::ElementClearing_revoker m_repeaterElementClearingRevoker{};
00150     winrt::ItemsSourceView::CollectionChanged_revoker m_itemsSourceViewCollectionChangedRevoker{};
00151     winrt::Collections::IObservableVector<winrt::IInspectable>::VectorChanged_revoker m_menuItemsVectorChangedRevoker{};
00152
00153     winrt::FlyoutBase::Closing_revoker m_flyoutClosingRevoker{};
00154     winrt::Control::IsEnabledChanged_revoker m_isEnabledChangedRevoker{};
00155
00156     tracker_ref<winrt::ToolTip> m_toolTip{ this };
00157     NavigationViewItemHelper<NavigationViewItem> m_helper{ this };
00158     tracker_ref<winrt::NavigationViewItemPresenter> m_navigationViewItemPresenter{ this };
00159     tracker_ref<winrt::IInspectable> m_suggestedToolTipContent{ this };
00160     tracker_ref<winrt::ItemsRepeater> m_repeater{ this };
00161     tracker_ref<winrt::Grid> m_flyoutContentGrid{ this };
00162     tracker_ref<winrt::Grid> m_rootGrid{ this };
00163
00164     bool m_isClosedCompact{ false };
00165
00166     bool m_appliedTemplate{ false };
00167     bool m_hasKeyboardFocus{ false };
00168
00169     // Visual state tracking
00170     winrt::Pointer m_capturedPointer{ nullptr };
00171     uint32_t m_trackedPointerId{ 0 };
00172     bool m_isPressed{ false };
00173     bool m_isPointerOver{ false };
00174
00175     bool m_isRepeaterParentedToFlyout{ false };
00176     // used to bypass all Chevron visual state logic in order to keep it unloaded
00177     bool m_hasHadChildren{ false };
00178
00179     // NavigationView needs to force collapse top level items when the pane closes.
00180     // This bool is used to remember which items need to be restored to expanded state when the pane is opened again.
00181     bool m_restoreToExpandedState{ false };
00182 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerAxeTestPage Member List

This is the complete list of members for PipsPagerAxeTestPage, including all inherited members.
PipsPagerAxeTestPage() PipsPagerAxeTestPage [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectionModel.properties.cpp Source File

  • File List
  • File Members
  • Generated

SelectionModel.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SelectionModel.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(SelectionModel)
00012 }
00013
00014 #include "SelectionModel.g.cpp"
00015
00016
00017 SelectionModelProperties::SelectionModelProperties()
00018     : m_childrenRequestedEventSource{static_cast<SelectionModel*>(this)}
00019     , m_propertyChangedEventSource{static_cast<SelectionModel*>(this)}
00020     , m_selectionChangedEventSource{static_cast<SelectionModel*>(this)}
00021 {
00022 }
00023
00024 void SelectionModelProperties::EnsureProperties()
00025 {
00026 }
00027
00028 void SelectionModelProperties::ClearProperties()
00029 {
00030 }
00031
00032 winrt::event_token SelectionModelProperties::ChildrenRequested(winrt::TypedEventHandler<winrt::SelectionModel, winrt::SelectionModelChildrenRequestedEventArgs> const& value)
00033 {
00034     return m_childrenRequestedEventSource.add(value);
00035 }
00036
00037 void SelectionModelProperties::ChildrenRequested(winrt::event_token const& token)
00038 {
00039     m_childrenRequestedEventSource.remove(token);
00040 }
00041
00042 winrt::event_token SelectionModelProperties::PropertyChanged(winrt::PropertyChangedEventHandler const& value)
00043 {
00044     return m_propertyChangedEventSource.add(value);
00045 }
00046
00047 void SelectionModelProperties::PropertyChanged(winrt::event_token const& token)
00048 {
00049     m_propertyChangedEventSource.remove(token);
00050 }
00051
00052 winrt::event_token SelectionModelProperties::SelectionChanged(winrt::TypedEventHandler<winrt::SelectionModel, winrt::SelectionModelSelectionChangedEventArgs> const& value)
00053 {
00054     return m_selectionChangedEventSource.add(value);
00055 }
00056
00057 void SelectionModelProperties::SelectionChanged(winrt::event_token const& token)
00058 {
00059     m_selectionChangedEventSource.remove(token);
00060 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar_InteractionTests/MenuBarTests.cs Source File

  • File List
  • File Members
  • MenuBar
  • MenuBar_InteractionTests

MenuBarTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using Windows.Foundation.Metadata;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019 using MUXTestInfra.Shared.Infra;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00022 {
00023     [TestClass]
00024     public class MenuBarTests
00025     {
00026         [ClassInitialize]
00027         [TestProperty("RunAs", "User")]
00028         [TestProperty("Classification", "Integration")]
00029         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         [TestMethod]
00036         public void VerifyAxeScanPasses()
00037         {
00038             using (var setup = new TestSetupHelper("MenuBar-Axe"))
00039             {
00040                 AxeTestHelper.TestForAxeIssues();
00041             }
00042         }
00043
00044         [TestCleanup]
00045         public void TestCleanup()
00046         {
00047             TestCleanupHelper.Cleanup();
00048         }
00049
00050         [TestMethod]
00051         public void BasicMouseInteractionTest()
00052         {
00053             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00054             {
00055                 Log.Comment("Skipping tests on phone, because menubar is not supported");
00056                 return;
00057             }
00058             using (var setup = new TestSetupHelper("MenuBar Tests"))
00059             {
00060                 CheckBox testFrameCheckbox = new CheckBox(FindElement.ByName("TestFrameCheckbox"));
00061
00062                 var fileButton = FindElement.ById<Button>("FileItem");
00063                 var editButton = FindElement.ById<Button>("EditItem");
00064
00065                 // click and click
00066                 // From bug 17343407: this test is sometimes unreliable, use retries and see if that helps.
00067                 InputHelper.LeftClick(fileButton);
00068                 TestEnvironment.VerifyAreEqualWithRetry(20,
00069                     () => true,
00070                     () => FindCore.ByName("NewItem", shouldWait: false) != null); // The item should be in the tree
00071
00072                 InputHelper.LeftClick(fileButton);
00073                 VerifyElement.NotFound("NewItem", FindBy.Id);
00074
00075                 // click and hover
00076                 InputHelper.LeftClick(fileButton);
00077                 VerifyElement.NotFound("Undo", FindBy.Name);
00078                 InputHelper.MoveMouse(editButton, 0, 0);
00079                 InputHelper.MoveMouse(editButton, 1, 1);
00080                 VerifyElement.Found("Undo", FindBy.Name);
00081
00082                 testFrameCheckbox.Check();
00083             }
00084         }
00085
00086         [TestMethod]
00087         public void AutomationPeerTest()
00088         {
00089             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00090             {
00091                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00092                 return;
00093             }
00094             using (var setup = new TestSetupHelper("MenuBar Tests"))
00095             {
00096                 var fileButton = FindElement.ById<Button>("FileItem");
00097                 var fileButtonEC = new ExpandCollapseImplementation(fileButton);
00098
00099                 // Invoke
00100                 fileButton.Invoke();
00101                 Wait.ForIdle();
00102                 VerifyElement.Found("New", FindBy.Name);
00103                 fileButton.Invoke();
00104                 Wait.ForIdle();
00105                 VerifyElement.NotFound("New", FindBy.Name);
00106
00107                 // Expand collapse
00108                 fileButtonEC.Expand();
00109                 Wait.ForIdle();
00110                 VerifyElement.Found("New", FindBy.Name);
00111                 fileButtonEC.Collapse();
00112                 Wait.ForIdle();
00113                 VerifyElement.NotFound("New", FindBy.Name);
00114
00115                 // Verify GetNameCore() is working if AutomationProperties.Name isn't set
00116                 VerifyElement.Found("Format", FindBy.Name);
00117             }
00118         }
00119
00120         [TestMethod]
00121         public void KeyboardNavigationWithArrowKeysTest()
00122         {
00123             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00124             {
00125                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00126                 return;
00127             }
00128             using (var setup = new TestSetupHelper("MenuBar Tests"))
00129             {
00130                 var editButton = FindElement.ById<Button>("EditItem");
00131                 editButton.Invoke();
00132                 VerifyElement.Found("Undo", FindBy.Name);
00133
00134                 KeyboardHelper.PressKey(Key.Left);
00135                 VerifyElement.Found("New", FindBy.Name);
00136
00137                 KeyboardHelper.PressKey(Key.Escape);
00138                 VerifyElement.NotFound("New", FindBy.Name);
00139
00140                 KeyboardHelper.PressKey(Key.Left);
00141                 VerifyElement.NotFound("Word Wrap", FindBy.Name);
00142
00143                 KeyboardHelper.PressKey(Key.Enter);
00144                 VerifyElement.Found("Word Wrap", FindBy.Name);
00145
00146                 KeyboardHelper.PressKey(Key.Escape);
00147                 KeyboardHelper.PressKey(Key.Right);
00148
00149                 KeyboardHelper.PressKey(Key.Right);
00150                 VerifyElement.NotFound("Undo", FindBy.Name);
00151
00152                 KeyboardHelper.PressKey(Key.Enter);
00153                 VerifyElement.Found("Undo", FindBy.Name);
00154
00155                 KeyboardHelper.PressKey(Key.Down);
00156                 KeyboardHelper.PressKey(Key.Down);
00157                 KeyboardHelper.PressKey(Key.Down);
00158                 KeyboardHelper.PressKey(Key.Down);
00159                 KeyboardHelper.PressKey(Key.Down);
00160                 VerifyElement.NotFound("Item 1", FindBy.Name);
00161
00162                 KeyboardHelper.PressKey(Key.Right);
00163                 VerifyElement.Found("Item 1", FindBy.Name);
00164             }
00165         }
00166
00167         [TestMethod]
00168         public void KeyboardNavigationWithArrowKeysWithDisabledItemTest()
00169         {
00170             using (var setup = new TestSetupHelper("MenuBar Tests"))
00171             {
00172                 var editButton = FindElement.ById<Button>("MenuBarPartiallyEnabledOne");
00173                 editButton.Invoke();
00174                 VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);
00175
00176                 KeyboardHelper.PressKey(Key.Right);
00177                 VerifyElement.Found("PartiallyEnabledFlyoutThree", FindBy.Name);
00178
00179                 KeyboardHelper.PressKey(Key.Left);
00180                 VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);
00181
00182                 KeyboardHelper.PressKey(Key.Left);
00183                 VerifyElement.Found("PartiallyEnabledFlyoutThree", FindBy.Name);
00184
00185                 KeyboardHelper.PressKey(Key.Left);
00186                 VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);
00187
00188                 KeyboardHelper.PressKey(Key.Right);
00189                 VerifyElement.Found("PartiallyEnabledFlyoutThree", FindBy.Name);
00190
00191                 KeyboardHelper.PressKey(Key.Right);
00192                 VerifyElement.Found("PartiallyEnabledFlyoutOne", FindBy.Name);
00193             }
00194         }
00195
00196         [TestMethod]
00197         public void KeyboardNavigationWithArrowKeysWithOnlyOneItemWorks()
00198         {
00199             using (var setup = new TestSetupHelper("MenuBar Tests"))
00200             {
00201                 var editButton = FindElement.ById<Button>("LoopTestBarOne");
00202                 editButton.Invoke();
00203                 VerifyElement.Found("LoopTestItemOne", FindBy.Name);
00204
00205                 KeyboardHelper.PressKey(Key.Right);
00206                 VerifyElement.NotFound("LoopTestItemOne", FindBy.Name);
00207             }
00208         }
00209
00210         [TestMethod]
00211         public void KeyboardNavigationWithAccessKeysTest()
00212         {
00213             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00214             {
00215                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00216                 return;
00217             }
00218             using (var setup = new TestSetupHelper("MenuBar Tests"))
00219             {
00220                 KeyboardHelper.PressDownModifierKey(ModifierKey.Alt);
00221                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Alt);
00222                 Wait.ForIdle();
00223
00224                 TextInput.SendText("A"); // this clicks File menu bar item
00225                 Wait.ForIdle();
00226                 TextInput.SendText("B"); // this clicks New flyout item
00227                 Wait.ForIdle();
00228
00229                 VerifyElement.Found("New Clicked", FindBy.Name);
00230             }
00231         }
00232
00233         [TestMethod]
00234         public void KeyboardAcceleratorsTest()
00235         {
00236             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00237             {
00238                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00239                 return;
00240             }
00241             using (var setup = new TestSetupHelper("MenuBar Tests"))
00242             {
00243                 VerifyElement.NotFound("Undo Clicked", FindBy.Name);
00244
00245                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
00246                 Log.Comment("Send text z.");
00247                 TextInput.SendText("z");
00248                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
00249
00250                 Wait.ForIdle();
00251
00252                 VerifyElement.Found("Undo Clicked", FindBy.Name);
00253             }
00254         }
00255
00256         [TestMethod]
00257         public void AddRemoveMenuBarItemTest()
00258         {
00259             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00260             {
00261                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00262                 return;
00263             }
00264             using (var setup = new TestSetupHelper("MenuBar Tests"))
00265             {
00266                 var addButton = FindElement.ById<Button>("AddMenuBarItemButton");
00267                 var removeButton = FindElement.ById<Button>("RemoveMenuBarItemButton");
00268
00269                 Log.Comment("Verify that menu bar items can be added");
00270                 addButton.Invoke();
00271                 VerifyElement.Found("New Menu Bar Item", FindBy.Name);
00272
00273                 Log.Comment("Verify that menu bar items can be removed");
00274                 removeButton.Invoke();
00275                 VerifyElement.NotFound("New Menu Bar Item", FindBy.Name);
00276
00277                 Log.Comment("Verify that menu bar pre-existing items can be removed");
00278                 VerifyElement.Found("Format", FindBy.Name);
00279                 removeButton.Invoke();
00280                 VerifyElement.NotFound("Format", FindBy.Name);
00281             }
00282         }
00283
00284         [TestMethod]
00285         public void AddRemoveMenuFlyoutItemTest()
00286         {
00287             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00288             {
00289                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00290                 return;
00291             }
00292             using (var setup = new TestSetupHelper("MenuBar Tests"))
00293             {
00294                 var addButton = FindElement.ById<Button>("AddFlyoutItemButton");
00295                 var removeButton = FindElement.ById<Button>("RemoveFlyoutItemButton");
00296                 var fileButton = FindElement.ById<Button>("FileItem");
00297
00298                 Log.Comment("Verify that menu flyout items can be added");
00299                 addButton.Invoke();
00300                 Wait.ForIdle();
00301
00302                 // open flyout
00303                 fileButton.Invoke();
00304                 Wait.ForIdle();
00305
00306                 VerifyElement.Found("New Flyout Item", FindBy.Name);
00307
00308                 // close flyout
00309                 fileButton.Invoke();
00310                 Wait.ForIdle();
00311
00312                 Log.Comment("Verify that menu flyout items can be removed");
00313                 removeButton.Invoke();
00314                 Wait.ForIdle();
00315
00316                 // open flyout
00317                 fileButton.Invoke();
00318                 Wait.ForIdle();
00319
00320                 VerifyElement.NotFound("New Flyout Item", FindBy.Name);
00321
00322                 // close flyout
00323                 fileButton.Invoke();
00324                 Wait.ForIdle();
00325             }
00326         }
00327
00328         [TestMethod]
00329         public void MenuBarHeightTest()
00330         {
00331             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00332             {
00333                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00334                 return;
00335             }
00336             using (var setup = new TestSetupHelper("MenuBar Tests"))
00337             {
00338                 var menuBar = FindElement.ById("SizedMenuBar");
00339                 var menuBarItem = FindElement.ById<Button>("SizedMenuBarItem");
00340
00341                 Log.Comment("Verify that the size of the MenuBar can be set.");
00342
00343                 Verify.AreEqual(menuBar.BoundingRectangle.Height, 24);
00344                 Verify.AreEqual(menuBarItem.BoundingRectangle.Height, 16);
00345             }
00346         }
00347
00348         [TestMethod]
00349         public void HoveringBehaviorTest()
00350         {
00351             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00352             {
00353                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00354                 return;
00355             }
00356             using (var setup = new TestSetupHelper("MenuBar Tests"))
00357             {
00358                 var menuBar = FindElement.ById("SizedMenuBar");
00359                 var addButton = FindElement.ByName("AddItemsToEmptyMenuBar");
00360
00361                 addButton.Click();
00362                 addButton.Click();
00363                 addButton.Click();
00364
00365                 var help0 = FindElement.ByName<Button>("Help0");
00366                 var help1 = FindElement.ByName<Button>("Help1");
00367
00368                 // This behavior seems to a bit unreliable, so repeat
00369                 InputHelper.LeftClick(help0);
00370                 TestEnvironment.VerifyAreEqualWithRetry(20,
00371                     () => true,
00372                     () => FindCore.ByName("Add0", shouldWait: false) != null); // The item should be in the tree
00373
00374                 // Check if hovering over the next button actually will show the correct item
00375                 VerifyElement.NotFound("Add1", FindBy.Name);
00376                 InputHelper.MoveMouse(help1, 0, 0);
00377                 InputHelper.MoveMouse(help1, 1, 1);
00378                 InputHelper.MoveMouse(help1, 5, 5);
00379
00380                 UIObject add1Element = null;
00381                 ElementCache.Clear();
00382                 var element = GetElement(ref add1Element, "Add1");
00383                 Verify.IsNotNull(add1Element);
00384             }
00385         }
00386
00387         [TestMethod]
00388         public void TabTest()
00389         {
00390             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00391             {
00392                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00393                 return;
00394             }
00395             using (var setup = new TestSetupHelper("MenuBar Tests"))
00396             {
00397                 var firstButton = FindElement.ByName<Button>("FirstButton");
00398                 var fileButton = FindElement.ById<Button>("FileItem");
00399
00400                 firstButton.SetFocus();
00401                 Wait.ForIdle();
00402
00403                 Log.Comment("Verify that pressing tab from previous control goes to the File item");
00404                 KeyboardHelper.PressKey(Key.Tab);
00405                 Wait.ForIdle();
00406
00407                 Verify.AreEqual(true, fileButton.HasKeyboardFocus);
00408             }
00409         }
00410
00411         [TestMethod]
00412         public void EmptyMenuBarItemNoPopupTest()
00413         {
00414             if (PlatformConfiguration.IsDevice(DeviceType.Phone))
00415             {
00416                 Log.Comment("Skipping tests on phone, because menubar is not supported.");
00417                 return;
00418             }
00419             using (var setup = new TestSetupHelper("MenuBar Tests"))
00420             {
00421                 FindElement.ByName<Button>("NoChildrenFlyout").Click();
00422                 VerifyElement.NotFound("Popup",FindBy.Name);
00423
00424                 FindElement.ByName<Button>("OneChildrenFlyout").Click();
00425                 VerifyElement.Found("Popup", FindBy.Name);
00426
00427                 // Click twice to close flyout
00428                 FindElement.ByName<Button>("RemoveItemsFromOneChildrenItem").Click();
00429                 FindElement.ByName<Button>("RemoveItemsFromOneChildrenItem").Click();
00430
00431                 FindElement.ByName<Button>("OneChildrenFlyout").Click();
00432                 VerifyElement.NotFound("Popup", FindBy.Name);
00433             }
00434         }
00435
00436         private T GetElement<T>(ref T element, string elementName) where T : UIObject
00437         {
00438             if (element == null)
00439             {
00440                 Log.Comment("Find the " + elementName);
00441                 element = FindElement.ByNameOrId<T>(elementName);
00442                 Verify.IsNotNull(element);
00443             }
00444             return element;
00445         }
00446     }
00447 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Regression/NavigationViewRS3Page.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Regression

NavigationViewRS3Page.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using System.IO;
00006 using System.Linq;
00007 using System.Runtime.InteropServices.WindowsRuntime;
00008 using Windows.ApplicationModel.Core;
00009 using Windows.Foundation;
00010 using Windows.Foundation.Collections;
00011 using Windows.UI;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Controls.Primitives;
00015 using Microsoft.UI.Xaml.Data;
00016 using Microsoft.UI.Xaml.Input;
00017 using Microsoft.UI.Xaml.Media;
00018 using Microsoft.UI.Xaml.Navigation;
00019 using Microsoft.UI.Xaml.Automation;
00020 using System;
00021 using Windows.UI.Core;
00022
00023 namespace MUXControlsTestApp
00024 {
00025     /// <summary>
00026     /// Verify ShouldPreserveNavigationViewRS3Behavior
00027     /// </summary>
00028     public sealed partial class NavigationViewRS3Page : TestPage
00029     {
00030          public NavigationViewRS3Page()
00031         {
00032             this.InitializeComponent();
00033
00034             Loaded += OnLoaded;
00035         }
00036
00037         private void OnLoaded(object sender, RoutedEventArgs e)
00038         {
00039             ChangeTestFrameVisibility(Visibility.Collapsed);
00040
00041             if (CoreWindow.GetForCurrentThread() != null)
00042             {
00043                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00044                 titleBar.ExtendViewIntoTitleBar = true;
00045             }
00046
00047             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00048             NavView.IsBackEnabled = true;
00049         }
00050         private void TestFrameCheckbox_Checked(object sender, RoutedEventArgs e)
00051         {
00052             ChangeTestFrameVisibility(Visibility.Visible);
00053
00054             if (CoreWindow.GetForCurrentThread() != null)
00055             {
00056                 // Show titlebar to reenable clicking the buttons in the test frame
00057                 CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
00058             }
00059         }
00060
00061         private void TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e)
00062         {
00063             ChangeTestFrameVisibility(Visibility.Collapsed);
00064
00065             if (CoreWindow.GetForCurrentThread() != null)
00066             {
00067                 // Hide titlebar again in case we hid it before
00068                 CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
00069             }
00070         }
00071
00072         private void ChangeTestFrameVisibility(Visibility visibility)
00073         {
00074             var testFrame = App.CurrentWindow.Content as TestFrame;
00075             testFrame.ChangeBarVisibility(visibility);
00076         }
00077
00078         private void GetTopPaddingHeight_Click(object sender, RoutedEventArgs e)
00079         {
00080             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00081             if (rootGrid != null)
00082             {
00083                 Grid paneContentGrid = rootGrid.FindName("TogglePaneTopPadding") as Grid;
00084                 TestResult.Text = paneContentGrid.Height.ToString();
00085             }
00086         }
00087
00088         private void GetToggleButtonRowHeight_Click(object sender, RoutedEventArgs e)
00089         {
00090             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00091             if (rootGrid != null)
00092             {
00093                 Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
00094                 TestResult.Text = paneContentGrid.RowDefinitions[1].Height.ToString();
00095             }
00096         }
00097
00098     }
00099 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Ingredient Member List

This is the complete list of members for Ingredient, including all inherited members.
Amount | Ingredient |
Ingredient() | Ingredient | [inline]
Ingredient(string name, string amount, string photo) | Ingredient | [inline]
Name | Ingredient |
Photo | Ingredient |
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PersonPicture.properties.h Source File

  • File List
  • File Members
  • Generated

PersonPicture.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class PersonPictureProperties
00008 {
00009 public:
00010     PersonPictureProperties();
00011
00012     void BadgeGlyph(winrt::hstring const& value);
00013     winrt::hstring BadgeGlyph();
00014
00015     void BadgeImageSource(winrt::ImageSource const& value);
00016     winrt::ImageSource BadgeImageSource();
00017
00018     void BadgeNumber(int value);
00019     int BadgeNumber();
00020
00021     void BadgeText(winrt::hstring const& value);
00022     winrt::hstring BadgeText();
00023
00024     void Contact(winrt::Contact const& value);
00025     winrt::Contact Contact();
00026
00027     void DisplayName(winrt::hstring const& value);
00028     winrt::hstring DisplayName();
00029
00030     void Initials(winrt::hstring const& value);
00031     winrt::hstring Initials();
00032
00033     void IsGroup(bool value);
00034     bool IsGroup();
00035
00036     void PreferSmallImage(bool value);
00037     bool PreferSmallImage();
00038
00039     void ProfilePicture(winrt::ImageSource const& value);
00040     winrt::ImageSource ProfilePicture();
00041
00042     void TemplateSettings(winrt::PersonPictureTemplateSettings const& value);
00043     winrt::PersonPictureTemplateSettings TemplateSettings();
00044
00045     static winrt::DependencyProperty BadgeGlyphProperty() { return s_BadgeGlyphProperty; }
00046     static winrt::DependencyProperty BadgeImageSourceProperty() { return s_BadgeImageSourceProperty; }
00047     static winrt::DependencyProperty BadgeNumberProperty() { return s_BadgeNumberProperty; }
00048     static winrt::DependencyProperty BadgeTextProperty() { return s_BadgeTextProperty; }
00049     static winrt::DependencyProperty ContactProperty() { return s_ContactProperty; }
00050     static winrt::DependencyProperty DisplayNameProperty() { return s_DisplayNameProperty; }
00051     static winrt::DependencyProperty InitialsProperty() { return s_InitialsProperty; }
00052     static winrt::DependencyProperty IsGroupProperty() { return s_IsGroupProperty; }
00053     static winrt::DependencyProperty PreferSmallImageProperty() { return s_PreferSmallImageProperty; }
00054     static winrt::DependencyProperty ProfilePictureProperty() { return s_ProfilePictureProperty; }
00055     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00056
00057     static GlobalDependencyProperty s_BadgeGlyphProperty;
00058     static GlobalDependencyProperty s_BadgeImageSourceProperty;
00059     static GlobalDependencyProperty s_BadgeNumberProperty;
00060     static GlobalDependencyProperty s_BadgeTextProperty;
00061     static GlobalDependencyProperty s_ContactProperty;
00062     static GlobalDependencyProperty s_DisplayNameProperty;
00063     static GlobalDependencyProperty s_InitialsProperty;
00064     static GlobalDependencyProperty s_IsGroupProperty;
00065     static GlobalDependencyProperty s_PreferSmallImageProperty;
00066     static GlobalDependencyProperty s_ProfilePictureProperty;
00067     static GlobalDependencyProperty s_TemplateSettingsProperty;
00068
00069     static void EnsureProperties();
00070     static void ClearProperties();
00071
00072     static void OnBadgeGlyphPropertyChanged(
00073         winrt::DependencyObject const& sender,
00074         winrt::DependencyPropertyChangedEventArgs const& args);
00075
00076     static void OnBadgeImageSourcePropertyChanged(
00077         winrt::DependencyObject const& sender,
00078         winrt::DependencyPropertyChangedEventArgs const& args);
00079
00080     static void OnBadgeNumberPropertyChanged(
00081         winrt::DependencyObject const& sender,
00082         winrt::DependencyPropertyChangedEventArgs const& args);
00083
00084     static void OnBadgeTextPropertyChanged(
00085         winrt::DependencyObject const& sender,
00086         winrt::DependencyPropertyChangedEventArgs const& args);
00087
00088     static void OnContactPropertyChanged(
00089         winrt::DependencyObject const& sender,
00090         winrt::DependencyPropertyChangedEventArgs const& args);
00091
00092     static void OnDisplayNamePropertyChanged(
00093         winrt::DependencyObject const& sender,
00094         winrt::DependencyPropertyChangedEventArgs const& args);
00095
00096     static void OnInitialsPropertyChanged(
00097         winrt::DependencyObject const& sender,
00098         winrt::DependencyPropertyChangedEventArgs const& args);
00099
00100     static void OnIsGroupPropertyChanged(
00101         winrt::DependencyObject const& sender,
00102         winrt::DependencyPropertyChangedEventArgs const& args);
00103
00104     static void OnPreferSmallImagePropertyChanged(
00105         winrt::DependencyObject const& sender,
00106         winrt::DependencyPropertyChangedEventArgs const& args);
00107
00108     static void OnProfilePicturePropertyChanged(
00109         winrt::DependencyObject const& sender,
00110         winrt::DependencyPropertyChangedEventArgs const& args);
00111
00112     static void OnTemplateSettingsPropertyChanged(
00113         winrt::DependencyObject const& sender,
00114         winrt::DependencyPropertyChangedEventArgs const& args);
00115 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarCustomToolButtonProperties Member List

This is the complete list of members for InkToolBarCustomToolButtonProperties, including all inherited members.
ClearProperties() | InkToolBarCustomToolButtonProperties | [static]
ConfigurationContent(winrt::UIElement const &value) | InkToolBarCustomToolButtonProperties |
ConfigurationContent() | InkToolBarCustomToolButtonProperties |
ConfigurationContentProperty() | InkToolBarCustomToolButtonProperties | [inline, static]
EnsureProperties() | InkToolBarCustomToolButtonProperties | [static]
InkToolBarCustomToolButtonProperties() | InkToolBarCustomToolButtonProperties |
s_ConfigurationContentProperty | InkToolBarCustomToolButtonProperties | [static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBase Member List

This is the complete list of members for SelectorBase, including all inherited members.
CanSelect(winrt::IndexPath const &index) | SelectorBase | [protected, virtual]
Clear() | SelectorBase | [virtual]
DeselectWithAnchorPreservation(int index) | SelectorBase |
GetSelectionModel() | SelectorBase | [inline, protected]
IsSelected(winrt::IndexPath const &index) | SelectorBase | [protected]
OnFocusedAction(winrt::IndexPath const &index, bool ctrl, bool shift) | SelectorBase | [inline, virtual]
OnInteractedAction(winrt::IndexPath const &index, bool ctrl, bool shift) | SelectorBase | [inline, virtual]
SelectAll() | SelectorBase | [virtual]
SelectorBase() | SelectorBase |
SetSelectionModel(winrt::SelectionModel const &selectionModel) | SelectorBase |
~SelectorBase() | SelectorBase |
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ScrollInputHelper.h Source File

  • File List
  • File Members
  • ParallaxView

ScrollInputHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // Abstraction layer between the ParallaxView and its ScrollViewer/ScrollPresenter source.
00007 class ScrollInputHelper
00008 {
00009 public:
00010     ScrollInputHelper(const ITrackerHandleManager* owner,
00011         std::function<void(bool, bool)> infoChangedFunction);
00012     ~ScrollInputHelper();
00013
00014     winrt::UIElement TargetElement() const;
00015     winrt::CompositionPropertySet SourcePropertySet() const;
00016     bool IsTargetElementInSource() const;
00017
00018     winrt::hstring GetSourceOffsetPropertyName(winrt::Orientation orientation) const;
00019     winrt::hstring GetSourceScalePropertyName() const;
00020     double GetOffsetFromScrollContentElement(const winrt::UIElement& element, winrt::Orientation orientation) const;
00021     double GetMaxUnderpanOffset(winrt::Orientation orientation) const;
00022     double GetMaxOverpanOffset(winrt::Orientation orientation) const;
00023     double GetContentSize(winrt::Orientation orientation) const;
00024     double GetViewportSize(winrt::Orientation orientation) const;
00025     void SetSourceElement(const winrt::UIElement& sourceElement);
00026     void SetTargetElement(const winrt::UIElement& targetElement);
00027
00028 private:
00029     static winrt::RichEditBox GetRichEditBoxParent(const winrt::DependencyObject& childElement);
00030     static void GetChildScrollPresenterOrScrollViewer(
00031         const winrt::DependencyObject& rootElement,
00032         _Out_ winrt::ScrollPresenter* scrollPresenter,
00033         _Out_ winrt::FxScrollViewer* scrollViewer);
00034     winrt::UIElement GetScrollContentElement() const;
00035     winrt::HorizontalAlignment GetEffectiveHorizontalAlignment() const;
00036     winrt::VerticalAlignment GetEffectiveVerticalAlignment() const;
00037     winrt::FxZoomMode GetEffectiveZoomMode() const;
00038
00039     void SetScrollViewer(const winrt::FxScrollViewer& scrollViewer);
00040     void SetScrollPresenter(const winrt::ScrollPresenter& scrollPresenter);
00041
00042     void UpdateOutOfBoundsPanSize();
00043     void UpdateContentSize();
00044     void UpdateViewportSize();
00045     void UpdateSource(bool allowSourceElementLoadedHookup);
00046     void UpdateIsTargetElementInSource();
00047     void UpdateManipulationZoomMode();
00048     void UpdateManipulationAlignments();
00049     void UpdateInternalExpressionAnimations(bool horizontalInfoChanged, bool verticalInfoChanged, bool zoomInfoChanged);
00050
00051     winrt::HorizontalAlignment ComputeHorizontalContentAlignment() const;
00052     winrt::VerticalAlignment ComputeVerticalContentAlignment() const;
00053     winrt::FxZoomMode ComputeZoomMode() const;
00054
00055     bool IsScrollContentPresenterIScrollInfoProvider() const;
00056
00057     void EnsureInternalSourcePropertySetAndExpressionAnimations();
00058     void StartInternalExpressionAnimations(const winrt::CompositionPropertySet& source);
00059     void StopInternalExpressionAnimations();
00060
00061     void ProcessSourceElementChange(bool allowSourceElementLoadedHookup);
00062     void ProcessSourceControlTemplateChange();
00063     void ProcessTargetElementChange();
00064     void ProcessContentSizeChange();
00065     void ProcessScrollViewerContentChange();
00066     void ProcessScrollPresenterContentChange();
00067     void ProcessScrollViewerZoomModeChange();
00068
00069     void OnSourceElementChanged(bool allowSourceElementLoadedHookup);
00070     void OnTargetElementChanged();
00071     void OnSourceInfoChanged(bool horizontalInfoChanged, bool verticalInfoChanged, bool zoomInfoChanged);
00072
00073     // Event handlers
00074     void OnSourceElementLoaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00075     void OnSourceElementPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00076     void OnTargetElementLoaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00077     void OnSourceSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00078     void OnSourceContentSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00079     void OnScrollViewerPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00080     void OnScrollPresenterPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00081     void OnScrollViewerContentPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00082     void OnScrollViewerDirectManipulationStarted(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00083     void OnScrollViewerDirectManipulationCompleted(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00084     void OnRichEditBoxTextChanged(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00085     void OnCompositionTargetRendering(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00086
00087     void HookSourceElementLoaded();
00088     void UnhookSourceElementLoaded();
00089     void HookSourceControlTemplateChanged();
00090     void UnhookSourceControlTemplateChanged();
00091     void HookTargetElementLoaded();
00092     void UnhookTargetElementLoaded();
00093     void HookScrollPresenterPropertyChanged();
00094     void UnhookScrollPresenterPropertyChanged();
00095     void HookScrollPresenterContentPropertyChanged();
00096     void UnhookScrollPresenterContentPropertyChanged();
00097     void HookScrollViewerPropertyChanged();
00098     void UnhookScrollViewerPropertyChanged();
00099     void HookScrollViewerContentPropertyChanged();
00100     void UnhookScrollViewerContentPropertyChanged();
00101     void HookScrollViewerDirectManipulationStarted();
00102     void UnhookScrollViewerDirectManipulationStarted();
00103     void HookScrollViewerDirectManipulationCompleted();
00104     void UnhookScrollViewerDirectManipulationCompleted();
00105     void HookRichEditBoxTextChanged();
00106     void UnhookRichEditBoxTextChanged();
00107     void HookCompositionTargetRendering();
00108     void UnhookCompositionTargetRendering();
00109
00110 private:
00111     const ITrackerHandleManager* m_owner;
00112     std::function<void(bool, bool)> m_infoChangedFunction;
00113
00114     tracker_ref<winrt::UIElement> m_sourceElement{ m_owner };
00115     tracker_ref<winrt::UIElement> m_targetElement{ m_owner };
00116     tracker_ref<winrt::FxScrollViewer> m_scrollViewer{ m_owner };
00117     tracker_ref<winrt::ScrollPresenter> m_scrollPresenter{ m_owner };
00118     tracker_ref<winrt::FrameworkElement> m_sourceContent{ m_owner };
00119     tracker_ref<winrt::RichEditBox> m_richEditBox{ m_owner };
00120     winrt::CompositionPropertySet m_internalSourcePropertySet{ nullptr };
00121     winrt::CompositionPropertySet m_sourcePropertySet{ nullptr };
00122     winrt::CompositionPropertySet m_scrollViewerPropertySet{ nullptr };
00123     winrt::ExpressionAnimation m_internalTranslationXExpressionAnimation{ nullptr };
00124     winrt::ExpressionAnimation m_internalTranslationYExpressionAnimation{ nullptr };
00125     winrt::ExpressionAnimation m_internalScaleExpressionAnimation{ nullptr };
00126     winrt::FxZoomMode m_manipulationZoomMode{ winrt::FxZoomMode::Disabled };
00127     winrt::HorizontalAlignment m_manipulationHorizontalAlignment{ winrt::HorizontalAlignment::Stretch };
00128     winrt::VerticalAlignment m_manipulationVerticalAlignment{ winrt::VerticalAlignment::Stretch };
00129     winrt::Size m_viewportSize{ 0.0f, 0.0f };
00130     winrt::Size m_contentSize{ 0.0f, 0.0f };
00131     winrt::Size m_outOfBoundsPanSize{ 0.0f, 0.0f };
00132     bool m_isTargetElementInSource{ false };
00133     bool m_isScrollViewerInDirectManipulation{ false };
00134
00135     // Event Tokens
00136     winrt::event_token m_targetElementLoadedToken{ 0 };
00137     winrt::event_token m_sourceElementLoadedToken{ 0 };
00138     winrt::event_token m_sourceControlTemplateChangedToken{ 0 };
00139     winrt::event_token m_sourceSizeChangedToken{ 0 };
00140     winrt::event_token m_sourceContentSizeChangedToken{ 0 };
00141     winrt::event_token m_scrollViewerContentHorizontalAlignmentChangedToken{ 0 };
00142     winrt::event_token m_scrollViewerContentVerticalAlignmentChangedToken{ 0 };
00143     winrt::event_token m_scrollViewerContentChangedToken{ 0 };
00144     winrt::event_token m_scrollPresenterContentChangedToken{ 0 };
00145     winrt::event_token m_scrollViewerHorizontalContentAlignmentChangedToken{ 0 };
00146     winrt::event_token m_scrollViewerVerticalContentAlignmentChangedToken{ 0 };
00147     winrt::event_token m_scrollViewerZoomModeChangedToken{ 0 };
00148     winrt::event_token m_scrollViewerDirectManipulationStartedToken{ 0 };
00149     winrt::event_token m_scrollViewerDirectManipulationCompletedToken{ 0 };
00150     winrt::event_token m_richEditBoxTextChangedToken{ 0 };
00151     winrt::event_token m_renderingToken{ 0 };
00152
00153     // Property names inside the composition property set returned by get_SourcePropertySet.
00154     static PCWSTR s_horizontalOffsetPropertyName;
00155     static PCWSTR s_verticalOffsetPropertyName;
00156     static PCWSTR s_scalePropertyName;
00157 };
00158
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RepeaterAutomationPeer Member List

This is the complete list of members for RepeaterAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< RepeaterAutomationPeer > &&self) noexcept | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
final_release(std::unique_ptr< RepeaterAutomationPeer > &&self) | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | RepeaterAutomationPeer |
GetBase() | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
GetChildrenCore() | RepeaterAutomationPeer |
GetElement(const winrt::AutomationPeer &peer, const winrt::ItemsRepeater &repeater) | RepeaterAutomationPeer | [private]
GetInner() | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
IsOnThread() | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< RepeaterAutomationPeer, winrt::implementation::RepeaterAutomationPeerT > | [inline]
RepeaterAutomationPeer(winrt::ItemsRepeater const &owner) | RepeaterAutomationPeer |
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedIconProperties Member List

This is the complete list of members for AnimatedIconProperties, including all inherited members.
AnimatedIconProperties() | AnimatedIconProperties |
ClearProperties() | AnimatedIconProperties | [static]
EnsureProperties() | AnimatedIconProperties | [static]
FallbackIconSource(winrt::IconSource const &value) | AnimatedIconProperties |
FallbackIconSource() | AnimatedIconProperties |
FallbackIconSourceProperty() | AnimatedIconProperties | [inline, static]
GetState(winrt::DependencyObject const &target) | AnimatedIconProperties | [static]
MirroredWhenRightToLeft(bool value) | AnimatedIconProperties |
MirroredWhenRightToLeft() | AnimatedIconProperties |
MirroredWhenRightToLeftProperty() | AnimatedIconProperties | [inline, static]
OnFallbackIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedIconProperties | [static]
OnMirroredWhenRightToLeftPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedIconProperties | [static]
OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnimatedIconProperties | [static]
s_FallbackIconSourceProperty | AnimatedIconProperties | [static]
s_MirroredWhenRightToLeftProperty | AnimatedIconProperties | [static]
s_SourceProperty | AnimatedIconProperties | [static]
s_StateProperty | AnimatedIconProperties | [static]
SetState(winrt::DependencyObject const &target, winrt::hstring const &value) | AnimatedIconProperties | [static]
Source(winrt::IAnimatedVisualSource2 const &value) | AnimatedIconProperties |
Source() | AnimatedIconProperties |
SourceProperty() | AnimatedIconProperties | [inline, static]
StateProperty() | AnimatedIconProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/TestUI/NumberBoxAxeTestPage.xaml.cs Source File

  • File List
  • File Members
  • NumberBox
  • TestUI

NumberBoxAxeTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 namespace MUXControlsTestApp
00004 {
00005     [AxeScanTestPage(Name = "NumberBox-Axe")]
00006     public sealed partial class NumberBoxAxeTestPage : TestPage
00007     {
00008         public NumberBoxAxeTestPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Rgb Member List

This is the complete list of members for Rgb, including all inherited members.
Rgb() | Rgb
Rgb(double r, double g, double b) | Rgb
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterElementPreparedEventArgs Member List

This is the complete list of members for ItemsRepeaterElementPreparedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ItemsRepeaterElementPreparedEventArgs > &&self) noexcept | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
Element() | ItemsRepeaterElementPreparedEventArgs |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< ItemsRepeaterElementPreparedEventArgs > &&self) | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
Index() | ItemsRepeaterElementPreparedEventArgs |
IsOnThread() | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
ItemsRepeaterElementPreparedEventArgs(const winrt::UIElement &element, int index) | ItemsRepeaterElementPreparedEventArgs |
m_index | ItemsRepeaterElementPreparedEventArgs | [private]
m_viewType | ItemsRepeaterElementPreparedEventArgs | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemsRepeaterElementPreparedEventArgs, winrt::implementation::ItemsRepeaterElementPreparedEventArgsT, winrt::composable, winrt::composing > | [inline]
Update(const winrt::UIElement &element, int index) | ItemsRepeaterElementPreparedEventArgs |
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/TreeView/TreeViewItem.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • TreeView

TreeViewItem.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using System.Diagnostics;
00006 using Windows.System;
00007 using Microsoft.UI.Input;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Input;
00011 using Microsoft.UI.Xaml.Automation.Peers;
00012 using Microsoft.UI.Xaml.Automation;
00013 using System.ComponentModel;
00014
00015 namespace MUXControlsTestApp.Samples.Selection
00016 {
00017     public class TreeViewItem : ContentControl
00018     {
00019         public TreeViewItem()
00020         {
00021             IsTabStop = true;
00022             UseSystemFocusVisuals = true;
00023             Margin = new Thickness(5);
00024         }
00025
00026         public SelectionModel SelectionModel
00027         {
00028             get { return (SelectionModel)GetValue(SelectionModelProperty); }
00029             set { SetValue(SelectionModelProperty, value); }
00030         }
00031
00032         public static readonly DependencyProperty SelectionModelProperty =
00033             DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(TreeViewItem), new PropertyMetadata(null, new PropertyChangedCallback(OnPropertyChanged)));
00034
00035         public bool? IsSelected
00036         {
00037             get { return (bool?)GetValue(IsSelectedProperty); }
00038             set { SetValue(IsSelectedProperty, value); }
00039         }
00040
00041         public static readonly DependencyProperty IsSelectedProperty =
00042             DependencyProperty.Register("IsSelected", typeof(bool?), typeof(TreeViewItem), new PropertyMetadata(false));
00043
00044         public void Select(bool select)
00045         {
00046             if (SelectionModel != null)
00047             {
00048                 var indexPath = GetIndexPath();
00049                 if(select)
00050                 {
00051                     SelectionModel.SelectAt(indexPath);
00052                 }
00053                 else
00054                 {
00055                     SelectionModel.DeselectAt(indexPath);
00056                 }
00057             }
00058         }
00059
00060         public int RepeatedIndex
00061         {
00062             get { return (int)GetValue(RepeatedIndexProperty); }
00063             set { SetValue(RepeatedIndexProperty, value); }
00064         }
00065
00066         public static readonly DependencyProperty RepeatedIndexProperty =
00067             DependencyProperty.Register("RepeatedIndex", typeof(int), typeof(TreeViewItem), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)));
00068
00069         private static void OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
00070         {
00071             if (args.Property == RepeatedIndexProperty)
00072             {
00073                 var item = obj as TreeViewItem;
00074                 var indexPath = item.GetIndexPath();
00075                 if (item.SelectionModel != null)
00076                 {
00077                     item.IsSelected = IsRealized(indexPath) ? item.SelectionModel.IsSelectedAt(indexPath) : false;
00078                 }
00079
00080                 AutomationProperties.SetLevel(item, indexPath.GetSize());
00081             }
00082             else
00083             if (args.Property == SelectionModelProperty)
00084             {
00085                 if (args.OldValue != null)
00086                 {
00087                     (args.OldValue as SelectionModel).PropertyChanged -= (obj as TreeViewItem).OnselectionModelChanged;
00088                 }
00089
00090                 if (args.NewValue != null)
00091                 {
00092                     (args.NewValue as SelectionModel).PropertyChanged += (obj as TreeViewItem).OnselectionModelChanged;
00093                 }
00094             }
00095         }
00096
00097         protected override void OnKeyUp(KeyRoutedEventArgs e)
00098         {
00099             var indexPath = GetIndexPath();
00100             Debug.WriteLine("OnKeyUp:" + indexPath.ToString());
00101
00102             if (SelectionModel != null)
00103             {
00104                 if (e.Key == VirtualKey.Escape)
00105                 {
00106                     SelectionModel.ClearSelection();
00107                 }
00108                 else if (e.Key == VirtualKey.Space)
00109                 {
00110                     SelectionModel.SelectAt(indexPath);
00111                 }
00112                 else if (!SelectionModel.SingleSelect)
00113                 {
00114                     var isShiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
00115                     var isCtrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
00116                     if (e.Key == VirtualKey.A && isCtrlPressed)
00117                     {
00118                         SelectionModel.SelectAll();
00119                     }
00120                     else if (isCtrlPressed && e.Key == VirtualKey.Space)
00121                     {
00122                         if(SelectionModel.IsSelectedAt(indexPath).Value)
00123                         {
00124                             SelectionModel.DeselectAt(indexPath);
00125                         }
00126                         else
00127                         {
00128                             SelectionModel.SelectAt(indexPath);
00129                         }
00130                     }
00131                     else if (isShiftPressed)
00132                     {
00133                         SelectionModel.SelectRangeFromAnchorTo(GetIndexPath());
00134                     }
00135                 }
00136             }
00137
00138             base.OnKeyUp(e);
00139         }
00140
00141         protected override void OnPointerPressed(PointerRoutedEventArgs e)
00142         {
00143             if (!e.Handled)
00144             {
00145                 var indexPath = GetIndexPath();
00146                 Debug.WriteLine("OnPointerPressed:" + indexPath.ToString());
00147
00148                 if (SelectionModel != null)
00149                 {
00150                     if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Shift) && !SelectionModel.SingleSelect)
00151                     {
00152                         if(e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
00153                         {
00154                             SelectionModel.DeselectRangeFromAnchorTo(GetIndexPath());
00155                         }
00156                         else
00157                         {
00158                             SelectionModel.SelectRangeFromAnchorTo(GetIndexPath());
00159                         }
00160                     }
00161                     else if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
00162                     {
00163                         var path = GetIndexPath();
00164                         if(SelectionModel.IsSelectedAt(path).Value)
00165                         {
00166                             SelectionModel.SelectAt(path);
00167                         }
00168                         else
00169                         {
00170                             SelectionModel.SelectAt(path);
00171                         }
00172                     }
00173                     else
00174                     {
00175                         SelectionModel.SelectAt(GetIndexPath());
00176                         this.Focus(FocusState.Keyboard);
00177                     }
00178                 }
00179
00180                 e.Handled = true;
00181                 base.OnPointerPressed(e);
00182             }
00183         }
00184
00185         protected override AutomationPeer OnCreateAutomationPeer()
00186         {
00187             return new TreeViewItemAutomationPeer(this);
00188         }
00189
00190         private IndexPath GetIndexPath()
00191         {
00192             var child = this as FrameworkElement;
00193             var parent = child.Parent as FrameworkElement;
00194             List<int> path = new List<int>();
00195
00196             // TOOD: Hack to know when to stop
00197             while (!(parent is ItemsRepeater) || (parent as ItemsRepeater).Name != "rootRepeater")
00198             {
00199                 if (parent is ItemsRepeater)
00200                 {
00201                     path.Insert(0, (parent as ItemsRepeater).GetElementIndex(child));
00202                 }
00203
00204                 child = parent;
00205                 parent = parent.Parent as FrameworkElement;
00206             }
00207
00208             path.Insert(0, (parent as ItemsRepeater).GetElementIndex(child));
00209
00210             return IndexPath.CreateFromIndices(path);
00211         }
00212
00213         private void OnselectionModelChanged(object sender, PropertyChangedEventArgs e)
00214         {
00215             if (e.PropertyName == "SelectedIndices")
00216             {
00217                 bool? oldValue = IsSelected;
00218                 var indexPath = GetIndexPath();
00219                 bool? newValue = IsRealized(indexPath) ? SelectionModel.IsSelectedAt(indexPath) : false;
00220
00221                 if (oldValue != newValue)
00222                 {
00223                     IsSelected = newValue;
00224                     bool oldValueAsBool = oldValue.HasValue && oldValue.Value;
00225                     bool newValueAsBool = newValue.HasValue && newValue.Value;
00226                     if (oldValueAsBool != newValueAsBool)
00227                     {
00228                         // AutomationEvents.PropertyChanged is used as a value that means dont raise anything
00229                         AutomationEvents eventToRaise =
00230                             oldValueAsBool ?
00231                                 (SelectionModel.SingleSelect ? AutomationEvents.PropertyChanged : AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection) :
00232                                 (SelectionModel.SingleSelect ? AutomationEvents.SelectionItemPatternOnElementSelected : AutomationEvents.SelectionItemPatternOnElementAddedToSelection);
00233
00234                         if (eventToRaise != AutomationEvents.PropertyChanged && AutomationPeer.ListenerExists(eventToRaise))
00235                         {
00236                             var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
00237                             peer.RaiseAutomationEvent(eventToRaise);
00238                         }
00239                     }
00240                 }
00241             }
00242         }
00243
00244         private static bool IsRealized(IndexPath indexPath)
00245         {
00246             bool isRealized = true;
00247             for (int i = 0; i < indexPath.GetSize(); i++)
00248             {
00249                 if (indexPath.GetAt(i) < 0)
00250                 {
00251                     isRealized = false;
00252                     break;
00253                 }
00254             }
00255
00256             return isRealized;
00257         }
00258     }
00259 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VisualStatesPage Member List

This is the complete list of members for VisualStatesPage, including all inherited members.
viewers | VisualStatesPage | [private]
VisualStatesPage() | VisualStatesPage | [inline]
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItem.properties.cpp Source File

  • File List
  • File Members
  • Generated

TabViewItem.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TabViewItem.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TabViewItem)
00012 }
00013
00014 #include "TabViewItem.g.cpp"
00015
00016 GlobalDependencyProperty TabViewItemProperties::s_HeaderProperty{ nullptr };
00017 GlobalDependencyProperty TabViewItemProperties::s_HeaderTemplateProperty{ nullptr };
00018 GlobalDependencyProperty TabViewItemProperties::s_IconSourceProperty{ nullptr };
00019 GlobalDependencyProperty TabViewItemProperties::s_IsClosableProperty{ nullptr };
00020 GlobalDependencyProperty TabViewItemProperties::s_TabViewTemplateSettingsProperty{ nullptr };
00021
00022 TabViewItemProperties::TabViewItemProperties()
00023     : m_closeRequestedEventSource{static_cast<TabViewItem*>(this)}
00024 {
00025     EnsureProperties();
00026 }
00027
00028 void TabViewItemProperties::EnsureProperties()
00029 {
00030     if (!s_HeaderProperty)
00031     {
00032         s_HeaderProperty =
00033             InitializeDependencyProperty(
00034                 L"Header",
00035                 winrt::name_of<winrt::IInspectable>(),
00036                 winrt::name_of<winrt::TabViewItem>(),
00037                 false /* isAttached */,
00038                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00039                 winrt::PropertyChangedCallback(&OnHeaderPropertyChanged));
00040     }
00041     if (!s_HeaderTemplateProperty)
00042     {
00043         s_HeaderTemplateProperty =
00044             InitializeDependencyProperty(
00045                 L"HeaderTemplate",
00046                 winrt::name_of<winrt::DataTemplate>(),
00047                 winrt::name_of<winrt::TabViewItem>(),
00048                 false /* isAttached */,
00049                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00050                 nullptr);
00051     }
00052     if (!s_IconSourceProperty)
00053     {
00054         s_IconSourceProperty =
00055             InitializeDependencyProperty(
00056                 L"IconSource",
00057                 winrt::name_of<winrt::IconSource>(),
00058                 winrt::name_of<winrt::TabViewItem>(),
00059                 false /* isAttached */,
00060                 ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
00061                 winrt::PropertyChangedCallback(&OnIconSourcePropertyChanged));
00062     }
00063     if (!s_IsClosableProperty)
00064     {
00065         s_IsClosableProperty =
00066             InitializeDependencyProperty(
00067                 L"IsClosable",
00068                 winrt::name_of<bool>(),
00069                 winrt::name_of<winrt::TabViewItem>(),
00070                 false /* isAttached */,
00071                 ValueHelper<bool>::BoxValueIfNecessary(true),
00072                 winrt::PropertyChangedCallback(&OnIsClosablePropertyChanged));
00073     }
00074     if (!s_TabViewTemplateSettingsProperty)
00075     {
00076         s_TabViewTemplateSettingsProperty =
00077             InitializeDependencyProperty(
00078                 L"TabViewTemplateSettings",
00079                 winrt::name_of<winrt::TabViewItemTemplateSettings>(),
00080                 winrt::name_of<winrt::TabViewItem>(),
00081                 false /* isAttached */,
00082                 ValueHelper<winrt::TabViewItemTemplateSettings>::BoxedDefaultValue(),
00083                 nullptr);
00084     }
00085 }
00086
00087 void TabViewItemProperties::ClearProperties()
00088 {
00089     s_HeaderProperty = nullptr;
00090     s_HeaderTemplateProperty = nullptr;
00091     s_IconSourceProperty = nullptr;
00092     s_IsClosableProperty = nullptr;
00093     s_TabViewTemplateSettingsProperty = nullptr;
00094 }
00095
00096 void TabViewItemProperties::OnHeaderPropertyChanged(
00097     winrt::DependencyObject const& sender,
00098     winrt::DependencyPropertyChangedEventArgs const& args)
00099 {
00100     auto owner = sender.as<winrt::TabViewItem>();
00101     winrt::get_self<TabViewItem>(owner)->OnHeaderPropertyChanged(args);
00102 }
00103
00104 void TabViewItemProperties::OnIconSourcePropertyChanged(
00105     winrt::DependencyObject const& sender,
00106     winrt::DependencyPropertyChangedEventArgs const& args)
00107 {
00108     auto owner = sender.as<winrt::TabViewItem>();
00109     winrt::get_self<TabViewItem>(owner)->OnIconSourcePropertyChanged(args);
00110 }
00111
00112 void TabViewItemProperties::OnIsClosablePropertyChanged(
00113     winrt::DependencyObject const& sender,
00114     winrt::DependencyPropertyChangedEventArgs const& args)
00115 {
00116     auto owner = sender.as<winrt::TabViewItem>();
00117     winrt::get_self<TabViewItem>(owner)->OnIsClosablePropertyChanged(args);
00118 }
00119
00120 void TabViewItemProperties::Header(winrt::IInspectable const& value)
00121 {
00122     [[gsl::suppress(con)]]
00123     {
00124     static_cast<TabViewItem*>(this)->SetValue(s_HeaderProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00125     }
00126 }
00127
00128 winrt::IInspectable TabViewItemProperties::Header()
00129 {
00130     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TabViewItem*>(this)->GetValue(s_HeaderProperty));
00131 }
00132
00133 void TabViewItemProperties::HeaderTemplate(winrt::DataTemplate const& value)
00134 {
00135     [[gsl::suppress(con)]]
00136     {
00137     static_cast<TabViewItem*>(this)->SetValue(s_HeaderTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00138     }
00139 }
00140
00141 winrt::DataTemplate TabViewItemProperties::HeaderTemplate()
00142 {
00143     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<TabViewItem*>(this)->GetValue(s_HeaderTemplateProperty));
00144 }
00145
00146 void TabViewItemProperties::IconSource(winrt::IconSource const& value)
00147 {
00148     [[gsl::suppress(con)]]
00149     {
00150     static_cast<TabViewItem*>(this)->SetValue(s_IconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
00151     }
00152 }
00153
00154 winrt::IconSource TabViewItemProperties::IconSource()
00155 {
00156     return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<TabViewItem*>(this)->GetValue(s_IconSourceProperty));
00157 }
00158
00159 void TabViewItemProperties::IsClosable(bool value)
00160 {
00161     [[gsl::suppress(con)]]
00162     {
00163     static_cast<TabViewItem*>(this)->SetValue(s_IsClosableProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00164     }
00165 }
00166
00167 bool TabViewItemProperties::IsClosable()
00168 {
00169     return ValueHelper<bool>::CastOrUnbox(static_cast<TabViewItem*>(this)->GetValue(s_IsClosableProperty));
00170 }
00171
00172 void TabViewItemProperties::TabViewTemplateSettings(winrt::TabViewItemTemplateSettings const& value)
00173 {
00174     [[gsl::suppress(con)]]
00175     {
00176     static_cast<TabViewItem*>(this)->SetValue(s_TabViewTemplateSettingsProperty, ValueHelper<winrt::TabViewItemTemplateSettings>::BoxValueIfNecessary(value));
00177     }
00178 }
00179
00180 winrt::TabViewItemTemplateSettings TabViewItemProperties::TabViewTemplateSettings()
00181 {
00182     return ValueHelper<winrt::TabViewItemTemplateSettings>::CastOrUnbox(static_cast<TabViewItem*>(this)->GetValue(s_TabViewTemplateSettingsProperty));
00183 }
00184
00185 winrt::event_token TabViewItemProperties::CloseRequested(winrt::TypedEventHandler<winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs> const& value)
00186 {
00187     return m_closeRequestedEventSource.add(value);
00188 }
00189
00190 void TabViewItemProperties::CloseRequested(winrt::event_token const& token)
00191 {
00192     m_closeRequestedEventSource.remove(token);
00193 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterTests.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • APITests

ScrollPresenterTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using System;
00007 using System.Collections.Generic;
00008 using System.Numerics;
00009 using System.Threading;
00010 using Windows.Foundation;
00011 using Windows.UI;
00012 using Microsoft.UI.Composition;
00013 using Microsoft.UI.Composition.Interactions;
00014 using Microsoft.UI.Xaml;
00015 using Microsoft.UI.Xaml.Controls;
00016 using Microsoft.UI.Xaml.Controls.Primitives;
00017 using Microsoft.UI.Xaml.Hosting;
00018 using Microsoft.UI.Xaml.Media;
00019 using Microsoft.UI.Xaml.Shapes;
00020 using Microsoft.UI.Xaml.Markup;
00021 using Microsoft.UI.Xaml.Input;
00022
00023 using WEX.TestExecution;
00024 using WEX.TestExecution.Markup;
00025 using WEX.Logging.Interop;
00026
00027 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00028 {
00029     [TestClass]
00030     public partial class ScrollPresenterTests : ApiTestBase
00031     {
00032         private const ScrollingInteractionState c_defaultState = ScrollingInteractionState.Idle;
00033         private const ScrollingChainMode c_defaultHorizontalScrollChainMode = ScrollingChainMode.Auto;
00034         private const ScrollingChainMode c_defaultVerticalScrollChainMode = ScrollingChainMode.Auto;
00035         private const ScrollingRailMode c_defaultHorizontalScrollRailMode = ScrollingRailMode.Enabled;
00036         private const ScrollingRailMode c_defaultVerticalScrollRailMode = ScrollingRailMode.Enabled;
00037         private const ScrollingScrollMode c_defaultHorizontalScrollMode = ScrollingScrollMode.Auto;
00038         private const ScrollingScrollMode c_defaultVerticalScrollMode = ScrollingScrollMode.Auto;
00039         private const ScrollingChainMode c_defaultZoomChainMode = ScrollingChainMode.Auto;
00040         private const ScrollingZoomMode c_defaultZoomMode = ScrollingZoomMode.Disabled;
00041         private const ScrollingInputKinds c_defaultIgnoredInputKinds = ScrollingInputKinds.None;
00042         private const ScrollingContentOrientation c_defaultContentOrientation = ScrollingContentOrientation.Both;
00043         private const double c_defaultMinZoomFactor = 0.1;
00044         private const double c_defaultZoomFactor = 1.0;
00045         private const double c_defaultMaxZoomFactor = 10.0;
00046         private const double c_defaultHorizontalOffset = 0.0;
00047         private const double c_defaultVerticalOffset = 0.0;
00048         private const double c_defaultAnchorRatio = 0.0;
00049
00050         private const double c_defaultUIScrollPresenterContentWidth = 1200.0;
00051         private const double c_defaultUIScrollPresenterContentHeight = 600.0;
00052         private const double c_defaultUIScrollPresenterWidth = 300.0;
00053         private const double c_defaultUIScrollPresenterHeight = 200.0;
00054         private const double c_defaultUIScrollControllerThickness = 44.0;
00055
00056         private const float c_defaultOffsetResultTolerance = 0.0001f;
00057
00058         private const string c_visualHorizontalOffsetTargetedPropertyName = "Translation.X";
00059         private const string c_visualVerticalOffsetTargetedPropertyName = "Translation.Y";
00060         private const string c_visualScaleTargetedPropertyName = "Scale.X";
00061
00062         private const string c_expressionAnimationSourcesExtentPropertyName = "Extent";
00063         private const string c_expressionAnimationSourcesViewportPropertyName = "Viewport";
00064         private const string c_expressionAnimationSourcesOffsetPropertyName = "Offset";
00065         private const string c_expressionAnimationSourcesPositionPropertyName = "Position";
00066         private const string c_expressionAnimationSourcesMinPositionPropertyName = "MinPosition";
00067         private const string c_expressionAnimationSourcesMaxPositionPropertyName = "MaxPosition";
00068         private const string c_expressionAnimationSourcesZoomFactorPropertyName = "ZoomFactor";
00069
00070         [TestMethod]
00071         [TestProperty("Description", "Verifies the ScrollPresenter default properties.")]
00072         public void VerifyDefaultPropertyValues()
00073         {
00074             RunOnUIThread.Execute(() =>
00075             {
00076                 ScrollPresenter scrollPresenter = new ScrollPresenter();
00077                 Verify.IsNotNull(scrollPresenter);
00078
00079                 Log.Comment("Verifying ScrollPresenter default property values");
00080                 Verify.IsNull(scrollPresenter.HorizontalScrollController);
00081                 Verify.IsNull(scrollPresenter.VerticalScrollController);
00082                 Verify.IsNull(scrollPresenter.Content);
00083                 Verify.IsNotNull(scrollPresenter.ExpressionAnimationSources);
00084                 Verify.AreEqual(c_defaultState, scrollPresenter.State);
00085                 Verify.AreEqual(c_defaultHorizontalScrollChainMode, scrollPresenter.HorizontalScrollChainMode);
00086                 Verify.AreEqual(c_defaultVerticalScrollChainMode, scrollPresenter.VerticalScrollChainMode);
00087                 Verify.AreEqual(c_defaultHorizontalScrollRailMode, scrollPresenter.HorizontalScrollRailMode);
00088                 Verify.AreEqual(c_defaultVerticalScrollRailMode, scrollPresenter.VerticalScrollRailMode);
00089                 Verify.AreEqual(c_defaultHorizontalScrollMode, scrollPresenter.HorizontalScrollMode);
00090                 Verify.AreEqual(c_defaultVerticalScrollMode, scrollPresenter.VerticalScrollMode);
00091                 Verify.AreEqual(c_defaultZoomChainMode, scrollPresenter.ZoomChainMode);
00092                 Verify.AreEqual(c_defaultContentOrientation, scrollPresenter.ContentOrientation);
00093                 Verify.AreEqual(c_defaultZoomMode, scrollPresenter.ZoomMode);
00094                 Verify.AreEqual(c_defaultIgnoredInputKinds, scrollPresenter.IgnoredInputKinds);
00095                 Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
00096                 Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
00097                 Verify.AreEqual(c_defaultZoomFactor, scrollPresenter.ZoomFactor);
00098                 Verify.AreEqual(c_defaultHorizontalOffset, scrollPresenter.HorizontalOffset);
00099                 Verify.AreEqual(c_defaultVerticalOffset, scrollPresenter.VerticalOffset);
00100                 Verify.AreEqual(c_defaultAnchorRatio, scrollPresenter.HorizontalAnchorRatio);
00101                 Verify.AreEqual(c_defaultAnchorRatio, scrollPresenter.VerticalAnchorRatio);
00102                 Verify.AreEqual(0.0, scrollPresenter.ExtentWidth);
00103                 Verify.AreEqual(0.0, scrollPresenter.ExtentHeight);
00104                 Verify.AreEqual(0.0, scrollPresenter.ViewportWidth);
00105                 Verify.AreEqual(0.0, scrollPresenter.ViewportHeight);
00106                 Verify.AreEqual(0.0, scrollPresenter.ScrollableWidth);
00107                 Verify.AreEqual(0.0, scrollPresenter.ScrollableHeight);
00108             });
00109         }
00110
00111         [TestMethod]
00112         [TestProperty("Description", "Exercises the ScrollPresenter property setters and getters for non-default values.")]
00113         public void VerifyPropertyGettersAndSetters()
00114         {
00115             ScrollPresenter scrollPresenter = null;
00116             Rectangle rectangle = null;
00117
00118             RunOnUIThread.Execute(() =>
00119             {
00120                 scrollPresenter = new ScrollPresenter();
00121                 Verify.IsNotNull(scrollPresenter);
00122
00123                 rectangle = new Rectangle();
00124                 Verify.IsNotNull(rectangle);
00125
00126                 Log.Comment("Setting ScrollPresenter properties to non-default values");
00127                 scrollPresenter.Content = rectangle;
00128                 scrollPresenter.HorizontalScrollChainMode = ScrollingChainMode.Always;
00129                 scrollPresenter.VerticalScrollChainMode = ScrollingChainMode.Never;
00130                 scrollPresenter.HorizontalScrollRailMode = ScrollingRailMode.Disabled;
00131                 scrollPresenter.VerticalScrollRailMode = ScrollingRailMode.Disabled;
00132                 scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Disabled;
00133                 scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Disabled;
00134                 scrollPresenter.ZoomChainMode = ScrollingChainMode.Never;
00135                 scrollPresenter.ZoomMode = ScrollingZoomMode.Enabled;
00136                 scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.MouseWheel;
00137                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
00138                 scrollPresenter.MinZoomFactor = 0.5f;
00139                 scrollPresenter.MaxZoomFactor = 2.0f;
00140                 scrollPresenter.HorizontalAnchorRatio = 0.25f;
00141                 scrollPresenter.VerticalAnchorRatio = 0.75f;
00142             });
00143
00144             IdleSynchronizer.Wait();
00145
00146             RunOnUIThread.Execute(() =>
00147             {
00148                 Log.Comment("Verifying ScrollPresenter non-default property values");
00149                 Verify.AreEqual(rectangle, scrollPresenter.Content);
00150                 Verify.AreEqual(c_defaultState, scrollPresenter.State);
00151                 Verify.AreEqual(ScrollingChainMode.Always, scrollPresenter.HorizontalScrollChainMode);
00152                 Verify.AreEqual(ScrollingChainMode.Never, scrollPresenter.VerticalScrollChainMode);
00153                 Verify.AreEqual(ScrollingRailMode.Disabled, scrollPresenter.HorizontalScrollRailMode);
00154                 Verify.AreEqual(ScrollingRailMode.Disabled, scrollPresenter.VerticalScrollRailMode);
00155                 Verify.AreEqual(ScrollingScrollMode.Disabled, scrollPresenter.HorizontalScrollMode);
00156                 Verify.AreEqual(ScrollingScrollMode.Disabled, scrollPresenter.VerticalScrollMode);
00157                 Verify.AreEqual(ScrollingChainMode.Never, scrollPresenter.ZoomChainMode);
00158                 Verify.AreEqual(ScrollingZoomMode.Enabled, scrollPresenter.ZoomMode);
00159                 Verify.AreEqual(ScrollingInputKinds.MouseWheel, scrollPresenter.IgnoredInputKinds);
00160                 Verify.AreEqual(ScrollingContentOrientation.Horizontal, scrollPresenter.ContentOrientation);
00161                 Verify.AreEqual(0.5f, scrollPresenter.MinZoomFactor);
00162                 Verify.AreEqual(2.0f, scrollPresenter.MaxZoomFactor);
00163                 Verify.AreEqual(0.25f, scrollPresenter.HorizontalAnchorRatio);
00164                 Verify.AreEqual(0.75f, scrollPresenter.VerticalAnchorRatio);
00165             });
00166         }
00167
00168         [TestMethod]
00169         [TestProperty("Description", "Verifies the ScrollPresenter ExtentWidth/Height, ViewportWidth/Height and ScrollableWidth/Height properties.")]
00170         public void VerifyExtentAndViewportProperties()
00171         {
00172             ScrollPresenter scrollPresenter = null;
00173             Rectangle rectangleScrollPresenterContent = null;
00174             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00175
00176             RunOnUIThread.Execute(() =>
00177             {
00178                 rectangleScrollPresenterContent = new Rectangle();
00179                 scrollPresenter = new ScrollPresenter();
00180
00181                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, setAsContentRoot: true);
00182             });
00183
00184             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00185
00186             RunOnUIThread.Execute(() =>
00187             {
00188                 Verify.AreEqual(c_defaultUIScrollPresenterContentWidth, scrollPresenter.ExtentWidth);
00189                 Verify.AreEqual(c_defaultUIScrollPresenterContentHeight, scrollPresenter.ExtentHeight);
00190                 Verify.AreEqual(c_defaultUIScrollPresenterWidth, scrollPresenter.ViewportWidth);
00191                 Verify.AreEqual(c_defaultUIScrollPresenterHeight, scrollPresenter.ViewportHeight);
00192                 Verify.AreEqual(c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth, scrollPresenter.ScrollableWidth);
00193                 Verify.AreEqual(c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight, scrollPresenter.ScrollableHeight);
00194             });
00195         }
00196
00197         [TestMethod]
00198         [TestProperty("Description", "Attempts to set invalid ScrollPresenter.MinZoomFactor values.")]
00199         public void SetInvalidMinZoomFactorValues()
00200         {
00201             RunOnUIThread.Execute(() =>
00202             {
00203                 ScrollPresenter scrollPresenter = new ScrollPresenter();
00204
00205                 Log.Comment("Attempting to set ScrollPresenter.MinZoomFactor to double.NaN");
00206                 try
00207                 {
00208                     scrollPresenter.MinZoomFactor = double.NaN;
00209                 }
00210                 catch (Exception e)
00211                 {
00212                     Log.Comment("Exception thrown: {0}", e.ToString());
00213                 }
00214                 Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
00215
00216                 Log.Comment("Attempting to set ScrollPresenter.MinZoomFactor to double.NegativeInfinity");
00217                 try
00218                 {
00219                     scrollPresenter.MinZoomFactor = double.NegativeInfinity;
00220                 }
00221                 catch (Exception e)
00222                 {
00223                     Log.Comment("Exception thrown: {0}", e.ToString());
00224                 }
00225                 Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
00226
00227                 Log.Comment("Attempting to set ScrollPresenter.MinZoomFactor to double.PositiveInfinity");
00228                 try
00229                 {
00230                     scrollPresenter.MinZoomFactor = double.PositiveInfinity;
00231                 }
00232                 catch (Exception e)
00233                 {
00234                     Log.Comment("Exception thrown: {0}", e.ToString());
00235                 }
00236                 Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
00237             });
00238         }
00239
00240         [TestMethod]
00241         [TestProperty("Description", "Attempts to set invalid ScrollPresenter.MaxZoomFactor values.")]
00242         public void SetInvalidMaxZoomFactorValues()
00243         {
00244             RunOnUIThread.Execute(() =>
00245             {
00246                 ScrollPresenter scrollPresenter = new ScrollPresenter();
00247
00248                 Log.Comment("Attempting to set ScrollPresenter.MaxZoomFactor to double.NaN");
00249                 try
00250                 {
00251                     scrollPresenter.MaxZoomFactor = double.NaN;
00252                 }
00253                 catch (Exception e)
00254                 {
00255                     Log.Comment("Exception thrown: {0}", e.ToString());
00256                 }
00257                 Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
00258
00259                 Log.Comment("Attempting to set ScrollPresenter.MaxZoomFactor to double.NegativeInfinity");
00260                 try
00261                 {
00262                     scrollPresenter.MaxZoomFactor = double.NegativeInfinity;
00263                 }
00264                 catch (Exception e)
00265                 {
00266                     Log.Comment("Exception thrown: {0}", e.ToString());
00267                 }
00268                 Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
00269
00270                 Log.Comment("Attempting to set ScrollPresenter.MaxZoomFactor to double.PositiveInfinity");
00271                 try
00272                 {
00273                     scrollPresenter.MaxZoomFactor = double.PositiveInfinity;
00274                 }
00275                 catch (Exception e)
00276                 {
00277                     Log.Comment("Exception thrown: {0}", e.ToString());
00278                 }
00279                 Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
00280             });
00281         }
00282
00283         [TestMethod]
00284         [TestProperty("Description", "Verifies the InteractionTracker's VisualInteractionSource properties get set according to ScrollPresenter properties.")]
00285         public void VerifyInteractionSourceSettings()
00286         {
00287             using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
00288                 enableAnchorNotifications: false,
00289                 enableInteractionSourcesNotifications: true,
00290                 enableExpressionAnimationStatusNotifications : false))
00291             {
00292                 ScrollPresenter scrollPresenter = null;
00293                 Rectangle rectangleScrollPresenterContent = null;
00294                 AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00295
00296                 RunOnUIThread.Execute(() =>
00297                 {
00298                     rectangleScrollPresenterContent = new Rectangle();
00299                     scrollPresenter = new ScrollPresenter();
00300
00301                     SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00302                 });
00303
00304                 WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00305
00306                 RunOnUIThread.Execute(() =>
00307                 {
00308                     CompositionInteractionSourceCollection interactionSources = scrollPresenterTestHooksHelper.GetInteractionSources(scrollPresenter);
00309                     Verify.IsNotNull(interactionSources);
00310                     ScrollPresenterTestHooksHelper.LogInteractionSources(interactionSources);
00311                     Verify.AreEqual(1, interactionSources.Count);
00312                     IEnumerator<ICompositionInteractionSource> sourcesEnumerator = (interactionSources as IEnumerable<ICompositionInteractionSource>).GetEnumerator();
00313                     sourcesEnumerator.MoveNext();
00314                     VisualInteractionSource visualInteractionSource = sourcesEnumerator.Current as VisualInteractionSource;
00315                     Verify.IsNotNull(visualInteractionSource);
00316
00317                     Verify.AreEqual(VisualInteractionSourceRedirectionMode.CapableTouchpadAndPointerWheel, visualInteractionSource.ManipulationRedirectionMode);
00318                     Verify.IsTrue(visualInteractionSource.IsPositionXRailsEnabled);
00319                     Verify.IsTrue(visualInteractionSource.IsPositionYRailsEnabled);
00320                     Verify.AreEqual(InteractionChainingMode.Auto, visualInteractionSource.PositionXChainingMode);
00321                     Verify.AreEqual(InteractionChainingMode.Auto, visualInteractionSource.PositionYChainingMode);
00322                     Verify.AreEqual(InteractionChainingMode.Auto, visualInteractionSource.ScaleChainingMode);
00323                     Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.PositionXSourceMode);
00324                     Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.PositionYSourceMode);
00325                     Verify.AreEqual(InteractionSourceMode.Disabled, visualInteractionSource.ScaleSourceMode);
00326                     Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionXSourceMode);
00327                     Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionYSourceMode);
00328                     Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.ScaleSourceMode);
00329
00330                     Log.Comment("Changing ScrollPresenter properties that affect the primary VisualInteractionSource");
00331                     scrollPresenter.HorizontalScrollChainMode = ScrollingChainMode.Always;
00332                     scrollPresenter.VerticalScrollChainMode = ScrollingChainMode.Never;
00333                     scrollPresenter.HorizontalScrollRailMode = ScrollingRailMode.Disabled;
00334                     scrollPresenter.VerticalScrollRailMode = ScrollingRailMode.Disabled;
00335                     scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Enabled;
00336                     scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Disabled;
00337                     scrollPresenter.ZoomChainMode = ScrollingChainMode.Never;
00338                     scrollPresenter.ZoomMode = ScrollingZoomMode.Enabled;
00339                     scrollPresenter.IgnoredInputKinds = ScrollingInputKinds.All & ~ScrollingInputKinds.Touch;
00340                 });
00341
00342                 IdleSynchronizer.Wait();
00343
00344                 RunOnUIThread.Execute(() =>
00345                 {
00346                     CompositionInteractionSourceCollection interactionSources = scrollPresenterTestHooksHelper.GetInteractionSources(scrollPresenter);
00347                     Verify.IsNotNull(interactionSources);
00348                     ScrollPresenterTestHooksHelper.LogInteractionSources(interactionSources);
00349                     Verify.AreEqual(1, interactionSources.Count);
00350                     IEnumerator<ICompositionInteractionSource> sourcesEnumerator = (interactionSources as IEnumerable<ICompositionInteractionSource>).GetEnumerator();
00351                     sourcesEnumerator.MoveNext();
00352                     VisualInteractionSource visualInteractionSource = sourcesEnumerator.Current as VisualInteractionSource;
00353                     Verify.IsNotNull(visualInteractionSource);
00354
00355                     Verify.AreEqual(VisualInteractionSourceRedirectionMode.CapableTouchpadOnly, visualInteractionSource.ManipulationRedirectionMode);
00356                     Verify.IsFalse(visualInteractionSource.IsPositionXRailsEnabled);
00357                     Verify.IsFalse(visualInteractionSource.IsPositionYRailsEnabled);
00358                     Verify.AreEqual(InteractionChainingMode.Always, visualInteractionSource.PositionXChainingMode);
00359                     Verify.AreEqual(InteractionChainingMode.Never, visualInteractionSource.PositionYChainingMode);
00360                     Verify.AreEqual(InteractionChainingMode.Never, visualInteractionSource.ScaleChainingMode);
00361                     Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.PositionXSourceMode);
00362                     Verify.AreEqual(InteractionSourceMode.Disabled, visualInteractionSource.PositionYSourceMode);
00363                     Verify.AreEqual(InteractionSourceMode.EnabledWithInertia, visualInteractionSource.ScaleSourceMode);
00364                     Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionXSourceMode);
00365                     Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.PositionYSourceMode);
00366                     Verify.AreEqual(InteractionSourceRedirectionMode.Enabled, visualInteractionSource.PointerWheelConfig.ScaleSourceMode);
00367                 });
00368             }
00369         }
00370
00371         //[TestMethod] Bug 19277312: MUX Scroller tests fail on RS5_Release
00372         [TestProperty("Description", "Decreases the ScrollPresenter.MaxZoomFactor property and verifies the ScrollPresenter.ZoomFactor value decreases accordingly. Verifies the impact on the ScrollPresenter.Content Visual.")]
00373         public void PinchContentThroughMaxZoomFactor()
00374         {
00375             const double newMaxZoomFactor = 0.5;
00376             ScrollPresenter scrollPresenter = null;
00377             Rectangle rectangleScrollPresenterContent = null;
00378             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00379             Compositor compositor = null;
00380
00381             RunOnUIThread.Execute(() =>
00382             {
00383                 rectangleScrollPresenterContent = new Rectangle();
00384                 scrollPresenter = new ScrollPresenter();
00385
00386                 SetupDefaultUI(
00387                     scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00388                 compositor = CompositionTarget.GetCompositorForCurrentThread();
00389             });
00390
00391             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00392
00393             RunOnUIThread.Execute(() =>
00394             {
00395                 Verify.IsTrue(newMaxZoomFactor < c_defaultZoomFactor);
00396                 Verify.IsTrue(newMaxZoomFactor < c_defaultMaxZoomFactor);
00397                 Verify.IsTrue(newMaxZoomFactor > c_defaultMinZoomFactor);
00398                 scrollPresenter.MaxZoomFactor = newMaxZoomFactor;
00399             });
00400
00401             IdleSynchronizer.Wait();
00402
00403             RunOnUIThread.Execute(() =>
00404             {
00405                 Log.Comment("Setting up spy on translation and scale facades");
00406
00407                 CompositionPropertySpy.StartSpyingTranslationFacade(rectangleScrollPresenterContent, compositor, Vector3.Zero);
00408                 CompositionPropertySpy.StartSpyingScaleFacade(rectangleScrollPresenterContent, compositor, Vector3.One);
00409             });
00410
00411             Log.Comment("Waiting for spied properties to be captured");
00412             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00413
00414             RunOnUIThread.Execute(() =>
00415             {
00416                 CompositionPropertySpy.StopSpyingTranslationFacade(rectangleScrollPresenterContent);
00417                 CompositionPropertySpy.StopSpyingScaleFacade(rectangleScrollPresenterContent);
00418             });
00419
00420             Log.Comment("Waiting for captured properties to be updated");
00421             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00422
00423             RunOnUIThread.Execute(() =>
00424             {
00425                 Verify.AreEqual(c_defaultMinZoomFactor, scrollPresenter.MinZoomFactor);
00426                 Verify.AreEqual(newMaxZoomFactor, scrollPresenter.ZoomFactor);
00427                 Verify.AreEqual(newMaxZoomFactor, scrollPresenter.MaxZoomFactor);
00428             });
00429
00430             Log.Comment("Validating final transform of ScrollPresenter.Content's Visual after MaxZoomFactor change");
00431             CompositionGetValueStatus status;
00432
00433             RunOnUIThread.Execute(() =>
00434             {
00435                 Vector3 translation;
00436                 status = CompositionPropertySpy.TryGetTranslationFacade(rectangleScrollPresenterContent, out translation);
00437                 Log.Comment("status={0}, horizontal offset={1}", status, translation.X);
00438                 Log.Comment("status={0}, vertical offset={1}", status, translation.Y);
00439                 Verify.AreEqual(c_defaultHorizontalOffset, translation.X);
00440                 Verify.AreEqual(c_defaultVerticalOffset, translation.Y);
00441
00442                 Vector3 scale;
00443                 status = CompositionPropertySpy.TryGetScaleFacade(rectangleScrollPresenterContent, out scale);
00444                 Log.Comment("status={0}, vertical offset={1}", status, scale.X);
00445                 Verify.AreEqual(newMaxZoomFactor, scale.X);
00446             });
00447         }
00448
00449         // [TestMethod] Bug 19277312: MUX Scroller tests fail on RS5_Release
00450         [TestProperty("Description", "Increases the ScrollPresenter.MinZoomFactor property and verifies the ScrollPresenter.ZoomFactor value increases accordingly. Verifies the impact on the ScrollPresenter.Content Visual.")]
00451         public void StretchContentThroughMinZoomFactor()
00452         {
00453             const double newMinZoomFactor = 2.0;
00454             ScrollPresenter scrollPresenter = null;
00455             Rectangle rectangleScrollPresenterContent = null;
00456             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00457             Compositor compositor = null;
00458
00459             RunOnUIThread.Execute(() =>
00460             {
00461                 rectangleScrollPresenterContent = new Rectangle();
00462                 scrollPresenter = new ScrollPresenter();
00463
00464                 SetupDefaultUI(
00465                     scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00466                 compositor = CompositionTarget.GetCompositorForCurrentThread();
00467             });
00468
00469             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00470
00471             RunOnUIThread.Execute(() =>
00472             {
00473                 Verify.IsTrue(newMinZoomFactor > c_defaultZoomFactor);
00474                 Verify.IsTrue(newMinZoomFactor > c_defaultMinZoomFactor);
00475                 Verify.IsTrue(newMinZoomFactor < c_defaultMaxZoomFactor);
00476                 scrollPresenter.MinZoomFactor = newMinZoomFactor;
00477             });
00478
00479             IdleSynchronizer.Wait();
00480
00481             RunOnUIThread.Execute(() =>
00482             {
00483                 Log.Comment("Setting up spy on translation and scale facades");
00484
00485                 CompositionPropertySpy.StartSpyingTranslationFacade(rectangleScrollPresenterContent, compositor, Vector3.Zero);
00486                 CompositionPropertySpy.StartSpyingScaleFacade(rectangleScrollPresenterContent, compositor, Vector3.One);
00487             });
00488
00489             Log.Comment("Waiting for spied properties to be captured");
00490             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00491             Log.Comment("Cancelling spying");
00492
00493             RunOnUIThread.Execute(() =>
00494             {
00495                 CompositionPropertySpy.StopSpyingTranslationFacade(rectangleScrollPresenterContent);
00496                 CompositionPropertySpy.StopSpyingScaleFacade(rectangleScrollPresenterContent);
00497             });
00498
00499             Log.Comment("Waiting for captured properties to be updated");
00500             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00501
00502             RunOnUIThread.Execute(() =>
00503             {
00504                 Verify.AreEqual(newMinZoomFactor, scrollPresenter.MinZoomFactor);
00505                 Verify.AreEqual(newMinZoomFactor, scrollPresenter.ZoomFactor);
00506                 Verify.AreEqual(c_defaultMaxZoomFactor, scrollPresenter.MaxZoomFactor);
00507             });
00508
00509             Log.Comment("Validating final transform of ScrollPresenter.Content's Visual after MinZoomFactor change");
00510             CompositionGetValueStatus status;
00511
00512             RunOnUIThread.Execute(() =>
00513             {
00514                 Vector3 translation;
00515                 status = CompositionPropertySpy.TryGetTranslationFacade(rectangleScrollPresenterContent, out translation);
00516                 Log.Comment("status={0}, horizontal offset={1}", status, translation.X);
00517                 Log.Comment("status={0}, vertical offset={1}", status, translation.Y);
00518                 Verify.AreEqual(c_defaultHorizontalOffset, translation.X);
00519                 Verify.AreEqual(c_defaultVerticalOffset, translation.Y);
00520
00521                 Vector3 scale;
00522                 status = CompositionPropertySpy.TryGetScaleFacade(rectangleScrollPresenterContent, out scale);
00523                 Log.Comment("status={0}, vertical offset={1}", status, scale.X);
00524                 Verify.AreEqual(newMinZoomFactor, scale.X);
00525             });
00526         }
00527
00528         [TestMethod]
00529         [TestProperty("Description", "Reads the properties exposed by the ScrollPresenter.ExpressionAnimationSources CompositionPropertySet.")]
00530         public void ReadExpressionAnimationSources()
00531         {
00532             ScrollPresenter scrollPresenter = null;
00533             Rectangle rectangleScrollPresenterContent = null;
00534             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00535
00536             RunOnUIThread.Execute(() =>
00537             {
00538                 rectangleScrollPresenterContent = new Rectangle();
00539                 scrollPresenter = new ScrollPresenter();
00540
00541                 SetupDefaultUI(
00542                     scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00543             });
00544
00545             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00546
00547             RunOnUIThread.Execute(() =>
00548             {
00549                 Log.Comment("Setting up spy property set");
00550                 CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesOffsetPropertyName, Vector2.Zero);
00551                 CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesPositionPropertyName, Vector2.Zero);
00552                 CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMinPositionPropertyName, Vector2.Zero);
00553                 CompositionPropertySpy.StartSpyingVector2Property(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMaxPositionPropertyName, Vector2.Zero);
00554                 CompositionPropertySpy.StartSpyingScalarProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesZoomFactorPropertyName, 1.0f);
00555             });
00556
00557             Log.Comment("Jumping to absolute zoomFactor");
00558             ZoomTo(scrollPresenter, 2.0f, 100.0f, 200.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00559
00560             Log.Comment("Waiting for spied properties to be captured");
00561             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00562
00563             RunOnUIThread.Execute(() =>
00564             {
00565                 Log.Comment("Cancelling spying");
00566                 CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesOffsetPropertyName);
00567                 CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesPositionPropertyName);
00568                 CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMinPositionPropertyName);
00569                 CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMaxPositionPropertyName);
00570                 CompositionPropertySpy.StopSpyingProperty(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesZoomFactorPropertyName);
00571             });
00572
00573             Log.Comment("Waiting for captured properties to be updated");
00574             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00575
00576             RunOnUIThread.Execute(() =>
00577             {
00578                 Log.Comment("Validating final property values of ScrollPresenter.ExpressionAnimationSources");
00579                 CompositionGetValueStatus status;
00580                 float zoomFactor;
00581                 Vector2 offset;
00582                 Vector2 position;
00583                 Vector2 minPosition;
00584                 Vector2 maxPosition;
00585                 Vector2 extent;
00586                 Vector2 viewport;
00587
00588                 Log.Comment("Validating final zoomFactor");
00589                 status = CompositionPropertySpy.TryGetScalar(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesZoomFactorPropertyName, out zoomFactor);
00590                 Log.Comment("status={0}, zoomFactor={1}", status, zoomFactor);
00591                 Verify.AreEqual(2.0f, zoomFactor);
00592
00593                 Log.Comment("Validating final offset");
00594                 status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesOffsetPropertyName, out offset);
00595                 Log.Comment("status={0}, offset={1}", status, offset);
00596                 Verify.AreEqual(0.0f, offset.X);
00597                 Verify.AreEqual(0.0f, offset.Y);
00598
00599                 Log.Comment("Validating final position");
00600                 status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesPositionPropertyName, out position);
00601                 Log.Comment("status={0}, position={1}", status, position);
00602                 Verify.AreEqual(100.0f, position.X);
00603                 Verify.AreEqual(200.0f, position.Y);
00604
00605                 Log.Comment("Validating final minPosition");
00606                 status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMinPositionPropertyName, out minPosition);
00607                 Log.Comment("status={0}, minPosition={1}", status, minPosition);
00608                 Verify.AreEqual(0.0f, minPosition.X);
00609                 Verify.AreEqual(0.0f, minPosition.Y);
00610
00611                 Log.Comment("Validating final maxPosition");
00612                 status = CompositionPropertySpy.TryGetVector2(scrollPresenter.ExpressionAnimationSources, c_expressionAnimationSourcesMaxPositionPropertyName, out maxPosition);
00613                 Log.Comment("status={0}, maxPosition={1}", status, maxPosition);
00614                 Verify.AreEqual(2100.0f, maxPosition.X);
00615                 Verify.AreEqual(1000.0f, maxPosition.Y);
00616
00617                 Log.Comment("Validating final extent");
00618                 status = scrollPresenter.ExpressionAnimationSources.TryGetVector2(c_expressionAnimationSourcesExtentPropertyName, out extent);
00619                 Log.Comment("status={0}, extent={1}", status, extent);
00620                 Verify.AreEqual(c_defaultUIScrollPresenterContentWidth, extent.X);
00621                 Verify.AreEqual(c_defaultUIScrollPresenterContentHeight, extent.Y);
00622
00623                 Log.Comment("Validating final viewport");
00624                 status = scrollPresenter.ExpressionAnimationSources.TryGetVector2(c_expressionAnimationSourcesViewportPropertyName, out viewport);
00625                 Log.Comment("status={0}, viewport={1}", status, viewport);
00626                 Verify.AreEqual(c_defaultUIScrollPresenterWidth, viewport.X);
00627                 Verify.AreEqual(c_defaultUIScrollPresenterHeight, viewport.Y);
00628             });
00629         }
00630
00631         // See \dxaml\xcp\dxaml\lib\FocusManager.cpp, line 433. FocusManagerFactory::FindNextFocusableElementImpl returns error E_UNEXPECTED, 'This API is not yet supported in WinUI desktop.'
00632         [TestMethod]
00633         [TestProperty("Ignore", "True")] // Disabled until FocusManager supports FindNextFocusableElement in WinUI3.
00634         public void ValidateXYFocusNavigation()
00635         {
00636             RunOnUIThread.Execute(() =>
00637             {
00638                 var rootPanel = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
00639                     @"<Grid Width='600' Height='600'
00640                         xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00641                         xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00642                         xmlns:controlsPrimitives='using:Microsoft.UI.Xaml.Controls.Primitives'>
00643                         <Button Content='Outer Left Button' HorizontalAlignment='Left' VerticalAlignment='Center' />
00644                         <Button Content='Outer Top Button' HorizontalAlignment='Center' VerticalAlignment='Top' />
00645                         <Button Content='Outer Right Button' HorizontalAlignment='Right' VerticalAlignment='Center' />
00646                         <Button Content='Outer Bottom Button' HorizontalAlignment='Center' VerticalAlignment='Bottom' />
00647
00648                         <controlsPrimitives:ScrollPresenter x:Name='scrollPresenter' Width='200' Height='200' HorizontalAlignment='Center' VerticalAlignment='Center'>
00649                             <Grid Width='600' Height='600' Background='Gray'>
00650
00651                                 <!-- Inner buttons are larger than the outer so that they get ranked better by the XY focus algorithm. -->
00652                                 <Button Content='Inner Left Button' HorizontalAlignment='Left' VerticalAlignment='Center'  Width='180' Height='180' />
00653                                 <Button Content='Inner Top Button' HorizontalAlignment='Center' VerticalAlignment='Top' Width='180' Height='180' />
00654                                 <Button Content='Inner Right Button' HorizontalAlignment='Right' VerticalAlignment='Center' Width='180' Height='180' />
00655                                 <Button Content='Inner Bottom Button' HorizontalAlignment='Center' VerticalAlignment='Bottom' Width='180' Height='180' />
00656
00657                                 <Button x:Name='innerCenterButton' Content='Inner Center Button' HorizontalAlignment='Center' VerticalAlignment='Center' />
00658                             </Grid>
00659                         </controlsPrimitives:ScrollPresenter>
00660                     </Grid>"));
00661
00662                 var innerCenterButton = (Button)rootPanel.FindName("innerCenterButton");
00663                 Content = rootPanel;
00664                 Content.UpdateLayout();
00665
00666                 Log.Comment("Ensure inner center button has keyboard focus.");
00667                 innerCenterButton.Focus(FocusState.Keyboard);
00668                 Verify.AreEqual(innerCenterButton, FocusManager.GetFocusedElement(rootPanel.XamlRoot));
00669
00670                 Verify.AreEqual("Inner Right Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Right)).Content);
00671                 Verify.AreEqual("Inner Left Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Left)).Content);
00672                 Verify.AreEqual("Inner Top Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Up)).Content);
00673                 Verify.AreEqual("Inner Bottom Button", ((Button)FocusManager.FindNextFocusableElement(FocusNavigationDirection.Down)).Content);
00674             });
00675         }
00676
00677         [TestMethod]
00678         [TestProperty("Description", "Listens to the ScrollPresenter.Content.EffectiveViewportChanged event and expects it to be raised while changing offsets.")]
00679         public void ListenToContentEffectiveViewportChanged()
00680         {
00681             ScrollPresenter scrollPresenter = null;
00682             Rectangle rectangleScrollPresenterContent = null;
00683             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00684             int effectiveViewportChangedCount = 0;
00685
00686             RunOnUIThread.Execute(() =>
00687             {
00688                 rectangleScrollPresenterContent = new Rectangle();
00689                 scrollPresenter = new ScrollPresenter();
00690
00691                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00692
00693                 rectangleScrollPresenterContent.EffectiveViewportChanged += (FrameworkElement sender, EffectiveViewportChangedEventArgs args) =>
00694                 {
00695                     Log.Comment("ScrollPresenter.Content.EffectiveViewportChanged: BringIntoViewDistance=" +
00696                         args.BringIntoViewDistanceX + "," + args.BringIntoViewDistanceY + ", EffectiveViewport=" +
00697                         args.EffectiveViewport.ToString() + ", MaxViewport=" + args.MaxViewport.ToString());
00698                     effectiveViewportChangedCount++;
00699                 };
00700             });
00701
00702             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00703
00704             ScrollTo(
00705                 scrollPresenter,
00706                 horizontalOffset: 250,
00707                 verticalOffset: 150,
00708                 animationMode: ScrollingAnimationMode.Enabled,
00709                 snapPointsMode: ScrollingSnapPointsMode.Ignore,
00710                 hookViewChangingAndChanged: false);
00711
00712             RunOnUIThread.Execute(() =>
00713             {
00714                 Log.Comment("Expect multiple EffectiveViewportChanged occurrences during the animated offsets change.");
00715                 Verify.IsGreaterThanOrEqual(effectiveViewportChangedCount, 1);
00716             });
00717         }
00718
00719         private void SetupDefaultUI(
00720             ScrollPresenter scrollPresenter,
00721             Rectangle rectangleScrollPresenterContent,
00722             AutoResetEvent scrollPresenterLoadedEvent,
00723             bool setAsContentRoot = true)
00724         {
00725             Log.Comment("Setting up default UI with ScrollPresenter" + (rectangleScrollPresenterContent == null ? "" : " and Rectangle"));
00726
00727             if (rectangleScrollPresenterContent != null)
00728             {
00729                 LinearGradientBrush twoColorLGB = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };
00730
00731                 GradientStop brownGS = new GradientStop() { Color = Microsoft.UI.Colors.Brown, Offset = 0.0 };
00732                 twoColorLGB.GradientStops.Add(brownGS);
00733
00734                 GradientStop orangeGS = new GradientStop() { Color = Microsoft.UI.Colors.Orange, Offset = 1.0 };
00735                 twoColorLGB.GradientStops.Add(orangeGS);
00736
00737                 rectangleScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth;
00738                 rectangleScrollPresenterContent.Height = c_defaultUIScrollPresenterContentHeight;
00739                 rectangleScrollPresenterContent.Fill = twoColorLGB;
00740             }
00741
00742             Verify.IsNotNull(scrollPresenter);
00743             scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
00744             scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
00745             if (rectangleScrollPresenterContent != null)
00746             {
00747                 scrollPresenter.Content = rectangleScrollPresenterContent;
00748             }
00749
00750             if (scrollPresenterLoadedEvent != null)
00751             {
00752                 scrollPresenter.Loaded += (object sender, RoutedEventArgs e) =>
00753                 {
00754                     Log.Comment("ScrollPresenter.Loaded event handler");
00755                     scrollPresenterLoadedEvent.Set();
00756                 };
00757             }
00758
00759             if (setAsContentRoot)
00760             {
00761                 Log.Comment("Setting window content");
00762                 Content = scrollPresenter;
00763             }
00764         }
00765
00766         private void SpyTranslationAndScale(ScrollPresenter scrollPresenter, Compositor compositor, out float horizontalOffset, out float verticalOffset, out float zoomFactor)
00767         {
00768             float horizontalOffsetTmp = 0.0f;
00769             float verticalOffsetTmp = 0.0f;
00770             float zoomFactorTmp = 1.0f;
00771
00772             horizontalOffset = verticalOffset = 0.0f;
00773             zoomFactor = 0.0f;
00774
00775             RunOnUIThread.Execute(() =>
00776             {
00777                 Verify.IsNotNull(scrollPresenter);
00778                 Verify.IsNotNull(scrollPresenter.Content);
00779
00780                 Log.Comment("Setting up spying on facades");
00781
00782                 CompositionPropertySpy.StartSpyingTranslationFacade(scrollPresenter.Content, compositor, Vector3.Zero);
00783                 CompositionPropertySpy.StartSpyingScaleFacade(scrollPresenter.Content, compositor, Vector3.One);
00784             });
00785
00786             Log.Comment("Waiting for spied properties to be captured");
00787             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00788
00789             Log.Comment("Cancelling spying");
00790
00791             RunOnUIThread.Execute(() =>
00792             {
00793                 CompositionPropertySpy.StopSpyingTranslationFacade(scrollPresenter.Content);
00794                 CompositionPropertySpy.StopSpyingScaleFacade(scrollPresenter.Content);
00795             });
00796
00797             Log.Comment("Waiting for captured properties to be updated");
00798             CompositionPropertySpy.SynchronouslyTickUIThread(10);
00799
00800             Log.Comment("Reading ScrollPresenter.Content's Visual Transform");
00801             CompositionGetValueStatus status;
00802
00803             RunOnUIThread.Execute(() =>
00804             {
00805                 Vector3 translation = Vector3.Zero;
00806                 status = CompositionPropertySpy.TryGetTranslationFacade(scrollPresenter.Content, out translation);
00807                 Log.Comment("status={0}, horizontal offset={1}", status, translation.X);
00808                 Log.Comment("status={0}, vertical offset={1}", status, translation.Y);
00809                 horizontalOffsetTmp = translation.X;
00810                 verticalOffsetTmp = translation.Y;
00811
00812                 Vector3 scale = Vector3.One;
00813                 status = CompositionPropertySpy.TryGetScaleFacade(scrollPresenter.Content, out scale);
00814                 Log.Comment("status={0}, zoomFactor={1}", status, zoomFactorTmp);
00815                 zoomFactorTmp = scale.X;
00816             });
00817
00818             horizontalOffset = horizontalOffsetTmp;
00819             verticalOffset = verticalOffsetTmp;
00820             zoomFactor = zoomFactorTmp;
00821         }
00822     }
00823 }
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewListView.h Source File

  • File List
  • File Members
  • TabView

TabViewListView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "TabViewListView.g.h"
00006
00007 class TabViewListView :
00008     public ReferenceTracker<TabViewListView, winrt::implementation::TabViewListViewT>
00009 {
00010 public:
00011     TabViewListView();
00012
00013     // IItemsControlOverrides
00014     winrt::DependencyObject GetContainerForItemOverride();
00015     bool IsItemItsOwnContainerOverride(winrt::IInspectable const& item);
00016     void OnItemsChanged(winrt::IInspectable const& item);
00017     void PrepareContainerForItemOverride(const winrt::DependencyObject& element, const winrt::IInspectable& item);
00018
00019 private:
00020     void OnContainerContentChanging(const winrt::IInspectable& sender, const winrt::ContainerContentChangingEventArgs& args);
00021     void OnSelectedIndexPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00022     void UpdateBottomBorderVisualState();
00023 };
00024
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTests Member List

This is the complete list of members for NavigationViewTests, including all inherited members.
GetRepeater(DependencyObject parent) | NavigationViewTests | [inline, private, static]
ItemHasSelectionIndicator(NavigationView navView, string expectedContent) | NavigationViewTests | [inline, private, static]
SelectItem(NavigationView navView, object item, ManualResetEvent selectionChangedEvent=null) | NavigationViewTests | [inline, private, static]
SetupNavigationView(NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto) | NavigationViewTests | [inline, private]
SetupNavigationViewHierarchy(NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto) | NavigationViewTests | [inline, private]
SetupNavigationViewPaneContent(NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto) | NavigationViewTests | [inline, private]
SetupNavigationViewScrolling(NavigationViewPaneDisplayMode paneDisplayMode=NavigationViewPaneDisplayMode.Auto) | NavigationViewTests | [inline, private]
VerifyAutomationPeerExpandCollapsePatternBehavior() | NavigationViewTests | [inline]
VerifyClearingItemsCollectionDoesNotCrashWhenItemSelectedOnTopNav() | NavigationViewTests | [inline]
VerifyClosedCompactVisualState() | NavigationViewTests | [inline]
VerifyContainerIsNonNullWhenSelectingANewlyAddedItem() | NavigationViewTests | [inline]
VerifyDefaultsAndBasicSetting() | NavigationViewTests | [inline]
VerifyExpandCollapseChevronVisibility() | NavigationViewTests | [inline]
VerifyHeaderContentMargin(NavigationViewPaneDisplayMode paneDisplayMode, string verificationFileNamePrefix) | NavigationViewTests | [inline, private]
VerifyHeaderContentMarginOnMinimalNav() | NavigationViewTests | [inline]
VerifyHeaderContentMarginOnTopNav() | NavigationViewTests | [inline]
VerifyHierarchicalNavigationTopModeMenuItemsSourceDoesNotCrash() | NavigationViewTests | [inline]
VerifyMenuItemAndContainerMappingMenuItems() | NavigationViewTests | [inline]
VerifyMenuItemAndContainerMappingMenuItemsSource() | NavigationViewTests | [inline]
VerifyNavigationItemUIAType() | NavigationViewTests | [inline]
VerifyNavigationViewItemInFooterDoesNotCrash() | NavigationViewTests | [inline]
VerifyNavigationViewItemToolTipCreation() | NavigationViewTests | [inline]
VerifyNavigationViewItemToolTipPaneDisplayMode() | NavigationViewTests | [inline]
VerifyNVIOutlivingNVDoesNotCrash() | NavigationViewTests | [inline]
VerifyOverflowButtonToolTip() | NavigationViewTests | [inline]
VerifyPaneDisplayModeAndDisplayModeMapping() | NavigationViewTests | [inline]
VerifyPaneDisplayModeAndIsPaneOpenInterplayOnNavViewLaunch() | NavigationViewTests | [inline]
VerifyPaneDisplayModeChangingPaneAccordingly() | NavigationViewTests | [inline]
VerifyPaneProperties() | NavigationViewTests | [inline]
VerifySelectedItemIsNullWhenNoItemIsSelected() | NavigationViewTests | [inline]
VerifySelectingACollapsedItemShowsSelectionIndicator() | NavigationViewTests | [inline]
VerifySelectingANewItemAfterExpandingShowsSelectionIndicatorInTheCorrectLocation() | NavigationViewTests | [inline]
VerifySettingsItemTag() | NavigationViewTests | [inline]
VerifySettingsItemToolTip() | NavigationViewTests | [inline]
VerifySingleSelection() | NavigationViewTests | [inline]
VerifyValuesCoercion() | NavigationViewTests | [inline]
VerifyVisualTree() | NavigationViewTests | [inline]
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarFlyoutItemAutomationPeer.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarFlyoutItemAutomationPeer.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarFlyoutItemAutomationPeer.g.h"
00011
00012 class InkToolBarFlyoutItemAutomationPeer :
00013     public ReferenceTracker<InkToolBarFlyoutItemAutomationPeer, winrt::implementation::InkToolBarFlyoutItemAutomationPeerT>
00014 {
00015 public:
00016     InkToolBarFlyoutItemAutomationPeer(winrt::InkToolBarFlyoutItem owner) {};
00017 };
00018
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewPageDataContext Member List

This is the complete list of members for NavigationViewPageDataContext, including all inherited members.
_pages | NavigationViewPageDataContext | [private]
GetNavViewActiveVisualStates_Click(object sender, RoutedEventArgs e) | NavigationViewPageDataContext | [inline, private]
NavigationView_ItemInvoked(NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs args) | NavigationViewPageDataContext | [inline, private]
NavigationViewPageDataContext() | NavigationViewPageDataContext | [inline]
NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) | NavigationViewPageDataContext | [inline, private]
NotifyPropertyChanged([CallerMemberName] string propertyName=null) | NavigationViewPageDataContext | [inline, private]
Pages | NavigationViewPageDataContext |
PropertyChanged | NavigationViewPageDataContext |
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemBaseRevokers Member List

This is the complete list of members for NavigationViewItemBaseRevokers, including all inherited members.
RevokeAll() NavigationViewItemBaseRevokers [inline]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/Expander.cpp Source File

  • File List
  • File Members
  • Expander

Expander.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Expander.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009 #include "ExpanderAutomationPeer.h"
00010 #include "Utils.h"
00011 #include "winnls.h"
00012
00013 static constexpr auto c_expanderHeader = L"ExpanderHeader"sv;
00014 static constexpr auto c_expanderContent = L"ExpanderContent"sv;
00015 static constexpr auto c_expanderContentClip = L"ExpanderContentClip"sv;
00016
00017 Expander::Expander()
00018 {
00019     __RP_Marker_ClassById(RuntimeProfiler::ProfId_Expander);
00020
00021     SetDefaultStyleKey(this);
00022
00023     SetValue(s_TemplateSettingsProperty, winrt::make<::ExpanderTemplateSettings>());
00024 }
00025
00026 winrt::AutomationPeer Expander::OnCreateAutomationPeer()
00027 {
00028     return winrt::make<ExpanderAutomationPeer>(*this);
00029 }
00030
00031 void Expander::OnApplyTemplate()
00032 {
00033     winrt::IControlProtected controlProtected{ *this };
00034
00035     if (auto toggleButton = GetTemplateChildT<winrt::Control>(c_expanderHeader, *this))
00036     {
00037         // We will do 2 things with the toggle button's peer:
00038         // 1. Set the events source of the toggle button peer to
00039         // the expander's automation peer. This is is because we
00040         // don't want to announce the toggle button's on/off property
00041         // changes, but the expander's expander/collapse property changes
00042         // (or on the events source that's set, if it's set) and
00043         //
00044         // 2. Set the expander's automation properties name to the
00045         // toggleButton's in case the expander doesn't have one. This just follows
00046         // what WPF does.
00047         if (winrt::AutomationPeer toggleButtonPeer = winrt::FrameworkElementAutomationPeer::FromElement(toggleButton))
00048         {
00049             // 1. Set the events source of the toggle button peer to the expander's.
00050             if (winrt::AutomationPeer expanderPeer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00051             {
00052                 auto expanderEventsSource = expanderPeer.EventsSource() != nullptr ?
00053                     expanderPeer.EventsSource() :
00054                     expanderPeer;
00055                 toggleButtonPeer.EventsSource(expanderEventsSource);
00056             }
00057
00058             // 2. If the expander doesn't have any AutomationProperties.Name set,
00059             // we will try setting one based on the header. This is how
00060             // WPF's expanders work.
00061             if (winrt::AutomationProperties::GetName(*this).empty()
00062                 && !toggleButtonPeer.GetNameCore().empty())
00063             {
00064                 winrt::AutomationProperties::SetName(*this, toggleButtonPeer.GetNameCore());
00065             }
00066         }
00067     }
00068
00069     if (auto expanderContentClip = GetTemplateChildT<winrt::Border>(c_expanderContentClip, *this))
00070     {
00071         auto visual = winrt::ElementCompositionPreview::GetElementVisual(expanderContentClip);
00072         visual.Clip(visual.Compositor().CreateInsetClip());
00073     }
00074
00075     if (auto expanderContent = GetTemplateChildT<winrt::Border>(c_expanderContent, *this))
00076     {
00077         m_expanderContentSizeChangedRevoker = expanderContent.SizeChanged(winrt::auto_revoke, { this, &Expander::OnContentSizeChanged });
00078     }
00079
00080     UpdateExpandState(false);
00081     UpdateExpandDirection(false);
00082 }
00083
00084 void Expander::OnContentSizeChanged(const winrt::IInspectable&, const winrt::SizeChangedEventArgs& args)
00085 {
00086     const auto templateSettings = winrt::get_self<::ExpanderTemplateSettings>(TemplateSettings());
00087
00088     auto const height = args.NewSize().Height;
00089     templateSettings->ContentHeight(height);
00090     templateSettings->NegativeContentHeight(-1 * static_cast<double>(height));
00091 }
00092
00093
00094 void Expander::RaiseExpandingEvent(const winrt::Expander& container)
00095 {
00096     m_expandingEventSource(*this, nullptr);
00097 }
00098
00099 void Expander::RaiseCollapsedEvent(const winrt::Expander& container)
00100 {
00101     m_collapsedEventSource(*this, nullptr);
00102 }
00103
00104 void Expander::OnIsExpandedPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00105 {
00106     const auto isExpanded = IsExpanded();
00107
00108     if (isExpanded)
00109     {
00110         RaiseExpandingEvent(*this);
00111     }
00112     else
00113     {
00114         // Available for a 'Collapsing' event
00115     }
00116
00117     UpdateExpandState(true);
00118
00119     if (isExpanded)
00120     {
00121         // Available for an 'Expanded' event
00122     }
00123     else
00124     {
00125         RaiseCollapsedEvent(*this);
00126     }
00127 }
00128
00129 void Expander::OnExpandDirectionPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
00130 {
00131     UpdateExpandDirection(true);
00132 }
00133
00134 void Expander::UpdateExpandDirection(bool useTransitions)
00135 {
00136     const auto direction = ExpandDirection();
00137     switch (direction)
00138     {
00139     case winrt::ExpandDirection::Down:
00140         winrt::VisualStateManager::GoToState(*this, L"Down", useTransitions);
00141         break;
00142     case winrt::ExpandDirection::Up:
00143         winrt::VisualStateManager::GoToState(*this, L"Up", useTransitions);
00144         break;
00145     }
00146 }
00147
00148 void Expander::UpdateExpandState(bool useTransitions)
00149 {
00150     const auto isExpanded = IsExpanded();
00151     const auto direction = ExpandDirection();
00152
00153     if (isExpanded)
00154     {
00155         if (direction == winrt::ExpandDirection::Down)
00156         {
00157             winrt::VisualStateManager::GoToState(*this, L"ExpandDown", useTransitions);
00158         }
00159         else
00160         {
00161             winrt::VisualStateManager::GoToState(*this, L"ExpandUp", useTransitions);
00162         }
00163     }
00164     else
00165     {
00166         if (direction == winrt::ExpandDirection::Down)
00167         {
00168             winrt::VisualStateManager::GoToState(*this, L"CollapseUp", useTransitions);
00169         }
00170         else
00171         {
00172             winrt::VisualStateManager::GoToState(*this, L"CollapseDown", useTransitions);
00173         }
00174     }
00175
00176     if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00177     {
00178         auto expanderPeer = peer.as<ExpanderAutomationPeer>();
00179         expanderPeer->RaiseExpandCollapseAutomationEvent(
00180             isExpanded ?
00181             winrt::ExpandCollapseState::Expanded :
00182             winrt::ExpandCollapseState::Collapsed
00183         );
00184     }
00185 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/SnapPoint.h Source File

  • File List
  • File Members
  • ScrollPresenter

SnapPoint.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SnapPointBase.g.h"
00007 #include "ScrollSnapPointBase.g.h"
00008 #include "ScrollSnapPoint.g.h"
00009 #include "RepeatedScrollSnapPoint.g.h"
00010 #include "ZoomSnapPointBase.g.h"
00011 #include "ZoomSnapPoint.g.h"
00012 #include "RepeatedZoomSnapPoint.g.h"
00013
00014 struct SnapPointSortPredicate
00015 {
00016     //Sorting of snap points goes as follows:
00017     //We first sort on the primary value which for repeated snap points are their actualStart values, and for irregular snap points their values.
00018     //We then sort by the secondary value which for repeated snap points are their actualEnd values, and for irregular snap points are again their values.
00019     //We then sort by the tertiary value which for repeated snap points is 1 and for irregular snap points is 0.
00020
00021     //Since repeated snap points' actualEnd is always greater than or equal to their actualStart the tertiary value is only used if these values are exactly equal
00022     //for a repeated snap point which also shares a primary (and subsequently secondary) value with an irregular snap point's value.
00023
00024     //The result of this sorting is irregular snap points will always be sorted before repeated snap points when ambiguity occurs.
00025     //This allows us to address some corner cases in a more elegant fashion.
00026     double primary;
00027     double secondary;
00028     short tertiary;
00029 };
00030
00031 class SnapPointBase :
00032     public ReferenceTracker<SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing>
00033 {
00034 public:
00035 #ifdef ApplicableRangeType
00036     double ApplicableRange();
00037     winrt::SnapPointApplicableRangeType ApplicableRangeType();
00038 #endif
00039
00040     //Internal
00041     bool operator< (const SnapPointBase* snapPoint);
00042     bool operator== (const SnapPointBase* snapPoint);
00043
00044     virtual winrt::ExpressionAnimation CreateRestingPointExpression(
00045         double ignoredValue,
00046         std::tuple<double, double> actualImpulseApplicableZone,
00047         winrt::InteractionTracker const& interactionTracker,
00048         winrt::hstring const& target,
00049         winrt::hstring const& scale,
00050         bool isInertiaFromImpulse) = 0;
00051     virtual winrt::ExpressionAnimation CreateConditionalExpression(
00052         std::tuple<double, double> actualApplicableZone,
00053         std::tuple<double, double> actualImpulseApplicableZone,
00054         winrt::InteractionTracker const& interactionTracker,
00055         winrt::hstring const& target,
00056         winrt::hstring const& scale,
00057         bool isInertiaFromImpulse) = 0;
00058     virtual void UpdateConditionalExpressionAnimationForImpulse(
00059         winrt::ExpressionAnimation const& conditionExpressionAnimation,
00060         std::tuple<double, double> actualImpulseApplicableZone) const = 0;
00061     virtual void UpdateRestingPointExpressionAnimationForImpulse(
00062         winrt::ExpressionAnimation const& restingValueExpressionAnimation,
00063         double ignoredValue,
00064         std::tuple<double, double> actualImpulseApplicableZone) const = 0;
00065     virtual SnapPointSortPredicate SortPredicate() const = 0;
00066     virtual std::tuple<double, double> DetermineActualApplicableZone(
00067         const SnapPointBase* previousSnapPoint,
00068         const SnapPointBase* nextSnapPoint) = 0;
00069     virtual std::tuple<double, double> DetermineActualImpulseApplicableZone(
00070         const SnapPointBase* previousSnapPoint,
00071         const SnapPointBase* nextSnapPoint,
00072         double currentIgnoredValue,
00073         double previousIgnoredValue,
00074         double nextIgnoredValue) = 0;
00075     virtual double Influence(double edgeOfMidpoint) const = 0;
00076     virtual double ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const = 0;
00077     virtual void Combine(
00078         int& combinationCount,
00079         winrt::SnapPointBase const& snapPoint) const = 0;
00080     virtual int SnapCount() const = 0;
00081     virtual double Evaluate(std::tuple<double, double> actualApplicableZone, double value) const = 0;
00082
00083     // Returns True when this snap point is sensitive to the viewport size and is interested in future updates.
00084     virtual bool OnUpdateViewport(double newViewport) = 0;
00085
00086 #ifdef DBG
00087     winrt::Color VisualizationColor();
00088     void VisualizationColor(winrt::Color color);
00089 #endif // DBG
00090
00091     bool SnapsAt(
00092         std::tuple<double, double> actualApplicableZone,
00093         double value) const;
00094     void SetBooleanParameter(
00095         winrt::ExpressionAnimation const& expressionAnimation,
00096         wstring_view const& booleanName,
00097         bool booleanValue) const;
00098     void SetScalarParameter(
00099         winrt::ExpressionAnimation const& expressionAnimation,
00100         wstring_view const& scalarName,
00101         float scalarValue) const;
00102
00103 protected:
00104     winrt::hstring GetTargetExpression(winrt::hstring const& target) const;
00105     winrt::hstring GetIsInertiaFromImpulseExpression(winrt::hstring const& target) const;
00106
00107     double m_specifiedApplicableRange{ INFINITY };
00108 #ifdef ApplicableRangeType
00109     // Only mandatory snap points are supported at this point.
00110     winrt::SnapPointApplicableRangeType m_applicableRangeType{ winrt::SnapPointApplicableRangeType::Mandatory };
00111 #endif
00112 #ifdef DBG
00113     winrt::Color m_visualizationColor{ winrt::Colors::Black() };
00114 #endif // DBG
00115
00116     // Maximum difference for snap points to be considered equal
00117     static constexpr double s_equalityEpsilon{ 0.00001 };
00118
00119     // Constants used in composition expressions
00120     static constexpr wstring_view s_snapPointValue{ L"snapPointValue"sv };
00121     static constexpr wstring_view s_minApplicableValue{ L"minAppValue"sv };
00122     static constexpr wstring_view s_maxApplicableValue{ L"maxAppValue"sv };
00123     static constexpr wstring_view s_minImpulseApplicableValue{ L"minImpAppValue"sv };
00124     static constexpr wstring_view s_maxImpulseApplicableValue{ L"maxImpAppValue"sv };
00125     static constexpr wstring_view s_interval{ L"V"sv };
00126     static constexpr wstring_view s_start{ L"S"sv };
00127     static constexpr wstring_view s_end{ L"E"sv };
00128     static constexpr wstring_view s_first{ L"P"sv };
00129     static constexpr wstring_view s_applicableRange{ L"aR"sv };
00130     static constexpr wstring_view s_impulseStart{ L"iS"sv };
00131     static constexpr wstring_view s_impulseEnd{ L"iE"sv };
00132     static constexpr wstring_view s_impulseIgnoredValue{ L"M"sv };
00133     static constexpr wstring_view s_interactionTracker{ L"T"sv };
00134 };
00135
00136 class ScrollSnapPointBase :
00137     public winrt::implementation::ScrollSnapPointBaseT<ScrollSnapPointBase, SnapPointBase>
00138 {
00139 public:
00140     winrt::ScrollSnapPointsAlignment Alignment();
00141
00142     bool OnUpdateViewport(double newViewport);
00143
00144 protected:
00145     // Needed as work around for Modern Idl inheritance bug
00146     ScrollSnapPointBase();
00147
00148     winrt::ScrollSnapPointsAlignment m_alignment{ winrt::ScrollSnapPointsAlignment::Near };
00149     double m_alignmentAdjustment{ 0.0 }; // Non-zero adjustment based on viewport size, when the alignment is Center or Far.
00150 };
00151
00152 class ScrollSnapPoint:
00153     public winrt::implementation::ScrollSnapPointT<ScrollSnapPoint, ScrollSnapPointBase>
00154 {
00155 public:
00156     ScrollSnapPoint(
00157         double snapPointValue,
00158         winrt::ScrollSnapPointsAlignment alignment = winrt::ScrollSnapPointsAlignment::Near);
00159
00160 #ifdef ApplicableRangeType
00161     ScrollSnapPoint(
00162         double snapPointValue,
00163         double applicableRange,
00164         winrt::ScrollSnapPointsAlignment alignment = winrt::ScrollSnapPointsAlignment::Near);
00165 #endif
00166
00167     double Value();
00168
00169     //Internal
00170     winrt::ExpressionAnimation CreateRestingPointExpression(
00171         double ignoredValue,
00172         std::tuple<double, double> actualImpulseApplicableZone,
00173         winrt::InteractionTracker const& interactionTracker,
00174         winrt::hstring const& target,
00175         winrt::hstring const& scale,
00176         bool isInertiaFromImpulse);
00177     winrt::ExpressionAnimation CreateConditionalExpression(
00178         std::tuple<double, double> actualApplicableZone,
00179         std::tuple<double, double> actualImpulseApplicableZone,
00180         winrt::InteractionTracker const& interactionTracker,
00181         winrt::hstring const& target,
00182         winrt::hstring const& scale,
00183         bool isInertiaFromImpulse);
00184     void UpdateConditionalExpressionAnimationForImpulse(
00185         winrt::ExpressionAnimation const& conditionExpressionAnimation,
00186         std::tuple<double, double> actualImpulseApplicableZone) const;
00187     void UpdateRestingPointExpressionAnimationForImpulse(
00188         winrt::ExpressionAnimation const& restingValueExpressionAnimation,
00189         double ignoredValue,
00190         std::tuple<double, double> actualImpulseApplicableZone) const;
00191     SnapPointSortPredicate SortPredicate() const;
00192     std::tuple<double, double> DetermineActualApplicableZone(
00193         const SnapPointBase* previousSnapPoint,
00194         const SnapPointBase* nextSnapPoint);
00195     std::tuple<double, double> DetermineActualImpulseApplicableZone(
00196         const SnapPointBase* previousSnapPoint,
00197         const SnapPointBase* nextSnapPoint,
00198         double currentIgnoredValue,
00199         double previousIgnoredValue,
00200         double nextIgnoredValue);
00201     double Influence(
00202         double edgeOfMidpoint) const;
00203     double ImpulseInfluence(
00204         double edgeOfMidpoint,
00205         double ignoredValue) const;
00206     void Combine(
00207         int& combinationCount,
00208         winrt::SnapPointBase const& snapPoint) const;
00209     int SnapCount() const;
00210     double Evaluate(
00211         std::tuple<double, double> actualApplicableZone,
00212         double value) const;
00213
00214 private:
00215     double ActualValue() const;
00216     double DetermineMinActualApplicableZone(
00217         const SnapPointBase* previousSnapPoint) const;
00218     double DetermineMinActualImpulseApplicableZone(
00219         const SnapPointBase* previousSnapPoint,
00220         double currentIgnoredValue,
00221         double previousIgnoredValue) const;
00222     double DetermineMaxActualApplicableZone(
00223         const SnapPointBase* nextSnapPoint) const;
00224     double DetermineMaxActualImpulseApplicableZone(
00225         const SnapPointBase* nextSnapPoint,
00226         double currentIgnoredValue,
00227         double nextIgnoredValue) const;
00228
00229     double m_value{ 0.0 };
00230 };
00231
00232 class RepeatedScrollSnapPoint :
00233     public winrt::implementation::RepeatedScrollSnapPointT<RepeatedScrollSnapPoint, ScrollSnapPointBase>
00234 {
00235 public:
00236     RepeatedScrollSnapPoint(
00237         double offset,
00238         double interval,
00239         double start,
00240         double end,
00241         winrt::ScrollSnapPointsAlignment alignment = winrt::ScrollSnapPointsAlignment::Near);
00242
00243 #ifdef ApplicableRangeType
00244     RepeatedScrollSnapPoint(
00245         double offset,
00246         double interval,
00247         double start,
00248         double end,
00249         double applicableRange,
00250         winrt::ScrollSnapPointsAlignment alignment = winrt::ScrollSnapPointsAlignment::Near);
00251 #endif
00252
00253     double Offset();
00254     double Interval();
00255     double Start();
00256     double End();
00257
00258     //Internal
00259     winrt::ExpressionAnimation CreateRestingPointExpression(
00260         double ignoredValue,
00261         std::tuple<double, double> actualImpulseApplicableZone,
00262         winrt::InteractionTracker const& interactionTracker,
00263         winrt::hstring const& target,
00264         winrt::hstring const& scale,
00265         bool isInertiaFromImpulse);
00266     winrt::ExpressionAnimation CreateConditionalExpression(
00267         std::tuple<double, double> actualApplicableZone,
00268         std::tuple<double, double> actualImpulseApplicableZone,
00269         winrt::InteractionTracker const& interactionTracker,
00270         winrt::hstring const& target,
00271         winrt::hstring const& scale,
00272         bool isInertiaFromImpulse);
00273     void UpdateConditionalExpressionAnimationForImpulse(
00274         winrt::ExpressionAnimation const& conditionExpressionAnimation,
00275         std::tuple<double, double> actualImpulseApplicableZone) const;
00276     void UpdateRestingPointExpressionAnimationForImpulse(
00277         winrt::ExpressionAnimation const& restingValueExpressionAnimation,
00278         double ignoredValue,
00279         std::tuple<double, double> actualImpulseApplicableZone) const;
00280     SnapPointSortPredicate SortPredicate() const;
00281     std::tuple<double, double> DetermineActualApplicableZone(
00282         const SnapPointBase* previousSnapPoint,
00283         const SnapPointBase* nextSnapPoint);
00284     std::tuple<double, double> DetermineActualImpulseApplicableZone(
00285         const SnapPointBase* previousSnapPoint,
00286         const SnapPointBase* nextSnapPoint,
00287         double currentIgnoredValue,
00288         double previousIgnoredValue,
00289         double nextIgnoredValue);
00290     double Influence(
00291         double edgeOfMidpoint) const;
00292     double ImpulseInfluence(
00293         double edgeOfMidpoint,
00294         double ignoredValue) const;
00295     void Combine(
00296         int& combinationCount,
00297         winrt::SnapPointBase const& snapPoint) const;
00298     int SnapCount() const;
00299     double Evaluate(
00300         std::tuple<double, double> actualApplicableZone,
00301         double value) const;
00302
00303 private:
00304     double ActualOffset() const;
00305     double ActualStart() const;
00306     double ActualEnd() const;
00307     double DetermineFirstRepeatedSnapPointValue() const;
00308     double DetermineLastRepeatedSnapPointValue() const;
00309     double DetermineMinActualApplicableZone(
00310         const SnapPointBase* previousSnapPoint) const;
00311     double DetermineMinActualImpulseApplicableZone(
00312         const SnapPointBase* previousSnapPoint,
00313         double currentIgnoredValue,
00314         double previousIgnoredValue) const;
00315     double DetermineMaxActualApplicableZone(
00316         const SnapPointBase* nextSnapPoint) const;
00317     double DetermineMaxActualImpulseApplicableZone(
00318         const SnapPointBase* nextSnapPoint,
00319         double currentIgnoredValue,
00320         double nextIgnoredValue) const;
00321     void ValidateConstructorParameters(
00322 #ifdef ApplicableRangeType
00323         bool applicableRangeToo,
00324         double applicableRange,
00325 #endif
00326         double offset,
00327         double interval,
00328         double start,
00329         double end) const;
00330
00331     double m_offset{ 0.0f };
00332     double m_interval{ 0.0f };
00333     double m_start{ 0.0f };
00334     double m_end{ 0.0f };
00335 };
00336
00337 class ZoomSnapPointBase :
00338     public winrt::implementation::ZoomSnapPointBaseT<ZoomSnapPointBase, SnapPointBase>
00339 {
00340     bool OnUpdateViewport(double newViewport);
00341
00342 protected:
00343     // Needed as work around for Modern Idl inheritance bug
00344     ZoomSnapPointBase();
00345 };
00346
00347 class ZoomSnapPoint :
00348     public winrt::implementation::ZoomSnapPointT<ZoomSnapPoint, ZoomSnapPointBase>
00349 {
00350 public:
00351     ZoomSnapPoint(
00352         double snapPointValue);
00353
00354 #ifdef ApplicableRangeType
00355     ZoomSnapPoint(
00356         double snapPointValue,
00357         double applicableRange);
00358 #endif
00359
00360     double Value();
00361
00362     //Internal
00363     winrt::ExpressionAnimation CreateRestingPointExpression(
00364         double ignoredValue,
00365         std::tuple<double, double> actualImpulseApplicableZone,
00366         winrt::InteractionTracker const& interactionTracker,
00367         winrt::hstring const& target,
00368         winrt::hstring const& scale,
00369         bool isInertiaFromImpulse);
00370     winrt::ExpressionAnimation CreateConditionalExpression(
00371         std::tuple<double, double> actualApplicableZone,
00372         std::tuple<double, double> actualImpulseApplicableZone,
00373         winrt::InteractionTracker const& interactionTracker,
00374         winrt::hstring const& target,
00375         winrt::hstring const& scale,
00376         bool isInertiaFromImpulse);
00377     void UpdateConditionalExpressionAnimationForImpulse(
00378         winrt::ExpressionAnimation const& conditionExpressionAnimation,
00379         std::tuple<double, double> actualImpulseApplicableZone) const;
00380     void UpdateRestingPointExpressionAnimationForImpulse(
00381         winrt::ExpressionAnimation const& restingValueExpressionAnimation,
00382         double ignoredValue,
00383         std::tuple<double, double> actualImpulseApplicableZone) const;
00384     SnapPointSortPredicate SortPredicate() const;
00385     std::tuple<double, double> DetermineActualApplicableZone(
00386         const SnapPointBase* previousSnapPoint,
00387         const SnapPointBase* nextSnapPoint);
00388     std::tuple<double, double> DetermineActualImpulseApplicableZone(
00389         const SnapPointBase* previousSnapPoint,
00390         const SnapPointBase* nextSnapPoint,
00391         double currentIgnoredValue,
00392         double previousIgnoredValue,
00393         double nextIgnoredValue);
00394     double Influence(
00395         double edgeOfMidpoint) const;
00396     double ImpulseInfluence(
00397         double edgeOfMidpoint,
00398         double ignoredValue) const;
00399     void Combine(
00400         int& combinationCount,
00401         winrt::SnapPointBase const& snapPoint) const;
00402     int SnapCount() const;
00403     double Evaluate(
00404         std::tuple<double, double> actualApplicableZone,
00405         double value) const;
00406
00407 private:
00408     double DetermineMinActualApplicableZone(
00409         const SnapPointBase* previousSnapPoint) const;
00410     double DetermineMinActualImpulseApplicableZone(
00411         const SnapPointBase* previousSnapPoint,
00412         double currentIgnoredValue,
00413         double previousIgnoredValue) const;
00414     double DetermineMaxActualApplicableZone(
00415         const SnapPointBase* nextSnapPoint) const;
00416     double DetermineMaxActualImpulseApplicableZone(
00417         const SnapPointBase* nextSnapPoint,
00418         double currentIgnoredValue,
00419         double nextIgnoredValue) const;
00420
00421     double m_value{ 0.0 };
00422 };
00423
00424 class RepeatedZoomSnapPoint :
00425     public winrt::implementation::RepeatedZoomSnapPointT<RepeatedZoomSnapPoint, ZoomSnapPointBase>
00426 {
00427 public:
00428     RepeatedZoomSnapPoint(
00429         double offset,
00430         double interval,
00431         double start,
00432         double end);
00433
00434 #ifdef ApplicableRangeType
00435     RepeatedZoomSnapPoint(
00436         double offset,
00437         double interval,
00438         double start,
00439         double end,
00440         double applicableRange);
00441 #endif
00442
00443     double Offset();
00444     double Interval();
00445     double Start();
00446     double End();
00447
00448     //Internal
00449     winrt::ExpressionAnimation CreateRestingPointExpression(
00450         double ignoredValue,
00451         std::tuple<double, double> actualImpulseApplicableZone,
00452         winrt::InteractionTracker const& interactionTracker,
00453         winrt::hstring const& target,
00454         winrt::hstring const& scale,
00455         bool isInertiaFromImpulse);
00456     winrt::ExpressionAnimation CreateConditionalExpression(
00457         std::tuple<double, double> actualApplicableZone,
00458         std::tuple<double, double> actualImpulseApplicableZone,
00459         winrt::InteractionTracker const& interactionTracker,
00460         winrt::hstring const& target,
00461         winrt::hstring const& scale,
00462         bool isInertiaFromImpulse);
00463     void UpdateConditionalExpressionAnimationForImpulse(
00464         winrt::ExpressionAnimation const& conditionExpressionAnimation,
00465         std::tuple<double, double> actualImpulseApplicableZone) const;
00466     void UpdateRestingPointExpressionAnimationForImpulse(
00467         winrt::ExpressionAnimation const& restingValueExpressionAnimation,
00468         double ignoredValue,
00469         std::tuple<double, double> actualImpulseApplicableZone) const;
00470     SnapPointSortPredicate SortPredicate() const;
00471     std::tuple<double, double> DetermineActualApplicableZone(
00472         const SnapPointBase* previousSnapPoint,
00473         const SnapPointBase* nextSnapPoint);
00474     std::tuple<double, double> DetermineActualImpulseApplicableZone(
00475         const SnapPointBase* previousSnapPoint,
00476         const SnapPointBase* nextSnapPoint,
00477         double currentIgnoredValue,
00478         double previousIgnoredValue,
00479         double nextIgnoredValue);
00480     double Influence(
00481         double edgeOfMidpoint) const;
00482     double ImpulseInfluence(
00483         double edgeOfMidpoint,
00484         double ignoredValue) const;
00485     void Combine(
00486         int& combinationCount,
00487         winrt::SnapPointBase const& snapPoint) const;
00488     int SnapCount() const;
00489     double Evaluate(
00490         std::tuple<double, double> actualApplicableZone,
00491         double value) const;
00492
00493 private:
00494     double DetermineFirstRepeatedSnapPointValue() const;
00495     double DetermineLastRepeatedSnapPointValue() const;
00496     double DetermineMinActualApplicableZone(
00497         const SnapPointBase* previousSnapPoint) const;
00498     double DetermineMinActualImpulseApplicableZone(
00499         const SnapPointBase* previousSnapPoint,
00500         double currentIgnoredValue,
00501         double previousIgnoredValue) const;
00502     double DetermineMaxActualApplicableZone(
00503         const SnapPointBase* nextSnapPoint) const;
00504     double DetermineMaxActualImpulseApplicableZone(
00505         const SnapPointBase* nextSnapPoint,
00506         double currentIgnoredValue,
00507         double nextIgnoredValue) const;
00508     void ValidateConstructorParameters(
00509 #ifdef ApplicableRangeType
00510         bool applicableRangeToo,
00511         double applicableRange,
00512 #endif
00513         double offset,
00514         double interval,
00515         double start,
00516         double end) const;
00517
00518     double m_offset{ 0.0f };
00519     double m_interval{ 0.0f };
00520     double m_start{ 0.0f };
00521     double m_end{ 0.0f };
00522 };
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewNodeVector Member List

This is the complete list of members for TreeViewNodeVector, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
Append(winrt::TreeViewNode const &item, bool updateItemsSource=true) | TreeViewNodeVector |
CheckThread() | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
Clear(bool updateItemsSource=true, bool updateIsExpanded=true) | TreeViewNodeVector |
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewNodeVector > &&self) noexcept | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
final_release(std::unique_ptr< TreeViewNodeVector > &&self) | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline, static]
GetBase() | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
GetInner() | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
GetWritableParentItemsSource() | TreeViewNodeVector |
Implement_Vector_Read(TreeViewNodeVectorOptions) private | TreeViewNodeVector | [inline, private]
InsertAt(unsigned int index, winrt::TreeViewNode const &item, bool updateItemsSource=true) | TreeViewNodeVector |
IsOnThread() | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
Parent() | TreeViewNodeVector |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewNodeVector, reference_tracker_implements_t< TreeViewNodeVectorOptions::VectorType >::type, TreeViewNodeVectorOptions::IterableType, TreeViewNodeVectorOptions::ObservableVectorType > | [inline]
RemoveAt(unsigned int index, bool updateItemsSource=true, bool updateIsExpanded=true) | TreeViewNodeVector |
RemoveAtEnd(bool updateItemsSource=true) | TreeViewNodeVector |
ReplaceAll(winrt::array_view< winrt::TreeViewNode const > values, bool updateItemsSource=true) | TreeViewNodeVector |
SetAt(unsigned int index, winrt::TreeViewNode const &item, bool updateItemsSource=true) | TreeViewNodeVector |
SetParent(winrt::TreeViewNode value) | TreeViewNodeVector |
TreeViewNodeVector() | TreeViewNodeVector |
TreeViewNodeVector(unsigned int capacity) | TreeViewNodeVector |
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressBarPage Member List

This is the complete list of members for ProgressBarPage, including all inherited members.
ChangeValue_Click(object sender, RoutedEventArgs e) | ProgressBarPage | [inline]
Indicator_SizeChanged(object sender, SizeChangedEventArgs e) | ProgressBarPage | [inline, private]
IsVisibleCheckBox_CheckChanged(object sender, RoutedEventArgs e) | ProgressBarPage | [inline]
ProgressBarPage() | ProgressBarPage | [inline]
ProgressBarPage_CurrentStateChanged(object sender, VisualStateChangedEventArgs e) | ProgressBarPage | [inline, private]
ProgressBarPage_Loaded(object sender, RoutedEventArgs e) | ProgressBarPage | [inline, private]
UpdateMinMax_Click(object sender, RoutedEventArgs e) | ProgressBarPage | [inline]
UpdatePadding_Click(object sender, RoutedEventArgs e) | ProgressBarPage | [inline]
UpdateValue_Click(object sender, RoutedEventArgs e) | ProgressBarPage | [inline]
UpdateWidth_Click(object sender, RoutedEventArgs e) | ProgressBarPage | [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApiFactory.h Source File

  • File List
  • File Members
  • TwoPaneView

DisplayRegionHelperTestApiFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "DisplayRegionHelperTestApi.h"
00007
00008 #include "DisplayRegionHelperTestApi.properties.cpp"
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IUnPremultiplyEffect Member List

This is the complete list of members for IUnPremultiplyEffect, including all inherited members.
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IUnPremultiplyEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IUnPremultiplyEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/DesktopAcrylicBackdrop/DesktopAcrylicBackdrop.idl Source File

  • File List
  • File Members
  • Materials
  • DesktopAcrylicBackdrop

DesktopAcrylicBackdrop.idl

Go to the documentation of this file.
00001 namespace MU_XM_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC_V4]
00005 [webhosthidden]
00006 unsealed runtimeclass DesktopAcrylicBackdrop : Microsoft.UI.Xaml.Media.SystemBackdrop
00007 {
00008     DesktopAcrylicBackdrop();
00009 }
00010
00011 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollBarController Member List

This is the complete list of members for ScrollBarController, including all inherited members.
AddScrollVelocityRequested | ScrollBarController |
asyncEventReportingLock | ScrollBarController | [private]
CanScroll | ScrollBarController |
CanScrollChanged | ScrollBarController |
GetScrollAnimation(int correlationId, Vector2 startPosition, Vector2 endPosition, CompositionAnimation defaultAnimation) | ScrollBarController | [inline]
IsEnabled | ScrollBarController |
IsLogging | ScrollBarController |
IsScrollingWithMouse | ScrollBarController |
IsScrollingWithMouseChanged | ScrollBarController |
LogMessage(string message) | ScrollBarController | [inline, private]
lstAddScrollVelocityCorrelationIds | ScrollBarController | [private]
lstAsyncEventMessage | ScrollBarController | [private]
lstLog | ScrollBarController | [private]
lstScrollByCorrelationIds | ScrollBarController | [private]
lstScrollToCorrelationIds | ScrollBarController | [private]
NotifyRequestedScrollCompleted(int correlationId) | ScrollBarController | [inline]
operationsCount | ScrollBarController | [private]
Orientation | ScrollBarController |
PanningInfo | ScrollBarController |
RaiseAddScrollVelocityRequested(float offsetVelocity, float?inertiaDecayRate) | ScrollBarController | [inline, private]
RaiseCanScrollChanged() | ScrollBarController | [inline, private]
RaiseIsScrollingWithMouseChanged() | ScrollBarController | [inline, private]
RaiseScrollByRequested(double offsetDelta, ScrollingAnimationMode animationMode) | ScrollBarController | [inline, private]
RaiseScrollToRequested(double offset, ScrollingAnimationMode animationMode) | ScrollBarController | [inline, private]
scrollBar | ScrollBarController | [private]
ScrollBarController(ScrollBar scrollBar, ListBox logList, bool isLogging) | ScrollBarController | [inline]
ScrollBarScroll(object sender, ScrollEventArgs e) | ScrollBarController | [inline, private]
ScrollBarValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ScrollBarController | [inline, private]
ScrollByRequested | ScrollBarController |
ScrollToRequested | ScrollBarController |
SetIsScrollable(bool isScrollable) | ScrollBarController | [inline]
SetValues(double minOffset, double maxOffset, double offset, double viewportLength) | ScrollBarController | [inline]
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CustomProperty Member List

This is the complete list of members for CustomProperty, including all inherited members.
CanRead() | CustomProperty |
CanWrite() | CustomProperty |
CustomProperty(winrt::hstring const &name, winrt::TypeName const &typeName, std::function< winrt::IInspectable(winrt::IInspectable const &)>, std::function< void(winrt::IInspectable const &, winrt::IInspectable const &)> m_setter) | CustomProperty |
GetIndexedValue(winrt::IInspectable const &target, winrt::IInspectable const &index) | CustomProperty |
GetValue(winrt::IInspectable const &target) | CustomProperty |
m_getter | CustomProperty | [private]
m_setter | CustomProperty | [private]
Name() | CustomProperty |
SetIndexedValue(winrt::IInspectable const &target, winrt::IInspectable const &value, winrt::IInspectable const &index) | CustomProperty |
SetValue(winrt::IInspectable const &target, winrt::IInspectable const &value) | CustomProperty |
Type() | CustomProperty |
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewTestsWithInputHelper::LoggingHelper Member List

This is the complete list of members for ScrollViewTestsWithInputHelper::LoggingHelper, including all inherited members.
Dispose() | ScrollViewTestsWithInputHelper::LoggingHelper | [inline]
LoggingHelper(ScrollViewTestsWithInputHelper owner) | ScrollViewTestsWithInputHelper::LoggingHelper | [inline]
m_owner | ScrollViewTestsWithInputHelper::LoggingHelper | [private]
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderAutomationPeer.h Source File

  • File List
  • File Members
  • Expander

ExpanderAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "Expander.h"
00007 #include "ExpanderAutomationPeer.g.h"
00008
00009 class ExpanderAutomationPeer :
00010     public ReferenceTracker<ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT>
00011 {
00012
00013 public:
00014     ExpanderAutomationPeer(winrt::Expander const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     hstring GetClassNameCore();
00019     hstring GetNameCore();
00020     winrt::AutomationControlType GetAutomationControlTypeCore();
00021     bool HasKeyboardFocusCore();
00022     bool IsKeyboardFocusableCore();
00023     winrt::AutomationPeer GetPeerFromPointCore(winrt::Point point);
00024     winrt::IVector<winrt::AutomationPeer> GetChildrenCore();
00025
00026     // IExpandCollapseProvider
00027     winrt::ExpandCollapseState ExpandCollapseState();
00028     void Collapse();
00029     void Expand();
00030     void RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState newState);
00031
00032
00033 private:
00034     com_ptr<Expander> GetImpl();
00035
00036     winrt::AutomationPeer GetExpanderToggleButtonPeer();
00037 };
00038
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSliderAutomationPeer.idl Source File

  • File List
  • File Members
  • ColorPicker

ColorPickerSliderAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass ColorPickerSliderAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.SliderAutomationPeer
00007 {
00008     [method_name("CreateInstanceWithOwner")] ColorPickerSliderAutomationPeer(MU_XCP_NAMESPACE.ColorPickerSlider owner);
00009 }
00010
00011 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ToggleSplitButtonProperties Member List

This is the complete list of members for ToggleSplitButtonProperties, including all inherited members.
ClearProperties() | ToggleSplitButtonProperties | [static]
EnsureProperties() | ToggleSplitButtonProperties | [static]
IsChecked(bool value) | ToggleSplitButtonProperties |
IsChecked() | ToggleSplitButtonProperties |
IsCheckedChanged(winrt::TypedEventHandler< winrt::ToggleSplitButton, winrt::ToggleSplitButtonIsCheckedChangedEventArgs > const &value) | ToggleSplitButtonProperties |
IsCheckedChanged(winrt::event_token const &token) | ToggleSplitButtonProperties |
IsCheckedProperty() | ToggleSplitButtonProperties | [inline, static]
m_isCheckedChangedEventSource | ToggleSplitButtonProperties |
OnIsCheckedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ToggleSplitButtonProperties | [static]
s_IsCheckedProperty | ToggleSplitButtonProperties | [static]
ToggleSplitButtonProperties() | ToggleSplitButtonProperties |
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RecyclingElementFactory Member List

This is the complete list of members for RecyclingElementFactory, including all inherited members.
abi_enter() | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
CheckThread() | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
ClearProperties() | RecyclingElementFactoryProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< RecyclingElementFactory > &&self) noexcept | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline, static]
EnsureProperties() | RecyclingElementFactoryProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
final_release(std::unique_ptr< RecyclingElementFactory > &&self) | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline, static]
GetBase() | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
GetElementCore(winrt::ElementFactoryGetArgs const &args) | RecyclingElementFactory |
GetInner() | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
IsOnThread() | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
m_selectTemplateKeyEventSource | RecyclingElementFactoryProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
OnSelectTemplateKeyCore(winrt::IInspectable const &dataContext, winrt::UIElement const &owner) | RecyclingElementFactory |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
RecycleElementCore(winrt::ElementFactoryRecycleArgs const &args) | RecyclingElementFactory |
RecyclePool() | RecyclingElementFactory |
RecyclePool(winrt::RecyclePool const &value) | RecyclingElementFactory |
RecyclingElementFactory() | RecyclingElementFactory |
RecyclingElementFactoryProperties() | RecyclingElementFactoryProperties |
ReferenceTracker(Args &&...args) | ReferenceTracker< RecyclingElementFactory, winrt::implementation::RecyclingElementFactoryT, ElementFactory > | [inline]
SelectTemplateKey(winrt::TypedEventHandler< winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs > const &value) | RecyclingElementFactoryProperties |
SelectTemplateKey(winrt::event_token const &token) | RecyclingElementFactoryProperties |
Templates() | RecyclingElementFactory |
Templates(winrt::IMap< winrt::hstring, winrt::DataTemplate > const &value) | RecyclingElementFactory |
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutMainPage Member List

This is the complete list of members for CommandBarFlyoutMainPage, including all inherited members.
CmbCommandBarFlyoutOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | CommandBarFlyoutMainPage | [inline, private]
CommandBarFlyoutMainPage() | CommandBarFlyoutMainPage | [inline]
OnCommandBarFlyoutTestsClicked(object sender, object args) | CommandBarFlyoutMainPage | [inline]
OnExtraCommandBarFlyoutTestsClicked(object sender, object args) | CommandBarFlyoutMainPage | [inline]
OnTextCommandBarFlyoutTestsClicked(object sender, object args) | CommandBarFlyoutMainPage | [inline]
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComboBoxPage Member List

This is the complete list of members for ComboBoxPage, including all inherited members.
ComboBoxPage() ComboBoxPage [inline]
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionModelProperties Member List

This is the complete list of members for SelectionModelProperties, including all inherited members.
ChildrenRequested(winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelChildrenRequestedEventArgs > const &value) | SelectionModelProperties |
ChildrenRequested(winrt::event_token const &token) | SelectionModelProperties |
ClearProperties() | SelectionModelProperties | [static]
EnsureProperties() | SelectionModelProperties | [static]
m_childrenRequestedEventSource | SelectionModelProperties |
m_propertyChangedEventSource | SelectionModelProperties |
m_selectionChangedEventSource | SelectionModelProperties |
PropertyChanged(winrt::PropertyChangedEventHandler const &value) | SelectionModelProperties |
PropertyChanged(winrt::event_token const &token) | SelectionModelProperties |
SelectionChanged(winrt::TypedEventHandler< winrt::SelectionModel, winrt::SelectionModelSelectionChangedEventArgs > const &value) | SelectionModelProperties |
SelectionChanged(winrt::event_token const &token) | SelectionModelProperties |
SelectionModelProperties() | SelectionModelProperties |
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Hsv Member List

This is the complete list of members for Hsv, including all inherited members.
Hsv() | Hsv
Hsv(double h, double s, double v) | Hsv
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RepeaterAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

RepeaterAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RepeaterAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RepeaterAutomationPeer)
00012 }
00013
00014 #include "RepeaterAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.h Source File

  • File List
  • File Members
  • MonochromaticOverlayPresenter

MonochromaticOverlayPresenter.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "MonochromaticOverlayPresenter.g.h"
00010 #include "MonochromaticOverlayPresenter.properties.h"
00011
00012 #pragma warning(push)
00013 #pragma warning(disable: 6101)  // Returning uninitialized memory '<value>'.  A successful path through the function does not set the named _Out_ parameter.
00014 #include "microsoft.ui.private.composition.effects_impl.h"
00015 #pragma warning(pop)
00016
00017 class MonochromaticOverlayPresenter :
00018     public ReferenceTracker<MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT>,
00019     public MonochromaticOverlayPresenterProperties
00020 {
00021
00022 public:
00023     MonochromaticOverlayPresenter();
00024     ~MonochromaticOverlayPresenter() {}
00025
00026     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00027
00028 private:
00029     void UpdateBrush();
00030     void InvalidateBrush();
00031
00032     winrt::CompositionEffectFactory _effectFactory{ nullptr };
00033     winrt::Color _replacementColor{};
00034     bool _needsBrushUpdate{};
00035 };
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeItems.properties.h Source File

  • File List
  • File Members
  • Generated

SwipeItems.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class SwipeItemsProperties
00008 {
00009 public:
00010     SwipeItemsProperties();
00011
00012     void Mode(winrt::SwipeMode const& value);
00013     winrt::SwipeMode Mode();
00014
00015     static winrt::DependencyProperty ModeProperty() { return s_ModeProperty; }
00016
00017     static GlobalDependencyProperty s_ModeProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021
00022     static void OnModePropertyChanged(
00023         winrt::DependencyObject const& sender,
00024         winrt::DependencyPropertyChangedEventArgs const& args);
00025 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBar Member List

This is the complete list of members for TitleBar, including all inherited members.
abi_enter() | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
BackRequested(winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const &value) | TitleBarProperties |
BackRequested(winrt::event_token const &token) | TitleBarProperties |
CheckThread() | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
ClearProperties() | TitleBarProperties | [static]
Content(winrt::IInspectable const &value) | TitleBarProperties |
Content() | TitleBarProperties |
ContentProperty() | TitleBarProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< TitleBar > &&self) noexcept | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline, static]
EnsureProperties() | TitleBarProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
final_release(std::unique_ptr< TitleBar > &&self) | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline, static]
Footer(winrt::IInspectable const &value) | TitleBarProperties |
Footer() | TitleBarProperties |
FooterProperty() | TitleBarProperties | [inline, static]
GetBase() | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
GetInner() | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
Header(winrt::IInspectable const &value) | TitleBarProperties |
Header() | TitleBarProperties |
HeaderProperty() | TitleBarProperties | [inline, static]
IconSource(winrt::IconSource const &value) | TitleBarProperties |
IconSource() | TitleBarProperties |
IconSourceProperty() | TitleBarProperties | [inline, static]
IsBackButtonVisible(bool value) | TitleBarProperties |
IsBackButtonVisible() | TitleBarProperties |
IsBackButtonVisibleProperty() | TitleBarProperties | [inline, static]
IsBackEnabled(bool value) | TitleBarProperties |
IsBackEnabled() | TitleBarProperties |
IsBackEnabledProperty() | TitleBarProperties | [inline, static]
IsOnThread() | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
IsPaneToggleButtonVisible(bool value) | TitleBarProperties |
IsPaneToggleButtonVisible() | TitleBarProperties |
IsPaneToggleButtonVisibleProperty() | TitleBarProperties | [inline, static]
LoadBackButton() | TitleBar | [private]
LoadPaneToggleButton() | TitleBar | [private]
m_backRequestedEventSource | TitleBarProperties |
m_inputActivationListener | TitleBar | [private]
m_paneToggleRequestedEventSource | TitleBarProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
OnApplyTemplate() | TitleBar |
OnBackButtonClick(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | TitleBar | [private]
OnContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnCreateAutomationPeer() | TitleBar |
OnFooterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnInputActivationChanged(const winrt::InputActivationListener &sender, const winrt::InputActivationListenerActivationChangedEventArgs &args) | TitleBar | [private]
OnIsBackButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnIsBackEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnIsPaneToggleButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnLayoutUpdated(const winrt::IInspectable &sender, const winrt::IInspectable &args) | TitleBar | [private]
OnPaneToggleButtonClick(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | TitleBar | [private]
OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | TitleBar |
OnSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | TitleBar | [private]
OnSubtitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnTitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
PaneToggleRequested(winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const &value) | TitleBarProperties |
PaneToggleRequested(winrt::event_token const &token) | TitleBarProperties |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TitleBar, winrt::implementation::TitleBarT > | [inline]
s_ContentProperty | TitleBarProperties | [static]
s_FooterProperty | TitleBarProperties | [static]
s_HeaderProperty | TitleBarProperties | [static]
s_IconSourceProperty | TitleBarProperties | [static]
s_IsBackButtonVisibleProperty | TitleBarProperties | [static]
s_IsBackEnabledProperty | TitleBarProperties | [static]
s_IsPaneToggleButtonVisibleProperty | TitleBarProperties | [static]
s_SubtitleProperty | TitleBarProperties | [static]
s_TemplateSettingsProperty | TitleBarProperties | [static]
s_TitleProperty | TitleBarProperties | [static]
Subtitle(winrt::hstring const &value) | TitleBarProperties |
Subtitle() | TitleBarProperties |
SubtitleProperty() | TitleBarProperties | [inline, static]
TemplateSettings(winrt::TitleBarTemplateSettings const &value) | TitleBarProperties |
TemplateSettings() | TitleBarProperties |
TemplateSettingsProperty() | TitleBarProperties | [inline, static]
Title(winrt::hstring const &value) | TitleBarProperties |
Title() | TitleBarProperties |
TitleBar() | TitleBar |
TitleBarProperties() | TitleBarProperties |
TitleProperty() | TitleBarProperties | [inline, static]
UpdateBackButton() | TitleBar | [private]
UpdateContent() | TitleBar | [private]
UpdateDragRegion() | TitleBar | [private]
UpdateFooter() | TitleBar | [private]
UpdateHeader() | TitleBar | [private]
UpdateHeaderSpacing() | TitleBar | [private]
UpdateHeight() | TitleBar | [private]
UpdateIcon() | TitleBar | [private]
UpdateInteractableElementsList() | TitleBar | [private]
UpdatePadding() | TitleBar | [private]
UpdatePaneToggleButton() | TitleBar | [private]
UpdateSubtitle() | TitleBar | [private]
UpdateTheme() | TitleBar | [private]
UpdateTitle() | TitleBar | [private]
~TitleBar() | TitleBar | [virtual]
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterChainingAndRailingPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterChainingAndRailingPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Xaml.Controls.Primitives;
00009 using Microsoft.UI.Xaml.Navigation;
00010 using Microsoft.UI.Private.Controls;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     public sealed partial class ScrollPresenterChainingAndRailingPage : TestPage
00015     {
00016         private List<string> fullLogs = new List<string>();
00017         private int scrollPresenter3ZoomFactorChangeCorrelationId = -1;
00018
00019         public ScrollPresenterChainingAndRailingPage()
00020         {
00021             InitializeComponent();
00022             InitializeUIFromScrollPresenter("0");
00023             InitializeUIFromScrollPresenter("1");
00024             InitializeUIFromScrollPresenter("3");
00025             InitializeUIFromScrollViewer("2");
00026
00027             scrollPresenter0.StateChanged += ScrollPresenter_StateChanged;
00028             scrollPresenter1.StateChanged += ScrollPresenter_StateChanged;
00029             scrollPresenter3.StateChanged += ScrollPresenter_StateChanged;
00030
00031             scrollPresenter3.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00032
00033             scrollViewer2.DirectManipulationStarted += ScrollViewer2_DirectManipulationStarted;
00034             scrollViewer2.DirectManipulationCompleted += ScrollViewer2_DirectManipulationCompleted;
00035         }
00036
00037         ~ScrollPresenterChainingAndRailingPage()
00038         {
00039         }
00040
00041         protected override void OnNavigatedFrom(NavigationEventArgs e)
00042         {
00043             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00044             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00045
00046             base.OnNavigatedFrom(e);
00047         }
00048
00049         private void ScrollViewer2_DirectManipulationStarted(object sender, object e)
00050         {
00051             txtScrollViewer2State.Text = (sender as ScrollViewer).Name + " Interaction";
00052             txtScrollViewer2HSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).HorizontalOffset / (sender as ScrollViewer).ScrollableWidth * 100.0);
00053             txtScrollViewer2VSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).VerticalOffset / (sender as ScrollViewer).ScrollableHeight * 100.0);
00054         }
00055
00056         private void ScrollViewer2_DirectManipulationCompleted(object sender, object e)
00057         {
00058             txtScrollViewer2State.Text = (sender as ScrollViewer).Name + " Idle";
00059             txtScrollViewer2HSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).HorizontalOffset / (sender as ScrollViewer).ScrollableWidth * 100.0);
00060             txtScrollViewer2VSP.Text = String.Format("{0,5:N1}%", (sender as ScrollViewer).VerticalOffset / (sender as ScrollViewer).ScrollableHeight * 100.0);
00061         }
00062
00063         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00064         {
00065             if (sender == scrollPresenter0)
00066             {
00067                 txtScrollPresenter0State.Text = "scrollPresenter0 " + scrollPresenter0.State.ToString();
00068                 txtScrollPresenter0HSP.Text = String.Format("{0,5:N1}%", sender.HorizontalOffset / 3.0);
00069                 txtScrollPresenter0VSP.Text = String.Format("{0,5:N1}%", sender.VerticalOffset / 3.0);
00070             }
00071             else if (sender == scrollPresenter1)
00072             {
00073                 txtScrollPresenter1State.Text = "scrollPresenter1 " + scrollPresenter1.State.ToString();
00074                 txtScrollPresenter1HSP.Text = String.Format("{0,5:N1}%", sender.HorizontalOffset / 3.0);
00075                 txtScrollPresenter1VSP.Text = String.Format("{0,5:N1}%", sender.VerticalOffset / 3.0);
00076             }
00077             else if (sender == scrollPresenter3)
00078             {
00079                 txtScrollPresenter3State.Text = "scrollPresenter3 " + scrollPresenter3.State.ToString();
00080                 txtScrollPresenter3HSP.Text = String.Format("{0,5:N1}%", sender.HorizontalOffset / 3.0);
00081                 txtScrollPresenter3VSP.Text = String.Format("{0,5:N1}%", sender.VerticalOffset / 3.0);
00082             }
00083         }
00084
00085         private void ScrollPresenter_ZoomCompleted(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
00086         {
00087             if (args.CorrelationId == scrollPresenter3ZoomFactorChangeCorrelationId)
00088                 this.txtResetStatus.Text = "Views reset";
00089         }
00090
00091         private void CmbHorizontalScrollChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00092         {
00093             ComboBox cmb = sender as ComboBox;
00094             string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
00095             ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
00096             if (scrollPresenter != null)
00097             {
00098                 scrollPresenter.HorizontalScrollChainMode = (ScrollingChainMode)cmb.SelectedIndex;
00099             }
00100             else
00101             {
00102                 ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
00103                 if (scrollViewer != null)
00104                 {
00105                     scrollViewer.IsHorizontalScrollChainingEnabled = cmb.SelectedIndex == 0;
00106                 }
00107             }
00108         }
00109
00110         private void CmbVerticalScrollChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00111         {
00112             ComboBox cmb = sender as ComboBox;
00113             string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
00114             ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
00115             if (scrollPresenter != null)
00116             {
00117                 scrollPresenter.VerticalScrollChainMode = (ScrollingChainMode)cmb.SelectedIndex;
00118             }
00119             else
00120             {
00121                 ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
00122                 if (scrollViewer != null)
00123                 {
00124                     scrollViewer.IsVerticalScrollChainingEnabled = cmb.SelectedIndex == 0;
00125                 }
00126             }
00127         }
00128
00129         private void CmbZoomChainMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00130         {
00131             ComboBox cmb = sender as ComboBox;
00132             string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
00133             ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
00134             if (scrollPresenter != null)
00135             {
00136                 scrollPresenter.ZoomChainMode = (ScrollingChainMode)cmb.SelectedIndex;
00137             }
00138             else
00139             {
00140                 ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
00141                 if (scrollViewer != null)
00142                 {
00143                     scrollViewer.IsZoomChainingEnabled = cmb.SelectedIndex == 0;
00144                 }
00145             }
00146         }
00147
00148         private void CmbHorizontalScrollRailMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00149         {
00150             ComboBox cmb = sender as ComboBox;
00151             string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
00152             ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
00153             if (scrollPresenter != null)
00154             {
00155                 scrollPresenter.HorizontalScrollRailMode = (ScrollingRailMode)cmb.SelectedIndex;
00156             }
00157             else
00158             {
00159                 ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
00160                 if (scrollViewer != null)
00161                 {
00162                     scrollViewer.IsHorizontalRailEnabled = cmb.SelectedIndex == 0;
00163                 }
00164             }
00165         }
00166
00167         private void CmbVerticalScrollRailMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00168         {
00169             ComboBox cmb = sender as ComboBox;
00170             string suffix = cmb.Name.Substring(cmb.Name.Length - 1);
00171             ScrollPresenter scrollPresenter = GetScrollPresenterWithSuffix(suffix);
00172             if (scrollPresenter != null)
00173             {
00174                 scrollPresenter.VerticalScrollRailMode = (ScrollingRailMode)cmb.SelectedIndex;
00175             }
00176             else
00177             {
00178                 ScrollViewer scrollViewer = GetScrollViewerWithSuffix(suffix);
00179                 if (scrollViewer != null)
00180                 {
00181                     scrollViewer.IsVerticalRailEnabled = cmb.SelectedIndex == 0;
00182                 }
00183             }
00184         }
00185
00186         private ScrollPresenter GetScrollPresenterWithSuffix(string suffix)
00187         {
00188             switch (suffix)
00189             {
00190                 case "0":
00191                     return scrollPresenter0;
00192                 case "1":
00193                     return scrollPresenter1;
00194                 case "3":
00195                     return scrollPresenter3;
00196                 default:
00197                     return null;
00198             }
00199         }
00200
00201         private ScrollViewer GetScrollViewerWithSuffix(string suffix)
00202         {
00203             switch (suffix)
00204             {
00205                 case "2":
00206                     return scrollViewer2;
00207                 default:
00208                     return null;
00209             }
00210         }
00211
00212         private void InitializeUIFromScrollPresenter(string suffix)
00213         {
00214             ScrollPresenter scrollPresenter = FindName("scrollPresenter" + suffix) as ScrollPresenter;
00215             if (scrollPresenter == null)
00216                 return;
00217
00218             ComboBox cmb = FindName("cmbHorizontalScrollChainMode" + suffix) as ComboBox;
00219             if (cmb != null)
00220                 cmb.SelectedIndex = (int)scrollPresenter.HorizontalScrollChainMode;
00221
00222             cmb = FindName("cmbVerticalScrollChainMode" + suffix) as ComboBox;
00223             if (cmb != null)
00224                 cmb.SelectedIndex = (int)scrollPresenter.VerticalScrollChainMode;
00225
00226             cmb = FindName("cmbZoomChainMode" + suffix) as ComboBox;
00227             if (cmb != null)
00228                 cmb.SelectedIndex = (int)scrollPresenter.ZoomChainMode;
00229
00230             cmb = FindName("cmbHorizontalScrollRailMode" + suffix) as ComboBox;
00231             if (cmb != null)
00232                 cmb.SelectedIndex = (int)scrollPresenter.HorizontalScrollRailMode;
00233
00234             cmb = FindName("cmbVerticalScrollRailMode" + suffix) as ComboBox;
00235             if (cmb != null)
00236                 cmb.SelectedIndex = (int)scrollPresenter.VerticalScrollRailMode;
00237         }
00238
00239         private void InitializeUIFromScrollViewer(string suffix)
00240         {
00241             ScrollViewer scrollViewer = FindName("scrollViewer" + suffix) as ScrollViewer;
00242             if (scrollViewer == null)
00243                 return;
00244
00245             ComboBox cmb = FindName("cmbHorizontalScrollChainMode" + suffix) as ComboBox;
00246             if (cmb != null)
00247                 cmb.SelectedIndex = scrollViewer.IsHorizontalScrollChainingEnabled ? 0 : 1;
00248
00249             cmb = FindName("cmbVerticalScrollChainMode" + suffix) as ComboBox;
00250             if (cmb != null)
00251                 cmb.SelectedIndex = scrollViewer.IsVerticalScrollChainingEnabled ? 0 : 1;
00252
00253             cmb = FindName("cmbZoomChainMode" + suffix) as ComboBox;
00254             if (cmb != null)
00255                 cmb.SelectedIndex = scrollViewer.IsZoomChainingEnabled ? 0 : 1;
00256
00257             cmb = FindName("cmbHorizontalScrollRailMode" + suffix) as ComboBox;
00258             if (cmb != null)
00259                 cmb.SelectedIndex = scrollViewer.IsHorizontalRailEnabled ? 0 : 1;
00260
00261             cmb = FindName("cmbVerticalScrollRailMode" + suffix) as ComboBox;
00262             if (cmb != null)
00263                 cmb.SelectedIndex = scrollViewer.IsVerticalRailEnabled ? 0 : 1;
00264         }
00265
00266         private void btnResetViews_Click(object sender, RoutedEventArgs e)
00267         {
00268             this.txtResetStatus.Text = "Resetting views ...";
00269             ResetView(this.scrollViewer2);
00270             ResetView(this.scrollPresenter0);
00271             ResetView(this.scrollPresenter1);
00272             ResetView(this.scrollPresenter3);
00273         }
00274
00275         private void ResetView(UIElement element)
00276         {
00277             ScrollPresenter scrollPresenter = element as ScrollPresenter;
00278
00279             if (scrollPresenter != null)
00280             {
00281                 scrollPresenter.ScrollTo(
00282                     0.0,
00283                     0.0,
00284                     new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00285
00286                 int viewChangeCorrelationId = scrollPresenter.ZoomTo(
00287                     1.0f,
00288                     System.Numerics.Vector2.Zero,
00289                     new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00290
00291                 if (this.scrollPresenter3 == scrollPresenter)
00292                     scrollPresenter3ZoomFactorChangeCorrelationId = viewChangeCorrelationId;
00293             }
00294             else
00295             {
00296                 ScrollViewer scrollViewer = element as ScrollViewer;
00297                 scrollViewer.ChangeView(0, 0, 1.0f, true /*disableAnimation*/);
00298             }
00299         }
00300
00301         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00302         {
00303             //Turn on info and verbose logging for the ScrollPresenter type:
00304             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00305
00306             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00307         }
00308
00309         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00310         {
00311             //Turn off info and verbose logging for the ScrollPresenter type:
00312             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00313
00314             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00315         }
00316
00317         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00318         {
00319             // Cut off the terminating new line.
00320             string msg = args.Message.Substring(0, args.Message.Length - 1);
00321             string senderName = string.Empty;
00322
00323             try
00324             {
00325                 FrameworkElement fe = sender as FrameworkElement;
00326
00327                 if (fe != null)
00328                 {
00329                     senderName = "s:" + fe.Name + ", ";
00330                 }
00331             }
00332             catch
00333             {
00334             }
00335
00336             if (args.IsVerboseLevel)
00337             {
00338                 this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
00339             }
00340             else
00341             {
00342                 this.fullLogs.Add("Info: " + senderName + "m:" + msg);
00343             }
00344         }
00345
00346         private void btnGetFullLog_Click(object sender, RoutedEventArgs e)
00347         {
00348             foreach (string log in this.fullLogs)
00349             {
00350                 this.cmbFullLog.Items.Add(log);
00351             }
00352         }
00353
00354         private void btnClearFullLog_Click(object sender, RoutedEventArgs e)
00355         {
00356             this.fullLogs.Clear();
00357             this.cmbFullLog.Items.Clear();
00358         }
00359     }
00360 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTabClosingBehaviorPage Member List

This is the complete list of members for TabViewTabClosingBehaviorPage, including all inherited members.
_newTabNumber | TabViewTabClosingBehaviorPage | [private]
AddButtonClick(object sender, object e) | TabViewTabClosingBehaviorPage | [inline]
GetActualWidthsButton_Click(object sender, RoutedEventArgs e) | TabViewTabClosingBehaviorPage | [inline]
GetFirstItemWidthButton_Click(object sender, RoutedEventArgs e) | TabViewTabClosingBehaviorPage | [inline]
IncreaseScrollButton_Click(object sender, RoutedEventArgs e) | TabViewTabClosingBehaviorPage | [inline]
RemoveLastItem_Click(object sender, RoutedEventArgs e) | TabViewTabClosingBehaviorPage | [inline, private]
RemoveMiddleItem_Click(object sender, RoutedEventArgs e) | TabViewTabClosingBehaviorPage | [inline, private]
TabViewTabCloseRequested(object sender, Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs e) | TabViewTabClosingBehaviorPage | [inline, private]
TabViewTabClosingBehaviorPage() | TabViewTabClosingBehaviorPage | [inline]
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/InteractionTests/ItemsViewTestsWithInputHelper.cs Source File

  • File List
  • File Members
  • ItemsView
  • InteractionTests

ItemsViewTestsWithInputHelper.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Drawing;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 using Microsoft.Windows.Apps.Test.Automation;
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019 using Point = System.Drawing.Point;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00022 {
00023     [TestClass]
00024     public class ItemsViewTestsWithInputHelper
00025     {
00026         [ClassInitialize]
00027         [TestProperty("RunAs", "User")]
00028         [TestProperty("Classification", "Integration")]
00029         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00030         [TestProperty("IsolationLevel", "Method")]
00031         public static void ClassInitialize(TestContext testContext)
00032         {
00033             TestEnvironment.Initialize(testContext);
00034         }
00035
00036         [TestCleanup]
00037         public void TestCleanup()
00038         {
00039             TestCleanupHelper.Cleanup();
00040         }
00041
00042         [TestMethod]
00043         [TestProperty("TestSuite", "A")]
00044         [TestProperty("Description", "Verifies that ItemContainer DragStarting event gets raised.")]
00045         [TestProperty("Ignore", "True")] // Bug 43507766 - Disabled because of an assertion failure in CEventManager::Raise
00046         public void ItemsViewItemsContainerDragStartingEventRaised()
00047         {
00048             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToIntegration" }))
00049             {
00050                 Log.Comment("Retrieving cmbItemTemplate");
00051                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
00052                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
00053
00054                 Log.Comment("Retrieving lstLogs");
00055                 ListBox lstLogs = new ListBox(FindElement.ById("lstLogs"));
00056                 Verify.IsNotNull(lstLogs, "Verifying that lstLogs was found");
00057
00058                 Log.Comment("Retrieving PART_ScrollPresenter");
00059                 var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
00060                 Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");
00061
00062                 Log.Comment("Changing ItemTemplate selection to 'Small Image'");
00063                 cmbItemTemplate.SelectItemByName("Small Image");
00064                 Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
00065
00066                 // Retrieve ItemContainer to drag
00067                 Log.Comment("scrollPresenter.Children[0].Name=" + scrollPresenter.Children[0].Name);
00068                 Verify.AreEqual("ItemContainer", scrollPresenter.Children[0].Name);
00069
00070                 Rectangle itemContainerBounds = scrollPresenter.Children[0].BoundingRectangle;
00071                 Log.Comment("itemContainerBounds Bounds= X:{0}, Y:{1}, Width:{2}, Height:{3}",
00072                     itemContainerBounds.X, itemContainerBounds.Y, itemContainerBounds.Width, itemContainerBounds.Height);
00073
00074                 Point itemContainerCenter = new Point(
00075                     itemContainerBounds.X + itemContainerBounds.Width / 2,
00076                     itemContainerBounds.Y + itemContainerBounds.Height / 2);
00077
00078                 Point itemContainerBoundsOffsetCenter = new Point(
00079                     itemContainerCenter.X,
00080                     itemContainerCenter.Y + 400);
00081
00082                 Log.Comment("Dragging ItemContainer from its center down 400px");
00083                 InputHelper.Pan(
00084                     obj: scrollPresenter.Children[0],
00085                     start: itemContainerCenter,
00086                     end: itemContainerBoundsOffsetCenter,
00087                     holdDuration: 1000,
00088                     panAcceleration: 0.0f,
00089                     dragDuration: 1000,
00090                     waitForIdle: false);
00091                 Wait.ForIdle();
00092
00093                 bool foundDragStartingEvent = false;
00094                 foreach (var item in lstLogs.AllItems)
00095                 {
00096                     ListBoxItem lbItem = item as ListBoxItem;
00097                     string name = lbItem.Name;
00098                     foundDragStartingEvent = name == "ItemContainer.DragStarting";
00099                     if(foundDragStartingEvent) { break; }
00100                 }
00101
00102                 Verify.IsTrue(foundDragStartingEvent, "Verifying that DragStarted was raised.");
00103             }
00104         }
00105
00106         [TestMethod]
00107         [TestProperty("TestSuite", "A")]
00108         [TestProperty("Description", "Selects items via various interactions in Multiple Mode.")]
00109         public void ItemsViewMultipleSelectionMode()
00110         {
00111             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToSummary" }))
00112             {
00113                 SetUpItemsViewForSelectionTests("Multiple");
00114
00115                 Log.Comment("Retrieving PART_ScrollPresenter");
00116                 var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
00117                 Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");
00118
00119                 // PRIMARY INPUT
00120                 Log.Comment("scrollPresenter.Children[0].Name=" + scrollPresenter.Children[0].Name);
00121                 Verify.AreEqual("ItemContainer", scrollPresenter.Children[0].Name);
00122
00123                 Log.Comment("Select two items via left click.");
00124                 InputHelper.LeftClick(scrollPresenter.Children[9]);
00125                 InputHelper.LeftClick(scrollPresenter.Children[10]);
00126
00127                 var strSelectedItems = GetSelectedItems();
00128                 Log.Comment($"SelectedItems (1): {strSelectedItems}");
00129                 Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, ");
00130
00131                 Log.Comment("Deselect item via left click.");
00132                 InputHelper.LeftClick(scrollPresenter.Children[10]);
00133
00134                 strSelectedItems = GetSelectedItems();
00135                 Log.Comment($"SelectedItems (2): {strSelectedItems}");
00136                 Verify.AreEqual(strSelectedItems, "9 - Lorem, ");
00137
00138                 Log.Comment("Select multiple items using shift + left click.");
00139
00140                 Log.Comment("Set an anchor item.");
00141                 InputHelper.LeftClick(scrollPresenter.Children[9]);
00142                 InputHelper.LeftClick(scrollPresenter.Children[9]);
00143
00144                 Log.Comment("Shift + left click a second item.");
00145                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
00146                 InputHelper.LeftClick(scrollPresenter.Children[14]);
00147                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
00148
00149                 strSelectedItems = GetSelectedItems();
00150                 Log.Comment($"SelectedItems (3): {strSelectedItems}");
00151                 Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, 11 - Lore, 12 - Lore, 13 - Lore, 14 - Lore, ");
00152
00153                 // FOCUS INPUT
00154
00155                 Log.Comment("Deselect last selected item using LeftClick");
00156                 InputHelper.LeftClick(scrollPresenter.Children[14]);
00157
00158                 Log.Comment("Deselect items using shift + arrow");
00159                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
00160                 KeyboardHelper.PressKey(Key.Up);
00161                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
00162
00163                 strSelectedItems = GetSelectedItems();
00164                 Log.Comment($"SelectedItems (4): {strSelectedItems}");
00165                 Verify.AreEqual(strSelectedItems, "");
00166
00167                 Log.Comment("Select item to make it a selected anchor using LeftClick.");
00168                 InputHelper.LeftClick(scrollPresenter.Children[9]);
00169
00170                 strSelectedItems = GetSelectedItems();
00171                 Log.Comment($"SelectedItems (5): {strSelectedItems}");
00172                 Verify.AreEqual(strSelectedItems, "9 - Lorem, ");
00173
00174                 scrollPresenter.Children[10].SetFocus();
00175
00176                 Log.Comment("Select items using shift + arrow");
00177                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
00178                 KeyboardHelper.PressKey(Key.Down);
00179                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
00180
00181                 strSelectedItems = GetSelectedItems();
00182                 Log.Comment($"SelectedItems (6): {strSelectedItems}");
00183                 Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, 11 - Lore, 12 - Lore, 13 - Lore, 14 - Lore, ");
00184
00185                 Log.Comment("Verify navigating using the arrow keys does not change selection.");
00186
00187                 scrollPresenter.Children[16].SetFocus();
00188
00189                 KeyboardHelper.PressKey(Key.Down);
00190                 KeyboardHelper.PressKey(Key.Right);
00191
00192                 strSelectedItems = GetSelectedItems();
00193                 Log.Comment($"SelectedItems (7): {strSelectedItems}");
00194                 Verify.AreEqual(strSelectedItems, "9 - Lorem, 10 - Lore, 11 - Lore, 12 - Lore, 13 - Lore, 14 - Lore, ");
00195
00196                 ResetItemsView(cmbItemsSource: null, cmbLayout: null);
00197             }
00198         }
00199
00200         [TestMethod]
00201         [TestProperty("TestSuite", "A")]
00202         [TestProperty("Description", "Selects items via various interactions in Extended Mode.")]
00203         public void ItemsViewExtendedSelectionMode()
00204         {
00205             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToSummary" }))
00206             {
00207                 SetUpItemsViewForSelectionTests("Extended");
00208
00209                 Log.Comment("Retrieving PART_ScrollPresenter");
00210                 var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
00211                 Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");
00212
00213                 // PRIMARY INPUT
00214                 Log.Comment("scrollPresenter.Children[0].Name=" + scrollPresenter.Children[0].Name);
00215                 Verify.AreEqual("ItemContainer", scrollPresenter.Children[0].Name);
00216
00217                 Log.Comment("Select single item via LeftClick.");
00218                 InputHelper.LeftClick(scrollPresenter.Children[8]);
00219
00220                 var strSelectedItems = GetSelectedItems();
00221                 Log.Comment($"SelectedItems (1): {strSelectedItems}");
00222                 Verify.AreEqual(strSelectedItems, "8 - Lorem, ");
00223
00224                 Log.Comment("Select a different single item via LeftClick.");
00225                 InputHelper.LeftClick(scrollPresenter.Children[10]);
00226
00227                 strSelectedItems = GetSelectedItems();
00228                 Log.Comment($"SelectedItems (2): {strSelectedItems}");
00229                 Verify.AreEqual(strSelectedItems, "10 - Lore, ");
00230
00231                 Log.Comment("Select two items via Ctrl + LeftClick.");
00232                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00233                 InputHelper.LeftClick(scrollPresenter.Children[12]);
00234                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00235
00236                 strSelectedItems = GetSelectedItems();
00237                 Log.Comment($"SelectedItems (3): {strSelectedItems}");
00238                 Verify.AreEqual(strSelectedItems, "10 - Lore, 12 - Lore, ");
00239
00240                 Log.Comment("Verify Ctrl + LeftClick on a selected item deselects it.");
00241                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00242                 InputHelper.LeftClick(scrollPresenter.Children[10]);
00243                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00244
00245                 strSelectedItems = GetSelectedItems();
00246                 Log.Comment($"SelectedItems (4): {strSelectedItems}");
00247                 Verify.AreEqual(strSelectedItems, "12 - Lore, ");
00248
00249                 Log.Comment("Use Shift + LeftClick to select a range of items.");
00250
00251                 InputHelper.LeftClick(scrollPresenter.Children[13]);
00252
00253                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
00254                 InputHelper.LeftClick(scrollPresenter.Children[18]);
00255                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
00256
00257                 strSelectedItems = GetSelectedItems();
00258                 Log.Comment($"SelectedItems (5): {strSelectedItems}");
00259                 Verify.AreEqual(strSelectedItems, "13 - Lore, 14 - Lore, 15 - Lore, 16 - Lore, 17 - Lore, 18 - Lore, ");
00260
00261                 Log.Comment("Verify selecting a new range of items deselects the previous range.");
00262
00263                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00264                 InputHelper.LeftClick(scrollPresenter.Children[2]);
00265                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00266
00267                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
00268                 InputHelper.LeftClick(scrollPresenter.Children[7]);
00269                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
00270
00271                 strSelectedItems = GetSelectedItems();
00272                 Log.Comment($"SelectedItems (6): {strSelectedItems}");
00273                 Verify.AreEqual(strSelectedItems, "2 - Lorem, 3 - Lorem, 4 - Lorem, 5 - Lorem, 6 - Lorem, 7 - Lorem, ");
00274
00275                 // FOCUS INPUT
00276
00277                 Log.Comment("Verify focus changes selection when navigating using arrow keys.");
00278
00279                 InputHelper.LeftClick(scrollPresenter.Children[9]);
00280                 KeyboardHelper.PressKey(Key.Down);
00281
00282                 strSelectedItems = GetSelectedItems();
00283                 Log.Comment($"SelectedItems (7): {strSelectedItems}");
00284                 Verify.AreEqual(strSelectedItems, "14 - Lore, ");
00285
00286                 Log.Comment("Verify focus does not change selection when navigating using ctrl + arrow keys.");
00287
00288                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00289                 KeyboardHelper.PressKey(Key.Down);
00290                 KeyboardHelper.PressKey(Key.Right);
00291                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00292
00293                 strSelectedItems = GetSelectedItems();
00294                 Log.Comment($"SelectedItems (8): {strSelectedItems}");
00295                 Verify.AreEqual(strSelectedItems, "14 - Lore, ");
00296
00297                 Log.Comment("Verify Shift + Arrow Key selects a range.");
00298
00299                 scrollPresenter.Children[16].SetFocus();
00300                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
00301                 KeyboardHelper.PressKey(Key.Down);
00302                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
00303
00304                 strSelectedItems = GetSelectedItems();
00305                 Log.Comment($"SelectedItems (9): {strSelectedItems}");
00306                 Verify.AreEqual(strSelectedItems, "14 - Lore, 15 - Lore, 16 - Lore, 17 - Lore, 18 - Lore, 19 - Lore, ");
00307
00308                 Log.Comment("Verify Shift + Ctrl + Arrow Key selects a range while preserving previously selected range.");
00309
00310                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00311                 InputHelper.LeftClick(scrollPresenter.Children[2]);
00312                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00313
00314                 KeyboardHelper.PressDownModifierKey(ModifierKey.Shift, true, false);
00315                 KeyboardHelper.PressDownModifierKey(ModifierKey.Control, true, false);
00316                 KeyboardHelper.PressKey(Key.Down);
00317                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Shift, true, false);
00318                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Control, true, false);
00319
00320                 strSelectedItems = GetSelectedItems();
00321                 Log.Comment($"SelectedItems (10): {strSelectedItems}");
00322                 Verify.AreEqual(strSelectedItems, "2 - Lorem, 3 - Lorem, 4 - Lorem, 5 - Lorem, 6 - Lorem, 7 - Lorem, 14 - Lore, 15 - Lore, 16 - Lore, 17 - Lore, 18 - Lore, 19 - Lore, ");
00323
00324                 ResetItemsView(cmbItemsSource: null, cmbLayout: null);
00325             }
00326         }
00327
00328         [TestMethod]
00329         [TestProperty("TestSuite", "A")]
00330         [TestProperty("Description", "Listens to the ItemsView.ItemInvoked event with ItemContainer and SelectionMode=None.")]
00331         [TestProperty("Ignore", "True")] // Bug 45295321
00332         public void VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndNoSelection()
00333         {
00334             VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: true, selectionMode: "None");
00335             VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: false, selectionMode: "None");
00336         }
00337
00338         [TestMethod]
00339         [TestProperty("TestSuite", "A")]
00340         [TestProperty("Description", "Listens to the ItemsView.ItemInvoked event with ItemContainer and SelectionMode=Single.")]
00341         public void VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndSingleSelection()
00342         {
00343             VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: true, selectionMode: "Single");
00344             VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: false, selectionMode: "Single");
00345         }
00346
00347         [TestMethod]
00348         [TestProperty("TestSuite", "A")]
00349         [TestProperty("Description", "Listens to the ItemsView.ItemInvoked event with ItemContainer and SelectionMode=Multiple.")]
00350         public void VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndMultipleSelection()
00351         {
00352             VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: true, selectionMode: "Multiple");
00353             VerifyItemsViewItemInvokedEvent(useItemContainer: true, isItemInvokedEnabled: false, selectionMode: "Multiple");
00354         }
00355
00356         [TestMethod]
00357         [TestProperty("TestSuite", "A")]
00358         [TestProperty("Description", "Listens to the ItemsView.ItemInvoked event without ItemContainer and SelectionMode=None.")]
00359         [TestProperty("Ignore", "True")] // Turned off for Bug 45295321 & while ItemTemplate's root element must be an ItemContainer.
00360         public void VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndNoSelection()
00361         {
00362             VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: true, selectionMode: "None");
00363             VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: false, selectionMode: "None");
00364         }
00365
00366         [TestMethod]
00367         [TestProperty("TestSuite", "A")]
00368         [TestProperty("Description", "Listens to the ItemsView.ItemInvoked event without ItemContainer and SelectionMode=Single.")]
00369         [TestProperty("Ignore", "True")] // Turned off while ItemTemplate's root element must be an ItemContainer.
00370         public void VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndSingleSelection()
00371         {
00372             VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: true, selectionMode: "Single");
00373             VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: false, selectionMode: "Single");
00374         }
00375
00376         [TestMethod]
00377         [TestProperty("TestSuite", "A")]
00378         [TestProperty("Description", "Listens to the ItemsView.ItemInvoked event without ItemContainer and SelectionMode=Multiple.")]
00379         [TestProperty("Ignore", "True")] // Turned off while ItemTemplate's root element must be an ItemContainer.
00380         public void VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndMultipleSelection()
00381         {
00382             VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: true, selectionMode: "Multiple");
00383             VerifyItemsViewItemInvokedEvent(useItemContainer: false, isItemInvokedEnabled: false, selectionMode: "Multiple");
00384         }
00385
00386         [TestMethod]
00387         [TestProperty("TestSuite", "A")]
00388         [TestProperty("Description", "Pans the ScrollView in an ItemsView.")]
00389         [TestProperty("Ignore", "True")] // Bug 41224237: ItemsViewTestsWithInputHelper.PanItemsView fails in the lab
00390         public void PanItemsView()
00391         {
00392             Log.Comment("Selecting ItemsView interactive tests");
00393
00394             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
00395             {
00396                 Log.Comment("Retrieving cmbItemTemplate");
00397                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
00398                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
00399
00400                 Log.Comment("Retrieving cmbItemsSource");
00401                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
00402                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
00403
00404                 Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium StackPanel)'");
00405                 cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium StackPanel)");
00406                 Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
00407
00408                 Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
00409                 cmbItemsSource.SelectItemByName("List<Entity>");
00410                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
00411
00412                 // Tapping button before attempting pan operation to guarantee effective touch input
00413                 TapResetScrollViewButton();
00414
00415                 Log.Comment("Panning ScrollView in diagonal");
00416                 PrepareForScrollViewManipulationStart();
00417
00418                 Log.Comment("Retrieving itemsView");
00419                 UIObject itemsViewUIObject = FindElement.ByName("itemsView");
00420                 Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
00421
00422                 Log.Comment("Retrieving PART_ScrollView");
00423                 UIObject scrollViewUIObject = itemsViewUIObject.FirstChild;
00424                 Verify.IsNotNull(scrollViewUIObject, "Verifying that PART_ScrollView was found");
00425
00426                 Log.Comment("Retrieving PART_ScrollPresenter as a UIObject");
00427                 UIObject scrollPresenterUIObject = FindElement.ById("PART_ScrollPresenter");
00428                 Verify.IsNotNull(scrollPresenterUIObject, "Verifying that PART_ScrollView.PART_Root.PART_ScrollPresenter was found");
00429
00430                 Log.Comment("Retrieving PART_ScrollPresenter as a ScrollPresenter");
00431                 ScrollPresenter scrollPresenter = new ScrollPresenter(scrollPresenterUIObject);
00432                 Verify.IsNotNull(scrollPresenter, "Verifying that scrollPresenter was found");
00433
00434                 InputHelper.Pan(
00435                     scrollPresenter,
00436                     new Point(scrollPresenter.BoundingRectangle.Left + 25, scrollPresenter.BoundingRectangle.Top + 25),
00437                     new Point(scrollPresenter.BoundingRectangle.Left - 25, scrollPresenter.BoundingRectangle.Top - 25));
00438
00439                 Log.Comment("Waiting for PART_ScrollView pan completion");
00440                 WaitForScrollViewManipulationEnd("PART_ScrollView");
00441
00442                 Log.Comment("scrollPresenter.HorizontalScrollPercent={0}", scrollPresenter.HorizontalScrollPercent);
00443                 Log.Comment("scrollPresenter.VerticalScrollPercent={0}", scrollPresenter.VerticalScrollPercent);
00444                 Log.Comment("scrollPresenter.VerticalViewSize={0}", scrollPresenter.VerticalViewSize);
00445                 Log.Comment("scrollPresenter.BoundingRectangle.Height={0}", scrollPresenter.BoundingRectangle.Height);
00446
00447                 if (scrollPresenter.HorizontalScrollPercent > 0.0 || scrollPresenter.VerticalScrollPercent <= 1.0)
00448                 {
00449                     LogAndClearTraces();
00450                 }
00451
00452                 Verify.AreEqual(-1.0, scrollPresenter.HorizontalScrollPercent, "Verifying scrollPresenter HorizontalScrollPercent is -1.");
00453                 Verify.IsLessThan(1.0, scrollPresenter.VerticalScrollPercent, "Verifying scrollPresenter VerticalScrollPercent is greater than 1%");
00454
00455                 double horizontalOffset;
00456                 double verticalOffset;
00457                 double verticalExtent = 100.0 * scrollPresenter.BoundingRectangle.Height / scrollPresenter.VerticalViewSize;
00458                 double minVerticalOffset = verticalExtent / 100.0;
00459                 float zoomFactor;
00460
00461                 GetScrollViewView(out horizontalOffset, out verticalOffset, out zoomFactor);
00462                 Log.Comment("horizontalOffset={0}", horizontalOffset);
00463                 Log.Comment("verticalOffset={0}", verticalOffset);
00464                 Log.Comment("zoomFactor={0}", zoomFactor);
00465                 Verify.AreEqual(0.0, horizontalOffset, "Verifying horizontalOffset is 0.0");
00466                 Verify.IsTrue(verticalOffset > minVerticalOffset, "Verifying verticalOffset is greater than " + minVerticalOffset);
00467                 Verify.AreEqual(1.0f, zoomFactor, "Verifying zoomFactor is 1.0f");
00468
00469                 ResetItemsView(cmbItemsSource, cmbLayout: null);
00470
00471                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
00472             }
00473         }
00474
00475         [TestMethod]
00476         [TestProperty("TestSuite", "A")]
00477         [TestProperty("Description", "Exercises the PageDown/PageUp, Home/End, Left/Right/Down/Up keys in an ItemsView with LinedFlowLayout.")]
00478         public void KeyboardNavigationInItemsViewWithLinedFlowLayout()
00479         {
00480             KeyboardNavigationWithLayout(layout: "LinedFlowLayout", useLateralMoves: true);
00481         }
00482
00483         [TestMethod]
00484         [TestProperty("TestSuite", "A")]
00485         [TestProperty("Description", "Exercises the PageDown/PageUp, Home/End, Left/Right/Down/Up keys in an ItemsView with LinedFlowLayout & focusable control inside ItemContainer.")]
00486         public void KeyboardNavigationInItemsViewWithLinedFlowLayoutAndInnerFocusableControl()
00487         {
00488             KeyboardNavigationWithLayout(layout: "LinedFlowLayout", useLateralMoves: true, useFocusableControlInItemContainer: true);
00489         }
00490
00491         [TestMethod]
00492         [TestProperty("TestSuite", "A")]
00493         [TestProperty("Description", "Exercises the PageDown/PageUp, Home/End, Left/Right/Down/Up keys in an ItemsView with StackLayout.")]
00494         public void KeyboardNavigationInItemsViewWithStackLayout()
00495         {
00496             KeyboardNavigationWithLayout(layout: "StackLayout", useLateralMoves: false);
00497         }
00498
00499         [TestMethod]
00500         [TestProperty("TestSuite", "A")]
00501         [TestProperty("Ignore", "True")] // Bug 42152134: UniformGridLayout: Application hangs when hitting End key in ItemsView
00502         [TestProperty("Description", "Exercises the PageDown/PageUp, Home/End, Left/Right/Down/Up keys in an ItemsView with UniformGridLayout.")]
00503         public void KeyboardNavigationInItemsViewWithUniformGridLayout()
00504         {
00505             KeyboardNavigationWithLayout(layout: "UniformGridLayout", useLateralMoves: true);
00506         }
00507
00508         [TestMethod]
00509         [TestProperty("TestSuite", "A")]
00510         [TestProperty("Description", "Exercises the Down key at a rapid pace in an ItemsView with LinedFlowLayout.")]
00511         public void KeyDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes()
00512         {
00513             KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.Down);
00514         }
00515
00516         [TestMethod]
00517         [TestProperty("TestSuite", "A")]
00518         [TestProperty("Description", "Exercises the PageDown key at a rapid pace in an ItemsView with LinedFlowLayout.")]
00519         public void KeyPageDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes()
00520         {
00521             KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.PageDown);
00522         }
00523
00524         [TestMethod]
00525         [TestProperty("TestSuite", "A")]
00526         [TestProperty("Description", "Exercises the Up key at a rapid pace in an ItemsView with LinedFlowLayout.")]
00527         public void KeyUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes()
00528         {
00529             KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.Up);
00530         }
00531
00532         [TestMethod]
00533         [TestProperty("TestSuite", "A")]
00534         [TestProperty("Description", "Exercises the PageUp key at a rapid pace in an ItemsView with LinedFlowLayout.")]
00535         public void KeyPageUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes()
00536         {
00537             KeyboardNavigationWithFastKeystrokes(layout: "LinedFlowLayout", key: Key.PageUp);
00538         }
00539
00540         [TestMethod]
00541         [TestProperty("TestSuite", "A")]
00542         [TestProperty("Description", "Exercises the Down key at a rapid pace in an ItemsView with StackLayout.")]
00543         public void KeyDownInItemsViewAndStackLayoutWithFastKeystrokes()
00544         {
00545             KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.Down);
00546         }
00547
00548         [TestMethod]
00549         [TestProperty("TestSuite", "A")]
00550         [TestProperty("Description", "Exercises the PageDown key at a rapid pace in an ItemsView with StackLayout.")]
00551         public void KeyPageDownInItemsViewAndStackLayoutWithFastKeystrokes()
00552         {
00553             KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.PageDown);
00554         }
00555
00556         [TestMethod]
00557         [TestProperty("TestSuite", "A")]
00558         [TestProperty("Description", "Exercises the Up key at a rapid pace in an ItemsView with StackLayout.")]
00559         public void KeyUpInItemsViewAndStackLayoutWithFastKeystrokes()
00560         {
00561             KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.Up);
00562         }
00563
00564         [TestMethod]
00565         [TestProperty("TestSuite", "A")]
00566         [TestProperty("Description", "Exercises the PageUp key at a rapid pace in an ItemsView with StackLayout.")]
00567         public void KeyPageUpInItemsViewAndStackLayoutWithFastKeystrokes()
00568         {
00569             KeyboardNavigationWithFastKeystrokes(layout: "StackLayout", key: Key.PageUp);
00570         }
00571
00572         [TestMethod]
00573         [TestProperty("TestSuite", "B")]
00574         [TestProperty("Description", "Exercises the Tab and Shift-Tab keystrokes to navigate through the ItemsView control with ItemContainers and Single SelectionMode.")]
00575         public void TabNavigationThroughItemsViewWithItemContainersAndSingleSelectionMode()
00576         {
00577             TabNavigationThroughItemsView(useItemContainer: true, selectionMode: "Single");
00578         }
00579
00580         [TestMethod]
00581         [TestProperty("TestSuite", "B")]
00582         [TestProperty("Description", "Exercises the Tab and Shift-Tab keystrokes to navigate through the ItemsView control with ItemContainers and Multiple SelectionMode.")]
00583         public void TabNavigationThroughItemsViewWithItemContainersAndMultipleSelectionMode()
00584         {
00585             TabNavigationThroughItemsView(useItemContainer: true, selectionMode: "Multiple");
00586         }
00587
00588         [TestMethod]
00589         [TestProperty("TestSuite", "B")]
00590         [TestProperty("Description", "Exercises the Tab and Shift-Tab keystrokes to navigate through the ItemsView control without ItemContainers and Single SelectionMode.")]
00591         [TestProperty("Ignore", "True")] // Turned off while ItemTemplate's root element must be an ItemContainer.
00592         public void TabNavigationThroughItemsViewWithContentControlsAndSingleSelectionMode()
00593         {
00594             TabNavigationThroughItemsView(useItemContainer: false, selectionMode: "Single");
00595         }
00596
00597         [TestMethod]
00598         [TestProperty("TestSuite", "B")]
00599         [TestProperty("Description", "Scrolls & zooms the ItemsView. Then tabs into it. Ensures first displayed items gets focus.")]
00600         public void TabIntoItemsViewWithoutCurrentItem()
00601         {
00602             TabIntoItemsViewWithoutCurrentItem(useShiftTab: false);
00603         }
00604
00605         [TestMethod]
00606         [TestProperty("TestSuite", "B")]
00607         [TestProperty("Description", "Scrolls & zooms the ItemsView. Then shift-tabs into it. Ensures last displayed items gets focus.")]
00608         public void ShiftTabIntoItemsViewWithoutCurrentItem()
00609         {
00610             TabIntoItemsViewWithoutCurrentItem(useShiftTab: true);
00611         }
00612
00613         [TestMethod]
00614         [TestProperty("TestSuite", "B")]
00615         [TestProperty("Description", "Pans the AnnotatedScrollBar vertically to jump to a disconnected offset in the ItemsView and trigger multiple more scrolls, using the LinedFlowLayout fast path.")]
00616         [TestProperty("Ignore", "True")] // Bug 43507766 - Disabled because of an assertion failure in CEventManager::Raise
00617         public void PanAnnotatedScrollBarWithItemsInfo()
00618         {
00619             PanAnnotatedScrollBar(handleItemsInfoRequested: true);
00620         }
00621
00622         [TestMethod]
00623         [TestProperty("TestSuite", "B")]
00624         [TestProperty("Description", "Pans the AnnotatedScrollBar vertically to jump to a disconnected offset in the ItemsView and trigger multiple more scrolls, using the LinedFlowLayout regular path.")]
00625         [TestProperty("Ignore", "True")] // Bug 43507766 - Disabled because of an assertion failure in CEventManager::Raise
00626         public void PanAnnotatedScrollBarWithoutItemsInfo()
00627         {
00628             PanAnnotatedScrollBar(handleItemsInfoRequested: false);
00629         }
00630
00631         [TestMethod]
00632         [TestProperty("TestSuite", "B")]
00633         [TestProperty("Description", "Exercises the ItemsView.StartBringItemIntoView method to bring items to the top of the viewport.")]
00634         [TestProperty("TestPass:MinOSVer", WindowsOSVersion._21H2)] // Test hangs with Windows 10.
00635         public void StartBringItemIntoView()
00636         {
00637             StartBringItemIntoView(false /*clearItemAspectRatios*/);
00638             StartBringItemIntoView(true /*clearItemAspectRatios*/);
00639         }
00640
00641         [TestMethod]
00642         [TestProperty("TestSuite", "B")]
00643         [TestProperty("Description", "Exercises the ItemsView.StartBringItemIntoView method asynchronously to bring the scrolled-off focused item into the viewport.")]
00644         [TestProperty("TestPass:MinOSVer", WindowsOSVersion._21H2)] // Test hangs with Windows 10.
00645         public void BringFocusedItemIntoView()
00646         {
00647             Log.Comment("Selecting ItemsView summary page");
00648
00649             ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };
00650
00651             using (var setup = new ItemsViewTestSetupHelper(
00652                 testNames: new[] { "ItemsView Tests", "navigateToSummary" },
00653                 options: null,
00654                 shouldRestrictInnerFrameSize: false,
00655                 outputDebugStringLevel: "Info",
00656                 outputDebugStringComponentTypes: outputDebugStringComponentTypes))
00657             {
00658                 using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
00659                 {
00660                     Log.Comment("Retrieving cmbLayout");
00661                     UIObject cmbLayoutUIObject = FindElement.ById("cmbLayout");
00662                     Verify.IsNotNull(cmbLayoutUIObject, "Verifying that cmbLayout was found");
00663                     ComboBox layoutComboBox = new ComboBox(cmbLayoutUIObject);
00664
00665                     Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
00666                     layoutComboBox.SelectItemByName("LinedFlowLayout");
00667                     Log.Comment("Selection is now {0}", layoutComboBox.Selection[0].Name);
00668
00669                     Log.Comment("Retrieving cmbItemTemplate");
00670                     UIObject cmbItemTemplateUIObject = FindElement.ById("cmbItemTemplate");
00671                     Verify.IsNotNull(cmbItemTemplateUIObject, "Verifying that cmbItemTemplate was found");
00672                     ComboBox itemTemplateComboBox = new ComboBox(cmbItemTemplateUIObject);
00673
00674                     Log.Comment("Changing cmbItemTemplate selection to 'Fixed-Height ItemContainer (Image + TextBlock)'");
00675                     itemTemplateComboBox.SelectItemByName("Fixed-Height ItemContainer (Image + TextBlock)");
00676                     Log.Comment("Selection is now {0}", itemTemplateComboBox.Selection[0].Name);
00677
00678                     Log.Comment("Retrieving cmbItemsSource");
00679                     UIObject cmbItemsSourceUIObject = FindElement.ById("cmbItemsSource");
00680                     Verify.IsNotNull(cmbItemsSourceUIObject, "Verifying that cmbItemsSource was found");
00681                     ComboBox itemsSourceComboBox = new ComboBox(cmbItemsSourceUIObject);
00682
00683                     Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
00684                     itemsSourceComboBox.SelectItemByName("ObservableCollection<Entity>");
00685                     Log.Comment("Selection is now {0}", itemsSourceComboBox.Selection[0].Name);
00686
00687                     Log.Comment("Retrieving & filling txtItemsViewMethodIndex");
00688                     UIObject txtItemsViewMethodIndexUIObject = FindElement.ById("txtItemsViewMethodIndex");
00689                     Verify.IsNotNull(txtItemsViewMethodIndexUIObject, "Verifying that itemsViewMethodIndexTextBox was found");
00690                     Edit itemsViewMethodIndexTextBox = new Edit(txtItemsViewMethodIndexUIObject);
00691
00692                     itemsViewMethodIndexTextBox.SetValueAndWait("5");
00693                     Wait.ForIdle();
00694
00695                     Log.Comment("Retrieving & filling txtBringIntoViewOptionsVerticalAlignmentRatio");
00696                     UIObject txtBringIntoViewOptionsVerticalAlignmentRatioUIObject = FindElement.ById("txtBringIntoViewOptionsVerticalAlignmentRatio");
00697                     Verify.IsNotNull(txtBringIntoViewOptionsVerticalAlignmentRatioUIObject, "Verifying that txtBringIntoViewOptionsVerticalAlignmentRatio was found");
00698                     Edit bringIntoViewOptionsVerticalAlignmentRatioTextBox = new Edit(txtBringIntoViewOptionsVerticalAlignmentRatioUIObject);
00699
00700                     bringIntoViewOptionsVerticalAlignmentRatioTextBox.SetValueAndWait("0");
00701                     Wait.ForIdle();
00702
00703                     Log.Comment("Retrieving btnItemsViewStartBringItemIntoView");
00704                     UIObject btnItemsViewStartBringItemIntoViewUIObject = FindElement.ById("btnItemsViewStartBringItemIntoView");
00705                     Verify.IsNotNull(btnItemsViewStartBringItemIntoViewUIObject, "Verifying that btnItemsViewStartBringItemIntoView was found");
00706                     Button itemsViewStartBringItemIntoViewButton = new Button(btnItemsViewStartBringItemIntoViewUIObject);
00707
00708                     Log.Comment("Invoking btnItemsViewStartBringItemIntoView");
00709                     itemsViewStartBringItemIntoViewButton.Invoke();
00710                     Wait.ForIdle();
00711
00712                     Log.Comment("Retrieving btnGetVerticalOffset");
00713                     UIObject btnGetVerticalOffsetUIObject = FindElement.ById("btnGetVerticalOffset");
00714                     Verify.IsNotNull(btnGetVerticalOffsetUIObject, "Verifying that btnGetVerticalOffset was found");
00715                     Button getVerticalOffsetButton = new Button(btnGetVerticalOffsetUIObject);
00716
00717                     Log.Comment("Invoking btnGetVerticalOffset");
00718                     getVerticalOffsetButton.Invoke();
00719                     Wait.ForIdle();
00720
00721                     Log.Comment("Retrieving txtVerticalOffset");
00722                     UIObject txtVerticalOffsetUIObject = FindElement.ById("txtVerticalOffset");
00723                     Verify.IsNotNull(txtVerticalOffsetUIObject, "Verifying that txtVerticalOffset was found");
00724                     Edit verticalOffsetTextBox = new Edit(txtVerticalOffsetUIObject);
00725
00726                     Log.Comment($"ScrollView.VerticalOffset={verticalOffsetTextBox.Value}");
00727                     Verify.AreEqual("96", verticalOffsetTextBox.Value, "Verifying that one line was scrolled off");
00728
00729                     Log.Comment("Retrieving btnItemsViewStartBringItemIntoViewAsync");
00730                     Button btnItemsViewStartBringItemIntoViewAsync = new Button(FindElement.ById("btnItemsViewStartBringItemIntoViewAsync"));
00731                     Verify.IsNotNull(btnItemsViewStartBringItemIntoViewAsync, "Verifying that btnItemsViewStartBringItemIntoViewAsync was found");
00732
00733                     Log.Comment("Invoking btnItemsViewStartBringItemIntoViewAsync");
00734                     btnItemsViewStartBringItemIntoViewAsync.Invoke();
00735                     Wait.ForIdle();
00736
00737                     Log.Comment("Retrieving markupItemsView");
00738                     UIObject markupItemsViewUIObject = FindElement.ById("markupItemsView");
00739                     Verify.IsNotNull(markupItemsViewUIObject, "Verifying that markupItemsView was found");
00740
00741                     Log.Comment("Clicking on ItemsView to focus first item.");
00742                     markupItemsViewUIObject.Click(PointerButtons.Primary, 20.0, 20.0);
00743                     Wait.ForIdle();
00744
00745                     for (int mouseWheelIncrement = 0; mouseWheelIncrement < 4; mouseWheelIncrement++)
00746                     {
00747                         Log.Comment("Scrolling ItemsView with mouse wheel so focused first item gets put into the pinned pool");
00748                         InputHelper.RotateWheel(markupItemsViewUIObject, -2400);
00749                         Wait.ForIdle();
00750                     }
00751
00752                     Log.Comment("Waiting for asynchronous StartBringItemIntoView gets launched and completes.");
00753
00754                     Log.Comment("Invoking btnGetVerticalOffset until VerticalOffset is back to 96.");
00755                     for (int waitCount = 0; waitCount < 100; waitCount++)
00756                     {
00757                         Wait.ForMilliseconds(125);
00758                         getVerticalOffsetButton.Invoke();
00759                         Wait.ForIdle();
00760                         if (verticalOffsetTextBox.Value == "96")
00761                         {
00762                             Log.Comment($"VerticalOffset back to 96 when waitCount={waitCount}");
00763                             break;
00764                         }
00765                     }
00766
00767                     Verify.AreEqual("96", verticalOffsetTextBox.Value, "Verifying that one line is scrolled off again");
00768
00769                     Log.Comment("Retrieving btnClearLogs");
00770                     Button btnClearLogs = new Button(FindElement.ById("btnClearLogs"));
00771                     Verify.IsNotNull(btnClearLogs, "Verifying that btnClearLogs was found");
00772
00773                     Log.Comment("Invoke btnClearLogs.");
00774                     btnClearLogs.Invoke();
00775                     Wait.ForIdle();
00776
00777                     LogAndClearTraces();
00778                     Wait.ForIdle();
00779
00780                     ResetItemsView(itemsSourceComboBox, layoutComboBox);
00781                 }
00782             }
00783         }
00784
00785         [TestMethod]
00786         [TestProperty("TestSuite", "B")]
00787         [TestProperty("Description", "Ensures clicking ItemContainer in ItemsView brings it into view.")]
00788         public void ClickedItemBroughtIntoView()
00789         {
00790             Log.Comment("Selecting ItemsView interactive tests");
00791
00792             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
00793             {
00794                 Log.Comment("Retrieving cmbItemTemplate");
00795                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
00796                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
00797
00798                 Log.Comment("Retrieving cmbItemsSource");
00799                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
00800                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
00801
00802                 Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
00803                 cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
00804                 Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
00805
00806                 Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
00807                 cmbItemsSource.SelectItemByName("List<Entity>");
00808                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
00809
00810                 Log.Comment("Retrieving itemsView");
00811                 UIObject itemsViewUIObject = FindElement.ByName("itemsView");
00812                 Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
00813
00814                 int currentItemIndex = GetCurrentItemIndex();
00815                 Verify.AreEqual(-1, currentItemIndex, "Verifying CurrentItemIndex is initially -1");
00816
00817                 Log.Comment("Clicking on ItemsView to select last partially visible item.");
00818                 itemsViewUIObject.Click(PointerButtons.Primary, 40.0, itemsViewUIObject.BoundingRectangle.Height - 4.0);
00819                 Wait.ForIdle();
00820
00821                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 76);
00822                 currentItemIndex = GetCurrentItemIndex();
00823                 Verify.AreEqual(5, currentItemIndex, "Verifying CurrentItemIndex is 5");
00824
00825                 Log.Comment("Clicking on ItemsView to select first partially visible item.");
00826                 itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 4.0);
00827                 Wait.ForIdle();
00828
00829                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 0);
00830                 currentItemIndex = GetCurrentItemIndex();
00831                 Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
00832
00833                 ResetItemsView(cmbItemsSource, cmbLayout: null);
00834             }
00835         }
00836
00837         [TestMethod]
00838         [TestProperty("TestSuite", "B")]
00839         [TestProperty("Description", "Starts an item drag operation after a pan.")]
00840         [TestProperty("Ignore", "True")] // Bug 44960897 - Inability to initiate item drag in ItemsView, on Win10 OS
00841         public void CanDragItemContainerAfterPan()
00842         {
00843             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToSummary" }))
00844             {
00845                 Log.Comment("Turning on item drag option.");
00846
00847                 Log.Comment("Retrieving chkSetItemsRepeaterElementCanDrag");
00848                 CheckBox chkSetItemsRepeaterElementCanDrag = new CheckBox(FindElement.ById("chkSetItemsRepeaterElementCanDrag"));
00849                 Verify.IsNotNull(chkSetItemsRepeaterElementCanDrag, "Verifying that chkSetItemsRepeaterElementCanDrag was found");
00850
00851                 if (ToggleState.Off == chkSetItemsRepeaterElementCanDrag.ToggleState)
00852                 {
00853                     Log.Comment("Toggling chkSetItemsRepeaterElementCanDrag.IsChecked to ToggleState.On");
00854                     chkSetItemsRepeaterElementCanDrag.Toggle();
00855                     Wait.ForIdle();
00856                     Verify.AreEqual(ToggleState.On, chkSetItemsRepeaterElementCanDrag.ToggleState);
00857                 }
00858
00859                 Log.Comment("Retrieving chkItemsRepeaterElementCanDrag");
00860                 CheckBox chkItemsRepeaterElementCanDrag = new CheckBox(FindElement.ById("chkItemsRepeaterElementCanDrag"));
00861                 Verify.IsNotNull(chkItemsRepeaterElementCanDrag, "Verifying that chkItemsRepeaterElementCanDrag was found");
00862
00863                 if (ToggleState.Off == chkItemsRepeaterElementCanDrag.ToggleState)
00864                 {
00865                     Log.Comment("Toggling chkItemsRepeaterElementCanDrag.IsChecked to ToggleState.On");
00866                     chkItemsRepeaterElementCanDrag.Toggle();
00867                     Wait.ForIdle();
00868                     Verify.AreEqual(ToggleState.On, chkItemsRepeaterElementCanDrag.ToggleState);
00869                 }
00870
00871                 Log.Comment("Setting up ItemsView.");
00872
00873                 Log.Comment("Retrieving cmbItemTemplate");
00874                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
00875                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
00876
00877                 Log.Comment("Changing cmbItemTemplate selection to 'ItemContainer (Image)'");
00878                 cmbItemTemplate.SelectItemByName("ItemContainer (Image)");
00879                 Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
00880
00881                 Log.Comment("Retrieving cmbItemsSource");
00882                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
00883                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
00884
00885                 Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
00886                 cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
00887                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
00888
00889                 Log.Comment("Retrieving and selecting first ItemContainer.");
00890
00891                 Log.Comment("Retrieving PART_ScrollPresenter");
00892                 var scrollPresenter = FindElement.ById("PART_ScrollPresenter");
00893                 Verify.IsNotNull(scrollPresenter, "Verifying that PART_ScrollPresenter was found");
00894
00895                 UIObject itemContainer = scrollPresenter.Children[0];
00896                 Verify.IsNotNull(itemContainer, "Verifying that itemContainer is set");
00897
00898                 Log.Comment("itemContainer.Name=" + itemContainer.Name);
00899                 Verify.AreEqual("ItemContainer", itemContainer.Name);
00900
00901                 Log.Comment("Select single item via LeftClick.");
00902                 InputHelper.LeftClick(itemContainer);
00903
00904                 Rectangle itemContainerBounds = itemContainer.BoundingRectangle;
00905                 Log.Comment("itemContainerBounds Bounds= X:{0}, Y:{1}, Width:{2}, Height:{3}",
00906                     itemContainerBounds.X, itemContainerBounds.Y, itemContainerBounds.Width, itemContainerBounds.Height);
00907
00908                 Point itemContainerCenter = new Point(
00909                     itemContainerBounds.X + itemContainerBounds.Width / 2,
00910                     itemContainerBounds.Y + itemContainerBounds.Height / 2);
00911
00912                 Point itemContainerBoundsOffsetCenterForPan = new Point(
00913                     itemContainerCenter.X,
00914                     itemContainerCenter.Y - 50);
00915
00916                 Log.Comment("Panning down with touch.");
00917                 InputHelper.Pan(
00918                     obj: itemContainer,
00919                     start: itemContainerCenter,
00920                     end: itemContainerBoundsOffsetCenterForPan,
00921                     holdDuration: 20,
00922                     panAcceleration: 0.0f,
00923                     dragDuration: 500,
00924                     waitForIdle: false);
00925                 Wait.ForIdle();
00926
00927                 Point itemContainerBoundsOffsetCenterForDrag = new Point(
00928                     itemContainerCenter.X + 200,
00929                     itemContainerCenter.Y);
00930
00931                 Log.Comment("Dragging ItemContainer from its center, 200px to the right");
00932                 InputHelper.Pan(
00933                     obj: itemContainer,
00934                     start: itemContainerCenter,
00935                     end: itemContainerBoundsOffsetCenterForDrag,
00936                     holdDuration: 1500,
00937                     panAcceleration: 0.0f,
00938                     dragDuration: 1000,
00939                     waitForIdle: false);
00940                 Wait.ForIdle();
00941
00942                 Log.Comment("Retrieving lstLogs");
00943                 ListBox lstLogs = new ListBox(FindElement.ById("lstLogs"));
00944                 Verify.IsNotNull(lstLogs, "Verifying that lstLogs was found");
00945
00946                 bool foundDragStartingEvent = false;
00947
00948                 foreach (var item in lstLogs.AllItems)
00949                 {
00950                     ListBoxItem lbItem = item as ListBoxItem;
00951                     string log = lbItem.Name;
00952
00953                     Log.Comment("Log:" + log);
00954
00955                     if (!foundDragStartingEvent)
00956                     {
00957                         foundDragStartingEvent = log == "UIElement_DragStarting AllowedOperations=Copy, Move, Link";
00958                     }
00959                 }
00960
00961                 Verify.IsTrue(foundDragStartingEvent, "Verifying that UIElement.DragStarting was raised.");
00962
00963                 ResetItemsView(cmbItemsSource, cmbLayout: null);
00964             }
00965         }
00966
00967         [TestMethod]
00968         [TestProperty("TestSuite", "B")]
00969         [TestProperty("Description", "Verifies that the ItemCollectionTransitionProvider animations complete with the expected values in the TransitionCompleted event args.")]
00970         public void VerifyItemCollectionTransitionProviderAnimations()
00971         {
00972             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToTransitionProvider" }))
00973             {
00974                 var addButton = FindElement.ById<Button>("AddButton");
00975                 var deleteButton = FindElement.ById<Button>("DeleteButton");
00976                 var moveButton = FindElement.ById<Button>("MoveButton");
00977                 var refreshButton = FindElement.ById<Button>("RefreshButton");
00978                 var clearHistoryButton = FindElement.ById<Button>("ClearHistoryButton");
00979                 var historyTextBox = FindElement.ById<Edit>("TransitionCompletedHistoryTextBox");
00980
00981                 Log.Comment("Refreshing the item list...");
00982                 string expectedHistoryAfterRefresh = "Operation = Add, Triggers = CollectionChangeReset, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)\r\nOperation = Move, Triggers = LayoutTransition, OldBounds = (0, 0, 1, 96), NewBounds = (0, 0, 160, 96)";
00983
00984                 using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterRefresh))
00985                 {
00986                     refreshButton.InvokeAndWait();
00987                 }
00988
00989                 clearHistoryButton.InvokeAndWait();
00990                 Log.Comment("Adding a new item to the start...");
00991                 string expectedHistoryAfterAdd = "Operation = Add, Triggers = CollectionChangeAdd, OldBounds = 0,0,0,0, NewBounds = 0,0,0,0\r\nOperation = Move, Triggers = CollectionChangeAdd, OldBounds = (0, 0, 160, 96), NewBounds = (281, 0, 160, 96)";
00992
00993                 using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterAdd))
00994                 {
00995                     addButton.InvokeAndWait();
00996                 }
00997
00998                 clearHistoryButton.InvokeAndWait();
00999                 Log.Comment("Selecting the second item...");
01000                 ListViewItem secondItem = FindElement.ById<ListViewItem>("ms-appx:///Images/vette1.jpg");
01001                 secondItem.Select();
01002                 Wait.ForIdle();
01003                 Log.Comment("Moving the second item to be first...");
01004                 string expectedHistoryAfterMove = "Operation = Add, Triggers = CollectionChangeAdd, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)\r\nOperation = Move, Triggers = CollectionChangeAdd, CollectionChangeRemove, OldBounds = (0, 0, 277, 96), NewBounds = (164, 0, 277, 96)\r\nOperation = Remove, Triggers = CollectionChangeRemove, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)";
01005
01006                 using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterMove))
01007                 {
01008                     moveButton.InvokeAndWait();
01009                 }
01010
01011                 clearHistoryButton.InvokeAndWait();
01012                 Log.Comment("Selecting the first item...");
01013                 ListViewItem firstItem = FindElement.ById<ListViewItem>("ms-appx:///Images/vette1.jpg");
01014                 firstItem.Select();
01015                 Wait.ForIdle();
01016                 Log.Comment("Deleting the first item...");
01017                 string expectedHistoryAfterDelete = "Operation = Move, Triggers = CollectionChangeRemove, OldBounds = (164, 0, 277, 96), NewBounds = (0, 0, 277, 96)\r\nOperation = Remove, Triggers = CollectionChangeRemove, OldBounds = (0, 0, 0, 0), NewBounds = (0, 0, 0, 0)";
01018
01019                 using (var eventWaiter = new ValueChangedEventWaiter(historyTextBox, expectedHistoryAfterDelete))
01020                 {
01021                     deleteButton.InvokeAndWait();
01022                 }
01023             }
01024         }
01025
01026         [TestMethod]
01027         [TestProperty("TestSuite", "B")]
01028         [TestProperty("Description", "Verifies that the LinedFlowLayout can use ItemContainer without MinWidth.")]
01029         public void UseLinedFlowLayoutWithoutMinWidth()
01030         {
01031             Log.Comment("Selecting ItemsView summary page");
01032
01033             ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };
01034
01035             using (var setup = new ItemsViewTestSetupHelper(
01036                 testNames: new[] { "ItemsView Tests", "navigateToSummary" },
01037                 options: null,
01038                 shouldRestrictInnerFrameSize: false,
01039                 outputDebugStringLevel: "Verbose",
01040                 outputDebugStringComponentTypes: outputDebugStringComponentTypes))
01041             {
01042                 using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
01043                 {
01044                     Log.Comment("Disabling ItemsInfoRequested event handler.");
01045
01046                     Log.Comment("Retrieving chkPageMethods");
01047                     UIObject chkPageMethodsUIObject = FindElement.ById("chkPageMethods");
01048                     Verify.IsNotNull(chkPageMethodsUIObject, "Verifying that chkPageMethods was found");
01049                     CheckBox chkPageMethods = new CheckBox(chkPageMethodsUIObject);
01050                     Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);
01051
01052                     Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.On");
01053                     chkPageMethods.Toggle();
01054                     Wait.ForIdle();
01055                     Verify.AreEqual(ToggleState.On, chkPageMethods.ToggleState);
01056
01057                     Log.Comment("Retrieving chkProvideDesiredAspectRatioItemsInfo");
01058                     UIObject chkProvideDesiredAspectRatioItemsInfoUIObject = FindElement.ById("chkProvideDesiredAspectRatioItemsInfo");
01059                     Verify.IsNotNull(chkProvideDesiredAspectRatioItemsInfoUIObject, "Verifying that chkProvideDesiredAspectRatioItemsInfo was found");
01060                     CheckBox chkProvideDesiredAspectRatioItemsInfo = new CheckBox(chkProvideDesiredAspectRatioItemsInfoUIObject);
01061                     if (ToggleState.On == chkProvideDesiredAspectRatioItemsInfo.ToggleState)
01062                     {
01063                         Log.Comment("Toggling chkProvideDesiredAspectRatioItemsInfo.IsChecked to ToggleState.Off");
01064                         chkProvideDesiredAspectRatioItemsInfo.Toggle();
01065                         Wait.ForIdle();
01066                     }
01067                     Verify.AreEqual(ToggleState.Off, chkProvideDesiredAspectRatioItemsInfo.ToggleState);
01068
01069                     Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.Off");
01070                     chkPageMethods.Toggle();
01071                     Wait.ForIdle();
01072                     Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);
01073
01074                     Log.Comment("Setting up LinedFlowLayout.");
01075
01076                     Log.Comment("Retrieving & filling txtLinedFlowLayoutLineHeight");
01077                     UIObject linedFlowLayoutLineHeightTextBoxUIObject = FindElement.ById("txtLinedFlowLayoutLineHeight");
01078                     Verify.IsNotNull(linedFlowLayoutLineHeightTextBoxUIObject, "Verifying that linedFlowLayoutLineHeightTextBox was found");
01079                     Edit linedFlowLayoutLineHeightTextBox = new Edit(linedFlowLayoutLineHeightTextBoxUIObject);
01080
01081                     linedFlowLayoutLineHeightTextBox.SetValueAndWait("196");
01082                     Wait.ForIdle();
01083
01084                     Log.Comment("Retrieving btnSetLinedFlowLayoutLineHeight");
01085                     UIObject btnSetLinedFlowLayoutLineHeightUIObject = FindElement.ById("btnSetLinedFlowLayoutLineHeight");
01086                     Verify.IsNotNull(btnSetLinedFlowLayoutLineHeightUIObject, "Verifying that btnSetLinedFlowLayoutLineHeight was found");
01087                     Button btnSetLinedFlowLayoutLineHeight = new Button(btnSetLinedFlowLayoutLineHeightUIObject);
01088
01089                     Log.Comment("Invoking btnSetLinedFlowLayoutLineHeight");
01090                     btnSetLinedFlowLayoutLineHeight.InvokeAndWait();
01091
01092                     Log.Comment("Retrieving & filling txtLinedFlowLayoutLineSpacing");
01093                     UIObject txtLinedFlowLayoutLineSpacingUIObject = FindElement.ById("txtLinedFlowLayoutLineSpacing");
01094                     Verify.IsNotNull(txtLinedFlowLayoutLineSpacingUIObject, "Verifying that txtLinedFlowLayoutLineSpacing was found");
01095                     Edit txtLinedFlowLayoutLineSpacing = new Edit(txtLinedFlowLayoutLineSpacingUIObject);
01096
01097                     txtLinedFlowLayoutLineSpacing.SetValueAndWait("4");
01098                     Wait.ForIdle();
01099
01100                     Log.Comment("Retrieving btnSetLinedFlowLayoutLineSpacing");
01101                     UIObject btnSetLinedFlowLayoutLineSpacingUIObject = FindElement.ById("btnSetLinedFlowLayoutLineSpacing");
01102                     Verify.IsNotNull(btnSetLinedFlowLayoutLineSpacingUIObject, "Verifying that btnSetLinedFlowLayoutLineSpacing was found");
01103                     Button btnSetLinedFlowLayoutLineSpacing = new Button(btnSetLinedFlowLayoutLineSpacingUIObject);
01104
01105                     Log.Comment("Invoking btnSetLinedFlowLayoutLineSpacing");
01106                     btnSetLinedFlowLayoutLineSpacing.InvokeAndWait();
01107
01108                     Log.Comment("Retrieving & filling txtLinedFlowLayoutMinItemSpacing");
01109                     UIObject txtLinedFlowLayoutMinItemSpacingUIObject = FindElement.ById("txtLinedFlowLayoutMinItemSpacing");
01110                     Verify.IsNotNull(txtLinedFlowLayoutMinItemSpacingUIObject, "Verifying that txtLinedFlowLayoutMinItemSpacing was found");
01111                     Edit txtLinedFlowLayoutMinItemSpacing = new Edit(txtLinedFlowLayoutMinItemSpacingUIObject);
01112
01113                     txtLinedFlowLayoutMinItemSpacing.SetValueAndWait("4");
01114                     Wait.ForIdle();
01115
01116                     Log.Comment("Retrieving btnSetLinedFlowLayoutMinItemSpacing");
01117                     UIObject btnSetLinedFlowLayoutMinItemSpacingUIObject = FindElement.ById("btnSetLinedFlowLayoutMinItemSpacing");
01118                     Verify.IsNotNull(btnSetLinedFlowLayoutMinItemSpacingUIObject, "Verifying that btnSetLinedFlowLayoutMinItemSpacing was found");
01119                     Button btnSetLinedFlowLayoutMinItemSpacing = new Button(btnSetLinedFlowLayoutMinItemSpacingUIObject);
01120
01121                     Log.Comment("Invoking btnSetLinedFlowLayoutMinItemSpacing");
01122                     btnSetLinedFlowLayoutMinItemSpacing.InvokeAndWait();
01123
01124                     Log.Comment("Retrieving cmbLinedFlowLayoutItemsStretch");
01125                     UIObject cmbLinedFlowLayoutItemsStretchUIObject = FindElement.ById("cmbLinedFlowLayoutItemsStretch");
01126                     Verify.IsNotNull(cmbLinedFlowLayoutItemsStretchUIObject, "Verifying that cmbLinedFlowLayoutItemsStretch was found");
01127                     ComboBox cmbLinedFlowLayoutItemsStretch = new ComboBox(cmbLinedFlowLayoutItemsStretchUIObject);
01128
01129                     Log.Comment("Changing cmbLinedFlowLayoutItemsStretch selection to 'Fill'");
01130                     cmbLinedFlowLayoutItemsStretch.SelectItemByName("Fill");
01131                     Log.Comment("Selection is now {0}", cmbLinedFlowLayoutItemsStretch.Selection[0].Name);
01132
01133                     Log.Comment("Setting up ItemsView.");
01134
01135                     Log.Comment("Retrieving cmbLayout");
01136                     UIObject cmbLayoutUIObject = FindElement.ById("cmbLayout");
01137                     Verify.IsNotNull(cmbLayoutUIObject, "Verifying that cmbLayout was found");
01138                     ComboBox cmbLayout = new ComboBox(cmbLayoutUIObject);
01139
01140                     Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
01141                     cmbLayout.SelectItemByName("LinedFlowLayout");
01142                     Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
01143
01144                     Log.Comment("Retrieving cmbItemTemplate");
01145                     UIObject cmbItemTemplateUIObject = FindElement.ById("cmbItemTemplate");
01146                     Verify.IsNotNull(cmbItemTemplateUIObject, "Verifying that cmbItemTemplate was found");
01147                     ComboBox cmbItemTemplate = new ComboBox(cmbItemTemplateUIObject);
01148
01149                     Log.Comment("Changing cmbItemTemplate selection to 'ItemContainer without MinWidth (Image)'");
01150                     cmbItemTemplate.SelectItemByName("ItemContainer without MinWidth (Image)");
01151                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
01152
01153                     Log.Comment("Retrieving cmbItemsSource");
01154                     UIObject cmbItemsSourceUIObject = FindElement.ById("cmbItemsSource");
01155                     Verify.IsNotNull(cmbItemsSourceUIObject, "Verifying that cmbItemsSource was found");
01156                     ComboBox cmbItemsSource = new ComboBox(cmbItemsSourceUIObject);
01157
01158                     Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
01159                     cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
01160                     Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
01161                     Wait.ForIdle();
01162
01163                     Log.Comment("Retrieving markupItemsView");
01164                     UIObject itemsViewUIObject = FindElement.ById("markupItemsView");
01165                     Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
01166
01167                     int currentItemIndex = GetCurrentItemIndex();
01168                     Verify.AreEqual(-1, currentItemIndex, "Verifying CurrentItemIndex is initially -1");
01169
01170                     Log.Comment("Clicking on ItemsView to select first item.");
01171                     itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
01172                     Wait.ForIdle();
01173
01174                     LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: null, getScrollViewView: false);
01175                     currentItemIndex = GetCurrentItemIndex();
01176                     Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
01177
01178                     Log.Comment("Clicking on ItemsView to focus item again.");
01179                     itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
01180                     Wait.ForIdle();
01181
01182                     Log.Comment("Pressing End key");
01183                     KeyboardHelper.PressKey(Key.End);
01184                     Wait.ForIdle();
01185
01186                     LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: null, getScrollViewView: false);
01187                     currentItemIndex = GetCurrentItemIndex();
01188                     Verify.AreEqual(299, currentItemIndex, "Verifying CurrentItemIndex is last item 299");
01189
01190                     ResetItemsView(cmbItemsSource, cmbLayout);
01191                 }
01192             }
01193         }
01194
01195         [TestMethod]
01196         [TestProperty("TestSuite", "B")]
01197         [TestProperty("Description", "Tests LinedFlowLayout without setting its LineHeight in the fast path.")]
01198         public void UseLinedFlowLayoutWithoutLineHeight()
01199         {
01200             Log.Comment("Selecting ItemsView summary page");
01201
01202             ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };
01203
01204             using (var setup = new ItemsViewTestSetupHelper(
01205                 testNames: new[] { "ItemsView Tests", "navigateToSummary" },
01206                 options: null,
01207                 shouldRestrictInnerFrameSize: false,
01208                 outputDebugStringLevel: "Info",
01209                 outputDebugStringComponentTypes: outputDebugStringComponentTypes))
01210             {
01211                 using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
01212                 {
01213                     Log.Comment("Setting up ItemsView.");
01214
01215                     Log.Comment("Retrieving cmbLayout");
01216                     UIObject cmbLayoutUIObject = FindElement.ById("cmbLayout");
01217                     Verify.IsNotNull(cmbLayoutUIObject, "Verifying that cmbLayout was found");
01218                     ComboBox cmbLayout = new ComboBox(cmbLayoutUIObject);
01219
01220                     Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
01221                     cmbLayout.SelectItemByName("LinedFlowLayout");
01222                     Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
01223
01224                     Log.Comment("Retrieving cmbItemTemplate");
01225                     UIObject cmbItemTemplateUIObject = FindElement.ById("cmbItemTemplate");
01226                     Verify.IsNotNull(cmbItemTemplateUIObject, "Verifying that cmbItemTemplate was found");
01227                     ComboBox cmbItemTemplate = new ComboBox(cmbItemTemplateUIObject);
01228
01229                     Log.Comment("Changing cmbItemTemplate selection to 'ItemContainer without MinWidth (Image)'");
01230                     cmbItemTemplate.SelectItemByName("ItemContainer without MinWidth (Image)");
01231                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
01232
01233                     Log.Comment("Retrieving cmbItemsSource");
01234                     UIObject cmbItemsSourceUIObject = FindElement.ById("cmbItemsSource");
01235                     Verify.IsNotNull(cmbItemsSourceUIObject, "Verifying that cmbItemsSource was found");
01236                     ComboBox cmbItemsSource = new ComboBox(cmbItemsSourceUIObject);
01237
01238                     Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
01239                     cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
01240                     Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
01241                     Wait.ForIdle();
01242
01243                     Log.Comment("Retrieving txtExtentWidth");
01244                     UIObject txtExtentWidthUIObject = FindElement.ById("txtExtentWidth");
01245                     Verify.IsNotNull(txtExtentWidthUIObject, "Verifying that txtExtentWidth was found");
01246                     Edit txtExtentWidth = new Edit(txtExtentWidthUIObject);
01247
01248                     Log.Comment("Retrieving txtExtentHeight");
01249                     UIObject txtExtentHeightUIObject = FindElement.ById("txtExtentHeight");
01250                     Verify.IsNotNull(txtExtentHeightUIObject, "Verifying that txtExtentHeight was found");
01251                     Edit txtExtentHeight = new Edit(txtExtentHeightUIObject);
01252
01253                     Log.Comment("Retrieving btnGetExtentHeight");
01254                     UIObject btnGetExtentHeightUIObject = FindElement.ById("btnGetExtentHeight");
01255                     Verify.IsNotNull(btnGetExtentHeightUIObject, "Verifying that btnGetExtentHeight was found");
01256                     Button btnGetExtentHeight = new Button(btnGetExtentHeightUIObject);
01257
01258                     Log.Comment("Retrieving btnGetExtentWidth");
01259                     UIObject btnGetExtentWidthUIObject = FindElement.ById("btnGetExtentWidth");
01260                     Verify.IsNotNull(btnGetExtentWidthUIObject, "Verifying that btnGetExtentWidth was found");
01261                     Button btnGetExtentWidth = new Button(btnGetExtentWidthUIObject);
01262
01263                     Log.Comment("Invoking btnGetExtentWidth");
01264                     btnGetExtentWidth.InvokeAndWait();
01265
01266                     Log.Comment("Invoking btnGetExtentHeight");
01267                     btnGetExtentHeight.InvokeAndWait();
01268
01269                     Log.Comment($"ScrollView.ExtentWidth={txtExtentWidth.Value}");
01270                     Log.Comment($"ScrollView.ExtentHeight={txtExtentHeight.Value}");
01271
01272                     double extentWidth = double.Parse(txtExtentWidth.Value);
01273                     double extentHeight = double.Parse(txtExtentHeight.Value);
01274
01275                     Verify.AreEqual(extentWidth, 500.0);
01276                     Verify.IsGreaterThan(extentHeight, 50000.0);
01277
01278                     ResetItemsView(cmbItemsSource, cmbLayout);
01279                 }
01280             }
01281         }
01282
01283         [TestMethod]
01284         [TestProperty("TestSuite", "B")]
01285         [TestProperty("Description", "Tests ItemsSource item insertions and removals, followed by item selections.")]
01286         public void InsertAndRemoveItems()
01287         {
01288             Log.Comment("Selecting ItemsView interactive tests");
01289
01290             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
01291             {
01292                 Log.Comment("Retrieving cmbLayout");
01293                 ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
01294                 Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
01295
01296                 Log.Comment("Retrieving cmbItemTemplate");
01297                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
01298                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
01299
01300                 Log.Comment("Retrieving cmbItemsSource");
01301                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
01302                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
01303
01304                 Log.Comment("Retrieving txtItemsSourceIndexes");
01305                 Edit itemsSourceIndexesTextBox = new Edit(FindElement.ById("txtItemsSourceIndexes"));
01306                 Verify.IsNotNull(itemsSourceIndexesTextBox, "Verifying that itemsSourceIndexesTextBox was found");
01307
01308                 Log.Comment("Retrieving btnInsertItems");
01309                 Button btnInsertItems = new Button(FindElement.ById("btnInsertItems"));
01310                 Verify.IsNotNull(btnInsertItems, "Verifying that btnInsertItems was found");
01311
01312                 Log.Comment("Retrieving btnRemoveItems");
01313                 Button btnRemoveItems = new Button(FindElement.ById("btnRemoveItems"));
01314                 Verify.IsNotNull(btnRemoveItems, "Verifying that btnRemoveItems was found");
01315
01316                 Log.Comment("Retrieving itemsView");
01317                 UIObject itemsViewUIObject = FindElement.ByName("itemsView");
01318                 Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
01319
01320                 Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
01321                 cmbLayout.SelectItemByName("LinedFlowLayout");
01322                 Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
01323
01324                 Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
01325                 cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
01326                 Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
01327
01328                 Log.Comment("Changing ItemsSource selection to 'ObservableCollection<Entity>'");
01329                 cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
01330                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
01331
01332                 Log.Comment("Changing txtItemsSourceIndexes text to '0, 0, 0'");
01333                 itemsSourceIndexesTextBox.SetValueAndWait("0, 0, 0");
01334                 Wait.ForIdle();
01335
01336                 Log.Comment("Removing the first 3 items");
01337                 btnRemoveItems.Invoke();
01338                 Wait.ForIdle();
01339
01340                 Log.Comment("Inserting the first 3 items");
01341                 btnInsertItems.Invoke();
01342                 Wait.ForIdle();
01343
01344                 for (int index = 0; index < 4; index++)
01345                 {
01346                     Log.Comment("Clicking on ItemsView item {0} to select it.", index);
01347                     itemsViewUIObject.Click(PointerButtons.Primary, 40.0 + (100 * index), 40.0);
01348                     Wait.ForIdle();
01349                     int currentItemIndex = GetCurrentItemIndex();
01350                     Verify.AreEqual(index, currentItemIndex, "Verifying CurrentItemIndex is " + index);
01351                 }
01352
01353                 ResetItemsView(cmbItemsSource, cmbLayout);
01354
01355                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
01356             }
01357         }
01358
01359         // When clearItemAspectRatios is True, the LinedFlowLayout::m_aspectRatios field is cleared before an ItemsView.StartBringItemIntoView call
01360         // to minimize the average-items-per-line stability during the operation.
01361         private void StartBringItemIntoView(bool clearItemAspectRatios)
01362         {
01363             Log.Comment("Selecting ItemsView summary page");
01364
01365             ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "LinedFlowLayout", "ItemsView" };
01366
01367             using (var setup = new ItemsViewTestSetupHelper(
01368                 testNames: new[] { "ItemsView Tests", "navigateToSummary" },
01369                 options: null,
01370                 shouldRestrictInnerFrameSize: false,
01371                 outputDebugStringLevel: "Verbose",
01372                 outputDebugStringComponentTypes: outputDebugStringComponentTypes))
01373             {
01374                 using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
01375                 {
01376                     Log.Comment("Disabling fast path.");
01377
01378                     Log.Comment("Retrieving chkPageMethods");
01379                     CheckBox chkPageMethods = new CheckBox(FindElement.ById("chkPageMethods"));
01380                     Verify.IsNotNull(chkPageMethods, "Verifying that chkPageMethods was found");
01381                     Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);
01382
01383                     Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.On");
01384                     chkPageMethods.Toggle();
01385                     Wait.ForIdle();
01386                     Verify.AreEqual(ToggleState.On, chkPageMethods.ToggleState);
01387
01388                     Log.Comment("Retrieving chkProvideExtraDesiredAspectRatioItemsInfo");
01389                     CheckBox chkProvideExtraDesiredAspectRatioItemsInfo = new CheckBox(FindElement.ById("chkProvideExtraDesiredAspectRatioItemsInfo"));
01390                     Verify.IsNotNull(chkProvideExtraDesiredAspectRatioItemsInfo, "Verifying that chkProvideExtraDesiredAspectRatioItemsInfo was found");
01391                     Verify.AreEqual(ToggleState.On, chkProvideExtraDesiredAspectRatioItemsInfo.ToggleState);
01392
01393                     Log.Comment("Toggling chkProvideExtraDesiredAspectRatioItemsInfo.IsChecked to ToggleState.Off");
01394                     chkProvideExtraDesiredAspectRatioItemsInfo.Toggle();
01395                     Wait.ForIdle();
01396                     Verify.AreEqual(ToggleState.Off, chkProvideExtraDesiredAspectRatioItemsInfo.ToggleState);
01397
01398                     Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.Off");
01399                     chkPageMethods.Toggle();
01400                     Wait.ForIdle();
01401                     Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);
01402
01403                     Log.Comment("Setting up ItemsView.");
01404
01405                     Log.Comment("Retrieving cmbLayout");
01406                     ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
01407                     Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
01408
01409                     Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
01410                     cmbLayout.SelectItemByName("LinedFlowLayout");
01411                     Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
01412
01413                     Log.Comment("Retrieving cmbItemTemplate");
01414                     ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
01415                     Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
01416
01417                     Log.Comment("Changing cmbItemTemplate selection to 'Fixed-Height ItemContainer (Image + TextBlock)'");
01418                     cmbItemTemplate.SelectItemByName("Fixed-Height ItemContainer (Image + TextBlock)");
01419                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
01420
01421                     Log.Comment("Retrieving cmbItemsSource");
01422                     ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
01423                     Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
01424
01425                     Log.Comment("Changing cmbItemsSource selection to 'ObservableCollection<Entity>'");
01426                     cmbItemsSource.SelectItemByName("ObservableCollection<Entity>");
01427                     Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
01428
01429                     Log.Comment("Setting up ItemsView.StartBringItemIntoView parameters.");
01430
01431                     Log.Comment("Retrieving & filling txtItemsViewMethodIndex");
01432                     Edit itemsViewMethodIndexTextBox = new Edit(FindElement.ById("txtItemsViewMethodIndex"));
01433                     Verify.IsNotNull(itemsViewMethodIndexTextBox, "Verifying that itemsViewMethodIndexTextBox was found");
01434
01435                     itemsViewMethodIndexTextBox.SetValueAndWait("222");
01436                     Wait.ForIdle();
01437
01438                     Log.Comment("Retrieving & filling txtBringIntoViewOptionsVerticalAlignmentRatio");
01439                     Edit bringIntoViewOptionsVerticalAlignmentRatioTextBox = new Edit(FindElement.ById("txtBringIntoViewOptionsVerticalAlignmentRatio"));
01440                     Verify.IsNotNull(bringIntoViewOptionsVerticalAlignmentRatioTextBox, "Verifying that bringIntoViewOptionsVerticalAlignmentRatioTextBox was found");
01441
01442                     bringIntoViewOptionsVerticalAlignmentRatioTextBox.SetValueAndWait("0");
01443                     Wait.ForIdle();
01444
01445                     Button btnLinedFlowLayoutClearItemAspectRatios = null;
01446
01447                     if (clearItemAspectRatios)
01448                     {
01449                         Log.Comment("Retrieving btnLinedFlowLayoutClearItemAspectRatios");
01450                         btnLinedFlowLayoutClearItemAspectRatios = new Button(FindElement.ById("btnLinedFlowLayoutClearItemAspectRatios"));
01451                         Verify.IsNotNull(btnLinedFlowLayoutClearItemAspectRatios, "Verifying that btnLinedFlowLayoutClearItemAspectRatios was found");
01452
01453                         Log.Comment("Invoking btnLinedFlowLayoutClearItemAspectRatios");
01454                         btnLinedFlowLayoutClearItemAspectRatios.Invoke();
01455                         Wait.ForIdle();
01456                     }
01457
01458                     Log.Comment("Retrieving btnItemsViewStartBringItemIntoView");
01459                     Button btnItemsViewStartBringItemIntoView = new Button(FindElement.ById("btnItemsViewStartBringItemIntoView"));
01460                     Verify.IsNotNull(btnItemsViewStartBringItemIntoView, "Verifying that btnItemsViewStartBringItemIntoView was found");
01461
01462                     Log.Comment("Invoking btnItemsViewStartBringItemIntoView");
01463                     btnItemsViewStartBringItemIntoView.Invoke();
01464                     Wait.ForIdle();
01465
01466                     Log.Comment("Retrieving btnGetVerticalOffset");
01467                     Button btnGetVerticalOffset = new Button(FindElement.ById("btnGetVerticalOffset"));
01468                     Verify.IsNotNull(btnGetVerticalOffset, "Verifying that btnGetVerticalOffset was found");
01469
01470                     Log.Comment("Invoking btnGetVerticalOffset");
01471                     btnGetVerticalOffset.Invoke();
01472                     Wait.ForIdle();
01473
01474                     Log.Comment("Retrieving & reading txtVerticalOffset");
01475                     Edit verticalOffsetTextBox = new Edit(FindElement.ById("txtVerticalOffset"));
01476                     Verify.IsNotNull(verticalOffsetTextBox, "Verifying that verticalOffsetTextBox was found");
01477                     Wait.ForIdle();
01478
01479                     Log.Comment($"ScrollView.VerticalOffset={verticalOffsetTextBox.Value}");
01480
01481                     Log.Comment("Retrieving & filling txtLinedFlowLayoutMethodIndex");
01482                     Edit linedFlowLayoutMethodIndexTextBox = new Edit(FindElement.ById("txtLinedFlowLayoutMethodIndex"));
01483                     Verify.IsNotNull(linedFlowLayoutMethodIndexTextBox, "Verifying that linedFlowLayoutMethodIndexTextBox was found");
01484
01485                     linedFlowLayoutMethodIndexTextBox.SetValueAndWait("222");
01486                     Wait.ForIdle();
01487
01488                     Log.Comment("Retrieving btnLinedFlowLayoutGetLineIndex");
01489                     Button btnLinedFlowLayoutGetLineIndex = new Button(FindElement.ById("btnLinedFlowLayoutGetLineIndex"));
01490                     Verify.IsNotNull(btnLinedFlowLayoutGetLineIndex, "Verifying that btnLinedFlowLayoutGetLineIndex was found");
01491
01492                     Log.Comment("Invoking btnLinedFlowLayoutGetLineIndex");
01493                     btnLinedFlowLayoutGetLineIndex.Invoke();
01494                     Wait.ForIdle();
01495
01496                     Log.Comment("Retrieving & reading txtLinedFlowLayoutLineIndex");
01497                     Edit linedFlowLayoutLineIndexTextBox = new Edit(FindElement.ById("txtLinedFlowLayoutLineIndex"));
01498                     Verify.IsNotNull(linedFlowLayoutLineIndexTextBox, "Verifying that linedFlowLayoutLineIndexTextBox was found");
01499                     Wait.ForIdle();
01500
01501                     Log.Comment($"LinedFlowLayout's GetLineIndex(222)={linedFlowLayoutLineIndexTextBox.Value}");
01502                     Verify.IsLessThan(Math.Abs(double.Parse(linedFlowLayoutLineIndexTextBox.Value) * 96.0 - double.Parse(verticalOffsetTextBox.Value)), 0.01, "Verifying vertical offset is line index x LineHeight");
01503
01504                     Log.Comment("Retrieving & filling txtTryGetItemIndexHorizontalViewportRatio");
01505                     Edit tryGetItemIndexHorizontalViewportRatioTextBox = new Edit(FindElement.ById("txtTryGetItemIndexHorizontalViewportRatio"));
01506                     Verify.IsNotNull(tryGetItemIndexHorizontalViewportRatioTextBox, "Verifying that tryGetItemIndexHorizontalViewportRatioTextBox was found");
01507
01508                     tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("0.0");
01509                     Wait.ForIdle();
01510
01511                     Log.Comment("Retrieving & filling txtTryGetItemIndexVerticalViewportRatio");
01512                     Edit tryGetItemIndexVerticalViewportRatioTextBox = new Edit(FindElement.ById("txtTryGetItemIndexVerticalViewportRatio"));
01513                     Verify.IsNotNull(tryGetItemIndexVerticalViewportRatioTextBox, "Verifying that tryGetItemIndexVerticalViewportRatioTextBox was found");
01514
01515                     tryGetItemIndexVerticalViewportRatioTextBox.SetValueAndWait("0.0");
01516                     Wait.ForIdle();
01517
01518                     Log.Comment("Retrieving btnItemsViewTryGetItemIndex");
01519                     Button btnItemsViewTryGetItemIndex = new Button(FindElement.ById("btnItemsViewTryGetItemIndex"));
01520                     Verify.IsNotNull(btnItemsViewTryGetItemIndex, "Verifying that btnItemsViewTryGetItemIndex was found");
01521
01522                     Log.Comment("Invoking btnItemsViewTryGetItemIndex");
01523                     btnItemsViewTryGetItemIndex.Invoke();
01524                     Wait.ForIdle();
01525
01526                     Log.Comment("Retrieving & reading txtItemsViewTryGetItemIndex");
01527                     Edit itemsViewTryGetItemIndexTextBox = new Edit(FindElement.ById("txtItemsViewTryGetItemIndex"));
01528                     Verify.IsNotNull(itemsViewTryGetItemIndexTextBox, "Verifying that itemsViewTryGetItemIndexTextBox was found");
01529                     Wait.ForIdle();
01530
01531                     Log.Comment($"ItemsView.TryGetItemIndex(0.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
01532                     Verify.IsGreaterThanOrEqual(222, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is greater than or equal to first displayed item index on top line");
01533
01534                     Log.Comment("Filling txtTryGetItemIndexHorizontalViewportRatio");
01535                     tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("1.0");
01536                     Wait.ForIdle();
01537
01538                     Log.Comment("Invoking btnItemsViewTryGetItemIndex");
01539                     btnItemsViewTryGetItemIndex.Invoke();
01540                     Wait.ForIdle();
01541
01542                     Log.Comment($"ItemsView.TryGetItemIndex(1.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
01543                     Verify.IsLessThanOrEqual(222, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is less than or equal to last displayed item index on top line");
01544
01545                     Log.Comment("Filling txtItemsViewMethodIndex");
01546                     itemsViewMethodIndexTextBox.SetValueAndWait("22");
01547                     Wait.ForIdle();
01548
01549                     if (clearItemAspectRatios)
01550                     {
01551                         Log.Comment("Invoking btnLinedFlowLayoutClearItemAspectRatios");
01552                         btnLinedFlowLayoutClearItemAspectRatios.Invoke();
01553                         Wait.ForIdle();
01554                     }
01555
01556                     Log.Comment("Invoking btnItemsViewStartBringItemIntoView");
01557                     btnItemsViewStartBringItemIntoView.Invoke();
01558                     Wait.ForIdle();
01559
01560                     Log.Comment("Invoking btnGetVerticalOffset");
01561                     btnGetVerticalOffset.Invoke();
01562                     Wait.ForIdle();
01563
01564                     Log.Comment($"ScrollView.VerticalOffset={verticalOffsetTextBox.Value}");
01565
01566                     Log.Comment("Filling txtLinedFlowLayoutMethodIndex");
01567                     linedFlowLayoutMethodIndexTextBox.SetValueAndWait("22");
01568                     Wait.ForIdle();
01569
01570                     Log.Comment("Invoking btnLinedFlowLayoutGetLineIndex");
01571                     btnLinedFlowLayoutGetLineIndex.Invoke();
01572                     Wait.ForIdle();
01573
01574                     Log.Comment($"LinedFlowLayout's GetLineIndex(22)={linedFlowLayoutLineIndexTextBox.Value}");
01575                     Verify.IsLessThan(Math.Abs(double.Parse(linedFlowLayoutLineIndexTextBox.Value) * 96.0 - double.Parse(verticalOffsetTextBox.Value)), 0.01, "Verifying vertical offset is line index x LineHeight");
01576
01577                     Log.Comment("Filling txtTryGetItemIndexHorizontalViewportRatio");
01578                     tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("0.0");
01579                     Wait.ForIdle();
01580
01581                     Log.Comment("Invoking btnItemsViewTryGetItemIndex");
01582                     btnItemsViewTryGetItemIndex.Invoke();
01583                     Wait.ForIdle();
01584
01585                     Log.Comment($"ItemsView.TryGetItemIndex(0.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
01586                     Verify.IsGreaterThanOrEqual(22, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is greater than or equal to first displayed item index on top line");
01587
01588                     Log.Comment("Filling txtTryGetItemIndexHorizontalViewportRatio");
01589                     tryGetItemIndexHorizontalViewportRatioTextBox.SetValueAndWait("1.0");
01590                     Wait.ForIdle();
01591
01592                     Log.Comment("Invoking btnItemsViewTryGetItemIndex");
01593                     btnItemsViewTryGetItemIndex.Invoke();
01594                     Wait.ForIdle();
01595
01596                     Log.Comment($"ItemsView.TryGetItemIndex(1.0, 0.0, out index)={itemsViewTryGetItemIndexTextBox.Value}");
01597                     Verify.IsLessThanOrEqual(22, int.Parse(itemsViewTryGetItemIndexTextBox.Value), "Verifying item index brought to the top of the viewport is less than or equal to last displayed item index on top line");
01598
01599                     Log.Comment("Retrieving btnClearLogs");
01600                     Button btnClearLogs = new Button(FindElement.ById("btnClearLogs"));
01601                     Verify.IsNotNull(btnClearLogs, "Verifying that btnClearLogs was found");
01602
01603                     Log.Comment("Invoking btnClearLogs.");
01604                     btnClearLogs.Invoke();
01605                     Wait.ForIdle();
01606
01607                     LogAndClearTraces();
01608                     Wait.ForIdle();
01609
01610                     ResetItemsView(cmbItemsSource, cmbLayout);
01611                 }
01612             }
01613         }
01614
01615         private void PanAnnotatedScrollBar(bool handleItemsInfoRequested)
01616         {
01617             Log.Comment("Retrieving RasterizationScaleTextBox");
01618             Edit rasterizationScaleTextBox = new Edit(FindElement.ById("RasterizationScaleTextBox"));
01619             if (rasterizationScaleTextBox == null)
01620             {
01621                 Log.Warning("rasterizationScaleTextBox not found.");
01622             }
01623             else
01624             {
01625                 string rasterizationScale = rasterizationScaleTextBox.Value;
01626                 Log.Comment("RasterizationScale:" + rasterizationScale);
01627                 if (rasterizationScale != "1")
01628                 {
01629                     Log.Warning("Skipping test as panning is only supported for RasterizationScale == 1.");
01630                     return;
01631                 }
01632             }
01633
01634             Log.Comment("Selecting ItemsView/ItemContainer/AnnotatedScrollBar integration page");
01635
01636             ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "ScrollPresenter", "LinedFlowLayout", "AnnotatedScrollBar", /*"ItemsRepeater",*/ "ItemsView" };
01637
01638             using (var setup = new ItemsViewTestSetupHelper(
01639                 testNames: new[] { "ItemsView Tests", "navigateToIntegration" },
01640                 options: null,
01641                 shouldRestrictInnerFrameSize: false,
01642                 outputDebugStringLevel: "Info",
01643                 outputDebugStringComponentTypes: outputDebugStringComponentTypes))
01644             {
01645                 using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
01646                 {
01647                     Log.Comment("Retrieving chkHandleItemsInfoRequested");
01648                     CheckBox chkHandleItemsInfoRequested = new CheckBox(FindElement.ById("chkHandleItemsInfoRequested"));
01649                     Verify.IsNotNull(chkHandleItemsInfoRequested, "Verifying that chkHandleItemsInfoRequested was found");
01650
01651                     Log.Comment("Retrieving chkGeneralInfoLogs");
01652                     CheckBox chkGeneralInfoLogs = new CheckBox(FindElement.ById("chkGeneralInfoLogs"));
01653                     Verify.IsNotNull(chkGeneralInfoLogs, "Verifying that chkGeneralInfoLogs was found");
01654
01655                     Log.Comment("Retrieving chkGeneralVerboseLogs");
01656                     CheckBox chkGeneralVerboseLogs = new CheckBox(FindElement.ById("chkGeneralVerboseLogs"));
01657                     Verify.IsNotNull(chkGeneralVerboseLogs, "Verifying that chkGeneralVerboseLogs was found");
01658
01659                     Log.Comment("Retrieving btnClearLogs");
01660                     Button btnClearLogs = new Button(FindElement.ById("btnClearLogs"));
01661                     Verify.IsNotNull(btnClearLogs, "Verifying that btnClearLogs was found");
01662
01663                     Log.Comment("Retrieving logging checkboxes");
01664                     CheckBox chkLogItemsViewEvents = new CheckBox(FindElement.ById("chkLogItemsViewEvents"));
01665                     CheckBox chkLogLinedFlowLayoutEvents = new CheckBox(FindElement.ById("chkLogLinedFlowLayoutEvents"));
01666                     CheckBox chkLogAnnotatedScrollBarEvents = new CheckBox(FindElement.ById("chkLogAnnotatedScrollBarEvents"));
01667                     CheckBox chkLogItemsRepeaterEvents = new CheckBox(FindElement.ById("chkLogItemsRepeaterEvents"));
01668                     CheckBox chkLogScrollViewEvents = new CheckBox(FindElement.ById("chkLogScrollViewEvents"));
01669                     CheckBox chkLogScrollPresenterEvents = new CheckBox(FindElement.ById("chkLogScrollPresenterEvents"));
01670
01671                     Log.Comment("Retrieving txtYearCount");
01672                     Edit yearCountTextBox = new Edit(FindElement.ById("txtYearCount"));
01673                     Verify.IsNotNull(yearCountTextBox, "Verifying that yearCountTextBox was found");
01674
01675                     Log.Comment("Retrieving txtAverageMonthCount");
01676                     Edit averageMonthCountTextBox = new Edit(FindElement.ById("txtAverageMonthCount"));
01677                     Verify.IsNotNull(averageMonthCountTextBox, "Verifying that averageMonthCountTextBox was found");
01678
01679                     Log.Comment("Retrieving btnSetYearCount");
01680                     Button btnSetYearCount = new Button(FindElement.ById("btnSetYearCount"));
01681                     Verify.IsNotNull(btnSetYearCount, "Verifying that btnSetYearCount was found");
01682
01683                     Log.Comment("Retrieving btnSetAverageMonthCount");
01684                     Button btnSetAverageMonthCount = new Button(FindElement.ById("btnSetAverageMonthCount"));
01685                     Verify.IsNotNull(btnSetAverageMonthCount, "Verifying that btnSetAverageMonthCount was found");
01686
01687                     Log.Comment("Retrieving btnApplyAverageMonthCount");
01688                     Button btnApplyAverageMonthCount = new Button(FindElement.ById("btnApplyAverageMonthCount"));
01689                     Verify.IsNotNull(btnApplyAverageMonthCount, "Verifying that btnApplyAverageMonthCount was found");
01690
01691                     Log.Comment("Retrieving btnGetScrollViewVerticalOffset");
01692                     Button btnGetScrollViewVerticalOffset = new Button(FindElement.ById("btnGetScrollViewVerticalOffset"));
01693                     Verify.IsNotNull(btnGetScrollViewVerticalOffset, "Verifying that btnGetScrollViewVerticalOffset was found");
01694
01695                     Log.Comment("Retrieving txtScrollViewVerticalOffset.");
01696                     Edit scrollViewVerticalOffsetTextBox = new Edit(FindElement.ById("txtScrollViewVerticalOffset"));
01697                     Verify.IsNotNull(scrollViewVerticalOffsetTextBox, "Verifying that scrollViewVerticalOffsetTextBox was found");
01698
01699                     Log.Comment("Retrieving txtStatus");
01700                     UIObject statusUIObject = FindElement.ById("txtStatus");
01701                     Verify.IsNotNull(statusUIObject, "Verifying that txtStatus was found");
01702
01703                     Log.Comment("Retrieving cmbItemTemplate");
01704                     ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
01705                     Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
01706
01707                     Log.Comment("Retrieving annotatedScrollBar");
01708                     UIObject annotatedScrollBar = FindElement.ById("annotatedScrollBar");
01709                     Verify.IsNotNull(annotatedScrollBar, "Verifying that annotatedScrollBar was found");
01710
01711                     if (ToggleState.Off == chkHandleItemsInfoRequested.ToggleState && handleItemsInfoRequested)
01712                     {
01713                         Log.Comment("Toggling chkHandleItemsInfoRequested.IsChecked to ToggleState.On");
01714                         chkHandleItemsInfoRequested.Toggle();
01715                         Wait.ForIdle();
01716                     }
01717                     else if (ToggleState.On == chkHandleItemsInfoRequested.ToggleState && !handleItemsInfoRequested)
01718                     {
01719                         Log.Comment("Toggling chkHandleItemsInfoRequested.IsChecked to ToggleState.Off");
01720                         chkHandleItemsInfoRequested.Toggle();
01721                         Wait.ForIdle();
01722                     }
01723
01724                     Log.Comment("Changing ItemTemplate selection to 'Extra Large Image with caption'");
01725                     cmbItemTemplate.SelectItemByName("Extra Large Image with caption");
01726                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
01727
01728                     Log.Comment("Setting YearCount to 30.");
01729                     yearCountTextBox.SetValueAndWait("30");
01730                     btnSetYearCount.Invoke();
01731                     Wait.ForIdle();
01732
01733                     Log.Comment("Setting AverageMonthCount to 6.");
01734                     averageMonthCountTextBox.SetValueAndWait("6");
01735                     btnSetAverageMonthCount.Invoke();
01736                     Wait.ForIdle();
01737
01738                     Log.Comment("Applying new YearCount & AverageMonthCount.");
01739                     btnApplyAverageMonthCount.Invoke();
01740                     Wait.ForIdle();
01741
01742                     Log.Comment("Toggling logging checkboxes");
01743
01744                     if (ToggleState.Off == chkGeneralInfoLogs.ToggleState)
01745                     {
01746                         Log.Comment("Toggling chkGeneralInfoLogs.IsChecked to ToggleState.On");
01747                         chkGeneralInfoLogs.Toggle();
01748                         Wait.ForIdle();
01749                     }
01750
01751                     if (ToggleState.On == chkGeneralVerboseLogs.ToggleState)
01752                     {
01753                         Log.Comment("Toggling chkGeneralVerboseLogs.IsChecked to ToggleState.Off");
01754                         chkGeneralVerboseLogs.Toggle();
01755                         Wait.ForIdle();
01756                     }
01757
01758                     if (ToggleState.Off == chkLogItemsViewEvents.ToggleState)
01759                     {
01760                         Log.Comment("Toggling chkLogItemsViewEvents.IsChecked to ToggleState.On");
01761                         chkLogItemsViewEvents.Toggle();
01762                         Wait.ForIdle();
01763                     }
01764
01765                     if (ToggleState.Off == chkLogLinedFlowLayoutEvents.ToggleState)
01766                     {
01767                         Log.Comment("Toggling chkLogLinedFlowLayoutEvents.IsChecked to ToggleState.On");
01768                         chkLogLinedFlowLayoutEvents.Toggle();
01769                         Wait.ForIdle();
01770                     }
01771
01772                     if (ToggleState.Off == chkLogAnnotatedScrollBarEvents.ToggleState)
01773                     {
01774                         Log.Comment("Toggling chkLogAnnotatedScrollBarEvents.IsChecked to ToggleState.On");
01775                         chkLogAnnotatedScrollBarEvents.Toggle();
01776                         Wait.ForIdle();
01777                     }
01778
01779                     if (ToggleState.Off == chkLogItemsRepeaterEvents.ToggleState)
01780                     {
01781                         Log.Comment("Toggling chkLogItemsRepeaterEvents.IsChecked to ToggleState.On");
01782                         chkLogItemsRepeaterEvents.Toggle();
01783                         Wait.ForIdle();
01784                     }
01785
01786                     if (ToggleState.Off == chkLogScrollViewEvents.ToggleState)
01787                     {
01788                         Log.Comment("Toggling chkLogScrollViewEvents.IsChecked to ToggleState.On");
01789                         chkLogScrollViewEvents.Toggle();
01790                         Wait.ForIdle();
01791                     }
01792
01793                     if (ToggleState.Off == chkLogScrollPresenterEvents.ToggleState)
01794                     {
01795                         Log.Comment("Toggling chkLogScrollPresenterEvents.IsChecked to ToggleState.On");
01796                         chkLogScrollPresenterEvents.Toggle();
01797                         Wait.ForIdle();
01798                     }
01799
01800                     Log.Comment("Clearing log list.");
01801                     btnClearLogs.Invoke();
01802                     ClearTraces();
01803                     Wait.ForIdle();
01804
01805                     Rectangle annotatedScrollBarBounds = annotatedScrollBar.BoundingRectangle;
01806                     Log.Comment("AnnotatedScrollBar Bounds= X:{0}, Y:{1}, Width:{2}, Height:{3}",
01807                         annotatedScrollBarBounds.X, annotatedScrollBarBounds.Y, annotatedScrollBarBounds.Width, annotatedScrollBarBounds.Height);
01808
01809                     Point annotatedScrollBarCenter = new Point(
01810                         annotatedScrollBarBounds.X + annotatedScrollBarBounds.Width / 2,
01811                         annotatedScrollBarBounds.Y + annotatedScrollBarBounds.Height / 2);
01812
01813                     Point annotatedScrollBarOffsetCenter = new Point(
01814                         annotatedScrollBarCenter.X,
01815                         annotatedScrollBarCenter.Y + 400);
01816
01817                     Log.Comment("Dragging touch pointer over AnnotatedScrollBar from its center down 400px");
01818                     InputHelper.Pan(
01819                         obj: annotatedScrollBar,
01820                         start: annotatedScrollBarCenter,
01821                         end: annotatedScrollBarOffsetCenter,
01822                         holdDuration: InputHelper.DefaultPanHoldDuration,
01823                         panAcceleration: 0.0f,
01824                         dragDuration: 5000,
01825                         waitForIdle: false);
01826                     Wait.ForIdle();
01827
01828                     Log.Comment("Clicking center of btnClearLogs.");
01829                     btnClearLogs.Click();
01830                     Wait.ForIdle();
01831
01832                     LogAndClearTraces();
01833                     Wait.ForIdle();
01834
01835                     Log.Comment("Invoking btnGetScrollViewVerticalOffset.");
01836                     btnGetScrollViewVerticalOffset.Invoke();
01837                     Wait.ForIdle();
01838
01839                     double verticalOffset = string.IsNullOrWhiteSpace(scrollViewVerticalOffsetTextBox.Value) ? -1.0 : Convert.ToDouble(scrollViewVerticalOffsetTextBox.Value);
01840                     Log.Comment("verticalOffset={0}", verticalOffset);
01841                     Verify.IsGreaterThan(verticalOffset, 100000.0);
01842                 }
01843             }
01844         }
01845
01846         private void TabIntoItemsViewWithoutCurrentItem(bool useShiftTab)
01847         {
01848             Log.Comment("Selecting ItemsView interactive tests");
01849
01850             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
01851             {
01852                 Log.Comment("Retrieving btnBefore");
01853                 Button btnBefore = new Button(FindElement.ById("btnBefore"));
01854                 Verify.IsNotNull(btnBefore, "Verifying that btnBefore was found");
01855
01856                 Log.Comment("Retrieving btnAfter");
01857                 Button btnAfter = new Button(FindElement.ById("btnAfter"));
01858                 Verify.IsNotNull(btnAfter, "Verifying that btnAfter was found");
01859
01860                 Log.Comment("Retrieving cmbLayout");
01861                 ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
01862                 Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
01863
01864                 Log.Comment("Retrieving cmbItemTemplate");
01865                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
01866                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
01867
01868                 Log.Comment("Retrieving cmbItemsSource");
01869                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
01870                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
01871
01872                 Log.Comment("Retrieving txtScrollViewHorizontalOffset");
01873                 Edit scrollViewHorizontalOffsetTextBox = new Edit(FindElement.ById("txtScrollViewHorizontalOffset"));
01874                 Verify.IsNotNull(scrollViewHorizontalOffsetTextBox, "Verifying that scrollViewHorizontalOffsetTextBox was found");
01875
01876                 Log.Comment("Retrieving txtScrollViewVerticalOffset");
01877                 Edit scrollViewVerticalOffsetTextBox = new Edit(FindElement.ById("txtScrollViewVerticalOffset"));
01878                 Verify.IsNotNull(scrollViewVerticalOffsetTextBox, "Verifying that scrollViewVerticalOffsetTextBox was found");
01879
01880                 Log.Comment("Retrieving txtScrollViewZoomFactor");
01881                 Edit scrollViewZoomFactorTextBox = new Edit(FindElement.ById("txtScrollViewZoomFactor"));
01882                 Verify.IsNotNull(scrollViewZoomFactorTextBox, "Verifying that scrollViewZoomFactorTextBox was found");
01883
01884                 Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
01885                 cmbLayout.SelectItemByName("LinedFlowLayout");
01886                 Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
01887
01888                 Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
01889                 cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
01890                 Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
01891
01892                 Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
01893                 cmbItemsSource.SelectItemByName("List<Entity>");
01894                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
01895
01896                 Log.Comment("Changing txtScrollViewHorizontalOffset text to '0'");
01897                 scrollViewHorizontalOffsetTextBox.SetValueAndWait("0");
01898
01899                 Log.Comment("Changing txtScrollViewVerticalOffset text to '250'");
01900                 scrollViewVerticalOffsetTextBox.SetValueAndWait("250");
01901
01902                 InvokeScrollViewScrollToButton();
01903
01904                 Log.Comment("Changing txtScrollViewZoomFactor text to '2'");
01905                 scrollViewZoomFactorTextBox.SetValueAndWait("2");
01906
01907                 InvokeScrollViewZoomToButton();
01908
01909                 Log.Comment("Retrieving itemsView");
01910                 UIObject itemsViewUIObject = FindElement.ByName("itemsView");
01911                 Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
01912
01913                 Log.Comment("Retrieving PART_ScrollView");
01914                 UIObject scrollViewUIObject = itemsViewUIObject.FirstChild;
01915                 Verify.IsNotNull(scrollViewUIObject, "Verifying that PART_ScrollView was found");
01916
01917                 Log.Comment("Retrieving PART_ScrollPresenter as a UIObject");
01918                 UIObject scrollPresenterUIObject = FindElement.ById("PART_ScrollPresenter");
01919                 Verify.IsNotNull(scrollPresenterUIObject, "Verifying that PART_ScrollView.PART_Root.PART_ScrollPresenter was found");
01920
01921                 Log.Comment("Retrieving PART_ScrollPresenter as a ScrollPresenter");
01922                 ScrollPresenter scrollPresenter = new ScrollPresenter(scrollPresenterUIObject);
01923                 Verify.IsNotNull(scrollPresenter, "Verifying that scrollPresenter was found");
01924
01925                 Log.Comment("scrollPresenter.HorizontalScrollPercent={0}", scrollPresenter.HorizontalScrollPercent);
01926                 Log.Comment("scrollPresenter.VerticalScrollPercent={0}", scrollPresenter.VerticalScrollPercent);
01927                 Log.Comment("scrollPresenter.VerticalViewSize={0}", scrollPresenter.VerticalViewSize);
01928
01929                 double horizontalOffset;
01930                 double verticalOffset;
01931                 float zoomFactor;
01932
01933                 GetScrollViewView(out horizontalOffset, out verticalOffset, out zoomFactor);
01934                 Log.Comment("horizontalOffset={0}", horizontalOffset);
01935                 Log.Comment("verticalOffset={0}", verticalOffset);
01936                 Log.Comment("zoomFactor={0}", zoomFactor);
01937
01938                 if (useShiftTab)
01939                 {
01940                     Log.Comment("Clicking on ButtonAfter.");
01941                     btnAfter.Click(PointerButtons.Primary);
01942                     Wait.ForIdle();
01943
01944                     Log.Comment("Pressing Shift-Tab keys");
01945                     KeyboardHelper.PressKey(btnAfter, Key.Tab, modifierKey: ModifierKey.Shift, numPresses: 1, useDebugMode: true);
01946                     Wait.ForIdle();
01947
01948                     int currentItemIndex = GetCurrentItemIndex();
01949
01950                     Verify.AreEqual(21, currentItemIndex, "Verifying CurrentItemIndex is 21");
01951                 }
01952                 else
01953                 {
01954                     Log.Comment("Clicking on ButtonBefore.");
01955                     btnBefore.Click(PointerButtons.Primary);
01956                     Wait.ForIdle();
01957
01958                     Log.Comment("Pressing Tab key");
01959                     KeyboardHelper.PressKey(btnBefore, Key.Tab, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
01960                     Wait.ForIdle();
01961
01962                     int currentItemIndex = GetCurrentItemIndex();
01963
01964                     Verify.AreEqual(15, currentItemIndex, "Verifying CurrentItemIndex is 15");
01965                 }
01966
01967                 ResetItemsView(cmbItemsSource, cmbLayout);
01968
01969                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
01970             }
01971         }
01972
01973         // When provideExtraDesiredAspectRatioItemsInfo is True, the LinedFlowLayout.ItemsInfoRequested event handler provides sizing information for the entire source
01974         // collection. This is done by checking the chkProvideExtraDesiredAspectRatioItemsInfo CheckBox in the UI.
01975         // When provideExtraDesiredAspectRatioItemsInfo is False, the handler only provides information for the requested range and the fast path can not be performed.
01976         private void SetUpItemsViewForSelectionTests(string selectionMode, bool provideExtraDesiredAspectRatioItemsInfo = false)
01977         {
01978             Log.Comment("SetUpItemsViewForSelectionTests");
01979
01980             if (!provideExtraDesiredAspectRatioItemsInfo)
01981             {
01982                 Log.Comment("Retrieving chkPageMethods");
01983                 CheckBox chkPageMethods = new CheckBox(FindElement.ById("chkPageMethods"));
01984                 Verify.IsNotNull(chkPageMethods, "Verifying that chkPageMethods was found");
01985                 Verify.AreEqual(ToggleState.Off, chkPageMethods.ToggleState);
01986
01987                 Log.Comment("Toggling chkPageMethods.IsChecked to ToggleState.On");
01988                 chkPageMethods.Toggle();
01989                 Wait.ForIdle();
01990
01991                 Log.Comment("Retrieving chkProvideExtraDesiredAspectRatioItemsInfo");
01992                 CheckBox chkProvideExtraDesiredAspectRatioItemsInfo = new CheckBox(FindElement.ById("chkProvideExtraDesiredAspectRatioItemsInfo"));
01993                 Verify.IsNotNull(chkProvideExtraDesiredAspectRatioItemsInfo, "Verifying that chkProvideExtraDesiredAspectRatioItemsInfo was found");
01994                 Verify.AreEqual(ToggleState.On, chkProvideExtraDesiredAspectRatioItemsInfo.ToggleState);
01995
01996                 Log.Comment("Toggling chkProvideExtraDesiredAspectRatioItemsInfo.IsChecked to ToggleState.Off");
01997                 chkProvideExtraDesiredAspectRatioItemsInfo.Toggle();
01998                 Wait.ForIdle();
01999             }
02000
02001             Log.Comment("Retrieving cmbSelectionMode");
02002             ComboBox cmbSelectionMode = new ComboBox(FindElement.ById("cmbSelectionMode"));
02003             Verify.IsNotNull(cmbSelectionMode, "Verifying that cmbSelectionMode was found");
02004
02005             Log.Comment("Changing cmbSelectionMode selection to " + selectionMode);
02006             cmbSelectionMode.SelectItemByName(selectionMode);
02007             Log.Comment("Selection is now {0}", cmbSelectionMode.Selection[0].Name);
02008
02009             Log.Comment("Retrieving cmbLayout");
02010             ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
02011             Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
02012
02013             Log.Comment("Changing cmbLayout selection to 'LinedFlowLayout'");
02014             cmbLayout.SelectItemByName("LinedFlowLayout");
02015             Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
02016
02017             Log.Comment("Retrieving cmbItemTemplate");
02018             ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
02019             Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
02020
02021             Log.Comment("Changing cmbItemTemplate selection to 'Lightweight Square ItemContainer (Rectangle + TextBlock)'");
02022             cmbItemTemplate.SelectItemByName("Lightweight Square ItemContainer (Rectangle + TextBlock)");
02023             Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
02024
02025             Log.Comment("Retrieving cmbItemsSource");
02026             ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
02027             Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
02028
02029             Log.Comment("Changing cmbItemsSource selection to 'List<Entity>'");
02030             cmbItemsSource.SelectItemByName("List<Entity>");
02031             Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
02032         }
02033
02034         private string GetSelectedItems()
02035         {
02036             Log.Comment("Retrieving GetSelectedItems");
02037
02038             Log.Comment("Retrieving txtSelectedItems");
02039             Edit txtSelectedItems = new Edit(FindElement.ById("txtSelectedItems"));
02040             Verify.IsNotNull(txtSelectedItems, "Verifying that txSelectedItems was found");
02041
02042             Log.Comment("Retrieving btnGetSelectedItems");
02043             Button btnGetSelectedItems = new Button(FindElement.ById("btnGetSelectedItems"));
02044             Verify.IsNotNull(btnGetSelectedItems, "Verifying that btnGetSelectedItems was found");
02045
02046             btnGetSelectedItems.Invoke();
02047             Wait.ForIdle();
02048
02049             return txtSelectedItems.Value;
02050         }
02051
02052         private void KeyboardNavigationWithLayout(string layout, bool useLateralMoves, bool useFocusableControlInItemContainer = false)
02053         {
02054             Log.Comment("Selecting ItemsView interactive tests");
02055
02056             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
02057             {
02058                 Log.Comment("Retrieving cmbItemTemplate");
02059                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
02060                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
02061
02062                 Log.Comment("Retrieving cmbItemsSource");
02063                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
02064                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
02065
02066                 Log.Comment("Retrieving cmbLayout");
02067                 ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
02068                 Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
02069
02070                 Log.Comment($"Changing Layout selection to '{layout}'");
02071                 cmbLayout.SelectItemByName(layout);
02072                 Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
02073
02074                 if (useFocusableControlInItemContainer)
02075                 {
02076                     Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (ItemContainer with ToggleButton)'");
02077                     cmbItemTemplate.SelectItemByName("Entity DataTemplate (ItemContainer with ToggleButton)");
02078                 }
02079                 else
02080                 {
02081                     Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
02082                     cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
02083                 }
02084                 Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
02085
02086                 Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
02087                 cmbItemsSource.SelectItemByName("List<Entity>");
02088                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
02089
02090                 Log.Comment("Retrieving itemsView");
02091                 UIObject itemsViewUIObject = FindElement.ByName("itemsView");
02092                 Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
02093
02094                 Log.Comment("Clicking on ItemsView to select first item.");
02095                 itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
02096                 Wait.ForIdle();
02097                 LogScrollViewInfo(itemsViewUIObject);
02098                 int currentItemIndex = GetCurrentItemIndex();
02099                 Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
02100
02101                 Log.Comment("Pressing End key");
02102                 KeyboardHelper.PressKey(Key.End);
02103                 Wait.ForIdle();
02104                 LogScrollViewInfo(itemsViewUIObject);
02105                 currentItemIndex = GetCurrentItemIndex();
02106                 Verify.AreEqual(49, currentItemIndex, "Verifying CurrentItemIndex is 49");
02107
02108                 Log.Comment("Pressing Right key");
02109                 KeyboardHelper.PressKey(Key.Right);
02110                 Wait.ForIdle();
02111                 LogScrollViewInfo(itemsViewUIObject);
02112                 currentItemIndex = GetCurrentItemIndex();
02113                 Verify.AreEqual(49, currentItemIndex, "Verifying CurrentItemIndex is still 49");
02114
02115                 Log.Comment("Pressing Home key");
02116                 KeyboardHelper.PressKey(Key.Home);
02117                 Wait.ForIdle();
02118                 LogScrollViewInfo(itemsViewUIObject);
02119                 currentItemIndex = GetCurrentItemIndex();
02120                 Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
02121
02122                 if (useLateralMoves)
02123                 {
02124                     Log.Comment("Pressing Right key");
02125                     KeyboardHelper.PressKey(Key.Right);
02126                     Wait.ForIdle();
02127                     LogScrollViewInfo(itemsViewUIObject);
02128                     currentItemIndex = GetCurrentItemIndex();
02129                     Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is 1");
02130                 }
02131
02132                 Log.Comment("Pressing Down key");
02133                 KeyboardHelper.PressKey(Key.Down);
02134                 Wait.ForIdle();
02135                 LogScrollViewInfo(itemsViewUIObject);
02136                 currentItemIndex = GetCurrentItemIndex();
02137                 Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");
02138
02139                 if (useLateralMoves)
02140                 {
02141                     Log.Comment("Pressing Left key");
02142                     KeyboardHelper.PressKey(Key.Left);
02143                     Wait.ForIdle();
02144                     LogScrollViewInfo(itemsViewUIObject);
02145                     currentItemIndex = GetCurrentItemIndex();
02146                     Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");
02147                     Verify.AreNotEqual(1, currentItemIndex, "Verifying CurrentItemIndex is not 1");
02148                 }
02149
02150                 Log.Comment("Pressing Up key");
02151                 KeyboardHelper.PressKey(Key.Up);
02152                 Wait.ForIdle();
02153                 LogScrollViewInfo(itemsViewUIObject);
02154                 currentItemIndex = GetCurrentItemIndex();
02155                 Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
02156
02157                 Log.Comment("Pressing PageDown key");
02158                 KeyboardHelper.PressKey(Key.PageDown);
02159                 Wait.ForIdle();
02160                 LogScrollViewInfo(itemsViewUIObject);
02161                 currentItemIndex = GetCurrentItemIndex();
02162                 Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");
02163
02164                 Log.Comment("Pressing PageDown key");
02165                 KeyboardHelper.PressKey(Key.PageDown);
02166                 Wait.ForIdle();
02167                 LogScrollViewInfo(itemsViewUIObject);
02168                 currentItemIndex = GetCurrentItemIndex();
02169                 Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");
02170
02171                 Log.Comment("Pressing PageUp key");
02172                 KeyboardHelper.PressKey(Key.PageUp);
02173                 Wait.ForIdle();
02174                 LogScrollViewInfo(itemsViewUIObject);
02175                 currentItemIndex = GetCurrentItemIndex();
02176                 Verify.AreNotEqual(0, currentItemIndex, "Verifying CurrentItemIndex is not 0");
02177
02178                 Log.Comment("Pressing PageUp key");
02179                 KeyboardHelper.PressKey(Key.PageUp);
02180                 Wait.ForIdle();
02181                 LogScrollViewInfo(itemsViewUIObject);
02182                 currentItemIndex = GetCurrentItemIndex();
02183                 Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
02184
02185                 ResetItemsView(cmbItemsSource, cmbLayout);
02186                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
02187             }
02188         }
02189
02190         private void KeyboardNavigationWithFastKeystrokes(string layout, Key key)
02191         {
02192             Log.Comment("Selecting ItemsView interactive tests");
02193
02194             ICollection<string> outputDebugStringComponentTypes = new[] { "ScrollView", "ItemsView" };
02195
02196             using (var setup = new ItemsViewTestSetupHelper(
02197                 testNames: new[] { "ItemsView Tests", "navigateToInteractiveTests" },
02198                 options: null,
02199                 shouldRestrictInnerFrameSize: false,
02200                 outputDebugStringLevel: "Verbose",
02201                 outputDebugStringComponentTypes: outputDebugStringComponentTypes))
02202             {
02203                 using (var loggingHelper = new LoggingHelper(this, outputDebugStringComponentTypes))
02204                 {
02205                     Log.Comment("Retrieving cmbItemTemplate");
02206                     ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
02207                     Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
02208
02209                     Log.Comment("Retrieving cmbItemsSource");
02210                     ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
02211                     Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
02212
02213                     Log.Comment("Retrieving cmbLayout");
02214                     ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
02215                     Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
02216
02217                     Log.Comment($"Changing Layout selection to '{layout}'");
02218                     cmbLayout.SelectItemByName(layout);
02219                     Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
02220
02221                     if (layout == "LinedFlowLayout")
02222                     {
02223                         Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Square ItemContainer)'");
02224                         cmbItemTemplate.SelectItemByName("Entity DataTemplate (Square ItemContainer)");
02225                     }
02226                     else
02227                     {
02228                         Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
02229                         cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
02230                     }
02231                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
02232
02233                     Log.Comment("Changing ItemsSource selection to 'Large List<Entity>'");
02234                     cmbItemsSource.SelectItemByName("Large List<Entity>");
02235                     Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
02236
02237                     if (layout == "LinedFlowLayout")
02238                     {
02239                         Log.Comment("Retrieving chkHandleItemsInfoRequested");
02240                         CheckBox chkHandleItemsInfoRequested = new CheckBox(FindElement.ById("chkHandleItemsInfoRequested"));
02241                         Verify.IsNotNull(chkHandleItemsInfoRequested, "Verifying that chkHandleItemsInfoRequested was found");
02242
02243                         if (ToggleState.Off == chkHandleItemsInfoRequested.ToggleState)
02244                         {
02245                             Log.Comment("Toggling chkHandleItemsInfoRequested.IsChecked to ToggleState.On");
02246                             chkHandleItemsInfoRequested.Toggle();
02247                             Wait.ForIdle();
02248                             Verify.AreEqual(ToggleState.On, chkHandleItemsInfoRequested.ToggleState);
02249                         }
02250
02251                         Log.Comment("Retrieving chkUseFastPath");
02252                         CheckBox chkUseFastPath = new CheckBox(FindElement.ById("chkUseFastPath"));
02253                         Verify.IsNotNull(chkUseFastPath, "Verifying that chkUseFastPath was found");
02254
02255                         if (ToggleState.Off == chkUseFastPath.ToggleState)
02256                         {
02257                             Log.Comment("Toggling chkUseFastPath.IsChecked to ToggleState.On");
02258                             chkUseFastPath.Toggle();
02259                             Wait.ForIdle();
02260                             Verify.AreEqual(ToggleState.On, chkUseFastPath.ToggleState);
02261                         }
02262                     }
02263
02264                     Log.Comment("Retrieving itemsView");
02265                     UIObject itemsViewUIObject = FindElement.ByName("itemsView");
02266                     Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
02267
02268                     Log.Comment("Clicking on ItemsView to select first item.");
02269                     itemsViewUIObject.Click(PointerButtons.Primary, 40.0, 40.0);
02270                     Wait.ForIdle();
02271                     LogScrollViewInfo(itemsViewUIObject);
02272                     int currentItemIndex = GetCurrentItemIndex();
02273                     Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
02274
02275                     if (key == Key.Up || key == Key.PageUp)
02276                     {
02277                         Log.Comment("Pressing End key");
02278                         KeyboardHelper.PressKey(Key.End);
02279                         Wait.ForIdle();
02280                         LogScrollViewInfo(itemsViewUIObject);
02281                         currentItemIndex = GetCurrentItemIndex();
02282                         Verify.AreEqual(999, currentItemIndex, "Verifying CurrentItemIndex is 999");
02283                     }
02284
02285                     uint numPresses = (key == Key.Up || key == Key.Down) ? 8u : 4u;
02286
02287                     Log.Comment("Pressing repeated key " + numPresses + " times");
02288                     KeyboardHelper.PressKey(key, ModifierKey.None, numPresses);
02289
02290                     Wait.ForIdle();
02291                     currentItemIndex = GetCurrentItemIndex();
02292
02293                     int expectedCurrentItemIndex = 0;
02294
02295                     if (layout == "LinedFlowLayout")
02296                     {
02297                         switch (key)
02298                         {
02299                             case Key.Down:
02300                                 expectedCurrentItemIndex = 48;
02301                                 break;
02302                             case Key.Up:
02303                                 expectedCurrentItemIndex = 951;
02304                                 break;
02305                             case Key.PageDown:
02306                                 expectedCurrentItemIndex = 138;
02307                                 break;
02308                             case Key.PageUp:
02309                                 expectedCurrentItemIndex = 861;
02310                                 break;
02311                         }
02312                     }
02313                     else
02314                     {
02315                         // layout == "StackLayout"
02316                         switch (key)
02317                         {
02318                             case Key.Down:
02319                                 expectedCurrentItemIndex = 8;
02320                                 break;
02321                             case Key.Up:
02322                                 expectedCurrentItemIndex = 991;
02323                                 break;
02324                             case Key.PageDown:
02325                                 expectedCurrentItemIndex = 19;
02326                                 break;
02327                             case Key.PageUp:
02328                                 expectedCurrentItemIndex = 980;
02329                                 break;
02330                         }
02331                     }
02332
02333                     if (currentItemIndex != expectedCurrentItemIndex)
02334                     {
02335                         Log.Warning($"Unexpected current element index {currentItemIndex} instead of {expectedCurrentItemIndex}");
02336                         LogAndClearTraces();
02337                         Wait.ForIdle();
02338                     }
02339
02340                     if (layout == "LinedFlowLayout")
02341                     {
02342                         switch (key)
02343                         {
02344                             case Key.Down:
02345                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 272.0);
02346                                 break;
02347                             case Key.Up:
02348                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 13252.0);
02349                                 break;
02350                             case Key.PageDown:
02351                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 1532.0);
02352                                 break;
02353                             case Key.PageUp:
02354                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 11992.0);
02355                                 break;
02356                         }
02357                     }
02358                     else
02359                     {
02360                         // layout == "StackLayout"
02361                         switch (key)
02362                         {
02363                             case Key.Down:
02364                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 384.0);
02365                                 break;
02366                             case Key.Up:
02367                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 95116.0);
02368                                 break;
02369                             case Key.PageDown:
02370                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 1440.0);
02371                                 break;
02372                             case Key.PageUp:
02373                                 LogScrollViewInfo(itemsViewUIObject, expectedVerticalOffset: 94060.0);
02374                                 break;
02375                         }
02376                     }
02377
02378                     Verify.AreEqual(expectedCurrentItemIndex, currentItemIndex, "Verifying CurrentItemIndex.");
02379
02380                     ResetItemsView(cmbItemsSource, cmbLayout);
02381                 }
02382             }
02383         }
02384
02385         private void VerifyItemsViewItemInvokedEvent(bool useItemContainer, bool isItemInvokedEnabled, string selectionMode)
02386         {
02387             Log.Comment("Selecting ItemsView interactive tests");
02388
02389             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
02390             {
02391                 Log.Comment("Retrieving chkIsItemInvokedEnabled");
02392                 CheckBox chkIsItemInvokedEnabled = new CheckBox(FindElement.ById("chkIsItemInvokedEnabled"));
02393                 Verify.IsNotNull(chkIsItemInvokedEnabled, "Verifying that chkIsItemInvokedEnabled was found");
02394
02395                 Log.Comment("Retrieving cmbSelectionMode");
02396                 ComboBox cmbSelectionMode = new ComboBox(FindElement.ById("cmbSelectionMode"));
02397                 Verify.IsNotNull(cmbSelectionMode, "Verifying that cmbSelectionMode was found");
02398
02399                 Log.Comment("Retrieving cmbItemTemplate");
02400                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
02401                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
02402
02403                 Log.Comment("Retrieving cmbItemsSource");
02404                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
02405                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
02406
02407                 Log.Comment("Retrieving cmbLayout");
02408                 ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
02409                 Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
02410
02411                 Log.Comment("Changing chkIsItemInvokedEnabled to " + isItemInvokedEnabled);
02412                 if (isItemInvokedEnabled == true) { chkIsItemInvokedEnabled.Check(); } else { chkIsItemInvokedEnabled.Uncheck();  };
02413                 Log.Comment("IsChecked ToggleState is now {0}", chkIsItemInvokedEnabled.ToggleState);
02414
02415                 Log.Comment("Changing SelectionMode selection to " + selectionMode);
02416                 cmbSelectionMode.SelectItemByName(selectionMode);
02417                 Log.Comment("Selection is now {0}", cmbSelectionMode.Selection[0].Name);
02418
02419                 Log.Comment("Changing Layout selection to 'UniformGridLayout'");
02420                 cmbLayout.SelectItemByName("UniformGridLayout");
02421                 Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
02422
02423                 if (useItemContainer)
02424                 {
02425                     Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
02426                     cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
02427                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
02428                 }
02429                 else
02430                 {
02431                     Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Small ContentControl)'");
02432                     cmbItemTemplate.SelectItemByName("Entity DataTemplate (Small ContentControl)");
02433                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
02434                 }
02435
02436                 Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
02437                 cmbItemsSource.SelectItemByName("List<Entity>");
02438                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
02439
02440                 Log.Comment("Retrieving itemsView");
02441                 UIObject itemsViewUIObject = FindElement.ByName("itemsView");
02442                 Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
02443
02444                 Log.Comment("Clicking on ItemsView to attempt to invoke first item.");
02445                 itemsViewUIObject.Click(PointerButtons.Primary, useItemContainer ? 40.0 : 20.0, useItemContainer ? 40.0 : 20.0);
02446                 Wait.ForIdle();
02447
02448                 int itemInvokedCount = ItemInvokedCount();
02449
02450                 Verify.AreEqual((isItemInvokedEnabled == true && selectionMode == "None") ? 1 : 0, itemInvokedCount, "Verifying itemInvoked occurrences");
02451
02452                 Log.Comment("Double-clicking on ItemsView to attempt to invoke first item.");
02453                 itemsViewUIObject.DoubleClick(PointerButtons.Primary, useItemContainer ? 40.0 : 20.0, useItemContainer ? 40.0 : 20.0);
02454                 Wait.ForIdle();
02455
02456                 itemInvokedCount = ItemInvokedCount();
02457
02458                 Verify.AreEqual((isItemInvokedEnabled == true && selectionMode != "None") ? 1 : 0, itemInvokedCount, "Verifying itemInvoked occurrences");
02459
02460                 ResetItemsView(cmbItemsSource, cmbLayout);
02461
02462                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
02463             }
02464         }
02465
02466         private void TabNavigationThroughItemsView(bool useItemContainer, string selectionMode)
02467         {
02468             Log.Comment("Selecting ItemsView interactive tests");
02469
02470             using (var setup = new TestSetupHelper(new[] { "ItemsView Tests", "navigateToInteractiveTests" }))
02471             {
02472                 Log.Comment("Retrieving cmbSelectionMode");
02473                 ComboBox cmbSelectionMode = new ComboBox(FindElement.ById("cmbSelectionMode"));
02474                 Verify.IsNotNull(cmbSelectionMode, "Verifying that cmbSelectionMode was found");
02475
02476                 Log.Comment("Retrieving cmbItemTemplate");
02477                 ComboBox cmbItemTemplate = new ComboBox(FindElement.ById("cmbItemTemplate"));
02478                 Verify.IsNotNull(cmbItemTemplate, "Verifying that cmbItemTemplate was found");
02479
02480                 Log.Comment("Retrieving cmbItemsSource");
02481                 ComboBox cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
02482                 Verify.IsNotNull(cmbItemsSource, "Verifying that cmbItemsSource was found");
02483
02484                 Log.Comment("Retrieving cmbLayout");
02485                 ComboBox cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
02486                 Verify.IsNotNull(cmbLayout, "Verifying that cmbLayout was found");
02487
02488                 Log.Comment("Retrieving btnBefore");
02489                 Button btnBefore = new Button(FindElement.ById("btnBefore"));
02490                 Verify.IsNotNull(btnBefore, "Verifying that btnBefore was found");
02491
02492                 Log.Comment("Retrieving btnAfter");
02493                 Button btnAfter = new Button(FindElement.ById("btnAfter"));
02494                 Verify.IsNotNull(btnAfter, "Verifying that btnAfter was found");
02495
02496                 Log.Comment("Changing SelectionMode selection to " + selectionMode);
02497                 cmbSelectionMode.SelectItemByName(selectionMode);
02498                 Log.Comment("Selection is now {0}", cmbSelectionMode.Selection[0].Name);
02499
02500                 Log.Comment("Changing Layout selection to 'UniformGridLayout'");
02501                 cmbLayout.SelectItemByName("UniformGridLayout");
02502                 Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
02503
02504                 if (useItemContainer)
02505                 {
02506                     Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Medium ItemContainer)'");
02507                     cmbItemTemplate.SelectItemByName("Entity DataTemplate (Medium ItemContainer)");
02508                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
02509                 }
02510                 else
02511                 {
02512                     Log.Comment("Changing ItemTemplate selection to 'Entity DataTemplate (Small ContentControl)'");
02513                     cmbItemTemplate.SelectItemByName("Entity DataTemplate (Small ContentControl)");
02514                     Log.Comment("Selection is now {0}", cmbItemTemplate.Selection[0].Name);
02515                 }
02516
02517                 Log.Comment("Changing ItemsSource selection to 'List<Entity>'");
02518                 cmbItemsSource.SelectItemByName("List<Entity>");
02519                 Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
02520
02521                 Log.Comment("Retrieving itemsView");
02522                 UIObject itemsViewUIObject = FindElement.ByName("itemsView");
02523                 Verify.IsNotNull(itemsViewUIObject, "Verifying that itemsView was found");
02524
02525                 Log.Comment("Clicking on ButtonBefore.");
02526                 btnBefore.Click(PointerButtons.Primary);
02527                 Wait.ForIdle();
02528
02529                 Log.Comment("Pressing Tab key");
02530                 KeyboardHelper.PressKey(btnBefore, Key.Tab, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
02531                 Wait.ForIdle();
02532
02533                 int currentItemIndex = GetCurrentItemIndex();
02534                 Verify.AreEqual(0, currentItemIndex, "Verifying CurrentItemIndex is 0");
02535
02536                 Log.Comment("Pressing Right key");
02537                 KeyboardHelper.PressKey(itemsViewUIObject, Key.Right, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
02538                 Wait.ForIdle();
02539                 currentItemIndex = GetCurrentItemIndex();
02540                 Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is 1");
02541
02542                 Log.Comment("Pressing Tab key");
02543                 KeyboardHelper.PressKey(itemsViewUIObject, Key.Tab, modifierKey: ModifierKey.None, numPresses: 1, useDebugMode: true);
02544                 Wait.ForIdle();
02545
02546                 Verify.IsTrue(btnAfter.HasKeyboardFocus, "Verifying AfterButton has keyboard focus");
02547                 currentItemIndex = GetCurrentItemIndex();
02548                 Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is still 1");
02549
02550                 Log.Comment("Pressing Shift-Tab key");
02551                 KeyboardHelper.PressKey(btnAfter, Key.Tab, modifierKey: ModifierKey.Shift, numPresses: 1, useDebugMode: true);
02552                 Wait.ForIdle();
02553
02554                 currentItemIndex = GetCurrentItemIndex();
02555                 Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is still 1");
02556
02557                 Log.Comment("Pressing Shift-Tab key");
02558                 KeyboardHelper.PressKey(itemsViewUIObject, Key.Tab, modifierKey: ModifierKey.Shift, numPresses: 1, useDebugMode: true);
02559                 Wait.ForIdle();
02560
02561                 Verify.IsTrue(btnBefore.HasKeyboardFocus, "Verifying BeforeButton has keyboard focus");
02562                 currentItemIndex = GetCurrentItemIndex();
02563                 Verify.AreEqual(1, currentItemIndex, "Verifying CurrentItemIndex is still 1");
02564
02565                 ResetItemsView(cmbItemsSource, cmbLayout);
02566
02567                 // Output-debug-string-level "None" is automatically restored when landing back on the ScrollView test page.
02568             }
02569         }
02570
02571         private void InvokeScrollViewScrollToButton()
02572         {
02573             Log.Comment("Retrieving btnScrollViewScrollTo");
02574             UIObject scrollViewScrollToUIObject = FindElement.ById("btnScrollViewScrollTo");
02575             Verify.IsNotNull(scrollViewScrollToUIObject, "Verifying that btnScrollViewScrollTo Button was found");
02576
02577             Button scrollViewScrollToButton = new Button(scrollViewScrollToUIObject);
02578
02579             Log.Comment("Invoking scrollViewScrollToButton");
02580             scrollViewScrollToButton.Invoke();
02581             WaitForEditValue("txtStatus" /*editName*/, "ScrollView scrolled" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
02582         }
02583
02584         private void InvokeScrollViewZoomToButton()
02585         {
02586             Log.Comment("Retrieving btnScrollViewZoomTo");
02587             UIObject scrollViewZoomToUIObject = FindElement.ById("btnScrollViewZoomTo");
02588             Verify.IsNotNull(scrollViewZoomToUIObject, "Verifying that btnScrollViewZoomTo Button was found");
02589
02590             Button scrollViewZoomToButton = new Button(scrollViewZoomToUIObject);
02591
02592             Log.Comment("Invoking scrollViewZoomToButton");
02593             scrollViewZoomToButton.Invoke();
02594             WaitForEditValue("txtStatus" /*editName*/, "ScrollView zoomed" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
02595         }
02596
02597         private void TapResetScrollViewButton()
02598         {
02599             Log.Comment("Retrieving btnResetScrollView");
02600             UIObject resetScrollViewUIObject = FindElement.ById("btnResetScrollView");
02601             Verify.IsNotNull(resetScrollViewUIObject, "Verifying that btnResetScrollView Button was found");
02602
02603             Button resetScrollViewButton = new Button(resetScrollViewUIObject);
02604             InputHelper.Tap(resetScrollViewButton);
02605             if (!WaitForEditValue("txtStatus" /*editName*/, "ScrollView reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/))
02606             {
02607                 InputHelper.Tap(resetScrollViewButton);
02608                 WaitForEditValue("txtStatus" /*editName*/, "ScrollView reset" /*editValue*/, 4.0 /*secondsTimeout*/, false /*throwOnError*/);
02609             }
02610         }
02611
02612         private void ResetItemsView(ComboBox cmbItemsSource, ComboBox cmbLayout)
02613         {
02614             if (cmbItemsSource == null)
02615             {
02616                 Log.Comment("Retrieving cmbItemsSource");
02617                 cmbItemsSource = new ComboBox(FindElement.ById("cmbItemsSource"));
02618             }
02619
02620             Verify.IsNotNull(cmbItemsSource);
02621
02622             Log.Comment("Resetting ItemsSource");
02623             cmbItemsSource.SelectItemByName("null");
02624             Log.Comment("Selection is now {0}", cmbItemsSource.Selection[0].Name);
02625
02626             Wait.ForIdle();
02627
02628             if (cmbLayout == null)
02629             {
02630                 Log.Comment("Retrieving cmbLayout");
02631                 cmbLayout = new ComboBox(FindElement.ById("cmbLayout"));
02632             }
02633
02634             Verify.IsNotNull(cmbLayout);
02635
02636             Log.Comment("Resetting Layout");
02637             cmbLayout.SelectItemByName("null");
02638             Log.Comment("Selection is now {0}", cmbLayout.Selection[0].Name);
02639
02640             Wait.ForIdle();
02641         }
02642
02643         private int GetCurrentItemIndex()
02644         {
02645             Log.Comment("Retrieving btnGetCurrentItemIndex");
02646             UIObject getCurrentItemIndexUIObject = FindElement.ById("btnGetCurrentItemIndex");
02647             Button getCurrentItemIndexButton = new Button(getCurrentItemIndexUIObject);
02648             Verify.IsNotNull(getCurrentItemIndexButton, "Verifying that btnGetCurrentItemIndex Button was found");
02649
02650             getCurrentItemIndexButton.Invoke();
02651             Wait.ForIdle();
02652
02653             Log.Comment("Retrieving txtCurrentItemIndex");
02654             UIObject currentItemIndexUIObject = FindElement.ById("txtCurrentItemIndex");
02655             Edit currentItemIndexTextBox = new Edit(currentItemIndexUIObject);
02656             Verify.IsNotNull(currentItemIndexTextBox, "Verifying that txtCurrentItemIndex TextBox was found");
02657
02658             Log.Comment($"CurrentItemIndex={currentItemIndexTextBox.Value}");
02659
02660             return int.Parse(currentItemIndexTextBox.Value);
02661         }
02662
02663         private void GetScrollViewView(out double horizontalOffset, out double verticalOffset, out float zoomFactor)
02664         {
02665             Log.Comment("Retrieving ScrollView view.");
02666             horizontalOffset = -1.0;
02667             verticalOffset = -1.0;
02668             zoomFactor = -1.0f;
02669
02670             Log.Comment("Retrieving txtScrollViewHorizontalOffset.");
02671             UIObject viewUIObject = FindElement.ById("txtScrollViewHorizontalOffset");
02672             if (viewUIObject == null)
02673             {
02674                 Log.Comment("txtScrollViewHorizontalOffset not found.");
02675             }
02676             else
02677             {
02678                 Log.Comment("txtScrollViewHorizontalOffset found.");
02679                 Edit viewTextBox = new Edit(viewUIObject);
02680                 Log.Comment("Current HorizontalOffset: " + viewTextBox.Value);
02681                 horizontalOffset = string.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);
02682             }
02683
02684             Log.Comment("Retrieving txtScrollViewVerticalOffset.");
02685             viewUIObject = FindElement.ById("txtScrollViewVerticalOffset");
02686             if (viewUIObject == null)
02687             {
02688                 Log.Comment("txtScrollViewVerticalOffset not found.");
02689             }
02690             else
02691             {
02692                 Log.Comment("txtScrollViewVerticalOffset found.");
02693                 Edit viewTextBox = new Edit(viewUIObject);
02694                 Log.Comment("Current VerticalOffset: " + viewTextBox.Value);
02695                 verticalOffset = string.IsNullOrWhiteSpace(viewTextBox.Value) ? double.NaN : Convert.ToDouble(viewTextBox.Value);
02696             }
02697
02698             Log.Comment("Retrieving txtScrollViewZoomFactor.");
02699             viewUIObject = FindElement.ById("txtScrollViewZoomFactor");
02700             if (viewUIObject == null)
02701             {
02702                 Log.Comment("txtScrollViewZoomFactor not found.");
02703             }
02704             else
02705             {
02706                 Log.Comment("txtScrollViewZoomFactor found.");
02707                 Edit viewTextBox = new Edit(viewUIObject);
02708                 Log.Comment("Current ZoomFactor: " + viewTextBox.Value);
02709                 zoomFactor = string.IsNullOrWhiteSpace(viewTextBox.Value) ? float.NaN : Convert.ToSingle(viewTextBox.Value);
02710             }
02711         }
02712
02713         private void PrepareForScrollViewManipulationStart(string stateTextBoxName = "txtScrollViewState")
02714         {
02715             UIObject scrollViewStateUIObject = FindElement.ById(stateTextBoxName);
02716             Edit scrollViewStateTextBox = new Edit(scrollViewStateUIObject);
02717             Log.Comment("Pre-manipulation ScrollViewState: " + scrollViewStateTextBox.Value);
02718             Wait.ForIdle();
02719         }
02720
02721         private void LogScrollViewInfo(UIObject itemsViewUIObject, double? expectedVerticalOffset = null, bool? getScrollViewView = true)
02722         {
02723             Log.Comment("Retrieving PART_ScrollView");
02724             UIObject scrollViewUIObject = itemsViewUIObject.FirstChild;
02725             Verify.IsNotNull(scrollViewUIObject, "Verifying that PART_ScrollView was found");
02726
02727             Log.Comment("Retrieving PART_ScrollPresenter as a UIObject");
02728             UIObject scrollPresenterUIObject = FindElement.ById("PART_ScrollPresenter");
02729             Verify.IsNotNull(scrollPresenterUIObject, "Verifying that PART_ScrollView.PART_Root.PART_ScrollPresenter was found");
02730
02731             Log.Comment("Retrieving PART_ScrollPresenter as a ScrollPresenter");
02732             ScrollPresenter scrollPresenter = new ScrollPresenter(scrollPresenterUIObject);
02733             Verify.IsNotNull(scrollPresenter, "Verifying that scrollPresenter was found");
02734
02735             Log.Comment("scrollPresenter.HorizontalScrollPercent={0}", scrollPresenter.HorizontalScrollPercent);
02736             Log.Comment("scrollPresenter.VerticalScrollPercent={0}", scrollPresenter.VerticalScrollPercent);
02737             Log.Comment("scrollPresenter.VerticalViewSize={0}", scrollPresenter.VerticalViewSize);
02738             Log.Comment("scrollPresenter.BoundingRectangle.Height={0}", scrollPresenter.BoundingRectangle.Height);
02739
02740             if (getScrollViewView == true)
02741             {
02742                 int attempts = 0;
02743                 double verticalOffsetDelta = 0.0;
02744                 bool verticalOffsetDeltaTooLarge = false;
02745
02746                 do
02747                 {
02748                     Wait.ForIdle();
02749
02750                     double horizontalOffset;
02751                     double verticalOffset;
02752                     float zoomFactor;
02753
02754                     GetScrollViewView(out horizontalOffset, out verticalOffset, out zoomFactor);
02755                     Log.Comment("horizontalOffset={0}", horizontalOffset);
02756                     Log.Comment("verticalOffset={0}", verticalOffset);
02757                     Log.Comment("zoomFactor={0}", zoomFactor);
02758
02759                     if (expectedVerticalOffset != null)
02760                     {
02761                         attempts++;
02762                         verticalOffsetDelta = Math.Abs((double)expectedVerticalOffset - verticalOffset);
02763                         verticalOffsetDeltaTooLarge = verticalOffsetDelta > 0.5;
02764                     }
02765                 }
02766                 while (verticalOffsetDeltaTooLarge && attempts <= 3);
02767
02768                 if (expectedVerticalOffset != null)
02769                 {
02770                     Verify.IsLessThanOrEqual(verticalOffsetDelta, 0.5, "Verifying verticalOffset is close to " + expectedVerticalOffset);
02771                 }
02772             }
02773         }
02774
02775         private void LogEditValue(string editName)
02776         {
02777             Edit edit = new Edit(FindElement.ById(editName));
02778             Verify.IsNotNull(edit);
02779             LogEditValue(editName, edit);
02780         }
02781
02782         private void LogEditValue(string editName, Edit edit)
02783         {
02784             Log.Comment("Current value for " + editName + ": " + edit.Value);
02785         }
02786
02787         private void WaitForScrollViewManipulationEnd(string scrollViewName, string stateTextBoxName = "txtScrollViewState")
02788         {
02789             WaitForManipulationEnd(scrollViewName, stateTextBoxName);
02790         }
02791
02792         private bool WaitForManipulationEnd(string elementName, string stateTextBoxName, bool throwOnError = true)
02793         {
02794             UIObject elementStateUIObject = FindElement.ById(stateTextBoxName);
02795             Edit elementStateTextBox = new Edit(elementStateUIObject);
02796             Log.Comment("Current State: " + elementStateTextBox.Value);
02797             if (elementStateTextBox.Value != "Idle")
02798             {
02799                 using (var waiter = new ValueChangedEventWaiter(elementStateTextBox, "Idle"))
02800                 {
02801                     int loops = 0;
02802
02803                     Log.Comment("Waiting for " + elementName + "'s manipulation end.");
02804                     while (true)
02805                     {
02806                         bool success = waiter.TryWait(TimeSpan.FromMilliseconds(250));
02807
02808                         Log.Comment("Current State: " + elementStateTextBox.Value);
02809
02810                         if (success)
02811                         {
02812                             Log.Comment("Wait succeeded");
02813                             break;
02814                         }
02815                         else
02816                         {
02817                             if (elementStateTextBox.Value == "Idle")
02818                             {
02819                                 Log.Warning("Wait failed but TextBox contains expected text");
02820                                 LogAndClearTraces();
02821                                 break;
02822                             }
02823                             else if (loops < 20)
02824                             {
02825                                 loops++;
02826                                 waiter.Reset();
02827                             }
02828                             else
02829                             {
02830                                 if (throwOnError)
02831                                 {
02832                                     Log.Error("Wait for manipulation end failed");
02833                                     LogAndClearTraces();
02834                                     throw new WaiterException();
02835                                 }
02836                                 else
02837                                 {
02838                                     Log.Warning("Wait for manipulation end failed");
02839                                     LogAndClearTraces();
02840                                     return false;
02841                                 }
02842                             }
02843                         }
02844                     }
02845                 }
02846             }
02847             return true;
02848         }
02849
02850         private bool WaitForEditValue(string editName, string editValue, double secondsTimeout = 2.0, bool throwOnError = true)
02851         {
02852             Edit edit = new Edit(FindElement.ById(editName));
02853             Verify.IsNotNull(edit);
02854             LogEditValue(editName, edit);
02855             if (edit.Value != editValue)
02856             {
02857                 using (var waiter = new ValueChangedEventWaiter(edit, editValue))
02858                 {
02859                     Log.Comment("Waiting for " + editName + " to be set to " + editValue);
02860
02861                     bool success = waiter.TryWait(TimeSpan.FromSeconds(secondsTimeout));
02862                     Log.Comment("Current value for " + editName + ": " + edit.Value);
02863
02864                     if (success)
02865                     {
02866                         Log.Comment("Wait succeeded");
02867                     }
02868                     else
02869                     {
02870                         if (edit.Value == editValue)
02871                         {
02872                             Log.Warning("Wait failed but TextBox contains expected Text");
02873                             LogAndClearTraces();
02874                         }
02875                         else
02876                         {
02877                             if (throwOnError)
02878                             {
02879                                 Log.Error("Wait for edit value failed");
02880                                 LogAndClearTraces();
02881                                 throw new WaiterException();
02882                             }
02883                             else
02884                             {
02885                                 Log.Warning("Wait for edit value failed");
02886                                 LogAndClearTraces();
02887                                 return false;
02888                             }
02889                         }
02890                     }
02891                 }
02892             }
02893             return true;
02894         }
02895
02896         private void WaitForBoxChecked(string checkBoxName)
02897         {
02898             Log.Comment($"Waiting for checkbox {checkBoxName} checked...");
02899             LogEditValue("txtStatus");
02900
02901             UIObject checkBoxUIObject = FindElement.ById(checkBoxName);
02902             Verify.IsNotNull(checkBoxUIObject);
02903             CheckBox checkBox = new CheckBox(checkBoxUIObject);
02904             Verify.IsNotNull(checkBox);
02905
02906             if (checkBox.ToggleState == ToggleState.On)
02907             {
02908                 Log.Comment("CheckBox already checked.");
02909             }
02910             else
02911             {
02912                 checkBox.GetToggledWaiter().TryWait();
02913                 if (checkBox.ToggleState != ToggleState.On)
02914                 {
02915                     Log.Warning($"{checkBoxName} was not checked.");
02916                     throw new WaiterException();
02917                 }
02918                 Log.Comment("CheckBox checked.");
02919             }
02920         }
02921
02922         private int ItemInvokedCount()
02923         {
02924             int itemInvokedCount = 0;
02925
02926             Log.Comment("Counting ItemsView.ItemInvoked events in full log:");
02927
02928             UpdateTraces();
02929
02930             UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
02931             Verify.IsNotNull(fullLogUIObject);
02932             ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
02933             Verify.IsNotNull(cmbFullLog);
02934
02935             foreach (ComboBoxItem item in cmbFullLog.AllItems)
02936             {
02937                 if (item.Name.Contains("ItemsView.ItemInvoked"))
02938                 {
02939                     itemInvokedCount++;
02940                 }
02941             }
02942
02943             Log.Comment($"Log Entries Count={cmbFullLog.AllItems.Count}.");
02944             Log.Comment($"ViewChanged Count={itemInvokedCount}.");
02945
02946             ClearTraces();
02947
02948             return itemInvokedCount;
02949         }
02950
02951         private void UpdateTraces()
02952         {
02953             Log.Comment("Updating full log:");
02954             LogEditValue("txtStatus");
02955
02956             TextInput.SendText("g");
02957             WaitForBoxChecked("chkLogUpdated");
02958         }
02959
02960         private void LogTraces()
02961         {
02962             UpdateTraces();
02963
02964             Log.Comment("Reading full log:");
02965
02966             UIObject fullLogUIObject = FindElement.ById("cmbFullLog");
02967             Verify.IsNotNull(fullLogUIObject);
02968             ComboBox cmbFullLog = new ComboBox(fullLogUIObject);
02969             Verify.IsNotNull(cmbFullLog);
02970
02971             foreach (ComboBoxItem item in cmbFullLog.AllItems)
02972             {
02973                 Log.Comment(item.Name);
02974             }
02975         }
02976
02977         private void ClearTraces()
02978         {
02979             Log.Comment("Clearing full log.");
02980             LogEditValue("txtStatus");
02981
02982             TextInput.SendText("c");
02983             WaitForBoxChecked("chkLogCleared");
02984         }
02985
02986         private void LogAndClearTraces()
02987         {
02988             LogTraces();
02989             ClearTraces();
02990         }
02991
02992         private void SetCheckBoxValue(string checkBoxName, bool checkBoxValue)
02993         {
02994             Log.Comment("Retrieving " + checkBoxName);
02995             CheckBox checkBox = new CheckBox(FindElement.ById(checkBoxName));
02996             if (checkBox == null)
02997             {
02998                 Log.Warning(checkBoxName + " was not found");
02999             }
03000             else if (checkBoxValue && checkBox.ToggleState != ToggleState.On ||
03001                     !checkBoxValue && checkBox.ToggleState != ToggleState.Off)
03002             {
03003                 Log.Comment(checkBoxName + " was found. Toggling its IsChecked to " + checkBoxValue);
03004                 checkBox.Toggle();
03005                 Wait.ForIdle();
03006             }
03007         }
03008
03009         private class ItemsViewTestSetupHelper : TestSetupHelper
03010         {
03011             public ItemsViewTestSetupHelper(
03012                 ICollection<string> testNames,
03013                 TestSetupHelperOptions options,
03014                 bool shouldRestrictInnerFrameSize,
03015                 string outputDebugStringLevel,
03016                 ICollection<string> outputDebugStringComponentTypes)
03017                 : base(testNames, options, shouldRestrictInnerFrameSize, outputDebugStringLevel, outputDebugStringComponentTypes)
03018             {
03019             }
03020
03021             protected override void TestPageLoaded(string testName)
03022             {
03023                 Log.Comment("ItemsViewTestSetupHelper - " + testName + " loaded.");
03024
03025                 if (testName == "ItemsView Tests")
03026                 {
03027                     SetCheckBoxValue(checkBoxName: "chkItemContainer", checkBoxValue: false);
03028                     SetCheckBoxValue(checkBoxName: "chkItemsView", checkBoxValue: false);
03029                     SetCheckBoxValue(checkBoxName: "chkItemsRepeater", checkBoxValue: false);
03030                     SetCheckBoxValue(checkBoxName: "chkItemContainer", checkBoxValue: false);
03031                     SetCheckBoxValue(checkBoxName: "chkLinedFlowLayout", checkBoxValue: false);
03032                     SetCheckBoxValue(checkBoxName: "chkScrollView", checkBoxValue: false);
03033                     SetCheckBoxValue(checkBoxName: "chkScrollPresenter", checkBoxValue: false);
03034                     SetCheckBoxValue(checkBoxName: "chkAnnotatedScrollBar", checkBoxValue: false);
03035
03036                     if (OutputDebugStringComponentTypes != null)
03037                     {
03038                         foreach (string componentType in OutputDebugStringComponentTypes)
03039                         {
03040                             SetCheckBoxValue(checkBoxName: "chk" + componentType, checkBoxValue: true);
03041                         }
03042                     }
03043
03044                     SetOutputDebugStringLevel(OutputDebugStringLevel);
03045                 }
03046             }
03047
03048             // outputDebugStringLevel can be "None", "Info" or "Verbose"
03049             private void SetOutputDebugStringLevel(string outputDebugStringLevel)
03050             {
03051                 Log.Comment("Retrieving cmbItemsViewOutputDebugStringLevel");
03052                 ComboBox cmbItemsViewOutputDebugStringLevel = new ComboBox(FindElement.ById("cmbItemsViewOutputDebugStringLevel"));
03053                 Verify.IsNotNull(cmbItemsViewOutputDebugStringLevel, "Verifying that cmbItemsViewOutputDebugStringLevel was found");
03054
03055                 Log.Comment("Changing output-debug-string-level selection to " + outputDebugStringLevel);
03056                 cmbItemsViewOutputDebugStringLevel.SelectItemByName(outputDebugStringLevel);
03057                 Log.Comment("Selection is now {0}", cmbItemsViewOutputDebugStringLevel.Selection[0].Name);
03058             }
03059
03060             private void SetCheckBoxValue(string checkBoxName, bool checkBoxValue)
03061             {
03062                 Log.Comment("Retrieving " + checkBoxName);
03063                 CheckBox checkBox = new CheckBox(FindElement.ById(checkBoxName));
03064                 if (checkBox == null)
03065                 {
03066                     Log.Warning(checkBoxName + " was not found");
03067                 }
03068                 else if (checkBoxValue && checkBox.ToggleState != ToggleState.On ||
03069                         !checkBoxValue && checkBox.ToggleState != ToggleState.Off)
03070                 {
03071                     Log.Comment(checkBoxName + " was found. Toggling its IsChecked to " + checkBoxValue);
03072                     checkBox.Toggle();
03073                     Wait.ForIdle();
03074                 }
03075             }
03076         }
03077
03078         private class LoggingHelper : IDisposable
03079         {
03080             private ItemsViewTestsWithInputHelper m_owner;
03081             private ICollection<string> m_componentTypes;
03082
03083             public LoggingHelper(ItemsViewTestsWithInputHelper owner, ICollection<string> componentTypes)
03084             {
03085                 m_owner = owner;
03086                 m_componentTypes = componentTypes;
03087
03088                 SetLoggingLevel(true, m_componentTypes);
03089             }
03090
03091             public void Dispose()
03092             {
03093                 SetLoggingLevel(false, m_componentTypes);
03094             }
03095
03096             private void SetLoggingLevel(bool set, ICollection<string> componentTypes)
03097             {
03098                 if (componentTypes != null)
03099                 {
03100                     foreach (string componentName in componentTypes)
03101                     {
03102                         switch (componentName)
03103                         {
03104                             case "ScrollView":
03105                                 m_owner.SetCheckBoxValue(checkBoxName: "chkLogScrollViewMessages", checkBoxValue: set);
03106                                 break;
03107                             case "ScrollPresenter":
03108                                 m_owner.SetCheckBoxValue(checkBoxName: "chkLogScrollPresenterMessages", checkBoxValue: set);
03109                                 break;
03110                             case "ItemsRepeater":
03111                                 m_owner.SetCheckBoxValue(checkBoxName: "chkLogItemsRepeaterMessages", checkBoxValue: set);
03112                                 break;
03113                             case "ItemsView":
03114                                 m_owner.SetCheckBoxValue(checkBoxName: "chkLogItemsViewMessages", checkBoxValue: set);
03115                                 break;
03116                             case "AnnotatedScrollBar":
03117                                 m_owner.SetCheckBoxValue(checkBoxName: "chkLogAnnotatedScrollBarMessages", checkBoxValue: set);
03118                                 break;
03119                             case "LinedFlowLayout":
03120                                 m_owner.SetCheckBoxValue(checkBoxName: "chkLogLinedFlowLayoutMessages", checkBoxValue: set);
03121                                 break;
03122                             default:
03123                                 Log.Error("SetLoggingLevel - " + componentName + " unexpected.");
03124                                 break;
03125                         }
03126                     }
03127                 }
03128             }
03129         }
03130     }
03131 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GroupedListViewBasePage Member List

This is the complete list of members for GroupedListViewBasePage, including all inherited members.
_cvs | GroupedListViewBasePage | [private]
_groupedListViewBaseViewModel | GroupedListViewBasePage | [private]
_listViewBase | GroupedListViewBasePage | [private]
_scrollViewer | GroupedListViewBasePage | [private]
AppendEventMessage(string eventMessage) | GroupedListViewBasePage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnCollectionViewMoveCurrentToPosition_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnFocusManagerCollectionViewCurrentItemProgrammaticFocus_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetCollectionViewCurrentItem_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetCollectionViewCurrentPosition_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetItemsPanelCacheLength_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetItemsPanelGroupHeaderPlacement_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetItemsPanelGroupPadding_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetItemsPanelMargin_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetItemsPanelOrientation_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetItemsWrapGridItemHeight_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetItemsWrapGridItemWidth_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetListViewBaseSelectionMode_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetListViewBaseTabNavigation_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerExtentHeight_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerExtentWidth_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerHorizontalOffset_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerHorizontalScrollMode_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerVerticalOffset_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerVerticalScrollMode_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerViewportHeight_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnGetScrollViewerViewportWidth_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnResetItemsSource_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnScrollIntoView_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsPanelCacheLength_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsPanelGroupHeaderPlacement_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsPanelGroupPadding_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsPanelMargin_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsPanelOrientation_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsSource_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsWrapGridItemHeight_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetItemsWrapGridItemWidth_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetListViewBaseSelectionMode_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetListViewBaseTabNavigation_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetScrollViewerHorizontalScrollMode_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
BtnSetScrollViewerVerticalScrollMode_Click(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkDataSource_Checked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkDataSource_Unchecked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkListViewBaseIsItemClickEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkMethods_Checked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkMethods_Unchecked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkProperties_Checked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ChkProperties_Unchecked(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
CmbListViewBaseFooter_SelectionChanged(object sender, SelectionChangedEventArgs e) | GroupedListViewBasePage | [inline, private]
CmbListViewBaseHeader_SelectionChanged(object sender, SelectionChangedEventArgs e) | GroupedListViewBasePage | [inline, private]
CmbListViewBaseItemsPanelType_SelectionChanged(object sender, SelectionChangedEventArgs e) | GroupedListViewBasePage | [inline, private]
CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | GroupedListViewBasePage | [inline, private]
CmbScrollViewerHorizontalSnapPointsType_SelectionChanged(object sender, SelectionChangedEventArgs e) | GroupedListViewBasePage | [inline, private]
CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | GroupedListViewBasePage | [inline, private]
CmbScrollViewerVerticalSnapPointsType_SelectionChanged(object sender, SelectionChangedEventArgs e) | GroupedListViewBasePage | [inline, private]
FindElementOfTypeInSubtree< T >(DependencyObject element) | GroupedListViewBasePage | [inline, private, static]
GetDataSourceItemFromIndex(int itemIndex) | GroupedListViewBasePage | [inline, private]
GetThicknessFromString(string thickness) | GroupedListViewBasePage | [inline, private]
GroupedListViewBasePage() | GroupedListViewBasePage | [inline]
GroupedListViewBasePage_Loaded(object sender, RoutedEventArgs e) | GroupedListViewBasePage | [inline, private]
ListViewBase_ItemClick(object sender, ItemClickEventArgs e) | GroupedListViewBasePage | [inline, private]
NbItemsWrapGridMaximumRowsOrColumns_ValueChanged(object sender, object e) | GroupedListViewBasePage | [inline, private]
OnNavigatedTo(NavigationEventArgs e) | GroupedListViewBasePage | [inline, protected]
RestoreScrollViewerWidth() | GroupedListViewBasePage | [inline, private]
ScrollViewer_ViewChanged(object sender, object e) | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelAreStickyGroupHeadersEnabled() | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelCacheLength() | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelGroupHeaderPlacement() | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelGroupPadding() | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelMargin() | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelOrientation() | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelProperties() | GroupedListViewBasePage | [inline, private]
UpdateItemsPanelType() | GroupedListViewBasePage | [inline, private]
UpdateItemsWrapGridItemHeight() | GroupedListViewBasePage | [inline, private]
UpdateItemsWrapGridItemWidth() | GroupedListViewBasePage | [inline, private]
UpdateItemsWrapGridUIVisibility(Visibility visibility) | GroupedListViewBasePage | [inline, private]
UpdateListViewBaseProperties() | GroupedListViewBasePage | [inline, private]
UpdateListViewBaseSelectionMode() | GroupedListViewBasePage | [inline, private]
UpdateListViewBaseSingleSelectionFollowsFocus() | GroupedListViewBasePage | [inline, private]
UpdateListViewBaseTabNavigation() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerExtentHeight() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerExtentWidth() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerHorizontalOffset() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerHorizontalScrollMode() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerHorizontalSnapPointsType() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerProperties() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerScrollOrientation() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerSizeProperties() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerVerticalOffset() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerVerticalScrollMode() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerVerticalSnapPointsType() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerViewportHeight() | GroupedListViewBasePage | [inline, private]
UpdateScrollViewerViewportWidth() | GroupedListViewBasePage | [inline, private]
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PaneFooterTestPage Member List

This is the complete list of members for PaneFooterTestPage, including all inherited members.
CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | PaneFooterTestPage | [inline, private]
FlipOrientation_Click(object sender, RoutedEventArgs e) | PaneFooterTestPage | [inline, private]
GetIconColumnWidth_Click(object sender, RoutedEventArgs e) | PaneFooterTestPage | [inline, private]
PaneFooterTestPage() | PaneFooterTestPage | [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewCompactPaneLengthTestPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewCompactPaneLengthTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Media;
00008 using Windows.Foundation;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class NavigationViewCompactPaneLengthTestPage : TestPage
00013     {
00014         public NavigationViewCompactPaneLengthTestPage()
00015         {
00016             this.InitializeComponent();
00017
00018             NavView.CompactPaneLength = 96;
00019         }
00020
00021         private void CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00022         {
00023             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00024             NavView.CompactPaneLength = tag;
00025         }
00026
00027         private void OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00028         {
00029             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00030             NavView.OpenPaneLength = tag;
00031         }
00032
00033         private void IsSettingsVisibleCheckbox_CheckedChanged(object sender, RoutedEventArgs e)
00034         {
00035             if (IsSettingsVisibleCheckbox != null && NavView != null)
00036             {
00037                 NavView.IsSettingsVisible = (bool)IsSettingsVisibleCheckbox.IsChecked;
00038             }
00039         }
00040
00041         private void IsPaneFooterVisibleCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00042         {
00043             if (IsPaneFooterVisibleCheckBox != null && PaneFooter != null)
00044             {
00045                 PaneFooter.Visibility = IsPaneFooterVisibleCheckBox.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
00046             }
00047         }
00048
00049         private void PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00050         {
00051             NavView.IsPaneToggleButtonVisible = true;
00052         }
00053
00054         private void PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00055         {
00056             NavView.IsPaneToggleButtonVisible = false;
00057         }
00058
00059         private void PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00060         {
00061             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00062             var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
00063             NavView.PaneDisplayMode = mode;
00064         }
00065
00066         private void BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00067         {
00068             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00069         }
00070
00071         private void BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00072         {
00073             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
00074         }
00075
00076         private void BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00077         {
00078             NavView.IsBackEnabled = true;
00079         }
00080
00081         private void BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00082         {
00083             NavView.IsBackEnabled = false;
00084         }
00085
00086         private void CheckMenuItemsOffset_Click(object sender, RoutedEventArgs e)
00087         {
00088             bool allCorrect = true;
00089
00090             foreach (var item in NavView.MenuItems)
00091             {
00092                 if(item as NavigationViewItem == null)
00093                 {
00094                     continue;
00095                 }
00096                 var transform = GetContentBox(item as NavigationViewItem).TransformToVisual(null) as MatrixTransform;
00097                 if(Math.Abs(transform.Matrix.OffsetX - NavView.CompactPaneLength) - 1 > double.Epsilon)
00098                 {
00099                     allCorrect = false;
00100                 }
00101             }
00102
00103             var rootgrid = VisualTreeHelper.GetChild(NavView, 0);
00104             var paneToggleButtonGrid = VisualTreeHelper.GetChild(rootgrid, 0);
00105             var buttonHolderGrid = VisualTreeHelper.GetChild(paneToggleButtonGrid, 1);
00106             var backButton = VisualTreeHelper.GetChild(buttonHolderGrid, 0) as Button;
00107             var togglePaneButton = VisualTreeHelper.GetChild(buttonHolderGrid, 2) as Button;
00108             var CompactPaneMargin = 8;
00109
00110             if (Math.Abs(backButton.ActualWidth - NavView.CompactPaneLength) - CompactPaneMargin > double.Epsilon)
00111             {
00112                 allCorrect = false;
00113             }
00114
00115             if (Math.Abs(togglePaneButton.ActualWidth - NavView.CompactPaneLength) - CompactPaneMargin > double.Epsilon)
00116             {
00117                 allCorrect = false;
00118             }
00119
00120             MenuItemsCorrectOffset.IsChecked = allCorrect;
00121
00122         }
00123
00124         private void NavView_ItemInvoked(object sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs e)
00125         {
00126             if(e.InvokedItem as string == "Home")
00127             {
00128                 int invokeCount = int.Parse(HomeItemInvokedCount.Text);
00129                 invokeCount++;
00130                 HomeItemInvokedCount.Text = invokeCount.ToString();
00131             }
00132         }
00133
00134
00135         /* Helper functions */
00136         private UIElement GetContentBox(NavigationViewItem element)
00137         {
00138             if(element == null)
00139             {
00140                 return null;
00141             }
00142             // Path we are using here: NVIGrid->NavigationViewItemPresenter->LayoutRoot
00143             // ->PresenterContentRootGrid->ContentGrid->ContentPresenter
00144             var elementGrid = VisualTreeHelper.GetChild(element,0);
00145             var presenter = VisualTreeHelper.GetChild(elementGrid, 0);
00146             var layoutRoot = VisualTreeHelper.GetChild(presenter, 0);
00147             var presenterContentRootGrid = VisualTreeHelper.GetChild(layoutRoot, 0);
00148             var contentGrid = VisualTreeHelper.GetChild(presenterContentRootGrid, 1);
00149             var contentPresenter = VisualTreeHelper.GetChild(contentGrid, 1);
00150             return contentPresenter as UIElement;
00151
00152         }
00153     }
00154 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ParallaxViewPage Member List

This is the complete list of members for ParallaxViewPage, including all inherited members.
ParallaxViewPage() ParallaxViewPage [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealThemeItem Member List

This is the complete list of members for RevealThemeItem, including all inherited members.
Name | RevealThemeItem
Theme | RevealThemeItem
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

MenuBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MenuBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(MenuBar)
00012 }
00013
00014 #include "MenuBar.g.cpp"
00015
00016 GlobalDependencyProperty MenuBarProperties::s_ItemsProperty{ nullptr };
00017
00018 MenuBarProperties::MenuBarProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void MenuBarProperties::EnsureProperties()
00024 {
00025     if (!s_ItemsProperty)
00026     {
00027         s_ItemsProperty =
00028             InitializeDependencyProperty(
00029                 L"Items",
00030                 winrt::name_of<winrt::IVector<winrt::MenuBarItem>>(),
00031                 winrt::name_of<winrt::MenuBar>(),
00032                 false /* isAttached */,
00033                 ValueHelper<winrt::IVector<winrt::MenuBarItem>>::BoxedDefaultValue(),
00034                 nullptr);
00035     }
00036 }
00037
00038 void MenuBarProperties::ClearProperties()
00039 {
00040     s_ItemsProperty = nullptr;
00041 }
00042
00043 void MenuBarProperties::Items(winrt::IVector<winrt::MenuBarItem> const& value)
00044 {
00045     [[gsl::suppress(con)]]
00046     {
00047     static_cast<MenuBar*>(this)->SetValue(s_ItemsProperty, ValueHelper<winrt::IVector<winrt::MenuBarItem>>::BoxValueIfNecessary(value));
00048     }
00049 }
00050
00051 winrt::IVector<winrt::MenuBarItem> MenuBarProperties::Items()
00052 {
00053     return ValueHelper<winrt::IVector<winrt::MenuBarItem>>::CastOrUnbox(static_cast<MenuBar*>(this)->GetValue(s_ItemsProperty));
00054 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SliderInteractionProperties Member List

This is the complete list of members for SliderInteractionProperties, including all inherited members.
ClearProperties() | SliderInteractionProperties | [static]
EnsureProperties() | SliderInteractionProperties | [static]
m_propertyChangedEventSource | SliderInteractionProperties |
PropertyChanged(winrt::PropertyChangedEventHandler const &value) | SliderInteractionProperties |
PropertyChanged(winrt::event_token const &token) | SliderInteractionProperties |
SliderInteractionProperties() | SliderInteractionProperties |
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

enum_vector< E, T > Member List

This is the complete list of members for enum_vector< E, T >, including all inherited members.
operator[](E e) | enum_vector< E, T > | [inline]
operator[](E e) const | enum_vector< E, T > | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterScrollSnapPointsPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterScrollSnapPointsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Diagnostics;
00007 using System.Numerics;
00008 using Windows.UI;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Controls.Primitives;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Shapes;
00014 using Microsoft.UI.Xaml.Navigation;
00015 using Microsoft.UI.Private.Controls;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed partial class ScrollPresenterScrollSnapPointsPage : TestPage
00020     {
00021         private const int snapPointColumns = 29;
00022         private const int snapPointColumnWidth = 10;
00023         private const int snapPointColumnHeight = 10000;
00024         private int colorIndex = 0;
00025         private List<string> fullLogs = new List<string>();
00026
00027         public ScrollPresenterScrollSnapPointsPage()
00028         {
00029             this.InitializeComponent();
00030             Loaded += ScrollPresenterScrollSnapPointsPage_Loaded;
00031         }
00032
00033         protected override void OnNavigatedFrom(NavigationEventArgs e)
00034         {
00035             if (chkLogScrollPresenterMessages.IsChecked == true)
00036             {
00037                 MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00038                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00039             }
00040
00041             base.OnNavigatedFrom(e);
00042         }
00043
00044         private void ScrollPresenterScrollSnapPointsPage_Loaded(object sender, RoutedEventArgs e)
00045         {
00046             SolidColorBrush brush = new SolidColorBrush(Microsoft.UI.Colors.Red);
00047             for (int j = 0; j < snapPointColumns; j++)
00048             {
00049                 Grid innerGrid = new Grid();
00050                 innerGrid.Width = snapPointColumnWidth;
00051                 innerGrid.Height = snapPointColumnHeight;
00052                 this.stackPanel.Children.Add(innerGrid);
00053             }
00054             this.markupScrollPresenter.ViewChanged += MarkupScrollPresenter_ViewChanged;
00055             this.markupScrollPresenter.StateChanged += MarkupScrollPresenter_StateChanged;
00056         }
00057
00058         private void MarkupScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
00059         {
00060             this.txtScrollPresenterOffset.Text = this.markupScrollPresenter.VerticalOffset.ToString("F2");
00061             this.txtScrollPresenterZoomFactor.Text = this.markupScrollPresenter.ZoomFactor.ToString("F2");
00062         }
00063
00064         private void MarkupScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00065         {
00066             this.txtScrollPresenterState.Text = this.markupScrollPresenter.State.ToString();
00067         }
00068
00069         private void BtnMIAddSnapPoint_Click(object sender, RoutedEventArgs e)
00070         {
00071             try
00072             {
00073                 double value = Convert.ToDouble(txtMISnapPointValue.Text);
00074                 ScrollSnapPoint newSnapPoint = new ScrollSnapPoint(value, (ScrollSnapPointsAlignment)cmbMISnapPointAlignment.SelectedIndex);
00075                 Color fillColor = GetNewColor();
00076                 ScrollPresenterTestHooks.SetSnapPointVisualizationColor(newSnapPoint, fillColor);
00077                 markupScrollPresenter.VerticalSnapPoints.Add(newSnapPoint);
00078
00079                 FillSnapPoint(new List<double> { value }, value, value, fillColor);
00080                 FixConsolidatedView();
00081             }
00082             catch (Exception ex)
00083             {
00084                 this.fullLogs.Add(ex.ToString());
00085                 txtExceptionReport.Text = ex.ToString();
00086             }
00087         }
00088
00089 #if ApplicableRangeType
00090         private void BtnOIAddSnapPoint_Click(object sender, RoutedEventArgs e)
00091         {
00092             try
00093             {
00094                 double value = Convert.ToDouble(txtOISnapPointValue.Text);
00095                 double range = Convert.ToDouble(txtOIApplicableRange.Text);
00096                 ScrollSnapPoint newSnapPoint = new ScrollSnapPoint(value, range, ScrollSnapPointsAlignment.Near);
00097                 Color fillColor = GetNewColor();
00098                 ScrollPresenterTestHooks.SetSnapPointVisualizationColor(newSnapPoint, fillColor);
00099                 markupScrollPresenter.VerticalSnapPoints.Add(newSnapPoint);
00100
00101                 FillSnapPoint(new List<double> { value }, (value - range), (value + range), fillColor);
00102                 FixConsolidatedView();
00103             }
00104             catch (Exception ex)
00105             {
00106                 this.fullLogs.Add(ex.ToString());
00107                 txtExceptionReport.Text = ex.ToString();
00108             }
00109         }
00110 #endif
00111
00112         private void BtnMRAddSnapPoint_Click(object sender, RoutedEventArgs e)
00113         {
00114             try
00115             {
00116                 double offset = Convert.ToDouble(txtMRSnapPointOffset.Text);
00117                 double interval = Convert.ToDouble(txtMRSnapPointInterval.Text);
00118                 double start = Convert.ToDouble(txtMRSnapPointStart.Text);
00119                 double end = Convert.ToDouble(txtMRSnapPointEnd.Text);
00120                 RepeatedScrollSnapPoint newSnapPoint = new RepeatedScrollSnapPoint(offset, interval, start, end, (ScrollSnapPointsAlignment)cmbMRSnapPointAlignment.SelectedIndex);
00121                 Color fillColor = GetNewColor();
00122                 ScrollPresenterTestHooks.SetSnapPointVisualizationColor(newSnapPoint, fillColor);
00123                 markupScrollPresenter.VerticalSnapPoints.Add(newSnapPoint);
00124
00125                 double value = GetFirstRepeatedSnapPoint(offset, interval, start);
00126                 List<double> values = new List<double>();
00127
00128                 while (value <= end)
00129                 {
00130                     values.Add(value);
00131                     value += interval;
00132                 }
00133
00134                 FillSnapPoint(values, start, end, fillColor);
00135                 FixConsolidatedView();
00136             }
00137             catch (Exception ex)
00138             {
00139                 this.fullLogs.Add(ex.ToString());
00140                 txtExceptionReport.Text = ex.ToString();
00141             }
00142         }
00143
00144 #if ApplicableRangeType
00145         private void BtnORAddSnapPoint_Click(object sender, RoutedEventArgs e)
00146         {
00147             try
00148             {
00149                 double offset = Convert.ToDouble(txtORSnapPointOffset.Text);
00150                 double interval = Convert.ToDouble(txtORSnapPointInterval.Text);
00151                 double range = Convert.ToDouble(txtORApplicableRange.Text);
00152                 double start = Convert.ToDouble(txtORSnapPointStart.Text);
00153                 double end = Convert.ToDouble(txtORSnapPointEnd.Text);
00154
00155                 RepeatedScrollSnapPoint newSnapPoint = new RepeatedScrollSnapPoint(offset, interval, start, end, range, ScrollSnapPointsAlignment.Near);
00156                 Color fillColor = GetNewColor();
00157                 ScrollPresenterTestHooks.SetSnapPointVisualizationColor(newSnapPoint, fillColor);
00158                 markupScrollPresenter.VerticalSnapPoints.Add(newSnapPoint);
00159
00160                 double value = GetFirstRepeatedSnapPoint(offset, interval, start);
00161
00162                 int minColumn = FillSnapPoint(new List<double>(), start, end, fillColor);
00163                 while (value <= end)
00164                 {
00165                     FillSnapPoint(new List<double> { value }, Math.Max(start, value - range), Math.Min(end, value + range), fillColor, minColumn);
00166                     value += interval;
00167                 }
00168                 FixConsolidatedView();
00169             }
00170             catch (Exception ex)
00171             {
00172                 this.fullLogs.Add(ex.ToString());
00173                 txtExceptionReport.Text = ex.ToString();
00174             }
00175         }
00176 #endif
00177
00178         private void BtnRemoveFirst_Click(object sender, RoutedEventArgs e)
00179         {
00180             try
00181             {
00182                 markupScrollPresenter.VerticalSnapPoints.RemoveAt(0);
00183                 // TODO: Consider refreshing visualization of snap points
00184             }
00185             catch (Exception ex)
00186             {
00187                 txtExceptionReport.Text = ex.ToString();
00188             }
00189         }
00190
00191         private void BtnRemoveAll_Click(object sender, RoutedEventArgs e)
00192         {
00193             try
00194             {
00195                 markupScrollPresenter.VerticalSnapPoints.Clear();
00196                 // TODO: Consider clearing visualization of snap points
00197             }
00198             catch (Exception ex)
00199             {
00200                 txtExceptionReport.Text = ex.ToString();
00201             }
00202         }
00203
00204         private void BtnScrollPresenterOffsetChange_Click(object sender, RoutedEventArgs e)
00205         {
00206             try
00207             {
00208                 double changeAmount = Convert.ToDouble(txtScrollPresenterOffsetChange.Text);
00209                 markupScrollPresenter.AddScrollVelocity(new Vector2(0.0f, (float)((changeAmount * 3) + 30)), null);
00210             }
00211             catch (Exception ex)
00212             {
00213                 txtExceptionReport.Text = ex.ToString();
00214             }
00215         }
00216
00217         private void BtnOffsetPlus10With_Click(object sender, RoutedEventArgs e)
00218         {
00219             try
00220             {
00221                 markupScrollPresenter.ScrollBy(0.0, 10.0, new ScrollingScrollOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Default));
00222             }
00223             catch (Exception ex)
00224             {
00225                 txtExceptionReport.Text = ex.ToString();
00226             }
00227         }
00228
00229         private void BtnOffsetPlus10Without_Click(object sender, RoutedEventArgs e)
00230         {
00231             try
00232             {
00233                 markupScrollPresenter.ScrollBy(0.0, 10.0, new ScrollingScrollOptions(ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore));
00234             }
00235             catch (Exception ex)
00236             {
00237                 txtExceptionReport.Text = ex.ToString();
00238             }
00239         }
00240
00241         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
00242         {
00243             txtExceptionReport.Text = string.Empty;
00244         }
00245
00246         private int FillSnapPoint(List<double> values, double min, double max, int minColumn = 0)
00247         {
00248             return FillSnapPoint(values, min, max, GetNewColor(), minColumn);
00249         }
00250
00251         private int FillSnapPoint(List<double> values, double min, double max, Color fillColor, int minColumn = 0)
00252         {
00253             bool argsAreValid = true;
00254             foreach (int value in values)
00255             {
00256                 if (!(min <= value && value <= max))
00257                 {
00258                     argsAreValid = false;
00259                     break;
00260                 }
00261             }
00262             if (argsAreValid)
00263             {
00264                 for (int i = minColumn; i < snapPointColumns; i++)
00265                 {
00266                     Grid snapPointColumn = ((Grid)this.stackPanel.Children[i]);
00267                     bool isOccupied = false;
00268                     foreach (Rectangle child in snapPointColumn.Children)
00269                     {
00270                         double previousSnapPointMin = child.Margin.Top;
00271                         double previousSnapPointMax = child.Height + previousSnapPointMin;
00272                         if ((min >= previousSnapPointMin && min <= previousSnapPointMax) ||
00273                            (min < previousSnapPointMin && max >= previousSnapPointMin))
00274                         {
00275                             isOccupied = true;
00276                             break;
00277                         }
00278                     }
00279                     if (!isOccupied)
00280                     {
00281                         Rectangle rangeRectangle = new Rectangle();
00282                         rangeRectangle.Width = snapPointColumnWidth;
00283                         rangeRectangle.Height = max - min;
00284                         rangeRectangle.Margin = new Thickness(0, min, 0, 0);
00285                         rangeRectangle.Fill = new SolidColorBrush(fillColor);
00286                         rangeRectangle.VerticalAlignment = VerticalAlignment.Top;
00287                         snapPointColumn.Children.Add(rangeRectangle);
00288
00289                         foreach (int value in values)
00290                         {
00291                             Rectangle pointRectangle = new Rectangle();
00292                             pointRectangle.Width = snapPointColumnWidth;
00293                             pointRectangle.Height = 1;
00294                             pointRectangle.Margin = new Thickness(0, value, 0, 0);
00295                             pointRectangle.Fill = new SolidColorBrush(Microsoft.UI.Colors.Black);
00296                             pointRectangle.VerticalAlignment = VerticalAlignment.Top;
00297                             snapPointColumn.Children.Add(pointRectangle);
00298                         }
00299                         return i;
00300                     }
00301                 }
00302                 this.fullLogs.Add("Ran out of room to display additional snap points.");
00303             }
00304             else
00305             {
00306                 throw (new ArgumentException(string.Format("The following inequality must be true: min <= All Values <= max. {0} <= {1} <= {2}", min, values.ToString(), max)));
00307             }
00308             return -1;
00309         }
00310
00311         private void FixConsolidatedView()
00312         {
00313             consolidatedView.Children.Clear();
00314             foreach (ScrollSnapPointBase snapPoint in ScrollPresenterTestHooks.GetConsolidatedVerticalScrollSnapPoints(markupScrollPresenter))
00315             {
00316                 Vector2 zone = ScrollPresenterTestHooks.GetVerticalSnapPointActualApplicableZone(markupScrollPresenter, snapPoint);
00317                 zone.X = Math.Max(0, zone.X);
00318                 zone.Y = Math.Min(snapPointColumnHeight, zone.Y);
00319                 Rectangle rangeRectangle = new Rectangle();
00320                 rangeRectangle.Width = snapPointColumnWidth - 1;
00321                 rangeRectangle.Height = zone.Y - zone.X;
00322                 rangeRectangle.Margin = new Thickness(0, zone.X, 0, 0);
00323                 rangeRectangle.Fill = new SolidColorBrush(ScrollPresenterTestHooks.GetSnapPointVisualizationColor(snapPoint));
00324                 rangeRectangle.VerticalAlignment = VerticalAlignment.Top;
00325                 consolidatedView.Children.Add(rangeRectangle);
00326             }
00327         }
00328
00329         private double GetFirstRepeatedSnapPoint(double offset, double interval, double start)
00330         {
00331             Debug.Assert(offset >= start);
00332             Debug.Assert(interval > 0);
00333
00334             return offset - (int)((offset - start) / interval) * interval;
00335         }
00336
00337         private Color GetNewColor()
00338         {
00339             colorIndex++;
00340             switch (colorIndex)
00341             {
00342                 case 0:
00343                     return Microsoft.UI.Colors.YellowGreen;
00344                 case 1:
00345                     return Microsoft.UI.Colors.AliceBlue;
00346                 case 2:
00347                     return Microsoft.UI.Colors.AntiqueWhite;
00348                 case 3:
00349                     return Microsoft.UI.Colors.Aqua;
00350                 case 4:
00351                     return Microsoft.UI.Colors.Aquamarine;
00352                 case 5:
00353                     return Microsoft.UI.Colors.Azure;
00354                 case 6:
00355                     return Microsoft.UI.Colors.Beige;
00356                 case 7:
00357                     return Microsoft.UI.Colors.Bisque;
00358                 case 8:
00359                     return Microsoft.UI.Colors.BlanchedAlmond;
00360                 case 9:
00361                     return Microsoft.UI.Colors.Blue;
00362                 case 10:
00363                     return Microsoft.UI.Colors.BlueViolet;
00364                 case 11:
00365                     return Microsoft.UI.Colors.Brown;
00366                 case 12:
00367                     return Microsoft.UI.Colors.BurlyWood;
00368                 case 13:
00369                     return Microsoft.UI.Colors.CadetBlue;
00370                 case 14:
00371                     return Microsoft.UI.Colors.Chartreuse;
00372                 case 15:
00373                     return Microsoft.UI.Colors.Chocolate;
00374                 case 16:
00375                     return Microsoft.UI.Colors.Coral;
00376                 case 17:
00377                     return Microsoft.UI.Colors.CornflowerBlue;
00378                 case 18:
00379                     return Microsoft.UI.Colors.Cornsilk;
00380                 case 19:
00381                     return Microsoft.UI.Colors.Crimson;
00382                 case 20:
00383                     return Microsoft.UI.Colors.Cyan;
00384                 case 21:
00385                     return Microsoft.UI.Colors.DarkBlue;
00386                 case 22:
00387                     return Microsoft.UI.Colors.DarkCyan;
00388                 case 23:
00389                     return Microsoft.UI.Colors.DarkGoldenrod;
00390                 case 24:
00391                     return Microsoft.UI.Colors.DarkGray;
00392                 case 25:
00393                     return Microsoft.UI.Colors.DarkGreen;
00394                 case 26:
00395                     return Microsoft.UI.Colors.DarkKhaki;
00396                 case 27:
00397                     return Microsoft.UI.Colors.DarkMagenta;
00398                 case 28:
00399                     return Microsoft.UI.Colors.DarkOliveGreen;
00400                 case 29:
00401                     return Microsoft.UI.Colors.DarkOrange;
00402                 case 30:
00403                     return Microsoft.UI.Colors.DarkOrchid;
00404                 case 31:
00405                     return Microsoft.UI.Colors.DarkRed;
00406                 case 32:
00407                     return Microsoft.UI.Colors.DarkSalmon;
00408                 case 33:
00409                     return Microsoft.UI.Colors.DarkSeaGreen;
00410                 case 34:
00411                     return Microsoft.UI.Colors.DarkSlateBlue;
00412                 case 35:
00413                     return Microsoft.UI.Colors.DarkSlateGray;
00414                 case 36:
00415                     return Microsoft.UI.Colors.DarkTurquoise;
00416                 case 37:
00417                     return Microsoft.UI.Colors.DarkViolet;
00418                 case 38:
00419                     return Microsoft.UI.Colors.DeepPink;
00420                 case 39:
00421                     return Microsoft.UI.Colors.DeepSkyBlue;
00422                 case 40:
00423                     return Microsoft.UI.Colors.DimGray;
00424                 case 41:
00425                     return Microsoft.UI.Colors.DodgerBlue;
00426                 case 42:
00427                     return Microsoft.UI.Colors.Firebrick;
00428                 case 43:
00429                     return Microsoft.UI.Colors.FloralWhite;
00430                 case 44:
00431                     return Microsoft.UI.Colors.ForestGreen;
00432                 case 45:
00433                     return Microsoft.UI.Colors.Fuchsia;
00434                 case 46:
00435                     return Microsoft.UI.Colors.Gainsboro;
00436                 case 47:
00437                     return Microsoft.UI.Colors.GhostWhite;
00438                 case 48:
00439                     return Microsoft.UI.Colors.Gold;
00440                 case 49:
00441                     return Microsoft.UI.Colors.Goldenrod;
00442                 case 50:
00443                     return Microsoft.UI.Colors.Gray;
00444                 case 51:
00445                     return Microsoft.UI.Colors.Green;
00446                 case 52:
00447                     return Microsoft.UI.Colors.GreenYellow;
00448                 case 53:
00449                     return Microsoft.UI.Colors.Honeydew;
00450                 case 54:
00451                     return Microsoft.UI.Colors.HotPink;
00452                 case 55:
00453                     return Microsoft.UI.Colors.IndianRed;
00454                 case 56:
00455                     return Microsoft.UI.Colors.Indigo;
00456                 case 57:
00457                     return Microsoft.UI.Colors.Ivory;
00458                 case 58:
00459                     return Microsoft.UI.Colors.Khaki;
00460                 case 59:
00461                     return Microsoft.UI.Colors.Lavender;
00462                 case 60:
00463                     return Microsoft.UI.Colors.LavenderBlush;
00464                 case 61:
00465                     return Microsoft.UI.Colors.LawnGreen;
00466                 case 62:
00467                     return Microsoft.UI.Colors.LemonChiffon;
00468                 case 63:
00469                     return Microsoft.UI.Colors.LightBlue;
00470                 case 64:
00471                     return Microsoft.UI.Colors.LightCoral;
00472                 case 65:
00473                     return Microsoft.UI.Colors.LightCyan;
00474                 case 66:
00475                     return Microsoft.UI.Colors.LightGoldenrodYellow;
00476                 case 67:
00477                     return Microsoft.UI.Colors.LightGray;
00478                 case 68:
00479                     return Microsoft.UI.Colors.LightGreen;
00480                 case 69:
00481                     return Microsoft.UI.Colors.LightPink;
00482                 case 70:
00483                     return Microsoft.UI.Colors.LightSalmon;
00484                 case 71:
00485                     return Microsoft.UI.Colors.LightSeaGreen;
00486                 case 72:
00487                     return Microsoft.UI.Colors.LightSkyBlue;
00488                 case 73:
00489                     return Microsoft.UI.Colors.LightSlateGray;
00490                 case 74:
00491                     return Microsoft.UI.Colors.LightSteelBlue;
00492                 case 75:
00493                     return Microsoft.UI.Colors.LightYellow;
00494                 case 76:
00495                     return Microsoft.UI.Colors.Lime;
00496                 case 77:
00497                     return Microsoft.UI.Colors.LimeGreen;
00498                 case 78:
00499                     return Microsoft.UI.Colors.Linen;
00500                 case 79:
00501                     return Microsoft.UI.Colors.Magenta;
00502                 case 80:
00503                     return Microsoft.UI.Colors.Maroon;
00504                 case 81:
00505                     return Microsoft.UI.Colors.MediumAquamarine;
00506                 case 82:
00507                     return Microsoft.UI.Colors.MediumBlue;
00508                 case 83:
00509                     return Microsoft.UI.Colors.MediumOrchid;
00510                 case 84:
00511                     return Microsoft.UI.Colors.MediumPurple;
00512                 case 85:
00513                     return Microsoft.UI.Colors.MediumSeaGreen;
00514                 case 86:
00515                     return Microsoft.UI.Colors.MediumSlateBlue;
00516                 case 87:
00517                     return Microsoft.UI.Colors.MediumSpringGreen;
00518                 case 88:
00519                     return Microsoft.UI.Colors.MediumTurquoise;
00520                 case 89:
00521                     return Microsoft.UI.Colors.MediumVioletRed;
00522                 case 90:
00523                     return Microsoft.UI.Colors.MidnightBlue;
00524                 case 91:
00525                     return Microsoft.UI.Colors.MintCream;
00526                 case 92:
00527                     return Microsoft.UI.Colors.MistyRose;
00528                 case 93:
00529                     return Microsoft.UI.Colors.Moccasin;
00530                 case 94:
00531                     return Microsoft.UI.Colors.NavajoWhite;
00532                 case 95:
00533                     return Microsoft.UI.Colors.Navy;
00534                 case 96:
00535                     return Microsoft.UI.Colors.OldLace;
00536                 case 97:
00537                     return Microsoft.UI.Colors.Olive;
00538                 case 98:
00539                     return Microsoft.UI.Colors.OliveDrab;
00540                 case 99:
00541                     return Microsoft.UI.Colors.Orange;
00542                 case 100:
00543                     return Microsoft.UI.Colors.OrangeRed;
00544                 case 101:
00545                     return Microsoft.UI.Colors.Orchid;
00546                 case 102:
00547                     return Microsoft.UI.Colors.PaleGoldenrod;
00548                 case 103:
00549                     return Microsoft.UI.Colors.PaleGreen;
00550                 case 104:
00551                     return Microsoft.UI.Colors.PaleTurquoise;
00552                 case 105:
00553                     return Microsoft.UI.Colors.PaleVioletRed;
00554                 case 106:
00555                     return Microsoft.UI.Colors.PapayaWhip;
00556                 case 107:
00557                     return Microsoft.UI.Colors.PeachPuff;
00558                 case 108:
00559                     return Microsoft.UI.Colors.Peru;
00560                 case 109:
00561                     return Microsoft.UI.Colors.Pink;
00562                 case 110:
00563                     return Microsoft.UI.Colors.Plum;
00564                 case 111:
00565                     return Microsoft.UI.Colors.PowderBlue;
00566                 case 112:
00567                     return Microsoft.UI.Colors.Purple;
00568                 case 113:
00569                     return Microsoft.UI.Colors.Red;
00570                 case 114:
00571                     return Microsoft.UI.Colors.RosyBrown;
00572                 case 115:
00573                     return Microsoft.UI.Colors.RoyalBlue;
00574                 case 116:
00575                     return Microsoft.UI.Colors.SaddleBrown;
00576                 case 117:
00577                     return Microsoft.UI.Colors.Salmon;
00578                 case 118:
00579                     return Microsoft.UI.Colors.SandyBrown;
00580                 case 119:
00581                     return Microsoft.UI.Colors.SeaGreen;
00582                 case 120:
00583                     return Microsoft.UI.Colors.SeaShell;
00584                 case 121:
00585                     return Microsoft.UI.Colors.Sienna;
00586                 case 122:
00587                     return Microsoft.UI.Colors.Silver;
00588                 case 123:
00589                     return Microsoft.UI.Colors.SkyBlue;
00590                 case 124:
00591                     return Microsoft.UI.Colors.SlateBlue;
00592                 case 125:
00593                     return Microsoft.UI.Colors.SlateGray;
00594                 case 126:
00595                     return Microsoft.UI.Colors.Snow;
00596                 case 127:
00597                     return Microsoft.UI.Colors.SpringGreen;
00598                 case 128:
00599                     return Microsoft.UI.Colors.Tan;
00600                 case 129:
00601                     return Microsoft.UI.Colors.Teal;
00602                 case 130:
00603                     return Microsoft.UI.Colors.Thistle;
00604                 case 131:
00605                     return Microsoft.UI.Colors.Tomato;
00606                 case 132:
00607                     return Microsoft.UI.Colors.Turquoise;
00608                 case 133:
00609                     return Microsoft.UI.Colors.Violet;
00610                 case 134:
00611                     return Microsoft.UI.Colors.Wheat;
00612                 case 135:
00613                     return Microsoft.UI.Colors.WhiteSmoke;
00614                 case 136:
00615                     return Microsoft.UI.Colors.Yellow;
00616                 case 137:
00617                     return Microsoft.UI.Colors.YellowGreen;
00618                 default:
00619                     return Microsoft.UI.Colors.Black;
00620             }
00621         }
00622
00623         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00624         {
00625             //Turn on info and verbose logging for the ScrollPresenter type:
00626             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00627
00628             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00629         }
00630
00631         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00632         {
00633             //Turn off info and verbose logging for the ScrollPresenter type:
00634             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00635
00636             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00637         }
00638
00639         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00640         {
00641             // Cut off the terminating new line.
00642             string msg = args.Message.Substring(0, args.Message.Length - 1);
00643             string senderName = string.Empty;
00644             FrameworkElement fe = sender as FrameworkElement;
00645
00646             if (fe != null)
00647             {
00648                 senderName = "s:" + fe.Name + ", ";
00649             }
00650
00651             if (args.IsVerboseLevel)
00652             {
00653                 this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
00654             }
00655             else
00656             {
00657                 this.fullLogs.Add("Info: " + senderName + "m:" + msg);
00658             }
00659         }
00660
00661         private void btnGetFullLog_Click(object sender, RoutedEventArgs e)
00662         {
00663             foreach (string log in this.fullLogs)
00664             {
00665                 this.cmbFullLog.Items.Add(log);
00666             }
00667         }
00668
00669         private void btnClearFullLog_Click(object sender, RoutedEventArgs e)
00670         {
00671             this.fullLogs.Clear();
00672             this.cmbFullLog.Items.Clear();
00673         }
00674     }
00675 }
00676
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VariableSizeItem Member List

This is the complete list of members for VariableSizeItem, including all inherited members.
Size | VariableSizeItem |
Text | VariableSizeItem |
VariableSizeItem(int sizeSeed) | VariableSizeItem | [inline]
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooks.h Source File

  • File List
  • File Members
  • ScrollView

ScrollViewTestHooks.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollView.h"
00007 #include "ScrollViewTestHooks.g.h"
00008
00009 class ScrollViewTestHooks :
00010     public winrt::implementation::ScrollViewTestHooksT<ScrollViewTestHooks>
00011 {
00012 public:
00013     static com_ptr<ScrollViewTestHooks> GetGlobalTestHooks()
00014     {
00015         return s_testHooks;
00016     }
00017
00018     static com_ptr<ScrollViewTestHooks> EnsureGlobalTestHooks();
00019
00020     static winrt::IReference<bool> GetAutoHideScrollControllers(const winrt::ScrollView& scrollView);
00021     static void SetAutoHideScrollControllers(const winrt::ScrollView& scrollView, winrt::IReference<bool> value);
00022
00023 private:
00024     static com_ptr<ScrollViewTestHooks> s_testHooks;
00025
00026     std::map<winrt::IScrollView, winrt::IReference<bool>> m_autoHideScrollControllersMap;
00027 };
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBar.properties.h Source File

  • File List
  • File Members
  • Generated

CommandBarFlyoutCommandBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class CommandBarFlyoutCommandBarProperties
00008 {
00009 public:
00010     CommandBarFlyoutCommandBarProperties();
00011
00012     void FlyoutTemplateSettings(winrt::CommandBarFlyoutCommandBarTemplateSettings const& value);
00013     winrt::CommandBarFlyoutCommandBarTemplateSettings FlyoutTemplateSettings();
00014
00015     void SystemBackdrop(winrt::SystemBackdrop const& value);
00016     winrt::SystemBackdrop SystemBackdrop();
00017
00018     static winrt::DependencyProperty FlyoutTemplateSettingsProperty() { return s_FlyoutTemplateSettingsProperty; }
00019     static winrt::DependencyProperty SystemBackdropProperty() { return s_SystemBackdropProperty; }
00020
00021     static GlobalDependencyProperty s_FlyoutTemplateSettingsProperty;
00022     static GlobalDependencyProperty s_SystemBackdropProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026
00027     static void OnSystemBackdropPropertyChanged(
00028         winrt::DependencyObject const& sender,
00029         winrt::DependencyPropertyChangedEventArgs const& args);
00030 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/APITests/CommonStylesTests.cs Source File

  • File List
  • File Members
  • CommonStyles
  • APITests

CommonStylesTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using System.Linq;
00007 using System.Threading;
00008 using Windows.Foundation.Metadata;
00009 using Windows.System;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Controls.Primitives;
00013 using Microsoft.UI.Xaml.Input;
00014 using Microsoft.UI.Xaml.Media;
00015 using MUXControls.TestAppUtils;
00016 using PlatformConfiguration = Common.PlatformConfiguration;
00017 using OSVersion = Common.OSVersion;
00018 using System.Collections.Generic;
00019 using XamlControlsResources = Microsoft.UI.Xaml.Controls.XamlControlsResources;
00020 using Microsoft.UI.Xaml.Markup;
00021 using System;
00022 using System.Text;
00023
00024 using WEX.TestExecution;
00025 using WEX.TestExecution.Markup;
00026 using WEX.Logging.Interop;
00027
00028 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00029 {
00030     [TestClass]
00031     public class CommonStylesApiTests : ApiTestBase
00032     {
00033         [TestMethod]
00034         public void VerifyAllThemesContainSameResourceKeys()
00035         {
00036             bool dictionariesContainSameElements = true;
00037             RunOnUIThread.Execute(() =>
00038             {
00039                 var resourceDictionaries = new XamlControlsResources();
00040                 Log.Comment("ThemeDictionaries");
00041
00042                 var defaultThemeDictionary = resourceDictionaries.ThemeDictionaries["Default"] as ResourceDictionary;
00043
00044                 foreach (var dictionaryName in resourceDictionaries.ThemeDictionaries.Keys)
00045                 {
00046                     // Skip the Default theme dictionary
00047                     if (dictionaryName.ToString() == "Default")
00048                     {
00049                         continue;
00050                     }
00051
00052                     Log.Comment("Comparing against " + dictionaryName.ToString());
00053                     var themeDictionary = resourceDictionaries.ThemeDictionaries[dictionaryName] as ResourceDictionary;
00054
00055                     Log.Comment("Keys count in Default: " + defaultThemeDictionary.Keys.Count);
00056                     Log.Comment("Keys count in " + dictionaryName + ": " + themeDictionary.Keys.Count);
00057
00058                     bool allKeysInDefaultExistInDictionary = AreKeysFromExpectedInActualDictionary(defaultThemeDictionary, "Default", themeDictionary, dictionaryName.ToString());
00059                     bool allKeysInDictionaryExistInDefault = AreKeysFromExpectedInActualDictionary(themeDictionary, dictionaryName.ToString(), defaultThemeDictionary, "Default");
00060
00061                     dictionariesContainSameElements &= (allKeysInDefaultExistInDictionary && allKeysInDictionaryExistInDefault);
00062                 }
00063
00064                 Verify.AreEqual(0, resourceDictionaries.MergedDictionaries.Count, "MergedDictionaries is not empty, Verify if you really wanted to update the merged dictionary. If so, update the test");
00065             });
00066
00067             Verify.IsTrue(dictionariesContainSameElements, "Resource Keys you have added are missing in one of the theme dictionaries. This is trouble since we might end up crashing when trying to resolve the key in that Theme.");
00068             if(!dictionariesContainSameElements)
00069             {
00070                 Log.Error("Resource Keys you have added are missing in one of the theme dictionaries. This is trouble since we might end up crashing when trying to resolve the key in that Theme.");
00071             }
00072         }
00073
00074         [TestMethod]
00075         public void VerifyNoResourceKeysWereRemovedFromPreviousStableReleaseInV2Styles()
00076         {
00077             RunOnUIThread.Execute(() =>
00078             {
00079                 EnsureNoMissingThemeResources(
00080                 BaselineResources.BaselineResourcesList2dot5Stable,
00081                 new XamlControlsResources());
00082             });
00083         }
00084
00085         private bool AreKeysFromExpectedInActualDictionary(ResourceDictionary expectedDictionary, string expectedDictionaryName, ResourceDictionary actualDictionary, string actualDictionaryName)
00086         {
00087             List<string> missingKeysInActualDictionary = new List<string>();
00088             foreach (var entry in expectedDictionary)
00089             {
00090                 if (!actualDictionary.ContainsKey(entry.Key))
00091                 {
00092                     missingKeysInActualDictionary.Add(entry.Key.ToString());
00093                 }
00094             }
00095
00096             if (missingKeysInActualDictionary.Count > 0)
00097             {
00098                 Log.Comment("Keys found in " + expectedDictionaryName + " but not in " + actualDictionaryName);
00099                 foreach (var missingKey in missingKeysInActualDictionary)
00100                 {
00101                     Log.Error("* " + missingKey);
00102                 }
00103             }
00104
00105             return (missingKeysInActualDictionary.Count == 0);
00106         }
00107
00108         private void EnsureNoMissingThemeResources(IList<string> baseline, XamlControlsResources dictionaryToVerify)
00109         {
00110             var actualResourcesKeys = new HashSet<string>();
00111             var resourceDictionaries = dictionaryToVerify;
00112
00113             foreach (var dictionaryName in resourceDictionaries.ThemeDictionaries.Keys)
00114             {
00115                 var themeDictionary = resourceDictionaries.ThemeDictionaries[dictionaryName] as ResourceDictionary;
00116
00117                 foreach (var entry in themeDictionary)
00118                 {
00119                     string entryKey = entry.Key as string;
00120                     if (!actualResourcesKeys.Contains(entryKey))
00121                     {
00122                         actualResourcesKeys.Add(entryKey);
00123                     }
00124                 }
00125             }
00126
00127             foreach (var entry in resourceDictionaries)
00128             {
00129                 string entryKey = entry.Key as string;
00130                 if (!actualResourcesKeys.Contains(entryKey))
00131                 {
00132                     actualResourcesKeys.Add(entryKey);
00133                 }
00134             }
00135
00136             StringBuilder missingKeysList = new StringBuilder();
00137
00138             bool allBaselineResourceKeysExist = true;
00139             foreach (var baselineResourceKey in baseline)
00140             {
00141                 if (!actualResourcesKeys.Contains(baselineResourceKey))
00142                 {
00143                     missingKeysList.Append(baselineResourceKey + ", ");
00144                     allBaselineResourceKeysExist = false;
00145                 }
00146             }
00147
00148             Verify.IsTrue(allBaselineResourceKeysExist, "List of missing resource keys: " + missingKeysList.ToString());
00149             if(!allBaselineResourceKeysExist)
00150             {
00151                 Log.Error("List of missing resource keys: " + missingKeysList.ToString());
00152             }
00153         }
00154
00155         public void DumpThemeResources()
00156         {
00157             RunOnUIThread.Execute(() =>
00158             {
00159                 var resourceDictionary = new XamlControlsResources();
00160
00161                 Log.Comment("ThemeDictionaries");
00162                 foreach (var key in resourceDictionary.ThemeDictionaries.Keys)
00163                 {
00164                     Log.Comment("* " + key.ToString());
00165
00166                     var themeDictionary = resourceDictionary.ThemeDictionaries[key] as ResourceDictionary;
00167                     foreach (var entry in themeDictionary)
00168                     {
00169                         Log.Comment("\t*" + entry.ToString());
00170                     }
00171                 }
00172
00173                 Log.Comment("Entries in Resource Dictionary");
00174                 foreach (var entry in resourceDictionary)
00175                 {
00176                     Log.Comment("* " + entry.ToString());
00177                 }
00178             });
00179         }
00180
00181 #if MUX_PRERELEASE
00182         // Compact resources have been removed from the final release
00183         [TestMethod]
00184         public void VerifyUseCompactResourcesAPI()
00185         {
00186             //Verify there is no crash and TreeViewItemMinHeight is not the same when changing UseCompactResources.
00187             RunOnUIThread.Execute(() =>
00188             {
00189                 var dict = new XamlControlsResources();
00190                 var height = dict["TreeViewItemMinHeight"].ToString();
00191
00192                 dict.UseCompactResources = true;
00193                 var compactHeight = dict["TreeViewItemMinHeight"].ToString();
00194                 Verify.AreNotEqual(height, compactHeight, "Height in Compact is not the same as default");
00195                 Verify.AreEqual("24", compactHeight, "Height in 24 in Compact");
00196
00197                 dict.UseCompactResources = false;
00198                 var height2 = dict["TreeViewItemMinHeight"].ToString();
00199                 Verify.AreEqual(height, height2, "Height are the same after disabled compact");
00200             });
00201
00202             MUXControlsTestApp.Utilities.IdleSynchronizer.Wait();
00203         }
00204 #endif
00205
00206         [TestMethod]
00207         public void CornerRadiusFilterConverterTest()
00208         {
00209             if (!PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone4))
00210             {
00211                 Log.Comment("Corner radius is only available on RS5+");
00212                 return;
00213             }
00214
00215             RunOnUIThread.Execute(() =>
00216             {
00217                 var root = (StackPanel)XamlReader.Load(
00218                     @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00219                              xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00220                              xmlns:primitives='using:Microsoft.UI.Xaml.Controls.Primitives'>
00221                             <StackPanel.Resources>
00222                                 <primitives:CornerRadiusFilterConverter x:Key='TopCornerRadiusFilterConverter' Filter='Top' Scale='2'/>
00223                                 <primitives:CornerRadiusFilterConverter x:Key='RightCornerRadiusFilterConverter' Filter='Right'/>
00224                                 <primitives:CornerRadiusFilterConverter x:Key='BottomCornerRadiusFilterConverter' Filter='Bottom'/>
00225                                 <primitives:CornerRadiusFilterConverter x:Key='LeftCornerRadiusFilterConverter' Filter='Left'/>
00226                                 <CornerRadius x:Key='testCornerRadius'>6,6,6,6</CornerRadius>
00227                             </StackPanel.Resources>
00228                             <Grid x:Name='TopRadiusGrid'
00229                                 CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}'>
00230                             </Grid>
00231                             <Grid x:Name='RightRadiusGrid'
00232                                 CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}'>
00233                             </Grid>
00234                             <Grid x:Name='BottomRadiusGrid'
00235                                 CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource BottomCornerRadiusFilterConverter}}'>
00236                             </Grid>
00237                             <Grid x:Name='LeftRadiusGrid'
00238                                 CornerRadius='{Binding Source={StaticResource testCornerRadius}, Converter={StaticResource LeftCornerRadiusFilterConverter}}'>
00239                             </Grid>
00240                        </StackPanel>");
00241
00242                 var topRadiusGrid = (Grid)root.FindName("TopRadiusGrid");
00243                 var rightRadiusGrid = (Grid)root.FindName("RightRadiusGrid");
00244                 var bottomRadiusGrid = (Grid)root.FindName("BottomRadiusGrid");
00245                 var leftRadiusGrid = (Grid)root.FindName("LeftRadiusGrid");
00246
00247                 Verify.AreEqual(new CornerRadius(12, 12, 0, 0), topRadiusGrid.CornerRadius);
00248                 Verify.AreEqual(new CornerRadius(0, 6, 6, 0), rightRadiusGrid.CornerRadius);
00249                 Verify.AreEqual(new CornerRadius(0, 0, 6, 6), bottomRadiusGrid.CornerRadius);
00250                 Verify.AreEqual(new CornerRadius(6, 0, 0, 6), leftRadiusGrid.CornerRadius);
00251             });
00252         }
00253
00254         // https://github.com/microsoft/microsoft-ui-xaml/issues/4320
00255         // Task 30789390: Re-enable AppBarToggleButton disabled test
00256         [TestMethod]
00257         public void VerifyVisualTreeForControlsInCommonStyles()
00258         {
00259             var controlsToVerify = new List<string> {
00260                 "AppBarButton", /*"AppBarToggleButton",*/ "Button", "CheckBox",
00261                 "CommandBar", "ContentDialog", "DatePicker", "FlipView", "ListViewItem",
00262                 "PasswordBox", "Pivot", "PivotItem", "RichEditBox", "Slider", "SplitView",
00263                 "TextBox", "TimePicker", "ToolTip", "ToggleButton", "ToggleSwitch"};
00264
00265             bool failed = false;
00266
00267             foreach (var control in controlsToVerify)
00268             {
00269                 try
00270                 {
00271                     Log.Comment($"Verify visual tree for {control}");
00272                     VisualTreeTestHelper.VerifyVisualTree(xaml: XamlStringForControl(control), verificationFileNamePrefix: control);
00273                 }
00274                 catch (Exception e)
00275                 {
00276                     failed = true;
00277                     Log.Error(e.Message);
00278                 }
00279             }
00280
00281             if (failed)
00282             {
00283                 Verify.Fail("One or more visual tree verification failed, see details above");
00284             }
00285         }
00286
00287         [TestMethod]
00288         public void VerifyVisualTreeForCommandBarCornerRadius()
00289         {
00290             var xaml =
00291                 @"<StackPanel Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00292                     xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00293                         <CommandBar Background='Green' CornerRadius='10,10,10,10' IsOpen='True'>
00294                         <AppBarToggleButton Icon='Shuffle' Label='Shuffle'  />
00295                         <AppBarToggleButton Icon='RepeatAll' Label='Repeat' />
00296                         <AppBarSeparator Margin='20,10,20,0' Foreground='Yellow'/>
00297
00298                         <CommandBar.Content>
00299                             <TextBlock Text='Now playing...' Margin='12,14'/>
00300                         </CommandBar.Content>
00301                         </CommandBar>
00302                         <CommandBar Background='Green' CornerRadius='5,10,5,10' IsOpen='False'>
00303                         <AppBarToggleButton Icon='Shuffle' Label='Shuffle'  />
00304                         <AppBarToggleButton Icon='RepeatAll' Label='Repeat' />
00305                         <AppBarSeparator Margin='20,10,20,0' Padding='16,12,15,12' Foreground='Yellow'/>
00306                         <CommandBar.Content>
00307                             <TextBlock Text='Now playing...' Margin='12,14'/>
00308                         </CommandBar.Content>
00309                         </CommandBar>
00310                     </StackPanel>";
00311
00312             VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
00313                 verificationFileNamePrefix: "VerifyVisualTreeForCommandBarCornerRadius");
00314         }
00315
00316         [TestMethod]
00317         public void VerifyVisualTreeForCommandBarOverflowMenu()
00318         {
00319             StackPanel root = null;
00320             CommandBar commandBar = null;
00321             UIElement overflowContent = null;
00322
00323             RunOnUIThread.Execute(() =>
00324             {
00325                 root = (StackPanel)XamlReader.Load(
00326                     @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00327                         xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00328                             <CommandBar x:Name='TestCommandBar'>
00329                                 <AppBarButton Icon='AddFriend'/>
00330                                 <AppBarButton Icon='World' Label='World'/>
00331                                 <AppBarToggleButton Icon='Volume' Label='Volume'/>
00332                                 <CommandBar.SecondaryCommands>
00333                                     <AppBarButton Label='Like'/>
00334                                     <AppBarButton Label='Dislike'/>
00335                                     <AppBarToggleButton Label='Toggle'/>
00336                                 </CommandBar.SecondaryCommands>
00337                                 <CommandBar.Content>
00338                                     <TextBlock Text='Hello World' Margin='12'/>
00339                                 </CommandBar.Content>
00340                             </CommandBar>
00341                       </StackPanel>");
00342
00343                 commandBar = (CommandBar)root.FindName("TestCommandBar");
00344                 Verify.IsNotNull(commandBar);
00345                 Content = root;
00346                 Content.UpdateLayout();
00347                 commandBar.IsOpen = true;
00348                 Content.UpdateLayout();
00349                 var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(Content.XamlRoot).Last();
00350                 Verify.IsNotNull(popup);
00351                 overflowContent = popup.Child;
00352             });
00353
00354             var visualTreeDumperFilter = new VisualTreeDumper.DefaultFilter();
00355             visualTreeDumperFilter.PropertyNameAllowedList.Remove("MaxWidth");
00356             visualTreeDumperFilter.PropertyNameAllowedList.Remove("MaxHeight");
00357             VisualTreeTestHelper.VerifyVisualTree(root: overflowContent, verificationFileNamePrefix: "CommandBarOverflowMenu", filter: visualTreeDumperFilter);
00358         }
00359
00360         [TestMethod]
00361         public void VerifyAppBarButtonLightweightStyling()
00362         {
00363             StackPanel root = null;
00364             AppBarButton appBarButton = null;
00365             ManualResetEvent appBarButtonLoadedEvent = new ManualResetEvent(false);
00366
00367             RunOnUIThread.Execute(() =>
00368             {
00369                 root = (StackPanel)XamlReader.Load(
00370                     @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00371                         xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00372                             <StackPanel.Resources>
00373                                 <Visibility x:Key='AppBarButtonHasFlyoutChevronVisibility'>Collapsed</Visibility>
00374                                 <SolidColorBrush x:Key='AppBarButtonSubItemChevronForeground' Color='Red' />
00375                                 <x:String x:Key='AppBarButtonFlyoutGlyph'>&#xE972;</x:String>
00376                                 <x:Double x:Key='AppBarButtonSubItemChevronFontSize'>12</x:Double>
00377                                 <Thickness x:Key='AppBarButtonSubItemChevronMargin'>-24,20,12,0</Thickness>
00378                                 <x:String x:Key='AppBarButtonOverflowFlyoutGlyph'>&#xE973;</x:String>
00379                                 <x:Double x:Key='AppBarButtonSecondarySubItemChevronFontSize'>14</x:Double>
00380                                 <Thickness x:Key='AppBarButtonSecondarySubItemChevronMargin'>-25,20,12,0</Thickness>
00381                             </StackPanel.Resources>
00382                             <AppBarButton x:Name='TestAppBarButton'/>
00383                       </StackPanel>");
00384
00385                 appBarButton = (AppBarButton)root.FindName("TestAppBarButton");
00386                 appBarButton.Loaded += (sender, args) => { appBarButtonLoadedEvent.Set(); };
00387                 Content = root;
00388                 Content.UpdateLayout();
00389             });
00390
00391             appBarButtonLoadedEvent.WaitOne();
00392             IdleSynchronizer.Wait();
00393
00394             RunOnUIThread.Execute(() =>
00395             {
00396                 Panel subItemChevronPanel = (Panel)GetVisualChildByName(appBarButton, "SubItemChevronPanel");
00397                 FontIcon subItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "SubItemChevron");
00398                 FontIcon overflowSubItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "OverflowSubItemChevron");
00399
00400                 Verify.AreEqual((Visibility)root.Resources["AppBarButtonHasFlyoutChevronVisibility"], subItemChevronPanel.Visibility);
00401
00402                 Verify.AreEqual((string)root.Resources["AppBarButtonFlyoutGlyph"], subItemChevron.Glyph);
00403                 Verify.AreEqual((double)root.Resources["AppBarButtonSubItemChevronFontSize"], subItemChevron.FontSize);
00404                 Verify.AreEqual(((SolidColorBrush)root.Resources["AppBarButtonSubItemChevronForeground"]).Color, ((SolidColorBrush)subItemChevron.Foreground).Color);
00405                 Verify.AreEqual((Thickness)root.Resources["AppBarButtonSubItemChevronMargin"], subItemChevron.Margin);
00406
00407                 Verify.AreEqual((string)root.Resources["AppBarButtonOverflowFlyoutGlyph"], overflowSubItemChevron.Glyph);
00408                 Verify.AreEqual((double)root.Resources["AppBarButtonSecondarySubItemChevronFontSize"], overflowSubItemChevron.FontSize);
00409                 Verify.AreEqual(((SolidColorBrush)root.Resources["AppBarButtonSubItemChevronForeground"]).Color, ((SolidColorBrush)overflowSubItemChevron.Foreground).Color);
00410                 Verify.AreEqual((Thickness)root.Resources["AppBarButtonSecondarySubItemChevronMargin"], overflowSubItemChevron.Margin);
00411             });
00412         }
00413
00414         [TestMethod]
00415         public void VerifyAppBarButtonChevronMarginsDoNotCollide()
00416         {
00417             StackPanel root = null;
00418             ManualResetEvent rootLoadedEvent = new ManualResetEvent(false);
00419             CommandBar commandBar = null;
00420             ManualResetEvent commandBarSizeChangedEvent = new ManualResetEvent(false);
00421             AppBarButton appBarButton = null;
00422
00423             RunOnUIThread.Execute(() =>
00424             {
00425                 root = (StackPanel)XamlReader.Load(
00426                     @"<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00427                         xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00428                             <StackPanel.Resources>
00429                                 <Visibility x:Key='AppBarButtonHasFlyoutChevronVisibility'>Visible</Visibility>
00430                                 <x:String x:Key='AppBarButtonFlyoutGlyph'>&#xE972;</x:String>
00431                                 <Thickness x:Key='AppBarButtonSubItemChevronMargin'>-22,20,12,0</Thickness>
00432                                 <Thickness x:Key='AppBarButtonSubItemChevronLabelOnRightMargin'>-6,20,12,0</Thickness>
00433                                 <MenuFlyout x:Key='MenuFlyout' Placement='Bottom'>
00434                                     <MenuFlyoutItem Text='Item 1'/>
00435                                     <MenuFlyoutItem Text='Item 2'/>
00436                                     <MenuFlyoutItem Text='Item 3'/>
00437                                 </MenuFlyout>
00438                             </StackPanel.Resources>
00439                             <CommandBar x:Name='CommandBar' DefaultLabelPosition='Right'>
00440                                 <AppBarButton Label='Add' Icon='Add' Flyout='{StaticResource MenuFlyout}'/>
00441                                 <AppBarSeparator />
00442                                 <AppBarButton x:Name='LastAppBarButton' Label='Add' Icon='Add' Flyout='{StaticResource MenuFlyout}'/>
00443                                 <AppBarSeparator />
00444                                 <CommandBar.SecondaryCommands>
00445                                     <AppBarButton Icon='Add' Label='Add' />
00446                                 </CommandBar.SecondaryCommands>
00447                             </CommandBar>
00448                       </StackPanel>");
00449
00450                 root.Loaded += (sender, args) => { rootLoadedEvent.Set(); };
00451                 commandBar = (CommandBar)root.FindName("CommandBar");
00452                 commandBar.SizeChanged += (sender, args) => { commandBarSizeChangedEvent.Set(); };
00453                 appBarButton = (AppBarButton)root.FindName("LastAppBarButton");
00454
00455                 Content = root;
00456                 Content.UpdateLayout();
00457             });
00458
00459             rootLoadedEvent.WaitOne();
00460             IdleSynchronizer.Wait();
00461
00462             FontIcon subItemChevron = null;
00463
00464             RunOnUIThread.Execute(() =>
00465             {
00466                 subItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "SubItemChevron");
00467
00468                 Verify.AreEqual((Thickness)root.Resources["AppBarButtonSubItemChevronLabelOnRightMargin"], subItemChevron.Margin);
00469
00470                 commandBarSizeChangedEvent.Reset();
00471                 commandBar.Width = 0;
00472             });
00473
00474             commandBarSizeChangedEvent.WaitOne();
00475             IdleSynchronizer.Wait();
00476
00477             RunOnUIThread.Execute(() =>
00478             {
00479                 commandBarSizeChangedEvent.Reset();
00480                 commandBar.Width = double.NaN;
00481             });
00482
00483             commandBarSizeChangedEvent.WaitOne();
00484             IdleSynchronizer.Wait();
00485
00486             RunOnUIThread.Execute(() =>
00487             {
00488                 Verify.AreEqual((Thickness)root.Resources["AppBarButtonSubItemChevronLabelOnRightMargin"], subItemChevron.Margin);
00489             });
00490         }
00491
00492         private string XamlStringForControl(string controlName)
00493         {
00494             return $@"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00495                           <{controlName} />
00496                    </Grid>";
00497         }
00498
00499         private FrameworkElement GetVisualChildByName(DependencyObject root, string name)
00500         {
00501             if (root is FrameworkElement element && element.Name == name)
00502             {
00503                 return element;
00504             }
00505
00506             int childCount = VisualTreeHelper.GetChildrenCount(root);
00507
00508             for (int i = 0; i < childCount; i++)
00509             {
00510                 FrameworkElement visualChild = GetVisualChildByName(VisualTreeHelper.GetChild(root, i), name);
00511
00512                 if (visualChild != null)
00513                 {
00514                     return visualChild;
00515                 }
00516             }
00517
00518             return null;
00519         }
00520     }
00521
00522     class ControlVisualTreeTestFilter : VisualTreeDumper.DefaultFilter
00523     {
00524         public override bool ShouldVisitProperty(string propertyName)
00525         {
00526             return base.ShouldVisitProperty(propertyName) && !propertyName.Contains("RenderSize");
00527         }
00528     }
00529
00530     [TestClass]
00531     public class CommonStylesVisualTreeTestSamples
00532     {
00533         [TestMethod]
00534         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")] // The default theme is different on OneCore, leading to a test failure.
00535         public void VerifyVisualTreeForAppBarAndAppBarToggleButton()
00536         {
00537             var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00538                             <StackPanel>
00539                                 <AppBarButton Icon='Accept' Label='Accept'/>
00540                                 <AppBarToggleButton Icon='Dislike' Label='Dislike'/>
00541                             </StackPanel>
00542                        </Grid>";
00543             VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
00544                 verificationFileNamePrefix: "VerifyVisualTreeForAppBarAndAppBarToggleButton");
00545         }
00546
00547         [TestMethod]
00548         public void VerifyVisualTreeExampleLoadAndVerifyForAllThemes()
00549         {
00550             var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00551                        </Grid>";
00552             VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
00553                 verificationFileNamePrefix: "VerifyVisualTreeExampleLoadAndVerifyForAllThemes",
00554                 theme: Theme.All);
00555         }
00556
00557         [TestMethod]
00558         public void VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName()
00559         {
00560             var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00561                        </Grid>";
00562             UIElement root = VisualTreeTestHelper.SetupVisualTree(xaml);
00563             RunOnUIThread.Execute(() =>
00564             {
00565                 (root as FrameworkElement).RequestedTheme = ElementTheme.Dark;
00566             });
00567             VisualTreeTestHelper.VerifyVisualTree(root: root,
00568                 verificationFileNamePrefix: "VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName");
00569         }
00570
00571         [TestMethod]
00572         public void VerifyVisualTreeExampleForLightTheme()
00573         {
00574             var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00575                        </Grid>";
00576             UIElement root = VisualTreeTestHelper.SetupVisualTree(xaml);
00577             VisualTreeTestHelper.VerifyVisualTree(root: root,
00578                 verificationFileNamePrefix: "VerifyVisualTreeExampleForLightTheme",
00579                 theme: Theme.Light);
00580         }
00581
00582         [TestMethod]
00583         // [TestProperty("TestPass:IncludeOnlyOn", "Desktop")] // The default theme is different on OneCore, leading to a test failure.
00584         public void VerifyVisualTreeExampleWithCustomerFilter()
00585         {
00586             var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00587                         <TextBlock Text='Abc' />
00588                        </Grid>";
00589
00590             VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
00591                 verificationFileNamePrefix: "VerifyVisualTreeExampleWithCustomerFilter",
00592                 filter: new CustomizedFilter());
00593         }
00594
00595         [TestMethod]
00596         // [TestProperty("TestPass:IncludeOnlyOn", "Desktop")] // The default theme is different on OneCore, leading to a test failure.
00597         public void VerifyVisualTreeExampleWithCustomerPropertyValueTranslator()
00598         {
00599             var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00600                             <TextBlock Text='Abc' />
00601                        </Grid>";
00602
00603             VisualTreeTestHelper.VerifyVisualTree(xaml: xaml,
00604                 verificationFileNamePrefix: "VerifyVisualTreeExampleWithCustomerPropertyValueTranslator",
00605                 translator: new CustomizedTranslator());
00606         }
00607
00608         class CustomizedFilter : VisualTreeDumper.IFilter
00609         {
00610
00611             private static readonly string[] _propertyNamePostfixBlockList = new string[] { "Property", "Transitions", "Template", "Style", "Selector" };
00612
00613             private static readonly string[] _propertyNameBlockList = new string[] { "Interactions", "ColumnDefinitions", "RowDefinitions",
00614             "Children", "Resources", "Transitions", "Dispatcher", "TemplateSettings", "ContentTemplate", "ContentTransitions",
00615             "ContentTemplateSelector", "Content", "ContentTemplateRoot", "XYFocusUp", "XYFocusRight", "XYFocusLeft", "Parent",
00616             "Triggers", "RequestedTheme", "XamlRoot", "IsLoaded", "BaseUri", "Resources"};
00617
00618             private static readonly Dictionary<string, string> _knownPropertyValueDict = new Dictionary<string, string> {
00619                 {"Padding", "0,0,0,0"},
00620                 {"IsTabStop", "False" },
00621                 {"IsEnabled", "True"},
00622                 {"IsLoaded", "True" },
00623                 {"HorizontalContentAlignment", "Center" },
00624                 {"FontSize", "14" },
00625                 {"TabIndex", "2147483647" },
00626                 {"AllowFocusWhenDisabled", "False" },
00627                 {"CharacterSpacing", "0" },
00628                 {"BorderThickness", "0,0,0,0"},
00629                 {"FocusState", "Unfocused"},
00630                 {"IsTextScaleFactorEnabled", "True" },
00631                 {"UseSystemFocusVisuals","False" },
00632                 {"RequiresPointer","Never" },
00633                 {"IsFocusEngagementEnabled","False" },
00634                 {"IsFocusEngaged","False" },
00635                 {"ElementSoundMode","Default" },
00636                 {"CornerRadius","0,0,0,0" },
00637                 {"BackgroundSizing","InnerBorderEdge" },
00638                 {"Width","NaN" },
00639                 {"Name","" },
00640                 {"MinWidth","0" },
00641                 {"MinHeight","0" },
00642                 {"MaxWidth","∞" },
00643                 {"MaxHeight","∞" },
00644                 {"Margin","0,0,0,0" },
00645                 {"Language","en-US" },
00646                 {"HorizontalAlignment","Stretch" },
00647                 {"Height","NaN" },
00648                 {"FlowDirection","LeftToRight" },
00649                 {"RequestedTheme","Default" },
00650                 {"FocusVisualSecondaryThickness","1,1,1,1" },
00651                 {"FocusVisualPrimaryThickness","2,2,2,2" },
00652                 {"FocusVisualMargin","0,0,0,0" },
00653                 {"AllowFocusOnInteraction","True" },
00654                 {"Visibility","Visible" },
00655                 {"UseLayoutRounding","True" },
00656                 {"RenderTransformOrigin","0,0" },
00657                 {"AllowDrop","False" },
00658                 {"Opacity","1" },
00659                 {"ManipulationMode","System" },
00660                 {"IsTapEnabled","True" },
00661                 {"IsRightTapEnabled","True" },
00662                 {"IsHoldingEnabled","True" },
00663                 {"IsHitTestVisible","True" },
00664                 {"IsDoubleTapEnabled","True" },
00665                 {"CanDrag","False" },
00666                 {"IsAccessKeyScope","False" },
00667                 {"ExitDisplayModeOnAccessKeyInvoked","True" },
00668                 {"AccessKey","" },
00669                 {"KeyTipHorizontalOffset","0" },
00670                 {"XYFocusRightNavigationStrategy","Auto" },
00671                 {"HighContrastAdjustment","Application" },
00672                 {"TabFocusNavigation","Local" },
00673                 {"XYFocusUpNavigationStrategy","Auto" },
00674                 {"XYFocusLeftNavigationStrategy","Auto" },
00675                 {"XYFocusKeyboardNavigation","Auto" },
00676                 {"XYFocusDownNavigationStrategy","Auto" },
00677                 {"KeyboardAcceleratorPlacementMode","Auto" },
00678                 {"CanBeScrollAnchor","False" },
00679                 {"Translation","<0, 0, 0>" },
00680                 {"Scale","<1, 1, 1>" },
00681                 {"RotationAxis","<0, 0, 1>" },
00682                 {"CenterPoint","<0, 0, 0>" },
00683                 {"Rotation","0" },
00684                 {"TransformMatrix","{ {M11:1 M12:0 M13:0 M14:0} {M21:0 M22:1 M23:0 M24:0} {M31:0 M32:0 M33:1 M34:0} {M41:0 M42:0 M43:0 M44:1} }"},
00685             };
00686
00687             public bool ShouldVisitPropertyValuePair(string propertyName, string value)
00688             {
00689                 string v = _knownPropertyValueDict.ContainsKey(propertyName) ? _knownPropertyValueDict[propertyName] : VisualTreeDumper.ValueNULL;
00690                 return !(v.Equals(value) || (!string.IsNullOrEmpty(value) && value.StartsWith("Exception")));
00691             }
00692
00693             public bool ShouldVisitElement(string elementName)
00694             {
00695                 return true;
00696             }
00697
00698             public bool ShouldVisitProperty(string propertyName)
00699             {
00700                 return (_propertyNamePostfixBlockList.Where(item => propertyName.EndsWith(item)).Count()) == 0 &&
00701                     !_propertyNameBlockList.Contains(propertyName);
00702             }
00703         }
00704
00705         class CustomizedTranslator : VisualTreeDumper.DefaultPropertyValueTranslator // Add prefix MyValue to all Value
00706         {
00707             public override string PropertyValueToString(string propertyName, object value)
00708             {
00709                 return "MyValue" + base.PropertyValueToString(propertyName, value);
00710             }
00711         }
00712     }
00713 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Awaitable::PTP_WAIT_traits Member List

This is the complete list of members for Awaitable::PTP_WAIT_traits, including all inherited members.
close(type value) noexcept | Awaitable::PTP_WAIT_traits | [inline, static]
invalid() noexcept | Awaitable::PTP_WAIT_traits | [inline, static]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElement.h Source File

  • File List
  • File Members
  • MapControl

MapElement.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "MapElement.g.h"
00010
00011 class MapElement :
00012     public winrt::implementation::MapElementT<MapElement, winrt::composable>
00013 {
00014 public:
00015     MapElement();
00016     winrt::hstring Id;
00017 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewTestHooks Member List

This is the complete list of members for ItemsViewTestHooks, including all inherited members.
EnsureGlobalTestHooks() | ItemsViewTestHooks | [static]
GetGlobalTestHooks() | ItemsViewTestHooks | [inline, static]
GetItemsRepeaterPart(const winrt::ItemsView &itemsView) | ItemsViewTestHooks | [static]
GetKeyboardNavigationReferenceOffset(const winrt::ItemsView &itemsView) | ItemsViewTestHooks | [static]
GetScrollViewPart(const winrt::ItemsView &itemsView) | ItemsViewTestHooks | [static]
GetSelectionModel(const winrt::ItemsView &itemsView) | ItemsViewTestHooks | [static]
KeyboardNavigationReferenceOffsetChanged(winrt::TypedEventHandler< winrt::ItemsView, winrt::IInspectable > const &value) | ItemsViewTestHooks | [static]
KeyboardNavigationReferenceOffsetChanged(winrt::event_token const &token) | ItemsViewTestHooks | [static]
m_keyboardNavigationReferenceOffsetChangedEventSource | ItemsViewTestHooks | [private]
NotifyKeyboardNavigationReferenceOffsetChanged(const winrt::ItemsView &itemsView) | ItemsViewTestHooks | [static]
s_testHooks | ItemsViewTestHooks | [private, static]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/targetver.h Source File

  • File List
  • File Members
  • dll

targetver.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // Including SDKDDKVer.h defines the highest available Windows platform.
00007
00008 // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
00009 // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
00010
00011 #include <SDKDDKVer.h>
00012
00013 #undef NTDDI_VERSION
00014 #define NTDDI_VERSION NTDDI_WIN10_RS2
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemFontInfo.h Source File

  • File List
  • File Members
  • RatingControl

RatingItemFontInfo.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "RatingItemInfo.h"
00006
00007 #include "RatingItemFontInfo.g.h"
00008 #include "RatingItemFontInfo.properties.h"
00009
00010 class RatingItemFontInfo :
00011     public winrt::implementation::RatingItemFontInfoT<RatingItemFontInfo, RatingItemInfo>,
00012     public RatingItemFontInfoProperties
00013 {
00014 public:
00015     ForwardRefToBaseReferenceTracker(RatingItemInfo)
00016 };
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPencilButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarPencilButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarPencilButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InkToolBarPencilButton)
00012 }
00013
00014 #include "InkToolBarPencilButton.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ItemCollectionTransitionProviderTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

ItemCollectionTransitionProviderTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00005 using MUXControlsTestApp.Utilities;
00006 using System.Collections.Generic;
00007 using System.Collections.ObjectModel;
00008 using System.Linq;
00009 using Windows.Foundation;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Markup;
00013 using System.Threading.Tasks;
00014 using System.Threading;
00015 using Microsoft.UI.Xaml.Media;
00016 using Common;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021 using System.Xml.Linq;
00022
00023 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00024 {
00025     [TestClass]
00026     public class ItemCollectionTransitionProviderTests : ApiTestBase
00027     {
00028
00029         [TestMethod]
00030         [TestProperty("Ignore", "True")] // Task 35797826: ElementAnimatorTests.ValidateElementAnimator test disabled
00031         public void ValidateItemCollectionTransitionProvider()
00032         {
00033             ItemsRepeater repeater = null;
00034             ItemCollectionTransitionProviderDerived transitionProvider = null;
00035             var data = new ObservableCollection<string>(Enumerable.Range(0, 10).Select(i => string.Format("Item #{0}", i)));
00036             var renderingEvent = new ManualResetEvent(false);
00037
00038             RunOnUIThread.Execute(() =>
00039             {
00040                 var elementFactory = new RecyclingElementFactory();
00041                 elementFactory.RecyclePool = new RecyclePool();
00042                 elementFactory.Templates["Item"] = (DataTemplate)XamlReader.Load(
00043                     @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00044                           <TextBlock Text='{Binding}' Height='50' />
00045                       </DataTemplate>");
00046
00047                 CompositionTarget.Rendering += (sender, args) =>
00048                 {
00049                     renderingEvent.Set();
00050                 };
00051
00052                 repeater = new ItemsRepeater()
00053                 {
00054                     ItemsSource = data,
00055                     ItemTemplate = elementFactory,
00056                 };
00057
00058                 Content = new ItemsRepeaterScrollHost()
00059                 {
00060                     Width = 400,
00061                     Height = 800,
00062                     ScrollViewer = new ScrollViewer
00063                     {
00064                         Content = repeater
00065                     }
00066                 };
00067             });
00068
00069             IdleSynchronizer.Wait();
00070             Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
00071
00072             List<CallInfo> addCalls = new();
00073             List<CallInfo> removeCalls = new();
00074             List<CallInfo> moveCalls = new();
00075             RunOnUIThread.Execute(() =>
00076             {
00077                 transitionProvider = new ItemCollectionTransitionProviderDerived()
00078                 {
00079                     ShouldAnimateFunc = (ItemCollectionTransition transition) => true,
00080                     StartTransitionsFunc = (IList<ItemCollectionTransition> transitions) =>
00081                     {
00082                         foreach (var transition in transitions)
00083                         {
00084                             var progress = transition.Start();
00085
00086                             switch (transition.Operation)
00087                             {
00088                                 case ItemCollectionTransitionOperation.Add:
00089                                     addCalls.Add(new CallInfo(repeater.GetElementIndex(progress.Element), transition));
00090                                     break;
00091                                 case ItemCollectionTransitionOperation.Remove:
00092                                     removeCalls.Add(new CallInfo(repeater.GetElementIndex(progress.Element), transition));
00093                                     break;
00094                                 case ItemCollectionTransitionOperation.Move:
00095                                     moveCalls.Add(new CallInfo(repeater.GetElementIndex(progress.Element), transition));
00096                                     break;
00097                             }
00098
00099                             progress.Complete();
00100                         }
00101                     }
00102                 };
00103                 repeater.ItemTransitionProvider = transitionProvider;
00104
00105                 renderingEvent.Reset();
00106                 data.Insert(0, "new item");
00107                 data.RemoveAt(2);
00108             });
00109
00110             Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
00111             IdleSynchronizer.Wait();
00112
00113             Verify.AreEqual(1, addCalls.Count);
00114             var call = addCalls[0];
00115             Verify.AreEqual(0, call.Index);
00116             Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeAdd, call.Transition.Triggers);
00117
00118             Verify.AreEqual(1, removeCalls.Count);
00119             call = removeCalls[0];
00120             Verify.AreEqual(-1, call.Index); // not in the repeater anymore
00121             Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeRemove, call.Transition.Triggers);
00122
00123             Verify.AreEqual(1, moveCalls.Count);
00124             call = moveCalls[0];
00125             Verify.AreEqual(1, call.Index);
00126             Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeAdd | ItemCollectionTransitionTriggers.CollectionChangeRemove, call.Transition.Triggers);
00127             Verify.AreEqual(0, call.Transition.OldBounds.Y);
00128             Verify.AreEqual(50, call.Transition.NewBounds.Y);
00129
00130             addCalls.Clear();
00131             removeCalls.Clear();
00132             moveCalls.Clear();
00133
00134             // Hookup just for show animations and validate.
00135             RunOnUIThread.Execute(() =>
00136             {
00137                 transitionProvider.ShouldAnimateFunc = (ItemCollectionTransition transition) => transition.Operation == ItemCollectionTransitionOperation.Add;
00138
00139                 renderingEvent.Reset();
00140                 data.Insert(0, "new item");
00141                 data.RemoveAt(2);
00142             });
00143
00144             Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
00145             IdleSynchronizer.Wait();
00146
00147             Verify.AreEqual(1, addCalls.Count);
00148             call = addCalls[0];
00149             Verify.AreEqual(0, call.Index);
00150             Verify.AreEqual(ItemCollectionTransitionTriggers.CollectionChangeAdd, call.Transition.Triggers);
00151
00152             Verify.AreEqual(0, removeCalls.Count);
00153             Verify.AreEqual(0, moveCalls.Count);
00154         }
00155
00156         struct CallInfo
00157         {
00158             public CallInfo(int index, ItemCollectionTransition transition)
00159             {
00160                 Index = index;
00161                 Transition = transition;
00162             }
00163
00164             public int Index { get; set; }
00165             public ItemCollectionTransition Transition { get; set; }
00166
00167             public override string ToString()
00168             {
00169                 return $"Index: {Index} Operation: {Transition.Operation} Triggers: {Transition.Triggers} OldBounds: {Transition.OldBounds} NewBounds {Transition.NewBounds}";
00170             }
00171         };
00172     }
00173 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicPage Member List

This is the complete list of members for AcrylicPage, including all inherited members.
AcrylicPage() AcrylicPage [inline]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_ApiTests/NavigationViewTests.cs Source File

  • File List
  • File Members
  • NavigationView
  • NavigationView_ApiTests

NavigationViewTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005
00006 using Common;
00007 using System;
00008 using System.Collections.Generic;
00009 using System.Collections.ObjectModel;
00010 using Windows.Foundation.Metadata;
00011 using Windows.UI.ViewManagement;
00012 using Microsoft.UI.Xaml.Automation.Peers;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Media;
00015 using Microsoft.UI.Xaml.Markup;
00016 using Microsoft.UI.Xaml.Shapes;
00017 using System.Runtime.InteropServices;
00018 using Windows.UI.Core;
00019
00020 using WEX.TestExecution;
00021 using WEX.TestExecution.Markup;
00022 using WEX.Logging.Interop;
00023 using System.Threading;
00024 using System.Security.Cryptography.X509Certificates;
00025 using MUXControlsTestApp.Samples;
00026 using Windows.UI.ViewManagement;
00027
00028 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00029 {
00030     public class Category
00031     {
00032         public String Content { get; set; }
00033         public String Name { get; set; }
00034         public String Icon { get; set; }
00035         public ObservableCollection<Category> Children { get; set; }
00036         public bool SelectsOnInvoked { get; set; }
00037
00038         public Category(String content, String name, String icon, ObservableCollection<Category> children, bool selectsOnInvoked)
00039         {
00040             this.Content = content;
00041             this.Name = name;
00042             this.Icon = icon;
00043             this.Children = children;
00044             this.SelectsOnInvoked = selectsOnInvoked;
00045         }
00046     }
00047
00048     [TestClass]
00049     public class NavigationViewTests : ApiTestBase
00050     {
00051         private NavigationView SetupNavigationView(NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto)
00052         {
00053             NavigationView navView = null;
00054             RunOnUIThread.Execute(() =>
00055             {
00056                 navView = new NavigationView();
00057                 var undoNVI = new NavigationViewItem() { Content = "Undo", Icon = new SymbolIcon(Symbol.Undo) };
00058                 undoNVI.Resources.Add("NavigationViewItemIconBackground", new SolidColorBrush(Colors.Red));
00059                 navView.MenuItems.Add(undoNVI);
00060                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Cut", Icon = new SymbolIcon(Symbol.Cut) });
00061
00062                 navView.PaneTitle = "Title";
00063                 navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00064                 navView.IsSettingsVisible = true;
00065                 navView.PaneDisplayMode = paneDisplayMode;
00066                 navView.OpenPaneLength = 120.0;
00067                 navView.ExpandedModeThresholdWidth = 600.0;
00068                 navView.CompactModeThresholdWidth = 400.0;
00069                 navView.Width = 800.0;
00070                 navView.Height = 600.0;
00071                 navView.Content = "This is a simple test";
00072                 Content = navView;
00073
00074                 if (CoreWindow.GetForCurrentThread() != null)
00075                 {
00076                     try
00077                     {
00078                         ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
00079                     }
00080                     catch (COMException)
00081                     {
00082                         // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
00083                     }
00084                 }
00085             });
00086
00087             IdleSynchronizer.Wait();
00088             return navView;
00089         }
00090
00091         private NavigationView SetupNavigationViewScrolling(NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto)
00092         {
00093             NavigationView navView = null;
00094             RunOnUIThread.Execute(() =>
00095             {
00096                 navView = new NavigationView();
00097                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #1", Icon = new SymbolIcon(Symbol.Undo) });
00098                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #2", Icon = new SymbolIcon(Symbol.Cut) });
00099                 navView.MenuItems.Add(new NavigationViewItemHeader() { Content = "Item #3" });
00100                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #4", Icon = new SymbolIcon(Symbol.Cut) });
00101                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #5", Icon = new SymbolIcon(Symbol.Cut) });
00102                 navView.MenuItems.Add(new NavigationViewItemSeparator());
00103                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #7", Icon = new SymbolIcon(Symbol.Cut) });
00104                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #8", Icon = new SymbolIcon(Symbol.Cut) });
00105                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #9", Icon = new SymbolIcon(Symbol.Cut) });
00106                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #10", Icon = new SymbolIcon(Symbol.Cut) });
00107                 navView.MenuItems.Add(new NavigationViewItemHeader() { Content = "Item #11" });
00108                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #12", Icon = new SymbolIcon(Symbol.Cut) });
00109                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #13", Icon = new SymbolIcon(Symbol.Cut) });
00110                 navView.MenuItems.Add(new NavigationViewItemSeparator());
00111                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Item #15", Icon = new SymbolIcon(Symbol.Cut) });
00112
00113                 navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00114                 navView.IsSettingsVisible = true;
00115                 navView.PaneDisplayMode = paneDisplayMode;
00116                 navView.OpenPaneLength = 120.0;
00117                 navView.ExpandedModeThresholdWidth = 600.0;
00118                 navView.CompactModeThresholdWidth = 400.0;
00119                 navView.Width = 800.0;
00120                 navView.Height = 200.0;
00121                 navView.Content = "This test should have enough NavigationViewItems to scroll.";
00122                 Content = navView;
00123
00124                 if (CoreWindow.GetForCurrentThread() != null)
00125                 {
00126                     try
00127                     {
00128                         ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
00129                     }
00130                     catch (COMException)
00131                     {
00132                         // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
00133                     }
00134                 }
00135             });
00136
00137             IdleSynchronizer.Wait();
00138             return navView;
00139         }
00140
00141         private NavigationView SetupNavigationViewPaneContent(NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto)
00142         {
00143             NavigationView navView = null;
00144             RunOnUIThread.Execute(() =>
00145             {
00146                 navView = new NavigationView();
00147                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Undo", Icon = new SymbolIcon(Symbol.Undo) });
00148                 navView.MenuItems.Add(new NavigationViewItem() { Content = "Cut", Icon = new SymbolIcon(Symbol.Cut) });
00149
00150                 // Navigation View Pane Elements
00151                 Button headerButton = new Button();
00152                 headerButton.Content = "Header Button";
00153
00154                 Button footerButton = new Button();
00155                 footerButton.Content = "Footer Button";
00156
00157                 // NavigationView Content Elements
00158                 Button contentButtonOne = new Button();
00159                 contentButtonOne.Content = "Content Button One";
00160
00161                 Button contentButtonTwo = new Button();
00162                 contentButtonTwo.Content = "Content Button Two";
00163                 contentButtonTwo.Margin = new Thickness(50, 0, 0, 0);
00164
00165                 StackPanel contentStackPanel = new StackPanel();
00166                 contentStackPanel.Children.Add(contentButtonOne);
00167                 contentStackPanel.Children.Add(contentButtonTwo);
00168
00169                 // Set NavigationView Properties
00170
00171                 navView.PaneHeader = headerButton;
00172                 navView.PaneFooter = footerButton;
00173                 navView.Header = "NavigationView Header";
00174                 navView.AutoSuggestBox = new AutoSuggestBox();
00175                 navView.Content = contentStackPanel;
00176                 navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00177                 navView.IsSettingsVisible = true;
00178                 navView.PaneDisplayMode = paneDisplayMode;
00179                 navView.OpenPaneLength = 300.0;
00180                 navView.ExpandedModeThresholdWidth = 600.0;
00181                 navView.CompactModeThresholdWidth = 400.0;
00182                 navView.Width = 800.0;
00183                 navView.Height = 600.0;
00184                 Content = navView;
00185
00186                 if (CoreWindow.GetForCurrentThread() != null)
00187                 {
00188                     try
00189                     {
00190                         ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
00191                     }
00192                     catch (COMException)
00193                     {
00194                         // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
00195                     }
00196                 }
00197             });
00198
00199             IdleSynchronizer.Wait();
00200             return navView;
00201         }
00202
00203         private NavigationView SetupNavigationViewHierarchy(NavigationViewPaneDisplayMode paneDisplayMode = NavigationViewPaneDisplayMode.Auto)
00204         {
00205             NavigationView navView = null;
00206             RunOnUIThread.Execute(() =>
00207             {
00208                 navView = new NavigationView();
00209
00210                 NavigationViewItem navViewItem1 = new NavigationViewItem() { Content = "NVI1" };
00211                 navViewItem1.MenuItems.Add(new NavigationViewItem() { Content = "NVI1" });
00212
00213                 NavigationViewItem navViewItem2 = new NavigationViewItem() { Content = "NVI2" };
00214
00215                 navView.MenuItems.Add(navViewItem1);
00216                 navView.MenuItems.Add(navViewItem2);
00217
00218                 navView.PaneTitle = "Hierarchical NavView";
00219                 navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00220                 navView.IsSettingsVisible = true;
00221                 navView.PaneDisplayMode = paneDisplayMode;
00222                 navView.OpenPaneLength = 120.0;
00223                 navView.ExpandedModeThresholdWidth = 600.0;
00224                 navView.CompactModeThresholdWidth = 400.0;
00225                 navView.Width = 800.0;
00226                 navView.Height = 600.0;
00227                 navView.Content = "This is a simple Hierarchical Navigation View test";
00228                 Content = navView;
00229
00230                 try
00231                 {
00232                     ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
00233                 }
00234                 catch (COMException)
00235                 {
00236                     // ApplicationView.GetForCurrentView() will throw in desktop scenarios.
00237                 }
00238             });
00239
00240             IdleSynchronizer.Wait();
00241             return navView;
00242         }
00243
00244         [TestMethod]
00245         public void VerifyVisualTree()
00246         {
00247             using (VisualTreeVerifier visualTreeVerifier = new VisualTreeVerifier())
00248             {
00249                 // Generate a basic NavigationView verification file for all the pane display modes
00250                 foreach (var paneDisplayMode in Enum.GetValues(typeof(NavigationViewPaneDisplayMode)))
00251                 {
00252                     var filePrefix = "NavigationView" + paneDisplayMode;
00253                     NavigationViewPaneDisplayMode displayMode = (NavigationViewPaneDisplayMode)paneDisplayMode;
00254
00255                     // We can skip generating a verification file for Left mode since Auto is achieving the same result.
00256                     if (displayMode == NavigationViewPaneDisplayMode.Left)
00257                     {
00258                         continue;
00259                     }
00260
00261                     Log.Comment($"Verify visual tree for NavigationViewPaneDisplayMode: {paneDisplayMode}");
00262                     var navigationView = SetupNavigationView(displayMode);
00263                     visualTreeVerifier.VerifyVisualTreeNoException(root: navigationView, verificationFileNamePrefix: filePrefix);
00264                 }
00265
00266                 Log.Comment($"Verify visual tree for NavigationViewScrolling");
00267                 var leftNavViewScrolling = SetupNavigationViewScrolling(NavigationViewPaneDisplayMode.Left);
00268                 visualTreeVerifier.VerifyVisualTreeNoException(root: leftNavViewScrolling, verificationFileNamePrefix: "NavigationViewScrolling");
00269
00270                 Log.Comment($"Verify visual tree for NavigationViewLeftPaneContent");
00271                 var leftNavViewPaneContent = SetupNavigationViewPaneContent(NavigationViewPaneDisplayMode.Left);
00272                 visualTreeVerifier.VerifyVisualTreeNoException(root: leftNavViewPaneContent, verificationFileNamePrefix: "NavigationViewLeftPaneContent");
00273
00274                 Log.Comment($"Verify visual tree for NavigationViewTopPaneContent");
00275                 var topNavViewPaneContent = SetupNavigationViewPaneContent(NavigationViewPaneDisplayMode.Top);
00276                 visualTreeVerifier.VerifyVisualTreeNoException(root: topNavViewPaneContent, verificationFileNamePrefix: "NavigationViewTopPaneContent");
00277
00278                 Log.Comment($"Verify visual tree for NavigationViewHierarchy");
00279                 var hierarchyNavViewPaneContent = SetupNavigationViewHierarchy(NavigationViewPaneDisplayMode.Left);
00280                 visualTreeVerifier.VerifyVisualTreeNoException(root: hierarchyNavViewPaneContent, verificationFileNamePrefix: "NavigationViewHierarchy");
00281             }
00282         }
00283
00284         [TestMethod]
00285         public void VerifyPaneDisplayModeAndDisplayModeMapping()
00286         {
00287             var navView = SetupNavigationView();
00288             RunOnUIThread.Execute(() =>
00289             {
00290                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Expanded);
00291                 Verify.IsTrue(navView.IsPaneOpen, "Pane opened");
00292                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;
00293             });
00294             IdleSynchronizer.Wait();
00295
00296             RunOnUIThread.Execute(() =>
00297             {
00298                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Minimal, "Top Minimal");
00299                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
00300             });
00301             IdleSynchronizer.Wait();
00302
00303             RunOnUIThread.Execute(() =>
00304             {
00305                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Expanded, "Left Expanded");
00306                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftCompact;
00307             });
00308             IdleSynchronizer.Wait();
00309
00310             RunOnUIThread.Execute(() =>
00311             {
00312                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Compact, "LeftCompact Compact");
00313                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftMinimal;
00314             });
00315             IdleSynchronizer.Wait();
00316
00317             RunOnUIThread.Execute(() =>
00318             {
00319                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Minimal, "LeftMinimal Minimal");
00320                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Auto;
00321             });
00322             IdleSynchronizer.Wait();
00323
00324             RunOnUIThread.Execute(() =>
00325             {
00326                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Expanded, "Auto Expanded");
00327                 navView.Width = navView.ExpandedModeThresholdWidth - 10.0;
00328             });
00329             IdleSynchronizer.Wait();
00330
00331             RunOnUIThread.Execute(() =>
00332             {
00333                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Compact, "Auto Compact");
00334                 navView.Width = navView.CompactModeThresholdWidth - 10.0;
00335             });
00336             IdleSynchronizer.Wait();
00337
00338             RunOnUIThread.Execute(() =>
00339             {
00340                 Verify.AreEqual(navView.DisplayMode, NavigationViewDisplayMode.Minimal, "Auto Minimal");
00341             });
00342         }
00343
00344         [TestMethod]
00345         public void VerifyPaneDisplayModeChangingPaneAccordingly()
00346         {
00347             var navView = SetupNavigationView();
00348
00349             foreach (var paneDisplayMode in Enum.GetValues(typeof(NavigationViewPaneDisplayMode)))
00350             {
00351                 RunOnUIThread.Execute(() =>
00352                 {
00353                     navView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftMinimal;
00354                     navView.IsPaneOpen = false;
00355                     // Set it below threshold width for auto mode
00356                     navView.Width = navView.CompactModeThresholdWidth - 20;
00357
00358                     Content.UpdateLayout();
00359
00360                     navView.PaneDisplayMode = (NavigationViewPaneDisplayMode)paneDisplayMode;
00361
00362                     Content.UpdateLayout();
00363
00364                     // We only want to open the pane when explicitly set, otherwise it should be closed
00365                     // since we set the width below the threshold width
00366                     Verify.AreEqual((NavigationViewPaneDisplayMode)paneDisplayMode == NavigationViewPaneDisplayMode.Left, navView.IsPaneOpen);
00367                 });
00368             }
00369         }
00370
00371         [TestMethod]
00372         public void VerifyPaneDisplayModeAndIsPaneOpenInterplayOnNavViewLaunch()
00373         {
00374             Log.Comment("--- PaneDisplayMode: LeftMinimal ---");
00375             VerifyForPaneDisplayModeLeftMinimal();
00376
00377             Log.Comment("--- PaneDisplayMode: LeftCompact ---");
00378             VerifyForPaneDisplayModeLeftCompact();
00379
00380             Log.Comment("--- PaneDisplayMode: Left ---");
00381             VerifyForPaneDisplayModeLeft();
00382
00383             Log.Comment("--- PaneDisplayMode: Auto ---");
00384             VerifyForPaneDisplayModeAuto();
00385
00386             void VerifyForPaneDisplayModeLeftMinimal()
00387             {
00388                 Log.Comment("Verify pane is closed when IsPaneOpen=true");
00389                 var navView = SetupNavView(NavigationViewPaneDisplayMode.LeftMinimal, true);
00390
00391                 RunOnUIThread.Execute(() =>
00392                 {
00393                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00394                 });
00395
00396                 Log.Comment("Verify pane is closed when IsPaneOpen=false");
00397                 navView = SetupNavView(NavigationViewPaneDisplayMode.LeftMinimal, false);
00398
00399                 RunOnUIThread.Execute(() =>
00400                 {
00401                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00402                 });
00403             }
00404
00405             void VerifyForPaneDisplayModeLeftCompact()
00406             {
00407                 Log.Comment("Verify pane is closed when IsPaneOpen=true");
00408                 var navView = SetupNavView(NavigationViewPaneDisplayMode.LeftCompact, true);
00409
00410                 RunOnUIThread.Execute(() =>
00411                 {
00412                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00413                 });
00414
00415                 Log.Comment("Verify pane is closed when IsPaneOpen=false");
00416                 navView = SetupNavView(NavigationViewPaneDisplayMode.LeftCompact, false);
00417
00418                 RunOnUIThread.Execute(() =>
00419                 {
00420                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00421                 });
00422             }
00423
00424             void VerifyForPaneDisplayModeLeft()
00425             {
00426                 Log.Comment("Verify pane is open when IsPaneOpen=true");
00427                 var navView = SetupNavView(NavigationViewPaneDisplayMode.Left, true);
00428
00429                 RunOnUIThread.Execute(() =>
00430                 {
00431                     Verify.IsTrue(navView.IsPaneOpen, "NavigationView pane should have been open");
00432                 });
00433
00434                 Log.Comment("Verify pane is closed when IsPaneOpen=false");
00435                 navView = SetupNavView(NavigationViewPaneDisplayMode.Left, false);
00436
00437                 RunOnUIThread.Execute(() =>
00438                 {
00439                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00440                 });
00441             }
00442
00443             void VerifyForPaneDisplayModeAuto()
00444             {
00445                 Log.Comment("Verify pane is closed when launched in minimal state and IsPaneOpen=true");
00446                 var navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, true, NavigationViewDisplayMode.Minimal);
00447
00448                 RunOnUIThread.Execute(() =>
00449                 {
00450                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00451                 });
00452
00453                 Log.Comment("Verify pane is closed when launched in compact state and IsPaneOpen=true");
00454                 navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, true, NavigationViewDisplayMode.Compact);
00455
00456                 RunOnUIThread.Execute(() =>
00457                 {
00458                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00459                 });
00460
00461                 Log.Comment("Verify pane is open when launched in expanded state and IsPaneOpen=true");
00462                 navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, true, NavigationViewDisplayMode.Expanded);
00463
00464                 RunOnUIThread.Execute(() =>
00465                 {
00466                     Verify.IsTrue(navView.IsPaneOpen, "NavigationView pane should have been open");
00467                 });
00468
00469                 Log.Comment("Verify pane is closed when launched in minimal state and IsPaneOpen=false");
00470                 navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, false, NavigationViewDisplayMode.Minimal);
00471
00472                 RunOnUIThread.Execute(() =>
00473                 {
00474                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00475                 });
00476
00477                 Log.Comment("Verify pane is closed when launched in compact state and IsPaneOpen=false");
00478                 navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, false, NavigationViewDisplayMode.Compact);
00479
00480                 RunOnUIThread.Execute(() =>
00481                 {
00482                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00483                 });
00484
00485                 Log.Comment("Verify pane is closed when launched in expanded state and IsPaneOpen=false");
00486                 navView = SetupNavView(NavigationViewPaneDisplayMode.Auto, false, NavigationViewDisplayMode.Expanded);
00487
00488                 RunOnUIThread.Execute(() =>
00489                 {
00490                     Verify.IsFalse(navView.IsPaneOpen, "NavigationView pane should have been closed");
00491                 });
00492             }
00493
00494             NavigationView SetupNavView(NavigationViewPaneDisplayMode paneDisplayMode, bool isPaneOpen, NavigationViewDisplayMode displayMode = NavigationViewDisplayMode.Expanded)
00495             {
00496                 NavigationView navView = null;
00497                 RunOnUIThread.Execute(() =>
00498                 {
00499                     navView = new NavigationView();
00500                     navView.MenuItems.Add(new NavigationViewItem() { Content = "MenuItem" });
00501
00502                     navView.PaneDisplayMode = paneDisplayMode;
00503                     navView.IsPaneOpen = isPaneOpen;
00504                     navView.ExpandedModeThresholdWidth = 600.0;
00505                     navView.CompactModeThresholdWidth = 400.0;
00506
00507                     if (paneDisplayMode == NavigationViewPaneDisplayMode.Auto)
00508                     {
00509                         switch (displayMode)
00510                         {
00511                             case NavigationViewDisplayMode.Minimal:
00512                                 navView.Width = navView.CompactModeThresholdWidth - 10.0;
00513                                 break;
00514                             case NavigationViewDisplayMode.Compact:
00515                                 navView.Width = navView.ExpandedModeThresholdWidth - 10.0;
00516                                 break;
00517                             case NavigationViewDisplayMode.Expanded:
00518                                 navView.Width = navView.ExpandedModeThresholdWidth + 10.0;
00519                                 break;
00520                         }
00521                     }
00522
00523                     Content = navView;
00524                 });
00525
00526                 IdleSynchronizer.Wait();
00527                 return navView;
00528             }
00529         }
00530
00531         [TestMethod]
00532         public void VerifyDefaultsAndBasicSetting()
00533         {
00534             NavigationView navView = null;
00535             Rectangle footer = null;
00536             TextBlock header = null;
00537             Setter styleSetter = null;
00538             Style hamburgerStyle = null;
00539
00540             RunOnUIThread.Execute(() =>
00541             {
00542                 footer = new Rectangle();
00543                 footer.Height = 40;
00544
00545                 header = new TextBlock();
00546                 header.Text = "Header";
00547
00548                 styleSetter = new Setter();
00549                 styleSetter.Property = FrameworkElement.MinHeightProperty;
00550                 styleSetter.Value = "80";
00551                 hamburgerStyle = new Style();
00552
00553                 navView = new NavigationView();
00554
00555                 // Verify Defaults
00556                 Verify.IsTrue(navView.IsPaneOpen);
00557                 Verify.AreEqual(641, navView.CompactModeThresholdWidth);
00558                 Verify.AreEqual(1008, navView.ExpandedModeThresholdWidth);
00559                 Verify.IsNull(navView.PaneFooter);
00560                 Verify.IsNull(navView.Header);
00561                 Verify.IsTrue(navView.IsSettingsVisible);
00562                 Verify.IsTrue(navView.IsPaneToggleButtonVisible);
00563                 Verify.IsTrue(navView.IsTitleBarAutoPaddingEnabled);
00564                 Verify.IsTrue(navView.AlwaysShowHeader);
00565                 Verify.AreEqual(48, navView.CompactPaneLength);
00566                 Verify.AreEqual(320, navView.OpenPaneLength);
00567                 Verify.IsNull(navView.PaneToggleButtonStyle);
00568                 Verify.AreEqual(0, navView.MenuItems.Count);
00569                 Verify.AreEqual(NavigationViewDisplayMode.Minimal, navView.DisplayMode);
00570                 Verify.AreEqual("", navView.PaneTitle);
00571                 Verify.IsFalse(navView.IsBackEnabled);
00572                 Verify.AreEqual(NavigationViewBackButtonVisible.Auto, navView.IsBackButtonVisible);
00573
00574                 // Verify basic setters
00575                 navView.IsPaneOpen = true;
00576                 navView.CompactModeThresholdWidth = 500;
00577                 navView.ExpandedModeThresholdWidth = 1000;
00578                 navView.PaneFooter = footer;
00579                 navView.Header = header;
00580                 navView.IsSettingsVisible = false;
00581                 navView.IsPaneToggleButtonVisible = false;
00582                 navView.IsTitleBarAutoPaddingEnabled = false;
00583                 navView.AlwaysShowHeader = false;
00584                 navView.CompactPaneLength = 40;
00585                 navView.OpenPaneLength = 300;
00586                 navView.PaneToggleButtonStyle = hamburgerStyle;
00587                 navView.PaneTitle = "ChangedTitle";
00588                 navView.IsBackEnabled = true;
00589                 navView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00590                 // TODO(test adding a MenuItem programmatically)
00591             });
00592
00593             IdleSynchronizer.Wait();
00594
00595             RunOnUIThread.Execute(() =>
00596             {
00597                 Verify.IsTrue(navView.IsPaneOpen);
00598                 Verify.AreEqual(500, navView.CompactModeThresholdWidth);
00599                 Verify.AreEqual(1000, navView.ExpandedModeThresholdWidth);
00600                 Verify.AreEqual(footer, navView.PaneFooter);
00601                 Verify.AreEqual(header, navView.Header);
00602                 Verify.IsFalse(navView.IsSettingsVisible);
00603                 Verify.IsFalse(navView.IsPaneToggleButtonVisible);
00604                 Verify.IsFalse(navView.IsTitleBarAutoPaddingEnabled);
00605                 Verify.IsFalse(navView.AlwaysShowHeader);
00606                 Verify.AreEqual(40, navView.CompactPaneLength);
00607                 Verify.AreEqual(300, navView.OpenPaneLength);
00608                 Verify.AreEqual(hamburgerStyle, navView.PaneToggleButtonStyle);
00609                 Verify.AreEqual("ChangedTitle", navView.PaneTitle);
00610                 Verify.IsTrue(navView.IsBackEnabled);
00611                 Verify.AreEqual(NavigationViewBackButtonVisible.Visible, navView.IsBackButtonVisible);
00612
00613                 // Verify nullable values
00614                 navView.PaneFooter = null;
00615                 navView.Header = null;
00616                 navView.PaneToggleButtonStyle = null;
00617             });
00618
00619             IdleSynchronizer.Wait();
00620
00621             RunOnUIThread.Execute(() =>
00622             {
00623                 Verify.IsNull(navView.PaneFooter);
00624                 Verify.IsNull(navView.Header);
00625                 Verify.IsNull(navView.PaneToggleButtonStyle);
00626             });
00627         }
00628
00629         [TestMethod]
00630         public void VerifyValuesCoercion()
00631         {
00632             RunOnUIThread.Execute(() =>
00633             {
00634                 NavigationView navView = new NavigationView();
00635
00636                 navView.CompactModeThresholdWidth = -1;
00637                 navView.ExpandedModeThresholdWidth = -1;
00638                 navView.CompactPaneLength = -1;
00639                 navView.OpenPaneLength = -1;
00640
00641                 Verify.AreEqual(0, navView.CompactModeThresholdWidth, "Should coerce negative CompactModeThresholdWidth values to 0");
00642                 Verify.AreEqual(0, navView.ExpandedModeThresholdWidth, "Should coerce negative ExpandedModeThresholdWidth values to 0");
00643                 Verify.AreEqual(0, navView.CompactPaneLength, "Should coerce negative CompactPaneLength values to 0");
00644                 Verify.AreEqual(0, navView.OpenPaneLength, "Should coerce negative OpenPaneLength values to 0");
00645             });
00646         }
00647
00648         [TestMethod]
00649         public void VerifyPaneProperties()
00650         {
00651             RunOnUIThread.Execute(() =>
00652             {
00653                 NavigationView navView = new NavigationView();
00654
00655                 // These properties are template-bound to SplitView properties, so testing getters/setters should be sufficient
00656                 navView.IsPaneOpen = false;
00657                 navView.CompactPaneLength = 100.0;
00658                 navView.OpenPaneLength = 200.0;
00659
00660                 Verify.AreEqual(false, navView.IsPaneOpen);
00661                 Verify.AreEqual(100.0, navView.CompactPaneLength);
00662                 Verify.AreEqual(200.0, navView.OpenPaneLength);
00663
00664                 navView.IsPaneOpen = true;
00665                 Verify.AreEqual(true, navView.IsPaneOpen);
00666             });
00667         }
00668
00669         [TestMethod]
00670         public void VerifySingleSelection()
00671         {
00672             string navItemPresenter1CurrentState = string.Empty;
00673             string navItemPresenter2CurrentState = string.Empty;
00674             NavigationView navView = null;
00675             NavigationViewItem menuItem1 = null;
00676             NavigationViewItem menuItem2 = null;
00677
00678             RunOnUIThread.Execute(() =>
00679             {
00680                 navView = new NavigationView();
00681                 Content = navView;
00682
00683                 menuItem1 = new NavigationViewItem();
00684                 menuItem2 = new NavigationViewItem();
00685                 menuItem1.Content = "Item 1";
00686                 menuItem2.Content = "Item 2";
00687
00688                 navView.MenuItems.Add(menuItem1);
00689                 navView.MenuItems.Add(menuItem2);
00690                 navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
00691                 Content.UpdateLayout();
00692
00693                 var menuItemLayoutRoot = VisualTreeHelper.GetChild(menuItem1, 0) as FrameworkElement;
00694                 var navItemPresenter = VisualTreeHelper.GetChild(menuItemLayoutRoot, 0) as FrameworkElement;
00695                 var navItemPresenterLayoutRoot = VisualTreeHelper.GetChild(navItemPresenter, 0) as FrameworkElement;
00696                 var statesGroups = VisualStateManager.GetVisualStateGroups(navItemPresenterLayoutRoot);
00697
00698                 foreach (var visualStateGroup in statesGroups)
00699                 {
00700                     Log.Comment($"VisualStateGroup1: Name={visualStateGroup.Name}, CurrentState={visualStateGroup.CurrentState.Name}");
00701
00702                     visualStateGroup.CurrentStateChanged += (object sender, VisualStateChangedEventArgs e) =>
00703                     {
00704                         Log.Comment($"VisualStateChangedEventArgs1: Name={e.Control.Name}, OldState={e.OldState.Name}, NewState={e.NewState.Name}");
00705                         navItemPresenter1CurrentState = e.NewState.Name;
00706                     };
00707                 }
00708
00709                 menuItemLayoutRoot = VisualTreeHelper.GetChild(menuItem2, 0) as FrameworkElement;
00710                 navItemPresenter = VisualTreeHelper.GetChild(menuItemLayoutRoot, 0) as FrameworkElement;
00711                 navItemPresenterLayoutRoot = VisualTreeHelper.GetChild(navItemPresenter, 0) as FrameworkElement;
00712                 statesGroups = VisualStateManager.GetVisualStateGroups(navItemPresenterLayoutRoot);
00713
00714                 foreach (var visualStateGroup in statesGroups)
00715                 {
00716                     Log.Comment($"VisualStateGroup2: Name={visualStateGroup.Name}, CurrentState={visualStateGroup.CurrentState.Name}");
00717
00718                     visualStateGroup.CurrentStateChanged += (object sender, VisualStateChangedEventArgs e) =>
00719                     {
00720                         Log.Comment($"VisualStateChangedEventArgs2: Name={e.Control.Name}, OldState={e.OldState.Name}, NewState={e.NewState.Name}");
00721                         navItemPresenter2CurrentState = e.NewState.Name;
00722                     };
00723                 }
00724
00725                 Verify.IsFalse(menuItem1.IsSelected);
00726                 Verify.IsFalse(menuItem2.IsSelected);
00727                 Verify.AreEqual(null, navView.SelectedItem);
00728
00729                 menuItem1.IsSelected = true;
00730             });
00731             IdleSynchronizer.Wait();
00732
00733             RunOnUIThread.Execute(() =>
00734             {
00735                 Content.UpdateLayout();
00736             });
00737             IdleSynchronizer.Wait();
00738
00739             RunOnUIThread.Execute(() =>
00740             {
00741                 Verify.AreEqual("Selected", navItemPresenter1CurrentState);
00742                 Verify.AreEqual(string.Empty, navItemPresenter2CurrentState);
00743
00744                 Verify.IsTrue(menuItem1.IsSelected);
00745                 Verify.IsFalse(menuItem2.IsSelected);
00746                 Verify.AreEqual(menuItem1, navView.SelectedItem);
00747
00748                 menuItem2.IsSelected = true;
00749             });
00750             IdleSynchronizer.Wait();
00751
00752             RunOnUIThread.Execute(() =>
00753             {
00754                 Content.UpdateLayout();
00755             });
00756             IdleSynchronizer.Wait();
00757
00758             RunOnUIThread.Execute(() =>
00759             {
00760                 Verify.AreEqual("Normal", navItemPresenter1CurrentState);
00761                 Verify.AreEqual("Selected", navItemPresenter2CurrentState);
00762
00763                 Verify.IsTrue(menuItem2.IsSelected);
00764                 Verify.IsFalse(menuItem1.IsSelected, "MenuItem1 should have been deselected when MenuItem2 was selected");
00765                 Verify.AreEqual(menuItem2, navView.SelectedItem);
00766             });
00767         }
00768
00769         [TestMethod]
00770         public void VerifyClosedCompactVisualState()
00771         {
00772             NavigationView navView = null;
00773             RunOnUIThread.Execute(() =>
00774             {
00775                 navView = new NavigationView();
00776                 Content = navView;
00777
00778                 var template = (DataTemplate)XamlReader.Load(@"
00779                     <DataTemplate
00780                         xmlns ='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00781                         xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00782                         xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
00783                         <controls:NavigationViewItem
00784                             Content='Item'>
00785                             <controls:NavigationViewItem.Icon>
00786                                 <SymbolIcon Symbol='Home' />
00787                             </controls:NavigationViewItem.Icon>
00788                          </controls:NavigationViewItem>
00789                       </DataTemplate>");
00790                 navView.MenuItemTemplate = template;
00791                 navView.IsPaneOpen = false;
00792                 navView.IsSettingsVisible = false;
00793
00794                 RoutedEventHandler loaded = null;
00795                 loaded = (object sender, RoutedEventArgs args) =>
00796                 {
00797                     navView.Loaded -= loaded;
00798
00799                     var items = new List<object>() { new object() }; ;
00800                     navView.MenuItemsSource = items;
00801                 };
00802                 navView.Loaded += loaded;
00803
00804                 Content.UpdateLayout();
00805             });
00806             IdleSynchronizer.Wait();
00807
00808             RunOnUIThread.Execute(() =>
00809             {
00810                 var footerRepeater = VisualTreeUtils.FindVisualChildByName(navView, "MenuItemsHost") as FrameworkElement;
00811                 var menuItem = VisualTreeHelper.GetChild(footerRepeater, 0) as FrameworkElement;
00812                 var menuItemLayoutRoot = VisualTreeHelper.GetChild(menuItem, 0) as FrameworkElement;
00813                 var navItemPresenter = VisualTreeHelper.GetChild(menuItemLayoutRoot, 0) as FrameworkElement;
00814                 var navItemPresenterLayoutRoot = VisualTreeHelper.GetChild(navItemPresenter, 0) as FrameworkElement;
00815                 var statesGroups = VisualStateManager.GetVisualStateGroups(navItemPresenterLayoutRoot);
00816
00817                 string navItemPresenter1CurrentState = null;
00818                 foreach (var visualStateGroup in statesGroups)
00819                 {
00820                     if (visualStateGroup.Name == "PaneAndTopLevelItemStates")
00821                     {
00822                         navItemPresenter1CurrentState = visualStateGroup.CurrentState.Name;
00823                     }
00824                 }
00825
00826                 Verify.AreEqual("ClosedCompactAndTopLevelItem", navItemPresenter1CurrentState);
00827             });
00828         }
00829
00830
00831         [TestMethod]
00832         public void VerifyNavigationItemUIAType()
00833         {
00834             RunOnUIThread.Execute(() =>
00835             {
00836                 var navView = new NavigationView();
00837                 Content = navView;
00838
00839                 var menuItem1 = new NavigationViewItem();
00840                 var menuItem2 = new NavigationViewItem();
00841                 menuItem1.Content = "Item 1";
00842                 menuItem2.Content = "Item 2";
00843
00844                 navView.MenuItems.Add(menuItem1);
00845                 navView.MenuItems.Add(menuItem2);
00846                 navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
00847                 Content.UpdateLayout();
00848
00849                 Verify.AreEqual(
00850                     AutomationControlType.ListItem,
00851                     NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetAutomationControlType());
00852                 Verify.IsNull(NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetPattern(PatternInterface.Invoke));
00853
00854                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;
00855                 Content.UpdateLayout();
00856                 Verify.AreEqual(
00857                     AutomationControlType.TabItem,
00858                     NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetAutomationControlType());
00859                 // Tabs should only provide SelectionItem pattern but not Invoke pattern
00860                 Verify.IsNull(NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetPattern(PatternInterface.Invoke));
00861             });
00862         }
00863
00864         [TestMethod]
00865         public void VerifyAutomationPeerExpandCollapsePatternBehavior()
00866         {
00867             RunOnUIThread.Execute(() =>
00868             {
00869
00870                 var menuItem1 = new NavigationViewItem();
00871                 var menuItem2 = new NavigationViewItem();
00872                 var menuItem3 = new NavigationViewItem();
00873                 var menuItem4 = new NavigationViewItem();
00874                 menuItem1.Content = "Item 1";
00875                 menuItem2.Content = "Item 2";
00876                 menuItem3.Content = "Item 3";
00877                 menuItem4.Content = "Item 4";
00878
00879                 menuItem2.MenuItems.Add(menuItem3);
00880                 menuItem4.HasUnrealizedChildren = true;
00881
00882                 var expandPeer = NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem1).GetPattern(PatternInterface.ExpandCollapse);
00883
00884                 Verify.IsNull(expandPeer, "Verify NavigationViewItem with no children has no ExpandCollapse pattern");
00885
00886                 expandPeer = NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem2).GetPattern(PatternInterface.ExpandCollapse);
00887                 Verify.IsNotNull(expandPeer, "Verify NavigationViewItem with children has an ExpandCollapse pattern provided");
00888
00889                 expandPeer = NavigationViewItemAutomationPeer.CreatePeerForElement(menuItem4).GetPattern(PatternInterface.ExpandCollapse);
00890                 Verify.IsNotNull(expandPeer, "Verify NavigationViewItem without children but with UnrealizedChildren set to true has an ExpandCollapse pattern provided");
00891             });
00892         }
00893
00894         [TestMethod]
00895         public void VerifySettingsItemToolTip()
00896         {
00897             RunOnUIThread.Execute(() =>
00898             {
00899                 var navView = new NavigationView();
00900
00901                 navView.IsSettingsVisible = true;
00902                 navView.IsPaneOpen = true;
00903                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
00904                 Content = navView;
00905                 Content.UpdateLayout();
00906                 var settingsItem = (NavigationViewItem)navView.SettingsItem;
00907
00908                 var toolTip = ToolTipService.GetToolTip(settingsItem);
00909                 Verify.IsNull(toolTip, "Verify tooltip is disabled when pane is open");
00910
00911                 navView.IsPaneOpen = false;
00912                 Content.UpdateLayout();
00913
00914                 toolTip = ToolTipService.GetToolTip(settingsItem);
00915                 Verify.IsNotNull(toolTip, "Verify tooltip is enabled when pane is closed");
00916             });
00917         }
00918
00919         [TestMethod]
00920         public void VerifySettingsItemTag()
00921         {
00922             RunOnUIThread.Execute(() =>
00923             {
00924                 var navView = new NavigationView();
00925
00926                 navView.IsSettingsVisible = true;
00927                 navView.IsPaneOpen = true;
00928                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
00929                 Content = navView;
00930                 Content.UpdateLayout();
00931                 var settingsItem = (NavigationViewItem)navView.SettingsItem;
00932                 Verify.AreEqual(settingsItem.Tag, "Settings");
00933             });
00934         }
00935
00936         [TestMethod]
00937         public void VerifyHeaderContentMarginOnTopNav()
00938         {
00939             VerifyHeaderContentMargin(NavigationViewPaneDisplayMode.Top, "VerifyVerifyHeaderContentMarginOnTopNav");
00940         }
00941
00942         [TestMethod]
00943         public void VerifyHeaderContentMarginOnMinimalNav()
00944         {
00945             VerifyHeaderContentMargin(NavigationViewPaneDisplayMode.LeftMinimal, "VerifyVerifyHeaderContentMarginOnMinimalNav");
00946         }
00947
00948         private void VerifyHeaderContentMargin(NavigationViewPaneDisplayMode paneDisplayMode, string verificationFileNamePrefix)
00949         {
00950             UIElement headerContent = null;
00951
00952             RunOnUIThread.Execute(() =>
00953             {
00954                 var navView = new NavigationView() { Header = "HEADER", PaneDisplayMode = paneDisplayMode, Width = 400.0 };
00955                 Content = navView;
00956                 Content.UpdateLayout();
00957                 Grid rootGrid = VisualTreeHelper.GetChild(navView, 0) as Grid;
00958                 if (rootGrid != null)
00959                 {
00960                     headerContent = rootGrid.FindName("HeaderContent") as UIElement;
00961                 }
00962             });
00963
00964             VisualTreeTestHelper.VerifyVisualTree(
00965                 root: headerContent,
00966                 verificationFileNamePrefix: verificationFileNamePrefix);
00967         }
00968
00969         [TestMethod]
00970         public void VerifyMenuItemAndContainerMappingMenuItemsSource()
00971         {
00972             RunOnUIThread.Execute(() =>
00973             {
00974                 var navView = new NavigationView();
00975                 MUXControlsTestApp.App.TestContentRoot = navView;
00976
00977                 navView.MenuItemsSource = new ObservableCollection<string> { "Item 1", "Item 2" };
00978                 navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
00979
00980                 MUXControlsTestApp.App.TestContentRoot.UpdateLayout();
00981
00982                 var menuItem = "Item 2";
00983                 // Get container for item
00984                 var itemContainer = navView.ContainerFromMenuItem(menuItem) as NavigationViewItem;
00985                 bool correctContainerReturned = itemContainer != null && (itemContainer.Content as string) == menuItem;
00986                 Verify.IsTrue(correctContainerReturned, "Correct container should be returned for passed in menu item.");
00987
00988                 // Get item for container
00989                 var returnedItem = navView.MenuItemFromContainer(itemContainer) as string;
00990                 bool correctItemReturned = returnedItem != null && returnedItem == menuItem;
00991                 Verify.IsTrue(correctItemReturned, "Correct item should be returned for passed in container.");
00992
00993                 MUXControlsTestApp.App.TestContentRoot = null;
00994             });
00995         }
00996
00997         [TestMethod]
00998         public void VerifyMenuItemAndContainerMappingMenuItems()
00999         {
01000             RunOnUIThread.Execute(() =>
01001             {
01002                 var navView = new NavigationView();
01003                 MUXControlsTestApp.App.TestContentRoot = navView;
01004
01005                 var menuItem1 = new NavigationViewItem();
01006                 var menuItem2 = new NavigationViewItem();
01007                 menuItem1.Content = "Item 1";
01008                 menuItem2.Content = "Item 2";
01009
01010                 navView.MenuItems.Add(menuItem1);
01011                 navView.MenuItems.Add(menuItem2);
01012                 navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
01013
01014                 MUXControlsTestApp.App.TestContentRoot.UpdateLayout();
01015
01016                 // Get container for item
01017                 var itemContainer = navView.ContainerFromMenuItem(menuItem2) as NavigationViewItem;
01018                 bool correctContainerReturned = itemContainer != null && itemContainer == menuItem2;
01019                 Verify.IsTrue(correctContainerReturned, "Correct container should be returned for passed in menu item.");
01020
01021                 // Get item for container
01022                 var returnedItem = navView.MenuItemFromContainer(menuItem2) as NavigationViewItem;
01023                 bool correctItemReturned = returnedItem != null && returnedItem == menuItem2;
01024                 Verify.IsTrue(correctItemReturned, "Correct item should be returned for passed in container.");
01025
01026                 // Try to get an item that is not in the NavigationView
01027                 NavigationViewItem menuItem3 = new NavigationViewItem();
01028                 menuItem3.Content = "Item 3";
01029                 var returnedItemForNonExistentContainer = navView.MenuItemFromContainer(menuItem3);
01030                 Verify.IsTrue(returnedItemForNonExistentContainer == null, "Returned item should be null.");
01031
01032                 MUXControlsTestApp.App.TestContentRoot = null;
01033             });
01034         }
01035
01036         [TestMethod]
01037         public void VerifySelectedItemIsNullWhenNoItemIsSelected()
01038         {
01039             RunOnUIThread.Execute(() =>
01040             {
01041                 var navView = new NavigationView();
01042                 Content = navView;
01043
01044                 var menuItem1 = new NavigationViewItem();
01045                 menuItem1.Content = "Item 1";
01046
01047                 navView.MenuItems.Add(menuItem1);
01048                 navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
01049                 Content.UpdateLayout();
01050
01051                 Verify.IsFalse(menuItem1.IsSelected);
01052                 Verify.AreEqual(null, navView.SelectedItem);
01053
01054                 menuItem1.IsSelected = true;
01055                 Content.UpdateLayout();
01056
01057                 Verify.IsTrue(menuItem1.IsSelected);
01058                 Verify.AreEqual(menuItem1, navView.SelectedItem);
01059
01060                 menuItem1.IsSelected = false;
01061                 Content.UpdateLayout();
01062
01063                 Verify.IsFalse(menuItem1.IsSelected);
01064                 Verify.AreEqual(null, navView.SelectedItem, "SelectedItem should have been [null] as no item is selected");
01065             });
01066         }
01067
01068         [TestMethod]
01069         public void VerifyNavigationViewItemInFooterDoesNotCrash()
01070         {
01071             RunOnUIThread.Execute(() =>
01072             {
01073                 var navView = new NavigationView();
01074
01075                 Content = navView;
01076
01077                 var navViewItem = new NavigationViewItem() { Content = "Footer item" };
01078
01079                 navView.PaneFooter = navViewItem;
01080
01081                 navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
01082                 Content.UpdateLayout();
01083
01084                 // If we don't get here, app has crashed. This verify is just making sure code got run
01085                 Verify.IsTrue(true);
01086             });
01087         }
01088
01089         [TestMethod]
01090         public void VerifyExpandCollapseChevronVisibility()
01091         {
01092             NavigationView navView = null;
01093             NavigationViewItem parentItem = null;
01094             ObservableCollection<string> children = null;
01095
01096             RunOnUIThread.Execute(() =>
01097             {
01098                 navView = new NavigationView();
01099                 Content = navView;
01100
01101                 children = new ObservableCollection<string>();
01102                 parentItem = new NavigationViewItem() { Content = "ParentItem", MenuItemsSource = children };
01103
01104                 navView.MenuItems.Add(parentItem);
01105
01106                 navView.Width = 1008; // forces the control into Expanded mode so that the menu renders
01107                 Content.UpdateLayout();
01108
01109                 UIElement chevronUIElement = (UIElement)VisualTreeUtils.FindVisualChildByName(parentItem, "ExpandCollapseChevron");
01110                 Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem has no children");
01111
01112                 // Add a child to parentItem through the MenuItemsSource API. This should make the chevron visible.
01113                 children.Add("Child 1");
01114                 Content.UpdateLayout();
01115
01116                 Verify.IsTrue(chevronUIElement.Visibility == Visibility.Visible, "chevron should have been visible as NavViewItem now has children");
01117
01118                 // Remove all children of parentItem. This should collapse the chevron
01119                 children.Clear();
01120                 Content.UpdateLayout();
01121
01122                 Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem no longer has children");
01123
01124                 // Add a child to parentItem and set the MenuItemsSource as null. This should collapse the chevron
01125                 children.Add("Child 2");
01126                 Content.UpdateLayout();
01127
01128                 // we are doing this so that when we set MenuItemsSource as null, we can check if the chevron's visibility really changes
01129                 Verify.IsTrue(chevronUIElement.Visibility == Visibility.Visible, "chevron should have been visible as NavViewItem now has children");
01130
01131                 parentItem.MenuItemsSource = null;
01132                 Content.UpdateLayout();
01133
01134                 Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem no longer has children");
01135
01136                 // Add a child to parentItem through the MenuItems API. This should make the chevron visible.
01137                 parentItem.MenuItems.Add(new NavigationViewItem() { Content = "Child 3" });
01138                 Content.UpdateLayout();
01139
01140                 Verify.IsTrue(chevronUIElement.Visibility == Visibility.Visible, "chevron should have been visible as NavViewItem now has children");
01141
01142                 // Remove all children of parentItem. This should collapse the chevron
01143                 parentItem.MenuItems.Clear();
01144                 Content.UpdateLayout();
01145
01146                 Verify.IsTrue(chevronUIElement.Visibility == Visibility.Collapsed, "chevron should have been collapsed as NavViewItem no longer has children");
01147             });
01148         }
01149
01150         [TestMethod]
01151         public void VerifyOverflowButtonToolTip()
01152         {
01153             RunOnUIThread.Execute(() =>
01154             {
01155                 var navView = new NavigationView();
01156                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;
01157
01158                 Content = navView;
01159                 Content.UpdateLayout();
01160
01161                 var overflowButton = VisualTreeUtils.FindVisualChildByName(navView, "TopNavOverflowButton") as Button;
01162                 var toolTipObject = ToolTipService.GetToolTip(overflowButton);
01163
01164                 bool testCondition = toolTipObject is ToolTip toolTip && toolTip.Content.Equals("More");
01165                 Verify.IsTrue(testCondition, "ToolTip text should have been \"More\".");
01166             });
01167         }
01168
01169         [TestMethod]
01170         public void VerifyClearingItemsCollectionDoesNotCrashWhenItemSelectedOnTopNav()
01171         {
01172             RunOnUIThread.Execute(() =>
01173             {
01174                 var navView = new NavigationView();
01175                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;
01176
01177                 var navViewItem1 = new NavigationViewItem() { Content = "MenuItem 1", };
01178                 var navViewItem2 = new NavigationViewItem() { Content = "MenuItem 2" };
01179
01180                 Log.Comment("Set up the MenuItems collection");
01181                 navView.MenuItems.Add(navViewItem1);
01182                 navView.MenuItems.Add(navViewItem2);
01183
01184                 Content = navView;
01185                 Content.UpdateLayout();
01186
01187                 Log.Comment("Set MenuItem 1 as selected");
01188                 navView.SelectedItem = navViewItem1;
01189                 Verify.AreEqual(navViewItem1, navView.SelectedItem, "MenuItem 1 should have been selected");
01190
01191                 // Clearing the MenuItems collection should not crash the app
01192                 Log.Comment("Clear the MenuItems collection");
01193                 navView.MenuItems.Clear();
01194
01195                 Log.Comment("Set up the MenuItemsSource collection");
01196                 var itemsSource = new ObservableCollection<NavigationViewItem>() { navViewItem1, navViewItem2 };
01197                 navView.MenuItemsSource = itemsSource;
01198
01199                 Content.UpdateLayout();
01200
01201                 Log.Comment("Set MenuItem 1 as selected");
01202                 navView.SelectedItem = navViewItem1;
01203                 Verify.AreEqual(navViewItem1, navView.SelectedItem, "MenuItem 1 should have been selected");
01204
01205                 // Clearing the MenuItemsSource collection should not crash the app
01206                 Log.Comment("Clear the MenuItemsSource collection");
01207                 itemsSource.Clear();
01208             });
01209         }
01210
01211         [TestMethod]
01212         public void VerifyHierarchicalNavigationTopModeMenuItemsSourceDoesNotCrash()
01213         {
01214             RunOnUIThread.Execute(() =>
01215             {
01216                 var navView = new NavigationView();
01217                 Content = navView;
01218
01219                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Top;
01220
01221                 var childItem = new NavigationViewItem() { Content = "Item 1.1" };
01222                 var parentItem = new NavigationViewItem() { Content = "Item 1", MenuItemsSource = new ObservableCollection<NavigationViewItem>() { childItem } };
01223                 navView.MenuItemsSource = new ObservableCollection<NavigationViewItem>() { parentItem };
01224
01225                 Content.UpdateLayout();
01226             });
01227         }
01228
01229         [TestMethod]
01230         public void VerifyNavigationViewItemToolTipCreation()
01231         {
01232             if (!PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone5))
01233             {
01234                 Log.Warning("On RS4 and earlier the test needs to be modified slightly.");
01235                 return;
01236             }
01237
01238             RunOnUIThread.Execute(() =>
01239             {
01240                 var navView = new NavigationView();
01241
01242                 // Item with null content
01243                 var menuItem1 = new NavigationViewItem();
01244
01245                 // Item with empty string as content
01246                 var menuItem2 = new NavigationViewItem();
01247                 menuItem2.Content = "";
01248
01249                 // Item with null content and custom tooltip
01250                 var menuItem3 = new NavigationViewItem();
01251                 ToolTipService.SetToolTip(menuItem3, "Custom tooltip");
01252
01253                 // Item with non-empty string content
01254                 var menuItem4 = new NavigationViewItem();
01255                 menuItem4.Content = "Item 4";
01256
01257                 navView.MenuItems.Add(menuItem1);
01258                 navView.MenuItems.Add(menuItem2);
01259                 navView.MenuItems.Add(menuItem3);
01260                 navView.MenuItems.Add(menuItem4);
01261
01262                 // Use a pane configuration where tooltips are shown.
01263                 navView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
01264                 navView.IsPaneOpen = false;
01265
01266                 Content = navView;
01267                 navView.UpdateLayout();
01268
01269                 Verify.AreEqual(null, ToolTipService.GetToolTip(menuItem1), "Item 1's tooltip should have been [null].");
01270                 Verify.AreEqual(null, ToolTipService.GetToolTip(menuItem2), "Item 2's tooltip should have been [null].");
01271                 Verify.AreEqual("Custom tooltip", ToolTipService.GetToolTip(menuItem3), "Item 3's tooltip should have been \"Custom tooltip\".");
01272                 Verify.AreEqual("Item 4", ToolTipService.GetToolTip(menuItem4), "Item 4's tooltip should have been  \"Item 4\".");
01273             });
01274         }
01275
01276         [TestMethod]
01277         public void VerifyNavigationViewItemToolTipPaneDisplayMode()
01278         {
01279             if (!PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone5))
01280             {
01281                 Log.Warning("On RS4 and earlier the test needs to be modified slightly.");
01282                 return;
01283             }
01284
01285             RunOnUIThread.Execute(() =>
01286             {
01287                 var navView = new NavigationView();
01288
01289                 // Item with non-empty string content using in-built tooltip
01290                 var menuItem1 = new NavigationViewItem();
01291                 menuItem1.Content = "Item 1";
01292
01293                 // Item with custom tooltip
01294                 var menuItem2 = new NavigationViewItem();
01295                 menuItem2.Content = "Item 2";
01296                 ToolTipService.SetToolTip(menuItem2, "Custom tooltip");
01297
01298                 navView.MenuItems.Add(menuItem1);
01299                 navView.MenuItems.Add(menuItem2);
01300
01301                 Content = navView;
01302
01303                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");
01304                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, true, null, "Custom tooltip");
01305
01306                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.LeftCompact, false, "Item 1", "Custom tooltip");
01307                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.LeftCompact, true, null, "Custom tooltip");
01308
01309                 // Show tooltips again
01310                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");
01311
01312                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.LeftMinimal, true, null, "Custom tooltip");
01313
01314                 // Show tooltips again
01315                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");
01316
01317                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Top, false, null, "Custom tooltip");
01318
01319                 // Show tooltips again
01320                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Left, false, "Item 1", "Custom tooltip");
01321
01322                 SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode.Top, true, null, "Custom tooltip");
01323
01324                 void SetPaneConfigAndVerifyToolTips(NavigationViewPaneDisplayMode paneDisplayMode, bool isPaneOpen, string expectedDefaultToolTip, string expectedCustomToolTip)
01325                 {
01326                     Log.Comment($"Verifying tooltips with PaneDisplayMode=[{paneDisplayMode}] and IsPaneOpen=[{isPaneOpen}]");
01327                     navView.PaneDisplayMode = paneDisplayMode;
01328                     navView.IsPaneOpen = isPaneOpen;
01329                     Content.UpdateLayout();
01330
01331                     Verify.AreEqual(expectedDefaultToolTip, ToolTipService.GetToolTip(menuItem1), $"Item 1's tooltip should have been \"{expectedDefaultToolTip ?? "null"}\".");
01332                     Verify.AreEqual(expectedCustomToolTip, ToolTipService.GetToolTip(menuItem2), $"Item 2's tooltip should have been {expectedCustomToolTip}.");
01333                 }
01334             });
01335         }
01336
01337         [TestMethod]
01338         public void VerifyNVIOutlivingNVDoesNotCrash()
01339         {
01340             NavigationViewItem menuItem1 = null;
01341             RunOnUIThread.Execute(() =>
01342             {
01343                 var navView = new NavigationView();
01344                 menuItem1 = new NavigationViewItem();
01345
01346                 navView.MenuItems.Add(menuItem1);
01347                 Content = navView;
01348                 Content.UpdateLayout();
01349
01350                 navView.MenuItems.Clear();
01351                 Content = menuItem1;
01352                 Content.UpdateLayout();
01353             });
01354
01355             IdleSynchronizer.Wait();
01356
01357             RunOnUIThread.Execute(() =>
01358             {
01359                 GC.Collect();
01360             });
01361
01362             IdleSynchronizer.Wait();
01363
01364             RunOnUIThread.Execute(() =>
01365             {
01366                 // NavigationView has a handler on NVI's IsSelected DependencyPropertyChangedEvent.
01367                 menuItem1.IsSelected = !menuItem1.IsSelected;
01368             });
01369         }
01370
01371         [TestMethod]
01372         public void VerifySelectingACollapsedItemShowsSelectionIndicator()
01373         {
01374             NavigationView navView = null;
01375
01376             ObservableCollection<Category> subCategories = null;
01377             Category firstItem = null;
01378             Category secondItem = null;
01379             Category subItem = null;
01380
01381             ManualResetEvent loadedEvent = new(false);
01382             ManualResetEvent selectionChangedEvent = new(false);
01383
01384             RunOnUIThread.Execute(() =>
01385             {
01386                 subItem = new("Menu Item 3", "MI3", "Icon", null, true);
01387
01388                 subCategories = new ObservableCollection<Category> {
01389                     subItem
01390                 };
01391
01392                 firstItem = new("Menu Item 1", "MI1", "Icon", null, true);
01393                 secondItem = new("Menu Item 2", "MI2", "Icon", subCategories, false);
01394
01395                 var categories = new ObservableCollection<Category> {
01396                     firstItem,
01397                     secondItem
01398                 };
01399
01400                 navView = new NavigationView {
01401                     MenuItemsSource = categories,
01402                     MenuItemTemplate = (DataTemplate)XamlReader.Load(@"
01403 <DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
01404   <NavigationViewItem Content='{Binding Content}' Name='{Binding Name}' MenuItemsSource='{Binding Children}' SelectsOnInvoked='{Binding SelectsOnInvoked}'/>
01405 </DataTemplate>")
01406                 };
01407
01408                 navView.Loaded += (sender, args) => loadedEvent.Set();
01409                 navView.SelectionChanged += (sender, args) => selectionChangedEvent.Set();
01410                 Content = navView;
01411             });
01412
01413             loadedEvent.WaitOne();
01414             IdleSynchronizer.Wait();
01415
01416             SelectItem(navView, subItem, selectionChangedEvent);
01417             Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 2"));
01418             SelectItem(navView, firstItem, selectionChangedEvent);
01419             Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 1"));
01420
01421             Category newItem = null;
01422
01423             RunOnUIThread.Execute(() =>
01424             {
01425                 newItem = new("Menu Item 4", "MI4", "Icon", null, true);
01426                 subCategories.Add(newItem);
01427             });
01428
01429             SelectItem(navView, newItem, selectionChangedEvent);
01430             Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 2"));
01431             SelectItem(navView, firstItem, selectionChangedEvent);
01432             Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 1"));
01433
01434             RunOnUIThread.Execute(() =>
01435             {
01436                 var secondItemNvi = (NavigationViewItem)navView.ContainerFromMenuItem(secondItem);
01437                 secondItemNvi.IsExpanded = true;
01438             });
01439
01440             IdleSynchronizer.Wait();
01441
01442             selectionChangedEvent.Reset();
01443
01444             RunOnUIThread.Execute(() =>
01445             {
01446                 Category newItem2 = new("Menu Item 5", "MI5", "Icon", null, true);
01447                 subCategories.Add(newItem2);
01448                 // This doesn't use SelectItem. I'm guessing we're testing for adding an item and immediately selecting
01449                 // it, rather than waiting for it to render first.
01450                 navView.SelectedItem = newItem2;
01451             });
01452
01453             selectionChangedEvent.WaitOne();
01454             IdleSynchronizer.Wait();
01455
01456             // Disabled - see Bug 50123187: NavigationViewTests.VerifySelectingACollapsedItemShowsSelectionIndicator is unstable
01457             //Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 5"));
01458         }
01459
01460         [TestMethod]
01461         public void VerifyContainerIsNonNullWhenSelectingANewlyAddedItem()
01462         {
01463             NavigationView navView = null;
01464
01465             ObservableCollection<Category> subCategories = null;
01466             Category firstItem = null;
01467             Category secondItem = null;
01468             Category subItem = null;
01469
01470             ManualResetEvent loadedEvent = new(false);
01471             ManualResetEvent selectionChangedEvent = new(false);
01472
01473             Action<NavigationViewSelectionChangedEventArgs> selectionChangedVerification = null;
01474
01475             RunOnUIThread.Execute(() =>
01476             {
01477                 subItem = new("Menu Item 3", "MI3", "Icon", null, true);
01478
01479                 subCategories = new ObservableCollection<Category> {
01480                     subItem
01481                 };
01482
01483                 firstItem = new("Menu Item 1", "MI1", "Icon", null, true);
01484                 secondItem = new("Menu Item 2", "MI2", "Icon", subCategories, false);
01485
01486                 var categories = new ObservableCollection<Category> {
01487                     firstItem,
01488                     secondItem
01489                 };
01490
01491                 navView = new NavigationView {
01492                     MenuItemsSource = categories,
01493                     MenuItemTemplate = (DataTemplate)XamlReader.Load(@"
01494 <DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
01495   <NavigationViewItem Content='{Binding Content}' Name='{Binding Name}' MenuItemsSource='{Binding Children}' SelectsOnInvoked='{Binding SelectsOnInvoked}'/>
01496 </DataTemplate>")
01497                 };
01498
01499                 navView.Loaded += (sender, args) => loadedEvent.Set();
01500
01501                 navView.SelectionChanged += (sender, args) =>
01502                 {
01503                     selectionChangedVerification?.Invoke(args);
01504                     selectionChangedEvent.Set();
01505                 };
01506
01507                 Content = navView;
01508             });
01509
01510             loadedEvent.WaitOne();
01511             IdleSynchronizer.Wait();
01512
01513             selectionChangedVerification = (args) =>
01514             {
01515                 Verify.IsNotNull(args.SelectedItemContainer);
01516                 Verify.AreEqual(subItem.Content, args.SelectedItemContainer.Content);
01517             };
01518
01519             SelectItem(navView, subItem, selectionChangedEvent);
01520
01521             Category newItem = null;
01522
01523             RunOnUIThread.Execute(() =>
01524             {
01525                 newItem = new("Menu Item 4", "MI4", "Icon", null, true);
01526                 subCategories.Add(newItem);
01527             });
01528
01529             selectionChangedVerification = (args) =>
01530             {
01531                 Verify.IsNotNull(args.SelectedItemContainer);
01532                 Verify.AreEqual(newItem.Content, args.SelectedItemContainer.Content);
01533             };
01534
01535             SelectItem(navView, newItem, selectionChangedEvent);
01536
01537             ManualResetEvent expandedEvent = new(false);
01538
01539             RunOnUIThread.Execute(() =>
01540             {
01541                 var secondItemNvi = (NavigationViewItem)navView.ContainerFromMenuItem(secondItem);
01542
01543                 var itemRepeater = GetRepeater(secondItemNvi);
01544                 itemRepeater.ElementPrepared += (sender, args) =>
01545                 {
01546                     if (((NavigationViewItem)args.Element).Content == "Menu Item 4")
01547                     {
01548                         expandedEvent.Set();
01549                     }
01550                 };
01551
01552                 secondItemNvi.IsExpanded = true;
01553             });
01554
01555             expandedEvent.WaitOne();
01556             IdleSynchronizer.Wait();
01557
01558             RunOnUIThread.Execute(() =>
01559             {
01560                 Category newItem2 = new("Menu Item 5", "MI5", "Icon", null, true);
01561                 subCategories.Add(newItem2);
01562
01563                 selectionChangedVerification = (args) =>
01564                 {
01565                     Verify.IsNotNull(args.SelectedItemContainer);
01566                     Verify.AreEqual(newItem2.Content, args.SelectedItemContainer.Content);
01567                 };
01568
01569                 selectionChangedEvent.Reset();
01570                 navView.SelectedItem = newItem2;
01571             });
01572
01573             selectionChangedEvent.WaitOne();
01574             IdleSynchronizer.Wait();
01575         }
01576
01577         [TestMethod]
01578         public void VerifySelectingANewItemAfterExpandingShowsSelectionIndicatorInTheCorrectLocation()
01579         {
01580             NavigationView navView = null;
01581
01582             ObservableCollection<Category> subCategories = null;
01583             Category firstItem = null;
01584             Category secondItem = null;
01585
01586             ManualResetEvent loadedEvent = new(false);
01587             ManualResetEvent selectionChangedEvent = new(false);
01588
01589             RunOnUIThread.Execute(() =>
01590             {
01591                 ObservableCollection<Category> subSubCategories = new ObservableCollection<Category> {
01592                     new("Menu Item 6", "MI6", "Icon", null, true)
01593                 };
01594
01595                 subCategories = new ObservableCollection<Category> {
01596                     new("Menu Item 3", "MI3", "Icon", null, true),
01597                     new("Menu Item 4", "MI4", "Icon", subSubCategories, false),
01598                     new("Menu Item 5", "MI5", "Icon", null, true),
01599                 };
01600
01601                 firstItem = new("Menu Item 1", "MI1", "Icon", null, true);
01602                 secondItem = new("Menu Item 2", "MI2", "Icon", subCategories, false);
01603
01604                 var categories = new ObservableCollection<Category> {
01605                     firstItem,
01606                     secondItem
01607                 };
01608
01609                 navView = new NavigationView {
01610                     MenuItemsSource = categories,
01611                     MenuItemTemplate = (DataTemplate)XamlReader.Load(@"
01612 <DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
01613   <NavigationViewItem Content='{Binding Content}' Name='{Binding Name}' MenuItemsSource='{Binding Children}' SelectsOnInvoked='{Binding SelectsOnInvoked}'/>
01614 </DataTemplate>")
01615                 };
01616
01617                 navView.Loaded += (sender, args) => loadedEvent.Set();
01618                 navView.SelectionChanged += (sender, args) => selectionChangedEvent.Set();
01619                 Content = navView;
01620             });
01621
01622             loadedEvent.WaitOne();
01623             IdleSynchronizer.Wait();
01624
01625             Category newItem = null;
01626
01627             RunOnUIThread.Execute(() =>
01628             {
01629                 newItem = new("Menu Item 7", "MI7", "Icon", null, true);
01630                 subCategories.Add(newItem);
01631                 navView.SelectedItem = newItem;
01632
01633                 var secondItemNvi = (NavigationViewItem)navView.ContainerFromMenuItem(secondItem);
01634                 secondItemNvi.IsExpanded = true;
01635             });
01636
01637             selectionChangedEvent.WaitOne();
01638             IdleSynchronizer.Wait();
01639
01640             Verify.IsTrue(ItemHasSelectionIndicator(navView, "Menu Item 7"));
01641         }
01642
01643         static ItemsRepeater GetRepeater(DependencyObject parent)
01644         {
01645             static ItemsRepeater GetNavigationViewRepeaterHelper(DependencyObject root)
01646             {
01647                 if (root is ItemsRepeater itemsRepeater &&
01648                     (itemsRepeater.Name == "MenuItemsHost" ||
01649                     itemsRepeater.Name == "NavigationViewItemMenuItemsHost"))
01650                 {
01651                     return itemsRepeater;
01652                 }
01653
01654                 for (int i = 0; i < VisualTreeHelper.GetChildrenCount(root); i++)
01655                 {
01656                     var repeater = GetNavigationViewRepeaterHelper(VisualTreeHelper.GetChild(root, i));
01657
01658                     if (repeater != null)
01659                     {
01660                         return repeater;
01661                     }
01662                 }
01663
01664                 return null;
01665             }
01666
01667             return GetNavigationViewRepeaterHelper(parent);
01668         }
01669
01670         static bool ItemHasSelectionIndicator(NavigationView navView, string expectedContent)
01671         {
01672             static bool ItemHasSelectionIndicatorHelper(DependencyObject root, string expectedContent, NavigationViewItemBase lastSeenItem)
01673             {
01674                 if (root is Rectangle possibleSelectionIndicator &&
01675                     possibleSelectionIndicator.Name == "SelectionIndicator" &&
01676                     possibleSelectionIndicator.Opacity > 0 &&
01677                     lastSeenItem.Content == expectedContent)
01678                 {
01679                     return true;
01680                 }
01681                 else if (root is NavigationViewItemBase item)
01682                 {
01683                     lastSeenItem = item;
01684                 }
01685
01686                 for (int i = 0; i < VisualTreeHelper.GetChildrenCount(root); i++)
01687                 {
01688                     var hasSelectionIndicator = ItemHasSelectionIndicatorHelper(VisualTreeHelper.GetChild(root, i), expectedContent, lastSeenItem);
01689
01690                     if (hasSelectionIndicator)
01691                     {
01692                         return true;
01693                     }
01694                 }
01695
01696                 return false;
01697             }
01698
01699             bool hasSelectionIndicator = false;
01700
01701             RunOnUIThread.Execute(() =>
01702             {
01703                 hasSelectionIndicator = ItemHasSelectionIndicatorHelper(navView, expectedContent, null);
01704             });
01705
01706             return hasSelectionIndicator;
01707         }
01708
01709         static void SelectItem(NavigationView navView, object item, ManualResetEvent selectionChangedEvent = null)
01710         {
01711             IdleSynchronizer.Wait();
01712
01713             if (selectionChangedEvent != null)
01714             {
01715                 selectionChangedEvent.Reset();
01716             }
01717
01718             RunOnUIThread.Execute(() =>
01719             {
01720                 navView.SelectedItem = item;
01721             });
01722
01723             if (selectionChangedEvent != null)
01724             {
01725                 selectionChangedEvent.WaitOne();
01726             }
01727
01728             IdleSynchronizer.Wait();
01729         }
01730     }
01731 }
Generated on Sun Dec 1 2024 20:52:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTemplateSettingsProperties Member List

This is the complete list of members for NavigationViewTemplateSettingsProperties, including all inherited members.
BackButtonVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
BackButtonVisibility() | NavigationViewTemplateSettingsProperties |
BackButtonVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
ClearProperties() | NavigationViewTemplateSettingsProperties | [static]
EnsureProperties() | NavigationViewTemplateSettingsProperties | [static]
LeftPaneVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
LeftPaneVisibility() | NavigationViewTemplateSettingsProperties |
LeftPaneVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
NavigationViewTemplateSettingsProperties() | NavigationViewTemplateSettingsProperties |
OpenPaneLength(double value) | NavigationViewTemplateSettingsProperties |
OpenPaneLength() | NavigationViewTemplateSettingsProperties |
OpenPaneLengthProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
OverflowButtonVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
OverflowButtonVisibility() | NavigationViewTemplateSettingsProperties |
OverflowButtonVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
PaneToggleButtonVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
PaneToggleButtonVisibility() | NavigationViewTemplateSettingsProperties |
PaneToggleButtonVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
PaneToggleButtonWidth(double value) | NavigationViewTemplateSettingsProperties |
PaneToggleButtonWidth() | NavigationViewTemplateSettingsProperties |
PaneToggleButtonWidthProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
s_BackButtonVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_LeftPaneVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_OpenPaneLengthProperty | NavigationViewTemplateSettingsProperties | [static]
s_OverflowButtonVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_PaneToggleButtonVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
s_PaneToggleButtonWidthProperty | NavigationViewTemplateSettingsProperties | [static]
s_SingleSelectionFollowsFocusProperty | NavigationViewTemplateSettingsProperties | [static]
s_SmallerPaneToggleButtonWidthProperty | NavigationViewTemplateSettingsProperties | [static]
s_TopPaddingProperty | NavigationViewTemplateSettingsProperties | [static]
s_TopPaneVisibilityProperty | NavigationViewTemplateSettingsProperties | [static]
SingleSelectionFollowsFocus(bool value) | NavigationViewTemplateSettingsProperties |
SingleSelectionFollowsFocus() | NavigationViewTemplateSettingsProperties |
SingleSelectionFollowsFocusProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
SmallerPaneToggleButtonWidth(double value) | NavigationViewTemplateSettingsProperties |
SmallerPaneToggleButtonWidth() | NavigationViewTemplateSettingsProperties |
SmallerPaneToggleButtonWidthProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
TopPadding(double value) | NavigationViewTemplateSettingsProperties |
TopPadding() | NavigationViewTemplateSettingsProperties |
TopPaddingProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
TopPaneVisibility(winrt::Visibility const &value) | NavigationViewTemplateSettingsProperties |
TopPaneVisibility() | NavigationViewTemplateSettingsProperties |
TopPaneVisibilityProperty() | NavigationViewTemplateSettingsProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewNode.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewNode.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeViewNode.h"
00007 #include "Vector.h"
00008 #include "VectorChangedEventArgs.h"
00009
00010 using TreeNodeSelectionState = TreeViewNode::TreeNodeSelectionState;
00011
00012 TreeViewNode::TreeViewNode()
00013 {
00014     EnsureProperties();
00015     auto collection = winrt::make_self<TreeViewNodeVector>();
00016     collection->SetParent(*this);
00017     m_children.set(*collection);
00018     m_children.get().as<winrt::IObservableVector<winrt::TreeViewNode>>().VectorChanged({ this, &TreeViewNode::ChildVectorChanged });
00019 }
00020
00021 winrt::TreeViewNode TreeViewNode::Parent()
00022 {
00023     return get_ParentImpl();
00024 }
00025
00026 winrt::TreeViewNode TreeViewNode::get_ParentImpl()
00027 {
00028     return m_parentNode ? m_parentNode.get() : nullptr;
00029 }
00030
00031 void TreeViewNode::put_ParentImpl(winrt::TreeViewNode const& value)
00032 {
00033     if (value != nullptr)
00034     {
00035         m_parentNode = winrt::make_weak(value);
00036     }
00037     else
00038     {
00039         m_parentNode = nullptr;
00040     }
00041
00042     //A parentless node has a depth of -1, and the first level of visible nodes in
00043     // the tree view will have a depth of 0 (-1 + 1);
00044     UpdateDepth(value ? value.Depth() + 1 : -1);
00045 }
00046
00047 bool TreeViewNode::HasUnrealizedChildren()
00048 {
00049     return m_HasUnrealizedChildren;
00050 }
00051
00052 void TreeViewNode::HasUnrealizedChildren(bool value)
00053 {
00054     m_HasUnrealizedChildren = value;
00055     UpdateHasChildren();
00056 }
00057
00058 winrt::IVector<winrt::TreeViewNode> TreeViewNode::Children()
00059 {
00060     auto x = m_children.get();
00061     return x;
00062 }
00063
00064 bool TreeViewNode::IsContentMode()
00065 {
00066     return m_isContentMode;
00067 }
00068
00069 void TreeViewNode::IsContentMode(bool value)
00070 {
00071     m_isContentMode = value;
00072 }
00073
00074 TreeNodeSelectionState TreeViewNode::SelectionState()
00075 {
00076     return m_multiSelectionState;
00077 }
00078
00079 void TreeViewNode::SelectionState(TreeNodeSelectionState const& state)
00080 {
00081     m_multiSelectionState = state;
00082 }
00083
00084 void TreeViewNode::UpdateDepth(int depth)
00085 {
00086     // Update our depth
00087     SetValue(s_DepthProperty, box_value(depth));
00088
00089     // Update children's depth
00090     for (auto const& childInspectable : Children())
00091     {
00092         auto childNode = childInspectable.as<winrt::TreeViewNode>();
00093         winrt::get_self<TreeViewNode>(childNode)->UpdateDepth(depth + 1);
00094     }
00095 }
00096
00097 void TreeViewNode::UpdateHasChildren()
00098 {
00099     bool hasChildren = ((Children().Size() != 0) || m_HasUnrealizedChildren);
00100     SetValue(s_HasChildrenProperty, box_value(hasChildren));
00101 }
00102
00103 void TreeViewNode::ChildVectorChanged(winrt::IObservableVector<winrt::TreeViewNode> const& sender, winrt::IInspectable const& args)
00104 {
00105     // We can end up in a state where the TreeViewNode has not yet been destroyed but it is no longer 'reachable' via
00106     // tracker references. In this state tracker_refs do not resolve. So we check for this before handling the event.
00107     if(auto children = m_children.safe_get())
00108     {
00109         const auto wArgs = args.as<winrt::IVectorChangedEventArgs>();
00110         const winrt::CollectionChange collectionChange = wArgs.CollectionChange();
00111         const unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index();
00112         UpdateHasChildren();
00113         RaiseChildrenChanged(collectionChange, index);
00114     }
00115 }
00116
00117 void TreeViewNode::OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00118 {
00119     winrt::IDependencyProperty property = args.Property();
00120     m_propertyChangedEventSource(*this, args);
00121 }
00122
00123 winrt::event_token TreeViewNode::AddExpandedChanged(winrt::TypedEventHandler<winrt::TreeViewNode, winrt::DependencyPropertyChangedEventArgs> const& value)
00124 {
00125     winrt::event_token token = m_propertyChangedEventSource.add(value);
00126     return token;
00127 }
00128
00129 void TreeViewNode::RemoveExpandedChanged(winrt::event_token token)
00130 {
00131     m_propertyChangedEventSource.remove(token);
00132 }
00133
00134 winrt::event_token TreeViewNode::ChildrenChanged(winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IVectorChangedEventArgs> const& value)
00135 {
00136     winrt::event_token token = m_childrenChangedSource.add(value);
00137     return token;
00138 }
00139
00140 void TreeViewNode::ChildrenChanged(winrt::event_token token)
00141 {
00142     m_childrenChangedSource.remove(token);
00143 }
00144
00145 void TreeViewNode::RaiseChildrenChanged(winrt::CollectionChange CC, unsigned int index)
00146 {
00147     auto args = winrt::make<VectorChangedEventArgs>(CC, index);
00148     m_childrenChangedSource(*this, args);
00149 }
00150
00151 winrt::IInspectable TreeViewNode::ItemsSource()
00152 {
00153     return m_itemsSource.get();
00154 }
00155
00156 void TreeViewNode::ItemsSource(winrt::IInspectable const& value)
00157 {
00158     m_itemItemsSourceViewChangedRevoker.revoke();
00159     m_itemsSource.set(value);
00160     m_itemsDataSource = value ? winrt::ItemsSourceView(value) : nullptr;
00161     if (m_itemsDataSource)
00162     {
00163         m_itemItemsSourceViewChangedRevoker = m_itemsDataSource.CollectionChanged(winrt::auto_revoke, { this, &TreeViewNode::OnItemsSourceChanged });
00164     }
00165     SyncChildrenNodesWithItemsSource();
00166 }
00167
00168 void TreeViewNode::OnItemsSourceChanged(const winrt::IInspectable& sender, const winrt::NotifyCollectionChangedEventArgs& args)
00169 {
00170     // We can end up in a state where the TreeViewNode has not yet been destroyed but it is no longer 'reachable' via
00171     // tracker references. In this state tracker_refs do not resolve. So we check for this before handling the event.
00172     if(auto children = m_children.safe_get())
00173     {
00174         switch (args.Action())
00175         {
00176         case winrt::NotifyCollectionChangedAction::Add:
00177         {
00178             // TreeViewNode and ItemsSource will update each other when data changes.
00179             // For ItemsSource -> TreeViewNode changes, m_itemsDataSource.Count() > Children().Size()
00180             // We'll add the new node to children collection.
00181             // For TreeViewNode -> ItemsSource changes, m_itemsDataSource.Count() == Children().Size()
00182             // the node is already in children collection, we don't want to update TreeViewNode again here.
00183             if (m_itemsDataSource.Count() != static_cast<int>(Children().Size()))
00184             {
00185                 AddToChildrenNodes(args.NewStartingIndex(), args.NewItems().Size());
00186             }
00187             break;
00188         }
00189
00190         case winrt::NotifyCollectionChangedAction::Remove:
00191         {
00192             // TreeViewNode and ItemsSource will update each other when data changes.
00193             // For ItemsSource -> TreeViewNode changes, m_itemsDataSource.Count() < Children().Size()
00194             // We'll remove the node from children collection.
00195             // For TreeViewNode -> ItemsSource changes, m_itemsDataSource.Count() == Children().Size()
00196             // the node is already removed, we don't want to update TreeViewNode again here.
00197             if (m_itemsDataSource.Count() != static_cast<int>(Children().Size()))
00198             {
00199                 RemoveFromChildrenNodes(args.OldStartingIndex(), args.OldItems().Size());
00200             }
00201             break;
00202         }
00203
00204         case winrt::NotifyCollectionChangedAction::Reset:
00205         {
00206             SyncChildrenNodesWithItemsSource();
00207             break;
00208         }
00209
00210         case winrt::NotifyCollectionChangedAction::Replace:
00211         {
00212             RemoveFromChildrenNodes(args.OldStartingIndex(), args.OldItems().Size());
00213             AddToChildrenNodes(args.NewStartingIndex(), args.NewItems().Size());
00214             break;
00215         }
00216         }
00217     }
00218 }
00219
00220 void TreeViewNode::AddToChildrenNodes(int index, int count)
00221 {
00222     for (int i = index + count - 1; i >= index; i--)
00223     {
00224         auto item = m_itemsDataSource.GetAt(i);
00225         auto node = winrt::make_self<TreeViewNode>();
00226         node->Content(item);
00227         winrt::get_self<TreeViewNodeVector>(Children())->InsertAt(index, *node, false /* updateItemsSource */);
00228     }
00229 }
00230
00231 void TreeViewNode::RemoveFromChildrenNodes(int index, int count)
00232 {
00233     for (int i = 0; i < count; i++)
00234     {
00235         winrt::get_self<TreeViewNodeVector>(Children())->RemoveAt(index, false /* updateItemsSource */);
00236     }
00237 }
00238
00239 void TreeViewNode::SyncChildrenNodesWithItemsSource()
00240 {
00241     if (!AreChildrenNodesEqualToItemsSource())
00242     {
00243         const auto children = winrt::get_self<TreeViewNodeVector>(Children());
00244         children->Clear(false /* updateItemsSource */, false /* updateIsExpanded */);
00245
00246         const auto size = m_itemsDataSource ? m_itemsDataSource.Count() : 0;
00247         for (auto i = 0; i < size; i++)
00248         {
00249             const auto item = m_itemsDataSource.GetAt(i);
00250             const auto node = winrt::make_self<TreeViewNode>();
00251             node->Content(item);
00252             node->IsContentMode(true);
00253             children->Append(*node, false /* updateItemsSource */);
00254         }
00255     }
00256 }
00257
00258 bool TreeViewNode::AreChildrenNodesEqualToItemsSource()
00259 {
00260     const auto children = Children();
00261     const UINT32 childrenCount = children ? children.Size() : 0;
00262     const UINT32 itemsSourceCount = m_itemsDataSource ? m_itemsDataSource.Count() : 0;
00263
00264     if (childrenCount != itemsSourceCount)
00265     {
00266         return false;
00267     }
00268
00269     // Compare the actual content in collections when counts are equal
00270     for (UINT32 i = 0; i < itemsSourceCount; i++)
00271     {
00272         if (children.GetAt(i).Content() != m_itemsDataSource.GetAt(i))
00273         {
00274             return false;
00275         }
00276     }
00277
00278     return true;
00279 }
00280
00281 hstring TreeViewNode::GetContentAsString()
00282 {
00283     if (auto content = Content())
00284     {
00285         if (auto result = content.try_as<winrt::ICustomPropertyProvider>())
00286         {
00287             return result.GetStringRepresentation();
00288         }
00289
00290         if (auto result = content.try_as<winrt::IStringable>())
00291         {
00292             return result.ToString();
00293         }
00294
00295         return winrt::unbox_value_or<hstring>(content, Type().Name);
00296     }
00297
00298     return Type().Name;
00299 }
00300
00301 #pragma region ICustomPropertyProvider
00302
00303 winrt::TypeName TreeViewNode::Type()
00304 {
00305     auto outer = get_strong().as<winrt::IInspectable>();
00306     winrt::TypeName typeName;
00307     typeName.Kind = winrt::TypeKind::Metadata;
00308     typeName.Name = winrt::get_class_name(outer);
00309     return typeName;
00310 }
00311
00312 winrt::ICustomProperty TreeViewNode::GetCustomProperty(hstring const& name)
00313 {
00314     return nullptr;
00315 }
00316
00317 winrt::ICustomProperty TreeViewNode::GetIndexedProperty(hstring const& name, winrt::TypeName const& type)
00318 {
00319     return nullptr;
00320 }
00321
00322 hstring TreeViewNode::GetStringRepresentation()
00323 {
00324     return GetContentAsString();
00325 }
00326
00327 #pragma endregion
00328
00329 #pragma region IStringable
00330 hstring TreeViewNode::ToString()
00331 {
00332     return GetContentAsString();
00333 }
00334 #pragma endregion
00335
00336 #pragma region TreeViewNodeVector
00337
00338 TreeViewNodeVector::TreeViewNodeVector()
00339 {
00340 }
00341
00342 TreeViewNodeVector::TreeViewNodeVector(unsigned int capacity)
00343 {
00344     GetVectorInnerImpl()->reserve(capacity);
00345 }
00346
00347 void TreeViewNodeVector::SetParent(winrt::TreeViewNode value)
00348 {
00349     m_parent = winrt::make_weak(value);
00350 }
00351
00352 TreeViewNode* TreeViewNodeVector::Parent()
00353 {
00354     return winrt::get_self<TreeViewNode>(m_parent.get());
00355 }
00356
00357 winrt::IBindableVector TreeViewNodeVector::GetWritableParentItemsSource()
00358 {
00359     winrt::IBindableVector parentItemsSource = nullptr;
00360
00361     if (auto parent = Parent())
00362     {
00363         if (auto itemsSource = parent->ItemsSource())
00364         {
00365             parentItemsSource = itemsSource.try_as<winrt::IBindableVector>();
00366         }
00367     }
00368     return parentItemsSource;
00369 }
00370
00371 void TreeViewNodeVector::Append(winrt::TreeViewNode const& item, bool updateItemsSource)
00372 {
00373     InsertAt(Size(), item, updateItemsSource);
00374 }
00375
00376 void TreeViewNodeVector::InsertAt(unsigned int index, winrt::TreeViewNode const& item, bool updateItemsSource)
00377 {
00378     auto inner = GetVectorInnerImpl();
00379     MUX_ASSERT(m_parent.get());
00380     MUX_ASSERT(index <= inner->Size());
00381     winrt::get_self<TreeViewNode>(item)->put_ParentImpl(m_parent.get());
00382
00383     inner->InsertAt(index, item);
00384
00385     if (updateItemsSource)
00386     {
00387         if (auto itemsSource = GetWritableParentItemsSource())
00388         {
00389             itemsSource.InsertAt(index, item.Content());
00390         }
00391     }
00392 }
00393
00394 void TreeViewNodeVector::SetAt(unsigned int index, winrt::TreeViewNode const& item, bool updateItemsSource)
00395 {
00396     RemoveAt(index, updateItemsSource,false /* updateIsExpanded */);
00397     InsertAt(index, item, updateItemsSource);
00398 }
00399
00400 void TreeViewNodeVector::RemoveAt(unsigned int index, bool updateItemsSource,bool updateIsExpanded)
00401 {
00402     auto inner = GetVectorInnerImpl();
00403     auto targetNode = inner->GetAt(index);
00404     winrt::get_self<TreeViewNode>(targetNode)->put_ParentImpl(nullptr);
00405
00406     inner->RemoveAt(index);
00407
00408     if (updateItemsSource)
00409     {
00410         if (auto source = GetWritableParentItemsSource())
00411         {
00412             source.RemoveAt(index);
00413         }
00414     }
00415
00416     // No children, so close parent if not requested otherwise
00417     if (updateIsExpanded && inner->Size() == 0)
00418     {
00419         if (const auto& ownerNode = m_parent.get())
00420         {
00421             // Only set IsExpanded to false if we are not the root node
00422             if (const auto& ownerParent = ownerNode.Parent())
00423             {
00424                 ownerNode.IsExpanded(false);
00425             }
00426         }
00427     }
00428 }
00429
00430 void TreeViewNodeVector::RemoveAtEnd(bool updateItemsSource)
00431 {
00432     const auto index = GetVectorInnerImpl()->Size() - 1;
00433     RemoveAt(updateItemsSource);
00434 }
00435
00436 void TreeViewNodeVector::ReplaceAll(winrt::array_view<winrt::TreeViewNode const> values, bool updateItemsSource)
00437 {
00438     const auto inner = GetVectorInnerImpl();
00439
00440     const auto count = inner->Size();
00441     if (count > 0)
00442     {
00443         Clear(updateItemsSource);
00444
00445         auto itemsSource = GetWritableParentItemsSource();
00446         // Set parent on new elements
00447         MUX_ASSERT(m_parent.get());
00448         for (auto& value : values)
00449         {
00450             winrt::get_self<TreeViewNode>(value)->put_ParentImpl(m_parent.get());
00451             if (itemsSource)
00452             {
00453                 itemsSource.Append(value.Content());
00454             }
00455         }
00456
00457         inner->ReplaceAll(values);
00458     }
00459 }
00460
00461 void TreeViewNodeVector::Clear(bool updateItemsSource,bool updateIsExpanded)
00462 {
00463     const auto inner = GetVectorInnerImpl();
00464     const auto count = inner->Size();
00465
00466     if (count > 0)
00467     {
00468         for (unsigned int i = 0; i < count; i++)
00469         {
00470             auto node = inner->GetAt(i);
00471             winrt::get_self<TreeViewNode>(node)->put_ParentImpl(nullptr);
00472         }
00473
00474         inner->Clear();
00475
00476         if (updateItemsSource)
00477         {
00478             if (auto itemsSource = GetWritableParentItemsSource())
00479             {
00480                 itemsSource.Clear();
00481             }
00482         }
00483     }
00484
00485     if (updateIsExpanded)
00486     {
00487         if(const auto& ownerNode = m_parent.get())
00488         {
00489             // Only set IsExpanded to false if we are not the root node
00490             if (const auto& ownerParent = ownerNode.Parent())
00491             {
00492                 ownerNode.IsExpanded(false);
00493             }
00494         }
00495     }
00496 }
00497
00498 #pragma endregion
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/APITests/AnimatedIconTests.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • APITests

AnimatedIconTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005
00006 using Microsoft.UI.Xaml.Controls;
00007 using Common;
00008 using Microsoft.UI.Xaml.Markup;
00009 using System.Collections.Generic;
00010 using Microsoft.UI.Xaml.Media;
00011 using System.Linq;
00012 using System;
00013 using System.Diagnostics;
00014 using MUXControlsTestApp;
00015 using Microsoft.UI.Private.Controls;
00016 using System.Threading;
00017 using Microsoft.UI.Xaml.Controls.AnimatedVisuals;
00018
00019 using WEX.TestExecution;
00020 using WEX.TestExecution.Markup;
00021 using WEX.Logging.Interop;
00022
00023 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00024 {
00025     [TestClass]
00026     public class AnimatedIconTests : ApiTestBase
00027     {
00028         [TestMethod]
00029         public void SettingStateOnParentPropagatesToChildAnimatedIcon()
00030         {
00031             AnimatedIcon animatedIcon = null;
00032             Grid parentGrid = null;
00033             RunOnUIThread.Execute(() =>
00034             {
00035                 animatedIcon = new AnimatedIcon();
00036                 parentGrid = new Grid();
00037                 parentGrid.Children.Add(animatedIcon);
00038                 AnimatedIcon.SetState(parentGrid, "Initial State");
00039
00040                 Content = parentGrid;
00041                 Content.UpdateLayout();
00042             });
00043
00044             IdleSynchronizer.Wait();
00045
00046             RunOnUIThread.Execute(() =>
00047             {
00048                 string stateString = "Test State";
00049                 AnimatedIcon.SetState(parentGrid, stateString);
00050                 Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
00051             });
00052         }
00053         [TestMethod]
00054         public void SettingStateOnGrandParentPropagatesToGrandChildAnimatedIcon()
00055         {
00056             AnimatedIcon animatedIcon = null;
00057             Grid parentGrid = null;
00058             Grid grandParentGrid = null;
00059             RunOnUIThread.Execute(() =>
00060             {
00061                 animatedIcon = new AnimatedIcon();
00062                 parentGrid = new Grid();
00063                 grandParentGrid = new Grid();
00064                 parentGrid.Children.Add(animatedIcon);
00065                 grandParentGrid.Children.Add(parentGrid);
00066                 AnimatedIcon.SetState(grandParentGrid, "Initial State");
00067
00068                 Content = grandParentGrid;
00069                 Content.UpdateLayout();
00070             });
00071
00072             IdleSynchronizer.Wait();
00073
00074             RunOnUIThread.Execute(() =>
00075             {
00076                 string stateString = "Test State";
00077                 AnimatedIcon.SetState(grandParentGrid, stateString);
00078                 Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
00079             });
00080         }
00081
00082         [TestMethod]
00083         public void ChangingVisualTrees()
00084         {
00085             AnimatedIcon animatedIcon = null;
00086             Grid parentGrid = null;
00087             Grid grandParentGrid = null;
00088             Grid newParentGrid = null;
00089             RunOnUIThread.Execute(() =>
00090             {
00091                 animatedIcon = new AnimatedIcon();
00092                 parentGrid = new Grid();
00093                 grandParentGrid = new Grid();
00094                 newParentGrid = new Grid();
00095                 parentGrid.Children.Add(animatedIcon);
00096                 grandParentGrid.Children.Add(parentGrid);
00097                 AnimatedIcon.SetState(parentGrid, "Initial State");
00098
00099                 Content = grandParentGrid;
00100                 Content.UpdateLayout();
00101             });
00102
00103             IdleSynchronizer.Wait();
00104
00105             RunOnUIThread.Execute(() =>
00106             {
00107                 string stateString = "Test State";
00108                 AnimatedIcon.SetState(parentGrid, stateString);
00109                 Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
00110
00111                 parentGrid.Children.Clear();
00112                 newParentGrid.Children.Add(animatedIcon);
00113                 grandParentGrid.Children.Clear();
00114                 grandParentGrid.Children.Add(newParentGrid);
00115                 AnimatedIcon.SetState(newParentGrid, "Initial State");
00116
00117                 Content.UpdateLayout();
00118             });
00119
00120             IdleSynchronizer.Wait();
00121
00122             RunOnUIThread.Execute(() =>
00123             {
00124                 string state2String = "Test State2";
00125                 AnimatedIcon.SetState(newParentGrid, state2String);
00126                 Verify.AreEqual(state2String, AnimatedIcon.GetState(animatedIcon));
00127
00128                 string badStateString = "Bad State";
00129                 AnimatedIcon.SetState(parentGrid, badStateString);
00130                 Verify.AreNotEqual(badStateString, AnimatedIcon.GetState(animatedIcon));
00131             });
00132         }
00133
00134         [TestMethod]
00135         public void SettingStateOnParentDoesNotPropagateToChildNonAnimatedIcon()
00136         {
00137             AnimatedIcon animatedIcon = null;
00138             Grid parentGrid = null;
00139             Grid childGrid = null;
00140             RunOnUIThread.Execute(() =>
00141             {
00142                 animatedIcon = new AnimatedIcon();
00143                 parentGrid = new Grid();
00144                 childGrid = new Grid();
00145                 parentGrid.Children.Add(childGrid);
00146                 childGrid.Children.Add(animatedIcon);
00147                 AnimatedIcon.SetState(parentGrid, "Initial State");
00148
00149                 Content = parentGrid;
00150                 Content.UpdateLayout();
00151             });
00152
00153             IdleSynchronizer.Wait();
00154
00155             RunOnUIThread.Execute(() =>
00156             {
00157                 string stateString = "Test State";
00158                 AnimatedIcon.SetState(parentGrid, stateString);
00159                 Verify.AreNotEqual(stateString, AnimatedIcon.GetState(childGrid));
00160                 Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
00161             });
00162         }
00163
00164         [TestMethod]
00165         public void AddingAnimatedIconToGridWithoutAStateDoesNotPropogateState()
00166         {
00167             // This is not actually a desired behavior.  Ideally we would be able to set
00168             // the AnimatedIcon.State property on any ancestor of an animated icon at any
00169             // time and that would reach the icon. However this is challenging to do
00170             // efficiently so instead we require that the parent have an AnimatedIcon.State
00171             // value when the icon is loaded.
00172             AnimatedIcon animatedIcon = null;
00173             Grid parentGrid = null;
00174             RunOnUIThread.Execute(() =>
00175             {
00176                 animatedIcon = new AnimatedIcon();
00177                 parentGrid = new Grid();
00178                 parentGrid.Children.Add(animatedIcon);
00179
00180                 Content = parentGrid;
00181                 Content.UpdateLayout();
00182             });
00183
00184             IdleSynchronizer.Wait();
00185
00186             RunOnUIThread.Execute(() =>
00187             {
00188                 string stateString = "Test State";
00189                 AnimatedIcon.SetState(parentGrid, stateString);
00190                 Verify.AreNotEqual(stateString, AnimatedIcon.GetState(animatedIcon));
00191             });
00192         }
00193
00194         [TestMethod]
00195         public void CanSetStateOnAnimatedIconDirectlyWithoutPropagationToChild()
00196         {
00197             AnimatedIcon animatedIcon = null;
00198             RunOnUIThread.Execute(() =>
00199             {
00200                 animatedIcon = new AnimatedIcon();
00201
00202                 Content = animatedIcon;
00203                 Content.UpdateLayout();
00204             });
00205
00206             IdleSynchronizer.Wait();
00207
00208             RunOnUIThread.Execute(() =>
00209             {
00210                 string stateString = "Test State";
00211                 AnimatedIcon.SetState(animatedIcon, stateString);
00212                 Verify.AreEqual(stateString, AnimatedIcon.GetState(animatedIcon));
00213                 Verify.AreNotEqual(stateString, AnimatedIcon.GetState(VisualTreeHelper.GetChild(animatedIcon, 0)));
00214             });
00215         }
00216
00217         [TestMethod]
00218         public void ForegroundInheritsFromParent()
00219         {
00220             AnimatedIcon animatedIcon = null;
00221             ContentControl parentContentControl = null;
00222             RunOnUIThread.Execute(() =>
00223             {
00224                 animatedIcon = new AnimatedIcon();
00225                 parentContentControl = new ContentControl();
00226                 parentContentControl.Content = animatedIcon;
00227
00228                 Content = parentContentControl;
00229                 Content.UpdateLayout();
00230             });
00231
00232             IdleSynchronizer.Wait();
00233
00234             RunOnUIThread.Execute(() =>
00235             {
00236                 var foregroundBrush = new SolidColorBrush(Colors.Red);
00237                 parentContentControl.Foreground = foregroundBrush;
00238                 Verify.AreEqual(foregroundBrush, animatedIcon.Foreground);
00239
00240                 var newForegroundBrush = new SolidColorBrush(Colors.Blue);
00241                 animatedIcon.Foreground = newForegroundBrush;
00242                 Verify.AreEqual(newForegroundBrush, animatedIcon.Foreground);
00243             });
00244         }
00245
00246         [TestMethod]
00247         public void CanChangeSourceAfterState()
00248         {
00249             AnimatedIcon animatedIcon = null;
00250             Grid parentGrid = null;
00251             RunOnUIThread.Execute(() =>
00252             {
00253                 animatedIcon = new AnimatedIcon();
00254                 parentGrid = new Grid();
00255                 parentGrid.Children.Add(animatedIcon);
00256
00257                 Content = parentGrid;
00258                 Content.UpdateLayout();
00259             });
00260
00261             IdleSynchronizer.Wait();
00262
00263             RunOnUIThread.Execute(() =>
00264             {
00265                 animatedIcon.Source = new AnimatedChevronDownSmallVisualSource();
00266                 AnimatedIcon.SetState(parentGrid, "Normal");
00267                 animatedIcon.Source = new AnimatedSettingsVisualSource();
00268                 AnimatedIcon.SetState(parentGrid, "PointerOver");
00269                 animatedIcon.Source = null;
00270                 AnimatedIcon.SetState(parentGrid, "");
00271             });
00272         }
00273
00274         [TestMethod]
00275         public void TransitionFallbackLogic()
00276         {
00277             AnimatedIcon animatedIcon = null;
00278             var layoutUpdatedEvent = new AutoResetEvent(false);
00279
00280             RunOnUIThread.Execute(() =>
00281             {
00282                 animatedIcon = new AnimatedIcon();
00283                 animatedIcon.Source = new MockIAnimatedIconSource2();
00284
00285                 Content = animatedIcon;
00286                 Content.UpdateLayout();
00287             });
00288
00289             IdleSynchronizer.Wait();
00290
00291             RunOnUIThread.Execute(() =>
00292             {
00293                 animatedIcon.LayoutUpdated += AnimatedIcon_LayoutUpdated;
00294                 AnimatedIcon.SetState(animatedIcon, "a");
00295                 Content.UpdateLayout();
00296             });
00297
00298             IdleSynchronizer.Wait();
00299             layoutUpdatedEvent.WaitOne();
00300
00301             RunOnUIThread.Execute(() =>
00302             {
00303                 layoutUpdatedEvent.Reset();
00304                 AnimatedIcon.SetState(animatedIcon, "b");
00305                 Content.UpdateLayout();
00306             });
00307
00308             IdleSynchronizer.Wait();
00309             layoutUpdatedEvent.WaitOne();
00310
00311             RunOnUIThread.Execute(() =>
00312             {
00313                 Verify.AreEqual("aTob_Start", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00314                 Verify.AreEqual("aTob_End", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00315
00316                 layoutUpdatedEvent.Reset();
00317                 AnimatedIcon.SetState(animatedIcon, "c");
00318                 Content.UpdateLayout();
00319             });
00320
00321             IdleSynchronizer.Wait();
00322             layoutUpdatedEvent.WaitOne();
00323
00324             RunOnUIThread.Execute(() =>
00325             {
00326                 Verify.AreEqual("bToc_Start", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00327                 // bToc_End is undefined in MockIAnimatedIconSource2
00328                 Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00329
00330                 layoutUpdatedEvent.Reset();
00331                 AnimatedIcon.SetState(animatedIcon, "d");
00332                 Content.UpdateLayout();
00333             });
00334
00335             IdleSynchronizer.Wait();
00336             layoutUpdatedEvent.WaitOne();
00337
00338             RunOnUIThread.Execute(() =>
00339             {
00340                 // cTod_Start is undefined in MockIAnimatedIconSource2
00341                 Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00342                 Verify.AreEqual("cTod_End", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00343
00344                 layoutUpdatedEvent.Reset();
00345                 AnimatedIcon.SetState(animatedIcon, "e");
00346                 Content.UpdateLayout();
00347             });
00348
00349             IdleSynchronizer.Wait();
00350             layoutUpdatedEvent.WaitOne();
00351
00352             RunOnUIThread.Execute(() =>
00353             {
00354                 // dToe_Start and dToe_End are undefined in MockIAnimatedIconSource2, the first backup is dToe
00355                 Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00356                 Verify.AreEqual("dToe", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00357
00358                 layoutUpdatedEvent.Reset();
00359                 AnimatedIcon.SetState(animatedIcon, "f");
00360                 Content.UpdateLayout();
00361             });
00362
00363             IdleSynchronizer.Wait();
00364             layoutUpdatedEvent.WaitOne();
00365
00366             RunOnUIThread.Execute(() =>
00367             {
00368                 // eTof_Start, eTof_End, and eTof are undefined in MockIAnimatedIconSource2, the second backup is f
00369                 Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00370                 Verify.AreEqual("f", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00371
00372                 layoutUpdatedEvent.Reset();
00373                 AnimatedIcon.SetState(animatedIcon, "b");
00374                 Content.UpdateLayout();
00375             });
00376
00377             IdleSynchronizer.Wait();
00378             layoutUpdatedEvent.WaitOne();
00379
00380             RunOnUIThread.Execute(() =>
00381             {
00382                 // fTob_Start, fTob_End, fTob and b are all undefined in MockIAnimatedIconSource2, the third backup is any
00383                 // marker which ends with the string "Tob_End"
00384                 Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00385                 Verify.AreEqual("aTob_End", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00386
00387                 layoutUpdatedEvent.Reset();
00388                 AnimatedIcon.SetState(animatedIcon, "0.12345");
00389                 Content.UpdateLayout();
00390             });
00391
00392             IdleSynchronizer.Wait();
00393             layoutUpdatedEvent.WaitOne();
00394
00395             RunOnUIThread.Execute(() =>
00396             {
00397                 // bTo0.12345_Start, bTo0.12345_End, bTo0.12345, and 0.12345  are all undefined in MockIAnimatedIconSource2, and
00398                 // there are no markers which end with the string "To0.12345_End" so finally we attempt to interpret the state as
00399                 // a float to get the position to animate to.
00400                 Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00401                 Verify.AreEqual("0.12345", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00402
00403                 layoutUpdatedEvent.Reset();
00404                 AnimatedIcon.SetState(animatedIcon, "Failure");
00405                 Content.UpdateLayout();
00406             });
00407
00408             IdleSynchronizer.Wait();
00409             layoutUpdatedEvent.WaitOne();
00410
00411             RunOnUIThread.Execute(() =>
00412             {
00413                 // 0.12345ToFailure_Start, 0.12345ToFailure_End, 0.12345ToFailure, and Failure are all undefined in MockIAnimatedIconSource2, and
00414                 // there are no markers which end with the string "ToFailure_End" and Failure is not a float, so we have failed to find a marker.
00415                 Verify.AreEqual("", AnimatedIconTestHooks.GetLastAnimationSegmentStart(animatedIcon));
00416                 Verify.AreEqual("0.0", AnimatedIconTestHooks.GetLastAnimationSegmentEnd(animatedIcon));
00417             });
00418
00419             void AnimatedIcon_LayoutUpdated(object sender, object e)
00420             {
00421                 layoutUpdatedEvent.Set();
00422             }
00423         }
00424
00425         [TestMethod]
00426         public void ChangingSourcePropertyChangesRenderSize()
00427         {
00428             AnimatedIcon icon = null;
00429             RunOnUIThread.Execute(() =>
00430             {
00431                 icon = new AnimatedIcon();
00432                 Content = new StackPanel() {
00433                     Children = { icon }
00434                 };
00435                 Content.UpdateLayout();
00436             });
00437
00438             IdleSynchronizer.Wait();
00439
00440             RunOnUIThread.Execute(() =>
00441             {
00442                 // Icon height will be zero if the source property is not set.
00443                 Verify.IsTrue(Math.Abs(icon.ActualHeight) < 0.1);
00444                 icon.Source = new AnimatedChevronDownSmallVisualSource();
00445             });
00446
00447             IdleSynchronizer.Wait();
00448
00449             RunOnUIThread.Execute(() =>
00450             {
00451                 // Icon will have a height if the AnimatedIcon also updated the visual tree to rerender.
00452                 Verify.IsTrue(Math.Abs(icon.ActualHeight) > 10);
00453             });
00454         }
00455     }
00456 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/InkToolbarPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

InkToolbarPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.UI.Core;
00005 using Windows.UI.Input.Inking;
00006 using Microsoft.UI.Xaml.Controls;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     [TopLevelTestPage(Name = "InkToolbar")]
00011     public sealed partial class InkToolbarPage : Page
00012     {
00013         private InkPresenter _inkPresenter;
00014
00015         public InkToolbarPage()
00016         {
00017             this.InitializeComponent();
00018             _inkPresenter = inkCanvas.InkPresenter;
00019             _inkPresenter.InputDeviceTypes =
00020             CoreInputDeviceTypes.Mouse | CoreInputDeviceTypes.Pen | CoreInputDeviceTypes.Touch;
00021         }
00022     }
00023 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioColors.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealScenarioColors.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.IO;
00007 using System.Linq;
00008 using System.Runtime.InteropServices.WindowsRuntime;
00009 using Windows.Foundation;
00010 using Windows.Foundation.Collections;
00011 using Windows.UI;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Controls.Primitives;
00015 using Microsoft.UI.Xaml.Data;
00016 using Microsoft.UI.Xaml.Input;
00017 using Microsoft.UI.Xaml.Media;
00018 using Microsoft.UI.Xaml.Navigation;
00019
00020 namespace MUXControlsTestApp
00021 {
00022     public class ColorItem
00023     {
00024         private string title;
00025         private SolidColorBrush colorBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
00026
00027         public string Title { get { return title; } set { title = value; } }
00028         public SolidColorBrush ColorBrush { get { return colorBrush; } set { colorBrush = value; } }
00029     }
00030
00031     public sealed partial class RevealScenarioColors : TestPage
00032     {
00033         public RevealScenarioColors()
00034         {
00035             this.InitializeComponent();
00036         }
00037
00038         private Color darkHoverPlateColor;
00039         private Color darkBorderColor;
00040         private Color lightHoverPlateColor;
00041         private Color lightBorderColor;
00042
00043         public Color DarkHoverPlateColor { get { return darkHoverPlateColor; } set { darkHoverPlateColor = value; } }
00044         public Color DarkBorderColor { get { return darkBorderColor; } set { darkBorderColor = value; } }
00045         public Color LightHoverPlateColor { get { return lightHoverPlateColor; } set { lightHoverPlateColor = value; } }
00046         public Color LightBorderColor { get { return lightBorderColor; } set { lightBorderColor = value; } }
00047
00048         private void ColorList_SelectionChanged(object sender, SelectionChangedEventArgs e)
00049         {
00050             var colorItem = ColorList.SelectedItem as ColorItem;
00051             if (colorItem != null)
00052             {
00053                 ColorPicker.Color = colorItem.ColorBrush.Color;
00054                 ColorPicker.Visibility = Visibility.Visible;
00055             }
00056             else
00057             {
00058                 ColorPicker.Visibility = Visibility.Collapsed;
00059             }
00060         }
00061
00062         private void ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args)
00063         {
00064             var colorItem = ColorList.SelectedItem as ColorItem;
00065             if (colorItem != null)
00066             {
00067                 colorItem.ColorBrush.Color = args.NewColor;
00068             }
00069         }
00070     }
00071 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CircleLayoutSamplePage Member List

This is the complete list of members for CircleLayoutSamplePage, including all inherited members.
_data | CircleLayoutSamplePage | [private]
_lastId | CircleLayoutSamplePage | [private]
_rnd | CircleLayoutSamplePage | [private]
CircleLayoutSamplePage() | CircleLayoutSamplePage | [inline]
NewPerson() | CircleLayoutSamplePage | [inline, private]
OnExistingItemTapped(object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e) | CircleLayoutSamplePage | [inline, private]
OnNewItemTapped(object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e) | CircleLayoutSamplePage | [inline, private]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MaterialHelperTestApi Member List

This is the complete list of members for MaterialHelperTestApi, including all inherited members.
abi_enter() | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< MaterialHelperTestApi > &&self) noexcept | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
final_release(std::unique_ptr< MaterialHelperTestApi > &&self) | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
GetInner() | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
IgnoreAreEffectsFast() | MaterialHelperTestApi | [static]
IgnoreAreEffectsFast(bool value) | MaterialHelperTestApi | [static]
IsOnThread() | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable > | [inline]
SimulateDisabledByPolicy() | MaterialHelperTestApi | [static]
SimulateDisabledByPolicy(bool value) | MaterialHelperTestApi | [static]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IBorderEffect Member List

This is the complete list of members for IBorderEffect, including all inherited members.
ExtendX([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior *value) | IBorderEffect
ExtendX([in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value) | IBorderEffect
ExtendY([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior *value) | IBorderEffect
ExtendY([in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value) | IBorderEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IBorderEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IBorderEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockVirtualizingLayout Member List

This is the complete list of members for MockVirtualizingLayout, including all inherited members.
ArrangeLayoutFunc | MockVirtualizingLayout |
ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) | MockVirtualizingLayout | [inline, protected]
VirtualizingLayout::ArrangeOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize) | VirtualizingLayout | [virtual]
InitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
InvalidateMeasure() | MockVirtualizingLayout | [inline]
MeasureLayoutFunc | MockVirtualizingLayout |
MeasureOverride(VirtualizingLayoutContext context, Size availableSize) | MockVirtualizingLayout | [inline, protected]
VirtualizingLayout::MeasureOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize) | VirtualizingLayout | [virtual]
OnItemsChangedCore(winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args) | VirtualizingLayout | [virtual]
UninitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
VirtualizingLayout() | VirtualizingLayout |
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/ExpanderTemplateSettings.cpp Source File

  • File List
  • File Members
  • Expander

ExpanderTemplateSettings.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ExpanderTemplateSettings.h"
00007
00008 ExpanderTemplateSettings::ExpanderTemplateSettings()
00009 {
00010     EnsureProperties();
00011 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionProgress Member List

This is the complete list of members for ItemCollectionTransitionProgress, including all inherited members.
abi_enter() | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
Complete() | ItemCollectionTransitionProgress |
DeleteInstanceOnUIThread(std::unique_ptr< ItemCollectionTransitionProgress > &&self) noexcept | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline, static]
Element() | ItemCollectionTransitionProgress |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< ItemCollectionTransitionProgress > &&self) | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
ItemCollectionTransitionProgress(winrt::ItemCollectionTransition transition) | ItemCollectionTransitionProgress |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemCollectionTransitionProgress, winrt::implementation::ItemCollectionTransitionProgressT, winrt::composing, winrt::composable > | [inline]
Transition() | ItemCollectionTransitionProgress | [inline]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PivotPage Member List

This is the complete list of members for PivotPage, including all inherited members.
PivotPage() PivotPage [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ToolTipPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ToolTipPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     [TopLevelTestPage(Name = "ToolTip", Icon = "ToolTip.png")]
00007     public sealed partial class ToolTipPage : TestPage
00008     {
00009         public ToolTipPage()
00010         {
00011             this.InitializeComponent();
00012         }
00013     }
00014 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBarItem.properties.cpp Source File

  • File List
  • File Members
  • Generated

SelectorBarItem.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SelectorBarItem.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(SelectorBarItem)
00012 }
00013
00014 #include "SelectorBarItem.g.cpp"
00015
00016 GlobalDependencyProperty SelectorBarItemProperties::s_IconProperty{ nullptr };
00017 GlobalDependencyProperty SelectorBarItemProperties::s_TextProperty{ nullptr };
00018
00019 SelectorBarItemProperties::SelectorBarItemProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void SelectorBarItemProperties::EnsureProperties()
00025 {
00026     ItemContainer::EnsureProperties();
00027     if (!s_IconProperty)
00028     {
00029         s_IconProperty =
00030             InitializeDependencyProperty(
00031                 L"Icon",
00032                 winrt::name_of<winrt::IconElement>(),
00033                 winrt::name_of<winrt::SelectorBarItem>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
00036                 winrt::PropertyChangedCallback(&OnIconPropertyChanged));
00037     }
00038     if (!s_TextProperty)
00039     {
00040         s_TextProperty =
00041             InitializeDependencyProperty(
00042                 L"Text",
00043                 winrt::name_of<winrt::hstring>(),
00044                 winrt::name_of<winrt::SelectorBarItem>(),
00045                 false /* isAttached */,
00046                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00047                 winrt::PropertyChangedCallback(&OnTextPropertyChanged));
00048     }
00049 }
00050
00051 void SelectorBarItemProperties::ClearProperties()
00052 {
00053     s_IconProperty = nullptr;
00054     s_TextProperty = nullptr;
00055     ItemContainer::ClearProperties();
00056 }
00057
00058 void SelectorBarItemProperties::OnIconPropertyChanged(
00059     winrt::DependencyObject const& sender,
00060     winrt::DependencyPropertyChangedEventArgs const& args)
00061 {
00062     auto owner = sender.as<winrt::SelectorBarItem>();
00063     winrt::get_self<SelectorBarItem>(owner)->OnPropertyChanged(args);
00064 }
00065
00066 void SelectorBarItemProperties::OnTextPropertyChanged(
00067     winrt::DependencyObject const& sender,
00068     winrt::DependencyPropertyChangedEventArgs const& args)
00069 {
00070     auto owner = sender.as<winrt::SelectorBarItem>();
00071     winrt::get_self<SelectorBarItem>(owner)->OnPropertyChanged(args);
00072 }
00073
00074 void SelectorBarItemProperties::Icon(winrt::IconElement const& value)
00075 {
00076     [[gsl::suppress(con)]]
00077     {
00078     static_cast<SelectorBarItem*>(this)->SetValue(s_IconProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
00079     }
00080 }
00081
00082 winrt::IconElement SelectorBarItemProperties::Icon()
00083 {
00084     return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<SelectorBarItem*>(this)->GetValue(s_IconProperty));
00085 }
00086
00087 void SelectorBarItemProperties::Text(winrt::hstring const& value)
00088 {
00089     [[gsl::suppress(con)]]
00090     {
00091     static_cast<SelectorBarItem*>(this)->SetValue(s_TextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00092     }
00093 }
00094
00095 winrt::hstring SelectorBarItemProperties::Text()
00096 {
00097     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<SelectorBarItem*>(this)->GetValue(s_TextProperty));
00098 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CMethodProfileGroupBase Member List

This is the complete list of members for CMethodProfileGroupBase, including all inherited members.
FireEvent(bool bSuspend) noexcept=0 | CMethodProfileGroupBase | [pure virtual]
RegisterMethod(UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept=0 | CMethodProfileGroupBase | [pure virtual]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemBase.properties.h Source File

  • File List
  • File Members
  • Generated

NavigationViewItemBase.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class NavigationViewItemBaseProperties
00008 {
00009 public:
00010     NavigationViewItemBaseProperties();
00011
00012     void IsSelected(bool value);
00013     bool IsSelected();
00014
00015     static winrt::DependencyProperty IsSelectedProperty() { return s_IsSelectedProperty; }
00016
00017     static GlobalDependencyProperty s_IsSelectedProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021
00022     static void OnIsSelectedPropertyChanged(
00023         winrt::DependencyObject const& sender,
00024         winrt::DependencyPropertyChangedEventArgs const& args);
00025 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/XamlAmbientLight.h Source File

  • File List
  • File Members
  • Lights

XamlAmbientLight.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "MaterialHelper.h"
00006
00007 #include "XamlAmbientLight.g.h"
00008 #include "XamlAmbientLight.properties.h"
00009
00010 class XamlAmbientLight :
00011     public ReferenceTracker<XamlAmbientLight, winrt::implementation::XamlAmbientLightT>,
00012     public XamlAmbientLightProperties
00013 {
00014     friend MaterialHelperBase;
00015     friend MaterialHelper;
00016 public:
00017     XamlAmbientLight();
00018
00019     static winrt::hstring& GetLightIdStatic();
00020
00021     // IXamlLightOverrides
00022     winrt::hstring GetId();
00023     void OnConnected(winrt::UIElement const& newElement);
00024     void OnDisconnected(winrt::UIElement const& oldElement);
00025
00026     void OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy);
00027
00028     void OnColorPropertyChanged(
00029         const winrt::DependencyPropertyChangedEventArgs& args);
00030     static void OnIsTargetPropertyChanged(
00031         const winrt::DependencyObject& sender,
00032         const winrt::DependencyPropertyChangedEventArgs& args);
00033
00034 public:
00035     static const winrt::Color sc_defaultColor;
00036
00037 private:
00038     void EnsureCompositionResources();
00039     void ReleaseCompositionResources();
00040
00041     winrt::AmbientLight m_compositionAmbientLight{ nullptr };
00042     winrt::Color m_ambientLightColor{};
00043
00044     bool m_isDisabledByMaterialPolicy{};
00045
00046     winrt::event_token m_materialPolicyChangedToken{};
00047 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingStackLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

VirtualizingStackLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.Specialized;
00007 using System.Diagnostics;
00008 using System.Linq;
00009 using Windows.Foundation;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012
00013 namespace MUXControlsTestApp.Samples
00014 {
00015     // This is a sample layout that stacks elements one after
00016     // the other where each item can be of variable height. This is
00017     // also a virtualizing layout - we measure and arrange only elements
00018     // that are in the viewport. Not measuring/arranging all elements means
00019     // that we do not have the complete picture and need to estimate sometimes.
00020     // For example the size of the layout (extent) is an estimation based on the
00021     // average heights we have seen so far. Also, if you drag the mouse thumb
00022     // and yank it quickly, then we estimate what goes in the new viewport.
00023
00024     // The layout caches the bounds of everything that are in the current viewport.
00025     // During measure, we might get a suggested anchor (or start index), we use that
00026     // index to start and layout the rest of the items in the viewport relative to that
00027     // index. Note that since we are estimating, we can end up with negative origin when
00028     // the viewport is somewhere in the middle of the extent. This is achieved by setting the
00029     // LayoutOrigin property on the context. Once this is set, future viewport will account
00030     // for the origin.
00031     public class VirtualizingStackLayout : VirtualizingLayout
00032     {
00033         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00034         {
00035             var viewport = context.RealizationRect;
00036             DebugTrace("MeasureOverride: Viewport " + viewport);
00037
00038             DebugTrace("Visible Rect:" + context.VisibleRect);
00039
00040             // Remove bounds for elements that are now outside the viewport.
00041             // Proactive recycling elements means we can reuse it during this measure pass again.
00042             RemoveCachedBoundsOutsideViewport(viewport);
00043
00044             // Find the index of the element to start laying out from - the anchor
00045             int startIndex = GetStartIndex(context, availableSize);
00046
00047             // Measure and layout elements starting from the start index, forward and backward.
00048             Generate(context, availableSize, startIndex, forward:true);
00049             Generate(context, availableSize, startIndex, forward:false);
00050
00051             // Estimate the extent size. Note that this can have a non 0 origin.
00052             m_lastExtent = EstimateExtent(context, availableSize);
00053             context.LayoutOrigin = new Point(m_lastExtent.X, m_lastExtent.Y);
00054             return new Size(m_lastExtent.Width, m_lastExtent.Height);
00055         }
00056
00057         protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00058         {
00059             DebugTrace("ArrangeOverride: Viewport" + context.RealizationRect);
00060             for (int realizationIndex = 0; realizationIndex < m_realizedElementBounds.Count; realizationIndex++)
00061             {
00062                 int currentDataIndex = m_firstRealizedDataIndex + realizationIndex;
00063                 DebugTrace("Arranging " + currentDataIndex);
00064
00065                 // Arrange the child. If any alignment needs to be done, it
00066                 // can be done here.
00067                 var child = context.GetOrCreateElementAt(currentDataIndex);
00068                 var arrangeBounds = m_realizedElementBounds[realizationIndex];
00069                 arrangeBounds.X -= m_lastExtent.X;
00070                 arrangeBounds.Y -= m_lastExtent.Y;
00071                 child.Arrange(arrangeBounds);
00072             }
00073
00074             return finalSize;
00075         }
00076
00077         // The data collection has changed, since we are maintaining the bounds of elements
00078         // in the viewport, we will update the list to account for the collection change.
00079         protected override void OnItemsChangedCore(VirtualizingLayoutContext context, object source, NotifyCollectionChangedEventArgs args)
00080         {
00081             InvalidateMeasure();
00082             if (m_realizedElementBounds.Count > 0)
00083             {
00084                 switch (args.Action)
00085                 {
00086                     case NotifyCollectionChangedAction.Add:
00087                         OnItemsAdded(args.NewStartingIndex, args.NewItems.Count);
00088                         break;
00089                     case NotifyCollectionChangedAction.Replace:
00090                         OnItemsRemoved(args.OldStartingIndex, args.OldItems.Count);
00091                         OnItemsAdded(args.NewStartingIndex, args.NewItems.Count);
00092                         break;
00093                     case NotifyCollectionChangedAction.Remove:
00094                         OnItemsRemoved(args.OldStartingIndex, args.OldItems.Count);
00095                         break;
00096                     case NotifyCollectionChangedAction.Reset:
00097                         m_realizedElementBounds.Clear();
00098                         m_firstRealizedDataIndex = 0;
00099                         break;
00100                     default:
00101                         throw new NotImplementedException();
00102                 }
00103             }
00104         }
00105
00106         private void Generate(VirtualizingLayoutContext context, Size availableSize, int anchorDataIndex, bool forward)
00107         {
00108             // Generate forward or backward from anchorIndex until we hit the end of the viewport
00109             int step = forward ? 1 : -1;
00110             int previousDataIndex = anchorDataIndex;
00111             int currentDataIndex = previousDataIndex + step;
00112             var viewport = context.RealizationRect;
00113             while (IsDataIndexValid(currentDataIndex, context.ItemCount) &&
00114                 ShouldContinueFillingUpSpace(previousDataIndex, forward, viewport))
00115             {
00116                 EnsureRealized(currentDataIndex);
00117                 DebugTrace("Measuring " + currentDataIndex);
00118                 var desiredSize = MeasureElement(context, currentDataIndex, availableSize);
00119                 var previousBounds = GetCachedBoundsForDataIndex(previousDataIndex);
00120                 Rect currentBounds = new Rect(0,
00121                                               forward ? previousBounds.Y + previousBounds.Height : previousBounds.Y - desiredSize.Height,
00122                                               availableSize.Width,
00123                                               desiredSize.Height);
00124                 SetCachedBoundsForDataIndex(currentDataIndex, currentBounds);
00125                 previousDataIndex = currentDataIndex;
00126                 currentDataIndex += step;
00127             }
00128         }
00129
00130         // Remove bounds that are outside the viewport, leaving one extra since our
00131         // generate stops after generating one extra to know that we are outside the
00132         // viewport.
00133         private void RemoveCachedBoundsOutsideViewport(Rect viewport)
00134         {
00135             int firstRealizedIndexInViewport = 0;
00136             while (firstRealizedIndexInViewport < m_realizedElementBounds.Count &&
00137                    !Intersects(m_realizedElementBounds[firstRealizedIndexInViewport], viewport))
00138             {
00139                 firstRealizedIndexInViewport++;
00140             }
00141
00142             int lastRealizedIndexInViewport = m_realizedElementBounds.Count - 1;
00143             while (lastRealizedIndexInViewport >= 0 &&
00144                 !Intersects(m_realizedElementBounds[lastRealizedIndexInViewport], viewport))
00145             {
00146                 lastRealizedIndexInViewport--;
00147             }
00148
00149             if (firstRealizedIndexInViewport > 0)
00150             {
00151                 m_firstRealizedDataIndex += firstRealizedIndexInViewport;
00152                 m_realizedElementBounds.RemoveRange(0, firstRealizedIndexInViewport);
00153             }
00154
00155             if (lastRealizedIndexInViewport >= 0 && lastRealizedIndexInViewport < m_realizedElementBounds.Count - 2)
00156             {
00157                 m_realizedElementBounds.RemoveRange(lastRealizedIndexInViewport + 2, m_realizedElementBounds.Count - lastRealizedIndexInViewport - 3);
00158             }
00159         }
00160
00161         bool Intersects(Rect bounds, Rect viewport)
00162         {
00163             return !(bounds.Bottom < viewport.Top ||
00164                 bounds.Top > viewport.Bottom);
00165         }
00166
00167         private bool ShouldContinueFillingUpSpace(int dataIndex, bool forward, Rect viewport)
00168         {
00169             var bounds = GetCachedBoundsForDataIndex(dataIndex);
00170             return forward ?
00171                 bounds.Y < viewport.Bottom :
00172                 bounds.Y > viewport.Top;
00173         }
00174
00175         private bool IsDataIndexValid(int currentDataIndex, int itemCount)
00176         {
00177             return currentDataIndex >= 0 && currentDataIndex < itemCount;
00178         }
00179
00180         // Figure out which index to use as the anchor and start laying out around.
00181         private int GetStartIndex(VirtualizingLayoutContext context, Size availableSize)
00182         {
00183             int startDataIndex = -1;
00184             var anchorIndex = context.RecommendedAnchorIndex;
00185             bool isAnchorValid = anchorIndex != -1;
00186
00187             if (isAnchorValid)
00188             {
00189                 if (IsRealized(anchorIndex))
00190                 {
00191                     startDataIndex = anchorIndex;
00192                 }
00193                 else
00194                 {
00195                     ClearRealizedRange();
00196                     startDataIndex = anchorIndex;
00197                 }
00198             }
00199             else
00200             {
00201                 // find first realized element that is visible in the viewport.
00202                 startDataIndex = GetFirstRealizedDataIndexInViewport(context.RealizationRect);
00203                 if (startDataIndex < 0)
00204                 {
00205                     startDataIndex = EstimateIndexForViewport(context.RealizationRect, context.ItemCount);
00206                     ClearRealizedRange();
00207                 }
00208             }
00209
00210             // We have an anchorIndex, realize and measure it and
00211             // figure out its bounds.
00212             if (startDataIndex != -1 & context.ItemCount > 0)
00213             {
00214                 if (m_realizedElementBounds.Count == 0)
00215                 {
00216                     m_firstRealizedDataIndex = startDataIndex;
00217                 }
00218
00219                 var newAnchor = EnsureRealized(startDataIndex);
00220                 DebugTrace("Measuring start index " + startDataIndex);
00221                 var desiredSize = MeasureElement(context, startDataIndex, availableSize);
00222
00223                 var bounds = new Rect(
00224                     0,
00225                     newAnchor ?
00226                         (m_totalHeightForEstimation / m_numItemsUsedForEstimation) * startDataIndex :
00227                         GetCachedBoundsForDataIndex(startDataIndex).Y,
00228                     availableSize.Width,
00229                     desiredSize.Height);
00230                 SetCachedBoundsForDataIndex(startDataIndex, bounds);
00231             }
00232
00233             return startDataIndex;
00234         }
00235
00236         private int EstimateIndexForViewport(Rect viewport, int dataCount)
00237         {
00238             double averageHeight = m_totalHeightForEstimation / m_numItemsUsedForEstimation;
00239             int estimatedIndex = (int)(viewport.Top / averageHeight);
00240             // clamp to an index within the collection
00241             estimatedIndex = Math.Max(0, Math.Min(estimatedIndex, dataCount));
00242             return estimatedIndex;
00243         }
00244
00245         private int GetFirstRealizedDataIndexInViewport(Rect viewport)
00246         {
00247             int index = -1;
00248             if (m_realizedElementBounds.Count > 0)
00249             {
00250                 for (int i = 0; i < m_realizedElementBounds.Count; i++)
00251                 {
00252                     if (m_realizedElementBounds[i].Y < viewport.Bottom &&
00253                        m_realizedElementBounds[i].Bottom > viewport.Top)
00254                     {
00255                         index = m_firstRealizedDataIndex + i;
00256                         break;
00257                     }
00258                 }
00259             }
00260
00261             return index;
00262         }
00263
00264         private Size MeasureElement(VirtualizingLayoutContext context, int index, Size availableSize)
00265         {
00266             var child = context.GetOrCreateElementAt(index);
00267             child.Measure(availableSize);
00268
00269             int estimationBufferIndex = index % m_estimationBuffer.Count;
00270             bool alreadyMeasured = m_estimationBuffer[estimationBufferIndex] != 0;
00271             if (!alreadyMeasured)
00272             {
00273                 m_numItemsUsedForEstimation++;
00274             }
00275
00276             m_totalHeightForEstimation -= m_estimationBuffer[estimationBufferIndex];
00277             m_totalHeightForEstimation += child.DesiredSize.Height;
00278             m_estimationBuffer[estimationBufferIndex] = child.DesiredSize.Height;
00279
00280             return child.DesiredSize;
00281         }
00282
00283         private bool EnsureRealized(int dataIndex)
00284         {
00285             if (!IsRealized(dataIndex))
00286             {
00287                 int realizationIndex = RealizationIndex(dataIndex);
00288                 Debug.Assert(dataIndex == m_firstRealizedDataIndex - 1 ||
00289                     dataIndex == m_firstRealizedDataIndex + m_realizedElementBounds.Count ||
00290                     m_realizedElementBounds.Count == 0);
00291
00292                 if (realizationIndex == -1)
00293                 {
00294                     m_realizedElementBounds.Insert(0, new Rect());
00295                 }
00296                 else
00297                 {
00298                     m_realizedElementBounds.Add(new Rect());
00299                 }
00300
00301                 if (m_firstRealizedDataIndex > dataIndex)
00302                 {
00303                     m_firstRealizedDataIndex = dataIndex;
00304                 }
00305
00306                 return true;
00307             }
00308
00309             return false;
00310         }
00311
00312         // Figure out the extent of the layout by getting the number of items remaining
00313         // above and below the realized elements and getting an estimation based on
00314         // average item heights seen so far.
00315         private Rect EstimateExtent(VirtualizingLayoutContext context, Size availableSize)
00316         {
00317             double averageHeight = m_totalHeightForEstimation / m_numItemsUsedForEstimation;
00318
00319             Rect extent = new Rect(0, 0, availableSize.Width, context.ItemCount * averageHeight);
00320
00321             if (context.ItemCount > 0 && m_realizedElementBounds.Count > 0)
00322             {
00323                 extent.Y = m_firstRealizedDataIndex == 0 ?
00324                                 m_realizedElementBounds[0].Y :
00325                                 m_realizedElementBounds[0].Y - (m_firstRealizedDataIndex - 1) * averageHeight;
00326
00327                 int lastRealizedIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count;
00328                 if (lastRealizedIndex == context.ItemCount - 1)
00329                 {
00330                     var lastBounds = m_realizedElementBounds[m_realizedElementBounds.Count - 1];
00331                     extent.Y = lastBounds.Bottom;
00332                 }
00333                 else
00334                 {
00335                     var lastBounds = m_realizedElementBounds[m_realizedElementBounds.Count - 1];
00336                     int lastRealizedDataIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count;
00337                     int numItemsAfterLastRealizedIndex = context.ItemCount - lastRealizedDataIndex;
00338                     extent.Height = lastBounds.Bottom + numItemsAfterLastRealizedIndex * averageHeight - extent.Y;
00339                 }
00340             }
00341
00342             DebugTrace("Extent " + extent + " with average height " + averageHeight);
00343             return extent;
00344         }
00345
00346         private bool IsRealized(int dataIndex)
00347         {
00348             int realizationIndex = dataIndex - m_firstRealizedDataIndex;
00349             return realizationIndex >= 0 && realizationIndex < m_realizedElementBounds.Count;
00350         }
00351
00352         // Index in the m_realizedElementBounds collection
00353         private int RealizationIndex(int dataIndex)
00354         {
00355             return dataIndex - m_firstRealizedDataIndex;
00356         }
00357
00358         private void OnItemsAdded(int index, int count)
00359         {
00360             // Using the old indexes here (before it was updated by the collection change)
00361             // if the insert data index is between the first and last realized data index, we need
00362             // to insert items.
00363             int lastRealizedDataIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count - 1;
00364             int newStartingIndex = index;
00365             if (newStartingIndex > m_firstRealizedDataIndex &&
00366                 newStartingIndex <= lastRealizedDataIndex)
00367             {
00368                 // Inserted within the realized range
00369                 int insertRangeStartIndex = newStartingIndex - m_firstRealizedDataIndex;
00370                 for (int i = 0; i < count; i++)
00371                 {
00372                     // Insert null (sentinel) here instead of an element, that way we do not
00373                     // end up creating a lot of elements only to be thrown out in the next layout.
00374                     int insertRangeIndex = insertRangeStartIndex + i;
00375                     int dataIndex = newStartingIndex + i;
00376                     // This is to keep the contiguousness of the mapping
00377                     m_realizedElementBounds.Insert(insertRangeIndex, new Rect());
00378                 }
00379             }
00380             else if (index <= m_firstRealizedDataIndex)
00381             {
00382                 // Items were inserted before the realized range.
00383                 // We need to update m_firstRealizedDataIndex;
00384                 m_firstRealizedDataIndex += count;
00385             }
00386         }
00387
00388         private void OnItemsRemoved(int index, int count)
00389         {
00390             int lastRealizedDataIndex = m_firstRealizedDataIndex + m_realizedElementBounds.Count - 1;
00391             int startIndex = Math.Max(m_firstRealizedDataIndex, index);
00392             int endIndex = Math.Min(lastRealizedDataIndex, index + count - 1);
00393             bool removeAffectsFirstRealizedDataIndex = (index <= m_firstRealizedDataIndex);
00394
00395             if (endIndex >= startIndex)
00396             {
00397                 ClearRealizedRange(RealizationIndex(startIndex), endIndex - startIndex + 1);
00398             }
00399
00400             if (removeAffectsFirstRealizedDataIndex &&
00401                 m_firstRealizedDataIndex != -1)
00402             {
00403                 m_firstRealizedDataIndex -= count;
00404             }
00405         }
00406
00407         private void ClearRealizedRange(int startRealizedIndex, int count)
00408         {
00409             m_realizedElementBounds.RemoveRange(startRealizedIndex, count);
00410             if (startRealizedIndex == 0)
00411             {
00412                 m_firstRealizedDataIndex = m_realizedElementBounds.Count == 0 ? 0 : m_firstRealizedDataIndex + count;
00413             }
00414         }
00415
00416         private void ClearRealizedRange()
00417         {
00418             m_realizedElementBounds.Clear();
00419             m_firstRealizedDataIndex = 0;
00420         }
00421
00422         private Rect GetCachedBoundsForDataIndex(int dataIndex)
00423         {
00424             return m_realizedElementBounds[RealizationIndex(dataIndex)];
00425         }
00426
00427         private void SetCachedBoundsForDataIndex(int dataIndex, Rect bounds)
00428         {
00429             m_realizedElementBounds[RealizationIndex(dataIndex)] = bounds;
00430         }
00431
00432         private Rect GetCachedBoundsForRealizationIndex(int relativeIndex)
00433         {
00434             return m_realizedElementBounds[relativeIndex];
00435         }
00436
00437         void DebugTrace(string message, params object[] args)
00438         {
00439             Debug.WriteLine(message, args);
00440         }
00441
00442         // Estimation state
00443         List<double> m_estimationBuffer = Enumerable.Repeat(0d, 100).ToList();
00444         int m_numItemsUsedForEstimation = 0;
00445         double m_totalHeightForEstimation = 0;
00446
00447         // State to keep track of realized bounds
00448         int m_firstRealizedDataIndex = 0;
00449         List<Rect> m_realizedElementBounds = new List<Rect>();
00450
00451         Rect m_lastExtent = new Rect();
00452     }
00453 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTabClosingBehaviorPage.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

TabViewTabClosingBehaviorPage.xaml.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml.Controls;
00002 using MUXControlsTestApp.Utilities;
00003 using System;
00004 using System.Collections.Generic;
00005 using System.IO;
00006 using System.Linq;
00007 using System.Runtime.InteropServices.WindowsRuntime;
00008 using Windows.Foundation;
00009 using Windows.Foundation.Collections;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Controls.Primitives;
00013 using Microsoft.UI.Xaml.Data;
00014 using Microsoft.UI.Xaml.Input;
00015 using Microsoft.UI.Xaml.Media;
00016 using Microsoft.UI.Xaml.Navigation;
00017
00018 // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
00019
00020 namespace MUXControlsTestApp
00021 {
00022     /// <summary>
00023     /// An empty page that can be used on its own or navigated to within a Frame.
00024     /// </summary>
00025     public sealed partial class TabViewTabClosingBehaviorPage : Page
00026     {
00027         private int _newTabNumber = 0;
00028
00029         public TabViewTabClosingBehaviorPage()
00030         {
00031             this.InitializeComponent();
00032         }
00033
00034         public void AddButtonClick(object sender, object e)
00035         {
00036             if (Tabs != null)
00037             {
00038                 TabViewItem item = new TabViewItem();
00039                 item.Header = "New Tab " + _newTabNumber;
00040                 item.Content = item.Header;
00041
00042                 Tabs.TabItems.Add(item);
00043
00044                 _newTabNumber++;
00045             }
00046         }
00047
00048         private void TabViewTabCloseRequested(object sender, Microsoft.UI.Xaml.Controls.TabViewTabCloseRequestedEventArgs e)
00049         {
00050             Tabs.TabItems.Remove(e.Tab);
00051
00052             TabViewWidth.Text = Tabs.ActualWidth.ToString();
00053             TabViewHeaderWidth.Text = Tab0.Width.ToString();
00054
00055             var scrollButtonStateValue = "";
00056
00057             var scrollIncreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollIncreaseButton") as RepeatButton;
00058             var scrollDecreaseButton = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollDecreaseButton") as RepeatButton;
00059
00060             scrollButtonStateValue += scrollIncreaseButton.IsEnabled + ";";
00061             scrollButtonStateValue += scrollDecreaseButton.IsEnabled + ";";
00062
00063             ScrollButtonStatus.Text = scrollButtonStateValue;
00064         }
00065
00066         public void GetFirstItemWidthButton_Click(object sender, RoutedEventArgs e)
00067         {
00068             // This is the smallest width that fits our content without any scrolling.
00069             TabViewWidth.Text = Tabs.ActualWidth.ToString();
00070
00071             // Header width
00072             TabViewHeaderWidth.Text = Tab0.Width.ToString();
00073         }
00074         public void GetActualWidthsButton_Click(object sender, RoutedEventArgs e)
00075         {
00076             // This is the smallest width that fits our content without any scrolling.
00077             TabViewWidth.Text = Tabs.ActualWidth.ToString();
00078
00079             // Header width
00080             TabViewHeaderWidth.Text = Tab0.Width.ToString();
00081         }
00082
00083         public void IncreaseScrollButton_Click(object sender, RoutedEventArgs e)
00084         {
00085             var sv = VisualTreeUtils.FindVisualChildByName(Tabs, "ScrollViewer") as ScrollViewer;
00086             sv.ChangeView(10000, null, null, disableAnimation: true);
00087         }
00088
00089         private void RemoveMiddleItem_Click(object sender, RoutedEventArgs e)
00090         {
00091             Tabs.TabItems.RemoveAt(1);
00092         }
00093
00094         private void RemoveLastItem_Click(object sender, RoutedEventArgs e)
00095         {
00096             Tabs.TabItems.RemoveAt(Tabs.TabItems.Count - 1);
00097         }
00098     }
00099 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/InteractionTests/TabViewTearOutTests.cs Source File

  • File List
  • File Members
  • TabView
  • InteractionTests

TabViewTearOutTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.IO;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00007
00008 using WEX.TestExecution;
00009 using WEX.TestExecution.Markup;
00010 using WEX.Logging.Interop;
00011
00012 using Microsoft.Windows.Apps.Test.Automation;
00013 using Microsoft.Windows.Apps.Test.Foundation;
00014 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00015 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00016 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00017 using MUXTestInfra.Shared.Infra;
00018 using System.Linq;
00019 using System.Collections.Generic;
00020 using System;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00023 {
00024     [TestClass]
00025     public class TabViewTearOutTests
00026     {
00027         private static TestApplicationInfo _tabViewTearOutApp;
00028
00029         public static TestApplicationInfo TabViewTearOutApp
00030         {
00031             get
00032             {
00033                 if (_tabViewTearOutApp == null)
00034                 {
00035                     _tabViewTearOutApp = new TestApplicationInfo(
00036                         "TabViewTearOutApp_6f07fta6qpts2",
00037                         "Tab Tear-Out App",
00038                         Path.Combine("TabViewTearOutApp", "TabViewTearOutApp.exe"));
00039                 }
00040
00041                 return _tabViewTearOutApp;
00042             }
00043         }
00044
00045         [ClassInitialize]
00046         [TestProperty("RunAs", "User")]
00047         [TestProperty("Classification", "Integration")]
00048         [TestProperty("Platform", "Any")]
00049         [TestProperty("IsolationLevel", "Method")] // These tests create and destroy windows, so we'll isolate each test to ensure we start with a known good state each time.
00050         public static void ClassInitialize(TestContext testContext)
00051         {
00052             // These tests involve multiple windows, so don't bother maximizing the window at the start of tests.
00053             testContext.Properties.Add("MaximizeWindowAtStart", false);
00054
00055             TestEnvironment.Initialize(testContext, TabViewTearOutApp);
00056         }
00057
00058         [ClassCleanup]
00059         public static void ClassCleanup()
00060         {
00061             TestEnvironment.AssemblyCleanupWorker(TabViewTearOutApp);
00062         }
00063
00064         [TestCleanup]
00065         public static void TestCleanup()
00066         {
00067             var testAppProcess = TestEnvironment.Application.Process;
00068
00069             if (testAppProcess != null && !testAppProcess.HasExited)
00070             {
00071                 testAppProcess.Kill();
00072             }
00073         }
00074
00075         [TestMethod]
00076         [TestProperty("Description", "Verifies that CanTearOutTabs enables the tearing out of tabs into new windows, and the rejoining of those tabs into existing windows.")]
00077         public void CanTearOutAndRejoinTabs()
00078         {
00079             TabViewTearOutTestHelpers.CanTearOutAndRejoinTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
00080         }
00081
00082         [TestMethod]
00083         [TestProperty("Description", "Verifies that CanTearOutTabs does not prevent internally reordering tabs.")]
00084         public void CanReorderTabs()
00085         {
00086             TabViewTearOutTestHelpers.CanReorderTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
00087         }
00088
00089         [TestMethod]
00090         [TestProperty("Description", "Verifies that CanTearOutTabs does not prevent selecting tabs.")]
00091         public void CanSelectTabs()
00092         {
00093             TabViewTearOutTestHelpers.CanSelectTabs(GetTabViewTearOutAppWindows, GetTabViewFromWindow, GetTabsFromTabView);
00094         }
00095
00096         private static readonly UICondition _windowCondition =
00097             UICondition.CreateFromClassName("WinUIDesktopWin32WindowClass")
00098             .AndWith(UICondition.CreateFromName(TabViewTearOutApp.TestAppMainWindowTitle));
00099
00100         private static readonly UICondition _tabViewCondition =
00101             UICondition.CreateFromName("TearOutTabsTabView");
00102
00103         private static readonly UICondition _tabCondition =
00104             UICondition.CreateFromClassName("ListViewItem");
00105
00106         private static List<Window> GetTabViewTearOutAppWindows()
00107         {
00108             return UIObject.Root.Children.FindMultiple(_windowCondition).Select(o => new Window(o)).ToList();
00109         }
00110
00111         private static Tab GetTabViewFromWindow(Window window)
00112         {
00113             return new Tab(window.Descendants.Find(_tabViewCondition));
00114         }
00115
00116         private static List<TabItem> GetTabsFromTabView(Tab tabView)
00117         {
00118             return tabView.Descendants.FindMultiple(_tabCondition).Select(o => new TabItem(o)).ToList();
00119         }
00120     }
00121
00122     public static class TabViewTearOutTestHelpers
00123     {
00124         public static void CanTearOutAndRejoinTabs(
00125             Func<List<Window>> getTabViewTearOutAppWindowsFunc,
00126             Func<Window, Tab> getTabViewFromWindowFunc,
00127             Func<Tab, List<TabItem>> getTabsFromTabViewFunc)
00128         {
00129             try
00130             {
00131                 Log.Comment("We should begin with only one window.");
00132
00133                 var windows = getTabViewTearOutAppWindowsFunc();
00134
00135                 Verify.AreEqual(1, windows.Count);
00136
00137                 var window = windows.First();
00138
00139                 var tabView = getTabViewFromWindowFunc(window);
00140                 var tabs = getTabsFromTabViewFunc(tabView);
00141
00142                 Log.Comment("The window should have three tabs in the order 1, 2, 3.");
00143
00144                 Verify.AreEqual(3, tabs.Count);
00145                 Verify.AreEqual("Document 1", tabs[0].Name);
00146                 Verify.AreEqual("Document 2", tabs[1].Name);
00147                 Verify.AreEqual("Document 3", tabs[2].Name);
00148
00149                 Log.Comment("Let's ensure the window is visible prior to dragging on it.");
00150
00151                 window.SetWindowVisualState(WindowVisualState.Normal);
00152
00153                 Log.Comment("Now we'll tear out the first tab.");
00154
00155                 InputHelper.MouseDragDistance(tabs[0], distance: 300, Direction.South, duration: 1000);
00156
00157                 Log.Comment("We should now have two windows: the first with two tabs in the order 2, 3; and the second with one tab that is 1.");
00158
00159                 windows = getTabViewTearOutAppWindowsFunc();
00160                 Verify.AreEqual(2, windows.Count);
00161
00162                 // The new window is the one that contains Item 1.
00163                 var newWindow = windows.Where(w => w.Descendants.TryFind(UICondition.CreateFromName("Document 1"), out _)).First();
00164                 var newWindowTabView = getTabViewFromWindowFunc(newWindow);
00165
00166                 tabs = getTabsFromTabViewFunc(tabView);
00167                 var newTabs = getTabsFromTabViewFunc(newWindowTabView);
00168
00169                 Verify.AreEqual(2, tabs.Count);
00170                 Verify.AreEqual("Document 2", tabs[0].Name);
00171                 Verify.AreEqual("Document 3", tabs[1].Name);
00172                 Verify.AreEqual(1, newTabs.Count);
00173                 Verify.AreEqual("Document 1", newTabs[0].Name);
00174
00175                 Log.Comment("Let's ensure the second window is visible prior to dragging on it.");
00176
00177                 newWindow.SetWindowVisualState(WindowVisualState.Normal);
00178
00179                 using (var closingWaiter = newWindow.GetWindowClosedWaiter())
00180                 {
00181                     Log.Comment("Now we'll drag the torn out tab to the end of the original tab view. This should merge the tab to the end the original tab view and close the second window.");
00182
00183                     var addNewTabButton = tabView.Descendants.Find(UICondition.CreateFromName("Add New Tab"));
00184
00185                     InputHelper.MouseDragToTarget(newTabs[0], addNewTabButton);
00186                     closingWaiter.Wait();
00187                 }
00188
00189                 Log.Comment("We should now have one windows with three tabs in the order 2, 3, 1.");
00190
00191                 windows = getTabViewTearOutAppWindowsFunc();
00192                 tabs = getTabsFromTabViewFunc(tabView);
00193
00194                 Verify.AreEqual(1, windows.Count);
00195                 Verify.AreEqual(3, tabs.Count);
00196                 Verify.AreEqual("Document 2", tabs[0].Name);
00197                 Verify.AreEqual("Document 3", tabs[1].Name);
00198                 Verify.AreEqual("Document 1", tabs[2].Name);
00199             }
00200             finally
00201             {
00202                 foreach (Window window in getTabViewTearOutAppWindowsFunc())
00203                 {
00204                     using (var closingWaiter = window.GetWindowClosedWaiter())
00205                     {
00206                         window.Close();
00207                         closingWaiter.Wait();
00208                     }
00209                 }
00210             }
00211         }
00212
00213         public static void CanReorderTabs(
00214             Func<List<Window>> getTabViewTearOutAppWindowsFunc,
00215             Func<Window, Tab> getTabViewFromWindowFunc,
00216             Func<Tab, List<TabItem>> getTabsFromTabViewFunc)
00217         {
00218             try
00219             {
00220                 Log.Comment("We should begin with only one window.");
00221
00222                 var windows = getTabViewTearOutAppWindowsFunc();
00223
00224                 Verify.AreEqual(1, windows.Count);
00225
00226                 var window = windows.First();
00227
00228                 var tabView = getTabViewFromWindowFunc(window);
00229                 var tabs = getTabsFromTabViewFunc(tabView);
00230
00231                 Log.Comment("The window should have three tabs in the order 1, 2, 3.");
00232
00233                 Verify.AreEqual(3, tabs.Count);
00234                 Verify.AreEqual("Document 1", tabs[0].Name);
00235                 Verify.AreEqual("Document 2", tabs[1].Name);
00236                 Verify.AreEqual("Document 3", tabs[2].Name);
00237
00238                 Log.Comment("Let's ensure the window is visible prior to dragging on it.");
00239
00240                 window.SetWindowVisualState(WindowVisualState.Normal);
00241
00242                 Log.Comment("Now we'll drag tab 1 to the right side of tab 2.");
00243
00244                 InputHelper.MouseDragToTarget(tabs[0], tabs[1], tabs[1].BoundingRectangle.Width / 2);
00245
00246                 Log.Comment("We should still have only one window.");
00247
00248                 windows = getTabViewTearOutAppWindowsFunc();
00249
00250                 Verify.AreEqual(1, windows.Count);
00251
00252                 tabs = getTabsFromTabViewFunc(tabView);
00253
00254                 Log.Comment("The window should now have three tabs in the order 2, 1, 3.");
00255
00256                 Verify.AreEqual(3, tabs.Count);
00257                 Verify.AreEqual("Document 2", tabs[0].Name);
00258                 Verify.AreEqual("Document 1", tabs[1].Name);
00259                 Verify.AreEqual("Document 3", tabs[2].Name);
00260
00261                 window.SetWindowVisualState(WindowVisualState.Normal);
00262
00263                 Log.Comment("Now we'll drag tab 3 to the left side of tab 2.");
00264
00265                 InputHelper.MouseDragToTarget(tabs[2], tabs[0], -tabs[0].BoundingRectangle.Width / 2);
00266
00267                 Log.Comment("We should still have only one window.");
00268
00269                 windows = getTabViewTearOutAppWindowsFunc();
00270
00271                 Verify.AreEqual(1, windows.Count);
00272
00273                 tabs = getTabsFromTabViewFunc(tabView);
00274
00275                 Log.Comment("The window should now have three tabs in the order 3, 2, 1.");
00276
00277                 Verify.AreEqual(3, tabs.Count);
00278                 Verify.AreEqual("Document 3", tabs[0].Name);
00279                 Verify.AreEqual("Document 2", tabs[1].Name);
00280                 Verify.AreEqual("Document 1", tabs[2].Name);
00281             }
00282             finally
00283             {
00284                 foreach (Window window in getTabViewTearOutAppWindowsFunc())
00285                 {
00286                     using (var closingWaiter = window.GetWindowClosedWaiter())
00287                     {
00288                         window.Close();
00289                         closingWaiter.Wait();
00290                     }
00291                 }
00292             }
00293         }
00294         public static void CanSelectTabs(
00295             Func<List<Window>> getTabViewTearOutAppWindowsFunc,
00296             Func<Window, Tab> getTabViewFromWindowFunc,
00297             Func<Tab, List<TabItem>> getTabsFromTabViewFunc)
00298         {
00299             try
00300             {
00301                 Log.Comment("We should begin with only one window.");
00302
00303                 var windows = getTabViewTearOutAppWindowsFunc();
00304
00305                 Verify.AreEqual(1, windows.Count);
00306
00307                 var window = windows.First();
00308
00309                 var tabView = getTabViewFromWindowFunc(windows[0]);
00310                 var tabs = getTabsFromTabViewFunc(tabView);
00311
00312                 Log.Comment("The window should have three tabs in the order 1, 2, 3.");
00313
00314                 Verify.AreEqual(3, tabs.Count);
00315                 Verify.AreEqual("Document 1", tabs[0].Name);
00316                 Verify.AreEqual("Document 2", tabs[1].Name);
00317                 Verify.AreEqual("Document 3", tabs[2].Name);
00318
00319                 Log.Comment("The first tab should be selected.");
00320
00321                 Verify.IsTrue(tabs[0].IsSelected);
00322                 Verify.IsFalse(tabs[1].IsSelected);
00323                 Verify.IsFalse(tabs[2].IsSelected);
00324
00325                 Log.Comment("Let's ensure the window is visible prior to clicking on it.");
00326
00327                 window.SetWindowVisualState(WindowVisualState.Normal);
00328
00329                 Log.Comment("Now we'll click on tab 2. It should be selected.");
00330
00331                 InputHelper.LeftClick(tabs[1]);
00332
00333                 Verify.IsFalse(tabs[0].IsSelected);
00334                 Verify.IsTrue(tabs[1].IsSelected);
00335                 Verify.IsFalse(tabs[2].IsSelected);
00336
00337                 window.SetWindowVisualState(WindowVisualState.Normal);
00338
00339                 Log.Comment("Now we'll click on tab 3. It should be selected.");
00340
00341                 InputHelper.LeftClick(tabs[2]);
00342
00343                 Verify.IsFalse(tabs[0].IsSelected);
00344                 Verify.IsFalse(tabs[1].IsSelected);
00345                 Verify.IsTrue(tabs[2].IsSelected);
00346
00347                 window.SetWindowVisualState(WindowVisualState.Normal);
00348
00349                 Log.Comment("Now we'll click on tab 1. It should be selected.");
00350
00351                 InputHelper.LeftClick(tabs[0]);
00352
00353                 Verify.IsTrue(tabs[0].IsSelected);
00354                 Verify.IsFalse(tabs[1].IsSelected);
00355                 Verify.IsFalse(tabs[2].IsSelected);
00356             }
00357             finally
00358             {
00359                 foreach (Window window in getTabViewTearOutAppWindowsFunc())
00360                 {
00361                     using (var closingWaiter = window.GetWindowClosedWaiter())
00362                     {
00363                         window.Close();
00364                         closingWaiter.Wait();
00365                     }
00366                 }
00367             }
00368         }
00369     }
00370 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingTests Member List

This is the complete list of members for ProgressRingTests, including all inherited members.
VerifyAccessibilityView() ProgressRingTests [inline]
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

TitleBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TitleBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TitleBar)
00012 }
00013
00014 #include "TitleBar.g.cpp"
00015
00016 GlobalDependencyProperty TitleBarProperties::s_ContentProperty{ nullptr };
00017 GlobalDependencyProperty TitleBarProperties::s_FooterProperty{ nullptr };
00018 GlobalDependencyProperty TitleBarProperties::s_HeaderProperty{ nullptr };
00019 GlobalDependencyProperty TitleBarProperties::s_IconSourceProperty{ nullptr };
00020 GlobalDependencyProperty TitleBarProperties::s_IsBackButtonVisibleProperty{ nullptr };
00021 GlobalDependencyProperty TitleBarProperties::s_IsBackEnabledProperty{ nullptr };
00022 GlobalDependencyProperty TitleBarProperties::s_IsPaneToggleButtonVisibleProperty{ nullptr };
00023 GlobalDependencyProperty TitleBarProperties::s_SubtitleProperty{ nullptr };
00024 GlobalDependencyProperty TitleBarProperties::s_TemplateSettingsProperty{ nullptr };
00025 GlobalDependencyProperty TitleBarProperties::s_TitleProperty{ nullptr };
00026
00027 TitleBarProperties::TitleBarProperties()
00028     : m_backRequestedEventSource{static_cast<TitleBar*>(this)}
00029     , m_paneToggleRequestedEventSource{static_cast<TitleBar*>(this)}
00030 {
00031     EnsureProperties();
00032 }
00033
00034 void TitleBarProperties::EnsureProperties()
00035 {
00036     if (!s_ContentProperty)
00037     {
00038         s_ContentProperty =
00039             InitializeDependencyProperty(
00040                 L"Content",
00041                 winrt::name_of<winrt::IInspectable>(),
00042                 winrt::name_of<winrt::TitleBar>(),
00043                 false /* isAttached */,
00044                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00045                 winrt::PropertyChangedCallback(&OnContentPropertyChanged));
00046     }
00047     if (!s_FooterProperty)
00048     {
00049         s_FooterProperty =
00050             InitializeDependencyProperty(
00051                 L"Footer",
00052                 winrt::name_of<winrt::IInspectable>(),
00053                 winrt::name_of<winrt::TitleBar>(),
00054                 false /* isAttached */,
00055                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00056                 winrt::PropertyChangedCallback(&OnFooterPropertyChanged));
00057     }
00058     if (!s_HeaderProperty)
00059     {
00060         s_HeaderProperty =
00061             InitializeDependencyProperty(
00062                 L"Header",
00063                 winrt::name_of<winrt::IInspectable>(),
00064                 winrt::name_of<winrt::TitleBar>(),
00065                 false /* isAttached */,
00066                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00067                 winrt::PropertyChangedCallback(&OnHeaderPropertyChanged));
00068     }
00069     if (!s_IconSourceProperty)
00070     {
00071         s_IconSourceProperty =
00072             InitializeDependencyProperty(
00073                 L"IconSource",
00074                 winrt::name_of<winrt::IconSource>(),
00075                 winrt::name_of<winrt::TitleBar>(),
00076                 false /* isAttached */,
00077                 ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
00078                 winrt::PropertyChangedCallback(&OnIconSourcePropertyChanged));
00079     }
00080     if (!s_IsBackButtonVisibleProperty)
00081     {
00082         s_IsBackButtonVisibleProperty =
00083             InitializeDependencyProperty(
00084                 L"IsBackButtonVisible",
00085                 winrt::name_of<bool>(),
00086                 winrt::name_of<winrt::TitleBar>(),
00087                 false /* isAttached */,
00088                 ValueHelper<bool>::BoxValueIfNecessary(false),
00089                 winrt::PropertyChangedCallback(&OnIsBackButtonVisiblePropertyChanged));
00090     }
00091     if (!s_IsBackEnabledProperty)
00092     {
00093         s_IsBackEnabledProperty =
00094             InitializeDependencyProperty(
00095                 L"IsBackEnabled",
00096                 winrt::name_of<bool>(),
00097                 winrt::name_of<winrt::TitleBar>(),
00098                 false /* isAttached */,
00099                 ValueHelper<bool>::BoxValueIfNecessary(true),
00100                 winrt::PropertyChangedCallback(&OnIsBackEnabledPropertyChanged));
00101     }
00102     if (!s_IsPaneToggleButtonVisibleProperty)
00103     {
00104         s_IsPaneToggleButtonVisibleProperty =
00105             InitializeDependencyProperty(
00106                 L"IsPaneToggleButtonVisible",
00107                 winrt::name_of<bool>(),
00108                 winrt::name_of<winrt::TitleBar>(),
00109                 false /* isAttached */,
00110                 ValueHelper<bool>::BoxValueIfNecessary(false),
00111                 winrt::PropertyChangedCallback(&OnIsPaneToggleButtonVisiblePropertyChanged));
00112     }
00113     if (!s_SubtitleProperty)
00114     {
00115         s_SubtitleProperty =
00116             InitializeDependencyProperty(
00117                 L"Subtitle",
00118                 winrt::name_of<winrt::hstring>(),
00119                 winrt::name_of<winrt::TitleBar>(),
00120                 false /* isAttached */,
00121                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00122                 winrt::PropertyChangedCallback(&OnSubtitlePropertyChanged));
00123     }
00124     if (!s_TemplateSettingsProperty)
00125     {
00126         s_TemplateSettingsProperty =
00127             InitializeDependencyProperty(
00128                 L"TemplateSettings",
00129                 winrt::name_of<winrt::TitleBarTemplateSettings>(),
00130                 winrt::name_of<winrt::TitleBar>(),
00131                 false /* isAttached */,
00132                 ValueHelper<winrt::TitleBarTemplateSettings>::BoxedDefaultValue(),
00133                 winrt::PropertyChangedCallback(&OnTemplateSettingsPropertyChanged));
00134     }
00135     if (!s_TitleProperty)
00136     {
00137         s_TitleProperty =
00138             InitializeDependencyProperty(
00139                 L"Title",
00140                 winrt::name_of<winrt::hstring>(),
00141                 winrt::name_of<winrt::TitleBar>(),
00142                 false /* isAttached */,
00143                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00144                 winrt::PropertyChangedCallback(&OnTitlePropertyChanged));
00145     }
00146 }
00147
00148 void TitleBarProperties::ClearProperties()
00149 {
00150     s_ContentProperty = nullptr;
00151     s_FooterProperty = nullptr;
00152     s_HeaderProperty = nullptr;
00153     s_IconSourceProperty = nullptr;
00154     s_IsBackButtonVisibleProperty = nullptr;
00155     s_IsBackEnabledProperty = nullptr;
00156     s_IsPaneToggleButtonVisibleProperty = nullptr;
00157     s_SubtitleProperty = nullptr;
00158     s_TemplateSettingsProperty = nullptr;
00159     s_TitleProperty = nullptr;
00160 }
00161
00162 void TitleBarProperties::OnContentPropertyChanged(
00163     winrt::DependencyObject const& sender,
00164     winrt::DependencyPropertyChangedEventArgs const& args)
00165 {
00166     auto owner = sender.as<winrt::TitleBar>();
00167     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00168 }
00169
00170 void TitleBarProperties::OnFooterPropertyChanged(
00171     winrt::DependencyObject const& sender,
00172     winrt::DependencyPropertyChangedEventArgs const& args)
00173 {
00174     auto owner = sender.as<winrt::TitleBar>();
00175     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00176 }
00177
00178 void TitleBarProperties::OnHeaderPropertyChanged(
00179     winrt::DependencyObject const& sender,
00180     winrt::DependencyPropertyChangedEventArgs const& args)
00181 {
00182     auto owner = sender.as<winrt::TitleBar>();
00183     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00184 }
00185
00186 void TitleBarProperties::OnIconSourcePropertyChanged(
00187     winrt::DependencyObject const& sender,
00188     winrt::DependencyPropertyChangedEventArgs const& args)
00189 {
00190     auto owner = sender.as<winrt::TitleBar>();
00191     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00192 }
00193
00194 void TitleBarProperties::OnIsBackButtonVisiblePropertyChanged(
00195     winrt::DependencyObject const& sender,
00196     winrt::DependencyPropertyChangedEventArgs const& args)
00197 {
00198     auto owner = sender.as<winrt::TitleBar>();
00199     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00200 }
00201
00202 void TitleBarProperties::OnIsBackEnabledPropertyChanged(
00203     winrt::DependencyObject const& sender,
00204     winrt::DependencyPropertyChangedEventArgs const& args)
00205 {
00206     auto owner = sender.as<winrt::TitleBar>();
00207     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00208 }
00209
00210 void TitleBarProperties::OnIsPaneToggleButtonVisiblePropertyChanged(
00211     winrt::DependencyObject const& sender,
00212     winrt::DependencyPropertyChangedEventArgs const& args)
00213 {
00214     auto owner = sender.as<winrt::TitleBar>();
00215     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00216 }
00217
00218 void TitleBarProperties::OnSubtitlePropertyChanged(
00219     winrt::DependencyObject const& sender,
00220     winrt::DependencyPropertyChangedEventArgs const& args)
00221 {
00222     auto owner = sender.as<winrt::TitleBar>();
00223     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00224 }
00225
00226 void TitleBarProperties::OnTemplateSettingsPropertyChanged(
00227     winrt::DependencyObject const& sender,
00228     winrt::DependencyPropertyChangedEventArgs const& args)
00229 {
00230     auto owner = sender.as<winrt::TitleBar>();
00231     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00232 }
00233
00234 void TitleBarProperties::OnTitlePropertyChanged(
00235     winrt::DependencyObject const& sender,
00236     winrt::DependencyPropertyChangedEventArgs const& args)
00237 {
00238     auto owner = sender.as<winrt::TitleBar>();
00239     winrt::get_self<TitleBar>(owner)->OnPropertyChanged(args);
00240 }
00241
00242 void TitleBarProperties::Content(winrt::IInspectable const& value)
00243 {
00244     [[gsl::suppress(con)]]
00245     {
00246     static_cast<TitleBar*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00247     }
00248 }
00249
00250 winrt::IInspectable TitleBarProperties::Content()
00251 {
00252     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_ContentProperty));
00253 }
00254
00255 void TitleBarProperties::Footer(winrt::IInspectable const& value)
00256 {
00257     [[gsl::suppress(con)]]
00258     {
00259     static_cast<TitleBar*>(this)->SetValue(s_FooterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00260     }
00261 }
00262
00263 winrt::IInspectable TitleBarProperties::Footer()
00264 {
00265     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_FooterProperty));
00266 }
00267
00268 void TitleBarProperties::Header(winrt::IInspectable const& value)
00269 {
00270     [[gsl::suppress(con)]]
00271     {
00272     static_cast<TitleBar*>(this)->SetValue(s_HeaderProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00273     }
00274 }
00275
00276 winrt::IInspectable TitleBarProperties::Header()
00277 {
00278     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_HeaderProperty));
00279 }
00280
00281 void TitleBarProperties::IconSource(winrt::IconSource const& value)
00282 {
00283     [[gsl::suppress(con)]]
00284     {
00285     static_cast<TitleBar*>(this)->SetValue(s_IconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
00286     }
00287 }
00288
00289 winrt::IconSource TitleBarProperties::IconSource()
00290 {
00291     return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_IconSourceProperty));
00292 }
00293
00294 void TitleBarProperties::IsBackButtonVisible(bool value)
00295 {
00296     [[gsl::suppress(con)]]
00297     {
00298     static_cast<TitleBar*>(this)->SetValue(s_IsBackButtonVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00299     }
00300 }
00301
00302 bool TitleBarProperties::IsBackButtonVisible()
00303 {
00304     return ValueHelper<bool>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_IsBackButtonVisibleProperty));
00305 }
00306
00307 void TitleBarProperties::IsBackEnabled(bool value)
00308 {
00309     [[gsl::suppress(con)]]
00310     {
00311     static_cast<TitleBar*>(this)->SetValue(s_IsBackEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00312     }
00313 }
00314
00315 bool TitleBarProperties::IsBackEnabled()
00316 {
00317     return ValueHelper<bool>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_IsBackEnabledProperty));
00318 }
00319
00320 void TitleBarProperties::IsPaneToggleButtonVisible(bool value)
00321 {
00322     [[gsl::suppress(con)]]
00323     {
00324     static_cast<TitleBar*>(this)->SetValue(s_IsPaneToggleButtonVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00325     }
00326 }
00327
00328 bool TitleBarProperties::IsPaneToggleButtonVisible()
00329 {
00330     return ValueHelper<bool>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_IsPaneToggleButtonVisibleProperty));
00331 }
00332
00333 void TitleBarProperties::Subtitle(winrt::hstring const& value)
00334 {
00335     [[gsl::suppress(con)]]
00336     {
00337     static_cast<TitleBar*>(this)->SetValue(s_SubtitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00338     }
00339 }
00340
00341 winrt::hstring TitleBarProperties::Subtitle()
00342 {
00343     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_SubtitleProperty));
00344 }
00345
00346 void TitleBarProperties::TemplateSettings(winrt::TitleBarTemplateSettings const& value)
00347 {
00348     [[gsl::suppress(con)]]
00349     {
00350     static_cast<TitleBar*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::TitleBarTemplateSettings>::BoxValueIfNecessary(value));
00351     }
00352 }
00353
00354 winrt::TitleBarTemplateSettings TitleBarProperties::TemplateSettings()
00355 {
00356     return ValueHelper<winrt::TitleBarTemplateSettings>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_TemplateSettingsProperty));
00357 }
00358
00359 void TitleBarProperties::Title(winrt::hstring const& value)
00360 {
00361     [[gsl::suppress(con)]]
00362     {
00363     static_cast<TitleBar*>(this)->SetValue(s_TitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00364     }
00365 }
00366
00367 winrt::hstring TitleBarProperties::Title()
00368 {
00369     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<TitleBar*>(this)->GetValue(s_TitleProperty));
00370 }
00371
00372 winrt::event_token TitleBarProperties::BackRequested(winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable> const& value)
00373 {
00374     return m_backRequestedEventSource.add(value);
00375 }
00376
00377 void TitleBarProperties::BackRequested(winrt::event_token const& token)
00378 {
00379     m_backRequestedEventSource.remove(token);
00380 }
00381
00382 winrt::event_token TitleBarProperties::PaneToggleRequested(winrt::TypedEventHandler<winrt::TitleBar, winrt::IInspectable> const& value)
00383 {
00384     return m_paneToggleRequestedEventSource.add(value);
00385 }
00386
00387 void TitleBarProperties::PaneToggleRequested(winrt::event_token const& token)
00388 {
00389     m_paneToggleRequestedEventSource.remove(token);
00390 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingItemFontInfo.cpp Source File

  • File List
  • File Members
  • RatingControl

RatingItemFontInfo.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include <RatingItemFontInfo.h>
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IGammaTransferEffect Member List

This is the complete list of members for IGammaTransferEffect, including all inherited members.
AlphaAmplitude([out, retval] float *value) | IGammaTransferEffect
AlphaAmplitude([in] float value) | IGammaTransferEffect
AlphaDisable([out, retval] boolean *value) | IGammaTransferEffect
AlphaDisable([in] boolean value) | IGammaTransferEffect
AlphaExponent([out, retval] float *value) | IGammaTransferEffect
AlphaExponent([in] float value) | IGammaTransferEffect
AlphaOffset([out, retval] float *value) | IGammaTransferEffect
AlphaOffset([in] float value) | IGammaTransferEffect
BlueAmplitude([out, retval] float *value) | IGammaTransferEffect
BlueAmplitude([in] float value) | IGammaTransferEffect
BlueDisable([out, retval] boolean *value) | IGammaTransferEffect
BlueDisable([in] boolean value) | IGammaTransferEffect
BlueExponent([out, retval] float *value) | IGammaTransferEffect
BlueExponent([in] float value) | IGammaTransferEffect
BlueOffset([out, retval] float *value) | IGammaTransferEffect
BlueOffset([in] float value) | IGammaTransferEffect
ClampOutput([out, retval] boolean *value) | IGammaTransferEffect
ClampOutput([in] boolean value) | IGammaTransferEffect
GreenAmplitude([out, retval] float *value) | IGammaTransferEffect
GreenAmplitude([in] float value) | IGammaTransferEffect
GreenDisable([out, retval] boolean *value) | IGammaTransferEffect
GreenDisable([in] boolean value) | IGammaTransferEffect
GreenExponent([out, retval] float *value) | IGammaTransferEffect
GreenExponent([in] float value) | IGammaTransferEffect
GreenOffset([out, retval] float *value) | IGammaTransferEffect
GreenOffset([in] float value) | IGammaTransferEffect
RedAmplitude([out, retval] float *value) | IGammaTransferEffect
RedAmplitude([in] float value) | IGammaTransferEffect
RedDisable([out, retval] boolean *value) | IGammaTransferEffect
RedDisable([in] boolean value) | IGammaTransferEffect
RedExponent([out, retval] float *value) | IGammaTransferEffect
RedExponent([in] float value) | IGammaTransferEffect
RedOffset([out, retval] float *value) | IGammaTransferEffect
RedOffset([in] float value) | IGammaTransferEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IGammaTransferEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IGammaTransferEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItemTemplateSettings.h Source File

  • File List
  • File Members
  • TabView

TabViewItemTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TabViewItemTemplateSettings.g.h"
00007 #include "TabViewItemTemplateSettings.properties.h"
00008
00009 class TabViewItemTemplateSettings :
00010     public winrt::implementation::TabViewItemTemplateSettingsT<TabViewItemTemplateSettings>,
00011     public TabViewItemTemplateSettingsProperties
00012 {
00013 public:
00014     TabViewItemTemplateSettings() { EnsureProperties();  }
00015 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTemplateSettings.cpp Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipTemplateSettings.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TeachingTipTemplateSettings.h"
00007
00008 TeachingTipTemplateSettings::TeachingTipTemplateSettings()
00009 {
00010     EnsureProperties();
00011 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapLayer.properties.cpp Source File

  • File List
  • File Members
  • Generated

MapLayer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MapLayer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(MapLayer)
00012 }
00013
00014 #include "MapLayer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/CalendarViewPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

CalendarViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using Windows.Globalization;
00008 using Windows.UI;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Media;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     [TopLevelTestPage(Name = "CalendarView", Icon = "CalendarView.png")]
00016     public sealed partial class CalendarViewPage : TestPage
00017     {
00018         private string[] _defaultBrushColors = null;
00019
00020         public CalendarViewPage()
00021         {
00022             this.InitializeComponent();
00023
00024             List<string> calendarIdentifiers = new List<string>()
00025             {
00026                 CalendarIdentifiers.Gregorian,
00027                 CalendarIdentifiers.Hebrew,
00028                 CalendarIdentifiers.Hijri,
00029                 CalendarIdentifiers.Japanese,
00030                 CalendarIdentifiers.Julian,
00031                 CalendarIdentifiers.Korean,
00032                 CalendarIdentifiers.Persian,
00033                 CalendarIdentifiers.Taiwan,
00034                 CalendarIdentifiers.Thai,
00035                 CalendarIdentifiers.UmAlQura,
00036             };
00037
00038             calendarIdentifier.ItemsSource = calendarIdentifiers;
00039             calendarIdentifier.SelectedItem = CalendarIdentifiers.Gregorian;
00040
00041             _defaultBrushColors = new string[brushPropertyName.Items.Count];
00042
00043             PageCalendar.CalendarViewDayItemChanging += CalendarView_CalendarViewDayItemChanging;
00044             PageCalendar2.CalendarViewDayItemChanging += CalendarView_CalendarViewDayItemChanging;
00045         }
00046
00047         private void CalendarView_CalendarViewDayItemChanging(CalendarView sender, CalendarViewDayItemChangingEventArgs args)
00048         {
00049             // Render basic day items.
00050             if (args.Phase == 0)
00051             {
00052                 if (isTodayBlackedOut.IsChecked.Value || isSundayBlackedOut.IsChecked.Value || hasDensityBars.IsChecked.Value)
00053                 {
00054                     // Register callback for next phase.
00055                     args.RegisterUpdateCallback(CalendarView_CalendarViewDayItemChanging);
00056                 }
00057             }
00058             // Set blackout dates.
00059             else if (args.Phase == 1)
00060             {
00061                 // Blackout Sundays and/or Today.
00062                 SetBlackout(args.Item);
00063
00064                 if (hasDensityBars.IsChecked.Value)
00065                 {
00066                     // Register callback for next phase.
00067                     args.RegisterUpdateCallback(CalendarView_CalendarViewDayItemChanging);
00068                 }
00069             }
00070             // Set density bars.
00071             else if (args.Phase == 2)
00072             {
00073                 SetDensityColors(args.Item);
00074             }
00075         }
00076
00077         private void SetDensityColors(CalendarViewDayItem dayItem)
00078         {
00079             if (hasDensityBars.IsChecked.Value)
00080             {
00081                 Calendar calendar = new Calendar();
00082                 calendar.SetDateTime(dayItem.Date);
00083
00084                 DateTime today = DateTime.Now.Date;
00085                 bool isToday = calendar.Day == today.Day && calendar.Month == today.Month && calendar.Year == today.Year;
00086
00087                 if (calendar.Day % 6 == 0 || isToday)
00088                 {
00089                     List<Color> densityColors = new List<Color>();
00090
00091                     densityColors.Add(Microsoft.UI.Colors.Green);
00092                     densityColors.Add(Microsoft.UI.Colors.Green);
00093
00094                     if (calendar.Day % 4 == 0 || isToday)
00095                     {
00096                         densityColors.Add(Microsoft.UI.Colors.Blue);
00097                         densityColors.Add(Microsoft.UI.Colors.Blue);
00098                     }
00099                     if (calendar.Day % 9 == 0 || isToday)
00100                     {
00101                         densityColors.Add(Microsoft.UI.Colors.Orange);
00102                     }
00103                     if (isToday)
00104                     {
00105                         densityColors.Add(Microsoft.UI.Colors.Red);
00106                         densityColors.Add(Microsoft.UI.Colors.Yellow);
00107                     }
00108
00109                     dayItem.SetDensityColors(densityColors);
00110                 }
00111             }
00112             else
00113             {
00114                 dayItem.SetDensityColors(null);
00115             }
00116         }
00117
00118         private void SetBlackout(CalendarViewDayItem dayItem)
00119         {
00120             Calendar calendar = new Calendar();
00121
00122             calendar.SetDateTime(dayItem.Date);
00123
00124             bool isBlackout = isSundayBlackedOut.IsChecked.Value && calendar.DayOfWeek == Windows.Globalization.DayOfWeek.Sunday;
00125
00126             if (!isBlackout && isTodayBlackedOut.IsChecked.Value)
00127             {
00128                 Calendar calendarToday = new Calendar();
00129                 calendarToday.SetToNow();
00130                 isBlackout = calendar.Day == calendarToday.Day && calendar.Month == calendarToday.Month && calendar.Year == calendarToday.Year;
00131             }
00132
00133             dayItem.IsBlackout = isBlackout;
00134         }
00135
00136         private void SelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00137         {
00138             CalendarViewSelectionMode selectionMode;
00139             if (Enum.TryParse<CalendarViewSelectionMode>((sender as ComboBox).SelectedItem.ToString(), out selectionMode))
00140             {
00141                 if (PageCalendar != null && PageCalendar.SelectionMode != selectionMode)
00142                 {
00143                     PageCalendar.SelectionMode = selectionMode;
00144                 }
00145                 if (PageCalendar2 != null && PageCalendar2.SelectionMode != selectionMode)
00146                 {
00147                     PageCalendar2.SelectionMode = selectionMode;
00148                 }
00149             }
00150         }
00151
00152         private void FirstDayOfWeek_SelectionChanged(object sender, SelectionChangedEventArgs e)
00153         {
00154             Windows.Globalization.DayOfWeek weekDay = firstDayOfWeek.SelectedIndex == 0 ? Windows.Globalization.DayOfWeek.Sunday : Windows.Globalization.DayOfWeek.Monday;
00155
00156             if (PageCalendar != null && PageCalendar.FirstDayOfWeek != weekDay)
00157             {
00158                 PageCalendar.FirstDayOfWeek = weekDay;
00159             }
00160             if (PageCalendar2 != null && PageCalendar2.FirstDayOfWeek != weekDay)
00161             {
00162                 PageCalendar2.FirstDayOfWeek = weekDay;
00163             }
00164         }
00165
00166         private void Language_SelectionChanged(object sender, SelectionChangedEventArgs e)
00167         {
00168             string newLanguage = language.SelectedValue as string;
00169
00170             if (PageCalendar != null && newLanguage != PageCalendar.Language)
00171             {
00172                 PageCalendar.Language = newLanguage;
00173             }
00174             if (PageCalendar2 != null && newLanguage != PageCalendar2.Language)
00175             {
00176                 PageCalendar2.Language = newLanguage;
00177             }
00178         }
00179
00180         private void GetCalendarSize_Click(object sender, RoutedEventArgs e)
00181         {
00182             calendarWidth.Text = PageCalendar2.Width.ToString();
00183             calendarActualWidth.Text = PageCalendar2.ActualWidth.ToString();
00184             calendarHeight.Text = PageCalendar2.Height.ToString();
00185             calendarActualHeight.Text = PageCalendar2.ActualHeight.ToString();
00186         }
00187
00188         private void SetCalendarSize_Click(object sender, RoutedEventArgs e)
00189         {
00190             PageCalendar2.Width = Double.Parse(calendarWidth.Text);
00191             PageCalendar2.Height = Double.Parse(calendarHeight.Text);
00192         }
00193
00194         private void GetNumberOfWeeksInView_Click(object sender, RoutedEventArgs e)
00195         {
00196             numberOfWeeksInView.Text = PageCalendar.NumberOfWeeksInView.ToString();
00197         }
00198
00199         private void SetNumberOfWeeksInView_Click(object sender, RoutedEventArgs e)
00200         {
00201             PageCalendar.NumberOfWeeksInView = Int32.Parse(numberOfWeeksInView.Text);
00202             PageCalendar2.NumberOfWeeksInView = Int32.Parse(numberOfWeeksInView.Text);
00203         }
00204
00205         private void SetDayItemMargin_Click(object sender, RoutedEventArgs e)
00206         {
00207             if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00208             {
00209                 string[] thicknessParts = dayItemMargin.Text.Split(',');
00210
00211                 PageCalendar.DayItemMargin = new Thickness(
00212                     float.Parse(thicknessParts[0]),
00213                     float.Parse(thicknessParts[1]),
00214                     float.Parse(thicknessParts[2]),
00215                     float.Parse(thicknessParts[3]));
00216
00217                 PageCalendar2.DayItemMargin = new Thickness(
00218                     float.Parse(thicknessParts[0]),
00219                     float.Parse(thicknessParts[1]),
00220                     float.Parse(thicknessParts[2]),
00221                     float.Parse(thicknessParts[3]));
00222             }
00223         }
00224
00225         private void SetMonthYearItemMargin_Click(object sender, RoutedEventArgs e)
00226         {
00227             if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00228             {
00229                 string[] thicknessParts = monthYearItemMargin.Text.Split(',');
00230
00231                 PageCalendar.MonthYearItemMargin = new Thickness(
00232                     float.Parse(thicknessParts[0]),
00233                     float.Parse(thicknessParts[1]),
00234                     float.Parse(thicknessParts[2]),
00235                     float.Parse(thicknessParts[3]));
00236
00237                 PageCalendar2.MonthYearItemMargin = new Thickness(
00238                     float.Parse(thicknessParts[0]),
00239                     float.Parse(thicknessParts[1]),
00240                     float.Parse(thicknessParts[2]),
00241                     float.Parse(thicknessParts[3]));
00242             }
00243         }
00244
00245         private void SetFirstOfMonthLabelMargin_Click(object sender, RoutedEventArgs e)
00246         {
00247             if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00248             {
00249                 string[] thicknessParts = firstOfMonthLabelMargin.Text.Split(',');
00250
00251                 PageCalendar.FirstOfMonthLabelMargin = new Thickness(
00252                     float.Parse(thicknessParts[0]),
00253                     float.Parse(thicknessParts[1]),
00254                     float.Parse(thicknessParts[2]),
00255                     float.Parse(thicknessParts[3]));
00256
00257                 PageCalendar2.FirstOfMonthLabelMargin = new Thickness(
00258                     float.Parse(thicknessParts[0]),
00259                     float.Parse(thicknessParts[1]),
00260                     float.Parse(thicknessParts[2]),
00261                     float.Parse(thicknessParts[3]));
00262             }
00263         }
00264
00265         private void SetFirstOfYearDecadeLabelMargin_Click(object sender, RoutedEventArgs e)
00266         {
00267             if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00268             {
00269                 string[] thicknessParts = firstOfYearDecadeLabelMargin.Text.Split(',');
00270
00271                 PageCalendar.FirstOfYearDecadeLabelMargin = new Thickness(
00272                     float.Parse(thicknessParts[0]),
00273                     float.Parse(thicknessParts[1]),
00274                     float.Parse(thicknessParts[2]),
00275                     float.Parse(thicknessParts[3]));
00276
00277                 PageCalendar2.FirstOfYearDecadeLabelMargin = new Thickness(
00278                     float.Parse(thicknessParts[0]),
00279                     float.Parse(thicknessParts[1]),
00280                     float.Parse(thicknessParts[2]),
00281                     float.Parse(thicknessParts[3]));
00282             }
00283         }
00284
00285         private void GetDayItemFontSize_Click(object sender, RoutedEventArgs e)
00286         {
00287             dayItemFontSize.Text = PageCalendar.DayItemFontSize.ToString();
00288         }
00289
00290         private void SetDayItemFontSize_Click(object sender, RoutedEventArgs e)
00291         {
00292             PageCalendar2.DayItemFontSize = PageCalendar.DayItemFontSize = double.Parse(dayItemFontSize.Text);
00293         }
00294
00295         private void GetMonthYearItemFontSize_Click(object sender, RoutedEventArgs e)
00296         {
00297             monthYearItemFontSize.Text = PageCalendar.MonthYearItemFontSize.ToString();
00298         }
00299
00300         private void SetMonthYearItemFontSize_Click(object sender, RoutedEventArgs e)
00301         {
00302             PageCalendar2.MonthYearItemFontSize = PageCalendar.MonthYearItemFontSize = double.Parse(monthYearItemFontSize.Text);
00303         }
00304
00305         private void GetFirstOfMonthLabelFontSize_Click(object sender, RoutedEventArgs e)
00306         {
00307             firstOfMonthLabelFontSize.Text = PageCalendar.FirstOfMonthLabelFontSize.ToString();
00308         }
00309
00310         private void SetFirstOfMonthLabelFontSize_Click(object sender, RoutedEventArgs e)
00311         {
00312             PageCalendar2.FirstOfMonthLabelFontSize = PageCalendar.FirstOfMonthLabelFontSize = double.Parse(firstOfMonthLabelFontSize.Text);
00313         }
00314
00315         private void GetFirstOfYearDecadeLabelFontSize_Click(object sender, RoutedEventArgs e)
00316         {
00317             firstOfYearDecadeLabelFontSize.Text = PageCalendar.FirstOfYearDecadeLabelFontSize.ToString();
00318         }
00319
00320         private void SetFirstOfYearDecadeLabelFontSize_Click(object sender, RoutedEventArgs e)
00321         {
00322             PageCalendar2.FirstOfYearDecadeLabelFontSize = PageCalendar.FirstOfYearDecadeLabelFontSize = double.Parse(firstOfYearDecadeLabelFontSize.Text);
00323         }
00324
00325         private void SetCalendarItemCornerRadius_Click(object sender, RoutedEventArgs e)
00326         {
00327             if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00328             {
00329                 PageCalendar2.CalendarItemCornerRadius = PageCalendar.CalendarItemCornerRadius = new CornerRadius(double.Parse(calendarItemCornerRadius.Text));
00330             }
00331         }
00332
00333         private void ResetCalendarItemCornerRadius_Click(object sender, RoutedEventArgs e)
00334         {
00335             if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00336             {
00337                 PageCalendar.ClearValue(CalendarView.CalendarItemCornerRadiusProperty);
00338                 PageCalendar2.ClearValue(CalendarView.CalendarItemCornerRadiusProperty);
00339             }
00340         }
00341
00342         private void GetCalendarItemBorderThickness_Click(object sender, RoutedEventArgs e)
00343         {
00344             calendarItemBorderThickness.Text = PageCalendar.CalendarItemBorderThickness.ToString();
00345         }
00346
00347         private void SetCalendarItemBorderThickness_Click(object sender, RoutedEventArgs e)
00348         {
00349             PageCalendar.CalendarItemBorderThickness = new Thickness(Single.Parse(calendarItemBorderThickness.Text));
00350             PageCalendar2.CalendarItemBorderThickness = new Thickness(Single.Parse(calendarItemBorderThickness.Text));
00351         }
00352
00353         private Brush GetBrushFromIndex()
00354         {
00355             switch (brushPropertyName.SelectedIndex)
00356             {
00357                 case 0: // Background
00358                     return PageCalendar.Background;
00359                 case 2: // BlackoutForeground
00360                     return PageCalendar.BlackoutForeground;
00361                 case 4: // BorderBrush
00362                     return PageCalendar.BorderBrush;
00363                 case 5: // CalendarItemBorderBrush
00364                     return PageCalendar.CalendarItemBorderBrush;
00365                 case 6: // CalendarItemBackground
00366                     return PageCalendar.CalendarItemBackground;
00367                 case 8: // CalendarItemForeground
00368                     return PageCalendar.CalendarItemForeground;
00369                 case 12: // Foreground
00370                     return PageCalendar.Foreground;
00371                 case 13: // HoverBorderBrush
00372                     return PageCalendar.HoverBorderBrush;
00373                 case 14: // OutOfScopeBackground
00374                     return PageCalendar.OutOfScopeBackground;
00375                 case 15: // OutOfScopeForeground
00376                     return PageCalendar.OutOfScopeForeground;
00377                 case 18: // PressedBorderBrush
00378                     return PageCalendar.PressedBorderBrush;
00379                 case 19: // PressedForeground
00380                     return PageCalendar.PressedForeground;
00381                 case 20: // SelectedBorderBrush
00382                     return PageCalendar.SelectedBorderBrush;
00383                 case 23: // SelectedForeground
00384                     return PageCalendar.SelectedForeground;
00385                 case 24: // SelectedHoverBorderBrush
00386                     return PageCalendar.SelectedHoverBorderBrush;
00387                 case 26: // SelectedPressedBorderBrush
00388                     return PageCalendar.SelectedPressedBorderBrush;
00389                 case 32: // TodayForeground
00390                     return PageCalendar.TodayForeground;
00391                 case 36: // CalendarViewDayItem.Background
00392                     return null;
00393                 default:
00394                     if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00395                     {
00396                         switch (brushPropertyName.SelectedIndex)
00397                         {
00398                             case 1: // BlackoutBackground
00399                                 return PageCalendar.BlackoutBackground;
00400                             case 3: // BlackoutStrikethroughBrush
00401                                 return PageCalendar.BlackoutStrikethroughBrush;
00402                             case 4: // CalendarItemDisabledBackground
00403                                 return PageCalendar.CalendarItemDisabledBackground;
00404                             case 9: // CalendarItemHoverBackground
00405                                 return PageCalendar.CalendarItemHoverBackground;
00406                             case 10: // CalendarItemPressedBackground
00407                                 return PageCalendar.CalendarItemPressedBackground;
00408                             case 11: // DisabledForeground
00409                                 return PageCalendar.DisabledForeground;
00410                             case 16: // OutOfScopeHoverForeground
00411                                 return PageCalendar.OutOfScopeHoverForeground;
00412                             case 17: // OutOfScopePressedForeground
00413                                 return PageCalendar.OutOfScopePressedForeground;
00414                             case 21: // SelectedDisabledBorderBrush
00415                                 return PageCalendar.SelectedDisabledBorderBrush;
00416                             case 22: // SelectedDisabledForeground
00417                                 return PageCalendar.SelectedDisabledForeground;
00418                             case 25: // SelectedHoverForeground
00419                                 return PageCalendar.SelectedHoverForeground;
00420                             case 27: // SelectedPressedForeground
00421                                 return PageCalendar.SelectedPressedForeground;
00422                             case 28: // TodayBackground
00423                                 return PageCalendar.TodayBackground;
00424                             case 29: // TodayBlackoutBackground
00425                                 return PageCalendar.TodayBlackoutBackground;
00426                             case 30: // TodayBlackoutForeground
00427                                 return PageCalendar.TodayBlackoutForeground;
00428                             case 31: // TodayDisabledBackground
00429                                 return PageCalendar.TodayDisabledBackground;
00430                             case 33: // TodayHoverBackground
00431                                 return PageCalendar.TodayHoverBackground;
00432                             case 34: // TodayPressedBackground
00433                                 return PageCalendar.TodayPressedBackground;
00434                             case 35: // TodaySelectedInnerBorderBrush
00435                                 return PageCalendar.TodaySelectedInnerBorderBrush;
00436                             default:
00437                                 return null;
00438                         }
00439                     }
00440                     return null;
00441             }
00442         }
00443
00444         private void GetBrushColor_Click(object sender, RoutedEventArgs e)
00445         {
00446             GetBrushColor(GetBrushFromIndex());
00447         }
00448
00449         private void GetBrushColor(Brush brush)
00450         {
00451             brushColor.Text = GetBrushColorString(brush);
00452         }
00453
00454         private string GetBrushColorString(Brush brush)
00455         {
00456             SolidColorBrush solidColorBrush = brush as SolidColorBrush;
00457
00458             if (solidColorBrush == null)
00459             {
00460                 return "N/A";
00461             }
00462             else
00463             {
00464                 return solidColorBrush.Color.ToString();
00465             }
00466         }
00467
00468         private void SetBrushColor_Click(object sender, RoutedEventArgs e)
00469         {
00470             SolidColorBrush solidColorBrush = GetSolidColorBrush();
00471
00472             if (solidColorBrush == null && brushPropertyName.SelectedIndex != 36)
00473             {
00474                 return;
00475             }
00476
00477             switch (brushPropertyName.SelectedIndex)
00478             {
00479                 case 0: // Background
00480                     PageCalendar.Background = PageCalendar2.Background = solidColorBrush;
00481                     break;
00482                 case 2: // BlackoutForeground
00483                     PageCalendar.BlackoutForeground = PageCalendar2.BlackoutForeground = solidColorBrush;
00484                     break;
00485                 case 4: // BorderBrush
00486                     PageCalendar.BorderBrush = PageCalendar2.BorderBrush = solidColorBrush;
00487                     break;
00488                 case 5: // CalendarItemBorderBrush
00489                     PageCalendar.CalendarItemBorderBrush = PageCalendar2.CalendarItemBorderBrush = solidColorBrush;
00490                     break;
00491                 case 6: // CalendarItemBackground
00492                     PageCalendar.CalendarItemBackground = PageCalendar2.CalendarItemBackground = solidColorBrush;
00493                     break;
00494                 case 8: // CalendarItemForeground
00495                     PageCalendar.CalendarItemForeground = PageCalendar2.CalendarItemForeground = solidColorBrush;
00496                     break;
00497                 case 12: // Foreground
00498                     PageCalendar.Foreground = PageCalendar2.Foreground = solidColorBrush;
00499                     break;
00500                 case 13: // HoverBorderBrush
00501                     PageCalendar.HoverBorderBrush = PageCalendar2.HoverBorderBrush = solidColorBrush;
00502                     break;
00503                 case 14: // OutOfScopeBackground
00504                     PageCalendar.OutOfScopeBackground = PageCalendar2.OutOfScopeBackground = solidColorBrush;
00505                     break;
00506                 case 15: // OutOfScopeForeground
00507                     PageCalendar.OutOfScopeForeground = PageCalendar2.OutOfScopeForeground = solidColorBrush;
00508                     break;
00509                 case 18: // PressedBorderBrush
00510                     PageCalendar.PressedBorderBrush = PageCalendar2.PressedBorderBrush = solidColorBrush;
00511                     break;
00512                 case 19: // PressedForeground
00513                     PageCalendar.PressedForeground = PageCalendar2.PressedForeground = solidColorBrush;
00514                     break;
00515                 case 20: // SelectedBorderBrush
00516                     PageCalendar.SelectedBorderBrush = PageCalendar2.SelectedBorderBrush = solidColorBrush;
00517                     break;
00518                 case 23: // SelectedForeground
00519                     PageCalendar.SelectedForeground = PageCalendar2.SelectedForeground = solidColorBrush;
00520                     break;
00521                 case 24: // SelectedHoverBorderBrush
00522                     PageCalendar.SelectedHoverBorderBrush = PageCalendar2.SelectedHoverBorderBrush = solidColorBrush;
00523                     break;
00524                 case 26: // SelectedPressedBorderBrush
00525                     PageCalendar.SelectedPressedBorderBrush = PageCalendar2.SelectedPressedBorderBrush = solidColorBrush;
00526                     break;
00527                 case 32: // TodayForeground
00528                     PageCalendar.TodayForeground = PageCalendar2.TodayForeground = solidColorBrush;
00529                     break;
00530                 case 36: // CalendarViewDayItem.Background
00531                     SetBackgrounds(PageCalendar, solidColorBrush);
00532                     SetBackgrounds(PageCalendar2, solidColorBrush);
00533                     break;
00534                 default:
00535                     if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.TwentyOneH1))
00536                     {
00537                         switch (brushPropertyName.SelectedIndex)
00538                         {
00539                             case 1: // BlackoutBackground
00540                                 PageCalendar.BlackoutBackground = PageCalendar2.BlackoutBackground = solidColorBrush;
00541                                 break;
00542                             case 3: // BlackoutStrikethroughBrush
00543                                 PageCalendar.BlackoutStrikethroughBrush = PageCalendar2.BlackoutStrikethroughBrush = solidColorBrush;
00544                                 break;
00545                             case 7: // CalendarItemDisabledBackground
00546                                 PageCalendar.CalendarItemDisabledBackground = PageCalendar2.CalendarItemDisabledBackground = solidColorBrush;
00547                                 break;
00548                             case 9: // CalendarItemHoverBackground
00549                                 PageCalendar.CalendarItemHoverBackground = PageCalendar2.CalendarItemHoverBackground = solidColorBrush;
00550                                 break;
00551                             case 10: // CalendarItemPressedBackground
00552                                 PageCalendar.CalendarItemPressedBackground = PageCalendar2.CalendarItemPressedBackground = solidColorBrush;
00553                                 break;
00554                             case 11: // DisabledForeground
00555                                 PageCalendar.DisabledForeground = PageCalendar2.DisabledForeground = solidColorBrush;
00556                                 break;
00557                             case 16: // OutOfScopeHoverForeground
00558                                 PageCalendar.OutOfScopeHoverForeground = PageCalendar2.OutOfScopeHoverForeground = solidColorBrush;
00559                                 break;
00560                             case 17: // OutOfScopePressedForeground
00561                                 PageCalendar.OutOfScopePressedForeground = PageCalendar2.OutOfScopePressedForeground = solidColorBrush;
00562                                 break;
00563                             case 21: // SelectedDisabledBorderBrush
00564                                 PageCalendar.SelectedDisabledBorderBrush = PageCalendar2.SelectedDisabledBorderBrush = solidColorBrush;
00565                                 break;
00566                             case 22: // SelectedDisabledForeground
00567                                 PageCalendar.SelectedDisabledForeground = PageCalendar2.SelectedDisabledForeground = solidColorBrush;
00568                                 break;
00569                             case 25: // SelectedHoverForeground
00570                                 PageCalendar.SelectedHoverForeground = PageCalendar2.SelectedHoverForeground = solidColorBrush;
00571                                 break;
00572                             case 27: // SelectedPressedForeground
00573                                 PageCalendar.SelectedPressedForeground = PageCalendar2.SelectedPressedForeground = solidColorBrush;
00574                                 break;
00575                             case 28: // TodayBackground
00576                                 PageCalendar.TodayBackground = PageCalendar2.TodayBackground = solidColorBrush;
00577                                 break;
00578                             case 29: // TodayBlackoutBackground
00579                                 PageCalendar.TodayBlackoutBackground = PageCalendar2.TodayBlackoutBackground = solidColorBrush;
00580                                 break;
00581                             case 30: // TodayBlackoutForeground
00582                                 PageCalendar.TodayBlackoutForeground = PageCalendar2.TodayBlackoutForeground = solidColorBrush;
00583                                 break;
00584                             case 31: // TodayDisabledBackground
00585                                 PageCalendar.TodayDisabledBackground = PageCalendar2.TodayDisabledBackground = solidColorBrush;
00586                                 break;
00587                             case 33: // TodayHoverBackground
00588                                 PageCalendar.TodayHoverBackground = PageCalendar2.TodayHoverBackground = solidColorBrush;
00589                                 break;
00590                             case 34: // TodayPressedBackground
00591                                 PageCalendar.TodayPressedBackground = PageCalendar2.TodayPressedBackground = solidColorBrush;
00592                                 break;
00593                             case 35: // TodaySelectedInnerBorderBrush
00594                                 PageCalendar.TodaySelectedInnerBorderBrush = PageCalendar2.TodaySelectedInnerBorderBrush = solidColorBrush;
00595                                 break;
00596                         }
00597                     }
00598                     break;
00599             }
00600         }
00601
00602         private SolidColorBrush GetSolidColorBrush()
00603         {
00604             string defaultBrushColor = _defaultBrushColors[brushPropertyName.SelectedIndex];
00605
00606             if (string.IsNullOrEmpty(defaultBrushColor))
00607             {
00608                 Brush brush = GetBrushFromIndex();
00609
00610                 if (brush != null)
00611                 {
00612                     _defaultBrushColors[brushPropertyName.SelectedIndex] = GetBrushColorString(brush);
00613                 }
00614             }
00615
00616             SolidColorBrush solidColorBrush = null;
00617
00618             switch (brushColor.SelectedIndex)
00619             {
00620                 case -1:
00621                     string colorString = brushColor.SelectedValue as string;
00622                     if (colorString.Length == 9)
00623                     {
00624                         Color color = Color.FromArgb(
00625                             Byte.Parse(colorString.Substring(1, 2), System.Globalization.NumberStyles.HexNumber), // a
00626                             Byte.Parse(colorString.Substring(3, 2), System.Globalization.NumberStyles.HexNumber), // r
00627                             Byte.Parse(colorString.Substring(5, 2), System.Globalization.NumberStyles.HexNumber), // g
00628                             Byte.Parse(colorString.Substring(7, 2), System.Globalization.NumberStyles.HexNumber));// b
00629                         solidColorBrush = new SolidColorBrush(color);
00630                     }
00631                     break;
00632
00633                 case 0: // Default
00634                     if (defaultBrushColor != null && defaultBrushColor != "N/A")
00635                     {
00636                         Color defaultColor = Color.FromArgb(
00637                             Byte.Parse(defaultBrushColor.Substring(1, 2), System.Globalization.NumberStyles.HexNumber), // a
00638                             Byte.Parse(defaultBrushColor.Substring(3, 2), System.Globalization.NumberStyles.HexNumber), // r
00639                             Byte.Parse(defaultBrushColor.Substring(5, 2), System.Globalization.NumberStyles.HexNumber), // g
00640                             Byte.Parse(defaultBrushColor.Substring(7, 2), System.Globalization.NumberStyles.HexNumber));// b
00641                         solidColorBrush = new SolidColorBrush(defaultColor);
00642                     }
00643                     break;
00644
00645                 case 1: // Red
00646                     solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Red);
00647                     break;
00648
00649                 case 2: // Orange
00650                     solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Orange);
00651                     break;
00652
00653                 case 3: // Yellow
00654                     solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Yellow);
00655                     break;
00656
00657                 case 4: // Green
00658                     solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Green);
00659                     break;
00660             }
00661
00662             return solidColorBrush;
00663         }
00664
00665         private void IsSundayBlackedOut_Checked(object sender, RoutedEventArgs e)
00666         {
00667             SetBlackouts(PageCalendar);
00668             SetBlackouts(PageCalendar2);
00669         }
00670
00671         private void IsSundayBlackedOut_Unchecked(object sender, RoutedEventArgs e)
00672         {
00673             SetBlackouts(PageCalendar);
00674             SetBlackouts(PageCalendar2);
00675         }
00676
00677         private void IsTodayBlackedOut_Checked(object sender, RoutedEventArgs e)
00678         {
00679             SetBlackouts(PageCalendar);
00680             SetBlackouts(PageCalendar2);
00681         }
00682
00683         private void IsTodayBlackedOut_Unchecked(object sender, RoutedEventArgs e)
00684         {
00685             SetBlackouts(PageCalendar);
00686             SetBlackouts(PageCalendar2);
00687         }
00688
00689         private void HasDensityBars_Checked(object sender, RoutedEventArgs e)
00690         {
00691             SetDensityColors(PageCalendar);
00692             SetDensityColors(PageCalendar2);
00693         }
00694
00695         private void HasDensityBars_Unchecked(object sender, RoutedEventArgs e)
00696         {
00697             SetDensityColors(PageCalendar);
00698             SetDensityColors(PageCalendar2);
00699         }
00700
00701         private void SetBlackouts(CalendarView cv)
00702         {
00703             if (cv == null) return;
00704
00705             var dayItems = Utilities.TestUtilities.FindDescendents<CalendarViewDayItem>(cv);
00706
00707             foreach (var dayItem in dayItems)
00708             {
00709                 SetBlackout(dayItem);
00710             }
00711         }
00712
00713         private void SetBackgrounds(CalendarView cv, Brush brush)
00714         {
00715             if (cv == null) return;
00716
00717             var dayItems = Utilities.TestUtilities.FindDescendents<CalendarViewDayItem>(cv);
00718
00719             foreach (var dayItem in dayItems)
00720             {
00721                 dayItem.Background = brush;
00722             }
00723         }
00724
00725         private void SetDensityColors(CalendarView cv)
00726         {
00727             if (cv == null) return;
00728
00729             var dayItems = Utilities.TestUtilities.FindDescendents<CalendarViewDayItem>(cv);
00730
00731             foreach (var dayItem in dayItems)
00732             {
00733                 SetDensityColors(dayItem);
00734             }
00735         }
00736     }
00737 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.Design/RegisterMetadata.cs Source File

  • File List
  • File Members
  • Microsoft.UI.Xaml.Design

RegisterMetadata.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.Windows.Design.Metadata;
00005
00006 namespace Microsoft.UI.Xaml.Design
00007 {
00008     class RegisterMetadata : IProvideAttributeTable
00009     {
00010         public AttributeTable AttributeTable
00011         {
00012             get
00013             {
00014                 AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder();
00015                 return attributeTableBuilder.CreateTable();
00016             }
00017         }
00018     }
00019 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRingTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

ProgressRingTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ProgressRingTemplateSettingsProperties
00008 {
00009 public:
00010     ProgressRingTemplateSettingsProperties();
00011
00012     void EllipseDiameter(double value);
00013     double EllipseDiameter();
00014
00015     void EllipseOffset(winrt::Thickness const& value);
00016     winrt::Thickness EllipseOffset();
00017
00018     void MaxSideLength(double value);
00019     double MaxSideLength();
00020
00021     static winrt::DependencyProperty EllipseDiameterProperty() { return s_EllipseDiameterProperty; }
00022     static winrt::DependencyProperty EllipseOffsetProperty() { return s_EllipseOffsetProperty; }
00023     static winrt::DependencyProperty MaxSideLengthProperty() { return s_MaxSideLengthProperty; }
00024
00025     static GlobalDependencyProperty s_EllipseDiameterProperty;
00026     static GlobalDependencyProperty s_EllipseOffsetProperty;
00027     static GlobalDependencyProperty s_MaxSideLengthProperty;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ListViewItemPage Member List

This is the complete list of members for ListViewItemPage, including all inherited members.
Ingredients | ListViewItemPage | [private]
ListViewItemPage() | ListViewItemPage | [inline]
PopulateData() | ListViewItemPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPager.properties.cpp Source File

  • File List
  • File Members
  • Generated

PipsPager.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PipsPager.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(PipsPager)
00012 }
00013
00014 #include "PipsPager.g.cpp"
00015
00016 GlobalDependencyProperty PipsPagerProperties::s_MaxVisiblePipsProperty{ nullptr };
00017 GlobalDependencyProperty PipsPagerProperties::s_NextButtonStyleProperty{ nullptr };
00018 GlobalDependencyProperty PipsPagerProperties::s_NextButtonVisibilityProperty{ nullptr };
00019 GlobalDependencyProperty PipsPagerProperties::s_NormalPipStyleProperty{ nullptr };
00020 GlobalDependencyProperty PipsPagerProperties::s_NumberOfPagesProperty{ nullptr };
00021 GlobalDependencyProperty PipsPagerProperties::s_OrientationProperty{ nullptr };
00022 GlobalDependencyProperty PipsPagerProperties::s_PreviousButtonStyleProperty{ nullptr };
00023 GlobalDependencyProperty PipsPagerProperties::s_PreviousButtonVisibilityProperty{ nullptr };
00024 GlobalDependencyProperty PipsPagerProperties::s_SelectedPageIndexProperty{ nullptr };
00025 GlobalDependencyProperty PipsPagerProperties::s_SelectedPipStyleProperty{ nullptr };
00026 GlobalDependencyProperty PipsPagerProperties::s_TemplateSettingsProperty{ nullptr };
00027 GlobalDependencyProperty PipsPagerProperties::s_WrapModeProperty{ nullptr };
00028
00029 PipsPagerProperties::PipsPagerProperties()
00030     : m_selectedIndexChangedEventSource{static_cast<PipsPager*>(this)}
00031 {
00032     EnsureProperties();
00033 }
00034
00035 void PipsPagerProperties::EnsureProperties()
00036 {
00037     if (!s_MaxVisiblePipsProperty)
00038     {
00039         s_MaxVisiblePipsProperty =
00040             InitializeDependencyProperty(
00041                 L"MaxVisiblePips",
00042                 winrt::name_of<int>(),
00043                 winrt::name_of<winrt::PipsPager>(),
00044                 false /* isAttached */,
00045                 ValueHelper<int>::BoxValueIfNecessary(5),
00046                 winrt::PropertyChangedCallback(&OnMaxVisiblePipsPropertyChanged));
00047     }
00048     if (!s_NextButtonStyleProperty)
00049     {
00050         s_NextButtonStyleProperty =
00051             InitializeDependencyProperty(
00052                 L"NextButtonStyle",
00053                 winrt::name_of<winrt::Style>(),
00054                 winrt::name_of<winrt::PipsPager>(),
00055                 false /* isAttached */,
00056                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00057                 winrt::PropertyChangedCallback(&OnNextButtonStylePropertyChanged));
00058     }
00059     if (!s_NextButtonVisibilityProperty)
00060     {
00061         s_NextButtonVisibilityProperty =
00062             InitializeDependencyProperty(
00063                 L"NextButtonVisibility",
00064                 winrt::name_of<winrt::PipsPagerButtonVisibility>(),
00065                 winrt::name_of<winrt::PipsPager>(),
00066                 false /* isAttached */,
00067                 ValueHelper<winrt::PipsPagerButtonVisibility>::BoxValueIfNecessary(winrt::PipsPagerButtonVisibility::Collapsed),
00068                 winrt::PropertyChangedCallback(&OnNextButtonVisibilityPropertyChanged));
00069     }
00070     if (!s_NormalPipStyleProperty)
00071     {
00072         s_NormalPipStyleProperty =
00073             InitializeDependencyProperty(
00074                 L"NormalPipStyle",
00075                 winrt::name_of<winrt::Style>(),
00076                 winrt::name_of<winrt::PipsPager>(),
00077                 false /* isAttached */,
00078                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00079                 winrt::PropertyChangedCallback(&OnNormalPipStylePropertyChanged));
00080     }
00081     if (!s_NumberOfPagesProperty)
00082     {
00083         s_NumberOfPagesProperty =
00084             InitializeDependencyProperty(
00085                 L"NumberOfPages",
00086                 winrt::name_of<int>(),
00087                 winrt::name_of<winrt::PipsPager>(),
00088                 false /* isAttached */,
00089                 ValueHelper<int>::BoxValueIfNecessary(-1),
00090                 winrt::PropertyChangedCallback(&OnNumberOfPagesPropertyChanged));
00091     }
00092     if (!s_OrientationProperty)
00093     {
00094         s_OrientationProperty =
00095             InitializeDependencyProperty(
00096                 L"Orientation",
00097                 winrt::name_of<winrt::Orientation>(),
00098                 winrt::name_of<winrt::PipsPager>(),
00099                 false /* isAttached */,
00100                 ValueHelper<winrt::Orientation>::BoxValueIfNecessary(winrt::Orientation::Horizontal),
00101                 winrt::PropertyChangedCallback(&OnOrientationPropertyChanged));
00102     }
00103     if (!s_PreviousButtonStyleProperty)
00104     {
00105         s_PreviousButtonStyleProperty =
00106             InitializeDependencyProperty(
00107                 L"PreviousButtonStyle",
00108                 winrt::name_of<winrt::Style>(),
00109                 winrt::name_of<winrt::PipsPager>(),
00110                 false /* isAttached */,
00111                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00112                 winrt::PropertyChangedCallback(&OnPreviousButtonStylePropertyChanged));
00113     }
00114     if (!s_PreviousButtonVisibilityProperty)
00115     {
00116         s_PreviousButtonVisibilityProperty =
00117             InitializeDependencyProperty(
00118                 L"PreviousButtonVisibility",
00119                 winrt::name_of<winrt::PipsPagerButtonVisibility>(),
00120                 winrt::name_of<winrt::PipsPager>(),
00121                 false /* isAttached */,
00122                 ValueHelper<winrt::PipsPagerButtonVisibility>::BoxValueIfNecessary(winrt::PipsPagerButtonVisibility::Collapsed),
00123                 winrt::PropertyChangedCallback(&OnPreviousButtonVisibilityPropertyChanged));
00124     }
00125     if (!s_SelectedPageIndexProperty)
00126     {
00127         s_SelectedPageIndexProperty =
00128             InitializeDependencyProperty(
00129                 L"SelectedPageIndex",
00130                 winrt::name_of<int>(),
00131                 winrt::name_of<winrt::PipsPager>(),
00132                 false /* isAttached */,
00133                 ValueHelper<int>::BoxValueIfNecessary(0),
00134                 winrt::PropertyChangedCallback(&OnSelectedPageIndexPropertyChanged));
00135     }
00136     if (!s_SelectedPipStyleProperty)
00137     {
00138         s_SelectedPipStyleProperty =
00139             InitializeDependencyProperty(
00140                 L"SelectedPipStyle",
00141                 winrt::name_of<winrt::Style>(),
00142                 winrt::name_of<winrt::PipsPager>(),
00143                 false /* isAttached */,
00144                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00145                 winrt::PropertyChangedCallback(&OnSelectedPipStylePropertyChanged));
00146     }
00147     if (!s_TemplateSettingsProperty)
00148     {
00149         s_TemplateSettingsProperty =
00150             InitializeDependencyProperty(
00151                 L"TemplateSettings",
00152                 winrt::name_of<winrt::PipsPagerTemplateSettings>(),
00153                 winrt::name_of<winrt::PipsPager>(),
00154                 false /* isAttached */,
00155                 ValueHelper<winrt::PipsPagerTemplateSettings>::BoxedDefaultValue(),
00156                 winrt::PropertyChangedCallback(&OnTemplateSettingsPropertyChanged));
00157     }
00158     if (!s_WrapModeProperty)
00159     {
00160         s_WrapModeProperty =
00161             InitializeDependencyProperty(
00162                 L"WrapMode",
00163                 winrt::name_of<winrt::PipsPagerWrapMode>(),
00164                 winrt::name_of<winrt::PipsPager>(),
00165                 false /* isAttached */,
00166                 ValueHelper<winrt::PipsPagerWrapMode>::BoxValueIfNecessary(winrt::PipsPagerWrapMode::None),
00167                 winrt::PropertyChangedCallback(&OnWrapModePropertyChanged));
00168     }
00169 }
00170
00171 void PipsPagerProperties::ClearProperties()
00172 {
00173     s_MaxVisiblePipsProperty = nullptr;
00174     s_NextButtonStyleProperty = nullptr;
00175     s_NextButtonVisibilityProperty = nullptr;
00176     s_NormalPipStyleProperty = nullptr;
00177     s_NumberOfPagesProperty = nullptr;
00178     s_OrientationProperty = nullptr;
00179     s_PreviousButtonStyleProperty = nullptr;
00180     s_PreviousButtonVisibilityProperty = nullptr;
00181     s_SelectedPageIndexProperty = nullptr;
00182     s_SelectedPipStyleProperty = nullptr;
00183     s_TemplateSettingsProperty = nullptr;
00184     s_WrapModeProperty = nullptr;
00185 }
00186
00187 void PipsPagerProperties::OnMaxVisiblePipsPropertyChanged(
00188     winrt::DependencyObject const& sender,
00189     winrt::DependencyPropertyChangedEventArgs const& args)
00190 {
00191     auto owner = sender.as<winrt::PipsPager>();
00192     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00193 }
00194
00195 void PipsPagerProperties::OnNextButtonStylePropertyChanged(
00196     winrt::DependencyObject const& sender,
00197     winrt::DependencyPropertyChangedEventArgs const& args)
00198 {
00199     auto owner = sender.as<winrt::PipsPager>();
00200     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00201 }
00202
00203 void PipsPagerProperties::OnNextButtonVisibilityPropertyChanged(
00204     winrt::DependencyObject const& sender,
00205     winrt::DependencyPropertyChangedEventArgs const& args)
00206 {
00207     auto owner = sender.as<winrt::PipsPager>();
00208     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00209 }
00210
00211 void PipsPagerProperties::OnNormalPipStylePropertyChanged(
00212     winrt::DependencyObject const& sender,
00213     winrt::DependencyPropertyChangedEventArgs const& args)
00214 {
00215     auto owner = sender.as<winrt::PipsPager>();
00216     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00217 }
00218
00219 void PipsPagerProperties::OnNumberOfPagesPropertyChanged(
00220     winrt::DependencyObject const& sender,
00221     winrt::DependencyPropertyChangedEventArgs const& args)
00222 {
00223     auto owner = sender.as<winrt::PipsPager>();
00224     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00225 }
00226
00227 void PipsPagerProperties::OnOrientationPropertyChanged(
00228     winrt::DependencyObject const& sender,
00229     winrt::DependencyPropertyChangedEventArgs const& args)
00230 {
00231     auto owner = sender.as<winrt::PipsPager>();
00232     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00233 }
00234
00235 void PipsPagerProperties::OnPreviousButtonStylePropertyChanged(
00236     winrt::DependencyObject const& sender,
00237     winrt::DependencyPropertyChangedEventArgs const& args)
00238 {
00239     auto owner = sender.as<winrt::PipsPager>();
00240     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00241 }
00242
00243 void PipsPagerProperties::OnPreviousButtonVisibilityPropertyChanged(
00244     winrt::DependencyObject const& sender,
00245     winrt::DependencyPropertyChangedEventArgs const& args)
00246 {
00247     auto owner = sender.as<winrt::PipsPager>();
00248     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00249 }
00250
00251 void PipsPagerProperties::OnSelectedPageIndexPropertyChanged(
00252     winrt::DependencyObject const& sender,
00253     winrt::DependencyPropertyChangedEventArgs const& args)
00254 {
00255     auto owner = sender.as<winrt::PipsPager>();
00256     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00257 }
00258
00259 void PipsPagerProperties::OnSelectedPipStylePropertyChanged(
00260     winrt::DependencyObject const& sender,
00261     winrt::DependencyPropertyChangedEventArgs const& args)
00262 {
00263     auto owner = sender.as<winrt::PipsPager>();
00264     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00265 }
00266
00267 void PipsPagerProperties::OnTemplateSettingsPropertyChanged(
00268     winrt::DependencyObject const& sender,
00269     winrt::DependencyPropertyChangedEventArgs const& args)
00270 {
00271     auto owner = sender.as<winrt::PipsPager>();
00272     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00273 }
00274
00275 void PipsPagerProperties::OnWrapModePropertyChanged(
00276     winrt::DependencyObject const& sender,
00277     winrt::DependencyPropertyChangedEventArgs const& args)
00278 {
00279     auto owner = sender.as<winrt::PipsPager>();
00280     winrt::get_self<PipsPager>(owner)->OnPropertyChanged(args);
00281 }
00282
00283 void PipsPagerProperties::MaxVisiblePips(int value)
00284 {
00285     [[gsl::suppress(con)]]
00286     {
00287     static_cast<PipsPager*>(this)->SetValue(s_MaxVisiblePipsProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00288     }
00289 }
00290
00291 int PipsPagerProperties::MaxVisiblePips()
00292 {
00293     return ValueHelper<int>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_MaxVisiblePipsProperty));
00294 }
00295
00296 void PipsPagerProperties::NextButtonStyle(winrt::Style const& value)
00297 {
00298     [[gsl::suppress(con)]]
00299     {
00300     static_cast<PipsPager*>(this)->SetValue(s_NextButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00301     }
00302 }
00303
00304 winrt::Style PipsPagerProperties::NextButtonStyle()
00305 {
00306     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_NextButtonStyleProperty));
00307 }
00308
00309 void PipsPagerProperties::NextButtonVisibility(winrt::PipsPagerButtonVisibility const& value)
00310 {
00311     [[gsl::suppress(con)]]
00312     {
00313     static_cast<PipsPager*>(this)->SetValue(s_NextButtonVisibilityProperty, ValueHelper<winrt::PipsPagerButtonVisibility>::BoxValueIfNecessary(value));
00314     }
00315 }
00316
00317 winrt::PipsPagerButtonVisibility PipsPagerProperties::NextButtonVisibility()
00318 {
00319     return ValueHelper<winrt::PipsPagerButtonVisibility>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_NextButtonVisibilityProperty));
00320 }
00321
00322 void PipsPagerProperties::NormalPipStyle(winrt::Style const& value)
00323 {
00324     [[gsl::suppress(con)]]
00325     {
00326     static_cast<PipsPager*>(this)->SetValue(s_NormalPipStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00327     }
00328 }
00329
00330 winrt::Style PipsPagerProperties::NormalPipStyle()
00331 {
00332     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_NormalPipStyleProperty));
00333 }
00334
00335 void PipsPagerProperties::NumberOfPages(int value)
00336 {
00337     [[gsl::suppress(con)]]
00338     {
00339     static_cast<PipsPager*>(this)->SetValue(s_NumberOfPagesProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00340     }
00341 }
00342
00343 int PipsPagerProperties::NumberOfPages()
00344 {
00345     return ValueHelper<int>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_NumberOfPagesProperty));
00346 }
00347
00348 void PipsPagerProperties::Orientation(winrt::Orientation const& value)
00349 {
00350     [[gsl::suppress(con)]]
00351     {
00352     static_cast<PipsPager*>(this)->SetValue(s_OrientationProperty, ValueHelper<winrt::Orientation>::BoxValueIfNecessary(value));
00353     }
00354 }
00355
00356 winrt::Orientation PipsPagerProperties::Orientation()
00357 {
00358     return ValueHelper<winrt::Orientation>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_OrientationProperty));
00359 }
00360
00361 void PipsPagerProperties::PreviousButtonStyle(winrt::Style const& value)
00362 {
00363     [[gsl::suppress(con)]]
00364     {
00365     static_cast<PipsPager*>(this)->SetValue(s_PreviousButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00366     }
00367 }
00368
00369 winrt::Style PipsPagerProperties::PreviousButtonStyle()
00370 {
00371     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_PreviousButtonStyleProperty));
00372 }
00373
00374 void PipsPagerProperties::PreviousButtonVisibility(winrt::PipsPagerButtonVisibility const& value)
00375 {
00376     [[gsl::suppress(con)]]
00377     {
00378     static_cast<PipsPager*>(this)->SetValue(s_PreviousButtonVisibilityProperty, ValueHelper<winrt::PipsPagerButtonVisibility>::BoxValueIfNecessary(value));
00379     }
00380 }
00381
00382 winrt::PipsPagerButtonVisibility PipsPagerProperties::PreviousButtonVisibility()
00383 {
00384     return ValueHelper<winrt::PipsPagerButtonVisibility>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_PreviousButtonVisibilityProperty));
00385 }
00386
00387 void PipsPagerProperties::SelectedPageIndex(int value)
00388 {
00389     [[gsl::suppress(con)]]
00390     {
00391     static_cast<PipsPager*>(this)->SetValue(s_SelectedPageIndexProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00392     }
00393 }
00394
00395 int PipsPagerProperties::SelectedPageIndex()
00396 {
00397     return ValueHelper<int>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_SelectedPageIndexProperty));
00398 }
00399
00400 void PipsPagerProperties::SelectedPipStyle(winrt::Style const& value)
00401 {
00402     [[gsl::suppress(con)]]
00403     {
00404     static_cast<PipsPager*>(this)->SetValue(s_SelectedPipStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00405     }
00406 }
00407
00408 winrt::Style PipsPagerProperties::SelectedPipStyle()
00409 {
00410     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_SelectedPipStyleProperty));
00411 }
00412
00413 void PipsPagerProperties::TemplateSettings(winrt::PipsPagerTemplateSettings const& value)
00414 {
00415     [[gsl::suppress(con)]]
00416     {
00417     static_cast<PipsPager*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::PipsPagerTemplateSettings>::BoxValueIfNecessary(value));
00418     }
00419 }
00420
00421 winrt::PipsPagerTemplateSettings PipsPagerProperties::TemplateSettings()
00422 {
00423     return ValueHelper<winrt::PipsPagerTemplateSettings>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_TemplateSettingsProperty));
00424 }
00425
00426 void PipsPagerProperties::WrapMode(winrt::PipsPagerWrapMode const& value)
00427 {
00428     [[gsl::suppress(con)]]
00429     {
00430     static_cast<PipsPager*>(this)->SetValue(s_WrapModeProperty, ValueHelper<winrt::PipsPagerWrapMode>::BoxValueIfNecessary(value));
00431     }
00432 }
00433
00434 winrt::PipsPagerWrapMode PipsPagerProperties::WrapMode()
00435 {
00436     return ValueHelper<winrt::PipsPagerWrapMode>::CastOrUnbox(static_cast<PipsPager*>(this)->GetValue(s_WrapModeProperty));
00437 }
00438
00439 winrt::event_token PipsPagerProperties::SelectedIndexChanged(winrt::TypedEventHandler<winrt::PipsPager, winrt::PipsPagerSelectedIndexChangedEventArgs> const& value)
00440 {
00441     return m_selectedIndexChangedEventSource.add(value);
00442 }
00443
00444 void PipsPagerProperties::SelectedIndexChanged(winrt::event_token const& token)
00445 {
00446     m_selectedIndexChangedEventSource.remove(token);
00447 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LinedFlowLayoutDemo.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples

LinedFlowLayoutDemo.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Microsoft.UI;
00007 using Microsoft.UI.Private.Controls;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Media.Imaging;
00012 using Microsoft.UI.Xaml.Navigation;
00013 using MUXControlsTestApp.Samples.Model;
00014 using Windows.Foundation;
00015
00016 namespace MUXControlsTestApp.Samples
00017 {
00018     public sealed partial class LinedFlowLayoutDemo : TestPage
00019     {
00020         private object _asyncEventReportingLock = new object();
00021         private List<string> _lstAsyncEventMessage = new List<string>();
00022         private List<int> _lstLinedFlowLayoutLockedItemIndexes = new List<int>();
00023         private SolidColorBrush _grayBrush = new SolidColorBrush(Colors.Gray);
00024         private SolidColorBrush _whiteBrush = new SolidColorBrush(Colors.White);
00025         private Thickness _thicknessFour = new Thickness(4);
00026         private CornerRadius _cornerRadiusFour = new CornerRadius(4);
00027         private Layout _layout = null;
00028
00029         public LinedFlowLayoutDemo()
00030         {
00031             this.InitializeComponent();
00032
00033             if (chkLogScrollViewMessages.IsChecked == true || chkLogLinedFlowLayoutMessages.IsChecked == true)
00034             {
00035                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00036
00037                 if (chkLogLinedFlowLayoutMessages.IsChecked == true)
00038                 {
00039                     LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
00040                     LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;
00041                     LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
00042
00043                     MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00044                 }
00045
00046                 if (chkLogScrollViewMessages.IsChecked == true)
00047                 {
00048                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00049                 }
00050             }
00051
00052             HookLinedFlowLayoutEvents();
00053
00054             if (chkLogScrollViewEvents.IsChecked == true)
00055             {
00056                 HookScrollViewEvents();
00057             }
00058
00059             this.Loaded += LinedFlowLayoutDemo_Loaded;
00060             LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked2;
00061         }
00062
00063         ~LinedFlowLayoutDemo()
00064         {
00065         }
00066
00067         protected override void OnNavigatedFrom(NavigationEventArgs e)
00068         {
00069             LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked2;
00070             LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
00071             LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;
00072             LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
00073
00074             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00075             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00076
00077             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00078
00079             UnhookScrollViewEvents();
00080
00081             base.OnNavigatedFrom(e);
00082         }
00083
00084         private void AddChild()
00085         {
00086             try
00087             {
00088                 if (layoutPanel != null)
00089                 {
00090                     layoutPanel.Children.Add(CreateChild(layoutPanel.Children.Count));
00091                 }
00092             }
00093             catch (Exception ex)
00094             {
00095                 txtExceptionReport.Text = ex.ToString();
00096                 AppendEventMessage(ex.ToString());
00097             }
00098         }
00099
00100         private void AppendAsyncEventMessage(string asyncEventMessage)
00101         {
00102             lock (_asyncEventReportingLock)
00103             {
00104                 while (asyncEventMessage.Length > 0)
00105                 {
00106                     string msgHead = asyncEventMessage;
00107
00108                     if (asyncEventMessage.Length > 110)
00109                     {
00110                         int commaIndex = asyncEventMessage.IndexOf(',', 110);
00111                         if (commaIndex != -1)
00112                         {
00113                             msgHead = asyncEventMessage.Substring(0, commaIndex);
00114                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
00115                         }
00116                         else
00117                         {
00118                             asyncEventMessage = string.Empty;
00119                         }
00120                     }
00121                     else
00122                     {
00123                         asyncEventMessage = string.Empty;
00124                     }
00125
00126                     _lstAsyncEventMessage.Add(msgHead);
00127                 }
00128                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
00129
00130             }
00131         }
00132
00133         private void AppendAsyncEventMessage()
00134         {
00135             lock (_asyncEventReportingLock)
00136             {
00137                 foreach (string asyncEventMessage in _lstAsyncEventMessage)
00138                 {
00139                     AppendEventMessage(asyncEventMessage);
00140                 }
00141                 _lstAsyncEventMessage.Clear();
00142             }
00143         }
00144
00145         private void AppendEventMessage(string eventMessage)
00146         {
00147             lstEvents.Items.Add(eventMessage);
00148
00149             if ((bool)chkOutputDebugString.IsChecked)
00150             {
00151                 System.Diagnostics.Debug.WriteLine(eventMessage);
00152             }
00153         }
00154
00155         private void BtnAddChild_Click(object sender, RoutedEventArgs e)
00156         {
00157             AppendAsyncEventMessage("AddChild");
00158             AddChild();
00159         }
00160
00161         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
00162         {
00163             txtExceptionReport.Text = string.Empty;
00164         }
00165
00166         private void BtnClearEvents_Click(object sender, RoutedEventArgs e)
00167         {
00168             lstEvents.Items.Clear();
00169         }
00170
00171         private void BtnCopyEvents_Click(object sender, RoutedEventArgs e)
00172         {
00173             string logs = string.Empty;
00174
00175             foreach (object log in lstEvents.Items)
00176             {
00177                 logs += log.ToString() + "\n";
00178             }
00179
00180             var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage();
00181             dataPackage.SetText(logs);
00182             Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(dataPackage);
00183         }
00184
00185         private void BtnGetChildrenCount_Click(object sender, RoutedEventArgs e)
00186         {
00187             UpdateChildrenCount();
00188         }
00189
00190         private void BtnGetLayoutPanelBorderThickness_Click(object sender, RoutedEventArgs e)
00191         {
00192             UpdateLayoutPanelBorderThickness();
00193         }
00194
00195         private void BtnGetLayoutPanelCornerRadius_Click(object sender, RoutedEventArgs e)
00196         {
00197             UpdateLayoutPanelCornerRadius();
00198         }
00199
00200         private void BtnGetLayoutPanelElementActualHeight_Click(object sender, RoutedEventArgs e)
00201         {
00202             UpdateLayoutPanelElementActualHeight();
00203         }
00204
00205         private void BtnGetLayoutPanelElementActualWidth_Click(object sender, RoutedEventArgs e)
00206         {
00207             UpdateLayoutPanelElementActualWidth();
00208         }
00209
00210         private void BtnGetLayoutPanelElementCornerRadius_Click(object sender, RoutedEventArgs e)
00211         {
00212             UpdateLayoutPanelElementCornerRadius();
00213         }
00214
00215         private void BtnGetLayoutPanelElementIsEnabled_Click(object sender, RoutedEventArgs e)
00216         {
00217             UpdateLayoutPanelElementIsEnabled();
00218         }
00219
00220         private void BtnGetLayoutPanelElementMinWidth_Click(object sender, RoutedEventArgs e)
00221         {
00222             UpdateLayoutPanelElementMinWidth();
00223         }
00224
00225         private void BtnGetLayoutPanelElementMaxWidth_Click(object sender, RoutedEventArgs e)
00226         {
00227             UpdateLayoutPanelElementMaxWidth();
00228         }
00229
00230         private void BtnGetLayoutPanelElementWidth_Click(object sender, RoutedEventArgs e)
00231         {
00232             UpdateLayoutPanelElementWidth();
00233         }
00234
00235         private void BtnGetLayoutPanelElementMinHeight_Click(object sender, RoutedEventArgs e)
00236         {
00237             UpdateLayoutPanelElementMinHeight();
00238         }
00239
00240         private void BtnGetLayoutPanelElementMaxHeight_Click(object sender, RoutedEventArgs e)
00241         {
00242             UpdateLayoutPanelElementMaxHeight();
00243         }
00244
00245         private void BtnGetLayoutPanelElementHeight_Click(object sender, RoutedEventArgs e)
00246         {
00247             UpdateLayoutPanelElementHeight();
00248         }
00249
00250         private void BtnGetLayoutPanelHeight_Click(object sender, RoutedEventArgs e)
00251         {
00252             UpdateLayoutPanelHeight();
00253         }
00254
00255         private void BtnGetLayoutPanelMargin_Click(object sender, RoutedEventArgs e)
00256         {
00257             UpdateLayoutPanelMargin();
00258         }
00259
00260         private void BtnGetLayoutPanelWidth_Click(object sender, RoutedEventArgs e)
00261         {
00262             UpdateLayoutPanelWidth();
00263         }
00264
00265         private void BtnGetLayoutPanelMaxHeight_Click(object sender, RoutedEventArgs e)
00266         {
00267             UpdateLayoutPanelMaxHeight();
00268         }
00269
00270         private void BtnGetLayoutPanelMaxWidth_Click(object sender, RoutedEventArgs e)
00271         {
00272             UpdateLayoutPanelMaxWidth();
00273         }
00274
00275         private void BtnGetLayoutPanelPadding_Click(object sender, RoutedEventArgs e)
00276         {
00277             UpdateLayoutPanelPadding();
00278         }
00279
00280         private void BtnGetLayoutPanelHorizontalAlignment_Click(object sender, RoutedEventArgs e)
00281         {
00282             UpdateLayoutPanelHorizontalAlignment();
00283         }
00284
00285         private void BtnGetLayoutPanelVerticalAlignment_Click(object sender, RoutedEventArgs e)
00286         {
00287             UpdateLayoutPanelVerticalAlignment();
00288         }
00289
00290         private void BtnGetLinedFlowLayoutActualLineHeight_Click(object sender, RoutedEventArgs e)
00291         {
00292             UpdateLinedFlowLayoutActualLineHeight();
00293         }
00294
00295         private void BtnGetLinedFlowLayoutAverageItemAspectRatioDbg_Click(object sender, RoutedEventArgs e)
00296         {
00297             UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
00298         }
00299
00300         private void BtnGetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click(object sender, RoutedEventArgs e)
00301         {
00302             UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
00303         }
00304
00305         private void BtnGetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click(object sender, RoutedEventArgs e)
00306         {
00307             UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
00308         }
00309
00310         private void BtnGetLinedFlowLayoutForcedWrapMultiplierDbg_Click(object sender, RoutedEventArgs e)
00311         {
00312             UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
00313         }
00314
00315         private void BtnGetLinedFlowLayoutFrozenItemIndexesDbg_Click(object sender, RoutedEventArgs e)
00316         {
00317             UpdateLinedFlowLayoutFrozenItemIndexes();
00318         }
00319
00320         private void BtnGetLinedFlowLayoutLineHeight_Click(object sender, RoutedEventArgs e)
00321         {
00322             UpdateLinedFlowLayoutLineHeight();
00323         }
00324
00325         private void BtnGetLinedFlowLayoutLineSpacing_Click(object sender, RoutedEventArgs e)
00326         {
00327             UpdateLinedFlowLayoutLineSpacing();
00328         }
00329
00330         private void BtnGetLinedFlowLayoutLogItemIndexDbg_Click(object sender, RoutedEventArgs e)
00331         {
00332             UpdateLinedFlowLayoutLogItemIndexDbg();
00333         }
00334
00335         private void BtnGetLinedFlowLayoutMinItemSpacing_Click(object sender, RoutedEventArgs e)
00336         {
00337             UpdateLinedFlowLayoutMinItemSpacing();
00338         }
00339
00340         private void BtnGetLinedFlowLayoutRealizedItemIndexesDbg_Click(object sender, RoutedEventArgs e)
00341         {
00342             UpdateLinedFlowLayoutRealizedItemIndexes();
00343         }
00344
00345         private void BtnGetLinedFlowLayoutSnappedAverageItemsPerLineDbg_Click(object sender, RoutedEventArgs e)
00346         {
00347             UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
00348         }
00349
00350         private void BtnGetScrollViewBorderThickness_Click(object sender, RoutedEventArgs e)
00351         {
00352             UpdateScrollViewBorderThickness();
00353         }
00354
00355         private void BtnGetScrollViewContentOrientation_Click(object sender, RoutedEventArgs e)
00356         {
00357             UpdateScrollViewContentOrientation();
00358         }
00359
00360         private void BtnGetScrollViewCornerRadius_Click(object sender, RoutedEventArgs e)
00361         {
00362             UpdateScrollViewCornerRadius();
00363         }
00364
00365         private void BtnGetScrollViewExtentHeight_Click(object sender, RoutedEventArgs e)
00366         {
00367             UpdateScrollViewExtentHeight();
00368         }
00369
00370         private void BtnGetScrollViewExtentWidth_Click(object sender, RoutedEventArgs e)
00371         {
00372             UpdateScrollViewExtentWidth();
00373         }
00374
00375         private void BtnGetScrollViewHeight_Click(object sender, RoutedEventArgs e)
00376         {
00377             UpdateScrollViewHeight();
00378         }
00379
00380         private void BtnGetScrollViewHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
00381         {
00382             UpdateScrollViewHorizontalAnchorRatio();
00383         }
00384
00385         private void BtnGetScrollViewHorizontalOffset_Click(object sender, RoutedEventArgs e)
00386         {
00387             UpdateScrollViewHorizontalOffset();
00388         }
00389
00390         private void BtnGetScrollViewHorizontalScrollMode_Click(object sender, RoutedEventArgs e)
00391         {
00392             UpdateScrollViewHorizontalScrollMode();
00393         }
00394
00395         private void BtnGetScrollViewHorizontalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
00396         {
00397             UpdateScrollViewHorizontalScrollBarVisibility();
00398         }
00399
00400         private void BtnGetScrollViewMargin_Click(object sender, RoutedEventArgs e)
00401         {
00402             UpdateScrollViewMargin();
00403         }
00404
00405         private void BtnGetScrollViewMaxHeight_Click(object sender, RoutedEventArgs e)
00406         {
00407             UpdateScrollViewMaxHeight();
00408         }
00409
00410         private void BtnGetScrollViewMaxWidth_Click(object sender, RoutedEventArgs e)
00411         {
00412             UpdateScrollViewMaxWidth();
00413         }
00414
00415         private void BtnGetScrollViewPadding_Click(object sender, RoutedEventArgs e)
00416         {
00417             UpdateScrollViewPadding();
00418         }
00419
00420         private void BtnInsertChild_Click(object sender, RoutedEventArgs e)
00421         {
00422             try
00423             {
00424                 if (txtChildIndex != null)
00425                 {
00426                     int newChildIndex = int.Parse(txtChildIndex.Text);
00427
00428                     AppendAsyncEventMessage("InsertChild " + newChildIndex);
00429                     InsertChild(newChildIndex);
00430                 }
00431             }
00432             catch (Exception ex)
00433             {
00434                 txtExceptionReport.Text = ex.ToString();
00435                 AppendEventMessage(ex.ToString());
00436             }
00437         }
00438
00439         private void BtnLayoutPanelResetLayout_Click(object sender, RoutedEventArgs e)
00440         {
00441             try
00442             {
00443                 if (layoutPanel != null && layoutPanel.Layout != null)
00444                 {
00445                     _layout = layoutPanel.Layout;
00446                     layoutPanel.Layout = null;
00447                 }
00448             }
00449             catch (Exception ex)
00450             {
00451                 txtExceptionReport.Text = ex.ToString();
00452                 AppendEventMessage(ex.ToString());
00453             }
00454         }
00455
00456         private void BtnLayoutPanelSetLayout_Click(object sender, RoutedEventArgs e)
00457         {
00458             try
00459             {
00460                 if (layoutPanel != null && layoutPanel.Layout == null)
00461                 {
00462                     layoutPanel.Layout = _layout;
00463                 }
00464             }
00465             catch (Exception ex)
00466             {
00467                 txtExceptionReport.Text = ex.ToString();
00468                 AppendEventMessage(ex.ToString());
00469             }
00470         }
00471
00472         private void BtnLayoutInvalidateItemsInfo_Click(object sender, RoutedEventArgs e)
00473         {
00474             try
00475             {
00476                 if (linedFlowLayout != null)
00477                 {
00478                     linedFlowLayout.InvalidateItemsInfo();
00479                 }
00480             }
00481             catch (Exception ex)
00482             {
00483                 txtExceptionReport.Text = ex.ToString();
00484                 AppendEventMessage(ex.ToString());
00485             }
00486         }
00487
00488         private void BtnLayoutInvalidateMeasure_Click(object sender, RoutedEventArgs e)
00489         {
00490             try
00491             {
00492                 if (linedFlowLayout != null)
00493                 {
00494                     LayoutsTestHooks.LayoutInvalidateMeasure(linedFlowLayout, relayout: true);
00495                 }
00496             }
00497             catch (Exception ex)
00498             {
00499                 txtExceptionReport.Text = ex.ToString();
00500                 AppendEventMessage(ex.ToString());
00501             }
00502         }
00503
00504         private void BtnRemoveAllChildren_Click(object sender, RoutedEventArgs e)
00505         {
00506             AppendAsyncEventMessage("RemoveAllChildren");
00507             RemoveAllChildren();
00508         }
00509
00510         private void BtnRemoveChild_Click(object sender, RoutedEventArgs e)
00511         {
00512             try
00513             {
00514                 if (txtChildIndex != null)
00515                 {
00516                     int oldChildIndex = int.Parse(txtChildIndex.Text);
00517
00518                     AppendAsyncEventMessage("RemoveChild " + oldChildIndex);
00519                     RemoveChild(oldChildIndex);
00520                 }
00521             }
00522             catch (Exception ex)
00523             {
00524                 txtExceptionReport.Text = ex.ToString();
00525                 AppendEventMessage(ex.ToString());
00526             }
00527         }
00528
00529         private void BtnReplaceChild_Click(object sender, RoutedEventArgs e)
00530         {
00531             try
00532             {
00533                 if (txtChildIndex != null)
00534                 {
00535                     int childIndex = int.Parse(txtChildIndex.Text);
00536
00537                     AppendAsyncEventMessage("ReplaceChild " + childIndex);
00538                     ReplaceChild(childIndex);
00539                 }
00540             }
00541             catch (Exception ex)
00542             {
00543                 txtExceptionReport.Text = ex.ToString();
00544                 AppendEventMessage(ex.ToString());
00545             }
00546         }
00547
00548         private void BtnLinedFlowLayoutLockItemToLine_Click(object sender, RoutedEventArgs e)
00549         {
00550             try
00551             {
00552                 if (linedFlowLayout != null)
00553                 {
00554                     int itemIndex = int.Parse(txtLinedFlowLayoutItemIndex.Text);
00555                     int lineIndex = linedFlowLayout.LockItemToLine(itemIndex);
00556
00557                     txtLinedFlowLayoutLockLine.Text = lineIndex.ToString();
00558                 }
00559             }
00560             catch (Exception ex)
00561             {
00562                 txtExceptionReport.Text = ex.ToString();
00563                 AppendEventMessage(ex.ToString());
00564             }
00565         }
00566
00567         private void BtnLinedFlowLayoutUnlockItems_Click(object sender, RoutedEventArgs e)
00568         {
00569             try
00570             {
00571                 if (linedFlowLayout != null)
00572                 {
00573                     LayoutsTestHooks.UnlockLinedFlowLayoutItems(linedFlowLayout);
00574                 }
00575             }
00576             catch (Exception ex)
00577             {
00578                 txtExceptionReport.Text = ex.ToString();
00579                 AppendEventMessage(ex.ToString());
00580             }
00581         }
00582
00583         private void BtnSetChildrenCount_Click(object sender, RoutedEventArgs e)
00584         {
00585             try
00586             {
00587                 if (layoutPanel != null && txtChildrenCount != null)
00588                 {
00589                     int newChildrenCount = int.Parse(txtChildrenCount.Text);
00590
00591                     if (layoutPanel.Children.Count < newChildrenCount)
00592                     {
00593                         int addCount = newChildrenCount - layoutPanel.Children.Count;
00594
00595                         for (int childIndex = 0; childIndex < addCount; childIndex++)
00596                         {
00597                             layoutPanel.Children.Add(CreateChild(layoutPanel.Children.Count));
00598                         }
00599                     }
00600                     else
00601                     {
00602                         while (layoutPanel.Children.Count > newChildrenCount)
00603                         {
00604                             layoutPanel.Children.RemoveAt(layoutPanel.Children.Count - 1);
00605                         }
00606                     }
00607                 }
00608             }
00609             catch (Exception ex)
00610             {
00611                 txtExceptionReport.Text = ex.ToString();
00612                 AppendEventMessage(ex.ToString());
00613             }
00614         }
00615
00616         private void BtnSetLayoutPanelBorderThickness_Click(object sender, RoutedEventArgs e)
00617         {
00618             try
00619             {
00620                 if (layoutPanel != null)
00621                 {
00622                     layoutPanel.BorderThickness = GetThicknessFromString(txtLayoutPanelBorderThickness.Text);
00623                 }
00624             }
00625             catch (Exception ex)
00626             {
00627                 txtExceptionReport.Text = ex.ToString();
00628                 AppendEventMessage(ex.ToString());
00629             }
00630         }
00631
00632         private void BtnSetLayoutPanelElementCornerRadius_Click(object sender, RoutedEventArgs e)
00633         {
00634             try
00635             {
00636                 if (layoutPanel != null)
00637                 {
00638                     UIElement element = GetLayoutPanelElement();
00639
00640                     if (element is Grid grid)
00641                     {
00642                         grid.CornerRadius = GetCornerRadiusFromString(txtLayoutPanelElementCornerRadius.Text);
00643                     }
00644                 }
00645             }
00646             catch (Exception ex)
00647             {
00648                 txtExceptionReport.Text = ex.ToString();
00649                 AppendEventMessage(ex.ToString());
00650             }
00651         }
00652
00653         private void BtnSetLayoutPanelElementIsEnabled_Click(object sender, RoutedEventArgs e)
00654         {
00655             try
00656             {
00657                 if (layoutPanel != null)
00658                 {
00659                     UIElement element = GetLayoutPanelElement();
00660
00661                     if (element is Control control)
00662                     {
00663                         control.IsEnabled = (bool)chkLayoutPanelElementIsEnabled.IsChecked;
00664                     }
00665                 }
00666             }
00667             catch (Exception ex)
00668             {
00669                 txtExceptionReport.Text = ex.ToString();
00670                 AppendEventMessage(ex.ToString());
00671             }
00672         }
00673
00674         private void BtnSetLayoutPanelElementMinWidth_Click(object sender, RoutedEventArgs e)
00675         {
00676             try
00677             {
00678                 if (layoutPanel != null)
00679                 {
00680                     UIElement element = GetLayoutPanelElement();
00681
00682                     if (element is FrameworkElement frameworkElement)
00683                     {
00684                         frameworkElement.MinWidth = double.Parse(txtLayoutPanelElementMinWidth.Text);
00685                     }
00686                 }
00687             }
00688             catch (Exception ex)
00689             {
00690                 txtExceptionReport.Text = ex.ToString();
00691                 AppendEventMessage(ex.ToString());
00692             }
00693         }
00694
00695         private void BtnSetLayoutPanelElementMaxWidth_Click(object sender, RoutedEventArgs e)
00696         {
00697             try
00698             {
00699                 if (layoutPanel != null)
00700                 {
00701                     UIElement element = GetLayoutPanelElement();
00702
00703                     if (element is FrameworkElement frameworkElement)
00704                     {
00705                         frameworkElement.MaxWidth = double.Parse(txtLayoutPanelElementMaxWidth.Text);
00706                     }
00707                 }
00708             }
00709             catch (Exception ex)
00710             {
00711                 txtExceptionReport.Text = ex.ToString();
00712                 AppendEventMessage(ex.ToString());
00713             }
00714         }
00715
00716         private void BtnSetLayoutPanelElementWidth_Click(object sender, RoutedEventArgs e)
00717         {
00718             try
00719             {
00720                 if (layoutPanel != null)
00721                 {
00722                     UIElement element = GetLayoutPanelElement();
00723
00724                     if (element is FrameworkElement frameworkElement)
00725                     {
00726                         frameworkElement.Width = double.Parse(txtLayoutPanelElementWidth.Text);
00727                     }
00728                 }
00729             }
00730             catch (Exception ex)
00731             {
00732                 txtExceptionReport.Text = ex.ToString();
00733                 AppendEventMessage(ex.ToString());
00734             }
00735         }
00736
00737         private void BtnSetLayoutPanelElementMinHeight_Click(object sender, RoutedEventArgs e)
00738         {
00739             try
00740             {
00741                 if (layoutPanel != null)
00742                 {
00743                     UIElement element = GetLayoutPanelElement();
00744
00745                     if (element is FrameworkElement frameworkElement)
00746                     {
00747                         frameworkElement.MinHeight = double.Parse(txtLayoutPanelElementMinHeight.Text);
00748                     }
00749                 }
00750             }
00751             catch (Exception ex)
00752             {
00753                 txtExceptionReport.Text = ex.ToString();
00754                 AppendEventMessage(ex.ToString());
00755             }
00756         }
00757
00758         private void BtnSetLayoutPanelElementMaxHeight_Click(object sender, RoutedEventArgs e)
00759         {
00760             try
00761             {
00762                 if (layoutPanel != null)
00763                 {
00764                     UIElement element = GetLayoutPanelElement();
00765
00766                     if (element is FrameworkElement frameworkElement)
00767                     {
00768                         frameworkElement.MaxHeight = double.Parse(txtLayoutPanelElementMaxHeight.Text);
00769                     }
00770                 }
00771             }
00772             catch (Exception ex)
00773             {
00774                 txtExceptionReport.Text = ex.ToString();
00775                 AppendEventMessage(ex.ToString());
00776             }
00777         }
00778
00779         private void BtnSetLayoutPanelElementHeight_Click(object sender, RoutedEventArgs e)
00780         {
00781             try
00782             {
00783                 if (layoutPanel != null)
00784                 {
00785                     UIElement element = GetLayoutPanelElement();
00786
00787                     if (element is FrameworkElement frameworkElement)
00788                     {
00789                         frameworkElement.Height = double.Parse(txtLayoutPanelElementHeight.Text);
00790                     }
00791                 }
00792             }
00793             catch (Exception ex)
00794             {
00795                 txtExceptionReport.Text = ex.ToString();
00796                 AppendEventMessage(ex.ToString());
00797             }
00798         }
00799
00800         private void BtnSetLayoutPanelHorizontalAlignment_Click(object sender, RoutedEventArgs e)
00801         {
00802             try
00803             {
00804                 if (layoutPanel != null)
00805                 {
00806                     layoutPanel.HorizontalAlignment = (HorizontalAlignment)cmbLayoutPanelHorizontalAlignment.SelectedIndex;
00807                 }
00808             }
00809             catch (Exception ex)
00810             {
00811                 txtExceptionReport.Text = ex.ToString();
00812                 AppendEventMessage(ex.ToString());
00813             }
00814         }
00815
00816         private void BtnSetLayoutPanelVerticalAlignment_Click(object sender, RoutedEventArgs e)
00817         {
00818             try
00819             {
00820                 if (layoutPanel != null)
00821                 {
00822                     layoutPanel.VerticalAlignment = (VerticalAlignment)cmbLayoutPanelVerticalAlignment.SelectedIndex;
00823                 }
00824             }
00825             catch (Exception ex)
00826             {
00827                 txtExceptionReport.Text = ex.ToString();
00828                 AppendEventMessage(ex.ToString());
00829             }
00830         }
00831
00832         private void BtnSetLayoutPanelCornerRadius_Click(object sender, RoutedEventArgs e)
00833         {
00834             try
00835             {
00836                 if (layoutPanel != null)
00837                 {
00838                     layoutPanel.CornerRadius = GetCornerRadiusFromString(txtLayoutPanelCornerRadius.Text);
00839                 }
00840             }
00841             catch (Exception ex)
00842             {
00843                 txtExceptionReport.Text = ex.ToString();
00844                 AppendEventMessage(ex.ToString());
00845             }
00846         }
00847
00848         private void BtnSetLayoutPanelHeight_Click(object sender, RoutedEventArgs e)
00849         {
00850             try
00851             {
00852                 if (layoutPanel != null)
00853                 {
00854                     layoutPanel.Height = Convert.ToDouble(txtLayoutPanelHeight.Text);
00855                 }
00856             }
00857             catch (Exception ex)
00858             {
00859                 txtExceptionReport.Text = ex.ToString();
00860                 AppendEventMessage(ex.ToString());
00861             }
00862         }
00863
00864         private void BtnSetLayoutPanelMargin_Click(object sender, RoutedEventArgs e)
00865         {
00866             try
00867             {
00868                 if (layoutPanel != null)
00869                 {
00870                     layoutPanel.Margin = GetThicknessFromString(txtLayoutPanelMargin.Text);
00871                 }
00872             }
00873             catch (Exception ex)
00874             {
00875                 txtExceptionReport.Text = ex.ToString();
00876                 AppendEventMessage(ex.ToString());
00877             }
00878         }
00879
00880         private void BtnSetLayoutPanelMaxHeight_Click(object sender, RoutedEventArgs e)
00881         {
00882             try
00883             {
00884                 if (layoutPanel != null)
00885                 {
00886                     layoutPanel.MaxHeight = Convert.ToDouble(txtLayoutPanelMaxHeight.Text);
00887                 }
00888             }
00889             catch (Exception ex)
00890             {
00891                 txtExceptionReport.Text = ex.ToString();
00892                 AppendEventMessage(ex.ToString());
00893             }
00894         }
00895
00896         private void BtnSetLayoutPanelWidth_Click(object sender, RoutedEventArgs e)
00897         {
00898             try
00899             {
00900                 if (layoutPanel != null)
00901                 {
00902                     layoutPanel.Width = Convert.ToDouble(txtLayoutPanelWidth.Text);
00903                 }
00904             }
00905             catch (Exception ex)
00906             {
00907                 txtExceptionReport.Text = ex.ToString();
00908                 AppendEventMessage(ex.ToString());
00909             }
00910         }
00911
00912         private void BtnSetLayoutPanelMaxWidth_Click(object sender, RoutedEventArgs e)
00913         {
00914             try
00915             {
00916                 if (layoutPanel != null)
00917                 {
00918                     layoutPanel.MaxWidth = Convert.ToDouble(txtLayoutPanelMaxWidth.Text);
00919                 }
00920             }
00921             catch (Exception ex)
00922             {
00923                 txtExceptionReport.Text = ex.ToString();
00924                 AppendEventMessage(ex.ToString());
00925             }
00926         }
00927
00928         private void BtnSetLayoutPanelPadding_Click(object sender, RoutedEventArgs e)
00929         {
00930             try
00931             {
00932                 if (layoutPanel != null)
00933                 {
00934                     layoutPanel.Padding = GetThicknessFromString(txtLayoutPanelPadding.Text);
00935                 }
00936             }
00937             catch (Exception ex)
00938             {
00939                 txtExceptionReport.Text = ex.ToString();
00940                 AppendEventMessage(ex.ToString());
00941             }
00942         }
00943
00944         private void BtnSetLinedFlowLayoutForcedAverageItemAspectRatioDbg_Click(object sender, RoutedEventArgs e)
00945         {
00946             try
00947             {
00948                 if (linedFlowLayout != null)
00949                 {
00950                     LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemAspectRatio(linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text));
00951                 }
00952             }
00953             catch (Exception ex)
00954             {
00955                 txtExceptionReport.Text = ex.ToString();
00956                 AppendEventMessage(ex.ToString());
00957             }
00958         }
00959
00960         private void BtnSetLinedFlowLayoutForcedAverageItemsPerLineDividerDbg_Click(object sender, RoutedEventArgs e)
00961         {
00962             try
00963             {
00964                 if (linedFlowLayout != null)
00965                 {
00966                     LayoutsTestHooks.SetLinedFlowLayoutForcedAverageItemsPerLineDivider(linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text));
00967                 }
00968             }
00969             catch (Exception ex)
00970             {
00971                 txtExceptionReport.Text = ex.ToString();
00972                 AppendEventMessage(ex.ToString());
00973             }
00974         }
00975
00976         private void BtnSetLinedFlowLayoutForcedWrapMultiplierDbg_Click(object sender, RoutedEventArgs e)
00977         {
00978             try
00979             {
00980                 if (linedFlowLayout != null)
00981                 {
00982                     LayoutsTestHooks.SetLinedFlowLayoutForcedWrapMultiplier(linedFlowLayout, Convert.ToDouble(txtLinedFlowLayoutForcedWrapMultiplierDbg.Text));
00983                 }
00984             }
00985             catch (Exception ex)
00986             {
00987                 txtExceptionReport.Text = ex.ToString();
00988                 AppendEventMessage(ex.ToString());
00989             }
00990         }
00991
00992         private void BtnSetLinedFlowLayoutLineHeight_Click(object sender, RoutedEventArgs e)
00993         {
00994             try
00995             {
00996                 if (linedFlowLayout != null)
00997                 {
00998                     linedFlowLayout.LineHeight = Convert.ToDouble(txtLinedFlowLayoutLineHeight.Text);
00999                 }
01000             }
01001             catch (Exception ex)
01002             {
01003                 txtExceptionReport.Text = ex.ToString();
01004                 AppendEventMessage(ex.ToString());
01005             }
01006         }
01007
01008         private void BtnSetLinedFlowLayoutLineSpacing_Click(object sender, RoutedEventArgs e)
01009         {
01010             try
01011             {
01012                 if (linedFlowLayout != null)
01013                 {
01014                     linedFlowLayout.LineSpacing = Convert.ToDouble(txtLinedFlowLayoutLineSpacing.Text);
01015                 }
01016             }
01017             catch (Exception ex)
01018             {
01019                 txtExceptionReport.Text = ex.ToString();
01020                 AppendEventMessage(ex.ToString());
01021             }
01022         }
01023
01024         private void BtnSetLinedFlowLayoutLogItemIndexDbg_Click(object sender, RoutedEventArgs e)
01025         {
01026             try
01027             {
01028                 if (linedFlowLayout != null)
01029                 {
01030                     LayoutsTestHooks.SetLinedFlowLayoutLogItemIndex(linedFlowLayout, Convert.ToInt32(txtLinedFlowLayoutLogItemIndexDbg.Text));
01031                 }
01032             }
01033             catch (Exception ex)
01034             {
01035                 txtExceptionReport.Text = ex.ToString();
01036                 AppendEventMessage(ex.ToString());
01037             }
01038         }
01039
01040         private void BtnSetLinedFlowLayoutMinItemSpacing_Click(object sender, RoutedEventArgs e)
01041         {
01042             try
01043             {
01044                 if (linedFlowLayout != null)
01045                 {
01046                     linedFlowLayout.MinItemSpacing = Convert.ToDouble(txtLinedFlowLayoutMinItemSpacing.Text);
01047                 }
01048             }
01049             catch (Exception ex)
01050             {
01051                 txtExceptionReport.Text = ex.ToString();
01052                 AppendEventMessage(ex.ToString());
01053             }
01054         }
01055
01056         private void BtnSetScrollViewBorderThickness_Click(object sender, RoutedEventArgs e)
01057         {
01058             try
01059             {
01060                 if (scrollView != null)
01061                 {
01062                     scrollView.BorderThickness = GetThicknessFromString(txtScrollViewBorderThickness.Text);
01063                 }
01064             }
01065             catch (Exception ex)
01066             {
01067                 txtExceptionReport.Text = ex.ToString();
01068                 AppendEventMessage(ex.ToString());
01069             }
01070         }
01071
01072         private void BtnSetScrollViewContentOrientation_Click(object sender, RoutedEventArgs e)
01073         {
01074             try
01075             {
01076                 if (scrollView != null)
01077                 {
01078                     ScrollingContentOrientation co = (ScrollingContentOrientation)cmbScrollViewContentOrientation.SelectedIndex;
01079
01080                     scrollView.ContentOrientation = co;
01081                 }
01082             }
01083             catch (Exception ex)
01084             {
01085                 txtExceptionReport.Text = ex.ToString();
01086                 AppendEventMessage(ex.ToString());
01087             }
01088         }
01089
01090         private void BtnSetScrollViewCornerRadius_Click(object sender, RoutedEventArgs e)
01091         {
01092             try
01093             {
01094                 if (scrollView != null)
01095                 {
01096                     scrollView.CornerRadius = GetCornerRadiusFromString(txtScrollViewCornerRadius.Text);
01097                 }
01098             }
01099             catch (Exception ex)
01100             {
01101                 txtExceptionReport.Text = ex.ToString();
01102                 AppendEventMessage(ex.ToString());
01103             }
01104         }
01105
01106         private void BtnSetScrollViewHeight_Click(object sender, RoutedEventArgs e)
01107         {
01108             try
01109             {
01110                 if (scrollView != null)
01111                 {
01112                     scrollView.Height = Convert.ToDouble(txtScrollViewHeight.Text);
01113
01114                     if (canvasLinedFlowLayoutLockedItems != null)
01115                     {
01116                         canvasLinedFlowLayoutLockedItems.Height = scrollView.Height;
01117                     }
01118                 }
01119             }
01120             catch (Exception ex)
01121             {
01122                 txtExceptionReport.Text = ex.ToString();
01123                 AppendEventMessage(ex.ToString());
01124             }
01125         }
01126
01127         private void BtnSetScrollViewWidth_Click(object sender, RoutedEventArgs e)
01128         {
01129             try
01130             {
01131                 if (scrollView != null)
01132                 {
01133                     scrollView.Width = Convert.ToDouble(txtScrollViewWidth.Text);
01134                 }
01135             }
01136             catch (Exception ex)
01137             {
01138                 txtExceptionReport.Text = ex.ToString();
01139                 AppendEventMessage(ex.ToString());
01140             }
01141         }
01142
01143         private void BtnSetScrollViewHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
01144         {
01145             try
01146             {
01147                 if (scrollView != null)
01148                 {
01149                     scrollView.HorizontalAnchorRatio = Convert.ToDouble(txtScrollViewHorizontalAnchorRatio.Text);
01150                 }
01151             }
01152             catch (Exception ex)
01153             {
01154                 txtExceptionReport.Text = ex.ToString();
01155                 AppendEventMessage(ex.ToString());
01156             }
01157         }
01158
01159         private void BtnSetScrollViewHorizontalOffset_Click(object sender, RoutedEventArgs e)
01160         {
01161             try
01162             {
01163                 if (scrollView != null)
01164                 {
01165                     scrollView.ScrollTo(Convert.ToDouble(txtScrollViewHorizontalOffset.Text), scrollView.VerticalOffset);
01166                 }
01167             }
01168             catch (Exception ex)
01169             {
01170                 txtExceptionReport.Text = ex.ToString();
01171                 AppendEventMessage(ex.ToString());
01172             }
01173         }
01174
01175         private void BtnSetScrollViewHorizontalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
01176         {
01177             try
01178             {
01179                 if (scrollView != null)
01180                 {
01181                     scrollView.HorizontalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbScrollViewHorizontalScrollBarVisibility.SelectedIndex;
01182                 }
01183             }
01184             catch (Exception ex)
01185             {
01186                 txtExceptionReport.Text = ex.ToString();
01187                 AppendEventMessage(ex.ToString());
01188             }
01189         }
01190
01191         private void BtnSetScrollViewHorizontalScrollMode_Click(object sender, RoutedEventArgs e)
01192         {
01193             try
01194             {
01195                 if (scrollView != null)
01196                 {
01197                     ScrollingScrollMode ssm = (ScrollingScrollMode)cmbScrollViewHorizontalScrollMode.SelectedIndex;
01198
01199                     scrollView.HorizontalScrollMode = ssm;
01200                 }
01201             }
01202             catch (Exception ex)
01203             {
01204                 txtExceptionReport.Text = ex.ToString();
01205                 AppendEventMessage(ex.ToString());
01206             }
01207         }
01208
01209         private void BtnSetScrollViewMargin_Click(object sender, RoutedEventArgs e)
01210         {
01211             try
01212             {
01213                 if (scrollView != null)
01214                 {
01215                     scrollView.Margin = GetThicknessFromString(txtScrollViewMargin.Text);
01216                 }
01217             }
01218             catch (Exception ex)
01219             {
01220                 txtExceptionReport.Text = ex.ToString();
01221                 AppendEventMessage(ex.ToString());
01222             }
01223         }
01224
01225         private void BtnSetScrollViewMaxHeight_Click(object sender, RoutedEventArgs e)
01226         {
01227             try
01228             {
01229                 if (scrollView != null)
01230                 {
01231                     scrollView.MaxHeight = Convert.ToDouble(txtScrollViewMaxHeight.Text);
01232                 }
01233             }
01234             catch (Exception ex)
01235             {
01236                 txtExceptionReport.Text = ex.ToString();
01237                 AppendEventMessage(ex.ToString());
01238             }
01239         }
01240
01241         private void BtnSetScrollViewMaxWidth_Click(object sender, RoutedEventArgs e)
01242         {
01243             try
01244             {
01245                 if (scrollView != null)
01246                 {
01247                     scrollView.MaxWidth = Convert.ToDouble(txtScrollViewMaxWidth.Text);
01248                 }
01249             }
01250             catch (Exception ex)
01251             {
01252                 txtExceptionReport.Text = ex.ToString();
01253                 AppendEventMessage(ex.ToString());
01254             }
01255         }
01256
01257         private void BtnSetScrollViewPadding_Click(object sender, RoutedEventArgs e)
01258         {
01259             try
01260             {
01261                 if (scrollView != null)
01262                 {
01263                     scrollView.Padding = GetThicknessFromString(txtScrollViewPadding.Text);
01264                 }
01265             }
01266             catch (Exception ex)
01267             {
01268                 txtExceptionReport.Text = ex.ToString();
01269                 AppendEventMessage(ex.ToString());
01270             }
01271         }
01272
01273         private void BtnSetScrollViewZoomMode_Click(object sender, RoutedEventArgs e)
01274         {
01275             try
01276             {
01277                 if (scrollView != null)
01278                 {
01279                     ScrollingZoomMode szm = (ScrollingZoomMode)cmbScrollViewZoomMode.SelectedIndex;
01280
01281                     scrollView.ZoomMode = szm;
01282                 }
01283             }
01284             catch (Exception ex)
01285             {
01286                 txtExceptionReport.Text = ex.ToString();
01287                 AppendEventMessage(ex.ToString());
01288             }
01289         }
01290
01291         private void BtnGetScrollViewWidth_Click(object sender, RoutedEventArgs e)
01292         {
01293             UpdateScrollViewWidth();
01294         }
01295
01296         private void BtnGetScrollViewVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
01297         {
01298             UpdateScrollViewVerticalAnchorRatio();
01299         }
01300
01301         private void BtnGetScrollViewVerticalOffset_Click(object sender, RoutedEventArgs e)
01302         {
01303             UpdateScrollViewVerticalOffset();
01304         }
01305
01306         private void BtnGetScrollViewVerticalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
01307         {
01308             UpdateScrollViewVerticalScrollBarVisibility();
01309         }
01310
01311         private void BtnGetScrollViewVerticalScrollMode_Click(object sender, RoutedEventArgs e)
01312         {
01313             UpdateScrollViewVerticalScrollMode();
01314         }
01315
01316         private void BtnGetScrollViewZoomMode_Click(object sender, RoutedEventArgs e)
01317         {
01318             UpdateScrollViewZoomMode();
01319         }
01320
01321         private void BtnSetScrollViewVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
01322         {
01323             try
01324             {
01325                 if (scrollView != null)
01326                 {
01327                     scrollView.VerticalAnchorRatio = Convert.ToDouble(txtScrollViewVerticalAnchorRatio.Text);
01328                 }
01329             }
01330             catch (Exception ex)
01331             {
01332                 txtExceptionReport.Text = ex.ToString();
01333                 AppendEventMessage(ex.ToString());
01334             }
01335         }
01336
01337         private void BtnSetScrollViewVerticalConstantVelocity_Click(object sender, RoutedEventArgs e)
01338         {
01339             try
01340             {
01341                 if (scrollView != null)
01342                 {
01343                     float verticalConstantVelocity = float.Parse(this.txtScrollViewVerticalConstantVelocity.Text);
01344
01345                     if (verticalConstantVelocity == 0.0f)
01346                     {
01347                         scrollView.ScrollBy(0, 0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
01348                     }
01349                     else
01350                     {
01351                         scrollView.AddScrollVelocity(new System.Numerics.Vector2(0.0f, verticalConstantVelocity), new System.Numerics.Vector2(0.0f, 0.0f));
01352                     }
01353                 }
01354             }
01355             catch (Exception ex)
01356             {
01357                 txtExceptionReport.Text = ex.ToString();
01358                 AppendEventMessage(ex.ToString());
01359             }
01360         }
01361
01362         private void BtnSetScrollViewVerticalOffset_Click(object sender, RoutedEventArgs e)
01363         {
01364             try
01365             {
01366                 if (scrollView != null)
01367                 {
01368                     scrollView.ScrollTo(scrollView.HorizontalOffset, Convert.ToDouble(txtScrollViewVerticalOffset.Text));
01369                 }
01370             }
01371             catch (Exception ex)
01372             {
01373                 txtExceptionReport.Text = ex.ToString();
01374                 AppendEventMessage(ex.ToString());
01375             }
01376         }
01377
01378         private void BtnSetScrollViewVerticalScrollBarVisibility_Click(object sender, RoutedEventArgs e)
01379         {
01380             try
01381             {
01382                 if (scrollView != null)
01383                 {
01384                     scrollView.VerticalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbScrollViewVerticalScrollBarVisibility.SelectedIndex;
01385                 }
01386             }
01387             catch (Exception ex)
01388             {
01389                 txtExceptionReport.Text = ex.ToString();
01390                 AppendEventMessage(ex.ToString());
01391             }
01392         }
01393
01394         private void BtnSetScrollViewVerticalScrollMode_Click(object sender, RoutedEventArgs e)
01395         {
01396             try
01397             {
01398                 if (scrollView != null)
01399                 {
01400                     ScrollingScrollMode ssm = (ScrollingScrollMode)cmbScrollViewVerticalScrollMode.SelectedIndex;
01401
01402                     scrollView.VerticalScrollMode = ssm;
01403                 }
01404             }
01405             catch (Exception ex)
01406             {
01407                 txtExceptionReport.Text = ex.ToString();
01408                 AppendEventMessage(ex.ToString());
01409             }
01410         }
01411
01412         private void ChkEvents_Checked(object sender, RoutedEventArgs e)
01413         {
01414             if (grdEvents != null)
01415             {
01416                 grdEvents.Visibility = Visibility.Visible;
01417                 cdEvents.Width = new GridLength(1, GridUnitType.Star);
01418             }
01419         }
01420
01421         private void ChkEvents_Unchecked(object sender, RoutedEventArgs e)
01422         {
01423             if (grdEvents != null)
01424             {
01425                 grdEvents.Visibility = Visibility.Collapsed;
01426                 cdEvents.Width = new GridLength(0);
01427             }
01428         }
01429
01430         private void ChkLayoutPanel_Checked(object sender, RoutedEventArgs e)
01431         {
01432             if (svLayoutPanel != null)
01433                 svLayoutPanel.Visibility = Visibility.Visible;
01434         }
01435
01436         private void ChkLayoutPanel_Unchecked(object sender, RoutedEventArgs e)
01437         {
01438             if (svLayoutPanel != null)
01439                 svLayoutPanel.Visibility = Visibility.Collapsed;
01440         }
01441
01442         private void ChkLogLinedFlowLayoutMessages_Checked(object sender, RoutedEventArgs e)
01443         {
01444             LayoutsTestHooks.LinedFlowLayoutInvalidated += LayoutsTestHooks_LinedFlowLayoutInvalidated;
01445             LayoutsTestHooks.LinedFlowLayoutItemLocked += LayoutsTestHooks_LinedFlowLayoutItemLocked;
01446             LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged += LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
01447
01448             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01449             if (chkLogScrollViewMessages.IsChecked == false)
01450             {
01451                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01452             }
01453         }
01454
01455         private void ChkLogLinedFlowLayoutMessages_Unchecked(object sender, RoutedEventArgs e)
01456         {
01457             LayoutsTestHooks.LinedFlowLayoutInvalidated -= LayoutsTestHooks_LinedFlowLayoutInvalidated;
01458             LayoutsTestHooks.LinedFlowLayoutItemLocked -= LayoutsTestHooks_LinedFlowLayoutItemLocked;
01459             LayoutsTestHooks.LinedFlowLayoutSnappedAverageItemsPerLineChanged -= LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged;
01460
01461             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01462             if (chkLogScrollViewMessages.IsChecked == false)
01463             {
01464                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01465             }
01466         }
01467
01468         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e)
01469         {
01470             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01471             if (chkLogLinedFlowLayoutMessages.IsChecked == false)
01472             {
01473                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01474             }
01475         }
01476
01477         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e)
01478         {
01479             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01480             if (chkLogLinedFlowLayoutMessages.IsChecked == false)
01481             {
01482                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01483             }
01484         }
01485
01486         private void ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e)
01487         {
01488             HookScrollViewEvents();
01489         }
01490
01491         private void ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e)
01492         {
01493             UnhookScrollViewEvents();
01494         }
01495
01496         private void ChkScrollViewIsEnabled_Checked(object sender, RoutedEventArgs e)
01497         {
01498             try
01499             {
01500                 if (scrollView != null)
01501                 {
01502                     scrollView.IsEnabled = true;
01503                 }
01504             }
01505             catch (Exception ex)
01506             {
01507                 txtExceptionReport.Text = ex.ToString();
01508                 AppendEventMessage(ex.ToString());
01509             }
01510         }
01511
01512         private void ChkScrollViewIsEnabled_Unchecked(object sender, RoutedEventArgs e)
01513         {
01514             try
01515             {
01516                 if (scrollView != null)
01517                 {
01518                     scrollView.IsEnabled = false;
01519                 }
01520             }
01521             catch (Exception ex)
01522             {
01523                 txtExceptionReport.Text = ex.ToString();
01524                 AppendEventMessage(ex.ToString());
01525             }
01526         }
01527
01528         private void ChkScrollViewIsTabStop_Checked(object sender, RoutedEventArgs e)
01529         {
01530             try
01531             {
01532                 if (scrollView != null)
01533                 {
01534                     scrollView.IsTabStop = true;
01535                 }
01536             }
01537             catch (Exception ex)
01538             {
01539                 txtExceptionReport.Text = ex.ToString();
01540                 AppendEventMessage(ex.ToString());
01541             }
01542         }
01543
01544         private void ChkScrollViewIsTabStop_Unchecked(object sender, RoutedEventArgs e)
01545         {
01546             try
01547             {
01548                 if (scrollView != null)
01549                 {
01550                     scrollView.IsTabStop = false;
01551                 }
01552             }
01553             catch (Exception ex)
01554             {
01555                 txtExceptionReport.Text = ex.ToString();
01556                 AppendEventMessage(ex.ToString());
01557             }
01558         }
01559
01560         private void ChkLinedFlowLayout_Checked(object sender, RoutedEventArgs e)
01561         {
01562             if (svLinedFlowLayout != null)
01563                 svLinedFlowLayout.Visibility = Visibility.Visible;
01564         }
01565
01566         private void ChkLinedFlowLayout_Unchecked(object sender, RoutedEventArgs e)
01567         {
01568             if (svLinedFlowLayout != null)
01569                 svLinedFlowLayout.Visibility = Visibility.Collapsed;
01570         }
01571
01572         private void ChkLinedFlowLayoutHandleItemsInfoRequested_IsCheckedChanged(object sender, RoutedEventArgs e)
01573         {
01574             BtnLayoutInvalidateItemsInfo_Click(null, null);
01575         }
01576
01577         private void ChkLinedFlowLayoutIsFastPathSupportedDbg_IsCheckedChanged(object sender, RoutedEventArgs e)
01578         {
01579             try
01580             {
01581                 if (linedFlowLayout != null)
01582                 {
01583                     LayoutsTestHooks.SetLinedFlowLayoutIsFastPathSupported(linedFlowLayout, (bool)chkLinedFlowLayoutIsFastPathSupportedDbg.IsChecked);
01584                 }
01585             }
01586             catch (Exception ex)
01587             {
01588                 txtExceptionReport.Text = ex.ToString();
01589                 AppendEventMessage(ex.ToString());
01590             }
01591         }
01592
01593         private void ChkLinedFlowLayoutShowLockedItems_Checked(object sender, RoutedEventArgs e)
01594         {
01595             UpdateLinedFlowLayoutLockedItemsVisuals();
01596
01597             if (scrollView != null)
01598             {
01599                 scrollView.ViewChanged += ScrollView_ViewChangedForLockedItemsVisuals;
01600             }
01601         }
01602
01603         private void ChkLinedFlowLayoutShowLockedItems_Unchecked(object sender, RoutedEventArgs e)
01604         {
01605             UpdateLinedFlowLayoutLockedItemsVisuals();
01606
01607             if (scrollView != null)
01608             {
01609                 scrollView.ViewChanged -= ScrollView_ViewChangedForLockedItemsVisuals;
01610             }
01611         }
01612
01613         private void ChkScrollView_Checked(object sender, RoutedEventArgs e)
01614         {
01615             if (svScrollView != null)
01616                 svScrollView.Visibility = Visibility.Visible;
01617         }
01618
01619         private void ChkScrollView_Unchecked(object sender, RoutedEventArgs e)
01620         {
01621             if (svScrollView != null)
01622                 svScrollView.Visibility = Visibility.Collapsed;
01623         }
01624
01625         private void CmbLayoutPanelBackground_SelectionChanged(object sender, SelectionChangedEventArgs e)
01626         {
01627             try
01628             {
01629                 if (layoutPanel != null)
01630                 {
01631                     switch (cmbLayoutPanelBackground.SelectedIndex)
01632                     {
01633                         case 0:
01634                             layoutPanel.Background = null;
01635                             break;
01636                         case 1:
01637                             layoutPanel.Background = new SolidColorBrush(Colors.Transparent);
01638                             break;
01639                         case 2:
01640                             layoutPanel.Background = new SolidColorBrush(Colors.AliceBlue);
01641                             break;
01642                         case 3:
01643                             layoutPanel.Background = new SolidColorBrush(Colors.Aqua);
01644                             break;
01645                     }
01646                 }
01647             }
01648             catch (Exception ex)
01649             {
01650                 txtExceptionReport.Text = ex.ToString();
01651                 AppendEventMessage(ex.ToString());
01652             }
01653         }
01654
01655         private void CmbLayoutPanelBorderBrush_SelectionChanged(object sender, SelectionChangedEventArgs e)
01656         {
01657             try
01658             {
01659                 if (layoutPanel != null)
01660                 {
01661                     switch (cmbLayoutPanelBorderBrush.SelectedIndex)
01662                     {
01663                         case 0:
01664                             layoutPanel.BorderBrush = null;
01665                             break;
01666                         case 1:
01667                             layoutPanel.BorderBrush = new SolidColorBrush(Colors.Transparent);
01668                             break;
01669                         case 2:
01670                             layoutPanel.BorderBrush = new SolidColorBrush(Colors.Blue);
01671                             break;
01672                         case 3:
01673                             layoutPanel.BorderBrush = new SolidColorBrush(Colors.Green);
01674                             break;
01675                     }
01676                 }
01677             }
01678             catch (Exception ex)
01679             {
01680                 txtExceptionReport.Text = ex.ToString();
01681                 AppendEventMessage(ex.ToString());
01682             }
01683         }
01684
01685         private void CmbLinedFlowLayoutItemsJustification_SelectionChanged(object sender, SelectionChangedEventArgs e)
01686         {
01687             try
01688             {
01689                 if (linedFlowLayout != null && cmbLinedFlowLayoutItemsJustification != null && linedFlowLayout.ItemsJustification != (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex)
01690                 {
01691                     linedFlowLayout.ItemsJustification = (LinedFlowLayoutItemsJustification)cmbLinedFlowLayoutItemsJustification.SelectedIndex;
01692                 }
01693             }
01694             catch (Exception ex)
01695             {
01696                 txtExceptionReport.Text = ex.ToString();
01697                 AppendEventMessage(ex.ToString());
01698             }
01699         }
01700
01701         private void CmbLinedFlowLayoutItemsStretch_SelectionChanged(object sender, SelectionChangedEventArgs e)
01702         {
01703             try
01704             {
01705                 if (linedFlowLayout != null && cmbLinedFlowLayoutItemsStretch != null && linedFlowLayout.ItemsStretch != (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex)
01706                 {
01707                     linedFlowLayout.ItemsStretch = (LinedFlowLayoutItemsStretch)cmbLinedFlowLayoutItemsStretch.SelectedIndex;
01708                 }
01709             }
01710             catch (Exception ex)
01711             {
01712                 txtExceptionReport.Text = ex.ToString();
01713                 AppendEventMessage(ex.ToString());
01714             }
01715         }
01716
01717         private void CmbScrollViewBackground_SelectionChanged(object sender, SelectionChangedEventArgs e)
01718         {
01719             try
01720             {
01721                 if (scrollView != null)
01722                 {
01723                     switch (cmbScrollViewBackground.SelectedIndex)
01724                     {
01725                         case 0:
01726                             scrollView.Background = null;
01727                             break;
01728                         case 1:
01729                             scrollView.Background = new SolidColorBrush(Colors.Transparent);
01730                             break;
01731                         case 2:
01732                             scrollView.Background = new SolidColorBrush(Colors.AliceBlue);
01733                             break;
01734                         case 3:
01735                             scrollView.Background = new SolidColorBrush(Colors.Aqua);
01736                             break;
01737                     }
01738                 }
01739             }
01740             catch (Exception ex)
01741             {
01742                 txtExceptionReport.Text = ex.ToString();
01743                 AppendEventMessage(ex.ToString());
01744             }
01745         }
01746
01747         private void CmbScrollViewBorderBrush_SelectionChanged(object sender, SelectionChangedEventArgs e)
01748         {
01749             try
01750             {
01751                 if (scrollView != null)
01752                 {
01753                     switch (cmbScrollViewBorderBrush.SelectedIndex)
01754                     {
01755                         case 0:
01756                             scrollView.BorderBrush = null;
01757                             break;
01758                         case 1:
01759                             scrollView.BorderBrush = new SolidColorBrush(Colors.Transparent);
01760                             break;
01761                         case 2:
01762                             scrollView.BorderBrush = new SolidColorBrush(Colors.Blue);
01763                             break;
01764                         case 3:
01765                             scrollView.BorderBrush = new SolidColorBrush(Colors.Green);
01766                             break;
01767                     }
01768                 }
01769             }
01770             catch (Exception ex)
01771             {
01772                 txtExceptionReport.Text = ex.ToString();
01773                 AppendEventMessage(ex.ToString());
01774             }
01775         }
01776
01777         private UIElement CreateChild(int id)
01778         {
01779             FrameworkElement child;
01780
01781             if (cmbLayoutPanelElementType.SelectedIndex != 2)
01782             {
01783                 Uri uri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", id % 126 + 1));
01784
01785                 BitmapImage bitmapImage = new BitmapImage()
01786                 {
01787                     DecodePixelHeight = 120,
01788                     UriSource = uri
01789                 };
01790
01791                 Image image = new Image()
01792                 {
01793                     Source = bitmapImage,
01794                     Stretch = Stretch.UniformToFill,
01795                     HorizontalAlignment = HorizontalAlignment.Center,
01796                     VerticalAlignment = VerticalAlignment.Center
01797                 };
01798
01799                 TextBlock textBlock = new TextBlock()
01800                 {
01801                     Text = id.ToString(),
01802                     Margin = _thicknessFour,
01803                     Foreground = _whiteBrush,
01804                     FontSize = 14.0,
01805                     MinWidth = 36.0,
01806                     MaxWidth = 72.0,
01807                     MaxHeight = 48.0
01808                 };
01809
01810                 Grid gridTB = new Grid()
01811                 {
01812                     Background = _grayBrush,
01813                     CornerRadius = _cornerRadiusFour,
01814                     HorizontalAlignment = HorizontalAlignment.Center,
01815                     VerticalAlignment = VerticalAlignment.Bottom
01816                 };
01817
01818                 gridTB.Children.Add(textBlock);
01819
01820                 Grid grid = new Grid()
01821                 {
01822                     Background = _grayBrush,
01823                     CornerRadius = _cornerRadiusFour
01824                 };
01825
01826                 grid.Children.Add(image);
01827                 grid.Children.Add(gridTB);
01828
01829                 if (cmbLayoutPanelElementType.SelectedIndex == 0)
01830                 {
01831                     child = grid;
01832                 }
01833                 else
01834                 {
01835                     ItemContainer itemContainer = new ItemContainer()
01836                     {
01837                         Child = grid
01838                     };
01839
01840                     child = itemContainer;
01841                 }
01842             }
01843             else
01844             {
01845                 child = new Border()
01846                 {
01847                     BorderBrush = _grayBrush,
01848                     BorderThickness = _thicknessFour,
01849                     CornerRadius = _cornerRadiusFour,
01850                     MinWidth = 48.0,
01851                     MinHeight = 48.0
01852                 };
01853             }
01854
01855             if (chkSetLayoutPanelElementMinWidth.IsChecked == true)
01856             {
01857                 child.MinWidth = double.Parse(txtLayoutPanelElementMinWidthAll.Text);
01858             }
01859
01860             if (chkSetLayoutPanelElementMaxWidth.IsChecked == true)
01861             {
01862                 child.MaxWidth = double.Parse(txtLayoutPanelElementMaxWidthAll.Text);
01863             }
01864
01865             return child;
01866         }
01867
01868         private CornerRadius GetCornerRadiusFromString(string cornerRadius)
01869         {
01870             string[] lengths = cornerRadius.Split(',');
01871             if (lengths.Length < 4)
01872                 return new CornerRadius(
01873                     Convert.ToDouble(lengths[0]));
01874             else
01875                 return new CornerRadius(
01876                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
01877         }
01878
01879         private UIElement GetLayoutPanelElement()
01880         {
01881             try
01882             {
01883                 if (layoutPanel != null)
01884                 {
01885                     int index = int.Parse(txtLayoutPanelElementIndex.Text);
01886
01887                     return layoutPanel.Children[index];
01888                 }
01889             }
01890             catch (Exception ex)
01891             {
01892                 txtExceptionReport.Text = ex.ToString();
01893                 AppendEventMessage(ex.ToString());
01894             }
01895
01896             return null;
01897         }
01898
01899         private Thickness GetThicknessFromString(string thickness)
01900         {
01901             string[] lengths = thickness.Split(',');
01902             if (lengths.Length < 4)
01903                 return new Thickness(
01904                     Convert.ToDouble(lengths[0]));
01905             else
01906                 return new Thickness(
01907                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
01908         }
01909
01910         private void HookLinedFlowLayoutEvents()
01911         {
01912             if (linedFlowLayout != null)
01913             {
01914                 linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
01915                 linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlocked;
01916             }
01917         }
01918
01919         private void HookScrollViewEvents()
01920         {
01921             if (scrollView != null)
01922             {
01923                 scrollView.SizeChanged += ScrollView_SizeChanged;
01924                 scrollView.ExtentChanged += ScrollView_ExtentChanged;
01925                 scrollView.StateChanged += ScrollView_StateChanged;
01926                 scrollView.ViewChanged += ScrollView_ViewChanged;
01927                 scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
01928                 scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
01929                 scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
01930                 scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
01931             }
01932         }
01933
01934         private void InsertChild(int newChildIndex)
01935         {
01936             try
01937             {
01938                 if (layoutPanel != null)
01939                 {
01940                     layoutPanel.Children.Insert(newChildIndex, CreateChild(layoutPanel.Children.Count));
01941                 }
01942             }
01943             catch (Exception ex)
01944             {
01945                 txtExceptionReport.Text = ex.ToString();
01946                 AppendEventMessage(ex.ToString());
01947             }
01948         }
01949
01950         private void LayoutsTestHooks_LinedFlowLayoutInvalidated(object sender, LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs args)
01951         {
01952             AppendAsyncEventMessage("LinedFlowLayout invalidated. InvalidationTrigger: " + args.InvalidationTrigger.ToString());
01953         }
01954
01955         private void LayoutsTestHooks_LinedFlowLayoutItemLocked(object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
01956         {
01957             AppendAsyncEventMessage("LinedFlowLayout item locked. ItemIndex: " + args.ItemIndex + ", LineIndex: " + args.LineIndex.ToString());
01958         }
01959
01960         private void LayoutsTestHooks_LinedFlowLayoutItemLocked2(object sender, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs args)
01961         {
01962             if (!_lstLinedFlowLayoutLockedItemIndexes.Contains(args.ItemIndex))
01963             {
01964                 _lstLinedFlowLayoutLockedItemIndexes.Add(args.ItemIndex);
01965                 UpdateLinedFlowLayoutLockedItemsVisuals();
01966             }
01967         }
01968
01969         private void LayoutsTestHooks_LinedFlowLayoutSnappedAverageItemsPerLineChanged(object sender, object args)
01970         {
01971             AppendAsyncEventMessage("LinedFlowLayout snapped average items per line changed. SnappedAverageItemsPerLine: " + LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(sender as LinedFlowLayout).ToString() + ", AverageItemAspectRatio: " + LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(sender as LinedFlowLayout).ToString());
01972         }
01973
01974         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
01975         {
01976             // Cut off the terminating new line.
01977             string msg = args.Message.Substring(0, args.Message.Length - 1);
01978             string asyncEventMessage;
01979             string senderName = string.Empty;
01980
01981             try
01982             {
01983                 FrameworkElement fe = sender as FrameworkElement;
01984
01985                 if (fe != null)
01986                 {
01987                     senderName = "s:" + fe.Name + ", ";
01988                 }
01989             }
01990             catch
01991             {
01992             }
01993
01994             if (args.IsVerboseLevel)
01995             {
01996                 asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
01997             }
01998             else
01999             {
02000                 asyncEventMessage = "Info: " + senderName + "m:" + msg;
02001             }
02002
02003             AppendAsyncEventMessage(asyncEventMessage);
02004         }
02005
02006         private void RemoveAllChildren()
02007         {
02008             try
02009             {
02010                 if (layoutPanel != null)
02011                 {
02012                     layoutPanel.Children.Clear();
02013                 }
02014             }
02015             catch (Exception ex)
02016             {
02017                 txtExceptionReport.Text = ex.ToString();
02018                 AppendEventMessage(ex.ToString());
02019             }
02020         }
02021
02022         private void RemoveChild(int oldChildIndex)
02023         {
02024             try
02025             {
02026                 if (layoutPanel != null)
02027                 {
02028                     layoutPanel.Children.RemoveAt(oldChildIndex);
02029                 }
02030             }
02031             catch (Exception ex)
02032             {
02033                 txtExceptionReport.Text = ex.ToString();
02034                 AppendEventMessage(ex.ToString());
02035             }
02036         }
02037
02038         private void ReplaceChild(int childIndex)
02039         {
02040             try
02041             {
02042                 if (layoutPanel != null)
02043                 {
02044                     layoutPanel.Children[childIndex] = CreateChild(childIndex);
02045                 }
02046             }
02047             catch (Exception ex)
02048             {
02049                 txtExceptionReport.Text = ex.ToString();
02050                 AppendEventMessage(ex.ToString());
02051             }
02052         }
02053
02054         private void LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
02055         {
02056             if (chkLogLinedFlowLayoutEvents.IsChecked == true)
02057             {
02058                 AppendAsyncEventMessage($"LinedFlowLayout.ItemsInfoRequested ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
02059             }
02060
02061             if (!(bool)chkLinedFlowLayoutHandleItemsInfoRequested.IsChecked)
02062             {
02063                 return;
02064             }
02065
02066             int arrayLength = args.ItemsRangeRequestedLength;
02067             double[] desiredAspectRatios = new double[arrayLength];
02068
02069             if (chkSetLayoutPanelElementMinWidth.IsChecked == true)
02070             {
02071                 args.MinWidth = double.Parse(txtLayoutPanelElementMinWidthAll.Text);
02072             }
02073             else
02074             {
02075                 args.MinWidth = 48.0;
02076             }
02077
02078             if (chkSetLayoutPanelElementMaxWidth.IsChecked == true)
02079             {
02080                 args.MaxWidth = double.Parse(txtLayoutPanelElementMaxWidthAll.Text);
02081             }
02082
02083             for (int index = 0; index < arrayLength; index++)
02084             {
02085                 desiredAspectRatios[index] = Recipe.GetKnownAspectRatioFromIndex(index + 1);
02086             }
02087
02088             args.SetDesiredAspectRatios(desiredAspectRatios);
02089         }
02090
02091         private void LinedFlowLayout_ItemsUnlocked(LinedFlowLayout sender, object args)
02092         {
02093             if (chkLogLinedFlowLayoutEvents.IsChecked == true)
02094             {
02095                 AppendAsyncEventMessage("LinedFlowLayout.ItemsUnlocked");
02096             }
02097
02098             _lstLinedFlowLayoutLockedItemIndexes.Clear();
02099             UpdateLinedFlowLayoutLockedItemsVisuals();
02100         }
02101
02102         private void LinedFlowLayoutDemo_Loaded(object sender, RoutedEventArgs e)
02103         {
02104             try
02105             {
02106                 UpdateScrollViewBackground();
02107                 UpdateScrollViewBorderBrush();
02108                 UpdateScrollViewBorderThickness();
02109                 UpdateScrollViewMargin();
02110                 UpdateScrollViewPadding();
02111                 UpdateScrollViewWidth();
02112                 UpdateScrollViewHeight();
02113                 UpdateScrollViewMaxWidth();
02114                 UpdateScrollViewMaxHeight();
02115                 UpdateScrollViewCornerRadius();
02116                 UpdateScrollViewIsEnabled();
02117                 UpdateScrollViewIsTabStop();
02118                 UpdateScrollViewContentOrientation();
02119                 UpdateScrollViewHorizontalScrollMode();
02120                 UpdateScrollViewVerticalScrollMode();
02121                 UpdateScrollViewZoomMode();
02122                 UpdateScrollViewHorizontalScrollBarVisibility();
02123                 UpdateScrollViewVerticalScrollBarVisibility();
02124                 UpdateScrollViewHorizontalAnchorRatio();
02125                 UpdateScrollViewVerticalAnchorRatio();
02126                 UpdateScrollViewHorizontalOffset();
02127                 UpdateScrollViewVerticalOffset();
02128                 UpdateScrollViewExtentWidth();
02129                 UpdateScrollViewExtentHeight();
02130
02131                 UpdateLayoutPanelBackground();
02132                 UpdateLayoutPanelBorderBrush();
02133                 UpdateLayoutPanelBorderThickness();
02134                 UpdateLayoutPanelHorizontalAlignment();
02135                 UpdateLayoutPanelVerticalAlignment();
02136                 UpdateLayoutPanelMargin();
02137                 UpdateLayoutPanelPadding();
02138                 UpdateLayoutPanelWidth();
02139                 UpdateLayoutPanelHeight();
02140                 UpdateLayoutPanelMaxWidth();
02141                 UpdateLayoutPanelMaxHeight();
02142                 UpdateLayoutPanelCornerRadius();
02143
02144                 UpdateLinedFlowLayoutActualLineHeight();
02145                 UpdateLinedFlowLayoutAverageItemAspectRatioDbg();
02146                 UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg();
02147                 UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg();
02148                 UpdateLinedFlowLayoutForcedWrapMultiplierDbg();
02149                 UpdateLinedFlowLayoutFrozenItemIndexes();
02150                 UpdateLinedFlowLayoutLineHeight();
02151                 UpdateLinedFlowLayoutLineSpacing();
02152                 UpdateLinedFlowLayoutItemsJustification();
02153                 UpdateLinedFlowLayoutItemsStretch();
02154                 UpdateLinedFlowLayoutMinItemSpacing();
02155                 UpdateLinedFlowLayoutRealizedItemIndexes();
02156                 UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg();
02157             }
02158             catch (Exception ex)
02159             {
02160                 txtExceptionReport.Text = ex.ToString();
02161                 AppendEventMessage(ex.ToString());
02162             }
02163         }
02164
02165         private void ScrollView_SizeChanged(object sender, SizeChangedEventArgs e)
02166         {
02167             AppendAsyncEventMessage($"ScrollView.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
02168         }
02169
02170         private void ScrollView_ExtentChanged(ScrollView sender, object args)
02171         {
02172             AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
02173         }
02174
02175         private void ScrollView_StateChanged(ScrollView sender, object args)
02176         {
02177             AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
02178         }
02179
02180         private void ScrollView_ViewChanged(ScrollView sender, object args)
02181         {
02182             AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset.ToString()}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
02183         }
02184
02185         private void ScrollView_ViewChangedForLockedItemsVisuals(ScrollView sender, object args)
02186         {
02187             UpdateLinedFlowLayoutLockedItemsVisuals();
02188         }
02189
02190         private void ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
02191         {
02192             AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
02193         }
02194
02195         private void ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
02196         {
02197             AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
02198         }
02199
02200         private void ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args)
02201         {
02202             AppendAsyncEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
02203         }
02204
02205         private void ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args)
02206         {
02207             AppendAsyncEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
02208         }
02209
02210         private void UnhookScrollViewEvents()
02211         {
02212             if (scrollView != null)
02213             {
02214                 scrollView.SizeChanged -= ScrollView_SizeChanged;
02215                 scrollView.ExtentChanged -= ScrollView_ExtentChanged;
02216                 scrollView.StateChanged -= ScrollView_StateChanged;
02217                 scrollView.ViewChanged -= ScrollView_ViewChanged;
02218                 scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
02219                 scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
02220                 scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
02221                 scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
02222             }
02223         }
02224
02225         private void UpdateChildrenCount()
02226         {
02227             if (layoutPanel != null && txtChildrenCount != null)
02228             {
02229                 txtChildrenCount.Text = layoutPanel.Children.Count.ToString();
02230             }
02231         }
02232
02233         private void UpdateLayoutPanelBackground()
02234         {
02235             if (layoutPanel != null && cmbLayoutPanelBackground != null)
02236             {
02237                 SolidColorBrush bg = layoutPanel.Background as SolidColorBrush;
02238
02239                 if (bg == null)
02240                 {
02241                     cmbLayoutPanelBackground.SelectedIndex = 0;
02242                 }
02243                 else if (bg.Color == Colors.Transparent)
02244                 {
02245                     cmbLayoutPanelBackground.SelectedIndex = 1;
02246                 }
02247                 else if (bg.Color == Colors.AliceBlue)
02248                 {
02249                     cmbLayoutPanelBackground.SelectedIndex = 2;
02250                 }
02251                 else if (bg.Color == Colors.Aqua)
02252                 {
02253                     cmbLayoutPanelBackground.SelectedIndex = 3;
02254                 }
02255                 else
02256                 {
02257                     cmbLayoutPanelBackground.SelectedIndex = -1;
02258                 }
02259             }
02260         }
02261
02262         private void UpdateLayoutPanelBorderBrush()
02263         {
02264             if (layoutPanel != null && cmbLayoutPanelBorderBrush != null)
02265             {
02266                 SolidColorBrush bb = layoutPanel.BorderBrush as SolidColorBrush;
02267
02268                 if (bb == null)
02269                 {
02270                     cmbLayoutPanelBorderBrush.SelectedIndex = 0;
02271                 }
02272                 else if (bb.Color == Colors.Transparent)
02273                 {
02274                     cmbLayoutPanelBorderBrush.SelectedIndex = 1;
02275                 }
02276                 else if (bb.Color == Colors.Blue)
02277                 {
02278                     cmbLayoutPanelBorderBrush.SelectedIndex = 2;
02279                 }
02280                 else if (bb.Color == Colors.Green)
02281                 {
02282                     cmbLayoutPanelBorderBrush.SelectedIndex = 3;
02283                 }
02284                 else
02285                 {
02286                     cmbLayoutPanelBorderBrush.SelectedIndex = -1;
02287                 }
02288             }
02289         }
02290
02291         private void UpdateLayoutPanelBorderThickness()
02292         {
02293             if (layoutPanel != null && txtLayoutPanelBorderThickness != null)
02294             {
02295                 txtLayoutPanelBorderThickness.Text = layoutPanel.BorderThickness.ToString();
02296             }
02297         }
02298
02299         private void UpdateLayoutPanelCornerRadius()
02300         {
02301             if (layoutPanel != null && txtLayoutPanelCornerRadius != null)
02302             {
02303                 txtLayoutPanelCornerRadius.Text = layoutPanel.CornerRadius.ToString();
02304             }
02305         }
02306
02307         private void UpdateLayoutPanelElementActualHeight()
02308         {
02309             try
02310             {
02311                 if (layoutPanel != null && txtLayoutPanelElementActualHeight != null)
02312                 {
02313                     UIElement element = GetLayoutPanelElement();
02314
02315                     if (element is FrameworkElement frameworkElement)
02316                     {
02317                         txtLayoutPanelElementActualHeight.Text = frameworkElement.ActualHeight.ToString();
02318                     }
02319                 }
02320             }
02321             catch (Exception ex)
02322             {
02323                 txtExceptionReport.Text = ex.ToString();
02324                 AppendEventMessage(ex.ToString());
02325             }
02326         }
02327
02328         private void UpdateLayoutPanelElementActualWidth()
02329         {
02330             try
02331             {
02332                 if (layoutPanel != null && txtLayoutPanelElementActualWidth != null)
02333                 {
02334                     UIElement element = GetLayoutPanelElement();
02335
02336                     if (element is FrameworkElement frameworkElement)
02337                     {
02338                         txtLayoutPanelElementActualWidth.Text = frameworkElement.ActualWidth.ToString();
02339                     }
02340                 }
02341             }
02342             catch (Exception ex)
02343             {
02344                 txtExceptionReport.Text = ex.ToString();
02345                 AppendEventMessage(ex.ToString());
02346             }
02347         }
02348
02349         private void UpdateLayoutPanelElementCornerRadius()
02350         {
02351             try
02352             {
02353                 if (layoutPanel != null && txtLayoutPanelElementCornerRadius != null)
02354                 {
02355                     UIElement element = GetLayoutPanelElement();
02356
02357                     if (element is Grid grid)
02358                     {
02359                         txtLayoutPanelElementCornerRadius.Text = grid.CornerRadius.ToString();
02360                     }
02361                 }
02362             }
02363             catch (Exception ex)
02364             {
02365                 txtExceptionReport.Text = ex.ToString();
02366                 AppendEventMessage(ex.ToString());
02367             }
02368         }
02369
02370         private void UpdateLayoutPanelElementIsEnabled()
02371         {
02372             try
02373             {
02374                 if (layoutPanel != null && chkLayoutPanelElementIsEnabled != null)
02375                 {
02376                     UIElement element = GetLayoutPanelElement();
02377
02378                     if (element is Control control)
02379                     {
02380                         chkLayoutPanelElementIsEnabled.IsChecked = control != null && control.IsEnabled;
02381                     }
02382                 }
02383             }
02384             catch (Exception ex)
02385             {
02386                 txtExceptionReport.Text = ex.ToString();
02387                 AppendEventMessage(ex.ToString());
02388             }
02389         }
02390
02391         private void UpdateLayoutPanelElementMinWidth()
02392         {
02393             try
02394             {
02395                 if (layoutPanel != null && txtLayoutPanelElementMinWidth != null)
02396                 {
02397                     UIElement element = GetLayoutPanelElement();
02398
02399                     if (element is FrameworkElement frameworkElement)
02400                     {
02401                         txtLayoutPanelElementMinWidth.Text = frameworkElement.MinWidth.ToString();
02402                     }
02403                 }
02404             }
02405             catch (Exception ex)
02406             {
02407                 txtExceptionReport.Text = ex.ToString();
02408                 AppendEventMessage(ex.ToString());
02409             }
02410         }
02411
02412         private void UpdateLayoutPanelElementMaxWidth()
02413         {
02414             try
02415             {
02416                 if (layoutPanel != null && txtLayoutPanelElementMaxWidth != null)
02417                 {
02418                     UIElement element = GetLayoutPanelElement();
02419
02420                     if (element is FrameworkElement frameworkElement)
02421                     {
02422                         txtLayoutPanelElementMaxWidth.Text = frameworkElement.MaxWidth.ToString();
02423                     }
02424                 }
02425             }
02426             catch (Exception ex)
02427             {
02428                 txtExceptionReport.Text = ex.ToString();
02429                 AppendEventMessage(ex.ToString());
02430             }
02431         }
02432
02433         private void UpdateLayoutPanelElementHeight()
02434         {
02435             try
02436             {
02437                 if (layoutPanel != null && txtLayoutPanelElementHeight != null)
02438                 {
02439                     UIElement element = GetLayoutPanelElement();
02440
02441                     if (element is FrameworkElement frameworkElement)
02442                     {
02443                         txtLayoutPanelElementHeight.Text = frameworkElement.Height.ToString();
02444                     }
02445                 }
02446             }
02447             catch (Exception ex)
02448             {
02449                 txtExceptionReport.Text = ex.ToString();
02450                 AppendEventMessage(ex.ToString());
02451             }
02452         }
02453
02454         private void UpdateLayoutPanelElementMaxHeight()
02455         {
02456             try
02457             {
02458                 if (layoutPanel != null && txtLayoutPanelElementMaxHeight != null)
02459                 {
02460                     UIElement element = GetLayoutPanelElement();
02461
02462                     if (element is FrameworkElement frameworkElement)
02463                     {
02464                         txtLayoutPanelElementMaxHeight.Text = frameworkElement.MaxHeight.ToString();
02465                     }
02466                 }
02467             }
02468             catch (Exception ex)
02469             {
02470                 txtExceptionReport.Text = ex.ToString();
02471                 AppendEventMessage(ex.ToString());
02472             }
02473         }
02474
02475         private void UpdateLayoutPanelElementMinHeight()
02476         {
02477             try
02478             {
02479                 if (layoutPanel != null && txtLayoutPanelElementMinHeight != null)
02480                 {
02481                     UIElement element = GetLayoutPanelElement();
02482
02483                     if (element is FrameworkElement frameworkElement)
02484                     {
02485                         txtLayoutPanelElementMinHeight.Text = frameworkElement.MinHeight.ToString();
02486                     }
02487                 }
02488             }
02489             catch (Exception ex)
02490             {
02491                 txtExceptionReport.Text = ex.ToString();
02492                 AppendEventMessage(ex.ToString());
02493             }
02494         }
02495
02496         private void UpdateLayoutPanelElementWidth()
02497         {
02498             try
02499             {
02500                 if (layoutPanel != null && txtLayoutPanelElementWidth != null)
02501                 {
02502                     UIElement element = GetLayoutPanelElement();
02503
02504                     if (element is FrameworkElement frameworkElement)
02505                     {
02506                         txtLayoutPanelElementWidth.Text = frameworkElement.Width.ToString();
02507                     }
02508                 }
02509             }
02510             catch (Exception ex)
02511             {
02512                 txtExceptionReport.Text = ex.ToString();
02513                 AppendEventMessage(ex.ToString());
02514             }
02515         }
02516
02517         private void UpdateLayoutPanelHeight()
02518         {
02519             if (layoutPanel != null && txtLayoutPanelHeight != null)
02520             {
02521                 txtLayoutPanelHeight.Text = layoutPanel.Height.ToString();
02522             }
02523         }
02524
02525         private void UpdateLayoutPanelMargin()
02526         {
02527             if (layoutPanel != null && txtLayoutPanelMargin != null)
02528             {
02529                 txtLayoutPanelMargin.Text = layoutPanel.Margin.ToString();
02530             }
02531         }
02532
02533         private void UpdateLayoutPanelMaxHeight()
02534         {
02535             if (layoutPanel != null && txtLayoutPanelMaxHeight != null)
02536             {
02537                 txtLayoutPanelMaxHeight.Text = layoutPanel.MaxHeight.ToString();
02538             }
02539         }
02540
02541         private void UpdateLayoutPanelMaxWidth()
02542         {
02543             if (layoutPanel != null && txtLayoutPanelMaxWidth != null)
02544             {
02545                 txtLayoutPanelMaxWidth.Text = layoutPanel.MaxWidth.ToString();
02546             }
02547         }
02548
02549         private void UpdateLayoutPanelPadding()
02550         {
02551             if (layoutPanel != null && txtLayoutPanelPadding != null)
02552             {
02553                 txtLayoutPanelPadding.Text = layoutPanel.Padding.ToString();
02554             }
02555         }
02556
02557         private void UpdateLayoutPanelHorizontalAlignment()
02558         {
02559             try
02560             {
02561                 if (layoutPanel != null && cmbLayoutPanelHorizontalAlignment != null)
02562                 {
02563                     cmbLayoutPanelHorizontalAlignment.SelectedIndex = (int)layoutPanel.HorizontalAlignment;
02564                 }
02565             }
02566             catch (Exception ex)
02567             {
02568                 txtExceptionReport.Text = ex.ToString();
02569                 AppendEventMessage(ex.ToString());
02570             }
02571         }
02572
02573         private void UpdateLayoutPanelVerticalAlignment()
02574         {
02575             try
02576             {
02577                 if (layoutPanel != null && cmbLayoutPanelVerticalAlignment != null)
02578                 {
02579                     cmbLayoutPanelVerticalAlignment.SelectedIndex = (int)layoutPanel.VerticalAlignment;
02580                 }
02581             }
02582             catch (Exception ex)
02583             {
02584                 txtExceptionReport.Text = ex.ToString();
02585                 AppendEventMessage(ex.ToString());
02586             }
02587         }
02588
02589         private void UpdateLayoutPanelWidth()
02590         {
02591             if (layoutPanel != null && txtLayoutPanelWidth != null)
02592             {
02593                 txtLayoutPanelWidth.Text = layoutPanel.Width.ToString();
02594             }
02595         }
02596
02597         private void UpdateLinedFlowLayoutActualLineHeight()
02598         {
02599             if (linedFlowLayout != null)
02600             {
02601                 txtLinedFlowLayoutActualLineHeight.Text = linedFlowLayout.ActualLineHeight.ToString();
02602             }
02603         }
02604
02605         private void UpdateLinedFlowLayoutAverageItemAspectRatioDbg()
02606         {
02607             if (linedFlowLayout != null)
02608             {
02609                 txtLinedFlowLayoutAverageItemAspectRatioDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(linedFlowLayout).ToString();
02610             }
02611         }
02612
02613         private void UpdateLinedFlowLayoutForcedAverageItemAspectRatioDbg()
02614         {
02615             if (linedFlowLayout != null)
02616             {
02617                 txtLinedFlowLayoutForcedAverageItemAspectRatioDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemAspectRatio(linedFlowLayout).ToString();
02618             }
02619         }
02620
02621         private void UpdateLinedFlowLayoutForcedAverageItemsPerLineDividerDbg()
02622         {
02623             if (linedFlowLayout != null)
02624             {
02625                 txtLinedFlowLayoutForcedAverageItemsPerLineDividerDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutForcedAverageItemsPerLineDivider(linedFlowLayout).ToString();
02626             }
02627         }
02628
02629         private void UpdateLinedFlowLayoutForcedWrapMultiplierDbg()
02630         {
02631             if (linedFlowLayout != null)
02632             {
02633                 txtLinedFlowLayoutForcedWrapMultiplierDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutForcedWrapMultiplier(linedFlowLayout).ToString();
02634             }
02635         }
02636
02637         private void UpdateLinedFlowLayoutFrozenItemIndexes()
02638         {
02639             if (linedFlowLayout != null)
02640             {
02641                 txtLinedFlowLayoutFirstFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutFirstFrozenItemIndex(linedFlowLayout).ToString();
02642                 txtLinedFlowLayoutLastFrozenItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLastFrozenItemIndex(linedFlowLayout).ToString();
02643             }
02644         }
02645
02646         private void UpdateLinedFlowLayoutLineHeight()
02647         {
02648             if (linedFlowLayout != null)
02649             {
02650                 txtLinedFlowLayoutLineHeight.Text = linedFlowLayout.LineHeight.ToString();
02651             }
02652         }
02653
02654         private void UpdateLinedFlowLayoutLineSpacing()
02655         {
02656             if (linedFlowLayout != null)
02657             {
02658                 txtLinedFlowLayoutLineSpacing.Text = linedFlowLayout.LineSpacing.ToString();
02659             }
02660         }
02661
02662         private void UpdateLinedFlowLayoutLockedItemsVisuals()
02663         {
02664             if (canvasLinedFlowLayoutLockedItems != null && layoutPanel != null)
02665             {
02666                 bool showLockedItems = (bool)chkLinedFlowLayoutShowLockedItems.IsChecked;
02667
02668                 canvasLinedFlowLayoutLockedItems.Visibility = showLockedItems ? Visibility.Visible : Visibility.Collapsed;
02669                 canvasLinedFlowLayoutLockedItems.Width = scrollView.ActualWidth;
02670                 canvasLinedFlowLayoutLockedItems.Height = scrollView.ActualHeight;
02671                 canvasLinedFlowLayoutLockedItems.Children.Clear();
02672
02673                 if (showLockedItems && _lstLinedFlowLayoutLockedItemIndexes.Count > 0)
02674                 {
02675                     foreach (int lockedItemIndex in _lstLinedFlowLayoutLockedItemIndexes)
02676                     {
02677                         UIElement lockedItem = layoutPanel.Children[lockedItemIndex];
02678                         if (lockedItem != null)
02679                         {
02680                             GeneralTransform gt = lockedItem.TransformToVisual(layoutPanel);
02681                             Point lockedItemOriginPoint = new Point();
02682                             lockedItemOriginPoint = gt.TransformPoint(lockedItemOriginPoint);
02683
02684                             if (lockedItemOriginPoint.X - scrollView.HorizontalOffset >= 0 && lockedItemOriginPoint.Y - scrollView.VerticalOffset >= 0 &&
02685                                 lockedItemOriginPoint.X - scrollView.HorizontalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Width &&
02686                                 lockedItemOriginPoint.Y - scrollView.VerticalOffset + 8 <= canvasLinedFlowLayoutLockedItems.Height)
02687                             {
02688                                 Microsoft.UI.Xaml.Shapes.Rectangle lockedItemRectangle = new Microsoft.UI.Xaml.Shapes.Rectangle()
02689                                 {
02690                                     Fill = new SolidColorBrush(Colors.Red),
02691                                     Width = 8,
02692                                     Height = 8
02693                                 };
02694
02695                                 canvasLinedFlowLayoutLockedItems.Children.Add(lockedItemRectangle);
02696                                 Canvas.SetLeft(lockedItemRectangle, lockedItemOriginPoint.X - scrollView.HorizontalOffset);
02697                                 Canvas.SetTop(lockedItemRectangle, lockedItemOriginPoint.Y - scrollView.VerticalOffset);
02698                             }
02699                         }
02700                     }
02701                 }
02702             }
02703         }
02704
02705         private void UpdateLinedFlowLayoutLogItemIndexDbg()
02706         {
02707             if (linedFlowLayout != null)
02708             {
02709                 txtLinedFlowLayoutLogItemIndexDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutLogItemIndex(linedFlowLayout).ToString();
02710             }
02711         }
02712
02713         private void UpdateLinedFlowLayoutItemsJustification()
02714         {
02715             if (linedFlowLayout != null)
02716             {
02717                 cmbLinedFlowLayoutItemsJustification.SelectedIndex = (int)linedFlowLayout.ItemsJustification;
02718             }
02719         }
02720
02721         private void UpdateLinedFlowLayoutItemsStretch()
02722         {
02723             if (linedFlowLayout != null)
02724             {
02725                 cmbLinedFlowLayoutItemsStretch.SelectedIndex = (int)linedFlowLayout.ItemsStretch;
02726             }
02727         }
02728
02729         private void UpdateLinedFlowLayoutMinItemSpacing()
02730         {
02731             if (linedFlowLayout != null)
02732             {
02733                 txtLinedFlowLayoutMinItemSpacing.Text = linedFlowLayout.MinItemSpacing.ToString();
02734             }
02735         }
02736
02737         private void UpdateLinedFlowLayoutRealizedItemIndexes()
02738         {
02739             if (linedFlowLayout != null)
02740             {
02741                 txtLinedFlowLayoutFirstRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutFirstRealizedItemIndex(linedFlowLayout).ToString();
02742                 txtLinedFlowLayoutLastRealizedItemIndexDbg.Text = LayoutsTestHooks.GetLayoutLastRealizedItemIndex(linedFlowLayout).ToString();
02743             }
02744         }
02745
02746         private void UpdateLinedFlowLayoutSnappedAverageItemsPerLineDbg()
02747         {
02748             if (linedFlowLayout != null)
02749             {
02750                 txtLinedFlowLayoutSnappedAverageItemsPerLineDbg.Text = LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(linedFlowLayout).ToString();
02751             }
02752         }
02753
02754         private void UpdateScrollViewBackground()
02755         {
02756             if (scrollView != null && cmbScrollViewBackground != null)
02757             {
02758                 SolidColorBrush bg = scrollView.Background as SolidColorBrush;
02759
02760                 if (bg == null)
02761                 {
02762                     cmbScrollViewBackground.SelectedIndex = 0;
02763                 }
02764                 else if (bg.Color == Colors.Transparent)
02765                 {
02766                     cmbScrollViewBackground.SelectedIndex = 1;
02767                 }
02768                 else if (bg.Color == Colors.AliceBlue)
02769                 {
02770                     cmbScrollViewBackground.SelectedIndex = 2;
02771                 }
02772                 else if (bg.Color == Colors.Aqua)
02773                 {
02774                     cmbScrollViewBackground.SelectedIndex = 3;
02775                 }
02776                 else
02777                 {
02778                     cmbScrollViewBackground.SelectedIndex = -1;
02779                 }
02780             }
02781         }
02782
02783         private void UpdateScrollViewBorderBrush()
02784         {
02785             if (scrollView != null && cmbScrollViewBorderBrush != null)
02786             {
02787                 SolidColorBrush bb = scrollView.BorderBrush as SolidColorBrush;
02788
02789                 if (bb == null)
02790                 {
02791                     cmbScrollViewBorderBrush.SelectedIndex = 0;
02792                 }
02793                 else if (bb.Color == Colors.Transparent)
02794                 {
02795                     cmbScrollViewBorderBrush.SelectedIndex = 1;
02796                 }
02797                 else if (bb.Color == Colors.Blue)
02798                 {
02799                     cmbScrollViewBorderBrush.SelectedIndex = 2;
02800                 }
02801                 else if (bb.Color == Colors.Green)
02802                 {
02803                     cmbScrollViewBorderBrush.SelectedIndex = 3;
02804                 }
02805                 else
02806                 {
02807                     cmbScrollViewBorderBrush.SelectedIndex = -1;
02808                 }
02809             }
02810         }
02811
02812         private void UpdateScrollViewBorderThickness()
02813         {
02814             if (scrollView != null && txtScrollViewBorderThickness != null)
02815             {
02816                 txtScrollViewBorderThickness.Text = scrollView.BorderThickness.ToString();
02817             }
02818         }
02819
02820         private void UpdateScrollViewContentOrientation()
02821         {
02822             try
02823             {
02824                 if (scrollView != null && cmbScrollViewContentOrientation != null)
02825                 {
02826                     cmbScrollViewContentOrientation.SelectedIndex = (int)scrollView.ContentOrientation;
02827                 }
02828             }
02829             catch (Exception ex)
02830             {
02831                 txtExceptionReport.Text = ex.ToString();
02832                 AppendEventMessage(ex.ToString());
02833             }
02834         }
02835
02836         private void UpdateScrollViewCornerRadius()
02837         {
02838             if (scrollView != null && txtScrollViewCornerRadius != null)
02839             {
02840                 txtScrollViewCornerRadius.Text = scrollView.CornerRadius.ToString();
02841             }
02842         }
02843
02844         private void UpdateScrollViewExtentHeight()
02845         {
02846             if (scrollView != null && txtScrollViewExtentHeight != null)
02847             {
02848                 txtScrollViewExtentHeight.Text = scrollView.ExtentHeight.ToString();
02849             }
02850         }
02851
02852         private void UpdateScrollViewExtentWidth()
02853         {
02854             if (scrollView != null && txtScrollViewExtentWidth != null)
02855             {
02856                 txtScrollViewExtentWidth.Text = scrollView.ExtentWidth.ToString();
02857             }
02858         }
02859
02860         private void UpdateScrollViewHeight()
02861         {
02862             if (scrollView != null && txtScrollViewHeight != null)
02863             {
02864                 txtScrollViewHeight.Text = scrollView.Height.ToString();
02865             }
02866         }
02867
02868         private void UpdateScrollViewHorizontalAnchorRatio()
02869         {
02870             if (scrollView != null && txtScrollViewHorizontalAnchorRatio != null)
02871             {
02872                 txtScrollViewHorizontalAnchorRatio.Text = scrollView.HorizontalAnchorRatio.ToString();
02873             }
02874         }
02875
02876         private void UpdateScrollViewHorizontalOffset()
02877         {
02878             if (scrollView != null && txtScrollViewHorizontalOffset != null)
02879             {
02880                 txtScrollViewHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
02881             }
02882         }
02883
02884         private void UpdateScrollViewHorizontalScrollBarVisibility()
02885         {
02886             try
02887             {
02888                 if (scrollView != null && cmbScrollViewHorizontalScrollBarVisibility != null)
02889                 {
02890                     cmbScrollViewHorizontalScrollBarVisibility.SelectedIndex = (int)scrollView.HorizontalScrollBarVisibility;
02891                 }
02892             }
02893             catch (Exception ex)
02894             {
02895                 txtExceptionReport.Text = ex.ToString();
02896                 AppendEventMessage(ex.ToString());
02897             }
02898         }
02899
02900         private void UpdateScrollViewHorizontalScrollMode()
02901         {
02902             try
02903             {
02904                 if (scrollView != null && cmbScrollViewHorizontalScrollMode != null)
02905                 {
02906                     cmbScrollViewHorizontalScrollMode.SelectedIndex = (int)scrollView.HorizontalScrollMode;
02907                 }
02908             }
02909             catch (Exception ex)
02910             {
02911                 txtExceptionReport.Text = ex.ToString();
02912                 AppendEventMessage(ex.ToString());
02913             }
02914         }
02915
02916         private void UpdateScrollViewIsEnabled()
02917         {
02918             try
02919             {
02920                 if (scrollView != null && chkScrollViewIsEnabled != null)
02921                 {
02922                     chkScrollViewIsEnabled.IsChecked = scrollView.IsEnabled;
02923                 }
02924             }
02925             catch (Exception ex)
02926             {
02927                 txtExceptionReport.Text = ex.ToString();
02928                 AppendEventMessage(ex.ToString());
02929             }
02930         }
02931
02932         private void UpdateScrollViewIsTabStop()
02933         {
02934             try
02935             {
02936                 if (scrollView != null && chkScrollViewIsTabStop != null)
02937                 {
02938                     chkScrollViewIsTabStop.IsChecked = scrollView.IsTabStop;
02939                 }
02940             }
02941             catch (Exception ex)
02942             {
02943                 txtExceptionReport.Text = ex.ToString();
02944                 AppendEventMessage(ex.ToString());
02945             }
02946         }
02947
02948         private void UpdateScrollViewMargin()
02949         {
02950             if (scrollView != null && txtScrollViewMargin != null)
02951             {
02952                 txtScrollViewMargin.Text = scrollView.Margin.ToString();
02953             }
02954         }
02955
02956         private void UpdateScrollViewMaxHeight()
02957         {
02958             if (scrollView != null && txtScrollViewMaxHeight != null)
02959             {
02960                 txtScrollViewMaxHeight.Text = scrollView.MaxHeight.ToString();
02961             }
02962         }
02963
02964         private void UpdateScrollViewMaxWidth()
02965         {
02966             if (scrollView != null && txtScrollViewMaxWidth != null)
02967             {
02968                 txtScrollViewMaxWidth.Text = scrollView.MaxWidth.ToString();
02969             }
02970         }
02971
02972         private void UpdateScrollViewPadding()
02973         {
02974             if (scrollView != null && txtScrollViewPadding != null)
02975             {
02976                 txtScrollViewPadding.Text = scrollView.Padding.ToString();
02977             }
02978         }
02979
02980         private void UpdateScrollViewVerticalAnchorRatio()
02981         {
02982             if (scrollView != null && txtScrollViewVerticalAnchorRatio != null)
02983             {
02984                 txtScrollViewVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
02985             }
02986         }
02987
02988         private void UpdateScrollViewVerticalOffset()
02989         {
02990             if (scrollView != null && txtScrollViewVerticalOffset != null)
02991             {
02992                 txtScrollViewVerticalOffset.Text = scrollView.VerticalOffset.ToString();
02993             }
02994         }
02995
02996         private void UpdateScrollViewVerticalScrollBarVisibility()
02997         {
02998             try
02999             {
03000                 if (scrollView != null && cmbScrollViewVerticalScrollBarVisibility != null)
03001                 {
03002                     cmbScrollViewVerticalScrollBarVisibility.SelectedIndex = (int)scrollView.VerticalScrollBarVisibility;
03003                 }
03004             }
03005             catch (Exception ex)
03006             {
03007                 txtExceptionReport.Text = ex.ToString();
03008                 AppendEventMessage(ex.ToString());
03009             }
03010         }
03011
03012         private void UpdateScrollViewVerticalScrollMode()
03013         {
03014             try
03015             {
03016                 if (scrollView != null && cmbScrollViewVerticalScrollMode != null)
03017                 {
03018                     cmbScrollViewVerticalScrollMode.SelectedIndex = (int)scrollView.VerticalScrollMode;
03019                 }
03020             }
03021             catch (Exception ex)
03022             {
03023                 txtExceptionReport.Text = ex.ToString();
03024                 AppendEventMessage(ex.ToString());
03025             }
03026         }
03027
03028         private void UpdateScrollViewWidth()
03029         {
03030             if (scrollView != null && txtScrollViewWidth != null)
03031             {
03032                 txtScrollViewWidth.Text = scrollView.Width.ToString();
03033             }
03034         }
03035
03036         private void UpdateScrollViewZoomMode()
03037         {
03038             try
03039             {
03040                 if (scrollView != null && cmbScrollViewZoomMode != null)
03041                 {
03042                     cmbScrollViewZoomMode.SelectedIndex = (int)scrollView.ZoomMode;
03043                 }
03044             }
03045             catch (Exception ex)
03046             {
03047                 txtExceptionReport.Text = ex.ToString();
03048                 AppendEventMessage(ex.ToString());
03049             }
03050         }
03051     }
03052 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/APITests/TreeViewTests.cs Source File

  • File List
  • File Members
  • TreeView
  • APITests

TreeViewTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using System.Linq;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009 using System.Threading;
00010 using System.Collections.Generic;
00011 using Windows.Foundation.Collections;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Markup;
00014 using Microsoft.UI.Xaml.Media.Animation;
00015 using System.Collections.ObjectModel;
00016 using MUXControlsTestApp;
00017 using Common;
00018
00019 using WEX.TestExecution;
00020 using WEX.TestExecution.Markup;
00021 using WEX.Logging.Interop;
00022 using MUXControlsTestApp.Samples;
00023
00024 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00025 {
00026     class SpecialTreeView : TreeView { }
00027     class SpecialTreeViewItem : TreeViewItem { }
00028     class SpecialTreeViewList : TreeViewList
00029     {
00030         protected override DependencyObject GetContainerForItemOverride()
00031         {
00032             return new SpecialTreeViewItem();
00033         }
00034     }
00035     class SpecialTreeViewNode : TreeViewNode { }
00036
00037     [TestClass]
00038     public class TreeViewTests : ApiTestBase
00039     {
00040         [TestMethod]
00041         public void TreeViewNodeTest()
00042         {
00043             RunOnUIThread.Execute(() =>
00044             {
00045                 TreeViewNode treeViewNode1 = new TreeViewNode();
00046                 TreeViewNode treeViewNode2 = new TreeViewNode();
00047                 TreeViewNode treeViewNode3 = new TreeViewNode();
00048
00049                 Verify.AreEqual(false, treeViewNode1.HasChildren);
00050                 Verify.AreEqual(false, (bool)treeViewNode1.GetValue(TreeViewNode.HasChildrenProperty));
00051
00052                 //Test adding a single TreeViewNode
00053                 treeViewNode1.Children.Add(treeViewNode2);
00054
00055                 Verify.AreEqual(treeViewNode2.Parent, treeViewNode1);
00056                 Verify.AreEqual(treeViewNode1.Children.Count, 1);
00057                 Verify.AreEqual(treeViewNode1.Children[0], treeViewNode2);
00058                 Verify.AreEqual(treeViewNode1.IsExpanded, false);
00059                 Verify.AreEqual(treeViewNode2.Depth, 0);
00060
00061                 //Test removing a single TreeViweNode
00062                 treeViewNode1.Children.RemoveAt(0);
00063
00064                 Verify.IsNull(treeViewNode2.Parent);
00065                 Verify.AreEqual(treeViewNode1.Children.Count, 0);
00066                 Verify.AreEqual(treeViewNode2.Depth, -1);
00067
00068                 //Test insert multiple TreeViewNodes
00069                 treeViewNode1.Children.Insert(0, treeViewNode2);
00070                 treeViewNode1.Children.Insert(0, treeViewNode3);
00071
00072                 Verify.AreEqual(treeViewNode1.Children.Count, 2);
00073
00074                 Verify.AreEqual(treeViewNode1.Children[0], treeViewNode3);
00075                 Verify.AreEqual(treeViewNode3.Depth, 0);
00076                 Verify.AreEqual(treeViewNode3.Parent, treeViewNode1);
00077
00078                 Verify.AreEqual(treeViewNode1.Children[1], treeViewNode2);
00079                 Verify.AreEqual(treeViewNode2.Depth, 0);
00080                 Verify.AreEqual(treeViewNode2.Parent, treeViewNode1);
00081
00082                 //Test remove multiple TreeViewNodes
00083                 treeViewNode1.Children.RemoveAt(0);
00084
00085                 Verify.AreEqual(treeViewNode1.Children[0], treeViewNode2);
00086                 Verify.AreEqual(treeViewNode1.Children.Count, 1);
00087                 Verify.IsNull(treeViewNode3.Parent);
00088                 Verify.AreEqual(treeViewNode3.Depth, -1);
00089
00090                 treeViewNode1.Children.RemoveAt(0);
00091
00092                 Verify.AreEqual(treeViewNode1.Children.Count, 0);
00093                 Verify.IsNull(treeViewNode2.Parent);
00094                 Verify.AreEqual(treeViewNode2.Depth, -1);
00095             });
00096         }
00097
00098         [TestMethod]
00099         public void TreeViewClearAndSetAtTest()
00100         {
00101             RunOnUIThread.Execute(() =>
00102             {
00103                 var treeView = new TreeView();
00104
00105                 Content = treeView;
00106                 Content.UpdateLayout();
00107                 var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00108                 // Verify TreeViewNode::SetAt
00109                 TreeViewNode setAtChildCheckNode = new TreeViewNode() { Content = "Set At Child" };
00110                 TreeViewNode setAtRootCheckNode = new TreeViewNode() { Content = "Set At Root" };
00111
00112                 TreeViewNode child1 = new TreeViewNode() { Content = "Child 1" };
00113                 child1.Children.Add(new TreeViewNode() { Content = "Child 1:1" });
00114
00115                 TreeViewNode child2 = new TreeViewNode() { Content = "Child 2" };
00116                 child2.Children.Add(new TreeViewNode() { Content = "Child 2:1" });
00117                 child2.Children.Add(new TreeViewNode() { Content = "Child 2:2" });
00118
00119                 treeView.RootNodes.Add(child1);
00120                 child1.IsExpanded = true;
00121                 treeView.RootNodes.Add(child2);
00122                 Verify.AreEqual(listControl.Items.Count, 3);
00123
00124                 // SetAt node under child node which is not expanded
00125                 child2.Children[1] = setAtChildCheckNode;
00126                 Verify.AreEqual(listControl.Items.Count, 3);
00127
00128                 // SetAt node under root node and child2 is expanded
00129                 treeView.RootNodes[0] = setAtRootCheckNode;
00130                 child2.IsExpanded = true;
00131                 Verify.AreEqual(listControl.Items.Count, 4);
00132
00133                 // Verify RootNode.Clear
00134                 treeView.RootNodes.Clear();
00135                 Verify.AreEqual(listControl.Items.Count, 0);
00136
00137                 // test clear without any child node
00138                 treeView.RootNodes.Clear();
00139                 Verify.AreEqual(listControl.Items.Count, 0);
00140             });
00141         }
00142
00143         [TestMethod]
00144         public void TreeViewItemSourceResetRecreateItems()
00145         {
00146             RunOnUIThread.Execute(() =>
00147             {
00148
00149                 ExtendedObservableCollection<TreeViewItemSource> items
00150                     = new ExtendedObservableCollection<TreeViewItemSource>();
00151                 TreeViewItemSource item1 = new TreeViewItemSource() { Content = "item1" };
00152                 TreeViewItemSource item2 = new TreeViewItemSource() { Content = "item2" };
00153                 TreeViewItemSource item3 = new TreeViewItemSource() { Content = "item3" };
00154                 items.Add(item1);
00155                 items.Add(item2);
00156                 items.Add(item3);
00157
00158                 var treeView = new TreeView();
00159                 treeView.ItemsSource = items;
00160
00161                 Verify.AreEqual(treeView.RootNodes.Count, 3);
00162                 Verify.AreEqual(treeView.RootNodes[0].Content as TreeViewItemSource, items[0]);
00163
00164                 List<TreeViewItemSource> newItems = new List<TreeViewItemSource>();
00165                 TreeViewItemSource item4 = new TreeViewItemSource() { Content = "item4" };
00166                 TreeViewItemSource item5 = new TreeViewItemSource() { Content = "item5" };
00167
00168                 newItems.Add(item4);
00169                 newItems.Add(item5);
00170
00171                 items.ReplaceAll(newItems);
00172
00173                 Verify.AreEqual(treeView.RootNodes.Count, 2);
00174                 Verify.AreEqual(treeView.RootNodes[0].Content as TreeViewItemSource, items[0]);
00175
00176
00177             });
00178         }
00179
00180         [TestMethod]
00181         public void TreeViewUpdateTest()
00182         {
00183             RunOnUIThread.Execute(() =>
00184             {
00185                 var treeViewNode1 = new TreeViewNode();
00186                 var treeViewNode2 = new TreeViewNode();
00187                 var treeViewNode3 = new TreeViewNode();
00188                 var treeViewNode4 = new TreeViewNode();
00189                 var treeViewNode5 = new TreeViewNode();
00190
00191                 treeViewNode1.Children.Add(treeViewNode2);
00192                 treeViewNode1.Children.Add(treeViewNode3);
00193                 treeViewNode1.Children.Add(treeViewNode4);
00194                 treeViewNode1.Children.Add(treeViewNode5);
00195
00196                 var treeView = new TreeView();
00197                 Content = treeView;
00198                 Content.UpdateLayout();
00199                 var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00200                 treeView.RootNodes.Add(treeViewNode1);
00201                 Verify.AreEqual(listControl.Items.Count, 1);
00202
00203                 treeView.Expand(treeViewNode1);
00204                 Verify.AreEqual(listControl.Items.Count, 5);
00205
00206                 treeViewNode1.Children.RemoveAt(2);
00207                 Verify.AreEqual(listControl.Items.Count, 4);
00208                 Verify.AreEqual(listControl.Items[0], treeViewNode1);
00209                 Verify.AreEqual(listControl.Items[1], treeViewNode2);
00210                 Verify.AreEqual(listControl.Items[2], treeViewNode3);
00211                 Verify.AreEqual(listControl.Items[3], treeViewNode5);
00212
00213                 treeViewNode1.Children.Insert(1, treeViewNode4);
00214                 Verify.AreEqual(listControl.Items.Count, 5);
00215                 Verify.AreEqual(listControl.Items[0], treeViewNode1);
00216                 Verify.AreEqual(listControl.Items[1], treeViewNode2);
00217                 Verify.AreEqual(listControl.Items[2], treeViewNode4);
00218                 Verify.AreEqual(listControl.Items[3], treeViewNode3);
00219                 Verify.AreEqual(listControl.Items[4], treeViewNode5);
00220
00221                 treeViewNode1.Children.Clear();
00222                 Verify.AreEqual(listControl.Items.Count, 1);
00223                 Verify.AreEqual(listControl.Items[0], treeViewNode1);
00224             });
00225         }
00226
00227         [TestMethod]// Disabled with issue number #1775
00228         [TestProperty("Ignore", "True")]
00229         public void TreeViewInheritanceTest()
00230         {
00231             RunOnUIThread.Execute(() =>
00232             {
00233                 StackPanel stackPanel = new StackPanel();
00234                 SpecialTreeView inheritedTreeView = new SpecialTreeView();
00235                 SpecialTreeViewList inheritedTreeViewList = new SpecialTreeViewList();
00236                 SpecialTreeViewItem inheritedTreeViewItem = new SpecialTreeViewItem();
00237                 SpecialTreeViewNode inheritedTreeViewNode = new SpecialTreeViewNode();
00238                 IList<string> data = Enumerable.Range(0, 5).Select(x => "Item " + x).ToList();
00239
00240                 Verify.IsNotNull(stackPanel);
00241                 stackPanel.Children.Add(inheritedTreeView);
00242                 stackPanel.Children.Add(inheritedTreeViewList);
00243                 inheritedTreeViewList.ItemsSource = data;
00244                 Content = stackPanel;
00245                 Content.UpdateLayout();
00246             });
00247         }
00248
00249         [TestMethod]
00250         public void VerifyTreeViewIsNotTabStop()
00251         {
00252             RunOnUIThread.Execute(() =>
00253             {
00254                 var treeView = new TreeView();
00255                 Content = treeView;
00256                 Content.UpdateLayout();
00257                 Verify.IsFalse(treeView.IsTabStop);
00258             });
00259         }
00260
00261         [TestMethod]
00262         public void VerifyClearingNodeWithNoChildren()
00263         {
00264             RunOnUIThread.Execute(() =>
00265             {
00266                 var treeViewNode1 = new TreeViewNode();
00267                 var treeView = new TreeView();
00268
00269                 Content = treeView;
00270                 Content.UpdateLayout();
00271                 var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00272                 treeView.RootNodes.Add(treeViewNode1);
00273                 var children = (treeViewNode1.Children as IObservableVector<TreeViewNode>);
00274                 children.VectorChanged += (vector, args) =>
00275                 {
00276                     if (((IVectorChangedEventArgs)args).CollectionChange == CollectionChange.Reset)
00277                     {
00278                         // should not reset if there are not children items
00279                         throw new InvalidOperationException();
00280                     }
00281                 };
00282                 Verify.AreEqual(listControl.Items.Count, 1);
00283
00284                 // this should no-op and not crash
00285                 treeViewNode1.Children.Clear();
00286             });
00287         }
00288
00289         [TestMethod]
00290         public void TreeViewNodeDPTest()
00291         {
00292             RunOnUIThread.Execute(() =>
00293             {
00294                 TreeViewNode rootNode = new TreeViewNode() { Content = "Root" };
00295                 TreeViewNode childNode = new TreeViewNode() { Content = "Child" };
00296                 rootNode.Children.Add(childNode);
00297                 rootNode.IsExpanded = true;
00298
00299                 Verify.AreEqual((string)rootNode.GetValue(TreeViewNode.ContentProperty), "Root");
00300                 Verify.AreEqual((string)childNode.GetValue(TreeViewNode.ContentProperty), "Child");
00301
00302                 Verify.AreEqual((int)rootNode.GetValue(TreeViewNode.DepthProperty), -1);
00303                 Verify.AreEqual((int)childNode.GetValue(TreeViewNode.DepthProperty), 0);
00304
00305                 Verify.AreEqual((bool)rootNode.GetValue(TreeViewNode.IsExpandedProperty), true);
00306                 Verify.AreEqual((bool)childNode.GetValue(TreeViewNode.IsExpandedProperty), false);
00307
00308                 Verify.AreEqual((bool)rootNode.GetValue(TreeViewNode.HasChildrenProperty), true);
00309                 Verify.AreEqual((bool)childNode.GetValue(TreeViewNode.HasChildrenProperty), false);
00310             });
00311         }
00312
00313         [TestMethod]
00314         public void TreeViewItemTemplateTest()
00315         {
00316             RunOnUIThread.Execute(() =>
00317             {
00318                 TreeView treeView = new TreeView();
00319                 treeView.Loaded += (object sender, RoutedEventArgs e) =>
00320                 {
00321                     var dataTemplate = (DataTemplate)XamlReader.Load(
00322                    @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00323                           <TextBlock Text='TreeViewItemTemplate'/>
00324                       </DataTemplate>");
00325                     treeView.ItemTemplate = dataTemplate;
00326                     var node = new TreeViewNode();
00327                     treeView.RootNodes.Add(node);
00328                     var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00329                     var treeViewItem = listControl.ContainerFromItem(node) as TreeViewItem;
00330                     Verify.AreEqual(treeViewItem.ContentTemplate, dataTemplate);
00331                 };
00332             });
00333         }
00334
00335         [TestMethod]
00336         public void ValidateTreeViewItemSourceChangeUpdatesChevronOpacity()
00337         {
00338             RunOnUIThread.Execute(() =>
00339             {
00340                 var treeView = new TreeView();
00341                 var collection = new ObservableCollection<int>();
00342                 collection.Add(5);
00343                 treeView.ItemsSource = collection;
00344                 Content = treeView;
00345                 Content.UpdateLayout();
00346                 var tvi = (TreeViewItem)treeView.ContainerFromItem(5);
00347                 Verify.AreEqual(tvi.GlyphOpacity, 0.0);
00348                 tvi.ItemsSource = collection;
00349                 Content.UpdateLayout();
00350                 Verify.AreEqual(tvi.GlyphOpacity, 1.0);
00351             });
00352         }
00353
00354         [TestMethod]
00355         public void TreeViewItemContainerStyleTest()
00356         {
00357             RunOnUIThread.Execute(() =>
00358             {
00359                 TreeView treeView = new TreeView();
00360                 treeView.Loaded += (object sender, RoutedEventArgs e) =>
00361                 {
00362                     var style = (Style)XamlReader.Load(
00363                    @"<Style xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00364                           <Setter Property='Background' Value='Green'/>
00365                       </Style>");
00366                     treeView.ItemContainerStyle = style;
00367                     var node = new TreeViewNode();
00368                     treeView.RootNodes.Add(node);
00369                     var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00370                     var treeViewItem = listControl.ContainerFromItem(node) as TreeViewItem;
00371                     Verify.AreEqual(treeViewItem.Style, style);
00372                 };
00373             });
00374         }
00375
00376         [TestMethod]
00377         public void TreeViewItemContainerTransitionTest()
00378         {
00379             RunOnUIThread.Execute(() =>
00380             {
00381                 TreeView treeView = new TreeView();
00382                 treeView.Loaded += (object sender, RoutedEventArgs e) =>
00383                 {
00384                     var transition = (TransitionCollection)XamlReader.Load(
00385                    @"<TransitionCollection xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00386                             <ContentThemeTransition />
00387                       </TransitionCollection>");
00388                     treeView.ItemContainerTransitions = transition;
00389                     var node = new TreeViewNode();
00390                     treeView.RootNodes.Add(node);
00391                     var listControl = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00392                     var treeViewItem = listControl.ContainerFromItem(node) as TreeViewItem;
00393                     Verify.AreEqual(treeViewItem.ContentTransitions, transition);
00394                 };
00395             });
00396         }
00397
00398         [TestMethod]
00399         public void TreeViewItemsSourceTest()
00400         {
00401             RunOnUIThread.Execute(() =>
00402             {
00403                 var treeView = new TreeView();
00404                 var items = CreateTreeViewItemsSource();
00405                 treeView.ItemsSource = items;
00406
00407                 Verify.AreEqual(treeView.RootNodes.Count, 2);
00408                 Verify.AreEqual(treeView.RootNodes[0].Content as TreeViewItemSource, items[0]);
00409             });
00410         }
00411
00412         //[TestMethod] 24022985
00413         public void TreeViewItemsSourceUpdateTest()
00414         {
00415             RunOnUIThread.Execute(() =>
00416             {
00417                 var treeView = new TreeView();
00418                 var items = CreateTreeViewItemsSource();
00419                 treeView.ItemsSource = items;
00420
00421                 // Insert
00422                 var newItem = new TreeViewItemSource() { Content = "newItem" };
00423                 items.Add(newItem);
00424                 Verify.AreEqual(treeView.RootNodes.Count, 3);
00425                 var itemFromNode = treeView.RootNodes[2].Content as TreeViewItemSource;
00426                 Verify.AreEqual(newItem.Content, itemFromNode.Content);
00427
00428                 // Remove
00429                 items.Remove(newItem);
00430                 Verify.AreEqual(treeView.RootNodes.Count, 2);
00431
00432                 // Replace
00433                 var item3 = new TreeViewItemSource() { Content = "3" };
00434                 items[1] = item3;
00435                 itemFromNode = treeView.RootNodes[1].Content as TreeViewItemSource;
00436                 Verify.AreEqual(item3.Content, itemFromNode.Content);
00437
00438                 // Clear
00439                 items.Clear();
00440                 Verify.AreEqual(treeView.RootNodes.Count, 0);
00441
00442             });
00443         }
00444
00445         [TestMethod]
00446         [TestProperty("Ignore", "True")] // TODO 29556921: Disabled after converting MUXControlsTestApp to a desktop .NET 5 app.  Re-enable when fixed.
00447         public void TreeViewNodeStringableTest()
00448         {
00449             RunOnUIThread.Execute(() =>
00450             {
00451                 var node = new TreeViewNode() { Content = "Node" };
00452                 Verify.AreEqual(node.Content, node.ToString());
00453
00454                 // Test inherited type
00455                 var node2 = new TreeViewNode2() { Content = "Inherited from TreeViewNode" };
00456                 Verify.AreEqual(node2.Content, node2.ToString());
00457             });
00458         }
00459
00460         [TestMethod]
00461         public void TreeViewPendingSelectedNodesTest()
00462         {
00463             RunOnUIThread.Execute(() =>
00464             {
00465                 var treeView = new TreeView();
00466                 treeView.SelectionMode = TreeViewSelectionMode.Multiple;
00467
00468                 var node1 = new TreeViewNode() { Content = "Node1" };
00469                 var node2 = new TreeViewNode() { Content = "Node2" };
00470                 treeView.RootNodes.Add(node1);
00471                 treeView.RootNodes.Add(node2);
00472                 treeView.SelectedNodes.Add(node1);
00473
00474                 Content = treeView;
00475                 Content.UpdateLayout();
00476                 Verify.AreEqual(true, IsMultiSelectCheckBoxChecked(treeView, node1));
00477                 Verify.AreEqual(false, IsMultiSelectCheckBoxChecked(treeView, node2));
00478             });
00479         }
00480
00481         [TestMethod]
00482         public void VerifyVisualTree()
00483         {
00484             TreeView treeView = null;
00485             RunOnUIThread.Execute(() =>
00486             {
00487                 treeView = new TreeView() { Width = 400, Height = 400 };
00488                 var node1 = new TreeViewNode() { Content = "Node1" };
00489                 treeView.RootNodes.Add(node1);
00490             });
00491             TestUtilities.SetAsVisualTreeRoot(treeView);
00492
00493             VisualTreeTestHelper.VerifyVisualTree(root: treeView, verificationFileNamePrefix: "TreeView");
00494         }
00495
00496         [TestMethod]
00497         public void TreeViewSelectionChangedSingleMode()
00498         {
00499             RunOnUIThread.Execute(() =>
00500             {
00501                 // input data:
00502                 // - 1
00503                 // - 2
00504                 // - 3
00505                 TreeViewSelectionChangedEventArgs selectionChangedEventArgs = null;
00506
00507                 var treeView = new TreeView { SelectionMode = TreeViewSelectionMode.Single };
00508                 treeView.SelectionChanged += (s, e1) => selectionChangedEventArgs = e1;
00509
00510                 var collection = new ObservableCollection<int> { 1, 2, 3 };
00511                 treeView.ItemsSource = collection;
00512                 Content = treeView;
00513                 Content.UpdateLayout();
00514                 var tvi1 = (TreeViewItem)treeView.ContainerFromItem(1);
00515                 var tvi2 = (TreeViewItem)treeView.ContainerFromItem(2);
00516
00517                 tvi1.IsSelected = true;
00518
00519                 Verify.IsNotNull(selectionChangedEventArgs);
00520                 Verify.AreEqual(1, selectionChangedEventArgs.AddedItems.Count);
00521                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(1));
00522                 Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
00523                 selectionChangedEventArgs = null;
00524
00525                 tvi2.IsSelected = true;
00526
00527                 Verify.IsNotNull(selectionChangedEventArgs);
00528                 Verify.AreEqual(1, selectionChangedEventArgs.AddedItems.Count);
00529                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(2));
00530                 Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
00531                 Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(1));
00532                 selectionChangedEventArgs = null;
00533
00534                 tvi2.IsSelected = false;
00535
00536                 Verify.IsNotNull(selectionChangedEventArgs);
00537                 Verify.AreEqual(0, selectionChangedEventArgs.AddedItems.Count);
00538                 Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
00539                 Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(2));
00540                 selectionChangedEventArgs = null;
00541
00542                 tvi1.IsSelected = true;
00543
00544                 Verify.IsNotNull(selectionChangedEventArgs);
00545                 Verify.AreEqual(1, selectionChangedEventArgs.AddedItems.Count);
00546                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(1));
00547                 Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
00548                 selectionChangedEventArgs = null;
00549
00550                 treeView.ItemsSource = null;
00551
00552                 Verify.IsNotNull(selectionChangedEventArgs);
00553                 Verify.AreEqual(0, selectionChangedEventArgs.AddedItems.Count);
00554                 Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
00555                 Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(1));
00556             });
00557         }
00558
00559         [TestMethod]
00560         public void TreeViewSelectionChangedMultipleMode()
00561         {
00562             RunOnUIThread.Execute(() =>
00563             {
00564                 // input data:
00565                 // - 1
00566                 //   - 11
00567                 //   - 12
00568                 //   - 13
00569                 // - 2
00570                 //   - 21
00571                 // - 3
00572                 TreeViewSelectionChangedEventArgs selectionChangedEventArgs = null;
00573
00574                 var treeView = new TreeView { SelectionMode = TreeViewSelectionMode.Multiple };
00575                 treeView.SelectionChanged += (s, e) =>
00576                 {
00577                     selectionChangedEventArgs = e;
00578                 };
00579
00580                 var node1 = new TreeViewNode { Content = "1", IsExpanded = true };
00581                 var node11 = new TreeViewNode { Content = "11" };
00582                 var node12 = new TreeViewNode { Content = "12" };
00583                 var node13 = new TreeViewNode { Content = "13" };
00584                 node1.Children.Add(node11);
00585                 node1.Children.Add(node12);
00586                 node1.Children.Add(node13);
00587
00588                 var node2 = new TreeViewNode { Content = "2", IsExpanded = true };
00589                 var node21 = new TreeViewNode { Content = "21" };
00590                 node2.Children.Add(node21);
00591
00592                 var node3 = new TreeViewNode { Content = "3" };
00593
00594                 treeView.RootNodes.Add(node1);
00595                 treeView.RootNodes.Add(node2);
00596                 treeView.RootNodes.Add(node3);
00597                 Content = treeView;
00598                 Content.UpdateLayout();
00599
00600                 var tvi1 = (TreeViewItem)treeView.ContainerFromItem(node1);
00601                 var tvi11 = (TreeViewItem)treeView.ContainerFromItem(node11);
00602                 var tvi12 = (TreeViewItem)treeView.ContainerFromItem(node12);
00603                 var tvi13 = (TreeViewItem)treeView.ContainerFromItem(node13);
00604                 var tvi2 = (TreeViewItem)treeView.ContainerFromItem(node2);
00605                 var tvi21 = (TreeViewItem)treeView.ContainerFromItem(node21);
00606                 var tvi3 = (TreeViewItem)treeView.ContainerFromItem(node3);
00607
00608                 // - 1         selected
00609                 //   - 11      selected
00610                 //   - 12      selected
00611                 //   - 13      selected
00612                 // - 2
00613                 //   - 21
00614                 // - 3
00615                 tvi1.IsSelected = true;
00616
00617                 Verify.IsNotNull(selectionChangedEventArgs);
00618                 Verify.AreEqual(4, selectionChangedEventArgs.AddedItems.Count);
00619                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node1));
00620                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node11));
00621                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node12));
00622                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node13));
00623                 Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
00624                 selectionChangedEventArgs = null;
00625
00626                 // - 1         selected
00627                 //   - 11
00628                 //   - 12      selected
00629                 //   - 13      selected
00630                 // - 2
00631                 //   - 21
00632                 // - 3
00633                 tvi11.IsSelected = true;
00634                 tvi11.IsSelected = false;
00635
00636                 Verify.IsNotNull(selectionChangedEventArgs);
00637                 Verify.AreEqual(0, selectionChangedEventArgs.AddedItems.Count);
00638                 Verify.AreEqual(1, selectionChangedEventArgs.RemovedItems.Count);
00639                 Verify.IsTrue(selectionChangedEventArgs.RemovedItems.Contains(node11));
00640                 selectionChangedEventArgs = null;
00641
00642                 // - 1         selected
00643                 //   - 11      selected
00644                 //   - 12      selected
00645                 //   - 13      selected
00646                 // - 2         selected
00647                 //   - 21      selected
00648                 // - 3         selected
00649                 treeView.SelectAll();
00650                 Verify.IsNotNull(selectionChangedEventArgs);
00651                 var items = selectionChangedEventArgs.AddedItems.ToList();
00652                 Verify.AreEqual(7, selectionChangedEventArgs.AddedItems.Count);
00653                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node1));
00654                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node11));
00655                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node12));
00656                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node13));
00657                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node2));
00658                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node21));
00659                 Verify.IsTrue(selectionChangedEventArgs.AddedItems.Contains(node3));
00660                 Verify.AreEqual(0, selectionChangedEventArgs.RemovedItems.Count);
00661             });
00662         }
00663
00664         [TestMethod]
00665         public void RemovingLastChildrenSetsIsExpandedToFalse()
00666         {
00667             RunOnUIThread.Execute(() =>
00668             {
00669                 var treeViewRoot = new TreeViewNode();
00670                 var treeViewNode1 = new TreeViewNode();
00671                 var treeViewNode2 = new TreeViewNode();
00672                 var treeViewNode3 = new TreeViewNode();
00673                 var treeViewNode4 = new TreeViewNode();
00674                 var treeViewNode5 = new TreeViewNode();
00675
00676                 // Need root since in TreeView we otherwise
00677                 // could collapse whole tree and hide it forever
00678                 treeViewRoot.Children.Add(treeViewNode1);
00679
00680                 treeViewNode1.Children.Add(treeViewNode2);
00681                 treeViewNode1.Children.Add(treeViewNode3);
00682                 treeViewNode1.Children.Add(treeViewNode4);
00683                 treeViewNode1.Children.Add(treeViewNode5);
00684
00685                 treeViewNode1.IsExpanded = true;
00686                 Verify.IsTrue(treeViewNode1.IsExpanded);
00687
00688                 treeViewNode1.Children.Clear();
00689                 Verify.IsFalse(treeViewNode1.IsExpanded);
00690
00691                 treeViewNode1.Children.Add(treeViewNode2);
00692                 treeViewNode1.IsExpanded = true;
00693                 Verify.IsTrue(treeViewNode1.IsExpanded);
00694
00695                 treeViewNode1.Children.Remove(treeViewNode2);
00696                 Verify.IsFalse(treeViewNode1.IsExpanded);
00697
00698                 treeViewNode1.Children.Add(treeViewNode2);
00699                 treeViewNode1.IsExpanded = true;
00700                 Verify.IsTrue(treeViewNode1.IsExpanded);
00701
00702                 treeViewNode1.Children.RemoveAt(0);
00703                 Verify.IsFalse(treeViewNode1.IsExpanded);
00704             });
00705         }
00706
00707         [TestMethod]
00708         public void TreeViewBackgroundTest()
00709         {
00710             RunOnUIThread.Execute(() =>
00711             {
00712                 var treeView = new TreeView();
00713
00714                 Content = treeView;
00715                 Content.UpdateLayout();
00716
00717                 var treeViewList = VisualTreeUtils.FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00718
00719                 // Make sure the TreeViewList does not already have the background color we are using for this test.
00720                 bool testCondition = treeViewList.Background is SolidColorBrush brush && brush.Color == Colors.Green;
00721                 Verify.IsFalse(testCondition, "The default TreeView background color should not match the test color used.");
00722
00723                 // Check if the Background API affects the TreeView control.
00724                 treeView.Background = new SolidColorBrush(Colors.Green);
00725                 Content.UpdateLayout();
00726
00727                 testCondition = treeViewList.Background is SolidColorBrush brush2 && brush2.Color == Colors.Green;
00728                 Verify.IsTrue(testCondition, "The TreeView background UI should have matched the specified test color.");
00729             });
00730         }
00731
00732         [TestMethod]
00733         public void VerifySettingSelectionDoesNotCrash()
00734         {
00735             RunOnUIThread.Execute(() =>
00736             {
00737                 var treeview = new TreeView();
00738
00739                 var items = new ObservableCollection<string>() {
00740                     "Item0", "Item1", "Item2"
00741                 };
00742
00743                 treeview.SelectedItem = items[0];
00744                 Verify.AreEqual(treeview.SelectedItem, items[0]);
00745
00746                 treeview.ItemsSource = items;
00747                 treeview.SelectedItem = items[1];
00748                 Verify.AreEqual(treeview.SelectedItem, items[1]);
00749             });
00750         }
00751
00752         [TestMethod]
00753         public void SelectedItemsTest()
00754         {
00755             ObservableCollection<TreeViewItemSource> data = null;
00756             TreeView treeview = null;
00757
00758             RunOnUIThread.Execute(() =>
00759             {
00760                 data = CreateItems();
00761
00762                 string treeViewXamlStr = @"
00763                 <TreeView
00764                         xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
00765                         xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""
00766                         Name=""DessertTree""
00767                         SelectionMode=""Multiple""
00768                         ItemsSource=""{Binding}"">
00769                     <TreeView.ItemTemplate>
00770                         <DataTemplate>
00771                             <TreeViewItem
00772                                 IsExpanded=""True""
00773                                 ItemsSource=""{Binding Children}""
00774                                 Content=""{Binding Content}""/>
00775                         </DataTemplate>
00776                     </TreeView.ItemTemplate>
00777                 </TreeView>";
00778
00779                 treeview = XamlReader.Load(treeViewXamlStr) as TreeView;
00780                 treeview.DataContext = data;
00781
00782                 Content = treeview;
00783                 Content.UpdateLayout();
00784             });
00785
00786             IdleSynchronizer.Wait();
00787
00788             RunOnUIThread.Execute(() =>
00789             {
00790                 Log.Comment("Add 1.1 to SelectedItems");
00791                 treeview.SelectedItems.Add(data[1].Children[1]);
00792                 VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2" });
00793
00794                 Log.Comment("Add 1.2.1 to SelectedItems");
00795                 treeview.SelectedItems.Add(data[1].Children[2].Children[1]);
00796                 VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2", "1.2.1" });
00797
00798                 Log.Comment("Add 0.2 to SelectedNodes");
00799                 treeview.SelectedNodes.Add(treeview.RootNodes[0].Children[2]);
00800                 VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2", "1.2.1", "0.2", "0.2.0", "0.2.1", "0.2.2" });
00801
00802                 Log.Comment("Remove 0.2.1 from SelectedItems");
00803                 treeview.SelectedItems.Remove(data[0].Children[2].Children[1]);
00804                 VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.1", "1.1.0", "1.1.1", "1.1.2", "1.2.1", "0.2.0", "0.2.2" });
00805
00806                 Log.Comment("Remove 1.1 from SelectedNodes");
00807                 treeview.SelectedNodes.Remove(treeview.RootNodes[1].Children[1]);
00808                 VerifySelectedNodesAndSelectedItems(treeview, new[] { "1.2.1", "0.2.0", "0.2.2" });
00809             });
00810         }
00811
00812         private void VerifySelectedNodesAndSelectedItems(TreeView treeView, string[] expected)
00813         {
00814             var expectedStr = String.Join(", ", expected);
00815             var actualNodesStr = String.Join(", ", treeView.SelectedNodes.Select(node => (node.Content as TreeViewItemSource)?.Content));
00816             var actualItemsStr = String.Join(", ", treeView.SelectedItems.Select(item => (item as TreeViewItemSource)?.Content));
00817
00818             Log.Comment($"Verify SelectedItems and SelectedNodes of TreeView. Expected: [{expectedStr}], Actual Nodes: [{actualNodesStr}], ActualItems: [{actualItemsStr}]");
00819
00820             Log.Comment($"Verify TreeView.SelectedNodes");
00821             Verify.AreEqual(expected.Length, treeView.SelectedNodes.Count, "Verify TreeView SelectedNodes count");
00822             for(int i=0; i<expected.Length; i++)
00823             {
00824                 var nodeContent = treeView.SelectedNodes[i].Content as TreeViewItemSource;
00825                 Verify.IsNotNull(nodeContent);
00826                 Verify.AreEqual(expected[i], nodeContent.Content, $"Verify TreeView SelectedNodes[{i}]");
00827             }
00828
00829             Log.Comment($"Verify TreeView.SelectedItems");
00830             Verify.AreEqual(expected.Length, treeView.SelectedItems.Count, "Verify TreeView SelectedItems count");
00831             for (int i = 0; i < expected.Length; i++)
00832             {
00833                 var selectedItem = treeView.SelectedItems[i] as TreeViewItemSource;
00834                 Verify.IsNotNull(selectedItem);
00835                 Verify.AreEqual(expected[i], selectedItem.Content, $"Verify TreeView SelectedItems[{i}]");
00836             }
00837         }
00838
00839         private ObservableCollection<TreeViewItemSource> CreateItems(int itemsPerLevel = 3, int depth = 3)
00840         {
00841             ObservableCollection<TreeViewItemSource> items = new ObservableCollection<TreeViewItemSource>();
00842             foreach (var item in CreateItemsImpl(itemsPerLevel, depth))
00843             {
00844                 items.Add(item);
00845             }
00846             return items;
00847         }
00848
00849         private IEnumerable<TreeViewItemSource> CreateItemsImpl(int numItems, int depth, string prefix = "")
00850         {
00851             List<TreeViewItemSource> items = new List<TreeViewItemSource>();
00852             for (int i = 0; i < numItems; i++)
00853             {
00854                 string name;
00855                 if (string.IsNullOrEmpty(prefix))
00856                 {
00857                     name = $"{i}";
00858                 }
00859                 else
00860                 {
00861                     name = $"{prefix}.{i}";
00862                 }
00863                 TreeViewItemSource item = new TreeViewItemSource();
00864                 item.Content = name;
00865                 if (depth > 1)
00866                 {
00867                     var children = CreateItemsImpl(numItems, depth - 1, name);
00868                     foreach (var child in children)
00869                     {
00870                         item.Children.Add(child);
00871                     }
00872                 }
00873                 items.Add(item);
00874             }
00875             return items;
00876         }
00877
00878         private bool IsMultiSelectCheckBoxChecked(TreeView tree, TreeViewNode node)
00879         {
00880             var treeViewItem = tree.ContainerFromNode(node) as TreeViewItem;
00881             var checkBox = VisualTreeUtils.FindVisualChildByName(treeViewItem, "MultiSelectCheckBox") as CheckBox;
00882             return checkBox.IsChecked == true;
00883         }
00884
00885         public ObservableCollection<TreeViewItemSource> CreateTreeViewItemsSource()
00886         {
00887             var items = new ObservableCollection<TreeViewItemSource>();
00888             var item1 = new TreeViewItemSource() { Content = "1" };
00889             var item1_1 = new TreeViewItemSource() { Content = "1.1" };
00890             var item2 = new TreeViewItemSource() { Content = "2" };
00891
00892             item1.Children.Add(item1_1);
00893             items.Add(item1);
00894             items.Add(item2);
00895
00896             return items;
00897         }
00898     }
00899 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewNode2.cs Source File

  • File List
  • File Members
  • TreeView
  • TestUI

TreeViewNode2.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     // An empty class to test TreeViewNode inheritance
00009     class TreeViewNode2 : TreeViewNode
00010     {
00011
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsViewAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ItemsViewAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ItemsViewAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ItemsViewAutomationPeer)
00012 }
00013
00014 #include "ItemsViewAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewNode Member List

This is the complete list of members for TreeViewNode, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
AddExpandedChanged(winrt::TypedEventHandler< winrt::TreeViewNode, winrt::DependencyPropertyChangedEventArgs > const &value) | TreeViewNode |
AddToChildrenNodes(int index, int count) | TreeViewNode | [private]
AreChildrenNodesEqualToItemsSource() | TreeViewNode | [private]
CheckThread() | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
Children() | TreeViewNode |
ChildrenChanged(winrt::TypedEventHandler< winrt::TreeViewNode, winrt::IVectorChangedEventArgs > const &value) | TreeViewNode |
ChildrenChanged(winrt::event_token) | TreeViewNode |
ChildVectorChanged(winrt::IObservableVector< winrt::TreeViewNode > const &sender, winrt::IInspectable const &args) | TreeViewNode |
ClearProperties() | TreeViewNodeProperties | [static]
Content(winrt::IInspectable const &value) | TreeViewNodeProperties |
Content() | TreeViewNodeProperties |
ContentProperty() | TreeViewNodeProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewNode > &&self) noexcept | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline, static]
Depth(int value) | TreeViewNodeProperties |
Depth() | TreeViewNodeProperties |
DepthProperty() | TreeViewNodeProperties | [inline, static]
EnsureProperties() | TreeViewNodeProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
final_release(std::unique_ptr< TreeViewNode > &&self) | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline, static]
get_ParentImpl() | TreeViewNode |
GetBase() | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
GetContentAsString() | TreeViewNode | [private]
GetCustomProperty(hstring const &name) | TreeViewNode |
GetIndexedProperty(hstring const &name, winrt::TypeName const &type) | TreeViewNode |
GetInner() | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
GetStringRepresentation() | TreeViewNode |
HasChildren(bool value) | TreeViewNodeProperties |
HasChildren() | TreeViewNodeProperties |
HasChildrenProperty() | TreeViewNodeProperties | [inline, static]
HasUnrealizedChildren() | TreeViewNode |
HasUnrealizedChildren(bool value) | TreeViewNode |
IsContentMode() | TreeViewNode |
IsContentMode(bool value) | TreeViewNode |
IsExpanded(bool value) | TreeViewNodeProperties |
IsExpanded() | TreeViewNodeProperties |
IsExpandedProperty() | TreeViewNodeProperties | [inline, static]
IsOnThread() | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
ItemsSource() | TreeViewNode |
ItemsSource(winrt::IInspectable const &value) | TreeViewNode |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
OnHasChildrenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewNodeProperties | [static]
OnIsExpandedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewNodeProperties | [static]
OnItemsSourceChanged(const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &args) | TreeViewNode | [private]
OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewNode |
Parent() | TreeViewNode |
PartialSelected enum value | TreeViewNode |
put_ParentImpl(winrt::TreeViewNode const &value) | TreeViewNode |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
RaiseChildrenChanged(winrt::CollectionChange CC, unsigned int index) | TreeViewNode |
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable > | [inline]
RemoveExpandedChanged(winrt::event_token) | TreeViewNode |
RemoveFromChildrenNodes(int index, int count) | TreeViewNode | [private]
s_ContentProperty | TreeViewNodeProperties | [static]
s_DepthProperty | TreeViewNodeProperties | [static]
s_HasChildrenProperty | TreeViewNodeProperties | [static]
s_IsExpandedProperty | TreeViewNodeProperties | [static]
Selected enum value | TreeViewNode |
SelectionState() | TreeViewNode |
SelectionState(TreeNodeSelectionState const &state) | TreeViewNode |
SyncChildrenNodesWithItemsSource() | TreeViewNode | [private]
ToString() | TreeViewNode |
TreeNodeSelectionState enum name | TreeViewNode |
TreeViewNode() | TreeViewNode |
TreeViewNodeProperties() | TreeViewNodeProperties |
Type() | TreeViewNode |
UnSelected enum value | TreeViewNode |
UpdateDepth(int depth) | TreeViewNode |
UpdateHasChildren() | TreeViewNode |
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ListViewPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ListViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     [TopLevelTestPage(Name="ListView", Icon="ListView.png")]
00009     public sealed partial class ListViewPage : TestPage
00010     {
00011         public ListViewPage()
00012         {
00013             this.InitializeComponent();
00014
00015             navigateToListView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewBasePage), false /*use GridView*/); };
00016             navigateToGroupedListView.Click += delegate { Frame.NavigateWithoutAnimation(typeof(GroupedListViewBasePage), false /*use GridView*/); };
00017             navigateToNestedListViews.Click += delegate { Frame.NavigateWithoutAnimation(typeof(NestedListViewsPage)); };
00018             navigateToListViewAnchoring.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewAnchoringPage)); };
00019             navigateToListViewElementNameBinding.Click += delegate { Frame.NavigateWithoutAnimation(typeof(ListViewElementNameBindingPage)); };
00020         }
00021     }
00022 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemCollectionTransitionProvider.cpp Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemCollectionTransitionProvider.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "LinedFlowLayoutItemCollectionTransitionProvider.h"
00007 #include "LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp"
00008
00009 #pragma region IItemCollectionTransitionProviderOverrides
00010
00011 void LinedFlowLayoutItemCollectionTransitionProvider::StartTransitions(
00012     winrt::IVector<winrt::ItemCollectionTransition> const& transitions)
00013 {
00014     std::vector<winrt::ItemCollectionTransition> addTransitions;
00015     std::vector<winrt::ItemCollectionTransition> removeTransitions;
00016     std::vector<winrt::ItemCollectionTransition> moveTransitions;
00017
00018     for (auto const& transition : transitions)
00019     {
00020         if (transition.Operation() == winrt::ItemCollectionTransitionOperation::Add)
00021         {
00022             addTransitions.push_back(transition);
00023         }
00024         else if (transition.Operation() == winrt::ItemCollectionTransitionOperation::Remove)
00025         {
00026             removeTransitions.push_back(transition);
00027         }
00028         else
00029         {
00030             MUX_ASSERT(transition.Operation() == winrt::ItemCollectionTransitionOperation::Move);
00031             moveTransitions.push_back(transition);
00032         }
00033     }
00034
00035     StartAddTransitions(addTransitions, removeTransitions.size() > 0, moveTransitions.size() > 0);
00036     StartRemoveTransitions(removeTransitions, addTransitions.size() > 0);
00037     StartMoveTransitions(moveTransitions, removeTransitions.size() > 0);
00038 }
00039
00040 bool LinedFlowLayoutItemCollectionTransitionProvider::ShouldAnimateCore(winrt::ItemCollectionTransition const& transition)
00041 {
00042     return true;
00043 }
00044
00045 #pragma endregion
00046
00047 void LinedFlowLayoutItemCollectionTransitionProvider::StartAddTransitions(
00048     std::vector<winrt::ItemCollectionTransition> const& transitions,
00049     bool hasRemoveTransitions,
00050     bool hasMoveTransitions)
00051 {
00052     for (auto const& transition : transitions)
00053     {
00054         auto progress = transition.Start();
00055         auto visual = winrt::ElementCompositionPreview::GetElementVisual(progress.Element());
00056         auto compositor = visual.Compositor();
00057         auto animationGroup = compositor.CreateAnimationGroup();
00058
00059         // There are two options for what a add animation can mean.
00060         // It can either mean that we're adding all elements for the first time,
00061         // or it can mean that we're newly adding a new element being added to the collection.
00062         // We'll interpret a add animation outside of the context of being added to a collection
00063         // as the former option, and an animation within the context of an add as the latter option.
00064         if (!WI_IsFlagSet(transition.Triggers(), winrt::ItemCollectionTransitionTriggers::CollectionChangeAdd))
00065         {
00066             visual.Scale(ScaleVisible);
00067
00068             SlideIn(animationGroup, compositor, 0ms);
00069         }
00070         else
00071         {
00072             // Animations proceed in the order of delete, then move, then add.
00073             // Since all animations are begun at the same time, we need to delay Add
00074             // animations until the former two animations will have completed.
00075             auto delay = 0ms;
00076
00077             if (hasMoveTransitions)
00078             {
00079                 delay += DefaultAnimationDuration * 2;
00080             }
00081
00082             if (hasRemoveTransitions)
00083             {
00084                 delay += QuickAnimationDuration;
00085             }
00086
00087             visual.CenterPoint(GetCenterPoint(progress.Element()));
00088             visual.Opacity(1.0f);
00089             visual.TransformMatrix(winrt::float4x4::identity());
00090
00091             ScaleIn(animationGroup, compositor, delay, true /* presetInitialValue */);
00092         }
00093
00094         auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
00095         StartAnimationGroup(visual, animationGroup);
00096         batch.End();
00097         batch.Completed([strongThis = get_strong(), visual, progress](auto const&, auto const&)
00098             {
00099                 if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
00100                 {
00101                     strongThis->m_currentAnimationGroupByVisual.Remove(visual);
00102                 }
00103
00104                 progress.Complete();
00105             });
00106     }
00107 }
00108
00109 void LinedFlowLayoutItemCollectionTransitionProvider::StartRemoveTransitions(
00110     std::vector<winrt::ItemCollectionTransition> const& transitions,
00111     bool hasAddAnimations)
00112 {
00113     for (auto const& transition : transitions)
00114     {
00115         // If the collection has been reset and we're going to play add animations, then we don't want to play delete animations -
00116         // we'll just immediately delete the elements and then animate them in during the add animations.
00117         if (WI_IsFlagSet(transition.Triggers(), winrt::ItemCollectionTransitionTriggers::CollectionChangeReset) &&
00118             hasAddAnimations)
00119         {
00120             continue;
00121         }
00122
00123         auto progress = transition.Start();
00124         auto visual = winrt::ElementCompositionPreview::GetElementVisual(progress.Element());
00125         auto compositor = visual.Compositor();
00126         auto animationGroup = compositor.CreateAnimationGroup();
00127
00128         visual.CenterPoint(GetCenterPoint(progress.Element()));
00129         visual.Opacity(1.0f);
00130         visual.TransformMatrix(winrt::float4x4::identity());
00131
00132         ScaleOut(animationGroup, compositor, 0ms);
00133
00134         auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
00135         StartAnimationGroup(visual, animationGroup);
00136         batch.End();
00137
00138         batch.Completed([strongThis = get_strong(), visual, progress](auto const&, auto const&)
00139             {
00140                 if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
00141                 {
00142                     strongThis->m_currentAnimationGroupByVisual.Remove(visual);
00143                 }
00144
00145                 progress.Complete();
00146             });
00147     }
00148 }
00149
00150 void LinedFlowLayoutItemCollectionTransitionProvider::StartMoveTransitions(
00151     std::vector<winrt::ItemCollectionTransition> const& transitions,
00152     bool hasRemoveTransitions)
00153 {
00154     for (auto const& transition : transitions)
00155     {
00156         // Moved can occur in the context of initial add animations with a trigger of LayoutTransition
00157         // as elements shift to their initial positions, and in that case we don't want to animate the transition.
00158         if (WI_IsFlagSet(transition.Triggers(), winrt::ItemCollectionTransitionTriggers::LayoutTransition))
00159         {
00160             continue;
00161         }
00162
00163         auto progress = transition.Start();
00164         auto oldBounds = transition.OldBounds();
00165         auto newBounds = transition.NewBounds();
00166
00167         auto visual = winrt::ElementCompositionPreview::GetElementVisual(progress.Element());
00168         auto compositor = visual.Compositor();
00169         auto animationGroup = compositor.CreateAnimationGroup();
00170         std::function finishedAction = [progress]()
00171         {
00172             progress.Complete();
00173         };
00174
00175         auto waitBeforeAnimations = hasRemoveTransitions ? QuickAnimationDuration : 0ms;
00176
00177         // If we're still in the same line, then we'll translate from the old position to the new position.
00178         // Otherwise, we'll scale out and then scale in for the transition.
00179         if (std::abs(oldBounds.Y - newBounds.Y) < Epsilon)
00180         {
00181             visual.Opacity(1.0f);
00182             visual.Scale(ScaleVisible);
00183             Translate(animationGroup, compositor, oldBounds, newBounds, waitBeforeAnimations + QuickAnimationDuration / 2, true /* presetInitialValue */);
00184         }
00185         else
00186         {
00187             // The animation when changing lines is more complicated.  We want to scale out the visual from
00188             // its original position, and then scale it back in in its new position.  However, under the covers,
00189             // the visual has already snapped to its new position, so we need to set its position back to the
00190             // original position, use its center point in that location as the scaling center point,
00191             // then set its position to the new position and use its new center point at that location as the
00192             // scaling center point when scaling it back in.
00193             winrt::float3 scaleInCenterPoint{ GetCenterPoint(progress.Element()) };
00194             winrt::float3 scaleOutCenterPoint(
00195                 scaleInCenterPoint.x + (float)(oldBounds.X - newBounds.X),
00196                 scaleInCenterPoint.y + (float)(oldBounds.Y - newBounds.Y),
00197                 scaleInCenterPoint.z);
00198
00199             winrt::float3 startBounds(
00200                 (float)(oldBounds.X - newBounds.X),
00201                 (float)(oldBounds.Y - newBounds.Y),
00202                 0.0f);
00203
00204             auto originalTransformMatrix = visual.TransformMatrix();
00205
00206             visual.CenterPoint(scaleOutCenterPoint);
00207             visual.Opacity(1.0f);
00208             visual.TransformMatrix(originalTransformMatrix * winrt::make_float4x4_translation(startBounds));
00209
00210             ScaleOut(animationGroup, compositor, waitBeforeAnimations + QuickAnimationDuration / 2, true /* presetInitialValue */);
00211
00212             // We'll wait until the scale-out animation has completed before we begin the scale-in animation;
00213             // otherwise, the center point can sometimes be very briefly set to the wrong value and cause a stutter effect.
00214             finishedAction = [this, visual, compositor, scaleInCenterPoint, animationGroup, progress, originalTransformMatrix]()
00215             {
00216                 visual.CenterPoint(scaleInCenterPoint);
00217                 visual.TransformMatrix(originalTransformMatrix);
00218
00219                 ScaleIn(animationGroup, compositor, 0ms);
00220
00221                 auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
00222                 StartAnimationGroup(visual, animationGroup);
00223                 batch.End();
00224                 batch.Completed([strongThis = get_strong(), visual, progress](auto const&, auto const&)
00225                     {
00226                         if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
00227                         {
00228                             strongThis->m_currentAnimationGroupByVisual.Remove(visual);
00229                         }
00230
00231                         progress.Complete();
00232                     });
00233             };
00234         }
00235
00236         auto batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
00237         StartAnimationGroup(visual, animationGroup);
00238         batch.End();
00239         batch.Completed([strongThis = get_strong(), visual, finishedAction](auto const&, auto const&)
00240             {
00241                 if (strongThis->m_currentAnimationGroupByVisual.HasKey(visual))
00242                 {
00243                     strongThis->m_currentAnimationGroupByVisual.Remove(visual);
00244                 }
00245
00246                 finishedAction();
00247             });
00248     }
00249 }
00250
00251 // The slide-in animation is used for the initial load of the content in an ItemsView.
00252 // It has two parts: the elements animate their opacity from 0 to 1, and animate their
00253 // position from (0, +100) to (0, 0), relative to their visual's position.
00254 // This creates the effect of them appearing from nothing while sliding into position.
00255 void LinedFlowLayoutItemCollectionTransitionProvider::SlideIn(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, std::chrono::milliseconds const& delay)
00256 {
00257     auto opacityAnimation = compositor.CreateScalarKeyFrameAnimation();
00258     opacityAnimation.InsertKeyFrame(0.0f, 0.0f);
00259     opacityAnimation.InsertKeyFrame(1.0f, 1.0f);
00260     opacityAnimation.Duration(DefaultAnimationDuration);
00261     opacityAnimation.Target(L"Opacity");
00262
00263     if (delay > 0ms)
00264     {
00265         opacityAnimation.DelayTime(delay);
00266         opacityAnimation.DelayBehavior(winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay);
00267     }
00268
00269     auto translationAnimation = compositor.CreateVector2KeyFrameAnimation();
00270     translationAnimation.SetVector2Parameter(L"start", winrt::float2(0, SlideInDistance));
00271     translationAnimation.SetVector2Parameter(L"end", winrt::float2());
00272     translationAnimation.InsertExpressionKeyFrame(0.0f, L"start");
00273     translationAnimation.InsertExpressionKeyFrame(1.0f, L"end", GetEaseInFunction(compositor));
00274     translationAnimation.Duration(DefaultAnimationDuration);
00275     translationAnimation.Target(L"TransformMatrix._41_42");
00276
00277     if (delay > 0ms)
00278     {
00279         translationAnimation.DelayTime(delay);
00280         translationAnimation.DelayBehavior(winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay);
00281     }
00282
00283     group.Add(opacityAnimation);
00284     group.Add(translationAnimation);
00285 }
00286
00287 // The scale-in animation is used both when a new element is added to the collection
00288 // and when an element changes which line it's located in.
00289 // It animates the visual's scale from 0 to 1, creating the effect of it coming into
00290 // view from an initial pinpoint position in the center of its position.
00291 void LinedFlowLayoutItemCollectionTransitionProvider::ScaleIn(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, std::chrono::milliseconds const& delay, bool presetInitialValue)
00292 {
00293     auto animation = compositor.CreateVector3KeyFrameAnimation();
00294     animation.InsertKeyFrame(0.0f, ScaleCollapsed);
00295     animation.InsertKeyFrame(1.0f, ScaleVisible, GetEaseInFunction(compositor));
00296     animation.Duration(QuickAnimationDuration);
00297     animation.Target(L"Scale");
00298
00299     if (delay > 0ms)
00300     {
00301         animation.DelayTime(delay);
00302         animation.DelayBehavior(presetInitialValue ?
00303             winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay :
00304             winrt::AnimationDelayBehavior::SetInitialValueAfterDelay);
00305     }
00306
00307     group.Add(animation);
00308 }
00309
00310 // The scale-out animation is used both when an element is removed from the collection
00311 // and when an element changes which line it's located in.
00312 // It animates the visual's scale from 1 to 0, creating the effect of it scaling out of
00313 // view to a pinpoint located in what was the center of its position.
00314 void LinedFlowLayoutItemCollectionTransitionProvider::ScaleOut(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, std::chrono::milliseconds const& delay, bool presetInitialValue)
00315 {
00316     auto animation = compositor.CreateVector3KeyFrameAnimation();
00317     animation.InsertKeyFrame(0.0f, ScaleVisible);
00318     animation.InsertKeyFrame(1.0f, ScaleCollapsed, GetEaseOutFunction(compositor));
00319     animation.Duration(QuickAnimationDuration);
00320     animation.Target(L"Scale");
00321
00322     if (delay > 0ms)
00323     {
00324         animation.DelayTime(delay);
00325         animation.DelayBehavior(presetInitialValue ?
00326             winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay :
00327             winrt::AnimationDelayBehavior::SetInitialValueAfterDelay);
00328     }
00329
00330     group.Add(animation);
00331 }
00332
00333 // The translate animation is used when an element is moving to a new position within the same line.
00334 // It slides the visual from its old location to its new location.
00335 void LinedFlowLayoutItemCollectionTransitionProvider::Translate(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, winrt::Rect const& from, winrt::Rect const& to, std::chrono::milliseconds const& delay, bool presetInitialValue)
00336 {
00337     auto positionAnimation = compositor.CreateVector2KeyFrameAnimation();
00338     positionAnimation.SetVector2Parameter(L"start", winrt::float2((float)(from.X - to.X), (float)(from.Y - to.Y)));
00339     positionAnimation.SetVector2Parameter(L"end", winrt::float2());
00340     positionAnimation.InsertExpressionKeyFrame(0.0f, L"start");
00341     positionAnimation.InsertExpressionKeyFrame(1.0f, L"end", GetEaseInFunction(compositor));
00342     positionAnimation.Duration(DefaultAnimationDuration);
00343     positionAnimation.Target(L"TransformMatrix._41_42");
00344
00345     if (delay > 0ms)
00346     {
00347         positionAnimation.DelayTime(delay);
00348         positionAnimation.DelayBehavior(presetInitialValue ?
00349             winrt::AnimationDelayBehavior::SetInitialValueBeforeDelay :
00350             winrt::AnimationDelayBehavior::SetInitialValueAfterDelay);
00351     }
00352
00353     group.Add(positionAnimation);
00354 }
00355
00356 // CenterPoint values are in pixels, and since we want scale transforms to scale around the
00357 // center of the visual, we'll set this CenterPoint value accordingly.
00358 winrt::float3 LinedFlowLayoutItemCollectionTransitionProvider::GetCenterPoint(winrt::UIElement const& element)
00359 {
00360     return winrt::float3(element.ActualSize().x / 2, element.ActualSize().y / 2, 0.0f);
00361 }
00362
00363 winrt::CubicBezierEasingFunction LinedFlowLayoutItemCollectionTransitionProvider::GetEaseInFunction(winrt::Compositor const& compositor)
00364 {
00365     if (m_easeInFunction == nullptr)
00366     {
00367         m_easeInFunction = compositor.CreateCubicBezierEasingFunction(winrt::float2(0.55f, 0), winrt::float2(0, 1));
00368     }
00369
00370     return m_easeInFunction;
00371 }
00372
00373 winrt::CubicBezierEasingFunction LinedFlowLayoutItemCollectionTransitionProvider::GetEaseOutFunction(winrt::Compositor const& compositor)
00374 {
00375     if (m_easeOutFunction == nullptr)
00376     {
00377         m_easeOutFunction = compositor.CreateCubicBezierEasingFunction(winrt::float2(1, 0), winrt::float2(1, 1));
00378     }
00379
00380     return m_easeOutFunction;
00381 }
00382
00383 // When we start an animation on a visual, we'll end the existing animation on that visual
00384 // to ensure that each visual has only one ongoing animation at a time.
00385 void LinedFlowLayoutItemCollectionTransitionProvider::StartAnimationGroup(winrt::Visual const& visual, winrt::CompositionAnimationGroup const& animationGroup)
00386 {
00387     if (m_currentAnimationGroupByVisual.HasKey(visual))
00388     {
00389         visual.StopAnimationGroup(m_currentAnimationGroupByVisual.Lookup(visual));
00390         m_currentAnimationGroupByVisual.Remove(visual);
00391     }
00392
00393     m_currentAnimationGroupByVisual.Insert(visual, animationGroup);
00394     visual.StartAnimationGroup(animationGroup);
00395 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2Properties Member List

This is the complete list of members for WebView2Properties, including all inherited members.
CanGoBack(bool value) | WebView2Properties |
CanGoBack() | WebView2Properties |
CanGoBackProperty() | WebView2Properties | [inline, static]
CanGoForward(bool value) | WebView2Properties |
CanGoForward() | WebView2Properties |
CanGoForwardProperty() | WebView2Properties | [inline, static]
ClearProperties() | WebView2Properties | [static]
CoreProcessFailed(winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2ProcessFailedEventArgs > const &value) | WebView2Properties |
CoreProcessFailed(winrt::event_token const &token) | WebView2Properties |
CoreWebView2Initialized(winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2InitializedEventArgs > const &value) | WebView2Properties |
CoreWebView2Initialized(winrt::event_token const &token) | WebView2Properties |
DefaultBackgroundColor(winrt::Color const &value) | WebView2Properties |
DefaultBackgroundColor() | WebView2Properties |
DefaultBackgroundColorProperty() | WebView2Properties | [inline, static]
EnsureProperties() | WebView2Properties | [static]
m_coreProcessFailedEventSource | WebView2Properties |
m_coreWebView2InitializedEventSource | WebView2Properties |
m_navigationCompletedEventSource | WebView2Properties |
m_navigationStartingEventSource | WebView2Properties |
m_webMessageReceivedEventSource | WebView2Properties |
NavigationCompleted(winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationCompletedEventArgs > const &value) | WebView2Properties |
NavigationCompleted(winrt::event_token const &token) | WebView2Properties |
NavigationStarting(winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2NavigationStartingEventArgs > const &value) | WebView2Properties |
NavigationStarting(winrt::event_token const &token) | WebView2Properties |
OnCanGoBackPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | WebView2Properties | [static]
OnCanGoForwardPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | WebView2Properties | [static]
OnDefaultBackgroundColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | WebView2Properties | [static]
OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | WebView2Properties | [static]
s_CanGoBackProperty | WebView2Properties | [static]
s_CanGoForwardProperty | WebView2Properties | [static]
s_DefaultBackgroundColorProperty | WebView2Properties | [static]
s_SourceProperty | WebView2Properties | [static]
Source(winrt::Uri const &value) | WebView2Properties |
Source() | WebView2Properties |
SourceProperty() | WebView2Properties | [inline, static]
WebMessageReceived(winrt::TypedEventHandler< winrt::WebView2, winrt::CoreWebView2WebMessageReceivedEventArgs > const &value) | WebView2Properties |
WebMessageReceived(winrt::event_token const &token) | WebView2Properties |
WebView2Properties() | WebView2Properties |
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CachedVisualTreeHelpers Member List

This is the complete list of members for CachedVisualTreeHelpers, including all inherited members.
GetDataTemplateComponent(winrt::UIElement const &element) | CachedVisualTreeHelpers | [static]
GetLayoutSlot(winrt::FrameworkElement const &element) | CachedVisualTreeHelpers | [static]
GetParent(winrt::DependencyObject const &child) | CachedVisualTreeHelpers | [static]
m_layoutInfo | CachedVisualTreeHelpers | [private]
m_visualTreeHelper | CachedVisualTreeHelpers | [private]
m_xamlBindingHelperStatics | CachedVisualTreeHelpers | [private]
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMember.cpp Source File

  • File List
  • File Members
  • dll

XamlMember.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006
00007 #include "XamlMember.h"
00008
00009 XamlMember::XamlMember(
00010     wstring_view const& memberName,
00011     const winrt::IXamlType& type,
00012     std::function<winrt::IInspectable(const winrt::IInspectable&)> getter,
00013     std::function<void(const winrt::IInspectable&, const winrt::IInspectable&)> setter,
00014     bool isDependencyProperty,
00015     bool isAttachable)
00016 {
00017     m_memberName = memberName;
00018     m_type = type;
00019     m_getter = getter;
00020     m_setter = setter;
00021     m_isDependencyProperty = isDependencyProperty;
00022     m_isAttachable = isAttachable;
00023 }
00024
00025 bool XamlMember::IsAttachable()
00026 {
00027     return m_isAttachable;
00028 }
00029
00030 bool XamlMember::IsDependencyProperty()
00031 {
00032     return m_isDependencyProperty;
00033 }
00034
00035 bool XamlMember::IsReadOnly()
00036 {
00037     return !static_cast<bool>(m_setter);
00038 }
00039
00040 winrt::hstring XamlMember::Name()
00041 {
00042     return m_memberName;
00043 }
00044
00045 winrt::IXamlType XamlMember::TargetType()
00046 {
00047     return m_type;
00048 }
00049
00050 winrt::IXamlType XamlMember::Type()
00051 {
00052     return m_type;
00053 }
00054
00055 winrt::IInspectable XamlMember::GetValue(winrt::IInspectable const& instance)
00056 {
00057     if (m_getter)
00058     {
00059         return m_getter(instance);
00060     }
00061     return nullptr;
00062 }
00063
00064 void XamlMember::SetValue(winrt::IInspectable const& instance, winrt::IInspectable const& value)
00065 {
00066     if (m_setter)
00067     {
00068         m_setter(instance, value);
00069     }
00070 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooks.h Source File

  • File List
  • File Members
  • SelectorBar

SelectorBarTestHooks.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SelectorBar.h"
00007 #include "SelectorBarTestHooks.g.h"
00008
00009 class SelectorBarTestHooks :
00010     public winrt::implementation::SelectorBarTestHooksT<SelectorBarTestHooks>
00011 {
00012 public:
00013     static winrt::ItemsView GetItemsViewPart(const winrt::SelectorBar& selectorBar);
00014 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionModelChildrenRequestedEventArgs Member List

This is the complete list of members for SelectionModelChildrenRequestedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
Children() | SelectionModelChildrenRequestedEventArgs |
Children(winrt::IInspectable const &value) | SelectionModelChildrenRequestedEventArgs |
DeleteInstanceOnUIThread(std::unique_ptr< SelectionModelChildrenRequestedEventArgs > &&self) noexcept | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< SelectionModelChildrenRequestedEventArgs > &&self) | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
Initialize(const winrt::IInspectable &source, const winrt::IndexPath &sourceIndexPath, bool throwOnAccess) | SelectionModelChildrenRequestedEventArgs |
IsOnThread() | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SelectionModelChildrenRequestedEventArgs, winrt::implementation::SelectionModelChildrenRequestedEventArgsT, winrt::composable, winrt::composing > | [inline]
SelectionModelChildrenRequestedEventArgs(const winrt::IInspectable &data, const winrt::IndexPath &sourceIndexPath, bool throwOnAccess) | SelectionModelChildrenRequestedEventArgs |
Source() | SelectionModelChildrenRequestedEventArgs |
SourceIndex() | SelectionModelChildrenRequestedEventArgs |
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapElementClickEventArgs.properties.cpp Source File

  • File List
  • File Members
  • Generated

MapElementClickEventArgs.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MapElementClickEventArgs.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(MapElementClickEventArgs)
00012 }
00013
00014 #include "MapElementClickEventArgs.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/APITests/SplitButtonTests.cs Source File

  • File List
  • File Members
  • SplitButton
  • APITests

SplitButtonTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Windows.Input;
00006
00007 using MUXControlsTestApp.Utilities;
00008
00009 using Microsoft.UI.Xaml.Controls;
00010 using Common;
00011
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00017 {
00018     [TestClass]
00019     public class SplitButtonTests : ApiTestBase
00020     {
00021         [TestMethod]
00022         [Description("Verifies SplitButton default properties.")]
00023         public void VerifyDefaultsAndBasicSetting()
00024         {
00025             SplitButton splitButton = null;
00026             Flyout flyout = null;
00027             TestCommand command = null;
00028             int parameter = 0;
00029
00030             RunOnUIThread.Execute(() =>
00031             {
00032                 flyout = new Flyout();
00033                 command = new TestCommand();
00034
00035                 splitButton = new SplitButton();
00036                 Verify.IsNotNull(splitButton);
00037
00038                 // Verify Defaults
00039                 Verify.IsNull(splitButton.Flyout);
00040                 Verify.IsNull(splitButton.Command);
00041                 Verify.IsNull(splitButton.CommandParameter);
00042
00043                 // Verify basic setters
00044                 splitButton.Flyout = flyout;
00045                 splitButton.Command = command;
00046                 splitButton.CommandParameter = parameter;
00047             });
00048
00049             IdleSynchronizer.Wait();
00050             RunOnUIThread.Execute(() =>
00051             {
00052                 Verify.AreEqual(splitButton.Flyout, flyout);
00053                 Verify.AreEqual(splitButton.Command, command);
00054                 Verify.AreEqual(splitButton.CommandParameter, parameter);
00055             });
00056         }
00057
00058         [TestMethod]
00059         [Description("Verifies ToggleSplitButton IsChecked property.")]
00060         public void VerifyIsCheckedProperty()
00061         {
00062             RunOnUIThread.Execute(() =>
00063             {
00064                 ToggleSplitButton toggleSplitButton = new ToggleSplitButton();
00065
00066                 Verify.IsFalse(toggleSplitButton.IsChecked, "ToggleSplitButton is not unchecked");
00067
00068                 toggleSplitButton.SetValue(ToggleSplitButton.IsCheckedProperty, true);
00069
00070                 bool isChecked = (bool)toggleSplitButton.GetValue(ToggleSplitButton.IsCheckedProperty);
00071                 Verify.IsTrue(isChecked, "ToggleSplitButton is not checked");
00072             });
00073         }
00074     }
00075
00076
00077     // CanExecuteChanged is never used -- that's ok, disable the compiler warning.
00078 #pragma warning disable CS0067
00079     public class TestCommand : ICommand
00080     {
00081         public event EventHandler CanExecuteChanged;
00082
00083         public TestCommand()
00084         {
00085         }
00086
00087         public bool CanExecute(object o)
00088         {
00089             return true;
00090         }
00091
00092         public void Execute(object o) {}
00093     }
00094     #pragma warning restore CS0067
00095 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPager Member List

This is the complete list of members for PipsPager, including all inherited members.
abi_enter() | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
ApplyStyleToPipAndUpdateOrientation(const winrt::FrameworkElement &pip, const winrt::Style &style) | PipsPager | [private]
CalculateScrollViewerSize(const double defaultPipSize, const double selectedPipSize, const int numberOfPages, int maxVisualIndicators) | PipsPager | [private]
CheckThread() | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
ClearProperties() | PipsPagerProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< PipsPager > &&self) noexcept | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline, static]
EnsureProperties() | PipsPagerProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
final_release(std::unique_ptr< PipsPager > &&self) | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline, static]
GetBase() | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
GetDesiredPipSize(const winrt::Style &style) | PipsPager | [private]
GetInner() | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
GetSelectedItem() | PipsPager |
IsOnThread() | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
IsOutOfControlBounds(const winrt::Point &point) | PipsPager | [private]
IsWrapEnabled() | PipsPager | [inline, private]
LosingFocus(const IInspectable &sender, const winrt::LosingFocusEventArgs &args) | PipsPager |
m_selectedIndexChangedEventSource | PipsPagerProperties |
MaxVisiblePips(int value) | PipsPagerProperties |
MaxVisiblePips() | PipsPagerProperties |
MaxVisiblePipsProperty() | PipsPagerProperties | [inline, static]
NextButtonStyle(winrt::Style const &value) | PipsPagerProperties |
NextButtonStyle() | PipsPagerProperties |
NextButtonStyleProperty() | PipsPagerProperties | [inline, static]
NextButtonVisibility(winrt::PipsPagerButtonVisibility const &value) | PipsPagerProperties |
NextButtonVisibility() | PipsPagerProperties |
NextButtonVisibilityProperty() | PipsPagerProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
NormalPipStyle(winrt::Style const &value) | PipsPagerProperties |
NormalPipStyle() | PipsPagerProperties |
NormalPipStyleProperty() | PipsPagerProperties | [inline, static]
NumberOfPages(int value) | PipsPagerProperties |
NumberOfPages() | PipsPagerProperties |
NumberOfPagesProperty() | PipsPagerProperties | [inline, static]
OnApplyTemplate() | PipsPager |
OnCreateAutomationPeer() | PipsPager |
OnElementIndexChanged(const winrt::ItemsRepeater &repeater, const winrt::ItemsRepeaterElementIndexChangedEventArgs &args) | PipsPager | [private]
OnElementPrepared(winrt::ItemsRepeater sender, winrt::ItemsRepeaterElementPreparedEventArgs args) | PipsPager | [private]
OnGotFocus(const winrt::RoutedEventArgs &args) | PipsPager |
OnItemsRepeaterLayoutChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &args) | PipsPager | [private]
OnKeyDown(const winrt::KeyRoutedEventArgs &args) | PipsPager |
OnLostFocus(const winrt::RoutedEventArgs &args) | PipsPager |
OnMaxVisiblePipsChanged() | PipsPager |
OnMaxVisiblePipsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNavigationButtonVisibilityChanged(const winrt::PipsPagerButtonVisibility visibility, const wstring_view &collapsedStateName, const wstring_view &disabledStateName) | PipsPager |
OnNextButtonClicked(const IInspectable &sender, const winrt::RoutedEventArgs &args) | PipsPager | [private]
OnNextButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNextButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNormalPipStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNumberOfPagesChanged() | PipsPager |
OnNumberOfPagesPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnOrientationChanged() | PipsPager |
OnOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnPipsAreaBringIntoViewRequested(const IInspectable &sender, const winrt::BringIntoViewRequestedEventArgs &args) | PipsPager | [private]
OnPipsAreaGettingFocus(const IInspectable &sender, const winrt::GettingFocusEventArgs &args) | PipsPager | [private]
OnPointerCanceled(const winrt::PointerRoutedEventArgs &args) | PipsPager |
OnPointerEntered(const winrt::PointerRoutedEventArgs &args) | PipsPager |
OnPointerExited(const winrt::PointerRoutedEventArgs &args) | PipsPager |
OnPreviousButtonClicked(const IInspectable &sender, const winrt::RoutedEventArgs &args) | PipsPager | [private]
OnPreviousButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnPreviousButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | PipsPager |
OnScrollViewerBringIntoViewRequested(const IInspectable &sender, const winrt::BringIntoViewRequestedEventArgs &args) | PipsPager | [private]
OnSelectedPageIndexChanged(const int oldValue) | PipsPager |
OnSelectedPageIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnSelectedPipStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnWrapModeChanged() | PipsPager |
OnWrapModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
Orientation(winrt::Orientation const &value) | PipsPagerProperties |
Orientation() | PipsPagerProperties |
OrientationProperty() | PipsPagerProperties | [inline, static]
PipsPager() | PipsPager |
PipsPagerProperties() | PipsPagerProperties |
PreviousButtonStyle(winrt::Style const &value) | PipsPagerProperties |
PreviousButtonStyle() | PipsPagerProperties |
PreviousButtonStyleProperty() | PipsPagerProperties | [inline, static]
PreviousButtonVisibility(winrt::PipsPagerButtonVisibility const &value) | PipsPagerProperties |
PreviousButtonVisibility() | PipsPagerProperties |
PreviousButtonVisibilityProperty() | PipsPagerProperties | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
RaiseSelectedIndexChanged() | PipsPager | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< PipsPager, winrt::implementation::PipsPagerT > | [inline]
RestoreLayoutVirtualization() | PipsPager | [private]
s_MaxVisiblePipsProperty | PipsPagerProperties | [static]
s_NextButtonStyleProperty | PipsPagerProperties | [static]
s_NextButtonVisibilityProperty | PipsPagerProperties | [static]
s_NormalPipStyleProperty | PipsPagerProperties | [static]
s_NumberOfPagesProperty | PipsPagerProperties | [static]
s_OrientationProperty | PipsPagerProperties | [static]
s_pipButtonHandlersProperty | PipsPager |
s_PreviousButtonStyleProperty | PipsPagerProperties | [static]
s_PreviousButtonVisibilityProperty | PipsPagerProperties | [static]
s_SelectedPageIndexProperty | PipsPagerProperties | [static]
s_SelectedPipStyleProperty | PipsPagerProperties | [static]
s_TemplateSettingsProperty | PipsPagerProperties | [static]
s_WrapModeProperty | PipsPagerProperties | [static]
ScrollToCenterOfViewport(const winrt::UIElement sender, const int index) | PipsPager | [private]
SelectedIndexChanged(winrt::TypedEventHandler< winrt::PipsPager, winrt::PipsPagerSelectedIndexChangedEventArgs > const &value) | PipsPagerProperties |
SelectedIndexChanged(winrt::event_token const &token) | PipsPagerProperties |
SelectedPageIndex(int value) | PipsPagerProperties |
SelectedPageIndex() | PipsPagerProperties |
SelectedPageIndexProperty() | PipsPagerProperties | [inline, static]
SelectedPipStyle(winrt::Style const &value) | PipsPagerProperties |
SelectedPipStyle() | PipsPagerProperties |
SelectedPipStyleProperty() | PipsPagerProperties | [inline, static]
SetScrollViewerMaxSize() | PipsPager | [private]
TemplateSettings(winrt::PipsPagerTemplateSettings const &value) | PipsPagerProperties |
TemplateSettings() | PipsPagerProperties |
TemplateSettingsProperty() | PipsPagerProperties | [inline, static]
UpdateIndividualNavigationButtonVisualState(const bool hiddenOnEdgeCondition, const winrt::PipsPagerButtonVisibility visibility, const wstring_view &visibleStateName, const wstring_view &hiddenStateName, const wstring_view &enabledStateName, const wstring_view &disabledStateName) | PipsPager | [private]
UpdateLayoutVirtualization() | PipsPager | [private]
UpdateNavigationButtonVisualStates() | PipsPager | [private]
UpdatePipOrientation(const winrt::Control &pip) | PipsPager | [private]
UpdatePipsItems(const int numberOfPages, int maxVisualIndicators) | PipsPager | [private]
UpdateSelectedPip(const int index) | PipsPager | [private]
UpdateSizeOfSetForElements(const int numberOfPages, const int numberOfItems) | PipsPager |
WrapMode(winrt::PipsPagerWrapMode const &value) | PipsPagerProperties |
WrapMode() | PipsPagerProperties |
WrapModeProperty() | PipsPagerProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewProperties Member List

This is the complete list of members for ItemsViewProperties, including all inherited members.
ClearProperties() | ItemsViewProperties | [static]
CurrentItemIndex(int value) | ItemsViewProperties |
CurrentItemIndex() | ItemsViewProperties |
CurrentItemIndexProperty() | ItemsViewProperties | [inline, static]
EnsureProperties() | ItemsViewProperties | [static]
IsItemInvokedEnabled(bool value) | ItemsViewProperties |
IsItemInvokedEnabled() | ItemsViewProperties |
IsItemInvokedEnabledProperty() | ItemsViewProperties | [inline, static]
ItemInvoked(winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewItemInvokedEventArgs > const &value) | ItemsViewProperties |
ItemInvoked(winrt::event_token const &token) | ItemsViewProperties |
ItemsSource(winrt::IInspectable const &value) | ItemsViewProperties |
ItemsSource() | ItemsViewProperties |
ItemsSourceProperty() | ItemsViewProperties | [inline, static]
ItemsViewProperties() | ItemsViewProperties |
ItemTemplate(winrt::IElementFactory const &value) | ItemsViewProperties |
ItemTemplate() | ItemsViewProperties |
ItemTemplateProperty() | ItemsViewProperties | [inline, static]
ItemTransitionProvider(winrt::ItemCollectionTransitionProvider const &value) | ItemsViewProperties |
ItemTransitionProvider() | ItemsViewProperties |
ItemTransitionProviderProperty() | ItemsViewProperties | [inline, static]
Layout(winrt::Layout const &value) | ItemsViewProperties |
Layout() | ItemsViewProperties |
LayoutProperty() | ItemsViewProperties | [inline, static]
m_itemInvokedEventSource | ItemsViewProperties |
m_selectionChangedEventSource | ItemsViewProperties |
OnCurrentItemIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnIsItemInvokedEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnItemTransitionProviderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnLayoutPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnScrollViewPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnSelectionModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
OnVerticalScrollControllerPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsViewProperties | [static]
s_CurrentItemIndexProperty | ItemsViewProperties | [static]
s_IsItemInvokedEnabledProperty | ItemsViewProperties | [static]
s_ItemsSourceProperty | ItemsViewProperties | [static]
s_ItemTemplateProperty | ItemsViewProperties | [static]
s_ItemTransitionProviderProperty | ItemsViewProperties | [static]
s_LayoutProperty | ItemsViewProperties | [static]
s_ScrollViewProperty | ItemsViewProperties | [static]
s_SelectedItemProperty | ItemsViewProperties | [static]
s_SelectionModeProperty | ItemsViewProperties | [static]
s_VerticalScrollControllerProperty | ItemsViewProperties | [static]
ScrollView(winrt::ScrollView const &value) | ItemsViewProperties |
ScrollView() | ItemsViewProperties |
ScrollViewProperty() | ItemsViewProperties | [inline, static]
SelectedItem(winrt::IInspectable const &value) | ItemsViewProperties |
SelectedItem() | ItemsViewProperties |
SelectedItemProperty() | ItemsViewProperties | [inline, static]
SelectionChanged(winrt::TypedEventHandler< winrt::ItemsView, winrt::ItemsViewSelectionChangedEventArgs > const &value) | ItemsViewProperties |
SelectionChanged(winrt::event_token const &token) | ItemsViewProperties |
SelectionMode(winrt::ItemsViewSelectionMode const &value) | ItemsViewProperties |
SelectionMode() | ItemsViewProperties |
SelectionModeProperty() | ItemsViewProperties | [inline, static]
VerticalScrollController(winrt::IScrollController const &value) | ItemsViewProperties |
VerticalScrollController() | ItemsViewProperties |
VerticalScrollControllerProperty() | ItemsViewProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarStencilButton.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarStencilButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarStencilButton.g.h"
00011 #include "InkToolBarStencilButton.properties.h"
00012
00013 #include "InkToolBarMenuButton.h"
00014
00015 class InkToolBarStencilButton :
00016     public winrt::implementation::InkToolBarStencilButtonT<InkToolBarStencilButton, InkToolBarMenuButton>,
00017     public InkToolBarStencilButtonProperties
00018 {
00019 public:
00020     ForwardRefToBaseReferenceTracker(InkToolBarMenuButton)
00021
00022     // These functions are ambiguous with InkToolBarMenuButton, disambiguate
00023     using InkToolBarStencilButtonProperties::EnsureProperties;
00024     using InkToolBarStencilButtonProperties::ClearProperties;
00025
00026     winrt::InkPresenterRuler Ruler() { winrt::throw_hresult(E_NOTIMPL); }
00027     winrt::InkPresenterProtractor Protractor() { winrt::throw_hresult(E_NOTIMPL); }
00028     winrt::InkToolBarStencilKind SelectedStencil() { winrt::throw_hresult(E_NOTIMPL); }
00029     void SelectedStencil(winrt::InkToolBarStencilKind value) { winrt::throw_hresult(E_NOTIMPL); }
00030     bool IsRulerItemVisible() { winrt::throw_hresult(E_NOTIMPL); }
00031     void IsRulerItemVisible(bool value) { winrt::throw_hresult(E_NOTIMPL); }
00032     bool IsProtractorItemVisible() { winrt::throw_hresult(E_NOTIMPL); }
00033     void IsProtractorItemVisible(bool value) { winrt::throw_hresult(E_NOTIMPL); }
00034 };
00035
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs Member List

This is the complete list of members for BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs, including all inherited members.
OffsetChangeCorrelationId | BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs |
UniScrollControllerScrollingScrollCompletedEventArgs(int offsetChangeCorrelationId) | BiDirectionalScrollController::UniScrollControllerScrollingScrollCompletedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBorderBrush.h Source File

  • File List
  • File Members
  • Materials
  • Reveal

RevealBorderBrush.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "RevealBrush.h"
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/InteractionTests/SplitButtonTests.cs Source File

  • File List
  • File Members
  • SplitButton
  • InteractionTests

SplitButtonTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using Common;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class SplitButtonTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00029         public static void ClassInitialize(TestContext testContext)
00030         {
00031             TestEnvironment.Initialize(testContext);
00032         }
00033
00034         public void TestCleanup()
00035         {
00036             TestCleanupHelper.Cleanup();
00037         }
00038
00039         [TestMethod]
00040         public void BasicInteractionTest()
00041         {
00042             using (var setup = new TestSetupHelper("SplitButton Tests"))
00043             {
00044                 SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");
00045
00046                 TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
00047                 TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
00048                 TextBlock flyoutClosedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutClosedCountTextBlock");
00049
00050                 Verify.AreEqual("0", clickCountTextBlock.DocumentText);
00051                 ClickPrimaryButton(splitButton);
00052                 Verify.AreEqual("1", clickCountTextBlock.DocumentText);
00053                 VerifyElement.NotFound("TestFlyout", FindBy.Name);
00054
00055                 Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
00056                 ClickSecondaryButton(splitButton);
00057                 Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
00058                 VerifyElement.Found("TestFlyout", FindBy.Name);
00059
00060                 Verify.AreEqual("0", flyoutClosedCountTextBlock.DocumentText);
00061                 Log.Comment("Close flyout by clicking over the button");
00062                 splitButton.Click();
00063                 Wait.ForIdle();
00064                 Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);
00065             }
00066         }
00067
00068         [TestMethod]
00069         public void CommandTest()
00070         {
00071             using (var setup = new TestSetupHelper("SplitButton Tests"))
00072             {
00073                 SplitButton splitButton = FindElement.ByName<SplitButton>("CommandSplitButton");
00074
00075                 CheckBox canExecuteCheckBox = FindElement.ByName<CheckBox>("CanExecuteCheckBox");
00076                 TextBlock executeCountTextBlock = FindElement.ByName<TextBlock>("ExecuteCountTextBlock");
00077
00078                 Log.Comment("Verify that the control starts out enabled");
00079                 Verify.AreEqual(ToggleState.On, canExecuteCheckBox.ToggleState);
00080                 Verify.AreEqual(true, splitButton.IsEnabled);
00081                 Verify.AreEqual("0", executeCountTextBlock.DocumentText);
00082
00083                 Log.Comment("Click primary button to execute command");
00084                 ClickPrimaryButton(splitButton);
00085                 Verify.AreEqual("1", executeCountTextBlock.DocumentText);
00086
00087                 Log.Comment("Click primary button with SPACE key to execute command");
00088                 ClickPrimaryButtonWithKey(splitButton, "SPACE");
00089                 Verify.AreEqual("2", executeCountTextBlock.DocumentText);
00090
00091                 Log.Comment("Click primary button with ENTER key to execute command");
00092                 ClickPrimaryButtonWithKey(splitButton, "ENTER");
00093                 Verify.AreEqual("3", executeCountTextBlock.DocumentText);
00094
00095                 Log.Comment("Use invoke pattern to execute command");
00096                 splitButton.InvokeAndWait();
00097                 Verify.AreEqual("4", executeCountTextBlock.DocumentText);
00098
00099                 Log.Comment("Verify that setting CanExecute to false disables the primary button");
00100                 canExecuteCheckBox.Uncheck();
00101                 Wait.ForIdle();
00102                 ClickPrimaryButton(splitButton);
00103                 Verify.AreEqual("4", executeCountTextBlock.DocumentText);
00104             }
00105         }
00106
00107
00108         [TestMethod]
00109         public void TouchTest()
00110         {
00111             using (var setup = new TestSetupHelper("SplitButton Tests"))
00112             {
00113                 SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");
00114
00115                 CheckBox simulateTouchCheckBox = FindElement.ByName<CheckBox>("SimulateTouchCheckBox");
00116
00117                 TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
00118                 TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
00119
00120                 Log.Comment("Check simulate touch mode checkbox");
00121                 simulateTouchCheckBox.Click(); // This conveniently moves the mouse over the checkbox so that it isn't over the split button yet
00122                 Wait.ForIdle();
00123
00124                 Verify.AreEqual("0", clickCountTextBlock.DocumentText);
00125                 Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
00126
00127                 Log.Comment("Click primary button to open flyout in touch mode");
00128                 ClickPrimaryButton(splitButton);
00129
00130                 Verify.AreEqual("0", clickCountTextBlock.DocumentText);
00131                 Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
00132
00133                 Log.Comment("Close flyout by clicking over the button");
00134                 splitButton.Click();
00135                 Wait.ForIdle();
00136             }
00137         }
00138
00139
00140         [TestMethod]
00141         public void AccessibilityTest()
00142         {
00143             using (var setup = new TestSetupHelper("SplitButton Tests"))
00144             {
00145                 SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");
00146
00147                 TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
00148                 TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
00149                 TextBlock flyoutClosedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutClosedCountTextBlock");
00150
00151                 Log.Comment("Verify that SplitButton has no accessible children");
00152                 Verify.AreEqual(0, splitButton.Children.Count);
00153
00154                 Verify.AreEqual("0", clickCountTextBlock.DocumentText);
00155                 Log.Comment("Verify that invoking the SplitButton causes a click");
00156                 splitButton.InvokeAndWait();
00157                 Verify.AreEqual("1", clickCountTextBlock.DocumentText);
00158
00159                 Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
00160                 Log.Comment("Verify that expanding the SplitButton opens the flyout");
00161                 splitButton.ExpandAndWait();
00162                 Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
00163                 Verify.AreEqual(ExpandCollapseState.Expanded, splitButton.ExpandCollapseState);
00164
00165                 Verify.AreEqual("0", flyoutClosedCountTextBlock.DocumentText);
00166                 Log.Comment("Verify that collapsing the SplitButton closes the flyout");
00167                 splitButton.CollapseAndWait();
00168                 Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);
00169                 Verify.AreEqual(ExpandCollapseState.Collapsed, splitButton.ExpandCollapseState);
00170             }
00171         }
00172
00173         [TestMethod]
00174         public void KeyboardTest()
00175         {
00176             using (var setup = new TestSetupHelper("SplitButton Tests"))
00177             {
00178                 SplitButton splitButton = FindElement.ByName<SplitButton>("TestSplitButton");
00179
00180                 TextBlock clickCountTextBlock = FindElement.ByName<TextBlock>("ClickCountTextBlock");
00181                 TextBlock flyoutOpenedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutOpenedCountTextBlock");
00182                 TextBlock flyoutClosedCountTextBlock = FindElement.ByName<TextBlock>("FlyoutClosedCountTextBlock");
00183
00184                 Verify.AreEqual("0", clickCountTextBlock.DocumentText);
00185                 Log.Comment("Verify that pressing Space on SplitButton causes a click");
00186                 splitButton.SetFocus();
00187                 Wait.ForIdle();
00188                 KeyboardHelper.PressKey(Key.Space);
00189                 Wait.ForIdle();
00190                 Verify.AreEqual("1", clickCountTextBlock.DocumentText);
00191
00192                 Verify.AreEqual("0", flyoutOpenedCountTextBlock.DocumentText);
00193                 Log.Comment("Verify that pressing alt-down on SplitButton opens the flyout");
00194                 KeyboardHelper.PressDownModifierKey(ModifierKey.Alt);
00195                 KeyboardHelper.PressKey(Key.Down);
00196                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Alt);
00197                 Wait.ForIdle();
00198                 Verify.AreEqual("1", flyoutOpenedCountTextBlock.DocumentText);
00199
00200                 Verify.AreEqual("0", flyoutClosedCountTextBlock.DocumentText);
00201                 Log.Comment("Verify that pressing escape closes the flyout");
00202                 KeyboardHelper.PressKey(Key.Escape);
00203                 Wait.ForIdle();
00204                 Verify.AreEqual("1", flyoutClosedCountTextBlock.DocumentText);
00205
00206                 Log.Comment("Verify that F4 opens the flyout");
00207                 splitButton.SetFocus();
00208                 Wait.ForIdle();
00209                 TextInput.SendText("{F4}");
00210                 Wait.ForIdle();
00211                 Verify.AreEqual("2", flyoutOpenedCountTextBlock.DocumentText);
00212             }
00213         }
00214
00215         [TestMethod]
00216         public void ToggleTest()
00217         {
00218             using (var setup = new TestSetupHelper("SplitButton Tests"))
00219             {
00220                 SplitButton splitButton = FindElement.ByName<SplitButton>("ToggleSplitButton");
00221
00222                 TextBlock toggleStateTextBlock = FindElement.ByName<TextBlock>("ToggleStateTextBlock");
00223                 TextBlock toggleStateOnClickTextBlock = FindElement.ByName<TextBlock>("ToggleStateOnClickTextBlock");
00224
00225                 Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
00226                 Verify.AreEqual("Unchecked", toggleStateOnClickTextBlock.DocumentText);
00227
00228                 Log.Comment("Click primary button to check button");
00229                 using (var toggleStateWaiter = new PropertyChangedEventWaiter(splitButton, Scope.Element, UIProperty.Get("Toggle.ToggleState")))
00230                 {
00231                     ClickPrimaryButton(splitButton);
00232                     Verify.IsTrue(toggleStateWaiter.TryWait(TimeSpan.FromSeconds(1)), "Waiting for the Toggle.ToggleState event should succeed");
00233                 }
00234
00235                 Verify.AreEqual("Checked", toggleStateTextBlock.DocumentText);
00236                 Verify.AreEqual("Checked", toggleStateOnClickTextBlock.DocumentText);
00237
00238                 Log.Comment("Click primary button to uncheck button");
00239                 ClickPrimaryButton(splitButton);
00240
00241                 Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
00242                 Verify.AreEqual("Unchecked", toggleStateOnClickTextBlock.DocumentText);
00243
00244                 Log.Comment("Clicking secondary button should not change toggle state");
00245                 ClickSecondaryButton(splitButton);
00246
00247                 Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
00248                 Verify.AreEqual("Unchecked", toggleStateOnClickTextBlock.DocumentText);
00249             }
00250         }
00251
00252         [TestMethod]
00253         public void ToggleAccessibilityTest()
00254         {
00255             using (var setup = new TestSetupHelper("SplitButton Tests"))
00256             {
00257                 ToggleButton toggleButton = FindElement.ByName<ToggleButton>("ToggleSplitButton");
00258
00259                 TextBlock toggleStateTextBlock = FindElement.ByName<TextBlock>("ToggleStateTextBlock");
00260
00261                 Verify.AreEqual("Unchecked", toggleStateTextBlock.DocumentText);
00262                 Verify.AreEqual(ToggleState.Off, toggleButton.ToggleState);
00263
00264                 Log.Comment("Verify that toggling the SplitButton works");
00265                 toggleButton.Toggle();
00266                 Wait.ForIdle();
00267
00268                 Verify.AreEqual("Checked", toggleStateTextBlock.DocumentText);
00269                 Verify.AreEqual(ToggleState.On, toggleButton.ToggleState);
00270             }
00271         }
00272
00273         public void ClickPrimaryButton(SplitButton splitButton)
00274         {
00275             Log.Comment("Click primary button area");
00276             splitButton.Click(PointerButtons.Primary, 5, splitButton.BoundingRectangle.Height / 2);
00277             Wait.ForIdle();
00278         }
00279
00280         public void ClickPrimaryButtonWithKey(SplitButton splitButton, string key)
00281         {
00282             Log.Comment("Click primary button area with %s key", key);
00283             splitButton.SendKeys("{" + key + "}");
00284             Wait.ForIdle();
00285         }
00286
00287         public void ClickSecondaryButton(SplitButton splitButton)
00288         {
00289             Log.Comment("Click secondary button area");
00290             splitButton.Click(PointerButtons.Primary, splitButton.BoundingRectangle.Width - 5, splitButton.BoundingRectangle.Height / 2);
00291             Wait.ForIdle();
00292         }
00293     }
00294 }
00295
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewPictureLibraryPage Member List

This is the complete list of members for ItemsViewPictureLibraryPage, including all inherited members.
AppendEventMessage(string eventMessage) | ItemsViewPictureLibraryPage | [inline, private]
AppendEventMessage() | ItemsViewPictureLibraryPage | [inline, private]
aspectRatios | ItemsViewPictureLibraryPage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkCustomUI_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkCustomUI_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsViewEvents_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsViewEvents_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
GetAspectRatios(ref int itemsRangeStartIndex, int itemsRangeRequestedLength) | ItemsViewPictureLibraryPage | [inline, private]
ItemsRepeater_Loaded(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ItemsRepeater_SizeChanged(object sender, SizeChangedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ItemsView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
ItemsView_GotFocus(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ItemsView_Loaded(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ItemsView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
ItemsView_LostFocus(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ItemsView_SizeChanged(object sender, SizeChangedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ItemsViewPictureLibraryPage() | ItemsViewPictureLibraryPage | [inline]
LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
LogItemsRepeaterInfo() | ItemsViewPictureLibraryPage | [inline, private]
LogItemsViewInfo() | ItemsViewPictureLibraryPage | [inline, private]
LogScrollViewInfo() | ItemsViewPictureLibraryPage | [inline, private]
lstEventMessage | ItemsViewPictureLibraryPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
pictureLibrary | ItemsViewPictureLibraryPage | [private]
ScrollView_ExtentChanged(ScrollView sender, object args) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_Loaded(object sender, RoutedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_SizeChanged(object sender, SizeChangedEventArgs e) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_StateChanged(ScrollView sender, object args) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args) | ItemsViewPictureLibraryPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutPanelProperties Member List

This is the complete list of members for LayoutPanelProperties, including all inherited members.
BorderBrush(winrt::Brush const &value) | LayoutPanelProperties |
BorderBrush() | LayoutPanelProperties |
BorderBrushProperty() | LayoutPanelProperties | [inline, static]
BorderThickness(winrt::Thickness const &value) | LayoutPanelProperties |
BorderThickness() | LayoutPanelProperties |
BorderThicknessProperty() | LayoutPanelProperties | [inline, static]
ClearProperties() | LayoutPanelProperties | [static]
CornerRadius(winrt::CornerRadius const &value) | LayoutPanelProperties |
CornerRadius() | LayoutPanelProperties |
CornerRadiusProperty() | LayoutPanelProperties | [inline, static]
EnsureProperties() | LayoutPanelProperties | [static]
Layout(winrt::Layout const &value) | LayoutPanelProperties |
Layout() | LayoutPanelProperties |
LayoutPanelProperties() | LayoutPanelProperties |
LayoutProperty() | LayoutPanelProperties | [inline, static]
OnBorderBrushPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnBorderThicknessPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnCornerRadiusPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnLayoutPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnPaddingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
Padding(winrt::Thickness const &value) | LayoutPanelProperties |
Padding() | LayoutPanelProperties |
PaddingProperty() | LayoutPanelProperties | [inline, static]
s_BorderBrushProperty | LayoutPanelProperties | [static]
s_BorderThicknessProperty | LayoutPanelProperties | [static]
s_CornerRadiusProperty | LayoutPanelProperties | [static]
s_LayoutProperty | LayoutPanelProperties | [static]
s_PaddingProperty | LayoutPanelProperties | [static]
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbIterator Member List

This is the complete list of members for BreadcrumbIterator, including all inherited members.
BreadcrumbIterator(const winrt::IInspectable &itemsSource) | BreadcrumbIterator
Current() | BreadcrumbIterator
GetMany(winrt::array_view< winrt::IInspectable > items) | BreadcrumbIterator
HasCurrent() | BreadcrumbIterator
MoveNext() | BreadcrumbIterator
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerTests::Color Member List

This is the complete list of members for ColorPickerTests::Color, including all inherited members.
A | ColorPickerTests::Color |
B | ColorPickerTests::Color |
FromArgb(byte a, byte r, byte g, byte b) | ColorPickerTests::Color | [inline, static]
G | ColorPickerTests::Color |
R | ColorPickerTests::Color |
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarItemProperties Member List

This is the complete list of members for MenuBarItemProperties, including all inherited members.
ClearProperties() | MenuBarItemProperties | [static]
EnsureProperties() | MenuBarItemProperties | [static]
Items(winrt::IVector< winrt::MenuFlyoutItemBase > const &value) | MenuBarItemProperties |
Items() | MenuBarItemProperties |
ItemsProperty() | MenuBarItemProperties | [inline, static]
MenuBarItemProperties() | MenuBarItemProperties |
s_ItemsProperty | MenuBarItemProperties | [static]
s_TitleProperty | MenuBarItemProperties | [static]
Title(winrt::hstring const &value) | MenuBarItemProperties |
Title() | MenuBarItemProperties |
TitleProperty() | MenuBarItemProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewTestHooks.h Source File

  • File List
  • File Members
  • ItemsView

ItemsViewTestHooks.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsView.h"
00007 #include "ItemsViewTestHooks.g.h"
00008
00009 class ItemsViewTestHooks :
00010     public winrt::implementation::ItemsViewTestHooksT<ItemsViewTestHooks>
00011 {
00012 public:
00013     static com_ptr<ItemsViewTestHooks> GetGlobalTestHooks()
00014     {
00015         return s_testHooks;
00016     }
00017
00018     static com_ptr<ItemsViewTestHooks> EnsureGlobalTestHooks();
00019
00020     static winrt::Point GetKeyboardNavigationReferenceOffset(const winrt::ItemsView& itemsView);
00021     static void NotifyKeyboardNavigationReferenceOffsetChanged(const winrt::ItemsView& itemsView);
00022     static winrt::event_token KeyboardNavigationReferenceOffsetChanged(winrt::TypedEventHandler<winrt::ItemsView, winrt::IInspectable> const& value);
00023     static void KeyboardNavigationReferenceOffsetChanged(winrt::event_token const& token);
00024
00025     static winrt::ScrollView GetScrollViewPart(const winrt::ItemsView& itemsView);
00026     static winrt::ItemsRepeater GetItemsRepeaterPart(const winrt::ItemsView& itemsView);
00027     static winrt::SelectionModel GetSelectionModel(const winrt::ItemsView& itemsView);
00028
00029 private:
00030     static com_ptr<ItemsViewTestHooks> s_testHooks;
00031     winrt::event<winrt::TypedEventHandler<winrt::ItemsView, winrt::IInspectable>> m_keyboardNavigationReferenceOffsetChangedEventSource;
00032 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealScenarioLights Member List

This is the complete list of members for RevealScenarioLights, including all inherited members.
_backgroundLight | RevealScenarioLights | [private]
_borderLight | RevealScenarioLights | [private]
_borderWideLight | RevealScenarioLights | [private]
_revealTest | RevealScenarioLights | [private]
AnimateTo(CompositionObject obj, string prop, float value) | RevealScenarioLights | [inline, private]
BorderSpotlightAttenuationValue | RevealScenarioLights | [private]
BorderSpotlightInnerConeValue | RevealScenarioLights | [private]
BorderSpotlightOuterConeValue | RevealScenarioLights | [private]
ExprBind(CompositionObject target, CompositionObject source, string targetProperty, string sourceProperty=null) | RevealScenarioLights | [inline, private]
OnCurrentThemeChanged() | RevealScenarioLights | [inline, protected]
RevealScenarioLights() | RevealScenarioLights | [inline]
RevealTest | RevealScenarioLights |
SpotlightAttenuationValue | RevealScenarioLights | [private]
SpotlightInnerConeAlphaValue | RevealScenarioLights | [private]
SpotlightInnerConeValue | RevealScenarioLights | [private]
SpotlightMaxSizeValue | RevealScenarioLights | [private]
SpotlightMinSizeValue | RevealScenarioLights | [private]
SpotlightOuterConeAlphaValue | RevealScenarioLights | [private]
SpotlightOuterConeValue | RevealScenarioLights | [private]
WideBorderSpotlightAttenuationValue | RevealScenarioLights | [private]
WideBorderSpotlightInnerConeValue | RevealScenarioLights | [private]
WideBorderSpotlightOuterConeValue | RevealScenarioLights | [private]
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionModelSelectionChangedEventArgs.cpp Source File

  • File List
  • File Members
  • Repeater

SelectionModelSelectionChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsRepeater.common.h"
00007 #include "SelectionModelSelectionChangedEventArgs.h"
00008
00009 #pragma region ISelectionModelSelectionChangedEventArgs
00010
00011 #pragma endregion
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/InfoBadge.idl Source File

  • File List
  • File Members
  • InfoBadge

InfoBadge.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC_V3]
00005 [webhosthidden]
00006 unsealed runtimeclass InfoBadgeTemplateSettings : Microsoft.UI.Xaml.DependencyObject
00007 {
00008     InfoBadgeTemplateSettings();
00009
00010     Microsoft.UI.Xaml.CornerRadius InfoBadgeCornerRadius;
00011     Microsoft.UI.Xaml.Controls.IconElement IconElement;
00012
00013     static Microsoft.UI.Xaml.DependencyProperty InfoBadgeCornerRadiusProperty{ get; };
00014     static Microsoft.UI.Xaml.DependencyProperty IconElementProperty{ get; };
00015 }
00016
00017 [MUX_PUBLIC_V3]
00018 [webhosthidden]
00019 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00020 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00021 unsealed runtimeclass InfoBadge : Microsoft.UI.Xaml.Controls.Control
00022 {
00023     InfoBadge();
00024
00025     [MUX_DEFAULT_VALUE("-1")]
00026     Int32 Value;
00027
00028     IconSource IconSource;
00029
00030     InfoBadgeTemplateSettings TemplateSettings{ get; };
00031
00032     static Microsoft.UI.Xaml.DependencyProperty ValueProperty{ get; };
00033     static Microsoft.UI.Xaml.DependencyProperty IconSourceProperty{ get; };
00034     static Microsoft.UI.Xaml.DependencyProperty TemplateSettingsProperty{ get; };
00035 }
00036
00037 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransition.h Source File

  • File List
  • File Members
  • Repeater

ItemCollectionTransition.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "ItemCollectionTransition.g.h"
00010
00011 class ItemCollectionTransition :
00012     public ReferenceTracker<ItemCollectionTransition, winrt::implementation::ItemCollectionTransitionT, winrt::composing, winrt::composable>
00013 {
00014 public:
00015     ItemCollectionTransition(
00016         winrt::ItemCollectionTransitionProvider const& owningProvider,
00017         winrt::UIElement const& element,
00018         winrt::ItemCollectionTransitionOperation const& operation,
00019         winrt::ItemCollectionTransitionTriggers const& triggers);
00020
00021     ItemCollectionTransition(
00022         winrt::ItemCollectionTransitionProvider const& owningProvider,
00023         winrt::UIElement const& element,
00024         winrt::ItemCollectionTransitionTriggers const& triggers,
00025         winrt::Rect const& oldBounds,
00026         winrt::Rect const& newBounds);
00027
00028     winrt::ItemCollectionTransitionProvider OwningProvider() { return m_owningProvider.get(); }
00029     winrt::UIElement Element() { return m_element.safe_get(); }
00030     winrt::ItemCollectionTransitionOperation Operation() { return m_operation; }
00031     winrt::ItemCollectionTransitionTriggers Triggers() { return m_triggers; }
00032     winrt::Rect OldBounds() { return m_oldBounds; }
00033     winrt::Rect NewBounds() { return m_newBounds; }
00034     bool HasStarted() { return static_cast<bool>(m_progress); }
00035
00036     winrt::ItemCollectionTransitionProgress Start();
00037
00038 private:
00039     ItemCollectionTransition(
00040         winrt::ItemCollectionTransitionProvider const& owningProvider,
00041         winrt::UIElement const& element,
00042         winrt::ItemCollectionTransitionOperation const& operation,
00043         winrt::ItemCollectionTransitionTriggers const& triggers,
00044         winrt::Rect const& oldBounds,
00045         winrt::Rect const& newBounds);
00046
00047     winrt::weak_ref<winrt::ItemCollectionTransitionProvider> m_owningProvider{ nullptr };
00048     tracker_ref<winrt::UIElement> m_element{ this };
00049     winrt::ItemCollectionTransitionOperation m_operation{};
00050     winrt::ItemCollectionTransitionTriggers m_triggers{};
00051     winrt::Rect m_oldBounds{};
00052     winrt::Rect m_newBounds{};
00053     tracker_ref<winrt::ItemCollectionTransitionProgress> m_progress{ this };
00054 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/FlowLayoutCollectionChangeTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

FlowLayoutCollectionChangeTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00005 using MUXControlsTestApp.Utilities;
00006 using System;
00007 using System.Linq;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Input;
00011 using Microsoft.UI.Xaml.Markup;
00012 using System.Threading;
00013 using Common;
00014
00015 using WEX.TestExecution;
00016 using WEX.TestExecution.Markup;
00017 using WEX.Logging.Interop;
00018
00019 using System.Collections.Generic;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00022 {
00023     [TestClass]
00024     public class FlowLayoutCollectionChangeTests : ApiTestBase
00025     {
00026         [TestMethod]
00027         public void ValidateInserts()
00028         {
00029             RunOnUIThread.Execute(() =>
00030             {
00031                 var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
00032                 var repeater = SetupRepeater(dataSource);
00033
00034                 Log.Comment("Insert in realized range: Inserting 3 items at index 4");
00035                 dataSource.Insert(index: 4, count: 3, reset: false);
00036                 repeater.UpdateLayout();
00037
00038                 var realized = VerifyRealizedRange(repeater, dataSource);
00039                 Verify.IsGreaterThan(realized, 0);
00040
00041                 Log.Comment("Insert before realized range: Inserting 3 items at index 0");
00042                 dataSource.Insert(index: 0, count: 3, reset: false);
00043                 repeater.UpdateLayout();
00044
00045                 realized = VerifyRealizedRange(repeater, dataSource);
00046                 Verify.IsGreaterThan(realized, 0);
00047
00048                 Log.Comment("Insert after realized range: Inserting 3 items at index 10");
00049                 dataSource.Insert(index: 10, count: 3, reset: false);
00050                 repeater.UpdateLayout();
00051
00052                 realized = VerifyRealizedRange(repeater, dataSource);
00053                 Verify.IsGreaterThan(realized, 0);
00054             });
00055         }
00056
00057         [TestMethod]
00058         public void ValidateSentinelsDuringInserts()
00059         {
00060             RunOnUIThread.Execute(() =>
00061             {
00062                 var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
00063                 int getElementCallCount = 0;
00064                 int recycleElementCallCount = 0;
00065
00066                 var elementFactory = new RecyclingElementFactoryDerived()
00067                 {
00068                     Templates = { { "key", SharedHelpers.GetDataTemplate("<TextBlock Text='{Binding}' Height='100' />") } },
00069                     RecyclePool = new RecyclePool(),
00070                     GetElementFunc = (int index, UIElement owner, UIElement elementFromBase) =>
00071                     {
00072                         getElementCallCount++;
00073                         return elementFromBase;
00074                     },
00075                     ClearElementFunc = (UIElement element, UIElement owner) => recycleElementCallCount++,
00076                     ValidateElementIndices = false
00077                 };
00078
00079                 var repeater = SetupRepeater(dataSource, elementFactory);
00080
00081                 getElementCallCount = 0;
00082                 recycleElementCallCount = 0;
00083                 Log.Comment("Insert in realized range: Inserting 100 items at index 1");
00084                 dataSource.Insert(index: 1, count: 100, reset: false);
00085                 repeater.UpdateLayout();
00086
00087                 var realized = VerifyRealizedRange(repeater, dataSource);
00088                 Verify.IsGreaterThan(realized, 0);
00089
00090                 Verify.IsLessThan(getElementCallCount, 6);
00091                 Verify.IsLessThan(recycleElementCallCount, 6);
00092             });
00093         }
00094
00095         [TestMethod]
00096         public void CanRemoveItemsStartingBeforeRealizedRange()
00097         {
00098             CustomItemsSource dataSource = null;
00099             RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 20).ToList()));
00100             ScrollViewer scrollViewer = null;
00101             ItemsRepeater repeater = null;
00102             var viewChangedEvent = new ManualResetEvent(false);
00103
00104             RunOnUIThread.Execute(() =>
00105             {
00106                 repeater = SetupRepeater(dataSource, ref scrollViewer);
00107                 scrollViewer.ViewChanged += (sender, args) =>
00108                 {
00109                     if (!args.IsIntermediate)
00110                     {
00111                         viewChangedEvent.Set();
00112                     }
00113                 };
00114
00115                 scrollViewer.ChangeView(null, 600, null, true);
00116             });
00117
00118             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
00119             IdleSynchronizer.Wait();
00120
00121             RunOnUIThread.Execute(() =>
00122             {
00123                 Log.Comment("Remove before realized range: start:(0)beforeView end:(1)beforeView.");
00124                 dataSource.Remove(index: 0, count: 2, reset: false);
00125                 repeater.UpdateLayout();
00126
00127                 var realized = VerifyRealizedRange(repeater, dataSource);
00128                 Verify.AreEqual(4, realized);
00129
00130                 Log.Comment("Remove before realized range: start:(0)beforeView end:(4)inview.");
00131                 dataSource.Remove(index: 0, count: 5, reset: false);
00132                 repeater.UpdateLayout();
00133
00134                 realized = VerifyRealizedRange(repeater, dataSource);
00135                 Verify.AreEqual(3, realized);
00136
00137                 Log.Comment("Insert before realized range: Inserting 10 items at index 0");
00138                 dataSource.Insert(index: 0, count: 10, reset: false);
00139                 repeater.UpdateLayout();
00140                 VerifyRealizedRange(repeater, dataSource);
00141
00142                 Log.Comment("Insert after realized range: Inserting 10 items at index 19");
00143                 dataSource.Insert(index: 19, count: 10, reset: false);
00144                 repeater.UpdateLayout();
00145                 VerifyRealizedRange(repeater, dataSource);
00146
00147                 Log.Comment("Remove before realized range: start:(5)beforeView end:(25)afterView.");
00148                 dataSource.Remove(index: 5, count: 20, reset: false);
00149                 repeater.UpdateLayout();
00150
00151                 realized = VerifyRealizedRange(repeater, dataSource);
00152                 Verify.IsLessThanOrEqual(2, realized);
00153             });
00154         }
00155
00156         [TestMethod]
00157         public void CanRemoveItemsStartingInRealizedRange()
00158         {
00159             RunOnUIThread.Execute(() =>
00160             {
00161                 var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
00162                 var repeater = SetupRepeater(dataSource);
00163
00164                 var realized = VerifyRealizedRange(repeater, dataSource);
00165                 Verify.AreEqual(3, realized);
00166
00167                 Log.Comment("Remove in realized range: start:(1)InView end:(3)InView.");
00168                 dataSource.Remove(index: 1, count: 3, reset: false);
00169                 repeater.UpdateLayout();
00170
00171                 realized = VerifyRealizedRange(repeater, dataSource);
00172                 Verify.AreEqual(3, realized);
00173
00174                 Log.Comment("Remove in realized range: start:(1)InView end:(6)InView.");
00175                 dataSource.Remove(index: 1, count: 6, reset: false);
00176                 repeater.UpdateLayout();
00177
00178                 realized = VerifyRealizedRange(repeater, dataSource);
00179                 Verify.AreEqual(1, realized);
00180             });
00181         }
00182
00183         [TestMethod]
00184         [TestProperty("Bug", "19259478")]
00185         public void CanRemoveAndInsertItemsInRealizedRange()
00186         {
00187             RunOnUIThread.Execute(() =>
00188             {
00189                 var dataSource = new CustomItemsSource(Enumerable.Range(0, 3).ToList());
00190                 var repeater = SetupRepeater(dataSource);
00191
00192                 var realized = VerifyRealizedRange(repeater, dataSource);
00193                 Verify.AreEqual(3, realized);
00194
00195                 Log.Comment("Remove index 1 in realized range");
00196                 dataSource.Remove(index: 1, count: 1, reset: false);
00197                 repeater.UpdateLayout();
00198
00199                 realized = VerifyRealizedRange(repeater, dataSource);
00200                 Verify.AreEqual(2, realized);
00201
00202                 Log.Comment("Add 5 items at index 1");
00203                 dataSource.Insert(index: 1, count: 5, reset: false);
00204                 repeater.UpdateLayout();
00205
00206                 realized = VerifyRealizedRange(repeater, dataSource);
00207                 Verify.AreEqual(3, realized);
00208             });
00209         }
00210
00211         [TestMethod]
00212         public void CanRemoveItemsAfterRealizedRange()
00213         {
00214             RunOnUIThread.Execute(() =>
00215             {
00216                 var dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList());
00217                 var repeater = SetupRepeater(dataSource);
00218
00219                 var realized = VerifyRealizedRange(repeater, dataSource);
00220                 Verify.AreEqual(3, realized);
00221
00222                 Log.Comment("Remove after realized range: start:(8)afterView end:(9)afterView.");
00223                 dataSource.Remove(index: 8, count: 2, reset: false);
00224                 repeater.UpdateLayout();
00225
00226                 realized = VerifyRealizedRange(repeater, dataSource);
00227                 Verify.AreEqual(3, realized);
00228             });
00229         }
00230
00231         [TestMethod]
00232         public void CanReplaceSingleItem()
00233         {
00234             CustomItemsSource dataSource = null;
00235             RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList()));
00236             ScrollViewer scrollViewer = null;
00237             ItemsRepeater repeater = null;
00238             var viewChangedEvent = new ManualResetEvent(false);
00239             int elementsCleared = 0;
00240             int elementsPrepared = 0;
00241
00242             RunOnUIThread.Execute(() =>
00243             {
00244                 repeater = SetupRepeater(dataSource, ref scrollViewer);
00245                 scrollViewer.ViewChanged += (sender, args) =>
00246                 {
00247                     if(!args.IsIntermediate)
00248                     {
00249                         viewChangedEvent.Set();
00250                     }
00251                 };
00252
00253                 repeater.ElementPrepared += (sender, args) => { elementsPrepared++; };
00254                 repeater.ElementClearing += (sender, args) => { elementsCleared++; };
00255
00256                 scrollViewer.ChangeView(null, 200, null, true);
00257             });
00258
00259             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
00260             IdleSynchronizer.Wait();
00261
00262             RunOnUIThread.Execute(() =>
00263             {
00264                 var realized = VerifyRealizedRange(repeater, dataSource);
00265                 Verify.AreEqual(4, realized);
00266
00267                 Log.Comment("Replace before realized range.");
00268                 dataSource.Replace(index: 0, oldCount: 1, newCount: 1, reset: false);
00269                 repeater.UpdateLayout();
00270
00271                 realized = VerifyRealizedRange(repeater, dataSource);
00272                 Verify.AreEqual(4, realized);
00273
00274                 Log.Comment("Replace in realized range.");
00275                 elementsPrepared = 0;
00276                 elementsCleared = 0;
00277                 dataSource.Replace(index: 2, oldCount: 1, newCount: 1, reset: false);
00278                 repeater.UpdateLayout();
00279                 Verify.AreEqual(1, elementsPrepared);
00280                 Verify.AreEqual(1, elementsCleared);
00281
00282                 realized = VerifyRealizedRange(repeater, dataSource);
00283                 Verify.AreEqual(4, realized);
00284
00285                 Log.Comment("Replace after realized range");
00286                 dataSource.Replace(index: 8, oldCount: 1, newCount: 1, reset: false);
00287                 repeater.UpdateLayout();
00288
00289                 realized = VerifyRealizedRange(repeater, dataSource);
00290                 Verify.AreEqual(4, realized);
00291             });
00292         }
00293
00294         [TestMethod]
00295         public void CanMoveItem()
00296         {
00297             CustomItemsSource dataSource = null;
00298             RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList()));
00299             ScrollViewer scrollViewer = null;
00300             ItemsRepeater repeater = null;
00301             var viewChangedEvent = new ManualResetEvent(false);
00302
00303             RunOnUIThread.Execute(() =>
00304             {
00305                 repeater = SetupRepeater(dataSource, ref scrollViewer);
00306                 scrollViewer.ViewChanged += (sender, args) =>
00307                 {
00308                     if (!args.IsIntermediate)
00309                     {
00310                         viewChangedEvent.Set();
00311                     }
00312                 };
00313                 scrollViewer.ChangeView(null, 400, null, true);
00314             });
00315
00316             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
00317             IdleSynchronizer.Wait();
00318
00319             RunOnUIThread.Execute(() =>
00320             {
00321                 var realized = VerifyRealizedRange(repeater, dataSource);
00322                 Verify.AreEqual(4, realized);
00323
00324                 Log.Comment("Move before realized range.");
00325                 dataSource.Move(oldIndex: 0, newIndex: 1, count: 2, reset: false);
00326                 repeater.UpdateLayout();
00327
00328                 realized = VerifyRealizedRange(repeater, dataSource);
00329                 Verify.AreEqual(4, realized);
00330
00331                 Log.Comment("Move in realized range.");
00332                 dataSource.Move(oldIndex: 3, newIndex: 5, count: 2, reset: false);
00333                 repeater.UpdateLayout();
00334
00335                 realized = VerifyRealizedRange(repeater, dataSource);
00336                 Verify.AreEqual(4, realized);
00337
00338                 Log.Comment("Move after realized range");
00339                 dataSource.Move(oldIndex: 7, newIndex: 8, count: 2, reset: false);
00340                 repeater.UpdateLayout();
00341
00342                 realized = VerifyRealizedRange(repeater, dataSource);
00343                 Verify.AreEqual(4, realized);
00344             });
00345         }
00346
00347         [TestMethod]
00348         public void VerifyElement0OwnershipInUniformGridLayout()
00349         {
00350             CustomItemsSource dataSource = null;
00351             RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(new List<int>()));
00352             ItemsRepeater repeater = null;
00353             int elementsCleared = 0;
00354             int elementsPrepared = 0;
00355
00356             RunOnUIThread.Execute(() =>
00357             {
00358                 repeater = SetupRepeater(dataSource, new UniformGridLayout());
00359                 repeater.ElementPrepared += (sender, args) => { elementsPrepared++; };
00360                 repeater.ElementClearing += (sender, args) => { elementsCleared++; };
00361             });
00362
00363             IdleSynchronizer.Wait();
00364
00365             RunOnUIThread.Execute(() =>
00366             {
00367                 Log.Comment("Add two item");
00368                 dataSource.Insert(index: 0, count: 1, reset: false);
00369                 dataSource.Insert(index: 1, count: 1, reset: false);
00370                 repeater.UpdateLayout();
00371                 var realized = VerifyRealizedRange(repeater, dataSource);
00372                 Verify.AreEqual(2, realized);
00373
00374                 Log.Comment("replace the first item");
00375                 dataSource.Replace(index: 0, oldCount: 1, newCount: 1, reset: false);
00376                 repeater.UpdateLayout();
00377                 realized = VerifyRealizedRange(repeater, dataSource);
00378                 Verify.AreEqual(2, realized);
00379
00380                 Log.Comment("Remove two items");
00381                 dataSource.Remove(index: 1, count: 1, reset: false);
00382                 dataSource.Remove(index: 0, count: 1, reset:false);
00383                 repeater.UpdateLayout();
00384                 realized = VerifyRealizedRange(repeater, dataSource);
00385                 Verify.AreEqual(0, realized);
00386
00387                 Verify.AreEqual(elementsPrepared, elementsCleared);
00388             });
00389         }
00390
00391         [TestMethod]
00392         public void EnsureReplaceOfAnchorDoesNotResetAllContainers()
00393         {
00394             CustomItemsSource dataSource = null;
00395             RunOnUIThread.Execute(() => dataSource = new CustomItemsSource(Enumerable.Range(0, 10).ToList()));
00396             ScrollViewer scrollViewer = null;
00397             ItemsRepeater repeater = null;
00398             var viewChangedEvent = new ManualResetEvent(false);
00399             int elementsCleared = 0;
00400             int elementsPrepared = 0;
00401
00402             RunOnUIThread.Execute(() =>
00403             {
00404                 repeater = SetupRepeater(dataSource, ref scrollViewer);
00405                 repeater.ElementPrepared += (sender, args) => { elementsPrepared++; };
00406                 repeater.ElementClearing += (sender, args) => { elementsCleared++; };
00407             });
00408
00409             IdleSynchronizer.Wait();
00410
00411             RunOnUIThread.Execute(() =>
00412             {
00413                 var realized = VerifyRealizedRange(repeater, dataSource);
00414                 Verify.AreEqual(3, realized);
00415
00416                 Log.Comment("Replace anchor element 0");
00417                 elementsPrepared = 0;
00418                 elementsCleared = 0;
00419                 dataSource.Replace(index: 0, oldCount: 1, newCount: 1, reset: false);
00420                 repeater.UpdateLayout();
00421                 Verify.AreEqual(1, elementsPrepared);
00422                 Verify.AreEqual(1, elementsCleared);
00423
00424                 realized = VerifyRealizedRange(repeater, dataSource);
00425                 Verify.AreEqual(3, realized);
00426             });
00427         }
00428
00429         [TestMethod]
00430         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125
00431         public void ReplaceMultipleItems()
00432         {
00433             // TODO: Lower prioirty scenario. Tracked by work item: 9738020
00434             throw new NotImplementedException();
00435         }
00436
00437         [TestMethod]
00438         public void ValidateStableResets()
00439         {
00440             RunOnUIThread.Execute(() =>
00441             {
00442                 var dataSource = new CustomItemsSourceWithUniqueId(Enumerable.Range(0, 3).ToList());
00443                 var repeater = SetupRepeater(dataSource);
00444
00445                 Log.Comment("Reset collection");
00446                 dataSource.GetAtCallCount = 0;
00447                 dataSource.Reset();
00448                 repeater.UpdateLayout();
00449
00450                 // Make sure data was not requested because during a stable reset
00451                 // the elements and associated bound data are reused
00452                 Verify.AreEqual(0, dataSource.GetAtCallCount);
00453                 var realized = VerifyRealizedRange(repeater, dataSource);
00454                 Verify.AreEqual(3, realized);
00455             });
00456         }
00457
00458         [TestMethod]
00459         public void ValidateRegularResets()
00460         {
00461             RunOnUIThread.Execute(() =>
00462             {
00463                 var dataSource = new CustomItemsSource(Enumerable.Range(0, 3).ToList());
00464                 var repeater = SetupRepeater(dataSource);
00465
00466                 Log.Comment("Reset collection");
00467                 dataSource.GetAtCallCount = 0;
00468                 dataSource.Reset();
00469                 repeater.UpdateLayout();
00470
00471                 // Make sure data was requested because during a normal reset elements (already bound with data) are not reused.
00472                 Verify.AreEqual(3, dataSource.GetAtCallCount);
00473                 var realized = VerifyRealizedRange(repeater, dataSource);
00474                 Verify.AreEqual(3, realized);
00475             });
00476         }
00477
00478         [TestMethod]
00479         public void ValidateClear()
00480         {
00481             RunOnUIThread.Execute(() =>
00482             {
00483                 var dataSource = new CustomItemsSource(Enumerable.Range(0, 3).ToList());
00484                 var repeater = SetupRepeater(dataSource, new FlowLayout());
00485
00486                 Log.Comment("Clear the collection");
00487                 dataSource.Clear();
00488                 repeater.UpdateLayout();
00489
00490                 var realized = VerifyRealizedRange(repeater, dataSource);
00491                 Verify.AreEqual(0, realized);
00492             });
00493         }
00494
00495         private ItemsRepeater SetupRepeater(CustomItemsSource dataSource)
00496         {
00497             ScrollViewer sv = null;
00498             return SetupRepeater(dataSource, GetElementFactory(), ref sv, new StackLayout());
00499         }
00500
00501         private ItemsRepeater SetupRepeater(CustomItemsSource dataSource, VirtualizingLayout layout)
00502         {
00503             ScrollViewer sv = null;
00504             return SetupRepeater(dataSource, GetElementFactory(), ref sv, layout);
00505         }
00506
00507         private ItemsRepeater SetupRepeater(CustomItemsSource dataSource, ElementFactory elementFactory = null)
00508         {
00509             ScrollViewer sv = null;
00510
00511             return SetupRepeater(dataSource, elementFactory, ref sv, new StackLayout());
00512         }
00513
00514         private ItemsRepeater SetupRepeater(CustomItemsSource dataSource, ref ScrollViewer scrollViewer)
00515         {
00516             return SetupRepeater(dataSource, GetElementFactory(), ref scrollViewer, new StackLayout());
00517         }
00518
00519         private RecyclingElementFactory GetElementFactory()
00520         {
00521             var elementFactory = new RecyclingElementFactory();
00522             elementFactory.RecyclePool = new RecyclePool();
00523             elementFactory.Templates["Item"] = SharedHelpers.GetDataTemplate(@"<TextBlock Text='{Binding}' Height='100' />");
00524             return elementFactory;
00525         }
00526
00527         private ItemsRepeater SetupRepeater(CustomItemsSource dataSource, ElementFactory elementFactory, ref ScrollViewer scrollViewer, VirtualizingLayout layout)
00528         {
00529             var repeater = new ItemsRepeater()
00530             {
00531                 ItemsSource = dataSource,
00532                 ItemTemplate = elementFactory,
00533                 Layout = layout,
00534                 VerticalCacheLength = 0,
00535                 HorizontalCacheLength = 0
00536             };
00537
00538             scrollViewer = new ScrollViewer
00539             {
00540                 Content = repeater
00541             };
00542
00543             Content = new ItemsRepeaterScrollHost()
00544             {
00545                 Width = 200,
00546                 Height = 200,
00547                 ScrollViewer = scrollViewer
00548             };
00549
00550             Content.UpdateLayout();
00551             if (dataSource.Count > 0)
00552             {
00553                 int realized = VerifyRealizedRange(repeater, dataSource);
00554                 Verify.IsGreaterThan(realized, 0);
00555             }
00556
00557             return repeater;
00558         }
00559         private int VerifyRealizedRange(ItemsRepeater repeater, CustomItemsSource dataSource)
00560         {
00561             int numRealized = 0;
00562             // trace
00563             Log.Comment("index:ItemsSourceView:Item");
00564             for (int i = 0; i < dataSource.Inner.Count; i++)
00565             {
00566                 var element = repeater.TryGetElement(i);
00567                 if (element != null)
00568                 {
00569                     var data = ((TextBlock)element).Text;
00570                     Log.Comment("{0} {1}:[{2}]", i, dataSource.GetAt(i), data);
00571                     numRealized++;
00572                 }
00573                 else
00574                 {
00575                     Log.Comment(i + ":[null]");
00576                 }
00577             }
00578
00579             // verify
00580             for (int i = 0; i < dataSource.Inner.Count; i++)
00581             {
00582                 var element = repeater.TryGetElement(i);
00583                 if (element != null)
00584                 {
00585                     var data = ((TextBlock)element).Text;
00586                     Verify.AreEqual(dataSource.GetAt(i).ToString(), data);
00587                 }
00588             }
00589
00590             return numRealized;
00591         }
00592
00593         private int DefaultWaitTime = 2000;
00594     }
00595 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockElementFactory::GetElementCallInfo Member List

This is the complete list of members for MockElementFactory::GetElementCallInfo, including all inherited members.
GetElementCallInfo(int index, UIElement owner) | MockElementFactory::GetElementCallInfo | [inline]
Index | MockElementFactory::GetElementCallInfo |
Owner | MockElementFactory::GetElementCallInfo |
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Footer/PaneLayoutTestPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Footer

PaneLayoutTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005 using MUXControlsTestApp.Utilities;
00006 using System.Collections.Generic;
00007 using Microsoft.UI.Xaml;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     /// <summary>
00012     /// An empty page that can be used on its own or navigated to within a Frame.
00013     /// </summary>
00014     public sealed partial class PaneLayoutTestPage : TestPage
00015     {
00016         IList<NavigationViewItem> menuItems = new System.Collections.ObjectModel.ObservableCollection<NavigationViewItem>();
00017         IList<NavigationViewItem> footerItems = new System.Collections.ObjectModel.ObservableCollection<NavigationViewItem>();
00018
00019         public PaneLayoutTestPage()
00020         {
00021             this.InitializeComponent();
00022
00023
00024             for (int i = 0; i < 3; i++)
00025             {
00026                 menuItems.Add(
00027                     new NavigationViewItem() {
00028                         Content = "Item #" + i.ToString()
00029                     }
00030                 );
00031             }
00032
00033
00034             for (int i = 0; i < 3; i++)
00035             {
00036                 footerItems.Add(
00037                     new NavigationViewItem() {
00038                         Content = "Footer #" + i.ToString()
00039                     }
00040                 );
00041             }
00042         }
00043
00044
00045         private void TestCaseSelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
00046         {
00047             if (sender is RadioButtons rb)
00048             {
00049                 var caseTag = rb.SelectedIndex;
00050
00051                 switch (caseTag)
00052                 {
00053                     case 0:
00054                         RootNavigationView.MenuItemsSource = null;
00055                         RootNavigationView.FooterMenuItemsSource = footerItems;
00056                         break;
00057                     case 1:
00058                         RootNavigationView.MenuItemsSource = menuItems;
00059                         RootNavigationView.FooterMenuItemsSource = null;
00060                         break;
00061                     case 2:
00062                         RootNavigationView.MenuItemsSource = menuItems;
00063                         RootNavigationView.FooterMenuItemsSource = footerItems;
00064                         break;
00065                 }
00066             }
00067         }
00068
00069         private void AddMenuItemButton_Click(object sender, RoutedEventArgs e)
00070         {
00071             menuItems.Add(new NavigationViewItem() { Content = "Text" });
00072         }
00073         private void AddFooterItemButton_Click(object sender, RoutedEventArgs e)
00074         {
00075             footerItems.Add(new NavigationViewItem() { Content = "Text" });
00076         }
00077
00078         private void ResetCollectionsButton_Click(object sender, RoutedEventArgs e)
00079         {
00080             for (int i = menuItems.Count - 1; i > 2; i--)
00081             {
00082                 menuItems.RemoveAt(i);
00083             }
00084
00085             for (int i = footerItems.Count - 1; i > 2; i--)
00086             {
00087                 footerItems.RemoveAt(i);
00088             }
00089         }
00090
00091
00092         private void ClearCollectionsButton_Click(object sender, RoutedEventArgs e)
00093         {
00094             menuItems.Clear();
00095             footerItems.Clear();
00096         }
00097
00098         private void GetLayoutHeightsButton_Click(object sender, RoutedEventArgs e)
00099         {
00100             var itemsScroll = VisualTreeUtils.FindVisualChildByName(RootNavigationView, "MenuItemsScrollViewer");
00101             var footerScroll = VisualTreeUtils.FindVisualChildByName(RootNavigationView, "FooterItemsScrollViewer");
00102             LayoutHeightsReport.Text = itemsScroll.ActualHeight + ";" + footerScroll.ActualHeight;
00103         }
00104
00105         private void IsSettingsEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00106         {
00107             RootNavigationView.IsSettingsVisible = true;
00108         }
00109
00110         private void IsSettingsEnabledCheckbox_UnChecked(object sender, RoutedEventArgs e)
00111         {
00112             RootNavigationView.IsSettingsVisible = false;
00113         }
00114     }
00115 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarToolButton.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarToolButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarToolButton.g.h"
00011 #include "InkToolBarToolButton.properties.h"
00012
00013 class InkToolBarToolButton :
00014     public ReferenceTracker<InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable>,
00015     public InkToolBarToolButtonProperties
00016 {
00017 public:
00018
00019     winrt::InkToolBarTool ToolKind() { winrt::throw_hresult(E_NOTIMPL); }
00020     bool IsExtensionGlyphShown() { winrt::throw_hresult(E_NOTIMPL); }
00021     void IsExtensionGlyphShown(bool value) { winrt::throw_hresult(E_NOTIMPL); }
00022     winrt::InkToolBarToggle ToggleKind() { winrt::throw_hresult(E_NOTIMPL); }
00023 };
00024
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewTrace.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsNavigationViewTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_NAVIGATIONVIEW || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsNavigationViewVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_NAVIGATIONVIEW || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsNavigationViewPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_NAVIGATIONVIEW || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define NAVIGATIONVIEW_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 NavigationViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define NAVIGATIONVIEW_TRACE_INFO(sender, message, ...) \
00036 if (IsNavigationViewTracingEnabled()) \
00037 { \
00038     NAVIGATIONVIEW_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (NavigationViewTrace::s_IsDebugOutputEnabled || NavigationViewTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     NAVIGATIONVIEW_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 NavigationViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define NAVIGATIONVIEW_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsNavigationViewVerboseTracingEnabled()) \
00050 { \
00051     NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (NavigationViewTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     NAVIGATIONVIEW_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define NAVIGATIONVIEW_TRACE_PERF(info) \
00059 if (IsNavigationViewPerfTracingEnabled()) \
00060 { \
00061     NavigationViewTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define NAVIGATIONVIEW_TRACE_INFO_DBG(sender, message, ...)    NAVIGATIONVIEW_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define NAVIGATIONVIEW_TRACE_VERBOSE_DBG(sender, message, ...) NAVIGATIONVIEW_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define NAVIGATIONVIEW_TRACE_PERF_DBG(info)                    NAVIGATIONVIEW_TRACE_PERF(info)
00068 #else
00069 #define NAVIGATIONVIEW_TRACE_INFO_DBG(sender, message, ...)
00070 #define NAVIGATIONVIEW_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define NAVIGATIONVIEW_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class NavigationViewTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[256]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "NavigationViewInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_NAVIGATIONVIEW),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"NavigationView") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[256]{};
00121         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00122         {
00123             if (includeTraceLogging)
00124             {
00125                 // TraceViewers
00126                 // http://toolbox/pef
00127                 // http://fastetw/index.aspx
00128                 TraceLoggingWrite(
00129                     g_hLoggingProvider,
00130                     "NavigationViewVerbose" /* eventName */,
00131                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00132                     TraceLoggingKeyword(KEYWORD_NAVIGATIONVIEW),
00133                     TraceLoggingWideString(buffer, "Message"));
00134             }
00135
00136             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00137             {
00138                 OutputDebugStringW(buffer);
00139             }
00140
00141             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00142
00143             if (globalTestHooks &&
00144                 (globalTestHooks->GetLoggingLevelForType(L"NavigationView") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00145             {
00146                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00147             }
00148         }
00149         va_end(args);
00150     }
00151
00152     static void TracePerfInfo(PCWSTR info) noexcept
00153     {
00154         // TraceViewers
00155         // http://toolbox/pef
00156         // http://fastetw/index.aspx
00157         TraceLoggingWrite(
00158             g_hPerfProvider,
00159             "NavigationViewPerf" /* eventName */,
00160             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00161             TraceLoggingKeyword(KEYWORD_NAVIGATIONVIEW),
00162             TraceLoggingWideString(info, "Info"));
00163     }
00164 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

HierarchicalNavigationViewDataBinding Member List

This is the complete list of members for HierarchicalNavigationViewDataBinding, including all inherited members.
AddAndSelectSubMenuItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
AddMenuItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
AddShowAndSelectSubMenuItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
categories | HierarchicalNavigationViewDataBinding | [private]
categories11 | HierarchicalNavigationViewDataBinding | [private]
ClickedItem(object sender, NavigationViewItemInvokedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
HierarchicalNavigationViewDataBinding() | HierarchicalNavigationViewDataBinding | [inline]
NavView_PaneClosed(NavigationView sender, object args) | HierarchicalNavigationViewDataBinding | [inline, private]
NavView_PaneOpened(NavigationView sender, object args) | HierarchicalNavigationViewDataBinding | [inline, private]
nextIndex | HierarchicalNavigationViewDataBinding | [private]
OnItemCollapsed(object sender, NavigationViewItemCollapsedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
OnItemExpanding(object sender, NavigationViewItemExpandingEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
OnSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) | HierarchicalNavigationViewDataBinding | [inline, private]
PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
PrintSelectedItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
RemoveSecondMenuItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
SelectItemUsingAPI(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
SelectSecondItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
SelectSubMenuItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewDataBinding | [inline, private]
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItemDataAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

TreeViewItemDataAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TreeViewItemDataAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TreeViewItemDataAutomationPeer)
00012 }
00013
00014 #include "TreeViewItemDataAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NewWindowRootPage Member List

This is the complete list of members for NewWindowRootPage, including all inherited members.
NewWindowRootPage() NewWindowRootPage [inline]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/NumberBoxParser.cpp Source File

  • File List
  • File Members
  • NumberBox

NumberBoxParser.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NumberBoxParser.h"
00007 #include "Utils.h"
00008
00009 static constexpr wstring_view c_numberBoxOperators{ L"+-*/^"sv };
00010
00011 // Returns list of MathTokens from expression input string. If there are any parsing errors, it returns an empty vector.
00012 std::vector<MathToken> NumberBoxParser::GetTokens(const wchar_t* input, const winrt::INumberParser& numberParser)
00013 {
00014     auto tokens = std::vector<MathToken>();
00015
00016     bool expectNumber = true;
00017     while (input[0] != '\0')
00018     {
00019         // Skip spaces
00020         const auto nextChar = input[0];
00021         if (nextChar != L' ')
00022         {
00023             if (expectNumber)
00024             {
00025                 if (nextChar == '(')
00026                 {
00027                     // Open parens are also acceptable, but don't change the next expected token type.
00028                     tokens.push_back(MathToken(MathTokenType::Parenthesis, nextChar));
00029                 }
00030                 else
00031                 {
00032                     const auto [value, charLength] = GetNextNumber(input, numberParser);
00033
00034                     if (charLength > 0)
00035                     {
00036                         tokens.push_back(MathToken(MathTokenType::Numeric, value));
00037                         input += charLength - 1; // advance the end of the token
00038                         expectNumber = false; // next token should be an operator
00039                     }
00040                     else
00041                     {
00042                         // Error case -- next token is not a number
00043                         return {};
00044                     }
00045                 }
00046             }
00047             else
00048             {
00049                 if (c_numberBoxOperators.find(nextChar) != std::wstring::npos)
00050                 {
00051                     tokens.push_back(MathToken(MathTokenType::Operator, nextChar));
00052                     expectNumber = true; // next token should be a number
00053                 }
00054                 else if (nextChar == ')')
00055                 {
00056                     // Closed parens are also acceptable, but don't change the next expected token type.
00057                     tokens.push_back(MathToken(MathTokenType::Parenthesis, nextChar));
00058                 }
00059                 else
00060                 {
00061                     // Error case -- could not evaluate part of the expression
00062                     return {};
00063                 }
00064             }
00065         }
00066
00067         input++;
00068     }
00069
00070     return tokens;
00071 }
00072
00073 // Attempts to parse a number from the beginning of the given input string. Returns the character size of the matched string.
00074 std::tuple<double, size_t> NumberBoxParser::GetNextNumber(const std::wstring& input, const winrt::INumberParser& numberParser)
00075 {
00076     // Attempt to parse anything before an operator or space as a number
00077     std::wregex regex(L"^-?([^-+/*\\(\\)\\^\\s]+)");
00078     std::wsmatch match;
00079     if (std::regex_search(input.cbegin(), input.cend(), match, regex))
00080     {
00081         // Might be a number
00082         const auto matchLength = match[0].length();
00083         const auto parsedNum = numberParser.ParseDouble(input.substr(0, matchLength));
00084
00085         if (parsedNum)
00086         {
00087             // Parsing was successful
00088             return { parsedNum.Value(), matchLength };
00089         }
00090     }
00091
00092     return { std::numeric_limits<double>::quiet_NaN(), 0 };
00093 }
00094
00095 int constexpr NumberBoxParser::GetPrecedenceValue(wchar_t c)
00096 {
00097     int opPrecedence = 0;
00098     if (c == L'*' || c == L'/')
00099     {
00100         opPrecedence = 1;
00101     }
00102     else if (c == L'^')
00103     {
00104         opPrecedence = 2;
00105     }
00106
00107     return opPrecedence;
00108 }
00109
00110 // Converts a list of tokens from infix format (e.g. "3 + 5") to postfix (e.g. "3 5 +")
00111 std::vector<MathToken> NumberBoxParser::ConvertInfixToPostfix(const std::vector<MathToken>& infixTokens)
00112 {
00113     std::vector<MathToken> postfixTokens;
00114     std::stack<MathToken> operatorStack;
00115
00116     for (auto const& token : infixTokens)
00117     {
00118         if (token.Type == MathTokenType::Numeric)
00119         {
00120             postfixTokens.push_back(token);
00121         }
00122         else if (token.Type == MathTokenType::Operator)
00123         {
00124             while (!operatorStack.empty())
00125             {
00126                 const auto& top = operatorStack.top();
00127                 if (top.Type != MathTokenType::Parenthesis && (GetPrecedenceValue(top.Char) >= GetPrecedenceValue(token.Char)))
00128                 {
00129                     postfixTokens.push_back(operatorStack.top());
00130                     operatorStack.pop();
00131                 }
00132                 else
00133                 {
00134                     break;
00135                 }
00136             }
00137             operatorStack.push(token);
00138         }
00139         else if (token.Type == MathTokenType::Parenthesis)
00140         {
00141             if (token.Char == L'(')
00142             {
00143                 operatorStack.push(token);
00144             }
00145             else
00146             {
00147                 while (!operatorStack.empty() && operatorStack.top().Char != L'(')
00148                 {
00149                     // Pop operators onto output until we reach a left paren
00150                     postfixTokens.push_back(operatorStack.top());
00151                     operatorStack.pop();
00152                 }
00153
00154                 if (operatorStack.empty())
00155                 {
00156                     // Broken parenthesis
00157                     return {};
00158                 }
00159
00160                 // Pop left paren and discard
00161                 operatorStack.pop();
00162             }
00163         }
00164     }
00165
00166     // Pop all remaining operators.
00167     while (!operatorStack.empty())
00168     {
00169         if (operatorStack.top().Type == MathTokenType::Parenthesis)
00170         {
00171             // Broken parenthesis
00172             return {};
00173         }
00174
00175         postfixTokens.push_back(operatorStack.top());
00176         operatorStack.pop();
00177     }
00178
00179     return postfixTokens;
00180 }
00181
00182 winrt::IReference<double> NumberBoxParser::ComputePostfixExpression(const std::vector<MathToken>& tokens)
00183 {
00184     std::stack<double> stack;
00185
00186     for (auto const& token : tokens)
00187     {
00188         if (token.Type == MathTokenType::Operator)
00189         {
00190             // There has to be at least two values on the stack to apply
00191             if (stack.size() < 2)
00192             {
00193                 return nullptr;
00194             }
00195
00196             const auto op1 = stack.top();
00197             stack.pop();
00198
00199             const auto op2 = stack.top();
00200             stack.pop();
00201
00202             double result;
00203
00204             switch (token.Char)
00205             {
00206                 case L'-':
00207                     result = op2 - op1;
00208                     break;
00209
00210                 case L'+':
00211                     result = op1 + op2;
00212                     break;
00213
00214                 case L'*':
00215                     result = op1 * op2;
00216                     break;
00217
00218                 case L'/':
00219                     if (op1 == 0)
00220                     {
00221                         // divide by zero
00222                         return std::numeric_limits<double>::quiet_NaN();
00223                     }
00224                     else
00225                     {
00226                         result = op2 / op1;
00227                     }
00228                     break;
00229
00230                 case L'^':
00231                     result = std::pow(op2, op1);
00232                     break;
00233
00234                 default:
00235                     return nullptr;
00236             }
00237
00238             stack.push(result);
00239         }
00240         else if (token.Type == MathTokenType::Numeric)
00241         {
00242             stack.push(token.Value);
00243         }
00244     }
00245
00246     // If there is more than one number on the stack, we didn't have enough operations, which is also an error.
00247     if (stack.size() != 1)
00248     {
00249         return nullptr;
00250     }
00251
00252     return stack.top();
00253 }
00254
00255 winrt::IReference<double> NumberBoxParser::Compute(const std::wstring_view expr, const winrt::INumberParser& numberParser)
00256 {
00257     // Tokenize the input string
00258     auto tokens = GetTokens(expr.data(), numberParser);
00259     if (tokens.size() > 0)
00260     {
00261         // Rearrange to postfix notation
00262         auto postfixTokens = ConvertInfixToPostfix(tokens);
00263         if (postfixTokens.size() > 0)
00264         {
00265             // Compute expression
00266             return ComputePostfixExpression(postfixTokens);
00267         }
00268     }
00269
00270     return nullptr;
00271 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/InteractionTests/RatingControlTests.cs Source File

  • File List
  • File Members
  • RatingControl
  • InteractionTests

RatingControlTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using Common;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019 using Image = Microsoft.Windows.Apps.Test.Foundation.Controls.Image;
00020 using Point = System.Drawing.Point;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00023 {
00024     [TestClass]
00025     public class RatingControlTests
00026     {
00027
00028         const int RATING_ITEM_WIDTH = 24; // RATING_ITEM_HEIGHT/2 default size + 8 item spacing
00029         const int RATING_ITEM_HEIGHT = 32;
00030
00031         [ClassInitialize]
00032         [TestProperty("RunAs", "User")]
00033         [TestProperty("Classification", "Integration")]
00034         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00035         public static void ClassInitialize(TestContext testContext)
00036         {
00037             TestEnvironment.Initialize(testContext);
00038         }
00039
00040         [TestCleanup]
00041         public void TestCleanup()
00042         {
00043             TestCleanupHelper.Cleanup();
00044         }
00045
00046         // TODO: split into multiple tests (mouse vs. keyboard)
00047         [TestMethod]
00048         public void BasicInteractionTest()
00049         {
00050             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00051             {
00052                 Log.Comment("Retrieve rating control as generic UIElement");
00053                 UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
00054                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
00055
00056                 Log.Comment("Retrieve the text block as a TextBlock");
00057                 TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));
00058
00059                 Log.Comment("Verify a tap on the third star sets Rating to 3");
00060                 InputHelper.Tap(ratingUIObject, 60, RATING_ITEM_HEIGHT / 2);
00061                 Verify.AreEqual("3", textBlock.DocumentText);
00062
00063                 Log.Comment("Verify a tap on the third star sets Rating to 2.5 (placeholder value)");
00064                 InputHelper.Tap(ratingUIObject, 60, RATING_ITEM_HEIGHT / 2);
00065                 Verify.AreEqual("!2.5", textBlock.DocumentText);
00066
00067                 Button phButton = new Button(FindElement.ByName("PHButton"));
00068                 InputHelper.Tap(phButton);
00069
00070                 Log.Comment("Verify a tap on the first star sets Rating to 1");
00071                 InputHelper.Tap(ratingUIObject, 12, RATING_ITEM_HEIGHT / 2);
00072                 Verify.AreEqual("1", textBlock.DocumentText);
00073
00074                 Log.Comment("Verify a swipe off the left sets Rating to NOTHING");
00075                 InputHelper.Pan(ratingUIObject, 200, Direction.West);
00076                 Verify.AreEqual("!", textBlock.DocumentText);
00077
00078                 Log.Comment("Verify a right key on an unset Rating, sets rating to 1");
00079                 KeyboardHelper.PressKey(ratingUIObject, Key.Right);
00080
00081                 Verify.AreEqual("1", textBlock.DocumentText);
00082
00083                 Log.Comment("Verify a left key on an RTL rating increases the rating.");
00084                 TestSetupHelper.SetInnerFrameFlowDirection(FlowDirection.RightToLeft);
00085                 Wait.ForIdle();
00086
00087                 KeyboardHelper.PressKey(ratingUIObject, Key.Left);
00088                 Verify.AreEqual("2", textBlock.DocumentText);
00089
00090                 Log.Comment("Verify home/end keys in RTL");
00091                 KeyboardHelper.PressKey(ratingUIObject, Key.Home);
00092                 Verify.AreEqual("!", textBlock.DocumentText);
00093
00094                 KeyboardHelper.PressKey(ratingUIObject, Key.End);
00095                 Verify.AreEqual("5", textBlock.DocumentText);
00096
00097                 Log.Comment("Verify up down keys in RTL");
00098                 KeyboardHelper.PressKey(ratingUIObject, Key.Down);
00099                 Verify.AreEqual("4", textBlock.DocumentText);
00100
00101                 KeyboardHelper.PressKey(ratingUIObject, Key.Up);
00102                 Verify.AreEqual("5", textBlock.DocumentText);
00103
00104                 TestSetupHelper.SetInnerFrameFlowDirection(FlowDirection.LeftToRight);
00105                 Wait.ForIdle();
00106
00107                 Log.Comment("Verify home/end keys in LTR");
00108                 KeyboardHelper.PressKey(ratingUIObject, Key.Home);
00109                 Verify.AreEqual("!", textBlock.DocumentText);
00110
00111                 KeyboardHelper.PressKey(ratingUIObject, Key.End);
00112                 Verify.AreEqual("5", textBlock.DocumentText);
00113
00114                 Log.Comment("Verify up down keys in LTR");
00115                 KeyboardHelper.PressKey(ratingUIObject, Key.Down);
00116                 Verify.AreEqual("4", textBlock.DocumentText);
00117
00118                 KeyboardHelper.PressKey(ratingUIObject, Key.Up);
00119                 Verify.AreEqual("5", textBlock.DocumentText);
00120             }
00121         }
00122
00123         [TestMethod]
00124         public void MaxRatingTest()
00125         {
00126             using (var setup = new TestSetupHelper("RatingControl Tests")) // This clicks the button corresponding to the test page, and navs there
00127             {
00128                 TextBlock tb = new TextBlock(FindElement.ById("FrameDetails"));
00129                 Log.Comment("FrameDetails: " + tb.DocumentText);
00130
00131                 Log.Comment("Retrieve rating control as generic UIElement");
00132                 UIObject ratingUIObject = FindElement.ByName("MaxRating9Unset");
00133                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MaxRating9Unset");
00134                 ratingUIObject.SetFocus();
00135                 AutomationElement maxRatingAutomationElement = AutomationElement.FocusedElement;
00136
00137                 Log.Comment("Retrieve the accompanying text block as a TextBlock");
00138                 TextBlock textBlock = new TextBlock(FindElement.ByName("MaxRating9UnsetTextBlock"));
00139                 InputHelper.ScrollToElement(textBlock);
00140
00141                 Verify.AreEqual(false, ratingUIObject.IsOffscreen, "Verify the rating control is onscreen");
00142                 Verify.AreEqual(false, textBlock.IsOffscreen, "Verify the results textblock is onscreen");
00143
00144                 for (int i = 0; i < 9; i++)
00145                 {
00146                     Log.Comment("Verify value " + (i + 1));
00147                     InputHelper.Tap(ratingUIObject, (i * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00148
00149                     String expected = (i + 1) + "";
00150                     String actual = textBlock.DocumentText;
00151
00152                     Verify.IsTrue(expected.Equals(actual), "Verifying that tapping on the " + (i + 1) + "th [sic] star works, actual: " + textBlock.DocumentText);
00153                     VerifyValue_ValueEqualsOnAutomationElement(maxRatingAutomationElement, "Rating, " + (i + 1) + " of 9"); // make sure the UIA interface shows the right max value
00154                 }
00155             }
00156         }
00157
00158         [TestMethod]
00159         public void UnclearableIsUnclearableTest()
00160         {
00161             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00162             {
00163                 Log.Comment("Retrieve MyRatingIsClearEnabled rating control as generic UIElement");
00164                 UIObject ratingUIObject = FindElement.ByName("MyRatingIsClearEnabled");
00165                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MyRatingIsClearEnabled");
00166
00167                 Log.Comment("Retrieve the text block as TextBlock");
00168                 TextBlock textBlock = new TextBlock(FindElement.ByName("MyRatingIsClearEnabledText"));
00169                 InputHelper.ScrollToElement(textBlock);
00170
00171                 Log.Comment("Verify a right key on an unset Rating, sets rating to 1 [2]");
00172                 KeyboardHelper.PressKey(ratingUIObject, Key.Right);
00173                 Verify.AreEqual("1", textBlock.DocumentText);
00174
00175                 Log.Comment("Verify a left key on a RatingControl with Value=1 AND IsClearEnabled=false leaves rating at 1");
00176                 KeyboardHelper.PressKey(ratingUIObject, Key.Left);
00177                 Verify.AreEqual("1", textBlock.DocumentText);
00178
00179                 KeyboardHelper.PressKey(ratingUIObject, Key.Right);
00180                 Verify.AreEqual("2", textBlock.DocumentText);
00181
00182                 Log.Comment("Verify the home key for a IsClearEnabled=false RatingControl sets rating to 1");
00183                 KeyboardHelper.PressKey(ratingUIObject, Key.Home);
00184                 Verify.AreEqual("1", textBlock.DocumentText);
00185             }
00186         }
00187
00188         [TestMethod]
00189         [TestProperty("Ignore", "True")] // Bug 43128008: RatingControlTests.CanClearEveryValueTest is unreliable
00190         public void CanClearEveryValueTest()
00191         {
00192             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00193             {
00194                 TextBlock tb = new TextBlock(FindElement.ById("FrameDetails"));
00195                 Log.Comment("FrameDetails: " + tb.DocumentText);
00196
00197                 Log.Comment("Retrieve rating control as generic UIElement");
00198                 UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
00199                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
00200
00201                 Log.Comment("Retrieve the text block as a TextBlock");
00202                 TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));
00203
00204                 Wait.ForIdle();
00205
00206                 Log.Comment("Verify a tap on the first star sets Rating to 1");
00207                 InputHelper.Tap(ratingUIObject, (0 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00208                 Verify.AreEqual("1", textBlock.DocumentText);
00209
00210                 Log.Comment("Verify a tap on the first star sets Rating to 2.5 (placeholder value)");
00211                 InputHelper.Tap(ratingUIObject, (0 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00212                 Verify.AreEqual("!2.5", textBlock.DocumentText);
00213
00214                 Log.Comment("Verify a tap on the second star sets Rating to 2");
00215                 InputHelper.Tap(ratingUIObject, (1 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00216                 Verify.AreEqual("2", textBlock.DocumentText);
00217
00218                 Log.Comment("Verify a tap on the second star sets Rating to 2.5 (placeholder value)");
00219                 InputHelper.Tap(ratingUIObject, (1 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00220                 Verify.AreEqual("!2.5", textBlock.DocumentText);
00221
00222                 Log.Comment("Verify a tap on the third star sets Rating to 3");
00223                 InputHelper.Tap(ratingUIObject, (2 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00224                 Verify.AreEqual("3", textBlock.DocumentText);
00225
00226                 Log.Comment("Verify a tap on the third star sets Rating to 2.5 (placeholder value)");
00227                 InputHelper.Tap(ratingUIObject, (2 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00228                 Verify.AreEqual("!2.5", textBlock.DocumentText);
00229
00230                 Log.Comment("Verify a tap on the fourth star sets Rating to 4");
00231                 InputHelper.Tap(ratingUIObject, (3 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00232                 Verify.AreEqual("4", textBlock.DocumentText);
00233
00234                 Log.Comment("Verify a tap on the fourth star sets Rating to 2.5 (placeholder value)");
00235                 InputHelper.Tap(ratingUIObject, (3 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00236                 Verify.AreEqual("!2.5", textBlock.DocumentText);
00237
00238                 Log.Comment("Verify a tap on the fifth star sets Rating to 5");
00239                 InputHelper.Tap(ratingUIObject, (4 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00240                 Verify.AreEqual("5", textBlock.DocumentText);
00241
00242                 Log.Comment("Verify a tap on the second star sets Rating to 2.5 (placeholder value)");
00243                 InputHelper.Tap(ratingUIObject, (4 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00244                 Verify.AreEqual("!2.5", textBlock.DocumentText);
00245             }
00246         }
00247
00248         [TestMethod]
00249         public void GamepadTest()
00250         {
00251             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00252             {
00253                 UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
00254                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
00255                 TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));
00256
00257                 Log.Comment("Verify gamepad engagement");
00258                 ratingUIObject.SetFocus();
00259                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00260                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00261                 Wait.ForIdle();
00262                 Verify.AreEqual("1", textBlock.DocumentText);
00263
00264                 Log.Comment("Verify gamepad one change and cancel");
00265                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00266                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
00267                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.B);
00268                 Wait.ForIdle();
00269                 Verify.AreEqual("1", textBlock.DocumentText);
00270
00271                 Log.Comment("Verify gamepad one change and accept");
00272                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00273                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
00274                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00275                 Wait.ForIdle();
00276                 Verify.AreEqual("2", textBlock.DocumentText);
00277
00278                 Log.Comment("Verify gamepad multiple changes");
00279                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00280                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
00281                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
00282                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
00283                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00284                 Wait.ForIdle();
00285                 Verify.AreEqual("3", textBlock.DocumentText);
00286
00287                 Log.Comment("Verify gamepad left stick and dpad work");
00288                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00289                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
00290                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.LeftThumbstickRight);
00291                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.LeftThumbstickRight);
00292                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00293                 Wait.ForIdle();
00294                 Verify.AreEqual("4", textBlock.DocumentText);
00295
00296                 Log.Comment("Verify gamepad dpad up down do nothing");
00297                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00298                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadUp);
00299                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00300                 Wait.ForIdle();
00301                 Verify.AreEqual("4", textBlock.DocumentText);
00302
00303                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00304                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadDown);
00305                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00306                 Wait.ForIdle();
00307                 Verify.AreEqual("4", textBlock.DocumentText);
00308             }
00309         }
00310
00311         [TestMethod]
00312         public void VerifyThatProgrammaticallyRemovingEngagementResetsValue()
00313         {
00314             using (var setup = new TestSetupHelper("RatingControl Tests"))  // This literally clicks the button corresponding to the test page.
00315             {
00316                 TextBlock magicDisengagerTextBlock = new TextBlock(FindElement.ById("MagicDisengagerTextBlock"));
00317                 magicDisengagerTextBlock.SetFocus();
00318                 InputHelper.ScrollToElement(magicDisengagerTextBlock);
00319
00320                 UIObject magicDisengager = FindElement.ById("MagicDisengager");
00321                 Verify.IsNotNull(magicDisengager, "Verifying that we found a UIElement called MagicDisengager");
00322                 magicDisengager.SetFocus();
00323
00324                 Wait.ForIdle();
00325
00326                 GamepadHelper.PressButton(magicDisengager, GamepadButton.A);
00327                 GamepadHelper.PressButton(magicDisengager, GamepadButton.DPadRight);
00328                 Verify.AreEqual("2", magicDisengagerTextBlock.DocumentText);
00329
00330                 // This control is rigged to programmatically disengage at 3
00331                 GamepadHelper.PressButton(magicDisengager, GamepadButton.DPadRight);
00332                 Verify.AreEqual("null", magicDisengagerTextBlock.DocumentText);
00333             }
00334         }
00335
00336         [TestMethod]
00337         [TestProperty("MinVersion", "RS1")]
00338         public void UIAValuePatternTest()
00339         {
00340             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00341             {
00342                 Log.Comment("Retrieve rating control as generic UIElement");
00343                 UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
00344
00345                 TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));
00346                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
00347
00348                 Log.Comment("Verify the UIA Value before user clicks the control.");
00349                 ratingUIObject.SetFocus(); // Setting focus just so we can use AE.FE below
00350                 Wait.ForIdle();
00351                 AutomationElement ratingPeer = AutomationElement.FocusedElement;
00352
00353                 VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Community Rating, 2.5 of 5");
00354
00355                 Log.Comment("Verify moving right 2 times with the gamepad sets the control to 3");
00356                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00357                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
00358                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadRight);
00359                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00360                 Wait.ForIdle();
00361                 Verify.AreEqual("3", textBlock.DocumentText);
00362
00363                 Log.Comment("Verify rating of 3 sets UIA text to 3");
00364
00365                 VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Rating, 3 of 5");
00366
00367                 // revert:
00368                 Log.Comment("Resetting control to community rating");
00369                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00370                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
00371                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
00372                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.DPadLeft);
00373                 GamepadHelper.PressButton(ratingUIObject, GamepadButton.A);
00374
00375                 VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Community Rating, 2.5 of 5");
00376
00377                 Log.Comment("Verify more complex navigation");
00378                 KeyboardHelper.PressKey(ratingUIObject, Key.Right);
00379                 KeyboardHelper.PressKey(ratingUIObject, Key.Right);
00380                 KeyboardHelper.PressKey(ratingUIObject, Key.Right);
00381                 KeyboardHelper.PressKey(ratingUIObject, Key.Left);
00382                 VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Rating, 2 of 5");
00383
00384                 // Verify read an unset rating
00385                 ratingUIObject = FindElement.ByName("RatingBindingSample");
00386                 Log.Comment("Verify the UIA Value of an unset Rating without a placeholder value");
00387                 ratingUIObject.SetFocus();
00388                 InputHelper.ScrollToElement(ratingUIObject);
00389                 ratingPeer = AutomationElement.FocusedElement;
00390
00391                 VerifyValue_ValueEqualsOnAutomationElement(ratingPeer, "Rating Unset");
00392
00393                 // Verify rounding:
00394                 Log.Comment("Verifying Value_Value rounding");
00395                 UIObject round1 = FindElement.ById("ValuePatternRoundTest1");
00396                 round1.SetFocus();
00397                 AutomationElement roundAE1 = AutomationElement.FocusedElement;
00398                 UIObject round2 = FindElement.ById("ValuePatternRoundTest2");
00399                 round2.SetFocus();
00400                 AutomationElement roundAE2 = AutomationElement.FocusedElement;
00401                 UIObject round3 = FindElement.ById("ValuePatternRoundTest3");
00402                 round3.SetFocus();
00403                 AutomationElement roundAE3 = AutomationElement.FocusedElement;
00404
00405                 VerifyValue_ValueEqualsOnAutomationElement(roundAE1, "Rating, 1.5 of 5");
00406                 VerifyValue_ValueEqualsOnAutomationElement(roundAE2, "Rating, 1.55 of 5");
00407                 VerifyValue_ValueEqualsOnAutomationElement(roundAE3, "Rating, 1.5 of 5");
00408             }
00409         }
00410
00411         // Setting the value on a collapsed control can cause it to try and
00412         // interact with a non-existent AutomationPeer, causing a crash.
00413         [TestMethod]
00414         public void VerifyDontCrashWhenCollapsedAndValueSet()
00415         {
00416             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00417             {
00418                 Button button = new Button(FindElement.ByName("CollapsedRatingControlButton"));
00419                 button.Invoke();
00420                 Wait.ForIdle();
00421             }
00422         }
00423
00424         // Verify that tabbing around puts us where we expect
00425         [TestMethod]
00426         public void VerifyTabKeyWorks()
00427         {
00428             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00429             {
00430                 UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
00431                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
00432                 Button button = new Button(FindElement.ByName("PHButton"));
00433                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a Button called PHButton");
00434                 UIObject ratingReadOnly = FindElement.ByName("MyRatingReadOnly");
00435                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MyRatingReadOnly");
00436                 UIObject ratingIsClearEnabled = FindElement.ByName("MyRatingReadOnlyWithValue");
00437                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called MyRatingReadOnlyWithValue");
00438                 InputHelper.ScrollToElement(ratingIsClearEnabled);
00439
00440                 Log.Comment("Verify we aren't breaking tab behaviour");
00441                 ratingUIObject.SetFocus();
00442                 Wait.ForIdle();
00443                 Verify.IsTrue(ratingUIObject.HasKeyboardFocus, "Focus is on first RatingControl");
00444                 KeyboardHelper.PressKey(Key.Tab);
00445                 Verify.IsTrue(button.HasKeyboardFocus, "Focus is on the button");
00446                 KeyboardHelper.PressKey(Key.Tab);
00447                 Verify.IsTrue(ratingReadOnly.HasKeyboardFocus, "Focus is on the ReadOnly RatingControl");
00448                 KeyboardHelper.PressKey(Key.Tab);
00449                 Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus, "Focus is on the ReadOnlyWithValue RatingControl");
00450
00451                 Log.Comment("Verify left/right/up/down keeps us within the control (w/ keyboard)");
00452                 KeyboardHelper.PressKey(Key.Up);
00453                 Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
00454                 KeyboardHelper.PressKey(Key.Down);
00455                 Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
00456                 KeyboardHelper.PressKey(Key.Left);
00457                 Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
00458                 KeyboardHelper.PressKey(Key.Right);
00459                 Verify.IsTrue(ratingIsClearEnabled.HasKeyboardFocus);
00460             }
00461         }
00462
00463         [TestMethod]
00464         public void VerifyDependencyPropertyBinding()
00465         {
00466             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00467             {
00468                 UIObject ratingBinding = FindElement.ByName("RatingBindingSample");
00469                 Button ratingBindingButton = new Button(FindElement.ByName("RatingBindingSampleButton"));
00470                 InputHelper.ScrollToElement(ratingBindingButton);
00471                 TextBlock ratingBindingText = new TextBlock(FindElement.ById("RatingBindingSampleText"));
00472                 ratingBindingButton.Invoke();
00473                 Wait.ForIdle();
00474                 Verify.AreEqual("Binding successful", ratingBindingText.DocumentText);
00475
00476                 UIObject ratingXBind = FindElement.ByName("RatingXBindSample");
00477                 Button ratingXBindButton = new Button(FindElement.ByName("RatingXBindSampleButton"));
00478                 InputHelper.ScrollToElement(ratingXBindButton);
00479                 TextBlock ratingXBindText = new TextBlock(FindElement.ByName("RatingXBindSampleText"));
00480                 ratingXBindButton.Invoke();
00481                 Wait.ForIdle();
00482                 Verify.AreEqual("Binding successful", ratingXBindText.DocumentText);
00483             }
00484         }
00485
00486         [TestMethod]
00487         public void VerifyUIAProperties()
00488         {
00489             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00490             {
00491                 UIObject ratingReadOnly = FindElement.ByName("MyRatingReadOnly");
00492                 ratingReadOnly.SetFocus();
00493                 InputHelper.ScrollToElement(ratingReadOnly);
00494                 AutomationElement ratingPeer = AutomationElement.FocusedElement;
00495
00496                 object valuePatternAsObject;
00497                 ratingPeer.TryGetCurrentPattern(ValuePattern.Pattern, out valuePatternAsObject);
00498                 Verify.IsNotNull(valuePatternAsObject); // ValuePattern should exist
00499                 ValuePattern valuePattern = valuePatternAsObject as ValuePattern;
00500
00501                 object valueProperty = ratingPeer.GetCurrentPropertyValue(ValuePattern.IsReadOnlyProperty);
00502                 bool isReadOnly = (bool)valueProperty;
00503                 Verify.IsTrue(isReadOnly);
00504
00505                 // Verify the negative
00506                 UIObject ratingReadable = FindElement.ByName("TestRatingControl");
00507                 ratingReadable.SetFocus();
00508                 Wait.ForIdle();
00509                 ratingPeer = AutomationElement.FocusedElement;
00510                 valueProperty = ratingPeer.GetCurrentPropertyValue(ValuePattern.IsReadOnlyProperty);
00511                 isReadOnly = (bool)valueProperty;
00512                 Verify.IsFalse(isReadOnly);
00513
00514                 ratingPeer.TryGetCurrentPattern(RangeValuePattern.Pattern, out valuePatternAsObject);
00515                 Verify.IsNotNull(valuePatternAsObject); // RangeValuePattern should exist
00516
00517                 ratingPeer.TryGetCurrentPattern(ExpandCollapsePattern.Pattern, out valuePatternAsObject);
00518                 Verify.IsNull(valuePatternAsObject); // ExpandCollapsePattern shouldn't exist
00519
00520                 String lctp = ratingPeer.GetCurrentPropertyValue(AutomationElementIdentifiers.LocalizedControlTypeProperty) as String;
00521                 Verify.AreEqual("Rating Slider", lctp);
00522
00523                 object maximumProperty = ratingPeer.GetCurrentPropertyValue(RangeValuePattern.MaximumProperty);
00524                 double maximumPropertyAsNumber = (double)maximumProperty;
00525                 Verify.AreEqual(5, maximumPropertyAsNumber, "Verify the RangeValue_Max UIA property");
00526             }
00527         }
00528
00529         [TestMethod]
00530         public void VerifyReadOnlyIsntInteractive()
00531         {
00532             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00533             {
00534
00535                 UIObject ratingReadOnly = FindElement.ByName("MyRatingReadOnlyWithValue");
00536                 TextBlock tb = new TextBlock(FindElement.ByName("MyRatingReadOnlyTextBlock"));
00537                 InputHelper.ScrollToElement(tb);
00538
00539                 Verify.AreEqual(tb.DocumentText, "2.2");
00540
00541                 ratingReadOnly.SetFocus();
00542
00543                 KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
00544                 KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
00545                 KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
00546                 KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
00547                 KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
00548                 KeyboardHelper.PressKey(ratingReadOnly, Key.Right);
00549
00550                 Verify.AreEqual(tb.DocumentText, "2.2");
00551             }
00552         }
00553
00554         [TestMethod]
00555         public void DontCrashWhenRecyclingTest()
00556         {
00557             using (var temp = new TestSetupHelper("RatingControl Tests"))
00558             {
00559             }
00560             Wait.ForIdle();
00561             using (var setup = new TestSetupHelper("RatingControl Tests"))
00562             {
00563             }
00564         }
00565
00566         [TestMethod]
00567         public void ImageInfoValidation()
00568         {
00569             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00570             {
00571                 UIObject customImagesTwo = FindElement.ById("CustomImages");
00572                 InputHelper.ScrollToElement(customImagesTwo);
00573
00574                 WaitForCheckbox("CustomImagesLoadedCheckBox");
00575
00576                 // Verify it has an <Image> child
00577
00578                 // Future: This RawContext doesn't seem to work to make us search the Raw UIA tree,
00579                 // in future, if we can figure out a way to do that, we can stop
00580                 // the "move the image into the content tree" in the test app hack
00581                 // Context.RawContext.Activate();
00582
00583                 Log.Comment("Trying to find the named Image: CustomImages_FirstImageItem");
00584                 UIObject image = FindElement.ById("CustomImages_FirstImageItem");
00585                 Image imageAsImage = image as Image;
00586
00587                 // Can't really verify anything else
00588             }
00589         }
00590
00591         // Need a test for when we CHANGE between font<->image rating items
00592         [TestMethod]
00593         public void ValidateSwitchingItemInfo()
00594         {
00595             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00596             {
00597                 UIObject customImagesTwo = FindElement.ById("StageThreeCheckbox");
00598                 InputHelper.ScrollToElement(customImagesTwo);
00599
00600                 WaitForCheckbox("StageOneCheckbox");
00601
00602                 Log.Comment("Trying to find the named Image: CustomImagesTwo_FirstImageItem");
00603                 UIObject image = FindElement.ById("CustomImagesTwo_FirstImageItem");
00604                 Image imageAsImage = image as Image;
00605
00606                 Button changeTypeButton = new Button(FindElement.ById("ChangeCustomImagesTwoType"));
00607                 changeTypeButton.Invoke();
00608                 Wait.ForIdle();
00609
00610                 WaitForCheckbox("StageTwoCheckbox");
00611
00612                 Log.Comment("Trying to find the named Image: CustomImagesTwo_FirstTextItem");
00613                 UIObject textBlock = FindElement.ById("CustomImagesTwo_FirstTextItem");
00614                 TextBlock textBlockAsTextBlock = textBlock as TextBlock;
00615
00616                 changeTypeButton.Invoke();
00617                 Wait.ForIdle();
00618
00619                 WaitForCheckbox("StageThreeCheckbox");
00620
00621                 Log.Comment("Trying to find the named Image: CustomImagesTwo_FirstImageItem_Again");
00622                 UIObject image2 = FindElement.ById("CustomImagesTwo_FirstImageItem_Again");
00623                 Image imageAsImage2 = image2 as Image;
00624             }
00625         }
00626
00627         // These two tests that try and test live mid-input visual changes are unreliable.
00628         [TestMethod]
00629         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125
00630         public void EnsureScaleMaintainedOnTap()
00631         {
00632             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00633             {
00634                 Log.Comment("Retrieve rating control as generic UIElement");
00635                 UIObject ratingUIObject = FindElement.ByName("TestRatingControl");
00636                 Verify.IsNotNull(ratingUIObject, "Verifying that we found a UIElement called TestRatingControl");
00637
00638                 Log.Comment("Retrieve the three text blocks");
00639                 TextBlock textBlock = new TextBlock(FindElement.ByName("TestTextBlockControl"));
00640                 TextBlock textBlockX = new TextBlock(FindElement.ById("ScaleTextXBlock"));
00641                 TextBlock textBlockY = new TextBlock(FindElement.ById("ScaleTextYBlock"));
00642
00643                 VerifyValueIsApproximately(0.5f, float.Parse(textBlockX.DocumentText));
00644                 VerifyValueIsApproximately(0.5f, float.Parse(textBlockY.DocumentText));
00645
00646                 Log.Comment("Click to set the rating to 2");
00647                 Point secondStar = new Point((1 * RATING_ITEM_WIDTH) + (RATING_ITEM_WIDTH / 2), RATING_ITEM_HEIGHT / 2);
00648                 InputHelper.Pan(ratingUIObject, secondStar, 1, Direction.East); // Do it twice, using different methods to ensure test reliability
00649                 InputHelper.LeftClick(ratingUIObject, secondStar.X, secondStar.Y); // (Across server/local runs)
00650                 Verify.AreEqual("2", textBlock.DocumentText);
00651                 Wait.ForMilliseconds(200); // composition property spy takes time!
00652
00653                 VerifyValueIsApproximately(0.8f, float.Parse(textBlockX.DocumentText));
00654                 VerifyValueIsApproximately(0.8f, float.Parse(textBlockY.DocumentText));
00655             }
00656         }
00657
00658         [TestMethod]
00659         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125
00660         public void VerifyRatingItemFallback()
00661         {
00662             // This test is actually performed in the test app itself, so go look at RatingControlPage.xaml.cs for the meat of it.
00663
00664             using (var setup = new TestSetupHelper("RatingControl Tests")) // This literally clicks the button corresponding to the test page.
00665             {
00666                 Log.Comment("Retrieve PointerOverPlaceholderFallbackRating rating control as generic UIElement");
00667                 UIObject popRating = FindElement.ById("PointerOverPlaceholderFallbackRating");
00668                 Verify.IsNotNull(popRating, "Verifying that we found a UIElement called PointerOverPlaceholderFallbackRating");
00669
00670                 InputHelper.ScrollToElement(popRating);
00671
00672                 popRating.Tap(); // Since on phone it's touch, I do a tap to trigger that.
00673                 popRating.Click();
00674                 Wait.ForIdle();
00675
00676                 Log.Comment("Retrieve PointerOverFallbackRating rating control as generic UIElement");
00677                 UIObject pointerOver = FindElement.ById("PointerOverFallbackRating");
00678                 Verify.IsNotNull(pointerOver, "Verifying that we found a UIElement called PointerOverFallbackRating");
00679                 InputHelper.ScrollToElement(pointerOver);
00680                 pointerOver.Click();
00681                 pointerOver.Tap();
00682                 Wait.ForIdle();
00683
00684                 TextBlock textBlock = new TextBlock(FindElement.ById("UnsetFallbackTextBlock"));
00685                 Verify.AreEqual("+", textBlock.DocumentText, "Verify Unset glyph falls back onto Glyph");
00686                 TextBlock textBlock2 = new TextBlock(FindElement.ById("PlaceholderFallbackTextBlock"));
00687                 Verify.AreEqual("+", textBlock2.DocumentText, "Verify Placeholder glyph falls back onto Glyph");
00688                 TextBlock textBlock3 = new TextBlock(FindElement.ById("DisabledFallbackTextBlock"));
00689                 Verify.AreEqual("+", textBlock3.DocumentText, "Verify Disabled glyph falls back onto Glyph");
00690
00691                 ElementCache.Clear();
00692
00693                 TextBlock textBlock4 = new TextBlock(FindElement.ById("PointerOverPlaceholderFallbackTextBlock"));
00694                 Verify.AreEqual("+", textBlock4.DocumentText, "Verify PointerOverPlaceholder glyph falls back onto Placeholder");
00695                 TextBlock textBlock5 = new TextBlock(FindElement.ById("PointerOverFallbackTextBlock"));
00696                 Verify.AreEqual("+", textBlock5.DocumentText, "Verify PointerOver glyph falls back onto Glyph");
00697                 TextBlock textBlock6 = new TextBlock(FindElement.ById("NoFallbackTextBlock"));
00698                 Verify.AreEqual("+", textBlock6.DocumentText, "Verify a glyph didn't fall back if it wasn't meant to");
00699
00700                 // Image:
00701                 Log.Comment("Retrieve PointerOverPlaceholderImageFallbackRating rating control as generic UIElement");
00702                 popRating = FindElement.ById("PointerOverPlaceholderImageFallbackRating");
00703                 Verify.IsNotNull(popRating, "Verifying that we found a UIElement called PointerOverPlaceholderImageFallbackRating");
00704
00705                 InputHelper.ScrollToElement(popRating);
00706                 Wait.ForIdle();
00707
00708                 popRating.Tap(); // Since on phone it's touch, I do a tap to trigger that.
00709                 popRating.Click();
00710                 Wait.ForIdle();
00711
00712                 Log.Comment("Retrieve PointerOverImageFallbackRating rating control as generic UIElement");
00713                 pointerOver = FindElement.ById("PointerOverImageFallbackRating");
00714                 Verify.IsNotNull(pointerOver, "Verifying that we found a UIElement called PointerOverImageFallbackRating");
00715                 pointerOver.Tap();
00716                 pointerOver.Click();
00717                 Wait.ForIdle();
00718
00719                 textBlock = new TextBlock(FindElement.ById("UnsetImageFallbackTextBlock"));
00720                 Verify.AreEqual("+", textBlock.DocumentText, "Verify Unset image falls back onto Image");
00721                 textBlock2 = new TextBlock(FindElement.ById("PlaceholderImageFallbackTextBlock"));
00722                 Verify.AreEqual("+", textBlock2.DocumentText, "Verify Placeholder image falls back onto Image");
00723                 textBlock3 = new TextBlock(FindElement.ById("DisabledImageFallbackTextBlock"));
00724                 Verify.AreEqual("+", textBlock3.DocumentText, "Verify Disabled image falls back onto Image");
00725
00726                 ElementCache.Clear();
00727                 textBlock4 = new TextBlock(FindElement.ById("PointerOverPlaceholderImageFallbackTextBlock"));
00728                 Verify.AreEqual("+", textBlock4.DocumentText, "Verify PointerOverPlaceholder image falls back onto PlaceholderImage");
00729                 textBlock5 = new TextBlock(FindElement.ById("PointerOverImageFallbackTextBlock"));
00730                 Verify.AreEqual("+", textBlock5.DocumentText, "Verify PointerOver image falls back onto Image");
00731             }
00732         }
00733
00734         // Test Helpers:
00735         void WaitForCheckbox(string checkboxName)
00736         {
00737             Log.Comment("Waiting until " + checkboxName + " to be checked by test app.");
00738             CheckBox cb = new CheckBox(FindElement.ById(checkboxName));
00739
00740             if (cb.ToggleState != ToggleState.On)
00741             {
00742                 cb.GetToggledWaiter().Wait();
00743             }
00744
00745             Wait.ForIdle();
00746
00747             Log.Comment(checkboxName + " checkbox checked.");
00748         }
00749
00750         void VerifyValue_ValueEqualsOnAutomationElement(AutomationElement ae, String expected, String reason = "")
00751         {
00752             object valuePatternAsObject;
00753             ae.TryGetCurrentPattern(ValuePattern.Pattern, out valuePatternAsObject);
00754             if (valuePatternAsObject != null)
00755             {
00756                 ValuePattern vp = valuePatternAsObject as ValuePattern;
00757                 object valueProperty = ae.GetCurrentPropertyValue(ValuePattern.ValueProperty);
00758                 String valuePropertyString = valueProperty as String;
00759                 Verify.AreEqual(expected, valuePropertyString, reason.Length > 0 ? reason : "Expected value of " + expected);
00760             }
00761         }
00762
00763         const float APPROXIMATE_MARGIN = 0.025f;
00764         void VerifyValueIsApproximately(float expected, float actual)
00765         {
00766             Verify.IsTrue(actual >= expected - APPROXIMATE_MARGIN && actual <= expected + APPROXIMATE_MARGIN, "Verify " + actual + " is within -/+0.025 of " + expected);
00767         }
00768
00769     }
00770 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterProperties Member List

This is the complete list of members for ItemsRepeaterProperties, including all inherited members.
Background(winrt::Brush const &value) | ItemsRepeaterProperties |
Background() | ItemsRepeaterProperties |
BackgroundProperty() | ItemsRepeaterProperties | [inline, static]
ClearProperties() | ItemsRepeaterProperties | [static]
ElementClearing(winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs > const &value) | ItemsRepeaterProperties |
ElementClearing(winrt::event_token const &token) | ItemsRepeaterProperties |
ElementIndexChanged(winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs > const &value) | ItemsRepeaterProperties |
ElementIndexChanged(winrt::event_token const &token) | ItemsRepeaterProperties |
ElementPrepared(winrt::TypedEventHandler< winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs > const &value) | ItemsRepeaterProperties |
ElementPrepared(winrt::event_token const &token) | ItemsRepeaterProperties |
EnsureProperties() | ItemsRepeaterProperties | [static]
HorizontalCacheLength(double value) | ItemsRepeaterProperties |
HorizontalCacheLength() | ItemsRepeaterProperties |
HorizontalCacheLengthProperty() | ItemsRepeaterProperties | [inline, static]
ItemsRepeaterProperties() | ItemsRepeaterProperties |
ItemsSource(winrt::IInspectable const &value) | ItemsRepeaterProperties |
ItemsSource() | ItemsRepeaterProperties |
ItemsSourceProperty() | ItemsRepeaterProperties | [inline, static]
ItemTemplate(winrt::IInspectable const &value) | ItemsRepeaterProperties |
ItemTemplate() | ItemsRepeaterProperties |
ItemTemplateProperty() | ItemsRepeaterProperties | [inline, static]
ItemTransitionProvider(winrt::ItemCollectionTransitionProvider const &value) | ItemsRepeaterProperties |
ItemTransitionProvider() | ItemsRepeaterProperties |
ItemTransitionProviderProperty() | ItemsRepeaterProperties | [inline, static]
Layout(winrt::Layout const &value) | ItemsRepeaterProperties |
Layout() | ItemsRepeaterProperties |
LayoutProperty() | ItemsRepeaterProperties | [inline, static]
m_elementClearingEventSource | ItemsRepeaterProperties |
m_elementIndexChangedEventSource | ItemsRepeaterProperties |
m_elementPreparedEventSource | ItemsRepeaterProperties |
OnHorizontalCacheLengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsRepeaterProperties | [static]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsRepeaterProperties | [static]
OnItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsRepeaterProperties | [static]
OnItemTransitionProviderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsRepeaterProperties | [static]
OnLayoutPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsRepeaterProperties | [static]
OnVerticalCacheLengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ItemsRepeaterProperties | [static]
s_BackgroundProperty | ItemsRepeaterProperties | [static]
s_HorizontalCacheLengthProperty | ItemsRepeaterProperties | [static]
s_ItemsSourceProperty | ItemsRepeaterProperties | [static]
s_ItemTemplateProperty | ItemsRepeaterProperties | [static]
s_ItemTransitionProviderProperty | ItemsRepeaterProperties | [static]
s_LayoutProperty | ItemsRepeaterProperties | [static]
s_VerticalCacheLengthProperty | ItemsRepeaterProperties | [static]
VerticalCacheLength(double value) | ItemsRepeaterProperties |
VerticalCacheLength() | ItemsRepeaterProperties |
VerticalCacheLengthProperty() | ItemsRepeaterProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterStackPanelAnchoringPage::QueuedOperation Member List

This is the complete list of members for ScrollPresenterStackPanelAnchoringPage::QueuedOperation, including all inherited members.
NewCount | ScrollPresenterStackPanelAnchoringPage::QueuedOperation |
NewIndex | ScrollPresenterStackPanelAnchoringPage::QueuedOperation |
OldCount | ScrollPresenterStackPanelAnchoringPage::QueuedOperation |
OldIndex | ScrollPresenterStackPanelAnchoringPage::QueuedOperation |
QueuedOperation(QueuedOperationType type, int oldIndex, int oldCount, int newIndex, int newCount) | ScrollPresenterStackPanelAnchoringPage::QueuedOperation | [inline]
Type | ScrollPresenterStackPanelAnchoringPage::QueuedOperation |
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/BringIntoViewOffsetsChange.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

BringIntoViewOffsetsChange.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ScrollPresenterTrace.h"
00008 #include "BringIntoViewOffsetsChange.h"
00009
00010 BringIntoViewOffsetsChange::BringIntoViewOffsetsChange(
00011     const ITrackerHandleManager* owner,
00012     double zoomedHorizontalOffset,
00013     double zoomedVerticalOffset,
00014     ScrollPresenterViewKind offsetsKind,
00015     winrt::IInspectable const& options,
00016     winrt::UIElement const& element,
00017     winrt::Rect const& elementRect,
00018     double horizontalAlignmentRatio,
00019     double verticalAlignmentRatio,
00020     double horizontalOffset,
00021     double verticalOffset) :
00022         m_owner(owner),
00023         m_elementRect(elementRect),
00024         m_horizontalAlignmentRatio(horizontalAlignmentRatio),
00025         m_verticalAlignmentRatio(verticalAlignmentRatio),
00026         m_horizontalOffset(horizontalOffset),
00027         m_verticalOffset(verticalOffset),
00028         OffsetsChange(zoomedHorizontalOffset, zoomedVerticalOffset, offsetsKind, options)
00029 {
00030     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00031
00032     m_element.set(element);
00033 }
00034
00035 BringIntoViewOffsetsChange::~BringIntoViewOffsetsChange()
00036 {
00037     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00038 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExtraCommandBarFlyoutPage Member List

This is the complete list of members for ExtraCommandBarFlyoutPage, including all inherited members.
ContextFlyout_Closed(object sender, object e) | ExtraCommandBarFlyoutPage | [inline, private]
ContextFlyout_Opening(object sender, object e) | ExtraCommandBarFlyoutPage | [inline, private]
customButtonsFlyoutOpenCount | ExtraCommandBarFlyoutPage | [private]
ExtraCommandBarFlyoutPage() | ExtraCommandBarFlyoutPage | [inline]
OnClearClipboardContentsClicked(object sender, object args) | ExtraCommandBarFlyoutPage | [inline, private]
OnCountPopupsClicked(object sender, object args) | ExtraCommandBarFlyoutPage | [inline, private]
tbloaded(object sender, RoutedEventArgs e) | ExtraCommandBarFlyoutPage | [inline, private]
tbunloaded(object sender, RoutedEventArgs e) | ExtraCommandBarFlyoutPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRing.properties.cpp Source File

  • File List
  • File Members
  • Generated

ProgressRing.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ProgressRing.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ProgressRing)
00012 }
00013
00014 #include "ProgressRing.g.cpp"
00015
00016 GlobalDependencyProperty ProgressRingProperties::s_DeterminateSourceProperty{ nullptr };
00017 GlobalDependencyProperty ProgressRingProperties::s_IndeterminateSourceProperty{ nullptr };
00018 GlobalDependencyProperty ProgressRingProperties::s_IsActiveProperty{ nullptr };
00019 GlobalDependencyProperty ProgressRingProperties::s_IsIndeterminateProperty{ nullptr };
00020 GlobalDependencyProperty ProgressRingProperties::s_MaximumProperty{ nullptr };
00021 GlobalDependencyProperty ProgressRingProperties::s_MinimumProperty{ nullptr };
00022 GlobalDependencyProperty ProgressRingProperties::s_TemplateSettingsProperty{ nullptr };
00023 GlobalDependencyProperty ProgressRingProperties::s_ValueProperty{ nullptr };
00024
00025 ProgressRingProperties::ProgressRingProperties()
00026 {
00027     EnsureProperties();
00028 }
00029
00030 void ProgressRingProperties::EnsureProperties()
00031 {
00032     if (!s_DeterminateSourceProperty)
00033     {
00034         s_DeterminateSourceProperty =
00035             InitializeDependencyProperty(
00036                 L"DeterminateSource",
00037                 winrt::name_of<winrt::IAnimatedVisualSource>(),
00038                 winrt::name_of<winrt::ProgressRing>(),
00039                 false /* isAttached */,
00040                 ValueHelper<winrt::IAnimatedVisualSource>::BoxedDefaultValue(),
00041                 winrt::PropertyChangedCallback(&OnDeterminateSourcePropertyChanged));
00042     }
00043     if (!s_IndeterminateSourceProperty)
00044     {
00045         s_IndeterminateSourceProperty =
00046             InitializeDependencyProperty(
00047                 L"IndeterminateSource",
00048                 winrt::name_of<winrt::IAnimatedVisualSource>(),
00049                 winrt::name_of<winrt::ProgressRing>(),
00050                 false /* isAttached */,
00051                 ValueHelper<winrt::IAnimatedVisualSource>::BoxedDefaultValue(),
00052                 winrt::PropertyChangedCallback(&OnIndeterminateSourcePropertyChanged));
00053     }
00054     if (!s_IsActiveProperty)
00055     {
00056         s_IsActiveProperty =
00057             InitializeDependencyProperty(
00058                 L"IsActive",
00059                 winrt::name_of<bool>(),
00060                 winrt::name_of<winrt::ProgressRing>(),
00061                 false /* isAttached */,
00062                 ValueHelper<bool>::BoxValueIfNecessary(true),
00063                 winrt::PropertyChangedCallback(&OnIsActivePropertyChanged));
00064     }
00065     if (!s_IsIndeterminateProperty)
00066     {
00067         s_IsIndeterminateProperty =
00068             InitializeDependencyProperty(
00069                 L"IsIndeterminate",
00070                 winrt::name_of<bool>(),
00071                 winrt::name_of<winrt::ProgressRing>(),
00072                 false /* isAttached */,
00073                 ValueHelper<bool>::BoxValueIfNecessary(true),
00074                 winrt::PropertyChangedCallback(&OnIsIndeterminatePropertyChanged));
00075     }
00076     if (!s_MaximumProperty)
00077     {
00078         s_MaximumProperty =
00079             InitializeDependencyProperty(
00080                 L"Maximum",
00081                 winrt::name_of<double>(),
00082                 winrt::name_of<winrt::ProgressRing>(),
00083                 false /* isAttached */,
00084                 ValueHelper<double>::BoxValueIfNecessary(100.0),
00085                 winrt::PropertyChangedCallback(&OnMaximumPropertyChanged));
00086     }
00087     if (!s_MinimumProperty)
00088     {
00089         s_MinimumProperty =
00090             InitializeDependencyProperty(
00091                 L"Minimum",
00092                 winrt::name_of<double>(),
00093                 winrt::name_of<winrt::ProgressRing>(),
00094                 false /* isAttached */,
00095                 ValueHelper<double>::BoxValueIfNecessary(0.0),
00096                 winrt::PropertyChangedCallback(&OnMinimumPropertyChanged));
00097     }
00098     if (!s_TemplateSettingsProperty)
00099     {
00100         s_TemplateSettingsProperty =
00101             InitializeDependencyProperty(
00102                 L"TemplateSettings",
00103                 winrt::name_of<winrt::ProgressRingTemplateSettings>(),
00104                 winrt::name_of<winrt::ProgressRing>(),
00105                 false /* isAttached */,
00106                 ValueHelper<winrt::ProgressRingTemplateSettings>::BoxedDefaultValue(),
00107                 nullptr);
00108     }
00109     if (!s_ValueProperty)
00110     {
00111         s_ValueProperty =
00112             InitializeDependencyProperty(
00113                 L"Value",
00114                 winrt::name_of<double>(),
00115                 winrt::name_of<winrt::ProgressRing>(),
00116                 false /* isAttached */,
00117                 ValueHelper<double>::BoxValueIfNecessary(0.0),
00118                 winrt::PropertyChangedCallback(&OnValuePropertyChanged));
00119     }
00120 }
00121
00122 void ProgressRingProperties::ClearProperties()
00123 {
00124     s_DeterminateSourceProperty = nullptr;
00125     s_IndeterminateSourceProperty = nullptr;
00126     s_IsActiveProperty = nullptr;
00127     s_IsIndeterminateProperty = nullptr;
00128     s_MaximumProperty = nullptr;
00129     s_MinimumProperty = nullptr;
00130     s_TemplateSettingsProperty = nullptr;
00131     s_ValueProperty = nullptr;
00132 }
00133
00134 void ProgressRingProperties::OnDeterminateSourcePropertyChanged(
00135     winrt::DependencyObject const& sender,
00136     winrt::DependencyPropertyChangedEventArgs const& args)
00137 {
00138     auto owner = sender.as<winrt::ProgressRing>();
00139     winrt::get_self<ProgressRing>(owner)->OnDeterminateSourcePropertyChanged(args);
00140 }
00141
00142 void ProgressRingProperties::OnIndeterminateSourcePropertyChanged(
00143     winrt::DependencyObject const& sender,
00144     winrt::DependencyPropertyChangedEventArgs const& args)
00145 {
00146     auto owner = sender.as<winrt::ProgressRing>();
00147     winrt::get_self<ProgressRing>(owner)->OnIndeterminateSourcePropertyChanged(args);
00148 }
00149
00150 void ProgressRingProperties::OnIsActivePropertyChanged(
00151     winrt::DependencyObject const& sender,
00152     winrt::DependencyPropertyChangedEventArgs const& args)
00153 {
00154     auto owner = sender.as<winrt::ProgressRing>();
00155     winrt::get_self<ProgressRing>(owner)->OnIsActivePropertyChanged(args);
00156 }
00157
00158 void ProgressRingProperties::OnIsIndeterminatePropertyChanged(
00159     winrt::DependencyObject const& sender,
00160     winrt::DependencyPropertyChangedEventArgs const& args)
00161 {
00162     auto owner = sender.as<winrt::ProgressRing>();
00163     winrt::get_self<ProgressRing>(owner)->OnIsIndeterminatePropertyChanged(args);
00164 }
00165
00166 void ProgressRingProperties::OnMaximumPropertyChanged(
00167     winrt::DependencyObject const& sender,
00168     winrt::DependencyPropertyChangedEventArgs const& args)
00169 {
00170     auto owner = sender.as<winrt::ProgressRing>();
00171     winrt::get_self<ProgressRing>(owner)->OnMaximumPropertyChanged(args);
00172 }
00173
00174 void ProgressRingProperties::OnMinimumPropertyChanged(
00175     winrt::DependencyObject const& sender,
00176     winrt::DependencyPropertyChangedEventArgs const& args)
00177 {
00178     auto owner = sender.as<winrt::ProgressRing>();
00179     winrt::get_self<ProgressRing>(owner)->OnMinimumPropertyChanged(args);
00180 }
00181
00182 void ProgressRingProperties::OnValuePropertyChanged(
00183     winrt::DependencyObject const& sender,
00184     winrt::DependencyPropertyChangedEventArgs const& args)
00185 {
00186     auto owner = sender.as<winrt::ProgressRing>();
00187     winrt::get_self<ProgressRing>(owner)->OnValuePropertyChanged(args);
00188 }
00189
00190 void ProgressRingProperties::DeterminateSource(winrt::IAnimatedVisualSource const& value)
00191 {
00192     [[gsl::suppress(con)]]
00193     {
00194     static_cast<ProgressRing*>(this)->SetValue(s_DeterminateSourceProperty, ValueHelper<winrt::IAnimatedVisualSource>::BoxValueIfNecessary(value));
00195     }
00196 }
00197
00198 winrt::IAnimatedVisualSource ProgressRingProperties::DeterminateSource()
00199 {
00200     return ValueHelper<winrt::IAnimatedVisualSource>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_DeterminateSourceProperty));
00201 }
00202
00203 void ProgressRingProperties::IndeterminateSource(winrt::IAnimatedVisualSource const& value)
00204 {
00205     [[gsl::suppress(con)]]
00206     {
00207     static_cast<ProgressRing*>(this)->SetValue(s_IndeterminateSourceProperty, ValueHelper<winrt::IAnimatedVisualSource>::BoxValueIfNecessary(value));
00208     }
00209 }
00210
00211 winrt::IAnimatedVisualSource ProgressRingProperties::IndeterminateSource()
00212 {
00213     return ValueHelper<winrt::IAnimatedVisualSource>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_IndeterminateSourceProperty));
00214 }
00215
00216 void ProgressRingProperties::IsActive(bool value)
00217 {
00218     [[gsl::suppress(con)]]
00219     {
00220     static_cast<ProgressRing*>(this)->SetValue(s_IsActiveProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00221     }
00222 }
00223
00224 bool ProgressRingProperties::IsActive()
00225 {
00226     return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_IsActiveProperty));
00227 }
00228
00229 void ProgressRingProperties::IsIndeterminate(bool value)
00230 {
00231     [[gsl::suppress(con)]]
00232     {
00233     static_cast<ProgressRing*>(this)->SetValue(s_IsIndeterminateProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00234     }
00235 }
00236
00237 bool ProgressRingProperties::IsIndeterminate()
00238 {
00239     return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_IsIndeterminateProperty));
00240 }
00241
00242 void ProgressRingProperties::Maximum(double value)
00243 {
00244     [[gsl::suppress(con)]]
00245     {
00246     static_cast<ProgressRing*>(this)->SetValue(s_MaximumProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00247     }
00248 }
00249
00250 double ProgressRingProperties::Maximum()
00251 {
00252     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_MaximumProperty));
00253 }
00254
00255 void ProgressRingProperties::Minimum(double value)
00256 {
00257     [[gsl::suppress(con)]]
00258     {
00259     static_cast<ProgressRing*>(this)->SetValue(s_MinimumProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00260     }
00261 }
00262
00263 double ProgressRingProperties::Minimum()
00264 {
00265     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_MinimumProperty));
00266 }
00267
00268 void ProgressRingProperties::TemplateSettings(winrt::ProgressRingTemplateSettings const& value)
00269 {
00270     [[gsl::suppress(con)]]
00271     {
00272     static_cast<ProgressRing*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::ProgressRingTemplateSettings>::BoxValueIfNecessary(value));
00273     }
00274 }
00275
00276 winrt::ProgressRingTemplateSettings ProgressRingProperties::TemplateSettings()
00277 {
00278     return ValueHelper<winrt::ProgressRingTemplateSettings>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_TemplateSettingsProperty));
00279 }
00280
00281 void ProgressRingProperties::Value(double value)
00282 {
00283     [[gsl::suppress(con)]]
00284     {
00285     static_cast<ProgressRing*>(this)->SetValue(s_ValueProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00286     }
00287 }
00288
00289 double ProgressRingProperties::Value()
00290 {
00291     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRing*>(this)->GetValue(s_ValueProperty));
00292 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IKeyIndexMapping Member List

This is the complete list of members for IKeyIndexMapping, including all inherited members.
IndexFromKey(String key) | IKeyIndexMapping
KeyFromIndex(Int32 index) | IKeyIndexMapping
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

NavigationViewTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class NavigationViewTemplateSettingsProperties
00008 {
00009 public:
00010     NavigationViewTemplateSettingsProperties();
00011
00012     void BackButtonVisibility(winrt::Visibility const& value);
00013     winrt::Visibility BackButtonVisibility();
00014
00015     void LeftPaneVisibility(winrt::Visibility const& value);
00016     winrt::Visibility LeftPaneVisibility();
00017
00018     void OpenPaneLength(double value);
00019     double OpenPaneLength();
00020
00021     void OverflowButtonVisibility(winrt::Visibility const& value);
00022     winrt::Visibility OverflowButtonVisibility();
00023
00024     void PaneToggleButtonVisibility(winrt::Visibility const& value);
00025     winrt::Visibility PaneToggleButtonVisibility();
00026
00027     void PaneToggleButtonWidth(double value);
00028     double PaneToggleButtonWidth();
00029
00030     void SingleSelectionFollowsFocus(bool value);
00031     bool SingleSelectionFollowsFocus();
00032
00033     void SmallerPaneToggleButtonWidth(double value);
00034     double SmallerPaneToggleButtonWidth();
00035
00036     void TopPadding(double value);
00037     double TopPadding();
00038
00039     void TopPaneVisibility(winrt::Visibility const& value);
00040     winrt::Visibility TopPaneVisibility();
00041
00042     static winrt::DependencyProperty BackButtonVisibilityProperty() { return s_BackButtonVisibilityProperty; }
00043     static winrt::DependencyProperty LeftPaneVisibilityProperty() { return s_LeftPaneVisibilityProperty; }
00044     static winrt::DependencyProperty OpenPaneLengthProperty() { return s_OpenPaneLengthProperty; }
00045     static winrt::DependencyProperty OverflowButtonVisibilityProperty() { return s_OverflowButtonVisibilityProperty; }
00046     static winrt::DependencyProperty PaneToggleButtonVisibilityProperty() { return s_PaneToggleButtonVisibilityProperty; }
00047     static winrt::DependencyProperty PaneToggleButtonWidthProperty() { return s_PaneToggleButtonWidthProperty; }
00048     static winrt::DependencyProperty SingleSelectionFollowsFocusProperty() { return s_SingleSelectionFollowsFocusProperty; }
00049     static winrt::DependencyProperty SmallerPaneToggleButtonWidthProperty() { return s_SmallerPaneToggleButtonWidthProperty; }
00050     static winrt::DependencyProperty TopPaddingProperty() { return s_TopPaddingProperty; }
00051     static winrt::DependencyProperty TopPaneVisibilityProperty() { return s_TopPaneVisibilityProperty; }
00052
00053     static GlobalDependencyProperty s_BackButtonVisibilityProperty;
00054     static GlobalDependencyProperty s_LeftPaneVisibilityProperty;
00055     static GlobalDependencyProperty s_OpenPaneLengthProperty;
00056     static GlobalDependencyProperty s_OverflowButtonVisibilityProperty;
00057     static GlobalDependencyProperty s_PaneToggleButtonVisibilityProperty;
00058     static GlobalDependencyProperty s_PaneToggleButtonWidthProperty;
00059     static GlobalDependencyProperty s_SingleSelectionFollowsFocusProperty;
00060     static GlobalDependencyProperty s_SmallerPaneToggleButtonWidthProperty;
00061     static GlobalDependencyProperty s_TopPaddingProperty;
00062     static GlobalDependencyProperty s_TopPaneVisibilityProperty;
00063
00064     static void EnsureProperties();
00065     static void ClearProperties();
00066 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.idl Source File

  • File List
  • File Members
  • MonochromaticOverlayPresenter

MonochromaticOverlayPresenter.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XCP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00007 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00008 unsealed runtimeclass MonochromaticOverlayPresenter : Microsoft.UI.Xaml.Controls.Grid
00009 {
00010     MonochromaticOverlayPresenter();
00011
00012     Microsoft.UI.Xaml.UIElement SourceElement { get; set; };
00013     Windows.UI.Color ReplacementColor { get; set; };
00014
00015     static Microsoft.UI.Xaml.DependencyProperty SourceElementProperty { get; };
00016     static Microsoft.UI.Xaml.DependencyProperty ReplacementColorProperty{ get; };
00017 }
00018
00019 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksFactory.h Source File

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooksFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "MUXControlsTestHooks.h"
00007
00008 #include "MUXControlsTestHooks.properties.cpp"
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarStencilButton Member List

This is the complete list of members for InkToolBarStencilButton, including all inherited members.
ClearProperties() | InkToolBarStencilButtonProperties | [static]
EnsureProperties() | InkToolBarStencilButtonProperties | [static]
InkToolBarStencilButtonProperties() | InkToolBarStencilButtonProperties |
IsProtractorItemVisible() | InkToolBarStencilButton | [inline]
IsProtractorItemVisible(bool value) | InkToolBarStencilButton | [inline]
IsProtractorItemVisibleProperty() | InkToolBarStencilButtonProperties | [inline, static]
IsRulerItemVisible() | InkToolBarStencilButton | [inline]
IsRulerItemVisible(bool value) | InkToolBarStencilButton | [inline]
IsRulerItemVisibleProperty() | InkToolBarStencilButtonProperties | [inline, static]
Protractor() | InkToolBarStencilButton | [inline]
InkToolBarStencilButtonProperties::Protractor(winrt::InkPresenterProtractor const &value) | InkToolBarStencilButtonProperties |
ProtractorProperty() | InkToolBarStencilButtonProperties | [inline, static]
Ruler() | InkToolBarStencilButton | [inline]
InkToolBarStencilButtonProperties::Ruler(winrt::InkPresenterRuler const &value) | InkToolBarStencilButtonProperties |
RulerProperty() | InkToolBarStencilButtonProperties | [inline, static]
s_IsProtractorItemVisibleProperty | InkToolBarStencilButtonProperties | [static]
s_IsRulerItemVisibleProperty | InkToolBarStencilButtonProperties | [static]
s_ProtractorProperty | InkToolBarStencilButtonProperties | [static]
s_RulerProperty | InkToolBarStencilButtonProperties | [static]
s_SelectedStencilProperty | InkToolBarStencilButtonProperties | [static]
SelectedStencil() | InkToolBarStencilButton | [inline]
SelectedStencil(winrt::InkToolBarStencilKind value) | InkToolBarStencilButton | [inline]
InkToolBarStencilButtonProperties::SelectedStencil(winrt::InkToolBarStencilKind const &value) | InkToolBarStencilButtonProperties |
SelectedStencilProperty() | InkToolBarStencilButtonProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.idl Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedSettingsVisualSource.idl

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedSettingsVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedSettingsVisualSource.json (28705 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 namespace MU_XCAV_NAMESPACE
00022 {
00023     [MUX_PUBLIC]
00024     [webhosthidden]
00025     runtimeclass AnimatedSettingsVisualSource
00026         : [default] Microsoft.UI.Xaml.Controls.IAnimatedVisualSource, Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
00027     {
00028         AnimatedSettingsVisualSource();
00029     };
00030 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/AnnotatedScrollBarIScrollControllerPage.xaml.cs Source File

  • File List
  • File Members
  • AnnotatedScrollBar
  • TestUI

AnnotatedScrollBarIScrollControllerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Windows.Input;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Markup;
00012 using Microsoft.UI.Xaml.Media;
00013 using Windows.UI;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public sealed partial class AnnotatedScrollBarIScrollControllerPage : TestPage
00018     {
00019         public ObservableCollection<Square> SquareCollection = new ObservableCollection<Square>();
00020         public ObservableCollection<AnnotatedScrollBarLabel> LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>();
00021
00022         private const int c_SquareWidth = 100;
00023
00024         public AnnotatedScrollBarIScrollControllerPage()
00025         {
00026             this.InitializeComponent();
00027             PopulateSquares(200);
00028         }
00029
00030         ~AnnotatedScrollBarIScrollControllerPage()
00031         {
00032         }
00033
00034         private void PageContentRepeater_Loaded(object sender, object e)
00035         {
00036             PopulateLabels();
00037         }
00038
00039         private void AnnotatedScrollBarPage_Loaded(object sender, RoutedEventArgs e)
00040         {
00041             pageContentRepeater.ItemsSource = SquareCollection;
00042             pageContentRepeater.Loaded  += PageContentRepeater_Loaded;
00043
00044            ScrollPresenter scrollPresenter = pageScrollView.GetValue(ScrollView.ScrollPresenterProperty) as ScrollPresenter;
00045             scrollPresenter.VerticalScrollController = pageAnnotatedScrollbar as IScrollController;
00046
00047             pageAnnotatedScrollbar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequested;
00048             pageAnnotatedScrollbar.Scrolling += PageAnnotatedScrollbar_Scrolling;
00049         }
00050
00051         private void PageAnnotatedScrollbar_Scrolling(AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args)
00052         {
00053             var test = args.ScrollOffset;
00054         }
00055
00056         private void PopulateSquares(int rows)
00057         {
00058             for (int i = 0; i < rows; i++)
00059             {
00060                 string squareName = "Item: " + i;
00061                 // double itemWidth = (i % 2 == 0) ? c_SquareWidth : c_SquareWidth;
00062                 SquareCollection.Add(new Square() { Name = squareName, Color = GetSquareColor(i), Width = c_SquareWidth });
00063             }
00064         }
00065
00066         private string GetSquareColor(int squareNum)
00067         {
00068             if (squareNum <= 30)
00069             {
00070                 return "Violet";
00071             }
00072             else if (squareNum <= 80)
00073             {
00074                 return "LightBlue";
00075             }
00076             else if (squareNum <= 190)
00077             {
00078                 return "Green";
00079             }
00080             else
00081             {
00082                 return "Red";
00083             }
00084         }
00085
00086         private string GetOffsetLabel(double offset)
00087         {
00088             if (offset <= GetOffsetOfItem(30))
00089             {
00090                 return GetSquareColor(30);
00091             }
00092             else if (offset <= GetOffsetOfItem(80))
00093             {
00094                 return GetSquareColor(80);
00095             }
00096             else if (offset <= GetOffsetOfItem(190))
00097             {
00098                 return GetSquareColor(190);
00099             }
00100             else
00101             {
00102                 return GetSquareColor(191);
00103             }
00104         }
00105
00106         private double MOCK_GetStaticRowHeight()
00107         {
00108             return 140;
00109         }
00110
00111         private double MOCK_GetItemsPerRow()
00112         {
00113             if(pageScrollView != null)
00114             {
00115                 var totalItemWidth = c_SquareWidth + 20*2 /*margin*/;
00116                 var itemsPerRow = pageScrollView.ActualWidth / totalItemWidth;
00117                 return (int)itemsPerRow;
00118             }
00119             return 5;
00120         }
00121
00122         private double GetOffsetOfItem(int itemNumber)
00123         {
00124             return MOCK_GetStaticRowHeight() * itemNumber / MOCK_GetItemsPerRow();
00125         }
00126
00127         private void PopulateLabels()
00128         {
00129             pageAnnotatedScrollbar.Labels.Clear();
00130
00131             pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Violet", GetOffsetOfItem(0)));
00132             pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Blue", GetOffsetOfItem(30)));
00133             pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Green", GetOffsetOfItem(80)));
00134             pageAnnotatedScrollbar.Labels.Add(new AnnotatedScrollBarLabel("Red", GetOffsetOfItem(190)));
00135         }
00136
00137         public void AnnotatedScrollBar_DetailLabelRequested(object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)
00138         {
00139             args.Content = GetOffsetLabel(args.ScrollOffset);
00140         }
00141     }
00142 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NewWindowRootPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

NewWindowRootPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     public sealed partial class NewWindowRootPage : TestPage
00009     {
00010         public NewWindowRootPage()
00011         {
00012             this.InitializeComponent();
00013         }
00014     }
00015 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< RoutedEventType::DragLeave > Member List

This is the complete list of members for RoutedEventTraits< RoutedEventType::DragLeave >, including all inherited members.
Event() RoutedEventTraits< RoutedEventType::DragLeave > [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealPage Member List

This is the complete list of members for RevealPage, including all inherited members.
RevealPage() RevealPage [inline]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterMousePanningPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterMousePanningPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Numerics;
00006 using Windows.Foundation;
00007 using Microsoft.UI.Input;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Input;
00011
00012 namespace MUXControlsTestApp
00013 {
00014     public sealed partial class ScrollPresenterMousePanningPage : TestPage
00015     {
00016         private bool _isMiddleButtonPressed = false;
00017         private bool _isInConstantVelocityPan = false;
00018         private Point _preConstantVelocityPanPosition;
00019         private bool _isInMousePan = false;
00020         private Point _preMousePanPosition;
00021         private double _preMousePanHorizontalOffset = 0.0;
00022         private double _preMousePanVerticalOffset = 0.0;
00023
00024         public ScrollPresenterMousePanningPage()
00025         {
00026             InitializeComponent();
00027
00028             btnClearEvents.Click += BtnClearEvents_Click;
00029             scrollPresenter.AddHandler(UIElement.PointerPressedEvent, new PointerEventHandler(ScrollPresenter_PointerPressed), true);
00030             scrollPresenter.AddHandler(UIElement.PointerReleasedEvent, new PointerEventHandler(ScrollPresenter_PointerReleased), true);
00031             scrollPresenter.AddHandler(UIElement.PointerMovedEvent, new PointerEventHandler(ScrollPresenter_PointerMoved), true);
00032             scrollPresenter.AddHandler(UIElement.PointerCanceledEvent, new PointerEventHandler(ScrollPresenter_PointerCanceled), true);
00033             scrollPresenter.AddHandler(UIElement.PointerCaptureLostEvent, new PointerEventHandler(ScrollPresenter_PointerCaptureLost), true);
00034         }
00035
00036         private void ScrollPresenter_PointerPressed(object sender, PointerRoutedEventArgs e)
00037         {
00038             if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse &&
00039                 e.KeyModifiers == Windows.System.VirtualKeyModifiers.None)
00040             {
00041                 if (_isMiddleButtonPressed || _isInConstantVelocityPan)
00042                 {
00043                     (sender as UIElement).ReleasePointerCapture(e.Pointer);
00044                     StopConstantVelocityPan();
00045                     return;
00046                 }
00047
00048                 if (!e.Handled)
00049                 {
00050                     PointerPointProperties ppp = e.GetCurrentPoint(null).Properties;
00051                     Point position = e.GetCurrentPoint(scrollPresenter).Position;
00052
00053                     if (ppp.IsLeftButtonPressed)
00054                     {
00055                         if (e.OriginalSource == rect)
00056                         {
00057                             // 'rect' element is meant to be dragged with the mouse using its
00058                             // left button, so do not initiate a mouse pan.
00059                             return;
00060                         }
00061
00062                         if ((sender as UIElement).CapturePointer(e.Pointer))
00063                         {
00064                             Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
00065                                 Windows.UI.Core.CoreCursorType.Hand, 0);
00066                             _isInMousePan = true;
00067                             _preMousePanPosition = position;
00068                             _preMousePanHorizontalOffset = scrollPresenter.HorizontalOffset;
00069                             _preMousePanVerticalOffset = scrollPresenter.VerticalOffset;
00070                             LogEvent("Pointer capture initiated @ position " + _preMousePanPosition.ToString());
00071                         }
00072                         else
00073                         {
00074                             LogEvent("Pointer capture failed");
00075                         }
00076                     }
00077                     else if (ppp.IsMiddleButtonPressed)
00078                     {
00079                         if ((sender as UIElement).CapturePointer(e.Pointer))
00080                         {
00081                             Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
00082                                 Windows.UI.Core.CoreCursorType.SizeAll, 0);
00083                             _isMiddleButtonPressed = true;
00084                             _preConstantVelocityPanPosition = position;
00085                             fiConstantVelocityPanCenter.Visibility = Visibility.Visible;
00086                             fiConstantVelocityPanCenter.Margin = new Thickness(
00087                                 position.X - 6,
00088                                 position.Y - 6,
00089                                 4, 4);
00090                             LogEvent("Middle button pressed @ position " + _preConstantVelocityPanPosition.ToString());
00091                         }
00092                         else
00093                         {
00094                             LogEvent("Pointer capture failed");
00095                         }
00096                     }
00097                 }
00098             }
00099         }
00100
00101         private void ScrollPresenter_PointerReleased(object sender, PointerRoutedEventArgs e)
00102         {
00103             if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse)
00104             {
00105                 PointerPointProperties ppp = e.GetCurrentPoint(null).Properties;
00106                 Point position = e.GetCurrentPoint(scrollPresenter).Position;
00107
00108                 if (_isInMousePan && !ppp.IsLeftButtonPressed)
00109                 {
00110                     (sender as UIElement).ReleasePointerCapture(e.Pointer);
00111                     StopMousePan();
00112                     LogEvent("Pointer capture released @ position " + position.ToString());
00113                 }
00114                 else if (_isMiddleButtonPressed && !ppp.IsMiddleButtonPressed)
00115                 {
00116                     _isMiddleButtonPressed = false;
00117                     LogEvent("Middle button released @ position " + position.ToString());
00118                     if (Math.Abs(position.X - _preConstantVelocityPanPosition.X) >= 4.0 ||
00119                         Math.Abs(position.Y - _preConstantVelocityPanPosition.Y) >= 4.0)
00120                     {
00121                         if (_isInConstantVelocityPan)
00122                         {
00123                             (sender as UIElement).ReleasePointerCapture(e.Pointer);
00124                             StopConstantVelocityPan();
00125                         }
00126                     }
00127                     else if (!_isInConstantVelocityPan)
00128                     {
00129                         // Unfortunately mouse capture is automatically lost and apparently cannot
00130                         // be regained. Xaml framework should allow retention of mouse capture
00131                         // beyond the PointerReleased event to correctly support middle-button-based panning.
00132                         StartConstantVelocityPan();
00133                     }
00134                 }
00135             }
00136         }
00137
00138         private void ScrollPresenter_PointerMoved(object sender, PointerRoutedEventArgs e)
00139         {
00140             if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse)
00141             {
00142                 Point position = e.GetCurrentPoint(scrollPresenter).Position;
00143
00144                 if (_isInMousePan)
00145                 {
00146                     scrollPresenter.ScrollTo(
00147                         _preMousePanPosition.X - position.X + _preMousePanHorizontalOffset,
00148                         _preMousePanPosition.Y - position.Y + _preMousePanVerticalOffset,
00149                         new ScrollingScrollOptions(ScrollingAnimationMode.Disabled));
00150                 }
00151                 else
00152                 {
00153                     if (_isMiddleButtonPressed)
00154                     {
00155                         if (Math.Abs(position.X - _preConstantVelocityPanPosition.X) >= 4.0 ||
00156                             Math.Abs(position.Y - _preConstantVelocityPanPosition.Y) >= 4.0)
00157                         {
00158                             if (!_isInConstantVelocityPan)
00159                             {
00160                                 LogEvent("Pointer with pressed middle button moved to position " + position.ToString());
00161                                 StartConstantVelocityPan();
00162                             }
00163                         }
00164                     }
00165
00166                     if (_isInConstantVelocityPan)
00167                     {
00168                         Vector2 offsetsVelocity = new Vector2(
00169                             (float)(position.X - _preConstantVelocityPanPosition.X) / 2.0f,
00170                             (float)(position.Y - _preConstantVelocityPanPosition.Y) / 2.0f);
00171
00172                         scrollPresenter.AddScrollVelocity(offsetsVelocity, inertiaDecayRate: Vector2.Zero);
00173                     }
00174                 }
00175             }
00176         }
00177
00178         private void ScrollPresenter_PointerCanceled(object sender, PointerRoutedEventArgs e)
00179         {
00180             LogEvent("Pointer canceled - id " + e.Pointer.PointerId);
00181             if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse)
00182             {
00183                 if (_isInMousePan)
00184                 {
00185                     StopMousePan();
00186                 }
00187                 else if (_isMiddleButtonPressed || _isInConstantVelocityPan)
00188                 {
00189                     StopConstantVelocityPan();
00190                 }
00191             }
00192         }
00193
00194         private void ScrollPresenter_PointerCaptureLost(object sender, PointerRoutedEventArgs e)
00195         {
00196             LogEvent("Pointer capture lost - id " + e.Pointer.PointerId);
00197         }
00198
00199         private void StopMousePan()
00200         {
00201             Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
00202                 Windows.UI.Core.CoreCursorType.Arrow, 0);
00203             _isInMousePan = false;
00204             _preMousePanHorizontalOffset = 0.0;
00205             _preMousePanVerticalOffset = 0.0;
00206         }
00207
00208         private void StartConstantVelocityPan()
00209         {
00210             _isInConstantVelocityPan = true;
00211             LogEvent("Constant velocity pan started");
00212         }
00213
00214         private void StopConstantVelocityPan()
00215         {
00216             Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerCursor = new Windows.UI.Core.CoreCursor(
00217                 Windows.UI.Core.CoreCursorType.Arrow, 0);
00218             _isInConstantVelocityPan = false;
00219             _isMiddleButtonPressed = false;
00220             fiConstantVelocityPanCenter.Visibility = Visibility.Collapsed;
00221             scrollPresenter.ScrollBy(0, 0);
00222             LogEvent("Constant velocity pan stopped");
00223         }
00224
00225         private void BtnClearEvents_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
00226         {
00227             lstEvents.Items.Clear();
00228         }
00229
00230         private void LogEvent(string log)
00231         {
00232             lstEvents.Items.Insert(0, log);
00233         }
00234     }
00235 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/ToggleAnimatedIconHost.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • TestUI

ToggleAnimatedIconHost.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Private.Controls;
00002 using Microsoft.UI.Xaml.Controls;
00003 using System;
00004 using System.Collections.Generic;
00005 using System.Linq;
00006 using System.Runtime.InteropServices.WindowsRuntime;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Data;
00010 using Microsoft.UI.Xaml.Documents;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Media;
00013 using IconSource = Microsoft.UI.Xaml.Controls.IconSource;
00014
00015 // The Templated Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234235
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed class ToggleAnimatedIconHost : CheckBox
00020     {
00021         Border m_iconPresenter;
00022         TextBlock m_transitionTextBlock;
00023
00024         public static readonly DependencyProperty IconSourceProperty = DependencyProperty.Register(
00025           "IconSource",
00026           typeof(IconSource),
00027           typeof(AnimatedIconHost),
00028           new PropertyMetadata(null, new PropertyChangedCallback(OnIconSourceChanged))
00029         );
00030
00031         public IconSource IconSource
00032         {
00033             get { return (IconSource)GetValue(IconSourceProperty); }
00034             set { SetValue(IconSourceProperty, value); }
00035         }
00036
00037         private static void OnIconSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
00038         {
00039             ((ToggleAnimatedIconHost)d).IconSourceChanged();
00040         }
00041
00042         public String Title
00043         {
00044             get { return (String)GetValue(TitleProperty); }
00045             set { SetValue(TitleProperty, value); }
00046         }
00047
00048         public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(
00049           "Title",
00050           typeof(String),
00051           typeof(ToggleAnimatedIconHost),
00052           null
00053         );
00054
00055         public ToggleAnimatedIconHost()
00056         {
00057             this.DefaultStyleKey = typeof(AnimatedIconHost);
00058             AnimatedIconTestHooks.LastAnimationSegmentChanged += AnimatedIconTestHooks_LastAnimationSegmentChanged;
00059         }
00060
00061         private void AnimatedIconTestHooks_LastAnimationSegmentChanged(AnimatedIcon sender, object args)
00062         {
00063             if (sender == GetAnimatedIcon())
00064             {
00065                 m_transitionTextBlock.Text = AnimatedIconTestHooks.GetLastAnimationSegment(sender);
00066             }
00067         }
00068
00069         public AnimatedIcon GetAnimatedIcon()
00070         {
00071             return m_iconPresenter.Child as AnimatedIcon;
00072         }
00073
00074         override protected void OnApplyTemplate()
00075         {
00076             m_iconPresenter = (Border)GetTemplateChild("Icon");
00077             m_transitionTextBlock = (TextBlock)GetTemplateChild("TransitionTextBlock");
00078
00079             IconSourceChanged();
00080         }
00081
00082         private void IconSourceChanged()
00083         {
00084             if (m_iconPresenter != null)
00085             {
00086                 AnimatedIcon animatedIcon = new AnimatedIcon();
00087                 AnimatedIconSource source = (AnimatedIconSource)IconSource;
00088                 if (source.Source != null)
00089                 {
00090                     animatedIcon.Source = source.Source;
00091                 }
00092                 if (source.FallbackIconSource != null)
00093                 {
00094                     animatedIcon.FallbackIconSource = source.FallbackIconSource;
00095                 }
00096                 if (source.Foreground != null)
00097                 {
00098                     animatedIcon.Foreground = source.Foreground;
00099                 }
00100                 m_iconPresenter.Child = animatedIcon;
00101             }
00102         }
00103     }
00104 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyout.idl Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyout.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [contentproperty("PrimaryCommands")]
00007 unsealed runtimeclass CommandBarFlyout : Microsoft.UI.Xaml.Controls.Primitives.FlyoutBase
00008 {
00009     CommandBarFlyout();
00010
00011     [MUX_PUBLIC_V2]
00012     {
00013         Boolean AlwaysExpanded{ get; set; };
00014     }
00015
00016     Windows.Foundation.Collections.IObservableVector<Microsoft.UI.Xaml.Controls.ICommandBarElement> PrimaryCommands { get; };
00017     Windows.Foundation.Collections.IObservableVector<Microsoft.UI.Xaml.Controls.ICommandBarElement> SecondaryCommands { get; };
00018 };
00019
00020 [MUX_PUBLIC]
00021 [webhosthidden]
00022 unsealed runtimeclass TextCommandBarFlyout : CommandBarFlyout
00023 {
00024     TextCommandBarFlyout();
00025 };
00026
00027 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewsWithSimpleContentsPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollView
  • TestUI

ScrollViewsWithSimpleContentsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Input;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Navigation;
00010
00011 using ScrollingInputKinds = Microsoft.UI.Xaml.Controls.ScrollingInputKinds;
00012 using ScrollPresenter = Microsoft.UI.Xaml.Controls.Primitives.ScrollPresenter;
00013 using ScrollView = Microsoft.UI.Xaml.Controls.ScrollView;
00014 using ScrollingScrollCompletedEventArgs = Microsoft.UI.Xaml.Controls.ScrollingScrollCompletedEventArgs;
00015 using ScrollingZoomCompletedEventArgs = Microsoft.UI.Xaml.Controls.ScrollingZoomCompletedEventArgs;
00016 using ScrollingScrollOptions = Microsoft.UI.Xaml.Controls.ScrollingScrollOptions;
00017 using ScrollingZoomOptions = Microsoft.UI.Xaml.Controls.ScrollingZoomOptions;
00018 using ScrollingAnimationMode = Microsoft.UI.Xaml.Controls.ScrollingAnimationMode;
00019 using ScrollingSnapPointsMode = Microsoft.UI.Xaml.Controls.ScrollingSnapPointsMode;
00020
00021 using ScrollPresenterTestHooks = Microsoft.UI.Private.Controls.ScrollPresenterTestHooks;
00022 using ScrollPresenterViewChangeResult = Microsoft.UI.Private.Controls.ScrollPresenterViewChangeResult;
00023 using ScrollViewTestHooks = Microsoft.UI.Private.Controls.ScrollViewTestHooks;
00024 using MUXControlsTestHooks = Microsoft.UI.Private.Controls.MUXControlsTestHooks;
00025 using MUXControlsTestHooksLoggingMessageEventArgs = Microsoft.UI.Private.Controls.MUXControlsTestHooksLoggingMessageEventArgs;
00026
00027 namespace MUXControlsTestApp
00028 {
00029     public sealed partial class ScrollViewsWithSimpleContentsPage : TestPage
00030     {
00031         private List<string> fullLogs = new List<string>();
00032         private int scrollView52ZoomFactorChangeCorrelationId = -1;
00033
00034         public ScrollViewsWithSimpleContentsPage()
00035         {
00036             this.InitializeComponent();
00037
00038             this.scrollView51.XYFocusKeyboardNavigation = XYFocusKeyboardNavigationMode.Enabled;
00039
00040             Loaded += ScrollViewsWithSimpleContentsPage_Loaded;
00041             KeyDown += ScrollViewsWithSimpleContentsPage_KeyDown;
00042         }
00043
00044         ~ScrollViewsWithSimpleContentsPage()
00045         {
00046         }
00047
00048         protected override void OnNavigatedFrom(NavigationEventArgs e)
00049         {
00050             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00051             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00052
00053             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00054
00055             base.OnNavigatedFrom(e);
00056         }
00057
00058         private void ScrollViewsWithSimpleContentsPage_Loaded(object sender, RoutedEventArgs e)
00059         {
00060             this.scrollView11.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00061             this.scrollView21.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00062             this.scrollView31.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00063             this.scrollView41.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00064             this.scrollView51.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00065             this.scrollView11.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00066             this.scrollView21.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00067             this.scrollView31.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00068             this.scrollView41.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00069             this.scrollView51.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00070             this.scrollView11.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00071             this.scrollView21.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00072             this.scrollView31.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00073             this.scrollView41.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00074             this.scrollView51.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00075             this.scrollView11.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00076             this.scrollView21.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00077             this.scrollView31.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00078             this.scrollView41.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00079             this.scrollView51.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00080
00081             this.scrollView12.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00082             this.scrollView22.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00083             this.scrollView32.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00084             this.scrollView42.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00085             this.scrollView52.ScrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00086             this.scrollView12.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00087             this.scrollView22.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00088             this.scrollView32.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00089             this.scrollView42.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00090             this.scrollView52.ScrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00091             this.scrollView12.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00092             this.scrollView22.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00093             this.scrollView32.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00094             this.scrollView42.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00095             this.scrollView52.ScrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00096             this.scrollView12.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00097             this.scrollView22.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00098             this.scrollView32.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00099             this.scrollView42.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00100             this.scrollView52.ScrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompleted;
00101         }
00102
00103         private void ScrollViewsWithSimpleContentsPage_KeyDown(object sender, KeyRoutedEventArgs e)
00104         {
00105             if (e.Key == Windows.System.VirtualKey.G)
00106             {
00107                 GetFullLog();
00108             }
00109             else if (e.Key == Windows.System.VirtualKey.C)
00110             {
00111                 ClearFullLog();
00112             }
00113         }
00114
00115         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00116         {
00117             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00118                 type: "ScrollPresenter",
00119                 isLoggingInfoLevel: true,
00120                 isLoggingVerboseLevel: true);
00121
00122             MUXControlsTestHooks.SetLoggingLevelForType(
00123                 type: "ScrollPresenter",
00124                 isLoggingInfoLevel: true,
00125                 isLoggingVerboseLevel: true);
00126
00127             if (chkLogScrollViewMessages.IsChecked == false)
00128                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00129         }
00130
00131         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00132         {
00133             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00134                 type: "ScrollPresenter",
00135                 isLoggingInfoLevel: false,
00136                 isLoggingVerboseLevel: false);
00137
00138             MUXControlsTestHooks.SetLoggingLevelForType(
00139                 type: "ScrollPresenter",
00140                 isLoggingInfoLevel: false,
00141                 isLoggingVerboseLevel: false);
00142
00143             if (chkLogScrollViewMessages.IsChecked == false)
00144                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00145         }
00146
00147         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e)
00148         {
00149             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00150                 type: "ScrollView",
00151                 isLoggingInfoLevel: true,
00152                 isLoggingVerboseLevel: true);
00153
00154             MUXControlsTestHooks.SetLoggingLevelForType(
00155                 type: "ScrollView",
00156                 isLoggingInfoLevel: true,
00157                 isLoggingVerboseLevel: true);
00158
00159             if (chkLogScrollPresenterMessages.IsChecked == false)
00160                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00161         }
00162
00163         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e)
00164         {
00165             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00166                 type: "ScrollView",
00167                 isLoggingInfoLevel: false,
00168                 isLoggingVerboseLevel: false);
00169
00170             MUXControlsTestHooks.SetLoggingLevelForType(
00171                 type: "ScrollView",
00172                 isLoggingInfoLevel: false,
00173                 isLoggingVerboseLevel: false);
00174
00175             if (chkLogScrollPresenterMessages.IsChecked == false)
00176                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00177         }
00178
00179         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00180         {
00181             string senderId = "." + sender.Name;
00182             FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
00183             if (parent != null)
00184             {
00185                 senderId = "." + parent.Name + senderId;
00186                 FrameworkElement grandParent = VisualTreeHelper.GetParent(parent) as FrameworkElement;
00187                 if (grandParent != null)
00188                 {
00189                     senderId = grandParent.Name + senderId;
00190                 }
00191             }
00192             this.txtScrollPresenterState.Text = senderId + " " + sender.State.ToString();
00193             this.fullLogs.Add(senderId + " StateChanged S=" + sender.State.ToString());
00194             chkLogUpdated.IsChecked = false;
00195         }
00196
00197         private void ScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
00198         {
00199             string senderId = "." + sender.Name;
00200             FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
00201             if (parent != null)
00202             {
00203                 senderId = parent.Name + senderId;
00204             }
00205             this.txtScrollPresenterHorizontalOffset.Text = sender.HorizontalOffset.ToString();
00206             this.txtScrollPresenterVerticalOffset.Text = sender.VerticalOffset.ToString();
00207             this.txtScrollPresenterZoomFactor.Text = sender.ZoomFactor.ToString();
00208             this.fullLogs.Add(senderId + " ViewChanged H=" + this.txtScrollPresenterHorizontalOffset.Text + ", V=" + this.txtScrollPresenterVerticalOffset.Text + ", ZF=" + this.txtScrollPresenterZoomFactor.Text);
00209             chkLogUpdated.IsChecked = false;
00210         }
00211
00212         private void ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
00213         {
00214             string senderId = "." + sender.Name;
00215             FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
00216             if (parent != null)
00217             {
00218                 senderId = parent.Name + senderId;
00219             }
00220
00221             ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00222
00223             this.fullLogs.Add(senderId + " ScrollCompleted. OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
00224             chkLogUpdated.IsChecked = false;
00225         }
00226
00227         private void ScrollPresenter_ZoomCompleted(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
00228         {
00229             string senderId = "." + sender.Name;
00230             FrameworkElement parent = VisualTreeHelper.GetParent(sender) as FrameworkElement;
00231             if (parent != null)
00232             {
00233                 senderId = parent.Name + senderId;
00234             }
00235
00236             ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);
00237
00238             this.fullLogs.Add(senderId + " ZoomCompleted. ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
00239             chkLogUpdated.IsChecked = false;
00240
00241             if (args.CorrelationId == scrollView52ZoomFactorChangeCorrelationId)
00242             {
00243                 this.txtResetStatus.Text = "Views reset";
00244                 scrollView52ZoomFactorChangeCorrelationId = -1;
00245             }
00246         }
00247
00248         private void CmbShowScrollView_SelectionChanged(object sender, SelectionChangedEventArgs e)
00249         {
00250             if (this.scrollView11 != null)
00251             {
00252                 if (cmbShowScrollView.SelectedIndex == 0)
00253                 {
00254                     this.scrollView11.Visibility = Visibility.Visible;
00255                     this.scrollView21.Visibility = Visibility.Visible;
00256                     this.scrollView31.Visibility = Visibility.Visible;
00257                     this.scrollView41.Visibility = Visibility.Visible;
00258                     this.scrollView51.Visibility = Visibility.Visible;
00259                     this.scrollView12.Visibility = Visibility.Visible;
00260                     this.scrollView22.Visibility = Visibility.Visible;
00261                     this.scrollView32.Visibility = Visibility.Visible;
00262                     this.scrollView42.Visibility = Visibility.Visible;
00263                     this.scrollView52.Visibility = Visibility.Visible;
00264
00265                     this.scrollView11.Width = double.NaN;
00266                     this.scrollView21.Width = double.NaN;
00267                     this.scrollView31.Width = double.NaN;
00268                     this.scrollView41.Width = double.NaN;
00269                     this.scrollView51.Width = double.NaN;
00270                     this.scrollView12.Width = double.NaN;
00271                     this.scrollView22.Width = double.NaN;
00272                     this.scrollView32.Width = double.NaN;
00273                     this.scrollView42.Width = double.NaN;
00274                     this.scrollView52.Width = double.NaN;
00275                     this.scrollView11.Height = double.NaN;
00276                     this.scrollView21.Height = double.NaN;
00277                     this.scrollView31.Height = double.NaN;
00278                     this.scrollView41.Height = double.NaN;
00279                     this.scrollView51.Height = double.NaN;
00280                     this.scrollView12.Height = double.NaN;
00281                     this.scrollView22.Height = double.NaN;
00282                     this.scrollView32.Height = double.NaN;
00283                     this.scrollView42.Height = double.NaN;
00284                     this.scrollView52.Height = double.NaN;
00285
00286                     for (int rowIndex = 2; rowIndex < 4; rowIndex++)
00287                         this.rootGrid.RowDefinitions[rowIndex].Height = new GridLength(1, GridUnitType.Star);
00288
00289                     for (int columnIndex = 0; columnIndex < 5; columnIndex++)
00290                         this.rootGrid.ColumnDefinitions[columnIndex].Width = new GridLength(1, GridUnitType.Star);
00291
00292                     cmbIgnoredInputKinds.IsEnabled = false;
00293                     cmbIgnoredInputKinds.SelectedIndex = 0;
00294                 }
00295                 else
00296                 {
00297                     this.scrollView11.Visibility = Visibility.Collapsed;
00298                     this.scrollView21.Visibility = Visibility.Collapsed;
00299                     this.scrollView31.Visibility = Visibility.Collapsed;
00300                     this.scrollView41.Visibility = Visibility.Collapsed;
00301                     this.scrollView51.Visibility = Visibility.Collapsed;
00302                     this.scrollView12.Visibility = Visibility.Collapsed;
00303                     this.scrollView22.Visibility = Visibility.Collapsed;
00304                     this.scrollView32.Visibility = Visibility.Collapsed;
00305                     this.scrollView42.Visibility = Visibility.Collapsed;
00306                     this.scrollView52.Visibility = Visibility.Collapsed;
00307
00308                     for (int rowIndex = 2; rowIndex < 4; rowIndex++)
00309                         this.rootGrid.RowDefinitions[rowIndex].Height = GridLength.Auto;
00310
00311                     for (int columnIndex = 0; columnIndex < 5; columnIndex++)
00312                         this.rootGrid.ColumnDefinitions[columnIndex].Width = GridLength.Auto;
00313
00314                     cmbIgnoredInputKinds.IsEnabled = true;
00315
00316                     ScrollView scrollView = SelectedScrollView;
00317
00318                     scrollView.Visibility = Visibility.Visible;
00319                     scrollView.Width = 300;
00320                     scrollView.Height = 400;
00321
00322                     txtScrollPresenterHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
00323                     txtScrollPresenterVerticalOffset.Text = scrollView.VerticalOffset.ToString();
00324                     txtScrollPresenterZoomFactor.Text = scrollView.ZoomFactor.ToString();
00325
00326                     switch (scrollView.IgnoredInputKinds)
00327                     {
00328                         case ScrollingInputKinds.None:
00329                             cmbIgnoredInputKinds.SelectedIndex = 1;
00330                             break;
00331                         case ScrollingInputKinds.Touch:
00332                             cmbIgnoredInputKinds.SelectedIndex = 2;
00333                             break;
00334                         case ScrollingInputKinds.Pen:
00335                             cmbIgnoredInputKinds.SelectedIndex = 3;
00336                             break;
00337                         case ScrollingInputKinds.MouseWheel:
00338                             cmbIgnoredInputKinds.SelectedIndex = 4;
00339                             break;
00340                         case ScrollingInputKinds.Keyboard:
00341                             cmbIgnoredInputKinds.SelectedIndex = 5;
00342                             break;
00343                         case ScrollingInputKinds.Gamepad:
00344                             cmbIgnoredInputKinds.SelectedIndex = 6;
00345                             break;
00346                         case ScrollingInputKinds.All:
00347                             cmbIgnoredInputKinds.SelectedIndex = 7;
00348                             break;
00349                         default:
00350                             cmbIgnoredInputKinds.SelectedIndex = 0;
00351                             break;
00352                     }
00353                 }
00354             }
00355         }
00356
00357         private void CmbIgnoredInputKinds_SelectionChanged(object sender, SelectionChangedEventArgs e)
00358         {
00359             ScrollingInputKinds ignoredInputKinds;
00360             ScrollView scrollView = SelectedScrollView;
00361
00362             switch (cmbIgnoredInputKinds.SelectedIndex)
00363             {
00364                 case 0:
00365                     return;
00366                 case 1:
00367                     ignoredInputKinds = ScrollingInputKinds.None;
00368                     break;
00369                 case 2:
00370                     ignoredInputKinds = ScrollingInputKinds.Touch;
00371                     break;
00372                 case 3:
00373                     ignoredInputKinds = ScrollingInputKinds.Pen;
00374                     break;
00375                 case 4:
00376                     ignoredInputKinds = ScrollingInputKinds.MouseWheel;
00377                     break;
00378                 case 5:
00379                     ignoredInputKinds = ScrollingInputKinds.Keyboard;
00380                     break;
00381                 case 6:
00382                     ignoredInputKinds = ScrollingInputKinds.Gamepad;
00383                     break;
00384                 default:
00385                     ignoredInputKinds = ScrollingInputKinds.All;
00386                     break;
00387             }
00388
00389             scrollView.IgnoredInputKinds = ignoredInputKinds;
00390         }
00391
00392         private void btnGetFullLog_Click(object sender, RoutedEventArgs e)
00393         {
00394             GetFullLog();
00395         }
00396
00397         private void btnClearFullLog_Click(object sender, RoutedEventArgs e)
00398         {
00399             ClearFullLog();
00400         }
00401
00402         private void btnResetViews_Click(object sender, RoutedEventArgs e)
00403         {
00404             this.txtResetStatus.Text = "Resetting views ...";
00405             ResetView(this.scrollView11);
00406             ResetView(this.scrollView21);
00407             ResetView(this.scrollView31);
00408             ResetView(this.scrollView41);
00409             ResetView(this.scrollView51);
00410             ResetView(this.scrollView12);
00411             ResetView(this.scrollView22);
00412             ResetView(this.scrollView32);
00413             ResetView(this.scrollView42);
00414             ResetView(this.scrollView52);
00415         }
00416
00417         private void GetFullLog()
00418         {
00419             this.txtResetStatus.Text = "GetFullLog. Populating cmbFullLog...";
00420             chkLogCleared.IsChecked = false;
00421             foreach (string log in this.fullLogs)
00422             {
00423                 this.cmbFullLog.Items.Add(log);
00424             }
00425             chkLogUpdated.IsChecked = true;
00426             this.txtResetStatus.Text = "GetFullLog. Done.";
00427         }
00428
00429         private void ClearFullLog()
00430         {
00431             this.txtResetStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
00432             chkLogUpdated.IsChecked = false;
00433             this.fullLogs.Clear();
00434             this.cmbFullLog.Items.Clear();
00435             chkLogCleared.IsChecked = true;
00436             this.txtResetStatus.Text = "ClearFullLog. Done.";
00437         }
00438
00439         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00440         {
00441             // Cut off the terminating new line.
00442             string msg = args.Message.Substring(0, args.Message.Length - 1);
00443             string senderName = string.Empty;
00444             FrameworkElement fe = sender as FrameworkElement;
00445
00446             if (fe != null)
00447             {
00448                 senderName = "s:" + fe.Name + ", ";
00449             }
00450
00451             fullLogs.Add((args.IsVerboseLevel ? "Verbose: " : "Info: ") + senderName + "m:" + msg);
00452         }
00453
00454         private void ResetView(ScrollView scrollView)
00455         {
00456             ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
00457             string scrollPresenterId = (VisualTreeHelper.GetParent(scrollPresenter) as FrameworkElement).Name + "." + scrollPresenter.Name;
00458
00459             int viewChangeCorrelationId = scrollPresenter.ScrollTo(0.0, 0.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00460             this.fullLogs.Add(scrollPresenterId + " ScrollTo requested. Id=" + viewChangeCorrelationId);
00461
00462             viewChangeCorrelationId = scrollPresenter.ZoomTo(1.0f, System.Numerics.Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00463             this.fullLogs.Add(scrollPresenterId + " ZoomTo requested. Id=" + viewChangeCorrelationId);
00464
00465             chkLogUpdated.IsChecked = false;
00466
00467             if (scrollView == this.scrollView52)
00468                 scrollView52ZoomFactorChangeCorrelationId = viewChangeCorrelationId;
00469         }
00470
00471         private ScrollView SelectedScrollView
00472         {
00473             get
00474             {
00475                 ScrollView scrollView = null;
00476
00477                 switch (cmbShowScrollView.SelectedIndex)
00478                 {
00479                     case 1:
00480                         scrollView = this.scrollView11;
00481                         break;
00482                     case 2:
00483                         scrollView = this.scrollView21;
00484                         break;
00485                     case 3:
00486                         scrollView = this.scrollView31;
00487                         break;
00488                     case 4:
00489                         scrollView = this.scrollView41;
00490                         break;
00491                     case 5:
00492                         scrollView = this.scrollView51;
00493                         break;
00494                     case 6:
00495                         scrollView = this.scrollView12;
00496                         break;
00497                     case 7:
00498                         scrollView = this.scrollView22;
00499                         break;
00500                     case 8:
00501                         scrollView = this.scrollView32;
00502                         break;
00503                     case 9:
00504                         scrollView = this.scrollView42;
00505                         break;
00506                     case 10:
00507                         scrollView = this.scrollView52;
00508                         break;
00509                 }
00510
00511                 return scrollView;
00512             }
00513         }
00514     }
00515 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/AutoSuggestBoxHelper.h Source File

  • File List
  • File Members
  • AutoSuggestBox

AutoSuggestBoxHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "AutoSuggestBoxHelper.g.h"
00006 #include "AutoSuggestBoxHelper.properties.h"
00007
00008 class AutoSuggestBoxHelper
00009     : public winrt::implementation::AutoSuggestBoxHelperT<AutoSuggestBoxHelper>
00010     , public AutoSuggestBoxHelperProperties
00011 {
00012 public:
00013     AutoSuggestBoxHelper();
00014
00015     static void EnsureProperties();
00016     static void ClearProperties();
00017
00018     static winrt::DependencyProperty AutoSuggestEventRevokersProperty() { return s_AutoSuggestEventRevokersProperty; }
00019     static void OnKeepInteriorCornersSquarePropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyPropertyChangedEventArgs& args);
00020
00021     static GlobalDependencyProperty s_AutoSuggestEventRevokersProperty;
00022
00023 private:
00024     static void OnAutoSuggestBoxLoaded(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00025
00026     static void UpdateCornerRadius(const winrt::AutoSuggestBox& autoSuggestBox, bool isPopupOpen);
00027     static bool IsPopupOpenDown(const winrt::AutoSuggestBox& autoSuggestBox);
00028 };
00029
00030 class AutoSuggestEventRevokers
00031     : public winrt::implements<AutoSuggestEventRevokers, winrt::Windows::Foundation::IInspectable>
00032 {
00033 public:
00034     winrt::AutoSuggestBox::Loaded_revoker m_autoSuggestBoxLoadedRevoker;
00035     winrt::Popup::Opened_revoker m_popupOpenedRevoker;
00036     winrt::Popup::Closed_revoker m_popupClosedRevoker;
00037 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IColorSourceEffect Member List

This is the complete list of members for IColorSourceEffect, including all inherited members.
Color([out, retval] Windows.UI.Color *value) | IColorSourceEffect
Color([in] Windows.UI.Color value) | IColorSourceEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/tracker_ref.h Source File

  • File List
  • File Members
  • inc

tracker_ref.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SharedHelpers.h"
00007
00008 struct __declspec(novtable) ITrackerHandleManager
00009 {
00010     virtual ~ITrackerHandleManager() = default;
00011
00012     const ITrackerHandleManager* GetTrackerHandleManager() const
00013     {
00014         return this;
00015     }
00016
00017     //
00018     // ITrackerPtrWrapperManager interface
00019     //
00020
00021     void NewTrackerHandle(::TrackerHandle &handle)  const try
00022     {
00023 #ifdef DBG
00024         MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
00025 #endif
00026         winrt::check_hresult(m_trackerOwnerInnerNoRef->CreateTrackerHandle(&handle));
00027     }
00028     catch (...) {}
00029
00030     void DeleteTrackerHandle(::TrackerHandle handle) const try
00031     {
00032 #ifdef DBG
00033         MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
00034 #endif
00035         winrt::check_hresult(m_trackerOwnerInnerNoRef->DeleteTrackerHandle(handle));
00036     }
00037     catch (...) {}
00038
00039     void SetTrackerValue(::TrackerHandle handle, IUnknown* value) const try
00040     {
00041 #ifdef DBG
00042         MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
00043 #endif
00044         winrt::check_hresult(m_trackerOwnerInnerNoRef->SetTrackerValue(handle, value));
00045     }
00046     catch (...) {}
00047
00048     bool GetTrackerValue(::TrackerHandle handle, _Outptr_result_maybenull_ IUnknown** value) const try
00049     {
00050 #ifdef DBG
00051         MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
00052 #endif
00053         return !!m_trackerOwnerInnerNoRef->TryGetSafeTrackerValue(handle, value);
00054     }
00055     catch (...) { return false; }
00056
00057     bool ShouldFallbackToComPointers() const
00058     {
00059         // If we are running on an older OS then we need to fall back to simple AddRef/Release tracking for tracker_refs
00060         // and we detect this scenario by just checking if we were able to acquire the ITrackerOwner interface.
00061 #ifdef DBG
00062         MUX_ASSERT_NOASSUME(m_wasEnsureCalled);
00063 #endif
00064         return (m_trackerOwnerInnerNoRef == nullptr);
00065     }
00066
00067 #ifdef DBG
00068     void DEBUG_NotifyTrackerActive() const
00069     {
00070         _activeTrackerChildren++;
00071     }
00072
00073     void DEBUG_NotifyTrackerInactive() const
00074     {
00075         MUX_ASSERT(_activeTrackerChildren > 0);
00076         _activeTrackerChildren--;
00077     }
00078
00079     mutable int _activeTrackerChildren{};
00080     bool m_wasEnsureCalled{};
00081 #endif
00082
00083 protected:
00084     ::ITrackerOwner* m_trackerOwnerInnerNoRef{ nullptr };
00085 };
00086
00087 // tracker_ref holds a T but needs to pass an IUnknown* to ITrackerOwner. For winrt::IInspectable-based
00088 // things, those pointer values are the same (winrt::IInspectable *is* an IUnknown*). But when T is a random
00089 // COM implementor, in particular a winrt::implements guy, then T is not an IUnknown* so we need to do a QI
00090 // to find it. But tracker_ref still needs to hold a T, so we have this helper to find an appropriate IUnknown
00091 // to pass down to ITrackerOwner.
00092
00093 template <typename T, typename Enable = void>
00094 struct IUnknownAccessor
00095 {
00096     // NOTE: this returns com_ptr<IUnknown> instead of IUnknown* so the below specialization can return
00097     // a temporary that was QI'd for. This one can just reinterpret.
00098     static com_ptr<IUnknown> const& get(T const& value)
00099     {
00100         // This is known to be an IUnknown already, so reinterpret it
00101         return reinterpret_cast<com_ptr<IUnknown> const&>(value);
00102     }
00103 };
00104
00105 template <typename T>
00106 struct IUnknownAccessor<com_ptr<T>>
00107 {
00108     static com_ptr<IUnknown> get(com_ptr<T> const& value)
00109     {
00110         // com_ptr<T> is not necessarily an IUnknown so QI for it.
00111         if (value)
00112         {
00113             return value.as<IUnknown>();
00114         }
00115
00116         return nullptr;
00117     }
00118 };
00119
00120 enum class TrackerRefFallback
00121 {
00122     None,
00123     FallbackToComPtrBeforeRS4
00124 };
00125
00126 template<typename T, TrackerRefFallback fallback = TrackerRefFallback::None, typename RawStorageT = ::IUnknown*>
00127 class tracker_ref sealed
00128 {
00129     using IUnknownAccessorT = typename IUnknownAccessor<T>;
00130 public:
00131     explicit tracker_ref(const ITrackerHandleManager* owner)
00132     {
00133         SetOwner(owner);
00134     }
00135
00136     explicit tracker_ref(const ITrackerHandleManager* owner, const T& value)
00137     {
00138         SetOwner(owner);
00139         set(value);
00140     }
00141
00142     explicit tracker_ref(nullptr_t)
00143     {
00144         static_assert_false("tracker_ref should only be used in ReferenceRuntimeClass-derived field members and 'this' should be passed for the owner");
00145     }
00146
00147     ~tracker_ref()
00148     {
00149         if (m_owner)
00150         {
00151             if (!ShouldFallbackToComPointers())
00152             {
00153                 if (m_handle)
00154                 {
00155                     MUX_ASSERT(m_owner);
00156                     m_owner->DeleteTrackerHandle(m_handle);
00157                 }
00158             }
00159             else
00160             {
00161                 // In fallback mode, the field actually holds a COM reference so treat it as a T instead of RawStorageT
00162                 // to go through the Release() of the COM reference.
00163                 reinterpret_cast<T&>(m_valueNoRef) = nullptr;
00164             }
00165
00166 #ifdef DBG
00167             m_owner->DEBUG_NotifyTrackerInactive();
00168 #endif
00169         }
00170         else
00171         {
00172             // Despite the guards in the constructor, owner may be null if we are destroying a moved-from tracker_ref.
00173             // Just make sure that m_valueNoRef is null in that case.
00174             MUX_ASSERT(!m_valueNoRef);
00175         }
00176     }
00177
00178     // Move semantics are available for tracker_ref<T> to be used
00179     // carefully so that we don't end up with two tracker_ref instances
00180     // with the same data.
00181     // Move constructor.
00182     tracker_ref(tracker_ref&& other) noexcept
00183         : m_owner(std::move(other.m_owner))
00184         , m_handle(std::move(other.m_handle))
00185         , m_valueNoRef(std::move(other.m_valueNoRef))
00186     {
00187         other.m_owner = nullptr;
00188         other.m_handle = nullptr;
00189         other.m_valueNoRef = nullptr;
00190     }
00191     // Move assignment operator.
00192     tracker_ref& operator=(tracker_ref&& other) noexcept
00193     {
00194         if (this != std::addressof(other))
00195         {
00196             tracker_ref(std::move(other)).Swap(*this);
00197         }
00198         return *this;
00199     }
00200
00201     tracker_ref(const tracker_ref& other)
00202     {
00203         SetOwner(other.m_owner);
00204         set(other.get());
00205     }
00206     tracker_ref& operator=(const tracker_ref& other)
00207     {
00208         if (!m_owner)
00209         {
00210             SetOwner(other.m_owner);
00211         }
00212         else
00213         {
00214             MUX_ASSERT_MSG(m_owner == other.m_owner, "When assigning, tracker_ref needs to either have its owner not set or same owner");
00215         }
00216         set(other.get());
00217         return *this;
00218     }
00219
00220     void Swap(tracker_ref& other)
00221     {
00222         std::swap(m_owner, other.m_owner);
00223         std::swap(m_handle, other.m_handle);
00224         std::swap(m_valueNoRef, other.m_valueNoRef);
00225     }
00226
00227     void set(const T& value)
00228     {
00229         MUX_ASSERT(m_owner);
00230
00231         if (!ShouldFallbackToComPointers())
00232         {
00233             m_valueNoRef = reinterpret_cast<RawStorageT>(winrt::get_abi(value));
00234
00235             // Optimization: only create the handle if value isn't null or,
00236             // if it is, we are already set to a non-null value.
00237             if (!m_handle && value)
00238             {
00239                 m_owner->NewTrackerHandle(m_handle);
00240             }
00241             if (m_handle)
00242             {
00243                 m_owner->SetTrackerValue(m_handle, IUnknownAccessorT::get(value).get());
00244             }
00245         }
00246         else
00247         {
00248             // In fallback mode, the field actually has a reference, treat it as T instead of RawStorageT
00249             // to go through the Release of the old value and AddRef of the new value.
00250             reinterpret_cast<T&>(m_valueNoRef) = value;
00251         }
00252     }
00253
00254     const T& get() const
00255     {
00256 #if DBG
00257         // Do some debug validation to make sure that m_valueNoRef and the GetTrackerValue result don't
00258         // get out of sync. Also if GetTrackerValue returns false it means that the caller should have been
00259         // using safe_get instead because we're being called during finalization and the target already got
00260         // collected.
00261         auto succeeded = false;
00262
00263         if (m_handle)
00264         {
00265             com_ptr<IUnknown> unknown;
00266             succeeded = m_owner->GetTrackerValue(m_handle, unknown.put());
00267             MUX_ASSERT_MSG(succeeded, "GetTrackerValue returned false, should have called safe_get instead?");
00268
00269             // Check if the pointers are identical or, if not, that their IUnknowns QI to the same thing
00270             MUX_ASSERT(
00271                 unknown.as<winrt::IUnknown>() == (reinterpret_cast<const T&>(m_valueNoRef)).as<winrt::IUnknown>());
00272         }
00273 #endif
00274         return reinterpret_cast<const T &>(m_valueNoRef);
00275     }
00276
00277     template<typename V = T>
00278     V safe_get(bool useSafeGet = true) const
00279     {
00280         if (m_valueNoRef == nullptr)
00281         {
00282             return nullptr;
00283         }
00284         else
00285         {
00286             if (useSafeGet && !ShouldFallbackToComPointers())
00287             {
00288                 com_ptr<IUnknown> unknown;
00289                 if (m_owner->GetTrackerValue(m_handle, unknown.put()))
00290                 {
00291                     auto value = unknown.as<V>();
00292                     return value;
00293                 }
00294
00295                 return nullptr;
00296             }
00297             else
00298             {
00299                 // Always safe to use values in fallback mode or "!useSafeGet".
00300                 // useSafeGet is an optimization for callers who mostly want to use the faster get() version but the
00301                 // call site may be called during the destructor path.
00302                 return get().as<V>();
00303             }
00304         }
00305     }
00306
00307     //
00308     // Helpers
00309     //
00310     explicit operator bool() const
00311     {
00312         return (m_valueNoRef != nullptr);
00313     }
00314
00315     bool operator==(const tracker_ref& rhs) const
00316     {
00317         return get() == rhs.get();
00318     }
00319
00320     bool operator!=(const tracker_ref& rhs) const
00321     {
00322         return !(*this == rhs);
00323     }
00324
00325     bool operator==(const T& rhs) const
00326     {
00327         return get() == rhs;
00328     }
00329
00330     bool operator!=(const T& rhs) const
00331     {
00332         return !(*this == rhs);
00333     }
00334
00335     template <typename U>
00336     U as() const
00337     {
00338         return get().as<U>();
00339     }
00340
00341     template <typename U>
00342     U try_as() const
00343     {
00344         return get().try_as<U>();
00345     }
00346
00347 private:
00348     void SetOwner(const ITrackerHandleManager* owner)
00349     {
00350         m_owner = owner;
00351 #ifdef DBG
00352         MUX_ASSERT(m_owner);
00353         m_owner->DEBUG_NotifyTrackerActive();
00354 #endif
00355     }
00356
00357     bool ShouldFallbackToComPointers() const
00358     {
00359         return m_owner->ShouldFallbackToComPointers();
00360     }
00361
00362 private:
00363     RawStorageT m_valueNoRef{ nullptr };
00364     ::TrackerHandle m_handle{ nullptr };
00365     const ITrackerHandleManager* m_owner{ nullptr };
00366 };
00367
00368 template <typename T>
00369 bool operator<(const tracker_ref<T>& lhs, const tracker_ref<T>& rhs)
00370 {
00371     return lhs.get() < rhs.get();
00372 }
00373
00374 template<typename T>
00375 using tracker_com_ref = tracker_ref<com_ptr<T>, TrackerRefFallback::None, T*>;
00376
00377 // Specialization of tracker_ptr for hstring just so containers don't have to do something special.
00378 // HSTRING doesn't need to be tracked but without this specialization it's hard for something like Vector<T>
00379 // to always use tracker_ref<T> as its storage type.
00380 template<>
00381 struct tracker_ref<winrt::hstring, TrackerRefFallback::None, IUnknown*> : public winrt::hstring
00382 {
00383     explicit tracker_ref(const ITrackerHandleManager* /*owner*/)
00384     {
00385     }
00386
00387     explicit tracker_ref(const ITrackerHandleManager* /*owner*/, const winrt::hstring& value)
00388     {
00389         set(value);
00390     }
00391
00392     void set(const winrt::hstring& value)
00393     {
00394         winrt::hstring::operator=(value);
00395     }
00396
00397     const winrt::hstring& get() const
00398     {
00399         return *this;
00400     }
00401
00402     const winrt::hstring& safe_get(bool) const
00403     {
00404         return *this;
00405     }
00406 };
00407
00408 // Base for containers like event_source.
00409 class ReferenceTrackerContainerBase
00410 {
00411 public:
00412     ReferenceTrackerContainerBase(ITrackerHandleManager* owner)
00413         : m_owner{ owner }
00414     {
00415 #if DBG
00416         m_owner->DEBUG_NotifyTrackerActive();
00417 #endif
00418     }
00419
00420
00421     ~ReferenceTrackerContainerBase()
00422     {
00423 #if DBG
00424         m_owner->DEBUG_NotifyTrackerInactive();
00425 #endif
00426     }
00427
00428     const ITrackerHandleManager* GetTrackerHandleManager() const
00429     {
00430         return m_owner;
00431     }
00432
00433 private:
00434     ITrackerHandleManager* m_owner;
00435 };
00436
00437
00438 template <typename ImplT, typename T>
00439 struct ReferenceTrackerStorageHelper
00440 {
00441     auto wrap(const T& value) const
00442     {
00443         tracker_ref<T> holder{ Impl()->GetTrackerHandleManager() };
00444         holder.set(value);
00445         return holder;
00446     }
00447
00448     T unwrap(const tracker_ref<T>& holder) const
00449     {
00450         return holder.get();
00451     }
00452
00453 private:
00454     const ImplT* Impl() const { return static_cast<const ImplT*>(this); }
00455 };
00456
00457 template <typename T>
00458 struct NonReferenceTrackerStorageHelper
00459 {
00460     auto wrap(const T& value) const
00461     {
00462         return value;
00463     }
00464
00465     T unwrap(const T& value) const
00466     {
00467         return value;
00468     }
00469 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/OrientationBasedMeasures.cpp Source File

  • File List
  • File Members
  • Repeater

OrientationBasedMeasures.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include "OrientationBasedMeasures.h"
00006
00007 float& OrientationBasedMeasures::Major(const winrt::Size &size)
00008 {
00009     return m_orientation == ScrollOrientation::Vertical ? ((winrt::Size&)size).Height : ((winrt::Size&)size).Width;
00010 }
00011
00012 float& OrientationBasedMeasures::Minor(const winrt::Size& size)
00013 {
00014     return m_orientation == ScrollOrientation::Vertical ? ((winrt::Size&)size).Width : ((winrt::Size&)size).Height;
00015 }
00016
00017 float& OrientationBasedMeasures::MajorSize(const winrt::Rect& rect)
00018 {
00019     return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).Height : ((winrt::Rect&)rect).Width;
00020 }
00021
00022 float& OrientationBasedMeasures::MinorSize(const winrt::Rect& rect)
00023 {
00024     return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).Width : ((winrt::Rect&)rect).Height;
00025 }
00026
00027 float& OrientationBasedMeasures::MajorStart(const winrt::Rect& rect)
00028 {
00029     return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).Y : ((winrt::Rect&)rect).X;
00030 }
00031
00032 float OrientationBasedMeasures::MajorEnd(const winrt::Rect& rect) const
00033 {
00034     return m_orientation == ScrollOrientation::Vertical ?
00035         rect.Y + rect.Height : rect.X + rect.Width;
00036 }
00037
00038 float& OrientationBasedMeasures::MinorStart(const winrt::Rect& rect)
00039 {
00040     return m_orientation == ScrollOrientation::Vertical ? ((winrt::Rect&)rect).X : ((winrt::Rect&)rect).Y;
00041 }
00042
00043 float OrientationBasedMeasures::MinorEnd(const winrt::Rect& rect) const
00044 {
00045     return m_orientation == ScrollOrientation::Vertical ?
00046         rect.X + rect.Width : rect.Y + rect.Height;
00047 }
00048
00049 winrt::Rect OrientationBasedMeasures::MinorMajorRect(float minor, float major, float minorSize, float majorSize)
00050 {
00051     return m_orientation == ScrollOrientation::Vertical ?
00052         winrt::Rect{ minor, major, minorSize, majorSize } :
00053         winrt::Rect{ major, minor, majorSize, minorSize };
00054 }
00055
00056 winrt::Point OrientationBasedMeasures::MinorMajorPoint(float minor, float major)
00057 {
00058     return m_orientation == ScrollOrientation::Vertical ?
00059         winrt::Point(minor, major) :
00060         winrt::Point(major, minor);
00061 }
00062
00063 winrt::Size OrientationBasedMeasures::MinorMajorSize(float minor, float major)
00064 {
00065     return m_orientation == ScrollOrientation::Vertical ?
00066         winrt::Size(minor, major) :
00067         winrt::Size(major, minor);
00068 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/XamlAmbientLight.properties.h Source File

  • File List
  • File Members
  • Generated

XamlAmbientLight.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class XamlAmbientLightProperties
00008 {
00009 public:
00010     XamlAmbientLightProperties();
00011
00012     void Color(winrt::Color const& value);
00013     winrt::Color Color();
00014
00015     static void SetIsTarget(winrt::DependencyObject const& target, bool value);
00016     static bool GetIsTarget(winrt::DependencyObject const& target);
00017
00018     static winrt::DependencyProperty ColorProperty() { return s_ColorProperty; }
00019     static winrt::DependencyProperty IsTargetProperty() { return s_IsTargetProperty; }
00020
00021     static GlobalDependencyProperty s_ColorProperty;
00022     static GlobalDependencyProperty s_IsTargetProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026
00027     static void OnColorPropertyChanged(
00028         winrt::DependencyObject const& sender,
00029         winrt::DependencyPropertyChangedEventArgs const& args);
00030 };
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingProperties Member List

This is the complete list of members for ProgressRingProperties, including all inherited members.
ClearProperties() | ProgressRingProperties | [static]
DeterminateSource(winrt::IAnimatedVisualSource const &value) | ProgressRingProperties |
DeterminateSource() | ProgressRingProperties |
DeterminateSourceProperty() | ProgressRingProperties | [inline, static]
EnsureProperties() | ProgressRingProperties | [static]
IndeterminateSource(winrt::IAnimatedVisualSource const &value) | ProgressRingProperties |
IndeterminateSource() | ProgressRingProperties |
IndeterminateSourceProperty() | ProgressRingProperties | [inline, static]
IsActive(bool value) | ProgressRingProperties |
IsActive() | ProgressRingProperties |
IsActiveProperty() | ProgressRingProperties | [inline, static]
IsIndeterminate(bool value) | ProgressRingProperties |
IsIndeterminate() | ProgressRingProperties |
IsIndeterminateProperty() | ProgressRingProperties | [inline, static]
Maximum(double value) | ProgressRingProperties |
Maximum() | ProgressRingProperties |
MaximumProperty() | ProgressRingProperties | [inline, static]
Minimum(double value) | ProgressRingProperties |
Minimum() | ProgressRingProperties |
MinimumProperty() | ProgressRingProperties | [inline, static]
OnDeterminateSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnIndeterminateSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnIsActivePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnIsIndeterminatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnMaximumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnMinimumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
ProgressRingProperties() | ProgressRingProperties |
s_DeterminateSourceProperty | ProgressRingProperties | [static]
s_IndeterminateSourceProperty | ProgressRingProperties | [static]
s_IsActiveProperty | ProgressRingProperties | [static]
s_IsIndeterminateProperty | ProgressRingProperties | [static]
s_MaximumProperty | ProgressRingProperties | [static]
s_MinimumProperty | ProgressRingProperties | [static]
s_TemplateSettingsProperty | ProgressRingProperties | [static]
s_ValueProperty | ProgressRingProperties | [static]
TemplateSettings(winrt::ProgressRingTemplateSettings const &value) | ProgressRingProperties |
TemplateSettings() | ProgressRingProperties |
TemplateSettingsProperty() | ProgressRingProperties | [inline, static]
Value(double value) | ProgressRingProperties |
Value() | ProgressRingProperties |
ValueProperty() | ProgressRingProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockNonVirtualizingLayout Member List

This is the complete list of members for MockNonVirtualizingLayout, including all inherited members.
ArrangeLayoutFunc | MockNonVirtualizingLayout |
ArrangeOverride(NonVirtualizingLayoutContext context, Size finalSize) | MockNonVirtualizingLayout | [inline, protected]
NonVirtualizingLayout::ArrangeOverride(winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &finalSize) | NonVirtualizingLayout | [virtual]
InitializeForContextCore(winrt::LayoutContext const &context) | NonVirtualizingLayout | [virtual]
InvalidateMeasure() | MockNonVirtualizingLayout | [inline]
MeasureLayoutFunc | MockNonVirtualizingLayout |
MeasureOverride(NonVirtualizingLayoutContext context, Size availableSize) | MockNonVirtualizingLayout | [inline, protected]
NonVirtualizingLayout::MeasureOverride(winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &availableSize) | NonVirtualizingLayout | [virtual]
NonVirtualizingLayout() | NonVirtualizingLayout |
UninitializeForContextCore(winrt::LayoutContext const &context) | NonVirtualizingLayout | [virtual]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollPresenterTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollPresenterTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollPresenterTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollPresenterTestHooks)
00012 }
00013
00014 #include "ScrollPresenterTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutCommandBarProperties Member List

This is the complete list of members for CommandBarFlyoutCommandBarProperties, including all inherited members.
ClearProperties() | CommandBarFlyoutCommandBarProperties | [static]
CommandBarFlyoutCommandBarProperties() | CommandBarFlyoutCommandBarProperties |
EnsureProperties() | CommandBarFlyoutCommandBarProperties | [static]
FlyoutTemplateSettings(winrt::CommandBarFlyoutCommandBarTemplateSettings const &value) | CommandBarFlyoutCommandBarProperties |
FlyoutTemplateSettings() | CommandBarFlyoutCommandBarProperties |
FlyoutTemplateSettingsProperty() | CommandBarFlyoutCommandBarProperties | [inline, static]
OnSystemBackdropPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | CommandBarFlyoutCommandBarProperties | [static]
s_FlyoutTemplateSettingsProperty | CommandBarFlyoutCommandBarProperties | [static]
s_SystemBackdropProperty | CommandBarFlyoutCommandBarProperties | [static]
SystemBackdrop(winrt::SystemBackdrop const &value) | CommandBarFlyoutCommandBarProperties |
SystemBackdrop() | CommandBarFlyoutCommandBarProperties |
SystemBackdropProperty() | CommandBarFlyoutCommandBarProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectedItems< T > Member List

This is the complete list of members for SelectedItems< T >, including all inherited members.
abi_enter() | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
CheckThread() | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< SelectedItems< T > > &&self) noexcept | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
final_release(std::unique_ptr< SelectedItems< T > > &&self) | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline, static]
First() | SelectedItems< T > | [inline]
GetAt(uint32_t index) | SelectedItems< T > | [inline]
GetBase() | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
GetInner() | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
GetMany(uint32_t startIndex, winrt::array_view< T > const &values) noexcept | SelectedItems< T > | [inline]
IndexOf(T const &value, uint32_t &index) noexcept | SelectedItems< T > | [inline]
IsOnThread() | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
m_getAtImpl | SelectedItems< T > | [private]
m_infos | SelectedItems< T > | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SelectedItems< T >, reference_tracker_implements_t< winrt::IVectorView< T > >::type, winrt::IIterable< T > > | [inline]
SelectedItems(const std::vector< SelectedItemInfo > &infos, std::function< T(const std::vector< SelectedItemInfo > &infos, unsigned int index)> getAtImpl) | SelectedItems< T > | [inline]
Size() | SelectedItems< T > | [inline]
~SelectedItems() | SelectedItems< T > | [inline]
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSlider.idl Source File

  • File List
  • File Members
  • ColorPicker

ColorPickerSlider.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XCP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass ColorPickerSlider : Microsoft.UI.Xaml.Controls.Slider
00007 {
00008     ColorPickerSlider();
00009
00010     [MUX_DEFAULT_VALUE("winrt::ColorPickerHsvChannel::Value")]
00011     MU_XC_NAMESPACE.ColorPickerHsvChannel ColorChannel { get; set; };
00012
00013     static Microsoft.UI.Xaml.DependencyProperty ColorChannelProperty { get; };
00014 }
00015
00016 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewManagerTests Member List

This is the complete list of members for ViewManagerTests, including all inherited members.
CanChangeFocusAfterUniqueIdReset() | ViewManagerTests | [inline]
CanPinFocusedElements() | ViewManagerTests | [inline]
CanQueryElementFactory() | ViewManagerTests | [inline]
CanReuseElementsDuringUniqueIdReset() | ViewManagerTests | [inline]
CreateLayout(ItemsRepeater repeater) | ViewManagerTests | [inline, private]
CreateRepeater(object dataSource, object elementFactory) | ViewManagerTests | [inline, private]
DefaultWaitTime | ViewManagerTests | [private]
LogRealizedIndices(List< int > realizedItemsIndices, int ticks) | ViewManagerTests | [inline, private]
MoveFocusToIndex(ItemsRepeater repeater, int index) | ViewManagerTests | [inline, private]
SetupRepeater(object dataSource=null, string itemContent=@"<Button Content='{Binding}' Height='100'/>") | ViewManagerTests | [inline, private]
SetupRepeater(object dataSource, VirtualizingLayout layout, out ScrollViewer scrollViewer) | ViewManagerTests | [inline, private]
SetupRepeater(object dataSource, VirtualizingLayout layout, string itemContent, out ScrollViewer scrollViewer) | ViewManagerTests | [inline, private]
StartBringIndexIntoView(ItemsRepeater itemsRepeater, int index) | ViewManagerTests | [inline, private]
ValidateBringIntoViewOperations() | ViewManagerTests | [inline]
ValidateBringIntoViewOperations(double cacheLengths) | ViewManagerTests | [inline, private]
ValidateCurrentFocus(ItemsRepeater repeater, int expectedIndex, string expectedContent) | ViewManagerTests | [inline, private]
ValidateDataContextDoesNotGetOverwritten() | ViewManagerTests | [inline]
ValidateDataContextGetsPropagated() | ViewManagerTests | [inline]
ValidateElementClearingClearsDataContext() | ViewManagerTests | [inline]
ValidateElementClearingOrderFromFlowLayout() | ViewManagerTests | [inline]
ValidateElementEvents() | ViewManagerTests | [inline]
ValidateElementIndexChangedEventOnStableReset() | ViewManagerTests | [inline]
ValidateFocusMoveOnElementCleared() | ViewManagerTests | [inline]
ValidateFocusMoveOnElementClearedWithUniqueIds() | ViewManagerTests | [inline]
ValidateGetElementAtCachingForLayout() | ViewManagerTests | [inline]
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2Page Member List

This is the complete list of members for WebView2Page, including all inherited members.
WebView2Page() WebView2Page [inline]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewNode.h Source File

  • File List
  • File Members
  • TreeView

TreeViewNode.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "Vector.h"
00006
00007 #include "TreeViewNode.g.h"
00008 #include "TreeViewNode.properties.h"
00009
00010 class TreeViewNode :
00011     public ReferenceTracker<TreeViewNode, winrt::implementation::TreeViewNodeT, winrt::Microsoft::UI::Xaml::Data::ICustomPropertyProvider, winrt::Windows::Foundation::IStringable>,
00012     public TreeViewNodeProperties
00013 {
00014 public:
00015
00016     enum class TreeNodeSelectionState
00017     {
00018         UnSelected,
00019         PartialSelected,
00020         Selected
00021     };
00022
00023     TreeViewNode();
00024
00025     winrt::TreeViewNode Parent();
00026     bool HasUnrealizedChildren();
00027     void HasUnrealizedChildren(bool value);
00028     winrt::IVector<winrt::TreeViewNode> Children();
00029     bool IsContentMode();
00030     void IsContentMode(bool value);
00031
00032     void ChildVectorChanged(winrt::IObservableVector<winrt::TreeViewNode> const& sender, winrt::IInspectable const& args);
00033     void OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00034     winrt::event_token AddExpandedChanged(winrt::TypedEventHandler<winrt::TreeViewNode, winrt::DependencyPropertyChangedEventArgs> const& value);
00035     void RemoveExpandedChanged(winrt::event_token);
00036     winrt::event_token ChildrenChanged(winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IVectorChangedEventArgs> const& value);
00037     void ChildrenChanged(winrt::event_token);
00038
00039     winrt::IInspectable ItemsSource();
00040     void ItemsSource(winrt::IInspectable const& value);
00041     TreeNodeSelectionState SelectionState();
00042     void SelectionState(TreeNodeSelectionState const& state);
00043
00044 // Enable "ToString" on TreeViewNode to show stringable data correctly
00045 #pragma region ICustomPropertyProvider
00046     winrt::TypeName Type();
00047     winrt::ICustomProperty GetCustomProperty(hstring const& name);
00048     winrt::ICustomProperty GetIndexedProperty(hstring const& name, winrt::TypeName const& type);
00049     hstring GetStringRepresentation();
00050 #pragma endregion
00051
00052 #pragma region IStringable
00053     hstring ToString();
00054 #pragma endregion
00055
00056 private:
00057     // Variables
00058     winrt::weak_ref<winrt::TreeViewNode> m_parentNode{ nullptr };
00059     event_source<winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IVectorChangedEventArgs>> m_childrenChangedSource{ this };
00060     event_source<winrt::TypedEventHandler<winrt::TreeViewNode, winrt::DependencyPropertyChangedEventArgs>> m_propertyChangedEventSource{ this };
00061     winrt::ItemsSourceView::CollectionChanged_revoker m_itemItemsSourceViewChangedRevoker{};
00062     bool m_HasUnrealizedChildren{ false };
00063     bool m_isExpanded{ false };
00064     tracker_ref<winrt::IVector<winrt::TreeViewNode>> m_children{ this };
00065     tracker_ref<winrt::IInspectable> m_itemsSource{ this };
00066     winrt::ItemsSourceView m_itemsDataSource{ nullptr };
00067     void OnItemsSourceChanged(const winrt::IInspectable& sender, const winrt::NotifyCollectionChangedEventArgs& args);
00068     void SyncChildrenNodesWithItemsSource();
00069     bool AreChildrenNodesEqualToItemsSource();
00070     void AddToChildrenNodes(int index, int count);
00071     void RemoveFromChildrenNodes(int index, int count);
00072     bool m_isContentMode{ false };
00073     TreeNodeSelectionState m_multiSelectionState{ TreeNodeSelectionState::UnSelected };
00074     hstring GetContentAsString();
00075
00076 public:
00077     // Impls and Helpers
00078     winrt::TreeViewNode get_ParentImpl();
00079     void put_ParentImpl(winrt::TreeViewNode const& value);
00080     void UpdateDepth(int depth);
00081     void UpdateHasChildren();
00082     void RaiseChildrenChanged(winrt::CollectionChange CC, unsigned int index);
00083 };
00084
00085 typedef typename VectorOptionsFromFlag<winrt::TreeViewNode, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()> TreeViewNodeVectorOptions;
00086
00087 class TreeViewNodeVector :
00088     public ReferenceTracker<
00089     TreeViewNodeVector,
00090     reference_tracker_implements_t<typename TreeViewNodeVectorOptions::VectorType>::type,
00091     typename TreeViewNodeVectorOptions::IterableType,
00092     typename TreeViewNodeVectorOptions::ObservableVectorType>,
00093     public TreeViewNodeVectorOptions::IVectorOwner
00094 {
00095     Implement_Vector_Read(TreeViewNodeVectorOptions)
00096
00097 private:
00098     winrt::weak_ref<winrt::TreeViewNode> m_parent{ nullptr };
00099
00100 public:
00101
00102     TreeViewNodeVector();
00103     TreeViewNodeVector(unsigned int capacity);
00104
00105     TreeViewNode* Parent();
00106     void SetParent(winrt::TreeViewNode value);
00107     winrt::IBindableVector GetWritableParentItemsSource();
00108
00109     void Append(winrt::TreeViewNode const& item, bool updateItemsSource = true);
00110     void InsertAt(unsigned int index, winrt::TreeViewNode const& item, bool updateItemsSource = true);
00111     void SetAt(unsigned int index, winrt::TreeViewNode const& item, bool updateItemsSource = true);
00112     void RemoveAt(unsigned int index, bool updateItemsSource = true, bool updateIsExpanded = true);
00113     void RemoveAtEnd(bool updateItemsSource = true);
00114     void ReplaceAll(winrt::array_view<winrt::TreeViewNode const> values, bool updateItemsSource = true);
00115     void Clear(bool updateItemsSource = true, bool updateIsExpanded = true);
00116 };
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPictureTests Member List

This is the complete list of members for PersonPictureTests, including all inherited members.
BasicInteractionTest() | PersonPictureTests | [inline]
ClassInitialize(TestContext testContext) | PersonPictureTests | [inline, static]
ControlSizing() | PersonPictureTests | [inline]
DependencyPropertyOrdering() | PersonPictureTests | [inline]
ImageLoading() | PersonPictureTests | [inline]
ScrollPeopleGroupedList() | PersonPictureTests | [inline]
ScrollPeopleList() | PersonPictureTests | [inline]
ScrollPeopleListPrivate(string listViewId) | PersonPictureTests | [inline, private]
TestCleanup() | PersonPictureTests | [inline]
WriteInTextBox(string textBoxName, string s) | PersonPictureTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemPresenterTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

NavigationViewItemPresenterTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class NavigationViewItemPresenterTemplateSettingsProperties
00008 {
00009 public:
00010     NavigationViewItemPresenterTemplateSettingsProperties();
00011
00012     void IconWidth(double value);
00013     double IconWidth();
00014
00015     void SmallerIconWidth(double value);
00016     double SmallerIconWidth();
00017
00018     static winrt::DependencyProperty IconWidthProperty() { return s_IconWidthProperty; }
00019     static winrt::DependencyProperty SmallerIconWidthProperty() { return s_SmallerIconWidthProperty; }
00020
00021     static GlobalDependencyProperty s_IconWidthProperty;
00022     static GlobalDependencyProperty s_SmallerIconWidthProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerTests Member List

This is the complete list of members for ColorPickerTests, including all inherited members.
AlphaLabelAutomationId | ColorPickerTests |
AlphaSliderAutomationId | ColorPickerTests |
AlphaTextBoxAutomationId | ColorPickerTests |
BlueLabelAutomationId | ColorPickerTests |
BlueTextBoxAutomationId | ColorPickerTests |
CanChangeColorThroughHexTextEntry() | ColorPickerTests | [inline]
CanChangeColorThroughHsvTextEntry() | ColorPickerTests | [inline]
CanChangeColorThroughOpacityTextEntry() | ColorPickerTests | [inline]
CanChangeColorThroughRgbTextEntry() | ColorPickerTests | [inline]
CanSelectColorFromSpectrum(ColorPickerTestSetupHelper setup, bool isRTL) | ColorPickerTests | [inline, private]
CanSelectColorFromSpectrumLTR() | ColorPickerTests | [inline]
CanSelectColorFromSpectrumRTL() | ColorPickerTests | [inline]
CanSelectPreviousColor() | ColorPickerTests | [inline]
CanUseKeyboardToInteractColorSpectrumRTL() | ColorPickerTests | [inline]
CanUseKeyboardToInteractSlidersRTL() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithColorSpectrum(bool isRTL) | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithColorSpectrumLTR() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithSliders(bool isRTL, bool shouldTryUpAndDown=false, bool shouldOrientationBeHorizontal=false) | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithSlidersLTR() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithSlidersLTRHorizontalOrientation() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithSlidersRTLHorizontalOrientation() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForAlpha(bool isRTL) | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForAlphaLTR() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForAlphaRTL() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForHex(bool isRTL) | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForHexLTR() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForHexRTL() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForHSV(bool isRTL) | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForHSVLTR() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForHSVRTL() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForRGB(bool isRTL) | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForRGBLTR() | ColorPickerTests | [inline]
CanUseKeyboardToInteractWithTextBoxesForRGBRTL() | ColorPickerTests | [inline]
ClassInitialize(TestContext testContext) | ColorPickerTests | [inline, static]
ColorRepresentationComboBoxAutomationId | ColorPickerTests |
ColorSpectrumAutomationId | ColorPickerTests |
GetCurrentlySelectedChannels() | ColorPickerTests | [inline, static]
GetIsRTL() | ColorPickerTests | [inline, private]
GetLocalizedText(IList< string > stringList) | ColorPickerTests | [inline, private]
GreenLabelAutomationId | ColorPickerTests |
GreenTextBoxAutomationId | ColorPickerTests |
HexTextBoxAutomationId | ColorPickerTests |
HSVComboBoxItemAutomationId | ColorPickerTests |
HueLabelAutomationId | ColorPickerTests |
HueTextBoxAutomationId | ColorPickerTests |
MoreButtonAutomationId | ColorPickerTests |
MoreButtonLabelAutomationId | ColorPickerTests |
PressKeyAndWaitForColorChange(Key key, ModifierKey modifierKey=ModifierKey.None, uint numPresses=1) | ColorPickerTests | [inline, private]
RedLabelAutomationId | ColorPickerTests |
RedTextBoxAutomationId | ColorPickerTests |
RGBComboBoxItemAutomationId | ColorPickerTests |
SaturationLabelAutomationId | ColorPickerTests |
SaturationTextBoxAutomationId | ColorPickerTests |
SelectionEllipseChangesColorAccordingToSelectedColor() | ColorPickerTests | [inline]
SelectTextBoxes(ColorChannels channels) | ColorPickerTests | [inline, private]
SetColorSpectrumColor(int red, int green, int blue, int alpha=255) | ColorPickerTests | [inline, private]
SetIsAlphaEnabled(bool isAlphaEnabled) | ColorPickerTests | [inline, private]
SetIsHorizontalOrientation(bool shouldBeHorizontal) | ColorPickerTests | [inline, private]
SetIsMoreButtonEnabled(bool isMoreButtonEnabled) | ColorPickerTests | [inline, private]
SetIsRTL(bool isRTL) | ColorPickerTests | [inline, private]
SetMaxSaturation(double maxSaturation) | ColorPickerTests | [inline, private]
SetMaxValue(double maxValue) | ColorPickerTests | [inline, private]
SetMinSaturation(double minSaturation) | ColorPickerTests | [inline, private]
SetMinValue(double minValue) | ColorPickerTests | [inline, private]
SetSaturation(RangeValueSlider saturationSlider, double saturation) | ColorPickerTests | [inline, private]
SetupColorPickerTest(TestOptions options=TestOptions.None) | ColorPickerTests | [inline, private]
SetValue(RangeValueSlider valueSlider, double value) | ColorPickerTests | [inline, private]
TapOnColorSpectrum(double xPercent, double yPercent) | ColorPickerTests | [inline, private]
TapOnColorSpectrumAndWaitForColorChange(double xPercent, double yPercent) | ColorPickerTests | [inline, private]
TestCleanup() | ColorPickerTests | [inline]
TestOptions enum name | ColorPickerTests |
ThirdDimensionAutomationId | ColorPickerTests |
ValidateNoCrashWhenWhenColorSpectrumInvisibleAndColorChanged() | ColorPickerTests | [inline]
ValueLabelAutomationId | ColorPickerTests |
ValueTextBoxAutomationId | ColorPickerTests |
VerifyAutomationNamesAreCorrect() | ColorPickerTests | [inline]
VerifyCanChangeColorWithTouchWithoutPanning() | ColorPickerTests | [inline]
VerifyColorIsSelected(int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255) | ColorPickerTests | [inline, private]
VerifyColorIsSelectedCore(int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha, int allowedMargin) | ColorPickerTests | [inline, private]
VerifyColorNameIsSelected(string expectedName) | ColorPickerTests | [inline, private]
VerifyColorSpectrumAutomationValuesAreCorrect() | ColorPickerTests | [inline]
VerifyElementIsFocused(string expectedFocusedElement) | ColorPickerTests | [inline, private]
VerifyEllipsePositionIsClampedToSpectrumBounds() | ColorPickerTests | [inline]
VerifyHexStringAndColorAreInSync() | ColorPickerTests | [inline]
VerifyHsvUpdatesOnSpectrumSelection() | ColorPickerTests | [inline]
VerifyInvalidTextEntryIsReverted() | ColorPickerTests | [inline]
VerifyMoreButtonRespondsToThemeChanges() | ColorPickerTests | [inline]
VerifyMoreButtonShowsAndHidesTextInputFields() | ColorPickerTests | [inline]
VerifyPreviousColorIsEqualTo(int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255) | ColorPickerTests | [inline, private]
VerifyPreviousColorIsNull() | ColorPickerTests | [inline, private]
VerifySelectedColorIsNear(int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255) | ColorPickerTests | [inline, private]
VerifySelectionEllipseColorIsEqualTo(int expectedRed, int expectedGreen, int expectedBlue, int expectedAlpha=255) | ColorPickerTests | [inline, private]
VerifySelectionEllipseIsNear(double expectedX, double expectedY) | ColorPickerTests | [inline, private]
VerifySelectionEllipsePosition(double expectedX, double expectedY) | ColorPickerTests | [inline, private]
VerifySelectionEllipsePositionCore(double expectedX, double expectedY, double allowedMargin) | ColorPickerTests | [inline, private]
VerifySpectrumTakesFocusOnPointerPress() | ColorPickerTests | [inline]
VerifyStringsAreLocalizedCorrectly() | ColorPickerTests | [inline]
VerifyTabFocusOrder() | ColorPickerTests | [inline]
VerifyThirdDimensionSliderAutomationValuesAreCorrect() | ColorPickerTests | [inline]
WriteInTextBox(string textBoxName, string s) | ColorPickerTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/APITests/ItemsViewTests.cs Source File

  • File List
  • File Members
  • ItemsView
  • APITests

ItemsViewTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Collections.ObjectModel;
00008 using System.Linq;
00009 using System.Threading;
00010 using Microsoft.UI.Private.Controls;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Input;
00013 using Microsoft.UI.Xaml.Markup;
00014 using Microsoft.UI.Xaml.Media;
00015 using MUXControlsTestApp;
00016 using MUXControlsTestApp.Utilities;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021 using Microsoft.UI.Xaml.Automation;
00022 using Microsoft.UI.Xaml.Automation.Provider;
00023 using Microsoft.UI.Xaml.Automation.Peers;
00024
00025 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00026 {
00027     [TestClass]
00028     public class ItemsViewTests : ApiTestBase
00029     {
00030         private const int c_MaxWaitDuration = 5000;
00031
00032         private const double c_defaultUIItemsViewWidth = 200.0;
00033         private const double c_defaultUIItemsViewHeight = 400.0;
00034
00035         public IEnumerable<int> Digits
00036         {
00037             get
00038             {
00039                 return Enumerable.Range(0, 10);
00040             }
00041         }
00042
00043         private enum LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger
00044         {
00045             ItemsRangeStartIndexNegative,
00046             ItemsRangeStartIndexIncreased,
00047             ItemsRangeStartIndexTooSmall,
00048             ArrayLengthSmallerThanItemsRangeRequestedLength,
00049             ArrayLengthTooSmallForDecreasedItemsRangeStartIndex,
00050             ArrayLengthInconsistent
00051         }
00052
00053         [TestMethod]
00054         [TestProperty("Description", "Verifies the ItemsView default property values.")]
00055         public void VerifyDefaultPropertyValues()
00056         {
00057             RunOnUIThread.Execute(() =>
00058             {
00059                 ItemsView itemsView = new ItemsView();
00060                 Verify.IsNotNull(itemsView);
00061
00062                 Log.Comment("Logging ItemsView default property values");
00063                 LogItemsViewProperties(itemsView);
00064
00065                 Log.Comment("Verifying ItemsView default property values");
00066                 Verify.IsNull(itemsView.ItemTemplate);
00067                 Verify.IsNull(itemsView.ItemsSource);
00068                 Verify.IsNull(itemsView.SelectedItem);
00069                 Verify.IsNull(itemsView.Layout);
00070                 Verify.IsTrue(itemsView.IsEnabled);
00071                 Verify.IsTrue(itemsView.IsTabStop);
00072                 Verify.AreEqual(XYFocusKeyboardNavigationMode.Auto, itemsView.XYFocusKeyboardNavigation);
00073                 Verify.AreEqual(KeyboardNavigationMode.Local, itemsView.TabNavigation);
00074                 Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
00075                 Verify.AreEqual(0, itemsView.SelectedItems.Count());
00076                 Verify.AreEqual(-1, itemsView.CurrentItemIndex);
00077             });
00078         }
00079
00080         [TestMethod]
00081         [TestProperty("Description", "Loads an ItemsView, verifies properties and unloads.")]
00082         public void VerifyPropertyValuesAfterTemplateApplication()
00083         {
00084             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
00085             {
00086                 ItemsView itemsView = null;
00087                 Random rnd = new Random();
00088                 List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
00089                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00090                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00091
00092                 RunOnUIThread.Execute(() =>
00093                 {
00094                     itemsView = new ItemsView() { ItemsSource = itemsSource };
00095
00096                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00097                 });
00098
00099                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00100
00101                 RunOnUIThread.Execute(() =>
00102                 {
00103                     Log.Comment("Logging ItemsView property values after Loaded event");
00104                     LogItemsViewProperties(itemsView);
00105
00106                     Log.Comment("Verifying ItemsView property values after Loaded event");
00107                     Verify.IsNotNull(itemsView.ItemTemplate);
00108                     Verify.IsNotNull(itemsView.ItemsSource);
00109                     Verify.IsNull(itemsView.SelectedItem);
00110                     Verify.IsNotNull(itemsView.Layout);
00111                     Verify.IsTrue(itemsView.Layout is StackLayout);
00112                     Verify.IsTrue(itemsView.IsEnabled);
00113                     Verify.IsFalse(itemsView.IsTabStop);
00114                     Verify.AreEqual(XYFocusKeyboardNavigationMode.Disabled, itemsView.XYFocusKeyboardNavigation);
00115                     Verify.AreEqual(KeyboardNavigationMode.Once, itemsView.TabNavigation);
00116                     Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
00117                     Verify.AreEqual(0, itemsView.SelectedItems.Count());
00118                     Verify.AreEqual(-1, itemsView.CurrentItemIndex);
00119
00120                     Verify.AreEqual(c_defaultUIItemsViewWidth, itemsView.ActualWidth);
00121                     Verify.AreEqual(c_defaultUIItemsViewHeight, itemsView.ActualHeight);
00122
00123                     Log.Comment("Verifying ScrollView property values after Loaded event");
00124                     ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
00125
00126                     Verify.IsNotNull(scrollView);
00127                     Verify.AreEqual(c_defaultUIItemsViewWidth, scrollView.ViewportWidth);
00128                     Verify.AreEqual(c_defaultUIItemsViewHeight, scrollView.ViewportHeight);
00129
00130                     Log.Comment("Resetting window content and ItemsView");
00131                     Content = null;
00132                     itemsView = null;
00133                 });
00134
00135                 WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
00136
00137                 IdleSynchronizer.Wait();
00138                 Log.Comment("Garbage collecting...");
00139                 GC.Collect();
00140                 GC.WaitForPendingFinalizers();
00141                 GC.Collect();
00142                 Log.Comment("Done");
00143             }
00144         }
00145
00146         [TestMethod]
00147         [TestProperty("Description", "Loads an ItemsView, sets properties and unloads.")]
00148         public void VerifyPropertySetters()
00149         {
00150             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
00151             {
00152                 ItemsView itemsView = null;
00153                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00154                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00155
00156                 RunOnUIThread.Execute(() =>
00157                 {
00158                     itemsView = new ItemsView();
00159
00160                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00161                 });
00162
00163                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00164
00165                 RunOnUIThread.Execute(() =>
00166                 {
00167                     Log.Comment("Setting ItemsSource");
00168                     Random rnd = new Random();
00169                     List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
00170                     Verify.IsNull(itemsView.ItemTemplate);
00171                     Verify.IsNull(itemsView.ItemsSource);
00172                     itemsView.ItemsSource = itemsSource;
00173                     Verify.IsNotNull(itemsView.ItemTemplate);
00174                     Verify.AreEqual(itemsSource, itemsView.ItemsSource);
00175                 });
00176
00177                 IdleSynchronizer.Wait();
00178
00179                 RunOnUIThread.Execute(() =>
00180                 {
00181                     Log.Comment("Setting ItemTemplate");
00182                     DataTemplate itemTemplate = XamlReader.Load(
00183                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00184                             <ItemContainer>
00185                               <TextBlock Text='{Binding}' Foreground='Red'/>
00186                             </ItemContainer>
00187                           </DataTemplate>") as DataTemplate;
00188                     Verify.IsNotNull(itemTemplate);
00189                     itemsView.ItemTemplate = itemTemplate;
00190                     Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
00191                 });
00192
00193                 IdleSynchronizer.Wait();
00194
00195                 RunOnUIThread.Execute(() =>
00196                 {
00197                     Log.Comment("Setting Layout");
00198                     UniformGridLayout uniformGridLayout = new UniformGridLayout()
00199                     {
00200                         MaximumRowsOrColumns = 4,
00201                         MinColumnSpacing = 10,
00202                         MinRowSpacing = 10,
00203                         MinItemWidth = 100,
00204                         MinItemHeight = 100
00205                     };
00206                     Verify.IsNotNull(itemsView.Layout);
00207                     Verify.IsTrue(itemsView.Layout is StackLayout);
00208                     itemsView.Layout = uniformGridLayout;
00209                     Verify.IsTrue(itemsView.Layout is UniformGridLayout);
00210                 });
00211
00212                 IdleSynchronizer.Wait();
00213
00214                 RunOnUIThread.Execute(() =>
00215                 {
00216                     Log.Comment("Setting SelectionMode");
00217                     Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
00218                     itemsView.SelectionMode = ItemsViewSelectionMode.None;
00219                     Verify.AreEqual(ItemsViewSelectionMode.None, itemsView.SelectionMode);
00220                 });
00221
00222                 IdleSynchronizer.Wait();
00223
00224                 RunOnUIThread.Execute(() =>
00225                 {
00226                     Log.Comment("Changing ItemTemplate");
00227                     DataTemplate itemTemplate = XamlReader.Load(
00228                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00229                             <ItemContainer>
00230                               <TextBlock Text='{Binding}' Foreground='Green'/>
00231                             </ItemContainer>
00232                           </DataTemplate>") as DataTemplate;
00233                     Verify.IsNotNull(itemsView.ItemTemplate);
00234                     itemsView.ItemTemplate = itemTemplate;
00235                     Verify.IsNotNull(itemsView.ItemTemplate);
00236                     Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
00237                 });
00238
00239                 IdleSynchronizer.Wait();
00240
00241                 RunOnUIThread.Execute(() =>
00242                 {
00243                     Log.Comment("Changing ItemsSource");
00244                     Random rnd = new Random();
00245                     List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
00246                     Verify.IsNotNull(itemsView.ItemsSource);
00247                     itemsView.ItemsSource = itemsSource;
00248                     Verify.IsNotNull(itemsView.ItemsSource);
00249                 });
00250
00251                 IdleSynchronizer.Wait();
00252
00253                 RunOnUIThread.Execute(() =>
00254                 {
00255                     Log.Comment("Resetting Layout");
00256                     Verify.IsNotNull(itemsView.Layout);
00257                     itemsView.Layout = null;
00258                     Verify.IsNull(itemsView.Layout);
00259                 });
00260
00261                 IdleSynchronizer.Wait();
00262
00263                 RunOnUIThread.Execute(() =>
00264                 {
00265                     Log.Comment("Resetting ItemsSource");
00266                     Verify.IsNotNull(itemsView.ItemsSource);
00267                     itemsView.ItemsSource = null;
00268                     Verify.IsNull(itemsView.ItemsSource);
00269                 });
00270
00271                 IdleSynchronizer.Wait();
00272
00273                 RunOnUIThread.Execute(() =>
00274                 {
00275                     Log.Comment("Resetting window content and ItemsView");
00276                     Content = null;
00277                     itemsView = null;
00278                 });
00279
00280                 WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
00281
00282                 IdleSynchronizer.Wait();
00283                 Log.Comment("Garbage collecting...");
00284                 GC.Collect();
00285                 GC.WaitForPendingFinalizers();
00286                 GC.Collect();
00287                 Log.Comment("Done");
00288             }
00289         }
00290
00291         [TestMethod]
00292         [TestProperty("Description", "Loads and populates an ItemsView with an ItemsSource made of ItemContainers.")]
00293         public void CanUseItemsSourceWithItemContainers()
00294         {
00295             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView"))
00296             {
00297                 ItemsView itemsView = null;
00298                 List<ItemContainer> itemsSource = new List<ItemContainer>();
00299                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00300
00301                 RunOnUIThread.Execute(() =>
00302                 {
00303                     for (int i = 0; i < 3; i++)
00304                     {
00305                         ItemContainer itemContainer = new ItemContainer()
00306                         {
00307                             Name = "itemContainer" + i.ToString(),
00308                             Child = new TextBlock()
00309                             {
00310                                 Text = i.ToString()
00311                             }
00312                         };
00313                         itemsSource.Add(itemContainer);
00314                     }
00315
00316                     itemsView = new ItemsView() { ItemsSource = itemsSource };
00317                     SetupDefaultUI(itemsView, itemsViewLoadedEvent);
00318                 });
00319
00320                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00321                 IdleSynchronizer.Wait();
00322
00323                 RunOnUIThread.Execute(() =>
00324                 {
00325                     Log.Comment("Logging ItemsView property values after Loaded event");
00326                     LogItemsViewProperties(itemsView);
00327
00328                     Log.Comment("Accessing inner ItemsRepeater");
00329                     ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
00330                     Verify.IsNotNull(itemsRepeater);
00331
00332                     Log.Comment("Verifying ItemsRepeater children count");
00333                     int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
00334                     Verify.AreEqual(3, childrenCount);
00335
00336                     Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
00337                     ItemContainer itemContainer = itemsRepeater.FindVisualChildByType<ItemContainer>();
00338                     Verify.IsNotNull(itemContainer);
00339
00340                     Log.Comment("Verifying ItemsContainer name");
00341                     Verify.AreEqual("itemContainer0", itemContainer.Name);
00342                 });
00343             }
00344         }
00345
00346         [TestMethod]
00347         [TestProperty("Description", "Loads and populates an ItemsView, changes SelectionMode property to all enum values.")]
00348         public void CanChangeSelectionModeProperty()
00349         {
00350             List<string> types = new List<string>(3);
00351             types.Add("ItemsView");
00352             types.Add("ItemsRepeater");
00353             types.Add("ItemContainer");
00354
00355             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
00356             {
00357                 ItemsView itemsView = null;
00358                 ItemContainer itemContainer = null;
00359                 Random rnd = new Random();
00360                 List<string> itemsSource = new List<string>(Enumerable.Range(0, 10).Select(k => k + " - " + rnd.Next(100)));
00361                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00362                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00363
00364                 RunOnUIThread.Execute(() =>
00365                 {
00366                     itemsView = new ItemsView();
00367
00368                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00369                 });
00370
00371                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00372
00373                 RunOnUIThread.Execute(() =>
00374                 {
00375                     Verify.IsTrue(itemsView.Layout is StackLayout);
00376                     Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
00377                 });
00378
00379                 IdleSynchronizer.Wait();
00380
00381                 RunOnUIThread.Execute(() =>
00382                 {
00383                     Log.Comment("Setting ItemTemplate with ItemContainer");
00384                     DataTemplate itemTemplate = XamlReader.Load(
00385                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00386                             <ItemContainer>
00387                               <TextBlock Text='{Binding}' Foreground='Blue'/>
00388                             </ItemContainer>
00389                           </DataTemplate>") as DataTemplate;
00390                     Verify.IsNotNull(itemTemplate);
00391                     itemsView.ItemTemplate = itemTemplate;
00392                     Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
00393                 });
00394
00395                 IdleSynchronizer.Wait();
00396
00397                 RunOnUIThread.Execute(() =>
00398                 {
00399                     Log.Comment("Setting ItemsSource");
00400                     itemsView.ItemsSource = itemsSource;
00401                     Verify.AreEqual(itemsSource, itemsView.ItemsSource);
00402                 });
00403
00404                 IdleSynchronizer.Wait();
00405
00406                 RunOnUIThread.Execute(() =>
00407                 {
00408                     Log.Comment("Extracting ItemsRepeater");
00409                     ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
00410                     Verify.IsNotNull(scrollView);
00411                     ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
00412                     Verify.IsNotNull(itemsRepeater);
00413
00414                     int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
00415                     Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
00416                     itemContainer = itemsRepeater.FindVisualChildByType<ItemContainer>();
00417                     Verify.IsNotNull(itemContainer);
00418                     Verify.IsFalse(itemContainer.IsSelected);
00419 #if MUX_PRERELEASE
00420                     Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
00421                     Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);
00422 #endif
00423
00424                     Log.Comment("Selecting first ItemContainer");
00425                     itemContainer.IsSelected = true;
00426                     Verify.IsTrue(itemContainer.IsSelected);
00427                 });
00428
00429                 IdleSynchronizer.Wait();
00430
00431                 RunOnUIThread.Execute(() =>
00432                 {
00433                     Log.Comment("Selecting Extended SelectionMode");
00434                     itemsView.SelectionMode = ItemsViewSelectionMode.Extended;
00435                     Verify.AreEqual(ItemsViewSelectionMode.Extended, itemsView.SelectionMode);
00436                     Verify.IsTrue(itemContainer.IsSelected);
00437 #if MUX_PRERELEASE
00438                     Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
00439                     Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Extended, itemContainer.MultiSelectMode);
00440 #endif
00441                 });
00442
00443                 IdleSynchronizer.Wait();
00444
00445                 RunOnUIThread.Execute(() =>
00446                 {
00447                     Log.Comment("Selecting Extended SelectionMode");
00448                     itemsView.SelectionMode = ItemsViewSelectionMode.Multiple;
00449                     Verify.AreEqual(ItemsViewSelectionMode.Multiple, itemsView.SelectionMode);
00450                     Verify.IsTrue(itemContainer.IsSelected);
00451 #if MUX_PRERELEASE
00452                     Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
00453                     Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Multiple, itemContainer.MultiSelectMode);
00454 #endif
00455                 });
00456
00457                 IdleSynchronizer.Wait();
00458
00459                 RunOnUIThread.Execute(() =>
00460                 {
00461                     Log.Comment("Selecting None SelectionMode");
00462                     itemsView.SelectionMode = ItemsViewSelectionMode.None;
00463                     Verify.AreEqual(ItemsViewSelectionMode.None, itemsView.SelectionMode);
00464                     Verify.IsFalse(itemContainer.IsSelected);
00465 #if MUX_PRERELEASE
00466                     Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCannotSelect, itemContainer.CanUserSelect);
00467                     Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);
00468 #endif
00469                 });
00470
00471                 IdleSynchronizer.Wait();
00472
00473                 RunOnUIThread.Execute(() =>
00474                 {
00475                     Log.Comment("Selecting Single SelectionMode");
00476                     itemsView.SelectionMode = ItemsViewSelectionMode.Single;
00477                     Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
00478                     Verify.IsFalse(itemContainer.IsSelected);
00479 #if MUX_PRERELEASE
00480                     Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
00481                     Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);
00482 #endif
00483                 });
00484             }
00485         }
00486
00487         [TestMethod]
00488         [TestProperty("Description", "Select an item, call InvertSelection")]
00489         public void VerifyCanInvertSelection()
00490         {
00491             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView"))
00492             {
00493                 ItemsView itemsView = null;
00494                 List<int> itemsSource = new List<int>(Enumerable.Range(0, 5000));
00495                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00496
00497                 RunOnUIThread.Execute(() =>
00498                 {
00499                     itemsView = new ItemsView() { ItemsSource = itemsSource };
00500                     SetupDefaultUI(itemsView, itemsViewLoadedEvent);
00501                 });
00502
00503                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00504
00505                 RunOnUIThread.Execute(() =>
00506                 {
00507                     Log.Comment("Logging ItemsView property values after Loaded event");
00508                     LogItemsViewProperties(itemsView);
00509
00510                     itemsView.Select(0);
00511                 });
00512
00513                 IdleSynchronizer.Wait();
00514
00515                 RunOnUIThread.Execute(() =>
00516                 {
00517                     Verify.IsTrue(itemsView.IsSelected(0), "Selected item is 0");
00518
00519                     itemsView.InvertSelection();
00520                 });
00521
00522                 IdleSynchronizer.Wait();
00523
00524                 RunOnUIThread.Execute(() =>
00525                 {
00526                     var totalItemCount = itemsSource.Count;
00527                     var numSelectedItems = itemsView.SelectedItems.Count;
00528
00529                     Verify.IsFalse(itemsView.IsSelected(0), "Item 0 is not selected");
00530                     Verify.AreEqual(numSelectedItems, totalItemCount - 1 , "Verify expected number of items are selected");
00531                 });
00532
00533                 IdleSynchronizer.Wait();
00534                 Log.Comment("Done");
00535             }
00536         }
00537
00538         [TestMethod]
00539         [TestProperty("Description", "Select an item, scroll to recycle selected item, scroll back to ensure selection persisted across recycling")]
00540         public void VerifySelectionPersistsAfterRecycling()
00541         {
00542             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
00543             {
00544                 ItemsView itemsView = null;
00545                 ScrollView scrollView = null;
00546                 List<int> itemsSource = new List<int>(Enumerable.Range(0, 5000));
00547                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00548                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00549                 AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
00550                 AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
00551
00552                 RunOnUIThread.Execute(() =>
00553                 {
00554                     itemsView = new ItemsView() { ItemsSource = itemsSource };
00555                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00556                 });
00557
00558                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00559
00560                 RunOnUIThread.Execute(() =>
00561                 {
00562                     scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
00563
00564                     scrollView.BringingIntoView += (sender, args) =>
00565                     {
00566                         Log.Comment("ScrollView.BringingIntoView raised - CorrelationId=" + args.CorrelationId + ", TargetVerticalOffset=" + args.TargetVerticalOffset);
00567
00568                         scrollViewBringingIntoViewEvent.Set();
00569                     };
00570
00571                     scrollView.ScrollCompleted += (sender, args) =>
00572                     {
00573                         Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);
00574
00575                         scrollViewScrollCompletedEvent.Set();
00576                     };
00577                 });
00578
00579                 IdleSynchronizer.Wait();
00580
00581                 RunOnUIThread.Execute(() =>
00582                 {
00583                     Log.Comment("Logging ItemsView property values after Loaded event");
00584                     LogItemsViewProperties(itemsView);
00585
00586                     itemsView.Select(0);
00587                 });
00588
00589                 IdleSynchronizer.Wait();
00590
00591                 // Scroll to the end
00592                 BringItemIntoView(itemsSource.Count-1, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
00593
00594                 RunOnUIThread.Execute(() =>
00595                 {
00596                     Verify.IsTrue(itemsView.IsSelected(0), "Selected item is still 0");
00597                 });
00598
00599                 // Scroll back to 0
00600                 BringItemIntoView(0, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
00601
00602                 RunOnUIThread.Execute(() =>
00603                 {
00604                     Verify.IsTrue(itemsView.IsSelected(0), "Selected item is still 0");
00605                 });
00606
00607                 IdleSynchronizer.Wait();
00608                 Log.Comment("Done");
00609             }
00610         }
00611
00612         [TestMethod]
00613         [TestProperty("Description", "Loads and populates an ItemsView, sets ItemContainer.IsSelected even though ItemContainer.UserCanSelect==ItemContainerUserSelectMode.UserCannotSelect.")]
00614         public void CanSetItemContainerIsSelectedProperty()
00615         {
00616             List<string> types = new List<string>(3);
00617             types.Add("ItemsView");
00618             types.Add("ItemsRepeater");
00619             types.Add("ItemContainer");
00620
00621             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
00622             {
00623                 ItemsView itemsView = null;
00624                 ItemContainer itemContainer = null;
00625                 Random rnd = new Random();
00626                 List<string> itemsSource = new List<string>(Enumerable.Range(0, 10).Select(k => k + " - " + rnd.Next(100)));
00627                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00628                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00629
00630                 RunOnUIThread.Execute(() =>
00631                 {
00632                     itemsView = new ItemsView();
00633
00634                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00635                 });
00636
00637                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00638
00639                 RunOnUIThread.Execute(() =>
00640                 {
00641                     Verify.IsTrue(itemsView.Layout is StackLayout);
00642                     Verify.AreEqual(ItemsViewSelectionMode.Single, itemsView.SelectionMode);
00643                 });
00644
00645                 IdleSynchronizer.Wait();
00646
00647                 RunOnUIThread.Execute(() =>
00648                 {
00649                     Log.Comment("Setting ItemTemplate with ItemContainer");
00650                     DataTemplate itemTemplate = XamlReader.Load(
00651                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00652                             <ItemContainer>
00653                               <TextBlock Text='{Binding}' Foreground='Blue'/>
00654                             </ItemContainer>
00655                           </DataTemplate>") as DataTemplate;
00656                     Verify.IsNotNull(itemTemplate);
00657                     itemsView.ItemTemplate = itemTemplate;
00658                     Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
00659                 });
00660
00661                 IdleSynchronizer.Wait();
00662
00663                 RunOnUIThread.Execute(() =>
00664                 {
00665                     Log.Comment("Setting ItemsSource");
00666                     itemsView.ItemsSource = itemsSource;
00667                     Verify.AreEqual(itemsSource, itemsView.ItemsSource);
00668                 });
00669
00670                 IdleSynchronizer.Wait();
00671
00672                 RunOnUIThread.Execute(() =>
00673                 {
00674                     Log.Comment("Extracting ItemsRepeater");
00675                     ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
00676                     Verify.IsNotNull(scrollView);
00677                     ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
00678                     Verify.IsNotNull(itemsRepeater);
00679
00680                     int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
00681                     Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
00682                     itemContainer = itemsRepeater.FindVisualChildByType<ItemContainer>();
00683                     Verify.IsNotNull(itemContainer);
00684                     Verify.IsFalse(itemContainer.IsSelected);
00685 #if MUX_PRERELEASE
00686                     Verify.AreEqual(ItemContainerUserSelectMode.Auto | ItemContainerUserSelectMode.UserCanSelect, itemContainer.CanUserSelect);
00687                     Verify.AreEqual(ItemContainerMultiSelectMode.Auto | ItemContainerMultiSelectMode.Single, itemContainer.MultiSelectMode);
00688
00689                     Log.Comment("Preventing interactive selection");
00690                     itemContainer.CanUserSelect = ItemContainerUserSelectMode.UserCannotSelect;
00691                     Verify.AreEqual(ItemContainerUserSelectMode.UserCannotSelect, itemContainer.CanUserSelect);
00692 #endif
00693
00694                     Log.Comment("Selecting first ItemContainer programmatically");
00695                     itemContainer.IsSelected = true;
00696                     Verify.IsTrue(itemContainer.IsSelected);
00697                 });
00698             }
00699         }
00700
00701         [TestMethod]
00702         [TestProperty("Description", "Loads an ItemsView, changes Layout property to various types.")]
00703         public void CanChangeLayoutProperty()
00704         {
00705             List<string> types = new List<string>
00706             {
00707                 "ItemsView",
00708                 "ScrollView",
00709                 "ItemsRepeater",
00710                 "LinedFlowLayout"
00711             };
00712
00713             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
00714             {
00715                 ItemsView itemsView = null;
00716                 Random rnd = new Random();
00717                 List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
00718                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00719                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00720
00721                 RunOnUIThread.Execute(() =>
00722                 {
00723                     itemsView = new ItemsView() { ItemsSource = itemsSource };
00724
00725                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00726                 });
00727
00728                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00729
00730                 RunOnUIThread.Execute(() =>
00731                 {
00732                     Verify.IsTrue(itemsView.Layout is StackLayout);
00733
00734                     itemsView.Layout = new UniformGridLayout();
00735                 });
00736
00737                 IdleSynchronizer.Wait();
00738
00739                 RunOnUIThread.Execute(() =>
00740                 {
00741                     Verify.IsTrue(itemsView.Layout is UniformGridLayout);
00742
00743                     itemsView.Layout = new LinedFlowLayout();
00744                 });
00745
00746                 IdleSynchronizer.Wait();
00747
00748                 RunOnUIThread.Execute(() =>
00749                 {
00750                     Verify.IsTrue(itemsView.Layout is LinedFlowLayout);
00751
00752                     Log.Comment("Resetting window content and ItemsView");
00753                     Content = null;
00754                     itemsView = null;
00755                 });
00756
00757                 WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
00758                 Log.Comment("Done");
00759             }
00760         }
00761
00762         [TestMethod]
00763         [TestProperty("Description", "Verifies ability to set the ItemTemplate property after the ItemsSource.")]
00764         public void CanSetItemTemplateAfterItemsSourceProperty()
00765         {
00766             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ItemsRepeater"))
00767             {
00768                 DataTemplate itemTemplate = null;
00769                 ItemsView itemsView = null;
00770                 List<string> itemsSource = null;
00771                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00772                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00773
00774                 RunOnUIThread.Execute(() =>
00775                 {
00776                     itemsSource = new List<string>(Enumerable.Range(0, 10).Select(k => k.ToString()));
00777                     itemsView = new ItemsView();
00778
00779                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00780                 });
00781
00782                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00783                 IdleSynchronizer.Wait();
00784
00785                 RunOnUIThread.Execute(() =>
00786                 {
00787                     Log.Comment("Setting ItemsSource");
00788                     itemsView.ItemsSource = itemsSource;
00789                     Verify.AreEqual(itemsSource, itemsView.ItemsSource);
00790                 });
00791
00792                 IdleSynchronizer.Wait();
00793
00794                 RunOnUIThread.Execute(() =>
00795                 {
00796                     Log.Comment("Setting ItemTemplate with ItemContainer");
00797                     itemTemplate = XamlReader.Load(
00798                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00799                             <ItemContainer>
00800                               <TextBlock Text='{Binding}' Foreground='Blue'/>
00801                             </ItemContainer>
00802                           </DataTemplate>") as DataTemplate;
00803                     Verify.IsNotNull(itemTemplate);
00804                     itemsView.ItemTemplate = itemTemplate;
00805                     Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
00806                 });
00807
00808                 IdleSynchronizer.Wait();
00809
00810                 RunOnUIThread.Execute(() =>
00811                 {
00812                     Log.Comment("Extracting ScrollView");
00813                     ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
00814                     Verify.IsNotNull(scrollView);
00815
00816                     Log.Comment("Extracting ItemsRepeater");
00817                     ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
00818                     Verify.IsNotNull(itemsRepeater);
00819
00820                     Log.Comment("Expecting ItemTemplate of ItemsView and ItemRepeater to be identical");
00821                     Verify.AreEqual(itemsRepeater.ItemTemplate, itemsView.ItemTemplate);
00822                 });
00823
00824                 IdleSynchronizer.Wait();
00825
00826                 RunOnUIThread.Execute(() =>
00827                 {
00828                     Log.Comment("Resetting ItemTemplate");
00829                     itemsView.ItemTemplate = null;
00830
00831                     Log.Comment("Expecting non-null ItemTemplate");
00832                     Verify.IsNotNull(itemsView.ItemTemplate);
00833
00834                     Log.Comment("Expecting modified ItemTemplate");
00835                     Verify.AreNotEqual(itemsView.ItemTemplate, itemTemplate);
00836                 });
00837
00838                 IdleSynchronizer.Wait();
00839
00840                 RunOnUIThread.Execute(() =>
00841                 {
00842                     Log.Comment("Resetting window content and ItemsView");
00843                     Content = null;
00844                     itemsView = null;
00845                 });
00846
00847                 WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
00848                 Log.Comment("Done");
00849             }
00850         }
00851
00852         [TestMethod]
00853         [TestProperty("Description", "Invokes the ItemsView.StartBringItemIntoView methods.")]
00854         public void CanBringItemIntoView()
00855         {
00856             CanBringItemIntoView(useLinedFlowLayout: false, useUniformGridLayout: false);
00857             CanBringItemIntoView(useLinedFlowLayout: true, useUniformGridLayout: false);
00858             CanBringItemIntoView(useLinedFlowLayout: false, useUniformGridLayout: true);
00859         }
00860
00861         [TestMethod]
00862         [TestProperty("Description", "Verify binding to the ItemsView's SelectedItem using XAML markup.")]
00863         public void CanBindSelectedItem()
00864         {
00865             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ItemsRepeater"))
00866             {
00867                 Panel rootPanel = null;
00868                 TextBlock textBlock = null;
00869                 AutoResetEvent rootPanelLoadedEvent = new AutoResetEvent(false);
00870
00871                 RunOnUIThread.Execute(() =>
00872                 {
00873                     string panelXaml =
00874                         @"<StackPanel
00875                               xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00876                               xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
00877                               <ItemsView x:Name='itemsView' ItemsSource='{Binding Digits, Mode=OneWay}'>
00878                                   <ItemsView.ItemTemplate>
00879                                       <DataTemplate>
00880                                           <ItemContainer>
00881                                               <TextBlock Text='{Binding}'/>
00882                                           </ItemContainer>
00883                                       </DataTemplate>
00884                                   </ItemsView.ItemTemplate>
00885                               </ItemsView>
00886                               <TextBlock Text='{Binding ElementName=itemsView, Path=SelectedItem, Mode=OneWay}'/>
00887                           </StackPanel>";
00888
00889                     Log.Comment("Loading XAML markup.");
00890                     rootPanel = XamlReader.Load(panelXaml) as Panel;
00891                     Verify.IsNotNull(rootPanel);
00892
00893                     rootPanel.Loaded += (object sender, RoutedEventArgs e) =>
00894                     {
00895                         Log.Comment("Panel.Loaded event handler");
00896                         rootPanelLoadedEvent.Set();
00897                     };
00898
00899                     rootPanel.DataContext = this;
00900
00901                     Log.Comment("Setting window Content.");
00902                     Content = rootPanel;
00903                 });
00904
00905                 WaitForEvent("Waiting for Panel.Loaded event", rootPanelLoadedEvent);
00906
00907                 IdleSynchronizer.Wait();
00908
00909                 RunOnUIThread.Execute(() =>
00910                 {
00911                     Log.Comment("Accessing ItemsView.");
00912                     ItemsView itemsView = rootPanel.Children[0] as ItemsView;
00913                     Verify.IsNotNull(itemsView);
00914
00915                     Log.Comment("Accessing databound TextBlock.");
00916                     textBlock = rootPanel.Children[1] as TextBlock;
00917                     Verify.IsNotNull(textBlock);
00918
00919                     Log.Comment($"TextBlock.Text={textBlock.Text}");
00920                     Verify.AreEqual(string.Empty, textBlock.Text);
00921
00922                     Log.Comment("Selecting item @ index 5.");
00923                     itemsView.Select(5);
00924                 });
00925
00926                 IdleSynchronizer.Wait();
00927
00928                 RunOnUIThread.Execute(() =>
00929                 {
00930                     Log.Comment($"TextBlock.Text={textBlock.Text}");
00931                     Verify.AreEqual("5", textBlock.Text);
00932                 });
00933             }
00934         }
00935
00936         [TestMethod]
00937         public void VerifyItemsViewUIABehavior()
00938         {
00939             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
00940             {
00941                 ItemsView itemsView = null;
00942                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00943                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00944
00945                 RunOnUIThread.Execute(() =>
00946                 {
00947                     itemsView = new ItemsView();
00948
00949                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
00950                 });
00951
00952                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
00953
00954                 RunOnUIThread.Execute(() =>
00955                 {
00956                     Log.Comment("Setting ItemsSource");
00957                     Random rnd = new Random();
00958                     List<string> itemsSource = new List<string>(Enumerable.Range(0, 25).Select(k => k + " - " + rnd.Next(100)));
00959                     Verify.IsNull(itemsView.ItemsSource);
00960                     itemsView.ItemsSource = itemsSource;
00961
00962                     Verify.IsNotNull(itemsView.ItemsSource);
00963                 });
00964
00965                 IdleSynchronizer.Wait();
00966
00967                 RunOnUIThread.Execute(() =>
00968                 {
00969                     for (int i = 0; i < 25; i++)
00970                     {
00971                         ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
00972                         Verify.IsNotNull(itemsRepeater);
00973
00974                         var element = itemsRepeater.TryGetElement(i);
00975                         Verify.IsNotNull(element);
00976
00977                         Verify.AreEqual(i + 1, element.GetValue(AutomationProperties.PositionInSetProperty));
00978                         Verify.AreEqual(25, element.GetValue(AutomationProperties.SizeOfSetProperty));
00979                     }
00980                 });
00981             }
00982         }
00983
00984         [TestMethod]
00985         public void VerifyItemsViewUIASelectionProviderBehavior()
00986         {
00987             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "ScrollView"))
00988             {
00989                 ItemsView itemsView = null;
00990                 ItemContainer itemContainer = null;
00991                 ItemsRepeater itemsRepeater = null;
00992                 ScrollView scrollView = null;
00993                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
00994                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
00995                 AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
00996                 AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
00997                 ISelectionProvider selectionProvider = null;
00998                 ISelectionItemProvider selectionItemProvider = null;
00999
01000                 RunOnUIThread.Execute(() =>
01001                 {
01002                     itemsView = new ItemsView();
01003
01004                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
01005                 });
01006
01007                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
01008
01009                 RunOnUIThread.Execute(() =>
01010                 {
01011                     Log.Comment("Setting ItemTemplate with ItemContainer");
01012                     DataTemplate itemTemplate = XamlReader.Load(
01013                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
01014                             <ItemContainer>
01015                               <TextBlock Text='{Binding}' Foreground='Blue'/>
01016                             </ItemContainer>
01017                           </DataTemplate>") as DataTemplate;
01018                     Verify.IsNotNull(itemTemplate);
01019                     itemsView.ItemTemplate = itemTemplate;
01020                     Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
01021                 });
01022
01023                 RunOnUIThread.Execute(() =>
01024                 {
01025                     Log.Comment("Extracting ScrollView");
01026                     scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
01027                     Verify.IsNotNull(scrollView);
01028
01029                     scrollView.BringingIntoView += (sender, args) =>
01030                     {
01031                         Log.Comment("ScrollView.BringingIntoView raised - CorrelationId=" + args.CorrelationId + ", TargetVerticalOffset=" + args.TargetVerticalOffset);
01032
01033                         scrollViewBringingIntoViewEvent.Set();
01034                     };
01035
01036                     scrollView.ScrollCompleted += (sender, args) =>
01037                     {
01038                         Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);
01039
01040                         scrollViewScrollCompletedEvent.Set();
01041                     };
01042
01043                     Log.Comment("Setting ItemsSource");
01044                     Random rnd = new Random();
01045                     List<string> itemsSource = new List<string>(Enumerable.Range(0, 50).Select(k => k + " - " + rnd.Next(100)));
01046                     Verify.IsNull(itemsView.ItemsSource);
01047                     itemsView.ItemsSource = itemsSource;
01048
01049                     Verify.IsNotNull(itemsView.ItemsSource);
01050                 });
01051
01052                 IdleSynchronizer.Wait();
01053
01054                 RunOnUIThread.Execute(() =>
01055                 {
01056                     var itemsViewPeer = FrameworkElementAutomationPeer.CreatePeerForElement(itemsView);
01057                     Verify.IsNotNull(itemsViewPeer);
01058                     var itemsViewSelectionPattern = itemsViewPeer.GetPattern(PatternInterface.Selection);
01059                     Verify.IsNotNull(itemsViewSelectionPattern);
01060                     selectionProvider = itemsViewSelectionPattern as ISelectionProvider;
01061
01062                     // ItemsView CanSelectMultiple is false by default.
01063                     Verify.IsFalse(selectionProvider.CanSelectMultiple, "CanSelectMultiple returns false when ItemsViewSelectionMode is single");
01064
01065                     itemsView.SelectionMode = ItemsViewSelectionMode.Multiple;
01066                     Verify.IsTrue(selectionProvider.CanSelectMultiple, "CanSelectMultiple returns true when ItemsViewSelectionMode is multiple");
01067
01068                     itemsView.SelectionMode = ItemsViewSelectionMode.Extended;
01069                     Verify.IsTrue(selectionProvider.CanSelectMultiple, "CanSelectMultiple returns true when ItemsViewSelectionMode is extended");
01070
01071                     Verify.IsNull(selectionProvider.GetSelection());
01072                     Log.Comment("GetSelection returns null as no items are selected.");
01073                 });
01074
01075                 IdleSynchronizer.Wait();
01076
01077                 RunOnUIThread.Execute(() =>
01078                 {
01079                     Log.Comment("Extracting ItemsRepeater");
01080                     ScrollView scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
01081                     Verify.IsNotNull(scrollView);
01082                     itemsRepeater = scrollView.Content as ItemsRepeater;
01083                     Verify.IsNotNull(itemsRepeater);
01084
01085                     int childrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
01086                     Log.Comment($"Extracting first ItemContainer, children count: {childrenCount}");
01087                     itemContainer = itemsRepeater.TryGetElement(0) as ItemContainer;
01088                     Verify.IsNotNull(itemContainer);
01089                     Verify.IsFalse(itemContainer.IsSelected);
01090
01091                     Log.Comment("Selecting first ItemContainer");
01092                     itemContainer.IsSelected = true;
01093                     Verify.IsTrue(itemContainer.IsSelected);
01094
01095                     Verify.IsNotNull(selectionProvider.GetSelection());
01096                     Log.Comment("GetSelection returns peer of selected ItemContainer.");
01097
01098                     Log.Comment("Extracting second ItemContainer.");
01099                     itemContainer = itemsRepeater.TryGetElement(1) as ItemContainer;
01100                     Verify.IsNotNull(itemContainer);
01101                     Verify.IsFalse(itemContainer.IsSelected);
01102
01103                     Log.Comment("Selecting second ItemContainer");
01104                     itemContainer.IsSelected = true;
01105                     Verify.IsTrue(itemContainer.IsSelected);
01106
01107                     Verify.IsNotNull(selectionProvider.GetSelection());
01108                     Verify.AreEqual(selectionProvider.GetSelection().Count(), 2);
01109                     Log.Comment("GetSelection returns list of 2 ItemContainer peers.");
01110
01111                     Log.Comment("Extracting last ItemContainer.");
01112                     itemContainer = itemsRepeater.TryGetElement(49) as ItemContainer;
01113                     Verify.IsNull(itemContainer);
01114                     Log.Comment("ItemContainer is null as it is out of view and not realized.");
01115                 });
01116
01117                 IdleSynchronizer.Wait();
01118
01119                 Log.Comment("Scroll to last item.");
01120                 BringItemIntoView(49, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
01121
01122                 RunOnUIThread.Execute(() =>
01123                 {
01124                     Log.Comment("Extracting last ItemContainer.");
01125                     itemContainer = itemsRepeater.TryGetElement(49) as ItemContainer;
01126                     Verify.IsNotNull(itemContainer);
01127                     Log.Comment("ItemContainer is non-null as it is in view and realized.");
01128
01129                     Log.Comment("Selecting last ItemContainer");
01130                     itemContainer.IsSelected = true;
01131                     Verify.IsTrue(itemContainer.IsSelected);
01132
01133                     Verify.IsNotNull(selectionProvider.GetSelection());
01134                     Verify.AreEqual(selectionProvider.GetSelection().Count(), 1);
01135                     Log.Comment("GetSelection returns 1 ItemContainer peer that is in view and realized.");
01136
01137                     var itemContainerPeer = FrameworkElementAutomationPeer.CreatePeerForElement(itemContainer);
01138                     Verify.IsNotNull(itemContainerPeer);
01139                     var itemContainerSelectionPattern = itemContainerPeer.GetPattern(PatternInterface.SelectionItem);
01140                     Verify.IsNotNull(itemContainerSelectionPattern);
01141                     selectionItemProvider = itemContainerSelectionPattern as ISelectionItemProvider;
01142
01143                     Verify.IsNotNull(selectionItemProvider.SelectionContainer);
01144                     Log.Comment("ItemContainer SelectionContainer returns parent ItemsView.");
01145                 });
01146
01147                 Log.Comment("Scroll back to first item.");
01148                 BringItemIntoView(0, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
01149
01150                 RunOnUIThread.Execute(() =>
01151                 {
01152                     Verify.IsNotNull(selectionProvider.GetSelection());
01153                     Verify.AreEqual(selectionProvider.GetSelection().Count(), 2);
01154                     Log.Comment("GetSelection returns list of 2 ItemContainer peers that are in view and realized.");
01155
01156                     var itemContainerPeer = FrameworkElementAutomationPeer.CreatePeerForElement(itemContainer);
01157                     Verify.IsNotNull(itemContainerPeer);
01158                     var itemContainerSelectionPattern = itemContainerPeer.GetPattern(PatternInterface.SelectionItem);
01159                     Verify.IsNotNull(itemContainerSelectionPattern);
01160                     selectionItemProvider = itemContainerSelectionPattern as ISelectionItemProvider;
01161
01162                     Verify.IsNotNull(selectionItemProvider.SelectionContainer);
01163                     Log.Comment("ItemContainer SelectionContainer returns parent ItemsView.");
01164                 });
01165             }
01166         }
01167
01168         [TestMethod]
01169         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and provides the minimum information requested.")]
01170         public void HandleItemsInfoRequested()
01171         {
01172             HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: false, useTemporaryAspectRatio: false);
01173         }
01174
01175         [TestMethod]
01176         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and provides the minimum information requested, with min/max size arrays.")]
01177         public void HandleItemsInfoRequestedWithSizeArrays()
01178         {
01179             HandleItemsInfoRequested(useSizeArrays: true, useExtraInfo: false, useTemporaryAspectRatio: false);
01180         }
01181
01182         [TestMethod]
01183         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and provides information beyond the minimum requested.")]
01184         public void HandleItemsInfoRequestedWithExtraInfo()
01185         {
01186             HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: true, useTemporaryAspectRatio: false);
01187         }
01188
01189         [TestMethod]
01190         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and provides information beyond the minimum requested, with min/max size arrays.")]
01191         public void HandleItemsInfoRequestedWithSizeArraysAndExtraInfo()
01192         {
01193             HandleItemsInfoRequested(useSizeArrays: true, useExtraInfo: true, useTemporaryAspectRatio: false);
01194         }
01195
01196         [TestMethod]
01197         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and provides partial temporary aspect ratios.")]
01198         public void HandleItemsInfoRequestedWithTemporaryInfo()
01199         {
01200             HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: false, useTemporaryAspectRatio: true);
01201         }
01202
01203         [TestMethod]
01204         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and provides information beyond the minimum requested, with partial temporary aspect ratios.")]
01205         public void HandleItemsInfoRequestedWithTemporaryAndExtraInfo()
01206         {
01207             HandleItemsInfoRequested(useSizeArrays: false, useExtraInfo: true, useTemporaryAspectRatio: true);
01208         }
01209
01210         [TestMethod]
01211         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and triggers various exceptions exercising LinedFlowLayoutItemsInfoRequestedEventArgs APIs.")]
01212         [TestProperty("TestPass:MinOSVer", WindowsOSVersion._19H1)] // Unstable on RS5. See bug 49647616.
01213         public void TriggerLinedFlowLayoutItemsInfoRequestedEventArgsExceptions()
01214         {
01215             TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexNegative);
01216             TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexIncreased);
01217             TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexTooSmall);
01218             TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthSmallerThanItemsRangeRequestedLength);
01219             TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthTooSmallForDecreasedItemsRangeStartIndex);
01220             TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthInconsistent);
01221         }
01222
01223         [TestMethod]
01224         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and alternatively triggers the fast and regular paths. LinedFlowLayoutItemsInfoRequestedEventArgs.SetMinWidths & LinedFlowLayoutItemsInfoRequestedEventArgs.SetMaxWidths are used.")]
01225         public void AlternateLayoutPathsWithSizeArrays()
01226         {
01227             AlternateLayoutPaths(useSizeArrays: true);
01228         }
01229
01230         [TestMethod]
01231         [TestProperty("Description", "Handles the LinedFlowLayout.ItemsInfoRequested event and alternatively triggers the fast and regular paths. LinedFlowLayoutItemsInfoRequestedEventArgs.MinWidth & LinedFlowLayoutItemsInfoRequestedEventArgs.MaxWidth are used.")]
01232         public void AlternateLayoutPathsWithUniformSizes()
01233         {
01234             AlternateLayoutPaths(useSizeArrays: false);
01235         }
01236
01237         [TestMethod]
01238         [TestProperty("Description", "Alternatively hooks and unhooks the LinedFlowLayout.ItemsInfoRequested event to use the fast and regular paths.")]
01239         public void AlternateLayoutPathsByUnhookingItemsInfoRequested()
01240         {
01241             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper("ItemsView", "LinedFlowLayout"))
01242             {
01243                 ItemsView itemsView = null;
01244                 LinedFlowLayout linedFlowLayout = null;
01245                 Random rnd = new Random();
01246                 ObservableCollection<string> itemsSource = new ObservableCollection<string>(Enumerable.Range(0, 75).Select(k => k + "-" + rnd.Next(20)));
01247                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
01248                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
01249
01250                 RunOnUIThread.Execute(() =>
01251                 {
01252                     linedFlowLayout = new LinedFlowLayout()
01253                     {
01254                         LineHeight = 50.0
01255                     };
01256
01257                     itemsView = new ItemsView()
01258                     {
01259                         Layout = linedFlowLayout,
01260                         ItemsSource = itemsSource
01261                     };
01262
01263                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
01264                 });
01265
01266                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
01267
01268                 IdleSynchronizer.Wait();
01269
01270                 for (int resizeCount = 0; resizeCount < 6; resizeCount++)
01271                 {
01272                     RunOnUIThread.Execute(() =>
01273                     {
01274                         if (resizeCount % 2 == 0)
01275                         {
01276                             Log.Comment($"Hooking LinedFlowLayout.ItemsInfoRequested");
01277                             linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
01278                         }
01279                         else
01280                         {
01281                             Log.Comment($"Unhooking LinedFlowLayout.ItemsInfoRequested");
01282                             linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;
01283                         }
01284
01285                         Log.Comment($"ItemsView resized to {itemsView.ActualWidth + 1}");
01286                         itemsView.Width = itemsView.ActualWidth + 1;
01287                     });
01288
01289                     IdleSynchronizer.Wait();
01290                 }
01291
01292                 RunOnUIThread.Execute(() =>
01293                 {
01294                     Log.Comment("Resetting window content and ItemsView");
01295                     Content = null;
01296                     itemsView = null;
01297                 });
01298
01299                 WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
01300                 Log.Comment("Done");
01301             }
01302         }
01303
01304         [TestMethod]
01305         [TestProperty("Description", "Verifies the stability of the LinedFlowLayout's average-items-per-line by progressively lowering it through new collection items.")]
01306         public void VerifyLinedFlowLayoutAverageItemsPerLineStability()
01307         {
01308             ItemsView itemsView = null;
01309             LinedFlowLayout linedFlowLayout = null;
01310             ObservableCollection<string> itemsSource = new ObservableCollection<string>();
01311             AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
01312             AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
01313             double previousRawAverageItemsPerLine = 0.0;
01314             double previousSnappedAverageItemsPerLine = 0.0;
01315
01316             RunOnUIThread.Execute(() =>
01317             {
01318                 linedFlowLayout = new LinedFlowLayout()
01319                 {
01320                     LineHeight = 50.0
01321                 };
01322
01323                 itemsView = new ItemsView()
01324                 {
01325                     Layout = linedFlowLayout,
01326                     ItemsSource = itemsSource
01327                 };
01328
01329                 SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
01330
01331                 itemsView.Height = 700.0;
01332             });
01333
01334             WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
01335
01336             IdleSynchronizer.Wait();
01337
01338             for (int newItemCount = 0; newItemCount < 10; newItemCount++)
01339             {
01340                 for (int duplicate = 0; duplicate < 16; duplicate++)
01341                 {
01342                     RunOnUIThread.Execute(() =>
01343                     {
01344                         string newItem = Math.Pow(2, newItemCount).ToString();
01345
01346                         Log.Comment($"Adding item: {newItem}");
01347
01348                         itemsSource.Add(newItem);
01349                     });
01350
01351                     IdleSynchronizer.Wait();
01352
01353                     RunOnUIThread.Execute(() =>
01354                     {
01355                         double averageItemAspectRatio = LayoutsTestHooks.GetLinedFlowLayoutAverageItemAspectRatio(linedFlowLayout);
01356                         double snappedAverageItemsPerLine = LayoutsTestHooks.GetLinedFlowLayoutSnappedAverageItemsPerLine(linedFlowLayout);
01357                         double rawAverageItemsPerLine1 = LayoutsTestHooks.GetLinedFlowLayoutRawAverageItemsPerLine(linedFlowLayout);
01358                         double rawAverageItemsPerLine2 = c_defaultUIItemsViewWidth / (averageItemAspectRatio * linedFlowLayout.ActualLineHeight);
01359
01360                         Log.Comment($"LinedFlowLayout averageItemAspectRatio: {averageItemAspectRatio.ToString()}, snappedAverageItemsPerLine: {snappedAverageItemsPerLine.ToString()}");
01361                         Log.Comment($"LinedFlowLayout rawAverageItemsPerLine1: {rawAverageItemsPerLine1.ToString()}, rawAverageItemsPerLine2: {rawAverageItemsPerLine2.ToString()}");
01362
01363                         double previousRawAverageItemsPerLineSnappedToPower = SnapToPower(previousRawAverageItemsPerLine);
01364                         double rawAverageItemsPerLineSnappedToPower = SnapToPower(rawAverageItemsPerLine2);
01365
01366                         if (previousRawAverageItemsPerLineSnappedToPower != rawAverageItemsPerLineSnappedToPower &&
01367                             previousSnappedAverageItemsPerLine != snappedAverageItemsPerLine)
01368                         {
01369                             Log.Comment($"previousRawAverageItemsPerLine: {previousRawAverageItemsPerLine}");
01370                             Log.Comment($"previousSnappedAverageItemsPerLine: {previousSnappedAverageItemsPerLine}");
01371
01372                             Log.Comment($"previousRawAverageItemsPerLineSnappedToPower: {previousRawAverageItemsPerLineSnappedToPower}");
01373                             Log.Comment($"rawAverageItemsPerLineSnappedToPower: {rawAverageItemsPerLineSnappedToPower}");
01374
01375                             // When the previous and new snapped average-items-per-line differ, it must be a raw variation of more than 0.1.
01376                             Verify.IsGreaterThan(Math.Abs(rawAverageItemsPerLine2 - previousRawAverageItemsPerLine), 0.1);
01377                         }
01378
01379                         previousRawAverageItemsPerLine = rawAverageItemsPerLine2;
01380                         previousSnappedAverageItemsPerLine = snappedAverageItemsPerLine;
01381                     });
01382                 }
01383             }
01384
01385             RunOnUIThread.Execute(() =>
01386             {
01387                 Log.Comment("Resetting window content and ItemsView");
01388                 Content = null;
01389                 itemsView = null;
01390             });
01391
01392             WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
01393             Log.Comment("Done");
01394         }
01395
01396         // Snaps the provided value to a power of valuePower.
01397         // Example: value=3.75 snaps to 1.1^14 = 3.7975, valuePower being 1.1.
01398         private double SnapToPower(double value)
01399         {
01400             double valuePower = 1.1;
01401             double dividerLog = Math.Log(valuePower);
01402             double valueLog = Math.Log(value);
01403             double valueExp = Math.Ceiling(valueLog / dividerLog);
01404             double valueRndCeil = Math.Pow(valuePower, valueExp);
01405             double valueRndFloor = valueRndCeil / valuePower;
01406
01407             // Return valuePower^valueExp or valuePower^(valueExp - 1), whichever is closest to value.
01408             if (Math.Abs(valueRndCeil - value) <= Math.Abs(valueRndFloor - value))
01409             {
01410                 return valueRndCeil;
01411             }
01412             else
01413             {
01414                 return valueRndFloor;
01415             }
01416         }
01417
01418         private void LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
01419         {
01420             Log.Comment("LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex=" + args.ItemsRangeStartIndex + ", ItemsRangeRequestedLength=" + args.ItemsRangeRequestedLength);
01421
01422             double[] desiredAspectRatios = new double[100];
01423
01424             for (int desiredAspectRatioIndex = 0; desiredAspectRatioIndex < 100; desiredAspectRatioIndex++)
01425             {
01426                 desiredAspectRatios[desiredAspectRatioIndex] = 1.0;
01427             }
01428
01429             args.ItemsRangeStartIndex = 0;
01430             args.SetDesiredAspectRatios(desiredAspectRatios);
01431         }
01432
01433         private void AlternateLayoutPaths(bool useSizeArrays)
01434         {
01435             List<string> types = new List<string>
01436             {
01437                 "ItemsView",
01438                 "ScrollView",
01439                 "ItemsRepeater",
01440                 "LinedFlowLayout"
01441             };
01442
01443             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
01444             {
01445                 ItemsView itemsView = null;
01446                 ScrollView scrollView = null;
01447                 LinedFlowLayout linedFlowLayout = null;
01448                 int itemsInfoRequestedCount = 0;
01449                 bool provideItemsInfo = false;
01450                 bool provideExtraItemsInfo = false;
01451                 Random rnd = new Random();
01452                 ObservableCollection<string> itemsSource = new ObservableCollection<string>(Enumerable.Range(0, 1000).Select(k => k + "-" + rnd.Next(20)));
01453                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
01454                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
01455                 AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
01456                 AutoResetEvent linedFlowLayoutItemsInfoRequestedEvent = new AutoResetEvent(false);
01457
01458                 RunOnUIThread.Execute(() =>
01459                 {
01460                     linedFlowLayout = new LinedFlowLayout()
01461                     {
01462                         LineHeight = 50.0
01463                     };
01464
01465                     linedFlowLayout.ItemsInfoRequested += (sender, args) =>
01466                     {
01467                         Log.Comment("LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex=" + args.ItemsRangeStartIndex + ", ItemsRangeRequestedLength=" + args.ItemsRangeRequestedLength);
01468
01469                         Verify.IsGreaterThanOrEqual(args.ItemsRangeStartIndex, 0);
01470                         Verify.IsGreaterThan(args.ItemsRangeRequestedLength, 0);
01471
01472                         if (!provideItemsInfo)
01473                         {
01474                             // For the next ItemsInfoRequested handling: provide requested items info only.
01475                             provideItemsInfo = true;
01476
01477                             // Trigger the regular path without ItemsInfo at all.
01478                             return;
01479                         }
01480
01481                         int arrayStart = provideExtraItemsInfo ? 0 : args.ItemsRangeStartIndex;
01482                         int arrayLength = provideExtraItemsInfo ? itemsSource.Count : args.ItemsRangeRequestedLength;
01483
01484                         args.ItemsRangeStartIndex = arrayStart;
01485
01486                         double[] desiredAspectRatios = new double[arrayLength];
01487
01488                         for (int index = 0; index < arrayLength; index++)
01489                         {
01490                             desiredAspectRatios[index] = 0.8 + (index + arrayStart) / 600.0;
01491                         }
01492
01493                         args.SetDesiredAspectRatios(desiredAspectRatios);
01494
01495                         if (useSizeArrays)
01496                         {
01497                             args.MinWidth = -1.0;
01498                             args.MaxWidth = -1.0;
01499
01500                             double[] minWidths = new double[arrayLength];
01501
01502                             for (int index = 0; index < arrayLength; index++)
01503                             {
01504                                 minWidths[index] = (index + arrayStart) / 25.0;
01505                             }
01506
01507                             args.SetMinWidths(minWidths);
01508
01509                             double[] maxWidths = new double[arrayLength];
01510
01511                             for (int index = 0; index < arrayLength; index++)
01512                             {
01513                                 maxWidths[index] = (index + arrayStart) / 5.0 + 125.0;
01514                             }
01515
01516                             args.SetMaxWidths(maxWidths);
01517                         }
01518                         else
01519                         {
01520                             args.MinWidth = 40.0;
01521                             args.MaxWidth = 140.0;
01522                         }
01523
01524                         itemsInfoRequestedCount++;
01525
01526                         if (provideExtraItemsInfo)
01527                         {
01528                             // For the next ItemsInfoRequested handling: do not provide any items info at all.
01529
01530                             provideItemsInfo = false;
01531                             provideExtraItemsInfo = false;
01532                         }
01533                         else
01534                         {
01535                             // For the next ItemsInfoRequested handling: provide items info for the entire collection.
01536
01537                             provideExtraItemsInfo = true;
01538                         }
01539
01540                         linedFlowLayoutItemsInfoRequestedEvent.Set();
01541                     };
01542
01543                     itemsView = new ItemsView()
01544                     {
01545                         Layout = linedFlowLayout,
01546                         ItemsSource = itemsSource
01547                     };
01548
01549                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
01550                 });
01551
01552                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
01553                 WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);
01554
01555                 IdleSynchronizer.Wait();
01556
01557                 RunOnUIThread.Execute(() =>
01558                 {
01559                     Log.Comment("Extracting ScrollView");
01560                     scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
01561                     Verify.IsNotNull(scrollView);
01562
01563                     scrollView.ScrollCompleted += (sender, args) =>
01564                     {
01565                         Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);
01566
01567                         scrollViewScrollCompletedEvent.Set();
01568                     };
01569                 });
01570
01571                 for (int scrollCount = 0; scrollCount < 5; scrollCount++)
01572                 {
01573                     RunOnUIThread.Execute(() =>
01574                     {
01575                         scrollViewScrollCompletedEvent.Reset();
01576
01577                         Log.Comment("Invoking ScrollView.ScrollTo");
01578                         scrollView.ScrollTo(0.0, scrollView.ScrollableHeight / 6 * (scrollCount + 1), new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
01579                     });
01580
01581                     WaitForEvent("Waiting for ScrollCompleted event", scrollViewScrollCompletedEvent);
01582
01583                     IdleSynchronizer.Wait();
01584
01585                     RunOnUIThread.Execute(() =>
01586                     {
01587                         linedFlowLayoutItemsInfoRequestedEvent.Reset();
01588
01589                         Log.Comment("Adding datasource item");
01590                         itemsSource.Add((1000 + scrollCount).ToString() + "-" + rnd.Next(20));
01591                     });
01592
01593                     WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);
01594
01595                     IdleSynchronizer.Wait();
01596
01597                     Log.Comment($"ItemsInfoRequested event count={itemsInfoRequestedCount}");
01598                 }
01599
01600                 RunOnUIThread.Execute(() =>
01601                 {
01602                     Log.Comment("Resetting window content and ItemsView");
01603                     Content = null;
01604                     itemsView = null;
01605                 });
01606
01607                 WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
01608                 Log.Comment("Done");
01609             }
01610         }
01611
01612         private void HandleItemsInfoRequested(bool useSizeArrays, bool useExtraInfo, bool useTemporaryAspectRatio)
01613         {
01614             List<string> types = new List<string>
01615             {
01616                 "ItemsView",
01617                 "ScrollView",
01618                 "ItemsRepeater"
01619             };
01620
01621             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
01622             {
01623                 ItemsView itemsView = null;
01624                 ScrollView scrollView = null;
01625                 LinedFlowLayout linedFlowLayout = null;
01626                 int itemsInfoRequestedCount = 0;
01627                 bool provideNilAspectRatios = useTemporaryAspectRatio;
01628                 Random rnd = new Random();
01629                 List<string> itemsSource = new List<string>(Enumerable.Range(0, 200).Select(k => k + " - " + rnd.Next(100)));
01630                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
01631                 AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
01632                 AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
01633                 AutoResetEvent linedFlowLayoutItemsInfoRequestedEvent = new AutoResetEvent(false);
01634
01635                 RunOnUIThread.Execute(() =>
01636                 {
01637                     linedFlowLayout = new LinedFlowLayout()
01638                     {
01639                         LineHeight = 50.0
01640                     };
01641
01642                     linedFlowLayout.ItemsInfoRequested += (sender, args) =>
01643                     {
01644                         Log.Comment("LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex=" + args.ItemsRangeStartIndex + ", ItemsRangeRequestedLength=" + args.ItemsRangeRequestedLength);
01645
01646                         Verify.IsGreaterThanOrEqual(args.ItemsRangeStartIndex, 0);
01647                         Verify.IsGreaterThan(args.ItemsRangeRequestedLength, 0);
01648
01649                         int arrayStart = useExtraInfo ? 0 : args.ItemsRangeStartIndex;
01650                         int arrayLength = useExtraInfo ? itemsSource.Count : args.ItemsRangeRequestedLength;
01651
01652                         args.ItemsRangeStartIndex = arrayStart;
01653
01654                         double[] desiredAspectRatios = new double[arrayLength];
01655
01656                         for (int index = 0; index < arrayLength; index++)
01657                         {
01658                             if (provideNilAspectRatios && index % 10 == 0)
01659                             {
01660                                 // An aspect ratio <= 0 indicates that the actual number is still unknown.
01661                                 desiredAspectRatios[index] = 0.0;
01662                             }
01663                             else
01664                             {
01665                                 desiredAspectRatios[index] = 5.0 / (index + arrayStart + 1.0);
01666                             }
01667                         }
01668
01669                         args.SetDesiredAspectRatios(desiredAspectRatios);
01670
01671                         if (useSizeArrays)
01672                         {
01673                             double[] minWidths = new double[arrayLength];
01674
01675                             for (int index = 0; index < arrayLength; index++)
01676                             {
01677                                 minWidths[index] = index + arrayStart;
01678                             }
01679
01680                             args.SetMinWidths(minWidths);
01681
01682                             double[] maxWidths = new double[arrayLength];
01683
01684                             for (int index = 0; index < arrayLength; index++)
01685                             {
01686                                 maxWidths[index] = index + arrayStart + 100.0;
01687                             }
01688
01689                             args.SetMaxWidths(maxWidths);
01690                         }
01691                         else
01692                         {
01693                             args.MinWidth = 40.0;
01694                             args.MaxWidth = 140.0;
01695                         }
01696
01697                         itemsInfoRequestedCount++;
01698
01699                         linedFlowLayoutItemsInfoRequestedEvent.Set();
01700                     };
01701
01702                     itemsView = new ItemsView()
01703                     {
01704                         Layout = linedFlowLayout,
01705                         ItemsSource = itemsSource
01706                     };
01707
01708                     SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
01709                 });
01710
01711                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
01712                 WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);
01713
01714                 IdleSynchronizer.Wait();
01715
01716                 RunOnUIThread.Execute(() =>
01717                 {
01718                     Log.Comment("Extracting ScrollView");
01719                     scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
01720                     Verify.IsNotNull(scrollView);
01721
01722                     scrollView.ScrollCompleted += (sender, args) =>
01723                     {
01724                         Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);
01725
01726                         scrollViewScrollCompletedEvent.Set();
01727                     };
01728
01729                     linedFlowLayoutItemsInfoRequestedEvent.Reset();
01730
01731                     Log.Comment("Invoking ScrollView.ScrollTo");
01732                     scrollView.ScrollTo(0.0, 2000.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
01733                 });
01734
01735                 WaitForEvent("Waiting for ScrollCompleted event", scrollViewScrollCompletedEvent);
01736
01737                 IdleSynchronizer.Wait();
01738
01739                 Log.Comment($"ItemsInfoRequested event count={itemsInfoRequestedCount}");
01740
01741                 if (useExtraInfo)
01742                 {
01743                     Verify.AreEqual(itemsInfoRequestedCount, 1);
01744                 }
01745                 else
01746                 {
01747                     WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);
01748
01749                     Verify.IsGreaterThan(itemsInfoRequestedCount, 1);
01750                 }
01751
01752                 RunOnUIThread.Execute(() =>
01753                 {
01754                     Log.Comment("Extracting ItemsRepeater");
01755                     ItemsRepeater itemsRepeater = scrollView.Content as ItemsRepeater;
01756                     Verify.IsNotNull(itemsRepeater);
01757
01758                     int itemsRepeaterChildrenCount = VisualTreeHelper.GetChildrenCount(itemsRepeater);
01759                     Log.Comment($"ItemsRepeater children count: {itemsRepeaterChildrenCount}");
01760
01761                     if (useTemporaryAspectRatio)
01762                     {
01763                         provideNilAspectRatios = false;
01764                         linedFlowLayoutItemsInfoRequestedEvent.Reset();
01765
01766                         Log.Comment("Invoking LinedFlowLayout.InvalidateItemsInfo to trigger a new ItemsInfoRequested event");
01767                         linedFlowLayout.InvalidateItemsInfo();
01768                     }
01769                 });
01770
01771                 IdleSynchronizer.Wait();
01772
01773                 RunOnUIThread.Execute(() =>
01774                 {
01775                     if (useTemporaryAspectRatio)
01776                     {
01777                         WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);
01778
01779                         Log.Comment($"ItemsInfoRequested event count={itemsInfoRequestedCount}");
01780                         if (useExtraInfo)
01781                         {
01782                             Verify.AreEqual(itemsInfoRequestedCount, 2);
01783                         }
01784                         else
01785                         {
01786                             Verify.IsGreaterThan(itemsInfoRequestedCount, 2);
01787                         }
01788                     }
01789
01790                     Log.Comment("Resetting window content and ItemsView");
01791                     Content = null;
01792                     itemsView = null;
01793                 });
01794
01795                 WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
01796                 Log.Comment("Done");
01797             }
01798         }
01799
01800         private void TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(
01801             LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger trigger)
01802         {
01803             Log.Comment($"TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException - trigger={trigger}");
01804
01805             ItemsView itemsView = null;
01806             LinedFlowLayout linedFlowLayout = null;
01807             List<string> itemsSource = new List<string>(Enumerable.Range(0, 300).Select(k => k + " - " + (new Random()).Next(100)));
01808             AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
01809             AutoResetEvent itemsViewUnloadedEvent = new AutoResetEvent(false);
01810             AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
01811             AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
01812             AutoResetEvent linedFlowLayoutItemsInfoRequestedEvent = new AutoResetEvent(false);
01813             bool linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown = false;
01814
01815             RunOnUIThread.Execute(() =>
01816             {
01817                 linedFlowLayout = new LinedFlowLayout()
01818                 {
01819                     LineHeight = 50.0
01820                 };
01821
01822                 itemsView = new ItemsView()
01823                 {
01824                     Layout = linedFlowLayout,
01825                     ItemsSource = itemsSource
01826                 };
01827
01828                 SetupDefaultUI(itemsView, itemsViewLoadedEvent, itemsViewUnloadedEvent);
01829             });
01830
01831             WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
01832             IdleSynchronizer.Wait();
01833
01834             RunOnUIThread.Execute(() =>
01835             {
01836                 itemsView.ScrollView.BringingIntoView += (sender, args) =>
01837                 {
01838                     Log.Comment($"ScrollView.BringingIntoView raised - CorrelationId={args.CorrelationId}, TargetVerticalOffset={args.TargetVerticalOffset}");
01839
01840                     scrollViewBringingIntoViewEvent.Set();
01841                 };
01842
01843                 itemsView.ScrollView.ScrollCompleted += (sender, args) =>
01844                 {
01845                     Log.Comment($"ScrollView.ScrollCompleted raised - CorrelationId={args.CorrelationId}, VerticalOffset={itemsView.ScrollView.VerticalOffset}");
01846
01847                     scrollViewScrollCompletedEvent.Set();
01848                 };
01849             });
01850
01851             BringItemIntoView(150, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
01852
01853             RunOnUIThread.Execute(() =>
01854             {
01855                 linedFlowLayout.ItemsInfoRequested += (sender, args) =>
01856                 {
01857                     Log.Comment($"LinedFlowLayout.ItemsInfoRequested raised - ItemsRangeStartIndex={args.ItemsRangeStartIndex}, ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
01858
01859                     Verify.IsGreaterThanOrEqual(args.ItemsRangeStartIndex, 0);
01860                     Verify.IsGreaterThan(args.ItemsRangeRequestedLength, 0);
01861
01862                     try
01863                     {
01864                         switch (trigger)
01865                         {
01866                             case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexNegative:
01867                             {
01868                                 args.ItemsRangeStartIndex = -1;
01869                                 break;
01870                             }
01871                             case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexIncreased:
01872                             {
01873                                 args.ItemsRangeStartIndex++;
01874                                 break;
01875                             }
01876                             case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ItemsRangeStartIndexTooSmall:
01877                             {
01878                                 args.SetMinWidths(new double[args.ItemsRangeRequestedLength]);
01879                                 args.ItemsRangeStartIndex--;
01880                                 break;
01881                             }
01882                             case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthSmallerThanItemsRangeRequestedLength:
01883                             {
01884                                 args.SetMinWidths(new double[args.ItemsRangeRequestedLength - 1]);
01885                                 break;
01886                             }
01887                             case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthTooSmallForDecreasedItemsRangeStartIndex:
01888                             {
01889                                 args.ItemsRangeStartIndex--;
01890                                 args.SetMinWidths(new double[args.ItemsRangeRequestedLength]);
01891                                 break;
01892                             }
01893                             case LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger.ArrayLengthInconsistent:
01894                             {
01895                                 args.SetMinWidths(new double[args.ItemsRangeRequestedLength]);
01896                                 args.SetMaxWidths(new double[args.ItemsRangeRequestedLength + 1]);
01897                                 break;
01898                             }
01899                         }
01900                     }
01901                     catch (Exception exception)
01902                     {
01903                         Log.Comment($"Exception={exception.ToString()}");
01904                         linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown = true;
01905                     }
01906
01907                     linedFlowLayoutItemsInfoRequestedEvent.Set();
01908                 };
01909
01910                 Log.Comment("Triggering the ItemsInfoRequested event");
01911                 itemsView.ScrollView.ScrollBy(0.0, 1.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
01912             });
01913
01914             WaitForEvent("Waiting for ItemsInfoRequested event", linedFlowLayoutItemsInfoRequestedEvent);
01915             IdleSynchronizer.Wait();
01916
01917             RunOnUIThread.Execute(() =>
01918             {
01919                 Log.Comment($"linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown={linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown}");
01920                 Verify.IsTrue(linedFlowLayoutItemsInfoRequestedEventArgsExceptionThrown);
01921
01922                 Log.Comment("Resetting window content and ItemsView");
01923                 Content = null;
01924                 itemsView = null;
01925             });
01926
01927             WaitForEvent("Waiting for Unloaded event", itemsViewUnloadedEvent);
01928             Log.Comment("Done");
01929         }
01930
01931         private void CanBringItemIntoView(bool useLinedFlowLayout, bool useUniformGridLayout)
01932         {
01933             List<string> types = null;
01934
01935             if (useLinedFlowLayout)
01936             {
01937                 types = new List<string>(4);
01938                 types.Add("LinedFlowLayout");
01939             }
01940             else
01941             {
01942                 types = new List<string>(3);
01943             }
01944
01945             types.Add("ItemsRepeater");
01946             types.Add("ScrollView");
01947             types.Add("ItemsView");
01948
01949             using (PrivateLoggingHelper privateIVLoggingHelper = new PrivateLoggingHelper(types, isLoggingInfoLevel: true, isLoggingVerboseLevel: true))
01950             {
01951                 ItemsView itemsView = null;
01952                 ScrollView scrollView = null;
01953                 AutoResetEvent itemsViewLoadedEvent = new AutoResetEvent(false);
01954                 AutoResetEvent scrollViewBringingIntoViewEvent = new AutoResetEvent(false);
01955                 AutoResetEvent scrollViewScrollCompletedEvent = new AutoResetEvent(false);
01956
01957                 RunOnUIThread.Execute(() =>
01958                 {
01959                     itemsView = new ItemsView();
01960
01961                     SetupDefaultUI(itemsView, itemsViewLoadedEvent);
01962                 });
01963
01964                 WaitForEvent("Waiting for Loaded event", itemsViewLoadedEvent);
01965
01966                 RunOnUIThread.Execute(() =>
01967                 {
01968                     scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
01969
01970                     scrollView.BringingIntoView += (sender, args) =>
01971                     {
01972                         Log.Comment("ScrollView.BringingIntoView raised - CorrelationId=" + args.CorrelationId + ", TargetVerticalOffset=" + args.TargetVerticalOffset);
01973
01974                         scrollViewBringingIntoViewEvent.Set();
01975                     };
01976
01977                     scrollView.ScrollCompleted += (sender, args) =>
01978                     {
01979                         Log.Comment("ScrollView.ScrollCompleted raised - CorrelationId=" + args.CorrelationId + ", VerticalOffset=" + scrollView.VerticalOffset);
01980
01981                         scrollViewScrollCompletedEvent.Set();
01982                     };
01983
01984                     Log.Comment("Setting ItemsSource");
01985                     Random rnd = new Random();
01986                     List<string> itemsSource = new List<string>(Enumerable.Range(0, 500).Select(k => k + " - " + rnd.Next(500)));
01987                     Verify.IsNull(itemsView.ItemsSource);
01988                     itemsView.ItemsSource = itemsSource;
01989                     Verify.IsNotNull(itemsView.ItemsSource);
01990                 });
01991
01992                 IdleSynchronizer.Wait();
01993
01994                 RunOnUIThread.Execute(() =>
01995                 {
01996                     Log.Comment("Setting ItemTemplate");
01997                     DataTemplate itemTemplate = XamlReader.Load(
01998                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
01999                             <ItemContainer>
02000                               <TextBlock Text='{Binding}' Foreground='Red'/>
02001                             </ItemContainer>
02002                           </DataTemplate>") as DataTemplate;
02003                     Verify.IsNotNull(itemsView.ItemTemplate);
02004                     itemsView.ItemTemplate = itemTemplate;
02005                     Verify.AreEqual(itemTemplate, itemsView.ItemTemplate);
02006                 });
02007
02008                 IdleSynchronizer.Wait();
02009
02010                 RunOnUIThread.Execute(() =>
02011                 {
02012                     Log.Comment("Setting Layout");
02013
02014                     Verify.IsNotNull(itemsView.Layout);
02015                     Verify.IsTrue(itemsView.Layout is StackLayout);
02016
02017                     if (useLinedFlowLayout)
02018                     {
02019                         LinedFlowLayout linedFlowLayout = new LinedFlowLayout()
02020                         {
02021                             LineHeight = 96,
02022                             LineSpacing = 4,
02023                             MinItemSpacing = 4
02024                         };
02025
02026                         itemsView.Layout = linedFlowLayout;
02027                         Verify.IsTrue(itemsView.Layout is LinedFlowLayout);
02028                     }
02029                     else if (useUniformGridLayout)
02030                     {
02031                         UniformGridLayout uniformGridLayout = new UniformGridLayout()
02032                         {
02033                             MaximumRowsOrColumns = 4,
02034                             MinColumnSpacing = 10,
02035                             MinRowSpacing = 10,
02036                             MinItemWidth = 100,
02037                             MinItemHeight = 100
02038                         };
02039
02040                         itemsView.Layout = uniformGridLayout;
02041                         Verify.IsTrue(itemsView.Layout is UniformGridLayout);
02042                     }
02043                 });
02044
02045                 IdleSynchronizer.Wait();
02046
02047                 BringItemIntoView(350, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
02048                 BringItemIntoView(340, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
02049                 BringItemIntoView(150, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
02050                 BringItemIntoView(160, itemsView, scrollViewBringingIntoViewEvent, scrollViewScrollCompletedEvent);
02051             }
02052         }
02053
02054         private void BringItemIntoView(
02055             int index,
02056             ItemsView itemsView,
02057             AutoResetEvent scrollViewBringingIntoViewEvent,
02058             AutoResetEvent scrollViewScrollCompletedEvent)
02059         {
02060             RunOnUIThread.Execute(() =>
02061             {
02062                 scrollViewBringingIntoViewEvent.Reset();
02063                 scrollViewScrollCompletedEvent.Reset();
02064
02065                 Log.Comment("Invoking ItemsView.StartBringItemIntoView(" + index + ")");
02066
02067                 BringIntoViewOptions bringIntoViewOptions = new BringIntoViewOptions()
02068                 {
02069                     AnimationDesired = false
02070                 };
02071
02072                 itemsView.StartBringItemIntoView(index, bringIntoViewOptions);
02073             });
02074
02075             WaitForEvent("Waiting for BringingIntoView event", scrollViewBringingIntoViewEvent);
02076
02077             WaitForEvent("Waiting for ScrollCompleted event", scrollViewScrollCompletedEvent);
02078
02079             IdleSynchronizer.Wait();
02080
02081             RunOnUIThread.Execute(() =>
02082             {
02083                 int topLeftElementIndex;
02084                 int bottomRightElementIndex;
02085
02086                 itemsView.TryGetItemIndex(horizontalViewportRatio: 0.0, verticalViewportRatio: 0.0, out topLeftElementIndex);
02087                 itemsView.TryGetItemIndex(horizontalViewportRatio: 1.0, verticalViewportRatio: 1.0, out bottomRightElementIndex);
02088
02089                 Log.Comment("Top left element index=" + topLeftElementIndex);
02090                 Log.Comment("Bottom right element index=" + bottomRightElementIndex);
02091
02092                 Verify.IsGreaterThanOrEqual(index, topLeftElementIndex);
02093                 Verify.IsLessThanOrEqual(index, bottomRightElementIndex);
02094             });
02095         }
02096
02097         private void SetupDefaultUI(
02098             ItemsView itemsView,
02099             AutoResetEvent itemsViewLoadedEvent = null,
02100             AutoResetEvent itemsViewUnloadedEvent = null,
02101             bool setAsContentRoot = true,
02102             bool useParentGrid = false)
02103         {
02104             Log.Comment("Setting up default UI with ItemsView");
02105
02106             Verify.IsNotNull(itemsView);
02107             itemsView.Name = "itemsView";
02108             itemsView.Width = c_defaultUIItemsViewWidth;
02109             itemsView.Height = c_defaultUIItemsViewHeight;
02110
02111             if (itemsViewLoadedEvent != null)
02112             {
02113                 itemsView.Loaded += (object sender, RoutedEventArgs e) =>
02114                 {
02115                     Log.Comment("ItemsView.Loaded event handler");
02116                     itemsViewLoadedEvent.Set();
02117                 };
02118             }
02119
02120             if (itemsViewUnloadedEvent != null)
02121             {
02122                 itemsView.Unloaded += (object sender, RoutedEventArgs e) =>
02123                 {
02124                     Log.Comment("ItemsView.Unloaded event handler");
02125                     itemsViewUnloadedEvent.Set();
02126                 };
02127             }
02128
02129             Grid parentGrid = null;
02130
02131             if (useParentGrid)
02132             {
02133                 parentGrid = new Grid();
02134                 parentGrid.Width = c_defaultUIItemsViewWidth * 2;
02135                 parentGrid.Height = c_defaultUIItemsViewHeight * 2;
02136
02137                 itemsView.HorizontalAlignment = HorizontalAlignment.Left;
02138                 itemsView.VerticalAlignment = VerticalAlignment.Top;
02139
02140                 parentGrid.Children.Add(itemsView);
02141             }
02142
02143             if (setAsContentRoot)
02144             {
02145                 Log.Comment("Setting window content");
02146                 if (useParentGrid)
02147                 {
02148                     Content = parentGrid;
02149                 }
02150                 else
02151                 {
02152                     Content = itemsView;
02153                 }
02154             }
02155         }
02156
02157         private void LogItemsViewProperties(ItemsView itemsView)
02158         {
02159             Log.Comment(" - itemsView.ItemTemplate: " + (itemsView.ItemTemplate == null ? "null" : "non-null"));
02160             Log.Comment(" - itemsView.ItemsSource: " + (itemsView.ItemsSource == null ? "null" : "non-null"));
02161             Log.Comment(" - itemsView.SelectedItem: " + (itemsView.SelectedItem == null ? "null" : "non-null"));
02162             Log.Comment(" - itemsView.CurrentItemIndex: " + itemsView.CurrentItemIndex);
02163             Log.Comment(" - itemsView.Layout: " + (itemsView.Layout == null ? "null" : "non-null"));
02164             Log.Comment(" - itemsView.Layout as StackLayout: " + ((itemsView.Layout as StackLayout) == null ? "null" : "non-null"));
02165             Log.Comment(" - itemsView.IsEnabled: " + itemsView.IsEnabled);
02166             Log.Comment(" - itemsView.IsTabStop: " + itemsView.IsTabStop);
02167             Log.Comment(" - itemsView.XYFocusKeyboardNavigation: " + itemsView.XYFocusKeyboardNavigation);
02168             Log.Comment(" - itemsView.TabNavigation: " + itemsView.TabNavigation);
02169             Log.Comment(" - itemsView.SelectionMode: " + itemsView.SelectionMode);
02170         }
02171
02172         private void WaitForEvent(string logComment, EventWaitHandle eventWaitHandle)
02173         {
02174             Log.Comment(logComment);
02175             if (!eventWaitHandle.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration)))
02176             {
02177                 throw new Exception("Timeout expiration in WaitForEvent.");
02178             }
02179         }
02180     }
02181 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshInteractionRatioChangedEventArgs.cpp Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

RefreshInteractionRatioChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RefreshInteractionRatioChangedEventArgs.h"
00007 #include "PTRTracing.h"
00008
00009 RefreshInteractionRatioChangedEventArgs::RefreshInteractionRatioChangedEventArgs(double value)
00010 {
00011     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00012     m_interactionRatio = value;
00013 }
00014
00015 double RefreshInteractionRatioChangedEventArgs::InteractionRatio()
00016 {
00017     return m_interactionRatio;
00018 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/FlowLayoutTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

FlowLayoutTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks;
00006 using MUXControlsTestApp.Utilities;
00007 using System;
00008 using System.Collections.Generic;
00009 using System.Collections.ObjectModel;
00010 using System.Linq;
00011 using System.Threading;
00012 using Windows.Foundation;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Controls.Primitives;
00015 using Microsoft.UI.Xaml.Markup;
00016 using Common;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00023 {
00024     [TestClass]
00025     public class FlowLayoutTests : ApiTestBase
00026     {
00027         [TestMethod]
00028         public void ValidateStackLayout()
00029         {
00030             RunOnUIThread.Execute(() =>
00031             {
00032                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00033                 {
00034                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00035                     var om = new OrientationBasedMeasures(scrollOrientation);
00036                     const int panelMinorSize = 400;
00037                     const int numItems = 5;
00038                     const int itemMajorSize = 50;
00039                     // We test for when the item is smaller than the panel and when it's bigger than the panel:
00040                     int[] itemMinorSizeChoices = new int[] { 200, 800 };
00041
00042                     foreach (int itemMinorSize in itemMinorSizeChoices)
00043                     {
00044
00045                         LayoutPanel panel = new LayoutPanel()
00046                         {
00047                             Layout = new StackLayout() { Orientation = scrollOrientation.ToLayoutOrientation() }
00048                         };
00049
00050                         SetPanelMinorSize(panel, om, panelMinorSize);
00051                         for (int i = 0; i < numItems; i++)
00052                         {
00053                             panel.Children.Add(
00054                                 new Button()
00055                                 {
00056                                     Content = i,
00057                                     Width = om.IsVertical ? itemMinorSize : itemMajorSize,
00058                                     Height = om.IsVertical ? itemMajorSize : itemMinorSize
00059                                 });
00060                         }
00061
00062                         Content = panel;
00063                         Content.UpdateLayout();
00064                         int itemSpacing = 0;
00065                         ValidateStackLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], panelMinorSize, numItems, itemMajorSize, itemSpacing, panel.DesiredSize);
00066
00067                         itemSpacing = 10;
00068                         ((StackLayout)panel.Layout).Spacing = itemSpacing;
00069                         panel.UpdateLayout();
00070                         ValidateStackLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], panelMinorSize, numItems, itemMajorSize, itemSpacing, panel.DesiredSize);
00071                     }
00072                 }
00073             });
00074         }
00075
00076         [TestMethod]
00077         public void ValidateGridLayout()
00078         {
00079             RunOnUIThread.Execute(() =>
00080             {
00081                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00082                 {
00083                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00084                     var om = new OrientationBasedMeasures(scrollOrientation);
00085                     const int panelMinorSize = 400;
00086                     const int numItems = 10;
00087                     const int itemMajorSize = 50;
00088                     int[] itemMinorSizeChoices = new int[] { 100, 800 };
00089
00090                     foreach (int itemMinorSize in itemMinorSizeChoices)
00091                     {
00092                         Log.Comment(string.Format("MinorSize: {0}", itemMinorSize));
00093                         LayoutPanel panel = new LayoutPanel()
00094                         {
00095                             Layout = new UniformGridLayout()
00096                             {
00097                                 Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00098                                 ItemsJustification = UniformGridLayoutItemsJustification.Start,
00099                                 MinItemWidth = om.IsVertical ? itemMinorSize : itemMajorSize,
00100                                 MinItemHeight = om.IsVertical ? itemMajorSize : itemMinorSize
00101                             },
00102                             VerticalAlignment = VerticalAlignment.Top,
00103                             HorizontalAlignment = HorizontalAlignment.Left
00104                         };
00105
00106                         SetPanelMinorSize(panel, om, panelMinorSize);
00107                         for (int i = 0; i < numItems; i++)
00108                         {
00109                             panel.Children.Add(new Button() { Content = i });
00110                         }
00111
00112                         // Put the panel inside a canvas to give it all the space it needs
00113                         // and avoid any clipping of desired size by the framework.
00114                         var canvas = new Canvas();
00115                         canvas.Children.Add(panel);
00116                         Content = canvas;
00117                         Content.UpdateLayout();
00118                         int minRowSpacing = 0;
00119                         int minColumnSpacing = 0;
00120                         ValidateGridLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], itemMinorSize, itemMajorSize, minRowSpacing, minColumnSpacing, panel.Children.Count, panel.DesiredSize);
00121
00122                         var layout = (UniformGridLayout)panel.Layout;
00123                         minRowSpacing = 5;
00124                         minColumnSpacing = 10;
00125                         layout.MinRowSpacing = minRowSpacing;
00126                         layout.MinColumnSpacing = minColumnSpacing;
00127                         Content.UpdateLayout();
00128                         ValidateGridLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], itemMinorSize, itemMajorSize, minRowSpacing, minColumnSpacing, panel.Children.Count, panel.DesiredSize);
00129
00130                         // Change the properties and validate that they are reflected in the
00131                         // layout bounds of children once layout has completed.
00132                         minRowSpacing = 5;
00133                         minColumnSpacing = 10;
00134                         layout.MinRowSpacing = minRowSpacing;
00135                         layout.MinColumnSpacing = minColumnSpacing;
00136                         layout.MinItemWidth *= 2;
00137                         layout.MinItemHeight *= 2;
00138                         Content.UpdateLayout();
00139                         ValidateGridLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], itemMinorSize*2, itemMajorSize*2, minRowSpacing, minColumnSpacing, panel.Children.Count, panel.DesiredSize);
00140                     }
00141                 }
00142             });
00143         }
00144
00145         [TestMethod]
00146         public void ValidateResizingFirstItemResizesOtherItemsInGridLayout()
00147         {
00148             RunOnUIThread.Execute(() =>
00149             {
00150                 const int numItems = 10;
00151                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00152                 {
00153                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00154                     foreach (DimensionChoice dimension in Enum.GetValues(typeof(DimensionChoice)))
00155                     {
00156                         LayoutPanel panel = new LayoutPanel()
00157                         {
00158                             Layout = new UniformGridLayout() { }
00159                         };
00160
00161                         for (int i = 0; i < numItems; i++)
00162                         {
00163                             panel.Children.Add(new Button() { Content = i, HorizontalAlignment = HorizontalAlignment.Stretch });
00164                         }
00165
00166                         Content = panel;
00167                         Content.UpdateLayout();
00168
00169                         // verify the defaults before our modification
00170                         for (int i = 0; i < panel.Children.Count; i++)
00171                         {
00172                             var child = (FrameworkElement)panel.Children.ElementAt(i);
00173                             var layoutBounds = LayoutInformation.GetLayoutSlot(child);
00174
00175                             // Ensure width is not 100 before updating.
00176                             Verify.AreNotEqual(100, layoutBounds.Width);
00177                             Verify.AreEqual(30, layoutBounds.Height);
00178                         }
00179
00180                         // modify the first item's width, height, or both
00181                         var firstItem = panel.Children[0] as Button;
00182
00183                         switch (dimension)
00184                         {
00185                             case DimensionChoice.Width:
00186                                 firstItem.Width = 100;
00187                                 break;
00188                             case DimensionChoice.Height:
00189                                 firstItem.Height = 100;
00190                                 break;
00191                             case DimensionChoice.Size:
00192                                 firstItem.Width = 100;
00193                                 firstItem.Height = 100;
00194                                 break;
00195                             default:
00196                                 throw new InvalidOperationException("Unhandled dimension choice.");
00197                         }
00198
00199                         // Need to invalidate measure to kick in bigger size,
00200                         // If the new size is larger, then setting the value does not
00201                         // invalidate measure, because the desired size is going to be same.
00202                         panel.InvalidateMeasure();
00203                         Content.UpdateLayout();
00204
00205                         // validate that our dimension's size has propagated to all other buttons
00206                         for (int i = 0; i < panel.Children.Count; i++)
00207                         {
00208                             var child = (FrameworkElement)panel.Children.ElementAt(i);
00209                             var layoutBounds = LayoutInformation.GetLayoutSlot(child);
00210
00211                             switch (dimension)
00212                             {
00213                                 case DimensionChoice.Width:
00214                                     Verify.AreEqual(100, layoutBounds.Width);
00215                                     break;
00216                                 case DimensionChoice.Height:
00217                                     Verify.AreEqual(100, layoutBounds.Height);
00218                                     break;
00219                                 case DimensionChoice.Size:
00220                                     Verify.AreEqual(100, layoutBounds.Width);
00221                                     Verify.AreEqual(100, layoutBounds.Height);
00222                                     break;
00223                                 default:
00224                                     throw new InvalidOperationException("Unhandled dimension choice.");
00225
00226                             }
00227                         }
00228
00229                         // Make the first item smaller
00230                         switch (dimension)
00231                         {
00232                             case DimensionChoice.Width:
00233                                 firstItem.Width = 32;
00234                                 break;
00235                             case DimensionChoice.Height:
00236                                 firstItem.Height = 32;
00237                                 break;
00238                             case DimensionChoice.Size:
00239                                 firstItem.Width = 32;
00240                                 firstItem.Height = 32;
00241                                 break;
00242                             default:
00243                                 throw new InvalidOperationException("Unhandled dimension choice.");
00244                         }
00245
00246                         Content.UpdateLayout();
00247
00248                         // validate that our dimension's size has propagated to all other buttons
00249                         for (int i = 0; i < panel.Children.Count; i++)
00250                         {
00251                             var child = (FrameworkElement)panel.Children.ElementAt(i);
00252                             var layoutBounds = LayoutInformation.GetLayoutSlot(child);
00253
00254                             switch (dimension)
00255                             {
00256                                 case DimensionChoice.Width:
00257                                     Verify.AreEqual(32, layoutBounds.Width);
00258                                     break;
00259                                 case DimensionChoice.Height:
00260                                     Verify.AreEqual(32, layoutBounds.Height);
00261                                     break;
00262                                 case DimensionChoice.Size:
00263                                     Verify.AreEqual(32, layoutBounds.Width);
00264                                     Verify.AreEqual(32, layoutBounds.Height);
00265                                     break;
00266                                 default:
00267                                     throw new InvalidOperationException("Unhandled dimension choice.");
00268
00269                             }
00270                         }
00271                     }
00272                 }
00273             });
00274         }
00275
00276         [TestMethod]
00277         public void ValidateDefaultWidthForGridLayoutItemsIsBasedOnFirstItem()
00278         {
00279             ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice.Width);
00280         }
00281
00282         [TestMethod]
00283         public void ValidateDefaultHeightForGridLayoutItemsIsBasedOnFirstItem()
00284         {
00285             ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice.Height);
00286         }
00287
00288         [TestMethod]
00289         public void ValidateDefaultSizeForGridLayoutItemsIsBasedOnFirstItem()
00290         {
00291             ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice.Size);
00292         }
00293
00294         [TestMethod]
00295         public void ValidateDefaultSizeForFirstItemDoesntOverridePresetOne()
00296         {
00297             RunOnUIThread.Execute(() =>
00298             {
00299                 const int itemWidth = 50;
00300                 const int itemHeight = 50;
00301
00302                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00303                 {
00304                     LayoutPanel panel = new LayoutPanel()
00305                     {
00306                         Layout = new UniformGridLayout()
00307                         {
00308                             MinItemWidth = itemWidth,
00309                             MinItemHeight = itemHeight,
00310                             Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00311                         }
00312                     };
00313
00314                     PopulatePanelWithButtons(panel, 10 /*numItems*/);
00315                     Content = panel;
00316                     Content.UpdateLayout();
00317
00318                     ModifyElementSize(panel, 0 /*index*/, 100 /*itemWidth*/, 100 /*itemHeight*/);
00319                     Content = panel;
00320                     Content.UpdateLayout();
00321                     ValidateElementsSizeInGridLayout(panel, itemWidth, itemHeight);
00322                 }
00323             });
00324         }
00325
00326         [TestMethod]
00327         public void ValidateAdaptabilityWhenChangingFirstElementWidthForGridLayout()
00328         {
00329             ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice.Width);
00330         }
00331
00332         [TestMethod]
00333         public void ValidateAdaptabilityWhenChangingFirstElementHeightForGridLayout()
00334         {
00335             ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice.Height);
00336         }
00337
00338         [TestMethod]
00339         public void ValidateAdaptabilityWhenChangingFirstElementSizeForGridLayout()
00340         {
00341             ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice.Size);
00342         }
00343
00344         [TestMethod]
00345         public void ValidateGridLayoutJustificationAndStretch()
00346         {
00347             RunOnUIThread.Execute(() =>
00348             {
00349                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00350                 {
00351                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00352                     var om = new OrientationBasedMeasures(scrollOrientation, useLayoutRounding: true);
00353                     const int panelMinorSize = 500;
00354                     const int numItems = 2;
00355                     const int itemMinorSize = 200;
00356                     const int itemMajorSize = 100;
00357                     Log.Comment("UniformGridLayoutItemsJustification.Start");
00358                     LayoutPanel panel = new LayoutPanel()
00359                     {
00360                         Layout = new UniformGridLayout()
00361                         {
00362                             Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00363                             ItemsJustification = UniformGridLayoutItemsJustification.Start,
00364                             MinItemWidth = om.IsVertical ? itemMinorSize : itemMajorSize,
00365                             MinItemHeight = om.IsVertical ? itemMajorSize : itemMinorSize
00366                         }
00367                     };
00368
00369                     SetPanelMinorSize(panel, om, panelMinorSize);
00370                     for (int i = 0; i < numItems; i++)
00371                     {
00372                         panel.Children.Add(new Button() { Content = i });
00373                     }
00374
00375                     Content = panel;
00376                     Content.UpdateLayout();
00377                     var layout = (UniformGridLayout)panel.Layout;
00378
00379                     Log.Comment("UniformGridLayoutItemsJustification.Center");
00380                     layout.ItemsJustification = UniformGridLayoutItemsJustification.Center;
00381                     panel.UpdateLayout();
00382                     ValidateChildBounds(
00383                         panel,
00384                         new List<Rect>()
00385                         {
00386                             om.MinorMajorRect(50, 0, itemMinorSize, itemMajorSize),
00387                             om.MinorMajorRect(250, 0, itemMinorSize, itemMajorSize)
00388                         });
00389
00390                     Log.Comment("UniformGridLayoutItemsJustification.End");
00391                     layout.ItemsJustification = UniformGridLayoutItemsJustification.End;
00392                     panel.UpdateLayout();
00393                     ValidateChildBounds(
00394                         panel,
00395                         new List<Rect>()
00396                         {
00397                             om.MinorMajorRect(100, 0, itemMinorSize, itemMajorSize),
00398                             om.MinorMajorRect(300, 0, itemMinorSize, itemMajorSize)
00399                         });
00400
00401                     Log.Comment("UniformGridLayoutItemsJustification.SpaceBetween");
00402                     layout.ItemsJustification = UniformGridLayoutItemsJustification.SpaceBetween;
00403                     panel.UpdateLayout();
00404                     ValidateChildBounds(
00405                         panel,
00406                         new List<Rect>()
00407                         {
00408                             om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize),
00409                             om.MinorMajorRect(300, 0, itemMinorSize, itemMajorSize)
00410                         });
00411
00412                     Log.Comment("UniformGridLayoutItemsJustification.SpaceAround");
00413                     layout.ItemsJustification = UniformGridLayoutItemsJustification.SpaceAround;
00414                     panel.UpdateLayout();
00415                     ValidateChildBounds(
00416                         panel,
00417                         new List<Rect>()
00418                         {
00419                             om.MinorMajorRect(25, 0, itemMinorSize, itemMajorSize),
00420                             om.MinorMajorRect(275, 0, itemMinorSize, itemMajorSize)
00421                         });
00422
00423                     Log.Comment("UniformGridLayoutItemsJustification.SpaceEvenly");
00424                     layout.ItemsJustification = UniformGridLayoutItemsJustification.SpaceEvenly;
00425
00426                     panel.UpdateLayout();
00427                     ValidateChildBounds(
00428                         panel,
00429                         new List<Rect>()
00430                         {
00431                             om.MinorMajorRect(33.3333, 0, itemMinorSize, itemMajorSize),
00432                             om.MinorMajorRect(266.6667, 0, itemMinorSize, itemMajorSize)
00433                         });
00434
00435                     Log.Comment("UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Fill");
00436                     layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
00437                     layout.ItemsStretch = UniformGridLayoutItemsStretch.Fill;
00438                     layout.MinRowSpacing = 10;
00439                     layout.MinColumnSpacing = 10;
00440                     panel.UpdateLayout();
00441                     ValidateChildBounds(
00442                         panel,
00443                         new List<Rect>()
00444                         {
00445                             om.MinorMajorRect(0, 0, itemMinorSize + 45, itemMajorSize),
00446                             om.MinorMajorRect(255, 0, itemMinorSize + 45, itemMajorSize)
00447                         });
00448
00449                     Log.Comment("UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Uniform");
00450                     layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
00451                     layout.ItemsStretch = UniformGridLayoutItemsStretch.Uniform;
00452                     layout.MinRowSpacing = 10;
00453                     layout.MinColumnSpacing = 10;
00454                     panel.UpdateLayout();
00455                     ValidateChildBounds(
00456                         panel,
00457                         new List<Rect>()
00458                         {
00459                             om.MinorMajorRect(0, 0, itemMinorSize + 45, itemMajorSize + 22.5),
00460                             om.MinorMajorRect(255, 0, itemMinorSize + 45, itemMajorSize + 22.5)
00461                         });
00462                 }
00463             });
00464         }
00465
00466         [TestMethod]
00467         public void ValidateGridLayoutMaximumRowsOrColumns()
00468         {
00469             RunOnUIThread.Execute(() =>
00470             {
00471                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00472                 {
00473                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00474                     var om = new OrientationBasedMeasures(scrollOrientation, useLayoutRounding: true);
00475                     const int panelMinorSize = 500;
00476                     const int numItems = 4;
00477                     const int itemMinorSize = 150;
00478                     const int itemMajorSize = 100;
00479                     Log.Comment("UniformGridLayoutItemsJustification.Start + UniformGridLayoutItemsStretch.None");
00480                     LayoutPanel panel = new LayoutPanel();
00481                     var layout = new UniformGridLayout()
00482                     {
00483                         Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00484                         ItemsJustification = UniformGridLayoutItemsJustification.Start,
00485                         MinItemWidth = om.IsVertical ? itemMinorSize : itemMajorSize,
00486                         MinItemHeight = om.IsVertical ? itemMajorSize : itemMinorSize
00487                     };
00488
00489                     SetPanelMinorSize(panel, om, panelMinorSize);
00490                     for (int i = 0; i < numItems; i++)
00491                     {
00492                         panel.Children.Add(new Button() { Content = i });
00493                     }
00494
00495                     panel.Layout = layout;
00496                     Content = panel;
00497                     panel.UpdateLayout();
00498
00499                     Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns}");
00500                     ValidateChildBounds(
00501                         panel,
00502                         new List<Rect>()
00503                         {
00504                             om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize),
00505                             om.MinorMajorRect(150, 0, itemMinorSize, itemMajorSize),
00506                             om.MinorMajorRect(300, 0, itemMinorSize, itemMajorSize),
00507                             om.MinorMajorRect(0, 100, itemMinorSize, itemMajorSize)
00508                         });
00509
00510                     layout.MaximumRowsOrColumns = 0;
00511                     Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns}");
00512                     panel.UpdateLayout();
00513                     ValidateChildBounds(
00514                         panel,
00515                         new List<Rect>()
00516                         {
00517                             om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize),
00518                             om.MinorMajorRect(0, 100, itemMinorSize, itemMajorSize),
00519                             om.MinorMajorRect(0, 200, itemMinorSize, itemMajorSize),
00520                             om.MinorMajorRect(0, 300, itemMinorSize, itemMajorSize)
00521                         });
00522
00523                     layout.MaximumRowsOrColumns = 1;
00524                     Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns} + UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Uniform");
00525                     layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
00526                     layout.ItemsStretch = UniformGridLayoutItemsStretch.Uniform;
00527                     layout.MinRowSpacing = 10;
00528                     layout.MinColumnSpacing = 10;
00529                     var aspectRatio = itemMinorSize / (double)itemMajorSize;
00530                     var extraMajorSize = (panelMinorSize - itemMinorSize) / aspectRatio;
00531                     var majorOffset = itemMajorSize + extraMajorSize + layout.MinRowSpacing;
00532                     panel.UpdateLayout();
00533                     ValidateChildBounds(
00534                         panel,
00535                         new List<Rect>()
00536                         {
00537                             om.MinorMajorRect(0, 0,               panelMinorSize, itemMajorSize + extraMajorSize),
00538                             om.MinorMajorRect(0, majorOffset,     panelMinorSize, itemMajorSize + extraMajorSize),
00539                             om.MinorMajorRect(0, majorOffset * 2, panelMinorSize, itemMajorSize + extraMajorSize),
00540                             om.MinorMajorRect(0, majorOffset * 3, panelMinorSize, itemMajorSize + extraMajorSize),
00541                         });
00542
00543                     layout.MaximumRowsOrColumns = 2;
00544                     Log.Comment($"MaximumRowsOrColumns = {layout.MaximumRowsOrColumns} + UniformGridLayoutItemsJustification.Start +  UniformGridLayoutItemsStretch.Fill");
00545                     layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
00546                     layout.ItemsStretch = UniformGridLayoutItemsStretch.Fill;
00547                     layout.MinRowSpacing = 10;
00548                     layout.MinColumnSpacing = 10;
00549                     panel.UpdateLayout();
00550                     ValidateChildBounds(
00551                         panel,
00552                         new List<Rect>()
00553                         {
00554                             om.MinorMajorRect(0,    0,                  itemMinorSize + 95, itemMajorSize),
00555                             om.MinorMajorRect(255,  0,                  itemMinorSize + 95, itemMajorSize),
00556                             om.MinorMajorRect(0,    itemMajorSize + 10, itemMinorSize + 95, itemMajorSize),
00557                             om.MinorMajorRect(255,  itemMajorSize + 10, itemMinorSize + 95, itemMajorSize),
00558                         });
00559
00560                 }
00561             });
00562         }
00563
00564         [TestMethod]
00565         public void ValidateGridLayoutDesiredSizingWithMaxRowsOrColumnsSet()
00566         {
00567             RunOnUIThread.Execute(() =>
00568             {
00569                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00570                 {
00571                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00572                     var om = new OrientationBasedMeasures(scrollOrientation, useLayoutRounding: true);
00573                     const int numItems = 4;
00574
00575                     int itemSize = 100;
00576
00577                     LayoutPanel panel = new LayoutPanel();
00578                     var layout = new UniformGridLayout() {
00579                         Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00580                         ItemsJustification = UniformGridLayoutItemsJustification.Start,
00581                         MinItemWidth = itemSize,
00582                         MinItemHeight = itemSize,
00583                         MinRowSpacing = 0,
00584                         MinColumnSpacing = 0
00585                     };
00586
00587                     for (int i = 0; i < numItems; i++)
00588                     {
00589                         panel.Children.Add(new Button() { Content = i,Width = itemSize,Height = itemSize });
00590                     }
00591
00592                     panel.Layout = layout;
00593                     Content = panel;
00594
00595                     // Place in top left corner to prevent stretch of panel
00596                     panel.VerticalAlignment = VerticalAlignment.Top;
00597                     panel.HorizontalAlignment = HorizontalAlignment.Left;
00598                     layout.ItemsJustification = UniformGridLayoutItemsJustification.Start;
00599
00600                     for(int i = 1; i < numItems; i++)
00601                     {
00602                         layout.MaximumRowsOrColumns = i;
00603                         panel.UpdateLayout();
00604
00605                         if (om.IsVertical)
00606                         {
00607                             // Vertical so fill columns first
00608                             Verify.AreEqual(itemSize * i, panel.DesiredSize.Width);
00609                             Verify.AreEqual(Math.Ceiling((double)numItems / (double)i) * itemSize, panel.DesiredSize.Height);
00610                         }
00611                         else
00612                         {
00613                             // Horizontal, fill rows first
00614                             Verify.AreEqual(itemSize * i, panel.DesiredSize.Height);
00615                             Verify.AreEqual(Math.Ceiling((double)numItems / (double)i) * itemSize, panel.DesiredSize.Width);
00616                         }
00617                     }
00618
00619                 }
00620             });
00621         }
00622
00623         [TestMethod]
00624         public void ValidateFlowLayout()
00625         {
00626             RunOnUIThread.Execute(() =>
00627             {
00628                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00629                 {
00630                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00631                     var om = new OrientationBasedMeasures(scrollOrientation);
00632                     int[] panelMinorSizeChoices = new int[] { 10, 50 };
00633                     foreach (int panelMinorSize in panelMinorSizeChoices)
00634                     {
00635                         const int numItems = 10;
00636                         LayoutPanel panel = new LayoutPanel()
00637                         {
00638                             Layout = new FlowLayout()
00639                             {
00640                                 Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00641                                 LineAlignment = FlowLayoutLineAlignment.Start
00642                             }
00643                         };
00644
00645                         SetPanelMinorSize(panel, om, panelMinorSize);
00646                         for (int i = 0; i < numItems; i++)
00647                         {
00648                             panel.Children.Add(new Button() { Content = i });
00649                         }
00650
00651                         Content = panel;
00652
00653                         Content.UpdateLayout();
00654                         int minItemSpacing = 0;
00655                         int lineSpacing = 0;
00656                         ValidateFlowLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], minItemSpacing, lineSpacing, panel.Children.Count, panel.DesiredSize);
00657
00658                         minItemSpacing = 10;
00659                         lineSpacing = 10;
00660                         ((FlowLayout)panel.Layout).MinRowSpacing = minItemSpacing;
00661                         ((FlowLayout)panel.Layout).MinColumnSpacing = lineSpacing;
00662                         Content.UpdateLayout();
00663                         ValidateFlowLayoutChildrenLayoutBounds(om, (i) => panel.Children[i], minItemSpacing, lineSpacing, panel.Children.Count, panel.DesiredSize);
00664                     }
00665                 }
00666             });
00667         }
00668
00669         [TestMethod]
00670         public void ValidateFlowLayoutVaryingHeights()
00671         {
00672             RunOnUIThread.Execute(() =>
00673             {
00674                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00675                 {
00676                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00677                     var om = new OrientationBasedMeasures(scrollOrientation);
00678                     const int numItems = 10;
00679                     LayoutPanel panel = new LayoutPanel()
00680                     {
00681                         Layout = new FlowLayout()
00682                         {
00683                             Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00684                             LineAlignment = FlowLayoutLineAlignment.Start
00685                         }
00686                     };
00687
00688                     SetPanelMinorSize(panel, om, 180);
00689                     for (int i = 0; i < numItems; i++)
00690                     {
00691                         var child = new Button() { Content = i };
00692                         if (scrollOrientation == ScrollOrientation.Vertical)
00693                         {
00694                             child.Width = 50;
00695                             child.Height = 50 + i % 2 * 50;
00696                         }
00697                         else
00698                         {
00699                             child.Width = 50 + i % 2 * 50;
00700                             child.Height = 50;
00701                         }
00702
00703                         panel.Children.Add(child);
00704                     }
00705
00706                     Content = panel;
00707
00708                     Content.UpdateLayout();
00709                     int minItemSpacing = 0;
00710                     int lineSpacing = 0;
00711                     Log.Comment("Validate with no spacing");
00712                     ValidateFlowLayoutChildrenLayoutBounds(
00713                         om,
00714                         (i) => panel.Children[i],
00715                         minItemSpacing,
00716                         lineSpacing,
00717                         panel.Children.Count,
00718                         panel.DesiredSize,
00719                         scrollOrientation == ScrollOrientation.Vertical ? 50 : 100,
00720                         scrollOrientation == ScrollOrientation.Vertical ? 100 : 50);
00721
00722                     minItemSpacing = 10;
00723                     lineSpacing = 10;
00724                     ((FlowLayout)panel.Layout).MinRowSpacing = minItemSpacing;
00725                     ((FlowLayout)panel.Layout).MinColumnSpacing = lineSpacing;
00726                     Content.UpdateLayout();
00727                     Log.Comment("Validate with spacing");
00728                     ValidateFlowLayoutChildrenLayoutBounds(
00729                         om,
00730                         (i) => panel.Children[i],
00731                         minItemSpacing,
00732                         lineSpacing,
00733                         panel.Children.Count,
00734                         panel.DesiredSize,
00735                         scrollOrientation == ScrollOrientation.Vertical ? 50 : 100,
00736                         scrollOrientation == ScrollOrientation.Vertical ? 100 : 50);
00737                 }
00738             });
00739         }
00740
00741         [TestMethod]
00742         public void ValidateFlowLayoutLineAlignment()
00743         {
00744             RunOnUIThread.Execute(() =>
00745             {
00746                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00747                 {
00748                     Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
00749                     var om = new OrientationBasedMeasures(scrollOrientation);
00750                     const int panelMinorSize = 500;
00751                     const int itemMajorSize = 100;
00752                     LayoutPanel panel = new LayoutPanel()
00753                     {
00754                         Layout = new FlowLayout()
00755                         {
00756                             Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00757                             LineAlignment = FlowLayoutLineAlignment.Start
00758                         }
00759                     };
00760
00761                     SetPanelMinorSize(panel, om, panelMinorSize);
00762                     panel.Children.Add(new Button()
00763                     {
00764                         Content = 0,
00765                         Width = om.IsVertical ? 100 : itemMajorSize,
00766                         Height = om.IsVertical ? itemMajorSize : 100,
00767                     });
00768
00769                     panel.Children.Add(new Button()
00770                     {
00771                         Content = 1,
00772                         Width = om.IsVertical ? 200 : itemMajorSize,
00773                         Height = om.IsVertical ? itemMajorSize : 200,
00774                     });
00775
00776                     Content = panel;
00777                     Content.UpdateLayout();
00778                     var layout = (FlowLayout)panel.Layout;
00779                     layout.LineAlignment = FlowLayoutLineAlignment.Center;
00780                     panel.UpdateLayout();
00781                     ValidateChildBounds(
00782                         panel,
00783                         new List<Rect>()
00784                         {
00785                             om.MinorMajorRect(100, 0, 100, itemMajorSize),
00786                             om.MinorMajorRect(200, 0, 200, itemMajorSize)
00787                         });
00788
00789                     layout.LineAlignment = FlowLayoutLineAlignment.End;
00790                     Content.UpdateLayout();
00791                     ValidateChildBounds(
00792                         panel,
00793                         new List<Rect>()
00794                         {
00795                             om.MinorMajorRect(200, 0, 100, itemMajorSize),
00796                             om.MinorMajorRect(300, 0, 200, itemMajorSize)
00797                         });
00798
00799                     layout.LineAlignment = FlowLayoutLineAlignment.SpaceBetween;
00800                     Content.UpdateLayout();
00801                     ValidateChildBounds(
00802                         panel,
00803                         new List<Rect>()
00804                         {
00805                             om.MinorMajorRect(0, 0, 100, itemMajorSize),
00806                             om.MinorMajorRect(300, 0, 200, itemMajorSize)
00807                         });
00808                 }
00809             });
00810         }
00811
00812         [TestMethod]
00813         public void ValidateMakeAnchor()
00814         {
00815             RunOnUIThread.Execute(() =>
00816             {
00817                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00818                 {
00819                     Log.Comment(string.Format("Orientation: {0}", scrollOrientation));
00820                     var om = new OrientationBasedMeasures(scrollOrientation);
00821
00822                     const int numItems = 1000;
00823                     int getElementCallCount = 0;
00824                     int recycleElementCallCount = 0;
00825                     var elementFactory = new RecyclingElementFactoryDerived()
00826                     {
00827                         Templates = { { "key", GetDataTemplate("<Button Content='{Binding}' />") } },
00828                         RecyclePool = new RecyclePool(),
00829                         GetElementFunc = (int index, UIElement owner, UIElement elementFromBase) =>
00830                         {
00831                             getElementCallCount++;
00832                             return elementFromBase;
00833                         },
00834                         ClearElementFunc = (UIElement element, UIElement owner) => recycleElementCallCount++,
00835                     };
00836
00837                     ItemsRepeater repeater = null;
00838                     ScrollViewer scrollViewer = null;
00839                     Content = CreateAndInitializeRepeater
00840                     (
00841                        om,
00842                        itemsSource: Enumerable.Range(0, numItems),
00843                        elementFactory: elementFactory,
00844                        layout: new FlowLayoutDerived()
00845                        {
00846                            Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00847                        },
00848                        repeater: ref repeater,
00849                        scrollViewer: ref scrollViewer
00850                     );
00851
00852                     Content.UpdateLayout();
00853                     // Validate that we are indeed virtualizing
00854                     Verify.IsGreaterThan(numItems, elementFactory.RealizedElementIndices.Count);
00855
00856                     // GetAnchor on an element in view.
00857                     getElementCallCount = 0;
00858                     var anchor = repeater.GetOrCreateElement(1);
00859                     Verify.AreEqual(1, repeater.GetElementIndex(anchor));
00860                     Verify.AreEqual(0, getElementCallCount);
00861
00862                     // GetAnchor on element outside the view.
00863                     recycleElementCallCount = 0;
00864                     int realizedElementsBeforeMakeAnchor = elementFactory.RealizedElementIndices.Count();
00865                     anchor = repeater.GetOrCreateElement(900);
00866                     Verify.AreEqual(900, repeater.GetElementIndex(anchor));
00867                     Verify.AreEqual(1, getElementCallCount);
00868
00869                     Content.UpdateLayout();
00870                     Verify.AreEqual(realizedElementsBeforeMakeAnchor, recycleElementCallCount);
00871                     Verify.IsLessThan(1, elementFactory.RealizedElementIndices.Count());
00872                     Verify.IsGreaterThan(150, elementFactory.RealizedElementIndices.Count());
00873
00874                     Verify.Throws<ArgumentException>(() => repeater.GetOrCreateElement(numItems + 10));
00875                 }
00876             });
00877         }
00878
00879         // TODO: Bug 11136935 - Add test coverage for GetAnchorElement once we have a programatic way to
00880         // provide the suggested anchor.
00881         // Tests should include
00882         //- connected,
00883         //- disconnected
00884         //- suggest an anchor that is valid
00885         //- suggest an anchor that is not valid(some random uielement)
00886         //- suggest an anchor that on gridlayout that gives a different target index.
00887         //- !valid anchor index
00888         //  - change size, itemspacing - getanchorforrealizationrect
00889         //  - window not connected  - anchorforvisiblerect
00890         //  - connected window - first in realized range should be picked.
00891
00892         // Validate that the extent and realized items look fine with connected and disconnected
00893         // jumps for stack/grid and flow layouts.
00894
00895         [TestMethod]
00896         public void ValidateEstimations_Stack_Horizontal()
00897         {
00898             ValidateLayoutEstimations(ScrollOrientation.Horizontal, LayoutChoice.Stack);
00899         }
00900
00901         [TestMethod]
00902         public void ValidateEstimations_Stack_Vertical()
00903         {
00904             ValidateLayoutEstimations(ScrollOrientation.Vertical, LayoutChoice.Stack);
00905         }
00906
00907         [TestMethod]
00908         public void ValidateEstimations_Grid_Horizontal()
00909         {
00910             ValidateLayoutEstimations(ScrollOrientation.Horizontal, LayoutChoice.Grid);
00911         }
00912
00913         [TestMethod]
00914         [TestProperty("IsolationLevel", "Method")] // Task 28232821: DCPP Test: ItemsRepeater tests are running in isolation mode due to test instability.
00915         public void ValidateEstimations_Grid_Vertical()
00916         {
00917             ValidateLayoutEstimations(ScrollOrientation.Vertical, LayoutChoice.Grid);
00918         }
00919
00920         [TestMethod]
00921         public void ValidateEstimations_Flow_Horizontal()
00922         {
00923             ValidateLayoutEstimations(ScrollOrientation.Horizontal, LayoutChoice.Flow);
00924         }
00925
00926         [TestMethod]
00927         public void ValidateEstimations_Flow_Vertical()
00928         {
00929             ValidateLayoutEstimations(ScrollOrientation.Vertical, LayoutChoice.Flow);
00930         }
00931
00932         [TestMethod]
00933         public void VerifyFlowLayoutOnLineArranged()
00934         {
00935             RunOnUIThread.Execute(() =>
00936             {
00937                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00938                 {
00939                     Log.Comment(string.Format("Orientation: {0}", scrollOrientation));
00940                     var om = new OrientationBasedMeasures(scrollOrientation);
00941                     const int panelMinorSize = 100;
00942                     const double itemSize = 50;
00943                     const int numItems = 5;
00944                     int onLineArrangedCallCount = 0;
00945                     LayoutPanel panel = new LayoutPanel()
00946                     {
00947                         Layout = new FlowLayoutDerived()
00948                         {
00949                             Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
00950                             OnLineArrangedFunc = (int startIndex, int countInLine, double lineSize, VirtualizingLayoutContext context) =>
00951                             {
00952                                 Verify.AreEqual(0, startIndex % 2);
00953                                 Verify.AreEqual(lineSize, itemSize);
00954                                 // Last line has only one item in it
00955                                 Verify.AreEqual(startIndex == 4 ? 1 : 2, countInLine);
00956                                 onLineArrangedCallCount++;
00957                             }
00958                         }
00959                     };
00960
00961                     SetPanelMinorSize(panel, om, panelMinorSize);
00962                     for (int i = 0; i < numItems; i++)
00963                     {
00964                         panel.Children.Add(new Button() { Content = i, Width = itemSize, Height = itemSize });
00965                     }
00966
00967                     Content = panel;
00968
00969                     Content.UpdateLayout();
00970
00971                     Verify.AreEqual(3, onLineArrangedCallCount);
00972                 }
00973             });
00974         }
00975
00976         [TestMethod]
00977         [TestProperty("IsolationLevel", "Method")] // Task 28232821: DCPP Test: ItemsRepeater tests are running in isolation mode due to test instability.
00978         public void ValidateLayoutSharing()
00979         {
00980             RunOnUIThread.Execute(() =>
00981             {
00982                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
00983                 {
00984                     Log.Comment(string.Format("Orientation: {0}", scrollOrientation));
00985                     var om = new OrientationBasedMeasures(scrollOrientation);
00986                     const int itemSize = 20;
00987                     var layouts = new List<VirtualizingLayout>()
00988                     {
00989                         new StackLayout(),
00990                         new UniformGridLayout(){ MinItemWidth = itemSize, MinItemHeight = itemSize },
00991                         new FlowLayoutDerived()
00992                     };
00993
00994                     for (int layoutIndex = 0; layoutIndex < layouts.Count; layoutIndex++)
00995                     {
00996                         var repeater1Layout = layouts[layoutIndex];
00997                         var repeater2Layout = layouts[(layoutIndex + 1) % layouts.Count];
00998                         Log.Comment(string.Format(" Layouts: {0} and {1}", repeater1Layout.GetType(), repeater2Layout.GetType()));
00999                         repeater1Layout.SetOrientation(scrollOrientation);
01000                         repeater2Layout.SetOrientation(scrollOrientation);
01001
01002                         const int repeater1NumItems = 5;
01003                         const int repeater2NumItems = 10;
01004                         var elementFactory = new RecyclingElementFactoryDerived()
01005                         {
01006                             Templates = { { "key", GetDataTemplate(@"<Button Content='{Binding}' Width='20' Height='20'/>") } },
01007                             RecyclePool = new RecyclePool(),
01008                             ValidateElementIndices = false, // can get same indicies for different repeaters
01009                         };
01010
01011                         var repeater1 = new ItemsRepeater()
01012                         {
01013                             ItemsSource = Enumerable.Range(0, repeater1NumItems),
01014                             Layout = repeater1Layout,
01015                             ItemTemplate = elementFactory,
01016                             HorizontalCacheLength = 0,
01017                             VerticalCacheLength = 0,
01018                         };
01019
01020                         var repeater2 = new ItemsRepeater()
01021                         {
01022                             ItemsSource = Enumerable.Range(0, repeater2NumItems),
01023                             Layout = repeater2Layout,
01024                             ItemTemplate = elementFactory,
01025                             HorizontalCacheLength = 0,
01026                             VerticalCacheLength = 0,
01027                         };
01028
01029                         var stack = new StackPanel() { Orientation = scrollOrientation.ToLayoutOrientation() };
01030                         stack.Children.Add(repeater1);
01031                         stack.Children.Add(repeater2);
01032
01033                         var scrollViewer = new ScrollViewer()
01034                         {
01035                             Content = stack
01036                         };
01037
01038                         SetUpScrollViewerOrientation(scrollViewer, scrollOrientation);
01039                         Content = new ItemsRepeaterScrollHost()
01040                         {
01041                             Width = 400,
01042                             Height = 400,
01043                             ScrollViewer = scrollViewer
01044                         };
01045
01046                         Content.UpdateLayout();
01047
01048                         if (repeater1Layout is StackLayout)
01049                         {
01050                             ValidateStackLayoutChildrenLayoutBounds(om, (i) => repeater1.TryGetElement(i), 400, repeater1NumItems, itemSize, 0, repeater1.DesiredSize);
01051                         }
01052                         else if (repeater1Layout is UniformGridLayout)
01053                         {
01054                             ValidateGridLayoutChildrenLayoutBounds(om, (i) => repeater1.TryGetElement(i), itemSize, itemSize, 0, 0, repeater1NumItems, repeater1.DesiredSize);
01055                         }
01056                         else
01057                         {
01058                             ValidateFlowLayoutChildrenLayoutBounds(om, (i) => repeater1.TryGetElement(i), 0, 0, repeater1NumItems, repeater1.DesiredSize);
01059                         }
01060
01061                         if (repeater2Layout is StackLayout)
01062                         {
01063                             ValidateStackLayoutChildrenLayoutBounds(om, (i) => repeater2.TryGetElement(i), 400, repeater2NumItems, itemSize, 0, repeater2.DesiredSize);
01064                         }
01065                         else if (repeater2Layout is UniformGridLayout)
01066                         {
01067                             ValidateGridLayoutChildrenLayoutBounds(om, (i) => repeater2.TryGetElement(i), itemSize, itemSize, 0, 0, repeater2NumItems, repeater2.DesiredSize);
01068                         }
01069                         else
01070                         {
01071                             ValidateFlowLayoutChildrenLayoutBounds(om, (i) => repeater2.TryGetElement(i), 0, 0, repeater2NumItems, repeater2.DesiredSize);
01072                         }
01073                     }
01074                 }
01075             });
01076         }
01077
01078         [TestMethod]
01079         [TestProperty("Bug", "12042780")]
01080         public void ValidateLayoutWithInfiniteMeasureSizeInNonVirtualizingDirection()
01081         {
01082             RunOnUIThread.Execute(() =>
01083             {
01084                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
01085                 {
01086                     Log.Comment("ScrollOrientation is " + scrollOrientation);
01087
01088                     var data = new ObservableCollection<int>(Enumerable.Range(0, 4));
01089                     var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);
01090                     var elementFactory = MockElementFactory.CreateElementFactory(
01091                         Enumerable.Range(0, data.Count).Select(i => new ContentControl
01092                         {
01093                             Width = (i + 1) * 40,
01094                             Height = (i + 1) * 40,
01095                         }).ToList());
01096
01097                     var repeater = new ItemsRepeater();
01098                     repeater.ItemsSource = dataSource;
01099                     repeater.ItemTemplate = elementFactory;
01100
01101                     var scrollViewer = new ScrollViewer();
01102                     scrollViewer.HorizontalScrollMode = ScrollMode.Enabled;
01103                     scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
01104                     scrollViewer.Content = repeater;
01105                     scrollViewer.Width = scrollViewer.Height = 600;
01106
01107                     var tracker = new ItemsRepeaterScrollHost();
01108                     tracker.ScrollViewer = scrollViewer;
01109
01110                     Content = tracker;
01111                     Content.UpdateLayout();
01112
01113                     var layouts = new VirtualizingLayout[]
01114                     {
01115                         new StackLayout { Spacing = 10, Orientation = scrollOrientation.ToLayoutOrientation() },
01116                         new UniformGridLayout { MinItemHeight = 40, MinItemWidth = 40, MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() },
01117                         new FlowLayout { MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() }
01118                     };
01119
01120                     var verifyDesiredSize = new Action<Size, Size>((expected, actual) =>
01121                     {
01122                         Verify.AreEqual(expected.Width, scrollOrientation == ScrollOrientation.Vertical ? actual.Width : actual.Height);
01123                         Verify.AreEqual(expected.Height, scrollOrientation == ScrollOrientation.Vertical ? actual.Height : actual.Width);
01124                     });
01125
01126                     foreach (var layout in layouts)
01127                     {
01128                         Log.Comment("Layout is " + layout.GetType().Name);
01129                         repeater.Layout = layout;
01130                         Content.UpdateLayout();
01131
01132                         if (layout is StackLayout) verifyDesiredSize(new Size(160, 430), repeater.DesiredSize);
01133                         if (layout is UniformGridLayout) verifyDesiredSize(new Size(190, 40), repeater.DesiredSize);
01134                         if (layout is FlowLayout) verifyDesiredSize(new Size(430, 160), repeater.DesiredSize);
01135                     }
01136                 }
01137             });
01138         }
01139
01140         // Bug 17411124: StackLayout: measuring multiple times causes extent to sometimes be 0 in the non-virtualizing direction.
01141         [TestMethod]
01142         [TestProperty("Bug", "12052938")]
01143         public void ValidateIntersectionWithRealizationWindow()
01144         {
01145             // In this test, we have a ScrollViewer with a viewport of 200x200.
01146             // The content is a stack panel with a 300x300 border followed by a ItemsRepeater.
01147             // At the beginning, the ItemsRepeater doesn't intersect the visible or realization window.
01148             // The test will wait for the realization window to expand and will validate that we
01149             // realize elements when it begins to intersect the repeater.
01150
01151             var createLayouts = new Func<ScrollOrientation, VirtualizingLayout[]>((scrollOrientation) =>
01152             {
01153                 VirtualizingLayout[] layouts = null;
01154                 RunOnUIThread.Execute(() =>
01155                 {
01156                     layouts = new VirtualizingLayout[]
01157                     {
01158                         new StackLayout { Spacing = 10, Orientation = scrollOrientation.ToLayoutOrientation() },
01159                         new UniformGridLayout { MinItemHeight = 40, MinItemWidth = 40, MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() },
01160                         new FlowLayout { MinColumnSpacing = 10, MinRowSpacing = 10, Orientation = scrollOrientation.ToOrthogonalLayoutOrientation() }
01161                     };
01162                 });
01163                 return layouts;
01164             });
01165
01166             foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
01167             {
01168                 foreach (var layout in createLayouts(scrollOrientation))
01169                 {
01170                     Log.Comment(" Layout: " + layout.GetType().Name + " ScrollOrientation:" + scrollOrientation.ToString());
01171                     var repeater = (ItemsRepeater)null;
01172                     var rangeRealizedEvent = new AutoResetEvent(initialState: false);
01173                     var data = new ObservableCollection<string>(Enumerable.Range(0, 4).Select(i => "Item #" + i));
01174                     var mapping = (List<ContentControl>)null;
01175
01176                     RunOnUIThread.Execute(() =>
01177                     {
01178                         mapping = Enumerable.Range(0, data.Count).Select(i => new ContentControl { Width = 40, Height = 40 }).ToList();
01179
01180                         var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);
01181                         var elementFactory = MockElementFactory.CreateElementFactory(mapping);
01182
01183                         repeater = new ItemsRepeater();
01184                         // Explicitly set a cache length so we dont depend on the defaults.
01185                         repeater.VerticalCacheLength = 3;
01186                         repeater.HorizontalCacheLength = 3;
01187                         repeater.ItemsSource = dataSource;
01188                         repeater.ItemTemplate = elementFactory;
01189                         repeater.Layout = layout;
01190
01191                         var stack = new StackPanel();
01192                         stack.Orientation = scrollOrientation.ToLayoutOrientation();
01193                         stack.Children.Add(new Border { Width = 300, Height = 300 });
01194                         stack.Children.Add(repeater);
01195
01196                         var scrollViewer = new ScrollViewer();
01197                         scrollViewer.Content = stack;
01198                         scrollViewer.Width = scrollViewer.Height = 200;
01199                         SetUpScrollViewerOrientation(scrollViewer, scrollOrientation);
01200
01201                         var tracker = new ItemsRepeaterScrollHost();
01202                         tracker.ScrollViewer = scrollViewer;
01203                         Content = tracker;
01204
01205                         repeater.ElementPrepared += (o, e) =>
01206                         {
01207                             if (e.Index == data.Count - 1)
01208                             {
01209                                 for (int i = 0; i < data.Count; ++i)
01210                                 {
01211                                     Verify.AreEqual(mapping[i], repeater.TryGetElement(i));
01212                                 }
01213
01214                                 rangeRealizedEvent.Set();
01215                             }
01216                         };
01217
01218                         Content.UpdateLayout();
01219                     });
01220
01221                     Verify.IsTrue(rangeRealizedEvent.WaitOne(DefaultWaitTimeInMS), "Waiting for all items to be realized as the realization window expands.");
01222                 }
01223             }
01224         }
01225
01226         [TestMethod]
01227         public void ValidateUniformGridWithNoItems()
01228         {
01229             RunOnUIThread.Execute(() =>
01230             {
01231                 var repeater = new ItemsRepeater() {
01232                     ItemsSource = new List<string>(), // no items
01233                     Layout = new UniformGridLayout() { Orientation = Orientation.Vertical },
01234                 };
01235
01236                 Content = repeater;
01237                 Content.UpdateLayout();
01238
01239                 // Ensure we do not crash and get zero size.
01240                 Verify.AreEqual(0, repeater.DesiredSize.Width);
01241                 Verify.AreEqual(0, repeater.DesiredSize.Height);
01242             });
01243         }
01244
01245         [TestMethod]
01246         public void ValidateUniformGridWithItemsRelyingOnAspectRatio()
01247         {
01248             ItemsRepeater repeater = null;
01249             ScrollViewer scroller = null;
01250             RunOnUIThread.Execute(() =>
01251             {
01252                 repeater = new ItemsRepeater() {
01253                     ItemsSource = Enumerable.Range(0, 6), // no items
01254                     Layout = new UniformGridLayout() {
01255                         Orientation = Orientation.Vertical,
01256                         MaximumRowsOrColumns = 1,
01257                         MinItemWidth = 100
01258                     },
01259                     MaxWidth = 300,
01260                     ItemTemplate = GetDataTemplate("<repeaterCommon:AspectRatioRespectingControl/>")
01261                 };
01262
01263                 scroller = new ScrollViewer() {
01264                     Content = repeater
01265                 };
01266
01267                 Content = scroller;
01268                 repeater.UpdateLayout();
01269                 Content.UpdateLayout();
01270             });
01271
01272             IdleSynchronizer.Wait();
01273
01274             RunOnUIThread.Execute(() =>
01275             {
01276                 // Assert not implemented yet
01277                 Verify.IsTrue(Math.Abs(300 - repeater.DesiredSize.Width) < 1, "Repeater width should be 300");
01278                 Verify.IsTrue(repeater.DesiredSize.Height > 1, "Repeater should have height");
01279             });
01280         }
01281
01282         [TestMethod]
01283         public void ValidateFlowLayoutWithOneItemHasNonZeroExtent()
01284         {
01285             RunOnUIThread.Execute(() =>
01286             {
01287                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
01288                 {
01289                     var repeater = new ItemsRepeater()
01290                     {
01291                         ItemsSource = new List<string>() { "single item" },
01292                         Layout = new FlowLayout() { Orientation = scrollOrientation.ToLayoutOrientation() },
01293                     };
01294
01295                     Content = repeater;
01296                     Content.UpdateLayout();
01297
01298                     Verify.IsTrue(repeater.ActualWidth > 10);
01299                     Verify.IsTrue(repeater.ActualHeight > 10);
01300                 }
01301             });
01302         }
01303
01304         // Make sure that GridLayout does not end up de-virtualizing if scrolling in the
01305         // same orientation as items are being laid out. It will layout in one line and
01306         // never wrap, but we should avoid devirtualizing.
01307         [TestMethod]
01308         public void ValidateGridLayoutWithSameOrientationAsScrolling()
01309         {
01310             ManualResetEvent viewChanged = new ManualResetEvent(false);
01311             ScrollViewer scrollViewer = null;
01312             var lastRealizedIndex = int.MinValue;
01313             var firstRealizedIndex = int.MaxValue;
01314             RunOnUIThread.Execute(() =>
01315             {
01316
01317                 var repeater = new ItemsRepeater()
01318                 {
01319                     ItemsSource = Enumerable.Range(1, 1000),
01320                     ItemTemplate = GetDataTemplate(@"<Button Content='{Binding}' Width='100' Height='100'/>"),
01321                     Layout = new UniformGridLayout() { Orientation = Orientation.Vertical },
01322                     HorizontalCacheLength = 0,
01323                     VerticalCacheLength = 0,
01324                 };
01325
01326                 repeater.ElementPrepared += (sender, args) =>
01327                 {
01328                     firstRealizedIndex = Math.Min(firstRealizedIndex, args.Index);
01329                     lastRealizedIndex = Math.Max(lastRealizedIndex, args.Index);
01330                 };
01331
01332                 scrollViewer = new ScrollViewer()
01333                 {
01334                     Content = repeater,
01335                     Height = 200,
01336                 };
01337
01338                 var anchorProvier = new ItemsRepeaterScrollHost()
01339                 {
01340                     ScrollViewer = scrollViewer
01341                 };
01342
01343                 Content = anchorProvier;
01344                 Content.UpdateLayout();
01345
01346                 Verify.IsLessThan(lastRealizedIndex - firstRealizedIndex, 10);
01347
01348                 scrollViewer.ViewChanged += (sender, args) =>
01349                 {
01350                     viewChanged.Set();
01351                 };
01352
01353             });
01354
01355             for (int i = 0; i < 3; i++)
01356             {
01357                 viewChanged.Reset();
01358                 RunOnUIThread.Execute(() =>
01359                 {
01360                     lastRealizedIndex = int.MinValue;
01361                     firstRealizedIndex = int.MaxValue;
01362                     scrollViewer.ChangeView(horizontalOffset: 0, verticalOffset: (i + 1) * 80, zoomFactor: null, disableAnimation: true);
01363                 });
01364
01365                 IdleSynchronizer.Wait();
01366                 Verify.IsTrue(viewChanged.WaitOne(DefaultWaitTime));
01367
01368                 RunOnUIThread.Execute(() =>
01369                 {
01370                     // we used to crash due to a layout cycle before we get here.
01371                     Verify.IsLessThan(lastRealizedIndex - firstRealizedIndex, 10);
01372                 });
01373             }
01374         }
01375
01376         // Make sure the UniformGridLayout handles infinite available measure size
01377         // when items are sized and ItemsStretch is other than None.
01378         [TestMethod]
01379         public void VerifyUnconstrainedUniformGridLayout()
01380         {
01381             RunOnUIThread.Execute(() =>
01382             {
01383                 var scrollViewer = XamlReader.Load(
01384                     @"<ScrollViewer xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
01385                         HorizontalScrollBarVisibility='Auto'>
01386                         <LayoutPanel>
01387                             <LayoutPanel.Layout>
01388                                 <UniformGridLayout ItemsStretch='Fill' MinItemWidth='100' MinItemHeight='100'/>
01389                             </LayoutPanel.Layout>
01390                             <Border/>
01391                         </LayoutPanel>
01392                     </ScrollViewer>") as ScrollViewer;
01393
01394                 Content = scrollViewer;
01395                 scrollViewer.UpdateLayout();
01396             });
01397             IdleSynchronizer.Wait();
01398         }
01399
01400         [TestMethod]
01401         public void VerifyItemsGetFullSpaceInMajorDirectionWhenSmallerThanLineSize()
01402         {
01403             RunOnUIThread.Execute(() =>
01404             {
01405                 var layoutPanel = (LayoutPanel)XamlReader.Load(
01406                     @"<controls:LayoutPanel Width='800'
01407                         xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
01408                         xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
01409                         <controls:LayoutPanel.Layout>
01410                             <controls:FlowLayout  />
01411                         </controls:LayoutPanel.Layout>
01412                         <Border Width='300' Height='300' />
01413                         <Border Width='350' Height='150' />
01414                         <Border Width='300' Height='300' />
01415                         <Border Width='350' Height='250' />
01416                     </controls:LayoutPanel>");
01417
01418                 Content = layoutPanel;
01419                 layoutPanel.UpdateLayout();
01420
01421                 var expected = new List<Rect>()
01422                 {
01423                     new Rect(0, 0, 300, 300),
01424                     new Rect(300, 0, 350, 300),
01425                     new Rect(0, 300, 300, 300),
01426                     new Rect(300, 300, 350, 300),
01427                     new Rect(0, 600, 200, 250)
01428                 };
01429
01430                 for (int i = 0; i < layoutPanel.Children.Count; i++)
01431                 {
01432                     var child = (FrameworkElement)layoutPanel.Children[i];
01433                     var actualRect = LayoutInformation.GetLayoutSlot(child);
01434                     Verify.AreEqual(expected[i], actualRect);
01435                 }
01436             });
01437         }
01438
01439         [TestMethod]
01440         public void ValidateStackLayoutArrangeWithStretch()
01441         {
01442             RunOnUIThread.Execute(() =>
01443             {
01444                 var svWidth = 1000.0;
01445                 ScrollViewer sv = new ScrollViewer() {
01446                     Width = svWidth,
01447                     HorizontalScrollBarVisibility = ScrollBarVisibility.Auto
01448                 };
01449
01450                 var repeater = new ItemsRepeater();
01451                 repeater.ItemsSource = Enumerable.Range(0, 10);
01452                 repeater.ItemTemplate = GetDataTemplate(@"<TextBlock HorizontalAlignment='Stretch' Text='{Binding}' />");
01453
01454                 sv.Content = repeater;
01455
01456                 Content = sv;
01457                 Content.UpdateLayout();
01458
01459                 var firstItem = (FrameworkElement)repeater.TryGetElement(0);
01460                 var bounds = LayoutInformation.GetLayoutSlot(firstItem);
01461                 Verify.AreEqual(svWidth, bounds.Width);
01462
01463             });
01464         }
01465
01466         [TestMethod]
01467         public void ValidateStackLayoutArrangeWithInsertion()
01468         {
01469             RunOnUIThread.Execute(() =>
01470             {
01471                 var itemsSource = new ObservableCollection<int>(Enumerable.Range(0, 3));
01472                 var sp = new StackPanel();
01473                 var sl = new StackLayout()
01474                 {
01475                     Orientation = Orientation.Horizontal,
01476                     Spacing = 0
01477                 };
01478                 var repeater = new ItemsRepeater();
01479                 repeater.Layout = sl;
01480                 repeater.ItemsSource = itemsSource;
01481                 repeater.ItemTemplate = GetDataTemplate(@"<TextBlock Width='64' Height='32' Text='{Binding}'/>");
01482
01483                 sp.Children.Add(repeater);
01484
01485                 Content = sp;
01486                 Content.UpdateLayout();
01487
01488                 Log.Comment("Item bounds before insertion:");
01489
01490                 for (int index = 0; index < 3; index++)
01491                 {
01492                     var item = repeater.TryGetElement(index) as FrameworkElement;
01493                     var actualBounds = LayoutInformation.GetLayoutSlot(item);
01494                     var expectedBounds = new Rect(64 * index, 0, 64, 32);
01495
01496                     Log.Comment(string.Format(@"  Index:{0}, Expected:{1} Actual:{2}", index, expectedBounds, actualBounds));
01497                     Verify.AreEqual(expectedBounds, actualBounds);
01498                 }
01499
01500                 for (int insertionIndex = 0; insertionIndex < 3; insertionIndex++)
01501                 {
01502                     Log.Comment(string.Format(@"Item {0} insertion at index:{1}", itemsSource.Count, insertionIndex));
01503                     itemsSource.Insert(insertionIndex, itemsSource.Count);
01504
01505                     Content.UpdateLayout();
01506
01507                     Log.Comment("Item bounds after insertion:");
01508
01509                     for (int index = 0; index < itemsSource.Count; index++)
01510                     {
01511                         var item = repeater.TryGetElement(index) as FrameworkElement;
01512                         var actualBounds = LayoutInformation.GetLayoutSlot(item);
01513                         var expectedBounds = new Rect(64 * index, 0, 64, 32);
01514
01515                         Log.Comment(string.Format(@"  Index:{0}, Expected:{1} Actual:{2}", index, expectedBounds, actualBounds));
01516                         Verify.AreEqual(expectedBounds, actualBounds);
01517                     }
01518                 }
01519             });
01520         }
01521
01522         #region Private Helpers
01523
01524         private enum LayoutChoice
01525         {
01526             Stack,
01527             Grid,
01528             Flow
01529         }
01530
01531         private enum DimensionChoice
01532         {
01533             Width,
01534             Height,
01535             Size
01536         }
01537
01538         private void ValidateStackLayoutChildrenLayoutBounds(
01539             OrientationBasedMeasures om,
01540             Func<int, UIElement> elementAtIndexFunc,
01541             int panelMinorSize,
01542             int numItems,
01543             int itemMajorSize,
01544             int itemSpacing,
01545             Size desiredSize)
01546         {
01547             Rect expectedRect = om.MinorMajorRect(0, 0, panelMinorSize, itemMajorSize);
01548             for (int i = 0; i < numItems; i++)
01549             {
01550                 var child = (FrameworkElement)elementAtIndexFunc(i);
01551                 var actualRect = LayoutInformation.GetLayoutSlot(child);
01552                 Verify.AreEqual(expectedRect, actualRect);
01553
01554                 om.SetMajorStart(ref expectedRect, om.MajorStart(expectedRect) + itemMajorSize + itemSpacing);
01555             }
01556
01557             Verify.AreEqual(numItems * itemMajorSize + (numItems - 1) * itemSpacing, om.Major(desiredSize));
01558         }
01559
01560         private void ValidateGridLayoutChildrenLayoutBounds(
01561             OrientationBasedMeasures om,
01562             Func<int, UIElement> elementAtIndexFunc,
01563             double itemMinorSize,
01564             double itemMajorSize,
01565             double minRowSpacing,
01566             double minColumnSpacing,
01567             int childCount,
01568             Size desiredSize)
01569         {
01570             var expectedRect = om.MinorMajorRect(0, 0, itemMinorSize, itemMajorSize);
01571             double extentMajor = 0;
01572             var minItemSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? minColumnSpacing : minRowSpacing;
01573             var lineSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? minRowSpacing : minColumnSpacing;
01574
01575             for (int i = 0; i < childCount; i++)
01576             {
01577                 var child = (FrameworkElement)elementAtIndexFunc(i);
01578                 var layoutBounds = LayoutInformation.GetLayoutSlot(child);
01579
01580                 Verify.AreEqual(expectedRect, layoutBounds);
01581
01582                 extentMajor = om.MajorStart(expectedRect) + itemMajorSize;
01583                 om.SetMinorStart(ref expectedRect, om.MinorStart(expectedRect) + itemMinorSize + minItemSpacing);
01584                 if (om.MinorStart(expectedRect) + itemMinorSize + minItemSpacing > om.Minor(desiredSize))
01585                 {
01586                     om.SetMinorStart(ref expectedRect, 0);
01587                     om.SetMajorStart(ref expectedRect, om.MajorStart(expectedRect) + itemMajorSize + lineSpacing);
01588                 }
01589             }
01590
01591             Verify.AreEqual(extentMajor, om.Major(desiredSize));
01592         }
01593
01594         private void ValidateFlowLayoutChildrenLayoutBounds(
01595             OrientationBasedMeasures om,
01596             Func<int, UIElement> elementAtIndexFunc,
01597             double minItemSpacing,
01598             double lineSpacing,
01599             int childCount,
01600             Size desiredSize,
01601             float? expectedItemWidth = null,
01602             float? expectedItemHeight = null)
01603         {
01604             var expectedRect = om.MinorMajorRect(0, 0, 0, 0);
01605             double extentMajor = 0;
01606             double lineSize = 0;
01607             Log.Comment("ValidateFlowLayoutChildrenLayoutBounds");
01608             for (int i = 0; i < childCount; i++)
01609             {
01610                 var child = (FrameworkElement)elementAtIndexFunc(i);
01611
01612                 var layoutBounds = LayoutInformation.GetLayoutSlot(child);
01613
01614                 expectedRect.Width = expectedItemWidth.HasValue ? expectedItemWidth.Value : child.DesiredSize.Width;
01615                 expectedRect.Height = expectedItemHeight.HasValue ? expectedItemHeight.Value : child.DesiredSize.Height;
01616                 lineSize = Math.Max(lineSize, om.Major(child.DesiredSize));
01617
01618                 Log.Comment(string.Format(@"Index:{0}, Expected:{1} Actual:{2}", i, expectedRect, layoutBounds));
01619                 Verify.AreEqual(expectedRect, layoutBounds);
01620
01621                 extentMajor = om.MajorStart(expectedRect) + lineSize;
01622                 om.SetMinorStart(ref expectedRect, om.MinorStart(expectedRect) + om.Minor(child.DesiredSize) + minItemSpacing);
01623                 if (om.MinorStart(expectedRect) + om.Minor(child.DesiredSize) + minItemSpacing > om.Minor(desiredSize))
01624                 {
01625                     om.SetMinorStart(ref expectedRect, 0);
01626                     om.SetMajorStart(ref expectedRect, om.MajorStart(expectedRect) + lineSize + lineSpacing);
01627                 }
01628             }
01629
01630             Log.Comment(string.Format(@"Extent Expected:{0} Actual:{1}", om.Major(desiredSize), extentMajor));
01631             Verify.AreEqual(extentMajor, om.Major(desiredSize));
01632         }
01633
01634         private void ValidateChildBounds(LayoutPanel panel, List<Rect> list)
01635         {
01636             for (int i = 0; i < list.Count; i++)
01637             {
01638                 var child = (FrameworkElement)panel.Children[i];
01639                 Verify.AreEqual(list[i], LayoutInformation.GetLayoutSlot(child));
01640             }
01641         }
01642
01643         private DataTemplate GetDataTemplate(string content)
01644         {
01645             return (DataTemplate)XamlReader.Load(
01646                        string.Format(@"<DataTemplate
01647                             xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
01648                             xmlns:repeaterCommon='using:MUXControls.ApiTests.RepeaterTests.Common'>
01649                            {0}
01650                         </DataTemplate>", content));
01651         }
01652
01653         private ItemsRepeaterScrollHost CreateAndInitializeRepeater(
01654            OrientationBasedMeasures om,
01655            object itemsSource,
01656            VirtualizingLayout layout,
01657            ElementFactory elementFactory,
01658            ref ItemsRepeater repeater,
01659            ref ScrollViewer scrollViewer)
01660         {
01661             repeater = new ItemsRepeater()
01662             {
01663                 ItemsSource = itemsSource,
01664                 Layout = layout,
01665                 ItemTemplate = elementFactory,
01666                 HorizontalCacheLength = 0,
01667                 VerticalCacheLength = 0,
01668             };
01669
01670             scrollViewer = new ScrollViewer()
01671             {
01672                 Content = repeater
01673             };
01674
01675             SetUpScrollViewerOrientation(scrollViewer, om.ScrollOrientation);
01676             return new ItemsRepeaterScrollHost()
01677             {
01678                 Width = 400,
01679                 Height = 400,
01680                 ScrollViewer = scrollViewer
01681             };
01682         }
01683
01684         private void ValidateLayoutEstimations(ScrollOrientation scrollOrientation, LayoutChoice layoutChoice)
01685         {
01686             Log.Comment(string.Format("ScrollOrientation: {0}", scrollOrientation));
01687             var om = new OrientationBasedMeasures(scrollOrientation);
01688             List<VirtualizingLayout> layouts = new List<VirtualizingLayout>();
01689             const double itemSize = 90;
01690             const double lineSpacing = 10;
01691             double itemSizeWithLineSpacing = itemSize + lineSpacing;
01692             VirtualizingLayout layout = null;
01693             var viewChangedEvent = new ManualResetEvent(false);
01694
01695             RunOnUIThread.Execute(() =>
01696             {
01697                 switch (layoutChoice)
01698                 {
01699                     case LayoutChoice.Stack:
01700                         layout = new StackLayout() { Spacing = lineSpacing };
01701                         break;
01702
01703                     case LayoutChoice.Grid:
01704                         {
01705                             var minRowSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? lineSpacing : 0;
01706                             var minColumnSpacing = om.ScrollOrientation == ScrollOrientation.Horizontal ? lineSpacing : 0;
01707                             layout = new UniformGridLayout() { MinItemWidth = itemSize, MinItemHeight = itemSize, MinRowSpacing = minRowSpacing, MinColumnSpacing = minColumnSpacing };
01708                         }
01709                         break;
01710
01711                     case LayoutChoice.Flow:
01712                         {
01713                             var minRowSpacing = om.ScrollOrientation == ScrollOrientation.Vertical ? lineSpacing : 0;
01714                             var minColumnSpacing = om.ScrollOrientation == ScrollOrientation.Horizontal ? lineSpacing : 0;
01715                             layout = new FlowLayoutDerived()
01716                             {
01717                                 MinRowSpacing = minRowSpacing,
01718                                 MinColumnSpacing = minColumnSpacing,
01719                                 OnLineArrangedFunc = (int startIndex, int countInLine, double lineSize, VirtualizingLayoutContext context) =>
01720                                 {
01721                                     Verify.AreEqual(0, startIndex % 4);
01722                                     Verify.AreEqual(4, countInLine);
01723                                     Verify.AreEqual(lineSize, itemSize);
01724                                 }
01725                             };
01726                         }
01727                         break;
01728
01729                     default:
01730                         throw new InvalidOperationException("Unhandled layout choice.");
01731                 }
01732             });
01733
01734             ItemsRepeater repeater = null;
01735             RecyclingElementFactoryDerived elementFactory = null;
01736             ScrollViewer scrollViewer = null;
01737             const int numItems = 1000;
01738             var numColumns = (int)(400 / itemSize);
01739             var numRows = numItems / numColumns;
01740
01741             RunOnUIThread.Execute(() =>
01742             {
01743                 Log.Comment(string.Format(" Layout: {0}", layout.GetType()));
01744                 layout.SetOrientation(scrollOrientation);
01745
01746                 elementFactory = new RecyclingElementFactoryDerived()
01747                 {
01748                     Templates = { { "key", GetDataTemplate(@"<Button Content='{Binding}' Width='90' Height='90'/>") } },
01749                     RecyclePool = new RecyclePool(),
01750                 };
01751
01752                 Content = CreateAndInitializeRepeater
01753                 (
01754                    om,
01755                    itemsSource: Enumerable.Range(0, numItems),
01756                    elementFactory: elementFactory,
01757                    layout: layout,
01758                    repeater: ref repeater,
01759                    scrollViewer: ref scrollViewer
01760                 );
01761
01762                 scrollViewer.ViewChanged += (sender, args) =>
01763                 {
01764                     if (!args.IsIntermediate)
01765                     {
01766                         viewChangedEvent.Set();
01767                     }
01768                 };
01769
01770                 Content.UpdateLayout();
01771                 if (layout is StackLayout)
01772                 {
01773                     Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01774                 }
01775                 else if (layout is UniformGridLayout || layout is FlowLayout)
01776                 {
01777                     Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01778                 }
01779             });
01780
01781             // Move window - connected
01782             IdleSynchronizer.Wait();
01783
01784             RunOnUIThread.Execute(() =>
01785             {
01786                 var success = om.IsVertical ?
01787                     scrollViewer.ChangeView(null, 200, null, true) :
01788                     scrollViewer.ChangeView(200, null, null, true);
01789             });
01790
01791             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
01792             IdleSynchronizer.Wait();
01793
01794             RunOnUIThread.Execute(() =>
01795             {
01796                 if (layout is StackLayout)
01797                 {
01798                     Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01799                 }
01800                 else if (layout is UniformGridLayout || layout is FlowLayout)
01801                 {
01802                     Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01803                 }
01804             });
01805
01806             // Move window - disconnected
01807             RunOnUIThread.Execute(() =>
01808             {
01809                 viewChangedEvent.Reset();
01810                 var success = om.IsVertical ?
01811                    scrollViewer.ChangeView(null, 20000, null, true) :
01812                    scrollViewer.ChangeView(20000, null, null, true);
01813             });
01814
01815             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
01816             IdleSynchronizer.Wait();
01817
01818             RunOnUIThread.Execute(() =>
01819             {
01820                 if (layout is StackLayout)
01821                 {
01822                     VerifyRealizedRange(expectedStartindex: 199, expectedCount: 6, actualIndices: elementFactory.RealizedElementIndices);
01823                     Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01824                 }
01825                 else if (layout is UniformGridLayout)
01826                 {
01827                     // We have to copy the list we're passing, as any modification in the realizedElementIndices will result in
01828                     // altering the behavior and preventing the recycling of the containers.
01829                     List<int> observedIndices = new List<int>(elementFactory.RealizedElementIndices);
01830                     observedIndices.Remove(0);
01831                     VerifyRealizedRange(expectedStartindex: 799, expectedCount: 18, actualIndices: observedIndices);
01832                     Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01833                 }
01834                 else if (layout is FlowLayout)
01835                 {
01836                     VerifyRealizedRange(expectedStartindex: 799, expectedCount: 18, actualIndices: elementFactory.RealizedElementIndices);
01837                     Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01838                 }
01839
01840             });
01841
01842             // Validate Ability to override Extent using a disconnected move
01843             RunOnUIThread.Execute(() =>
01844             {
01845                 if (layout is FlowLayoutDerived)
01846                 {
01847                     var flowLayout = (FlowLayoutDerived)layout;
01848                     flowLayout.GetExtentFunc = (
01849                        Size availableSize,
01850                        VirtualizingLayoutContext context,
01851                        UIElement firstRealized,
01852                        int firstRealizedItemIndex,
01853                        Rect firstRealizedLayoutBounds,
01854                        UIElement lastRealized,
01855                        int lastRealizedItemIndex,
01856                        Rect lastRealizedLayoutBounds,
01857                        Rect fromBase) =>
01858                     {
01859                         return om.MinorMajorRect(0, 0, 400, numRows * itemSize);
01860                     };
01861                 }
01862
01863                 viewChangedEvent.Reset();
01864                 var success = om.IsVertical ?
01865                    scrollViewer.ChangeView(null, 10000, null, true) :
01866                    scrollViewer.ChangeView(10000, null, null, true);
01867             });
01868
01869             Verify.IsTrue(viewChangedEvent.WaitOne(DefaultWaitTime), "Waiting for ViewChanged.");
01870             IdleSynchronizer.Wait();
01871
01872             RunOnUIThread.Execute(() =>
01873             {
01874                 if (layout is StackLayout)
01875                 {
01876                     Verify.AreEqual(numItems * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01877                 }
01878                 else if (layout is UniformGridLayout)
01879                 {
01880                     Verify.AreEqual(numRows * itemSizeWithLineSpacing - lineSpacing, om.Major(repeater.DesiredSize));
01881                 }
01882                 else if (layout is FlowLayout)
01883                 {
01884                     // Extent overriden using GetExtent override.
01885                     Verify.AreEqual(numRows * itemSize, om.Major(repeater.DesiredSize));
01886                 }
01887             });
01888         }
01889
01890         private void ValidateDimensionForGridLayoutItemsIsBasedOnFirstItem(DimensionChoice dimension)
01891         {
01892             LayoutPanel panel = null;
01893             RunOnUIThread.Execute(() =>
01894             {
01895                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
01896                 {
01897                     panel = new LayoutPanel()
01898                     {
01899                         Layout = new UniformGridLayout()
01900                         {
01901                             Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
01902                         }
01903                     };
01904
01905                     PopulatePanelWithButtons(panel, 10 /*numItems*/);
01906                     Content = panel;
01907                     Content.UpdateLayout();
01908
01909                     double widthBeforeUpdate = double.NaN;
01910                     for (int i = 0; i < panel.Children.Count; i++)
01911                     {
01912                         var child = (FrameworkElement)panel.Children.ElementAt(i);
01913                         var layoutBounds = LayoutInformation.GetLayoutSlot(child);
01914
01915                         // Ensure bounds before updating.
01916                         Verify.AreNotEqual(100, layoutBounds.Width);
01917                         widthBeforeUpdate = layoutBounds.Width;
01918                         Verify.AreEqual(30 /* itemHeight */, layoutBounds.Height);
01919                     }
01920
01921                     switch (dimension)
01922                     {
01923                         case DimensionChoice.Width:
01924                             ModifyElementSize(panel, 0 /*index*/, 100 /*itemWidth*/, Double.NaN /*itemHeight*/);
01925                             Content.InvalidateMeasure(); // Bug 16644056
01926                             Content.UpdateLayout();
01927                             ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 30 /*itemHeight*/);
01928                             break;
01929
01930                         case DimensionChoice.Height:
01931
01932                             ModifyElementSize(panel, 0 /*index*/, Double.NaN /*itemWidth*/, 100 /*itemHeight*/);
01933                             Content.InvalidateMeasure(); // Bug 16644056
01934                             Content.UpdateLayout();
01935                             ValidateElementsSizeInGridLayout(panel, widthBeforeUpdate /*itemWidth*/, 100 /*itemHeight*/);
01936                             break;
01937
01938                         case DimensionChoice.Size:
01939                             ModifyElementSize(panel, 0 /*index*/, 100 /*itemWidth*/, 100 /*itemHeight*/);
01940                             Content.InvalidateMeasure(); // Bug 16644056
01941                             Content.UpdateLayout();
01942                             ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 100 /*itemHeight*/);
01943                             break;
01944
01945                         default:
01946                             throw new InvalidOperationException("Unhandled dimension choice.");
01947                     }
01948                 }
01949             });
01950         }
01951
01952         private void ValidateAdaptabilityWhenChangingTheFirstElementForGridLayout(DimensionChoice dimension)
01953         {
01954             RunOnUIThread.Execute(() =>
01955             {
01956                 foreach (ScrollOrientation scrollOrientation in Enum.GetValues(typeof(ScrollOrientation)))
01957                 {
01958                     LayoutPanel panel = new LayoutPanel()
01959                     {
01960                         Layout = new UniformGridLayout()
01961                         {
01962                             Orientation = scrollOrientation.ToOrthogonalLayoutOrientation(),
01963                         }
01964                     };
01965
01966                     PopulatePanelWithButtons(panel, 10);
01967                     Content = panel;
01968                     Content.UpdateLayout();
01969
01970                     double widthBeforeUpdate = double.NaN;
01971                     for (int i = 0; i < panel.Children.Count; i++)
01972                     {
01973                         var child = (FrameworkElement)panel.Children.ElementAt(i);
01974                         var layoutBounds = LayoutInformation.GetLayoutSlot(child);
01975
01976                         // Ensure bounds before updating.
01977                         Verify.AreNotEqual(100, layoutBounds.Width);
01978                         widthBeforeUpdate = layoutBounds.Width;
01979                         Verify.AreEqual(30 /* itemHeight */, layoutBounds.Height);
01980                     }
01981
01982                     switch (dimension)
01983                     {
01984                         case DimensionChoice.Width:
01985                             ModifyElementSize(panel, 1 /*index*/, 100 /*itemWidth*/, Double.NaN /*itemHeight*/);
01986                             break;
01987
01988                         case DimensionChoice.Height:
01989
01990                             ModifyElementSize(panel, 1 /*index*/, Double.NaN /*itemWidth*/, 100 /*itemHeight*/);
01991                             break;
01992
01993                         case DimensionChoice.Size:
01994                             ModifyElementSize(panel, 1 /*index*/, 100 /*itemWidth*/, 100 /*itemHeight*/);
01995                             break;
01996
01997                         default:
01998                             throw new InvalidOperationException("Unhandled dimension choice.");
01999                     }
02000
02001                     panel.Children.RemoveAt(0);
02002                     Content.UpdateLayout();
02003
02004                     switch (dimension)
02005                     {
02006                         case DimensionChoice.Width:
02007                             ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 30 /*itemHeight*/);
02008                             break;
02009
02010                         case DimensionChoice.Height:
02011                             ValidateElementsSizeInGridLayout(panel, widthBeforeUpdate /*itemWidth*/, 100 /*itemHeight*/);
02012                             break;
02013
02014                         case DimensionChoice.Size:
02015                             ValidateElementsSizeInGridLayout(panel, 100 /*itemWidth*/, 100 /*itemHeight*/);
02016                             break;
02017
02018                         default:
02019                             throw new InvalidOperationException("Unhandled dimension choice.");
02020                     }
02021
02022                 }
02023             });
02024         }
02025
02026         private static void VerifyWithinTolerance(double expected, double actual, double tolerance)
02027         {
02028             Log.Comment(string.Format("Verify: WithinTolerance({0}, {1}, {2})", expected, actual, tolerance));
02029             if (Math.Abs(expected - actual) > tolerance)
02030             {
02031                 Verify.Fail(string.Format("AreEqual failed to be within tolerance: {0}:{1}:{2}", expected, actual, tolerance));
02032             }
02033         }
02034
02035         private static void SetUpScrollViewerOrientation(ScrollViewer scrollViewer, ScrollOrientation scrollOrientation)
02036         {
02037             if (scrollOrientation == ScrollOrientation.Vertical)
02038             {
02039                 scrollViewer.SetValue(ScrollViewer.HorizontalScrollModeProperty, ScrollMode.Disabled);
02040                 scrollViewer.SetValue(ScrollViewer.VerticalScrollModeProperty, ScrollMode.Enabled);
02041                 scrollViewer.SetValue(ScrollViewer.HorizontalScrollBarVisibilityProperty, ScrollBarVisibility.Disabled);
02042                 scrollViewer.SetValue(ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Visible);
02043             }
02044             else
02045             {
02046                 scrollViewer.SetValue(ScrollViewer.HorizontalScrollModeProperty, ScrollMode.Enabled);
02047                 scrollViewer.SetValue(ScrollViewer.VerticalScrollModeProperty, ScrollMode.Disabled);
02048                 scrollViewer.SetValue(ScrollViewer.HorizontalScrollBarVisibilityProperty, ScrollBarVisibility.Visible);
02049                 scrollViewer.SetValue(ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Disabled);
02050             }
02051         }
02052
02053         private static void VerifyRealizedRange(int expectedStartindex, int expectedCount, List<int> actualIndices)
02054         {
02055             Verify.AreEqual(expectedCount, actualIndices.Count);
02056             for (int i = expectedStartindex; i < expectedStartindex + expectedCount; i++)
02057             {
02058                 Verify.IsTrue(actualIndices.Contains(i));
02059             }
02060         }
02061
02062
02063         private void SetPanelMinorSize(LayoutPanel panel, OrientationBasedMeasures om, double value)
02064         {
02065             if (om.IsVertical)
02066             {
02067                 panel.Width = value;
02068             }
02069             else
02070             {
02071                 panel.Height = value;
02072             }
02073
02074         }
02075
02076         private void PopulatePanelWithButtons(LayoutPanel panel, int numItems)
02077         {
02078             for (int i = 0; i < numItems; i++)
02079             {
02080                 panel.Children.Add(new Button() { Content = i.ToString() });
02081             }
02082         }
02083
02084         private static void ValidateElementsSizeInGridLayout(LayoutPanel panel, double itemWidth, double itemHeight)
02085         {
02086             for (int i = 0; i < panel.Children.Count; i++)
02087             {
02088                 var child = (FrameworkElement)panel.Children.ElementAt(i);
02089                 var layoutBounds = LayoutInformation.GetLayoutSlot(child);
02090
02091                 Verify.AreEqual(itemWidth, layoutBounds.Width);
02092                 Verify.AreEqual(itemHeight, layoutBounds.Height);
02093             }
02094         }
02095
02096         private static void ModifyElementSize(LayoutPanel panel, int index, double itemWidth, double itemHeight)
02097         {
02098             var item = (FrameworkElement)panel.Children.ElementAt(index);
02099
02100             if (!Double.IsNaN(itemWidth))
02101             {
02102                 item.Width = itemWidth;
02103             }
02104             if (!Double.IsNaN(itemHeight))
02105             {
02106                 item.Height = itemHeight;
02107             }
02108         }
02109
02110         private int DefaultWaitTime = 2000;
02111
02112         #endregion
02113     }
02114 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapterFactory.cpp Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

ScrollViewerIRefreshInfoProviderAdapterFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "pch.h"
00006 #include "common.h"
00007
00008 #include "ScrollViewerIRefreshInfoProviderAdapterFactory.h"
00009
00010 #include "ScrollViewerIRefreshInfoProviderAdapter.properties.cpp"
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarFlyoutItem.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarFlyoutItem.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarFlyoutItem.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarFlyoutItem)
00012 }
00013
00014 #include "InkToolBarFlyoutItem.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarFlyoutItemProperties::s_IsCheckedProperty{ nullptr };
00017 GlobalDependencyProperty InkToolBarFlyoutItemProperties::s_KindProperty{ nullptr };
00018
00019 InkToolBarFlyoutItemProperties::InkToolBarFlyoutItemProperties()
00020     : m_checkedEventSource{static_cast<InkToolBarFlyoutItem*>(this)}
00021     , m_uncheckedEventSource{static_cast<InkToolBarFlyoutItem*>(this)}
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void InkToolBarFlyoutItemProperties::EnsureProperties()
00027 {
00028     if (!s_IsCheckedProperty)
00029     {
00030         s_IsCheckedProperty =
00031             InitializeDependencyProperty(
00032                 L"IsChecked",
00033                 winrt::name_of<bool>(),
00034                 winrt::name_of<winrt::InkToolBarFlyoutItem>(),
00035                 false /* isAttached */,
00036                 ValueHelper<bool>::BoxedDefaultValue(),
00037                 nullptr);
00038     }
00039     if (!s_KindProperty)
00040     {
00041         s_KindProperty =
00042             InitializeDependencyProperty(
00043                 L"Kind",
00044                 winrt::name_of<winrt::InkToolBarFlyoutItemKind>(),
00045                 winrt::name_of<winrt::InkToolBarFlyoutItem>(),
00046                 false /* isAttached */,
00047                 ValueHelper<winrt::InkToolBarFlyoutItemKind>::BoxedDefaultValue(),
00048                 nullptr);
00049     }
00050 }
00051
00052 void InkToolBarFlyoutItemProperties::ClearProperties()
00053 {
00054     s_IsCheckedProperty = nullptr;
00055     s_KindProperty = nullptr;
00056 }
00057
00058 void InkToolBarFlyoutItemProperties::IsChecked(bool value)
00059 {
00060     [[gsl::suppress(con)]]
00061     {
00062     static_cast<InkToolBarFlyoutItem*>(this)->SetValue(s_IsCheckedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00063     }
00064 }
00065
00066 bool InkToolBarFlyoutItemProperties::IsChecked()
00067 {
00068     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarFlyoutItem*>(this)->GetValue(s_IsCheckedProperty));
00069 }
00070
00071 void InkToolBarFlyoutItemProperties::Kind(winrt::InkToolBarFlyoutItemKind const& value)
00072 {
00073     [[gsl::suppress(con)]]
00074     {
00075     static_cast<InkToolBarFlyoutItem*>(this)->SetValue(s_KindProperty, ValueHelper<winrt::InkToolBarFlyoutItemKind>::BoxValueIfNecessary(value));
00076     }
00077 }
00078
00079 winrt::InkToolBarFlyoutItemKind InkToolBarFlyoutItemProperties::Kind()
00080 {
00081     return ValueHelper<winrt::InkToolBarFlyoutItemKind>::CastOrUnbox(static_cast<InkToolBarFlyoutItem*>(this)->GetValue(s_KindProperty));
00082 }
00083
00084 winrt::event_token InkToolBarFlyoutItemProperties::Checked(winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable> const& value)
00085 {
00086     return m_checkedEventSource.add(value);
00087 }
00088
00089 void InkToolBarFlyoutItemProperties::Checked(winrt::event_token const& token)
00090 {
00091     m_checkedEventSource.remove(token);
00092 }
00093
00094 winrt::event_token InkToolBarFlyoutItemProperties::Unchecked(winrt::TypedEventHandler<winrt::InkToolBarFlyoutItem, winrt::IInspectable> const& value)
00095 {
00096     return m_uncheckedEventSource.add(value);
00097 }
00098
00099 void InkToolBarFlyoutItemProperties::Unchecked(winrt::event_token const& token)
00100 {
00101     m_uncheckedEventSource.remove(token);
00102 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenterTestHooksAnchorEvaluatedEventArgs.g.h"
00007
00008 class ScrollPresenterTestHooksAnchorEvaluatedEventArgs :
00009     public winrt::implementation::ScrollPresenterTestHooksAnchorEvaluatedEventArgsT<ScrollPresenterTestHooksAnchorEvaluatedEventArgs>
00010 {
00011 public:
00012     ScrollPresenterTestHooksAnchorEvaluatedEventArgs(const winrt::UIElement& anchorElement, double viewportAnchorPointHorizontalOffset, double viewportAanchorPointVerticalOffset);
00013
00014     // IScrollPresenterTestHooksAnchorEvaluatedEventArgs overrides
00015     winrt::UIElement AnchorElement();
00016     double ViewportAnchorPointHorizontalOffset();
00017     double ViewportAnchorPointVerticalOffset();
00018
00019 private:
00020     winrt::weak_ref<winrt::UIElement> m_anchorElement;
00021     double m_viewportAnchorPointHorizontalOffset{ 0.0 };
00022     double m_viewportAnchorPointVerticalOffset{ 0.0 };
00023 };
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/RadialGradientBrush.cpp Source File

  • File List
  • File Members
  • RadialGradientBrush

RadialGradientBrush.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Vector.h"
00007 #include "SharedHelpers.h"
00008 #include "RadialGradientBrush.h"
00009 #include "RuntimeProfiler.h"
00010 #include "ResourceAccessor.h"
00011
00012 RadialGradientBrush::RadialGradientBrush()
00013 {
00014     __RP_Marker_ClassById(RuntimeProfiler::ProfId_RadialGradientBrush);
00015
00016     m_gradientStops = winrt::make<Vector<winrt::GradientStop>>().as<winrt::IObservableVector<winrt::GradientStop>>();
00017 }
00018
00019 winrt::IObservableVector<winrt::GradientStop> RadialGradientBrush::GradientStops()
00020 {
00021     return m_gradientStops;
00022 }
00023
00024 void RadialGradientBrush::OnConnected()
00025 {
00026     // XCBB will use fallback rendering in design v1 mode, so do not create a CompositionBrush.
00027     if (SharedHelpers::IsInDesignMode()) { return; }
00028
00029     m_isConnected = true;
00030
00031     EnsureCompositionBrush();
00032
00033     // If CompositionRadialGradientBrush will be used then listen for changes to gradient stops so the CompositionRadialGradientBrush can be updated.
00034     m_gradientStopsVectorChangedRevoker = m_gradientStops.VectorChanged(winrt::auto_revoke, { this, &RadialGradientBrush::OnGradientStopsVectorChanged });
00035 }
00036
00037 void RadialGradientBrush::OnDisconnected()
00038 {
00039     m_isConnected = false;
00040
00041     if (m_brush)
00042     {
00043         m_brush.Close();
00044         m_brush = nullptr;
00045         CompositionBrush(nullptr);
00046     }
00047
00048     if (m_gradientStopsVectorChangedRevoker)
00049     {
00050         m_gradientStopsVectorChangedRevoker.revoke();
00051     }
00052
00053     if (m_fallbackColorChangedRevoker)
00054     {
00055         m_fallbackColorChangedRevoker.revoke();
00056     }
00057 }
00058
00059 void RadialGradientBrush::OnCenterPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00060 {
00061     UpdateCompositionGradientCenter();
00062 }
00063
00064 void RadialGradientBrush::OnRadiusXPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00065 {
00066     UpdateCompositionGradientRadius();
00067 }
00068
00069 void RadialGradientBrush::OnRadiusYPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00070 {
00071     UpdateCompositionGradientRadius();
00072 }
00073
00074 void RadialGradientBrush::OnGradientOriginPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00075 {
00076     UpdateCompositionGradientOrigin();
00077 }
00078
00079 void RadialGradientBrush::OnMappingModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00080 {
00081     UpdateCompositionGradientMappingMode();
00082 }
00083
00084 void RadialGradientBrush::OnInterpolationSpacePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00085 {
00086     UpdateCompositionInterpolationSpace();
00087 }
00088
00089 void RadialGradientBrush::OnSpreadMethodPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00090 {
00091     UpdateCompositionExtendMode();
00092 }
00093
00094 void RadialGradientBrush::OnFallbackColorChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00095 {
00096     UpdateFallbackBrush();
00097 }
00098
00099 void RadialGradientBrush::OnGradientStopsVectorChanged(winrt::Collections::IObservableVector<winrt::GradientStop> const& sender, winrt::Collections::IVectorChangedEventArgs const& e)
00100 {
00101     UpdateCompositionGradientStops();
00102 }
00103
00104 void RadialGradientBrush::EnsureCompositionBrush()
00105 {
00106     if (m_isConnected && !m_brush)
00107     {
00108         const auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00109
00110         // If CompositionRadialGradientBrush is available then use it to render a gradient.
00111         m_brush = compositor.CreateRadialGradientBrush();
00112
00113         UpdateCompositionGradientCenter();
00114         UpdateCompositionGradientRadius();
00115         UpdateCompositionGradientOrigin();
00116         UpdateCompositionGradientStops();
00117         UpdateCompositionGradientMappingMode();
00118         UpdateCompositionInterpolationSpace();
00119         UpdateCompositionExtendMode();
00120
00121         CompositionBrush(m_brush);
00122     }
00123 }
00124
00125 void RadialGradientBrush::UpdateCompositionGradientCenter()
00126 {
00127     if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
00128     {
00129         const auto center = Center();
00130         compositionGradientBrush.EllipseCenter(winrt::float2(center.X, center.Y));
00131
00132         // Changing the center affects the origin in the comp brush because we are translating from
00133         // Origin to offset.
00134         UpdateCompositionGradientOrigin();
00135     }
00136 }
00137
00138 void RadialGradientBrush::UpdateCompositionGradientRadius()
00139 {
00140     if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
00141     {
00142         compositionGradientBrush.EllipseRadius(winrt::float2(static_cast<float>(RadiusX()), static_cast<float>(RadiusY())));
00143     }
00144 }
00145
00146 void RadialGradientBrush::UpdateCompositionGradientMappingMode()
00147 {
00148     if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
00149     {
00150         switch (MappingMode())
00151         {
00152         case winrt::BrushMappingMode::Absolute:
00153             compositionGradientBrush.MappingMode(winrt::Microsoft::UI::Composition::CompositionMappingMode::Absolute);
00154             break;
00155         case winrt::BrushMappingMode::RelativeToBoundingBox:
00156             [[fallthrough]];
00157         default: // Use Relative as the default if the mode isn't recognized.
00158             compositionGradientBrush.MappingMode(winrt::Microsoft::UI::Composition::CompositionMappingMode::Relative);
00159             break;
00160         }
00161     }
00162 }
00163
00164 void RadialGradientBrush::UpdateCompositionGradientOrigin()
00165 {
00166     if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
00167     {
00168         const auto gradientOrigin = GradientOrigin();
00169         const auto center = Center();
00170         // Comp uses offset, WinUI will follow WPF and use bounds relative to the element in all mapping modes.
00171         // If ElementWidth=100 ElementHeight=100
00172         // Relative mode
00173         //     TopLeft of element = 0,0
00174         //     Center of element = .5,.5
00175         //     BottomRight of element = 1,1
00176         // Absolute mode
00177         //     TopLeft of element = 0,0
00178         //     Center of element = 50,50
00179         //     BottomRight of element = 100,100
00180         compositionGradientBrush.GradientOriginOffset(winrt::float2(gradientOrigin.X - center.X, gradientOrigin.Y - center.Y));
00181     }
00182 }
00183
00184 void RadialGradientBrush::UpdateCompositionGradientStops()
00185 {
00186     if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
00187     {
00188         const auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00189
00190         compositionGradientBrush.ColorStops().Clear();
00191
00192         for (const auto& gradientStop : m_gradientStops)
00193         {
00194             const auto compositionStop = compositor.CreateColorGradientStop();
00195             compositionStop.Color(gradientStop.Color());
00196             compositionStop.Offset(static_cast<float>(gradientStop.Offset()));
00197
00198             compositionGradientBrush.ColorStops().Append(compositionStop);
00199         }
00200     }
00201 }
00202
00203 void RadialGradientBrush::UpdateCompositionInterpolationSpace()
00204 {
00205     if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
00206     {
00207         compositionGradientBrush.InterpolationSpace(InterpolationSpace());
00208     }
00209 }
00210
00211 void RadialGradientBrush::UpdateCompositionExtendMode()
00212 {
00213     if (const auto compositionGradientBrush = m_brush.try_as<winrt::CompositionRadialGradientBrush>())
00214     {
00215         switch (SpreadMethod())
00216         {
00217         case winrt::GradientSpreadMethod::Repeat:
00218             compositionGradientBrush.ExtendMode(winrt::Microsoft::UI::Composition::CompositionGradientExtendMode::Wrap);
00219             break;
00220         case winrt::GradientSpreadMethod::Reflect:
00221             compositionGradientBrush.ExtendMode(winrt::Microsoft::UI::Composition::CompositionGradientExtendMode::Mirror);
00222             break;
00223         case winrt::GradientSpreadMethod::Pad:
00224             [[fallthrough]];
00225         default: // Use Pad as the default if the mode isn't recognized.
00226             compositionGradientBrush.ExtendMode(winrt::Microsoft::UI::Composition::CompositionGradientExtendMode::Clamp);
00227             break;
00228         }
00229     }
00230 }
00231
00232 void RadialGradientBrush::UpdateFallbackBrush()
00233 {
00234     if (const auto compositionColorBrush = m_brush.try_as<winrt::CompositionColorBrush>())
00235     {
00236         compositionColorBrush.Color(FallbackColor());
00237     }
00238 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > Member List

This is the complete list of members for CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface >, including all inherited members.
Invoke(TArgs...args) override | CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > | [inline]
InvokeCallback() | CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > |
InvokeCallback(std::function< HRESULT STDMETHODCALLTYPE(TArgs...)> &&func_obj) | CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > | [inline]
m_invokeFunction | CallbackTraits< HRESULT(STDMETHODCALLTYPE TDelegateInterface::*)(TArgs...)>::InvokeCallback< TDelegateInterface > | [private]
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PagerControlAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

PagerControlAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PagerControlAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(PagerControlAutomationPeer)
00012 }
00013
00014 #include "PagerControlAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutsTestHooks Member List

This is the complete list of members for LayoutsTestHooks, including all inherited members.
ClearLinedFlowLayoutItemAspectRatios(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
EnsureHooks() | LayoutsTestHooks | [private, static]
GetGlobalTestHooks() | LayoutsTestHooks | [inline, static]
GetLayoutFirstRealizedItemIndex(winrt::IInspectable const &layout) | LayoutsTestHooks | [static]
GetLayoutForcedIndexBasedLayoutOrientation(winrt::IInspectable const &layout) | LayoutsTestHooks | [static]
GetLayoutLastRealizedItemIndex(winrt::IInspectable const &layout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutAverageItemAspectRatio(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutFirstFrozenItemIndex(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutForcedAverageItemAspectRatio(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutForcedAverageItemsPerLineDivider(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutForcedWrapMultiplier(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutIsFastPathSupported(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutLastFrozenItemIndex(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutLineIndex(winrt::IInspectable const &linedFlowLayout, int itemIndex) | LayoutsTestHooks | [static]
GetLinedFlowLayoutLogItemIndex(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutRawAverageItemsPerLine(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
GetLinedFlowLayoutSnappedAverageItemsPerLine(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
LayoutInvalidateMeasure(winrt::IInspectable const &layout, bool relayout) | LayoutsTestHooks | [static]
LinedFlowLayoutInvalidated(winrt::TypedEventHandler< winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs > const &value) | LayoutsTestHooks | [static]
LinedFlowLayoutInvalidated(winrt::event_token const &token) | LayoutsTestHooks | [static]
LinedFlowLayoutItemLocked(winrt::TypedEventHandler< winrt::IInspectable, winrt::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs > const &value) | LayoutsTestHooks | [static]
LinedFlowLayoutItemLocked(winrt::event_token const &token) | LayoutsTestHooks | [static]
LinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::TypedEventHandler< winrt::IInspectable, winrt::IInspectable > const &value) | LayoutsTestHooks | [static]
LinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::event_token const &token) | LayoutsTestHooks | [static]
m_linedFlowLayoutInvalidatedEventSource | LayoutsTestHooks | [private]
m_linedFlowLayoutItemLockedEventSource | LayoutsTestHooks | [private]
m_linedFlowLayoutSnappedAverageItemsPerLineChangedEventSource | LayoutsTestHooks | [private]
NotifyLinedFlowLayoutInvalidated(winrt::IInspectable const &linedFlowLayout, winrt::LinedFlowLayoutInvalidationTrigger const &invalidationTrigger) | LayoutsTestHooks | [static]
NotifyLinedFlowLayoutItemLocked(winrt::IInspectable const &linedFlowLayout, int itemIndex, int lineIndex) | LayoutsTestHooks | [static]
NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
ResetLayoutForcedIndexBasedLayoutOrientation(winrt::IInspectable const &layout) | LayoutsTestHooks | [static]
s_testHooks | LayoutsTestHooks | [private, static]
SetLayoutForcedIndexBasedLayoutOrientation(winrt::IInspectable const &layout, winrt::IndexBasedLayoutOrientation forcedIndexBasedLayoutOrientation) | LayoutsTestHooks | [static]
SetLinedFlowLayoutForcedAverageItemAspectRatio(winrt::IInspectable const &linedFlowLayout, double forcedAverageItemAspectRatio) | LayoutsTestHooks | [static]
SetLinedFlowLayoutForcedAverageItemsPerLineDivider(winrt::IInspectable const &linedFlowLayout, double forcedAverageItemsPerLineDivider) | LayoutsTestHooks | [static]
SetLinedFlowLayoutForcedWrapMultiplier(winrt::IInspectable const &linedFlowLayout, double forcedWrapMultiplier) | LayoutsTestHooks | [static]
SetLinedFlowLayoutIsFastPathSupported(winrt::IInspectable const &linedFlowLayout, bool isFastPathSupported) | LayoutsTestHooks | [static]
SetLinedFlowLayoutLogItemIndex(winrt::IInspectable const &linedFlowLayout, int logItemIndex) | LayoutsTestHooks | [static]
UnlockLinedFlowLayoutItems(winrt::IInspectable const &linedFlowLayout) | LayoutsTestHooks | [static]
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewUnrealizedChildrenTestPage.xaml.cs Source File

  • File List
  • File Members
  • TreeView
  • TestUI

TreeViewUnrealizedChildrenTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.IO;
00004 using System.Linq;
00005 using System.Runtime.InteropServices.WindowsRuntime;
00006 using Windows.Foundation;
00007 using Windows.Foundation.Collections;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Data;
00012 using Microsoft.UI.Xaml.Input;
00013 using Microsoft.UI.Xaml.Media;
00014 using Microsoft.UI.Xaml.Navigation;
00015
00016 // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
00017
00018 namespace MUXControlsTestApp
00019 {
00020     /// <summary>
00021     /// An empty page that can be used on its own or navigated to within a Frame.
00022     /// </summary>
00023     public sealed partial class TreeViewUnrealizedChildrenTestPage : TestPage
00024     {
00025
00026         public TreeViewNode VirtualizingTestRootNode;
00027         public CustomContent CustomContentRootNode;
00028
00029         public TreeViewUnrealizedChildrenTestPage()
00030         {
00031
00032             this.InitializeComponent();
00033             CustomContentRootNode = new CustomContent(3);
00034             VirtualizingTestRootNode = CustomContentRootNode.GetTreeViewNode();
00035             UnrealizedTreeViewSelection.RootNodes.Add(VirtualizingTestRootNode);
00036         }
00037
00038         private void GetSelectedItemName_Click(object sender, RoutedEventArgs e)
00039         {
00040             SelectedItemName.Text = ((UnrealizedTreeViewSelection.SelectedItem as TreeViewNode).Content as CustomContent).ToString();
00041         }
00042
00043         private void UnrealizedTreeViewSelection_Expanding(Microsoft.UI.Xaml.Controls.TreeView sender, Microsoft.UI.Xaml.Controls.TreeViewExpandingEventArgs args)
00044         {
00045             VirtualizingDataSource.FillTreeNode(args.Node);
00046         }
00047         private void UnrealizedTreeViewSelection_Collapsed(Microsoft.UI.Xaml.Controls.TreeView sender, Microsoft.UI.Xaml.Controls.TreeViewCollapsedEventArgs args)
00048         {
00049             VirtualizingDataSource.EmptyTreeNode(args.Node);
00050         }
00051     }
00052 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarItem.h Source File

  • File List
  • File Members
  • MenuBar

MenuBarItem.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "MenuBarItem.g.h"
00007 #include "MenuBarItem.properties.h"
00008
00009 enum class FlyoutLocation
00010 {
00011     Left,
00012     Right
00013 };
00014
00015 class MenuBarItem :
00016     public ReferenceTracker<MenuBarItem, winrt::implementation::MenuBarItemT>,
00017     public MenuBarItemProperties
00018 {
00019 public:
00020     MenuBarItem();
00021     virtual ~MenuBarItem();
00022
00023     void OnApplyTemplate();
00024
00025
00026     void AddPassThroughElement(const winrt::DependencyObject& element);
00027     void ShowMenuFlyout();
00028     void CloseMenuFlyout();
00029     bool IsFlyoutOpen();
00030     void Invoke();
00031
00032 public:
00033     // IUIElement / IUIElementOverridesHelper
00034     winrt::AutomationPeer OnCreateAutomationPeer();
00035
00036 private:
00037
00038     void PopulateContent();
00039     void AttachEventHandlers();
00040     void DetachEventHandlers(bool useSafeGet = false);
00041     void OpenFlyoutFrom(FlyoutLocation location);
00042     void MoveFocusTo(FlyoutLocation location);
00043
00044     winrt::MenuBarItem FocusAndReturnNextFocusableItem(int index, int direction);
00045
00046     void OnVisualPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00047     void UpdateVisualStates();
00048
00049     // Input handlers
00050     void OnMenuBarItemPointerEntered(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00051     void OnMenuBarItemPointerPressed(winrt::IInspectable const& sender, winrt::PointerRoutedEventArgs const& args);
00052     void OnMenuBarItemKeyDown(winrt::IInspectable const& sender, winrt::KeyRoutedEventArgs const& args);
00053     void OnPresenterKeyDown(winrt::IInspectable const& sender, winrt::KeyRoutedEventArgs const& args);
00054     void OnItemsVectorChanged(winrt::Collections::IObservableVector<winrt::MenuFlyoutItemBase> const& sender, winrt::Collections::IVectorChangedEventArgs const& e);
00055     void OnMenuBarItemAccessKeyInvoked(winrt::IInspectable const& sender, winrt::AccessKeyInvokedEventArgs const& args);
00056
00057     // Flyout event handlers
00058     void OnFlyoutClosed(winrt::IInspectable const& sender, winrt::IInspectable const& args);
00059     void OnFlyoutOpening(winrt::IInspectable const& sender, winrt::IInspectable const& args);
00060
00061     // Variables
00062     tracker_ref<winrt::Button> m_button{ this };
00063     tracker_ref<winrt::MenuBarItemFlyout> m_flyout{ this };
00064     weak_ref<winrt::DependencyObject> m_passThroughElement;
00065     weak_ref<winrt::MenuBar> m_menuBar;
00066     bool m_isFlyoutOpen{ false };
00067
00068     // Event tokens and handlers
00069     winrt::UIElement::KeyDown_revoker m_presenterKeyDownRevoker{};
00070     winrt::FlyoutBase::Closed_revoker m_flyoutClosedRevoker{};
00071     winrt::FlyoutBase::Opening_revoker m_flyoutOpeningRevoker{};
00072     winrt::UIElement::PointerEntered_revoker m_pointerEnteredRevoker{};
00073     winrt::UIElement::AccessKeyInvoked_revoker m_accessKeyInvokedRevoker{};
00074
00075     RoutedEventHandler_revoker m_onMenuBarItemPointerPressedRevoker{};
00076     RoutedEventHandler_revoker m_onMenuBarItemKeyDownRevoker{};
00077
00078     PropertyChanged_revoker m_pressedRevoker{};
00079     PropertyChanged_revoker m_pointerOverRevoker{};
00080 };
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/ColorConversion.cpp Source File

  • File List
  • File Members
  • Common

ColorConversion.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SharedHelpers.h"
00007 #include "ColorConversion.h"
00008
00009 Rgb::Rgb(double r, double g, double b) : r{ r }, g{ g }, b{ b }
00010 {
00011 }
00012
00013 Hsv::Hsv(double h, double s, double v) : h{ h }, s{ s }, v{ v }
00014 {
00015 }
00016
00017 std::optional<unsigned long> TryParseInt(const wstring_view& s)
00018 {
00019     return TryParseInt(s, 10 /* base */);
00020 }
00021
00022 std::optional<unsigned long> TryParseInt(const wstring_view& str, int base)
00023 {
00024     // If we have a zero-length string, then we can immediately know
00025     // that this is not a valid integer.
00026     if (*str.data() == '\0')
00027     {
00028         return std::nullopt;
00029     }
00030
00031     wchar_t *end;
00032
00033     // wcstoll takes in a string and converts as much as it as it can to an integer value,
00034     // returning a pointer to the first element that it wasn't able to consider part of an integer.
00035     // If we got all the way to the end of the string, then the whole thing was a valid string.
00036     auto result = wcstoul(str.data(), &end, base);
00037     if (*end == '\0')
00038     {
00039         return result;
00040     }
00041
00042     return std::nullopt;
00043 }
00044
00045 Hsv RgbToHsv(const Rgb &rgb)
00046 {
00047     double hue = 0;
00048     double saturation = 0;
00049     double value = 0;
00050
00051     const double max = rgb.r >= rgb.g ? (rgb.r >= rgb.b ? rgb.r : rgb.b) : (rgb.g >= rgb.b ? rgb.g : rgb.b);
00052     const double min = rgb.r <= rgb.g ? (rgb.r <= rgb.b ? rgb.r : rgb.b) : (rgb.g <= rgb.b ? rgb.g : rgb.b);
00053
00054     // The value, a number between 0 and 1, is the largest of R, G, and B (divided by 255).
00055     // Conceptually speaking, it represents how much color is present.
00056     // If at least one of R, G, B is 255, then there exists as much color as there can be.
00057     // If RGB = (0, 0, 0), then there exists no color at all - a value of zero corresponds
00058     // to black (i.e., the absence of any color).
00059     value = max;
00060
00061     // The "chroma" of the color is a value directly proportional to the extent to which
00062     // the color diverges from greyscale.  If, for example, we have RGB = (255, 255, 0),
00063     // then the chroma is maximized - this is a pure yellow, no grey of any kind.
00064     // On the other hand, if we have RGB = (128, 128, 128), then the chroma being zero
00065     // implies that this color is pure greyscale, with no actual hue to be found.
00066     const double chroma = max - min;
00067
00068     // If the chrome is zero, then hue is technically undefined - a greyscale color
00069     // has no hue.  For the sake of convenience, we'll just set hue to zero, since
00070     // it will be unused in this circumstance.  Since the color is purely grey,
00071     // saturation is also equal to zero - you can think of saturation as basically
00072     // a measure of hue intensity, such that no hue at all corresponds to a
00073     // nonexistent intensity.
00074     if (chroma == 0)
00075     {
00076         hue = 0.0;
00077         saturation = 0.0;
00078     }
00079     else
00080     {
00081         // In this block, hue is properly defined, so we'll extract both hue
00082         // and saturation information from the RGB color.
00083
00084         // Hue can be thought of as a cyclical thing, between 0 degrees and 360 degrees.
00085         // A hue of 0 degrees is red; 120 degrees is green; 240 degrees is blue; and 360 is back to red.
00086         // Every other hue is somewhere between either red and green, green and blue, and blue and red,
00087         // so every other hue can be thought of as an angle on this color wheel.
00088         // These if/else statements determines where on this color wheel our color lies.
00089         if (rgb.r == max)
00090         {
00091             // If the red channel is the most pronounced channel, then we exist
00092             // somewhere between (-60, 60) on the color wheel - i.e., the section around 0 degrees
00093             // where red dominates.  We figure out where in that section we are exactly
00094             // by considering whether the green or the blue channel is greater - by subtracting green from blue,
00095             // then if green is greater, we'll nudge ourselves closer to 60, whereas if blue is greater, then
00096             // we'll nudge ourselves closer to -60.  We then divide by chroma (which will actually make the result larger,
00097             // since chroma is a value between 0 and 1) to normalize the value to ensure that we get the right hue
00098             // even if we're very close to greyscale.
00099             hue = 60 * (rgb.g - rgb.b) / chroma;
00100         }
00101         else if (rgb.g == max)
00102         {
00103             // We do the exact same for the case where the green channel is the most pronounced channel,
00104             // only this time we want to see if we should tilt towards the blue direction or the red direction.
00105             // We add 120 to center our value in the green third of the color wheel.
00106             hue = 120 + 60 * (rgb.b - rgb.r) / chroma;
00107         }
00108         else // rgb.b == max
00109         {
00110             // And we also do the exact same for the case where the blue channel is the most pronounced channel,
00111             // only this time we want to see if we should tilt towards the red direction or the green direction.
00112             // We add 240 to center our value in the blue third of the color wheel.
00113             hue = 240 + 60 * (rgb.r - rgb.g) / chroma;
00114         }
00115
00116         // Since we want to work within the range [0, 360), we'll add 360 to any value less than zero -
00117         // this will bump red values from within -60 to -1 to 300 to 359.  The hue is the same at both values.
00118         if (hue < 0.0)
00119         {
00120             hue += 360.0;
00121         }
00122
00123         // The saturation, our final HSV axis, can be thought of as a value between 0 and 1 indicating how intense our color is.
00124         // To find it, we divide the chroma - the distance between the minimum and the maximum RGB channels - by the maximum channel (i.e., the value).
00125         // This effectively normalizes the chroma - if the maximum is 0.5 and the minimum is 0, the saturation will be (0.5 - 0) / 0.5 = 1,
00126         // meaning that although this color is not as bright as it can be, the dark color is as intense as it possibly could be.
00127         // If, on the other hand, the maximum is 0.5 and the minimum is 0.25, then the saturation will be (0.5 - 0.25) / 0.5 = 0.5,
00128         // meaning that this color is partially washed out.
00129         // A saturation value of 0 corresponds to a greyscale color, one in which the color is *completely* washed out and there is no actual hue.
00130         saturation = chroma / value;
00131     }
00132
00133     return Hsv(hue, saturation, value);
00134 }
00135
00136 Rgb HsvToRgb(const Hsv &hsv)
00137 {
00138     double hue = hsv.h;
00139     double saturation = hsv.s;
00140     double value = hsv.v;
00141
00142     // We want the hue to be between 0 and 359,
00143     // so we first ensure that that's the case.
00144     while (hue >= 360.0)
00145     {
00146         hue -= 360.0;
00147     }
00148
00149     while (hue < 0.0)
00150     {
00151         hue += 360.0;
00152     }
00153
00154     // We similarly clamp saturation and value between 0 and 1.
00155     saturation = saturation < 0.0 ? 0.0 : saturation;
00156     saturation = saturation > 1.0 ? 1.0 : saturation;
00157
00158     value = value < 0.0 ? 0.0 : value;
00159     value = value > 1.0 ? 1.0 : value;
00160
00161     // The first thing that we need to do is to determine the chroma (see above for its definition).
00162     // Remember from above that:
00163     //
00164     // 1. The chroma is the difference between the maximum and the minimum of the RGB channels,
00165     // 2. The value is the maximum of the RGB channels, and
00166     // 3. The saturation comes from dividing the chroma by the maximum of the RGB channels (i.e., the value).
00167     //
00168     // From these facts, you can see that we can retrieve the chroma by simply multiplying the saturation and the value,
00169     // and we can retrieve the minimum of the RGB channels by subtracting the chroma from the value.
00170     const double chroma = saturation * value;
00171     const double min = value - chroma;
00172
00173     // If the chroma is zero, then we have a greyscale color.  In that case, the maximum and the minimum RGB channels
00174     // have the same value (and, indeed, all of the RGB channels are the same), so we can just immediately return
00175     // the minimum value as the value of all the channels.
00176     if (chroma == 0)
00177     {
00178         return Rgb(min, min, min);
00179     }
00180
00181     // If the chroma is not zero, then we need to continue.  The first step is to figure out
00182     // what section of the color wheel we're located in.  In order to do that, we'll divide the hue by 60.
00183     // The resulting value means we're in one of the following locations:
00184     //
00185     // 0 - Between red and yellow.
00186     // 1 - Between yellow and green.
00187     // 2 - Between green and cyan.
00188     // 3 - Between cyan and blue.
00189     // 4 - Between blue and purple.
00190     // 5 - Between purple and red.
00191     //
00192     // In each of these sextants, one of the RGB channels is completely present, one is partially present, and one is not present.
00193     // For example, as we transition between red and yellow, red is completely present, green is becoming increasingly present, and blue is not present.
00194     // Then, as we transition from yellow and green, green is now completely present, red is becoming decreasingly present, and blue is still not present.
00195     // As we transition from green to cyan, green is still completely present, blue is becoming increasingly present, and red is no longer present.  And so on.
00196     //
00197     // To convert from hue to RGB value, we first need to figure out which of the three channels is in which configuration
00198     // in the sextant that we're located in.  Next, we figure out what value the completely-present color should have.
00199     // We know that chroma = (max - min), and we know that this color is the max color, so to find its value we simply add
00200     // min to chroma to retrieve max.  Finally, we consider how far we've transitioned from the pure form of that color
00201     // to the next color (e.g., how far we are from pure red towards yellow), and give a value to the partially present channel
00202     // equal to the minimum plus the chroma (i.e., the max minus the min), multiplied by the percentage towards the new color.
00203     // This gets us a value between the maximum and the minimum representing the partially present channel.
00204     // Finally, the not-present color must be equal to the minimum value, since it is the one least participating in the overall color.
00205     const int sextant = static_cast<int>(hue / 60);
00206     const double intermediateColorPercentage = hue / 60 - sextant;
00207     const double max = chroma + min;
00208
00209     double r = 0;
00210     double g = 0;
00211     double b = 0;
00212
00213     switch (sextant)
00214     {
00215     case 0:
00216         r = max;
00217         g = min + chroma * intermediateColorPercentage;
00218         b = min;
00219         break;
00220     case 1:
00221         r = min + chroma * (1 - intermediateColorPercentage);
00222         g = max;
00223         b = min;
00224         break;
00225     case 2:
00226         r = min;
00227         g = max;
00228         b = min + chroma * intermediateColorPercentage;
00229         break;
00230     case 3:
00231         r = min;
00232         g = min + chroma * (1 - intermediateColorPercentage);
00233         b = max;
00234         break;
00235     case 4:
00236         r = min + chroma * intermediateColorPercentage;
00237         g = min;
00238         b = max;
00239         break;
00240     case 5:
00241         r = max;
00242         g = min;
00243         b = min + chroma * (1 - intermediateColorPercentage);
00244         break;
00245     }
00246
00247     return Rgb(r, g, b);
00248 }
00249
00250 Rgb HexToRgb(const wstring_view& input)
00251 {
00252     const auto [rgb, a] = HexToRgba(input);
00253     return rgb;
00254 }
00255
00256 winrt::hstring RgbToHex(const Rgb &rgb)
00257 {
00258     const byte rByte = static_cast<byte>(round(rgb.r * 255.0));
00259     const byte gByte = static_cast<byte>(round(rgb.g * 255.0));
00260     const byte bByte = static_cast<byte>(round(rgb.b * 255.0));
00261
00262     const unsigned long hexValue = (rByte << 16) + (gByte << 8) + bByte;
00263
00264     // We'll size this string to accommodate "#XXXXXX" - i.e., a full RGB number with a # sign.
00265     wchar_t hexString[8];
00266     winrt::check_hresult(StringCchPrintfW(&hexString[0], 8, L"#%06X", hexValue));
00267     return winrt::hstring(hexString);
00268 }
00269
00270 std::tuple<Rgb, double> HexToRgba(const wstring_view& input)
00271 {
00272     // The input always begins with a #, so we'll move past that.
00273     auto ptr = input.data();
00274     ++ptr;
00275
00276     const auto hexValue = TryParseInt(ptr, 16);
00277
00278     // If we failed to parse the string into an integer, then we'll return all -1's.
00279     // ARGB values can never be negative, so this is a convenient error state to use
00280     // to indicate that this value should not actually be used.
00281     if (!hexValue.has_value())
00282     {
00283         return { Rgb(-1, -1, -1), -1 };
00284     }
00285
00286     const auto hex = hexValue.value();
00287     const byte a = static_cast<byte>((hex & 0xff000000) >> 24);
00288     const byte r = static_cast<byte>((hex & 0x00ff0000) >> 16);
00289     const byte g = static_cast<byte>((hex & 0x0000ff00) >> 8);
00290     const byte b = static_cast<byte>(hex & 0x000000ff);
00291
00292     return { Rgb(r / 255.0, g / 255.0, b / 255.0), a / 255.0 };
00293 }
00294
00295 winrt::hstring RgbaToHex(const Rgb &rgb, double alpha)
00296 {
00297     const byte aByte = static_cast<byte>(round(alpha * 255.0));
00298     const byte rByte = static_cast<byte>(round(rgb.r * 255.0));
00299     const byte gByte = static_cast<byte>(round(rgb.g * 255.0));
00300     const byte bByte = static_cast<byte>(round(rgb.b * 255.0));
00301
00302     const unsigned long hexValue = (aByte << 24) + (rByte << 16) + (gByte << 8) + (bByte & 0xff);
00303
00304     // We'll size this string to accommodate "#XXXXXXXX" - i.e., a full ARGB number with a # sign.
00305     wchar_t hexString[10];
00306     winrt::check_hresult(StringCchPrintfW(&hexString[0], 10, L"#%08X", hexValue));
00307     return winrt::hstring(hexString);
00308 }
00309
00310 winrt::Color ColorFromRgba(const Rgb &rgb, double alpha)
00311 {
00312     return winrt::ColorHelper::FromArgb(
00313         static_cast<byte>(round(alpha * 255)),
00314         static_cast<byte>(round(rgb.r * 255)),
00315         static_cast<byte>(round(rgb.g * 255)),
00316         static_cast<byte>(round(rgb.b * 255)));
00317 }
00318
00319 Rgb RgbFromColor(const winrt::Color &color)
00320 {
00321     return Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0);
00322 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBar.idl Source File

  • File List
  • File Members
  • MenuBar

MenuBar.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass MenuBarItemFlyout : Microsoft.UI.Xaml.Controls.MenuFlyout
00007 {
00008     MenuBarItemFlyout();
00009 }
00010
00011 [MUX_PUBLIC]
00012 [webhosthidden]
00013 [contentproperty("Items")]
00014 unsealed runtimeclass MenuBarItem : Microsoft.UI.Xaml.Controls.Control
00015 {
00016     MenuBarItem();
00017
00018     String Title { get; set; };
00019     Windows.Foundation.Collections.IVector<Microsoft.UI.Xaml.Controls.MenuFlyoutItemBase> Items { get; };
00020
00021     static Microsoft.UI.Xaml.DependencyProperty TitleProperty { get; };
00022     static Microsoft.UI.Xaml.DependencyProperty ItemsProperty { get; };
00023 }
00024
00025 [MUX_PUBLIC]
00026 [webhosthidden]
00027 [contentproperty("Items")]
00028 unsealed runtimeclass MenuBar : Microsoft.UI.Xaml.Controls.Control
00029 {
00030     MenuBar();
00031
00032     Windows.Foundation.Collections.IVector<MenuBarItem> Items { get; };
00033
00034     static Microsoft.UI.Xaml.DependencyProperty ItemsProperty { get; };
00035 }
00036
00037 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/FlowLayout.properties.cpp Source File

  • File List
  • File Members
  • Generated

FlowLayout.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "FlowLayout.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(FlowLayout)
00012 }
00013
00014 #include "FlowLayout.g.cpp"
00015
00016 GlobalDependencyProperty FlowLayoutProperties::s_LineAlignmentProperty{ nullptr };
00017 GlobalDependencyProperty FlowLayoutProperties::s_MinColumnSpacingProperty{ nullptr };
00018 GlobalDependencyProperty FlowLayoutProperties::s_MinRowSpacingProperty{ nullptr };
00019 GlobalDependencyProperty FlowLayoutProperties::s_OrientationProperty{ nullptr };
00020
00021 FlowLayoutProperties::FlowLayoutProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void FlowLayoutProperties::EnsureProperties()
00027 {
00028     if (!s_LineAlignmentProperty)
00029     {
00030         s_LineAlignmentProperty =
00031             InitializeDependencyProperty(
00032                 L"LineAlignment",
00033                 winrt::name_of<winrt::FlowLayoutLineAlignment>(),
00034                 winrt::name_of<winrt::FlowLayout>(),
00035                 false /* isAttached */,
00036                 ValueHelper<winrt::FlowLayoutLineAlignment>::BoxValueIfNecessary(winrt::FlowLayoutLineAlignment::Start),
00037                 winrt::PropertyChangedCallback(&OnLineAlignmentPropertyChanged));
00038     }
00039     if (!s_MinColumnSpacingProperty)
00040     {
00041         s_MinColumnSpacingProperty =
00042             InitializeDependencyProperty(
00043                 L"MinColumnSpacing",
00044                 winrt::name_of<double>(),
00045                 winrt::name_of<winrt::FlowLayout>(),
00046                 false /* isAttached */,
00047                 ValueHelper<double>::BoxValueIfNecessary(0.0),
00048                 winrt::PropertyChangedCallback(&OnMinColumnSpacingPropertyChanged));
00049     }
00050     if (!s_MinRowSpacingProperty)
00051     {
00052         s_MinRowSpacingProperty =
00053             InitializeDependencyProperty(
00054                 L"MinRowSpacing",
00055                 winrt::name_of<double>(),
00056                 winrt::name_of<winrt::FlowLayout>(),
00057                 false /* isAttached */,
00058                 ValueHelper<double>::BoxValueIfNecessary(0.0),
00059                 winrt::PropertyChangedCallback(&OnMinRowSpacingPropertyChanged));
00060     }
00061     if (!s_OrientationProperty)
00062     {
00063         s_OrientationProperty =
00064             InitializeDependencyProperty(
00065                 L"Orientation",
00066                 winrt::name_of<winrt::Orientation>(),
00067                 winrt::name_of<winrt::FlowLayout>(),
00068                 false /* isAttached */,
00069                 ValueHelper<winrt::Orientation>::BoxValueIfNecessary(winrt::Orientation::Horizontal),
00070                 winrt::PropertyChangedCallback(&OnOrientationPropertyChanged));
00071     }
00072 }
00073
00074 void FlowLayoutProperties::ClearProperties()
00075 {
00076     s_LineAlignmentProperty = nullptr;
00077     s_MinColumnSpacingProperty = nullptr;
00078     s_MinRowSpacingProperty = nullptr;
00079     s_OrientationProperty = nullptr;
00080 }
00081
00082 void FlowLayoutProperties::OnLineAlignmentPropertyChanged(
00083     winrt::DependencyObject const& sender,
00084     winrt::DependencyPropertyChangedEventArgs const& args)
00085 {
00086     auto owner = sender.as<winrt::FlowLayout>();
00087     winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
00088 }
00089
00090 void FlowLayoutProperties::OnMinColumnSpacingPropertyChanged(
00091     winrt::DependencyObject const& sender,
00092     winrt::DependencyPropertyChangedEventArgs const& args)
00093 {
00094     auto owner = sender.as<winrt::FlowLayout>();
00095     winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
00096 }
00097
00098 void FlowLayoutProperties::OnMinRowSpacingPropertyChanged(
00099     winrt::DependencyObject const& sender,
00100     winrt::DependencyPropertyChangedEventArgs const& args)
00101 {
00102     auto owner = sender.as<winrt::FlowLayout>();
00103     winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
00104 }
00105
00106 void FlowLayoutProperties::OnOrientationPropertyChanged(
00107     winrt::DependencyObject const& sender,
00108     winrt::DependencyPropertyChangedEventArgs const& args)
00109 {
00110     auto owner = sender.as<winrt::FlowLayout>();
00111     winrt::get_self<FlowLayout>(owner)->OnPropertyChanged(args);
00112 }
00113
00114 void FlowLayoutProperties::LineAlignment(winrt::FlowLayoutLineAlignment const& value)
00115 {
00116     [[gsl::suppress(con)]]
00117     {
00118     static_cast<FlowLayout*>(this)->SetValue(s_LineAlignmentProperty, ValueHelper<winrt::FlowLayoutLineAlignment>::BoxValueIfNecessary(value));
00119     }
00120 }
00121
00122 winrt::FlowLayoutLineAlignment FlowLayoutProperties::LineAlignment()
00123 {
00124     return ValueHelper<winrt::FlowLayoutLineAlignment>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_LineAlignmentProperty));
00125 }
00126
00127 void FlowLayoutProperties::MinColumnSpacing(double value)
00128 {
00129     [[gsl::suppress(con)]]
00130     {
00131     static_cast<FlowLayout*>(this)->SetValue(s_MinColumnSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00132     }
00133 }
00134
00135 double FlowLayoutProperties::MinColumnSpacing()
00136 {
00137     return ValueHelper<double>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_MinColumnSpacingProperty));
00138 }
00139
00140 void FlowLayoutProperties::MinRowSpacing(double value)
00141 {
00142     [[gsl::suppress(con)]]
00143     {
00144     static_cast<FlowLayout*>(this)->SetValue(s_MinRowSpacingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00145     }
00146 }
00147
00148 double FlowLayoutProperties::MinRowSpacing()
00149 {
00150     return ValueHelper<double>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_MinRowSpacingProperty));
00151 }
00152
00153 void FlowLayoutProperties::Orientation(winrt::Orientation const& value)
00154 {
00155     [[gsl::suppress(con)]]
00156     {
00157     static_cast<FlowLayout*>(this)->SetValue(s_OrientationProperty, ValueHelper<winrt::Orientation>::BoxValueIfNecessary(value));
00158     }
00159 }
00160
00161 winrt::Orientation FlowLayoutProperties::Orientation()
00162 {
00163     return ValueHelper<winrt::Orientation>::CastOrUnbox(static_cast<FlowLayout*>(this)->GetValue(s_OrientationProperty));
00164 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerAutomationPeer Member List

This is the complete list of members for ItemContainerAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
AddToSelection() | ItemContainerAutomationPeer |
CheckThread() | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ItemContainerAutomationPeer > &&self) noexcept | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
final_release(std::unique_ptr< ItemContainerAutomationPeer > &&self) | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | ItemContainerAutomationPeer |
GetBase() | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
GetClassNameCore() | ItemContainerAutomationPeer | [virtual]
GetImpl() | ItemContainerAutomationPeer | [private]
GetInner() | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
GetLocalizedControlTypeCore() | ItemContainerAutomationPeer | [virtual]
GetNameCore() | ItemContainerAutomationPeer | [virtual]
GetPatternCore(winrt::PatternInterface const &patternInterface) | ItemContainerAutomationPeer |
Invoke() | ItemContainerAutomationPeer |
IsOnThread() | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
IsSelected() | ItemContainerAutomationPeer |
ItemContainerAutomationPeer(winrt::FrameworkElement const &owner) | ItemContainerAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemContainerAutomationPeer, winrt::implementation::ItemContainerAutomationPeerT > | [inline]
RemoveFromSelection() | ItemContainerAutomationPeer |
Select() | ItemContainerAutomationPeer |
SelectionContainer() | ItemContainerAutomationPeer |
UpdateSelection(bool isSelected) | ItemContainerAutomationPeer | [private]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewUnrealizedChildrenTestPage Member List

This is the complete list of members for TreeViewUnrealizedChildrenTestPage, including all inherited members.
CustomContentRootNode | TreeViewUnrealizedChildrenTestPage |
GetSelectedItemName_Click(object sender, RoutedEventArgs e) | TreeViewUnrealizedChildrenTestPage | [inline, private]
TreeViewUnrealizedChildrenTestPage() | TreeViewUnrealizedChildrenTestPage | [inline]
UnrealizedTreeViewSelection_Collapsed(Microsoft.UI.Xaml.Controls.TreeView sender, Microsoft.UI.Xaml.Controls.TreeViewCollapsedEventArgs args) | TreeViewUnrealizedChildrenTestPage | [inline, private]
UnrealizedTreeViewSelection_Expanding(Microsoft.UI.Xaml.Controls.TreeView sender, Microsoft.UI.Xaml.Controls.TreeViewExpandingEventArgs args) | TreeViewUnrealizedChildrenTestPage | [inline, private]
VirtualizingTestRootNode | TreeViewUnrealizedChildrenTestPage |
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBarPageWindow Member List

This is the complete list of members for TitleBarPageWindow, including all inherited members.
backRequestedCount | TitleBarPageWindow | [private]
CustomContentCheckBox_CheckedChanged(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
FooterContentCheckBox_CheckedChanged(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
HeaderContentCheckBox_CheckedChanged(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
IsBackButtonVisibleCheckBox_CheckedChanged(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
IsBackEnabledCheckBox_CheckedChanged(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
IsPaneToggleButtonVisibleCheckbox_CheckedChanged(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
paneToggleRequestedCount | TitleBarPageWindow | [private]
SetIconCheckBox_CheckedChanged(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
SetSubtitleButton_Click(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
TitleBarPageWindow() | TitleBarPageWindow | [inline]
TitleButton_Click(object sender, RoutedEventArgs e) | TitleBarPageWindow | [inline, private]
WindowingTitleBar_BackRequested(TitleBar sender, object args) | TitleBarPageWindow | [inline, private]
WindowingTitleBar_PaneToggleRequested(TitleBar sender, object args) | TitleBarPageWindow | [inline, private]
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarSummaryPage Member List

This is the complete list of members for SelectorBarSummaryPage, including all inherited members.
_fullLogs | SelectorBarSummaryPage | [private]
_otherSelectorBarItem | SelectorBarSummaryPage | [private]
AppendEventMessage(string eventMessage) | SelectorBarSummaryPage | [inline, private]
BtnAddSelectorBarItem_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnClearFullLog_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnCopyEvents_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetBorderThickness_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetCornerRadius_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetFullLog_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetMargin_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetMaxHeight_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetMaxWidth_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetPadding_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemChild_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemForeground_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemIcon_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemIsEnabled_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemIsSelected_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemMargin_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemPadding_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemsCount_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemText_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarItemVisibility_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnGetSelectorBarSelectedItem_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnInsertSelectorBarItem_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnRemoveAllSelectorBarItems_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnRemoveSelectorBarItem_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnReplaceSelectorBarItem_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetBorderThickness_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetCornerRadius_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetMargin_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetMaxHeight_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetMaxWidth_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetPadding_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemChild_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemForeground_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemIcon_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemIsEnabled_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemIsSelected_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemMargin_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemPadding_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemText_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarItemVisibility_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
BtnSetSelectorBarSelectedItem_Click(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkIsEnabled_CheckedChanged(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkIsTabStop_CheckedChanged(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemContainerMessages_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemContainerMessages_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsViewEvents_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsViewEvents_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogSelectorBarEvents_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogSelectorBarEvents_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogSelectorBarMessages_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkLogSelectorBarMessages_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkSelectorBarItems_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkSelectorBarItems_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkSelectorBarProperties_Checked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ChkSelectorBarProperties_Unchecked(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ClearFullLog() | SelectorBarSummaryPage | [inline, private]
CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e) | SelectorBarSummaryPage | [inline, private]
CmbBorderBrush_SelectionChanged(object sender, SelectionChangedEventArgs e) | SelectorBarSummaryPage | [inline, private]
CmbTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | SelectorBarSummaryPage | [inline, private]
CmbXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | SelectorBarSummaryPage | [inline, private]
GetCornerRadiusFromString(string cornerRadius) | SelectorBarSummaryPage | [inline, private]
GetForeground() | SelectorBarSummaryPage | [inline, private]
GetFullLog() | SelectorBarSummaryPage | [inline, private]
GetIconElementFromString(string icon) | SelectorBarSummaryPage | [inline, private]
GetIntFromSymbol(Symbol symbol) | SelectorBarSummaryPage | [inline, private]
GetSelectorBarItem() | SelectorBarSummaryPage | [inline, private]
GetStringFromChild(SelectorBarItem selectorBarItem) | SelectorBarSummaryPage | [inline, private]
GetStringFromIconElement(IconElement iconElement) | SelectorBarSummaryPage | [inline, private]
GetStringFromSelectorBarItem(SelectorBarItem selectorBarItem) | SelectorBarSummaryPage | [inline, private]
GetSymbolFromInt(int symbolIndex) | SelectorBarSummaryPage | [inline, private]
GetTextBlockChild() | SelectorBarSummaryPage | [inline, private]
GetTextBoxChild() | SelectorBarSummaryPage | [inline, private]
GetThicknessFromString(string thickness) | SelectorBarSummaryPage | [inline, private]
HookItemsRepeaterEvents(ItemsRepeater itemsRepeater) | SelectorBarSummaryPage | [inline, private]
HookItemsViewEvents(ItemsView itemsView) | SelectorBarSummaryPage | [inline, private]
HookSelectorBarEvents() | SelectorBarSummaryPage | [inline, private]
ItemsRepeater_ElementClearing(ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args) | SelectorBarSummaryPage | [inline, private]
ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | SelectorBarSummaryPage | [inline, private]
ItemsRepeater_Loaded(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ItemsView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | SelectorBarSummaryPage | [inline, private]
ItemsView_GotFocus(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ItemsView_ItemInvoked(ItemsView sender, ItemsViewItemInvokedEventArgs args) | SelectorBarSummaryPage | [inline, private]
ItemsView_Loaded(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ItemsView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | SelectorBarSummaryPage | [inline, private]
ItemsView_LostFocus(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
ItemsView_SelectionChanged(ItemsView sender, ItemsViewSelectionChangedEventArgs args) | SelectorBarSummaryPage | [inline, private]
LogItemsRepeaterInfo() | SelectorBarSummaryPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | SelectorBarSummaryPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | SelectorBarSummaryPage | [inline, protected]
PopulateCmbSelectorBarSelectedItem() | SelectorBarSummaryPage | [inline, private]
SelectorBar_Loaded(object sender, RoutedEventArgs e) | SelectorBarSummaryPage | [inline, private]
SelectorBar_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args) | SelectorBarSummaryPage | [inline, private]
SelectorBarSummaryPage() | SelectorBarSummaryPage | [inline]
UnhookItemsRepeaterEvents(ItemsRepeater itemsRepeater) | SelectorBarSummaryPage | [inline, private]
UnhookItemsViewEvents(ItemsView itemsView) | SelectorBarSummaryPage | [inline, private]
UnhookSelectorBarEvents() | SelectorBarSummaryPage | [inline, private]
UpdateBackground() | SelectorBarSummaryPage | [inline, private]
UpdateBorderBrush() | SelectorBarSummaryPage | [inline, private]
UpdateBorderThickness() | SelectorBarSummaryPage | [inline, private]
UpdateCornerRadius() | SelectorBarSummaryPage | [inline, private]
UpdateIsEnabled() | SelectorBarSummaryPage | [inline, private]
UpdateIsTabStop() | SelectorBarSummaryPage | [inline, private]
UpdateItemsCount() | SelectorBarSummaryPage | [inline, private]
UpdateMargin() | SelectorBarSummaryPage | [inline, private]
UpdateMaxHeight() | SelectorBarSummaryPage | [inline, private]
UpdateMaxWidth() | SelectorBarSummaryPage | [inline, private]
UpdatePadding() | SelectorBarSummaryPage | [inline, private]
UpdateSelectedItem() | SelectorBarSummaryPage | [inline, private]
UpdateTabNavigation() | SelectorBarSummaryPage | [inline, private]
UpdateXYFocusKeyboardNavigation() | SelectorBarSummaryPage | [inline, private]
~SelectorBarSummaryPage() | SelectorBarSummaryPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushTests Member List

This is the complete list of members for AcrylicBrushTests, including all inherited members.
_rectangle1 | AcrylicBrushTests | [private]
_rootSP | AcrylicBrushTests | [private]
GetAcrylicBrushFallbackColor(string brushName, ResourceDictionary dict) | AcrylicBrushTests | [inline, private]
GetAcrylicBrushNames() | AcrylicBrushTests | [inline, private]
GetColorByName(string name, ResourceDictionary dict) | AcrylicBrushTests | [inline, private]
GetFallBackColorName(String brushName) | AcrylicBrushTests | [inline, private]
GetSolidColorBrushColor(string brushName, ResourceDictionary dict) | AcrylicBrushTests | [inline, private]
pattern | AcrylicBrushTests | [private, static]
rgx | AcrylicBrushTests | [private, static]
SetupDefaultUI() | AcrylicBrushTests | [inline, private]
unknownColor | AcrylicBrushTests | [private]
VerifyAcrylicBrushHasCorrectFallbackColor() | AcrylicBrushTests | [inline]
VerifyAcrylicBrushHasCorrectFallbackColorOnTheme(IEnumerable< KeyValuePair< string, string >> brushAndFallbackColorNamePairs, ResourceDictionary theme) | AcrylicBrushTests | [inline, private]
VerifyAcrylicBrushNameRule() | AcrylicBrushTests | [inline]
VerifyDefaultPropertyValues() | AcrylicBrushTests | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/InteractionTests/AcrylicBrushTests.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • InteractionTests

AcrylicBrushTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Threading;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00007 using Windows.Foundation.Metadata;
00008 using Common;
00009 using System;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 using Microsoft.Windows.Apps.Test.Automation;
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00019 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00022 {
00023     using Window = Microsoft.Windows.Apps.Test.Foundation.Controls.Window;
00024
00025     [TestClass]
00026     public class AcrylicBrushTests
00027     {
00028         private const string AcrylicRectangleName = "Rectangle1";
00029         private const string TintOpacitySliderName = "TintOpacity";
00030         private const string SizeSliderName = "SizeSlider";
00031
00032         [ClassInitialize]
00033         [TestProperty("RunAs", "User")]
00034         [TestProperty("Classification", "Integration")]
00035         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00036         public static void ClassInitialize(TestContext testContext)
00037         {
00038             TestEnvironment.Initialize(testContext);
00039         }
00040
00041         [TestCleanup]
00042         public void TestCleanup()
00043         {
00044             TestCleanupHelper.Cleanup();
00045         }
00046
00047         private bool IsUsingAcrylicBrush()
00048         {
00049             TextBlock IsUsingAcrylicBrush_TextBlock = new TextBlock(FindElement.ById("IsUsingAcrylicBrush"));
00050             return IsUsingAcrylicBrush_TextBlock.DocumentText.Equals("True");
00051         }
00052
00053         private void LogBrushSate()
00054         {
00055             Log.Comment("Using " + (IsUsingAcrylicBrush() ? "AcrylicBrush" : "FallbackBrush"));
00056
00057             TextBlock CompositionBrushPointer_TextBlock = new TextBlock(FindElement.ById("CompositionBrushPointer"));
00058             Log.Comment("CompositionBrushPointer: " + CompositionBrushPointer_TextBlock.DocumentText);
00059
00060             TextBlock NoiseBrushPointer_TextBlock = new TextBlock(FindElement.ById("NoiseBrushPointer"));
00061             Log.Comment("NoiseBrushPointer: " + NoiseBrushPointer_TextBlock.DocumentText);
00062         }
00063
00064         [TestMethod]
00065         [TestProperty("EnableForPGOTraining", "True")]
00066         public void BasicAcrylicOnRectangle()
00067         {
00068             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00069             {
00070                 ChooseFromComboBox("TestNameComboBox", "BasicAcrylicOnRectangle");
00071
00072                 var result = new Edit(FindElement.ById("TestResult"));
00073                 using (var waiter = new ValueChangedEventWaiter(result))
00074                 {
00075                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00076                     runTestButton.Invoke();
00077                     LogBrushSate();
00078                     waiter.Wait();
00079                 }
00080
00081                 Verify.AreEqual(result.Value, "BasicAcrylicOnRectangle: Passed");
00082             }
00083         }
00084
00085         [TestMethod]
00086         public void AcrylicPropertyChanges()
00087         {
00088             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00089             {
00090                 ChooseFromComboBox("TestNameComboBox", "AcrylicPropertyChanges");
00091
00092                 var result = new Edit(FindElement.ById("TestResult"));
00093                 using (var waiter = new ValueChangedEventWaiter(result))
00094                 {
00095                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00096                     runTestButton.Invoke();
00097                     LogBrushSate();
00098                     waiter.Wait();
00099                 }
00100
00101                 Verify.AreEqual(result.Value, "AcrylicPropertyChanges: Passed");
00102             }
00103         }
00104
00105
00106         [TestMethod]
00107         public void AcrylicAlwaysUseFallback()
00108         {
00109             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00110             {
00111                 ChooseFromComboBox("TestNameComboBox", "AcrylicAlwaysUseFallback");
00112
00113                 var result = new Edit(FindElement.ById("TestResult"));
00114                 using (var waiter = new ValueChangedEventWaiter(result))
00115                 {
00116                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00117                     runTestButton.Invoke();
00118                     LogBrushSate();
00119
00120                     waiter.Wait();
00121                 }
00122
00123                 if (result.Value.Equals("AcrylicAlwaysUseFallback: Skipped"))
00124                 {
00125                     Log.Error("Error: FallbackBrush in use - expecting effect brush");
00126                     return;
00127                 }
00128
00129                 Verify.AreEqual(result.Value, "AcrylicAlwaysUseFallback: Passed");
00130             }
00131         }
00132
00133         [TestMethod]
00134         public void AcrylicCreatedInFallbackMode()
00135         {
00136             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00137             {
00138                 ChooseFromComboBox("TestNameComboBox", "AcrylicCreatedInFallbackMode");
00139
00140                 var result = new Edit(FindElement.ById("TestResult"));
00141                 using (var waiter = new ValueChangedEventWaiter(result))
00142                 {
00143                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00144                     runTestButton.Invoke();
00145                     LogBrushSate();
00146                     waiter.Wait();
00147                 }
00148
00149                 Verify.AreEqual(result.Value, "AcrylicCreatedInFallbackMode: Passed");
00150             }
00151         }
00152
00153         [TestMethod]
00154         public void VerifyDisconnectedState()
00155         {
00156             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00157             {
00158                 ChooseFromComboBox("TestNameComboBox", "VerifyDisconnectedState");
00159
00160                 var result = new Edit(FindElement.ById("TestResult"));
00161                 using (var waiter = new ValueChangedEventWaiter(result))
00162                 {
00163                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00164                     runTestButton.Invoke();
00165                     LogBrushSate();
00166
00167                     if (result.Value.Equals("VerifyDisconnectedState: Skipped"))
00168                     {
00169                         Log.Error("Error: FallbackBrush in use - expecting effect brush");
00170                         return;
00171                     }
00172
00173                     waiter.Wait();
00174                 }
00175
00176                 Verify.AreEqual(result.Value, "VerifyDisconnectedState: Passed");
00177             }
00178         }
00179
00180         [TestMethod]
00181         public void AcrylicFromMarkup()
00182         {
00183             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToMarkupAcrylic" }))
00184             {
00185                 var result = new Edit(FindElement.ById("TestResult"));
00186                 using (var waiter = new ValueChangedEventWaiter(result))
00187                 {
00188                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00189                     runTestButton.Invoke();
00190                     LogBrushSate();
00191
00192                     if (result.Value.Equals("AcrylicFromMarkup: Skipped"))
00193                     {
00194                         Log.Error("Error: FallbackBrush in use - expecting effect brush");
00195                         return;
00196                     }
00197
00198                     waiter.Wait();
00199                 }
00200
00201                 Verify.AreEqual(result.Value, "AcrylicFromMarkup: Passed");
00202             }
00203         }
00204
00205         [TestMethod]
00206         public void AcrylicRendering()
00207         {
00208             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToRenderingAcrylic" }))
00209             {
00210                 CheckBox cbComplexBackground = new CheckBox(FindElement.ById("cbComplexBackground"));
00211                 cbComplexBackground.Uncheck();
00212
00213                 var result = new Edit(FindElement.ById("TestResult"));
00214                 using (var waiter = new ValueChangedEventWaiter(result))
00215                 {
00216                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00217                     runTestButton.Invoke();
00218
00219                     waiter.Wait();
00220                 }
00221
00222                 Verify.AreEqual(result.Value, "AcrylicRendering: Passed");
00223             }
00224         }
00225
00226         [TestMethod]
00227         public void TintTransitionDuration()
00228         {
00229             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00230             {
00231                 ChooseFromComboBox("TestNameComboBox", "TintTransitionDuration");
00232
00233                 Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00234
00235                 // Iteration 0 : TintTransitionDuration = 0
00236                 runTestButton.Invoke();
00237                 Wait.ForSeconds(1);
00238
00239                 // Iteration 1 : TintTransitionDuration = 500ms
00240                 runTestButton.Invoke();
00241                 Wait.ForSeconds(1);
00242
00243                 // Iteration 2 : TintTransitionDuration = 999ms
00244                 runTestButton.Invoke();
00245                 Wait.ForSeconds(2);
00246             }
00247         }
00248
00249         [TestMethod]
00250         public void AcrylicNoiseCache()
00251         {
00252             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00253             {
00254                 ChooseFromComboBox("TestNameComboBox", "AcrylicNoiseCache");
00255
00256                 var result = new Edit(FindElement.ById("TestResult"));
00257                 using (var waiter = new ValueChangedEventWaiter(result))
00258                 {
00259                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00260                     runTestButton.Invoke();
00261                     LogBrushSate();
00262                     waiter.Wait();
00263                 }
00264
00265                 Verify.AreEqual(result.Value, "AcrylicNoiseCache: Passed");
00266             }
00267         }
00268
00269         [TestMethod]
00270         public void VerifyAcrylicBrushEffect()
00271         {
00272             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToBasicAcrylic" }))
00273             {
00274                 ChooseFromComboBox("TestNameComboBox", "VerifyAcrylicBrushEffect");
00275
00276                 var result = new Edit(FindElement.ById("TestResult"));
00277                 using (var waiter = new ValueChangedEventWaiter(result))
00278                 {
00279                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00280                     runTestButton.Invoke();
00281                     LogBrushSate();
00282                     waiter.Wait();
00283                 }
00284
00285                 Verify.AreEqual(result.Value, "VerifyAcrylicBrushEffect: Passed");
00286             }
00287         }
00288
00289         [TestMethod]
00290         public void AcrylicRendering_LuminosityBlend()
00291         {
00292             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToRenderingAcrylic" }))
00293             {
00294                 CheckBox cbComplexBackground = new CheckBox(FindElement.ById("cbComplexBackground"));
00295                 cbComplexBackground.Uncheck();
00296
00297                 var result = new Edit(FindElement.ById("TestResult"));
00298
00299                 using (var waiter = new ValueChangedEventWaiter(result))
00300                 {
00301                     Button setLuminosityBlendButton = new Button(FindElement.ById("SetLuminosityButton"));
00302                     setLuminosityBlendButton.Invoke();
00303
00304                     waiter.Wait();
00305                 }
00306                 LogResult(result, "SetLuminosityBlend");
00307
00308                 using (var waiter = new ValueChangedEventWaiter(result))
00309                 {
00310                     Button unsetLuminosityBlendButton = new Button(FindElement.ById("UnsetLuminosityButton"));
00311                     unsetLuminosityBlendButton.Invoke();
00312
00313                     waiter.Wait();
00314                 }
00315                 LogResult(result, "ClearLuminosityBlend");
00316             }
00317         }
00318
00319         [TestMethod]
00320         public void AcrylicRendering_AcrylicOnComplexTransparentBG()
00321         {
00322             // Bug 39932644: Verify that Acrylic renders properly even if its background includes transparency.
00323             using (var setup = new TestSetupHelper(new[] { "Acrylic Tests", "navigateToRenderingAcrylic" }))
00324             {
00325                 CheckBox cbComplexBackground = new CheckBox(FindElement.ById("cbComplexBackground"));
00326                 cbComplexBackground.Check();
00327
00328                 var result = new Edit(FindElement.ById("TestResult"));
00329                 using (var waiter = new ValueChangedEventWaiter(result))
00330                 {
00331                     Button runTestButton = new Button(FindElement.ById("RunTestButton"));
00332                     runTestButton.Invoke();
00333
00334                     waiter.Wait();
00335                 }
00336
00337                 Verify.AreEqual(result.Value, "AcrylicOnComplexTransparentBG: Passed");
00338             }
00339         }
00340
00341         private void LogResult(Edit result, string stateName)
00342         {
00343             string expectedResult = stateName + ": Passed";
00344             bool testPassed = (0 == String.Compare(expectedResult, 0, result.Value, 0, expectedResult.Length));
00345
00346             if (testPassed)
00347             {
00348                 Log.Comment(result.Value);
00349             }
00350             else
00351             {
00352                 Log.Error(result.Value);
00353             }
00354         }
00355
00356         private void ChooseFromComboBox(string textBoxName, string text)
00357         {
00358             Log.Comment("Retrieve text box with name '{0}'.", textBoxName);
00359             ComboBox comboBox = new ComboBox(FindElement.ById(textBoxName));
00360             comboBox.SelectItemByName(text);
00361             Wait.ForIdle();
00362         }
00363     }
00364 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementIndexChangedEventArgs.cpp Source File

  • File List
  • File Members
  • Repeater

ItemsRepeaterElementIndexChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsRepeater.common.h"
00007 #include "ItemsRepeaterElementIndexChangedEventArgs.h"
00008
00009 ItemsRepeaterElementIndexChangedEventArgs::ItemsRepeaterElementIndexChangedEventArgs(
00010     const winrt::UIElement& element,
00011     int oldIndex,
00012     int newIndex)
00013 {
00014     Update(element, oldIndex, newIndex);
00015 }
00016 #pragma region IElementPreparedEventArgs
00017
00018 winrt::UIElement ItemsRepeaterElementIndexChangedEventArgs::Element()
00019 {
00020     return m_element.get();
00021 }
00022
00023 int32_t ItemsRepeaterElementIndexChangedEventArgs::OldIndex()
00024 {
00025     return m_oldIndex;
00026 }
00027
00028 int32_t ItemsRepeaterElementIndexChangedEventArgs::NewIndex()
00029 {
00030     return m_newIndex;
00031 }
00032
00033 #pragma endregion
00034
00035 void ItemsRepeaterElementIndexChangedEventArgs::Update(const winrt::UIElement& element, int oldIndex, int newIndex)
00036 {
00037     m_element.set(element);
00038     m_oldIndex = oldIndex;
00039     m_newIndex = newIndex;
00040 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarEraserButton Member List

This is the complete list of members for InkToolBarEraserButton, including all inherited members.
ArePrecisionErasersVisible() | InkToolBarEraserButton | [inline]
ArePrecisionErasersVisible(bool value) | InkToolBarEraserButton | [inline]
ArePrecisionErasersVisibleProperty() | InkToolBarEraserButtonProperties | [inline, static]
ClearProperties() | InkToolBarEraserButtonProperties | [static]
EnsureProperties() | InkToolBarEraserButtonProperties | [static]
InkToolBarEraserButtonProperties() | InkToolBarEraserButtonProperties |
IsClearAllVisible() | InkToolBarEraserButton | [inline]
IsClearAllVisible(bool value) | InkToolBarEraserButton | [inline]
IsClearAllVisibleProperty() | InkToolBarEraserButtonProperties | [inline, static]
IsStrokeEraserVisible() | InkToolBarEraserButton | [inline]
IsStrokeEraserVisible(bool value) | InkToolBarEraserButton | [inline]
IsStrokeEraserVisibleProperty() | InkToolBarEraserButtonProperties | [inline, static]
s_ArePrecisionErasersVisibleProperty | InkToolBarEraserButtonProperties | [static]
s_IsClearAllVisibleProperty | InkToolBarEraserButtonProperties | [static]
s_IsStrokeEraserVisibleProperty | InkToolBarEraserButtonProperties | [static]
s_SelectedEraserProperty | InkToolBarEraserButtonProperties | [static]
SelectedEraser() | InkToolBarEraserButton | [inline]
SelectedEraser(winrt::InkToolBarEraserKind value) | InkToolBarEraserButton | [inline]
InkToolBarEraserButtonProperties::SelectedEraser(winrt::InkToolBarEraserKind const &value) | InkToolBarEraserButtonProperties |
SelectedEraserProperty() | InkToolBarEraserButtonProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/ScrollBarPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

ScrollBarPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     [TopLevelTestPage(Name = "ScrollBar")]
00007     public sealed partial class ScrollBarPage : TestPage
00008     {
00009         public ScrollBarPage()
00010         {
00011             this.InitializeComponent();
00012         }
00013     }
00014 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRingTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

ProgressRingTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ProgressRingTemplateSettings.h"
00008
00009 GlobalDependencyProperty ProgressRingTemplateSettingsProperties::s_EllipseDiameterProperty{ nullptr };
00010 GlobalDependencyProperty ProgressRingTemplateSettingsProperties::s_EllipseOffsetProperty{ nullptr };
00011 GlobalDependencyProperty ProgressRingTemplateSettingsProperties::s_MaxSideLengthProperty{ nullptr };
00012
00013 ProgressRingTemplateSettingsProperties::ProgressRingTemplateSettingsProperties()
00014 {
00015     EnsureProperties();
00016 }
00017
00018 void ProgressRingTemplateSettingsProperties::EnsureProperties()
00019 {
00020     if (!s_EllipseDiameterProperty)
00021     {
00022         s_EllipseDiameterProperty =
00023             InitializeDependencyProperty(
00024                 L"EllipseDiameter",
00025                 winrt::name_of<double>(),
00026                 winrt::name_of<winrt::ProgressRingTemplateSettings>(),
00027                 false /* isAttached */,
00028                 ValueHelper<double>::BoxedDefaultValue(),
00029                 nullptr);
00030     }
00031     if (!s_EllipseOffsetProperty)
00032     {
00033         s_EllipseOffsetProperty =
00034             InitializeDependencyProperty(
00035                 L"EllipseOffset",
00036                 winrt::name_of<winrt::Thickness>(),
00037                 winrt::name_of<winrt::ProgressRingTemplateSettings>(),
00038                 false /* isAttached */,
00039                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00040                 nullptr);
00041     }
00042     if (!s_MaxSideLengthProperty)
00043     {
00044         s_MaxSideLengthProperty =
00045             InitializeDependencyProperty(
00046                 L"MaxSideLength",
00047                 winrt::name_of<double>(),
00048                 winrt::name_of<winrt::ProgressRingTemplateSettings>(),
00049                 false /* isAttached */,
00050                 ValueHelper<double>::BoxedDefaultValue(),
00051                 nullptr);
00052     }
00053 }
00054
00055 void ProgressRingTemplateSettingsProperties::ClearProperties()
00056 {
00057     s_EllipseDiameterProperty = nullptr;
00058     s_EllipseOffsetProperty = nullptr;
00059     s_MaxSideLengthProperty = nullptr;
00060 }
00061
00062 void ProgressRingTemplateSettingsProperties::EllipseDiameter(double value)
00063 {
00064     [[gsl::suppress(con)]]
00065     {
00066     static_cast<ProgressRingTemplateSettings*>(this)->SetValue(s_EllipseDiameterProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00067     }
00068 }
00069
00070 double ProgressRingTemplateSettingsProperties::EllipseDiameter()
00071 {
00072     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRingTemplateSettings*>(this)->GetValue(s_EllipseDiameterProperty));
00073 }
00074
00075 void ProgressRingTemplateSettingsProperties::EllipseOffset(winrt::Thickness const& value)
00076 {
00077     [[gsl::suppress(con)]]
00078     {
00079     static_cast<ProgressRingTemplateSettings*>(this)->SetValue(s_EllipseOffsetProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00080     }
00081 }
00082
00083 winrt::Thickness ProgressRingTemplateSettingsProperties::EllipseOffset()
00084 {
00085     return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<ProgressRingTemplateSettings*>(this)->GetValue(s_EllipseOffsetProperty));
00086 }
00087
00088 void ProgressRingTemplateSettingsProperties::MaxSideLength(double value)
00089 {
00090     [[gsl::suppress(con)]]
00091     {
00092     static_cast<ProgressRingTemplateSettings*>(this)->SetValue(s_MaxSideLengthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00093     }
00094 }
00095
00096 double ProgressRingTemplateSettingsProperties::MaxSideLength()
00097 {
00098     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressRingTemplateSettings*>(this)->GetValue(s_MaxSideLengthProperty));
00099 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/velocity.h Source File

  • File List
  • File Members
  • inc

velocity.h

Go to the documentation of this file.
00001 #ifndef __features_FeatureStaging_SampleFeature
00002 #define __features_FeatureStaging_SampleFeature
00003 #endif
00004
00005 #ifndef WIL_STAGING_DLL
00006 #define WIL_STAGING_DLL
00007 #endif
00008
00009 // wil does not work well with code analysis enabled so we disable some warnings:
00010 #pragma warning(push)
00011 #pragma warning(disable : 6001)
00012 #pragma warning(disable : 6319)
00013 #pragma warning(disable : 6387)
00014 #pragma warning(disable : 6553)
00015 #pragma warning(disable : 26460)
00016 #pragma warning(disable : 26461)
00017 #pragma warning(disable : 26462)
00018 #pragma warning(disable : 26495)
00019 #pragma warning(disable : 26496)
00020 #pragma warning(disable : 26497)
00021 #pragma warning(disable : 26812)
00022
00023 #include <wil/ResultMacros.h>
00024 using namespace wil::details;
00025 #include <wil/Staging.h>
00026
00027 WI_DEFINE_FEATURE(
00028     Feature_NWMTest1, 39145991, DisabledByDefault,
00029     WilStagingChangeTime(OnReboot),
00030     WilStagingGroup("", R"()"));
00031
00032 WI_DEFINE_FEATURE(
00033     Feature_Tabs, 37634385, DisabledByDefault,
00034     WilStagingChangeTime(OnReboot),
00035     WilStagingRequiresFeature(Feature_NWMTest1),
00036     WilStagingGroup("", R"()"));
00037
00038 #pragma warning(pop)
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewPage Member List

This is the complete list of members for TreeViewPage, including all inherited members.
_disableClickToExpand | TreeViewPage | [private]
_virtualizedNode | TreeViewPage | [private]
_visualRoot | TreeViewPage | [private]
AddExtraNodes_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
AddInheritedTreeViewNode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
AddNodeWithEmpyUnrealizedChildren_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
AddRootNode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
AddSecondLevelOfNodes_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ChangeFlowDirection_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ChangeSelectionAfterFlyout_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ClearException_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ClearNodes_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ContentModeTestTreeView_Expanding(TreeView sender, TreeViewExpandingEventArgs args) | TreeViewPage | [inline, private]
CreateTree() | TreeViewPage | [inline, private]
DisableClickToExpand_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
DisableItemDrag_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
DisableItemReorder_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
DragEnterForApiTest(object sender, DragEventArgs args) | TreeViewPage | [inline, private]
Draggable_DragStarting(UIElement sender, DragStartingEventArgs args) | TreeViewPage | [inline, private]
DragItemsCompletedForApiTest(TreeView sender, TreeViewDragItemsCompletedEventArgs args) | TreeViewPage | [inline, private]
DragItemsStartingForApiTest(TreeView sender, TreeViewDragItemsStartingEventArgs args) | TreeViewPage | [inline, private]
DragLeaveForApiTest(object sender, DragEventArgs args) | TreeViewPage | [inline, private]
DragOverForApiTest(object sender, DragEventArgs args) | TreeViewPage | [inline, private]
DropForApiTest(object sender, DragEventArgs args) | TreeViewPage | [inline, private]
DropTarget_DragOver(object sender, DragEventArgs e) | TreeViewPage | [inline, private]
DropTarget_Drop(object sender, DragEventArgs e) | TreeViewPage | [inline, private]
ExpandRootNode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
flyoutTVI | TreeViewPage |
GetCheckBoxStates(TreeView tree) | TreeViewPage | [inline, private]
GetChildrenOrder_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
GetDraggedItemsNames(IEnumerable< object > items) | TreeViewPage | [inline, private]
GetFlyoutTreeViewItemCount_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
GetItemCommonStates_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
GetItemCount_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
GetItemsSourceOrder() | TreeViewPage | [inline, private]
GetMultiSelectCheckBoxStates_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
GetNodeContent(TreeViewNode node) | TreeViewPage | [inline, private]
GetRootNodeChildrenOrder(TreeView tree) | TreeViewPage | [inline, private]
GetSelected_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
GetSelection(TreeView tree) | TreeViewPage | [inline, private]
GetTree2ItemCount_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
IsInContentMode() | TreeViewPage | [inline, private]
Item_DragEnter(object sender, DragEventArgs e) | TreeViewPage | [inline, private]
ItemTemplateSelectorTestPage_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
LabelItems_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
LoadPerfTreeView_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ModifySecondLevelOfNode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
MoveNodesToNewTreeView_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | TreeViewPage | [inline, protected]
PrepareItemsSource(bool expandRootNode=false) | TreeViewPage | [inline, private]
PrepareItemsSourceAsync() | TreeViewPage | [inline, private]
ReadBindingResult_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
RemoveSecondLevelOfNode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ResetContentMode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ResetItemsSource_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ResetItemsSourceAsync_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SelectLastRootNode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SelectRoot2Item_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SetAutomationIdForNodes(TreeView tree) | TreeViewPage | [inline, private]
SetContentMode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SetRoot1HasUnrealizedChildren_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SetupCustomDragUIOverride_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SetupDragDropHandlersForApiTest_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SetupDragToDropTarget_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SetupExpandingNodeEvent_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SetupNoReorderNodes_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SizeTreeViewsForDrags_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
SwapItemsSource_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
TestTreeView2ItemsSource | TreeViewPage |
TestTreeView_DragItemsStarting(TreeView sender, TreeViewDragItemsStartingEventArgs e) | TreeViewPage | [inline, private]
TestTreeView_Expanding(TreeView sender, TreeViewExpandingEventArgs args) | TreeViewPage | [inline, private]
TestTreeView_ItemInvoked(TreeView sender, TreeViewItemInvokedEventArgs args) | TreeViewPage | [inline, private]
TestTreeViewContentMode_ItemInvoked(TreeView sender, TreeViewItemInvokedEventArgs args) | TreeViewPage | [inline, private]
TestTreeViewItemsSource | TreeViewPage |
ToggleRoot0Selection_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ToggleSelectedNodes_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
ToggleSelectionMode_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
TreeView_DragOver(object sender, DragEventArgs e) | TreeViewPage | [inline, private]
TreeView_Drop(object sender, DragEventArgs e) | TreeViewPage | [inline, private]
TreeViewInFlyout_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
TreeViewItemsSourceTestPage_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
TreeViewLateDataInitTestPage_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
TreeViewNodeInMarkupTestPage_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
TreeViewPage() | TreeViewPage | [inline]
TreeViewUnrealizedChildrenTestPage_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
TwoWayBoundButton_Click(object sender, RoutedEventArgs e) | TreeViewPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomStartingEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomStartingEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenter.h"
00007 #include "ScrollingZoomStartingEventArgs.g.h"
00008
00009 class ScrollingZoomStartingEventArgs :
00010     public winrt::implementation::ScrollingZoomStartingEventArgsT<ScrollingZoomStartingEventArgs>
00011 {
00012 public:
00013     ScrollingZoomStartingEventArgs()
00014     {
00015         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00016     }
00017
00018     ~ScrollingZoomStartingEventArgs()
00019     {
00020         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00021     }
00022
00023     // IScrollingZoomStartingEventArgs overrides
00024     int32_t CorrelationId() const;
00025     double HorizontalOffset() const;
00026     double VerticalOffset() const;
00027     float ZoomFactor() const;
00028
00029     void SetCorrelationId(int32_t correlationId);
00030     void SetHorizontalOffset(double horizontalOffset);
00031     void SetVerticalOffset(double verticalOffset);
00032     void SetZoomFactor(float zoomFactor);
00033
00034 private:
00035     int32_t m_correlationId{ -1 };
00036     double m_horizontalOffset{};
00037     double m_verticalOffset{};
00038     float m_zoomFactor{};
00039 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LinedFlowLayout.properties.h Source File

  • File List
  • File Members
  • Generated

LinedFlowLayout.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class LinedFlowLayoutProperties
00008 {
00009 public:
00010     LinedFlowLayoutProperties();
00011
00012     void ActualLineHeight(double value);
00013     double ActualLineHeight();
00014
00015     void ItemsJustification(winrt::LinedFlowLayoutItemsJustification const& value);
00016     winrt::LinedFlowLayoutItemsJustification ItemsJustification();
00017
00018     void ItemsStretch(winrt::LinedFlowLayoutItemsStretch const& value);
00019     winrt::LinedFlowLayoutItemsStretch ItemsStretch();
00020
00021     void LineHeight(double value);
00022     double LineHeight();
00023
00024     void LineSpacing(double value);
00025     double LineSpacing();
00026
00027     void MinItemSpacing(double value);
00028     double MinItemSpacing();
00029
00030     static winrt::DependencyProperty ActualLineHeightProperty() { return s_ActualLineHeightProperty; }
00031     static winrt::DependencyProperty ItemsJustificationProperty() { return s_ItemsJustificationProperty; }
00032     static winrt::DependencyProperty ItemsStretchProperty() { return s_ItemsStretchProperty; }
00033     static winrt::DependencyProperty LineHeightProperty() { return s_LineHeightProperty; }
00034     static winrt::DependencyProperty LineSpacingProperty() { return s_LineSpacingProperty; }
00035     static winrt::DependencyProperty MinItemSpacingProperty() { return s_MinItemSpacingProperty; }
00036
00037     static GlobalDependencyProperty s_ActualLineHeightProperty;
00038     static GlobalDependencyProperty s_ItemsJustificationProperty;
00039     static GlobalDependencyProperty s_ItemsStretchProperty;
00040     static GlobalDependencyProperty s_LineHeightProperty;
00041     static GlobalDependencyProperty s_LineSpacingProperty;
00042     static GlobalDependencyProperty s_MinItemSpacingProperty;
00043
00044     winrt::event_token ItemsInfoRequested(winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs> const& value);
00045     void ItemsInfoRequested(winrt::event_token const& token);
00046     winrt::event_token ItemsUnlocked(winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::IInspectable> const& value);
00047     void ItemsUnlocked(winrt::event_token const& token);
00048
00049     event_source<winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs>> m_itemsInfoRequestedEventSource;
00050     event_source<winrt::TypedEventHandler<winrt::LinedFlowLayout, winrt::IInspectable>> m_itemsUnlockedEventSource;
00051
00052     static void EnsureProperties();
00053     static void ClearProperties();
00054
00055     static void OnActualLineHeightPropertyChanged(
00056         winrt::DependencyObject const& sender,
00057         winrt::DependencyPropertyChangedEventArgs const& args);
00058
00059     static void OnItemsJustificationPropertyChanged(
00060         winrt::DependencyObject const& sender,
00061         winrt::DependencyPropertyChangedEventArgs const& args);
00062
00063     static void OnItemsStretchPropertyChanged(
00064         winrt::DependencyObject const& sender,
00065         winrt::DependencyPropertyChangedEventArgs const& args);
00066
00067     static void OnLineHeightPropertyChanged(
00068         winrt::DependencyObject const& sender,
00069         winrt::DependencyPropertyChangedEventArgs const& args);
00070
00071     static void OnLineSpacingPropertyChanged(
00072         winrt::DependencyObject const& sender,
00073         winrt::DependencyPropertyChangedEventArgs const& args);
00074
00075     static void OnMinItemSpacingPropertyChanged(
00076         winrt::DependencyObject const& sender,
00077         winrt::DependencyPropertyChangedEventArgs const& args);
00078 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterElementClearingEventArgs.h Source File

  • File List
  • File Members
  • Repeater

ItemsRepeaterElementClearingEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsRepeaterElementClearingEventArgs.g.h"
00007
00008 class ItemsRepeaterElementClearingEventArgs :
00009     public ReferenceTracker<ItemsRepeaterElementClearingEventArgs, winrt::implementation::ItemsRepeaterElementClearingEventArgsT, winrt::composable, winrt::composing>
00010 {
00011 public:
00012     ItemsRepeaterElementClearingEventArgs(
00013         const winrt::UIElement& element);
00014
00015 #pragma region IElementClearingEventArgs
00016     winrt::UIElement Element();
00017 #pragma endregion
00018
00019     void Update(const winrt::UIElement& element);
00020
00021 private:
00022     tracker_ref<winrt::UIElement> m_element{ this };
00023 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarTests Member List

This is the complete list of members for MenuBarTests, including all inherited members.
AddRemoveMenuBarItemTest() | MenuBarTests | [inline]
AddRemoveMenuFlyoutItemTest() | MenuBarTests | [inline]
AutomationPeerTest() | MenuBarTests | [inline]
BasicMouseInteractionTest() | MenuBarTests | [inline]
ClassInitialize(TestContext testContext) | MenuBarTests | [inline, static]
EmptyMenuBarItemNoPopupTest() | MenuBarTests | [inline]
GetElement< T >(ref T element, string elementName) | MenuBarTests | [inline, private]
HoveringBehaviorTest() | MenuBarTests | [inline]
KeyboardAcceleratorsTest() | MenuBarTests | [inline]
KeyboardNavigationWithAccessKeysTest() | MenuBarTests | [inline]
KeyboardNavigationWithArrowKeysTest() | MenuBarTests | [inline]
KeyboardNavigationWithArrowKeysWithDisabledItemTest() | MenuBarTests | [inline]
KeyboardNavigationWithArrowKeysWithOnlyOneItemWorks() | MenuBarTests | [inline]
MenuBarHeightTest() | MenuBarTests | [inline]
TabTest() | MenuBarTests | [inline]
TestCleanup() | MenuBarTests | [inline]
VerifyAxeScanPasses() | MenuBarTests | [inline]
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarAutomationPeer.cpp Source File

  • File List
  • File Members
  • InfoBar

InfoBarAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿#include "pch.h"
00002 #include "common.h"
00003 #include "ResourceAccessor.h"
00004 #include "InfoBarAutomationPeer.h"
00005 #include <UIAutomationCore.h>
00006 #include <UIAutomationCoreApi.h>
00007
00008 #include "InfoBarAutomationPeer.properties.cpp"
00009
00010 InfoBarAutomationPeer::InfoBarAutomationPeer(winrt::InfoBar const& owner) : ReferenceTracker(owner)
00011 {
00012 }
00013
00014 winrt::AutomationControlType InfoBarAutomationPeer::GetAutomationControlTypeCore()
00015 {
00016     return winrt::AutomationControlType::StatusBar;
00017 }
00018
00019 winrt::hstring InfoBarAutomationPeer::GetClassNameCore()
00020 {
00021     return winrt::hstring_name_of<winrt::InfoBar>();
00022 }
00023
00024 void InfoBarAutomationPeer::RaiseOpenedEvent(winrt::InfoBarSeverity severity, wstring_view const& displayString)
00025 {
00026     RaiseNotificationEvent(
00027         winrt::Automation::Peers::AutomationNotificationKind::Other,
00028         GetProcessingForSeverity(severity),
00029         displayString,
00030         L"InfoBarOpenedActivityId");
00031 }
00032
00033 void InfoBarAutomationPeer::RaiseClosedEvent(winrt::InfoBarSeverity severity, wstring_view const& displayString)
00034 {
00035     const winrt::Peers::AutomationNotificationProcessing processing = winrt::Peers::AutomationNotificationProcessing::CurrentThenMostRecent;
00036
00037     RaiseNotificationEvent(
00038         winrt::Automation::Peers::AutomationNotificationKind::Other,
00039         GetProcessingForSeverity(severity),
00040         displayString,
00041         L"InfoBarClosedActivityId");
00042 }
00043
00044
00045 winrt::Peers::AutomationNotificationProcessing InfoBarAutomationPeer::GetProcessingForSeverity(winrt::InfoBarSeverity severity)
00046 {
00047     winrt::Peers::AutomationNotificationProcessing processing = winrt::Peers::AutomationNotificationProcessing::CurrentThenMostRecent;
00048
00049     if (severity == winrt::InfoBarSeverity::Error
00050         || severity == winrt::InfoBarSeverity::Warning)
00051     {
00052         processing = winrt::Peers::AutomationNotificationProcessing::ImportantAll;
00053     }
00054
00055     return processing;
00056 }
00057
00058 winrt::InfoBar InfoBarAutomationPeer::GetInfoBar()
00059 {
00060     winrt::UIElement owner = Owner();
00061     return owner.as<winrt::InfoBar>();
00062 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SliderInteractionTests Member List

This is the complete list of members for SliderInteractionTests, including all inherited members.
DoesAdvertiseSupportedEvents() | SliderInteractionTests | [inline]
ValidateDefaultValues() | SliderInteractionTests | [inline]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/CustomItemsSource.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

CustomItemsSource.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Microsoft.UI.Xaml.Controls;
00007 using System.Collections.Specialized;
00008
00009 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00010 {
00011     class CustomItemsSource : CustomItemsSourceView
00012     {
00013         List<int> _inner;
00014         public int GetAtCallCount { get; set; }
00015
00016         public CustomItemsSource(List<int> source)
00017         {
00018             _inner = source;
00019         }
00020
00021         public List<int> Inner { get { return _inner; } }
00022
00023         public object GetAt(int index)
00024         {
00025             return GetAtCore(index);
00026         }
00027
00028         public void Insert(int index, int count, bool reset, int valueStart = 1000)
00029         {
00030             for (int i = 0; i < count; i++)
00031             {
00032                 Inner.Insert(index + i, valueStart + i);
00033             }
00034
00035             if (reset)
00036             {
00037                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00038             }
00039             else
00040             {
00041                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00042                     NotifyCollectionChangedAction.Add,
00043                     oldStartingIndex: -1,
00044                     oldItemsCount: -1,
00045                     newStartingIndex: index,
00046                     newItemsCount: count));
00047             }
00048         }
00049
00050         public void Remove(int index, int count, bool reset)
00051         {
00052             for (int i = 0; i < count; i++)
00053             {
00054                 Inner.RemoveAt(index);
00055             }
00056
00057             if (reset)
00058             {
00059                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00060             }
00061             else
00062             {
00063                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00064                     NotifyCollectionChangedAction.Remove,
00065                     oldStartingIndex: index,
00066                     oldItemsCount: count,
00067                     newStartingIndex: -1,
00068                     newItemsCount: -1));
00069             }
00070         }
00071
00072         public void Replace(int index, int oldCount, int newCount, bool reset)
00073         {
00074             for (int i = 0; i < oldCount; i++)
00075             {
00076                 Inner.RemoveAt(index);
00077             }
00078
00079             for (int i = 0; i < newCount; i++)
00080             {
00081                 Inner.Insert(index, 10000 + i);
00082             }
00083
00084             if (reset)
00085             {
00086                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00087             }
00088             else
00089             {
00090                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00091                     NotifyCollectionChangedAction.Replace,
00092                     oldStartingIndex: index,
00093                     oldItemsCount: oldCount,
00094                     newStartingIndex: index,
00095                     newItemsCount: newCount));
00096             }
00097         }
00098
00099         public void Move(int oldIndex, int newIndex, int count, bool reset)
00100         {
00101             var items = Inner.GetRange(oldIndex, count);
00102             Inner.RemoveRange(oldIndex, count);
00103             Inner.InsertRange(newIndex, items);
00104
00105             if (reset)
00106             {
00107                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00108             }
00109             else
00110             {
00111                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00112                     NotifyCollectionChangedAction.Move,
00113                     oldStartingIndex: oldIndex,
00114                     oldItemsCount: count,
00115                     newStartingIndex: newIndex,
00116                     newItemsCount: count));
00117             }
00118         }
00119
00120         public void Reset()
00121         {
00122             Random rand = new Random(123);
00123             for (int i = 0; i < 10; i++)
00124             {
00125                 int from = rand.Next(0, Inner.Count - 1);
00126                 var value = Inner[from];
00127                 Inner.RemoveAt(from);
00128                 int to = rand.Next(0, Inner.Count - 1);
00129                 Inner.Insert(to, value);
00130             }
00131
00132             // something changed, but i don't want to tell you the
00133             // exact changes
00134             OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00135         }
00136
00137         public new void Clear()
00138         {
00139             Inner.Clear();
00140             // something changed, but i don't want to tell you the exact changes
00141             OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00142         }
00143
00144         protected override int GetSizeCore()
00145         {
00146             return Inner.Count;
00147         }
00148
00149         protected override object GetAtCore(int index)
00150         {
00151             GetAtCallCount++;
00152             return Inner[index];
00153         }
00154     }
00155
00156     class CustomItemsSourceWithUniqueId : CustomItemsSource, IKeyIndexMapping
00157     {
00158         public CustomItemsSourceWithUniqueId(List<int> source) : base(source)
00159         { }
00160
00161         public string KeyFromIndex(int index)
00162         {
00163             return Inner[index].ToString();
00164         }
00165
00166         public int IndexFromKey(string id)
00167         {
00168             throw new NotImplementedException();
00169         }
00170     }
00171 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealListViewItemPresenter Member List

This is the complete list of members for RevealListViewItemPresenter, including all inherited members.
abi_enter() | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
CheckThread() | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< RevealListViewItemPresenter > &&self) noexcept | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
final_release(std::unique_ptr< RevealListViewItemPresenter > &&self) | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline, static]
GetBase() | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
GetInner() | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
GoToElementStateCore(winrt::hstring const &stateName, bool useTransitions) | RevealListViewItemPresenter |
IsOnThread() | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT > | [inline]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/TestCommand.cs Source File

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI

TestCommand.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Text;
00008 using System.Windows.Input;
00009
00010 namespace SwipeControl_TestUI
00011 {
00012     public class TestCommand : ICommand
00013     {
00014         SwipeControlPage page;
00015         public TestCommand(SwipeControlPage page)
00016         {
00017             this.page = page;
00018         }
00019
00020         public event EventHandler CanExecuteChanged;
00021
00022         public bool CanExecute(object parameter)
00023         {
00024             return (parameter as String).Equals("command's text");
00025         }
00026
00027         public void Execute(object parameter)
00028         {
00029             page.ChangeText(parameter as String);
00030
00031             if(CanExecuteChanged != null)
00032             {
00033                 // do nothing
00034             }
00035         }
00036     }
00037 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsView.h Source File

  • File List
  • File Members
  • ItemsView

ItemsView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsViewTrace.h"
00007 #include "ItemsView.g.h"
00008 #include "ItemsView.properties.h"
00009 #include "SelectorBase.h"
00010 #include "PointerInfo.h"
00011
00012 class ItemsView :
00013     public ReferenceTracker<ItemsView, winrt::implementation::ItemsViewT>,
00014     public ItemsViewProperties
00015 {
00016 public:
00017     ItemsView();
00018     ~ItemsView();
00019
00020     // Properties' default values.
00021     static constexpr winrt::ItemsViewSelectionMode s_defaultSelectionMode{ winrt::ItemsViewSelectionMode::Single };
00022
00023 #pragma region IItemsView
00024
00025     winrt::ScrollView ScrollView() const;
00026     winrt::IVectorView<winrt::IInspectable> SelectedItems();
00027
00028     bool TryGetItemIndex(double horizontalViewportRatio, double verticalViewportRatio, int& index);
00029     void StartBringItemIntoView(int32_t index, const winrt::BringIntoViewOptions& options);
00030
00031     void Select(int itemIndex);
00032     void Deselect(int itemIndex);
00033     bool IsSelected(int itemIndex);
00034     void SelectAll();
00035     void DeselectAll();
00036     void InvertSelection();
00037
00038 #pragma endregion
00039
00040     // Invoked by ItemsViewTestHooks
00041     int GetCurrentElementIndex() const;
00042     winrt::Point GetKeyboardNavigationReferenceOffset() const;
00043     winrt::ItemsRepeater GetItemsRepeaterPart() const;
00044     winrt::ScrollView GetScrollViewPart() const;
00045     winrt::SelectionModel GetSelectionModel() const;
00046
00047     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00048
00049 #ifdef DBG
00050     static winrt::hstring DependencyPropertyToStringDbg(const winrt::IDependencyProperty& dependencyProperty);
00051 #endif
00052
00053 #pragma region IControlOverrides
00054 #ifdef DBG
00055     void OnGotFocus(
00056         winrt::RoutedEventArgs const& args);
00057 #endif
00058     void OnKeyDown(
00059         winrt::KeyRoutedEventArgs const& args);
00060 #pragma endregion
00061
00062 #pragma region IFrameworkElementOverrides
00063     // unoverridden methods provided by FrameworkElementOverridesHelper
00064     void OnApplyTemplate(); // not actually final for 'derived' classes
00065 #pragma endregion
00066
00067 #pragma region IUIElementOverrides
00068     winrt::AutomationPeer OnCreateAutomationPeer();
00069 #pragma endregion
00070
00071 private:
00072     void EnsureItemTemplate();
00073     void UpdateItemsRepeater(
00074         const winrt::ItemsRepeater& itemsRepeater);
00075     void UpdateScrollView(
00076         const winrt::ScrollView& scrollView);
00077     void UpdateSelector();
00078     void UpdateKeyboardNavigationReference();
00079
00080     void RaiseItemInvoked(
00081         const winrt::UIElement& element);
00082
00083     void RaiseSelectionChanged();
00084
00085     void HookItemsSourceViewEvents();
00086     void HookItemsRepeaterEvents();
00087     void UnhookItemsRepeaterEvents(
00088         bool isForDestructor);
00089     void HookScrollViewEvents();
00090     void UnhookScrollViewEvents(
00091         bool isForDestructor);
00092
00093     void HookCompositionTargetRendering();
00094     void UnhookCompositionTargetRendering();
00095
00096     bool ProcessInteraction(
00097         const winrt::UIElement& element,
00098         const winrt::FocusState& focusState);
00099
00100     bool ProcessNavigationKeys();
00101
00102     void QueueNavigationKey(
00103         const winrt::VirtualKey& key);
00104
00105     void CompleteStartBringItemIntoView();
00106
00107     void OnItemsRepeaterElementPrepared(
00108         const winrt::ItemsRepeater& itemsRepeater,
00109         const winrt::ItemsRepeaterElementPreparedEventArgs& args);
00110
00111     void OnItemsRepeaterElementClearing(
00112         const winrt::ItemsRepeater& itemsRepeater,
00113         const winrt::ItemsRepeaterElementClearingEventArgs& args);
00114
00115     void OnItemsRepeaterElementIndexChanged(
00116         const winrt::ItemsRepeater& itemsRepeater,
00117         const winrt::ItemsRepeaterElementIndexChangedEventArgs& args);
00118
00119     void OnItemsRepeaterItemsSourceChanged(
00120         const winrt::DependencyObject& sender,
00121         const winrt::DependencyProperty& args);
00122
00123     void OnItemsRepeaterLayoutUpdated(
00124         const winrt::IInspectable& sender,
00125         const winrt::IInspectable& args);
00126
00127     void OnItemsRepeaterSizeChanged(
00128         const winrt::IInspectable& sender,
00129         const winrt::SizeChangedEventArgs& args);
00130
00131     void OnScrollViewAnchorRequested(
00132         const winrt::ScrollView& scrollView,
00133         const winrt::ScrollingAnchorRequestedEventArgs& args);
00134
00135     void OnScrollViewBringingIntoView(
00136         const winrt::ScrollView& scrollView,
00137         const winrt::ScrollingBringingIntoViewEventArgs& args);
00138
00139 #ifdef DBG
00140     void OnScrollViewExtentChangedDbg(
00141         const winrt::ScrollView& scrollView,
00142         const winrt::IInspectable& args);
00143 #endif
00144
00145     void OnScrollViewScrollCompleted(
00146         const winrt::ScrollView& scrollView,
00147         const winrt::ScrollingScrollCompletedEventArgs& args);
00148
00149     void OnItemsViewElementGettingFocus(
00150         const winrt::UIElement& element,
00151         const winrt::GettingFocusEventArgs& args);
00152
00153     void OnItemsViewElementKeyDown(
00154         const winrt::IInspectable& sender,
00155         const winrt::KeyRoutedEventArgs& args);
00156
00157 #ifdef DBG
00158     void OnItemsViewElementLosingFocusDbg(
00159         const winrt::UIElement& element,
00160         const winrt::LosingFocusEventArgs& args);
00161 #endif
00162
00163     void OnItemsViewItemContainerIsSelectedChanged(
00164         const winrt::DependencyObject& sender,
00165         const winrt::DependencyProperty& args);
00166
00167     void OnItemsViewItemContainerItemInvoked(
00168         const winrt::ItemContainer& itemContainer,
00169         const winrt::ItemContainerInvokedEventArgs& args);
00170
00171 #ifdef DBG_VERBOSE
00172     void OnItemsViewItemContainerSizeChangedDbg(
00173         const winrt::IInspectable& sender,
00174         const winrt::SizeChangedEventArgs& args);
00175 #endif
00176
00177 #ifdef DBG
00178     void OnLayoutMeasureInvalidatedDbg(
00179         const winrt::Layout& sender,
00180         const winrt::IInspectable&);
00181
00182     void OnLayoutArrangeInvalidatedDbg(
00183         const winrt::Layout&,
00184         const winrt::IInspectable&);
00185 #endif
00186
00187     void OnCompositionTargetRendering(
00188         const winrt::IInspectable& sender,
00189         const winrt::IInspectable& args);
00190
00191     void OnItemsSourceChanged();
00192 #ifdef DBG
00193     void OnLayoutChangedDbg();
00194 #endif
00195     void OnIsItemInvokedEnabledChanged();
00196     void OnItemTemplateChanged();
00197     void OnSelectionModeChanged();
00198     void OnVerticalScrollControllerChanged();
00199
00200     void OnCurrentElementSelectionModelSelectionChanged(
00201         const winrt::SelectionModel& selectionModel,
00202         const winrt::SelectionModelSelectionChangedEventArgs& args);
00203     void OnSelectionModelSelectionChanged(
00204         const winrt::SelectionModel& selectionModel,
00205         const winrt::SelectionModelSelectionChangedEventArgs& args);
00206     void OnSourceListChanged(
00207         const winrt::IInspectable& dataSource,
00208         const winrt::NotifyCollectionChangedEventArgs& args);
00209     void OnLoaded(
00210         const winrt::IInspectable& sender,
00211         const winrt::RoutedEventArgs& args);
00212     void OnUnloaded(
00213         const winrt::IInspectable& sender,
00214         const winrt::RoutedEventArgs& args);
00215
00216     void ApplySelectionModelSelectionChange();
00217     int GetAdjacentFocusableElementByDirection(
00218         const winrt::FocusNavigationDirection& focusNavigationDirection,
00219         bool hasIndexBasedLayoutOrientation);
00220     int GetAdjacentFocusableElementByIndex(
00221         bool getPreviousFocusableElement);
00222     int GetCornerFocusableItem(
00223         bool isForTopLeftItem);
00224     void GetDistanceToKeyboardNavigationReferenceOffset(
00225         const winrt::FocusNavigationDirection& focusNavigationDirection,
00226         const winrt::Rect& currentElementRect,
00227         const winrt::UIElement& element,
00228         const winrt::ItemsRepeater& itemsRepeater,
00229         float keyboardNavigationReferenceOffset,
00230         double roundingScaleFactor,
00231         float* navigationDirectionDistance,
00232         float* noneNavigationDirectionDistance) const;
00233     int GetElementIndex(
00234         const winrt::UIElement& element) const;
00235     winrt::IndexPath GetElementIndexPath(
00236         const winrt::UIElement& element,
00237         bool* isValid) const;
00238     winrt::IInspectable GetElementItem(
00239         const winrt::UIElement& element,
00240         bool* valueReturned) const;
00241     winrt::Rect GetElementRect(
00242         const winrt::UIElement& element,
00243         const winrt::ItemsRepeater& itemsRepeater) const;
00244     int GetItemInternal(
00245         double horizontalViewportRatio,
00246         double verticalViewportRatio,
00247         bool isHorizontalDistanceFavored,
00248         bool isVerticalDistanceFavored,
00249         bool useKeyboardNavigationReferenceHorizontalOffset,
00250         bool useKeyboardNavigationReferenceVerticalOffset,
00251         bool capItemEdgesToViewportRatioEdges,
00252         bool forFocusableItemsOnly);
00253     winrt::IndexBasedLayoutOrientation GetLayoutIndexBasedLayoutOrientation();
00254     double GetRoundingScaleFactor(
00255         const winrt::UIElement& xamlRootReference) const;
00256     int GetTrailingNavigationKeyCount() const;
00257     winrt::Point GetUpdatedKeyboardNavigationReferenceOffset();
00258     bool SetCurrentElementIndex(
00259         int index,
00260         winrt::FocusState focusState,
00261         bool forceKeyboardNavigationReferenceReset,
00262         bool startBringIntoView = false,
00263         bool expectBringIntoView = false);
00264     bool SetFocusElementIndex(
00265         int index,
00266         winrt::FocusState focusState,
00267         bool startBringIntoView = false,
00268         bool expectBringIntoView = false);
00269     bool StartBringItemIntoViewInternal(
00270         bool throwOutOfBounds,
00271         bool throwOnAnyFailure,
00272         int32_t index,
00273         const winrt::BringIntoViewOptions& options);
00274     winrt::UIElement TryGetElement(
00275         int index) const;
00276
00277     void SetItemsViewItemContainerRevokers(
00278         const winrt::ItemContainer& itemContainer);
00279     void ClearItemsViewItemContainerRevokers(
00280         const winrt::ItemContainer& itemContainer);
00281     void ClearAllItemsViewItemContainerRevokers() noexcept;
00282     void RevokeItemsViewItemContainerRevokers(
00283         const winrt::ItemContainer& itemContainer);
00284
00285     void CacheOriginalVerticalScrollControllerAndVisibility();
00286     void RestoreOriginalVerticalScrollControllerAndVisibility();
00287     void SetVerticalScrollControllerOnLoaded();
00288     void ApplyVerticalScrollController();
00289
00290     bool AreNavigationKeysOpposite(
00291         const winrt::VirtualKey& key1,
00292         const winrt::VirtualKey& key2) const;
00293
00294     bool CanRaiseItemInvoked(
00295         const winrt::ItemContainerInteractionTrigger& interactionTrigger,
00296         const winrt::ItemContainer& itemContainer);
00297     bool CanScrollVertically();
00298
00299     bool IsCancelingNavigationKey(
00300         const winrt::VirtualKey& key,
00301         bool isRepeatKey);
00302
00303     bool IsLayoutOrientationIndexBased(
00304         bool horizontal);
00305
00306     bool IsNavigationKey(
00307         const winrt::VirtualKey& key) const;
00308
00309     bool ValidateItemIndex(
00310         bool throwIfInvalid,
00311         int index) const;
00312
00313 private:
00314     static inline GlobalDependencyProperty s_ItemsViewItemContainerRevokersProperty{ nullptr };
00315
00316     static constexpr std::wstring_view s_itemsRepeaterPartName{ L"PART_ItemsRepeater"sv };
00317     static constexpr std::wstring_view s_scrollViewPartName{ L"PART_ScrollView"sv };
00318     static constexpr std::wstring_view s_indexOutOfBounds{ L"Index is out of bounds."sv };
00319     static constexpr std::wstring_view s_invalidItemTemplateRoot{ L"ItemTemplate's root element must be an ItemContainer."sv };
00320     static constexpr std::wstring_view s_itemsSourceNull{ L"ItemsSource does not have a value."sv };
00321     static constexpr std::wstring_view s_itemsViewNotParented{ L"ItemsView is not parented."sv };
00322     static constexpr std::wstring_view s_missingItemsRepeaterPart{ L"ItemsRepeater part is not available."sv };
00323
00324     // CorrelationId of the bring-into-view scroll resulting from a navigation key processing.
00325     int32_t m_navigationKeyBringIntoViewCorrelationId{ -1 };
00326     // Ticks count left before the next queued navigation key is processed,
00327     // after a navigation-key-induced bring-into-view scroll completed a large offset change.
00328     uint8_t m_navigationKeyProcessingCountdown{ 0 };
00329     // Incremented in SetFocusElementIndex when a navigation key processing causes a new item to get focus.
00330     // This will trigger an OnScrollViewBringingIntoView call where it is decremented.
00331     // Used to delay a navigation key processing until the content has settled on a new viewport.
00332     uint8_t m_navigationKeyBringIntoViewPendingCount{ 0 };
00333     // Caches the most recent navigation key processed.
00334     winrt::VirtualKey m_lastNavigationKeyProcessed{};
00335
00336     // CorrelationId of the bring-into-view scroll resulting from a StartBringItemIntoView call.
00337     int32_t m_bringIntoViewCorrelationId{ -1 };
00338     // Ticks count left after bring-into-view scroll completed before the m_bringIntoViewElement
00339     // field is reset and no longer returned in OnScrollViewAnchorRequested.
00340     uint8_t m_bringIntoViewElementRetentionCountdown{ 0 };
00341     // ScrollView anchor ratios to restore after a StartBringItemIntoView operation completes.
00342     double m_scrollViewHorizontalAnchorRatio{ -1.0 };
00343     double m_scrollViewVerticalAnchorRatio{ -1.0 };
00344
00345     // Set to True when a ResetKeyboardNavigationReference() call is delayed until the next ItemsView::OnItemsRepeaterLayoutUpdated occurrence.
00346     bool m_keyboardNavigationReferenceResetPending{ false };
00347     // Caches the element index used to define m_keyboardNavigationReferenceRect.
00348     int m_keyboardNavigationReferenceIndex{ -1 };
00349     // Bounds of the reference element for directional keyboard navigations.
00350     winrt::Rect m_keyboardNavigationReferenceRect{ -1.0f, -1.0f, -1.0f, -1.0f };
00351
00352     // Set to True during a user action processing which updates selection.
00353     bool m_isProcessingInteraction{ false };
00354
00355     bool m_setVerticalScrollControllerOnLoaded{ false };
00356
00357     // Set to True in ItemsView::OnSelectionModelSelectionChanged to delay the application
00358     // of the selection changes until the imminent ItemsView::OnSourceListChanged call.
00359     bool m_applySelectionChangeOnSourceListChanged{ false };
00360
00361     std::shared_ptr<SelectorBase> m_selector;
00362
00363     winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering_revoker m_renderingRevoker{};
00364     winrt::SelectionModel::SelectionChanged_revoker m_selectionModelSelectionChangedRevoker{};
00365     winrt::SelectionModel::SelectionChanged_revoker m_currentElementSelectionModelSelectionChangedRevoker{};
00366     winrt::ItemsRepeater::ElementPrepared_revoker m_itemsRepeaterElementPreparedRevoker{};
00367     winrt::ItemsRepeater::ElementClearing_revoker m_itemsRepeaterElementClearingRevoker{};
00368     winrt::ItemsRepeater::ElementIndexChanged_revoker m_itemsRepeaterElementIndexChangedRevoker{};
00369     winrt::FrameworkElement::LayoutUpdated_revoker m_itemsRepeaterLayoutUpdatedRevoker{};
00370     winrt::FrameworkElement::SizeChanged_revoker m_itemsRepeaterSizeChangedRevoker{};
00371     winrt::FrameworkElement::Unloaded_revoker m_unloadedRevoker{};
00372     winrt::FrameworkElement::Loaded_revoker m_loadedRevoker{};
00373     winrt::ItemsSourceView::CollectionChanged_revoker m_itemsSourceViewChangedRevoker{};
00374 #ifdef DBG
00375     winrt::Layout::MeasureInvalidated_revoker m_layoutMeasureInvalidatedDbg{};
00376     winrt::Layout::ArrangeInvalidated_revoker m_layoutArrangeInvalidatedDbg{};
00377 #endif
00378     winrt::ScrollView::AnchorRequested_revoker m_scrollViewAnchorRequestedRevoker{};
00379     winrt::ScrollView::BringingIntoView_revoker m_scrollViewBringingIntoViewRevoker{};
00380     winrt::ScrollView::ScrollCompleted_revoker m_scrollViewScrollCompletedRevoker{};
00381 #ifdef DBG
00382     winrt::ScrollView::ExtentChanged_revoker m_scrollViewExtentChangedRevokerDbg{};
00383 #endif
00384     PropertyChanged_revoker m_itemsRepeaterItemsSourcePropertyChangedRevoker{};
00385
00386     // Tracks selected elements.
00387     winrt::SelectionModel m_selectionModel{};
00388     // Tracks current element.
00389     winrt::SelectionModel m_currentElementSelectionModel{};
00390
00391     // ScrollView's vertical scrollbar visibility to restore in the event VerticalScrollController gets assigned back to
00392     // its original value (m_originalVerticalScrollController read in OnApplyTemplate) after being set to a custom value.
00393     winrt::ScrollingScrollBarVisibility m_originalVerticalScrollBarVisibility{ winrt::ScrollingScrollBarVisibility::Auto };
00394     // Original VerticalScrollController read in OnApplyTemplate, which by default is the ScrollView's ScrollBarController.
00395     tracker_ref<winrt::IScrollController> m_originalVerticalScrollController{ this };
00396
00397     tracker_ref<winrt::ItemsRepeater> m_itemsRepeater{ this };
00398     tracker_ref<winrt::ScrollView> m_scrollView{ this };
00399     tracker_ref<winrt::UIElement> m_bringIntoViewElement{ this };
00400
00401     std::list<winrt::VirtualKey> m_navigationKeysToProcess;
00402     std::set<winrt::ItemContainer> m_itemContainersWithRevokers;
00403     std::map<winrt::ItemContainer, std::shared_ptr<PointerInfo<ItemsView>>> m_itemContainersPointerInfos;
00404 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BiDirectionalScrollController Member List

This is the complete list of members for BiDirectionalScrollController, including all inherited members.
AddScrollVelocity(Vector2 offsetVelocity, Vector2?inertiaDecayRate) | BiDirectionalScrollController | [inline]
biDecrementRepeatButton | BiDirectionalScrollController | [private]
BiDecrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
BiDirectionalScrollController() | BiDirectionalScrollController | [inline]
BiDirectionalScrollController_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) | BiDirectionalScrollController | [inline, private]
BiDirectionalScrollController_SizeChanged(object sender, SizeChangedEventArgs e) | BiDirectionalScrollController | [inline, private]
biIncrementRepeatButton | BiDirectionalScrollController | [private]
BiIncrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
HookHandlers() | BiDirectionalScrollController | [inline, private]
horizontalDecrementRepeatButton | BiDirectionalScrollController | [private]
HorizontalDecrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
horizontalDecrementVerticalIncrementRepeatButton | BiDirectionalScrollController | [private]
HorizontalDecrementVerticalIncrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
horizontalIncrementRepeatButton | BiDirectionalScrollController | [private]
HorizontalIncrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
horizontalIncrementVerticalDecrementRepeatButton | BiDirectionalScrollController | [private]
HorizontalIncrementVerticalDecrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
horizontalScrollController | BiDirectionalScrollController | [private]
HorizontalScrollController | BiDirectionalScrollController |
HorizontalThumbOffset | BiDirectionalScrollController | [private]
isRailEnabled | BiDirectionalScrollController | [private]
IsRailEnabled | BiDirectionalScrollController |
IsScrollingWithMouse | BiDirectionalScrollController | [private]
LogMessage | BiDirectionalScrollController |
lstAddScrollVelocityCorrelationIds | BiDirectionalScrollController | [private]
lstAsyncEventMessage | BiDirectionalScrollController | [private]
lstScrollByCorrelationIds | BiDirectionalScrollController | [private]
lstScrollToCorrelationIds | BiDirectionalScrollController | [private]
lstViewChangeCorrelationIds | BiDirectionalScrollController | [private]
MaxThumbOffset() | BiDirectionalScrollController | [inline, private]
OffsetTarget | BiDirectionalScrollController | [private]
OnApplyTemplate() | BiDirectionalScrollController | [inline, protected]
operations | BiDirectionalScrollController | [private]
OperationsCount | BiDirectionalScrollController | [private]
Parent_PointerPressed(object sender, PointerRoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
preManipulationThumbOffset | BiDirectionalScrollController | [private]
RaiseAddScrollVelocityRequested(Vector2 additionalVelocity, Vector2?inertiaDecayRate, bool hookupCompletion) | BiDirectionalScrollController | [inline, private]
RaiseLogMessage(string message) | BiDirectionalScrollController | [inline, private]
RaisePanRequested(PointerPoint pointerPoint) | BiDirectionalScrollController | [inline, private]
RaiseScrollByRequested(Point offsetDelta, ScrollingAnimationMode animationMode, bool hookupCompletion) | BiDirectionalScrollController | [inline, private]
RaiseScrollCompleted(int viewChangeCorrelationId) | BiDirectionalScrollController | [inline, private]
RaiseScrollToRequested(Point offset, ScrollingAnimationMode animationMode, bool hookupCompletion) | BiDirectionalScrollController | [inline, private]
ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta, ScrollingAnimationMode animationMode) | BiDirectionalScrollController | [inline]
ScrollCompleted | BiDirectionalScrollController |
ScrollPresenterOffsetFromThumbOffset(Point thumbOffset) | BiDirectionalScrollController | [inline, private]
ScrollTo(double horizontalOffset, double verticalOffset, ScrollingAnimationMode animationMode) | BiDirectionalScrollController | [inline]
SmallChangeAdditionalVelocity | BiDirectionalScrollController | [private]
SmallChangeInertiaDecayRate | BiDirectionalScrollController | [private]
Thumb | BiDirectionalScrollController | [private]
Thumb_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
Thumb_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
Thumb_ManipulationStarting(object sender, ManipulationStartingRoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
Thumb_PointerPressed(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
UnhookHandlers() | BiDirectionalScrollController | [inline, private]
UniScrollController_ScrollCompleted(IScrollController sender, UniScrollControllerScrollingScrollCompletedEventArgs args) | BiDirectionalScrollController | [inline, private]
verticalDecrementRepeatButton | BiDirectionalScrollController | [private]
VerticalDecrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
verticalIncrementRepeatButton | BiDirectionalScrollController | [private]
VerticalIncrementRepeatButton_Click(object sender, RoutedEventArgs e) | BiDirectionalScrollController | [inline, private]
VerticalScrollController | BiDirectionalScrollController |
verticalScrollController | BiDirectionalScrollController | [private]
VerticalThumbOffset | BiDirectionalScrollController | [private]
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/InteractionTests/SelectorBarTests.cs Source File

  • File List
  • File Members
  • SelectorBar
  • InteractionTests

SelectorBarTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class SelectorBarTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("Platform", "Any")]
00029         [TestProperty("MUXControlsTestSuite", "SuiteB")]
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         [TestProperty("Description", "Verify SelectorBarItem selection through mouse click and keyboard arrow.")]
00042         public void SelectorBarItemSelection()
00043         {
00044             using (var setup = new TestSetupHelper(new[] { "SelectorBar Tests", "navigateToSample" }))
00045             {
00046                 Wait.ForIdle();
00047                 Log.Comment("Expecting SelectorBar.SelectedItem: selectorBarItemFavorites");
00048                 Verify.AreEqual("selectorBarItemFavorites", SelectorBarSelectedItem());
00049
00050                 Log.Comment("Retrieving selectorBarItemShared");
00051                 var selectorBarItemShared = FindElement.ById("selectorBarItemShared");
00052                 Verify.IsNotNull(selectorBarItemShared, "Verifying that SelectorBarItem selectorBarItemShared was found");
00053
00054                 InputHelper.LeftClick(selectorBarItemShared);
00055                 Wait.ForIdle();
00056                 Log.Comment("Expecting SelectorBar.SelectedItem: selectorBarItemShared");
00057                 Verify.AreEqual("selectorBarItemShared", SelectorBarSelectedItem());
00058
00059                 Log.Comment("Retrieving selectorBarItemRemote");
00060                 var selectorBarItemRemote = FindElement.ById("selectorBarItemRemote");
00061                 Verify.IsNotNull(selectorBarItemRemote, "Verifying that SelectorBarItem selectorBarItemRemote was found");
00062
00063                 KeyboardHelper.PressKey(Key.Left);
00064                 Wait.ForIdle();
00065                 Log.Comment("Expecting SelectorBar.SelectedItem: selectorBarItemRemote");
00066                 Verify.AreEqual("selectorBarItemRemote", SelectorBarSelectedItem());
00067             }
00068         }
00069
00070         private string SelectorBarSelectedItem()
00071         {
00072             Log.Comment("Retrieving tblSelectedSelectorBarItem");
00073             Edit tblSelectedSelectorBarItem = new Edit(FindElement.ById("tblSelectedSelectorBarItem"));
00074             Verify.IsNotNull(tblSelectedSelectorBarItem, "Verifying that IsSelectedTextBlock was found");
00075
00076             string selectedItem = tblSelectedSelectorBarItem.GetText();
00077             Log.Comment("SelectedItem: " + selectedItem);
00078             return selectedItem;
00079         }
00080     }
00081 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/InteractionTests/RadioMenuFlyoutItemTests.cs Source File

  • File List
  • File Members
  • RadioMenuFlyoutItem
  • InteractionTests

RadioMenuFlyoutItemTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 ﻿using System;
00004
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class RadioMenuFlyoutItemTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00029         public static void ClassInitialize(TestContext testContext)
00030         {
00031             TestEnvironment.Initialize(testContext);
00032         }
00033
00034         public void TestCleanup()
00035         {
00036             TestCleanupHelper.Cleanup();
00037         }
00038
00039         List<string> Items = new List<string>
00040         {
00041             "Red",
00042             "Orange",
00043             "Yellow",
00044             "Green",
00045             "Blue",
00046             "Indigo",
00047             "Violet",
00048             "Compact",
00049             "Normal",
00050             "Expanded"
00051         };
00052
00053         [TestMethod]
00054         public void BasicTest()
00055         {
00056             using (var setup = new TestSetupHelper("RadioMenuFlyoutItem Tests"))
00057             {
00058                 Log.Comment("Verify initial states");
00059                 VerifySelectedItems("Orange", "Compact", "Name");
00060
00061                 InvokeItem("FlyoutButton", "YellowItem");
00062                 VerifySelectedItems("Yellow", "Compact", "Name");
00063
00064                 InvokeItem("FlyoutButton", "ExpandedItem");
00065                 VerifySelectedItems("Yellow", "Expanded", "Name");
00066
00067                 Log.Comment("Verify you can't uncheck an item");
00068                 InvokeItem("FlyoutButton", "YellowItem");
00069                 VerifySelectedItems("Yellow", "Expanded", "Name");
00070             }
00071         }
00072
00073         [TestMethod]
00074         [TestProperty("Ignore", "True")] // TODO 36060166: Re-enable after fixing unreliability.
00075         public void SubMenuTest()
00076         {
00077             using (var setup = new TestSetupHelper("RadioMenuFlyoutItem Tests"))
00078             {
00079                 InvokeSubItem("SubMenuFlyoutButton", "RadioSubMenu", "ArtistNameItem");
00080                 VerifySelectedItems("Orange", "Compact", "ArtistName");
00081
00082                 InvokeItem("SubMenuFlyoutButton", "DateItem");
00083                 VerifySelectedItems("Orange", "Compact", "Date");
00084             }
00085         }
00086
00087         public void InvokeItem(string flyoutButtonName, string itemName)
00088         {
00089             Log.Comment("Open flyout by clicking " + flyoutButtonName);
00090             Button flyoutButton = FindElement.ByName<Button>(flyoutButtonName);
00091             flyoutButton.InvokeAndWait();
00092
00093             Log.Comment("Toggle item: " + itemName);
00094             ToggleButton toggleMenuItem = FindElement.ByName<ToggleButton>(itemName);
00095             toggleMenuItem.ToggleAndWait();
00096         }
00097
00098         public void InvokeSubItem(string flyoutButtonName, string menuName, string itemName)
00099         {
00100             Log.Comment("Open flyout by clicking " + flyoutButtonName);
00101             Button flyoutButton = FindElement.ByName<Button>(flyoutButtonName);
00102             flyoutButton.InvokeAndWait();
00103
00104             Log.Comment("Open Menu: " + menuName);
00105             Button menuItem = FindElement.ByName<Button>(menuName);
00106             menuItem.InvokeAndWait();
00107
00108             Log.Comment("Toggle item: " + itemName);
00109             ToggleButton toggleMenuItem = FindElement.ByName<ToggleButton>(itemName);
00110             toggleMenuItem.ToggleAndWait();
00111         }
00112
00113         public void VerifySelectedItems(string item1, string item2, string item3)
00114         {
00115             foreach (string item in Items)
00116             {
00117                 TextBlock itemState = FindElement.ByName<TextBlock>(item + "State");
00118
00119                 if (item == item1 || item == item2 || item == item3)
00120                 {
00121                     Verify.AreEqual(itemState.DocumentText, "Checked", "Verify " + item + " is checked");
00122                 }
00123                 else
00124                 {
00125                     Verify.AreEqual(itemState.DocumentText, "Unchecked", "Verify " + item + " is unchecked");
00126                 }
00127             }
00128         }
00129     }
00130 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactoryGetArgsDownlevel.h Source File

  • File List
  • File Members
  • Repeater

ElementFactoryGetArgsDownlevel.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // We do some fakery here to make this work downlevel.
00007 // Microsoft::UI::Xaml:ElementFactoryGetArgs type has been added to WUX in RS5. However, we want Repeater to use it downlevel.
00008 // The way we achieve this is by implementing the Window::UI::Xaml::IElementFactoryGetArgs
00009 // interface here on our own type and 'lie' that our runtime class name is Microsoft.UI.Xaml.ElementFactoryGetArgs !
00010
00011 class ElementFactoryGetArgsDownlevel
00012     : public ReferenceTracker<
00013         ElementFactoryGetArgsDownlevel,
00014         reference_tracker_implements_t<winrt::IElementFactoryGetArgs>::type>
00015 {
00016 public:
00017     using class_type = winrt::ElementFactoryGetArgs;
00018
00019     operator class_type() const noexcept
00020     {
00021         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00022     }
00023
00024     hstring GetRuntimeClassName() const
00025     {
00026         // The type name being in windows namespace is intentional.
00027         return L"Microsoft.UI.Xaml.ElementFactoryGetArgs";
00028     }
00029
00030 #pragma region IElementFactoryGetArgs
00031     winrt::IInspectable Data();
00032     void Data(winrt::IInspectable const& value);
00033
00034     winrt::UIElement Parent();
00035     void Parent(winrt::UIElement const& value);
00036
00037     int Index();
00038     void Index(int value);
00039 #pragma endregion
00040
00041 private:
00042     tracker_ref<winrt::IInspectable> m_data{ this };
00043     tracker_ref<winrt::UIElement> m_parent{ this };
00044     int m_index{};
00045 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIcon.cpp Source File

  • File List
  • File Members
  • AnimatedIcon

AnimatedIcon.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "AnimatedIcon.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009 #include <AnimatedIconTestHooks.h>
00010 #include "Utils.h"
00011 #include <mutex>
00012
00013 static constexpr wstring_view s_progressPropertyName{ L"Progress"sv };
00014 static constexpr wstring_view s_foregroundPropertyName{ L"Foreground"sv };
00015 static constexpr wstring_view s_transitionInfix{ L"To"sv };
00016 static constexpr wstring_view s_transitionStartSuffix{ L"_Start"sv };
00017 static constexpr wstring_view s_transitionEndSuffix{ L"_End"sv };
00018 AnimatedIcon::AnimatedIcon()
00019 {
00020     __RP_Marker_ClassById(RuntimeProfiler::ProfId_AnimatedIcon);
00021     auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00022     m_progressPropertySet = compositor.CreatePropertySet();
00023     m_progressPropertySet.InsertScalar(s_progressPropertyName, 0);
00024     Loaded({ this, &AnimatedIcon::OnLoaded });
00025
00026     RegisterPropertyChangedCallback(winrt::IconElement::ForegroundProperty(), { this, &AnimatedIcon::OnForegroundPropertyChanged});
00027     RegisterPropertyChangedCallback(winrt::FrameworkElement::FlowDirectionProperty(), { this, &AnimatedIcon::OnFlowDirectionPropertyChanged });
00028 }
00029
00030 void AnimatedIcon::OnApplyTemplate()
00031 {
00032     __super::OnApplyTemplate();
00033     // Construct the visual from the Source property in on apply template so that it participates
00034     // in the initial measure for the object.
00035     auto const visual = [animatedVisual = m_animatedVisual.get(), this]()
00036     {
00037         if (animatedVisual)
00038         {
00039             return animatedVisual.RootVisual();
00040         }
00041         return ConstructVisual();
00042     }();
00043     InsertVisual(visual);
00044
00045     auto const panel = winrt::VisualTreeHelper::GetChild(*this, 0).as<winrt::Panel>();
00046     m_rootPanel.set(panel);
00047     m_currentState = GetState(*this);
00048
00049     if (panel)
00050     {
00051         // Animated icon implements IconElement through PathIcon. We don't need the Path that
00052         // PathIcon creates, however when you set the foreground on AnimatedIcon, it assumes
00053         // its grid's first child has a fill property which it sets by known index. So we
00054         // keep this child around but collapse it so this behavior doesn't crash us when the
00055         // fallback is used.
00056         if (panel.Children().Size() > 0)
00057         {
00058             if (auto const path = panel.Children().GetAt(0))
00059             {
00060                 path.Visibility(winrt::Visibility::Collapsed);
00061             }
00062         }
00063
00064         winrt::ElementCompositionPreview::SetElementChildVisual(panel, visual);
00065
00066         TrySetForegroundProperty();
00067     }
00068 }
00069
00070 void AnimatedIcon::OnLoaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&)
00071 {
00072     // AnimatedIcon might get added to a UI which has already set the State property on an ancestor.
00073     // If this is the case and the animated icon being added doesn't have its own state property
00074     // We copy the ancestor value when we load. Additionally we attach to our ancestor's property
00075     // changed event for AnimatedIcon.State to copy the value to AnimatedIcon.
00076     auto const property = winrt::AnimatedIcon::StateProperty();
00077
00078     auto const [ancestorWithState, stateValue] = [this, property]()
00079     {
00080         auto parent = winrt::VisualTreeHelper::GetParent(*this);
00081         while (parent)
00082         {
00083             auto const stateValue = parent.GetValue(property);
00084             if (!unbox_value<winrt::hstring>(stateValue).empty())
00085             {
00086                 return std::make_tuple(parent, stateValue);
00087             }
00088             parent = winrt::VisualTreeHelper::GetParent(parent);
00089         }
00090         return std::make_tuple(static_cast<winrt::DependencyObject>(nullptr), winrt::box_value(winrt::hstring{}));
00091     }();
00092
00093     if (unbox_value<winrt::hstring>(GetValue(property)).empty())
00094     {
00095         SetValue(property, stateValue);
00096     }
00097
00098     if (ancestorWithState)
00099     {
00100         m_ancestorStatePropertyChangedRevoker = RegisterPropertyChanged(ancestorWithState, property, { this, &AnimatedIcon::OnAncestorAnimatedIconStatePropertyChanged });
00101     }
00102
00103     // Wait until loaded to apply the fallback icon source property because we need the icon source
00104     // properties to be set before we create the icon element from it.  If those poperties are bound in,
00105     // they will not have been set during OnApplyTemplate.
00106     OnFallbackIconSourcePropertyChanged(nullptr);
00107 }
00108
00109
00110 winrt::Size AnimatedIcon::MeasureOverride(winrt::Size const& availableSize)
00111 {
00112     if (auto const visual = m_animatedVisual.get())
00113     {
00114         // Animated Icon scales using the Uniform strategy, meaning that it scales the horizonal and vertical
00115         // dimensions equally by the maximum amount that doesn't exceed the available size in either dimension.
00116         // If the available size is infinite in both dimensions then we don't scale the visual. Otherwise, we
00117         // calculate the scale factor by comparing the default visual size to the available size. This produces 2
00118         // scale factors, one for each dimension. We choose the smaller of the scale factors to not exceed the
00119         // available size in that dimension.
00120         auto const visualSize = visual.Size();
00121         if (visualSize != winrt::float2::zero())
00122         {
00123             const auto widthScale = availableSize.Width == std::numeric_limits<double>::infinity() ? std::numeric_limits<float>::infinity() : availableSize.Width / visualSize.x;
00124             const auto heightScale = availableSize.Height == std::numeric_limits<double>::infinity() ? std::numeric_limits<float>::infinity() : availableSize.Height / visualSize.y;
00125             if (widthScale == std::numeric_limits<double>::infinity() && heightScale == std::numeric_limits<double>::infinity())
00126             {
00127                 return visualSize;
00128             }
00129             else if (widthScale == std::numeric_limits<double>::infinity())
00130             {
00131                 return winrt::Size{ visualSize.x * heightScale, availableSize.Height };
00132             }
00133             else if (heightScale == std::numeric_limits<double>::infinity())
00134             {
00135                 return winrt::Size{ availableSize.Width, visualSize.y * widthScale };
00136             }
00137             else
00138             {
00139                 return (heightScale > widthScale)
00140                     ? winrt::Size{ availableSize.Width, visualSize.y * widthScale }
00141                 : winrt::Size{ visualSize.x * heightScale, availableSize.Height };
00142             }
00143         }
00144         return visualSize;
00145     }
00146     // If we don't have a visual, we will show the fallback icon, so we need to do a traditional measure.
00147     else
00148     {
00149         return __super::MeasureOverride(availableSize);
00150     }
00151 }
00152
00153 winrt::Size AnimatedIcon::ArrangeOverride(winrt::Size const& finalSize)
00154 {
00155     if (auto const visual = m_animatedVisual.get())
00156     {
00157         auto const visualSize = visual.Size();
00158         auto const scale = [finalSize, visualSize]()
00159         {
00160             auto scale = static_cast<winrt::float2>(finalSize) / visualSize;
00161             if (scale.x < scale.y)
00162             {
00163                 scale.y = scale.x;
00164             }
00165             else
00166             {
00167                 scale.x = scale.y;
00168             }
00169             return scale;
00170         }();
00171
00172         winrt::float2 const arrangedSize = {
00173             std::min(finalSize.Width / scale.x, visualSize.x),
00174             std::min(finalSize.Height / scale.y, visualSize.y)
00175         };
00176         const auto offset = (finalSize - (visualSize * scale)) / 2;
00177         const auto rootVisual = visual.RootVisual();
00178         rootVisual.Offset({ offset, 0.0f });
00179         rootVisual.Size(arrangedSize);
00180         rootVisual.Scale({ scale, 1.0f });
00181         return finalSize;
00182     }
00183     else
00184     {
00185         return __super::ArrangeOverride(finalSize);
00186     }
00187 }
00188
00189 void AnimatedIcon::OnAnimatedIconStatePropertyChanged(
00190     const winrt::DependencyObject& sender,
00191     const winrt::DependencyPropertyChangedEventArgs& args)
00192 {
00193     if (auto const senderAsAnimatedIcon = sender.try_as<AnimatedIcon>())
00194     {
00195         senderAsAnimatedIcon->OnStatePropertyChanged();
00196     }
00197 }
00198
00199 void AnimatedIcon::OnAncestorAnimatedIconStatePropertyChanged(
00200     const winrt::DependencyObject& sender,
00201     const winrt::DependencyProperty& args)
00202 {
00203     SetValue(AnimatedIconProperties::s_StateProperty, sender.GetValue(args));
00204 }
00205
00206 // When we receive a state change it might be erroneous. This is because these state changes often come from Animated Icon's parent control's
00207 // Visual state manager.  Many of our controls assume that it is okay to call GoToState("Foo") followed immediately by GoToState("Bar") in
00208 // order to end up in the "Bar" state. However Animated Icon also cares what state you are coming from, so this pattern would not trigger
00209 // the NormalToBar transition but instead NormalToFoo followed by FooToBar. Since we can't change these controls logic in WinUI2 we handle
00210 // this by waiting until the next layout cycle to play an animated icon transition. However, the state dependency property changed is not
00211 // enough to ensure that a layout updated will trigger, so we must also invalidate a layout property, arrange was chosen arbitrarily.
00212 void AnimatedIcon::OnStatePropertyChanged()
00213 {
00214     m_pendingState = ValueHelper<winrt::hstring>::CastOrUnbox(this->GetValue(AnimatedIconStateProperty()));
00215     m_layoutUpdatedRevoker = this->LayoutUpdated(winrt::auto_revoke, { this, &AnimatedIcon::OnLayoutUpdatedAfterStateChanged });
00216     SharedHelpers::QueueCallbackForCompositionRendering(
00217         [strongThis = get_strong()]
00218         {
00219             strongThis->InvalidateArrange();
00220         }
00221     );
00222 }
00223
00224 void AnimatedIcon::OnLayoutUpdatedAfterStateChanged(winrt::IInspectable const& sender, winrt::IInspectable const& args)
00225 {
00226     m_layoutUpdatedRevoker.revoke();
00227     switch (m_queueBehavior)
00228     {
00229     case winrt::AnimatedIconAnimationQueueBehavior::Cut:
00230         TransitionAndUpdateStates(m_currentState, m_pendingState);
00231         break;
00232     case winrt::AnimatedIconAnimationQueueBehavior::QueueOne:
00233         if (m_isPlaying)
00234         {
00235             // If we already have too many queued states, cancel the current animation with the previously queued transition
00236             // then Queue this new transition.
00237             if (m_queuedStates.size() >= m_queueLength)
00238             {
00239                 TransitionAndUpdateStates(m_currentState, m_queuedStates.front());
00240             }
00241             m_queuedStates.push(m_pendingState);
00242         }
00243         else
00244         {
00245             TransitionAndUpdateStates(m_currentState, m_pendingState);
00246         }
00247         break;
00248     case winrt::AnimatedIconAnimationQueueBehavior::SpeedUpQueueOne:
00249         if (m_isPlaying)
00250         {
00251             // If we already have too many queued states, cancel the current animation with the previously queued transition
00252             //  played speed up then Queue this new transition.
00253             if (m_queuedStates.size() >= m_queueLength)
00254             {
00255                 // Cancel the previous animation completed handler, before we cancel that animation by starting a new one.
00256                 if (m_batch)
00257                 {
00258                     m_batchCompletedRevoker.revoke();
00259                 }
00260                 TransitionAndUpdateStates(m_currentState, m_queuedStates.front(), m_speedUpMultiplier);
00261                 m_queuedStates.push(m_pendingState);
00262             }
00263             else
00264             {
00265                 m_queuedStates.push(m_pendingState);
00266                 if (!m_isSpeedUp)
00267                 {
00268                     // Cancel the previous animation completed handler, before we cancel that animation by starting a new one.
00269                     if (m_batch)
00270                     {
00271                         m_batchCompletedRevoker.revoke();
00272                     }
00273
00274                     m_isSpeedUp = true;
00275
00276                     auto const markers = Source().Markers();
00277                     winrt::hstring transitionEndName = StringUtil::FormatString(L"%1!s!%2!s!%3!s!%4!s!", m_previousState.c_str(), s_transitionInfix.data(), m_currentState.c_str(), s_transitionEndSuffix.data());
00278                     auto const hasEndMarker = markers.HasKey(transitionEndName);
00279                     if (hasEndMarker)
00280                     {
00281                         PlaySegment(NAN, static_cast<float>(markers.Lookup(transitionEndName)), nullptr, m_speedUpMultiplier);
00282                     }
00283                 }
00284             }
00285         }
00286         else
00287         {
00288             TransitionAndUpdateStates(m_currentState, m_pendingState);
00289         }
00290         break;
00291     }
00292     m_pendingState = L"";
00293 }
00294
00295 void AnimatedIcon::TransitionAndUpdateStates(const winrt::hstring& fromState, const winrt::hstring& toState, float playbackMultiplier)
00296 {
00297     std::once_flag cleanedUpFlag;
00298     std::function<void()> cleanupAction = [this, fromState, toState, &cleanedUpFlag]()
00299     {
00300         std::call_once(cleanedUpFlag, [this, fromState, toState]() {
00301                 m_previousState = fromState;
00302                 m_currentState = toState;
00303                 if (!m_queuedStates.empty())
00304                 {
00305                     m_queuedStates.pop();
00306                 }
00307             });
00308     };
00309     TransitionStates(fromState, toState, cleanupAction, playbackMultiplier);
00310     cleanupAction();
00311 }
00312
00313 void AnimatedIcon::TransitionStates(const winrt::hstring& fromState, const winrt::hstring& toState, const std::function<void()>& cleanupAction, float playbackMultiplier)
00314 {
00315     if (auto const source = Source())
00316     {
00317         if (auto const markers = source.Markers())
00318         {
00319             winrt::hstring transitionName = StringUtil::FormatString(L"%1!s!%2!s!%3!s!", fromState.c_str(), s_transitionInfix.data(), toState.c_str());
00320             winrt::hstring transitionStartName = StringUtil::FormatString(L"%1!s!%2!s!", transitionName.c_str(), s_transitionStartSuffix.data());
00321             winrt::hstring transitionEndName = StringUtil::FormatString(L"%1!s!%2!s!", transitionName.c_str(), s_transitionEndSuffix.data());
00322
00323             auto const hasStartMarker = markers.HasKey(transitionStartName);
00324             auto const hasEndMarker = markers.HasKey(transitionEndName);
00325             if (hasStartMarker && hasEndMarker)
00326             {
00327                 auto const fromProgress = static_cast<float>(markers.Lookup(transitionStartName));
00328                 auto const toProgress = static_cast<float>(markers.Lookup(transitionEndName));
00329                 PlaySegment(fromProgress, toProgress, cleanupAction, playbackMultiplier);
00330                 m_lastAnimationSegmentStart = transitionStartName;
00331                 m_lastAnimationSegmentEnd = transitionEndName;
00332             }
00333             else if (hasEndMarker)
00334             {
00335                 auto const toProgress = static_cast<float>(markers.Lookup(transitionEndName));
00336                 m_progressPropertySet.InsertScalar(s_progressPropertyName, toProgress);
00337                 m_lastAnimationSegmentStart = L"";
00338                 m_lastAnimationSegmentEnd = transitionEndName;
00339             }
00340             else if (hasStartMarker)
00341             {
00342                 auto const toProgress = static_cast<float>(markers.Lookup(transitionStartName));
00343                 m_progressPropertySet.InsertScalar(s_progressPropertyName, toProgress);
00344                 m_lastAnimationSegmentStart = transitionStartName;
00345                 m_lastAnimationSegmentEnd = L"";
00346             }
00347             else if (markers.HasKey(transitionName))
00348             {
00349                 auto const toProgress = static_cast<float>(markers.Lookup(transitionName));
00350                 m_progressPropertySet.InsertScalar(s_progressPropertyName, toProgress);
00351                 m_lastAnimationSegmentStart = L"";
00352                 m_lastAnimationSegmentEnd = transitionName;
00353             }
00354             else if (markers.HasKey(toState))
00355             {
00356                 auto const toProgress = static_cast<float>(markers.Lookup(toState));
00357                 m_progressPropertySet.InsertScalar(s_progressPropertyName, toProgress);
00358                 m_lastAnimationSegmentStart = L"";
00359                 m_lastAnimationSegmentEnd = toState;
00360             }
00361             else
00362             {
00363                 // Since we can't find an animation for this transition, try to find one that ends in the same place
00364                 // and cut to that position instead.
00365                 auto const [found, value] = [toState, markers, this]()
00366                 {
00367                     winrt::hstring fragment = StringUtil::FormatString(L"%1!s!%2!s!%3!s!", s_transitionInfix.data(), toState.c_str(), s_transitionEndSuffix.data());
00368                     for (auto const [key, val] : markers)
00369                     {
00370                         std::wstring value = key.data();
00371                         if (value.find(fragment) != std::wstring::npos)
00372                         {
00373                             m_lastAnimationSegmentStart = L"";
00374                             m_lastAnimationSegmentEnd = key;
00375                             return std::make_tuple(true, static_cast<float>(val));
00376                         }
00377                     }
00378                     return std::make_tuple(false, 0.0f);
00379                 }();
00380                 if (found)
00381                 {
00382                     m_progressPropertySet.InsertScalar(s_progressPropertyName, value);
00383                 }
00384                 else
00385                 {
00386                     // We also support setting the state proprety to a float value, which instructs the animated icon
00387                     // to animate the Progress property to the provided value. Because wcstof returns 0.0f when the
00388                     // provided string doesn't parse to a float we can't distinguish between the string "0.0" and
00389                     // the string "a" (for example) from the parse output alone. Instead we use the wcstof's second
00390                     // parameter to determine if the 0.0 return value came from a valid parse or from the default return.
00391                     wchar_t* strEnd = nullptr;
00392                     auto const parsedFloat = wcstof(toState.c_str(), &strEnd);
00393
00394                     if(strEnd == toState.c_str() + toState.size())
00395                     {
00396                         PlaySegment(NAN, parsedFloat, cleanupAction, playbackMultiplier);
00397                         m_lastAnimationSegmentStart = L"";
00398                         m_lastAnimationSegmentEnd = toState;
00399                     }
00400                     else
00401                     {
00402                         // None of our attempt to find an animation to play or frame to show have worked, so just cut
00403                         // to frame 0.
00404                         m_progressPropertySet.InsertScalar(s_progressPropertyName, 0.0);
00405                         m_lastAnimationSegmentStart = L"";
00406                         m_lastAnimationSegmentEnd = L"0.0";
00407                     }
00408                 }
00409             }
00410             m_lastAnimationSegment = transitionName;
00411             AnimatedIconTestHooks::NotifyLastAnimationSegmentChanged(*this);
00412         }
00413     }
00414 }
00415
00416 void AnimatedIcon::PlaySegment(float from, float to, const std::function<void()>& cleanupAction, float playbackMultiplier)
00417 {
00418     auto const segmentLength = [from, to, previousSegmentLength = m_previousSegmentLength]()
00419     {
00420         if (std::isnan(from))
00421         {
00422             return previousSegmentLength;
00423         }
00424         return std::abs(to - from);
00425     }();
00426
00427     m_previousSegmentLength = segmentLength;
00428     auto const duration = m_animatedVisual ?
00429         std::chrono::duration_cast<winrt::TimeSpan>(m_animatedVisual.get().Duration() * segmentLength * (1.0 / playbackMultiplier) * m_durationMultiplier) :
00430         winrt::TimeSpan::zero();
00431     // If the duration is really short (< 20ms) don't bother trying to animate, or if animations are disabled.
00432     if (duration < winrt::TimeSpan{ 20ms } || !SharedHelpers::IsAnimationsEnabled())
00433     {
00434         m_progressPropertySet.InsertScalar(s_progressPropertyName, to);
00435         if (cleanupAction)
00436         {
00437             cleanupAction();
00438         }
00439         OnAnimationCompleted(nullptr, nullptr);
00440     }
00441     else
00442     {
00443         auto compositor = m_progressPropertySet.Compositor();
00444         auto animation = compositor.CreateScalarKeyFrameAnimation();
00445         animation.Duration(duration);
00446         auto linearEasing = compositor.CreateLinearEasingFunction();
00447
00448         // Play from fromProgress.
00449         if (!std::isnan(from))
00450         {
00451             animation.InsertKeyFrame(0, from);
00452         }
00453
00454         // Play to toProgress
00455         animation.InsertKeyFrame(1, to, linearEasing);
00456
00457         animation.IterationBehavior(winrt::AnimationIterationBehavior::Count);
00458         animation.IterationCount(1);
00459
00460         if (m_batch)
00461         {
00462             m_batchCompletedRevoker.revoke();
00463         }
00464         m_batch = compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
00465         m_batchCompletedRevoker = RegisterScopedBatchCompleted(m_batch, { this, &AnimatedIcon::OnAnimationCompleted });
00466
00467         m_isPlaying = true;
00468         m_progressPropertySet.StartAnimation(s_progressPropertyName, animation);
00469         m_batch.End();
00470     }
00471 }
00472
00473 void AnimatedIcon::OnSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00474 {
00475     auto const visual = ConstructVisual();
00476     if(!InsertVisual(visual))
00477     {
00478         SetRootPanelChildToFallbackIcon();
00479     }
00480     InvalidateMeasure();
00481 }
00482
00483 void AnimatedIcon::UpdateMirrorTransform()
00484 {
00485     auto const scaleTransform = [this]()
00486     {
00487         if (!m_scaleTransform)
00488         {
00489             // Initialize the scale transform that will be used for mirroring and the
00490             // render transform origin as center in order to have the icon mirrored in place.
00491             winrt::Microsoft::UI::Xaml::Media::ScaleTransform scaleTransform;
00492
00493             RenderTransform(scaleTransform);
00494             RenderTransformOrigin({ 0.5, 0.5 });
00495             m_scaleTransform.set(scaleTransform);
00496             return scaleTransform;
00497         }
00498         return m_scaleTransform.get();
00499     }();
00500
00501
00502     scaleTransform.ScaleX(FlowDirection() == winrt::FlowDirection::RightToLeft && !MirroredWhenRightToLeft() && m_canDisplayPrimaryContent ? -1.0f : 1.0f);
00503 }
00504
00505 void AnimatedIcon::OnMirroredWhenRightToLeftPropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00506 {
00507     UpdateMirrorTransform();
00508 }
00509
00510 winrt::Visual AnimatedIcon::ConstructVisual()
00511 {
00512     if (auto const source = Source())
00513     {
00514         TrySetForegroundProperty(source);
00515
00516         winrt::IInspectable diagnostics{};
00517         auto const visual = source.TryCreateAnimatedVisual(winrt::CompositionTarget::GetCompositorForCurrentThread(), diagnostics);
00518         m_animatedVisual.set(visual);
00519         return visual ? visual.RootVisual() : nullptr;
00520     }
00521     else
00522     {
00523         m_animatedVisual.set(nullptr);
00524         return static_cast<winrt::Visual>(nullptr);
00525     }
00526 }
00527
00528 bool AnimatedIcon::InsertVisual(winrt::Visual visual)
00529 {
00530     if (auto const rootPanel = m_rootPanel.get())
00531     {
00532         winrt::ElementCompositionPreview::SetElementChildVisual(rootPanel, visual);
00533     }
00534
00535     UpdateMirrorTransform();
00536
00537     if (visual)
00538     {
00539         m_canDisplayPrimaryContent = true;
00540         if (auto const rootPanel = m_rootPanel.get())
00541         {
00542             // Remove the second child, if it exists, as this is the fallback icon.
00543             // Which we don't need because we have a visual now.
00544             if (rootPanel.Children().Size() > 1)
00545             {
00546                 rootPanel.Children().RemoveAt(1);
00547             }
00548         }
00549         visual.Properties().InsertScalar(s_progressPropertyName, 0.0F);
00550
00551         // Tie the animated visual's Progress property to the player Progress with an ExpressionAnimation.
00552         auto const compositor = visual.Compositor();
00553         auto const expression = StringUtil::FormatString(L"_.%1!s!", s_progressPropertyName.data());
00554         auto const progressAnimation = compositor.CreateExpressionAnimation(expression);
00555         progressAnimation.SetReferenceParameter(L"_", m_progressPropertySet);
00556         visual.Properties().StartAnimation(s_progressPropertyName, progressAnimation);
00557
00558         return true;
00559     }
00560     else
00561     {
00562         m_canDisplayPrimaryContent = false;
00563         return false;
00564     }
00565 }
00566
00567 void AnimatedIcon::OnFallbackIconSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs&)
00568 {
00569     if (!m_canDisplayPrimaryContent)
00570     {
00571         SetRootPanelChildToFallbackIcon();
00572     }
00573 }
00574
00575 void AnimatedIcon::SetRootPanelChildToFallbackIcon()
00576 {
00577     if (auto const iconSource = FallbackIconSource())
00578     {
00579         auto const iconElement = iconSource.CreateIconElement();
00580         if (auto const rootPanel = m_rootPanel.get())
00581         {
00582             // Remove the second child, if it exists, as this is the previous
00583             // fallback icon which we don't need because we have a visual now.
00584             if (rootPanel.Children().Size() > 1)
00585             {
00586                 rootPanel.Children().RemoveAt(1);
00587             }
00588             rootPanel.Children().Append(iconElement);
00589         }
00590     }
00591 }
00592
00593 void AnimatedIcon::OnForegroundPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00594 {
00595     m_foregroundColorPropertyChangedRevoker.revoke();
00596     if (auto const foregroundSolidColorBrush = Foreground().try_as<winrt::SolidColorBrush>())
00597     {
00598         m_foregroundColorPropertyChangedRevoker = RegisterPropertyChanged(foregroundSolidColorBrush, winrt::SolidColorBrush::ColorProperty(), { this, &AnimatedIcon::OnForegroundBrushColorPropertyChanged });
00599         TrySetForegroundProperty(foregroundSolidColorBrush.Color());
00600     }
00601 }
00602
00603 void AnimatedIcon::OnFlowDirectionPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00604 {
00605     UpdateMirrorTransform();
00606 }
00607
00608 void AnimatedIcon::OnForegroundBrushColorPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00609 {
00610     TrySetForegroundProperty(sender.GetValue(args).as<winrt::Color>());
00611 }
00612
00613 void AnimatedIcon::TrySetForegroundProperty(winrt::IAnimatedVisualSource2 const& source)
00614 {
00615     if (auto const foregroundSolidColorBrush = Foreground().try_as<winrt::SolidColorBrush>())
00616     {
00617         TrySetForegroundProperty(foregroundSolidColorBrush.Color(), source);
00618     }
00619 }
00620
00621 void AnimatedIcon::TrySetForegroundProperty(winrt::Color color, winrt::IAnimatedVisualSource2 const& source)
00622 {
00623     auto const localSource = source ? source : Source();
00624     if (localSource)
00625     {
00626         localSource.SetColorProperty(s_foregroundPropertyName, color);
00627     }
00628 }
00629
00630 void AnimatedIcon::OnAnimationCompleted(winrt::IInspectable const&, winrt::CompositionBatchCompletedEventArgs const&)
00631 {
00632     if (m_batch)
00633     {
00634         m_batchCompletedRevoker.revoke();
00635     }
00636     m_isPlaying = false;
00637
00638     switch (m_queueBehavior)
00639     {
00640     case winrt::AnimatedIconAnimationQueueBehavior::Cut:
00641         break;
00642     case winrt::AnimatedIconAnimationQueueBehavior::QueueOne:
00643         if (!m_queuedStates.empty())
00644         {
00645             TransitionAndUpdateStates(m_currentState, m_queuedStates.front());
00646         }
00647         break;
00648     case winrt::AnimatedIconAnimationQueueBehavior::SpeedUpQueueOne:
00649         if (!m_queuedStates.empty())
00650         {
00651             if (m_queuedStates.size() == 1)
00652             {
00653                 TransitionAndUpdateStates(m_currentState, m_queuedStates.front());
00654             }
00655             else
00656             {
00657                 TransitionAndUpdateStates(m_currentState, m_queuedStates.front(), m_isSpeedUp ? m_speedUpMultiplier : 1.0f);
00658             }
00659         }
00660         break;
00661     }
00662 }
00663
00664 // Test hooks
00665 void AnimatedIcon::SetAnimationQueueBehavior(winrt::AnimatedIconAnimationQueueBehavior behavior)
00666 {
00667     m_queueBehavior = behavior;
00668 }
00669
00670
00671 void AnimatedIcon::SetDurationMultiplier(float multiplier)
00672 {
00673     m_durationMultiplier = multiplier;
00674 }
00675
00676 void AnimatedIcon::SetSpeedUpMultiplier(float multiplier)
00677 {
00678     m_speedUpMultiplier = multiplier;
00679 }
00680
00681 void AnimatedIcon::SetQueueLength(unsigned int length)
00682 {
00683     m_queueLength = length;
00684 }
00685
00686 winrt::hstring AnimatedIcon::GetLastAnimationSegment()
00687 {
00688     return m_lastAnimationSegment;
00689 }
00690
00691 winrt::hstring AnimatedIcon::GetLastAnimationSegmentStart()
00692 {
00693     return m_lastAnimationSegmentStart;
00694 }
00695
00696 winrt::hstring AnimatedIcon::GetLastAnimationSegmentEnd()
00697 {
00698     return m_lastAnimationSegmentEnd;
00699 }
Generated on Sun Dec 1 2024 20:51:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterZoomSnapPointsPage Member List

This is the complete list of members for ScrollPresenterZoomSnapPointsPage, including all inherited members.
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
btnClearFullLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
btnGetFullLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
BtnMIAddSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
BtnMRAddSnapPoint_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
BtnRemoveAll_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
BtnRemoveFirst_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
BtnScrollPresenterZoomFactorChange_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
BtnZoomFactorPlus1With_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
BtnZoomFactorPlus1Without_Click(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
fullLogs | ScrollPresenterZoomSnapPointsPage | [private]
MarkupScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollPresenterZoomSnapPointsPage | [inline, private]
MarkupScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollPresenterZoomSnapPointsPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollPresenterZoomSnapPointsPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, protected]
ScrollPresenterZoomSnapPointsPage() | ScrollPresenterZoomSnapPointsPage | [inline]
ScrollPresenterZoomSnapPointsPage_Loaded(object sender, RoutedEventArgs e) | ScrollPresenterZoomSnapPointsPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemHeader.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemHeader.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewItemBase.h"
00007 #include "NavigationViewItemHeader.g.h"
00008
00009 class NavigationViewItemHeader :
00010     public winrt::implementation::NavigationViewItemHeaderT<NavigationViewItemHeader, NavigationViewItemBase>
00011 {
00012 public:
00013     ForwardRefToBaseReferenceTracker(NavigationViewItemBase)
00014
00015     NavigationViewItemHeader();
00016
00017     // IFrameworkElementOverrides
00018     void OnApplyTemplate() override;
00019
00020 private:
00021     void OnSplitViewPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00022     void UpdateIsClosedCompact();
00023     void UpdateItemIndentation();
00024     void OnNavigationViewItemBaseDepthChanged() override;
00025
00026     void UpdateVisualState(bool useTransitions);
00027
00028     bool m_isClosedCompact{ false };
00029
00030     PropertyChanged_revoker m_splitViewIsPaneOpenChangedRevoker{};
00031     PropertyChanged_revoker m_splitViewDisplayModeChangedRevoker{};
00032
00033     tracker_ref<winrt::Grid> m_rootGrid{ this };
00034
00035 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl.cpp Source File

  • File List
  • File Members
  • SwipeControl

SwipeControl.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SwipeControl.h"
00007 #include "SwipeControlInteractionTrackerOwner.h"
00008 #include "SwipeItems.h"
00009 #include "Vector.h"
00010 #include "SwipeItem.h"
00011 #include "RuntimeProfiler.h"
00012 #include "SwipeTestHooks.h"
00013
00014 // Change to 'true' to turn on debugging outputs in Output window
00015 bool SwipeControlTrace::s_IsDebugOutputEnabled{ false };
00016 bool SwipeControlTrace::s_IsVerboseDebugOutputEnabled{ false };
00017
00018 static const double c_epsilon = 0.0001;
00019 static const float c_ThresholdValue = 100.0;
00020 static const float c_MinimumCloseVelocity = 31.0;
00021
00022 static thread_local winrt::weak_ref<SwipeControl> s_lastInteractedWithSwipeControl = nullptr;
00023
00024 SwipeControl::SwipeControl()
00025 {
00026     __RP_Marker_ClassById(RuntimeProfiler::ProfId_SwipeControl);
00027     SetDefaultStyleKey(this);
00028 }
00029
00030 SwipeControl::~SwipeControl()
00031 {
00032     DetachEventHandlers(true /*useSafeGet*/);
00033
00034     if (auto lastInteractedWithSwipeControl = s_lastInteractedWithSwipeControl.get())
00035     {
00036         if (lastInteractedWithSwipeControl.get() == this)
00037         {
00038             s_lastInteractedWithSwipeControl = nullptr;
00039             if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
00040             {
00041                 globalTestHooks->NotifyLastInteractedWithSwipeControlChanged();
00042             }
00043         }
00044     }
00045 }
00046
00047 #pragma region ISwipeControl
00048
00049 void SwipeControl::Close()
00050 {
00051     CheckThread();
00052
00053     if (m_isOpen && !m_lastActionWasClosing && !m_isInteracting)
00054     {
00055         m_lastActionWasClosing = true;
00056         if (!m_isIdle)
00057         {
00058             winrt::float3 initialPosition{ 0.0f };
00059             switch (m_createdContent)
00060             {
00061             case CreatedContent::Left:
00062                 initialPosition.x = static_cast<float>(-m_swipeContentStackPanel.get().ActualWidth());
00063                 break;
00064             case CreatedContent::Top:
00065                 initialPosition.y = static_cast<float>(-m_swipeContentStackPanel.get().ActualHeight());
00066                 break;
00067             case CreatedContent::Right:
00068                 initialPosition.x = static_cast<float>(m_swipeContentStackPanel.get().ActualWidth());
00069                 break;
00070             case CreatedContent::Bottom:
00071                 initialPosition.y = static_cast<float>(m_swipeContentStackPanel.get().ActualHeight());
00072                 break;
00073             case CreatedContent::None:
00074                 break;
00075             default:
00076                 assert(false);
00077             }
00078             m_interactionTracker.get().TryUpdatePosition(initialPosition);
00079         }
00080
00081         winrt::float3 addedVelocity{ 0.0f };
00082         switch (m_createdContent)
00083         {
00084         case CreatedContent::Left:
00085             addedVelocity.x = c_MinimumCloseVelocity;
00086             break;
00087         case CreatedContent::Top:
00088             addedVelocity.y = c_MinimumCloseVelocity;
00089             break;
00090         case CreatedContent::Right:
00091             addedVelocity.x = -c_MinimumCloseVelocity;
00092             break;
00093         case CreatedContent::Bottom:
00094             addedVelocity.y = -c_MinimumCloseVelocity;
00095             break;
00096         case CreatedContent::None:
00097             break;
00098         default:
00099             assert(false);
00100         }
00101         m_interactionTracker.get().TryUpdatePositionWithAdditionalVelocity(addedVelocity);
00102     }
00103 }
00104 #pragma endregion
00105
00106 #pragma region IFrameworkElementOverrides
00107 void SwipeControl::OnApplyTemplate()
00108 {
00109     ThrowIfHasVerticalAndHorizontalContent(/*setIsHorizontal*/ true);
00110
00111     DetachEventHandlers(false /*useSafeGet*/);
00112     GetTemplateParts();
00113     EnsureClip();
00114     AttachEventHandlers();
00115 }
00116
00117 void SwipeControl::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00118 {
00119     winrt::IDependencyProperty property = args.Property();
00120     if (property == s_LeftItemsProperty)
00121     {
00122         OnLeftItemsCollectionChanged(args);
00123     }
00124     if (property == s_RightItemsProperty)
00125     {
00126         OnRightItemsCollectionChanged(args);
00127     }
00128     if (property == s_TopItemsProperty)
00129     {
00130         OnTopItemsCollectionChanged(args);
00131     }
00132     if (property == s_BottomItemsProperty)
00133     {
00134         OnBottomItemsCollectionChanged(args);
00135     }
00136 }
00137
00138 //Swipe control is usually placed in a list view item. When this is the case the swipe item needs to be the same size as the list view item.
00139 //This is to ensure that swiping from anywhere on the list view item causes pointer pressed events in the SwipeControl.  Without this measure
00140 //override it is usually not the case that swipe control will fill the available space.  This is because list view item is a content control
00141 //and those by convension only provide it's children space for at most their desired size. However list view item itself will take up a different
00142 //ammount of space. In the past we solved this issue by requiring the list view item to have the HorizontalContentAlignment and VerticalContentAlignment
00143 //set to stretch. This property changes the measure cycle to give as much space as possible to the list view items children.  Instead we can
00144 //just do this ourselves in this measure override and prevent the confusing need for properties set on the parent of swipe control to use it at all.
00145 winrt::Size SwipeControl::MeasureOverride(winrt::Size const& availableSize)
00146 {
00147     m_rootGrid.get().Measure(availableSize);
00148     winrt::Size contentDesiredSize = m_rootGrid.get().DesiredSize();
00149     if (availableSize.Width != std::numeric_limits<float>::infinity())
00150     {
00151         contentDesiredSize.Width = availableSize.Width;
00152     }
00153     if (availableSize.Height != std::numeric_limits<float>::infinity())
00154     {
00155         contentDesiredSize.Height = availableSize.Height;
00156     }
00157     return contentDesiredSize;
00158 }
00159 #pragma endregion
00160
00161 void SwipeControl::CustomAnimationStateEntered(
00162     winrt::InteractionTrackerCustomAnimationStateEnteredArgs const& /*args*/)
00163 {
00164     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00165
00166     m_isInteracting = true;
00167
00168     if (m_isIdle)
00169     {
00170         m_isIdle = false;
00171         if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
00172         {
00173             globalTestHooks->NotifyIdleStatusChanged(*this);
00174         }
00175     }
00176 }
00177
00178 void SwipeControl::RequestIgnored(
00179     winrt::InteractionTrackerRequestIgnoredArgs const& /*args*/)
00180 {
00181     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00182 }
00183
00184 void SwipeControl::IdleStateEntered(
00185     winrt::InteractionTrackerIdleStateEnteredArgs const& /*args*/)
00186 {
00187     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00188
00189     m_isInteracting = false;
00190     UpdateIsOpen(m_interactionTracker.get().Position() != winrt::float3::zero());
00191
00192     if (m_isOpen)
00193     {
00194         if (m_currentItems && m_currentItems.get().Mode() == winrt::SwipeMode::Execute && m_currentItems.get().Size() > 0)
00195         {
00196             auto swipeItem = static_cast<winrt::SwipeItem>(m_currentItems.get().GetAt(0));
00197             winrt::get_self<SwipeItem>(swipeItem)->InvokeSwipe(*this);
00198         }
00199     }
00200     else
00201     {
00202         if (auto swipeContentStackPanel = m_swipeContentStackPanel.get())
00203         {
00204             swipeContentStackPanel.Background(nullptr);
00205             if (auto swipeContentStackPanelChildren = swipeContentStackPanel.Children())
00206             {
00207                 swipeContentStackPanelChildren.Clear();
00208             }
00209         }
00210         if (auto swipeContentRoot = m_swipeContentRoot.get())
00211         {
00212             swipeContentRoot.Background(nullptr);
00213         }
00214
00215         m_currentItems.set(nullptr);
00216         m_createdContent = CreatedContent::None;
00217     }
00218
00219     if (!m_isIdle)
00220     {
00221         m_isIdle = true;
00222         if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
00223         {
00224             globalTestHooks->NotifyIdleStatusChanged(*this);
00225         }
00226     }
00227 }
00228
00229 void SwipeControl::InteractingStateEntered(
00230     winrt::InteractionTrackerInteractingStateEnteredArgs const& /*args*/)
00231 {
00232     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00233
00234     if (m_isIdle)
00235     {
00236         m_isIdle = false;
00237         if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
00238         {
00239             globalTestHooks->NotifyIdleStatusChanged(*this);
00240         }
00241     }
00242
00243     m_lastActionWasClosing = false;
00244     m_lastActionWasOpening = false;
00245     m_isInteracting = true;
00246
00247     //Once the user has started interacting with a SwipeControl in the closed state we are free to unblock contents.
00248     //Contents of items opposite the currently opened ones will not be created.
00249     if (!m_isOpen)
00250     {
00251         m_blockNearContent = false;
00252         m_blockFarContent = false;
00253         m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
00254         m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
00255     }
00256 }
00257
00258 void SwipeControl::InertiaStateEntered(
00259     winrt::InteractionTrackerInertiaStateEnteredArgs const& args)
00260 {
00261     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00262
00263     m_isInteracting = false;
00264
00265     if (m_isIdle)
00266     {
00267         m_isIdle = false;
00268         if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
00269         {
00270             globalTestHooks->NotifyIdleStatusChanged(*this);
00271         }
00272     }
00273
00274     //It is possible that the user has flicked from a negative position to a position that would result in the interaction
00275     //tracker coming to rest at the positive open position (or vise versa). The != zero check does not account for this.
00276     //Instead we check to ensure that the current position and the ModifiedRestingPosition have the same sign (multiply to a positive number)
00277     //If they do not then we are in this situation and want the end result of the interaction to be the closed state, so close without any animation and return
00278     //to prevent further processing of this inertia state.
00279     const auto flickToOppositeSideCheck = m_interactionTracker.get().Position() * args.ModifiedRestingPosition().Value();
00280     if (m_isHorizontal ? flickToOppositeSideCheck.x < 0 : flickToOppositeSideCheck.y < 0)
00281     {
00282         CloseWithoutAnimation();
00283         return;
00284     }
00285
00286     UpdateIsOpen(args.ModifiedRestingPosition().Value() != winrt::float3::zero());
00287     // If the user has panned the interaction tracker past 0 in the opposite direction of the previously
00288     // opened swipe items then when we set m_isOpen to true the animations will snap to that value.
00289     // To avoid this we block that side of the animation until the interacting state is entered.
00290     if (m_isOpen)
00291     {
00292         switch (m_createdContent)
00293         {
00294         case CreatedContent::Bottom:
00295         case CreatedContent::Right:
00296             m_blockNearContent = true;
00297             m_blockFarContent = false;
00298             m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, true);
00299             m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
00300             break;
00301         case CreatedContent::Top:
00302         case CreatedContent::Left:
00303             m_blockNearContent = false;
00304             m_blockFarContent = true;
00305             m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
00306             m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, true);
00307             break;
00308         case CreatedContent::None:
00309             m_blockNearContent = false;
00310             m_blockFarContent = false;
00311             m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
00312             m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
00313             break;
00314         default:
00315             assert(false);
00316         }
00317     }
00318 }
00319
00320 void SwipeControl::ValuesChanged(
00321     winrt::InteractionTrackerValuesChangedArgs const& args)
00322 {
00323     SWIPECONTROL_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00324
00325     auto lastInteractedWithSwipeControl = s_lastInteractedWithSwipeControl.get();
00326     if (m_isInteracting && (!lastInteractedWithSwipeControl || lastInteractedWithSwipeControl.get() != this))
00327     {
00328         if (lastInteractedWithSwipeControl)
00329         {
00330             lastInteractedWithSwipeControl->CloseIfNotRemainOpenExecuteItem();
00331         }
00332         s_lastInteractedWithSwipeControl = get_weak();
00333
00334         if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
00335         {
00336             globalTestHooks->NotifyLastInteractedWithSwipeControlChanged();
00337         }
00338     }
00339
00340     float value = 0.0f;
00341
00342     if (m_isHorizontal)
00343     {
00344         value = args.Position().x;
00345         if (!m_blockNearContent && m_createdContent != CreatedContent::Left && value < -c_epsilon)
00346         {
00347             CreateLeftContent();
00348         }
00349         else if (!m_blockFarContent && m_createdContent != CreatedContent::Right && value > c_epsilon)
00350         {
00351             CreateRightContent();
00352         }
00353     }
00354     else
00355     {
00356         value = args.Position().y;
00357         if (!m_blockNearContent && m_createdContent != CreatedContent::Top && value < -c_epsilon)
00358         {
00359             CreateTopContent();
00360         }
00361         else if (!m_blockFarContent && m_createdContent != CreatedContent::Bottom && value > c_epsilon)
00362         {
00363             CreateBottomContent();
00364         }
00365     }
00366     UpdateThresholdReached(value);
00367 }
00368
00369 #pragma region TestHookHelpers
00370 winrt::SwipeControl SwipeControl::GetLastInteractedWithSwipeControl()
00371 {
00372     if (auto lastInteractedWithSwipeControl = s_lastInteractedWithSwipeControl.get())
00373     {
00374         return *lastInteractedWithSwipeControl;
00375     }
00376     return nullptr;
00377 }
00378
00379 bool SwipeControl::GetIsOpen()
00380 {
00381     return m_isOpen;
00382 }
00383
00384 bool SwipeControl::GetIsIdle()
00385 {
00386     return m_isIdle;
00387 }
00388 #pragma endregion
00389
00390 void SwipeControl::OnLeftItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00391 {
00392     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00393
00394     if (m_leftItemsChangedToken.value != 0)
00395     {
00396         auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00397         observableVector.VectorChanged(m_leftItemsChangedToken);
00398         m_leftItemsChangedToken.value = 0;
00399     }
00400
00401     if (args.NewValue())
00402     {
00403         ThrowIfHasVerticalAndHorizontalContent();
00404         auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00405         m_leftItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnLeftItemsChanged });
00406     }
00407
00408     if (m_interactionTracker)
00409     {
00410         m_interactionTracker.get().Properties().InsertBoolean(s_hasLeftContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
00411     }
00412
00413     if (m_createdContent == CreatedContent::Left)
00414     {
00415         CreateLeftContent();
00416     }
00417 }
00418
00419 void SwipeControl::OnRightItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00420 {
00421     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00422
00423     if (m_rightItemsChangedToken.value != 0)
00424     {
00425         auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00426         observableVector.VectorChanged(m_rightItemsChangedToken);
00427         m_rightItemsChangedToken.value = 0;
00428     }
00429
00430     if (args.NewValue())
00431     {
00432         ThrowIfHasVerticalAndHorizontalContent();
00433         auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00434         m_rightItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnRightItemsChanged });
00435     }
00436
00437     if (m_interactionTracker)
00438     {
00439         m_interactionTracker.get().Properties().InsertBoolean(s_hasRightContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
00440     }
00441
00442     if (m_createdContent == CreatedContent::Right)
00443     {
00444         CreateRightContent();
00445     }
00446 }
00447
00448 void SwipeControl::OnTopItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00449 {
00450     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00451
00452     if (m_topItemsChangedToken.value != 0)
00453     {
00454         auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00455         observableVector.VectorChanged(m_topItemsChangedToken);
00456         m_topItemsChangedToken.value = 0;
00457     }
00458
00459     if (args.NewValue())
00460     {
00461         ThrowIfHasVerticalAndHorizontalContent();
00462         auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00463         m_topItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnTopItemsChanged });
00464     }
00465
00466     if (m_interactionTracker)
00467     {
00468         m_interactionTracker.get().Properties().InsertBoolean(s_hasTopContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
00469     }
00470
00471     if (m_createdContent == CreatedContent::Top)
00472     {
00473         CreateTopContent();
00474     }
00475 }
00476
00477 void SwipeControl::OnBottomItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00478 {
00479     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00480
00481     if (m_bottomItemsChangedToken.value != 0)
00482     {
00483         auto observableVector = args.OldValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00484         observableVector.VectorChanged(m_bottomItemsChangedToken);
00485         m_bottomItemsChangedToken.value = 0;
00486     }
00487
00488     if (args.NewValue())
00489     {
00490         ThrowIfHasVerticalAndHorizontalContent();
00491         auto observableVector = args.NewValue().try_as<winrt::IObservableVector<winrt::SwipeItem>>();
00492         m_bottomItemsChangedToken = observableVector.VectorChanged({ this, &SwipeControl::OnBottomItemsChanged });
00493     }
00494
00495     if (m_interactionTracker)
00496     {
00497         m_interactionTracker.get().Properties().InsertBoolean(s_hasBottomContentPropertyName, args.NewValue() && args.NewValue().try_as<winrt::IVector<winrt::SwipeItem>>().Size() > 0);
00498     }
00499
00500     if (m_createdContent == CreatedContent::Bottom)
00501     {
00502         CreateBottomContent();
00503     }
00504 }
00505
00506 void SwipeControl::OnLoaded(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
00507 {
00508     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00509
00510     if (!m_hasInitialLoadedEventFired)
00511     {
00512         m_hasInitialLoadedEventFired = true;
00513         InitializeInteractionTracker();
00514         TryGetSwipeVisuals();
00515     }
00516     //If the swipe control has been added to the tree for a subsequent time, for instance when a list view item has been recycled,
00517     //Ensure that we are in the closed interaction tracker state.
00518     CloseWithoutAnimation();
00519 }
00520
00521 void SwipeControl::AttachEventHandlers()
00522 {
00523     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00524
00525     MUX_ASSERT(m_loadedToken.value == 0);
00526     m_loadedToken = Loaded({ this, &SwipeControl::OnLoaded });
00527     m_hasInitialLoadedEventFired = false;
00528
00529     MUX_ASSERT(m_onSizeChangedToken.value == 0);
00530     m_onSizeChangedToken = SizeChanged({ this, &SwipeControl::OnSizeChanged });
00531
00532     MUX_ASSERT(m_onSwipeContentStackPanelSizeChangedToken.value == 0);
00533     m_onSwipeContentStackPanelSizeChangedToken = m_swipeContentStackPanel.get().SizeChanged({ this, &SwipeControl::OnSwipeContentStackPanelSizeChanged });
00534
00535     // also get any action from any inside button, or a clickable/tappable control
00536     if (!m_onPointerPressedEventHandler)
00537     {
00538         m_onPointerPressedEventHandler.set(winrt::box_value<winrt::PointerEventHandler>({ this, &SwipeControl::OnPointerPressedEvent }));
00539         AddHandler(winrt::UIElement::PointerPressedEvent(), m_onPointerPressedEventHandler.get(), true);
00540     }
00541
00542     MUX_ASSERT(m_inputEaterTappedToken.value == 0);
00543     m_inputEaterTappedToken = m_inputEater.get().Tapped({ this, &SwipeControl::InputEaterGridTapped });
00544 }
00545
00546 void SwipeControl::DetachEventHandlers(bool useSafeGet)
00547 {
00548     SWIPECONTROL_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00549
00550     if (m_loadedToken.value != 0)
00551     {
00552         Loaded(m_loadedToken);
00553         m_loadedToken.value = 0;
00554     }
00555
00556     if (m_onSizeChangedToken.value != 0)
00557     {
00558         SizeChanged(m_onSizeChangedToken);
00559         m_onSizeChangedToken.value = 0;
00560     }
00561
00562     if (m_onSwipeContentStackPanelSizeChangedToken.value != 0)
00563     {
00564         if (auto swipeContentStackPanel = useSafeGet ? m_swipeContentStackPanel.safe_get() : m_swipeContentStackPanel.get())
00565         {
00566             swipeContentStackPanel.SizeChanged(m_onSwipeContentStackPanelSizeChangedToken);
00567         }
00568         m_onSwipeContentStackPanelSizeChangedToken.value = 0;
00569     }
00570
00571     if (m_onPointerPressedEventHandler)
00572     {
00573         RemoveHandler(winrt::UIElement::PointerPressedEvent(), m_onPointerPressedEventHandler.get());
00574         m_onPointerPressedEventHandler.set(nullptr);
00575     }
00576
00577     if (m_inputEaterTappedToken.value != 0)
00578     {
00579         if (auto inputEater = useSafeGet ? m_inputEater.safe_get() : m_inputEater.get())
00580         {
00581             inputEater.Tapped(m_inputEaterTappedToken);
00582         }
00583         m_inputEaterTappedToken.value = 0;
00584     }
00585
00586     DetachDismissingHandlers();
00587 }
00588
00589 void SwipeControl::OnSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& /*args*/)
00590 {
00591     EnsureClip();
00592     for (winrt::UIElement uiElement : m_swipeContentStackPanel.get().Children())
00593     {
00594         winrt::AppBarButton appBarButton = uiElement.try_as<winrt::AppBarButton>();
00595         if (appBarButton)
00596         {
00597             if (m_isHorizontal)
00598             {
00599                 appBarButton.Height(ActualHeight());
00600                 if (m_currentItems && m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
00601                 {
00602                     appBarButton.Width(ActualWidth());
00603                 }
00604             }
00605             else
00606             {
00607                 appBarButton.Width(ActualWidth());
00608                 if (m_currentItems && m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
00609                 {
00610                     appBarButton.Height(ActualHeight());
00611                 }
00612             }
00613         }
00614     }
00615 }
00616
00617 void SwipeControl::OnSwipeContentStackPanelSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args)
00618 {
00619     if (m_interactionTracker)
00620     {
00621         m_interactionTracker.get().MinPosition({ -args.NewSize().Width, -args.NewSize().Height, 0.0f });
00622         m_interactionTracker.get().MaxPosition({ args.NewSize().Width, args.NewSize().Height, 0.0f });
00623         ConfigurePositionInertiaRestingValues();
00624     }
00625 }
00626
00627 void SwipeControl::OnPointerPressedEvent(
00628     const winrt::IInspectable& sender,
00629     const winrt::PointerRoutedEventArgs& args)
00630 {
00631     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00632
00633     if (args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch && m_visualInteractionSource)
00634     {
00635         if (m_currentItems &&
00636             m_currentItems.get().Mode() == winrt::SwipeMode::Execute &&
00637             m_currentItems.get().Size() > 0 &&
00638             m_currentItems.get().GetAt(0).BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::RemainOpen &&
00639             m_isOpen)
00640         {
00641             //If the swipe control is currently open on an Execute item's who's behaviorOnInvoked property is set to RemainOpen
00642             //we don't want to allow the user interaction to effect the swipe control anymore, so don't redirect the manipulation
00643             //to the interaction tracker.
00644             return;
00645         }
00646         try
00647         {
00648             m_visualInteractionSource.get().TryRedirectForManipulation(args.GetCurrentPoint(*this));
00649         }
00650         catch (const winrt::hresult_error& e)
00651         {
00652             // Swallowing Access Denied error because of InteractionTracker bug 17434718 which has been
00653             // causing crashes at least in RS3, RS4 and RS5.
00654             if (e.to_abi() != E_ACCESSDENIED)
00655             {
00656                 throw;
00657             }
00658         }
00659     }
00660 }
00661
00662 void SwipeControl::InputEaterGridTapped(const winrt::IInspectable& /*sender*/, const winrt::TappedRoutedEventArgs& args)
00663 {
00664     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00665
00666     if (m_isOpen)
00667     {
00668         CloseIfNotRemainOpenExecuteItem();
00669         args.Handled(true);
00670     }
00671 }
00672
00673 void SwipeControl::AttachDismissingHandlers()
00674 {
00675     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00676
00677     DetachDismissingHandlers();
00678
00679     if (auto xamlRoot = this->XamlRoot())
00680     {
00681         if (const auto xamlRootContent = xamlRoot.Content())
00682         {
00683             m_xamlRootPointerPressedEventRevoker = AddRoutedEventHandler<RoutedEventType::PointerPressed>(
00684                 xamlRootContent,
00685                 [this](auto const&, auto const& args)
00686                 {
00687                     DismissSwipeOnAnExternalTap(args.GetCurrentPoint(nullptr).Position());
00688                 },
00689                 true /*handledEventsToo*/);
00690
00691             m_xamlRootKeyDownEventRevoker = AddRoutedEventHandler<RoutedEventType::KeyDown>(
00692                 xamlRootContent,
00693                 [this](auto const&, auto const& args)
00694                 {
00695                     CloseIfNotRemainOpenExecuteItem();
00696                 },
00697                 true /*handledEventsToo*/);
00698         }
00699
00700         m_xamlRootChangedRevoker = xamlRoot.Changed(winrt::auto_revoke, { this, &SwipeControl::CurrentXamlRootChanged });
00701     }
00702
00703     // TODO: We do not have direct analogue for AcceleratorKeyActivated with DispatcherQueue in Islands/ win32. Please refer Task# 30013704 for  more details.
00704     if (auto coreWindow = winrt::CoreWindow::GetForCurrentThread())
00705     {
00706         if (auto dispatcher = coreWindow.Dispatcher())
00707         {
00708             m_acceleratorKeyActivatedRevoker = dispatcher.AcceleratorKeyActivated(winrt::auto_revoke, { this, &SwipeControl::DismissSwipeOnAcceleratorKeyActivator });
00709         }
00710     }
00711 }
00712
00713 void SwipeControl::DetachDismissingHandlers()
00714 {
00715     SWIPECONTROL_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00716
00717     m_xamlRootPointerPressedEventRevoker.revoke();
00718     m_xamlRootKeyDownEventRevoker.revoke();
00719     m_xamlRootChangedRevoker.revoke();
00720
00721     m_acceleratorKeyActivatedRevoker.revoke();
00722 }
00723
00724 void SwipeControl::DismissSwipeOnAcceleratorKeyActivator(const winrt::Windows::UI::Core::CoreDispatcher& sender, const winrt::AcceleratorKeyEventArgs& args)
00725 {
00726     CloseIfNotRemainOpenExecuteItem();
00727 }
00728
00729 void SwipeControl::CurrentXamlRootChanged(const winrt::XamlRoot & /*sender*/, const winrt::XamlRootChangedEventArgs &/*args*/)
00730 {
00731     CloseIfNotRemainOpenExecuteItem();
00732 }
00733
00734 void SwipeControl::DismissSwipeOnAnExternalTap(winrt::Point const& tapPoint)
00735 {
00736     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00737
00738     const winrt::GeneralTransform transform = TransformToVisual(nullptr);
00739     const winrt::Point p(0, 0);
00740
00741     // start of the swipe control
00742     const auto transformedElementOrigin = transform.TransformPoint(p);
00743
00744     // If point is not within the item's bounds, close it.
00745     if (*this && tapPoint.X < transformedElementOrigin.X || tapPoint.Y < transformedElementOrigin.Y ||
00746         (static_cast<double>(tapPoint.X) - transformedElementOrigin.X) > ActualWidth() ||
00747         (static_cast<double>(tapPoint.Y) - transformedElementOrigin.Y) > ActualHeight())
00748     {
00749         CloseIfNotRemainOpenExecuteItem();
00750     }
00751 }
00752
00753 void SwipeControl::GetTemplateParts()
00754 {
00755     winrt::IControlProtected thisAsControlProtected = *this;
00756     m_rootGrid.set(GetTemplateChildT<winrt::Grid>(s_rootGridName, thisAsControlProtected));
00757     m_inputEater.set(GetTemplateChildT<winrt::Grid>(s_inputEaterName, thisAsControlProtected));
00758     m_content.set(GetTemplateChildT<winrt::Grid>(s_ContentRootName, thisAsControlProtected));
00759     m_swipeContentRoot.set(GetTemplateChildT<winrt::Grid>(s_swipeContentRootName, thisAsControlProtected));
00760     m_swipeContentStackPanel.set(GetTemplateChildT<winrt::StackPanel>(s_swipeContentStackPanelName, thisAsControlProtected));
00761
00762     //Before RS5 these elements were not in the template but were instead created in code behind when the swipe content was created.
00763     //Post RS5 the code behind expects these elements to always be in the tree.
00764     if (!m_swipeContentRoot)
00765     {
00766         winrt::Grid swipeContentRoot;
00767         swipeContentRoot.Name(L"SwipeContentRoot");
00768         m_swipeContentRoot.set(swipeContentRoot);
00769         m_rootGrid.get().Children().InsertAt(0, swipeContentRoot);
00770     }
00771     if (!m_swipeContentStackPanel)
00772     {
00773         winrt::StackPanel swipeContentStackPanel;
00774         swipeContentStackPanel.Name(L"SwipeContentStackPanel");
00775         m_swipeContentStackPanel.set(swipeContentStackPanel);
00776         m_swipeContentRoot.get().Children().Append(swipeContentStackPanel);
00777     }
00778     m_swipeContentStackPanel.get().Orientation(m_isHorizontal ? winrt::Orientation::Horizontal : winrt::Orientation::Vertical);
00779
00780     if (auto lookedUpStyle = SharedHelpers::FindInApplicationResources(s_swipeItemStyleName))
00781     {
00782         m_swipeItemStyle.set(lookedUpStyle.try_as<winrt::Style>());
00783     }
00784 }
00785
00786 void SwipeControl::InitializeInteractionTracker()
00787 {
00788     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00789
00790     if (!m_interactionTrackerOwner)
00791     {
00792         m_interactionTrackerOwner = winrt::make_self<SwipeControlInteractionTrackerOwner>(*this).try_as<winrt::IInteractionTrackerOwner>();
00793     }
00794
00795     if (!m_compositor)
00796     {
00797         m_compositor.set(winrt::ElementCompositionPreview::GetElementVisual(m_rootGrid.get()).Compositor());
00798     }
00799
00800     m_visualInteractionSource.set(winrt::VisualInteractionSource::Create(FindVisualInteractionSourceVisual()));
00801     m_visualInteractionSource.get().IsPositionXRailsEnabled(m_isHorizontal);
00802     m_visualInteractionSource.get().IsPositionYRailsEnabled(!m_isHorizontal);
00803     m_visualInteractionSource.get().ManipulationRedirectionMode(winrt::VisualInteractionSourceRedirectionMode::CapableTouchpadOnly);
00804     m_visualInteractionSource.get().PositionXSourceMode(m_isHorizontal ? winrt::InteractionSourceMode::EnabledWithInertia : winrt::InteractionSourceMode::Disabled);
00805     m_visualInteractionSource.get().PositionYSourceMode(!m_isHorizontal ? winrt::InteractionSourceMode::EnabledWithInertia : winrt::InteractionSourceMode::Disabled);
00806     if (m_isHorizontal)
00807     {
00808         m_visualInteractionSource.get().PositionXChainingMode(winrt::InteractionChainingMode::Never);
00809     }
00810     else
00811     {
00812         m_visualInteractionSource.get().PositionYChainingMode(winrt::InteractionChainingMode::Never);
00813     }
00814
00815     m_interactionTracker.set(winrt::InteractionTracker::CreateWithOwner(m_compositor.get(), m_interactionTrackerOwner));
00816     m_interactionTracker.get().InteractionSources().Add(m_visualInteractionSource.get());
00817     m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
00818     m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);
00819     m_interactionTracker.get().Properties().InsertBoolean(s_blockNearContentPropertyName, false);
00820     m_interactionTracker.get().Properties().InsertBoolean(s_blockFarContentPropertyName, false);
00821     m_interactionTracker.get().Properties().InsertBoolean(s_hasLeftContentPropertyName, LeftItems() && LeftItems().Size() > 0);
00822     m_interactionTracker.get().Properties().InsertBoolean(s_hasRightContentPropertyName, RightItems() && RightItems().Size() > 0);
00823     m_interactionTracker.get().Properties().InsertBoolean(s_hasTopContentPropertyName, TopItems() && TopItems().Size() > 0);
00824     m_interactionTracker.get().Properties().InsertBoolean(s_hasBottomContentPropertyName, BottomItems() && BottomItems().Size() > 0);
00825     m_interactionTracker.get().MaxPosition({ std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity(), 0.0f });
00826     m_interactionTracker.get().MinPosition({ -1.0f * std::numeric_limits<float>::infinity(), -1.0f * std::numeric_limits<float>::infinity(), 0.0f });
00827
00828     // Create and initialize the Swipe animations:
00829     // If the swipe control is already opened it should not be possible to open the opposite side's items, without first closing the swipe control.
00830     // This prevents the user from flicking the swipe control closed and accidently opening the other due to inertia.
00831     // To acheive this we insert the isFarOpen and isNearOpen boolean properties on the interaction tracker and alter the expression output based on these.
00832     // The opened state is maintained in the interaction trackers IdleStateEntered handler, this means we need to ensure this state is entered each time the swipe control
00833     // is opened or closed.
00834
00835     // A more readable version of the expression:
00836
00837     /*m_swipeAnimation.set(m_compositor.get().CreateExpressionAnimation(L"isHorizontal ?"
00838         "Vector3(tracker.isFarOpen || tracker.blockNearContent ? Clamp(-tracker.Position.X, -this.Target.Size.X, 0) :"
00839                 "tracker.isNearOpen  || tracker.blockFarContent ? Clamp(-tracker.Position.X,  0, this.Target.Size.X) :"
00840                 "Clamp(-tracker.Position.X, (tracker.hasRightContent ? -10000 : 0), (tracker.hasLeftContent ? 10000 : 0)), 0, 0) :"
00841         "Vector3(0, tracker.isFarOpen  || tracker.blockNearContent ? Clamp(-tracker.Position.Y, -this.Target.Size.Y, 0) :"
00842                    "tracker.isNearOpen || tracker.blockFarContent ? Clamp(-tracker.Position.Y, 0,  this.Target.Size.Y) :"
00843                    "Clamp(-tracker.Position.Y, (tracker.hasBottomContent ? -10000 : 0), (tracker.hasTopContent ? 10000 : 0)), 0)"));*/
00844
00845     m_swipeAnimation.set(m_compositor.get().CreateExpressionAnimation(isHorizontalPropertyName() + L" ?"
00846         "Vector3(" + trackerPropertyName() + L"." + isFarOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockNearContentPropertyName() + L" ? Clamp(-" + trackerPropertyName() + L".Position.X, -this.Target.Size.X, 0) :"
00847         + trackerPropertyName() + L"." + isNearOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockFarContentPropertyName() + L" ? Clamp(-" + trackerPropertyName() + L".Position.X,  0, this.Target.Size.X) :"
00848         "Clamp(-" + trackerPropertyName() + L".Position.X, (" + trackerPropertyName() + L"." + hasRightContentPropertyName() + L" ? -10000 : 0), (" + trackerPropertyName() + L"." + hasLeftContentPropertyName() + L" ? 10000 : 0)), 0, 0) :"
00849         "Vector3(0, " + trackerPropertyName() + L"." + isFarOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockNearContentPropertyName() + L"  ? Clamp(-" + trackerPropertyName() + L".Position.Y, -this.Target.Size.Y, 0) :"
00850         + trackerPropertyName() + L"." + isNearOpenPropertyName() + L" || " + trackerPropertyName() + L"." + blockFarContentPropertyName() + L" ? Clamp(-" + trackerPropertyName() + L".Position.Y, 0,  this.Target.Size.Y) :"
00851         "Clamp(-" + trackerPropertyName() + L".Position.Y, (" + trackerPropertyName() + L"." + hasBottomContentPropertyName() + L" ? -10000 : 0), (" + trackerPropertyName() + L"." + hasTopContentPropertyName() + L" ? 10000 : 0)), 0)"));
00852
00853     m_swipeAnimation.get().SetReferenceParameter(s_trackerPropertyName, m_interactionTracker.get());
00854     m_swipeAnimation.get().SetBooleanParameter(s_isHorizontalPropertyName, m_isHorizontal);
00855     if (IsTranslationFacadeAvailableForSwipeControl(m_content.get()))
00856     {
00857         m_swipeAnimation.get().Target(s_translationPropertyName);
00858     }
00859
00860     //A more readable version of the expression:
00861
00862     /*m_executeExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(L"(foregroundVisual." + GetAnimationTarget() + L" * 0.5) + (isHorizontal ?"
00863         "Vector3((isNearContent ? -0.5, 0.5) * this.Target.Size.X, 0, 0) : "
00864         "Vector3(0, (isNearContent ? -0.5, 0.5) * this.Target.Size.Y, 0))"));*/
00865
00866     m_executeExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(L"(" + foregroundVisualPropertyName() + L"." + GetAnimationTarget(m_swipeContentStackPanel.get()) + L" * 0.5) + (" + isHorizontalPropertyName() + L" ? "
00867         "Vector3((" + isNearContentPropertyName() + L" ? -0.5 : 0.5) * this.Target.Size.X, 0, 0) : "
00868         "Vector3(0, (" + isNearContentPropertyName() + L" ? -0.5 : 0.5) * this.Target.Size.Y, 0))"));
00869
00870     m_executeExpressionAnimation.get().SetBooleanParameter(s_isHorizontalPropertyName, m_isHorizontal);
00871     if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
00872     {
00873         m_executeExpressionAnimation.get().Target(s_translationPropertyName);
00874     }
00875
00876     //A more readable version of the expression:
00877
00878     /*m_clipExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(L"isHorizontal ?
00879         Max(swipeRootVisual.Size.X + (isNearContent ? tracker.Position.X : -tracker.Position.X) , 0) :
00880         Max(swipeRootVisual.Size.Y + (isNearContent ? tracker.Position.Y : -tracker.Position.Y) , 0)"));*/
00881
00882     m_clipExpressionAnimation.set(m_compositor.get().CreateExpressionAnimation(isHorizontalPropertyName() + L" ? "
00883         "Max(" + swipeRootVisualPropertyName() + L".Size.X + (" + isNearContentPropertyName() + L" ? " + trackerPropertyName() + L".Position.X : -" + trackerPropertyName() + L".Position.X) , 0) : "
00884         "Max(" + swipeRootVisualPropertyName() + L".Size.Y + (" + isNearContentPropertyName() + L" ? " + trackerPropertyName() + L".Position.Y : -" + trackerPropertyName() + L".Position.Y) , 0)"));
00885
00886     m_clipExpressionAnimation.get().SetReferenceParameter(s_trackerPropertyName, m_interactionTracker.get());
00887     m_clipExpressionAnimation.get().SetBooleanParameter(s_isHorizontalPropertyName, m_isHorizontal);
00888 }
00889
00890 void SwipeControl::ConfigurePositionInertiaRestingValues()
00891 {
00892     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00893
00894     if (m_isHorizontal)
00895     {
00896         winrt::IVector<winrt::InteractionTrackerInertiaModifier> xModifiers = winrt::make<Vector<winrt::InteractionTrackerInertiaModifier>>();
00897
00898         winrt::ExpressionAnimation leftCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasLeftContentPropertyName() + L" && !this.Target." + isFarOpenPropertyName() + L" && this.Target.NaturalRestingPosition.x <= -1 * (this.Target." + isNearOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
00899         leftCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
00900         leftCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
00901         winrt::ExpressionAnimation leftRestingPoint = m_compositor.get().CreateExpressionAnimation(L"-" + swipeContentSizeParameterName());
00902         leftRestingPoint.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
00903         winrt::InteractionTrackerInertiaRestingValue leftOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
00904         leftOpen.Condition(leftCondition);
00905         leftOpen.RestingValue(leftRestingPoint);
00906         xModifiers.Append(leftOpen);
00907
00908         winrt::ExpressionAnimation rightCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasRightContentPropertyName() + L" && !this.Target." + isNearOpenPropertyName() + L" && this.Target.NaturalRestingPosition.x >= (this.Target." + isFarOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
00909         rightCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
00910         rightCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
00911         winrt::ExpressionAnimation rightRestingValue = m_compositor.get().CreateExpressionAnimation(s_swipeContentSizeParameterName);
00912         rightRestingValue.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualWidth()));
00913         winrt::InteractionTrackerInertiaRestingValue rightOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
00914         rightOpen.Condition(rightCondition);
00915         rightOpen.RestingValue(rightRestingValue);
00916         xModifiers.Append(rightOpen);
00917
00918         winrt::ExpressionAnimation condition = m_compositor.get().CreateExpressionAnimation(L"true");
00919         winrt::ExpressionAnimation restingValue = m_compositor.get().CreateExpressionAnimation(L"0");
00920         winrt::InteractionTrackerInertiaRestingValue neutralX = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
00921         neutralX.Condition(condition);
00922         neutralX.RestingValue(restingValue);
00923         xModifiers.Append(neutralX);
00924
00925         m_interactionTracker.get().ConfigurePositionXInertiaModifiers(xModifiers);
00926     }
00927     else
00928     {
00929         winrt::IVector<winrt::InteractionTrackerInertiaModifier> yModifiers = winrt::make<Vector<winrt::InteractionTrackerInertiaModifier>>();
00930
00931         winrt::ExpressionAnimation topCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasTopContentPropertyName() + L" && !this.Target." + isFarOpenPropertyName() + L" && this.Target.NaturalRestingPosition.y <= -1 * (this.Target." + isNearOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
00932         topCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
00933         topCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
00934         winrt::ExpressionAnimation topRestingValue = m_compositor.get().CreateExpressionAnimation(L"-" + swipeContentSizeParameterName());
00935         topRestingValue.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
00936         winrt::InteractionTrackerInertiaRestingValue topOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
00937         topOpen.Condition(topCondition);
00938         topOpen.RestingValue(topRestingValue);
00939         yModifiers.Append(topOpen);
00940
00941         winrt::ExpressionAnimation bottomCondition = m_compositor.get().CreateExpressionAnimation(L"this.Target." + hasBottomContentPropertyName() + L" && !this.Target." + isNearOpenPropertyName() + L" && this.Target.NaturalRestingPosition.y >= (this.Target." + isFarOpenPropertyName() + L" ? " + swipeContentSizeParameterName() + L" : min(" + swipeContentSizeParameterName() + L", " + maxThresholdPropertyName() + L"))");
00942         bottomCondition.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
00943         bottomCondition.SetScalarParameter(s_maxThresholdPropertyName, c_ThresholdValue);
00944         winrt::ExpressionAnimation bottomRestingValue = m_compositor.get().CreateExpressionAnimation(s_swipeContentSizeParameterName);
00945         bottomRestingValue.SetScalarParameter(s_swipeContentSizeParameterName, static_cast<float>(m_swipeContentStackPanel.get().ActualHeight()));
00946         winrt::InteractionTrackerInertiaRestingValue bottomOpen = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
00947         bottomOpen.Condition(bottomCondition);
00948         bottomOpen.RestingValue(bottomRestingValue);
00949         yModifiers.Append(bottomOpen);
00950
00951         winrt::ExpressionAnimation condition = m_compositor.get().CreateExpressionAnimation(L"true");
00952         winrt::ExpressionAnimation restingValue = m_compositor.get().CreateExpressionAnimation(L"0");
00953         winrt::InteractionTrackerInertiaRestingValue neutralY = winrt::InteractionTrackerInertiaRestingValue::Create(m_compositor.get());
00954         neutralY.Condition(condition);
00955         neutralY.RestingValue(restingValue);
00956         yModifiers.Append(neutralY);
00957
00958         m_interactionTracker.get().ConfigurePositionYInertiaModifiers(yModifiers);
00959     }
00960 }
00961
00962 winrt::Visual SwipeControl::FindVisualInteractionSourceVisual()
00963 {
00964     winrt::Visual visualInteractionSource = nullptr;
00965
00966     // Don't walk up the tree too far largely as an optimization for when SwipeControl isn't used
00967     // with a list.  The general-case when using swipe with a ListView will probably have the
00968     // LVIP as the visual parent of the SwipeControl but enabling checking for a few more
00969     // levels above that could enable more complex list item templates where SwipeControl
00970     // isn't the root element.
00971     const int maxSteps = 5;
00972     int steps = 0;
00973     auto current = winrt::VisualTreeHelper::GetParent(*this);
00974     while (current && steps < maxSteps)
00975     {
00976         if (auto lvip = current.try_as<winrt::ListViewItemPresenter>())
00977         {
00978             visualInteractionSource = winrt::ElementCompositionPreview::GetElementVisual(lvip);
00979             break;
00980         }
00981
00982         current = winrt::VisualTreeHelper::GetParent(current);
00983         ++steps;
00984     }
00985
00986     if (!visualInteractionSource)
00987     {
00988         visualInteractionSource = winrt::ElementCompositionPreview::GetElementVisual(*this);
00989     }
00990
00991     return visualInteractionSource;
00992 }
00993
00994 void SwipeControl::EnsureClip()
00995 {
00996     const float width = static_cast<float>(ActualWidth());
00997     const float height = static_cast<float>(ActualHeight());
00998     const winrt::Rect rect = { 0.0f, 0.0f, width, height };
00999     winrt::Microsoft::UI::Xaml::Media::RectangleGeometry rectangleGeometry;
01000     rectangleGeometry.Rect(rect);
01001     Clip(rectangleGeometry);
01002 }
01003
01004 void SwipeControl::CloseWithoutAnimation()
01005 {
01006     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01007
01008     const bool wasIdle = m_isIdle;
01009     m_interactionTracker.get().TryUpdatePosition({ 0.0f, 0.0f, 0.0f });
01010     if (wasIdle)
01011     {
01012         IdleStateEntered(nullptr);
01013     }
01014 }
01015
01016 void SwipeControl::CloseIfNotRemainOpenExecuteItem()
01017 {
01018     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01019
01020     if (m_currentItems &&
01021         m_currentItems.get().Mode() == winrt::SwipeMode::Execute &&
01022         m_currentItems.get().Size() > 0 &&
01023         m_currentItems.get().GetAt(0).BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::RemainOpen &&
01024         m_isOpen)
01025     {
01026         //If we have a Mode set to Execute, and an item with BehaviorOnInvoked set to RemainOpen, we do not want to close, so no-op
01027         return;
01028     }
01029     Close();
01030 }
01031
01032 void SwipeControl::CreateLeftContent()
01033 {
01034     if (auto items = LeftItems())
01035     {
01036         m_createdContent = CreatedContent::Left;
01037         CreateContent(items);
01038     }
01039 }
01040
01041 void SwipeControl::CreateRightContent()
01042 {
01043     if (auto items = RightItems())
01044     {
01045         m_createdContent = CreatedContent::Right;
01046         CreateContent(items);
01047     }
01048 }
01049
01050 void SwipeControl::CreateBottomContent()
01051 {
01052     if (auto items = BottomItems())
01053     {
01054         m_createdContent = CreatedContent::Bottom;
01055         CreateContent(items);
01056     }
01057 }
01058
01059 void SwipeControl::CreateTopContent()
01060 {
01061     if (auto items = TopItems())
01062     {
01063         m_createdContent = CreatedContent::Top;
01064         CreateContent(items);
01065     }
01066 }
01067
01068 void SwipeControl::CreateContent(const winrt::SwipeItems& items)
01069 {
01070     if (m_swipeContentStackPanel && m_swipeContentStackPanel.get().Children())
01071     {
01072         m_swipeContentStackPanel.get().Children().Clear();
01073     }
01074
01075     m_currentItems.set(items);
01076     if (m_currentItems)
01077     {
01078         AlignStackPanel();
01079         PopulateContentItems();
01080         SetupExecuteExpressionAnimation();
01081         SetupClipAnimation();
01082         UpdateColors();
01083     }
01084 }
01085
01086 void SwipeControl::AlignStackPanel()
01087 {
01088     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01089
01090     if (m_currentItems.get().Size() > 0)
01091     {
01092         switch (m_currentItems.get().Mode())
01093         {
01094         case winrt::SwipeMode::Execute:
01095         {
01096             if (m_isHorizontal)
01097             {
01098                 m_swipeContentStackPanel.get().HorizontalAlignment(winrt::HorizontalAlignment::Stretch);
01099                 m_swipeContentStackPanel.get().VerticalAlignment(winrt::VerticalAlignment::Center);
01100             }
01101             else
01102             {
01103                 m_swipeContentStackPanel.get().HorizontalAlignment(winrt::HorizontalAlignment::Center);
01104                 m_swipeContentStackPanel.get().VerticalAlignment(winrt::VerticalAlignment::Stretch);
01105             }
01106             break;
01107         }
01108         case winrt::SwipeMode::Reveal:
01109         {
01110             if (m_isHorizontal)
01111             {
01112                 const auto swipeContentStackPanelHorizontalAlignment = m_createdContent == CreatedContent::Left ? winrt::HorizontalAlignment::Left :
01113                     m_createdContent == CreatedContent::Right ? winrt::HorizontalAlignment::Right :
01114                     winrt::HorizontalAlignment::Stretch;
01115
01116                 m_swipeContentStackPanel.get().HorizontalAlignment(swipeContentStackPanelHorizontalAlignment);
01117                 m_swipeContentStackPanel.get().VerticalAlignment(winrt::VerticalAlignment::Center);
01118             }
01119             else
01120             {
01121                 const auto swipeContentStackPanelVerticalAlignment = m_createdContent == CreatedContent::Top ? winrt::VerticalAlignment::Top :
01122                     m_createdContent == CreatedContent::Bottom ? winrt::VerticalAlignment::Bottom :
01123                     winrt::VerticalAlignment::Stretch;
01124
01125                 m_swipeContentStackPanel.get().HorizontalAlignment(winrt::HorizontalAlignment::Center);
01126                 m_swipeContentStackPanel.get().VerticalAlignment(swipeContentStackPanelVerticalAlignment);
01127             }
01128             break;
01129         }
01130         default:
01131             assert(false);
01132             break;
01133         }
01134     }
01135 }
01136
01137 void SwipeControl::PopulateContentItems()
01138 {
01139     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01140
01141     for (winrt::SwipeItem swipeItem : m_currentItems.get())
01142     {
01143         m_swipeContentStackPanel.get().Children().Append(GetSwipeItemButton(swipeItem));
01144     }
01145
01146     TryGetSwipeVisuals();
01147 }
01148
01149 void SwipeControl::SetupExecuteExpressionAnimation()
01150 {
01151     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01152
01153     if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
01154     {
01155         m_swipeContentStackPanel.get().StopAnimation(m_executeExpressionAnimation.get());
01156         m_swipeContentStackPanel.get().Translation({ 0.0f, 0.0f, 0.0f });
01157     }
01158     else if (m_swipeContentVisual)
01159     {
01160         m_swipeContentVisual.get().StopAnimation(GetAnimationTarget(m_swipeContentStackPanel.get()));
01161         m_swipeContentVisual.get().Properties().InsertVector3(GetAnimationTarget(m_swipeContentStackPanel.get()), { 0.0f, 0.0f, 0.0f });
01162     }
01163
01164     if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
01165     {
01166         assert(m_createdContent != CreatedContent::None);
01167         m_executeExpressionAnimation.get().SetBooleanParameter(s_isNearContentPropertyName, m_createdContent == CreatedContent::Left || m_createdContent == CreatedContent::Top);
01168         if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
01169         {
01170             m_swipeContentStackPanel.get().StartAnimation(m_executeExpressionAnimation.get());
01171         }
01172         if (m_swipeContentVisual)
01173         {
01174             m_swipeContentVisual.get().StartAnimation(GetAnimationTarget(m_swipeContentStackPanel.get()), m_executeExpressionAnimation.get());
01175         }
01176     }
01177 }
01178
01179 void SwipeControl::SetupClipAnimation()
01180 {
01181     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01182
01183     if (!m_insetClip)
01184     {
01185         m_insetClip.set(m_compositor.get().CreateInsetClip());
01186         m_swipeContentRootVisual.get().Clip(m_insetClip.get());
01187     }
01188     else
01189     {
01190         m_insetClip.get().StopAnimation(s_leftInsetTargetName);
01191         m_insetClip.get().StopAnimation(s_rightInsetTargetName);
01192         m_insetClip.get().StopAnimation(s_topInsetTargetName);
01193         m_insetClip.get().StopAnimation(s_bottomInsetTargetName);
01194         m_insetClip.get().LeftInset(0.0f);
01195         m_insetClip.get().RightInset(0.0f);
01196         m_insetClip.get().TopInset(0.0f);
01197         m_insetClip.get().BottomInset(0.0f);
01198     }
01199
01200     m_clipExpressionAnimation.get().SetBooleanParameter(s_isNearContentPropertyName, m_createdContent == CreatedContent::Left || m_createdContent == CreatedContent::Top);
01201
01202     if (m_createdContent == CreatedContent::None)
01203     {
01204         //If we have no created content then we don't need to start the clip animation yet.
01205         return;
01206     }
01207
01208     m_insetClip.get().StartAnimation(DirectionToInset(m_createdContent), m_clipExpressionAnimation.get());
01209 }
01210
01211 void SwipeControl::UpdateColors()
01212 {
01213     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01214
01215     if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
01216     {
01217         UpdateColorsIfExecuteItem();
01218     }
01219     else
01220     {
01221         UpdateColorsIfRevealItems();
01222     }
01223 }
01224
01225 winrt::AppBarButton SwipeControl::GetSwipeItemButton(const winrt::SwipeItem& swipeItem)
01226 {
01227     winrt::AppBarButton itemAsButton;
01228     winrt::get_self<SwipeItem>(swipeItem)->GenerateControl(itemAsButton, m_swipeItemStyle.get());
01229
01230     if (!swipeItem.Background())
01231     {
01232         if (auto lookedUpBrush = SharedHelpers::FindInApplicationResources(m_currentItems.get().Mode() == winrt::SwipeMode::Reveal ? s_swipeItemBackgroundResourceName : m_thresholdReached ? s_executeSwipeItemPostThresholdBackgroundResourceName : s_executeSwipeItemPreThresholdBackgroundResourceName))
01233         {
01234             itemAsButton.Background(lookedUpBrush.try_as<winrt::Brush>());
01235         }
01236     }
01237
01238     if (!swipeItem.Foreground())
01239     {
01240         if (auto lookedUpBrush = SharedHelpers::FindInApplicationResources(m_currentItems.get().Mode() == winrt::SwipeMode::Reveal ? s_swipeItemForegroundResourceName : m_thresholdReached ? s_executeSwipeItemPostThresholdForegroundResourceName : s_executeSwipeItemPreThresholdForegroundResourceName))
01241         {
01242             itemAsButton.Foreground(lookedUpBrush.try_as<winrt::Brush>());
01243         }
01244     }
01245
01246     if (m_isHorizontal)
01247     {
01248         itemAsButton.Height(ActualHeight());
01249         if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
01250         {
01251             itemAsButton.Width(ActualWidth());
01252         }
01253     }
01254     else
01255     {
01256         itemAsButton.Width(ActualWidth());
01257         if (m_currentItems.get().Mode() == winrt::SwipeMode::Execute)
01258         {
01259             itemAsButton.Height(ActualHeight());
01260         }
01261     }
01262     return itemAsButton;
01263 }
01264
01265 void SwipeControl::UpdateColorsIfExecuteItem()
01266 {
01267     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01268
01269     if (!m_currentItems || m_currentItems.get().Mode() != winrt::SwipeMode::Execute)
01270     {
01271         return;
01272     }
01273
01274     winrt::SwipeItem swipeItem = nullptr;
01275     if (m_currentItems.get().Size() > 0)
01276     {
01277         swipeItem = m_currentItems.get().GetAt(0);
01278     }
01279     UpdateExecuteBackgroundColor(swipeItem);
01280     UpdateExecuteForegroundColor(swipeItem);
01281 }
01282
01283 void SwipeControl::UpdateExecuteBackgroundColor(const winrt::SwipeItem& swipeItem)
01284 {
01285     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01286
01287     winrt::Brush background = nullptr;
01288
01289     if (!m_thresholdReached)
01290     {
01291         if (auto lookedUpBackgroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPreThresholdBackgroundResourceName))
01292         {
01293             background = lookedUpBackgroundBrush.try_as<winrt::Brush>();
01294         }
01295     }
01296     else
01297     {
01298         if (auto lookedUpBackgroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPostThresholdBackgroundResourceName))
01299         {
01300             background = lookedUpBackgroundBrush.try_as<winrt::Brush>();
01301         }
01302     }
01303
01304     if (swipeItem && swipeItem.Background())
01305     {
01306         background = swipeItem.Background();
01307     }
01308
01309     m_swipeContentStackPanel.get().Background(background);
01310     m_swipeContentRoot.get().Background(nullptr);
01311 }
01312
01313 void SwipeControl::UpdateExecuteForegroundColor(const winrt::SwipeItem& swipeItem)
01314 {
01315     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01316
01317     if (m_swipeContentStackPanel.get().Children().Size() > 0)
01318     {
01319         if (auto appBarButton = m_swipeContentStackPanel.get().Children().GetAt(0).as<winrt::AppBarButton>())
01320         {
01321             winrt::Brush foreground = nullptr;
01322
01323             if (!m_thresholdReached)
01324             {
01325                 if (auto lookedUpForegroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPreThresholdForegroundResourceName))
01326                 {
01327                     foreground = lookedUpForegroundBrush.try_as<winrt::Brush>();
01328                 }
01329             }
01330             else
01331             {
01332                 if (auto lookedUpForegroundBrush = SharedHelpers::FindInApplicationResources(s_executeSwipeItemPostThresholdForegroundResourceName))
01333                 {
01334                     foreground = lookedUpForegroundBrush.try_as<winrt::Brush>();
01335                 }
01336             }
01337
01338             if (swipeItem && swipeItem.Foreground())
01339             {
01340                 foreground = swipeItem.Foreground();
01341             }
01342
01343             appBarButton.Foreground(foreground);
01344             appBarButton.Background(winrt::SolidColorBrush(winrt::Colors::Transparent()));
01345         }
01346     }
01347 }
01348
01349 void SwipeControl::UpdateColorsIfRevealItems()
01350 {
01351     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01352
01353     if (m_currentItems.get().Mode() != winrt::SwipeMode::Reveal)
01354     {
01355         return;
01356     }
01357
01358     winrt::Brush rootGridBackground = nullptr;
01359
01360     if (auto lookedUpBrush = SharedHelpers::FindInApplicationResources(s_swipeItemBackgroundResourceName))
01361     {
01362         rootGridBackground = lookedUpBrush.try_as<winrt::Brush>();
01363     }
01364     if (m_currentItems.get().Size() > 0)
01365     {
01366         switch (m_createdContent)
01367         {
01368         case CreatedContent::Left:
01369         case CreatedContent::Top:
01370         {
01371             auto itemBackground = m_currentItems.get().GetAt(m_swipeContentStackPanel.get().Children().Size() - 1).Background();
01372             if (itemBackground != nullptr)
01373             {
01374                 rootGridBackground = itemBackground;
01375             }
01376             break;
01377         }
01378         case CreatedContent::Right:
01379         case CreatedContent::Bottom:
01380         {
01381             auto itemBackground = m_currentItems.get().GetAt(0).Background();
01382             if (itemBackground != nullptr)
01383             {
01384                 rootGridBackground = itemBackground;
01385             }
01386             break;
01387         }
01388         case CreatedContent::None:
01389         {
01390             break;
01391         }
01392         default:
01393             assert(false);
01394             break;
01395         }
01396     }
01397
01398     m_swipeContentRoot.get().Background(rootGridBackground);
01399     m_swipeContentStackPanel.get().Background(nullptr);
01400 }
01401
01402 void SwipeControl::OnLeftItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args)
01403 {
01404     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01405
01406     ThrowIfHasVerticalAndHorizontalContent();
01407     if (m_interactionTracker)
01408     {
01409         m_interactionTracker.get().Properties().InsertBoolean(s_hasLeftContentPropertyName, sender.Size() > 0);
01410     }
01411
01412     if (m_createdContent == CreatedContent::Left)
01413     {
01414         CreateLeftContent();
01415     }
01416 }
01417
01418 void SwipeControl::OnRightItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args)
01419 {
01420     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01421
01422     ThrowIfHasVerticalAndHorizontalContent();
01423
01424     if (m_interactionTracker)
01425     {
01426         m_interactionTracker.get().Properties().InsertBoolean(s_hasRightContentPropertyName, sender.Size() > 0);
01427     }
01428
01429     if (m_createdContent == CreatedContent::Right)
01430     {
01431         CreateRightContent();
01432     }
01433 }
01434
01435 void SwipeControl::OnTopItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args)
01436 {
01437     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01438
01439     ThrowIfHasVerticalAndHorizontalContent();
01440     if (m_interactionTracker)
01441     {
01442         m_interactionTracker.get().Properties().InsertBoolean(s_hasTopContentPropertyName, sender.Size() > 0);
01443     }
01444
01445     if (m_createdContent == CreatedContent::Top)
01446     {
01447         CreateTopContent();
01448     }
01449 }
01450
01451 void SwipeControl::OnBottomItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args)
01452 {
01453     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01454
01455     ThrowIfHasVerticalAndHorizontalContent();
01456     if (m_interactionTracker)
01457     {
01458         m_interactionTracker.get().Properties().InsertBoolean(s_hasBottomContentPropertyName, sender.Size() > 0);
01459     }
01460
01461     if (m_createdContent == CreatedContent::Bottom)
01462     {
01463         CreateBottomContent();
01464     }
01465 }
01466
01467 void SwipeControl::TryGetSwipeVisuals()
01468 {
01469     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01470
01471     if (IsTranslationFacadeAvailableForSwipeControl(m_content.get()))
01472     {
01473         m_swipeAnimation.get().Target(GetAnimationTarget(m_content.get()));
01474         m_content.get().StartAnimation(m_swipeAnimation.get());
01475     }
01476     else
01477     {
01478         auto mainContentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_content.get());
01479         if (mainContentVisual && m_mainContentVisual.get() != mainContentVisual)
01480         {
01481             m_mainContentVisual.set(mainContentVisual);
01482
01483             winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_content.get(), true);
01484             mainContentVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });
01485
01486             mainContentVisual.StartAnimation(GetAnimationTarget(m_content.get()), m_swipeAnimation.get());
01487
01488             m_executeExpressionAnimation.get().SetReferenceParameter(s_foregroundVisualPropertyName, mainContentVisual);
01489         }
01490     }
01491
01492     if (IsTranslationFacadeAvailableForSwipeControl(m_swipeContentStackPanel.get()))
01493     {
01494         m_swipeAnimation.get().Target(GetAnimationTarget(m_swipeContentStackPanel.get()));
01495     }
01496     else
01497     {
01498         auto swipeContentVisual = winrt::ElementCompositionPreview::GetElementVisual(m_swipeContentStackPanel.get());
01499         if (swipeContentVisual && m_swipeContentVisual.get() != swipeContentVisual)
01500         {
01501             m_swipeContentVisual.set(swipeContentVisual);
01502
01503             winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_swipeContentStackPanel.get(), true);
01504             swipeContentVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });
01505
01506             ConfigurePositionInertiaRestingValues();
01507         }
01508     }
01509
01510     auto swipeContentRootVisual = winrt::ElementCompositionPreview::GetElementVisual(m_swipeContentRoot.get());
01511     if (swipeContentRootVisual && m_swipeContentRootVisual.get() != swipeContentRootVisual)
01512     {
01513         m_swipeContentRootVisual.set(swipeContentRootVisual);
01514         m_clipExpressionAnimation.get().SetReferenceParameter(s_swipeRootVisualPropertyName, swipeContentRootVisual);
01515         if (m_insetClip)
01516         {
01517             swipeContentRootVisual.Clip(m_insetClip.get());
01518         }
01519     }
01520 }
01521
01522 void SwipeControl::UpdateIsOpen(bool isOpen)
01523 {
01524     SWIPECONTROL_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
01525
01526     if (isOpen)
01527     {
01528         if (!m_isOpen)
01529         {
01530             m_isOpen = true;
01531             m_lastActionWasOpening = true;
01532             switch (m_createdContent)
01533             {
01534             case CreatedContent::Right:
01535             case CreatedContent::Bottom:
01536                 m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, true);
01537                 m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);
01538                 break;
01539             case CreatedContent::Left:
01540             case CreatedContent::Top:
01541                 m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
01542                 m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, true);
01543                 break;
01544             case CreatedContent::None:
01545                 m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
01546                 m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);
01547                 break;
01548             default:
01549                 assert(false);
01550             }
01551
01552             if (m_currentItems.get().Mode() != winrt::SwipeMode::Execute)
01553             {
01554                 AttachDismissingHandlers();
01555             }
01556
01557             if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
01558             {
01559                 globalTestHooks->NotifyOpenedStatusChanged(*this);
01560             }
01561         }
01562     }
01563     else
01564     {
01565         if (m_isOpen)
01566         {
01567             m_isOpen = false;
01568             m_lastActionWasClosing = true;
01569             DetachDismissingHandlers();
01570             m_interactionTracker.get().Properties().InsertBoolean(s_isFarOpenPropertyName, false);
01571             m_interactionTracker.get().Properties().InsertBoolean(s_isNearOpenPropertyName, false);
01572
01573             if (auto globalTestHooks = SwipeTestHooks::GetGlobalTestHooks())
01574             {
01575                 globalTestHooks->NotifyOpenedStatusChanged(*this);
01576             }
01577         }
01578     }
01579 }
01580
01581 void SwipeControl::UpdateThresholdReached(float value)
01582 {
01583     SWIPECONTROL_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
01584
01585     const bool oldValue = m_thresholdReached;
01586     const float effectiveStackPanelSize = static_cast<float>((m_isHorizontal ? m_swipeContentStackPanel.get().ActualWidth() : m_swipeContentStackPanel.get().ActualHeight()) - 1);
01587     if (!m_isOpen || m_lastActionWasOpening)
01588     {
01589         //If we are opening new swipe items then we need to scroll open c_ThresholdValue
01590         m_thresholdReached = abs(value) > std::min(effectiveStackPanelSize, c_ThresholdValue);
01591     }
01592     else
01593     {
01594         //If we already have an open swipe item then swiping it closed by any amount will close it.
01595         m_thresholdReached = abs(value) < effectiveStackPanelSize;
01596     }
01597     if (m_thresholdReached != oldValue)
01598     {
01599         UpdateColorsIfExecuteItem();
01600     }
01601 }
01602
01603 void SwipeControl::ThrowIfHasVerticalAndHorizontalContent(bool setIsHorizontal)
01604 {
01605     bool hasLeftContent = LeftItems() && LeftItems().Size() > 0;
01606     bool hasRightContent = RightItems() && RightItems().Size() > 0;
01607     bool hasTopContent = TopItems() && TopItems().Size() > 0;
01608     bool hasBottomContent = BottomItems() && BottomItems().Size() > 0;
01609     if (setIsHorizontal)
01610     {
01611         m_isHorizontal = hasLeftContent || hasRightContent || !(hasTopContent || hasBottomContent);
01612     }
01613
01614     if (this->Template())
01615     {
01616         if (m_isHorizontal && (hasTopContent || hasBottomContent))
01617         {
01618             throw winrt::hresult_invalid_argument(L"This SwipeControl is horizontal and can not have vertical items.");
01619         }
01620         if (!m_isHorizontal && (hasLeftContent || hasRightContent))
01621         {
01622             throw winrt::hresult_invalid_argument(L"This SwipeControl is vertical and can not have horizontal items.");
01623         }
01624     }
01625     else
01626     {
01627         if ((hasLeftContent || hasRightContent) && (hasTopContent || hasBottomContent))
01628         {
01629             throw winrt::hresult_invalid_argument(L"SwipeControl can't have both horizontal items and vertical items set at the same time.");
01630         }
01631     }
01632 }
01633
01634 std::wstring SwipeControl::GetAnimationTarget(winrt::UIElement child)
01635 {
01636     return s_translationPropertyName.data();
01637 }
01638
01639 winrt::SwipeControl SwipeControl::GetThis()
01640 {
01641     return *this;
01642 }
01643
01644 bool SwipeControl::IsTranslationFacadeAvailableForSwipeControl(const winrt::UIElement& element)
01645 {
01646     //For now Facade's are causing more issues than they are worth for swipe control. Revist this
01647     //when we have a little more time.
01648
01649     //There are concerns about swipe consumers having taken a dependency on the ElementCompositionPreview
01650     //Api's that this is exclusive with and also the target property of the swipe expression animations
01651     //is not resolving with the use of Facade's
01652     return false;
01653     //return SharedHelpers::IsTranslationFacadeAvailable(element);
01654 }
01655
01656 wstring_view SwipeControl::DirectionToInset(const CreatedContent& createdContent)
01657 {
01658     switch (createdContent)
01659     {
01660     case CreatedContent::Right:
01661         return s_leftInsetTargetName;
01662     case CreatedContent::Left:
01663         return s_rightInsetTargetName;
01664     case CreatedContent::Bottom:
01665         return s_topInsetTargetName;
01666     case CreatedContent::Top:
01667         return s_bottomInsetTargetName;
01668     case CreatedContent::None:
01669         return L"";
01670     default:
01671         assert(false);
01672         return L"";
01673     }
01674 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarEraserButton.properties.h Source File

  • File List
  • File Members
  • Generated

InkToolBarEraserButton.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class InkToolBarEraserButtonProperties
00008 {
00009 public:
00010     InkToolBarEraserButtonProperties();
00011
00012     void ArePrecisionErasersVisible(bool value);
00013     bool ArePrecisionErasersVisible();
00014
00015     void IsClearAllVisible(bool value);
00016     bool IsClearAllVisible();
00017
00018     void IsStrokeEraserVisible(bool value);
00019     bool IsStrokeEraserVisible();
00020
00021     void SelectedEraser(winrt::InkToolBarEraserKind const& value);
00022     winrt::InkToolBarEraserKind SelectedEraser();
00023
00024     static winrt::DependencyProperty ArePrecisionErasersVisibleProperty() { return s_ArePrecisionErasersVisibleProperty; }
00025     static winrt::DependencyProperty IsClearAllVisibleProperty() { return s_IsClearAllVisibleProperty; }
00026     static winrt::DependencyProperty IsStrokeEraserVisibleProperty() { return s_IsStrokeEraserVisibleProperty; }
00027     static winrt::DependencyProperty SelectedEraserProperty() { return s_SelectedEraserProperty; }
00028
00029     static GlobalDependencyProperty s_ArePrecisionErasersVisibleProperty;
00030     static GlobalDependencyProperty s_IsClearAllVisibleProperty;
00031     static GlobalDependencyProperty s_IsStrokeEraserVisibleProperty;
00032     static GlobalDependencyProperty s_SelectedEraserProperty;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarTrace.h Source File

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsAnnotatedScrollBarTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_ANNOTATEDSCROLLBAR || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsAnnotatedScrollBarVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_ANNOTATEDSCROLLBAR || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsAnnotatedScrollBarPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_ANNOTATEDSCROLLBAR || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 AnnotatedScrollBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define ANNOTATEDSCROLLBAR_TRACE_INFO(sender, message, ...) \
00036 if (IsAnnotatedScrollBarTracingEnabled()) \
00037 { \
00038     ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (AnnotatedScrollBarTrace::s_IsDebugOutputEnabled || AnnotatedScrollBarTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     ANNOTATEDSCROLLBAR_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 AnnotatedScrollBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define ANNOTATEDSCROLLBAR_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsAnnotatedScrollBarVerboseTracingEnabled()) \
00050 { \
00051     ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (AnnotatedScrollBarTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     ANNOTATEDSCROLLBAR_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define ANNOTATEDSCROLLBAR_TRACE_PERF(info) \
00059 if (IsAnnotatedScrollBarPerfTracingEnabled()) \
00060 { \
00061     AnnotatedScrollBarTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(sender, message, ...)    ANNOTATEDSCROLLBAR_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define ANNOTATEDSCROLLBAR_TRACE_VERBOSE_DBG(sender, message, ...) ANNOTATEDSCROLLBAR_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define ANNOTATEDSCROLLBAR_TRACE_PERF_DBG(info)                    ANNOTATEDSCROLLBAR_TRACE_PERF(info)
00068 #else
00069 #define ANNOTATEDSCROLLBAR_TRACE_INFO_DBG(sender, message, ...)
00070 #define ANNOTATEDSCROLLBAR_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define ANNOTATEDSCROLLBAR_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class AnnotatedScrollBarTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[256]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "AnnotatedScrollBarInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_ANNOTATEDSCROLLBAR),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"AnnotatedScrollBar") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[256]{};
00121         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00122         {
00123             if (includeTraceLogging)
00124             {
00125                 // TraceViewers
00126                 // http://toolbox/pef
00127                 // http://fastetw/index.aspx
00128                 TraceLoggingWrite(
00129                     g_hLoggingProvider,
00130                     "AnnotatedScrollBarVerbose" /* eventName */,
00131                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00132                     TraceLoggingKeyword(KEYWORD_ANNOTATEDSCROLLBAR),
00133                     TraceLoggingWideString(buffer, "Message"));
00134             }
00135
00136             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00137             {
00138                 OutputDebugStringW(buffer);
00139             }
00140
00141             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00142
00143             if (globalTestHooks &&
00144                 (globalTestHooks->GetLoggingLevelForType(L"AnnotatedScrollBar") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00145             {
00146                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00147             }
00148         }
00149         va_end(args);
00150     }
00151
00152     static void TracePerfInfo(PCWSTR info) noexcept
00153     {
00154         // TraceViewers
00155         // http://toolbox/pef
00156         // http://fastetw/index.aspx
00157         TraceLoggingWrite(
00158             g_hPerfProvider,
00159             "AnnotatedScrollBarPerf" /* eventName */,
00160             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00161             TraceLoggingKeyword(KEYWORD_ANNOTATEDSCROLLBAR),
00162             TraceLoggingWideString(info, "Info"));
00163     }
00164 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LayoutsTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

LayoutsTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "LayoutsTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(LayoutsTestHooks)
00012 }
00013
00014 #include "LayoutsTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionTreeHelper::TreeWalkNodeInfo Member List

This is the complete list of members for SelectionTreeHelper::TreeWalkNodeInfo, including all inherited members.
Node | SelectionTreeHelper::TreeWalkNodeInfo |
ParentNode | SelectionTreeHelper::TreeWalkNodeInfo |
Path | SelectionTreeHelper::TreeWalkNodeInfo |
TreeWalkNodeInfo(std::shared_ptr< SelectionNode > node, const winrt::IndexPath &indexPath, std::shared_ptr< SelectionNode > parent) | SelectionTreeHelper::TreeWalkNodeInfo | [inline]
TreeWalkNodeInfo(std::shared_ptr< SelectionNode > node, const winrt::IndexPath &indexPath) | SelectionTreeHelper::TreeWalkNodeInfo | [inline]
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionNode.h Source File

  • File List
  • File Members
  • Repeater

SelectionNode.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "IndexRange.h"
00006
00007 class SelectionModel;
00008
00009 enum class SelectionState
00010 {
00011     Selected,
00012     NotSelected,
00013     PartiallySelected
00014 };
00015
00016 // SelectionNode in the internal tree data structure that we keep track of for selection in
00017 // a nested scenario. This would map to one ItemsSourceView/Collection. This node reacts
00018 // to collection changes and keeps the selected indices up to date.
00019 // This can either be a leaf node or a non leaf node.
00020 class SelectionNode final: public std::enable_shared_from_this<SelectionNode>
00021 {
00022 public:
00023     SelectionNode(SelectionModel* manager, SelectionNode* parent);
00024     ~SelectionNode();
00025
00026     winrt::IInspectable Source();
00027     void Source(const winrt::IInspectable& value);
00028
00029     winrt::ItemsSourceView ItemsSourceView();
00030     int DataCount();
00031     int ChildrenNodeCount();
00032     int RealizedChildrenNodeCount();
00033     int AnchorIndex();
00034     void AnchorIndex(int value);
00035     std::shared_ptr<SelectionNode> GetAt(int index, bool realizeChild);
00036
00037     int SelectedCount();
00038     winrt::IReference<bool> IsSelectedWithPartial();
00039     winrt::IReference<bool> IsSelectedWithPartial(int index);
00040     bool IsSelected(int index);
00041     int SelectedIndex();
00042     void SelectedIndex(int value);
00043     std::vector<int> SelectedIndices();
00044     bool Select(int index, bool select);
00045     bool ToggleSelect(int index);
00046     void SelectAll();
00047     void Clear();
00048     bool SelectRange(const IndexRange& range, bool select);
00049     SelectionState EvaluateIsSelectedBasedOnChildrenNodes();
00050     static winrt::IReference<bool> ConvertToNullableBool(SelectionState isSelected);
00051     winrt::IndexPath IndexPath();
00052
00053 private:
00054     void HookupCollectionChangedHandler();
00055     void UnhookCollectionChangedHandler();
00056     bool IsValidIndex(int index);
00057     void AddRange(const IndexRange& addRange, bool raiseOnSelectionChanged);
00058     void RemoveRange(const IndexRange& removeRange, bool raiseOnSelectionChanged);
00059     void ClearSelection();
00060     bool Select(int index, bool select, bool raiseOnSelectionChanged);
00061     void OnSourceListChanged(const winrt::IInspectable& dataSource, const winrt::NotifyCollectionChangedEventArgs& args);
00062     bool OnItemsAdded(int index, int count);
00063     bool OnItemsRemoved(int index, int count);
00064     void OnSelectionChanged();
00065
00066     SelectionModel* m_manager;
00067
00068     // Note that a node can contain children who are leaf as well as
00069     // chlidren containing leaf entries.
00070
00071     // For inner nodes (any node whose children are data sources)
00072     std::vector<std::shared_ptr<SelectionNode>> m_childrenNodes;
00073     // Don't take a ref.
00074     SelectionNode* m_parent { nullptr };
00075
00076     // For parents of leaf nodes (any node whose children are not data sources)
00077     std::vector<IndexRange> m_selected;
00078
00079     tracker_ref<winrt::IInspectable> m_source;
00080     tracker_ref<winrt::ItemsSourceView> m_dataSource;
00081     winrt::ItemsSourceView::CollectionChanged_revoker m_itemsSourceViewChanged{};
00082
00083     int m_selectedCount{ 0 };
00084     std::vector<int> m_selectedIndicesCached;
00085     bool m_selectedIndicesCacheIsValid = false;
00086     int m_anchorIndex{ -1 };
00087     int m_realizedChildrenNodeCount{ 0 };
00088 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTests Member List

This is the complete list of members for TabViewTests, including all inherited members.
_primaryWindowCondition | TabViewTests | [private, static]
_secondaryWindowCondition | TabViewTests | [private, static]
_tabCondition | TabViewTests | [private, static]
_tabViewCondition | TabViewTests | [private, static]
AddButtonTest() | TabViewTests | [inline]
AddRemoveTest() | TabViewTests | [inline]
AreScrollButtonsVisible() | TabViewTests | [inline, private]
CanReorderTabsWithTabTearOutWithDataItems() | TabViewTests | [inline]
CanReorderTabsWithTabTearOutWithoutDataItems() | TabViewTests | [inline]
CanSelectTabsWithTabTearOutWithDataItems() | TabViewTests | [inline]
CanSelectTabsWithTabTearOutWithoutDataItems() | TabViewTests | [inline]
CanTearOutAndRejoinTabsWithDataItems() | TabViewTests | [inline]
CanTearOutAndRejoinTabsWithoutDataItems() | TabViewTests | [inline]
ClassInitialize(TestContext testContext) | TabViewTests | [inline, static]
CloseButtonDoesNotShowWhenVisibilityIsToggled() | TabViewTests | [inline]
CloseButtonOverlayModeTests() | TabViewTests | [inline]
ClosePrimaryWindow(TestSetupHelper setup) | TabViewTests | [inline, private, static]
CloseSelectionTest() | TabViewTests | [inline]
DragBetweenTabViewsTest() | TabViewTests | [inline]
DragOutsideTest() | TabViewTests | [inline]
EnumerateChildren(UIObject root) | TabViewTests | [inline, private]
FindCloseButton(UIObject tabItem) | TabViewTests | [inline, private]
GamePadTest() | TabViewTests | [inline]
GetPrimaryWindow() | TabViewTests | [inline, private, static]
GetTabsFromTabView(Tab tabView) | TabViewTests | [inline, private, static]
GetTabViewFromWindow(Window window) | TabViewTests | [inline, private, static]
GetTabViewTearOutAppWindows() | TabViewTests | [inline, private, static]
HandleItemCloseRequestedTest() | TabViewTests | [inline]
IsClosableTest() | TabViewTests | [inline]
IsScrollDecreaseButtonEnabled() | TabViewTests | [inline, private]
IsScrollIncreaseButtonEnabled() | TabViewTests | [inline, private]
ItemChangedEventOnDragTest() | TabViewTests | [inline]
KeyboardTest() | TabViewTests | [inline]
PressButtonAndVerifyText(String buttonName, String textBlockName, String expectedText) | TabViewTests | [inline, private]
ReorderItemsTest() | TabViewTests | [inline]
ScrollButtonToolTipTest() | TabViewTests | [inline]
SelectionTest() | TabViewTests | [inline]
SizingTest() | TabViewTests | [inline]
TabSizeAndScrollButtonsTest() | TabViewTests | [inline]
TestCleanup() | TabViewTests | [inline]
ToolTipDefaultTest() | TabViewTests | [inline]
ToolTipUpdateTest() | TabViewTests | [inline]
TouchSelectionTest() | TabViewTests | [inline]
VerifyAxeScanPasses() | TabViewTests | [inline]
VerifyDragStartedCalledOnItemDrag() | TabViewTests | [inline]
VerifyHeaderSizeWhenClosingLastTab() | TabViewTests | [inline]
VerifyRightClickDoesNotSelectTab() | TabViewTests | [inline]
VerifyScrollRepeatButtons() | TabViewTests | [inline]
VerifySizingBehaviorModifyingCollectionRemovingLastItem() | TabViewTests | [inline]
VerifySizingBehaviorModifyingCollectionRemovingSecondItem() | TabViewTests | [inline]
VerifySizingBehaviorOnTabCloseComingFromCtrlF4() | TabViewTests | [inline]
VerifySizingBehaviorOnTabCloseComingFromNonScroll() | TabViewTests | [inline]
VerifySizingBehaviorOnTabCloseComingFromScroll() | TabViewTests | [inline]
VerifySpaceAllocatedWhenDraggingFromOutsideTabView() | TabViewTests | [inline]
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedVisualPlayerAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedVisualPlayerAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedVisualPlayerAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(AnimatedVisualPlayerAutomationPeer)
00012 }
00013
00014 #include "AnimatedVisualPlayerAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollingScrollOptions.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollingScrollOptions.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollingScrollOptions.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollingScrollOptions)
00012 }
00013
00014 #include "ScrollingScrollOptions.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemBase.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationViewItemBase.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationViewItemBase.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(NavigationViewItemBase)
00012 }
00013
00014 #include "NavigationViewItemBase.g.cpp"
00015
00016 GlobalDependencyProperty NavigationViewItemBaseProperties::s_IsSelectedProperty{ nullptr };
00017
00018 NavigationViewItemBaseProperties::NavigationViewItemBaseProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void NavigationViewItemBaseProperties::EnsureProperties()
00024 {
00025     if (!s_IsSelectedProperty)
00026     {
00027         s_IsSelectedProperty =
00028             InitializeDependencyProperty(
00029                 L"IsSelected",
00030                 winrt::name_of<bool>(),
00031                 winrt::name_of<winrt::NavigationViewItemBase>(),
00032                 false /* isAttached */,
00033                 ValueHelper<bool>::BoxedDefaultValue(),
00034                 winrt::PropertyChangedCallback(&OnIsSelectedPropertyChanged));
00035     }
00036 }
00037
00038 void NavigationViewItemBaseProperties::ClearProperties()
00039 {
00040     s_IsSelectedProperty = nullptr;
00041 }
00042
00043 void NavigationViewItemBaseProperties::OnIsSelectedPropertyChanged(
00044     winrt::DependencyObject const& sender,
00045     winrt::DependencyPropertyChangedEventArgs const& args)
00046 {
00047     auto owner = sender.as<winrt::NavigationViewItemBase>();
00048     winrt::get_self<NavigationViewItemBase>(owner)->OnPropertyChanged(args);
00049 }
00050
00051 void NavigationViewItemBaseProperties::IsSelected(bool value)
00052 {
00053     [[gsl::suppress(con)]]
00054     {
00055     static_cast<NavigationViewItemBase*>(this)->SetValue(s_IsSelectedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00056     }
00057 }
00058
00059 bool NavigationViewItemBaseProperties::IsSelected()
00060 {
00061     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewItemBase*>(this)->GetValue(s_IsSelectedProperty));
00062 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.g.h"
00007
00008 class LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs :
00009     public winrt::implementation::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgsT<LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs>
00010 {
00011 public:
00012     LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs(
00013         winrt::LinedFlowLayoutInvalidationTrigger const& invalidationTrigger);
00014
00015     // ILayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs overrides
00016     winrt::LinedFlowLayoutInvalidationTrigger InvalidationTrigger();
00017
00018 private:
00019     winrt::LinedFlowLayoutInvalidationTrigger m_invalidationTrigger;
00020 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBar.h Source File

  • File List
  • File Members
  • SelectorBar

SelectorBar.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include "SelectorBarTrace.h"
00009 #include "SelectorBar.g.h"
00010 #include "SelectorBar.properties.h"
00011
00012 class SelectorBar :
00013     public ReferenceTracker<SelectorBar, winrt::implementation::SelectorBarT>,
00014     public SelectorBarProperties
00015 {
00016
00017 public:
00018     SelectorBar();
00019     ~SelectorBar();
00020
00021     // Invoked by SelectorBarTestHooks
00022     winrt::ItemsView GetItemsViewPart() const;
00023
00024     // IFrameworkElement
00025     void OnApplyTemplate();
00026
00027     // IControlOverrides
00028     void OnGotFocus(
00029         const winrt::RoutedEventArgs& args);
00030
00031     void OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00032
00033 private:
00034     void OnItemsViewSelectedItemPropertyChanged(
00035         const winrt::DependencyObject& sender,
00036         const winrt::DependencyProperty& args);
00037
00038     void OnLoaded(
00039         const winrt::IInspectable& sender,
00040         const winrt::RoutedEventArgs& args);
00041
00042     void RaiseSelectionChanged();
00043     void SelectFirstFocusableItem();
00044     void UpdateItemsViewSelectionFromSelectedItem();
00045     void UpdateSelectedItemFromItemsView();
00046     void ValidateSelectedItem();
00047
00048     tracker_ref<winrt::ItemsView> m_itemsView{ this };
00049
00050     winrt::FrameworkElement::Loaded_revoker m_loadedRevoker{};
00051
00052     PropertyChanged_revoker m_itemsViewSelectedItemPropertyChangedRevoker{};
00053
00054     static constexpr std::wstring_view s_itemsViewPartName{ L"PART_ItemsView"sv };
00055 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewBringIntoViewOperation Member List

This is the complete list of members for ScrollViewBringIntoViewOperation, including all inherited members.
HasMaxTicksCount() const | ScrollViewBringIntoViewOperation |
m_cancelBringIntoView | ScrollViewBringIntoViewOperation | [private]
m_targetElement | ScrollViewBringIntoViewOperation | [private]
ScrollViewBringIntoViewOperation(winrt::UIElement const &targetElement, bool cancelBringIntoView) | ScrollViewBringIntoViewOperation |
ShouldCancelBringIntoView() | ScrollViewBringIntoViewOperation | [inline]
TargetElement() const | ScrollViewBringIntoViewOperation |
TickOperation() | ScrollViewBringIntoViewOperation |
TicksCount() const | ScrollViewBringIntoViewOperation |
~ScrollViewBringIntoViewOperation() | ScrollViewBringIntoViewOperation |
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

StackLayoutState Member List

This is the complete list of members for StackLayoutState, including all inherited members.
abi_enter() | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
BufferSize | StackLayoutState | [private, static]
CheckThread() | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< StackLayoutState > &&self) noexcept | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
final_release(std::unique_ptr< StackLayoutState > &&self) | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline, static]
FlowAlgorithm() | StackLayoutState | [inline]
GetBase() | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
GetInner() | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
InitializeForContext(const winrt::VirtualizingLayoutContext &context, IFlowLayoutAlgorithmDelegates *callbacks) | StackLayoutState |
IsOnThread() | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
MaxArrangeBounds() const | StackLayoutState | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
OnElementMeasured(int elementIndex, double majorSize, double minorSize) | StackLayoutState |
OnMeasureStart() | StackLayoutState |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< StackLayoutState, winrt::implementation::StackLayoutStateT, winrt::composing > | [inline]
TotalElementSize() const | StackLayoutState | [inline]
TotalElementsMeasured() const | StackLayoutState | [inline]
UninitializeForContext(const winrt::VirtualizingLayoutContext &context) | StackLayoutState |
Generated on Sun Dec 1 2024 20:53:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/InfoBadge.cpp Source File

  • File List
  • File Members
  • InfoBadge

InfoBadge.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "InfoBadge.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009
00010 static constexpr wstring_view c_IconPresenterName{ L"IconPresenter"sv };
00011
00012 InfoBadge::InfoBadge()
00013 {
00014     __RP_Marker_ClassById(RuntimeProfiler::ProfId_InfoBadge);
00015
00016     SetDefaultStyleKey(this);
00017
00018     SetValue(s_TemplateSettingsProperty, winrt::make<::InfoBadgeTemplateSettings>());
00019     SizeChanged({ this, &InfoBadge::OnSizeChanged });
00020 }
00021
00022 void InfoBadge::OnApplyTemplate()
00023 {
00024     winrt::IControlProtected controlProtected{ *this };
00025
00026     OnDisplayKindPropertiesChanged();
00027 }
00028
00029 winrt::Size InfoBadge::MeasureOverride(winrt::Size const& availableSize)
00030 {
00031     auto const defaultDesiredSize = __super::MeasureOverride(availableSize);
00032     if (defaultDesiredSize.Width < defaultDesiredSize.Height)
00033     {
00034         return { defaultDesiredSize.Height, defaultDesiredSize.Height };
00035     }
00036     return defaultDesiredSize;
00037 }
00038
00039 void InfoBadge::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00040 {
00041     auto const property = args.Property();
00042     winrt::Control const thisAsControl = *this;
00043
00044     if (property == winrt::InfoBadge::ValueProperty())
00045     {
00046         if (Value() < -1)
00047         {
00048             throw winrt::hresult_out_of_bounds(L"Value must be equal to or greater than -1");
00049         }
00050     }
00051
00052     if (property == winrt::InfoBadge::ValueProperty() ||
00053              property == winrt::InfoBadge::IconSourceProperty())
00054     {
00055         OnDisplayKindPropertiesChanged();
00056     }
00057 }
00058
00059 void InfoBadge::OnDisplayKindPropertiesChanged()
00060 {
00061     winrt::Control const thisAsControl = *this;
00062     if (Value() >= 0)
00063     {
00064         winrt::VisualStateManager::GoToState(thisAsControl, L"Value", true);
00065     }
00066     else if (auto const iconSource = IconSource())
00067     {
00068         TemplateSettings().IconElement(SharedHelpers::MakeIconElementFrom(iconSource));
00069
00070         if (auto const fontIconSource = iconSource.try_as<winrt::FontIconSource>())
00071         {
00072             winrt::VisualStateManager::GoToState(thisAsControl, L"FontIcon", true);
00073         }
00074         else
00075         {
00076             winrt::VisualStateManager::GoToState(thisAsControl, L"Icon", true);
00077         }
00078     }
00079     else
00080     {
00081         winrt::VisualStateManager::GoToState(thisAsControl, L"Dot", true);
00082     }
00083 }
00084
00085
00086 void InfoBadge::OnSizeChanged(const winrt::IInspectable&, const winrt::SizeChangedEventArgs& args)
00087 {
00088     auto const value = [this]()
00089     {
00090         auto const cornerRadiusValue = ActualHeight() / 2;
00091         if (ReadLocalValue(winrt::Control::CornerRadiusProperty()) == winrt::DependencyProperty::UnsetValue())
00092         {
00093             return winrt::CornerRadius{ cornerRadiusValue, cornerRadiusValue, cornerRadiusValue, cornerRadiusValue };
00094         }
00095         else
00096         {
00097             return CornerRadius();
00098         }
00099         return winrt::CornerRadius{ cornerRadiusValue, cornerRadiusValue, cornerRadiusValue, cornerRadiusValue };
00100     }();
00101
00102     TemplateSettings().InfoBadgeCornerRadius(value);
00103 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/NavigationViewCustomMenuItemPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • CustomResources

NavigationViewCustomMenuItemPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Automation;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Navigation;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     public sealed partial class NavigationViewCustomMenuItemPage : TestPage
00016     {
00017         public NavigationViewCustomMenuItemPage()
00018         {
00019             this.InitializeComponent();
00020             NavView.SelectedItem = nvi1;
00021         }
00022     }
00023 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InspectingDataSource Member List

This is the complete list of members for InspectingDataSource, including all inherited members.
GetAtCore(int index) override | InspectingDataSource |
GetSizeCore() override | InspectingDataSource |
HasKeyIndexMappingCore() override | InspectingDataSource |
IndexFromKeyCore(winrt::hstring const &id) override | InspectingDataSource |
IndexOfCore(winrt::IInspectable const &value) | InspectingDataSource |
KeyFromIndexCore(int index) override | InspectingDataSource |
ListenToCollectionChanges() | InspectingDataSource | [private]
OnBindableVectorChanged(const winrt::IBindableObservableVector &sender, const winrt::IInspectable &e) | InspectingDataSource | [private]
OnCollectionChanged(const winrt::IInspectable &sender, const winrt::NotifyCollectionChangedEventArgs &e) | InspectingDataSource | [private]
OnVectorChanged(const winrt::Collections::IObservableVector< winrt::IInspectable > &sender, const winrt::Collections::IVectorChangedEventArgs &e) | InspectingDataSource | [private]
UnListenToCollectionChanges() | InspectingDataSource | [private]
WrapIterable(const winrt::Collections::IIterable< winrt::IInspectable > &iterable) | InspectingDataSource | [private]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooks.idl Source File

  • File List
  • File Members
  • Repeater

RepeaterTestHooks.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 [default_interface]
00007 runtimeclass RepeaterTestHooks
00008 {
00009     static event Windows.Foundation.TypedEventHandler<Object, Object> BuildTreeCompleted;
00010
00011     static String GetLayoutId(Object layout);
00012     static void SetLayoutId(Object layout, String id);
00013
00014     static Int32 GetElementFactoryElementIndex();
00015     static void SetElementFactoryElementIndex(Int32 index);
00016
00017     static Int32 GetLogItemIndex();
00018     static void SetLogItemIndex(Int32 logItemIndex);
00019 }
00020
00021 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBar.idl Source File

  • File List
  • File Members
  • TitleBar

TitleBar.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PREVIEW]
00005 [webhosthidden]
00006 [contentproperty("Content")]
00007 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00008 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00009 unsealed runtimeclass TitleBar : Microsoft.UI.Xaml.Controls.Control
00010 {
00011     TitleBar();
00012
00013     Object Header{ get; set; };
00014
00015     Microsoft.UI.Xaml.Controls.IconSource IconSource{ get; set; };
00016
00017     String Title{ get; set; };
00018
00019     String Subtitle{ get; set; };
00020
00021     Object Content{ get; set; };
00022
00023     Object Footer{ get; set; };
00024
00025     [MUX_DEFAULT_VALUE("false")]
00026     Boolean IsBackButtonVisible{ get; set; };
00027
00028     [MUX_DEFAULT_VALUE("true")]
00029     Boolean IsBackEnabled{ get; set; };
00030
00031     [MUX_DEFAULT_VALUE("false")]
00032     Boolean IsPaneToggleButtonVisible{ get; set; };
00033
00034     TitleBarTemplateSettings TemplateSettings{ get; };
00035
00036     event Windows.Foundation.TypedEventHandler<TitleBar, Object> BackRequested;
00037     event Windows.Foundation.TypedEventHandler<TitleBar, Object> PaneToggleRequested;
00038
00039     static Microsoft.UI.Xaml.DependencyProperty HeaderProperty{ get; };
00040     static Microsoft.UI.Xaml.DependencyProperty IconSourceProperty{ get; };
00041     static Microsoft.UI.Xaml.DependencyProperty TitleProperty{ get; };
00042     static Microsoft.UI.Xaml.DependencyProperty SubtitleProperty{ get; };
00043     static Microsoft.UI.Xaml.DependencyProperty ContentProperty{ get; };
00044     static Microsoft.UI.Xaml.DependencyProperty FooterProperty{ get; };
00045     static Microsoft.UI.Xaml.DependencyProperty IsBackButtonVisibleProperty{ get; };
00046     static Microsoft.UI.Xaml.DependencyProperty IsBackEnabledProperty{ get; };
00047     static Microsoft.UI.Xaml.DependencyProperty IsPaneToggleButtonVisibleProperty{ get; };
00048
00049     static Microsoft.UI.Xaml.DependencyProperty TemplateSettingsProperty{ get; };
00050 }
00051
00052 [MUX_PREVIEW]
00053 [webhosthidden]
00054 unsealed runtimeclass TitleBarTemplateSettings : Microsoft.UI.Xaml.DependencyObject
00055 {
00056     TitleBarTemplateSettings();
00057
00058     Microsoft.UI.Xaml.Controls.IconElement IconElement;
00059
00060     static Microsoft.UI.Xaml.DependencyProperty IconElementProperty{ get; };
00061 }
00062
00063 [MUX_PREVIEW]
00064 [webhosthidden]
00065 unsealed runtimeclass TitleBarAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00066 {
00067     TitleBarAutomationPeer(MU_XC_NAMESPACE.TitleBar owner);
00068 }
00069
00070 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderAutomationPeer Member List

This is the complete list of members for ExpanderAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
Collapse() | ExpanderAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< ExpanderAutomationPeer > &&self) noexcept | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
Expand() | ExpanderAutomationPeer |
ExpandCollapseState() | ExpanderAutomationPeer |
ExpanderAutomationPeer(winrt::Expander const &owner) | ExpanderAutomationPeer |
final_release(std::unique_ptr< ExpanderAutomationPeer > &&self) | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | ExpanderAutomationPeer |
GetBase() | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
GetChildrenCore() | ExpanderAutomationPeer |
GetClassNameCore() | ExpanderAutomationPeer |
GetExpanderToggleButtonPeer() | ExpanderAutomationPeer | [private]
GetImpl() | ExpanderAutomationPeer | [private]
GetInner() | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
GetNameCore() | ExpanderAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | ExpanderAutomationPeer |
GetPeerFromPointCore(winrt::Point point) | ExpanderAutomationPeer |
HasKeyboardFocusCore() | ExpanderAutomationPeer |
IsKeyboardFocusableCore() | ExpanderAutomationPeer |
IsOnThread() | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState newState) | ExpanderAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< ExpanderAutomationPeer, winrt::implementation::ExpanderAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshInfoProviderImpl Member List

This is the complete list of members for RefreshInfoProviderImpl, including all inherited members.
abi_enter() | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
AreClose(double interactionRatio, double target) | RefreshInfoProviderImpl |
CheckThread() | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
CompositionProperties() | RefreshInfoProviderImpl |
CustomAnimationStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs &args) | RefreshInfoProviderImpl |
DeleteInstanceOnUIThread(std::unique_ptr< RefreshInfoProviderImpl > &&self) noexcept | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
ExecutionRatio() | RefreshInfoProviderImpl |
final_release(std::unique_ptr< RefreshInfoProviderImpl > &&self) | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline, static]
GetBase() | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
GetInner() | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
IdleStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerIdleStateEnteredArgs &args) | RefreshInfoProviderImpl |
InertiaStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInertiaStateEnteredArgs &args) | RefreshInfoProviderImpl |
InteractingStateEntered(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerInteractingStateEnteredArgs &args) | RefreshInfoProviderImpl |
InteractionRatioChanged(const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::RefreshInteractionRatioChangedEventArgs > &handler) | RefreshInfoProviderImpl |
InteractionRatioChanged(const winrt::event_token &token) | RefreshInfoProviderImpl |
InteractionRatioCompositionProperty() | RefreshInfoProviderImpl |
IsInteractingForRefresh() | RefreshInfoProviderImpl |
IsInteractingForRefreshChanged(const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > &handler) | RefreshInfoProviderImpl |
IsInteractingForRefreshChanged(const winrt::event_token &token) | RefreshInfoProviderImpl |
IsOnThread() | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
m_interactionRatioCompositionProperty | RefreshInfoProviderImpl | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
OnRefreshCompleted() | RefreshInfoProviderImpl |
OnRefreshStarted() | RefreshInfoProviderImpl |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
RaiseInteractionRatioChanged(double interactionRatio) | RefreshInfoProviderImpl |
RaiseIsInteractingForRefreshChanged() | RefreshInfoProviderImpl |
RaiseRefreshCompleted() | RefreshInfoProviderImpl |
RaiseRefreshStarted() | RefreshInfoProviderImpl |
ReferenceTracker(Args &&...args) | ReferenceTracker< RefreshInfoProviderImpl, reference_tracker_implements_t< winrt::IRefreshInfoProvider >::type, winrt::IInteractionTrackerOwner > | [inline]
RefreshCompleted(const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > &handler) | RefreshInfoProviderImpl |
RefreshCompleted(const winrt::event_token &token) | RefreshInfoProviderImpl |
RefreshInfoProviderImpl() | RefreshInfoProviderImpl |
RefreshInfoProviderImpl(const winrt::RefreshPullDirection &refreshPullDirection, const winrt::Size &refreshVisualizerSize, const winrt::Compositor &compositor) | RefreshInfoProviderImpl |
RefreshStarted(const winrt::TypedEventHandler< winrt::IRefreshInfoProvider, winrt::IInspectable > &handler) | RefreshInfoProviderImpl |
RefreshStarted(const winrt::event_token &token) | RefreshInfoProviderImpl |
RequestIgnored(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerRequestIgnoredArgs &args) | RefreshInfoProviderImpl |
SetPeekingMode(bool peeking) | RefreshInfoProviderImpl |
UpdateIsInteractingForRefresh(bool value) | RefreshInfoProviderImpl |
ValuesChanged(const winrt::InteractionTracker &sender, const winrt::InteractionTrackerValuesChangedArgs &args) | RefreshInfoProviderImpl |
~RefreshInfoProviderImpl() | RefreshInfoProviderImpl |
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarCustomToolButton.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarCustomToolButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarCustomToolButton.g.h"
00011 #include "InkToolBarCustomToolButton.properties.h"
00012
00013 #include "InkToolBarToolButton.h"
00014
00015 class InkToolBarCustomToolButton :
00016     public winrt::implementation::InkToolBarCustomToolButtonT<InkToolBarCustomToolButton, InkToolBarToolButton>,
00017     public InkToolBarCustomToolButtonProperties
00018 {
00019 public:
00020     ForwardRefToBaseReferenceTracker(InkToolBarToolButton)
00021
00022     // These functions are ambiguous with InkToolBarToolButton, disambiguate
00023     using InkToolBarCustomToolButtonProperties::EnsureProperties;
00024     using InkToolBarCustomToolButtonProperties::ClearProperties;
00025
00026     winrt::UIElement ConfigurationContent() { winrt::throw_hresult(E_NOTIMPL); }
00027     void ConfigurationContent(winrt::UIElement value) { winrt::throw_hresult(E_NOTIMPL); }
00028 };
00029
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarMenuButtonProperties Member List

This is the complete list of members for InkToolBarMenuButtonProperties, including all inherited members.
ClearProperties() | InkToolBarMenuButtonProperties | [static]
EnsureProperties() | InkToolBarMenuButtonProperties | [static]
InkToolBarMenuButtonProperties() | InkToolBarMenuButtonProperties |
IsExtensionGlyphShown(bool value) | InkToolBarMenuButtonProperties |
IsExtensionGlyphShown() | InkToolBarMenuButtonProperties |
IsExtensionGlyphShownProperty() | InkToolBarMenuButtonProperties | [inline, static]
MenuKind(winrt::InkToolBarMenuKind const &value) | InkToolBarMenuButtonProperties |
MenuKind() | InkToolBarMenuButtonProperties |
MenuKindProperty() | InkToolBarMenuButtonProperties | [inline, static]
s_IsExtensionGlyphShownProperty | InkToolBarMenuButtonProperties | [static]
s_MenuKindProperty | InkToolBarMenuButtonProperties | [static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DataAsElementElementFactory Member List

This is the complete list of members for DataAsElementElementFactory, including all inherited members.
GetElementCore(Microsoft.UI.Xaml.ElementFactoryGetArgs args) | DataAsElementElementFactory | [inline, protected]
RecycleElementCore(Microsoft.UI.Xaml.ElementFactoryRecycleArgs args) | DataAsElementElementFactory | [inline, protected]
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ParallaxViewTests Member List

This is the complete list of members for ParallaxViewTests, including all inherited members.
c_defaultHorizontalShift | ParallaxViewTests | [private]
c_defaultHorizontalSourceEndOffset | ParallaxViewTests | [private]
c_defaultHorizontalSourceOffsetKind | ParallaxViewTests | [private]
c_defaultHorizontalSourceStartOffset | ParallaxViewTests | [private]
c_defaultIsHorizontalShiftClamped | ParallaxViewTests | [private]
c_defaultIsVerticalShiftClamped | ParallaxViewTests | [private]
c_defaultMaxHorizontalShiftRatio | ParallaxViewTests | [private]
c_defaultMaxVerticalShiftRatio | ParallaxViewTests | [private]
c_defaultUIFinalScrollPresenterHorizontalOffset | ParallaxViewTests | [private]
c_defaultUIFinalScrollPresenterVerticalOffset | ParallaxViewTests | [private]
c_defaultUIFinalScrollViewerHorizontalOffset | ParallaxViewTests | [private]
c_defaultUIFinalScrollViewerVerticalOffset | ParallaxViewTests | [private]
c_defaultUIHorizontalShift | ParallaxViewTests | [private]
c_defaultUIScrollPresenterContentHeight | ParallaxViewTests | [private]
c_defaultUIScrollPresenterContentWidth | ParallaxViewTests | [private]
c_defaultUIScrollPresenterHeight | ParallaxViewTests | [private]
c_defaultUIScrollPresenterWidth | ParallaxViewTests | [private]
c_defaultUIScrollViewerContentHeight | ParallaxViewTests | [private]
c_defaultUIScrollViewerContentWidth | ParallaxViewTests | [private]
c_defaultUIScrollViewerHeight | ParallaxViewTests | [private]
c_defaultUIScrollViewerWidth | ParallaxViewTests | [private]
c_defaultUIVerticalShift | ParallaxViewTests | [private]
c_defaultVerticalShift | ParallaxViewTests | [private]
c_defaultVerticalSourceEndOffset | ParallaxViewTests | [private]
c_defaultVerticalSourceOffsetKind | ParallaxViewTests | [private]
c_defaultVerticalSourceStartOffset | ParallaxViewTests | [private]
c_MaxWaitDuration | ParallaxViewTests | [private]
c_scrollPresenterMaxOverpanRatio | ParallaxViewTests | [private]
c_scrollViewerMaxOverpanRatio | ParallaxViewTests | [private]
c_scrollViewerMaxOverpanRatioWithZoom | ParallaxViewTests | [private]
c_shiftTolerance | ParallaxViewTests | [private]
ChangeAlignmentOfDisconnectedParallaxViewChild() | ParallaxViewTests | [inline]
ChangePropertyAfterParallaxViewDisposal(PropertyId propertyToChange) | ParallaxViewTests | [inline, private]
ChangeScrollPresenterView(ScrollPresenter scrollPresenter, double?horizontalOffset, double?verticalOffset, float?zoomFactor, bool disableAnimation, Visual visualPPChild, ref float?finalHorizontalShift, ref float?finalVerticalShift) | ParallaxViewTests | [inline, private, static]
ChangeScrollViewerView(ScrollViewer scrollViewer, double?horizontalOffset, double?verticalOffset, float?zoomFactor, bool disableAnimation, Visual visualPPChild, ref float?finalHorizontalShift, ref float?finalVerticalShift) | ParallaxViewTests | [inline, private, static]
ChangeSizeOfDisconnectedScrollViewerContent() | ParallaxViewTests | [inline]
FindInnerScrollViewer(ItemsControl ic) | ParallaxViewTests | [inline, private, static]
GetVisualHorizontalTargetedPropertyName() | ParallaxViewTests | [inline, private, static]
GetVisualVerticalTargetedPropertyName() | ParallaxViewTests | [inline, private, static]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ParallaxViewTests | [inline, private, static]
PropertyId enum name | ParallaxViewTests | [private]
SetupDefaultUIWithListView(ParallaxView parallaxView, Rectangle rectanglePVChild, ListView listView, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent listViewLoadedEvent) | ParallaxViewTests | [inline, private]
SetupDefaultUIWithScrollPresenter(ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollPresenter scrollPresenter, Rectangle rectangleScrollPresenterContent, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollPresenterLoadedEvent) | ParallaxViewTests | [inline, private]
SetupDefaultUIWithScrollViewer(ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollViewer scrollViewer, Rectangle rectangleSVContent, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollViewerLoadedEvent) | ParallaxViewTests | [inline, private]
SetupUIWithParallaxViewInsideScrollPresenter(ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollPresenter scrollPresenter, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollPresenterLoadedEvent) | ParallaxViewTests | [inline, private]
SetupUIWithParallaxViewInsideScrollViewer(double verticalParallaxViewOffset, ParallaxView parallaxView, Rectangle rectanglePVChild, ScrollViewer scrollViewer, StackPanel stackPanelSVContent, AutoResetEvent parallaxViewLoadedEvent, AutoResetEvent scrollViewerLoadedEvent) | ParallaxViewTests | [inline, private]
SourceType enum name | ParallaxViewTests | [private]
VerifyBasicParallaxingInsideScroller() | ParallaxViewTests | [inline]
VerifyBasicParallaxingInsideScrollViewer() | ParallaxViewTests | [inline]
VerifyBasicParallaxingWithListView() | ParallaxViewTests | [inline]
VerifyBasicParallaxingWithScroller() | ParallaxViewTests | [inline]
VerifyBasicParallaxingWithScrollViewer() | ParallaxViewTests | [inline]
VerifyDefaultPropertyValues() | ParallaxViewTests | [inline]
VerifyHeaderParallaxingInsideScrollViewer() | ParallaxViewTests | [inline]
VerifyParallaxingWithAbsoluteExtremes() | ParallaxViewTests | [inline]
VerifyParallaxingWithClamping() | ParallaxViewTests | [inline]
VerifyParallaxingWithDefaultSourceUI(SourceType sourceType, ParallaxSourceOffsetKind horizontalSourceOffsetKind, double horizontalSourceStartOffset, double horizontalSourceEndOffset, double maxHorizontalShiftRatio, bool isHorizontalShiftClamped, double expectedHorizontalShift, ParallaxSourceOffsetKind verticalSourceOffsetKind, double verticalSourceStartOffset, double verticalSourceEndOffset, double maxVerticalShiftRatio, bool isVerticalShiftClamped, double expectedVerticalShift) | ParallaxViewTests | [inline, private]
VerifyParallaxingWithMaxRatios() | ParallaxViewTests | [inline]
VerifyParallaxingWithoutClamping() | ParallaxViewTests | [inline]
VerifyParallaxingWithParallaxViewInsideScrollPresenter(double scrollPresenterHorizontalOffset, double scrollPresenterVerticalOffset, double expectedHorizontalShift, double expectedVerticalShift) | ParallaxViewTests | [inline, private]
VerifyParallaxingWithParallaxViewInsideScrollViewer(ParallaxSourceOffsetKind verticalSourceOffsetKind, double verticalSourceStartOffset, double verticalSourceEndOffset, double maxVerticalShiftRatio, double verticalParallaxViewOffset, bool isVerticalShiftClamped, double expectedVerticalShift) | ParallaxViewTests | [inline, private]
VerifyParallaxingWithSizeChanges() | ParallaxViewTests | [inline]
VerifyParallaxingWithZooming() | ParallaxViewTests | [inline]
VerifyParallaxViewOffsetChangeInsideScrollViewer() | ParallaxViewTests | [inline]
VerifyPropertyGettersAndSetters() | ParallaxViewTests | [inline]
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/TestUI/MonochromaticOverlayPresenterPage.xaml.cs Source File

  • File List
  • File Members
  • MonochromaticOverlayPresenter
  • TestUI

MonochromaticOverlayPresenterPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012
00013 using MonochromaticOverlayPresenter = Microsoft.UI.Xaml.Controls.Primitives.MonochromaticOverlayPresenter;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     [TopLevelTestPage(Name = "MonochromaticOverlayPresenter")]
00018     public sealed partial class MonochromaticOverlayPresenterPage : TestPage
00019     {
00020         public MonochromaticOverlayPresenterPage()
00021         {
00022             this.InitializeComponent();
00023         }
00024     }
00025 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PinterestLayout Member List

This is the complete list of members for PinterestLayout, including all inherited members.
ArrangeOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize) | VirtualizingLayout | [virtual]
GetExtentSize(Size availableSize) | PinterestLayout | [inline, private]
GetIndexOfLowestColumn(List< double > columnOffsets, out double lowestOffset) | PinterestLayout | [inline, private]
GetStartIndex(Rect viewport) | PinterestLayout | [inline, private]
InitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
m_cachedBounds | PinterestLayout | [private]
m_columnOffsets | PinterestLayout | [private]
m_firstIndex | PinterestLayout | [private]
m_lastAvailableWidth | PinterestLayout | [private]
m_lastIndex | PinterestLayout | [private]
MeasureOverride(VirtualizingLayoutContext context, Size availableSize) | PinterestLayout | [inline, protected]
VirtualizingLayout::MeasureOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize) | VirtualizingLayout | [virtual]
OnItemsChangedCore(winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args) | VirtualizingLayout | [virtual]
PinterestLayout() | PinterestLayout | [inline]
UninitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
UpdateCachedBounds(Size availableSize) | PinterestLayout | [inline, private]
VirtualizingLayout() | VirtualizingLayout |
Width | PinterestLayout |
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewDragItemsCompletedEventArgs.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewDragItemsCompletedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Vector.h"
00007 #include "TreeViewDragItemsCompletedEventArgs.h"
00008
00009 TreeViewDragItemsCompletedEventArgs::TreeViewDragItemsCompletedEventArgs(const winrt::DragItemsCompletedEventArgs& args, const winrt::IInspectable& newParentItem)
00010 {
00011     m_dragItemsCompletedEventArgs = args;
00012     m_newParentItem = newParentItem;
00013 }
00014
00015
00016 DataPackageOperation TreeViewDragItemsCompletedEventArgs::DropResult() const
00017 {
00018     return m_dragItemsCompletedEventArgs.DropResult();
00019 }
00020
00021 winrt::IVectorView<winrt::IInspectable> TreeViewDragItemsCompletedEventArgs::Items()
00022 {
00023     return m_dragItemsCompletedEventArgs.Items();
00024 }
00025
00026 winrt::IInspectable TreeViewDragItemsCompletedEventArgs::NewParentItem()
00027 {
00028     return m_newParentItem;
00029 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPicker.cpp Source File

  • File List
  • File Members
  • ColorPicker

ColorPicker.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SharedHelpers.h"
00007 #include "ColorPicker.h"
00008 #include "ColorSpectrum.h"
00009
00010 #include "ResourceAccessor.h"
00011 #include "RuntimeProfiler.h"
00012
00013 using namespace std;
00014
00015 ColorPicker::ColorPicker()
00016 {
00017     __RP_Marker_ClassById(RuntimeProfiler::ProfId_ColorPicker);
00018
00019     SetDefaultStyleKey(this);
00020
00021     Unloaded({ this, &ColorPicker::OnUnloaded });
00022 }
00023
00024 void ColorPicker::OnApplyTemplate()
00025 {
00026     winrt::IControlProtected thisAsControlProtected = *this;
00027
00028     m_colorSpectrum.set(GetTemplateChildT<winrt::ColorSpectrum>(L"ColorSpectrum", thisAsControlProtected));
00029
00030     m_colorPreviewRectangleGrid.set(GetTemplateChildT<winrt::Grid>(L"ColorPreviewRectangleGrid", thisAsControlProtected));
00031     m_colorPreviewRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"ColorPreviewRectangle", thisAsControlProtected));
00032     m_previousColorRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"PreviousColorRectangle", thisAsControlProtected));
00033     m_colorPreviewRectangleCheckeredBackgroundImageBrush.set(GetTemplateChildT<winrt::ImageBrush>(L"ColorPreviewRectangleCheckeredBackgroundImageBrush", thisAsControlProtected));
00034
00035     m_thirdDimensionSlider.set(GetTemplateChildT<winrt::ColorPickerSlider>(L"ThirdDimensionSlider", thisAsControlProtected));
00036     m_thirdDimensionSliderGradientBrush.set(GetTemplateChildT<winrt::LinearGradientBrush>(L"ThirdDimensionSliderGradientBrush", thisAsControlProtected));
00037
00038     m_alphaSlider.set(GetTemplateChildT<winrt::ColorPickerSlider>(L"AlphaSlider", thisAsControlProtected));
00039     m_alphaSliderGradientBrush.set(GetTemplateChildT<winrt::LinearGradientBrush>(L"AlphaSliderGradientBrush", thisAsControlProtected));
00040     m_alphaSliderBackgroundRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"AlphaSliderBackgroundRectangle", thisAsControlProtected));
00041     m_alphaSliderCheckeredBackgroundImageBrush.set(GetTemplateChildT<winrt::ImageBrush>(L"AlphaSliderCheckeredBackgroundImageBrush", thisAsControlProtected));
00042
00043     m_moreButton.set(GetTemplateChildT<winrt::ButtonBase>(L"MoreButton", thisAsControlProtected));
00044
00045     m_colorRepresentationComboBox.set(GetTemplateChildT<winrt::ComboBox>(L"ColorRepresentationComboBox", thisAsControlProtected));
00046
00047     m_redTextBox.set(GetTemplateChildT<winrt::TextBox>(L"RedTextBox", thisAsControlProtected));
00048     m_greenTextBox.set(GetTemplateChildT<winrt::TextBox>(L"GreenTextBox", thisAsControlProtected));
00049     m_blueTextBox.set(GetTemplateChildT<winrt::TextBox>(L"BlueTextBox", thisAsControlProtected));
00050     m_hueTextBox.set(GetTemplateChildT<winrt::TextBox>(L"HueTextBox", thisAsControlProtected));
00051     m_saturationTextBox.set(GetTemplateChildT<winrt::TextBox>(L"SaturationTextBox", thisAsControlProtected));
00052     m_valueTextBox.set(GetTemplateChildT<winrt::TextBox>(L"ValueTextBox", thisAsControlProtected));
00053     m_alphaTextBox.set(GetTemplateChildT<winrt::TextBox>(L"AlphaTextBox", thisAsControlProtected));
00054     m_hexTextBox.set(GetTemplateChildT<winrt::TextBox>(L"HexTextBox", thisAsControlProtected));
00055
00056     m_RgbComboBoxItem.set(GetTemplateChildT<winrt::ComboBoxItem>(L"RGBComboBoxItem", thisAsControlProtected));
00057     m_HsvComboBoxItem.set(GetTemplateChildT<winrt::ComboBoxItem>(L"HSVComboBoxItem", thisAsControlProtected));
00058     m_redLabel.set(GetTemplateChildT<winrt::TextBlock>(L"RedLabel", thisAsControlProtected));
00059     m_greenLabel.set(GetTemplateChildT<winrt::TextBlock>(L"GreenLabel", thisAsControlProtected));
00060     m_blueLabel.set(GetTemplateChildT<winrt::TextBlock>(L"BlueLabel", thisAsControlProtected));
00061     m_hueLabel.set(GetTemplateChildT<winrt::TextBlock>(L"HueLabel", thisAsControlProtected));
00062     m_saturationLabel.set(GetTemplateChildT<winrt::TextBlock>(L"SaturationLabel", thisAsControlProtected));
00063     m_valueLabel.set(GetTemplateChildT<winrt::TextBlock>(L"ValueLabel", thisAsControlProtected));
00064     m_alphaLabel.set(GetTemplateChildT<winrt::TextBlock>(L"AlphaLabel", thisAsControlProtected));
00065
00066     m_checkerColorBrush.set(GetTemplateChildT<winrt::SolidColorBrush>(L"CheckerColorBrush", thisAsControlProtected));
00067
00068     if (auto&& colorSpectrum = m_colorSpectrum.get())
00069     {
00070         colorSpectrum.ColorChanged({ this, &ColorPicker::OnColorSpectrumColorChanged });
00071         colorSpectrum.SizeChanged({ this, &ColorPicker::OnColorSpectrumSizeChanged });
00072
00073         winrt::AutomationProperties::SetName(colorSpectrum, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameColorSpectrum));
00074     }
00075
00076     if (auto&& colorPreviewRectangleGrid = m_colorPreviewRectangleGrid.get())
00077     {
00078         colorPreviewRectangleGrid.SizeChanged({ this, &ColorPicker::OnColorPreviewRectangleGridSizeChanged });
00079     }
00080
00081     if (auto&& thirdDimensionSlider = m_thirdDimensionSlider.get())
00082     {
00083         thirdDimensionSlider.ValueChanged({ this, &ColorPicker::OnThirdDimensionSliderValueChanged });
00084         SetThirdDimensionSliderChannel();
00085     }
00086
00087     if (auto&& alphaSlider = m_alphaSlider.get())
00088     {
00089         alphaSlider.ValueChanged({ this, &ColorPicker::OnAlphaSliderValueChanged });
00090         alphaSlider.ColorChannel(winrt::ColorPickerHsvChannel::Alpha);
00091
00092         winrt::AutomationProperties::SetName(alphaSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameAlphaSlider));
00093     }
00094
00095     if (auto&& alphaSliderBackgroundRectangle = m_alphaSliderBackgroundRectangle.get())
00096     {
00097         alphaSliderBackgroundRectangle.SizeChanged({ this, &ColorPicker::OnAlphaSliderBackgroundRectangleSizeChanged });
00098     }
00099
00100     if (auto&& moreButton = m_moreButton.get())
00101     {
00102         if (const auto moreButtonAsToggleButton = moreButton.try_as<winrt::ToggleButton>())
00103         {
00104             moreButtonAsToggleButton.Checked({ this, &ColorPicker::OnMoreButtonChecked });
00105             moreButtonAsToggleButton.Unchecked({ this, &ColorPicker::OnMoreButtonUnchecked });
00106         }
00107         else
00108         {
00109             moreButton.Click({ this, &ColorPicker::OnMoreButtonClicked });
00110         }
00111
00112         winrt::AutomationProperties::SetName(moreButton, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameMoreButtonCollapsed));
00113         winrt::AutomationProperties::SetHelpText(moreButton, ResourceAccessor::GetLocalizedStringResource(SR_HelpTextMoreButton));
00114
00115         if (const auto moreButtonLabel = GetTemplateChildT<winrt::TextBlock>(L"MoreButtonLabel", thisAsControlProtected))
00116         {
00117             m_moreButtonLabel.set(moreButtonLabel);
00118             moreButtonLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextMoreButtonLabelCollapsed));
00119         }
00120     }
00121
00122     if (auto&& colorRepresentationComboBox = m_colorRepresentationComboBox.get())
00123     {
00124         colorRepresentationComboBox.SelectionChanged({ this, &ColorPicker::OnColorRepresentationComboBoxSelectionChanged });
00125
00126         winrt::AutomationProperties::SetName(colorRepresentationComboBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameColorModelComboBox));
00127     }
00128
00129     if (auto&& redTextBox = m_redTextBox.get())
00130     {
00131         redTextBox.TextChanging({ this, &ColorPicker::OnRgbTextChanging });
00132         redTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00133         redTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00134
00135         winrt::AutomationProperties::SetName(redTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameRedTextBox));
00136     }
00137
00138     if (auto&& greenTextBox = m_greenTextBox.get())
00139     {
00140         greenTextBox.TextChanging({ this, &ColorPicker::OnRgbTextChanging });
00141         greenTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00142         greenTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00143
00144         winrt::AutomationProperties::SetName(greenTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameGreenTextBox));
00145     }
00146
00147     if (auto&& blueTextBox = m_blueTextBox.get())
00148     {
00149         blueTextBox.TextChanging({ this, &ColorPicker::OnRgbTextChanging });
00150         blueTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00151         blueTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00152
00153         winrt::AutomationProperties::SetName(blueTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameBlueTextBox));
00154     }
00155
00156     if (auto&& hueTextBox = m_hueTextBox.get())
00157     {
00158         hueTextBox.TextChanging({ this, &ColorPicker::OnHueTextChanging });
00159         hueTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00160         hueTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00161
00162         winrt::AutomationProperties::SetName(hueTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameHueTextBox));
00163     }
00164
00165     if (auto&& saturationTextBox = m_saturationTextBox.get())
00166     {
00167         saturationTextBox.TextChanging({ this, &ColorPicker::OnSaturationTextChanging });
00168         saturationTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00169         saturationTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00170
00171         winrt::AutomationProperties::SetName(saturationTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameSaturationTextBox));
00172     }
00173
00174     if (auto&& valueTextBox = m_valueTextBox.get())
00175     {
00176         valueTextBox.TextChanging({ this, &ColorPicker::OnValueTextChanging });
00177         valueTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00178         valueTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00179
00180         winrt::AutomationProperties::SetName(valueTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameValueTextBox));
00181     }
00182
00183     if (auto&& alphaTextBox = m_alphaTextBox.get())
00184     {
00185         alphaTextBox.TextChanging({ this, &ColorPicker::OnAlphaTextChanging });
00186         alphaTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00187         alphaTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00188
00189         winrt::AutomationProperties::SetName(alphaTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameAlphaTextBox));
00190     }
00191
00192     if (auto&& hexTextBox = m_hexTextBox.get())
00193     {
00194         hexTextBox.TextChanging({ this, &ColorPicker::OnHexTextChanging });
00195         hexTextBox.GotFocus({ this, &ColorPicker::OnTextBoxGotFocus });
00196         hexTextBox.LostFocus({ this, &ColorPicker::OnTextBoxLostFocus });
00197
00198         winrt::AutomationProperties::SetName(hexTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameRGBHexTextBox));
00199     }
00200
00201     if (auto&& rgbComboBoxItem = m_RgbComboBoxItem.get())
00202     {
00203         rgbComboBoxItem.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_ContentRGBComboBoxItem)));
00204     }
00205
00206     if (auto&& hsvComboBoxItem = m_HsvComboBoxItem.get())
00207     {
00208         hsvComboBoxItem.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_ContentHSVComboBoxItem)));
00209     }
00210
00211     if (auto&& redLabel = m_redLabel.get())
00212     {
00213         redLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextRedLabel));
00214     }
00215
00216     if (auto&& greenLabel = m_greenLabel.get())
00217     {
00218         greenLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextGreenLabel));
00219     }
00220
00221     if (auto&& blueLabel = m_blueLabel.get())
00222     {
00223         blueLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextBlueLabel));
00224     }
00225
00226     if (auto&& hueLabel = m_hueLabel.get())
00227     {
00228         hueLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextHueLabel));
00229     }
00230
00231     if (auto&& saturationLabel = m_saturationLabel.get())
00232     {
00233         saturationLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextSaturationLabel));
00234     }
00235
00236     if (auto&& valueLabel = m_valueLabel.get())
00237     {
00238         valueLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextValueLabel));
00239     }
00240
00241     if (auto&& alphaLabel = m_alphaLabel.get())
00242     {
00243         alphaLabel.Text(ResourceAccessor::GetLocalizedStringResource(SR_TextAlphaLabel));
00244     }
00245
00246     if (auto&& checkerColorBrush = m_checkerColorBrush.get())
00247     {
00248         checkerColorBrush.RegisterPropertyChangedCallback(winrt::SolidColorBrush::ColorProperty(), { this, &ColorPicker::OnCheckerColorChanged });
00249     }
00250
00251     CreateColorPreviewCheckeredBackground();
00252     CreateAlphaSliderCheckeredBackground();
00253     UpdateVisualState(false /* useTransitions */);
00254     InitializeColor();
00255     UpdatePreviousColorRectangle();
00256 }
00257
00258 void ColorPicker::OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00259 {
00260     winrt::IDependencyProperty property = args.Property();
00261
00262     if (property == s_ColorProperty)
00263     {
00264         OnColorChanged(args);
00265     }
00266     else if (property == s_PreviousColorProperty)
00267     {
00268         OnPreviousColorChanged(args);
00269     }
00270     else if (property == s_IsAlphaEnabledProperty)
00271     {
00272         OnIsAlphaEnabledChanged(args);
00273     }
00274     else if (property == s_IsColorSpectrumVisibleProperty ||
00275         property == s_IsColorPreviewVisibleProperty ||
00276         property == s_IsColorSliderVisibleProperty ||
00277         property == s_IsAlphaSliderVisibleProperty ||
00278         property == s_IsMoreButtonVisibleProperty ||
00279         property == s_IsColorChannelTextInputVisibleProperty ||
00280         property == s_IsAlphaTextInputVisibleProperty ||
00281         property == s_IsHexInputVisibleProperty)
00282     {
00283         OnPartVisibilityChanged(args);
00284     }
00285     else if (property == s_MinHueProperty ||
00286         property == s_MaxHueProperty)
00287     {
00288         OnMinMaxHueChanged(args);
00289     }
00290     else if (property == s_MinSaturationProperty ||
00291         property == s_MaxSaturationProperty)
00292     {
00293         OnMinMaxSaturationChanged(args);
00294     }
00295     else if (property == s_MinValueProperty ||
00296         property == s_MaxValueProperty)
00297     {
00298         OnMinMaxValueChanged(args);
00299     }
00300     else if (property == s_ColorSpectrumComponentsProperty)
00301     {
00302         OnColorSpectrumComponentsChanged(args);
00303     }
00304     else if (property == s_OrientationProperty)
00305     {
00306         OnOrientationChanged(args);
00307     }
00308 }
00309
00310 void ColorPicker::OnColorChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00311 {
00312     // If we're in the process of internally updating the color, then we don't want to respond to the Color property changing,
00313     // aside from raising the ColorChanged event.
00314     if (!m_updatingColor)
00315     {
00316         winrt::Color color = Color();
00317
00318         m_currentRgb = Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0);
00319         m_currentAlpha = color.A / 255.0;
00320         m_currentHsv = RgbToHsv(m_currentRgb);
00321         m_currentHex = GetCurrentHexValue();
00322
00323         UpdateColorControls(ColorUpdateReason::ColorPropertyChanged);
00324     }
00325
00326     winrt::Color oldColor = unbox_value<winrt::Color>(args.OldValue());
00327     winrt::Color newColor = unbox_value<winrt::Color>(args.NewValue());
00328
00329     if (oldColor.A != newColor.A ||
00330         oldColor.R != newColor.R ||
00331         oldColor.G != newColor.G ||
00332         oldColor.B != newColor.B)
00333     {
00334         auto colorChangedEventArgs = winrt::make_self<ColorChangedEventArgs>();
00335
00336         colorChangedEventArgs->OldColor(oldColor);
00337         colorChangedEventArgs->NewColor(newColor);
00338
00339         m_colorChangedEventSource(*this, *colorChangedEventArgs);
00340     }
00341 }
00342
00343 void ColorPicker::OnPreviousColorChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00344 {
00345     UpdatePreviousColorRectangle();
00346     UpdateVisualState(true /* useTransitions */);
00347 }
00348
00349 void ColorPicker::OnIsAlphaEnabledChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00350 {
00351     m_currentHex = GetCurrentHexValue();
00352
00353     if (auto&& hexTextBox = m_hexTextBox.get())
00354     {
00355         m_updatingControls = true;
00356         hexTextBox.Text(m_currentHex);
00357         m_updatingControls = false;
00358     }
00359
00360
00361     OnPartVisibilityChanged(args);
00362 }
00363
00364 void ColorPicker::OnPartVisibilityChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00365 {
00366     UpdateVisualState(true /* useTransitions */);
00367 }
00368
00369 void ColorPicker::OnMinMaxHueChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00370 {
00371     int minHue = MinHue();
00372     int maxHue = MaxHue();
00373
00374     if (minHue < 0 || minHue > 359)
00375     {
00376         throw winrt::hresult_invalid_argument(L"MinHue must be between 0 and 359.");
00377     }
00378     else if (maxHue < 0 || maxHue > 359)
00379     {
00380         throw winrt::hresult_invalid_argument(L"MaxHue must be between 0 and 359.");
00381     }
00382
00383     m_currentHsv.h = max(static_cast<double>(minHue), min(m_currentHsv.h, static_cast<double>(maxHue)));
00384
00385     UpdateColor(m_currentHsv, ColorUpdateReason::ColorPropertyChanged);
00386     UpdateThirdDimensionSlider();
00387 }
00388
00389 void ColorPicker::OnMinMaxSaturationChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00390 {
00391     int minSaturation = MinSaturation();
00392     int maxSaturation = MaxSaturation();
00393
00394     if (minSaturation < 0 || minSaturation > 100)
00395     {
00396         throw winrt::hresult_invalid_argument(L"MinSaturation must be between 0 and 100.");
00397     }
00398     else if (maxSaturation < 0 || maxSaturation > 100)
00399     {
00400         throw winrt::hresult_invalid_argument(L"MaxSaturation must be between 0 and 100.");
00401     }
00402
00403     m_currentHsv.s = max(static_cast<double>(minSaturation) / 100, min(m_currentHsv.s, static_cast<double>(maxSaturation) / 100));
00404
00405     UpdateColor(m_currentHsv, ColorUpdateReason::ColorPropertyChanged);
00406     UpdateThirdDimensionSlider();
00407 }
00408
00409 void ColorPicker::OnMinMaxValueChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00410 {
00411     int minValue = MinValue();
00412     int maxValue = MaxValue();
00413
00414     if (minValue < 0 || minValue > 100)
00415     {
00416         throw winrt::hresult_invalid_argument(L"MinValue must be between 0 and 100.");
00417     }
00418     else if (maxValue < 0 || maxValue > 100)
00419     {
00420         throw winrt::hresult_invalid_argument(L"MaxValue must be between 0 and 100.");
00421     }
00422
00423     m_currentHsv.v = max(static_cast<double>(minValue) / 100, min(m_currentHsv.v, static_cast<double>(maxValue) / 100));
00424
00425     UpdateColor(m_currentHsv, ColorUpdateReason::ColorPropertyChanged);
00426     UpdateThirdDimensionSlider();
00427 }
00428
00429 void ColorPicker::OnColorSpectrumComponentsChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00430 {
00431     UpdateThirdDimensionSlider();
00432     SetThirdDimensionSliderChannel();
00433 }
00434
00435 void ColorPicker::OnOrientationChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00436 {
00437     UpdateVisualState(true);
00438 }
00439
00440 void ColorPicker::UpdateVisualState(bool useTransitions)
00441 {
00442     winrt::IReference<winrt::Color> previousColor = PreviousColor();
00443     bool isAlphaEnabled = IsAlphaEnabled();
00444     bool isColorSpectrumVisible = IsColorSpectrumVisible();
00445     const bool isVerticalOrientation = Orientation() == winrt::Orientation::Vertical;
00446
00447     const wchar_t *previousColorStateName;
00448
00449     if (isColorSpectrumVisible)
00450     {
00451         previousColorStateName = previousColor ? L"PreviousColorVisibleVertical" : L"PreviousColorCollapsedVertical";
00452     }
00453     else
00454     {
00455         previousColorStateName = previousColor ? L"PreviousColorVisibleHorizontal" : L"PreviousColorCollapsedHorizontal";
00456     }
00457
00458     winrt::VisualStateManager::GoToState(*this, isColorSpectrumVisible ? L"ColorSpectrumVisible" : L"ColorSpectrumCollapsed", useTransitions);
00459     winrt::VisualStateManager::GoToState(*this, previousColorStateName, useTransitions);
00460     winrt::VisualStateManager::GoToState(*this, IsColorPreviewVisible() ? L"ColorPreviewVisible" : L"ColorPreviewCollapsed", useTransitions);
00461     winrt::VisualStateManager::GoToState(*this, IsColorSliderVisible() ? L"ThirdDimensionSliderVisible" : L"ThirdDimensionSliderCollapsed", useTransitions);
00462     winrt::VisualStateManager::GoToState(*this, isAlphaEnabled && IsAlphaSliderVisible() ? L"AlphaSliderVisible" : L"AlphaSliderCollapsed", useTransitions);
00463     // More button is disabled in horizontal orientation; only respect IsMoreButtonVisible states when switching to Vertical orientation.
00464     winrt::VisualStateManager::GoToState(*this, IsMoreButtonVisible() && isVerticalOrientation ? L"MoreButtonVisible" : L"MoreButtonCollapsed", useTransitions);
00465     winrt::VisualStateManager::GoToState(*this, !IsMoreButtonVisible() || m_textEntryGridOpened || !isVerticalOrientation ? L"TextEntryGridVisible" : L"TextEntryGridCollapsed", useTransitions);
00466
00467     if (auto&& colorRepresentationComboBox = m_colorRepresentationComboBox.get())
00468     {
00469         winrt::VisualStateManager::GoToState(*this, colorRepresentationComboBox.SelectedIndex() == 0 ? L"RgbSelected" : L"HsvSelected", useTransitions);
00470     }
00471
00472     winrt::VisualStateManager::GoToState(*this, IsColorChannelTextInputVisible() ? L"ColorChannelTextInputVisible" : L"ColorChannelTextInputCollapsed", useTransitions);
00473     winrt::VisualStateManager::GoToState(*this, isAlphaEnabled && IsAlphaTextInputVisible() ? L"AlphaTextInputVisible" : L"AlphaTextInputCollapsed", useTransitions);
00474     winrt::VisualStateManager::GoToState(*this, IsHexInputVisible() ? L"HexInputVisible" : L"HexInputCollapsed", useTransitions);
00475     winrt::VisualStateManager::GoToState(*this, isAlphaEnabled ? L"AlphaEnabled" : L"AlphaDisabled", useTransitions);
00476     winrt::VisualStateManager::GoToState(*this, isVerticalOrientation ? L"Vertical" : L"Horizontal", useTransitions);
00477
00478 }
00479
00480 void ColorPicker::InitializeColor()
00481 {
00482     auto color = Color();
00483
00484     m_currentRgb = Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0);
00485     m_currentHsv = RgbToHsv(m_currentRgb);
00486     m_currentAlpha = color.A / 255.0;
00487     m_currentHex = GetCurrentHexValue();
00488
00489     SetColorAndUpdateControls(ColorUpdateReason::InitializingColor);
00490 }
00491
00492 void ColorPicker::UpdateColor(const Rgb &rgb, ColorUpdateReason reason)
00493 {
00494     m_currentRgb = rgb;
00495     m_currentHsv = RgbToHsv(m_currentRgb);
00496     m_currentHex = GetCurrentHexValue();
00497
00498     SetColorAndUpdateControls(reason);
00499 }
00500
00501 void ColorPicker::UpdateColor(const Hsv &hsv, ColorUpdateReason reason)
00502 {
00503     m_currentHsv = hsv;
00504     m_currentRgb = HsvToRgb(hsv);
00505     m_currentHex = GetCurrentHexValue();
00506
00507     SetColorAndUpdateControls(reason);
00508 }
00509
00510 void ColorPicker::UpdateColor(double alpha, ColorUpdateReason reason)
00511 {
00512     m_currentAlpha = alpha;
00513     m_currentHex = GetCurrentHexValue();
00514
00515     SetColorAndUpdateControls(reason);
00516 }
00517
00518 void ColorPicker::SetColorAndUpdateControls(ColorUpdateReason reason)
00519 {
00520     m_updatingColor = true;
00521
00522     Color(ColorFromRgba(m_currentRgb, m_currentAlpha));
00523     UpdateColorControls(reason);
00524
00525     m_updatingColor = false;
00526 }
00527
00528 void ColorPicker::UpdatePreviousColorRectangle()
00529 {
00530     if (auto&& previousColorRectangle = m_previousColorRectangle.get())
00531     {
00532         winrt::IReference<winrt::Color> previousColor = PreviousColor();
00533
00534         if (previousColor)
00535         {
00536             previousColorRectangle.Fill(winrt::SolidColorBrush(previousColor.Value()));
00537         }
00538         else
00539         {
00540             previousColorRectangle.Fill(nullptr);
00541         }
00542     }
00543 }
00544
00545
00546 void ColorPicker::UpdateColorControls(ColorUpdateReason reason)
00547 {
00548     // If we're updating the controls internally, we don't want to execute any of the controls'
00549     // event handlers, because that would then update the color, which would update the color controls,
00550     // and then we'd be in an infinite loop.
00551     m_updatingControls = true;
00552
00553     // We pass in the reason why we're updating the color controls because
00554     // we don't want to re-update any control that was the cause of this update.
00555     // For example, if a user selected a color on the ColorSpectrum, then we
00556     // don't want to update the ColorSpectrum's color based on this change.
00557     if (reason != ColorUpdateReason::ColorSpectrumColorChanged && m_colorSpectrum)
00558     {
00559         m_colorSpectrum.get().HsvColor(winrt::float4{ static_cast<float>(m_currentHsv.h), static_cast<float>(m_currentHsv.s), static_cast<float>(m_currentHsv.v), static_cast<float>(m_currentAlpha) });
00560     }
00561
00562     if (auto&& colorPreviewRectangle = m_colorPreviewRectangle.get())
00563     {
00564         auto color = Color();
00565
00566         colorPreviewRectangle.Fill(winrt::SolidColorBrush(color));
00567     }
00568
00569
00570     if (reason != ColorUpdateReason::ThirdDimensionSliderChanged && m_thirdDimensionSlider)
00571     {
00572         UpdateThirdDimensionSlider();
00573     }
00574
00575     if (reason != ColorUpdateReason::AlphaSliderChanged && m_alphaSlider)
00576     {
00577         UpdateAlphaSlider();
00578     }
00579
00580     auto strongThis = get_strong();
00581     auto updateTextBoxes = [strongThis, reason]()
00582     {
00583         if (reason != ColorUpdateReason::RgbTextBoxChanged)
00584         {
00585             if (auto&& redTextBox = strongThis->m_redTextBox.get())
00586             {
00587                 redTextBox.Text(to_wstring(static_cast<::byte>(round(strongThis->m_currentRgb.r * 255))));
00588             }
00589
00590             if (auto&& greenTextBox = strongThis->m_greenTextBox.get())
00591             {
00592                 greenTextBox.Text(to_wstring(static_cast<::byte>(round(strongThis->m_currentRgb.g * 255))));
00593             }
00594
00595             if (auto&& blueTextBox = strongThis->m_blueTextBox.get())
00596             {
00597                 blueTextBox.Text(to_wstring(static_cast<::byte>(round(strongThis->m_currentRgb.b * 255))));
00598             }
00599         }
00600
00601         if (reason != ColorUpdateReason::HsvTextBoxChanged)
00602         {
00603             if (auto&& hueTextBox = strongThis->m_hueTextBox.get())
00604             {
00605                 hueTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentHsv.h))));
00606             }
00607
00608             if (auto&& saturationTextBox = strongThis->m_saturationTextBox.get())
00609             {
00610                 saturationTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentHsv.s * 100))));
00611             }
00612
00613             if (auto&& valueTextBox = strongThis->m_valueTextBox.get())
00614             {
00615                 valueTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentHsv.v * 100))));
00616             }
00617         }
00618
00619
00620         if (reason != ColorUpdateReason::AlphaTextBoxChanged)
00621         {
00622             if (auto&& alphaTextBox = strongThis->m_alphaTextBox.get())
00623             {
00624                 alphaTextBox.Text(to_wstring(static_cast<int>(round(strongThis->m_currentAlpha * 100))) + wstring(L"%"));
00625             }
00626         }
00627
00628         if (reason != ColorUpdateReason::HexTextBoxChanged)
00629         {
00630             if (auto&& hexTextBox = strongThis->m_hexTextBox.get())
00631             {
00632                 hexTextBox.Text(strongThis->m_currentHex);
00633             }
00634         }
00635
00636     };
00637
00638     updateTextBoxes();
00639
00640     m_updatingControls = false;
00641 }
00642
00643 void ColorPicker::OnColorSpectrumColorChanged(const winrt::ColorSpectrum& sender, const winrt::ColorChangedEventArgs& /*args*/)
00644 {
00645     // If we're updating controls, then this is being raised in response to that,
00646     // so we'll ignore it.
00647     if (m_updatingControls)
00648     {
00649         return;
00650     }
00651
00652     auto hsvColor = sender.HsvColor();
00653     UpdateColor(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor)), ColorUpdateReason::ColorSpectrumColorChanged);
00654 }
00655
00656 void ColorPicker::OnColorSpectrumSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& args)
00657 {
00658     // Since the ColorPicker is arranged vertically, the ColorSpectrum's height can be whatever we want it to be -
00659     // the width is the limiting factor.  Since we want it to always be a square, we'll set its height to whatever its width is.
00660     if (args.NewSize().Width != args.PreviousSize().Width)
00661     {
00662         m_colorSpectrum.get().Height(args.NewSize().Width);
00663     }
00664 }
00665
00666 void ColorPicker::OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
00667 {
00668     // If we're in the middle of creating image bitmaps while being unloaded,
00669     // we'll want to synchronously cancel it so we don't have any asynchronous actions
00670     // lingering beyond our lifetime.
00671     CancelAsyncAction(m_createColorPreviewRectangleCheckeredBackgroundBitmapAction);
00672     CancelAsyncAction(m_alphaSliderCheckeredBackgroundBitmapAction);
00673 }
00674
00675 void ColorPicker::OnCheckerColorChanged(winrt::DependencyObject const& o, winrt::DependencyProperty const& p)
00676 {
00677     CreateColorPreviewCheckeredBackground();
00678     CreateAlphaSliderCheckeredBackground();
00679 }
00680
00681 void ColorPicker::OnColorPreviewRectangleGridSizeChanged(winrt::IInspectable const& /*sender*/, winrt::SizeChangedEventArgs const& /*args*/)
00682 {
00683     CreateColorPreviewCheckeredBackground();
00684 }
00685
00686 void ColorPicker::OnAlphaSliderBackgroundRectangleSizeChanged(winrt::IInspectable const& /*sender*/, winrt::SizeChangedEventArgs const& /*args*/)
00687 {
00688     CreateAlphaSliderCheckeredBackground();
00689 }
00690
00691 void ColorPicker::OnThirdDimensionSliderValueChanged(winrt::IInspectable const& /*sender*/, winrt::RangeBaseValueChangedEventArgs const& /*args*/)
00692 {
00693     // If we're in the process of updating controls in response to a color change,
00694     // then we don't want to do anything in response to a control being updated,
00695     // since otherwise we'll get into an infinite loop of updating.
00696     if (m_updatingControls)
00697     {
00698         return;
00699     }
00700
00701     winrt::ColorSpectrumComponents components = ColorSpectrumComponents();
00702
00703     double h = m_currentHsv.h;
00704     double s = m_currentHsv.s;
00705     double v = m_currentHsv.v;
00706
00707     switch (components)
00708     {
00709     case winrt::ColorSpectrumComponents::HueValue:
00710     case winrt::ColorSpectrumComponents::ValueHue:
00711         s = m_thirdDimensionSlider.get().Value() / 100.0;
00712         break;
00713
00714     case winrt::ColorSpectrumComponents::HueSaturation:
00715     case winrt::ColorSpectrumComponents::SaturationHue:
00716         v = m_thirdDimensionSlider.get().Value() / 100.0;
00717         break;
00718
00719     case winrt::ColorSpectrumComponents::ValueSaturation:
00720     case winrt::ColorSpectrumComponents::SaturationValue:
00721         h = m_thirdDimensionSlider.get().Value();
00722         break;
00723     }
00724
00725     UpdateColor(Hsv(h, s, v), ColorUpdateReason::ThirdDimensionSliderChanged);
00726 }
00727
00728 void ColorPicker::OnAlphaSliderValueChanged(winrt::IInspectable const& /*sender*/, winrt::RangeBaseValueChangedEventArgs const& /*args*/)
00729 {
00730     // If we're in the process of updating controls in response to a color change,
00731     // then we don't want to do anything in response to a control being updated,
00732     // since otherwise we'll get into an infinite loop of updating.
00733     if (m_updatingControls)
00734     {
00735         return;
00736     }
00737
00738     UpdateColor(m_alphaSlider.get().Value() / 100.0, ColorUpdateReason::AlphaSliderChanged);
00739 }
00740
00741 void ColorPicker::OnMoreButtonClicked(winrt::IInspectable const& /*sender*/, winrt::RoutedEventArgs const& /*args*/)
00742 {
00743     m_textEntryGridOpened = !m_textEntryGridOpened;
00744     UpdateMoreButton();
00745 }
00746
00747 void ColorPicker::OnMoreButtonChecked(winrt::IInspectable const& /*sender*/, winrt::RoutedEventArgs const& /*args*/)
00748 {
00749     m_textEntryGridOpened = true;
00750     UpdateMoreButton();
00751 }
00752
00753 void ColorPicker::OnMoreButtonUnchecked(winrt::IInspectable const& /*sender*/, winrt::RoutedEventArgs const& /*args*/)
00754 {
00755     m_textEntryGridOpened = false;
00756     UpdateMoreButton();
00757 }
00758
00759 void ColorPicker::UpdateMoreButton()
00760 {
00761     if (auto&& moreButton = m_moreButton.get())
00762     {
00763         winrt::AutomationProperties::SetName(moreButton, ResourceAccessor::GetLocalizedStringResource(m_textEntryGridOpened ? SR_AutomationNameMoreButtonExpanded : SR_AutomationNameMoreButtonCollapsed));
00764     }
00765
00766     if (auto&& moreButtonLabel = m_moreButtonLabel.get())
00767     {
00768         moreButtonLabel.Text(ResourceAccessor::GetLocalizedStringResource(m_textEntryGridOpened ? SR_TextMoreButtonLabelExpanded : SR_TextMoreButtonLabelCollapsed));
00769     }
00770
00771
00772     UpdateVisualState(true /* useTransitions */);
00773 }
00774
00775 void ColorPicker::OnColorRepresentationComboBoxSelectionChanged(winrt::IInspectable const& /*sender*/, winrt::SelectionChangedEventArgs const& /*args*/)
00776 {
00777     /* Update UIA Name for Hex TextBox */
00778     if (auto&& colorRepresentationComboBox = m_colorRepresentationComboBox.get())
00779     {
00780         if (auto&& hexTextBox = m_hexTextBox.get())
00781         {
00782             if (colorRepresentationComboBox.SelectedIndex() == 0)
00783             {
00784                 winrt::AutomationProperties::SetName(hexTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameRGBHexTextBox));
00785             }
00786             else
00787             {
00788                 winrt::AutomationProperties::SetName(hexTextBox, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameHSVHexTextBox));
00789             }
00790         }
00791     }
00792
00793     UpdateVisualState(true /* useTransitions */);
00794 }
00795
00796 void ColorPicker::OnTextBoxGotFocus(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& /*args*/)
00797 {
00798     winrt::TextBox textBox = sender.as<winrt::TextBox>();
00799
00800     m_isFocusedTextBoxValid = true;
00801     m_previousString = textBox.Text();
00802 }
00803
00804 void ColorPicker::OnTextBoxLostFocus(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& /*args*/)
00805 {
00806     winrt::TextBox textBox = sender.as<winrt::TextBox>();
00807
00808     // When a text box loses focus, we want to check whether its contents were valid.
00809     // If they weren't, then we'll roll back its contents to their last valid value.
00810     if (!m_isFocusedTextBoxValid)
00811     {
00812         textBox.Text(m_previousString);
00813     }
00814
00815     // Now that we know that no text box is currently being edited, we'll update all of the color controls
00816     // in order to clear away any invalid values currently in any text box.
00817     UpdateColorControls(ColorUpdateReason::ColorPropertyChanged);
00818 }
00819
00820 void ColorPicker::OnRgbTextChanging(winrt::TextBox const& sender, winrt::TextBoxTextChangingEventArgs const& /*args*/)
00821 {
00822     // If we're in the process of updating controls in response to a color change,
00823     // then we don't want to do anything in response to a control being updated,
00824     // since otherwise we'll get into an infinite loop of updating.
00825     if (m_updatingControls)
00826     {
00827         return;
00828     }
00829
00830     // We'll respond to the text change if the user has entered a valid value.
00831     // Otherwise, we'll do nothing except mark the text box's contents as invalid.
00832     auto componentValue = TryParseInt(sender.Text());
00833     if (!componentValue.has_value() ||
00834         componentValue.value() < 0 ||
00835         componentValue.value() > 255)
00836     {
00837         m_isFocusedTextBoxValid = false;
00838     }
00839     else
00840     {
00841         m_isFocusedTextBoxValid = true;
00842         UpdateColor(ApplyConstraintsToRgbColor(GetRgbColorFromTextBoxes()), ColorUpdateReason::RgbTextBoxChanged);
00843     }
00844 }
00845
00846 void ColorPicker::OnHueTextChanging(winrt::TextBox const& /*sender*/, winrt::TextBoxTextChangingEventArgs const& /*args*/)
00847 {
00848     // If we're in the process of updating controls in response to a color change,
00849     // then we don't want to do anything in response to a control being updated,
00850     // since otherwise we'll get into an infinite loop of updating.
00851     if (m_updatingControls)
00852     {
00853         return;
00854     }
00855
00856     // We'll respond to the text change if the user has entered a valid value.
00857     // Otherwise, we'll do nothing except mark the text box's contents as invalid.
00858     auto hueValue = TryParseInt(m_hueTextBox.get().Text());
00859     if (!hueValue.has_value() ||
00860         hueValue.value() < static_cast<unsigned long>(MinHue()) ||
00861         hueValue.value() > static_cast<unsigned long>(MaxHue()))
00862     {
00863         m_isFocusedTextBoxValid = false;
00864     }
00865     else
00866     {
00867         m_isFocusedTextBoxValid = true;
00868         UpdateColor(GetHsvColorFromTextBoxes(), ColorUpdateReason::HsvTextBoxChanged);
00869     }
00870 }
00871
00872 void ColorPicker::OnSaturationTextChanging(winrt::TextBox const& /*sender*/, winrt::TextBoxTextChangingEventArgs const& /*args*/)
00873 {
00874     // If we're in the process of updating controls in response to a color change,
00875     // then we don't want to do anything in response to a control being updated,
00876     // since otherwise we'll get into an infinite loop of updating.
00877     if (m_updatingControls)
00878     {
00879         return;
00880     }
00881
00882     // We'll respond to the text change if the user has entered a valid value.
00883     // Otherwise, we'll do nothing except mark the text box's contents as invalid.
00884     auto saturationValue = TryParseInt(m_saturationTextBox.get().Text());
00885     if (!saturationValue.has_value() ||
00886         saturationValue.value() < static_cast<unsigned long>(MinSaturation()) ||
00887         saturationValue.value() > static_cast<unsigned long>(MaxSaturation()))
00888     {
00889         m_isFocusedTextBoxValid = false;
00890     }
00891     else
00892     {
00893         m_isFocusedTextBoxValid = true;
00894         UpdateColor(GetHsvColorFromTextBoxes(), ColorUpdateReason::HsvTextBoxChanged);
00895     }
00896 }
00897
00898 void ColorPicker::OnValueTextChanging(winrt::TextBox const& /*sender*/, winrt::TextBoxTextChangingEventArgs const& /*args*/)
00899 {
00900     // If we're in the process of updating controls in response to a color change,
00901     // then we don't want to do anything in response to a control being updated,
00902     // since otherwise we'll get into an infinite loop of updating.
00903     if (m_updatingControls)
00904     {
00905         return;
00906     }
00907
00908     // We'll respond to the text change if the user has entered a valid value.
00909     // Otherwise, we'll do nothing except mark the text box's contents as invalid.
00910     auto value = TryParseInt(m_valueTextBox.get().Text());
00911     if (!value.has_value() ||
00912         value.value() < static_cast<unsigned long>(MinValue()) ||
00913         value.value() > static_cast<unsigned long>(MaxValue()))
00914     {
00915         m_isFocusedTextBoxValid = false;
00916     }
00917     else
00918     {
00919         m_isFocusedTextBoxValid = true;
00920         UpdateColor(GetHsvColorFromTextBoxes(), ColorUpdateReason::HsvTextBoxChanged);
00921     }
00922 }
00923
00924 void ColorPicker::OnAlphaTextChanging(winrt::TextBox const& /*sender*/, winrt::TextBoxTextChangingEventArgs const& /*args*/)
00925 {
00926     // If we're in the process of updating controls in response to a color change,
00927     // then we don't want to do anything in response to a control being updated,
00928     // since otherwise we'll get into an infinite loop of updating.
00929     if (m_updatingControls)
00930     {
00931         return;
00932     }
00933
00934     if (auto&& alphaTextBox = m_alphaTextBox.get())
00935     {
00936         // If the user hasn't entered a %, we'll do that for them, keeping the cursor
00937         // where it was before.
00938         int cursorPosition = alphaTextBox.SelectionStart() + alphaTextBox.SelectionLength();
00939
00940         const auto text = alphaTextBox.Text();
00941         if (text.empty() || text.begin()[text.size() - 1] != '%')
00942         {
00943             alphaTextBox.Text(static_cast<wstring>(text) + wstring(L"%"));
00944             alphaTextBox.SelectionStart(cursorPosition);
00945         }
00946
00947         // We'll respond to the text change if the user has entered a valid value.
00948         // Otherwise, we'll do nothing except mark the text box's contents as invalid.
00949         winrt::hstring alphaString{ static_cast<wstring>(alphaTextBox.Text()).substr(0, alphaTextBox.Text().size() - 1) };
00950         auto alphaValue = TryParseInt(alphaString);
00951         if (!alphaValue.has_value() || alphaValue.value() < 0 || alphaValue.value() > 100)
00952         {
00953             m_isFocusedTextBoxValid = false;
00954         }
00955         else
00956         {
00957             m_isFocusedTextBoxValid = true;
00958             UpdateColor(alphaValue.value() / 100.0, ColorUpdateReason::AlphaTextBoxChanged);
00959         }
00960     }
00961 }
00962
00963 void ColorPicker::OnHexTextChanging(winrt::TextBox const& /*sender*/, winrt::TextBoxTextChangingEventArgs const& /*args*/)
00964 {
00965     // If we're in the process of updating controls in response to a color change,
00966     // then we don't want to do anything in response to a control being updated,
00967     // since otherwise we'll get into an infinite loop of updating.
00968     if (m_updatingControls)
00969     {
00970         return;
00971     }
00972
00973     auto&& hexTextBox = m_hexTextBox.get();
00974
00975     // If the user hasn't entered a #, we'll do that for them, keeping the cursor
00976     // where it was before.
00977     const auto text = hexTextBox.Text();
00978     if (text.empty() || text.begin()[0] != '#')
00979     {
00980         hexTextBox.Text(wstring(L"#") + static_cast<wstring>(text));
00981         hexTextBox.SelectionStart(hexTextBox.Text().size());
00982     }
00983
00984     // We'll respond to the text change if the user has entered a valid value.
00985     // Otherwise, we'll do nothing except mark the text box's contents as invalid.
00986     bool isAlphaEnabled = IsAlphaEnabled();
00987     auto [rgbValue, alphaValue] = [this, isAlphaEnabled]() {
00988         return isAlphaEnabled ?
00989             HexToRgba(m_hexTextBox.get().Text()) :
00990             std::make_tuple(HexToRgb(m_hexTextBox.get().Text()), 1.0);
00991     }();
00992
00993     if ((rgbValue.r == -1 && rgbValue.g == -1 && rgbValue.b == -1 && alphaValue == -1) || alphaValue < 0 || alphaValue > 1)
00994     {
00995         m_isFocusedTextBoxValid = false;
00996     }
00997     else
00998     {
00999         m_isFocusedTextBoxValid = true;
01000         UpdateColor(ApplyConstraintsToRgbColor(rgbValue), ColorUpdateReason::HexTextBoxChanged);
01001         UpdateColor(alphaValue, ColorUpdateReason::HexTextBoxChanged);
01002     }
01003 }
01004
01005 Rgb ColorPicker::GetRgbColorFromTextBoxes()
01006 {
01007     return Rgb(_wtoi(m_redTextBox.get().Text().data()) / 255.0, _wtoi(m_greenTextBox.get().Text().data()) / 255.0, _wtoi(m_blueTextBox.get().Text().data()) / 255.0);
01008 }
01009
01010 Hsv ColorPicker::GetHsvColorFromTextBoxes()
01011 {
01012     return Hsv(_wtoi(m_hueTextBox.get().Text().data()), _wtoi(m_saturationTextBox.get().Text().data()) / 100.0, _wtoi(m_valueTextBox.get().Text().data()) / 100.0);
01013 }
01014
01015 winrt::hstring ColorPicker::GetCurrentHexValue()
01016 {
01017     return IsAlphaEnabled() ? RgbaToHex(m_currentRgb, m_currentAlpha) : RgbToHex(m_currentRgb);
01018 }
01019
01020 Rgb ColorPicker::ApplyConstraintsToRgbColor(const Rgb &rgb)
01021 {
01022     double minHue = MinHue();
01023     double maxHue = MaxHue();
01024     double minSaturation = MinSaturation() / 100.0;
01025     double maxSaturation = MaxSaturation() / 100.0;
01026     double minValue = MinValue() / 100.0;
01027     double maxValue = MaxValue() / 100.0;
01028
01029     Hsv hsv = RgbToHsv(rgb);
01030
01031     hsv.h = min(max(hsv.h, minHue), maxHue);
01032     hsv.s = min(max(hsv.s, minSaturation), maxSaturation);
01033     hsv.v = min(max(hsv.v, minValue), maxValue);
01034
01035     return HsvToRgb(hsv);
01036 }
01037
01038 void ColorPicker::UpdateThirdDimensionSlider()
01039 {
01040     if (!m_thirdDimensionSlider || !m_thirdDimensionSliderGradientBrush)
01041     {
01042         return;
01043     }
01044
01045     auto&& thirdDimensionSlider = m_thirdDimensionSlider.get();
01046     auto&& thirdDimensionSliderGradientBrush = m_thirdDimensionSliderGradientBrush.get();
01047
01048     // Since the slider changes only one color dimension, we can use a LinearGradientBrush
01049     // for its background instead of needing to manually set pixels ourselves.
01050     // We'll have the gradient go between the minimum and maximum values in the case where
01051     // the slider handles saturation or value, or in the case where it handles hue,
01052     // we'll have it go between red, yellow, green, cyan, blue, and purple, in that order.
01053     thirdDimensionSliderGradientBrush.GradientStops().Clear();
01054
01055     switch (ColorSpectrumComponents())
01056     {
01057     case winrt::ColorSpectrumComponents::HueValue:
01058     case winrt::ColorSpectrumComponents::ValueHue:
01059     {
01060         int minSaturation = MinSaturation();
01061         int maxSaturation = MaxSaturation();
01062
01063         thirdDimensionSlider.Minimum(minSaturation);
01064         thirdDimensionSlider.Maximum(maxSaturation);
01065         thirdDimensionSlider.Value(m_currentHsv.s * 100);
01066
01067         // If MinSaturation >= MaxSaturation, then by convention MinSaturation is the only value
01068         // that the slider can take.
01069         if (minSaturation >= maxSaturation)
01070         {
01071             maxSaturation = minSaturation;
01072         }
01073
01074         AddGradientStop(thirdDimensionSliderGradientBrush, 0.0, { m_currentHsv.h, minSaturation / 100.0, 1.0 }, 1.0);
01075         AddGradientStop(thirdDimensionSliderGradientBrush, 1.0, { m_currentHsv.h, maxSaturation / 100.0, 1.0 }, 1.0);
01076     }
01077     break;
01078
01079     case winrt::ColorSpectrumComponents::HueSaturation:
01080     case winrt::ColorSpectrumComponents::SaturationHue:
01081     {
01082         int minValue = MinValue();
01083         int maxValue = MaxValue();
01084
01085         thirdDimensionSlider.Minimum(minValue);
01086         thirdDimensionSlider.Maximum(maxValue);
01087         thirdDimensionSlider.Value(m_currentHsv.v * 100);
01088
01089         // If MinValue >= MaxValue, then by convention MinValue is the only value
01090         // that the slider can take.
01091         if (minValue >= maxValue)
01092         {
01093             maxValue = minValue;
01094         }
01095
01096         AddGradientStop(thirdDimensionSliderGradientBrush, 0.0, { m_currentHsv.h, m_currentHsv.s, minValue / 100.0 }, 1.0);
01097         AddGradientStop(thirdDimensionSliderGradientBrush, 1.0, { m_currentHsv.h, m_currentHsv.s, maxValue / 100.0 }, 1.0);
01098     }
01099     break;
01100
01101     case winrt::ColorSpectrumComponents::ValueSaturation:
01102     case winrt::ColorSpectrumComponents::SaturationValue:
01103     {
01104         int minHue = MinHue();
01105         int maxHue = MaxHue();
01106
01107         thirdDimensionSlider.Minimum(minHue);
01108         thirdDimensionSlider.Maximum(maxHue);
01109         thirdDimensionSlider.Value(m_currentHsv.h);
01110
01111         // If MinHue >= MaxHue, then by convention MinHue is the only value
01112         // that the slider can take.
01113         if (minHue >= maxHue)
01114         {
01115             maxHue = minHue;
01116         }
01117
01118         double minOffset = minHue / 359.0;
01119         double maxOffset = maxHue / 359.0;
01120
01121         // With unclamped hue values, we have six different gradient stops, corresponding to red, yellow, green, cyan, blue, and purple.
01122         // However, with clamped hue values, we may not need all of those gradient stops.
01123         // We know we need a gradient stop at the start and end corresponding to the min and max values for hue,
01124         // and then in the middle, we'll add any gradient stops corresponding to the hue of those six pure colors that exist
01125         // between the min and max hue.
01126         AddGradientStop(thirdDimensionSliderGradientBrush, 0.0, { static_cast<double>(minHue), 1.0, 1.0 }, 1.0);
01127
01128         for (int sextant = 1; sextant <= 5; sextant++)
01129         {
01130             double offset = sextant / 6.0;
01131
01132             if (minOffset < offset && maxOffset > offset)
01133             {
01134                 AddGradientStop(thirdDimensionSliderGradientBrush, (offset - minOffset) / (maxOffset - minOffset), { 60.0 * sextant, 1.0, 1.0 }, 1.0);
01135             }
01136         }
01137
01138         AddGradientStop(thirdDimensionSliderGradientBrush, 1.0, { static_cast<double>(maxHue), 1.0, 1.0 }, 1.0);
01139     }
01140     break;
01141     }
01142 }
01143
01144 void ColorPicker::SetThirdDimensionSliderChannel()
01145 {
01146     if (auto&& thirdDimensionSlider = m_thirdDimensionSlider.get())
01147     {
01148         switch (ColorSpectrumComponents())
01149         {
01150         case winrt::ColorSpectrumComponents::ValueSaturation:
01151         case winrt::ColorSpectrumComponents::SaturationValue:
01152             thirdDimensionSlider.ColorChannel(winrt::ColorPickerHsvChannel::Hue);
01153             winrt::AutomationProperties::SetName(thirdDimensionSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameHueSlider));
01154             break;
01155
01156         case winrt::ColorSpectrumComponents::HueValue:
01157         case winrt::ColorSpectrumComponents::ValueHue:
01158             thirdDimensionSlider.ColorChannel(winrt::ColorPickerHsvChannel::Saturation);
01159             winrt::AutomationProperties::SetName(thirdDimensionSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameSaturationSlider));
01160             break;
01161
01162         case winrt::ColorSpectrumComponents::HueSaturation:
01163         case winrt::ColorSpectrumComponents::SaturationHue:
01164             thirdDimensionSlider.ColorChannel(winrt::ColorPickerHsvChannel::Value);
01165             winrt::AutomationProperties::SetName(thirdDimensionSlider, ResourceAccessor::GetLocalizedStringResource(SR_AutomationNameValueSlider));
01166             break;
01167         }
01168     }
01169 }
01170
01171 void ColorPicker::UpdateAlphaSlider()
01172 {
01173     if (!m_alphaSlider || !m_alphaSliderGradientBrush)
01174     {
01175         return;
01176     }
01177
01178     auto&& alphaSlider = m_alphaSlider.get();
01179     auto&& alphaSliderGradientBrush = m_alphaSliderGradientBrush.get();
01180
01181     // Since the slider changes only one color dimension, we can use a LinearGradientBrush
01182     // for its background instead of needing to manually set pixels ourselves.
01183     // We'll have the gradient go between the minimum and maximum values in the case where
01184     // the slider handles saturation or value, or in the case where it handles hue,
01185     // we'll have it go between red, yellow, green, cyan, blue, and purple, in that order.
01186     alphaSliderGradientBrush.GradientStops().Clear();
01187
01188     alphaSlider.Minimum(0);
01189     alphaSlider.Maximum(100);
01190     alphaSlider.Value(m_currentAlpha * 100);
01191
01192     AddGradientStop(alphaSliderGradientBrush, 0.0, m_currentHsv, 0.0);
01193     AddGradientStop(alphaSliderGradientBrush, 1.0, m_currentHsv, 1.0);
01194 }
01195
01196 void ColorPicker::CreateColorPreviewCheckeredBackground()
01197 {
01198     if (SharedHelpers::IsInDesignMode()) return;
01199
01200     if (auto&& colorPreviewRectangleGrid = m_colorPreviewRectangleGrid.get())
01201     {
01202         if (m_colorPreviewRectangleCheckeredBackgroundImageBrush.get())
01203         {
01204             int width = static_cast<int>(round(colorPreviewRectangleGrid.ActualWidth()));
01205             int height = static_cast<int>(round(colorPreviewRectangleGrid.ActualHeight()));
01206             shared_ptr<vector<::byte>> bgraCheckeredPixelData = make_shared<vector<::byte>>();
01207             auto strongThis = get_strong();
01208
01209             auto dispatcherQueue = DispatcherQueue();
01210             CreateCheckeredBackgroundAsync(
01211                 width,
01212                 height,
01213                 GetCheckerColor(),
01214                 bgraCheckeredPixelData,
01215                 m_createColorPreviewRectangleCheckeredBackgroundBitmapAction,
01216                 dispatcherQueue,
01217                 [strongThis](winrt::WriteableBitmap checkeredBackgroundSoftwareBitmap)
01218                 {
01219                     strongThis->m_colorPreviewRectangleCheckeredBackgroundImageBrush.get().ImageSource(checkeredBackgroundSoftwareBitmap);
01220                 });
01221         }
01222     }
01223 }
01224
01225 void ColorPicker::CreateAlphaSliderCheckeredBackground()
01226 {
01227     if (SharedHelpers::IsInDesignMode()) return;
01228
01229     if (auto&& alphaSliderBackgroundRectangle = m_alphaSliderBackgroundRectangle.get())
01230     {
01231         if (m_alphaSliderCheckeredBackgroundImageBrush.get())
01232         {
01233             int width = static_cast<int>(round(alphaSliderBackgroundRectangle.ActualWidth()));
01234             int height = static_cast<int>(round(alphaSliderBackgroundRectangle.ActualHeight()));
01235             shared_ptr<vector<::byte>> bgraCheckeredPixelData = make_shared<vector<::byte>>();
01236             auto strongThis = get_strong();
01237
01238             auto dispatcherQueue = DispatcherQueue();
01239             CreateCheckeredBackgroundAsync(
01240                 width,
01241                 height,
01242                 GetCheckerColor(),
01243                 bgraCheckeredPixelData,
01244                 m_alphaSliderCheckeredBackgroundBitmapAction,
01245                 dispatcherQueue,
01246                 [strongThis](winrt::WriteableBitmap checkeredBackgroundSoftwareBitmap)
01247                 {
01248                     strongThis->m_alphaSliderCheckeredBackgroundImageBrush.get().ImageSource(checkeredBackgroundSoftwareBitmap);
01249                 });
01250         }
01251     }
01252 }
01253
01254 void ColorPicker::AddGradientStop(const winrt::LinearGradientBrush& brush, double offset, Hsv hsvColor, double alpha)
01255 {
01256     winrt::GradientStop stop;
01257
01258     Rgb rgbColor = HsvToRgb(hsvColor);
01259
01260     stop.Color(winrt::ColorHelper::FromArgb(
01261         static_cast<unsigned char>(round(alpha * 255)),
01262         static_cast<unsigned char>(round(rgbColor.r * 255)),
01263         static_cast<unsigned char>(round(rgbColor.g * 255)),
01264         static_cast<unsigned char>(round(rgbColor.b * 255))));
01265     stop.Offset(offset);
01266
01267     brush.GradientStops().Append(stop);
01268 }
01269
01270 winrt::Color ColorPicker::GetCheckerColor()
01271 {
01272     winrt::Color checkerColor;
01273
01274     if (auto&& checkerColorBrush = m_checkerColorBrush.get())
01275     {
01276         checkerColor = checkerColorBrush.Color();
01277     }
01278     else
01279     {
01280         winrt::IInspectable checkerColorAsI = winrt::Application::Current().Resources().Lookup(box_value(L"SystemListLowColor"));
01281         checkerColor = unbox_value<winrt::Color>(checkerColorAsI);
01282     }
01283
01284     return checkerColor;
01285 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewDragItemsStartingEventArgs.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewDragItemsStartingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Vector.h"
00007 #include "TreeViewDragItemsStartingEventArgs.h"
00008
00009 TreeViewDragItemsStartingEventArgs::TreeViewDragItemsStartingEventArgs(const winrt::DragItemsStartingEventArgs& args)
00010 {
00011     m_dragItemsStartingEventArgs = args;
00012 }
00013
00014 bool TreeViewDragItemsStartingEventArgs::Cancel() const
00015 {
00016     return m_dragItemsStartingEventArgs.Cancel();
00017 }
00018
00019 void TreeViewDragItemsStartingEventArgs::Cancel(const bool value)
00020 {
00021     m_dragItemsStartingEventArgs.Cancel(value);
00022 }
00023
00024 DataPackage TreeViewDragItemsStartingEventArgs::Data() const
00025 {
00026     return m_dragItemsStartingEventArgs.Data();
00027 }
00028
00029 winrt::IVector<winrt::IInspectable> TreeViewDragItemsStartingEventArgs::Items()
00030 {
00031     return m_dragItemsStartingEventArgs.Items();
00032 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayoutState.h Source File

  • File List
  • File Members
  • Repeater

UniformGridLayoutState.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ElementManager.h"
00007 #include "UniformGridLayoutState.g.h"
00008 #include "FlowLayoutAlgorithm.h"
00009
00010 class UniformGridLayoutState :
00011     public ReferenceTracker<UniformGridLayoutState, winrt::implementation::UniformGridLayoutStateT, winrt::composing>
00012 {
00013 public:
00014     void InitializeForContext(
00015         const winrt::VirtualizingLayoutContext& context,
00016         IFlowLayoutAlgorithmDelegates* callbacks);
00017     void UninitializeForContext(const winrt::VirtualizingLayoutContext& context);
00018
00019     ::FlowLayoutAlgorithm& FlowAlgorithm() { return m_flowAlgorithm; }
00020     double EffectiveItemWidth() const { return m_effectiveItemWidth; }
00021     double EffectiveItemHeight() const { return m_effectiveItemHeight; }
00022
00023     void EnsureElementSize(
00024         const winrt::Size availableSize,
00025         const winrt::VirtualizingLayoutContext& context,
00026         const double itemWidth,
00027         const double itemHeight,
00028         const winrt::UniformGridLayoutItemsStretch& stretch,
00029         const winrt::Orientation& orientation,
00030         const double minRowSpacing,
00031         const double minColumnSpacing,
00032         unsigned int maxItemsPerLine);
00033     void InvalidateElementSize();
00034
00035 private:
00036     ::FlowLayoutAlgorithm m_flowAlgorithm{ this };
00037     bool m_isEffectiveSizeValid{ false };
00038     double m_effectiveItemWidth{ 0.0 };
00039     double m_effectiveItemHeight{ 0.0 };
00040
00041     winrt::Size CalculateAvailableSize(
00042         const winrt::Size availableSize,
00043         const winrt::Orientation orientation,
00044         const winrt::UniformGridLayoutItemsStretch& stretch,
00045         const unsigned int maxItemsPerLine,
00046         const double itemWidth,
00047         const double itemHeight,
00048         const double minRowSpacing,
00049         const double minColumnSpacing) const;
00050
00051     double CalculateExtraPixelsInLine(
00052         const unsigned int maxItemsPerLine,
00053         const float availableSizeMinor,
00054         const double itemSizeMinor,
00055         const double minorItemSpacing) const;
00056
00057     void SetSize(const winrt::Size& desiredItemSize,
00058         const double itemWidth,
00059         const double itemHeight,
00060         const winrt::Size availableSize,
00061         const winrt::UniformGridLayoutItemsStretch& stretch,
00062         const winrt::Orientation& orientation,
00063         const double minRowSpacing,
00064         const double minColumnSpacing,
00065         unsigned int maxItemsPerLine);
00066 };
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Expander/Expander.h Source File

  • File List
  • File Members
  • Expander

Expander.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "ExpanderTemplateSettings.h"
00010
00011 #include "Expander.g.h"
00012 #include "Expander.properties.h"
00013
00014 class Expander :
00015     public ReferenceTracker<Expander, winrt::implementation::ExpanderT>,
00016     public ExpanderProperties
00017 {
00018 public:
00019     Expander();
00020     ~Expander() {}
00021
00022     // IUIElement
00023     virtual winrt::AutomationPeer OnCreateAutomationPeer();
00024
00025     // IFrameworkElement
00026     void OnApplyTemplate();
00027
00028
00029     void RaiseExpandingEvent(const winrt::Expander& container);
00030     void RaiseCollapsedEvent(const winrt::Expander& container);
00031
00032     void OnIsExpandedPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00033     void OnExpandDirectionPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00034
00035 private:
00036     void UpdateExpandDirection(bool useTransitions);
00037     void UpdateExpandState(bool useTransitions);
00038     void OnContentSizeChanged(const winrt::IInspectable&, const winrt::SizeChangedEventArgs& args);
00039
00040     winrt::Border::SizeChanged_revoker m_expanderContentSizeChangedRevoker{};
00041 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ListViewElementNameBindingPage Member List

This is the complete list of members for ListViewElementNameBindingPage, including all inherited members.
ChkSample_CheckedChanged(object sender, RoutedEventArgs e) | ListViewElementNameBindingPage | [inline, private]
ListView_ItemClick(object sender, ItemClickEventArgs e) | ListViewElementNameBindingPage | [inline, private]
ListViewElementNameBindingPage() | ListViewElementNameBindingPage | [inline]
Numbers | ListViewElementNameBindingPage |
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealListPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealListPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.ObjectModel;
00005 using Windows.UI;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Media;
00008 using MUXControlsTestApp.Utilities;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public class SampleSuggestions
00013     {
00014         public ObservableCollection<string> Suggestions
00015         {
00016             get
00017             {
00018                 return new ObservableCollection< string > { "Suggestion 1", "Suggestion 2", "Suggestion 3", "Suggestion 4" };
00019             }
00020         }
00021     }
00022
00023     public sealed partial class RevealListPage : TestPage
00024     {
00025         public RevealListPage()
00026         {
00027             this.InitializeComponent();
00028         }
00029
00030         public SemanticZoomTemplateItem[] DataTemplateList
00031         {
00032             get
00033             {
00034                 return new SemanticZoomTemplateItem[]
00035                 {
00036                     new SemanticZoomTemplateItem("Lists", "ListViewTest"),
00037                     new SemanticZoomTemplateItem("Multi Selection Lists", "MultiListViewTest"),
00038                     new SemanticZoomTemplateItem("Grid View", "GridViewTest"),
00039                     new SemanticZoomTemplateItem("Auto Suggestion Box", "AutoSuggestBoxTest"),
00040                     new SemanticZoomTemplateItem("Combo Box", "ComboBoxTest"),
00041                 };
00042             }
00043         }
00044
00045         private void OnBorderColorButtonClick(object sender, RoutedEventArgs e)
00046         {
00047             if (RootCanvas.Background is Microsoft.UI.Xaml.Media.ImageBrush)
00048             {
00049                 if (RequestedTheme == ElementTheme.Dark)
00050                     RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.Black);
00051                 else
00052                     RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.White);
00053             }
00054             else
00055             {
00056                 RootCanvas.Background = Resources["BGImageBrush"] as Microsoft.UI.Xaml.Media.ImageBrush;
00057             }
00058         }
00059
00060         private void OnBackgroundColorButtonClick(object sender, RoutedEventArgs e)
00061         {
00062             if (RequestedTheme == ElementTheme.Dark)
00063             {
00064                 RequestedTheme = ElementTheme.Light;
00065                 RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.White);
00066             }
00067             else
00068             {
00069                 RequestedTheme = ElementTheme.Dark;
00070                 RootCanvas.Background = new SolidColorBrush(Microsoft.UI.Colors.Black);
00071             }
00072         }
00073     }
00074 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlatSample Member List

This is the complete list of members for FlatSample, including all inherited members.
_data | FlatSample | [private]
clear_Click(object sender, RoutedEventArgs e) | FlatSample | [inline, private]
FlatSample() | FlatSample | [inline]
insert_Click(object sender, RoutedEventArgs e) | FlatSample | [inline, private]
OnBackClicked(object sender, RoutedEventArgs e) | FlatSample | [inline, private]
OnGroupedClicked(object sender, RoutedEventArgs e) | FlatSample | [inline, private]
OnMultipleSelectionClicked(object sender, RoutedEventArgs e) | FlatSample | [inline, private]
remove_Click(object sender, RoutedEventArgs e) | FlatSample | [inline, private]
Repeater_ElementIndexChanged(ItemsRepeater sender, ItemsRepeaterElementIndexChangedEventArgs args) | FlatSample | [inline, private]
Repeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | FlatSample | [inline, private]
SelectionModel_PropertyChanged(object sender, PropertyChangedEventArgs e) | FlatSample | [inline, private]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.h Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedBackVisualSource.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 //------------------------------------------------------------------------------
00003 // <auto-generated>
00004 //     This code was generated by a tool.
00005 //
00006 //       LottieGen version:
00007 //           7.1.0+ge1fa92580f
00008 //
00009 //       Command:
00010 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedBackVisualSource.json
00011 //
00012 //       Input file:
00013 //           AnimatedBackVisualSource.json (21751 bytes created 23:37-07:00 Oct 5 2021)
00014 //
00015 //       LottieGen source:
00016 //           http://aka.ms/Lottie
00017 //
00018 //     Changes to this file may cause incorrect behavior and will be lost if
00019 //     the code is regenerated.
00020 // </auto-generated>
00021 //------------------------------------------------------------------------------
00022 #include "common.h"
00023 #include "AnimatedVisuals\AnimatedBackVisualSource.g.h"
00024
00025 // Name:        Controls_03_Back
00026 // Frame rate:  60 fps
00027 // Frame count: 80
00028 // Duration:    1333.3 mS
00029 // _____________________________________________________________________________________________
00030 // |           Marker           |           Constant           | Frame |   mS   |   Progress   |
00031 // |____________________________|______________________________|_______|________|______________|
00032 // | NormalToPointerOver_Start  | M_NormalToPointerOver_Start  |     0 |    0.0 | 0.0F         |
00033 // | NormalToPointerOver_End    | M_NormalToPointerOver_End    |     9 |  150.0 | 0.113124996F |
00034 // | NormalToPressed_Start      | M_NormalToPressed_Start      |    10 |  166.7 | 0.125624999F |
00035 // | NormalToPressed_End        | M_NormalToPressed_End        |    19 |  316.7 | 0.238124996F |
00036 // | PointerOverToNormal_Start  | M_PointerOverToNormal_Start  |    20 |  333.3 | 0.250625014F |
00037 // | PointerOverToNormal_End    | M_PointerOverToNormal_End    |    29 |  483.3 | 0.363124996F |
00038 // | PointerOverToPressed_Start | M_PointerOverToPressed_Start |    30 |  500.0 | 0.375625014F |
00039 // | PointerOverToPressed_End   | M_PointerOverToPressed_End   |    39 |  650.0 | 0.488124996F |
00040 // | PressedToNormal_Start      | M_PressedToNormal_Start      |    40 |  666.7 | 0.500625014F |
00041 // | PressedToNormal_End        | M_PressedToNormal_End        |    59 |  983.3 | 0.738125026F |
00042 // | PressedToPointerOver_Start | M_PressedToPointerOver_Start |    60 | 1000.0 | 0.750625014F |
00043 // | PressedToPointerOver_End   | M_PressedToPointerOver_End   |    79 | 1316.7 | 0.988125026F |
00044 // ---------------------------------------------------------------------------------------------
00045 // _________________________________________________________
00046 // | Theme property |  Accessor  | Type  |  Default value  |
00047 // |________________|____________|_______|_________________|
00048 // | Foreground     | Foreground | Color | #FF000000 Black |
00049 // ---------------------------------------------------------
00050
00051 class AnimatedBackVisualSource
00052     : public winrt::implementation::AnimatedBackVisualSourceT<AnimatedBackVisualSource>
00053 {
00054     winrt::Microsoft::UI::Composition::CompositionPropertySet _themeProperties{ nullptr };
00055     winrt::Windows::UI::Color _themeForeground{ 0xFF, 0x00, 0x00, 0x00 };
00056     winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00057
00058     static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4(winrt::Windows::UI::Color color);
00059 public:
00060     // Animation duration: 1.333 seconds.
00061     static constexpr int64_t c_durationTicks{ 13333333L };
00062
00063     // Marker: NormalToPointerOver_Start.
00064     static constexpr float M_NormalToPointerOver_Start{ 0.0F };
00065
00066     // Marker: NormalToPointerOver_End.
00067     static constexpr float M_NormalToPointerOver_End{ 0.113124996F };
00068
00069     // Marker: NormalToPressed_Start.
00070     static constexpr float M_NormalToPressed_Start{ 0.125624999F };
00071
00072     // Marker: NormalToPressed_End.
00073     static constexpr float M_NormalToPressed_End{ 0.238124996F };
00074
00075     // Marker: PointerOverToNormal_Start.
00076     static constexpr float M_PointerOverToNormal_Start{ 0.250625014F };
00077
00078     // Marker: PointerOverToNormal_End.
00079     static constexpr float M_PointerOverToNormal_End{ 0.363124996F };
00080
00081     // Marker: PointerOverToPressed_Start.
00082     static constexpr float M_PointerOverToPressed_Start{ 0.375625014F };
00083
00084     // Marker: PointerOverToPressed_End.
00085     static constexpr float M_PointerOverToPressed_End{ 0.488124996F };
00086
00087     // Marker: PressedToNormal_Start.
00088     static constexpr float M_PressedToNormal_Start{ 0.500625014F };
00089
00090     // Marker: PressedToNormal_End.
00091     static constexpr float M_PressedToNormal_End{ 0.738125026F };
00092
00093     // Marker: PressedToPointerOver_Start.
00094     static constexpr float M_PressedToPointerOver_Start{ 0.750625014F };
00095
00096     // Marker: PressedToPointerOver_End.
00097     static constexpr float M_PressedToPointerOver_End{ 0.988125026F };
00098
00099     // Theme property: Foreground.
00100     static inline const winrt::Windows::UI::Color c_themeForeground{ 0xFF, 0x00, 0x00, 0x00 };
00101
00102
00103     winrt::Windows::UI::Color Foreground();
00104     void Foreground(winrt::Windows::UI::Color value);
00105
00106     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00107         winrt::Microsoft::UI::Composition::Compositor const& compositor);
00108
00109     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00110         winrt::Microsoft::UI::Composition::Compositor const& compositor,
00111         winrt::Windows::Foundation::IInspectable& diagnostics);
00112
00113     // Gets the number of frames in the animation.
00114     double FrameCount();
00115
00116     // Gets the framerate of the animation.
00117     double Framerate();
00118
00119     // Gets the duration of the animation.
00120     winrt::Windows::Foundation::TimeSpan Duration();
00121
00122     // Converts a zero-based frame number to the corresponding progress value denoting the
00123     // start of the frame.
00124     double FrameToProgress(double frameNumber);
00125
00126     // Returns a map from marker names to corresponding progress values.
00127     winrt::Windows::Foundation::Collections::IMapView<hstring, double> Markers();
00128
00129     // Sets the color property with the given name, or does nothing if no such property
00130     // exists.
00131     void SetColorProperty(hstring const& propertyName, winrt::Windows::UI::Color value);
00132
00133     // Sets the scalar property with the given name, or does nothing if no such property
00134     // exists.
00135     void SetScalarProperty(hstring const& propertyName, double value);
00136 };
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlType.cpp Source File

  • File List
  • File Members
  • dll

XamlType.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "XamlType.h"
00007 #include "XamlMember.h"
00008 #include "XamlMetadataProvider.h"
00009
00010 void XamlTypeBase::AddDPMember(
00011     wstring_view const& name,
00012     wstring_view const& memberTypeName,
00013     winrt::DependencyProperty const& dp,
00014     bool isContent)
00015 {
00016     MUX_ASSERT(dp);
00017     AddMember(
00018         name,
00019         memberTypeName,
00020         [dp](winrt::IInspectable instance)
00021             {
00022                 return instance.as<winrt::DependencyObject>().GetValue(dp);
00023             },
00024         [dp](winrt::IInspectable instance, winrt::IInspectable value)
00025             {
00026                 return instance.as<winrt::DependencyObject>().SetValue(dp, value);
00027             },
00028         isContent,
00029         true /* isDependencyProperty */,
00030         false /* isAttachable */
00031          );
00032 }
00033
00034 winrt::IXamlType XamlTypeBase::BaseType()
00035 {
00036     return m_baseType;
00037 }
00038
00039 winrt::IXamlMember XamlTypeBase::ContentProperty()
00040 {
00041     return m_contentProperty;
00042 }
00043
00044 winrt::hstring XamlTypeBase::FullName()
00045 {
00046     return m_typeName;
00047 }
00048
00049 bool XamlTypeBase::IsArray()
00050 {
00051     return false;
00052 }
00053
00054 bool XamlTypeBase::IsCollection()
00055 {
00056     return static_cast<bool>(m_collectionAdd);
00057 }
00058
00059 bool XamlTypeBase::IsConstructible()
00060 {
00061     return static_cast<bool>(m_activator);
00062 }
00063
00064 bool XamlTypeBase::IsDictionary()
00065 {
00066     return static_cast<bool>(m_addToMap);
00067 }
00068
00069 bool XamlTypeBase::IsMarkupExtension()
00070 {
00071     return false;
00072 }
00073
00074 bool XamlTypeBase::IsBindable()
00075 {
00076     return m_isBindable;
00077 }
00078
00079 winrt::IXamlType XamlTypeBase::ItemType()
00080 {
00081     return nullptr;
00082 }
00083
00084 winrt::IXamlType XamlTypeBase::KeyType()
00085 {
00086     return nullptr;
00087 }
00088
00089 winrt::IXamlType XamlTypeBase::BoxedType()
00090 {
00091     return m_boxedType;
00092 }
00093
00094 winrt::TypeName XamlTypeBase::UnderlyingType()
00095 {
00096     winrt::TypeName typeName;
00097     typeName.Name = m_typeName;
00098     typeName.Kind =
00099         m_isSystemType ?
00100         winrt::TypeKind::Primitive:
00101         winrt::TypeKind::Metadata;
00102     return typeName;
00103 }
00104
00105 winrt::IInspectable XamlTypeBase::ActivateInstance()
00106 {
00107     if (m_activator)
00108     {
00109         return m_activator();
00110     }
00111
00112     return nullptr;
00113 }
00114
00115 winrt::IInspectable XamlTypeBase::CreateFromString(winrt::hstring const& value)
00116 {
00117     if (m_createFromString)
00118     {
00119         return m_createFromString(value);
00120     }
00121
00122     return nullptr;
00123 }
00124
00125 winrt::IXamlMember XamlTypeBase::GetMember(winrt::hstring const& name)
00126 {
00127     for (const auto& member : m_members)
00128     {
00129         if (member.Name() == name)
00130         {
00131             return member;
00132         }
00133     }
00134
00135     return nullptr;
00136 }
00137
00138 void XamlTypeBase::AddToVector(winrt::IInspectable const& instance, winrt::IInspectable const& value)
00139 {
00140     if (m_collectionAdd)
00141     {
00142         m_collectionAdd(instance, value);
00143     }
00144 }
00145
00146 void XamlTypeBase::AddToMap(winrt::IInspectable const& instance, winrt::IInspectable const& key, winrt::IInspectable const& value)
00147 {
00148     if (m_addToMap)
00149     {
00150         m_addToMap(instance, key, value);
00151     }
00152 }
00153
00154 void XamlTypeBase::RunInitializer()
00155 {
00156 }
00157
00158 void XamlTypeBase::AddMember(
00159     wstring_view const& name,
00160     wstring_view const& memberTypeName,
00161     std::function<winrt::IInspectable(const winrt::IInspectable&)> getter,
00162     std::function<void(const winrt::IInspectable&, const winrt::IInspectable&)> setter,
00163     bool isContent,
00164     bool isDependencyProperty,
00165     bool isAttachable
00166 )
00167 {
00168     auto memberType =
00169         (memberTypeName == m_typeName)
00170             ? *this
00171             : XamlMetadataProvider::LookupXamlType(memberTypeName);
00172
00173     auto member =
00174         winrt::make<XamlMember>(
00175             name,
00176             memberType,
00177             getter,
00178             setter,
00179             isDependencyProperty,
00180             isAttachable);
00181
00182     m_members.push_back(member);
00183     if (isContent)
00184     {
00185         MUX_ASSERT(!m_contentProperty);
00186         m_contentProperty = member;
00187     }
00188 }
00189
00190 XamlType::XamlType(
00191     wstring_view const& typeName,
00192     wstring_view const& baseTypeName,
00193     std::function<winrt::IInspectable()> activator,
00194     std::function<void(XamlTypeBase&)> populatePropertiesFunc
00195     )
00196 {
00197     m_typeName = typeName;
00198     m_baseType = XamlMetadataProvider::LookupXamlType(baseTypeName);
00199     m_activator = activator;
00200     if (populatePropertiesFunc)
00201     {
00202         populatePropertiesFunc(*this);
00203     }
00204 }
00205
00206 void XamlType::SetCollectionAddFunc(std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> collectionAdd)
00207 {
00208     m_collectionAdd = collectionAdd;
00209 }
00210
00211 void XamlType::SetAddToMapFunc(std::function<void(winrt::IInspectable const&, winrt::IInspectable const&, winrt::IInspectable const&)> addToMap)
00212 {
00213     m_addToMap = addToMap;
00214 }
00215
00216 void XamlType::SetIsBindable(bool isBindable)
00217 {
00218     m_isBindable = isBindable;
00219 }
00220
00221 EnumXamlType::EnumXamlType(
00222     wstring_view const& typeName,
00223     std::function<winrt::IInspectable(hstring)> createFromString
00224     )
00225 {
00226     static winrt::IXamlType baseType = XamlMetadataProvider::LookupXamlType(winrt::name_of<int32_t>());
00227
00228     m_typeName = typeName;
00229     m_baseType = baseType;
00230     m_createFromString = createFromString;
00231 }
00232
00233 NullableXamlType::NullableXamlType(wstring_view const& typeName, wstring_view const& valueTypeName)
00234 {
00235     m_typeName = typeName;
00236     m_boxedType = XamlMetadataProvider::LookupXamlType(valueTypeName);
00237 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterRepeaterAnchoringPage::QueuedOperation Member List

This is the complete list of members for ScrollPresenterRepeaterAnchoringPage::QueuedOperation, including all inherited members.
NewCount | ScrollPresenterRepeaterAnchoringPage::QueuedOperation |
NewIndex | ScrollPresenterRepeaterAnchoringPage::QueuedOperation |
OldCount | ScrollPresenterRepeaterAnchoringPage::QueuedOperation |
OldIndex | ScrollPresenterRepeaterAnchoringPage::QueuedOperation |
QueuedOperation(QueuedOperationType type, int oldIndex, int oldCount, int newIndex, int newCount, bool reset) | ScrollPresenterRepeaterAnchoringPage::QueuedOperation | [inline]
Reset | ScrollPresenterRepeaterAnchoringPage::QueuedOperation |
Type | ScrollPresenterRepeaterAnchoringPage::QueuedOperation |
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MicaBackdrop Member List

This is the complete list of members for MicaBackdrop, including all inherited members.
abi_enter() | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
CheckThread() | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
ClearProperties() | MicaBackdropProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< MicaBackdrop > &&self) noexcept | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline, static]
EnsureProperties() | MicaBackdropProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
final_release(std::unique_ptr< MicaBackdrop > &&self) | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline, static]
GetBase() | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
GetInner() | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
IsOnThread() | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
Kind(winrt::MicaKind const &value) | MicaBackdropProperties |
Kind() | MicaBackdropProperties |
KindProperty() | MicaBackdropProperties | [inline, static]
m_controllers | MicaBackdrop | [private]
MicaBackdrop() | MicaBackdrop |
MicaBackdropProperties() | MicaBackdropProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
OnKindPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MicaBackdropProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | MicaBackdrop |
OnTargetConnected(ICompositionSupportsSystemBackdrop connectedTarget, winrt::Microsoft::UI::Xaml::XamlRoot xamlRoot) | MicaBackdrop |
OnTargetDisconnected(ICompositionSupportsSystemBackdrop disconnectedTarget) | MicaBackdrop |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MicaBackdrop, winrt::implementation::MicaBackdropT > | [inline]
s_KindProperty | MicaBackdropProperties | [static]
~MicaBackdrop() | MicaBackdrop | [virtual]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpotDiffuseEffect Member List

This is the complete list of members for SpotDiffuseEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1SpotDiffuse) | SpotDiffuseEffect
DECLARE_NAMED_PROPERTY_MAPPING({L"LightPosition", D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightTarget", D2D1_SPOTDIFFUSE_PROP_POINTS_AT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Focus", D2D1_SPOTDIFFUSE_PROP_FOCUS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LimitingConeAngle", D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"DiffuseAmount", D2D1_SPOTDIFFUSE_PROP_DIFFUSE_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_SPOTDIFFUSE_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_SPOTDIFFUSE_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_SPOTDIFFUSE_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_SPOTDIFFUSE_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(LightTarget, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(Focus, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(LimitingConeAngle, float, k_PI/2.0f, true) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(DiffuseAmount, float, 1.0f, value >=0.0f &&value<=10000.0f) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(LightColor, UIColor,(UIColor{255, 255, 255, 255}), true) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f) | SpotDiffuseEffect
DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true) | SpotDiffuseEffect
DECLARE_SINGLE_SOURCE(Source) | SpotDiffuseEffect
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | SpotDiffuseEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | SpotDiffuseEffect | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NestedGridViewsPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

NestedGridViewsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Data;
00008 using Microsoft.UI.Xaml.Input;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class NestedGridViewsPage : TestPage
00013     {
00014         public NestedGridViewsPage()
00015         {
00016             this.InitializeComponent();
00017         }
00018
00019         private void BtnSwitchOuterListViewVisibility_Click(object sender, RoutedEventArgs e)
00020         {
00021             if (outerListView != null)
00022             {
00023                 if (outerListView.Visibility == Visibility.Visible)
00024                 {
00025                     outerListView.Visibility = Visibility.Collapsed;
00026                 }
00027                 else
00028                 {
00029                     outerListView.Visibility = Visibility.Visible;
00030                 }
00031             }
00032         }
00033
00034         private void ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged(object sender, RoutedEventArgs e)
00035         {
00036             if (outerListView != null && chkOuterListViewSingleSelectionFollowsFocus != null)
00037             {
00038                 outerListView.SingleSelectionFollowsFocus = (bool)chkOuterListViewSingleSelectionFollowsFocus.IsChecked;
00039             }
00040         }
00041
00042         private void CmbOuterListViewSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00043         {
00044             if (outerListView != null && cmbOuterListViewSelectionMode != null)
00045             {
00046                 outerListView.SelectionMode = (ListViewSelectionMode)cmbOuterListViewSelectionMode.SelectedIndex;
00047             }
00048         }
00049
00050         private void CmbOuterListViewTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00051         {
00052             if (outerListView != null && cmbOuterListViewTabNavigation != null)
00053             {
00054                 outerListView.TabNavigation = (KeyboardNavigationMode)cmbOuterListViewTabNavigation.SelectedIndex;
00055             }
00056         }
00057
00058         private void BtnGetItemsStackPanelCacheLength_Click(object sender, RoutedEventArgs e)
00059         {
00060             try
00061             {
00062                 if (outerListView != null && txtItemsStackPanelCacheLength != null)
00063                 {
00064                     ItemsStackPanel itemsStackPanel = outerListView.ItemsPanelRoot as ItemsStackPanel;
00065
00066                     if (itemsStackPanel != null)
00067                     {
00068                         txtItemsStackPanelCacheLength.Text = itemsStackPanel.CacheLength.ToString();
00069                     }
00070                 }
00071             }
00072             catch (Exception ex)
00073             {
00074                 txtItemsStackPanelCacheLength.Text = ex.ToString();
00075             }
00076         }
00077
00078         private void BtnSetItemsStackPanelCacheLength_Click(object sender, RoutedEventArgs e)
00079         {
00080             try
00081             {
00082                 if (outerListView != null && txtItemsStackPanelCacheLength != null)
00083                 {
00084                     ItemsStackPanel itemsStackPanel = outerListView.ItemsPanelRoot as ItemsStackPanel;
00085
00086                     if (itemsStackPanel != null)
00087                     {
00088                         itemsStackPanel.CacheLength = double.Parse(txtItemsStackPanelCacheLength.Text);
00089                     }
00090                 }
00091             }
00092             catch (Exception ex)
00093             {
00094                 txtItemsStackPanelCacheLength.Text = ex.ToString();
00095             }
00096         }
00097     }
00098
00099     public class PrefixConverter : IValueConverter
00100     {
00101         public object Convert(object value, Type targetType, object parameter, string language)
00102         {
00103             string prefix = parameter as string;
00104
00105             return prefix + " " + (value as string);
00106         }
00107
00108         public object ConvertBack(object value, Type targetType, object parameter, string language)
00109         {
00110             throw new NotImplementedException();
00111         }
00112     }
00113 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapControlPage Member List

This is the complete list of members for MapControlPage, including all inherited members.
AddLayer_Click(object sender, RoutedEventArgs e) | MapControlPage | [inline, private]
AddPin_Click(object sender, RoutedEventArgs e) | MapControlPage | [inline, private]
CenterButton_Click(object sender, RoutedEventArgs e) | MapControlPage | [inline, private]
GoButton_Click(object sender, RoutedEventArgs e) | MapControlPage | [inline, private]
Layer_MapElementClick(MapElementsLayer sender, MapElementClickEventArgs args) | MapControlPage | [inline, private]
Map_MapElementClick(MapControl sender, MapElementClickEventArgs args) | MapControlPage | [inline, private]
Map_MapServiceErrorOccurred(MapControl sender, MapControlMapServiceErrorOccurredEventArgs args) | MapControlPage | [inline, private]
MapControlPage() | MapControlPage | [inline]
SetZoom_Click(object sender, RoutedEventArgs e) | MapControlPage | [inline, private]
ToggleSwitch_Toggled(object sender, RoutedEventArgs e) | MapControlPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvas.cpp Source File

  • File List
  • File Members
  • InkCanvas

InkCanvas.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "InkCanvas.h"
00007 #include "InkCanvasAutomationPeer.h"
00008 #include "RuntimeProfiler.h"
00009 #include "Microsoft.UI.Xaml.xamlroot.h"
00010 #include "Microsoft.UI.Composition.h"
00011 #include <pplawait.h>
00012
00013 // There is a sal bug in this header file that causes a compile warning (which we fail on) due to a
00014 // value type being identified with _In_opt_ (value types cannot be optional because there is no
00015 // way to know the difference between null and zero).  Disable this warning for this header.
00016 #pragma warning(push)
00017 #pragma warning (disable : 6553)
00018 #include <wil\resource.h>
00019 #pragma warning(pop)
00020
00021 // We use a weak pointer to track this so that it goes away when the last Ink control goes
00022 // away, rather than living until the end of the thread.
00023 thread_local std::weak_ptr<ThreadData> s_tlsThreadData;
00024
00025 //
00026 // Thread Data
00027 //
00028 //
00029 // The only reason this data is scoped to the thread is because it saves us synchronization work, which,
00030 // since the vast majority of application will only have one UI thread, would just be wasted and the
00031 // cost here isn't that great.
00032 struct ThreadData
00033 {
00034     winrt::com_ptr<IInkDesktopHost> m_inkHost;
00035     winrt::com_ptr<IDCompositionDevice> m_compositionDevice;
00036     wil::unique_hmodule m_hmodDComp;
00037 };
00038
00039 //
00040 // Generic Ink Work Item Callback.  This allows us to easily submit work to the Ink thread using a lambda.
00041 //
00042 struct GenericInkCallback : winrt::implements<GenericInkCallback, IInkHostWorkItem>
00043 {
00044     GenericInkCallback(const std::function<void()>& func)
00045         : m_func(func)
00046     {
00047     }
00048
00049     IFACEMETHODIMP Invoke() try
00050     {
00051         m_func();
00052         return S_OK;
00053     }
00054     catch (...)
00055     {
00056         // REVIEW: Is this the way that we want to handle this?  IInkHostWorkItem::Invoke needs to return
00057         //         a HRESULT, but I can't find any information on what happens if it does.  There is no way
00058         //         to pass it back and raise it on the UI thread.
00059         return winrt::to_hresult();
00060     }
00061
00062 private:
00063     std::function<void()> m_func;
00064 };
00065
00066
00067
00068 //
00069 //  InkCanvas
00070 //
00071
00072 InkCanvas::InkCanvas()
00073 {
00074     __RP_Marker_ClassById(RuntimeProfiler::ProfId_InkCanvas);
00075
00076     m_loadedRevoker = Loaded(winrt::auto_revoke, { this, &InkCanvas::OnLoaded });
00077     m_unloadedRevoker = Unloaded(winrt::auto_revoke, { this, &InkCanvas::OnUnloaded });
00078
00079     // Ensure that we have allocated our thread data
00080     m_threadData = s_tlsThreadData.lock();
00081     if (!m_threadData)
00082     {
00083
00084         // This is our first Ink Canvas on this thread so do a little bit of thread initialization.
00085
00086         m_threadData = std::make_unique<ThreadData>();
00087         s_tlsThreadData = m_threadData;
00088
00089         // Create a desktop host which will create a ink thread.  Normally, I wouldn't want to do this until we actually needed
00090         // it, but unfortunately, we need the host to create the presenter and we need to create a presenter so that it can be
00091         // accessed prior to entering the tree.
00092         winrt::check_hresult(CoCreateInstance(__uuidof(InkDesktopHost), nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(m_threadData->m_inkHost.put())));
00093     }
00094
00095     // Applications may want to access the ink presenter before they add the InkCanvas to the tree, so
00096     // make sure create one right away.
00097     CreateInkPresenter();
00098 }
00099
00100 InkCanvas::~InkCanvas()
00101 {
00102     // Ensure that we have torn down our dcomp stuff
00103     DetachFromVisualLink();
00104 }
00105
00106 void InkCanvas::OnLoaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
00107 {
00108     // Historically, there has been an issue with the firing of loaded/unloaded.  Although we are working
00109     // to fix this, we will implement the official workaround here to prevent any timing issues between these
00110     // changes;
00111     if (!IsLoaded())
00112     {
00113         return;
00114     }
00115
00116     // Hook up this ink canvas with the DComp tree.
00117     AttachToVisualLink();
00118
00119
00120     // Although the visual link will maintain position and clipping for for our visual, it won't update the
00121     // size of the system visual, which is ok, because its size does not clip its children (its clipping could,
00122     // but not its size).  However, the presenter won't see this size change either, so we need to explicitly
00123     // set the size of the presenter when the system rasterization scale, actual size or scale transform has changed.
00124
00125     m_xamlRootChangedRevoker = XamlRoot().Changed(winrt::auto_revoke,
00126         [weakThis{ get_weak() }](auto const& /*sender*/, auto const& /*args*/)
00127         {
00128             if (auto strongThis = weakThis.get())
00129             {
00130                 // Our Rasterization Scale may have changed.
00131                 strongThis->UpdateInkPresenterSize();
00132             }
00133         });
00134
00135     m_sizeChanged_revoker = SizeChanged(winrt::auto_revoke,
00136         [weakThis{ get_weak() }](auto const& sender, auto const& /*args*/)
00137         {
00138             if (auto strongThis = weakThis.get())
00139             {
00140                 strongThis->UpdateInkPresenterSize();
00141             }
00142         });
00143
00144     // Bug 52084592: Need way to be notified of xaml scale factor changes above an element.
00145     //
00146     // There doesn't appear to be an event that we can listen to to know when the scale factor for the canvas has
00147     // changed.  This is required, because the Ink Canvas uses this scale factor to configure the Ink Presenter
00148     // size in physical pixels.  Note: this is the accumulated scale from the root, not just the scale on the Ink
00149     // canvas.
00150     //
00151     // When we know what event to be listening for, add it here.
00152
00153     if (UseSystemVisualLink())
00154     {
00155         // This is the first time we know the size of the ink canvas so update the presenter
00156         UpdateInkPresenterSize();
00157     }
00158     else
00159     {
00160         // This is the first time we have a position for the ink canvas in the scene so position the dcomp pieces.
00161         PositionInkVisual();
00162     }
00163 }
00164
00165 void InkCanvas::OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
00166 {
00167     // Historically, there has been an issue with the firing of loaded/unloaded.  Although we are working
00168     // to fix this, we will implement the official workaround here to prevent any timing issues between these
00169     // changes;
00170     if (this->IsLoaded())
00171     {
00172         return;
00173     }
00174
00175     m_xamlRootChangedRevoker.revoke();
00176     m_sizeChanged_revoker.revoke();
00177
00178     DetachFromVisualLink();
00179 }
00180
00181 void InkCanvas::OnIsEnabledPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00182 {
00183     auto isEnabled = unbox_value<bool>(args.NewValue());
00184
00185     QueueInkPresenterWorkItem([isEnabled](auto presenter)
00186         {
00187             presenter.IsInputEnabled(isEnabled);
00188         });
00189 }
00190
00191 winrt::AutomationPeer InkCanvas::OnCreateAutomationPeer()
00192 {
00193     return winrt::make<InkCanvasAutomationPeer>(*this);
00194 }
00195
00196 winrt::IAsyncAction InkCanvas::QueueInkPresenterWorkItem(winrt::DoInkPresenterWork workItem)
00197 {
00198     // Since the ink presenter is created on the ink thread, applications may want to request
00199     // presenter work before the presenter is created (e.g. setting rendering attributes).
00200     // This is Ok, because by the time the ink thread runs this work, the presenter will be there.
00201     //
00202     // Applications may also request presenter work as the InkCanvas is being shut down (e.g.
00203     // they want to save the ink strokes.  This is also OK, but we need to make sure that we
00204     // keep the presenter alive long enough for that work to occur.
00205     //
00206     // So we need to take a strong reference to the InkCanvas and pass that as part of the
00207     // work item so that we can retrieve the presenter if it isn't there yet and ensure that we
00208     // extend the life of the presenter until after the work is complete.
00209
00210     concurrency::task_completion_event<void> taskComplete;
00211
00212     auto workItemWrapper = [workItem, taskComplete, strongThis = get_strong()]()
00213         {
00214             try
00215             {
00216                 // This shouldn't ever happen, since the first call to the ink thread should always be
00217                 // to create the presenter.
00218                 MUX_ASSERT(strongThis->m_inkPresenter);
00219                 if (strongThis->m_inkPresenter)
00220                 {
00221                     // Invoke the work item passing the presenter.
00222                     workItem(strongThis->m_inkPresenter);
00223                 }
00224                 taskComplete.set();
00225             }
00226             catch (...)
00227             {
00228                 taskComplete.set_exception(std::current_exception);
00229             }
00230         };
00231
00232     // Submit the work item to the ink thread
00233     winrt::check_hresult(m_threadData->m_inkHost->QueueWorkItem(winrt::make<GenericInkCallback>(workItemWrapper).get()));
00234
00235     // create a task to wait for the work item to complete and await it.
00236     auto inktask = concurrency::create_task(taskComplete, concurrency::task_continuation_context::get_current_winrt_context());
00237     co_await inktask;
00238
00239 }
00240
00241 void InkCanvas::CreateInkPresenter()
00242 {
00243     auto threadData = s_tlsThreadData.lock();
00244     auto inkHost = threadData->m_inkHost;
00245     auto weakThis = get_weak();
00246
00247     auto callback = winrt::make<GenericInkCallback>([weakThis, inkHost]()
00248         {
00249             auto strongThis = weakThis.get();
00250             if (!strongThis)
00251             {
00252                 return;
00253             }
00254
00255             // Create ink presenter
00256             winrt::com_ptr inkPresenterDesktop = winrt::capture<IInkPresenterDesktop>(
00257                 inkHost,
00258                 &IInkDesktopHost::CreateInkPresenter);
00259             auto inkPresenter = inkPresenterDesktop.as<winrt::InkPresenter>();
00260
00261             // Set up input devices
00262             winrt::CoreInputDeviceTypes types = winrt::CoreInputDeviceTypes::Mouse | winrt::CoreInputDeviceTypes::Pen | winrt::CoreInputDeviceTypes::Touch;
00263             inkPresenter.InputDeviceTypes(types);
00264
00265             // Set the initial size.  This doesn't really mean anything and we can probably get away with out it,
00266             // but it helps in debugging, so for now we will leave it.
00267             winrt::check_hresult(inkPresenterDesktop->SetSize(400,400));
00268
00269             // This m_inkPresetenr is only accessed on the ink thread, so we don't need to worry about contention.
00270             strongThis->m_inkPresenter = inkPresenter;
00271         });
00272     winrt::check_hresult(inkHost->QueueWorkItem(callback.get()));
00273 }
00274
00275 void InkCanvas::UpdateInkPresenterSize()
00276 {
00277     // Transform the width/height based on Xaml scaling
00278     auto transformer = TransformToVisual(nullptr);
00279     winrt::Rect rect{ 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight())};
00280     rect = transformer.TransformBounds(rect);
00281
00282     // Get the system scale
00283     auto rootScale = XamlRoot().RasterizationScale();
00284
00285     // Update the presenter
00286     QueueInkPresenterWorkItem([width = ActualWidth() * rootScale, height = ActualHeight() * rootScale](auto presenter)
00287         {
00288             auto inkPresenterDesktop = presenter.as<IInkPresenterDesktop>();
00289             inkPresenterDesktop->SetSize(static_cast<float>(width), static_cast<float>(height));
00290         });
00291 }
00292
00293 void InkCanvas::AttachToVisualLink()
00294 {
00295     // Verify that we are still attached to the same hwnd.  If the application moves an ink canvas from one
00296     // window to another, we will need to detach and reattach to a new visual link.
00297     HWND hostHwnd = NULL;
00298     auto xamlRoot = this->XamlRoot();
00299     if (!xamlRoot)
00300     {
00301         throw winrt::hresult_error(E_UNEXPECTED);
00302     }
00303
00304     winrt::com_ptr<IXamlRootNative> xamlRootNative = xamlRoot.as<IXamlRootNative>();
00305     winrt::check_hresult(xamlRootNative->get_HostWindow(&hostHwnd));
00306
00307     // Our target is good, we can continue to use it.
00308     if (hostHwnd == m_hostHwnd)
00309     {
00310         return;
00311     }
00312
00313     // Our current target is stale so detach from it
00314     if (m_hostHwnd)
00315     {
00316         DetachFromVisualLink();
00317     }
00318
00319     m_hostHwnd = hostHwnd;
00320
00321     // Ensure we have composition device for this thread.
00322     if (!m_threadData->m_compositionDevice)
00323     {
00324         if (!m_threadData->m_hmodDComp)
00325         {
00326             m_threadData->m_hmodDComp.reset(::LoadLibraryExW(L"dcomp.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32));
00327             if (!m_threadData->m_hmodDComp)
00328             {
00329                 throw winrt::hresult(HRESULT_FROM_WIN32(GetLastError()));
00330             }
00331         }
00332         typedef HRESULT(__stdcall* DCompositionCreateDevice3fn)(IUnknown*, REFIID, void** dcompositionDevice);
00333         auto CompositionCreateDevice = reinterpret_cast<DCompositionCreateDevice3fn>(::GetProcAddress(m_threadData->m_hmodDComp.get(), "DCompositionCreateDevice3"));
00334         if (!CompositionCreateDevice)
00335         {
00336             throw winrt::hresult(HRESULT_FROM_WIN32(GetLastError()));
00337         }
00338         winrt::check_hresult(CompositionCreateDevice(nullptr, IID_PPV_ARGS(&m_threadData->m_compositionDevice)));
00339     }
00340
00341     // Create our inking system visual
00342     winrt::check_hresult(m_threadData->m_compositionDevice->CreateVisual(m_inkRootVisual.put()));
00343
00344     // Attach the visual to the presenter
00345     QueueInkPresenterWorkItem([rootVisual = m_inkRootVisual, compositionDevice = m_threadData->m_compositionDevice, useSystemVisualLink = UseSystemVisualLink()](auto presenter)
00346         {
00347             auto desktopPresenter = presenter.as<IInkPresenterDesktop>();
00348             winrt::check_hresult(desktopPresenter->SetRootVisual(rootVisual.get(), nullptr));
00349             // only request a commit here if we are using the visual link.  If we are using the composition
00350             // target method, it will be committed when we set position.
00351             if (useSystemVisualLink)
00352             {
00353                 winrt::check_hresult(compositionDevice->Commit());
00354             }
00355         });
00356
00357     // If we are using the composition target method then skip the visual link code
00358     if (AttachToCompositionTarget())
00359     {
00360         return;
00361     }
00362
00363     // The visual link is created on the lifted side so we use the lifted compositor.
00364     auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00365
00366     // Create the the visual link
00367     m_systemVisualLink = winrt::ContentExternalOutputLink::Create(compositor);
00368     m_systemVisualLink.IsAboveContent(true);
00369
00370     // Set our ink visual into the visual link
00371     winrt::com_ptr<IDCompositionTarget> target = m_systemVisualLink.as<IDCompositionTarget>();
00372     winrt::check_hresult(target->SetRoot(m_inkRootVisual.get()));
00373
00374     // Add the visual link's lifted visual to our tree
00375     winrt::ElementCompositionPreview::SetElementChildVisual(*this, m_systemVisualLink.PlacementVisual());
00376 }
00377
00378 void InkCanvas::DetachFromVisualLink()
00379 {
00380     // This will noop if we aren't using the composition target
00381     DetachFromCompositionTarget();
00382
00383     winrt::ElementCompositionPreview::SetElementChildVisual(*this, nullptr);
00384
00385     m_systemVisualLink = nullptr;
00386     m_inkRootVisual = nullptr;
00387     m_hostHwnd = NULL;
00388
00389     // When we give up our last reference to the system visual, we need to let the
00390     // the system compositor know it has work to do.  Note that it is possible that
00391     // the application created, the canvas, but never used it (attached it to the tree),
00392     // so we may not have a compositor.
00393     if (m_threadData->m_compositionDevice)
00394     {
00395         m_threadData->m_compositionDevice->Commit();
00396     }
00397 }
00398
00399 // This section contains the code to handle the 'raw' composition target.  This is slightly confusing because the Visual link
00400 // actually is a composition target as well, but this is the legacy composition target code. Everything below here can be
00401 // deleted when the system visual link bug is fixed.
00402 bool InkCanvas::UseSystemVisualLink()
00403 {
00404     static bool useSystemVisualLink = [] {
00405         // We control whether we are using the system visual link by defining a boolean resource UseSystemVisualLink
00406         // in the application resources.  We initialize it upon first use so everything in the app gets the same
00407         // treatment.
00408         auto useSystemVisualKey = box_value(L"UseSystemVisualLink");
00409         if (winrt::Application::Current().Resources().HasKey(useSystemVisualKey))
00410         {
00411             return unbox_value<bool>(winrt::Application::Current().Resources().Lookup(useSystemVisualKey));
00412         }
00413         return false;
00414         }();
00415     return useSystemVisualLink;
00416 }
00417
00418 bool InkCanvas::AttachToCompositionTarget()
00419 {
00420     if (UseSystemVisualLink())
00421     {
00422         return false;
00423     }
00424
00425     m_targetData = TargetData::Get(m_hostHwnd);
00426
00427     // If we haven't created our composition target and root visual yet, do so
00428     if (!m_targetData->m_targetRootVisual)
00429     {
00430         auto threadData = s_tlsThreadData.lock();
00431         // Create a "top-most" target for this window
00432         winrt::check_hresult(threadData->m_compositionDevice->CreateTargetForHwnd(m_hostHwnd, TRUE /*topmost*/, m_targetData->m_compositionTarget.put()));
00433
00434         // Attach a host visual.  This is different than the ink root visual although both of them use the term root.
00435         // One is the root of the composition target (we will call that hostVisual) and one is the root of the
00436         // ink presenter (we will call that rootVisual)
00437         winrt::check_hresult(threadData->m_compositionDevice->CreateVisual(m_targetData->m_targetRootVisual.put()));
00438         winrt::check_hresult(m_targetData->m_compositionTarget->SetRoot(m_targetData->m_targetRootVisual.get()));
00439
00440         m_threadData->m_compositionDevice->Commit();
00441     }
00442
00443     // Attach the visual to the target root
00444     winrt::check_hresult(m_targetData->m_targetRootVisual->AddVisual(m_inkRootVisual.get(), true, nullptr));
00445
00446     // Register for the LayoutChanged event so we can move the system visual as the underlying control moves
00447     m_layoutUpdatedRevoker = LayoutUpdated(winrt::auto_revoke,
00448         [weakThis{ get_weak() }](auto const& /*sender*/, auto const& /*args*/)
00449         {
00450             if (auto strongThis = weakThis.get())
00451             {
00452                 strongThis->PositionInkVisual();
00453             }
00454         });
00455
00456     return true;
00457 }
00458
00459 void InkCanvas::DetachFromCompositionTarget()
00460 {
00461     if (UseSystemVisualLink() || !m_targetData)
00462     {
00463         return;
00464     }
00465
00466     // Quit listening for the layout changed event
00467     m_layoutUpdatedRevoker.revoke();
00468
00469     // remove our system visual from the composition target tree
00470     winrt::check_hresult(m_targetData->m_targetRootVisual->RemoveVisual(m_inkRootVisual.get()));
00471
00472     m_targetData.reset();
00473 }
00474
00475 void InkCanvas::PositionInkVisual()
00476 {
00477     // All of this is supposed be the functionality that we get from using the visual link
00478     if (UseSystemVisualLink()) return;
00479
00480     // Get the transform from the root visual to the element
00481     auto transformer = TransformToVisual(nullptr);
00482
00483     // Get the location of the Ink Canvas control in physical pixels.
00484     winrt::Rect rect { 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight())};
00485     rect = transformer.TransformBounds(rect);
00486
00487     // Use the same transform to get the current Xaml scale(s)
00488     winrt::Rect scaleRect{ 0, 0, 1, 1};
00489     scaleRect = transformer.TransformBounds(scaleRect);
00490
00491     //  Set the offset position of the canvas.  It seems that dcomp doesn't account for
00492     //  the root scale for the offset so we need to apply it.
00493     const float rootScale = static_cast<float>(XamlRoot().RasterizationScale());
00494     m_inkRootVisual->SetOffsetX(rect.X * rootScale);
00495     m_inkRootVisual->SetOffsetY(rect.Y * rootScale);
00496
00497     // Create the transform on on the system system visual.
00498     D2D_MATRIX_3X2_F visualTransform {
00499         scaleRect.Width, 0,
00500         0, scaleRect.Height,
00501         0, 0
00502     };
00503     if (FlowDirection() == winrt::FlowDirection::RightToLeft)
00504     {
00505         visualTransform.m11 *= -1;
00506         visualTransform.dx = rect.Width * rootScale;
00507     }
00508
00509     m_inkRootVisual->SetTransform(visualTransform);
00510
00511     m_threadData->m_compositionDevice->Commit();
00512
00513     UpdateInkPresenterSize();
00514 }
00515
00516 thread_local std::map<HWND, std::weak_ptr<InkCanvas::TargetData>> InkCanvas::TargetData::m_tlsMap;
00517
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/TestUI/CommandBarFlyoutMainPage.xaml.cs Source File

  • File List
  • File Members
  • CommandBarFlyout
  • TestUI

CommandBarFlyoutMainPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Private.Controls;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     [TopLevelTestPage(Name = "CommandBarFlyout", Icon = "CommandBarFlyout.png")]
00011     public sealed partial class CommandBarFlyoutMainPage : TestPage
00012     {
00013         public CommandBarFlyoutMainPage()
00014         {
00015             this.InitializeComponent();
00016         }
00017
00018         public void OnCommandBarFlyoutTestsClicked(object sender, object args)
00019         {
00020             var rootFrame = XamlRoot.Content as Frame;
00021             rootFrame.NavigateWithoutAnimation(typeof(CommandBarFlyoutPage), "CommandBarFlyout Tests");
00022         }
00023
00024         public void OnTextCommandBarFlyoutTestsClicked(object sender, object args)
00025         {
00026             var rootFrame = XamlRoot.Content as Frame;
00027             rootFrame.NavigateWithoutAnimation(typeof(TextCommandBarFlyoutPage), "TextCommandBarFlyout Tests");
00028         }
00029
00030         public void OnExtraCommandBarFlyoutTestsClicked(object sender, object args)
00031         {
00032             var rootFrame = XamlRoot.Content as Frame;
00033             rootFrame.NavigateWithoutAnimation(typeof(ExtraCommandBarFlyoutPage), "Extra CommandBarFlyout Tests");
00034         }
00035         private void CmbCommandBarFlyoutOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e)
00036         {
00037             MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00038                 "CommandBarFlyout",
00039                 cmbCommandBarFlyoutOutputDebugStringLevel.SelectedIndex == 1 || cmbCommandBarFlyoutOutputDebugStringLevel.SelectedIndex == 2,
00040                 cmbCommandBarFlyoutOutputDebugStringLevel.SelectedIndex == 2);
00041         }
00042     }
00043 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIcon.h Source File

  • File List
  • File Members
  • AnimatedIcon

AnimatedIcon.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "AnimatedIcon.g.h"
00010 #include "AnimatedIcon.properties.h"
00011 #include <queue>
00012
00013 class AnimatedIcon :
00014     public ReferenceTracker<AnimatedIcon, DeriveFromPathIconHelper_base, winrt::AnimatedIcon>,
00015     public AnimatedIconProperties
00016 {
00017
00018 public:
00019     AnimatedIcon();
00020     ~AnimatedIcon() {}
00021
00022     // IFrameworkElement
00023     void OnApplyTemplate();
00024     void OnLoaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&);
00025     void OnLayoutUpdatedAfterStateChanged(winrt::IInspectable const& sender, winrt::IInspectable const& args);
00026
00027     // FrameworkElement overrides
00028     winrt::Size MeasureOverride(winrt::Size const& availableSize);
00029     winrt::Size ArrangeOverride(winrt::Size const& finalSize);
00030
00031     void OnSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs&);
00032     void OnFallbackIconSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs&);
00033     void OnMirroredWhenRightToLeftPropertyChanged(const winrt::DependencyPropertyChangedEventArgs&);
00034     static void OnAnimatedIconStatePropertyChanged(
00035         const winrt::DependencyObject& sender,
00036         const winrt::DependencyPropertyChangedEventArgs& args);
00037     void OnAncestorAnimatedIconStatePropertyChanged(
00038         const winrt::DependencyObject& sender,
00039         const winrt::DependencyProperty& args);
00040     void OnStatePropertyChanged();
00041
00042     static winrt::DependencyProperty AnimatedIconStateProperty() { return s_StateProperty; }
00043
00044     // TestHooks
00045     void SetAnimationQueueBehavior(winrt::AnimatedIconAnimationQueueBehavior behavior);
00046     void SetDurationMultiplier(float multiplier);
00047     void SetSpeedUpMultiplier(float multiplier);
00048     void SetQueueLength(unsigned int length);
00049     winrt::hstring GetLastAnimationSegment();
00050     winrt::hstring GetLastAnimationSegmentStart();
00051     winrt::hstring GetLastAnimationSegmentEnd();
00052 private:
00053     winrt::Visual ConstructVisual();
00054     bool InsertVisual(winrt::Visual visual);
00055     void TransitionAndUpdateStates(const winrt::hstring& fromState, const winrt::hstring& toState, float playbackMultiplier = 1.0f);
00056     void TransitionStates(const winrt::hstring& fromState, const winrt::hstring& toState, const std::function<void()>& cleanupAction, float playtbackMultiplier = 1.0f);
00057     void PlaySegment(float from, float to, const std::function<void()>& cleanupAction = nullptr, float playbackMultiplier = 1.0f);
00058     void TrySetForegroundProperty(winrt::Color color, winrt::IAnimatedVisualSource2 const& source = nullptr);
00059     void TrySetForegroundProperty(winrt::IAnimatedVisualSource2 const& source = nullptr);
00060     void OnAnimationCompleted(winrt::IInspectable const&, winrt::CompositionBatchCompletedEventArgs const&);
00061     void OnForegroundPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00062     void OnFlowDirectionPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00063     void OnForegroundBrushColorPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00064     void SetRootPanelChildToFallbackIcon();
00065     void UpdateMirrorTransform();
00066
00067     tracker_ref<winrt::IAnimatedVisual> m_animatedVisual{ this };
00068     tracker_ref<winrt::Panel> m_rootPanel{ this };
00069     tracker_ref<winrt::Microsoft::UI::Xaml::Media::ScaleTransform> m_scaleTransform{ this };
00070
00071     winrt::hstring m_currentState{ L"" };
00072     winrt::hstring m_previousState{ L"" };
00073     std::queue<winrt::hstring> m_queuedStates{};
00074     unsigned int m_queueLength{ 4 };
00075     winrt::hstring m_pendingState{ L"" };
00076     winrt::hstring m_lastAnimationSegment{ L"" };
00077     winrt::hstring m_lastAnimationSegmentStart{ L"" };
00078     winrt::hstring m_lastAnimationSegmentEnd{ L"" };
00079     bool m_isPlaying{ false };
00080     bool m_canDisplayPrimaryContent{ true };
00081     float m_previousSegmentLength{ 1.0f };
00082     float m_durationMultiplier{ 1.0 };
00083     float m_speedUpMultiplier{ 7.0f };
00084     bool m_isSpeedUp{ false };
00085
00086
00087     winrt::CompositionPropertySet m_progressPropertySet{ nullptr };
00088     winrt::CompositionScopedBatch m_batch{ nullptr };
00089
00090     ScopedBatchCompleted_revoker m_batchCompletedRevoker{ };
00091     PropertyChanged_revoker m_ancestorStatePropertyChangedRevoker{};
00092     winrt::FrameworkElement::LayoutUpdated_revoker m_layoutUpdatedRevoker{};
00093     PropertyChanged_revoker m_foregroundColorPropertyChangedRevoker{};
00094
00095     winrt::AnimatedIconAnimationQueueBehavior m_queueBehavior{ winrt::AnimatedIconAnimationQueueBehavior::QueueOne };
00096 };
Generated on Sun Dec 1 2024 20:51:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPictureTemplateSettings Member List

This is the complete list of members for PersonPictureTemplateSettings, including all inherited members.
ActualImageBrush(winrt::ImageBrush const &value) | PersonPictureTemplateSettingsProperties |
ActualImageBrush() | PersonPictureTemplateSettingsProperties |
ActualImageBrushProperty() | PersonPictureTemplateSettingsProperties | [inline, static]
ActualInitials(winrt::hstring const &value) | PersonPictureTemplateSettingsProperties |
ActualInitials() | PersonPictureTemplateSettingsProperties |
ActualInitialsProperty() | PersonPictureTemplateSettingsProperties | [inline, static]
ClearProperties() | PersonPictureTemplateSettingsProperties | [static]
EnsureProperties() | PersonPictureTemplateSettingsProperties | [static]
PersonPictureTemplateSettingsProperties() | PersonPictureTemplateSettingsProperties |
s_ActualImageBrushProperty | PersonPictureTemplateSettingsProperties | [static]
s_ActualInitialsProperty | PersonPictureTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/MuxcTraceLogging.cpp Source File

  • File List
  • File Members
  • Telemetry

MuxcTraceLogging.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include "MuxcTraceLogging.h"
00006
00007 // GUID for Microsoft.UI.Xaml.Controls : {21e0ae07-56a7-55b5-12f9-011e6bc08cca}
00008 // GUID for Microsoft.UI.Xaml.Controls : {21e0ae07-56a7-55b5-12f9-011e6bc08ccb}
00009 TRACELOGGING_DEFINE_PROVIDER(
00010     g_hTelemetryProvider,
00011     TELEMETRY_PROVIDER_NAME,
00012     (0x21e0ae07, 0x56a7, 0x55b5, 0x12, 0xf9, 0x01, 0x1e, 0x6b, 0xc0, 0x8c, 0xca));
00013
00014 bool g_IsTelemetryProviderEnabled{};
00015 UCHAR g_TelemetryProviderLevel{};
00016 ULONGLONG g_TelemetryProviderMatchAnyKeyword{};
00017 GUID g_TelemetryProviderActivityId{};
00018
00019 void WINAPI TelemetryProviderEnabledCallback(
00020     _In_      LPCGUID /*sourceId*/,
00021     _In_      ULONG isEnabled,
00022     _In_      UCHAR level,
00023     _In_      ULONGLONG matchAnyKeyword,
00024     _In_      ULONGLONG /*matchAllKeywords*/,
00025     _In_opt_  PEVENT_FILTER_DESCRIPTOR /*filterData*/,
00026     _In_opt_  PVOID /*callbackContext*/)
00027 {
00028     g_IsTelemetryProviderEnabled = !!isEnabled;
00029     g_TelemetryProviderLevel = level;
00030     g_TelemetryProviderMatchAnyKeyword = matchAnyKeyword;
00031 }
00032
00033 // GUID for Microsoft.UI.Xaml.Controls.Perf : {f55f7011-988d-4674-a724-e01b39dc7af6}
00034 // GUID for Microsoft.UI.Xaml.Controls.Perf : {f55f7011-988d-4674-a724-e01b39dc7af7}
00035 TRACELOGGING_DEFINE_PROVIDER(
00036     g_hPerfProvider,
00037     PERF_PROVIDER_NAME,
00038     (0xf55f7011, 0x988d, 0x4674, 0xa7, 0x24, 0xe0, 0x1b, 0x39, 0xdc, 0x7a, 0xf6));
00039
00040 bool g_IsPerfProviderEnabled{};
00041 UCHAR g_PerfProviderLevel{};
00042 ULONGLONG g_PerfProviderMatchAnyKeyword{};
00043 GUID g_PerfProviderActivityId{};
00044
00045 void WINAPI PerfProviderEnabledCallback(
00046     _In_      LPCGUID /*sourceId*/,
00047     _In_      ULONG isEnabled,
00048     _In_      UCHAR level,
00049     _In_      ULONGLONG matchAnyKeyword,
00050     _In_      ULONGLONG /*matchAllKeywords*/,
00051     _In_opt_  PEVENT_FILTER_DESCRIPTOR /*filterData*/,
00052     _In_opt_  PVOID /*callbackContext*/)
00053 {
00054     g_IsPerfProviderEnabled = !!isEnabled;
00055     g_PerfProviderLevel = level;
00056     g_PerfProviderMatchAnyKeyword = matchAnyKeyword;
00057 }
00058
00059 // GUID for Microsoft.UI.Xaml.Controls.Debug : {afe0ae07-66a7-55bb-12ff-01116bc08c1a}
00060 // GUID for Microsoft.UI.Xaml.Controls.Debug :{afe0ae07-66a7-55bb-12ff-01116bc08c1b}
00061 TRACELOGGING_DEFINE_PROVIDER(
00062     g_hLoggingProvider,
00063     DEBUG_PROVIDER_NAME,
00064     (0xafe0ae07, 0x66a7, 0x55bb, 0x12, 0xff, 0x01, 0x11, 0x6b, 0xc0, 0x8c, 0x1a));
00065
00066 bool g_IsLoggingProviderEnabled{};
00067 UCHAR g_LoggingProviderLevel{};
00068 ULONGLONG g_LoggingProviderMatchAnyKeyword{};
00069 GUID g_LoggingProviderActivityId{};
00070
00071 void WINAPI LoggingProviderEnabledCallback(
00072     _In_      LPCGUID /*sourceId*/,
00073     _In_      ULONG isEnabled,
00074     _In_      UCHAR level,
00075     _In_      ULONGLONG matchAnyKeyword,
00076     _In_      ULONGLONG /*matchAllKeywords*/,
00077     _In_opt_  PEVENT_FILTER_DESCRIPTOR /*filterData*/,
00078     _In_opt_  PVOID /*callbackContext*/)
00079 {
00080     g_IsLoggingProviderEnabled = !!isEnabled;
00081     g_LoggingProviderLevel = level;
00082     g_LoggingProviderMatchAnyKeyword = matchAnyKeyword;
00083 }
00084
00085 void RegisterTraceLogging()
00086 {
00087     HRESULT hr = S_OK;
00088
00089     TraceLoggingRegisterEx(g_hTelemetryProvider, TelemetryProviderEnabledCallback, nullptr);
00090     //Generate the ActivityId used to track the session
00091     hr = CoCreateGuid(&g_TelemetryProviderActivityId);
00092     if (FAILED(hr))
00093     {
00094         TraceLoggingWriteActivity(
00095             g_hTelemetryProvider,
00096             "CreateGuidError",
00097             nullptr,
00098             nullptr,
00099             TraceLoggingHResult(hr),
00100             TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
00101             TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
00102
00103         g_TelemetryProviderActivityId = GUID_NULL;
00104     };
00105
00106     TraceLoggingRegisterEx(g_hPerfProvider, PerfProviderEnabledCallback, nullptr);
00107     //Generate the ActivityId used to track the session
00108     hr = CoCreateGuid(&g_PerfProviderActivityId);
00109     if (FAILED(hr))
00110     {
00111         TraceLoggingWriteActivity(
00112             g_hPerfProvider,
00113             "CreateGuidError",
00114             nullptr,
00115             nullptr,
00116             TraceLoggingHResult(hr));
00117
00118         g_PerfProviderActivityId = GUID_NULL;
00119     };
00120
00121     TraceLoggingRegisterEx(g_hLoggingProvider, LoggingProviderEnabledCallback, nullptr);
00122     //Generate the ActivityId used to track the session
00123     hr = CoCreateGuid(&g_LoggingProviderActivityId);
00124     if (FAILED(hr))
00125     {
00126         TraceLoggingWriteActivity(
00127             g_hLoggingProvider,
00128             "CreateGuidError",
00129             nullptr,
00130             nullptr,
00131             TraceLoggingHResult(hr));
00132
00133         g_LoggingProviderActivityId = GUID_NULL;
00134     };
00135 }
00136
00137 void UnRegisterTraceLogging()
00138 {
00139     TraceLoggingUnregister(g_hTelemetryProvider);
00140
00141     TraceLoggingUnregister(g_hPerfProvider);
00142     TraceLoggingUnregister(g_hLoggingProvider);
00143 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/EventTests.cs Source File

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests

EventTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 using Common;
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using System.Threading.Tasks;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 using Microsoft.Windows.Apps.Test.Automation;
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.NavigationViewTests
00022 {
00023     [TestClass]
00024     public class EventTests : NavigationViewTestsBase
00025     {
00026         [ClassInitialize]
00027         [TestProperty("RunAs", "User")]
00028         [TestProperty("Classification", "Integration")]
00029         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00030         [TestProperty("MUXControlsTestEnabledForPhone", "True")]
00031         public static void ClassInitialize(TestContext testContext)
00032         {
00033             TestEnvironment.Initialize(testContext);
00034         }
00035
00036         [TestMethod]
00037         public void VerifyCorrectNumberOfEventsRaised()
00038         {
00039             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00040             {
00041                 TextBlock itemInvokedCountTextBlock = new TextBlock(FindElement.ByName("NumberOfItemInvokedEventsRaisedTextBlock"));
00042                 TextBlock selectionChangedCountTextBlock = new TextBlock(FindElement.ByName("NumberOfSelectionChangedEventsRaisedTextBlock"));
00043
00044                 Log.Comment("Verify that only one SelectionChanged event was raised.");
00045                 Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
00046                 Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "1");
00047
00048                 Log.Comment("Invoke MusicItem.");
00049                 UIObject item1 = FindElement.ByName("Music");
00050                 item1.Click();
00051                 Wait.ForIdle();
00052
00053                 Log.Comment("Verify event counts.");
00054                 Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "1");
00055                 Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "2");
00056
00057                 Log.Comment("Invoke selected item (MusicItem).");
00058                 item1.Click();
00059                 Wait.ForIdle();
00060                 Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "2");
00061                 Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "2");
00062
00063                 Log.Comment("Clear event counters.");
00064                 Button resetEventCounters = new Button(FindElement.ByName("ResetEventCounters"));
00065                 resetEventCounters.Invoke();
00066                 Wait.ForIdle();
00067                 Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
00068                 Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "0");
00069
00070                 Log.Comment("Verify that switching pane mode to top does not raise any events.");
00071                 var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
00072                 flipOrientationButton.Invoke();
00073                 Wait.ForIdle();
00074                 Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
00075                 Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "0");
00076
00077                 Log.Comment("Verify that switching pane mode to auto does not raise any events.");
00078                 flipOrientationButton.Invoke();
00079                 Wait.ForIdle();
00080                 Verify.AreEqual(itemInvokedCountTextBlock.GetText(), "0");
00081                 Verify.AreEqual(selectionChangedCountTextBlock.GetText(), "0");
00082             }
00083         }
00084
00085         [TestMethod]
00086         public void VerifyEventsReturnExpectedDataTypesMenuItems()
00087         {
00088             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00089             {
00090                 const string navigationViewItemType = "Microsoft.UI.Xaml.Controls.NavigationViewItem";
00091                 const string stringType = "System.String";
00092
00093                 var itemInvokedItemType = new Edit(FindElement.ById("ItemInvokedItemType"));
00094                 var itemInvokedItemContainerType = new Edit(FindElement.ById("ItemInvokedItemContainerType"));
00095                 var selectionChangedItemtype = new Edit(FindElement.ById("SelectionChangedItemType"));
00096                 var selectionChangedItemContainerType = new Edit(FindElement.ById("SelectionChangedItemContainerType"));
00097
00098                 Log.Comment("Click music item");
00099                 var menuItem = FindElement.ByName("Music");
00100                 InputHelper.LeftClick(menuItem);
00101                 Wait.ForIdle();
00102
00103                 Log.Comment("Verify that item invoked returns expected parameters.");
00104                 Verify.IsTrue(itemInvokedItemType.Value == stringType);
00105                 Verify.IsTrue(itemInvokedItemContainerType.Value == navigationViewItemType);
00106
00107                 Log.Comment("Verify that selection changed event returns expected parameters");
00108                 Verify.IsTrue(selectionChangedItemtype.Value == navigationViewItemType);
00109                 Verify.IsTrue(selectionChangedItemContainerType.Value == navigationViewItemType);
00110             }
00111         }
00112
00113         [TestMethod]
00114         public void VerifyEventsReturnExpectedDataTypesMenuItemsSource()
00115         {
00116             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
00117             {
00118                 const string navigationViewItemType = "Microsoft.UI.Xaml.Controls.NavigationViewItem";
00119                 const string itemType = "System.String";
00120
00121                 var itemInvokedItemType = new Edit(FindElement.ById("ItemInvokedItemType"));
00122                 var itemInvokedItemContainerType = new Edit(FindElement.ById("ItemInvokedItemContainerType"));
00123                 var selectionChangedItemtype = new Edit(FindElement.ById("SelectionChangedItemType"));
00124                 var selectionChangedItemContainerType = new Edit(FindElement.ById("SelectionChangedItemContainerType"));
00125
00126                 Log.Comment("Click music item");
00127                 var menuItem = FindElement.ByName("Music");
00128                 InputHelper.LeftClick(menuItem);
00129                 Wait.ForIdle();
00130
00131                 Log.Comment("Verify that item invoked returns expected parameters.");
00132                 Verify.IsTrue(itemInvokedItemType.Value == itemType);
00133                 Verify.IsTrue(itemInvokedItemContainerType.Value == navigationViewItemType);
00134
00135                 Log.Comment("Verify that selection changed event returns expected parameters");
00136                 Verify.IsTrue(selectionChangedItemtype.Value == itemType);
00137                 Verify.IsTrue(selectionChangedItemContainerType.Value == navigationViewItemType);
00138             }
00139         }
00140
00141         [TestMethod]
00142         public void VerifyEventsReturnExpectedDataTypesItemTemplate()
00143         {
00144             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView ItemTemplate Test" }))
00145             {
00146                 const string navigationViewItemType = "Microsoft.UI.Xaml.Controls.NavigationViewItem";
00147                 const string itemType = "MUXControlsTestApp.Customer";
00148
00149                 var itemInvokedItemType = new Edit(FindElement.ById("ItemInvokedItemType"));
00150                 var itemInvokedItemContainerType = new Edit(FindElement.ById("ItemInvokedItemContainerType"));
00151                 var selectionChangedItemtype = new Edit(FindElement.ById("SelectionChangedItemType"));
00152                 var selectionChangedItemContainerType = new Edit(FindElement.ById("SelectionChangedItemContainerType"));
00153
00154                 Log.Comment("Click Michael item");
00155                 var menuItem = FindElement.ByName("Michael");
00156                 InputHelper.LeftClick(menuItem);
00157                 Wait.ForIdle();
00158
00159                 Log.Comment("Verify that item invoked returns expected parameters.");
00160                 Verify.IsTrue(itemInvokedItemType.Value == itemType);
00161                 Verify.IsTrue(itemInvokedItemContainerType.Value == navigationViewItemType);
00162
00163                 Log.Comment("Verify that selection changed event returns expected parameters");
00164                 Verify.IsTrue(selectionChangedItemtype.Value == itemType);
00165                 Verify.IsTrue(selectionChangedItemContainerType.Value == navigationViewItemType);
00166             }
00167         }
00168
00169         [TestMethod]
00170         public void VerifyLightDismissDoesntSendDuplicateEvents()
00171         {
00172             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00173             foreach (var testScenario in testScenarios)
00174             {
00175                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00176                 {
00177                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00178                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00179
00180                     SetNavViewWidth(ControlWidth.Medium);
00181                     WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00182
00183                     PaneOpenCloseTestCaseRetry(3, () =>
00184                     {
00185                         // recover from the exception if needed
00186                         if (isPaneOpenCheckBox.ToggleState != ToggleState.Off)
00187                         {
00188                             using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
00189                             {
00190                                 isPaneOpenCheckBox.Toggle();
00191                                 waiter.Wait();
00192                             }
00193                             WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00194                         }
00195
00196                         Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
00197
00198                         Log.Comment("Reset the event count");
00199                         new Button(FindElement.ById("ClosingEventCountResetButton")).Invoke();
00200                         Wait.ForIdle();
00201
00202                         Log.Comment("Open the pane");
00203                         using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
00204                         {
00205                             isPaneOpenCheckBox.Toggle();
00206                             waiter.Wait();
00207                         }
00208                         WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00209
00210                         Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00211
00212                         var closingCounts = new Edit(FindElement.ByName("ClosingEventCountTextBlock"));
00213                         var expectedString = "1-1";
00214
00215                         //  trigger a light dismiss
00216                         KeyboardHelper.PressKey(Key.Left, ModifierKey.Alt);
00217                         Wait.ForIdle();
00218
00219                         WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00220                         Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
00221                         Verify.AreEqual(expectedString, closingCounts.GetText());
00222                     });
00223                 }
00224             }
00225         }
00226
00227         [TestMethod]
00228         public void BackRequestedTest()
00229         {
00230             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00231             foreach (var testScenario in testScenarios)
00232             {
00233                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00234                 {
00235                     TextBlock textBlock = new TextBlock(FindElement.ByName("BackRequestedStateTextBlock"));
00236                     Button button = new Button(FindElement.ByName("NavigationViewBackButton"));
00237                     CheckBox checkBox = new CheckBox(FindElement.ByName("BackButtonEnabledCheckbox"));
00238
00239                     Verify.AreEqual("Test Not Started [2]", textBlock.DocumentText);
00240
00241                     checkBox.Check();
00242                     Wait.ForIdle();
00243
00244                     button.Invoke();
00245                     Wait.ForIdle();
00246
00247                     Verify.AreEqual("Back was requested", textBlock.DocumentText);
00248                 }
00249             }
00250         }
00251
00252         [TestMethod]
00253         public void MenuItemInvokedTest()
00254         {
00255             var testScenarios = RegressionTestScenario.BuildTopNavRegressionTestScenarios();
00256             foreach (var testScenario in testScenarios)
00257             {
00258                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00259                 {
00260                     Log.Comment("Click games item");
00261                     UIObject menuItem = FindElement.ByName("Games");
00262                     InputHelper.LeftClick(menuItem);
00263                     Wait.ForIdle();
00264                     TextBlock header = new TextBlock(FindElement.ByName("Games as header"));
00265                     Verify.AreEqual("Games as header", header.DocumentText);
00266
00267                     menuItem = FindElement.ByName("Music");
00268
00269                     Log.Comment("Verify XButton1 mouse button click does not change selection");
00270                     InputHelper.Click(menuItem, PointerButtons.XButton1);
00271                     Wait.ForIdle();
00272                     Verify.AreEqual("Games as header", header.DocumentText);
00273
00274                     Log.Comment("Verify XButton2 mouse button click does not change selection");
00275                     InputHelper.Click(menuItem, PointerButtons.XButton2);
00276                     Wait.ForIdle();
00277                     Verify.AreEqual("Games as header", header.DocumentText);
00278
00279                     Log.Comment("Verify Secondary mouse button click does not change selection");
00280                     InputHelper.Click(menuItem, PointerButtons.Secondary);
00281                     Wait.ForIdle();
00282                     Verify.AreEqual("Games as header", header.DocumentText);
00283
00284                     Log.Comment("Left Click music item");
00285                     InputHelper.LeftClick(menuItem);
00286                     Wait.ForIdle();
00287                     Verify.AreEqual("Music as header", header.DocumentText);
00288
00289                     if (testScenario.IsLeftNavTest)
00290                     {
00291                         Log.Comment("Bring Settings into view.");
00292                         FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
00293                         Wait.ForIdle();
00294                     }
00295
00296                     Log.Comment("Click settings item");
00297                     menuItem = FindElement.ByName("Settings");
00298                     InputHelper.LeftClick(menuItem);
00299                     Wait.ForIdle();
00300                     header = new TextBlock(FindElement.ByName("Settings as header"));
00301                     Verify.AreEqual("Settings as header", header.DocumentText);
00302
00303                     Log.Comment("Move mouse to upper left to ensure that tooltip on settings closes.");
00304                     TestEnvironment.Application.CoreWindow.MovePointer(0, 0);
00305                     Wait.ForIdle();
00306                 }
00307             }
00308         }
00309
00310         [TestMethod]
00311         public void SettingsItemClickTest()
00312         {
00313             var testScenarios = RegressionTestScenario.BuildAllRegressionTestScenarios();
00314             foreach (var testScenario in testScenarios)
00315             {
00316                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00317                 {
00318                     if (testScenario.IsLeftNavTest)
00319                     {
00320                         Log.Comment("Bring Settings into view.");
00321                         FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
00322                         Wait.ForIdle();
00323                     }
00324
00325                     UIObject settingsItem = FindElement.ByName("Settings");
00326
00327                     settingsItem.SetFocus();
00328                     Wait.ForIdle();
00329
00330                     Log.Comment("Click settings");
00331                     settingsItem.Click();
00332                     Wait.ForIdle();
00333
00334                     Log.Comment("Verify settings is selected");
00335                     TextBlock header = new TextBlock(FindElement.ByName("Settings as header"));
00336                     Verify.AreEqual("Settings as header", header.DocumentText);
00337                 }
00338             }
00339         }
00340
00341         [TestMethod]
00342         public void VerifyNavigationViewItemResponseToClickAfterBeingMovedBetweenFrames()
00343         {
00344             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
00345             {
00346                 var myLocationButton = FindElement.ByName<Button>("MyLocation");
00347                 var switchFrameButton = FindElement.ByName<Button>("SwitchFrame");
00348                 var result = new TextBlock(FindElement.ByName("MyLocationResult"));
00349
00350                 Log.Comment("Click on MyLocation Item and verify it's on Frame1");
00351                 myLocationButton.Click();
00352                 Wait.ForIdle();
00353                 Verify.AreEqual(result.GetText(), "Frame1");
00354
00355                 Log.Comment("Click on SwitchFrame");
00356                 switchFrameButton.Click();
00357                 Wait.ForIdle();
00358
00359                 // tree structure changed and rebuild the cache.
00360                 ElementCache.Clear();
00361
00362                 Log.Comment("Click on MyLocation Item and verify it's on Frame2");
00363                 myLocationButton = FindElement.ByName<Button>("MyLocation");
00364                 myLocationButton.Click();
00365                 Wait.ForIdle();
00366                 Verify.AreEqual(result.GetText(), "Frame2");
00367             }
00368         }
00369
00370         [TestMethod]
00371         public void VerifyHoldingKeyOnlyInvokesOnce()
00372         {
00373             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView compact pane length test" }))
00374             {
00375                 Verify.AreEqual("0", GetInvokeCount());
00376                 var homeItem = FindElement.ByName("NavViewInvokeItem");
00377                 FocusHelper.SetFocus(homeItem);
00378
00379                 KeyboardHelper.PressKey(Key.Enter);
00380
00381                 Verify.AreEqual("1", GetInvokeCount());
00382
00383                 KeyboardHelper.HoldKeyMilliSeconds(Key.Enter, 2000);
00384                 Wait.ForIdle();
00385                 // Should have invoked once, not multiple times
00386                 Verify.AreEqual("2", GetInvokeCount());
00387             }
00388
00389             string GetInvokeCount()
00390             {
00391                 var textBlock = new TextBlock(FindElement.ByName("HomeItemInvokedCount"));
00392                 return textBlock.GetText();
00393             }
00394         }
00395     }
00396 }
Generated on Sun Dec 1 2024 20:52:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeControlTrace Member List

This is the complete list of members for SwipeControlTrace, including all inherited members.
s_IsDebugOutputEnabled | SwipeControlTrace | [static]
s_IsVerboseDebugOutputEnabled | SwipeControlTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | SwipeControlTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | SwipeControlTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | SwipeControlTrace | [inline, static]
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItems.h Source File

  • File List
  • File Members
  • SwipeControl

SwipeItems.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SwipeItems.g.h"
00007 #include "SwipeItems.properties.h"
00008
00009 class SwipeItems :
00010     public ReferenceTracker<SwipeItems, winrt::implementation::SwipeItemsT, winrt::IObservableVector<winrt::SwipeItem>>,
00011     public SwipeItemsProperties
00012 {
00013 public:
00014     SwipeItems();
00015
00016 #pragma region IVector
00017     winrt::SwipeItem GetAt(uint32_t index);
00018     uint32_t Size();
00019     winrt::IVectorView<winrt::SwipeItem> GetView();
00020     bool IndexOf(winrt::SwipeItem const& value, uint32_t& index);
00021     void SetAt(uint32_t index, winrt::SwipeItem const& value);
00022     void InsertAt(uint32_t index, winrt::SwipeItem const& value);
00023     void RemoveAt(uint32_t index);
00024     void Append(winrt::SwipeItem const& value);
00025     void RemoveAtEnd();
00026     void Clear();
00027
00028     // TODO:
00029     winrt::IIterator<winrt::SwipeItem> First() { throw winrt::hresult_not_implemented(); }
00030     uint32_t GetMany(uint32_t startIndex, winrt::array_view<winrt::SwipeItem> items) { throw winrt::hresult_not_implemented(); }
00031     void ReplaceAll(winrt::array_view<winrt::SwipeItem const> items) { throw winrt::hresult_not_implemented(); }
00032 #pragma endregion
00033
00034 #pragma region IObservableVector
00035     winrt::event_token VectorChanged(winrt::VectorChangedEventHandler<winrt::SwipeItem> const& handler);
00036     void VectorChanged(winrt::event_token const token);
00037 #pragma endregion
00038
00039     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00040
00041 private:
00042     void put_Items(const winrt::Collections::IVector<winrt::SwipeItem>& value);
00043     tracker_ref<winrt::Collections::IVector<winrt::SwipeItem>> m_items{ this };
00044
00045     event_source<winrt::VectorChangedEventHandler<winrt::SwipeItem>> m_vectorChangedEventSource{ this };
00046 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactory.cpp Source File

  • File List
  • File Members
  • Repeater

ElementFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ElementFactory.h"
00007
00008 #include "ElementFactory.properties.cpp"
00009
00010 #pragma region IElementFactory
00011
00012 winrt::UIElement ElementFactory::GetElement(winrt::ElementFactoryGetArgs const& args)
00013 {
00014     return overridable().GetElementCore(args);
00015 }
00016
00017 void ElementFactory::RecycleElement(winrt::ElementFactoryRecycleArgs const& args)
00018 {
00019     overridable().RecycleElementCore(args);
00020 }
00021
00022 #pragma endregion
00023
00024 #pragma region IElementFactoryOverrides
00025
00026 winrt::UIElement ElementFactory::GetElementCore(winrt::ElementFactoryGetArgs const& args)
00027 {
00028     throw winrt::hresult_not_implemented();
00029 }
00030
00031 void ElementFactory::RecycleElementCore(winrt::ElementFactoryRecycleArgs const& args)
00032 {
00033     throw winrt::hresult_not_implemented();
00034 }
00035
00036 #pragma endregion
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

SplitButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SplitButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(SplitButton)
00012 }
00013
00014 #include "SplitButton.g.cpp"
00015
00016 GlobalDependencyProperty SplitButtonProperties::s_CommandProperty{ nullptr };
00017 GlobalDependencyProperty SplitButtonProperties::s_CommandParameterProperty{ nullptr };
00018 GlobalDependencyProperty SplitButtonProperties::s_FlyoutProperty{ nullptr };
00019
00020 SplitButtonProperties::SplitButtonProperties()
00021     : m_clickEventSource{static_cast<SplitButton*>(this)}
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void SplitButtonProperties::EnsureProperties()
00027 {
00028     if (!s_CommandProperty)
00029     {
00030         s_CommandProperty =
00031             InitializeDependencyProperty(
00032                 L"Command",
00033                 winrt::name_of<winrt::ICommand>(),
00034                 winrt::name_of<winrt::SplitButton>(),
00035                 false /* isAttached */,
00036                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00037                 winrt::PropertyChangedCallback(&OnCommandPropertyChanged));
00038     }
00039     if (!s_CommandParameterProperty)
00040     {
00041         s_CommandParameterProperty =
00042             InitializeDependencyProperty(
00043                 L"CommandParameter",
00044                 winrt::name_of<winrt::IInspectable>(),
00045                 winrt::name_of<winrt::SplitButton>(),
00046                 false /* isAttached */,
00047                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00048                 winrt::PropertyChangedCallback(&OnCommandParameterPropertyChanged));
00049     }
00050     if (!s_FlyoutProperty)
00051     {
00052         s_FlyoutProperty =
00053             InitializeDependencyProperty(
00054                 L"Flyout",
00055                 winrt::name_of<winrt::FlyoutBase>(),
00056                 winrt::name_of<winrt::SplitButton>(),
00057                 false /* isAttached */,
00058                 ValueHelper<winrt::FlyoutBase>::BoxedDefaultValue(),
00059                 winrt::PropertyChangedCallback(&OnFlyoutPropertyChanged));
00060     }
00061 }
00062
00063 void SplitButtonProperties::ClearProperties()
00064 {
00065     s_CommandProperty = nullptr;
00066     s_CommandParameterProperty = nullptr;
00067     s_FlyoutProperty = nullptr;
00068 }
00069
00070 void SplitButtonProperties::OnCommandPropertyChanged(
00071     winrt::DependencyObject const& sender,
00072     winrt::DependencyPropertyChangedEventArgs const& args)
00073 {
00074     auto owner = sender.as<winrt::SplitButton>();
00075     winrt::get_self<SplitButton>(owner)->OnPropertyChanged(args);
00076 }
00077
00078 void SplitButtonProperties::OnCommandParameterPropertyChanged(
00079     winrt::DependencyObject const& sender,
00080     winrt::DependencyPropertyChangedEventArgs const& args)
00081 {
00082     auto owner = sender.as<winrt::SplitButton>();
00083     winrt::get_self<SplitButton>(owner)->OnPropertyChanged(args);
00084 }
00085
00086 void SplitButtonProperties::OnFlyoutPropertyChanged(
00087     winrt::DependencyObject const& sender,
00088     winrt::DependencyPropertyChangedEventArgs const& args)
00089 {
00090     auto owner = sender.as<winrt::SplitButton>();
00091     winrt::get_self<SplitButton>(owner)->OnPropertyChanged(args);
00092 }
00093
00094 void SplitButtonProperties::Command(winrt::ICommand const& value)
00095 {
00096     [[gsl::suppress(con)]]
00097     {
00098     static_cast<SplitButton*>(this)->SetValue(s_CommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00099     }
00100 }
00101
00102 winrt::ICommand SplitButtonProperties::Command()
00103 {
00104     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<SplitButton*>(this)->GetValue(s_CommandProperty));
00105 }
00106
00107 void SplitButtonProperties::CommandParameter(winrt::IInspectable const& value)
00108 {
00109     [[gsl::suppress(con)]]
00110     {
00111     static_cast<SplitButton*>(this)->SetValue(s_CommandParameterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00112     }
00113 }
00114
00115 winrt::IInspectable SplitButtonProperties::CommandParameter()
00116 {
00117     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<SplitButton*>(this)->GetValue(s_CommandParameterProperty));
00118 }
00119
00120 void SplitButtonProperties::Flyout(winrt::FlyoutBase const& value)
00121 {
00122     [[gsl::suppress(con)]]
00123     {
00124     static_cast<SplitButton*>(this)->SetValue(s_FlyoutProperty, ValueHelper<winrt::FlyoutBase>::BoxValueIfNecessary(value));
00125     }
00126 }
00127
00128 winrt::FlyoutBase SplitButtonProperties::Flyout()
00129 {
00130     return ValueHelper<winrt::FlyoutBase>::CastOrUnbox(static_cast<SplitButton*>(this)->GetValue(s_FlyoutProperty));
00131 }
00132
00133 winrt::event_token SplitButtonProperties::Click(winrt::TypedEventHandler<winrt::SplitButton, winrt::SplitButtonClickEventArgs> const& value)
00134 {
00135     return m_clickEventSource.add(value);
00136 }
00137
00138 void SplitButtonProperties::Click(winrt::event_token const& token)
00139 {
00140     m_clickEventSource.remove(token);
00141 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTrackerAsyncOperation.h Source File

  • File List
  • File Members
  • ScrollPresenter

InteractionTrackerAsyncOperation.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ViewChangeBase.h"
00007 #include "ScrollPresenterTrace.h"
00008
00009 enum class InteractionTrackerAsyncOperationType
00010 {
00011     None,
00012     TryUpdatePosition,
00013     TryUpdatePositionBy,
00014     TryUpdatePositionWithAnimation,
00015     TryUpdatePositionWithAdditionalVelocity,
00016     TryUpdateScale,
00017     TryUpdateScaleWithAnimation,
00018     TryUpdateScaleWithAdditionalVelocity,
00019 };
00020
00021 enum class InteractionTrackerAsyncOperationTrigger
00022 {
00023     // Operation is triggered by a direct call to ScrollPresenter's ScrollTo/ScrollBy/AddScrollVelocity or ZoomTo/ZoomBy/AddZoomVelocity
00024     DirectViewChange = 0x01,
00025     // Operation is triggered by the horizontal IScrollController.
00026     HorizontalScrollControllerRequest = 0x02,
00027     // Operation is triggered by the vertical IScrollController.
00028     VerticalScrollControllerRequest = 0x04,
00029     // Operation is triggered by the UIElement.BringIntoViewRequested event handler.
00030     BringIntoViewRequest = 0x08
00031 };
00032
00033 // Used as a workaround for InteractionTracker bug "12465209 - InteractionTracker remains silent when calling TryUpdatePosition with the current position":
00034 // Maximum number of UI thread ticks processed while waiting for non-animated operations to complete.
00035 const int c_maxNonAnimatedOperationTicks = 10;
00036
00037 // Number of UI thread ticks elapsed before a queued operation gets processed to allow any pending size
00038 // changes to be propagated to the InteractionTracker.
00039 const int c_queuedOperationTicks = 3;
00040
00041 class InteractionTrackerAsyncOperation
00042 {
00043 public:
00044     InteractionTrackerAsyncOperation(
00045         InteractionTrackerAsyncOperationType operationType,
00046         InteractionTrackerAsyncOperationTrigger operationTrigger,
00047         bool isDelayed,
00048         std::shared_ptr<ViewChangeBase> viewChangeBase);
00049     ~InteractionTrackerAsyncOperation();
00050
00051     int32_t GetViewChangeCorrelationId() const
00052     {
00053         return m_viewChangeCorrelationId;
00054     }
00055
00056     void SetViewChangeCorrelationId(int32_t viewChangeCorrelationId)
00057     {
00058         if (m_viewChangeCorrelationId != viewChangeCorrelationId)
00059         {
00060             SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, viewChangeCorrelationId);
00061
00062             m_viewChangeCorrelationId = viewChangeCorrelationId;
00063         }
00064     }
00065
00066     bool IsAnimated() const
00067     {
00068         switch (m_operationType)
00069         {
00070             case InteractionTrackerAsyncOperationType::TryUpdatePosition:
00071             case InteractionTrackerAsyncOperationType::TryUpdatePositionBy:
00072             case InteractionTrackerAsyncOperationType::TryUpdateScale:
00073                 return false;
00074         }
00075         return true;
00076     }
00077
00078     bool IsCanceled() const
00079     {
00080         return m_isCanceled;
00081     }
00082
00083     void SetIsCanceled(bool isCanceled)
00084     {
00085         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isCanceled);
00086
00087         m_isCanceled = isCanceled;
00088     }
00089
00090     bool IsDelayed() const
00091     {
00092         return m_isDelayed;
00093     }
00094
00095     void SetIsDelayed(bool isDelayed)
00096     {
00097         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isDelayed);
00098
00099         m_isDelayed = isDelayed;
00100     }
00101
00102     bool IsQueued() const
00103     {
00104         return m_preProcessingTicksCountdown > 0;
00105     }
00106
00107     bool IsUnqueueing() const
00108     {
00109         return m_preProcessingTicksCountdown > 0 && m_preProcessingTicksCountdown < m_queuedOperationTicks;
00110     }
00111
00112     bool IsCompleted() const
00113     {
00114         return m_isCompleted;
00115     }
00116
00117     void SetIsCompleted(bool isCompleted)
00118     {
00119         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isCompleted);
00120
00121         m_isCompleted = isCompleted;
00122     }
00123
00124     int GetTicksCountdown() const
00125     {
00126         return m_preProcessingTicksCountdown;
00127     }
00128
00129     void SetTicksCountdown(int ticksCountdown)
00130     {
00131         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, ticksCountdown);
00132
00133         MUX_ASSERT(ticksCountdown > 0);
00134         m_preProcessingTicksCountdown = m_queuedOperationTicks = ticksCountdown;
00135     }
00136
00137     // Sets the ticks countdown to the max value of c_queuedOperationTicks == 3. This is invoked for queued operations
00138     // when the extent or viewport size changed in order to let it propagate to the Composition thread and thus let the
00139     // InteractionTracker operate on the latest sizes.
00140     void SetMaxTicksCountdown()
00141     {
00142         const int ticksCountdownIncrement = std::max(0, c_queuedOperationTicks - m_preProcessingTicksCountdown);
00143
00144         if (ticksCountdownIncrement > 0)
00145         {
00146             SCROLLPRESENTER_TRACE_INFO(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, ticksCountdownIncrement);
00147
00148             m_preProcessingTicksCountdown += ticksCountdownIncrement;
00149             m_queuedOperationTicks += ticksCountdownIncrement;
00150         }
00151     }
00152
00153     InteractionTrackerAsyncOperationTrigger GetOperationTrigger() const
00154     {
00155         return m_operationTrigger;
00156     }
00157
00158     // Returns True when the operation fulfills a horizontal IScrollController request.
00159     bool IsHorizontalScrollControllerRequest() const
00160     {
00161         return static_cast<int>(m_operationTrigger) & static_cast<int>(InteractionTrackerAsyncOperationTrigger::HorizontalScrollControllerRequest);
00162     }
00163
00164     // Returns True when the operation fulfills a vertical IScrollController request.
00165     bool IsVerticalScrollControllerRequest() const
00166     {
00167         return static_cast<int>(m_operationTrigger) & static_cast<int>(InteractionTrackerAsyncOperationTrigger::VerticalScrollControllerRequest);
00168     }
00169
00170     void SetIsScrollControllerRequest(bool isFromHorizontalScrollController)
00171     {
00172         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, isFromHorizontalScrollController);
00173
00174         if (isFromHorizontalScrollController)
00175             m_operationTrigger = static_cast<InteractionTrackerAsyncOperationTrigger>(static_cast<int>(m_operationTrigger) |
00176                                  static_cast<int>(InteractionTrackerAsyncOperationTrigger::HorizontalScrollControllerRequest));
00177         else
00178             m_operationTrigger = static_cast<InteractionTrackerAsyncOperationTrigger>(static_cast<int>(m_operationTrigger) |
00179                                  static_cast<int>(InteractionTrackerAsyncOperationTrigger::VerticalScrollControllerRequest));
00180     }
00181
00182     // Returns True when the post-processing ticks count has reached 0
00183     bool TickNonAnimatedOperation()
00184     {
00185         MUX_ASSERT(!IsAnimated());
00186         MUX_ASSERT(m_postProcessingTicksCountdown > 0);
00187
00188         m_postProcessingTicksCountdown--;
00189
00190         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, m_postProcessingTicksCountdown);
00191         return m_postProcessingTicksCountdown == 0;
00192     }
00193
00194     // Returns True when the pre-processing ticks count has reached 0
00195     bool TickQueuedOperation()
00196     {
00197         MUX_ASSERT(m_preProcessingTicksCountdown > 0);
00198
00199         m_preProcessingTicksCountdown--;
00200
00201         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, m_preProcessingTicksCountdown);
00202         return m_preProcessingTicksCountdown == 0;
00203     }
00204
00205     InteractionTrackerAsyncOperationType GetOperationType() const
00206     {
00207         return m_operationType;
00208     }
00209
00210     int GetRequestId() const
00211     {
00212         return m_requestId;
00213     }
00214
00215     void SetRequestId(int requestId)
00216     {
00217         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, requestId);
00218
00219         m_requestId = requestId;
00220     }
00221
00222     std::shared_ptr<ViewChangeBase> GetViewChangeBase() const
00223     {
00224         return m_viewChangeBase;
00225     }
00226
00227     std::shared_ptr<InteractionTrackerAsyncOperation> GetRequiredOperation() const
00228     {
00229         return m_requiredOperation;
00230     }
00231
00232     void SetRequiredOperation(std::shared_ptr<InteractionTrackerAsyncOperation> requiredOperation)
00233     {
00234         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, requiredOperation);
00235
00236         m_requiredOperation = requiredOperation;
00237     }
00238
00239 private:
00240     // Identifies the InteractionTracker request type for this operation.
00241     InteractionTrackerAsyncOperationType m_operationType{ InteractionTrackerAsyncOperationType::None };
00242
00243     // Identifies the InteractionTracker trigger type for this operation.
00244     InteractionTrackerAsyncOperationTrigger m_operationTrigger{ InteractionTrackerAsyncOperationTrigger::DirectViewChange };
00245
00246     // Number of UI thread ticks remaining before a non-animated InteractionTracker request is declared completed
00247     // in case no ValuesChanged or status change notification is raised.
00248     int m_postProcessingTicksCountdown{ 0 };
00249
00250     // Number of UI thread ticks remaining before this queued operation gets processed.
00251     // Positive between the time the operation is queued in ScrollPresenter::ScrollTo/By/From, ScrollPresenter::ZoomTo/By/From or
00252     // ScrollPresenter::OnCompositionTargetRendering and the time it is processed in ScrollPresenter::ProcessOffsetsChange or ScrollPresenter::ProcessZoomFactorChange.
00253     int m_preProcessingTicksCountdown{ c_queuedOperationTicks };
00254
00255     // Initial value of m_preProcessingTicksCountdown when this operation is queued up.
00256     int m_queuedOperationTicks{ c_queuedOperationTicks };
00257
00258     // InteractionTracker RequestId associated with this operation.
00259     int m_requestId{ -1 };
00260
00261     // Set to True when the operation was canceled early enough to take effect.
00262     bool m_isCanceled{ false };
00263
00264     // Set to True when the operation is delayed until the scrollPresenter is loaded.
00265     bool m_isDelayed{ false };
00266
00267     // Set to True when the operation completed and was assigned a final ScrollPresenterViewChangeResult result.
00268     bool m_isCompleted{ false };
00269
00270     // OffsetsChange or ZoomFactorChange instance associated with this operation.
00271     std::shared_ptr<ViewChangeBase> m_viewChangeBase;
00272
00273     // ViewChangeCorrelationId associated with this operation.
00274     int32_t m_viewChangeCorrelationId{ -1 };
00275
00276     // Null by default and optionally set to a prior operation that needs to complete before this one can start.
00277     std::shared_ptr<InteractionTrackerAsyncOperation> m_requiredOperation{ nullptr };
00278 };
00279
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshInfoProviderImplementation Member List

This is the complete list of members for RefreshInfoProviderImplementation, including all inherited members.
compositionProperties | RefreshInfoProviderImplementation | [private]
CompositionProperties | RefreshInfoProviderImplementation |
executionRatio | RefreshInfoProviderImplementation | [private]
ExecutionRatio | RefreshInfoProviderImplementation |
InteractionRatioChanged | RefreshInfoProviderImplementation |
InteractionRatioCompositionProperty | RefreshInfoProviderImplementation |
IsInteractingForRefresh | RefreshInfoProviderImplementation |
isInteractingForRefresh | RefreshInfoProviderImplementation | [private]
IsInteractingForRefreshChanged | RefreshInfoProviderImplementation |
OnRefreshCompleted() | RefreshInfoProviderImplementation | [inline]
OnRefreshStarted() | RefreshInfoProviderImplementation | [inline]
onSliderPointerPressed(object sender, ManipulationStartingRoutedEventArgs e) | RefreshInfoProviderImplementation | [inline, private]
onSliderPointerReleased(object sender, ManipulationCompletedRoutedEventArgs e) | RefreshInfoProviderImplementation | [inline, private]
onSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | RefreshInfoProviderImplementation | [inline, private]
RaiseInteractingForRefreshChanged() | RefreshInfoProviderImplementation | [inline, private]
RaiseInteractionRatioChanged(float interactionRatio) | RefreshInfoProviderImplementation | [inline, private]
RefreshCompleted | RefreshInfoProviderImplementation |
RefreshInfoProviderImplementation(Slider slider, DispatcherTimer timer) | RefreshInfoProviderImplementation | [inline]
RefreshStarted | RefreshInfoProviderImplementation |
slider | RefreshInfoProviderImplementation | [private]
timer | RefreshInfoProviderImplementation | [private]
timerTick(object sender, object e) | RefreshInfoProviderImplementation | [inline, private]
UpdateIsInteractingForRefresh(Boolean value) | RefreshInfoProviderImplementation | [inline, private]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApi.h Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

PullToRefreshHelperTestApi.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PullToRefreshHelperTestApi.g.h"
00007
00008 class PullToRefreshHelperTestApi :
00009     public winrt::implementation::PullToRefreshHelperTestApiT<PullToRefreshHelperTestApi>
00010 {
00011 public:
00012     static winrt::RefreshInteractionRatioChangedEventArgs CreateRefreshInteractionRatioChangedEventArgsInstance(double value);
00013     static winrt::RefreshStateChangedEventArgs CreateRefreshStateChangedEventArgsInstance(winrt::RefreshVisualizerState const& oldValue, winrt::RefreshVisualizerState const& newValue);
00014     static winrt::RefreshRequestedEventArgs CreateRefreshRequestedEventArgsInstance(winrt::Deferral const& handler);
00015 };
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutTests Member List

This is the complete list of members for LayoutTests, including all inherited members.
CreateAndInitializeRepeater(object itemsSource, VirtualizingLayout layout, object elementFactory, ref ItemsRepeater repeater, ref ScrollViewer scrollViewer) | LayoutTests | [inline, private]
GetDataTemplate(string content) | LayoutTests | [inline, private]
ValidateMappingAndAutoRecycling() | LayoutTests | [inline]
ValidateNonVirtualLayoutDoesNotGetMeasuredForViewportChanges() | LayoutTests | [inline]
ValidateNonVirtualLayoutWithItemsRepeater() | LayoutTests | [inline]
ValidateStackLayoutDisabledVirtualizationWithItemsRepeater() | LayoutTests | [inline]
ValidateStackLayoutDoesNotRetainIncorrectMinorWidth() | LayoutTests | [inline]
VerifyItemsRepeaterNullLayoutIsTreatedAsStackLayout() | LayoutTests | [inline]
VerifyStackLayoutCycleShortcut() | LayoutTests | [inline]
VerifyUniformGridLayoutDoesntCrashWhenTryingToScrollToEnd() | LayoutTests | [inline]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs Member List

This is the complete list of members for LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs, including all inherited members.
ItemIndex() | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs |
LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs(int itemIndex, int lineIndex) | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs |
LineIndex() | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs |
m_itemIndex | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs | [private]
m_lineIndex | LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs | [private]
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerPage Member List

This is the complete list of members for ItemContainerPage, including all inherited members.
CmbItemContainerOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemContainerPage | [inline, private]
ItemContainerPage() | ItemContainerPage | [inline]
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewAnimationPage Member List

This is the complete list of members for NavigationViewAnimationPage, including all inherited members.
FlipOrientation_Click(object sender, RoutedEventArgs e) | NavigationViewAnimationPage | [inline, private]
NavigateToPage(object pageTag) | NavigationViewAnimationPage | [inline, private]
NavigationViewAnimationPage() | NavigationViewAnimationPage | [inline]
NavView_OnItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) | NavigationViewAnimationPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/ViewModel.cpp Source File

  • File List
  • File Members
  • TreeView

ViewModel.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ViewModel.h"
00007 #include "TreeView.h"
00008 #include "TreeViewItem.h"
00009 #include "VectorChangedEventArgs.h"
00010 #include "TreeViewList.h"
00011 #include <HashMap.h>
00012
00013 // Need to update node selection states on UI before vector changes.
00014 // Listen on vector change events don't solve the problem because the event already happened when the event handler gets called.
00015 // i.e. the node is already gone when we get to ItemRemoved callback.
00016 #pragma region SelectedTreeNodeVector
00017
00018 bool SelectedTreeNodeVector::IndexOf_OptimizedForRemove(winrt::TreeViewNode const& node, uint32_t& index)
00019 {
00020     return GetVectorInnerImpl()->IndexOf_OptimizedForRemove(node, index);
00021 }
00022
00023 void SelectedTreeNodeVector::UpdateSelection(winrt::TreeViewNode const& node, TreeNodeSelectionState state)
00024 {
00025     if (winrt::get_self<TreeViewNode>(node)->SelectionState() != state)
00026     {
00027         if (auto viewModel = m_viewModel.get())
00028         {
00029             viewModel->UpdateSelection(node, state);
00030             viewModel->NotifyContainerOfSelectionChange(node, state);
00031         }
00032     }
00033 }
00034
00035 void SelectedTreeNodeVector::SetViewModel(ViewModel& viewModel)
00036 {
00037     m_viewModel = viewModel.get_weak();
00038 }
00039
00040 void SelectedTreeNodeVector::Append(winrt::TreeViewNode const& node)
00041 {
00042     InsertAt(Size(), node);
00043 }
00044
00045 void SelectedTreeNodeVector::InsertAt(unsigned int index, winrt::TreeViewNode const& node)
00046 {
00047     // UpdateSelection will call InsertAtCore_NoContainsCheck
00048     UpdateSelection(node, TreeNodeSelectionState::Selected);
00049 }
00050
00051 void SelectedTreeNodeVector::SetAt(unsigned int index, winrt::TreeViewNode const& node)
00052 {
00053     RemoveAt(index);
00054     InsertAt(index, node);
00055 }
00056
00057 void SelectedTreeNodeVector::RemoveAt(unsigned int index)
00058 {
00059     auto inner = GetVectorInnerImpl();
00060     auto oldNode = winrt::get_self<TreeViewNode>(inner->GetAt(index));
00061     // UpdateSelection will call RemoveAtCore
00062     UpdateSelection(*oldNode, TreeNodeSelectionState::UnSelected);
00063 }
00064
00065 void SelectedTreeNodeVector::RemoveAtEnd()
00066 {
00067     RemoveAt(Size() - 1);
00068 }
00069
00070 void SelectedTreeNodeVector::ReplaceAll(winrt::array_view<winrt::TreeViewNode const> nodes)
00071 {
00072     Clear();
00073
00074     for (auto const& node : nodes)
00075     {
00076         Append(node);
00077     }
00078 }
00079
00080 void SelectedTreeNodeVector::Clear()
00081 {
00082     while (Size() > 0)
00083     {
00084         RemoveAtEnd();
00085     }
00086 }
00087
00088 bool SelectedTreeNodeVector::Contains(winrt::TreeViewNode const& node)
00089 {
00090     uint32_t index;
00091     return GetVectorInnerImpl()->IndexOf(node, index);
00092 }
00093
00094 // Default write methods will trigger TreeView visual updates.
00095 // If you want to update vector content without notifying TreeViewNodes, use "core" version of the methods.
00096 void SelectedTreeNodeVector::InsertAtCore_NoContainsCheck(unsigned int index, winrt::TreeViewNode const& node)
00097 {
00098     MUX_ASSERT(!Contains(node));
00099
00100     GetVectorInnerImpl()->InsertAt(index, node);
00101
00102     // Keep SelectedItems and SelectedNodes in sync
00103     if (auto viewModel = m_viewModel.get())
00104     {
00105         auto selectedItems = viewModel->GetSelectedItems();
00106         if (selectedItems.Size() != Size())
00107         {
00108             if (auto listControl = viewModel->ListControl())
00109             {
00110                 if (auto item = winrt::get_self<TreeViewList>(listControl)->ItemFromNode(node))
00111                 {
00112                     winrt::get_self<SelectedItemsVector>(selectedItems)->InsertAt_NoContainsCheck(index, item);
00113                     viewModel->TrackItemSelected(item);
00114                 }
00115             }
00116         }
00117     }
00118 }
00119
00120 void SelectedTreeNodeVector::RemoveAtCore(unsigned int index)
00121 {
00122     GetVectorInnerImpl()->RemoveAt(index);
00123
00124     // Keep SelectedItems and SelectedNodes in sync
00125     if (auto viewModel = m_viewModel.get())
00126     {
00127         auto selectedItems = viewModel->GetSelectedItems();
00128         if (selectedItems.Size() != Size())
00129         {
00130             const auto item = selectedItems.GetAt(index);
00131             selectedItems.RemoveAt(index);
00132             viewModel->TrackItemUnselected(item);
00133         }
00134     }
00135 }
00136
00137 #pragma endregion
00138
00139 // Similar to SelectedNodesVector above, we need to make decisions before the item is inserted or removed.
00140 // we can't use vector change events because the event already happened when event hander gets called.
00141 #pragma region SelectedItemsVector
00142
00143 bool SelectedItemsVector::IndexOf_OptimizedForRemove(winrt::IInspectable const& node, uint32_t& index)
00144 {
00145     return GetVectorInnerImpl()->IndexOf_OptimizedForRemove(node, index);
00146 }
00147
00148 void SelectedItemsVector::SetViewModel(ViewModel& viewModel)
00149 {
00150     m_viewModel = viewModel.get_weak();
00151 }
00152
00153 void SelectedItemsVector::Append(winrt::IInspectable const& item)
00154 {
00155     InsertAt(Size(), item);
00156 }
00157
00158 void SelectedItemsVector::InsertAt(unsigned int index, winrt::IInspectable const& item)
00159 {
00160     if (!Contains(item))
00161     {
00162         InsertAt_NoContainsCheck(index, item);
00163     }
00164 }
00165
00166 void SelectedItemsVector::InsertAt_NoContainsCheck(unsigned int index, winrt::IInspectable const& item)
00167 {
00168     MUX_ASSERT(!Contains(item));
00169     GetVectorInnerImpl()->InsertAt(index, item);
00170
00171     // Keep SelectedNodes and SelectedItems in sync
00172     if (auto viewModel = m_viewModel.get())
00173     {
00174         auto selectedNodes = viewModel->GetSelectedNodes();
00175         if (selectedNodes.Size() != Size())
00176         {
00177             if (auto listControl = viewModel->ListControl())
00178             {
00179                 if (auto node = winrt::get_self<TreeViewList>(listControl)->NodeFromItem(item))
00180                 {
00181                     selectedNodes.InsertAt(index, node);
00182                 }
00183             }
00184         }
00185     }
00186 }
00187
00188 void SelectedItemsVector::SetAt(unsigned int index, winrt::IInspectable const& item)
00189 {
00190     RemoveAt(index);
00191     InsertAt(index, item);
00192 }
00193
00194 void SelectedItemsVector::RemoveAt(unsigned int index)
00195 {
00196     GetVectorInnerImpl()->RemoveAt(index);
00197
00198     // Keep SelectedNodes and SelectedItems in sync
00199     if (auto viewModel = m_viewModel.get())
00200     {
00201         auto selectedNodes = viewModel->GetSelectedNodes();
00202         if (Size() != selectedNodes.Size())
00203         {
00204             selectedNodes.RemoveAt(index);
00205         }
00206     }
00207 }
00208
00209 void SelectedItemsVector::RemoveAtEnd()
00210 {
00211     RemoveAt(Size() - 1);
00212 }
00213
00214 void SelectedItemsVector::ReplaceAll(winrt::array_view<winrt::IInspectable const> items)
00215 {
00216     Clear();
00217
00218     for (auto const& node : items)
00219     {
00220         Append(node);
00221     }
00222 }
00223
00224 void SelectedItemsVector::Clear()
00225 {
00226     while (Size() > 0)
00227     {
00228         RemoveAtEnd();
00229     }
00230 }
00231
00232 bool SelectedItemsVector::Contains(winrt::IInspectable const& item)
00233 {
00234     uint32_t index;
00235     return GetVectorInnerImpl()->IndexOf(item, index);
00236 }
00237
00238 #pragma endregion
00239
00240 ViewModel::ViewModel()
00241 {
00242     auto selectedNodes = winrt::make_self<SelectedTreeNodeVector>();
00243     selectedNodes->SetViewModel(*this);
00244     m_selectedNodes.set(*selectedNodes);
00245
00246     auto selectedItems = winrt::make_self<SelectedItemsVector>();
00247     selectedItems->SetViewModel(*this);
00248     m_selectedItems.set(*selectedItems);
00249 }
00250
00251 ViewModel::~ViewModel()
00252 {
00253     if (m_rootNodeChildrenChangedEventToken.value != 0)
00254     {
00255         if (auto origin = m_originNode.safe_get())
00256         {
00257             winrt::get_self<TreeViewNode>(origin)->ChildrenChanged(m_rootNodeChildrenChangedEventToken);
00258         }
00259
00260         ClearEventTokenVectors();
00261     }
00262 }
00263
00264 void ViewModel::ExpandNode(const winrt::TreeViewNode& value)
00265 {
00266     value.IsExpanded(true);
00267 }
00268
00269 void ViewModel::CollapseNode(const winrt::TreeViewNode& value)
00270 {
00271     value.IsExpanded(false);
00272 }
00273
00274 winrt::event_token ViewModel::NodeExpanding(const winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>& handler)
00275 {
00276     return m_nodeExpandingEventSource.add(handler);
00277 }
00278
00279 void ViewModel::NodeExpanding(const winrt::event_token token)
00280 {
00281     m_nodeExpandingEventSource.remove(token);
00282 }
00283
00284 winrt::event_token ViewModel::NodeCollapsed(const winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>& handler)
00285 {
00286     return m_nodeCollapsedEventSource.add(handler);
00287 }
00288
00289 void ViewModel::NodeCollapsed(const winrt::event_token token)
00290 {
00291     m_nodeCollapsedEventSource.remove(token);
00292 }
00293
00294 void ViewModel::SelectAll()
00295 {
00296     auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
00297     BeginSelectionChanges();
00298
00299     UpdateSelection(m_originNode.get(), TreeNodeSelectionState::Selected);
00300 }
00301
00302 void ViewModel::SelectSingleItem(winrt::IInspectable const& item)
00303 {
00304     auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
00305     BeginSelectionChanges();
00306
00307     auto selectedItems = GetSelectedItems();
00308     if (selectedItems.Size() > 0)
00309     {
00310         selectedItems.Clear();
00311     }
00312     if (item)
00313     {
00314         selectedItems.Append(item);
00315     }
00316 }
00317
00318 void ViewModel::SelectNode(const winrt::TreeViewNode& node, bool isSelected)
00319 {
00320     auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
00321     BeginSelectionChanges();
00322
00323     auto selectedNodes = GetSelectedNodes();
00324     if (isSelected)
00325     {
00326         if (IsInSingleSelectionMode() && selectedNodes.Size() > 0)
00327         {
00328             selectedNodes.Clear();
00329         }
00330         selectedNodes.Append(node);
00331     }
00332     else
00333     {
00334         unsigned int index;
00335         if (selectedNodes.IndexOf(node, index))
00336         {
00337             selectedNodes.RemoveAt(index);
00338         }
00339     }
00340 }
00341
00342 void ViewModel::SelectByIndex(int index, TreeNodeSelectionState const& state)
00343 {
00344     auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); });
00345     BeginSelectionChanges();
00346
00347     auto targetNode = GetNodeAt(index);
00348     UpdateSelection(targetNode, state);
00349 }
00350
00351 void ViewModel::BeginSelectionChanges()
00352 {
00353     if (!IsInSingleSelectionMode())
00354     {
00355         m_selectionTrackingCounter++;
00356         if (m_selectionTrackingCounter == 1) {
00357             m_addedSelectedItems.clear();
00358             m_removedSelectedItems.clear();
00359         }
00360     }
00361 }
00362
00363 void ViewModel::EndSelectionChanges()
00364 {
00365     if (!IsInSingleSelectionMode())
00366     {
00367         m_selectionTrackingCounter--;
00368         if (m_selectionTrackingCounter == 0 && (m_addedSelectedItems.size() > 0 || m_removedSelectedItems.size() > 0)) {
00369             auto treeView = winrt::get_self<TreeView>(m_TreeView.get());
00370
00371             auto added = winrt::make<Vector<winrt::IInspectable>>();
00372             for (unsigned int i = 0; i < m_addedSelectedItems.size(); i++)
00373             {
00374                 added.Append(m_addedSelectedItems.at(i).get());
00375             }
00376             auto removed = winrt::make<Vector<winrt::IInspectable>>();
00377             for (unsigned int i = 0; i < m_removedSelectedItems.size(); i++)
00378             {
00379                 removed.Append(m_removedSelectedItems.at(i));
00380             }
00381             treeView->RaiseSelectionChanged(added, removed);
00382         }
00383     }
00384 }
00385
00386 uint32_t ViewModel::Size()
00387 {
00388     auto inner = GetVectorInnerImpl();
00389     return inner->Size();
00390 }
00391
00392 winrt::IInspectable ViewModel::GetAt(uint32_t index)
00393 {
00394     winrt::TreeViewNode node = GetNodeAt(index);
00395     return IsContentMode() ? node.Content() : node;
00396 }
00397
00398 bool ViewModel::IndexOf(winrt::IInspectable const& value, uint32_t& index)
00399 {
00400     if (auto indexOfFunction = GetCustomIndexOfFunction())
00401     {
00402         return indexOfFunction(value, index);
00403     }
00404     else
00405     {
00406         auto inner = GetVectorInnerImpl();
00407         return inner->IndexOf(value, index);
00408     }
00409 }
00410
00411 uint32_t ViewModel::GetMany(uint32_t const startIndex, winrt::array_view<winrt::IInspectable> values)
00412 {
00413     auto inner = GetVectorInnerImpl();
00414     if (IsContentMode())
00415     {
00416         auto vector = winrt::make<Vector<winrt::IInspectable>>();
00417         const int size = Size();
00418         for (int i = 0; i < size; i++)
00419         {
00420             vector.Append(GetNodeAt(i).Content());
00421         }
00422         return vector.GetMany(startIndex, values);
00423     }
00424     return inner->GetMany(startIndex, values);
00425 }
00426
00427 winrt::IVectorView<winrt::IInspectable> ViewModel::GetView()
00428 {
00429     throw winrt::hresult_not_implemented();
00430 }
00431
00432 winrt::TreeViewNode ViewModel::GetNodeAt(uint32_t index)
00433 {
00434     auto inner = GetVectorInnerImpl();
00435     return inner->GetAt(index).as<winrt::TreeViewNode>();
00436 }
00437
00438 void ViewModel::SetAt(uint32_t index, winrt::IInspectable const& value)
00439 {
00440     auto inner = GetVectorInnerImpl();
00441     auto current = inner->GetAt(index).as<winrt::TreeViewNode>();
00442     inner->SetAt(index, value);
00443
00444     winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>();
00445
00446     auto tvnCurrent = winrt::get_self<TreeViewNode>(current);
00447     tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector[index]);
00448     tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector[index]);
00449
00450     // Hook up events and replace tokens
00451     auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode);
00452     m_collectionChangedEventTokenVector[index] = tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged });
00453     m_IsExpandedChangedEventTokenVector[index] = tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged });
00454 }
00455
00456 void ViewModel::InsertAt(uint32_t index, winrt::IInspectable const& value)
00457 {
00458     GetVectorInnerImpl()->InsertAt(index, value);
00459     winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>();
00460
00461     // Hook up events and save tokens
00462     auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode);
00463     m_collectionChangedEventTokenVector.insert(m_collectionChangedEventTokenVector.begin() + index, tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged }));
00464     m_IsExpandedChangedEventTokenVector.insert(m_IsExpandedChangedEventTokenVector.begin() + index, tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged }));
00465 }
00466
00467 void ViewModel::RemoveAt(uint32_t index)
00468 {
00469     auto inner = GetVectorInnerImpl();
00470     auto current = inner->GetAt(index).as<winrt::TreeViewNode>();
00471     inner->RemoveAt(index);
00472
00473     // Unhook event handlers
00474     auto tvnCurrent = winrt::get_self<TreeViewNode>(current);
00475     tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector[index]);
00476     tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector[index]);
00477
00478     // Remove tokens from vectors
00479     m_collectionChangedEventTokenVector.erase(m_collectionChangedEventTokenVector.begin() + index);
00480     m_IsExpandedChangedEventTokenVector.erase(m_IsExpandedChangedEventTokenVector.begin() + index);
00481 }
00482
00483 void ViewModel::Append(winrt::IInspectable const& value)
00484 {
00485     GetVectorInnerImpl()->Append(value);
00486     winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>();
00487
00488     // Hook up events and save tokens
00489     auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode);
00490     m_collectionChangedEventTokenVector.push_back(tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged }));
00491     m_IsExpandedChangedEventTokenVector.push_back(tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged }));
00492 }
00493
00494 void ViewModel::RemoveAtEnd()
00495 {
00496     auto inner = GetVectorInnerImpl();
00497     auto current = inner->GetAt(Size() - 1).as<winrt::TreeViewNode>();
00498     inner->RemoveAtEnd();
00499
00500     // Unhook events
00501     auto tvnCurrent = winrt::get_self<TreeViewNode>(current);
00502     tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector.back());
00503     tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector.back());
00504
00505     // Remove tokens
00506     m_collectionChangedEventTokenVector.pop_back();
00507     m_IsExpandedChangedEventTokenVector.pop_back();
00508 }
00509
00510 void ViewModel::Clear()
00511 {
00512     // Don't call GetVectorInnerImpl()->Clear() directly because we need to remove hooked events
00513     unsigned int count = Size();
00514     while (count != 0)
00515     {
00516         RemoveAtEnd();
00517         count--;
00518     }
00519 }
00520
00521 void ViewModel::ReplaceAll(winrt::array_view<winrt::IInspectable const> items)
00522 {
00523     auto inner = GetVectorInnerImpl();
00524     return inner->ReplaceAll(items);
00525 }
00526
00527 // Helper function
00528 void ViewModel::PrepareView(const winrt::TreeViewNode& originNode)
00529 {
00530     // Remove any existing RootNode events/children
00531     if (auto existingOriginNode = m_originNode.get())
00532     {
00533         for (int i = (existingOriginNode.Children().Size() - 1); i >= 0; i--)
00534         {
00535             auto removeNode = existingOriginNode.Children().GetAt(i).as<winrt::TreeViewNode>();
00536             RemoveNodeAndDescendantsFromView(removeNode);
00537         }
00538
00539         if (m_rootNodeChildrenChangedEventToken.value != 0)
00540         {
00541             existingOriginNode.Children().as<winrt::IObservableVector<winrt::TreeViewNode>>().VectorChanged(m_rootNodeChildrenChangedEventToken);
00542         }
00543     }
00544
00545     // Add new RootNode & children
00546     m_originNode.set(originNode);
00547     m_rootNodeChildrenChangedEventToken = winrt::get_self<TreeViewNode>(originNode)->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged });
00548     originNode.IsExpanded(true);
00549
00550     int allOpenedDescendantsCount = 0;
00551     for (unsigned int i = 0; i < originNode.Children().Size(); i++)
00552     {
00553         auto addNode = originNode.Children().GetAt(i).as<winrt::TreeViewNode>();
00554         AddNodeToView(addNode, i + allOpenedDescendantsCount);
00555         allOpenedDescendantsCount = AddNodeDescendantsToView(addNode, i, allOpenedDescendantsCount);
00556     }
00557 }
00558
00559 void ViewModel::SetOwners(winrt::TreeViewList const& owningList, winrt::TreeView const& owningTreeView)
00560 {
00561     m_TreeViewList = winrt::make_weak(owningList);
00562     m_TreeView = winrt::make_weak(owningTreeView);
00563 }
00564
00565 winrt::TreeViewList ViewModel::ListControl()
00566 {
00567     return m_TreeViewList.get();
00568 }
00569
00570 bool ViewModel::IsInSingleSelectionMode()
00571 {
00572     return m_TreeViewList.get().SelectionMode() == winrt::ListViewSelectionMode::Single;
00573 }
00574
00575 // Private helpers
00576 void ViewModel::AddNodeToView(const winrt::TreeViewNode& value, unsigned int index)
00577 {
00578     InsertAt(index, value);
00579 }
00580
00581 int ViewModel::AddNodeDescendantsToView(const winrt::TreeViewNode& value, unsigned int index, int offset)
00582 {
00583     if (value.IsExpanded())
00584     {
00585         unsigned int size = value.Children().Size();
00586         for (unsigned int i = 0; i < size; i++)
00587         {
00588             auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>();
00589             offset++;
00590             AddNodeToView(childNode, offset + index);
00591             offset = AddNodeDescendantsToView(childNode, index, offset);
00592         }
00593
00594         return offset;
00595     }
00596
00597     return offset;
00598 }
00599
00600 void ViewModel::RemoveNodeAndDescendantsFromView(const winrt::TreeViewNode& value)
00601 {
00602     UINT32 valueIndex;
00603     if (value.IsExpanded())
00604     {
00605         unsigned int size = value.Children().Size();
00606         for (unsigned int i = 0; i < size; i++)
00607         {
00608             auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>();
00609             RemoveNodeAndDescendantsFromView(childNode);
00610         }
00611     }
00612
00613     const bool containsValue = IndexOfNode(value, valueIndex);
00614     if (containsValue)
00615     {
00616         RemoveAt(valueIndex);
00617     }
00618 }
00619
00620 void ViewModel::RemoveNodesAndDescendentsWithFlatIndexRange(unsigned int lowIndex, unsigned int highIndex)
00621 {
00622     MUX_ASSERT(lowIndex <= highIndex);
00623
00624     for (int i = static_cast<int>(highIndex); i >= static_cast<int>(lowIndex); i--)
00625     {
00626         RemoveNodeAndDescendantsFromView(GetNodeAt(i));
00627     }
00628 }
00629
00630 int ViewModel::GetNextIndexInFlatTree(const winrt::TreeViewNode& node)
00631 {
00632     unsigned int index = 0;
00633     const bool isNodeInFlatList = IndexOfNode(node, index);
00634
00635     if (isNodeInFlatList)
00636     {
00637         index++;
00638     }
00639     else
00640     {
00641         // node is Root node, so next index in flat tree is 0
00642         index = 0;
00643     }
00644     return index;
00645 }
00646
00647 // When ViewModel receives a event, it only includes the sender(parent TreeViewNode) and index.
00648 // We can't use sender[index] directly because it is already updated/removed
00649 // To find the removed TreeViewNode:
00650 //   calculate allOpenedDescendantsCount in sender[0..index-1] first
00651 //   then add offset and finally return TreeViewNode by looking up the flat tree.
00652 winrt::TreeViewNode ViewModel::GetRemovedChildTreeViewNodeByIndex(winrt::TreeViewNode const& node, unsigned int childIndex)
00653 {
00654     unsigned int allOpenedDescendantsCount = 0;
00655     for (unsigned int i = 0; i < childIndex; i++)
00656     {
00657         winrt::TreeViewNode calcNode = node.Children().GetAt(i).as<winrt::TreeViewNode>();
00658         if (calcNode.IsExpanded())
00659         {
00660             allOpenedDescendantsCount += GetExpandedDescendantCount(calcNode);
00661         }
00662     }
00663
00664     const unsigned int childIndexInFlatTree = GetNextIndexInFlatTree(node) + childIndex + allOpenedDescendantsCount;
00665     return GetNodeAt(childIndexInFlatTree);
00666 }
00667
00668 int ViewModel::CountDescendants(const winrt::TreeViewNode& value)
00669 {
00670     int descendantCount = 0;
00671     unsigned int size = value.Children().Size();
00672     for (unsigned int i = 0; i < size; i++)
00673     {
00674         auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>();
00675         descendantCount++;
00676         if (childNode.IsExpanded())
00677         {
00678             descendantCount = descendantCount + CountDescendants(childNode);
00679         }
00680     }
00681
00682     return descendantCount;
00683 }
00684
00685 unsigned int ViewModel::IndexOfNextSibling(winrt::TreeViewNode const& childNode)
00686 {
00687     auto child = childNode;
00688     auto parentNode = child.Parent();
00689     unsigned int stopIndex;
00690     bool isLastRelativeChild = true;
00691     while (parentNode && isLastRelativeChild)
00692     {
00693         unsigned int relativeIndex;
00694         parentNode.Children().IndexOf(child, relativeIndex);
00695         if (parentNode.Children().Size() - 1 != relativeIndex)
00696         {
00697             isLastRelativeChild = false;
00698         }
00699         else
00700         {
00701             child = parentNode;
00702             parentNode = parentNode.Parent();
00703         }
00704     }
00705
00706     if (parentNode)
00707     {
00708         unsigned int siblingIndex;
00709         parentNode.Children().IndexOf(child, siblingIndex);
00710         auto siblingNode = parentNode.Children().GetAt(siblingIndex + 1);
00711         IndexOfNode(siblingNode, stopIndex);
00712     }
00713     else
00714     {
00715         stopIndex = Size();
00716     }
00717
00718     return stopIndex;
00719 }
00720
00721 unsigned int ViewModel::GetExpandedDescendantCount(winrt::TreeViewNode const& parentNode)
00722 {
00723     unsigned int allOpenedDescendantsCount = 0;
00724     for (unsigned int i = 0; i < parentNode.Children().Size(); i++)
00725     {
00726         auto childNode = parentNode.Children().GetAt(i).as<winrt::TreeViewNode>();
00727         allOpenedDescendantsCount++;
00728         if (childNode.IsExpanded())
00729         {
00730             allOpenedDescendantsCount += CountDescendants(childNode);
00731         }
00732     }
00733     return allOpenedDescendantsCount;
00734 }
00735
00736 bool ViewModel::IsNodeSelected(winrt::TreeViewNode const& targetNode)
00737 {
00738     unsigned int index;
00739     return m_selectedNodes.get().IndexOf(targetNode, index);
00740 }
00741
00742 TreeNodeSelectionState ViewModel::NodeSelectionState(winrt::TreeViewNode const& targetNode)
00743 {
00744     return winrt::get_self<TreeViewNode>(targetNode)->SelectionState();
00745 }
00746
00747 void ViewModel::UpdateNodeSelection(winrt::TreeViewNode const& selectNode, TreeNodeSelectionState const& selectionState)
00748 {
00749     auto node = winrt::get_self<TreeViewNode>(selectNode);
00750     if (selectionState != node->SelectionState())
00751     {
00752         node->SelectionState(selectionState);
00753         auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get());
00754         switch (selectionState)
00755         {
00756         case TreeNodeSelectionState::Selected:
00757             selectedNodes->InsertAtCore_NoContainsCheck(selectedNodes->Size(), selectNode);
00758             m_selectedNodeChildrenChangedEventTokenVector.push_back(winrt::get_self<TreeViewNode>(selectNode)->ChildrenChanged({ this, &ViewModel::SelectedNodeChildrenChanged }));
00759             break;
00760
00761         case TreeNodeSelectionState::PartialSelected:
00762         case TreeNodeSelectionState::UnSelected:
00763             unsigned int index;
00764             if (selectedNodes->IndexOf(selectNode, index))
00765             {
00766                 selectedNodes->RemoveAtCore(index);
00767                 winrt::get_self<TreeViewNode>(selectNode)->ChildrenChanged(m_selectedNodeChildrenChangedEventTokenVector[index]);
00768                 m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + index);
00769             }
00770             break;
00771         }
00772     }
00773 }
00774
00775 void ViewModel::UpdateSelection(winrt::TreeViewNode const& selectNode, TreeNodeSelectionState const& selectionState)
00776 {
00777     if(NodeSelectionState(selectNode) != selectionState)
00778     {
00779         UpdateNodeSelection(selectNode, selectionState);
00780
00781         if (!IsInSingleSelectionMode())
00782         {
00783             UpdateSelectionStateOfDescendants(selectNode, selectionState);
00784             UpdateSelectionStateOfAncestors(selectNode);
00785         }
00786     }
00787 }
00788
00789 void ViewModel::UpdateSelectionStateOfDescendants(winrt::TreeViewNode const& targetNode, TreeNodeSelectionState const& selectionState)
00790 {
00791     if (selectionState == TreeNodeSelectionState::PartialSelected) return;
00792
00793     // For unselecting items, we process the list backwards. This prevents an item from being repeatedly shuffled
00794     // towards the front of the list only to be removed at the end anyway.
00795     if (selectionState == TreeNodeSelectionState::UnSelected)
00796     {
00797         for (int i = targetNode.Children().Size() - 1; i >= 0; i--)
00798         {
00799             const auto& childNode = targetNode.Children().GetAt(i);
00800             UpdateSelectionStateOfDescendants(childNode, selectionState);
00801             UpdateNodeSelection(childNode, selectionState);
00802             NotifyContainerOfSelectionChange(childNode, selectionState);
00803         }
00804     }
00805     else
00806     {
00807         for (auto const& childNode : targetNode.Children())
00808         {
00809             UpdateNodeSelection(childNode, selectionState);
00810             UpdateSelectionStateOfDescendants(childNode, selectionState);
00811             NotifyContainerOfSelectionChange(childNode, selectionState);
00812         }
00813     }
00814 }
00815
00816 void ViewModel::UpdateSelectionStateOfAncestors(winrt::TreeViewNode const& targetNode)
00817 {
00818     if (auto parentNode = targetNode.Parent())
00819     {
00820         // no need to update m_originalNode since it's the logical root for TreeView and not accessible to users
00821         if (parentNode != m_originNode.safe_get())
00822         {
00823             const auto previousState = NodeSelectionState(parentNode);
00824             const auto selectionState = SelectionStateBasedOnChildren(parentNode);
00825
00826             if (previousState != selectionState)
00827             {
00828                 UpdateNodeSelection(parentNode, selectionState);
00829                 NotifyContainerOfSelectionChange(parentNode, selectionState);
00830                 UpdateSelectionStateOfAncestors(parentNode);
00831             }
00832         }
00833     }
00834 }
00835
00836 TreeNodeSelectionState ViewModel::SelectionStateBasedOnChildren(winrt::TreeViewNode const& node)
00837 {
00838     bool hasSelectedChildren{ false };
00839     bool hasUnSelectedChildren{ false };
00840
00841     for (auto const& childNode : node.Children())
00842     {
00843         const auto state = NodeSelectionState(childNode);
00844         if (state == TreeNodeSelectionState::Selected)
00845         {
00846             hasSelectedChildren = true;
00847         }
00848         else if (state == TreeNodeSelectionState::UnSelected)
00849         {
00850             hasUnSelectedChildren = true;
00851         }
00852
00853         if ((hasSelectedChildren && hasUnSelectedChildren) ||
00854             state == TreeNodeSelectionState::PartialSelected)
00855         {
00856             return TreeNodeSelectionState::PartialSelected;
00857         }
00858     }
00859
00860     return hasSelectedChildren ? TreeNodeSelectionState::Selected : TreeNodeSelectionState::UnSelected;
00861 }
00862
00863 void ViewModel::NotifyContainerOfSelectionChange(winrt::TreeViewNode const& targetNode, TreeNodeSelectionState const& selectionState)
00864 {
00865     if (m_TreeViewList)
00866     {
00867         auto container = winrt::get_self<TreeViewList>(m_TreeViewList.get())->ContainerFromNode(targetNode);
00868         if (container)
00869         {
00870             winrt::TreeViewItem targetItem = container.as<winrt::TreeViewItem>();
00871             winrt::get_self<TreeViewItem>(targetItem)->UpdateSelectionVisual(selectionState);
00872         }
00873     }
00874 }
00875
00876 winrt::IVector<winrt::TreeViewNode> ViewModel::GetSelectedNodes()
00877 {
00878     return m_selectedNodes.get();
00879 }
00880
00881 winrt::IVector<winrt::IInspectable> ViewModel::GetSelectedItems()
00882 {
00883     return m_selectedItems.get();
00884 }
00885
00886 void ViewModel::TrackItemSelected(winrt::IInspectable item)
00887 {
00888     if (m_selectionTrackingCounter > 0 && item != m_originNode.safe_get())
00889     {
00890         m_addedSelectedItems.push_back(winrt::make_weak(item));
00891     }
00892 }
00893
00894 void ViewModel::TrackItemUnselected(winrt::IInspectable item)
00895 {
00896     if (m_selectionTrackingCounter > 0 && item != m_originNode.safe_get())
00897     {
00898         m_removedSelectedItems.push_back(item);
00899     }
00900 }
00901
00902 winrt::TreeViewNode ViewModel::GetAssociatedNode(winrt::IInspectable item)
00903 {
00904     if(auto treeView = m_TreeView.get())
00905     {
00906         if(auto treeViewImpl = winrt::get_self<TreeView>(treeView))
00907         {
00908             return treeViewImpl->GetAssociatedNode(item);
00909         }
00910     }
00911
00912     return nullptr;
00913 }
00914
00915 bool ViewModel::IndexOfNode(winrt::TreeViewNode const& targetNode, uint32_t& index)
00916 {
00917     return GetVectorInnerImpl()->IndexOf(targetNode, index);
00918 }
00919
00920 void ViewModel::TreeViewNodeVectorChanged(winrt::TreeViewNode const& sender, winrt::IInspectable const& args)
00921 {
00922     winrt::CollectionChange collectionChange = args.as<winrt::IVectorChangedEventArgs>().CollectionChange();
00923     unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index();
00924
00925     switch (collectionChange)
00926     {
00927         // Reset case, commonly seen when a TreeNode is cleared.
00928         // removes all nodes that need removing then
00929         // toggles a collapse / expand to ensure order.
00930     case (winrt::CollectionChange::Reset):
00931     {
00932         auto resetNode = sender.as<winrt::TreeViewNode>();
00933         if (resetNode.IsExpanded())
00934         {
00935             //The lowIndex is the index of the first child, while the high index is the index of the last descendant in the list.
00936             const unsigned int lowIndex = GetNextIndexInFlatTree(resetNode);
00937             const unsigned int highIndex = IndexOfNextSibling(resetNode) - 1;
00938             RemoveNodesAndDescendentsWithFlatIndexRange(lowIndex, highIndex);
00939
00940             // reset the status of resetNodes children
00941             CollapseNode(resetNode);
00942             ExpandNode(resetNode);
00943         }
00944
00945         break;
00946     }
00947
00948     // We will find the correct index of insertion by first checking if the
00949     // node we are inserting into is expanded. If it is we will start walking
00950     // down the tree and counting the open items. This is to ensure we place
00951     // the inserted item in the correct index. If along the way we bump into
00952     // the item being inserted, we insert there then return, because we don't
00953     // need to do anything further.
00954     case (winrt::CollectionChange::ItemInserted):
00955     {
00956         auto targetNode = sender.as<winrt::TreeViewNode>().Children().GetAt(index).as<winrt::TreeViewNode>();
00957
00958         auto parentNode = targetNode.Parent();
00959         const unsigned int nextNodeIndex = GetNextIndexInFlatTree(parentNode);
00960         int allOpenedDescendantsCount = 0;
00961
00962         if (parentNode.IsExpanded())
00963         {
00964             for (unsigned int i = 0; i < parentNode.Children().Size(); i++)
00965             {
00966                 auto childNode = parentNode.Children().GetAt(i).as<winrt::TreeViewNode>();
00967                 if (childNode == targetNode)
00968                 {
00969                     AddNodeToView(targetNode, nextNodeIndex + i + allOpenedDescendantsCount);
00970                     if (targetNode.IsExpanded())
00971                     {
00972                         AddNodeDescendantsToView(targetNode, nextNodeIndex + i, allOpenedDescendantsCount);
00973                     }
00974                 }
00975                 else if (childNode.IsExpanded())
00976                 {
00977                     allOpenedDescendantsCount += CountDescendants(childNode);
00978                 }
00979             }
00980         }
00981
00982         break;
00983     }
00984
00985     // Removes a node from the ViewModel when a TreeNode
00986     // removes a child.
00987     case (winrt::CollectionChange::ItemRemoved):
00988     {
00989         auto removingNodeParent = sender.as<winrt::TreeViewNode>();
00990         if (removingNodeParent.IsExpanded())
00991         {
00992             auto removedNode = GetRemovedChildTreeViewNodeByIndex(removingNodeParent, index);
00993             RemoveNodeAndDescendantsFromView(removedNode);
00994         }
00995
00996         break;
00997     }
00998
00999     // Triggered by a replace such as SetAt.
01000     // Updates the TreeNode that changed in the ViewModel.
01001     case (winrt::CollectionChange::ItemChanged):
01002     {
01003         auto targetNode = sender.as<winrt::TreeViewNode>().Children().GetAt(index).as<winrt::TreeViewNode>();
01004         auto changingNodeParent = sender.as<winrt::TreeViewNode>();
01005         if (changingNodeParent.IsExpanded())
01006         {
01007             auto removedNode = GetRemovedChildTreeViewNodeByIndex(changingNodeParent, index);
01008             [[gsl::suppress(con)]]
01009             {
01010                 unsigned int removedNodeIndex = 0;
01011                 MUX_ASSERT(IndexOfNode(removedNode, removedNodeIndex));
01012
01013                 RemoveNodeAndDescendantsFromView(removedNode);
01014                 InsertAt(removedNodeIndex, targetNode.as<winrt::IInspectable>());
01015             }
01016
01017         }
01018
01019         break;
01020     }
01021     }
01022 }
01023
01024 void ViewModel::SelectedNodeChildrenChanged(winrt::TreeViewNode const& sender, winrt::IInspectable const& args)
01025 {
01026     winrt::CollectionChange collectionChange = args.as<winrt::IVectorChangedEventArgs>().CollectionChange();
01027     unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index();
01028     auto changingChildrenNode = sender.as<winrt::TreeViewNode>();
01029
01030     switch (collectionChange)
01031     {
01032     case (winrt::CollectionChange::ItemInserted):
01033     {
01034         auto newNode = changingChildrenNode.Children().GetAt(index);
01035
01036         // If we are in multi select, we want the new child items to be also selected.
01037         if (!IsInSingleSelectionMode())
01038         {
01039             UpdateNodeSelection(newNode, NodeSelectionState(changingChildrenNode));
01040         }
01041         break;
01042     }
01043
01044     case (winrt::CollectionChange::ItemChanged):
01045     {
01046         auto newNode = changingChildrenNode.Children().GetAt(index);
01047         UpdateNodeSelection(newNode, NodeSelectionState(changingChildrenNode));
01048
01049         auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get());
01050         for (unsigned int i = 0; i < selectedNodes->Size(); i++)
01051         {
01052             auto selectNode = selectedNodes->GetAt(i);
01053             auto ancestorNode = selectNode.Parent();
01054             while (ancestorNode && ancestorNode.Parent())
01055             {
01056                 ancestorNode = ancestorNode.Parent();
01057             }
01058
01059             if (ancestorNode != m_originNode.get())
01060             {
01061                 selectedNodes->RemoveAtCore(i);
01062                 m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + i);
01063             }
01064         }
01065         break;
01066     }
01067
01068     case (winrt::CollectionChange::ItemRemoved):
01069     case (winrt::CollectionChange::Reset):
01070     {
01071         //This checks if there are still children, then re-evaluates parents selection based on current state of remaining children
01072         //If a node has 2 children selected, and 1 unselected, and the unselected is removed, we then change the parent node to selected.
01073         //If the last child is removed, we preserve the current selection state of the parent, and this code need not execute.
01074         if (changingChildrenNode.Children().Size() > 0)
01075         {
01076             auto firstChildNode = changingChildrenNode.Children().GetAt(0);
01077             UpdateSelectionStateOfAncestors(firstChildNode);
01078         }
01079
01080         auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get());
01081         for (unsigned int i = 0; i < selectedNodes->Size(); i++)
01082         {
01083             auto selectNode = selectedNodes->GetAt(i);
01084             auto ancestorNode = selectNode.Parent();
01085             while (ancestorNode && ancestorNode.Parent())
01086             {
01087                 ancestorNode = ancestorNode.Parent();
01088             }
01089
01090             if (ancestorNode != m_originNode.get())
01091             {
01092                 selectedNodes->RemoveAtCore(i);
01093                 m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + i);
01094
01095                 // We've removed the node at position i, so we should keep i at the same position
01096                 // because the new node at position i is a different one.
01097                 i--;
01098             }
01099         }
01100         break;
01101     }
01102
01103     }
01104 }
01105
01106 void ViewModel::TreeViewNodePropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args)
01107 {
01108     winrt::IDependencyProperty property = args.Property();
01109     if (property == TreeViewNode::s_IsExpandedProperty)
01110     {
01111         TreeViewNodeIsExpandedPropertyChanged(sender, args);
01112     }
01113     else if (property == TreeViewNode::s_HasChildrenProperty)
01114     {
01115         TreeViewNodeHasChildrenPropertyChanged(sender, args);
01116     }
01117 }
01118
01119 void ViewModel::TreeViewNodeIsExpandedPropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args)
01120 {
01121     auto targetNode = sender.as<winrt::TreeViewNode>();
01122     if (targetNode.IsExpanded())
01123     {
01124         if (targetNode.Children().Size() != 0)
01125         {
01126             int openedDescendantOffset = 0;
01127             unsigned int index;
01128             IndexOfNode(targetNode, index);
01129             index = index + 1;
01130             for (unsigned int i = 0; i < targetNode.Children().Size(); i++)
01131             {
01132                 winrt::TreeViewNode childNode{ nullptr };
01133                 childNode = targetNode.Children().GetAt(i).as<winrt::TreeViewNode>();
01134                 AddNodeToView(childNode, index + i + openedDescendantOffset);
01135                 openedDescendantOffset = AddNodeDescendantsToView(childNode, index + i, openedDescendantOffset);
01136             }
01137         }
01138
01139         //Notify TreeView that a node is being expanded.
01140         m_nodeExpandingEventSource(targetNode, nullptr);
01141     }
01142     else
01143     {
01144         for (unsigned int i = 0; i < targetNode.Children().Size(); i++)
01145         {
01146             winrt::TreeViewNode childNode{ nullptr };
01147             childNode = targetNode.Children().GetAt(i).as<winrt::TreeViewNode>();
01148             RemoveNodeAndDescendantsFromView(childNode);
01149         }
01150
01151         //Notify TreeView that a node is being collapsed
01152         m_nodeCollapsedEventSource(targetNode, nullptr);
01153     }
01154 }
01155
01156 void ViewModel::TreeViewNodeHasChildrenPropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args)
01157 {
01158     if (m_TreeViewList)
01159     {
01160         auto targetNode = sender.as<winrt::TreeViewNode>();
01161         auto container = winrt::get_self<TreeViewList>(m_TreeViewList.get())->ContainerFromNode(targetNode);
01162         if (container)
01163         {
01164             winrt::TreeViewItem targetItem = container.as<winrt::TreeViewItem>();
01165             targetItem.GlyphOpacity(targetNode.HasChildren() ? 1.0 : 0.0);
01166         }
01167     }
01168 }
01169
01170 void ViewModel::IsContentMode(const bool value)
01171 {
01172     m_isContentMode = value;
01173 }
01174
01175 bool ViewModel::IsContentMode()
01176 {
01177     return m_isContentMode;
01178 }
01179
01180 void ViewModel::ClearEventTokenVectors()
01181 {
01182     // Remove ChildrenChanged and ExpandedChanged events
01183     auto inner = GetVectorInnerImpl();
01184     for (uint32_t i =0 ; i < Size(); i++)
01185     {
01186         if (auto current = inner->SafeGetAt(i))
01187         {
01188             auto tvnCurrent = winrt::get_self<TreeViewNode>(current.as<winrt::TreeViewNode>());
01189             tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector.at(i));
01190             tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector.at(i));
01191         }
01192     }
01193
01194     // Remove SelectedNodeChildrenChangedEvent
01195     if (auto selectedNodes = m_selectedNodes.safe_get())
01196     {
01197         for (uint32_t i = 0; i < selectedNodes.Size(); i++)
01198         {
01199             if (auto current = selectedNodes.GetAt(i))
01200             {
01201                 auto node = winrt::get_self<TreeViewNode>(current.as<winrt::TreeViewNode>());
01202                 node->ChildrenChanged(m_selectedNodeChildrenChangedEventTokenVector[i]);
01203             }
01204         }
01205     }
01206
01207     // Clear token vectors
01208     m_collectionChangedEventTokenVector.clear();
01209     m_IsExpandedChangedEventTokenVector.clear();
01210     m_selectedNodeChildrenChangedEventTokenVector.clear();
01211 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewLateDataInitTest Member List

This is the complete list of members for TreeViewLateDataInitTest, including all inherited members.
InitializeItemsSource_Click(object sender, RoutedEventArgs e) | TreeViewLateDataInitTest | [inline, private]
m_testTreeViewItemsSource | TreeViewLateDataInitTest | [private]
NotifyPropertyChanged(String propertyName) | TreeViewLateDataInitTest | [inline, private]
PrepareItemsSource() | TreeViewLateDataInitTest | [inline, private]
PropertyChanged | TreeViewLateDataInitTest |
TestTreeViewItemsSource | TreeViewLateDataInitTest |
TreeViewLateDataInitTest() | TreeViewLateDataInitTest | [inline]
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/AutoHandle.h Source File

  • File List
  • File Members
  • inc

AutoHandle.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // Macros to make it easier to declare / instantiate instances of the template class for specific handle data type
00007 #define DECLARE_AUTOHANDLE_CLASS(className, handlePolicy) \
00008     typedef MUXControls::Common::AutoHandle<handlePolicy> className; \
00009
00010 namespace MUXControls { namespace Common {
00011
00012     template <typename THandlePolicy>
00013     class AutoHandle
00014     {
00015     public:
00016         using THandleType = typename THandlePolicy::THandleType;
00017
00018         AutoHandle();
00019         explicit AutoHandle(THandleType handle); // Conversion constructor
00020         AutoHandle(AutoHandle&& other);
00021         ~AutoHandle();
00022
00023         AutoHandle& operator=(AutoHandle&& other);
00024         AutoHandle& operator=(const THandleType& other);
00025
00026         bool operator==(THandleType handle) const;
00027         bool operator!=(THandleType handle) const;
00028
00029         THandleType* operator&()
00030         {
00031             return &m_handle;
00032         }
00033
00034         operator THandleType() const;
00035
00036         void Attach(THandleType handle);
00037
00038         THandleType Detach()
00039         {
00040             THandleType handle = m_handle;
00041             THandlePolicy::Invalidate(m_handle);
00042             return handle;
00043         }
00044
00045         void Release();
00046
00047         bool IsValid() const;
00048
00049     private:
00050         AutoHandle(const AutoHandle&); // not implemented
00051         AutoHandle& operator=(const AutoHandle&); // not implemented
00052
00053         THandleType m_handle;
00054     };
00055
00056     template <typename THandlePolicy>
00057     AutoHandle<THandlePolicy>::AutoHandle()
00058         : m_handle(THandlePolicy::Invalidate(m_handle))
00059     {
00060     }
00061
00062     template <typename THandlePolicy>
00063     AutoHandle<THandlePolicy>::AutoHandle(THandleType handle)
00064         : m_handle(handle)
00065     {
00066     }
00067
00068     template <typename THandlePolicy>
00069     AutoHandle<THandlePolicy>::AutoHandle(AutoHandle&& other)
00070         : m_handle(other.Detach())
00071     {
00072     }
00073
00074     template <typename THandlePolicy>
00075     AutoHandle<THandlePolicy>::~AutoHandle()
00076     {
00077         Release();
00078     }
00079
00080     template <typename THandlePolicy>
00081     AutoHandle<THandlePolicy>& AutoHandle<THandlePolicy>::operator=(const THandleType& other)
00082     {
00083         Attach(other);
00084         return *this;
00085     }
00086
00087     template <typename THandlePolicy>
00088     AutoHandle<THandlePolicy>& AutoHandle<THandlePolicy>::operator=(AutoHandle&& other)
00089     {
00090         Attach(other.Detach());
00091         return *this;
00092     }
00093
00094     template <typename THandlePolicy>
00095     bool AutoHandle<THandlePolicy>::operator==(THandleType handle) const
00096     {
00097         return (m_handle == handle);
00098     }
00099
00100     template <typename THandlePolicy>
00101     bool AutoHandle<THandlePolicy>::operator!=(THandleType handle) const
00102     {
00103         return (m_handle != handle);
00104     }
00105
00106     template <typename THandlePolicy>
00107     AutoHandle<THandlePolicy>::operator THandleType() const
00108     {
00109         return m_handle;
00110     }
00111
00112     template <typename THandlePolicy>
00113     void AutoHandle<THandlePolicy>::Attach(THandleType handle)
00114     {
00115         if (m_handle != handle)
00116         {
00117             Release();
00118         }
00119
00120         m_handle = handle;
00121     }
00122
00123     template <typename THandlePolicy>
00124     void AutoHandle<THandlePolicy>::Release()
00125     {
00126         if (THandlePolicy::IsValid(m_handle))
00127         {
00128             THandlePolicy::Close(m_handle);
00129         }
00130
00131         THandlePolicy::Invalidate(m_handle);
00132     }
00133
00134     template <typename THandlePolicy>
00135     bool AutoHandle<THandlePolicy>::IsValid() const
00136     {
00137         return THandlePolicy::IsValid(m_handle);
00138     }
00139
00140     class HandlePolicy
00141     {
00142     public:
00143         using THandleType = HANDLE;
00144
00145         static void Close(HANDLE& handle)
00146         {
00147             ::CloseHandle(handle);
00148         }
00149
00150         static bool IsValid(const HANDLE& handle)
00151         {
00152             return (INVALID_HANDLE_VALUE != handle) && handle;
00153         }
00154
00155         static HANDLE Invalidate(HANDLE& handle)
00156         {
00157             handle = INVALID_HANDLE_VALUE;
00158             return handle;
00159         }
00160     };
00161
00162     // Declare most used AutoHandles
00163     DECLARE_AUTOHANDLE_CLASS(Handle, HandlePolicy);
00164
00165 } } // namespace MUXControls::Common
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollControllerAddScrollVelocityRequestedEventArgs Member List

This is the complete list of members for ScrollControllerAddScrollVelocityRequestedEventArgs, including all inherited members.
CorrelationId() const | ScrollControllerAddScrollVelocityRequestedEventArgs |
CorrelationId(int32_t correlationId) | ScrollControllerAddScrollVelocityRequestedEventArgs |
InertiaDecayRate() const | ScrollControllerAddScrollVelocityRequestedEventArgs |
OffsetVelocity() const | ScrollControllerAddScrollVelocityRequestedEventArgs |
ScrollControllerAddScrollVelocityRequestedEventArgs(float offsetVelocity, winrt::IReference< float > inertiaDecayRate) | ScrollControllerAddScrollVelocityRequestedEventArgs |
~ScrollControllerAddScrollVelocityRequestedEventArgs() | ScrollControllerAddScrollVelocityRequestedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarPanel.properties.cpp Source File

  • File List
  • File Members
  • Generated

InfoBarPanel.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InfoBarPanel.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InfoBarPanel)
00012 }
00013
00014 #include "InfoBarPanel.g.cpp"
00015
00016 GlobalDependencyProperty InfoBarPanelProperties::s_HorizontalOrientationMarginProperty{ nullptr };
00017 GlobalDependencyProperty InfoBarPanelProperties::s_HorizontalOrientationPaddingProperty{ nullptr };
00018 GlobalDependencyProperty InfoBarPanelProperties::s_VerticalOrientationMarginProperty{ nullptr };
00019 GlobalDependencyProperty InfoBarPanelProperties::s_VerticalOrientationPaddingProperty{ nullptr };
00020
00021 InfoBarPanelProperties::InfoBarPanelProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void InfoBarPanelProperties::EnsureProperties()
00027 {
00028     if (!s_HorizontalOrientationMarginProperty)
00029     {
00030         s_HorizontalOrientationMarginProperty =
00031             InitializeDependencyProperty(
00032                 L"HorizontalOrientationMargin",
00033                 winrt::name_of<winrt::Thickness>(),
00034                 winrt::name_of<winrt::InfoBarPanel>(),
00035                 true /* isAttached */,
00036                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00037                 nullptr);
00038     }
00039     if (!s_HorizontalOrientationPaddingProperty)
00040     {
00041         s_HorizontalOrientationPaddingProperty =
00042             InitializeDependencyProperty(
00043                 L"HorizontalOrientationPadding",
00044                 winrt::name_of<winrt::Thickness>(),
00045                 winrt::name_of<winrt::InfoBarPanel>(),
00046                 false /* isAttached */,
00047                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00048                 nullptr);
00049     }
00050     if (!s_VerticalOrientationMarginProperty)
00051     {
00052         s_VerticalOrientationMarginProperty =
00053             InitializeDependencyProperty(
00054                 L"VerticalOrientationMargin",
00055                 winrt::name_of<winrt::Thickness>(),
00056                 winrt::name_of<winrt::InfoBarPanel>(),
00057                 true /* isAttached */,
00058                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00059                 nullptr);
00060     }
00061     if (!s_VerticalOrientationPaddingProperty)
00062     {
00063         s_VerticalOrientationPaddingProperty =
00064             InitializeDependencyProperty(
00065                 L"VerticalOrientationPadding",
00066                 winrt::name_of<winrt::Thickness>(),
00067                 winrt::name_of<winrt::InfoBarPanel>(),
00068                 false /* isAttached */,
00069                 ValueHelper<winrt::Thickness>::BoxedDefaultValue(),
00070                 nullptr);
00071     }
00072 }
00073
00074 void InfoBarPanelProperties::ClearProperties()
00075 {
00076     s_HorizontalOrientationMarginProperty = nullptr;
00077     s_HorizontalOrientationPaddingProperty = nullptr;
00078     s_VerticalOrientationMarginProperty = nullptr;
00079     s_VerticalOrientationPaddingProperty = nullptr;
00080 }
00081
00082
00083 void InfoBarPanelProperties::SetHorizontalOrientationMargin(winrt::DependencyObject const& target, winrt::Thickness const& value)
00084 {
00085     target.SetValue(s_HorizontalOrientationMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00086 }
00087
00088 winrt::Thickness InfoBarPanelProperties::GetHorizontalOrientationMargin(winrt::DependencyObject const& target)
00089 {
00090     return ValueHelper<winrt::Thickness>::CastOrUnbox(target.GetValue(s_HorizontalOrientationMarginProperty));
00091 }
00092
00093 void InfoBarPanelProperties::HorizontalOrientationPadding(winrt::Thickness const& value)
00094 {
00095     [[gsl::suppress(con)]]
00096     {
00097     static_cast<InfoBarPanel*>(this)->SetValue(s_HorizontalOrientationPaddingProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00098     }
00099 }
00100
00101 winrt::Thickness InfoBarPanelProperties::HorizontalOrientationPadding()
00102 {
00103     return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<InfoBarPanel*>(this)->GetValue(s_HorizontalOrientationPaddingProperty));
00104 }
00105
00106
00107 void InfoBarPanelProperties::SetVerticalOrientationMargin(winrt::DependencyObject const& target, winrt::Thickness const& value)
00108 {
00109     target.SetValue(s_VerticalOrientationMarginProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00110 }
00111
00112 winrt::Thickness InfoBarPanelProperties::GetVerticalOrientationMargin(winrt::DependencyObject const& target)
00113 {
00114     return ValueHelper<winrt::Thickness>::CastOrUnbox(target.GetValue(s_VerticalOrientationMarginProperty));
00115 }
00116
00117 void InfoBarPanelProperties::VerticalOrientationPadding(winrt::Thickness const& value)
00118 {
00119     [[gsl::suppress(con)]]
00120     {
00121     static_cast<InfoBarPanel*>(this)->SetValue(s_VerticalOrientationPaddingProperty, ValueHelper<winrt::Thickness>::BoxValueIfNecessary(value));
00122     }
00123 }
00124
00125 winrt::Thickness InfoBarPanelProperties::VerticalOrientationPadding()
00126 {
00127     return ValueHelper<winrt::Thickness>::CastOrUnbox(static_cast<InfoBarPanel*>(this)->GetValue(s_VerticalOrientationPaddingProperty));
00128 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsRepeater.properties.h Source File

  • File List
  • File Members
  • Generated

ItemsRepeater.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ItemsRepeaterProperties
00008 {
00009 public:
00010     ItemsRepeaterProperties();
00011
00012     void Background(winrt::Brush const& value);
00013     winrt::Brush Background();
00014
00015     void HorizontalCacheLength(double value);
00016     double HorizontalCacheLength();
00017
00018     void ItemsSource(winrt::IInspectable const& value);
00019     winrt::IInspectable ItemsSource();
00020
00021     void ItemTemplate(winrt::IInspectable const& value);
00022     winrt::IInspectable ItemTemplate();
00023
00024     void ItemTransitionProvider(winrt::ItemCollectionTransitionProvider const& value);
00025     winrt::ItemCollectionTransitionProvider ItemTransitionProvider();
00026
00027     void Layout(winrt::Layout const& value);
00028     winrt::Layout Layout();
00029
00030     void VerticalCacheLength(double value);
00031     double VerticalCacheLength();
00032
00033     static winrt::DependencyProperty BackgroundProperty() { return s_BackgroundProperty; }
00034     static winrt::DependencyProperty HorizontalCacheLengthProperty() { return s_HorizontalCacheLengthProperty; }
00035     static winrt::DependencyProperty ItemsSourceProperty() { return s_ItemsSourceProperty; }
00036     static winrt::DependencyProperty ItemTemplateProperty() { return s_ItemTemplateProperty; }
00037     static winrt::DependencyProperty ItemTransitionProviderProperty() { return s_ItemTransitionProviderProperty; }
00038     static winrt::DependencyProperty LayoutProperty() { return s_LayoutProperty; }
00039     static winrt::DependencyProperty VerticalCacheLengthProperty() { return s_VerticalCacheLengthProperty; }
00040
00041     static GlobalDependencyProperty s_BackgroundProperty;
00042     static GlobalDependencyProperty s_HorizontalCacheLengthProperty;
00043     static GlobalDependencyProperty s_ItemsSourceProperty;
00044     static GlobalDependencyProperty s_ItemTemplateProperty;
00045     static GlobalDependencyProperty s_ItemTransitionProviderProperty;
00046     static GlobalDependencyProperty s_LayoutProperty;
00047     static GlobalDependencyProperty s_VerticalCacheLengthProperty;
00048
00049     winrt::event_token ElementClearing(winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs> const& value);
00050     void ElementClearing(winrt::event_token const& token);
00051     winrt::event_token ElementIndexChanged(winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs> const& value);
00052     void ElementIndexChanged(winrt::event_token const& token);
00053     winrt::event_token ElementPrepared(winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs> const& value);
00054     void ElementPrepared(winrt::event_token const& token);
00055
00056     event_source<winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementClearingEventArgs>> m_elementClearingEventSource;
00057     event_source<winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementIndexChangedEventArgs>> m_elementIndexChangedEventSource;
00058     event_source<winrt::TypedEventHandler<winrt::ItemsRepeater, winrt::ItemsRepeaterElementPreparedEventArgs>> m_elementPreparedEventSource;
00059
00060     static void EnsureProperties();
00061     static void ClearProperties();
00062
00063     static void OnHorizontalCacheLengthPropertyChanged(
00064         winrt::DependencyObject const& sender,
00065         winrt::DependencyPropertyChangedEventArgs const& args);
00066
00067     static void OnItemsSourcePropertyChanged(
00068         winrt::DependencyObject const& sender,
00069         winrt::DependencyPropertyChangedEventArgs const& args);
00070
00071     static void OnItemTemplatePropertyChanged(
00072         winrt::DependencyObject const& sender,
00073         winrt::DependencyPropertyChangedEventArgs const& args);
00074
00075     static void OnItemTransitionProviderPropertyChanged(
00076         winrt::DependencyObject const& sender,
00077         winrt::DependencyPropertyChangedEventArgs const& args);
00078
00079     static void OnLayoutPropertyChanged(
00080         winrt::DependencyObject const& sender,
00081         winrt::DependencyPropertyChangedEventArgs const& args);
00082
00083     static void OnVerticalCacheLengthPropertyChanged(
00084         winrt::DependencyObject const& sender,
00085         winrt::DependencyPropertyChangedEventArgs const& args);
00086 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsAutomationPeer.h Source File

  • File List
  • File Members
  • RadioButtons

RadioButtonsAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RadioButtons.h"
00007 #include "RadioButtonsAutomationPeer.g.h"
00008
00009 class RadioButtonsAutomationPeer :
00010     public ReferenceTracker<RadioButtonsAutomationPeer, winrt::implementation::RadioButtonsAutomationPeerT>
00011 {
00012
00013 public:
00014     RadioButtonsAutomationPeer(winrt::RadioButtons const& owner);
00015
00016     // IAutomationPeerOverrides
00017     hstring GetClassNameCore();
00018     hstring GetNameCore();
00019     winrt::AutomationControlType GetAutomationControlTypeCore();
00020 };
00021
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapElementsLayer.properties.h Source File

  • File List
  • File Members
  • Generated

MapElementsLayer.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class MapElementsLayerProperties
00008 {
00009 public:
00010     MapElementsLayerProperties();
00011
00012     void MapElements(winrt::IVector<winrt::MapElement> const& value);
00013     winrt::IVector<winrt::MapElement> MapElements();
00014
00015     static winrt::DependencyProperty MapElementsProperty() { return s_MapElementsProperty; }
00016
00017     static GlobalDependencyProperty s_MapElementsProperty;
00018
00019     winrt::event_token MapElementClick(winrt::TypedEventHandler<winrt::MapElementsLayer, winrt::MapElementClickEventArgs> const& value);
00020     void MapElementClick(winrt::event_token const& token);
00021
00022     event_source<winrt::TypedEventHandler<winrt::MapElementsLayer, winrt::MapElementClickEventArgs>> m_mapElementClickEventSource;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026
00027     static void OnMapElementsPropertyChanged(
00028         winrt::DependencyObject const& sender,
00029         winrt::DependencyPropertyChangedEventArgs const& args);
00030 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBarTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

ProgressBarTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ProgressBarTemplateSettingsProperties
00008 {
00009 public:
00010     ProgressBarTemplateSettingsProperties();
00011
00012     void ClipRect(winrt::RectangleGeometry const& value);
00013     winrt::RectangleGeometry ClipRect();
00014
00015     void Container2AnimationEndPosition(double value);
00016     double Container2AnimationEndPosition();
00017
00018     void Container2AnimationStartPosition(double value);
00019     double Container2AnimationStartPosition();
00020
00021     void ContainerAnimationEndPosition(double value);
00022     double ContainerAnimationEndPosition();
00023
00024     void ContainerAnimationMidPosition(double value);
00025     double ContainerAnimationMidPosition();
00026
00027     void ContainerAnimationStartPosition(double value);
00028     double ContainerAnimationStartPosition();
00029
00030     void EllipseAnimationEndPosition(double value);
00031     double EllipseAnimationEndPosition();
00032
00033     void EllipseAnimationWellPosition(double value);
00034     double EllipseAnimationWellPosition();
00035
00036     void EllipseDiameter(double value);
00037     double EllipseDiameter();
00038
00039     void EllipseOffset(double value);
00040     double EllipseOffset();
00041
00042     void IndicatorLengthDelta(double value);
00043     double IndicatorLengthDelta();
00044
00045     static winrt::DependencyProperty ClipRectProperty() { return s_ClipRectProperty; }
00046     static winrt::DependencyProperty Container2AnimationEndPositionProperty() { return s_Container2AnimationEndPositionProperty; }
00047     static winrt::DependencyProperty Container2AnimationStartPositionProperty() { return s_Container2AnimationStartPositionProperty; }
00048     static winrt::DependencyProperty ContainerAnimationEndPositionProperty() { return s_ContainerAnimationEndPositionProperty; }
00049     static winrt::DependencyProperty ContainerAnimationMidPositionProperty() { return s_ContainerAnimationMidPositionProperty; }
00050     static winrt::DependencyProperty ContainerAnimationStartPositionProperty() { return s_ContainerAnimationStartPositionProperty; }
00051     static winrt::DependencyProperty EllipseAnimationEndPositionProperty() { return s_EllipseAnimationEndPositionProperty; }
00052     static winrt::DependencyProperty EllipseAnimationWellPositionProperty() { return s_EllipseAnimationWellPositionProperty; }
00053     static winrt::DependencyProperty EllipseDiameterProperty() { return s_EllipseDiameterProperty; }
00054     static winrt::DependencyProperty EllipseOffsetProperty() { return s_EllipseOffsetProperty; }
00055     static winrt::DependencyProperty IndicatorLengthDeltaProperty() { return s_IndicatorLengthDeltaProperty; }
00056
00057     static GlobalDependencyProperty s_ClipRectProperty;
00058     static GlobalDependencyProperty s_Container2AnimationEndPositionProperty;
00059     static GlobalDependencyProperty s_Container2AnimationStartPositionProperty;
00060     static GlobalDependencyProperty s_ContainerAnimationEndPositionProperty;
00061     static GlobalDependencyProperty s_ContainerAnimationMidPositionProperty;
00062     static GlobalDependencyProperty s_ContainerAnimationStartPositionProperty;
00063     static GlobalDependencyProperty s_EllipseAnimationEndPositionProperty;
00064     static GlobalDependencyProperty s_EllipseAnimationWellPositionProperty;
00065     static GlobalDependencyProperty s_EllipseDiameterProperty;
00066     static GlobalDependencyProperty s_EllipseOffsetProperty;
00067     static GlobalDependencyProperty s_IndicatorLengthDeltaProperty;
00068
00069     static void EnsureProperties();
00070     static void ClearProperties();
00071 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemInfo.properties.cpp Source File

  • File List
  • File Members
  • Generated

RatingItemInfo.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RatingItemInfo.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RatingItemInfo)
00012 }
00013
00014 #include "RatingItemInfo.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemAutomationPeer.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewItemAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeView.h"
00007 #include "TreeViewItem.h"
00008 #include "TreeViewItemAutomationPeer.h"
00009 #include "SharedHelpers.h"
00010
00011 #include "TreeViewItemAutomationPeer.properties.cpp"
00012
00013 TreeViewItemAutomationPeer::TreeViewItemAutomationPeer(winrt::TreeViewItem const& owner) :
00014     ReferenceTracker(owner)
00015 {
00016 }
00017
00018 // IExpandCollapseProvider
00019 winrt::ExpandCollapseState TreeViewItemAutomationPeer::ExpandCollapseState()
00020 {
00021     auto targetNode = GetTreeViewNode();
00022     if (targetNode && targetNode.HasChildren())
00023     {
00024         if (targetNode.IsExpanded())
00025         {
00026             return winrt::ExpandCollapseState::Expanded;
00027         }
00028         return winrt::ExpandCollapseState::Collapsed;
00029     }
00030     return winrt::ExpandCollapseState::LeafNode;
00031 }
00032
00033 void TreeViewItemAutomationPeer::Collapse()
00034 {
00035     if (auto ancestorTreeView = GetParentTreeView())
00036     {
00037         if (auto targetNode = GetTreeViewNode())
00038         {
00039             ancestorTreeView.Collapse(targetNode);
00040             RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Collapsed);
00041         }
00042     }
00043 }
00044
00045 void TreeViewItemAutomationPeer::Expand()
00046 {
00047     if (auto ancestorTreeView = GetParentTreeView())
00048     {
00049         if (auto targetNode = GetTreeViewNode())
00050         {
00051             ancestorTreeView.Expand(targetNode);
00052             RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState::Expanded);
00053         }
00054     }
00055 }
00056
00057 // IAutomationPeerOverrides
00058 winrt::IInspectable TreeViewItemAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00059 {
00060     if (patternInterface == winrt::PatternInterface::ExpandCollapse)
00061     {
00062         return *this;
00063     }
00064
00065     if (auto treeView = GetParentTreeView())
00066     {
00067         if (patternInterface == winrt::PatternInterface::SelectionItem && treeView.SelectionMode() != winrt::TreeViewSelectionMode::None)
00068         {
00069             return *this;
00070         }
00071     }
00072
00073     return __super::GetPatternCore(patternInterface);
00074 }
00075
00076
00077 winrt::AutomationControlType TreeViewItemAutomationPeer::GetAutomationControlTypeCore()
00078 {
00079     return winrt::AutomationControlType::TreeItem;
00080 }
00081
00082 winrt::hstring TreeViewItemAutomationPeer::GetNameCore()
00083 {
00084     //Check to see if the item has a defined Automation Name
00085     winrt::hstring nameHString = __super::GetNameCore();
00086
00087     if (nameHString.empty())
00088     {
00089         auto treeViewNode = GetTreeViewNode();
00090         if (treeViewNode)
00091         {
00092             nameHString = SharedHelpers::TryGetStringRepresentationFromObject(treeViewNode.Content());
00093         }
00094
00095         if (nameHString.empty())
00096         {
00097             nameHString = L"TreeViewNode";
00098         }
00099     }
00100
00101     return nameHString;
00102 }
00103
00104 winrt::hstring TreeViewItemAutomationPeer::GetClassNameCore()
00105 {
00106     return winrt::hstring_name_of<winrt::TreeViewItem>();
00107 }
00108
00109 // IAutomationPeerOverrides3
00110 int32_t TreeViewItemAutomationPeer::GetPositionInSetCore()
00111 {
00112     winrt::ListView ancestorListView = GetParentListView();
00113     auto targetNode = GetTreeViewNode();
00114     int positionInSet = 0;
00115
00116     if (ancestorListView && targetNode)
00117     {
00118         if (const auto targetParentNode = targetNode.Parent())
00119         {
00120             UINT32 position = 0;
00121             if (targetParentNode.Children().IndexOf(targetNode, position))
00122             {
00123                 positionInSet = static_cast<int>(position) + 1;
00124             }
00125         }
00126     }
00127
00128     return positionInSet;
00129 }
00130
00131 int32_t TreeViewItemAutomationPeer::GetSizeOfSetCore()
00132 {
00133     winrt::ListView ancestorListView = GetParentListView();
00134     auto targetNode = GetTreeViewNode();
00135     int setSize = 0;
00136
00137     if (ancestorListView && targetNode)
00138     {
00139         if (const auto targetParentNode = targetNode.Parent())
00140         {
00141             UINT32 size = targetParentNode.Children().Size();
00142             setSize = static_cast<int>(size);
00143         }
00144     }
00145
00146     return setSize;
00147 }
00148
00149 int32_t TreeViewItemAutomationPeer::GetLevelCore()
00150 {
00151     winrt::ListView ancestorListView = GetParentListView();
00152     auto targetNode = GetTreeViewNode();
00153     int level = -1;
00154
00155     if (ancestorListView && targetNode)
00156     {
00157         level = targetNode.Depth();
00158         level++;
00159     }
00160
00161     return level;
00162 }
00163
00164 void TreeViewItemAutomationPeer::RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState newState)
00165 {
00166     if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
00167     {
00168         winrt::ExpandCollapseState oldState;
00169         auto expandCollapseStateProperty = winrt::ExpandCollapsePatternIdentifiers::ExpandCollapseStateProperty();
00170
00171         if (newState == winrt::ExpandCollapseState::Expanded)
00172         {
00173             oldState = winrt::ExpandCollapseState::Collapsed;
00174         }
00175         else
00176         {
00177             oldState = winrt::ExpandCollapseState::Expanded;
00178         }
00179
00180         // box_value(oldState) doesn't work here, use ReferenceWithABIRuntimeClassName to make Narrator can unbox it.
00181         RaisePropertyChangedEvent(expandCollapseStateProperty, box_value(oldState), box_value(newState));
00182     }
00183 }
00184
00185 // ISelectionItemProvider
00186 bool TreeViewItemAutomationPeer::IsSelected()
00187 {
00188     auto treeViewItem = winrt::get_self<TreeViewItem>(Owner().as<winrt::TreeViewItem>());
00189     return treeViewItem->IsSelectedInternal();
00190 }
00191
00192 winrt::IRawElementProviderSimple TreeViewItemAutomationPeer::SelectionContainer()
00193 {
00194     winrt::IRawElementProviderSimple provider{ nullptr };
00195     if (auto listView = GetParentListView())
00196     {
00197         if (auto peer = winrt::FrameworkElementAutomationPeer::CreatePeerForElement(listView))
00198         {
00199             provider = ProviderFromPeer(peer);
00200         }
00201     }
00202
00203     return provider;
00204 }
00205
00206 void TreeViewItemAutomationPeer::AddToSelection()
00207 {
00208     UpdateSelection(true);
00209 }
00210
00211 void TreeViewItemAutomationPeer::RemoveFromSelection()
00212 {
00213     UpdateSelection(false);
00214 }
00215
00216 void TreeViewItemAutomationPeer::Select()
00217 {
00218     UpdateSelection(true);
00219 }
00220
00221 winrt::ListView TreeViewItemAutomationPeer::GetParentListView()
00222 {
00223     auto treeViewItemAncestor = Owner().as<winrt::DependencyObject>();
00224     winrt::ListView ancestorListView{ nullptr };
00225
00226     while (treeViewItemAncestor && !ancestorListView)
00227     {
00228         treeViewItemAncestor = winrt::VisualTreeHelper::GetParent(treeViewItemAncestor);
00229         if (treeViewItemAncestor != nullptr)
00230         {
00231             ancestorListView = treeViewItemAncestor.try_as<winrt::ListView>();
00232         }
00233     }
00234
00235     return ancestorListView;
00236 }
00237
00238 winrt::TreeView TreeViewItemAutomationPeer::GetParentTreeView()
00239 {
00240     auto treeViewItemAncestor = static_cast<winrt::DependencyObject>(Owner());
00241     winrt::TreeView ancestorTreeView{ nullptr };
00242
00243     while (treeViewItemAncestor && !ancestorTreeView)
00244     {
00245         treeViewItemAncestor = winrt::VisualTreeHelper::GetParent(treeViewItemAncestor);
00246         if (treeViewItemAncestor)
00247         {
00248             ancestorTreeView = treeViewItemAncestor.try_as<winrt::TreeView>();
00249         }
00250     }
00251
00252     return ancestorTreeView;
00253 }
00254
00255 winrt::TreeViewNode TreeViewItemAutomationPeer::GetTreeViewNode()
00256 {
00257     winrt::TreeViewNode targetNode{ nullptr };
00258     if (auto treeview = GetParentTreeView())
00259     {
00260         targetNode = treeview.NodeFromContainer(Owner());
00261     }
00262     return targetNode;
00263 }
00264
00265 void TreeViewItemAutomationPeer::UpdateSelection(bool select)
00266 {
00267     if (auto treeItem = Owner().try_as<winrt::TreeViewItem>())
00268     {
00269         auto impl = winrt::get_self<TreeViewItem>(treeItem);
00270         impl->UpdateSelection(select);
00271     }
00272 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/CircleLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages

CircleLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utils;
00005 using MUXControlsTestApp.Utilities;
00006 using System;
00007 using System.Collections.ObjectModel;
00008 using System.Collections.Specialized;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using System.Collections.Generic;
00012 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00013
00014 namespace MUXControlsTestApp.Samples
00015 {
00016     public sealed partial class CircleLayoutSamplePage : Page
00017     {
00018         private ObservableCollection<Person> _data;
00019         private int _lastId;
00020         private Random _rnd = new Random(123);
00021
00022         public CircleLayoutSamplePage()
00023         {
00024             InitializeComponent();
00025
00026             _data = new ObservableCollection<Person>();
00027             repeater.ItemsSource = new PersonDataSource(_data);
00028             repeater.ItemTemplate = new PersonElementFactory((DataTemplate)Resources["PersonTemplate"]); ;
00029             newItem.Content = NewPerson();
00030             newItem.Tapped += OnNewItemTapped;
00031
00032             shuffle.Click += delegate
00033             {
00034                 for (int i = 0; i < _data.Count; i++)
00035                 {
00036                     int from = _rnd.Next(0, _data.Count);
00037                     var value = _data[from];
00038                     _data.RemoveAt(from);
00039                     int to = _rnd.Next(0, _data.Count);
00040                     _data.Insert(to, value);
00041                 }
00042             };
00043
00044             bringIntoView.Click += delegate
00045             {
00046                 if (_data.Count > 0)
00047                 {
00048                     var anchor = repeater.GetOrCreateElement(0);
00049                     anchor.StartBringIntoView(new BringIntoViewOptions()
00050                     {
00051                         HorizontalAlignmentRatio = 0.5,
00052                         VerticalAlignmentRatio = 0.5,
00053                         HorizontalOffset = 0.0,
00054                         VerticalOffset = 0.0,
00055                         AnimationDesired = true
00056                     });
00057                 }
00058             };
00059
00060             expandButton.Click += delegate
00061             {
00062                 expandButton.Height = 500 - expandButton.ActualHeight;
00063             };
00064
00065             customAnimations.Checked += delegate { repeater.ItemTransitionProvider = new RadialItemCollectionTransitionProvider(); };
00066             customAnimations.Unchecked += delegate { repeater.ItemTransitionProvider = new DefaultItemCollectionTransitionProvider(); };
00067
00068             maximumHorizontalCacheLength.TextChanged += delegate
00069             {
00070                 double maximumHorizontalCacheLengthValue;
00071                 if (double.TryParse(maximumHorizontalCacheLength.Text, out maximumHorizontalCacheLengthValue))
00072                 {
00073                     repeater.HorizontalCacheLength = maximumHorizontalCacheLengthValue;
00074                 }
00075             };
00076
00077             maximumVerticalCacheLength.TextChanged += delegate
00078             {
00079                 double maximumVerticalCacheLengthValue;
00080                 if (double.TryParse(maximumVerticalCacheLength.Text, out maximumVerticalCacheLengthValue))
00081                 {
00082                     repeater.VerticalCacheLength = maximumVerticalCacheLengthValue;
00083                 }
00084             };
00085         }
00086
00087         private void OnNewItemTapped(object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e)
00088         {
00089             _data.Insert(0, (Person)newItem.Content);
00090             newItem.Content = NewPerson();
00091         }
00092
00093         private void OnExistingItemTapped(object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e)
00094         {
00095             _data.Remove((Person)((FrameworkElement)sender).DataContext);
00096         }
00097
00098         private Person NewPerson()
00099         {
00100             ++_lastId;
00101             return new Person(_lastId.ToString());
00102         }
00103     }
00104
00105     public class Person
00106     {
00107         private string _id;
00108         public string Id
00109         {
00110             get
00111             {
00112                 return _id;
00113             }
00114         }
00115
00116         public Person(string id)
00117         {
00118             _id = id;
00119         }
00120     }
00121
00122     public class PersonDataSource : CustomItemsSourceViewWithUniqueIdMapping
00123     {
00124         private ObservableCollection<Person> _data;
00125
00126         public PersonDataSource(ObservableCollection<Person> data)
00127         {
00128             _data = data;
00129             _data.CollectionChanged += OnCollectionChanged;
00130         }
00131
00132         protected override object GetAtCore(int index)
00133         { return _data[index]; }
00134         protected override string KeyFromIndexCore(int index)
00135         { return _data[index].Id; }
00136         protected override int GetSizeCore()
00137         { return _data.Count; }
00138
00139         private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
00140         {
00141             OnItemsSourceChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
00142         }
00143     }
00144
00145     public class PersonElementFactory : ElementFactory
00146     {
00147         private DataTemplate _personTemplate;
00148
00149         public PersonElementFactory(DataTemplate personTemplate)
00150         {
00151             _personTemplate = personTemplate;
00152         }
00153
00154         protected override UIElement GetElementCore(ElementFactoryGetArgs args)
00155         {
00156             var element = (FrameworkElement)_personTemplate.LoadContent();
00157             element.DataContext = args.Data;
00158             return element;
00159         }
00160
00161         protected override void RecycleElementCore(ElementFactoryRecycleArgs args)
00162         {
00163
00164         }
00165     }
00166 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TestUI/TitleBarPageWindow.xaml.cs Source File

  • File List
  • File Members
  • TitleBar
  • TestUI

TitleBarPageWindow.xaml.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml;
00002 using Microsoft.UI.Xaml.Controls;
00003 using Microsoft.UI.Xaml.Markup;
00004 using System;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     public sealed partial class TitleBarPageWindow : Window
00009     {
00010         private int backRequestedCount = 0;
00011         private int paneToggleRequestedCount = 0;
00012         public TitleBarPageWindow()
00013         {
00014             this.InitializeComponent();
00015
00016             // C# code to set AppTitleBar uielement as titlebar
00017             this.ExtendsContentIntoTitleBar = true;
00018             this.SetTitleBar(this.WindowingTitleBar);
00019
00020         }
00021
00022         private void WindowingTitleBar_BackRequested(TitleBar sender, object args)
00023         {
00024             BackRequestedCountTextBox.Text = (backRequestedCount++).ToString();
00025         }
00026
00027         private void IsBackButtonVisibleCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00028         {
00029             if (WindowingTitleBar != null)
00030             {
00031                 WindowingTitleBar.IsBackButtonVisible = IsBackButtonVisibleCheckBox.IsChecked.Value;
00032             }
00033         }
00034
00035         private void IsBackEnabledCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00036         {
00037             if (WindowingTitleBar != null)
00038             {
00039                 WindowingTitleBar.IsBackEnabled = IsBackEnabledCheckBox.IsChecked.Value;
00040             }
00041         }
00042
00043         private void WindowingTitleBar_PaneToggleRequested(TitleBar sender, object args)
00044         {
00045             PaneToggleButtonRequestedCountTextBox.Text = (paneToggleRequestedCount++).ToString();
00046         }
00047
00048         private void IsPaneToggleButtonVisibleCheckbox_CheckedChanged(object sender, RoutedEventArgs e)
00049         {
00050             if (WindowingTitleBar != null)
00051             {
00052                 WindowingTitleBar.IsPaneToggleButtonVisible = IsPaneToggleButtonVisibleCheckbox.IsChecked.Value;
00053             }
00054         }
00055
00056         private void SetIconCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00057         {
00058             if (WindowingTitleBar != null)
00059             {
00060                 if (SetIconCheckBox.IsChecked.Value)
00061                 {
00062                     var icon = new Microsoft.UI.Xaml.Controls.SymbolIconSource();
00063                     icon.Symbol = Symbol.Mail;
00064                     WindowingTitleBar.IconSource = icon;
00065                 }
00066                 else
00067                 {
00068                     WindowingTitleBar.IconSource = null;
00069                 }
00070             }
00071         }
00072
00073         private void CustomContentCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00074         {
00075             if (WindowingTitleBar != null)
00076             {
00077                 if (CustomContentCheckBox.IsChecked.Value)
00078                 {
00079                     string xaml =
00080                     @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00081                          <Grid.ColumnDefinitions>
00082                             <ColumnDefinition Width='Auto'/>
00083                             <ColumnDefinition Width='*' />
00084                          </Grid.ColumnDefinitions >
00085
00086                          <Button Content='Left'/>
00087                          <Button Grid.Column='1' Content='Right' HorizontalAlignment='Right'/>
00088                     </Grid>";
00089
00090                     var element = XamlReader.Load(xaml);
00091                     WindowingTitleBar.Content = element;
00092                 }
00093                 else
00094                 {
00095                     WindowingTitleBar.Content = null;
00096                 }
00097             }
00098         }
00099
00100         private void HeaderContentCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00101         {
00102             if (WindowingTitleBar != null)
00103             {
00104                 if (HeaderContentCheckBox.IsChecked.Value)
00105                 {
00106                     var button = new Button();
00107                     button.Content = "Header";
00108                     WindowingTitleBar.Header = button;
00109                 }
00110                 else
00111                 {
00112                     WindowingTitleBar.Header = null;
00113                 }
00114             }
00115         }
00116
00117         private void FooterContentCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00118         {
00119             if (WindowingTitleBar != null)
00120             {
00121                 if (FooterContentCheckBox.IsChecked.Value)
00122                 {
00123                     var button = new Button();
00124                     button.Content = "Footer";
00125                     WindowingTitleBar.Footer = button;
00126                 }
00127                 else
00128                 {
00129                     WindowingTitleBar.Footer = null;
00130                 }
00131             }
00132         }
00133
00134         private void SetSubtitleButton_Click(object sender, RoutedEventArgs e)
00135         {
00136             if (WindowingTitleBar != null)
00137             {
00138                 WindowingTitleBar.Subtitle = SubtitleTextBox.Text;
00139             }
00140         }
00141
00142         private void TitleButton_Click(object sender, RoutedEventArgs e)
00143         {
00144             if (WindowingTitleBar != null)
00145             {
00146                 WindowingTitleBar.Title = TitleTextBox.Text;
00147             }
00148         }
00149
00150
00151     }
00152 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarPage Member List

This is the complete list of members for AnnotatedScrollBarPage, including all inherited members.
AnnotatedScrollBarPage() | AnnotatedScrollBarPage | [inline]
CmbAnnotatedScrollBarOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | AnnotatedScrollBarPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarProperties Member List

This is the complete list of members for AnnotatedScrollBarProperties, including all inherited members.
AnnotatedScrollBarProperties() | AnnotatedScrollBarProperties |
ClearProperties() | AnnotatedScrollBarProperties | [static]
DetailLabelRequested(winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarDetailLabelRequestedEventArgs > const &value) | AnnotatedScrollBarProperties |
DetailLabelRequested(winrt::event_token const &token) | AnnotatedScrollBarProperties |
DetailLabelTemplate(winrt::IElementFactory const &value) | AnnotatedScrollBarProperties |
DetailLabelTemplate() | AnnotatedScrollBarProperties |
DetailLabelTemplateProperty() | AnnotatedScrollBarProperties | [inline, static]
EnsureProperties() | AnnotatedScrollBarProperties | [static]
Labels(winrt::IVector< winrt::AnnotatedScrollBarLabel > const &value) | AnnotatedScrollBarProperties |
Labels() | AnnotatedScrollBarProperties |
LabelsProperty() | AnnotatedScrollBarProperties | [inline, static]
LabelTemplate(winrt::IElementFactory const &value) | AnnotatedScrollBarProperties |
LabelTemplate() | AnnotatedScrollBarProperties |
LabelTemplateProperty() | AnnotatedScrollBarProperties | [inline, static]
m_detailLabelRequestedEventSource | AnnotatedScrollBarProperties |
m_scrollingEventSource | AnnotatedScrollBarProperties |
OnDetailLabelTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
OnLabelsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
OnLabelTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
OnSmallChangePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AnnotatedScrollBarProperties | [static]
s_DetailLabelTemplateProperty | AnnotatedScrollBarProperties | [static]
s_LabelsProperty | AnnotatedScrollBarProperties | [static]
s_LabelTemplateProperty | AnnotatedScrollBarProperties | [static]
s_SmallChangeProperty | AnnotatedScrollBarProperties | [static]
Scrolling(winrt::TypedEventHandler< winrt::AnnotatedScrollBar, winrt::AnnotatedScrollBarScrollingEventArgs > const &value) | AnnotatedScrollBarProperties |
Scrolling(winrt::event_token const &token) | AnnotatedScrollBarProperties |
SmallChange(double value) | AnnotatedScrollBarProperties |
SmallChange() | AnnotatedScrollBarProperties |
SmallChangeProperty() | AnnotatedScrollBarProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ObjectModelTestPage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples

ObjectModelTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using Microsoft.UI.Xaml.Navigation;
00009 using MUXControlsTestApp.Utilities;
00010 using System;
00011 using System.Collections.Generic;
00012 using System.Collections.ObjectModel;
00013 using System.Linq;
00014 using Windows.UI;
00015
00016 using MUXControlsTestHooks = Microsoft.UI.Private.Controls.MUXControlsTestHooks;
00017 using MUXControlsTestHooksLoggingMessageEventArgs = Microsoft.UI.Private.Controls.MUXControlsTestHooksLoggingMessageEventArgs;
00018
00019 namespace MUXControlsTestApp.Samples
00020 {
00021     public sealed partial class ObjectModelTestPage : TestPage
00022     {
00023         private List<int> _collapsedElements = null;
00024         private ObservableCollection<string> _colStrings = null;
00025
00026         public ObjectModelTestPage()
00027         {
00028             this.InitializeComponent();
00029
00030             if (chkLogScrollViewMessages.IsChecked == true || chkLogItemsRepeaterMessages.IsChecked == true)
00031             {
00032                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00033
00034                 if (chkLogItemsRepeaterMessages.IsChecked == true)
00035                 {
00036                     MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00037                 }
00038                 if (chkLogScrollViewMessages.IsChecked == true)
00039                 {
00040                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00041                 }
00042             }
00043
00044             if (itemsRepeater != null)
00045             {
00046                 itemsRepeater.ElementPrepared += ItemsRepeater_ElementPrepared;
00047                 itemsRepeater.ElementClearing += ItemsRepeater_ElementClearing;
00048             }
00049         }
00050
00051         ~ObjectModelTestPage()
00052         {
00053         }
00054
00055         protected override void OnNavigatedFrom(NavigationEventArgs e)
00056         {
00057             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00058             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00059
00060             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00061
00062             if (itemsRepeater != null)
00063             {
00064                 itemsRepeater.ElementPrepared -= ItemsRepeater_ElementPrepared;
00065                 itemsRepeater.ElementClearing -= ItemsRepeater_ElementClearing;
00066             }
00067
00068             base.OnNavigatedFrom(e);
00069         }
00070
00071         private void CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
00072         {
00073             try
00074             {
00075                 if (itemsRepeater != null)
00076                 {
00077                     if (cmbItemTemplate.SelectedIndex == 0)
00078                     {
00079                         itemsRepeater.ItemTemplate = null;
00080                     }
00081                     else
00082                     {
00083                         itemsRepeater.ItemTemplate = Resources["template" + cmbItemTemplate.SelectedIndex.ToString()] as DataTemplate;
00084                     }
00085                 }
00086             }
00087             catch (Exception ex)
00088             {
00089                 txtExceptionReport.Text = ex.ToString();
00090                 AppendEventMessage(ex.ToString());
00091             }
00092         }
00093
00094         private void CmbItemsSource_SelectionChanged(object sender, SelectionChangedEventArgs e)
00095         {
00096             try
00097             {
00098                 if (itemsRepeater != null)
00099                 {
00100                     switch (cmbItemsSource.SelectedIndex)
00101                     {
00102                         case 0:
00103                             if (itemsRepeater.ItemsSource != null)
00104                             {
00105                                 itemsRepeater.ItemsSource = null;
00106                                 _collapsedElements = null;
00107                                 btnChangeEvenItemsVisibility.Content = "Collapse even realized items";
00108                                 btnChangeOddItemsVisibility.Content = "Collapse odd realized items";
00109                             }
00110                             break;
00111                         case 1:
00112                             if (_colStrings == null)
00113                             {
00114                                 _colStrings = new ObservableCollection<string>();
00115
00116                                 for (int itemIndex = 0; itemIndex < 200; itemIndex++)
00117                                 {
00118                                     _colStrings.Add("Item" + itemIndex);
00119                                 }
00120                             }
00121                             itemsRepeater.ItemsSource = _colStrings;
00122                             break;
00123                     }
00124                 }
00125             }
00126             catch (Exception ex)
00127             {
00128                 txtExceptionReport.Text = ex.ToString();
00129                 AppendEventMessage(ex.ToString());
00130             }
00131         }
00132
00133         private void CmbLayout_SelectionChanged(object sender, SelectionChangedEventArgs e)
00134         {
00135             try
00136             {
00137                 if (itemsRepeater != null)
00138                 {
00139                     switch (cmbLayout.SelectedIndex)
00140                     {
00141                         case 0:
00142                             itemsRepeater.Layout = null;
00143                             break;
00144                         case 1:
00145                             itemsRepeater.Layout = new StackLayout();
00146                             break;
00147                         case 2:
00148                             itemsRepeater.Layout = new UniformGridLayout();
00149                             break;
00150                     }
00151                 }
00152             }
00153             catch (Exception ex)
00154             {
00155                 txtExceptionReport.Text = ex.ToString();
00156                 AppendEventMessage(ex.ToString());
00157             }
00158         }
00159
00160         private void BtnChangeEvenItemsVisibility_Click(object sender, RoutedEventArgs e)
00161         {
00162             try
00163             {
00164                 if (itemsRepeater != null && _colStrings != null)
00165                 {
00166                     Visibility newVisibility = Visibility.Collapsed;
00167
00168                     if (btnChangeEvenItemsVisibility.Content as string == "Collapse even realized items")
00169                     {
00170                         btnChangeEvenItemsVisibility.Content = "Show even realized items";
00171                     }
00172                     else
00173                     {
00174                         btnChangeEvenItemsVisibility.Content = "Collapse even realized items";
00175                         newVisibility = Visibility.Visible;
00176                     }
00177
00178                     if (_collapsedElements == null)
00179                     {
00180                         _collapsedElements = new List<int>();
00181                     }
00182
00183                     for (int i = 0; i < (_colStrings.Count + 1) / 2; i++)
00184                     {
00185                         UIElement element = itemsRepeater.TryGetElement(2 * i);
00186                         if (element != null)
00187                         {
00188                             element.Visibility = newVisibility;
00189
00190                             if (newVisibility == Visibility.Visible)
00191                             {
00192                                 if (_collapsedElements.Contains(2 * i))
00193                                 {
00194                                     _collapsedElements.Remove(2 * i);
00195                                 }
00196                             }
00197                             else
00198                             {
00199                                 if (!_collapsedElements.Contains(2 * i))
00200                                 {
00201                                     _collapsedElements.Add(2 * i);
00202                                 }
00203                             }
00204                         }
00205                     }
00206                 }
00207             }
00208             catch (Exception ex)
00209             {
00210                 txtExceptionReport.Text = ex.ToString();
00211                 AppendEventMessage(ex.ToString());
00212             }
00213         }
00214
00215         private void BtnChangeOddItemsVisibility_Click(object sender, RoutedEventArgs e)
00216         {
00217             try
00218             {
00219                 if (itemsRepeater != null && _colStrings != null)
00220                 {
00221                     Visibility newVisibility = Visibility.Collapsed;
00222
00223                     if (btnChangeOddItemsVisibility.Content as string == "Collapse odd realized items")
00224                     {
00225                         btnChangeOddItemsVisibility.Content = "Show odd realized items";
00226                     }
00227                     else
00228                     {
00229                         btnChangeOddItemsVisibility.Content = "Collapse odd realized items";
00230                         newVisibility = Visibility.Visible;
00231                     }
00232
00233                     if (_collapsedElements == null)
00234                     {
00235                         _collapsedElements = new List<int>();
00236                     }
00237
00238                     for (int i = 0; i < _colStrings.Count / 2; i++)
00239                     {
00240                         UIElement element = itemsRepeater.TryGetElement(2 * i + 1);
00241                         if (element != null)
00242                         {
00243                             element.Visibility = newVisibility;
00244
00245                             if (newVisibility == Visibility.Visible)
00246                             {
00247                                 if (_collapsedElements.Contains(2 * i + 1))
00248                                 {
00249                                     _collapsedElements.Remove(2 * i + 1);
00250                                 }
00251                             }
00252                             else
00253                             {
00254                                 if (!_collapsedElements.Contains(2 * i + 1))
00255                                 {
00256                                     _collapsedElements.Add(2 * i + 1);
00257                                 }
00258                             }
00259                         }
00260                     }
00261                 }
00262             }
00263             catch (Exception ex)
00264             {
00265                 txtExceptionReport.Text = ex.ToString();
00266                 AppendEventMessage(ex.ToString());
00267             }
00268         }
00269
00270         private void ChkItemsRepeaterProperties_IsCheckedChanged(object sender, RoutedEventArgs e)
00271         {
00272             if (grdItemsRepeaterProperties != null && chkItemsRepeaterProperties != null)
00273                 grdItemsRepeaterProperties.Visibility = chkItemsRepeaterProperties.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
00274         }
00275
00276         private void ChkLogs_IsCheckedChanged(object sender, RoutedEventArgs e)
00277         {
00278             if (grdLogs != null && chkLogs != null)
00279                 grdLogs.Visibility = chkLogs.IsChecked == true ? Visibility.Visible : Visibility.Collapsed;
00280         }
00281
00282         private void ScrollView_Loaded(object sender, RoutedEventArgs e)
00283         {
00284             AppendEventMessage($"ScrollView.Loaded");
00285             LogScrollViewInfo();
00286         }
00287
00288         private void ScrollView_SizeChanged(object sender, SizeChangedEventArgs e)
00289         {
00290             AppendEventMessage($"ScrollView.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
00291             LogScrollViewInfo();
00292         }
00293
00294         private void ScrollView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
00295         {
00296             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00297             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00298             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00299             string newFEName = (newFE == null) ? "null" : newFE.Name;
00300
00301             AppendEventMessage($"ScrollView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00302         }
00303
00304         private void ScrollView_LostFocus(object sender, RoutedEventArgs e)
00305         {
00306             AppendEventMessage("ScrollView.LostFocus");
00307         }
00308
00309         private void ScrollView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
00310         {
00311             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00312             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00313             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00314             string newFEName = (newFE == null) ? "null" : newFE.Name;
00315
00316             AppendEventMessage($"ScrollView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00317         }
00318
00319         private void ScrollView_GotFocus(object sender, RoutedEventArgs e)
00320         {
00321             AppendEventMessage("ScrollView.GotFocus");
00322         }
00323
00324         private void ScrollView_ExtentChanged(ScrollView sender, object args)
00325         {
00326             AppendEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}");
00327         }
00328
00329         private void ScrollView_StateChanged(ScrollView sender, object args)
00330         {
00331             AppendEventMessage($"ScrollView.StateChanged {sender.State.ToString()}");
00332         }
00333
00334         private void ScrollView_ViewChanged(ScrollView sender, object args)
00335         {
00336             AppendEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00337         }
00338
00339         private void ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
00340         {
00341             AppendEventMessage($"ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId={args.CorrelationId}");
00342         }
00343
00344         private void ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
00345         {
00346             AppendEventMessage($"ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}");
00347         }
00348
00349         private void ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args)
00350         {
00351             AppendEventMessage($"ScrollView.ScrollCompleted OffsetsChangeCorrelationId={args.CorrelationId}");
00352         }
00353
00354         private void ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args)
00355         {
00356             AppendEventMessage($"ScrollView.ZoomCompleted ZoomFactorChangeCorrelationId={args.CorrelationId}");
00357         }
00358
00359         private void ItemsRepeater_Loaded(object sender, RoutedEventArgs e)
00360         {
00361             AppendEventMessage($"ItemsRepeater.Loaded");
00362             if (chkLogScrollViewEvents.IsChecked == true)
00363             {
00364                 LogScrollViewInfo();
00365             }
00366         }
00367
00368         private void ItemsRepeater_SizeChanged(object sender, SizeChangedEventArgs e)
00369         {
00370             AppendEventMessage($"ItemsRepeater.SizeChanged Size={scrollView.ActualWidth}, {scrollView.ActualHeight}");
00371             if (chkLogScrollViewEvents.IsChecked == true)
00372             {
00373                 LogScrollViewInfo();
00374             }
00375         }
00376
00377         private void ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
00378         {
00379             try
00380             {
00381                 if (chkLogItemsRepeaterEvents.IsChecked == true)
00382                 {
00383                     AppendEventMessage($"ItemsRepeater.ElementPrepared Index={args.Index}, Element={args.Element}, Visibility={args.Element.Visibility}");
00384                 }
00385
00386                 if (_collapsedElements != null && _collapsedElements.Contains(args.Index))
00387                 {
00388                     if (args.Element.Visibility == Visibility.Visible)
00389                     {
00390                         args.Element.Visibility = Visibility.Collapsed;
00391                     }
00392                 }
00393                 else if (args.Element.Visibility == Visibility.Collapsed)
00394                 {
00395                     args.Element.Visibility = Visibility.Visible;
00396                 }
00397             }
00398             catch (Exception ex)
00399             {
00400                 txtExceptionReport.Text = ex.ToString();
00401                 AppendEventMessage(ex.ToString());
00402             }
00403         }
00404
00405         private void ItemsRepeater_ElementClearing(ItemsRepeater sender, ItemsRepeaterElementClearingEventArgs args)
00406         {
00407             try
00408             {
00409                 if (chkLogItemsRepeaterEvents.IsChecked == true)
00410                 {
00411                     AppendEventMessage($"ItemsRepeater.ElementClearing Element={args.Element}, Visibility={args.Element.Visibility}");
00412                 }
00413             }
00414             catch (Exception ex)
00415             {
00416                 txtExceptionReport.Text = ex.ToString();
00417                 AppendEventMessage(ex.ToString());
00418             }
00419         }
00420
00421         private void LogScrollViewInfo()
00422         {
00423             AppendEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
00424             AppendEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
00425             AppendEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
00426             AppendEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
00427         }
00428
00429         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
00430         {
00431             lstLogs.Items.Clear();
00432         }
00433
00434         private void ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs e)
00435         {
00436             if (itemsRepeater != null)
00437             {
00438                 itemsRepeater.Loaded += ItemsRepeater_Loaded;
00439                 itemsRepeater.SizeChanged += ItemsRepeater_SizeChanged;
00440             }
00441         }
00442
00443         private void ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs e)
00444         {
00445             if (itemsRepeater != null)
00446             {
00447                 itemsRepeater.Loaded -= ItemsRepeater_Loaded;
00448                 itemsRepeater.SizeChanged -= ItemsRepeater_SizeChanged;
00449             }
00450         }
00451
00452         private void ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e)
00453         {
00454             if (scrollView != null)
00455             {
00456                 scrollView.GettingFocus += ScrollView_GettingFocus;
00457                 scrollView.GotFocus += ScrollView_GotFocus;
00458                 scrollView.LosingFocus += ScrollView_LosingFocus;
00459                 scrollView.LostFocus += ScrollView_LostFocus;
00460                 scrollView.Loaded += ScrollView_Loaded;
00461                 scrollView.SizeChanged += ScrollView_SizeChanged;
00462                 scrollView.ExtentChanged += ScrollView_ExtentChanged;
00463                 scrollView.StateChanged += ScrollView_StateChanged;
00464                 scrollView.ViewChanged += ScrollView_ViewChanged;
00465                 scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
00466                 scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
00467                 scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
00468                 scrollView.ZoomCompleted += ScrollView_ZoomCompleted;
00469             }
00470         }
00471
00472         private void ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e)
00473         {
00474             if (scrollView != null)
00475             {
00476                 scrollView.GettingFocus -= ScrollView_GettingFocus;
00477                 scrollView.GotFocus -= ScrollView_GotFocus;
00478                 scrollView.LosingFocus -= ScrollView_LosingFocus;
00479                 scrollView.LostFocus -= ScrollView_LostFocus;
00480                 scrollView.Loaded -= ScrollView_Loaded;
00481                 scrollView.SizeChanged -= ScrollView_SizeChanged;
00482                 scrollView.ExtentChanged -= ScrollView_ExtentChanged;
00483                 scrollView.StateChanged -= ScrollView_StateChanged;
00484                 scrollView.ViewChanged -= ScrollView_ViewChanged;
00485                 scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
00486                 scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
00487                 scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
00488                 scrollView.ZoomCompleted -= ScrollView_ZoomCompleted;
00489             }
00490         }
00491
00492         private void ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e)
00493         {
00494             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00495             if (chkLogScrollViewMessages.IsChecked == false)
00496                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00497         }
00498
00499         private void ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e)
00500         {
00501             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00502             if (chkLogScrollViewMessages.IsChecked == false)
00503                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00504         }
00505
00506         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e)
00507         {
00508             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00509             if (chkLogItemsRepeaterMessages.IsChecked == false)
00510                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00511         }
00512
00513         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e)
00514         {
00515             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00516             if (chkLogItemsRepeaterMessages.IsChecked == false)
00517                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00518         }
00519
00520         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00521         {
00522             // Cut off the terminating new line.
00523             string msg = args.Message.Substring(0, args.Message.Length - 1);
00524             string eventMessage = string.Empty;
00525             string senderName = string.Empty;
00526
00527             try
00528             {
00529                 FrameworkElement fe = sender as FrameworkElement;
00530
00531                 if (fe != null)
00532                 {
00533                     senderName = "s:" + fe.Name + ", ";
00534                 }
00535             }
00536             catch
00537             {
00538             }
00539
00540             if (args.IsVerboseLevel)
00541             {
00542                 eventMessage = "Verbose: " + senderName + "m:" + msg;
00543             }
00544             else
00545             {
00546                 eventMessage = "Info: " + senderName + "m:" + msg;
00547             }
00548
00549             AppendEventMessage(eventMessage);
00550         }
00551
00552         private void AppendEventMessage(string eventMessage)
00553         {
00554             List<string> lstEventMessage = new List<string>();
00555
00556             while (eventMessage.Length > 0)
00557             {
00558                 string msgHead = eventMessage;
00559
00560                 if (eventMessage.Length > 110)
00561                 {
00562                     int commaIndex = eventMessage.IndexOf(',', 110);
00563                     if (commaIndex != -1)
00564                     {
00565                         msgHead = eventMessage.Substring(0, commaIndex);
00566                         eventMessage = eventMessage.Substring(commaIndex + 1);
00567                     }
00568                     else
00569                     {
00570                         eventMessage = string.Empty;
00571                     }
00572                 }
00573                 else
00574                 {
00575                     eventMessage = string.Empty;
00576                 }
00577
00578                 lstEventMessage.Add(msgHead);
00579             }
00580             AppendEventMessage(lstEventMessage);
00581         }
00582
00583         private void AppendEventMessage(List<string> lstEventMessage)
00584         {
00585             foreach (string eventMessage in lstEventMessage)
00586             {
00587                 lstLogs.Items.Add(eventMessage);
00588             }
00589             lstEventMessage.Clear();
00590         }
00591
00592         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
00593         {
00594             txtExceptionReport.Text = string.Empty;
00595         }
00596     }
00597 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/ErrorHandling.h Source File

  • File List
  • File Members
  • inc

ErrorHandling.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include <windows.h>
00007 #include <exception>
00008
00009 #ifndef E_INVALID_OPERATION
00010 #define E_INVALID_OPERATION HRESULT_FROM_WIN32(ERROR_INVALID_OPERATION)
00011 #endif
00012
00013 // MUX_CATCH_RETURN macro should be used in all ABI methods like this:
00014 // IFACEMETHODIMP CFoo::Bar(...) try
00015 // {
00016 //     ...
00017 //     MUX_CATCH_RETURN
00018 // }
00019 //
00020
00021 #define MUX_CATCH_RETURN \
00022         return S_OK; \
00023     } catch (...) { \
00024         auto hr = winrt::to_hresult(); \
00025         __analysis_assume(FAILED(hr)); \
00026         return hr;
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_APITests/SwipeControlTests.cs Source File

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_APITests

SwipeControlTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using System.Threading;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Markup;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Media;
00011 using Common;
00012
00013 using WEX.TestExecution;
00014 using WEX.TestExecution.Markup;
00015 using WEX.Logging.Interop;
00016
00017 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00018 {
00019     [TestClass]
00020     public class SwipeControlTests : ApiTestBase
00021     {
00022         [TestMethod]
00023         public void SwipeItemTest()
00024         {
00025             SwipeItem swipeItem = null;
00026             RunOnUIThread.Execute(() =>
00027             {
00028                 swipeItem = new SwipeItem();
00029                 swipeItem.Text = "Selfie";
00030                 swipeItem.IconSource = new FontIconSource() { Glyph = "&#xE114;" };
00031                 swipeItem.Background = new SolidColorBrush(Microsoft.UI.Colors.Red);
00032                 swipeItem.Foreground = new SolidColorBrush(Microsoft.UI.Colors.Blue);
00033             });
00034
00035             IdleSynchronizer.Wait();
00036
00037             RunOnUIThread.Execute(() =>
00038             {
00039                 Verify.AreEqual(swipeItem.Text, "Selfie");
00040                 Verify.IsTrue(swipeItem.IconSource is FontIconSource);
00041                 Verify.AreEqual((swipeItem.IconSource as FontIconSource).Glyph, "&#xE114;");
00042                 Verify.AreEqual(((SolidColorBrush)swipeItem.Background).Color, Microsoft.UI.Colors.Red);
00043                 Verify.AreEqual(((SolidColorBrush)swipeItem.Foreground).Color, Microsoft.UI.Colors.Blue);
00044             });
00045         }
00046
00047         [TestMethod]
00048         public void SwipeItemsTest()
00049         {
00050             SwipeItems swipeItems = null;
00051
00052             RunOnUIThread.Execute(() =>
00053             {
00054                 swipeItems = new SwipeItems();
00055
00056                 // verify the default value
00057                 Verify.AreEqual(swipeItems.Mode, SwipeMode.Reveal);
00058                 Verify.AreEqual(swipeItems.Count, 0);
00059
00060                 swipeItems.Add(new SwipeItem());
00061                 swipeItems.Add(new SwipeItem());
00062             });
00063
00064             IdleSynchronizer.Wait();
00065
00066             RunOnUIThread.Execute(() =>
00067             {
00068                 Verify.AreEqual(swipeItems.Count, 2);
00069             });
00070         }
00071
00072         [TestMethod]
00073         public void SwipeItemsExecuteThrowsExceptionWhenMoreThanOneItemAreAdded()
00074         {
00075             RunOnUIThread.Execute(() =>
00076             {
00077                 var swipeItems = new SwipeItems();
00078                 swipeItems.Mode = SwipeMode.Execute;
00079                 swipeItems.Add(new SwipeItem());
00080                 Verify.Throws<ArgumentException>(() => { swipeItems.Add(new SwipeItem()); });
00081             });
00082         }
00083
00084         [TestMethod]
00085         public void SwipeControlTest()
00086         {
00087             RunOnUIThread.Execute(() =>
00088             {
00089                 SwipeControl swipeControl = new SwipeControl();
00090                 Verify.AreEqual(swipeControl.ActualHeight, 0);
00091                 Verify.AreEqual(swipeControl.ActualWidth, 0);
00092                 Verify.IsNull(swipeControl.LeftItems);
00093                 Verify.IsNull(swipeControl.RightItems);
00094                 Verify.IsNull(swipeControl.TopItems);
00095                 Verify.IsNull(swipeControl.BottomItems);
00096                 swipeControl.LeftItems = new SwipeItems();
00097                 swipeControl.RightItems = new SwipeItems();
00098                 Content = swipeControl;
00099                 Content.UpdateLayout();
00100                 Verify.IsFalse(swipeControl.IsTabStop);
00101                 Verify.IsNotNull(swipeControl.LeftItems);
00102                 Verify.IsNotNull(swipeControl.RightItems);
00103             });
00104         }
00105
00106         [TestMethod]
00107         public void SwipeControlCanOnlyBeHorizontalOrVertical()
00108         {
00109             RunOnUIThread.Execute(() =>
00110             {
00111                 SwipeControl swipeControl = new SwipeControl();
00112                 swipeControl.LeftItems = new SwipeItems();
00113                 var topItems = new SwipeItems();
00114                 topItems.Add(new SwipeItem());
00115                 swipeControl.TopItems = topItems;
00116                 Verify.Throws<ArgumentException>(() => { swipeControl.LeftItems.Add(new SwipeItem()); });
00117             });
00118         }
00119
00120         [TestMethod]
00121         public void SwipeControlCanOnlyBeHorizontalOrVerticalAfterRendering()
00122         {
00123             var resetEvent = new AutoResetEvent(false);
00124             RunOnUIThread.Execute(() =>
00125             {
00126                 SwipeControl swipeControl = new SwipeControl();
00127                 swipeControl.Loaded += (object sender, RoutedEventArgs args) => { resetEvent.Set(); };
00128                 Content = swipeControl;
00129                 Content.UpdateLayout();
00130                 swipeControl.TopItems = new SwipeItems();
00131                 swipeControl.LeftItems = new SwipeItems();
00132                 swipeControl.LeftItems.Add(new SwipeItem());
00133                 Verify.Throws<ArgumentException>(() => { swipeControl.TopItems.Add(new SwipeItem()); });
00134             });
00135         }
00136
00137         [TestMethod]
00138         public void MarkupDefinedSwipeItemDoesNotCrash()
00139         {
00140             RunOnUIThread.Execute(() =>
00141             {
00142                 var rootGrid = (Microsoft.UI.Xaml.Controls.Grid)XamlReader.LoadWithInitialTemplateValidation(
00143                 "<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> " +
00144                     "<GridView> " +
00145                         "<GridViewItem> " +
00146                             "<SwipeControl> " +
00147                                 "<SwipeControl.RightItems> " +
00148                                     "<SwipeItems> " +
00149                                         "<SwipeItem " +
00150                                             "Background='#E81123' " +
00151                                             "Foreground='White' " +
00152                                             "Text='Remove'/> " +
00153                                     "</SwipeItems> " +
00154                                 "</SwipeControl.RightItems> " +
00155                                 "<Grid Width='200' Height='200' Background='green'/> " +
00156                             "</SwipeControl> " +
00157                         "</GridViewItem> " +
00158                     "</GridView> " +
00159                 "</Grid>");
00160
00161                 Content = rootGrid;
00162                 Content.UpdateLayout();
00163             });
00164         }
00165     }
00166 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTests::ScrollPresenterOperation Member List

This is the complete list of members for ScrollPresenterTests::ScrollPresenterOperation, including all inherited members.
CorrelationId | ScrollPresenterTests::ScrollPresenterOperation |
Result | ScrollPresenterTests::ScrollPresenterOperation |
ScrollPresenterOperation() | ScrollPresenterTests::ScrollPresenterOperation | [inline]
Generated on Sun Dec 1 2024 20:53:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ParallaxView.cpp Source File

  • File List
  • File Members
  • ParallaxView

ParallaxView.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ParallaxView.h"
00007 #include "RuntimeProfiler.h"
00008
00009 using namespace std;
00010
00011 ParallaxView::~ParallaxView()
00012 {
00013     UnhookChildPropertyChanged(true /* isInDestructor */);
00014 }
00015
00016 ParallaxView::ParallaxView()
00017 {
00018     __RP_Marker_ClassById(RuntimeProfiler::ProfId_ParallaxView);
00019
00020     std::shared_ptr<ScrollInputHelper> scrollInputHelper(
00021         std::make_shared<ScrollInputHelper>(
00022             this,
00023             [this](bool horizontalInfoChanged, bool verticalInfoChanged)
00024             {
00025                 OnScrollInputHelperInfoChanged(horizontalInfoChanged, verticalInfoChanged);
00026             }));
00027     m_scrollInputHelper = scrollInputHelper;
00028
00029     HookLoaded();
00030     HookSizeChanged();
00031 }
00032
00033
00034 void ParallaxView::RefreshAutomaticHorizontalOffsets()
00035 {
00036     // This method is meant to be invoked when the ParallaxView is parallaxing horizontally, is
00037     // placed within a scrollPresenter content and its horizontal offset within that content has changed.
00038     if (HorizontalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative && HorizontalShift() != 0.0)
00039     {
00040         UpdateStartOffsetExpression(winrt::Orientation::Horizontal);
00041         UpdateEndOffsetExpression(winrt::Orientation::Horizontal);
00042     }
00043 }
00044
00045 void ParallaxView::RefreshAutomaticVerticalOffsets()
00046 {
00047     // This method is meant to be invoked when the ParallaxView is parallaxing vertically, is
00048     // placed within a scrollPresenter content and its vertical offset within that content has changed.
00049     if (VerticalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative && VerticalShift() != 0.0)
00050     {
00051         UpdateStartOffsetExpression(winrt::Orientation::Vertical);
00052         UpdateEndOffsetExpression(winrt::Orientation::Vertical);
00053     }
00054 }
00055 #pragma endregion
00056
00057 #pragma region IFrameworkElementOverridesHelper
00058 winrt::Size ParallaxView::MeasureOverride(winrt::Size const& availableSize)
00059 {
00060     winrt::Size childDesiredSize{ 0.0f, 0.0f };
00061     winrt::UIElement child = Child();
00062
00063     if (child)
00064     {
00065         // Include the HorizontalShift/VerticalShift amounts in the available size so the desired child size
00066         // accounts for the parallaxing effect.
00067         const winrt::Size childAvailableSize {
00068             static_cast<float>(availableSize.Width + abs(HorizontalShift())),
00069             static_cast<float>(availableSize.Height + abs(VerticalShift())) };
00070         child.Measure(childAvailableSize);
00071         childDesiredSize = child.DesiredSize();
00072     }
00073
00074     return {
00075         std::isinf(availableSize.Width) ? childDesiredSize.Width : availableSize.Width,
00076         std::isinf(availableSize.Height) ? childDesiredSize.Height : availableSize.Height };
00077 }
00078
00079 winrt::Size ParallaxView::ArrangeOverride(winrt::Size const& finalSize)
00080 {
00081     winrt::UIElement child = Child();
00082
00083     if (child)
00084     {
00085         winrt::FrameworkElement childAsFE = child.try_as<winrt::FrameworkElement>();
00086         winrt::Rect finalRect = { 0.0f, 0.0f, child.DesiredSize().Width, child.DesiredSize().Height };
00087
00088         if (HorizontalShift() != 0.0 && finalRect.Width < finalSize.Width + abs(HorizontalShift()))
00089         {
00090             // The child is parallaxing horizontally. Ensure that its arrange width exceeds the ParallaxView's arrange width by at least HorizontalShift.
00091             // Expand its height by the same ratio if it's stretched vertically.
00092             const float stretchRatio = finalRect.Width > 0.0f ? (finalSize.Width + static_cast<float>(abs(HorizontalShift()))) / finalRect.Width : 0.0f;
00093             finalRect.Width = finalSize.Width + static_cast<float>(abs(HorizontalShift()));
00094             if (stretchRatio != 0.0f && childAsFE && isnan(childAsFE.Height()) && childAsFE.VerticalAlignment() == winrt::VerticalAlignment::Stretch)
00095             {
00096                 finalRect.Height *= stretchRatio;
00097             }
00098         }
00099         if (VerticalShift() != 0.0 && finalRect.Height < finalSize.Height + abs(VerticalShift()))
00100         {
00101             // The child is parallaxing vertically. Ensure that its arrange height exceeds the ParallaxView's arrange height by at least VerticalShift.
00102             // Expand its width by the same ratio if it's stretched horizontally.
00103             const float stretchRatio = finalRect.Height > 0.0f ? (finalSize.Height + static_cast<float>(abs(VerticalShift()))) / finalRect.Height : 0.0f;
00104             finalRect.Height = finalSize.Height + static_cast<float>(abs(VerticalShift()));
00105             if (stretchRatio != 0.0f && childAsFE && isnan(childAsFE.Width()) && childAsFE.HorizontalAlignment() == winrt::HorizontalAlignment::Stretch)
00106             {
00107                 finalRect.Width *= stretchRatio;
00108             }
00109         }
00110
00111         if (childAsFE)
00112         {
00113             // Ensure the child is properly aligned within the ParallaxView based on its
00114             // alignment properties. This alignment behavior is identical to the Border's behavior.
00115             float offset = 0.0f;
00116
00117             switch (childAsFE.HorizontalAlignment())
00118             {
00119             case winrt::HorizontalAlignment::Center:
00120                 offset = (finalSize.Width - finalRect.Width) / 2.0f;
00121                 break;
00122             case winrt::HorizontalAlignment::Right:
00123                 offset = finalSize.Width - finalRect.Width;
00124                 break;
00125             case winrt::HorizontalAlignment::Stretch:
00126                 if (finalRect.Width < finalSize.Width)
00127                 {
00128                     offset = (finalSize.Width - finalRect.Width) / 2.0f;
00129                 }
00130                 break;
00131             }
00132             finalRect.X = offset;
00133
00134             offset = 0.0f;
00135
00136             switch (childAsFE.VerticalAlignment())
00137             {
00138             case winrt::VerticalAlignment::Center:
00139                 offset = (finalSize.Height - finalRect.Height) / 2.0f;
00140                 break;
00141             case winrt::VerticalAlignment::Bottom:
00142                 offset = finalSize.Height - finalRect.Height;
00143                 break;
00144             case winrt::VerticalAlignment::Stretch:
00145                 if (finalRect.Height < finalSize.Height)
00146                 {
00147                     offset = (finalSize.Height - finalRect.Height) / 2.0f;
00148                 }
00149                 break;
00150             }
00151             finalRect.Y = offset;
00152         }
00153
00154         child.Arrange(finalRect);
00155
00156         // Set a rectangular clip on this ParallaxView the same size as the arrange
00157         // rectangle so the child does not render beyond it.
00158         auto rectangleGeometry = Clip().as<winrt::RectangleGeometry>();
00159
00160         if (!rectangleGeometry)
00161         {
00162             // Ensure that this ParallaxView has a rectangular clip.
00163             winrt::RectangleGeometry newRectangleGeometry;
00164             Clip(newRectangleGeometry);
00165
00166             rectangleGeometry = newRectangleGeometry;
00167         }
00168
00169         const winrt::Rect currentClipRect = rectangleGeometry.Rect();
00170
00171         if (currentClipRect.X != 0.0f || currentClipRect.Width != finalSize.Width ||
00172             currentClipRect.Y != 0.0f || currentClipRect.Height != finalSize.Height)
00173         {
00174             const winrt::Rect newClipRect{ 0.0f, 0.0f, finalSize.Width, finalSize.Height };
00175             rectangleGeometry.Rect(newClipRect);
00176         }
00177     }
00178
00179     return finalSize;
00180 }
00181 #pragma endregion
00182
00183 // Returns the target property path, according to the availability of the ElementCompositionPreview::SetIsTranslationEnabled method.
00184 wstring_view ParallaxView::GetVisualTargetedPropertyName(winrt::Orientation orientation)
00185 {
00186     return orientation == winrt::Orientation::Horizontal ? s_translationXPropertyName : s_translationYPropertyName;
00187 }
00188
00189
00190 // Invoked when a dependency property of this ParallaxView has changed.
00191 void ParallaxView::OnPropertyChanged(
00192     const winrt::DependencyPropertyChangedEventArgs& args)
00193 {
00194     winrt::IDependencyProperty dependencyProperty = args.Property();
00195
00196     if (dependencyProperty == s_ChildProperty)
00197     {
00198         winrt::IInspectable oldChild = args.OldValue();
00199         winrt::IInspectable newChild = args.NewValue();
00200         UpdateChild(oldChild.as<winrt::UIElement>(), newChild.as<winrt::UIElement>());
00201     }
00202     else if (dependencyProperty == s_IsHorizontalShiftClampedProperty ||
00203              dependencyProperty == s_HorizontalSourceOffsetKindProperty ||
00204              dependencyProperty == s_HorizontalSourceStartOffsetProperty ||
00205              dependencyProperty == s_HorizontalSourceEndOffsetProperty ||
00206              dependencyProperty == s_MaxHorizontalShiftRatioProperty)
00207     {
00208         UpdateExpressionAnimation(winrt::Orientation::Horizontal);
00209     }
00210     else if (dependencyProperty == s_HorizontalShiftProperty)
00211     {
00212         InvalidateMeasure();
00213         UpdateExpressionAnimation(winrt::Orientation::Horizontal);
00214     }
00215     else if (dependencyProperty == s_SourceProperty)
00216     {
00217         if (m_scrollInputHelper)
00218         {
00219             winrt::IInspectable newSource = args.NewValue();
00220             m_scrollInputHelper->SetSourceElement(newSource.as<winrt::UIElement>());
00221         }
00222     }
00223     else if (dependencyProperty == s_IsVerticalShiftClampedProperty ||
00224              dependencyProperty == s_VerticalSourceOffsetKindProperty ||
00225              dependencyProperty == s_VerticalSourceStartOffsetProperty ||
00226              dependencyProperty == s_VerticalSourceEndOffsetProperty ||
00227              dependencyProperty == s_MaxVerticalShiftRatioProperty)
00228     {
00229         UpdateExpressionAnimation(winrt::Orientation::Vertical);
00230     }
00231     else if (dependencyProperty == s_VerticalShiftProperty)
00232     {
00233         InvalidateMeasure();
00234         UpdateExpressionAnimation(winrt::Orientation::Vertical);
00235     }
00236 }
00237
00238 // Invoked by ScrollInputHelper when a characteristic changes requires a re-evaluation of the parallaxing expression animations.
00239 void ParallaxView::OnScrollInputHelperInfoChanged(bool horizontalInfoChanged, bool verticalInfoChanged)
00240 {
00241     if (horizontalInfoChanged)
00242         UpdateExpressionAnimation(winrt::Orientation::Horizontal);
00243     if (verticalInfoChanged)
00244         UpdateExpressionAnimation(winrt::Orientation::Vertical);
00245 }
00246
00247 void ParallaxView::OnLoaded(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
00248 {
00249     // Characteristics influencing the source start and end offsets are ready now.
00250     if (HorizontalShift() != 0.0)
00251     {
00252         UpdateStartOffsetExpression(winrt::Orientation::Horizontal);
00253         UpdateEndOffsetExpression(winrt::Orientation::Horizontal);
00254     }
00255
00256     if (VerticalShift() != 0.0)
00257     {
00258         UpdateStartOffsetExpression(winrt::Orientation::Vertical);
00259         UpdateEndOffsetExpression(winrt::Orientation::Vertical);
00260     }
00261 }
00262
00263 void ParallaxView::OnSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& /*args*/)
00264 {
00265     // ParallaxView sizes influence the source end offset.
00266     if (HorizontalShift() != 0.0)
00267     {
00268         UpdateEndOffsetExpression(winrt::Orientation::Horizontal);
00269     }
00270
00271     if (VerticalShift() != 0.0)
00272     {
00273         UpdateEndOffsetExpression(winrt::Orientation::Vertical);
00274     }
00275 }
00276
00277 // Invoked when a tracked dependency property changes for the Child dependency object.
00278 void ParallaxView::OnChildPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00279 {
00280     winrt::FrameworkElement senderAsFrameworkElement = sender.try_as<winrt::FrameworkElement>();
00281
00282     if (senderAsFrameworkElement &&
00283         (args == winrt::FrameworkElement::HorizontalAlignmentProperty() ||
00284          args == winrt::FrameworkElement::VerticalAlignmentProperty()))
00285     {
00286         senderAsFrameworkElement.InvalidateArrange();
00287     }
00288 }
00289
00290 void ParallaxView::UpdateChild(const winrt::UIElement& oldChild, const winrt::UIElement& newChild)
00291 {
00292     winrt::FrameworkElement childAsFrameworkElement = nullptr;
00293
00294     UnhookChildPropertyChanged(false /* isInDestructor */);
00295
00296     auto children = try_as<winrt::Panel>().Children();
00297     children.Clear();
00298
00299     if (newChild)
00300     {
00301         children.Append(newChild);
00302
00303         // Detect when a child alignment changes, so it can be re-arranged.
00304         childAsFrameworkElement = newChild.try_as<winrt::FrameworkElement>();
00305         HookChildPropertyChanged(childAsFrameworkElement);
00306     }
00307
00308     if (m_scrollInputHelper && m_scrollInputHelper->TargetElement() != newChild)
00309     {
00310         m_scrollInputHelper->SetTargetElement(newChild);
00311         if (HorizontalShift() != 0.0)
00312         {
00313             UpdateExpressionAnimation(winrt::Orientation::Horizontal);
00314         }
00315         if (VerticalShift() != 0.0)
00316         {
00317             UpdateExpressionAnimation(winrt::Orientation::Vertical);
00318         }
00319     }
00320 }
00321
00322 // Sets up the internal composition property set that tracks the animated source start & end offsets.
00323 void ParallaxView::EnsureAnimatedVariables()
00324 {
00325     if (!m_animatedVariables && m_targetVisual)
00326     {
00327         m_animatedVariables = m_targetVisual.Compositor().CreatePropertySet();
00328         m_animatedVariables.InsertScalar(L"HorizontalSourceStartOffset", 0.0f);
00329         m_animatedVariables.InsertScalar(L"HorizontalSourceEndOffset", 0.0f);
00330         m_animatedVariables.InsertScalar(L"VerticalSourceStartOffset", 0.0f);
00331         m_animatedVariables.InsertScalar(L"VerticalSourceEndOffset", 0.0f);
00332     }
00333 }
00334
00335 // Updates the composition animation for the source start offset.
00336 void ParallaxView::UpdateStartOffsetExpression(winrt::Orientation orientation)
00337 {
00338     if (m_scrollInputHelper && m_scrollInputHelper->SourcePropertySet() && m_animatedVariables &&
00339         ((orientation == winrt::Orientation::Horizontal && HorizontalShift() != 0.0) ||
00340         (orientation == winrt::Orientation::Vertical && VerticalShift() != 0.0)))
00341     {
00342         winrt::ExpressionAnimation startOffsetExpressionAnimation = nullptr;
00343
00344         if (orientation == winrt::Orientation::Horizontal)
00345         {
00346             if (!m_horizontalSourceStartOffsetExpression)
00347             {
00348                 m_horizontalSourceStartOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
00349             }
00350             startOffsetExpressionAnimation = m_horizontalSourceStartOffsetExpression;
00351         }
00352         else
00353         {
00354             if (!m_verticalSourceStartOffsetExpression)
00355             {
00356                 m_verticalSourceStartOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
00357             }
00358             startOffsetExpressionAnimation = m_verticalSourceStartOffsetExpression;
00359         }
00360
00361         std::wstring startOffsetExpression;
00362         const float startOffset = static_cast<float>(orientation == winrt::Orientation::Horizontal ? HorizontalSourceStartOffset() : VerticalSourceStartOffset());
00363
00364         startOffsetExpressionAnimation.SetScalarParameter(L"startOffset", startOffset);
00365
00366         if ((orientation == winrt::Orientation::Horizontal && HorizontalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative) ||
00367             (orientation == winrt::Orientation::Vertical && VerticalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative))
00368         {
00369             // Horizontal/VerticalSourceStartOffset is added to automatic value
00370
00371             const float maxUnderpanOffset = static_cast<float>(m_scrollInputHelper->GetMaxUnderpanOffset(orientation));
00372
00373             startOffsetExpressionAnimation.SetScalarParameter(L"maxUnderpanOffset", maxUnderpanOffset);
00374
00375             if (m_scrollInputHelper->IsTargetElementInSource())
00376             {
00377                 // Target is inside the scrollPresenter.
00378
00379                 // startOffset = (ParallaxViewOffset + HorizontalSourceStartOffset) * ZoomFactor - ViewportWidth - MaxUnderpanOffset
00380                 const float parallaxViewOffset = static_cast<float>(m_scrollInputHelper->GetOffsetFromScrollContentElement(*this, orientation));
00381                 const float viewportSize = static_cast<float>(m_scrollInputHelper->GetViewportSize(orientation));
00382
00383                 startOffsetExpression = L"(parallaxViewOffset + startOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize - maxUnderpanOffset";
00384                 startOffsetExpressionAnimation.SetScalarParameter(L"parallaxViewOffset", static_cast<float>(parallaxViewOffset));
00385                 startOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", static_cast<float>(viewportSize));
00386                 startOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
00387             }
00388             else
00389             {
00390                 // Target is outside the scrollPresenter.
00391
00392                 // startOffset = HorizontalSourceStartOffset * ZoomFactor - MaxUnderpanOffset
00393                 startOffsetExpression = L"startOffset * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - maxUnderpanOffset";
00394                 startOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
00395             }
00396         }
00397         else
00398         {
00399             // Horizontal/VerticalSourceStartOffset is an absolute value
00400
00401             // If HorizontalSourceStartOffset <= 0 Then
00402             //   startOffset = HorizontalSourceStartOffset
00403             // Else
00404             //   startOffset = HorizontalSourceStartOffset * ZoomFactor
00405             if (startOffset > 0.0f)
00406             {
00407                 startOffsetExpression = L"startOffset * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName());
00408                 startOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
00409             }
00410             else
00411             {
00412                 startOffsetExpression = L"startOffset";
00413             }
00414         }
00415
00416         if (startOffsetExpressionAnimation.Expression() != startOffsetExpression)
00417         {
00418             startOffsetExpressionAnimation.Expression(startOffsetExpression);
00419         }
00420
00421         m_animatedVariables.StopAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceStartOffset" : L"VerticalSourceStartOffset");
00422         m_animatedVariables.StartAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceStartOffset" : L"VerticalSourceStartOffset", startOffsetExpressionAnimation);
00423     }
00424 }
00425
00426 // Updates the composition animation for the source end offset.
00427 void ParallaxView::UpdateEndOffsetExpression(winrt::Orientation orientation)
00428 {
00429     if (m_scrollInputHelper && m_scrollInputHelper->SourcePropertySet() && m_animatedVariables &&
00430         ((orientation == winrt::Orientation::Horizontal && HorizontalShift() != 0.0) ||
00431         (orientation == winrt::Orientation::Vertical && VerticalShift() != 0.0)))
00432     {
00433         winrt::ExpressionAnimation endOffsetExpressionAnimation = nullptr;
00434
00435         if (orientation == winrt::Orientation::Horizontal)
00436         {
00437             if (!m_horizontalSourceEndOffsetExpression)
00438             {
00439                 m_horizontalSourceEndOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
00440             }
00441             endOffsetExpressionAnimation = m_horizontalSourceEndOffsetExpression;
00442         }
00443         else
00444         {
00445             if (!m_verticalSourceEndOffsetExpression)
00446             {
00447                 m_verticalSourceEndOffsetExpression = m_targetVisual.Compositor().CreateExpressionAnimation();
00448             }
00449             endOffsetExpressionAnimation = m_verticalSourceEndOffsetExpression;
00450         }
00451
00452         std::wstring endOffsetExpression;
00453         const float endOffset = static_cast<float>(orientation == winrt::Orientation::Horizontal ? HorizontalSourceEndOffset() : VerticalSourceEndOffset());
00454
00455         endOffsetExpressionAnimation.SetScalarParameter(L"endOffset", endOffset);
00456         endOffsetExpressionAnimation.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
00457
00458         if ((orientation == winrt::Orientation::Horizontal && HorizontalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative) ||
00459             (orientation == winrt::Orientation::Vertical && VerticalSourceOffsetKind() == winrt::ParallaxSourceOffsetKind::Relative))
00460         {
00461             // Horizontal/VerticalSourceEndOffset is added to automatic value
00462
00463             const float maxOverpanOffset = static_cast<float>(m_scrollInputHelper->GetMaxOverpanOffset(orientation));
00464
00465             endOffsetExpressionAnimation.SetScalarParameter(L"maxOverpanOffset", maxOverpanOffset);
00466
00467             if (m_scrollInputHelper->IsTargetElementInSource())
00468             {
00469                 // Target is inside the scrollPresenter.
00470
00471                 // endOffset = (ParallaxViewOffset + ParallaxViewWidth + HorizontalSourceEndOffset) * ZoomFactor + MaxOverpanOffset
00472                 const float parallaxViewOffset = static_cast<float>(m_scrollInputHelper->GetOffsetFromScrollContentElement(*this, orientation));
00473                 const float parallaxViewSize = static_cast<float>(orientation == winrt::Orientation::Horizontal ? ActualWidth() : ActualHeight());
00474
00475                 endOffsetExpression = L"(parallaxViewOffset + parallaxViewSize + endOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" + maxOverpanOffset";
00476                 endOffsetExpressionAnimation.SetScalarParameter(L"parallaxViewOffset", parallaxViewOffset);
00477                 endOffsetExpressionAnimation.SetScalarParameter(L"parallaxViewSize", parallaxViewSize);
00478             }
00479             else
00480             {
00481                 // Target is outside the scrollPresenter.
00482
00483                 const float viewportSize = static_cast<float>(m_scrollInputHelper->GetViewportSize(orientation));
00484                 const float contentSize = static_cast<float>(m_scrollInputHelper->GetContentSize(orientation));
00485
00486                 // endOffset = Max(0, (ContentWidth + HorizontalSourceEndOffset) * ZoomFactor - ViewportWidth) + MaxOverpanOffset
00487                 endOffsetExpression = L"Max(0.0f, (contentSize + endOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize) + maxOverpanOffset";
00488                 endOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", viewportSize);
00489                 endOffsetExpressionAnimation.SetScalarParameter(L"contentSize", contentSize);
00490             }
00491         }
00492         else
00493         {
00494             // Horizontal/VerticalSourceEndOffset is an absolute value
00495
00496             const float viewportSize = static_cast<float>(m_scrollInputHelper->GetViewportSize(orientation));
00497             const float contentSize = static_cast<float>(m_scrollInputHelper->GetContentSize(orientation));
00498
00499             // If (ContentWidth > ViewportWidth) Then
00500             //   If (HorizontalSourceEndOffset <= ContentWidth - ViewportWidth) Then
00501             //     endOffset = Max(0, HorizontalSourceEndOffset * ZoomFactor)
00502             //   Else
00503             //     endOffset = Max(0, (ContentWidth - ViewportWidth) * ZoomFactor) + HorizontalSourceEndOffset - ContentWidth + ViewportWidth
00504             // Else
00505             //   If (HorizontalSourceEndOffset <= 0) Then
00506             //     endOffset = Max(0, (ContentWith + HorizontalSourceEndOffset) * ZoomFactor - ViewportWidth)
00507             //   Else
00508             //     endOffset = Max(0, ContentWidth * ZoomFactor - ViewportWidth) + HorizontalSourceEndOffset
00509             if (contentSize > viewportSize)
00510             {
00511                 if (endOffset <= contentSize - viewportSize)
00512                 {
00513                     endOffsetExpression = L"Max(0.0f, endOffset * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L")";
00514                 }
00515                 else
00516                 {
00517                     endOffsetExpression = L"Max(0.0f, (contentSize - viewportSize) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L") + endOffset - contentSize + viewportSize";
00518                     endOffsetExpressionAnimation.SetScalarParameter(L"contentSize", contentSize);
00519                     endOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", viewportSize);
00520                 }
00521             }
00522             else
00523             {
00524                 if (endOffset <= 0.0f)
00525                 {
00526                     endOffsetExpression = L"Max(0.0f, (contentSize + endOffset) * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize)";
00527                 }
00528                 else
00529                 {
00530                     endOffsetExpression = L"Max(0.0f, contentSize * source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceScalePropertyName()) + L" - viewportSize) + endOffset";
00531                 }
00532                 endOffsetExpressionAnimation.SetScalarParameter(L"contentSize", contentSize);
00533                 endOffsetExpressionAnimation.SetScalarParameter(L"viewportSize", viewportSize);
00534             }
00535         }
00536
00537         if (endOffsetExpressionAnimation.Expression() != endOffsetExpression)
00538         {
00539             endOffsetExpressionAnimation.Expression(endOffsetExpression);
00540         }
00541
00542         m_animatedVariables.StopAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceEndOffset" : L"VerticalSourceEndOffset");
00543         m_animatedVariables.StartAnimation((orientation == winrt::Orientation::Horizontal) ? L"HorizontalSourceEndOffset" : L"VerticalSourceEndOffset", endOffsetExpressionAnimation);
00544     }
00545 }
00546
00547 // Updates the parallaxing composition animation.
00548 void ParallaxView::UpdateExpressionAnimation(winrt::Orientation orientation)
00549 {
00550     if (m_scrollInputHelper && m_scrollInputHelper->TargetElement() && m_scrollInputHelper->SourcePropertySet())
00551     {
00552         winrt::Visual targetVisual = winrt::ElementCompositionPreview::GetElementVisual(m_scrollInputHelper->TargetElement());
00553         if (m_targetVisual != targetVisual)
00554         {
00555             m_targetVisual = targetVisual;
00556             winrt::ElementCompositionPreview::SetIsTranslationEnabled(m_scrollInputHelper->TargetElement(), true);
00557             EnsureAnimatedVariables();
00558         }
00559     }
00560     else if (m_targetVisual)
00561     {
00562         // Stop prior parallaxing animations.
00563         m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal));
00564         m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical));
00565         m_isHorizontalAnimationStarted = m_isVerticalAnimationStarted = false;
00566         m_targetVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });
00567         m_targetVisual = nullptr;
00568     }
00569
00570     if (m_targetVisual)
00571     {
00572         if ((orientation == winrt::Orientation::Horizontal && HorizontalShift() == 0.0) ||
00573             (orientation == winrt::Orientation::Vertical && VerticalShift() == 0.0))
00574         {
00575             if (orientation == winrt::Orientation::Horizontal)
00576             {
00577                 if (m_isHorizontalAnimationStarted)
00578                 {
00579                     // Stop prior horizontal parallaxing animation.
00580                     m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal));
00581                     m_isHorizontalAnimationStarted = false;
00582                     m_targetVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });
00583
00584                     if (m_isVerticalAnimationStarted)
00585                     {
00586                         m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical), m_verticalParallaxExpressionInternal);
00587                     }
00588                 }
00589             }
00590             else if (m_isVerticalAnimationStarted)
00591             {
00592                 // Stop prior vertical parallaxing animation.
00593                 m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical));
00594                 m_isVerticalAnimationStarted = false;
00595                 m_targetVisual.Properties().InsertVector3(s_translationPropertyName, { 0.0f, 0.0f, 0.0f });
00596
00597                 if (m_isHorizontalAnimationStarted)
00598                 {
00599                     m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal), m_horizontalParallaxExpressionInternal);
00600                 }
00601             }
00602         }
00603         else
00604         {
00605             UpdateStartOffsetExpression(orientation);
00606             UpdateEndOffsetExpression(orientation);
00607
00608             winrt::ExpressionAnimation parallaxExpressionInternal = (orientation == winrt::Orientation::Horizontal) ? m_horizontalParallaxExpressionInternal : m_verticalParallaxExpressionInternal;
00609             std::wstring source = L"source." + static_cast<std::wstring>(m_scrollInputHelper->GetSourceOffsetPropertyName(orientation));
00610             std::wstring startOffset = (orientation == winrt::Orientation::Horizontal) ? L"animatedVariables.HorizontalSourceStartOffset" : L"animatedVariables.VerticalSourceStartOffset";
00611             std::wstring endOffset = (orientation == winrt::Orientation::Horizontal) ? L"animatedVariables.HorizontalSourceEndOffset" : L"animatedVariables.VerticalSourceEndOffset";
00612             std::wstring parallaxExpression;
00613             const float shift = (float)(orientation == winrt::Orientation::Horizontal ? HorizontalShift() : VerticalShift());
00614
00615             if ((orientation == winrt::Orientation::Horizontal && IsHorizontalShiftClamped()) ||
00616                 (orientation == winrt::Orientation::Vertical && IsVerticalShiftClamped()))
00617             {
00618                 // Clamped parallax offset case.
00619
00620                 if (shift > 0.0)
00621                 {
00622                     // X <= startOffset --> P(X) = 0
00623                     parallaxExpression = L"(-" + static_cast<std::wstring>(source) + L" <= " + static_cast<std::wstring>(startOffset) + L") ? 0.0f : ";
00624
00625                     // startOffset < X < endOffset --> P(X) = -Min(MaxRatio, shift / (endOffset - startOffset)) * (X - startOffset)
00626                     parallaxExpression += L"((-" + static_cast<std::wstring>(source) + L" < " + static_cast<std::wstring>(endOffset) + L") ? ";
00627                     parallaxExpression += L"(-Min(maxRatio, (shift / (" + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L"))) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(startOffset) + L")) : ";
00628
00629                     // X >= endOffset --> P(X) = -Min(MaxRatio * Max(0 , endOffset - startOffset), shift)
00630                     parallaxExpression += L"-Min(maxRatio * Max(0.0f, " + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L"), shift))";
00631                 }
00632                 else
00633                 {
00634                     // shift < 0.0
00635
00636                     // X <= startOffset --> P(X) = -Min(MaxRatio * Max(0 , endOffset - startOffset), -shift)
00637                     parallaxExpression = L"(-" + static_cast<std::wstring>(source) + L" <= " + static_cast<std::wstring>(startOffset) + L") ? -Min(maxRatio * Max(0.0f, " + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L"), -shift) : ";
00638
00639                     // startOffset < X < endOffset --> P(X) = Min(MaxRatio, shift / (startOffset - endOffset)) * (X - endOffset)
00640                     parallaxExpression += L"((-" + static_cast<std::wstring>(source) + L" < " + static_cast<std::wstring>(endOffset) + L") ? ";
00641                     parallaxExpression += L"(Min(maxRatio, (shift / (" + static_cast<std::wstring>(startOffset) + L" - " + static_cast<std::wstring>(endOffset) + L"))) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(endOffset) + L")) : ";
00642
00643                     // X >= endOffset --> P(X) = 0
00644                     parallaxExpression += L"0.0f)";
00645                 }
00646             }
00647             else
00648             {
00649                 // Unclamped parallax offset case.
00650
00651                 if (shift > 0.0)
00652                 {
00653                     // startOffset == endOffset --> P(X) = 0
00654                     parallaxExpression = L"(" + static_cast<std::wstring>(startOffset) + L" == " + static_cast<std::wstring>(endOffset) + L") ? 0.0f : ";
00655
00656                     // startOffset != endOffset --> P(X) = -Min(MaxRatio, shift / (endOffset - startOffset)) * (X - startOffset)
00657                     parallaxExpression += L"-Min(maxRatio, shift / (" + static_cast<std::wstring>(endOffset) + L" - " + static_cast<std::wstring>(startOffset) + L")) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(startOffset) + L")";
00658                 }
00659                 else
00660                 {
00661                     // startOffset == endOffset --> P(X) = 0
00662                     parallaxExpression = L"(" + static_cast<std::wstring>(startOffset) + L" == " + static_cast<std::wstring>(endOffset) + L") ? 0.0f : ";
00663
00664                     // startOffset != endOffset --> P(X) = Min(MaxRatio, shift / (startOffset - endOffset)) * (X - endOffset)
00665                     parallaxExpression += L"Min(maxRatio, shift / (" + static_cast<std::wstring>(startOffset) + L" - " + static_cast<std::wstring>(endOffset) + L")) * (-" + static_cast<std::wstring>(source) + L" - " + static_cast<std::wstring>(endOffset) + L")";
00666                 }
00667             }
00668
00669             if (!parallaxExpressionInternal)
00670             {
00671                 parallaxExpressionInternal = m_targetVisual.Compositor().CreateExpressionAnimation(parallaxExpression);
00672                 if (orientation == winrt::Orientation::Horizontal)
00673                 {
00674                     m_horizontalParallaxExpressionInternal = parallaxExpressionInternal;
00675                 }
00676                 else
00677                 {
00678                     m_verticalParallaxExpressionInternal = parallaxExpressionInternal;
00679                 }
00680             }
00681             else if (parallaxExpressionInternal.Expression() != parallaxExpression)
00682             {
00683                 parallaxExpressionInternal.Expression(parallaxExpression);
00684             }
00685
00686             parallaxExpressionInternal.SetReferenceParameter(L"source", m_scrollInputHelper->SourcePropertySet());
00687             parallaxExpressionInternal.SetReferenceParameter(L"animatedVariables", m_animatedVariables);
00688             parallaxExpressionInternal.SetScalarParameter(L"maxRatio", static_cast<float>(max(0.0, (orientation == winrt::Orientation::Horizontal ? MaxHorizontalShiftRatio() : MaxVerticalShiftRatio()))));
00689             parallaxExpressionInternal.SetScalarParameter(L"shift", shift);
00690
00691             if (orientation == winrt::Orientation::Horizontal)
00692             {
00693                 if (m_isHorizontalAnimationStarted)
00694                 {
00695                     m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal));
00696                 }
00697                 m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Horizontal), parallaxExpressionInternal);
00698                 m_isHorizontalAnimationStarted = true;
00699             }
00700             else
00701             {
00702                 if (m_isVerticalAnimationStarted)
00703                 {
00704                     m_targetVisual.StopAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical));
00705                 }
00706                 m_targetVisual.StartAnimation(GetVisualTargetedPropertyName(winrt::Orientation::Vertical), parallaxExpressionInternal);
00707                 m_isVerticalAnimationStarted = true;
00708             }
00709         }
00710     }
00711 }
00712
00713 void ParallaxView::HookLoaded()
00714 {
00715     if (m_loadedToken.value == 0)
00716     {
00717         m_loadedToken = Loaded({ this, &ParallaxView::OnLoaded });
00718     }
00719 }
00720
00721 void ParallaxView::HookSizeChanged()
00722 {
00723     if (m_sizeChangedToken.value == 0)
00724     {
00725         m_sizeChangedToken = SizeChanged({ this, &ParallaxView::OnSizeChanged });
00726     }
00727 }
00728
00729 void ParallaxView::HookChildPropertyChanged(const winrt::FrameworkElement& child)
00730 {
00731     if (child)
00732     {
00733         m_currentListeningChild.set(child);
00734         if (m_childHorizontalAlignmentChangedToken.value == 0)
00735         {
00736             m_childHorizontalAlignmentChangedToken.value = child.RegisterPropertyChangedCallback(
00737                 winrt::FrameworkElement::HorizontalAlignmentProperty(), { this, &ParallaxView::OnChildPropertyChanged });
00738         }
00739         if (m_childVerticalAlignmentChangedToken.value == 0)
00740         {
00741             m_childVerticalAlignmentChangedToken.value = child.RegisterPropertyChangedCallback(
00742                 winrt::FrameworkElement::VerticalAlignmentProperty(), { this, &ParallaxView::OnChildPropertyChanged });
00743         }
00744     }
00745 }
00746
00747 void ParallaxView::UnhookChildPropertyChanged(bool isInDestructor)
00748 {
00749     if (auto child = m_currentListeningChild.safe_get(isInDestructor))
00750     {
00751         if (m_childHorizontalAlignmentChangedToken.value != 0)
00752         {
00753             child.UnregisterPropertyChangedCallback(winrt::FrameworkElement::HorizontalAlignmentProperty(), m_childHorizontalAlignmentChangedToken.value);
00754             m_childHorizontalAlignmentChangedToken.value = 0;
00755         }
00756         if (m_childVerticalAlignmentChangedToken.value != 0)
00757         {
00758             child.UnregisterPropertyChangedCallback(winrt::FrameworkElement::VerticalAlignmentProperty(), m_childVerticalAlignmentChangedToken.value);
00759             m_childVerticalAlignmentChangedToken.value = 0;
00760         }
00761         m_currentListeningChild.set(nullptr);
00762     }
00763 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemTemplateSettings.h Source File

  • File List
  • File Members
  • TreeView

TreeViewItemTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TreeViewItemTemplateSettings.g.h"
00007 #include "TreeViewItemTemplateSettings.properties.h"
00008
00009 class TreeViewItemTemplateSettings :
00010     public winrt::implementation::TreeViewItemTemplateSettingsT<TreeViewItemTemplateSettings>,
00011     public TreeViewItemTemplateSettingsProperties
00012 {
00013 public:
00014     TreeViewItemTemplateSettings();
00015 };
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollControllerPanRequestedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollControllerPanRequestedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "ScrollControllerPanRequestedEventArgs.g.h"
00008 #include "ScrollPresenterTrace.h"
00009
00010 class ScrollControllerPanRequestedEventArgs :
00011     public winrt::implementation::ScrollControllerPanRequestedEventArgsT<ScrollControllerPanRequestedEventArgs>
00012 {
00013 public:
00014     ~ScrollControllerPanRequestedEventArgs()
00015     {
00016         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00017     }
00018
00019     ScrollControllerPanRequestedEventArgs(
00020         const winrt::PointerPoint& pointerPoint);
00021
00022     winrt::PointerPoint PointerPoint() const;
00023     bool Handled() const;
00024     void Handled(bool handled);
00025
00026 private:
00027     winrt::PointerPoint m_pointerPoint{ nullptr };
00028     bool m_handled{ false };
00029 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/WebView2AutomationPeer.idl Source File

  • File List
  • File Members
  • WebView2

WebView2AutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [webhosthidden]
00005 [MUX_PUBLIC]
00006 unsealed runtimeclass WebView2AutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00007 {
00008     WebView2AutomationPeer(MU_XC_NAMESPACE.WebView2 owner);
00009 }
00010
00011 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyout.cpp Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyout.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "CommandBarFlyout.h"
00007 #include "CommandBarFlyoutCommandBar.h"
00008 #include "Vector.h"
00009 #include "RuntimeProfiler.h"
00010
00011 #include "CommandBarFlyout.properties.cpp"
00012
00013 // Change to 'true' to turn on debugging outputs in Output window
00014 bool CommandBarFlyoutTrace::s_IsDebugOutputEnabled{ false };
00015 bool CommandBarFlyoutTrace::s_IsVerboseDebugOutputEnabled{ false };
00016
00017 // List of AppBarButton/AppBarToggleButton dependency properties being listened to for raising the CommandBarFlyoutCommandBar::OnCommandBarElementDependencyPropertyChanged notifications.
00018 // IsCompact and LabelPosition have no effect on an AppBarButton's rendering, when used as a secondary command, they are not present in the list.
00019 // These two arrays are initialized in the constructor instead of being statically initialized here because that would result in the initialization happening during
00020 // dllmain and it is not valid to call COM apis at that time.
00021 winrt::DependencyProperty CommandBarFlyout::s_appBarButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount]{ nullptr, nullptr, nullptr };
00022 winrt::DependencyProperty CommandBarFlyout::s_appBarToggleButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount]{ nullptr, nullptr, nullptr };
00023
00024 CommandBarFlyout::CommandBarFlyout()
00025 {
00026     __RP_Marker_ClassById(RuntimeProfiler::ProfId_CommandBarFlyout);
00027
00028     // Initialize s_appBarButtonDependencyProperties and s_appBarToggleButtonDependencyProperties if needed.
00029     if (s_appBarButtonDependencyProperties[0] == nullptr)
00030     {
00031         s_appBarButtonDependencyProperties[0] = winrt::AppBarButton::IconProperty();
00032         s_appBarButtonDependencyProperties[1] = winrt::AppBarButton::LabelProperty();
00033
00034         s_appBarToggleButtonDependencyProperties[0] = winrt::AppBarToggleButton::IconProperty();
00035         s_appBarToggleButtonDependencyProperties[1] = winrt::AppBarToggleButton::LabelProperty();
00036
00037         s_appBarButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount - 1] = winrt::AppBarButton::KeyboardAcceleratorTextOverrideProperty();
00038         s_appBarToggleButtonDependencyProperties[s_commandBarElementDependencyPropertiesCount - 1] = winrt::AppBarToggleButton::KeyboardAcceleratorTextOverrideProperty();
00039     }
00040
00041     if (winrt::IFlyoutBase thisAsFlyoutBase = *this)
00042     {
00043         thisAsFlyoutBase.ShouldConstrainToRootBounds(false);
00044         thisAsFlyoutBase.AreOpenCloseAnimationsEnabled(false);
00045     }
00046
00047     m_primaryCommands = winrt::make<Vector<winrt::ICommandBarElement>>().as<winrt::IObservableVector<winrt::ICommandBarElement>>();
00048     m_secondaryCommands = winrt::make<Vector<winrt::ICommandBarElement>>().as<winrt::IObservableVector<winrt::ICommandBarElement>>();
00049
00050     m_primaryCommandsVectorChangedToken = m_primaryCommands.VectorChanged({
00051         [this](winrt::IObservableVector<winrt::ICommandBarElement> const& sender, winrt::IVectorChangedEventArgs const& args)
00052         {
00053             if (auto commandBar = m_commandBar.get())
00054             {
00055                 SharedHelpers::ForwardVectorChange(sender, commandBar.PrimaryCommands(), args);
00056             }
00057         }
00058     });
00059
00060     m_secondaryCommandsVectorChangedToken = m_secondaryCommands.VectorChanged({
00061         [this](winrt::IObservableVector<winrt::ICommandBarElement> const& sender, winrt::IVectorChangedEventArgs const& args)
00062         {
00063             if (auto commandBar = m_commandBar.get())
00064             {
00065                 SharedHelpers::ForwardVectorChange(sender, commandBar.SecondaryCommands(), args);
00066
00067                 // We want to ensure that any interaction with secondary items causes the CommandBarFlyout
00068                 // to close, so we'll attach a Click handler to any buttons and Checked/Unchecked handlers
00069                 // to any toggle buttons that we get and close the flyout when they're invoked.
00070                 // The only exception is buttons with flyouts - in that case, clicking on the button
00071                 // will just open the flyout rather than executing an action, so we don't want that to
00072                 // do anything.
00073                 const int index = args.Index();
00074                 const auto closeFlyoutFunc = [this](auto const& sender, auto const& args) { Hide(); };
00075
00076                 switch (args.CollectionChange())
00077                 {
00078                 case winrt::CollectionChange::ItemChanged:
00079                 {
00080                     auto element = sender.GetAt(index);
00081                     auto button = element.try_as<winrt::AppBarButton>();
00082                     auto toggleButton = element.try_as<winrt::AppBarToggleButton>();
00083
00084                     UnhookCommandBarElementDependencyPropertyChanges(index);
00085
00086                     if (button)
00087                     {
00088                         HookAppBarButtonDependencyPropertyChanges(button, index);
00089                     }
00090                     else if (toggleButton)
00091                     {
00092                         HookAppBarToggleButtonDependencyPropertyChanges(toggleButton, index);
00093                     }
00094
00095                     if (button && !button.Flyout())
00096                     {
00097                         m_secondaryButtonClickRevokerByIndexMap[index] = button.Click(winrt::auto_revoke, closeFlyoutFunc);
00098                         SharedHelpers::EraseIfExists(m_secondaryToggleButtonCheckedRevokerByIndexMap, index);
00099                         SharedHelpers::EraseIfExists(m_secondaryToggleButtonUncheckedRevokerByIndexMap, index);
00100                     }
00101                     else if (toggleButton)
00102                     {
00103                         SharedHelpers::EraseIfExists(m_secondaryButtonClickRevokerByIndexMap, index);
00104                         m_secondaryToggleButtonCheckedRevokerByIndexMap[index] = toggleButton.Checked(winrt::auto_revoke, closeFlyoutFunc);
00105                         m_secondaryToggleButtonUncheckedRevokerByIndexMap[index] = toggleButton.Unchecked(winrt::auto_revoke, closeFlyoutFunc);
00106                     }
00107                     else
00108                     {
00109                         SharedHelpers::EraseIfExists(m_secondaryButtonClickRevokerByIndexMap, index);
00110                         SharedHelpers::EraseIfExists(m_secondaryToggleButtonCheckedRevokerByIndexMap, index);
00111                         SharedHelpers::EraseIfExists(m_secondaryToggleButtonUncheckedRevokerByIndexMap, index);
00112                     }
00113                     break;
00114                 }
00115                 case winrt::CollectionChange::ItemInserted:
00116                 {
00117                     auto element = sender.GetAt(index);
00118                     auto button = element.try_as<winrt::AppBarButton>();
00119                     auto toggleButton = element.try_as<winrt::AppBarToggleButton>();
00120
00121                     if (button)
00122                     {
00123                         HookAppBarButtonDependencyPropertyChanges(button, index);
00124                     }
00125                     else if (toggleButton)
00126                     {
00127                         HookAppBarToggleButtonDependencyPropertyChanges(toggleButton, index);
00128                     }
00129
00130                     if (button && !button.Flyout())
00131                     {
00132                         m_secondaryButtonClickRevokerByIndexMap[index] = button.Click(winrt::auto_revoke, closeFlyoutFunc);
00133                     }
00134                     else if (toggleButton)
00135                     {
00136                         m_secondaryToggleButtonCheckedRevokerByIndexMap[index] = toggleButton.Checked(winrt::auto_revoke, closeFlyoutFunc);
00137                         m_secondaryToggleButtonUncheckedRevokerByIndexMap[index] = toggleButton.Unchecked(winrt::auto_revoke, closeFlyoutFunc);
00138                     }
00139                     break;
00140                 }
00141                 case winrt::CollectionChange::ItemRemoved:
00142                     UnhookCommandBarElementDependencyPropertyChanges(index);
00143
00144                     SharedHelpers::EraseIfExists(m_secondaryButtonClickRevokerByIndexMap, index);
00145                     SharedHelpers::EraseIfExists(m_secondaryToggleButtonCheckedRevokerByIndexMap, index);
00146                     SharedHelpers::EraseIfExists(m_secondaryToggleButtonUncheckedRevokerByIndexMap, index);
00147                     break;
00148                 case winrt::CollectionChange::Reset:
00149                     SetSecondaryCommandsToCloseWhenExecuted();
00150                     HookAllCommandBarElementDependencyPropertyChanges();
00151                     break;
00152                 default:
00153                     MUX_ASSERT(false);
00154                 }
00155             }
00156         }
00157     });
00158
00159     Opening({
00160         [this](auto const&, auto const&)
00161         {
00162             // The CommandBarFlyout is shown in standard mode in the case
00163             // where it's being opened as a context menu, rather than as a selection flyout.
00164             // In that circumstance, we want to have the flyout be open from the start.
00165             winrt::IFlyoutBase thisAsFlyoutBase = *this;
00166
00167             if (auto commandBar = m_commandBar.get())
00168             {
00169                 // If we are in AlwaysExpanded mode then we want to make sure we open in Standard ShowMode
00170                 // Otherwise the timing on the creation of the two drops shows is such that the primary items
00171                 // draw their shadow on top of the secondary items.
00172                 // When CommandBarFlyout is in AlwaysOpen state, don't show the overflow button
00173                 if (AlwaysExpanded())
00174                 {
00175                     commandBar.OverflowButtonVisibility(winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility::Collapsed);
00176                     ShowMode(winrt::FlyoutShowMode::Standard);
00177                 }
00178                 else
00179                 {
00180                     commandBar.OverflowButtonVisibility(winrt::Microsoft::UI::Xaml::Controls::CommandBarOverflowButtonVisibility::Auto);
00181                 }
00182                 SharedHelpers::QueueCallbackForCompositionRendering(
00183                     [strongThis = get_strong(), commandBar]
00184                     {
00185                         if (auto const commandBarFlyoutCommandBar = winrt::get_self<CommandBarFlyoutCommandBar>(commandBar))
00186                         {
00187                             auto const scopeGuard = gsl::finally([commandBarFlyoutCommandBar]()
00188                                 {
00189                                     commandBarFlyoutCommandBar->m_commandBarFlyoutIsOpening = false;
00190                                 });
00191                             commandBarFlyoutCommandBar->m_commandBarFlyoutIsOpening = true;
00192
00193                             // If we don't have IFlyoutBase5 available, then we assume a standard show mode.
00194                             if (strongThis->ShowMode() == winrt::FlyoutShowMode::Standard)
00195                             {
00196                                 commandBar.IsOpen(true);
00197                             }
00198                         }
00199                     }
00200                 );
00201             }
00202
00203             if (m_primaryCommands.Size() > 0)
00204             {
00205                 AddDropShadow();
00206             }
00207         }
00208     });
00209
00210     Opened({
00211         [this](auto const&, auto const&)
00212         {
00213             if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
00214             {
00215                 if (commandBar->HasOpenAnimation())
00216                 {
00217                     commandBar->PlayOpenAnimation();
00218                 }
00219             }
00220
00221             if (auto commandBarPeer = winrt::FrameworkElementAutomationPeer::FromElement(m_commandBar.get()))
00222             {
00223                 commandBarPeer.RaiseAutomationEvent(winrt::AutomationEvents::MenuOpened);
00224             }
00225         }
00226     });
00227
00228     Closing({
00229         [this](auto const&, winrt::FlyoutBaseClosingEventArgs const& args)
00230         {
00231             if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
00232             {
00233                 // We are not able to fade this shadow out with the V2 default opacity closing animition.
00234                 // Additionally we drop shadows doing play well with the clip animation of the V1 style.
00235                 // So we need to remove it in all cases.
00236                 RemoveDropShadow();
00237
00238                 if (!m_isClosingAfterCloseAnimation && commandBar->HasCloseAnimation())
00239                 {
00240                     args.Cancel(true);
00241
00242                     const winrt::CommandBarFlyout commandBarFlyout = *this;
00243
00244                     commandBar->PlayCloseAnimation(
00245                         winrt::make_weak(commandBarFlyout),
00246                         [this]()
00247                         {
00248                             m_isClosingAfterCloseAnimation = true;
00249                             Hide();
00250                             m_isClosingAfterCloseAnimation = false;
00251                         });
00252                 }
00253                 else
00254                 {
00255                     // If we don't have an animation, close the command bar and thus it's subflyouts.
00256                     commandBar->IsOpen(false);
00257                 }
00258
00259                 //Drop shadows do not play nicely with clip animations, if we are using both, clear the shadow
00260                 if (commandBar->OpenAnimationKind() == CommandBarFlyoutOpenCloseAnimationKind::Clip)
00261                 {
00262                     commandBar->ClearShadow();
00263                 }
00264             }
00265         }
00266     });
00267
00268     // Close the CommandBar in order to ensure that we're always starting from a known state when opening the flyout.
00269     Closed({
00270         [this](auto const&, auto const&)
00271         {
00272             if (auto& commandBar = m_commandBar.get())
00273             {
00274                 if (commandBar.IsOpen())
00275                 {
00276                     commandBar.IsOpen(false);
00277                 }
00278
00279                 if (auto commandBarPeer = winrt::FrameworkElementAutomationPeer::FromElement(commandBar))
00280                 {
00281                     commandBarPeer.RaiseAutomationEvent(winrt::AutomationEvents::MenuClosed);
00282                 }
00283             }
00284         }
00285     });
00286 }
00287
00288 CommandBarFlyout::~CommandBarFlyout()
00289 {
00290     m_primaryCommands.VectorChanged(m_primaryCommandsVectorChangedToken);
00291     m_secondaryCommands.VectorChanged(m_secondaryCommandsVectorChangedToken);
00292
00293     UnhookAllCommandBarElementDependencyPropertyChanges();
00294 }
00295
00296 winrt::IObservableVector<winrt::ICommandBarElement> CommandBarFlyout::PrimaryCommands()
00297 {
00298     return m_primaryCommands;
00299 }
00300
00301 winrt::IObservableVector<winrt::ICommandBarElement> CommandBarFlyout::SecondaryCommands()
00302 {
00303     return m_secondaryCommands;
00304 }
00305
00306 winrt::Control CommandBarFlyout::CreatePresenter()
00307 {
00308     auto commandBar = winrt::make_self<CommandBarFlyoutCommandBar>();
00309
00310     // Localized string resource lookup is more expensive on MRTCore. Do the lookup ahead of time and reuse it for all
00311     // the CommandBarFlyoutCommandBar::EnsureLocalizedControlTypes calls in response to PrimaryCommands/SecondCommands
00312     // changed events.
00313     commandBar->CacheLocalizedStringResources();
00314     auto const scopeGuard = gsl::finally([commandBar]()
00315         {
00316             commandBar->ClearLocalizedStringResourceCache();
00317         });
00318
00319     SharedHelpers::CopyVector(m_primaryCommands, commandBar->PrimaryCommands());
00320     SharedHelpers::CopyVector(m_secondaryCommands, commandBar->SecondaryCommands());
00321
00322     SetSecondaryCommandsToCloseWhenExecuted();
00323     HookAllCommandBarElementDependencyPropertyChanges();
00324
00325     winrt::FlyoutPresenter presenter;
00326     presenter.Background(nullptr);
00327     presenter.Foreground(nullptr);
00328     presenter.BorderBrush(nullptr);
00329     presenter.MinWidth(0);
00330     presenter.MaxWidth(std::numeric_limits<double>::infinity());
00331     presenter.MinHeight(0);
00332     presenter.MaxHeight(std::numeric_limits<double>::infinity());
00333     presenter.BorderThickness(winrt::ThicknessHelper::FromUniformLength(0));
00334     presenter.Padding(winrt::ThicknessHelper::FromUniformLength(0));
00335     presenter.Content(*commandBar);
00336     // Clear the default CornerRadius(4) on FlyoutPresenter, CommandBarFlyout will do its own handling.
00337     presenter.CornerRadius({ 0 });
00338     presenter.Translation({ 0.0f, 0.0f, 32.0f });
00339
00340     // Disable the default shadow, as we'll be providing our own shadow.
00341     presenter.IsDefaultShadowEnabled(false);
00342
00343     m_presenter.set(presenter);
00344
00345     m_commandBarOpenedRevoker = commandBar->Opened(winrt::auto_revoke, {
00346         [this](auto const&, auto const&)
00347         {
00348             // If we open the CommandBar, then we should no longer be in a transient show mode -
00349             // we now know that the user wants to interact with us.
00350             ShowMode(winrt::FlyoutShowMode::Standard);
00351         }
00352     });
00353
00354     commandBar->SetPresenter(presenter);
00355
00356     // We'll need to remove the presenter's drop shadow on the commandBar's Opening/Closing
00357     // because we need it to disappear during its expand/shrink animation when the Overflow is opened.
00358     // It will be re-added once the storyboard for the overflow animations are completed.
00359     // That code can be found inside CommandBarFlyoutCommandBar.
00360     m_commandBarOpeningRevoker = commandBar->Opening(winrt::auto_revoke, {
00361         [this, presenter](auto const&, auto const&)
00362         {
00363             if (const auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
00364             {
00365                 if (commandBar->HasSecondaryOpenCloseAnimations())
00366                 {
00367                     // We'll only need to do the mid-animation remove/add when the "..." button is
00368                     // pressed to open/close the overflow. This means we shouldn't do it for AlwaysExpanded
00369                     // and if there's nothing in the overflow.
00370                     if (m_secondaryCommands.Size() > 0)
00371                     {
00372                         RemoveDropShadow();
00373                     }
00374                 }
00375             }
00376         }
00377         });
00378
00379     m_commandBarClosingRevoker = commandBar->Closing(winrt::auto_revoke, {
00380         [this](auto const&, auto const&)
00381         {
00382             if (const auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
00383             {
00384                 if (commandBar->HasSecondaryOpenCloseAnimations())
00385                 {
00386                     RemoveDropShadow();
00387                 }
00388             }
00389         }
00390         });
00391
00392     commandBar->SetOwningFlyout(*this);
00393
00394     m_commandBar.set(*commandBar);
00395     return presenter;
00396 }
00397
00398 void CommandBarFlyout::SetSecondaryCommandsToCloseWhenExecuted()
00399 {
00400     m_secondaryButtonClickRevokerByIndexMap.clear();
00401     m_secondaryToggleButtonCheckedRevokerByIndexMap.clear();
00402     m_secondaryToggleButtonUncheckedRevokerByIndexMap.clear();
00403
00404     const auto closeFlyoutFunc = [this](auto const& sender, auto const& args) { Hide(); };
00405
00406     for (uint32_t i = 0; i < SecondaryCommands().Size(); i++)
00407     {
00408         auto element = SecondaryCommands().GetAt(i);
00409         auto button = element.try_as<winrt::AppBarButton>();
00410         auto toggleButton = element.try_as<winrt::AppBarToggleButton>();
00411
00412         if (button && !button.Flyout())
00413         {
00414             m_secondaryButtonClickRevokerByIndexMap[i] = button.Click(winrt::auto_revoke, closeFlyoutFunc);
00415         }
00416         else if (toggleButton)
00417         {
00418             m_secondaryToggleButtonCheckedRevokerByIndexMap[i] = toggleButton.Checked(winrt::auto_revoke, closeFlyoutFunc);
00419             m_secondaryToggleButtonUncheckedRevokerByIndexMap[i] = toggleButton.Unchecked(winrt::auto_revoke, closeFlyoutFunc);
00420         }
00421     }
00422 }
00423
00424 void CommandBarFlyout::AddDropShadow()
00425 {
00426     if (auto&& presenter = m_presenter.get())
00427     {
00428         winrt::Microsoft::UI::Xaml::Media::ThemeShadow shadow;
00429         presenter.Shadow(shadow);
00430     }
00431 }
00432
00433 void CommandBarFlyout::RemoveDropShadow()
00434 {
00435     if (auto&& presenter = m_presenter.get())
00436     {
00437         presenter.Shadow(nullptr);
00438     }
00439 }
00440
00441 tracker_ref<winrt::FlyoutPresenter> CommandBarFlyout::GetPresenter()
00442 {
00443     return m_presenter;
00444 }
00445
00446 void CommandBarFlyout::HookAppBarButtonDependencyPropertyChanges(winrt::AppBarButton const& appBarButton, int index)
00447 {
00448     const auto commandBarElementDependencyPropertiesCount = s_commandBarElementDependencyPropertiesCount;
00449
00450     for (int commandBarElementDependencyPropertyIndex = 0; commandBarElementDependencyPropertyIndex < commandBarElementDependencyPropertiesCount; commandBarElementDependencyPropertyIndex++)
00451     {
00452         m_propertyChangedRevokersByIndexMap[index][commandBarElementDependencyPropertyIndex] =
00453             RegisterPropertyChanged(
00454                 appBarButton,
00455                 s_appBarButtonDependencyProperties[commandBarElementDependencyPropertyIndex], { this, &CommandBarFlyout::OnCommandBarElementDependencyPropertyChanged });
00456     }
00457 }
00458
00459 void CommandBarFlyout::HookAppBarToggleButtonDependencyPropertyChanges(winrt::AppBarToggleButton const& appBarToggleButton, int index)
00460 {
00461     const auto commandBarElementDependencyPropertiesCount = s_commandBarElementDependencyPropertiesCount;
00462
00463     for (int commandBarElementDependencyPropertyIndex = 0; commandBarElementDependencyPropertyIndex < commandBarElementDependencyPropertiesCount; commandBarElementDependencyPropertyIndex++)
00464     {
00465         m_propertyChangedRevokersByIndexMap[index][commandBarElementDependencyPropertyIndex] =
00466             RegisterPropertyChanged(
00467                 appBarToggleButton,
00468                 s_appBarToggleButtonDependencyProperties[commandBarElementDependencyPropertyIndex], { this, &CommandBarFlyout::OnCommandBarElementDependencyPropertyChanged });
00469     }
00470 }
00471
00472 void CommandBarFlyout::HookAllCommandBarElementDependencyPropertyChanges()
00473 {
00474     UnhookAllCommandBarElementDependencyPropertyChanges();
00475
00476     for (uint32_t i = 0; i < SecondaryCommands().Size(); i++)
00477     {
00478         auto element = SecondaryCommands().GetAt(i);
00479         auto button = element.try_as<winrt::AppBarButton>();
00480         auto toggleButton = element.try_as<winrt::AppBarToggleButton>();
00481
00482         if (button)
00483         {
00484             HookAppBarButtonDependencyPropertyChanges(button, i);
00485         }
00486         else if (toggleButton)
00487         {
00488             HookAppBarToggleButtonDependencyPropertyChanges(toggleButton, i);
00489         }
00490     }
00491 }
00492
00493 void CommandBarFlyout::UnhookCommandBarElementDependencyPropertyChanges(int index, bool eraseRevokers)
00494 {
00495     const auto revokers = m_propertyChangedRevokersByIndexMap.find(index);
00496     if (revokers != m_propertyChangedRevokersByIndexMap.end())
00497     {
00498         const auto commandBarElementDependencyPropertiesCount = s_commandBarElementDependencyPropertiesCount;
00499
00500         for (int commandBarElementDependencyPropertyIndex = 0; commandBarElementDependencyPropertyIndex < commandBarElementDependencyPropertiesCount; commandBarElementDependencyPropertyIndex++)
00501         {
00502             m_propertyChangedRevokersByIndexMap[index][commandBarElementDependencyPropertyIndex].revoke();
00503         }
00504
00505         if (eraseRevokers)
00506         {
00507             m_propertyChangedRevokersByIndexMap.erase(revokers);
00508         }
00509     }
00510 }
00511
00512 void CommandBarFlyout::UnhookAllCommandBarElementDependencyPropertyChanges()
00513 {
00514     for (auto const& revokers : m_propertyChangedRevokersByIndexMap)
00515     {
00516         UnhookCommandBarElementDependencyPropertyChanges(revokers.first, false /*eraseRevokers*/);
00517     }
00518     m_propertyChangedRevokersByIndexMap.clear();
00519 }
00520
00521 // Let the potential CommandBarFlyoutCommandBar know of the dependency property change so it can adjust its size.
00522 void CommandBarFlyout::OnCommandBarElementDependencyPropertyChanged(winrt::DependencyObject const& dependencyObject, winrt::DependencyProperty const& dependencyProperty)
00523 {
00524     COMMANDBARFLYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00525
00526     if (auto commandBar = winrt::get_self<CommandBarFlyoutCommandBar>(m_commandBar.get()))
00527     {
00528         commandBar->OnCommandBarElementDependencyPropertyChanged();
00529     }
00530 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButton.cpp Source File

  • File List
  • File Members
  • DropDownButton

DropDownButton.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "DropDownButton.h"
00007 #include "DropDownButtonAutomationPeer.h"
00008 #include "RuntimeProfiler.h"
00009 #include "ResourceAccessor.h"
00010
00011 #include "DropDownButton.properties.cpp"
00012
00013 DropDownButton::DropDownButton()
00014 {
00015     __RP_Marker_ClassById(RuntimeProfiler::ProfId_DropDownButton);
00016
00017     SetDefaultStyleKey(this);
00018 }
00019
00020 void DropDownButton::OnApplyTemplate()
00021 {
00022     m_flyoutPropertyChangedRevoker = RegisterPropertyChanged(*this, winrt::Button::FlyoutProperty(), { this, &DropDownButton::OnFlyoutPropertyChanged });
00023
00024     RegisterFlyoutEvents();
00025 }
00026
00027 void DropDownButton::RegisterFlyoutEvents()
00028 {
00029     m_flyoutOpenedRevoker.revoke();
00030     m_flyoutClosedRevoker.revoke();
00031
00032     if (Flyout())
00033     {
00034         m_flyoutOpenedRevoker = Flyout().Opened(winrt::auto_revoke, { this, &DropDownButton::OnFlyoutOpened });
00035         m_flyoutClosedRevoker = Flyout().Closed(winrt::auto_revoke, { this, &DropDownButton::OnFlyoutClosed });
00036     }
00037 }
00038
00039 bool DropDownButton::IsFlyoutOpen()
00040 {
00041     return m_isFlyoutOpen;
00042 };
00043
00044 void DropDownButton::OpenFlyout()
00045 {
00046     if (auto flyout = Flyout())
00047     {
00048         flyout.ShowAt(*this);
00049     }
00050 }
00051
00052 void DropDownButton::CloseFlyout()
00053 {
00054     if (auto flyout = Flyout())
00055     {
00056         flyout.Hide();
00057     }
00058 }
00059
00060 void DropDownButton::OnFlyoutPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00061 {
00062     RegisterFlyoutEvents();
00063 }
00064
00065 void DropDownButton::OnFlyoutOpened(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00066 {
00067     m_isFlyoutOpen = true;
00068     SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Collapsed, winrt::ExpandCollapseState::Expanded);
00069 }
00070
00071 void DropDownButton::OnFlyoutClosed(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00072 {
00073     m_isFlyoutOpen = false;
00074     SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Expanded, winrt::ExpandCollapseState::Collapsed);
00075 }
00076
00077 winrt::AutomationPeer DropDownButton::OnCreateAutomationPeer()
00078 {
00079     return winrt::make<DropDownButtonAutomationPeer>(*this);
00080 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/InteractionTests/NumberBoxTests.cs Source File

  • File List
  • File Members
  • NumberBox
  • InteractionTests

NumberBoxTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013 using Microsoft.Windows.Apps.Test.Automation;
00014 using Microsoft.Windows.Apps.Test.Foundation;
00015 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00016 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00017 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00018 using MUXTestInfra.Shared.Infra;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class NumberBoxTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("Platform", "Any")]
00029         [TestProperty("MUXControlsTestSuite", "SuiteB")]
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         public void UpDownTest()
00042         {
00043             using (var setup = new TestSetupHelper("NumberBox Tests"))
00044             {
00045                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00046                 numBox.SetValue(1);
00047
00048                 ComboBox spinModeComboBox = FindElement.ByName<ComboBox>("SpinModeComboBox");
00049                 spinModeComboBox.SelectItemByName("Inline");
00050                 Wait.ForIdle();
00051
00052                 Button upButton = FindButton(numBox, "Increase");
00053                 Button downButton = FindButton(numBox, "Decrease");
00054
00055                 Log.Comment("Change SmallChange value to 0.01");
00056                 RangeValueSpinner smallChangeNumBox = FindElement.ByName<RangeValueSpinner>("SmallChangeNumberBox");
00057                 EnterText(smallChangeNumBox, "0.01");
00058                 Wait.ForIdle();
00059
00060                 Log.Comment("Verify that up button increases value by 0.01");
00061                 upButton.InvokeAndWait();
00062                 Edit edit = FindTextBox(numBox);
00063                 Verify.AreEqual("1.01", edit.GetText());
00064
00065                 Log.Comment("Change Value to 0");
00066                 numBox.SetValue(0);
00067
00068                 Log.Comment("Change SmallChange value to 1");
00069                 EnterText(smallChangeNumBox, "1");
00070                 Wait.ForIdle();
00071
00072                 Log.Comment("Verify that up button increases value by 1");
00073                 upButton.InvokeAndWait();
00074                 Verify.AreEqual(1, numBox.Value);
00075
00076                 Log.Comment("Verify that down button decreases value by 1");
00077                 downButton.InvokeAndWait();
00078                 Verify.AreEqual(0, numBox.Value);
00079
00080                 Log.Comment("Change SmallChange value to 5");
00081                 smallChangeNumBox.SetValue(5);
00082                 Wait.ForIdle();
00083
00084                 Log.Comment("Verify that up button increases value by 5");
00085                 upButton.InvokeAndWait();
00086                 Verify.AreEqual(5, numBox.Value);
00087
00088                 Check("MinCheckBox");
00089                 Check("MaxCheckBox");
00090
00091                 numBox.SetValue(100);
00092                 Check("WrapCheckBox");
00093
00094                 Log.Comment("Verify that when wrapping is on, and value is at max, clicking the up button wraps to the min value.");
00095                 upButton.InvokeAndWait();
00096                 Verify.AreEqual(0, numBox.Value);
00097
00098                 Log.Comment("Verify that when wrapping is on, clicking the down button wraps to the max value.");
00099                 downButton.InvokeAndWait();
00100                 Verify.AreEqual(100, numBox.Value);
00101
00102                 Log.Comment("Verify that incrementing after typing in a value validates the text first.");
00103                 EnterText(numBox, "50", false);
00104                 upButton.InvokeAndWait();
00105                 Verify.AreEqual(55, numBox.Value);
00106             }
00107         }
00108
00109
00110         [TestMethod]
00111         public void UpDownEnabledTest()
00112         {
00113             using (var setup = new TestSetupHelper("NumberBox Tests"))
00114             {
00115                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00116
00117                 ComboBox spinModeComboBox = FindElement.ByName<ComboBox>("SpinModeComboBox");
00118                 spinModeComboBox.SelectItemByName("Inline");
00119                 Wait.ForIdle();
00120
00121                 Button upButton = FindButton(numBox, "Increase");
00122                 Button downButton = FindButton(numBox, "Decrease");
00123
00124                 Check("MinCheckBox");
00125                 Check("MaxCheckBox");
00126
00127                 Log.Comment("Verify that spin buttons are disabled if value is NaN.");
00128                 Wait.ForIdle();
00129                 Verify.IsFalse(upButton.IsEnabled);
00130                 Verify.IsFalse(downButton.IsEnabled);
00131
00132                 Log.Comment("Verify that when Value is at Minimum, the down spin button is disabled.");
00133                 numBox.SetValue(0);
00134                 Wait.ForIdle();
00135                 Verify.IsTrue(upButton.IsEnabled);
00136                 Verify.IsFalse(downButton.IsEnabled);
00137
00138                 Log.Comment("Verify that when Value is at Maximum, the up spin button is disabled.");
00139                 numBox.SetValue(100);
00140                 Wait.ForIdle();
00141                 Verify.IsFalse(upButton.IsEnabled);
00142                 Verify.IsTrue(downButton.IsEnabled);
00143
00144                 Log.Comment("Verify that when wrapping is enabled, spin buttons are enabled.");
00145                 Check("WrapCheckBox");
00146                 Verify.IsTrue(upButton.IsEnabled);
00147                 Verify.IsTrue(downButton.IsEnabled);
00148                 Uncheck("WrapCheckBox");
00149
00150                 Log.Comment("Verify that when Maximum is updated the up button is updated also.");
00151                 RangeValueSpinner maxBox = FindElement.ByName<RangeValueSpinner>("MaxNumberBox");
00152                 maxBox.SetValue(200);
00153                 Wait.ForIdle();
00154                 Verify.IsTrue(upButton.IsEnabled);
00155                 Verify.IsTrue(downButton.IsEnabled);
00156
00157                 ComboBox validationComboBox = FindElement.ByName<ComboBox>("ValidationComboBox");
00158                 validationComboBox.SelectItemByName("Disabled");
00159                 Wait.ForIdle();
00160
00161                 Log.Comment("Verify that when validation is off, spin buttons are enabled");
00162                 numBox.SetValue(0);
00163                 Wait.ForIdle();
00164                 Verify.IsTrue(upButton.IsEnabled);
00165                 Verify.IsTrue(downButton.IsEnabled);
00166
00167                 Log.Comment("...except in the NaN case");
00168                 numBox.SetValue(double.NaN);
00169                 Wait.ForIdle();
00170                 Verify.IsFalse(upButton.IsEnabled);
00171                 Verify.IsFalse(downButton.IsEnabled);
00172             }
00173         }
00174
00175         [TestMethod]
00176         public void ValueTextTest()
00177         {
00178             using (var setup = new TestSetupHelper("NumberBox Tests"))
00179             {
00180                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00181                 EnterText(numBox, "0");
00182                 Wait.ForIdle();
00183
00184                 Log.Comment("Give something else focus first to ensure that we'll have a focus-changed event");
00185                 FocusHelper.SetFocus(FindElement.ByName("ValidationComboBox"));
00186
00187                 Log.Comment("Verify that focusing the NumberBox selects the text");
00188                 numBox.SetFocus();
00189                 Wait.ForIdle();
00190                 Wait.ForSeconds(3);
00191                 Edit edit = FindTextBox(numBox);
00192                 Verify.AreEqual("0", edit.GetTextSelection());
00193
00194                 Log.Comment("Verify that setting the value through UIA changes the textbox text");
00195                 numBox.SetValue(10);
00196                 Wait.ForIdle();
00197                 Verify.AreEqual("10", edit.GetText());
00198
00199                 Log.Comment("Verify that setting the text programmatically changes the value and textbox text");
00200                 Button button = FindElement.ByName<Button>("SetTextButton");
00201                 button.InvokeAndWait();
00202                 Verify.AreEqual(15, numBox.Value);
00203                 Verify.AreEqual("15", edit.GetText());
00204
00205                 Log.Comment("Verify that even if the value doesn't change, the textbox text is updated");
00206                 EnterText(numBox, " 15 ");
00207                 Verify.AreEqual("15", edit.GetText());
00208
00209                 Log.Comment("Verify that there is no rounding error for value 25.8");
00210                 EnterText(numBox, "25.8");
00211                 Verify.AreEqual("25.8", edit.GetText());
00212
00213                 Log.Comment("Verify that there is no rounding error for value 0.0001");
00214                 EnterText(numBox, "0.0001");
00215                 Verify.AreEqual("0.0001", edit.GetText());
00216
00217                 Log.Comment("Verify that there is no rounding error for value 294.1");
00218                 EnterText(numBox, "294.1");
00219                 Verify.AreEqual("294.1", edit.GetText());
00220
00221                 Log.Comment("Verify that there is no rounding error for value 2924.8");
00222                 EnterText(numBox, "2924.8");
00223                 Verify.AreEqual("2924.8", edit.GetText());
00224
00225                 Log.Comment("Verify that there is no rounding error for value 1.01");
00226                 EnterText(numBox, "1.01");
00227                 Verify.AreEqual("1.01", edit.GetText());
00228
00229                 Log.Comment("Verify that there is no rounding error for value 0.03");
00230                 EnterText(numBox, "0.03");
00231                 Verify.AreEqual("0.03", edit.GetText());
00232             }
00233         }
00234
00235         [TestMethod]
00236         public void MinMaxTest()
00237         {
00238             using (var setup = new TestSetupHelper("NumberBox Tests"))
00239             {
00240                 Check("MinCheckBox");
00241                 Check("MaxCheckBox");
00242
00243                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00244                 Verify.AreEqual(0, numBox.Minimum);
00245                 Verify.AreEqual(100, numBox.Maximum);
00246
00247                 numBox.SetValue(10);
00248                 Wait.ForIdle();
00249
00250                 Log.Comment("Verify that setting the value to -1 changes the value to 0");
00251                 numBox.SetValue(-1);
00252                 Wait.ForIdle();
00253                 Verify.AreEqual(0, numBox.Value);
00254
00255                 Log.Comment("Verify that typing '123' in the NumberBox changes the value to 100");
00256                 EnterText(numBox, "123");
00257                 Verify.AreEqual(100, numBox.Value);
00258
00259                 Log.Comment("Changing Max to 90; verify value also changes to 90");
00260                 RangeValueSpinner maxBox = FindElement.ByName<RangeValueSpinner>("MaxNumberBox");
00261                 EnterText(maxBox, "90");
00262                 Verify.AreEqual(90, numBox.Value);
00263
00264                 Log.Comment("Verify that setting the minimum above the maximum changes the maximum");
00265                 RangeValueSpinner minBox = FindElement.ByName<RangeValueSpinner>("MinNumberBox");
00266                 EnterText(minBox, "200");
00267                 Verify.AreEqual(200, numBox.Minimum);
00268                 Verify.AreEqual(200, numBox.Maximum);
00269                 Verify.AreEqual(200, numBox.Value);
00270
00271                 Log.Comment("Verify that setting the maximum below the minimum changes the minimum");
00272                 EnterText(maxBox, "150");
00273                 Verify.AreEqual(150, numBox.Minimum);
00274                 Verify.AreEqual(150, numBox.Maximum);
00275                 Verify.AreEqual(150, numBox.Value);
00276             }
00277         }
00278
00279         [TestMethod]
00280         public void BasicKeyboardTest()
00281         {
00282             using (var setup = new TestSetupHelper("NumberBox Tests"))
00283             {
00284                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00285
00286                 Log.Comment("Verify that loss of focus validates textbox contents");
00287                 EnterText(numBox, "8", false);
00288                 KeyboardHelper.PressKey(Key.Tab);
00289                 Wait.ForIdle();
00290                 Verify.AreEqual(8, numBox.Value);
00291
00292                 Log.Comment("Verify that whitespace around a number still evaluates to the number");
00293                 EnterText(numBox, "  75 ", true);
00294                 Wait.ForIdle();
00295                 Verify.AreEqual(75, numBox.Value);
00296
00297                 Log.Comment("Verify that pressing escape cancels entered text");
00298                 EnterText(numBox, "3", false);
00299                 KeyboardHelper.PressKey(Key.Escape);
00300                 Wait.ForIdle();
00301                 Verify.AreEqual(75, numBox.Value);
00302
00303                 Log.Comment("Verify that pressing up arrow increases the value");
00304                 KeyboardHelper.PressKey(Key.Up);
00305                 Wait.ForIdle();
00306                 Verify.AreEqual(76, numBox.Value);
00307
00308                 Log.Comment("Verify that pressing down arrow decreases the value");
00309                 KeyboardHelper.PressKey(Key.Down);
00310                 Wait.ForIdle();
00311                 Verify.AreEqual(75, numBox.Value);
00312
00313                 Log.Comment("Verify that pressing PageUp key increases value by 10");
00314                 KeyboardHelper.PressKey(Key.PageUp);
00315                 Wait.ForIdle();
00316                 Verify.AreEqual(85, numBox.Value);
00317             }
00318         }
00319
00320         [TestMethod]
00321         public void GamepadTest()
00322         {
00323             using (var setup = new TestSetupHelper("NumberBox Tests"))
00324             {
00325                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00326
00327                 Log.Comment("Verify that pressing A validates textbox contents");
00328                 EnterText(numBox, "8", false);
00329                 GamepadHelper.PressButton(numBox, GamepadButton.A);
00330                 Wait.ForIdle();
00331                 Verify.AreEqual(8, numBox.Value);
00332
00333                 Log.Comment("Verify that pressing B cancels entered text");
00334                 EnterText(numBox, "3", false);
00335                 GamepadHelper.PressButton(numBox, GamepadButton.B);
00336                 Wait.ForIdle();
00337                 Verify.AreEqual(8, numBox.Value);
00338             }
00339         }
00340
00341         [TestMethod]
00342         public void ScrollTest()
00343         {
00344             using (var setup = new TestSetupHelper("NumberBox Tests"))
00345             {
00346                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00347                 numBox.SetValue(0);
00348                 Wait.ForIdle();
00349
00350                 Log.Comment("Verify that scroll doesn't work when the control doesn't have focus.");
00351                 FindElement.ByName("MaxCheckBox").SetFocus();
00352                 Wait.ForIdle();
00353                 InputHelper.RotateWheel(numBox, 1);
00354                 Wait.ForIdle();
00355                 Verify.AreEqual(0, numBox.Value);
00356
00357                 FindTextBox(numBox).SetFocus();
00358                 Wait.ForIdle();
00359
00360                 InputHelper.RotateWheel(FindTextBox(numBox), 1);
00361                 InputHelper.RotateWheel(FindTextBox(numBox), 1);
00362                 Wait.ForIdle();
00363                 Verify.AreEqual(2, numBox.Value);
00364
00365                 InputHelper.RotateWheel(FindTextBox(numBox), -1);
00366                 InputHelper.RotateWheel(FindTextBox(numBox), -1);
00367                 InputHelper.RotateWheel(FindTextBox(numBox), -1);
00368                 Wait.ForIdle();
00369                 Verify.AreEqual(-1, numBox.Value);
00370
00371                 // Testing for 1705
00372                 RangeValueSpinner numBoxInScrollViewer = FindElement.ByName<RangeValueSpinner>("NumberBoxInScroller");
00373                 numBoxInScrollViewer.SetValue(0);
00374                 Wait.ForIdle();
00375                 FindTextBox(numBoxInScrollViewer).SetFocus();
00376                 InputHelper.RotateWheel(numBoxInScrollViewer, 1);
00377                 InputHelper.RotateWheel(numBoxInScrollViewer, 1);
00378                 Wait.ForIdle();
00379                 Verify.AreEqual(2, numBoxInScrollViewer.Value);
00380
00381                 TextBlock vertOffset = FindElement.ByName<TextBlock>("VerticalOffsetDisplayBlock");
00382                 Verify.AreEqual("0", vertOffset.GetText());
00383
00384             }
00385         }
00386
00387         [TestMethod]
00388         public void CustomFormatterTest()
00389         {
00390             using (var setup = new TestSetupHelper("NumberBox Tests"))
00391             {
00392                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00393                 numBox.SetValue(8);
00394                 Wait.ForIdle();
00395                 Edit edit = FindTextBox(numBox);
00396                 Verify.AreEqual("8", edit.GetText());
00397
00398                 Button button = FindElement.ByName<Button>("CustomFormatterButton");
00399                 button.InvokeAndWait();
00400
00401                 Verify.AreEqual("8,00", edit.GetText());
00402
00403                 Log.Comment("Verify that using a formatter with a different decimal symbol works as expected.");
00404                 EnterText(numBox, "7,45");
00405                 Verify.AreEqual(7.45, numBox.Value);
00406             }
00407         }
00408
00409         [TestMethod]
00410         public void ValidationDisabledTest()
00411         {
00412             using (var setup = new TestSetupHelper("NumberBox Tests"))
00413             {
00414                 ComboBox validationComboBox = FindElement.ByName<ComboBox>("ValidationComboBox");
00415                 validationComboBox.SelectItemByName("Disabled");
00416                 Wait.ForIdle();
00417
00418                 Check("MinCheckBox");
00419                 Check("MaxCheckBox");
00420
00421                 Log.Comment("Verify that numbers outside the range can be set if validation is disabled.");
00422                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00423                 numBox.SetValue(-10);
00424                 Wait.ForIdle();
00425                 Verify.AreEqual(-10, numBox.Value);
00426
00427                 numBox.SetValue(150);
00428                 Wait.ForIdle();
00429                 Verify.AreEqual(150, numBox.Value);
00430             }
00431         }
00432
00433         [TestMethod]
00434         public void ValueChangedTest()
00435         {
00436             using (var setup = new TestSetupHelper("NumberBox Tests"))
00437             {
00438                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00439
00440                 TextBlock newValueTextBlock = FindElement.ByName<TextBlock>("NewValueTextBox");
00441                 TextBlock oldValueTextBlock = FindElement.ByName<TextBlock>("OldValueTextBox");
00442                 TextBlock textTextBlock = FindElement.ByName<TextBlock>("TextTextBox");
00443
00444                 Check("MinCheckBox");
00445                 Check("MaxCheckBox");
00446
00447                 Log.Comment("Verify that entering a new number fires ValueChanged event.");
00448                 EnterText(numBox, "12");
00449                 Verify.AreEqual("12", textTextBlock.GetText());
00450                 Verify.AreEqual("12", newValueTextBlock.GetText());
00451                 Verify.AreEqual("NaN",  oldValueTextBlock.GetText());
00452
00453                 Log.Comment("Verify that setting value through UIA fires ValueChanged event.");
00454                 Button button = FindElement.ByName<Button>("SetValueButton");
00455                 button.InvokeAndWait();
00456                 Verify.AreEqual("42", textTextBlock.GetText());
00457                 Verify.AreEqual("42", newValueTextBlock.GetText());
00458                 Verify.AreEqual("12", oldValueTextBlock.GetText());
00459
00460                 Log.Comment("Verify that setting value below min gives proper values.");
00461                 EnterText(numBox, "-5");
00462                 Verify.AreEqual("0", textTextBlock.GetText());
00463                 Verify.AreEqual("0", newValueTextBlock.GetText());
00464                 Verify.AreEqual("42", oldValueTextBlock.GetText());
00465
00466                 Log.Comment("Verify that setting value above max gives proper values.");
00467                 EnterText(numBox, "150");
00468                 Verify.AreEqual("100", textTextBlock.GetText());
00469                 Verify.AreEqual("100", newValueTextBlock.GetText());
00470                 Verify.AreEqual("0", oldValueTextBlock.GetText());
00471
00472                 Log.Comment("Verify that setting text to an empty string sets value to NaN.");
00473                 EnterText(numBox, "");
00474                 Verify.AreEqual("", textTextBlock.GetText());
00475                 Verify.AreEqual("NaN", newValueTextBlock.GetText());
00476                 Verify.AreEqual("100", oldValueTextBlock.GetText());
00477
00478                 Log.Comment("Verify that setting two way bound value to NaN doesn't cause a crash");
00479                 Button twoWayBindNanbutton = FindElement.ByName<Button>("SetTwoWayBoundValueNaNButton");
00480                 twoWayBindNanbutton.InvokeAndWait();
00481                 TextBlock twoWayBoundNumberBoxValue = FindElement.ByName<TextBlock>("TwoWayBoundNumberBoxValue");
00482                 Verify.AreEqual("NaN", twoWayBoundNumberBoxValue.GetText());
00483
00484                 Log.Comment("Verify that setting value to NaN doesn't have any effect");
00485                 Button nanbutton = FindElement.ByName<Button>("SetValueNaNButton");
00486                 nanbutton.InvokeAndWait();
00487                 Verify.AreEqual("", textTextBlock.GetText());
00488                 Verify.AreEqual("NaN", newValueTextBlock.GetText());
00489                 Verify.AreEqual("100", oldValueTextBlock.GetText());
00490             }
00491         }
00492
00493         [TestMethod]
00494         public void BasicExpressionTest()
00495         {
00496             using (var setup = new TestSetupHelper("NumberBox Tests"))
00497             {
00498                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00499                 numBox.SetValue(0);
00500
00501                 Log.Comment("Verify that expressions don't work if AcceptsExpression is false");
00502                 EnterText(numBox, "5 + 3");
00503                 Verify.AreEqual(0, numBox.Value);
00504
00505                 Check("ExpressionCheckBox");
00506
00507                 int numErrors = 0;
00508                 const double resetValue = 1234;
00509
00510                 Dictionary<string, double> expressions = new Dictionary<string, double>
00511                 {
00512                     // Valid expressions. None of these should evaluate to the reset value.
00513                     { "5", 5 },
00514                     { "-358", -358 },
00515                     { "12.34", 12.34 },
00516                     { "5 + 3", 8 },
00517                     { "12345 + 67 + 890", 13302 },
00518                     { "000 + 0011", 11 },
00519                     { "5 - 3 + 2", 4 },
00520                     { "3 + 2 - 5", 0 },
00521                     { "9 - 2 * 6 / 4", 6 },
00522                     { "9 - -7",  16 },
00523                     { "9-3*2", 3 },         // no spaces
00524                     { " 10  *   6  ", 60 }, // extra spaces
00525                     { "10 /( 2 + 3 )", 2 },
00526                     { "5 * -40", -200 },
00527                     { "(1 - 4) / (2 + 1)", -1 },
00528                     { "3 * ((4 + 8) / 2)", 18 },
00529                     { "23 * ((0 - 48) / 8)", -138 },
00530                     { "((74-71)*2)^3", 216 },
00531                     { "2 - 2 ^ 3", -6 },
00532                     { "2 ^ 2 ^ 2 / 2 + 9", 17 },
00533                     { "5 ^ -2", 0.04 },
00534                     { "5.09 + 14.333", 19.423 },
00535                     { "2.5 * 0.35", 0.875 },
00536                     { "-2 - 5", -7 },       // begins with negative number
00537                     { "(10)", 10 },         // number in parens
00538                     { "(-9)", -9 },         // negative number in parens
00539                     { "0^0", 1 },           // who knew?
00540
00541                     // These should not parse, which means they will reset back to the previous value.
00542                     { "5x + 3y", resetValue },        // invalid chars
00543                     { "5 + (3", resetValue },         // mismatched parens
00544                     { "9 + (2 + 3))", resetValue },
00545                     { "(2 + 3)(1 + 5)", resetValue }, // missing operator
00546                     { "9 + + 7", resetValue },        // extra operators
00547                     { "9 - * 7",  resetValue },
00548                     { "9 - - 7",  resetValue },
00549                     { "+9", resetValue },
00550                     { "1 / 0", resetValue },          // divide by zero
00551
00552                     // These don't currently work, but maybe should.
00553                     { "-(3 + 5)", resetValue }, // negative sign in front of parens -- should be -8
00554                 };
00555                 foreach (KeyValuePair<string, double> pair in expressions)
00556                 {
00557                     numBox.SetValue(resetValue);
00558                     Wait.ForIdle();
00559
00560                     EnterText(numBox, pair.Key);
00561                     string output = "Expression '" + pair.Key + "' - expected: " + pair.Value + ", actual: " + numBox.Value;
00562                     if (Math.Abs(pair.Value - numBox.Value) > 0.00001)
00563                     {
00564                         numErrors++;
00565                         Log.Warning(output);
00566                     }
00567                     else
00568                     {
00569                         Log.Comment(output);
00570                     }
00571                 }
00572
00573                 Verify.AreEqual(0, numErrors);
00574             }
00575         }
00576
00577         [TestMethod]
00578         public void VerifyNumberBoxHeaderBehavior()
00579         {
00580             using (var setup = new TestSetupHelper("NumberBox Tests"))
00581             {
00582                 var headerBeforeApplyTemplate = FindElement.ByName<TextBlock>("HeaderBeforeApplyTemplateTest");
00583                 Verify.IsNotNull(headerBeforeApplyTemplate);
00584
00585                 var headerTemplateBeforeApplyTemplate = FindElement.ByName<TextBlock>("HeaderTemplateBeforeApplayTemplateTest");
00586                 Verify.IsNotNull(headerBeforeApplyTemplate);
00587
00588                 var toggleHeaderButton = FindElement.ByName<Button>("ToggleHeaderValueButton");
00589                 var header = FindElement.ByName<TextBlock>("NumberBoxHeaderClippingDemoHeader");
00590
00591                 Log.Comment("Check header is null");
00592                 Verify.IsNull(header);
00593
00594                 Log.Comment("Set header");
00595                 toggleHeaderButton.Invoke();
00596                 Wait.ForIdle();
00597
00598                 header = FindElement.ByName<TextBlock>("NumberBoxHeaderClippingDemoHeader");
00599                 Log.Comment("Check if header is present");
00600                 Verify.IsNotNull(header);
00601                 Log.Comment("Remove header");
00602                 toggleHeaderButton.Invoke();
00603                 Wait.ForIdle();
00604                 ElementCache.Clear();
00605
00606                 Log.Comment("Check that header is null again");
00607                 header = FindElement.ByName<TextBlock>("NumberBoxHeaderClippingDemoHeader");
00608                 Verify.IsNull(header);
00609
00610
00611                 var toggleHeaderTemplateButton = FindElement.ByName<Button>("ToggleHeaderTemplateValueButton");
00612                 var headerTemplate = FindElement.ByName<TextBlock>("HeaderTemplateTestingBlock");
00613
00614                 Verify.IsNull(headerTemplate);
00615
00616                 toggleHeaderTemplateButton.Invoke();
00617                 Wait.ForIdle();
00618
00619                 headerTemplate = FindElement.ByName<TextBlock>("HeaderTemplateTestingBlock");
00620                 Verify.IsNotNull(headerTemplate);
00621             }
00622         }
00623
00624         [TestMethod]
00625         public void VerifyRightClickForContextMenuDoesNotDeselectText()
00626         {
00627             using (var setup = new TestSetupHelper("NumberBox Tests"))
00628             {
00629                 RangeValueSpinner numBox = FindElement.ByName<RangeValueSpinner>("TestNumberBox");
00630                 numBox.SetValue(0);
00631
00632                 Log.Comment("Verify that focusing the NumberBox selects the text");
00633                 numBox.SetFocus();
00634                 Wait.ForIdle();
00635                 Wait.ForSeconds(3);
00636                 Edit edit = FindTextBox(numBox);
00637                 Verify.AreEqual("0", edit.GetTextSelection());
00638
00639                 Log.Comment("Verify that right-clicking on the NumberBox's input field (to bring up the context menu) does not clear the selection");
00640                 // (15, 15): Just some offset large enough to make sure the right-click below will actually bring up the context menu
00641                 InputHelper.RightClick(edit, 15, 15);
00642                 Wait.ForIdle();
00643
00644                 Verify.AreEqual("0", edit.GetTextSelection());
00645             }
00646         }
00647
00648         [TestMethod]
00649         public void VerifyAxeScanPasses()
00650         {
00651             using (var setup = new TestSetupHelper("NumberBox-Axe"))
00652             {
00653                 AxeTestHelper.TestForAxeIssues();
00654             }
00655         }
00656
00657         Button FindButton(UIObject parent, string buttonName)
00658         {
00659             foreach (UIObject elem in parent.Children)
00660             {
00661                 if (elem.Name.Equals(buttonName))
00662                 {
00663                     return new Button(elem);
00664                 }
00665             }
00666             Log.Comment("Did not find " + buttonName + " button for object " + parent.Name);
00667             return null;
00668         }
00669
00670         Edit FindTextBox(UIObject parent)
00671         {
00672             foreach (UIObject elem in parent.Children)
00673             {
00674                 if (elem.ClassName.Equals("TextBox"))
00675                 {
00676                     return new Edit(elem);
00677                 }
00678             }
00679             Log.Comment("Did not find TextBox for object " + parent.Name);
00680             return null;
00681         }
00682
00683         void Check(string checkboxName)
00684         {
00685             CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
00686             checkBox.Check();
00687             Wait.ForIdle();
00688         }
00689
00690         void Uncheck(string checkboxName)
00691         {
00692             CheckBox checkBox = FindElement.ByName<CheckBox>(checkboxName);
00693             checkBox.Uncheck();
00694             Wait.ForIdle();
00695         }
00696
00697         void EnterText(RangeValueSpinner numBox, string text, bool pressEnter = true)
00698         {
00699             Edit edit = FindTextBox(numBox);
00700             if (edit != null)
00701             {
00702                 KeyboardHelper.EnterText(edit, text);
00703                 if (pressEnter)
00704                 {
00705                     KeyboardHelper.PressKey(Key.Enter);
00706                 }
00707                 Wait.ForIdle();
00708             }
00709         }
00710     }
00711 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewBringIntoViewOperation.cpp Source File

  • File List
  • File Members
  • ScrollView

ScrollViewBringIntoViewOperation.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "ScrollViewBringIntoViewOperation.h"
00006 #include "ScrollViewTrace.h"
00007
00008 ScrollViewBringIntoViewOperation::ScrollViewBringIntoViewOperation(winrt::UIElement const& targetElement, bool cancelBringIntoView)
00009 {
00010     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, targetElement);
00011
00012     m_targetElement = winrt::make_weak(targetElement);
00013     m_cancelBringIntoView = cancelBringIntoView;
00014 }
00015
00016 ScrollViewBringIntoViewOperation::~ScrollViewBringIntoViewOperation()
00017 {
00018     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, m_targetElement.get(), m_ticksCount);
00019 }
00020
00021 bool ScrollViewBringIntoViewOperation::HasMaxTicksCount() const
00022 {
00023     MUX_ASSERT(m_ticksCount <= s_maxTicksCount);
00024
00025     return m_ticksCount == s_maxTicksCount;
00026 }
00027
00028 winrt::UIElement ScrollViewBringIntoViewOperation::TargetElement() const
00029 {
00030     return m_targetElement.get();
00031 }
00032
00033 int8_t ScrollViewBringIntoViewOperation::TicksCount() const
00034 {
00035     return m_ticksCount;
00036 }
00037
00038 int8_t ScrollViewBringIntoViewOperation::TickOperation()
00039 {
00040     SCROLLVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, m_targetElement.get(), m_ticksCount);
00041
00042     MUX_ASSERT(m_ticksCount < s_maxTicksCount);
00043
00044     return ++m_ticksCount;
00045 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/GroupedItemsControlPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

GroupedItemsControlPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Text;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Data;
00009 using Microsoft.UI.Xaml.Input;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Media.Imaging;
00012 using Microsoft.UI.Xaml.Navigation;
00013 using MUXControlsTestApp.Samples.Model;
00014 using System;
00015 using System.Collections.Generic;
00016 using System.Collections.ObjectModel;
00017 using System.Linq;
00018
00019 namespace MUXControlsTestApp
00020 {
00021     public sealed partial class GroupedItemsControlPage : TestPage
00022     {
00023         private GroupedItemsControlViewModel _groupedItemsControlViewModel = new GroupedItemsControlViewModel();
00024         private CollectionViewSource _cvs = new CollectionViewSource();
00025         private DataTemplate[] _headerTemplates = new DataTemplate[3];
00026         private DataTemplate[] _itemTemplates = new DataTemplate[3];
00027
00028         public GroupedItemsControlPage()
00029         {
00030             this.InitializeComponent();
00031
00032             _cvs.Source = _groupedItemsControlViewModel.Items;
00033             _cvs.IsSourceGrouped = true;
00034             _cvs.ItemsPath = new PropertyPath("Items");
00035
00036             Loaded += GroupedItemsControlPage_Loaded;
00037         }
00038
00039         protected override void OnNavigatedTo(NavigationEventArgs e)
00040         {
00041             itemsControl.ItemsSource = _cvs.View;
00042
00043             if (cmbItemsControlItemsPanelType != null)
00044             {
00045                 cmbItemsControlItemsPanelType.SelectedIndex = 0;
00046             }
00047
00048             base.OnNavigatedTo(e);
00049         }
00050
00051         private void GroupedItemsControlPage_Loaded(object sender, RoutedEventArgs e)
00052         {
00053             UpdateItemsPanelType();
00054             UpdateItemsControlProperties();
00055         }
00056
00057         private void UpdateItemsWrapGridUIVisibility(Visibility visibility)
00058         {
00059             tblItemsWrapGridProperties.Visibility = visibility;
00060             tblItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
00061             nbItemsWrapGridMaximumRowsOrColumns.Visibility = visibility;
00062             tblItemsWrapGridItemWidth.Visibility = visibility;
00063             txtItemsWrapGridItemWidth.Visibility = visibility;
00064             btnGetItemsWrapGridItemWidth.Visibility = visibility;
00065             btnSetItemsWrapGridItemWidth.Visibility = visibility;
00066             tblItemsWrapGridItemHeight.Visibility = visibility;
00067             txtItemsWrapGridItemHeight.Visibility = visibility;
00068             btnGetItemsWrapGridItemHeight.Visibility = visibility;
00069             btnSetItemsWrapGridItemHeight.Visibility = visibility;
00070         }
00071
00072         private void UpdateItemsPanelType()
00073         {
00074             try
00075             {
00076                 if (itemsControl != null && cmbItemsControlItemsPanelType != null)
00077                 {
00078                     switch (cmbItemsControlItemsPanelType.SelectedIndex)
00079                     {
00080                         case 0: // Use the wrapGridItemsPanelTemplate resource
00081                             itemsControl.ItemsPanel = Resources["itemsWrapGridItemsPanelTemplate"] as ItemsPanelTemplate;
00082                             UpdateItemsWrapGridUIVisibility(Visibility.Visible);
00083                             break;
00084                         case 1: // Use the stackPanelItemsPanelTemplate resource
00085                             itemsControl.ItemsPanel = Resources["itemsStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
00086                             UpdateItemsWrapGridUIVisibility(Visibility.Collapsed);
00087                             break;
00088                         case 2: // Use the virtualizingStackPanelItemsPanelTemplate resource
00089                             itemsControl.ItemsPanel = Resources["virtualizingStackPanelItemsPanelTemplate"] as ItemsPanelTemplate;
00090                             UpdateItemsWrapGridUIVisibility(Visibility.Collapsed);
00091                             break;
00092                     }
00093
00094                     // itemsControl.ItemsPanelRoot is only updated asynchronously.
00095                     _ = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, UpdateItemsPanelProperties);
00096                 }
00097             }
00098             catch (Exception ex)
00099             {
00100                 txtExceptionReport.Text = ex.ToString();
00101                 AppendEventMessage(ex.ToString());
00102             }
00103         }
00104
00105         private void UpdateItemsPanelProperties()
00106         {
00107             UpdateItemsPanelOrientation();
00108             UpdateItemsPanelGroupHeaderPlacement();
00109             UpdateItemsPanelMargin();
00110             UpdateItemsPanelGroupPadding();
00111             UpdateItemsPanelAreStickyGroupHeadersEnabled();
00112             UpdateItemsWrapGridCacheLength();
00113             UpdateItemsWrapGridItemWidth();
00114             UpdateItemsWrapGridItemHeight();
00115         }
00116
00117         private void UpdateItemsControlProperties()
00118         {
00119             UpdateItemsControlIsTabStop();
00120             UpdateItemsControlHeaderTemplate();
00121             UpdateItemsControlItemTemplate();
00122             UpdateItemsControlTabNavigation();
00123             UpdateItemsControlXYFocusKeyboardNavigation();
00124         }
00125
00126         private void UpdateItemsControlIsTabStop()
00127         {
00128             if (itemsControl != null && chkItemsControlIsTabStop != null)
00129             {
00130                 chkItemsControlIsTabStop.IsChecked = itemsControl.IsTabStop;
00131             }
00132         }
00133
00134         private void UpdateItemsControlTabNavigation()
00135         {
00136             if (itemsControl != null && cmbItemsControlTabNavigation != null)
00137             {
00138                 cmbItemsControlTabNavigation.SelectedIndex = (int)itemsControl.TabNavigation;
00139             }
00140         }
00141
00142         private void UpdateItemsControlXYFocusKeyboardNavigation()
00143         {
00144             if (itemsControl != null && cmbItemsControlXYFocusKeyboardNavigation != null)
00145             {
00146                 cmbItemsControlXYFocusKeyboardNavigation.SelectedIndex = (int)itemsControl.XYFocusKeyboardNavigation;
00147             }
00148         }
00149
00150         private void UpdateItemsControlHeaderTemplate()
00151         {
00152             try
00153             {
00154                 if (itemsControl != null && cmbItemsControlHeaderTemplate != null)
00155                 {
00156                     if (cmbItemsControlHeaderTemplate.SelectedIndex == 0)
00157                     {
00158                         if (itemsControl.GroupStyle.Count > 0)
00159                         {
00160                             itemsControl.GroupStyle[0].HeaderTemplate = null;
00161                         }
00162                     }
00163                     else
00164                     {
00165                         int templateIndex = cmbItemsControlHeaderTemplate.SelectedIndex - 1;
00166
00167                         if (_headerTemplates[templateIndex] == null)
00168                         {
00169                             _headerTemplates[templateIndex] = Resources["headerTemplate" + cmbItemsControlHeaderTemplate.SelectedIndex.ToString()] as DataTemplate;
00170                         }
00171
00172                         if (itemsControl.GroupStyle.Count == 0)
00173                         {
00174                             itemsControl.GroupStyle.Add(new GroupStyle());
00175                         }
00176
00177                         itemsControl.GroupStyle[0].HeaderTemplate = _headerTemplates[templateIndex];
00178                     }
00179                 }
00180             }
00181             catch (Exception ex)
00182             {
00183                 txtExceptionReport.Text = ex.ToString();
00184                 AppendEventMessage(ex.ToString());
00185             }
00186         }
00187
00188         private void UpdateItemsControlItemTemplate()
00189         {
00190             try
00191             {
00192                 if (itemsControl != null && cmbItemsControlItemTemplate != null)
00193                 {
00194                     if (cmbItemsControlItemTemplate.SelectedIndex == 0)
00195                     {
00196                         itemsControl.ItemTemplate = null;
00197                     }
00198                     else
00199                     {
00200                         int templateIndex = cmbItemsControlItemTemplate.SelectedIndex - 1;
00201
00202                         if (_itemTemplates[templateIndex] == null)
00203                         {
00204                             _itemTemplates[templateIndex] = Resources["itemTemplate" + cmbItemsControlItemTemplate.SelectedIndex.ToString()] as DataTemplate;
00205                         }
00206
00207                         itemsControl.ItemTemplate = _itemTemplates[templateIndex];
00208                     }
00209                 }
00210             }
00211             catch (Exception ex)
00212             {
00213                 txtExceptionReport.Text = ex.ToString();
00214                 AppendEventMessage(ex.ToString());
00215             }
00216         }
00217
00218         private void UpdateItemsPanelOrientation()
00219         {
00220             try
00221             {
00222                 if (itemsControl != null && cmbItemsPanelOrientation != null)
00223                 {
00224                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00225
00226                     if (itemsWrapGrid != null)
00227                     {
00228                         cmbItemsPanelOrientation.SelectedIndex = (int)itemsWrapGrid.Orientation;
00229                     }
00230                     else
00231                     {
00232                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00233
00234                         if (itemsStackPanel != null)
00235                         {
00236                             cmbItemsPanelOrientation.SelectedIndex = (int)itemsStackPanel.Orientation;
00237                         }
00238                         else
00239                         {
00240                             VirtualizingStackPanel virtualizingStackPanel = itemsControl.ItemsPanelRoot as VirtualizingStackPanel;
00241
00242                             if (virtualizingStackPanel != null)
00243                             {
00244                                 cmbItemsPanelOrientation.SelectedIndex = (int)virtualizingStackPanel.Orientation;
00245                             }
00246                         }
00247                     }
00248                 }
00249             }
00250             catch (Exception ex)
00251             {
00252                 txtExceptionReport.Text = ex.ToString();
00253                 AppendEventMessage(ex.ToString());
00254             }
00255         }
00256
00257         private void UpdateItemsPanelGroupHeaderPlacement()
00258         {
00259             try
00260             {
00261                 if (itemsControl != null && cmbItemsPanelGroupHeaderPlacement != null)
00262                 {
00263                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00264
00265                     if (itemsWrapGrid != null)
00266                     {
00267                         cmbItemsPanelGroupHeaderPlacement.SelectedIndex = (int)itemsWrapGrid.GroupHeaderPlacement;
00268                     }
00269                     else
00270                     {
00271                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00272
00273                         if (itemsStackPanel != null)
00274                         {
00275                             cmbItemsPanelGroupHeaderPlacement.SelectedIndex = (int)itemsStackPanel.GroupHeaderPlacement;
00276                         }
00277                     }
00278                 }
00279             }
00280             catch (Exception ex)
00281             {
00282                 txtExceptionReport.Text = ex.ToString();
00283                 AppendEventMessage(ex.ToString());
00284             }
00285         }
00286
00287         private void UpdateItemsPanelMargin()
00288         {
00289             try
00290             {
00291                 if (itemsControl != null && txtItemsPanelMargin != null)
00292                 {
00293                     Panel itemsPanel = itemsControl.ItemsPanelRoot;
00294
00295                     if (itemsPanel != null)
00296                     {
00297                         txtItemsPanelMargin.Text = itemsPanel.Margin.ToString();
00298                     }
00299                 }
00300             }
00301             catch (Exception ex)
00302             {
00303                 txtExceptionReport.Text = ex.ToString();
00304                 AppendEventMessage(ex.ToString());
00305             }
00306         }
00307
00308         private void UpdateItemsPanelGroupPadding()
00309         {
00310             try
00311             {
00312                 if (itemsControl != null && txtItemsPanelGroupPadding != null)
00313                 {
00314                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00315
00316                     if (itemsWrapGrid != null)
00317                     {
00318                         txtItemsPanelGroupPadding.Text = itemsWrapGrid.GroupPadding.ToString();
00319                     }
00320                     else
00321                     {
00322                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00323
00324                         if (itemsStackPanel != null)
00325                         {
00326                             txtItemsPanelGroupPadding.Text = itemsStackPanel.GroupPadding.ToString();
00327                         }
00328                     }
00329                 }
00330             }
00331             catch (Exception ex)
00332             {
00333                 txtExceptionReport.Text = ex.ToString();
00334                 AppendEventMessage(ex.ToString());
00335             }
00336         }
00337
00338         private void UpdateItemsPanelAreStickyGroupHeadersEnabled()
00339         {
00340             try
00341             {
00342                 if (itemsControl != null && chkItemsPanelAreStickyGroupHeadersEnabled != null)
00343                 {
00344                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00345
00346                     if (itemsWrapGrid != null)
00347                     {
00348                         chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked = itemsWrapGrid.AreStickyGroupHeadersEnabled;
00349                     }
00350                     else
00351                     {
00352                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00353
00354                         if (itemsStackPanel != null)
00355                         {
00356                             chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked = itemsStackPanel.AreStickyGroupHeadersEnabled;
00357                         }
00358                     }
00359                 }
00360             }
00361             catch (Exception ex)
00362             {
00363                 txtExceptionReport.Text = ex.ToString();
00364                 AppendEventMessage(ex.ToString());
00365             }
00366         }
00367
00368         private void UpdateItemsWrapGridCacheLength()
00369         {
00370             try
00371             {
00372                 if (itemsControl != null && txtItemsWrapGridCacheLength != null)
00373                 {
00374                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00375
00376                     if (itemsWrapGrid != null)
00377                     {
00378                         txtItemsWrapGridCacheLength.Text = itemsWrapGrid.CacheLength.ToString();
00379                     }
00380                 }
00381             }
00382             catch (Exception ex)
00383             {
00384                 txtExceptionReport.Text = ex.ToString();
00385                 AppendEventMessage(ex.ToString());
00386             }
00387         }
00388
00389         private void UpdateItemsWrapGridItemWidth()
00390         {
00391             try
00392             {
00393                 if (itemsControl != null && txtItemsWrapGridItemWidth != null)
00394                 {
00395                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00396
00397                     if (itemsWrapGrid != null)
00398                     {
00399                         txtItemsWrapGridItemWidth.Text = itemsWrapGrid.ItemWidth.ToString();
00400                     }
00401                 }
00402             }
00403             catch (Exception ex)
00404             {
00405                 txtExceptionReport.Text = ex.ToString();
00406                 AppendEventMessage(ex.ToString());
00407             }
00408         }
00409
00410         private void UpdateItemsWrapGridItemHeight()
00411         {
00412             try
00413             {
00414                 if (itemsControl != null && txtItemsWrapGridItemHeight != null)
00415                 {
00416                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00417
00418                     if (itemsWrapGrid != null)
00419                     {
00420                         txtItemsWrapGridItemHeight.Text = itemsWrapGrid.ItemHeight.ToString();
00421                     }
00422                 }
00423             }
00424             catch (Exception ex)
00425             {
00426                 txtExceptionReport.Text = ex.ToString();
00427                 AppendEventMessage(ex.ToString());
00428             }
00429         }
00430
00431         private void BtnGetItemsControlTabNavigation_Click(object sender, RoutedEventArgs e)
00432         {
00433             UpdateItemsControlTabNavigation();
00434         }
00435
00436         private void BtnSetItemsControlTabNavigation_Click(object sender, RoutedEventArgs e)
00437         {
00438             if (itemsControl != null && cmbItemsControlTabNavigation != null)
00439             {
00440                 itemsControl.TabNavigation = (KeyboardNavigationMode)cmbItemsControlTabNavigation.SelectedIndex;
00441             }
00442         }
00443
00444         private void BtnGetItemsControlXYFocusKeyboardNavigation_Click(object sender, RoutedEventArgs e)
00445         {
00446             UpdateItemsControlXYFocusKeyboardNavigation();
00447         }
00448
00449         private void BtnSetItemsControlXYFocusKeyboardNavigation_Click(object sender, RoutedEventArgs e)
00450         {
00451             if (itemsControl != null && cmbItemsControlXYFocusKeyboardNavigation != null)
00452             {
00453                 itemsControl.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbItemsControlXYFocusKeyboardNavigation.SelectedIndex;
00454             }
00455         }
00456
00457         private void CmbItemsControlHeaderTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
00458         {
00459             UpdateItemsControlHeaderTemplate();
00460         }
00461
00462         private void CmbItemsControlItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
00463         {
00464             UpdateItemsControlItemTemplate();
00465         }
00466
00467         private void CmbItemsControlItemsPanelType_SelectionChanged(object sender, SelectionChangedEventArgs e)
00468         {
00469             UpdateItemsPanelType();
00470         }
00471
00472         private void ChkItemsControlIsTabStop_IsCheckedChanged(object sender, RoutedEventArgs e)
00473         {
00474             if (itemsControl != null && chkItemsControlIsTabStop != null)
00475             {
00476                 itemsControl.IsTabStop = (bool)chkItemsControlIsTabStop.IsChecked;
00477             }
00478         }
00479
00480         private void CmbItemsPresenterHeader_SelectionChanged(object sender, SelectionChangedEventArgs e)
00481         {
00482             try
00483             {
00484                 if (itemsControl != null && cmbItemsPresenterHeader != null)
00485                 {
00486                     ItemsPresenter itemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(itemsControl);
00487
00488                     if (itemsPresenter != null)
00489                     {
00490                         switch (cmbItemsPresenterHeader.SelectedIndex)
00491                         {
00492                             case 0: /*None*/
00493                                 itemsPresenter.Header = null;
00494                                 break;
00495                             case 1: /*No TabStop*/
00496                                 itemsPresenter.Header = new TextBlock()
00497                                 {
00498                                     FontSize = 22.0,
00499                                     FontWeight = FontWeights.Bold,
00500                                     Margin = new Thickness(10.0),
00501                                     Text = "ItemsPresenter Header"
00502                                 };
00503                                 break;
00504                             case 2: /*Single TabStop*/
00505                                 itemsPresenter.Header = new Button()
00506                                 {
00507                                     Content = "ItemsPresenter Header",
00508                                     FontSize = 22.0,
00509                                     Margin = new Thickness(10.0)
00510                                 };
00511                                 break;
00512                             case 3: /*Nested TabStops*/
00513                                 itemsPresenter.Header = new Button()
00514                                 {
00515                                     Content = new Button()
00516                                     {
00517                                         Content = "ItemsPresenter Header",
00518                                         Margin = new Thickness(10.0)
00519                                     },
00520                                     FontSize = 18.0,
00521                                     Margin = new Thickness(10.0)
00522                                 };
00523                                 break;
00524                         }
00525                     }
00526                 }
00527             }
00528             catch (Exception ex)
00529             {
00530                 txtExceptionReport.Text = ex.ToString();
00531                 AppendEventMessage(ex.ToString());
00532             }
00533         }
00534
00535         private void CmbItemsPresenterFooter_SelectionChanged(object sender, SelectionChangedEventArgs e)
00536         {
00537             try
00538             {
00539                 if (itemsControl != null && cmbItemsPresenterFooter != null)
00540                 {
00541                     ItemsPresenter itemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(itemsControl);
00542
00543                     if (itemsPresenter != null)
00544                     {
00545                         switch (cmbItemsPresenterFooter.SelectedIndex)
00546                         {
00547                             case 0: /*None*/
00548                                 itemsPresenter.Footer = null;
00549                                 break;
00550                             case 1: /*No TabStop*/
00551                                 itemsPresenter.Footer = new TextBlock()
00552                                 {
00553                                     FontSize = 22.0,
00554                                     FontWeight = FontWeights.Bold,
00555                                     Margin = new Thickness(10.0),
00556                                     Text = "ItemsPresenter Footer"
00557                                 };
00558                                 break;
00559                             case 2: /*Single TabStop*/
00560                                 itemsPresenter.Footer = new Button()
00561                                 {
00562                                     Content = "ItemsPresenter Footer",
00563                                     FontSize = 22.0,
00564                                     Margin = new Thickness(10.0)
00565                                 };
00566                                 break;
00567                             case 3: /*Nested TabStops*/
00568                                 itemsPresenter.Footer = new Button()
00569                                 {
00570                                     Content = new Button()
00571                                     {
00572                                         Content = "ItemsPresenter Footer",
00573                                         Margin = new Thickness(10.0)
00574                                     },
00575                                     FontSize = 18.0,
00576                                     Margin = new Thickness(10.0)
00577                                 };
00578                                 break;
00579                         }
00580                     }
00581                 }
00582             }
00583             catch (Exception ex)
00584             {
00585                 txtExceptionReport.Text = ex.ToString();
00586                 AppendEventMessage(ex.ToString());
00587             }
00588         }
00589
00590         private void ChkItemsPanelAreStickyGroupHeadersEnabled_IsCheckedChanged(object sender, RoutedEventArgs e)
00591         {
00592             try
00593             {
00594                 if (itemsControl != null)
00595                 {
00596                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00597
00598                     if (itemsWrapGrid != null)
00599                     {
00600                         itemsWrapGrid.AreStickyGroupHeadersEnabled = (bool)chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked;
00601                     }
00602                     else
00603                     {
00604                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00605
00606                         if (itemsStackPanel != null)
00607                         {
00608                             itemsStackPanel.AreStickyGroupHeadersEnabled = (bool)chkItemsPanelAreStickyGroupHeadersEnabled.IsChecked;
00609                         }
00610                     }
00611                 }
00612             }
00613             catch (Exception ex)
00614             {
00615                 txtExceptionReport.Text = ex.ToString();
00616                 AppendEventMessage(ex.ToString());
00617             }
00618         }
00619
00620         private void BtnGetItemsPanelOrientation_Click(object sender, RoutedEventArgs e)
00621         {
00622             UpdateItemsPanelOrientation();
00623         }
00624
00625         private void BtnSetItemsPanelOrientation_Click(object sender, RoutedEventArgs e)
00626         {
00627             try
00628             {
00629                 if (itemsControl != null && cmbItemsPanelOrientation != null)
00630                 {
00631                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00632
00633                     if (itemsWrapGrid != null)
00634                     {
00635                         if (itemsWrapGrid != null && itemsWrapGrid.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
00636                         {
00637                             itemsControl.ItemsSource = null;
00638
00639                             itemsWrapGrid.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
00640                         }
00641                     }
00642                     else
00643                     {
00644                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00645
00646                         if (itemsStackPanel != null)
00647                         {
00648                             if (itemsStackPanel != null && itemsStackPanel.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
00649                             {
00650                                 itemsControl.ItemsSource = null;
00651
00652                                 itemsStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
00653                             }
00654                         }
00655                         else
00656                         {
00657                             VirtualizingStackPanel virtualizingStackPanel = itemsControl.ItemsPanelRoot as VirtualizingStackPanel;
00658
00659                             if (virtualizingStackPanel != null && virtualizingStackPanel.Orientation != (Orientation)cmbItemsPanelOrientation.SelectedIndex)
00660                             {
00661                                 itemsControl.ItemsSource = null;
00662
00663                                 virtualizingStackPanel.Orientation = (Orientation)cmbItemsPanelOrientation.SelectedIndex;
00664                             }
00665                         }
00666                     }
00667
00668                     if (itemsControl.ItemsSource != _cvs.View)
00669                     {
00670                         itemsControl.ItemsSource = _cvs.View;
00671                     }
00672                 }
00673             }
00674             catch (Exception ex)
00675             {
00676                 txtExceptionReport.Text = ex.ToString();
00677                 AppendEventMessage(ex.ToString());
00678             }
00679         }
00680
00681         private void BtnGetItemsPanelGroupHeaderPlacement_Click(object sender, RoutedEventArgs e)
00682         {
00683             UpdateItemsPanelGroupHeaderPlacement();
00684         }
00685
00686         private void BtnSetItemsPanelGroupHeaderPlacement_Click(object sender, RoutedEventArgs e)
00687         {
00688             try
00689             {
00690                 if (itemsControl != null && cmbItemsPanelGroupHeaderPlacement != null)
00691                 {
00692                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00693
00694                     if (itemsWrapGrid != null)
00695                     {
00696                         itemsWrapGrid.GroupHeaderPlacement = (GroupHeaderPlacement)cmbItemsPanelGroupHeaderPlacement.SelectedIndex;
00697                     }
00698                     else
00699                     {
00700                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00701
00702                         if (itemsStackPanel != null)
00703                         {
00704                             itemsStackPanel.GroupHeaderPlacement = (GroupHeaderPlacement)cmbItemsPanelGroupHeaderPlacement.SelectedIndex;
00705                         }
00706                     }
00707                 }
00708             }
00709             catch (Exception ex)
00710             {
00711                 txtExceptionReport.Text = ex.ToString();
00712                 AppendEventMessage(ex.ToString());
00713             }
00714         }
00715
00716         private void BtnGetItemsPanelMargin_Click(object sender, RoutedEventArgs e)
00717         {
00718             UpdateItemsPanelMargin();
00719         }
00720
00721         private void BtnSetItemsPanelMargin_Click(object sender, RoutedEventArgs e)
00722         {
00723             try
00724             {
00725                 if (itemsControl != null && txtItemsPanelMargin != null)
00726                 {
00727                     Panel itemsPanel = itemsControl.ItemsPanelRoot;
00728
00729                     if (itemsPanel != null)
00730                     {
00731                         itemsPanel.Margin = GetThicknessFromString(txtItemsPanelMargin.Text);
00732                     }
00733                 }
00734             }
00735             catch (Exception ex)
00736             {
00737                 txtExceptionReport.Text = ex.ToString();
00738                 AppendEventMessage(ex.ToString());
00739             }
00740         }
00741
00742         private void BtnGetItemsPanelGroupPadding_Click(object sender, RoutedEventArgs e)
00743         {
00744             UpdateItemsPanelGroupPadding();
00745         }
00746
00747         private void BtnSetItemsPanelGroupPadding_Click(object sender, RoutedEventArgs e)
00748         {
00749             try
00750             {
00751                 if (itemsControl != null && txtItemsPanelGroupPadding != null)
00752                 {
00753                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00754
00755                     if (itemsWrapGrid != null)
00756                     {
00757                         itemsWrapGrid.GroupPadding = GetThicknessFromString(txtItemsPanelGroupPadding.Text);
00758                     }
00759                     else
00760                     {
00761                         ItemsStackPanel itemsStackPanel = itemsControl.ItemsPanelRoot as ItemsStackPanel;
00762
00763                         if (itemsStackPanel != null)
00764                         {
00765                             itemsStackPanel.GroupPadding = GetThicknessFromString(txtItemsPanelGroupPadding.Text);
00766                         }
00767                     }
00768                 }
00769             }
00770             catch (Exception ex)
00771             {
00772                 txtExceptionReport.Text = ex.ToString();
00773                 AppendEventMessage(ex.ToString());
00774             }
00775         }
00776
00777         private void BtnGetItemsWrapGridCacheLength_Click(object sender, RoutedEventArgs e)
00778         {
00779             UpdateItemsWrapGridCacheLength();
00780         }
00781
00782         private void BtnSetItemsWrapGridCacheLength_Click(object sender, RoutedEventArgs e)
00783         {
00784             try
00785             {
00786                 if (itemsControl != null && txtItemsWrapGridCacheLength != null)
00787                 {
00788                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00789
00790                     if (itemsWrapGrid != null)
00791                     {
00792                         itemsWrapGrid.CacheLength = double.Parse(txtItemsWrapGridCacheLength.Text);
00793                     }
00794                 }
00795             }
00796             catch (Exception ex)
00797             {
00798                 txtExceptionReport.Text = ex.ToString();
00799                 AppendEventMessage(ex.ToString());
00800             }
00801         }
00802
00803         private void BtnGetItemsWrapGridItemWidth_Click(object sender, RoutedEventArgs e)
00804         {
00805             UpdateItemsWrapGridItemWidth();
00806         }
00807
00808         private void BtnSetItemsWrapGridItemWidth_Click(object sender, RoutedEventArgs e)
00809         {
00810             try
00811             {
00812                 if (itemsControl != null && txtItemsWrapGridItemWidth != null)
00813                 {
00814                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00815
00816                     if (itemsWrapGrid != null)
00817                     {
00818                         itemsWrapGrid.ItemWidth = double.Parse(txtItemsWrapGridItemWidth.Text);
00819                     }
00820                 }
00821             }
00822             catch (Exception ex)
00823             {
00824                 txtExceptionReport.Text = ex.ToString();
00825                 AppendEventMessage(ex.ToString());
00826             }
00827         }
00828
00829         private void BtnGetItemsWrapGridItemHeight_Click(object sender, RoutedEventArgs e)
00830         {
00831             UpdateItemsWrapGridItemHeight();
00832         }
00833
00834         private void BtnSetItemsWrapGridItemHeight_Click(object sender, RoutedEventArgs e)
00835         {
00836             try
00837             {
00838                 if (itemsControl != null && txtItemsWrapGridItemHeight != null)
00839                 {
00840                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00841
00842                     if (itemsWrapGrid != null)
00843                     {
00844                         itemsWrapGrid.ItemHeight = double.Parse(txtItemsWrapGridItemHeight.Text);
00845                     }
00846                 }
00847             }
00848             catch (Exception ex)
00849             {
00850                 txtExceptionReport.Text = ex.ToString();
00851                 AppendEventMessage(ex.ToString());
00852             }
00853         }
00854
00855         private void BtnResetItemsSource_Click(object sender, RoutedEventArgs e)
00856         {
00857             if (itemsControl != null && itemsControl.ItemsSource != null)
00858             {
00859                 itemsControl.ItemsSource = null;
00860             }
00861         }
00862
00863         private void BtnSetItemsSource_Click(object sender, RoutedEventArgs e)
00864         {
00865             if (itemsControl != null && itemsControl.ItemsSource != _cvs.View)
00866             {
00867                 itemsControl.ItemsSource = _cvs.View;
00868             }
00869         }
00870
00871         private void NbItemsWrapGridMaximumRowsOrColumns_ValueChanged(object sender, object e)
00872         {
00873             try
00874             {
00875                 if (itemsControl != null && nbItemsWrapGridMaximumRowsOrColumns != null)
00876                 {
00877                     ItemsWrapGrid itemsWrapGrid = itemsControl.ItemsPanelRoot as ItemsWrapGrid;
00878
00879                     if (itemsWrapGrid != null)
00880                     {
00881                         itemsWrapGrid.MaximumRowsOrColumns = (int)nbItemsWrapGridMaximumRowsOrColumns.Value;
00882                     }
00883                 }
00884             }
00885             catch (Exception ex)
00886             {
00887                 txtExceptionReport.Text = ex.ToString();
00888                 AppendEventMessage(ex.ToString());
00889             }
00890         }
00891
00892         private void ChkProperties_Checked(object sender, RoutedEventArgs e)
00893         {
00894             if (svProperties != null)
00895                 svProperties.Visibility = Visibility.Visible;
00896         }
00897
00898         private void ChkProperties_Unchecked(object sender, RoutedEventArgs e)
00899         {
00900             if (svProperties != null)
00901                 svProperties.Visibility = Visibility.Collapsed;
00902         }
00903
00904         private void ChkDataSource_Checked(object sender, RoutedEventArgs e)
00905         {
00906             if (svDataSource != null)
00907                 svDataSource.Visibility = Visibility.Visible;
00908         }
00909
00910         private void ChkDataSource_Unchecked(object sender, RoutedEventArgs e)
00911         {
00912             if (svDataSource != null)
00913                 svDataSource.Visibility = Visibility.Collapsed;
00914         }
00915
00916         private void ChkLogs_Checked(object sender, RoutedEventArgs e)
00917         {
00918             if (grdLogs != null)
00919                 grdLogs.Visibility = Visibility.Visible;
00920         }
00921
00922         private void ChkLogs_Unchecked(object sender, RoutedEventArgs e)
00923         {
00924             if (grdLogs != null)
00925                 grdLogs.Visibility = Visibility.Collapsed;
00926         }
00927
00928         private void AppendEventMessage(string eventMessage)
00929         {
00930             lstLogs.Items.Add(eventMessage);
00931         }
00932
00933         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
00934         {
00935             txtExceptionReport.Text = string.Empty;
00936         }
00937
00938         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
00939         {
00940             lstLogs.Items.Clear();
00941         }
00942
00943         private Thickness GetThicknessFromString(string thickness)
00944         {
00945             string[] lengths = thickness.Split(',');
00946             if (lengths.Length < 4)
00947                 return new Thickness(
00948                     Convert.ToDouble(lengths[0]));
00949             else
00950                 return new Thickness(
00951                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
00952         }
00953
00954         private static T FindElementOfTypeInSubtree<T>(DependencyObject element) where T : DependencyObject
00955         {
00956             if (element == null)
00957                 return null;
00958
00959             if (element is T)
00960                 return (T)element;
00961
00962             int childrenCount = VisualTreeHelper.GetChildrenCount(element);
00963             for (int i = 0; i < childrenCount; i++)
00964             {
00965                 var result = FindElementOfTypeInSubtree<T>(VisualTreeHelper.GetChild(element, i));
00966                 if (result != null)
00967                     return result;
00968             }
00969
00970             return null;
00971         }
00972     }
00973
00974     public class GroupedItemsControlItem
00975     {
00976         public GroupedItemsControlItem() : this(">EmptyId<") { }
00977
00978         public GroupedItemsControlItem(string id)
00979         {
00980             Id = id;
00981         }
00982
00983         public string Id
00984         {
00985             get;
00986             set;
00987         }
00988     }
00989
00990     public class GroupedItemsControlGroupItem
00991     {
00992         public GroupedItemsControlGroupItem() : this(">EmptyName<") { }
00993
00994         public GroupedItemsControlGroupItem(string name)
00995         {
00996             Name = name;
00997             Items = new ObservableCollection<GroupedItemsControlItem>();
00998         }
00999
01000         public string Name
01001         {
01002             get;
01003             set;
01004         }
01005
01006         public ObservableCollection<GroupedItemsControlItem> Items
01007         {
01008             get;
01009             set;
01010         }
01011     }
01012
01013     public class GroupedItemsControlViewModel
01014     {
01015         public GroupedItemsControlViewModel()
01016         {
01017             Items = new ObservableCollection<GroupedItemsControlGroupItem>();
01018
01019             GroupedItemsControlGroupItem groupA = new GroupedItemsControlGroupItem("Group A");
01020             groupA.Items.Add(new GroupedItemsControlItem("idA1"));
01021             groupA.Items.Add(new GroupedItemsControlItem("idA2"));
01022             groupA.Items.Add(new GroupedItemsControlItem("idA3"));
01023             groupA.Items.Add(new GroupedItemsControlItem("idA4"));
01024             groupA.Items.Add(new GroupedItemsControlItem("idA5"));
01025             groupA.Items.Add(new GroupedItemsControlItem("idA6"));
01026             Items.Add(groupA);
01027
01028             GroupedItemsControlGroupItem groupB = new GroupedItemsControlGroupItem("Group B");
01029             groupB.Items.Add(new GroupedItemsControlItem("idB1"));
01030             groupB.Items.Add(new GroupedItemsControlItem("idB2"));
01031             groupB.Items.Add(new GroupedItemsControlItem("idB3"));
01032             groupB.Items.Add(new GroupedItemsControlItem("idB4"));
01033             groupB.Items.Add(new GroupedItemsControlItem("idB5"));
01034             groupB.Items.Add(new GroupedItemsControlItem("idB6"));
01035             groupB.Items.Add(new GroupedItemsControlItem("idB7"));
01036             groupB.Items.Add(new GroupedItemsControlItem("idB8"));
01037             Items.Add(groupB);
01038
01039             GroupedItemsControlGroupItem groupC = new GroupedItemsControlGroupItem("Group C");
01040             groupC.Items.Add(new GroupedItemsControlItem("idC1"));
01041             groupC.Items.Add(new GroupedItemsControlItem("idC2"));
01042             groupC.Items.Add(new GroupedItemsControlItem("idC3"));
01043             groupC.Items.Add(new GroupedItemsControlItem("idC4"));
01044             groupC.Items.Add(new GroupedItemsControlItem("idC5"));
01045             groupC.Items.Add(new GroupedItemsControlItem("idC6"));
01046             groupC.Items.Add(new GroupedItemsControlItem("idC7"));
01047             groupC.Items.Add(new GroupedItemsControlItem("idC8"));
01048             groupC.Items.Add(new GroupedItemsControlItem("idC9"));
01049             Items.Add(groupC);
01050
01051             GroupedItemsControlGroupItem groupD = new GroupedItemsControlGroupItem("Group D");
01052             groupD.Items.Add(new GroupedItemsControlItem("idD1"));
01053             groupD.Items.Add(new GroupedItemsControlItem("idD2"));
01054             groupD.Items.Add(new GroupedItemsControlItem("idD3"));
01055             groupD.Items.Add(new GroupedItemsControlItem("idD4"));
01056             groupD.Items.Add(new GroupedItemsControlItem("idD5"));
01057             groupD.Items.Add(new GroupedItemsControlItem("idD6"));
01058             Items.Add(groupD);
01059
01060             GroupedItemsControlGroupItem groupE = new GroupedItemsControlGroupItem("Group E");
01061             groupE.Items.Add(new GroupedItemsControlItem("idE1"));
01062             groupE.Items.Add(new GroupedItemsControlItem("idE2"));
01063             groupE.Items.Add(new GroupedItemsControlItem("idE3"));
01064             groupE.Items.Add(new GroupedItemsControlItem("idE4"));
01065             groupE.Items.Add(new GroupedItemsControlItem("idE5"));
01066             groupE.Items.Add(new GroupedItemsControlItem("idE6"));
01067             groupE.Items.Add(new GroupedItemsControlItem("idE7"));
01068             groupE.Items.Add(new GroupedItemsControlItem("idE8"));
01069             groupE.Items.Add(new GroupedItemsControlItem("idE9"));
01070             groupE.Items.Add(new GroupedItemsControlItem("idEA"));
01071             groupE.Items.Add(new GroupedItemsControlItem("idEB"));
01072             groupE.Items.Add(new GroupedItemsControlItem("idEC"));
01073             groupE.Items.Add(new GroupedItemsControlItem("idED"));
01074             groupE.Items.Add(new GroupedItemsControlItem("idEE"));
01075             groupE.Items.Add(new GroupedItemsControlItem("idEF"));
01076             Items.Add(groupE);
01077
01078             GroupedItemsControlGroupItem groupF = new GroupedItemsControlGroupItem("Group F");
01079             groupF.Items.Add(new GroupedItemsControlItem("idF1"));
01080             groupF.Items.Add(new GroupedItemsControlItem("idF2"));
01081             groupF.Items.Add(new GroupedItemsControlItem("idF3"));
01082             Items.Add(groupF);
01083
01084             GroupedItemsControlGroupItem groupG = new GroupedItemsControlGroupItem("Group G");
01085             groupG.Items.Add(new GroupedItemsControlItem("idG1"));
01086             groupG.Items.Add(new GroupedItemsControlItem("idG2"));
01087             groupG.Items.Add(new GroupedItemsControlItem("idG3"));
01088             groupG.Items.Add(new GroupedItemsControlItem("idG4"));
01089             groupG.Items.Add(new GroupedItemsControlItem("idG5"));
01090             groupG.Items.Add(new GroupedItemsControlItem("idG6"));
01091             groupG.Items.Add(new GroupedItemsControlItem("idG7"));
01092             groupG.Items.Add(new GroupedItemsControlItem("idG8"));
01093             groupG.Items.Add(new GroupedItemsControlItem("idG9"));
01094             groupG.Items.Add(new GroupedItemsControlItem("idGA"));
01095             groupG.Items.Add(new GroupedItemsControlItem("idGB"));
01096             groupG.Items.Add(new GroupedItemsControlItem("idGC"));
01097             groupG.Items.Add(new GroupedItemsControlItem("idGD"));
01098             groupG.Items.Add(new GroupedItemsControlItem("idGE"));
01099             groupG.Items.Add(new GroupedItemsControlItem("idGF"));
01100             groupG.Items.Add(new GroupedItemsControlItem("idGG"));
01101             groupG.Items.Add(new GroupedItemsControlItem("idGH"));
01102             groupG.Items.Add(new GroupedItemsControlItem("idGI"));
01103             groupG.Items.Add(new GroupedItemsControlItem("idGJ"));
01104             groupG.Items.Add(new GroupedItemsControlItem("idGK"));
01105             groupG.Items.Add(new GroupedItemsControlItem("idGL"));
01106             groupG.Items.Add(new GroupedItemsControlItem("idGM"));
01107             groupG.Items.Add(new GroupedItemsControlItem("idGN"));
01108             groupG.Items.Add(new GroupedItemsControlItem("idGO"));
01109             Items.Add(groupG);
01110
01111             GroupedItemsControlGroupItem groupH = new GroupedItemsControlGroupItem("Group H");
01112             groupH.Items.Add(new GroupedItemsControlItem("idH1"));
01113             groupH.Items.Add(new GroupedItemsControlItem("idH2"));
01114             groupH.Items.Add(new GroupedItemsControlItem("idH3"));
01115             groupH.Items.Add(new GroupedItemsControlItem("idH4"));
01116             groupH.Items.Add(new GroupedItemsControlItem("idH5"));
01117             groupH.Items.Add(new GroupedItemsControlItem("idH6"));
01118             groupH.Items.Add(new GroupedItemsControlItem("idH7"));
01119             groupH.Items.Add(new GroupedItemsControlItem("idH8"));
01120             groupH.Items.Add(new GroupedItemsControlItem("idH9"));
01121             groupH.Items.Add(new GroupedItemsControlItem("idhA"));
01122             groupH.Items.Add(new GroupedItemsControlItem("idHB"));
01123             groupH.Items.Add(new GroupedItemsControlItem("idHC"));
01124             groupH.Items.Add(new GroupedItemsControlItem("idHD"));
01125             groupH.Items.Add(new GroupedItemsControlItem("idHE"));
01126             groupH.Items.Add(new GroupedItemsControlItem("idHF"));
01127             groupH.Items.Add(new GroupedItemsControlItem("idHG"));
01128             groupH.Items.Add(new GroupedItemsControlItem("idHH"));
01129             groupH.Items.Add(new GroupedItemsControlItem("idHI"));
01130             groupH.Items.Add(new GroupedItemsControlItem("idHJ"));
01131             groupH.Items.Add(new GroupedItemsControlItem("idHK"));
01132             groupH.Items.Add(new GroupedItemsControlItem("idHL"));
01133             groupH.Items.Add(new GroupedItemsControlItem("idHM"));
01134             groupH.Items.Add(new GroupedItemsControlItem("idHN"));
01135             groupH.Items.Add(new GroupedItemsControlItem("idHO"));
01136             groupH.Items.Add(new GroupedItemsControlItem("idhP"));
01137             groupH.Items.Add(new GroupedItemsControlItem("idHQ"));
01138             groupH.Items.Add(new GroupedItemsControlItem("idHR"));
01139             groupH.Items.Add(new GroupedItemsControlItem("idHS"));
01140             groupH.Items.Add(new GroupedItemsControlItem("idHT"));
01141             groupH.Items.Add(new GroupedItemsControlItem("idHU"));
01142             groupH.Items.Add(new GroupedItemsControlItem("idHV"));
01143             groupH.Items.Add(new GroupedItemsControlItem("idHW"));
01144             groupH.Items.Add(new GroupedItemsControlItem("idHX"));
01145             groupH.Items.Add(new GroupedItemsControlItem("idHY"));
01146             groupH.Items.Add(new GroupedItemsControlItem("idHZ"));
01147             Items.Add(groupH);
01148
01149             GroupedItemsControlGroupItem groupI = new GroupedItemsControlGroupItem("Group I");
01150             groupI.Items.Add(new GroupedItemsControlItem("idI1"));
01151             groupI.Items.Add(new GroupedItemsControlItem("idI2"));
01152             groupI.Items.Add(new GroupedItemsControlItem("idI3"));
01153             Items.Add(groupI);
01154         }
01155
01156         public ObservableCollection<GroupedItemsControlGroupItem> Items
01157         {
01158             get;
01159             set;
01160         }
01161     }
01162 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TextCommandBarFlyoutPage Member List

This is the complete list of members for TextCommandBarFlyoutPage, including all inherited members.
OnClearClipboardContentsClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnClipboardContentChanged(object sender, object e) | TextCommandBarFlyoutPage | [inline, private]
OnGetRichEditBoxRtfContentClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnRichEditBoxClearSelectionClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnRichEditBoxFillWithTextClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnRichEditBoxSelectAllClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnRichTextBlockClearSelectionClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnRichTextBlockSelectAllClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnSetClipboardContentsClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowStandardTextControlFlyoutOnPasswordBoxClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowStandardTextControlFlyoutOnRichEditBoxClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowStandardTextControlFlyoutOnRichTextBlockClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowStandardTextControlFlyoutOnTextBlockClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowStandardTextControlFlyoutOnTextBoxClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowTextControlFlyoutOnPasswordBoxClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowTextControlFlyoutOnRichEditBoxClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowTextControlFlyoutOnRichTextBlockClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowTextControlFlyoutOnTextBlockClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnShowTextControlFlyoutOnTextBoxClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnTextBlockClearSelectionClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnTextBlockSelectAllClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnTextBoxClearSelectionClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnTextBoxFillWithTextClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
OnTextBoxSelectAllClicked(object sender, object args) | TextCommandBarFlyoutPage | [inline, private]
RecordEvent(string eventString) | TextCommandBarFlyoutPage | [inline, private]
RecordEvent(object sender, string eventString) | TextCommandBarFlyoutPage | [inline, private]
ShowTextControlContextFlyoutStandard(FrameworkElement targetElement) | TextCommandBarFlyoutPage | [inline, private]
ShowTextControlContextFlyoutTransient(FrameworkElement targetElement) | TextCommandBarFlyoutPage | [inline, private]
TextCommandBarFlyoutPage() | TextCommandBarFlyoutPage | [inline]
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ParallaxView.properties.h Source File

  • File List
  • File Members
  • Generated

ParallaxView.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ParallaxViewProperties
00008 {
00009 public:
00010     ParallaxViewProperties();
00011
00012     void Child(winrt::UIElement const& value);
00013     winrt::UIElement Child();
00014
00015     void HorizontalShift(double value);
00016     double HorizontalShift();
00017
00018     void HorizontalSourceEndOffset(double value);
00019     double HorizontalSourceEndOffset();
00020
00021     void HorizontalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const& value);
00022     winrt::ParallaxSourceOffsetKind HorizontalSourceOffsetKind();
00023
00024     void HorizontalSourceStartOffset(double value);
00025     double HorizontalSourceStartOffset();
00026
00027     void IsHorizontalShiftClamped(bool value);
00028     bool IsHorizontalShiftClamped();
00029
00030     void IsVerticalShiftClamped(bool value);
00031     bool IsVerticalShiftClamped();
00032
00033     void MaxHorizontalShiftRatio(double value);
00034     double MaxHorizontalShiftRatio();
00035
00036     void MaxVerticalShiftRatio(double value);
00037     double MaxVerticalShiftRatio();
00038
00039     void Source(winrt::UIElement const& value);
00040     winrt::UIElement Source();
00041
00042     void VerticalShift(double value);
00043     double VerticalShift();
00044
00045     void VerticalSourceEndOffset(double value);
00046     double VerticalSourceEndOffset();
00047
00048     void VerticalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const& value);
00049     winrt::ParallaxSourceOffsetKind VerticalSourceOffsetKind();
00050
00051     void VerticalSourceStartOffset(double value);
00052     double VerticalSourceStartOffset();
00053
00054     static winrt::DependencyProperty ChildProperty() { return s_ChildProperty; }
00055     static winrt::DependencyProperty HorizontalShiftProperty() { return s_HorizontalShiftProperty; }
00056     static winrt::DependencyProperty HorizontalSourceEndOffsetProperty() { return s_HorizontalSourceEndOffsetProperty; }
00057     static winrt::DependencyProperty HorizontalSourceOffsetKindProperty() { return s_HorizontalSourceOffsetKindProperty; }
00058     static winrt::DependencyProperty HorizontalSourceStartOffsetProperty() { return s_HorizontalSourceStartOffsetProperty; }
00059     static winrt::DependencyProperty IsHorizontalShiftClampedProperty() { return s_IsHorizontalShiftClampedProperty; }
00060     static winrt::DependencyProperty IsVerticalShiftClampedProperty() { return s_IsVerticalShiftClampedProperty; }
00061     static winrt::DependencyProperty MaxHorizontalShiftRatioProperty() { return s_MaxHorizontalShiftRatioProperty; }
00062     static winrt::DependencyProperty MaxVerticalShiftRatioProperty() { return s_MaxVerticalShiftRatioProperty; }
00063     static winrt::DependencyProperty SourceProperty() { return s_SourceProperty; }
00064     static winrt::DependencyProperty VerticalShiftProperty() { return s_VerticalShiftProperty; }
00065     static winrt::DependencyProperty VerticalSourceEndOffsetProperty() { return s_VerticalSourceEndOffsetProperty; }
00066     static winrt::DependencyProperty VerticalSourceOffsetKindProperty() { return s_VerticalSourceOffsetKindProperty; }
00067     static winrt::DependencyProperty VerticalSourceStartOffsetProperty() { return s_VerticalSourceStartOffsetProperty; }
00068
00069     static GlobalDependencyProperty s_ChildProperty;
00070     static GlobalDependencyProperty s_HorizontalShiftProperty;
00071     static GlobalDependencyProperty s_HorizontalSourceEndOffsetProperty;
00072     static GlobalDependencyProperty s_HorizontalSourceOffsetKindProperty;
00073     static GlobalDependencyProperty s_HorizontalSourceStartOffsetProperty;
00074     static GlobalDependencyProperty s_IsHorizontalShiftClampedProperty;
00075     static GlobalDependencyProperty s_IsVerticalShiftClampedProperty;
00076     static GlobalDependencyProperty s_MaxHorizontalShiftRatioProperty;
00077     static GlobalDependencyProperty s_MaxVerticalShiftRatioProperty;
00078     static GlobalDependencyProperty s_SourceProperty;
00079     static GlobalDependencyProperty s_VerticalShiftProperty;
00080     static GlobalDependencyProperty s_VerticalSourceEndOffsetProperty;
00081     static GlobalDependencyProperty s_VerticalSourceOffsetKindProperty;
00082     static GlobalDependencyProperty s_VerticalSourceStartOffsetProperty;
00083
00084     static void EnsureProperties();
00085     static void ClearProperties();
00086
00087     static void OnChildPropertyChanged(
00088         winrt::DependencyObject const& sender,
00089         winrt::DependencyPropertyChangedEventArgs const& args);
00090
00091     static void OnHorizontalShiftPropertyChanged(
00092         winrt::DependencyObject const& sender,
00093         winrt::DependencyPropertyChangedEventArgs const& args);
00094
00095     static void OnHorizontalSourceEndOffsetPropertyChanged(
00096         winrt::DependencyObject const& sender,
00097         winrt::DependencyPropertyChangedEventArgs const& args);
00098
00099     static void OnHorizontalSourceOffsetKindPropertyChanged(
00100         winrt::DependencyObject const& sender,
00101         winrt::DependencyPropertyChangedEventArgs const& args);
00102
00103     static void OnHorizontalSourceStartOffsetPropertyChanged(
00104         winrt::DependencyObject const& sender,
00105         winrt::DependencyPropertyChangedEventArgs const& args);
00106
00107     static void OnIsHorizontalShiftClampedPropertyChanged(
00108         winrt::DependencyObject const& sender,
00109         winrt::DependencyPropertyChangedEventArgs const& args);
00110
00111     static void OnIsVerticalShiftClampedPropertyChanged(
00112         winrt::DependencyObject const& sender,
00113         winrt::DependencyPropertyChangedEventArgs const& args);
00114
00115     static void OnMaxHorizontalShiftRatioPropertyChanged(
00116         winrt::DependencyObject const& sender,
00117         winrt::DependencyPropertyChangedEventArgs const& args);
00118
00119     static void OnMaxVerticalShiftRatioPropertyChanged(
00120         winrt::DependencyObject const& sender,
00121         winrt::DependencyPropertyChangedEventArgs const& args);
00122
00123     static void OnSourcePropertyChanged(
00124         winrt::DependencyObject const& sender,
00125         winrt::DependencyPropertyChangedEventArgs const& args);
00126
00127     static void OnVerticalShiftPropertyChanged(
00128         winrt::DependencyObject const& sender,
00129         winrt::DependencyPropertyChangedEventArgs const& args);
00130
00131     static void OnVerticalSourceEndOffsetPropertyChanged(
00132         winrt::DependencyObject const& sender,
00133         winrt::DependencyPropertyChangedEventArgs const& args);
00134
00135     static void OnVerticalSourceOffsetKindPropertyChanged(
00136         winrt::DependencyObject const& sender,
00137         winrt::DependencyPropertyChangedEventArgs const& args);
00138
00139     static void OnVerticalSourceStartOffsetPropertyChanged(
00140         winrt::DependencyObject const& sender,
00141         winrt::DependencyPropertyChangedEventArgs const& args);
00142 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/RegUtil.h Source File

  • File List
  • File Members
  • inc

RegUtil.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include <windows.h>
00007
00008 // RegGetValueW, implemented in linked MinCore.lib, is declared here because winreg.h's declaration is
00009 // skipped for Windows Store code. Its declaration condition would need to change to
00010 // #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_APP)
00011 // from the current #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM).
00012 extern "C"
00013 WINADVAPI
00014 LSTATUS
00015 APIENTRY
00016 RegGetValueW(
00017     _In_ HKEY hkey,
00018     _In_opt_ LPCWSTR lpSubKey,
00019     _In_opt_ LPCWSTR lpValue,
00020     _In_ DWORD dwFlags,
00021     _Out_opt_ LPDWORD pdwType,
00022     _When_((dwFlags & 0x7F) == RRF_RT_REG_SZ ||
00023     (dwFlags & 0x7F) == RRF_RT_REG_EXPAND_SZ ||
00024         (dwFlags & 0x7F) == (RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ) ||
00025         *pdwType == REG_SZ ||
00026         *pdwType == REG_EXPAND_SZ, _Post_z_)
00027     _When_((dwFlags & 0x7F) == RRF_RT_REG_MULTI_SZ ||
00028         *pdwType == REG_MULTI_SZ, _Post_ _NullNull_terminated_)
00029     _Out_writes_bytes_to_opt_(*pcbData, *pcbData) PVOID pvData,
00030     _Inout_opt_ LPDWORD pcbData
00031 );
00032
00033
00034 class RegUtil
00035 {
00036 public:
00037     // Used on RS4 and RS5 to indicate whether ScrollBars must auto-hide or not.
00038     static bool UseDynamicScrollbars() noexcept;
00039 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonPage Member List

This is the complete list of members for SplitButtonPage, including all inherited members.
_clickCount | SplitButtonPage | [private]
_commandExecuteCount | SplitButtonPage | [private]
_flyoutClosedCount | SplitButtonPage | [private]
_flyoutOpenedCount | SplitButtonPage | [private]
_placementFlyout | SplitButtonPage | [private]
CanExecuteCheckBox_Checked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
CanExecuteCheckBox_Unchecked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
CommandExecute() | SplitButtonPage | [inline]
EnableCheckBox_Checked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
EnableCheckBox_Unchecked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
SetFlyoutCheckBox_Checked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
SetFlyoutCheckBox_Unchecked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
SimulateTouchCheckBox_Checked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
SimulateTouchCheckBox_Unchecked(object sender, RoutedEventArgs e) | SplitButtonPage | [inline, private]
SplitButtonPage() | SplitButtonPage | [inline]
TestExecuteCommand | SplitButtonPage |
TestSplitButton_Click(object sender, object e) | SplitButtonPage | [inline, private]
TestSplitButtonFlyout_Closed(object sender, object e) | SplitButtonPage | [inline, private]
TestSplitButtonFlyout_Opened(object sender, object e) | SplitButtonPage | [inline, private]
ToggleSplitButton_Click(object sender, object e) | SplitButtonPage | [inline, private]
ToggleSplitButton_IsCheckedChanged(ToggleSplitButton sender, ToggleSplitButtonIsCheckedChangedEventArgs args) | SplitButtonPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedChevronRightDownSmallVisualSource_AnimatedVisual Member List

This is the complete list of members for AnimatedChevronRightDownSmallVisualSource_AnimatedVisual, including all inherited members.
_reusableExpressionAnimation(compositor.CreateExpressionAnimation()) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline]
AnimatedChevronRightDownSmallVisualSource_AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
CanvasGeometryToIGeometrySource2D(winrt::com_ptr< CanvasGeometry > geo) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private, static]
Close() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline]
ContainerShape() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_0() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_1() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_2() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
Duration() const | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline]
Geometry() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
InsetClip_0() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, static]
OffsetVector2Animation() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
PathGeometry() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
Root() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
RootProgress() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
RootVisual() const | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline]
RotationAngleInDegreesScalarAnimation_90_to_90() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
Size() const | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline]
SpriteShape() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private, static]
ThemeColor_Foreground() | AnimatedChevronRightDownSmallVisualSource_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/ViewModel.h Source File

  • File List
  • File Members
  • TreeView

ViewModel.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include <Vector.h>
00006 #include "TreeViewNode.h"
00007
00008 using TreeNodeSelectionState = TreeViewNode::TreeNodeSelectionState;
00009 using ViewModelVectorOptions = VectorOptionsFromFlag<winrt::IInspectable, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()>;
00010
00011 class ViewModel :
00012     public ReferenceTracker<
00013         ViewModel,
00014         reference_tracker_implements_t<typename ViewModelVectorOptions::VectorType>::type,
00015             typename ViewModelVectorOptions::IterableType,
00016             typename ViewModelVectorOptions::ObservableVectorType>,
00017     public ViewModelVectorOptions::IVectorOwner
00018 {
00019     Implement_IObservable(ViewModelVectorOptions)
00020     Implement_Vector_External(ViewModelVectorOptions)
00021     Implement_IIterator(ViewModelVectorOptions)
00022
00023 public:
00024     ViewModel();
00025     ~ViewModel();
00026
00027     void ExpandNode(const winrt::TreeViewNode& value);
00028     void CollapseNode(const winrt::TreeViewNode& value);
00029     winrt::event_token NodeExpanding(const winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>& handler);
00030     void NodeExpanding(const winrt::event_token token);
00031     winrt::event_token NodeCollapsed(const winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>& handler);
00032     void NodeCollapsed(const winrt::event_token token);
00033     void SelectAll();
00034     void SelectSingleItem(winrt::IInspectable const& item);
00035     void SelectNode(const winrt::TreeViewNode& node, bool isSelected);
00036     void SelectByIndex(int index, TreeNodeSelectionState const& state);
00037     winrt::TreeViewNode GetNodeAt(uint32_t index);
00038     bool IndexOfNode(winrt::TreeViewNode const& targetNode, uint32_t& index);
00039     void IsContentMode(const bool value);
00040     bool IsContentMode();
00041
00042 public:
00043
00044     // IVector functions
00045     uint32_t Size();
00046     winrt::IInspectable GetAt(uint32_t index);
00047     bool IndexOf(winrt::IInspectable const& value, uint32_t& index);
00048     uint32_t GetMany(uint32_t const startIndex, winrt::array_view<winrt::IInspectable> values);
00049     winrt::IVectorView<winrt::IInspectable> ViewModel::GetView();
00050     void SetAt(uint32_t index, winrt::IInspectable const& value);
00051     void InsertAt(uint32_t index, winrt::IInspectable const& value);
00052     void RemoveAt(uint32_t index);
00053     void Append(winrt::IInspectable const& value);
00054     void RemoveAtEnd();
00055     void Clear();
00056     void ReplaceAll(winrt::array_view<winrt::IInspectable const> items);
00057
00058 public:
00059     void TreeViewNodeVectorChanged(const winrt::TreeViewNode& sender, const winrt::IInspectable& args);
00060     void SelectedNodeChildrenChanged(const winrt::TreeViewNode& sender, const winrt::IInspectable& args);
00061     void TreeViewNodePropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args);
00062     void TreeViewNodeIsExpandedPropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args);
00063     void TreeViewNodeHasChildrenPropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args);
00064
00065     // Helper functions
00066     void PrepareView(winrt::TreeViewNode const& originNode);
00067     void SetOwners(winrt::TreeViewList const& owningList, winrt::TreeView const& owningTreeView);
00068     winrt::TreeViewList ListControl();
00069     bool IsInSingleSelectionMode();
00070     bool IsNodeSelected(winrt::TreeViewNode const& targetNode);
00071     TreeNodeSelectionState NodeSelectionState(winrt::TreeViewNode const& targetNode);
00072     void UpdateSelection(winrt::TreeViewNode const& selectNode, TreeNodeSelectionState const& selectionState);
00073     winrt::IVector<winrt::TreeViewNode> GetSelectedNodes();
00074     winrt::IVector<winrt::IInspectable> GetSelectedItems();
00075     void TrackItemSelected(winrt::IInspectable item);
00076     void TrackItemUnselected(winrt::IInspectable item);
00077     void NotifyContainerOfSelectionChange(winrt::TreeViewNode const& targetNode, TreeNodeSelectionState const& selectionState);
00078
00079     winrt::TreeViewNode GetAssociatedNode(winrt::IInspectable item);
00080
00081 private:
00082     tracker_ref<winrt::IVector<winrt::TreeViewNode>> m_selectedNodes{ this };
00083     event_source<winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>> m_nodeExpandingEventSource{ this };
00084     event_source<winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>> m_nodeCollapsedEventSource{ this };
00085     std::vector<winrt::event_token> m_collectionChangedEventTokenVector;
00086     std::vector<winrt::event_token> m_selectedNodeChildrenChangedEventTokenVector;
00087     std::vector<winrt::event_token> m_IsExpandedChangedEventTokenVector;
00088     winrt::event_token m_rootNodeChildrenChangedEventToken;
00089     winrt::weak_ref<winrt::TreeViewList> m_TreeViewList{ nullptr };
00090     winrt::weak_ref<winrt::TreeView> m_TreeView{ nullptr };
00091     tracker_ref<winrt::TreeViewNode> m_originNode{ this };
00092     bool m_isContentMode{ false };
00093     tracker_ref<winrt::IVector<winrt::IInspectable>> m_selectedItems{ this };
00094     std::vector<winrt::weak_ref<winrt::IInspectable>> m_addedSelectedItems;
00095     std::vector<winrt::IInspectable> m_removedSelectedItems;
00096     uint32_t m_selectionTrackingCounter{ 0 };
00097
00098     // Methods
00099     winrt::TreeViewNode GetRemovedChildTreeViewNodeByIndex(winrt::TreeViewNode const& node, unsigned int childIndex);
00100     int CountDescendants(const winrt::TreeViewNode& value);
00101     void AddNodeToView(const winrt::TreeViewNode& value, unsigned int index);
00102     int AddNodeDescendantsToView(const winrt::TreeViewNode& value, unsigned int index, int offset);
00103     void RemoveNodeAndDescendantsFromView(const winrt::TreeViewNode& value);
00104     void RemoveNodesAndDescendentsWithFlatIndexRange(unsigned int startIndex, unsigned int stopIndex);
00105     int GetNextIndexInFlatTree(winrt::TreeViewNode const& indexNode);
00106     unsigned int IndexOfNextSibling(winrt::TreeViewNode const& childNode);
00107     unsigned int GetExpandedDescendantCount(winrt::TreeViewNode const& parentNode);
00108     void UpdateNodeSelection(winrt::TreeViewNode const& selectNode, TreeNodeSelectionState const& selectionState);
00109     void UpdateSelectionStateOfDescendants(winrt::TreeViewNode const& targetNode, TreeNodeSelectionState const& selectionState);
00110     void UpdateSelectionStateOfAncestors(winrt::TreeViewNode const& targetNode);
00111     TreeNodeSelectionState SelectionStateBasedOnChildren(winrt::TreeViewNode const& node);
00112     void ClearEventTokenVectors();
00113     void BeginSelectionChanges();
00114     void EndSelectionChanges();
00115 };
00116
00117
00118 // Need to update node selection states on UI before vector changes.
00119 // Listen on vector change events don't solve the problem because the event already happened when the event handler gets called.
00120 // i.e. the node is already gone when we get to ItemRemoved callback.
00121 #pragma region SelectedTreeNodeVector
00122
00123 typedef typename VectorOptionsFromFlag<winrt::TreeViewNode, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()> SelectedTreeNodeVectorOptions;
00124
00125 class SelectedTreeNodeVector :
00126     public ReferenceTracker<
00127         SelectedTreeNodeVector,
00128         reference_tracker_implements_t<typename SelectedTreeNodeVectorOptions::VectorType>::type,
00129         typename TreeViewNodeVectorOptions::IterableType,
00130         typename TreeViewNodeVectorOptions::ObservableVectorType>,
00131     public TreeViewNodeVectorOptions::IVectorOwner
00132 {
00133     Implement_Vector_Read(SelectedTreeNodeVectorOptions)
00134
00135 private:
00136     winrt::weak_ref<ViewModel> m_viewModel{ nullptr };
00137
00138     void UpdateSelection(winrt::TreeViewNode const& node, TreeNodeSelectionState state);
00139
00140 public:
00141     void SetViewModel(ViewModel& viewModel);
00142     void Append(winrt::TreeViewNode const& node);
00143     void InsertAt(unsigned int index, winrt::TreeViewNode const& node);
00144     void SetAt(unsigned int index, winrt::TreeViewNode const& node);
00145     void RemoveAt(unsigned int index);
00146     void RemoveAtEnd();
00147     void ReplaceAll(winrt::array_view<winrt::TreeViewNode const> nodes);
00148     void Clear();
00149     bool Contains(winrt::TreeViewNode const& node);
00150
00151     std::function<bool(winrt::TreeViewNode const& value, uint32_t& index)> GetCustomIndexOfFunction() override { return [this](winrt::TreeViewNode const& value, uint32_t& index) { return IndexOf_OptimizedForRemove(value, index); }; }
00152     bool IndexOf_OptimizedForRemove(winrt::TreeViewNode const& node, uint32_t& index);
00153
00154     // Default write methods will trigger TreeView visual updates.
00155     // If you want to update vector content without notifying TreeViewNodes, use "core" version of the methods.
00156     void InsertAtCore_NoContainsCheck(unsigned int index, winrt::TreeViewNode const& node);
00157     void RemoveAtCore(unsigned int index);
00158 };
00159
00160 #pragma endregion
00161
00162 // Similar to SelectedNodesVector above, we need to make decisions before the item is inserted or removed.
00163 // we can't use vector change events because the event already happened when event hander gets called.
00164 #pragma region SelectedItemsVector
00165
00166 typedef typename VectorOptionsFromFlag<winrt::IInspectable, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()> SelectedItemsVectorOptions;
00167
00168 class SelectedItemsVector :
00169     public ReferenceTracker<
00170     SelectedItemsVector,
00171     reference_tracker_implements_t<typename SelectedItemsVectorOptions::VectorType>::type,
00172     typename SelectedItemsVectorOptions::IterableType,
00173     typename SelectedItemsVectorOptions::ObservableVectorType>,
00174     public SelectedItemsVectorOptions::IVectorOwner
00175 {
00176     Implement_Vector_Read(SelectedItemsVectorOptions)
00177
00178 private:
00179     winrt::weak_ref<ViewModel> m_viewModel{ nullptr };
00180
00181 public:
00182     void SetViewModel(ViewModel& viewModel);
00183     void Append(winrt::IInspectable const& item);
00184     void InsertAt(unsigned int index, winrt::IInspectable const& item);
00185     void InsertAt_NoContainsCheck(unsigned int index, winrt::IInspectable const& item);
00186     void SetAt(unsigned int index, winrt::IInspectable const& item);
00187     void RemoveAt(unsigned int index);
00188     void RemoveAtEnd();
00189     void ReplaceAll(winrt::array_view<winrt::IInspectable const> items);
00190     void Clear();
00191     bool Contains(winrt::IInspectable const& item);
00192
00193     std::function<bool(winrt::IInspectable const& value, uint32_t& index)> GetCustomIndexOfFunction() override { return [this](winrt::IInspectable const& value, uint32_t& index) { return IndexOf_OptimizedForRemove(value, index); }; }
00194     bool IndexOf_OptimizedForRemove(winrt::IInspectable const& node, uint32_t& index);
00195 };
00196
00197 #pragma endregion
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NonReferenceTrackerStorageHelper< T > Member List

This is the complete list of members for NonReferenceTrackerStorageHelper< T >, including all inherited members.
unwrap(const T &value) const | NonReferenceTrackerStorageHelper< T > | [inline]
wrap(const T &value) const | NonReferenceTrackerStorageHelper< T > | [inline]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrushFactory.h Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicBrushFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "AcrylicBrush.h"
00007
00008 class AcrylicBrushFactory
00009     : public winrt::factory_implementation::AcrylicBrushT<AcrylicBrushFactory, AcrylicBrush>
00010 {
00011 public:
00012     AcrylicBrushFactory();
00013 };
00014
00015 namespace winrt::Microsoft::UI::Xaml::Media
00016 {
00017     namespace factory_implementation { using AcrylicBrush = ::AcrylicBrushFactory; };
00018     namespace implementation { using AcrylicBrush = ::AcrylicBrush; };
00019 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItem.properties.h Source File

  • File List
  • File Members
  • Generated

TreeViewItem.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TreeViewItemProperties
00008 {
00009 public:
00010     TreeViewItemProperties();
00011
00012     void CollapsedGlyph(winrt::hstring const& value);
00013     winrt::hstring CollapsedGlyph();
00014
00015     void ExpandedGlyph(winrt::hstring const& value);
00016     winrt::hstring ExpandedGlyph();
00017
00018     void GlyphBrush(winrt::Brush const& value);
00019     winrt::Brush GlyphBrush();
00020
00021     void GlyphOpacity(double value);
00022     double GlyphOpacity();
00023
00024     void GlyphSize(double value);
00025     double GlyphSize();
00026
00027     void HasUnrealizedChildren(bool value);
00028     bool HasUnrealizedChildren();
00029
00030     void IsExpanded(bool value);
00031     bool IsExpanded();
00032
00033     void ItemsSource(winrt::IInspectable const& value);
00034     winrt::IInspectable ItemsSource();
00035
00036     void TreeViewItemTemplateSettings(winrt::TreeViewItemTemplateSettings const& value);
00037     winrt::TreeViewItemTemplateSettings TreeViewItemTemplateSettings();
00038
00039     static winrt::DependencyProperty CollapsedGlyphProperty() { return s_CollapsedGlyphProperty; }
00040     static winrt::DependencyProperty ExpandedGlyphProperty() { return s_ExpandedGlyphProperty; }
00041     static winrt::DependencyProperty GlyphBrushProperty() { return s_GlyphBrushProperty; }
00042     static winrt::DependencyProperty GlyphOpacityProperty() { return s_GlyphOpacityProperty; }
00043     static winrt::DependencyProperty GlyphSizeProperty() { return s_GlyphSizeProperty; }
00044     static winrt::DependencyProperty HasUnrealizedChildrenProperty() { return s_HasUnrealizedChildrenProperty; }
00045     static winrt::DependencyProperty IsExpandedProperty() { return s_IsExpandedProperty; }
00046     static winrt::DependencyProperty ItemsSourceProperty() { return s_ItemsSourceProperty; }
00047     static winrt::DependencyProperty TreeViewItemTemplateSettingsProperty() { return s_TreeViewItemTemplateSettingsProperty; }
00048
00049     static GlobalDependencyProperty s_CollapsedGlyphProperty;
00050     static GlobalDependencyProperty s_ExpandedGlyphProperty;
00051     static GlobalDependencyProperty s_GlyphBrushProperty;
00052     static GlobalDependencyProperty s_GlyphOpacityProperty;
00053     static GlobalDependencyProperty s_GlyphSizeProperty;
00054     static GlobalDependencyProperty s_HasUnrealizedChildrenProperty;
00055     static GlobalDependencyProperty s_IsExpandedProperty;
00056     static GlobalDependencyProperty s_ItemsSourceProperty;
00057     static GlobalDependencyProperty s_TreeViewItemTemplateSettingsProperty;
00058
00059     static void EnsureProperties();
00060     static void ClearProperties();
00061
00062     static void OnHasUnrealizedChildrenPropertyChanged(
00063         winrt::DependencyObject const& sender,
00064         winrt::DependencyPropertyChangedEventArgs const& args);
00065
00066     static void OnIsExpandedPropertyChanged(
00067         winrt::DependencyObject const& sender,
00068         winrt::DependencyPropertyChangedEventArgs const& args);
00069
00070     static void OnItemsSourcePropertyChanged(
00071         winrt::DependencyObject const& sender,
00072         winrt::DependencyPropertyChangedEventArgs const& args);
00073 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButtonAutomationPeer.cpp Source File

  • File List
  • File Members
  • DropDownButton

DropDownButtonAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "DropDownButton.h"
00008 #include "DropDownButtonAutomationPeer.h"
00009 #include "Utils.h"
00010
00011
00012 #include "DropDownButtonAutomationPeer.properties.cpp"
00013
00014 DropDownButtonAutomationPeer::DropDownButtonAutomationPeer(winrt::DropDownButton const& owner)
00015     : ReferenceTracker(owner)
00016 {
00017 }
00018
00019 // IAutomationPeerOverrides
00020 winrt::IInspectable DropDownButtonAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00021 {
00022     if (patternInterface == winrt::PatternInterface::ExpandCollapse)
00023     {
00024         return *this;
00025     }
00026
00027     return __super::GetPatternCore(patternInterface);
00028 }
00029
00030 hstring DropDownButtonAutomationPeer::GetClassNameCore()
00031 {
00032     return winrt::hstring_name_of<winrt::DropDownButton>();
00033 }
00034
00035 com_ptr<DropDownButton> DropDownButtonAutomationPeer::GetImpl()
00036 {
00037     com_ptr<DropDownButton> impl;
00038
00039     if (auto dropDownButton = Owner().try_as<winrt::DropDownButton>())
00040     {
00041         impl = winrt::get_self<DropDownButton>(dropDownButton)->get_strong();
00042     }
00043
00044     return impl;
00045 }
00046
00047 // IExpandCollapseProvider
00048 winrt::ExpandCollapseState DropDownButtonAutomationPeer::ExpandCollapseState()
00049 {
00050     winrt::ExpandCollapseState currentState = winrt::ExpandCollapseState::Collapsed;
00051
00052     if (auto dropDownButton = GetImpl())
00053     {
00054         if (dropDownButton->IsFlyoutOpen())
00055         {
00056             currentState = winrt::ExpandCollapseState::Expanded;
00057         }
00058     }
00059
00060     return currentState;
00061 }
00062
00063 void DropDownButtonAutomationPeer::Expand()
00064 {
00065     if (auto dropDownButton = GetImpl())
00066     {
00067         dropDownButton->OpenFlyout();
00068     }
00069 }
00070
00071 void DropDownButtonAutomationPeer::Collapse()
00072 {
00073     if (auto dropDownButton = GetImpl())
00074     {
00075         dropDownButton->CloseFlyout();
00076     }
00077 }
00078
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarEraserButtonInternal.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarEraserButtonInternal.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarEraserButtonInternal.g.h"
00011
00012 class InkToolBarEraserButtonInternal :
00013     public ReferenceTracker<InkToolBarEraserButtonInternal, winrt::implementation::InkToolBarEraserButtonInternalTundefined>
00014 {
00015 };
00016
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewManager.cpp Source File

  • File List
  • File Members
  • Repeater

ViewManager.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "ViewManager.h"
00008 #include "ItemsRepeater.h"
00009 #include "RepeaterTestHooks.h"
00010
00011 ViewManager::ViewManager(ItemsRepeater* owner) :
00012     m_owner(owner),
00013     m_resetPool(owner),
00014     m_lastFocusedElement(owner),
00015     m_phaser(owner),
00016     m_ElementFactoryGetArgs(owner),
00017     m_ElementFactoryRecycleArgs(owner)
00018 {
00019     // ItemsRepeater is not fully constructed yet. Don't interact with it.
00020 }
00021
00022 winrt::UIElement ViewManager::GetElement(int index, bool forceCreate, bool suppressAutoRecycle)
00023 {
00024     bool elementIsAnchor = false;
00025     winrt::UIElement element = forceCreate ? nullptr : GetElementIfAlreadyHeldByLayout(index);
00026
00027     if (!element)
00028     {
00029         // check if this is the anchor made through repeater in preparation
00030         // for a bring into view.
00031         if (auto madeAnchor = m_owner->MadeAnchor())
00032         {
00033             auto anchorVirtInfo = ItemsRepeater::TryGetVirtualizationInfo(madeAnchor);
00034             if (anchorVirtInfo->Index() == index)
00035             {
00036                 element = madeAnchor;
00037                 elementIsAnchor = true;
00038
00039 #ifdef DBG
00040                 if (VirtualizationInfo::GetLogItemIndex() == index)
00041                 {
00042                     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Returning anchor element.", VirtualizationInfo::GetLogItemIndex());
00043                 }
00044 #endif // DBG
00045             }
00046         }
00047     }
00048
00049     if (!element) { element = GetElementFromUniqueIdResetPool(index); };
00050
00051     if (!element || elementIsAnchor)
00052     {
00053         // When elementIsAnchor is True and 'element' is already set, it still needs to be removed from
00054         // the pinned pool if it happens to be in there, for example because it has keyboard focus.
00055         winrt::UIElement elementFromPool = GetElementFromPinnedElements(index);
00056         MUX_ASSERT(!elementFromPool || !element || elementFromPool == element);
00057
00058 #ifdef DBG
00059         if (elementIsAnchor && elementFromPool && VirtualizationInfo::GetLogItemIndex() == index)
00060         {
00061             ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Anchor element removed from pinned pool.", VirtualizationInfo::GetLogItemIndex());
00062         }
00063 #endif // DBG
00064
00065         if (!element && elementFromPool)
00066         {
00067             element = elementFromPool;
00068         }
00069     }
00070
00071     if (!element) { element = GetElementFromElementFactory(index); }
00072
00073     auto virtInfo = ItemsRepeater::TryGetVirtualizationInfo(element);
00074     if (suppressAutoRecycle)
00075     {
00076         virtInfo->AutoRecycleCandidate(false);
00077         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this, m_owner->Indent(), L"Not AutoRecycleCandidate", L"virtInfo Index:", virtInfo->Index());
00078     }
00079     else
00080     {
00081         virtInfo->AutoRecycleCandidate(true);
00082         virtInfo->KeepAlive(true);
00083         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_IND_STR_STR_INT, METH_NAME, this, m_owner->Indent(), L"AutoRecycleCandidate", L"virtInfo Index:", virtInfo->Index());
00084     }
00085
00086 #ifdef DBG
00087     if (VirtualizationInfo::GetLogItemIndex() == index)
00088     {
00089         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, element, VirtualizationInfo::GetLogItemIndex());
00090     }
00091 #endif // DBG
00092
00093     MUX_ASSERT(virtInfo->Owner() == ElementOwner::Layout);
00094
00095     return element;
00096 }
00097
00098 void ViewManager::ClearElement(const winrt::UIElement& element, bool isClearedDueToCollectionChange)
00099 {
00100     const auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
00101     const int index = virtInfo->Index();
00102     const bool cleared =
00103         ClearElementToUniqueIdResetPool(element, virtInfo) ||
00104         ClearElementToAnimator(element, virtInfo) ||
00105         ClearElementToPinnedPool(element, virtInfo, isClearedDueToCollectionChange);
00106
00107     if (!cleared)
00108     {
00109         ClearElementToElementFactory(element);
00110     }
00111
00112     // Both First and Last indices need to be valid or default.
00113     MUX_ASSERT((m_firstRealizedElementIndexHeldByLayout == FirstRealizedElementIndexDefault && m_lastRealizedElementIndexHeldByLayout == LastRealizedElementIndexDefault) ||
00114         (m_firstRealizedElementIndexHeldByLayout != FirstRealizedElementIndexDefault && m_lastRealizedElementIndexHeldByLayout != LastRealizedElementIndexDefault));
00115
00116     if (index == m_firstRealizedElementIndexHeldByLayout && index == m_lastRealizedElementIndexHeldByLayout)
00117     {
00118         // First and last were pointing to the same element and that is going away.
00119         InvalidateRealizedIndicesHeldByLayout();
00120     }
00121     else if (index == m_firstRealizedElementIndexHeldByLayout)
00122     {
00123         // The FirstElement is going away, shrink the range by one.
00124         ++m_firstRealizedElementIndexHeldByLayout;
00125     }
00126     else if (index == m_lastRealizedElementIndexHeldByLayout)
00127     {
00128         // Last element is going away, shrink the range by one at the end.
00129         --m_lastRealizedElementIndexHeldByLayout;
00130     }
00131     else
00132     {
00133         // Index is either outside the range we are keeping track of or inside the range.
00134         // In both these cases, we just keep the range we have. If this clear was due to
00135         // a collection change, then in the CollectionChanged event, we will invalidate these guys.
00136     }
00137 }
00138
00139 // We need to clear the datacontext to prevent crashes from happening,
00140 //  however we only do that if we were the ones setting it.
00141 // That is when one of the following is the case (numbering taken from line ~642):
00142 // 1.2    No ItemTemplate, data is not a UIElement
00143 // 2.1    ItemTemplate, data is not FrameworkElement
00144 // 2.2.2  Itemtemplate, data is FrameworkElement, ElementFactory returned Element different to data
00145 //
00146 // In all of those three cases, we the ItemTemplateShim is NOT null.
00147 // Luckily when we create the items, we store whether we were the once setting the DataContext.
00148 void ViewManager::ClearElementToElementFactory(const winrt::UIElement& element)
00149 {
00150     m_owner->OnElementClearing(element);
00151
00152     auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
00153     virtInfo->MoveOwnershipToElementFactory();
00154
00155     // During creation of this object, we were the one setting the DataContext, so clear it now.
00156     if (virtInfo->MustClearDataContext())
00157     {
00158         if (const auto elementAsFE = element.try_as<winrt::FrameworkElement>())
00159         {
00160             elementAsFE.DataContext(nullptr);
00161         }
00162     }
00163
00164     if (m_owner->ItemTemplateShim())
00165     {
00166         if (!m_ElementFactoryRecycleArgs)
00167         {
00168             // Create one.
00169             m_ElementFactoryRecycleArgs = tracker_ref<winrt::ElementFactoryRecycleArgs>(m_owner, winrt::ElementFactoryRecycleArgs());
00170         }
00171
00172         auto context = m_ElementFactoryRecycleArgs.get();
00173         context.Element(element);
00174         context.Parent(*m_owner);
00175
00176         m_owner->ItemTemplateShim().RecycleElement(context);
00177
00178         context.Element(nullptr);
00179         context.Parent(nullptr);
00180     }
00181     else
00182     {
00183         // No ItemTemplate to recycle to, remove the element from the children collection.
00184         const auto children = m_owner->Children();
00185         unsigned int childIndex = 0;
00186         const bool found = children.IndexOf(element, childIndex);
00187         if (!found)
00188         {
00189             throw winrt::hresult_error(E_FAIL, L"ItemsRepeater's child not found in its Children collection.");
00190         }
00191
00192         children.RemoveAt(childIndex);
00193     }
00194
00195     m_phaser.StopPhasing(element, virtInfo);
00196     if (m_lastFocusedElement == element)
00197     {
00198         // Focused element is going away. Remove the tracked last focused element
00199         // and pick a reasonable next focus if we can find one within the layout
00200         // realized elements.
00201         const int clearedIndex = virtInfo->Index();
00202         MoveFocusFromClearedIndex(clearedIndex);
00203     }
00204
00205     ITEMSREPEATER_TRACE_PERF_DBG(L"ElementCleared");
00206 }
00207
00208 void ViewManager::MoveFocusFromClearedIndex(int clearedIndex)
00209 {
00210     winrt::UIElement focusedChild = nullptr;
00211     if (auto focusCandidate = FindFocusCandidate(clearedIndex, focusedChild))
00212     {
00213         winrt::FocusState focusState = winrt::FocusState::Programmatic;
00214         if (m_lastFocusedElement)
00215         {
00216             if (auto focusedAsControl = m_lastFocusedElement.try_as<winrt::Control>())
00217             {
00218                 focusState = focusedAsControl.FocusState();
00219             }
00220         }
00221
00222         // If the last focused element has focus, use its focus state, if not use programmatic.
00223         focusState = focusState == winrt::FocusState::Unfocused ? winrt::FocusState::Programmatic : focusState;
00224
00225         // Since this focus change is due to the focused element getting recycled, don't activate the window.
00226         focusCandidate.as<winrt::IUIElementPrivate>().FocusNoActivate(focusState);
00227
00228         m_lastFocusedElement.set(focusedChild);
00229         // Add pin to hold the focused element.
00230         UpdatePin(focusedChild, true /* addPin */);
00231     }
00232     else
00233     {
00234         // We could not find a candiate.
00235         m_lastFocusedElement.set(nullptr);
00236     }
00237 }
00238
00239 winrt::Control ViewManager::FindFocusCandidate(int clearedIndex, winrt::UIElement& focusedChild)
00240 {
00241     // Walk through all the children and find elements with index before and after the cleared index.
00242     // Note that during a delete the next element would now have the same index.
00243     int previousIndex = std::numeric_limits<int>::min();
00244     int nextIndex = std::numeric_limits<int>::max();
00245     winrt::UIElement nextElement = nullptr;
00246     winrt::UIElement previousElement = nullptr;
00247     auto children = m_owner->Children();
00248     for (unsigned i = 0u; i < children.Size(); ++i)
00249     {
00250         auto child = children.GetAt(i);
00251         auto virtInfo = ItemsRepeater::TryGetVirtualizationInfo(child);
00252         if (virtInfo && virtInfo->IsHeldByLayout())
00253         {
00254             const int currentIndex = virtInfo->Index();
00255             if (currentIndex < clearedIndex)
00256             {
00257                 if (currentIndex > previousIndex)
00258                 {
00259                     previousIndex = currentIndex;
00260                     previousElement = child;
00261                 }
00262             }
00263             else if (currentIndex >= clearedIndex)
00264             {
00265                 // Note that we use >= above because if we deleted the focused element,
00266                 // the next element would have the same index now.
00267                 if (currentIndex < nextIndex)
00268                 {
00269                     nextIndex = currentIndex;
00270                     nextElement = child;
00271                 }
00272             }
00273         }
00274     }
00275
00276     // Find the next element if one exists, if not use the previous element.
00277     // If the container itself is not focusable, find a descendent that is.
00278     winrt::Control focusCandidate = nullptr;
00279     if (nextElement)
00280     {
00281         focusedChild = nextElement.try_as<winrt::UIElement>();
00282         focusCandidate = nextElement.try_as<winrt::Control>();
00283         if (!focusCandidate)
00284         {
00285             if (auto firstFocus = winrt::FocusManager::FindFirstFocusableElement(nextElement))
00286             {
00287                 focusCandidate = firstFocus.try_as<winrt::Control>();
00288             }
00289         }
00290     }
00291
00292     if (!focusCandidate && previousElement)
00293     {
00294         focusedChild = previousElement.try_as<winrt::UIElement>();
00295         focusCandidate = previousElement.try_as<winrt::Control>();
00296         if (!previousElement)
00297         {
00298             if (auto lastFocus = winrt::FocusManager::FindLastFocusableElement(previousElement))
00299             {
00300                 focusCandidate = lastFocus.try_as<winrt::Control>();
00301             }
00302         }
00303     }
00304
00305     return focusCandidate;
00306 }
00307
00308 int ViewManager::GetElementIndex(const winrt::com_ptr<VirtualizationInfo>& virtInfo)
00309 {
00310     if (!virtInfo)
00311     {
00312         //Element is not a child of this ItemsRepeater.
00313         return -1;
00314     }
00315
00316     return virtInfo->IsRealized() || virtInfo->IsInUniqueIdResetPool() ? virtInfo->Index() : -1;
00317 }
00318
00319 void ViewManager::PrunePinnedElements()
00320 {
00321     EnsureEventSubscriptions();
00322
00323     // Go through pinned elements and make sure they still have
00324     // a reason to be pinned.
00325     for (size_t i = 0; i < m_pinnedPool.size(); ++i)
00326     {
00327         auto elementInfo = m_pinnedPool[i];
00328         auto virtInfo = elementInfo.VirtualizationInfo();
00329
00330         MUX_ASSERT(virtInfo->Owner() == ElementOwner::PinnedPool);
00331
00332         if (!virtInfo->IsPinned())
00333         {
00334 #ifdef DBG
00335             if (VirtualizationInfo::GetLogItemIndex() == virtInfo->Index())
00336             {
00337                 ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Unpinned element removed from PinnedPool.", VirtualizationInfo::GetLogItemIndex());
00338             }
00339 #endif // DBG
00340
00341             m_pinnedPool.erase(m_pinnedPool.begin() + i);
00342             --i;
00343
00344             // Pinning was the only thing keeping this element alive.
00345             ClearElementToElementFactory(elementInfo.PinnedElement());
00346         }
00347 #ifdef DBG
00348         else if (VirtualizationInfo::GetLogItemIndex() == virtInfo->Index())
00349         {
00350             ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Pinned element remains in PinnedPool.", VirtualizationInfo::GetLogItemIndex());
00351         }
00352 #endif // DBG
00353     }
00354 }
00355
00356 void ViewManager::UpdatePin(const winrt::UIElement& element, bool addPin)
00357 {
00358     auto parent = CachedVisualTreeHelpers::GetParent(element);
00359     auto child = static_cast<winrt::DependencyObject>(element);
00360
00361     while (parent)
00362     {
00363         if (auto repeater = parent.try_as<winrt::ItemsRepeater>())
00364         {
00365             auto virtInfo = ItemsRepeater::GetVirtualizationInfo(child.as<winrt::UIElement>());
00366             if (virtInfo->IsRealized())
00367             {
00368                 if (addPin)
00369                 {
00370                     virtInfo->AddPin();
00371                 }
00372                 else if (virtInfo->IsPinned())
00373                 {
00374                     if (virtInfo->RemovePin() == 0)
00375                     {
00376                         // ElementFactory is invoked during the measure pass.
00377                         // We will clear the element then.
00378                         repeater.InvalidateMeasure();
00379                     }
00380                 }
00381             }
00382         }
00383
00384         child = parent;
00385         parent = CachedVisualTreeHelpers::GetParent(child);
00386     }
00387 }
00388
00389 void ViewManager::OnItemsSourceChanged(const winrt::IInspectable&, const winrt::NotifyCollectionChangedEventArgs& args)
00390 {
00391     // Note: For items that have been removed, the index will not be touched. It will hold
00392     // the old index before it was removed. It is not valid anymore.
00393     switch (args.Action())
00394     {
00395     case winrt::NotifyCollectionChangedAction::Add:
00396     {
00397         const auto newIndex = args.NewStartingIndex();
00398         const auto newCount = args.NewItems().Size();
00399         EnsureFirstLastRealizedIndices();
00400         if (newIndex <= m_lastRealizedElementIndexHeldByLayout)
00401         {
00402             m_lastRealizedElementIndexHeldByLayout += newCount;
00403             auto children = m_owner->Children();
00404             const auto childCount = children.Size();
00405             for (unsigned i = 0u; i < childCount; ++i)
00406             {
00407                 const auto element = children.GetAt(i);
00408                 const auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
00409                 const auto dataIndex = virtInfo->Index();
00410
00411                 if (virtInfo->IsRealized() && dataIndex >= newIndex)
00412                 {
00413                     UpdateElementIndex(element, virtInfo, dataIndex + newCount);
00414                 }
00415             }
00416         }
00417         else
00418         {
00419             // Indices held by layout are not affected
00420             // We could still have items in the pinned elements that need updates. This is usually a very small vector.
00421             for (size_t i = 0; i < m_pinnedPool.size(); ++i)
00422             {
00423                 const auto elementInfo = m_pinnedPool[i];
00424                 const auto virtInfo = elementInfo.VirtualizationInfo();
00425                 const auto dataIndex = virtInfo->Index();
00426
00427                 if (virtInfo->IsRealized() && dataIndex >= newIndex)
00428                 {
00429                     auto element = elementInfo.PinnedElement();
00430                     UpdateElementIndex(element, virtInfo, dataIndex + newCount);
00431                 }
00432             }
00433         }
00434         break;
00435     }
00436
00437     case winrt::NotifyCollectionChangedAction::Replace:
00438     {
00439         // Requirement: oldStartIndex == newStartIndex. It is not a replace if this is not true.
00440         // Two cases here
00441         // case 1: oldCount == newCount
00442         //         indices are not affected. nothing to do here.
00443         // case 2: oldCount != newCount
00444         //         Replaced with less or more items. This is like an insert or remove
00445         //         depending on the counts.
00446         const auto oldStartIndex = args.OldStartingIndex();
00447         const auto newStartingIndex = args.NewStartingIndex();
00448         const auto oldCount = static_cast<int>(args.OldItems().Size());
00449         const auto newCount = static_cast<int>(args.NewItems().Size());
00450         if (oldStartIndex != newStartingIndex)
00451         {
00452             throw winrt::hresult_error(E_FAIL, L"Replace is only allowed with OldStartingIndex equals to NewStartingIndex.");
00453         }
00454
00455         if (oldCount == 0)
00456         {
00457             throw winrt::hresult_error(E_FAIL, L"Replace notification with args.OldItemsCount value of 0 is not allowed. Use Insert action instead.");
00458         }
00459
00460         if (newCount == 0)
00461         {
00462             throw winrt::hresult_error(E_FAIL, L"Replace notification with args.NewItemCount value of 0 is not allowed. Use Remove action instead.");
00463         }
00464
00465         const int countChange = newCount - oldCount;
00466         if (countChange != 0)
00467         {
00468             // countChange > 0 : countChange items were added
00469             // countChange < 0 : -countChange  items were removed
00470             const auto children = m_owner->Children();
00471             for (unsigned i = 0u; i < children.Size(); ++i)
00472             {
00473                 const auto element = children.GetAt(i);
00474                 const auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
00475                 const auto dataIndex = virtInfo->Index();
00476
00477                 if (virtInfo->IsRealized())
00478                 {
00479                     if (dataIndex >= oldStartIndex + oldCount)
00480                     {
00481                         UpdateElementIndex(element, virtInfo, dataIndex + countChange);
00482                     }
00483                 }
00484             }
00485
00486             EnsureFirstLastRealizedIndices();
00487             m_lastRealizedElementIndexHeldByLayout += countChange;
00488         }
00489         break;
00490     }
00491
00492     case winrt::NotifyCollectionChangedAction::Remove:
00493     {
00494         const auto oldStartIndex = args.OldStartingIndex();
00495         const auto oldCount = static_cast<int>(args.OldItems().Size());
00496         const auto children = m_owner->Children();
00497         for (unsigned i = 0u; i < children.Size(); ++i)
00498         {
00499             const auto element = children.GetAt(i);
00500             const auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
00501             const auto dataIndex = virtInfo->Index();
00502
00503             if (virtInfo->IsRealized())
00504             {
00505                 if (virtInfo->AutoRecycleCandidate() && oldStartIndex <= dataIndex && dataIndex < oldStartIndex + oldCount)
00506                 {
00507                     // If we are doing the mapping, remove the element who's data was removed.
00508                     m_owner->ClearElementImpl(element);
00509                 }
00510                 else if (dataIndex >= (oldStartIndex + oldCount))
00511                 {
00512                     UpdateElementIndex(element, virtInfo, dataIndex - oldCount);
00513                 }
00514             }
00515         }
00516
00517         InvalidateRealizedIndicesHeldByLayout();
00518         break;
00519     }
00520
00521     case winrt::NotifyCollectionChangedAction::Reset:
00522         // If we get multiple resets back to back before
00523         // running layout, we dont have to clear all the elements again.
00524         if (!m_isDataSourceStableResetPending)
00525         {
00526             // There should be no elements in the reset pool at this time.
00527             MUX_ASSERT(m_resetPool.IsEmpty());
00528
00529             if (m_owner->ItemsSourceView().HasKeyIndexMapping())
00530             {
00531                 m_isDataSourceStableResetPending = true;
00532             }
00533
00534             // Walk through all the elements and make sure they are cleared, they will go into
00535             // the stable id reset pool.
00536             auto children = m_owner->Children();
00537             for (unsigned i = 0u; i < children.Size(); ++i)
00538             {
00539                 auto element = children.GetAt(i);
00540                 auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
00541                 if (virtInfo->IsRealized() && virtInfo->AutoRecycleCandidate())
00542                 {
00543                     m_owner->ClearElementImpl(element);
00544                 }
00545             }
00546         }
00547
00548         InvalidateRealizedIndicesHeldByLayout();
00549
00550         break;
00551     }
00552 }
00553
00554 void ViewManager::EnsureFirstLastRealizedIndices()
00555 {
00556     if (m_firstRealizedElementIndexHeldByLayout == FirstRealizedElementIndexDefault)
00557     {
00558         // This will ensure that the indexes are updated.
00559         auto element = GetElementIfAlreadyHeldByLayout(0);
00560     }
00561 }
00562
00563 void ViewManager::OnLayoutChanging()
00564 {
00565     if (m_owner->ItemsSourceView() &&
00566         m_owner->ItemsSourceView().HasKeyIndexMapping())
00567     {
00568         m_isDataSourceStableResetPending = true;
00569     }
00570 }
00571
00572 void ViewManager::OnOwnerArranged()
00573 {
00574     if (m_isDataSourceStableResetPending)
00575     {
00576         m_isDataSourceStableResetPending = false;
00577
00578         for (auto& entry : m_resetPool)
00579         {
00580             // TODO: Task 14204306: ItemsRepeater: Find better focus candidate when focused element is deleted in the ItemsSource.
00581             // Focused element is getting cleared. Need to figure out semantics on where
00582             // focus should go when the focused element is removed from the data collection.
00583             ClearElement(entry.second.get(), true /* isClearedDueToCollectionChange */);
00584         }
00585
00586         m_resetPool.Clear();
00587
00588         // Flush the realized indices once the stable reset pool is cleared to start fresh.
00589         InvalidateRealizedIndicesHeldByLayout();
00590     }
00591 }
00592
00593 #pragma region GetElement providers
00594
00595 // We optimize for the case where index is not realized to return null as quickly as we can.
00596 // Flow layouts manage containers on their own and will never ask for an index that is already realized.
00597 // If an index that is realized is requested by the layout, we unfortunately have to walk the
00598 // children. Not ideal, but a reasonable default to provide consistent behavior between virtualizing
00599 // and non-virtualizing hosts.
00600 winrt::UIElement ViewManager::GetElementIfAlreadyHeldByLayout(int index)
00601 {
00602     winrt::UIElement element = nullptr;
00603
00604     const bool cachedFirstLastIndicesInvalid = m_firstRealizedElementIndexHeldByLayout == FirstRealizedElementIndexDefault;
00605     MUX_ASSERT(!cachedFirstLastIndicesInvalid || m_lastRealizedElementIndexHeldByLayout == LastRealizedElementIndexDefault);
00606
00607     const bool isRequestedIndexInRealizedRange = (m_firstRealizedElementIndexHeldByLayout <= index && index <= m_lastRealizedElementIndexHeldByLayout);
00608
00609     if (cachedFirstLastIndicesInvalid || isRequestedIndexInRealizedRange)
00610     {
00611         // Both First and Last indices need to be valid or default.
00612         MUX_ASSERT((m_firstRealizedElementIndexHeldByLayout == FirstRealizedElementIndexDefault && m_lastRealizedElementIndexHeldByLayout == LastRealizedElementIndexDefault) ||
00613             (m_firstRealizedElementIndexHeldByLayout != FirstRealizedElementIndexDefault && m_lastRealizedElementIndexHeldByLayout != LastRealizedElementIndexDefault));
00614
00615         auto children = m_owner->Children();
00616         for (unsigned i = 0u; i < children.Size(); ++i)
00617         {
00618             auto child = children.GetAt(i);
00619             auto virtInfo = ItemsRepeater::TryGetVirtualizationInfo(child);
00620             if (virtInfo && virtInfo->IsHeldByLayout())
00621             {
00622                 // Only give back elements held by layout. If someone else is holding it, they will be served by other methods.
00623                 const int childIndex = virtInfo->Index();
00624                 m_firstRealizedElementIndexHeldByLayout = std::min(m_firstRealizedElementIndexHeldByLayout, childIndex);
00625                 m_lastRealizedElementIndexHeldByLayout = std::max(m_lastRealizedElementIndexHeldByLayout, childIndex);
00626                 if (virtInfo->Index() == index)
00627                 {
00628                     element = child;
00629                     // If we have valid first/last indices, we don't have to walk the rest, but if we
00630                     // do not, then we keep walking through the entire children collection to get accurate
00631                     // indices once.
00632                     if (!cachedFirstLastIndicesInvalid)
00633                     {
00634                         break;
00635                     }
00636                 }
00637             }
00638         }
00639     }
00640
00641     return element;
00642 }
00643
00644 winrt::UIElement ViewManager::GetElementFromUniqueIdResetPool(int index)
00645 {
00646     winrt::UIElement element = nullptr;
00647     // See if you can get it from the reset pool.
00648     if (m_isDataSourceStableResetPending)
00649     {
00650         element = m_resetPool.Remove(index);
00651         if (element)
00652         {
00653             // Make sure that the index is updated to the current one
00654             auto virtInfo = ItemsRepeater::GetVirtualizationInfo(element);
00655             virtInfo->MoveOwnershipToLayoutFromUniqueIdResetPool();
00656             UpdateElementIndex(element, virtInfo, index);
00657
00658             // Update realized indices
00659             m_firstRealizedElementIndexHeldByLayout = std::min(m_firstRealizedElementIndexHeldByLayout, index);
00660             m_lastRealizedElementIndexHeldByLayout = std::max(m_lastRealizedElementIndexHeldByLayout, index);
00661         }
00662     }
00663
00664 #ifdef DBG
00665     if (VirtualizationInfo::GetLogItemIndex() == index)
00666     {
00667         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, element, VirtualizationInfo::GetLogItemIndex());
00668     }
00669 #endif // DBG
00670
00671     return element;
00672 }
00673
00674 winrt::UIElement ViewManager::GetElementFromPinnedElements(int index)
00675 {
00676     winrt::UIElement element = nullptr;
00677
00678     // See if you can find something among the pinned elements.
00679     for (size_t i = 0; i < m_pinnedPool.size(); ++i)
00680     {
00681         auto elementInfo = m_pinnedPool[i];
00682         auto virtInfo = elementInfo.VirtualizationInfo();
00683
00684         if (virtInfo->Index() == index)
00685         {
00686 #ifdef DBG
00687             if (VirtualizationInfo::GetLogItemIndex() == index)
00688             {
00689                 ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Element removed from PinnedPool.", index);
00690             }
00691 #endif // DBG
00692
00693             m_pinnedPool.erase(m_pinnedPool.begin() + i);
00694             element = elementInfo.PinnedElement();
00695             elementInfo.VirtualizationInfo()->MoveOwnershipToLayoutFromPinnedPool();
00696
00697             // Update realized indices
00698             m_firstRealizedElementIndexHeldByLayout = std::min(m_firstRealizedElementIndexHeldByLayout, index);
00699             m_lastRealizedElementIndexHeldByLayout = std::max(m_lastRealizedElementIndexHeldByLayout, index);
00700             break;
00701         }
00702     }
00703
00704 #ifdef DBG
00705     if (VirtualizationInfo::GetLogItemIndex() == index)
00706     {
00707         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, element, index);
00708     }
00709 #endif // DBG
00710
00711     return element;
00712 }
00713
00714 // There are several cases handled here with respect to which element gets returned and when DataContext is modified.
00715 //
00716 // 1. If there is no ItemTemplate:
00717 //    1.1 If data is a UIElement -> the data is returned
00718 //    1.2 If data is not a UIElement -> a default DataTemplate is used to fetch element and DataContext is set to data**
00719 //
00720 // 2. If there is an ItemTemplate:
00721 //    2.1 If data is not a FrameworkElement -> Element is fetched from ElementFactory and DataContext is set to the data**
00722 //    2.2 If data is a FrameworkElement:
00723 //        2.2.1 If Element returned by the ElementFactory is the same as the data -> Element (a.k.a. data) is returned as is
00724 //        2.2.2 If Element returned by the ElementFactory is not the same as the data
00725 //                 -> Element that is fetched from the ElementFactory is returned and
00726 //                    DataContext is set to the data's DataContext (if it exists), otherwise it is set to the data itself**
00727 //
00728 // **data context is set only if no x:Bind was used. ie. No data template component on the root.
00729 winrt::UIElement ViewManager::GetElementFromElementFactory(int index)
00730 {
00731     // The view generator is the provider of last resort.
00732     auto const data = m_owner->ItemsSourceView().GetAt(index);
00733
00734     auto const element = [this, data, index, providedElementFactory = m_owner->ItemTemplateShim()]()
00735     {
00736         if (!providedElementFactory)
00737         {
00738             if (auto const dataAsElement = data.try_as<winrt::UIElement>())
00739             {
00740                 return dataAsElement;
00741             }
00742         }
00743
00744         auto const elementFactory = [this, providedElementFactory]()
00745         {
00746             if (!providedElementFactory)
00747             {
00748                 // If no ItemTemplate was provided, use a default
00749                 auto const factory = winrt::XamlReader::Load(L"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'><TextBlock Text='{Binding}'/></DataTemplate>").as<winrt::DataTemplate>();
00750                 m_owner->ItemTemplate(factory);
00751                 return m_owner->ItemTemplateShim();
00752             }
00753             return providedElementFactory;
00754         }();
00755
00756         auto const args = [this]()
00757         {
00758             if (!m_ElementFactoryGetArgs)
00759             {
00760                 m_ElementFactoryGetArgs = tracker_ref<winrt::ElementFactoryGetArgs>(m_owner, winrt::ElementFactoryGetArgs());
00761             }
00762             return m_ElementFactoryGetArgs.get();
00763         }();
00764
00765         auto scopeGuard = gsl::finally([args]()
00766             {
00767                 args.Data(nullptr);
00768                 args.Parent(nullptr);
00769             });
00770
00771         args.Data(data);
00772         args.Parent(*m_owner);
00773         RepeaterTestHooks::SetElementFactoryElementIndex(index);
00774
00775         return elementFactory.GetElement(args);
00776     }();
00777
00778     auto virtInfo = ItemsRepeater::TryGetVirtualizationInfo(element);
00779     if (!virtInfo)
00780     {
00781         virtInfo = ItemsRepeater::CreateAndInitializeVirtualizationInfo(element);
00782         ITEMSREPEATER_TRACE_PERF_DBG(L"ElementCreated");
00783     }
00784     else
00785     {
00786         // View obtained from ElementFactory already has a VirtualizationInfo attached to it
00787         // which means that the element has been recycled and not created from scratch.
00788         ITEMSREPEATER_TRACE_PERF_DBG(L"ElementRecycled");
00789     }
00790     // Clear flag
00791     virtInfo->MustClearDataContext(false);
00792
00793     if (data != element)
00794     {
00795         // Prepare the element
00796         // If we are phasing, run phase 0 before setting DataContext. If phase 0 is not
00797         // run before setting DataContext, when setting DataContext all the phases will be
00798         // run in the OnDataContextChanged handler in code generated by the xaml compiler (code-gen).
00799         if (auto extension = CachedVisualTreeHelpers::GetDataTemplateComponent(element))
00800         {
00801             // Clear out old data.
00802             extension.Recycle();
00803             int nextPhase = VirtualizationInfo::PhaseReachedEnd;
00804             // Run Phase 0
00805             extension.ProcessBindings(data, index, 0 /* currentPhase */, nextPhase);
00806
00807             // Setup phasing information, so that Phaser can pick up any pending phases left.
00808             // Update phase on virtInfo. Set data and templateComponent only if x:Phase was used.
00809             virtInfo->UpdatePhasingInfo(nextPhase, nextPhase > 0 ? data : nullptr, nextPhase > 0 ? extension : nullptr);
00810         }
00811         else if (auto elementAsFE = element.try_as<winrt::FrameworkElement>())
00812         {
00813             // Set data context only if no x:Bind was used. ie. No data template component on the root.
00814             // If the passed in data is a UIElement and is different from the element returned by
00815             // the template factory then we need to propagate the DataContext.
00816             // Otherwise just set the DataContext on the element as the data.
00817             auto const elementDataContext = [this, data]()
00818             {
00819                 if (auto const dataAsElement = data.try_as<winrt::FrameworkElement>())
00820                 {
00821                     if (auto const dataDataContext = dataAsElement.DataContext())
00822                     {
00823                         return dataDataContext;
00824                     }
00825                 }
00826                 return data;
00827             }();
00828
00829             elementAsFE.DataContext(elementDataContext);
00830             virtInfo->MustClearDataContext(true);
00831         }
00832         else
00833         {
00834             MUX_ASSERT(L"Element returned by factory is not a FrameworkElement!");
00835         }
00836     }
00837
00838     virtInfo->MoveOwnershipToLayoutFromElementFactory(
00839         index,
00840         /* uniqueId: */
00841         m_owner->ItemsSourceView().HasKeyIndexMapping() ?
00842         m_owner->ItemsSourceView().KeyFromIndex(index) :
00843         winrt::hstring{});
00844
00845     // The view generator is the only provider that prepares the element.
00846     auto repeater = m_owner;
00847
00848     // Add the element to the children collection here before raising OnElementPrepared so
00849     // that handlers can walk up the tree in case they want to find their IndexPath in the
00850     // nested case.
00851     auto children = repeater->Children();
00852     if (CachedVisualTreeHelpers::GetParent(element) != static_cast<winrt::DependencyObject>(*repeater))
00853     {
00854         children.Append(element);
00855     }
00856
00857     repeater->TransitionManager().OnElementPrepared(element);
00858
00859     repeater->OnElementPrepared(element, index);
00860
00861     if (data != element)
00862     {
00863         m_phaser.PhaseElement(element, virtInfo);
00864     }
00865
00866     // Update realized indices
00867     m_firstRealizedElementIndexHeldByLayout = std::min(m_firstRealizedElementIndexHeldByLayout, index);
00868     m_lastRealizedElementIndexHeldByLayout = std::max(m_lastRealizedElementIndexHeldByLayout, index);
00869
00870 #ifdef DBG
00871     if (VirtualizationInfo::GetLogItemIndex() == index)
00872     {
00873         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_PTR_INT, METH_NAME, this, element, index);
00874     }
00875 #endif // DBG
00876
00877     return element;
00878 }
00879
00880 #pragma endregion
00881
00882 #pragma region ClearElement handlers
00883
00884 bool ViewManager::ClearElementToUniqueIdResetPool(const winrt::UIElement& element, const winrt::com_ptr<VirtualizationInfo>& virtInfo)
00885 {
00886     if (m_isDataSourceStableResetPending)
00887     {
00888         m_resetPool.Add(element);
00889         virtInfo->MoveOwnershipToUniqueIdResetPoolFromLayout();
00890     }
00891
00892     return m_isDataSourceStableResetPending;
00893 }
00894
00895 bool ViewManager::ClearElementToAnimator(const winrt::UIElement& element, const winrt::com_ptr<VirtualizationInfo>& virtInfo)
00896 {
00897     const bool cleared = m_owner->TransitionManager().ClearElement(element);
00898     if (cleared)
00899     {
00900         const int clearedIndex = virtInfo->Index();
00901         virtInfo->MoveOwnershipToAnimator();
00902         if (m_lastFocusedElement == element)
00903         {
00904             // Focused element is going away. Remove the tracked last focused element
00905             // and pick a reasonable next focus if we can find one within the layout
00906             // realized elements.
00907             MoveFocusFromClearedIndex(clearedIndex);
00908         }
00909
00910     }
00911     return cleared;
00912 }
00913
00914 bool ViewManager::ClearElementToPinnedPool(const winrt::UIElement& element, const winrt::com_ptr<VirtualizationInfo>& virtInfo, bool isClearedDueToCollectionChange)
00915 {
00916     const bool isInPinnedPool = virtInfo->IsInPinnedPool();
00917     const bool moveToPinnedPool =
00918         !isClearedDueToCollectionChange && virtInfo->IsPinned() && !isInPinnedPool;
00919
00920     if (moveToPinnedPool)
00921     {
00922 #ifdef DBG
00923         if (VirtualizationInfo::GetLogItemIndex() == virtInfo->Index())
00924         {
00925             ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Element added to PinnedPool.", VirtualizationInfo::GetLogItemIndex());
00926         }
00927 #endif // DBG
00928
00929 #ifdef DBG
00930         for (size_t i = 0; i < m_pinnedPool.size(); ++i)
00931         {
00932             MUX_ASSERT(m_pinnedPool[i].PinnedElement() != element);
00933         }
00934 #endif
00935         m_pinnedPool.push_back(PinnedElementInfo(m_owner, element));
00936         virtInfo->MoveOwnershipToPinnedPool();
00937     }
00938
00939     // Element is already in pinnedPool or is moved to pinnedPool. Both mean element is cleared.
00940     return isInPinnedPool || moveToPinnedPool;
00941 }
00942
00943 #pragma endregion
00944
00945 void ViewManager::UpdateFocusedElement()
00946 {
00947     auto owner = static_cast<winrt::UIElement>(*m_owner);
00948     winrt::UIElement focusedElement = nullptr;
00949     winrt::DependencyObject child = nullptr;
00950
00951     auto xamlRoot = owner.XamlRoot();
00952     if (xamlRoot)
00953     {
00954         child = winrt::FocusManager::GetFocusedElement(xamlRoot).as<winrt::DependencyObject>();
00955     }
00956
00957     if (child)
00958     {
00959         auto parent = CachedVisualTreeHelpers::GetParent(child);
00960
00961         // Find out if the focused element belongs to one of our direct
00962         // children.
00963         while (parent)
00964         {
00965             auto repeater = parent.try_as<winrt::ItemsRepeater>();
00966             if (repeater)
00967             {
00968                 auto element = child.as<winrt::UIElement>();
00969                 if (repeater == owner && ItemsRepeater::GetVirtualizationInfo(element)->IsRealized())
00970                 {
00971                     focusedElement = element;
00972                 }
00973
00974                 break;
00975             }
00976
00977             child = parent;
00978             parent = CachedVisualTreeHelpers::GetParent(child);
00979         }
00980     }
00981
00982     // If the focused element has changed,
00983     // we need to unpin the old one and pin the new one.
00984     if (m_lastFocusedElement != focusedElement)
00985     {
00986         if (m_lastFocusedElement)
00987         {
00988             UpdatePin(m_lastFocusedElement.get(), false /* addPin */);
00989         }
00990
00991         if (focusedElement)
00992         {
00993             UpdatePin(focusedElement, true /* addPin */);
00994         }
00995
00996         m_lastFocusedElement.set(focusedElement);
00997     }
00998 }
00999
01000 void ViewManager::OnFocusChanged(const winrt::IInspectable&, const winrt::RoutedEventArgs&)
01001 {
01002     UpdateFocusedElement();
01003 }
01004
01005 void ViewManager::EnsureEventSubscriptions()
01006 {
01007     if (!m_gotFocus)
01008     {
01009         MUX_ASSERT(!m_lostFocus);
01010         m_gotFocus = m_owner->GotFocus(winrt::auto_revoke, { this, &ViewManager::OnFocusChanged });
01011         m_lostFocus = m_owner->LostFocus(winrt::auto_revoke, { this, &ViewManager::OnFocusChanged });
01012     }
01013 }
01014
01015 void ViewManager::UpdateElementIndex(const winrt::UIElement& element, const winrt::com_ptr<VirtualizationInfo>& virtInfo, int index)
01016 {
01017     const auto oldIndex = virtInfo->Index();
01018     if (oldIndex != index)
01019     {
01020         virtInfo->UpdateIndex(index);
01021         m_owner->OnElementIndexChanged(element, oldIndex, index);
01022     }
01023 }
01024
01025 void ViewManager::InvalidateRealizedIndicesHeldByLayout()
01026 {
01027     m_firstRealizedElementIndexHeldByLayout = FirstRealizedElementIndexDefault;
01028     m_lastRealizedElementIndexHeldByLayout = LastRealizedElementIndexDefault;
01029 }
01030
01031 ViewManager::PinnedElementInfo::PinnedElementInfo(const ITrackerHandleManager* owner, const winrt::UIElement& element) :
01032     m_pinnedElement(owner, element),
01033     m_virtInfo(owner, ItemsRepeater::GetVirtualizationInfo(element))
01034 {
01035     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, m_virtInfo.get()->Index());
01036 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DropDownButtonAutomationPeer Member List

This is the complete list of members for DropDownButtonAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
Collapse() | DropDownButtonAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< DropDownButtonAutomationPeer > &&self) noexcept | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline, static]
DropDownButtonAutomationPeer(winrt::DropDownButton const &owner) | DropDownButtonAutomationPeer |
EnsureReferenceTrackerInterfaces() | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
Expand() | DropDownButtonAutomationPeer |
ExpandCollapseState() | DropDownButtonAutomationPeer |
final_release(std::unique_ptr< DropDownButtonAutomationPeer > &&self) | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline, static]
GetBase() | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
GetClassNameCore() | DropDownButtonAutomationPeer |
GetImpl() | DropDownButtonAutomationPeer | [private]
GetInner() | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
GetPatternCore(winrt::PatternInterface const &patternInterface) | DropDownButtonAutomationPeer |
IsOnThread() | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UniformGridLayout Member List

This is the complete list of members for UniformGridLayout, including all inherited members.
abi_enter() | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
Algorithm_GetAnchorForRealizationRect(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override | UniformGridLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetAnchorForRealizationRect(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetAnchorForTargetElement(int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override | UniformGridLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetAnchorForTargetElement(int targetIndex, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetExtent(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds) override | UniformGridLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetExtent(const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context, const winrt::UIElement &firstRealized, int firstRealizedItemIndex, const winrt::Rect &firstRealizedLayoutBounds, const winrt::UIElement &lastRealized, int lastRealizedItemIndex, const winrt::Rect &lastRealizedLayoutBounds)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetMeasureSize(int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context) override | UniformGridLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetMeasureSize(int index, const winrt::Size &availableSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_GetProvisionalArrangeSize(int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context) override | UniformGridLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_GetProvisionalArrangeSize(int index, const winrt::Size &measureSize, winrt::Size const &desiredSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_OnElementMeasured(const winrt::UIElement &, int, const winrt::Size &, const winrt::Size &, const winrt::Size &, const winrt::Size &, const winrt::VirtualizingLayoutContext &) override | UniformGridLayout | [inline]
IFlowLayoutAlgorithmDelegates::Algorithm_OnElementMeasured(const winrt::UIElement &element, int index, const winrt::Size &availableSize, const winrt::Size &measureSize, const winrt::Size &desiredSize, const winrt::Size &provisionalArrangeSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_OnLineArranged(int, int, double, const winrt::VirtualizingLayoutContext &) override | UniformGridLayout | [inline]
IFlowLayoutAlgorithmDelegates::Algorithm_OnLineArranged(int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext &context)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
Algorithm_ShouldBreakLine(int index, double remainingSpace) override | UniformGridLayout |
IFlowLayoutAlgorithmDelegates::Algorithm_ShouldBreakLine(int index, double remainingSpace)=0 | IFlowLayoutAlgorithmDelegates | [pure virtual]
ArrangeOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize) | UniformGridLayout |
CheckThread() | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
ClearProperties() | UniformGridLayoutProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< UniformGridLayout > &&self) noexcept | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline, static]
EnsureProperties() | UniformGridLayoutProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
final_release(std::unique_ptr< UniformGridLayout > &&self) | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline, static]
GetAsGridState(const winrt::IInspectable &state) | UniformGridLayout | [inline, private]
GetBase() | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
GetFlowAlgorithm(const winrt::VirtualizingLayoutContext &context) | UniformGridLayout | [inline, private]
GetInner() | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
GetItemsPerLine(winrt::Size const &availableSize, winrt::VirtualizingLayoutContext const &context) | UniformGridLayout | [private]
GetLayoutRectForDataIndex(const winrt::Size &availableSize, int index, const winrt::Rect &lastExtent, const winrt::VirtualizingLayoutContext &context) | UniformGridLayout | [private]
GetMajorSizeWithSpacing(winrt::VirtualizingLayoutContext const &context) | UniformGridLayout | [private]
GetMinorSizeWithSpacing(winrt::VirtualizingLayoutContext const &context) | UniformGridLayout | [private]
GetScrollOrientation() const | OrientationBasedMeasures | [inline]
InitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | UniformGridLayout |
InvalidateLayout() | UniformGridLayout | [inline, private]
IsOnThread() | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
ItemsJustification(winrt::UniformGridLayoutItemsJustification const &value) | UniformGridLayoutProperties |
ItemsJustification() | UniformGridLayoutProperties |
ItemsJustificationProperty() | UniformGridLayoutProperties | [inline, static]
ItemsStretch(winrt::UniformGridLayoutItemsStretch const &value) | UniformGridLayoutProperties |
ItemsStretch() | UniformGridLayoutProperties |
ItemsStretchProperty() | UniformGridLayoutProperties | [inline, static]
LineSpacing() | UniformGridLayout | [inline, private]
Major(const winrt::Size &size) | OrientationBasedMeasures |
MajorEnd(const winrt::Rect &rect) const | OrientationBasedMeasures |
MajorSize(const winrt::Rect &rect) | OrientationBasedMeasures |
MajorStart(const winrt::Rect &rect) | OrientationBasedMeasures |
MaximumRowsOrColumns(int value) | UniformGridLayoutProperties |
MaximumRowsOrColumns() | UniformGridLayoutProperties |
MaximumRowsOrColumnsProperty() | UniformGridLayoutProperties | [inline, static]
MeasureOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize) | UniformGridLayout |
MinColumnSpacing(double value) | UniformGridLayoutProperties |
MinColumnSpacing() | UniformGridLayoutProperties |
MinColumnSpacingProperty() | UniformGridLayoutProperties | [inline, static]
MinItemHeight(double value) | UniformGridLayoutProperties |
MinItemHeight() | UniformGridLayoutProperties |
MinItemHeightProperty() | UniformGridLayoutProperties | [inline, static]
MinItemSpacing() | UniformGridLayout | [inline, private]
MinItemWidth(double value) | UniformGridLayoutProperties |
MinItemWidth() | UniformGridLayoutProperties |
MinItemWidthProperty() | UniformGridLayoutProperties | [inline, static]
Minor(const winrt::Size &size) | OrientationBasedMeasures |
MinorEnd(const winrt::Rect &rect) const | OrientationBasedMeasures |
MinorMajorPoint(float minor, float major) | OrientationBasedMeasures |
MinorMajorRect(float minor, float major, float minorSize, float majorSize) | OrientationBasedMeasures |
MinorMajorSize(float minor, float major) | OrientationBasedMeasures |
MinorSize(const winrt::Rect &rect) | OrientationBasedMeasures |
MinorStart(const winrt::Rect &rect) | OrientationBasedMeasures |
MinRowSpacing(double value) | UniformGridLayoutProperties |
MinRowSpacing() | UniformGridLayoutProperties |
MinRowSpacingProperty() | UniformGridLayoutProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
OnItemsChangedCore(winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args) | UniformGridLayout |
OnItemsJustificationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnItemsStretchPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMaximumRowsOrColumnsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinColumnSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinItemHeightPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinItemWidthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnMinRowSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | UniformGridLayoutProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | UniformGridLayout |
Orientation(winrt::Orientation const &value) | UniformGridLayoutProperties |
Orientation() | UniformGridLayoutProperties |
OrientationProperty() | UniformGridLayoutProperties | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout > | [inline]
s_ItemsJustificationProperty | UniformGridLayoutProperties | [static]
s_ItemsStretchProperty | UniformGridLayoutProperties | [static]
s_MaximumRowsOrColumnsProperty | UniformGridLayoutProperties | [static]
s_MinColumnSpacingProperty | UniformGridLayoutProperties | [static]
s_MinItemHeightProperty | UniformGridLayoutProperties | [static]
s_MinItemWidthProperty | UniformGridLayoutProperties | [static]
s_MinRowSpacingProperty | UniformGridLayoutProperties | [static]
s_OrientationProperty | UniformGridLayoutProperties | [static]
SetScrollOrientation(ScrollOrientation value) | OrientationBasedMeasures | [inline]
UniformGridLayout() | UniformGridLayout |
UniformGridLayoutProperties() | UniformGridLayoutProperties |
UninitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | UniformGridLayout |
UpdateIndexBasedLayoutOrientation(const winrt::Orientation &orientation) | UniformGridLayout | [private]
~IFlowLayoutAlgorithmDelegates() | IFlowLayoutAlgorithmDelegates | [virtual]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Person Member List

This is the complete list of members for Person, including all inherited members.
_id | Person | [private]
Id | Person |
Person(string id) | Person | [inline]
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Category Member List

This is the complete list of members for Category, including all inherited members.
Name Category
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarFlyoutItemAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarFlyoutItemAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarFlyoutItemAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InkToolBarFlyoutItemAutomationPeer)
00012 }
00013
00014 #include "InkToolBarFlyoutItemAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BrightnessSun Member List

This is the complete list of members for BrightnessSun, including all inherited members.
c_durationTicks | BrightnessSun | [private]
double | BrightnessSun |
Duration | BrightnessSun |
FrameCount | BrightnessSun |
Framerate | BrightnessSun |
FrameToProgress(double frameNumber) | BrightnessSun | [inline]
Markers | BrightnessSun |
SetColorProperty(string propertyName, Color value) | BrightnessSun | [inline]
SetScalarProperty(string propertyName, double value) | BrightnessSun | [inline]
TryCreateAnimatedVisual(Compositor compositor) | BrightnessSun | [inline]
TryCreateAnimatedVisual(Compositor compositor, out object diagnostics) | BrightnessSun | [inline]
Generated on Sun Dec 1 2024 20:53:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/AccessibilityTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

AccessibilityTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks;
00006 using MUXControlsTestApp.Utilities;
00007 using System;
00008 using System.Collections.Generic;
00009 using System.Collections.ObjectModel;
00010 using System.Linq;
00011 using Windows.Foundation;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Automation;
00014 using Microsoft.UI.Xaml.Automation.Peers;
00015 using Microsoft.UI.Xaml.Controls;
00016 using Common;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00023 {
00024     [TestClass]
00025     public class AccessibilityTests : ApiTestBase
00026     {
00027         [TestMethod]
00028         public void ValidateChildrenPeers()
00029         {
00030             RunOnUIThread.Execute(() =>
00031             {
00032                 var data = new ObservableCollection<string>(Enumerable.Range(0, 3).Select(i => string.Format("Item #{0}", i)));
00033                 var dataSource = MockItemsSource.CreateDataSource(data, supportsUniqueIds: false);
00034
00035                 // StackPanel doesn't have an automation peer, but we still need
00036                 // to report its children's peer.
00037                 var group = new StackPanel();
00038                 group.Children.Add(new ListViewItem());
00039                 group.Children.Add(new ListViewItem());
00040
00041                 var mapping = new Dictionary<int, UIElement>
00042                 {
00043                     { 0, new ListViewItem() },
00044                     { 1, new ListViewItem() },
00045                     { 2, group },
00046                 };
00047
00048                 var elementFactory = MockElementFactory.CreateElementFactory(mapping);
00049                 var layout = new MockVirtualizingLayout
00050                 {
00051                     MeasureLayoutFunc = (availableSize, context) =>
00052                     {
00053                         var ctx = (VirtualizingLayoutContext)context;
00054
00055                         // Realize elements 0, 1, 2 in a random order.
00056                         ctx.GetOrCreateElementAt(2);
00057                         ctx.GetOrCreateElementAt(0);
00058                         var element1 = ctx.GetOrCreateElementAt(1);
00059
00060                         // Clear element 1 because we will be validating
00061                         // that we ignore unrealized elements.
00062                         ctx.RecycleElement(element1);
00063
00064                         return default(Size);
00065                     }
00066                 };
00067
00068                 var repeater = CreateRepeater(dataSource, elementFactory, layout);
00069
00070                 Content = repeater;
00071                 repeater.UpdateLayout();
00072
00073                 var peer = FrameworkElementAutomationPeer.CreatePeerForElement(repeater);
00074                 var children = peer.GetChildren().Select(p => ((FrameworkElementAutomationPeer)p).Owner).ToList();
00075
00076                 Verify.AreEqual(3, children.Count);
00077                 Verify.AreEqual(mapping[0], children[0]);
00078                 Verify.AreEqual(group.Children[0], children[1]);
00079                 Verify.AreEqual(group.Children[1], children[2]);
00080             });
00081         }
00082
00083         private ItemsRepeater CreateRepeater(object dataSource, object elementFactory, VirtualizingLayout layout = null)
00084         {
00085             var repeater = new ItemsRepeater
00086             {
00087                 ItemsSource = dataSource,
00088                 ItemTemplate = elementFactory,
00089             };
00090             repeater.Layout = layout ?? CreateLayout(repeater);
00091             return repeater;
00092         }
00093
00094         private VirtualizingLayout CreateLayout(ItemsRepeater repeater)
00095         {
00096             var layout = new MockVirtualizingLayout();
00097             var children = new List<UIElement>();
00098
00099             layout.MeasureLayoutFunc = (availableSize, context) =>
00100             {
00101                 repeater.Tag = repeater.Tag ?? context;
00102                 children.Clear();
00103                 var itemCount = context.ItemCount;
00104
00105                 for (int i = 0; i < itemCount; ++i)
00106                 {
00107                     var element = repeater.TryGetElement(i) ?? context.GetOrCreateElementAt(i);
00108                     element.Measure(availableSize);
00109                     children.Add(element);
00110                 }
00111
00112                 return new Size(10, 10);
00113             };
00114
00115             return layout;
00116         }
00117     }
00118 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/InteractionTests/ParallaxViewTests.cs Source File

  • File List
  • File Members
  • ParallaxView
  • InteractionTests

ParallaxViewTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00005 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00006 using Common;
00007
00008 using WEX.TestExecution;
00009 using WEX.TestExecution.Markup;
00010 using WEX.Logging.Interop;
00011
00012 using Microsoft.Windows.Apps.Test.Automation;
00013 using Microsoft.Windows.Apps.Test.Foundation;
00014 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00015 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00016 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00017
00018 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00019 {
00020     [TestClass]
00021     public class ParallaxViewTests
00022     {
00023         private enum SourceType
00024         {
00025             ScrollViewer,
00026             ScrollPresenter,
00027         }
00028
00029         [ClassInitialize]
00030         [TestProperty("RunAs", "User")]
00031         [TestProperty("Classification", "Integration")]
00032         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00033         [TestProperty("MinVersion", "RS1")]
00034         public static void ClassInitialize(TestContext testContext)
00035         {
00036             TestEnvironment.Initialize(testContext);
00037         }
00038
00039         [TestCleanup]
00040         public void TestCleanup()
00041         {
00042             TestCleanupHelper.Cleanup();
00043         }
00044
00045         // Pans a ListView with a parallaxing background Image.
00046         [TestMethod]
00047         public void TargetListViewBackground()
00048         {
00049             Log.Comment("Selecting ParallaxView tests");
00050
00051             using (var setup = new TestSetupHelper("ParallaxView Tests"))
00052             {
00053                 Log.Comment("Navigating to ListViewBackgroundPage");
00054                 UIObject navigateToListViewBackgroundUIObject = FindElement.ByName("navigateToListViewBackground");
00055                 Verify.IsNotNull(navigateToListViewBackgroundUIObject, "Verifying that navigateToListViewBackground Button was found");
00056
00057                 Button navigateToListViewBackgroundButton = new Button(navigateToListViewBackgroundUIObject);
00058                 navigateToListViewBackgroundButton.Invoke();
00059                 Wait.ForIdle();
00060
00061                 Log.Comment("Retrieving ListView");
00062                 UIObject ingredientListUIObject = FindElement.ByName("IngredientList");
00063                 Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView was found");
00064
00065                 Log.Comment("Panning ListView");
00066                 InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
00067                 Wait.ForIdle();
00068
00069                 Log.Comment("Returning to the main ParallaxView test page");
00070                 TestSetupHelper.GoBack();
00071             }
00072         }
00073
00074         // Pans a ListView with a parallaxing Image in each item.
00075         [TestMethod]
00076         public void TargetListViewItem()
00077         {
00078             Log.Comment("Selecting ParallaxView tests");
00079
00080             using (var setup = new TestSetupHelper("ParallaxView Tests"))
00081             {
00082                 Log.Comment("Navigating to ListViewItemPage");
00083                 UIObject navigateToListViewItemUIObject = FindElement.ByName("navigateToListViewItem");
00084                 Verify.IsNotNull(navigateToListViewItemUIObject, "Verifying that navigateToListViewItem Button was found");
00085
00086                 Button navigateToListViewItemButton = new Button(navigateToListViewItemUIObject);
00087                 navigateToListViewItemButton.Invoke();
00088                 Wait.ForIdle();
00089
00090                 Log.Comment("Retrieving ListView");
00091                 UIObject ingredientListUIObject = FindElement.ByName("IngredientList");
00092                 Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView was found");
00093
00094                 Log.Comment("Panning ListView");
00095                 InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
00096                 Wait.ForIdle();
00097
00098                 Log.Comment("Returning to the main ParallaxView test page");
00099                 TestSetupHelper.GoBack();
00100             }
00101         }
00102
00103         // Pans a ListView with a parallaxing Image in the header.
00104         [TestMethod]
00105         public void TargetListViewHeader()
00106         {
00107             Log.Comment("Selecting ParallaxView tests");
00108
00109             using (var setup = new TestSetupHelper("ParallaxView Tests"))
00110             {
00111                 Log.Comment("Navigating to ListViewHeaderPage");
00112                 UIObject navigateToListViewHeaderUIObject = FindElement.ByName("navigateToListViewHeader");
00113                 Verify.IsNotNull(navigateToListViewHeaderUIObject, "Verifying that navigateToListViewHeader Button was found");
00114
00115                 Button navigateToListViewHeaderButton = new Button(navigateToListViewHeaderUIObject);
00116                 navigateToListViewHeaderButton.Invoke();
00117                 Wait.ForIdle();
00118
00119                 Log.Comment("Retrieving ListView #1");
00120                 UIObject ingredientListUIObject = FindElement.ByName("IngredientList1");
00121                 Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView #1 was found");
00122
00123                 Log.Comment("Panning ListView #1");
00124                 InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
00125                 Wait.ForIdle();
00126
00127                 Log.Comment("Retrieving ListView #2");
00128                 ingredientListUIObject = FindElement.ByName("IngredientList2");
00129                 Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView #2 was found");
00130
00131                 Log.Comment("Panning ListView #2");
00132                 InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
00133                 Wait.ForIdle();
00134
00135                 Log.Comment("Retrieving ListView #3");
00136                 ingredientListUIObject = FindElement.ByName("IngredientList3");
00137                 Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView #3 was found");
00138
00139                 Log.Comment("Panning ListView #3");
00140                 InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
00141                 Wait.ForIdle();
00142
00143                 Log.Comment("Returning to the main ParallaxView test page");
00144                 TestSetupHelper.GoBack();
00145             }
00146         }
00147
00148         // Pans a ListView with a parallaxing background Image, while the ItemsPanel is a VirtualizingStackPanel.
00149         [TestMethod]
00150         public void UseVirtualizingStackPanelSource()
00151         {
00152             Log.Comment("Selecting ParallaxView tests");
00153
00154             using (var setup = new TestSetupHelper("ParallaxView Tests"))
00155             {
00156                 Log.Comment("Navigating to VirtualizingStackPanelPage");
00157                 UIObject navigateToVSPUIObject = FindElement.ByName("navigateToVSP");
00158                 Verify.IsNotNull(navigateToVSPUIObject, "Verifying that navigateToVSP Button was found");
00159
00160                 Button navigateToVSPButton = new Button(navigateToVSPUIObject);
00161                 navigateToVSPButton.Invoke();
00162                 Wait.ForIdle();
00163
00164                 Log.Comment("Retrieving ListView");
00165                 UIObject ingredientListUIObject = FindElement.ByName("IngredientList");
00166                 Verify.IsNotNull(ingredientListUIObject, "Verifying that ingredientList ListView was found");
00167
00168                 Log.Comment("Panning ListView");
00169                 InputHelper.Pan(ingredientListUIObject, 50, Direction.North);
00170                 Wait.ForIdle();
00171
00172                 Log.Comment("Returning to the main ParallaxView test page");
00173                 TestSetupHelper.GoBack();
00174             }
00175         }
00176
00177
00178         // Pans a TextBox with a parallaxing background Image.
00179         [TestMethod]
00180         public void UseTextControlSource()
00181         {
00182             Log.Comment("Selecting ParallaxView tests");
00183
00184             using (var setup = new TestSetupHelper("ParallaxView Tests"))
00185             {
00186                 Log.Comment("Navigating to TextPage");
00187                 UIObject navigateToTextUIObject = FindElement.ByName("navigateToText");
00188                 Verify.IsNotNull(navigateToTextUIObject, "Verifying that navigateToText Button was found");
00189
00190                 Button navigateToTextButton = new Button(navigateToTextUIObject);
00191                 navigateToTextButton.Invoke();
00192                 Wait.ForIdle();
00193
00194                 Log.Comment("Retrieving TextBox");
00195                 UIObject textBoxUIObject = FindElement.ByName("textBox");
00196                 Verify.IsNotNull(textBoxUIObject, "Verifying that textBox was found");
00197
00198                 Log.Comment("Retrieving RichEditBox");
00199                 UIObject richEditBoxUIObject = FindElement.ByName("richEditBox");
00200                 Verify.IsNotNull(richEditBoxUIObject, "Verifying that RichEditBox was found");
00201
00202                 Log.Comment("Tapping RichEditBox");
00203                 InputHelper.Tap(richEditBoxUIObject);
00204
00205                 Log.Comment("Panning TextBox");
00206                 InputHelper.Pan(textBoxUIObject, 50, Direction.North);
00207                 Wait.ForIdle();
00208
00209                 Log.Comment("Returning to the main ParallaxView test page");
00210                 TestSetupHelper.GoBack();
00211             }
00212         }
00213
00214         // Sets ParallaxView's Source and Child properties and pans the ScrollViewer source.
00215         [TestMethod]
00216         public void ChangeSourceAndTargetPropertiesUsingScrollViewer()
00217         {
00218             ChangeSourceAndTargetProperties(SourceType.ScrollViewer);
00219         }
00220
00221         // Sets ParallaxView's Source and Child properties and pans the ScrollPresenter source.
00222         [TestMethod]
00223         public void ChangeSourceAndTargetPropertiesUsingScrollPresenter()
00224         {
00225             ChangeSourceAndTargetProperties(SourceType.ScrollPresenter);
00226         }
00227
00228         private void ChangeSourceAndTargetProperties(SourceType sourceType)
00229         {
00230             Log.Comment("Selecting ParallaxView tests");
00231
00232             using (var setup = new TestSetupHelper("ParallaxView Tests"))
00233             {
00234                 Log.Comment("Navigating to DynamicPage");
00235                 UIObject navigateToDynamicUIObject = FindElement.ByName("navigateToDynamic");
00236                 Verify.IsNotNull(navigateToDynamicUIObject, "Verifying that navigateToDynamic Button was found");
00237
00238                 Button navigateToDynamicButton = new Button(navigateToDynamicUIObject);
00239                 navigateToDynamicButton.Invoke();
00240                 Wait.ForIdle();
00241
00242                 string sourceName = sourceType == SourceType.ScrollViewer ? "scrollViewer" : "scrollPresenter";
00243
00244                 SelectSource(sourceName);
00245                 Wait.ForIdle();
00246
00247                 SelectTarget("img");
00248                 Wait.ForIdle();
00249
00250                 WriteInTextBox("txtVerticalShift", "100.0");
00251
00252                 Log.Comment("Retrieving SetVerticalShift Button");
00253                 Button setVerticalShiftButton = new Button(FindElement.ByName("btnSetVerticalShift"));
00254
00255                 Log.Comment("Invoke SetVerticalShift Button");
00256                 setVerticalShiftButton.Invoke();
00257
00258                 Log.Comment("Retrieving " + sourceName);
00259                 UIObject sourceUIObject = FindElement.ByName(sourceName);
00260                 Verify.IsNotNull(sourceUIObject, "Verifying that " + sourceName + " was found");
00261
00262                 Log.Comment("Tapping " + sourceName);
00263                 InputHelper.Tap(sourceUIObject);
00264
00265                 Log.Comment("Panning " + sourceName);
00266                 InputHelper.Pan(sourceUIObject, 50, Direction.North);
00267                 Wait.ForIdle();
00268
00269                 Log.Comment("Returning to the main ParallaxView test page");
00270                 TestSetupHelper.GoBack();
00271             }
00272         }
00273
00274         private void SelectSource(string sourceName)
00275         {
00276             Log.Comment("Retrieving Source ComboBox");
00277             ComboBox cmbSource = new ComboBox(FindElement.ByName("cmbSource"));
00278
00279             Log.Comment("Changing the Source ComboBox selection to {0}", sourceName);
00280             cmbSource.SelectItemByName(sourceName);
00281
00282             ComboBoxItem selectedComboBoxItem = cmbSource.Selection[0];
00283             Log.Comment("Source ComboBox selection is now {0}", selectedComboBoxItem.Name);
00284         }
00285
00286         private void SelectTarget(string targetName)
00287         {
00288             Log.Comment("Retrieving Target ComboBox");
00289             ComboBox cmbTargetElement = new ComboBox(FindElement.ByName("cmbTargetElement"));
00290
00291             Log.Comment("Changing the Target ComboBox selection to {0}", targetName);
00292             cmbTargetElement.SelectItemByName(targetName);
00293
00294             ComboBoxItem selectedComboBoxItem = cmbTargetElement.Selection[0];
00295             Log.Comment("Target ComboBox selection is now {0}", selectedComboBoxItem.Name);
00296         }
00297
00298         private void WriteInTextBox(string textBoxName, string text)
00299         {
00300             Log.Comment("Retrieve text box with name '{0}'.", textBoxName);
00301             Edit textBox = new Edit(FindElement.ById(textBoxName));
00302
00303             KeyboardHelper.EnterText(textBox, text);
00304         }
00305     }
00306 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutTrace.h Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsCommandBarFlyoutTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_COMMANDBARFLYOUT || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsCommandBarFlyoutVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_COMMANDBARFLYOUT || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 #define COMMANDBARFLYOUT_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00026 CommandBarFlyoutTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00027
00028 #define COMMANDBARFLYOUT_TRACE_INFO(sender, message, ...) \
00029 if (IsCommandBarFlyoutTracingEnabled()) \
00030 { \
00031     COMMANDBARFLYOUT_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00032 } \
00033 else if (CommandBarFlyoutTrace::s_IsDebugOutputEnabled || CommandBarFlyoutTrace::s_IsVerboseDebugOutputEnabled) \
00034 { \
00035     COMMANDBARFLYOUT_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00036 } \
00037
00038 #define COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00039 CommandBarFlyoutTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00040
00041 #define COMMANDBARFLYOUT_TRACE_VERBOSE(sender, message, ...) \
00042 if (IsCommandBarFlyoutVerboseTracingEnabled()) \
00043 { \
00044     COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00045 } \
00046 else if (CommandBarFlyoutTrace::s_IsVerboseDebugOutputEnabled) \
00047 { \
00048     COMMANDBARFLYOUT_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00049 } \
00050
00051 #define COMMANDBARFLYOUT_TRACE_PERF(info) \
00052 if (IsCommandBarFlyoutPerfTracingEnabled()) \
00053 { \
00054     CommandBarFlyoutTrace::TracePerfInfo(info); \
00055 } \
00056
00057 #ifdef DBG
00058 #define COMMANDBARFLYOUT_TRACE_INFO_DBG(sender, message, ...)    COMMANDBARFLYOUT_TRACE_INFO(sender, message, __VA_ARGS__)
00059 #define COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(sender, message, ...) COMMANDBARFLYOUT_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00060 #define COMMANDBARFLYOUT_TRACE_PERF_DBG(info)                    COMMANDBARFLYOUT_TRACE_PERF(info)
00061 #else
00062 #define COMMANDBARFLYOUT_TRACE_INFO_DBG(sender, message, ...)
00063 #define COMMANDBARFLYOUT_TRACE_VERBOSE_DBG(sender, message, ...)
00064 #define COMMANDBARFLYOUT_TRACE_PERF_DBG(info)
00065 #endif // DBG
00066
00067 class CommandBarFlyoutTrace
00068 {
00069 public:
00070     static bool s_IsDebugOutputEnabled;
00071     static bool s_IsVerboseDebugOutputEnabled;
00072
00073     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00074     {
00075         va_list args;
00076         va_start(args, message);
00077         WCHAR buffer[384]{};
00078         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00079         {
00080             if (includeTraceLogging)
00081             {
00082                 TraceLoggingWrite(
00083                     g_hLoggingProvider,
00084                     "CommandBarFlyoutInfo" /* eventName */,
00085                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00086                     TraceLoggingKeyword(KEYWORD_COMMANDBARFLYOUT),
00087                     TraceLoggingWideString(buffer, "Message"));
00088             }
00089
00090             if (s_IsDebugOutputEnabled)
00091             {
00092                 OutputDebugStringW(buffer);
00093             }
00094
00095             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00096
00097             if (globalTestHooks &&
00098                 (globalTestHooks->GetLoggingLevelForType(L"CommandBarFlyout") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00099             {
00100                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00101             }
00102         }
00103         va_end(args);
00104     }
00105
00106     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00107     {
00108         va_list args;
00109         va_start(args, message);
00110         WCHAR buffer[384]{};
00111         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00112         {
00113             if (includeTraceLogging)
00114             {
00115                 TraceLoggingWrite(
00116                     g_hLoggingProvider,
00117                     "CommandBarFlyoutVerbose" /* eventName */,
00118                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00119                     TraceLoggingKeyword(KEYWORD_COMMANDBARFLYOUT),
00120                     TraceLoggingWideString(buffer, "Message"));
00121             }
00122
00123             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00124             {
00125                 OutputDebugStringW(buffer);
00126             }
00127
00128             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00129
00130             if (globalTestHooks &&
00131                 (globalTestHooks->GetLoggingLevelForType(L"CommandBarFlyout") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00132             {
00133                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00134             }
00135         }
00136         va_end(args);
00137     }
00138 };
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Effects/microsoft.ui.private.composition.effects.idl Source File

  • File List
  • File Members
  • Effects

microsoft.ui.private.composition.effects.idl

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002
00003 #define MUXCONTROLS_VERSION_PARAM 1.0
00004 #define MUXCONTROLS_VERSION_ATTRIBUTE version(MUXCONTROLS_VERSION_PARAM)
00005 #define MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL version(MUXCONTROLS_VERSION_PARAM)
00006
00007 #define EFFECT_ENUM_ATTRIBUTES \
00008     [MUXCONTROLS_VERSION_ATTRIBUTE] \
00009
00010 #define EFFECT_INTERFACE_ATTRIBUTES \
00011     [MUXCONTROLS_VERSION_ATTRIBUTE] \
00012
00013 #define EFFECT_RUNTIMECLASS_ATTRIBUTES \
00014     [MUXCONTROLS_VERSION_ATTRIBUTE] \
00015
00016 #define EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL \
00017     [MUXCONTROLS_VERSION_ATTRIBUTE_NOINTERNAL] \
00018
00019 #define EFFECT_STRUCT_ATTRIBUTES \
00020     [MUXCONTROLS_VERSION_ATTRIBUTE] \
00021
00022
00023 namespace Microsoft.UI.Private.Composition.Effects
00024 {
00025     //----------------------------------------------------------------------------------------------
00026     // Common enums
00027
00028     EFFECT_ENUM_ATTRIBUTES
00029     typedef enum CanvasAlphaMode
00030     {
00031         Premultiplied = (int)0,
00032         Straight = (int)1,
00033         Ignore = (int)2
00034     } CanvasAlphaMode;
00035
00036     EFFECT_ENUM_ATTRIBUTES
00037     typedef enum CanvasEdgeBehavior
00038     {
00039         Clamp = (int)0,
00040         Wrap = (int)1,
00041         Mirror = (int)2
00042     } CanvasEdgeBehavior;
00043
00044     EFFECT_ENUM_ATTRIBUTES
00045     typedef enum CanvasComposite
00046     {
00047         SourceOver = (int)0,
00048         DestinationOver = (int)1,
00049         SourceIn = (int)2,
00050         DestinationIn = (int)3,
00051         SourceOut = (int)4,
00052         DestinationOut = (int)5,
00053         SourceAtop = (int)6,
00054         DestinationAtop = (int)7,
00055         Xor = (int)8,
00056         Add = (int)9,
00057         Copy = (int)10,
00058         BoundedCopy = (int)11,
00059         MaskInvert = (int)12
00060     } CanvasComposite;
00061
00062     EFFECT_ENUM_ATTRIBUTES
00063     typedef enum CanvasImageInterpolation
00064     {
00065         NearestNeighbor = (int)0,
00066         Linear = (int)1,
00067         Cubic = (int)2,
00068         MultiSampleLinear = (int)3,
00069         Anisotropic = (int)4,
00070         HighQualityCubic = (int)5
00071     } CanvasImageInterpolation;
00072
00073     EFFECT_ENUM_ATTRIBUTES
00074     typedef enum CanvasBlend
00075     {
00076         SourceOver = (int)0,
00077         Copy = (int)1,
00078         Min = (int)2,
00079         Add = (int)3
00080     } CanvasBlend;
00081
00082     EFFECT_ENUM_ATTRIBUTES
00083     typedef enum EffectBorderMode
00084     {
00085         Soft = 0,
00086         Hard = 1
00087     } EffectBorderMode;
00088
00089     EFFECT_ENUM_ATTRIBUTES
00090     typedef enum EffectOptimization
00091     {
00092         Speed = 0,
00093         Balanced = 1,
00094         Quality = 2
00095     } EffectOptimization;
00096
00097     EFFECT_ENUM_ATTRIBUTES
00098     typedef enum EffectChannelSelect
00099     {
00100         Red = 0,
00101         Green = 1,
00102         Blue = 2,
00103         Alpha = 3
00104     } EffectChannelSelect;
00105
00106     //----------------------------------------------------------------------------------------------
00107     // Common structs
00108
00109     EFFECT_STRUCT_ATTRIBUTES
00110     typedef struct Matrix5x4
00111     {
00112         float M11, M12, M13, M14;
00113         float M21, M22, M23, M24;
00114         float M31, M32, M33, M34;
00115         float M41, M42, M43, M44;
00116         float M51, M52, M53, M54;
00117     } Matrix5x4;
00118
00119     //----------------------------------------------------------------------------------------------
00120     // Effects
00121
00122     runtimeclass AlphaMaskEffect;
00123
00124     EFFECT_INTERFACE_ATTRIBUTES
00125     [uuid(aefea128-5f3e-4abb-bde8-d53e55f730e4), exclusiveto(AlphaMaskEffect)]
00126     interface IAlphaMaskEffect : IInspectable
00127     {
00128         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00129         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00130
00131         [propget] HRESULT Mask([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00132         [propput] HRESULT Mask([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00133     };
00134
00135     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00136     runtimeclass AlphaMaskEffect
00137         : [default] IAlphaMaskEffect, Windows.Graphics.Effects.IGraphicsEffect
00138     {
00139     }
00140
00141     //----------------------------------------------------------------------------------------------
00142
00143     runtimeclass ArithmeticCompositeEffect;
00144
00145     EFFECT_INTERFACE_ATTRIBUTES
00146     [uuid(beeb682b-d64c-5c8b-a1fb-332162ed099b), exclusiveto(ArithmeticCompositeEffect)]
00147     interface IArithmeticCompositeEffect : IInspectable
00148     {
00149         [propget] HRESULT ClampOutput([out, retval] boolean* value);
00150         [propput] HRESULT ClampOutput([in] boolean value);
00151
00152         [propget] HRESULT MultiplyAmount([out, retval] float* value);
00153         [propput] HRESULT MultiplyAmount([in] float value);
00154
00155         [propget] HRESULT Source1Amount([out, retval] float* value);
00156         [propput] HRESULT Source1Amount([in] float value);
00157
00158         [propget] HRESULT Source2Amount([out, retval] float* value);
00159         [propput] HRESULT Source2Amount([in] float value);
00160
00161         [propget] HRESULT Offset([out, retval] float* value);
00162         [propput] HRESULT Offset([in] float value);
00163
00164         [propget] HRESULT Source1([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00165         [propput] HRESULT Source1([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00166
00167         [propget] HRESULT Source2([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00168         [propput] HRESULT Source2([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00169     };
00170
00171     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00172     runtimeclass ArithmeticCompositeEffect
00173         : [default] IArithmeticCompositeEffect, Windows.Graphics.Effects.IGraphicsEffect
00174     {
00175     }
00176
00177     //----------------------------------------------------------------------------------------------
00178
00179     EFFECT_ENUM_ATTRIBUTES
00180     typedef enum BlendEffectMode
00181     {
00182         Multiply = 0,
00183         Screen = 1,
00184         Darken = 2,
00185         Lighten = 3,
00186         Dissolve = 4,
00187         ColorBurn = 5,
00188         LinearBurn = 6,
00189         DarkerColor = 7,
00190         LighterColor = 8,
00191         ColorDodge = 9,
00192         LinearDodge = 10,
00193         Overlay = 11,
00194         SoftLight = 12,
00195         HardLight = 13,
00196         VividLight = 14,
00197         LinearLight = 15,
00198         PinLight = 16,
00199         HardMix = 17,
00200         Difference = 18,
00201         Exclusion = 19,
00202         Hue = 20,
00203         Saturation = 21,
00204         Color = 22,
00205         Luminosity = 23,
00206         Subtract = 24,
00207         Division = 25
00208     } BlendEffectMode;
00209
00210     runtimeclass BlendEffect;
00211
00212     EFFECT_INTERFACE_ATTRIBUTES
00213     [uuid(5673248e-7266-5e49-b2ab-2589d5d875c2), exclusiveto(BlendEffect)]
00214     interface IBlendEffect : IInspectable
00215     {
00216         [propget] HRESULT Mode([out, retval] BlendEffectMode* value);
00217         [propput] HRESULT Mode([in] BlendEffectMode value);
00218
00219         [propget] HRESULT Background([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00220         [propput] HRESULT Background([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00221
00222         [propget] HRESULT Foreground([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00223         [propput] HRESULT Foreground([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00224     };
00225
00226     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00227     runtimeclass BlendEffect
00228         : [default] IBlendEffect, Windows.Graphics.Effects.IGraphicsEffect
00229     {
00230     }
00231
00232     //----------------------------------------------------------------------------------------------
00233
00234     runtimeclass BorderEffect;
00235
00236     EFFECT_INTERFACE_ATTRIBUTES
00237     [uuid(31602441-15db-5b4a-98dd-ba4247548b40), exclusiveto(BorderEffect)]
00238     interface IBorderEffect : IInspectable
00239     {
00240         [propget] HRESULT ExtendX([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior* value);
00241         [propput] HRESULT ExtendX([in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value);
00242
00243         [propget] HRESULT ExtendY([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior* value);
00244         [propput] HRESULT ExtendY([in] Microsoft.UI.Private.Composition.Effects.CanvasEdgeBehavior value);
00245
00246         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00247         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00248     };
00249
00250     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00251     runtimeclass BorderEffect
00252         : [default] IBorderEffect, Windows.Graphics.Effects.IGraphicsEffect
00253     {
00254     }
00255
00256     //----------------------------------------------------------------------------------------------
00257
00258     runtimeclass ColorMatrixEffect;
00259
00260     EFFECT_INTERFACE_ATTRIBUTES
00261     [uuid(e6ae54c4-883d-588e-b451-e9ebe3830436), exclusiveto(ColorMatrixEffect)]
00262     interface IColorMatrixEffect : IInspectable
00263     {
00264         [propget] HRESULT ColorMatrix([out, retval] Matrix5x4* value);
00265         [propput] HRESULT ColorMatrix([in] Matrix5x4 value);
00266
00267         [propget] HRESULT AlphaMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode* value);
00268         [propput] HRESULT AlphaMode([in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value);
00269
00270         [propget] HRESULT ClampOutput([out, retval] boolean* value);
00271         [propput] HRESULT ClampOutput([in] boolean value);
00272
00273         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00274         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00275     };
00276
00277     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00278     runtimeclass ColorMatrixEffect
00279         : [default] IColorMatrixEffect, Windows.Graphics.Effects.IGraphicsEffect
00280     {
00281     }
00282
00283     //----------------------------------------------------------------------------------------------
00284
00285     runtimeclass ColorSourceEffect;
00286
00287     EFFECT_INTERFACE_ATTRIBUTES
00288     [uuid(25f942c7-7fee-518a-ba7b-22a0060af7f5), exclusiveto(ColorSourceEffect)]
00289     interface IColorSourceEffect : IInspectable
00290     {
00291         [propget] HRESULT Color([out, retval] Windows.UI.Color* value);
00292         [propput] HRESULT Color([in] Windows.UI.Color value);
00293     };
00294
00295     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00296     runtimeclass ColorSourceEffect
00297         : [default] IColorSourceEffect, Windows.Graphics.Effects.IGraphicsEffect
00298     {
00299     }
00300
00301     //----------------------------------------------------------------------------------------------
00302
00303     runtimeclass CompositeStepEffect;
00304
00305     // A variation on the Win2D CompositeEffect that only accepts two sources
00306     EFFECT_INTERFACE_ATTRIBUTES
00307     [uuid(58360908-1b6b-4302-8ecd-cc24b26f27b0), exclusiveto(CompositeStepEffect)]
00308     interface ICompositeStepEffect : IInspectable
00309     {
00310         [propget] HRESULT Mode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasComposite* value);
00311         [propput] HRESULT Mode([in] Microsoft.UI.Private.Composition.Effects.CanvasComposite value);
00312
00313         [propget] HRESULT Destination([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00314         [propput] HRESULT Destination([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00315
00316         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00317         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00318     };
00319
00320     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00321     runtimeclass CompositeStepEffect
00322         : [default] ICompositeStepEffect, Windows.Graphics.Effects.IGraphicsEffect
00323     {
00324     }
00325
00326     //----------------------------------------------------------------------------------------------
00327
00328     runtimeclass ContrastEffect;
00329
00330     EFFECT_INTERFACE_ATTRIBUTES
00331     [uuid(da8a2b9f-594e-560a-9eaa-1f912408fe78), exclusiveto(ContrastEffect)]
00332     interface IContrastEffect : IInspectable
00333     {
00334         [propget] HRESULT Contrast([out, retval] float* value);
00335         [propput] HRESULT Contrast([in] float value);
00336
00337         [propget] HRESULT ClampSource([out, retval] boolean* value);
00338         [propput] HRESULT ClampSource([in] boolean value);
00339
00340         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00341         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00342     };
00343
00344     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00345     runtimeclass ContrastEffect
00346         : [default] IContrastEffect, Windows.Graphics.Effects.IGraphicsEffect
00347     {
00348     }
00349
00350     //----------------------------------------------------------------------------------------------
00351
00352     runtimeclass CrossFadeEffect;
00353
00354     EFFECT_INTERFACE_ATTRIBUTES
00355     [uuid(2a451393-ccc3-4c7e-b9bc-5ad9f9538c08), exclusiveto(CrossFadeEffect)]
00356     interface ICrossFadeEffect : IInspectable
00357     {
00358         [propget] HRESULT Weight([out, retval] float* value);
00359         [propput] HRESULT Weight([in] float value);
00360
00361         [propget] HRESULT Source1([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00362         [propput] HRESULT Source1([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00363
00364         [propget] HRESULT Source2([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00365         [propput] HRESULT Source2([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00366     };
00367
00368     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00369     runtimeclass CrossFadeEffect
00370         : [default] ICrossFadeEffect, Windows.Graphics.Effects.IGraphicsEffect
00371     {
00372     }
00373
00374     //----------------------------------------------------------------------------------------------
00375
00376     runtimeclass DistantDiffuseEffect;
00377
00378     EFFECT_INTERFACE_ATTRIBUTES
00379     [uuid(d501b10b-b445-50f4-8b8f-cdecfcdd1320), exclusiveto(DistantDiffuseEffect)]
00380     interface IDistantDiffuseEffect : IInspectable
00381     {
00382         [propget] HRESULT Azimuth([out, retval] float* value);
00383         [propput] HRESULT Azimuth([in] float value);
00384
00385         [propget] HRESULT Elevation([out, retval] float* value);
00386         [propput] HRESULT Elevation([in] float value);
00387
00388         [propget] HRESULT DiffuseAmount([out, retval] float* value);
00389         [propput] HRESULT DiffuseAmount([in] float value);
00390
00391         [propget] HRESULT HeightMapScale([out, retval] float* value);
00392         [propput] HRESULT HeightMapScale([in] float value);
00393
00394         [propget] HRESULT LightColor([out, retval] Windows.UI.Color* value);
00395         [propput] HRESULT LightColor([in] Windows.UI.Color value);
00396
00397         [propget] HRESULT HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2* value);
00398         [propput] HRESULT HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value);
00399
00400         [propget] HRESULT HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation* value);
00401         [propput] HRESULT HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value);
00402
00403         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00404         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00405     };
00406
00407     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00408     runtimeclass DistantDiffuseEffect
00409         : [default] IDistantDiffuseEffect, Windows.Graphics.Effects.IGraphicsEffect
00410     {
00411     }
00412
00413     //----------------------------------------------------------------------------------------------
00414
00415     runtimeclass DistantSpecularEffect;
00416
00417     EFFECT_INTERFACE_ATTRIBUTES
00418     [uuid(a7a828df-3072-545f-8d75-86c100f03230), exclusiveto(DistantSpecularEffect)]
00419     interface IDistantSpecularEffect : IInspectable
00420     {
00421         [propget] HRESULT Azimuth([out, retval] float* value);
00422         [propput] HRESULT Azimuth([in] float value);
00423
00424         [propget] HRESULT Elevation([out, retval] float* value);
00425         [propput] HRESULT Elevation([in] float value);
00426
00427         [propget] HRESULT SpecularExponent([out, retval] float* value);
00428         [propput] HRESULT SpecularExponent([in] float value);
00429
00430         [propget] HRESULT SpecularAmount([out, retval] float* value);
00431         [propput] HRESULT SpecularAmount([in] float value);
00432
00433         [propget] HRESULT HeightMapScale([out, retval] float* value);
00434         [propput] HRESULT HeightMapScale([in] float value);
00435
00436         [propget] HRESULT LightColor([out, retval] Windows.UI.Color* value);
00437         [propput] HRESULT LightColor([in] Windows.UI.Color value);
00438
00439         [propget] HRESULT HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2* value);
00440         [propput] HRESULT HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value);
00441
00442         [propget] HRESULT HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation* value);
00443         [propput] HRESULT HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value);
00444
00445         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00446         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00447     };
00448
00449     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00450     runtimeclass DistantSpecularEffect
00451         : [default] IDistantSpecularEffect, Windows.Graphics.Effects.IGraphicsEffect
00452     {
00453     }
00454
00455     //----------------------------------------------------------------------------------------------
00456
00457     runtimeclass ExposureEffect;
00458
00459     EFFECT_INTERFACE_ATTRIBUTES
00460     [uuid(b9e20a03-2232-5fd3-b408-15784b79dbbf), exclusiveto(ExposureEffect)]
00461     interface IExposureEffect : IInspectable
00462     {
00463         [propget] HRESULT Exposure([out, retval] float* value);
00464         [propput] HRESULT Exposure([in] float value);
00465
00466         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00467         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00468     };
00469
00470     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00471     runtimeclass ExposureEffect
00472         : [default] IExposureEffect, Windows.Graphics.Effects.IGraphicsEffect
00473     {
00474     }
00475
00476     //----------------------------------------------------------------------------------------------
00477
00478     runtimeclass GammaTransferEffect;
00479
00480     EFFECT_INTERFACE_ATTRIBUTES
00481     [uuid(b4576b6b-6c3e-534a-8576-d46df4fce93c), exclusiveto(GammaTransferEffect)]
00482     interface IGammaTransferEffect : IInspectable
00483     {
00484         [propget] HRESULT RedAmplitude([out, retval] float* value);
00485         [propput] HRESULT RedAmplitude([in] float value);
00486
00487         [propget] HRESULT RedExponent([out, retval] float* value);
00488         [propput] HRESULT RedExponent([in] float value);
00489
00490         [propget] HRESULT RedOffset([out, retval] float* value);
00491         [propput] HRESULT RedOffset([in] float value);
00492
00493         [propget] HRESULT RedDisable([out, retval] boolean* value);
00494         [propput] HRESULT RedDisable([in] boolean value);
00495
00496         [propget] HRESULT GreenAmplitude([out, retval] float* value);
00497         [propput] HRESULT GreenAmplitude([in] float value);
00498
00499         [propget] HRESULT GreenExponent([out, retval] float* value);
00500         [propput] HRESULT GreenExponent([in] float value);
00501
00502         [propget] HRESULT GreenOffset([out, retval] float* value);
00503         [propput] HRESULT GreenOffset([in] float value);
00504
00505         [propget] HRESULT GreenDisable([out, retval] boolean* value);
00506         [propput] HRESULT GreenDisable([in] boolean value);
00507
00508         [propget] HRESULT BlueAmplitude([out, retval] float* value);
00509         [propput] HRESULT BlueAmplitude([in] float value);
00510
00511         [propget] HRESULT BlueExponent([out, retval] float* value);
00512         [propput] HRESULT BlueExponent([in] float value);
00513
00514         [propget] HRESULT BlueOffset([out, retval] float* value);
00515         [propput] HRESULT BlueOffset([in] float value);
00516
00517         [propget] HRESULT BlueDisable([out, retval] boolean* value);
00518         [propput] HRESULT BlueDisable([in] boolean value);
00519
00520         [propget] HRESULT AlphaAmplitude([out, retval] float* value);
00521         [propput] HRESULT AlphaAmplitude([in] float value);
00522
00523         [propget] HRESULT AlphaExponent([out, retval] float* value);
00524         [propput] HRESULT AlphaExponent([in] float value);
00525
00526         [propget] HRESULT AlphaOffset([out, retval] float* value);
00527         [propput] HRESULT AlphaOffset([in] float value);
00528
00529         [propget] HRESULT AlphaDisable([out, retval] boolean* value);
00530         [propput] HRESULT AlphaDisable([in] boolean value);
00531
00532         [propget] HRESULT ClampOutput([out, retval] boolean* value);
00533         [propput] HRESULT ClampOutput([in] boolean value);
00534
00535         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00536         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00537     };
00538
00539     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00540     runtimeclass GammaTransferEffect
00541         : [default] IGammaTransferEffect, Windows.Graphics.Effects.IGraphicsEffect
00542     {
00543     }
00544
00545     //----------------------------------------------------------------------------------------------
00546
00547     runtimeclass GaussianBlurEffect;
00548
00549     EFFECT_INTERFACE_ATTRIBUTES
00550     [uuid(cc3ff255-a83d-5aed-8187-70f64bbd9e50), exclusiveto(GaussianBlurEffect)]
00551     interface IGaussianBlurEffect : IInspectable
00552     {
00553         [propget] HRESULT BlurAmount([out, retval] float* value);
00554         [propput] HRESULT BlurAmount([in] float value);
00555
00556         [propget] HRESULT Optimization([out, retval] EffectOptimization* value);
00557         [propput] HRESULT Optimization([in] EffectOptimization value);
00558
00559         [propget] HRESULT BorderMode([out, retval] EffectBorderMode* value);
00560         [propput] HRESULT BorderMode([in] EffectBorderMode value);
00561
00562         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00563         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00564     };
00565
00566     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00567     runtimeclass GaussianBlurEffect
00568         : [default] IGaussianBlurEffect, Windows.Graphics.Effects.IGraphicsEffect
00569     {
00570     }
00571
00572     //----------------------------------------------------------------------------------------------
00573
00574     runtimeclass GrayscaleEffect;
00575
00576     EFFECT_INTERFACE_ATTRIBUTES
00577     [uuid(78e13b83-0638-53f8-b0b3-5b0b320a9ad1), exclusiveto(GrayscaleEffect)]
00578     interface IGrayscaleEffect : IInspectable
00579     {
00580         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00581         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00582     };
00583
00584     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00585     runtimeclass GrayscaleEffect
00586         : [default] IGrayscaleEffect, Windows.Graphics.Effects.IGraphicsEffect
00587     {
00588     }
00589
00590     //----------------------------------------------------------------------------------------------
00591
00592     runtimeclass HueRotationEffect;
00593
00594     EFFECT_INTERFACE_ATTRIBUTES
00595     [uuid(c172ebf2-e35f-58ae-ad2c-561eceaf2693), exclusiveto(HueRotationEffect)]
00596     interface IHueRotationEffect : IInspectable
00597     {
00598         [propget] HRESULT Angle([out, retval] float* value);
00599         [propput] HRESULT Angle([in] float value);
00600
00601         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00602         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00603     };
00604
00605     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00606     runtimeclass HueRotationEffect
00607         : [default] IHueRotationEffect, Windows.Graphics.Effects.IGraphicsEffect
00608     {
00609     }
00610
00611     //----------------------------------------------------------------------------------------------
00612
00613     runtimeclass InvertEffect;
00614
00615     EFFECT_INTERFACE_ATTRIBUTES
00616     [uuid(d4adcdfc-0f60-524d-936a-7f2736ad33d7), exclusiveto(InvertEffect)]
00617     interface IInvertEffect : IInspectable
00618     {
00619         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00620         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00621     };
00622
00623     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00624     runtimeclass InvertEffect
00625         : [default] IInvertEffect, Windows.Graphics.Effects.IGraphicsEffect
00626     {
00627     }
00628
00629     //----------------------------------------------------------------------------------------------
00630
00631     runtimeclass LinearTransferEffect;
00632
00633     EFFECT_INTERFACE_ATTRIBUTES
00634     [uuid(0cdf2cd0-1ce5-5c97-a09c-f14361b96e46), exclusiveto(LinearTransferEffect)]
00635     interface ILinearTransferEffect : IInspectable
00636     {
00637         [propget] HRESULT RedOffset([out, retval] float* value);
00638         [propput] HRESULT RedOffset([in] float value);
00639
00640         [propget] HRESULT RedSlope([out, retval] float* value);
00641         [propput] HRESULT RedSlope([in] float value);
00642
00643         [propget] HRESULT RedDisable([out, retval] boolean* value);
00644         [propput] HRESULT RedDisable([in] boolean value);
00645
00646         [propget] HRESULT GreenOffset([out, retval] float* value);
00647         [propput] HRESULT GreenOffset([in] float value);
00648
00649         [propget] HRESULT GreenSlope([out, retval] float* value);
00650         [propput] HRESULT GreenSlope([in] float value);
00651
00652         [propget] HRESULT GreenDisable([out, retval] boolean* value);
00653         [propput] HRESULT GreenDisable([in] boolean value);
00654
00655         [propget] HRESULT BlueOffset([out, retval] float* value);
00656         [propput] HRESULT BlueOffset([in] float value);
00657
00658         [propget] HRESULT BlueSlope([out, retval] float* value);
00659         [propput] HRESULT BlueSlope([in] float value);
00660
00661         [propget] HRESULT BlueDisable([out, retval] boolean* value);
00662         [propput] HRESULT BlueDisable([in] boolean value);
00663
00664         [propget] HRESULT AlphaOffset([out, retval] float* value);
00665         [propput] HRESULT AlphaOffset([in] float value);
00666
00667         [propget] HRESULT AlphaSlope([out, retval] float* value);
00668         [propput] HRESULT AlphaSlope([in] float value);
00669
00670         [propget] HRESULT AlphaDisable([out, retval] boolean* value);
00671         [propput] HRESULT AlphaDisable([in] boolean value);
00672
00673         [propget] HRESULT ClampOutput([out, retval] boolean* value);
00674         [propput] HRESULT ClampOutput([in] boolean value);
00675
00676         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00677         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00678     };
00679
00680     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00681     runtimeclass LinearTransferEffect
00682         : [default] ILinearTransferEffect, Windows.Graphics.Effects.IGraphicsEffect
00683     {
00684     }
00685
00686     //----------------------------------------------------------------------------------------------
00687
00688     runtimeclass LuminanceToAlphaEffect;
00689
00690     EFFECT_INTERFACE_ATTRIBUTES
00691     [uuid(32983357-0fd9-52b7-b63b-001f6ff4618b), exclusiveto(LuminanceToAlphaEffect)]
00692     interface ILuminanceToAlphaEffect : IInspectable
00693     {
00694         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00695         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00696     };
00697
00698     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00699     runtimeclass LuminanceToAlphaEffect
00700         : [default] ILuminanceToAlphaEffect, Windows.Graphics.Effects.IGraphicsEffect
00701     {
00702     }
00703
00704     //----------------------------------------------------------------------------------------------
00705
00706     runtimeclass OpacityEffect;
00707
00708     EFFECT_INTERFACE_ATTRIBUTES
00709     [uuid(c20ae33a-1844-4650-811c-63ca823b86b5), exclusiveto(OpacityEffect)]
00710     interface IOpacityEffect : IInspectable
00711     {
00712         [propget] HRESULT Opacity([out, retval] float* value);
00713         [propput] HRESULT Opacity([in] float value);
00714
00715         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00716         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00717     };
00718
00719     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00720     runtimeclass OpacityEffect
00721         : [default] IOpacityEffect, Windows.Graphics.Effects.IGraphicsEffect
00722     {
00723     }
00724
00725     //----------------------------------------------------------------------------------------------
00726
00727     runtimeclass PointDiffuseEffect;
00728
00729     EFFECT_INTERFACE_ATTRIBUTES
00730     [uuid(6cce09ec-f847-5661-af4b-531dd3dd7d6d), exclusiveto(PointDiffuseEffect)]
00731     interface IPointDiffuseEffect : IInspectable
00732     {
00733         [propget] HRESULT LightPosition([out, retval] Windows.Foundation.Numerics.Vector3* value);
00734         [propput] HRESULT LightPosition([in] Windows.Foundation.Numerics.Vector3 value);
00735
00736         [propget] HRESULT DiffuseAmount([out, retval] float* value);
00737         [propput] HRESULT DiffuseAmount([in] float value);
00738
00739         [propget] HRESULT HeightMapScale([out, retval] float* value);
00740         [propput] HRESULT HeightMapScale([in] float value);
00741
00742         [propget] HRESULT LightColor([out, retval] Windows.UI.Color* value);
00743         [propput] HRESULT LightColor([in] Windows.UI.Color value);
00744
00745         [propget] HRESULT HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2* value);
00746         [propput] HRESULT HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value);
00747
00748         [propget] HRESULT HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation* value);
00749         [propput] HRESULT HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value);
00750
00751         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00752         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00753     };
00754
00755     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00756     runtimeclass PointDiffuseEffect
00757         : [default] IPointDiffuseEffect, Windows.Graphics.Effects.IGraphicsEffect
00758     {
00759     }
00760
00761     //----------------------------------------------------------------------------------------------
00762
00763     runtimeclass PointSpecularEffect;
00764
00765     EFFECT_INTERFACE_ATTRIBUTES
00766     [uuid(ec8afe9b-8501-5286-a43c-1afff7420ad5), exclusiveto(PointSpecularEffect)]
00767     interface IPointSpecularEffect : IInspectable
00768     {
00769         [propget] HRESULT LightPosition([out, retval] Windows.Foundation.Numerics.Vector3* value);
00770         [propput] HRESULT LightPosition([in] Windows.Foundation.Numerics.Vector3 value);
00771
00772         [propget] HRESULT SpecularExponent([out, retval] float* value);
00773         [propput] HRESULT SpecularExponent([in] float value);
00774
00775         [propget] HRESULT SpecularAmount([out, retval] float* value);
00776         [propput] HRESULT SpecularAmount([in] float value);
00777
00778         [propget] HRESULT HeightMapScale([out, retval] float* value);
00779         [propput] HRESULT HeightMapScale([in] float value);
00780
00781         [propget] HRESULT LightColor([out, retval] Windows.UI.Color* value);
00782         [propput] HRESULT LightColor([in] Windows.UI.Color value);
00783
00784         [propget] HRESULT HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2* value);
00785         [propput] HRESULT HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value);
00786
00787         [propget] HRESULT HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation* value);
00788         [propput] HRESULT HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value);
00789
00790         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00791         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00792     };
00793
00794     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00795     runtimeclass PointSpecularEffect
00796         : [default] IPointSpecularEffect, Windows.Graphics.Effects.IGraphicsEffect
00797     {
00798     }
00799
00800     //----------------------------------------------------------------------------------------------
00801
00802     runtimeclass PosterizeEffect;
00803
00804     EFFECT_INTERFACE_ATTRIBUTES
00805     [uuid(2f631a3b-c89a-507c-9756-299b61434fa3), exclusiveto(PosterizeEffect)]
00806     interface IPosterizeEffect : IInspectable
00807     {
00808         [propget] HRESULT RedValueCount([out, retval] INT32* value);
00809         [propput] HRESULT RedValueCount([in] INT32 value);
00810
00811         [propget] HRESULT GreenValueCount([out, retval] INT32* value);
00812         [propput] HRESULT GreenValueCount([in] INT32 value);
00813
00814         [propget] HRESULT BlueValueCount([out, retval] INT32* value);
00815         [propput] HRESULT BlueValueCount([in] INT32 value);
00816
00817         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00818         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00819     };
00820
00821     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00822     runtimeclass PosterizeEffect
00823         : [default] IPosterizeEffect, Windows.Graphics.Effects.IGraphicsEffect
00824     {
00825     }
00826
00827     //----------------------------------------------------------------------------------------------
00828
00829     runtimeclass PremultiplyEffect;
00830
00831     EFFECT_INTERFACE_ATTRIBUTES
00832     [uuid(d2884c75-a4a1-556b-acef-28ed22cf067f), exclusiveto(PremultiplyEffect)]
00833     interface IPremultiplyEffect : IInspectable
00834     {
00835         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00836         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00837     };
00838
00839     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00840     runtimeclass PremultiplyEffect
00841         : [default] IPremultiplyEffect, Windows.Graphics.Effects.IGraphicsEffect
00842     {
00843     }
00844
00845     //----------------------------------------------------------------------------------------------
00846
00847     runtimeclass SaturationEffect;
00848
00849     EFFECT_INTERFACE_ATTRIBUTES
00850     [uuid(f85a5ed7-7212-57a6-b357-61038961c58c), exclusiveto(SaturationEffect)]
00851     interface ISaturationEffect : IInspectable
00852     {
00853         [propget] HRESULT Saturation([out, retval] float* value);
00854         [propput] HRESULT Saturation([in] float value);
00855
00856         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00857         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00858     };
00859
00860     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00861     runtimeclass SaturationEffect
00862         : [default] ISaturationEffect, Windows.Graphics.Effects.IGraphicsEffect
00863     {
00864     }
00865
00866     //----------------------------------------------------------------------------------------------
00867
00868     runtimeclass SepiaEffect;
00869
00870     EFFECT_INTERFACE_ATTRIBUTES
00871     [uuid(f933471f-a7af-5521-be79-b0da22976cfe), exclusiveto(SepiaEffect)]
00872     interface ISepiaEffect : IInspectable
00873     {
00874         [propget] HRESULT Intensity([out, retval] float* value);
00875         [propput] HRESULT Intensity([in] float value);
00876
00877         [propget] HRESULT AlphaMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode* value);
00878         [propput] HRESULT AlphaMode([in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value);
00879
00880         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00881         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00882     };
00883
00884     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00885     runtimeclass SepiaEffect
00886         : [default] ISepiaEffect, Windows.Graphics.Effects.IGraphicsEffect
00887     {
00888     }
00889
00890     //----------------------------------------------------------------------------------------------
00891
00892     runtimeclass SpotDiffuseEffect;
00893
00894     EFFECT_INTERFACE_ATTRIBUTES
00895     [uuid(b3dcbe44-1dd7-5cb3-95e5-a48974cd12e7), exclusiveto(SpotDiffuseEffect)]
00896     interface ISpotDiffuseEffect : IInspectable
00897     {
00898         [propget] HRESULT LightPosition([out, retval] Windows.Foundation.Numerics.Vector3* value);
00899         [propput] HRESULT LightPosition([in] Windows.Foundation.Numerics.Vector3 value);
00900
00901         [propget] HRESULT LightTarget([out, retval] Windows.Foundation.Numerics.Vector3* value);
00902         [propput] HRESULT LightTarget([in] Windows.Foundation.Numerics.Vector3 value);
00903
00904         [propget] HRESULT Focus([out, retval] float* value);
00905         [propput] HRESULT Focus([in] float value);
00906
00907         [propget] HRESULT LimitingConeAngle([out, retval] float* value);
00908         [propput] HRESULT LimitingConeAngle([in] float value);
00909
00910         [propget] HRESULT DiffuseAmount([out, retval] float* value);
00911         [propput] HRESULT DiffuseAmount([in] float value);
00912
00913         [propget] HRESULT HeightMapScale([out, retval] float* value);
00914         [propput] HRESULT HeightMapScale([in] float value);
00915
00916         [propget] HRESULT LightColor([out, retval] Windows.UI.Color* value);
00917         [propput] HRESULT LightColor([in] Windows.UI.Color value);
00918
00919         [propget] HRESULT HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2* value);
00920         [propput] HRESULT HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value);
00921
00922         [propget] HRESULT HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation* value);
00923         [propput] HRESULT HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value);
00924
00925         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00926         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00927     };
00928
00929     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00930     runtimeclass SpotDiffuseEffect
00931         : [default] ISpotDiffuseEffect, Windows.Graphics.Effects.IGraphicsEffect
00932     {
00933     }
00934
00935     //----------------------------------------------------------------------------------------------
00936
00937     runtimeclass SpotSpecularEffect;
00938
00939     EFFECT_INTERFACE_ATTRIBUTES
00940     [uuid(83ae4cd0-80aa-5783-8572-f15e5f85329d), exclusiveto(SpotSpecularEffect)]
00941     interface ISpotSpecularEffect : IInspectable
00942     {
00943         [propget] HRESULT LightPosition([out, retval] Windows.Foundation.Numerics.Vector3* value);
00944         [propput] HRESULT LightPosition([in] Windows.Foundation.Numerics.Vector3 value);
00945
00946         [propget] HRESULT LightTarget([out, retval] Windows.Foundation.Numerics.Vector3* value);
00947         [propput] HRESULT LightTarget([in] Windows.Foundation.Numerics.Vector3 value);
00948
00949         [propget] HRESULT Focus([out, retval] float* value);
00950         [propput] HRESULT Focus([in] float value);
00951
00952         [propget] HRESULT LimitingConeAngle([out, retval] float* value);
00953         [propput] HRESULT LimitingConeAngle([in] float value);
00954
00955         [propget] HRESULT SpecularExponent([out, retval] float* value);
00956         [propput] HRESULT SpecularExponent([in] float value);
00957
00958         [propget] HRESULT SpecularAmount([out, retval] float* value);
00959         [propput] HRESULT SpecularAmount([in] float value);
00960
00961         [propget] HRESULT HeightMapScale([out, retval] float* value);
00962         [propput] HRESULT HeightMapScale([in] float value);
00963
00964         [propget] HRESULT LightColor([out, retval] Windows.UI.Color* value);
00965         [propput] HRESULT LightColor([in] Windows.UI.Color value);
00966
00967         [propget] HRESULT HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2* value);
00968         [propput] HRESULT HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value);
00969
00970         [propget] HRESULT HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation* value);
00971         [propput] HRESULT HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value);
00972
00973         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00974         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00975     };
00976
00977     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
00978     runtimeclass SpotSpecularEffect
00979         : [default] ISpotSpecularEffect, Windows.Graphics.Effects.IGraphicsEffect
00980     {
00981     }
00982
00983     //----------------------------------------------------------------------------------------------
00984
00985     runtimeclass TemperatureAndTintEffect;
00986
00987     EFFECT_INTERFACE_ATTRIBUTES
00988     [uuid(8ae43e02-2619-5d78-8980-4ed569549bd7), exclusiveto(TemperatureAndTintEffect)]
00989     interface ITemperatureAndTintEffect : IInspectable
00990     {
00991         [propget] HRESULT Temperature([out, retval] float* value);
00992         [propput] HRESULT Temperature([in] float value);
00993
00994         [propget] HRESULT Tint([out, retval] float* value);
00995         [propput] HRESULT Tint([in] float value);
00996
00997         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
00998         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
00999     };
01000
01001     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
01002     runtimeclass TemperatureAndTintEffect
01003         : [default] ITemperatureAndTintEffect, Windows.Graphics.Effects.IGraphicsEffect
01004     {
01005     }
01006
01007     //----------------------------------------------------------------------------------------------
01008
01009     runtimeclass TintEffect;
01010
01011     EFFECT_INTERFACE_ATTRIBUTES
01012     [uuid(44fe4b1a-d909-4848-b08f-b6e979402771), exclusiveto(TintEffect)]
01013     interface ITintEffect : IInspectable
01014     {
01015         [propget] HRESULT Color([out, retval] Windows.UI.Color* value);
01016         [propput] HRESULT Color([in] Windows.UI.Color value);
01017
01018         [propget] HRESULT ClampOutput([out, retval] boolean* value);
01019         [propput] HRESULT ClampOutput([in] boolean value);
01020
01021         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
01022         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
01023     };
01024
01025     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
01026     runtimeclass TintEffect
01027         : [default] ITintEffect, Windows.Graphics.Effects.IGraphicsEffect
01028     {
01029     }
01030
01031     //----------------------------------------------------------------------------------------------
01032
01033     runtimeclass Transform2DEffect;
01034
01035     EFFECT_INTERFACE_ATTRIBUTES
01036     [uuid(4467d118-33e7-5b1a-87c2-0f1f0497353c), exclusiveto(Transform2DEffect)]
01037     interface ITransform2DEffect : IInspectable
01038     {
01039         [propget] HRESULT InterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation* value);
01040         [propput] HRESULT InterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value);
01041
01042         [propget] HRESULT BorderMode([out, retval] EffectBorderMode* value);
01043         [propput] HRESULT BorderMode([in] EffectBorderMode value);
01044
01045         [propget] HRESULT TransformMatrix([out, retval] Windows.Foundation.Numerics.Matrix3x2* value);
01046         [propput] HRESULT TransformMatrix([in] Windows.Foundation.Numerics.Matrix3x2 value);
01047
01048         [propget] HRESULT Sharpness([out, retval] float* value);
01049         [propput] HRESULT Sharpness([in] float value);
01050
01051         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
01052         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
01053     };
01054
01055     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
01056     runtimeclass Transform2DEffect
01057         : [default] ITransform2DEffect, Windows.Graphics.Effects.IGraphicsEffect
01058     {
01059     }
01060
01061     //----------------------------------------------------------------------------------------------
01062
01063     runtimeclass UnPremultiplyEffect;
01064
01065     EFFECT_INTERFACE_ATTRIBUTES
01066     [uuid(9c8b2b18-cbc1-547e-b6d5-64a1d8bbc802), exclusiveto(UnPremultiplyEffect)]
01067     interface IUnPremultiplyEffect : IInspectable
01068     {
01069         [propget] HRESULT Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource** source);
01070         [propput] HRESULT Source([in] Windows.Graphics.Effects.IGraphicsEffectSource* source);
01071     };
01072
01073     EFFECT_RUNTIMECLASS_ATTRIBUTES_NOINTERNAL
01074     runtimeclass UnPremultiplyEffect
01075         : [default] IUnPremultiplyEffect, Windows.Graphics.Effects.IGraphicsEffect
01076     {
01077     }
01078 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UICollection Member List

This is the complete list of members for UICollection, including all inherited members.
UICollection() UICollection [inline]
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CalendarDatePickerPage Member List

This is the complete list of members for CalendarDatePickerPage, including all inherited members.
CalendarDatePickerPage() CalendarDatePickerPage [inline]
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/BlankPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

BlankPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using MUXControlsTestApp.Utilities;
00009 using System.Linq;
00010 using System.Collections.Generic;
00011 using System.Collections.ObjectModel;
00012 using Windows.UI;
00013
00014 namespace MUXControlsTestApp
00015 {
00016     [TopLevelTestPage(Name="Blank")]
00017     public sealed partial class BlankPage : TestPage
00018     {
00019         public BlankPage()
00020         {
00021             this.InitializeComponent();
00022         }
00023     }
00024 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/Expander.properties.h Source File

  • File List
  • File Members
  • Generated

Expander.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ExpanderProperties
00008 {
00009 public:
00010     ExpanderProperties();
00011
00012     void ExpandDirection(winrt::ExpandDirection const& value);
00013     winrt::ExpandDirection ExpandDirection();
00014
00015     void Header(winrt::IInspectable const& value);
00016     winrt::IInspectable Header();
00017
00018     void HeaderTemplate(winrt::DataTemplate const& value);
00019     winrt::DataTemplate HeaderTemplate();
00020
00021     void HeaderTemplateSelector(winrt::DataTemplateSelector const& value);
00022     winrt::DataTemplateSelector HeaderTemplateSelector();
00023
00024     void IsExpanded(bool value);
00025     bool IsExpanded();
00026
00027     void TemplateSettings(winrt::ExpanderTemplateSettings const& value);
00028     winrt::ExpanderTemplateSettings TemplateSettings();
00029
00030     static winrt::DependencyProperty ExpandDirectionProperty() { return s_ExpandDirectionProperty; }
00031     static winrt::DependencyProperty HeaderProperty() { return s_HeaderProperty; }
00032     static winrt::DependencyProperty HeaderTemplateProperty() { return s_HeaderTemplateProperty; }
00033     static winrt::DependencyProperty HeaderTemplateSelectorProperty() { return s_HeaderTemplateSelectorProperty; }
00034     static winrt::DependencyProperty IsExpandedProperty() { return s_IsExpandedProperty; }
00035     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00036
00037     static GlobalDependencyProperty s_ExpandDirectionProperty;
00038     static GlobalDependencyProperty s_HeaderProperty;
00039     static GlobalDependencyProperty s_HeaderTemplateProperty;
00040     static GlobalDependencyProperty s_HeaderTemplateSelectorProperty;
00041     static GlobalDependencyProperty s_IsExpandedProperty;
00042     static GlobalDependencyProperty s_TemplateSettingsProperty;
00043
00044     winrt::event_token Collapsed(winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderCollapsedEventArgs> const& value);
00045     void Collapsed(winrt::event_token const& token);
00046     winrt::event_token Expanding(winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderExpandingEventArgs> const& value);
00047     void Expanding(winrt::event_token const& token);
00048
00049     event_source<winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderCollapsedEventArgs>> m_collapsedEventSource;
00050     event_source<winrt::TypedEventHandler<winrt::Expander, winrt::ExpanderExpandingEventArgs>> m_expandingEventSource;
00051
00052     static void EnsureProperties();
00053     static void ClearProperties();
00054
00055     static void OnExpandDirectionPropertyChanged(
00056         winrt::DependencyObject const& sender,
00057         winrt::DependencyPropertyChangedEventArgs const& args);
00058
00059     static void OnIsExpandedPropertyChanged(
00060         winrt::DependencyObject const& sender,
00061         winrt::DependencyPropertyChangedEventArgs const& args);
00062 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterLeakDetectionPage Member List

This is the complete list of members for ScrollPresenterLeakDetectionPage, including all inherited members.
BtnAddScrollPresenter_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ScrollPresenterLeakDetectionPage | [inline, private]
BtnCreateScrollPresenter_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ScrollPresenterLeakDetectionPage | [inline, private]
BtnDeleteScrollPresenter_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ScrollPresenterLeakDetectionPage | [inline, private]
BtnGarbageCollect_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ScrollPresenterLeakDetectionPage | [inline, private]
BtnRemoveScrollPresenter_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ScrollPresenterLeakDetectionPage | [inline, private]
scrollPresenter | ScrollPresenterLeakDetectionPage | [private]
ScrollPresenterLeakDetectionPage() | ScrollPresenterLeakDetectionPage | [inline]
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewStretchPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewStretchPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     public sealed partial class NavigationViewStretchPage : TestPage
00007     {
00008         public NavigationViewStretchPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomCompletedEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomCompletedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollingZoomCompletedEventArgs.h"
00007
00008 int32_t ScrollingZoomCompletedEventArgs::CorrelationId()
00009 {
00010     return m_zoomFactorChangeCorrelationId;
00011 }
00012
00013 ScrollPresenterViewChangeResult ScrollingZoomCompletedEventArgs::Result()
00014 {
00015     return m_result;
00016 }
00017
00018 void ScrollingZoomCompletedEventArgs::ZoomFactorChangeCorrelationId(int32_t zoomFactorChangeCorrelationId)
00019 {
00020     m_zoomFactorChangeCorrelationId = zoomFactorChangeCorrelationId;
00021 }
00022
00023 void ScrollingZoomCompletedEventArgs::Result(ScrollPresenterViewChangeResult result)
00024 {
00025     m_result = result;
00026 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemCollectionTransitionProvider.h Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemCollectionTransitionProvider.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "ItemCollectionTransitionProvider.h"
00010 #include "LinedFlowLayoutItemCollectionTransitionProvider.g.h"
00011
00012 const uint32_t DebugSlowDownFactor = 1;
00013
00014 #ifndef IS_LAB_BUILD
00015 static_assert(DebugSlowDownFactor >= 1, "DebugSlowDownFactor must be at least 1.");
00016 #else
00017 static_assert(DebugSlowDownFactor == 1, "DebugSlowDownFactor must be set back to 1 before a pull request can be completed.");
00018 #endif
00019
00020 class LinedFlowLayoutItemCollectionTransitionProvider :
00021     public winrt::implementation::LinedFlowLayoutItemCollectionTransitionProviderT<LinedFlowLayoutItemCollectionTransitionProvider, ItemCollectionTransitionProvider>
00022 {
00023 public:
00024     ForwardRefToBaseReferenceTracker(ItemCollectionTransitionProvider)
00025
00026 #pragma region IItemCollectionTransitionProviderOverrides
00027
00028     void StartTransitions(winrt::IVector<winrt::ItemCollectionTransition> const& transitions);
00029
00030     bool ShouldAnimateCore(winrt::ItemCollectionTransition const& transition);
00031
00032 #pragma endregion
00033
00034 private:
00035     void StartAddTransitions(std::vector<winrt::ItemCollectionTransition> const& transitions, bool hasRemoveTransitions, bool hasMoveTransitions);
00036     void StartRemoveTransitions(std::vector<winrt::ItemCollectionTransition> const& transitions, bool hasAddAnimations);
00037     void StartMoveTransitions(std::vector<winrt::ItemCollectionTransition> const& transitions, bool hasRemoveTransitions);
00038
00039     void SlideIn(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, std::chrono::milliseconds const& delay);
00040     void ScaleIn(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, std::chrono::milliseconds const& delay, bool presetInitialValue = false);
00041     void ScaleOut(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, std::chrono::milliseconds const& delay, bool presetInitialValue = false);
00042     void Translate(winrt::CompositionAnimationGroup const& group, winrt::Compositor const& compositor, winrt::Rect const& from, winrt::Rect const& to, std::chrono::milliseconds const& delay, bool presetInitialValue = false);
00043
00044     static winrt::float3 GetCenterPoint(winrt::UIElement const& element);
00045     winrt::CubicBezierEasingFunction GetEaseInFunction(winrt::Compositor const& compositor);
00046     winrt::CubicBezierEasingFunction GetEaseOutFunction(winrt::Compositor const& compositor);
00047     void StartAnimationGroup(winrt::Visual const& visual, winrt::CompositionAnimationGroup const& animationGroup);
00048
00049     const float Epsilon = 0.001f;
00050
00051     const std::chrono::milliseconds QuickAnimationDuration = DebugSlowDownFactor * 167ms;
00052     const std::chrono::milliseconds DefaultAnimationDuration = DebugSlowDownFactor * 250ms;
00053
00054     const float SlideInDistance = 100.0f;
00055
00056     const winrt::float3 ScaleVisible{ 1.0f, 1.0f, 1.0f };
00057     const winrt::float3 ScaleCollapsed{ 0.0f, 0.0f, 1.0f };
00058
00059     winrt::IMap<winrt::Visual, winrt::CompositionAnimationGroup> m_currentAnimationGroupByVisual{ winrt::single_threaded_map<winrt::Visual, winrt::CompositionAnimationGroup>() };
00060
00061     winrt::CubicBezierEasingFunction m_easeInFunction{ nullptr };
00062     winrt::CubicBezierEasingFunction m_easeOutFunction{ nullptr };
00063 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NullableBooleanToBooleanConverter Member List

This is the complete list of members for NullableBooleanToBooleanConverter, including all inherited members.
Convert(object value, Type targetType, object parameter, string language) | NullableBooleanToBooleanConverter | [inline]
ConvertBack(object value, Type targetType, object parameter, string language) | NullableBooleanToBooleanConverter | [inline]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2RenderingVerifier Member List

This is the complete list of members for WebView2RenderingVerifier, including all inherited members.
CheckWebViewPixel(string webViewName, double scale, uint targetPixelColor, IntPtr memoryHdc) | WebView2RenderingVerifier | [inline, private, static]
CheckWindowPixel(IntPtr targetHwnd, string testName) | WebView2RenderingVerifier | [inline, private, static]
VerifyInstances(string testName) | WebView2RenderingVerifier | [inline, static]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SpectrumBrush.properties.cpp Source File

  • File List
  • File Members
  • Generated

SpectrumBrush.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SpectrumBrush.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(SpectrumBrush)
00012 }
00013
00014 #include "SpectrumBrush.g.cpp"
00015
00016 GlobalDependencyProperty SpectrumBrushProperties::s_MaxSurfaceProperty{ nullptr };
00017 GlobalDependencyProperty SpectrumBrushProperties::s_MaxSurfaceOpacityProperty{ nullptr };
00018 GlobalDependencyProperty SpectrumBrushProperties::s_MinSurfaceProperty{ nullptr };
00019
00020 SpectrumBrushProperties::SpectrumBrushProperties()
00021 {
00022     EnsureProperties();
00023 }
00024
00025 void SpectrumBrushProperties::EnsureProperties()
00026 {
00027     if (!s_MaxSurfaceProperty)
00028     {
00029         s_MaxSurfaceProperty =
00030             InitializeDependencyProperty(
00031                 L"MaxSurface",
00032                 winrt::name_of<winrt::LoadedImageSurface>(),
00033                 winrt::name_of<winrt::SpectrumBrush>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::LoadedImageSurface>::BoxedDefaultValue(),
00036                 winrt::PropertyChangedCallback(&OnMaxSurfacePropertyChanged));
00037     }
00038     if (!s_MaxSurfaceOpacityProperty)
00039     {
00040         s_MaxSurfaceOpacityProperty =
00041             InitializeDependencyProperty(
00042                 L"MaxSurfaceOpacity",
00043                 winrt::name_of<double>(),
00044                 winrt::name_of<winrt::SpectrumBrush>(),
00045                 false /* isAttached */,
00046                 ValueHelper<double>::BoxValueIfNecessary(1.0),
00047                 winrt::PropertyChangedCallback(&OnMaxSurfaceOpacityPropertyChanged));
00048     }
00049     if (!s_MinSurfaceProperty)
00050     {
00051         s_MinSurfaceProperty =
00052             InitializeDependencyProperty(
00053                 L"MinSurface",
00054                 winrt::name_of<winrt::LoadedImageSurface>(),
00055                 winrt::name_of<winrt::SpectrumBrush>(),
00056                 false /* isAttached */,
00057                 ValueHelper<winrt::LoadedImageSurface>::BoxedDefaultValue(),
00058                 winrt::PropertyChangedCallback(&OnMinSurfacePropertyChanged));
00059     }
00060 }
00061
00062 void SpectrumBrushProperties::ClearProperties()
00063 {
00064     s_MaxSurfaceProperty = nullptr;
00065     s_MaxSurfaceOpacityProperty = nullptr;
00066     s_MinSurfaceProperty = nullptr;
00067 }
00068
00069 void SpectrumBrushProperties::OnMaxSurfacePropertyChanged(
00070     winrt::DependencyObject const& sender,
00071     winrt::DependencyPropertyChangedEventArgs const& args)
00072 {
00073     auto owner = sender.as<winrt::SpectrumBrush>();
00074     winrt::get_self<SpectrumBrush>(owner)->OnPropertyChanged(args);
00075 }
00076
00077 void SpectrumBrushProperties::OnMaxSurfaceOpacityPropertyChanged(
00078     winrt::DependencyObject const& sender,
00079     winrt::DependencyPropertyChangedEventArgs const& args)
00080 {
00081     auto owner = sender.as<winrt::SpectrumBrush>();
00082     winrt::get_self<SpectrumBrush>(owner)->OnPropertyChanged(args);
00083 }
00084
00085 void SpectrumBrushProperties::OnMinSurfacePropertyChanged(
00086     winrt::DependencyObject const& sender,
00087     winrt::DependencyPropertyChangedEventArgs const& args)
00088 {
00089     auto owner = sender.as<winrt::SpectrumBrush>();
00090     winrt::get_self<SpectrumBrush>(owner)->OnPropertyChanged(args);
00091 }
00092
00093 void SpectrumBrushProperties::MaxSurface(winrt::LoadedImageSurface const& value)
00094 {
00095     [[gsl::suppress(con)]]
00096     {
00097     static_cast<SpectrumBrush*>(this)->SetValue(s_MaxSurfaceProperty, ValueHelper<winrt::LoadedImageSurface>::BoxValueIfNecessary(value));
00098     }
00099 }
00100
00101 winrt::LoadedImageSurface SpectrumBrushProperties::MaxSurface()
00102 {
00103     return ValueHelper<winrt::LoadedImageSurface>::CastOrUnbox(static_cast<SpectrumBrush*>(this)->GetValue(s_MaxSurfaceProperty));
00104 }
00105
00106 void SpectrumBrushProperties::MaxSurfaceOpacity(double value)
00107 {
00108     [[gsl::suppress(con)]]
00109     {
00110     static_cast<SpectrumBrush*>(this)->SetValue(s_MaxSurfaceOpacityProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00111     }
00112 }
00113
00114 double SpectrumBrushProperties::MaxSurfaceOpacity()
00115 {
00116     return ValueHelper<double>::CastOrUnbox(static_cast<SpectrumBrush*>(this)->GetValue(s_MaxSurfaceOpacityProperty));
00117 }
00118
00119 void SpectrumBrushProperties::MinSurface(winrt::LoadedImageSurface const& value)
00120 {
00121     [[gsl::suppress(con)]]
00122     {
00123     static_cast<SpectrumBrush*>(this)->SetValue(s_MinSurfaceProperty, ValueHelper<winrt::LoadedImageSurface>::BoxValueIfNecessary(value));
00124     }
00125 }
00126
00127 winrt::LoadedImageSurface SpectrumBrushProperties::MinSurface()
00128 {
00129     return ValueHelper<winrt::LoadedImageSurface>::CastOrUnbox(static_cast<SpectrumBrush*>(this)->GetValue(s_MinSurfaceProperty));
00130 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRing Member List

This is the complete list of members for ProgressRing, including all inherited members.
abi_enter() | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
ApplyTemplateSettings() | ProgressRing | [private]
CheckThread() | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
ClearProperties() | ProgressRingProperties | [static]
CoerceMaximum() | ProgressRing | [private]
CoerceMinimum() | ProgressRing | [private]
CoerceValue() | ProgressRing | [private]
DeleteInstanceOnUIThread(std::unique_ptr< ProgressRing > &&self) noexcept | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline, static]
DeterminateSource(winrt::IAnimatedVisualSource const &value) | ProgressRingProperties |
DeterminateSource() | ProgressRingProperties |
DeterminateSourceProperty() | ProgressRingProperties | [inline, static]
EnsureProperties() | ProgressRingProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
final_release(std::unique_ptr< ProgressRing > &&self) | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline, static]
GetBase() | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
GetInner() | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
IndeterminateSource(winrt::IAnimatedVisualSource const &value) | ProgressRingProperties |
IndeterminateSource() | ProgressRingProperties |
IndeterminateSourceProperty() | ProgressRingProperties | [inline, static]
IsActive(bool value) | ProgressRingProperties |
IsActive() | ProgressRingProperties |
IsActiveProperty() | ProgressRingProperties | [inline, static]
IsInBounds(double value) | ProgressRing | [private]
IsIndeterminate(bool value) | ProgressRingProperties |
IsIndeterminate() | ProgressRingProperties |
IsIndeterminateProperty() | ProgressRingProperties | [inline, static]
IsOnThread() | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
Maximum(double value) | ProgressRingProperties |
Maximum() | ProgressRingProperties |
MaximumProperty() | ProgressRingProperties | [inline, static]
Minimum(double value) | ProgressRingProperties |
Minimum() | ProgressRingProperties |
MinimumProperty() | ProgressRingProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
OnApplyTemplate() | ProgressRing |
OnBackgroundColorPropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | ProgressRing |
OnBackgroundPropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | ProgressRing |
OnCreateAutomationPeer() | ProgressRing |
OnDeterminateSourcePropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRing |
ProgressRingProperties::OnDeterminateSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnForegroundColorPropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | ProgressRing |
OnForegroundPropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | ProgressRing |
OnIndeterminateSourcePropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRing |
ProgressRingProperties::OnIndeterminateSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnIsActivePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ProgressRing |
ProgressRingProperties::OnIsActivePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnIsIndeterminatePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ProgressRing |
ProgressRingProperties::OnIsIndeterminatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnLoaded(const winrt::IInspectable &, const winrt::IInspectable &) | ProgressRing | [private]
OnMaximumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ProgressRing |
ProgressRingProperties::OnMaximumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnMinimumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ProgressRing |
ProgressRingProperties::OnMinimumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
OnSizeChanged(const winrt::IInspectable &, const winrt::IInspectable &) | ProgressRing | [private]
OnValuePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ProgressRing |
ProgressRingProperties::OnValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressRingProperties | [static]
ProgressRing() | ProgressRing |
ProgressRingProperties() | ProgressRingProperties |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ProgressRing, winrt::implementation::ProgressRingT > | [inline]
s_DeterminateSourceProperty | ProgressRingProperties | [static]
s_IndeterminateSourceProperty | ProgressRingProperties | [static]
s_IsActiveProperty | ProgressRingProperties | [static]
s_IsIndeterminateProperty | ProgressRingProperties | [static]
s_MaximumProperty | ProgressRingProperties | [static]
s_MinimumProperty | ProgressRingProperties | [static]
s_TemplateSettingsProperty | ProgressRingProperties | [static]
s_ValueProperty | ProgressRingProperties | [static]
SetAnimatedVisualPlayerSource() | ProgressRing | [private]
SetLottieBackgroundColor(const winrt::IAnimatedVisualSource) | ProgressRing | [private]
SetLottieForegroundColor(const winrt::IAnimatedVisualSource) | ProgressRing | [private]
TemplateSettings(winrt::ProgressRingTemplateSettings const &value) | ProgressRingProperties |
TemplateSettings() | ProgressRingProperties |
TemplateSettingsProperty() | ProgressRingProperties | [inline, static]
UpdateLottieProgress() | ProgressRing | [private]
UpdateStates() | ProgressRing | [private]
Value(double value) | ProgressRingProperties |
Value() | ProgressRingProperties |
ValueProperty() | ProgressRingProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView.idl Source File

  • File List
  • File Members
  • NavigationView

NavigationView.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 enum NavigationViewDisplayMode
00007 {
00008     Minimal = 0,
00009     Compact = 1,
00010     Expanded = 2,
00011 };
00012
00013 [MUX_PUBLIC]
00014 [webhosthidden]
00015 enum NavigationViewBackButtonVisible
00016 {
00017     Collapsed = 0,
00018     Visible = 1,
00019     Auto = 2,
00020 };
00021
00022 [MUX_PUBLIC]
00023 [webhosthidden]
00024 enum NavigationViewPaneDisplayMode
00025 {
00026     Auto = 0,
00027     Left = 1,
00028     Top = 2,
00029     LeftCompact = 3,
00030     LeftMinimal = 4
00031 };
00032
00033 [MUX_PUBLIC]
00034 [webhosthidden]
00035 enum NavigationViewSelectionFollowsFocus
00036 {
00037     Disabled = 0,
00038     Enabled = 1
00039 };
00040
00041 [MUX_PUBLIC]
00042 [webhosthidden]
00043 enum NavigationViewShoulderNavigationEnabled
00044 {
00045     WhenSelectionFollowsFocus = 0,
00046     Always = 1,
00047     Never = 2
00048 };
00049
00050 [MUX_PUBLIC]
00051 [webhosthidden]
00052 enum NavigationViewOverflowLabelMode
00053 {
00054     MoreLabel = 0,
00055     NoLabel = 1
00056 };
00057
00058 [MUX_PUBLIC]
00059 [webhosthidden]
00060 runtimeclass NavigationViewDisplayModeChangedEventArgs
00061 {
00062     NavigationViewDisplayMode DisplayMode { get; };
00063 }
00064
00065 [MUX_PUBLIC]
00066 [webhosthidden]
00067 runtimeclass NavigationViewSelectionChangedEventArgs
00068 {
00069     Object SelectedItem { get; };
00070     Boolean IsSettingsSelected { get; };
00071
00072     [MUX_PUBLIC]
00073     {
00074         NavigationViewItemBase SelectedItemContainer { get; };
00075         Microsoft.UI.Xaml.Media.Animation.NavigationTransitionInfo RecommendedNavigationTransitionInfo { get; };
00076     }
00077 }
00078
00079 [MUX_PUBLIC]
00080 [webhosthidden]
00081 runtimeclass NavigationViewItemInvokedEventArgs
00082 {
00083     NavigationViewItemInvokedEventArgs();
00084
00085     Object InvokedItem { get; };
00086     Boolean IsSettingsInvoked { get; };
00087
00088     [MUX_PUBLIC]
00089     {
00090         NavigationViewItemBase InvokedItemContainer { get; };
00091         Microsoft.UI.Xaml.Media.Animation.NavigationTransitionInfo RecommendedNavigationTransitionInfo { get; };
00092     }
00093 }
00094
00095 [MUX_PUBLIC]
00096 [webhosthidden]
00097 runtimeclass NavigationViewPaneClosingEventArgs
00098 {
00099     Boolean Cancel { get; set; };
00100 }
00101
00102 [MUX_PUBLIC]
00103 [webhosthidden]
00104 [default_interface]
00105 runtimeclass NavigationViewBackRequestedEventArgs
00106 {
00107 }
00108
00109 [MUX_PUBLIC]
00110 [webhosthidden]
00111 runtimeclass NavigationViewItemExpandingEventArgs
00112 {
00113     NavigationViewItemBase ExpandingItemContainer { get; };
00114     Object ExpandingItem{ get; };
00115 }
00116
00117 [MUX_PUBLIC]
00118 [webhosthidden]
00119 runtimeclass NavigationViewItemCollapsedEventArgs
00120 {
00121     NavigationViewItemBase CollapsedItemContainer { get; };
00122     Object CollapsedItem{ get; };
00123 }
00124
00125 [MUX_PUBLIC]
00126 [webhosthidden]
00127 unsealed runtimeclass NavigationViewTemplateSettings : Microsoft.UI.Xaml.DependencyObject
00128 {
00129     NavigationViewTemplateSettings();
00130
00131     [MUX_DEFAULT_VALUE("0.0")]
00132     Double TopPadding { get; };
00133     [MUX_DEFAULT_VALUE("winrt::Visibility::Collapsed")]
00134     Microsoft.UI.Xaml.Visibility OverflowButtonVisibility { get; };
00135     [MUX_DEFAULT_VALUE("winrt::Visibility::Visible")]
00136     Microsoft.UI.Xaml.Visibility PaneToggleButtonVisibility { get; };
00137     [MUX_DEFAULT_VALUE("winrt::Visibility::Collapsed")]
00138     Microsoft.UI.Xaml.Visibility BackButtonVisibility { get; };
00139     [MUX_DEFAULT_VALUE("winrt::Visibility::Collapsed")]
00140     Microsoft.UI.Xaml.Visibility TopPaneVisibility { get; };
00141     [MUX_DEFAULT_VALUE("winrt::Visibility::Visible")]
00142     Microsoft.UI.Xaml.Visibility LeftPaneVisibility { get; };
00143     Boolean SingleSelectionFollowsFocus { get; };
00144     Double PaneToggleButtonWidth{ get; };
00145     Double SmallerPaneToggleButtonWidth{ get; };
00146
00147     static Microsoft.UI.Xaml.DependencyProperty TopPaddingProperty { get; };
00148     static Microsoft.UI.Xaml.DependencyProperty OverflowButtonVisibilityProperty { get; };
00149     static Microsoft.UI.Xaml.DependencyProperty PaneToggleButtonVisibilityProperty { get; };
00150     static Microsoft.UI.Xaml.DependencyProperty BackButtonVisibilityProperty { get; };
00151     static Microsoft.UI.Xaml.DependencyProperty TopPaneVisibilityProperty { get; };
00152     static Microsoft.UI.Xaml.DependencyProperty LeftPaneVisibilityProperty { get; };
00153     static Microsoft.UI.Xaml.DependencyProperty SingleSelectionFollowsFocusProperty { get; };
00154     static Microsoft.UI.Xaml.DependencyProperty PaneToggleButtonWidthProperty{ get; };
00155     static Microsoft.UI.Xaml.DependencyProperty SmallerPaneToggleButtonWidthProperty{ get; };
00156
00157     [MUX_PUBLIC_V4]
00158     {
00159         [MUX_DEFAULT_VALUE("320.0")]
00160         Double OpenPaneLength{ get; };
00161
00162         static Microsoft.UI.Xaml.DependencyProperty OpenPaneLengthProperty{ get; };
00163     }
00164 }
00165
00166 [MUX_PUBLIC]
00167 [webhosthidden]
00168 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00169 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00170 unsealed runtimeclass NavigationView : Microsoft.UI.Xaml.Controls.ContentControl
00171 {
00172     NavigationView();
00173
00174     [MUX_DEFAULT_VALUE("true")]
00175     Boolean IsPaneOpen { get; set; };
00176     [MUX_DEFAULT_VALUE("641.0")]
00177     [MUX_PROPERTY_VALIDATION_CALLBACK("CoerceToGreaterThanZero")]
00178     Double CompactModeThresholdWidth { get; set; };
00179     [MUX_DEFAULT_VALUE("1008.0")]
00180     [MUX_PROPERTY_VALIDATION_CALLBACK("CoerceToGreaterThanZero")]
00181     Double ExpandedModeThresholdWidth { get; set; };
00182     Windows.Foundation.Collections.IVector<Object> FooterMenuItems{ get; };
00183     Object FooterMenuItemsSource{ get; set; };
00184     Microsoft.UI.Xaml.UIElement PaneFooter { get; set; };
00185     Object Header { get; set; };
00186     Microsoft.UI.Xaml.DataTemplate HeaderTemplate { get; set; };
00187     [MUX_DEFAULT_VALUE("winrt::NavigationViewDisplayMode::Minimal")]
00188     NavigationViewDisplayMode DisplayMode { get; };
00189     [MUX_DEFAULT_VALUE("true")]
00190     Boolean IsSettingsVisible { get; set; };
00191     [MUX_DEFAULT_VALUE("true")]
00192     Boolean IsPaneToggleButtonVisible { get; set; };
00193     [MUX_DEFAULT_VALUE("true")]
00194     Boolean AlwaysShowHeader { get; set; };
00195     [MUX_DEFAULT_VALUE("48.0")]
00196     [MUX_PROPERTY_VALIDATION_CALLBACK("CoerceToGreaterThanZero")]
00197     Double CompactPaneLength { get; set; };
00198     [MUX_DEFAULT_VALUE("320.0")]
00199     [MUX_PROPERTY_VALIDATION_CALLBACK("CoerceToGreaterThanZero")]
00200     Double OpenPaneLength { get; set; };
00201     Microsoft.UI.Xaml.Style PaneToggleButtonStyle { get; set; };
00202     Object SelectedItem { get; set; };
00203     Windows.Foundation.Collections.IVector<Object> MenuItems { get; };
00204     Object MenuItemsSource { get; set; };
00205     Object SettingsItem { get; };
00206     Microsoft.UI.Xaml.Controls.AutoSuggestBox AutoSuggestBox { get; set; };
00207     Microsoft.UI.Xaml.DataTemplate MenuItemTemplate { get; set; };
00208     Microsoft.UI.Xaml.Controls.DataTemplateSelector MenuItemTemplateSelector { get; set; };
00209     Microsoft.UI.Xaml.Style MenuItemContainerStyle { get; set; };
00210     Microsoft.UI.Xaml.Controls.StyleSelector MenuItemContainerStyleSelector { get; set; };
00211     Object MenuItemFromContainer(Microsoft.UI.Xaml.DependencyObject container);
00212     Microsoft.UI.Xaml.DependencyObject ContainerFromMenuItem(Object item);
00213     event Windows.Foundation.TypedEventHandler<NavigationView, NavigationViewSelectionChangedEventArgs> SelectionChanged;
00214     event Windows.Foundation.TypedEventHandler<NavigationView, NavigationViewItemInvokedEventArgs> ItemInvoked;
00215     event Windows.Foundation.TypedEventHandler<NavigationView, NavigationViewDisplayModeChangedEventArgs> DisplayModeChanged;
00216
00217     static Microsoft.UI.Xaml.DependencyProperty IsPaneOpenProperty { get; };
00218     static Microsoft.UI.Xaml.DependencyProperty CompactModeThresholdWidthProperty { get; };
00219     static Microsoft.UI.Xaml.DependencyProperty ExpandedModeThresholdWidthProperty { get; };
00220     static Microsoft.UI.Xaml.DependencyProperty FooterMenuItemsProperty{ get; };
00221     static Microsoft.UI.Xaml.DependencyProperty FooterMenuItemsSourceProperty{ get; };
00222     static Microsoft.UI.Xaml.DependencyProperty PaneFooterProperty { get; };
00223     static Microsoft.UI.Xaml.DependencyProperty HeaderProperty { get; };
00224     static Microsoft.UI.Xaml.DependencyProperty HeaderTemplateProperty { get; };
00225     static Microsoft.UI.Xaml.DependencyProperty DisplayModeProperty { get; };
00226     static Microsoft.UI.Xaml.DependencyProperty IsSettingsVisibleProperty { get; };
00227     static Microsoft.UI.Xaml.DependencyProperty IsPaneToggleButtonVisibleProperty { get; };
00228     static Microsoft.UI.Xaml.DependencyProperty AlwaysShowHeaderProperty { get; };
00229     static Microsoft.UI.Xaml.DependencyProperty CompactPaneLengthProperty { get; };
00230     static Microsoft.UI.Xaml.DependencyProperty OpenPaneLengthProperty { get; };
00231     static Microsoft.UI.Xaml.DependencyProperty PaneToggleButtonStyleProperty { get; };
00232     static Microsoft.UI.Xaml.DependencyProperty MenuItemsProperty { get; };
00233     static Microsoft.UI.Xaml.DependencyProperty MenuItemsSourceProperty { get; };
00234     static Microsoft.UI.Xaml.DependencyProperty SelectedItemProperty { get; };
00235     static Microsoft.UI.Xaml.DependencyProperty SettingsItemProperty { get; };
00236     static Microsoft.UI.Xaml.DependencyProperty AutoSuggestBoxProperty { get; };
00237     static Microsoft.UI.Xaml.DependencyProperty MenuItemTemplateProperty { get; };
00238     static Microsoft.UI.Xaml.DependencyProperty MenuItemTemplateSelectorProperty { get; };
00239     static Microsoft.UI.Xaml.DependencyProperty MenuItemContainerStyleProperty { get; };
00240     static Microsoft.UI.Xaml.DependencyProperty MenuItemContainerStyleSelectorProperty { get; };
00241
00242     [MUX_PUBLIC]
00243             {
00244     [MUX_DEFAULT_VALUE("winrt::NavigationViewBackButtonVisible::Auto")]
00245     NavigationViewBackButtonVisible IsBackButtonVisible { get; set; };
00246     Boolean IsBackEnabled { get; set; };
00247     String PaneTitle { get; set; };
00248     event Windows.Foundation.TypedEventHandler<NavigationView, NavigationViewBackRequestedEventArgs> BackRequested;
00249     event Windows.Foundation.TypedEventHandler<NavigationView, Object> PaneClosed;
00250     event Windows.Foundation.TypedEventHandler<NavigationView, NavigationViewPaneClosingEventArgs> PaneClosing;
00251     event Windows.Foundation.TypedEventHandler<NavigationView, Object> PaneOpened;
00252     event Windows.Foundation.TypedEventHandler<NavigationView, Object> PaneOpening;
00253
00254     static Microsoft.UI.Xaml.DependencyProperty IsBackButtonVisibleProperty { get; };
00255     static Microsoft.UI.Xaml.DependencyProperty IsBackEnabledProperty { get; };
00256     static Microsoft.UI.Xaml.DependencyProperty PaneTitleProperty { get; };
00257     }
00258
00259     [MUX_PUBLIC]
00260     {
00261         [MUX_DEFAULT_VALUE("winrt::NavigationViewPaneDisplayMode::Auto")]
00262         NavigationViewPaneDisplayMode PaneDisplayMode { get; set; };
00263         [MUX_PROPERTY_CHANGED_CALLBACK(FALSE)]
00264         Microsoft.UI.Xaml.UIElement PaneHeader { get; set; };
00265         [MUX_PROPERTY_CHANGED_CALLBACK(FALSE)]
00266         Microsoft.UI.Xaml.UIElement PaneCustomContent { get; set; };
00267         [MUX_PROPERTY_CHANGED_CALLBACK(FALSE)]
00268         Microsoft.UI.Xaml.UIElement ContentOverlay { get; set; };
00269         [MUX_DEFAULT_VALUE("true")]
00270         Boolean IsPaneVisible { get; set; };
00271         [MUX_DEFAULT_VALUE("winrt::NavigationViewSelectionFollowsFocus::Disabled")]
00272         NavigationViewSelectionFollowsFocus SelectionFollowsFocus { get; set; };
00273         [MUX_PROPERTY_CHANGED_CALLBACK(FALSE)]
00274         NavigationViewTemplateSettings TemplateSettings { get; };
00275         [MUX_DEFAULT_VALUE("winrt::NavigationViewShoulderNavigationEnabled::Never")]
00276         NavigationViewShoulderNavigationEnabled ShoulderNavigationEnabled { get; set; };
00277         [MUX_DEFAULT_VALUE("winrt::NavigationViewOverflowLabelMode::MoreLabel")]
00278         NavigationViewOverflowLabelMode OverflowLabelMode { get; set; };
00279
00280         static Microsoft.UI.Xaml.DependencyProperty PaneDisplayModeProperty { get; };
00281         static Microsoft.UI.Xaml.DependencyProperty PaneHeaderProperty { get; };
00282         static Microsoft.UI.Xaml.DependencyProperty PaneCustomContentProperty { get; };
00283         static Microsoft.UI.Xaml.DependencyProperty ContentOverlayProperty { get; };
00284         static Microsoft.UI.Xaml.DependencyProperty IsPaneVisibleProperty { get; };
00285         static Microsoft.UI.Xaml.DependencyProperty SelectionFollowsFocusProperty { get; };
00286         static Microsoft.UI.Xaml.DependencyProperty TemplateSettingsProperty { get; };
00287         static Microsoft.UI.Xaml.DependencyProperty ShoulderNavigationEnabledProperty { get; };
00288         static Microsoft.UI.Xaml.DependencyProperty OverflowLabelModeProperty { get; };
00289     }
00290
00291     [MUX_DEFAULT_VALUE("true")]
00292     Boolean IsTitleBarAutoPaddingEnabled { get; set; };
00293
00294     static Microsoft.UI.Xaml.DependencyProperty IsTitleBarAutoPaddingEnabledProperty { get; };
00295
00296     [MUX_PUBLIC]
00297     {
00298         event Windows.Foundation.TypedEventHandler<NavigationView, NavigationViewItemExpandingEventArgs> Expanding;
00299         event Windows.Foundation.TypedEventHandler<NavigationView, NavigationViewItemCollapsedEventArgs> Collapsed;
00300
00301         void Expand(NavigationViewItem item);
00302         void Collapse(NavigationViewItem item);
00303     }
00304 }
00305
00306 [MUX_PUBLIC]
00307 [webhosthidden]
00308 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00309 [default_interface]
00310 unsealed runtimeclass NavigationViewItemBase : Microsoft.UI.Xaml.Controls.ContentControl
00311 {
00312     [MUX_PUBLIC]
00313     {
00314         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00315         Boolean IsSelected{ get; set; };
00316
00317         static Microsoft.UI.Xaml.DependencyProperty IsSelectedProperty { get; };
00318     }
00319 }
00320
00321 [MUX_PUBLIC]
00322 [webhosthidden]
00323 unsealed runtimeclass NavigationViewItem : NavigationViewItemBase
00324 {
00325     NavigationViewItem();
00326
00327     [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00328     Microsoft.UI.Xaml.Controls.IconElement Icon { get; set; };
00329     [MUX_DEFAULT_VALUE("48.0")]
00330     Double CompactPaneLength { get; };
00331
00332     static Microsoft.UI.Xaml.DependencyProperty IconProperty { get; };
00333     static Microsoft.UI.Xaml.DependencyProperty CompactPaneLengthProperty { get; };
00334
00335     [MUX_PUBLIC]
00336     {
00337         [MUX_DEFAULT_VALUE("true")]
00338         Boolean SelectsOnInvoked { get; set; };
00339
00340         static Microsoft.UI.Xaml.DependencyProperty SelectsOnInvokedProperty { get; };
00341     }
00342
00343     [MUX_PUBLIC]
00344     {
00345         [MUX_DEFAULT_VALUE("false")]
00346         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00347         Boolean IsExpanded{ get; set; };
00348         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00349         [MUX_DEFAULT_VALUE("false")]
00350         Boolean HasUnrealizedChildren{ get; set; };
00351         [MUX_DEFAULT_VALUE("false")]
00352         Boolean IsChildSelected{ get; set; };
00353
00354         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00355         Windows.Foundation.Collections.IVector<Object> MenuItems{ get; };
00356         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00357         Object MenuItemsSource{ get; set; };
00358
00359         static Microsoft.UI.Xaml.DependencyProperty IsExpandedProperty{ get; };
00360         static Microsoft.UI.Xaml.DependencyProperty HasUnrealizedChildrenProperty{ get; };
00361         static Microsoft.UI.Xaml.DependencyProperty IsChildSelectedProperty{ get; };
00362         static Microsoft.UI.Xaml.DependencyProperty MenuItemsProperty{ get; };
00363         static Microsoft.UI.Xaml.DependencyProperty MenuItemsSourceProperty{ get; };
00364     }
00365
00366     [MUX_PUBLIC_V3]
00367     {
00368         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00369         InfoBadge InfoBadge{ get; set; };
00370
00371         static Microsoft.UI.Xaml.DependencyProperty InfoBadgeProperty{ get; };
00372     }
00373 }
00374
00375 [MUX_PUBLIC]
00376 [webhosthidden]
00377 unsealed runtimeclass NavigationViewItemSeparator : NavigationViewItemBase
00378 {
00379     NavigationViewItemSeparator();
00380 }
00381
00382 [MUX_PUBLIC]
00383 [webhosthidden]
00384 unsealed runtimeclass NavigationViewItemHeader : NavigationViewItemBase
00385 {
00386     NavigationViewItemHeader();
00387 }
00388
00389 }
Generated on Sun Dec 1 2024 20:52:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBoxTests Member List

This is the complete list of members for NumberBoxTests, including all inherited members.
SetupNumberBox() | NumberBoxTests | [inline, private]
VerifyInputScopePropogates() | NumberBoxTests | [inline]
VerifyIsEnabledChangeUpdatesVisualState() | NumberBoxTests | [inline]
VerifyTextAlignmentPropogates() | NumberBoxTests | [inline]
VerifyUIANameBehavior() | NumberBoxTests | [inline]
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingControl.properties.h Source File

  • File List
  • File Members
  • Generated

RatingControl.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class RatingControlProperties
00008 {
00009 public:
00010     RatingControlProperties();
00011
00012     void Caption(winrt::hstring const& value);
00013     winrt::hstring Caption();
00014
00015     void InitialSetValue(int value);
00016     int InitialSetValue();
00017
00018     void IsClearEnabled(bool value);
00019     bool IsClearEnabled();
00020
00021     void IsReadOnly(bool value);
00022     bool IsReadOnly();
00023
00024     void ItemInfo(winrt::RatingItemInfo const& value);
00025     winrt::RatingItemInfo ItemInfo();
00026
00027     void MaxRating(int value);
00028     int MaxRating();
00029
00030     void PlaceholderValue(double value);
00031     double PlaceholderValue();
00032
00033     void Value(double value);
00034     double Value();
00035
00036     static winrt::DependencyProperty CaptionProperty() { return s_CaptionProperty; }
00037     static winrt::DependencyProperty InitialSetValueProperty() { return s_InitialSetValueProperty; }
00038     static winrt::DependencyProperty IsClearEnabledProperty() { return s_IsClearEnabledProperty; }
00039     static winrt::DependencyProperty IsReadOnlyProperty() { return s_IsReadOnlyProperty; }
00040     static winrt::DependencyProperty ItemInfoProperty() { return s_ItemInfoProperty; }
00041     static winrt::DependencyProperty MaxRatingProperty() { return s_MaxRatingProperty; }
00042     static winrt::DependencyProperty PlaceholderValueProperty() { return s_PlaceholderValueProperty; }
00043     static winrt::DependencyProperty ValueProperty() { return s_ValueProperty; }
00044
00045     static GlobalDependencyProperty s_CaptionProperty;
00046     static GlobalDependencyProperty s_InitialSetValueProperty;
00047     static GlobalDependencyProperty s_IsClearEnabledProperty;
00048     static GlobalDependencyProperty s_IsReadOnlyProperty;
00049     static GlobalDependencyProperty s_ItemInfoProperty;
00050     static GlobalDependencyProperty s_MaxRatingProperty;
00051     static GlobalDependencyProperty s_PlaceholderValueProperty;
00052     static GlobalDependencyProperty s_ValueProperty;
00053
00054     winrt::event_token ValueChanged(winrt::TypedEventHandler<winrt::RatingControl, winrt::IInspectable> const& value);
00055     void ValueChanged(winrt::event_token const& token);
00056
00057     event_source<winrt::TypedEventHandler<winrt::RatingControl, winrt::IInspectable>> m_valueChangedEventSource;
00058
00059     static void EnsureProperties();
00060     static void ClearProperties();
00061
00062     static void OnCaptionPropertyChanged(
00063         winrt::DependencyObject const& sender,
00064         winrt::DependencyPropertyChangedEventArgs const& args);
00065
00066     static void OnInitialSetValuePropertyChanged(
00067         winrt::DependencyObject const& sender,
00068         winrt::DependencyPropertyChangedEventArgs const& args);
00069
00070     static void OnIsClearEnabledPropertyChanged(
00071         winrt::DependencyObject const& sender,
00072         winrt::DependencyPropertyChangedEventArgs const& args);
00073
00074     static void OnIsReadOnlyPropertyChanged(
00075         winrt::DependencyObject const& sender,
00076         winrt::DependencyPropertyChangedEventArgs const& args);
00077
00078     static void OnItemInfoPropertyChanged(
00079         winrt::DependencyObject const& sender,
00080         winrt::DependencyPropertyChangedEventArgs const& args);
00081
00082     static void OnMaxRatingPropertyChanged(
00083         winrt::DependencyObject const& sender,
00084         winrt::DependencyPropertyChangedEventArgs const& args);
00085
00086     static void OnPlaceholderValuePropertyChanged(
00087         winrt::DependencyObject const& sender,
00088         winrt::DependencyPropertyChangedEventArgs const& args);
00089
00090     static void OnValuePropertyChanged(
00091         winrt::DependencyObject const& sender,
00092         winrt::DependencyPropertyChangedEventArgs const& args);
00093 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingZoomAnimationStartingEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingZoomAnimationStartingEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollingZoomAnimationStartingEventArgs.g.h"
00007
00008 class ScrollingZoomAnimationStartingEventArgs :
00009     public winrt::implementation::ScrollingZoomAnimationStartingEventArgsT<ScrollingZoomAnimationStartingEventArgs>
00010 {
00011 public:
00012     ScrollingZoomAnimationStartingEventArgs()
00013     {
00014         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00015     }
00016
00017     ~ScrollingZoomAnimationStartingEventArgs()
00018     {
00019         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00020     }
00021
00022     // IScrollingZoomAnimationStartingEventArgs overrides
00023     winrt::float2 CenterPoint();
00024     float StartZoomFactor();
00025     float EndZoomFactor();
00026     winrt::CompositionAnimation Animation();
00027     void Animation(winrt::CompositionAnimation const& value);
00028     int32_t CorrelationId();
00029
00030     void SetZoomFactorChangeCorrelationId(int32_t zoomFactorChangeCorrelationId);
00031     winrt::CompositionAnimation GetAnimation() const;
00032     void SetAnimation(const winrt::CompositionAnimation& animation);
00033     void SetCenterPoint(const winrt::float2& centerPoint);
00034     void SetStartZoomFactor(const float& startZoomFactor);
00035     void SetEndZoomFactor(const float& endZoomFactor);
00036
00037 private:
00038     winrt::CompositionAnimation m_animation{ nullptr };
00039     winrt::float2 m_centerPoint{ };
00040     float m_startZoomFactor{ 1.0f };
00041     float m_endZoomFactor{ 1.0f };
00042     int32_t m_zoomFactorChangeCorrelationId{ -1 };
00043 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrum.cpp Source File

  • File List
  • File Members
  • ColorPicker

ColorSpectrum.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ColorSpectrum.h"
00007
00008 #include "ColorSpectrumAutomationPeer.h"
00009 #include "SpectrumBrush.h"
00010
00011 using namespace std;
00012
00013 ColorSpectrum::ColorSpectrum()
00014 {
00015     SetDefaultStyleKey(this);
00016
00017     m_updatingColor = false;
00018     m_updatingHsvColor = false;
00019     m_isPointerOver = false;
00020     m_isPointerPressed = false;
00021     m_shouldShowLargeSelection = false;
00022
00023     m_shapeFromLastBitmapCreation = Shape();
00024     m_componentsFromLastBitmapCreation = Components();
00025     m_imageWidthFromLastBitmapCreation = 0;
00026     m_imageHeightFromLastBitmapCreation = 0;
00027     m_minHueFromLastBitmapCreation = MinHue();
00028     m_maxHueFromLastBitmapCreation = MaxHue();
00029     m_minSaturationFromLastBitmapCreation = MinSaturation();
00030     m_maxSaturationFromLastBitmapCreation = MaxSaturation();
00031     m_minValueFromLastBitmapCreation = MinValue();
00032     m_maxValueFromLastBitmapCreation = MaxValue();
00033
00034     Unloaded({ this, &ColorSpectrum::OnUnloaded });
00035 }
00036
00037 winrt::AutomationPeer ColorSpectrum::OnCreateAutomationPeer()
00038 {
00039     return winrt::make<ColorSpectrumAutomationPeer>(*this);
00040 }
00041
00042 void ColorSpectrum::OnApplyTemplate()
00043 {
00044     winrt::IControlProtected thisAsControlProtected = *this;
00045
00046     m_layoutRoot.set(GetTemplateChildT<winrt::Grid>(L"LayoutRoot", thisAsControlProtected));
00047     m_sizingGrid.set(GetTemplateChildT<winrt::Grid>(L"SizingGrid", thisAsControlProtected));
00048     m_spectrumRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"SpectrumRectangle", thisAsControlProtected));
00049     m_spectrumEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"SpectrumEllipse", thisAsControlProtected));
00050     m_spectrumOverlayRectangle.set(GetTemplateChildT<winrt::Rectangle>(L"SpectrumOverlayRectangle", thisAsControlProtected));
00051     m_spectrumOverlayEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"SpectrumOverlayEllipse", thisAsControlProtected));
00052     m_inputTarget.set(GetTemplateChildT<winrt::FrameworkElement>(L"InputTarget", thisAsControlProtected));
00053     m_selectionEllipsePanel.set(GetTemplateChildT<winrt::Panel>(L"SelectionEllipsePanel", thisAsControlProtected));
00054     m_colorNameToolTip.set(GetTemplateChildT<winrt::ToolTip>(L"ColorNameToolTip", thisAsControlProtected));
00055
00056     if (auto&& layoutRoot = m_layoutRoot.get())
00057     {
00058         layoutRoot.SizeChanged({ this, &ColorSpectrum::OnLayoutRootSizeChanged });
00059     }
00060
00061     if (auto&& inputTarget = m_inputTarget.get())
00062     {
00063         inputTarget.PointerEntered({ this, &ColorSpectrum::OnInputTargetPointerEntered });
00064         inputTarget.PointerExited({ this, &ColorSpectrum::OnInputTargetPointerExited });
00065         inputTarget.PointerPressed({ this, &ColorSpectrum::OnInputTargetPointerPressed });
00066         inputTarget.PointerMoved({ this, &ColorSpectrum::OnInputTargetPointerMoved });
00067         inputTarget.PointerReleased({ this, &ColorSpectrum::OnInputTargetPointerReleased });
00068     }
00069
00070     if (auto&& colorNameToolTip = m_colorNameToolTip.get())
00071     {
00072         colorNameToolTip.Content(box_value(winrt::ColorDisplayNameHelper::ToDisplayName(Color())));
00073     }
00074
00075     if (auto&& selectionEllipsePanel = m_selectionEllipsePanel.get())
00076     {
00077         selectionEllipsePanel.RegisterPropertyChangedCallback(winrt::FrameworkElement::FlowDirectionProperty(), { this, &ColorSpectrum::OnSelectionEllipseFlowDirectionChanged });
00078     }
00079
00080     // If we haven't yet created our bitmaps, do so now.
00081     if (m_hsvValues.size() == 0)
00082     {
00083         CreateBitmapsAndColorMap();
00084     }
00085
00086     UpdateEllipse();
00087     UpdateVisualState(false /* useTransitions */);
00088 }
00089
00090 void ColorSpectrum::OnKeyDown(winrt::KeyRoutedEventArgs const& args)
00091 {
00092     if (args.Key() != winrt::VirtualKey::Left &&
00093         args.Key() != winrt::VirtualKey::Right &&
00094         args.Key() != winrt::VirtualKey::Up &&
00095         args.Key() != winrt::VirtualKey::Down)
00096     {
00097         __super::OnKeyDown(args);
00098         return;
00099     }
00100
00101     const bool isControlDown = (winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00102
00103     winrt::ColorPickerHsvChannel incrementChannel = winrt::ColorPickerHsvChannel::Hue;
00104
00105     bool isSaturationValue = false;
00106
00107     if (args.Key() == winrt::VirtualKey::Left ||
00108         args.Key() == winrt::VirtualKey::Right)
00109     {
00110         switch (Components())
00111         {
00112         case winrt::ColorSpectrumComponents::HueSaturation:
00113         case winrt::ColorSpectrumComponents::HueValue:
00114             incrementChannel = winrt::ColorPickerHsvChannel::Hue;
00115             break;
00116
00117         case winrt::ColorSpectrumComponents::SaturationValue:
00118             isSaturationValue = true;
00119             [[fallthrough]]; // fallthrough is explicitly wanted
00120         case winrt::ColorSpectrumComponents::SaturationHue:
00121             incrementChannel = winrt::ColorPickerHsvChannel::Saturation;
00122             break;
00123
00124         case winrt::ColorSpectrumComponents::ValueHue:
00125         case winrt::ColorSpectrumComponents::ValueSaturation:
00126             incrementChannel = winrt::ColorPickerHsvChannel::Value;
00127             break;
00128         }
00129     }
00130     else if (args.Key() == winrt::VirtualKey::Up ||
00131         args.Key() == winrt::VirtualKey::Down)
00132     {
00133         switch (Components())
00134         {
00135         case winrt::ColorSpectrumComponents::SaturationHue:
00136         case winrt::ColorSpectrumComponents::ValueHue:
00137             incrementChannel = winrt::ColorPickerHsvChannel::Hue;
00138             break;
00139
00140         case winrt::ColorSpectrumComponents::HueSaturation:
00141         case winrt::ColorSpectrumComponents::ValueSaturation:
00142             incrementChannel = winrt::ColorPickerHsvChannel::Saturation;
00143             break;
00144
00145         case winrt::ColorSpectrumComponents::SaturationValue:
00146             isSaturationValue = true;
00147             [[fallthrough]]; // fallthrough is explicitly wanted
00148         case winrt::ColorSpectrumComponents::HueValue:
00149             incrementChannel = winrt::ColorPickerHsvChannel::Value;
00150             break;
00151         }
00152     }
00153
00154     double minBound = 0;
00155     double maxBound = 0;
00156
00157     switch (incrementChannel)
00158     {
00159     case winrt::ColorPickerHsvChannel::Hue:
00160         minBound = MinHue();
00161         maxBound = MaxHue();
00162         break;
00163
00164     case winrt::ColorPickerHsvChannel::Saturation:
00165         minBound = MinSaturation();
00166         maxBound = MaxSaturation();
00167         break;
00168
00169     case winrt::ColorPickerHsvChannel::Value:
00170         minBound = MinValue();
00171         maxBound = MaxValue();
00172         break;
00173     }
00174
00175     // The order of saturation and value in the spectrum is reversed - the max value is at the bottom while the min value is at the top -
00176     // so we want left and up to be lower for hue, but higher for saturation and value.
00177     // This will ensure that the icon always moves in the direction of the key press.
00178     IncrementDirection direction =
00179         (incrementChannel == winrt::ColorPickerHsvChannel::Hue && (args.Key() == winrt::VirtualKey::Left || args.Key() == winrt::VirtualKey::Up)) ||
00180         (incrementChannel != winrt::ColorPickerHsvChannel::Hue && (args.Key() == winrt::VirtualKey::Right || args.Key() == winrt::VirtualKey::Down)) ?
00181         IncrementDirection::Lower :
00182         IncrementDirection::Higher;
00183
00184     // Image is flipped in RightToLeft, so we need to invert direction in that case.
00185     // The combination saturation and value is also flipped, so we need to invert in that case too.
00186     // If both are false, we don't need to invert.
00187     // If both are true, we would invert twice, so not invert at all.
00188     if ((FlowDirection() == winrt::FlowDirection::RightToLeft) != isSaturationValue &&
00189         (args.Key() == winrt::VirtualKey::Left || args.Key() == winrt::VirtualKey::Right))
00190     {
00191         if (direction == IncrementDirection::Higher)
00192         {
00193             direction = IncrementDirection::Lower;
00194         }
00195         else
00196         {
00197             direction = IncrementDirection::Higher;
00198         }
00199     }
00200
00201     const IncrementAmount amount = isControlDown ? IncrementAmount::Large : IncrementAmount::Small;
00202
00203     const winrt::float4 hsvColor = HsvColor();
00204     UpdateColor(IncrementColorChannel(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor)), incrementChannel, direction, amount, true /* shouldWrap */, minBound, maxBound));
00205     args.Handled(true);
00206 }
00207
00208 void ColorSpectrum::OnGotFocus(winrt::RoutedEventArgs const& /*e*/)
00209 {
00210     if (auto&& colorNameToolTip = m_colorNameToolTip.get())
00211     {
00212         colorNameToolTip.IsOpen(true);
00213     }
00214
00215     UpdateVisualState(true /* useTransitions */);
00216 }
00217
00218 void ColorSpectrum::OnLostFocus(winrt::RoutedEventArgs const& /*e*/)
00219 {
00220     if (auto&& colorNameToolTip = m_colorNameToolTip.get())
00221     {
00222         colorNameToolTip.IsOpen(false);
00223     }
00224
00225     UpdateVisualState(true /* useTransitions */);
00226 }
00227
00228 void ColorSpectrum::OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00229 {
00230     winrt::IDependencyProperty property = args.Property();
00231
00232     if (property == s_ColorProperty)
00233     {
00234         OnColorChanged(args);
00235     }
00236     else if (property == s_HsvColorProperty)
00237     {
00238         OnHsvColorChanged(args);
00239     }
00240     else if (property == s_MinHueProperty ||
00241         property == s_MaxHueProperty)
00242     {
00243         OnMinMaxHueChanged(args);
00244     }
00245     else if (property == s_MinSaturationProperty ||
00246         property == s_MaxSaturationProperty)
00247     {
00248         OnMinMaxSaturationChanged(args);
00249     }
00250     else if (property == s_MinValueProperty ||
00251         property == s_MaxValueProperty)
00252     {
00253         OnMinMaxValueChanged(args);
00254     }
00255     else if (property == s_ShapeProperty)
00256     {
00257         OnShapeChanged(args);
00258     }
00259     else if (property == s_ComponentsProperty)
00260     {
00261         OnComponentsChanged(args);
00262     }
00263 }
00264
00265 void ColorSpectrum::OnColorChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00266 {
00267     // If we're in the process of internally updating the color, then we don't want to respond to the Color property changing.
00268     if (!m_updatingColor)
00269     {
00270         const winrt::Color color = Color();
00271
00272         m_updatingHsvColor = true;
00273         const Hsv newHsv = RgbToHsv(Rgb(color.R / 255.0, color.G / 255.0, color.B / 255.0));
00274         HsvColor(winrt::float4{ static_cast<float>(newHsv.h), static_cast<float>(newHsv.s), static_cast<float>(newHsv.v), static_cast<float>(color.A / 255.0) });
00275         m_updatingHsvColor = false;
00276
00277         UpdateEllipse();
00278         UpdateBitmapSources();
00279     }
00280
00281     m_oldColor = unbox_value<winrt::Color>(args.OldValue());
00282 }
00283
00284 void ColorSpectrum::OnHsvColorChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00285 {
00286     // If we're in the process of internally updating the HSV color, then we don't want to respond to the HsvColor property changing.
00287     if (!m_updatingHsvColor)
00288     {
00289         SetColor();
00290     }
00291
00292     m_oldHsvColor = unbox_value<winrt::float4>(args.OldValue());
00293 }
00294
00295 void ColorSpectrum::SetColor()
00296 {
00297     const winrt::float4 hsvColor = HsvColor();
00298
00299     m_updatingColor = true;
00300     const Rgb newRgb = HsvToRgb(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor)));
00301
00302     Color(ColorFromRgba(newRgb, hsv::GetAlpha(hsvColor)));
00303
00304     m_updatingColor = false;
00305
00306     UpdateEllipse();
00307     UpdateBitmapSources();
00308     RaiseColorChanged();
00309 }
00310
00311 void ColorSpectrum::RaiseColorChanged()
00312 {
00313     const winrt::Color newColor = Color();
00314     const auto colorChanged =
00315         m_oldColor.A != newColor.A ||
00316         m_oldColor.R != newColor.R ||
00317         m_oldColor.G != newColor.G ||
00318         m_oldColor.B != newColor.B;
00319     const auto areBothColorsBlack =
00320         (m_oldColor.R == newColor.R && newColor.R == 0) ||
00321         (m_oldColor.G == newColor.G && newColor.G == 0) ||
00322         (m_oldColor.B == newColor.B && newColor.B == 0);
00323
00324     if (colorChanged || areBothColorsBlack)
00325     {
00326         auto colorChangedEventArgs = winrt::make_self<ColorChangedEventArgs>();
00327
00328         colorChangedEventArgs->OldColor(m_oldColor);
00329         colorChangedEventArgs->NewColor(newColor);
00330
00331         m_colorChangedEventSource(*this, *colorChangedEventArgs);
00332
00333         if (auto&& colorNameToolTip = m_colorNameToolTip.get())
00334         {
00335             colorNameToolTip.Content(box_value(winrt::ColorDisplayNameHelper::ToDisplayName(newColor)));
00336         }
00337
00338         auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this);
00339         if (peer)
00340         {
00341             winrt::ColorSpectrumAutomationPeer colorSpectrumPeer = peer.as<winrt::ColorSpectrumAutomationPeer>();
00342             winrt::get_self<ColorSpectrumAutomationPeer>(colorSpectrumPeer)->RaisePropertyChangedEvent(m_oldColor, newColor, m_oldHsvColor, HsvColor());
00343         }
00344     }
00345 }
00346
00347 void ColorSpectrum::OnMinMaxHueChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00348 {
00349     const int minHue = MinHue();
00350     const int maxHue = MaxHue();
00351
00352     if (minHue < 0 || minHue > 359)
00353     {
00354         throw winrt::hresult_invalid_argument(L"MinHue must be between 0 and 359.");
00355     }
00356     else if (maxHue < 0 || maxHue > 359)
00357     {
00358         throw winrt::hresult_invalid_argument(L"MaxHue must be between 0 and 359.");
00359     }
00360
00361     const winrt::ColorSpectrumComponents components = Components();
00362
00363     // If hue is one of the axes in the spectrum bitmap, then we'll need to regenerate it
00364     // if the maximum or minimum value has changed.
00365     if (components != winrt::ColorSpectrumComponents::SaturationValue &&
00366         components != winrt::ColorSpectrumComponents::ValueSaturation)
00367     {
00368         CreateBitmapsAndColorMap();
00369     }
00370 }
00371
00372 void ColorSpectrum::OnMinMaxSaturationChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00373 {
00374     const int minSaturation = MinSaturation();
00375     const int maxSaturation = MaxSaturation();
00376
00377     if (minSaturation < 0 || minSaturation > 100)
00378     {
00379         throw winrt::hresult_invalid_argument(L"MinSaturation must be between 0 and 100.");
00380     }
00381     else if (maxSaturation < 0 || maxSaturation > 100)
00382     {
00383         throw winrt::hresult_invalid_argument(L"MaxSaturation must be between 0 and 100.");
00384     }
00385
00386     const winrt::ColorSpectrumComponents components = Components();
00387
00388     // If value is one of the axes in the spectrum bitmap, then we'll need to regenerate it
00389     // if the maximum or minimum value has changed.
00390     if (components != winrt::ColorSpectrumComponents::HueValue &&
00391         components != winrt::ColorSpectrumComponents::ValueHue)
00392     {
00393         CreateBitmapsAndColorMap();
00394     }
00395 }
00396
00397 void ColorSpectrum::OnMinMaxValueChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00398 {
00399     const int minValue = MinValue();
00400     const int maxValue = MaxValue();
00401
00402     if (minValue < 0 || minValue > 100)
00403     {
00404         throw winrt::hresult_invalid_argument(L"MinValue must be between 0 and 100.");
00405     }
00406     else if (maxValue < 0 || maxValue > 100)
00407     {
00408         throw winrt::hresult_invalid_argument(L"MaxValue must be between 0 and 100.");
00409     }
00410
00411     const winrt::ColorSpectrumComponents components = Components();
00412
00413     // If value is one of the axes in the spectrum bitmap, then we'll need to regenerate it
00414     // if the maximum or minimum value has changed.
00415     if (components != winrt::ColorSpectrumComponents::HueSaturation &&
00416         components != winrt::ColorSpectrumComponents::SaturationHue)
00417     {
00418         CreateBitmapsAndColorMap();
00419     }
00420 }
00421
00422 void ColorSpectrum::OnShapeChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00423 {
00424     CreateBitmapsAndColorMap();
00425 }
00426
00427 void ColorSpectrum::OnComponentsChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00428 {
00429     CreateBitmapsAndColorMap();
00430 }
00431
00432 void ColorSpectrum::OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
00433 {
00434     // There is an anomaly in the Loading/Loaded/Unloaded events that can cause an Unloaded event to
00435     // fire when the element is in the tree. When this happens, we end up cancelling the spectrum
00436     // image generation and don't display it.  Unfortunately, we can't fix this until at least version
00437     // 2.0, so for now we will work around it (as we have suggested to customers to do), by checking
00438     // to see if we are actually unloaded before cancelling.
00439     if (!IsLoaded())
00440     {
00441         // If we're in the middle of creating an image bitmap while being unloaded,
00442         // we'll want to synchronously cancel it so we don't have any asynchronous actions
00443         // lingering beyond our lifetime.
00444         CancelAsyncAction(m_createImageBitmapAction);
00445     }
00446 }
00447
00448 winrt::Rect ColorSpectrum::GetBoundingRectangle()
00449 {
00450     winrt::Rect localRect{ 0, 0, 0, 0 };
00451
00452     if (auto&& inputTarget = m_inputTarget.get())
00453     {
00454         localRect.Width = static_cast<float>(inputTarget.ActualWidth());
00455         localRect.Height = static_cast<float>(inputTarget.ActualHeight());
00456     }
00457
00458     const auto globalBounds = TransformToVisual(nullptr).TransformBounds(localRect);
00459     return SharedHelpers::ConvertDipsToPhysical(*this, globalBounds);
00460 }
00461
00462 void ColorSpectrum::UpdateVisualState(bool useTransitions)
00463 {
00464     winrt::Control thisAsControl = *this;
00465
00466     if (m_isPointerPressed)
00467     {
00468         winrt::VisualStateManager::GoToState(thisAsControl, m_shouldShowLargeSelection ? L"PressedLarge" : L"Pressed", useTransitions);
00469     }
00470     else if (m_isPointerOver)
00471     {
00472         winrt::VisualStateManager::GoToState(thisAsControl, L"PointerOver", useTransitions);
00473     }
00474     else
00475     {
00476         winrt::VisualStateManager::GoToState(thisAsControl, L"Normal", useTransitions);
00477     }
00478
00479     winrt::VisualStateManager::GoToState(thisAsControl, m_shapeFromLastBitmapCreation == winrt::ColorSpectrumShape::Box ? L"BoxSelected" : L"RingSelected", useTransitions);
00480     winrt::VisualStateManager::GoToState(thisAsControl, SelectionEllipseShouldBeLight() ? L"SelectionEllipseLight" : L"SelectionEllipseDark", useTransitions);
00481
00482     if (IsEnabled() && FocusState() != winrt::FocusState::Unfocused)
00483     {
00484         if (FocusState() == winrt::FocusState::Pointer)
00485         {
00486             winrt::VisualStateManager::GoToState(thisAsControl, L"PointerFocused", useTransitions);
00487         }
00488         else
00489         {
00490             winrt::VisualStateManager::GoToState(thisAsControl, L"Focused", useTransitions);
00491         }
00492     }
00493     else
00494     {
00495         winrt::VisualStateManager::GoToState(thisAsControl, L"Unfocused", useTransitions);
00496     }
00497 }
00498
00499 void ColorSpectrum::UpdateColor(Hsv newHsv)
00500 {
00501     m_updatingColor = true;
00502     m_updatingHsvColor = true;
00503
00504     const Rgb newRgb = HsvToRgb(newHsv);
00505     const float alpha = hsv::GetAlpha(HsvColor());
00506
00507     Color(ColorFromRgba(newRgb, alpha));
00508     HsvColor({ static_cast<float>(newHsv.h), static_cast<float>(newHsv.s), static_cast<float>(newHsv.v), alpha });
00509
00510     UpdateEllipse();
00511     UpdateVisualState(true /* useTransitions */);
00512
00513     m_updatingHsvColor = false;
00514     m_updatingColor = false;
00515
00516     RaiseColorChanged();
00517 }
00518
00519 void ColorSpectrum::UpdateColorFromPoint(const winrt::PointerPoint& point)
00520 {
00521     // If we haven't initialized our HSV value array yet, then we should just ignore any user input -
00522     // we don't yet know what to do with it.
00523     if (m_hsvValues.size() == 0)
00524     {
00525         return;
00526     }
00527
00528     double xPosition = point.Position().X;
00529     double yPosition = point.Position().Y;
00530     const double radius = min(m_imageWidthFromLastBitmapCreation, m_imageHeightFromLastBitmapCreation) / 2;
00531     const double distanceFromRadius = sqrt(pow(xPosition - radius, 2) + pow(yPosition - radius, 2));
00532
00533     const auto shape = Shape();
00534
00535     // If the point is outside the circle, we should bring it back into the circle.
00536     if (distanceFromRadius > radius && shape == winrt::ColorSpectrumShape::Ring)
00537     {
00538         xPosition = (radius / distanceFromRadius) * (xPosition - radius) + radius;
00539         yPosition = (radius / distanceFromRadius) * (yPosition - radius) + radius;
00540     }
00541
00542     // Now we need to find the index into the array of HSL values at each point in the spectrum m_image.
00543     int x = static_cast<int>(round(xPosition));
00544     int y = static_cast<int>(round(yPosition));
00545     const int width = static_cast<int>(round(m_imageWidthFromLastBitmapCreation));
00546
00547     if (x < 0)
00548     {
00549         x = 0;
00550     }
00551     else if (x >= m_imageWidthFromLastBitmapCreation)
00552     {
00553         x = static_cast<int>(round(m_imageWidthFromLastBitmapCreation)) - 1;
00554     }
00555
00556     if (y < 0)
00557     {
00558         y = 0;
00559     }
00560     else if (y >= m_imageHeightFromLastBitmapCreation)
00561     {
00562         y = static_cast<int>(round(m_imageHeightFromLastBitmapCreation)) - 1;
00563     }
00564
00565     // The gradient image contains two dimensions of HSL information, but not the third.
00566     // We should keep the third where it already was.
00567     Hsv hsvAtPoint = m_hsvValues[static_cast<std::vector<Hsv>::size_type>(y) * width + x];
00568
00569     const auto components = Components();
00570     const auto hsvColor = HsvColor();
00571
00572     switch (components)
00573     {
00574     case winrt::ColorSpectrumComponents::HueValue:
00575     case winrt::ColorSpectrumComponents::ValueHue:
00576         hsvAtPoint.s = hsv::GetSaturation(hsvColor);
00577         break;
00578
00579     case winrt::ColorSpectrumComponents::HueSaturation:
00580     case winrt::ColorSpectrumComponents::SaturationHue:
00581         hsvAtPoint.v = hsv::GetValue(hsvColor);
00582         break;
00583
00584     case winrt::ColorSpectrumComponents::ValueSaturation:
00585     case winrt::ColorSpectrumComponents::SaturationValue:
00586         hsvAtPoint.h = hsv::GetHue(hsvColor);
00587         break;
00588     }
00589
00590     UpdateColor(hsvAtPoint);
00591 }
00592
00593 void ColorSpectrum::UpdateEllipse()
00594 {
00595     auto&& selectionEllipsePanel = m_selectionEllipsePanel.get();
00596
00597     if (!selectionEllipsePanel)
00598     {
00599         return;
00600     }
00601
00602     // If we don't have an image size yet, we shouldn't be showing the ellipse.
00603     if (m_imageWidthFromLastBitmapCreation == 0 ||
00604         m_imageHeightFromLastBitmapCreation == 0)
00605     {
00606         selectionEllipsePanel.Visibility(winrt::Visibility::Collapsed);
00607         return;
00608     }
00609     else
00610     {
00611         selectionEllipsePanel.Visibility(winrt::Visibility::Visible);
00612     }
00613
00614     double xPosition;
00615     double yPosition;
00616
00617     winrt::float4 hsvColor = HsvColor();
00618
00619     hsv::SetHue(hsvColor, clamp(hsv::GetHue(hsvColor), static_cast<float>(m_minHueFromLastBitmapCreation), static_cast<float> (m_maxHueFromLastBitmapCreation)));
00620     hsv::SetSaturation(hsvColor, clamp(hsv::GetSaturation(hsvColor), m_minSaturationFromLastBitmapCreation / 100.0f, m_maxSaturationFromLastBitmapCreation / 100.0f));
00621     hsv::SetValue(hsvColor, clamp(hsv::GetValue(hsvColor), m_minValueFromLastBitmapCreation / 100.0f, m_maxValueFromLastBitmapCreation / 100.0f));
00622
00623     if (m_shapeFromLastBitmapCreation == winrt::ColorSpectrumShape::Box)
00624     {
00625         double xPercent = 0;
00626         double yPercent = 0;
00627
00628         const double hPercent = (hsv::GetHue(hsvColor) - m_minHueFromLastBitmapCreation) / (m_maxHueFromLastBitmapCreation - m_minHueFromLastBitmapCreation);
00629         double sPercent = (hsv::GetSaturation(hsvColor) * 100.0 - m_minSaturationFromLastBitmapCreation) / (static_cast<double>(m_maxSaturationFromLastBitmapCreation) - m_minSaturationFromLastBitmapCreation);
00630         double vPercent = (hsv::GetValue(hsvColor) * 100.0 - m_minValueFromLastBitmapCreation) / (static_cast<double>(m_maxValueFromLastBitmapCreation) - m_minValueFromLastBitmapCreation);
00631
00632         // In the case where saturation was an axis in the spectrum with hue, or value is an axis, full stop,
00633         // we inverted the direction of that axis in order to put more hue on the outside of the ring,
00634         // so we need to do similarly here when positioning the ellipse.
00635         if (m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::HueSaturation ||
00636             m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::SaturationHue)
00637         {
00638             sPercent = 1 - sPercent;
00639         }
00640         else
00641         {
00642             vPercent = 1 - vPercent;
00643         }
00644
00645         switch (m_componentsFromLastBitmapCreation)
00646         {
00647         case winrt::ColorSpectrumComponents::HueValue:
00648             xPercent = hPercent;
00649             yPercent = vPercent;
00650             break;
00651
00652         case winrt::ColorSpectrumComponents::HueSaturation:
00653             xPercent = hPercent;
00654             yPercent = sPercent;
00655             break;
00656
00657         case winrt::ColorSpectrumComponents::ValueHue:
00658             xPercent = vPercent;
00659             yPercent = hPercent;
00660             break;
00661
00662         case winrt::ColorSpectrumComponents::ValueSaturation:
00663             xPercent = vPercent;
00664             yPercent = sPercent;
00665             break;
00666
00667         case winrt::ColorSpectrumComponents::SaturationHue:
00668             xPercent = sPercent;
00669             yPercent = hPercent;
00670             break;
00671
00672         case winrt::ColorSpectrumComponents::SaturationValue:
00673             xPercent = sPercent;
00674             yPercent = vPercent;
00675             break;
00676         }
00677
00678         xPosition = m_imageWidthFromLastBitmapCreation * xPercent;
00679         yPosition = m_imageHeightFromLastBitmapCreation * yPercent;
00680     }
00681     else
00682     {
00683         double thetaValue = 0;
00684         double rValue = 0;
00685
00686         const double hThetaValue =
00687             m_maxHueFromLastBitmapCreation != m_minHueFromLastBitmapCreation ?
00688             360 * (hsv::GetHue(hsvColor) - m_minHueFromLastBitmapCreation) / (m_maxHueFromLastBitmapCreation - m_minHueFromLastBitmapCreation) :
00689             0;
00690         double sThetaValue =
00691             m_maxSaturationFromLastBitmapCreation != m_minSaturationFromLastBitmapCreation ?
00692             360 * (hsv::GetSaturation(hsvColor) * 100.0 - m_minSaturationFromLastBitmapCreation) / (static_cast<double>(m_maxSaturationFromLastBitmapCreation) - m_minSaturationFromLastBitmapCreation) :
00693             0;
00694         double vThetaValue =
00695             m_maxValueFromLastBitmapCreation != m_minValueFromLastBitmapCreation ?
00696             360 * (hsv::GetValue(hsvColor) * 100.0 - m_minValueFromLastBitmapCreation) / (static_cast<double>(m_maxValueFromLastBitmapCreation) - m_minValueFromLastBitmapCreation) :
00697             0;
00698         const double hRValue = m_maxHueFromLastBitmapCreation != m_minHueFromLastBitmapCreation ?
00699             (hsv::GetHue(hsvColor) - m_minHueFromLastBitmapCreation) / (m_maxHueFromLastBitmapCreation - m_minHueFromLastBitmapCreation) - 1 :
00700             0;
00701         double sRValue = m_maxSaturationFromLastBitmapCreation != m_minSaturationFromLastBitmapCreation ?
00702             (hsv::GetSaturation(hsvColor) * 100.0 - m_minSaturationFromLastBitmapCreation) / (static_cast<double>(m_maxSaturationFromLastBitmapCreation) - m_minSaturationFromLastBitmapCreation) - 1 :
00703             0;
00704         double vRValue = m_maxValueFromLastBitmapCreation != m_minValueFromLastBitmapCreation ?
00705             (hsv::GetValue(hsvColor) * 100.0 - m_minValueFromLastBitmapCreation) / (static_cast<double>(m_maxValueFromLastBitmapCreation) - m_minValueFromLastBitmapCreation) - 1 :
00706             0;
00707
00708         // In the case where saturation was an axis in the spectrum with hue, or value is an axis, full stop,
00709         // we inverted the direction of that axis in order to put more hue on the outside of the ring,
00710         // so we need to do similarly here when positioning the ellipse.
00711         if (m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::HueSaturation ||
00712             m_componentsFromLastBitmapCreation == winrt::ColorSpectrumComponents::SaturationHue)
00713         {
00714             sThetaValue = 360 - sThetaValue;
00715             sRValue = -sRValue - 1;
00716         }
00717         else
00718         {
00719             vThetaValue = 360 - vThetaValue;
00720             vRValue = -vRValue - 1;
00721         }
00722
00723         switch (m_componentsFromLastBitmapCreation)
00724         {
00725         case winrt::ColorSpectrumComponents::HueValue:
00726             thetaValue = hThetaValue;
00727             rValue = vRValue;
00728             break;
00729
00730         case winrt::ColorSpectrumComponents::HueSaturation:
00731             thetaValue = hThetaValue;
00732             rValue = sRValue;
00733             break;
00734
00735         case winrt::ColorSpectrumComponents::ValueHue:
00736             thetaValue = vThetaValue;
00737             rValue = hRValue;
00738             break;
00739
00740         case winrt::ColorSpectrumComponents::ValueSaturation:
00741             thetaValue = vThetaValue;
00742             rValue = sRValue;
00743             break;
00744
00745         case winrt::ColorSpectrumComponents::SaturationHue:
00746             thetaValue = sThetaValue;
00747             rValue = hRValue;
00748             break;
00749
00750         case winrt::ColorSpectrumComponents::SaturationValue:
00751             thetaValue = sThetaValue;
00752             rValue = vRValue;
00753             break;
00754         }
00755
00756         const double radius = min(m_imageWidthFromLastBitmapCreation, m_imageHeightFromLastBitmapCreation) / 2;
00757
00758         xPosition = (cos((thetaValue * M_PI / 180) + M_PI) * radius * rValue) + radius;
00759         yPosition = (sin((thetaValue * M_PI / 180) + M_PI) * radius * rValue) + radius;
00760     }
00761
00762     winrt::Canvas::SetLeft(selectionEllipsePanel, xPosition - (selectionEllipsePanel.Width() / 2));
00763     winrt::Canvas::SetTop(selectionEllipsePanel, yPosition - (selectionEllipsePanel.Height() / 2));
00764
00765     if (auto&& colorNameToolTip = m_colorNameToolTip.get())
00766     {
00767         // ToolTip doesn't currently provide any way to re-run its placement logic if its placement target moves,
00768         // so toggling IsEnabled induces it to do that without incurring any visual glitches.
00769         colorNameToolTip.IsEnabled(false);
00770         colorNameToolTip.IsEnabled(true);
00771     }
00772
00773     UpdateVisualState(true /* useTransitions */);
00774 }
00775
00776 void ColorSpectrum::OnLayoutRootSizeChanged(winrt::IInspectable const& /*sender*/, winrt::SizeChangedEventArgs const& /*args*/)
00777 {
00778     // We want ColorSpectrum to always be a square, so we'll take the smaller of the dimensions
00779     // and size the sizing grid to that.
00780     CreateBitmapsAndColorMap();
00781 }
00782
00783 void ColorSpectrum::OnInputTargetPointerEntered(winrt::IInspectable const& /*sender*/, winrt::PointerRoutedEventArgs const& args)
00784 {
00785     m_isPointerOver = true;
00786     UpdateVisualState(true /* useTransitions*/);
00787     args.Handled(true);
00788 }
00789
00790 void ColorSpectrum::OnInputTargetPointerExited(winrt::IInspectable const& /*sender*/, winrt::PointerRoutedEventArgs const& args)
00791 {
00792     m_isPointerOver = false;
00793     UpdateVisualState(true /* useTransitions*/);
00794     args.Handled(true);
00795 }
00796
00797 void ColorSpectrum::OnInputTargetPointerPressed(winrt::IInspectable const& /*sender*/, winrt::PointerRoutedEventArgs const& args)
00798 {
00799     auto&& inputTarget = m_inputTarget.get();
00800
00801     Focus(winrt::FocusState::Pointer);
00802
00803     m_isPointerPressed = true;
00804     m_shouldShowLargeSelection =
00805         args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Pen ||
00806         args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch;
00807
00808     inputTarget.CapturePointer(args.Pointer());
00809     UpdateColorFromPoint(args.GetCurrentPoint(inputTarget));
00810     UpdateVisualState(true /* useTransitions*/);
00811     UpdateEllipse();
00812
00813     args.Handled(true);
00814 }
00815
00816 void ColorSpectrum::OnInputTargetPointerMoved(winrt::IInspectable const& /*sender*/, winrt::PointerRoutedEventArgs const& args)
00817 {
00818     if (!m_isPointerPressed)
00819     {
00820         return;
00821     }
00822
00823     UpdateColorFromPoint(args.GetCurrentPoint(m_inputTarget.get()));
00824     args.Handled(true);
00825 }
00826
00827 void ColorSpectrum::OnInputTargetPointerReleased(winrt::IInspectable const& /*sender*/, winrt::PointerRoutedEventArgs const& args)
00828 {
00829     m_isPointerPressed = false;
00830     m_shouldShowLargeSelection = false;
00831
00832     m_inputTarget.get().ReleasePointerCapture(args.Pointer());
00833     UpdateVisualState(true /* useTransitions*/);
00834     UpdateEllipse();
00835
00836     args.Handled(true);
00837 }
00838
00839 void ColorSpectrum::OnSelectionEllipseFlowDirectionChanged(winrt::DependencyObject const& /*o*/, winrt::DependencyProperty const& /*p*/)
00840 {
00841     UpdateEllipse();
00842 }
00843
00844 void ColorSpectrum::CreateBitmapsAndColorMap()
00845 {
00846     auto&& layoutRoot = m_layoutRoot.get();
00847     auto&& sizingGrid = m_sizingGrid.get();
00848     auto&& inputTarget = m_inputTarget.get();
00849     auto&& spectrumRectangle = m_spectrumRectangle.get();
00850     auto&& spectrumEllipse = m_spectrumEllipse.get();
00851     auto&& spectrumOverlayRectangle = m_spectrumOverlayRectangle.get();
00852     auto&& spectrumOverlayEllipse = m_spectrumOverlayEllipse.get();
00853
00854     if (!m_layoutRoot ||
00855         !m_sizingGrid ||
00856         !m_inputTarget ||
00857         !m_spectrumRectangle ||
00858         !m_spectrumEllipse ||
00859         !m_spectrumOverlayRectangle ||
00860         !m_spectrumOverlayEllipse ||
00861         SharedHelpers::IsInDesignMode())
00862     {
00863         return;
00864     }
00865
00866     const double minDimension = min(layoutRoot.ActualWidth(), layoutRoot.ActualHeight());
00867
00868     if (minDimension == 0)
00869     {
00870         return;
00871     }
00872
00873     sizingGrid.Width(minDimension);
00874     sizingGrid.Height(minDimension);
00875
00876     if (sizingGrid.Clip())
00877     {
00878         sizingGrid.Clip().Rect({ 0, 0, static_cast<float>(minDimension), static_cast<float>(minDimension) });
00879     }
00880
00881     inputTarget.Width(minDimension);
00882     inputTarget.Height(minDimension);
00883     spectrumRectangle.Width(minDimension);
00884     spectrumRectangle.Height(minDimension);
00885     spectrumEllipse.Width(minDimension);
00886     spectrumEllipse.Height(minDimension);
00887     spectrumOverlayRectangle.Width(minDimension);
00888     spectrumOverlayRectangle.Height(minDimension);
00889     spectrumOverlayEllipse.Width(minDimension);
00890     spectrumOverlayEllipse.Height(minDimension);
00891
00892     const winrt::float4 hsvColor = HsvColor();
00893     const int minHue = MinHue();
00894     int maxHue = MaxHue();
00895     const int minSaturation = MinSaturation();
00896     int maxSaturation = MaxSaturation();
00897     const int minValue = MinValue();
00898     int maxValue = MaxValue();
00899     const winrt::ColorSpectrumShape shape = Shape();
00900     const winrt::ColorSpectrumComponents components = Components();
00901
00902     // If min >= max, then by convention, min is the only number that a property can have.
00903     if (minHue >= maxHue)
00904     {
00905         maxHue = minHue;
00906     }
00907
00908     if (minSaturation >= maxSaturation)
00909     {
00910         maxSaturation = minSaturation;
00911     }
00912
00913     if (minValue >= maxValue)
00914     {
00915         maxValue = minValue;
00916     }
00917
00918     const Hsv hsv = { hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), hsv::GetValue(hsvColor) };
00919
00920     // The middle 4 are only needed and used in the case of hue as the third dimension.
00921     // Saturation and luminosity need only a min and max.
00922     shared_ptr<vector<::byte>> bgraMinPixelData = make_shared<vector<::byte>>();
00923     shared_ptr<vector<::byte>> bgraMiddle1PixelData = make_shared<vector<::byte>>();
00924     shared_ptr<vector<::byte>> bgraMiddle2PixelData = make_shared<vector<::byte>>();
00925     shared_ptr<vector<::byte>> bgraMiddle3PixelData = make_shared<vector<::byte>>();
00926     shared_ptr<vector<::byte>> bgraMiddle4PixelData = make_shared<vector<::byte>>();
00927     shared_ptr<vector<::byte>> bgraMaxPixelData = make_shared<vector<::byte>>();
00928     shared_ptr<vector<Hsv>> newHsvValues = make_shared<vector<Hsv>>();
00929
00930     const auto pixelCount = static_cast<size_t>(round(minDimension) * round(minDimension));
00931     const size_t pixelDataSize = pixelCount * 4;
00932     bgraMinPixelData->reserve(pixelDataSize);
00933
00934     // We'll only save pixel data for the middle bitmaps if our third dimension is hue.
00935     if (components == winrt::ColorSpectrumComponents::ValueSaturation ||
00936         components == winrt::ColorSpectrumComponents::SaturationValue)
00937     {
00938         bgraMiddle1PixelData->reserve(pixelDataSize);
00939         bgraMiddle2PixelData->reserve(pixelDataSize);
00940         bgraMiddle3PixelData->reserve(pixelDataSize);
00941         bgraMiddle4PixelData->reserve(pixelDataSize);
00942     }
00943
00944     bgraMaxPixelData->reserve(pixelDataSize);
00945     newHsvValues->reserve(pixelCount);
00946
00947     const int minDimensionInt = static_cast<int>(round(minDimension));
00948     winrt::WorkItemHandler workItemHandler(
00949         [minDimensionInt, hsv, minHue, maxHue, minSaturation, maxSaturation, minValue, maxValue, shape, components,
00950         bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData, newHsvValues]
00951     (winrt::IAsyncAction workItem)
00952         {
00953             // As the user perceives it, every time the third dimension not represented in the ColorSpectrum changes,
00954             // the ColorSpectrum will visually change to accommodate that value.  For example, if the ColorSpectrum handles hue and luminosity,
00955             // and the saturation externally goes from 1.0 to 0.5, then the ColorSpectrum will visually change to look more washed out
00956             // to represent that third dimension's new value.
00957             // Internally, however, we don't want to regenerate the ColorSpectrum bitmap every single time this happens, since that's very expensive.
00958             // In order to make it so that we don't have to, we implement an optimization where, rather than having only one bitmap,
00959             // we instead have multiple that we blend together using opacity to create the effect that we want.
00960             // In the case where the third dimension is saturation or luminosity, we only need two: one bitmap at the minimum value
00961             // of the third dimension, and one bitmap at the maximum.  Then we set the second's opacity at whatever the value of
00962             // the third dimension is - e.g., a saturation of 0.5 implies an opacity of 50%.
00963             // In the case where the third dimension is hue, we need six: one bitmap corresponding to red, yellow, green, cyan, blue, and purple.
00964             // We'll then blend between whichever colors our hue exists between - e.g., an orange color would use red and yellow with an opacity of 50%.
00965             // This optimization does incur slightly more startup time initially since we have to generate multiple bitmaps at once instead of only one,
00966             // but the running time savings after that are *huge* when we can just set an opacity instead of generating a brand new bitmap.
00967             if (shape == winrt::ColorSpectrumShape::Box)
00968             {
00969                 for (int x = minDimensionInt - 1; x >= 0; --x)
00970                 {
00971                     for (int y = minDimensionInt - 1; y >= 0; --y)
00972                     {
00973                         if (workItem.Status() == winrt::AsyncStatus::Canceled)
00974                         {
00975                             break;
00976                         }
00977
00978                         ColorSpectrum::FillPixelForBox(
00979                             x, y, hsv, minDimensionInt, components, minHue, maxHue, minSaturation, maxSaturation, minValue, maxValue,
00980                             bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData,
00981                             newHsvValues);
00982                     }
00983                 }
00984             }
00985             else
00986             {
00987                 for (int y = 0; y < minDimensionInt; ++y)
00988                 {
00989                     for (int x = 0; x < minDimensionInt; ++x)
00990                     {
00991                         if (workItem.Status() == winrt::AsyncStatus::Canceled)
00992                         {
00993                             break;
00994                         }
00995
00996                         ColorSpectrum::FillPixelForRing(
00997                             x, y, minDimensionInt / 2.0, hsv, components, minHue, maxHue, minSaturation, maxSaturation, minValue, maxValue,
00998                             bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData,
00999                             newHsvValues);
01000                     }
01001                 }
01002             }
01003         });
01004
01005     if (m_createImageBitmapAction)
01006     {
01007         m_createImageBitmapAction.Cancel();
01008     }
01009
01010     m_createImageBitmapAction = winrt::ThreadPool::RunAsync(workItemHandler);
01011     auto strongThis = get_strong();
01012     m_createImageBitmapAction.Completed(winrt::AsyncActionCompletedHandler(
01013         [strongThis, minDimension, components, bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData, newHsvValues]
01014     (winrt::IAsyncAction asyncInfo, winrt::AsyncStatus asyncStatus)
01015     {
01016         if (asyncStatus != winrt::AsyncStatus::Completed)
01017         {
01018             return;
01019         }
01020
01021         strongThis->m_createImageBitmapAction = nullptr;
01022
01023         strongThis->DispatcherQueue().TryEnqueue(winrt::DispatcherQueueHandler(
01024             [strongThis, minDimension, bgraMinPixelData, bgraMiddle1PixelData, bgraMiddle2PixelData, bgraMiddle3PixelData, bgraMiddle4PixelData, bgraMaxPixelData, newHsvValues]()
01025         {
01026             const int pixelWidth = static_cast<int>(round(minDimension));
01027             const int pixelHeight = static_cast<int>(round(minDimension));
01028
01029             const winrt::ColorSpectrumComponents components = strongThis->Components();
01030             winrt::LoadedImageSurface minSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMinPixelData);
01031             winrt::LoadedImageSurface maxSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMaxPixelData);
01032
01033             switch (components)
01034             {
01035             case winrt::ColorSpectrumComponents::HueValue:
01036             case winrt::ColorSpectrumComponents::ValueHue:
01037                 strongThis->m_saturationMinimumSurface = minSurface;
01038                 strongThis->m_saturationMaximumSurface = maxSurface;
01039                 break;
01040             case winrt::ColorSpectrumComponents::HueSaturation:
01041             case winrt::ColorSpectrumComponents::SaturationHue:
01042                 strongThis->m_valueSurface = maxSurface;
01043                 break;
01044             case winrt::ColorSpectrumComponents::ValueSaturation:
01045             case winrt::ColorSpectrumComponents::SaturationValue:
01046                 strongThis->m_hueRedSurface = minSurface;
01047                 strongThis->m_hueYellowSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle1PixelData);
01048                 strongThis->m_hueGreenSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle2PixelData);
01049                 strongThis->m_hueCyanSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle3PixelData);
01050                 strongThis->m_hueBlueSurface = CreateSurfaceFromPixelData(pixelWidth, pixelHeight, bgraMiddle4PixelData);
01051                 strongThis->m_huePurpleSurface = maxSurface;
01052                 break;
01053             }
01054
01055             strongThis->m_shapeFromLastBitmapCreation = strongThis->Shape();
01056             strongThis->m_componentsFromLastBitmapCreation = strongThis->Components();
01057             strongThis->m_imageWidthFromLastBitmapCreation = minDimension;
01058             strongThis->m_imageHeightFromLastBitmapCreation = minDimension;
01059             strongThis->m_minHueFromLastBitmapCreation = strongThis->MinHue();
01060             strongThis->m_maxHueFromLastBitmapCreation = strongThis->MaxHue();
01061             strongThis->m_minSaturationFromLastBitmapCreation = strongThis->MinSaturation();
01062             strongThis->m_maxSaturationFromLastBitmapCreation = strongThis->MaxSaturation();
01063             strongThis->m_minValueFromLastBitmapCreation = strongThis->MinValue();
01064             strongThis->m_maxValueFromLastBitmapCreation = strongThis->MaxValue();
01065
01066             strongThis->m_hsvValues = *newHsvValues;
01067
01068             strongThis->UpdateBitmapSources();
01069             strongThis->UpdateEllipse();
01070         }));
01071     }));
01072 }
01073
01074 void ColorSpectrum::FillPixelForBox(
01075     double x,
01076     double y,
01077     const Hsv &baseHsv,
01078     double minDimension,
01079     winrt::ColorSpectrumComponents components,
01080     double minHue,
01081     double maxHue,
01082     double minSaturation,
01083     double maxSaturation,
01084     double minValue,
01085     double maxValue,
01086     shared_ptr<vector<::byte>> bgraMinPixelData,
01087     shared_ptr<vector<::byte>> bgraMiddle1PixelData,
01088     shared_ptr<vector<::byte>> bgraMiddle2PixelData,
01089     shared_ptr<vector<::byte>> bgraMiddle3PixelData,
01090     shared_ptr<vector<::byte>> bgraMiddle4PixelData,
01091     shared_ptr<vector<::byte>> bgraMaxPixelData,
01092     shared_ptr<vector<Hsv>> newHsvValues)
01093 {
01094     const double hMin = minHue;
01095     const double hMax = maxHue;
01096     const double sMin = minSaturation / 100.0;
01097     const double sMax = maxSaturation / 100.0;
01098     const double vMin = minValue / 100.0;
01099     const double vMax = maxValue / 100.0;
01100
01101     Hsv hsvMin = baseHsv;
01102     Hsv hsvMiddle1 = baseHsv;
01103     Hsv hsvMiddle2 = baseHsv;
01104     Hsv hsvMiddle3 = baseHsv;
01105     Hsv hsvMiddle4 = baseHsv;
01106     Hsv hsvMax = baseHsv;
01107
01108     const double xPercent = (minDimension - 1 - x) / (minDimension - 1);
01109     const double yPercent = (minDimension - 1 - y) / (minDimension - 1);
01110
01111     switch (components)
01112     {
01113     case winrt::ColorSpectrumComponents::HueValue:
01114         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + yPercent * (hMax - hMin);
01115         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + xPercent * (vMax - vMin);
01116         hsvMin.s = 0;
01117         hsvMax.s = 1;
01118         break;
01119
01120     case winrt::ColorSpectrumComponents::HueSaturation:
01121         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + yPercent * (hMax - hMin);
01122         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + xPercent * (sMax - sMin);
01123         hsvMin.v = 0;
01124         hsvMax.v = 1;
01125         break;
01126
01127     case winrt::ColorSpectrumComponents::ValueHue:
01128         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + yPercent * (vMax - vMin);
01129         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + xPercent * (hMax - hMin);
01130         hsvMin.s = 0;
01131         hsvMax.s = 1;
01132         break;
01133
01134     case winrt::ColorSpectrumComponents::ValueSaturation:
01135         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + yPercent * (vMax - vMin);
01136         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + xPercent * (sMax - sMin);
01137         hsvMin.h = 0;
01138         hsvMiddle1.h = 60;
01139         hsvMiddle2.h = 120;
01140         hsvMiddle3.h = 180;
01141         hsvMiddle4.h = 240;
01142         hsvMax.h = 300;
01143         break;
01144
01145     case winrt::ColorSpectrumComponents::SaturationHue:
01146         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + yPercent * (sMax - sMin);
01147         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + xPercent * (hMax - hMin);
01148         hsvMin.v = 0;
01149         hsvMax.v = 1;
01150         break;
01151
01152     case winrt::ColorSpectrumComponents::SaturationValue:
01153         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + yPercent * (sMax - sMin);
01154         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + xPercent * (vMax - vMin);
01155         hsvMin.h = 0;
01156         hsvMiddle1.h = 60;
01157         hsvMiddle2.h = 120;
01158         hsvMiddle3.h = 180;
01159         hsvMiddle4.h = 240;
01160         hsvMax.h = 300;
01161         break;
01162     }
01163
01164     // If saturation is an axis in the spectrum with hue, or value is an axis, then we want
01165     // that axis to go from maximum at the top to minimum at the bottom,
01166     // or maximum at the outside to minimum at the inside in the case of the ring configuration,
01167     // so we'll invert the number before assigning the HSL value to the array.
01168     // Otherwise, we'll have a very narrow section in the middle that actually has meaningful hue
01169     // in the case of the ring configuration.
01170     if (components == winrt::ColorSpectrumComponents::HueSaturation ||
01171         components == winrt::ColorSpectrumComponents::SaturationHue)
01172     {
01173         hsvMin.s = sMax - hsvMin.s + sMin;
01174         hsvMiddle1.s = sMax - hsvMiddle1.s + sMin;
01175         hsvMiddle2.s = sMax - hsvMiddle2.s + sMin;
01176         hsvMiddle3.s = sMax - hsvMiddle3.s + sMin;
01177         hsvMiddle4.s = sMax - hsvMiddle4.s + sMin;
01178         hsvMax.s = sMax - hsvMax.s + sMin;
01179     }
01180     else
01181     {
01182         hsvMin.v = vMax - hsvMin.v + vMin;
01183         hsvMiddle1.v = vMax - hsvMiddle1.v + vMin;
01184         hsvMiddle2.v = vMax - hsvMiddle2.v + vMin;
01185         hsvMiddle3.v = vMax - hsvMiddle3.v + vMin;
01186         hsvMiddle4.v = vMax - hsvMiddle4.v + vMin;
01187         hsvMax.v = vMax - hsvMax.v + vMin;
01188     }
01189
01190     newHsvValues->push_back(hsvMin);
01191
01192     const Rgb rgbMin = HsvToRgb(hsvMin);
01193     bgraMinPixelData->push_back(static_cast<::byte>(round(rgbMin.b * 255))); // b
01194     bgraMinPixelData->push_back(static_cast<::byte>(round(rgbMin.g * 255))); // g
01195     bgraMinPixelData->push_back(static_cast<::byte>(round(rgbMin.r * 255))); // r
01196     bgraMinPixelData->push_back(255); // a - ignored
01197
01198     // We'll only save pixel data for the middle bitmaps if our third dimension is hue.
01199     if (components == winrt::ColorSpectrumComponents::ValueSaturation ||
01200         components == winrt::ColorSpectrumComponents::SaturationValue)
01201     {
01202         const Rgb rgbMiddle1 = HsvToRgb(hsvMiddle1);
01203         bgraMiddle1PixelData->push_back(static_cast<::byte>(round(rgbMiddle1.b * 255))); // b
01204         bgraMiddle1PixelData->push_back(static_cast<::byte>(round(rgbMiddle1.g * 255))); // g
01205         bgraMiddle1PixelData->push_back(static_cast<::byte>(round(rgbMiddle1.r * 255))); // r
01206         bgraMiddle1PixelData->push_back(255); // a - ignored
01207
01208         const Rgb rgbMiddle2 = HsvToRgb(hsvMiddle2);
01209         bgraMiddle2PixelData->push_back(static_cast<::byte>(round(rgbMiddle2.b * 255))); // b
01210         bgraMiddle2PixelData->push_back(static_cast<::byte>(round(rgbMiddle2.g * 255))); // g
01211         bgraMiddle2PixelData->push_back(static_cast<::byte>(round(rgbMiddle2.r * 255))); // r
01212         bgraMiddle2PixelData->push_back(255); // a - ignored
01213
01214         const Rgb rgbMiddle3 = HsvToRgb(hsvMiddle3);
01215         bgraMiddle3PixelData->push_back(static_cast<::byte>(round(rgbMiddle3.b * 255))); // b
01216         bgraMiddle3PixelData->push_back(static_cast<::byte>(round(rgbMiddle3.g * 255))); // g
01217         bgraMiddle3PixelData->push_back(static_cast<::byte>(round(rgbMiddle3.r * 255))); // r
01218         bgraMiddle3PixelData->push_back(255); // a - ignored
01219
01220         const Rgb rgbMiddle4 = HsvToRgb(hsvMiddle4);
01221         bgraMiddle4PixelData->push_back(static_cast<::byte>(round(rgbMiddle4.b * 255))); // b
01222         bgraMiddle4PixelData->push_back(static_cast<::byte>(round(rgbMiddle4.g * 255))); // g
01223         bgraMiddle4PixelData->push_back(static_cast<::byte>(round(rgbMiddle4.r * 255))); // r
01224         bgraMiddle4PixelData->push_back(255); // a - ignored
01225     }
01226
01227     const Rgb rgbMax = HsvToRgb(hsvMax);
01228     bgraMaxPixelData->push_back(static_cast<::byte>(round(rgbMax.b * 255))); // b
01229     bgraMaxPixelData->push_back(static_cast<::byte>(round(rgbMax.g * 255))); // g
01230     bgraMaxPixelData->push_back(static_cast<::byte>(round(rgbMax.r * 255))); // r
01231     bgraMaxPixelData->push_back(255); // a - ignored
01232 }
01233
01234 void ColorSpectrum::FillPixelForRing(
01235     double x,
01236     double y,
01237     double radius,
01238     const Hsv &baseHsv,
01239     winrt::ColorSpectrumComponents components,
01240     double minHue,
01241     double maxHue,
01242     double minSaturation,
01243     double maxSaturation,
01244     double minValue,
01245     double maxValue,
01246     shared_ptr<vector<::byte>> bgraMinPixelData,
01247     shared_ptr<vector<::byte>> bgraMiddle1PixelData,
01248     shared_ptr<vector<::byte>> bgraMiddle2PixelData,
01249     shared_ptr<vector<::byte>> bgraMiddle3PixelData,
01250     shared_ptr<vector<::byte>> bgraMiddle4PixelData,
01251     shared_ptr<vector<::byte>> bgraMaxPixelData,
01252     shared_ptr<vector<Hsv>> newHsvValues)
01253 {
01254     const double hMin = minHue;
01255     const double hMax = maxHue;
01256     const double sMin = minSaturation / 100.0;
01257     const double sMax = maxSaturation / 100.0;
01258     const double vMin = minValue / 100.0;
01259     const double vMax = maxValue / 100.0;
01260
01261     double distanceFromRadius = sqrt(pow(x - radius, 2) + pow(y - radius, 2));
01262
01263     double xToUse = x;
01264     double yToUse = y;
01265
01266     // If we're outside the ring, then we want the pixel to appear as blank.
01267     // However, to avoid issues with rounding errors, we'll act as though this point
01268     // is on the edge of the ring for the purposes of returning an HSL value.
01269     // That way, hittesting on the edges will always return the correct value.
01270     if (distanceFromRadius > radius)
01271     {
01272         xToUse = (radius / distanceFromRadius) * (x - radius) + radius;
01273         yToUse = (radius / distanceFromRadius) * (y - radius) + radius;
01274         distanceFromRadius = radius;
01275     }
01276
01277     Hsv hsvMin = baseHsv;
01278     Hsv hsvMiddle1 = baseHsv;
01279     Hsv hsvMiddle2 = baseHsv;
01280     Hsv hsvMiddle3 = baseHsv;
01281     Hsv hsvMiddle4 = baseHsv;
01282     Hsv hsvMax = baseHsv;
01283
01284     const double r = 1 - distanceFromRadius / radius;
01285
01286     double theta = atan2((radius - yToUse), (radius - xToUse)) * 180.0 / M_PI;
01287     theta += 180.0;
01288     theta = floor(theta);
01289
01290     while (theta > 360)
01291     {
01292         theta -= 360;
01293     }
01294
01295     const double thetaPercent = theta / 360;
01296
01297     switch (components)
01298     {
01299     case winrt::ColorSpectrumComponents::HueValue:
01300         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + thetaPercent * (hMax - hMin);
01301         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + r * (vMax - vMin);
01302         hsvMin.s = 0;
01303         hsvMax.s = 1;
01304         break;
01305
01306     case winrt::ColorSpectrumComponents::HueSaturation:
01307         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + thetaPercent * (hMax - hMin);
01308         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + r * (sMax - sMin);
01309         hsvMin.v = 0;
01310         hsvMax.v = 1;
01311         break;
01312
01313     case winrt::ColorSpectrumComponents::ValueHue:
01314         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + thetaPercent * (vMax - vMin);
01315         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + r * (hMax - hMin);
01316         hsvMin.s = 0;
01317         hsvMax.s = 1;
01318         break;
01319
01320     case winrt::ColorSpectrumComponents::ValueSaturation:
01321         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + thetaPercent * (vMax - vMin);
01322         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + r * (sMax - sMin);
01323         hsvMin.h = 0;
01324         hsvMiddle1.h = 60;
01325         hsvMiddle2.h = 120;
01326         hsvMiddle3.h = 180;
01327         hsvMiddle4.h = 240;
01328         hsvMax.h = 300;
01329         break;
01330
01331     case winrt::ColorSpectrumComponents::SaturationHue:
01332         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + thetaPercent * (sMax - sMin);
01333         hsvMin.h = hsvMiddle1.h = hsvMiddle2.h = hsvMiddle3.h = hsvMiddle4.h = hsvMax.h = hMin + r * (hMax - hMin);
01334         hsvMin.v = 0;
01335         hsvMax.v = 1;
01336         break;
01337
01338     case winrt::ColorSpectrumComponents::SaturationValue:
01339         hsvMin.s = hsvMiddle1.s = hsvMiddle2.s = hsvMiddle3.s = hsvMiddle4.s = hsvMax.s = sMin + thetaPercent * (sMax - sMin);
01340         hsvMin.v = hsvMiddle1.v = hsvMiddle2.v = hsvMiddle3.v = hsvMiddle4.v = hsvMax.v = vMin + r * (vMax - vMin);
01341         hsvMin.h = 0;
01342         hsvMiddle1.h = 60;
01343         hsvMiddle2.h = 120;
01344         hsvMiddle3.h = 180;
01345         hsvMiddle4.h = 240;
01346         hsvMax.h = 300;
01347         break;
01348     }
01349
01350     // If saturation is an axis in the spectrum with hue, or value is an axis, then we want
01351     // that axis to go from maximum at the top to minimum at the bottom,
01352     // or maximum at the outside to minimum at the inside in the case of the ring configuration,
01353     // so we'll invert the number before assigning the HSL value to the array.
01354     // Otherwise, we'll have a very narrow section in the middle that actually has meaningful hue
01355     // in the case of the ring configuration.
01356     if (components == winrt::ColorSpectrumComponents::HueSaturation ||
01357         components == winrt::ColorSpectrumComponents::SaturationHue)
01358     {
01359         hsvMin.s = sMax - hsvMin.s + sMin;
01360         hsvMiddle1.s = sMax - hsvMiddle1.s + sMin;
01361         hsvMiddle2.s = sMax - hsvMiddle2.s + sMin;
01362         hsvMiddle3.s = sMax - hsvMiddle3.s + sMin;
01363         hsvMiddle4.s = sMax - hsvMiddle4.s + sMin;
01364         hsvMax.s = sMax - hsvMax.s + sMin;
01365     }
01366     else
01367     {
01368         hsvMin.v = vMax - hsvMin.v + vMin;
01369         hsvMiddle1.v = vMax - hsvMiddle1.v + vMin;
01370         hsvMiddle2.v = vMax - hsvMiddle2.v + vMin;
01371         hsvMiddle3.v = vMax - hsvMiddle3.v + vMin;
01372         hsvMiddle4.v = vMax - hsvMiddle4.v + vMin;
01373         hsvMax.v = vMax - hsvMax.v + vMin;
01374     }
01375
01376     newHsvValues->push_back(hsvMin);
01377
01378     const Rgb rgbMin = HsvToRgb(hsvMin);
01379     bgraMinPixelData->push_back(static_cast<::byte>(round(rgbMin.b * 255))); // b
01380     bgraMinPixelData->push_back(static_cast<::byte>(round(rgbMin.g * 255))); // g
01381     bgraMinPixelData->push_back(static_cast<::byte>(round(rgbMin.r * 255))); // r
01382     bgraMinPixelData->push_back(255); // a
01383
01384     // We'll only save pixel data for the middle bitmaps if our third dimension is hue.
01385     if (components == winrt::ColorSpectrumComponents::ValueSaturation ||
01386         components == winrt::ColorSpectrumComponents::SaturationValue)
01387     {
01388         const Rgb rgbMiddle1 = HsvToRgb(hsvMiddle1);
01389         bgraMiddle1PixelData->push_back(static_cast<::byte>(round(rgbMiddle1.b * 255))); // b
01390         bgraMiddle1PixelData->push_back(static_cast<::byte>(round(rgbMiddle1.g * 255))); // g
01391         bgraMiddle1PixelData->push_back(static_cast<::byte>(round(rgbMiddle1.r * 255))); // r
01392         bgraMiddle1PixelData->push_back(255); // a
01393
01394         const Rgb rgbMiddle2 = HsvToRgb(hsvMiddle2);
01395         bgraMiddle2PixelData->push_back(static_cast<::byte>(round(rgbMiddle2.b * 255))); // b
01396         bgraMiddle2PixelData->push_back(static_cast<::byte>(round(rgbMiddle2.g * 255))); // g
01397         bgraMiddle2PixelData->push_back(static_cast<::byte>(round(rgbMiddle2.r * 255))); // r
01398         bgraMiddle2PixelData->push_back(255); // a
01399
01400         const Rgb rgbMiddle3 = HsvToRgb(hsvMiddle3);
01401         bgraMiddle3PixelData->push_back(static_cast<::byte>(round(rgbMiddle3.b * 255))); // b
01402         bgraMiddle3PixelData->push_back(static_cast<::byte>(round(rgbMiddle3.g * 255))); // g
01403         bgraMiddle3PixelData->push_back(static_cast<::byte>(round(rgbMiddle3.r * 255))); // r
01404         bgraMiddle3PixelData->push_back(255); // a
01405
01406         const Rgb rgbMiddle4 = HsvToRgb(hsvMiddle4);
01407         bgraMiddle4PixelData->push_back(static_cast<::byte>(round(rgbMiddle4.b * 255))); // b
01408         bgraMiddle4PixelData->push_back(static_cast<::byte>(round(rgbMiddle4.g * 255))); // g
01409         bgraMiddle4PixelData->push_back(static_cast<::byte>(round(rgbMiddle4.r * 255))); // r
01410         bgraMiddle4PixelData->push_back(255); // a
01411     }
01412
01413     const Rgb rgbMax = HsvToRgb(hsvMax);
01414     bgraMaxPixelData->push_back(static_cast<::byte>(round(rgbMax.b * 255))); // b
01415     bgraMaxPixelData->push_back(static_cast<::byte>(round(rgbMax.g * 255))); // g
01416     bgraMaxPixelData->push_back(static_cast<::byte>(round(rgbMax.r * 255))); // r
01417     bgraMaxPixelData->push_back(255); // a
01418 }
01419
01420 void ColorSpectrum::UpdateBitmapSources()
01421 {
01422     auto&& spectrumOverlayRectangle = m_spectrumOverlayRectangle.get();
01423     auto&& spectrumOverlayEllipse = m_spectrumOverlayEllipse.get();
01424
01425     if (!spectrumOverlayRectangle ||
01426         !spectrumOverlayEllipse)
01427     {
01428         return;
01429     }
01430
01431     auto&& spectrumRectangle = m_spectrumRectangle.get();
01432     auto&& spectrumEllipse = m_spectrumEllipse.get();
01433
01434     const winrt::float4 hsvColor = HsvColor();
01435     const winrt::ColorSpectrumComponents components = Components();
01436
01437     // We'll set the base image and the overlay image based on which component is our third dimension.
01438     // If it's saturation or luminosity, then the base image is that dimension at its minimum value,
01439     // while the overlay image is that dimension at its maximum value.
01440     // If it's hue, then we'll figure out where in the color wheel we are, and then use the two
01441     // colors on either side of our position as our base image and overlay image.
01442     // For example, if our hue is orange, then the base image would be red and the overlay image yellow.
01443     switch (components)
01444     {
01445     case winrt::ColorSpectrumComponents::HueValue:
01446     case winrt::ColorSpectrumComponents::ValueHue:
01447         {
01448             if (!m_saturationMinimumSurface ||
01449                 !m_saturationMaximumSurface)
01450             {
01451                 return;
01452             }
01453
01454             winrt::SpectrumBrush spectrumBrush{ winrt::make<SpectrumBrush>() };
01455
01456             spectrumBrush.MinSurface(m_saturationMinimumSurface);
01457             spectrumBrush.MaxSurface(m_saturationMaximumSurface);
01458             spectrumBrush.MaxSurfaceOpacity(hsv::GetSaturation(hsvColor));
01459             spectrumRectangle.Fill(spectrumBrush);
01460             spectrumEllipse.Fill(spectrumBrush);
01461         }
01462         break;
01463
01464     case winrt::ColorSpectrumComponents::HueSaturation:
01465     case winrt::ColorSpectrumComponents::SaturationHue:
01466         {
01467             if (!m_valueSurface)
01468             {
01469                 return;
01470             }
01471
01472             winrt::SpectrumBrush spectrumBrush{ winrt::make<SpectrumBrush>() };
01473
01474             spectrumBrush.MinSurface(m_valueSurface);
01475             spectrumBrush.MaxSurface(m_valueSurface);
01476             spectrumBrush.MaxSurfaceOpacity(1);
01477             spectrumRectangle.Fill(spectrumBrush);
01478             spectrumEllipse.Fill(spectrumBrush);
01479         }
01480         break;
01481
01482     case winrt::ColorSpectrumComponents::ValueSaturation:
01483     case winrt::ColorSpectrumComponents::SaturationValue:
01484         {
01485             if (!m_hueRedSurface ||
01486                 !m_hueYellowSurface ||
01487                 !m_hueGreenSurface ||
01488                 !m_hueCyanSurface ||
01489                 !m_hueBlueSurface ||
01490                 !m_huePurpleSurface)
01491             {
01492                 return;
01493             }
01494
01495             winrt::SpectrumBrush spectrumBrush{ winrt::make<SpectrumBrush>() };
01496
01497             const double sextant = hsv::GetHue(hsvColor) / 60.0;
01498
01499             if (sextant < 1)
01500             {
01501                 spectrumBrush.MinSurface(m_hueRedSurface);
01502                 spectrumBrush.MaxSurface(m_hueYellowSurface);
01503             }
01504             else if (sextant >= 1 && sextant < 2)
01505             {
01506                 spectrumBrush.MinSurface(m_hueYellowSurface);
01507                 spectrumBrush.MaxSurface(m_hueGreenSurface);
01508             }
01509             else if (sextant >= 2 && sextant < 3)
01510             {
01511                 spectrumBrush.MinSurface(m_hueGreenSurface);
01512                 spectrumBrush.MaxSurface(m_hueCyanSurface);
01513             }
01514             else if (sextant >= 3 && sextant < 4)
01515             {
01516                 spectrumBrush.MinSurface(m_hueCyanSurface);
01517                 spectrumBrush.MaxSurface(m_hueBlueSurface);
01518             }
01519             else if (sextant >= 4 && sextant < 5)
01520             {
01521                 spectrumBrush.MinSurface(m_hueBlueSurface);
01522                 spectrumBrush.MaxSurface(m_huePurpleSurface);
01523             }
01524             else
01525             {
01526                 spectrumBrush.MinSurface(m_huePurpleSurface);
01527                 spectrumBrush.MaxSurface(m_hueRedSurface);
01528             }
01529
01530             spectrumBrush.MaxSurfaceOpacity(sextant - static_cast<int>(sextant));
01531             spectrumRectangle.Fill(spectrumBrush);
01532             spectrumEllipse.Fill(spectrumBrush);
01533         }
01534         break;
01535     }
01536 }
01537
01538 bool ColorSpectrum::SelectionEllipseShouldBeLight()
01539 {
01540     // The selection ellipse should be light if and only if the chosen color
01541     // contrasts more with black than it does with white.
01542     // To find how much something contrasts with white, we use the equation
01543     // for relative luminance, which is given by
01544     //
01545     // L = 0.2126 * Rg + 0.7152 * Gg + 0.0722 * Bg
01546     //
01547     // where Xg = { X/3294 if X <= 10, (R/269 + 0.0513)^2.4 otherwise }
01548     //
01549     // If L is closer to 1, then the color is closer to white; if it is closer to 0,
01550     // then the color is closer to black.  This is based on the fact that the human
01551     // eye perceives green to be much brighter than red, which in turn is perceived to be
01552     // brighter than blue.
01553     //
01554     // If the third dimension is value, then we won't be updating the spectrum's displayed colors,
01555     // so in that case we should use a value of 1 when considering the backdrop
01556     // for the selection ellipse.
01557     winrt::Color displayedColor = {};
01558
01559     if (Components() == winrt::ColorSpectrumComponents::HueSaturation ||
01560         Components() == winrt::ColorSpectrumComponents::SaturationHue)
01561     {
01562         const winrt::float4 hsvColor = HsvColor();
01563         const Rgb color = HsvToRgb(Hsv(hsv::GetHue(hsvColor), hsv::GetSaturation(hsvColor), 1.0));
01564         displayedColor = ColorFromRgba(color, hsv::GetAlpha(hsvColor));
01565     }
01566     else
01567     {
01568         displayedColor = Color();
01569     }
01570
01571     const double rg = displayedColor.R <= 10 ? displayedColor.R / 3294.0 : pow(displayedColor.R / 269.0 + 0.0513, 2.4);
01572     const double gg = displayedColor.G <= 10 ? displayedColor.G / 3294.0 : pow(displayedColor.G / 269.0 + 0.0513, 2.4);
01573     const double bg = displayedColor.B <= 10 ? displayedColor.B / 3294.0 : pow(displayedColor.B / 269.0 + 0.0513, 2.4);
01574
01575     return 0.2126 * rg + 0.7152 * gg + 0.0722 * bg <= 0.5;
01576 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeView.cpp Source File

  • File List
  • File Members
  • TreeView

TreeView.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeViewNode.h"
00007 #include "TreeView.h"
00008 #include "TreeViewList.h"
00009 #include "TreeViewItem.h"
00010 #include "TreeViewItemAutomationPeer.h"
00011 #include "ViewModel.h"
00012 #include "TreeViewNode.h"
00013 #include "RuntimeProfiler.h"
00014 #include "InspectingDataSource.h"
00015
00016 static constexpr auto c_listControlName = L"ListControl"sv;
00017
00018 TreeView::TreeView()
00019 {
00020     __RP_Marker_ClassById(RuntimeProfiler::ProfId_TreeView);
00021
00022     SetDefaultStyleKey(this);
00023
00024     m_rootNode.set(winrt::TreeViewNode());
00025     m_pendingSelectedNodes.set(winrt::make<Vector<winrt::TreeViewNode>>());
00026 }
00027
00028 winrt::IVector<winrt::TreeViewNode> TreeView::RootNodes()
00029 {
00030     return m_rootNode.get().Children();
00031 }
00032
00033 const TreeViewList* TreeView::ListControl() const
00034 {
00035     return winrt::get_self<TreeViewList>(m_listControl.get());
00036 }
00037
00038 TreeViewList* TreeView::MutableListControl()
00039 {
00040     return winrt::get_self<TreeViewList>(m_listControl.get());
00041 }
00042
00043 winrt::IInspectable TreeView::ItemFromContainer(winrt::DependencyObject const& container)
00044 {
00045     if (auto const listControl = ListControl())
00046     {
00047         return listControl->ItemFromContainer(container);
00048     }
00049     return nullptr;
00050 }
00051
00052 winrt::DependencyObject TreeView::ContainerFromItem(winrt::IInspectable const& item)
00053 {
00054     if (auto const listControl = ListControl())
00055     {
00056         return listControl->ContainerFromItem(item);
00057     }
00058     return nullptr;
00059 }
00060
00061 winrt::TreeViewNode TreeView::NodeFromContainer(winrt::DependencyObject const& container) const
00062 {
00063     if (auto const listControl = ListControl())
00064     {
00065         return listControl->NodeFromContainer(container);
00066     }
00067     return nullptr;
00068 }
00069
00070 winrt::DependencyObject TreeView::ContainerFromNode(winrt::TreeViewNode const& node) const
00071 {
00072     if (auto const listControl = ListControl())
00073     {
00074         return listControl->ContainerFromNode(node);
00075     }
00076     return nullptr;
00077 }
00078
00079 void TreeView::SelectedNode(winrt::TreeViewNode const& node)
00080 {
00081     const auto selectedNodes = SelectedNodes();
00082     if (selectedNodes.Size() > 0)
00083     {
00084         selectedNodes.Clear();
00085     }
00086     if (node)
00087     {
00088         selectedNodes.Append(node);
00089     }
00090 }
00091
00092 winrt::TreeViewNode TreeView::SelectedNode()
00093 {
00094     const auto nodes = SelectedNodes();
00095     return nodes.Size() > 0 ? nodes.GetAt(0) : nullptr;
00096 }
00097
00098
00099 winrt::IVector<winrt::TreeViewNode> TreeView::SelectedNodes()
00100 {
00101     if (auto const listControl = ListControl())
00102     {
00103         if (const auto vm = listControl->ListViewModel())
00104         {
00105             return vm->GetSelectedNodes();
00106         }
00107     }
00108
00109     // we'll treat the pending selected nodes as SelectedNodes value if we don't have a list control or a view model
00110     return m_pendingSelectedNodes.get();
00111 }
00112
00113 winrt::IVector<winrt::IInspectable> TreeView::SelectedItems()
00114 {
00115     if (const auto listControl = ListControl())
00116     {
00117         if (const auto viewModel = listControl->ListViewModel())
00118         {
00119             return viewModel->GetSelectedItems();
00120         }
00121     }
00122
00123     return nullptr;
00124 }
00125
00126 void TreeView::UpdateSelection(winrt::TreeViewNode const& node, bool isSelected)
00127 {
00128     if (const auto listControl = ListControl())
00129     {
00130         if (const auto viewModel = listControl->ListViewModel())
00131         {
00132             if (isSelected != viewModel->IsNodeSelected(node))
00133             {
00134                 viewModel->SelectNode(node, isSelected);
00135             }
00136         }
00137     }
00138 }
00139
00140 void TreeView::Expand(winrt::TreeViewNode const& value)
00141 {
00142     const auto vm = ListControl()->ListViewModel();
00143     vm->ExpandNode(value);
00144 }
00145
00146 void TreeView::Collapse(winrt::TreeViewNode const& value)
00147 {
00148     const auto vm = ListControl()->ListViewModel();
00149     vm->CollapseNode(value);
00150 }
00151
00152 void TreeView::SelectAll()
00153 {
00154     const auto vm = ListControl()->ListViewModel();
00155     vm->SelectAll();
00156 }
00157
00158
00159 void TreeView::OnItemClick(const winrt::IInspectable& /*sender*/, const winrt::Microsoft::UI::Xaml::Controls::ItemClickEventArgs& args)
00160 {
00161     const auto itemInvokedArgs = winrt::make_self<TreeViewItemInvokedEventArgs>();
00162     itemInvokedArgs->InvokedItem(args.ClickedItem());
00163     m_itemInvokedEventSource(*this, *itemInvokedArgs);
00164 }
00165
00166 void TreeView::OnContainerContentChanging(const winrt::IInspectable& sender, const winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs& args)
00167 {
00168     m_containerContentChangedSource(sender.as<winrt::ListView>(), args);
00169 }
00170
00171 void TreeView::OnNodeExpanding(const winrt::TreeViewNode& sender, const winrt::IInspectable& /*args*/)
00172 {
00173     const auto treeViewExpandingEventArgs = winrt::make_self<TreeViewExpandingEventArgs>();
00174     treeViewExpandingEventArgs->Node(sender);
00175
00176     if (m_listControl)
00177     {
00178         if (const auto expandingTVI = ContainerFromNode(sender).try_as<winrt::TreeViewItem>())
00179         {
00180             //Update TVI properties
00181             if (!expandingTVI.IsExpanded())
00182             {
00183                 expandingTVI.IsExpanded(true);
00184             }
00185             //Update TemplateSettings properties
00186             const auto templateSettings = winrt::get_self<TreeViewItemTemplateSettings>(expandingTVI.TreeViewItemTemplateSettings());
00187             templateSettings->ExpandedGlyphVisibility(winrt::Visibility::Visible);
00188             templateSettings->CollapsedGlyphVisibility(winrt::Visibility::Collapsed);
00189         }
00190         m_expandingEventSource(*this, *treeViewExpandingEventArgs);
00191     }
00192 }
00193
00194 void TreeView::OnNodeCollapsed(const winrt::TreeViewNode& sender, const winrt::IInspectable& /*args*/)
00195 {
00196     const auto treeViewCollapsedEventArgs = winrt::make_self<TreeViewCollapsedEventArgs>();
00197     treeViewCollapsedEventArgs->Node(sender);
00198
00199     if (m_listControl)
00200     {
00201         if (const auto collapsedTVI = ContainerFromNode(sender).try_as<winrt::TreeViewItem>())
00202         {
00203             //Update TVI properties
00204             if (collapsedTVI.IsExpanded())
00205             {
00206                 collapsedTVI.IsExpanded(false);
00207             }
00208
00209             //Update TemplateSettings properties
00210             const auto templateSettings = winrt::get_self<TreeViewItemTemplateSettings>(collapsedTVI.TreeViewItemTemplateSettings());
00211             templateSettings->ExpandedGlyphVisibility(winrt::Visibility::Collapsed);
00212             templateSettings->CollapsedGlyphVisibility(winrt::Visibility::Visible);
00213         }
00214         m_collapsedEventSource(*this, *treeViewCollapsedEventArgs);
00215     }
00216 }
00217
00218 void TreeView::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00219 {
00220     winrt::IDependencyProperty property = args.Property();
00221
00222     if (property == s_SelectionModeProperty && m_listControl)
00223     {
00224         const winrt::TreeViewSelectionMode value = SelectionMode();
00225         switch (value)
00226         {
00227             case winrt::TreeViewSelectionMode::None:
00228             {
00229                 m_listControl.get().SelectionMode(winrt::ListViewSelectionMode::None);
00230                 UpdateItemsSelectionMode(false);
00231             }
00232             break;
00233
00234             case winrt::TreeViewSelectionMode::Single:
00235             {
00236                 m_listControl.get().SelectionMode(winrt::ListViewSelectionMode::Single);
00237                 UpdateItemsSelectionMode(false);
00238             }
00239             break;
00240
00241             case winrt::TreeViewSelectionMode::Multiple:
00242             {
00243                 m_listControl.get().SelectionMode(winrt::ListViewSelectionMode::None);
00244                 UpdateItemsSelectionMode(true);
00245             }
00246             break;
00247
00248         }
00249     }
00250     else if (property == s_ItemsSourceProperty)
00251     {
00252         winrt::get_self<TreeViewNode>(m_rootNode.get())->IsContentMode(true);
00253
00254         if (const auto listControl = ListControl())
00255         {
00256             const auto viewModel = listControl->ListViewModel();
00257             viewModel->IsContentMode(true);
00258         }
00259
00260         winrt::get_self<TreeViewNode>(m_rootNode.get())->ItemsSource(ItemsSource());
00261     }
00262     else if (property == s_SelectedItemProperty)
00263     {
00264
00265         const auto items = SelectedItems();
00266         const auto selected = (items != nullptr && items.Size() > 0) ? items.GetAt(0) : nullptr;
00267         // Checking if new value is different to the currently internally selected item
00268         if (args.NewValue() != selected)
00269         {
00270             if (const auto listControl = ListControl())
00271             {
00272                 if (const auto viewModel = listControl->ListViewModel())
00273                 {
00274                     viewModel->SelectSingleItem(args.NewValue());
00275                 }
00276             }
00277         }
00278     }
00279 }
00280
00281 void TreeView::OnListControlDragItemsStarting(const winrt::IInspectable& sender, const winrt::DragItemsStartingEventArgs& args)
00282 {
00283     const auto treeViewArgs = winrt::make_self<TreeViewDragItemsStartingEventArgs>(args);
00284     m_dragItemsStartingEventSource(*this, *treeViewArgs);
00285 }
00286
00287 void TreeView::OnListControlDragItemsCompleted(const winrt::IInspectable& sender, const winrt::DragItemsCompletedEventArgs& args)
00288 {
00289     const auto newParent = [items = args.Items(), listControl = ListControl(), rootNode = m_rootNode.get()]()
00290     {
00291         if (listControl && items && items.Size() > 0)
00292         {
00293             if (const auto draggedNode = listControl->NodeFromItem(items.GetAt(0)))
00294             {
00295                 const auto parentNode = draggedNode.Parent();
00296                 if (parentNode && parentNode != rootNode)
00297                 {
00298                     return listControl->ItemFromNode(parentNode);
00299                 }
00300             }
00301         }
00302         return static_cast<winrt::IInspectable>(nullptr);
00303     }();
00304
00305     const auto treeViewArgs = winrt::make_self<TreeViewDragItemsCompletedEventArgs>(args, newParent);
00306     m_dragItemsCompletedEventSource(*this, *treeViewArgs);
00307 }
00308
00309 void TreeView::OnListControlSelectionChanged(const winrt::IInspectable& sender, const winrt::SelectionChangedEventArgs& args)
00310 {
00311     if (SelectionMode() == winrt::TreeViewSelectionMode::Single)
00312     {
00313         RaiseSelectionChanged(args.AddedItems(), args.RemovedItems());
00314
00315         const auto newSelectedItem = [args]() {
00316             if(const auto& newItems = args.AddedItems())
00317             {
00318                 if (newItems.Size() > 0)
00319                 {
00320                     return newItems.GetAt(0);
00321                 }
00322                 else
00323                 {
00324                     return (winrt::IInspectable)nullptr;
00325                 }
00326             }
00327             else
00328             {
00329                 return (winrt::IInspectable)nullptr;
00330             }
00331         }();
00332
00333         if (SelectedItem() != newSelectedItem)
00334         {
00335             SelectedItem(newSelectedItem);
00336         }
00337     }
00338 }
00339
00340 void TreeView::UpdateItemsSelectionMode(bool isMultiSelect)
00341 {
00342     const auto listControl = ListControl();
00343     if (listControl->IsMultiselect() != isMultiSelect)
00344     {
00345         winrt::get_self<TreeViewList>(m_listControl.get())->EnableMultiselect(isMultiSelect);
00346     }
00347
00348     const auto viewModel = listControl->ListViewModel();
00349     const int size = viewModel->Size();
00350
00351     for (int i = 0; i < size; i++)
00352     {
00353         const auto updateContainer = listControl->ContainerFromIndex(i).as<winrt::TreeViewItem>();
00354         if (updateContainer)
00355         {
00356             if (isMultiSelect)
00357             {
00358                 if (const auto targetNode = viewModel->GetNodeAt(i))
00359                 {
00360                     if (viewModel->IsNodeSelected(targetNode))
00361                     {
00362                         winrt::VisualStateManager::GoToState(updateContainer, L"TreeViewMultiSelectEnabledSelected", false);
00363                     }
00364                     else
00365                     {
00366                         winrt::VisualStateManager::GoToState(updateContainer, L"TreeViewMultiSelectEnabledUnselected", false);
00367                     }
00368                 }
00369             }
00370             else
00371             {
00372                 winrt::VisualStateManager::GoToState(updateContainer, L"TreeViewMultiSelectDisabled", false);
00373             }
00374         }
00375     }
00376 }
00377
00378 void TreeView::RaiseSelectionChanged(const winrt::IVector<winrt::IInspectable> addedItems, const winrt::IVector<winrt::IInspectable> removedItems)
00379 {
00380     const auto treeViewArgs = winrt::make_self<TreeViewSelectionChangedEventArgs>(addedItems, removedItems);
00381     m_selectionChangedEventSource(*this, *treeViewArgs);
00382 }
00383
00384 void TreeView::OnApplyTemplate()
00385 {
00386     winrt::IControlProtected controlProtected = *this;
00387     m_listControl.set(GetTemplateChildT<winrt::TreeViewList>(c_listControlName, controlProtected));
00388
00389     if (const auto listControl = m_listControl.get())
00390     {
00391         const auto listPtr = winrt::get_self<TreeViewList>(m_listControl.get());
00392         const auto viewModel = listPtr->ListViewModel();
00393         if (!m_rootNode.get())
00394         {
00395             m_rootNode.set(winrt::TreeViewNode());
00396         }
00397
00398         if (ItemsSource())
00399         {
00400             viewModel->IsContentMode(true);
00401         }
00402         viewModel->PrepareView(m_rootNode.get());
00403         viewModel->SetOwners(listControl, *this);
00404         viewModel->NodeExpanding({ this, &TreeView::OnNodeExpanding });
00405         viewModel->NodeCollapsed({ this, &TreeView::OnNodeCollapsed });
00406
00407         const auto selectionMode = SelectionMode();
00408         if (selectionMode == winrt::TreeViewSelectionMode::Single)
00409         {
00410             listControl.SelectionMode(winrt::ListViewSelectionMode::Single);
00411         }
00412         else
00413         {
00414             listControl.SelectionMode(winrt::ListViewSelectionMode::None);
00415             if (selectionMode == winrt::TreeViewSelectionMode::Multiple)
00416             {
00417                 UpdateItemsSelectionMode(true);
00418             }
00419         }
00420
00421         m_itemClickRevoker = listControl.ItemClick(winrt::auto_revoke, { this, &TreeView::OnItemClick });
00422         m_containerContentChangingRevoker = listControl.ContainerContentChanging(winrt::auto_revoke, { this, &TreeView::OnContainerContentChanging });
00423         m_dragItemsStartingRevoker = listControl.DragItemsStarting(winrt::auto_revoke, { this, &TreeView::OnListControlDragItemsStarting });
00424         m_dragItemsCompletedRevoker = listControl.DragItemsCompleted(winrt::auto_revoke, { this, &TreeView::OnListControlDragItemsCompleted });
00425         m_selectionChangedRevoker = listControl.SelectionChanged(winrt::auto_revoke, { this, &TreeView::OnListControlSelectionChanged });
00426
00427         if (m_pendingSelectedNodes && m_pendingSelectedNodes.get().Size() > 0)
00428         {
00429             const auto selectedNodes = viewModel->GetSelectedNodes();
00430             for (auto&& node : m_pendingSelectedNodes.get())
00431             {
00432                 selectedNodes.Append(node);
00433             }
00434             m_pendingSelectedNodes.get().Clear();
00435         }
00436     }
00437 }
00438
00439 winrt::TreeViewNode TreeView::GetAssociatedNode(winrt::IInspectable item)
00440 {
00441     return GetAssociatedNodeImpl(item, m_rootNode.get());
00442 }
00443
00444 winrt::TreeViewNode TreeView::GetAssociatedNodeImpl(winrt::IInspectable const& item, winrt::TreeViewNode const& node)
00445 {
00446     if (auto&& content = node.Content())
00447     {
00448         if (content == item)
00449         {
00450             return node;
00451         }
00452     }
00453
00454     for (auto&& childNode : node.Children())
00455     {
00456         if (auto result = GetAssociatedNodeImpl(item, childNode))
00457         {
00458             return result;
00459         }
00460     }
00461     return nullptr;
00462 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewItemProperties Member List

This is the complete list of members for TabViewItemProperties, including all inherited members.
ClearProperties() | TabViewItemProperties | [static]
CloseRequested(winrt::TypedEventHandler< winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs > const &value) | TabViewItemProperties |
CloseRequested(winrt::event_token const &token) | TabViewItemProperties |
EnsureProperties() | TabViewItemProperties | [static]
Header(winrt::IInspectable const &value) | TabViewItemProperties |
Header() | TabViewItemProperties |
HeaderProperty() | TabViewItemProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | TabViewItemProperties |
HeaderTemplate() | TabViewItemProperties |
HeaderTemplateProperty() | TabViewItemProperties | [inline, static]
IconSource(winrt::IconSource const &value) | TabViewItemProperties |
IconSource() | TabViewItemProperties |
IconSourceProperty() | TabViewItemProperties | [inline, static]
IsClosable(bool value) | TabViewItemProperties |
IsClosable() | TabViewItemProperties |
IsClosableProperty() | TabViewItemProperties | [inline, static]
m_closeRequestedEventSource | TabViewItemProperties |
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewItemProperties | [static]
OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewItemProperties | [static]
OnIsClosablePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewItemProperties | [static]
s_HeaderProperty | TabViewItemProperties | [static]
s_HeaderTemplateProperty | TabViewItemProperties | [static]
s_IconSourceProperty | TabViewItemProperties | [static]
s_IsClosableProperty | TabViewItemProperties | [static]
s_TabViewTemplateSettingsProperty | TabViewItemProperties | [static]
TabViewItemProperties() | TabViewItemProperties |
TabViewTemplateSettings(winrt::TabViewItemTemplateSettings const &value) | TabViewItemProperties |
TabViewTemplateSettings() | TabViewItemProperties |
TabViewTemplateSettingsProperty() | TabViewItemProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealMarkupPage Member List

This is the complete list of members for RevealMarkupPage, including all inherited members.
GetTopParent(UIElement current) | RevealMarkupPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | RevealMarkupPage | [inline, protected]
RevealMarkupPage() | RevealMarkupPage | [inline]
RunTestButton_Clicked(object sender, RoutedEventArgs e) | RevealMarkupPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/TestUI/RefreshVisualizerPage.xaml.cs Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer
  • TestUI

RefreshVisualizerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.IO;
00007 using System.Linq;
00008 using System.Runtime.InteropServices.WindowsRuntime;
00009 using Windows.Foundation;
00010 using Windows.Foundation.Collections;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Controls.Primitives;
00014 using Microsoft.UI.Xaml.Data;
00015 using Microsoft.UI.Xaml.Input;
00016 using Microsoft.UI.Xaml.Media;
00017 using Microsoft.UI.Xaml.Navigation;
00018 using Microsoft.UI.Private.Controls;
00019 using RefreshVizualizer_TestUI;
00020 using Common;
00021 using MUXControlsTestApp.Utilities;
00022
00023 using WEX.TestExecution;
00024 using WEX.TestExecution.Markup;
00025 using WEX.Logging.Interop;
00026
00027 namespace MUXControlsTestApp
00028 {
00029     public sealed partial class RefreshVisualizerPage : TestPage
00030     {
00031         private DispatcherTimer timer = new DispatcherTimer();
00032         private DispatcherTimer adapterTimer = new DispatcherTimer();
00033         int BackgroundColorCounter = 0;
00034         int ForegroundColorCounter = 0;
00035
00036         SymbolIcon icon = new SymbolIcon(Symbol.Cancel);
00037
00038         Grid grid = new Grid();
00039
00040         public RefreshVisualizerPage()
00041         {
00042             this.InitializeComponent();
00043             this.RefreshButton.Click += RefreshButtonClick;
00044             this.InsertIcon.Click += InsertButtonClick;
00045             this.InsertGrid.Click += InsertGridButtonClick;
00046             this.ChangeForeground.Click += ChangeForegroundClick;
00047             this.ChangeBackground.Click += ChangeBackgroundClick;
00048             this.MarginSlider.ValueChanged += MarginValueChanged;
00049             this.MySizeSlider.ValueChanged += SizeValueChanged;
00050             this.Loaded += MainPageLoaded;
00051
00052             timer.Interval = new TimeSpan(0, 0, 3);
00053             timer.Tick += Timer_Tick;
00054
00055             SymbolIcon icon = new SymbolIcon(Symbol.Cancel);
00056             icon.Margin = new Thickness(15);
00057             icon.VerticalAlignment = VerticalAlignment.Center;
00058             icon.HorizontalAlignment = HorizontalAlignment.Center;
00059             icon.Height = 30;
00060             icon.Width = 30;
00061
00062             grid.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 255, 255, 0));
00063             grid.Margin = new Thickness(15);
00064             grid.VerticalAlignment = VerticalAlignment.Center;
00065             grid.HorizontalAlignment = HorizontalAlignment.Center;
00066             grid.Height = 30;
00067             grid.Width = 30;
00068
00069             LogController.InitializeLogging();
00070         }
00071
00072         protected override void OnNavigatedFrom(NavigationEventArgs e)
00073         {
00074             base.OnNavigatedFrom(e);
00075             timer.Stop();
00076             adapterTimer.Stop();
00077         }
00078
00079         private void InsertGridButtonClick(object sender, RoutedEventArgs e)
00080         {
00081             this.RefreshVisualizer.Content = grid;
00082         }
00083
00084         private void MarginValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00085         {
00086             icon.Margin = new Thickness(e.NewValue);
00087         }
00088         private void SizeValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00089         {
00090             icon.Height = e.NewValue;
00091             icon.Width = e.NewValue;
00092         }
00093
00094         private void ChangeBackgroundClick(object sender, RoutedEventArgs e)
00095         {
00096             switch(BackgroundColorCounter)
00097             {
00098                 case 0:
00099                     this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 255, 0, 0));
00100                     break;
00101                 case 1:
00102                     this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0));
00103                     break;
00104                 case 2:
00105                     this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 0, 255));
00106                     break;
00107                 default:
00108                     this.RefreshVisualizer.Background = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(0, 0, 0, 0));
00109                     BackgroundColorCounter = -1;
00110                     break;
00111             }
00112             BackgroundColorCounter++;
00113         }
00114
00115         private void ChangeForegroundClick(object sender, RoutedEventArgs e)
00116         {
00117             switch (ForegroundColorCounter)
00118             {
00119                 case 0:
00120                     this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 255, 0, 0));
00121                     break;
00122                 case 1:
00123                     this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0));
00124                     break;
00125                 case 2:
00126                     this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 0, 255));
00127                     break;
00128                 default:
00129                     this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 0, 0));
00130                     ForegroundColorCounter = -1;
00131                     break;
00132             }
00133             ForegroundColorCounter++;
00134         }
00135
00136         private void InsertButtonClick(object sender, RoutedEventArgs e)
00137         {
00138             this.RefreshVisualizer.Content = icon;
00139         }
00140
00141         private void RefreshButtonClick(object sender, RoutedEventArgs e)
00142         {
00143             this.RefreshVisualizer.RequestRefresh();
00144         }
00145
00146         private void MainPageLoaded(object sender, object e)
00147         {
00148             this.Loaded -= MainPageLoaded;
00149             this.RefreshVisualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
00150             var adapter = new SliderRefreshInfoProviderAdapter(this.Slider, adapterTimer);
00151             ((IRefreshVisualizerPrivate)this.RefreshVisualizer).InfoProvider = adapter.adapt();
00152             this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Auto);
00153             this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Normal);
00154             this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Rotate90DegreesCounterclockwise);
00155             this.OrientationComboBox.Items.Add(RefreshVisualizerOrientation.Rotate270DegreesCounterclockwise);
00156             this.RefreshVisualizer.RefreshStateChanged += RefreshVisualizer_RefreshStateChanged;
00157             this.StateText.Text = this.RefreshVisualizer.State.ToString();
00158             this.OrientationComboBox.SelectedIndex = (int)this.RefreshVisualizer.Orientation;
00159             this.OrientationComboBox.SelectionChanged += OrientationComboBox_SelectionChanged;
00160             this.RefreshVisualizer.Foreground = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0));
00161         }
00162
00163         private void RefreshVisualizer_RefreshStateChanged(RefreshVisualizer sender, RefreshStateChangedEventArgs args)
00164         {
00165             this.StateText.Text = args.NewState.ToString();
00166         }
00167
00168         private void OrientationComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00169         {
00170             this.RefreshVisualizer.Orientation = (RefreshVisualizerOrientation)this.OrientationComboBox.SelectedItem;
00171         }
00172
00173         private void RefreshVisualizer_RefreshRequested(object sender, RefreshRequestedEventArgs e)
00174         {
00175             this.RefreshCompletionDeferral = e.GetDeferral();
00176             timer.Start();
00177         }
00178
00179         private Deferral RefreshCompletionDeferral
00180         {
00181             get;
00182             set;
00183         }
00184
00185         private void Timer_Tick(object sender, object e)
00186         {
00187             timer.Stop();
00188             this.RefreshCompletionDeferral.Complete();
00189         }
00190     }
00191 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemAutomationPeer Member List

This is the complete list of members for TreeViewItemAutomationPeer, including all inherited members.
_owner | TreeViewItemAutomationPeer | [private]
AddToSelection() | TreeViewItemAutomationPeer | [inline]
GetAutomationControlTypeCore() | TreeViewItemAutomationPeer | [inline, protected]
GetLocalizedControlTypeCore() | TreeViewItemAutomationPeer | [inline, protected]
GetPatternCore(PatternInterface patternInterface) | TreeViewItemAutomationPeer | [inline, protected]
IsSelected | TreeViewItemAutomationPeer |
RemoveFromSelection() | TreeViewItemAutomationPeer | [inline]
Select() | TreeViewItemAutomationPeer | [inline]
SelectionContainer | TreeViewItemAutomationPeer |
TreeViewItemAutomationPeer(FrameworkElement owner) | TreeViewItemAutomationPeer | [inline]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/OrientationBasedMeasures.h Source File

  • File List
  • File Members
  • Repeater

OrientationBasedMeasures.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 enum class ScrollOrientation
00007 {
00008     Vertical,
00009     Horizontal
00010 };
00011
00012 class OrientationBasedMeasures
00013 {
00014 public:
00015     ScrollOrientation GetScrollOrientation() const { return m_orientation; }
00016     void SetScrollOrientation(ScrollOrientation value) { m_orientation = value; }
00017
00018     // Major - Scrolling/virtualizing direction
00019     // Minor - Opposite direction
00020     float& Major(const winrt::Size& size);
00021     float& Minor(const winrt::Size& size);
00022
00023     float& MajorSize(const winrt::Rect& rect);
00024     float& MinorSize(const winrt::Rect& rect);
00025     float& MajorStart(const winrt::Rect& rect);
00026     float MajorEnd(const winrt::Rect& rect) const;
00027     float& MinorStart(const winrt::Rect& rect);
00028     float MinorEnd(const winrt::Rect& rect) const;
00029
00030     winrt::Rect MinorMajorRect(float minor, float major, float minorSize, float majorSize);
00031     winrt::Point MinorMajorPoint(float minor, float major);
00032     winrt::Size MinorMajorSize(float minor, float major);
00033
00034 private:
00035     ScrollOrientation m_orientation { ScrollOrientation::Vertical };
00036 };
00037
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBar.h Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBar.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include "BreadcrumbBar.g.h"
00009 #include "BreadcrumbBar.properties.h"
00010 #include "SplitButton.h"
00011 #include "BreadcrumbBarElementFactory.h"
00012 #include "Vector.h"
00013 #include "BreadcrumbIterable.h"
00014 #include "BreadcrumbLayout.h"
00015
00016 class BreadcrumbBar :
00017     public ReferenceTracker<BreadcrumbBar, winrt::implementation::BreadcrumbBarT>,
00018     public BreadcrumbBarProperties
00019 {
00020
00021 public:
00022     BreadcrumbBar();
00023     ~BreadcrumbBar() {}
00024
00025     // IFrameworkElement
00026     void OnApplyTemplate();
00027     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00028     void RevokeListeners();
00029
00030     void RaiseItemClickedEvent(const winrt::IInspectable& content, const uint32_t index);
00031     winrt::IVector<winrt::IInspectable> HiddenElements() const;
00032     void ReIndexVisibleElementsForAccessibility() const;
00033
00034 private:
00035     void OnBreadcrumbBarItemsRepeaterLoaded(const winrt::IInspectable&, const winrt::RoutedEventArgs&);
00036     void OnElementPreparedEvent(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementPreparedEventArgs&);
00037     void OnElementIndexChangedEvent(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementIndexChangedEventArgs&);
00038     void OnElementClearingEvent(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementClearingEventArgs&);
00039     void OnBreadcrumbBarItemsSourceCollectionChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00040     void OnFlowDirectionChanged(winrt::DependencyObject const&, winrt::DependencyProperty const&);
00041
00042     // Keyboard navigation
00043     void OnGettingFocus(const winrt::IInspectable&, const winrt::GettingFocusEventArgs& args);
00044     void OnAccessKeyInvoked(const winrt::UIElement&, const winrt::AccessKeyInvokedEventArgs& args);
00045
00046     winrt::FindNextElementOptions GetFindNextElementOptions();
00047     void FocusElementAt(int index);
00048     bool MoveFocus(int initialIndexIncrement);
00049     bool MoveFocusPrevious();
00050     bool MoveFocusNext();
00051     void OnChildPreviewKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args);
00052
00053     void UpdateItemsRepeaterItemsSource();
00054     void UpdateItemTemplate();
00055     void UpdateEllipsisBreadcrumbBarItemDropDownItemTemplate();
00056     void UpdateBreadcrumbBarItemsFlowDirection();
00057
00058     void ResetLastBreadcrumbBarItem();
00059     void ForceUpdateLastElement();
00060     void UpdateLastElement(const winrt::BreadcrumbBarItem& newLastBreadcrumbBarItem);
00061
00062     winrt::IVector<winrt::IInspectable> GetHiddenElementsList(uint32_t firstShownElement) const;
00063
00064     winrt::Control::Loaded_revoker m_itemsRepeaterLoadedRevoker{};
00065     winrt::ItemsRepeater::ElementPrepared_revoker m_itemsRepeaterElementPreparedRevoker{};
00066     winrt::ItemsRepeater::ElementIndexChanged_revoker m_itemsRepeaterElementIndexChangedRevoker{};
00067     winrt::ItemsRepeater::ElementClearing_revoker m_itemsRepeaterElementClearingRevoker{};
00068     winrt::ItemsSourceView::CollectionChanged_revoker m_itemsSourceChanged{};
00069     RoutedEventHandler_revoker m_breadcrumbKeyDownHandlerRevoker{};
00070
00071     tracker_ref<winrt::INotifyCollectionChanged> m_notifyCollectionChanged{ this };
00072     winrt::event_token m_itemsSourceAsCollectionChanged{};
00073     winrt::event_token m_itemsSourceAsBindableVectorChanged{};
00074     winrt::IObservableVector<winrt::IInspectable>::VectorChanged_revoker m_itemsSourceAsObservableVectorChanged{};
00075
00076     // This collection is only composed of the consumer defined objects, it doesn't
00077     // include the extra ellipsis/nullptr element. This variable is only used to capture
00078     // changes in the ItemsSource
00079     winrt::ItemsSourceView m_breadcrumbItemsSourceView{ nullptr };
00080
00081     // This is the "element collection" provided to the underlying ItemsRepeater, so it
00082     // includes the extra ellipsis/nullptr element in the position 0.
00083     com_ptr<BreadcrumbIterable> m_itemsIterable{ nullptr };
00084
00085     tracker_ref<winrt::ItemsRepeater> m_itemsRepeater { this };
00086     com_ptr<BreadcrumbElementFactory> m_itemsRepeaterElementFactory{ nullptr };
00087     com_ptr<BreadcrumbLayout> m_itemsRepeaterLayout{ nullptr };
00088
00089     // Pointers to first and last items to update visual states
00090     tracker_ref<winrt::BreadcrumbBarItem> m_ellipsisBreadcrumbBarItem { this };
00091     tracker_ref<winrt::BreadcrumbBarItem> m_lastBreadcrumbBarItem { this };
00092
00093     // Index of the last focused item when breadcrumb lost focus
00094     int m_focusedIndex{ 1 };
00095
00096     // Template Parts
00097     static constexpr std::wstring_view s_itemsRepeaterPartName{ L"PART_ItemsRepeater"sv };
00098 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/FocusHelper.h Source File

  • File List
  • File Members
  • inc

FocusHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 class FocusHelper
00010 {
00011 public:
00012     static bool constexpr IsGamepadNavigationDirection(winrt::VirtualKey key)
00013     {
00014         return key == winrt::VirtualKey::GamepadLeftThumbstickDown
00015             || key == winrt::VirtualKey::GamepadDPadDown
00016             || key == winrt::VirtualKey::GamepadLeftThumbstickUp
00017             || key == winrt::VirtualKey::GamepadDPadUp
00018             || key == winrt::VirtualKey::GamepadLeftThumbstickRight
00019             || key == winrt::VirtualKey::GamepadDPadRight
00020             || key == winrt::VirtualKey::GamepadLeftThumbstickLeft
00021             || key == winrt::VirtualKey::GamepadDPadLeft;
00022     }
00023
00024     static bool constexpr IsGamepadPageNavigationDirection(winrt::VirtualKey key)
00025     {
00026         return
00027             key == winrt::VirtualKey::GamepadLeftShoulder ||
00028             key == winrt::VirtualKey::GamepadRightShoulder ||
00029             key == winrt::VirtualKey::GamepadLeftTrigger ||
00030             key == winrt::VirtualKey::GamepadRightTrigger;
00031     }
00032
00033     static winrt::FocusNavigationDirection constexpr GetNavigationDirection(winrt::VirtualKey key)
00034     {
00035         winrt::FocusNavigationDirection direction = winrt::FocusNavigationDirection::None;
00036
00037         switch (key)
00038         {
00039         case winrt::VirtualKey::GamepadDPadUp:
00040         case winrt::VirtualKey::GamepadLeftThumbstickUp:
00041         case winrt::VirtualKey::Up:
00042             direction = winrt::FocusNavigationDirection::Up;
00043             break;
00044         case winrt::VirtualKey::GamepadDPadDown:
00045         case winrt::VirtualKey::GamepadLeftThumbstickDown:
00046         case winrt::VirtualKey::Down:
00047             direction = winrt::FocusNavigationDirection::Down;
00048             break;
00049         case winrt::VirtualKey::GamepadDPadLeft:
00050         case winrt::VirtualKey::GamepadLeftThumbstickLeft:
00051         case winrt::VirtualKey::Left:
00052             direction = winrt::FocusNavigationDirection::Left;
00053             break;
00054         case winrt::VirtualKey::GamepadDPadRight:
00055         case winrt::VirtualKey::GamepadLeftThumbstickRight:
00056         case winrt::VirtualKey::Right:
00057             direction = winrt::FocusNavigationDirection::Right;
00058             break;
00059         }
00060
00061         return direction;
00062     }
00063
00064     static winrt::FocusNavigationDirection constexpr GetPageNavigationDirection(winrt::VirtualKey key)
00065     {
00066         winrt::FocusNavigationDirection direction = winrt::FocusNavigationDirection::None;
00067
00068         switch (key)
00069         {
00070         case winrt::VirtualKey::GamepadLeftTrigger:
00071             direction = winrt::FocusNavigationDirection::Up;
00072             break;
00073         case winrt::VirtualKey::GamepadRightTrigger:
00074             direction = winrt::FocusNavigationDirection::Down;
00075             break;
00076         case winrt::VirtualKey::GamepadLeftShoulder:
00077             direction = winrt::FocusNavigationDirection::Left;
00078             break;
00079         case winrt::VirtualKey::GamepadRightShoulder:
00080             direction = winrt::FocusNavigationDirection::Right;
00081             break;
00082         }
00083
00084         return direction;
00085     }
00086
00087     static winrt::FocusNavigationDirection constexpr GetOppositeDirection(winrt::FocusNavigationDirection direction)
00088     {
00089         winrt::FocusNavigationDirection oppositeDirection = winrt::FocusNavigationDirection::None;
00090         switch (direction)
00091         {
00092         case winrt::FocusNavigationDirection::Down:
00093             oppositeDirection = winrt::FocusNavigationDirection::Up;
00094             break;
00095         case winrt::FocusNavigationDirection::Up:
00096             oppositeDirection = winrt::FocusNavigationDirection::Down;
00097             break;
00098         case winrt::FocusNavigationDirection::Left:
00099             oppositeDirection = winrt::FocusNavigationDirection::Right;
00100             break;
00101         case winrt::FocusNavigationDirection::Right:
00102             oppositeDirection = winrt::FocusNavigationDirection::Left;
00103             break;
00104         case winrt::FocusNavigationDirection::Next:
00105             oppositeDirection = winrt::FocusNavigationDirection::Previous;
00106             break;
00107         case winrt::FocusNavigationDirection::Previous:
00108             oppositeDirection = winrt::FocusNavigationDirection::Next;
00109             break;
00110         }
00111         return oppositeDirection;
00112     }
00113
00114     static winrt::UIElement GetUIElementForFocusCandidate(const winrt::DependencyObject& dobj)
00115     {
00116         auto uielement = dobj.try_as<winrt::UIElement>();
00117         auto parent = dobj;
00118         while (uielement == nullptr && parent != nullptr)
00119         {
00120             parent = winrt::VisualTreeHelper::GetParent(dobj);
00121             if (parent)
00122             {
00123                 uielement = dobj.try_as<winrt::UIElement>();
00124             }
00125         }
00126
00127         return uielement;
00128     }
00129 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarPenButtonProperties Member List

This is the complete list of members for InkToolBarPenButtonProperties, including all inherited members.
ClearProperties() | InkToolBarPenButtonProperties | [static]
EnsureProperties() | InkToolBarPenButtonProperties | [static]
InkToolBarPenButtonProperties() | InkToolBarPenButtonProperties |
MaxStrokeWidth(double value) | InkToolBarPenButtonProperties |
MaxStrokeWidth() | InkToolBarPenButtonProperties |
MaxStrokeWidthProperty() | InkToolBarPenButtonProperties | [inline, static]
MinStrokeWidth(double value) | InkToolBarPenButtonProperties |
MinStrokeWidth() | InkToolBarPenButtonProperties |
MinStrokeWidthProperty() | InkToolBarPenButtonProperties | [inline, static]
Palette(winrt::IVector< winrt::Brush > const &value) | InkToolBarPenButtonProperties |
Palette() | InkToolBarPenButtonProperties |
PaletteProperty() | InkToolBarPenButtonProperties | [inline, static]
s_MaxStrokeWidthProperty | InkToolBarPenButtonProperties | [static]
s_MinStrokeWidthProperty | InkToolBarPenButtonProperties | [static]
s_PaletteProperty | InkToolBarPenButtonProperties | [static]
s_SelectedBrushIndexProperty | InkToolBarPenButtonProperties | [static]
s_SelectedBrushProperty | InkToolBarPenButtonProperties | [static]
s_SelectedStrokeWidthProperty | InkToolBarPenButtonProperties | [static]
SelectedBrush(winrt::Brush const &value) | InkToolBarPenButtonProperties |
SelectedBrush() | InkToolBarPenButtonProperties |
SelectedBrushIndex(int value) | InkToolBarPenButtonProperties |
SelectedBrushIndex() | InkToolBarPenButtonProperties |
SelectedBrushIndexProperty() | InkToolBarPenButtonProperties | [inline, static]
SelectedBrushProperty() | InkToolBarPenButtonProperties | [inline, static]
SelectedStrokeWidth(double value) | InkToolBarPenButtonProperties |
SelectedStrokeWidth() | InkToolBarPenButtonProperties |
SelectedStrokeWidthProperty() | InkToolBarPenButtonProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SimpleRectanglePage Member List

This is the complete list of members for SimpleRectanglePage, including all inherited members.
AnimatedValuesSpy | SimpleRectanglePage | [private]
CheckSpyingTicksRequirement() | SimpleRectanglePage | [inline, private]
CompositionTarget_Rendering(object sender, object e) | SimpleRectanglePage | [inline, private]
HasDirectManipulation | SimpleRectanglePage | [private]
HorizontalOffsetAnimation1 | SimpleRectanglePage | [private]
HorizontalOffsetAnimation2 | SimpleRectanglePage | [private]
IsRenderingHooked | SimpleRectanglePage | [private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | SimpleRectanglePage | [inline, private]
ScrollViewer_DirectManipulationCompleted(object sender, object e) | SimpleRectanglePage | [inline, private]
ScrollViewer_DirectManipulationStarted(object sender, object e) | SimpleRectanglePage | [inline, private]
ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) | SimpleRectanglePage | [inline, private]
SetupAnimatedValuesSpy() | SimpleRectanglePage | [inline, private]
SetupScrollPresenter() | SimpleRectanglePage | [inline, private]
SimpleRectanglePage() | SimpleRectanglePage | [inline]
SpyAnimatedValues() | SimpleRectanglePage | [inline, private]
StartAnimatedValuesSpy() | SimpleRectanglePage | [inline, private]
StopAnimatedValuesSpy() | SimpleRectanglePage | [inline, private]
TickForValuesSpy() | SimpleRectanglePage | [inline, private]
UIThreadTicksForValuesSpy | SimpleRectanglePage | [private]
VerticalOffsetAnimation1 | SimpleRectanglePage | [private]
VerticalOffsetAnimation2 | SimpleRectanglePage | [private]
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RepeaterTests Member List

This is the complete list of members for RepeaterTests, including all inherited members.
BringIntoViewOfExistingItemsDoesNotChangeScrollOffset() | RepeaterTests | [inline]
CanSetItemsSource() | RepeaterTests | [inline]
CreateDataTemplateWithContent(string content) | RepeaterTests | [inline, private]
NestedRepeaterWithDataTemplateScenario() | RepeaterTests | [inline]
NestedRepeaterWithDataTemplateScenario(bool disableAnimation) | RepeaterTests | [inline, private]
ValidateElementToIndexMapping() | RepeaterTests | [inline]
ValidateGetSetBackground() | RepeaterTests | [inline]
ValidateGetSetItemsSource() | RepeaterTests | [inline]
ValidateNullItemsSource() | RepeaterTests | [inline]
ValidateRepeaterDefaults() | RepeaterTests | [inline]
VerifyClearingItemsSourceClearsElements() | RepeaterTests | [inline]
VerifyCorrectionsInNonScrollableDirection() | RepeaterTests | [inline]
VerifyCurrentAnchor() | RepeaterTests | [inline]
VerifyFocusedItemIsRecycledOnCollectionReset() | RepeaterTests | [inline]
VerifyRepeaterDoesNotLeakItemContainers() | RepeaterTests | [inline]
VerifyStoreScenarioCache() | RepeaterTests | [inline]
VerifyUIElementsInItemsSource() | RepeaterTests | [inline]
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElementsLayer.cpp Source File

  • File List
  • File Members
  • MapControl

MapElementsLayer.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MapElementsLayer.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009 #include "MapElementClickEventArgs.h"
00010 #include "MapControl.h"
00011 #include "Vector.h"
00012 #include "MapElement.h"
00013 #include "MapControl.h"
00014
00015 MapElementsLayer::MapElementsLayer()
00016 {
00017     auto elements = winrt::make<Vector<winrt::MapElement>>();
00018     auto observableVector = elements.try_as<winrt::IObservableVector<winrt::MapElement>>();
00019     observableVector.VectorChanged({ this, &MapElementsLayer::OnMapElementsVectorChanged });
00020     SetValue(s_MapElementsProperty, elements);
00021
00022     m_elementIds = winrt::make<Vector<winrt::hstring>>();
00023
00024 }
00025
00026 void MapElementsLayer::SetParentMapControl(const winrt::MapControl& parent)
00027 {
00028     m_parentMapControl = winrt::make_weak(parent);
00029 }
00030
00031 void  MapElementsLayer::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00032 {
00033     winrt::IDependencyProperty property = args.Property();
00034
00035 }
00036 void MapElementsLayer::RaiseMapElementClick(MapElementClickEventArgs const& args)
00037 {
00038     m_mapElementClickEventSource(*this, args);
00039 }
00040
00041 winrt::fire_and_forget MapElementsLayer::HandleMapElementsChanged(const winrt::IObservableVector<winrt::MapElement>& sender, const winrt::Collections::IVectorChangedEventArgs& args)
00042 {
00043     const auto index = args.Index();
00044     if (const auto& mapControl = m_parentMapControl.get())
00045     {
00046         auto mapControlImpl = winrt::get_self<MapControl>(mapControl);
00047         switch (args.CollectionChange())
00048         {
00049             case winrt::Collections::CollectionChange::ItemInserted:
00050             {
00051                 co_await mapControlImpl->LayerElementsChanged(*this, MapElements(), args, L"");
00052                 m_elementIds.Append(winrt::get_self<MapElement>(MapElements().GetAt(index))->Id);
00053                 break;
00054             }
00055             case winrt::Collections::CollectionChange::ItemRemoved:
00056             {
00057                 co_await mapControlImpl->LayerElementsChanged(*this, MapElements(), args, m_elementIds.GetAt(index));
00058                 m_elementIds.RemoveAt(index);
00059                 break;
00060             }
00061             case winrt::Collections::CollectionChange::ItemChanged:
00062             {
00063                 auto elements = MapElements();
00064                 co_await mapControlImpl->LayerElementsChanged(*this, elements, args, m_elementIds.GetAt(index));
00065                 m_elementIds.SetAt(index, winrt::get_self<MapElement>(elements.GetAt(index))->Id);
00066                 break;
00067             }
00068             case winrt::Collections::CollectionChange::Reset:
00069             {
00070                 auto elements = MapElements();
00071                 co_await mapControlImpl->LayerElementsChanged(*this, elements, args, L"");
00072                 m_elementIds.Clear();
00073                 for (uint32_t i = 0; i < elements.Size(); i++)
00074                 {
00075                     auto elementId = winrt::get_self<MapElement>(elements.GetAt(i))->Id;
00076                     m_elementIds.Append(elementId);
00077                 }
00078                 break;
00079             }
00080         }
00081     }
00082 }
00083
00084 void MapElementsLayer::OnMapElementsVectorChanged(const winrt::IObservableVector<winrt::MapElement>& sender, const winrt::Collections::IVectorChangedEventArgs& args)
00085 {
00086     HandleMapElementsChanged(sender, args);
00087 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarFolder Member List

This is the complete list of members for BreadcrumbBarFolder, including all inherited members.
Background | BreadcrumbBarFolder
Foreground | BreadcrumbBarFolder
Name | BreadcrumbBarFolder
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/SliderPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

SliderPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     [TopLevelTestPage(Name = "Slider", Icon = "Slider.png")]
00007     public sealed partial class SliderPage : TestPage
00008     {
00009         public SliderPage()
00010         {
00011             this.InitializeComponent();
00012         }
00013     }
00014 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingItemImageInfo Member List

This is the complete list of members for RatingItemImageInfo, including all inherited members.
ClearProperties() | RatingItemImageInfoProperties | [static]
DisabledImage(winrt::ImageSource const &value) | RatingItemImageInfoProperties |
DisabledImage() | RatingItemImageInfoProperties |
DisabledImageProperty() | RatingItemImageInfoProperties | [inline, static]
EnsureProperties() | RatingItemImageInfoProperties | [static]
Image(winrt::ImageSource const &value) | RatingItemImageInfoProperties |
Image() | RatingItemImageInfoProperties |
ImageProperty() | RatingItemImageInfoProperties | [inline, static]
PlaceholderImage(winrt::ImageSource const &value) | RatingItemImageInfoProperties |
PlaceholderImage() | RatingItemImageInfoProperties |
PlaceholderImageProperty() | RatingItemImageInfoProperties | [inline, static]
PointerOverImage(winrt::ImageSource const &value) | RatingItemImageInfoProperties |
PointerOverImage() | RatingItemImageInfoProperties |
PointerOverImageProperty() | RatingItemImageInfoProperties | [inline, static]
PointerOverPlaceholderImage(winrt::ImageSource const &value) | RatingItemImageInfoProperties |
PointerOverPlaceholderImage() | RatingItemImageInfoProperties |
PointerOverPlaceholderImageProperty() | RatingItemImageInfoProperties | [inline, static]
RatingItemImageInfoProperties() | RatingItemImageInfoProperties |
s_DisabledImageProperty | RatingItemImageInfoProperties | [static]
s_ImageProperty | RatingItemImageInfoProperties | [static]
s_PlaceholderImageProperty | RatingItemImageInfoProperties | [static]
s_PointerOverImageProperty | RatingItemImageInfoProperties | [static]
s_PointerOverPlaceholderImageProperty | RatingItemImageInfoProperties | [static]
s_UnsetImageProperty | RatingItemImageInfoProperties | [static]
UnsetImage(winrt::ImageSource const &value) | RatingItemImageInfoProperties |
UnsetImage() | RatingItemImageInfoProperties |
UnsetImageProperty() | RatingItemImageInfoProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutProperties Member List

This is the complete list of members for LayoutProperties, including all inherited members.
ArrangeInvalidated(winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const &value) | LayoutProperties |
ArrangeInvalidated(winrt::event_token const &token) | LayoutProperties |
ClearProperties() | LayoutProperties | [static]
EnsureProperties() | LayoutProperties | [static]
LayoutProperties() | LayoutProperties |
m_arrangeInvalidatedEventSource | LayoutProperties |
m_measureInvalidatedEventSource | LayoutProperties |
MeasureInvalidated(winrt::TypedEventHandler< winrt::Layout, winrt::IInspectable > const &value) | LayoutProperties |
MeasureInvalidated(winrt::event_token const &token) | LayoutProperties |
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksLoggingMessageEventArgs.cpp Source File

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooksLoggingMessageEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MUXControlsTestHooksLoggingMessageEventArgs.h"
00007
00008 winrt::hstring MUXControlsTestHooksLoggingMessageEventArgs::Message()
00009 {
00010     return m_message;
00011 }
00012
00013 bool MUXControlsTestHooksLoggingMessageEventArgs::IsVerboseLevel()
00014 {
00015     return m_isVerboseLevel;
00016 }
00017
00018 void MUXControlsTestHooksLoggingMessageEventArgs::SetMessage(const wstring_view& message)
00019 {
00020     m_message = message;
00021 }
00022
00023 void MUXControlsTestHooksLoggingMessageEventArgs::SetIsVerboseLevel(bool isVerboseLevel)
00024 {
00025     m_isVerboseLevel = isVerboseLevel;
00026 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Category Member List

This is the complete list of members for Category, including all inherited members.
Category(String content, String name, String icon, ObservableCollection< Category > children, bool selectsOnInvoked) | Category | [inline]
Children | Category |
Content | Category |
Icon | Category |
Name | Category |
SelectsOnInvoked | Category |
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/ItemsViewWithDataPage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples

ItemsViewWithDataPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Samples.Model;
00005 using System;
00006 using System.Collections.ObjectModel;
00007 using System.Linq;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Navigation;
00012 using MUXControlsTestApp.Utilities;
00013
00014 using RecyclePool = Microsoft.UI.Xaml.Controls.RecyclePool;
00015 using ItemsRepeater = Microsoft.UI.Xaml.Controls.ItemsRepeater;
00016 using UniformGridLayout = Microsoft.UI.Xaml.Controls.UniformGridLayout;
00017 using StackLayout = Microsoft.UI.Xaml.Controls.StackLayout;
00018 using RepeaterTestHooks = Microsoft.UI.Private.Controls.RepeaterTestHooks;
00019
00020 namespace MUXControlsTestApp.Samples
00021 {
00022     public sealed partial class ItemsViewWithDataPage : Page
00023     {
00024         private string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00025
00026         ObservableCollection<Recipe> _flatData;
00027         ObservableCollection<RecipeGroup> _oneLevelNestedData;
00028         ObservableCollection<Year> _twoLevelNestedData;
00029         PageInfo _pageInfo;
00030
00031         public ItemsViewWithDataPage()
00032         {
00033             this.InitializeComponent();
00034
00035             goBackButton.Click += delegate
00036             {
00037                 Frame.GoBack();
00038             };
00039
00040             //this.LayoutUpdated += OnLayoutUpdated;
00041             //CompositionTarget.Rendering += OnRendering;
00042             lineAlignmentComboBox.SelectionChanged += LineAlignmentComboBox_SelectionChanged;
00043             itemsStretchComboBox.SelectionChanged += ItemsStretchComboBox_SelectionChanged;
00044
00045             scrollButton.Click += OnScrollButtonClicked;
00046         }
00047
00048         protected override void OnNavigatedTo(NavigationEventArgs e)
00049         {
00050             _pageInfo = e.Parameter as PageInfo;
00051             if (_pageInfo != null)
00052             {
00053                 int levels = _pageInfo.NumLevels;
00054                 var level0Layout = _pageInfo.Level0Layout;
00055                 var level1Layout = _pageInfo.Level1Layout;
00056                 var level2Layout = _pageInfo.Level2Layout;
00057                 var rnd = new Random(12345);
00058
00059                 if (_pageInfo.Orientation == Orientation.Horizontal)
00060                 {
00061                     scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
00062                     scrollViewer.VerticalScrollMode = ScrollMode.Disabled;
00063                     scrollViewer.HorizontalScrollMode = ScrollMode.Enabled;
00064                     scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
00065                 }
00066
00067                 var generator = _pageInfo.Orientation == Orientation.Vertical ?
00068                     new RecipeElementFactory(
00069                         (DataTemplate)Resources["RecipeTemplate"],
00070                         (DataTemplate)Resources["RecipeGroupTemplate"],
00071                         (DataTemplate)Resources["YearTemplate"], _pageInfo) :
00072                     new RecipeElementFactory(
00073                         (DataTemplate)Resources["RecipeTemplateHorizontal"],
00074                         (DataTemplate)Resources["RecipeGroupTemplateHorizontal"],
00075                         (DataTemplate)Resources["YearTemplateHorizontal"], _pageInfo);
00076
00077                 generator.RecyclePool = new RecyclePool();
00078                 rootRepeater.ItemTemplate = generator;
00079                 rootRepeater.Layout = _pageInfo.Level0Layout;
00080                 RepeaterTestHooks.SetLayoutId(rootRepeater.Layout, "Root");
00081
00082                 switch (levels)
00083                 {
00084                     case 0:
00085                         _flatData = new ObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
00086                             new Recipe
00087                             {
00088                                 ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00089                                 Description = k + " - " + _lorem.Substring(0, level0Layout is StackLayout ? rnd.Next(200, 650) : level0Layout is UniformGridLayout ? 0 : rnd.Next(10, 30))
00090                                 //Description = k.ToString()
00091                             }));
00092                         rootRepeater.ItemsSource = _flatData;
00093                         break;
00094                     case 1:
00095                         _oneLevelNestedData = new ObservableCollection<RecipeGroup>(Enumerable.Range(0, 10).Select(j =>
00096                             new RecipeGroup(
00097                                 Enumerable.Range(0, rnd.Next(5, 16)).Select(k =>
00098                                          new Recipe
00099                                          {
00100                                              ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00101                                              Description = string.Format("{0}.{1} - {2}", j, k, _lorem.Substring(0, level1Layout is StackLayout ? rnd.Next(200, 650) : level1Layout is UniformGridLayout ? 0 : rnd.Next(10, 30)))
00102                                          }))
00103                             {
00104                                 Name = "Group #" + j
00105                             }));
00106                         rootRepeater.ItemsSource = _oneLevelNestedData;
00107                         break;
00108                     case 2:
00109                         _twoLevelNestedData = new ObservableCollection<Year>(Enumerable.Range(0, 3).Select(i => new Year(
00110                             new ObservableCollection<RecipeGroup>(Enumerable.Range(0, rnd.Next(2, 5)).Select(j => new RecipeGroup(
00111                                 Enumerable.Range(0, rnd.Next(5, 16)).Select(k =>
00112                                          new Recipe
00113                                          {
00114                                              ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00115                                              Description = string.Format("{0}.{1}.{2} - {3}", 2016 - i, j, k, _lorem.Substring(0, level2Layout is StackLayout ? rnd.Next(200, 650) : level2Layout is UniformGridLayout ? 0 : rnd.Next(10, 30)))
00116                                          }))
00117                             {
00118                                 Name = "Group #" + j
00119                             })))
00120                         {
00121                             Value = 2016 - i
00122                         }));
00123                         rootRepeater.ItemsSource = _twoLevelNestedData;
00124                         break;
00125                 }
00126             }
00127         }
00128
00129         private void OnResizeMeButtonClick(object sender, RoutedEventArgs e)
00130         {
00131             var button = (Button)sender;
00132             button.Height = 5000 - button.Height;
00133         }
00134
00135         private void OnMaintainViewportSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00136         {
00137             tracker.HorizontalAnchorRatio = maintainViewportSlider.Value;
00138         }
00139
00140         private void OnRowSpacingSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00141         {
00142             if (_pageInfo.Level0Layout != null)
00143             {
00144                 LayoutHelper.SetMinRowSpacing(_pageInfo.Level0Layout, rowSpacingSlider.Value); ;
00145             }
00146
00147             if (_pageInfo.Level1Layout != null)
00148             {
00149                 LayoutHelper.SetMinRowSpacing(_pageInfo.Level1Layout, rowSpacingSlider.Value);
00150             }
00151
00152             if (_pageInfo.Level2Layout != null)
00153             {
00154                 LayoutHelper.SetMinRowSpacing(_pageInfo.Level2Layout, rowSpacingSlider.Value);
00155             }
00156         }
00157         private void OnMaxRowsOrColumnsSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00158         {
00159             if (_pageInfo.Level0Layout != null)
00160             {
00161                 LayoutHelper.SetMaxRowsOrColumns(_pageInfo.Level0Layout, (int)(maxRowsOrColumnsSlider.Value));
00162             }
00163         }
00164
00165         private void OnColumnSpacingSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00166         {
00167             if (_pageInfo.Level0Layout != null)
00168             {
00169                 LayoutHelper.SetMinColumnSpacing(_pageInfo.Level0Layout, colSpacingSlider.Value);
00170             }
00171
00172             if (_pageInfo.Level1Layout != null)
00173             {
00174                 LayoutHelper.SetMinColumnSpacing(_pageInfo.Level1Layout, colSpacingSlider.Value);
00175             }
00176
00177             if (_pageInfo.Level2Layout != null)
00178             {
00179                 LayoutHelper.SetMinColumnSpacing(_pageInfo.Level2Layout, colSpacingSlider.Value);
00180             }
00181         }
00182
00183         private void LineAlignmentComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00184         {
00185             var alignment = (lineAlignmentComboBox.SelectedItem as ComboBoxItem).Content.ToString();
00186             if (_pageInfo.Level0Layout != null)
00187             {
00188                 LayoutHelper.SetLineAlignment(_pageInfo.Level0Layout, alignment);
00189             }
00190
00191             if (_pageInfo.Level1Layout != null)
00192             {
00193                 LayoutHelper.SetLineAlignment(_pageInfo.Level1Layout, alignment);
00194             }
00195
00196             if (_pageInfo.Level2Layout != null)
00197             {
00198                 LayoutHelper.SetLineAlignment(_pageInfo.Level2Layout, alignment);
00199             }
00200         }
00201
00202         private void ItemsStretchComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00203         {
00204             var alignment = (itemsStretchComboBox.SelectedItem as ComboBoxItem).Content.ToString();
00205             if (_pageInfo.Level0Layout != null)
00206             {
00207                 LayoutHelper.SetItemsStretch(_pageInfo.Level0Layout, alignment);
00208             }
00209
00210             if (_pageInfo.Level1Layout != null)
00211             {
00212                 LayoutHelper.SetItemsStretch(_pageInfo.Level1Layout, alignment);
00213             }
00214
00215             if (_pageInfo.Level2Layout != null)
00216             {
00217                 LayoutHelper.SetItemsStretch(_pageInfo.Level2Layout, alignment);
00218             }
00219         }
00220
00221         private void OnLayoutUpdated(object sender, object e)
00222         {
00223             //Logger.WriteLine("---------------------- layout updated ---------------------");
00224         }
00225
00226         private void OnRendering(object sender, object e)
00227         {
00228             //Logger.WriteLine("----------------------- on rendering ----------------------");
00229         }
00230
00231         private void OnScrollButtonClicked(object sender, RoutedEventArgs e)
00232         {
00233             var indexPath = scrollIndex.Text.Split('.').Select(i => int.Parse(i)).ToArray();
00234             var repeater = rootRepeater;
00235
00236             for (int i = 0; i < indexPath.Length; ++i)
00237             {
00238                 var container = repeater.GetOrCreateElement(indexPath[i]);
00239
00240                 if (i < indexPath.Length - 1)
00241                 {
00242                     repeater = container.FindVisualChildByType<ItemsRepeater>();
00243                 }
00244                 else
00245                 {
00246                     container.StartBringIntoView(new BringIntoViewOptions()
00247                     {
00248                         HorizontalAlignmentRatio = 0.5,
00249                         VerticalAlignmentRatio = maintainViewportSlider.Value,
00250                         HorizontalOffset = 0.0,
00251                         VerticalOffset = scrollOffset.Value,
00252                         AnimationDesired = scrollAnimate.IsChecked.GetValueOrDefault()
00253                     });
00254                 }
00255             }
00256
00257         }
00258
00259         private void OnRecipeDeleted(object sender, RoutedEventArgs e)
00260         {
00261             if (_flatData != null)
00262             {
00263                 // walk up the tree to find the container and repeater.
00264                 var container = (FrameworkElement)sender;
00265                 while (!(container.Parent is ItemsRepeater))
00266                 {
00267                     container = (FrameworkElement)container.Parent;
00268                 }
00269
00270                 ItemsRepeater repeater = (ItemsRepeater)container.Parent;
00271                 int index = repeater.GetElementIndex(container);
00272                 _flatData.RemoveAt(index);
00273             }
00274         }
00275
00276         private void OnRecipeInserted(object sender, RoutedEventArgs e)
00277         {
00278             if (_flatData != null)
00279             {
00280                 // walk up the tree to find the container and repeater.
00281                 var container = (FrameworkElement)sender;
00282                 while (!(container.Parent is ItemsRepeater))
00283                 {
00284                     container = (FrameworkElement)container.Parent;
00285                 }
00286
00287                 ItemsRepeater repeater = (ItemsRepeater)container.Parent;
00288                 int index = repeater.GetElementIndex(container) + 1;
00289                 _flatData.Insert(index, new Recipe()
00290                 {
00291                     ImageUri = new Uri("ms-appx:///Images/recipe0.png"),
00292                     Description = "added recipe",
00293                 });
00294             }
00295         }
00296     }
00297 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/RefreshContainer.cpp Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer

RefreshContainer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006
00007 #include "RefreshContainer.h"
00008 #include "RefreshVisualizer.h"
00009 #include "ScrollViewerIRefreshInfoProviderAdapter.h"
00010 #include "RefreshVisualizerEventArgs.h"
00011 #include "RuntimeProfiler.h"
00012 #include "PTRTracing.h"
00013
00014 #include <DoubleUtil.h>
00015
00016 #define MAX_BFS_DEPTH 10
00017 #define DEFAULT_PULL_DIMENSION_SIZE 100
00018
00019 // Change to 'true' to turn on debugging outputs in Output window
00020 bool PTRTrace::s_IsDebugOutputEnabled{ false };
00021 bool PTRTrace::s_IsVerboseDebugOutputEnabled{ false };
00022
00023 // RefreshContainer is the top level visual in a PTR experience. responsible for displaying its content property along with a RefreshVisualizer,
00024 // in the specified location. It also adapts a member of its contents tree to an IRefreshInfoProvider and attaches it to the
00025 // RefreshVisualizer.
00026 //
00027 // Here is the object map of the PTR experience:
00028 //
00029 //                                          RefreshContainer
00030 //                                          |        |     \
00031 //                                          V     *Visual   \
00032 //                                  ___Adapter_    tree*     \
00033 //                                 /     |     \     |        \
00034 //                                /      V      \    |         \
00035 //                               /  Animation ___\___|_______   \
00036 //                              /    Handler \__  \  |       \   \
00037 //                             |        |       |  | |        |   |
00038 //                             |        V       V  V V        V   V
00039 //                             |   Interaction   Scroll       Refresh
00040 //                             |     Tracker     Viewer       Visualizer
00041 //                              \          \       |          /
00042 //                               \       *owner*   |         /
00043 //                                \          \     V        /
00044 //                                 \          \->Refresh   /
00045 //                                  \__________-> Info <-_/
00046 //                                               Provider
00047 RefreshContainer::~RefreshContainer()
00048 {
00049     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00050     if (auto refreshVisualizer = m_refreshVisualizer.safe_get())
00051     {
00052         refreshVisualizer.SizeChanged(m_refreshVisualizerSizeChangedToken);
00053     }
00054 }
00055
00056 RefreshContainer::RefreshContainer()
00057 {
00058     PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00059
00060     __RP_Marker_ClassById(RuntimeProfiler::ProfId_RefreshContainer);
00061
00062     SetDefaultStyleKey(this);
00063
00064     m_refreshInfoProviderAdapter.set(winrt::make<ScrollViewerIRefreshInfoProviderAdapter>(PullDirection(), nullptr));
00065     m_hasDefaultRefreshInfoProviderAdapter = true;
00066     OnRefreshInfoProviderAdapterChanged();
00067 }
00068
00069 void RefreshContainer::OnApplyTemplate()
00070 {
00071     PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00072     // BEGIN: Populate template children
00073     winrt::IControlProtected thisAsControlProtected = *this;
00074     m_root.set(GetTemplateChildT<winrt::Panel>(L"Root", thisAsControlProtected));
00075     m_refreshVisualizerPresenter.set(GetTemplateChildT<winrt::Panel>(L"RefreshVisualizerPresenter", thisAsControlProtected));
00076     // END: Populate template children
00077
00078     if (m_root)
00079     {
00080         auto rootVisual = winrt::ElementCompositionPreview::GetElementVisual(m_root.get());
00081         rootVisual.Clip(rootVisual.Compositor().CreateInsetClip(0.0f, 0.0f, 0.0f, 0.0f));
00082     }
00083
00084     m_refreshVisualizer.set(Visualizer());
00085     if (!m_refreshVisualizer)
00086     {
00087         Visualizer(winrt::RefreshVisualizer());
00088         m_hasDefaultRefreshVisualizer = true;
00089     }
00090     else
00091     {
00092         OnRefreshVisualizerChangedImpl();
00093         m_hasDefaultRefreshVisualizer = false;
00094     }
00095
00096     m_refreshPullDirection = PullDirection();
00097     OnPullDirectionChangedImpl();
00098 }
00099
00100 void RefreshContainer::RequestRefresh()
00101 {
00102     PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00103     if (m_refreshVisualizer)
00104     {
00105         m_refreshVisualizer.get().RequestRefresh();
00106     }
00107 }
00108
00109 //Privates
00110 void RefreshContainer::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00111 {
00112     winrt::IDependencyProperty property = args.Property();
00113     if (property == s_VisualizerProperty)
00114     {
00115         OnRefreshVisualizerChanged(args);
00116     }
00117     else if (property == s_PullDirectionProperty)
00118     {
00119         OnPullDirectionChanged(args);
00120     }
00121 }
00122
00123 void RefreshContainer::OnRefreshVisualizerChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00124 {
00125     PTR_TRACE_INFO(*this, TRACE_MSG_METH_PTR_PTR, METH_NAME, this, args.OldValue(), args.NewValue());
00126     if (m_refreshVisualizer && m_refreshVisualizerSizeChangedToken.value != 0)
00127     {
00128         m_refreshVisualizer.get().SizeChanged(m_refreshVisualizerSizeChangedToken);
00129     }
00130
00131     m_refreshVisualizer.set(Visualizer());
00132     m_hasDefaultRefreshVisualizer = false;
00133     OnRefreshVisualizerChangedImpl();
00134 }
00135
00136 void RefreshContainer::OnRefreshVisualizerChangedImpl()
00137 {
00138     if (m_refreshVisualizerPresenter)
00139     {
00140         m_refreshVisualizerPresenter.get().Children().Clear();
00141         if (m_refreshVisualizer)
00142         {
00143             m_refreshVisualizerPresenter.get().Children().Append(m_refreshVisualizer.get());
00144         }
00145     }
00146
00147     if (m_refreshVisualizer)
00148     {
00149         m_refreshVisualizer.get().SizeChanged({ this, &RefreshContainer::OnVisualizerSizeChanged });
00150         m_refreshVisualizer.get().RefreshRequested({ this, &RefreshContainer::OnVisualizerRefreshRequested });
00151     }
00152 }
00153
00154 void RefreshContainer::OnPullDirectionChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00155 {
00156     PTR_TRACE_INFO(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, args.OldValue(), args.NewValue());
00157     m_refreshPullDirection = PullDirection();
00158     OnPullDirectionChangedImpl();
00159 }
00160
00161 void RefreshContainer::OnPullDirectionChangedImpl()
00162 {
00163     if (m_refreshVisualizerPresenter)
00164     {
00165         switch (m_refreshPullDirection)
00166         {
00167         case winrt::RefreshPullDirection::TopToBottom:
00168             m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Top);
00169             m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Stretch);
00170             if (m_hasDefaultRefreshVisualizer)
00171             {
00172                 m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::TopToBottom);
00173                 m_refreshVisualizer.get().Height(DEFAULT_PULL_DIMENSION_SIZE);
00174                 m_refreshVisualizer.get().Width(DoubleUtil::NaN);
00175             }
00176             break;
00177         case winrt::RefreshPullDirection::LeftToRight:
00178             m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Stretch);
00179             m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Left);
00180             if (m_hasDefaultRefreshVisualizer)
00181             {
00182                 m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::LeftToRight);
00183                 m_refreshVisualizer.get().Height(DoubleUtil::NaN);
00184                 m_refreshVisualizer.get().Width(DEFAULT_PULL_DIMENSION_SIZE);
00185             }
00186             break;
00187         case winrt::RefreshPullDirection::RightToLeft:
00188             m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Stretch);
00189             m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Right);
00190             if (m_hasDefaultRefreshVisualizer)
00191             {
00192                 m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::RightToLeft);
00193                 m_refreshVisualizer.get().Height(DoubleUtil::NaN);
00194                 m_refreshVisualizer.get().Width(DEFAULT_PULL_DIMENSION_SIZE);
00195             }
00196             break;
00197         case winrt::RefreshPullDirection::BottomToTop:
00198             m_refreshVisualizerPresenter.get().VerticalAlignment(winrt::VerticalAlignment::Bottom);
00199             m_refreshVisualizerPresenter.get().HorizontalAlignment(winrt::HorizontalAlignment::Stretch);
00200             if (m_hasDefaultRefreshVisualizer)
00201             {
00202                 m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().SetInternalPullDirection(winrt::RefreshPullDirection::BottomToTop);
00203                 m_refreshVisualizer.get().Height(DEFAULT_PULL_DIMENSION_SIZE);
00204                 m_refreshVisualizer.get().Width(DoubleUtil::NaN);
00205             }
00206             break;
00207         default:
00208             MUX_ASSERT(false);
00209         }
00210
00211         //If we have changed the PullDirection but the Adapter wont be updated by the size changed handler.
00212         if (m_hasDefaultRefreshInfoProviderAdapter &&
00213             m_hasDefaultRefreshVisualizer &&
00214             m_refreshVisualizer.get().ActualHeight() == DEFAULT_PULL_DIMENSION_SIZE &&
00215             m_refreshVisualizer.get().ActualWidth() == DEFAULT_PULL_DIMENSION_SIZE)
00216         {
00217             m_refreshInfoProviderAdapter.set(winrt::make<ScrollViewerIRefreshInfoProviderAdapter>(PullDirection(), nullptr));
00218             OnRefreshInfoProviderAdapterChanged();
00219         }
00220
00221     }
00222 }
00223
00224 void RefreshContainer::OnRefreshInfoProviderAdapterChanged()
00225 {
00226     if (m_root)
00227     {
00228         winrt::IRefreshInfoProvider firstChildAsInfoProvider = m_root.get().Children().GetAt(0).try_as<winrt::IRefreshInfoProvider>();
00229         if (firstChildAsInfoProvider)
00230         {
00231             m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().InfoProvider(firstChildAsInfoProvider);
00232         }
00233         else
00234         {
00235             winrt::IRefreshInfoProvider adaptFromTreeResult = nullptr;
00236             if (m_refreshInfoProviderAdapter)
00237             {
00238                 adaptFromTreeResult = m_refreshInfoProviderAdapter.get().AdaptFromTree(m_root.get(), m_refreshVisualizer.get().RenderSize());
00239                 if (adaptFromTreeResult)
00240                 {
00241                     m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().InfoProvider(adaptFromTreeResult);
00242                     m_refreshInfoProviderAdapter.get().SetAnimations(m_refreshVisualizer.get());
00243                 }
00244             }
00245             if (!adaptFromTreeResult)
00246             {
00247                 m_refreshVisualizer.get().as<winrt::IRefreshVisualizerPrivate>().InfoProvider(SearchTreeForIRefreshInfoProvider());
00248             }
00249         }
00250     }
00251 }
00252
00253 winrt::IRefreshInfoProvider RefreshContainer::SearchTreeForIRefreshInfoProvider()
00254 {
00255     PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00256     if (m_root)
00257     {
00258         winrt::IRefreshInfoProvider rootAsIRIP = m_root.try_as<winrt::IRefreshInfoProvider>();
00259         int depth = 0;
00260         if (rootAsIRIP)
00261         {
00262             return rootAsIRIP;
00263         }
00264         else
00265         {
00266             while (depth < MAX_BFS_DEPTH)
00267             {
00268                 winrt::IRefreshInfoProvider result = SearchTreeForIRefreshInfoProviderRecursiveHelper(m_root.get(), depth);
00269                 if (result)
00270                 {
00271                     return result;
00272                     break;
00273                 }
00274                 depth++;
00275             }
00276         }
00277     }
00278
00279     return nullptr;
00280 }
00281
00282 winrt::IRefreshInfoProvider RefreshContainer::SearchTreeForIRefreshInfoProviderRecursiveHelper(winrt::DependencyObject root, int depth)
00283 {
00284     PTR_TRACE_INFO(*this, TRACE_MSG_METH_INT, METH_NAME, this, depth);
00285     const int numChildren = winrt::VisualTreeHelper::GetChildrenCount(root);
00286     if (depth == 0)
00287     {
00288         for (int i = 0; i < numChildren; i++)
00289         {
00290             winrt::DependencyObject childObject = winrt::VisualTreeHelper::GetChild(root, i);
00291             winrt::IRefreshInfoProvider childObjectAsIRIP = childObject.try_as<winrt::IRefreshInfoProvider>();
00292             if (childObjectAsIRIP)
00293             {
00294                 return childObjectAsIRIP;
00295             }
00296         }
00297         return nullptr;
00298     }
00299     else
00300     {
00301         for (int i = 0; i < numChildren; i++)
00302         {
00303             winrt::DependencyObject childObject = winrt::VisualTreeHelper::GetChild(root, i);
00304             winrt::IRefreshInfoProvider recursiveResult = SearchTreeForIRefreshInfoProviderRecursiveHelper(childObject, depth - 1);
00305             if (recursiveResult)
00306             {
00307                 return recursiveResult;
00308             }
00309         }
00310         return nullptr;
00311     }
00312 }
00313
00314 void RefreshContainer::OnVisualizerSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& args)
00315 {
00316     PTR_TRACE_INFO(*this, TRACE_MSG_METH_FLT_FLT_FLT_FLT, METH_NAME, this, args.PreviousSize().Width, args.PreviousSize().Height, args.NewSize().Width, args.NewSize().Height);
00317     if (m_hasDefaultRefreshInfoProviderAdapter)
00318     {
00319         m_refreshInfoProviderAdapter.set(winrt::make<ScrollViewerIRefreshInfoProviderAdapter>(PullDirection(), nullptr));
00320         OnRefreshInfoProviderAdapterChanged();
00321     }
00322 }
00323
00324 void RefreshContainer::OnVisualizerRefreshRequested(const winrt::IInspectable& /*sender*/, const winrt::RefreshRequestedEventArgs& args)
00325 {
00326     PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00327     m_visualizerRefreshCompletedDeferral.set(args.GetDeferral());
00328     RaiseRefreshRequested();
00329 }
00330
00331 void RefreshContainer::RaiseRefreshRequested()
00332 {
00333     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00334     com_ptr<RefreshContainer> strongThis = get_strong();
00335
00336     winrt::Deferral instance{ [strongThis]()
00337         {
00338             strongThis->CheckThread();
00339             strongThis->RefreshCompleted();
00340         }
00341     };
00342
00343     auto args = winrt::make_self<RefreshRequestedEventArgs>(instance);
00344
00345     //This makes sure that everyone registered for this event can get access to the deferral
00346     //Otherwise someone could complete the deferral before someone else has had a chance to grab it
00347     args->IncrementDeferralCount();
00348     m_refreshRequestedEventSource(*this, *args);
00349     args->DecrementDeferralCount();
00350 }
00351
00352 void RefreshContainer::RefreshCompleted()
00353 {
00354     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00355     if (m_visualizerRefreshCompletedDeferral)
00356     {
00357         m_visualizerRefreshCompletedDeferral.get().Complete();
00358     }
00359 }
00360
00361 //Private interface implementations
00362 winrt::IRefreshInfoProviderAdapter RefreshContainer::RefreshInfoProviderAdapter()
00363 {
00364     PTR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00365     return m_refreshInfoProviderAdapter.get();
00366 }
00367
00368 void RefreshContainer::RefreshInfoProviderAdapter(winrt::IRefreshInfoProviderAdapter const& value)
00369 {
00370     PTR_TRACE_INFO(*this, TRACE_MSG_METH_PTR, METH_NAME, this, value);
00371     m_refreshInfoProviderAdapter.set(value);
00372     m_hasDefaultRefreshInfoProviderAdapter = false;
00373     OnRefreshInfoProviderAdapterChanged();
00374 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewRS3Page Member List

This is the complete list of members for NavigationViewRS3Page, including all inherited members.
ChangeTestFrameVisibility(Visibility visibility) | NavigationViewRS3Page | [inline, private]
GetToggleButtonRowHeight_Click(object sender, RoutedEventArgs e) | NavigationViewRS3Page | [inline, private]
GetTopPaddingHeight_Click(object sender, RoutedEventArgs e) | NavigationViewRS3Page | [inline, private]
NavigationViewRS3Page() | NavigationViewRS3Page | [inline]
OnLoaded(object sender, RoutedEventArgs e) | NavigationViewRS3Page | [inline, private]
TestFrameCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS3Page | [inline, private]
TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS3Page | [inline, private]
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SplitButtonAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

SplitButtonAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SplitButtonAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(SplitButtonAutomationPeer)
00012 }
00013
00014 #include "SplitButtonAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.cpp Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedGlobalNavigationButtonVisualSource.cpp

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedGlobalNavigationButtonVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedGlobalNavigationButtonVisualSource.json (37639 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 // ____________________________________
00022 // |       Object stats       | Count |
00023 // |__________________________|_______|
00024 // | All CompositionObjects   |   129 |
00025 // |--------------------------+-------|
00026 // | Expression animators     |     9 |
00027 // | KeyFrame animators       |     8 |
00028 // | Reference parameters     |     9 |
00029 // | Expression operations    |     4 |
00030 // |--------------------------+-------|
00031 // | Animated brushes         |     1 |
00032 // | Animated gradient stops  |     - |
00033 // | ExpressionAnimations     |     2 |
00034 // | PathKeyFrameAnimations   |     - |
00035 // |--------------------------+-------|
00036 // | ContainerVisuals         |     3 |
00037 // | ShapeVisuals             |     2 |
00038 // |--------------------------+-------|
00039 // | ContainerShapes          |     3 |
00040 // | CompositionSpriteShapes  |    18 |
00041 // |--------------------------+-------|
00042 // | Brushes                  |     1 |
00043 // | Gradient stops           |     - |
00044 // | CompositionVisualSurface |     - |
00045 // ------------------------------------
00046 #include "pch.h"
00047 #include "AnimatedVisuals\AnimatedGlobalNavigationButtonVisualSource.h"
00048 #include <winrt/Windows.Foundation.Metadata.h>
00049 #include <winrt/Windows.Foundation.Collections.h>
00050 #include <winrt/Microsoft.UI.Composition.h>
00051 #include "d2d1.h"
00052 #include <d2d1_1.h>
00053 #include <d2d1helper.h>
00054 #include <Windows.Graphics.Interop.h>
00055 #include <Windows.Graphics.Effects.Interop.h>
00056 #include <winrt/Windows.Graphics.Effects.h>
00057
00058 using namespace winrt::Microsoft::UI::Xaml::Controls;
00059 using namespace winrt::Windows::Foundation;
00060 using namespace winrt::Windows::Foundation::Numerics;
00061 using namespace winrt::Windows::Graphics;
00062 using namespace winrt::Windows::UI;
00063 using namespace winrt::Microsoft::UI::Composition;
00064 using TimeSpan = winrt::Windows::Foundation::TimeSpan;
00065
00066
00067 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00068 {
00069 CppWinRTActivatableClassWithBasicFactory(AnimatedGlobalNavigationButtonVisualSource)
00070 }
00071 #include "AnimatedVisuals\AnimatedGlobalNavigationButtonVisualSource.g.cpp"
00072 class CanvasGeometry : public winrt::implements<CanvasGeometry,
00073     IGeometrySource2D,
00074     ::ABI::Windows::Graphics::IGeometrySource2DInterop>
00075 {
00076     winrt::com_ptr<ID2D1Geometry> _geometry{ nullptr };
00077
00078 public:
00079     CanvasGeometry(winrt::com_ptr<ID2D1Geometry> geometry)
00080         : _geometry{ geometry }
00081     { }
00082
00083     // IGeometrySource2D.
00084     winrt::com_ptr<ID2D1Geometry> Geometry() { return _geometry; }
00085
00086     // IGeometrySource2DInterop.
00087     IFACEMETHODIMP GetGeometry(ID2D1Geometry** value) override
00088     {
00089         _geometry.copy_to(value);
00090         return S_OK;
00091     }
00092
00093     // IGeometrySource2DInterop.
00094     IFACEMETHODIMP TryGetGeometryUsingFactory(ID2D1Factory*, ID2D1Geometry**) override
00095     {
00096         return E_NOTIMPL;
00097     }
00098 };
00099 class AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual : public winrt::implements<AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual,
00100         winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual,
00101         IClosable>
00102 {
00103     winrt::com_ptr<ID2D1Factory> _d2dFactory{ nullptr };
00104     static constexpr int64_t c_durationTicks{ 13333333L };
00105     Compositor const _c{ nullptr };
00106     ExpressionAnimation const _reusableExpressionAnimation{ nullptr };
00107     CompositionPropertySet const _themeProperties{ nullptr };
00108     CompositionColorBrush _themeColor_Foreground{ nullptr };
00109     CompositionPathGeometry _pathGeometry_00{ nullptr };
00110     CompositionPathGeometry _pathGeometry_01{ nullptr };
00111     CompositionPathGeometry _pathGeometry_02{ nullptr };
00112     CompositionPathGeometry _pathGeometry_03{ nullptr };
00113     CompositionPathGeometry _pathGeometry_04{ nullptr };
00114     CompositionPathGeometry _pathGeometry_05{ nullptr };
00115     ContainerVisual _root{ nullptr };
00116     CubicBezierEasingFunction _cubicBezierEasingFunction_0{ nullptr };
00117     CubicBezierEasingFunction _cubicBezierEasingFunction_1{ nullptr };
00118     CubicBezierEasingFunction _cubicBezierEasingFunction_2{ nullptr };
00119     CubicBezierEasingFunction _cubicBezierEasingFunction_3{ nullptr };
00120     ExpressionAnimation _rootProgress{ nullptr };
00121     InsetClip _insetClip_0{ nullptr };
00122     StepEasingFunction _holdThenStepEasingFunction{ nullptr };
00123     StepEasingFunction _stepThenHoldEasingFunction{ nullptr };
00124
00125     static void StartProgressBoundAnimation(
00126         CompositionObject target,
00127         winrt::hstring animatedPropertyName,
00128         CompositionAnimation animation,
00129         ExpressionAnimation controllerProgressExpression)
00130     {
00131         target.StartAnimation(animatedPropertyName, animation);
00132         const auto controller = target.TryGetAnimationController(animatedPropertyName);
00133         controller.Pause();
00134         controller.StartAnimation(L"Progress", controllerProgressExpression);
00135     }
00136
00137     void BindProperty(
00138         CompositionObject target,
00139         winrt::hstring animatedPropertyName,
00140         winrt::hstring expression,
00141         winrt::hstring referenceParameterName,
00142         CompositionObject referencedObject)
00143     {
00144         _reusableExpressionAnimation.ClearAllParameters();
00145         _reusableExpressionAnimation.Expression(expression);
00146         _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00147         target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00148     }
00149
00150     BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation(float initialProgress, bool initialValue)
00151     {
00152         const auto result = _c.CreateBooleanKeyFrameAnimation();
00153         result.Duration(TimeSpan{ c_durationTicks });
00154         result.InsertKeyFrame(initialProgress, initialValue);
00155         return result;
00156     }
00157
00158     ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00159     {
00160         const auto result = _c.CreateScalarKeyFrameAnimation();
00161         result.Duration(TimeSpan{ c_durationTicks });
00162         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00163         return result;
00164     }
00165
00166     Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
00167     {
00168         const auto result = _c.CreateVector2KeyFrameAnimation();
00169         result.Duration(TimeSpan{ c_durationTicks });
00170         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00171         return result;
00172     }
00173
00174     CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush)
00175     {
00176         const auto result = _c.CreateSpriteShape(geometry);
00177         result.TransformMatrix(transformMatrix);
00178         result.FillBrush(fillBrush);
00179         return result;
00180     }
00181
00182     // PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00183     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00184     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00185     BooleanKeyFrameAnimation IsVisibleBooleanAnimation_0()
00186     {
00187         // Frame 10.
00188         const auto result = CreateBooleanKeyFrameAnimation(0.125F, true);
00189         return result;
00190     }
00191
00192     // PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02 -
00193     // Hamburger - 03 - PointerOverToNormal
00194     BooleanKeyFrameAnimation IsVisibleBooleanAnimation_1()
00195     {
00196         // Frame 30.
00197         const auto result = CreateBooleanKeyFrameAnimation(0.375F, false);
00198         return result;
00199     }
00200
00201     winrt::com_ptr<CanvasGeometry> Geometry_00()
00202     {
00203         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00204         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00205         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00206         winrt::check_hresult(path->Open(sink.put()));
00207         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00208         sink->BeginFigure({ 7.5F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00209         sink->AddBezier({ { 7.63500023F, 0.5F }, { 7.75299978F, 0.451000005F }, { 7.85200024F, 0.351999998F } });
00210         sink->AddBezier({ { 7.95100021F, 0.252999991F }, { 8.0F, 0.135000005F }, { 8.0F, 0.0F } });
00211         sink->AddBezier({ { 8.0F, -0.135000005F }, { 7.95100021F, -0.252999991F }, { 7.85200024F, -0.351999998F } });
00212         sink->AddBezier({ { 7.75299978F, -0.451000005F }, { 7.63500023F, -0.5F }, { 7.5F, -0.5F } });
00213         sink->AddLine({ 7.5F, 0.5F });
00214         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00215         winrt::check_hresult(sink->Close());
00216         auto result = winrt::make_self<CanvasGeometry>(path);
00217         return result;
00218     }
00219
00220     winrt::com_ptr<CanvasGeometry> Geometry_01()
00221     {
00222         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00223         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00224         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00225         winrt::check_hresult(path->Open(sink.put()));
00226         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00227         sink->BeginFigure({ 7.5F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
00228         sink->AddLine({ 7.5F, 0.513000011F });
00229         sink->AddBezier({ { 7.63500023F, 0.513000011F }, { 7.75299978F, 0.463F }, { 7.85200024F, 0.363999993F } });
00230         sink->AddBezier({ { 7.95100021F, 0.264999986F }, { 8.0F, 0.148000002F }, { 8.0F, 0.0130000003F } });
00231         sink->AddBezier({ { 8.0F, -0.122000001F }, { 7.95100021F, -0.239999995F }, { 7.85200024F, -0.338999987F } });
00232         sink->AddBezier({ { 7.75299978F, -0.437999994F }, { 7.63500023F, -0.486999989F }, { 7.5F, -0.486999989F } });
00233         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00234         winrt::check_hresult(sink->Close());
00235         auto result = winrt::make_self<CanvasGeometry>(path);
00236         return result;
00237     }
00238
00239     winrt::com_ptr<CanvasGeometry> Geometry_02()
00240     {
00241         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00242         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00243         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00244         winrt::check_hresult(path->Open(sink.put()));
00245         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00246         sink->BeginFigure({ 7.5F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00247         sink->AddLine({ 7.5F, 0.5F });
00248         sink->AddBezier({ { 7.63500023F, 0.5F }, { 7.75299978F, 0.451000005F }, { 7.85200024F, 0.351999998F } });
00249         sink->AddBezier({ { 7.95100021F, 0.252999991F }, { 8.0F, 0.135000005F }, { 8.0F, 0.0F } });
00250         sink->AddBezier({ { 8.0F, -0.135000005F }, { 7.95100021F, -0.252999991F }, { 7.85200024F, -0.351999998F } });
00251         sink->AddBezier({ { 7.75299978F, -0.451000005F }, { 7.63500023F, -0.5F }, { 7.5F, -0.5F } });
00252         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00253         winrt::check_hresult(sink->Close());
00254         auto result = winrt::make_self<CanvasGeometry>(path);
00255         return result;
00256     }
00257
00258     winrt::com_ptr<CanvasGeometry> Geometry_03()
00259     {
00260         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00261         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00262         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00263         winrt::check_hresult(path->Open(sink.put()));
00264         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00265         sink->BeginFigure({ -7.5F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00266         sink->AddLine({ -7.5F, -0.5F });
00267         sink->AddBezier({ { -7.63500023F, -0.5F }, { -7.75299978F, -0.451000005F }, { -7.85200024F, -0.351999998F } });
00268         sink->AddBezier({ { -7.95100021F, -0.252999991F }, { -8.0F, -0.135000005F }, { -8.0F, 0.0F } });
00269         sink->AddBezier({ { -8.0F, 0.135000005F }, { -7.95100021F, 0.252999991F }, { -7.85200024F, 0.351999998F } });
00270         sink->AddBezier({ { -7.75299978F, 0.451000005F }, { -7.63500023F, 0.5F }, { -7.5F, 0.5F } });
00271         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00272         winrt::check_hresult(sink->Close());
00273         auto result = winrt::make_self<CanvasGeometry>(path);
00274         return result;
00275     }
00276
00277     winrt::com_ptr<CanvasGeometry> Geometry_04()
00278     {
00279         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00280         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00281         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00282         winrt::check_hresult(path->Open(sink.put()));
00283         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00284         sink->BeginFigure({ -7.5F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
00285         sink->AddBezier({ { -7.63500023F, -0.486999989F }, { -7.75299978F, -0.437999994F }, { -7.85200024F, -0.338999987F } });
00286         sink->AddBezier({ { -7.95100021F, -0.239999995F }, { -8.0F, -0.122000001F }, { -8.0F, 0.0130000003F } });
00287         sink->AddBezier({ { -8.0F, 0.148000002F }, { -7.95100021F, 0.264999986F }, { -7.85200024F, 0.363999993F } });
00288         sink->AddBezier({ { -7.75299978F, 0.463F }, { -7.63500023F, 0.513000011F }, { -7.5F, 0.513000011F } });
00289         sink->AddLine({ -7.5F, -0.486999989F });
00290         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00291         winrt::check_hresult(sink->Close());
00292         auto result = winrt::make_self<CanvasGeometry>(path);
00293         return result;
00294     }
00295
00296     winrt::com_ptr<CanvasGeometry> Geometry_05()
00297     {
00298         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00299         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00300         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00301         winrt::check_hresult(path->Open(sink.put()));
00302         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00303         sink->BeginFigure({ -7.5F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00304         sink->AddBezier({ { -7.63500023F, -0.5F }, { -7.75299978F, -0.451000005F }, { -7.85200024F, -0.351999998F } });
00305         sink->AddBezier({ { -7.95100021F, -0.252999991F }, { -8.0F, -0.135000005F }, { -8.0F, 0.0F } });
00306         sink->AddBezier({ { -8.0F, 0.135000005F }, { -7.95100021F, 0.252999991F }, { -7.85200024F, 0.351999998F } });
00307         sink->AddBezier({ { -7.75299978F, 0.451000005F }, { -7.63500023F, 0.5F }, { -7.5F, 0.5F } });
00308         sink->AddLine({ -7.5F, -0.5F });
00309         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00310         winrt::check_hresult(sink->Close());
00311         auto result = winrt::make_self<CanvasGeometry>(path);
00312         return result;
00313     }
00314
00315     // - - - - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls
00316     // - 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00317     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00318     // - - - - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed
00319     // Controls - 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger -
00320     // 05 - PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00321     // - - - Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00322     // - - ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
00323     winrt::com_ptr<CanvasGeometry> Geometry_06()
00324     {
00325         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00326         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00327         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00328         winrt::check_hresult(path->Open(sink.put()));
00329         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00330         sink->BeginFigure({ -7.60599995F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00331         sink->AddLine({ 7.70100021F, 0.5F });
00332         sink->AddLine({ 7.70100021F, -0.5F });
00333         sink->AddLine({ -7.60599995F, -0.5F });
00334         sink->AddLine({ -7.60599995F, 0.5F });
00335         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00336         winrt::check_hresult(sink->Close());
00337         auto result = winrt::make_self<CanvasGeometry>(path);
00338         return result;
00339     }
00340
00341     // - - - - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls
00342     // - 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00343     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00344     // - - - - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed
00345     // Controls - 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger -
00346     // 05 - PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00347     // - - - Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00348     // - - ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
00349     winrt::com_ptr<CanvasGeometry> Geometry_07()
00350     {
00351         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00352         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00353         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00354         winrt::check_hresult(path->Open(sink.put()));
00355         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00356         sink->BeginFigure({ 7.70100021F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
00357         sink->AddLine({ -7.60599995F, -0.486999989F });
00358         sink->AddLine({ -7.60599995F, 0.513000011F });
00359         sink->AddLine({ 7.70100021F, 0.513000011F });
00360         sink->AddLine({ 7.70100021F, -0.486999989F });
00361         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00362         winrt::check_hresult(sink->Close());
00363         auto result = winrt::make_self<CanvasGeometry>(path);
00364         return result;
00365     }
00366
00367     // - - - - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls
00368     // - 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00369     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00370     // - - - - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed
00371     // Controls - 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger -
00372     // 05 - PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00373     // - - - Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00374     // - - ShapeGroup: Group 1 Group 1 Group 1 Group 1
00375     winrt::com_ptr<CanvasGeometry> Geometry_08()
00376     {
00377         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00378         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00379         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00380         winrt::check_hresult(path->Open(sink.put()));
00381         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00382         sink->BeginFigure({ 7.70100021F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00383         sink->AddLine({ -7.60500002F, -0.5F });
00384         sink->AddLine({ -7.60500002F, 0.5F });
00385         sink->AddLine({ 7.70100021F, 0.5F });
00386         sink->AddLine({ 7.70100021F, -0.5F });
00387         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00388         winrt::check_hresult(sink->Close());
00389         auto result = winrt::make_self<CanvasGeometry>(path);
00390         return result;
00391     }
00392
00393     // - - - - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver
00394     // Controls - 02 - Hamburger - 03 - PointerOverToNormal
00395     // - - - Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver
00396     // Controls - 02 - Hamburger - 03 - PointerOverToNormal
00397     // - - Layer: Right Caps 2 Right Caps 2
00398     winrt::com_ptr<CanvasGeometry> Geometry_09()
00399     {
00400         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00401         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00402         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00403         winrt::check_hresult(path->Open(sink.put()));
00404         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00405         sink->BeginFigure({ -7.5999999F, 0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00406         sink->AddLine({ 7.6960001F, 0.5F });
00407         sink->AddLine({ 7.6960001F, -0.5F });
00408         sink->AddLine({ -7.5999999F, -0.5F });
00409         sink->AddLine({ -7.5999999F, 0.5F });
00410         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00411         winrt::check_hresult(sink->Close());
00412         auto result = winrt::make_self<CanvasGeometry>(path);
00413         return result;
00414     }
00415
00416     // - - - - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver
00417     // Controls - 02 - Hamburger - 03 - PointerOverToNormal
00418     // - - - Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver
00419     // Controls - 02 - Hamburger - 03 - PointerOverToNormal
00420     // - - Layer: Right Caps 2 Right Caps 2
00421     winrt::com_ptr<CanvasGeometry> Geometry_10()
00422     {
00423         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00424         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00425         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00426         winrt::check_hresult(path->Open(sink.put()));
00427         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00428         sink->BeginFigure({ 7.6960001F, -0.486999989F }, D2D1_FIGURE_BEGIN_FILLED);
00429         sink->AddLine({ -7.5999999F, -0.486999989F });
00430         sink->AddLine({ -7.5999999F, 0.513000011F });
00431         sink->AddLine({ 7.6960001F, 0.513000011F });
00432         sink->AddLine({ 7.6960001F, -0.486999989F });
00433         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00434         winrt::check_hresult(sink->Close());
00435         auto result = winrt::make_self<CanvasGeometry>(path);
00436         return result;
00437     }
00438
00439     // - - - - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver
00440     // Controls - 02 - Hamburger - 03 - PointerOverToNormal
00441     // - - - Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver
00442     // Controls - 02 - Hamburger - 03 - PointerOverToNormal
00443     // - - Layer: Right Caps 2 Right Caps 2
00444     winrt::com_ptr<CanvasGeometry> Geometry_11()
00445     {
00446         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00447         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00448         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00449         winrt::check_hresult(path->Open(sink.put()));
00450         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00451         sink->BeginFigure({ 7.6960001F, -0.5F }, D2D1_FIGURE_BEGIN_FILLED);
00452         sink->AddLine({ -7.59899998F, -0.5F });
00453         sink->AddLine({ -7.59899998F, 0.5F });
00454         sink->AddLine({ 7.6960001F, 0.5F });
00455         sink->AddLine({ 7.6960001F, -0.5F });
00456         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00457         winrt::check_hresult(sink->Close());
00458         auto result = winrt::make_self<CanvasGeometry>(path);
00459         return result;
00460     }
00461
00462     // Color bound to theme property value: Foreground
00463     CompositionColorBrush ThemeColor_Foreground()
00464     {
00465         const auto result = _themeColor_Foreground = _c.CreateColorBrush();
00466         BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
00467         return result;
00468     }
00469
00470     // - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00471     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00472     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00473     // Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00474     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00475     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00476     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00477     CompositionContainerShape ContainerShape_0()
00478     {
00479         const auto result = _c.CreateContainerShape();
00480         result.CenterPoint({ 7.5F, -5.0F });
00481         result.Scale({ 2.75F, 2.75F });
00482         const auto shapes = result.Shapes();
00483         // ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
00484         shapes.Append(SpriteShape_00());
00485         // ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
00486         shapes.Append(SpriteShape_01());
00487         // ShapeGroup: Group 1 Group 1 Group 1 Group 1
00488         shapes.Append(SpriteShape_02());
00489         StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_0(), RootProgress());
00490         return result;
00491     }
00492
00493     // - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00494     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00495     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00496     // Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00497     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00498     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00499     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00500     CompositionContainerShape ContainerShape_1()
00501     {
00502         const auto result = _c.CreateContainerShape();
00503         result.CenterPoint({ -7.5F, -5.0F });
00504         result.Scale({ 2.75F, 2.75F });
00505         const auto shapes = result.Shapes();
00506         // ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
00507         shapes.Append(SpriteShape_03());
00508         // ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
00509         shapes.Append(SpriteShape_04());
00510         // ShapeGroup: Group 1 Group 1 Group 1 Group 1
00511         shapes.Append(SpriteShape_05());
00512         StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_1(), _rootProgress);
00513         return result;
00514     }
00515
00516     // - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00517     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00518     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00519     // Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00520     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00521     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00522     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00523     CompositionContainerShape ContainerShape_2()
00524     {
00525         const auto result = _c.CreateContainerShape();
00526         result.CenterPoint({ 0.0480000004F, -5.0F });
00527         result.Offset({ 23.9559994F, 29.0F });
00528         const auto shapes = result.Shapes();
00529         // ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
00530         shapes.Append(SpriteShape_06());
00531         // ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
00532         shapes.Append(SpriteShape_07());
00533         // ShapeGroup: Group 1 Group 1 Group 1 Group 1
00534         shapes.Append(SpriteShape_08());
00535         StartProgressBoundAnimation(result, L"Scale.X", ScaleXScalarAnimation_2p749_to_2p749(), _rootProgress);
00536         StartProgressBoundAnimation(result, L"Scale.Y", ScaleYScalarAnimation_2p75_to_2p75(), _rootProgress);
00537         return result;
00538     }
00539
00540     CompositionPathGeometry PathGeometry_00()
00541     {
00542         return _pathGeometry_00 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_00())));
00543     }
00544
00545     CompositionPathGeometry PathGeometry_01()
00546     {
00547         return _pathGeometry_01 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_01())));
00548     }
00549
00550     CompositionPathGeometry PathGeometry_02()
00551     {
00552         return _pathGeometry_02 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_02())));
00553     }
00554
00555     CompositionPathGeometry PathGeometry_03()
00556     {
00557         return _pathGeometry_03 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_03())));
00558     }
00559
00560     CompositionPathGeometry PathGeometry_04()
00561     {
00562         return _pathGeometry_04 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_04())));
00563     }
00564
00565     CompositionPathGeometry PathGeometry_05()
00566     {
00567         return _pathGeometry_05 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_05())));
00568     }
00569
00570     // - - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00571     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00572     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00573     // - - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls -
00574     // 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00575     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00576     // - Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00577     // ShapeGroup: Group 3 Group 3 Group 3 Group 3 Offset:<0, -10>
00578     CompositionPathGeometry PathGeometry_06()
00579     {
00580         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_06())));
00581     }
00582
00583     // - - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00584     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00585     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00586     // - - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls -
00587     // 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00588     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00589     // - Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00590     // ShapeGroup: Group 2 Group 2 Group 2 Group 2 Offset:<0, -4.85>
00591     CompositionPathGeometry PathGeometry_07()
00592     {
00593         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_07())));
00594     }
00595
00596     // - - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00597     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00598     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00599     // - - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls -
00600     // 02 - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00601     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00602     // - Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00603     // ShapeGroup: Group 1 Group 1 Group 1 Group 1
00604     CompositionPathGeometry PathGeometry_08()
00605     {
00606         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_08())));
00607     }
00608
00609     // - - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00610     // 02 - Hamburger - 03 - PointerOverToNormal
00611     // - Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls
00612     // - 02 - Hamburger - 03 - PointerOverToNormal
00613     // Layer: Right Caps 2 Right Caps 2
00614     CompositionPathGeometry PathGeometry_09()
00615     {
00616         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_09())));
00617     }
00618
00619     // - - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00620     // 02 - Hamburger - 03 - PointerOverToNormal
00621     // - Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls
00622     // - 02 - Hamburger - 03 - PointerOverToNormal
00623     // Layer: Right Caps 2 Right Caps 2
00624     CompositionPathGeometry PathGeometry_10()
00625     {
00626         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_10())));
00627     }
00628
00629     // - - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00630     // 02 - Hamburger - 03 - PointerOverToNormal
00631     // - Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls
00632     // - 02 - Hamburger - 03 - PointerOverToNormal
00633     // Layer: Right Caps 2 Right Caps 2
00634     CompositionPathGeometry PathGeometry_11()
00635     {
00636         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_11())));
00637     }
00638
00639     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00640     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00641     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00642     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00643     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00644     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00645     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00646     // Path 1 Path 1 Path 1 Path 1
00647     CompositionSpriteShape SpriteShape_00()
00648     {
00649         // Offset:<0, -10>
00650         const auto geometry = PathGeometry_00();
00651         const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -10.0F }, ThemeColor_Foreground());
00652         return result;
00653     }
00654
00655     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00656     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00657     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00658     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00659     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00660     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00661     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00662     // Path 1 Path 1 Path 1 Path 1
00663     CompositionSpriteShape SpriteShape_01()
00664     {
00665         // Offset:<0, -4.85>
00666         const auto geometry = PathGeometry_01();
00667         const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -4.8499999F }, _themeColor_Foreground);
00668         return result;
00669     }
00670
00671     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00672     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00673     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00674     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00675     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00676     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00677     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00678     // Path 1 Path 1 Path 1 Path 1
00679     CompositionSpriteShape SpriteShape_02()
00680     {
00681         const auto result = _c.CreateSpriteShape(PathGeometry_02());
00682         result.FillBrush(_themeColor_Foreground);
00683         return result;
00684     }
00685
00686     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00687     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00688     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00689     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00690     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00691     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00692     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00693     // Path 1 Path 1 Path 1 Path 1
00694     CompositionSpriteShape SpriteShape_03()
00695     {
00696         // Offset:<0, -10>
00697         const auto geometry = PathGeometry_03();
00698         const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -10.0F }, _themeColor_Foreground);
00699         return result;
00700     }
00701
00702     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00703     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00704     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00705     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00706     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00707     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00708     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00709     // Path 1 Path 1 Path 1 Path 1
00710     CompositionSpriteShape SpriteShape_04()
00711     {
00712         // Offset:<0, -4.85>
00713         const auto geometry = PathGeometry_04();
00714         const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -4.8499999F }, _themeColor_Foreground);
00715         return result;
00716     }
00717
00718     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00719     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00720     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00721     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00722     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00723     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00724     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00725     // Path 1 Path 1 Path 1 Path 1
00726     CompositionSpriteShape SpriteShape_05()
00727     {
00728         const auto result = _c.CreateSpriteShape(PathGeometry_05());
00729         result.FillBrush(_themeColor_Foreground);
00730         return result;
00731     }
00732
00733     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00734     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00735     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00736     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00737     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00738     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00739     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00740     // Path 1 Path 1 Path 1 Path 1
00741     CompositionSpriteShape SpriteShape_06()
00742     {
00743         // Offset:<0, -10>
00744         const auto geometry = PathGeometry_06();
00745         const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -10.0F }, _themeColor_Foreground);
00746         return result;
00747     }
00748
00749     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00750     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00751     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00752     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00753     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00754     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00755     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00756     // Path 1 Path 1 Path 1 Path 1
00757     CompositionSpriteShape SpriteShape_07()
00758     {
00759         // Offset:<0, -4.85>
00760         const auto geometry = PathGeometry_07();
00761         const auto result = CreateSpriteShape(geometry, { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, -4.8499999F }, _themeColor_Foreground);
00762         return result;
00763     }
00764
00765     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00766     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00767     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00768     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
00769     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00770     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00771     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
00772     // Path 1 Path 1 Path 1 Path 1
00773     CompositionSpriteShape SpriteShape_08()
00774     {
00775         const auto result = _c.CreateSpriteShape(PathGeometry_08());
00776         result.FillBrush(_themeColor_Foreground);
00777         return result;
00778     }
00779
00780     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00781     // - Hamburger - 03 - PointerOverToNormal
00782     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00783     // 02 - Hamburger - 03 - PointerOverToNormal
00784     // Path 1 Path 1
00785     CompositionSpriteShape SpriteShape_09()
00786     {
00787         // Offset:<24.383, 10.25>, Scale:<2.75, 2.75>
00788         const auto geometry = _pathGeometry_00;
00789         const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 24.3829994F, 10.25F }, _themeColor_Foreground);
00790         return result;
00791     }
00792
00793     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00794     // - Hamburger - 03 - PointerOverToNormal
00795     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00796     // 02 - Hamburger - 03 - PointerOverToNormal
00797     // Path 1 Path 1
00798     CompositionSpriteShape SpriteShape_10()
00799     {
00800         // Offset:<24.383, 24.4125>, Scale:<2.75, 2.75>
00801         const auto geometry = _pathGeometry_01;
00802         const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 24.3829994F, 24.4125004F }, _themeColor_Foreground);
00803         return result;
00804     }
00805
00806     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00807     // - Hamburger - 03 - PointerOverToNormal
00808     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00809     // 02 - Hamburger - 03 - PointerOverToNormal
00810     // Path 1 Path 1
00811     CompositionSpriteShape SpriteShape_11()
00812     {
00813         // Offset:<24.383, 37.75>, Scale:<2.75, 2.75>
00814         const auto geometry = _pathGeometry_02;
00815         const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 24.3829994F, 37.75F }, _themeColor_Foreground);
00816         return result;
00817     }
00818
00819     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00820     // - Hamburger - 03 - PointerOverToNormal
00821     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00822     // 02 - Hamburger - 03 - PointerOverToNormal
00823     // Path 1 Path 1
00824     CompositionSpriteShape SpriteShape_12()
00825     {
00826         // Offset:<23.629, 10.25>, Scale:<2.75, 2.75>
00827         const auto geometry = _pathGeometry_03;
00828         const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 23.6289997F, 10.25F }, _themeColor_Foreground);
00829         return result;
00830     }
00831
00832     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00833     // - Hamburger - 03 - PointerOverToNormal
00834     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00835     // 02 - Hamburger - 03 - PointerOverToNormal
00836     // Path 1 Path 1
00837     CompositionSpriteShape SpriteShape_13()
00838     {
00839         // Offset:<23.629, 24.4125>, Scale:<2.75, 2.75>
00840         const auto geometry = _pathGeometry_04;
00841         const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 23.6289997F, 24.4125004F }, _themeColor_Foreground);
00842         return result;
00843     }
00844
00845     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00846     // - Hamburger - 03 - PointerOverToNormal
00847     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00848     // 02 - Hamburger - 03 - PointerOverToNormal
00849     // Path 1 Path 1
00850     CompositionSpriteShape SpriteShape_14()
00851     {
00852         // Offset:<23.629, 37.75>, Scale:<2.75, 2.75>
00853         const auto geometry = _pathGeometry_05;
00854         const auto result = CreateSpriteShape(geometry, { 2.75F, 0.0F, 0.0F, 2.75F, 23.6289997F, 37.75F }, _themeColor_Foreground);
00855         return result;
00856     }
00857
00858     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00859     // - Hamburger - 03 - PointerOverToNormal
00860     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00861     // 02 - Hamburger - 03 - PointerOverToNormal
00862     // Path 1 Path 1
00863     CompositionSpriteShape SpriteShape_15()
00864     {
00865         // Offset:<23.872047, 10.25>, Rotation:-0.009138340298435101 degrees,
00866         // Scale:<2.749, 2.75>
00867         const auto geometry = PathGeometry_09();
00868         const auto result = CreateSpriteShape(geometry, { 2.74900007F, 0.0F, 0.0F, 2.75F, 23.8720474F, 10.25F }, _themeColor_Foreground);
00869         return result;
00870     }
00871
00872     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00873     // - Hamburger - 03 - PointerOverToNormal
00874     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00875     // 02 - Hamburger - 03 - PointerOverToNormal
00876     // Path 1 Path 1
00877     CompositionSpriteShape SpriteShape_16()
00878     {
00879         // Offset:<23.872047, 24.4125>, Rotation:-0.009138340298435101 degrees,
00880         // Scale:<2.749, 2.75>
00881         const auto geometry = PathGeometry_10();
00882         const auto result = CreateSpriteShape(geometry, { 2.74900007F, 0.0F, 0.0F, 2.75F, 23.8720474F, 24.4125004F }, _themeColor_Foreground);
00883         return result;
00884     }
00885
00886     // - PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02
00887     // - Hamburger - 03 - PointerOverToNormal
00888     // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00889     // 02 - Hamburger - 03 - PointerOverToNormal
00890     // Path 1 Path 1
00891     CompositionSpriteShape SpriteShape_17()
00892     {
00893         // Offset:<23.872047, 37.75>, Rotation:-0.009138340298435101 degrees,
00894         // Scale:<2.749, 2.75>
00895         const auto geometry = PathGeometry_11();
00896         const auto result = CreateSpriteShape(geometry, { 2.74900007F, 0.0F, 0.0F, 2.75F, 23.8720474F, 37.75F }, _themeColor_Foreground);
00897         return result;
00898     }
00899
00900     // PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00901     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00902     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00903     ContainerVisual ContainerVisual_0()
00904     {
00905         const auto result = _c.CreateContainerVisual();
00906         result.Clip(InsetClip_0());
00907         result.IsVisible(false);
00908         result.Size({ 48.0F, 48.0F });
00909         // Scale:<1, 1>
00910         result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
00911         // Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00912         // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00913         // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00914         result.Children().InsertAtTop(ShapeVisual_0());
00915         StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_0(), _rootProgress);
00916         StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_0(), _rootProgress);
00917         return result;
00918     }
00919
00920     // PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02 -
00921     // Hamburger - 03 - PointerOverToNormal
00922     ContainerVisual ContainerVisual_1()
00923     {
00924         const auto result = _c.CreateContainerVisual();
00925         result.Clip(_insetClip_0);
00926         result.Size({ 48.0F, 48.0F });
00927         // Scale:<1, 1>
00928         result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
00929         // Opacity for layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls -
00930         // 02 - Hamburger - 03 - PointerOverToNormal
00931         result.Children().InsertAtTop(ShapeVisual_1());
00932         StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_1(), _rootProgress);
00933         StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_1(), _rootProgress);
00934         return result;
00935     }
00936
00937     // The root of the composition.
00938     ContainerVisual Root()
00939     {
00940         const auto result = _root = _c.CreateContainerVisual();
00941         const auto propertySet = result.Properties();
00942         propertySet.InsertScalar(L"Progress", 0.0F);
00943         const auto children = result.Children();
00944         // PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00945         // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00946         // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00947         children.InsertAtTop(ContainerVisual_0());
00948         // PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02 -
00949         // Hamburger - 03 - PointerOverToNormal
00950         children.InsertAtTop(ContainerVisual_1());
00951         return result;
00952     }
00953
00954     CubicBezierEasingFunction CubicBezierEasingFunction_0()
00955     {
00956         return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
00957     }
00958
00959     CubicBezierEasingFunction CubicBezierEasingFunction_1()
00960     {
00961         return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.75F, 1.0F });
00962     }
00963
00964     CubicBezierEasingFunction CubicBezierEasingFunction_2()
00965     {
00966         return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
00967     }
00968
00969     CubicBezierEasingFunction CubicBezierEasingFunction_3()
00970     {
00971         return _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.0F }, { 0.0F, 1.0F });
00972     }
00973
00974     ExpressionAnimation RootProgress()
00975     {
00976         const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
00977         result.SetReferenceParameter(L"_", _root);
00978         return result;
00979     }
00980
00981     InsetClip InsetClip_0()
00982     {
00983         const auto result = _insetClip_0 = _c.CreateInsetClip();
00984         return result;
00985     }
00986
00987     // PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
00988     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
00989     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
00990     // Layer opacity animation
00991     ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_0()
00992     {
00993         // Frame 0.
00994         const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _stepThenHoldEasingFunction);
00995         // Frame 10.
00996         result.InsertKeyFrame(0.125F, 1.0F, _holdThenStepEasingFunction);
00997         // Frame 20.
00998         result.InsertKeyFrame(0.25F, 0.0F, _holdThenStepEasingFunction);
00999         // Frame 30.
01000         result.InsertKeyFrame(0.375F, 1.0F, _holdThenStepEasingFunction);
01001         return result;
01002     }
01003
01004     // PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02 -
01005     // Hamburger - 03 - PointerOverToNormal
01006     // Layer opacity animation
01007     ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_1()
01008     {
01009         // Frame 0.
01010         const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
01011         // Frame 10.
01012         result.InsertKeyFrame(0.125F, 0.0F, _holdThenStepEasingFunction);
01013         // Frame 20.
01014         result.InsertKeyFrame(0.25F, 1.0F, _holdThenStepEasingFunction);
01015         return result;
01016     }
01017
01018     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
01019     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01020     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01021     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
01022     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01023     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01024     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
01025     // Scale
01026     ScalarKeyFrameAnimation ScaleXScalarAnimation_2p749_to_2p749()
01027     {
01028         // Frame 0.
01029         const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.74900007F, _stepThenHoldEasingFunction);
01030         // Frame 10.
01031         result.InsertKeyFrame(0.125F, 2.74900007F, _holdThenStepEasingFunction);
01032         // Frame 19.
01033         result.InsertKeyFrame(0.237499997F, 1.43256998F, _cubicBezierEasingFunction_0);
01034         // Frame 30.
01035         result.InsertKeyFrame(0.375F, 2.74900007F, _holdThenStepEasingFunction);
01036         // Frame 39.
01037         result.InsertKeyFrame(0.487500012F, 1.43256998F, _cubicBezierEasingFunction_0);
01038         // Frame 40.
01039         result.InsertKeyFrame(0.5F, 1.43256998F, _holdThenStepEasingFunction);
01040         // Frame 48.
01041         result.InsertKeyFrame(0.600000024F, 2.88000011F, _cubicBezierEasingFunction_1);
01042         // Frame 59.
01043         result.InsertKeyFrame(0.737500012F, 2.74850011F, _cubicBezierEasingFunction_2);
01044         // Frame 60.
01045         result.InsertKeyFrame(0.75F, 1.43256998F, _holdThenStepEasingFunction);
01046         // Frame 68.
01047         result.InsertKeyFrame(0.850000024F, 2.88000011F, _cubicBezierEasingFunction_1);
01048         // Frame 79.
01049         result.InsertKeyFrame(0.987500012F, 2.74850011F, _cubicBezierEasingFunction_2);
01050         return result;
01051     }
01052
01053     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
01054     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01055     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01056     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
01057     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01058     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01059     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
01060     // Scale
01061     ScalarKeyFrameAnimation ScaleYScalarAnimation_2p75_to_2p75()
01062     {
01063         // Frame 0.
01064         const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.75F, _stepThenHoldEasingFunction);
01065         // Frame 10.
01066         result.InsertKeyFrame(0.125F, 2.75F, _holdThenStepEasingFunction);
01067         // Frame 19.
01068         result.InsertKeyFrame(0.237499997F, 2.75F, CubicBezierEasingFunction_3());
01069         // Frame 30.
01070         result.InsertKeyFrame(0.375F, 2.75F, _holdThenStepEasingFunction);
01071         // Frame 39.
01072         result.InsertKeyFrame(0.487500012F, 2.75F, _cubicBezierEasingFunction_3);
01073         // Frame 40.
01074         result.InsertKeyFrame(0.5F, 2.75F, _holdThenStepEasingFunction);
01075         // Frame 48.
01076         result.InsertKeyFrame(0.600000024F, 2.73294997F, _cubicBezierEasingFunction_1);
01077         // Frame 59.
01078         result.InsertKeyFrame(0.737500012F, 2.75F, _cubicBezierEasingFunction_2);
01079         // Frame 60.
01080         result.InsertKeyFrame(0.75F, 2.75F, _holdThenStepEasingFunction);
01081         // Frame 68.
01082         result.InsertKeyFrame(0.850000024F, 2.73294997F, _cubicBezierEasingFunction_1);
01083         // Frame 79.
01084         result.InsertKeyFrame(0.987500012F, 2.75F, _cubicBezierEasingFunction_2);
01085         return result;
01086     }
01087
01088     // PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
01089     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01090     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01091     // Layer aggregator
01092     ShapeVisual ShapeVisual_0()
01093     {
01094         const auto result = _c.CreateShapeVisual();
01095         result.Size({ 48.0F, 48.0F });
01096         const auto shapes = result.Shapes();
01097         // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
01098         shapes.Append(ContainerShape_0());
01099         // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
01100         shapes.Append(ContainerShape_1());
01101         // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
01102         shapes.Append(ContainerShape_2());
01103         return result;
01104     }
01105
01106     // PreComp layer: Controls - 02 - Hamburger - 01 - NormalToPointerOver Controls - 02 -
01107     // Hamburger - 03 - PointerOverToNormal
01108     // Layer aggregator
01109     ShapeVisual ShapeVisual_1()
01110     {
01111         const auto result = _c.CreateShapeVisual();
01112         result.Size({ 48.0F, 48.0F });
01113         const auto shapes = result.Shapes();
01114         // Layer: Right Caps 2 Right Caps 2
01115         shapes.Append(SpriteShape_09());
01116         // Layer: Right Caps 2 Right Caps 2
01117         shapes.Append(SpriteShape_10());
01118         // Layer: Right Caps 2 Right Caps 2
01119         shapes.Append(SpriteShape_11());
01120         // Layer: Right Caps 2 Right Caps 2
01121         shapes.Append(SpriteShape_12());
01122         // Layer: Right Caps 2 Right Caps 2
01123         shapes.Append(SpriteShape_13());
01124         // Layer: Right Caps 2 Right Caps 2
01125         shapes.Append(SpriteShape_14());
01126         // Layer: Right Caps 2 Right Caps 2
01127         shapes.Append(SpriteShape_15());
01128         // Layer: Right Caps 2 Right Caps 2
01129         shapes.Append(SpriteShape_16());
01130         // Layer: Right Caps 2 Right Caps 2
01131         shapes.Append(SpriteShape_17());
01132         return result;
01133     }
01134
01135     StepEasingFunction HoldThenStepEasingFunction()
01136     {
01137         const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
01138         result.IsFinalStepSingleFrame(true);
01139         return result;
01140     }
01141
01142     StepEasingFunction StepThenHoldEasingFunction()
01143     {
01144         const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
01145         result.IsInitialStepSingleFrame(true);
01146         return result;
01147     }
01148
01149     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
01150     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01151     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01152     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
01153     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01154     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01155     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
01156     // Offset
01157     Vector2KeyFrameAnimation OffsetVector2Animation_0()
01158     {
01159         // Frame 0.
01160         const auto result = CreateVector2KeyFrameAnimation(0.0F, { 37.5079994F, 29.0F }, StepThenHoldEasingFunction());
01161         // Frame 10.
01162         result.InsertKeyFrame(0.125F, { 37.5079994F, 29.0F }, HoldThenStepEasingFunction());
01163         // Frame 19.
01164         result.InsertKeyFrame(0.237499997F, { 27.5079994F, 29.0F }, CubicBezierEasingFunction_0());
01165         // Frame 30.
01166         result.InsertKeyFrame(0.375F, { 37.5079994F, 29.0F }, _holdThenStepEasingFunction);
01167         // Frame 39.
01168         result.InsertKeyFrame(0.487500012F, { 27.5079994F, 29.0F }, _cubicBezierEasingFunction_0);
01169         // Frame 40.
01170         result.InsertKeyFrame(0.5F, { 27.5079994F, 29.0F }, _holdThenStepEasingFunction);
01171         // Frame 48.
01172         result.InsertKeyFrame(0.600000024F, { 38.5040016F, 29.0F }, CubicBezierEasingFunction_1());
01173         // Frame 59.
01174         result.InsertKeyFrame(0.737500012F, { 37.5079994F, 29.0F }, CubicBezierEasingFunction_2());
01175         // Frame 60.
01176         result.InsertKeyFrame(0.75F, { 27.5079994F, 29.0F }, _holdThenStepEasingFunction);
01177         // Frame 68.
01178         result.InsertKeyFrame(0.850000024F, { 38.5040016F, 29.0F }, _cubicBezierEasingFunction_1);
01179         // Frame 79.
01180         result.InsertKeyFrame(0.987500012F, { 37.5079994F, 29.0F }, _cubicBezierEasingFunction_2);
01181         return result;
01182     }
01183
01184     // - - PreComp layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02 -
01185     // Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01186     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01187     // - Opacity for layer: Controls - 02 - Hamburger - 02 - NormalToPressed Controls - 02
01188     // - Hamburger - 04 - PointerOverToPressed Controls - 02 - Hamburger - 05 -
01189     // PressedToNormal Controls - 02 - Hamburger - 06 - PressedToPointerOver
01190     // Layer: Right Caps 2 Right Caps 2 Right Caps 2 Right Caps 2
01191     // Offset
01192     Vector2KeyFrameAnimation OffsetVector2Animation_1()
01193     {
01194         // Frame 0.
01195         const auto result = CreateVector2KeyFrameAnimation(0.0F, { 10.5039997F, 29.0F }, _stepThenHoldEasingFunction);
01196         // Frame 10.
01197         result.InsertKeyFrame(0.125F, { 10.5039997F, 29.0F }, _holdThenStepEasingFunction);
01198         // Frame 19.
01199         result.InsertKeyFrame(0.237499997F, { 20.5079994F, 29.0F }, _cubicBezierEasingFunction_0);
01200         // Frame 30.
01201         result.InsertKeyFrame(0.375F, { 10.5039997F, 29.0F }, _holdThenStepEasingFunction);
01202         // Frame 39.
01203         result.InsertKeyFrame(0.487500012F, { 20.5079994F, 29.0F }, _cubicBezierEasingFunction_0);
01204         // Frame 40.
01205         result.InsertKeyFrame(0.5F, { 20.5079994F, 29.0F }, _holdThenStepEasingFunction);
01206         // Frame 48.
01207         result.InsertKeyFrame(0.600000024F, { 9.50800037F, 29.0F }, _cubicBezierEasingFunction_1);
01208         // Frame 59.
01209         result.InsertKeyFrame(0.737500012F, { 10.5039997F, 29.0F }, _cubicBezierEasingFunction_2);
01210         // Frame 60.
01211         result.InsertKeyFrame(0.75F, { 20.5079994F, 29.0F }, _holdThenStepEasingFunction);
01212         // Frame 68.
01213         result.InsertKeyFrame(0.850000024F, { 9.50800037F, 29.0F }, _cubicBezierEasingFunction_1);
01214         // Frame 79.
01215         result.InsertKeyFrame(0.987500012F, { 10.5039997F, 29.0F }, _cubicBezierEasingFunction_2);
01216         return result;
01217     }
01218
01219     static IGeometrySource2D CanvasGeometryToIGeometrySource2D(winrt::com_ptr<CanvasGeometry> geo)
01220     {
01221         return geo.as<IGeometrySource2D>();
01222     }
01223
01224 public:
01225     AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual(
01226         Compositor compositor,
01227         CompositionPropertySet themeProperties)
01228         : _c{compositor}
01229         , _themeProperties{themeProperties}
01230         , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
01231     {
01232         winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
01233         const auto _ = Root();
01234     }
01235
01236     void Close()
01237     {
01238         if (_root)
01239         {
01240             _root.Close();
01241         }
01242     }
01243
01244     TimeSpan Duration() const
01245     {
01246         return TimeSpan{ c_durationTicks };
01247     }
01248
01249     Visual RootVisual() const
01250     {
01251         return _root;
01252     }
01253
01254     winrt::float2 Size() const
01255     {
01256         return { 48.0F, 48.0F };
01257     }
01258
01259     static bool IsRuntimeCompatible()
01260     {
01261         return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
01262     }
01263 };
01264
01265 winrt::float4 AnimatedGlobalNavigationButtonVisualSource::ColorAsVector4(Color color)
01266 {
01267     return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
01268 }
01269
01270 CompositionPropertySet AnimatedGlobalNavigationButtonVisualSource::EnsureThemeProperties(Compositor compositor)
01271 {
01272     if (_themeProperties == nullptr)
01273     {
01274         _themeProperties = compositor.CreatePropertySet();
01275         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
01276     }
01277
01278     return _themeProperties;
01279 }
01280
01281 Color AnimatedGlobalNavigationButtonVisualSource::Foreground()
01282 {
01283     return _themeForeground;
01284 }
01285
01286 void AnimatedGlobalNavigationButtonVisualSource::Foreground(Color value)
01287 {
01288     _themeForeground = value;
01289     if (_themeProperties != nullptr)
01290     {
01291         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
01292     }
01293 }
01294
01295 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedGlobalNavigationButtonVisualSource::TryCreateAnimatedVisual(
01296     Compositor const& compositor)
01297 {
01298     IInspectable diagnostics = nullptr;
01299     return TryCreateAnimatedVisual(compositor, diagnostics);
01300 }
01301
01302 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedGlobalNavigationButtonVisualSource::TryCreateAnimatedVisual(
01303     Compositor const& compositor,
01304     IInspectable& diagnostics)
01305 {
01306     const auto _ = EnsureThemeProperties(compositor);
01307     diagnostics = nullptr;
01308
01309     if (AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual::IsRuntimeCompatible())
01310     {
01311         return winrt::make<AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual>(
01312             compositor,
01313             _themeProperties);
01314     }
01315
01316     return nullptr;
01317 }
01318
01319 double AnimatedGlobalNavigationButtonVisualSource::FrameCount()
01320 {
01321     return 80.0;
01322 }
01323
01324 double AnimatedGlobalNavigationButtonVisualSource::Framerate()
01325 {
01326     return 60.0;
01327 }
01328
01329 TimeSpan AnimatedGlobalNavigationButtonVisualSource::Duration()
01330 {
01331     return TimeSpan{ 13333333L };
01332 }
01333
01334 double AnimatedGlobalNavigationButtonVisualSource::FrameToProgress(double frameNumber)
01335 {
01336     return frameNumber / 80.0;
01337 }
01338
01339 winrt::Windows::Foundation::Collections::IMapView<hstring, double> AnimatedGlobalNavigationButtonVisualSource::Markers()
01340 {
01341     return winrt::single_threaded_map<winrt::hstring, double>(
01342         std::map<winrt::hstring, double>
01343         {
01344             { L"NormalToPointerOver_Start", 0.0 },
01345             { L"NormalToPointerOver_End", 0.113125 },
01346             { L"NormalToPressed_Start", 0.125625 },
01347             { L"NormalToPressed_End", 0.238125 },
01348             { L"PointerOverToNormal_Start", 0.250625 },
01349             { L"PointerOverToNormal_End", 0.363125 },
01350             { L"PointerOverToPressed_Start", 0.375625 },
01351             { L"PointerOverToPressed_End", 0.488125 },
01352             { L"PressedToNormal_Start", 0.500625 },
01353             { L"PressedToNormal_End", 0.738125 },
01354             { L"PressedToPointerOver_Start", 0.750625 },
01355             { L"PressedToPointerOver_End", 0.988125 },
01356         }
01357     ).GetView();
01358 }
01359
01360 void AnimatedGlobalNavigationButtonVisualSource::SetColorProperty(hstring const& propertyName, Color value)
01361 {
01362     if (propertyName == L"Foreground")
01363     {
01364         _themeForeground = value;
01365     }
01366     else
01367     {
01368         return;
01369     }
01370
01371     if (_themeProperties != nullptr)
01372     {
01373         _themeProperties.InsertVector4(propertyName, ColorAsVector4(value));
01374     }
01375 }
01376
01377 void AnimatedGlobalNavigationButtonVisualSource::SetScalarProperty(hstring const&, double)
01378 {
01379 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/TestUI/AnnotatedScrollBarRangeBasePage.xaml.cs Source File

  • File List
  • File Members
  • AnnotatedScrollBar
  • TestUI

AnnotatedScrollBarRangeBasePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Windows.Input;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Markup;
00012 using Microsoft.UI.Xaml.Media;
00013 using Windows.UI;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public class IScrollControllerAdapter
00018     {
00019         private ScrollViewer _scrollViewer;
00020         private IScrollController _scrollController;
00021
00022         // Used to map an IScrollController velocity change request to a ScrollViewer offset change request.
00023         // This constant allows the 'offsetDelta' value provided to AnnotatedScrollBar::RaiseAddScrollVelocityRequested
00024         // to be fed to ScrollViewer.ChangeView.
00025         static private double s_velocityNeededPerPixel = 3.688880455092886;
00026
00027         public IScrollControllerAdapter(ScrollViewer sv, IScrollController scrollController)
00028         {
00029             _scrollViewer = sv;
00030             _scrollController = scrollController;
00031             SetUpBridge();
00032         }
00033
00034         private void SetUpBridge()
00035         {
00036             _scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
00037             _scrollViewer.ViewChanged += pageScrollViewer_ViewChanged;
00038             _scrollViewer.SizeChanged += pageScrollViewer_SizeChanged;
00039
00040             _scrollController.ScrollToRequested += _scrollController_ScrollToRequested;
00041             _scrollController.ScrollByRequested += _scrollController_ScrollByRequested;
00042             _scrollController.AddScrollVelocityRequested += _scrollController_AddScrollVelocityRequested;
00043         }
00044
00045         private void _scrollController_AddScrollVelocityRequested(IScrollController sender, ScrollControllerAddScrollVelocityRequestedEventArgs args)
00046         {
00047             var offsetDelta = args.OffsetVelocity / s_velocityNeededPerPixel;
00048             var newOffset = _scrollViewer.VerticalOffset + offsetDelta;
00049             newOffset = Math.Max(0, newOffset);
00050             newOffset = Math.Min(_scrollViewer.ScrollableHeight, newOffset);
00051             _scrollViewer.ChangeView(null, newOffset, null, false /*disableAnimation*/);
00052         }
00053
00054         private void _scrollController_ScrollByRequested(IScrollController sender, ScrollControllerScrollByRequestedEventArgs args)
00055         {
00056             var newOffset = _scrollViewer.VerticalOffset + args.OffsetDelta;
00057             newOffset = Math.Max(0, newOffset);
00058             newOffset = Math.Min(_scrollViewer.ScrollableHeight, newOffset);
00059             _scrollViewer.ChangeView(null, newOffset, null, false /*disableAnimation*/);
00060         }
00061
00062         private void _scrollController_ScrollToRequested(IScrollController sender, ScrollControllerScrollToRequestedEventArgs args)
00063         {
00064             _scrollViewer.ChangeView(null, args.Offset, null, true /*disableAnimation*/);
00065         }
00066
00067         private void pageScrollViewer_SizeChanged(object sender, object e)
00068         {
00069             _scrollController.SetValues(0, _scrollViewer.ScrollableHeight, _scrollViewer.VerticalOffset, _scrollViewer.ViewportHeight);
00070         }
00071
00072         private void pageScrollViewer_ViewChanged(object sender, object e)
00073         {
00074             _scrollController.SetValues(0, _scrollViewer.ScrollableHeight, _scrollViewer.VerticalOffset, _scrollViewer.ViewportHeight);
00075         }
00076     }
00077
00078     public sealed partial class AnnotatedScrollBarRangeBasePage : TestPage
00079     {
00080         public ObservableCollection<Square> SquareCollection = new ObservableCollection<Square>();
00081         public ObservableCollection<AnnotatedScrollBarLabel> LabelCollection = new ObservableCollection<AnnotatedScrollBarLabel>();
00082
00083         private IScrollControllerAdapter adapter = null;
00084
00085         public AnnotatedScrollBarRangeBasePage()
00086         {
00087             this.InitializeComponent();
00088
00089             adapter = new IScrollControllerAdapter(pageScrollViewer, pageAnnotatedScrollBar.ScrollController);
00090
00091             PopulateSquares(200);
00092
00093             Loaded += AnnotatedScrollBarRangeBasePage_Loaded;
00094         }
00095
00096         ~AnnotatedScrollBarRangeBasePage()
00097         {
00098         }
00099
00100         private void PopulateSquares(int rows)
00101         {
00102             for (int i = 0; i < rows; i++)
00103             {
00104                 string squareName = "Item: " + i;
00105                 double itemWidth = (i % 2 == 0) ? 100 : 100;
00106                 SquareCollection.Add(new Square() { Name = squareName, Color = GetSquareColor(i), Width = itemWidth });
00107             }
00108         }
00109
00110         private string GetSquareColor(int squareNum)
00111         {
00112             if(squareNum <= 30)
00113             {
00114                 return "Violet";
00115             }
00116             else if (squareNum <= 80)
00117             {
00118                 return "Blue";
00119             }
00120             else if (squareNum <= 190)
00121             {
00122                 return "Green";
00123             }
00124             else
00125             {
00126                 return "Red";
00127             }
00128         }
00129
00130         private string GetOffsetLabel(double offset)
00131         {
00132             if (offset <= GetOffsetOfItem(30))
00133             {
00134                 return GetSquareColor(30);
00135             }
00136             else if (offset <= GetOffsetOfItem(80))
00137             {
00138                 return GetSquareColor(80);
00139             }
00140             else if (offset <= GetOffsetOfItem(190))
00141             {
00142                 return GetSquareColor(190);
00143             }
00144             else
00145             {
00146                 return GetSquareColor(191);
00147             }
00148         }
00149
00150         private double MOCK_GetStaticRowHeight()
00151         {
00152             return 140;
00153         }
00154
00155         private double MOCK_GetItemsPerRow()
00156         {
00157             return 5;
00158         }
00159
00160         private double GetOffsetOfItem(int itemNumber)
00161         {
00162             return MOCK_GetStaticRowHeight() * itemNumber / MOCK_GetItemsPerRow();
00163         }
00164
00165         private void PopulateLabels()
00166         {
00167             pageAnnotatedScrollBar.Labels.Clear();
00168
00169             pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Violet", GetOffsetOfItem(0)));
00170             pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Blue", GetOffsetOfItem(30)));
00171             pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Green", GetOffsetOfItem(80)));
00172             pageAnnotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Red", GetOffsetOfItem(190)));
00173         }
00174
00175         public void AnnotatedScrollBar_DetailLabelRequested(object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)
00176         {
00177             args.Content = GetOffsetLabel(args.ScrollOffset);
00178         }
00179
00180         private void AnnotatedScrollBarRangeBasePage_Loaded(object sender, RoutedEventArgs e)
00181         {
00182             pageAnnotatedScrollBar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequested;
00183             PopulateLabels();
00184         }
00185     }
00186 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIconTestHooks.cpp Source File

  • File List
  • File Members
  • AnimatedIcon

AnimatedIconTestHooks.cpp

Go to the documentation of this file.
00001 ﻿#include "pch.h"
00002 #include "common.h"
00003 #include "AnimatedIconTestHooks.h"
00004
00005 #include "AnimatedIconTestHooks.properties.cpp"
00006
00007 com_ptr<AnimatedIconTestHooks> AnimatedIconTestHooks::s_testHooks{};
00008
00009 com_ptr<AnimatedIconTestHooks> AnimatedIconTestHooks::EnsureGlobalTestHooks()
00010 {
00011     static bool s_initialized = []() {
00012         s_testHooks = winrt::make_self<AnimatedIconTestHooks>();
00013         return true;
00014     }();
00015     return s_testHooks;
00016 }
00017
00018 void AnimatedIconTestHooks::SetAnimationQueueBehavior(const winrt::AnimatedIcon& animatedIcon, winrt::AnimatedIconAnimationQueueBehavior behavior)
00019 {
00020     if (animatedIcon)
00021     {
00022         winrt::get_self<AnimatedIcon>(animatedIcon)->SetAnimationQueueBehavior(behavior);
00023     }
00024 }
00025
00026 void AnimatedIconTestHooks::SetDurationMultiplier(const winrt::AnimatedIcon& animatedIcon, float multiplier)
00027 {
00028     if (animatedIcon)
00029     {
00030         winrt::get_self<AnimatedIcon>(animatedIcon)->SetDurationMultiplier(multiplier);
00031     }
00032 }
00033
00034 void AnimatedIconTestHooks::SetSpeedUpMultiplier(const winrt::AnimatedIcon& animatedIcon, float multiplier)
00035 {
00036     if (animatedIcon)
00037     {
00038         winrt::get_self<AnimatedIcon>(animatedIcon)->SetSpeedUpMultiplier(multiplier);
00039     }
00040 }
00041
00042 void AnimatedIconTestHooks::SetQueueLength(const winrt::AnimatedIcon& animatedIcon, int length)
00043 {
00044     if (animatedIcon)
00045     {
00046         winrt::get_self<AnimatedIcon>(animatedIcon)->SetQueueLength(length);
00047     }
00048 }
00049
00050 winrt::hstring AnimatedIconTestHooks::GetLastAnimationSegment(const winrt::AnimatedIcon& animatedIcon)
00051 {
00052     if (animatedIcon)
00053     {
00054         return winrt::get_self<AnimatedIcon>(animatedIcon)->GetLastAnimationSegment();
00055     }
00056     return L"";
00057 }
00058
00059 winrt::hstring AnimatedIconTestHooks::GetLastAnimationSegmentStart(const winrt::AnimatedIcon& animatedIcon)
00060 {
00061     if (animatedIcon)
00062     {
00063         return winrt::get_self<AnimatedIcon>(animatedIcon)->GetLastAnimationSegmentStart();
00064     }
00065     return L"";
00066 }
00067
00068 winrt::hstring AnimatedIconTestHooks::GetLastAnimationSegmentEnd(const winrt::AnimatedIcon& animatedIcon)
00069 {
00070     if (animatedIcon)
00071     {
00072         return winrt::get_self<AnimatedIcon>(animatedIcon)->GetLastAnimationSegmentEnd();
00073     }
00074     return L"";
00075 }
00076
00077 void AnimatedIconTestHooks::NotifyLastAnimationSegmentChanged(const winrt::AnimatedIcon& sender)
00078 {
00079     auto hooks = EnsureGlobalTestHooks();
00080     if (hooks->m_lastAnimationSegmentChangedEventSource)
00081     {
00082         hooks->m_lastAnimationSegmentChangedEventSource(sender, nullptr);
00083     }
00084 }
00085
00086 winrt::event_token AnimatedIconTestHooks::LastAnimationSegmentChanged(winrt::TypedEventHandler<winrt::AnimatedIcon, winrt::IInspectable> const& value)
00087 {
00088     auto hooks = EnsureGlobalTestHooks();
00089     return hooks->m_lastAnimationSegmentChangedEventSource.add(value);
00090 }
00091
00092 void AnimatedIconTestHooks::LastAnimationSegmentChanged(winrt::event_token const& token)
00093 {
00094     auto hooks = EnsureGlobalTestHooks();
00095     hooks->m_lastAnimationSegmentChangedEventSource.remove(token);
00096 }
Generated on Sun Dec 1 2024 20:51:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ViewportTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

ViewportTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using System.Linq;
00007 using Windows.Foundation;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Private.Controls;
00012 using System.Threading;
00013 using System.Collections.Generic;
00014 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks;
00015 using System.Numerics;
00016 using Common;
00017 using System.Collections.ObjectModel;
00018 using Microsoft.UI.Xaml.Media;
00019 using Windows.UI;
00020 using System.Runtime.InteropServices.WindowsRuntime;
00021 using Microsoft.UI.Xaml.Markup;
00022 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00023
00024 using Task = System.Threading.Tasks.Task;
00025
00026 using WEX.TestExecution;
00027 using WEX.TestExecution.Markup;
00028 using WEX.Logging.Interop;
00029
00030 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00031 {
00032     [TestClass]
00033     public class ViewportTests : ApiTestBase
00034     {
00035         [TestMethod]
00036         public void ValidateNoScrollingSurfaceScenario()
00037         {
00038             ValidateNoScrollingSurfaceScenario(hostItemsRepeaterInPopup: false);
00039         }
00040
00041         [TestMethod]
00042         public void ValidateNoScrollingSurfaceInPopupScenario()
00043         {
00044             ValidateNoScrollingSurfaceScenario(hostItemsRepeaterInPopup: true);
00045         }
00046
00047         private void ValidateNoScrollingSurfaceScenario(bool hostItemsRepeaterInPopup)
00048         {
00049             RunOnUIThread.Execute(() =>
00050             {
00051                 var realizationRects = new List<Rect>();
00052                 var visibleRects = new List<Rect>();
00053
00054                 var repeater = new ItemsRepeater()
00055                 {
00056                     Layout = GetMonitoringLayout(new Size(500, 500), realizationRects, visibleRects),
00057                     HorizontalCacheLength = 0.0,
00058                     VerticalCacheLength = 0.0
00059                 };
00060
00061                 if (hostItemsRepeaterInPopup)
00062                 {
00063                     var popup = new Popup()
00064                     {
00065                         Child = repeater
00066                     };
00067
00068                     Content = popup;
00069                     Content.UpdateLayout();
00070
00071                     popup.IsOpen = true;
00072                     Content.UpdateLayout();
00073
00074                     popup.IsOpen = false;
00075                 }
00076                 else
00077                 {
00078                     Content = repeater;
00079                 }
00080
00081                 Content.UpdateLayout();
00082
00083                 foreach (Rect rect in realizationRects)
00084                 {
00085                     Log.Comment("RealizationRect: {0}", rect);
00086                 }
00087
00088                 foreach (Rect rect in visibleRects)
00089                 {
00090                     Log.Comment("VisibleRects: {0}", rect);
00091                 }
00092
00093                 Verify.AreEqual(2, realizationRects.Count);
00094                 Verify.AreEqual(2, visibleRects.Count);
00095
00096                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00097                 Verify.AreEqual(realizationRects[0], visibleRects[0]);
00098
00099                 // Using Effective Viewport
00100                 Verify.AreEqual(0, realizationRects[1].X);
00101                 // 32 pixel title bar and some tolerance for borders
00102                 Verify.IsLessThan(Math.Abs(realizationRects[1].Y + 32), 6.0);
00103                 // Width/Height depends on the window size, so just
00104                 // validating something reasonable here to avoid flakiness.
00105                 Verify.IsLessThan(500.0, realizationRects[1].Width);
00106                 Verify.IsLessThan(500.0, realizationRects[1].Height);
00107
00108                 Verify.AreEqual(realizationRects[1], visibleRects[1]);
00109
00110                 realizationRects.Clear();
00111                 visibleRects.Clear();
00112             });
00113         }
00114
00115         [TestMethod]
00116         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125 and internal issue 18866003
00117         public void ValidateItemsRepeaterScrollHostScenario()
00118         {
00119             var realizationRects = new List<Rect>();
00120             var scrollViewer = (ScrollViewer)null;
00121             var viewChangedEvent = new ManualResetEvent(false);
00122             int waitTime = 2000; // 2 seconds
00123
00124             RunOnUIThread.Execute(() =>
00125             {
00126                 var repeater = new ItemsRepeater() {
00127                     Layout = GetMonitoringLayout(new Size(500, 600), realizationRects, null /* visibleRects */),
00128                     HorizontalCacheLength = 0.0,
00129                     VerticalCacheLength = 0.0
00130                 };
00131
00132                 scrollViewer = new ScrollViewer {
00133                     Content = repeater,
00134                     HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden,
00135                     VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
00136                 };
00137
00138                 scrollViewer.ViewChanged += (sender, args) =>
00139                 {
00140                     if (!args.IsIntermediate)
00141                     {
00142                         viewChangedEvent.Set();
00143                     }
00144                 };
00145
00146                 var tracker = new ItemsRepeaterScrollHost() {
00147                     Width = 200,
00148                     Height = 300,
00149                     ScrollViewer = scrollViewer
00150                 };
00151
00152                 Content = tracker;
00153                 Content.UpdateLayout();
00154
00155                 // First layout pass will invalidate measure during the first arrange
00156                 // so that we can get a viewport during the second measure/arrange pass.
00157                 // That's why Measure gets invoked twice.
00158                 // After that, ScrollViewer.SizeChanged is raised and it also invalidates
00159                 // layout (third pass).
00160                 Verify.AreEqual(3, realizationRects.Count);
00161                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00162                 Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
00163                 Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[2]);
00164                 realizationRects.Clear();
00165
00166                 viewChangedEvent.Reset();
00167                 scrollViewer.ChangeView(null, 100.0, 1.0f, disableAnimation: true);
00168             });
00169
00170             Verify.IsTrue(viewChangedEvent.WaitOne(waitTime), "Waiting for view changed");
00171             IdleSynchronizer.Wait();
00172
00173             RunOnUIThread.Execute(() =>
00174             {
00175                 Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
00176                 realizationRects.Clear();
00177
00178                 viewChangedEvent.Reset();
00179                 // Max viewport offset is (300, 400). Horizontal viewport offset
00180                 // is expected to get coerced from 400 to 300.
00181                 scrollViewer.ChangeView(400, 100.0, 1.0f, disableAnimation: true);
00182             });
00183
00184             Verify.IsTrue(viewChangedEvent.WaitOne(waitTime), "Waiting for view changed");
00185             IdleSynchronizer.Wait();
00186
00187             RunOnUIThread.Execute(() =>
00188             {
00189                 Verify.AreEqual(new Rect(300, 100, 200, 300), realizationRects.Last());
00190                 realizationRects.Clear();
00191
00192                 viewChangedEvent.Reset();
00193                 scrollViewer.ChangeView(null, null, 2.0f, disableAnimation: true);
00194             });
00195
00196             Verify.IsTrue(viewChangedEvent.WaitOne(waitTime), "Waiting for view changed");
00197             IdleSynchronizer.Wait();
00198
00199             RunOnUIThread.Execute(() =>
00200             {
00201                 Verify.AreEqual(new Rect(300, 100, 100, 150), realizationRects.Last());
00202                 realizationRects.Clear();
00203             });
00204         }
00205
00206         [TestMethod]
00207         public void ValidateOneScrollPresenterScenario()
00208         {
00209             var visibleRects = new List<Rect>();
00210             var realizationRects = new List<Rect>();
00211             var scrollPresenter = (ScrollPresenter)null;
00212             var scrollCompletedEvent = new AutoResetEvent(false);
00213             var zoomCompletedEvent = new AutoResetEvent(false);
00214
00215             RunOnUIThread.Execute(() =>
00216             {
00217                 var repeater = new ItemsRepeater() {
00218                     Layout = GetMonitoringLayout(new Size(500, 600), realizationRects, visibleRects),
00219                     HorizontalCacheLength = 0.0,
00220                     VerticalCacheLength = 0.0
00221                 };
00222
00223                 scrollPresenter = new ScrollPresenter {
00224                     Content = repeater,
00225                     Width = 200,
00226                     Height = 300
00227                 };
00228
00229                 Content = scrollPresenter;
00230                 Content.UpdateLayout();
00231
00232                 Verify.AreEqual(2, visibleRects.Count);
00233                 Verify.AreEqual(new Rect(0, 0, 0, 0), visibleRects[0]);
00234                 Verify.AreEqual(new Rect(0, 0, 200, 300), visibleRects[1]);
00235                 visibleRects.Clear();
00236
00237                 Verify.AreEqual(2, realizationRects.Count);
00238                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00239                 Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
00240                 realizationRects.Clear();
00241
00242                 scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
00243                 {
00244                     scrollCompletedEvent.Set();
00245                 };
00246
00247                 scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
00248                 {
00249                     zoomCompletedEvent.Set();
00250                 };
00251             });
00252             IdleSynchronizer.Wait();
00253
00254             RunOnUIThread.Execute(() =>
00255             {
00256                 scrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00257             });
00258             Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00259             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00260
00261             RunOnUIThread.Execute(() =>
00262             {
00263                 Verify.AreEqual(new Rect(0, 100, 200, 300), visibleRects.Last());
00264                 visibleRects.Clear();
00265                 Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
00266                 realizationRects.Clear();
00267
00268                 scrollCompletedEvent.Reset();
00269                 // Max viewport offset is (300, 400). Horizontal viewport offset
00270                 // is expected to get coerced from 400 to 300.
00271                 scrollPresenter.ScrollTo(400.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00272             });
00273             Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00274             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00275
00276             RunOnUIThread.Execute(() =>
00277             {
00278                 Verify.AreEqual(new Rect(300, 100, 200, 300), visibleRects.Last());
00279                 visibleRects.Clear();
00280
00281                 Verify.AreEqual(new Rect(300, 100, 200, 300), realizationRects.Last());
00282                 realizationRects.Clear();
00283
00284                 scrollPresenter.ZoomTo(
00285                     2.0f,
00286                     Vector2.Zero,
00287                     new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00288             });
00289             Verify.IsTrue(zoomCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00290             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00291
00292             RunOnUIThread.Execute(() =>
00293             {
00294                 Verify.AreEqual(
00295                     new Rect(300, 100, 100, 150),
00296                     realizationRects.Last());
00297                 realizationRects.Clear();
00298
00299                 // There are some known differences in InteractionTracker zoom between RS1 and RS2.
00300                 Verify.AreEqual(
00301                     PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone2) ?
00302                     new Rect(300, 100, 100, 150) :
00303                     new Rect(150, 100, 100, 150),
00304                     visibleRects.Last());
00305                 visibleRects.Clear();
00306             });
00307         }
00308
00309         [TestMethod]
00310         public void ValidateTwoScrollPresentersScenario()
00311         {
00312             var visibleRects = new List<Rect>();
00313             var realizationRects = new List<Rect>();
00314             var horizontalScrollPresenter = (ScrollPresenter)null;
00315             var verticalScrollPresenter = (ScrollPresenter)null;
00316             var horizontalScrollCompletedEvent = new AutoResetEvent(false);
00317             var verticalScrollCompletedEvent = new AutoResetEvent(false);
00318
00319             RunOnUIThread.Execute(() =>
00320             {
00321                 var repeater = new ItemsRepeater() {
00322                     Layout = GetMonitoringLayout(new Size(500, 500), realizationRects, visibleRects),
00323                     HorizontalCacheLength = 0.0,
00324                     VerticalCacheLength = 0.0
00325                 };
00326
00327                 horizontalScrollPresenter = new ScrollPresenter {
00328                     Content = repeater,
00329                     ContentOrientation = ScrollingContentOrientation.Horizontal
00330                 };
00331
00332                 var grid = new Grid();
00333                 grid.Children.Add(horizontalScrollPresenter);
00334
00335                 verticalScrollPresenter = new ScrollPresenter {
00336                     Content = grid,
00337                     Width = 200,
00338                     Height = 200,
00339                     ContentOrientation = ScrollingContentOrientation.Vertical
00340                 };
00341
00342                 Content = verticalScrollPresenter;
00343                 Content.UpdateLayout();
00344
00345                 Verify.AreEqual(2, visibleRects.Count);
00346                 Verify.AreEqual(new Rect(0, 0, 0, 0), visibleRects[0]);
00347                 Verify.AreEqual(new Rect(0, 0, 200, 200), visibleRects[1]);
00348                 visibleRects.Clear();
00349
00350                 Verify.AreEqual(2, realizationRects.Count);
00351                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00352                 Verify.AreEqual(new Rect(0, 0, 200, 200), realizationRects[1]);
00353                 realizationRects.Clear();
00354
00355                 horizontalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
00356                 {
00357                     horizontalScrollCompletedEvent.Set();
00358                 };
00359
00360                 verticalScrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
00361                 {
00362                     verticalScrollCompletedEvent.Set();
00363                 };
00364             });
00365             IdleSynchronizer.Wait();
00366
00367             RunOnUIThread.Execute(() =>
00368             {
00369                 verticalScrollPresenter.ScrollTo(0.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00370             });
00371             Verify.IsTrue(verticalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00372             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00373
00374             RunOnUIThread.Execute(() =>
00375             {
00376                 Verify.AreEqual(new Rect(0, 100, 200, 200), visibleRects.Last());
00377                 visibleRects.Clear();
00378
00379                 Verify.AreEqual(new Rect(0, 100, 200, 200), realizationRects.Last());
00380                 realizationRects.Clear();
00381
00382                 // Max viewport offset is (300, 300). Horizontal viewport offset
00383                 // is expected to get coerced from 400 to 300.
00384                 horizontalScrollPresenter.ScrollTo(400.0, 100.0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00385             });
00386             Verify.IsTrue(horizontalScrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00387             CompositionPropertySpy.SynchronouslyTickUIThread(1);
00388
00389             RunOnUIThread.Execute(() =>
00390             {
00391                 Verify.AreEqual(new Rect(300, 100, 200, 200), visibleRects.Last());
00392                 visibleRects.Clear();
00393
00394                 Verify.AreEqual(new Rect(300, 100, 200, 200), realizationRects.Last());
00395                 realizationRects.Clear();
00396             });
00397         }
00398
00399         [TestMethod]
00400         public void CanGrowCacheBuffer()
00401         {
00402             var scrollPresenter = (ScrollPresenter)null;
00403             var repeater = (ItemsRepeater)null;
00404             var measureVisibleRects = new List<Rect>();
00405             var measureRealizationRects = new List<Rect>();
00406             var arrangeVisibleRects = new List<Rect>();
00407             var arrangeRealizationRects = new List<Rect>();
00408             var fullCacheEvent = new ManualResetEvent(initialState: false);
00409             bool fullCacheReached = false;
00410
00411             RunOnUIThread.Execute(() =>
00412             {
00413                 Log.Comment("Preparing the visual tree...");
00414
00415                 scrollPresenter = new ScrollPresenter {
00416                     Width = 400,
00417                     Height = 400
00418                 };
00419
00420                 var layout = new MockVirtualizingLayout {
00421                     MeasureLayoutFunc = (availableSize, context) =>
00422                     {
00423                         if (fullCacheReached)
00424                         {
00425                             Log.Comment("Measure pass - full cache already reached.");
00426                         }
00427                         else
00428                         {
00429                             Log.Comment("Measure pass - adding VisibleRect: {0}, RealizationRect: {1}", context.VisibleRect, context.RealizationRect);
00430
00431                             measureVisibleRects.Add(context.VisibleRect);
00432                             measureRealizationRects.Add(context.RealizationRect);
00433                         }
00434
00435                         return new Size(1000, 2000);
00436                     },
00437
00438                     ArrangeLayoutFunc = (finalSize, context) =>
00439                     {
00440                         if (fullCacheReached)
00441                         {
00442                             Log.Comment("Arrange pass - full cache already reached.");
00443                         }
00444                         else
00445                         {
00446                             Log.Comment("Arrange pass - adding VisibleRect: {0}, RealizationRect: {1}", context.VisibleRect, context.RealizationRect);
00447
00448                             arrangeVisibleRects.Add(context.VisibleRect);
00449                             arrangeRealizationRects.Add(context.RealizationRect);
00450
00451                             if (context.RealizationRect.Height == scrollPresenter.Height * (repeater.VerticalCacheLength + 1))
00452                             {
00453                                 fullCacheReached = true;
00454                                 fullCacheEvent.Set();
00455                             }
00456                         }
00457
00458                         return finalSize;
00459                     }
00460                 };
00461
00462                 repeater = new ItemsRepeater() {
00463                     Layout = layout
00464                 };
00465
00466                 scrollPresenter.Content = repeater;
00467                 Content = scrollPresenter;
00468             });
00469
00470             if (!fullCacheEvent.WaitOne(500000)) Verify.Fail("Cache full size never reached.");
00471             IdleSynchronizer.Wait();
00472
00473             RunOnUIThread.Execute(() =>
00474             {
00475                 var cacheLength = repeater.VerticalCacheLength;
00476                 var expectedVisibleWindow = new Rect(0, 0, scrollPresenter.Width, scrollPresenter.Height);
00477                 var expectedRealizationWindow = new Rect(
00478                     -cacheLength / 2 * scrollPresenter.Width,
00479                     -cacheLength / 2 * scrollPresenter.Height,
00480                     (1 + cacheLength) * scrollPresenter.Width,
00481                     (1 + cacheLength) * scrollPresenter.Height);
00482
00483                 Log.Comment("Validate that the realization window reached full size. Measure passes: {0}, Arrange passes: {1}", measureRealizationRects.Count, arrangeRealizationRects.Count);
00484                 Log.Comment("expectedRealizationWindow: {0}, measureRealizationRects.Last(): {1}", expectedRealizationWindow, measureRealizationRects.Last());
00485                 Log.Comment("expectedRealizationWindow: {0}, arrangeRealizationRects.Last(): {1}", expectedRealizationWindow, arrangeRealizationRects.Last());
00486                 Verify.AreEqual(expectedRealizationWindow, measureRealizationRects.Last());
00487                 Verify.AreEqual(expectedRealizationWindow, arrangeRealizationRects.Last());
00488
00489                 Log.Comment("Validate that the realization window grew by 40 pixels each time during the process.");
00490                 for (int i = 2; i < measureRealizationRects.Count; ++i)
00491                 {
00492                     Log.Comment("measureRealizationRects.X delta: expected: -40, actual: {0}", measureRealizationRects[i].X - measureRealizationRects[i - 1].X);
00493                     Log.Comment("measureRealizationRects.Y delta: expected: -40, actual: {0}", measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y);
00494                     Log.Comment("measureRealizationRects.Width delta: expected: 80, actual: {0}", measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width);
00495                     Log.Comment("measureRealizationRects.Height delta: expected: 80, actual: {0}", measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height);
00496
00497                     Verify.IsLessThan(Math.Abs(measureRealizationRects[i].X - measureRealizationRects[i - 1].X + 40), 0.001);
00498                     Verify.IsLessThan(Math.Abs(measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y + 40), 0.001);
00499                     Verify.IsLessThan(Math.Abs(measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width - 80), 0.001);
00500                     Verify.IsLessThan(Math.Abs(measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height - 80), 0.001);
00501
00502                     Log.Comment("arrangeRealizationRects.X delta: expected: -40, actual: {0}", arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X);
00503                     Log.Comment("arrangeRealizationRects.Y delta: expected: -40, actual: {0}", arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y);
00504                     Log.Comment("arrangeRealizationRects.Width delta: expected: 80, actual: {0}", arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width);
00505                     Log.Comment("arrangeRealizationRects.Height delta: expected: 80, actual: {0}", arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height);
00506
00507                     Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X + 40), 0.001);
00508                     Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y + 40), 0.001);
00509                     Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width - 80), 0.001);
00510                     Verify.IsLessThan(Math.Abs(arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height - 80), 0.001);
00511                 }
00512
00513                 // Skipping first recording measureVisibleRects[0] since both the realization and visible rects are still empty at that point.
00514                 Log.Comment("Validate expected measure visible rects");
00515                 for (int i = 1; i < measureVisibleRects.Count; ++i)
00516                 {
00517                     Log.Comment("expectedVisibleWindow: {0}, visibleRect: {1}", expectedVisibleWindow, measureVisibleRects[i]);
00518                     Verify.AreEqual(expectedVisibleWindow, measureVisibleRects[i]);
00519                 }
00520
00521                 // Skipping first recording arrangeVisibleRects[0] since both the realization and visible rects are still empty at that point.
00522                 Log.Comment("Validate expected arrange visible rects");
00523                 for (int i = 1; i < arrangeVisibleRects.Count; ++i)
00524                 {
00525                     Log.Comment("expectedVisibleWindow: {0}, visibleRect: {1}", expectedVisibleWindow, arrangeVisibleRects[i]);
00526                     Verify.AreEqual(expectedVisibleWindow, arrangeVisibleRects[i]);
00527                 }
00528             });
00529         }
00530
00531         [TestMethod]
00532         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125 and internal issue 18866003
00533         public void ValidateLoadUnload()
00534         {
00535             // In this test, we will repeatedly put a repeater in and out
00536             // of the visual tree, under the same or a different parent.
00537             // And we will validate that the subscriptions and unsubscriptions to
00538             // the IRepeaterScrollingSurface events is done in sync.
00539
00540             TestScrollingSurface scroller1 = null;
00541             TestScrollingSurface scroller2 = null;
00542             ItemsRepeater repeater = null;
00543             WeakReference repeaterWeakRef = null;
00544             var renderingEvent = new ManualResetEvent(false);
00545
00546             var unorderedLoadEvent = false;
00547             var loadCounter = 0;
00548             var unloadCounter = 0;
00549
00550             int scroller1SubscriberCount = 0;
00551             int scroller2SubscriberCount = 0;
00552
00553             RunOnUIThread.Execute(() =>
00554             {
00555                 CompositionTarget.Rendering += (sender, args) =>
00556                 {
00557                     renderingEvent.Set();
00558                 };
00559
00560                 var host = new Grid();
00561                 scroller1 = new TestScrollingSurface() { Name = "Scroller 1" };
00562                 scroller2 = new TestScrollingSurface() { Name = "Scroller 2" };
00563                 repeater = new ItemsRepeater();
00564                 repeaterWeakRef = new WeakReference(repeater);
00565
00566                 repeater.Loaded += delegate {
00567                     Log.Comment("ItemsRepeater Loaded in " + ((FrameworkElement)repeater.Parent).Name);
00568                     unorderedLoadEvent |= (++loadCounter > unloadCounter + 1);
00569                 };
00570                 repeater.Unloaded += delegate {
00571                     Log.Comment("ItemsRepeater Unloaded");
00572                     unorderedLoadEvent |= (++unloadCounter > loadCounter);
00573                 };
00574
00575                 // Subscribers count should never go above 1 or under 0.
00576                 var validateSubscriberCount = new Action(() =>
00577                 {
00578                     Verify.IsLessThanOrEqual(scroller1SubscriberCount, 1);
00579                     Verify.IsGreaterThanOrEqual(scroller1SubscriberCount, 0);
00580
00581                     Verify.IsLessThanOrEqual(scroller2SubscriberCount, 1);
00582                     Verify.IsGreaterThanOrEqual(scroller2SubscriberCount, 0);
00583                 });
00584
00585                 scroller1.ConfigurationChangedAddFunc = () => { ++scroller1SubscriberCount; validateSubscriberCount(); };
00586                 scroller2.ConfigurationChangedAddFunc = () => { ++scroller2SubscriberCount; validateSubscriberCount(); };
00587                 scroller1.ConfigurationChangedRemoveFunc = () => { --scroller1SubscriberCount; validateSubscriberCount(); };
00588                 scroller2.ConfigurationChangedRemoveFunc = () => { --scroller2SubscriberCount; validateSubscriberCount(); };
00589
00590                 scroller1.Content = repeater;
00591                 host.Children.Add(scroller1);
00592                 host.Children.Add(scroller2);
00593
00594                 Content = host;
00595             });
00596
00597             IdleSynchronizer.Wait();
00598             Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
00599
00600             renderingEvent.Reset();
00601             Log.Comment("Putting repeater in and out of scroller 1 until we observe two out-of-sync loaded/unloaded events.");
00602             for (int i = 0; i < 2; ++i)
00603             {
00604                 while (!unorderedLoadEvent)
00605                 {
00606                     RunOnUIThread.Execute(() =>
00607                     {
00608                         // Validate subscription count for events + reset.
00609                         scroller1.Content = null;
00610                         scroller1.Content = repeater;
00611                     });
00612                     // For this issue to repro, we need to wait in such a way
00613                     // that we don't tick the UI thread. We can't use IdleSynchronizer here.
00614                     Task.Delay(16 * 3).Wait();
00615                 }
00616                 unorderedLoadEvent = false;
00617                 Log.Comment("Detected an unordered load/unload event.");
00618             }
00619
00620             IdleSynchronizer.Wait();
00621             Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
00622
00623             renderingEvent.Reset();
00624             RunOnUIThread.Execute(() =>
00625             {
00626                 Verify.AreEqual(1, scroller1SubscriberCount);
00627                 Verify.AreEqual(0, scroller2SubscriberCount);
00628
00629                 Log.Comment("Moving repeater from scroller 1 to scroller 2.");
00630                 scroller1.Content = null;
00631                 scroller2.Content = repeater;
00632             });
00633
00634             IdleSynchronizer.Wait();
00635             Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
00636
00637             RunOnUIThread.Execute(() =>
00638             {
00639                 Verify.AreEqual(0, scroller1SubscriberCount);
00640                 Verify.AreEqual(1, scroller2SubscriberCount);
00641
00642                 Log.Comment("Moving repeater out of scroller 2.");
00643                 scroller2.Content = null;
00644                 repeater = null;
00645             });
00646
00647             Log.Comment("Waiting for repeater to get GCed.");
00648             for (int i = 0; i < 5 && repeaterWeakRef.IsAlive; ++i)
00649             {
00650                 GC.Collect();
00651                 GC.WaitForPendingFinalizers();
00652                 IdleSynchronizer.Wait();
00653             }
00654             Verify.IsFalse(repeaterWeakRef.IsAlive);
00655
00656             renderingEvent.Reset();
00657             RunOnUIThread.Execute(() =>
00658             {
00659                 Verify.AreEqual(0, scroller1SubscriberCount);
00660                 Verify.AreEqual(0, scroller2SubscriberCount);
00661
00662                 Log.Comment("Scroller raise IRepeaterScrollSurface.PostArrange. Make sure no one is subscribing to it.");
00663                 scroller1.InvalidateArrange();
00664                 scroller2.InvalidateArrange();
00665                 Content.UpdateLayout();
00666             });
00667
00668             IdleSynchronizer.Wait();
00669             Verify.IsTrue(renderingEvent.WaitOne(), "Waiting for rendering event");
00670         }
00671
00672         // Test is flaky - disabling it while debugging the issue.
00673         [TestMethod]
00674         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125 and internal issue 17581054
00675         public void CanBringIntoViewElements()
00676         {
00677             ScrollPresenter scrollPresenter = null;
00678             ItemsRepeater repeater = null;
00679             var rootLoadedEvent = new AutoResetEvent(initialState: false);
00680             var scrollCompletedEvent = new AutoResetEvent(initialState: false);
00681             var viewChangedOffsets = new List<double>();
00682
00683             RunOnUIThread.Execute(() =>
00684             {
00685                 var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00686                 var root = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
00687                      @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
00688                          <Grid.Resources>
00689                            <controls:StackLayout x:Name='VerticalStackLayout' />
00690                            <controls:RecyclingElementFactory x:Key='ElementFactory'>
00691                              <controls:RecyclingElementFactory.RecyclePool>
00692                                <controls:RecyclePool />
00693                              </controls:RecyclingElementFactory.RecyclePool>
00694                              <DataTemplate x:Key='ItemTemplate'>
00695                                <Border Background='LightGray' Margin ='5'>
00696                                  <TextBlock Text='{Binding}' TextWrapping='WrapWholeWords' />
00697                                </Border>
00698                              </DataTemplate>
00699                              <DataTemplate x:Key='GroupTemplate'>
00700                                <StackPanel>
00701                                  <TextBlock Text='{Binding Name}' FontSize='24' Foreground='White' />
00702                                  <controls:ItemsRepeater
00703                                    x:Name='InnerRepeater'
00704                                    ItemsSource='{Binding}'
00705                                    ElementFactory='{StaticResource ElementFactory}'
00706                                    Layout='{StaticResource VerticalStackLayout}'
00707                                    HorizontalCacheLength='0'
00708                                    VerticalCacheLength='0' />
00709                                </StackPanel>
00710                              </DataTemplate>
00711                            </controls:RecyclingElementFactory>
00712                          </Grid.Resources>
00713                          <controls:ScrollPresenter x:Name='ScrollPresenter' Width='400' Height='600' IsChildAvailableWidthConstrained='True' Background='Gray'>
00714                            <controls:ItemsRepeater
00715                              x:Name='ItemsRepeater'
00716                              ElementFactory='{StaticResource ElementFactory}'
00717                              Layout='{StaticResource VerticalStackLayout}'
00718                              HorizontalCacheLength='0'
00719                              VerticalCacheLength='0' />
00720                          </controls:ScrollPresenter>
00721                        </Grid>"));
00722
00723                 var elementFactory = (RecyclingElementFactory)root.Resources["ElementFactory"];
00724                 scrollPresenter = (ScrollPresenter)root.FindName("ScrollPresenter");
00725                 repeater = (ItemsRepeater)root.FindName("ItemsRepeater");
00726
00727                 var groups = Enumerable.Range(0, 10).Select(i => new NamedGroup<string>(
00728                     "Group #" + i,
00729                     Enumerable.Range(0, 15).Select(j => string.Format("{0}.{1}: {2}", i, j, lorem.Substring(0, 250))))).ToList();
00730
00731                 repeater.ItemsSource = groups;
00732
00733                 elementFactory.SelectTemplateKey += (s, e) =>
00734                 {
00735                     e.TemplateKey =
00736                         (e.DataContext is NamedGroup<string>) ?
00737                         "GroupTemplate" :
00738                         "ItemTemplate";
00739                 };
00740
00741                 scrollPresenter.ViewChanged += (o, e) =>
00742                 {
00743                     Log.Comment("ViewChanged: " + scrollPresenter.VerticalOffset);
00744                     viewChangedOffsets.Add(scrollPresenter.VerticalOffset);
00745                 };
00746
00747                 ((IRepeaterScrollingSurface)scrollPresenter).ViewportChanged += (o, isFinal) =>
00748                 {
00749                     if (isFinal)
00750                     {
00751                         scrollCompletedEvent.Set();
00752                     }
00753                 };
00754
00755                 Content = root;
00756
00757                 root.Loaded += delegate {
00758                     rootLoadedEvent.Set();
00759                 };
00760             });
00761             Verify.IsTrue(rootLoadedEvent.WaitOne(DefaultWaitTimeInMS));
00762             IdleSynchronizer.Wait();
00763
00764             RunOnUIThread.Execute(() =>
00765             {
00766                 Log.Comment("Scroll into view item the last item.");
00767                 var group = (FrameworkElement)repeater.GetOrCreateElement(9);
00768                 var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
00769                 innerRepeater.GetOrCreateElement(14).StartBringIntoView();
00770             });
00771             Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00772             IdleSynchronizer.Wait();
00773             Verify.AreEqual(1, viewChangedOffsets.Count);
00774             viewChangedOffsets.Clear();
00775             ValidateRealizedRange(repeater, 8, 9, 9, 8, 9, 14);
00776
00777             RunOnUIThread.Execute(() =>
00778             {
00779                 Log.Comment("Scroll into view item 9.10 (already realized) w/ animation.");
00780                 var group = (FrameworkElement)repeater.TryGetElement(9);
00781                 var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
00782                 innerRepeater.TryGetElement(10).StartBringIntoView(new BringIntoViewOptions {
00783                     VerticalAlignmentRatio = 0.5,
00784                     AnimationDesired = true
00785                 });
00786             });
00787             Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00788             IdleSynchronizer.Wait();
00789             Verify.IsLessThan(1, viewChangedOffsets.Count);
00790             viewChangedOffsets.Clear();
00791             ValidateRealizedRange(repeater, 8, 9, 9, 6, 9, 14);
00792
00793             Log.Comment("Validate no-op StartBringIntoView operations.");
00794             {
00795                 var expectedVerticalOffsetAt9_10 = double.NaN;
00796
00797                 RunOnUIThread.Execute(() =>
00798                 {
00799                     expectedVerticalOffsetAt9_10 = scrollPresenter.VerticalOffset;
00800                     var group = (FrameworkElement)repeater.GetOrCreateElement(9);
00801                     var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
00802                     innerRepeater.GetOrCreateElement(10).StartBringIntoView(new BringIntoViewOptions {
00803                         VerticalAlignmentRatio = 0.5,
00804                         AnimationDesired = true
00805                     });
00806                 });
00807                 Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00808                 IdleSynchronizer.Wait();
00809
00810                 RunOnUIThread.Execute(() =>
00811                 {
00812                     Verify.AreEqual(expectedVerticalOffsetAt9_10, scrollPresenter.VerticalOffset);
00813                 });
00814             }
00815
00816             RunOnUIThread.Execute(() =>
00817             {
00818                 Log.Comment("Scroll to item 3.4.");
00819                 var group = (FrameworkElement)repeater.GetOrCreateElement(3);
00820                 var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
00821                 innerRepeater.GetOrCreateElement(4).StartBringIntoView(new BringIntoViewOptions {
00822                     VerticalAlignmentRatio = 0.0
00823                 });
00824             });
00825
00826             Verify.IsTrue(scrollCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00827             IdleSynchronizer.Wait();
00828             ValidateRealizedRange(repeater, 2, 4, 3, 3, 3, 10);
00829
00830             // Code defect bug 17711793
00831             //RunOnUIThread.Execute(() =>
00832             //{
00833             //    Log.Comment("Scroll 0.0 to the top");
00834             //    var group = (FrameworkElement)repeater.MakeAnchor(0);
00835             //    var innerRepeater = (ItemsRepeater)group.FindName("InnerRepeater");
00836             //    innerRepeater.MakeAnchor(0).StartBringIntoView(new BringIntoViewOptions
00837             //    {
00838             //        VerticalAlignmentRatio = 0.0,
00839             //        AnimationDesired = true
00840             //    });
00841             //});
00842
00843             //Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00844             //IdleSynchronizer.Wait();
00845             //Verify.AreEqual(1, viewChangedOffsets.Count);   // Animations are always disabled for anchors outside the realized range.
00846             //viewChangedOffsets.Clear();
00847             //ValidateRealizedRange(repeater, 0, 1, 0, 0, 0, 6);
00848         }
00849
00850         private void ValidateRealizedRange(
00851             ItemsRepeater repeater,
00852             int expectedFirstGroupIndex,
00853             int expectedLastGroupIndex,
00854             int expectedFirstItemGroupIndex,
00855             int expectedFirstItemIndex,
00856             int expectedLastItemGroupIndex,
00857             int expectedLastItemIndex)
00858         {
00859             int actualFirstGroupIndex = -1;
00860             int actualLastGroupIndex = -1;
00861             int actualFirstItemGroupIndex = -1;
00862             int actualFirstItemIndex = -1;
00863             int actualLastItemGroupIndex = -1;
00864             int actualLastItemIndex = -1;
00865
00866             RunOnUIThread.Execute(() =>
00867             {
00868                 int groupIndex = 0;
00869                 int itemIndex = 0;
00870
00871                 var groups = (IEnumerable<NamedGroup<string>>)repeater.ItemsSource;
00872
00873                 foreach (var group in groups)
00874                 {
00875                     var groupElement = repeater.TryGetElement(groupIndex);
00876
00877                     if (groupElement != null)
00878                     {
00879                         actualFirstGroupIndex =
00880                             actualFirstGroupIndex == -1 ?
00881                             groupIndex :
00882                             actualFirstGroupIndex;
00883
00884                         actualLastGroupIndex = groupIndex;
00885
00886                         var innerRepeater = (ItemsRepeater)((FrameworkElement)groupElement).FindName("InnerRepeater");
00887
00888                         foreach (var item in group)
00889                         {
00890                             var itemElement = innerRepeater.TryGetElement(itemIndex);
00891
00892                             if (itemElement != null)
00893                             {
00894                                 actualFirstItemGroupIndex =
00895                                     actualFirstItemGroupIndex == -1 ?
00896                                     groupIndex :
00897                                     actualFirstItemGroupIndex;
00898
00899                                 actualFirstItemIndex =
00900                                     actualFirstItemIndex == -1 ?
00901                                     itemIndex :
00902                                     actualFirstItemIndex;
00903
00904                                 actualLastItemGroupIndex = groupIndex;
00905                                 actualLastItemIndex = itemIndex;
00906                             }
00907
00908                             ++itemIndex;
00909                         }
00910                     }
00911
00912                     itemIndex = 0;
00913                     ++groupIndex;
00914                 }
00915             });
00916
00917             Verify.AreEqual(expectedFirstGroupIndex, actualFirstGroupIndex);
00918             Verify.AreEqual(expectedLastGroupIndex, actualLastGroupIndex);
00919             Verify.AreEqual(expectedFirstItemGroupIndex, actualFirstItemGroupIndex);
00920             Verify.AreEqual(expectedFirstItemIndex, actualFirstItemIndex);
00921             Verify.AreEqual(expectedLastItemGroupIndex, actualLastItemGroupIndex);
00922             Verify.AreEqual(expectedLastItemIndex, actualLastItemIndex);
00923         }
00924
00925         private void RunElementTrackingTestRoutine(Action<
00926             ObservableCollection<ObservableCollection<string>> /* data */,
00927             TestScrollingSurface[] /* scrollers */,
00928             ItemsRepeater /* rootRepeater */> testRoutine)
00929         {
00930             // Base setup for our element tracking tests.
00931             // We have 4 fake scrollers in series, initially in a non scrollable configuration.
00932             // Under them we have a group repeater tree (2 groups with 3 items each).
00933             // The group UI is a StackPanel with a TextBlock "header" and an inner ItemsRepeater.
00934             RunOnUIThread.Execute(() =>
00935             {
00936                 int groupCount = 2;
00937                 int itemsPerGroup = 3;
00938
00939                 var data = new ObservableCollection<ObservableCollection<string>>(
00940                     Enumerable.Range(0, groupCount).Select(i => new ObservableCollection<string>(
00941                         Enumerable.Range(0, itemsPerGroup).Select(j => string.Format("Item #{0}.{1}", i, j)))));
00942
00943                 var itemElements = Enumerable.Range(0, groupCount).Select(i =>
00944                     Enumerable.Range(0, itemsPerGroup).Select(j => new Border { Name = data[i][j], Width = 50, Height = 50, Background = new SolidColorBrush(Microsoft.UI.Colors.Red) }).ToList()).ToArray();
00945
00946                 var headerElements = Enumerable.Range(0, groupCount).Select(i => new TextBlock { Text = "Header #" + i }).ToList();
00947                 var groupRepeaters = Enumerable.Range(0, groupCount).Select(i => new ItemsRepeater {
00948                     Name = "ItemsRepeater #" + i,
00949                     ItemsSource = data[i],
00950                     ItemTemplate = MockElementFactory.CreateElementFactory(itemElements[i]),
00951                     Layout = new TestGridLayout { Orientation = Orientation.Horizontal, MinItemWidth = 50, MinItemHeight = 50, MinRowSpacing = 10, MinColumnSpacing = 10 }
00952                 }).ToList();
00953                 var groupElement = Enumerable.Range(0, groupCount).Select(i =>
00954                 {
00955                     var panel = new StackPanel();
00956                     panel.Name = "Group #" + i;
00957                     panel.Children.Add(headerElements[i]);
00958                     panel.Children.Add(groupRepeaters[i]);
00959                     return panel;
00960                 }).ToList();
00961
00962                 var rootRepeater = new ItemsRepeater {
00963                     Name = "Root ItemsRepeater",
00964                     ItemsSource = data,
00965                     ItemTemplate = MockElementFactory.CreateElementFactory(groupElement),
00966                     Layout = new TestStackLayout { Orientation = Orientation.Vertical }
00967                 };
00968
00969                 var scrollers = new TestScrollingSurface[4];
00970                 for (int i = 0; i < scrollers.Length; ++i)
00971                 {
00972                     scrollers[i] = new TestScrollingSurface() {
00973                         Name = "S" + i,
00974                         Content = i > 0 ? (UIElement)scrollers[i - 1] : rootRepeater
00975                     };
00976                 }
00977
00978                 var resetScrollers = (Action)(() =>
00979                 {
00980                     foreach (var scroller in scrollers)
00981                     {
00982                         scroller.IsHorizontallyScrollable = false;
00983                         scroller.IsVerticallyScrollable = false;
00984                         scroller.RegisterAnchorCandidateFunc = null;
00985                         scroller.UnregisterAnchorCandidateFunc = null;
00986                         scroller.GetRelativeViewportFunc = null;
00987                     }
00988                 });
00989
00990                 var outerScroller = scrollers.Last();
00991                 outerScroller.Width = 200.0;
00992                 outerScroller.Height = 2000.0;
00993
00994                 Content = outerScroller;
00995                 Content.UpdateLayout();
00996
00997                 testRoutine(data, scrollers, rootRepeater);
00998             });
00999         }
01000
01001         private static VirtualizingLayout GetMonitoringLayout(Size desiredSize, List<Rect> realizationRects, List<Rect> visibleRects)
01002         {
01003             return new MockVirtualizingLayout {
01004                 MeasureLayoutFunc = (availableSize, context) =>
01005                 {
01006                     realizationRects.Add(context.RealizationRect);
01007                     if (visibleRects != null)
01008                     {
01009                         visibleRects.Add(context.VisibleRect);
01010                     }
01011                     return desiredSize;
01012                 },
01013
01014                 ArrangeLayoutFunc = (finalSize, context) => finalSize
01015             };
01016         }
01017
01018         private class TestScrollingSurface : ContentControl, IRepeaterScrollingSurface
01019         {
01020             private bool _isHorizontallyScrollable;
01021             private bool _isVerticallyScrollable;
01022
01023             public bool InMeasure { get; set; }
01024             public bool InArrange { get; set; }
01025             public bool InPostArrange { get; private set; }
01026
01027             public Action ConfigurationChangedAddFunc { get; set; }
01028             public Action ConfigurationChangedRemoveFunc { get; set; }
01029
01030             public Action<UIElement> RegisterAnchorCandidateFunc { get; set; }
01031             public Action<UIElement> UnregisterAnchorCandidateFunc { get; set; }
01032             public Func<UIElement, Rect> GetRelativeViewportFunc { get; set; }
01033
01034             public UIElement AnchorElement { get; set; }
01035
01036             public bool IsHorizontallyScrollable
01037             {
01038                 get { return _isHorizontallyScrollable; }
01039                 set
01040                 {
01041                     _isHorizontallyScrollable = value;
01042                     RaiseConfigurationChanged();
01043                     InvalidateMeasure();
01044                 }
01045             }
01046
01047             public bool IsVerticallyScrollable
01048             {
01049                 get { return _isVerticallyScrollable; }
01050                 set
01051                 {
01052                     _isVerticallyScrollable = value;
01053                     RaiseConfigurationChanged();
01054                     InvalidateMeasure();
01055                 }
01056             }
01057
01058             private event ConfigurationChangedEventHandler _configurationChanged;
01059
01060             public event ConfigurationChangedEventHandler ConfigurationChanged
01061             {
01062                 add
01063                 {
01064                     if (ConfigurationChangedAddFunc != null)
01065                     {
01066                         ConfigurationChangedAddFunc();
01067                     }
01068
01069                     _configurationChanged += value;
01070                 }
01071                 remove
01072                 {
01073                     if (ConfigurationChangedRemoveFunc != null)
01074                     {
01075                         ConfigurationChangedRemoveFunc();
01076                     }
01077
01078                     _configurationChanged -= value;
01079                 }
01080             }
01081             public event PostArrangeEventHandler PostArrange;
01082 #pragma warning disable CS0067
01083             // Warning CS0067: The event 'ViewportTests.TestScrollingSurface.ViewportChanged' is never used.
01084             public event ViewportChangedEventHandler ViewportChanged;
01085 #pragma warning restore CS0067
01086
01087             public void RegisterAnchorCandidate(UIElement element)
01088             {
01089                 RegisterAnchorCandidateFunc(element);
01090             }
01091
01092             public void UnregisterAnchorCandidate(UIElement element)
01093             {
01094                 UnregisterAnchorCandidateFunc(element);
01095             }
01096
01097             public Rect GetRelativeViewport(UIElement child)
01098             {
01099                 return GetRelativeViewportFunc(child);
01100             }
01101
01102             protected override Size MeasureOverride(Size availableSize)
01103             {
01104                 InMeasure = true;
01105                 var result = base.MeasureOverride(availableSize);
01106                 InMeasure = false;
01107                 return result;
01108             }
01109
01110             protected override Size ArrangeOverride(Size finalSize)
01111             {
01112                 InArrange = true;
01113
01114                 var result = base.ArrangeOverride(finalSize);
01115
01116                 InArrange = false;
01117                 InPostArrange = true;
01118
01119                 if (PostArrange != null)
01120                 {
01121                     PostArrange(this);
01122                 }
01123
01124                 InPostArrange = false;
01125
01126                 return result;
01127             }
01128
01129             private void RaiseConfigurationChanged()
01130             {
01131                 if (_configurationChanged != null)
01132                 {
01133                     _configurationChanged(this);
01134                 }
01135             }
01136         }
01137
01138         private class TestStackLayout : StackLayout
01139         {
01140             public UIElement SuggestedAnchor { get; private set; }
01141
01142             protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
01143             {
01144                 var anchorIndex = context.RecommendedAnchorIndex;
01145                 SuggestedAnchor = anchorIndex < 0 ? null : context.GetOrCreateElementAt(anchorIndex);
01146                 return base.MeasureOverride(context, availableSize);
01147             }
01148         }
01149
01150         private class TestGridLayout : UniformGridLayout
01151         {
01152             public UIElement SuggestedAnchor { get; private set; }
01153
01154             protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
01155             {
01156                 var anchorIndex = context.RecommendedAnchorIndex;
01157                 SuggestedAnchor = anchorIndex < 0 ? null : context.GetOrCreateElementAt(anchorIndex);
01158                 return base.MeasureOverride(context, availableSize);
01159             }
01160         }
01161     }
01162 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImageIconSource Member List

This is the complete list of members for ImageIconSource, including all inherited members.
abi_enter() | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
CheckThread() | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
ClearProperties() | ImageIconSourceProperties | [static]
CreateIconElementCore() | ImageIconSource |
DeleteInstanceOnUIThread(std::unique_ptr< ImageIconSource > &&self) noexcept | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline, static]
EnsureProperties() | ImageIconSourceProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
final_release(std::unique_ptr< ImageIconSource > &&self) | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline, static]
GetBase() | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
GetIconElementPropertyCore(winrt::DependencyProperty sourceProperty) | ImageIconSource |
GetInner() | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
ImageIconSourceProperties() | ImageIconSourceProperties |
ImageSource(winrt::ImageSource const &value) | ImageIconSourceProperties |
ImageSource() | ImageIconSourceProperties |
ImageSourceProperty() | ImageIconSourceProperties | [inline, static]
IsOnThread() | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ImageIconSource, DeriveFromBitmapIconSourceHelper_base, winrt::ImageIconSource > | [inline]
s_ImageSourceProperty | ImageIconSourceProperties | [static]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewMenuItemStretchPage Member List

This is the complete list of members for NavigationViewMenuItemStretchPage, including all inherited members.
NavigationViewMenuItemStretchPage() NavigationViewMenuItemStretchPage [inline]
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApi.idl Source File

  • File List
  • File Members
  • TwoPaneView

DisplayRegionHelperTestApi.idl

Go to the documentation of this file.
00001 namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [default_interface]
00006 [webhosthidden]
00007 runtimeclass DisplayRegionHelperTestApi
00008 {
00009     static Boolean SimulateDisplayRegions { get; set; };
00010     static MU_XC_NAMESPACE.TwoPaneViewMode SimulateMode { get; set; };
00011 }
00012
00013 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationViewTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationViewTemplateSettings.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(NavigationViewTemplateSettings)
00012 }
00013
00014 #include "NavigationViewTemplateSettings.g.cpp"
00015
00016 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_BackButtonVisibilityProperty{ nullptr };
00017 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_LeftPaneVisibilityProperty{ nullptr };
00018 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_OpenPaneLengthProperty{ nullptr };
00019 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_OverflowButtonVisibilityProperty{ nullptr };
00020 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_PaneToggleButtonVisibilityProperty{ nullptr };
00021 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_PaneToggleButtonWidthProperty{ nullptr };
00022 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_SingleSelectionFollowsFocusProperty{ nullptr };
00023 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_SmallerPaneToggleButtonWidthProperty{ nullptr };
00024 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_TopPaddingProperty{ nullptr };
00025 GlobalDependencyProperty NavigationViewTemplateSettingsProperties::s_TopPaneVisibilityProperty{ nullptr };
00026
00027 NavigationViewTemplateSettingsProperties::NavigationViewTemplateSettingsProperties()
00028 {
00029     EnsureProperties();
00030 }
00031
00032 void NavigationViewTemplateSettingsProperties::EnsureProperties()
00033 {
00034     if (!s_BackButtonVisibilityProperty)
00035     {
00036         s_BackButtonVisibilityProperty =
00037             InitializeDependencyProperty(
00038                 L"BackButtonVisibility",
00039                 winrt::name_of<winrt::Visibility>(),
00040                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00041                 false /* isAttached */,
00042                 ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
00043                 nullptr);
00044     }
00045     if (!s_LeftPaneVisibilityProperty)
00046     {
00047         s_LeftPaneVisibilityProperty =
00048             InitializeDependencyProperty(
00049                 L"LeftPaneVisibility",
00050                 winrt::name_of<winrt::Visibility>(),
00051                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00052                 false /* isAttached */,
00053                 ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Visible),
00054                 nullptr);
00055     }
00056     if (!s_OpenPaneLengthProperty)
00057     {
00058         s_OpenPaneLengthProperty =
00059             InitializeDependencyProperty(
00060                 L"OpenPaneLength",
00061                 winrt::name_of<double>(),
00062                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00063                 false /* isAttached */,
00064                 ValueHelper<double>::BoxValueIfNecessary(320.0),
00065                 nullptr);
00066     }
00067     if (!s_OverflowButtonVisibilityProperty)
00068     {
00069         s_OverflowButtonVisibilityProperty =
00070             InitializeDependencyProperty(
00071                 L"OverflowButtonVisibility",
00072                 winrt::name_of<winrt::Visibility>(),
00073                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00074                 false /* isAttached */,
00075                 ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
00076                 nullptr);
00077     }
00078     if (!s_PaneToggleButtonVisibilityProperty)
00079     {
00080         s_PaneToggleButtonVisibilityProperty =
00081             InitializeDependencyProperty(
00082                 L"PaneToggleButtonVisibility",
00083                 winrt::name_of<winrt::Visibility>(),
00084                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00085                 false /* isAttached */,
00086                 ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Visible),
00087                 nullptr);
00088     }
00089     if (!s_PaneToggleButtonWidthProperty)
00090     {
00091         s_PaneToggleButtonWidthProperty =
00092             InitializeDependencyProperty(
00093                 L"PaneToggleButtonWidth",
00094                 winrt::name_of<double>(),
00095                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00096                 false /* isAttached */,
00097                 ValueHelper<double>::BoxedDefaultValue(),
00098                 nullptr);
00099     }
00100     if (!s_SingleSelectionFollowsFocusProperty)
00101     {
00102         s_SingleSelectionFollowsFocusProperty =
00103             InitializeDependencyProperty(
00104                 L"SingleSelectionFollowsFocus",
00105                 winrt::name_of<bool>(),
00106                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00107                 false /* isAttached */,
00108                 ValueHelper<bool>::BoxedDefaultValue(),
00109                 nullptr);
00110     }
00111     if (!s_SmallerPaneToggleButtonWidthProperty)
00112     {
00113         s_SmallerPaneToggleButtonWidthProperty =
00114             InitializeDependencyProperty(
00115                 L"SmallerPaneToggleButtonWidth",
00116                 winrt::name_of<double>(),
00117                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00118                 false /* isAttached */,
00119                 ValueHelper<double>::BoxedDefaultValue(),
00120                 nullptr);
00121     }
00122     if (!s_TopPaddingProperty)
00123     {
00124         s_TopPaddingProperty =
00125             InitializeDependencyProperty(
00126                 L"TopPadding",
00127                 winrt::name_of<double>(),
00128                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00129                 false /* isAttached */,
00130                 ValueHelper<double>::BoxValueIfNecessary(0.0),
00131                 nullptr);
00132     }
00133     if (!s_TopPaneVisibilityProperty)
00134     {
00135         s_TopPaneVisibilityProperty =
00136             InitializeDependencyProperty(
00137                 L"TopPaneVisibility",
00138                 winrt::name_of<winrt::Visibility>(),
00139                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00140                 false /* isAttached */,
00141                 ValueHelper<winrt::Visibility>::BoxValueIfNecessary(winrt::Visibility::Collapsed),
00142                 nullptr);
00143     }
00144 }
00145
00146 void NavigationViewTemplateSettingsProperties::ClearProperties()
00147 {
00148     s_BackButtonVisibilityProperty = nullptr;
00149     s_LeftPaneVisibilityProperty = nullptr;
00150     s_OpenPaneLengthProperty = nullptr;
00151     s_OverflowButtonVisibilityProperty = nullptr;
00152     s_PaneToggleButtonVisibilityProperty = nullptr;
00153     s_PaneToggleButtonWidthProperty = nullptr;
00154     s_SingleSelectionFollowsFocusProperty = nullptr;
00155     s_SmallerPaneToggleButtonWidthProperty = nullptr;
00156     s_TopPaddingProperty = nullptr;
00157     s_TopPaneVisibilityProperty = nullptr;
00158 }
00159
00160 void NavigationViewTemplateSettingsProperties::BackButtonVisibility(winrt::Visibility const& value)
00161 {
00162     [[gsl::suppress(con)]]
00163     {
00164     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_BackButtonVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
00165     }
00166 }
00167
00168 winrt::Visibility NavigationViewTemplateSettingsProperties::BackButtonVisibility()
00169 {
00170     return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_BackButtonVisibilityProperty));
00171 }
00172
00173 void NavigationViewTemplateSettingsProperties::LeftPaneVisibility(winrt::Visibility const& value)
00174 {
00175     [[gsl::suppress(con)]]
00176     {
00177     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_LeftPaneVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
00178     }
00179 }
00180
00181 winrt::Visibility NavigationViewTemplateSettingsProperties::LeftPaneVisibility()
00182 {
00183     return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_LeftPaneVisibilityProperty));
00184 }
00185
00186 void NavigationViewTemplateSettingsProperties::OpenPaneLength(double value)
00187 {
00188     [[gsl::suppress(con)]]
00189     {
00190     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_OpenPaneLengthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00191     }
00192 }
00193
00194 double NavigationViewTemplateSettingsProperties::OpenPaneLength()
00195 {
00196     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_OpenPaneLengthProperty));
00197 }
00198
00199 void NavigationViewTemplateSettingsProperties::OverflowButtonVisibility(winrt::Visibility const& value)
00200 {
00201     [[gsl::suppress(con)]]
00202     {
00203     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_OverflowButtonVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
00204     }
00205 }
00206
00207 winrt::Visibility NavigationViewTemplateSettingsProperties::OverflowButtonVisibility()
00208 {
00209     return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_OverflowButtonVisibilityProperty));
00210 }
00211
00212 void NavigationViewTemplateSettingsProperties::PaneToggleButtonVisibility(winrt::Visibility const& value)
00213 {
00214     [[gsl::suppress(con)]]
00215     {
00216     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_PaneToggleButtonVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
00217     }
00218 }
00219
00220 winrt::Visibility NavigationViewTemplateSettingsProperties::PaneToggleButtonVisibility()
00221 {
00222     return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_PaneToggleButtonVisibilityProperty));
00223 }
00224
00225 void NavigationViewTemplateSettingsProperties::PaneToggleButtonWidth(double value)
00226 {
00227     [[gsl::suppress(con)]]
00228     {
00229     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_PaneToggleButtonWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00230     }
00231 }
00232
00233 double NavigationViewTemplateSettingsProperties::PaneToggleButtonWidth()
00234 {
00235     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_PaneToggleButtonWidthProperty));
00236 }
00237
00238 void NavigationViewTemplateSettingsProperties::SingleSelectionFollowsFocus(bool value)
00239 {
00240     [[gsl::suppress(con)]]
00241     {
00242     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_SingleSelectionFollowsFocusProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00243     }
00244 }
00245
00246 bool NavigationViewTemplateSettingsProperties::SingleSelectionFollowsFocus()
00247 {
00248     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_SingleSelectionFollowsFocusProperty));
00249 }
00250
00251 void NavigationViewTemplateSettingsProperties::SmallerPaneToggleButtonWidth(double value)
00252 {
00253     [[gsl::suppress(con)]]
00254     {
00255     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_SmallerPaneToggleButtonWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00256     }
00257 }
00258
00259 double NavigationViewTemplateSettingsProperties::SmallerPaneToggleButtonWidth()
00260 {
00261     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_SmallerPaneToggleButtonWidthProperty));
00262 }
00263
00264 void NavigationViewTemplateSettingsProperties::TopPadding(double value)
00265 {
00266     [[gsl::suppress(con)]]
00267     {
00268     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_TopPaddingProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00269     }
00270 }
00271
00272 double NavigationViewTemplateSettingsProperties::TopPadding()
00273 {
00274     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_TopPaddingProperty));
00275 }
00276
00277 void NavigationViewTemplateSettingsProperties::TopPaneVisibility(winrt::Visibility const& value)
00278 {
00279     [[gsl::suppress(con)]]
00280     {
00281     static_cast<NavigationViewTemplateSettings*>(this)->SetValue(s_TopPaneVisibilityProperty, ValueHelper<winrt::Visibility>::BoxValueIfNecessary(value));
00282     }
00283 }
00284
00285 winrt::Visibility NavigationViewTemplateSettingsProperties::TopPaneVisibility()
00286 {
00287     return ValueHelper<winrt::Visibility>::CastOrUnbox(static_cast<NavigationViewTemplateSettings*>(this)->GetValue(s_TopPaneVisibilityProperty));
00288 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterLayoutTests.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • APITests

ScrollPresenterLayoutTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Private.Controls;
00006 using MUXControlsTestApp.Utilities;
00007 using System;
00008 using System.Numerics;
00009 using System.Threading;
00010 using Windows.UI;
00011 using Microsoft.UI.Composition;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Controls.Primitives;
00014 using Microsoft.UI.Xaml.Media.Imaging;
00015 using Microsoft.UI.Xaml.Shapes;
00016 using Microsoft.UI.Xaml.Media;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00023 {
00024     partial class ScrollPresenterTests : ApiTestBase
00025     {
00026         private enum BiDirectionalAlignment
00027         {
00028             Near,
00029             Center,
00030             Stretch,
00031             Far
00032         }
00033
00034         [TestMethod]
00035         [TestProperty("Description", "Sets ScrollPresenter.Content.Margin and verifies InteractionTracker.MaxPosition.")]
00036         public void BasicMargin()
00037         {
00038             const double c_Margin = 50.0;
00039             ScrollPresenter scrollPresenter = null;
00040             Rectangle rectangleScrollPresenterContent = null;
00041             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00042
00043             RunOnUIThread.Execute(() =>
00044             {
00045                 rectangleScrollPresenterContent = new Rectangle();
00046                 scrollPresenter = new ScrollPresenter();
00047
00048                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00049             });
00050
00051             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00052
00053             RunOnUIThread.Execute(() =>
00054             {
00055                 Log.Comment("Adding positive Margin to ScrollPresenter.Content");
00056                 rectangleScrollPresenterContent.Margin = new Thickness(c_Margin);
00057             });
00058
00059             // Try to jump beyond maximum offsets
00060             ScrollTo(
00061                 scrollPresenter,
00062                 c_defaultUIScrollPresenterContentWidth + 2 * c_Margin - c_defaultUIScrollPresenterWidth + 10.0,
00063                 c_defaultUIScrollPresenterContentHeight + 2 * c_Margin - c_defaultUIScrollPresenterHeight + 10.0,
00064                 ScrollingAnimationMode.Disabled,
00065                 ScrollingSnapPointsMode.Ignore,
00066                 hookViewChangingAndChanged: true,
00067                 isAnimationsEnabledOverride: null,
00068                 expectedFinalHorizontalOffset: c_defaultUIScrollPresenterContentWidth + 2 * c_Margin - c_defaultUIScrollPresenterWidth,
00069                 expectedFinalVerticalOffset: c_defaultUIScrollPresenterContentHeight + 2 * c_Margin - c_defaultUIScrollPresenterHeight);
00070
00071             IdleSynchronizer.Wait();
00072
00073             RunOnUIThread.Execute(() =>
00074             {
00075                 Log.Comment("Adding negative Margin to ScrollPresenter.Content");
00076                 rectangleScrollPresenterContent.Margin = new Thickness(-c_Margin);
00077             });
00078
00079             // Try to jump beyond maximum offsets
00080             ScrollTo(
00081                 scrollPresenter,
00082                 c_defaultUIScrollPresenterContentWidth - 2 * c_Margin - c_defaultUIScrollPresenterWidth + 10.0,
00083                 c_defaultUIScrollPresenterContentHeight - 2 * c_Margin - c_defaultUIScrollPresenterHeight + 10.0,
00084                 ScrollingAnimationMode.Disabled,
00085                 ScrollingSnapPointsMode.Ignore,
00086                 hookViewChangingAndChanged: false,
00087                 isAnimationsEnabledOverride: null,
00088                 expectedFinalHorizontalOffset: c_defaultUIScrollPresenterContentWidth - 2 * c_Margin - c_defaultUIScrollPresenterWidth,
00089                 expectedFinalVerticalOffset: c_defaultUIScrollPresenterContentHeight - 2 * c_Margin - c_defaultUIScrollPresenterHeight);
00090         }
00091
00092         [TestMethod]
00093         [TestProperty("Description", "Sets ScrollPresenter.Content.Padding and verifies InteractionTracker.MaxPosition.")]
00094         public void BasicPadding()
00095         {
00096             const double c_Padding = 50.0;
00097             ScrollPresenter scrollPresenter = null;
00098             Border borderScrollPresenterContent = null;
00099             Rectangle rectangle = null;
00100             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00101
00102             RunOnUIThread.Execute(() =>
00103             {
00104                 borderScrollPresenterContent = new Border();
00105                 rectangle = new Rectangle();
00106                 scrollPresenter = new ScrollPresenter();
00107
00108                 borderScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth;
00109                 borderScrollPresenterContent.Height = c_defaultUIScrollPresenterContentHeight;
00110                 borderScrollPresenterContent.Child = rectangle;
00111                 scrollPresenter.Content = borderScrollPresenterContent;
00112
00113                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
00114             });
00115
00116             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00117
00118             RunOnUIThread.Execute(() =>
00119             {
00120                 Log.Comment("Adding Padding to ScrollPresenter.Content");
00121                 borderScrollPresenterContent.Padding = new Thickness(c_Padding);
00122             });
00123
00124             // Try to jump beyond maximum offsets
00125             ScrollTo(
00126                 scrollPresenter,
00127                 c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth + 10.0,
00128                 c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight + 10.0,
00129                 ScrollingAnimationMode.Disabled,
00130                 ScrollingSnapPointsMode.Ignore,
00131                 hookViewChangingAndChanged: true,
00132                 isAnimationsEnabledOverride: null,
00133                 expectedFinalHorizontalOffset: c_defaultUIScrollPresenterContentWidth - c_defaultUIScrollPresenterWidth,
00134                 expectedFinalVerticalOffset: c_defaultUIScrollPresenterContentHeight - c_defaultUIScrollPresenterHeight);
00135         }
00136
00137         [TestMethod]
00138         [TestProperty("Description", "Sets ScrollPresenter.Content.HorizontalAlignment/VerticalAlignment and verifies content positioning.")]
00139         public void BasicAlignment()
00140         {
00141             const float c_smallZoomFactor = 0.15f;
00142             ScrollPresenter scrollPresenter = null;
00143             Rectangle rectangleScrollPresenterContent = null;
00144             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00145             float horizontalOffset = 0.0f;
00146             float verticalOffset = 0.0f;
00147             float zoomFactor = 1.0f;
00148             Compositor compositor = null;
00149
00150             RunOnUIThread.Execute(() =>
00151             {
00152                 rectangleScrollPresenterContent = new Rectangle();
00153                 scrollPresenter = new ScrollPresenter();
00154
00155                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00156                 compositor = CompositionTarget.GetCompositorForCurrentThread();
00157             });
00158
00159             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00160             IdleSynchronizer.Wait();
00161
00162             // Jump to absolute small zoomFactor to make the content smaller than the viewport.
00163             ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00164
00165             RunOnUIThread.Execute(() =>
00166             {
00167                 Log.Comment("Covering Stretch/Strech alignments");
00168                 Verify.AreEqual(HorizontalAlignment.Stretch, rectangleScrollPresenterContent.HorizontalAlignment);
00169                 Verify.AreEqual(VerticalAlignment.Stretch, rectangleScrollPresenterContent.VerticalAlignment);
00170             });
00171
00172             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00173
00174             Verify.IsTrue(Math.Abs(horizontalOffset - (float)(c_defaultUIScrollPresenterWidth - c_defaultUIScrollPresenterContentWidth * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
00175             Verify.IsTrue(Math.Abs(verticalOffset - (float)(c_defaultUIScrollPresenterHeight - c_defaultUIScrollPresenterContentHeight * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
00176             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00177
00178             RunOnUIThread.Execute(() =>
00179             {
00180                 Log.Comment("Covering Left/Top alignments");
00181                 rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Left;
00182                 rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Top;
00183             });
00184
00185             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00186
00187             Verify.AreEqual(0.0f, horizontalOffset);
00188             Verify.AreEqual(0.0f, verticalOffset);
00189             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00190
00191             RunOnUIThread.Execute(() =>
00192             {
00193                 Log.Comment("Covering Right/Bottom alignments");
00194                 rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Right;
00195                 rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Bottom;
00196             });
00197
00198             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00199
00200             Verify.IsTrue(Math.Abs(horizontalOffset - (float)(c_defaultUIScrollPresenterWidth - c_defaultUIScrollPresenterContentWidth * c_smallZoomFactor)) < c_defaultOffsetResultTolerance);
00201             Verify.IsTrue(Math.Abs(verticalOffset - (float)(c_defaultUIScrollPresenterHeight - c_defaultUIScrollPresenterContentHeight * c_smallZoomFactor)) < c_defaultOffsetResultTolerance);
00202             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00203
00204             RunOnUIThread.Execute(() =>
00205             {
00206                 Log.Comment("Covering Center/Center alignments");
00207                 rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Center;
00208                 rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Center;
00209             });
00210
00211             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00212
00213             Verify.IsTrue(Math.Abs(horizontalOffset - (float)(c_defaultUIScrollPresenterWidth - c_defaultUIScrollPresenterContentWidth * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
00214             Verify.IsTrue(Math.Abs(verticalOffset - (float)(c_defaultUIScrollPresenterHeight - c_defaultUIScrollPresenterContentHeight * c_smallZoomFactor) / 2.0f) < c_defaultOffsetResultTolerance);
00215             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00216         }
00217
00218         [TestMethod]
00219         [TestProperty("Description", "Validates ScrollPresenter.ViewportHeight for various layouts.")]
00220         public void ViewportHeight()
00221         {
00222             for (double scrollPresenterContentHeight = 50.0; scrollPresenterContentHeight <= 350.0; scrollPresenterContentHeight += 300.0)
00223             {
00224                 ViewportHeight(
00225                     isScrollPresenterParentSizeSet: false,
00226                     isScrollPresenterParentMaxSizeSet: false,
00227                     scrollPresenterVerticalAlignment: VerticalAlignment.Top,
00228                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00229                 ViewportHeight(
00230                     isScrollPresenterParentSizeSet: true,
00231                     isScrollPresenterParentMaxSizeSet: false,
00232                     scrollPresenterVerticalAlignment: VerticalAlignment.Top,
00233                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00234                 ViewportHeight(
00235                     isScrollPresenterParentSizeSet: false,
00236                     isScrollPresenterParentMaxSizeSet: true,
00237                     scrollPresenterVerticalAlignment: VerticalAlignment.Top,
00238                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00239
00240                 ViewportHeight(
00241                     isScrollPresenterParentSizeSet: false,
00242                     isScrollPresenterParentMaxSizeSet: false,
00243                     scrollPresenterVerticalAlignment: VerticalAlignment.Center,
00244                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00245                 ViewportHeight(
00246                     isScrollPresenterParentSizeSet: true,
00247                     isScrollPresenterParentMaxSizeSet: false,
00248                     scrollPresenterVerticalAlignment: VerticalAlignment.Center,
00249                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00250                 ViewportHeight(
00251                     isScrollPresenterParentSizeSet: false,
00252                     isScrollPresenterParentMaxSizeSet: true,
00253                     scrollPresenterVerticalAlignment: VerticalAlignment.Center,
00254                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00255
00256                 ViewportHeight(
00257                     isScrollPresenterParentSizeSet: false,
00258                     isScrollPresenterParentMaxSizeSet: false,
00259                     scrollPresenterVerticalAlignment: VerticalAlignment.Stretch,
00260                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00261                 ViewportHeight(
00262                     isScrollPresenterParentSizeSet: true,
00263                     isScrollPresenterParentMaxSizeSet: false,
00264                     scrollPresenterVerticalAlignment: VerticalAlignment.Stretch,
00265                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00266                 ViewportHeight(
00267                     isScrollPresenterParentSizeSet: false,
00268                     isScrollPresenterParentMaxSizeSet: true,
00269                     scrollPresenterVerticalAlignment: VerticalAlignment.Stretch,
00270                     scrollPresenterContentHeight: scrollPresenterContentHeight);
00271             }
00272         }
00273
00274         private void ViewportHeight(
00275             bool isScrollPresenterParentSizeSet,
00276             bool isScrollPresenterParentMaxSizeSet,
00277             VerticalAlignment scrollPresenterVerticalAlignment,
00278             double scrollPresenterContentHeight)
00279         {
00280             Log.Comment($"ViewportHeight test case - isScrollPresenterParentSizeSet: {isScrollPresenterParentSizeSet}, isScrollPresenterParentMaxSizeSet: {isScrollPresenterParentMaxSizeSet}, scrollPresenterVerticalAlignment: {scrollPresenterVerticalAlignment}, scrollPresenterContentHeight: {scrollPresenterContentHeight}");
00281
00282             RunOnUIThread.Execute(() =>
00283             {
00284                 var rectangle = new Rectangle()
00285                 {
00286                     Width = 30,
00287                     Height = scrollPresenterContentHeight
00288                 };
00289
00290                 var stackPanel = new StackPanel()
00291                 {
00292                     BorderThickness = new Thickness(5),
00293                     Margin = new Thickness(7),
00294                     VerticalAlignment = VerticalAlignment.Top
00295                 };
00296                 stackPanel.Children.Add(rectangle);
00297
00298                 var scrollPresenter = new ScrollPresenter()
00299                 {
00300                     Content = stackPanel,
00301                     ContentOrientation = ScrollingContentOrientation.Vertical,
00302                     VerticalAlignment = scrollPresenterVerticalAlignment
00303                 };
00304
00305                 var border = new Border()
00306                 {
00307                     BorderThickness = new Thickness(2),
00308                     Margin = new Thickness(3),
00309                     VerticalAlignment = VerticalAlignment.Center,
00310                     Child = scrollPresenter
00311                 };
00312                 if (isScrollPresenterParentSizeSet)
00313                 {
00314                     border.Width = 300.0;
00315                     border.Height = 200.0;
00316                 }
00317                 if (isScrollPresenterParentMaxSizeSet)
00318                 {
00319                     border.MaxWidth = 300.0;
00320                     border.MaxHeight = 200.0;
00321                 }
00322
00323                 Log.Comment("Setting window content");
00324                 Content = border;
00325                 Content.UpdateLayout();
00326
00327                 double expectedViewportHeight =
00328                     rectangle.Height + stackPanel.BorderThickness.Top + stackPanel.BorderThickness.Bottom +
00329                     stackPanel.Margin.Top + stackPanel.Margin.Bottom;
00330
00331                 double borderChildAvailableHeight = border.ActualHeight - border.BorderThickness.Top - border.BorderThickness.Bottom;
00332
00333                 if (expectedViewportHeight > borderChildAvailableHeight || scrollPresenterVerticalAlignment == VerticalAlignment.Stretch)
00334                 {
00335                     expectedViewportHeight = borderChildAvailableHeight;
00336                 }
00337
00338                 Log.Comment($"border.ActualWidth: {border.ActualWidth}, border.ActualHeight: {border.ActualHeight}");
00339                 Log.Comment($"Checking ViewportWidth - scrollPresenter.ViewportWidth: {scrollPresenter.ViewportWidth}, scrollPresenter.ActualWidth: {scrollPresenter.ActualWidth}");
00340                 Verify.AreEqual(scrollPresenter.ViewportWidth, scrollPresenter.ActualWidth);
00341
00342                 Log.Comment($"Checking ViewportHeight - expectedViewportHeight: {expectedViewportHeight}, scrollPresenter.ViewportHeight: {scrollPresenter.ViewportHeight}, scrollPresenter.ActualHeight: {scrollPresenter.ActualHeight}");
00343                 Verify.AreEqual(expectedViewportHeight, scrollPresenter.ViewportHeight);
00344                 Verify.AreEqual(scrollPresenter.ViewportHeight, scrollPresenter.ActualHeight);
00345             });
00346         }
00347
00348         [TestMethod]
00349         [TestProperty("Description", "Uses a StackPanel with Stretch alignment as ScrollPresenter.Content to verify it stretched to the size of the ScrollPresenter.")]
00350         public void StretchAlignment()
00351         {
00352             RunOnUIThread.Execute(() =>
00353             {
00354                 var rectangle = new Rectangle();
00355                 rectangle.Height = c_defaultUIScrollPresenterContentHeight;
00356                 var stackPanel = new StackPanel();
00357                 stackPanel.Children.Add(rectangle);
00358                 var scrollPresenter = new ScrollPresenter();
00359                 scrollPresenter.Width = c_defaultUIScrollPresenterWidth;
00360                 scrollPresenter.Height = c_defaultUIScrollPresenterHeight;
00361                 scrollPresenter.Content = stackPanel;
00362
00363                 Log.Comment("Setting window content");
00364                 Content = scrollPresenter;
00365                 Content.UpdateLayout();
00366
00367
00368                 Log.Comment("Checking Stretch/Strech alignments");
00369                 Verify.AreEqual(HorizontalAlignment.Stretch, stackPanel.HorizontalAlignment);
00370                 Verify.AreEqual(VerticalAlignment.Stretch, stackPanel.VerticalAlignment);
00371
00372                 Log.Comment("Checking StackPanel size");
00373                 Verify.AreEqual(c_defaultUIScrollPresenterWidth, stackPanel.ActualWidth);
00374                 Verify.AreEqual(c_defaultUIScrollPresenterContentHeight, stackPanel.ActualHeight);
00375             });
00376         }
00377
00378         [TestMethod]
00379         [TestProperty("Description", "Sets ScrollPresenter.Content.HorizontalAlignment/VerticalAlignment and ScrollPresenter.Content.Margin and verifies content positioning.")]
00380         public void BasicMarginAndAlignment()
00381         {
00382             const float c_smallZoomFactor = 0.15f;
00383             const double c_Margin = 40.0;
00384             ScrollPresenter scrollPresenter = null;
00385             Rectangle rectangleScrollPresenterContent = null;
00386             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00387             float horizontalOffset = 0.0f;
00388             float verticalOffset = 0.0f;
00389             float zoomFactor = 1.0f;
00390             Compositor compositor = null;
00391
00392             RunOnUIThread.Execute(() =>
00393             {
00394                 rectangleScrollPresenterContent = new Rectangle();
00395                 scrollPresenter = new ScrollPresenter();
00396
00397                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00398
00399                 Log.Comment("Adding positive Margin to ScrollPresenter.Content");
00400                 rectangleScrollPresenterContent.Margin = new Thickness(c_Margin);
00401                 compositor = CompositionTarget.GetCompositorForCurrentThread();
00402             });
00403
00404             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00405             IdleSynchronizer.Wait();
00406
00407             // Jump to absolute small zoomFactor to make the content smaller than the viewport.
00408             ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00409
00410             RunOnUIThread.Execute(() =>
00411             {
00412                 Log.Comment("Covering Stretch/Strech alignments");
00413                 Verify.AreEqual(HorizontalAlignment.Stretch, rectangleScrollPresenterContent.HorizontalAlignment);
00414                 Verify.AreEqual(VerticalAlignment.Stretch, rectangleScrollPresenterContent.VerticalAlignment);
00415
00416             });
00417
00418             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00419
00420             Verify.IsTrue(Math.Abs(horizontalOffset - 20.0f) < c_defaultOffsetResultTolerance);
00421             Verify.IsTrue(Math.Abs(verticalOffset - 15.0f) < c_defaultOffsetResultTolerance);
00422             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00423
00424             RunOnUIThread.Execute(() =>
00425             {
00426                 Log.Comment("Covering Left/Top alignments");
00427                 rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Left;
00428                 rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Top;
00429             });
00430
00431             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00432
00433             Verify.IsTrue(Math.Abs(horizontalOffset + 34.0f) < c_defaultOffsetResultTolerance);
00434             Verify.IsTrue(Math.Abs(verticalOffset + 34.0f) < c_defaultOffsetResultTolerance);
00435             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00436
00437             RunOnUIThread.Execute(() =>
00438             {
00439                 Log.Comment("Covering Right/Bottom alignments");
00440                 rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Right;
00441                 rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Bottom;
00442             });
00443
00444             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00445
00446             Verify.IsTrue(Math.Abs(horizontalOffset - 74.0f) < c_defaultOffsetResultTolerance);
00447             Verify.IsTrue(Math.Abs(verticalOffset - 64.0f) < c_defaultOffsetResultTolerance);
00448             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00449
00450             RunOnUIThread.Execute(() =>
00451             {
00452                 Log.Comment("Covering Center/Center alignments");
00453                 rectangleScrollPresenterContent.HorizontalAlignment = HorizontalAlignment.Center;
00454                 rectangleScrollPresenterContent.VerticalAlignment = VerticalAlignment.Center;
00455             });
00456
00457             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
00458
00459             Verify.IsTrue(Math.Abs(horizontalOffset - 20.0f) < c_defaultOffsetResultTolerance);
00460             Verify.IsTrue(Math.Abs(verticalOffset - 15.0f) < c_defaultOffsetResultTolerance);
00461             Verify.AreEqual(c_smallZoomFactor, zoomFactor);
00462         }
00463
00464         [TestMethod]
00465         [TestProperty("Description", "Sets ScrollPresenter.Content to an unsized and stretched Image, verifies resulting ScrollPresenter extents.")]
00466         public void StretchedImage()
00467         {
00468             ScrollPresenter scrollPresenter = null;
00469             Image imageScrollPresenterContent = null;
00470             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00471             const double margin = 10.0;
00472
00473             RunOnUIThread.Execute(() =>
00474             {
00475                 Uri uri = new Uri("ms-appx:/Assets/ingredient8.png");
00476                 Verify.IsNotNull(uri);
00477                 imageScrollPresenterContent = new Image();
00478                 imageScrollPresenterContent.Source = new BitmapImage(uri);
00479                 imageScrollPresenterContent.Margin = new Thickness(margin);
00480
00481                 scrollPresenter = new ScrollPresenter();
00482                 scrollPresenter.Content = imageScrollPresenterContent;
00483
00484                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
00485             });
00486
00487             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00488
00489             IdleSynchronizer.Wait();
00490
00491             RunOnUIThread.Execute(() =>
00492             {
00493                 Verify.AreEqual(scrollPresenter.ContentOrientation, ScrollingContentOrientation.Both);
00494                 // Image is unconstrained and stretches to largest square contained in the 300 x 200 viewport: 200 x 200.
00495                 ValidateStretchedImageSize(
00496                     scrollPresenter,
00497                     imageScrollPresenterContent,
00498                     desiredSize: 80.0 + 2.0 * margin /*natural size + margins*/,
00499                     actualSize: c_defaultUIScrollPresenterHeight - 2.0 * margin,
00500                     extentSize: c_defaultUIScrollPresenterHeight);
00501
00502                 Log.Comment("Changing ScrollPresenter.ContentOrientation to Vertical.");
00503                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
00504             });
00505
00506             IdleSynchronizer.Wait();
00507
00508             RunOnUIThread.Execute(() =>
00509             {
00510                 Verify.AreEqual(scrollPresenter.ContentOrientation, ScrollingContentOrientation.Vertical);
00511                 // Image is constrained horizontally to 300 and stretches to the 300 x 300 square.
00512                 ValidateStretchedImageSize(
00513                     scrollPresenter,
00514                     imageScrollPresenterContent,
00515                     desiredSize: c_defaultUIScrollPresenterWidth,
00516                     actualSize: c_defaultUIScrollPresenterWidth - 2.0 * margin,
00517                     extentSize: c_defaultUIScrollPresenterWidth);
00518
00519                 Log.Comment("Changing ScrollPresenter.ContentOrientation to Horizontal.");
00520                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
00521             });
00522
00523             IdleSynchronizer.Wait();
00524
00525             RunOnUIThread.Execute(() =>
00526             {
00527                 Verify.AreEqual(scrollPresenter.ContentOrientation, ScrollingContentOrientation.Horizontal);
00528                 // Image is constrained vertically to 200 and stretches to the 200 x 200 square.
00529                 ValidateStretchedImageSize(
00530                     scrollPresenter,
00531                     imageScrollPresenterContent,
00532                     desiredSize: c_defaultUIScrollPresenterHeight,
00533                     actualSize: c_defaultUIScrollPresenterHeight - 2.0 * margin,
00534                     extentSize: c_defaultUIScrollPresenterHeight);
00535             });
00536         }
00537
00538         private void ValidateStretchedImageSize(
00539             ScrollPresenter scrollPresenter,
00540             Image imageScrollPresenterContent,
00541             double desiredSize,
00542             double actualSize,
00543             double extentSize)
00544         {
00545             Log.Comment($"Sizes with ScrollPresenter.ContentOrientation={scrollPresenter.ContentOrientation}");
00546             Log.Comment($"Image DesiredSize=({imageScrollPresenterContent.DesiredSize.Width} x {imageScrollPresenterContent.DesiredSize.Height})");
00547             Log.Comment($"Image RenderSize=({imageScrollPresenterContent.RenderSize.Width} x {imageScrollPresenterContent.RenderSize.Height})");
00548             Log.Comment($"Image ActualSize=({imageScrollPresenterContent.ActualWidth} x {imageScrollPresenterContent.ActualHeight})");
00549             Log.Comment($"ScrollPresenter ExtentSize=({scrollPresenter.ExtentWidth} x {scrollPresenter.ExtentHeight})");
00550
00551             Verify.AreEqual(imageScrollPresenterContent.DesiredSize.Width, desiredSize);
00552             Verify.AreEqual(imageScrollPresenterContent.DesiredSize.Height, desiredSize);
00553             Verify.AreEqual(imageScrollPresenterContent.RenderSize.Width, actualSize);
00554             Verify.AreEqual(imageScrollPresenterContent.RenderSize.Height, actualSize);
00555             Verify.AreEqual(imageScrollPresenterContent.ActualWidth, actualSize);
00556             Verify.AreEqual(imageScrollPresenterContent.ActualHeight, actualSize);
00557             Verify.AreEqual(scrollPresenter.ExtentWidth, extentSize);
00558             Verify.AreEqual(scrollPresenter.ExtentHeight, extentSize);
00559         }
00560
00561         [TestMethod]
00562         [TestProperty("Description", "Sets ScrollPresenter.Content to Image with unnatural size and verifies InteractionTracker.MaxPosition.")]
00563         public void ImageWithUnnaturalSize()
00564         {
00565             const double c_UnnaturalImageWidth = 1200.0;
00566             const double c_UnnaturalImageHeight = 1000.0;
00567             ScrollPresenter scrollPresenter = null;
00568             Image imageScrollPresenterContent = null;
00569             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00570
00571             RunOnUIThread.Execute(() =>
00572             {
00573                 imageScrollPresenterContent = new Image();
00574                 scrollPresenter = new ScrollPresenter();
00575
00576                 Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
00577                 Verify.IsNotNull(uri);
00578                 imageScrollPresenterContent.Source = new BitmapImage(uri);
00579                 imageScrollPresenterContent.Width = c_UnnaturalImageWidth;
00580                 imageScrollPresenterContent.Height = c_UnnaturalImageHeight;
00581                 scrollPresenter.Content = imageScrollPresenterContent;
00582
00583                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
00584             });
00585
00586             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00587
00588             // Try to jump beyond maximum offsets
00589             ScrollTo(
00590                 scrollPresenter,
00591                 c_UnnaturalImageWidth - c_defaultUIScrollPresenterWidth + 10.0,
00592                 c_UnnaturalImageHeight - c_defaultUIScrollPresenterHeight + 10.0,
00593                 ScrollingAnimationMode.Disabled,
00594                 ScrollingSnapPointsMode.Ignore,
00595                 hookViewChangingAndChanged: true,
00596                 isAnimationsEnabledOverride: null,
00597                 expectedFinalHorizontalOffset: c_UnnaturalImageWidth - c_defaultUIScrollPresenterWidth,
00598                 expectedFinalVerticalOffset: c_UnnaturalImageHeight - c_defaultUIScrollPresenterHeight);
00599         }
00600
00601         [TestMethod]
00602         [TestProperty("Description",
00603             "Sets ScrollPresenter.ContentOrientation to Vertical and verifies Image positioning for Stretch alignment.")]
00604         public void BasicImageWithConstrainedWidth()
00605         {
00606             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00607             {
00608                 const double c_imageHeight = 300.0;
00609                 const double c_scrollPresenterWidth = 200.0;
00610                 ScrollPresenter scrollPresenter = null;
00611                 Image imageScrollPresenterContent = null;
00612                 AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00613                 Compositor compositor = null;
00614
00615                 RunOnUIThread.Execute(() =>
00616                 {
00617                     imageScrollPresenterContent = new Image();
00618                     scrollPresenter = new ScrollPresenter();
00619
00620                     Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
00621                     Verify.IsNotNull(uri);
00622                     imageScrollPresenterContent.Source = new BitmapImage(uri);
00623                     scrollPresenter.Content = imageScrollPresenterContent;
00624                     scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00625
00626                     SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
00627
00628                 // Constraining the Image width and making the ScrollPresenter smaller than the Image
00629                 imageScrollPresenterContent.Height = c_imageHeight;
00630                     scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
00631                     scrollPresenter.Width = c_scrollPresenterWidth;
00632                     compositor = CompositionTarget.GetCompositorForCurrentThread();
00633                 });
00634
00635                 WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00636
00637                 ValidateContentWithConstrainedWidth(
00638                     compositor,
00639                     scrollPresenter,
00640                     content: imageScrollPresenterContent,
00641                     horizontalAlignment: HorizontalAlignment.Stretch,
00642                     leftMargin: 0.0,
00643                     rightMargin: 0.0,
00644                     expectedMinPosition: 0.0f,
00645                     expectedZoomFactor: 1.0f);
00646             }
00647         }
00648
00649         [TestMethod]
00650         [TestProperty("Description",
00651             "Sets ScrollPresenter.ContentOrientation to Vertical and verifies Image positioning for various alignments and zoom factors.")]
00652         public void ImageWithConstrainedWidth()
00653         {
00654             const float c_smallZoomFactor = 0.5f;
00655             const float c_largeZoomFactor = 2.0f;
00656             const double c_imageHeight = 300.0;
00657             const double c_scrollPresenterWidth = 200.0;
00658             const double c_leftMargin = 20.0;
00659             const double c_rightMargin = 30.0;
00660             ScrollPresenter scrollPresenter = null;
00661             Image imageScrollPresenterContent = null;
00662             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00663             Compositor compositor = null;
00664
00665             RunOnUIThread.Execute(() =>
00666             {
00667                 imageScrollPresenterContent = new Image();
00668                 scrollPresenter = new ScrollPresenter();
00669
00670                 Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
00671                 Verify.IsNotNull(uri);
00672                 imageScrollPresenterContent.Source = new BitmapImage(uri);
00673                 imageScrollPresenterContent.Margin = new Thickness(c_leftMargin, 0, c_rightMargin, 0);
00674                 scrollPresenter.Content = imageScrollPresenterContent;
00675                 scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00676
00677                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
00678
00679                 // Constraining the Image width and making the ScrollPresenter smaller than the Image
00680                 imageScrollPresenterContent.Height = c_imageHeight;
00681                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.Vertical;
00682                 scrollPresenter.Width = c_scrollPresenterWidth;
00683                 compositor = CompositionTarget.GetCompositorForCurrentThread();
00684             });
00685
00686             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00687
00688             ValidateContentWithConstrainedWidth(
00689                 compositor,
00690                 scrollPresenter,
00691                 content: imageScrollPresenterContent,
00692                 horizontalAlignment: HorizontalAlignment.Stretch,
00693                 leftMargin: c_leftMargin,
00694                 rightMargin: c_rightMargin,
00695                 expectedMinPosition: 0.0f,
00696                 expectedZoomFactor: 1.0f);
00697
00698             // Jump to absolute small zoomFactor to make the content smaller than the viewport.
00699             ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00700
00701             ValidateContentWithConstrainedWidth(
00702                 compositor,
00703                 scrollPresenter,
00704                 content: imageScrollPresenterContent,
00705                 horizontalAlignment: HorizontalAlignment.Stretch,
00706                 leftMargin: c_leftMargin,
00707                 rightMargin: c_rightMargin,
00708                 expectedMinPosition: (float)(-c_scrollPresenterWidth * c_smallZoomFactor / 2.0), // -50
00709                 expectedZoomFactor: c_smallZoomFactor);
00710
00711             ValidateContentWithConstrainedWidth(
00712                 compositor,
00713                 scrollPresenter,
00714                 content: imageScrollPresenterContent,
00715                 horizontalAlignment: HorizontalAlignment.Left,
00716                 leftMargin: c_leftMargin,
00717                 rightMargin: c_rightMargin,
00718                 expectedMinPosition: 0.0f,
00719                 expectedZoomFactor: c_smallZoomFactor);
00720
00721             ValidateContentWithConstrainedWidth(
00722                 compositor,
00723                 scrollPresenter,
00724                 content: imageScrollPresenterContent,
00725                 horizontalAlignment: HorizontalAlignment.Right,
00726                 leftMargin: c_leftMargin,
00727                 rightMargin: c_rightMargin,
00728                 expectedMinPosition: (float)(-c_scrollPresenterWidth * c_smallZoomFactor), // -100
00729                 expectedZoomFactor: c_smallZoomFactor);
00730
00731             ValidateContentWithConstrainedWidth(
00732                 compositor,
00733                 scrollPresenter,
00734                 content: imageScrollPresenterContent,
00735                 horizontalAlignment: HorizontalAlignment.Center,
00736                 leftMargin: c_leftMargin,
00737                 rightMargin: c_rightMargin,
00738                 expectedMinPosition: (float)(-c_scrollPresenterWidth * c_smallZoomFactor / 2.0), // -50
00739                 expectedZoomFactor: c_smallZoomFactor);
00740
00741             // Jump to absolute large zoomFactor to make the content larger than the viewport.
00742             ZoomTo(scrollPresenter, c_largeZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00743
00744             ValidateContentWithConstrainedWidth(
00745                 compositor,
00746                 scrollPresenter,
00747                 content: imageScrollPresenterContent,
00748                 horizontalAlignment: HorizontalAlignment.Stretch,
00749                 leftMargin: c_leftMargin,
00750                 rightMargin: c_rightMargin,
00751                 expectedMinPosition: 0.0f,
00752                 expectedZoomFactor: c_largeZoomFactor);
00753
00754             ValidateContentWithConstrainedWidth(
00755                 compositor,
00756                 scrollPresenter,
00757                 content: imageScrollPresenterContent,
00758                 horizontalAlignment: HorizontalAlignment.Left,
00759                 leftMargin: c_leftMargin,
00760                 rightMargin: c_rightMargin,
00761                 expectedMinPosition: 0.0f,
00762                 expectedZoomFactor: c_largeZoomFactor);
00763
00764             ValidateContentWithConstrainedWidth(
00765                 compositor,
00766                 scrollPresenter,
00767                 content: imageScrollPresenterContent,
00768                 horizontalAlignment: HorizontalAlignment.Right,
00769                 leftMargin: c_leftMargin,
00770                 rightMargin: c_rightMargin,
00771                 expectedMinPosition: 0.0f,
00772                 expectedZoomFactor: c_largeZoomFactor);
00773
00774             ValidateContentWithConstrainedWidth(
00775                 compositor,
00776                 scrollPresenter,
00777                 content: imageScrollPresenterContent,
00778                 horizontalAlignment: HorizontalAlignment.Center,
00779                 leftMargin: c_leftMargin,
00780                 rightMargin: c_rightMargin,
00781                 expectedMinPosition: 0.0f,
00782                 expectedZoomFactor: c_largeZoomFactor);
00783         }
00784
00785         [TestMethod]
00786         [TestProperty("Description",
00787             "Sets ScrollPresenter.ContentOrientation to Horizontal and verifies Image positioning for Stretch alignment.")]
00788         public void BasicImageWithConstrainedHeight()
00789         {
00790             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00791             {
00792                 const float c_smallZoomFactor = 0.5f;
00793                 const double c_imageWidth = 250.0;
00794                 ScrollPresenter scrollPresenter = null;
00795                 Image imageScrollPresenterContent = null;
00796                 AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00797                 Compositor compositor = null;
00798
00799                 RunOnUIThread.Execute(() =>
00800                 {
00801                     imageScrollPresenterContent = new Image();
00802                     scrollPresenter = new ScrollPresenter();
00803
00804                     Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
00805                     Verify.IsNotNull(uri);
00806                     imageScrollPresenterContent.Source = new BitmapImage(uri);
00807                     scrollPresenter.Content = imageScrollPresenterContent;
00808                     scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00809
00810                     SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
00811
00812                 // Constraining the Image height and making the ScrollPresenter smaller than the Image
00813                 imageScrollPresenterContent.Width = c_imageWidth;
00814                     scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
00815                     compositor = CompositionTarget.GetCompositorForCurrentThread();
00816                 });
00817
00818                 WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00819
00820                 ValidateContentWithConstrainedHeight(
00821                     compositor,
00822                     scrollPresenter,
00823                     content: imageScrollPresenterContent,
00824                     verticalAlignment: VerticalAlignment.Stretch,
00825                     topMargin: 0.0,
00826                     bottomMargin: 0.0,
00827                     expectedMinPosition: 0f,
00828                     expectedZoomFactor: 1.0f);
00829
00830                 // Jump to absolute small zoomFactor to make the content smaller than the viewport.
00831                 ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00832
00833                 ValidateContentWithConstrainedHeight(
00834                     compositor,
00835                     scrollPresenter,
00836                     content: imageScrollPresenterContent,
00837                     verticalAlignment: VerticalAlignment.Stretch,
00838                     topMargin: 0.0,
00839                     bottomMargin: 0.0,
00840                     expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor / 2.0), // -50
00841                     expectedZoomFactor: c_smallZoomFactor);
00842             }
00843         }
00844
00845         [TestMethod]
00846         [TestProperty("Description",
00847             "Sets ScrollPresenter.ContentOrientation to Horizontal and verifies Image positioning for various alignments and zoom factors.")]
00848         public void ImageWithConstrainedHeight()
00849         {
00850             const float c_smallZoomFactor = 0.5f;
00851             const float c_largeZoomFactor = 2.0f;
00852             const double c_imageWidth = 250.0;
00853             const double c_topMargin = 40.0;
00854             const double c_bottomMargin = 10.0;
00855             ScrollPresenter scrollPresenter = null;
00856             Image imageScrollPresenterContent = null;
00857             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00858             Compositor compositor = null;
00859
00860             RunOnUIThread.Execute(() =>
00861             {
00862                 imageScrollPresenterContent = new Image();
00863                 scrollPresenter = new ScrollPresenter();
00864
00865                 Uri uri = new Uri("ms-appx:/Assets/ingredient3.png");
00866                 Verify.IsNotNull(uri);
00867                 imageScrollPresenterContent.Source = new BitmapImage(uri);
00868                 imageScrollPresenterContent.Margin = new Thickness(0, c_topMargin, 0, c_bottomMargin);
00869                 scrollPresenter.Content = imageScrollPresenterContent;
00870                 scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00871
00872                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
00873
00874                 // Constraining the Image height and making the ScrollPresenter smaller than the Image
00875                 imageScrollPresenterContent.Width = c_imageWidth;
00876                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.Horizontal;
00877                 compositor = CompositionTarget.GetCompositorForCurrentThread();
00878             });
00879
00880             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00881
00882             ValidateContentWithConstrainedHeight(
00883                 compositor,
00884                 scrollPresenter,
00885                 content: imageScrollPresenterContent,
00886                 verticalAlignment: VerticalAlignment.Stretch,
00887                 topMargin: c_topMargin,
00888                 bottomMargin: c_bottomMargin,
00889                 expectedMinPosition: 0f,
00890                 expectedZoomFactor: 1.0f);
00891
00892             // Jump to absolute small zoomFactor to make the content smaller than the viewport.
00893             ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00894
00895             ValidateContentWithConstrainedHeight(
00896                 compositor,
00897                 scrollPresenter,
00898                 content: imageScrollPresenterContent,
00899                 verticalAlignment: VerticalAlignment.Stretch,
00900                 topMargin: c_topMargin,
00901                 bottomMargin: c_bottomMargin,
00902                 expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor / 2.0), // -50
00903                 expectedZoomFactor: c_smallZoomFactor);
00904
00905             ValidateContentWithConstrainedHeight(
00906                 compositor,
00907                 scrollPresenter,
00908                 content: imageScrollPresenterContent,
00909                 verticalAlignment: VerticalAlignment.Top,
00910                 topMargin: c_topMargin,
00911                 bottomMargin: c_bottomMargin,
00912                 expectedMinPosition: 0.0f,
00913                 expectedZoomFactor: c_smallZoomFactor);
00914
00915             ValidateContentWithConstrainedHeight(
00916                 compositor,
00917                 scrollPresenter,
00918                 content: imageScrollPresenterContent,
00919                 verticalAlignment: VerticalAlignment.Bottom,
00920                 topMargin: c_topMargin,
00921                 bottomMargin: c_bottomMargin,
00922                 expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor), // -100
00923                 expectedZoomFactor: c_smallZoomFactor);
00924
00925             ValidateContentWithConstrainedHeight(
00926                 compositor,
00927                 scrollPresenter,
00928                 content: imageScrollPresenterContent,
00929                 verticalAlignment: VerticalAlignment.Center,
00930                 topMargin: c_topMargin,
00931                 bottomMargin: c_bottomMargin,
00932                 expectedMinPosition: (float)(-c_defaultUIScrollPresenterHeight * c_smallZoomFactor / 2.0), // -50
00933                 expectedZoomFactor: c_smallZoomFactor);
00934
00935             // Jump to absolute large zoomFactor to make the content larger than the viewport.
00936             ZoomTo(scrollPresenter, c_largeZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00937
00938             ValidateContentWithConstrainedHeight(
00939                 compositor,
00940                 scrollPresenter,
00941                 content: imageScrollPresenterContent,
00942                 verticalAlignment: VerticalAlignment.Stretch,
00943                 topMargin: c_topMargin,
00944                 bottomMargin: c_bottomMargin,
00945                 expectedMinPosition: 0.0f,
00946                 expectedZoomFactor: c_largeZoomFactor);
00947
00948             ValidateContentWithConstrainedHeight(
00949                 compositor,
00950                 scrollPresenter,
00951                 content: imageScrollPresenterContent,
00952                 verticalAlignment: VerticalAlignment.Top,
00953                 topMargin: c_topMargin,
00954                 bottomMargin: c_bottomMargin,
00955                 expectedMinPosition: 0.0f,
00956                 expectedZoomFactor: c_largeZoomFactor);
00957
00958             ValidateContentWithConstrainedHeight(
00959                 compositor,
00960                 scrollPresenter,
00961                 content: imageScrollPresenterContent,
00962                 verticalAlignment: VerticalAlignment.Bottom,
00963                 topMargin: c_topMargin,
00964                 bottomMargin: c_bottomMargin,
00965                 expectedMinPosition: 0.0f,
00966                 expectedZoomFactor: c_largeZoomFactor);
00967
00968             ValidateContentWithConstrainedHeight(
00969                 compositor,
00970                 scrollPresenter,
00971                 content: imageScrollPresenterContent,
00972                 verticalAlignment: VerticalAlignment.Center,
00973                 topMargin: c_topMargin,
00974                 bottomMargin: c_bottomMargin,
00975                 expectedMinPosition: 0.0f,
00976                 expectedZoomFactor: c_largeZoomFactor);
00977         }
00978
00979         [TestMethod]
00980         [TestProperty("Description",
00981             "Sets ScrollPresenter.ContentOrientation to Both and verifies Image positioning for various alignments and zoom factors.")]
00982         public void ImageWithConstrainedSize()
00983         {
00984             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00985             {
00986                 const float c_smallZoomFactor = 0.5f;
00987                 const float c_largeZoomFactor = 2.0f;
00988                 const double c_imageWidth = 2400;
00989                 const double c_imageHeight = 1400.0;
00990                 const double c_scrollPresenterWidth = 314.0;
00991                 const double c_scrollPresenterHeight = 210.0;
00992                 const double c_leftMargin = 20.0;
00993                 const double c_rightMargin = 30.0;
00994                 const double c_topMargin = 40.0;
00995                 const double c_bottomMargin = 10.0;
00996                 ScrollPresenter scrollPresenter = null;
00997                 Image imageScrollPresenterContent = null;
00998                 AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00999                 Compositor compositor = null;
01000
01001                 RunOnUIThread.Execute(() =>
01002                 {
01003                     imageScrollPresenterContent = new Image();
01004                     scrollPresenter = new ScrollPresenter();
01005
01006                     Uri uri = new Uri("ms-appx:/Assets/LargeWisteria.jpg");
01007                     Verify.IsNotNull(uri);
01008                     imageScrollPresenterContent.Source = new BitmapImage(uri);
01009                     imageScrollPresenterContent.Margin = new Thickness(c_leftMargin, c_topMargin, c_rightMargin, c_bottomMargin);
01010                     scrollPresenter.Content = imageScrollPresenterContent;
01011                     scrollPresenter.Background = new Media.SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
01012
01013                     SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent: null, scrollPresenterLoadedEvent);
01014
01015                 // Constraining the Image width and height, and making the ScrollPresenter smaller than the Image
01016                 scrollPresenter.ContentOrientation = ScrollingContentOrientation.None;
01017                     scrollPresenter.Width = c_scrollPresenterWidth;
01018                     scrollPresenter.Height = c_scrollPresenterHeight;
01019                     compositor = CompositionTarget.GetCompositorForCurrentThread();
01020                 });
01021
01022                 WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01023
01024                 ValidateContentWithConstrainedSize(
01025                     compositor,
01026                     scrollPresenter,
01027                     content: imageScrollPresenterContent,
01028                     horizontalAlignment: HorizontalAlignment.Stretch,
01029                     verticalAlignment: VerticalAlignment.Stretch,
01030                     expectedMinPositionX: 0.0f,
01031                     expectedMinPositionY: (float)-(c_scrollPresenterHeight - (c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth - c_topMargin - c_bottomMargin) / 2.0f, //-3
01032                     expectedZoomFactor: 1.0f);
01033
01034                 // Jump to absolute small zoomFactor to make the content smaller than the viewport.
01035                 ZoomTo(scrollPresenter, c_smallZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
01036
01037                 ValidateContentWithConstrainedSize(
01038                     compositor,
01039                     scrollPresenter,
01040                     content: imageScrollPresenterContent,
01041                     horizontalAlignment: HorizontalAlignment.Stretch,
01042                     verticalAlignment: VerticalAlignment.Stretch,
01043                     expectedMinPositionX: (float)-c_scrollPresenterWidth / 4.0f, // -78.5
01044                     expectedMinPositionY: (float)-(c_scrollPresenterHeight - ((c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth + c_topMargin + c_bottomMargin) * c_smallZoomFactor) / 2.0f, //-54
01045                     expectedZoomFactor: c_smallZoomFactor);
01046
01047                 // Jump to absolute large zoomFactor to make the content larger than the viewport.
01048                 ZoomTo(scrollPresenter, c_largeZoomFactor, 0.0f, 0.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
01049
01050                 ValidateContentWithConstrainedSize(
01051                     compositor,
01052                     scrollPresenter,
01053                     content: imageScrollPresenterContent,
01054                     horizontalAlignment: HorizontalAlignment.Stretch,
01055                     verticalAlignment: VerticalAlignment.Stretch,
01056                     expectedMinPositionX: 0.0f,
01057                     expectedMinPositionY: 0.0f,
01058                     expectedZoomFactor: c_largeZoomFactor);
01059             }
01060         }
01061
01062         [TestMethod]
01063         [TestProperty("Description", "Tests ScrollPresenter's view properties and methods with RightToLeft flow direction.")]
01064         public void RightToLeftFlowDirection()
01065         {
01066             ScrollPresenter scrollPresenter = null;
01067             Rectangle rectangleScrollPresenterContent = null;
01068             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
01069
01070             RunOnUIThread.Execute(() =>
01071             {
01072                 rectangleScrollPresenterContent = new Rectangle() {
01073                     Margin = new Thickness(25.0)
01074                 };
01075                 scrollPresenter = new ScrollPresenter();
01076
01077                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
01078             });
01079
01080             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01081
01082             // Jump to absolute offsets
01083             ScrollTo(
01084                 scrollPresenter,
01085                 11.0,
01086                 17.0,
01087                 ScrollingAnimationMode.Disabled,
01088                 ScrollingSnapPointsMode.Ignore,
01089                 hookViewChangingAndChanged: true,
01090                 isAnimationsEnabledOverride: null,
01091                 expectedFinalHorizontalOffset: 11.0,
01092                 expectedFinalVerticalOffset: 17.0);
01093
01094             // Jump to absolute zoom factor
01095             ZoomTo(
01096                 scrollPresenter,
01097                 2.0f,
01098                 0.0f,
01099                 0.0f,
01100                 ScrollingAnimationMode.Disabled,
01101                 ScrollingSnapPointsMode.Ignore,
01102                 hookViewChangingAndChanged: false);
01103
01104             IdleSynchronizer.Wait();
01105
01106             RunOnUIThread.Execute(() =>
01107             {
01108                 Log.Comment($"After view changes: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
01109                 Verify.AreEqual(22.0, scrollPresenter.HorizontalOffset);
01110                 Verify.AreEqual(34.0, scrollPresenter.VerticalOffset);
01111                 Verify.AreEqual(2.0f, scrollPresenter.ZoomFactor);
01112             });
01113
01114             RunOnUIThread.Execute(() =>
01115             {
01116                 scrollPresenter.FlowDirection = FlowDirection.RightToLeft;
01117             });
01118
01119             IdleSynchronizer.Wait();
01120
01121             RunOnUIThread.Execute(() =>
01122             {
01123                 Log.Comment($"After FlowDirection change: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
01124                 Verify.AreEqual(22.0, scrollPresenter.HorizontalOffset);
01125                 Verify.AreEqual(34.0, scrollPresenter.VerticalOffset);
01126                 Verify.AreEqual(2.0f, scrollPresenter.ZoomFactor);
01127             });
01128
01129             // Jump to absolute offsets in RightToLeft flow direction
01130             ScrollTo(
01131                 scrollPresenter,
01132                 7.0,
01133                 13.0,
01134                 ScrollingAnimationMode.Disabled,
01135                 ScrollingSnapPointsMode.Ignore,
01136                 hookViewChangingAndChanged: false,
01137                 isAnimationsEnabledOverride: null,
01138                 expectedFinalHorizontalOffset: 7.0,
01139                 expectedFinalVerticalOffset: 13.0);
01140
01141             // Jump to absolute zoom factor in RightToLeft flow direction
01142             ZoomTo(
01143                 scrollPresenter,
01144                 4.0f,
01145                 0.0f,
01146                 0.0f,
01147                 ScrollingAnimationMode.Disabled,
01148                 ScrollingSnapPointsMode.Ignore,
01149                 hookViewChangingAndChanged: false);
01150
01151             IdleSynchronizer.Wait();
01152
01153             RunOnUIThread.Execute(() =>
01154             {
01155                 Log.Comment($"After view changes in RightToLeft flow direction: HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
01156                 Verify.AreEqual(14.0, scrollPresenter.HorizontalOffset);
01157                 Verify.AreEqual(26.0, scrollPresenter.VerticalOffset);
01158                 Verify.AreEqual(4.0f, scrollPresenter.ZoomFactor);
01159             });
01160         }
01161
01162         private void ValidateContentWithConstrainedWidth(
01163             Compositor compositor,
01164             ScrollPresenter scrollPresenter,
01165             FrameworkElement content,
01166             HorizontalAlignment horizontalAlignment,
01167             double leftMargin,
01168             double rightMargin,
01169             float expectedMinPosition,
01170             float expectedZoomFactor)
01171         {
01172             const double c_scrollPresenterWidth = 200.0;
01173             float horizontalOffset = 0.0f;
01174             float verticalOffset = 0.0f;
01175             float zoomFactor = 1.0f;
01176             float expectedHorizontalOffset = 0.0f;
01177             float expectedVerticalOffset = 0.0f;
01178
01179             RunOnUIThread.Execute(() =>
01180             {
01181                 Log.Comment($"Covering alignment {horizontalAlignment.ToString()}");
01182                 content.HorizontalAlignment = horizontalAlignment;
01183             });
01184
01185             IdleSynchronizer.Wait();
01186
01187             RunOnUIThread.Execute(() =>
01188             {
01189                 Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
01190                 Vector2 arrangeRenderSizesDelta = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter);
01191                 Log.Comment($"MinPosition {minPosition.ToString()}");
01192                 Log.Comment($"ArrangeRenderSizesDelta {arrangeRenderSizesDelta.ToString()}");
01193                 Log.Comment($"Content.DesiredSize {content.DesiredSize.ToString()}");
01194                 Log.Comment($"Content.RenderSize {content.RenderSize.ToString()}");
01195
01196                 Verify.AreEqual(expectedMinPosition, minPosition.X);
01197                 Verify.AreEqual(horizontalAlignment, content.HorizontalAlignment);
01198                 Verify.AreEqual(c_scrollPresenterWidth, content.DesiredSize.Width); // 200
01199                 Verify.AreEqual(c_scrollPresenterWidth - leftMargin - rightMargin, content.RenderSize.Width);
01200                 double arrangeRenderSizesDeltaX = GetArrangeRenderSizesDelta(
01201                     BiDirectionalAlignmentFromHorizontalAlignment(horizontalAlignment),
01202                     extentSize: c_scrollPresenterWidth,
01203                     renderSize: c_scrollPresenterWidth - leftMargin - rightMargin,
01204                     nearMargin: leftMargin,
01205                     farMargin: rightMargin);
01206                 Verify.AreEqual(leftMargin, arrangeRenderSizesDeltaX);
01207                 Verify.AreEqual(arrangeRenderSizesDeltaX, arrangeRenderSizesDelta.X);
01208                 expectedHorizontalOffset = -minPosition.X + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.X;
01209                 expectedVerticalOffset = -minPosition.Y + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.Y;
01210             });
01211
01212             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
01213
01214             RunOnUIThread.Execute(() =>
01215             {
01216                 Log.Comment($"horizontalOffset={horizontalOffset}, verticalOffset={verticalOffset}, zoomFactor={zoomFactor}");
01217                 Log.Comment($"expectedHorizontalOffset={expectedHorizontalOffset}, expectedVerticalOffset={expectedVerticalOffset}, expectedZoomFactor={expectedZoomFactor}");
01218                 Verify.AreEqual(expectedHorizontalOffset, horizontalOffset);
01219                 Verify.AreEqual(expectedVerticalOffset, verticalOffset);
01220                 Verify.AreEqual(expectedZoomFactor, zoomFactor);
01221             });
01222         }
01223
01224         private void ValidateContentWithConstrainedHeight(
01225             Compositor compositor,
01226             ScrollPresenter scrollPresenter,
01227             FrameworkElement content,
01228             VerticalAlignment verticalAlignment,
01229             double topMargin,
01230             double bottomMargin,
01231             float expectedMinPosition,
01232             float expectedZoomFactor)
01233         {
01234             float horizontalOffset = 0.0f;
01235             float verticalOffset = 0.0f;
01236             float zoomFactor = 1.0f;
01237             float expectedHorizontalOffset = 0.0f;
01238             float expectedVerticalOffset = 0.0f;
01239
01240             RunOnUIThread.Execute(() =>
01241             {
01242                 Log.Comment($"Covering alignment {verticalAlignment.ToString()}");
01243                 content.VerticalAlignment = verticalAlignment;
01244             });
01245
01246             IdleSynchronizer.Wait();
01247
01248             RunOnUIThread.Execute(() =>
01249             {
01250                 Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
01251                 Vector2 arrangeRenderSizesDelta = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter);
01252                 Log.Comment($"MinPosition {minPosition.ToString()}");
01253                 Log.Comment($"ArrangeRenderSizesDelta {arrangeRenderSizesDelta.ToString()}");
01254                 Log.Comment($"Content.DesiredSize {content.DesiredSize.ToString()}");
01255                 Log.Comment($"Content.RenderSize {content.RenderSize.ToString()}");
01256
01257                 Verify.AreEqual(expectedMinPosition, minPosition.Y);
01258                 Verify.AreEqual(verticalAlignment, content.VerticalAlignment);
01259                 Verify.AreEqual(c_defaultUIScrollPresenterHeight, content.DesiredSize.Height);
01260                 Verify.AreEqual(c_defaultUIScrollPresenterHeight - topMargin - bottomMargin, content.RenderSize.Height);
01261                 double arrangeRenderSizesDeltaY = GetArrangeRenderSizesDelta(
01262                     BiDirectionalAlignmentFromVerticalAlignment(verticalAlignment),
01263                     extentSize: c_defaultUIScrollPresenterHeight,
01264                     renderSize: c_defaultUIScrollPresenterHeight - topMargin - bottomMargin,
01265                     nearMargin: topMargin,
01266                     farMargin: bottomMargin);
01267                 Verify.AreEqual(topMargin, arrangeRenderSizesDeltaY);
01268                 Verify.AreEqual(arrangeRenderSizesDeltaY, arrangeRenderSizesDelta.Y);
01269                 expectedVerticalOffset = -minPosition.Y + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.Y;
01270                 expectedHorizontalOffset = -minPosition.X + (expectedZoomFactor - 1.0f) * arrangeRenderSizesDelta.X;
01271             });
01272
01273             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
01274
01275             RunOnUIThread.Execute(() =>
01276             {
01277                 Log.Comment($"horizontalOffset={horizontalOffset}, verticalOffset={verticalOffset}, zoomFactor={zoomFactor}");
01278                 Log.Comment($"expectedHorizontalOffset={expectedHorizontalOffset}, expectedVerticalOffset={expectedVerticalOffset}, expectedZoomFactor={expectedZoomFactor}");
01279                 Verify.AreEqual(expectedHorizontalOffset, horizontalOffset);
01280                 Verify.AreEqual(expectedVerticalOffset, verticalOffset);
01281                 Verify.AreEqual(expectedZoomFactor, zoomFactor);
01282             });
01283         }
01284
01285         private void ValidateContentWithConstrainedSize(
01286             Compositor compositor,
01287             ScrollPresenter scrollPresenter,
01288             FrameworkElement content,
01289             HorizontalAlignment horizontalAlignment,
01290             VerticalAlignment verticalAlignment,
01291             float expectedMinPositionX,
01292             float expectedMinPositionY,
01293             float expectedZoomFactor)
01294         {
01295             const double c_leftMargin = 20.0;
01296             const double c_rightMargin = 30.0;
01297             const double c_topMargin = 40.0;
01298             const double c_bottomMargin = 10.0;
01299             const double c_scrollPresenterWidth = 314.0;
01300             const double c_scrollPresenterHeight = 210.0;
01301             const double c_imageWidth = 2400;
01302             const double c_imageHeight = 1400.0;
01303
01304             float horizontalOffset = 0.0f;
01305             float verticalOffset = 0.0f;
01306             float zoomFactor = 1.0f;
01307             double horizontalArrangeRenderSizesDelta = 0.0;
01308             double verticalArrangeRenderSizesDelta = 0.0;
01309             double expectedHorizontalOffset = 0.0;
01310             double expectedVerticalOffset = 0.0;
01311
01312             RunOnUIThread.Execute(() =>
01313             {
01314                 Log.Comment($"Covering alignments {horizontalAlignment.ToString()} and {verticalAlignment.ToString()}");
01315                 content.HorizontalAlignment = horizontalAlignment;
01316                 content.VerticalAlignment = verticalAlignment;
01317             });
01318
01319             IdleSynchronizer.Wait();
01320
01321             RunOnUIThread.Execute(() =>
01322             {
01323                 Verify.AreEqual(horizontalAlignment, content.HorizontalAlignment);
01324                 Verify.AreEqual(verticalAlignment, content.VerticalAlignment);
01325
01326                 Vector2 minPosition = ScrollPresenterTestHooks.GetMinPosition(scrollPresenter);
01327                 Vector2 arrangeRenderSizesDelta = ScrollPresenterTestHooks.GetArrangeRenderSizesDelta(scrollPresenter);
01328                 Log.Comment($"MinPosition {minPosition.ToString()}");
01329                 Log.Comment($"ArrangeRenderSizesDelta {arrangeRenderSizesDelta.ToString()}");
01330                 Log.Comment($"Content.DesiredSize {content.DesiredSize.ToString()}");
01331                 Log.Comment($"Content.RenderSize {content.RenderSize.ToString()}");
01332
01333                 Verify.AreEqual(expectedMinPositionX, minPosition.X);
01334                 Verify.AreEqual(expectedMinPositionY, minPosition.Y);
01335                 Verify.AreEqual(c_scrollPresenterWidth, content.DesiredSize.Width); // 314
01336                 Verify.AreEqual((c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth + c_topMargin + c_bottomMargin, content.DesiredSize.Height); // 204
01337                 Verify.AreEqual(c_scrollPresenterWidth - c_leftMargin - c_rightMargin, content.RenderSize.Width); // 264
01338                 Verify.AreEqual((c_scrollPresenterWidth - c_leftMargin - c_rightMargin) * c_imageHeight / c_imageWidth, content.RenderSize.Height); // 154
01339
01340                 horizontalArrangeRenderSizesDelta = GetArrangeRenderSizesDelta(
01341                     BiDirectionalAlignmentFromHorizontalAlignment(horizontalAlignment),
01342                     extentSize: c_scrollPresenterWidth,
01343                     renderSize: c_scrollPresenterWidth - c_leftMargin - c_rightMargin,
01344                     nearMargin: c_leftMargin,
01345                     farMargin: c_rightMargin);
01346                 Log.Comment($"horizontalArrangeRenderSizesDelta {horizontalArrangeRenderSizesDelta}");
01347                 Verify.AreEqual(c_leftMargin, horizontalArrangeRenderSizesDelta);
01348                 Verify.AreEqual(arrangeRenderSizesDelta.X, horizontalArrangeRenderSizesDelta);
01349                 expectedHorizontalOffset = -minPosition.X + (expectedZoomFactor - 1.0f) * horizontalArrangeRenderSizesDelta;
01350
01351                 verticalArrangeRenderSizesDelta = GetArrangeRenderSizesDelta(
01352                     BiDirectionalAlignmentFromVerticalAlignment(verticalAlignment),
01353                     extentSize: c_scrollPresenterHeight,
01354                     renderSize: c_scrollPresenterHeight - c_topMargin - c_bottomMargin,
01355                     nearMargin: c_topMargin,
01356                     farMargin: c_bottomMargin);
01357                 Log.Comment($"verticalArrangeRenderSizesDelta {verticalArrangeRenderSizesDelta}");
01358                 Verify.AreEqual(c_topMargin, verticalArrangeRenderSizesDelta);
01359                 Verify.AreEqual(arrangeRenderSizesDelta.Y, verticalArrangeRenderSizesDelta);
01360                 expectedVerticalOffset = -minPosition.Y + (expectedZoomFactor - 1.0f) * verticalArrangeRenderSizesDelta;
01361             });
01362
01363             SpyTranslationAndScale(scrollPresenter, compositor, out horizontalOffset, out verticalOffset, out zoomFactor);
01364
01365             RunOnUIThread.Execute(() =>
01366             {
01367                 Log.Comment($"horizontalOffset={horizontalOffset}, verticalOffset={verticalOffset}, zoomFactor={zoomFactor}");
01368                 Log.Comment($"expectedHorizontalOffset={expectedHorizontalOffset}, expectedVerticalOffset={expectedVerticalOffset}, expectedZoomFactor={expectedZoomFactor}");
01369                 Verify.AreEqual(expectedHorizontalOffset, horizontalOffset);
01370                 Verify.AreEqual(expectedVerticalOffset, verticalOffset);
01371                 Verify.AreEqual(expectedZoomFactor, zoomFactor);
01372             });
01373         }
01374
01375         private double GetArrangeRenderSizesDelta(
01376             BiDirectionalAlignment alignment,
01377             double extentSize,
01378             double renderSize,
01379             double nearMargin,
01380             double farMargin)
01381         {
01382             double delta = extentSize - renderSize;
01383
01384             if (alignment == BiDirectionalAlignment.Near)
01385             {
01386                 delta = 0.0;
01387             }
01388             else
01389             {
01390                 delta -= nearMargin + farMargin;
01391             }
01392
01393             if (alignment == BiDirectionalAlignment.Center ||
01394                 alignment == BiDirectionalAlignment.Stretch)
01395             {
01396                 delta /= 2.0;
01397             }
01398
01399             delta += nearMargin;
01400
01401             Log.Comment($"GetArrangeRenderSizesDelta returns {delta}.");
01402             return delta;
01403         }
01404
01405         private BiDirectionalAlignment BiDirectionalAlignmentFromHorizontalAlignment(HorizontalAlignment horizontalAlignment)
01406         {
01407             switch (horizontalAlignment)
01408             {
01409                 case HorizontalAlignment.Stretch:
01410                     return BiDirectionalAlignment.Stretch;
01411                 case HorizontalAlignment.Left:
01412                     return BiDirectionalAlignment.Near;
01413                 case HorizontalAlignment.Right:
01414                     return BiDirectionalAlignment.Far;
01415                 default:
01416                     return BiDirectionalAlignment.Center;
01417             }
01418         }
01419
01420         private BiDirectionalAlignment BiDirectionalAlignmentFromVerticalAlignment(VerticalAlignment verticalAlignment)
01421         {
01422             switch (verticalAlignment)
01423             {
01424                 case VerticalAlignment.Stretch:
01425                     return BiDirectionalAlignment.Stretch;
01426                 case VerticalAlignment.Top:
01427                     return BiDirectionalAlignment.Near;
01428                 case VerticalAlignment.Bottom:
01429                     return BiDirectionalAlignment.Far;
01430                 default:
01431                     return BiDirectionalAlignment.Center;
01432             }
01433         }
01434     }
01435 }
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/NamedGroup.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

NamedGroup.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using System.Collections.ObjectModel;
00006 using MUXControlsTestApp.Utilities;
00007
00008 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00009 {
00010     public class NamedGroup<T> : ObservableCollection<T>
00011     {
00012         public string Name { get; private set; }
00013
00014         public NamedGroup(string name, IEnumerable<T> collection)
00015             : base(collection)
00016         {
00017             Name = name;
00018         }
00019     }
00020 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationView.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationView.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationView.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(NavigationView)
00012 }
00013
00014 #include "NavigationView.g.cpp"
00015
00016 GlobalDependencyProperty NavigationViewProperties::s_AlwaysShowHeaderProperty{ nullptr };
00017 GlobalDependencyProperty NavigationViewProperties::s_AutoSuggestBoxProperty{ nullptr };
00018 GlobalDependencyProperty NavigationViewProperties::s_CompactModeThresholdWidthProperty{ nullptr };
00019 GlobalDependencyProperty NavigationViewProperties::s_CompactPaneLengthProperty{ nullptr };
00020 GlobalDependencyProperty NavigationViewProperties::s_ContentOverlayProperty{ nullptr };
00021 GlobalDependencyProperty NavigationViewProperties::s_DisplayModeProperty{ nullptr };
00022 GlobalDependencyProperty NavigationViewProperties::s_ExpandedModeThresholdWidthProperty{ nullptr };
00023 GlobalDependencyProperty NavigationViewProperties::s_FooterMenuItemsProperty{ nullptr };
00024 GlobalDependencyProperty NavigationViewProperties::s_FooterMenuItemsSourceProperty{ nullptr };
00025 GlobalDependencyProperty NavigationViewProperties::s_HeaderProperty{ nullptr };
00026 GlobalDependencyProperty NavigationViewProperties::s_HeaderTemplateProperty{ nullptr };
00027 GlobalDependencyProperty NavigationViewProperties::s_IsBackButtonVisibleProperty{ nullptr };
00028 GlobalDependencyProperty NavigationViewProperties::s_IsBackEnabledProperty{ nullptr };
00029 GlobalDependencyProperty NavigationViewProperties::s_IsPaneOpenProperty{ nullptr };
00030 GlobalDependencyProperty NavigationViewProperties::s_IsPaneToggleButtonVisibleProperty{ nullptr };
00031 GlobalDependencyProperty NavigationViewProperties::s_IsPaneVisibleProperty{ nullptr };
00032 GlobalDependencyProperty NavigationViewProperties::s_IsSettingsVisibleProperty{ nullptr };
00033 GlobalDependencyProperty NavigationViewProperties::s_IsTitleBarAutoPaddingEnabledProperty{ nullptr };
00034 GlobalDependencyProperty NavigationViewProperties::s_MenuItemContainerStyleProperty{ nullptr };
00035 GlobalDependencyProperty NavigationViewProperties::s_MenuItemContainerStyleSelectorProperty{ nullptr };
00036 GlobalDependencyProperty NavigationViewProperties::s_MenuItemsProperty{ nullptr };
00037 GlobalDependencyProperty NavigationViewProperties::s_MenuItemsSourceProperty{ nullptr };
00038 GlobalDependencyProperty NavigationViewProperties::s_MenuItemTemplateProperty{ nullptr };
00039 GlobalDependencyProperty NavigationViewProperties::s_MenuItemTemplateSelectorProperty{ nullptr };
00040 GlobalDependencyProperty NavigationViewProperties::s_OpenPaneLengthProperty{ nullptr };
00041 GlobalDependencyProperty NavigationViewProperties::s_OverflowLabelModeProperty{ nullptr };
00042 GlobalDependencyProperty NavigationViewProperties::s_PaneCustomContentProperty{ nullptr };
00043 GlobalDependencyProperty NavigationViewProperties::s_PaneDisplayModeProperty{ nullptr };
00044 GlobalDependencyProperty NavigationViewProperties::s_PaneFooterProperty{ nullptr };
00045 GlobalDependencyProperty NavigationViewProperties::s_PaneHeaderProperty{ nullptr };
00046 GlobalDependencyProperty NavigationViewProperties::s_PaneTitleProperty{ nullptr };
00047 GlobalDependencyProperty NavigationViewProperties::s_PaneToggleButtonStyleProperty{ nullptr };
00048 GlobalDependencyProperty NavigationViewProperties::s_SelectedItemProperty{ nullptr };
00049 GlobalDependencyProperty NavigationViewProperties::s_SelectionFollowsFocusProperty{ nullptr };
00050 GlobalDependencyProperty NavigationViewProperties::s_SettingsItemProperty{ nullptr };
00051 GlobalDependencyProperty NavigationViewProperties::s_ShoulderNavigationEnabledProperty{ nullptr };
00052 GlobalDependencyProperty NavigationViewProperties::s_TemplateSettingsProperty{ nullptr };
00053
00054 NavigationViewProperties::NavigationViewProperties()
00055     : m_backRequestedEventSource{static_cast<NavigationView*>(this)}
00056     , m_collapsedEventSource{static_cast<NavigationView*>(this)}
00057     , m_displayModeChangedEventSource{static_cast<NavigationView*>(this)}
00058     , m_expandingEventSource{static_cast<NavigationView*>(this)}
00059     , m_itemInvokedEventSource{static_cast<NavigationView*>(this)}
00060     , m_paneClosedEventSource{static_cast<NavigationView*>(this)}
00061     , m_paneClosingEventSource{static_cast<NavigationView*>(this)}
00062     , m_paneOpenedEventSource{static_cast<NavigationView*>(this)}
00063     , m_paneOpeningEventSource{static_cast<NavigationView*>(this)}
00064     , m_selectionChangedEventSource{static_cast<NavigationView*>(this)}
00065 {
00066     EnsureProperties();
00067 }
00068
00069 void NavigationViewProperties::EnsureProperties()
00070 {
00071     if (!s_AlwaysShowHeaderProperty)
00072     {
00073         s_AlwaysShowHeaderProperty =
00074             InitializeDependencyProperty(
00075                 L"AlwaysShowHeader",
00076                 winrt::name_of<bool>(),
00077                 winrt::name_of<winrt::NavigationView>(),
00078                 false /* isAttached */,
00079                 ValueHelper<bool>::BoxValueIfNecessary(true),
00080                 winrt::PropertyChangedCallback(&OnAlwaysShowHeaderPropertyChanged));
00081     }
00082     if (!s_AutoSuggestBoxProperty)
00083     {
00084         s_AutoSuggestBoxProperty =
00085             InitializeDependencyProperty(
00086                 L"AutoSuggestBox",
00087                 winrt::name_of<winrt::AutoSuggestBox>(),
00088                 winrt::name_of<winrt::NavigationView>(),
00089                 false /* isAttached */,
00090                 ValueHelper<winrt::AutoSuggestBox>::BoxedDefaultValue(),
00091                 winrt::PropertyChangedCallback(&OnAutoSuggestBoxPropertyChanged));
00092     }
00093     if (!s_CompactModeThresholdWidthProperty)
00094     {
00095         s_CompactModeThresholdWidthProperty =
00096             InitializeDependencyProperty(
00097                 L"CompactModeThresholdWidth",
00098                 winrt::name_of<double>(),
00099                 winrt::name_of<winrt::NavigationView>(),
00100                 false /* isAttached */,
00101                 ValueHelper<double>::BoxValueIfNecessary(641.0),
00102                 winrt::PropertyChangedCallback(&OnCompactModeThresholdWidthPropertyChanged));
00103     }
00104     if (!s_CompactPaneLengthProperty)
00105     {
00106         s_CompactPaneLengthProperty =
00107             InitializeDependencyProperty(
00108                 L"CompactPaneLength",
00109                 winrt::name_of<double>(),
00110                 winrt::name_of<winrt::NavigationView>(),
00111                 false /* isAttached */,
00112                 ValueHelper<double>::BoxValueIfNecessary(48.0),
00113                 winrt::PropertyChangedCallback(&OnCompactPaneLengthPropertyChanged));
00114     }
00115     if (!s_ContentOverlayProperty)
00116     {
00117         s_ContentOverlayProperty =
00118             InitializeDependencyProperty(
00119                 L"ContentOverlay",
00120                 winrt::name_of<winrt::UIElement>(),
00121                 winrt::name_of<winrt::NavigationView>(),
00122                 false /* isAttached */,
00123                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00124                 nullptr);
00125     }
00126     if (!s_DisplayModeProperty)
00127     {
00128         s_DisplayModeProperty =
00129             InitializeDependencyProperty(
00130                 L"DisplayMode",
00131                 winrt::name_of<winrt::NavigationViewDisplayMode>(),
00132                 winrt::name_of<winrt::NavigationView>(),
00133                 false /* isAttached */,
00134                 ValueHelper<winrt::NavigationViewDisplayMode>::BoxValueIfNecessary(winrt::NavigationViewDisplayMode::Minimal),
00135                 winrt::PropertyChangedCallback(&OnDisplayModePropertyChanged));
00136     }
00137     if (!s_ExpandedModeThresholdWidthProperty)
00138     {
00139         s_ExpandedModeThresholdWidthProperty =
00140             InitializeDependencyProperty(
00141                 L"ExpandedModeThresholdWidth",
00142                 winrt::name_of<double>(),
00143                 winrt::name_of<winrt::NavigationView>(),
00144                 false /* isAttached */,
00145                 ValueHelper<double>::BoxValueIfNecessary(1008.0),
00146                 winrt::PropertyChangedCallback(&OnExpandedModeThresholdWidthPropertyChanged));
00147     }
00148     if (!s_FooterMenuItemsProperty)
00149     {
00150         s_FooterMenuItemsProperty =
00151             InitializeDependencyProperty(
00152                 L"FooterMenuItems",
00153                 winrt::name_of<winrt::IVector<winrt::IInspectable>>(),
00154                 winrt::name_of<winrt::NavigationView>(),
00155                 false /* isAttached */,
00156                 ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxedDefaultValue(),
00157                 winrt::PropertyChangedCallback(&OnFooterMenuItemsPropertyChanged));
00158     }
00159     if (!s_FooterMenuItemsSourceProperty)
00160     {
00161         s_FooterMenuItemsSourceProperty =
00162             InitializeDependencyProperty(
00163                 L"FooterMenuItemsSource",
00164                 winrt::name_of<winrt::IInspectable>(),
00165                 winrt::name_of<winrt::NavigationView>(),
00166                 false /* isAttached */,
00167                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00168                 winrt::PropertyChangedCallback(&OnFooterMenuItemsSourcePropertyChanged));
00169     }
00170     if (!s_HeaderProperty)
00171     {
00172         s_HeaderProperty =
00173             InitializeDependencyProperty(
00174                 L"Header",
00175                 winrt::name_of<winrt::IInspectable>(),
00176                 winrt::name_of<winrt::NavigationView>(),
00177                 false /* isAttached */,
00178                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00179                 winrt::PropertyChangedCallback(&OnHeaderPropertyChanged));
00180     }
00181     if (!s_HeaderTemplateProperty)
00182     {
00183         s_HeaderTemplateProperty =
00184             InitializeDependencyProperty(
00185                 L"HeaderTemplate",
00186                 winrt::name_of<winrt::DataTemplate>(),
00187                 winrt::name_of<winrt::NavigationView>(),
00188                 false /* isAttached */,
00189                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00190                 winrt::PropertyChangedCallback(&OnHeaderTemplatePropertyChanged));
00191     }
00192     if (!s_IsBackButtonVisibleProperty)
00193     {
00194         s_IsBackButtonVisibleProperty =
00195             InitializeDependencyProperty(
00196                 L"IsBackButtonVisible",
00197                 winrt::name_of<winrt::NavigationViewBackButtonVisible>(),
00198                 winrt::name_of<winrt::NavigationView>(),
00199                 false /* isAttached */,
00200                 ValueHelper<winrt::NavigationViewBackButtonVisible>::BoxValueIfNecessary(winrt::NavigationViewBackButtonVisible::Auto),
00201                 winrt::PropertyChangedCallback(&OnIsBackButtonVisiblePropertyChanged));
00202     }
00203     if (!s_IsBackEnabledProperty)
00204     {
00205         s_IsBackEnabledProperty =
00206             InitializeDependencyProperty(
00207                 L"IsBackEnabled",
00208                 winrt::name_of<bool>(),
00209                 winrt::name_of<winrt::NavigationView>(),
00210                 false /* isAttached */,
00211                 ValueHelper<bool>::BoxedDefaultValue(),
00212                 winrt::PropertyChangedCallback(&OnIsBackEnabledPropertyChanged));
00213     }
00214     if (!s_IsPaneOpenProperty)
00215     {
00216         s_IsPaneOpenProperty =
00217             InitializeDependencyProperty(
00218                 L"IsPaneOpen",
00219                 winrt::name_of<bool>(),
00220                 winrt::name_of<winrt::NavigationView>(),
00221                 false /* isAttached */,
00222                 ValueHelper<bool>::BoxValueIfNecessary(true),
00223                 winrt::PropertyChangedCallback(&OnIsPaneOpenPropertyChanged));
00224     }
00225     if (!s_IsPaneToggleButtonVisibleProperty)
00226     {
00227         s_IsPaneToggleButtonVisibleProperty =
00228             InitializeDependencyProperty(
00229                 L"IsPaneToggleButtonVisible",
00230                 winrt::name_of<bool>(),
00231                 winrt::name_of<winrt::NavigationView>(),
00232                 false /* isAttached */,
00233                 ValueHelper<bool>::BoxValueIfNecessary(true),
00234                 winrt::PropertyChangedCallback(&OnIsPaneToggleButtonVisiblePropertyChanged));
00235     }
00236     if (!s_IsPaneVisibleProperty)
00237     {
00238         s_IsPaneVisibleProperty =
00239             InitializeDependencyProperty(
00240                 L"IsPaneVisible",
00241                 winrt::name_of<bool>(),
00242                 winrt::name_of<winrt::NavigationView>(),
00243                 false /* isAttached */,
00244                 ValueHelper<bool>::BoxValueIfNecessary(true),
00245                 winrt::PropertyChangedCallback(&OnIsPaneVisiblePropertyChanged));
00246     }
00247     if (!s_IsSettingsVisibleProperty)
00248     {
00249         s_IsSettingsVisibleProperty =
00250             InitializeDependencyProperty(
00251                 L"IsSettingsVisible",
00252                 winrt::name_of<bool>(),
00253                 winrt::name_of<winrt::NavigationView>(),
00254                 false /* isAttached */,
00255                 ValueHelper<bool>::BoxValueIfNecessary(true),
00256                 winrt::PropertyChangedCallback(&OnIsSettingsVisiblePropertyChanged));
00257     }
00258     if (!s_IsTitleBarAutoPaddingEnabledProperty)
00259     {
00260         s_IsTitleBarAutoPaddingEnabledProperty =
00261             InitializeDependencyProperty(
00262                 L"IsTitleBarAutoPaddingEnabled",
00263                 winrt::name_of<bool>(),
00264                 winrt::name_of<winrt::NavigationView>(),
00265                 false /* isAttached */,
00266                 ValueHelper<bool>::BoxValueIfNecessary(true),
00267                 winrt::PropertyChangedCallback(&OnIsTitleBarAutoPaddingEnabledPropertyChanged));
00268     }
00269     if (!s_MenuItemContainerStyleProperty)
00270     {
00271         s_MenuItemContainerStyleProperty =
00272             InitializeDependencyProperty(
00273                 L"MenuItemContainerStyle",
00274                 winrt::name_of<winrt::Style>(),
00275                 winrt::name_of<winrt::NavigationView>(),
00276                 false /* isAttached */,
00277                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00278                 winrt::PropertyChangedCallback(&OnMenuItemContainerStylePropertyChanged));
00279     }
00280     if (!s_MenuItemContainerStyleSelectorProperty)
00281     {
00282         s_MenuItemContainerStyleSelectorProperty =
00283             InitializeDependencyProperty(
00284                 L"MenuItemContainerStyleSelector",
00285                 winrt::name_of<winrt::StyleSelector>(),
00286                 winrt::name_of<winrt::NavigationView>(),
00287                 false /* isAttached */,
00288                 ValueHelper<winrt::StyleSelector>::BoxedDefaultValue(),
00289                 winrt::PropertyChangedCallback(&OnMenuItemContainerStyleSelectorPropertyChanged));
00290     }
00291     if (!s_MenuItemsProperty)
00292     {
00293         s_MenuItemsProperty =
00294             InitializeDependencyProperty(
00295                 L"MenuItems",
00296                 winrt::name_of<winrt::IVector<winrt::IInspectable>>(),
00297                 winrt::name_of<winrt::NavigationView>(),
00298                 false /* isAttached */,
00299                 ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxedDefaultValue(),
00300                 winrt::PropertyChangedCallback(&OnMenuItemsPropertyChanged));
00301     }
00302     if (!s_MenuItemsSourceProperty)
00303     {
00304         s_MenuItemsSourceProperty =
00305             InitializeDependencyProperty(
00306                 L"MenuItemsSource",
00307                 winrt::name_of<winrt::IInspectable>(),
00308                 winrt::name_of<winrt::NavigationView>(),
00309                 false /* isAttached */,
00310                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00311                 winrt::PropertyChangedCallback(&OnMenuItemsSourcePropertyChanged));
00312     }
00313     if (!s_MenuItemTemplateProperty)
00314     {
00315         s_MenuItemTemplateProperty =
00316             InitializeDependencyProperty(
00317                 L"MenuItemTemplate",
00318                 winrt::name_of<winrt::DataTemplate>(),
00319                 winrt::name_of<winrt::NavigationView>(),
00320                 false /* isAttached */,
00321                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00322                 winrt::PropertyChangedCallback(&OnMenuItemTemplatePropertyChanged));
00323     }
00324     if (!s_MenuItemTemplateSelectorProperty)
00325     {
00326         s_MenuItemTemplateSelectorProperty =
00327             InitializeDependencyProperty(
00328                 L"MenuItemTemplateSelector",
00329                 winrt::name_of<winrt::DataTemplateSelector>(),
00330                 winrt::name_of<winrt::NavigationView>(),
00331                 false /* isAttached */,
00332                 ValueHelper<winrt::DataTemplateSelector>::BoxedDefaultValue(),
00333                 winrt::PropertyChangedCallback(&OnMenuItemTemplateSelectorPropertyChanged));
00334     }
00335     if (!s_OpenPaneLengthProperty)
00336     {
00337         s_OpenPaneLengthProperty =
00338             InitializeDependencyProperty(
00339                 L"OpenPaneLength",
00340                 winrt::name_of<double>(),
00341                 winrt::name_of<winrt::NavigationView>(),
00342                 false /* isAttached */,
00343                 ValueHelper<double>::BoxValueIfNecessary(320.0),
00344                 winrt::PropertyChangedCallback(&OnOpenPaneLengthPropertyChanged));
00345     }
00346     if (!s_OverflowLabelModeProperty)
00347     {
00348         s_OverflowLabelModeProperty =
00349             InitializeDependencyProperty(
00350                 L"OverflowLabelMode",
00351                 winrt::name_of<winrt::NavigationViewOverflowLabelMode>(),
00352                 winrt::name_of<winrt::NavigationView>(),
00353                 false /* isAttached */,
00354                 ValueHelper<winrt::NavigationViewOverflowLabelMode>::BoxValueIfNecessary(winrt::NavigationViewOverflowLabelMode::MoreLabel),
00355                 winrt::PropertyChangedCallback(&OnOverflowLabelModePropertyChanged));
00356     }
00357     if (!s_PaneCustomContentProperty)
00358     {
00359         s_PaneCustomContentProperty =
00360             InitializeDependencyProperty(
00361                 L"PaneCustomContent",
00362                 winrt::name_of<winrt::UIElement>(),
00363                 winrt::name_of<winrt::NavigationView>(),
00364                 false /* isAttached */,
00365                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00366                 nullptr);
00367     }
00368     if (!s_PaneDisplayModeProperty)
00369     {
00370         s_PaneDisplayModeProperty =
00371             InitializeDependencyProperty(
00372                 L"PaneDisplayMode",
00373                 winrt::name_of<winrt::NavigationViewPaneDisplayMode>(),
00374                 winrt::name_of<winrt::NavigationView>(),
00375                 false /* isAttached */,
00376                 ValueHelper<winrt::NavigationViewPaneDisplayMode>::BoxValueIfNecessary(winrt::NavigationViewPaneDisplayMode::Auto),
00377                 winrt::PropertyChangedCallback(&OnPaneDisplayModePropertyChanged));
00378     }
00379     if (!s_PaneFooterProperty)
00380     {
00381         s_PaneFooterProperty =
00382             InitializeDependencyProperty(
00383                 L"PaneFooter",
00384                 winrt::name_of<winrt::UIElement>(),
00385                 winrt::name_of<winrt::NavigationView>(),
00386                 false /* isAttached */,
00387                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00388                 winrt::PropertyChangedCallback(&OnPaneFooterPropertyChanged));
00389     }
00390     if (!s_PaneHeaderProperty)
00391     {
00392         s_PaneHeaderProperty =
00393             InitializeDependencyProperty(
00394                 L"PaneHeader",
00395                 winrt::name_of<winrt::UIElement>(),
00396                 winrt::name_of<winrt::NavigationView>(),
00397                 false /* isAttached */,
00398                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00399                 nullptr);
00400     }
00401     if (!s_PaneTitleProperty)
00402     {
00403         s_PaneTitleProperty =
00404             InitializeDependencyProperty(
00405                 L"PaneTitle",
00406                 winrt::name_of<winrt::hstring>(),
00407                 winrt::name_of<winrt::NavigationView>(),
00408                 false /* isAttached */,
00409                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00410                 winrt::PropertyChangedCallback(&OnPaneTitlePropertyChanged));
00411     }
00412     if (!s_PaneToggleButtonStyleProperty)
00413     {
00414         s_PaneToggleButtonStyleProperty =
00415             InitializeDependencyProperty(
00416                 L"PaneToggleButtonStyle",
00417                 winrt::name_of<winrt::Style>(),
00418                 winrt::name_of<winrt::NavigationView>(),
00419                 false /* isAttached */,
00420                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00421                 winrt::PropertyChangedCallback(&OnPaneToggleButtonStylePropertyChanged));
00422     }
00423     if (!s_SelectedItemProperty)
00424     {
00425         s_SelectedItemProperty =
00426             InitializeDependencyProperty(
00427                 L"SelectedItem",
00428                 winrt::name_of<winrt::IInspectable>(),
00429                 winrt::name_of<winrt::NavigationView>(),
00430                 false /* isAttached */,
00431                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00432                 winrt::PropertyChangedCallback(&OnSelectedItemPropertyChanged));
00433     }
00434     if (!s_SelectionFollowsFocusProperty)
00435     {
00436         s_SelectionFollowsFocusProperty =
00437             InitializeDependencyProperty(
00438                 L"SelectionFollowsFocus",
00439                 winrt::name_of<winrt::NavigationViewSelectionFollowsFocus>(),
00440                 winrt::name_of<winrt::NavigationView>(),
00441                 false /* isAttached */,
00442                 ValueHelper<winrt::NavigationViewSelectionFollowsFocus>::BoxValueIfNecessary(winrt::NavigationViewSelectionFollowsFocus::Disabled),
00443                 winrt::PropertyChangedCallback(&OnSelectionFollowsFocusPropertyChanged));
00444     }
00445     if (!s_SettingsItemProperty)
00446     {
00447         s_SettingsItemProperty =
00448             InitializeDependencyProperty(
00449                 L"SettingsItem",
00450                 winrt::name_of<winrt::IInspectable>(),
00451                 winrt::name_of<winrt::NavigationView>(),
00452                 false /* isAttached */,
00453                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00454                 winrt::PropertyChangedCallback(&OnSettingsItemPropertyChanged));
00455     }
00456     if (!s_ShoulderNavigationEnabledProperty)
00457     {
00458         s_ShoulderNavigationEnabledProperty =
00459             InitializeDependencyProperty(
00460                 L"ShoulderNavigationEnabled",
00461                 winrt::name_of<winrt::NavigationViewShoulderNavigationEnabled>(),
00462                 winrt::name_of<winrt::NavigationView>(),
00463                 false /* isAttached */,
00464                 ValueHelper<winrt::NavigationViewShoulderNavigationEnabled>::BoxValueIfNecessary(winrt::NavigationViewShoulderNavigationEnabled::Never),
00465                 winrt::PropertyChangedCallback(&OnShoulderNavigationEnabledPropertyChanged));
00466     }
00467     if (!s_TemplateSettingsProperty)
00468     {
00469         s_TemplateSettingsProperty =
00470             InitializeDependencyProperty(
00471                 L"TemplateSettings",
00472                 winrt::name_of<winrt::NavigationViewTemplateSettings>(),
00473                 winrt::name_of<winrt::NavigationView>(),
00474                 false /* isAttached */,
00475                 ValueHelper<winrt::NavigationViewTemplateSettings>::BoxedDefaultValue(),
00476                 nullptr);
00477     }
00478 }
00479
00480 void NavigationViewProperties::ClearProperties()
00481 {
00482     s_AlwaysShowHeaderProperty = nullptr;
00483     s_AutoSuggestBoxProperty = nullptr;
00484     s_CompactModeThresholdWidthProperty = nullptr;
00485     s_CompactPaneLengthProperty = nullptr;
00486     s_ContentOverlayProperty = nullptr;
00487     s_DisplayModeProperty = nullptr;
00488     s_ExpandedModeThresholdWidthProperty = nullptr;
00489     s_FooterMenuItemsProperty = nullptr;
00490     s_FooterMenuItemsSourceProperty = nullptr;
00491     s_HeaderProperty = nullptr;
00492     s_HeaderTemplateProperty = nullptr;
00493     s_IsBackButtonVisibleProperty = nullptr;
00494     s_IsBackEnabledProperty = nullptr;
00495     s_IsPaneOpenProperty = nullptr;
00496     s_IsPaneToggleButtonVisibleProperty = nullptr;
00497     s_IsPaneVisibleProperty = nullptr;
00498     s_IsSettingsVisibleProperty = nullptr;
00499     s_IsTitleBarAutoPaddingEnabledProperty = nullptr;
00500     s_MenuItemContainerStyleProperty = nullptr;
00501     s_MenuItemContainerStyleSelectorProperty = nullptr;
00502     s_MenuItemsProperty = nullptr;
00503     s_MenuItemsSourceProperty = nullptr;
00504     s_MenuItemTemplateProperty = nullptr;
00505     s_MenuItemTemplateSelectorProperty = nullptr;
00506     s_OpenPaneLengthProperty = nullptr;
00507     s_OverflowLabelModeProperty = nullptr;
00508     s_PaneCustomContentProperty = nullptr;
00509     s_PaneDisplayModeProperty = nullptr;
00510     s_PaneFooterProperty = nullptr;
00511     s_PaneHeaderProperty = nullptr;
00512     s_PaneTitleProperty = nullptr;
00513     s_PaneToggleButtonStyleProperty = nullptr;
00514     s_SelectedItemProperty = nullptr;
00515     s_SelectionFollowsFocusProperty = nullptr;
00516     s_SettingsItemProperty = nullptr;
00517     s_ShoulderNavigationEnabledProperty = nullptr;
00518     s_TemplateSettingsProperty = nullptr;
00519 }
00520
00521 void NavigationViewProperties::OnAlwaysShowHeaderPropertyChanged(
00522     winrt::DependencyObject const& sender,
00523     winrt::DependencyPropertyChangedEventArgs const& args)
00524 {
00525     auto owner = sender.as<winrt::NavigationView>();
00526     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00527 }
00528
00529 void NavigationViewProperties::OnAutoSuggestBoxPropertyChanged(
00530     winrt::DependencyObject const& sender,
00531     winrt::DependencyPropertyChangedEventArgs const& args)
00532 {
00533     auto owner = sender.as<winrt::NavigationView>();
00534     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00535 }
00536
00537 void NavigationViewProperties::OnCompactModeThresholdWidthPropertyChanged(
00538     winrt::DependencyObject const& sender,
00539     winrt::DependencyPropertyChangedEventArgs const& args)
00540 {
00541     auto owner = sender.as<winrt::NavigationView>();
00542
00543     auto value = winrt::unbox_value<double>(args.NewValue());
00544     auto coercedValue = value;
00545     winrt::get_self<NavigationView>(owner)->CoerceToGreaterThanZero(coercedValue);
00546     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00547     {
00548         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00549         return;
00550     }
00551
00552     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00553 }
00554
00555 void NavigationViewProperties::OnCompactPaneLengthPropertyChanged(
00556     winrt::DependencyObject const& sender,
00557     winrt::DependencyPropertyChangedEventArgs const& args)
00558 {
00559     auto owner = sender.as<winrt::NavigationView>();
00560
00561     auto value = winrt::unbox_value<double>(args.NewValue());
00562     auto coercedValue = value;
00563     winrt::get_self<NavigationView>(owner)->CoerceToGreaterThanZero(coercedValue);
00564     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00565     {
00566         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00567         return;
00568     }
00569
00570     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00571 }
00572
00573 void NavigationViewProperties::OnDisplayModePropertyChanged(
00574     winrt::DependencyObject const& sender,
00575     winrt::DependencyPropertyChangedEventArgs const& args)
00576 {
00577     auto owner = sender.as<winrt::NavigationView>();
00578     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00579 }
00580
00581 void NavigationViewProperties::OnExpandedModeThresholdWidthPropertyChanged(
00582     winrt::DependencyObject const& sender,
00583     winrt::DependencyPropertyChangedEventArgs const& args)
00584 {
00585     auto owner = sender.as<winrt::NavigationView>();
00586
00587     auto value = winrt::unbox_value<double>(args.NewValue());
00588     auto coercedValue = value;
00589     winrt::get_self<NavigationView>(owner)->CoerceToGreaterThanZero(coercedValue);
00590     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00591     {
00592         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00593         return;
00594     }
00595
00596     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00597 }
00598
00599 void NavigationViewProperties::OnFooterMenuItemsPropertyChanged(
00600     winrt::DependencyObject const& sender,
00601     winrt::DependencyPropertyChangedEventArgs const& args)
00602 {
00603     auto owner = sender.as<winrt::NavigationView>();
00604     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00605 }
00606
00607 void NavigationViewProperties::OnFooterMenuItemsSourcePropertyChanged(
00608     winrt::DependencyObject const& sender,
00609     winrt::DependencyPropertyChangedEventArgs const& args)
00610 {
00611     auto owner = sender.as<winrt::NavigationView>();
00612     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00613 }
00614
00615 void NavigationViewProperties::OnHeaderPropertyChanged(
00616     winrt::DependencyObject const& sender,
00617     winrt::DependencyPropertyChangedEventArgs const& args)
00618 {
00619     auto owner = sender.as<winrt::NavigationView>();
00620     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00621 }
00622
00623 void NavigationViewProperties::OnHeaderTemplatePropertyChanged(
00624     winrt::DependencyObject const& sender,
00625     winrt::DependencyPropertyChangedEventArgs const& args)
00626 {
00627     auto owner = sender.as<winrt::NavigationView>();
00628     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00629 }
00630
00631 void NavigationViewProperties::OnIsBackButtonVisiblePropertyChanged(
00632     winrt::DependencyObject const& sender,
00633     winrt::DependencyPropertyChangedEventArgs const& args)
00634 {
00635     auto owner = sender.as<winrt::NavigationView>();
00636     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00637 }
00638
00639 void NavigationViewProperties::OnIsBackEnabledPropertyChanged(
00640     winrt::DependencyObject const& sender,
00641     winrt::DependencyPropertyChangedEventArgs const& args)
00642 {
00643     auto owner = sender.as<winrt::NavigationView>();
00644     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00645 }
00646
00647 void NavigationViewProperties::OnIsPaneOpenPropertyChanged(
00648     winrt::DependencyObject const& sender,
00649     winrt::DependencyPropertyChangedEventArgs const& args)
00650 {
00651     auto owner = sender.as<winrt::NavigationView>();
00652     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00653 }
00654
00655 void NavigationViewProperties::OnIsPaneToggleButtonVisiblePropertyChanged(
00656     winrt::DependencyObject const& sender,
00657     winrt::DependencyPropertyChangedEventArgs const& args)
00658 {
00659     auto owner = sender.as<winrt::NavigationView>();
00660     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00661 }
00662
00663 void NavigationViewProperties::OnIsPaneVisiblePropertyChanged(
00664     winrt::DependencyObject const& sender,
00665     winrt::DependencyPropertyChangedEventArgs const& args)
00666 {
00667     auto owner = sender.as<winrt::NavigationView>();
00668     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00669 }
00670
00671 void NavigationViewProperties::OnIsSettingsVisiblePropertyChanged(
00672     winrt::DependencyObject const& sender,
00673     winrt::DependencyPropertyChangedEventArgs const& args)
00674 {
00675     auto owner = sender.as<winrt::NavigationView>();
00676     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00677 }
00678
00679 void NavigationViewProperties::OnIsTitleBarAutoPaddingEnabledPropertyChanged(
00680     winrt::DependencyObject const& sender,
00681     winrt::DependencyPropertyChangedEventArgs const& args)
00682 {
00683     auto owner = sender.as<winrt::NavigationView>();
00684     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00685 }
00686
00687 void NavigationViewProperties::OnMenuItemContainerStylePropertyChanged(
00688     winrt::DependencyObject const& sender,
00689     winrt::DependencyPropertyChangedEventArgs const& args)
00690 {
00691     auto owner = sender.as<winrt::NavigationView>();
00692     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00693 }
00694
00695 void NavigationViewProperties::OnMenuItemContainerStyleSelectorPropertyChanged(
00696     winrt::DependencyObject const& sender,
00697     winrt::DependencyPropertyChangedEventArgs const& args)
00698 {
00699     auto owner = sender.as<winrt::NavigationView>();
00700     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00701 }
00702
00703 void NavigationViewProperties::OnMenuItemsPropertyChanged(
00704     winrt::DependencyObject const& sender,
00705     winrt::DependencyPropertyChangedEventArgs const& args)
00706 {
00707     auto owner = sender.as<winrt::NavigationView>();
00708     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00709 }
00710
00711 void NavigationViewProperties::OnMenuItemsSourcePropertyChanged(
00712     winrt::DependencyObject const& sender,
00713     winrt::DependencyPropertyChangedEventArgs const& args)
00714 {
00715     auto owner = sender.as<winrt::NavigationView>();
00716     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00717 }
00718
00719 void NavigationViewProperties::OnMenuItemTemplatePropertyChanged(
00720     winrt::DependencyObject const& sender,
00721     winrt::DependencyPropertyChangedEventArgs const& args)
00722 {
00723     auto owner = sender.as<winrt::NavigationView>();
00724     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00725 }
00726
00727 void NavigationViewProperties::OnMenuItemTemplateSelectorPropertyChanged(
00728     winrt::DependencyObject const& sender,
00729     winrt::DependencyPropertyChangedEventArgs const& args)
00730 {
00731     auto owner = sender.as<winrt::NavigationView>();
00732     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00733 }
00734
00735 void NavigationViewProperties::OnOpenPaneLengthPropertyChanged(
00736     winrt::DependencyObject const& sender,
00737     winrt::DependencyPropertyChangedEventArgs const& args)
00738 {
00739     auto owner = sender.as<winrt::NavigationView>();
00740
00741     auto value = winrt::unbox_value<double>(args.NewValue());
00742     auto coercedValue = value;
00743     winrt::get_self<NavigationView>(owner)->CoerceToGreaterThanZero(coercedValue);
00744     if (std::memcmp(&value, &coercedValue, sizeof(value)) != 0) // use memcmp to avoid tripping over nan
00745     {
00746         sender.SetValue(args.Property(), winrt::box_value<double>(coercedValue));
00747         return;
00748     }
00749
00750     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00751 }
00752
00753 void NavigationViewProperties::OnOverflowLabelModePropertyChanged(
00754     winrt::DependencyObject const& sender,
00755     winrt::DependencyPropertyChangedEventArgs const& args)
00756 {
00757     auto owner = sender.as<winrt::NavigationView>();
00758     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00759 }
00760
00761 void NavigationViewProperties::OnPaneDisplayModePropertyChanged(
00762     winrt::DependencyObject const& sender,
00763     winrt::DependencyPropertyChangedEventArgs const& args)
00764 {
00765     auto owner = sender.as<winrt::NavigationView>();
00766     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00767 }
00768
00769 void NavigationViewProperties::OnPaneFooterPropertyChanged(
00770     winrt::DependencyObject const& sender,
00771     winrt::DependencyPropertyChangedEventArgs const& args)
00772 {
00773     auto owner = sender.as<winrt::NavigationView>();
00774     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00775 }
00776
00777 void NavigationViewProperties::OnPaneTitlePropertyChanged(
00778     winrt::DependencyObject const& sender,
00779     winrt::DependencyPropertyChangedEventArgs const& args)
00780 {
00781     auto owner = sender.as<winrt::NavigationView>();
00782     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00783 }
00784
00785 void NavigationViewProperties::OnPaneToggleButtonStylePropertyChanged(
00786     winrt::DependencyObject const& sender,
00787     winrt::DependencyPropertyChangedEventArgs const& args)
00788 {
00789     auto owner = sender.as<winrt::NavigationView>();
00790     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00791 }
00792
00793 void NavigationViewProperties::OnSelectedItemPropertyChanged(
00794     winrt::DependencyObject const& sender,
00795     winrt::DependencyPropertyChangedEventArgs const& args)
00796 {
00797     auto owner = sender.as<winrt::NavigationView>();
00798     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00799 }
00800
00801 void NavigationViewProperties::OnSelectionFollowsFocusPropertyChanged(
00802     winrt::DependencyObject const& sender,
00803     winrt::DependencyPropertyChangedEventArgs const& args)
00804 {
00805     auto owner = sender.as<winrt::NavigationView>();
00806     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00807 }
00808
00809 void NavigationViewProperties::OnSettingsItemPropertyChanged(
00810     winrt::DependencyObject const& sender,
00811     winrt::DependencyPropertyChangedEventArgs const& args)
00812 {
00813     auto owner = sender.as<winrt::NavigationView>();
00814     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00815 }
00816
00817 void NavigationViewProperties::OnShoulderNavigationEnabledPropertyChanged(
00818     winrt::DependencyObject const& sender,
00819     winrt::DependencyPropertyChangedEventArgs const& args)
00820 {
00821     auto owner = sender.as<winrt::NavigationView>();
00822     winrt::get_self<NavigationView>(owner)->OnPropertyChanged(args);
00823 }
00824
00825 void NavigationViewProperties::AlwaysShowHeader(bool value)
00826 {
00827     [[gsl::suppress(con)]]
00828     {
00829     static_cast<NavigationView*>(this)->SetValue(s_AlwaysShowHeaderProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00830     }
00831 }
00832
00833 bool NavigationViewProperties::AlwaysShowHeader()
00834 {
00835     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_AlwaysShowHeaderProperty));
00836 }
00837
00838 void NavigationViewProperties::AutoSuggestBox(winrt::AutoSuggestBox const& value)
00839 {
00840     [[gsl::suppress(con)]]
00841     {
00842     static_cast<NavigationView*>(this)->SetValue(s_AutoSuggestBoxProperty, ValueHelper<winrt::AutoSuggestBox>::BoxValueIfNecessary(value));
00843     }
00844 }
00845
00846 winrt::AutoSuggestBox NavigationViewProperties::AutoSuggestBox()
00847 {
00848     return ValueHelper<winrt::AutoSuggestBox>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_AutoSuggestBoxProperty));
00849 }
00850
00851 void NavigationViewProperties::CompactModeThresholdWidth(double value)
00852 {
00853     [[gsl::suppress(con)]]
00854     {
00855     double coercedValue = value;
00856     static_cast<NavigationView*>(this)->CoerceToGreaterThanZero(coercedValue);
00857     static_cast<NavigationView*>(this)->SetValue(s_CompactModeThresholdWidthProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00858     }
00859 }
00860
00861 double NavigationViewProperties::CompactModeThresholdWidth()
00862 {
00863     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_CompactModeThresholdWidthProperty));
00864 }
00865
00866 void NavigationViewProperties::CompactPaneLength(double value)
00867 {
00868     [[gsl::suppress(con)]]
00869     {
00870     double coercedValue = value;
00871     static_cast<NavigationView*>(this)->CoerceToGreaterThanZero(coercedValue);
00872     static_cast<NavigationView*>(this)->SetValue(s_CompactPaneLengthProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00873     }
00874 }
00875
00876 double NavigationViewProperties::CompactPaneLength()
00877 {
00878     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_CompactPaneLengthProperty));
00879 }
00880
00881 void NavigationViewProperties::ContentOverlay(winrt::UIElement const& value)
00882 {
00883     [[gsl::suppress(con)]]
00884     {
00885     static_cast<NavigationView*>(this)->SetValue(s_ContentOverlayProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00886     }
00887 }
00888
00889 winrt::UIElement NavigationViewProperties::ContentOverlay()
00890 {
00891     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_ContentOverlayProperty));
00892 }
00893
00894 void NavigationViewProperties::DisplayMode(winrt::NavigationViewDisplayMode const& value)
00895 {
00896     [[gsl::suppress(con)]]
00897     {
00898     static_cast<NavigationView*>(this)->SetValue(s_DisplayModeProperty, ValueHelper<winrt::NavigationViewDisplayMode>::BoxValueIfNecessary(value));
00899     }
00900 }
00901
00902 winrt::NavigationViewDisplayMode NavigationViewProperties::DisplayMode()
00903 {
00904     return ValueHelper<winrt::NavigationViewDisplayMode>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_DisplayModeProperty));
00905 }
00906
00907 void NavigationViewProperties::ExpandedModeThresholdWidth(double value)
00908 {
00909     [[gsl::suppress(con)]]
00910     {
00911     double coercedValue = value;
00912     static_cast<NavigationView*>(this)->CoerceToGreaterThanZero(coercedValue);
00913     static_cast<NavigationView*>(this)->SetValue(s_ExpandedModeThresholdWidthProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
00914     }
00915 }
00916
00917 double NavigationViewProperties::ExpandedModeThresholdWidth()
00918 {
00919     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_ExpandedModeThresholdWidthProperty));
00920 }
00921
00922 void NavigationViewProperties::FooterMenuItems(winrt::IVector<winrt::IInspectable> const& value)
00923 {
00924     [[gsl::suppress(con)]]
00925     {
00926     static_cast<NavigationView*>(this)->SetValue(s_FooterMenuItemsProperty, ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxValueIfNecessary(value));
00927     }
00928 }
00929
00930 winrt::IVector<winrt::IInspectable> NavigationViewProperties::FooterMenuItems()
00931 {
00932     return ValueHelper<winrt::IVector<winrt::IInspectable>>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_FooterMenuItemsProperty));
00933 }
00934
00935 void NavigationViewProperties::FooterMenuItemsSource(winrt::IInspectable const& value)
00936 {
00937     [[gsl::suppress(con)]]
00938     {
00939     static_cast<NavigationView*>(this)->SetValue(s_FooterMenuItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00940     }
00941 }
00942
00943 winrt::IInspectable NavigationViewProperties::FooterMenuItemsSource()
00944 {
00945     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_FooterMenuItemsSourceProperty));
00946 }
00947
00948 void NavigationViewProperties::Header(winrt::IInspectable const& value)
00949 {
00950     [[gsl::suppress(con)]]
00951     {
00952     static_cast<NavigationView*>(this)->SetValue(s_HeaderProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00953     }
00954 }
00955
00956 winrt::IInspectable NavigationViewProperties::Header()
00957 {
00958     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_HeaderProperty));
00959 }
00960
00961 void NavigationViewProperties::HeaderTemplate(winrt::DataTemplate const& value)
00962 {
00963     [[gsl::suppress(con)]]
00964     {
00965     static_cast<NavigationView*>(this)->SetValue(s_HeaderTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00966     }
00967 }
00968
00969 winrt::DataTemplate NavigationViewProperties::HeaderTemplate()
00970 {
00971     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_HeaderTemplateProperty));
00972 }
00973
00974 void NavigationViewProperties::IsBackButtonVisible(winrt::NavigationViewBackButtonVisible const& value)
00975 {
00976     [[gsl::suppress(con)]]
00977     {
00978     static_cast<NavigationView*>(this)->SetValue(s_IsBackButtonVisibleProperty, ValueHelper<winrt::NavigationViewBackButtonVisible>::BoxValueIfNecessary(value));
00979     }
00980 }
00981
00982 winrt::NavigationViewBackButtonVisible NavigationViewProperties::IsBackButtonVisible()
00983 {
00984     return ValueHelper<winrt::NavigationViewBackButtonVisible>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_IsBackButtonVisibleProperty));
00985 }
00986
00987 void NavigationViewProperties::IsBackEnabled(bool value)
00988 {
00989     [[gsl::suppress(con)]]
00990     {
00991     static_cast<NavigationView*>(this)->SetValue(s_IsBackEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00992     }
00993 }
00994
00995 bool NavigationViewProperties::IsBackEnabled()
00996 {
00997     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_IsBackEnabledProperty));
00998 }
00999
01000 void NavigationViewProperties::IsPaneOpen(bool value)
01001 {
01002     [[gsl::suppress(con)]]
01003     {
01004     static_cast<NavigationView*>(this)->SetValue(s_IsPaneOpenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
01005     }
01006 }
01007
01008 bool NavigationViewProperties::IsPaneOpen()
01009 {
01010     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_IsPaneOpenProperty));
01011 }
01012
01013 void NavigationViewProperties::IsPaneToggleButtonVisible(bool value)
01014 {
01015     [[gsl::suppress(con)]]
01016     {
01017     static_cast<NavigationView*>(this)->SetValue(s_IsPaneToggleButtonVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
01018     }
01019 }
01020
01021 bool NavigationViewProperties::IsPaneToggleButtonVisible()
01022 {
01023     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_IsPaneToggleButtonVisibleProperty));
01024 }
01025
01026 void NavigationViewProperties::IsPaneVisible(bool value)
01027 {
01028     [[gsl::suppress(con)]]
01029     {
01030     static_cast<NavigationView*>(this)->SetValue(s_IsPaneVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
01031     }
01032 }
01033
01034 bool NavigationViewProperties::IsPaneVisible()
01035 {
01036     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_IsPaneVisibleProperty));
01037 }
01038
01039 void NavigationViewProperties::IsSettingsVisible(bool value)
01040 {
01041     [[gsl::suppress(con)]]
01042     {
01043     static_cast<NavigationView*>(this)->SetValue(s_IsSettingsVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
01044     }
01045 }
01046
01047 bool NavigationViewProperties::IsSettingsVisible()
01048 {
01049     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_IsSettingsVisibleProperty));
01050 }
01051
01052 void NavigationViewProperties::IsTitleBarAutoPaddingEnabled(bool value)
01053 {
01054     [[gsl::suppress(con)]]
01055     {
01056     static_cast<NavigationView*>(this)->SetValue(s_IsTitleBarAutoPaddingEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
01057     }
01058 }
01059
01060 bool NavigationViewProperties::IsTitleBarAutoPaddingEnabled()
01061 {
01062     return ValueHelper<bool>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_IsTitleBarAutoPaddingEnabledProperty));
01063 }
01064
01065 void NavigationViewProperties::MenuItemContainerStyle(winrt::Style const& value)
01066 {
01067     [[gsl::suppress(con)]]
01068     {
01069     static_cast<NavigationView*>(this)->SetValue(s_MenuItemContainerStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
01070     }
01071 }
01072
01073 winrt::Style NavigationViewProperties::MenuItemContainerStyle()
01074 {
01075     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_MenuItemContainerStyleProperty));
01076 }
01077
01078 void NavigationViewProperties::MenuItemContainerStyleSelector(winrt::StyleSelector const& value)
01079 {
01080     [[gsl::suppress(con)]]
01081     {
01082     static_cast<NavigationView*>(this)->SetValue(s_MenuItemContainerStyleSelectorProperty, ValueHelper<winrt::StyleSelector>::BoxValueIfNecessary(value));
01083     }
01084 }
01085
01086 winrt::StyleSelector NavigationViewProperties::MenuItemContainerStyleSelector()
01087 {
01088     return ValueHelper<winrt::StyleSelector>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_MenuItemContainerStyleSelectorProperty));
01089 }
01090
01091 void NavigationViewProperties::MenuItems(winrt::IVector<winrt::IInspectable> const& value)
01092 {
01093     [[gsl::suppress(con)]]
01094     {
01095     static_cast<NavigationView*>(this)->SetValue(s_MenuItemsProperty, ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxValueIfNecessary(value));
01096     }
01097 }
01098
01099 winrt::IVector<winrt::IInspectable> NavigationViewProperties::MenuItems()
01100 {
01101     return ValueHelper<winrt::IVector<winrt::IInspectable>>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_MenuItemsProperty));
01102 }
01103
01104 void NavigationViewProperties::MenuItemsSource(winrt::IInspectable const& value)
01105 {
01106     [[gsl::suppress(con)]]
01107     {
01108     static_cast<NavigationView*>(this)->SetValue(s_MenuItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
01109     }
01110 }
01111
01112 winrt::IInspectable NavigationViewProperties::MenuItemsSource()
01113 {
01114     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_MenuItemsSourceProperty));
01115 }
01116
01117 void NavigationViewProperties::MenuItemTemplate(winrt::DataTemplate const& value)
01118 {
01119     [[gsl::suppress(con)]]
01120     {
01121     static_cast<NavigationView*>(this)->SetValue(s_MenuItemTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
01122     }
01123 }
01124
01125 winrt::DataTemplate NavigationViewProperties::MenuItemTemplate()
01126 {
01127     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_MenuItemTemplateProperty));
01128 }
01129
01130 void NavigationViewProperties::MenuItemTemplateSelector(winrt::DataTemplateSelector const& value)
01131 {
01132     [[gsl::suppress(con)]]
01133     {
01134     static_cast<NavigationView*>(this)->SetValue(s_MenuItemTemplateSelectorProperty, ValueHelper<winrt::DataTemplateSelector>::BoxValueIfNecessary(value));
01135     }
01136 }
01137
01138 winrt::DataTemplateSelector NavigationViewProperties::MenuItemTemplateSelector()
01139 {
01140     return ValueHelper<winrt::DataTemplateSelector>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_MenuItemTemplateSelectorProperty));
01141 }
01142
01143 void NavigationViewProperties::OpenPaneLength(double value)
01144 {
01145     [[gsl::suppress(con)]]
01146     {
01147     double coercedValue = value;
01148     static_cast<NavigationView*>(this)->CoerceToGreaterThanZero(coercedValue);
01149     static_cast<NavigationView*>(this)->SetValue(s_OpenPaneLengthProperty, ValueHelper<double>::BoxValueIfNecessary(coercedValue));
01150     }
01151 }
01152
01153 double NavigationViewProperties::OpenPaneLength()
01154 {
01155     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_OpenPaneLengthProperty));
01156 }
01157
01158 void NavigationViewProperties::OverflowLabelMode(winrt::NavigationViewOverflowLabelMode const& value)
01159 {
01160     [[gsl::suppress(con)]]
01161     {
01162     static_cast<NavigationView*>(this)->SetValue(s_OverflowLabelModeProperty, ValueHelper<winrt::NavigationViewOverflowLabelMode>::BoxValueIfNecessary(value));
01163     }
01164 }
01165
01166 winrt::NavigationViewOverflowLabelMode NavigationViewProperties::OverflowLabelMode()
01167 {
01168     return ValueHelper<winrt::NavigationViewOverflowLabelMode>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_OverflowLabelModeProperty));
01169 }
01170
01171 void NavigationViewProperties::PaneCustomContent(winrt::UIElement const& value)
01172 {
01173     [[gsl::suppress(con)]]
01174     {
01175     static_cast<NavigationView*>(this)->SetValue(s_PaneCustomContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
01176     }
01177 }
01178
01179 winrt::UIElement NavigationViewProperties::PaneCustomContent()
01180 {
01181     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_PaneCustomContentProperty));
01182 }
01183
01184 void NavigationViewProperties::PaneDisplayMode(winrt::NavigationViewPaneDisplayMode const& value)
01185 {
01186     [[gsl::suppress(con)]]
01187     {
01188     static_cast<NavigationView*>(this)->SetValue(s_PaneDisplayModeProperty, ValueHelper<winrt::NavigationViewPaneDisplayMode>::BoxValueIfNecessary(value));
01189     }
01190 }
01191
01192 winrt::NavigationViewPaneDisplayMode NavigationViewProperties::PaneDisplayMode()
01193 {
01194     return ValueHelper<winrt::NavigationViewPaneDisplayMode>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_PaneDisplayModeProperty));
01195 }
01196
01197 void NavigationViewProperties::PaneFooter(winrt::UIElement const& value)
01198 {
01199     [[gsl::suppress(con)]]
01200     {
01201     static_cast<NavigationView*>(this)->SetValue(s_PaneFooterProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
01202     }
01203 }
01204
01205 winrt::UIElement NavigationViewProperties::PaneFooter()
01206 {
01207     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_PaneFooterProperty));
01208 }
01209
01210 void NavigationViewProperties::PaneHeader(winrt::UIElement const& value)
01211 {
01212     [[gsl::suppress(con)]]
01213     {
01214     static_cast<NavigationView*>(this)->SetValue(s_PaneHeaderProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
01215     }
01216 }
01217
01218 winrt::UIElement NavigationViewProperties::PaneHeader()
01219 {
01220     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_PaneHeaderProperty));
01221 }
01222
01223 void NavigationViewProperties::PaneTitle(winrt::hstring const& value)
01224 {
01225     [[gsl::suppress(con)]]
01226     {
01227     static_cast<NavigationView*>(this)->SetValue(s_PaneTitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
01228     }
01229 }
01230
01231 winrt::hstring NavigationViewProperties::PaneTitle()
01232 {
01233     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_PaneTitleProperty));
01234 }
01235
01236 void NavigationViewProperties::PaneToggleButtonStyle(winrt::Style const& value)
01237 {
01238     [[gsl::suppress(con)]]
01239     {
01240     static_cast<NavigationView*>(this)->SetValue(s_PaneToggleButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
01241     }
01242 }
01243
01244 winrt::Style NavigationViewProperties::PaneToggleButtonStyle()
01245 {
01246     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_PaneToggleButtonStyleProperty));
01247 }
01248
01249 void NavigationViewProperties::SelectedItem(winrt::IInspectable const& value)
01250 {
01251     [[gsl::suppress(con)]]
01252     {
01253     static_cast<NavigationView*>(this)->SetValue(s_SelectedItemProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
01254     }
01255 }
01256
01257 winrt::IInspectable NavigationViewProperties::SelectedItem()
01258 {
01259     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_SelectedItemProperty));
01260 }
01261
01262 void NavigationViewProperties::SelectionFollowsFocus(winrt::NavigationViewSelectionFollowsFocus const& value)
01263 {
01264     [[gsl::suppress(con)]]
01265     {
01266     static_cast<NavigationView*>(this)->SetValue(s_SelectionFollowsFocusProperty, ValueHelper<winrt::NavigationViewSelectionFollowsFocus>::BoxValueIfNecessary(value));
01267     }
01268 }
01269
01270 winrt::NavigationViewSelectionFollowsFocus NavigationViewProperties::SelectionFollowsFocus()
01271 {
01272     return ValueHelper<winrt::NavigationViewSelectionFollowsFocus>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_SelectionFollowsFocusProperty));
01273 }
01274
01275 void NavigationViewProperties::SettingsItem(winrt::IInspectable const& value)
01276 {
01277     [[gsl::suppress(con)]]
01278     {
01279     static_cast<NavigationView*>(this)->SetValue(s_SettingsItemProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
01280     }
01281 }
01282
01283 winrt::IInspectable NavigationViewProperties::SettingsItem()
01284 {
01285     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_SettingsItemProperty));
01286 }
01287
01288 void NavigationViewProperties::ShoulderNavigationEnabled(winrt::NavigationViewShoulderNavigationEnabled const& value)
01289 {
01290     [[gsl::suppress(con)]]
01291     {
01292     static_cast<NavigationView*>(this)->SetValue(s_ShoulderNavigationEnabledProperty, ValueHelper<winrt::NavigationViewShoulderNavigationEnabled>::BoxValueIfNecessary(value));
01293     }
01294 }
01295
01296 winrt::NavigationViewShoulderNavigationEnabled NavigationViewProperties::ShoulderNavigationEnabled()
01297 {
01298     return ValueHelper<winrt::NavigationViewShoulderNavigationEnabled>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_ShoulderNavigationEnabledProperty));
01299 }
01300
01301 void NavigationViewProperties::TemplateSettings(winrt::NavigationViewTemplateSettings const& value)
01302 {
01303     [[gsl::suppress(con)]]
01304     {
01305     static_cast<NavigationView*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::NavigationViewTemplateSettings>::BoxValueIfNecessary(value));
01306     }
01307 }
01308
01309 winrt::NavigationViewTemplateSettings NavigationViewProperties::TemplateSettings()
01310 {
01311     return ValueHelper<winrt::NavigationViewTemplateSettings>::CastOrUnbox(static_cast<NavigationView*>(this)->GetValue(s_TemplateSettingsProperty));
01312 }
01313
01314 winrt::event_token NavigationViewProperties::BackRequested(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs> const& value)
01315 {
01316     return m_backRequestedEventSource.add(value);
01317 }
01318
01319 void NavigationViewProperties::BackRequested(winrt::event_token const& token)
01320 {
01321     m_backRequestedEventSource.remove(token);
01322 }
01323
01324 winrt::event_token NavigationViewProperties::Collapsed(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs> const& value)
01325 {
01326     return m_collapsedEventSource.add(value);
01327 }
01328
01329 void NavigationViewProperties::Collapsed(winrt::event_token const& token)
01330 {
01331     m_collapsedEventSource.remove(token);
01332 }
01333
01334 winrt::event_token NavigationViewProperties::DisplayModeChanged(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs> const& value)
01335 {
01336     return m_displayModeChangedEventSource.add(value);
01337 }
01338
01339 void NavigationViewProperties::DisplayModeChanged(winrt::event_token const& token)
01340 {
01341     m_displayModeChangedEventSource.remove(token);
01342 }
01343
01344 winrt::event_token NavigationViewProperties::Expanding(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs> const& value)
01345 {
01346     return m_expandingEventSource.add(value);
01347 }
01348
01349 void NavigationViewProperties::Expanding(winrt::event_token const& token)
01350 {
01351     m_expandingEventSource.remove(token);
01352 }
01353
01354 winrt::event_token NavigationViewProperties::ItemInvoked(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs> const& value)
01355 {
01356     return m_itemInvokedEventSource.add(value);
01357 }
01358
01359 void NavigationViewProperties::ItemInvoked(winrt::event_token const& token)
01360 {
01361     m_itemInvokedEventSource.remove(token);
01362 }
01363
01364 winrt::event_token NavigationViewProperties::PaneClosed(winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> const& value)
01365 {
01366     return m_paneClosedEventSource.add(value);
01367 }
01368
01369 void NavigationViewProperties::PaneClosed(winrt::event_token const& token)
01370 {
01371     m_paneClosedEventSource.remove(token);
01372 }
01373
01374 winrt::event_token NavigationViewProperties::PaneClosing(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs> const& value)
01375 {
01376     return m_paneClosingEventSource.add(value);
01377 }
01378
01379 void NavigationViewProperties::PaneClosing(winrt::event_token const& token)
01380 {
01381     m_paneClosingEventSource.remove(token);
01382 }
01383
01384 winrt::event_token NavigationViewProperties::PaneOpened(winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> const& value)
01385 {
01386     return m_paneOpenedEventSource.add(value);
01387 }
01388
01389 void NavigationViewProperties::PaneOpened(winrt::event_token const& token)
01390 {
01391     m_paneOpenedEventSource.remove(token);
01392 }
01393
01394 winrt::event_token NavigationViewProperties::PaneOpening(winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> const& value)
01395 {
01396     return m_paneOpeningEventSource.add(value);
01397 }
01398
01399 void NavigationViewProperties::PaneOpening(winrt::event_token const& token)
01400 {
01401     m_paneOpeningEventSource.remove(token);
01402 }
01403
01404 winrt::event_token NavigationViewProperties::SelectionChanged(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs> const& value)
01405 {
01406     return m_selectionChangedEventSource.add(value);
01407 }
01408
01409 void NavigationViewProperties::SelectionChanged(winrt::event_token const& token)
01410 {
01411     m_selectionChangedEventSource.remove(token);
01412 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/NavigationViewItemTemplatePage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • CustomResources

NavigationViewItemTemplatePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Automation;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Navigation;
00012
00013 using NavigationViewPaneDisplayMode = Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode;
00014 using MaterialHelperTestApi = Microsoft.UI.Private.Media.MaterialHelperTestApi;
00015 using NavigationView = Microsoft.UI.Xaml.Controls.NavigationView;
00016 using NavigationViewItemInvokedEventArgs = Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs;
00017 using NavigationViewSelectionChangedEventArgs = Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs;
00018
00019 namespace MUXControlsTestApp
00020 {
00021     public class Customer
00022     {
00023         public String FirstName { get; set; }
00024         public String LastName { get; set; }
00025         public String Address { get; set; }
00026
00027         public Customer(String firstName, String lastName, String address)
00028         {
00029             this.FirstName = firstName;
00030             this.LastName = lastName;
00031             this.Address = address;
00032         }
00033     }
00034
00035     public class Customers : ObservableCollection<Customer>
00036     {
00037         public Customers()
00038         {
00039             Add(new Customer("Michael", "Anderberg",
00040                     "Apartment 45"));
00041             Add(new Customer("Chris", "Ashton",
00042                     "Apartment 67"));
00043             Add(new Customer("Seo-yun", "Jun",
00044                     "Apartment 89"));
00045             Add(new Customer("Guido", "Pica",
00046                     "Apartment 10"));
00047         }
00048     }
00049     public sealed partial class NavigationViewItemTemplatePage : TestPage
00050     {
00051         public NavigationViewItemTemplatePage()
00052         {
00053             this.InitializeComponent();
00054         }
00055
00056
00057         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00058         {
00059             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00060         }
00061
00062         private void NavView_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)
00063         {
00064             var children = (Customer)args.SelectedItemContainer.Content;
00065             var customer = (Customer)args.SelectedItem;
00066             if (children != null && customer != null)
00067             {
00068                 SelectionEventResult.Text = "Passed";
00069             }
00070             else
00071             {
00072                 SelectionEventResult.Text = "Failed";
00073             }
00074
00075             // Reset argument type indicatiors
00076             SelectionChangedItemType.Text = "null";
00077             SelectionChangedItemContainerType.Text = "null";
00078
00079             // Update argument type indicators
00080             if (args.SelectedItem != null)
00081             {
00082                 SelectionChangedItemType.Text = args.SelectedItem.GetType().ToString();
00083             }
00084
00085             if (args.SelectedItemContainer != null)
00086             {
00087                 SelectionChangedItemContainerType.Text = args.SelectedItemContainer.GetType().ToString();
00088             }
00089         }
00090
00091         private void NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
00092         {
00093             // Reset argument type indicatiors
00094             ItemInvokedItemType.Text = "null";
00095             ItemInvokedItemContainerType.Text = "null";
00096
00097             if (args.InvokedItem != null)
00098             {
00099                 ItemInvokedItemType.Text = args.InvokedItem.GetType().ToString();
00100             }
00101
00102             if (args.InvokedItemContainer != null)
00103             {
00104                 ItemInvokedItemContainerType.Text = args.InvokedItemContainer.GetType().ToString();
00105             }
00106         }
00107     }
00108 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/InteractionTests/AnimatedVisualPlayerTests.cs Source File

  • File List
  • File Members
  • AnimatedVisualPlayer
  • InteractionTests

AnimatedVisualPlayerTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using AnimatedVisualPlayerTests;
00007 using Common;
00008 using Windows.Foundation.Metadata;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00010 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00011
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public sealed class AnimatedVisualPlayerTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00029         public static void ClassInitialize(TestContext testContext)
00030         {
00031             TestEnvironment.Initialize(testContext);
00032         }
00033
00034         [TestCleanup]
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         public void SettingAnimationOptimizationDoesNotCrash()
00042         {
00043             using (var setup = new TestSetupHelper("AnimatedVisualPlayer Tests"))
00044             {
00045                 var button = Button("SwitchCacheModeButton");
00046                 button.Click();
00047                 Wait.ForIdle();
00048                 button.Click();
00049             }
00050         }
00051
00052         [TestMethod]
00053         public void AccessibilityTest()
00054         {
00055             using (var setup = new TestSetupHelper("AnimatedVisualPlayer Tests"))
00056             {
00057                 var isPlayingTextBoxBeforePlaying = Edit("IsPlayingTextBoxBeforePlaying");
00058                 var isPlayingTextBoxBeingPlaying = Edit("IsPlayingTextBoxBeingPlaying");
00059
00060                 if (isPlayingTextBoxBeforePlaying is null ||
00061                     isPlayingTextBoxBeingPlaying is null)
00062                 {
00063                     Verify.Fail("UIElement not found.");
00064                     return;
00065                 }
00066
00067                 ClickWaitAndVerifyText(
00068                     clickTarget: Button("PlayButton"),
00069                     edit: Edit("ProgressTextBox"),
00070                     expectedValue: Constants.PlayingEndedText);
00071
00072
00073                 Log.Comment("Value of isPlayingTextBoxBeforePlaying: \"{0}\".", isPlayingTextBoxBeforePlaying.Value);
00074                 Verify.AreEqual(Constants.FalseText, isPlayingTextBoxBeforePlaying.Value);
00075
00076                 //
00077                 // isPlayingTextBoxBeingPlaying value is supposed to be updated
00078                 // inside the event handler function of Click for playButton in
00079                 // the UI test.
00080                 //
00081                 Log.Comment("Value of isPlayingTextBoxBeingPlaying: \"{0}\".", isPlayingTextBoxBeingPlaying.Value);
00082                 Verify.AreEqual(Constants.TrueText, isPlayingTextBoxBeingPlaying.Value);
00083
00084                 ToZeroKeyframeAnimationTest();
00085                 AroundTheEndAnimationTest();
00086                 FromOneKeyframeAnimationTest();
00087                 ReverseNegativePlaybackRateAnimationTest();
00088                 ReversePositivePlaybackRateAnimationTest();
00089                 HittestingTest();
00090                 //Task 24429465: DCPP: Multiple MUXControls interaction tests failing after IXP integration.
00091                 //FallenBackTest();
00092             }
00093         }
00094
00095         private void ToZeroKeyframeAnimationTest()
00096         {
00097             ClickWaitAndVerifyText(
00098                 clickTarget: Button("ToZeroKeyframeAnimationPlayButton"),
00099                 edit: Edit("ToZeroKeyframeAnimationProgressTextBox"),
00100                 expectedValue: Constants.PlayingEndedText);
00101         }
00102
00103         private void AroundTheEndAnimationTest()
00104         {
00105             ClickWaitAndVerifyText(
00106                 clickTarget: Button("AroundTheEndAnimationPlayButton"),
00107                 edit: Edit("AroundTheEndAnimationProgressTextBox"),
00108                 expectedValue: Constants.PlayingEndedText);
00109         }
00110
00111
00112         private void FromOneKeyframeAnimationTest()
00113         {
00114             ClickWaitAndVerifyText(
00115                 clickTarget: Button("FromOneKeyframeAnimationPlayButton"),
00116                 edit: Edit("FromOneKeyframeAnimationProgressTextBox"),
00117                 expectedValue: Constants.PlayingEndedText);
00118         }
00119
00120         // Reverse backward playing using negative playback rate by setting playback rate to positive.
00121         private void ReverseNegativePlaybackRateAnimationTest()
00122         {
00123             ClickWaitAndVerifyText(
00124                 clickTarget: Button("ReverseNegativePlaybackRateAnimationPlayButton"),
00125                 edit: Edit("ReverseNegativePlaybackRateAnimationTextBox"),
00126                 expectedValue: Constants.OneText);
00127         }
00128
00129         // Reverse forward playing using positive playback rate by setting playback rate to negative.
00130         private void ReversePositivePlaybackRateAnimationTest()
00131         {
00132             ClickWaitAndVerifyText(
00133                 clickTarget: Button("ReversePositivePlaybackRateAnimationPlayButton"),
00134                 edit: Edit("ReversePositivePlaybackRateAnimationTextBox"),
00135                 expectedValue: Constants.ZeroText);
00136         }
00137
00138         // Tests that moving the mouse over the AnimatedVisualPlayer causes the
00139         // PointerMoved event to be fired.
00140         private void HittestingTest()
00141         {
00142             const string testName = nameof(HittestingTest);
00143
00144             var textBox = Edit("HittestingTextBox");
00145
00146             // Move the mouse away from the AnimatedVisualPlayer.
00147             InputHelper.MoveMouse(textBox, 0, 0);
00148
00149             // Clear the value of the Edit.
00150             textBox.SetValueAndWait(string.Empty);
00151
00152             using (var waiter = new ValueChangedEventWaiter(textBox))
00153             {
00154                 // Move the mouse over the AnimatedVisualPlayer.
00155                 var player = FindElement.ByName("Player");
00156                 InputHelper.MoveMouse(player, 20, 20);
00157
00158                 Log.Comment($"{testName}: Waiting until OnPointerMoved handler in UI test returns.");
00159                 waiter.Wait();
00160             }
00161
00162             Log.Comment($"{testName}: Value of textBox: \"{textBox.Value}\".");
00163             Verify.AreEqual(Constants.PointerMovedText, textBox.Value);
00164         }
00165
00166         // Tests that replacing the source with something invalid causes the
00167         // fallback content to be displayed.
00168         private void FallenBackTest()
00169         {
00170             ClickWaitAndVerifyText(
00171                 clickTarget: Button("FallenBackButton"),
00172                 edit: Edit("FallenBackTextBox"),
00173                 expectedValue: Constants.TrueText);
00174         }
00175
00176         // Clicks the clickTarget, waits for the edit's text to change its value,
00177         // and returns the value of the edit.
00178         void ClickWaitAndVerifyText(
00179             Button clickTarget,
00180             Edit edit,
00181             string expectedValue,
00182             [global::System.Runtime.CompilerServices.CallerMemberName] string testName = "")
00183         {
00184             if (clickTarget is null)
00185             {
00186                 Verify.Fail($"{testName}: {nameof(clickTarget)} UIElement not found.");
00187                 return;
00188             }
00189
00190             if (edit is null)
00191             {
00192                 Verify.Fail($"{testName}: {nameof(edit)} UIElement not found.");
00193                 return;
00194             }
00195
00196             // Clear out the text box so it starts in a known state.
00197             edit.SetValueAndWait(string.Empty);
00198
00199             using (var waiter = new ValueChangedEventWaiter(edit))
00200             {
00201                 clickTarget.Invoke();
00202                 Log.Comment($"{testName}: Waiting for text to change.");
00203                 waiter.Wait();
00204             }
00205
00206             Log.Comment($"{testName}: Value of text: \"{edit.Value}\".");
00207             Verify.AreEqual(expectedValue, edit.Value);
00208         }
00209
00210         static Button Button(string name) => FindElement.ByName<Button>(name);
00211
00212         static Edit Edit(string name) => FindElement.ByName<Edit>(name);
00213     }
00214 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.common.cpp Source File

  • File List
  • File Members
  • Repeater

ItemsRepeater.common.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "LifetimeHandler.h"
00008
00009 /* static */
00010 winrt::Rect CachedVisualTreeHelpers::GetLayoutSlot(winrt::FrameworkElement const& element)
00011 {
00012     auto instance = LifetimeHandler::GetCachedVisualTreeHelpersInstance();
00013     MUX_ASSERT(instance);
00014
00015     if (!instance->m_layoutInfo)
00016     {
00017         instance->m_layoutInfo = winrt::get_activation_factory<winrt::LayoutInformation, winrt::ILayoutInformationStatics>();
00018     }
00019
00020     return instance->m_layoutInfo.GetLayoutSlot(element);
00021 }
00022
00023 /* static */
00024 winrt::DependencyObject CachedVisualTreeHelpers::GetParent(winrt::DependencyObject const& child)
00025 {
00026     auto instance = LifetimeHandler::GetCachedVisualTreeHelpersInstance();
00027     MUX_ASSERT(instance);
00028
00029     if (!instance->m_visualTreeHelper)
00030     {
00031         instance->m_visualTreeHelper = winrt::get_activation_factory<winrt::VisualTreeHelper, winrt::IVisualTreeHelperStatics>();
00032     }
00033
00034     return instance->m_visualTreeHelper.GetParent(child);
00035 }
00036
00037 winrt::IDataTemplateComponent CachedVisualTreeHelpers::GetDataTemplateComponent(winrt::UIElement const& element)
00038 {
00039     auto instance = LifetimeHandler::GetCachedVisualTreeHelpersInstance();
00040     MUX_ASSERT(instance);
00041
00042     if (!instance->m_xamlBindingHelperStatics)
00043     {
00044         instance->m_xamlBindingHelperStatics = winrt::get_activation_factory<winrt::XamlBindingHelper, winrt::IXamlBindingHelperStatics>();
00045     }
00046
00047     return instance->m_xamlBindingHelperStatics.GetDataTemplateComponent(element);
00048 }
00049
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/Defaults.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples

Defaults.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using System.Linq;
00006 using Microsoft.UI.Xaml.Controls;
00007
00008 namespace MUXControlsTestApp.Samples
00009 {
00010     public sealed partial class Defaults : Page
00011     {
00012         public List<string> Data { get; set; }
00013
00014         public Defaults()
00015         {
00016             Data = Enumerable.Range(0, 10000).Select(x => x.ToString()).ToList();
00017             this.InitializeComponent();
00018         }
00019     }
00020 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreDemoPage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples

StoreDemoPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.IO;
00007 using System.Linq;
00008 using System.Runtime.InteropServices.WindowsRuntime;
00009 using Windows.Foundation;
00010 using Windows.Foundation.Collections;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Controls.Primitives;
00014 using Microsoft.UI.Xaml.Data;
00015 using Microsoft.UI.Xaml.Input;
00016 using Microsoft.UI.Xaml.Media;
00017 using Microsoft.UI.Xaml.Navigation;
00018
00019 namespace MUXControlsTestApp.Samples
00020 {
00021     public sealed partial class StoreDemoPage : Page
00022     {
00023         public StoreDemoPage()
00024         {
00025             this.InitializeComponent();
00026             var data = StoreMockData.Create(15, 10);
00027             outerRepeater.ItemsSource = data;
00028         }
00029
00030         private void OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args)
00031         {
00032             args.TemplateKey = args.DataContext is Category ? "Category" : "Item";
00033         }
00034     }
00035 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RecyclingElementFactory.properties.h Source File

  • File List
  • File Members
  • Generated

RecyclingElementFactory.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class RecyclingElementFactoryProperties
00008 {
00009 public:
00010     RecyclingElementFactoryProperties();
00011
00012
00013
00014     winrt::event_token SelectTemplateKey(winrt::TypedEventHandler<winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs> const& value);
00015     void SelectTemplateKey(winrt::event_token const& token);
00016
00017     event_source<winrt::TypedEventHandler<winrt::RecyclingElementFactory, winrt::SelectTemplateEventArgs>> m_selectTemplateKeyEventSource;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LinedFlowLayoutItemAspectRatios Member List

This is the complete list of members for LinedFlowLayoutItemAspectRatios, including all inherited members.
Clear() | LinedFlowLayoutItemAspectRatios |
GetAt(int itemIndex) const | LinedFlowLayoutItemAspectRatios |
GetAverageAspectRatio(int firstItemIndex, int lastItemIndex, int weight) const | LinedFlowLayoutItemAspectRatios |
GetEmptyOrFurthestBlock(int fromItemIndex) | LinedFlowLayoutItemAspectRatios | [private]
HasLowerWeight(int firstItemIndex, int lastItemIndex, int weight) const | LinedFlowLayoutItemAspectRatios |
IsEmpty() const | LinedFlowLayoutItemAspectRatios |
LinedFlowLayoutItemAspectRatios() | LinedFlowLayoutItemAspectRatios | [inline]
Resize(int size, int referenceItemIndex) | LinedFlowLayoutItemAspectRatios |
SetAt(int itemIndex, ItemAspectRatio itemAspectRatio) | LinedFlowLayoutItemAspectRatios |
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/LinedFlowLayoutTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

LinedFlowLayoutTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using Common;
00006 using Microsoft.UI.Xaml.Controls;
00007
00008 using WEX.TestExecution;
00009 using WEX.TestExecution.Markup;
00010 using WEX.Logging.Interop;
00011
00012 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00013 {
00014     [TestClass]
00015     public class LinedFlowLayoutTests : ApiTestBase
00016     {
00017         [TestMethod]
00018         [TestProperty("Description", "Verifies the LinedFlowLayout default property values.")]
00019         public void VerifyDefaultPropertyValues()
00020         {
00021             RunOnUIThread.Execute(() =>
00022             {
00023                 LinedFlowLayout linedFlowLayout = new LinedFlowLayout();
00024                 Verify.IsNotNull(linedFlowLayout);
00025
00026                 Log.Comment("Verifying LinedFlowLayout default property values");
00027                 Verify.AreEqual(0.0, linedFlowLayout.ActualLineHeight);
00028                 Verify.AreEqual(double.NaN, linedFlowLayout.LineHeight);
00029                 Verify.AreEqual(0.0, linedFlowLayout.LineSpacing);
00030                 Verify.AreEqual(0.0, linedFlowLayout.MinItemSpacing);
00031                 Verify.AreEqual(LinedFlowLayoutItemsJustification.Start, linedFlowLayout.ItemsJustification);
00032                 Verify.AreEqual(LinedFlowLayoutItemsStretch.None, linedFlowLayout.ItemsStretch);
00033             });
00034         }
00035     }
00036 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterPrivate.idl Source File

  • File List
  • File Members
  • Repeater

RepeaterPrivate.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 interface IRepeaterScrollingSurface;
00005
00006 [MUX_INTERNAL]
00007 [webhosthidden]
00008 delegate void ConfigurationChangedEventHandler(IRepeaterScrollingSurface sender);
00009
00010 [MUX_INTERNAL]
00011 [webhosthidden]
00012 delegate void PostArrangeEventHandler(IRepeaterScrollingSurface sender);
00013
00014 [MUX_INTERNAL]
00015 [webhosthidden]
00016 delegate void ViewportChangedEventHandler(IRepeaterScrollingSurface sender, Boolean isFinal);
00017
00018 [MUX_INTERNAL]
00019 [webhosthidden]
00020 interface IRepeaterScrollingSurface
00021 {
00022     Boolean IsHorizontallyScrollable { get; };
00023     Boolean IsVerticallyScrollable { get; };
00024     Microsoft.UI.Xaml.UIElement AnchorElement { get; };
00025     event ConfigurationChangedEventHandler ConfigurationChanged;
00026     event PostArrangeEventHandler PostArrange;
00027     event ViewportChangedEventHandler ViewportChanged;
00028     void RegisterAnchorCandidate(Microsoft.UI.Xaml.UIElement element);
00029     void UnregisterAnchorCandidate(Microsoft.UI.Xaml.UIElement element);
00030     Windows.Foundation.Rect GetRelativeViewport(Microsoft.UI.Xaml.UIElement child);
00031 }
00032
00033 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooksAnchorEvaluatedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollPresenterTestHooksAnchorEvaluatedEventArgs.h"
00007
00008 ScrollPresenterTestHooksAnchorEvaluatedEventArgs::ScrollPresenterTestHooksAnchorEvaluatedEventArgs(
00009     const winrt::UIElement& anchorElement,
00010     double viewportAnchorPointHorizontalOffset,
00011     double viewportAnchorPointVerticalOffset)
00012 {
00013     if (anchorElement)
00014     {
00015         m_anchorElement = winrt::make_weak(anchorElement);
00016     }
00017     m_viewportAnchorPointHorizontalOffset = viewportAnchorPointHorizontalOffset;
00018     m_viewportAnchorPointVerticalOffset = viewportAnchorPointVerticalOffset;
00019 }
00020
00021 #pragma region IScrollPresenterTestHooksAnchorEvaluatedEventArgs
00022
00023 winrt::UIElement ScrollPresenterTestHooksAnchorEvaluatedEventArgs::AnchorElement()
00024 {
00025     return m_anchorElement.get();
00026 }
00027
00028 double ScrollPresenterTestHooksAnchorEvaluatedEventArgs::ViewportAnchorPointHorizontalOffset()
00029 {
00030     return m_viewportAnchorPointHorizontalOffset;
00031 }
00032
00033 double ScrollPresenterTestHooksAnchorEvaluatedEventArgs::ViewportAnchorPointVerticalOffset()
00034 {
00035     return m_viewportAnchorPointVerticalOffset;
00036 }
00037
00038 #pragma endregion
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPictureTests Member List

This is the complete list of members for PersonPictureTests, including all inherited members.
VerifyAutomationName() | PersonPictureTests | [inline]
VerifyContactPropertyMetadata() | PersonPictureTests | [inline]
VerifyDefaultsAndBasicSetting() | PersonPictureTests | [inline]
VerifyPersonPictureVisualTree() | PersonPictureTests | [inline]
VerifySmallWidthAndHeightDoNotCrash() | PersonPictureTests | [inline]
VerifyVSMStatesForPhotosAndInitials() | PersonPictureTests | [inline]
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/PointerInfoRevokers.h Source File

  • File List
  • File Members
  • Common

PointerInfoRevokers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class PointerInfoRevokers : public winrt::implements<PointerInfoRevokers, winrt::IInspectable>
00007 {
00008 public:
00009     void RevokeAll()
00010     {
00011         if (m_pointerEnteredRevoker)
00012         {
00013             m_pointerEnteredRevoker.revoke();
00014         }
00015
00016         if (m_pointerMovedRevoker)
00017         {
00018             m_pointerMovedRevoker.revoke();
00019         }
00020
00021         if (m_pointerExitedRevoker)
00022         {
00023             m_pointerExitedRevoker.revoke();
00024         }
00025
00026         if (m_pointerPressedRevoker)
00027         {
00028             m_pointerPressedRevoker.revoke();
00029         }
00030
00031         if (m_pointerReleasedRevoker)
00032         {
00033             m_pointerReleasedRevoker.revoke();
00034         }
00035
00036         if (m_pointerCanceledRevoker)
00037         {
00038             m_pointerCanceledRevoker.revoke();
00039         }
00040
00041         if (m_pointerCaptureLostRevoker)
00042         {
00043             m_pointerCaptureLostRevoker.revoke();
00044         }
00045
00046         if (m_gettingFocusRevoker)
00047         {
00048             m_gettingFocusRevoker.revoke();
00049         }
00050
00051         if (m_losingFocusRevoker)
00052         {
00053             m_losingFocusRevoker.revoke();
00054         }
00055
00056         if (m_tappedRevoker)
00057         {
00058             m_tappedRevoker.revoke();
00059         }
00060
00061         if (m_doubleTappedRevoker)
00062         {
00063             m_doubleTappedRevoker.revoke();
00064         }
00065
00066         if (m_isEnabledChangedRevoker)
00067         {
00068             m_isEnabledChangedRevoker.revoke();
00069         }
00070     }
00071
00072     RoutedEventHandler_revoker m_pointerExitedRevoker{};
00073     RoutedEventHandler_revoker m_pointerPressedRevoker{};
00074     RoutedEventHandler_revoker m_pointerReleasedRevoker{};
00075     RoutedEventHandler_revoker m_pointerCanceledRevoker{};
00076     RoutedEventHandler_revoker m_pointerCaptureLostRevoker{};
00077
00078     winrt::Control::IsEnabledChanged_revoker m_isEnabledChangedRevoker{};
00079
00080     winrt::UIElement::Tapped_revoker m_tappedRevoker{};
00081     winrt::UIElement::DoubleTapped_revoker m_doubleTappedRevoker{};
00082     winrt::UIElement::PointerEntered_revoker m_pointerEnteredRevoker{};
00083     winrt::UIElement::PointerMoved_revoker m_pointerMovedRevoker{};
00084     winrt::UIElement::GettingFocus_revoker m_gettingFocusRevoker{};
00085     winrt::UIElement::LosingFocus_revoker m_losingFocusRevoker{};
00086 };
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationView.properties.h Source File

  • File List
  • File Members
  • Generated

NavigationView.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class NavigationViewProperties
00008 {
00009 public:
00010     NavigationViewProperties();
00011
00012     void AlwaysShowHeader(bool value);
00013     bool AlwaysShowHeader();
00014
00015     void AutoSuggestBox(winrt::AutoSuggestBox const& value);
00016     winrt::AutoSuggestBox AutoSuggestBox();
00017
00018     void CompactModeThresholdWidth(double value);
00019     double CompactModeThresholdWidth();
00020
00021     void CompactPaneLength(double value);
00022     double CompactPaneLength();
00023
00024     void ContentOverlay(winrt::UIElement const& value);
00025     winrt::UIElement ContentOverlay();
00026
00027     void DisplayMode(winrt::NavigationViewDisplayMode const& value);
00028     winrt::NavigationViewDisplayMode DisplayMode();
00029
00030     void ExpandedModeThresholdWidth(double value);
00031     double ExpandedModeThresholdWidth();
00032
00033     void FooterMenuItems(winrt::IVector<winrt::IInspectable> const& value);
00034     winrt::IVector<winrt::IInspectable> FooterMenuItems();
00035
00036     void FooterMenuItemsSource(winrt::IInspectable const& value);
00037     winrt::IInspectable FooterMenuItemsSource();
00038
00039     void Header(winrt::IInspectable const& value);
00040     winrt::IInspectable Header();
00041
00042     void HeaderTemplate(winrt::DataTemplate const& value);
00043     winrt::DataTemplate HeaderTemplate();
00044
00045     void IsBackButtonVisible(winrt::NavigationViewBackButtonVisible const& value);
00046     winrt::NavigationViewBackButtonVisible IsBackButtonVisible();
00047
00048     void IsBackEnabled(bool value);
00049     bool IsBackEnabled();
00050
00051     void IsPaneOpen(bool value);
00052     bool IsPaneOpen();
00053
00054     void IsPaneToggleButtonVisible(bool value);
00055     bool IsPaneToggleButtonVisible();
00056
00057     void IsPaneVisible(bool value);
00058     bool IsPaneVisible();
00059
00060     void IsSettingsVisible(bool value);
00061     bool IsSettingsVisible();
00062
00063     void IsTitleBarAutoPaddingEnabled(bool value);
00064     bool IsTitleBarAutoPaddingEnabled();
00065
00066     void MenuItemContainerStyle(winrt::Style const& value);
00067     winrt::Style MenuItemContainerStyle();
00068
00069     void MenuItemContainerStyleSelector(winrt::StyleSelector const& value);
00070     winrt::StyleSelector MenuItemContainerStyleSelector();
00071
00072     void MenuItems(winrt::IVector<winrt::IInspectable> const& value);
00073     winrt::IVector<winrt::IInspectable> MenuItems();
00074
00075     void MenuItemsSource(winrt::IInspectable const& value);
00076     winrt::IInspectable MenuItemsSource();
00077
00078     void MenuItemTemplate(winrt::DataTemplate const& value);
00079     winrt::DataTemplate MenuItemTemplate();
00080
00081     void MenuItemTemplateSelector(winrt::DataTemplateSelector const& value);
00082     winrt::DataTemplateSelector MenuItemTemplateSelector();
00083
00084     void OpenPaneLength(double value);
00085     double OpenPaneLength();
00086
00087     void OverflowLabelMode(winrt::NavigationViewOverflowLabelMode const& value);
00088     winrt::NavigationViewOverflowLabelMode OverflowLabelMode();
00089
00090     void PaneCustomContent(winrt::UIElement const& value);
00091     winrt::UIElement PaneCustomContent();
00092
00093     void PaneDisplayMode(winrt::NavigationViewPaneDisplayMode const& value);
00094     winrt::NavigationViewPaneDisplayMode PaneDisplayMode();
00095
00096     void PaneFooter(winrt::UIElement const& value);
00097     winrt::UIElement PaneFooter();
00098
00099     void PaneHeader(winrt::UIElement const& value);
00100     winrt::UIElement PaneHeader();
00101
00102     void PaneTitle(winrt::hstring const& value);
00103     winrt::hstring PaneTitle();
00104
00105     void PaneToggleButtonStyle(winrt::Style const& value);
00106     winrt::Style PaneToggleButtonStyle();
00107
00108     void SelectedItem(winrt::IInspectable const& value);
00109     winrt::IInspectable SelectedItem();
00110
00111     void SelectionFollowsFocus(winrt::NavigationViewSelectionFollowsFocus const& value);
00112     winrt::NavigationViewSelectionFollowsFocus SelectionFollowsFocus();
00113
00114     void SettingsItem(winrt::IInspectable const& value);
00115     winrt::IInspectable SettingsItem();
00116
00117     void ShoulderNavigationEnabled(winrt::NavigationViewShoulderNavigationEnabled const& value);
00118     winrt::NavigationViewShoulderNavigationEnabled ShoulderNavigationEnabled();
00119
00120     void TemplateSettings(winrt::NavigationViewTemplateSettings const& value);
00121     winrt::NavigationViewTemplateSettings TemplateSettings();
00122
00123     static winrt::DependencyProperty AlwaysShowHeaderProperty() { return s_AlwaysShowHeaderProperty; }
00124     static winrt::DependencyProperty AutoSuggestBoxProperty() { return s_AutoSuggestBoxProperty; }
00125     static winrt::DependencyProperty CompactModeThresholdWidthProperty() { return s_CompactModeThresholdWidthProperty; }
00126     static winrt::DependencyProperty CompactPaneLengthProperty() { return s_CompactPaneLengthProperty; }
00127     static winrt::DependencyProperty ContentOverlayProperty() { return s_ContentOverlayProperty; }
00128     static winrt::DependencyProperty DisplayModeProperty() { return s_DisplayModeProperty; }
00129     static winrt::DependencyProperty ExpandedModeThresholdWidthProperty() { return s_ExpandedModeThresholdWidthProperty; }
00130     static winrt::DependencyProperty FooterMenuItemsProperty() { return s_FooterMenuItemsProperty; }
00131     static winrt::DependencyProperty FooterMenuItemsSourceProperty() { return s_FooterMenuItemsSourceProperty; }
00132     static winrt::DependencyProperty HeaderProperty() { return s_HeaderProperty; }
00133     static winrt::DependencyProperty HeaderTemplateProperty() { return s_HeaderTemplateProperty; }
00134     static winrt::DependencyProperty IsBackButtonVisibleProperty() { return s_IsBackButtonVisibleProperty; }
00135     static winrt::DependencyProperty IsBackEnabledProperty() { return s_IsBackEnabledProperty; }
00136     static winrt::DependencyProperty IsPaneOpenProperty() { return s_IsPaneOpenProperty; }
00137     static winrt::DependencyProperty IsPaneToggleButtonVisibleProperty() { return s_IsPaneToggleButtonVisibleProperty; }
00138     static winrt::DependencyProperty IsPaneVisibleProperty() { return s_IsPaneVisibleProperty; }
00139     static winrt::DependencyProperty IsSettingsVisibleProperty() { return s_IsSettingsVisibleProperty; }
00140     static winrt::DependencyProperty IsTitleBarAutoPaddingEnabledProperty() { return s_IsTitleBarAutoPaddingEnabledProperty; }
00141     static winrt::DependencyProperty MenuItemContainerStyleProperty() { return s_MenuItemContainerStyleProperty; }
00142     static winrt::DependencyProperty MenuItemContainerStyleSelectorProperty() { return s_MenuItemContainerStyleSelectorProperty; }
00143     static winrt::DependencyProperty MenuItemsProperty() { return s_MenuItemsProperty; }
00144     static winrt::DependencyProperty MenuItemsSourceProperty() { return s_MenuItemsSourceProperty; }
00145     static winrt::DependencyProperty MenuItemTemplateProperty() { return s_MenuItemTemplateProperty; }
00146     static winrt::DependencyProperty MenuItemTemplateSelectorProperty() { return s_MenuItemTemplateSelectorProperty; }
00147     static winrt::DependencyProperty OpenPaneLengthProperty() { return s_OpenPaneLengthProperty; }
00148     static winrt::DependencyProperty OverflowLabelModeProperty() { return s_OverflowLabelModeProperty; }
00149     static winrt::DependencyProperty PaneCustomContentProperty() { return s_PaneCustomContentProperty; }
00150     static winrt::DependencyProperty PaneDisplayModeProperty() { return s_PaneDisplayModeProperty; }
00151     static winrt::DependencyProperty PaneFooterProperty() { return s_PaneFooterProperty; }
00152     static winrt::DependencyProperty PaneHeaderProperty() { return s_PaneHeaderProperty; }
00153     static winrt::DependencyProperty PaneTitleProperty() { return s_PaneTitleProperty; }
00154     static winrt::DependencyProperty PaneToggleButtonStyleProperty() { return s_PaneToggleButtonStyleProperty; }
00155     static winrt::DependencyProperty SelectedItemProperty() { return s_SelectedItemProperty; }
00156     static winrt::DependencyProperty SelectionFollowsFocusProperty() { return s_SelectionFollowsFocusProperty; }
00157     static winrt::DependencyProperty SettingsItemProperty() { return s_SettingsItemProperty; }
00158     static winrt::DependencyProperty ShoulderNavigationEnabledProperty() { return s_ShoulderNavigationEnabledProperty; }
00159     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00160
00161     static GlobalDependencyProperty s_AlwaysShowHeaderProperty;
00162     static GlobalDependencyProperty s_AutoSuggestBoxProperty;
00163     static GlobalDependencyProperty s_CompactModeThresholdWidthProperty;
00164     static GlobalDependencyProperty s_CompactPaneLengthProperty;
00165     static GlobalDependencyProperty s_ContentOverlayProperty;
00166     static GlobalDependencyProperty s_DisplayModeProperty;
00167     static GlobalDependencyProperty s_ExpandedModeThresholdWidthProperty;
00168     static GlobalDependencyProperty s_FooterMenuItemsProperty;
00169     static GlobalDependencyProperty s_FooterMenuItemsSourceProperty;
00170     static GlobalDependencyProperty s_HeaderProperty;
00171     static GlobalDependencyProperty s_HeaderTemplateProperty;
00172     static GlobalDependencyProperty s_IsBackButtonVisibleProperty;
00173     static GlobalDependencyProperty s_IsBackEnabledProperty;
00174     static GlobalDependencyProperty s_IsPaneOpenProperty;
00175     static GlobalDependencyProperty s_IsPaneToggleButtonVisibleProperty;
00176     static GlobalDependencyProperty s_IsPaneVisibleProperty;
00177     static GlobalDependencyProperty s_IsSettingsVisibleProperty;
00178     static GlobalDependencyProperty s_IsTitleBarAutoPaddingEnabledProperty;
00179     static GlobalDependencyProperty s_MenuItemContainerStyleProperty;
00180     static GlobalDependencyProperty s_MenuItemContainerStyleSelectorProperty;
00181     static GlobalDependencyProperty s_MenuItemsProperty;
00182     static GlobalDependencyProperty s_MenuItemsSourceProperty;
00183     static GlobalDependencyProperty s_MenuItemTemplateProperty;
00184     static GlobalDependencyProperty s_MenuItemTemplateSelectorProperty;
00185     static GlobalDependencyProperty s_OpenPaneLengthProperty;
00186     static GlobalDependencyProperty s_OverflowLabelModeProperty;
00187     static GlobalDependencyProperty s_PaneCustomContentProperty;
00188     static GlobalDependencyProperty s_PaneDisplayModeProperty;
00189     static GlobalDependencyProperty s_PaneFooterProperty;
00190     static GlobalDependencyProperty s_PaneHeaderProperty;
00191     static GlobalDependencyProperty s_PaneTitleProperty;
00192     static GlobalDependencyProperty s_PaneToggleButtonStyleProperty;
00193     static GlobalDependencyProperty s_SelectedItemProperty;
00194     static GlobalDependencyProperty s_SelectionFollowsFocusProperty;
00195     static GlobalDependencyProperty s_SettingsItemProperty;
00196     static GlobalDependencyProperty s_ShoulderNavigationEnabledProperty;
00197     static GlobalDependencyProperty s_TemplateSettingsProperty;
00198
00199     winrt::event_token BackRequested(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs> const& value);
00200     void BackRequested(winrt::event_token const& token);
00201     winrt::event_token Collapsed(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs> const& value);
00202     void Collapsed(winrt::event_token const& token);
00203     winrt::event_token DisplayModeChanged(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs> const& value);
00204     void DisplayModeChanged(winrt::event_token const& token);
00205     winrt::event_token Expanding(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs> const& value);
00206     void Expanding(winrt::event_token const& token);
00207     winrt::event_token ItemInvoked(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs> const& value);
00208     void ItemInvoked(winrt::event_token const& token);
00209     winrt::event_token PaneClosed(winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> const& value);
00210     void PaneClosed(winrt::event_token const& token);
00211     winrt::event_token PaneClosing(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs> const& value);
00212     void PaneClosing(winrt::event_token const& token);
00213     winrt::event_token PaneOpened(winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> const& value);
00214     void PaneOpened(winrt::event_token const& token);
00215     winrt::event_token PaneOpening(winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable> const& value);
00216     void PaneOpening(winrt::event_token const& token);
00217     winrt::event_token SelectionChanged(winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs> const& value);
00218     void SelectionChanged(winrt::event_token const& token);
00219
00220     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs>> m_backRequestedEventSource;
00221     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs>> m_collapsedEventSource;
00222     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs>> m_displayModeChangedEventSource;
00223     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs>> m_expandingEventSource;
00224     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs>> m_itemInvokedEventSource;
00225     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable>> m_paneClosedEventSource;
00226     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs>> m_paneClosingEventSource;
00227     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable>> m_paneOpenedEventSource;
00228     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::IInspectable>> m_paneOpeningEventSource;
00229     event_source<winrt::TypedEventHandler<winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs>> m_selectionChangedEventSource;
00230
00231     static void EnsureProperties();
00232     static void ClearProperties();
00233
00234     static void OnAlwaysShowHeaderPropertyChanged(
00235         winrt::DependencyObject const& sender,
00236         winrt::DependencyPropertyChangedEventArgs const& args);
00237
00238     static void OnAutoSuggestBoxPropertyChanged(
00239         winrt::DependencyObject const& sender,
00240         winrt::DependencyPropertyChangedEventArgs const& args);
00241
00242     static void OnCompactModeThresholdWidthPropertyChanged(
00243         winrt::DependencyObject const& sender,
00244         winrt::DependencyPropertyChangedEventArgs const& args);
00245
00246     static void OnCompactPaneLengthPropertyChanged(
00247         winrt::DependencyObject const& sender,
00248         winrt::DependencyPropertyChangedEventArgs const& args);
00249
00250     static void OnDisplayModePropertyChanged(
00251         winrt::DependencyObject const& sender,
00252         winrt::DependencyPropertyChangedEventArgs const& args);
00253
00254     static void OnExpandedModeThresholdWidthPropertyChanged(
00255         winrt::DependencyObject const& sender,
00256         winrt::DependencyPropertyChangedEventArgs const& args);
00257
00258     static void OnFooterMenuItemsPropertyChanged(
00259         winrt::DependencyObject const& sender,
00260         winrt::DependencyPropertyChangedEventArgs const& args);
00261
00262     static void OnFooterMenuItemsSourcePropertyChanged(
00263         winrt::DependencyObject const& sender,
00264         winrt::DependencyPropertyChangedEventArgs const& args);
00265
00266     static void OnHeaderPropertyChanged(
00267         winrt::DependencyObject const& sender,
00268         winrt::DependencyPropertyChangedEventArgs const& args);
00269
00270     static void OnHeaderTemplatePropertyChanged(
00271         winrt::DependencyObject const& sender,
00272         winrt::DependencyPropertyChangedEventArgs const& args);
00273
00274     static void OnIsBackButtonVisiblePropertyChanged(
00275         winrt::DependencyObject const& sender,
00276         winrt::DependencyPropertyChangedEventArgs const& args);
00277
00278     static void OnIsBackEnabledPropertyChanged(
00279         winrt::DependencyObject const& sender,
00280         winrt::DependencyPropertyChangedEventArgs const& args);
00281
00282     static void OnIsPaneOpenPropertyChanged(
00283         winrt::DependencyObject const& sender,
00284         winrt::DependencyPropertyChangedEventArgs const& args);
00285
00286     static void OnIsPaneToggleButtonVisiblePropertyChanged(
00287         winrt::DependencyObject const& sender,
00288         winrt::DependencyPropertyChangedEventArgs const& args);
00289
00290     static void OnIsPaneVisiblePropertyChanged(
00291         winrt::DependencyObject const& sender,
00292         winrt::DependencyPropertyChangedEventArgs const& args);
00293
00294     static void OnIsSettingsVisiblePropertyChanged(
00295         winrt::DependencyObject const& sender,
00296         winrt::DependencyPropertyChangedEventArgs const& args);
00297
00298     static void OnIsTitleBarAutoPaddingEnabledPropertyChanged(
00299         winrt::DependencyObject const& sender,
00300         winrt::DependencyPropertyChangedEventArgs const& args);
00301
00302     static void OnMenuItemContainerStylePropertyChanged(
00303         winrt::DependencyObject const& sender,
00304         winrt::DependencyPropertyChangedEventArgs const& args);
00305
00306     static void OnMenuItemContainerStyleSelectorPropertyChanged(
00307         winrt::DependencyObject const& sender,
00308         winrt::DependencyPropertyChangedEventArgs const& args);
00309
00310     static void OnMenuItemsPropertyChanged(
00311         winrt::DependencyObject const& sender,
00312         winrt::DependencyPropertyChangedEventArgs const& args);
00313
00314     static void OnMenuItemsSourcePropertyChanged(
00315         winrt::DependencyObject const& sender,
00316         winrt::DependencyPropertyChangedEventArgs const& args);
00317
00318     static void OnMenuItemTemplatePropertyChanged(
00319         winrt::DependencyObject const& sender,
00320         winrt::DependencyPropertyChangedEventArgs const& args);
00321
00322     static void OnMenuItemTemplateSelectorPropertyChanged(
00323         winrt::DependencyObject const& sender,
00324         winrt::DependencyPropertyChangedEventArgs const& args);
00325
00326     static void OnOpenPaneLengthPropertyChanged(
00327         winrt::DependencyObject const& sender,
00328         winrt::DependencyPropertyChangedEventArgs const& args);
00329
00330     static void OnOverflowLabelModePropertyChanged(
00331         winrt::DependencyObject const& sender,
00332         winrt::DependencyPropertyChangedEventArgs const& args);
00333
00334     static void OnPaneDisplayModePropertyChanged(
00335         winrt::DependencyObject const& sender,
00336         winrt::DependencyPropertyChangedEventArgs const& args);
00337
00338     static void OnPaneFooterPropertyChanged(
00339         winrt::DependencyObject const& sender,
00340         winrt::DependencyPropertyChangedEventArgs const& args);
00341
00342     static void OnPaneTitlePropertyChanged(
00343         winrt::DependencyObject const& sender,
00344         winrt::DependencyPropertyChangedEventArgs const& args);
00345
00346     static void OnPaneToggleButtonStylePropertyChanged(
00347         winrt::DependencyObject const& sender,
00348         winrt::DependencyPropertyChangedEventArgs const& args);
00349
00350     static void OnSelectedItemPropertyChanged(
00351         winrt::DependencyObject const& sender,
00352         winrt::DependencyPropertyChangedEventArgs const& args);
00353
00354     static void OnSelectionFollowsFocusPropertyChanged(
00355         winrt::DependencyObject const& sender,
00356         winrt::DependencyPropertyChangedEventArgs const& args);
00357
00358     static void OnSettingsItemPropertyChanged(
00359         winrt::DependencyObject const& sender,
00360         winrt::DependencyPropertyChangedEventArgs const& args);
00361
00362     static void OnShoulderNavigationEnabledPropertyChanged(
00363         winrt::DependencyObject const& sender,
00364         winrt::DependencyPropertyChangedEventArgs const& args);
00365 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/CustomResources/NavigationViewCustomThemeResourcesPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • CustomResources

NavigationViewCustomThemeResourcesPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using Windows.ApplicationModel.Core;
00009
00010 using System.Globalization;
00011 using Windows.UI.Core;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     public sealed partial class NavigationViewCustomThemeResourcesPage : TestPage
00016     {
00017         private Style defaultPaneTitleTextBlockStyle = null;
00018
00019         public NavigationViewCustomThemeResourcesPage()
00020         {
00021             this.InitializeComponent();
00022
00023             this.Loaded += NavigationViewPage_Loaded;
00024         }
00025
00026         private void NavigationViewPage_Loaded(object sender, RoutedEventArgs e)
00027         {
00028             SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
00029             PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
00030             HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;
00031         }
00032
00033         private void OpenPaneButton_Click(object sender, RoutedEventArgs e)
00034         {
00035             NavView.IsPaneOpen = true;
00036         }
00037
00038         private void ChangeContent_Click(object sender, RoutedEventArgs e)
00039         {
00040             if (NavView.Content == null)
00041             {
00042                 NavView.Content = new TextBox() { Text = "|Test|" };
00043             }
00044             else
00045             {
00046                 NavView.Content = null;
00047             }
00048         }
00049
00050         private void CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00051         {
00052             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00053             NavView.CompactModeThresholdWidth = tag;
00054         }
00055
00056         private void ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00057         {
00058             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00059             NavView.ExpandedModeThresholdWidth = tag;
00060         }
00061
00062         private void PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00063         {
00064             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00065             var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
00066             NavView.PaneDisplayMode = mode;
00067         }
00068
00069         private void SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00070         {
00071             NavView.IsSettingsVisible = true;
00072         }
00073
00074         private void SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00075         {
00076             NavView.IsSettingsVisible = false;
00077         }
00078
00079         private void PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00080         {
00081             NavView.IsPaneToggleButtonVisible = true;
00082         }
00083
00084         private void PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00085         {
00086             NavView.IsPaneToggleButtonVisible = false;
00087         }
00088
00089         private void CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00090         {
00091             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00092             NavView.CompactPaneLength = tag;
00093         }
00094
00095         private void OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00096         {
00097             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00098             NavView.OpenPaneLength = tag;
00099         }
00100
00101         private void HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00102         {
00103             NavView.AlwaysShowHeader = true;
00104         }
00105
00106         private void HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00107         {
00108             NavView.AlwaysShowHeader = false;
00109         }
00110
00111         private void WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00112         {
00113             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00114             NavView.Width = tag;
00115         }
00116
00117         private void HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00118         {
00119             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00120             if (tag == "Default")
00121             {
00122                 MainGridRow.Height = new GridLength(1, GridUnitType.Star);
00123             }
00124             else if (tag == "300")
00125             {
00126                 MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
00127             }
00128         }
00129
00130         private void IsTitleBarAutoPaddingEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00131         {
00132             NavView.IsTitleBarAutoPaddingEnabled = true;
00133         }
00134
00135         private void IsTitleBarAutoPaddingEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00136         {
00137             NavView.IsTitleBarAutoPaddingEnabled = false;
00138         }
00139
00140         private void TitleBarCheckbox_Checked(object sender, RoutedEventArgs e)
00141         {
00142             if (CoreWindow.GetForCurrentThread() != null)
00143             {
00144                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00145                 titleBar.ExtendViewIntoTitleBar = false;
00146             }
00147         }
00148
00149         private void TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e)
00150         {
00151             if (CoreWindow.GetForCurrentThread() != null)
00152             {
00153                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00154                 titleBar.ExtendViewIntoTitleBar = true;
00155             }
00156         }
00157
00158         private void ChangePaneTitleText_Click(object sender, RoutedEventArgs e)
00159         {
00160             NavView.PaneTitle = (String.IsNullOrEmpty(NavView.PaneTitle) ? "|NavView Test|" : string.Empty);
00161         }
00162
00163         private void ChangePaneTitleStyle_Click(object sender, RoutedEventArgs e)
00164         {
00165             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00166             if (rootGrid != null)
00167             {
00168                 var paneTitleTextBlock = rootGrid.FindName("PaneTitleTextBlock") as TextBlock;
00169                 if (paneTitleTextBlock != null)
00170                 {
00171                     if (defaultPaneTitleTextBlockStyle == null)
00172                     {
00173                         defaultPaneTitleTextBlockStyle = paneTitleTextBlock.Style;
00174                     }
00175
00176                     if (defaultPaneTitleTextBlockStyle == paneTitleTextBlock.Style)
00177                     {
00178                         paneTitleTextBlock.Style = Resources["NavigationViewPaneTitleStyle"] as Style;
00179                     }
00180                     else
00181                     {
00182                         paneTitleTextBlock.Style = defaultPaneTitleTextBlockStyle;
00183                     }
00184                 }
00185             }
00186         }
00187
00188         private void ChangeHeaderButton_Click(object sender, RoutedEventArgs args)
00189         {
00190             NavView.Header = NavView.Header == null ? new TextBlock() { Text = "|Bananas|" } : null;
00191         }
00192
00193         private void BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00194         {
00195             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00196         }
00197
00198         private void BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00199         {
00200             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
00201         }
00202
00203         private void BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00204         {
00205             NavView.IsBackEnabled = true;
00206         }
00207
00208         private void BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00209         {
00210             NavView.IsBackEnabled = false;
00211         }
00212
00213         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00214         {
00215             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00216         }
00217
00218         private void GetHeaderContentMargin_Click(object sender, RoutedEventArgs e)
00219         {
00220             string margin = "|Cannot find HeaderContent|";
00221             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00222             if (rootGrid != null)
00223             {
00224                 var control = rootGrid.FindName("HeaderContent") as FrameworkElement;
00225                 if (control != null)
00226                 {
00227                     margin = control.Margin.ToString();
00228                 }
00229             }
00230             HeaderContentMarginResult.Text = margin;
00231         }
00232
00233         private void GetNavViewActiveVisualStates_Click(object sender, RoutedEventArgs e)
00234         {
00235             var visualstates = Utilities.VisualStateHelper.GetCurrentVisualStateName(NavView);
00236             NavViewActiveVisualStatesResult.Text = string.Join(",", visualstates);
00237         }
00238
00239         private void ChangePaneHeader_Click(object sender, RoutedEventArgs e)
00240         {
00241             NavView.PaneHeader = NavView.PaneHeader == null ? new TextBlock() { Text = "|Modified pane header|" } : null;
00242         }
00243     }
00244 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksFactory.cpp Source File

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooksFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MUXControlsTestHooks.h"
00007
00008 MUXControlsTestHooks* MUXControlsTestHooks::s_testHooks = nullptr;
00009
00010 void MUXControlsTestHooks::EnsureHooks()
00011 {
00012     if (!s_testHooks)
00013     {
00014         s_testHooks = winrt::make_self<MUXControlsTestHooks>().detach();
00015     }
00016 }
00017
00018 void MUXControlsTestHooks::SetOutputDebugStringLevelForType(winrt::hstring const& type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)
00019 {
00020     EnsureHooks();
00021     s_testHooks->SetOutputDebugStringLevelForTypeImpl(type, isLoggingInfoLevel, isLoggingVerboseLevel);
00022 }
00023
00024 void MUXControlsTestHooks::SetLoggingLevelForType(winrt::hstring const& type, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)
00025 {
00026     EnsureHooks();
00027     s_testHooks->SetLoggingLevelForTypeImpl(type, isLoggingInfoLevel, isLoggingVerboseLevel);
00028 }
00029
00030 void MUXControlsTestHooks::SetLoggingLevelForInstance(winrt::IInspectable const& sender, bool isLoggingInfoLevel, bool isLoggingVerboseLevel)
00031 {
00032     EnsureHooks();
00033     s_testHooks->SetLoggingLevelForInstanceImpl(sender, isLoggingInfoLevel, isLoggingVerboseLevel);
00034 }
00035
00036 winrt::event_token MUXControlsTestHooks::LoggingMessage(winrt::TypedEventHandler<winrt::IInspectable, winrt::MUXControlsTestHooksLoggingMessageEventArgs> const& value)
00037 {
00038     EnsureHooks();
00039     return s_testHooks->LoggingMessageImpl(value);
00040 }
00041
00042 void MUXControlsTestHooks::LoggingMessage(winrt::event_token const& token)
00043 {
00044     if (s_testHooks)
00045     {
00046         s_testHooks->LoggingMessageImpl(token);
00047     }
00048 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarItemAutomationPeer Member List

This is the complete list of members for MenuBarItemAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
Collapse() | MenuBarItemAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< MenuBarItemAutomationPeer > &&self) noexcept | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
Expand() | MenuBarItemAutomationPeer |
ExpandCollapseState() | MenuBarItemAutomationPeer |
final_release(std::unique_ptr< MenuBarItemAutomationPeer > &&self) | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | MenuBarItemAutomationPeer |
GetBase() | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
GetClassNameCore() | MenuBarItemAutomationPeer |
GetInner() | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
GetNameCore() | MenuBarItemAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | MenuBarItemAutomationPeer |
Invoke() | MenuBarItemAutomationPeer |
IsOnThread() | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
MenuBarItemAutomationPeer(winrt::MenuBarItem const &owner) | MenuBarItemAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MenuBarItemAutomationPeer, winrt::implementation::MenuBarItemAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizingUniformCarouselStackLayout Member List

This is the complete list of members for VirtualizingUniformCarouselStackLayout, including all inherited members.
ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) | VirtualizingUniformCarouselStackLayout | [inline, protected]
VirtualizingLayout::ArrangeOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &finalSize) | VirtualizingLayout | [virtual]
FirstRealizedIndexInRect(Rect realizationRect, int itemCount) | VirtualizingUniformCarouselStackLayout | [inline, private]
InitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
ItemHeight | VirtualizingUniformCarouselStackLayout |
ItemWidth | VirtualizingUniformCarouselStackLayout |
LastRealizedIndexInRect(Rect realizationRect, int itemCount) | VirtualizingUniformCarouselStackLayout | [inline, private]
MeasureOverride(VirtualizingLayoutContext context, Size availableSize) | VirtualizingUniformCarouselStackLayout | [inline, protected]
VirtualizingLayout::MeasureOverride(winrt::VirtualizingLayoutContext const &context, winrt::Size const &availableSize) | VirtualizingLayout | [virtual]
OnItemsChangedCore(winrt::VirtualizingLayoutContext const &context, winrt::IInspectable const &source, winrt::NotifyCollectionChangedEventArgs const &args) | VirtualizingLayout | [virtual]
Repeat | VirtualizingUniformCarouselStackLayout |
RepeatCount | VirtualizingUniformCarouselStackLayout |
Spacing | VirtualizingUniformCarouselStackLayout |
UninitializeForContextCore(winrt::VirtualizingLayoutContext const &context) | VirtualizingLayout | [virtual]
VirtualizingLayout() | VirtualizingLayout |
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipClosedEventArgs.h Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipClosedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TeachingTipClosedEventArgs.g.h"
00007
00008 class TeachingTipClosedEventArgs :
00009     public winrt::implementation::TeachingTipClosedEventArgsT<TeachingTipClosedEventArgs>
00010 {
00011 public:
00012     winrt::TeachingTipCloseReason Reason();
00013     void Reason(const winrt::TeachingTipCloseReason& reason);
00014 private:
00015
00016     winrt::TeachingTipCloseReason m_reason{ winrt::TeachingTipCloseReason::CloseButton };
00017 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemCollectionTransitionProvider.properties.h Source File

  • File List
  • File Members
  • Generated

ItemCollectionTransitionProvider.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ItemCollectionTransitionProviderProperties
00008 {
00009 public:
00010     ItemCollectionTransitionProviderProperties();
00011
00012
00013
00014     winrt::event_token TransitionCompleted(winrt::TypedEventHandler<winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs> const& value);
00015     void TransitionCompleted(winrt::event_token const& token);
00016
00017     event_source<winrt::TypedEventHandler<winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs>> m_transitionCompletedEventSource;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedAcceptVisualSource Member List

This is the complete list of members for AnimatedAcceptVisualSource, including all inherited members.
ColorAsVector4(winrt::Windows::UI::Color color) | AnimatedAcceptVisualSource | [private, static]
Duration() | AnimatedAcceptVisualSource |
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | AnimatedAcceptVisualSource | [private]
Foreground() | AnimatedAcceptVisualSource | [inline]
Foreground(winrt::Windows::UI::Color value) | AnimatedAcceptVisualSource |
FrameCount() | AnimatedAcceptVisualSource |
Framerate() | AnimatedAcceptVisualSource |
FrameToProgress(double frameNumber) | AnimatedAcceptVisualSource |
Markers() | AnimatedAcceptVisualSource |
SetColorProperty(hstring const &propertyName, winrt::Windows::UI::Color value) | AnimatedAcceptVisualSource |
SetScalarProperty(hstring const &propertyName, double value) | AnimatedAcceptVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor) | AnimatedAcceptVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics) | AnimatedAcceptVisualSource |
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeControlPage Member List

This is the complete list of members for SwipeControlPage, including all inherited members.
_dt | SwipeControlPage | [private]
animatedSwipe | SwipeControlPage | [private]
AnimatedValuesSpy | SwipeControlPage | [private]
AppendAsyncEventMessage(string asyncEventMessage) | SwipeControlPage | [inline, private]
AppendAsyncEventMessage() | SwipeControlPage | [inline, private]
asyncEventReportingLock | SwipeControlPage | [private]
BtnClearFullLog_Click(object sender, RoutedEventArgs e) | SwipeControlPage | [inline, private]
BtnClearSwipeControlEvents_Click(object sender, RoutedEventArgs e) | SwipeControlPage | [inline, private]
BtnGetFullLog_Click(object sender, RoutedEventArgs e) | SwipeControlPage | [inline, private]
ChangeText(string text) | SwipeControlPage | [inline]
CheckSpyingTicksRequirement() | SwipeControlPage | [inline, private]
ChkLogSwipeControlMessages_Checked(object sender, RoutedEventArgs e) | SwipeControlPage | [inline, private]
ChkLogSwipeControlMessages_Unchecked(object sender, RoutedEventArgs e) | SwipeControlPage | [inline, private]
CompositionTarget_Rendering(object sender, object e) | SwipeControlPage | [inline, private]
ContainerSizeChangedHandler(object sender, object e) | SwipeControlPage | [inline, private]
DispatcherTimer_Tick(object sender, object e) | SwipeControlPage | [inline, private]
ExecuteRemainOpenInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args) | SwipeControlPage | [inline, private]
fullLogs | SwipeControlPage | [private]
IsRenderingHooked | SwipeControlPage | [private]
lastInteractedWithSwipeControlContentContainer | SwipeControlPage | [private]
lastInteractedWithSwipeControlContentRoot | SwipeControlPage | [private]
LastInteractedWithSwipeControlSwipeContentElement_SizeChanged(object sender, SizeChangedEventArgs e) | SwipeControlPage | [inline, private]
lstAsyncEventMessage | SwipeControlPage | [private]
MaterialHelperTestApiSetup() | SwipeControlPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | SwipeControlPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | SwipeControlPage | [inline, protected]
OnNavigatingFrom(NavigatingCancelEventArgs e) | SwipeControlPage | [inline, protected]
OnResetClick(object sender, RoutedEventArgs args) | SwipeControlPage | [inline, private]
pastSender | SwipeControlPage | [private]
PositionAnimation | SwipeControlPage | [private]
PrintGridWidth() | SwipeControlPage | [inline, private]
ProgramaticallyCloseSwipeControl11(SwipeItem sender, SwipeItemInvokedEventArgs args) | SwipeControlPage | [inline, private]
ProgramaticallyCloseSwipeControl3(SwipeItem sender, SwipeItemInvokedEventArgs args) | SwipeControlPage | [inline, private]
ProgramaticallyCloseSwipeControl9(SwipeItem sender, SwipeItemInvokedEventArgs args) | SwipeControlPage | [inline, private]
ResetSpyOutput() | SwipeControlPage | [inline, private]
SetupAnimatedValuesSpy() | SwipeControlPage | [inline, private]
SpyAnimatedValues() | SwipeControlPage | [inline, private]
StartAnimatedValuesSpy() | SwipeControlPage | [inline, private]
StopAnimatedValuesSpy() | SwipeControlPage | [inline, private]
SwipeControlPage() | SwipeControlPage | [inline]
SwipeItemInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args) | SwipeControlPage | [inline, private]
SwipeItemInvokedAndResizeGrid(SwipeItem sender, SwipeItemInvokedEventArgs args) | SwipeControlPage | [inline, private]
SwipeTestHooks_IdleStatusChanged(SwipeControl sender, object args) | SwipeControlPage | [inline, private]
SwipeTestHooks_LastInteractedWithSwipeControlChanged(object sender, object args) | SwipeControlPage | [inline, private]
SwipeTestHooks_OpenedStatusChanged(SwipeControl sender, object args) | SwipeControlPage | [inline, private]
TestSwipeControl_Loaded(object sender, RoutedEventArgs e) | SwipeControlPage | [inline, private]
TestSwipeControl_Unloaded(object sender, RoutedEventArgs e) | SwipeControlPage | [inline, private]
TickForValuesSpy() | SwipeControlPage | [inline, private]
UICommand_ExecuteRequested(XamlUICommand command, ExecuteRequestedEventArgs args) | SwipeControlPage | [inline, private]
UIThreadTicksForValuesSpy | SwipeControlPage | [private]
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IndexRange Member List

This is the complete list of members for IndexRange, including all inherited members.
Begin() const | IndexRange |
Contains(int index) const | IndexRange |
End() const | IndexRange |
IndexRange() | IndexRange |
IndexRange(int begin, int end) | IndexRange |
Intersects(const IndexRange &other) const | IndexRange |
m_begin | IndexRange | [private]
m_end | IndexRange | [private]
operator==(const IndexRange &rhs) const | IndexRange |
Split(int splitIndex, IndexRange &before, IndexRange &after) | IndexRange |
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/TestUI/RatingControlPage.xaml.cs Source File

  • File List
  • File Members
  • RatingControl
  • TestUI

RatingControlPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.IO;
00007 using System.Linq;
00008 using System.Runtime.InteropServices.WindowsRuntime;
00009 using Windows.Foundation;
00010 using Windows.Foundation.Collections;
00011 using Microsoft.UI.Xaml;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Controls.Primitives;
00014 using Microsoft.UI.Xaml.Data;
00015 using Microsoft.UI.Xaml.Input;
00016 using Microsoft.UI.Xaml.Media;
00017 using Microsoft.UI.Xaml.Navigation;
00018 using Microsoft.UI.Xaml.Automation;
00019 using Microsoft.UI.Composition;
00020 using Microsoft.UI.Xaml.Hosting;
00021 using System.Numerics;
00022 using Windows.UI;
00023 using Windows.Foundation.Metadata;
00024 namespace MUXControlsTestApp
00025 {
00026     [TopLevelTestPage(Name= "RatingControl", Icon= "RatingControl.png")]
00027     public sealed partial class RatingControlPage : TestPage
00028     {
00029         UIElement _secondTextBlockUI;
00030         DispatcherTimer _dt;
00031
00032         SolidColorBrush _tomato = new SolidColorBrush(Microsoft.UI.Colors.Tomato);
00033         SolidColorBrush _aqua = new SolidColorBrush(Microsoft.UI.Colors.Aqua);
00034
00035         public RatingControlPage()
00036         {
00037             this.InitializeComponent();
00038
00039             TestRatingControl.ValueChanged += TestRatingControl_ValueChanged;
00040
00041             RatingDarkTheme.PlaceholderValue = 1.5;
00042
00043             MyRatingReadOnlyTextBlock.Text = "2.2";
00044             MyRatingReadOnlyWithPlaceholder.PlaceholderValue = 3.3;
00045
00046             DisabledWithValue.Value = 3;
00047             DisabledWithPlaceholderValue.PlaceholderValue = 3;
00048
00049             CustomImages.Value = 3.0;
00050             CustomImages.PlaceholderValue = 1.5;
00051
00052             var imageInfo = new RatingItemImageInfo();
00053             imageInfo.Image = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_set.png"));
00054             imageInfo.UnsetImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_unset.png")); ;
00055             imageInfo.PlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_placeholder.png")); ;
00056             imageInfo.DisabledImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_disabled.png")); ;
00057             imageInfo.PointerOverImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverset.png")); ;
00058             imageInfo.PointerOverPlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverplaceholder.png"));
00059
00060             CustomImagesTwo.ItemInfo = imageInfo;
00061             CustomImagesTwo.Value = 3.0;
00062             CustomImagesTwo.PlaceholderValue = 4.25;
00063
00064             PointerOverPlaceholderFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler (PointerOverPlaceholderFallbackRating_PointerMoved), true);
00065             PointerOverFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler(PointerOverFallbackRating_PointerMoved), true);
00066
00067             PointerOverPlaceholderImageFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler(PointerOverPlaceholderImageFallbackRating_PointerMoved), true);
00068             PointerOverImageFallbackRating.AddHandler(RatingControl.PointerMovedEvent, new PointerEventHandler(PointerOverImageFallbackRating_PointerMoved), true);
00069
00070             ColorFlipButton.Foreground = _tomato;
00071
00072             RatingBindingSample.DataContext = CaptionStringBox;
00073             BindingRatingCaption.DataContext = ColorFlipButton;
00074
00075             Loaded += RatingControlPage_Loaded;
00076         }
00077
00078         private void RatingControlPage_Loaded(object sender, RoutedEventArgs e)
00079         {
00080             FrameDetails.Text = XamlRoot.Content.ActualSize.ToString();
00081         }
00082
00083         DependencyObject SearchVisualTree(DependencyObject root, string name)
00084         {
00085             int size = VisualTreeHelper.GetChildrenCount(root);
00086             DependencyObject child = null;
00087
00088             for (int i = 0; i < size && child == null; i++)
00089             {
00090                 DependencyObject depObj = VisualTreeHelper.GetChild(root, i);
00091                 FrameworkElement fe = depObj as FrameworkElement;
00092
00093                 if (fe.Name.Equals(name))
00094                 {
00095                     child = fe;
00096                 }
00097                 else
00098                 {
00099                     child = SearchVisualTree(fe, name);
00100                 }
00101             }
00102
00103             return child;
00104         }
00105
00106
00107         protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
00108         {
00109             _dt.Tick -= DispatcherTimer_Tick; // prevent leaks since the dispatcher holds a pointer to this
00110         }
00111
00112         private void TestRatingControl_ValueChanged(RatingControl sender, object args)
00113         {
00114             if (TestRatingControl.Value == -1)
00115             {
00116                 if (TestRatingControl.PlaceholderValue == -1)
00117                 {
00118                     TestTextBlockControl.Text = "!";
00119                 }
00120                 else
00121                 {
00122                     TestTextBlockControl.Text = "!" + TestRatingControl.PlaceholderValue.ToString();
00123                 }
00124             }
00125             else
00126             {
00127                 TestTextBlockControl.Text = sender.Value.ToString(); // Having both ways of referring to the control to make sure both work
00128             }
00129         }
00130
00131         private void ValueChangeInMarkup_ValueChanged(RatingControl sender, object args)
00132         {
00133             if (ValueChangeInMarkup.Value == -1)
00134             {
00135                 ValueChangeInMarkupText.Text = "!!" + ValueChangeInMarkup.PlaceholderValue.ToString();
00136             }
00137             else
00138             {
00139                 ValueChangeInMarkupText.Text = ValueChangeInMarkup.Value.ToString();
00140             }
00141         }
00142
00143         private void Button_Click(object sender, RoutedEventArgs e)
00144         {
00145             Frame.FlowDirection = Frame.FlowDirection == FlowDirection.LeftToRight ?
00146                 FlowDirection.RightToLeft : FlowDirection.LeftToRight;
00147         }
00148
00149         private void TestRatingControlButton_Click(object sender, RoutedEventArgs e)
00150         {
00151             TestRatingControl.PlaceholderValue = -1;
00152         }
00153
00154         private void MyRatingIsClearEnabled_ValueChanged(RatingControl sender, object args)
00155         {
00156             if (sender.Value == -1)
00157             {
00158                 MyRatingIsClearEnabledText.Text = "!" + sender.PlaceholderValue.ToString();
00159             }
00160             else
00161             {
00162                 MyRatingIsClearEnabledText.Text = sender.Value.ToString();
00163             }
00164         }
00165
00166         private void CollapsedRatingControlButton_Click(object sender, RoutedEventArgs e)
00167         {
00168             CollapsedRatingControl.Value = 3.3;
00169         }
00170
00171         private void RatingXBindSampleButton_Click(object sender, RoutedEventArgs e)
00172         {
00173             RatingXBindSampleText.Text = RatingXBindSample.Caption;
00174         }
00175
00176         private void RatingBindingSampleButton_Click(object sender, RoutedEventArgs e)
00177         {
00178             RatingBindingSampleText.Text = RatingBindingSample.Caption;
00179         }
00180
00181         private void MaxRating9Unset_ValueChanged(RatingControl sender, object args)
00182         {
00183             if (sender.Value == -1)
00184             {
00185                 MaxRating9UnsetTextBlock.Text = "!!" + sender.PlaceholderValue.ToString();
00186             }
00187             else
00188             {
00189                 MaxRating9UnsetTextBlock.Text = sender.Value.ToString();
00190             }
00191         }
00192
00193         private void MakeTheAboveRatingSquares_Click(object sender, RoutedEventArgs e)
00194         {
00195             MakeMeSquares.FontFamily = new FontFamily("Times New Roman");
00196         }
00197
00198         private void MyRatingReadOnly_ValueChanged(RatingControl sender, object args)
00199         {
00200             MyRatingReadOnlyTextBlock.Text = sender.Value.ToString();
00201         }
00202
00203         private void CustomImages_Loaded(object sender, RoutedEventArgs e)
00204         {
00205             DependencyObject obj = FindVisualChildByName(CustomImages, "RatingBackgroundStackPanel");
00206             var child = VisualTreeHelper.GetChild(obj, 0);
00207             AutomationProperties.SetAutomationId(child, "CustomImages_FirstImageItem");
00208             AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);
00209
00210             CustomImagesLoadedCheckBox.IsChecked = true;
00211         }
00212
00213         private void ChangeCustomImagesTwoType_Click(object sender, RoutedEventArgs e)
00214         {
00215             if (CustomImagesTwo.ItemInfo is RatingItemImageInfo)
00216             {
00217                 var rifi = new RatingItemFontInfo();
00218                 rifi.Glyph = "\uEB52";
00219                 rifi.UnsetGlyph = "\uEB52";
00220                 rifi.PointerOverGlyph = "\uEB52";
00221                 rifi.PointerOverPlaceholderGlyph = "\uEB52";
00222                 rifi.DisabledGlyph = "\uEB52";
00223
00224                 CustomImagesTwo.ItemInfo = rifi;
00225
00226                 DependencyObject obj = FindVisualChildByName(CustomImagesTwo, "RatingBackgroundStackPanel");
00227                 var child = VisualTreeHelper.GetChild(obj, 0);
00228                 AutomationProperties.SetAutomationId(child, "CustomImagesTwo_FirstTextItem");
00229                 AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);
00230
00231                 CustomImagesTwoLoadedStageTwoCheckBox.IsChecked = true;
00232             }
00233             else
00234             {
00235                 var imageInfo = new RatingItemImageInfo();
00236                 imageInfo.Image = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_set.png"));
00237                 imageInfo.UnsetImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_unset.png")); ;
00238                 imageInfo.PlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_placeholder.png")); ;
00239                 imageInfo.DisabledImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_disabled.png")); ;
00240                 imageInfo.PointerOverImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverset.png")); ;
00241                 imageInfo.PointerOverPlaceholderImage = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:/Assets/rating_mouseoverplaceholder.png"));
00242
00243                 CustomImagesTwo.ItemInfo = imageInfo;
00244
00245                 DependencyObject obj = FindVisualChildByName(CustomImagesTwo, "RatingBackgroundStackPanel");
00246                 var child = VisualTreeHelper.GetChild(obj, 0);
00247                 AutomationProperties.SetAutomationId(child, "CustomImagesTwo_FirstImageItem_Again");
00248                 AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);
00249
00250                 CustomImagesTwoLoadedStageThreeCheckBox.IsChecked = true;
00251             }
00252         }
00253
00254         private void CustomImagesTwo_Loaded(object sender, RoutedEventArgs e)
00255         {
00256             DependencyObject obj = FindVisualChildByName(CustomImagesTwo, "RatingBackgroundStackPanel");
00257             var child = VisualTreeHelper.GetChild(obj, 0);
00258             AutomationProperties.SetAutomationId(child, "CustomImagesTwo_FirstImageItem");
00259             AutomationProperties.SetAccessibilityView(child, Microsoft.UI.Xaml.Automation.Peers.AccessibilityView.Control);
00260
00261             CustomImagesTwoLoadedStageOneCheckBox.IsChecked = true;
00262         }
00263
00264         private void TestRatingControl_Loaded(object sender, RoutedEventArgs e)
00265         {
00266             _dt = new DispatcherTimer();
00267             _dt.Interval = TimeSpan.FromSeconds(0.1);
00268             _dt.Start();
00269             _dt.Tick += DispatcherTimer_Tick;
00270
00271             DependencyObject obj = FindVisualChildByName(TestRatingControl, "RatingBackgroundStackPanel");
00272             UIElement ui = obj as UIElement;
00273             DependencyObject child = VisualTreeHelper.GetChild(obj, 1);
00274             TextBlock tb = child as TextBlock;
00275             this._secondTextBlockUI = tb;
00276
00277             SetupAnimatedValuesSpy();
00278             SpyAnimatedValues();
00279         }
00280
00281         private void DispatcherTimer_Tick(object sender, object e)
00282         {
00283             SpyAnimatedValues();
00284         }
00285
00286         // Composition property spy stuff below:
00287         private CompositionPropertySet AnimatedValuesSpy
00288         {
00289             get;
00290             set;
00291         }
00292
00293         private ExpressionAnimation ScaleAnimation
00294         {
00295             get;
00296             set;
00297         }
00298
00299         private bool IsRenderingHooked
00300         {
00301             get;
00302             set;
00303         }
00304
00305         private uint UIThreadTicksForValuesSpy
00306         {
00307             get;
00308             set;
00309         }
00310
00311         private void SetupAnimatedValuesSpy()
00312         {
00313             StopAnimatedValuesSpy();
00314
00315             this.AnimatedValuesSpy = null;
00316             this.ScaleAnimation = null;
00317
00318             if (this._secondTextBlockUI != null)
00319             {
00320                 const string visualScaleTargetedPropertyName = "visual.Scale";
00321                 UIElement ppChild = this._secondTextBlockUI;
00322                 Visual visualPPChild = ElementCompositionPreview.GetElementVisual(ppChild);
00323
00324                 Compositor compositor = visualPPChild.Compositor;
00325
00326                 this.AnimatedValuesSpy = compositor.CreatePropertySet();
00327
00328                 this.AnimatedValuesSpy.InsertVector3("Scale", new Vector3(0.0f, 0.0f, 0.0f));
00329
00330                 this.ScaleAnimation = compositor.CreateExpressionAnimation(visualScaleTargetedPropertyName);
00331                 this.ScaleAnimation.SetReferenceParameter("visual", visualPPChild);
00332
00333                 CheckSpyingTicksRequirement();
00334
00335                 TickForValuesSpy();
00336             }
00337             else
00338             {
00339                 ResetSpyOutput();
00340             }
00341         }
00342
00343         private void StartAnimatedValuesSpy()
00344         {
00345             if (this.AnimatedValuesSpy != null)
00346             {
00347                 this.AnimatedValuesSpy.StartAnimation("Scale", this.ScaleAnimation);
00348             }
00349         }
00350
00351         private void StopAnimatedValuesSpy()
00352         {
00353             if (this.AnimatedValuesSpy != null)
00354             {
00355                 this.AnimatedValuesSpy.StopAnimation("Scale");
00356             }
00357         }
00358
00359         private void SpyAnimatedValues()
00360         {
00361             if (this.AnimatedValuesSpy != null)
00362             {
00363                 StopAnimatedValuesSpy();
00364
00365                 Vector3 scale;
00366                 CompositionGetValueStatus status = this.AnimatedValuesSpy.TryGetVector3("Scale", out scale);
00367                 if (CompositionGetValueStatus.Succeeded == status)
00368                 {
00369                     this.ScaleTextX.Text = scale.X.ToString();
00370                     this.ScaleTextY.Text = scale.Y.ToString();
00371                 }
00372                 else
00373                 {
00374                     this.ScaleTextX.Text = this.ScaleTextY.Text = "status=" + status.ToString();
00375                 }
00376
00377                 StartAnimatedValuesSpy();
00378
00379                 // System.Diagnostics.Debug.WriteLine("Spied values: " + this.ScaleTextX.Text);
00380             }
00381         }
00382
00383         private void ResetSpyOutput()
00384         {
00385             this.ScaleTextX.Text = this.ScaleTextY.Text = "0 - reset";
00386         }
00387
00388         private void TickForValuesSpy()
00389         {
00390             this.UIThreadTicksForValuesSpy = 6;
00391             CheckSpyingTicksRequirement();
00392         }
00393
00394         private void CheckSpyingTicksRequirement()
00395         {
00396             if (this._secondTextBlockUI != null &&
00397                 (this.UIThreadTicksForValuesSpy > 0) && this.AnimatedValuesSpy != null)
00398             {
00399                 if (!this.IsRenderingHooked)
00400                 {
00401                     this.IsRenderingHooked = true;
00402                     Microsoft.UI.Xaml.Media.CompositionTarget.Rendering += CompositionTarget_Rendering;
00403                 }
00404             }
00405             else
00406             {
00407                 if (this.IsRenderingHooked)
00408                 {
00409                     Microsoft.UI.Xaml.Media.CompositionTarget.Rendering -= CompositionTarget_Rendering;
00410                     this.IsRenderingHooked = false;
00411                 }
00412             }
00413         }
00414
00415         private void CompositionTarget_Rendering(object sender, object e)
00416         {
00417             if (this.UIThreadTicksForValuesSpy > 0)
00418             {
00419                 this.UIThreadTicksForValuesSpy--;
00420             }
00421             CheckSpyingTicksRequirement();
00422             SpyAnimatedValues();
00423         }
00424
00425         void PerformGlyphVerification(RatingControl rc, String expectedGlyph, TextBlock resultTb, String stackPanelName, SolidColorBrush expectedColor = null)
00426         {
00427             ContentPresenter presenter = FindVisualChildByName(rc, "ForegroundContentPresenter") as ContentPresenter;
00428
00429             DependencyObject obj = FindVisualChildByName(rc, stackPanelName);
00430             var child = VisualTreeHelper.GetChild(obj, 0);
00431             TextBlock tb = child as TextBlock;
00432
00433             String glyph = tb.Text;
00434             if (glyph.Equals(expectedGlyph))
00435             {
00436                 resultTb.Text = "+";
00437                 // Verify colour to make sure we don't accidentally take the non-pointer over as a false-positive
00438                 if (expectedColor == null || presenter.Foreground.Equals(expectedColor))
00439                 {
00440                     resultTb.Text = "+";
00441                 }
00442                 else
00443                 {
00444                     resultTb.Text = "/";
00445                 }
00446             }
00447             else
00448             {
00449                 resultTb.Text = "-";
00450             }
00451         }
00452
00453         void PerformImageVerification(RatingControl rc, String expectedUri, TextBlock resultTb, String stackPanelName, SolidColorBrush expectedColor = null)
00454         {
00455             ContentPresenter presenter = FindVisualChildByName(rc, "ForegroundContentPresenter") as ContentPresenter;
00456
00457             DependencyObject obj = FindVisualChildByName(rc, stackPanelName);
00458             var child = VisualTreeHelper.GetChild(obj, 0);
00459             Image image = child as Image;
00460             var source = image.Source;
00461             Microsoft.UI.Xaml.Media.Imaging.BitmapImage bitImage = source as Microsoft.UI.Xaml.Media.Imaging.BitmapImage;
00462
00463             String uri = bitImage.UriSource.ToString();
00464             if (uri.Equals(expectedUri))
00465             {
00466                 resultTb.Text = "+";
00467                 // Verify colour to make sure we don't accidentally take the non-pointer over as a false-positive
00468                 // The colours aren't used, but the state is there so we can still check.
00469                 if (expectedColor == null || presenter.Foreground.Equals(expectedColor))
00470                 {
00471                     resultTb.Text = "+";
00472                 }
00473                 else
00474                 {
00475                     resultTb.Text = "/";
00476                 }
00477             }
00478             else
00479             {
00480                 resultTb.Text = "-";
00481             }
00482         }
00483
00484         SolidColorBrush ThemeResourceNameToColorBrush(String themeResource)
00485         {
00486             return Application.Current.Resources[themeResource] as SolidColorBrush;
00487         }
00488
00489         private void UnsetFallbackRating_Loaded(object sender, RoutedEventArgs e)
00490         {
00491             PerformGlyphVerification(UnsetFallbackRating, "\uE00B" /* full heart */, UnsetFallbackTextBlock, "RatingBackgroundStackPanel");
00492         }
00493
00494         private void PlaceholderFallbackRating_Loaded(object sender, RoutedEventArgs e)
00495         {
00496             PerformGlyphVerification(PlaceholderFallbackRating, "\uE909" /* world/globe */, PlaceholderFallbackTextBlock, "RatingForegroundStackPanel");
00497         }
00498
00499         private void DisabledFallbackRating_Loaded(object sender, RoutedEventArgs e)
00500         {
00501             PerformGlyphVerification(DisabledFallbackRating, "\uE8DD" /* world/globe */, DisabledFallbackTextBlock, "RatingForegroundStackPanel");
00502         }
00503
00504         private void PointerOverPlaceholderFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e)
00505         {
00506             if (!PointerOverPlaceholderFallbackTextBlock.Text.Equals("+"))
00507             {
00508                 // Have to make sure this doesn't trigger before the PointerOver
00509                 PerformGlyphVerification(PointerOverPlaceholderFallbackRating, "\uEBAA", PointerOverPlaceholderFallbackTextBlock,
00510                     "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlPointerOverPlaceholderForeground"));
00511             }
00512         }
00513
00514         private void PointerOverFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e)
00515         {
00516             if (!PointerOverFallbackTextBlock.Text.Equals("+"))
00517             {
00518                 // Have to make sure this doesn't trigger before the PointerOver
00519                 PerformGlyphVerification(PointerOverFallbackRating, "\uE8CA", PointerOverFallbackTextBlock,
00520                     "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlSelectedForeground"));
00521             }
00522         }
00523
00524         private void NoFallbackRating_Loaded(object sender, RoutedEventArgs e)
00525         {
00526             PerformGlyphVerification(NoFallbackRating, "" /* glyph should fall back to nothing */, NoFallbackTextBlock, "RatingForegroundStackPanel");
00527         }
00528
00529         private void UnsetImageFallbackRating_Loaded(object sender, RoutedEventArgs e)
00530         {
00531             PerformImageVerification(UnsetImageFallbackRating, "ms-appx:/Assets/rating_set.png", UnsetImageFallbackTextBlock, "RatingBackgroundStackPanel");
00532         }
00533
00534         private void PlaceholderImageFallbackRating_Loaded(object sender, RoutedEventArgs e)
00535         {
00536             PerformImageVerification(PlaceholderImageFallbackRating, "ms-appx:/Assets/rating_unset.png", PlaceholderImageFallbackTextBlock, "RatingBackgroundStackPanel");
00537         }
00538
00539         private void DisabledImageFallbackRating_Loaded(object sender, RoutedEventArgs e)
00540         {
00541             PerformImageVerification(DisabledImageFallbackRating, "ms-appx:/Assets/rating_placeholder.png" /* world/globe */, DisabledImageFallbackTextBlock, "RatingForegroundStackPanel");
00542         }
00543
00544         private void PointerOverPlaceholderImageFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e)
00545         {
00546             if (!PointerOverPlaceholderImageFallbackTextBlock.Text.Equals("+"))
00547             {
00548                 // Have to make sure this doesn't trigger before the PointerOver
00549                 PerformImageVerification(PointerOverPlaceholderImageFallbackRating, "ms-appx:/Assets/rating_disabled.png", PointerOverPlaceholderImageFallbackTextBlock,
00550                     "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlPointerOverPlaceholderForeground"));
00551             }
00552         }
00553
00554         private void PointerOverImageFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e)
00555         {
00556             if (!PointerOverImageFallbackTextBlock.Text.Equals("+"))
00557             {
00558                 // Have to make sure this doesn't trigger before the PointerOver
00559                 PerformImageVerification(PointerOverImageFallbackRating, "ms-appx:/Assets/rating_mouseoverplaceholder.png", PointerOverImageFallbackTextBlock,
00560                     "RatingForegroundStackPanel", ThemeResourceNameToColorBrush("RatingControlSelectedForeground"));
00561             }
00562         }
00563
00564         private void ColorFlipButton_Click(object sender, RoutedEventArgs e)
00565         {
00566             if (ColorFlipButton.Foreground.Equals(_tomato))
00567             {
00568                 ColorFlipButton.Foreground = _aqua;
00569             }
00570             else
00571             {
00572                 ColorFlipButton.Foreground = _tomato;
00573             }
00574         }
00575
00576         private void MagicDisengager_ValueChanged(RatingControl sender, object args)
00577         {
00578             if (sender.Value == 3.0)
00579             {
00580                 sender.RemoveFocusEngagement();
00581             }
00582
00583             if (sender.Value == -1)
00584             {
00585                 MagicDisengagerTextBlock.Text = "null";
00586             }
00587             else
00588             {
00589                 MagicDisengagerTextBlock.Text = sender.Value.ToString();
00590             }
00591         }
00592     }
00593 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsSourceView Member List

This is the complete list of members for ItemsSourceView, including all inherited members.
abi_enter() | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
CollectionChanged(winrt::NotifyCollectionChangedEventHandler const &value) | ItemsSourceView |
CollectionChanged(winrt::event_token const &token) | ItemsSourceView |
Count() | ItemsSourceView |
DeleteInstanceOnUIThread(std::unique_ptr< ItemsSourceView > &&self) noexcept | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
final_release(std::unique_ptr< ItemsSourceView > &&self) | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline, static]
GetAt(int index) | ItemsSourceView |
GetAtCore(int index) | ItemsSourceView | [virtual]
GetBase() | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
GetInner() | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
GetSizeCore() | ItemsSourceView | [virtual]
HasKeyIndexMapping() | ItemsSourceView |
HasKeyIndexMappingCore() | ItemsSourceView | [virtual]
IndexFromKey(winrt::hstring const &id) | ItemsSourceView |
IndexFromKeyCore(winrt::hstring const &id) | ItemsSourceView | [virtual]
IndexOf(winrt::IInspectable const &value) | ItemsSourceView |
IndexOfCore(winrt::IInspectable const &value) | ItemsSourceView | [virtual]
IsOnThread() | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
KeyFromIndex(int index) | ItemsSourceView |
KeyFromIndexCore(int index) | ItemsSourceView | [virtual]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
OnItemsSourceChanged(winrt::NotifyCollectionChangedEventArgs const &args) | ItemsSourceView |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing > | [inline]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrush.cpp Source File

  • File List
  • File Members
  • Materials
  • Reveal

RevealBrush.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RevealBrush.h"
00007
00008 #pragma warning(push)
00009 #pragma warning(disable: 6101)  // Returning uninitialized memory '<value>'.  A successful path through the function does not set the named _Out_ parameter.
00010 #include "Microsoft.UI.Private.Composition.Effects_impl.h"
00011 #pragma warning(pop)
00012
00013 #include "XamlAmbientLight.h"
00014 #include "RevealHoverLight.h"
00015 #include "RevealBorderLight.h"
00016 #include "vector.h"
00017 #include "RuntimeProfiler.h"
00018
00019 #include "RevealBorderBrush.properties.cpp"
00020 #include "RevealBackgroundBrush.properties.cpp"
00021
00022 const winrt::Color RevealBrush::sc_defaultColor{ 0, 255, 255, 255 };
00023
00024 const winrt::Color RevealBrush::sc_ambientContributionColor{ 255, 127, 127, 127 };
00025 const float RevealBrush::sc_diffuseAmount{ 0.2f };
00026 const float RevealBrush::sc_specularAmount{ 0.0f };
00027 const float RevealBrush::sc_specularShine{ 0.0f };
00028
00029 const float RevealBrush::sc_diffuseAmountBorder{ 0.2f };
00030 const float RevealBrush::sc_specularAmountBorder{ 0.0f };
00031 const float RevealBrush::sc_specularShineBorder{ 0.0f };
00032
00033 const winrt::Matrix5x4 RevealBrush::sc_colorToAlphaMatrix =
00034 { 1.0f, 0.0f, 0.0f, 0.15f,
00035   0.0f, 1.0f, 0.0f, 0.0f,
00036   0.0f, 0.0f, 1.0f, 0.0f,
00037   0.0f, 0.0f, 0.0f, 0.0f,
00038   0.0f, 0.0f, 0.0f, 0.85f };
00039
00040 const winrt::Matrix5x4 RevealBrush::sc_luminanceToAlphaMatrix
00041 { 1.0f, 0.0f, 0.0f, 0.2125f,
00042   0.0f, 1.0f, 0.0f, 0.7154f,
00043   0.0f, 0.0f, 1.0f, 0.0721f,
00044   0.0f, 0.0f, 0.0f, 0.0f,
00045   0.0f, 0.0f, 0.0f, 0.0f };
00046
00047 // Originally the reveal border effect was built as:
00048 // 0) SceneLightingEffect input
00049 // 1) (0) multiplied through Luminance-to-alpha color matrix with ambient contribution of 0.5 in the RGBA offset row.
00050 // 2) ArithmeticCompositeEffect taking (1) and the base color with the multiply factors = 2 and offset = -1.
00051 //
00052 // In light theme we now want to "invert" that result -- but we also don't want to invert the color part of
00053 // the equation. In addition, the ArithmeticComposite step needs to work when the base color is transparent,
00054 // so instead we will just assume that the base color is transparent and just do a "SourceOver" of the border
00055 // effect onto the base color if it's provided. This gives consistent results no matter what the color is.
00056 //
00057 // If we assume that then we can simplify 1 & 2 above to be just one color matrix. ArithmeticComposite
00058 // when one of the inputs is transparent (all 0) is just a Multiply and Offset factor. In our case that's *2 and -1.
00059 // Folding this into the matrix from #1 produces the below.
00060 //
00061 // At the end of the day, it doesn't matter so much how we got here. There's the luminance to alpha operation
00062 // plus a *2 multiplier. The *2 factor on the luminance to alpha matrix can only be explained as "that's what
00063 // design wants". :)
00064
00065 // The reveal border matrix is the luminance to alpha matrix * 2
00066 const winrt::Matrix5x4 sc_revealBorderColorMatrix
00067 { 2.0f, 0.0f, 0.0f, 2 * 0.2125f,
00068     0.0f, 2.0f, 0.0f, 2 * 0.7154f,
00069     0.0f, 0.0f, 2.0f, 2 * 0.0721f,
00070     0.0f, 0.0f, 0.0f, 0.0f,
00071     0.0f, 0.0f, 0.0f, 0.0f };
00072
00073 // The inverse border is the above but the colors are negated.
00074 const winrt::Matrix5x4 sc_revealInvertedBorderColorMatrix
00075 { -2.0f,  0.0f,  0.0f,  2 * .2125f,
00076     0.0f, -2.0f,  0.0f,  2 * .7154f,
00077     0.0f,  0.0f, -2.0f,  2 * .0721f,
00078     0.0f,  0.0f,  0.0f,  0.0f,
00079     0.0f,  0.0f,  0.0f,  0.0f };
00080
00081
00082 GlobalDependencyProperty RevealBrush::s_IsContainerProperty{ nullptr };
00083
00084 void RevealBrush::ClearProperties()
00085 {
00086     s_IsContainerProperty = nullptr;
00087     RevealBrushProperties::ClearProperties();
00088 }
00089
00090 void RevealBrush::EnsureProperties()
00091 {
00092     RevealBrushProperties::EnsureProperties();
00093     if (!s_IsContainerProperty)
00094     {
00095         s_IsContainerProperty =
00096             InitializeDependencyProperty(
00097                 L"IsContainer",
00098                 winrt::name_of<bool>(),
00099                 winrt::name_of<winrt::RevealBrush>(),
00100                 true /* isAttached */,
00101                 box_value(false),
00102                 &OnIsContainerPropertyChanged);
00103     }
00104 }
00105
00106 RevealBrush::RevealBrush()
00107 {
00108     //  Logging usage telemetry
00109     __RP_Marker_ClassById(RuntimeProfiler::ProfId_Reveal);
00110
00111     EnsureProperties();
00112 }
00113
00114 RevealBorderBrush::RevealBorderBrush()
00115 {
00116     m_isBorder = true;
00117 }
00118
00119 RevealBrush::~RevealBrush()
00120 {
00121     if (m_noiseChangedToken.value)
00122     {
00123         MaterialHelper::NoiseChanged(m_noiseChangedToken);
00124         m_noiseChangedToken.value = 0;
00125     }
00126 }
00127
00128 void RevealBrush::OnConnected()
00129 {
00130     // XCBB will use Fallback rendering, so do not run derived Brush code.
00131     if (SharedHelpers::IsInDesignMode()) { return; }
00132
00133     MaterialHelper::OnRevealBrushConnected();
00134
00135     if (!m_fallbackColorChangedToken.value)
00136     {
00137         m_fallbackColorChangedToken.value = RegisterPropertyChangedCallback(
00138             winrt::XamlCompositionBrushBase::FallbackColorProperty(), { this, &RevealBrush::OnFallbackColorChanged });
00139     }
00140
00141     // Stay subscribed to NoiseChanged events when brush disconnected so that it gets marked to pick up new noise when (and if) it gets reconnected.
00142     if (!m_noiseChangedToken.value)
00143     {
00144         m_noiseChangedToken = MaterialHelper::NoiseChanged([this](auto sender) { OnNoiseChanged(sender); });
00145     }
00146
00147     m_isConnected = true;
00148     m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });
00149
00150     UpdateLightTargets(true /* ambientToo */);
00151     UpdateRevealBrush();
00152 }
00153
00154 void RevealBrush::OnDisconnected()
00155 {
00156     if (SharedHelpers::IsInDesignMode()) { return; }
00157
00158     m_isConnected = false;
00159
00160     UpdateLightTargets(true /* ambientToo */);
00161
00162     if (m_brush)
00163     {
00164         // Try for winrt::IClosable because MockDComp doesn't implement IClosable.
00165         if (auto closable = m_brush.try_as<winrt::IClosable>())
00166         {
00167             closable.Close();
00168         }
00169         m_brush = nullptr;
00170         CompositionBrush(nullptr);
00171     }
00172
00173     if (m_fallbackColorChangedToken.value)
00174     {
00175         UnregisterPropertyChangedCallback(winrt::XamlCompositionBrushBase::FallbackColorProperty(), m_fallbackColorChangedToken.value);
00176         m_fallbackColorChangedToken.value = 0;
00177     }
00178
00179     MaterialHelper::OnRevealBrushDisconnected();
00180
00181     MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
00182     m_materialPolicyChangedToken.value = 0;
00183 }
00184
00185 void RevealBrush::OnFallbackColorChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& /*args*/)
00186 {
00187     // FallbackColor is used by RevealBrush to determine the solid color to use when we experience fallback due to policy.
00188     // If it changes dynamically and we're using the fallback brush, make sure we update it now.
00189     if (IsInFallbackMode())
00190     {
00191         UpdateLightTargets(false /* ambientToo */);
00192         UpdateRevealBrush();
00193     }
00194 }
00195
00196 void RevealBrush::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00197 {
00198     winrt::IDependencyProperty property = args.Property();
00199
00200     if (property == s_ColorProperty)
00201     {
00202         UpdateRevealBrush();
00203     }
00204     else if (property == s_TargetThemeProperty)
00205     {
00206         UpdateLightTargets(false /* ambientToo */);
00207         UpdateRevealBrush();
00208     }
00209     else if (property == s_AlwaysUseFallbackProperty)
00210     {
00211         UpdateLightTargets(false /* ambientToo */);
00212         UpdateRevealBrush();
00213     }
00214 }
00215
00216 void RevealBrush::RemoveTargetBrush(const wstring_view& lightID)
00217 {
00218     try
00219     {
00220         winrt::XamlLight::RemoveTargetBrush(lightID, *this);
00221     }
00222     catch (const winrt::hresult_error& e)
00223     {
00224         // RemoveTargetBrush can fail with RPC_E_WRONG_THREAD if called while the Xaml Core is being shutdown,
00225         // and there is evidence from Watson that such calls are made in real apps.
00226         // In this case, all the relationships between lights and brushes are going to be cleared as part of core shutdown,
00227         // so effectively all brush targets will be unset, so it's ok to ignore this error.
00228         if (e.to_abi() != RPC_E_WRONG_THREAD) { throw; }
00229     }
00230 }
00231
00232 void RevealBrush::UpdateLightTargets(bool ambientToo)
00233 {
00234     if (!m_isConnected || IsInFallbackMode())
00235     {
00236         // Untarget the brush by hover/border/ambient lights
00237         if (m_isBorder && m_isBorderLightSet)
00238         {
00239             auto currentLightId = TargetTheme() == winrt::ApplicationTheme::Light ?
00240                 RevealBorderLight::GetLightThemeIdStatic() : RevealBorderLight::GetDarkThemeIdStatic();
00241             RemoveTargetBrush(currentLightId);
00242             m_isBorderLightSet = false;
00243         }
00244         else if (m_isHoverLightSet)
00245         {
00246             RemoveTargetBrush(RevealHoverLight::GetLightIdStatic());
00247             m_isHoverLightSet = false;
00248         }
00249
00250         if (ambientToo && m_isAmbientLightSet)
00251         {
00252             RemoveTargetBrush(XamlAmbientLight::GetLightIdStatic());
00253             m_isAmbientLightSet = false;
00254         }
00255     }
00256     else
00257     {
00258         // Target the brush by hover/border/ambient lights
00259         if (m_isBorder)         // May need to switch border light so always referesh
00260         {
00261             auto oldLightId = RevealBorderLight::GetLightThemeIdStatic();
00262             auto newLightId = RevealBorderLight::GetDarkThemeIdStatic();
00263             if (TargetTheme() == winrt::ApplicationTheme::Light)
00264             {
00265                 std::swap(oldLightId, newLightId);
00266             }
00267             if (m_isBorderLightSet)
00268             {
00269                 RemoveTargetBrush(oldLightId);
00270                 m_isBorderLightSet = false;
00271             }
00272             winrt::XamlLight::AddTargetBrush(newLightId, *this);
00273             m_isBorderLightSet = true;
00274         }
00275         else if (!m_isHoverLightSet)
00276         {
00277             winrt::XamlLight::AddTargetBrush(RevealHoverLight::GetLightIdStatic(), *this);
00278             m_isHoverLightSet = true;
00279         }
00280
00281         if (ambientToo && !m_isAmbientLightSet)
00282         {
00283             winrt::XamlLight::AddTargetBrush(XamlAmbientLight::GetLightIdStatic(), *this);
00284             m_isAmbientLightSet = true;
00285         }
00286     }
00287 }
00288
00289 void RevealBrush::PolicyStatusChangedHelper(bool isDisabledByMaterialPolicy)
00290 {
00291     m_isDisabledByMaterialPolicy = isDisabledByMaterialPolicy;
00292     if (m_isConnected)
00293     {
00294         UpdateLightTargets(true /* ambientToo */);
00295         UpdateRevealBrush();
00296     }
00297 }
00298
00299 void RevealBrush::OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy)
00300 {
00301     //PolicyStatusChangedHelper(isDisabledByMaterialPolicy); // Bug 24355584: DCPP: Reveal is disabled
00302     PolicyStatusChangedHelper(true);
00303 }
00304
00305 void RevealBrush::OnNoiseChanged(const com_ptr<MaterialHelperBase>& sender)
00306 {
00307     m_noiseChanged = true;
00308     if (m_isConnected)
00309     {
00310         UpdateRevealBrush();
00311     }
00312 }
00313
00314 void RevealBrush::EnsureNoiseBrush()
00315 {
00316     auto noiseBrush = MaterialHelper::GetNoiseBrush();
00317     if (noiseBrush != m_noiseBrush)
00318     {
00319         m_noiseBrush = noiseBrush;
00320     }
00321     m_noiseChanged = false;
00322 }
00323
00324 winrt::Windows::Graphics::Effects::IGraphicsEffect RevealBrush::CreateRevealHoverEffect()
00325 {
00326     // We apply noise to the SceneLightingEffect to reduce banding artifacts, but we don't want the noise to show up with just
00327     // ambient lighting (when the brush doesn't have the pointer near it). Since the ambient contribution is a constant, we factor
00328     // it out to a separate ColorSourceEffect. We can then mask the SLE with a noise texture, combine that with the ambient color
00329     // effect, and use that in the rest of the effect graph:
00330     //
00331     //  (1) <ArithmeticCompositeEffect>
00332     //  (2)     <BaseColorEffect />
00333     //  (3)     <ColorMatrixEffect>
00334     //  (4)         <CompositeStepEffect>
00335     //  (5)             <ColorSourceEffect for ambient contribution/>
00336     //  (6)             <AlphaMaskEffect>
00337     //  (7)                 <SceneLightingEffect without ambient coefficient/>
00338     //  (8)                 <ColorMatrixEffect>
00339     //  (9)                     <BorderEffect>
00340     //                              <Noise texture in a brush />
00341     //                          </BorderEffect>
00342     //                      </ColorMatrixEffect>
00343     //                  </AlphaMaskEffect>
00344     //              </CompositeStepEffect>
00345     //          </ColorMatrixEffect>
00346     //      </ArithmeticCompositeEffect>
00347     winrt::Color initBaseColor{ 0, 0, 0, 0 };
00348
00349     // (9) Noise image BorderEffect (infinitely tiles noise image)
00350     auto noiseBorderEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::BorderEffect>();
00351     noiseBorderEffect->ExtendX(winrt::CanvasEdgeBehavior::Wrap);
00352     noiseBorderEffect->ExtendY(winrt::CanvasEdgeBehavior::Wrap);
00353     winrt::CompositionEffectSourceParameter noiseEffectSourceParameter{ L"Noise" };
00354     noiseBorderEffect->Source(noiseEffectSourceParameter);
00355
00356     // (8) ColorMatrixEffect applied to (9) to introduce alpha, to be used to mask the SceneLightingEffect
00357     auto noiseOpacityEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorMatrixEffect>();
00358     noiseOpacityEffect->ColorMatrix(sc_colorToAlphaMatrix);
00359     noiseOpacityEffect->AlphaMode(winrt::CanvasAlphaMode::Straight);
00360     noiseOpacityEffect->Source(*noiseBorderEffect);
00361
00362     // (7) SceneLightingEffect
00363     // Note: Unlike the Win2D-based effects, SceneLightingEffect is a public Windows platform type, we can instatiate it directly via winrt.
00364     // No ambient coefficient. This SLE gets noise applied to it, and we don't want the ambient contribution to be affected by noise. The
00365     // ambient contribution will be added by a separate ColorSourceEffect.
00366     winrt::Microsoft::UI::Composition::Effects::SceneLightingEffect sceneLightingEffect;
00367     sceneLightingEffect.AmbientAmount(0);
00368     sceneLightingEffect.DiffuseAmount(sc_diffuseAmount);
00369     sceneLightingEffect.SpecularAmount(sc_specularAmount);
00370     sceneLightingEffect.SpecularShine(sc_specularShine);
00371
00372     // (6) Alpha mask of (7) with (8)
00373     auto blendEffectOuter = winrt::make_self<Microsoft::UI::Private::Composition::Effects::AlphaMaskEffect>();
00374     blendEffectOuter->Source(sceneLightingEffect);
00375     blendEffectOuter->Mask(*noiseOpacityEffect);
00376
00377     // (5) ColorSourceEffect
00378     auto colorSourceEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
00379     colorSourceEffect->Color(sc_ambientContributionColor);
00380
00381     // (4) Composite of (5) with (6)
00382     auto compositeEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CompositeStepEffect>();
00383     compositeEffect->Mode(winrt::CanvasComposite::Add);
00384     compositeEffect->Destination(*colorSourceEffect);
00385     compositeEffect->Source(*blendEffectOuter);
00386
00387     // (3) ColorMatrixEffect applied to (4)
00388     auto colorMatrixEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorMatrixEffect>();
00389     colorMatrixEffect->ColorMatrix(sc_luminanceToAlphaMatrix);
00390     colorMatrixEffect->AlphaMode(winrt::CanvasAlphaMode::Straight);
00391     colorMatrixEffect->Source(*compositeEffect);
00392
00393     // (2) Base Color Effect
00394     auto baseColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
00395     baseColorEffect->Name(L"BaseColorEffect");
00396     baseColorEffect->Color(initBaseColor);
00397
00398     // (1) Composite of (3) [source] with (2) [destination]
00399     auto arithmeticCompositeEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ArithmeticCompositeEffect>();
00400     arithmeticCompositeEffect->Source1Amount(2.0f);
00401     arithmeticCompositeEffect->Source2Amount(2.0f);
00402     arithmeticCompositeEffect->MultiplyAmount(-2.0f);
00403     arithmeticCompositeEffect->Offset(-1.0f);
00404     arithmeticCompositeEffect->Source1(*colorMatrixEffect);
00405     arithmeticCompositeEffect->Source2(*baseColorEffect);
00406
00407     return *arithmeticCompositeEffect;
00408 }
00409
00410 winrt::Windows::Graphics::Effects::IGraphicsEffect RevealBrush::CreateRevealBorderEffect(bool isInverted, bool hasBaseColor)
00411 {
00412     // (1) SceneLightingEffect
00413     // Note: Unlike the Win2D-based effects, SceneLightingEffect is a public Windows platform type, we can instatiate it directly via winrt.
00414     winrt::Microsoft::UI::Composition::Effects::SceneLightingEffect sceneLightingEffect;
00415     sceneLightingEffect.AmbientAmount(0.0f);
00416     sceneLightingEffect.DiffuseAmount(sc_diffuseAmountBorder);
00417     sceneLightingEffect.SpecularAmount(sc_specularAmountBorder);
00418     sceneLightingEffect.SpecularShine(sc_specularShineBorder);
00419
00420     // (2) ColorMatrixEffect applied to 1
00421     auto colorMatrixEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorMatrixEffect>();
00422     colorMatrixEffect->ColorMatrix(isInverted ? sc_revealInvertedBorderColorMatrix : sc_revealBorderColorMatrix);
00423     colorMatrixEffect->AlphaMode(winrt::CanvasAlphaMode::Straight);
00424     colorMatrixEffect->Source(sceneLightingEffect);
00425
00426     if (hasBaseColor)
00427     {
00428         // (3) Base Color Effect
00429         auto  baseColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
00430         baseColorEffect->Name(L"BaseColorEffect");
00431         // Set base color to 0 because we want to build one EffectFactory and cache it regardless of the different colors that
00432         // the app may choose. So make the factory have it as 0,0,0,0 and then we'll make it an animatable property and set it
00433         // immediately after we create it.
00434         baseColorEffect->Color({ 0,0,0,0 });
00435
00436         // (4) Do a source over blend of (2) the color matrix with (3) the base color.
00437         auto compositeEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CompositeStepEffect>();
00438         compositeEffect->Mode(winrt::CanvasComposite::SourceOver);
00439         compositeEffect->Source(*colorMatrixEffect);
00440         compositeEffect->Destination(*baseColorEffect);
00441
00442         return *compositeEffect;
00443     }
00444     else
00445     {
00446         // No base color, just return the color matrix effect.
00447         return *colorMatrixEffect;
00448     }
00449 }
00450
00451 winrt::CompositionEffectFactory
00452 RevealBrush::GetOrCreateRevealBrushCompositionEffectFactory(
00453     bool isBorder,
00454     bool isInverted,
00455     bool hasBaseColor,
00456     const winrt::Compositor& compositor)
00457 {
00458     auto effectFactory = MaterialHelper::GetOrCreateRevealBrushCompositionEffectFactoryFromCache(
00459         isBorder,
00460         isInverted,
00461         hasBaseColor,
00462         [isBorder, isInverted, hasBaseColor, &compositor]() {
00463             // Set up the effect chain for reveal
00464             winrt::IGraphicsEffect effect;
00465             if (isBorder)
00466             {
00467                 effect = CreateRevealBorderEffect(isInverted, hasBaseColor);
00468             }
00469             else
00470             {
00471                 effect = CreateRevealHoverEffect();
00472             }
00473
00474             winrt::IVector<winrt::hstring> animatedProperties;
00475             if (hasBaseColor)
00476             {
00477                 animatedProperties = winrt::make<Vector<winrt::hstring, MakeVectorParam<VectorFlag::None>()>>();
00478                 animatedProperties.Append(L"BaseColorEffect.Color");
00479             }
00480
00481             // Create the Comp effect Brush
00482             return compositor.CreateEffectFactory(effect, animatedProperties);
00483         });
00484     return effectFactory;
00485 }
00486
00487 void RevealBrush::CreateRevealBrush()
00488 {
00489     winrt::Compositor compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00490     if (!IsInFallbackMode())
00491     {
00492         const auto color = Color();
00493         // If the color is ever not transparent black then start using the base color version of the effect.
00494         if (color.A != 0 || color.R != 0 || color.G != 0 || color.B != 0)
00495         {
00496             m_hasBaseColor = true;
00497         }
00498
00499         EnsureNoiseBrush();
00500
00501         const bool isInverted = m_isBorder && (TargetTheme() == winrt::ApplicationTheme::Light);
00502         const auto effectFactory = GetOrCreateRevealBrushCompositionEffectFactory(m_isBorder, isInverted, m_hasBaseColor, compositor);
00503         const winrt::CompositionEffectBrush revealBrush = effectFactory.CreateBrush();
00504
00505         if (m_hasBaseColor)
00506         {
00507             // effectFactory is only a template and doesn't have correct color setting, change it
00508             revealBrush.Properties().InsertColor(L"BaseColorEffect.Color", color);
00509         }
00510
00511         if (!m_isBorder)
00512         {
00513             // Set noise image source. The border brush is only used for a few pixels, and does not show banding, so it doesn't get noise.
00514             MUX_ASSERT(m_noiseBrush);
00515             revealBrush.SetSourceParameter(L"Noise", m_noiseBrush);
00516         }
00517
00518         m_brush = revealBrush;
00519     }
00520     else
00521     {
00522         const auto fallbackColor = FallbackColor();
00523
00524         if (fallbackColor.A == 0)
00525         {
00526             // fallback and transparent brush, set to nullptr for performance optimization
00527             m_brush = nullptr;
00528         }
00529         else
00530         {
00531             m_brush = compositor.CreateColorBrush(fallbackColor);
00532         }
00533     }
00534
00535 }
00536
00537 void RevealBrush::UpdateRevealBrush()
00538 {
00539     if (m_isConnected)
00540     {
00541         CreateRevealBrush();
00542     }
00543     CompositionBrush(m_brush);
00544 }
00545
00546 void RevealBrush::StopAttachingLights()
00547 {
00548     MaterialHelper::SetShouldBeginAttachingLights(false);
00549     MaterialHelper::SetShouldContinueAttachingLights(false);
00550     MaterialHelper::ResetFailedToAttachLightsCount();
00551 }
00552
00553 void RevealBrush::AttachLights()
00554 {
00555     // There are some non-fatal cases where we failed to hook up lights, tracked by:
00556     // Bug 18893751: WUXC: Investigate test failures when MUX_ASSERT(ValidatePublicRootAncestor()) is enabled
00557     // Comment this assert for now and skip attaching lights. Remove this when Bug 18893751 is fixed.
00558     // MUX_ASSERT(ValidatePublicRootAncestor());
00559
00560     RevealBrush::AttachLightsImpl();
00561 }
00562
00563 void RevealBrush::AttachLightsImpl()
00564 {
00565     // Safe to attach RootScrollViewer lights immediately
00566     auto windowRoot = winrt::Window::Current() ? winrt::Window::Current().Content() : nullptr;
00567     if (!windowRoot) { return; }
00568
00569     RevealBrush::AttachLightsToAncestor(windowRoot, true);
00570 }
00571
00572 winrt::UIElement RevealBrush::GetAncestor(const winrt::UIElement& root)
00573 {
00574     auto current = root;
00575     auto parent = current;
00576
00577     // Walk up to the highest element and hook up lights there.
00578     // If there is an ambient light anywhere on the path, we must have already
00579     // added the global lights required for Reveal, so return immediately.
00580     do
00581     {
00582         current = parent;
00583         parent = winrt::VisualTreeHelper::GetParent(current).as<winrt::UIElement>();
00584     } while (parent != nullptr);
00585
00586     return current;
00587 }
00588
00589 bool RevealBrush::ValidatePublicRootAncestor()
00590 {
00591     auto windowRoot = winrt::Window::Current() ? winrt::Window::Current().Content() : nullptr;
00592
00593     // On MUX + RS2, it's possible XCB::OnConnected is called before window has content.
00594     if (!windowRoot)
00595     {
00596         return false;
00597     }
00598
00599     // Do some more checks to ensure we didn't put lights where we don't expect.
00600     // Either Window.Content is a Canvas, in which case it's the immediate child of the root visual and we should set lights
00601     // on it directly, or it isn't, in which case we should have walked up to the RootScrollViewer and set lights there.
00602     auto ancestor = GetAncestor(windowRoot);
00603     bool windowContentIsCanvas = static_cast<bool>(windowRoot.try_as<winrt::Canvas>());
00604     bool walkedUpToScrollViewer = winrt::VisualTreeHelper::GetParent(windowRoot) &&
00605         static_cast<bool>(ancestor.try_as<winrt::FxScrollViewer>());
00606
00607     // On MUX + RS3/RS4, it's possible XCB::OnConnected is called before visual tree is constructed and the ancestor walk returns a false elemenet.
00608     return windowContentIsCanvas || walkedUpToScrollViewer;
00609 }
00610
00611 void RevealBrush::AttachLightsToElement(const winrt::UIElement& element, bool trackAsRootToDisconnectFrom)
00612 {
00613     auto lights = element.Lights();
00614
00615     bool hasRevealBorderLights = false;
00616     for (auto light : lights)
00617     {
00618         if (auto self = light.try_as<winrt::RevealBorderLight>())
00619         {
00620             hasRevealBorderLights = true;
00621             break;
00622         }
00623     }
00624
00625     if (!hasRevealBorderLights)
00626     {
00627         //
00628         // To achieve the reveal border effect we need two lights AND the configuration of those lights needs be different per-theme.
00629         // In order to do this we attach 4 lights to the root in each combination -- ("normal", "wide") x ("light", "dark").
00630         //
00631         // When RevealBorderLight is in light theme it reports a different ID than in dark theme. RevealBorderBrush also has a
00632         // theme property and it will select the RevealBorderLight "light theme" or "dark theme" ID as appropriate.
00633         //
00634         // In this way we can have the desired effect of different light configs in dark vs light theme but also support
00635         // subtrees that have different theme via FrameworkElement.RequestedTheme because the ThemeResource references to
00636         // RevealBorderBrush resources will choose the right brush and then those brushes will choose the right light.
00637         //
00638         auto borderLightTheme = winrt::make_self<RevealBorderLight>();
00639         borderLightTheme->SetIsLightTheme(true);
00640         auto wideBorderLightTheme = winrt::make_self<RevealBorderLight>();
00641         wideBorderLightTheme->SetIsWideLight(true);
00642         wideBorderLightTheme->SetIsLightTheme(true);
00643
00644         auto borderDarkTheme = winrt::make_self<RevealBorderLight>();
00645         auto wideBorderDarkTheme = winrt::make_self<RevealBorderLight>();
00646         wideBorderDarkTheme->SetIsWideLight(true);
00647
00648         auto ambientLight = winrt::make_self<XamlAmbientLight>();
00649
00650         lights.Append(*borderLightTheme);
00651         lights.Append(*wideBorderLightTheme);
00652         lights.Append(*borderDarkTheme);
00653         lights.Append(*wideBorderDarkTheme);
00654         lights.Append(*ambientLight);
00655
00656         if (trackAsRootToDisconnectFrom)
00657         {
00658             MaterialHelper::TrackRevealLightsToRemove(lights,
00659                 { *borderLightTheme, *wideBorderLightTheme, *borderDarkTheme, *wideBorderDarkTheme, *ambientLight });
00660         }
00661     }
00662 }
00663
00664 void RevealBrush::AttachLightsToAncestor(const winrt::UIElement& root, bool trackAsRootToDisconnectFrom)
00665 {
00666     auto ancestor = GetAncestor(root);
00667     AttachLightsToElement(ancestor, trackAsRootToDisconnectFrom);
00668 }
00669
00670 // If Reveal is enabled, GridViewItem/ListViewItem add two additional layers:
00671 //     RevealBackground and RevealBorderBrush
00672 // It has great performance degradation on Xbox
00673 // The workaround is if it's running on Xbox and it's not in MouseMode,
00674 // then reveal always runs on fallback mode. No additional layers is applied then.
00675 // Please remove this function if performance is improved in future.
00676 bool RevealBrush::IsOnXboxAndNotMouseMode()
00677 {
00678     return SharedHelpers::IsOnXbox() && !SharedHelpers::IsMouseModeEnabled();
00679 }
00680
00681 bool RevealBrush::IsInFallbackMode()
00682 {
00683     return m_isInFallbackMode = m_isDisabledByMaterialPolicy || AlwaysUseFallback() || IsOnXboxAndNotMouseMode();
00684 }
00685
00686 void RevealBrush::OnIsContainerPropertyChanged(
00687     const winrt::DependencyObject& sender,
00688     const winrt::DependencyPropertyChangedEventArgs& args)
00689 {
00690     if (auto elementSender = sender.try_as<winrt::IUIElement>())
00691     {
00692         bool isAdding = unbox_value<bool>(args.NewValue());
00693
00694         auto lights = elementSender.Lights();
00695         int i = 0;
00696
00697         if (isAdding)
00698         {
00699             // add the hover light
00700             auto hoverLight = winrt::make_self<RevealHoverLight>();
00701             lights.Append(*hoverLight);
00702
00703             // add the press light
00704             auto pressLight = winrt::make_self<RevealHoverLight>();
00705             pressLight->SetIsPressLight(true);
00706             lights.Append(*pressLight);
00707         }
00708         else
00709         {
00710             // Step through all of the lights
00711             for (auto light : lights)
00712             {
00713                 if (auto self = light.try_as<winrt::RevealHoverLight>())
00714                 {
00715                     // if we are in remove mode, remove all hover lights
00716                     lights.RemoveAt(i);
00717                 }
00718                 i++;
00719             }
00720         }
00721     }
00722 }
00723
00724 void RevealBrush::OnStatePropertyChanged(
00725     const winrt::DependencyObject& sender,
00726     const winrt::DependencyPropertyChangedEventArgs& args)
00727 {
00728     auto currentState = unbox_value<winrt::RevealBrushState>(args.OldValue());
00729     auto targetState = unbox_value<winrt::RevealBrushState>(args.NewValue());
00730
00731     if (currentState == targetState)
00732     {
00733         return;
00734     }
00735
00736     if (sender)
00737     {
00738         if (auto uiElement = sender.try_as<winrt::IUIElement>())
00739         {
00740             // If we transition to something other than Normal, see if we need to attach the hover light.
00741             if (targetState != winrt::RevealBrushState::Normal)
00742             {
00743                 sender.SetValue(s_IsContainerProperty, box_value(true));
00744             }
00745
00746             // Transition the Hover Light and the Pressed Light
00747             auto lights = uiElement.Lights();
00748             MUX_ASSERT(lights.Size() == 2);
00749
00750             for (auto light : lights)
00751             {
00752                 if (auto hoverLight = light.try_as<winrt::RevealHoverLight>())
00753                 {
00754                     auto internalHoverLight = winrt::get_self<RevealHoverLight>(hoverLight);
00755                     internalHoverLight->GoToState(targetState);
00756                 }
00757             }
00758         }
00759     }
00760 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ITemperatureAndTintEffect Member List

This is the complete list of members for ITemperatureAndTintEffect, including all inherited members.
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ITemperatureAndTintEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ITemperatureAndTintEffect
Temperature([out, retval] float *value) | ITemperatureAndTintEffect
Temperature([in] float value) | ITemperatureAndTintEffect
Tint([out, retval] float *value) | ITemperatureAndTintEffect
Tint([in] float value) | ITemperatureAndTintEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonTests Member List

This is the complete list of members for SplitButtonTests, including all inherited members.
AccessibilityTest() | SplitButtonTests | [inline]
BasicInteractionTest() | SplitButtonTests | [inline]
ClassInitialize(TestContext testContext) | SplitButtonTests | [inline, static]
ClickPrimaryButton(SplitButton splitButton) | SplitButtonTests | [inline]
ClickPrimaryButtonWithKey(SplitButton splitButton, string key) | SplitButtonTests | [inline]
ClickSecondaryButton(SplitButton splitButton) | SplitButtonTests | [inline]
CommandTest() | SplitButtonTests | [inline]
KeyboardTest() | SplitButtonTests | [inline]
TestCleanup() | SplitButtonTests | [inline]
ToggleAccessibilityTest() | SplitButtonTests | [inline]
ToggleTest() | SplitButtonTests | [inline]
TouchTest() | SplitButtonTests | [inline]
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/ProgressBar.cpp Source File

  • File List
  • File Members
  • ProgressBar

ProgressBar.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ProgressBar.h"
00007 #include "ProgressBarAutomationPeer.h"
00008 #include "RuntimeProfiler.h"
00009 #include "ResourceAccessor.h"
00010
00011 ProgressBar::ProgressBar()
00012 {
00013     __RP_Marker_ClassById(RuntimeProfiler::ProfId_ProgressBar);
00014
00015     SetDefaultStyleKey(this);
00016
00017     SizeChanged({ this, &ProgressBar::OnSizeChanged });
00018
00019     // NOTE: This is necessary only because Value isn't one of OUR properties, it's implemented in RangeBase.
00020     // If it was one of ProgressBar's properties, defined in the IDL, you'd do it differently (see IsIndeterminate).
00021     RegisterPropertyChangedCallback(winrt::RangeBase::ValueProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
00022     RegisterPropertyChangedCallback(winrt::RangeBase::MinimumProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
00023     RegisterPropertyChangedCallback(winrt::RangeBase::MaximumProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
00024     RegisterPropertyChangedCallback(winrt::Control::PaddingProperty(), { this, &ProgressBar::OnIndicatorWidthComponentChanged });
00025     RegisterPropertyChangedCallback(winrt::UIElement::VisibilityProperty(), { this, &ProgressBar::OnVisibilityPropertyChanged });
00026
00027     SetValue(s_TemplateSettingsProperty, winrt::make<::ProgressBarTemplateSettings>());
00028 }
00029
00030 winrt::AutomationPeer ProgressBar::OnCreateAutomationPeer()
00031 {
00032     return winrt::make<ProgressBarAutomationPeer>(*this);
00033 }
00034
00035
00036 void ProgressBar::OnApplyTemplate()
00037 {
00038     winrt::IControlProtected controlProtected{ *this };
00039
00040     // NOTE: Example of how named parts are loaded from the template. Important to remember that it's possible for
00041     // any of them not to be found, since devs can replace the template with their own.
00042
00043     m_layoutRoot.set(GetTemplateChildT<winrt::Grid>(s_LayoutRootName, controlProtected));
00044     m_determinateProgressBarIndicator.set(GetTemplateChildT<winrt::Rectangle>(s_DeterminateProgressBarIndicatorName, controlProtected));
00045     m_indeterminateProgressBarIndicator.set(GetTemplateChildT<winrt::Rectangle>(s_IndeterminateProgressBarIndicatorName, controlProtected));
00046     m_indeterminateProgressBarIndicator2.set(GetTemplateChildT<winrt::Rectangle>(s_IndeterminateProgressBarIndicator2Name, controlProtected));
00047
00048     UpdateStates();
00049 }
00050
00051 void ProgressBar::OnSizeChanged(const winrt::IInspectable&, const winrt::IInspectable&)
00052 {
00053     SetProgressBarIndicatorWidth();
00054     UpdateWidthBasedTemplateSettings();
00055 }
00056
00057 void ProgressBar::OnIndicatorWidthComponentChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00058 {
00059     // NOTE: This hits when the Value property changes, because we called RegisterPropertyChangedCallback.
00060     SetProgressBarIndicatorWidth();
00061 }
00062
00063 void ProgressBar::OnIsIndeterminatePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00064 {
00065     // NOTE: This hits when IsIndeterminate changes because we set MUX_PROPERTY_CHANGED_CALLBACK to true in the idl.
00066     SetProgressBarIndicatorWidth();
00067     UpdateStates();
00068 }
00069
00070 void ProgressBar::OnShowPausedPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00071 {
00072     SetProgressBarIndicatorWidth();
00073     UpdateStates();
00074 }
00075
00076 void ProgressBar::OnVisibilityPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty& args)
00077 {
00078     UpdateStates();
00079 }
00080
00081 void ProgressBar::OnShowErrorPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00082 {
00083     SetProgressBarIndicatorWidth();
00084     UpdateStates();
00085 }
00086
00087 void ProgressBar::UpdateStates()
00088 {
00089     if (IsIndeterminate() && Visibility() == winrt::Visibility::Visible)
00090     {
00091         if (ShowError())
00092         {
00093             winrt::VisualStateManager::GoToState(*this, s_IndeterminateErrorStateName, true);
00094         }
00095         else if (ShowPaused())
00096         {
00097             winrt::VisualStateManager::GoToState(*this, s_IndeterminatePausedStateName, true);
00098         }
00099         else
00100         {
00101             winrt::VisualStateManager::GoToState(*this, s_IndeterminateStateName, true);
00102         }
00103         UpdateWidthBasedTemplateSettings();
00104     }
00105     else
00106     {
00107         if (ShowError())
00108         {
00109             winrt::VisualStateManager::GoToState(*this, s_ErrorStateName, true);
00110         }
00111         else if(ShowPaused())
00112         {
00113             winrt::VisualStateManager::GoToState(*this, s_PausedStateName, true);
00114         }
00115         else
00116         {
00117             winrt::VisualStateManager::GoToState(*this, s_DeterminateStateName, true);
00118         }
00119     }
00120
00121 }
00122
00123 double LayoutRound(const double value, const double scaleFactor)
00124 {
00125     return round(value * scaleFactor) / scaleFactor;
00126 }
00127
00128 void ProgressBar::SetProgressBarIndicatorWidth()
00129 {
00130     const auto templateSettings = winrt::get_self<::ProgressBarTemplateSettings>(TemplateSettings());
00131
00132     if (auto&& progressBar = m_layoutRoot.get())
00133     {
00134         if (auto&& determinateProgressBarIndicator = m_determinateProgressBarIndicator.get())
00135         {
00136             const double progressBarWidth = progressBar.ActualWidth();
00137             const double prevIndicatorWidth = determinateProgressBarIndicator.ActualWidth();
00138             const double maximum = Maximum();
00139             const double minimum = Minimum();
00140             const auto padding = Padding();
00141             const auto borderThickness = BorderThickness();
00142
00143             // Round the border width, if necessary. Note that the Left and Right values of BorderThickness
00144             // should be individually rounded (see CBorder::GetLayoutRoundedThickness).
00145             const double scaleFactor = progressBar.XamlRoot().RasterizationScale();
00146             const double roundedBorderWidth = progressBar.UseLayoutRounding() ?
00147                 (LayoutRound(borderThickness.Left, scaleFactor) + LayoutRound(borderThickness.Right, scaleFactor)) :
00148                 (borderThickness.Left + borderThickness.Right);
00149
00150             const double paddingAndBorderWidth = (padding.Left + padding.Right) + roundedBorderWidth;
00151             const double maxIndicatorWidth = std::max(progressBarWidth - paddingAndBorderWidth, 0.0);
00152
00153             // Adds "Updating" state in between to trigger RepositionThemeAnimation Visual Transition
00154             // in ProgressBar.xaml when reverting back to previous state
00155             if (ShowError())
00156             {
00157                 winrt::VisualStateManager::GoToState(*this, s_UpdatingWithErrorStateName, true);
00158             }
00159             else
00160             {
00161                 winrt::VisualStateManager::GoToState(*this, s_UpdatingStateName, true);
00162             }
00163
00164             if (IsIndeterminate())
00165             {
00166                 determinateProgressBarIndicator.Width(0);
00167
00168                 if (auto&& indeterminateProgressBarIndicator = m_indeterminateProgressBarIndicator.get())
00169                 {
00170                     indeterminateProgressBarIndicator.Width(maxIndicatorWidth * 0.4); // 40% of ProgressBar Width
00171                 }
00172
00173                 if (auto&& indeterminateProgressBarIndicator2 = m_indeterminateProgressBarIndicator2.get())
00174                 {
00175                     if (ShowPaused() || ShowError()) // If IndeterminatePaused or IndeterminateError
00176                     {
00177                         indeterminateProgressBarIndicator2.Width(maxIndicatorWidth); // 100% of ProgressBar Width
00178                     }
00179                     else
00180                     {
00181                         indeterminateProgressBarIndicator2.Width(maxIndicatorWidth * 0.6); // 60% of ProgressBar Width
00182                     }
00183
00184                 }
00185             }
00186             else if (std::abs(maximum - minimum) > DBL_EPSILON)
00187             {
00188                 const double increment = maxIndicatorWidth / (maximum - minimum);
00189                 const double indicatorWidth = increment * (Value() - minimum);
00190                 const double widthDelta = indicatorWidth - prevIndicatorWidth;
00191                 templateSettings->IndicatorLengthDelta(-widthDelta);
00192                 determinateProgressBarIndicator.Width(indicatorWidth);
00193             }
00194             else
00195             {
00196                 determinateProgressBarIndicator.Width(0); // Error
00197             }
00198
00199             UpdateStates(); // Reverts back to previous state
00200         }
00201     }
00202 }
00203
00204 void ProgressBar::UpdateWidthBasedTemplateSettings()
00205 {
00206     const auto templateSettings = winrt::get_self<::ProgressBarTemplateSettings>(TemplateSettings());
00207
00208     const auto [width, height] = [progressBar = m_layoutRoot.get()]()
00209     {
00210         if (progressBar)
00211         {
00212             const float width = static_cast<float>(progressBar.ActualWidth());
00213             const float height = static_cast<float>(progressBar.ActualHeight());
00214             return std::make_tuple(width, height);
00215         }
00216         return std::make_tuple(0.0f, 0.0f);
00217     }();
00218
00219     const double indeterminateProgressBarIndicatorWidth = width * 0.4; // Indicator width at 40% of ProgressBar
00220     const double indeterminateProgressBarIndicatorWidth2 = width * 0.6; // Indicator width at 60% of ProgressBar
00221
00222     templateSettings->ContainerAnimationStartPosition(indeterminateProgressBarIndicatorWidth * -1.0); // Position at -100%
00223     templateSettings->ContainerAnimationEndPosition(indeterminateProgressBarIndicatorWidth * 3.0); // Position at 300%
00224
00225     templateSettings->Container2AnimationStartPosition(indeterminateProgressBarIndicatorWidth2 * -1.5); // Position at -150%
00226     templateSettings->Container2AnimationEndPosition(indeterminateProgressBarIndicatorWidth2 * 1.66); // Position at 166%
00227
00228     templateSettings->ContainerAnimationMidPosition(0);
00229
00230     const auto rectangle = [width, height, padding = Padding()]()
00231     {
00232         const auto returnValue = winrt::RectangleGeometry();
00233         returnValue.Rect({
00234             static_cast<float>(padding.Left),
00235             static_cast<float>(padding.Top),
00236             width - static_cast<float>(padding.Right + padding.Left),
00237             height - static_cast<float>(padding.Bottom + padding.Top)
00238             });
00239         return returnValue;
00240     }();
00241
00242     templateSettings->ClipRect(rectangle);
00243
00244     // TemplateSetting properties from WUXC for backwards compatibility.
00245     templateSettings->EllipseAnimationEndPosition((1.0 / 3.0) * width);
00246     templateSettings->EllipseAnimationWellPosition((2.0 / 3.0) * width);
00247
00248     if (width <= 180.0)
00249     {
00250         // Small ellipse diameter and offset.
00251         templateSettings->EllipseDiameter(4.0);
00252         templateSettings->EllipseOffset(4.0);
00253     }
00254     else if (width <= 280.0)
00255     {
00256         // Medium ellipse diameter and offset.
00257         templateSettings->EllipseDiameter(5.0);
00258         templateSettings->EllipseOffset(7.0);
00259     }
00260     else
00261     {
00262         // Large ellipse diameter and offset.
00263         templateSettings->EllipseDiameter(6.0);
00264         templateSettings->EllipseOffset(9.0);
00265     }
00266 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshVisualizer Member List

This is the complete list of members for RefreshVisualizer, including all inherited members.
abi_enter() | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
CheckThread() | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
ClearProperties() | RefreshVisualizerProperties | [static]
Content(winrt::UIElement const &value) | RefreshVisualizerProperties |
Content() | RefreshVisualizerProperties |
ContentProperty() | RefreshVisualizerProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< RefreshVisualizer > &&self) noexcept | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline, static]
EnsureProperties() | RefreshVisualizerProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
ExecuteExecutingRotationAnimation() | RefreshVisualizer | [private]
ExecuteInteractingAnimations() | RefreshVisualizer | [private]
ExecuteScaleUpAnimation() | RefreshVisualizer | [private]
final_release(std::unique_ptr< RefreshVisualizer > &&self) | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline, static]
GetBase() | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
GetInner() | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
InfoProvider() | RefreshVisualizer |
InfoProvider(winrt::IRefreshInfoProvider const &value) | RefreshVisualizer |
InfoProviderProperty() | RefreshVisualizerProperties | [inline, static]
IsOnThread() | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
IsPullDirectionFar() | RefreshVisualizer | [private]
IsPullDirectionVertical() | RefreshVisualizer | [private]
m_refreshRequestedEventSource | RefreshVisualizerProperties |
m_refreshStateChangedEventSource | RefreshVisualizerProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
OnApplyTemplate() | RefreshVisualizer |
OnContentChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RefreshVisualizer | [private]
OnContentChangedImpl() | RefreshVisualizer | [private]
OnContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
OnInfoProviderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
OnOrientationChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RefreshVisualizer | [private]
OnOrientationChangedImpl() | RefreshVisualizer | [private]
OnOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RefreshVisualizer |
OnRefreshInfoProviderChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RefreshVisualizer | [private]
OnStateChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RefreshVisualizer | [private]
OnStatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RefreshVisualizerProperties | [static]
Orientation(winrt::RefreshVisualizerOrientation const &value) | RefreshVisualizerProperties |
Orientation() | RefreshVisualizerProperties |
OrientationProperty() | RefreshVisualizerProperties | [inline, static]
put_State(const winrt::RefreshVisualizerState &value) | RefreshVisualizer | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
RaiseRefreshRequested() | RefreshVisualizer | [private]
RaiseRefreshStateChanged(const winrt::RefreshVisualizerState &oldState, const winrt::RefreshVisualizerState &newState) | RefreshVisualizer | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< RefreshVisualizer, winrt::implementation::RefreshVisualizerT, winrt::IRefreshVisualizerPrivate > | [inline]
RefreshCompleted() | RefreshVisualizer | [private]
RefreshInfoProvider_InteractingForRefreshChanged(const winrt::IInspectable &sender, const winrt::IInspectable &e) | RefreshVisualizer | [private]
RefreshInfoProvider_InteractionRatioChanged(const winrt::IRefreshInfoProvider &sender, const winrt::RefreshInteractionRatioChangedEventArgs &e) | RefreshVisualizer | [private]
RefreshRequested(winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshRequestedEventArgs > const &value) | RefreshVisualizerProperties |
RefreshRequested(winrt::event_token const &token) | RefreshVisualizerProperties |
RefreshStateChanged(winrt::TypedEventHandler< winrt::RefreshVisualizer, winrt::RefreshStateChangedEventArgs > const &value) | RefreshVisualizerProperties |
RefreshStateChanged(winrt::event_token const &token) | RefreshVisualizerProperties |
RefreshVisualizer() | RefreshVisualizer |
RefreshVisualizerProperties() | RefreshVisualizerProperties |
RequestRefresh() | RefreshVisualizer |
s_ContentProperty | RefreshVisualizerProperties | [static]
s_InfoProviderProperty | RefreshVisualizerProperties | [static]
s_OrientationProperty | RefreshVisualizerProperties | [static]
s_StateProperty | RefreshVisualizerProperties | [static]
SetInternalPullDirection(winrt::RefreshPullDirection const &value) | RefreshVisualizer |
State(winrt::RefreshVisualizerState const &value) | RefreshVisualizerProperties |
State() | RefreshVisualizerProperties |
StateProperty() | RefreshVisualizerProperties | [inline, static]
UpdateContent() | RefreshVisualizer | [private]
UpdateRefreshState(const winrt::RefreshVisualizerState &newState) | RefreshVisualizer | [private]
~RefreshVisualizer() | RefreshVisualizer |
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterator.cpp Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbIterator.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "BreadcrumbIterator.h"
00007
00008 BreadcrumbIterator::BreadcrumbIterator(const winrt::IInspectable& itemsSource)
00009 {
00010     m_currentIndex = 0;
00011
00012     if (itemsSource)
00013     {
00014         m_breadcrumbItemsSourceView = winrt::ItemsSourceView(itemsSource);
00015
00016         // Add 1 to account for the leading null/ellipsis element
00017         m_size = static_cast<uint32_t>(m_breadcrumbItemsSourceView.Count() + 1);
00018     }
00019     else
00020     {
00021         m_size = 1;
00022     }
00023 }
00024
00025 winrt::IInspectable BreadcrumbIterator::Current()
00026 {
00027     if (m_currentIndex == 0)
00028     {
00029         return nullptr;
00030     }
00031     else if (HasCurrent())
00032     {
00033         return m_breadcrumbItemsSourceView.GetAt(m_currentIndex - 1);
00034     }
00035     else
00036     {
00037         throw winrt::hresult_out_of_bounds();
00038     }
00039 }
00040
00041 bool BreadcrumbIterator::HasCurrent()
00042 {
00043     return (m_currentIndex < m_size);
00044 }
00045
00046 uint32_t BreadcrumbIterator::GetMany(winrt::array_view<winrt::IInspectable> items)
00047 {
00048     uint32_t howMany{};
00049     if (HasCurrent())
00050     {
00051         do
00052         {
00053             if (howMany >= items.size()) break;
00054
00055             items[howMany] = Current();
00056             howMany++;
00057         } while (MoveNext());
00058     }
00059
00060     return howMany;
00061 }
00062
00063 bool BreadcrumbIterator::MoveNext()
00064 {
00065     if (HasCurrent())
00066     {
00067         ++m_currentIndex;
00068         return HasCurrent();
00069     }
00070     else
00071     {
00072         throw winrt::hresult_out_of_bounds();
00073     }
00074
00075     return false;
00076 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs.h"
00007
00008 LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs::LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs(
00009     int itemIndex,
00010     int lineIndex)
00011 {
00012     m_itemIndex = itemIndex;
00013     m_lineIndex = lineIndex;
00014 }
00015
00016 #pragma region ILayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
00017
00018 int LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs::ItemIndex()
00019 {
00020     return m_itemIndex;
00021 }
00022
00023 int LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs::LineIndex()
00024 {
00025     return m_lineIndex;
00026 }
00027
00028 #pragma endregion
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MapIcon.properties.cpp Source File

  • File List
  • File Members
  • Generated

MapIcon.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MapIcon.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(MapIcon)
00012 }
00013
00014 #include "MapIcon.g.cpp"
00015
00016 GlobalDependencyProperty MapIconProperties::s_LocationProperty{ nullptr };
00017
00018 MapIconProperties::MapIconProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void MapIconProperties::EnsureProperties()
00024 {
00025     if (!s_LocationProperty)
00026     {
00027         s_LocationProperty =
00028             InitializeDependencyProperty(
00029                 L"Location",
00030                 winrt::name_of<winrt::Geopoint>(),
00031                 winrt::name_of<winrt::MapIcon>(),
00032                 false /* isAttached */,
00033                 ValueHelper<winrt::Geopoint>::BoxedDefaultValue(),
00034                 winrt::PropertyChangedCallback(&OnLocationPropertyChanged));
00035     }
00036 }
00037
00038 void MapIconProperties::ClearProperties()
00039 {
00040     s_LocationProperty = nullptr;
00041 }
00042
00043 void MapIconProperties::OnLocationPropertyChanged(
00044     winrt::DependencyObject const& sender,
00045     winrt::DependencyPropertyChangedEventArgs const& args)
00046 {
00047     auto owner = sender.as<winrt::MapIcon>();
00048     winrt::get_self<MapIcon>(owner)->OnPropertyChanged(args);
00049 }
00050
00051 void MapIconProperties::Location(winrt::Geopoint const& value)
00052 {
00053     [[gsl::suppress(con)]]
00054     {
00055     static_cast<MapIcon*>(this)->SetValue(s_LocationProperty, ValueHelper<winrt::Geopoint>::BoxValueIfNecessary(value));
00056     }
00057 }
00058
00059 winrt::Geopoint MapIconProperties::Location()
00060 {
00061     return ValueHelper<winrt::Geopoint>::CastOrUnbox(static_cast<MapIcon*>(this)->GetValue(s_LocationProperty));
00062 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SampleSuggestions Member List

This is the complete list of members for SampleSuggestions, including all inherited members.
Suggestions SampleSuggestions
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabView.properties.cpp Source File

  • File List
  • File Members
  • Generated

TabView.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TabView.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TabView)
00012 }
00013
00014 #include "TabView.g.cpp"
00015
00016 GlobalDependencyProperty TabViewProperties::s_AddTabButtonCommandProperty{ nullptr };
00017 GlobalDependencyProperty TabViewProperties::s_AddTabButtonCommandParameterProperty{ nullptr };
00018 GlobalDependencyProperty TabViewProperties::s_AllowDropTabsProperty{ nullptr };
00019 GlobalDependencyProperty TabViewProperties::s_CanDragTabsProperty{ nullptr };
00020 GlobalDependencyProperty TabViewProperties::s_CanReorderTabsProperty{ nullptr };
00021 GlobalDependencyProperty TabViewProperties::s_CanTearOutTabsProperty{ nullptr };
00022 GlobalDependencyProperty TabViewProperties::s_CloseButtonOverlayModeProperty{ nullptr };
00023 GlobalDependencyProperty TabViewProperties::s_IsAddTabButtonVisibleProperty{ nullptr };
00024 GlobalDependencyProperty TabViewProperties::s_SelectedIndexProperty{ nullptr };
00025 GlobalDependencyProperty TabViewProperties::s_SelectedItemProperty{ nullptr };
00026 GlobalDependencyProperty TabViewProperties::s_TabItemsProperty{ nullptr };
00027 GlobalDependencyProperty TabViewProperties::s_TabItemsSourceProperty{ nullptr };
00028 GlobalDependencyProperty TabViewProperties::s_TabItemTemplateProperty{ nullptr };
00029 GlobalDependencyProperty TabViewProperties::s_TabItemTemplateSelectorProperty{ nullptr };
00030 GlobalDependencyProperty TabViewProperties::s_TabStripFooterProperty{ nullptr };
00031 GlobalDependencyProperty TabViewProperties::s_TabStripFooterTemplateProperty{ nullptr };
00032 GlobalDependencyProperty TabViewProperties::s_TabStripHeaderProperty{ nullptr };
00033 GlobalDependencyProperty TabViewProperties::s_TabStripHeaderTemplateProperty{ nullptr };
00034 GlobalDependencyProperty TabViewProperties::s_TabWidthModeProperty{ nullptr };
00035
00036 TabViewProperties::TabViewProperties()
00037     : m_addTabButtonClickEventSource{static_cast<TabView*>(this)}
00038     , m_externalTornOutTabsDroppedEventSource{static_cast<TabView*>(this)}
00039     , m_externalTornOutTabsDroppingEventSource{static_cast<TabView*>(this)}
00040     , m_selectionChangedEventSource{static_cast<TabView*>(this)}
00041     , m_tabCloseRequestedEventSource{static_cast<TabView*>(this)}
00042     , m_tabDragCompletedEventSource{static_cast<TabView*>(this)}
00043     , m_tabDragStartingEventSource{static_cast<TabView*>(this)}
00044     , m_tabDroppedOutsideEventSource{static_cast<TabView*>(this)}
00045     , m_tabItemsChangedEventSource{static_cast<TabView*>(this)}
00046     , m_tabStripDragOverEventSource{static_cast<TabView*>(this)}
00047     , m_tabStripDropEventSource{static_cast<TabView*>(this)}
00048     , m_tabTearOutRequestedEventSource{static_cast<TabView*>(this)}
00049     , m_tabTearOutWindowRequestedEventSource{static_cast<TabView*>(this)}
00050 {
00051     EnsureProperties();
00052 }
00053
00054 void TabViewProperties::EnsureProperties()
00055 {
00056     if (!s_AddTabButtonCommandProperty)
00057     {
00058         s_AddTabButtonCommandProperty =
00059             InitializeDependencyProperty(
00060                 L"AddTabButtonCommand",
00061                 winrt::name_of<winrt::ICommand>(),
00062                 winrt::name_of<winrt::TabView>(),
00063                 false /* isAttached */,
00064                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00065                 nullptr);
00066     }
00067     if (!s_AddTabButtonCommandParameterProperty)
00068     {
00069         s_AddTabButtonCommandParameterProperty =
00070             InitializeDependencyProperty(
00071                 L"AddTabButtonCommandParameter",
00072                 winrt::name_of<winrt::IInspectable>(),
00073                 winrt::name_of<winrt::TabView>(),
00074                 false /* isAttached */,
00075                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00076                 nullptr);
00077     }
00078     if (!s_AllowDropTabsProperty)
00079     {
00080         s_AllowDropTabsProperty =
00081             InitializeDependencyProperty(
00082                 L"AllowDropTabs",
00083                 winrt::name_of<bool>(),
00084                 winrt::name_of<winrt::TabView>(),
00085                 false /* isAttached */,
00086                 ValueHelper<bool>::BoxValueIfNecessary(true),
00087                 nullptr);
00088     }
00089     if (!s_CanDragTabsProperty)
00090     {
00091         s_CanDragTabsProperty =
00092             InitializeDependencyProperty(
00093                 L"CanDragTabs",
00094                 winrt::name_of<bool>(),
00095                 winrt::name_of<winrt::TabView>(),
00096                 false /* isAttached */,
00097                 ValueHelper<bool>::BoxValueIfNecessary(false),
00098                 nullptr);
00099     }
00100     if (!s_CanReorderTabsProperty)
00101     {
00102         s_CanReorderTabsProperty =
00103             InitializeDependencyProperty(
00104                 L"CanReorderTabs",
00105                 winrt::name_of<bool>(),
00106                 winrt::name_of<winrt::TabView>(),
00107                 false /* isAttached */,
00108                 ValueHelper<bool>::BoxValueIfNecessary(true),
00109                 nullptr);
00110     }
00111     if (!s_CanTearOutTabsProperty)
00112     {
00113         s_CanTearOutTabsProperty =
00114             InitializeDependencyProperty(
00115                 L"CanTearOutTabs",
00116                 winrt::name_of<bool>(),
00117                 winrt::name_of<winrt::TabView>(),
00118                 false /* isAttached */,
00119                 ValueHelper<bool>::BoxValueIfNecessary(false),
00120                 winrt::PropertyChangedCallback(&OnCanTearOutTabsPropertyChanged));
00121     }
00122     if (!s_CloseButtonOverlayModeProperty)
00123     {
00124         s_CloseButtonOverlayModeProperty =
00125             InitializeDependencyProperty(
00126                 L"CloseButtonOverlayMode",
00127                 winrt::name_of<winrt::TabViewCloseButtonOverlayMode>(),
00128                 winrt::name_of<winrt::TabView>(),
00129                 false /* isAttached */,
00130                 ValueHelper<winrt::TabViewCloseButtonOverlayMode>::BoxValueIfNecessary(winrt::TabViewCloseButtonOverlayMode::Auto),
00131                 winrt::PropertyChangedCallback(&OnCloseButtonOverlayModePropertyChanged));
00132     }
00133     if (!s_IsAddTabButtonVisibleProperty)
00134     {
00135         s_IsAddTabButtonVisibleProperty =
00136             InitializeDependencyProperty(
00137                 L"IsAddTabButtonVisible",
00138                 winrt::name_of<bool>(),
00139                 winrt::name_of<winrt::TabView>(),
00140                 false /* isAttached */,
00141                 ValueHelper<bool>::BoxValueIfNecessary(true),
00142                 nullptr);
00143     }
00144     if (!s_SelectedIndexProperty)
00145     {
00146         s_SelectedIndexProperty =
00147             InitializeDependencyProperty(
00148                 L"SelectedIndex",
00149                 winrt::name_of<int>(),
00150                 winrt::name_of<winrt::TabView>(),
00151                 false /* isAttached */,
00152                 ValueHelper<int>::BoxValueIfNecessary(0),
00153                 winrt::PropertyChangedCallback(&OnSelectedIndexPropertyChanged));
00154     }
00155     if (!s_SelectedItemProperty)
00156     {
00157         s_SelectedItemProperty =
00158             InitializeDependencyProperty(
00159                 L"SelectedItem",
00160                 winrt::name_of<winrt::IInspectable>(),
00161                 winrt::name_of<winrt::TabView>(),
00162                 false /* isAttached */,
00163                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00164                 winrt::PropertyChangedCallback(&OnSelectedItemPropertyChanged));
00165     }
00166     if (!s_TabItemsProperty)
00167     {
00168         s_TabItemsProperty =
00169             InitializeDependencyProperty(
00170                 L"TabItems",
00171                 winrt::name_of<winrt::IVector<winrt::IInspectable>>(),
00172                 winrt::name_of<winrt::TabView>(),
00173                 false /* isAttached */,
00174                 ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxedDefaultValue(),
00175                 nullptr);
00176     }
00177     if (!s_TabItemsSourceProperty)
00178     {
00179         s_TabItemsSourceProperty =
00180             InitializeDependencyProperty(
00181                 L"TabItemsSource",
00182                 winrt::name_of<winrt::IInspectable>(),
00183                 winrt::name_of<winrt::TabView>(),
00184                 false /* isAttached */,
00185                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00186                 winrt::PropertyChangedCallback(&OnTabItemsSourcePropertyChanged));
00187     }
00188     if (!s_TabItemTemplateProperty)
00189     {
00190         s_TabItemTemplateProperty =
00191             InitializeDependencyProperty(
00192                 L"TabItemTemplate",
00193                 winrt::name_of<winrt::DataTemplate>(),
00194                 winrt::name_of<winrt::TabView>(),
00195                 false /* isAttached */,
00196                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00197                 nullptr);
00198     }
00199     if (!s_TabItemTemplateSelectorProperty)
00200     {
00201         s_TabItemTemplateSelectorProperty =
00202             InitializeDependencyProperty(
00203                 L"TabItemTemplateSelector",
00204                 winrt::name_of<winrt::DataTemplateSelector>(),
00205                 winrt::name_of<winrt::TabView>(),
00206                 false /* isAttached */,
00207                 ValueHelper<winrt::DataTemplateSelector>::BoxedDefaultValue(),
00208                 nullptr);
00209     }
00210     if (!s_TabStripFooterProperty)
00211     {
00212         s_TabStripFooterProperty =
00213             InitializeDependencyProperty(
00214                 L"TabStripFooter",
00215                 winrt::name_of<winrt::IInspectable>(),
00216                 winrt::name_of<winrt::TabView>(),
00217                 false /* isAttached */,
00218                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00219                 nullptr);
00220     }
00221     if (!s_TabStripFooterTemplateProperty)
00222     {
00223         s_TabStripFooterTemplateProperty =
00224             InitializeDependencyProperty(
00225                 L"TabStripFooterTemplate",
00226                 winrt::name_of<winrt::DataTemplate>(),
00227                 winrt::name_of<winrt::TabView>(),
00228                 false /* isAttached */,
00229                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00230                 nullptr);
00231     }
00232     if (!s_TabStripHeaderProperty)
00233     {
00234         s_TabStripHeaderProperty =
00235             InitializeDependencyProperty(
00236                 L"TabStripHeader",
00237                 winrt::name_of<winrt::IInspectable>(),
00238                 winrt::name_of<winrt::TabView>(),
00239                 false /* isAttached */,
00240                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00241                 nullptr);
00242     }
00243     if (!s_TabStripHeaderTemplateProperty)
00244     {
00245         s_TabStripHeaderTemplateProperty =
00246             InitializeDependencyProperty(
00247                 L"TabStripHeaderTemplate",
00248                 winrt::name_of<winrt::DataTemplate>(),
00249                 winrt::name_of<winrt::TabView>(),
00250                 false /* isAttached */,
00251                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00252                 nullptr);
00253     }
00254     if (!s_TabWidthModeProperty)
00255     {
00256         s_TabWidthModeProperty =
00257             InitializeDependencyProperty(
00258                 L"TabWidthMode",
00259                 winrt::name_of<winrt::TabViewWidthMode>(),
00260                 winrt::name_of<winrt::TabView>(),
00261                 false /* isAttached */,
00262                 ValueHelper<winrt::TabViewWidthMode>::BoxValueIfNecessary(winrt::TabViewWidthMode::Equal),
00263                 winrt::PropertyChangedCallback(&OnTabWidthModePropertyChanged));
00264     }
00265 }
00266
00267 void TabViewProperties::ClearProperties()
00268 {
00269     s_AddTabButtonCommandProperty = nullptr;
00270     s_AddTabButtonCommandParameterProperty = nullptr;
00271     s_AllowDropTabsProperty = nullptr;
00272     s_CanDragTabsProperty = nullptr;
00273     s_CanReorderTabsProperty = nullptr;
00274     s_CanTearOutTabsProperty = nullptr;
00275     s_CloseButtonOverlayModeProperty = nullptr;
00276     s_IsAddTabButtonVisibleProperty = nullptr;
00277     s_SelectedIndexProperty = nullptr;
00278     s_SelectedItemProperty = nullptr;
00279     s_TabItemsProperty = nullptr;
00280     s_TabItemsSourceProperty = nullptr;
00281     s_TabItemTemplateProperty = nullptr;
00282     s_TabItemTemplateSelectorProperty = nullptr;
00283     s_TabStripFooterProperty = nullptr;
00284     s_TabStripFooterTemplateProperty = nullptr;
00285     s_TabStripHeaderProperty = nullptr;
00286     s_TabStripHeaderTemplateProperty = nullptr;
00287     s_TabWidthModeProperty = nullptr;
00288 }
00289
00290 void TabViewProperties::OnCanTearOutTabsPropertyChanged(
00291     winrt::DependencyObject const& sender,
00292     winrt::DependencyPropertyChangedEventArgs const& args)
00293 {
00294     auto owner = sender.as<winrt::TabView>();
00295     winrt::get_self<TabView>(owner)->OnCanTearOutTabsPropertyChanged(args);
00296 }
00297
00298 void TabViewProperties::OnCloseButtonOverlayModePropertyChanged(
00299     winrt::DependencyObject const& sender,
00300     winrt::DependencyPropertyChangedEventArgs const& args)
00301 {
00302     auto owner = sender.as<winrt::TabView>();
00303     winrt::get_self<TabView>(owner)->OnCloseButtonOverlayModePropertyChanged(args);
00304 }
00305
00306 void TabViewProperties::OnSelectedIndexPropertyChanged(
00307     winrt::DependencyObject const& sender,
00308     winrt::DependencyPropertyChangedEventArgs const& args)
00309 {
00310     auto owner = sender.as<winrt::TabView>();
00311     winrt::get_self<TabView>(owner)->OnSelectedIndexPropertyChanged(args);
00312 }
00313
00314 void TabViewProperties::OnSelectedItemPropertyChanged(
00315     winrt::DependencyObject const& sender,
00316     winrt::DependencyPropertyChangedEventArgs const& args)
00317 {
00318     auto owner = sender.as<winrt::TabView>();
00319     winrt::get_self<TabView>(owner)->OnSelectedItemPropertyChanged(args);
00320 }
00321
00322 void TabViewProperties::OnTabItemsSourcePropertyChanged(
00323     winrt::DependencyObject const& sender,
00324     winrt::DependencyPropertyChangedEventArgs const& args)
00325 {
00326     auto owner = sender.as<winrt::TabView>();
00327     winrt::get_self<TabView>(owner)->OnTabItemsSourcePropertyChanged(args);
00328 }
00329
00330 void TabViewProperties::OnTabWidthModePropertyChanged(
00331     winrt::DependencyObject const& sender,
00332     winrt::DependencyPropertyChangedEventArgs const& args)
00333 {
00334     auto owner = sender.as<winrt::TabView>();
00335     winrt::get_self<TabView>(owner)->OnTabWidthModePropertyChanged(args);
00336 }
00337
00338 void TabViewProperties::AddTabButtonCommand(winrt::ICommand const& value)
00339 {
00340     [[gsl::suppress(con)]]
00341     {
00342     static_cast<TabView*>(this)->SetValue(s_AddTabButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00343     }
00344 }
00345
00346 winrt::ICommand TabViewProperties::AddTabButtonCommand()
00347 {
00348     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_AddTabButtonCommandProperty));
00349 }
00350
00351 void TabViewProperties::AddTabButtonCommandParameter(winrt::IInspectable const& value)
00352 {
00353     [[gsl::suppress(con)]]
00354     {
00355     static_cast<TabView*>(this)->SetValue(s_AddTabButtonCommandParameterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00356     }
00357 }
00358
00359 winrt::IInspectable TabViewProperties::AddTabButtonCommandParameter()
00360 {
00361     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_AddTabButtonCommandParameterProperty));
00362 }
00363
00364 void TabViewProperties::AllowDropTabs(bool value)
00365 {
00366     [[gsl::suppress(con)]]
00367     {
00368     static_cast<TabView*>(this)->SetValue(s_AllowDropTabsProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00369     }
00370 }
00371
00372 bool TabViewProperties::AllowDropTabs()
00373 {
00374     return ValueHelper<bool>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_AllowDropTabsProperty));
00375 }
00376
00377 void TabViewProperties::CanDragTabs(bool value)
00378 {
00379     [[gsl::suppress(con)]]
00380     {
00381     static_cast<TabView*>(this)->SetValue(s_CanDragTabsProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00382     }
00383 }
00384
00385 bool TabViewProperties::CanDragTabs()
00386 {
00387     return ValueHelper<bool>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_CanDragTabsProperty));
00388 }
00389
00390 void TabViewProperties::CanReorderTabs(bool value)
00391 {
00392     [[gsl::suppress(con)]]
00393     {
00394     static_cast<TabView*>(this)->SetValue(s_CanReorderTabsProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00395     }
00396 }
00397
00398 bool TabViewProperties::CanReorderTabs()
00399 {
00400     return ValueHelper<bool>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_CanReorderTabsProperty));
00401 }
00402
00403 void TabViewProperties::CanTearOutTabs(bool value)
00404 {
00405     [[gsl::suppress(con)]]
00406     {
00407     static_cast<TabView*>(this)->SetValue(s_CanTearOutTabsProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00408     }
00409 }
00410
00411 bool TabViewProperties::CanTearOutTabs()
00412 {
00413     return ValueHelper<bool>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_CanTearOutTabsProperty));
00414 }
00415
00416 void TabViewProperties::CloseButtonOverlayMode(winrt::TabViewCloseButtonOverlayMode const& value)
00417 {
00418     [[gsl::suppress(con)]]
00419     {
00420     static_cast<TabView*>(this)->SetValue(s_CloseButtonOverlayModeProperty, ValueHelper<winrt::TabViewCloseButtonOverlayMode>::BoxValueIfNecessary(value));
00421     }
00422 }
00423
00424 winrt::TabViewCloseButtonOverlayMode TabViewProperties::CloseButtonOverlayMode()
00425 {
00426     return ValueHelper<winrt::TabViewCloseButtonOverlayMode>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_CloseButtonOverlayModeProperty));
00427 }
00428
00429 void TabViewProperties::IsAddTabButtonVisible(bool value)
00430 {
00431     [[gsl::suppress(con)]]
00432     {
00433     static_cast<TabView*>(this)->SetValue(s_IsAddTabButtonVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00434     }
00435 }
00436
00437 bool TabViewProperties::IsAddTabButtonVisible()
00438 {
00439     return ValueHelper<bool>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_IsAddTabButtonVisibleProperty));
00440 }
00441
00442 void TabViewProperties::SelectedIndex(int value)
00443 {
00444     [[gsl::suppress(con)]]
00445     {
00446     static_cast<TabView*>(this)->SetValue(s_SelectedIndexProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00447     }
00448 }
00449
00450 int TabViewProperties::SelectedIndex()
00451 {
00452     return ValueHelper<int>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_SelectedIndexProperty));
00453 }
00454
00455 void TabViewProperties::SelectedItem(winrt::IInspectable const& value)
00456 {
00457     [[gsl::suppress(con)]]
00458     {
00459     static_cast<TabView*>(this)->SetValue(s_SelectedItemProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00460     }
00461 }
00462
00463 winrt::IInspectable TabViewProperties::SelectedItem()
00464 {
00465     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_SelectedItemProperty));
00466 }
00467
00468 void TabViewProperties::TabItems(winrt::IVector<winrt::IInspectable> const& value)
00469 {
00470     [[gsl::suppress(con)]]
00471     {
00472     static_cast<TabView*>(this)->SetValue(s_TabItemsProperty, ValueHelper<winrt::IVector<winrt::IInspectable>>::BoxValueIfNecessary(value));
00473     }
00474 }
00475
00476 winrt::IVector<winrt::IInspectable> TabViewProperties::TabItems()
00477 {
00478     return ValueHelper<winrt::IVector<winrt::IInspectable>>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabItemsProperty));
00479 }
00480
00481 void TabViewProperties::TabItemsSource(winrt::IInspectable const& value)
00482 {
00483     [[gsl::suppress(con)]]
00484     {
00485     static_cast<TabView*>(this)->SetValue(s_TabItemsSourceProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00486     }
00487 }
00488
00489 winrt::IInspectable TabViewProperties::TabItemsSource()
00490 {
00491     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabItemsSourceProperty));
00492 }
00493
00494 void TabViewProperties::TabItemTemplate(winrt::DataTemplate const& value)
00495 {
00496     [[gsl::suppress(con)]]
00497     {
00498     static_cast<TabView*>(this)->SetValue(s_TabItemTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00499     }
00500 }
00501
00502 winrt::DataTemplate TabViewProperties::TabItemTemplate()
00503 {
00504     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabItemTemplateProperty));
00505 }
00506
00507 void TabViewProperties::TabItemTemplateSelector(winrt::DataTemplateSelector const& value)
00508 {
00509     [[gsl::suppress(con)]]
00510     {
00511     static_cast<TabView*>(this)->SetValue(s_TabItemTemplateSelectorProperty, ValueHelper<winrt::DataTemplateSelector>::BoxValueIfNecessary(value));
00512     }
00513 }
00514
00515 winrt::DataTemplateSelector TabViewProperties::TabItemTemplateSelector()
00516 {
00517     return ValueHelper<winrt::DataTemplateSelector>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabItemTemplateSelectorProperty));
00518 }
00519
00520 void TabViewProperties::TabStripFooter(winrt::IInspectable const& value)
00521 {
00522     [[gsl::suppress(con)]]
00523     {
00524     static_cast<TabView*>(this)->SetValue(s_TabStripFooterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00525     }
00526 }
00527
00528 winrt::IInspectable TabViewProperties::TabStripFooter()
00529 {
00530     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabStripFooterProperty));
00531 }
00532
00533 void TabViewProperties::TabStripFooterTemplate(winrt::DataTemplate const& value)
00534 {
00535     [[gsl::suppress(con)]]
00536     {
00537     static_cast<TabView*>(this)->SetValue(s_TabStripFooterTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00538     }
00539 }
00540
00541 winrt::DataTemplate TabViewProperties::TabStripFooterTemplate()
00542 {
00543     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabStripFooterTemplateProperty));
00544 }
00545
00546 void TabViewProperties::TabStripHeader(winrt::IInspectable const& value)
00547 {
00548     [[gsl::suppress(con)]]
00549     {
00550     static_cast<TabView*>(this)->SetValue(s_TabStripHeaderProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00551     }
00552 }
00553
00554 winrt::IInspectable TabViewProperties::TabStripHeader()
00555 {
00556     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabStripHeaderProperty));
00557 }
00558
00559 void TabViewProperties::TabStripHeaderTemplate(winrt::DataTemplate const& value)
00560 {
00561     [[gsl::suppress(con)]]
00562     {
00563     static_cast<TabView*>(this)->SetValue(s_TabStripHeaderTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00564     }
00565 }
00566
00567 winrt::DataTemplate TabViewProperties::TabStripHeaderTemplate()
00568 {
00569     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabStripHeaderTemplateProperty));
00570 }
00571
00572 void TabViewProperties::TabWidthMode(winrt::TabViewWidthMode const& value)
00573 {
00574     [[gsl::suppress(con)]]
00575     {
00576     static_cast<TabView*>(this)->SetValue(s_TabWidthModeProperty, ValueHelper<winrt::TabViewWidthMode>::BoxValueIfNecessary(value));
00577     }
00578 }
00579
00580 winrt::TabViewWidthMode TabViewProperties::TabWidthMode()
00581 {
00582     return ValueHelper<winrt::TabViewWidthMode>::CastOrUnbox(static_cast<TabView*>(this)->GetValue(s_TabWidthModeProperty));
00583 }
00584
00585 winrt::event_token TabViewProperties::AddTabButtonClick(winrt::TypedEventHandler<winrt::TabView, winrt::IInspectable> const& value)
00586 {
00587     return m_addTabButtonClickEventSource.add(value);
00588 }
00589
00590 void TabViewProperties::AddTabButtonClick(winrt::event_token const& token)
00591 {
00592     m_addTabButtonClickEventSource.remove(token);
00593 }
00594
00595 winrt::event_token TabViewProperties::ExternalTornOutTabsDropped(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs> const& value)
00596 {
00597     return m_externalTornOutTabsDroppedEventSource.add(value);
00598 }
00599
00600 void TabViewProperties::ExternalTornOutTabsDropped(winrt::event_token const& token)
00601 {
00602     m_externalTornOutTabsDroppedEventSource.remove(token);
00603 }
00604
00605 winrt::event_token TabViewProperties::ExternalTornOutTabsDropping(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs> const& value)
00606 {
00607     return m_externalTornOutTabsDroppingEventSource.add(value);
00608 }
00609
00610 void TabViewProperties::ExternalTornOutTabsDropping(winrt::event_token const& token)
00611 {
00612     m_externalTornOutTabsDroppingEventSource.remove(token);
00613 }
00614
00615 winrt::event_token TabViewProperties::SelectionChanged(winrt::SelectionChangedEventHandler const& value)
00616 {
00617     return m_selectionChangedEventSource.add(value);
00618 }
00619
00620 void TabViewProperties::SelectionChanged(winrt::event_token const& token)
00621 {
00622     m_selectionChangedEventSource.remove(token);
00623 }
00624
00625 winrt::event_token TabViewProperties::TabCloseRequested(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs> const& value)
00626 {
00627     return m_tabCloseRequestedEventSource.add(value);
00628 }
00629
00630 void TabViewProperties::TabCloseRequested(winrt::event_token const& token)
00631 {
00632     m_tabCloseRequestedEventSource.remove(token);
00633 }
00634
00635 winrt::event_token TabViewProperties::TabDragCompleted(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragCompletedEventArgs> const& value)
00636 {
00637     return m_tabDragCompletedEventSource.add(value);
00638 }
00639
00640 void TabViewProperties::TabDragCompleted(winrt::event_token const& token)
00641 {
00642     m_tabDragCompletedEventSource.remove(token);
00643 }
00644
00645 winrt::event_token TabViewProperties::TabDragStarting(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDragStartingEventArgs> const& value)
00646 {
00647     return m_tabDragStartingEventSource.add(value);
00648 }
00649
00650 void TabViewProperties::TabDragStarting(winrt::event_token const& token)
00651 {
00652     m_tabDragStartingEventSource.remove(token);
00653 }
00654
00655 winrt::event_token TabViewProperties::TabDroppedOutside(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs> const& value)
00656 {
00657     return m_tabDroppedOutsideEventSource.add(value);
00658 }
00659
00660 void TabViewProperties::TabDroppedOutside(winrt::event_token const& token)
00661 {
00662     m_tabDroppedOutsideEventSource.remove(token);
00663 }
00664
00665 winrt::event_token TabViewProperties::TabItemsChanged(winrt::TypedEventHandler<winrt::TabView, winrt::IVectorChangedEventArgs> const& value)
00666 {
00667     return m_tabItemsChangedEventSource.add(value);
00668 }
00669
00670 void TabViewProperties::TabItemsChanged(winrt::event_token const& token)
00671 {
00672     m_tabItemsChangedEventSource.remove(token);
00673 }
00674
00675 winrt::event_token TabViewProperties::TabStripDragOver(winrt::DragEventHandler const& value)
00676 {
00677     return m_tabStripDragOverEventSource.add(value);
00678 }
00679
00680 void TabViewProperties::TabStripDragOver(winrt::event_token const& token)
00681 {
00682     m_tabStripDragOverEventSource.remove(token);
00683 }
00684
00685 winrt::event_token TabViewProperties::TabStripDrop(winrt::DragEventHandler const& value)
00686 {
00687     return m_tabStripDropEventSource.add(value);
00688 }
00689
00690 void TabViewProperties::TabStripDrop(winrt::event_token const& token)
00691 {
00692     m_tabStripDropEventSource.remove(token);
00693 }
00694
00695 winrt::event_token TabViewProperties::TabTearOutRequested(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs> const& value)
00696 {
00697     return m_tabTearOutRequestedEventSource.add(value);
00698 }
00699
00700 void TabViewProperties::TabTearOutRequested(winrt::event_token const& token)
00701 {
00702     m_tabTearOutRequestedEventSource.remove(token);
00703 }
00704
00705 winrt::event_token TabViewProperties::TabTearOutWindowRequested(winrt::TypedEventHandler<winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs> const& value)
00706 {
00707     return m_tabTearOutWindowRequestedEventSource.add(value);
00708 }
00709
00710 void TabViewProperties::TabTearOutWindowRequested(winrt::event_token const& token)
00711 {
00712     m_tabTearOutWindowRequestedEventSource.remove(token);
00713 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CornerRadiusToThicknessConverterProperties Member List

This is the complete list of members for CornerRadiusToThicknessConverterProperties, including all inherited members.
ClearProperties() | CornerRadiusToThicknessConverterProperties | [static]
ConversionKind(winrt::CornerRadiusToThicknessConverterKind const &value) | CornerRadiusToThicknessConverterProperties |
ConversionKind() | CornerRadiusToThicknessConverterProperties |
ConversionKindProperty() | CornerRadiusToThicknessConverterProperties | [inline, static]
CornerRadiusToThicknessConverterProperties() | CornerRadiusToThicknessConverterProperties |
EnsureProperties() | CornerRadiusToThicknessConverterProperties | [static]
Multiplier(double value) | CornerRadiusToThicknessConverterProperties |
Multiplier() | CornerRadiusToThicknessConverterProperties |
MultiplierProperty() | CornerRadiusToThicknessConverterProperties | [inline, static]
s_ConversionKindProperty | CornerRadiusToThicknessConverterProperties | [static]
s_MultiplierProperty | CornerRadiusToThicknessConverterProperties | [static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlTypeBase Member List

This is the complete list of members for XamlTypeBase, including all inherited members.
ActivateInstance() | XamlTypeBase |
AddDPMember(wstring_view const &name, wstring_view const &memberTypeName, winrt::DependencyProperty const &dp, bool isContent) | XamlTypeBase |
AddMember(wstring_view const &name, wstring_view const &memberTypeName, std::function< winrt::IInspectable(const winrt::IInspectable &)> getter, std::function< void(const winrt::IInspectable &, const winrt::IInspectable &)> setter, bool isContent, bool isDependencyProperty, bool isAttachable) | XamlTypeBase |
AddToMap(winrt::IInspectable const &instance, winrt::IInspectable const &key, winrt::IInspectable const &value) | XamlTypeBase |
AddToVector(winrt::IInspectable const &instance, winrt::IInspectable const &value) | XamlTypeBase |
BaseType() | XamlTypeBase |
BoxedType() | XamlTypeBase |
ContentProperty() | XamlTypeBase |
CreateFromString(winrt::hstring const &value) | XamlTypeBase |
FullName() | XamlTypeBase |
GetMember(winrt::hstring const &name) | XamlTypeBase |
IsArray() | XamlTypeBase |
IsBindable() | XamlTypeBase |
IsCollection() | XamlTypeBase |
IsConstructible() | XamlTypeBase |
IsDictionary() | XamlTypeBase |
IsMarkupExtension() | XamlTypeBase |
ItemType() | XamlTypeBase |
KeyType() | XamlTypeBase |
m_activator | XamlTypeBase | [protected]
m_addToMap | XamlTypeBase | [protected]
m_collectionAdd | XamlTypeBase | [protected]
m_contentProperty | XamlTypeBase | [protected]
m_createFromString | XamlTypeBase | [protected]
m_isBindable | XamlTypeBase | [protected]
m_isSystemType | XamlTypeBase | [protected]
m_members | XamlTypeBase | [protected]
m_typeName | XamlTypeBase | [protected]
RunInitializer() | XamlTypeBase |
UnderlyingType() | XamlTypeBase |
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/AnimatedIconHost.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • TestUI

AnimatedIconHost.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Private.Controls;
00002 using Microsoft.UI.Xaml.Controls;
00003 using System;
00004 using System.Collections.Generic;
00005 using System.Linq;
00006 using System.Runtime.InteropServices.WindowsRuntime;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Data;
00010 using Microsoft.UI.Xaml.Documents;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Media;
00013 using IconSource = Microsoft.UI.Xaml.Controls.IconSource;
00014
00015 // The Templated Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234235
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed class AnimatedIconHost : Button
00020     {
00021         Border m_iconPresenter;
00022         TextBlock m_transitionTextBlock;
00023
00024         public IconSource IconSource
00025         {
00026             get { return (IconSource)GetValue(IconSourceProperty); }
00027             set { SetValue(IconSourceProperty, value); }
00028         }
00029
00030         public static readonly DependencyProperty IconSourceProperty = DependencyProperty.Register(
00031           "IconSource",
00032           typeof(IconSource),
00033           typeof(AnimatedIconHost),
00034           new PropertyMetadata(null, new PropertyChangedCallback(OnIconSourceChanged))
00035         );
00036
00037         private static void OnIconSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
00038         {
00039             ((AnimatedIconHost)d).IconSourceChanged();
00040         }
00041
00042         public String Title
00043         {
00044             get { return (String)GetValue(TitleProperty); }
00045             set { SetValue(TitleProperty, value); }
00046         }
00047
00048         public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(
00049           "Title",
00050           typeof(String),
00051           typeof(AnimatedIconHost),
00052           null
00053         );
00054
00055         public String FallbackGlyph
00056         {
00057             get { return (String)GetValue(FallbackGlyphProperty); }
00058             set { SetValue(FallbackGlyphProperty, value); }
00059         }
00060
00061         public static readonly DependencyProperty FallbackGlyphProperty = DependencyProperty.Register(
00062           "FallbackGlyph",
00063           typeof(String),
00064           typeof(AnimatedIconHost),
00065           null
00066         );
00067
00068         public AnimatedIconHost()
00069         {
00070             this.DefaultStyleKey = typeof(AnimatedIconHost);
00071             AnimatedIconTestHooks.LastAnimationSegmentChanged += AnimatedIconTestHooks_LastAnimationSegmentChanged;
00072         }
00073
00074         private void AnimatedIconTestHooks_LastAnimationSegmentChanged(AnimatedIcon sender, object args)
00075         {
00076             if(sender == GetAnimatedIcon())
00077             {
00078                 m_transitionTextBlock.Text = AnimatedIconTestHooks.GetLastAnimationSegment(sender);
00079             }
00080         }
00081
00082         public AnimatedIcon GetAnimatedIcon()
00083         {
00084             return m_iconPresenter.Child as AnimatedIcon;
00085         }
00086
00087         override protected void OnApplyTemplate()
00088         {
00089             m_iconPresenter = (Border)GetTemplateChild("Icon");
00090             m_transitionTextBlock = (TextBlock)GetTemplateChild("TransitionTextBlock");
00091
00092             IconSourceChanged();
00093         }
00094
00095         private void IconSourceChanged()
00096         {
00097             if (m_iconPresenter != null)
00098             {
00099                 m_iconPresenter.Child = IconSource.CreateIconElement();
00100             }
00101         }
00102     }
00103 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutContextAdapter Member List

This is the complete list of members for LayoutContextAdapter, including all inherited members.
GetElementIndexCore(winrt::UIElement const &element) | LayoutContextAdapter
GetItemAtCore(int index) | LayoutContextAdapter
GetOrCreateElementAtCore(int index, winrt::ElementRealizationOptions const &options) | LayoutContextAdapter
ItemCountCore() | LayoutContextAdapter
LayoutContextAdapter(winrt::NonVirtualizingLayoutContext const &nonVirtualizingContext) | LayoutContextAdapter
LayoutOriginCore() | LayoutContextAdapter
LayoutOriginCore(winrt::Point const &value) | LayoutContextAdapter
LayoutStateCore() | LayoutContextAdapter
LayoutStateCore(winrt::IInspectable const &state) | LayoutContextAdapter
RealizationRectCore() | LayoutContextAdapter
RecommendedAnchorIndexCore() | LayoutContextAdapter
RecycleElementCore(winrt::UIElement const &element) | LayoutContextAdapter
VisibleRectCore() | LayoutContextAdapter
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapElement Member List

This is the complete list of members for MapElement, including all inherited members.
Id | MapElement
MapElement() | MapElement
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpotSpecularEffect Member List

This is the complete list of members for SpotSpecularEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1SpotSpecular) | SpotSpecularEffect
DECLARE_NAMED_PROPERTY_MAPPING({L"LightPosition", D2D1_SPOTDIFFUSE_PROP_LIGHT_POSITION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightTarget", D2D1_SPOTDIFFUSE_PROP_POINTS_AT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Focus", D2D1_SPOTDIFFUSE_PROP_FOCUS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LimitingConeAngle", D2D1_SPOTDIFFUSE_PROP_LIMITING_CONE_ANGLE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_RADIANS_TO_DEGREES},{L"SpecularExponent", D2D1_SPOTSPECULAR_PROP_SPECULAR_EXPONENT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"SpecularAmount", D2D1_SPOTSPECULAR_PROP_SPECULAR_CONSTANT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapScale", D2D1_SPOTSPECULAR_PROP_SURFACE_SCALE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"LightColor", D2D1_SPOTSPECULAR_PROP_COLOR, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLOR_TO_VECTOR3},{L"HeightMapKernelSize", D2D1_SPOTSPECULAR_PROP_KERNEL_UNIT_LENGTH, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"HeightMapInterpolationMode", D2D1_SPOTSPECULAR_PROP_SCALE_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},) | SpotSpecularEffect
DECLARE_POD_PROPERTY(LightPosition, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true) | SpotSpecularEffect
DECLARE_POD_PROPERTY(LightTarget, Vector3,(Vector3{0.0f, 0.0f, 0.0f}), true) | SpotSpecularEffect
DECLARE_POD_PROPERTY(Focus, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | SpotSpecularEffect
DECLARE_POD_PROPERTY(LimitingConeAngle, float, k_PI/2.0f, true) | SpotSpecularEffect
DECLARE_POD_PROPERTY(SpecularExponent, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | SpotSpecularEffect
DECLARE_POD_PROPERTY(SpecularAmount, float, 1.0f, value >=0.0f &&value<=10000.0f) | SpotSpecularEffect
DECLARE_POD_PROPERTY(HeightMapScale, float, 1.0f, value >=-10000.0f &&value<=10000.0f) | SpotSpecularEffect
DECLARE_POD_PROPERTY(LightColor, UIColor,(UIColor{255, 255, 255, 255}), true) | SpotSpecularEffect
DECLARE_POD_PROPERTY(HeightMapKernelSize, Vector2,(Vector2{1.0f, 1.0f}), value.x >=0.01f &&value.y >=0.01f &&value.x<=100.0f &&value.y<=100.0f) | SpotSpecularEffect
DECLARE_POD_PROPERTY(HeightMapInterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true) | SpotSpecularEffect
DECLARE_SINGLE_SOURCE(Source) | SpotSpecularEffect
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | SpotSpecularEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | SpotSpecularEffect | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingAnchorRequestedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingAnchorRequestedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollingAnchorRequestedEventArgs.g.h"
00007
00008 class ScrollingAnchorRequestedEventArgs :
00009     public ReferenceTracker<ScrollingAnchorRequestedEventArgs, winrt::implementation::ScrollingAnchorRequestedEventArgsT, winrt::composable, winrt::composing>
00010 {
00011 public:
00012     ~ScrollingAnchorRequestedEventArgs()
00013     {
00014         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00015     }
00016
00017     ScrollingAnchorRequestedEventArgs(const winrt::ScrollPresenter& scrollPresenter);
00018
00019 #pragma region IScrollingAnchorRequestedEventArgs
00020     winrt::IVector<winrt::UIElement> AnchorCandidates();
00021     winrt::UIElement AnchorElement();
00022     void AnchorElement(winrt::UIElement const& value);
00023 #pragma endregion
00024
00025     winrt::IVector<winrt::UIElement> GetAnchorCandidates();
00026     void SetAnchorCandidates(const std::vector<tracker_ref<winrt::UIElement>>& anchorCandidates);
00027
00028     winrt::UIElement GetAnchorElement() const;
00029     void SetAnchorElement(const winrt::UIElement& anchorElement);
00030
00031 private:
00032     tracker_ref<winrt::IVector<winrt::UIElement>> m_anchorCandidates{ this };
00033     tracker_ref<winrt::UIElement> m_anchorElement{ this };
00034     tracker_ref<winrt::ScrollPresenter> m_scrollPresenter{ this };
00035 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsTestHooks.h Source File

  • File List
  • File Members
  • RadioButtons

RadioButtonsTestHooks.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002
00003 #include "RadioButtons.h"
00004
00005 #include "RadioButtonsTestHooks.g.h"
00006
00007 class RadioButtonsTestHooks :
00008     public winrt::implementation::RadioButtonsTestHooksT<RadioButtonsTestHooks>
00009 {
00010 public:
00011     static com_ptr<RadioButtonsTestHooks> GetGlobalTestHooks()
00012     {
00013         return s_testHooks;
00014     }
00015
00016     static com_ptr<RadioButtonsTestHooks> EnsureGlobalTestHooks();
00017
00018     static void SetTestHooksEnabled(const winrt::RadioButtons& radioButtons, bool enabled);
00019
00020     static int GetRows(const winrt::RadioButtons& radioButtons);
00021     static int GetColumns(const winrt::RadioButtons& radioButtons);
00022     static int GetLargerColumns(const winrt::RadioButtons& radioButtons);
00023
00024     static void NotifyLayoutChanged(const winrt::RadioButtons& sender);
00025     static winrt::event_token LayoutChanged(winrt::TypedEventHandler<winrt::RadioButtons, winrt::IInspectable> const& value);
00026     static void LayoutChanged(winrt::event_token const& token);
00027
00028 private:
00029     static com_ptr<RadioButtonsTestHooks> s_testHooks;
00030     winrt::event<winrt::TypedEventHandler<winrt::RadioButtons, winrt::IInspectable>> m_layoutChangedEventSource;
00031 };
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/StackLayoutState.cpp Source File

  • File List
  • File Members
  • Repeater

StackLayoutState.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "FlowLayoutAlgorithm.h"
00008 #include "StackLayoutState.h"
00009
00010 #include "StackLayoutState.properties.cpp"
00011
00012 void StackLayoutState::InitializeForContext(
00013     const winrt::VirtualizingLayoutContext& context,
00014     IFlowLayoutAlgorithmDelegates* callbacks)
00015 {
00016     m_flowAlgorithm.InitializeForContext(context, callbacks);
00017     if (m_estimationBuffer.size() == 0)
00018     {
00019         m_estimationBuffer.resize(BufferSize, 0.0f);
00020     }
00021
00022     context.LayoutStateCore(*this);
00023 }
00024
00025 void StackLayoutState::UninitializeForContext(const winrt::VirtualizingLayoutContext& context)
00026 {
00027     m_flowAlgorithm.UninitializeForContext(context);
00028 }
00029
00030 void StackLayoutState::OnElementMeasured(int elementIndex, double majorSize, double minorSize)
00031 {
00032     const int estimationBufferIndex = elementIndex % m_estimationBuffer.size();
00033     const bool alreadyMeasured = m_estimationBuffer[estimationBufferIndex] != 0;
00034     if (!alreadyMeasured)
00035     {
00036         m_totalElementsMeasured++;
00037     }
00038
00039     m_totalElementSize -= m_estimationBuffer[estimationBufferIndex];
00040     m_totalElementSize += majorSize;
00041     m_estimationBuffer[estimationBufferIndex] = majorSize;
00042
00043     m_maxArrangeBounds = std::max(m_maxArrangeBounds, minorSize);
00044 }
00045
00046 void StackLayoutState::OnMeasureStart()
00047 {
00048     m_maxArrangeBounds = 0.0;
00049 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/BreadcrumbBarItemAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

BreadcrumbBarItemAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "BreadcrumbBarItemAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(BreadcrumbBarItemAutomationPeer)
00012 }
00013
00014 #include "BreadcrumbBarItemAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorPickerSlider.properties.cpp Source File

  • File List
  • File Members
  • Generated

ColorPickerSlider.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ColorPickerSlider.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ColorPickerSlider)
00012 }
00013
00014 #include "ColorPickerSlider.g.cpp"
00015
00016 GlobalDependencyProperty ColorPickerSliderProperties::s_ColorChannelProperty{ nullptr };
00017
00018 ColorPickerSliderProperties::ColorPickerSliderProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void ColorPickerSliderProperties::EnsureProperties()
00024 {
00025     if (!s_ColorChannelProperty)
00026     {
00027         s_ColorChannelProperty =
00028             InitializeDependencyProperty(
00029                 L"ColorChannel",
00030                 winrt::name_of<winrt::ColorPickerHsvChannel>(),
00031                 winrt::name_of<winrt::ColorPickerSlider>(),
00032                 false /* isAttached */,
00033                 ValueHelper<winrt::ColorPickerHsvChannel>::BoxValueIfNecessary(winrt::ColorPickerHsvChannel::Value),
00034                 nullptr);
00035     }
00036 }
00037
00038 void ColorPickerSliderProperties::ClearProperties()
00039 {
00040     s_ColorChannelProperty = nullptr;
00041 }
00042
00043 void ColorPickerSliderProperties::ColorChannel(winrt::ColorPickerHsvChannel const& value)
00044 {
00045     [[gsl::suppress(con)]]
00046     {
00047     static_cast<ColorPickerSlider*>(this)->SetValue(s_ColorChannelProperty, ValueHelper<winrt::ColorPickerHsvChannel>::BoxValueIfNecessary(value));
00048     }
00049 }
00050
00051 winrt::ColorPickerHsvChannel ColorPickerSliderProperties::ColorChannel()
00052 {
00053     return ValueHelper<winrt::ColorPickerHsvChannel>::CastOrUnbox(static_cast<ColorPickerSlider*>(this)->GetValue(s_ColorChannelProperty));
00054 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectionNode.cpp Source File

  • File List
  • File Members
  • Repeater

SelectionNode.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "SelectionNode.h"
00008 #include "SelectionModel.h"
00009 #include "IndexPath.h"
00010
00011 SelectionNode::SelectionNode(SelectionModel* manager, SelectionNode* parent) :
00012     m_manager(manager), m_parent(parent), m_source(manager), m_dataSource(manager)
00013 {
00014     m_source.set(nullptr);
00015     m_dataSource.set(nullptr);
00016 }
00017
00018 SelectionNode::~SelectionNode()
00019 {
00020     UnhookCollectionChangedHandler();
00021 }
00022
00023 winrt::IInspectable SelectionNode::Source()
00024 {
00025     return m_source.get();
00026 }
00027
00028 void SelectionNode::Source(const winrt::IInspectable& value)
00029 {
00030     if (m_source.get() != value)
00031     {
00032         ClearSelection();
00033         UnhookCollectionChangedHandler();
00034
00035         m_source.set(value);
00036
00037         // Setup ItemsSourceView
00038         auto newDataSource = value.try_as<winrt::ItemsSourceView>();
00039         if (value && !newDataSource)
00040         {
00041             newDataSource = winrt::ItemsSourceView(value);
00042         }
00043
00044         m_dataSource.set(newDataSource);
00045
00046         HookupCollectionChangedHandler();
00047         OnSelectionChanged();
00048     }
00049 }
00050
00051 winrt::ItemsSourceView SelectionNode::ItemsSourceView()
00052 {
00053     return m_dataSource.get();
00054 }
00055
00056 int SelectionNode::DataCount()
00057 {
00058     return m_dataSource == nullptr ? 0 : m_dataSource.get().Count();
00059 }
00060
00061 int SelectionNode::ChildrenNodeCount()
00062 {
00063     return static_cast<int>(m_childrenNodes.size());
00064 }
00065
00066 int SelectionNode::RealizedChildrenNodeCount()
00067 {
00068     return m_realizedChildrenNodeCount;
00069 }
00070
00071 int SelectionNode::AnchorIndex()
00072 {
00073     return m_anchorIndex;
00074 }
00075
00076 void SelectionNode::AnchorIndex(int value)
00077 {
00078     m_anchorIndex = value;
00079 }
00080
00081 winrt::IndexPath SelectionNode::IndexPath()
00082 {
00083     std::vector<int> path;
00084     auto parent = m_parent;
00085     auto child = this;
00086     while (parent != nullptr)
00087     {
00088         auto childNodes = parent->m_childrenNodes;
00089         auto it = std::find_if(childNodes.cbegin(), childNodes.cend(), [&child](const auto& item) {return item.get() == child;});
00090         const auto index = static_cast<int>(distance(childNodes.cbegin(), it));
00091         assert(index >= 0);
00092         // we are walking up to the parent, so the path will be backwards
00093         path.insert(path.begin(), index);
00094         child = parent;
00095         parent = parent->m_parent;
00096     }
00097
00098     return winrt::make<::IndexPath>(path);
00099 }
00100
00101 // For a genuine tree view, we dont know which node is leaf until we
00102 // actually walk to it, so currently the tree builds up to the leaf. I don't
00103 // create a bunch of leaf node instances - instead i use the same instance m_leafNode to avoid
00104 // an explosion of node objects. However, I'm still creating the m_childrenNodes
00105 // collection unfortunately.
00106 std::shared_ptr<SelectionNode> SelectionNode::GetAt(int index, bool realizeChild)
00107 {
00108     std::shared_ptr<SelectionNode> child = nullptr;
00109     if (realizeChild)
00110     {
00111         if (m_childrenNodes.size() == 0)
00112         {
00113             if (m_dataSource != nullptr)
00114             {
00115                 for (int i = 0; i < m_dataSource.get().Count(); i++)
00116                 {
00117                     m_childrenNodes.emplace_back(nullptr);
00118                 }
00119             }
00120         }
00121
00122         MUX_ASSERT(0 <= index && index <= static_cast<int>(m_childrenNodes.size()));
00123
00124         if (m_childrenNodes.at(index) == nullptr)
00125         {
00126             auto childData = m_dataSource.get().GetAt(index);
00127             if (childData != nullptr)
00128             {
00129                 auto const childDataIndexPath = winrt::get_self<class IndexPath>(IndexPath())->CloneWithChildIndex(index);
00130                 auto resolvedChild = m_manager->ResolvePath(childData, childDataIndexPath);
00131                 if (resolvedChild != nullptr)
00132                 {
00133                     child = std::make_shared<SelectionNode>(m_manager, this /* parent */);
00134                     child->Source(resolvedChild);
00135                 }
00136                 else
00137                 {
00138                     child = m_manager->SharedLeafNode();
00139                 }
00140             }
00141             else
00142             {
00143                 child = m_manager->SharedLeafNode();
00144             }
00145
00146             m_childrenNodes[index] = child;
00147             m_realizedChildrenNodeCount++;
00148         }
00149         else
00150         {
00151             child = m_childrenNodes[index];
00152         }
00153     }
00154     else
00155     {
00156         if (m_childrenNodes.size() > 0)
00157         {
00158             MUX_ASSERT(0 <= index && index <= static_cast<int>(m_childrenNodes.size()));
00159             child = m_childrenNodes[index];
00160         }
00161     }
00162
00163     return child;
00164 }
00165
00166 int SelectionNode::SelectedCount()
00167 {
00168     return m_selectedCount;
00169 }
00170
00171 bool SelectionNode::IsSelected(int index)
00172 {
00173     bool isSelected = false;
00174     for (auto& range : m_selected)
00175     {
00176         if (range.Contains(index))
00177         {
00178             isSelected = true;
00179             break;
00180         }
00181     }
00182
00183     return isSelected;
00184 }
00185
00186 // True  -> Selected
00187 // False -> Not Selected
00188 // Null  -> Some descendents are selected and some are not
00189 winrt::IReference<bool> SelectionNode::IsSelectedWithPartial()
00190 {
00191     auto isSelected = winrt::PropertyValue::CreateBoolean(false).as<winrt::IReference<bool>>();
00192     if (m_parent)
00193     {
00194         auto parentsChildren = m_parent->m_childrenNodes;
00195         const auto it = std::find_if(parentsChildren.cbegin(), parentsChildren.cend(), [this](const std::shared_ptr<SelectionNode>& node) { return node.get() == this; });
00196         if (it != parentsChildren.end())
00197         {
00198             const auto myIndexInParent = static_cast<int>(it - parentsChildren.begin());
00199             isSelected = m_parent->IsSelectedWithPartial(myIndexInParent);
00200         }
00201     }
00202
00203     return isSelected;
00204 }
00205
00206 // True  -> Selected
00207 // False -> Not Selected
00208 // Null  -> Some descendents are selected and some are not
00209 winrt::IReference<bool> SelectionNode::IsSelectedWithPartial(int index)
00210 {
00211     SelectionState selectionState = SelectionState::NotSelected;
00212     MUX_ASSERT(index >= 0);
00213
00214     if (m_childrenNodes.size() == 0 || // no nodes realized
00215         static_cast<int>(m_childrenNodes.size()) <= index || // target node is not realized
00216         !m_childrenNodes[index] || // target node is not realized
00217         m_childrenNodes[index] == m_manager->SharedLeafNode())  // target node is a leaf node.
00218     {
00219         // Ask parent if the target node is selected.
00220         selectionState = IsSelected(index) ? SelectionState::Selected : SelectionState::NotSelected;
00221     }
00222     else
00223     {
00224         // targetNode is the node representing the index. This node is the parent.
00225         // targetNode is a non-leaf node, containing one or many children nodes. Evaluate
00226         // based on children of targetNode.
00227         auto targetNode = m_childrenNodes[index];
00228         selectionState = targetNode->EvaluateIsSelectedBasedOnChildrenNodes();
00229     }
00230
00231     return ConvertToNullableBool(selectionState);
00232 }
00233
00234 int SelectionNode::SelectedIndex()
00235 {
00236     return SelectedCount() > 0 ? SelectedIndices().at(0) : -1;
00237 }
00238
00239 void SelectionNode::SelectedIndex(int value)
00240 {
00241     if (IsValidIndex(value) && (SelectedCount() != 1 || !IsSelected(value)))
00242     {
00243         ClearSelection();
00244
00245         if (value != -1)
00246         {
00247             Select(value, true);
00248         }
00249     }
00250 }
00251
00252 std::vector<int> SelectionNode::SelectedIndices()
00253 {
00254     if (!m_selectedIndicesCacheIsValid)
00255     {
00256         m_selectedIndicesCacheIsValid = true;
00257         for (auto& range : m_selected)
00258         {
00259             for (int index = range.Begin(); index <= range.End(); index++)
00260             {
00261                 // Avoid duplicates
00262                 if (std::find(m_selectedIndicesCached.begin(), m_selectedIndicesCached.end(), index) == m_selectedIndicesCached.end())
00263                 {
00264                     m_selectedIndicesCached.emplace_back(index);
00265                 }
00266             }
00267         }
00268
00269         // Sort the list for easy consumption
00270         std::sort(m_selectedIndicesCached.begin(), m_selectedIndicesCached.end());
00271     }
00272
00273     return m_selectedIndicesCached;
00274 }
00275
00276 bool SelectionNode::Select(int index, bool select)
00277 {
00278     return Select(index, select, true /* raiseOnSelectionChanged */);
00279 }
00280
00281 bool SelectionNode::ToggleSelect(int index)
00282 {
00283     return Select(index, !IsSelected(index));
00284 }
00285
00286 void SelectionNode::SelectAll()
00287 {
00288     if (m_dataSource)
00289     {
00290         const auto size = m_dataSource.get().Count();
00291         if (size > 0)
00292         {
00293             SelectRange(IndexRange(0, size - 1), true /* select */);
00294         }
00295     }
00296 }
00297
00298 void SelectionNode::Clear()
00299 {
00300     ClearSelection();
00301 }
00302
00303 bool SelectionNode::SelectRange(const IndexRange& range, bool select)
00304 {
00305     if (IsValidIndex(range.Begin()) && IsValidIndex(range.End()))
00306     {
00307         if (select)
00308         {
00309             AddRange(range, true /* raiseOnSelectionChanged */);
00310         }
00311         else
00312         {
00313             RemoveRange(range, true /* raiseOnSelectionChanged */);
00314         }
00315
00316         return true;
00317     }
00318
00319     return false;
00320 }
00321
00322 void SelectionNode::HookupCollectionChangedHandler()
00323 {
00324     if (m_dataSource)
00325     {
00326         m_itemsSourceViewChanged = m_dataSource.get().CollectionChanged(winrt::auto_revoke, { this, &SelectionNode::OnSourceListChanged });
00327     }
00328 }
00329
00330 void SelectionNode::UnhookCollectionChangedHandler()
00331 {
00332         m_itemsSourceViewChanged.revoke();
00333 }
00334
00335 bool SelectionNode::IsValidIndex(int index)
00336 {
00337     return (ItemsSourceView() == nullptr || (index >= 0 && index < ItemsSourceView().Count()));
00338 }
00339
00340 void SelectionNode::AddRange(const IndexRange& addRange, bool raiseOnSelectionChanged)
00341 {
00342     // TODO: Check for duplicates (Task 14107720)
00343     // TODO: Optimize by merging adjacent ranges (Task 14107720)
00344
00345     const int oldCount = SelectedCount();
00346
00347     for (int i = addRange.Begin(); i <= addRange.End(); i++)
00348     {
00349         if (!IsSelected(i))
00350         {
00351             m_selectedCount++;
00352         }
00353     }
00354
00355     if (oldCount != m_selectedCount)
00356     {
00357         m_selected.emplace_back(addRange);
00358
00359         if (raiseOnSelectionChanged)
00360         {
00361             OnSelectionChanged();
00362         }
00363     }
00364 }
00365
00366 void SelectionNode::RemoveRange(const IndexRange& removeRange, bool raiseOnSelectionChanged)
00367 {
00368     const int oldCount = m_selectedCount;
00369
00370     // TODO: Prevent overlap of Ranges in _selected (Task 14107720)
00371     for (int i = removeRange.Begin(); i <= removeRange.End(); i++)
00372     {
00373         if (IsSelected(i))
00374         {
00375             m_selectedCount--;
00376         }
00377     }
00378
00379     if (oldCount != m_selectedCount)
00380     {
00381         // Build up a both a list of Ranges to remove and ranges to add
00382         std::vector<IndexRange> toRemove;
00383         std::vector<IndexRange> toAdd;
00384
00385         for (IndexRange& range : m_selected)
00386         {
00387             // If this range intersects the remove range, we have to do something
00388             if (removeRange.Intersects(range))
00389             {
00390                 IndexRange before(-1, -1);
00391                 IndexRange cut(-1, -1);
00392                 IndexRange after(-1, -1);
00393
00394                 // Intersection with the beginning of the range
00395                 //  Anything to the left of the point (exclusive) stays
00396                 //  Anything to the right of the point (inclusive) gets clipped
00397                 if (range.Contains(removeRange.Begin() - 1))
00398                 {
00399                     range.Split(removeRange.Begin() - 1, before, cut);
00400                     toAdd.emplace_back(before);
00401                 }
00402
00403                 // Intersection with the end of the range
00404                 //  Anything to the left of the point (inclusive) gets clipped
00405                 //  Anything to the right of the point (exclusive) stays
00406                 if (range.Contains(removeRange.End()))
00407                 {
00408                     if (range.Split(removeRange.End(), cut, after))
00409                     {
00410                         toAdd.emplace_back(after);
00411                     }
00412                 }
00413
00414                 // Remove this Range from the collection
00415                 // New ranges will be added for any remaining subsections
00416                 toRemove.emplace_back(range);
00417             }
00418         }
00419
00420         const bool change = ((toRemove.size() > 0) || (toAdd.size() > 0));
00421
00422         if (change)
00423         {
00424             // Remove tagged ranges
00425             for (const IndexRange& remove : toRemove)
00426             {
00427                 auto iter = std::find(m_selected.begin(), m_selected.end(), remove);
00428                 m_selected.erase(iter);
00429             }
00430
00431             // Add new ranges
00432             for (const IndexRange& add : toAdd)
00433             {
00434                 m_selected.emplace_back(add);
00435             }
00436
00437             if (raiseOnSelectionChanged)
00438             {
00439                 OnSelectionChanged();
00440             }
00441         }
00442     }
00443 }
00444
00445 void SelectionNode::ClearSelection()
00446 {
00447     // Deselect all items
00448     if (m_selected.size() > 0)
00449     {
00450         m_selected.clear();
00451         OnSelectionChanged();
00452     }
00453
00454     m_selectedCount = 0;
00455     AnchorIndex(-1);
00456
00457     // This will throw away all the children SelectionNodes
00458     // causing them to be unhooked from their data source. This
00459     // essentially cleans up the tree.
00460     m_childrenNodes.clear();
00461 }
00462
00463 bool SelectionNode::Select(int index, bool select, bool raiseOnSelectionChanged)
00464 {
00465     if (IsValidIndex(index))
00466     {
00467         // Ignore duplicate selection calls
00468         if (IsSelected(index) == select)
00469         {
00470             return true;
00471         }
00472
00473         const auto range = IndexRange(index, index);
00474
00475         if (select)
00476         {
00477             AddRange(range, raiseOnSelectionChanged);
00478         }
00479         else
00480         {
00481             RemoveRange(range, raiseOnSelectionChanged);
00482         }
00483
00484         return true;
00485     }
00486
00487     return false;
00488 }
00489
00490 void SelectionNode::OnSourceListChanged(const winrt::IInspectable& dataSource, const winrt::NotifyCollectionChangedEventArgs& args)
00491 {
00492     bool selectionInvalidated = false;
00493     switch (args.Action())
00494     {
00495         case winrt::NotifyCollectionChangedAction::Add:
00496         {
00497             selectionInvalidated = OnItemsAdded(args.NewStartingIndex(), args.NewItems().Size());
00498             break;
00499         }
00500
00501         case winrt::NotifyCollectionChangedAction::Remove:
00502         {
00503             selectionInvalidated = OnItemsRemoved(args.OldStartingIndex(), args.OldItems().Size());
00504             break;
00505         }
00506
00507         case winrt::NotifyCollectionChangedAction::Reset:
00508         {
00509             ClearSelection();
00510             selectionInvalidated = true;
00511             break;
00512         }
00513
00514         case winrt::NotifyCollectionChangedAction::Replace:
00515         {
00516             selectionInvalidated = OnItemsRemoved(args.OldStartingIndex(), args.OldItems().Size());
00517             selectionInvalidated |= OnItemsAdded(args.NewStartingIndex(), args.NewItems().Size());
00518             break;
00519         }
00520     }
00521
00522     if (selectionInvalidated)
00523     {
00524         OnSelectionChanged();
00525         m_manager->OnSelectionInvalidatedDueToCollectionChange();
00526     }
00527 }
00528
00529 bool SelectionNode::OnItemsAdded(int index, int count)
00530 {
00531     bool selectionInvalidated = false;
00532     // Update ranges for leaf items
00533     std::vector<IndexRange> toAdd;
00534     for (int i = 0; i < static_cast<int>(m_selected.size()); i++)
00535     {
00536         auto range = m_selected[i];
00537
00538         // The range is after the inserted items, need to shift the range right
00539         if (range.End() >= index)
00540         {
00541             int begin = range.Begin();
00542             // If the index left of newIndex is inside the range,
00543             // Split the range and remember the left piece to add later
00544             if (range.Contains(index - 1))
00545             {
00546                 IndexRange before(-1, -1), after(-1, -1);
00547                 range.Split(index - 1, before, after);
00548                 toAdd.emplace_back(before);
00549                 begin = index;
00550             }
00551
00552             // Shift the range to the right
00553             m_selected[i] = IndexRange(begin + count, range.End() + count);
00554             selectionInvalidated = true;
00555         }
00556     }
00557
00558     if (toAdd.size() > 0)
00559     {
00560         // Add the left sides of the split ranges
00561         for (auto& add : toAdd)
00562         {
00563             m_selected.emplace_back(add);
00564         }
00565     }
00566
00567     // Update for non-leaf if we are tracking non-leaf nodes
00568     if (m_childrenNodes.size() > 0)
00569     {
00570         selectionInvalidated = true;
00571         for (int i = 0; i < count; i++)
00572         {
00573             m_childrenNodes.insert(m_childrenNodes.begin() + index, nullptr);
00574         }
00575     }
00576
00577     //Adjust the anchor
00578     if (AnchorIndex() >= index)
00579     {
00580         AnchorIndex(AnchorIndex() + count);
00581     }
00582
00583     // Check if adding a node invalidated an ancestors
00584     // selection state. For example if parent was selected before
00585     // adding a new item makes the parent partially selected now.
00586     if (!selectionInvalidated)
00587     {
00588         auto parent = m_parent;
00589         while (parent)
00590         {
00591             auto isSelected = parent->IsSelectedWithPartial();
00592             // If a parent is selected, then it will become partially selected.
00593             // If it is not selected or partially selected - there is no change.
00594             if (isSelected && isSelected.Value())
00595             {
00596                 selectionInvalidated = true;
00597                 break;
00598             }
00599
00600             parent = parent->m_parent;
00601         }
00602     }
00603
00604     return selectionInvalidated;
00605 }
00606
00607 bool SelectionNode::OnItemsRemoved(int index, int count)
00608 {
00609     bool selectionInvalidated = false;
00610     // Remove the items from the selection for leaf
00611     if (ItemsSourceView().Count() > 0)
00612     {
00613         bool isSelected = false;
00614         for (int i = index; i <= index + count - 1; i++)
00615         {
00616             if (IsSelected(i))
00617             {
00618                 isSelected = true;
00619                 break;
00620             }
00621         }
00622
00623         if (isSelected)
00624         {
00625             RemoveRange(IndexRange(index, index + count - 1), false /* raiseOnSelectionChanged */);
00626             selectionInvalidated = true;
00627         }
00628
00629         for (int i = 0; i < static_cast<int>(m_selected.size()); i++)
00630         {
00631             auto range = m_selected[i];
00632
00633             // The range is after the removed items, need to shift the range left
00634             if (range.End() > index)
00635             {
00636                 MUX_ASSERT(!range.Contains(index));
00637
00638                 // Shift the range to the left
00639                 m_selected[i] = IndexRange(range.Begin() - count, range.End() - count);
00640                 selectionInvalidated = true;
00641             }
00642         }
00643
00644         // Update for non-leaf if we are tracking non-leaf nodes
00645         if (m_childrenNodes.size() > 0)
00646         {
00647             selectionInvalidated = true;
00648             for (int i = 0; i < count; i++)
00649             {
00650                 if (m_childrenNodes[index])
00651                 {
00652                     m_realizedChildrenNodeCount--;
00653                 }
00654                 m_childrenNodes.erase(m_childrenNodes.begin() + index);
00655             }
00656         }
00657
00658         //Adjust the anchor
00659         if (AnchorIndex() >= index)
00660         {
00661             AnchorIndex(AnchorIndex() - count);
00662         }
00663     }
00664     else
00665     {
00666         // No more items in the list, clear
00667         ClearSelection();
00668         m_realizedChildrenNodeCount = 0;
00669         selectionInvalidated = true;
00670     }
00671
00672     // Check if removing a node invalidated an ancestors
00673     // selection state. For example if parent was partially selected before
00674     // removing an item, it could be selected now.
00675     if (!selectionInvalidated)
00676     {
00677         auto parent = m_parent;
00678         while (parent)
00679         {
00680             auto isSelected = parent->IsSelectedWithPartial();
00681             // If a parent is partially selected, then it will become selected.
00682             // If it is selected or not selected - there is no change.
00683             if (!isSelected)
00684             {
00685                 selectionInvalidated = true;
00686                 break;
00687             }
00688
00689             parent = parent->m_parent;
00690         }
00691     }
00692
00693     return selectionInvalidated;
00694 }
00695
00696 void SelectionNode::OnSelectionChanged()
00697 {
00698     m_selectedIndicesCacheIsValid = false;
00699     m_selectedIndicesCached.clear();
00700 }
00701
00702 /* static */
00703 winrt::IReference<bool> SelectionNode::ConvertToNullableBool(SelectionState isSelected)
00704 {
00705     winrt::IReference<bool> result = nullptr; // PartiallySelected
00706     if (isSelected == SelectionState::Selected)
00707     {
00708         result = winrt::PropertyValue::CreateBoolean(true).as<winrt::IReference<bool>>();
00709     }
00710     else if (isSelected == SelectionState::NotSelected)
00711     {
00712         result = winrt::PropertyValue::CreateBoolean(false).as<winrt::IReference<bool>>();
00713     }
00714
00715     return result;
00716 }
00717
00718 SelectionState SelectionNode::EvaluateIsSelectedBasedOnChildrenNodes()
00719 {
00720     SelectionState selectionState = SelectionState::NotSelected;
00721     const int realizedChildrenNodeCount = RealizedChildrenNodeCount();
00722     int selectedCount = SelectedCount();
00723
00724     if (realizedChildrenNodeCount != 0 || selectedCount != 0)
00725     {
00726         // There are realized children or some selected leaves.
00727         const int dataCount = DataCount();
00728         if (realizedChildrenNodeCount == 0 && selectedCount > 0)
00729         {
00730             // All nodes are leaves under it - we didn't create children nodes as an optimization.
00731             // See if all/some or none of the leaves are selected.
00732             selectionState = dataCount != selectedCount ?
00733                 SelectionState::PartiallySelected :
00734                 dataCount == selectedCount ? SelectionState::Selected : SelectionState::NotSelected;
00735         }
00736         else
00737         {
00738             // There are child nodes, walk them individually and evaluate based on each child
00739             // being selected/not selected or partially selected.
00740             selectedCount = 0;
00741             int notSelectedCount = 0;
00742             for (int i = 0; i < ChildrenNodeCount(); i++)
00743             {
00744                 if (auto child = GetAt(i, false /* realizeChild */))
00745                 {
00746                     // child is realized, ask it.
00747                     auto isChildSelected = IsSelectedWithPartial(i);
00748                     if (isChildSelected == nullptr)
00749                     {
00750                         selectionState = SelectionState::PartiallySelected;
00751                         break;
00752                     }
00753                     else if (isChildSelected.Value())
00754                     {
00755                         selectedCount++;
00756                     }
00757                     else
00758                     {
00759                         notSelectedCount++;
00760                     }
00761                 }
00762                 else
00763                 {
00764                     // not realized.
00765                     if (IsSelected(i))
00766                     {
00767                         selectedCount++;
00768                     }
00769                     else
00770                     {
00771                         notSelectedCount++;
00772                     }
00773                 }
00774
00775                 if (selectedCount > 0 && notSelectedCount > 0)
00776                 {
00777                     selectionState = SelectionState::PartiallySelected;
00778                     break;
00779                 }
00780             }
00781
00782             if (selectionState != SelectionState::PartiallySelected)
00783             {
00784                 if (selectedCount != 0 && selectedCount != dataCount)
00785                 {
00786                     selectionState = SelectionState::PartiallySelected;
00787                 }
00788                 else
00789                 {
00790                     selectionState = selectedCount == dataCount ? SelectionState::Selected : SelectionState::NotSelected;
00791                 }
00792             }
00793         }
00794     }
00795
00796     return selectionState;
00797 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIconTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedIconTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedIconTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(AnimatedIconTestHooks)
00012 }
00013
00014 #include "AnimatedIconTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SliderInteractionPage Member List

This is the complete list of members for SliderInteractionPage, including all inherited members.
HorizontalSliderInteraction | SliderInteractionPage |
SliderInteractionPage() | SliderInteractionPage | [inline]
VerticalSliderInteraction | SliderInteractionPage |
Generated on Sun Dec 1 2024 20:54:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedSettingsVisualSource_AnimatedVisual Member List

This is the complete list of members for AnimatedSettingsVisualSource_AnimatedVisual, including all inherited members.
_reusableExpressionAnimation(compositor.CreateExpressionAnimation()) | AnimatedSettingsVisualSource_AnimatedVisual | [inline]
AnimatedSettingsVisualSource_AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedSettingsVisualSource_AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
CanvasGeometryToIGeometrySource2D(winrt::com_ptr< CanvasGeometry > geo) | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private, static]
Close() | AnimatedSettingsVisualSource_AnimatedVisual | [inline]
ContainerVisual_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_1() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_2() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
CreateBooleanKeyFrameAnimation(float initialProgress, bool initialValue) | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_1() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Duration() const | AnimatedSettingsVisualSource_AnimatedVisual | [inline]
Geometry_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Geometry_1() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Geometry_2() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Geometry_3() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Geometry_4() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
InsetClip_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, static]
IsVisibleBooleanAnimation_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
IsVisibleBooleanAnimation_1() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
IsVisibleBooleanAnimation_2() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
PathGeometry() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Root() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
RootProgress() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
RootVisual() const | AnimatedSettingsVisualSource_AnimatedVisual | [inline]
RotationAngleInDegreesScalarAnimation_0_to_360_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
RotationAngleInDegreesScalarAnimation_0_to_360_1() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
RotationAngleInDegreesScalarAnimation_0_to_m20() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_1() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_2() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Size() const | AnimatedSettingsVisualSource_AnimatedVisual | [inline]
SpriteShape_0() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
SpriteShape_1() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
SpriteShape_2() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
ThemeColor_Foreground() | AnimatedSettingsVisualSource_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/ImageIRefreshInfoProviderAdapter.cs Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • TestUI

ImageIRefreshInfoProviderAdapter.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Numerics;
00006 using Windows.Foundation;
00007 using Microsoft.UI.Composition;
00008 using Microsoft.UI.Input;
00009 using Microsoft.UI.Composition.Interactions;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Hosting;
00013 using Microsoft.UI.Xaml.Input;
00014 using Microsoft.UI.Xaml.Media;
00015 using Microsoft.UI.Private.Controls;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     class ImageIRefreshInfoProviderAdapter : IRefreshInfoProviderAdapter
00020     {
00021         RefreshPullDirection refreshPullDirection;
00022         InteractionTracker interactionTracker;
00023         VisualInteractionSource visualInteractionSource;
00024         IAdapterAnimationHandler animationHandler;
00025         Image image;
00026         RefreshInfoProviderImplementation infoProvider;
00027
00028         public ImageIRefreshInfoProviderAdapter(RefreshPullDirection refreshPullDirection, IAdapterAnimationHandler animationHandler)
00029         {
00030             this.refreshPullDirection = refreshPullDirection;
00031
00032             if (animationHandler != null)
00033             {
00034                 this.animationHandler = animationHandler;
00035             }
00036             else
00037             {
00038                 this.animationHandler = new AnimationHandler(null, refreshPullDirection);
00039             }
00040         }
00041
00042         public IRefreshInfoProvider AdaptFromTree(UIElement root, Size visualizerSize)
00043         {
00044             int depth = 0;
00045             if (root is Image)
00046             {
00047                 return Adapt((Image)root, visualizerSize);
00048             }
00049             else
00050             {
00051                 while (depth < 10)
00052                 {
00053                     Image result = AdaptFromTreeRecursiveHelper(root, depth);
00054                     if (result != null)
00055                     {
00056                         return Adapt(result, visualizerSize);
00057                     }
00058                     depth++;
00059                 }
00060             }
00061             return null;
00062         }
00063
00064         public void SetAnimations(UIElement refreshVisualizerAnimatableContainer)
00065         {
00066             animationHandler.InteractionTrackerAnimation(refreshVisualizerAnimatableContainer, image, interactionTracker);
00067         }
00068
00069         public IRefreshInfoProvider Adapt(Image image, Size visualizerSize)
00070         {
00071             this.image = image;
00072             UIElement parent = (UIElement)VisualTreeHelper.GetParent(image);
00073
00074             Visual parentVisual = ElementCompositionPreview.GetElementVisual(parent);
00075             Compositor compositor = parentVisual.Compositor;
00076             infoProvider = new RefreshInfoProviderImplementation(refreshPullDirection, visualizerSize, compositor);
00077
00078             interactionTracker = InteractionTracker.CreateWithOwner(compositor, infoProvider);
00079             interactionTracker.MaxPosition = new Vector3(0.0f);
00080             interactionTracker.MinPosition = new Vector3(0.0f);
00081             interactionTracker.MaxScale = 1.0f;
00082             interactionTracker.MinScale = 1.0f;
00083
00084             visualInteractionSource = VisualInteractionSource.Create(parentVisual);
00085             visualInteractionSource.ManipulationRedirectionMode = VisualInteractionSourceRedirectionMode.CapableTouchpadOnly;
00086             visualInteractionSource.ScaleSourceMode = InteractionSourceMode.Disabled;
00087             visualInteractionSource.PositionXSourceMode = IsOrientationVertical() ? InteractionSourceMode.Disabled : InteractionSourceMode.EnabledWithInertia;
00088             visualInteractionSource.PositionXChainingMode = IsOrientationVertical() ? InteractionChainingMode.Auto : InteractionChainingMode.Never;
00089             visualInteractionSource.PositionYSourceMode = IsOrientationVertical() ? InteractionSourceMode.EnabledWithInertia : InteractionSourceMode.Disabled;
00090             visualInteractionSource.PositionYChainingMode = IsOrientationVertical() ? InteractionChainingMode.Never : InteractionChainingMode.Auto;
00091
00092             interactionTracker.InteractionSources.Add(visualInteractionSource);
00093
00094             this.image.PointerPressed += OnImagePointerPressed;
00095             infoProvider.RefreshStarted += InfoProvider_RefreshStarted;
00096             infoProvider.RefreshCompleted += InfoProvider_RefreshCompleted;
00097
00098             return infoProvider;
00099         }
00100
00101         private void InfoProvider_RefreshCompleted(object sender, object e)
00102         {
00103             animationHandler.RefreshCompletedAnimation(null, image);
00104         }
00105
00106         private void InfoProvider_RefreshStarted(object sender, object e)
00107         {
00108             image.CancelDirectManipulations();
00109
00110             double executionRatio = 0.8f;
00111             if (infoProvider != null)
00112             {
00113                 executionRatio = infoProvider.ExecutionRatio;
00114             }
00115
00116             animationHandler.RefreshRequestedAnimation(null, image, executionRatio);
00117         }
00118
00119         private void OnImagePointerPressed(object sender, PointerRoutedEventArgs e)
00120         {
00121             if(e.Pointer.PointerDeviceType == PointerDeviceType.Touch)
00122             {
00123                 visualInteractionSource.TryRedirectForManipulation(e.GetCurrentPoint(null));
00124                 infoProvider.UpdateIsInteractingForRefresh(true);
00125             }
00126         }
00127
00128         private Image AdaptFromTreeRecursiveHelper(DependencyObject root, int depth)
00129         {
00130             int numChildren = VisualTreeHelper.GetChildrenCount(root);
00131             if (depth == 0)
00132             {
00133                 for (int i = 0; i < numChildren; i++)
00134                 {
00135                     DependencyObject childObject = VisualTreeHelper.GetChild(root, i);
00136                     if (childObject is Image)
00137                     {
00138                         return (Image)childObject;
00139                     }
00140                 }
00141                 return null;
00142             }
00143             else
00144             {
00145                 for (int i = 0; i < numChildren; i++)
00146                 {
00147                     DependencyObject childObject = VisualTreeHelper.GetChild(root, i);
00148                     Image recursiveResult = AdaptFromTreeRecursiveHelper(childObject, depth - 1);
00149                     if (recursiveResult != null)
00150                     {
00151                         return recursiveResult;
00152                     }
00153                 }
00154                 return null;
00155             }
00156         }
00157
00158         private bool IsOrientationVertical()
00159         {
00160             return (refreshPullDirection == RefreshPullDirection.TopToBottom || refreshPullDirection == RefreshPullDirection.BottomToTop);
00161         }
00162     }
00163
00164
00165     public class RefreshInfoProviderImplementation : IRefreshInfoProvider, IInteractionTrackerOwner
00166     {
00167         double executionRatio = 0.8;
00168         RefreshPullDirection refreshPullDirection;
00169         Size refreshVisualizerSize;
00170         CompositionPropertySet compositionProperties;
00171         String interactionRatioName = "InteractionRatio";
00172         int interactionRatioChangedCount = 0;
00173         bool isInteractingForRefresh = false;
00174
00175         public RefreshInfoProviderImplementation(RefreshPullDirection refreshPullDirection, Size refreshVisualizerSize, Compositor compositor)
00176         {
00177             this.refreshPullDirection = refreshPullDirection;
00178             this.refreshVisualizerSize = refreshVisualizerSize;
00179             compositionProperties = compositor.CreatePropertySet();
00180         }
00181
00182         public void UpdateIsInteractingForRefresh(bool value)
00183         {
00184             if (value != isInteractingForRefresh)
00185             {
00186                 isInteractingForRefresh = value;
00187                 if (IsInteractingForRefreshChanged != null)
00188                 {
00189                     IsInteractingForRefreshChanged.Invoke(this, null);
00190                 }
00191             }
00192         }
00193
00194         public void OnRefreshStarted()
00195         {
00196             if (RefreshStarted != null)
00197             {
00198                 RefreshStarted.Invoke(this, null);
00199             }
00200         }
00201
00202         public void OnRefreshCompleted()
00203         {
00204             if (RefreshCompleted != null)
00205             {
00206                 RefreshCompleted.Invoke(this, null);
00207             }
00208         }
00209
00210         public double ExecutionRatio
00211         {
00212             get
00213             {
00214                 return executionRatio;
00215             }
00216
00217             set
00218             {
00219                 executionRatio = value;
00220             }
00221         }
00222
00223         public CompositionPropertySet CompositionProperties
00224         {
00225             get
00226             {
00227                 return compositionProperties;
00228             }
00229         }
00230
00231         public string InteractionRatioCompositionProperty
00232         {
00233             get
00234             {
00235                 return interactionRatioName;
00236             }
00237         }
00238
00239         public bool IsInteractingForRefresh
00240         {
00241             get
00242             {
00243                 return isInteractingForRefresh;
00244             }
00245         }
00246
00247         public event TypedEventHandler<IRefreshInfoProvider, RefreshInteractionRatioChangedEventArgs> InteractionRatioChanged;
00248         public event TypedEventHandler<IRefreshInfoProvider, object> IsInteractingForRefreshChanged;
00249         public event TypedEventHandler<IRefreshInfoProvider, object> RefreshCompleted;
00250         public event TypedEventHandler<IRefreshInfoProvider, object> RefreshStarted;
00251
00252         public void CustomAnimationStateEntered(InteractionTracker sender, InteractionTrackerCustomAnimationStateEnteredArgs args)
00253         {
00254         }
00255
00256         public void IdleStateEntered(InteractionTracker sender, InteractionTrackerIdleStateEnteredArgs args)
00257         {
00258         }
00259
00260         public void InertiaStateEntered(InteractionTracker sender, InteractionTrackerInertiaStateEnteredArgs args)
00261         {
00262             UpdateIsInteractingForRefresh(false);
00263         }
00264
00265         public void InteractingStateEntered(InteractionTracker sender, InteractionTrackerInteractingStateEnteredArgs args)
00266         {
00267         }
00268
00269         public void RequestIgnored(InteractionTracker sender, InteractionTrackerRequestIgnoredArgs args)
00270         {
00271         }
00272
00273         public void ValuesChanged(InteractionTracker sender, InteractionTrackerValuesChangedArgs args)
00274         {
00275             switch (refreshPullDirection)
00276             {
00277                 case RefreshPullDirection.TopToBottom:
00278                     RaiseInteractionRatioChanged(refreshVisualizerSize.Height == 0 ? 1.0 : Math.Min(1.0, (double)-args.Position.Y / refreshVisualizerSize.Height));
00279                     break;
00280                 case RefreshPullDirection.BottomToTop:
00281                     RaiseInteractionRatioChanged(refreshVisualizerSize.Height == 0 ? 1.0f : Math.Min(1.0, (double)args.Position.Y / refreshVisualizerSize.Height));
00282                     break;
00283                 case RefreshPullDirection.LeftToRight:
00284                     RaiseInteractionRatioChanged(refreshVisualizerSize.Width == 0 ? 1.0f : Math.Min(1.0, (double)-args.Position.X / refreshVisualizerSize.Width));
00285                     break;
00286                 case RefreshPullDirection.RightToLeft:
00287                     RaiseInteractionRatioChanged(refreshVisualizerSize.Width == 0 ? 1.0f : Math.Min(1.0, (double)args.Position.X / refreshVisualizerSize.Width));
00288                     break;
00289             }
00290         }
00291
00292         private void RaiseInteractionRatioChanged(double interactionRatio)
00293         {
00294             compositionProperties.InsertScalar(interactionRatioName, (float)(interactionRatio));
00295
00296             if (interactionRatioChangedCount == 0 || interactionRatio == 0.0)
00297             {
00298                 if (InteractionRatioChanged != null)
00299                 {
00300                     var e = PullToRefreshHelperTestApi.CreateRefreshInteractionRatioChangedEventArgsInstance(interactionRatio);
00301                     InteractionRatioChanged.Invoke(this, e);
00302                 }
00303                 interactionRatioChangedCount++;
00304             }
00305             else if (interactionRatioChangedCount >= 5)
00306             {
00307                 interactionRatioChangedCount = 0;
00308             }
00309             else
00310             {
00311                 interactionRatioChangedCount++;
00312             }
00313         }
00314     }
00315 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewItemsSourceTestPage.xaml.cs Source File

  • File List
  • File Members
  • TreeView
  • TestUI

TreeViewItemsSourceTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Generic;
00008 using System.Linq;
00009 using Microsoft.UI.Xaml.Media;
00010
00011 namespace MUXControlsTestApp
00012 {
00013     public sealed partial class TreeViewItemsSourceTestPage : TestPage
00014     {
00015         private readonly TreeViewViewModel viewModel = new();
00016
00017         public TreeViewItemsSourceTestPage()
00018         {
00019             this.InitializeComponent();
00020         }
00021
00022         private void SetUpContainerReuseTest_Click(object sender, RoutedEventArgs e)
00023         {
00024             TestTreeView.ItemsSource = null;
00025             TestTreeView.ItemsSource = PrepareItemsSourceForContainerReuseTest();
00026         }
00027
00028         private void ExpandSecondItem_Click(object sender, RoutedEventArgs e)
00029         {
00030             TestTreeView.RootNodes[1].IsExpanded = true;
00031         }
00032
00033         private void ScrollToEndOfContentTreeView_Click(object sender, RoutedEventArgs e)
00034         {
00035             var sv = EnumerateDescendants(TestTreeView).OfType<ScrollViewer>().First();
00036             sv.ScrollToVerticalOffset(9999);
00037         }
00038
00039         private void ScrollToTopOfContentTreeView_Click(object sender, RoutedEventArgs e)
00040         {
00041             var sv = EnumerateDescendants(TestTreeView).OfType<ScrollViewer>().First();
00042             sv.ScrollToVerticalOffset(0);
00043         }
00044
00045         private static IEnumerable<UIElement> EnumerateDescendants(UIElement? reference)
00046         {
00047             var children = Enumerable
00048                 .Range(0, VisualTreeHelper.GetChildrenCount(reference))
00049                 .Select(x => VisualTreeHelper.GetChild(reference, x))
00050                 .OfType<UIElement>();
00051             foreach (var child in children)
00052             {
00053                 yield return child;
00054                 foreach (var grandchild in EnumerateDescendants(child))
00055                 {
00056                     yield return grandchild;
00057                 }
00058             }
00059         }
00060
00061         public ObservableCollection<TreeViewViewModelItem> PrepareItemsSourceForContainerReuseTest()
00062         {
00063             var list = Enumerable.Range(0, 60).Select(i =>
00064                 new TreeViewViewModelItem {
00065                     Name = $"Root{i}",
00066                     Items = new ObservableCollection<TreeViewViewModelItem>
00067                     {
00068                     new TreeViewViewModelItem { Name = $"Root{i} Child 1", Items = new ObservableCollection<TreeViewViewModelItem>
00069                         {
00070                             new TreeViewViewModelItem { Name = $"Root{i} Grandchild 1" },
00071                             new TreeViewViewModelItem { Name = $"Root{i} Grandchild 2" }
00072                         }
00073                     },
00074                     new TreeViewViewModelItem { Name = $"Root{i} Child 2" }
00075                     }
00076                 }
00077             ).ToList();
00078
00079             return new ObservableCollection<TreeViewViewModelItem>(list);
00080         }
00081     }
00082 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBar.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBar.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBar.g.h"
00011 #include "InkToolBar.properties.h"
00012
00013 class InkToolBar :
00014     public ReferenceTracker<InkToolBar, winrt::implementation::InkToolBarT>,
00015     public InkToolBarProperties
00016 {
00017 public:
00018
00019     winrt::InkToolBarInitialControls InitialControls() { winrt::throw_hresult(E_NOTIMPL); }
00020     void InitialControls(winrt::InkToolBarInitialControls value) { winrt::throw_hresult(E_NOTIMPL); }
00021     winrt::DependencyObjectCollection Children() { winrt::throw_hresult(E_NOTIMPL); }
00022     winrt::InkToolBarToolButton ActiveTool() { winrt::throw_hresult(E_NOTIMPL); }
00023     void ActiveTool(winrt::InkToolBarToolButton value) { winrt::throw_hresult(E_NOTIMPL); }
00024     winrt::InkDrawingAttributes InkDrawingAttributes() { winrt::throw_hresult(E_NOTIMPL); }
00025     bool IsRulerButtonChecked() { winrt::throw_hresult(E_NOTIMPL); }
00026     void IsRulerButtonChecked(bool value) { winrt::throw_hresult(E_NOTIMPL); }
00027     winrt::InkCanvas TargetInkCanvas() { winrt::throw_hresult(E_NOTIMPL); }
00028     void TargetInkCanvas(winrt::InkCanvas value) { winrt::throw_hresult(E_NOTIMPL); }
00029     bool IsStencilButtonChecked() { winrt::throw_hresult(E_NOTIMPL); }
00030     void IsStencilButtonChecked(bool value) { winrt::throw_hresult(E_NOTIMPL); }
00031     winrt::InkToolBarButtonFlyoutPlacement ButtonFlyoutPlacement() { winrt::throw_hresult(E_NOTIMPL); }
00032     void ButtonFlyoutPlacement(winrt::InkToolBarButtonFlyoutPlacement value) { winrt::throw_hresult(E_NOTIMPL); }
00033     winrt::Orientation Orientation() { winrt::throw_hresult(E_NOTIMPL); }
00034     void Orientation(winrt::Orientation value) { winrt::throw_hresult(E_NOTIMPL); }
00035     winrt::IInspectable TargetInkPresenter() { winrt::throw_hresult(E_NOTIMPL); }
00036     void TargetInkPresenter(winrt::IInspectable value) { winrt::throw_hresult(E_NOTIMPL); }
00037     winrt::InkToolBarToolButton GetToolButton(winrt::InkToolBarTool tool) { winrt::throw_hresult(E_NOTIMPL); }
00038     winrt::InkToolBarToggleButton GetToggleButton(winrt::InkToolBarToggle tool) { winrt::throw_hresult(E_NOTIMPL); }
00039     winrt::InkToolBarMenuButton GetMenuButton(winrt::InkToolBarMenuKind menu) { winrt::throw_hresult(E_NOTIMPL); }
00040 };
00041
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.cpp Source File

  • File List
  • File Members
  • Interactions
  • ButtonInteraction

ButtonInteractionInvokedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006
00007 #include "ButtonInteractionInvokedEventArgs.h"
00008
00009 ButtonInteractionInvokedEventArgs::ButtonInteractionInvokedEventArgs(winrt::UIElement const& target)
00010 {
00011     m_target.set(target);
00012 }
00013
00014 winrt::UIElement ButtonInteractionInvokedEventArgs::Target()
00015 {
00016     return m_target.get();
00017 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItemAutomationPeer.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Grouped

GroupedRepeaterItemAutomationPeer.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Automation.Peers;
00006 using Microsoft.UI.Xaml.Automation.Provider;
00007
00008 namespace MUXControlsTestApp.Samples.Selection
00009 {
00010     public class GroupedRepeaterItemAutomationPeer : FrameworkElementAutomationPeer, ISelectionItemProvider
00011     {
00012         private GroupedRepeaterItem _owner;
00013         public GroupedRepeaterItemAutomationPeer(FrameworkElement owner) : base(owner)
00014         {
00015             _owner = (GroupedRepeaterItem)owner;
00016         }
00017
00018         protected override object GetPatternCore(PatternInterface patternInterface)
00019         {
00020             if (patternInterface == PatternInterface.SelectionItem)
00021             {
00022                 return this;
00023             }
00024
00025             return base.GetPatternCore(patternInterface);
00026         }
00027
00028         public void AddToSelection()
00029         {
00030             _owner.Select();
00031         }
00032
00033         public void RemoveFromSelection()
00034         {
00035             _owner.Deselect();
00036         }
00037
00038         public void Select()
00039         {
00040             _owner.Select();
00041         }
00042
00043         public bool IsSelected
00044         {
00045             get
00046             {
00047                 return _owner.IsSelected;
00048             }
00049         }
00050
00051         public IRawElementProviderSimple SelectionContainer
00052         {
00053             get
00054             {
00055                 // TODO: could cache this to avoid the walk every time
00056                 IRawElementProviderSimple containerPeer = null;
00057                 FrameworkElement element = _owner;
00058                 while (element != null && !(element is SelectionContainer))
00059                 {
00060                     element = (FrameworkElement)element.Parent;
00061                 }
00062
00063                 if (element != null)
00064                 {
00065                     var container = (SelectionContainer)element;
00066                     containerPeer = ProviderFromPeer(CreatePeerForElement(container));
00067                 }
00068
00069                 return containerPeer;
00070             }
00071         }
00072
00073         protected override AutomationControlType GetAutomationControlTypeCore()
00074         {
00075             return AutomationControlType.ListItem;
00076         }
00077
00078         protected override string GetLocalizedControlTypeCore()
00079         {
00080             return "Item";
00081         }
00082     }
00083 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

UriToStringConverter Member List

This is the complete list of members for UriToStringConverter, including all inherited members.
Convert(object value, Type targetType, object parameter, string language) | UriToStringConverter | [inline]
ConvertBack(object value, Type targetType, object parameter, string language) | UriToStringConverter | [inline]
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicMarkupPage Member List

This is the complete list of members for AcrylicMarkupPage, including all inherited members.
_acrylicBrush | AcrylicMarkupPage | [private]
_acrylicTestApi | AcrylicMarkupPage | [private]
AcrylicMarkupPage() | AcrylicMarkupPage | [inline]
OnNavigatedFrom(NavigationEventArgs e) | AcrylicMarkupPage | [inline, protected]
RunTestButton_Clicked(object sender, RoutedEventArgs e) | AcrylicMarkupPage | [inline, private]
UpdateCompositionBrush() | AcrylicMarkupPage | [inline, private]
UpdateIsUsingAcrylicBrush() | AcrylicMarkupPage | [inline, private]
UpdateNoiseBrush() | AcrylicMarkupPage | [inline, private]
VerifyAcrylic() | AcrylicMarkupPage | [inline, private]
VerifyFallbackColor() | AcrylicMarkupPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBarTemplateSettings.cpp Source File

  • File List
  • File Members
  • TitleBar

TitleBarTemplateSettings.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TitleBarTemplateSettings.h"
00007
00008 TitleBarTemplateSettings::TitleBarTemplateSettings()
00009 {
00010     EnsureProperties();
00011 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbIterator.h Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbIterator.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 #pragma once
00004
00005 #include "pch.h"
00006 #include "common.h"
00007
00008 #include "BreadcrumbIterable.h"
00009
00010
00011 class BreadcrumbIterator :
00012     public winrt::implements<BreadcrumbIterator, winrt::IIterator<winrt::IInspectable>>
00013 {
00014 public:
00015     BreadcrumbIterator(const winrt::IInspectable& itemsSource);
00016
00017     winrt::IInspectable Current();
00018     bool HasCurrent();
00019     uint32_t GetMany(winrt::array_view<winrt::IInspectable> items);
00020     bool MoveNext();
00021
00022 private:
00023
00024     uint32_t m_currentIndex{};
00025     uint32_t m_size{};
00026     winrt::ItemsSourceView m_breadcrumbItemsSourceView{nullptr};
00027 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NumberBox.properties.cpp Source File

  • File List
  • File Members
  • Generated

NumberBox.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NumberBox.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(NumberBox)
00012 }
00013
00014 #include "NumberBox.g.cpp"
00015
00016 GlobalDependencyProperty NumberBoxProperties::s_AcceptsExpressionProperty{ nullptr };
00017 GlobalDependencyProperty NumberBoxProperties::s_DescriptionProperty{ nullptr };
00018 GlobalDependencyProperty NumberBoxProperties::s_HeaderProperty{ nullptr };
00019 GlobalDependencyProperty NumberBoxProperties::s_HeaderTemplateProperty{ nullptr };
00020 GlobalDependencyProperty NumberBoxProperties::s_InputScopeProperty{ nullptr };
00021 GlobalDependencyProperty NumberBoxProperties::s_IsWrapEnabledProperty{ nullptr };
00022 GlobalDependencyProperty NumberBoxProperties::s_LargeChangeProperty{ nullptr };
00023 GlobalDependencyProperty NumberBoxProperties::s_MaximumProperty{ nullptr };
00024 GlobalDependencyProperty NumberBoxProperties::s_MinimumProperty{ nullptr };
00025 GlobalDependencyProperty NumberBoxProperties::s_NumberFormatterProperty{ nullptr };
00026 GlobalDependencyProperty NumberBoxProperties::s_PlaceholderTextProperty{ nullptr };
00027 GlobalDependencyProperty NumberBoxProperties::s_PreventKeyboardDisplayOnProgrammaticFocusProperty{ nullptr };
00028 GlobalDependencyProperty NumberBoxProperties::s_SelectionFlyoutProperty{ nullptr };
00029 GlobalDependencyProperty NumberBoxProperties::s_SelectionHighlightColorProperty{ nullptr };
00030 GlobalDependencyProperty NumberBoxProperties::s_SmallChangeProperty{ nullptr };
00031 GlobalDependencyProperty NumberBoxProperties::s_SpinButtonPlacementModeProperty{ nullptr };
00032 GlobalDependencyProperty NumberBoxProperties::s_TextProperty{ nullptr };
00033 GlobalDependencyProperty NumberBoxProperties::s_TextAlignmentProperty{ nullptr };
00034 GlobalDependencyProperty NumberBoxProperties::s_TextReadingOrderProperty{ nullptr };
00035 GlobalDependencyProperty NumberBoxProperties::s_ValidationModeProperty{ nullptr };
00036 GlobalDependencyProperty NumberBoxProperties::s_ValueProperty{ nullptr };
00037
00038 NumberBoxProperties::NumberBoxProperties()
00039     : m_valueChangedEventSource{static_cast<NumberBox*>(this)}
00040 {
00041     EnsureProperties();
00042 }
00043
00044 void NumberBoxProperties::EnsureProperties()
00045 {
00046     if (!s_AcceptsExpressionProperty)
00047     {
00048         s_AcceptsExpressionProperty =
00049             InitializeDependencyProperty(
00050                 L"AcceptsExpression",
00051                 winrt::name_of<bool>(),
00052                 winrt::name_of<winrt::NumberBox>(),
00053                 false /* isAttached */,
00054                 ValueHelper<bool>::BoxValueIfNecessary(false),
00055                 nullptr);
00056     }
00057     if (!s_DescriptionProperty)
00058     {
00059         s_DescriptionProperty =
00060             InitializeDependencyProperty(
00061                 L"Description",
00062                 winrt::name_of<winrt::IInspectable>(),
00063                 winrt::name_of<winrt::NumberBox>(),
00064                 false /* isAttached */,
00065                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00066                 nullptr);
00067     }
00068     if (!s_HeaderProperty)
00069     {
00070         s_HeaderProperty =
00071             InitializeDependencyProperty(
00072                 L"Header",
00073                 winrt::name_of<winrt::IInspectable>(),
00074                 winrt::name_of<winrt::NumberBox>(),
00075                 false /* isAttached */,
00076                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00077                 winrt::PropertyChangedCallback(&OnHeaderPropertyChanged));
00078     }
00079     if (!s_HeaderTemplateProperty)
00080     {
00081         s_HeaderTemplateProperty =
00082             InitializeDependencyProperty(
00083                 L"HeaderTemplate",
00084                 winrt::name_of<winrt::DataTemplate>(),
00085                 winrt::name_of<winrt::NumberBox>(),
00086                 false /* isAttached */,
00087                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00088                 winrt::PropertyChangedCallback(&OnHeaderTemplatePropertyChanged));
00089     }
00090     if (!s_InputScopeProperty)
00091     {
00092         s_InputScopeProperty =
00093             InitializeDependencyProperty(
00094                 L"InputScope",
00095                 winrt::name_of<winrt::InputScope>(),
00096                 winrt::name_of<winrt::NumberBox>(),
00097                 false /* isAttached */,
00098                 ValueHelper<winrt::InputScope>::BoxedDefaultValue(),
00099                 nullptr);
00100     }
00101     if (!s_IsWrapEnabledProperty)
00102     {
00103         s_IsWrapEnabledProperty =
00104             InitializeDependencyProperty(
00105                 L"IsWrapEnabled",
00106                 winrt::name_of<bool>(),
00107                 winrt::name_of<winrt::NumberBox>(),
00108                 false /* isAttached */,
00109                 ValueHelper<bool>::BoxValueIfNecessary(false),
00110                 winrt::PropertyChangedCallback(&OnIsWrapEnabledPropertyChanged));
00111     }
00112     if (!s_LargeChangeProperty)
00113     {
00114         s_LargeChangeProperty =
00115             InitializeDependencyProperty(
00116                 L"LargeChange",
00117                 winrt::name_of<double>(),
00118                 winrt::name_of<winrt::NumberBox>(),
00119                 false /* isAttached */,
00120                 ValueHelper<double>::BoxValueIfNecessary(10),
00121                 nullptr);
00122     }
00123     if (!s_MaximumProperty)
00124     {
00125         s_MaximumProperty =
00126             InitializeDependencyProperty(
00127                 L"Maximum",
00128                 winrt::name_of<double>(),
00129                 winrt::name_of<winrt::NumberBox>(),
00130                 false /* isAttached */,
00131                 ValueHelper<double>::BoxValueIfNecessary(std::numeric_limits<double>::max()),
00132                 winrt::PropertyChangedCallback(&OnMaximumPropertyChanged));
00133     }
00134     if (!s_MinimumProperty)
00135     {
00136         s_MinimumProperty =
00137             InitializeDependencyProperty(
00138                 L"Minimum",
00139                 winrt::name_of<double>(),
00140                 winrt::name_of<winrt::NumberBox>(),
00141                 false /* isAttached */,
00142                 ValueHelper<double>::BoxValueIfNecessary(-std::numeric_limits<double>::max()),
00143                 winrt::PropertyChangedCallback(&OnMinimumPropertyChanged));
00144     }
00145     if (!s_NumberFormatterProperty)
00146     {
00147         s_NumberFormatterProperty =
00148             InitializeDependencyProperty(
00149                 L"NumberFormatter",
00150                 winrt::name_of<winrt::INumberFormatter2>(),
00151                 winrt::name_of<winrt::NumberBox>(),
00152                 false /* isAttached */,
00153                 ValueHelper<winrt::INumberFormatter2>::BoxedDefaultValue(),
00154                 winrt::PropertyChangedCallback(&OnNumberFormatterPropertyChanged));
00155     }
00156     if (!s_PlaceholderTextProperty)
00157     {
00158         s_PlaceholderTextProperty =
00159             InitializeDependencyProperty(
00160                 L"PlaceholderText",
00161                 winrt::name_of<winrt::hstring>(),
00162                 winrt::name_of<winrt::NumberBox>(),
00163                 false /* isAttached */,
00164                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00165                 nullptr);
00166     }
00167     if (!s_PreventKeyboardDisplayOnProgrammaticFocusProperty)
00168     {
00169         s_PreventKeyboardDisplayOnProgrammaticFocusProperty =
00170             InitializeDependencyProperty(
00171                 L"PreventKeyboardDisplayOnProgrammaticFocus",
00172                 winrt::name_of<bool>(),
00173                 winrt::name_of<winrt::NumberBox>(),
00174                 false /* isAttached */,
00175                 ValueHelper<bool>::BoxedDefaultValue(),
00176                 nullptr);
00177     }
00178     if (!s_SelectionFlyoutProperty)
00179     {
00180         s_SelectionFlyoutProperty =
00181             InitializeDependencyProperty(
00182                 L"SelectionFlyout",
00183                 winrt::name_of<winrt::FlyoutBase>(),
00184                 winrt::name_of<winrt::NumberBox>(),
00185                 false /* isAttached */,
00186                 ValueHelper<winrt::FlyoutBase>::BoxedDefaultValue(),
00187                 nullptr);
00188     }
00189     if (!s_SelectionHighlightColorProperty)
00190     {
00191         s_SelectionHighlightColorProperty =
00192             InitializeDependencyProperty(
00193                 L"SelectionHighlightColor",
00194                 winrt::name_of<winrt::SolidColorBrush>(),
00195                 winrt::name_of<winrt::NumberBox>(),
00196                 false /* isAttached */,
00197                 ValueHelper<winrt::SolidColorBrush>::BoxedDefaultValue(),
00198                 nullptr);
00199     }
00200     if (!s_SmallChangeProperty)
00201     {
00202         s_SmallChangeProperty =
00203             InitializeDependencyProperty(
00204                 L"SmallChange",
00205                 winrt::name_of<double>(),
00206                 winrt::name_of<winrt::NumberBox>(),
00207                 false /* isAttached */,
00208                 ValueHelper<double>::BoxValueIfNecessary(1),
00209                 winrt::PropertyChangedCallback(&OnSmallChangePropertyChanged));
00210     }
00211     if (!s_SpinButtonPlacementModeProperty)
00212     {
00213         s_SpinButtonPlacementModeProperty =
00214             InitializeDependencyProperty(
00215                 L"SpinButtonPlacementMode",
00216                 winrt::name_of<winrt::NumberBoxSpinButtonPlacementMode>(),
00217                 winrt::name_of<winrt::NumberBox>(),
00218                 false /* isAttached */,
00219                 ValueHelper<winrt::NumberBoxSpinButtonPlacementMode>::BoxValueIfNecessary(winrt::NumberBoxSpinButtonPlacementMode::Hidden),
00220                 winrt::PropertyChangedCallback(&OnSpinButtonPlacementModePropertyChanged));
00221     }
00222     if (!s_TextProperty)
00223     {
00224         s_TextProperty =
00225             InitializeDependencyProperty(
00226                 L"Text",
00227                 winrt::name_of<winrt::hstring>(),
00228                 winrt::name_of<winrt::NumberBox>(),
00229                 false /* isAttached */,
00230                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00231                 winrt::PropertyChangedCallback(&OnTextPropertyChanged));
00232     }
00233     if (!s_TextAlignmentProperty)
00234     {
00235         s_TextAlignmentProperty =
00236             InitializeDependencyProperty(
00237                 L"TextAlignment",
00238                 winrt::name_of<winrt::TextAlignment>(),
00239                 winrt::name_of<winrt::NumberBox>(),
00240                 false /* isAttached */,
00241                 ValueHelper<winrt::TextAlignment>::BoxValueIfNecessary(winrt::TextAlignment::Left),
00242                 nullptr);
00243     }
00244     if (!s_TextReadingOrderProperty)
00245     {
00246         s_TextReadingOrderProperty =
00247             InitializeDependencyProperty(
00248                 L"TextReadingOrder",
00249                 winrt::name_of<winrt::TextReadingOrder>(),
00250                 winrt::name_of<winrt::NumberBox>(),
00251                 false /* isAttached */,
00252                 ValueHelper<winrt::TextReadingOrder>::BoxedDefaultValue(),
00253                 nullptr);
00254     }
00255     if (!s_ValidationModeProperty)
00256     {
00257         s_ValidationModeProperty =
00258             InitializeDependencyProperty(
00259                 L"ValidationMode",
00260                 winrt::name_of<winrt::NumberBoxValidationMode>(),
00261                 winrt::name_of<winrt::NumberBox>(),
00262                 false /* isAttached */,
00263                 ValueHelper<winrt::NumberBoxValidationMode>::BoxedDefaultValue(),
00264                 winrt::PropertyChangedCallback(&OnValidationModePropertyChanged));
00265     }
00266     if (!s_ValueProperty)
00267     {
00268         s_ValueProperty =
00269             InitializeDependencyProperty(
00270                 L"Value",
00271                 winrt::name_of<double>(),
00272                 winrt::name_of<winrt::NumberBox>(),
00273                 false /* isAttached */,
00274                 ValueHelper<double>::BoxValueIfNecessary(std::numeric_limits<double>::quiet_NaN()),
00275                 winrt::PropertyChangedCallback(&OnValuePropertyChanged));
00276     }
00277 }
00278
00279 void NumberBoxProperties::ClearProperties()
00280 {
00281     s_AcceptsExpressionProperty = nullptr;
00282     s_DescriptionProperty = nullptr;
00283     s_HeaderProperty = nullptr;
00284     s_HeaderTemplateProperty = nullptr;
00285     s_InputScopeProperty = nullptr;
00286     s_IsWrapEnabledProperty = nullptr;
00287     s_LargeChangeProperty = nullptr;
00288     s_MaximumProperty = nullptr;
00289     s_MinimumProperty = nullptr;
00290     s_NumberFormatterProperty = nullptr;
00291     s_PlaceholderTextProperty = nullptr;
00292     s_PreventKeyboardDisplayOnProgrammaticFocusProperty = nullptr;
00293     s_SelectionFlyoutProperty = nullptr;
00294     s_SelectionHighlightColorProperty = nullptr;
00295     s_SmallChangeProperty = nullptr;
00296     s_SpinButtonPlacementModeProperty = nullptr;
00297     s_TextProperty = nullptr;
00298     s_TextAlignmentProperty = nullptr;
00299     s_TextReadingOrderProperty = nullptr;
00300     s_ValidationModeProperty = nullptr;
00301     s_ValueProperty = nullptr;
00302 }
00303
00304 void NumberBoxProperties::OnHeaderPropertyChanged(
00305     winrt::DependencyObject const& sender,
00306     winrt::DependencyPropertyChangedEventArgs const& args)
00307 {
00308     auto owner = sender.as<winrt::NumberBox>();
00309     winrt::get_self<NumberBox>(owner)->OnHeaderPropertyChanged(args);
00310 }
00311
00312 void NumberBoxProperties::OnHeaderTemplatePropertyChanged(
00313     winrt::DependencyObject const& sender,
00314     winrt::DependencyPropertyChangedEventArgs const& args)
00315 {
00316     auto owner = sender.as<winrt::NumberBox>();
00317     winrt::get_self<NumberBox>(owner)->OnHeaderTemplatePropertyChanged(args);
00318 }
00319
00320 void NumberBoxProperties::OnIsWrapEnabledPropertyChanged(
00321     winrt::DependencyObject const& sender,
00322     winrt::DependencyPropertyChangedEventArgs const& args)
00323 {
00324     auto owner = sender.as<winrt::NumberBox>();
00325     winrt::get_self<NumberBox>(owner)->OnIsWrapEnabledPropertyChanged(args);
00326 }
00327
00328 void NumberBoxProperties::OnMaximumPropertyChanged(
00329     winrt::DependencyObject const& sender,
00330     winrt::DependencyPropertyChangedEventArgs const& args)
00331 {
00332     auto owner = sender.as<winrt::NumberBox>();
00333     winrt::get_self<NumberBox>(owner)->OnMaximumPropertyChanged(args);
00334 }
00335
00336 void NumberBoxProperties::OnMinimumPropertyChanged(
00337     winrt::DependencyObject const& sender,
00338     winrt::DependencyPropertyChangedEventArgs const& args)
00339 {
00340     auto owner = sender.as<winrt::NumberBox>();
00341     winrt::get_self<NumberBox>(owner)->OnMinimumPropertyChanged(args);
00342 }
00343
00344 void NumberBoxProperties::OnNumberFormatterPropertyChanged(
00345     winrt::DependencyObject const& sender,
00346     winrt::DependencyPropertyChangedEventArgs const& args)
00347 {
00348     auto owner = sender.as<winrt::NumberBox>();
00349
00350     auto value = winrt::unbox_value<winrt::INumberFormatter2>(args.NewValue());
00351     auto coercedValue = value;
00352     winrt::get_self<NumberBox>(owner)->ValidateNumberFormatter(coercedValue);
00353     if (value != coercedValue)
00354     {
00355         sender.SetValue(args.Property(), winrt::box_value<winrt::INumberFormatter2>(coercedValue));
00356         return;
00357     }
00358
00359     winrt::get_self<NumberBox>(owner)->OnNumberFormatterPropertyChanged(args);
00360 }
00361
00362 void NumberBoxProperties::OnSmallChangePropertyChanged(
00363     winrt::DependencyObject const& sender,
00364     winrt::DependencyPropertyChangedEventArgs const& args)
00365 {
00366     auto owner = sender.as<winrt::NumberBox>();
00367     winrt::get_self<NumberBox>(owner)->OnSmallChangePropertyChanged(args);
00368 }
00369
00370 void NumberBoxProperties::OnSpinButtonPlacementModePropertyChanged(
00371     winrt::DependencyObject const& sender,
00372     winrt::DependencyPropertyChangedEventArgs const& args)
00373 {
00374     auto owner = sender.as<winrt::NumberBox>();
00375     winrt::get_self<NumberBox>(owner)->OnSpinButtonPlacementModePropertyChanged(args);
00376 }
00377
00378 void NumberBoxProperties::OnTextPropertyChanged(
00379     winrt::DependencyObject const& sender,
00380     winrt::DependencyPropertyChangedEventArgs const& args)
00381 {
00382     auto owner = sender.as<winrt::NumberBox>();
00383     winrt::get_self<NumberBox>(owner)->OnTextPropertyChanged(args);
00384 }
00385
00386 void NumberBoxProperties::OnValidationModePropertyChanged(
00387     winrt::DependencyObject const& sender,
00388     winrt::DependencyPropertyChangedEventArgs const& args)
00389 {
00390     auto owner = sender.as<winrt::NumberBox>();
00391     winrt::get_self<NumberBox>(owner)->OnValidationModePropertyChanged(args);
00392 }
00393
00394 void NumberBoxProperties::OnValuePropertyChanged(
00395     winrt::DependencyObject const& sender,
00396     winrt::DependencyPropertyChangedEventArgs const& args)
00397 {
00398     auto owner = sender.as<winrt::NumberBox>();
00399     winrt::get_self<NumberBox>(owner)->OnValuePropertyChanged(args);
00400 }
00401
00402 void NumberBoxProperties::AcceptsExpression(bool value)
00403 {
00404     [[gsl::suppress(con)]]
00405     {
00406     static_cast<NumberBox*>(this)->SetValue(s_AcceptsExpressionProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00407     }
00408 }
00409
00410 bool NumberBoxProperties::AcceptsExpression()
00411 {
00412     return ValueHelper<bool>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_AcceptsExpressionProperty));
00413 }
00414
00415 void NumberBoxProperties::Description(winrt::IInspectable const& value)
00416 {
00417     [[gsl::suppress(con)]]
00418     {
00419     static_cast<NumberBox*>(this)->SetValue(s_DescriptionProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00420     }
00421 }
00422
00423 winrt::IInspectable NumberBoxProperties::Description()
00424 {
00425     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_DescriptionProperty));
00426 }
00427
00428 void NumberBoxProperties::Header(winrt::IInspectable const& value)
00429 {
00430     [[gsl::suppress(con)]]
00431     {
00432     static_cast<NumberBox*>(this)->SetValue(s_HeaderProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00433     }
00434 }
00435
00436 winrt::IInspectable NumberBoxProperties::Header()
00437 {
00438     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_HeaderProperty));
00439 }
00440
00441 void NumberBoxProperties::HeaderTemplate(winrt::DataTemplate const& value)
00442 {
00443     [[gsl::suppress(con)]]
00444     {
00445     static_cast<NumberBox*>(this)->SetValue(s_HeaderTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00446     }
00447 }
00448
00449 winrt::DataTemplate NumberBoxProperties::HeaderTemplate()
00450 {
00451     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_HeaderTemplateProperty));
00452 }
00453
00454 void NumberBoxProperties::InputScope(winrt::InputScope const& value)
00455 {
00456     [[gsl::suppress(con)]]
00457     {
00458     static_cast<NumberBox*>(this)->SetValue(s_InputScopeProperty, ValueHelper<winrt::InputScope>::BoxValueIfNecessary(value));
00459     }
00460 }
00461
00462 winrt::InputScope NumberBoxProperties::InputScope()
00463 {
00464     return ValueHelper<winrt::InputScope>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_InputScopeProperty));
00465 }
00466
00467 void NumberBoxProperties::IsWrapEnabled(bool value)
00468 {
00469     [[gsl::suppress(con)]]
00470     {
00471     static_cast<NumberBox*>(this)->SetValue(s_IsWrapEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00472     }
00473 }
00474
00475 bool NumberBoxProperties::IsWrapEnabled()
00476 {
00477     return ValueHelper<bool>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_IsWrapEnabledProperty));
00478 }
00479
00480 void NumberBoxProperties::LargeChange(double value)
00481 {
00482     [[gsl::suppress(con)]]
00483     {
00484     static_cast<NumberBox*>(this)->SetValue(s_LargeChangeProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00485     }
00486 }
00487
00488 double NumberBoxProperties::LargeChange()
00489 {
00490     return ValueHelper<double>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_LargeChangeProperty));
00491 }
00492
00493 void NumberBoxProperties::Maximum(double value)
00494 {
00495     [[gsl::suppress(con)]]
00496     {
00497     static_cast<NumberBox*>(this)->SetValue(s_MaximumProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00498     }
00499 }
00500
00501 double NumberBoxProperties::Maximum()
00502 {
00503     return ValueHelper<double>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_MaximumProperty));
00504 }
00505
00506 void NumberBoxProperties::Minimum(double value)
00507 {
00508     [[gsl::suppress(con)]]
00509     {
00510     static_cast<NumberBox*>(this)->SetValue(s_MinimumProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00511     }
00512 }
00513
00514 double NumberBoxProperties::Minimum()
00515 {
00516     return ValueHelper<double>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_MinimumProperty));
00517 }
00518
00519 void NumberBoxProperties::NumberFormatter(winrt::INumberFormatter2 const& value)
00520 {
00521     [[gsl::suppress(con)]]
00522     {
00523     winrt::INumberFormatter2 coercedValue = value;
00524     static_cast<NumberBox*>(this)->ValidateNumberFormatter(coercedValue);
00525     static_cast<NumberBox*>(this)->SetValue(s_NumberFormatterProperty, ValueHelper<winrt::INumberFormatter2>::BoxValueIfNecessary(coercedValue));
00526     }
00527 }
00528
00529 winrt::INumberFormatter2 NumberBoxProperties::NumberFormatter()
00530 {
00531     return ValueHelper<winrt::INumberFormatter2>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_NumberFormatterProperty));
00532 }
00533
00534 void NumberBoxProperties::PlaceholderText(winrt::hstring const& value)
00535 {
00536     [[gsl::suppress(con)]]
00537     {
00538     static_cast<NumberBox*>(this)->SetValue(s_PlaceholderTextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00539     }
00540 }
00541
00542 winrt::hstring NumberBoxProperties::PlaceholderText()
00543 {
00544     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_PlaceholderTextProperty));
00545 }
00546
00547 void NumberBoxProperties::PreventKeyboardDisplayOnProgrammaticFocus(bool value)
00548 {
00549     [[gsl::suppress(con)]]
00550     {
00551     static_cast<NumberBox*>(this)->SetValue(s_PreventKeyboardDisplayOnProgrammaticFocusProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00552     }
00553 }
00554
00555 bool NumberBoxProperties::PreventKeyboardDisplayOnProgrammaticFocus()
00556 {
00557     return ValueHelper<bool>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_PreventKeyboardDisplayOnProgrammaticFocusProperty));
00558 }
00559
00560 void NumberBoxProperties::SelectionFlyout(winrt::FlyoutBase const& value)
00561 {
00562     [[gsl::suppress(con)]]
00563     {
00564     static_cast<NumberBox*>(this)->SetValue(s_SelectionFlyoutProperty, ValueHelper<winrt::FlyoutBase>::BoxValueIfNecessary(value));
00565     }
00566 }
00567
00568 winrt::FlyoutBase NumberBoxProperties::SelectionFlyout()
00569 {
00570     return ValueHelper<winrt::FlyoutBase>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_SelectionFlyoutProperty));
00571 }
00572
00573 void NumberBoxProperties::SelectionHighlightColor(winrt::SolidColorBrush const& value)
00574 {
00575     [[gsl::suppress(con)]]
00576     {
00577     static_cast<NumberBox*>(this)->SetValue(s_SelectionHighlightColorProperty, ValueHelper<winrt::SolidColorBrush>::BoxValueIfNecessary(value));
00578     }
00579 }
00580
00581 winrt::SolidColorBrush NumberBoxProperties::SelectionHighlightColor()
00582 {
00583     return ValueHelper<winrt::SolidColorBrush>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_SelectionHighlightColorProperty));
00584 }
00585
00586 void NumberBoxProperties::SmallChange(double value)
00587 {
00588     [[gsl::suppress(con)]]
00589     {
00590     static_cast<NumberBox*>(this)->SetValue(s_SmallChangeProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00591     }
00592 }
00593
00594 double NumberBoxProperties::SmallChange()
00595 {
00596     return ValueHelper<double>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_SmallChangeProperty));
00597 }
00598
00599 void NumberBoxProperties::SpinButtonPlacementMode(winrt::NumberBoxSpinButtonPlacementMode const& value)
00600 {
00601     [[gsl::suppress(con)]]
00602     {
00603     static_cast<NumberBox*>(this)->SetValue(s_SpinButtonPlacementModeProperty, ValueHelper<winrt::NumberBoxSpinButtonPlacementMode>::BoxValueIfNecessary(value));
00604     }
00605 }
00606
00607 winrt::NumberBoxSpinButtonPlacementMode NumberBoxProperties::SpinButtonPlacementMode()
00608 {
00609     return ValueHelper<winrt::NumberBoxSpinButtonPlacementMode>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_SpinButtonPlacementModeProperty));
00610 }
00611
00612 void NumberBoxProperties::Text(winrt::hstring const& value)
00613 {
00614     [[gsl::suppress(con)]]
00615     {
00616     static_cast<NumberBox*>(this)->SetValue(s_TextProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00617     }
00618 }
00619
00620 winrt::hstring NumberBoxProperties::Text()
00621 {
00622     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_TextProperty));
00623 }
00624
00625 void NumberBoxProperties::TextAlignment(winrt::TextAlignment const& value)
00626 {
00627     [[gsl::suppress(con)]]
00628     {
00629     static_cast<NumberBox*>(this)->SetValue(s_TextAlignmentProperty, ValueHelper<winrt::TextAlignment>::BoxValueIfNecessary(value));
00630     }
00631 }
00632
00633 winrt::TextAlignment NumberBoxProperties::TextAlignment()
00634 {
00635     return ValueHelper<winrt::TextAlignment>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_TextAlignmentProperty));
00636 }
00637
00638 void NumberBoxProperties::TextReadingOrder(winrt::TextReadingOrder const& value)
00639 {
00640     [[gsl::suppress(con)]]
00641     {
00642     static_cast<NumberBox*>(this)->SetValue(s_TextReadingOrderProperty, ValueHelper<winrt::TextReadingOrder>::BoxValueIfNecessary(value));
00643     }
00644 }
00645
00646 winrt::TextReadingOrder NumberBoxProperties::TextReadingOrder()
00647 {
00648     return ValueHelper<winrt::TextReadingOrder>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_TextReadingOrderProperty));
00649 }
00650
00651 void NumberBoxProperties::ValidationMode(winrt::NumberBoxValidationMode const& value)
00652 {
00653     [[gsl::suppress(con)]]
00654     {
00655     static_cast<NumberBox*>(this)->SetValue(s_ValidationModeProperty, ValueHelper<winrt::NumberBoxValidationMode>::BoxValueIfNecessary(value));
00656     }
00657 }
00658
00659 winrt::NumberBoxValidationMode NumberBoxProperties::ValidationMode()
00660 {
00661     return ValueHelper<winrt::NumberBoxValidationMode>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_ValidationModeProperty));
00662 }
00663
00664 void NumberBoxProperties::Value(double value)
00665 {
00666     [[gsl::suppress(con)]]
00667     {
00668     static_cast<NumberBox*>(this)->SetValue(s_ValueProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00669     }
00670 }
00671
00672 double NumberBoxProperties::Value()
00673 {
00674     return ValueHelper<double>::CastOrUnbox(static_cast<NumberBox*>(this)->GetValue(s_ValueProperty));
00675 }
00676
00677 winrt::event_token NumberBoxProperties::ValueChanged(winrt::TypedEventHandler<winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs> const& value)
00678 {
00679     return m_valueChangedEventSource.add(value);
00680 }
00681
00682 void NumberBoxProperties::ValueChanged(winrt::event_token const& token)
00683 {
00684     m_valueChangedEventSource.remove(token);
00685 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ISpotSpecularEffect Member List

This is the complete list of members for ISpotSpecularEffect, including all inherited members.
Focus([out, retval] float *value) | ISpotSpecularEffect
Focus([in] float value) | ISpotSpecularEffect
HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value) | ISpotSpecularEffect
HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value) | ISpotSpecularEffect
HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2 *value) | ISpotSpecularEffect
HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value) | ISpotSpecularEffect
HeightMapScale([out, retval] float *value) | ISpotSpecularEffect
HeightMapScale([in] float value) | ISpotSpecularEffect
LightColor([out, retval] Windows.UI.Color *value) | ISpotSpecularEffect
LightColor([in] Windows.UI.Color value) | ISpotSpecularEffect
LightPosition([out, retval] Windows.Foundation.Numerics.Vector3 *value) | ISpotSpecularEffect
LightPosition([in] Windows.Foundation.Numerics.Vector3 value) | ISpotSpecularEffect
LightTarget([out, retval] Windows.Foundation.Numerics.Vector3 *value) | ISpotSpecularEffect
LightTarget([in] Windows.Foundation.Numerics.Vector3 value) | ISpotSpecularEffect
LimitingConeAngle([out, retval] float *value) | ISpotSpecularEffect
LimitingConeAngle([in] float value) | ISpotSpecularEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ISpotSpecularEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ISpotSpecularEffect
SpecularAmount([out, retval] float *value) | ISpotSpecularEffect
SpecularAmount([in] float value) | ISpotSpecularEffect
SpecularExponent([out, retval] float *value) | ISpotSpecularEffect
SpecularExponent([in] float value) | ISpotSpecularEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.idl Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedChevronDownSmallVisualSource.idl

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedChevronDownSmallVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedChevronDownSmallVisualSource.json (10093 bytes created 9:26-07:00 Jun 8 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 namespace MU_XCAV_NAMESPACE
00022 {
00023     [MUX_PUBLIC]
00024     [webhosthidden]
00025     runtimeclass AnimatedChevronDownSmallVisualSource
00026         : [default] Microsoft.UI.Xaml.Controls.IAnimatedVisualSource, Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
00027     {
00028         AnimatedChevronDownSmallVisualSource();
00029     };
00030 }
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/APITests/RevealTests.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • APITests

RevealTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using MUXControlsTestApp.Utilities;
00007
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Markup;
00011 using Common;
00012
00013 using WEX.TestExecution;
00014 using WEX.TestExecution.Markup;
00015 using WEX.Logging.Interop;
00016
00017 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00018 {
00019     [TestClass]
00020     public class RevealTests : ApiTestBase
00021     {
00022         [TestMethod] //TODO: Re-enable once issue #644 is fixed.
00023         [TestProperty("Ignore", "True")]
00024         public void ValidateAppBarButtonRevealStyles()
00025         {
00026             AppBarButton buttonLabelsOnRight = null;
00027             AppBarButton buttonOverflow = null;
00028
00029             AppBarToggleButton toggleButtonLabelsOnRight = null;
00030             AppBarToggleButton toggleButtonOverflow = null;
00031
00032             RunOnUIThread.Execute(() =>
00033             {
00034                 var cmdBar = (CommandBar)XamlReader.Load(@"
00035                         <CommandBar xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00036                             DefaultLabelPosition='Right'
00037                             IsOpen='True'>
00038                             <AppBarButton Label='button' Icon='Accept'/>
00039                             <AppBarToggleButton Label='button' Icon='Accept'/>
00040                             <CommandBar.SecondaryCommands>
00041                                 <AppBarButton Label='Supercalifragilisticexpialidocious' Style='{StaticResource AppBarButtonRevealOverflowStyle}'/>
00042                                 <AppBarToggleButton Label='Supercalifragilisticexpialidocious' Style='{StaticResource AppBarToggleButtonRevealOverflowStyle}'/>
00043                             </CommandBar.SecondaryCommands>
00044                         </CommandBar>");
00045
00046                 buttonLabelsOnRight = (AppBarButton)cmdBar.PrimaryCommands[0];
00047                 buttonOverflow = (AppBarButton)cmdBar.SecondaryCommands[0];
00048
00049                 toggleButtonLabelsOnRight = (AppBarToggleButton)cmdBar.PrimaryCommands[1];
00050                 toggleButtonOverflow = (AppBarToggleButton)cmdBar.SecondaryCommands[1];
00051
00052                 Content = cmdBar;
00053                 Content.UpdateLayout();
00054
00055                 const double expectedLabelsOnRightWidth = 84;
00056                 const double expectedOverflowWidth = 264;
00057
00058                 Verify.AreEqual(expectedLabelsOnRightWidth, buttonLabelsOnRight.ActualWidth);
00059                 Verify.AreEqual(expectedOverflowWidth, buttonOverflow.ActualWidth);
00060
00061                 Verify.AreEqual(expectedLabelsOnRightWidth, toggleButtonLabelsOnRight.ActualWidth);
00062                 Verify.AreEqual(expectedOverflowWidth, toggleButtonOverflow.ActualWidth);
00063             });
00064         }
00065     }
00066 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< RoutedEventType::PointerPressed > Member List

This is the complete list of members for RoutedEventTraits< RoutedEventType::PointerPressed >, including all inherited members.
Event() RoutedEventTraits< RoutedEventType::PointerPressed > [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemSource Member List

This is the complete list of members for TreeViewItemSource, including all inherited members.
Children | TreeViewItemSource |
Content | TreeViewItemSource |
HasUnrealizedChildren | TreeViewItemSource |
IsExpanded | TreeViewItemSource |
IsSelected | TreeViewItemSource |
m_hasUnrealizedChildren | TreeViewItemSource | [private]
m_isExpanded | TreeViewItemSource | [private]
m_isSelected | TreeViewItemSource | [private]
NotifyPropertyChanged(String propertyName) | TreeViewItemSource | [inline, private]
PropertyChanged | TreeViewItemSource |
TreeViewItemSource() | TreeViewItemSource | [inline]
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PosterizeEffect Member List

This is the complete list of members for PosterizeEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1Posterize) | PosterizeEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"RedValueCount", D2D1_POSTERIZE_PROP_RED_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"GreenValueCount", D2D1_POSTERIZE_PROP_GREEN_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BlueValueCount", D2D1_POSTERIZE_PROP_BLUE_VALUE_COUNT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | PosterizeEffect |
DECLARE_POD_PROPERTY(RedValueCount, int, 4, value >=2 &&value<=16) | PosterizeEffect |
DECLARE_POD_PROPERTY(GreenValueCount, int, 4, value >=2 &&value<=16) | PosterizeEffect |
DECLARE_POD_PROPERTY(BlueValueCount, int, 4, value >=2 &&value<=16) | PosterizeEffect |
DECLARE_SINGLE_SOURCE(Source) | PosterizeEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | PosterizeEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | PosterizeEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/TestUI/NumberBoxPage.xaml.cs Source File

  • File List
  • File Members
  • NumberBox
  • TestUI

NumberBoxPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.ComponentModel;
00007 using System.IO;
00008 using System.Xml;
00009 using Windows.Globalization.NumberFormatting;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Automation;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Markup;
00015
00016 namespace MUXControlsTestApp
00017 {
00018     [TopLevelTestPage(Name = "NumberBox")]
00019     public sealed partial class NumberBoxPage : TestPage
00020     {
00021         public DataModelWithINPC DataModelWithINPC { get; set; } = new DataModelWithINPC();
00022
00023         public NumberBoxPage()
00024         {
00025             this.InitializeComponent();
00026
00027             TestNumberBox.RegisterPropertyChangedCallback(NumberBox.TextProperty, new DependencyPropertyChangedCallback(TextPropertyChanged));
00028         }
00029
00030         private void InputScope_Changed(object sender, RoutedEventArgs e)
00031         {
00032             if (TestNumberBox != null &&
00033                 sender is ComboBox comboBox &&
00034                 comboBox.SelectedItem is ComboBoxItem item)
00035             {
00036                 var scopeName = new InputScopeName();
00037                 scopeName.NameValue = (InputScopeNameValue)Enum.Parse(typeof(InputScopeNameValue), item.Content?.ToString() ?? string.Empty, true);
00038
00039                 var scope = new InputScope();
00040                 scope.Names.Add(scopeName);
00041
00042                 TestNumberBox.InputScope = scope;
00043
00044                 // Help testing by returning focus to the NumberBox to see the keyboard change
00045                 TestNumberBox.Focus(FocusState.Keyboard);
00046             }
00047         }
00048
00049         private void SpinMode_Changed(object sender, RoutedEventArgs e)
00050         {
00051             if (TestNumberBox != null)
00052             {
00053                 if (SpinModeComboBox.SelectedIndex == 0)
00054                 {
00055                     TestNumberBox.SpinButtonPlacementMode = NumberBoxSpinButtonPlacementMode.Hidden;
00056                 }
00057                 else if (SpinModeComboBox.SelectedIndex == 1)
00058                 {
00059                     TestNumberBox.SpinButtonPlacementMode = NumberBoxSpinButtonPlacementMode.Compact;
00060                 }
00061                 else if (SpinModeComboBox.SelectedIndex == 2)
00062                 {
00063                     TestNumberBox.SpinButtonPlacementMode = NumberBoxSpinButtonPlacementMode.Inline;
00064                 }
00065             }
00066         }
00067
00068         private void TextAlignment_Changed(object sender, RoutedEventArgs e)
00069         {
00070             if (TestNumberBox != null)
00071             {
00072                 if (TextAlignmentComboBox.SelectedIndex == 0)
00073                 {
00074                     TestNumberBox.TextAlignment = TextAlignment.Left;
00075                 }
00076                 else if (TextAlignmentComboBox.SelectedIndex == 1)
00077                 {
00078                     TestNumberBox.TextAlignment = TextAlignment.Center;
00079                 }
00080                 else if (TextAlignmentComboBox.SelectedIndex == 2)
00081                 {
00082                     TestNumberBox.TextAlignment = TextAlignment.Right;
00083                 }
00084             }
00085         }
00086
00087         private void Validation_Changed(object sender, RoutedEventArgs e)
00088         {
00089             if (TestNumberBox != null)
00090             {
00091                 if (ValidationComboBox.SelectedIndex == 0)
00092                 {
00093                     TestNumberBox.ValidationMode = NumberBoxValidationMode.InvalidInputOverwritten;
00094                 }
00095                 else if (ValidationComboBox.SelectedIndex == 1)
00096                 {
00097                     TestNumberBox.ValidationMode = NumberBoxValidationMode.Disabled;
00098                 }
00099             }
00100         }
00101
00102         private void MinCheckBox_CheckChanged(object sender, RoutedEventArgs e)
00103         {
00104             MinNumberBox.IsEnabled = (bool)MinCheckBox.IsChecked;
00105             MinValueChanged(null, null);
00106         }
00107
00108         private void MaxCheckBox_CheckChanged(object sender, RoutedEventArgs e)
00109         {
00110             MaxNumberBox.IsEnabled = (bool)MaxCheckBox.IsChecked;
00111             MaxValueChanged(null, null);
00112         }
00113
00114         private void MinValueChanged(object sender, object e)
00115         {
00116             if (TestNumberBox != null)
00117             {
00118                 TestNumberBox.Minimum = (bool)MinCheckBox.IsChecked ? MinNumberBox.Value : double.MinValue;
00119             }
00120         }
00121
00122         private void MaxValueChanged(object sender, object e)
00123         {
00124             if (TestNumberBox != null)
00125             {
00126                 TestNumberBox.Maximum = (bool)MaxCheckBox.IsChecked ? MaxNumberBox.Value : double.MaxValue;
00127             }
00128         }
00129
00130         private void NumberBoxValueChanged(object sender, NumberBoxValueChangedEventArgs e)
00131         {
00132             if (TestNumberBox != null && NewValueTextBox != null && OldValueTextBox != null)
00133             {
00134                 NewValueTextBox.Text = e.NewValue.ToString();
00135                 OldValueTextBox.Text = e.OldValue.ToString();
00136             }
00137         }
00138
00139         private void CustomFormatterButton_Click(object sender, RoutedEventArgs e)
00140         {
00141             List<string> languages = new List<string>() { "fr-FR" };
00142             DecimalFormatter formatter = new DecimalFormatter(languages, "FR");
00143             formatter.IntegerDigits = 1;
00144             formatter.FractionDigits = 2;
00145             TestNumberBox.NumberFormatter = formatter;
00146         }
00147
00148         private void SetTextButton_Click(object sender, RoutedEventArgs e)
00149         {
00150             TestNumberBox.Text = "15";
00151         }
00152
00153         private void SetValueButton_Click(object sender, RoutedEventArgs e)
00154         {
00155             TestNumberBox.Value = 42;
00156         }
00157
00158         private void SetNaNButton_Click(object sender, RoutedEventArgs e)
00159         {
00160             TestNumberBox.Value = Double.NaN;
00161         }
00162
00163         private void SetTwoWayBoundNaNButton_Click(object sender, RoutedEventArgs e)
00164         {
00165             DataModelWithINPC.Value = Double.NaN;
00166             TwoWayBoundNumberBoxValue.Text = TwoWayBoundNumberBox.Value.ToString();
00167         }
00168
00169         private void ToggleHeaderValueButton_Click(object sender, RoutedEventArgs e)
00170         {
00171             if(HeaderTestingNumberBox.Header is null)
00172             {
00173                 var demoHeader = new TextBlock();
00174                 demoHeader.SetValue(AutomationProperties.NameProperty, "NumberBoxHeaderClippingDemoHeader");
00175                 demoHeader.Text = "Test header";
00176                 HeaderTestingNumberBox.Header = demoHeader;
00177             }
00178             else
00179             {
00180                 // Switching between normal header and empty string header
00181                 if(HeaderTestingNumberBox.Header as string is null)
00182                 {
00183                     HeaderTestingNumberBox.Header = "";
00184                 }
00185                 else
00186                 {
00187                     HeaderTestingNumberBox.Header = null;
00188                 }
00189             }
00190         }
00191
00192         private void ToggleHeaderTemplateValueButton_Click(object sender, RoutedEventArgs e)
00193         {
00194             if (HeaderTemplateTestingNumberBox.HeaderTemplate is null)
00195             {
00196                 string templateString =
00197                 @"<DataTemplate
00198                 xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
00199                     <TextBlock AutomationProperties.Name=""HeaderTemplateTestingBlock"" Text=""Some text""/>
00200                 </DataTemplate>";
00201                 HeaderTemplateTestingNumberBox.HeaderTemplate = XamlReader.Load(templateString) as DataTemplate;
00202             }
00203             else
00204             {
00205                 // Switching between normal header and empty string header
00206                 HeaderTemplateTestingNumberBox.HeaderTemplate = null;
00207             }
00208         }
00209
00210         private void TextPropertyChanged(DependencyObject o, DependencyProperty p)
00211         {
00212             TextTextBox.Text = TestNumberBox.Text;
00213         }
00214
00215         private void ScrollviewerWithScroll_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
00216         {
00217             VerticalOffsetDisplayBlock.Text = (sender as Microsoft.UI.Xaml.Controls.ScrollViewer).VerticalOffset.ToString();
00218         }
00219     }
00220
00221     public class DataModelWithINPC : INotifyPropertyChanged
00222     {
00223         private double _value;
00224
00225         public event PropertyChangedEventHandler PropertyChanged;
00226
00227         protected virtual void OnPropertyChanged(string propertyName)
00228         {
00229             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
00230         }
00231
00232         public double Value
00233         {
00234             get => _value;
00235             set
00236             {
00237                 if (value != _value)
00238                 {
00239                     _value = value;
00240                     OnPropertyChanged(nameof(this.Value));
00241                 }
00242             }
00243         }
00244     }
00245 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Bridge Member List

This is the complete list of members for Bridge, including all inherited members.
AnotherObject | Bridge |
Func(string param) | Bridge | [inline]
m_dictionary | Bridge | [private]
this | Bridge |
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GroupedListViewBaseItem Member List

This is the complete list of members for GroupedListViewBaseItem, including all inherited members.
GroupedListViewBaseItem() | GroupedListViewBaseItem | [inline]
GroupedListViewBaseItem(string id) | GroupedListViewBaseItem | [inline]
Id | GroupedListViewBaseItem |
Generated on Sun Dec 1 2024 20:54:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapElementsLayer Member List

This is the complete list of members for MapElementsLayer, including all inherited members.
abi_enter() | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
CheckThread() | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
ClearProperties() | MapElementsLayerProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< MapElementsLayer > &&self) noexcept | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline, static]
EnsureProperties() | MapElementsLayerProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
final_release(std::unique_ptr< MapElementsLayer > &&self) | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline, static]
GetBase() | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
GetInner() | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
HandleMapElementsChanged(const winrt::IObservableVector< winrt::MapElement > &, const winrt::Collections::IVectorChangedEventArgs &args) | MapElementsLayer | [private]
IsOnThread() | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
m_elementIds | MapElementsLayer |
m_mapElementClickEventSource | MapElementsLayerProperties |
MapElementClick(winrt::TypedEventHandler< winrt::MapElementsLayer, winrt::MapElementClickEventArgs > const &value) | MapElementsLayerProperties |
MapElementClick(winrt::event_token const &token) | MapElementsLayerProperties |
MapElements(winrt::IVector< winrt::MapElement > const &value) | MapElementsLayerProperties |
MapElements() | MapElementsLayerProperties |
MapElementsLayer() | MapElementsLayer |
MapElementsLayerProperties() | MapElementsLayerProperties |
MapElementsProperty() | MapElementsLayerProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
OnMapElementsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapElementsLayerProperties | [static]
OnMapElementsVectorChanged(const winrt::IObservableVector< winrt::MapElement > &, const winrt::Collections::IVectorChangedEventArgs &args) | MapElementsLayer |
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | MapElementsLayer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
RaiseMapElementClick(MapElementClickEventArgs const &args) | MapElementsLayer |
ReferenceTracker(Args &&...args) | ReferenceTracker< MapElementsLayer, winrt::implementation::MapElementsLayerT, MapLayer > | [inline]
s_MapElementsProperty | MapElementsLayerProperties | [static]
SetParentMapControl(const winrt::MapControl &parent) | MapElementsLayer |
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedBackVisualSource_AnimatedVisual Member List

This is the complete list of members for AnimatedBackVisualSource_AnimatedVisual, including all inherited members.
_reusableExpressionAnimation(compositor.CreateExpressionAnimation()) | AnimatedBackVisualSource_AnimatedVisual | [inline]
AnimatedBackVisualSource_AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedBackVisualSource_AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CanvasGeometryToIGeometrySource2D(winrt::com_ptr< CanvasGeometry > geo) | AnimatedBackVisualSource_AnimatedVisual | [inline, private, static]
Close() | AnimatedBackVisualSource_AnimatedVisual | [inline]
ContainerShape() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CreateBooleanKeyFrameAnimation(float initialProgress, bool initialValue) | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush) | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_2() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_3() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_4() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
Duration() const | AnimatedBackVisualSource_AnimatedVisual | [inline]
Geometry_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
Geometry_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
Geometry_2() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
InsetClip_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedBackVisualSource_AnimatedVisual | [inline, static]
IsVisibleBooleanAnimation_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
IsVisibleBooleanAnimation_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
OffsetVector2Animation_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
OffsetVector2Animation_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
OpacityScalarAnimation_1_to_1_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
OpacityScalarAnimation_1_to_1_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
PathGeometry_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
PathGeometry_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
PathGeometry_2() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
Root() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
RootProgress() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
RootVisual() const | AnimatedBackVisualSource_AnimatedVisual | [inline]
ScaleXScalarAnimation_2p25_to_2p25() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
ScaleYScalarAnimation_2p25_to_2p25() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
Size() const | AnimatedBackVisualSource_AnimatedVisual | [inline]
SpriteShape_0() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
SpriteShape_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
SpriteShape_2() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
SpriteShape_3() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
SpriteShape_4() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
SpriteShape_5() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedBackVisualSource_AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
t0ScalarAnimation_0_to_1() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
ThemeColor_Foreground() | AnimatedBackVisualSource_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipAutomationPeer Member List

This is the complete list of members for TeachingTipAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
CheckThread() | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
Close() | TeachingTipAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< TeachingTipAutomationPeer > &&self) noexcept | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
final_release(std::unique_ptr< TeachingTipAutomationPeer > &&self) | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline, static]
GetAutomationControlTypeCore() | TeachingTipAutomationPeer |
GetBase() | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
GetClassNameCore() | TeachingTipAutomationPeer |
GetInner() | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
GetTeachingTip() | TeachingTipAutomationPeer | [private]
InteractionState() | TeachingTipAutomationPeer |
IsModal() | TeachingTipAutomationPeer |
IsOnThread() | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
IsTopmost() | TeachingTipAutomationPeer |
Maximizable() | TeachingTipAutomationPeer |
Minimizable() | TeachingTipAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
RaiseWindowClosedEvent() | TeachingTipAutomationPeer |
RaiseWindowOpenedEvent(wstring_view const &displayString) | TeachingTipAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider > | [inline]
SetVisualState(winrt::WindowVisualState state) | TeachingTipAutomationPeer |
TeachingTipAutomationPeer(winrt::TeachingTip const &owner) | TeachingTipAutomationPeer |
VisualState() | TeachingTipAutomationPeer |
WaitForInputIdle(int32_t milliseconds) | TeachingTipAutomationPeer |
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolbarAutomationPeer.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolbarAutomationPeer.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarAutomationPeer.g.h"
00011
00012 class InkToolBarAutomationPeer :
00013     public ReferenceTracker<InkToolBarAutomationPeer, winrt::implementation::InkToolBarAutomationPeerT>
00014 {
00015 public:
00016     InkToolBarAutomationPeer(winrt::InkToolBar owner) {};
00017 };
00018
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Grouped/GroupedRepeaterItem.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Grouped

GroupedRepeaterItem.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.System;
00005 using Microsoft.UI.Input;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Automation.Peers;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Input;
00010 using System.ComponentModel;
00011
00012 namespace MUXControlsTestApp.Samples.Selection
00013 {
00014     class GroupedRepeaterItem : ContentControl
00015     {
00016         public GroupedRepeaterItem()
00017         {
00018             IsTabStop = true;
00019             UseSystemFocusVisuals = true;
00020             Margin = new Thickness(3);
00021         }
00022
00023         public SelectionModel SelectionModel
00024         {
00025             get { return (SelectionModel)GetValue(SelectionModelProperty); }
00026             set { SetValue(SelectionModelProperty, value); }
00027         }
00028
00029         public static readonly DependencyProperty SelectionModelProperty =
00030             DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(GroupedRepeaterItem), new PropertyMetadata(null, new PropertyChangedCallback(OnPropertyChanged)));
00031
00032         public int RepeatedIndex
00033         {
00034             get { return (int)GetValue(RepeatedIndexProperty); }
00035             set { SetValue(RepeatedIndexProperty, value); }
00036         }
00037
00038         public static readonly DependencyProperty RepeatedIndexProperty =
00039             DependencyProperty.Register("RepeatedIndex", typeof(int), typeof(GroupedRepeaterItem), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)));
00040
00041         public bool IsSelected
00042         {
00043             get { return (bool)GetValue(IsSelectedProperty); }
00044             set { SetValue(IsSelectedProperty, value); }
00045         }
00046
00047         public static readonly DependencyProperty IsSelectedProperty =
00048             DependencyProperty.Register("IsSelected", typeof(bool), typeof(GroupedRepeaterItem), new PropertyMetadata(false));
00049
00050         private static void OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
00051         {
00052             if (args.Property == RepeatedIndexProperty)
00053             {
00054                 var item = obj as GroupedRepeaterItem;
00055                 if (item.SelectionModel != null)
00056                 {
00057                     int groupIndex = item.GetGroupIndex();
00058                     item.IsSelected = groupIndex >= 0 ? item.SelectionModel.IsSelected(groupIndex, item.RepeatedIndex).Value : false;
00059                 }
00060             }
00061             else if (args.Property == SelectionModelProperty)
00062             {
00063                 if (args.OldValue != null)
00064                 {
00065                     (args.OldValue as SelectionModel).PropertyChanged -= (obj as GroupedRepeaterItem).OnselectionModelChanged;
00066                 }
00067
00068                 if (args.NewValue != null)
00069                 {
00070                     (args.NewValue as SelectionModel).PropertyChanged += (obj as GroupedRepeaterItem).OnselectionModelChanged;
00071                 }
00072             }
00073         }
00074
00075         public void Select()
00076         {
00077             SelectionModel.Select(GetGroupIndex(), RepeatedIndex);
00078         }
00079
00080         public void Deselect()
00081         {
00082             SelectionModel.Deselect(GetGroupIndex(), RepeatedIndex);
00083         }
00084
00085         protected override void OnKeyUp(KeyRoutedEventArgs e)
00086         {
00087             if (SelectionModel != null)
00088             {
00089                 if (e.Key == VirtualKey.Escape)
00090                 {
00091                     SelectionModel.ClearSelection();
00092                 }
00093                 else if (e.Key == VirtualKey.Space)
00094                 {
00095                     Select();
00096                 }
00097                 else if (!SelectionModel.SingleSelect)
00098                 {
00099                     var isShiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
00100                     var isCtrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
00101                     if (e.Key == VirtualKey.A && isCtrlPressed)
00102                     {
00103                         SelectionModel.SelectAll();
00104                     }
00105                     else if (isShiftPressed)
00106                     {
00107                         SelectionModel.SelectRangeFromAnchor(GetGroupIndex(), RepeatedIndex);
00108                     }
00109                 }
00110             }
00111
00112             base.OnKeyUp(e);
00113         }
00114
00115         protected override void OnPointerPressed(PointerRoutedEventArgs e)
00116         {
00117             if (SelectionModel != null)
00118             {
00119                 if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Shift) && !SelectionModel.SingleSelect)
00120                 {
00121                     if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
00122                     {
00123                         SelectionModel.DeselectRangeFromAnchor(GetGroupIndex(), RepeatedIndex);
00124                     }
00125                     else
00126                     {
00127                         SelectionModel.SelectRangeFromAnchor(GetGroupIndex(), RepeatedIndex);
00128                     }
00129                 }
00130                 else if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
00131                 {
00132                     var groupIndex = GetGroupIndex();
00133                     if (SelectionModel.IsSelected(groupIndex, RepeatedIndex).Value)
00134                     {
00135                         Deselect();
00136                     }
00137                     else
00138                     {
00139                         Select();
00140                     }
00141                 }
00142                 else
00143                 {
00144                     Select();
00145                     this.Focus(FocusState.Keyboard);
00146                 }
00147             }
00148
00149             base.OnPointerPressed(e);
00150         }
00151
00152         protected override AutomationPeer OnCreateAutomationPeer()
00153         {
00154             return new GroupedRepeaterItemAutomationPeer(this);
00155         }
00156
00157         private int GetGroupIndex()
00158         {
00159             var child = this.Parent as FrameworkElement;
00160             var parent = child.Parent as FrameworkElement;
00161
00162             while (!(parent is ItemsRepeater))
00163             {
00164                 child = parent;
00165                 parent = parent.Parent as FrameworkElement;
00166             }
00167
00168             var groupIndex = (parent as ItemsRepeater).GetElementIndex(child);
00169
00170             return groupIndex;
00171         }
00172
00173         private void OnselectionModelChanged(object sender, PropertyChangedEventArgs e)
00174         {
00175             if (e.PropertyName == "SelectedIndices")
00176             {
00177                 bool oldValue = IsSelected;
00178                 var groupIndex = GetGroupIndex();
00179                 bool newValue = groupIndex >= 0 ? SelectionModel.IsSelected(groupIndex, RepeatedIndex).Value : false;
00180
00181                 if (oldValue != newValue)
00182                 {
00183                     IsSelected = newValue;
00184
00185                     // AutomationEvents.PropertyChanged is used as a value that means dont raise anything
00186                     AutomationEvents eventToRaise =
00187                         oldValue ?
00188                             (SelectionModel.SingleSelect ? AutomationEvents.PropertyChanged : AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection) :
00189                             (SelectionModel.SingleSelect ? AutomationEvents.SelectionItemPatternOnElementSelected : AutomationEvents.SelectionItemPatternOnElementAddedToSelection);
00190
00191                     if (eventToRaise != AutomationEvents.PropertyChanged && AutomationPeer.ListenerExists(eventToRaise))
00192                     {
00193                         var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
00194                         peer.RaiseAutomationEvent(eventToRaise);
00195                     }
00196                 }
00197             }
00198         }
00199     }
00200 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollView.idl Source File

  • File List
  • File Members
  • ScrollView

ScrollView.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC_V5]
00005 [webhosthidden]
00006 enum ScrollingScrollBarVisibility
00007 {
00008     Auto = 0,
00009     Visible = 1,
00010     Hidden = 2,
00011 };
00012
00013 [MUX_PUBLIC_V5]
00014 [webhosthidden]
00015 [contentproperty("Content")]
00016 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00017 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00018 unsealed runtimeclass ScrollView : Microsoft.UI.Xaml.Controls.Control
00019 {
00020     ScrollView();
00021
00022     Microsoft.UI.Xaml.UIElement Content { get; set; };
00023     Microsoft.UI.Xaml.UIElement CurrentAnchor { get; };
00024     Microsoft.UI.Xaml.Controls.Primitives.ScrollPresenter ScrollPresenter{ get; };
00025     Microsoft.UI.Composition.CompositionPropertySet ExpressionAnimationSources { get; };
00026     Double HorizontalOffset { get; };
00027     Double VerticalOffset { get; };
00028     Single ZoomFactor { get; };
00029     Double ExtentWidth { get; };
00030     Double ExtentHeight { get; };
00031     Double ViewportWidth{ get; };
00032     Double ViewportHeight{ get; };
00033     Double ScrollableWidth{ get; };
00034     Double ScrollableHeight{ get; };
00035     ScrollingInteractionState State { get; };
00036     [MUX_DEFAULT_VALUE("ScrollView::s_defaultHorizontalScrollBarVisibility")]
00037     ScrollingScrollBarVisibility HorizontalScrollBarVisibility { get; set; };
00038     [MUX_DEFAULT_VALUE("ScrollView::s_defaultVerticalScrollBarVisibility")]
00039     ScrollingScrollBarVisibility VerticalScrollBarVisibility { get; set; };
00040     [MUX_DEFAULT_VALUE("ScrollView::s_defaultContentOrientation")]
00041     ScrollingContentOrientation ContentOrientation { get; set; };
00042     [MUX_DEFAULT_VALUE("ScrollView::s_defaultHorizontalScrollChainMode")]
00043     ScrollingChainMode HorizontalScrollChainMode { get; set; };
00044     [MUX_DEFAULT_VALUE("ScrollView::s_defaultVerticalScrollChainMode")]
00045     ScrollingChainMode VerticalScrollChainMode { get; set; };
00046     [MUX_DEFAULT_VALUE("ScrollView::s_defaultHorizontalScrollRailMode")]
00047     ScrollingRailMode HorizontalScrollRailMode { get; set; };
00048     [MUX_DEFAULT_VALUE("ScrollView::s_defaultVerticalScrollRailMode")]
00049     ScrollingRailMode VerticalScrollRailMode { get; set; };
00050     [MUX_DEFAULT_VALUE("ScrollView::s_defaultHorizontalScrollMode")]
00051     ScrollingScrollMode HorizontalScrollMode { get; set; };
00052     [MUX_DEFAULT_VALUE("ScrollView::s_defaultVerticalScrollMode")]
00053     ScrollingScrollMode VerticalScrollMode { get; set; };
00054     [MUX_DEFAULT_VALUE("ScrollView::s_defaultComputedHorizontalScrollBarVisibility")]
00055     Microsoft.UI.Xaml.Visibility ComputedHorizontalScrollBarVisibility{ get; };
00056     [MUX_DEFAULT_VALUE("ScrollView::s_defaultComputedVerticalScrollBarVisibility")]
00057     Microsoft.UI.Xaml.Visibility ComputedVerticalScrollBarVisibility{ get; };
00058     [MUX_DEFAULT_VALUE("ScrollView::s_defaultComputedHorizontalScrollMode")]
00059     ScrollingScrollMode ComputedHorizontalScrollMode { get; };
00060     [MUX_DEFAULT_VALUE("ScrollView::s_defaultComputedVerticalScrollMode")]
00061     ScrollingScrollMode ComputedVerticalScrollMode { get; };
00062     [MUX_DEFAULT_VALUE("ScrollView::s_defaultZoomChainMode")]
00063     ScrollingChainMode ZoomChainMode { get; set; };
00064     [MUX_DEFAULT_VALUE("ScrollView::s_defaultZoomMode")]
00065     ScrollingZoomMode ZoomMode { get; set; };
00066     [MUX_DEFAULT_VALUE("ScrollView::s_defaultIgnoredInputKinds")]
00067     ScrollingInputKinds IgnoredInputKinds { get; set; };
00068     [MUX_DEFAULT_VALUE("ScrollView::s_defaultMinZoomFactor")]
00069     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateZoomFactoryBoundary")]
00070     Double MinZoomFactor { get; set; };
00071     [MUX_DEFAULT_VALUE("ScrollView::s_defaultMaxZoomFactor")]
00072     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateZoomFactoryBoundary")]
00073     Double MaxZoomFactor { get; set; };
00074     [MUX_DEFAULT_VALUE("ScrollView::s_defaultAnchorRatio")]
00075     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateAnchorRatio")]
00076     Double HorizontalAnchorRatio { get; set; };
00077     [MUX_DEFAULT_VALUE("ScrollView::s_defaultAnchorRatio")]
00078     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateAnchorRatio")]
00079     Double VerticalAnchorRatio { get; set; };
00080     void RegisterAnchorCandidate(Microsoft.UI.Xaml.UIElement element);
00081     void UnregisterAnchorCandidate(Microsoft.UI.Xaml.UIElement element);
00082     [method_name("ScrollTo")]
00083     Int32 ScrollTo(
00084         Double horizontalOffset,
00085         Double verticalOffset);
00086     [method_name("ScrollToWithOptions")]
00087     Int32 ScrollTo(
00088         Double horizontalOffset,
00089         Double verticalOffset,
00090         ScrollingScrollOptions options);
00091     [method_name("ScrollBy")]
00092     Int32 ScrollBy(
00093         Double horizontalOffsetDelta,
00094         Double verticalOffsetDelta);
00095     [method_name("ScrollByWithOptions")]
00096     Int32 ScrollBy(
00097         Double horizontalOffsetDelta,
00098         Double verticalOffsetDelta,
00099         ScrollingScrollOptions options);
00100     Int32 AddScrollVelocity(
00101         Windows.Foundation.Numerics.Vector2 offsetsVelocity,
00102         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> inertiaDecayRate);
00103     [method_name("ZoomTo")]
00104     Int32 ZoomTo(
00105         Single zoomFactor,
00106         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint);
00107     [method_name("ZoomToWithOptions")]
00108     Int32 ZoomTo(
00109         Single zoomFactor,
00110         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint,
00111         ScrollingZoomOptions options);
00112     [method_name("ZoomBy")]
00113     Int32 ZoomBy(
00114         Single zoomFactorDelta,
00115         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint);
00116     [method_name("ZoomByWithOptions")]
00117     Int32 ZoomBy(
00118         Single zoomFactorDelta,
00119         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint,
00120         ScrollingZoomOptions options);
00121     Int32 AddZoomVelocity(
00122         Single zoomFactorVelocity,
00123         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint,
00124         Windows.Foundation.IReference<Single> inertiaDecayRate);
00125
00126     event Windows.Foundation.TypedEventHandler<ScrollView, Object> ExtentChanged;
00127     event Windows.Foundation.TypedEventHandler<ScrollView, Object> StateChanged;
00128     event Windows.Foundation.TypedEventHandler<ScrollView, Object> ViewChanged;
00129     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingScrollAnimationStartingEventArgs> ScrollAnimationStarting;
00130     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingZoomAnimationStartingEventArgs> ZoomAnimationStarting;
00131     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingScrollCompletedEventArgs> ScrollCompleted;
00132     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingZoomCompletedEventArgs> ZoomCompleted;
00133     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingBringingIntoViewEventArgs> BringingIntoView;
00134     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingAnchorRequestedEventArgs> AnchorRequested;
00135
00136     [MUX_PREVIEW]
00137     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingScrollStartingEventArgs> ScrollStarting;
00138     [MUX_PREVIEW]
00139     event Windows.Foundation.TypedEventHandler<ScrollView, ScrollingZoomStartingEventArgs> ZoomStarting;
00140
00141     static Microsoft.UI.Xaml.DependencyProperty ContentProperty { get; };
00142     static Microsoft.UI.Xaml.DependencyProperty ScrollPresenterProperty { get; };
00143     static Microsoft.UI.Xaml.DependencyProperty HorizontalScrollBarVisibilityProperty { get; };
00144     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollBarVisibilityProperty { get; };
00145     static Microsoft.UI.Xaml.DependencyProperty ContentOrientationProperty { get; };
00146     static Microsoft.UI.Xaml.DependencyProperty HorizontalScrollChainModeProperty { get; };
00147     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollChainModeProperty { get; };
00148     static Microsoft.UI.Xaml.DependencyProperty HorizontalScrollRailModeProperty { get; };
00149     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollRailModeProperty { get; };
00150     static Microsoft.UI.Xaml.DependencyProperty HorizontalScrollModeProperty { get; };
00151     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollModeProperty { get; };
00152     static Microsoft.UI.Xaml.DependencyProperty ComputedHorizontalScrollBarVisibilityProperty{ get; };
00153     static Microsoft.UI.Xaml.DependencyProperty ComputedVerticalScrollBarVisibilityProperty{ get; };
00154     static Microsoft.UI.Xaml.DependencyProperty ComputedHorizontalScrollModeProperty { get; };
00155     static Microsoft.UI.Xaml.DependencyProperty ComputedVerticalScrollModeProperty { get; };
00156     static Microsoft.UI.Xaml.DependencyProperty ZoomChainModeProperty { get; };
00157     static Microsoft.UI.Xaml.DependencyProperty ZoomModeProperty { get; };
00158     static Microsoft.UI.Xaml.DependencyProperty IgnoredInputKindsProperty { get; };
00159     static Microsoft.UI.Xaml.DependencyProperty MinZoomFactorProperty { get; };
00160     static Microsoft.UI.Xaml.DependencyProperty MaxZoomFactorProperty { get; };
00161     static Microsoft.UI.Xaml.DependencyProperty HorizontalAnchorRatioProperty { get; };
00162     static Microsoft.UI.Xaml.DependencyProperty VerticalAnchorRatioProperty { get; };
00163 }
00164
00165 }
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemHelper< T > Member List

This is the complete list of members for NavigationViewItemHelper< T >, including all inherited members.
c_selectionIndicatorName | NavigationViewItemHelper< T > | [private, static]
GetSelectionIndicator() const | NavigationViewItemHelper< T > | [inline]
Init(const winrt::IControlProtected &controlProtected) | NavigationViewItemHelper< T > | [inline]
m_owner | NavigationViewItemHelper< T > | [private]
NavigationViewItemHelper(const ITrackerHandleManager *owner) | NavigationViewItemHelper< T > | [inline]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBadge Member List

This is the complete list of members for InfoBadge, including all inherited members.
abi_enter() | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
CheckThread() | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
ClearProperties() | InfoBadgeProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< InfoBadge > &&self) noexcept | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline, static]
EnsureProperties() | InfoBadgeProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
final_release(std::unique_ptr< InfoBadge > &&self) | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline, static]
GetBase() | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
GetInner() | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
IconSource(winrt::IconSource const &value) | InfoBadgeProperties |
IconSource() | InfoBadgeProperties |
IconSourceProperty() | InfoBadgeProperties | [inline, static]
InfoBadge() | InfoBadge |
InfoBadgeProperties() | InfoBadgeProperties |
IsOnThread() | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
MeasureOverride(winrt::Size const &availableSize) | InfoBadge |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
OnApplyTemplate() | InfoBadge |
OnDisplayKindPropertiesChanged() | InfoBadge | [private]
OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBadgeProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBadge |
OnSizeChanged(const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args) | InfoBadge | [private]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBadgeProperties | [static]
OnValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBadgeProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InfoBadge, winrt::implementation::InfoBadgeT > | [inline]
s_IconSourceProperty | InfoBadgeProperties | [static]
s_TemplateSettingsProperty | InfoBadgeProperties | [static]
s_ValueProperty | InfoBadgeProperties | [static]
TemplateSettings(winrt::InfoBadgeTemplateSettings const &value) | InfoBadgeProperties |
TemplateSettings() | InfoBadgeProperties |
TemplateSettingsProperty() | InfoBadgeProperties | [inline, static]
Value(int value) | InfoBadgeProperties |
Value() | InfoBadgeProperties |
ValueProperty() | InfoBadgeProperties | [inline, static]
~InfoBadge() | InfoBadge | [inline]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterExpressionAnimationSourcesPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterExpressionAnimationSourcesPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Numerics;
00007 using Windows.UI;
00008 using Microsoft.UI.Composition;
00009 using Windows.UI.Core;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Hosting;
00013 using Microsoft.UI.Xaml.Navigation;
00014 using Microsoft.UI.Private.Controls;
00015 using Microsoft.UI.Dispatching;
00016
00017 namespace MUXControlsTestApp
00018 {
00019     public sealed partial class ScrollPresenterExpressionAnimationSourcesPage : TestPage
00020     {
00021         private bool isLoggingMessages = false;
00022         private int layoutCompletedCount = 0;
00023         private List<string> fullLogs = new List<string>();
00024         private Visual hScrollBarVisual;
00025         private Visual hScrollIndicatorVisual;
00026         private SpriteVisual hScrollIndicatorSpriteVisual;
00027         private ExpressionAnimation hIndicatorWidthExpression;
00028         private ExpressionAnimation hIndicatorOffsetExpression;
00029
00030         private Visual vScrollBarVisual;
00031         private Visual vScrollIndicatorVisual;
00032         private SpriteVisual vScrollIndicatorSpriteVisual;
00033         private ExpressionAnimation vIndicatorHeightExpression;
00034         private ExpressionAnimation vIndicatorOffsetExpression;
00035
00036         public ScrollPresenterExpressionAnimationSourcesPage()
00037         {
00038             InitializeComponent();
00039             Loaded += ScrollPresenterExpressionAnimationSourcesPage_Loaded;
00040             scrollPresenter.SizeChanged += ScrollPresenter_SizeChanged;
00041
00042             ChkLogScrollPresenterMessages_Checked(null, null);
00043         }
00044
00045         ~ScrollPresenterExpressionAnimationSourcesPage()
00046         {
00047         }
00048
00049         protected override void OnNavigatedFrom(NavigationEventArgs e)
00050         {
00051             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00052             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00053
00054             base.OnNavigatedFrom(e);
00055         }
00056
00057         private void SetLayoutCompleted()
00058         {
00059             this.fullLogs.Add("SetLayoutCompleted layoutCompletedCount=" + layoutCompletedCount);
00060             layoutCompletedCount--;
00061
00062             if (layoutCompletedCount == 0)
00063             {
00064                 txtLayoutCompleted.Text = "Yes";
00065             }
00066         }
00067
00068         private void ScrollPresenterExpressionAnimationSourcesPage_Loaded(object sender, RoutedEventArgs e)
00069         {
00070             this.fullLogs.Add("ScrollPresenterExpressionAnimationSourcesPage_Loaded");
00071             var ignored = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, SetupScrollbars);
00072         }
00073
00074         private void ScrollPresenter_SizeChanged(object sender, SizeChangedEventArgs e)
00075         {
00076             this.fullLogs.Add("ScrollPresenter_SizeChanged PreviousSize=" + e.PreviousSize + ", NewSize=" + e.NewSize);
00077             var ignored = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, UpdateScrollbars);
00078
00079             // One additional SetLayoutCompleted call is required to declare the layout final
00080             txtLayoutCompleted.Text = "No";
00081             layoutCompletedCount++;
00082             ignored = this.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, SetLayoutCompleted);
00083         }
00084
00085         private void SetupScrollbars()
00086         {
00087             this.fullLogs.Add("SetupScrollbars");
00088
00089             hScrollIndicatorVisual = ElementCompositionPreview.GetElementVisual(hScrollIndicator);
00090             vScrollIndicatorVisual = ElementCompositionPreview.GetElementVisual(vScrollIndicator);
00091             hScrollBarVisual = ElementCompositionPreview.GetElementVisual(hScrollBar);
00092             vScrollBarVisual = ElementCompositionPreview.GetElementVisual(vScrollBar);
00093
00094             hScrollIndicatorSpriteVisual = hScrollIndicatorVisual.Compositor.CreateSpriteVisual();
00095             vScrollIndicatorSpriteVisual = vScrollIndicatorVisual.Compositor.CreateSpriteVisual();
00096
00097             CompositionColorBrush brush = hScrollIndicatorVisual.Compositor.CreateColorBrush(Microsoft.UI.Colors.Red);
00098             hScrollIndicatorSpriteVisual.Brush = brush;
00099             vScrollIndicatorSpriteVisual.Brush = brush;
00100
00101             ElementCompositionPreview.SetElementChildVisual(hScrollIndicator, hScrollIndicatorSpriteVisual);
00102             ElementCompositionPreview.SetElementChildVisual(vScrollIndicator, vScrollIndicatorSpriteVisual);
00103
00104             UpdateScrollbars();
00105
00106             hIndicatorWidthExpression = hScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
00107                 "Vector2(Max(20.0f, Min(hScrollBarVisual.Size.X , seas.Viewport.X * hScrollBarVisual.Size.X / Max(0.0001f, seas.Extent.X * seas.ZoomFactor))), 30.0f)");
00108             vIndicatorHeightExpression = vScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
00109                 "Vector2(30.0f, Max(20.0f, Min(vScrollBarVisual.Size.Y, seas.Viewport.Y * vScrollBarVisual.Size.Y / Max(0.0001f, seas.Extent.Y * seas.ZoomFactor))))");
00110             hIndicatorWidthExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
00111             vIndicatorHeightExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
00112             hIndicatorWidthExpression.SetReferenceParameter("hScrollBarVisual", hScrollBarVisual);
00113             vIndicatorHeightExpression.SetReferenceParameter("vScrollBarVisual", vScrollBarVisual);
00114             hIndicatorOffsetExpression = hScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
00115                 "Vector3(" +
00116                     "Max(0.0f, Min(hScrollBarVisual.Size.X - hScrollIndicatorSpriteVisual.Size.X, " +
00117                         "seas.Offset.X * (hScrollBarVisual.Size.X - hScrollIndicatorSpriteVisual.Size.X) / Max(1.0f, (seas.Extent.X * seas.ZoomFactor - seas.Viewport.X))))," +
00118                     "0.0f," +
00119                     "0.0f)");
00120             vIndicatorOffsetExpression = vScrollIndicatorVisual.Compositor.CreateExpressionAnimation(
00121                 "Vector3(" +
00122                     "0.0f," +
00123                     "Max(0.0f, Min(vScrollBarVisual.Size.Y - vScrollIndicatorSpriteVisual.Size.Y, " +
00124                         "seas.Offset.Y * (vScrollBarVisual.Size.Y - vScrollIndicatorSpriteVisual.Size.Y) / Max(1.0f, (seas.Extent.Y * seas.ZoomFactor - seas.Viewport.Y))))," +
00125                     "0.0f)");
00126             hIndicatorOffsetExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
00127             vIndicatorOffsetExpression.SetReferenceParameter("seas", scrollPresenter.ExpressionAnimationSources);
00128             hIndicatorOffsetExpression.SetReferenceParameter("hScrollBarVisual", hScrollBarVisual);
00129             vIndicatorOffsetExpression.SetReferenceParameter("vScrollBarVisual", vScrollBarVisual);
00130             hIndicatorOffsetExpression.SetReferenceParameter("hScrollIndicatorSpriteVisual", hScrollIndicatorSpriteVisual);
00131             vIndicatorOffsetExpression.SetReferenceParameter("vScrollIndicatorSpriteVisual", vScrollIndicatorSpriteVisual);
00132
00133             hScrollIndicatorSpriteVisual.StartAnimation("Size", hIndicatorWidthExpression);
00134             vScrollIndicatorSpriteVisual.StartAnimation("Size", vIndicatorHeightExpression);
00135             hScrollIndicatorVisual.StartAnimation("Offset", hIndicatorOffsetExpression);
00136             vScrollIndicatorVisual.StartAnimation("Offset", vIndicatorOffsetExpression);
00137         }
00138
00139         private void UpdateScrollbars()
00140         {
00141             this.fullLogs.Add("UpdateScrollbars");
00142
00143             if (hScrollIndicatorSpriteVisual == null || hScrollIndicatorVisual == null || hScrollBarVisual == null ||
00144                 vScrollIndicatorSpriteVisual == null || vScrollIndicatorVisual == null || vScrollBarVisual == null)
00145             {
00146                 return;
00147             }
00148
00149             Vector2 viewport;
00150             CompositionGetValueStatus cgvs = scrollPresenter.ExpressionAnimationSources.Properties.TryGetVector2("Viewport", out viewport);
00151             txtViewport.Text = cgvs.ToString() + ", " + viewport.ToString();
00152
00153             Vector2 extent;
00154             cgvs = scrollPresenter.ExpressionAnimationSources.Properties.TryGetVector2("Extent", out extent);
00155             txtExtent.Text = cgvs.ToString() + ", " + extent.ToString();
00156
00157             txtBarVisualWidth.Text = hScrollBarVisual.Size.X.ToString();
00158             txtIndicatorWidth.Text = (viewport.X * hScrollBarVisual.Size.X / Math.Max(1.0f, extent.X)).ToString();
00159             txtBarVisualHeight.Text = vScrollBarVisual.Size.Y.ToString();
00160             txtIndicatorHeight.Text = (viewport.Y * vScrollBarVisual.Size.Y / Math.Max(1.0f, extent.Y)).ToString();
00161         }
00162
00163         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00164         {
00165             if (!isLoggingMessages)
00166             {
00167                 //Turn on info and verbose logging for the ScrollPresenter type:
00168                 MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00169
00170                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00171
00172                 isLoggingMessages = true;
00173             }
00174         }
00175
00176         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00177         {
00178             if (isLoggingMessages)
00179             {
00180                 //Turn off info and verbose logging for the ScrollPresenter type:
00181                 MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00182
00183                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00184
00185                 isLoggingMessages = false;
00186             }
00187         }
00188
00189         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00190         {
00191             // Cut off the terminating new line.
00192             string msg = args.Message.Substring(0, args.Message.Length - 1);
00193             string senderName = string.Empty;
00194
00195             try
00196             {
00197                 FrameworkElement fe = sender as FrameworkElement;
00198
00199                 if (fe != null)
00200                 {
00201                     senderName = "s:" + fe.Name + ", ";
00202                 }
00203             }
00204             catch
00205             {
00206             }
00207
00208             if (args.IsVerboseLevel)
00209             {
00210                 this.fullLogs.Add("Verbose: " + senderName + "m:" + msg);
00211             }
00212             else
00213             {
00214                 this.fullLogs.Add("Info: " + senderName + "m:" + msg);
00215             }
00216         }
00217
00218         private void btnGetFullLog_Click(object sender, RoutedEventArgs e)
00219         {
00220             foreach (string log in this.fullLogs)
00221             {
00222                 this.cmbFullLog.Items.Add(log);
00223             }
00224         }
00225
00226         private void btnClearFullLog_Click(object sender, RoutedEventArgs e)
00227         {
00228             this.fullLogs.Clear();
00229             this.cmbFullLog.Items.Clear();
00230         }
00231     }
00232 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorChangedEventArgs.cpp Source File

  • File List
  • File Members
  • ColorPicker

ColorChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ColorChangedEventArgs.h"
00007
00008 winrt::Color ColorChangedEventArgs::OldColor()
00009 {
00010     return m_oldColor;
00011 }
00012
00013 winrt::Color ColorChangedEventArgs::NewColor()
00014 {
00015     return m_newColor;
00016 }
00017
00018 void ColorChangedEventArgs::OldColor(winrt::Color const& value)
00019 {
00020     m_oldColor = value;
00021 }
00022
00023 void ColorChangedEventArgs::NewColor(winrt::Color const& value)
00024 {
00025     m_newColor = value;
00026 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectionModelTests::TreeWalkNodeInfo Member List

This is the complete list of members for SelectionModelTests::TreeWalkNodeInfo, including all inherited members.
Current | SelectionModelTests::TreeWalkNodeInfo
Path | SelectionModelTests::TreeWalkNodeInfo
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewerAdapterTests Member List

This is the complete list of members for ScrollViewerAdapterTests, including all inherited members.
ClassInitialize(TestContext testContext) | ScrollViewerAdapterTests | [inline, static]
DeconstructionHandlesCorrectlyTest() | ScrollViewerAdapterTests | [inline]
TestCleanup() | ScrollViewerAdapterTests | [inline]
Generated on Sun Dec 1 2024 20:53:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerLayoutPage Member List

This is the complete list of members for ItemContainerLayoutPage, including all inherited members.
ItemContainerLayoutPage() | ItemContainerLayoutPage | [inline]
ItemContainerLayoutPage_Loaded(object sender, RoutedEventArgs e) | ItemContainerLayoutPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ToggleSplitButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

ToggleSplitButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ToggleSplitButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ToggleSplitButton)
00012 }
00013
00014 #include "ToggleSplitButton.g.cpp"
00015
00016 GlobalDependencyProperty ToggleSplitButtonProperties::s_IsCheckedProperty{ nullptr };
00017
00018 ToggleSplitButtonProperties::ToggleSplitButtonProperties()
00019     : m_isCheckedChangedEventSource{static_cast<ToggleSplitButton*>(this)}
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void ToggleSplitButtonProperties::EnsureProperties()
00025 {
00026     SplitButton::EnsureProperties();
00027     if (!s_IsCheckedProperty)
00028     {
00029         s_IsCheckedProperty =
00030             InitializeDependencyProperty(
00031                 L"IsChecked",
00032                 winrt::name_of<bool>(),
00033                 winrt::name_of<winrt::ToggleSplitButton>(),
00034                 false /* isAttached */,
00035                 ValueHelper<bool>::BoxedDefaultValue(),
00036                 winrt::PropertyChangedCallback(&OnIsCheckedPropertyChanged));
00037     }
00038 }
00039
00040 void ToggleSplitButtonProperties::ClearProperties()
00041 {
00042     s_IsCheckedProperty = nullptr;
00043     SplitButton::ClearProperties();
00044 }
00045
00046 void ToggleSplitButtonProperties::OnIsCheckedPropertyChanged(
00047     winrt::DependencyObject const& sender,
00048     winrt::DependencyPropertyChangedEventArgs const& args)
00049 {
00050     auto owner = sender.as<winrt::ToggleSplitButton>();
00051     winrt::get_self<ToggleSplitButton>(owner)->OnPropertyChanged(args);
00052 }
00053
00054 void ToggleSplitButtonProperties::IsChecked(bool value)
00055 {
00056     [[gsl::suppress(con)]]
00057     {
00058     static_cast<ToggleSplitButton*>(this)->SetValue(s_IsCheckedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00059     }
00060 }
00061
00062 bool ToggleSplitButtonProperties::IsChecked()
00063 {
00064     return ValueHelper<bool>::CastOrUnbox(static_cast<ToggleSplitButton*>(this)->GetValue(s_IsCheckedProperty));
00065 }
00066
00067 winrt::event_token ToggleSplitButtonProperties::IsCheckedChanged(winrt::TypedEventHandler<winrt::ToggleSplitButton, winrt::ToggleSplitButtonIsCheckedChangedEventArgs> const& value)
00068 {
00069     return m_isCheckedChangedEventSource.add(value);
00070 }
00071
00072 void ToggleSplitButtonProperties::IsCheckedChanged(winrt::event_token const& token)
00073 {
00074     m_isCheckedChangedEventSource.remove(token);
00075 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/BuildTreeScheduler.cpp Source File

  • File List
  • File Members
  • Repeater

BuildTreeScheduler.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "QPCTimer.h"
00007 #include "BuildTreeScheduler.h"
00008 #include "RepeaterTestHooks.h"
00009 #include "MuxcTraceLogging.h"
00010
00011 double BuildTreeScheduler::m_budgetInMs = 40.0;
00012 thread_local QPCTimer BuildTreeScheduler::m_timer{};
00013 thread_local std::vector<WorkInfo> BuildTreeScheduler::m_pendingWork{};
00014 thread_local winrt::event_token BuildTreeScheduler::m_renderingToken{};
00015
00016 void BuildTreeScheduler::RegisterWork(int priority, const std::function<void()>& workFunc)
00017 {
00018     MUX_ASSERT(priority >= 0);
00019     MUX_ASSERT(workFunc != nullptr);
00020
00021     QueueTick();
00022     m_pendingWork.push_back(WorkInfo(priority, workFunc));
00023 }
00024
00025 bool BuildTreeScheduler::ShouldYield()
00026 {
00027     return m_timer.DurationInMilliSeconds() > m_budgetInMs;
00028 }
00029
00030 void BuildTreeScheduler::OnRendering(const winrt::IInspectable&, const winrt::IInspectable&)
00031 {
00032     const bool budgetReached = ShouldYield();
00033     if (!budgetReached && m_pendingWork.size() > 0)
00034     {
00035         // Sort in descending order of priority and work from the end of the list to avoid moving around during erase.
00036         std::sort(m_pendingWork.begin(), m_pendingWork.end(), [](const auto& lhs, const auto& rhs) { return lhs.Priority() > rhs.Priority(); });
00037         int currentIndex = static_cast<int>(m_pendingWork.size()) - 1;
00038
00039         do
00040         {
00041             m_pendingWork[currentIndex].InvokeWorkFunc();
00042             m_pendingWork.erase(m_pendingWork.begin() + currentIndex);
00043         } while (--currentIndex >= 0 && !ShouldYield());
00044     }
00045
00046     if (m_pendingWork.empty())
00047     {
00048         TraceLoggingProviderWrite(
00049             XamlTelemetryLogging, "BuildTreeScheduler_OutOfWork",
00050             TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00051
00052         // No more pending work, unhook from rendering event since being hooked up will case wux to try to
00053         // call the event at 60 frames per second
00054         winrt::Microsoft::UI::Xaml::Media::CompositionTarget::CompositionTarget::Rendering(m_renderingToken);
00055         m_renderingToken.value = 0;
00056         RepeaterTestHooks::NotifyBuildTreeCompleted();
00057     }
00058
00059     // Reset the timer so it snaps the time just before rendering
00060     m_timer.Reset();
00061 }
00062
00063 void  BuildTreeScheduler::QueueTick()
00064 {
00065     if (m_renderingToken.value == 0)
00066     {
00067         m_renderingToken = winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering(OnRendering);
00068     }
00069 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooks.idl Source File

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooks.idl

Go to the documentation of this file.
00001 namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 runtimeclass MUXControlsTestHooksLoggingMessageEventArgs
00007 {
00008     String Message { get; };
00009     Boolean IsVerboseLevel { get; };
00010 }
00011
00012 [MUX_INTERNAL]
00013 [webhosthidden]
00014 [default_interface]
00015 runtimeclass MUXControlsTestHooks
00016 {
00017     static void SetOutputDebugStringLevelForType(String type, Boolean isLoggingInfoLevel, Boolean isLoggingVerboseLevel);
00018     static void SetLoggingLevelForType(String type, Boolean isLoggingInfoLevel, Boolean isLoggingVerboseLevel);
00019     static void SetLoggingLevelForInstance(Object sender, Boolean isLoggingInfoLevel, Boolean isLoggingVerboseLevel);
00020     static event Windows.Foundation.TypedEventHandler<Object, MUXControlsTestHooksLoggingMessageEventArgs> LoggingMessage;
00021 }
00022
00023 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealScenarioColors Member List

This is the complete list of members for RevealScenarioColors, including all inherited members.
ColorList_SelectionChanged(object sender, SelectionChangedEventArgs e) | RevealScenarioColors | [inline, private]
ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) | RevealScenarioColors | [inline, private]
darkBorderColor | RevealScenarioColors | [private]
DarkBorderColor | RevealScenarioColors |
DarkHoverPlateColor | RevealScenarioColors |
darkHoverPlateColor | RevealScenarioColors | [private]
lightBorderColor | RevealScenarioColors | [private]
LightBorderColor | RevealScenarioColors |
LightHoverPlateColor | RevealScenarioColors |
lightHoverPlateColor | RevealScenarioColors | [private]
RevealScenarioColors() | RevealScenarioColors | [inline]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeControlClearPage Member List

This is the complete list of members for SwipeControlClearPage, including all inherited members.
AddSwipeItemsButton_Click(object sender, RoutedEventArgs e) | SwipeControlClearPage | [inline]
ClearSwipeItemsButton_Click(object sender, RoutedEventArgs e) | SwipeControlClearPage | [inline]
items | SwipeControlClearPage | [private]
SwipeControlClearPage() | SwipeControlClearPage | [inline]
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TransitionManager.h Source File

  • File List
  • File Members
  • Repeater

TransitionManager.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class ItemsRepeater;
00007
00008 // Internal component that contains all
00009 // the animation related logic for ItemsRepeater.
00010 class TransitionManager final
00011 {
00012 public:
00013     TransitionManager(ItemsRepeater* owner);
00014
00015     void OnTransitionProviderChanged(const winrt::ItemCollectionTransitionProvider& newTransitionProvider);
00016     void OnLayoutChanging();
00017     void OnItemsSourceChanged(const winrt::IInspectable& source, const winrt::NotifyCollectionChangedEventArgs& args);
00018     void OnElementPrepared(const winrt::UIElement& element);
00019     bool ClearElement(const winrt::UIElement& element);
00020     void OnElementBoundsChanged(const winrt::UIElement& element, winrt::Rect oldBounds, winrt::Rect newBounds);
00021     void OnOwnerArranged();
00022
00023 private:
00024     void OnTransitionProviderTransitionCompleted(const winrt::ItemCollectionTransitionProvider& sender, const winrt::ItemCollectionTransitionCompletedEventArgs& args);
00025
00026     ItemsRepeater* m_owner;
00027     tracker_ref<winrt::ItemCollectionTransitionProvider> m_transitionProvider;
00028
00029     // We infer the animation context
00030     // from heuristics like whether or not
00031     // we observed a collection change or a
00032     // layout transition during the current
00033     // tick.
00034     bool m_hasRecordedAdds{};
00035     bool m_hasRecordedRemoves{};
00036     bool m_hasRecordedResets{};
00037     bool m_hasRecordedLayoutTransitions{};
00038
00039     // Event tokens
00040     winrt::event_token m_transitionCompleted{};
00041 };
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIconSource.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedIconSource.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedIconSource.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(AnimatedIconSource)
00012 }
00013
00014 #include "AnimatedIconSource.g.cpp"
00015
00016 GlobalDependencyProperty AnimatedIconSourceProperties::s_FallbackIconSourceProperty{ nullptr };
00017 GlobalDependencyProperty AnimatedIconSourceProperties::s_MirroredWhenRightToLeftProperty{ nullptr };
00018 GlobalDependencyProperty AnimatedIconSourceProperties::s_SourceProperty{ nullptr };
00019
00020 AnimatedIconSourceProperties::AnimatedIconSourceProperties()
00021 {
00022     EnsureProperties();
00023 }
00024
00025 void AnimatedIconSourceProperties::EnsureProperties()
00026 {
00027     if (!s_FallbackIconSourceProperty)
00028     {
00029         s_FallbackIconSourceProperty =
00030             InitializeDependencyProperty(
00031                 L"FallbackIconSource",
00032                 winrt::name_of<winrt::IconSource>(),
00033                 winrt::name_of<winrt::AnimatedIconSource>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
00036                 nullptr);
00037     }
00038     if (!s_MirroredWhenRightToLeftProperty)
00039     {
00040         s_MirroredWhenRightToLeftProperty =
00041             InitializeDependencyProperty(
00042                 L"MirroredWhenRightToLeft",
00043                 winrt::name_of<bool>(),
00044                 winrt::name_of<winrt::AnimatedIconSource>(),
00045                 false /* isAttached */,
00046                 ValueHelper<bool>::BoxedDefaultValue(),
00047                 nullptr);
00048     }
00049     if (!s_SourceProperty)
00050     {
00051         s_SourceProperty =
00052             InitializeDependencyProperty(
00053                 L"Source",
00054                 winrt::name_of<winrt::IAnimatedVisualSource2>(),
00055                 winrt::name_of<winrt::AnimatedIconSource>(),
00056                 false /* isAttached */,
00057                 ValueHelper<winrt::IAnimatedVisualSource2>::BoxedDefaultValue(),
00058                 nullptr);
00059     }
00060 }
00061
00062 void AnimatedIconSourceProperties::ClearProperties()
00063 {
00064     s_FallbackIconSourceProperty = nullptr;
00065     s_MirroredWhenRightToLeftProperty = nullptr;
00066     s_SourceProperty = nullptr;
00067 }
00068
00069 void AnimatedIconSourceProperties::FallbackIconSource(winrt::IconSource const& value)
00070 {
00071     [[gsl::suppress(con)]]
00072     {
00073     static_cast<AnimatedIconSource*>(this)->SetValue(s_FallbackIconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
00074     }
00075 }
00076
00077 winrt::IconSource AnimatedIconSourceProperties::FallbackIconSource()
00078 {
00079     return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<AnimatedIconSource*>(this)->GetValue(s_FallbackIconSourceProperty));
00080 }
00081
00082 void AnimatedIconSourceProperties::MirroredWhenRightToLeft(bool value)
00083 {
00084     [[gsl::suppress(con)]]
00085     {
00086     static_cast<AnimatedIconSource*>(this)->SetValue(s_MirroredWhenRightToLeftProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00087     }
00088 }
00089
00090 bool AnimatedIconSourceProperties::MirroredWhenRightToLeft()
00091 {
00092     return ValueHelper<bool>::CastOrUnbox(static_cast<AnimatedIconSource*>(this)->GetValue(s_MirroredWhenRightToLeftProperty));
00093 }
00094
00095 void AnimatedIconSourceProperties::Source(winrt::IAnimatedVisualSource2 const& value)
00096 {
00097     [[gsl::suppress(con)]]
00098     {
00099     static_cast<AnimatedIconSource*>(this)->SetValue(s_SourceProperty, ValueHelper<winrt::IAnimatedVisualSource2>::BoxValueIfNecessary(value));
00100     }
00101 }
00102
00103 winrt::IAnimatedVisualSource2 AnimatedIconSourceProperties::Source()
00104 {
00105     return ValueHelper<winrt::IAnimatedVisualSource2>::CastOrUnbox(static_cast<AnimatedIconSource*>(this)->GetValue(s_SourceProperty));
00106 }
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/AnimatedVisuals/ProgressRingIndeterminate.cpp Source File

  • File List
  • File Members
  • ProgressRing
  • AnimatedVisuals

ProgressRingIndeterminate.cpp

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.0.0-build.16+g667576ee09
00007 //
00008 //       LottieGen source:
00009 //           http://aka.ms/Lottie
00010 //
00011 //     Changes to this file may cause incorrect behavior and will be lost if
00012 //     the code is regenerated.
00013 // </auto-generated>
00014 //------------------------------------------------------------------------------
00015 // ____________________________________
00016 // |       Object stats       | Count |
00017 // |__________________________|_______|
00018 // | All CompositionObjects   |    59 |
00019 // |--------------------------+-------|
00020 // | Animators                |    13 |
00021 // | Animated brushes         |     3 |
00022 // | Animated gradient stops  |     - |
00023 // | ExpressionAnimations     |     4 |
00024 // | PathKeyFrameAnimations   |     - |
00025 // |--------------------------+-------|
00026 // | ContainerVisuals         |     1 |
00027 // | ShapeVisuals             |     1 |
00028 // |--------------------------+-------|
00029 // | ContainerShapes          |     1 |
00030 // | CompositionSpriteShapes  |     3 |
00031 // |--------------------------+-------|
00032 // | Brushes                  |     3 |
00033 // | Gradient stops           |     - |
00034 // | CompositionVisualSurface |     - |
00035 // ------------------------------------
00036 #include "pch.h"
00037 #include "ProgressRingIndeterminate.h"
00038 #include "WindowsNumerics.h"
00039
00040 using namespace winrt::Windows::Foundation;
00041 using namespace winrt::Windows::Foundation::Numerics;
00042 using namespace winrt::Windows::Graphics;
00043 using namespace winrt::Windows::UI;
00044 using namespace winrt::Microsoft::UI::Composition;
00045
00046 namespace
00047 {
00048     class AnimatedVisual
00049         : public winrt::implements<AnimatedVisual, winrt::IAnimatedVisual, winrt::IClosable>
00050     {
00051         static constexpr int64_t c_durationTicks{ 20000000L };
00052         Compositor const _c{ nullptr };
00053         ExpressionAnimation const _reusableExpressionAnimation{ nullptr };
00054         CompositionPropertySet const _themeProperties{ nullptr };
00055         CompositionColorBrush _themeColor_Foreground_0{ nullptr };
00056         CompositionColorBrush _themeColor_Foreground_1{ nullptr };
00057         ContainerVisual _root{ nullptr };
00058         CubicBezierEasingFunction _cubicBezierEasingFunction_0{ nullptr };
00059         ExpressionAnimation _rootProgress{ nullptr };
00060         StepEasingFunction _holdThenStepEasingFunction{ nullptr };
00061
00062         static void StartProgressBoundAnimation(
00063             CompositionObject target,
00064             winrt::hstring animatedPropertyName,
00065             CompositionAnimation animation,
00066             ExpressionAnimation controllerProgressExpression)
00067         {
00068             target.StartAnimation(animatedPropertyName, animation);
00069             const auto controller = target.TryGetAnimationController(animatedPropertyName);
00070             controller.Pause();
00071             controller.StartAnimation(L"Progress", controllerProgressExpression);
00072         }
00073
00074         void BindProperty(
00075             CompositionObject target,
00076             winrt::hstring animatedPropertyName,
00077             winrt::hstring expression,
00078             winrt::hstring referenceParameterName,
00079             CompositionObject referencedObject)
00080         {
00081             _reusableExpressionAnimation.ClearAllParameters();
00082             _reusableExpressionAnimation.Expression(expression);
00083             _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00084             target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00085         }
00086
00087         void BindProperty2(
00088             CompositionObject target,
00089             winrt::hstring animatedPropertyName,
00090             winrt::hstring expression,
00091             winrt::hstring referenceParameterName0,
00092             CompositionObject referencedObject0,
00093             winrt::hstring referenceParameterName1,
00094             CompositionObject referencedObject1)
00095         {
00096             _reusableExpressionAnimation.ClearAllParameters();
00097             _reusableExpressionAnimation.Expression(expression);
00098             _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName0, referencedObject0);
00099             _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName1, referencedObject1);
00100             target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00101         }
00102
00103         ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00104         {
00105             const auto result = _c.CreateScalarKeyFrameAnimation();
00106             result.Duration(TimeSpan{ c_durationTicks });
00107             result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00108             return result;
00109         }
00110
00111         CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, float3x2 transformMatrix)
00112         {
00113             const auto result = _c.CreateSpriteShape(geometry);
00114             result.TransformMatrix(transformMatrix);
00115             return result;
00116         }
00117
00118         // - Layer aggregator
00119         // Scale:5,5, Offset:<40, 40>
00120         // Color bound to theme property value: Background
00121         CompositionColorBrush ThemeColor_Background()
00122         {
00123             const auto result = _c.CreateColorBrush();
00124             BindProperty(result, L"Color", L"ColorRGB(_theme.Background.W*1,_theme.Background.X,_theme.Background.Y,_theme.Background.Z)", L"_theme", _themeProperties);
00125             return result;
00126         }
00127
00128         // - - Layer aggregator
00129         // -  Scale:5,5, Offset:<40, 40>
00130         // ShapeGroup: Ellipse B
00131         // Color bound to theme property value: Foreground
00132         CompositionColorBrush ThemeColor_Foreground_0()
00133         {
00134             const auto result = _themeColor_Foreground_0 = _c.CreateColorBrush();
00135             const auto propertySet = result.Properties();
00136             propertySet.InsertScalar(L"Opacity0", 0.0F);
00137             BindProperty2(result, L"Color", L"ColorRGB(_theme.Foreground.W*my.Opacity0,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties, L"my", propertySet);
00138             StartProgressBoundAnimation(propertySet, L"Opacity0", Opacity0ScalarAnimation_0_to_1(), _rootProgress);
00139             return result;
00140         }
00141
00142         // - - Layer aggregator
00143         // -  Scale:5,5, Offset:<40, 40>
00144         // ShapeGroup: Ellipse B
00145         // Color bound to theme property value: Foreground
00146         CompositionColorBrush ThemeColor_Foreground_1()
00147         {
00148             const auto result = _themeColor_Foreground_1 = _c.CreateColorBrush();
00149             const auto propertySet = result.Properties();
00150             propertySet.InsertScalar(L"Opacity0", 1.0F);
00151             BindProperty2(result, L"Color", L"ColorRGB(_theme.Foreground.W*my.Opacity0,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties, L"my", propertySet);
00152             StartProgressBoundAnimation(propertySet, L"Opacity0", Opacity0ScalarAnimation_1_to_0(), _rootProgress);
00153             return result;
00154         }
00155
00156         // Layer aggregator
00157         // Transforms for Radial
00158         CompositionContainerShape ContainerShape()
00159         {
00160             const auto result = _c.CreateContainerShape();
00161             // Offset:<40, 40>, Scale:<5, 5>
00162             result.TransformMatrix({ 5.0F, 0.0F, 0.0F, 5.0F, 40.0F, 40.0F });
00163             const auto shapes = result.Shapes();
00164             // ShapeGroup: Ellipse B
00165             shapes.Append(SpriteShape_1());
00166             // ShapeGroup: Ellipse B
00167             shapes.Append(SpriteShape_2());
00168             StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_900(), _rootProgress);
00169             return result;
00170         }
00171
00172         // - Layer aggregator
00173         // Scale:5,5, Offset:<40, 40>
00174         // Ellipse Path.EllipseGeometry
00175         CompositionEllipseGeometry Ellipse_7_0()
00176         {
00177             const auto result = _c.CreateEllipseGeometry();
00178             result.Radius({ 7.0F, 7.0F });
00179             return result;
00180         }
00181
00182         // - - Layer aggregator
00183         // -  Scale:5,5, Offset:<40, 40>
00184         // ShapeGroup: Ellipse B
00185         // Ellipse Path.EllipseGeometry
00186         CompositionEllipseGeometry Ellipse_7_1()
00187         {
00188             const auto result = _c.CreateEllipseGeometry();
00189             result.TrimEnd(0.5F);
00190             result.Radius({ 7.0F, 7.0F });
00191             StartProgressBoundAnimation(result, L"TrimStart", TrimStartScalarAnimation_0_to_0p5(), RootProgress());
00192             return result;
00193         }
00194
00195         // - - Layer aggregator
00196         // -  Scale:5,5, Offset:<40, 40>
00197         // ShapeGroup: Ellipse B
00198         // Ellipse Path.EllipseGeometry
00199         CompositionEllipseGeometry Ellipse_7_2()
00200         {
00201             const auto result = _c.CreateEllipseGeometry();
00202             result.Radius({ 7.0F, 7.0F });
00203             StartProgressBoundAnimation(result, L"TrimEnd", TrimEndScalarAnimation_0_to_0p5(), _rootProgress);
00204             return result;
00205         }
00206
00207         // Layer aggregator
00208         // Ellipse Path
00209         CompositionSpriteShape SpriteShape_0()
00210         {
00211             // Offset:<40, 40>, Scale:<5, 5>
00212             const auto result = CreateSpriteShape(Ellipse_7_0(), { 5.0F, 0.0F, 0.0F, 5.0F, 40.0F, 40.0F });
00213             result.StrokeBrush(ThemeColor_Background());
00214             result.StrokeDashCap(CompositionStrokeCap::Round);
00215             result.StrokeThickness(1.5F);
00216             return result;
00217         }
00218
00219         // - Layer aggregator
00220         // Scale:5,5, Offset:<40, 40>
00221         // Ellipse Path
00222         CompositionSpriteShape SpriteShape_1()
00223         {
00224             const auto result = _c.CreateSpriteShape(Ellipse_7_1());
00225             result.StrokeBrush(ThemeColor_Foreground_0());
00226             result.StrokeDashCap(CompositionStrokeCap::Round);
00227             result.StrokeStartCap(CompositionStrokeCap::Round);
00228             result.StrokeEndCap(CompositionStrokeCap::Round);
00229             result.StrokeThickness(1.5F);
00230             return result;
00231         }
00232
00233         // - Layer aggregator
00234         // Scale:5,5, Offset:<40, 40>
00235         // Ellipse Path
00236         CompositionSpriteShape SpriteShape_2()
00237         {
00238             const auto result = _c.CreateSpriteShape(Ellipse_7_2());
00239             result.StrokeBrush(ThemeColor_Foreground_1());
00240             result.StrokeDashCap(CompositionStrokeCap::Round);
00241             result.StrokeStartCap(CompositionStrokeCap::Round);
00242             result.StrokeEndCap(CompositionStrokeCap::Round);
00243             result.StrokeThickness(1.5F);
00244             return result;
00245         }
00246
00247         // The root of the composition.
00248         ContainerVisual Root()
00249         {
00250             const auto result = _root = _c.CreateContainerVisual();
00251             const auto propertySet = result.Properties();
00252             propertySet.InsertScalar(L"Progress", 0.0F);
00253             // Layer aggregator
00254             result.Children().InsertAtTop(ShapeVisual_0());
00255             return result;
00256         }
00257
00258         CubicBezierEasingFunction CubicBezierEasingFunction_0()
00259         {
00260             return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.833000004F, 0.833000004F });
00261         }
00262
00263         ExpressionAnimation RootProgress()
00264         {
00265             const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
00266             result.SetReferenceParameter(L"_", _root);
00267             return result;
00268         }
00269
00270         // Opacity0
00271         ScalarKeyFrameAnimation Opacity0ScalarAnimation_0_to_1()
00272         {
00273             const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _holdThenStepEasingFunction);
00274             result.InsertKeyFrame(0.5F, 1.0F, _holdThenStepEasingFunction);
00275             return result;
00276         }
00277
00278         // Opacity0
00279         ScalarKeyFrameAnimation Opacity0ScalarAnimation_1_to_0()
00280         {
00281             const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
00282             result.InsertKeyFrame(0.5F, 0.0F, _holdThenStepEasingFunction);
00283             return result;
00284         }
00285
00286         // - Layer aggregator
00287         // Scale:5,5, Offset:<40, 40>
00288         // Rotation
00289         ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_900()
00290         {
00291             const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, _holdThenStepEasingFunction);
00292             result.InsertKeyFrame(0.5F, 450.0F, _cubicBezierEasingFunction_0);
00293             result.InsertKeyFrame(1.0F, 900.0F, _cubicBezierEasingFunction_0);
00294             return result;
00295         }
00296
00297         // - - - Layer aggregator
00298         // - -  Scale:5,5, Offset:<40, 40>
00299         // - ShapeGroup: Ellipse B
00300         // Ellipse Path.EllipseGeometry
00301         // TrimEnd
00302         ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p5()
00303         {
00304             const auto result = CreateScalarKeyFrameAnimation(0.0F, 9.99999975E-05F, _holdThenStepEasingFunction);
00305             result.InsertKeyFrame(0.5F, 0.5F, _cubicBezierEasingFunction_0);
00306             return result;
00307         }
00308
00309         // - - - Layer aggregator
00310         // - -  Scale:5,5, Offset:<40, 40>
00311         // - ShapeGroup: Ellipse B
00312         // Ellipse Path.EllipseGeometry
00313         // TrimStart
00314         ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_0p5()
00315         {
00316             const auto result = CreateScalarKeyFrameAnimation(0.0F, 0.0F, StepThenHoldEasingFunction());
00317             result.InsertKeyFrame(0.5F, 0.0F, HoldThenStepEasingFunction());
00318             result.InsertKeyFrame(1.0F, 0.5F, CubicBezierEasingFunction_0());
00319             return result;
00320         }
00321
00322         // Layer aggregator
00323         ShapeVisual ShapeVisual_0()
00324         {
00325             const auto result = _c.CreateShapeVisual();
00326             result.Size({ 80.0F, 80.0F });
00327             const auto shapes = result.Shapes();
00328             // Scale:5,5, Offset:<40, 40>
00329             shapes.Append(SpriteShape_0());
00330             // Scale:5,5, Offset:<40, 40>
00331             shapes.Append(ContainerShape());
00332             return result;
00333         }
00334
00335         StepEasingFunction HoldThenStepEasingFunction()
00336         {
00337             const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
00338             result.IsFinalStepSingleFrame(true);
00339             return result;
00340         }
00341
00342         // - - - - Layer aggregator
00343         // - - -  Scale:5,5, Offset:<40, 40>
00344         // - - ShapeGroup: Ellipse B
00345         // - Ellipse Path.EllipseGeometry
00346         // TrimStart
00347         StepEasingFunction StepThenHoldEasingFunction()
00348         {
00349             const auto result = _c.CreateStepEasingFunction();
00350             result.IsInitialStepSingleFrame(true);
00351             return result;
00352         }
00353
00354     public:
00355         AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties)
00356             : _c(compositor)
00357             , _themeProperties(themeProperties)
00358             , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
00359         {
00360             const auto _ = Root();
00361         }
00362
00363         void Close()
00364         {
00365             if (_root)
00366             {
00367                 _root.Close();
00368             }
00369         }
00370
00371         TimeSpan Duration() const
00372         {
00373             return { TimeSpan{ c_durationTicks } };
00374         }
00375
00376
00377         Visual RootVisual() const
00378         {
00379             return _root;
00380         }
00381
00382
00383         float2 Size() const
00384         {
00385             return { 80.0F, 80.0F };
00386         }
00387     };
00388 } // end namespace
00389
00390 float4 AnimatedVisuals::ProgressRingIndeterminate::ColorAsVector4(Color color)
00391 {
00392     return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
00393 }
00394
00395 winrt::CompositionPropertySet AnimatedVisuals::ProgressRingIndeterminate::EnsureThemeProperties(Compositor compositor)
00396 {
00397     if (_themeProperties == nullptr)
00398     {
00399         _themeProperties = compositor.CreatePropertySet();
00400         _themeProperties.InsertVector4(L"Background", ColorAsVector4((Color)_themeBackground));
00401         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00402     }
00403
00404     return _themeProperties;
00405 }
00406
00407 winrt::CompositionPropertySet AnimatedVisuals::ProgressRingIndeterminate::GetThemeProperties(Compositor compositor)
00408 {
00409     return EnsureThemeProperties(compositor);
00410 }
00411
00412 Color AnimatedVisuals::ProgressRingIndeterminate::Background()
00413 {
00414     return _themeBackground;
00415 }
00416
00417 void AnimatedVisuals::ProgressRingIndeterminate::Background(Color value)
00418 {
00419     _themeBackground = value;
00420     if (_themeProperties != nullptr)
00421     {
00422         _themeProperties.InsertVector4(L"Background", ColorAsVector4((Color)_themeBackground));
00423     }
00424 }
00425
00426 Color AnimatedVisuals::ProgressRingIndeterminate::Foreground()
00427 {
00428     return _themeForeground;
00429 }
00430
00431 void AnimatedVisuals::ProgressRingIndeterminate::Foreground(Color value)
00432 {
00433     _themeForeground = value;
00434     if (_themeProperties != nullptr)
00435     {
00436         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00437     }
00438 }
00439
00440 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedVisuals::ProgressRingIndeterminate::TryCreateAnimatedVisual(
00441     const Compositor& compositor,
00442     IInspectable& diagnostics)
00443 {
00444     const auto _ = EnsureThemeProperties(compositor);
00445     diagnostics = nullptr;
00446
00447     return winrt::make<AnimatedVisual>(compositor, _themeProperties);
00448 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/RefreshContainer.h Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer

RefreshContainer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RefreshContainer.g.h"
00007 #include "RefreshContainer.properties.h"
00008
00009 class RefreshContainer :
00010     public ReferenceTracker<RefreshContainer, winrt::implementation::RefreshContainerT, winrt::IRefreshContainerPrivate>,
00011     public RefreshContainerProperties
00012 {
00013 public:
00014     RefreshContainer();
00015     ~RefreshContainer();
00016
00017     // Property changed handler.
00018     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00019
00020     // IFrameworkElementOverrides
00021     void OnApplyTemplate();
00022
00023     void RequestRefresh();
00024
00025     winrt::IRefreshInfoProviderAdapter RefreshInfoProviderAdapter();
00026     void RefreshInfoProviderAdapter(winrt::IRefreshInfoProviderAdapter const& value);
00027
00028 private:
00029     // Property changed event handler.
00030     static void OnPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyPropertyChangedEventArgs& args);
00031
00032     winrt::IRefreshInfoProvider SearchTreeForIRefreshInfoProvider();
00033     winrt::IRefreshInfoProvider SearchTreeForIRefreshInfoProviderRecursiveHelper(winrt::DependencyObject root, int depth);
00034
00035     void OnRefreshVisualizerChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00036     void OnPullDirectionChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00037     void OnRefreshVisualizerChangedImpl();
00038     void OnPullDirectionChangedImpl();
00039
00040     void OnRefreshInfoProviderAdapterChanged();
00041     void OnRefreshInfoProviderAdapterChangedImpl();
00042
00043     void OnVisualizerSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00044     void OnVisualizerRefreshRequested(const winrt::IInspectable& sender, const winrt::RefreshRequestedEventArgs& args);
00045
00046     void RaiseRefreshRequested();
00047     void RefreshCompleted();
00048
00049     tracker_ref<winrt::Panel> m_root{ this };
00050     tracker_ref<winrt::Panel> m_refreshVisualizerPresenter{ this };
00051     tracker_ref<winrt::RefreshVisualizer> m_refreshVisualizer{ this };
00052     tracker_ref<winrt::Deferral> m_visualizerRefreshCompletedDeferral{ this };
00053     winrt::RefreshPullDirection m_refreshPullDirection{ winrt::RefreshPullDirection::TopToBottom };
00054     tracker_ref<winrt::IRefreshInfoProviderAdapter> m_refreshInfoProviderAdapter{ this };
00055     winrt::event_token m_refreshVisualizerSizeChangedToken{ 0 };
00056
00057     bool m_hasDefaultRefreshVisualizer{ false };
00058     bool m_hasDefaultRefreshInfoProviderAdapter{ false };
00059 };
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarAutomationPeer Member List

This is the complete list of members for MenuBarAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< MenuBarAutomationPeer > &&self) noexcept | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
final_release(std::unique_ptr< MenuBarAutomationPeer > &&self) | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | MenuBarAutomationPeer |
GetBase() | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
GetInner() | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
IsOnThread() | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
MenuBarAutomationPeer(winrt::MenuBar const &owner) | MenuBarAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IAnimatedVisualSource3 Member List

This is the complete list of members for IAnimatedVisualSource3, including all inherited members.
TryCreateAnimatedVisual(Microsoft.UI.Composition.Compositor compositor, out Object diagnostics, Boolean createAnimations) IAnimatedVisualSource3
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ZoomFactorChangeWithAdditionalVelocity.h Source File

  • File List
  • File Members
  • ScrollPresenter

ZoomFactorChangeWithAdditionalVelocity.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ViewChangeBase.h"
00007
00008 class ZoomFactorChangeWithAdditionalVelocity : public ViewChangeBase
00009 {
00010 public:
00011     ZoomFactorChangeWithAdditionalVelocity(
00012         float zoomFactorVelocity,
00013         float anticipatedZoomFactorChange,
00014         winrt::IReference<winrt::float2> centerPoint,
00015         winrt::IReference<float> inertiaDecayRate);
00016     ~ZoomFactorChangeWithAdditionalVelocity();
00017
00018     float ZoomFactorVelocity() const
00019     {
00020         return m_zoomFactorVelocity;
00021     }
00022
00023     void ZoomFactorVelocity(float zoomFactorVelocity);
00024
00025     float AnticipatedZoomFactorChange() const
00026     {
00027         return m_anticipatedZoomFactorChange;
00028     }
00029
00030     void AnticipatedZoomFactorChange(float anticipatedZoomFactorChange);
00031
00032     winrt::IReference<winrt::float2> CenterPoint() const
00033     {
00034         return m_centerPoint;
00035     }
00036
00037     winrt::IReference<float> InertiaDecayRate() const
00038     {
00039         return m_inertiaDecayRate;
00040     }
00041
00042 private:
00043     float m_zoomFactorVelocity{};
00044     float m_anticipatedZoomFactorChange{};
00045     winrt::IReference<winrt::float2> m_centerPoint{};
00046     winrt::IReference<float> m_inertiaDecayRate{};
00047 };
00048
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealColorPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealColorPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Private.Media;
00012 using MUXControlsTestApp.Utilities;
00013
00014 namespace MUXControlsTestApp
00015 {
00016     public sealed partial class RevealColorPage : TestPage
00017     {
00018         public RevealColorPage()
00019         {
00020             this.InitializeComponent();
00021             //_revealState.BorderLight.InnerConeColor = Microsoft.UI.Colors.Red;
00022         }
00023
00024         private RevealTestApi _revealState = new RevealTestApi();
00025
00026         public RevealTestApi RevealState
00027         {
00028             get { return _revealState; }
00029         }
00030
00031         public static IEnumerable<string> BackgroundBrushNames
00032         {
00033             get
00034             {
00035                 return new List<string>() {
00036                     "SystemControlBackgroundBaseLowRevealBackgroundBrush",
00037                     "SystemControlTransparentRevealBackgroundBrush",
00038                     "SystemControlHighlightAccentRevealBackgroundBrush",
00039                     "SystemControlHighlightAccent3RevealBackgroundBrush",
00040                     "SystemControlHighlightAccent2RevealBackgroundBrush",
00041                     "SystemControlHighlightListMediumRevealBackgroundBrush",
00042                     "SystemControlHighlightListLowRevealBackgroundBrush",
00043                     "SystemControlBackgroundBaseMediumLowRevealBaseLowBackgroundBrush",
00044                     "SystemControlHighlightBaseMediumLowRevealAccentBackgroundBrush",
00045                     "SystemControlHighlightListMediumRevealListLowBackgroundBrush",
00046                     "SystemControlHighlightAccent3RevealAccent2BackgroundBrush" };
00047             }
00048         }
00049
00050         public static IEnumerable<string> BorderBrushNames
00051         {
00052             get
00053             {
00054                 return new List<string>() {
00055                     "SystemControlBackgroundAccentRevealBorderBrush",
00056                     "SystemControlBackgroundBaseHighRevealBorderBrush",
00057                     "SystemControlBackgroundBaseLowRevealBorderBrush",
00058                     "SystemControlBackgroundBaseMediumRevealBorderBrush",
00059                     "SystemControlBackgroundBaseMediumHighRevealBorderBrush",
00060                     "SystemControlBackgroundBaseMediumLowRevealBorderBrush",
00061                     "SystemControlBackgroundChromeBlackHighRevealBorderBrush",
00062                     "SystemControlBackgroundChromeBlackMediumRevealChromeBorderBrush",
00063                     "SystemControlBackgroundChromeMediumRevealBorderBrush",
00064                     "SystemControlBackgroundChromeMediumLowRevealBorderBrush",
00065                     "SystemControlBackgroundChromeWhiteRevealBorderBrush",
00066                     "SystemControlTransparentRevealListLowBorderBrush",
00067                     "SystemControlBackgroundListLowRevealBorderBrush",
00068                     "SystemControlBackgroundListMediumRevealBorderBrush",
00069                     "SystemControlTransparentRevealBorderBrush",
00070                     "SystemControlBackgroundTransparentRevealBorderBrush",
00071                     "SystemControlHighlightTransparentRevealBorderBrush",
00072                     "SystemControlHighlightAltTransparentRevealBorderBrush",
00073                     "SystemControlHighlightAccentRevealBorderBrush",
00074                     "SystemControlHighlightBaseHighRevealBorderBrush",
00075                     "SystemControlHighlightBaseLowRevealBorderBrush",
00076                     "SystemControlHighlightBaseMediumRevealBorderBrush",
00077                     "SystemControlHighlightBaseMediumHighRevealBorderBrush",
00078                     "SystemControlHighlightBaseMediumLowRevealBorderBrush" };
00079             }
00080         }
00081
00082         public static string GetBrushName(string fullName)
00083         {
00084             //SystemControlTransparentRevealBackgroundBrush
00085             //SystemControlBackgroundTransparentRevealBorderBrush
00086             if (fullName == null || fullName.Length <= 24)
00087                 return string.Empty;
00088
00089             return fullName.Substring(19, fullName.Length - 24);
00090         }
00091
00092         public IEnumerable<KeyValuePair<string, Brush>> RevealBorderBrushes
00093         {
00094             get
00095             {
00096                 foreach (var brushName in BorderBrushNames)
00097                 {
00098                     var brush = Application.Current.Resources[brushName] as Brush;
00099                     if (brush != null)
00100                         yield return new KeyValuePair<string, Brush>(GetBrushName(brushName), brush);
00101                 }
00102             }
00103         }
00104
00105         public IEnumerable<KeyValuePair<string, Brush>> RevealBackgroundBrushes
00106         {
00107             get
00108             {
00109                 foreach (var brushName in BackgroundBrushNames)
00110                 {
00111                     var brush = Application.Current.Resources[brushName] as Brush;
00112                     if (brush != null)
00113                         yield return new KeyValuePair<string, Brush>(GetBrushName(brushName), brush);
00114                 }
00115             }
00116         }
00117
00118         // TODO: use Verify and have a helper to bubble failures back to test app
00119         private string _checkBrushResult = "";
00120         private void BrushCheckFailed(string message)
00121         {
00122             if (_checkBrushResult != "") _checkBrushResult += ";";
00123             _checkBrushResult += message;
00124         }
00125
00126         private void BrushCheckFailed(string format, object arg0 = null, object arg1 = null)
00127         {
00128             BrushCheckFailed(string.Format(format, arg0, arg1));
00129         }
00130
00131         private void OnCheckBrushResourcesClicked(object sender, RoutedEventArgs args)
00132         {
00133             using (var setup = new MaterialSetupHelper())
00134             {
00135                 // Load up the resource dictionaries and do some consistency checks on them. Verify:
00136                 // 1) All same resource names exist in all theme dictionaries (rs1, rs2) x (light, dark, hc)
00137                 // 2) If a resource is a RevealBrush in Light that it's the same type of RevealBrush in Dark
00138                 // 3) All RevealBrushes in Light should have TargetTheme=Light, same for Dark.
00139                 // 4) Border-named brushes should be RevealBorderBrush, same for Background.
00140
00141                 try
00142                 {
00143                     _checkBrushResult = "";
00144
00145                     // RS1 should have no implicit keys.
00146                     int implicitKeys = RS1RevealThemeResourcesLight.Where(x => !(x.Key is string)).Count();
00147                     if (implicitKeys > 0)
00148                     {
00149                         BrushCheckFailed("Rs1 should have no implicit keys (had {0})", implicitKeys);
00150                     }
00151
00152                     var rs1Keys = RS1RevealThemeResourcesLight.Keys.ToList();
00153                     var rs2Keys = RS2RevealThemeResourcesLight.Keys.ToList();
00154
00155                     var uniqueKeysInRS1 = RS1RevealThemeResourcesLight.Where(x => !rs2Keys.Contains(x.Key)).ToList();
00156                     var uniqueKeysInRS2 = RS2RevealThemeResourcesLight.Where(x => !rs1Keys.Contains(x.Key)).Where(x => x.Key is string).ToList();
00157
00158                     if (uniqueKeysInRS2.Count > 0)
00159                     {
00160                         BrushCheckFailed("RS2 should not have any keys that RS1 does not");
00161                     }
00162
00163                     // Grab all the theme dictionaries -- for RS1 tack on any keys not in a theme dictionary and treat them as if they're in that theme dictionary.
00164                     var rs1dark = ((ResourceDictionary)RS1RevealThemeResourcesDark.ThemeDictionaries["Default"]).Concat(uniqueKeysInRS1).ToDictionary(x => x.Key, x => x.Value);
00165                     var rs1light = ((ResourceDictionary)RS1RevealThemeResourcesLight.ThemeDictionaries["Light"]).Concat(uniqueKeysInRS1).ToDictionary(x => x.Key, x => x.Value);
00166                     var rs1hc = ((ResourceDictionary)RS1RevealThemeResourcesLight.ThemeDictionaries["HighContrast"]).Concat(uniqueKeysInRS1).ToDictionary(x => x.Key, x => x.Value);
00167                     var rs2dark = ((ResourceDictionary)RS2RevealThemeResourcesDark.ThemeDictionaries["Default"]).ToDictionary(x => x.Key, x => x.Value);
00168                     var rs2light = ((ResourceDictionary)RS2RevealThemeResourcesLight.ThemeDictionaries["Light"]).ToDictionary(x => x.Key, x => x.Value);
00169                     var rs2hc = ((ResourceDictionary)RS2RevealThemeResourcesLight.ThemeDictionaries["HighContrast"]).ToDictionary(x => x.Key, x => x.Value);
00170
00171                     // Choose the rs1 light keys as "truth" and check everyone else has those keys and doesn't have keys they shouldn't.
00172                     var expectedKeys = rs1light.Keys;
00173                     Action<string, Dictionary<object, object>> checkDictionary = (which, dict) =>
00174                     {
00175                         var unexpectedEntries = dict.Where(x => !expectedKeys.Contains(x.Key)).ToList();
00176
00177                         foreach (var unexpected in unexpectedEntries)
00178                         {
00179                             BrushCheckFailed("Dictionary {0} has an entry it should not: {1}", which, unexpected.Key);
00180                         }
00181
00182                         var missingEntries = expectedKeys.Where(x => !dict.ContainsKey(x)).ToList();
00183                         foreach (var missing in missingEntries)
00184                         {
00185                             BrushCheckFailed("Dictionary {0} should have had entry '{1}' but was missing", which, missing);
00186                         }
00187                     };
00188
00189                     checkDictionary("rs1light", rs1light);
00190                     checkDictionary("rs2light", rs2light);
00191
00192                     checkDictionary("rs1dark", rs1dark);
00193                     checkDictionary("rs2dark", rs2dark);
00194
00195                     // NOTE: Doing this will cause the High Contrast brushes to load ThemeResource from Light/Dark instead of HighContrast.
00196                     // At the moment there's nothing we can do about that. But we can still check the keys in the dictionaries.
00197                     checkDictionary("rs1hc", rs1hc);
00198                     checkDictionary("rs2hc", rs2hc);
00199
00200                     // Make sure there are no reveal brushes in high contrast or rs1.
00201                     foreach (var entry in rs1hc.Concat(rs1dark).Concat(rs1light))
00202                     {
00203                         var brush = entry.Value as RevealBrush;
00204                         if (brush != null)
00205                         {
00206                             BrushCheckFailed("RS1 theme dictionary had a RevealBrush entry {0}", entry.Key);
00207                         }
00208                     }
00209
00210                     // Don't log failures for issues where the brush is intentionally different in RS1.
00211                     var brushesWithFallbackIssues = new HashSet<string> {
00212                     "SystemControlHighlightAccent2RevealBackgroundBrush",
00213                     "SystemControlHighlightAccent3RevealBackgroundBrush",
00214                     "SystemControlHighlightAccent3RevealAccent2BackgroundBrush",
00215                     "ListViewItemRevealBackgroundSelected",
00216                     "ListViewItemRevealBackgroundSelectedPointerOver",
00217                     "ListViewItemRevealBackgroundSelectedPressed",
00218                     "ComboBoxItemRevealBackgroundSelected",
00219                     "ComboBoxItemRevealBackgroundSelectedUnfocused",
00220                     "ComboBoxItemRevealBackgroundSelectedPointerOver",
00221                     "ComboBoxItemRevealBackgroundSelectedPressed",
00222                     "GridViewItemRevealBackgroundSelectedPointerOver",
00223                     "GridViewItemRevealBackgroundSelectedPressed",
00224                 };
00225
00226                     // Trying to dig the resources out of the dictionary simply doesn't work. We have to load XAML and put the element in the tree.
00227                     string snippetBegin = "<Grid RequestedTheme=\"{0}\" " +
00228                         " xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">" +
00229                         " <Grid.Resources><ResourceDictionary Source=\"{1}\"/></Grid.Resources>\r\n";
00230
00231                     string snippetChildren = "";
00232                     foreach (var lightEntry in rs2light)
00233                     {
00234                         if (lightEntry.Value is RevealBrush)
00235                         {
00236                             snippetChildren += string.Format("<Grid Name=\"{0}\" Background=\"{{ThemeResource {0}}}\"/>\r\n", lightEntry.Key);
00237                         }
00238                     }
00239
00240                     string snippetEnd = "</Grid>";
00241                     string rs1darksnippet = string.Format(snippetBegin, "Dark", "ms-appx:///RevealBrush_rs1_themeresources.xaml") + snippetChildren + snippetEnd;
00242                     string rs2darksnippet = string.Format(snippetBegin, "Dark", "ms-appx:///RevealBrush_rs2_themeresources.xaml") + snippetChildren + snippetEnd;
00243                     string rs1lightsnippet = string.Format(snippetBegin, "Light", "ms-appx:///RevealBrush_rs1_themeresources.xaml") + snippetChildren + snippetEnd;
00244                     string rs2lightsnippet = string.Format(snippetBegin, "Light", "ms-appx:///RevealBrush_rs2_themeresources.xaml") + snippetChildren + snippetEnd;
00245                     var darkGridRS1 = (Grid)XamlReader.Load(rs1darksnippet);
00246                     ResourceRootDarkRS1.Children.Add(darkGridRS1);
00247                     var darkGridRS2 = (Grid)XamlReader.Load(rs2darksnippet);
00248                     ResourceRootDarkRS2.Children.Add(darkGridRS2);
00249                     var lightGridRS1 = (Grid)XamlReader.Load(rs1lightsnippet);
00250                     ResourceRootLightRS1.Children.Add(lightGridRS1);
00251                     var lightGridRS2 = (Grid)XamlReader.Load(rs2lightsnippet);
00252                     ResourceRootLightRS2.Children.Add(lightGridRS2);
00253
00254                     Dictionary<string, Grid> rs1DarkBrushes = new Dictionary<string, Grid>();
00255                     Dictionary<string, Grid> rs2DarkBrushes = new Dictionary<string, Grid>();
00256                     Dictionary<string, Grid> rs1LightBrushes = new Dictionary<string, Grid>();
00257                     Dictionary<string, Grid> rs2LightBrushes = new Dictionary<string, Grid>();
00258
00259                     foreach (Grid grid in darkGridRS1.Children)
00260                     {
00261                         rs1DarkBrushes[grid.Name] = grid;
00262                     }
00263
00264                     foreach (Grid grid in darkGridRS2.Children)
00265                     {
00266                         rs2DarkBrushes[grid.Name] = grid;
00267                     }
00268
00269                     foreach (Grid grid in lightGridRS1.Children)
00270                     {
00271                         rs1LightBrushes[grid.Name] = grid;
00272                     }
00273
00274                     foreach (Grid grid in lightGridRS2.Children)
00275                     {
00276                         rs2LightBrushes[grid.Name] = grid;
00277                     }
00278
00279                     foreach (var lightEntry in rs1LightBrushes)
00280                     {
00281                         var darkRS1Brush = rs1DarkBrushes[(string)lightEntry.Key].Background as SolidColorBrush;
00282                         var darkBrush = rs2DarkBrushes[(string)lightEntry.Key].Background as RevealBrush;
00283                         var lightRS1Brush = rs1LightBrushes[(string)lightEntry.Key].Background as SolidColorBrush;
00284                         var lightBrush = rs2LightBrushes[(string)lightEntry.Key].Background as RevealBrush;
00285
00286                         // Check that TargetTheme is set correctly.
00287                         if (lightBrush.TargetTheme != ApplicationTheme.Light)
00288                         {
00289                             BrushCheckFailed("RevealBrush for light theme did not have TargetTheme=Light: {0}", lightEntry.Key);
00290                         }
00291
00292                         // Make sure that their fallback colors match their correspondents in RS1.
00293                         if (lightBrush.FallbackColor != lightRS1Brush.Color && !brushesWithFallbackIssues.Contains(lightEntry.Key))
00294                         {
00295                             BrushCheckFailed("FallbackColor for light theme did not match rs1 color: {0}", lightEntry.Key);
00296                         }
00297
00298                         if (darkBrush == null || darkBrush.GetType() != lightBrush.GetType())
00299                         {
00300                             BrushCheckFailed("Light entry was RevealBrush but dark entry was not (or their types weren't the same): {0}", lightEntry.Key);
00301                         }
00302                         else
00303                         {
00304                             if (darkBrush.TargetTheme != ApplicationTheme.Dark)
00305                             {
00306                                 BrushCheckFailed("RevealBrush for dark theme did not have TargetTheme=Dark: {0}", lightEntry.Key);
00307                             }
00308                             else
00309                             {
00310                                 if (darkBrush.FallbackColor != darkRS1Brush.Color && !brushesWithFallbackIssues.Contains(lightEntry.Key))
00311                                 {
00312                                     BrushCheckFailed("FallbackColor for dark theme did not match rs1 color: {0}", lightEntry.Key);
00313                                 }
00314                             }
00315                         }
00316                     }
00317                 }
00318                 catch (Exception e)
00319                 {
00320                     BrushCheckFailed("ERROR: " + e.ToString());
00321                 }
00322
00323                 // Set at the end to make sure we only fire valuechanged once.
00324                 CheckBrushesResult.TextWrapping = TextWrapping.Wrap;
00325                 CheckBrushesResult.Text = _checkBrushResult;
00326             }
00327         }
00328
00329         public string Blah
00330         {
00331             get
00332             {
00333                 return "ListViewItemRevealBackground";
00334             }
00335         }
00336     }
00337 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarProperties Member List

This is the complete list of members for MenuBarProperties, including all inherited members.
ClearProperties() | MenuBarProperties | [static]
EnsureProperties() | MenuBarProperties | [static]
Items(winrt::IVector< winrt::MenuBarItem > const &value) | MenuBarProperties |
Items() | MenuBarProperties |
ItemsProperty() | MenuBarProperties | [inline, static]
MenuBarProperties() | MenuBarProperties |
s_ItemsProperty | MenuBarProperties | [static]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlControlsResources.cpp Source File

  • File List
  • File Members
  • dll

XamlControlsResources.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "XamlControlsResources.h"
00007 #include "RevealBrush.h"
00008 #include "MUXControlsFactory.h"
00009
00010 static constexpr auto c_AcrylicBackgroundFillColorDefaultBrush = L"AcrylicBackgroundFillColorDefaultBrush"sv;
00011 static constexpr auto c_AcrylicInAppFillColorDefaultBrush = L"AcrylicInAppFillColorDefaultBrush"sv;
00012 static constexpr auto c_AcrylicBackgroundFillColorDefaultInverseBrush = L"AcrylicBackgroundFillColorDefaultInverseBrush"sv;
00013 static constexpr auto c_AcrylicInAppFillColorDefaultInverseBrush = L"AcrylicInAppFillColorDefaultInverseBrush"sv;
00014 static constexpr auto c_AcrylicBackgroundFillColorBaseBrush = L"AcrylicBackgroundFillColorBaseBrush"sv;
00015 static constexpr auto c_AcrylicInAppFillColorBaseBrush = L"AcrylicInAppFillColorBaseBrush"sv;
00016 static constexpr auto c_AccentAcrylicBackgroundFillColorDefaultBrush = L"AccentAcrylicBackgroundFillColorDefaultBrush"sv;
00017 static constexpr auto c_AccentAcrylicInAppFillColorDefaultBrush = L"AccentAcrylicInAppFillColorDefaultBrush"sv;
00018 static constexpr auto c_AccentAcrylicBackgroundFillColorBaseBrush = L"AccentAcrylicBackgroundFillColorBaseBrush"sv;
00019 static constexpr auto c_AccentAcrylicInAppFillColorBaseBrush = L"AccentAcrylicInAppFillColorBaseBrush"sv;
00020
00021 XamlControlsResources::XamlControlsResources()
00022 {
00023     // On Windows, we need to add theme resources manually.  We'll still add an instance of this element to get the rest of
00024     // what it does, though.
00025     MUXControlsFactory::EnsureInitialized();
00026     UpdateSource();
00027 }
00028
00029 void XamlControlsResources::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00030 {
00031     winrt::IDependencyProperty property = args.Property();
00032
00033     if (property == s_UseCompactResourcesProperty)
00034     {
00035         // UseCompactResources was intended to be an experimental-only api.
00036         // However it accidentally shipped as a non-experimental api in a broken state.
00037         // Since it has already shipped we cannot remove the api, so instead we add an error message.
00038 #ifndef MUX_PRERELEASE
00039         bool useCompactResources = UseCompactResources();
00040         if (useCompactResources)
00041         {
00042             throw winrt::hresult_invalid_argument(L"XamlControlsResources.UseCompactResources property is only supported in Experimental releases of WinUI");
00043         }
00044 #endif
00045         // Source link depends on UseCompactResources flag, we need to update it when the property changes
00046         UpdateSource();
00047     }
00048 }
00049
00050 void XamlControlsResources::UpdateSource()
00051 {
00052     const bool useCompactResources = UseCompactResources();
00053
00054     // We choose the URI to use at runtime based on whether we want compact resources
00055     winrt::Uri uri{
00056         [useCompactResources]() -> hstring {
00057             hstring compactPrefix = useCompactResources ? L"compact_" : L"";
00058             hstring packagePrefix = L"ms-appx:///" MUXCONTROLSROOT_NAMESPACE_STR "/Themes/";
00059             hstring postfix = L"themeresources.xaml";
00060
00061             return packagePrefix + compactPrefix + postfix;
00062         }()
00063     };
00064
00065     // Because of Compact, UpdateSource may be executed twice, but there is a bug in XAML and manually clear theme dictionaries here:
00066     // Prior to RS5, when ResourceDictionary.Source property is changed, XAML forgot to clear ThemeDictionaries.
00067     ThemeDictionaries().Clear();
00068     Source(uri);
00069
00070     UpdateAcrylicBrushesDarkTheme(ThemeDictionaries().Lookup(box_value(L"Default")));
00071     UpdateAcrylicBrushesLightTheme(ThemeDictionaries().Lookup(box_value(L"Light")));
00072 }
00073
00074 void XamlControlsResources::UpdateAcrylicBrushesLightTheme(const winrt::IInspectable themeDictionary)
00075 {
00076     const auto dictionary = themeDictionary.try_as<winrt::ResourceDictionary>();
00077     if (const auto acrylicBackgroundFillColorDefaultBrush = dictionary.Lookup(box_value(c_AcrylicBackgroundFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00078     {
00079         UpdateTintLuminosityOpacity(acrylicBackgroundFillColorDefaultBrush, 0.85);
00080     }
00081     if (const auto acrylicInAppFillColorDefaultBrush = dictionary.Lookup(box_value(c_AcrylicInAppFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00082     {
00083         UpdateTintLuminosityOpacity(acrylicInAppFillColorDefaultBrush, 0.85);
00084     }
00085     if (const auto acrylicBackgroundFillColorDefaultInverseBrush = dictionary.Lookup(box_value(c_AcrylicBackgroundFillColorDefaultInverseBrush)).as<winrt::AcrylicBrush>())
00086     {
00087         UpdateTintLuminosityOpacity(acrylicBackgroundFillColorDefaultInverseBrush, 0.96);
00088     }
00089     if (const auto acrylicInAppFillColorDefaultInverseBrush = dictionary.Lookup(box_value(c_AcrylicInAppFillColorDefaultInverseBrush)).as<winrt::AcrylicBrush>())
00090     {
00091         UpdateTintLuminosityOpacity(acrylicInAppFillColorDefaultInverseBrush, 0.96);
00092     }
00093     if (const auto acrylicBackgroundFillColorBaseBrush = dictionary.Lookup(box_value(c_AcrylicBackgroundFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00094     {
00095         UpdateTintLuminosityOpacity(acrylicBackgroundFillColorBaseBrush, 0.9);
00096     }
00097     if (const auto acrylicInAppFillColorBaseBrush = dictionary.Lookup(box_value(c_AcrylicInAppFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00098     {
00099         UpdateTintLuminosityOpacity(acrylicInAppFillColorBaseBrush, 0.9);
00100     }
00101     if (const auto accentAcrylicBackgroundFillColorDefaultBrush = dictionary.Lookup(box_value(c_AccentAcrylicBackgroundFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00102     {
00103         UpdateTintLuminosityOpacity(accentAcrylicBackgroundFillColorDefaultBrush, 0.9);
00104     }
00105     if (const auto accentAcrylicInAppFillColorDefaultBrush = dictionary.Lookup(box_value(c_AccentAcrylicInAppFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00106     {
00107         UpdateTintLuminosityOpacity(accentAcrylicInAppFillColorDefaultBrush, 0.9);
00108     }
00109     if (const auto accentAcrylicBackgroundFillColorBaseBrush = dictionary.Lookup(box_value(c_AccentAcrylicBackgroundFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00110     {
00111         UpdateTintLuminosityOpacity(accentAcrylicBackgroundFillColorBaseBrush, 0.9);
00112     }
00113     if (const auto accentAcrylicInAppFillColorBaseBrush = dictionary.Lookup(box_value(c_AccentAcrylicInAppFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00114     {
00115         UpdateTintLuminosityOpacity(accentAcrylicInAppFillColorBaseBrush, 0.9);
00116     }
00117 }
00118
00119 void XamlControlsResources::UpdateAcrylicBrushesDarkTheme(const winrt::IInspectable themeDictionary)
00120 {
00121     if (const auto dictionary = themeDictionary.try_as<winrt::ResourceDictionary>())
00122     {
00123         if (const auto acrylicBackgroundFillColorDefaultBrush = dictionary.Lookup(box_value(c_AcrylicBackgroundFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00124         {
00125             UpdateTintLuminosityOpacity(acrylicBackgroundFillColorDefaultBrush, 0.96);
00126         }
00127         if (const auto acrylicInAppFillColorDefaultBrush = dictionary.Lookup(box_value(c_AcrylicInAppFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00128         {
00129             UpdateTintLuminosityOpacity(acrylicInAppFillColorDefaultBrush, 0.96);
00130         }
00131         if (const auto acrylicBackgroundFillColorDefaultInverseBrush = dictionary.Lookup(box_value(c_AcrylicBackgroundFillColorDefaultInverseBrush)).as<winrt::AcrylicBrush>())
00132         {
00133             UpdateTintLuminosityOpacity(acrylicBackgroundFillColorDefaultInverseBrush, 0.85);
00134         }
00135         if (const auto acrylicInAppFillColorDefaultInverseBrush = dictionary.Lookup(box_value(c_AcrylicInAppFillColorDefaultInverseBrush)).as<winrt::AcrylicBrush>())
00136         {
00137             UpdateTintLuminosityOpacity(acrylicInAppFillColorDefaultInverseBrush, 0.85);
00138         }
00139         if (const auto acrylicBackgroundFillColorBaseBrush = dictionary.Lookup(box_value(c_AcrylicBackgroundFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00140         {
00141             UpdateTintLuminosityOpacity(acrylicBackgroundFillColorBaseBrush, 0.96);
00142         }
00143         if (const auto acrylicInAppFillColorBaseBrush = dictionary.Lookup(box_value(c_AcrylicInAppFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00144         {
00145             UpdateTintLuminosityOpacity(acrylicInAppFillColorBaseBrush, 0.96);
00146         }
00147         if (const auto accentAcrylicBackgroundFillColorDefaultBrush = dictionary.Lookup(box_value(c_AccentAcrylicBackgroundFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00148         {
00149             UpdateTintLuminosityOpacity(accentAcrylicBackgroundFillColorDefaultBrush, 0.8);
00150         }
00151         if (const auto accentAcrylicInAppFillColorDefaultBrush = dictionary.Lookup(box_value(c_AccentAcrylicInAppFillColorDefaultBrush)).as<winrt::AcrylicBrush>())
00152         {
00153             UpdateTintLuminosityOpacity(accentAcrylicInAppFillColorDefaultBrush, 0.8);
00154         }
00155         if (const auto accentAcrylicBackgroundFillColorBaseBrush = dictionary.Lookup(box_value(c_AccentAcrylicBackgroundFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00156         {
00157             UpdateTintLuminosityOpacity(accentAcrylicBackgroundFillColorBaseBrush, 0.8);
00158         }
00159         if (const auto accentAcrylicInAppFillColorBaseBrush = dictionary.Lookup(box_value(c_AccentAcrylicInAppFillColorBaseBrush)).as<winrt::AcrylicBrush>())
00160         {
00161             UpdateTintLuminosityOpacity(accentAcrylicInAppFillColorBaseBrush, 0.8);
00162         }
00163     }
00164 }
00165
00166 void XamlControlsResources::UpdateTintLuminosityOpacity(winrt::Microsoft::UI::Xaml::Media::AcrylicBrush brush, double luminosityValue)
00167 {
00168     brush.TintLuminosityOpacity(luminosityValue);
00169 }
00170
00171 void SetDefaultStyleKeyWorker(winrt::IControlProtected const& controlProtected, std::wstring_view const& className)
00172 {
00173     controlProtected.DefaultStyleKey(box_value(className));
00174
00175     if (auto control = controlProtected.try_as<winrt::IControl>())
00176     {
00177         winrt::Uri uri{L"ms-appx:///" MUXCONTROLSROOT_NAMESPACE_STR "/Themes/generic.xaml"};
00178         control.DefaultStyleResourceUri(uri);
00179     }
00180 }
00181
00182 void XamlControlsResources::EnsureRevealLights(winrt::UIElement const& /*element*/)
00183 {
00184     // This is a no-op now since it only applied to RS3 XAML, but since it's an API we shipped with, we need to keep it around.
00185 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedChevronRightDownSmallVisualSource.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedChevronRightDownSmallVisualSource.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedChevronRightDownSmallVisualSource.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(AnimatedChevronRightDownSmallVisualSource)
00012 }
00013
00014 #include "AnimatedChevronRightDownSmallVisualSource.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressBarProperties Member List

This is the complete list of members for ProgressBarProperties, including all inherited members.
ClearProperties() | ProgressBarProperties | [static]
EnsureProperties() | ProgressBarProperties | [static]
IsIndeterminate(bool value) | ProgressBarProperties |
IsIndeterminate() | ProgressBarProperties |
IsIndeterminateProperty() | ProgressBarProperties | [inline, static]
OnIsIndeterminatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressBarProperties | [static]
OnShowErrorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressBarProperties | [static]
OnShowPausedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ProgressBarProperties | [static]
ProgressBarProperties() | ProgressBarProperties |
s_IsIndeterminateProperty | ProgressBarProperties | [static]
s_ShowErrorProperty | ProgressBarProperties | [static]
s_ShowPausedProperty | ProgressBarProperties | [static]
s_TemplateSettingsProperty | ProgressBarProperties | [static]
ShowError(bool value) | ProgressBarProperties |
ShowError() | ProgressBarProperties |
ShowErrorProperty() | ProgressBarProperties | [inline, static]
ShowPaused(bool value) | ProgressBarProperties |
ShowPaused() | ProgressBarProperties |
ShowPausedProperty() | ProgressBarProperties | [inline, static]
TemplateSettings(winrt::ProgressBarTemplateSettings const &value) | ProgressBarProperties |
TemplateSettings() | ProgressBarProperties |
TemplateSettingsProperty() | ProgressBarProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualLayoutContextAdapter Member List

This is the complete list of members for VirtualLayoutContextAdapter, including all inherited members.
ChildrenCore() | VirtualLayoutContextAdapter
LayoutStateCore() | VirtualLayoutContextAdapter
LayoutStateCore(winrt::IInspectable const &state) | VirtualLayoutContextAdapter
VirtualLayoutContextAdapter(winrt::VirtualizingLayoutContext const &virtualizingContext) | VirtualLayoutContextAdapter
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NestedLayoutSamples/StoreMockData.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NestedLayoutSamples

StoreMockData.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.ObjectModel;
00005 using MUXControlsTestApp.Utilities;
00006
00007 namespace MUXControlsTestApp.Samples
00008 {
00009     public class StoreMockData
00010     {
00011         public static ObservableCollection<Category> Create(int numCategories, int numItemsPerCategory)
00012         {
00013             var data = new ObservableCollection<Category>();
00014             for (int i = 0; i < numCategories; i++)
00015             {
00016                 var category = CreateCategory(numItemsPerCategory, "Category " + i.ToString());
00017                 data.Add(category);
00018             }
00019
00020             return data;
00021         }
00022
00023         public static Category CreateCategory(int numItems, string name)
00024         {
00025             var category = new Category() { Name = name };
00026             for (int i = 0; i < numItems; i++)
00027             {
00028                 category.Add(new Item() { Name = "Item " + i.ToString() });
00029             }
00030
00031             return category;
00032         }
00033     }
00034
00035     public class Category : ObservableCollection<Item>
00036     {
00037         public string Name { get; set; }
00038     }
00039
00040     public class Item
00041     {
00042         public string Name { get; set; }
00043     }
00044 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > Member List

This is the complete list of members for VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, including all inherited members.
abi_enter() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
CheckThread() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > > &&self) noexcept | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
final_release(std::unique_ptr< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > > &&self) | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline, static]
GetBase() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
GetCustomIndexOfFunction | VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > | [inline, protected]
GetInner() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
Implement_Vector(Options) public | VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > | [inline, private]
IsOnThread() | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options >, reference_tracker_implements_t< Options::VectorType >::type, Options::IterableType, std::conditional_t< isObservable, Options::ObservableVectorType, void > > | [inline]
SetCustomIndexOfFunction(std::function< bool(T const &value, uint32_t &index)> indexOfFunction) | VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > | [inline, protected]
VectorBase(uint32_t capacity) | VectorBase< T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options > | [inline, private]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApi.h Source File

  • File List
  • File Members
  • Lights

MaterialHelperTestApi.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "MaterialHelperTestApi.g.h"
00007
00008 class MaterialHelperTestApi :
00009     public ReferenceTracker<MaterialHelperTestApi, winrt::implementation::MaterialHelperTestApiT, winrt::composable>
00010 {
00011 public:
00012     static bool SimulateDisabledByPolicy();
00013     static void SimulateDisabledByPolicy(bool value);
00014     static bool IgnoreAreEffectsFast();
00015     static void IgnoreAreEffectsFast(bool value);
00016 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerSlider Member List

This is the complete list of members for ColorPickerSlider, including all inherited members.
abi_enter() | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
CheckThread() | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
ClearProperties() | ColorPickerSliderProperties | [static]
ColorChannel(winrt::ColorPickerHsvChannel const &value) | ColorPickerSliderProperties |
ColorChannel() | ColorPickerSliderProperties |
ColorChannelProperty() | ColorPickerSliderProperties | [inline, static]
ColorPickerSlider() | ColorPickerSlider |
ColorPickerSliderProperties() | ColorPickerSliderProperties |
DeleteInstanceOnUIThread(std::unique_ptr< ColorPickerSlider > &&self) noexcept | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline, static]
EnsureProperties() | ColorPickerSliderProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
final_release(std::unique_ptr< ColorPickerSlider > &&self) | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline, static]
GetBase() | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
GetInner() | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
GetParentColorPicker() | ColorPickerSlider | [private]
GetToolTipString() | ColorPickerSlider | [private]
IsOnThread() | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
OnApplyTemplate() | ColorPickerSlider |
OnCreateAutomationPeer() | ColorPickerSlider |
OnGotFocus(winrt::RoutedEventArgs const &e) | ColorPickerSlider |
OnKeyDown(winrt::KeyRoutedEventArgs const &e) | ColorPickerSlider |
OnLostFocus(winrt::RoutedEventArgs const &e) | ColorPickerSlider |
OnValueChangedEvent(winrt::IInspectable const &sender, winrt::RangeBaseValueChangedEventArgs const &args) | ColorPickerSlider | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ColorPickerSlider, winrt::implementation::ColorPickerSliderT > | [inline]
s_ColorChannelProperty | ColorPickerSliderProperties | [static]
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LayoutPanel Member List

This is the complete list of members for LayoutPanel, including all inherited members.
abi_enter() | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
ArrangeOverride(winrt::Size const &finalSize) | LayoutPanel |
BorderBrush(winrt::Brush const &value) | LayoutPanelProperties |
BorderBrush() | LayoutPanelProperties |
BorderBrushProperty() | LayoutPanelProperties | [inline, static]
BorderThickness(winrt::Thickness const &value) | LayoutPanelProperties |
BorderThickness() | LayoutPanelProperties |
BorderThicknessProperty() | LayoutPanelProperties | [inline, static]
CheckThread() | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
ClearProperties() | LayoutPanelProperties | [static]
CornerRadius(winrt::CornerRadius const &value) | LayoutPanelProperties |
CornerRadius() | LayoutPanelProperties |
CornerRadiusProperty() | LayoutPanelProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< LayoutPanel > &&self) noexcept | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline, static]
EnsureProperties() | LayoutPanelProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
final_release(std::unique_ptr< LayoutPanel > &&self) | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline, static]
GetBase() | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
GetInner() | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
InvalidateArrangeForLayout(winrt::Layout const &sender, winrt::IInspectable const &args) | LayoutPanel | [private]
InvalidateMeasureForLayout(winrt::Layout const &sender, winrt::IInspectable const &args) | LayoutPanel | [private]
IsOnThread() | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
Layout(winrt::Layout const &value) | LayoutPanelProperties |
Layout() | LayoutPanelProperties |
LayoutPanelProperties() | LayoutPanelProperties |
LayoutProperty() | LayoutPanelProperties | [inline, static]
LayoutState() | LayoutPanel | [inline]
LayoutState(winrt::IInspectable const &value) | LayoutPanel | [inline]
MeasureOverride(winrt::Size const &availableSize) | LayoutPanel |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
OnBorderBrushPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnBorderThicknessPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnCornerRadiusPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnLayoutChanged(winrt::Layout const &oldValue, winrt::Layout const &newValue) | LayoutPanel | [private]
OnLayoutPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnPaddingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanelProperties | [static]
OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | LayoutPanel |
Padding(winrt::Thickness const &value) | LayoutPanelProperties |
Padding() | LayoutPanelProperties |
PaddingProperty() | LayoutPanelProperties | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< LayoutPanel, winrt::implementation::LayoutPanelT > | [inline]
s_BorderBrushProperty | LayoutPanelProperties | [static]
s_BorderThicknessProperty | LayoutPanelProperties | [static]
s_CornerRadiusProperty | LayoutPanelProperties | [static]
s_LayoutProperty | LayoutPanelProperties | [static]
s_PaddingProperty | LayoutPanelProperties | [static]
Generated on Sun Dec 1 2024 20:52:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemInvokedEventArgs Member List

This is the complete list of members for NavigationViewItemInvokedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< NavigationViewItemInvokedEventArgs > &&self) noexcept | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< NavigationViewItemInvokedEventArgs > &&self) | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
InvokedItem() | NavigationViewItemInvokedEventArgs |
InvokedItem(const winrt::IInspectable &value) | NavigationViewItemInvokedEventArgs |
InvokedItemContainer() | NavigationViewItemInvokedEventArgs |
InvokedItemContainer(winrt::NavigationViewItemBase const &value) | NavigationViewItemInvokedEventArgs |
IsOnThread() | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
IsSettingsInvoked() | NavigationViewItemInvokedEventArgs |
IsSettingsInvoked(bool value) | NavigationViewItemInvokedEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
RecommendedNavigationTransitionInfo() | NavigationViewItemInvokedEventArgs |
RecommendedNavigationTransitionInfo(winrt::NavigationTransitionInfo const &value) | NavigationViewItemInvokedEventArgs |
ReferenceTracker(Args &&...args) | ReferenceTracker< NavigationViewItemInvokedEventArgs, winrt::implementation::NavigationViewItemInvokedEventArgsT, winrt::composing, winrt::composable > | [inline]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

FlipViewPage Member List

This is the complete list of members for FlipViewPage, including all inherited members.
FlipViewPage() FlipViewPage [inline]
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: DropDownButton/DropDownButtonAutomationPeer.h Source File

  • File List
  • File Members
  • DropDownButton

DropDownButtonAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "DropDownButton.h"
00007 #include "DropDownButtonAutomationPeer.g.h"
00008
00009 class DropDownButtonAutomationPeer :
00010     public ReferenceTracker<DropDownButtonAutomationPeer, winrt::implementation::DropDownButtonAutomationPeerT>
00011 {
00012
00013 public:
00014     DropDownButtonAutomationPeer(winrt::DropDownButton const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     hstring GetClassNameCore();
00019
00020     // IExpandCollapseProvider
00021     winrt::ExpandCollapseState ExpandCollapseState();
00022     void Expand();
00023     void Collapse();
00024
00025 private:
00026     com_ptr<DropDownButton> GetImpl();
00027 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedVisualPlayer.properties.h Source File

  • File List
  • File Members
  • Generated

AnimatedVisualPlayer.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class AnimatedVisualPlayerProperties
00008 {
00009 public:
00010     AnimatedVisualPlayerProperties();
00011
00012     void AnimationOptimization(winrt::PlayerAnimationOptimization const& value);
00013     winrt::PlayerAnimationOptimization AnimationOptimization();
00014
00015     void AutoPlay(bool value);
00016     bool AutoPlay();
00017
00018     void Diagnostics(winrt::IInspectable const& value);
00019     winrt::IInspectable Diagnostics();
00020
00021     void Duration(winrt::TimeSpan const& value);
00022     winrt::TimeSpan Duration();
00023
00024     void FallbackContent(winrt::DataTemplate const& value);
00025     winrt::DataTemplate FallbackContent();
00026
00027     void IsAnimatedVisualLoaded(bool value);
00028     bool IsAnimatedVisualLoaded();
00029
00030     void IsPlaying(bool value);
00031     bool IsPlaying();
00032
00033     void PlaybackRate(double value);
00034     double PlaybackRate();
00035
00036     void Source(winrt::IAnimatedVisualSource const& value);
00037     winrt::IAnimatedVisualSource Source();
00038
00039     void Stretch(winrt::Stretch const& value);
00040     winrt::Stretch Stretch();
00041
00042     static winrt::DependencyProperty AnimationOptimizationProperty() { return s_AnimationOptimizationProperty; }
00043     static winrt::DependencyProperty AutoPlayProperty() { return s_AutoPlayProperty; }
00044     static winrt::DependencyProperty DiagnosticsProperty() { return s_DiagnosticsProperty; }
00045     static winrt::DependencyProperty DurationProperty() { return s_DurationProperty; }
00046     static winrt::DependencyProperty FallbackContentProperty() { return s_FallbackContentProperty; }
00047     static winrt::DependencyProperty IsAnimatedVisualLoadedProperty() { return s_IsAnimatedVisualLoadedProperty; }
00048     static winrt::DependencyProperty IsPlayingProperty() { return s_IsPlayingProperty; }
00049     static winrt::DependencyProperty PlaybackRateProperty() { return s_PlaybackRateProperty; }
00050     static winrt::DependencyProperty SourceProperty() { return s_SourceProperty; }
00051     static winrt::DependencyProperty StretchProperty() { return s_StretchProperty; }
00052
00053     static GlobalDependencyProperty s_AnimationOptimizationProperty;
00054     static GlobalDependencyProperty s_AutoPlayProperty;
00055     static GlobalDependencyProperty s_DiagnosticsProperty;
00056     static GlobalDependencyProperty s_DurationProperty;
00057     static GlobalDependencyProperty s_FallbackContentProperty;
00058     static GlobalDependencyProperty s_IsAnimatedVisualLoadedProperty;
00059     static GlobalDependencyProperty s_IsPlayingProperty;
00060     static GlobalDependencyProperty s_PlaybackRateProperty;
00061     static GlobalDependencyProperty s_SourceProperty;
00062     static GlobalDependencyProperty s_StretchProperty;
00063
00064     static void EnsureProperties();
00065     static void ClearProperties();
00066
00067     static void OnAnimationOptimizationPropertyChanged(
00068         winrt::DependencyObject const& sender,
00069         winrt::DependencyPropertyChangedEventArgs const& args);
00070
00071     static void OnAutoPlayPropertyChanged(
00072         winrt::DependencyObject const& sender,
00073         winrt::DependencyPropertyChangedEventArgs const& args);
00074
00075     static void OnFallbackContentPropertyChanged(
00076         winrt::DependencyObject const& sender,
00077         winrt::DependencyPropertyChangedEventArgs const& args);
00078
00079     static void OnPlaybackRatePropertyChanged(
00080         winrt::DependencyObject const& sender,
00081         winrt::DependencyPropertyChangedEventArgs const& args);
00082
00083     static void OnSourcePropertyChanged(
00084         winrt::DependencyObject const& sender,
00085         winrt::DependencyPropertyChangedEventArgs const& args);
00086
00087     static void OnStretchPropertyChanged(
00088         winrt::DependencyObject const& sender,
00089         winrt::DependencyPropertyChangedEventArgs const& args);
00090 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewCustomMenuItemPage Member List

This is the complete list of members for NavigationViewCustomMenuItemPage, including all inherited members.
NavigationViewCustomMenuItemPage() NavigationViewCustomMenuItemPage [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerAutomationPeer.h Source File

  • File List
  • File Members
  • PipsPager

PipsPagerAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PipsPager.h"
00007 #include "PipsPagerAutomationPeer.g.h"
00008
00009 class PipsPagerAutomationPeer :
00010     public ReferenceTracker<PipsPagerAutomationPeer, winrt::implementation::PipsPagerAutomationPeerT, winrt::ISelectionProvider>
00011 {
00012
00013 public:
00014     PipsPagerAutomationPeer(winrt::PipsPager const& owner);
00015
00016     /* IAutomationPeerOverrides */
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     hstring GetClassNameCore();
00019     hstring GetNameCore();
00020     winrt::AutomationControlType GetAutomationControlTypeCore();
00021
00022     // ISelectionProvider
00023     bool CanSelectMultiple() { return false; };
00024     bool IsSelectionRequired() { return true; };
00025     winrt::com_array<winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple> GetSelection();
00026
00027     void RaiseSelectionChanged(double oldIndex, double newIndex);
00028
00029 private:
00030     com_ptr<PipsPager> GetImpl();
00031 };
00032
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CompositeStepEffect Member List

This is the complete list of members for CompositeStepEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1Composite) | CompositeStepEffect |
DECLARE_DUAL_SOURCES(Destination, Source) | CompositeStepEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"Mode", D2D1_COMPOSITE_PROP_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | CompositeStepEffect |
DECLARE_POD_PROPERTY(Mode, winrt::CanvasComposite, winrt::CanvasComposite::SourceOver, true) | CompositeStepEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | CompositeStepEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | CompositeStepEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBrush.properties.cpp Source File

  • File List
  • File Members
  • Generated

RevealBrush.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RevealBrush.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Media
00010 {
00011     CppWinRTActivatableClassWithDPFactory(RevealBrush)
00012 }
00013
00014 #include "RevealBrush.g.cpp"
00015
00016 GlobalDependencyProperty RevealBrushProperties::s_AlwaysUseFallbackProperty{ nullptr };
00017 GlobalDependencyProperty RevealBrushProperties::s_ColorProperty{ nullptr };
00018 GlobalDependencyProperty RevealBrushProperties::s_StateProperty{ nullptr };
00019 GlobalDependencyProperty RevealBrushProperties::s_TargetThemeProperty{ nullptr };
00020
00021 RevealBrushProperties::RevealBrushProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void RevealBrushProperties::EnsureProperties()
00027 {
00028     if (!s_AlwaysUseFallbackProperty)
00029     {
00030         s_AlwaysUseFallbackProperty =
00031             InitializeDependencyProperty(
00032                 L"AlwaysUseFallback",
00033                 winrt::name_of<bool>(),
00034                 winrt::name_of<winrt::RevealBrush>(),
00035                 false /* isAttached */,
00036                 ValueHelper<bool>::BoxedDefaultValue(),
00037                 winrt::PropertyChangedCallback(&OnAlwaysUseFallbackPropertyChanged));
00038     }
00039     if (!s_ColorProperty)
00040     {
00041         s_ColorProperty =
00042             InitializeDependencyProperty(
00043                 L"Color",
00044                 winrt::name_of<winrt::Color>(),
00045                 winrt::name_of<winrt::RevealBrush>(),
00046                 false /* isAttached */,
00047                 ValueHelper<winrt::Color>::BoxValueIfNecessary(RevealBrush::sc_defaultColor),
00048                 winrt::PropertyChangedCallback(&OnColorPropertyChanged));
00049     }
00050     if (!s_StateProperty)
00051     {
00052         s_StateProperty =
00053             InitializeDependencyProperty(
00054                 L"State",
00055                 winrt::name_of<winrt::RevealBrushState>(),
00056                 winrt::name_of<winrt::RevealBrush>(),
00057                 true /* isAttached */,
00058                 ValueHelper<winrt::RevealBrushState>::BoxValueIfNecessary(winrt::RevealBrushState::Normal),
00059                 &RevealBrush::OnStatePropertyChanged);
00060     }
00061     if (!s_TargetThemeProperty)
00062     {
00063         s_TargetThemeProperty =
00064             InitializeDependencyProperty(
00065                 L"TargetTheme",
00066                 winrt::name_of<winrt::ApplicationTheme>(),
00067                 winrt::name_of<winrt::RevealBrush>(),
00068                 false /* isAttached */,
00069                 ValueHelper<winrt::ApplicationTheme>::BoxValueIfNecessary(winrt::ApplicationTheme::Light),
00070                 winrt::PropertyChangedCallback(&OnTargetThemePropertyChanged));
00071     }
00072 }
00073
00074 void RevealBrushProperties::ClearProperties()
00075 {
00076     s_AlwaysUseFallbackProperty = nullptr;
00077     s_ColorProperty = nullptr;
00078     s_StateProperty = nullptr;
00079     s_TargetThemeProperty = nullptr;
00080 }
00081
00082 void RevealBrushProperties::OnAlwaysUseFallbackPropertyChanged(
00083     winrt::DependencyObject const& sender,
00084     winrt::DependencyPropertyChangedEventArgs const& args)
00085 {
00086     auto owner = sender.as<winrt::RevealBrush>();
00087     winrt::get_self<RevealBrush>(owner)->OnPropertyChanged(args);
00088 }
00089
00090 void RevealBrushProperties::OnColorPropertyChanged(
00091     winrt::DependencyObject const& sender,
00092     winrt::DependencyPropertyChangedEventArgs const& args)
00093 {
00094     auto owner = sender.as<winrt::RevealBrush>();
00095     winrt::get_self<RevealBrush>(owner)->OnPropertyChanged(args);
00096 }
00097
00098 void RevealBrushProperties::OnTargetThemePropertyChanged(
00099     winrt::DependencyObject const& sender,
00100     winrt::DependencyPropertyChangedEventArgs const& args)
00101 {
00102     auto owner = sender.as<winrt::RevealBrush>();
00103     winrt::get_self<RevealBrush>(owner)->OnPropertyChanged(args);
00104 }
00105
00106 void RevealBrushProperties::AlwaysUseFallback(bool value)
00107 {
00108     [[gsl::suppress(con)]]
00109     {
00110     static_cast<RevealBrush*>(this)->SetValue(s_AlwaysUseFallbackProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00111     }
00112 }
00113
00114 bool RevealBrushProperties::AlwaysUseFallback()
00115 {
00116     return ValueHelper<bool>::CastOrUnbox(static_cast<RevealBrush*>(this)->GetValue(s_AlwaysUseFallbackProperty));
00117 }
00118
00119 void RevealBrushProperties::Color(winrt::Color const& value)
00120 {
00121     [[gsl::suppress(con)]]
00122     {
00123     static_cast<RevealBrush*>(this)->SetValue(s_ColorProperty, ValueHelper<winrt::Color>::BoxValueIfNecessary(value));
00124     }
00125 }
00126
00127 winrt::Color RevealBrushProperties::Color()
00128 {
00129     return ValueHelper<winrt::Color>::CastOrUnbox(static_cast<RevealBrush*>(this)->GetValue(s_ColorProperty));
00130 }
00131
00132
00133 void RevealBrushProperties::SetState(winrt::UIElement const& target, winrt::RevealBrushState const& value)
00134 {
00135     target.SetValue(s_StateProperty, ValueHelper<winrt::RevealBrushState>::BoxValueIfNecessary(value));
00136 }
00137
00138 winrt::RevealBrushState RevealBrushProperties::GetState(winrt::UIElement const& target)
00139 {
00140     return ValueHelper<winrt::RevealBrushState>::CastOrUnbox(target.GetValue(s_StateProperty));
00141 }
00142
00143 void RevealBrushProperties::TargetTheme(winrt::ApplicationTheme const& value)
00144 {
00145     [[gsl::suppress(con)]]
00146     {
00147     static_cast<RevealBrush*>(this)->SetValue(s_TargetThemeProperty, ValueHelper<winrt::ApplicationTheme>::BoxValueIfNecessary(value));
00148     }
00149 }
00150
00151 winrt::ApplicationTheme RevealBrushProperties::TargetTheme()
00152 {
00153     return ValueHelper<winrt::ApplicationTheme>::CastOrUnbox(static_cast<RevealBrush*>(this)->GetValue(s_TargetThemeProperty));
00154 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/TestUI/ProgressRingAxeTestPage.xaml.cs Source File

  • File List
  • File Members
  • ProgressRing
  • TestUI

ProgressRingAxeTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 namespace MUXControlsTestApp
00004 {
00005     [AxeScanTestPage(Name = "ProgressRing-Axe")]
00006     public sealed partial class ProgressRingAxeTestPage : TestPage
00007     {
00008         public ProgressRingAxeTestPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/SortingAndFilteringPage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples

SortingAndFilteringPage.xaml.cs

Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections;
00003 using System.Collections.Generic;
00004 using System.Collections.Specialized;
00005 using System.Linq;
00006 using System.Reflection;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009
00010 namespace MUXControlsTestApp.Samples
00011 {
00012     public sealed partial class SortingAndFilteringPage : Page
00013     {
00014         MyCollection SourceForRepeater = new MyCollection(null);
00015         private bool IsSortDescending = false;
00016         private Type[] AllTypes = typeof(SortingAndFilteringPage).GetTypeInfo().Assembly.GetTypes();
00017
00018         public SortingAndFilteringPage()
00019         {
00020             this.InitializeComponent();
00021
00022             SourceForRepeater = new MyCollection(AllTypes);
00023             repeater.ItemsSource = SourceForRepeater;
00024         }
00025
00026         private void OnSortAscClick(object sender, RoutedEventArgs e)
00027         {
00028             if (IsSortDescending)
00029             {
00030                 IsSortDescending = false;
00031                 UpdateSortAndFilter();
00032             }
00033         }
00034
00035         private void OnSortDesClick(object sender, RoutedEventArgs e)
00036         {
00037             if (!IsSortDescending)
00038             {
00039                 IsSortDescending = true;
00040                 UpdateSortAndFilter();
00041             }
00042         }
00043
00044         private void filterText_TextChanged(object sender, TextChangedEventArgs e)
00045         {
00046             UpdateSortAndFilter();
00047         }
00048
00049         private void UpdateSortAndFilter()
00050         {
00051             var filteredTypes = AllTypes.Where(i => i.ToString().ToLower().Contains(filterText.Text.ToLower()));
00052             var sortedFilteredTypes = IsSortDescending ?
00053                 filteredTypes.OrderByDescending(i => i.ToString()) :
00054                 filteredTypes.OrderBy(i => i.ToString());
00055             SourceForRepeater.InitializeCollection(sortedFilteredTypes);
00056         }
00057     }
00058
00059     public class MyCollection : IList, INotifyCollectionChanged, IKeyIndexMapping
00060     {
00061         private List<object> inner = new List<object>();
00062
00063         public int Count => inner.Count;
00064
00065         public object this[int index]
00066         {
00067             get
00068             {
00069                 return inner[index];
00070             }
00071
00072             set
00073             {
00074                 inner[index] = value;
00075             }
00076         }
00077
00078         public MyCollection(IEnumerable<object> collection)
00079         {
00080             InitializeCollection(collection);
00081         }
00082
00083         public void InitializeCollection(IEnumerable<object> collection)
00084         {
00085             inner.Clear();
00086             if (collection != null)
00087             {
00088                 inner.AddRange(collection);
00089             }
00090
00091             if (CollectionChanged != null)
00092             {
00093                 CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
00094             }
00095         }
00096
00097         public event NotifyCollectionChangedEventHandler CollectionChanged;
00098
00099         public string KeyFromIndex(int index)
00100         {
00101             return inner[index].ToString();
00102         }
00103
00104         public int IndexFromKey(string key)
00105         {
00106             return inner.IndexOf(int.Parse(key));
00107         }
00108
00109         #region Not used by ItemsRepeater
00110
00111         public bool IsSynchronized => false;
00112
00113
00114         public bool IsFixedSize => false;
00115
00116         public bool IsReadOnly => false;
00117
00118
00119         public object SyncRoot => throw new NotImplementedException();
00120
00121         public int Add(object value)
00122         {
00123             throw new NotImplementedException();
00124         }
00125
00126         public void Clear()
00127         {
00128             throw new NotImplementedException();
00129         }
00130
00131         public bool Contains(object value)
00132         {
00133             throw new NotImplementedException();
00134         }
00135
00136         public int IndexOf(object value)
00137         {
00138             throw new NotImplementedException();
00139         }
00140
00141         public void Insert(int index, object value)
00142         {
00143             throw new NotImplementedException();
00144         }
00145
00146         public void Remove(object value)
00147         {
00148             throw new NotImplementedException();
00149         }
00150
00151         public void RemoveAt(int index)
00152         {
00153             throw new NotImplementedException();
00154         }
00155
00156         public void CopyTo(Array array, int index)
00157         {
00158             throw new NotImplementedException();
00159         }
00160
00161         public IEnumerator GetEnumerator()
00162         {
00163             throw new NotImplementedException();
00164         }
00165         #endregion
00166     }
00167
00168
00169 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayout.h Source File

  • File List
  • File Members
  • Repeater

FlowLayout.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "VirtualizingLayout.h"
00007 #include "FlowLayout.g.h"
00008 #include "FlowLayout.properties.h"
00009 #include "IFlowLayoutAlgorithmDelegates.h"
00010 #include "OrientationBasedMeasures.h"
00011 #include "FlowLayoutState.h"
00012
00013 class FlowLayout :
00014     public ReferenceTracker<FlowLayout, winrt::implementation::FlowLayoutT, VirtualizingLayout>,
00015     public IFlowLayoutAlgorithmDelegates,
00016     public OrientationBasedMeasures,
00017     public FlowLayoutProperties
00018 {
00019 public:
00020     FlowLayout();
00021
00022     // Disambiguate EnsureProperties and ClearProperties
00023     using FlowLayoutProperties::EnsureProperties;
00024     using FlowLayoutProperties::ClearProperties;
00025
00026 #pragma region IVirtualizingLayoutOverrides
00027     void InitializeForContextCore(winrt::VirtualizingLayoutContext const& context);
00028     void UninitializeForContextCore(winrt::VirtualizingLayoutContext const& context);
00029     winrt::Size MeasureOverride(
00030         winrt::VirtualizingLayoutContext const& context,
00031         winrt::Size const& availableSize);
00032     winrt::Size ArrangeOverride(
00033         winrt::VirtualizingLayoutContext const& context,
00034         winrt::Size const& finalSize);
00035     void OnItemsChangedCore(
00036         winrt::VirtualizingLayoutContext const& context,
00037         winrt::IInspectable const& source,
00038         winrt::NotifyCollectionChangedEventArgs const& args);
00039 #pragma endregion
00040
00041 #pragma region IFlowLayoutOverrides
00042     winrt::Size GetMeasureSize(
00043          int index,
00044         winrt::Size const& availableSize);
00045     winrt::Size GetProvisionalArrangeSize(
00046          int index,
00047         winrt::Size const& measureSize,
00048         winrt::Size const& desiredSize);
00049     bool ShouldBreakLine(
00050          int index,
00051          double remainingSpace);
00052     winrt::FlowLayoutAnchorInfo GetAnchorForRealizationRect(
00053         winrt::Size const& availableSize,
00054         winrt::VirtualizingLayoutContext const& context);
00055     winrt::FlowLayoutAnchorInfo GetAnchorForTargetElement(
00056          int targetIndex,
00057         winrt::Size const& availableSize,
00058         winrt::VirtualizingLayoutContext const& context);
00059     winrt::Rect GetExtent(
00060         winrt::Size const& availableSize,
00061         winrt::VirtualizingLayoutContext const& context,
00062         winrt::UIElement const& firstRealized,
00063          int firstRealizedItemIndex,
00064         winrt::Rect const& firstRealizedLayoutBounds,
00065         winrt::UIElement const& lastRealized,
00066          int lastRealizedItemIndex,
00067         winrt::Rect const& lastRealizedLayoutBounds);
00068     void OnElementMeasured(
00069         winrt::UIElement const& element,
00070         int index,
00071         winrt::Size const& availableSize,
00072         winrt::Size const& measureSize,
00073         winrt::Size const& desiredSize,
00074         winrt::Size const& provisionalArrangeSize,
00075         winrt::VirtualizingLayoutContext const& context);
00076     void OnLineArranged(
00077          int startIndex,
00078          int countInLine,
00079          double lineSize,
00080         winrt::VirtualizingLayoutContext const& context);
00081 #pragma endregion
00082
00083 #pragma region IFlowLayoutAlgorithmDelegates
00084      winrt::Size Algorithm_GetMeasureSize(int index, const winrt::Size& availableSize, const winrt::VirtualizingLayoutContext& context) override;
00085      winrt::Size Algorithm_GetProvisionalArrangeSize(int index, const winrt::Size& measureSize, winrt::Size const& desiredSize, const winrt::VirtualizingLayoutContext& context) override;
00086      bool Algorithm_ShouldBreakLine(int index, double remainingSpace) override;
00087      winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForRealizationRect(
00088          const winrt::Size& availableSize,
00089          const winrt::VirtualizingLayoutContext& context) override;
00090      winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForTargetElement(
00091          int targetIndex,
00092          const winrt::Size& availableSize,
00093          const winrt::VirtualizingLayoutContext& context) override;
00094      winrt::Rect Algorithm_GetExtent(const winrt::Size& availableSize,
00095         const winrt::VirtualizingLayoutContext& context,
00096         const winrt::UIElement& firstRealized,
00097         int firstRealizedItemIndex,
00098         const winrt::Rect& firstRealizedLayoutBounds,
00099         const winrt::UIElement& lastRealized,
00100         int lastRealizedItemIndex,
00101         const winrt::Rect& lastRealizedLayoutBounds) override;
00102      void Algorithm_OnElementMeasured(
00103         const winrt::UIElement& element,
00104         const int index,
00105         const winrt::Size& availableSize,
00106         const winrt::Size& measureSize,
00107         const winrt::Size& desiredSize,
00108         const winrt::Size& provisionalArrangeSize,
00109         const winrt::VirtualizingLayoutContext& context)override;
00110      void Algorithm_OnLineArranged(
00111         int startIndex,
00112         int countInLine,
00113         double lineSize,
00114         const winrt::VirtualizingLayoutContext& context)override;
00115 #pragma endregion
00116
00117      void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00118
00119 private:
00120     double GetAverageLineInfo(
00121         const winrt::Size& availableSize,
00122         const winrt::VirtualizingLayoutContext& context,
00123         const winrt::com_ptr<FlowLayoutState>& flowState,
00124         double& avgCountInLine);
00125
00126     winrt::com_ptr<FlowLayoutState> GetAsFlowState(const winrt::IInspectable& state)
00127     {
00128         return winrt::get_self<FlowLayoutState>(state.as<winrt::FlowLayoutState>())->get_strong();
00129     }
00130
00131     void InvalidateLayout()
00132     {
00133         InvalidateMeasure();
00134     }
00135
00136     ::FlowLayoutAlgorithm& GetFlowAlgorithm(const winrt::VirtualizingLayoutContext& context)
00137     {
00138         return GetAsFlowState(context.LayoutState())->FlowAlgorithm();
00139     }
00140
00141     bool DoesRealizationWindowOverlapExtent(const winrt::Rect& realizationWindow, const winrt::Rect& extent)
00142     {
00143         return MajorEnd(realizationWindow) >= MajorStart(extent) && MajorStart(realizationWindow) <= MajorEnd(extent);
00144     }
00145
00146     double LineSpacing()
00147     {
00148         return GetScrollOrientation() == ScrollOrientation::Vertical ? m_minRowSpacing : m_minColumnSpacing;
00149     }
00150
00151     double MinItemSpacing()
00152     {
00153         return GetScrollOrientation() == ScrollOrientation::Vertical ? m_minColumnSpacing : m_minRowSpacing;
00154     }
00155
00156     void UpdateIndexBasedLayoutOrientation(const winrt::Orientation& orientation);
00157
00158     // Fields
00159     double m_minRowSpacing{};
00160     double m_minColumnSpacing{};
00161     winrt::FlowLayoutLineAlignment m_lineAlignment{ winrt::FlowLayoutLineAlignment::Start };
00162
00163     // !!! WARNING !!!
00164     // Any storage here needs to be related to layout configuration.
00165     // layout specific state needs to be stored in FlowLayoutState.
00166 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TextCommandBarFlyout.properties.cpp Source File

  • File List
  • File Members
  • Generated

TextCommandBarFlyout.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TextCommandBarFlyout.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TextCommandBarFlyout)
00012 }
00013
00014 #include "TextCommandBarFlyout.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerTests Member List

This is the complete list of members for ItemContainerTests, including all inherited members.
VerifyDefaultPropertyValues() | ItemContainerTests | [inline]
VerifyItemContainerUIASelectionBehavior() | ItemContainerTests | [inline]
VerifySettableAPIValues() | ItemContainerTests | [inline]
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarAutomationPeer.cpp Source File

  • File List
  • File Members
  • MenuBar

MenuBarAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "MenuBarAutomationPeer.h"
00008 #include "Utils.h"
00009
00010 #include "MenuBarAutomationPeer.properties.cpp"
00011
00012 MenuBarAutomationPeer::MenuBarAutomationPeer(winrt::MenuBar const& owner) : ReferenceTracker(owner)
00013 {
00014 }
00015
00016 winrt::AutomationControlType MenuBarAutomationPeer::GetAutomationControlTypeCore()
00017 {
00018     return winrt::AutomationControlType::MenuBar;
00019 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/PaneBehaviorTests.cs Source File

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests

PaneBehaviorTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 using Common;
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using System.Threading.Tasks;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 using Microsoft.Windows.Apps.Test.Automation;
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.NavigationViewTests
00022 {
00023     [TestClass]
00024     public class PaneBehaviorTests : NavigationViewTestsBase
00025     {
00026         [ClassInitialize]
00027         [TestProperty("RunAs", "User")]
00028         [TestProperty("Classification", "Integration")]
00029         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00030         [TestProperty("MUXControlsTestEnabledForPhone", "True")]
00031         public static void ClassInitialize(TestContext testContext)
00032         {
00033             TestEnvironment.Initialize(testContext);
00034         }
00035
00036         [TestMethod]
00037         [TestProperty("TestSuite", "A")]
00038         public void PaneClosedUponLaunch()
00039         {
00040             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00041             foreach (var testScenario in testScenarios)
00042             {
00043                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Navigation Minimal Test" }))
00044                 {
00045                     Log.Comment("Verify that NavigationView with DisplayMode set to 'Auto' and a narrow width does not display pane on load.");
00046                     CheckBox isAutoPaneOpenCheckBox = new CheckBox(FindElement.ById("IsAutoPaneOpenCheckBox"));
00047                     Wait.ForIdle();
00048                     Verify.IsTrue(isAutoPaneOpenCheckBox.ToggleState == ToggleState.Off);
00049
00050                     Log.Comment("Verify that NavigationView with DisplayMode set to 'LeftMinimal' does not display pane on load.");
00051                     CheckBox isLeftMinimalPaneOpenCheckBox = new CheckBox(FindElement.ById("IsLeftMinimalPaneOpenCheckBox"));
00052                     Verify.IsTrue(isLeftMinimalPaneOpenCheckBox.ToggleState == ToggleState.Off);
00053
00054                     Log.Comment("Verify that NavigationView with DisplayMode set to 'LeftCompact' does not display pane on load.");
00055                     CheckBox isLeftCompactPaneOpenCheckBox = new CheckBox(FindElement.ById("IsLeftCompactPaneOpenCheckBox"));
00056                     Verify.IsTrue(isLeftCompactPaneOpenCheckBox.ToggleState == ToggleState.Off);
00057                 }
00058
00059             }
00060         }
00061
00062         [TestMethod]
00063         [TestProperty("TestSuite", "A")]
00064         public void PaneOpenCloseTestPartTwo() // Otherwise this test will exceed the 30 second timeout in catgates chk runs
00065         {
00066             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00067             foreach (var testScenario in testScenarios)
00068             {
00069                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00070                 {
00071                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00072
00073                     // On phone, the pane will initially be in the closed compact state, so open it before
00074                     // proceeding with the test.
00075                     if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
00076                     {
00077                         using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
00078                         {
00079                             isPaneOpenCheckBox.Toggle();
00080                             waiter.Wait();
00081                         }
00082                     }
00083
00084                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00085
00086                     Button navButton = new Button(FindElement.ById("TogglePaneButton"));
00087
00088                     Log.Comment("Verify that after explicitly closing the nav pane, changing display mode doesn't reopen it");
00089                     navButton.Invoke();
00090                     Wait.ForIdle();
00091                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after explicitly closing the nav pane & changing display mode");
00092                     SetNavViewWidth(ControlWidth.Medium);
00093                     Wait.ForIdle();
00094                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
00095                     SetNavViewWidth(ControlWidth.Wide);
00096                     Wait.ForIdle();
00097                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
00098
00099                     Log.Comment("Verify that selecting a menu item in minimal display mode opens the pane");
00100                     SetNavViewWidth(ControlWidth.Narrow);
00101                     Wait.ForIdle();
00102                     navButton.Invoke();
00103                     Wait.ForIdle();
00104                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after selecting a menu item in minimal display mode");
00105
00106                     Log.Comment("Invoke Music item to close the pane");
00107                     var music = new Button(FindElement.ByName("Music"));
00108                     music.Click();
00109                     Wait.ForIdle();
00110
00111                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after invoking Music item");
00112                 }
00113             }
00114         }
00115
00116         [TestMethod]
00117         [TestProperty("TestSuite", "A")]
00118         public void PaneOpenCloseEventsTest()
00119         {
00120             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00121             foreach (var testScenario in testScenarios)
00122             {
00123                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00124                 {
00125                     TextBlock lastIngEventTextblock = new TextBlock(FindElement.ByName("LastIngEventText"));
00126                     TextBlock lastEdEventTextblock = new TextBlock(FindElement.ByName("LastEdEventText"));
00127
00128                     Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
00129                     togglePaneButton.Invoke();
00130                     Wait.ForIdle();
00131
00132                     WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00133                     Verify.AreEqual("PaneClosed event fired", lastEdEventTextblock.DocumentText);
00134                     Verify.AreEqual("PaneClosing event fired", lastIngEventTextblock.DocumentText);
00135
00136                     togglePaneButton.Invoke();
00137                     Wait.ForIdle();
00138
00139                     WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00140                     Verify.AreEqual("PaneOpened event fired", lastEdEventTextblock.DocumentText);
00141                     Verify.AreEqual("PaneOpening event fired", lastIngEventTextblock.DocumentText);
00142                 }
00143             }
00144         }
00145
00146         // Test for issue 450 https://github.com/Microsoft/microsoft-ui-xaml/issues/450
00147         [TestMethod]
00148         [TestProperty("TestSuite", "A")]
00149         public void CompactModeAutoPaneClosingTest()
00150         {
00151             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00152             {
00153                 // Unmaximize the window
00154                 KeyboardHelper.PressKey(Key.Down, ModifierKey.Windows, 1);
00155
00156                 // Resize window quickly
00157                 KeyboardHelper.PressDownModifierKey(ModifierKey.Windows);
00158                 KeyboardHelper.PressKeySequence(new[] { Key.Left, Key.Right, Key.Left, Key.Right, Key.Left });
00159                 KeyboardHelper.ReleaseModifierKey(ModifierKey.Windows);
00160
00161                 Wait.ForIdle();
00162
00163                 CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00164                 Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
00165
00166                 var getVisualStateButton = new Button(FindElement.ByName("GetNavViewActiveVisualStates"));
00167                 getVisualStateButton.Invoke();
00168                 Wait.ForIdle();
00169                 var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
00170                 Verify.IsTrue(result.GetText().Contains("ListSizeCompact"), "Verify pane list is in ListSizeCompact state");
00171
00172                 // Maximize the window
00173                 KeyboardHelper.PressKey(Key.Right, ModifierKey.Windows, 1);
00174                 KeyboardHelper.PressKey(Key.Up, ModifierKey.Windows, 1);
00175             }
00176         }
00177
00178         [TestMethod]
00179         [TestProperty("TestSuite", "A")]
00180         public void PaneTabNavigationTest()
00181         {
00182             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00183             foreach (var testScenario in testScenarios)
00184             {
00185                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00186                 {
00187                     SetNavViewWidth(ControlWidth.Wide);
00188
00189                     Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
00190                     UIObject firstItem = FindElement.ByName("Home");
00191                     UIObject settingsItem = FindElement.ByName("Settings");
00192                     UIObject nextTabTarget = FindElement.ByName("WidthComboBox");
00193
00194                     CheckBox autoSuggestCheckBox = new CheckBox(FindElement.ByName("AutoSuggestCheckbox"));
00195                     autoSuggestCheckBox.Uncheck();
00196                     Wait.ForIdle();
00197
00198                     Log.Comment("Verify that in Expanded mode, tab navigation can leave the pane");
00199                     firstItem.SetFocus();
00200                     Wait.ForIdle();
00201                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00202                     Wait.ForIdle();
00203
00204                     Wait.RetryUntilEvalFuncSuccessOrTimeout(
00205                         () => { return togglePaneButton.HasKeyboardFocus; },
00206                         retryTimoutByMilliseconds: 3000
00207                     );
00208
00209                     Log.Comment("Verify pressing shift-tab from the first menu item goes to the toggle button");
00210                     Verify.IsTrue(togglePaneButton.HasKeyboardFocus);
00211
00212                     settingsItem.SetFocus();
00213                     Wait.ForIdle();
00214                     KeyboardHelper.PressKey(Key.Tab);
00215                     Wait.ForIdle();
00216                     Log.Comment("Verify pressing tab from settings goes to the first tab stop in the content area");
00217                     Verify.IsTrue(nextTabTarget.HasKeyboardFocus);
00218
00219                     SetNavViewWidth(ControlWidth.Medium);
00220
00221                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00222                     isPaneOpenCheckBox.Check();
00223                     Wait.ForIdle();
00224
00225                     Log.Comment("Verify that in an overlay mode, tab navigation cannot leave the pane while the pane is open");
00226                     firstItem.SetFocus();
00227                     Wait.ForIdle();
00228                     KeyboardHelper.PressKey(Key.Tab, ModifierKey.Shift, 1);
00229                     Wait.ForIdle();
00230                     Log.Comment("Verify pressing shift-tab from the first menu item goes to settings");
00231                     Verify.IsTrue(settingsItem.HasKeyboardFocus);
00232
00233                     settingsItem.SetFocus();
00234                     Wait.ForIdle();
00235                     KeyboardHelper.PressKey(Key.Tab);
00236                     Wait.ForIdle();
00237                     Log.Comment("Verify pressing tab from settings goes to the first menu item");
00238                     Verify.IsTrue(firstItem.HasKeyboardFocus);
00239                 }
00240             }
00241         }
00242
00243         [TestMethod]
00244         [TestProperty("TestSuite", "A")]
00245         public void ForceIsPaneOpenToFalseOnLeftNavTest()
00246         {
00247             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Navigation IsPaneOpen Test" }))
00248             {
00249                 Log.Comment("Verify IsPaneOpen=False would not open the pane by default");
00250                 CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00251                 Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False");
00252
00253                 Button navButton = new Button(FindElement.ById("TogglePaneButton"));
00254
00255                 Log.Comment("Verify that clicking the navigation button opens the nav pane");
00256                 navButton.Invoke();
00257                 Wait.ForIdle();
00258                 Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after clicking the navigation button");
00259             }
00260         }
00261
00262         [TestMethod]
00263         [TestProperty("TestSuite", "A")]
00264         public void PaneOpenCloseTest()
00265         {
00266             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00267             foreach (var testScenario in testScenarios)
00268             {
00269                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00270                 {
00271                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00272
00273                     // On phone, the pane will initially be in the closed compact state, so open it before
00274                     // proceeding with the test.
00275                     if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
00276                     {
00277                         using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
00278                         {
00279                             isPaneOpenCheckBox.Toggle();
00280                             waiter.Wait();
00281                         }
00282                     }
00283
00284                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00285
00286                     Button navButton = new Button(FindElement.ById("TogglePaneButton"));
00287
00288                     Log.Comment("Verify that clicking the navigation button closes the nav pane");
00289                     navButton.Invoke();
00290                     Wait.ForIdle();
00291                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after clicking the navigation button");
00292
00293                     Log.Comment("Verify that clicking the navigation button opens the nav pane");
00294                     navButton.Invoke();
00295                     Wait.ForIdle();
00296                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after clicking the navigation button");
00297
00298                     Log.Comment("Verify that decreasing the width of the control from expanded to compact closes the pane");
00299                     SetNavViewWidth(ControlWidth.Medium);
00300                     Wait.ForIdle();
00301                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing the width of the control from expanded to compact");
00302
00303                     Log.Comment("Verify that increasing the width of the control from compact to expanded opens the pane");
00304                     SetNavViewWidth(ControlWidth.Wide);
00305                     Wait.ForIdle();
00306                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after increasing the width of the control from compact to expanded");
00307                 }
00308             }
00309         }
00310
00311         [TestMethod]
00312         [TestProperty("TestSuite", "A")]
00313         public void PaneNotOpeningTopMode()
00314         {
00315             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00316             foreach (var testScenario in testScenarios)
00317             {
00318                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView TopNav Test" }))
00319                 {
00320                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00321
00322                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be false");
00323
00324                     GamepadHelper.PressButton(FindElement.ById("NavView"), GamepadButton.View);
00325
00326                     Wait.ForIdle();
00327                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True after increasing the width of the control from compact to expanded");
00328                 }
00329             }
00330         }
00331
00332         [TestMethod] // Bug 18159731
00333         [TestProperty("TestSuite", "A")]
00334         public void PaneOpenForceCloseTest()
00335         {
00336             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00337             foreach (var testScenario in testScenarios)
00338             {
00339                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00340                 {
00341                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00342
00343                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00344
00345                     Button navButton = new Button(FindElement.ById("TogglePaneButton"));
00346
00347                     Log.Comment("Verify that clicking the navigation button closes the nav pane");
00348                     navButton.Invoke();
00349                     Wait.ForIdle();
00350                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after clicking the navigation button");
00351
00352                     TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
00353
00354                     Log.Comment("Verify that decreasing the width of the control from expanded to Narrow and force closed pane");
00355                     SetNavViewWidth(ControlWidth.Narrow);
00356                     Wait.ForIdle();
00357                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing the width of the control from expanded to Narrow");
00358                     Verify.AreEqual(minimal, displayModeTextBox.DocumentText);
00359
00360                     Log.Comment("Verify that decreasing the width of the control from Narrow to compact and force closed pane");
00361                     SetNavViewWidth(ControlWidth.Medium);
00362                     Wait.ForIdle();
00363                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing the width of the control from Narrow to compact");
00364                     Verify.AreEqual(compact, displayModeTextBox.DocumentText);
00365
00366                     Log.Comment("Verify that increasing the width of the control from compact to expanded and force closed pane");
00367                     SetNavViewWidth(ControlWidth.Wide);
00368                     Wait.ForIdle();
00369                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after increasing the width of the control from compact to expanded");
00370                     Verify.AreEqual(expanded, displayModeTextBox.DocumentText);
00371                 }
00372             }
00373         }
00374
00375         [TestMethod]
00376         [TestProperty("TestSuite", "A")]
00377         public void VerifyPaneTitlePresentAndUpdates()
00378         {
00379             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00380             foreach (var testScenario in testScenarios)
00381             {
00382                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00383                 {
00384                     TextBlock paneTitleTextBlock = new TextBlock(FindElement.ByName("NavView Test"));
00385
00386                     Button changePaneTitleButton = new Button(FindElement.ByName("ChangePaneTitleButton"));
00387                     changePaneTitleButton.Invoke();
00388                     Wait.ForIdle();
00389
00390                     Verify.AreEqual("", paneTitleTextBlock.DocumentText, "Verify that the pane title is empty");
00391                 }
00392             }
00393         }
00394
00395         [TestMethod]
00396         [TestProperty("TestSuite", "A")]
00397         public void VerifyPaneVisibleOnInit()
00398         {
00399             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
00400             {
00401                 Log.Comment("Verify PaneIsVisibleItem is invisible");
00402                 VerifyElement.NotFound("PaneIsVisibleItem", FindBy.Name);
00403
00404                 FindElement.ByName<Button>("ChangePaneVisible").Invoke();
00405                 Wait.ForIdle();
00406
00407                 Log.Comment("Verify PaneIsVisibleItem is visible");
00408                 VerifyElement.Found("PaneIsVisibleItem", FindBy.Name);
00409
00410             }
00411         }
00412
00413         [TestMethod]
00414         [TestProperty("TestSuite", "A")]
00415         public void PaneFooterContentTest()
00416         {
00417             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00418             {
00419                 Log.Comment("Verify that button in PaneFooterContent exists");
00420                 VerifyElement.Found("PaneFooterButton", FindBy.Id);
00421             }
00422         }
00423
00424         [TestMethod]
00425         [TestProperty("TestSuite", "A")]
00426         public void VerifyPaneIsClosedWhenClickingOnSelectedItem()
00427         {
00428             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00429             {
00430                 var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
00431                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00432
00433                 Log.Comment("Test PaneDisplayMode=LeftMinimal");
00434                 panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
00435                 Wait.ForIdle();
00436
00437                 WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00438
00439                 Log.Comment("Click on ToggleButton");
00440                 Button navButton = new Button(FindElement.ById("TogglePaneButton"));
00441                 navButton.Invoke();
00442                 Wait.ForIdle();
00443
00444                 WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00445
00446                 Log.Comment("Select Apps");
00447                 UIObject appsItem = FindElement.ByName("Apps");
00448                 appsItem.Click();
00449                 Wait.ForIdle();
00450
00451                 WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00452
00453                 Log.Comment("Click on ToggleButton");
00454                 navButton.Invoke();
00455                 Wait.ForIdle();
00456
00457                 Log.Comment("Click on SelectedItem Apps");
00458                 appsItem.Click();
00459                 Wait.ForIdle();
00460
00461                 WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00462             }
00463         }
00464
00465         [TestMethod]
00466         [TestProperty("TestSuite", "A")]
00467         public void VerifyPaneIsClosedAfterSelectingItem()
00468         {
00469             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00470             {
00471                 var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
00472                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00473
00474                 Log.Comment("Test PaneDisplayMode=LeftMinimal");
00475                 panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
00476                 Wait.ForIdle();
00477
00478                 WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00479
00480                 Log.Comment("Click on ToggleButton");
00481                 Button navButton = new Button(FindElement.ById("TogglePaneButton"));
00482                 navButton.Invoke();
00483                 Wait.ForIdle();
00484
00485                 WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00486
00487                 TextBlock selectionRaisedIndicator = new TextBlock(FindElement.ById("SelectionChangedRaised"));
00488
00489                 Log.Comment("Select Apps");
00490                 ComboBox selectedItem = new ComboBox(FindElement.ById("SelectedItemCombobox"));
00491                 selectedItem.SelectItemByName("Apps");
00492                 Verify.AreEqual("True", selectionRaisedIndicator.GetText());
00493                 Wait.ForIdle();
00494
00495                 WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00496             }
00497         }
00498
00499         [TestMethod]
00500         [TestProperty("TestSuite", "A")]
00501         public void PaneDisplayModeLeftLeftCompactLeftMinimalTest()
00502         {
00503             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00504             {
00505                 var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
00506                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00507
00508                 // Tests with PaneDisplayMode=Left/LeftCompact/LeftMinimal.
00509                 // This disables all adaptive layout behavior.
00510
00511                 Log.Comment("Test PaneDisplayMode=Left");
00512                 panelDisplayModeComboBox.SelectItemByName("Left");
00513                 Wait.ForIdle();
00514
00515                 Log.Comment("DisplayMode should be 'Expanded' regardless of size");
00516                 SetNavViewWidth(ControlWidth.Narrow);
00517                 Wait.ForIdle();
00518                 Verify.AreEqual(expanded, displayModeTextBox.DocumentText);
00519
00520                 SetNavViewWidth(ControlWidth.Medium);
00521                 Wait.ForIdle();
00522                 Verify.AreEqual(expanded, displayModeTextBox.DocumentText);
00523
00524                 SetNavViewWidth(ControlWidth.Wide);
00525                 Wait.ForIdle();
00526                 Verify.AreEqual(expanded, displayModeTextBox.DocumentText);
00527
00528
00529                 Log.Comment("Test PaneDisplayMode=LeftCompact");
00530                 panelDisplayModeComboBox.SelectItemByName("LeftCompact");
00531                 Wait.ForIdle();
00532
00533                 Log.Comment("DisplayMode should be 'Compact' regardless of size");
00534                 SetNavViewWidth(ControlWidth.Narrow);
00535                 Wait.ForIdle();
00536                 Verify.AreEqual(compact, displayModeTextBox.DocumentText);
00537
00538                 SetNavViewWidth(ControlWidth.Medium);
00539                 Wait.ForIdle();
00540                 Verify.AreEqual(compact, displayModeTextBox.DocumentText);
00541
00542                 SetNavViewWidth(ControlWidth.Wide);
00543                 Wait.ForIdle();
00544                 Verify.AreEqual(compact, displayModeTextBox.DocumentText);
00545
00546
00547                 Log.Comment("Test PaneDisplayMode=LeftMinimal");
00548                 panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
00549                 Wait.ForIdle();
00550
00551                 Log.Comment("DisplayMode should be 'Minimal' regardless of size");
00552                 SetNavViewWidth(ControlWidth.Narrow);
00553                 Wait.ForIdle();
00554                 Verify.AreEqual(minimal, displayModeTextBox.DocumentText);
00555
00556                 SetNavViewWidth(ControlWidth.Medium);
00557                 Wait.ForIdle();
00558                 Verify.AreEqual(minimal, displayModeTextBox.DocumentText);
00559
00560                 SetNavViewWidth(ControlWidth.Wide);
00561                 Wait.ForIdle();
00562                 Verify.AreEqual(minimal, displayModeTextBox.DocumentText);
00563             }
00564         }
00565
00566         [TestMethod]
00567         [TestProperty("TestSuite", "B")]
00568         public void EnsurePaneCanBeHidden()
00569         {
00570             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00571             {
00572                 var paneRoot = FindElement.ById("PaneRoot");
00573                 Verify.IsFalse(paneRoot.IsOffscreen);
00574
00575                 var paneVisibleCheckBox = new CheckBox(FindElement.ByName("IsPaneVisibleCheckBox"));
00576                 paneVisibleCheckBox.Uncheck();
00577                 Wait.ForIdle();
00578
00579                 Verify.IsTrue(paneRoot.IsOffscreen);
00580             }
00581         }
00582
00583         [TestMethod]
00584         [TestProperty("TestSuite", "B")]
00585         [TestProperty("TestPass:MinOSVer", WindowsOSVersion.RS5)]
00586         public void EnsurePaneCanBeHiddenWithFixedWindowSize()
00587         {
00588             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00589             {
00590                 var paneRoot = FindElement.ById("PaneRoot");
00591                 Verify.IsFalse(paneRoot.IsOffscreen);
00592
00593                 SetNavViewWidth(ControlWidth.Wide);
00594
00595                 var paneVisibleCheckBox = new CheckBox(FindElement.ByName("IsPaneVisibleCheckBox"));
00596
00597                 paneVisibleCheckBox.Uncheck();
00598                 Wait.ForIdle();
00599                 Verify.IsTrue(paneRoot.IsOffscreen);
00600
00601                 paneVisibleCheckBox.Check();
00602                 Wait.ForIdle();
00603                 Verify.IsFalse(paneRoot.IsOffscreen);
00604             }
00605         }
00606
00607         [TestMethod]
00608         [TestProperty("TestSuite", "B")]
00609         public void VerifyIconsRespectCompactPaneLength()
00610         {
00611             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView compact pane length test" }))
00612             {
00613                 var checkMenuItemsButton = FindElement.ByName("CheckMenuItemsOffset");
00614                 var compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
00615                 var displayModeToggle = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00616                 var currentStatus = new CheckBox(FindElement.ByName("MenuItemsCorrectOffset"));
00617
00618                 checkMenuItemsButton.Click();
00619                 Log.Comment("Verifying compact pane length set before loading working");
00620                 Wait.ForIdle();
00621                 compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
00622                 Verify.IsTrue(currentStatus.ToggleState == ToggleState.On);
00623
00624                 Log.Comment("Verifying changing compact pane length in left mode working");
00625                 compactpaneCheckbox.SelectItemByName("96");
00626                 Wait.ForIdle();
00627
00628                 checkMenuItemsButton.Click();
00629                 Wait.ForIdle();
00630                 compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
00631                 Verify.IsTrue(currentStatus.ToggleState == ToggleState.On);
00632
00633                 // Check if changing displaymode to top and then changing length gets used correctly
00634                 Log.Comment("Verifying changing compact pane length during top mode working");
00635                 displayModeToggle.SelectItemByName("Top");
00636                 compactpaneCheckbox.SelectItemByName("48");
00637                 Wait.ForIdle();
00638
00639                 displayModeToggle.SelectItemByName("Left");
00640                 Wait.ForIdle();
00641
00642                 checkMenuItemsButton.Click();
00643                 Wait.ForIdle();
00644                 compactpaneCheckbox = new ComboBox(FindElement.ByName("CompactPaneLengthComboBox"));
00645                 Verify.IsTrue(currentStatus.ToggleState == ToggleState.On);
00646             }
00647         }
00648
00649         [TestMethod]
00650         [TestProperty("TestSuite", "B")]
00651         public void VerifyCorrectVisualStateWhenClosingPaneInLeftDisplayMode()
00652         {
00653             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00654             {
00655                 // Test for explicit pane close
00656
00657                 // make sure the NavigationView is in left mode with pane expanded
00658                 Log.Comment("Change display mode to left expanded");
00659                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00660                 panelDisplayModeComboBox.SelectItemByName("Left");
00661                 Wait.ForIdle();
00662
00663                 TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
00664                 Verify.AreEqual(expanded, displayModeTextBox.DocumentText);
00665
00666                 Button togglePaneButton = new Button(FindElement.ById("TogglePaneButton"));
00667
00668                 // manually close pane
00669                 Log.Comment("Close NavView pane explicitly");
00670                 togglePaneButton.Invoke();
00671                 Wait.ForIdle();
00672
00673                 WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00674
00675                 Log.Comment("Get NavView Active VisualStates");
00676                 var getNavViewActiveVisualStatesButton = new Button(FindElement.ByName("GetNavViewActiveVisualStates"));
00677                 getNavViewActiveVisualStatesButton.Invoke();
00678                 Wait.ForIdle();
00679
00680                 // check visual state
00681                 var visualStateName = "ListSizeCompact";
00682                 var result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
00683
00684                 Verify.IsTrue(result.GetText().Contains(visualStateName), "active VisualStates doesn't include " + visualStateName);
00685
00686                 // Test for light dismiss pane close
00687
00688                 Log.Comment("Change display mode to left compact");
00689                 panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00690                 panelDisplayModeComboBox.SelectItemByName("LeftCompact");
00691                 Wait.ForIdle();
00692
00693                 displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
00694                 Verify.AreEqual(compact, displayModeTextBox.DocumentText);
00695
00696                 // expand pane
00697                 Log.Comment("Expand NavView pane");
00698                 togglePaneButton.Invoke();
00699                 Wait.ForIdle();
00700
00701                 WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00702
00703                 // light dismiss pane
00704                 Log.Comment("Light dismiss NavView pane");
00705                 getNavViewActiveVisualStatesButton.Click(); // NOTE: Must be Click because this is verifying that the mouse light dismiss behavior closes the nav view
00706                 Wait.ForIdle();
00707
00708                 WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00709
00710                 Log.Comment("Get NavView Active VisualStates");
00711                 getNavViewActiveVisualStatesButton.Invoke();
00712                 Wait.ForIdle();
00713
00714                 // check visual state
00715                 result = new TextBlock(FindElement.ByName("NavViewActiveVisualStatesResult"));
00716                 Verify.IsTrue(result.GetText().Contains(visualStateName), "active VisualStates doesn't include " + visualStateName);
00717             }
00718         }
00719
00720         [TestMethod]
00721         [TestProperty("TestSuite", "B")]
00722         [TestProperty("Description", "VisualState DisplayModeGroup is decoupled from DisplayMode, and it has strong connection with PaneDisplayMode")]
00723         public void VerifyCorrectVisualStateWhenChangingPaneDisplayMode()
00724         {
00725             // We expect this mapping:
00726             //  Top, and LeftMinimal -> VisualState Minimal
00727             //  LeftCompact -> VisualState Compact
00728             //  Left -> VisualState Expanded
00729
00730             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00731             {
00732                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00733                 var getActiveVisualStateButton = new Button(FindElement.ByName("GetActiveVisualState"));
00734                 var invokeResult = new Edit(FindElement.ById("TestResult"));
00735                 var isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00736
00737                 Log.Comment("Set PaneDisplayMode to Top");
00738                 panelDisplayModeComboBox.SelectItemByName("Top");
00739                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00740                 {
00741                     getActiveVisualStateButton.Click();
00742                     waiter.Wait();
00743                 }
00744                 Verify.IsTrue(invokeResult.Value.Contains("Minimal"));
00745
00746                 Log.Comment("Set PaneDisplayMode to Left");
00747                 panelDisplayModeComboBox.SelectItemByName("Left");
00748                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00749                 {
00750                     getActiveVisualStateButton.Click();
00751                     waiter.Wait();
00752                 }
00753                 Verify.IsTrue(invokeResult.Value.Contains("Expanded"));
00754
00755                 Log.Comment("Set PaneDisplayMode to Top");
00756                 panelDisplayModeComboBox.SelectItemByName("Top");
00757                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00758                 {
00759                     getActiveVisualStateButton.Click();
00760                     waiter.Wait();
00761                 }
00762                 Verify.IsTrue(invokeResult.Value.Contains("Minimal"));
00763
00764                 Log.Comment("Set PaneDisplayMode to LeftCompact");
00765                 panelDisplayModeComboBox.SelectItemByName("LeftCompact");
00766                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00767                 {
00768                     getActiveVisualStateButton.Click();
00769                     waiter.Wait();
00770                 }
00771                 Verify.IsTrue(invokeResult.Value.Contains("Compact"));
00772
00773                 Log.Comment("Set PaneDisplayMode to LeftMinimal");
00774                 panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
00775
00776                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00777                 {
00778                     getActiveVisualStateButton.Click();
00779                     waiter.Wait();
00780                 }
00781                 Verify.IsTrue(invokeResult.Value.Contains("Minimal"));
00782                 Log.Comment("Verify Pane is closed automatically when PaneDisplayMode is Minimal");
00783                 Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False when PaneDisplayMode is Minimal");
00784
00785                 Log.Comment("Set DisplayMode to Left");
00786                 panelDisplayModeComboBox.SelectItemByName("Left");
00787                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00788                 {
00789                     getActiveVisualStateButton.Click();
00790                     waiter.Wait();
00791                 }
00792                 Verify.IsTrue(invokeResult.Value.Contains("Expanded"));
00793                 Log.Comment("Verify Pane is opened automatically when PaneDisplayMode is changed from Minimal to Left");
00794                 Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True when PaneDisplayMode is changed from Minimal to Left");
00795             }
00796         }
00797
00798         [TestMethod]
00799         [TestProperty("TestSuite", "B")]
00800         [TestProperty("Description", "Verifies the back button is visible when the pane is closed and the close button is visible when the pane is open, in LeftMinimal pane display mode")]
00801         public void VerifyBackAndCloseButtonsVisibilityInLeftMinimalPaneDisplayMode()
00802         {
00803             VerifyBackAndCloseButtonsVisibility(inLeftMinimalPanelDisplayMode: true);
00804         }
00805
00806         [TestMethod]
00807         [TestProperty("TestSuite", "B")]
00808         [TestProperty("Description", "Verifies the close button is visible when the pane is open, in Auto pane display mode and Minimal display mode")]
00809         public void VerifyBackAndCloseButtonsVisibilityInAutoPaneDisplayMode()
00810         {
00811             VerifyBackAndCloseButtonsVisibility(inLeftMinimalPanelDisplayMode: false);
00812         }
00813
00814         [TestMethod] // bug 16644730
00815         [TestProperty("TestSuite", "B")]
00816         public void VerifySettingsWidthOnLeftNavMediumMode()
00817         {
00818             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00819             {
00820                 SetNavViewWidth(ControlWidth.Wide);
00821                 Wait.ForIdle();
00822
00823                 Log.Comment("Bring Settings into view.");
00824                 FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
00825                 Wait.ForIdle();
00826
00827                 Button navButton = new Button(FindElement.ById("SettingsItem"));
00828                 Log.Comment("Verify that the SettingsItem size in Expanded mode and actual width is " + navButton.BoundingRectangle.Width);
00829
00830                 // NavigationViewCompactPaneLength is 40 or 48 in different release. This test case doesn't need an exactly number of width, so just choose 48 as the boundary
00831                 Verify.IsTrue(navButton.BoundingRectangle.Width > 48);
00832
00833                 SetNavViewWidth(ControlWidth.Medium);
00834                 Wait.ForIdle();
00835
00836                 Log.Comment("Verify that the SettingsItem size in Medium mode and actual width is " + navButton.BoundingRectangle.Width);
00837                 Verify.IsTrue(navButton.BoundingRectangle.Width <= 48);
00838             }
00839         }
00840
00841         [TestMethod]
00842         [TestProperty("TestSuite", "B")]
00843         public void LightDismissTest()
00844         {
00845             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00846             foreach (var testScenario in testScenarios)
00847             {
00848                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00849                 {
00850                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00851
00852                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00853
00854                     SetNavViewWidth(ControlWidth.Medium);
00855                     WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00856
00857                     using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
00858                     {
00859                         isPaneOpenCheckBox.Toggle();
00860                         waiter.Wait();
00861                     }
00862                     WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00863
00864                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00865
00866                     if (TestEnvironment.Application.SupportsBackButton)
00867                     {
00868                         PaneOpenCloseTestCaseRetry(3, () =>
00869                         {
00870                             KeyboardHelper.PressKey(Key.Backspace, ModifierKey.Windows);
00871                             Wait.ForIdle();
00872                             WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00873                             Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "Verify Windows+Back light dismisses the pane");
00874                         });
00875
00876                         isPaneOpenCheckBox.Toggle();
00877                     }
00878                     else
00879                     {
00880                         // The Windows+Back key combination relies on the system BackButton, which isn't present in win32.
00881                         Log.Comment("Skipping Windows+Back test because it's not supported in Win32/Desktop mode");
00882                     }
00883
00884                     Wait.ForIdle();
00885                     WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00886                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00887
00888                     PaneOpenCloseTestCaseRetry(3, () =>
00889                     {
00890                         KeyboardHelper.PressKey(Key.Left, ModifierKey.Alt);
00891                         Wait.ForIdle();
00892                         WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
00893                         Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "Verify Alt+Left light dismisses the pane");
00894                     });
00895
00896                     isPaneOpenCheckBox.Toggle();
00897                     Wait.ForIdle();
00898                     WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
00899                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00900                 }
00901             }
00902         }
00903
00904         [TestMethod]
00905         [TestProperty("TestSuite", "B")]
00906         public void EnsureDynamicSizeForPaneHeaderFooterAndCustomContent()
00907         {
00908             if (PlatformConfiguration.IsDebugBuildConfiguration())
00909             {
00910                 // Test is failing in chk configuration due to:
00911                 // Bug #1734 NavigationViewTests.EnsureDynamicSizeForPaneHeaderFooterAndCustomContent fails in CHK configuration
00912                 Log.Warning("Skipping test for Debug builds.");
00913                 return;
00914             }
00915
00916             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Stretch Test" }))
00917             {
00918                 Button navButton = new Button(FindElement.ById("TogglePaneButton"));
00919
00920                 // NavigationViewCompactPaneLength is 40 or 48 in different release. This test case doesn't need an exactly number of width, so just choose 48 as the boundary
00921                 // PaneHeader share the same row with ToggleButton, so it's width is not the same with other buttons
00922                 var widthCompactBoundary = 48;
00923                 var widthOpenPaneLength = 320;
00924
00925                 Button paneHeaderButton = new Button(FindElement.ById("PaneHeader"));
00926                 Log.Comment("PaneHeader size actual width is " + paneHeaderButton.BoundingRectangle.Width);
00927                 Verify.IsTrue(paneHeaderButton.BoundingRectangle.Width > widthCompactBoundary && paneHeaderButton.BoundingRectangle.Width < widthOpenPaneLength);
00928
00929                 Button paneFooterButton = new Button(FindElement.ById("PaneFooter"));
00930                 Log.Comment("PaneFooter size actual width is " + paneFooterButton.BoundingRectangle.Width);
00931                 Verify.IsTrue(paneFooterButton.BoundingRectangle.Width == widthOpenPaneLength);
00932
00933                 Button paneCustomContentButton = new Button(FindElement.ById("PaneCustomContent"));
00934                 Log.Comment("paneCustomContentButton size actual width is " + paneCustomContentButton.BoundingRectangle.Width);
00935                 Verify.IsTrue(paneCustomContentButton.BoundingRectangle.Width == widthOpenPaneLength);
00936
00937                 Log.Comment("Verify that clicking the navigation button closes the nav pane");
00938                 navButton.Invoke();
00939                 Wait.ForIdle();
00940
00941                 paneHeaderButton = new Button(FindElement.ById("PaneHeader"));
00942                 Log.Comment("PaneHeader is collapsed");
00943                 Verify.IsTrue(paneHeaderButton.BoundingRectangle.Width == 0);
00944
00945                 Log.Comment("PaneFooter size actual width is " + paneFooterButton.BoundingRectangle.Width);
00946                 Verify.IsTrue(paneFooterButton.BoundingRectangle.Width <= widthCompactBoundary && paneFooterButton.BoundingRectangle.Width > 0);
00947
00948                 Log.Comment("paneCustomContentButton size actual width is " + paneCustomContentButton.BoundingRectangle.Width);
00949                 Verify.IsTrue(paneCustomContentButton.BoundingRectangle.Width <= widthCompactBoundary && paneCustomContentButton.BoundingRectangle.Width > 0);
00950             }
00951         }
00952
00953
00954         [TestMethod]
00955         [TestProperty("TestSuite", "B")]
00956         public void SelectingAnItemInLeftCompactOrLeftMinimalClosesPane()
00957         {
00958             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00959             {
00960                 var configs = new ControlWidth[] { ControlWidth.Narrow, ControlWidth.Medium };
00961
00962                 foreach(var width in configs)
00963                 {
00964                     SetNavViewWidth(width);
00965
00966                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00967
00968                     // Ensure pane is open.
00969                     if (isPaneOpenCheckBox.ToggleState == ToggleState.Off)
00970                     {
00971                         using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
00972                         {
00973                             isPaneOpenCheckBox.Toggle();
00974                             waiter.Wait();
00975                         }
00976                     }
00977
00978                     var querySubmittedCheckbox = new CheckBox(FindElement.ByName("SuggestionChosenCheckbox"));
00979                     querySubmittedCheckbox.Uncheck();
00980
00981                     Wait.ForIdle();
00982
00983                     var autoSuggestBox = FindElement.ByName("PaneAutoSuggestBox");
00984                     Verify.IsNotNull(autoSuggestBox);
00985                     autoSuggestBox.SetFocus();
00986
00987
00988                     var autoSuggestBoxEdit = new Edit(autoSuggestBox);
00989                     Verify.IsNotNull(autoSuggestBoxEdit);
00990                     // Search for something
00991
00992                     autoSuggestBoxEdit.SendKeys("Text");
00993                     Wait.ForIdle();
00994
00995                     // Select item by clicking a bit lower
00996                     KeyboardHelper.PressKey(Key.Down);
00997                     KeyboardHelper.PressKey(Key.Enter);
00998
00999                     Wait.ForIdle();
01000
01001                     Verify.AreEqual(ToggleState.On, querySubmittedCheckbox.ToggleState,
01002                         "Should've submitted a query");
01003
01004                     Verify.AreEqual(ToggleState.Off, new CheckBox(FindElement.ByName("IsPaneOpenCheckBox")).ToggleState,
01005                         "Pane should be closed");
01006                 }
01007             }
01008         }
01009
01010         [TestMethod]
01011         [TestProperty("TestSuite", "C")]
01012         public void VerifyPaneLayoutSwappingCollections()
01013         {
01014             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
01015             {
01016                 var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
01017                 var resultTextBlock = FindElement.ByName("LayoutHeightsReport");
01018
01019                 FindElement.ByName("NoItems").Click();
01020                 Wait.ForIdle();
01021                 // No menu items, so zero height
01022                 VerifyHeights(0, 160);
01023
01024                 FindElement.ByName("NoFooter").Click();
01025                 Wait.ForIdle();
01026                 // No footer items, but a settings item => 40px height
01027                 VerifyHeights(368, 40);
01028
01029                 FindElement.ByName("Both").Click();
01030                 Wait.ForIdle();
01031                 VerifyHeights(248, 160);
01032
01033                 void VerifyHeights(int menuItemsHeight, int footerItemsHeight)
01034                 {
01035                     readResults.Click();
01036                     var result = resultTextBlock.GetText().Split(";");
01037
01038                     Verify.IsTrue(Math.Abs(menuItemsHeight - int.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
01039                     Verify.IsTrue(Math.Abs(footerItemsHeight - int.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
01040                 }
01041             }
01042         }
01043
01044         [TestMethod]
01045         [TestProperty("TestSuite", "C")]
01046         public void VerifyPaneLayoutDynamicallyUpdatingCollections()
01047         {
01048             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
01049             {
01050                 var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
01051                 var resultTextBlock = FindElement.ByName("LayoutHeightsReport");
01052
01053                 var addMenuItemButton = new Button(FindElement.ByName("AddMenuItemButton"));
01054                 var addFooterItemButton = new Button(FindElement.ByName("AddFooterItemButton"));
01055                 var resetCollectionsButton = new Button(FindElement.ByName("ResetCollectionsButton"));
01056
01057                 // Fill menu items
01058                 AddMenuItem(248, 160);
01059                 AddMenuItem(248, 160);
01060                 AddMenuItem(248, 160);
01061
01062                 // Fill footer items
01063                 AddFooterItem(198, 200);
01064                 AddFooterItem(190, 204);
01065
01066                 // Check that we reached equilibrium.
01067                 AddFooterItem(190, 204);
01068                 AddMenuItem(190, 204);
01069
01070                 resetCollectionsButton.Click();
01071                 Wait.ForIdle();
01072                 VerifyHeights(248, 160);
01073
01074                 void VerifyHeights(double menuItemsHeight, double footerItemsHeight)
01075                 {
01076                     readResults.Click();
01077                     var result = resultTextBlock.GetText().Split(";");
01078
01079                     Verify.IsTrue(Math.Abs(menuItemsHeight - double.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
01080                     Verify.IsTrue(Math.Abs(footerItemsHeight - double.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
01081                 }
01082
01083                 void AddMenuItem(double menuItemsHeight, double footerItemsHeight)
01084                 {
01085                     addMenuItemButton.Click();
01086                     Wait.ForIdle();
01087                     VerifyHeights(menuItemsHeight, footerItemsHeight);
01088                 }
01089
01090                 void AddFooterItem(double menuItemsHeight, double footerItemsHeight)
01091                 {
01092                     addFooterItemButton.Click();
01093                     Wait.ForIdle();
01094                     VerifyHeights(menuItemsHeight, footerItemsHeight);
01095                 }
01096             }
01097         }
01098
01099         [TestMethod]
01100         [TestProperty("TestSuite", "C")]
01101         public void VerifyPaneLayoutDynamicallyUpdatingCollectionsFooterPrecedence()
01102         {
01103             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
01104             {
01105                 var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
01106                 var resultTextBlock = FindElement.ByName("LayoutHeightsReport");
01107
01108                 var addMenuItemButton = new Button(FindElement.ByName("AddMenuItemButton"));
01109                 var addFooterItemButton = new Button(FindElement.ByName("AddFooterItemButton"));
01110                 var resetCollectionsButton = new Button(FindElement.ByName("ResetCollectionsButton"));
01111
01112                 // Fill footer items
01113                 AddFooterItem(208, 200);
01114                 AddFooterItem(168, 240);
01115                 AddFooterItem(128, 280);
01116                 AddFooterItem(114, 284);
01117
01118                 AddMenuItem(104, 290);
01119                 AddMenuItem(144, 250);
01120                 AddMenuItem(185, 210);
01121
01122                 void VerifyHeights(double menuItemsHeight, double footerItemsHeight)
01123                 {
01124                     readResults.Click();
01125                     var result = resultTextBlock.GetText().Split(";");
01126
01127                     Verify.IsTrue(Math.Abs(menuItemsHeight - double.Parse(result[0])) < 5, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
01128                     Verify.IsTrue(Math.Abs(footerItemsHeight - double.Parse(result[1])) < 5, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
01129                 }
01130
01131                 void AddMenuItem(double menuItemsHeight, double footerItemsHeight)
01132                 {
01133                     addMenuItemButton.Click();
01134                     Wait.ForIdle();
01135                     VerifyHeights(menuItemsHeight, footerItemsHeight);
01136                 }
01137
01138                 void AddFooterItem(double menuItemsHeight, double footerItemsHeight)
01139                 {
01140                     addFooterItemButton.Click();
01141                     Wait.ForIdle();
01142                     VerifyHeights(menuItemsHeight, footerItemsHeight);
01143                 }
01144             }
01145         }
01146
01147         [TestMethod]
01148         [TestProperty("TestSuite", "C")]
01149         public void VerifyPaneLayoutSettingsDisabledNoGapMenuItems()
01150         {
01151             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
01152             {
01153                 var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
01154                 var resultTextBlock = FindElement.ByName("LayoutHeightsReport");
01155
01156                 var addMenuItemButton = new Button(FindElement.ByName("AddMenuItemButton"));
01157                 new Button(FindElement.ByName("ClearCollectionsButton")).Click();
01158                 new CheckBox(FindElement.ByName("IsSettingsEnabledCheckbox")).Uncheck();
01159
01160                 AddMenuItem(408, 0);
01161                 AddMenuItem(408, 0);
01162                 AddMenuItem(408, 0);
01163                 AddMenuItem(408, 0);
01164                 AddMenuItem(408, 0);
01165                 AddMenuItem(408, 0);
01166                 AddMenuItem(408, 0);
01167                 AddMenuItem(408, 0);
01168                 AddMenuItem(408, 0);
01169                 AddMenuItem(408, 0);
01170                 AddMenuItem(408, 0);
01171                 AddMenuItem(408, 0);
01172
01173                 void VerifyHeights(int menuItemsHeight, int footerItemsHeight)
01174                 {
01175                     readResults.Click();
01176                     var result = resultTextBlock.GetText().Split(";");
01177
01178                     Verify.IsTrue(Math.Abs(menuItemsHeight - int.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
01179                     Verify.IsTrue(Math.Abs(footerItemsHeight - int.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
01180                 }
01181
01182                 void AddMenuItem(int menuItemsHeight, int footerItemsHeight)
01183                 {
01184                     addMenuItemButton.Click();
01185                     Wait.ForIdle();
01186                     VerifyHeights(menuItemsHeight, footerItemsHeight);
01187                 }
01188             }
01189         }
01190
01191         [TestMethod]
01192         [TestProperty("TestSuite", "C")]
01193         public void VerifyPaneLayoutSettingsDisabledNoGapFooterItems()
01194         {
01195             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "PaneLayoutTestPage" }))
01196             {
01197                 var readResults = new Button(FindElement.ByName("GetLayoutHeightsButton"));
01198                 var resultTextBlock = FindElement.ByName("LayoutHeightsReport");
01199
01200                 var addFooterItemButton = new Button(FindElement.ByName("AddFooterItemButton"));
01201                 new Button(FindElement.ByName("ClearCollectionsButton")).Click();
01202                 new CheckBox(FindElement.ByName("IsSettingsEnabledCheckbox")).Uncheck();
01203
01204                 AddFooterItem(0, 40);
01205                 AddFooterItem(0, 80);
01206                 AddFooterItem(0,120);
01207                 AddFooterItem(0,160);
01208                 AddFooterItem(0,200);
01209                 AddFooterItem(0,240);
01210                 AddFooterItem(0,280);
01211                 AddFooterItem(0,320);
01212                 AddFooterItem(0,360);
01213                 AddFooterItem(0,400);
01214                 AddFooterItem(0,412);
01215                 AddFooterItem(0,412);
01216
01217                 void VerifyHeights(int menuItemsHeight, int footerItemsHeight)
01218                 {
01219                     readResults.Click();
01220                     var result = resultTextBlock.GetText().Split(";");
01221
01222                     Verify.IsTrue(Math.Abs(menuItemsHeight - int.Parse(result[0])) < 4, "Expected menu: " + menuItemsHeight + ", Actual: " + result[0]);
01223                     Verify.IsTrue(Math.Abs(footerItemsHeight - int.Parse(result[1])) < 4, "Expected footer: " + footerItemsHeight + ", Actual: " + result[1]);
01224                 }
01225
01226                 void AddFooterItem(int menuItemsHeight, int footerItemsHeight)
01227                 {
01228                     addFooterItemButton.Click();
01229                     Wait.ForIdle();
01230                     VerifyHeights(menuItemsHeight, footerItemsHeight);
01231                 }
01232             }
01233         }
01234
01235         [TestMethod]
01236         [TestProperty("TestSuite", "C")]
01237         public void VerifyExpandedItemsSaveStateWhenClosingAndOpeningPane()
01238         {
01239             var testScenarios = RegressionTestScenario.BuildHierarchicalNavRegressionTestScenarios();
01240             foreach (var testScenario in testScenarios)
01241             {
01242                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
01243                 {
01244                     var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
01245                     Button toggleButton = new Button(FindElement.ById("TogglePaneButton"));
01246
01247                     Log.Comment("Test PaneDisplayMode=Auto");
01248                     panelDisplayModeComboBox.SelectItemByName("Auto");
01249                     Wait.ForIdle();
01250
01251                     // Select Menu Item 1 in the tree
01252                     Log.Comment("Select Menu Item 1 in the tree");
01253                     UIObject menuItem1 = FindElement.ByName("Menu Item 1");
01254                     menuItem1.Click();
01255                     Wait.ForIdle();
01256
01257                     // Verify that the item is expanded
01258                     Log.Comment("Verify that the item is expanded by looking for Menu Item 2.");
01259                     UIObject menuItem2 = FindElement.ByName("Menu Item 2");
01260                     Verify.IsNotNull(menuItem2);
01261
01262                     // Close the pane
01263                     Log.Comment("Close the pane by clicking on the ToggleButton");
01264                     toggleButton.Invoke();
01265                     Wait.ForIdle();
01266
01267                     WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
01268
01269                     // Open the pane
01270                     Log.Comment("Open the pane by clicking on the ToggleButton");
01271                     toggleButton.Invoke();
01272                     Wait.ForIdle();
01273
01274                     WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
01275
01276                     ElementCache.Clear();
01277
01278                     // Verify that the item is still expanded
01279                     Log.Comment("Verify that the item is still expanded by looking for Menu Item 2.");
01280                     menuItem2 = FindElement.ByName("Menu Item 2");
01281                     Verify.IsNotNull(menuItem2);
01282
01283                     // Change the pane display mode to LeftCompact
01284                     Log.Comment("Change the pane display mode to LeftCompact");
01285                     panelDisplayModeComboBox.SelectItemByName("LeftCompact");
01286                     Wait.ForIdle();
01287
01288                     WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
01289
01290                     // Open the pane
01291                     Log.Comment("Open the pane by clicking on the ToggleButton");
01292                     toggleButton.Invoke();
01293                     Wait.ForIdle();
01294
01295                     WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
01296
01297                     ElementCache.Clear();
01298
01299                     // Verify that the item is still expanded
01300                     Log.Comment("Verify that the item is still expanded by looking for Menu Item 2.");
01301                     menuItem2 = FindElement.ByName("Menu Item 2");
01302                     Verify.IsNotNull(menuItem2);
01303
01304                     // Change the pane display mode to LeftMinimal
01305                     Log.Comment("Change the pane display mode to LeftMinimal");
01306                     panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
01307                     Wait.ForIdle();
01308
01309                     WaitAndAssertPaneStatus(PaneOpenStatus.Closed);
01310
01311                     // Open the pane
01312                     Log.Comment("Open the pane by clicking on the ToggleButton");
01313                     toggleButton.Invoke();
01314                     Wait.ForIdle();
01315
01316                     WaitAndAssertPaneStatus(PaneOpenStatus.Opened);
01317
01318                     ElementCache.Clear();
01319
01320                     // Verify that the item is still expanded
01321                     Log.Comment("Verify that the item is still expanded by looking for Menu Item 2.");
01322                     menuItem2 = FindElement.ByName("Menu Item 2");
01323                     Verify.IsNotNull(menuItem2);
01324                 }
01325             }
01326         }
01327
01328         [TestMethod]
01329         [TestProperty("TestSuite", "C")]
01330         public void VerifyChangingFooterMenuItemVisibilityAdjustsPaneLayout()
01331         {
01332             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
01333             foreach (var testScenario in testScenarios)
01334             {
01335                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
01336                 {
01337                     Log.Comment("Verify that FooterItem is hidden.");
01338                     UIObject footerItem = FindElement.ByName("FooterItem");
01339                     Verify.IsNull(footerItem);
01340
01341                     Log.Comment("Change FooterItem Visibility to Visible");
01342                     var showFooterItemButton = new Button(FindElement.ByName("ShowFooterItemButton"));
01343                     showFooterItemButton.Invoke();
01344                     Wait.ForIdle();
01345
01346                     Log.Comment("Verify that FooterItem is visible.");
01347                     footerItem = FindElement.ByName("FooterItem");
01348                     Verify.IsNotNull(footerItem);
01349                 }
01350             }
01351         }
01352     }
01353 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTabItemsSourcePage.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

TabViewTabItemsSourcePage.xaml.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml.Controls;
00002 using MUXControlsTestApp.Utilities;
00003 using System.Collections.ObjectModel;
00004 using Windows.Foundation.Collections;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Automation;
00007 using Microsoft.UI.Xaml.Controls;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     public class MyData
00012     {
00013         public string DataHeader { get; set; }
00014         public Microsoft.UI.Xaml.Controls.IconSource DataIconSource { get; set; }
00015         public object DataContent { get; set; }
00016     }
00017
00018     public sealed partial class TabViewTabItemsSourcePage : Page
00019     {
00020         const int initialTabsCount = 3;
00021         ListView innerListView = null;
00022         ObservableCollection<MyData> myDatas;
00023
00024         public TabViewTabItemsSourcePage()
00025         {
00026             this.InitializeComponent();
00027
00028             Loaded += TabViewTabItemsSourcePage_Loaded;
00029             TabViewItemsSourceSample.TabItemsChanged += TabViewItemsSourceSample_TabItemsChanged;
00030
00031             InitializeDataBindingSampleData();
00032         }
00033
00034         private void TabViewItemsSourceSample_TabItemsChanged(TabView sender, IVectorChangedEventArgs args)
00035         {
00036             tblIVectorChangedEventArgsCollectionChange.Text = args.CollectionChange.ToString();
00037             tblIVectorChangedEventArgsIndex.Text = args.Index.ToString();
00038         }
00039
00040         private void TabViewTabItemsSourcePage_Loaded(object sender, RoutedEventArgs e)
00041         {
00042             innerListView = TabViewItemsSourceSample.FindVisualChildByType<ListView>();
00043
00044             for (int tabIndex = 0; tabIndex < initialTabsCount; tabIndex++)
00045             {
00046                 var tabViewItem = TabViewItemsSourceSample.ContainerFromIndex(tabIndex) as TabViewItem;
00047
00048                 if (tabViewItem != null)
00049                 {
00050                     tabViewItem.Name = "tabViewItem" + tabIndex;
00051                     AutomationProperties.SetName(tabViewItem, tabViewItem.Name);
00052                 }
00053             }
00054         }
00055
00056         private void ChkCanDragItems_Checked(object sender, RoutedEventArgs e)
00057         {
00058             if (innerListView != null)
00059             {
00060                 innerListView.CanDragItems = true;
00061             }
00062         }
00063
00064         private void ChkCanDragItems_Unchecked(object sender, RoutedEventArgs e)
00065         {
00066             if (innerListView != null)
00067             {
00068                 innerListView.CanDragItems = false;
00069             }
00070         }
00071
00072         private void ChkCanReorderItems_Checked(object sender, RoutedEventArgs e)
00073         {
00074             if (innerListView != null)
00075             {
00076                 innerListView.CanReorderItems = true;
00077             }
00078         }
00079
00080         private void ChkCanReorderItems_Unchecked(object sender, RoutedEventArgs e)
00081         {
00082             if (innerListView != null)
00083             {
00084                 innerListView.CanReorderItems = false;
00085             }
00086         }
00087
00088         private void ChkCanDrag_Checked(object sender, RoutedEventArgs e)
00089         {
00090             if (innerListView != null)
00091             {
00092                 innerListView.CanDrag = true;
00093             }
00094         }
00095
00096         private void ChkCanDrag_Unchecked(object sender, RoutedEventArgs e)
00097         {
00098             if (innerListView != null)
00099             {
00100                 innerListView.CanDrag = false;
00101             }
00102         }
00103
00104         private void ChkAllowDrop_Checked(object sender, RoutedEventArgs e)
00105         {
00106             if (innerListView != null)
00107             {
00108                 innerListView.AllowDrop = true;
00109             }
00110         }
00111
00112         private void ChkAllowDrop_Unchecked(object sender, RoutedEventArgs e)
00113         {
00114             if (innerListView != null)
00115             {
00116                 innerListView.AllowDrop = false;
00117             }
00118         }
00119
00120         private void InitializeDataBindingSampleData()
00121         {
00122             myDatas = new ObservableCollection<MyData>();
00123
00124             for (int index = 0; index < initialTabsCount; index++)
00125             {
00126                 myDatas.Add(CreateNewMyData(index));
00127             }
00128         }
00129
00130         private MyData CreateNewMyData(int index)
00131         {
00132             var textBlock = new TextBlock();
00133             textBlock.Text = "Sample" + index;
00134
00135             var newData = new MyData
00136             {
00137                 DataHeader = $"MyData {index}",
00138                 DataIconSource = new Microsoft.UI.Xaml.Controls.SymbolIconSource() { Symbol = Symbol.Caption + index },
00139                 DataContent = textBlock
00140             };
00141
00142             return newData;
00143         }
00144
00145         private void TabViewItemsSourceSample_AddTabButtonClick(TabView sender, object args)
00146         {
00147             // Add a new MyData item to the collection. TabView automatically generates a TabViewItem.
00148             myDatas.Add(CreateNewMyData(myDatas.Count));
00149         }
00150
00151         private void TabViewItemsSourceSample_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
00152         {
00153             // Remove the requested MyData object from the collection.
00154             myDatas.Remove(args.Item as MyData);
00155         }
00156     }
00157 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/BreadcrumbBar.properties.h Source File

  • File List
  • File Members
  • Generated

BreadcrumbBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class BreadcrumbBarProperties
00008 {
00009 public:
00010     BreadcrumbBarProperties();
00011
00012     void ItemsSource(winrt::IInspectable const& value);
00013     winrt::IInspectable ItemsSource();
00014
00015     void ItemTemplate(winrt::IInspectable const& value);
00016     winrt::IInspectable ItemTemplate();
00017
00018     static winrt::DependencyProperty ItemsSourceProperty() { return s_ItemsSourceProperty; }
00019     static winrt::DependencyProperty ItemTemplateProperty() { return s_ItemTemplateProperty; }
00020
00021     static GlobalDependencyProperty s_ItemsSourceProperty;
00022     static GlobalDependencyProperty s_ItemTemplateProperty;
00023
00024     winrt::event_token ItemClicked(winrt::TypedEventHandler<winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs> const& value);
00025     void ItemClicked(winrt::event_token const& token);
00026
00027     event_source<winrt::TypedEventHandler<winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs>> m_itemClickedEventSource;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031
00032     static void OnItemsSourcePropertyChanged(
00033         winrt::DependencyObject const& sender,
00034         winrt::DependencyPropertyChangedEventArgs const& args);
00035
00036     static void OnItemTemplatePropertyChanged(
00037         winrt::DependencyObject const& sender,
00038         winrt::DependencyPropertyChangedEventArgs const& args);
00039 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrush.idl Source File

  • File List
  • File Members
  • Materials
  • Reveal

RevealBrush.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XM_NAMESPACE
00002 {
00003
00004 [MUX_PREVIEW]
00005 [webhosthidden]
00006 enum RevealBrushState
00007 {
00008     Normal = 0,
00009     PointerOver = 1,
00010     Pressed = 2,
00011 };
00012
00013 [MUX_PREVIEW]
00014 [webhosthidden]
00015 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00016 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00017 unsealed runtimeclass RevealBrush : Microsoft.UI.Xaml.Media.XamlCompositionBrushBase
00018 {
00019     protected RevealBrush();
00020
00021     [MUX_DEFAULT_VALUE("RevealBrush::sc_defaultColor")]
00022     Windows.UI.Color Color { get; set; };
00023     [MUX_DEFAULT_VALUE("winrt::ApplicationTheme::Light")]
00024     Microsoft.UI.Xaml.ApplicationTheme TargetTheme { get; set; };
00025     Boolean AlwaysUseFallback { get; set; };
00026
00027     static Microsoft.UI.Xaml.DependencyProperty ColorProperty { get; };
00028     static Microsoft.UI.Xaml.DependencyProperty TargetThemeProperty { get; };
00029     static Microsoft.UI.Xaml.DependencyProperty AlwaysUseFallbackProperty { get; };
00030     [MUX_DEFAULT_VALUE("winrt::RevealBrushState::Normal")]
00031     [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnStatePropertyChanged")]
00032     static Microsoft.UI.Xaml.DependencyProperty StateProperty { get; };
00033     static void SetState(Microsoft.UI.Xaml.UIElement element, RevealBrushState value);
00034     static RevealBrushState GetState(Microsoft.UI.Xaml.UIElement element);
00035 }
00036
00037 [MUX_PREVIEW]
00038 [webhosthidden]
00039 unsealed runtimeclass RevealBorderBrush : RevealBrush
00040 {
00041     RevealBorderBrush();
00042 }
00043
00044 [MUX_PREVIEW]
00045 [webhosthidden]
00046 unsealed runtimeclass RevealBackgroundBrush : RevealBrush
00047 {
00048     RevealBackgroundBrush();
00049 }
00050
00051 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/SelectionModelTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

SelectionModelTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System.Collections;
00006 using System.Collections.Generic;
00007 using System.Linq;
00008 using System;
00009 using System.Collections.ObjectModel;
00010 using System.Text;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Data;
00013 using Common;
00014
00015 using WEX.TestExecution;
00016 using WEX.TestExecution.Markup;
00017 using WEX.Logging.Interop;
00018
00019 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00020 {
00021     [TestClass]
00022     public class SelectionModelTests : ApiTestBase
00023     {
00024         [TestMethod]
00025         public void ValidateOneLevelSingleSelectionNoSource()
00026         {
00027             RunOnUIThread.Execute(() =>
00028             {
00029                 SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
00030                 Log.Comment("No source set.");
00031                 Select(selectionModel, 4, true);
00032                 ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) });
00033                 Select(selectionModel, 4, false);
00034                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00035             });
00036         }
00037
00038         [TestMethod]
00039         public void ValidateOneLevelSingleSelection()
00040         {
00041             RunOnUIThread.Execute(() =>
00042             {
00043                 SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
00044                 Log.Comment("Set the source to 10 items");
00045                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
00046
00047                 // Check index selection
00048                 Select(selectionModel, 3, true);
00049                 ValidateSelection(selectionModel, new List<IndexPath>() { Path(3) }, new List<IndexPath>() { Path() });
00050                 Select(selectionModel, 3, false);
00051                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00052
00053                 // Check index path selection
00054                 Select(selectionModel, Path(4), true);
00055                 ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
00056                 Select(selectionModel, Path(4), false);
00057                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00058             });
00059         }
00060
00061         [TestMethod]
00062         public void ValidateSelectionChangedEventSingleSelection()
00063         {
00064             RunOnUIThread.Execute(() =>
00065             {
00066                 SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
00067                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
00068
00069                 bool select = true;
00070                 int selectionChangedFiredCount = 0;
00071                 selectionModel.SelectionChanged += delegate (SelectionModel sender, SelectionModelSelectionChangedEventArgs args) {
00072                     selectionChangedFiredCount++;
00073
00074                     // Verify SelectionChanged was raised after selection state was changed in the SelectionModel
00075                     if (select)
00076                     {
00077                         ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
00078                     }
00079                     else
00080                     {
00081                         ValidateSelection(selectionModel, new List<IndexPath>() { });
00082                     }
00083                 };
00084
00085                 Select(selectionModel, Path(4), select);
00086                 Verify.AreEqual(1, selectionChangedFiredCount);
00087
00088                 select = false;
00089                 Select(selectionModel, Path(4), select);
00090                 Verify.AreEqual(2, selectionChangedFiredCount);
00091             });
00092         }
00093
00094         [TestMethod]
00095         public void ValidateSelectionChangedEventMultipleSelection()
00096         {
00097             RunOnUIThread.Execute(() =>
00098             {
00099                 SelectionModel selectionModel = new SelectionModel();
00100                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
00101
00102                 int selectionChangedFiredCount = 0;
00103                 selectionModel.SelectionChanged += delegate (SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
00104                 {
00105                     selectionChangedFiredCount++;
00106
00107                     // Verify SelectionChanged was raised after selection state was changed in the SelectionModel
00108                     ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
00109                 };
00110
00111                 Select(selectionModel, 4, true);
00112                 Verify.AreEqual(1, selectionChangedFiredCount);
00113             });
00114         }
00115
00116         [TestMethod]
00117         public void ValidateCanSetSelectedIndex()
00118         {
00119             RunOnUIThread.Execute(() =>
00120             {
00121                 var model = new SelectionModel();
00122                 var ip = IndexPath.CreateFrom(34);
00123                 model.SelectedIndex = ip;
00124                 Verify.AreEqual(0, ip.CompareTo(model.SelectedIndex));
00125             });
00126         }
00127
00128         [TestMethod]
00129         public void ValidateOneLevelMultipleSelection()
00130         {
00131             RunOnUIThread.Execute(() =>
00132             {
00133                 SelectionModel selectionModel = new SelectionModel();
00134                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
00135
00136                 Select(selectionModel, 4, true);
00137                 ValidateSelection(selectionModel, new List<IndexPath>() { Path(4) }, new List<IndexPath>() { Path() });
00138                 SelectRangeFromAnchor(selectionModel, 8, true /* select */);
00139                 ValidateSelection(selectionModel,
00140                     new List<IndexPath>()
00141                     {
00142                         Path(4),
00143                         Path(5),
00144                         Path(6),
00145                         Path(7),
00146                         Path(8)
00147                     },
00148                     new List<IndexPath>() { Path() });
00149
00150                 ClearSelection(selectionModel);
00151                 SetAnchorIndex(selectionModel, 6);
00152                 SelectRangeFromAnchor(selectionModel, 3, true /* select */);
00153                 ValidateSelection(selectionModel,
00154                     new List<IndexPath>()
00155                     {
00156                         Path(3),
00157                         Path(4),
00158                         Path(5),
00159                         Path(6)
00160                     },
00161                     new List<IndexPath>() { Path() });
00162
00163                 SetAnchorIndex(selectionModel, 4);
00164                 SelectRangeFromAnchor(selectionModel, 5, false /* select */);
00165                 ValidateSelection(selectionModel,
00166                     new List<IndexPath>()
00167                     {
00168                         Path(3),
00169                         Path(6)
00170                     },
00171                     new List<IndexPath>() { Path() });
00172             });
00173         }
00174
00175         [TestMethod]
00176         public void ValidateTwoLevelSingleSelection()
00177         {
00178             RunOnUIThread.Execute(() =>
00179             {
00180                 SelectionModel selectionModel = new SelectionModel();
00181                 Log.Comment("Setting the source");
00182                 selectionModel.Source = CreateNestedData(1 /* levels */ , 2 /* groupsAtLevel */, 2 /* countAtLeaf */);
00183                 Select(selectionModel, 1, 1, true);
00184                 ValidateSelection(selectionModel,
00185                     new List<IndexPath>() { Path(1, 1) }, new List<IndexPath>() { Path(), Path(1) });
00186                 Select(selectionModel, 1, 1, false);
00187                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00188             });
00189         }
00190
00191         [TestMethod]
00192         public void ValidateTwoLevelMultipleSelection()
00193         {
00194             RunOnUIThread.Execute(() =>
00195             {
00196                 SelectionModel selectionModel = new SelectionModel();
00197                 Log.Comment("Setting the source");
00198                 selectionModel.Source = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
00199
00200                 Select(selectionModel, 1, 2, true);
00201                 ValidateSelection(selectionModel, new List<IndexPath>() { Path(1, 2) }, new List<IndexPath>() { Path(), Path(1) });
00202                 SelectRangeFromAnchor(selectionModel, 2, 2, true /* select */);
00203                 ValidateSelection(selectionModel,
00204                     new List<IndexPath>()
00205                     {
00206                         Path(1, 2),
00207                         Path(2), // Inner node should be selected since everything 2.* is selected
00208                         Path(2, 0),
00209                         Path(2, 1),
00210                         Path(2, 2)
00211                     },
00212                     new List<IndexPath>()
00213                     {
00214                         Path(),
00215                         Path(1)
00216                     },
00217                     1 /* selectedInnerNodes */);
00218
00219                 ClearSelection(selectionModel);
00220                 SetAnchorIndex(selectionModel, 2, 1);
00221                 SelectRangeFromAnchor(selectionModel, 0, 1, true /* select */);
00222                 ValidateSelection(selectionModel,
00223                     new List<IndexPath>()
00224                     {
00225                         Path(0, 1),
00226                         Path(0, 2),
00227                         Path(1, 0),
00228                         Path(1, 1),
00229                         Path(1, 2),
00230                         Path(1),
00231                         Path(2, 0),
00232                         Path(2, 1)
00233                     },
00234                     new List<IndexPath>()
00235                     {
00236                         Path(),
00237                         Path(0),
00238                         Path(2),
00239                     },
00240                     1 /* selectedInnerNodes */);
00241
00242                 SetAnchorIndex(selectionModel, 1, 1);
00243                 SelectRangeFromAnchor(selectionModel, 2, 0, false /* select */);
00244                 ValidateSelection(selectionModel,
00245                     new List<IndexPath>()
00246                     {
00247                         Path(0, 1),
00248                         Path(0, 2),
00249                         Path(1, 0),
00250                         Path(2, 1)
00251                     },
00252                     new List<IndexPath>()
00253                     {
00254                         Path(),
00255                         Path(1),
00256                         Path(0),
00257                         Path(2),
00258                     },
00259                     0 /* selectedInnerNodes */);
00260
00261                 ClearSelection(selectionModel);
00262                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00263             });
00264         }
00265
00266         [TestMethod]
00267         public void ValidateNestedSingleSelection()
00268         {
00269             RunOnUIThread.Execute(() =>
00270             {
00271                 SelectionModel selectionModel = new SelectionModel() { SingleSelect = true };
00272                 Log.Comment("Setting the source");
00273                 selectionModel.Source = CreateNestedData(3 /* levels */ , 2 /* groupsAtLevel */, 2 /* countAtLeaf */);
00274                 var path = Path(1, 0, 1, 1);
00275                 Select(selectionModel, path, true);
00276                 ValidateSelection(selectionModel,
00277                     new List<IndexPath>() { path },
00278                     new List<IndexPath>()
00279                     {
00280                         Path(),
00281                         Path(1),
00282                         Path(1, 0),
00283                         Path(1, 0, 1),
00284                     });
00285                 Select(selectionModel, Path(0, 0, 1, 0), true);
00286                 ValidateSelection(selectionModel,
00287                     new List<IndexPath>()
00288                     {
00289                         Path(0, 0, 1, 0)
00290                     },
00291                     new List<IndexPath>()
00292                     {
00293                         Path(),
00294                         Path(0),
00295                         Path(0, 0),
00296                         Path(0, 0, 1)
00297                     });
00298                 Select(selectionModel, Path(0, 0, 1, 0), false);
00299                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00300             });
00301         }
00302
00303         [TestMethod]
00304         public void ValidateNestedMultipleSelection()
00305         {
00306             ValidateNestedMultipleSelection(true /* handleChildrenRequested */);
00307             ValidateNestedMultipleSelection(false /* handleChildrenRequested */);
00308         }
00309
00310         private void ValidateNestedMultipleSelection(bool handleChildrenRequested)
00311         {
00312             RunOnUIThread.Execute(() =>
00313             {
00314                 SelectionModel selectionModel = new SelectionModel();
00315                 List<IndexPath> sourcePaths = new List<IndexPath>();
00316
00317                 Log.Comment("Setting the source");
00318                 selectionModel.Source = CreateNestedData(3 /* levels */ , 2 /* groupsAtLevel */, 4 /* countAtLeaf */);
00319                 if (handleChildrenRequested)
00320                 {
00321                     selectionModel.ChildrenRequested += (SelectionModel sender, SelectionModelChildrenRequestedEventArgs args) =>
00322                     {
00323                         Log.Comment("ChildrenRequestedIndexPath:" + args.SourceIndex);
00324                         sourcePaths.Add(args.SourceIndex);
00325                         args.Children = args.Source is IEnumerable ? args.Source : null;
00326                     };
00327                 }
00328
00329                 var startPath = Path(1, 0, 1, 0);
00330                 Select(selectionModel, startPath, true);
00331                 ValidateSelection(selectionModel,
00332                     new List<IndexPath>() { startPath },
00333                     new List<IndexPath>()
00334                     {
00335                         Path(),
00336                         Path(1),
00337                         Path(1, 0),
00338                         Path(1, 0, 1)
00339                     });
00340
00341                 var endPath = Path(1, 1, 1, 0);
00342                 SelectRangeFromAnchor(selectionModel, endPath, true /* select */);
00343
00344                 if (handleChildrenRequested)
00345                 {
00346                     // Validate SourceIndices.
00347                     var expectedSourceIndices = new List<IndexPath>()
00348                     {
00349                         Path(1),
00350                         Path(1, 0),
00351                         Path(1, 0, 1),
00352                         Path(1, 1),
00353                         Path(1, 0, 1, 3),
00354                         Path(1, 0, 1, 2),
00355                         Path(1, 0, 1, 1),
00356                         Path(1, 0, 1, 0),
00357                         Path(1, 1, 1),
00358                         Path(1, 1, 0),
00359                         Path(1, 1, 0, 3),
00360                         Path(1, 1, 0, 2),
00361                         Path(1, 1, 0, 1),
00362                         Path(1, 1, 0, 0),
00363                         Path(1, 1, 1, 0)
00364                     };
00365
00366                     Verify.AreEqual(expectedSourceIndices.Count, sourcePaths.Count);
00367                     for (int i = 0; i < expectedSourceIndices.Count; i++)
00368                     {
00369                         Verify.IsTrue(AreEqual(expectedSourceIndices[i], sourcePaths[i]));
00370                     }
00371                 }
00372
00373                 ValidateSelection(selectionModel,
00374                     new List<IndexPath>()
00375                     {
00376                         Path(1, 0, 1, 0),
00377                         Path(1, 0, 1, 1),
00378                         Path(1, 0, 1, 2),
00379                         Path(1, 0, 1, 3),
00380                         Path(1, 0, 1),
00381                         Path(1, 1, 0, 0),
00382                         Path(1, 1, 0, 1),
00383                         Path(1, 1, 0, 2),
00384                         Path(1, 1, 0, 3),
00385                         Path(1, 1, 0),
00386                         Path(1, 1, 1, 0),
00387                     },
00388                     new List<IndexPath>()
00389                     {
00390                         Path(),
00391                         Path(1),
00392                         Path(1, 0),
00393                         Path(1, 1),
00394                         Path(1, 1, 1),
00395                     },
00396                     2 /* selectedInnerNodes */);
00397
00398                 ClearSelection(selectionModel);
00399                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00400
00401                 startPath = Path(0, 1, 0, 2);
00402                 SetAnchorIndex(selectionModel, startPath);
00403                 endPath = Path(0, 0, 0, 2);
00404                 SelectRangeFromAnchor(selectionModel, endPath, true /* select */);
00405                 ValidateSelection(selectionModel,
00406                     new List<IndexPath>()
00407                     {
00408                          Path(0, 0, 0, 2),
00409                          Path(0, 0, 0, 3),
00410                          Path(0, 0, 1, 0),
00411                          Path(0, 0, 1, 1),
00412                          Path(0, 0, 1, 2),
00413                          Path(0, 0, 1, 3),
00414                          Path(0, 0, 1),
00415                          Path(0, 1, 0, 0),
00416                          Path(0, 1, 0, 1),
00417                          Path(0, 1, 0, 2),
00418                     },
00419                     new List<IndexPath>()
00420                     {
00421                         Path(),
00422                         Path(0),
00423                         Path(0, 0),
00424                         Path(0, 0, 0),
00425                         Path(0, 1),
00426                         Path(0, 1, 0),
00427                     },
00428                     1 /* selectedInnerNodes */);
00429
00430                 startPath = Path(0, 1, 0, 2);
00431                 SetAnchorIndex(selectionModel, startPath);
00432                 endPath = Path(0, 0, 0, 2);
00433                 SelectRangeFromAnchor(selectionModel, endPath, false /* select */);
00434                 ValidateSelection(selectionModel, new List<IndexPath>() { });
00435             });
00436         }
00437
00438         [TestMethod]
00439         public void ValidateInserts()
00440         {
00441             RunOnUIThread.Execute(() =>
00442             {
00443                 var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
00444                 var selectionModel = new SelectionModel();
00445                 selectionModel.Source = data;
00446
00447                 selectionModel.Select(3);
00448                 selectionModel.Select(4);
00449                 selectionModel.Select(5);
00450                 ValidateSelection(selectionModel,
00451                     new List<IndexPath>()
00452                     {
00453                         Path(3),
00454                         Path(4),
00455                         Path(5),
00456                     },
00457                     new List<IndexPath>()
00458                     {
00459                         Path()
00460                     });
00461
00462                 Log.Comment("Insert in selected range: Inserting 3 items at index 4");
00463                 data.Insert(4, 41);
00464                 data.Insert(4, 42);
00465                 data.Insert(4, 43);
00466                 ValidateSelection(selectionModel,
00467                     new List<IndexPath>()
00468                     {
00469                         Path(3),
00470                         Path(7),
00471                         Path(8),
00472                     },
00473                     new List<IndexPath>()
00474                     {
00475                         Path()
00476                     });
00477
00478                 Log.Comment("Insert before selected range: Inserting 3 items at index 0");
00479                 data.Insert(0, 100);
00480                 data.Insert(0, 101);
00481                 data.Insert(0, 102);
00482                 ValidateSelection(selectionModel,
00483                    new List<IndexPath>()
00484                    {
00485                         Path(6),
00486                         Path(10),
00487                         Path(11),
00488                    },
00489                    new List<IndexPath>()
00490                    {
00491                        Path()
00492                    });
00493
00494                 Log.Comment("Insert after selected range: Inserting 3 items at index 12");
00495                 data.Insert(12, 1000);
00496                 data.Insert(12, 1001);
00497                 data.Insert(12, 1002);
00498                 ValidateSelection(selectionModel,
00499                   new List<IndexPath>()
00500                   {
00501                         Path(6),
00502                         Path(10),
00503                         Path(11),
00504                   },
00505                     new List<IndexPath>()
00506                     {
00507                         Path()
00508                     });
00509             });
00510         }
00511
00512         [TestMethod]
00513         public void ValidateGroupInserts()
00514         {
00515             RunOnUIThread.Execute(() =>
00516             {
00517                 var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
00518                 var selectionModel = new SelectionModel();
00519                 selectionModel.Source = data;
00520
00521                 selectionModel.Select(1, 1);
00522                 ValidateSelection(selectionModel,
00523                     new List<IndexPath>()
00524                     {
00525                         Path(1, 1),
00526                     },
00527                     new List<IndexPath>()
00528                     {
00529                         Path(),
00530                         Path(1),
00531                     });
00532
00533                 Log.Comment("Insert before selected range: Inserting item at group index 0");
00534                 data.Insert(0, 100);
00535                 ValidateSelection(selectionModel,
00536                    new List<IndexPath>()
00537                    {
00538                         Path(2, 1)
00539                    },
00540                    new List<IndexPath>()
00541                    {
00542                        Path(),
00543                        Path(2),
00544                    });
00545
00546                 Log.Comment("Insert after selected range: Inserting item at group index 3");
00547                 data.Insert(3, 1000);
00548                 ValidateSelection(selectionModel,
00549                   new List<IndexPath>()
00550                   {
00551                       Path(2, 1)
00552                   },
00553                   new List<IndexPath>()
00554                   {
00555                       Path(),
00556                       Path(2),
00557                   });
00558             });
00559         }
00560
00561         [TestMethod]
00562         public void ValidateRemoves()
00563         {
00564             RunOnUIThread.Execute(() =>
00565             {
00566                 var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
00567                 var selectionModel = new SelectionModel();
00568                 selectionModel.Source = data;
00569
00570                 selectionModel.Select(6);
00571                 selectionModel.Select(7);
00572                 selectionModel.Select(8);
00573                 ValidateSelection(selectionModel,
00574                     new List<IndexPath>()
00575                     {
00576                         Path(6),
00577                         Path(7),
00578                         Path(8)
00579                     },
00580                     new List<IndexPath>()
00581                     {
00582                         Path()
00583                     });
00584
00585                 Log.Comment("Remove before selected range: Removing item at index 0");
00586                 data.RemoveAt(0);
00587                 ValidateSelection(selectionModel,
00588                     new List<IndexPath>()
00589                     {
00590                         Path(5),
00591                         Path(6),
00592                         Path(7)
00593                     },
00594                     new List<IndexPath>()
00595                     {
00596                         Path()
00597                     });
00598
00599                 Log.Comment("Remove from before to middle of selected range: Removing items at index 3, 4, 5");
00600                 data.RemoveAt(3);
00601                 data.RemoveAt(3);
00602                 data.RemoveAt(3);
00603                 ValidateSelection(selectionModel,
00604                     new List<IndexPath>()
00605                     {
00606                         Path(3),
00607                         Path(4)
00608                     },
00609                     new List<IndexPath>()
00610                     {
00611                         Path()
00612                     });
00613
00614                 Log.Comment("Remove after selected range: Removing item at index 5");
00615                 data.RemoveAt(5);
00616                 ValidateSelection(selectionModel,
00617                     new List<IndexPath>()
00618                     {
00619                         Path(3),
00620                         Path(4)
00621                     },
00622                     new List<IndexPath>()
00623                     {
00624                         Path()
00625                     });
00626             });
00627         }
00628
00629         [TestMethod]
00630         public void ValidateGroupRemoves()
00631         {
00632             RunOnUIThread.Execute(() =>
00633             {
00634                 var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
00635                 var selectionModel = new SelectionModel();
00636                 selectionModel.Source = data;
00637
00638                 selectionModel.Select(1, 1);
00639                 selectionModel.Select(1, 2);
00640                 ValidateSelection(selectionModel,
00641                     new List<IndexPath>()
00642                     {
00643                         Path(1, 1),
00644                         Path(1, 2)
00645                     },
00646                     new List<IndexPath>()
00647                     {
00648                        Path(),
00649                        Path(1),
00650                     });
00651
00652                 Log.Comment("Remove before selected range: Removing item at group index 0");
00653                 data.RemoveAt(0);
00654                 ValidateSelection(selectionModel,
00655                     new List<IndexPath>()
00656                     {
00657                         Path(0, 1),
00658                         Path(0, 2)
00659                     },
00660                     new List<IndexPath>()
00661                     {
00662                         Path(),
00663                         Path(0),
00664                     });
00665
00666                 Log.Comment("Remove after selected range: Removing item at group index 1");
00667                 data.RemoveAt(1);
00668                 ValidateSelection(selectionModel,
00669                     new List<IndexPath>()
00670                     {
00671                         Path(0, 1),
00672                         Path(0, 2)
00673                     },
00674                     new List<IndexPath>()
00675                     {
00676                         Path(),
00677                         Path(0),
00678                     });
00679
00680                 Log.Comment("Remove group containing selected items");
00681                 data.RemoveAt(0);
00682                 ValidateSelection(selectionModel, new List<IndexPath>());
00683             });
00684         }
00685
00686         [TestMethod]
00687         public void CanReplaceItem()
00688         {
00689             RunOnUIThread.Execute(() =>
00690             {
00691                 var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
00692                 var selectionModel = new SelectionModel();
00693                 selectionModel.Source = data;
00694
00695                 selectionModel.Select(3);
00696                 selectionModel.Select(4);
00697                 selectionModel.Select(5);
00698                 ValidateSelection(selectionModel,
00699                     new List<IndexPath>()
00700                     {
00701                         Path(3),
00702                         Path(4),
00703                         Path(5),
00704                     },
00705                     new List<IndexPath>()
00706                     {
00707                         Path()
00708                     });
00709
00710                 data[3] = 300;
00711                 data[4] = 400;
00712                 ValidateSelection(selectionModel,
00713                     new List<IndexPath>()
00714                     {
00715                         Path(5),
00716                     },
00717                     new List<IndexPath>()
00718                     {
00719                         Path()
00720                     });
00721             });
00722         }
00723
00724         [TestMethod]
00725         public void ValidateGroupReplaceLosesSelection()
00726         {
00727             RunOnUIThread.Execute(() =>
00728             {
00729                 var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
00730                 var selectionModel = new SelectionModel();
00731                 selectionModel.Source = data;
00732
00733                 selectionModel.Select(1, 1);
00734                 ValidateSelection(selectionModel,
00735                     new List<IndexPath>()
00736                     {
00737                         Path(1, 1)
00738                     },
00739                     new List<IndexPath>()
00740                     {
00741                         Path(),
00742                         Path(1)
00743                     });
00744
00745                 data[1] = new ObservableCollection<int>(Enumerable.Range(0, 5));
00746                 ValidateSelection(selectionModel, new List<IndexPath>());
00747             });
00748         }
00749
00750         [TestMethod]
00751         public void ValidateClear()
00752         {
00753             RunOnUIThread.Execute(() =>
00754             {
00755                 var data = new ObservableCollection<int>(Enumerable.Range(0, 10));
00756                 var selectionModel = new SelectionModel();
00757                 selectionModel.Source = data;
00758
00759                 selectionModel.Select(3);
00760                 selectionModel.Select(4);
00761                 selectionModel.Select(5);
00762                 ValidateSelection(selectionModel,
00763                     new List<IndexPath>()
00764                     {
00765                         Path(3),
00766                         Path(4),
00767                         Path(5),
00768                     },
00769                     new List<IndexPath>()
00770                     {
00771                         Path()
00772                     });
00773
00774                 data.Clear();
00775                 ValidateSelection(selectionModel, new List<IndexPath>());
00776             });
00777         }
00778
00779         [TestMethod]
00780         public void ValidateGroupClear()
00781         {
00782             RunOnUIThread.Execute(() =>
00783             {
00784                 var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
00785                 var selectionModel = new SelectionModel();
00786                 selectionModel.Source = data;
00787
00788                 selectionModel.Select(1, 1);
00789                 ValidateSelection(selectionModel,
00790                     new List<IndexPath>()
00791                     {
00792                         Path(1, 1)
00793                     },
00794                     new List<IndexPath>()
00795                     {
00796                         Path(),
00797                         Path(1)
00798                     });
00799
00800                 (data[1] as IList).Clear();
00801                 ValidateSelection(selectionModel, new List<IndexPath>());
00802             });
00803         }
00804
00805         // In some cases the leaf node might get a collection change that affects an ancestors selection
00806         // state. In this case we were not raising selection changed event. For example, if all elements
00807         // in a group are selected and a new item gets inserted - the parent goes from selected to partially
00808         // selected. In that case we need to raise the selection changed event so that the header containers
00809         // can show the correct visual.
00810         [TestMethod]
00811         public void ValidateEventWhenInnerNodeChangesSelectionState()
00812         {
00813             RunOnUIThread.Execute(() =>
00814             {
00815                 bool selectionChangedRaised = false;
00816                 var data = CreateNestedData(1 /* levels */ , 3 /* groupsAtLevel */, 3 /* countAtLeaf */);
00817                 var selectionModel = new SelectionModel();
00818                 selectionModel.Source = data;
00819                 selectionModel.SelectionChanged += (sender, args) => { selectionChangedRaised = true; };
00820
00821                 selectionModel.Select(1, 0);
00822                 selectionModel.Select(1, 1);
00823                 selectionModel.Select(1, 2);
00824                 ValidateSelection(selectionModel,
00825                     new List<IndexPath>()
00826                     {
00827                         Path(1, 0),
00828                         Path(1, 1),
00829                         Path(1, 2),
00830                         Path(1)
00831                     },
00832                     new List<IndexPath>()
00833                     {
00834                         Path(),
00835                     },
00836                     1 /* selectedInnerNodes */);
00837
00838                 Log.Comment("Inserting 1.0");
00839                 selectionChangedRaised = false;
00840                 (data[1] as ObservableCollection<object>).Insert(0, 100);
00841                 Verify.IsTrue(selectionChangedRaised, "SelectionChanged event was not raised");
00842                 ValidateSelection(selectionModel,
00843                    new List<IndexPath>()
00844                    {
00845                         Path(1, 1),
00846                         Path(1, 2),
00847                         Path(1, 3),
00848                    },
00849                    new List<IndexPath>()
00850                    {
00851                        Path(),
00852                        Path(1),
00853                    });
00854
00855                 Log.Comment("Removing 1.0");
00856                 selectionChangedRaised = false;
00857                 (data[1] as ObservableCollection<object>).RemoveAt(0);
00858                 Verify.IsTrue(selectionChangedRaised, "SelectionChanged event was not raised");
00859                 ValidateSelection(selectionModel,
00860                    new List<IndexPath>()
00861                    {
00862                        Path(1, 0),
00863                        Path(1, 1),
00864                        Path(1, 2),
00865                        Path(1)
00866                    },
00867                    new List<IndexPath>()
00868                    {
00869                         Path(),
00870                    },
00871                    1 /* selectedInnerNodes */);
00872             });
00873         }
00874
00875         [TestMethod]
00876         public void ValidatePropertyChangedEventIsRaised()
00877         {
00878             RunOnUIThread.Execute(() =>
00879             {
00880                 var selectionModel = new SelectionModel();
00881                 Log.Comment("Set the source to 10 items");
00882                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
00883
00884                 bool selectedIndexChanged = false;
00885                 bool selectedIndicesChanged = false;
00886                 bool SelectedItemChanged = false;
00887                 bool SelectedItemsChanged = false;
00888                 bool AnchorIndexChanged = false;
00889                 selectionModel.PropertyChanged += (sender, args) =>
00890                 {
00891                     switch (args.PropertyName)
00892                     {
00893                         case "SelectedIndex":
00894                             selectedIndexChanged = true;
00895                             break;
00896                         case "SelectedIndices":
00897                             selectedIndicesChanged = true;
00898                             break;
00899                         case "SelectedItem":
00900                             SelectedItemChanged = true;
00901                             break;
00902                         case "SelectedItems":
00903                             SelectedItemsChanged = true;
00904                             break;
00905                         case "AnchorIndex":
00906                             AnchorIndexChanged = true;
00907                             break;
00908
00909                         default:
00910                             throw new InvalidOperationException();
00911                     }
00912                 };
00913
00914                 Select(selectionModel, 3, true);
00915
00916                 Verify.IsTrue(selectedIndexChanged);
00917                 Verify.IsTrue(selectedIndicesChanged);
00918                 Verify.IsTrue(SelectedItemChanged);
00919                 Verify.IsTrue(SelectedItemsChanged);
00920                 Verify.IsTrue(AnchorIndexChanged);
00921             });
00922         }
00923
00924         [TestMethod]
00925         public void CanExtendSelectionModelINPC()
00926         {
00927             RunOnUIThread.Execute(() =>
00928             {
00929                 var selectionModel = new CustomSelectionModel();
00930                 bool intPropertyChanged = false;
00931                 selectionModel.PropertyChanged += (sender, args) =>
00932                 {
00933                     if (args.PropertyName == "IntProperty")
00934                     {
00935                         intPropertyChanged = true;
00936                     }
00937                 };
00938
00939                 selectionModel.IntProperty = 5;
00940                 Verify.IsTrue(intPropertyChanged);
00941             });
00942         }
00943
00944         [TestMethod]
00945         [TestProperty("Ignore", "True")] // TODO 33512004: SelectionModel - GetCustomProperty("SelectedItem") throws invalid cast to ICustomProperty
00946         public void CanReadSelectedItemViaICustomPropertyProvider()
00947         {
00948             RunOnUIThread.Execute(() =>
00949             {
00950                 var selectionModel = new SelectionModel();
00951                 Log.Comment("Set the source to 10 items");
00952                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
00953
00954                 selectionModel.Select(3);
00955
00956                 var icpp = (ICustomPropertyProvider)selectionModel;
00957                 var selectedItemProperty = icpp.GetCustomProperty("SelectedItem");
00958                 Verify.IsTrue(selectedItemProperty.CanRead);
00959                 Verify.AreEqual(3, selectedItemProperty.GetValue(selectionModel));
00960             });
00961         }
00962
00963         [TestMethod]
00964         public void SelectRangeRegressionTest()
00965         {
00966             RunOnUIThread.Execute(() =>
00967             {
00968                 var selectionModel = new SelectionModel() {
00969                     Source = CreateNestedData(1, 2, 3)
00970                 };
00971
00972                 // length of start smaller than end used to cause an out of range error.
00973                 selectionModel.SelectRange(IndexPath.CreateFrom(0), IndexPath.CreateFrom(1, 1));
00974
00975                 ValidateSelection(selectionModel,
00976                     new List<IndexPath>()
00977                     {
00978                         Path(0, 0),
00979                         Path(0, 1),
00980                         Path(0, 2),
00981                         Path(0),
00982                         Path(1, 0),
00983                         Path(1, 1)
00984                     },
00985                     new List<IndexPath>()
00986                     {
00987                         Path(),
00988                         Path(1)
00989                     },
00990                     1 /* selectedInnerNodes */);
00991
00992                 selectionModel = new SelectionModel() { Source = CreateNestedData(2, 2, 1) };
00993
00994                 selectionModel.SelectRange(
00995                     Path(1), Path(2));
00996
00997                 ValidateSelection(
00998                     selectionModel,
00999                     new List<IndexPath> {
01000                         Path(1,0,0),
01001                         Path(1), Path(2),
01002                         Path(1,0),Path(1,1),
01003                         Path(2,0),Path(2,1),
01004                         Path(1,0,1),
01005                         Path(1,1,0),Path(1,1,1),
01006                         Path(2,0,0),Path(2,0,1),
01007                         Path(2,1,0),Path(2,1,1),
01008
01009                     },
01010                     new List<IndexPath> { IndexPath.CreateFromIndices(new List<int> { }) },
01011                     12);
01012
01013             });
01014         }
01015
01016         [TestMethod]
01017         public void AlreadySelectedDoesNotRaiseEvent()
01018         {
01019             var testName = "Select(int32 index), single select";
01020
01021             RunOnUIThread.Execute(() =>
01022             {
01023                 var list = Enumerable.Range(0, 10).ToList();
01024
01025                 var selectionModel = new SelectionModel() {
01026                     Source = list,
01027                     SingleSelect = true
01028                 };
01029
01030                 // Single select index
01031                 selectionModel.Select(0);
01032                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01033                 selectionModel.Select(0);
01034
01035                 selectionModel = new SelectionModel() {
01036                     Source = list,
01037                     SingleSelect = true
01038                 };
01039                 // Single select indexpath
01040                 testName = "SelectAt(IndexPath index), single select";
01041                 selectionModel.SelectAt(IndexPath.CreateFrom(1));
01042                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01043                 selectionModel.SelectAt(IndexPath.CreateFrom(1));
01044
01045                 // multi select index
01046                 selectionModel = new SelectionModel() {
01047                     Source = list
01048                 };
01049                 selectionModel.Select(1);
01050                 selectionModel.Select(2);
01051                 testName = "Select(int32 index), multiselect";
01052                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01053                 selectionModel.Select(1);
01054                 selectionModel.Select(2);
01055
01056                 selectionModel = new SelectionModel() {
01057                     Source = list
01058                 };
01059
01060                 // multi select indexpath
01061                 selectionModel.SelectAt(IndexPath.CreateFrom(1));
01062                 selectionModel.SelectAt(IndexPath.CreateFrom(2));
01063                 testName = "SelectAt(IndexPath index), multiselect";
01064                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01065                 selectionModel.SelectAt(IndexPath.CreateFrom(1));
01066                 selectionModel.SelectAt(IndexPath.CreateFrom(2));
01067             });
01068
01069             void ThrowIfRaisedSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
01070             {
01071                 throw new Exception("SelectionChangedEvent was raised, but shouldn't have been raised as selection did not change. Tested method: " + testName);
01072             }
01073         }
01074
01075         [TestMethod]
01076         public void AlreadyDeselectedDoesNotRaiseEvent()
01077         {
01078             var testName = "Deselect(int32 index), single select";
01079
01080             RunOnUIThread.Execute(() =>
01081             {
01082                 var list = Enumerable.Range(0, 10).ToList();
01083
01084                 var selectionModel = new SelectionModel() {
01085                     Source = list,
01086                     SingleSelect = true
01087                 };
01088
01089                 // Single select index
01090                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01091                 selectionModel.Deselect(0);
01092
01093                 selectionModel = new SelectionModel() {
01094                     Source = list,
01095                     SingleSelect = true
01096                 };
01097                 // Single select indexpath
01098                 testName = "DeselectAt(IndexPath index), single select";
01099                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01100                 selectionModel.DeselectAt(IndexPath.CreateFrom(1));
01101
01102                 // multi select index
01103                 selectionModel = new SelectionModel() {
01104                     Source = list
01105                 };
01106                 testName = "Deselect(int32 index), multiselect";
01107                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01108                 selectionModel.Deselect(1);
01109                 selectionModel.Deselect(2);
01110
01111                 selectionModel = new SelectionModel() {
01112                     Source = list
01113                 };
01114
01115                 // multi select indexpath
01116                 testName = "DeselectAt(IndexPath index), multiselect";
01117                 selectionModel.SelectionChanged += ThrowIfRaisedSelectionChanged;
01118                 selectionModel.DeselectAt(IndexPath.CreateFrom(1));
01119                 selectionModel.DeselectAt(IndexPath.CreateFrom(2));
01120             });
01121
01122             void ThrowIfRaisedSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
01123             {
01124                 throw new Exception("SelectionChangedEvent was raised, but shouldn't have been raised as selection did not change. Tested method: " + testName);
01125             }
01126         }
01127
01128         [TestMethod]
01129         public void ValidateSelectionModeChangeFromMultipleToSingle()
01130         {
01131             RunOnUIThread.Execute(() =>
01132             {
01133                 SelectionModel selectionModel = new SelectionModel();
01134                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
01135
01136                 // First test: switching from multiple to single selection mode with just one selected item
01137                 selectionModel.Select(4);
01138
01139                 selectionModel.SingleSelect = true;
01140
01141                 // Verify that the item at index 4 is still selected
01142                 Verify.IsTrue(selectionModel.SelectedIndex.CompareTo(Path(4)) == 0, "Item at index 4 should have still been selected");
01143
01144                 // Second test: this time switching from multiple to single selection mode with more than one selected item
01145                 selectionModel.SingleSelect = false;
01146                 selectionModel.Select(5);
01147                 selectionModel.Select(6);
01148
01149                 // Now switch to single selection mode
01150                 selectionModel.SingleSelect = true;
01151
01152                 // Verify that
01153                 // - only one item is currently selected
01154                 // - the currently selected item is the item with the lowest index in the Multiple selection list
01155                 Verify.AreEqual(1, selectionModel.SelectedIndices.Count,
01156                     "Exactly one item should have been selected now after we switched from Multiple to Single selection mode");
01157                 Verify.IsTrue(selectionModel.SelectedIndices[0].CompareTo(selectionModel.SelectedIndex) == 0,
01158                     "SelectedIndex and SelectedIndices should have been identical");
01159                 Verify.IsTrue(selectionModel.SelectedIndex.CompareTo(Path(4)) == 0, "The currently selected item should have been the first item in the Multiple selection list");
01160             });
01161         }
01162
01163         [TestMethod]
01164         public void ValidateSelectionModeChangeFromMultipleToSingleSelectionChangedEvent()
01165         {
01166             RunOnUIThread.Execute(() =>
01167             {
01168                 SelectionModel selectionModel = new SelectionModel();
01169                 selectionModel.Source = Enumerable.Range(0, 10).ToList();
01170
01171                 // First test: switching from multiple to single selection mode with just one selected item
01172                 selectionModel.Select(4);
01173
01174                 int selectionChangedFiredCount = 0;
01175                 selectionModel.SelectionChanged += IncreaseCountIfRaisedSelectionChanged;
01176
01177                 // Now switch to single selection mode
01178                 selectionModel.SingleSelect = true;
01179
01180                 // Verify that no SelectionChanged event was raised
01181                 Verify.AreEqual(0, selectionChangedFiredCount, "SelectionChanged event should have not been raised as only one item was selected");
01182
01183                 // Second test: this time switching from multiple to single selection mode with more than one selected item
01184                 selectionModel.SelectionChanged -= IncreaseCountIfRaisedSelectionChanged;
01185                 selectionModel.SingleSelect = false;
01186                 selectionModel.Select(5);
01187                 selectionModel.SelectionChanged += IncreaseCountIfRaisedSelectionChanged;
01188
01189                 // Now switch to single selection mode
01190                 selectionModel.SingleSelect = true;
01191
01192                 // Verify that the SelectionChanged event was raised
01193                 Verify.AreEqual(1, selectionChangedFiredCount, "SelectionChanged event should have been raised as the selection changed");
01194
01195                 void IncreaseCountIfRaisedSelectionChanged(SelectionModel sender, SelectionModelSelectionChangedEventArgs args)
01196                 {
01197                     selectionChangedFiredCount++;
01198                 }
01199             });
01200         }
01201
01202         private void Select(SelectionModel manager, int index, bool select)
01203         {
01204             Log.Comment((select ? "Selecting " : "DeSelecting ") + index);
01205             if (select)
01206             {
01207                 manager.Select(index);
01208             }
01209             else
01210             {
01211                 manager.Deselect(index);
01212             }
01213         }
01214
01215         private void Select(SelectionModel manager, int groupIndex, int itemIndex, bool select)
01216         {
01217             Log.Comment((select ? "Selecting " : "DeSelecting ") + groupIndex + "." + itemIndex);
01218             if (select)
01219             {
01220                 manager.Select(groupIndex, itemIndex);
01221             }
01222             else
01223             {
01224                 manager.Deselect(groupIndex, itemIndex);
01225             }
01226         }
01227
01228         private void Select(SelectionModel manager, IndexPath index, bool select)
01229         {
01230             Log.Comment((select ? "Selecting " : "DeSelecting ") + index);
01231             if (select)
01232             {
01233                 manager.SelectAt(index);
01234             }
01235             else
01236             {
01237                 manager.DeselectAt(index);
01238             }
01239         }
01240
01241         private void SelectRangeFromAnchor(SelectionModel manager, int index, bool select)
01242         {
01243             Log.Comment("SelectRangeFromAnchor " + index + " select: " + select.ToString());
01244             if (select)
01245             {
01246                 manager.SelectRangeFromAnchor(index);
01247             }
01248             else
01249             {
01250                 manager.DeselectRangeFromAnchor(index);
01251             }
01252         }
01253
01254         private void SelectRangeFromAnchor(SelectionModel manager, int groupIndex, int itemIndex, bool select)
01255         {
01256             Log.Comment("SelectRangeFromAnchor " + groupIndex + "." + itemIndex + " select:" + select.ToString());
01257             if (select)
01258             {
01259                 manager.SelectRangeFromAnchor(groupIndex, itemIndex);
01260             }
01261             else
01262             {
01263                 manager.DeselectRangeFromAnchor(groupIndex, itemIndex);
01264             }
01265         }
01266
01267         private void SelectRangeFromAnchor(SelectionModel manager, IndexPath index, bool select)
01268         {
01269             Log.Comment("SelectRangeFromAnchor " + index + " select: " + select.ToString());
01270             if (select)
01271             {
01272                 manager.SelectRangeFromAnchorTo(index);
01273             }
01274             else
01275             {
01276                 manager.DeselectRangeFromAnchorTo(index);
01277             }
01278         }
01279
01280         private void ClearSelection(SelectionModel manager)
01281         {
01282             Log.Comment("ClearSelection");
01283             manager.ClearSelection();
01284         }
01285
01286         private void SetAnchorIndex(SelectionModel manager, int index)
01287         {
01288             Log.Comment("SetAnchorIndex " + index);
01289             manager.SetAnchorIndex(index);
01290         }
01291
01292         private void SetAnchorIndex(SelectionModel manager, int groupIndex, int itemIndex)
01293         {
01294             Log.Comment("SetAnchor " + groupIndex + "." + itemIndex);
01295             manager.SetAnchorIndex(groupIndex, itemIndex);
01296         }
01297
01298         private void SetAnchorIndex(SelectionModel manager, IndexPath index)
01299         {
01300             Log.Comment("SetAnchor " + index);
01301             manager.AnchorIndex = index;
01302         }
01303
01304         private void ValidateSelection(
01305             SelectionModel selectionModel,
01306             List<IndexPath> expectedSelected,
01307             List<IndexPath> expectedPartialSelected = null,
01308             int selectedInnerNodes = 0)
01309         {
01310             Log.Comment("Validating Selection...");
01311
01312             Log.Comment("Selection contains indices:");
01313             foreach (var index in selectionModel.SelectedIndices)
01314             {
01315                 Log.Comment(" " + index.ToString());
01316             }
01317
01318             Log.Comment("Selection contains items:");
01319             foreach (var item in selectionModel.SelectedItems)
01320             {
01321                 Log.Comment(" " + item.ToString());
01322             }
01323
01324             if (selectionModel.Source != null)
01325             {
01326                 List<IndexPath> allIndices = GetIndexPathsInSource(selectionModel.Source);
01327                 foreach (var index in allIndices)
01328                 {
01329                     bool? isSelected = selectionModel.IsSelectedAt(index);
01330                     if (Contains(expectedSelected, index))
01331                     {
01332                         Verify.IsTrue(isSelected.Value, index + " is Selected");
01333                     }
01334                     else if (expectedPartialSelected != null && Contains(expectedPartialSelected, index))
01335                     {
01336                         Verify.IsNull(isSelected, index + " is partially Selected");
01337                     }
01338                     else
01339                     {
01340                         if (isSelected == null)
01341                         {
01342                             Log.Comment("*************" + index + " is null");
01343                             Verify.Fail("Expected false but got null");
01344                         }
01345                         else
01346                         {
01347                             Verify.IsFalse(isSelected.Value, index + " is not Selected");
01348                         }
01349                     }
01350                 }
01351             }
01352             else
01353             {
01354                 foreach (var index in expectedSelected)
01355                 {
01356                     Verify.IsTrue(selectionModel.IsSelectedAt(index).Value, index + " is Selected");
01357                 }
01358             }
01359             if (expectedSelected.Count > 0)
01360             {
01361                 Log.Comment("SelectedIndex is " + selectionModel.SelectedIndex);
01362                 Verify.AreEqual(0, selectionModel.SelectedIndex.CompareTo(expectedSelected[0]));
01363                 if (selectionModel.Source != null)
01364                 {
01365                     Verify.AreEqual(selectionModel.SelectedItem, GetData(selectionModel, expectedSelected[0]));
01366                 }
01367
01368                 int itemsCount = selectionModel.SelectedItems.Count();
01369                 Verify.AreEqual(selectionModel.Source != null ? expectedSelected.Count - selectedInnerNodes : 0, itemsCount);
01370                 int indicesCount = selectionModel.SelectedIndices.Count();
01371                 Verify.AreEqual(expectedSelected.Count - selectedInnerNodes, indicesCount);
01372             }
01373
01374             Log.Comment("Validating Selection... done");
01375         }
01376
01377         private object GetData(SelectionModel selectionModel, IndexPath indexPath)
01378         {
01379             var data = selectionModel.Source;
01380             for (int i = 0; i < indexPath.GetSize(); i++)
01381             {
01382                 var listData = data as IList;
01383                 data = listData[indexPath.GetAt(i)];
01384             }
01385
01386             return data;
01387         }
01388
01389         private bool AreEqual(IndexPath a, IndexPath b)
01390         {
01391             if (a.GetSize() != b.GetSize())
01392             {
01393                 return false;
01394             }
01395
01396             for (int i = 0; i < a.GetSize(); i++)
01397             {
01398                 if (a.GetAt(i) != b.GetAt(i))
01399                 {
01400                     return false;
01401                 }
01402             }
01403
01404             return true;
01405         }
01406
01407         private List<IndexPath> GetIndexPathsInSource(object source)
01408         {
01409             List<IndexPath> paths = new List<IndexPath>();
01410             Traverse(source, (TreeWalkNodeInfo node) =>
01411             {
01412                 if (!paths.Contains(node.Path))
01413                 {
01414                     paths.Add(node.Path);
01415                 }
01416             });
01417
01418             Log.Comment("All Paths in source..");
01419             foreach (var path in paths)
01420             {
01421                 Log.Comment(path.ToString());
01422             }
01423             Log.Comment("done.");
01424
01425             return paths;
01426         }
01427
01428         private static void Traverse(object root, Action<TreeWalkNodeInfo> nodeAction)
01429         {
01430             var pendingNodes = new Stack<TreeWalkNodeInfo>();
01431             IndexPath current = Path(null);
01432             pendingNodes.Push(new TreeWalkNodeInfo() { Current = root, Path = current });
01433
01434             while (pendingNodes.Count > 0)
01435             {
01436                 var currentNode = pendingNodes.Pop();
01437                 var currentObject = currentNode.Current as IList;
01438
01439                 if (currentObject != null)
01440                 {
01441                     for (int i = currentObject.Count - 1; i >= 0; i--)
01442                     {
01443                         var child = currentObject[i];
01444                         List<int> path = new List<int>();
01445                         for (int idx = 0; idx < currentNode.Path.GetSize(); idx++)
01446                         {
01447                             path.Add(currentNode.Path.GetAt(idx));
01448                         }
01449
01450                         path.Add(i);
01451                         var childPath = IndexPath.CreateFromIndices(path);
01452                         if (child != null)
01453                         {
01454                             pendingNodes.Push(new TreeWalkNodeInfo() { Current = child, Path = childPath });
01455                         }
01456                     }
01457                 }
01458
01459                 nodeAction(currentNode);
01460             }
01461         }
01462
01463         private bool Contains(List<IndexPath> list, IndexPath index)
01464         {
01465             bool contains = false;
01466             foreach (var item in list)
01467             {
01468                 if (item.CompareTo(index) == 0)
01469                 {
01470                     contains = true;
01471                     break;
01472                 }
01473             }
01474
01475             return contains;
01476         }
01477
01478         public static ObservableCollection<object> CreateNestedData(int levels = 3, int groupsAtLevel = 5, int countAtLeaf = 10)
01479         {
01480             var data = new ObservableCollection<object>();
01481             if (levels != 0)
01482             {
01483                 for (int i = 0; i < groupsAtLevel; i++)
01484                 {
01485                     data.Add(CreateNestedData(levels - 1, groupsAtLevel, countAtLeaf));
01486                 }
01487             }
01488             else
01489             {
01490                 for (int i = 0; i < countAtLeaf; i++)
01491                 {
01492                     data.Add(_nextData++);
01493                 }
01494             }
01495
01496             return data;
01497         }
01498
01499         public static IndexPath Path(params int[] path)
01500         {
01501             return IndexPath.CreateFromIndices(path);
01502         }
01503
01504         private static int _nextData = 0;
01505         private struct TreeWalkNodeInfo
01506         {
01507             public object Current { get; set; }
01508
01509             public IndexPath Path { get; set; }
01510         }
01511     }
01512
01513     class CustomSelectionModel : SelectionModel
01514     {
01515         public int IntProperty
01516         {
01517             get { return _intProperty; }
01518             set
01519             {
01520                 _intProperty = value;
01521                 OnPropertyChanged("IntProperty");
01522             }
01523         }
01524
01525         private int _intProperty;
01526     }
01527 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/SelectedItems.h Source File

  • File List
  • File Members
  • Repeater

SelectedItems.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 struct SelectedItemInfo;
00007
00008 template <typename T>
00009 class SelectedItems:
00010     public ReferenceTracker<SelectedItems<T>,
00011         typename reference_tracker_implements_t<typename winrt::IVectorView<T>>::type,
00012         typename winrt::IIterable<T>>
00013 {
00014 public:
00015     SelectedItems(const std::vector<SelectedItemInfo>& infos,
00016         std::function<T(const std::vector<SelectedItemInfo>& infos, unsigned int index)> getAtImpl)
00017     {
00018         m_infos = infos;
00019         m_getAtImpl = getAtImpl;
00020         for (auto& info: infos)
00021         {
00022             if (auto node = info.Node.lock())
00023             {
00024                 m_totalCount += node->SelectedCount();
00025             }
00026             else
00027             {
00028                 throw winrt::hresult_error(E_FAIL, L"Selection changed after the SelectedIndices/Items property was read.");
00029             }
00030         }
00031     }
00032
00033     ~SelectedItems()
00034     {
00035         m_infos.clear();
00036     }
00037
00038 #pragma region IVectorView<T>
00039     uint32_t Size()
00040     {
00041         return m_totalCount;
00042     }
00043
00044     T GetAt(uint32_t index)
00045     {
00046         return m_getAtImpl(m_infos, index);
00047     }
00048
00049     bool IndexOf(T const& value, uint32_t &index) noexcept
00050     {
00051         winrt::throw_hresult(E_NOTIMPL);
00052     }
00053
00054     uint32_t GetMany(uint32_t startIndex, winrt::array_view<T> const& values) noexcept
00055     {
00056         winrt::throw_hresult(E_NOTIMPL);
00057     }
00058
00059 #pragma endregion
00060
00061 #pragma region winrt::IIterable<T>
00062     winrt::IIterator<T> First()
00063     {
00064         return winrt::make<SelectedItems<T>::Iterator>(*this);
00065     }
00066 #pragma endregion
00067
00068 private:
00069     class Iterator :
00070         public ReferenceTracker<Iterator, reference_tracker_implements_t<winrt::IIterator<T>>::type>
00071     {
00072     public:
00073         Iterator(const winrt::IVectorView<T>& selectedItems)
00074         {
00075             m_selectedItems = selectedItems;
00076         }
00077
00078         ~Iterator()
00079         {
00080
00081         }
00082
00083         T Current()
00084         {
00085             auto items = m_selectedItems;
00086             if(m_currentIndex < items.Size())
00087             {
00088                 return items.GetAt(m_currentIndex);
00089             }
00090             else
00091             {
00092                 throw winrt::hresult_out_of_bounds();
00093             }
00094         }
00095
00096         bool HasCurrent()
00097         {
00098             return (m_currentIndex < m_selectedItems.Size());
00099         }
00100
00101         bool MoveNext()
00102         {
00103             if (m_currentIndex < m_selectedItems.Size())
00104             {
00105                 ++m_currentIndex;
00106                 return (m_currentIndex < m_selectedItems.Size());
00107             }
00108             else
00109             {
00110                 throw winrt::hresult_out_of_bounds();
00111             }
00112         }
00113
00114         uint32_t GetMany(winrt::array_view<T> values)
00115         {
00116             uint32_t howMany = 0;
00117             if (HasCurrent())
00118             {
00119                 do
00120                 {
00121                     if (howMany >= values.size()) break;
00122
00123                     values[howMany] = Current();
00124                     howMany++;
00125                 } while (MoveNext());
00126             }
00127
00128             return howMany;
00129         }
00130
00131     private:
00132         winrt::IVectorView<T> m_selectedItems{ nullptr };
00133         unsigned int m_currentIndex = 0;
00134     };
00135
00136     std::vector<SelectedItemInfo> m_infos;
00137     unsigned int m_totalCount{ 0 };
00138     std::function<T(const std::vector<SelectedItemInfo>& infos, int /*index*/)> m_getAtImpl;
00139 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingStoryboardAnimationPage Member List

This is the complete list of members for ProgressRingStoryboardAnimationPage, including all inherited members.
ProgressRingStoryboardAnimationPage() | ProgressRingStoryboardAnimationPage | [inline]
ProgressRingStoryboardAnimationPage_CurrentStateChanged(object sender, VisualStateChangedEventArgs e) | ProgressRingStoryboardAnimationPage | [inline, private]
ProgressRingStoryboardAnimationPage_Loaded(object sender, RoutedEventArgs e) | ProgressRingStoryboardAnimationPage | [inline, private]
UpdateWidth_Click(object sender, RoutedEventArgs e) | ProgressRingStoryboardAnimationPage | [inline]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronDownSmallVisualSource.h Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedChevronDownSmallVisualSource.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 //------------------------------------------------------------------------------
00003 // <auto-generated>
00004 //     This code was generated by a tool.
00005 //
00006 //       LottieGen version:
00007 //           7.1.0+ge1fa92580f
00008 //
00009 //       Command:
00010 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedChevronDownSmallVisualSource.json
00011 //
00012 //       Input file:
00013 //           AnimatedChevronDownSmallVisualSource.json (10093 bytes created 9:26-07:00 Jun 8 2021)
00014 //
00015 //       LottieGen source:
00016 //           http://aka.ms/Lottie
00017 //
00018 //     Changes to this file may cause incorrect behavior and will be lost if
00019 //     the code is regenerated.
00020 // </auto-generated>
00021 //------------------------------------------------------------------------------
00022 #include "common.h"
00023 #include "AnimatedVisuals\AnimatedChevronDownSmallVisualSource.g.h"
00024
00025 // Name:        Controls_06_DownChevron_DropDown+SplitBtn
00026 // Frame rate:  60 fps
00027 // Frame count: 29
00028 // Duration:    483.3 mS
00029 // ____________________________________________________________________________________________
00030 // |           Marker           |           Constant           | Frame |  mS   |   Progress   |
00031 // |____________________________|______________________________|_______|_______|______________|
00032 // | NormalToPointerOver_Start  | M_NormalToPointerOver_Start  |     0 |   0.0 | 0.0F         |
00033 // | NormalToPointerOver_End    | M_NormalToPointerOver_End    |     0 |   0.0 | 0.0F         |
00034 // | NormalToPressed_Start      | M_NormalToPressed_Start      |     0 |   0.0 | 0.0F         |
00035 // | NormalToPressed_End        | M_NormalToPressed_End        |     9 | 150.0 | 0.312068969F |
00036 // | PointerOverToNormal_Start  | M_PointerOverToNormal_Start  |     0 |   0.0 | 0.0F         |
00037 // | PointerOverToNormal_End    | M_PointerOverToNormal_End    |     0 |   0.0 | 0.0F         |
00038 // | PointerOverToPressed_Start | M_PointerOverToPressed_Start |     0 |   0.0 | 0.0F         |
00039 // | PointerOverToPressed_End   | M_PointerOverToPressed_End   |     9 | 150.0 | 0.312068969F |
00040 // | PressedToNormal_Start      | M_PressedToNormal_Start      |    10 | 166.7 | 0.346551716F |
00041 // | PressedToNormal_End        | M_PressedToNormal_End        |    28 | 466.7 | 0.967241406F |
00042 // | PressedToPointerOver_Start | M_PressedToPointerOver_Start |    10 | 166.7 | 0.346551716F |
00043 // | PressedToPointerOver_End   | M_PressedToPointerOver_End   |    28 | 466.7 | 0.967241406F |
00044 // --------------------------------------------------------------------------------------------
00045 // _______________________________________________________
00046 // | Theme property |  Accessor  | Type  | Default value |
00047 // |________________|____________|_______|_______________|
00048 // | Foreground     | Foreground | Color |   #FF060808   |
00049 // -------------------------------------------------------
00050 class AnimatedChevronDownSmallVisualSource
00051     : public winrt::implementation::AnimatedChevronDownSmallVisualSourceT<AnimatedChevronDownSmallVisualSource>
00052 {
00053     winrt::Microsoft::UI::Composition::CompositionPropertySet _themeProperties{ nullptr };
00054     winrt::Windows::UI::Color _themeForeground{ 0xFF, 0x06, 0x08, 0x08 };
00055     winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00056
00057     static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4(winrt::Windows::UI::Color color);
00058 public:
00059     // Animation duration: 0.483 seconds.
00060     static constexpr int64_t c_durationTicks{ 4833333L };
00061
00062     // Marker: NormalToPointerOver_Start.
00063     static constexpr float M_NormalToPointerOver_Start{ 0.0F };
00064
00065     // Marker: NormalToPointerOver_End.
00066     static constexpr float M_NormalToPointerOver_End{ 0.0F };
00067
00068     // Marker: NormalToPressed_Start.
00069     static constexpr float M_NormalToPressed_Start{ 0.0F };
00070
00071     // Marker: NormalToPressed_End.
00072     static constexpr float M_NormalToPressed_End{ 0.312068969F };
00073
00074     // Marker: PointerOverToNormal_Start.
00075     static constexpr float M_PointerOverToNormal_Start{ 0.0F };
00076
00077     // Marker: PointerOverToNormal_End.
00078     static constexpr float M_PointerOverToNormal_End{ 0.0F };
00079
00080     // Marker: PointerOverToPressed_Start.
00081     static constexpr float M_PointerOverToPressed_Start{ 0.0F };
00082
00083     // Marker: PointerOverToPressed_End.
00084     static constexpr float M_PointerOverToPressed_End{ 0.312068969F };
00085
00086     // Marker: PressedToNormal_Start.
00087     static constexpr float M_PressedToNormal_Start{ 0.346551716F };
00088
00089     // Marker: PressedToNormal_End.
00090     static constexpr float M_PressedToNormal_End{ 0.967241406F };
00091
00092     // Marker: PressedToPointerOver_Start.
00093     static constexpr float M_PressedToPointerOver_Start{ 0.346551716F };
00094
00095     // Marker: PressedToPointerOver_End.
00096     static constexpr float M_PressedToPointerOver_End{ 0.967241406F };
00097
00098     // Theme property: Foreground.
00099     static inline const winrt::Windows::UI::Color c_themeForeground{ 0xFF, 0x06, 0x08, 0x08 };
00100
00101
00102     winrt::Windows::UI::Color Foreground();
00103     void Foreground(winrt::Windows::UI::Color value);
00104
00105     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00106         winrt::Microsoft::UI::Composition::Compositor const& compositor);
00107
00108     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00109         winrt::Microsoft::UI::Composition::Compositor const& compositor,
00110         winrt::Windows::Foundation::IInspectable& diagnostics);
00111
00112     // Gets the number of frames in the animation.
00113     double FrameCount();
00114
00115     // Gets the framerate of the animation.
00116     double Framerate();
00117
00118     // Gets the duration of the animation.
00119     winrt::Windows::Foundation::TimeSpan Duration();
00120
00121     // Converts a zero-based frame number to the corresponding progress value denoting the
00122     // start of the frame.
00123     double FrameToProgress(double frameNumber);
00124
00125     // Returns a map from marker names to corresponding progress values.
00126     winrt::Windows::Foundation::Collections::IMapView<hstring, double> Markers();
00127
00128     // Sets the color property with the given name, or does nothing if no such property
00129     // exists.
00130     void SetColorProperty(hstring const& propertyName, winrt::Windows::UI::Color value);
00131
00132     // Sets the scalar property with the given name, or does nothing if no such property
00133     // exists.
00134     void SetScalarProperty(hstring const& propertyName, double value);
00135 };
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioMenuFlyoutItem Member List

This is the complete list of members for RadioMenuFlyoutItem, including all inherited members.
abi_enter() | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
AreCheckStatesEnabledProperty() | RadioMenuFlyoutItemProperties | [inline, static]
CheckThread() | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
ClearProperties() | RadioMenuFlyoutItemProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< RadioMenuFlyoutItem > &&self) noexcept | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline, static]
EnsureProperties() | RadioMenuFlyoutItemProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
final_release(std::unique_ptr< RadioMenuFlyoutItem > &&self) | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline, static]
GetAreCheckStatesEnabled(winrt::MenuFlyoutSubItem const &target) | RadioMenuFlyoutItemProperties | [static]
GetBase() | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
GetInner() | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
GroupName(winrt::hstring const &value) | RadioMenuFlyoutItemProperties |
GroupName() | RadioMenuFlyoutItemProperties |
GroupNameProperty() | RadioMenuFlyoutItemProperties | [inline, static]
IsChecked(bool value) | RadioMenuFlyoutItemProperties |
IsChecked() | RadioMenuFlyoutItemProperties |
IsCheckedProperty() | RadioMenuFlyoutItemProperties | [inline, static]
IsOnThread() | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
OnAreCheckStatesEnabledPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args) | RadioMenuFlyoutItem | [static]
OnGroupNamePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioMenuFlyoutItemProperties | [static]
OnInternalIsCheckedChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | RadioMenuFlyoutItem | [private]
OnIsCheckedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioMenuFlyoutItemProperties | [static]
OnLoaded(winrt::IInspectable const &, winrt::RoutedEventArgs const &) | RadioMenuFlyoutItem |
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadioMenuFlyoutItem |
OnUnloaded(winrt::IInspectable const &, winrt::RoutedEventArgs const &) | RadioMenuFlyoutItem |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
RadioMenuFlyoutItem() | RadioMenuFlyoutItem |
RadioMenuFlyoutItemProperties() | RadioMenuFlyoutItemProperties |
ReferenceTracker(Args &&...args) | ReferenceTracker< RadioMenuFlyoutItem, DeriveFromToggleMenuFlyoutItemHelper_base, winrt::RadioMenuFlyoutItem > | [inline]
s_AreCheckStatesEnabledProperty | RadioMenuFlyoutItemProperties | [static]
s_GroupNameProperty | RadioMenuFlyoutItemProperties | [static]
s_IsCheckedProperty | RadioMenuFlyoutItemProperties | [static]
s_selectionMap | RadioMenuFlyoutItem | [private, static]
SetAreCheckStatesEnabled(winrt::MenuFlyoutSubItem const &target, bool value) | RadioMenuFlyoutItemProperties | [static]
UpdateCheckedItemInGroup() | RadioMenuFlyoutItem | [private]
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewTests Member List

This is the complete list of members for ItemsViewTests, including all inherited members.
AlternateLayoutPaths(bool useSizeArrays) | ItemsViewTests | [inline, private]
AlternateLayoutPathsByUnhookingItemsInfoRequested() | ItemsViewTests | [inline]
AlternateLayoutPathsWithSizeArrays() | ItemsViewTests | [inline]
AlternateLayoutPathsWithUniformSizes() | ItemsViewTests | [inline]
BringItemIntoView(int index, ItemsView itemsView, AutoResetEvent scrollViewBringingIntoViewEvent, AutoResetEvent scrollViewScrollCompletedEvent) | ItemsViewTests | [inline, private]
c_defaultUIItemsViewHeight | ItemsViewTests | [private]
c_defaultUIItemsViewWidth | ItemsViewTests | [private]
c_MaxWaitDuration | ItemsViewTests | [private]
CanBindSelectedItem() | ItemsViewTests | [inline]
CanBringItemIntoView() | ItemsViewTests | [inline]
CanBringItemIntoView(bool useLinedFlowLayout, bool useUniformGridLayout) | ItemsViewTests | [inline, private]
CanChangeLayoutProperty() | ItemsViewTests | [inline]
CanChangeSelectionModeProperty() | ItemsViewTests | [inline]
CanSetItemContainerIsSelectedProperty() | ItemsViewTests | [inline]
CanSetItemTemplateAfterItemsSourceProperty() | ItemsViewTests | [inline]
CanUseItemsSourceWithItemContainers() | ItemsViewTests | [inline]
Digits | ItemsViewTests |
HandleItemsInfoRequested() | ItemsViewTests | [inline]
HandleItemsInfoRequested(bool useSizeArrays, bool useExtraInfo, bool useTemporaryAspectRatio) | ItemsViewTests | [inline, private]
HandleItemsInfoRequestedWithExtraInfo() | ItemsViewTests | [inline]
HandleItemsInfoRequestedWithSizeArrays() | ItemsViewTests | [inline]
HandleItemsInfoRequestedWithSizeArraysAndExtraInfo() | ItemsViewTests | [inline]
HandleItemsInfoRequestedWithTemporaryAndExtraInfo() | ItemsViewTests | [inline]
HandleItemsInfoRequestedWithTemporaryInfo() | ItemsViewTests | [inline]
LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args) | ItemsViewTests | [inline, private]
LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger enum name | ItemsViewTests | [private]
LogItemsViewProperties(ItemsView itemsView) | ItemsViewTests | [inline, private]
SetupDefaultUI(ItemsView itemsView, AutoResetEvent itemsViewLoadedEvent=null, AutoResetEvent itemsViewUnloadedEvent=null, bool setAsContentRoot=true, bool useParentGrid=false) | ItemsViewTests | [inline, private]
SnapToPower(double value) | ItemsViewTests | [inline, private]
TriggerLinedFlowLayoutItemsInfoRequestedEventArgsException(LinedFlowLayoutItemsInfoRequestedEventArgsExceptionTrigger trigger) | ItemsViewTests | [inline, private]
TriggerLinedFlowLayoutItemsInfoRequestedEventArgsExceptions() | ItemsViewTests | [inline]
VerifyCanInvertSelection() | ItemsViewTests | [inline]
VerifyDefaultPropertyValues() | ItemsViewTests | [inline]
VerifyItemsViewUIABehavior() | ItemsViewTests | [inline]
VerifyItemsViewUIASelectionProviderBehavior() | ItemsViewTests | [inline]
VerifyLinedFlowLayoutAverageItemsPerLineStability() | ItemsViewTests | [inline]
VerifyPropertySetters() | ItemsViewTests | [inline]
VerifyPropertyValuesAfterTemplateApplication() | ItemsViewTests | [inline]
VerifySelectionPersistsAfterRecycling() | ItemsViewTests | [inline]
WaitForEvent(string logComment, EventWaitHandle eventWaitHandle) | ItemsViewTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SpecialTreeViewItem Member List

This is the complete list of members for SpecialTreeViewItem, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
CheckThread() | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
ClearProperties() | TreeViewItemProperties | [static]
CollapsedGlyph(winrt::hstring const &value) | TreeViewItemProperties |
CollapsedGlyph() | TreeViewItemProperties |
CollapsedGlyphProperty() | TreeViewItemProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewItem > &&self) noexcept | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline, static]
EnsureProperties() | TreeViewItemProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
ExpandedGlyph(winrt::hstring const &value) | TreeViewItemProperties |
ExpandedGlyph() | TreeViewItemProperties |
ExpandedGlyphProperty() | TreeViewItemProperties | [inline, static]
final_release(std::unique_ptr< TreeViewItem > &&self) | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline, static]
GetBase() | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
GetInner() | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
GlyphBrush(winrt::Brush const &value) | TreeViewItemProperties |
GlyphBrush() | TreeViewItemProperties |
GlyphBrushProperty() | TreeViewItemProperties | [inline, static]
GlyphOpacity(double value) | TreeViewItemProperties |
GlyphOpacity() | TreeViewItemProperties |
GlyphOpacityProperty() | TreeViewItemProperties | [inline, static]
GlyphSize(double value) | TreeViewItemProperties |
GlyphSize() | TreeViewItemProperties |
GlyphSizeProperty() | TreeViewItemProperties | [inline, static]
HasUnrealizedChildren(bool value) | TreeViewItemProperties |
HasUnrealizedChildren() | TreeViewItemProperties |
HasUnrealizedChildrenProperty() | TreeViewItemProperties | [inline, static]
IsExpanded(bool value) | TreeViewItemProperties |
IsExpanded() | TreeViewItemProperties |
IsExpandedProperty() | TreeViewItemProperties | [inline, static]
IsOnThread() | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
IsSelectedInternal() | TreeViewItem |
ItemsSource(winrt::IInspectable const &value) | TreeViewItemProperties |
ItemsSource() | TreeViewItemProperties |
ItemsSourceProperty() | TreeViewItemProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
OnApplyTemplate() | TreeViewItem |
OnCreateAutomationPeer() | TreeViewItem |
OnDragEnter(winrt::DragEventArgs const &e) | TreeViewItem |
OnDragLeave(winrt::DragEventArgs const &e) | TreeViewItem |
OnDragOver(winrt::DragEventArgs const &e) | TreeViewItem |
OnDrop(winrt::DragEventArgs const &e) | TreeViewItem |
OnHasUnrealizedChildrenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewItemProperties | [static]
OnIsExpandedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewItemProperties | [static]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TreeViewItemProperties | [static]
OnKeyDown(winrt::KeyRoutedEventArgs const &e) | TreeViewItem |
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TreeViewItem |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewItem, winrt::implementation::TreeViewItemT > | [inline]
s_CollapsedGlyphProperty | TreeViewItemProperties | [static]
s_ExpandedGlyphProperty | TreeViewItemProperties | [static]
s_GlyphBrushProperty | TreeViewItemProperties | [static]
s_GlyphOpacityProperty | TreeViewItemProperties | [static]
s_GlyphSizeProperty | TreeViewItemProperties | [static]
s_HasUnrealizedChildrenProperty | TreeViewItemProperties | [static]
s_IsExpandedProperty | TreeViewItemProperties | [static]
s_ItemsSourceProperty | TreeViewItemProperties | [static]
s_TreeViewItemTemplateSettingsProperty | TreeViewItemProperties | [static]
SetItemsSource(winrt::TreeViewNode const &node, winrt::IInspectable const &value) | TreeViewItem |
TreeViewItem() | TreeViewItem |
TreeViewItemProperties() | TreeViewItemProperties |
TreeViewItemTemplateSettings(winrt::TreeViewItemTemplateSettings const &value) | TreeViewItemProperties |
TreeViewItemTemplateSettings() | TreeViewItemProperties |
TreeViewItemTemplateSettingsProperty() | TreeViewItemProperties | [inline, static]
UpdateIndentation(int depth) | TreeViewItem |
UpdateMultipleSelection(TreeNodeSelectionState const &state) | TreeViewItem |
UpdateSelection(bool isSelected) | TreeViewItem |
UpdateSelectionVisual(TreeNodeSelectionState const &state) | TreeViewItem |
~TreeViewItem() | TreeViewItem |
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarTests Member List

This is the complete list of members for SelectorBarTests, including all inherited members.
ClassInitialize(TestContext testContext) | SelectorBarTests | [inline, static]
SelectorBarItemSelection() | SelectorBarTests | [inline]
SelectorBarSelectedItem() | SelectorBarTests | [inline, private]
TestCleanup() | SelectorBarTests | [inline]
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/ItemContainerInvokedEventArgs.h Source File

  • File List
  • File Members
  • ItemContainer

ItemContainerInvokedEventArgs.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002
00003 #include "ItemContainerInvokedEventArgs.g.h"
00004
00005 class ItemContainerInvokedEventArgs :
00006     public ReferenceTracker<ItemContainerInvokedEventArgs, winrt::implementation::ItemContainerInvokedEventArgsT, winrt::composable, winrt::composing>
00007 {
00008 public:
00009     ItemContainerInvokedEventArgs(const winrt::ItemContainerInteractionTrigger& interactionTrigger, const winrt::IInspectable& originalSource);
00010
00011 #pragma region IItemContainerInvokedEventArgs
00012     winrt::IInspectable OriginalSource();
00013     winrt::ItemContainerInteractionTrigger InteractionTrigger();
00014     bool Handled();
00015     void Handled(bool value);
00016 #pragma endregion
00017
00018 private:
00019     tracker_ref<winrt::IInspectable> m_originalSource{ this };
00020     winrt::ItemContainerInteractionTrigger m_interactionTrigger{};
00021     bool m_handled{ false };
00022 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/CollectionHelper.h Source File

  • File List
  • File Members
  • inc

CollectionHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 namespace CollectionHelper
00007 {
00008     template<class C, class T>
00009     inline bool contains(const C& c, const T& v)
00010     {
00011         return end(c) != std::find(begin(c), end(c), v);
00012     }
00013
00014     template<class C, class T>
00015     inline void remove(C& c, const T& v)
00016     {
00017         c.erase(std::remove(begin(c), end(c), v), end(c));
00018     }
00019
00020     template<class C, class T>
00021     inline void unique_push_back(C& c, T& v)
00022     {
00023         if (end(c) == std::find(begin(c), end(c), v))
00024         {
00025             c.push_back(v);
00026         }
00027     }
00028 }
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/TestUI/LottieLogo.cs Source File

  • File List
  • File Members
  • AnimatedVisualPlayer
  • TestUI

LottieLogo.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 //------------------------------------------------------------------------------
00005 // <auto-generated>
00006 //     This code was generated by a tool.
00007 //
00008 //       LottieGen version:
00009 //           7.0.5-build.140+ga0220dac35
00010 //
00011 //       Command:
00012 //           LottieGen -Language CSharp -Public -TargetUapVersion 11 -WinUIVersion 2.4 -InputFile LottieLogo.json
00013 //
00014 //       Input file:
00015 //           LottieLogo.json (56651 bytes created 17:37-08:00 Jan 24 2022)
00016 //
00017 //       LottieGen source:
00018 //           http://aka.ms/Lottie
00019 //
00020 //     Changes to this file may cause incorrect behavior and will be lost if
00021 //     the code is regenerated.
00022 // </auto-generated>
00023 //------------------------------------------------------------------------------
00024 // ____________________________________
00025 // |       Object stats       | Count |
00026 // |__________________________|_______|
00027 // | All CompositionObjects   |   848 |
00028 // |--------------------------+-------|
00029 // | Expression animators     |   171 |
00030 // | KeyFrame animators       |   121 |
00031 // | Reference parameters     |   171 |
00032 // | Expression operations    |     0 |
00033 // |--------------------------+-------|
00034 // | Animated brushes         |     - |
00035 // | Animated gradient stops  |     - |
00036 // | ExpressionAnimations     |    50 |
00037 // | PathKeyFrameAnimations   |     - |
00038 // |--------------------------+-------|
00039 // | ContainerVisuals         |     1 |
00040 // | ShapeVisuals             |     1 |
00041 // |--------------------------+-------|
00042 // | ContainerShapes          |    23 |
00043 // | CompositionSpriteShapes  |    45 |
00044 // |--------------------------+-------|
00045 // | Brushes                  |     3 |
00046 // | Gradient stops           |     - |
00047 // | CompositionVisualSurface |     - |
00048 // ------------------------------------
00049 using Microsoft.Graphics.Canvas.Geometry;
00050 using System;
00051 using System.Collections.Generic;
00052 using System.Numerics;
00053 using Windows.Graphics;
00054 using Windows.UI;
00055 using Microsoft.UI.Composition;
00056
00057 namespace AnimatedVisuals
00058 {
00059     // Frame rate:  30 fps
00060     // Frame count: 179
00061     // Duration:    5966.7 mS
00062     public sealed class LottieLogo
00063         : Microsoft.UI.Xaml.Controls.IAnimatedVisualSource
00064     {
00065         // Animation duration: 5.967 seconds.
00066         internal const long c_durationTicks = 59666666;
00067
00068         public Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor)
00069         {
00070             object ignored = null;
00071             return TryCreateAnimatedVisual(compositor, out ignored);
00072         }
00073
00074         public Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics)
00075         {
00076             diagnostics = null;
00077
00078             var res =
00079                 new LottieLogo_AnimatedVisual(
00080                     compositor
00081                     );
00082                 res.CreateAnimations();
00083                 return res;
00084         }
00085
00086         /// <summary>
00087         /// Gets the number of frames in the animation.
00088         /// </summary>
00089         public double FrameCount => 179d;
00090
00091         /// <summary>
00092         /// Gets the frame rate of the animation.
00093         /// </summary>
00094         public double Framerate => 30d;
00095
00096         /// <summary>
00097         /// Gets the duration of the animation.
00098         /// </summary>
00099         public TimeSpan Duration => TimeSpan.FromTicks(c_durationTicks);
00100
00101         /// <summary>
00102         /// Converts a zero-based frame number to the corresponding progress value denoting the
00103         /// start of the frame.
00104         /// </summary>
00105         public double FrameToProgress(double frameNumber)
00106         {
00107             return frameNumber / 179d;
00108         }
00109
00110         /// <summary>
00111         /// Returns a map from marker names to corresponding progress values.
00112         /// </summary>
00113         public IReadOnlyDictionary<string, double> Markers =>
00114             new Dictionary<string, double>
00115             {
00116             };
00117
00118         /// <summary>
00119         /// Sets the color property with the given name, or does nothing if no such property
00120         /// exists.
00121         /// </summary>
00122         public void SetColorProperty(string propertyName, Color value)
00123         {
00124         }
00125
00126         /// <summary>
00127         /// Sets the scalar property with the given name, or does nothing if no such property
00128         /// exists.
00129         /// </summary>
00130         public void SetScalarProperty(string propertyName, double value)
00131         {
00132         }
00133
00134         sealed class LottieLogo_AnimatedVisual : Microsoft.UI.Xaml.Controls.IAnimatedVisual2
00135         {
00136             const long c_durationTicks = 59666666;
00137             readonly Compositor _c;
00138             readonly ExpressionAnimation _reusableExpressionAnimation;
00139             CompositionColorBrush _colorBrush_AlmostTeal_FF007A87;
00140             CompositionColorBrush _colorBrush_White;
00141             CompositionContainerShape _containerShape_00;
00142             CompositionContainerShape _containerShape_01;
00143             CompositionContainerShape _containerShape_02;
00144             CompositionContainerShape _containerShape_03;
00145             CompositionContainerShape _containerShape_04;
00146             CompositionContainerShape _containerShape_05;
00147             CompositionContainerShape _containerShape_06;
00148             CompositionContainerShape _containerShape_07;
00149             CompositionContainerShape _containerShape_08;
00150             CompositionContainerShape _containerShape_09;
00151             CompositionContainerShape _containerShape_10;
00152             CompositionContainerShape _containerShape_11;
00153             CompositionContainerShape _containerShape_12;
00154             CompositionContainerShape _containerShape_13;
00155             CompositionContainerShape _containerShape_14;
00156             CompositionContainerShape _containerShape_15;
00157             CompositionContainerShape _containerShape_16;
00158             CompositionContainerShape _containerShape_17;
00159             CompositionContainerShape _containerShape_18;
00160             CompositionContainerShape _containerShape_19;
00161             CompositionContainerShape _containerShape_20;
00162             CompositionContainerShape _containerShape_21;
00163             CompositionContainerShape _containerShape_22;
00164             CompositionEllipseGeometry _ellipse_0_0;
00165             CompositionEllipseGeometry _ellipse_0_1;
00166             CompositionEllipseGeometry _ellipse_4p7;
00167             CompositionPath _path_0;
00168             CompositionPath _path_1;
00169             CompositionPath _path_2;
00170             CompositionPath _path_3;
00171             CompositionPath _path_4;
00172             CompositionPath _path_5;
00173             CompositionPath _path_6;
00174             CompositionPath _path_7;
00175             CompositionPath _path_8;
00176             CompositionPathGeometry _pathGeometry_00;
00177             CompositionPathGeometry _pathGeometry_01;
00178             CompositionPathGeometry _pathGeometry_02;
00179             CompositionPathGeometry _pathGeometry_03;
00180             CompositionPathGeometry _pathGeometry_04;
00181             CompositionPathGeometry _pathGeometry_05;
00182             CompositionPathGeometry _pathGeometry_06;
00183             CompositionPathGeometry _pathGeometry_07;
00184             CompositionPathGeometry _pathGeometry_08;
00185             CompositionPathGeometry _pathGeometry_09;
00186             CompositionPathGeometry _pathGeometry_10;
00187             CompositionPathGeometry _pathGeometry_11;
00188             CompositionPathGeometry _pathGeometry_12;
00189             CompositionPathGeometry _pathGeometry_13;
00190             CompositionPathGeometry _pathGeometry_14;
00191             CompositionPathGeometry _pathGeometry_15;
00192             CompositionPathGeometry _pathGeometry_16;
00193             CompositionPathGeometry _pathGeometry_17;
00194             CompositionPathGeometry _pathGeometry_18;
00195             CompositionPathGeometry _pathGeometry_19;
00196             CompositionPathGeometry _pathGeometry_20;
00197             CompositionPathGeometry _pathGeometry_21;
00198             CompositionPathGeometry _pathGeometry_22;
00199             CompositionPathGeometry _pathGeometry_23;
00200             CompositionPathGeometry _pathGeometry_24;
00201             CompositionPathGeometry _pathGeometry_25;
00202             CompositionPathGeometry _pathGeometry_26;
00203             CompositionPathGeometry _pathGeometry_27;
00204             CompositionPathGeometry _pathGeometry_28;
00205             CompositionPathGeometry _pathGeometry_29;
00206             CompositionPathGeometry _pathGeometry_30;
00207             CompositionPathGeometry _pathGeometry_31;
00208             CompositionPathGeometry _pathGeometry_32;
00209             CompositionPathGeometry _pathGeometry_33;
00210             CompositionPathGeometry _pathGeometry_34;
00211             CompositionPathGeometry _pathGeometry_35;
00212             CompositionPathGeometry _pathGeometry_36;
00213             CompositionPathGeometry _pathGeometry_37;
00214             CompositionPathGeometry _pathGeometry_38;
00215             CompositionSpriteShape _spriteShape_11;
00216             CompositionSpriteShape _spriteShape_12;
00217             CompositionSpriteShape _spriteShape_13;
00218             CompositionSpriteShape _spriteShape_14;
00219             CompositionSpriteShape _spriteShape_15;
00220             CompositionSpriteShape _spriteShape_19;
00221             CompositionSpriteShape _spriteShape_22;
00222             CompositionSpriteShape _spriteShape_23;
00223             CompositionSpriteShape _spriteShape_36;
00224             CompositionSpriteShape _spriteShape_37;
00225             CompositionSpriteShape _spriteShape_38;
00226             ContainerVisual _root;
00227             CubicBezierEasingFunction _cubicBezierEasingFunction_0;
00228             CubicBezierEasingFunction _cubicBezierEasingFunction_1;
00229             CubicBezierEasingFunction _cubicBezierEasingFunction_2;
00230             CubicBezierEasingFunction _cubicBezierEasingFunction_3;
00231             CubicBezierEasingFunction _cubicBezierEasingFunction_4;
00232             CubicBezierEasingFunction _cubicBezierEasingFunction_5;
00233             CubicBezierEasingFunction _cubicBezierEasingFunction_6;
00234             CubicBezierEasingFunction _cubicBezierEasingFunction_7;
00235             CubicBezierEasingFunction _cubicBezierEasingFunction_8;
00236             ExpressionAnimation _rootProgress;
00237             ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_02;
00238             ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_03;
00239             ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_06;
00240             ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_11;
00241             ScalarKeyFrameAnimation _tEndScalarAnimation_1_to_0_13;
00242             ScalarKeyFrameAnimation _tStartScalarAnimation_0_to_0p249;
00243             ScalarKeyFrameAnimation _tStartScalarAnimation_0p87_to_0_02;
00244             StepEasingFunction _holdThenStepEasingFunction;
00245             StepEasingFunction _stepThenHoldEasingFunction;
00246             Vector2KeyFrameAnimation _offsetVector2Animation_02;
00247             Vector2KeyFrameAnimation _offsetVector2Animation_03;
00248             Vector2KeyFrameAnimation _offsetVector2Animation_04;
00249             Vector2KeyFrameAnimation _offsetVector2Animation_05;
00250             Vector2KeyFrameAnimation _offsetVector2Animation_06;
00251             Vector2KeyFrameAnimation _radiusVector2Animation;
00252             Vector2KeyFrameAnimation _shapeVisibilityAnimation_04;
00253
00254             public void CreateAnimations()
00255             {
00256                 StartProgressBoundAnimation(_containerShape_00, "Offset", OffsetVector2Animation_01(), RootProgress());
00257                 StartProgressBoundAnimation(_containerShape_00, "Scale", ShapeVisibilityAnimation_00(), RootProgress());
00258                 StartProgressBoundAnimation(_containerShape_01, "Offset", OffsetVector2Animation_00(), RootProgress());
00259                 StartProgressBoundAnimation(_containerShape_02, "Offset", OffsetVector2Animation_02(), RootProgress());
00260                 StartProgressBoundAnimation(_containerShape_02, "Scale", ShapeVisibilityAnimation_01(), RootProgress());
00261                 StartProgressBoundAnimation(_containerShape_03, "Offset", OffsetVector2Animation_02(), RootProgress());
00262                 StartProgressBoundAnimation(_containerShape_03, "Scale", ShapeVisibilityAnimation_02(), RootProgress());
00263                 StartProgressBoundAnimation(_containerShape_04, "Offset", OffsetVector2Animation_03(), RootProgress());
00264                 StartProgressBoundAnimation(_containerShape_04, "Scale", ShapeVisibilityAnimation_03(), RootProgress());
00265                 StartProgressBoundAnimation(_containerShape_05, "Offset", OffsetVector2Animation_03(), RootProgress());
00266                 StartProgressBoundAnimation(_containerShape_05, "Scale", ShapeVisibilityAnimation_04(), RootProgress());
00267                 StartProgressBoundAnimation(_containerShape_06, "Offset", OffsetVector2Animation_04(), RootProgress());
00268                 StartProgressBoundAnimation(_containerShape_06, "Scale", ShapeVisibilityAnimation_05(), RootProgress());
00269                 StartProgressBoundAnimation(_containerShape_07, "Offset", OffsetVector2Animation_04(), RootProgress());
00270                 StartProgressBoundAnimation(_containerShape_07, "Scale", ShapeVisibilityAnimation_06(), RootProgress());
00271                 StartProgressBoundAnimation(_containerShape_08, "Offset", OffsetVector2Animation_05(), RootProgress());
00272                 StartProgressBoundAnimation(_containerShape_08, "Scale", ShapeVisibilityAnimation_07(), RootProgress());
00273                 StartProgressBoundAnimation(_containerShape_09, "Offset", OffsetVector2Animation_05(), RootProgress());
00274                 StartProgressBoundAnimation(_containerShape_09, "Scale", ShapeVisibilityAnimation_08(), RootProgress());
00275                 StartProgressBoundAnimation(_containerShape_10, "Offset", OffsetVector2Animation_06(), RootProgress());
00276                 StartProgressBoundAnimation(_containerShape_10, "Scale", ShapeVisibilityAnimation_09(), RootProgress());
00277                 StartProgressBoundAnimation(_containerShape_11, "Offset", OffsetVector2Animation_07(), RootProgress());
00278                 StartProgressBoundAnimation(_containerShape_11, "Scale", ShapeVisibilityAnimation_14(), RootProgress());
00279                 StartProgressBoundAnimation(_containerShape_12, "Offset", OffsetVector2Animation_06(), RootProgress());
00280                 StartProgressBoundAnimation(_containerShape_12, "Scale", ShapeVisibilityAnimation_15(), RootProgress());
00281                 StartProgressBoundAnimation(_containerShape_13, "Offset", OffsetVector2Animation_06(), RootProgress());
00282                 StartProgressBoundAnimation(_containerShape_13, "Scale", ShapeVisibilityAnimation_17(), RootProgress());
00283                 StartProgressBoundAnimation(_containerShape_14, "Offset", OffsetVector2Animation_09(), RootProgress());
00284                 StartProgressBoundAnimation(_containerShape_14, "Scale", ShapeVisibilityAnimation_18(), RootProgress());
00285                 StartProgressBoundAnimation(_containerShape_15, "Offset", OffsetVector2Animation_08(), RootProgress());
00286                 _containerShape_16.StartAnimation("Offset", OffsetVector2Animation_10());
00287                 var controller = _containerShape_16.TryGetAnimationController("Offset");
00288                 controller.Pause();
00289                 BindProperty(controller, "Progress", "_.Progress*0.9835165+0.01648352", "_", _root);
00290                 StartProgressBoundAnimation(_containerShape_16, "Scale", ShapeVisibilityAnimation_21(), RootProgress());
00291                 StartProgressBoundAnimation(_containerShape_17, "Scale", ShapeVisibilityAnimation_22(), RootProgress());
00292                 StartProgressBoundAnimation(_containerShape_18, "Scale", ShapeVisibilityAnimation_23(), RootProgress());
00293                 StartProgressBoundAnimation(_containerShape_19, "Scale", ShapeVisibilityAnimation_24(), RootProgress());
00294                 StartProgressBoundAnimation(_containerShape_20, "Scale", ShapeVisibilityAnimation_25(), RootProgress());
00295                 StartProgressBoundAnimation(_containerShape_21, "Scale", ShapeVisibilityAnimation_29(), RootProgress());
00296                 StartProgressBoundAnimation(_containerShape_22, "Scale", ShapeVisibilityAnimation_30(), RootProgress());
00297                 StartProgressBoundAnimation(_ellipse_0_0, "Radius", RadiusVector2Animation(), RootProgress());
00298                 StartProgressBoundAnimation(_ellipse_0_1, "Radius", RadiusVector2Animation(), RootProgress());
00299                 StartProgressBoundAnimation(_ellipse_0_1, "TrimStart", TrimStartScalarAnimation_0_to_0p399(), RootProgress());
00300                 StartProgressBoundAnimation(_ellipse_0_1, "TrimEnd", TrimEndScalarAnimation_1_to_0p88(), RootProgress());
00301                 StartProgressBoundAnimation(_pathGeometry_00, "TrimEnd", TrimEndScalarAnimation_0_to_0p316_0(), RootProgress());
00302                 StartProgressBoundAnimation(_pathGeometry_01, "TrimEnd", TrimEndScalarAnimation_0_to_0p316_1(), RootProgress());
00303                 StartProgressBoundAnimation(_pathGeometry_02, "TrimEnd", TrimEndScalarAnimation_0_to_0p457_0(), RootProgress());
00304                 StartProgressBoundAnimation(_pathGeometry_03, "TrimEnd", TrimEndScalarAnimation_0_to_0p457_1(), RootProgress());
00305                 StartProgressBoundAnimation(_pathGeometry_04, "TrimEnd", TrimEndScalarAnimation_0_to_0p43_0(), RootProgress());
00306                 StartProgressBoundAnimation(_pathGeometry_05, "TrimEnd", TrimEndScalarAnimation_0_to_0p43_1(), RootProgress());
00307                 StartProgressBoundAnimation(_pathGeometry_06, "TrimEnd", TrimEndScalarAnimation_0_to_0p375_0(), RootProgress());
00308                 StartProgressBoundAnimation(_pathGeometry_07, "TrimEnd", TrimEndScalarAnimation_0_to_0p375_1(), RootProgress());
00309                 StartProgressBoundAnimation(_pathGeometry_08, "TStart", TStartScalarAnimation_0_to_0p249(), RootProgress());
00310                 StartProgressBoundAnimation(_pathGeometry_08, "TEnd", TEndScalarAnimation_0_to_1_0(), RootProgress());
00311                 StartProgressBoundAnimation(_pathGeometry_09, "TrimStart", TrimStartScalarAnimation_0p29_to_0_0(), RootProgress());
00312                 StartProgressBoundAnimation(_pathGeometry_09, "TrimEnd", TrimEndScalarAnimation_0p411_to_0p665_0(), RootProgress());
00313                 StartProgressBoundAnimation(_pathGeometry_10, "TrimStart", TrimStartScalarAnimation_0p5_to_0_0(), RootProgress());
00314                 StartProgressBoundAnimation(_pathGeometry_10, "TrimEnd", TrimEndScalarAnimation_0p5_to_1_0(), RootProgress());
00315                 StartProgressBoundAnimation(_pathGeometry_11, "TrimStart", TrimStartScalarAnimation_0p29_to_0_1(), RootProgress());
00316                 StartProgressBoundAnimation(_pathGeometry_11, "TrimEnd", TrimEndScalarAnimation_0p411_to_0p665_1(), RootProgress());
00317                 StartProgressBoundAnimation(_pathGeometry_12, "TrimEnd", TrimEndScalarAnimation_0p117_to_1_0(), RootProgress());
00318                 StartProgressBoundAnimation(_pathGeometry_13, "TrimEnd", TrimEndScalarAnimation_0p117_to_1_1(), RootProgress());
00319                 StartProgressBoundAnimation(_pathGeometry_14, "TStart", TStartScalarAnimation_0_to_0p249(), RootProgress());
00320                 StartProgressBoundAnimation(_pathGeometry_14, "TEnd", TEndScalarAnimation_0_to_1_1(), RootProgress());
00321                 StartProgressBoundAnimation(_pathGeometry_15, "TrimStart", TrimStartScalarAnimation_0p5_to_0_1(), RootProgress());
00322                 StartProgressBoundAnimation(_pathGeometry_15, "TrimEnd", TrimEndScalarAnimation_0p5_to_1_1(), RootProgress());
00323                 StartProgressBoundAnimation(_pathGeometry_16, "TrimEnd", TrimEndScalarAnimation_0p249_to_0p891(), RootProgress());
00324                 StartProgressBoundAnimation(_pathGeometry_17, "TStart", TStartScalarAnimation_0p8_to_0(), RootProgress());
00325                 StartProgressBoundAnimation(_pathGeometry_17, "TEnd", TEndScalarAnimation_0p81_to_0p734_0(), RootProgress());
00326                 StartProgressBoundAnimation(_pathGeometry_18, "TStart", TStartScalarAnimation_0p8_to_0p3(), RootProgress());
00327                 StartProgressBoundAnimation(_pathGeometry_18, "TEnd", TEndScalarAnimation_0p81_to_0p734_1(), RootProgress());
00328                 StartProgressBoundAnimation(_pathGeometry_19, "TStart", TStartScalarAnimation_0p87_to_0_00(), RootProgress());
00329                 StartProgressBoundAnimation(_pathGeometry_19, "TEnd", TEndScalarAnimation_1_to_0_00(), RootProgress());
00330                 StartProgressBoundAnimation(_pathGeometry_20, "TStart", TStartScalarAnimation_0p87_to_0_01(), RootProgress());
00331                 StartProgressBoundAnimation(_pathGeometry_20, "TEnd", TEndScalarAnimation_1_to_0_01(), RootProgress());
00332                 StartProgressBoundAnimation(_pathGeometry_21, "TStart", TStartScalarAnimation_0p87_to_0_02(), RootProgress());
00333                 StartProgressBoundAnimation(_pathGeometry_21, "TEnd", TEndScalarAnimation_1_to_0_02(), RootProgress());
00334                 StartProgressBoundAnimation(_pathGeometry_22, "TStart", TStartScalarAnimation_0p87_to_0_02(), RootProgress());
00335                 StartProgressBoundAnimation(_pathGeometry_22, "TEnd", TEndScalarAnimation_1_to_0_02(), RootProgress());
00336                 StartProgressBoundAnimation(_pathGeometry_23, "TStart", TStartScalarAnimation_0p87_to_0_03(), RootProgress());
00337                 StartProgressBoundAnimation(_pathGeometry_23, "TEnd", TEndScalarAnimation_1_to_0_03(), RootProgress());
00338                 StartProgressBoundAnimation(_pathGeometry_24, "TStart", TStartScalarAnimation_0p87_to_0_04(), RootProgress());
00339                 StartProgressBoundAnimation(_pathGeometry_24, "TEnd", TEndScalarAnimation_1_to_0_03(), RootProgress());
00340                 StartProgressBoundAnimation(_pathGeometry_25, "TStart", TStartScalarAnimation_0p87_to_0_05(), RootProgress());
00341                 StartProgressBoundAnimation(_pathGeometry_25, "TEnd", TEndScalarAnimation_1_to_0_04(), RootProgress());
00342                 StartProgressBoundAnimation(_pathGeometry_26, "TStart", TStartScalarAnimation_0p87_to_0_06(), RootProgress());
00343                 StartProgressBoundAnimation(_pathGeometry_26, "TEnd", TEndScalarAnimation_1_to_0_05(), RootProgress());
00344                 StartProgressBoundAnimation(_pathGeometry_27, "TStart", TStartScalarAnimation_0p87_to_0_07(), RootProgress());
00345                 StartProgressBoundAnimation(_pathGeometry_27, "TEnd", TEndScalarAnimation_1_to_0_06(), RootProgress());
00346                 StartProgressBoundAnimation(_pathGeometry_28, "TStart", TStartScalarAnimation_0p87_to_0_08(), RootProgress());
00347                 StartProgressBoundAnimation(_pathGeometry_28, "TEnd", TEndScalarAnimation_1_to_0_06(), RootProgress());
00348                 StartProgressBoundAnimation(_pathGeometry_29, "TStart", TStartScalarAnimation_0p87_to_0_09(), RootProgress());
00349                 StartProgressBoundAnimation(_pathGeometry_29, "TEnd", TEndScalarAnimation_1_to_0_07(), RootProgress());
00350                 StartProgressBoundAnimation(_pathGeometry_30, "TStart", TStartScalarAnimation_0p87_to_0_10(), RootProgress());
00351                 StartProgressBoundAnimation(_pathGeometry_30, "TEnd", TEndScalarAnimation_1_to_0_08(), RootProgress());
00352                 StartProgressBoundAnimation(_pathGeometry_31, "TStart", TStartScalarAnimation_0p87_to_0_11(), RootProgress());
00353                 StartProgressBoundAnimation(_pathGeometry_31, "TEnd", TEndScalarAnimation_1_to_0_09(), RootProgress());
00354                 StartProgressBoundAnimation(_pathGeometry_32, "TStart", TStartScalarAnimation_0p87_to_0_12(), RootProgress());
00355                 StartProgressBoundAnimation(_pathGeometry_32, "TEnd", TEndScalarAnimation_1_to_0_10(), RootProgress());
00356                 StartProgressBoundAnimation(_pathGeometry_33, "TStart", TStartScalarAnimation_0p87_to_0_13(), RootProgress());
00357                 StartProgressBoundAnimation(_pathGeometry_33, "TEnd", TEndScalarAnimation_1_to_0_11(), RootProgress());
00358                 StartProgressBoundAnimation(_pathGeometry_34, "TStart", TStartScalarAnimation_0p87_to_0_14(), RootProgress());
00359                 StartProgressBoundAnimation(_pathGeometry_34, "TEnd", TEndScalarAnimation_1_to_0_11(), RootProgress());
00360                 StartProgressBoundAnimation(_pathGeometry_35, "TStart", TStartScalarAnimation_0p87_to_0_15(), RootProgress());
00361                 StartProgressBoundAnimation(_pathGeometry_35, "TEnd", TEndScalarAnimation_1_to_0_12(), RootProgress());
00362                 StartProgressBoundAnimation(_pathGeometry_36, "TStart", TStartScalarAnimation_0p87_to_0_16(), RootProgress());
00363                 StartProgressBoundAnimation(_pathGeometry_36, "TEnd", TEndScalarAnimation_1_to_0_13(), RootProgress());
00364                 StartProgressBoundAnimation(_pathGeometry_37, "TStart", TStartScalarAnimation_0p87_to_0_17(), RootProgress());
00365                 StartProgressBoundAnimation(_pathGeometry_37, "TEnd", TEndScalarAnimation_1_to_0_13(), RootProgress());
00366                 StartProgressBoundAnimation(_pathGeometry_38, "TStart", TStartScalarAnimation_0p87_to_0_18(), RootProgress());
00367                 StartProgressBoundAnimation(_pathGeometry_38, "TEnd", TEndScalarAnimation_1_to_0_14(), RootProgress());
00368                 StartProgressBoundAnimation(_spriteShape_11, "Scale", ShapeVisibilityAnimation_10(), RootProgress());
00369                 StartProgressBoundAnimation(_spriteShape_12, "Scale", ShapeVisibilityAnimation_11(), RootProgress());
00370                 StartProgressBoundAnimation(_spriteShape_13, "Scale", ShapeVisibilityAnimation_12(), RootProgress());
00371                 StartProgressBoundAnimation(_spriteShape_14, "Scale", ShapeVisibilityAnimation_13(), RootProgress());
00372                 StartProgressBoundAnimation(_spriteShape_15, "Scale", ShapeVisibilityAnimation_04(), RootProgress());
00373                 StartProgressBoundAnimation(_spriteShape_19, "Scale", ShapeVisibilityAnimation_16(), RootProgress());
00374                 StartProgressBoundAnimation(_spriteShape_22, "Scale", ShapeVisibilityAnimation_19(), RootProgress());
00375                 StartProgressBoundAnimation(_spriteShape_23, "Scale", ShapeVisibilityAnimation_20(), RootProgress());
00376                 StartProgressBoundAnimation(_spriteShape_36, "Scale", ShapeVisibilityAnimation_26(), RootProgress());
00377                 StartProgressBoundAnimation(_spriteShape_37, "Scale", ShapeVisibilityAnimation_27(), RootProgress());
00378                 StartProgressBoundAnimation(_spriteShape_38, "Scale", ShapeVisibilityAnimation_28(), RootProgress());
00379                 StartProgressBoundAnimation(_root.Properties, "t0", t0ScalarAnimation_0_to_1(), RootProgress());
00380             }
00381             public void DestroyAnimations()
00382             {
00383                 _containerShape_00.StopAnimation("Offset");
00384                 _containerShape_00.StopAnimation("Scale");
00385                 _containerShape_01.StopAnimation("Offset");
00386                 _containerShape_02.StopAnimation("Offset");
00387                 _containerShape_02.StopAnimation("Scale");
00388                 _containerShape_03.StopAnimation("Offset");
00389                 _containerShape_03.StopAnimation("Scale");
00390                 _containerShape_04.StopAnimation("Offset");
00391                 _containerShape_04.StopAnimation("Scale");
00392                 _containerShape_05.StopAnimation("Offset");
00393                 _containerShape_05.StopAnimation("Scale");
00394                 _containerShape_06.StopAnimation("Offset");
00395                 _containerShape_06.StopAnimation("Scale");
00396                 _containerShape_07.StopAnimation("Offset");
00397                 _containerShape_07.StopAnimation("Scale");
00398                 _containerShape_08.StopAnimation("Offset");
00399                 _containerShape_08.StopAnimation("Scale");
00400                 _containerShape_09.StopAnimation("Offset");
00401                 _containerShape_09.StopAnimation("Scale");
00402                 _containerShape_10.StopAnimation("Offset");
00403                 _containerShape_10.StopAnimation("Scale");
00404                 _containerShape_11.StopAnimation("Offset");
00405                 _containerShape_11.StopAnimation("Scale");
00406                 _containerShape_12.StopAnimation("Offset");
00407                 _containerShape_12.StopAnimation("Scale");
00408                 _containerShape_13.StopAnimation("Offset");
00409                 _containerShape_13.StopAnimation("Scale");
00410                 _containerShape_14.StopAnimation("Offset");
00411                 _containerShape_14.StopAnimation("Scale");
00412                 _containerShape_15.StopAnimation("Offset");
00413                 _containerShape_16.StopAnimation("Offset");
00414                 _containerShape_16.StopAnimation("Scale");
00415                 _containerShape_17.StopAnimation("Scale");
00416                 _containerShape_18.StopAnimation("Scale");
00417                 _containerShape_19.StopAnimation("Scale");
00418                 _containerShape_20.StopAnimation("Scale");
00419                 _containerShape_21.StopAnimation("Scale");
00420                 _containerShape_22.StopAnimation("Scale");
00421                 _ellipse_0_0.StopAnimation("Radius");
00422                 _ellipse_0_1.StopAnimation("Radius");
00423                 _ellipse_0_1.StopAnimation("TrimStart");
00424                 _ellipse_0_1.StopAnimation("TrimEnd");
00425                 _pathGeometry_00.StopAnimation("TrimEnd");
00426                 _pathGeometry_01.StopAnimation("TrimEnd");
00427                 _pathGeometry_02.StopAnimation("TrimEnd");
00428                 _pathGeometry_03.StopAnimation("TrimEnd");
00429                 _pathGeometry_04.StopAnimation("TrimEnd");
00430                 _pathGeometry_05.StopAnimation("TrimEnd");
00431                 _pathGeometry_06.StopAnimation("TrimEnd");
00432                 _pathGeometry_07.StopAnimation("TrimEnd");
00433                 _pathGeometry_08.StopAnimation("TStart");
00434                 _pathGeometry_08.StopAnimation("TEnd");
00435                 _pathGeometry_09.StopAnimation("TrimStart");
00436                 _pathGeometry_09.StopAnimation("TrimEnd");
00437                 _pathGeometry_10.StopAnimation("TrimStart");
00438                 _pathGeometry_10.StopAnimation("TrimEnd");
00439                 _pathGeometry_11.StopAnimation("TrimStart");
00440                 _pathGeometry_11.StopAnimation("TrimEnd");
00441                 _pathGeometry_12.StopAnimation("TrimEnd");
00442                 _pathGeometry_13.StopAnimation("TrimEnd");
00443                 _pathGeometry_14.StopAnimation("TStart");
00444                 _pathGeometry_14.StopAnimation("TEnd");
00445                 _pathGeometry_15.StopAnimation("TrimStart");
00446                 _pathGeometry_15.StopAnimation("TrimEnd");
00447                 _pathGeometry_16.StopAnimation("TrimEnd");
00448                 _pathGeometry_17.StopAnimation("TStart");
00449                 _pathGeometry_17.StopAnimation("TEnd");
00450                 _pathGeometry_18.StopAnimation("TStart");
00451                 _pathGeometry_18.StopAnimation("TEnd");
00452                 _pathGeometry_19.StopAnimation("TStart");
00453                 _pathGeometry_19.StopAnimation("TEnd");
00454                 _pathGeometry_20.StopAnimation("TStart");
00455                 _pathGeometry_20.StopAnimation("TEnd");
00456                 _pathGeometry_21.StopAnimation("TStart");
00457                 _pathGeometry_21.StopAnimation("TEnd");
00458                 _pathGeometry_22.StopAnimation("TStart");
00459                 _pathGeometry_22.StopAnimation("TEnd");
00460                 _pathGeometry_23.StopAnimation("TStart");
00461                 _pathGeometry_23.StopAnimation("TEnd");
00462                 _pathGeometry_24.StopAnimation("TStart");
00463                 _pathGeometry_24.StopAnimation("TEnd");
00464                 _pathGeometry_25.StopAnimation("TStart");
00465                 _pathGeometry_25.StopAnimation("TEnd");
00466                 _pathGeometry_26.StopAnimation("TStart");
00467                 _pathGeometry_26.StopAnimation("TEnd");
00468                 _pathGeometry_27.StopAnimation("TStart");
00469                 _pathGeometry_27.StopAnimation("TEnd");
00470                 _pathGeometry_28.StopAnimation("TStart");
00471                 _pathGeometry_28.StopAnimation("TEnd");
00472                 _pathGeometry_29.StopAnimation("TStart");
00473                 _pathGeometry_29.StopAnimation("TEnd");
00474                 _pathGeometry_30.StopAnimation("TStart");
00475                 _pathGeometry_30.StopAnimation("TEnd");
00476                 _pathGeometry_31.StopAnimation("TStart");
00477                 _pathGeometry_31.StopAnimation("TEnd");
00478                 _pathGeometry_32.StopAnimation("TStart");
00479                 _pathGeometry_32.StopAnimation("TEnd");
00480                 _pathGeometry_33.StopAnimation("TStart");
00481                 _pathGeometry_33.StopAnimation("TEnd");
00482                 _pathGeometry_34.StopAnimation("TStart");
00483                 _pathGeometry_34.StopAnimation("TEnd");
00484                 _pathGeometry_35.StopAnimation("TStart");
00485                 _pathGeometry_35.StopAnimation("TEnd");
00486                 _pathGeometry_36.StopAnimation("TStart");
00487                 _pathGeometry_36.StopAnimation("TEnd");
00488                 _pathGeometry_37.StopAnimation("TStart");
00489                 _pathGeometry_37.StopAnimation("TEnd");
00490                 _pathGeometry_38.StopAnimation("TStart");
00491                 _pathGeometry_38.StopAnimation("TEnd");
00492                 _spriteShape_11.StopAnimation("Scale");
00493                 _spriteShape_12.StopAnimation("Scale");
00494                 _spriteShape_13.StopAnimation("Scale");
00495                 _spriteShape_14.StopAnimation("Scale");
00496                 _spriteShape_15.StopAnimation("Scale");
00497                 _spriteShape_19.StopAnimation("Scale");
00498                 _spriteShape_22.StopAnimation("Scale");
00499                 _spriteShape_23.StopAnimation("Scale");
00500                 _spriteShape_36.StopAnimation("Scale");
00501                 _spriteShape_37.StopAnimation("Scale");
00502                 _spriteShape_38.StopAnimation("Scale");
00503                 _root.Properties.StopAnimation("t0");
00504             }
00505             static void StartProgressBoundAnimation(
00506                 CompositionObject target,
00507                 string animatedPropertyName,
00508                 CompositionAnimation animation,
00509                 ExpressionAnimation controllerProgressExpression)
00510             {
00511                 target.StartAnimation(animatedPropertyName, animation);
00512                 var controller = target.TryGetAnimationController(animatedPropertyName);
00513                 controller.Pause();
00514                 controller.StartAnimation("Progress", controllerProgressExpression);
00515             }
00516
00517             void BindProperty(
00518                 CompositionObject target,
00519                 string animatedPropertyName,
00520                 string expression,
00521                 string referenceParameterName,
00522                 CompositionObject referencedObject)
00523             {
00524                 _reusableExpressionAnimation.ClearAllParameters();
00525                 _reusableExpressionAnimation.Expression = expression;
00526                 _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00527                 target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00528             }
00529
00530             ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00531             {
00532                 var result = _c.CreateScalarKeyFrameAnimation();
00533                 result.Duration = TimeSpan.FromTicks(c_durationTicks);
00534                 result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00535                 return result;
00536             }
00537
00538             Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(float initialProgress, Vector2 initialValue, CompositionEasingFunction initialEasingFunction)
00539             {
00540                 var result = _c.CreateVector2KeyFrameAnimation();
00541                 result.Duration = TimeSpan.FromTicks(c_durationTicks);
00542                 result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00543                 return result;
00544             }
00545
00546             CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix)
00547             {
00548                 var result = _c.CreateSpriteShape(geometry);
00549                 result.TransformMatrix = transformMatrix;
00550                 return result;
00551             }
00552
00553             CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix, CompositionBrush fillBrush)
00554             {
00555                 var result = _c.CreateSpriteShape(geometry);
00556                 result.TransformMatrix = transformMatrix;
00557                 result.FillBrush = fillBrush;
00558                 return result;
00559             }
00560
00561             CanvasGeometry Geometry_00()
00562             {
00563                 CanvasGeometry result;
00564                 using (var builder = new CanvasPathBuilder(null))
00565                 {
00566                     builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F));
00567                     builder.AddLine(new Vector2(75.663002F, 0.289999992F));
00568                     builder.EndFigure(CanvasFigureLoop.Open);
00569                     result = CanvasGeometry.CreatePath(builder);
00570                 }
00571                 return result;
00572             }
00573
00574             CanvasGeometry Geometry_01()
00575             {
00576                 CanvasGeometry result;
00577                 using (var builder = new CanvasPathBuilder(null))
00578                 {
00579                     builder.BeginFigure(new Vector2(0.859000027F, -21.1429996F));
00580                     builder.AddLine(new Vector2(-4.35900021F, 70.3919983F));
00581                     builder.EndFigure(CanvasFigureLoop.Open);
00582                     result = CanvasGeometry.CreatePath(builder);
00583                 }
00584                 return result;
00585             }
00586
00587             CanvasGeometry Geometry_02()
00588             {
00589                 CanvasGeometry result;
00590                 using (var builder = new CanvasPathBuilder(null))
00591                 {
00592                     builder.BeginFigure(new Vector2(-26.6700001F, -0.282999992F));
00593                     builder.AddLine(new Vector2(99.1709976F, 0.0659999996F));
00594                     builder.EndFigure(CanvasFigureLoop.Open);
00595                     result = CanvasGeometry.CreatePath(builder);
00596                 }
00597                 return result;
00598             }
00599
00600             CanvasGeometry Geometry_03()
00601             {
00602                 CanvasGeometry result;
00603                 using (var builder = new CanvasPathBuilder(null))
00604                 {
00605                     builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F));
00606                     builder.AddLine(new Vector2(62.1629982F, 0.289999992F));
00607                     builder.EndFigure(CanvasFigureLoop.Open);
00608                     result = CanvasGeometry.CreatePath(builder);
00609                 }
00610                 return result;
00611             }
00612
00613             CanvasGeometry Geometry_04()
00614             {
00615                 CanvasGeometry result;
00616                 using (var builder = new CanvasPathBuilder(null))
00617                 {
00618                     builder.BeginFigure(new Vector2(-30.7199993F, 63.7610016F));
00619                     builder.AddCubicBezier(new Vector2(-30.6889992F, 63.1669998F), new Vector2(-30.7889996F, 50.8470001F), new Vector2(-30.7409992F, 45.1920013F));
00620                     builder.AddCubicBezier(new Vector2(-30.6650009F, 36.2140007F), new Vector2(-37.3429985F, 27.0739994F), new Vector2(-37.3969994F, 27.0139999F));
00621                     builder.AddCubicBezier(new Vector2(-38.5579987F, 25.7140007F), new Vector2(-39.7519989F, 24.1469994F), new Vector2(-40.6980019F, 22.6609993F));
00622                     builder.AddCubicBezier(new Vector2(-46.637001F, 13.3339996F), new Vector2(-47.8400002F, 0.933000028F), new Vector2(-37.8730011F, -7.1170001F));
00623                     builder.AddCubicBezier(new Vector2(-13.1960001F, -27.0459995F), new Vector2(8.96000004F, 11.559F), new Vector2(49.5060005F, 11.559F));
00624                     builder.EndFigure(CanvasFigureLoop.Open);
00625                     result = CanvasGeometry.CreatePath(builder);
00626                 }
00627                 return result;
00628             }
00629
00630             CanvasGeometry Geometry_05()
00631             {
00632                 CanvasGeometry result;
00633                 using (var builder = new CanvasPathBuilder(null))
00634                 {
00635                     builder.BeginFigure(new Vector2(246.649994F, 213.813995F));
00636                     builder.AddLine(new Vector2(340.955994F, 213.628006F));
00637                     builder.EndFigure(CanvasFigureLoop.Open);
00638                     result = CanvasGeometry.CreatePath(builder);
00639                 }
00640                 return result;
00641             }
00642
00643             CanvasGeometry Geometry_06()
00644             {
00645                 CanvasGeometry result;
00646                 using (var builder = new CanvasPathBuilder(null))
00647                 {
00648                     builder.BeginFigure(new Vector2(1.68099999F, -29.9920006F));
00649                     builder.AddLine(new Vector2(-1.68099999F, 29.9920006F));
00650                     builder.EndFigure(CanvasFigureLoop.Open);
00651                     result = CanvasGeometry.CreatePath(builder);
00652                 }
00653                 return result;
00654             }
00655
00656             CanvasGeometry Geometry_07()
00657             {
00658                 CanvasGeometry result;
00659                 using (var builder = new CanvasPathBuilder(null))
00660                 {
00661                     builder.BeginFigure(new Vector2(1.76800001F, -25.9659996F));
00662                     builder.AddLine(new Vector2(-1.76800001F, 25.9659996F));
00663                     builder.EndFigure(CanvasFigureLoop.Open);
00664                     result = CanvasGeometry.CreatePath(builder);
00665                 }
00666                 return result;
00667             }
00668
00669             CanvasGeometry Geometry_08()
00670             {
00671                 CanvasGeometry result;
00672                 using (var builder = new CanvasPathBuilder(null))
00673                 {
00674                     builder.BeginFigure(new Vector2(-8.83699989F, -58.2290001F));
00675                     builder.AddCubicBezier(new Vector2(-8.83699989F, -58.2290001F), new Vector2(-10.1630001F, 29.4950008F), new Vector2(-35.8339996F, 33.6619987F));
00676                     builder.AddCubicBezier(new Vector2(-44.0579987F, 34.9970016F), new Vector2(-50.2319984F, 30.0499992F), new Vector2(-51.6879997F, 23.1480007F));
00677                     builder.AddCubicBezier(new Vector2(-53.144001F, 16.2450008F), new Vector2(-49.6549988F, 9.15600014F), new Vector2(-41.1739998F, 7.29300022F));
00678                     builder.AddCubicBezier(new Vector2(-17.3570004F, 2.05999994F), new Vector2(4.23500013F, 57.1879997F), new Vector2(51.7970009F, 44.1780014F));
00679                     builder.AddCubicBezier(new Vector2(51.9570007F, 44.1339989F), new Vector2(52.6870003F, 43.8740005F), new Vector2(53.1879997F, 43.7410011F));
00680                     builder.AddCubicBezier(new Vector2(53.6889992F, 43.6080017F), new Vector2(68.9710007F, 41.3569984F), new Vector2(140.393997F, 43.6720009F));
00681                     builder.EndFigure(CanvasFigureLoop.Open);
00682                     result = CanvasGeometry.CreatePath(builder);
00683                 }
00684                 return result;
00685             }
00686
00687             CanvasGeometry Geometry_09()
00688             {
00689                 CanvasGeometry result;
00690                 using (var builder = new CanvasPathBuilder(null))
00691                 {
00692                     builder.BeginFigure(new Vector2(-67.125F, -112F));
00693                     builder.AddCubicBezier(new Vector2(-67.125F, -112F), new Vector2(-73.5579987F, -100.719002F), new Vector2(-75.4580002F, -89.9509964F));
00694                     builder.AddCubicBezier(new Vector2(-78.625F, -72F), new Vector2(-79.375F, -58.25F), new Vector2(-80.375F, -39.25F));
00695                     builder.EndFigure(CanvasFigureLoop.Open);
00696                     result = CanvasGeometry.CreatePath(builder);
00697                 }
00698                 return result;
00699             }
00700
00701             CanvasGeometry Geometry_10()
00702             {
00703                 CanvasGeometry result;
00704                 using (var builder = new CanvasPathBuilder(null))
00705                 {
00706                     builder.BeginFigure(new Vector2(-67.25F, -105.5F));
00707                     builder.AddCubicBezier(new Vector2(-67.25F, -105.5F), new Vector2(-70.4329987F, -94.9690018F), new Vector2(-72.3330002F, -84.2009964F));
00708                     builder.AddCubicBezier(new Vector2(-75.5F, -66.25F), new Vector2(-75.5F, -56.75F), new Vector2(-76.5F, -37.75F));
00709                     builder.EndFigure(CanvasFigureLoop.Open);
00710                     result = CanvasGeometry.CreatePath(builder);
00711                 }
00712                 return result;
00713             }
00714
00715             CanvasGeometry Geometry_11()
00716             {
00717                 CanvasGeometry result;
00718                 using (var builder = new CanvasPathBuilder(null))
00719                 {
00720                     builder.BeginFigure(new Vector2(34.5F, -13.0500002F));
00721                     builder.AddCubicBezier(new Vector2(7.5F, -14.5F), new Vector2(-4F, -37F), new Vector2(-35.0460014F, -35.5789986F));
00722                     builder.AddCubicBezier(new Vector2(-61.4720001F, -34.3689995F), new Vector2(-62.25F, -5.75F), new Vector2(-62.25F, -5.75F));
00723                     builder.EndFigure(CanvasFigureLoop.Open);
00724                     result = CanvasGeometry.CreatePath(builder);
00725                 }
00726                 return result;
00727             }
00728
00729             CanvasGeometry Geometry_12()
00730             {
00731                 CanvasGeometry result;
00732                 using (var builder = new CanvasPathBuilder(null))
00733                 {
00734                     builder.BeginFigure(new Vector2(-3F, 35.9500008F));
00735                     builder.AddCubicBezier(new Vector2(-3F, 35.9500008F), new Vector2(-1.5F, 7.5F), new Vector2(-1.352F, -6.75600004F));
00736                     builder.AddCubicBezier(new Vector2(-9.90299988F, -15.0190001F), new Vector2(-21.5699997F, -20.5790005F), new Vector2(-32.0460014F, -20.5790005F));
00737                     builder.AddCubicBezier(new Vector2(-53.5F, -20.5790005F), new Vector2(-42.25F, 4.25F), new Vector2(-42.25F, 4.25F));
00738                     builder.EndFigure(CanvasFigureLoop.Open);
00739                     result = CanvasGeometry.CreatePath(builder);
00740                 }
00741                 return result;
00742             }
00743
00744             CanvasGeometry Geometry_13()
00745             {
00746                 CanvasGeometry result;
00747                 using (var builder = new CanvasPathBuilder(null))
00748                 {
00749                     builder.BeginFigure(new Vector2(16.2310009F, 39.0730019F));
00750                     builder.AddLine(new Vector2(-32.769001F, 57.3650017F));
00751                     builder.EndFigure(CanvasFigureLoop.Open);
00752                     result = CanvasGeometry.CreatePath(builder);
00753                 }
00754                 return result;
00755             }
00756
00757             CanvasGeometry Geometry_14()
00758             {
00759                 CanvasGeometry result;
00760                 using (var builder = new CanvasPathBuilder(null))
00761                 {
00762                     builder.BeginFigure(new Vector2(7.44999981F, 21.9500008F));
00763                     builder.AddLine(new Vector2(-32.75F, 55.75F));
00764                     builder.EndFigure(CanvasFigureLoop.Open);
00765                     result = CanvasGeometry.CreatePath(builder);
00766                 }
00767                 return result;
00768             }
00769
00770             CanvasGeometry Geometry_15()
00771             {
00772                 CanvasGeometry result;
00773                 using (var builder = new CanvasPathBuilder(null))
00774                 {
00775                     builder.BeginFigure(new Vector2(-94.5F, 37.0730019F));
00776                     builder.AddLine(new Vector2(-48.769001F, 55.3650017F));
00777                     builder.EndFigure(CanvasFigureLoop.Open);
00778                     result = CanvasGeometry.CreatePath(builder);
00779                 }
00780                 return result;
00781             }
00782
00783             CanvasGeometry Geometry_16()
00784             {
00785                 CanvasGeometry result;
00786                 using (var builder = new CanvasPathBuilder(null))
00787                 {
00788                     builder.BeginFigure(new Vector2(-87.5F, 20.9500008F));
00789                     builder.AddLine(new Vector2(-48.75F, 54.75F));
00790                     builder.EndFigure(CanvasFigureLoop.Open);
00791                     result = CanvasGeometry.CreatePath(builder);
00792                 }
00793                 return result;
00794             }
00795
00796             CanvasGeometry Geometry_17()
00797             {
00798                 CanvasGeometry result;
00799                 using (var builder = new CanvasPathBuilder(null))
00800                 {
00801                     builder.BeginFigure(new Vector2(166.731003F, -7.92700005F));
00802                     builder.AddLine(new Vector2(136.731003F, 7.11499977F));
00803                     builder.EndFigure(CanvasFigureLoop.Open);
00804                     result = CanvasGeometry.CreatePath(builder);
00805                 }
00806                 return result;
00807             }
00808
00809             CanvasGeometry Geometry_18()
00810             {
00811                 CanvasGeometry result;
00812                 using (var builder = new CanvasPathBuilder(null))
00813                 {
00814                     builder.BeginFigure(new Vector2(156.449997F, -23.0499992F));
00815                     builder.AddLine(new Vector2(132F, 2.75F));
00816                     builder.EndFigure(CanvasFigureLoop.Open);
00817                     result = CanvasGeometry.CreatePath(builder);
00818                 }
00819                 return result;
00820             }
00821
00822             CanvasGeometry Geometry_19()
00823             {
00824                 CanvasGeometry result;
00825                 using (var builder = new CanvasPathBuilder(null))
00826                 {
00827                     builder.BeginFigure(new Vector2(169.5F, 18.073F));
00828                     builder.AddLine(new Vector2(137.481003F, 11.3649998F));
00829                     builder.EndFigure(CanvasFigureLoop.Open);
00830                     result = CanvasGeometry.CreatePath(builder);
00831                 }
00832                 return result;
00833             }
00834
00835             CanvasGeometry Geometry_20()
00836             {
00837                 CanvasGeometry result;
00838                 using (var builder = new CanvasPathBuilder(null))
00839                 {
00840                     builder.BeginFigure(new Vector2(119.5F, -45.0499992F));
00841                     builder.AddLine(new Vector2(82.75F, -44.75F));
00842                     builder.EndFigure(CanvasFigureLoop.Open);
00843                     result = CanvasGeometry.CreatePath(builder);
00844                 }
00845                 return result;
00846             }
00847
00848             CanvasGeometry Geometry_21()
00849             {
00850                 CanvasGeometry result;
00851                 using (var builder = new CanvasPathBuilder(null))
00852                 {
00853                     builder.BeginFigure(new Vector2(119.25F, -20.0499992F));
00854                     builder.AddLine(new Vector2(63.5F, -20.5F));
00855                     builder.EndFigure(CanvasFigureLoop.Open);
00856                     result = CanvasGeometry.CreatePath(builder);
00857                 }
00858                 return result;
00859             }
00860
00861             CanvasGeometry Geometry_22()
00862             {
00863                 CanvasGeometry result;
00864                 using (var builder = new CanvasPathBuilder(null))
00865                 {
00866                     builder.BeginFigure(new Vector2(128F, 3.6500001F));
00867                     builder.AddLine(new Vector2(78.25F, 3.5F));
00868                     builder.EndFigure(CanvasFigureLoop.Open);
00869                     result = CanvasGeometry.CreatePath(builder);
00870                 }
00871                 return result;
00872             }
00873
00874             CanvasGeometry Geometry_23()
00875             {
00876                 CanvasGeometry result;
00877                 using (var builder = new CanvasPathBuilder(null))
00878                 {
00879                     builder.BeginFigure(new Vector2(149.623993F, 8.24400043F));
00880                     builder.AddLine(new Vector2(136.647995F, 10.1560001F));
00881                     builder.EndFigure(CanvasFigureLoop.Open);
00882                     result = CanvasGeometry.CreatePath(builder);
00883                 }
00884                 return result;
00885             }
00886
00887             CanvasGeometry Geometry_24()
00888             {
00889                 CanvasGeometry result;
00890                 using (var builder = new CanvasPathBuilder(null))
00891                 {
00892                     builder.BeginFigure(new Vector2(144.429001F, -5.39699984F));
00893                     builder.AddLine(new Vector2(132.274994F, 4.73099995F));
00894                     builder.EndFigure(CanvasFigureLoop.Open);
00895                     result = CanvasGeometry.CreatePath(builder);
00896                 }
00897                 return result;
00898             }
00899
00900             CanvasGeometry Geometry_25()
00901             {
00902                 CanvasGeometry result;
00903                 using (var builder = new CanvasPathBuilder(null))
00904                 {
00905                     builder.BeginFigure(new Vector2(145.677002F, 22.2199993F));
00906                     builder.AddLine(new Vector2(134.921997F, 14.7489996F));
00907                     builder.EndFigure(CanvasFigureLoop.Open);
00908                     result = CanvasGeometry.CreatePath(builder);
00909                 }
00910                 return result;
00911             }
00912
00913             CanvasGeometry Geometry_26()
00914             {
00915                 CanvasGeometry result;
00916                 using (var builder = new CanvasPathBuilder(null))
00917                 {
00918                     builder.BeginFigure(new Vector2(147.699005F, 13.0249996F));
00919                     builder.AddLine(new Vector2(133.195007F, 13.21F));
00920                     builder.EndFigure(CanvasFigureLoop.Open);
00921                     result = CanvasGeometry.CreatePath(builder);
00922                 }
00923                 return result;
00924             }
00925
00926             CanvasGeometry Geometry_27()
00927             {
00928                 CanvasGeometry result;
00929                 using (var builder = new CanvasPathBuilder(null))
00930                 {
00931                     builder.BeginFigure(new Vector2(142.182999F, -5.11199999F));
00932                     builder.AddLine(new Vector2(130.029007F, 5.01599979F));
00933                     builder.EndFigure(CanvasFigureLoop.Open);
00934                     result = CanvasGeometry.CreatePath(builder);
00935                 }
00936                 return result;
00937             }
00938
00939             CanvasGeometry Geometry_28()
00940             {
00941                 CanvasGeometry result;
00942                 using (var builder = new CanvasPathBuilder(null))
00943                 {
00944                     builder.BeginFigure(new Vector2(142.037994F, 29.2779999F));
00945                     builder.AddLine(new Vector2(131.281998F, 21.8069992F));
00946                     builder.EndFigure(CanvasFigureLoop.Open);
00947                     result = CanvasGeometry.CreatePath(builder);
00948                 }
00949                 return result;
00950             }
00951
00952             // - Layer aggregator
00953             // Offset:<187.5, 333.5>
00954             CompositionColorBrush ColorBrush_AlmostDarkTurquoise_FF00D1C1()
00955             {
00956                 return _c.CreateColorBrush(Color.FromArgb(0xFF, 0x00, 0xD1, 0xC1));
00957             }
00958
00959             CompositionColorBrush ColorBrush_AlmostTeal_FF007A87()
00960             {
00961                 return (_colorBrush_AlmostTeal_FF007A87 == null)
00962                     ? _colorBrush_AlmostTeal_FF007A87 = _c.CreateColorBrush(Color.FromArgb(0xFF, 0x00, 0x7A, 0x87))
00963                     : _colorBrush_AlmostTeal_FF007A87;
00964             }
00965
00966             CompositionColorBrush ColorBrush_White()
00967             {
00968                 return (_colorBrush_White == null)
00969                     ? _colorBrush_White = _c.CreateColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF))
00970                     : _colorBrush_White;
00971             }
00972
00973             // Layer aggregator
00974             // Transforms for Bncr
00975             CompositionContainerShape ContainerShape_00()
00976             {
00977                 if (_containerShape_00 != null) { return _containerShape_00; }
00978                 var result = _containerShape_00 = _c.CreateContainerShape();
00979                 result.Scale = new Vector2(0F, 0F);
00980                 // Offset:<154.457, 287.822>
00981                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
00982                 // Transforms: Dot-Y
00983                 result.Shapes.Add(ContainerShape_01());
00984                 return result;
00985             }
00986
00987             // - Layer aggregator
00988             // Layer: Dot-Y
00989             // Transforms for Dot-Y
00990             CompositionContainerShape ContainerShape_01()
00991             {
00992                 if (_containerShape_01 != null) { return _containerShape_01; }
00993                 var result = _containerShape_01 = _c.CreateContainerShape();
00994                 // ShapeGroup: Ellipse 1 Offset:<196, 267>
00995                 result.Shapes.Add(SpriteShape_01());
00996                 return result;
00997             }
00998
00999             // Layer aggregator
01000             // Transforms for E3-Y
01001             CompositionContainerShape ContainerShape_02()
01002             {
01003                 if (_containerShape_02 != null) { return _containerShape_02; }
01004                 var result = _containerShape_02 = _c.CreateContainerShape();
01005                 result.Scale = new Vector2(0F, 0F);
01006                 // Offset:<154.457, 287.822>
01007                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01008                 // ShapeGroup: Group 1 Offset:<344.674, 261.877>
01009                 result.Shapes.Add(SpriteShape_02());
01010                 return result;
01011             }
01012
01013             // Layer aggregator
01014             // Transforms for E3-Y
01015             CompositionContainerShape ContainerShape_03()
01016             {
01017                 if (_containerShape_03 != null) { return _containerShape_03; }
01018                 var result = _containerShape_03 = _c.CreateContainerShape();
01019                 result.Scale = new Vector2(0F, 0F);
01020                 // Offset:<154.457, 287.822>
01021                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01022                 // Transforms: E3-B Offset:<0.06500244, 0>
01023                 result.Shapes.Add(SpriteShape_03());
01024                 return result;
01025             }
01026
01027             // Layer aggregator
01028             // Transforms for I-Y
01029             CompositionContainerShape ContainerShape_04()
01030             {
01031                 if (_containerShape_04 != null) { return _containerShape_04; }
01032                 var result = _containerShape_04 = _c.CreateContainerShape();
01033                 result.Scale = new Vector2(0F, 0F);
01034                 // Offset:<154.457, 287.822>
01035                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01036                 // ShapeGroup: Group 6 Offset:<304.135, 282.409>
01037                 result.Shapes.Add(SpriteShape_04());
01038                 return result;
01039             }
01040
01041             // Layer aggregator
01042             // Transforms for I-Y
01043             CompositionContainerShape ContainerShape_05()
01044             {
01045                 if (_containerShape_05 != null) { return _containerShape_05; }
01046                 var result = _containerShape_05 = _c.CreateContainerShape();
01047                 result.Scale = new Vector2(0F, 0F);
01048                 // Offset:<154.457, 287.822>
01049                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01050                 // Transforms: I-B
01051                 result.Shapes.Add(SpriteShape_05());
01052                 return result;
01053             }
01054
01055             // Layer aggregator
01056             // Transforms for E2-Y
01057             CompositionContainerShape ContainerShape_06()
01058             {
01059                 if (_containerShape_06 != null) { return _containerShape_06; }
01060                 var result = _containerShape_06 = _c.CreateContainerShape();
01061                 result.Scale = new Vector2(0F, 0F);
01062                 // Offset:<154.457, 287.822>
01063                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01064                 // ShapeGroup: Group 3 Offset:<331.664, 238.14>
01065                 result.Shapes.Add(SpriteShape_06());
01066                 return result;
01067             }
01068
01069             // Layer aggregator
01070             // Transforms for E2-Y
01071             CompositionContainerShape ContainerShape_07()
01072             {
01073                 if (_containerShape_07 != null) { return _containerShape_07; }
01074                 var result = _containerShape_07 = _c.CreateContainerShape();
01075                 result.Scale = new Vector2(0F, 0F);
01076                 // Offset:<154.457, 287.822>
01077                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01078                 // Transforms: E2-B
01079                 result.Shapes.Add(SpriteShape_07());
01080                 return result;
01081             }
01082
01083             // Layer aggregator
01084             // Transforms for E1-Y
01085             CompositionContainerShape ContainerShape_08()
01086             {
01087                 if (_containerShape_08 != null) { return _containerShape_08; }
01088                 var result = _containerShape_08 = _c.CreateContainerShape();
01089                 result.Scale = new Vector2(0F, 0F);
01090                 // Offset:<154.457, 287.822>
01091                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01092                 // ShapeGroup: Group 2 Offset:<344.672, 214.842>
01093                 result.Shapes.Add(SpriteShape_08());
01094                 return result;
01095             }
01096
01097             // Layer aggregator
01098             // Transforms for E1-Y
01099             CompositionContainerShape ContainerShape_09()
01100             {
01101                 if (_containerShape_09 != null) { return _containerShape_09; }
01102                 var result = _containerShape_09 = _c.CreateContainerShape();
01103                 result.Scale = new Vector2(0F, 0F);
01104                 // Offset:<154.457, 287.822>
01105                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01106                 // Transforms: E1-B
01107                 result.Shapes.Add(SpriteShape_09());
01108                 return result;
01109             }
01110
01111             // Layer aggregator
01112             // Transforms for T1a-Y
01113             CompositionContainerShape ContainerShape_10()
01114             {
01115                 if (_containerShape_10 != null) { return _containerShape_10; }
01116                 var result = _containerShape_10 = _c.CreateContainerShape();
01117                 result.Scale = new Vector2(0F, 0F);
01118                 // Offset:<154.457, 287.822>
01119                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01120                 // ShapeGroup: Group 9 Offset:<227.677, 234.375>
01121                 result.Shapes.Add(SpriteShape_10());
01122                 return result;
01123             }
01124
01125             // Layer aggregator
01126             // Transforms for O-Y
01127             CompositionContainerShape ContainerShape_11()
01128             {
01129                 if (_containerShape_11 != null) { return _containerShape_11; }
01130                 var result = _containerShape_11 = _c.CreateContainerShape();
01131                 result.Scale = new Vector2(0F, 0F);
01132                 // Offset:<154.457, 287.822>
01133                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01134                 var shapes = result.Shapes;
01135                 // ShapeGroup: Ellipse 1 Offset:<196, 267>
01136                 shapes.Add(SpriteShape_16());
01137                 // ShapeGroup: Ellipse 1 Offset:<196, 267>
01138                 shapes.Add(SpriteShape_17());
01139                 return result;
01140             }
01141
01142             // Layer aggregator
01143             // Transforms for T1a-Y 2
01144             CompositionContainerShape ContainerShape_12()
01145             {
01146                 if (_containerShape_12 != null) { return _containerShape_12; }
01147                 var result = _containerShape_12 = _c.CreateContainerShape();
01148                 result.Scale = new Vector2(0F, 0F);
01149                 // Offset:<154.457, 287.822>
01150                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01151                 // ShapeGroup: Group 9 Offset:<227.677, 234.375>
01152                 result.Shapes.Add(SpriteShape_18());
01153                 return result;
01154             }
01155
01156             // Layer aggregator
01157             // Transforms for T1a-Y
01158             CompositionContainerShape ContainerShape_13()
01159             {
01160                 if (_containerShape_13 != null) { return _containerShape_13; }
01161                 var result = _containerShape_13 = _c.CreateContainerShape();
01162                 result.Scale = new Vector2(0F, 0F);
01163                 // Offset:<154.457, 287.822>
01164                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01165                 // Transforms: T1a-B
01166                 result.Shapes.Add(SpriteShape_20());
01167                 return result;
01168             }
01169
01170             // Layer aggregator
01171             // Transforms for N
01172             CompositionContainerShape ContainerShape_14()
01173             {
01174                 if (_containerShape_14 != null) { return _containerShape_14; }
01175                 var result = _containerShape_14 = _c.CreateContainerShape();
01176                 result.Scale = new Vector2(0F, 0F);
01177                 // Offset:<154.457, 287.822>
01178                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01179                 // Transforms: Dot-Y
01180                 result.Shapes.Add(ContainerShape_15());
01181                 return result;
01182             }
01183
01184             // - Layer aggregator
01185             // Layer: Dot-Y
01186             // Transforms for Dot-Y
01187             CompositionContainerShape ContainerShape_15()
01188             {
01189                 if (_containerShape_15 != null) { return _containerShape_15; }
01190                 var result = _containerShape_15 = _c.CreateContainerShape();
01191                 // ShapeGroup: Ellipse 1 Offset:<196, 267>
01192                 result.Shapes.Add(SpriteShape_21());
01193                 return result;
01194             }
01195
01196             // Layer aggregator
01197             // Transforms for Dot1
01198             CompositionContainerShape ContainerShape_16()
01199             {
01200                 if (_containerShape_16 != null) { return _containerShape_16; }
01201                 var result = _containerShape_16 = _c.CreateContainerShape();
01202                 // Offset:<154.457, 287.822>
01203                 result.TransformMatrix = new Matrix3x2(1F, 0F, 0F, 1F, 154.457001F, 287.821991F);
01204                 // ShapeGroup: Ellipse 1 Offset:<196, 267>
01205                 result.Shapes.Add(SpriteShape_24());
01206                 return result;
01207             }
01208
01209             // Layer aggregator
01210             // Layer: S1-Y
01211             CompositionContainerShape ContainerShape_17()
01212             {
01213                 if (_containerShape_17 != null) { return _containerShape_17; }
01214                 var result = _containerShape_17 = _c.CreateContainerShape();
01215                 result.Scale = new Vector2(0F, 0F);
01216                 var shapes = result.Shapes;
01217                 // Offset:<154.457, 287.822>
01218                 shapes.Add(SpriteShape_25());
01219                 // Offset:<154.457, 287.822>
01220                 shapes.Add(SpriteShape_26());
01221                 return result;
01222             }
01223
01224             // Layer aggregator
01225             // Layer: S7
01226             CompositionContainerShape ContainerShape_18()
01227             {
01228                 if (_containerShape_18 != null) { return _containerShape_18; }
01229                 var result = _containerShape_18 = _c.CreateContainerShape();
01230                 result.Scale = new Vector2(0F, 0F);
01231                 var shapes = result.Shapes;
01232                 // Offset:<154.457, 287.822>
01233                 shapes.Add(SpriteShape_27());
01234                 // Offset:<154.457, 287.822>
01235                 shapes.Add(SpriteShape_28());
01236                 return result;
01237             }
01238
01239             // Layer aggregator
01240             // Layer: S3-Y
01241             CompositionContainerShape ContainerShape_19()
01242             {
01243                 if (_containerShape_19 != null) { return _containerShape_19; }
01244                 var result = _containerShape_19 = _c.CreateContainerShape();
01245                 result.Scale = new Vector2(0F, 0F);
01246                 var shapes = result.Shapes;
01247                 // Offset:<154.457, 287.822>
01248                 shapes.Add(SpriteShape_29());
01249                 // Offset:<154.457, 287.822>
01250                 shapes.Add(SpriteShape_30());
01251                 // Offset:<154.457, 287.822>
01252                 shapes.Add(SpriteShape_31());
01253                 // Offset:<154.457, 287.822>
01254                 shapes.Add(SpriteShape_32());
01255                 return result;
01256             }
01257
01258             // Layer aggregator
01259             // Layer: S3-Y 2
01260             CompositionContainerShape ContainerShape_20()
01261             {
01262                 if (_containerShape_20 != null) { return _containerShape_20; }
01263                 var result = _containerShape_20 = _c.CreateContainerShape();
01264                 result.Scale = new Vector2(0F, 0F);
01265                 var shapes = result.Shapes;
01266                 // Offset:<154.457, 287.822>
01267                 shapes.Add(SpriteShape_33());
01268                 // Offset:<154.457, 287.822>
01269                 shapes.Add(SpriteShape_34());
01270                 // Offset:<154.457, 287.822>
01271                 shapes.Add(SpriteShape_35());
01272                 return result;
01273             }
01274
01275             // Layer aggregator
01276             // Layer: S3-Y 3
01277             CompositionContainerShape ContainerShape_21()
01278             {
01279                 if (_containerShape_21 != null) { return _containerShape_21; }
01280                 var result = _containerShape_21 = _c.CreateContainerShape();
01281                 result.Scale = new Vector2(0F, 0F);
01282                 var shapes = result.Shapes;
01283                 // Offset:<154.457, 287.822>
01284                 shapes.Add(SpriteShape_39());
01285                 // Offset:<154.457, 287.822>
01286                 shapes.Add(SpriteShape_40());
01287                 // Offset:<154.457, 287.822>
01288                 shapes.Add(SpriteShape_41());
01289                 return result;
01290             }
01291
01292             // Layer aggregator
01293             // Layer: S3-Y 4
01294             CompositionContainerShape ContainerShape_22()
01295             {
01296                 if (_containerShape_22 != null) { return _containerShape_22; }
01297                 var result = _containerShape_22 = _c.CreateContainerShape();
01298                 result.Scale = new Vector2(0F, 0F);
01299                 var shapes = result.Shapes;
01300                 // Offset:<154.457, 287.822>
01301                 shapes.Add(SpriteShape_42());
01302                 // Offset:<154.457, 287.822>
01303                 shapes.Add(SpriteShape_43());
01304                 // Offset:<154.457, 287.822>
01305                 shapes.Add(SpriteShape_44());
01306                 return result;
01307             }
01308
01309             // - - Layer aggregator
01310             // - Layer: O-Y
01311             // ShapeGroup: Ellipse 1 Offset:<196, 267>
01312             // Ellipse Path 1.EllipseGeometry
01313             CompositionEllipseGeometry Ellipse_0_0()
01314             {
01315                 if (_ellipse_0_0 != null) { return _ellipse_0_0; }
01316                 var result = _ellipse_0_0 = _c.CreateEllipseGeometry();
01317                 result.Center = new Vector2(0.800000012F, -0.5F);
01318                 result.Radius = new Vector2(0F, 0F);
01319                 return result;
01320             }
01321
01322             // - - Layer aggregator
01323             // - Layer: O-Y
01324             // ShapeGroup: Ellipse 1 Offset:<196, 267>
01325             // Ellipse Path 1.EllipseGeometry
01326             CompositionEllipseGeometry Ellipse_0_1()
01327             {
01328                 if (_ellipse_0_1 != null) { return _ellipse_0_1; }
01329                 var result = _ellipse_0_1 = _c.CreateEllipseGeometry();
01330                 result.Center = new Vector2(0.800000012F, -0.5F);
01331                 result.Radius = new Vector2(0F, 0F);
01332                 return result;
01333             }
01334
01335             // - - - Layer aggregator
01336             // - - Layer: Dot-Y
01337             // - Transforms: Dot-Y
01338             // ShapeGroup: Ellipse 1 Offset:<196, 267>
01339             // Ellipse Path 1.EllipseGeometry
01340             CompositionEllipseGeometry Ellipse_4p6()
01341             {
01342                 var result = _c.CreateEllipseGeometry();
01343                 result.Center = new Vector2(0.800000012F, -0.5F);
01344                 result.Radius = new Vector2(4.5999999F, 4.5999999F);
01345                 return result;
01346             }
01347
01348             // Ellipse Path 1.EllipseGeometry
01349             CompositionEllipseGeometry Ellipse_4p7()
01350             {
01351                 if (_ellipse_4p7 != null) { return _ellipse_4p7; }
01352                 var result = _ellipse_4p7 = _c.CreateEllipseGeometry();
01353                 result.Center = new Vector2(0.800000012F, -0.5F);
01354                 result.Radius = new Vector2(4.69999981F, 4.69999981F);
01355                 return result;
01356             }
01357
01358             CompositionPath Path_0()
01359             {
01360                 if (_path_0 != null) { return _path_0; }
01361                 var result = _path_0 = new CompositionPath(Geometry_00());
01362                 return result;
01363             }
01364
01365             CompositionPath Path_1()
01366             {
01367                 if (_path_1 != null) { return _path_1; }
01368                 var result = _path_1 = new CompositionPath(Geometry_01());
01369                 return result;
01370             }
01371
01372             CompositionPath Path_2()
01373             {
01374                 if (_path_2 != null) { return _path_2; }
01375                 var result = _path_2 = new CompositionPath(Geometry_02());
01376                 return result;
01377             }
01378
01379             CompositionPath Path_3()
01380             {
01381                 if (_path_3 != null) { return _path_3; }
01382                 var result = _path_3 = new CompositionPath(Geometry_03());
01383                 return result;
01384             }
01385
01386             CompositionPath Path_4()
01387             {
01388                 if (_path_4 != null) { return _path_4; }
01389                 var result = _path_4 = new CompositionPath(Geometry_04());
01390                 return result;
01391             }
01392
01393             CompositionPath Path_5()
01394             {
01395                 if (_path_5 != null) { return _path_5; }
01396                 var result = _path_5 = new CompositionPath(Geometry_05());
01397                 return result;
01398             }
01399
01400             CompositionPath Path_6()
01401             {
01402                 if (_path_6 != null) { return _path_6; }
01403                 var result = _path_6 = new CompositionPath(Geometry_06());
01404                 return result;
01405             }
01406
01407             CompositionPath Path_7()
01408             {
01409                 if (_path_7 != null) { return _path_7; }
01410                 var result = _path_7 = new CompositionPath(Geometry_07());
01411                 return result;
01412             }
01413
01414             CompositionPath Path_8()
01415             {
01416                 if (_path_8 != null) { return _path_8; }
01417                 var result = _path_8 = new CompositionPath(Geometry_08());
01418                 return result;
01419             }
01420
01421             // - - Layer aggregator
01422             // - Layer: E3-Y
01423             // ShapeGroup: Group 1 Offset:<344.674, 261.877>
01424             CompositionPathGeometry PathGeometry_00()
01425             {
01426                 if (_pathGeometry_00 != null) { return _pathGeometry_00; }
01427                 var result = _pathGeometry_00 = _c.CreatePathGeometry(Path_0());
01428                 return result;
01429             }
01430
01431             // - - Layer aggregator
01432             // - Layer: E3-B
01433             // Transforms: E3-B Offset:<0.06500244, 0>
01434             CompositionPathGeometry PathGeometry_01()
01435             {
01436                 if (_pathGeometry_01 != null) { return _pathGeometry_01; }
01437                 var result = _pathGeometry_01 = _c.CreatePathGeometry(Path_0());
01438                 return result;
01439             }
01440
01441             // - - Layer aggregator
01442             // - Layer: I-Y
01443             // ShapeGroup: Group 6 Offset:<304.135, 282.409>
01444             CompositionPathGeometry PathGeometry_02()
01445             {
01446                 if (_pathGeometry_02 != null) { return _pathGeometry_02; }
01447                 var result = _pathGeometry_02 = _c.CreatePathGeometry(Path_1());
01448                 return result;
01449             }
01450
01451             // - - Layer aggregator
01452             // - Layer: I-B
01453             // Transforms: I-B
01454             CompositionPathGeometry PathGeometry_03()
01455             {
01456                 if (_pathGeometry_03 != null) { return _pathGeometry_03; }
01457                 var result = _pathGeometry_03 = _c.CreatePathGeometry(Path_1());
01458                 return result;
01459             }
01460
01461             // - - Layer aggregator
01462             // - Layer: E2-Y
01463             // ShapeGroup: Group 3 Offset:<331.664, 238.14>
01464             CompositionPathGeometry PathGeometry_04()
01465             {
01466                 if (_pathGeometry_04 != null) { return _pathGeometry_04; }
01467                 var result = _pathGeometry_04 = _c.CreatePathGeometry(Path_2());
01468                 return result;
01469             }
01470
01471             // - - Layer aggregator
01472             // - Layer: E2-B
01473             // Transforms: E2-B
01474             CompositionPathGeometry PathGeometry_05()
01475             {
01476                 if (_pathGeometry_05 != null) { return _pathGeometry_05; }
01477                 var result = _pathGeometry_05 = _c.CreatePathGeometry(Path_2());
01478                 return result;
01479             }
01480
01481             // - - Layer aggregator
01482             // - Layer: E1-Y
01483             // ShapeGroup: Group 2 Offset:<344.672, 214.842>
01484             CompositionPathGeometry PathGeometry_06()
01485             {
01486                 if (_pathGeometry_06 != null) { return _pathGeometry_06; }
01487                 var result = _pathGeometry_06 = _c.CreatePathGeometry(Path_3());
01488                 return result;
01489             }
01490
01491             // - - Layer aggregator
01492             // - Layer: E1-B
01493             // Transforms: E1-B
01494             CompositionPathGeometry PathGeometry_07()
01495             {
01496                 if (_pathGeometry_07 != null) { return _pathGeometry_07; }
01497                 var result = _pathGeometry_07 = _c.CreatePathGeometry(Path_3());
01498                 return result;
01499             }
01500
01501             CompositionPathGeometry PathGeometry_08()
01502             {
01503                 if (_pathGeometry_08 != null) { return _pathGeometry_08; }
01504                 var result = _pathGeometry_08 = _c.CreatePathGeometry(Path_4());
01505                 var propertySet = result.Properties;
01506                 propertySet.InsertScalar("TEnd", 0F);
01507                 propertySet.InsertScalar("TStart", 0F);
01508                 BindProperty(_pathGeometry_08, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_08);
01509                 BindProperty(_pathGeometry_08, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_08);
01510                 return result;
01511             }
01512
01513             // - Layer aggregator
01514             // Layer: T2b-Y
01515             CompositionPathGeometry PathGeometry_09()
01516             {
01517                 if (_pathGeometry_09 != null) { return _pathGeometry_09; }
01518                 var result = _pathGeometry_09 = _c.CreatePathGeometry(Path_5());
01519                 return result;
01520             }
01521
01522             // - Layer aggregator
01523             // Layer: T2a-Y
01524             CompositionPathGeometry PathGeometry_10()
01525             {
01526                 if (_pathGeometry_10 != null) { return _pathGeometry_10; }
01527                 var result = _pathGeometry_10 = _c.CreatePathGeometry(Path_6());
01528                 return result;
01529             }
01530
01531             // - Layer aggregator
01532             // Layer: T2b-B
01533             CompositionPathGeometry PathGeometry_11()
01534             {
01535                 if (_pathGeometry_11 != null) { return _pathGeometry_11; }
01536                 var result = _pathGeometry_11 = _c.CreatePathGeometry(Path_5());
01537                 return result;
01538             }
01539
01540             // - Layer aggregator
01541             // Layer: T1b-Y
01542             CompositionPathGeometry PathGeometry_12()
01543             {
01544                 if (_pathGeometry_12 != null) { return _pathGeometry_12; }
01545                 var result = _pathGeometry_12 = _c.CreatePathGeometry(Path_7());
01546                 return result;
01547             }
01548
01549             // - Layer aggregator
01550             // Layer: T1b-B
01551             CompositionPathGeometry PathGeometry_13()
01552             {
01553                 if (_pathGeometry_13 != null) { return _pathGeometry_13; }
01554                 var result = _pathGeometry_13 = _c.CreatePathGeometry(Path_7());
01555                 return result;
01556             }
01557
01558             CompositionPathGeometry PathGeometry_14()
01559             {
01560                 if (_pathGeometry_14 != null) { return _pathGeometry_14; }
01561                 var result = _pathGeometry_14 = _c.CreatePathGeometry(Path_4());
01562                 var propertySet = result.Properties;
01563                 propertySet.InsertScalar("TEnd", 0F);
01564                 propertySet.InsertScalar("TStart", 0F);
01565                 BindProperty(_pathGeometry_14, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_14);
01566                 BindProperty(_pathGeometry_14, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_14);
01567                 return result;
01568             }
01569
01570             // - Layer aggregator
01571             // Layer: T2a-B
01572             CompositionPathGeometry PathGeometry_15()
01573             {
01574                 if (_pathGeometry_15 != null) { return _pathGeometry_15; }
01575                 var result = _pathGeometry_15 = _c.CreatePathGeometry(Path_6());
01576                 return result;
01577             }
01578
01579             // - - Layer aggregator
01580             // - Layer: T1a-B
01581             // Transforms: T1a-B
01582             CompositionPathGeometry PathGeometry_16()
01583             {
01584                 if (_pathGeometry_16 != null) { return _pathGeometry_16; }
01585                 var result = _pathGeometry_16 = _c.CreatePathGeometry(Path_4());
01586                 result.TrimStart = 0.248999998F;
01587                 return result;
01588             }
01589
01590             CompositionPathGeometry PathGeometry_17()
01591             {
01592                 if (_pathGeometry_17 != null) { return _pathGeometry_17; }
01593                 var result = _pathGeometry_17 = _c.CreatePathGeometry(Path_8());
01594                 var propertySet = result.Properties;
01595                 propertySet.InsertScalar("TEnd", 0.810000002F);
01596                 propertySet.InsertScalar("TStart", 0.800000012F);
01597                 BindProperty(_pathGeometry_17, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_17);
01598                 BindProperty(_pathGeometry_17, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_17);
01599                 return result;
01600             }
01601
01602             CompositionPathGeometry PathGeometry_18()
01603             {
01604                 if (_pathGeometry_18 != null) { return _pathGeometry_18; }
01605                 var result = _pathGeometry_18 = _c.CreatePathGeometry(Path_8());
01606                 var propertySet = result.Properties;
01607                 propertySet.InsertScalar("TEnd", 0.810000002F);
01608                 propertySet.InsertScalar("TStart", 0.800000012F);
01609                 BindProperty(_pathGeometry_18, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_18);
01610                 BindProperty(_pathGeometry_18, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_18);
01611                 return result;
01612             }
01613
01614             CompositionPathGeometry PathGeometry_19()
01615             {
01616                 if (_pathGeometry_19 != null) { return _pathGeometry_19; }
01617                 var result = _pathGeometry_19 = _c.CreatePathGeometry(new CompositionPath(Geometry_09()));
01618                 var propertySet = result.Properties;
01619                 propertySet.InsertScalar("TEnd", 1F);
01620                 propertySet.InsertScalar("TStart", 0.870000005F);
01621                 BindProperty(_pathGeometry_19, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_19);
01622                 BindProperty(_pathGeometry_19, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_19);
01623                 return result;
01624             }
01625
01626             CompositionPathGeometry PathGeometry_20()
01627             {
01628                 if (_pathGeometry_20 != null) { return _pathGeometry_20; }
01629                 var result = _pathGeometry_20 = _c.CreatePathGeometry(new CompositionPath(Geometry_10()));
01630                 var propertySet = result.Properties;
01631                 propertySet.InsertScalar("TEnd", 1F);
01632                 propertySet.InsertScalar("TStart", 0.870000005F);
01633                 BindProperty(_pathGeometry_20, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_20);
01634                 BindProperty(_pathGeometry_20, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_20);
01635                 return result;
01636             }
01637
01638             CompositionPathGeometry PathGeometry_21()
01639             {
01640                 if (_pathGeometry_21 != null) { return _pathGeometry_21; }
01641                 var result = _pathGeometry_21 = _c.CreatePathGeometry(new CompositionPath(Geometry_11()));
01642                 var propertySet = result.Properties;
01643                 propertySet.InsertScalar("TEnd", 1F);
01644                 propertySet.InsertScalar("TStart", 0.870000005F);
01645                 BindProperty(_pathGeometry_21, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_21);
01646                 BindProperty(_pathGeometry_21, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_21);
01647                 return result;
01648             }
01649
01650             CompositionPathGeometry PathGeometry_22()
01651             {
01652                 if (_pathGeometry_22 != null) { return _pathGeometry_22; }
01653                 var result = _pathGeometry_22 = _c.CreatePathGeometry(new CompositionPath(Geometry_12()));
01654                 var propertySet = result.Properties;
01655                 propertySet.InsertScalar("TEnd", 1F);
01656                 propertySet.InsertScalar("TStart", 0.870000005F);
01657                 BindProperty(_pathGeometry_22, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_22);
01658                 BindProperty(_pathGeometry_22, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_22);
01659                 return result;
01660             }
01661
01662             CompositionPathGeometry PathGeometry_23()
01663             {
01664                 if (_pathGeometry_23 != null) { return _pathGeometry_23; }
01665                 var result = _pathGeometry_23 = _c.CreatePathGeometry(new CompositionPath(Geometry_13()));
01666                 var propertySet = result.Properties;
01667                 propertySet.InsertScalar("TEnd", 1F);
01668                 propertySet.InsertScalar("TStart", 0.870000005F);
01669                 BindProperty(_pathGeometry_23, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_23);
01670                 BindProperty(_pathGeometry_23, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_23);
01671                 return result;
01672             }
01673
01674             CompositionPathGeometry PathGeometry_24()
01675             {
01676                 if (_pathGeometry_24 != null) { return _pathGeometry_24; }
01677                 var result = _pathGeometry_24 = _c.CreatePathGeometry(new CompositionPath(Geometry_14()));
01678                 var propertySet = result.Properties;
01679                 propertySet.InsertScalar("TEnd", 1F);
01680                 propertySet.InsertScalar("TStart", 0.870000005F);
01681                 BindProperty(_pathGeometry_24, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_24);
01682                 BindProperty(_pathGeometry_24, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_24);
01683                 return result;
01684             }
01685
01686             CompositionPathGeometry PathGeometry_25()
01687             {
01688                 if (_pathGeometry_25 != null) { return _pathGeometry_25; }
01689                 var result = _pathGeometry_25 = _c.CreatePathGeometry(new CompositionPath(Geometry_15()));
01690                 var propertySet = result.Properties;
01691                 propertySet.InsertScalar("TEnd", 1F);
01692                 propertySet.InsertScalar("TStart", 0.870000005F);
01693                 BindProperty(_pathGeometry_25, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_25);
01694                 BindProperty(_pathGeometry_25, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_25);
01695                 return result;
01696             }
01697
01698             CompositionPathGeometry PathGeometry_26()
01699             {
01700                 if (_pathGeometry_26 != null) { return _pathGeometry_26; }
01701                 var result = _pathGeometry_26 = _c.CreatePathGeometry(new CompositionPath(Geometry_16()));
01702                 var propertySet = result.Properties;
01703                 propertySet.InsertScalar("TEnd", 1F);
01704                 propertySet.InsertScalar("TStart", 0.870000005F);
01705                 BindProperty(_pathGeometry_26, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_26);
01706                 BindProperty(_pathGeometry_26, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_26);
01707                 return result;
01708             }
01709
01710             CompositionPathGeometry PathGeometry_27()
01711             {
01712                 if (_pathGeometry_27 != null) { return _pathGeometry_27; }
01713                 var result = _pathGeometry_27 = _c.CreatePathGeometry(new CompositionPath(Geometry_17()));
01714                 var propertySet = result.Properties;
01715                 propertySet.InsertScalar("TEnd", 1F);
01716                 propertySet.InsertScalar("TStart", 0.870000005F);
01717                 BindProperty(_pathGeometry_27, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_27);
01718                 BindProperty(_pathGeometry_27, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_27);
01719                 return result;
01720             }
01721
01722             CompositionPathGeometry PathGeometry_28()
01723             {
01724                 if (_pathGeometry_28 != null) { return _pathGeometry_28; }
01725                 var result = _pathGeometry_28 = _c.CreatePathGeometry(new CompositionPath(Geometry_18()));
01726                 var propertySet = result.Properties;
01727                 propertySet.InsertScalar("TEnd", 1F);
01728                 propertySet.InsertScalar("TStart", 0.870000005F);
01729                 BindProperty(_pathGeometry_28, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_28);
01730                 BindProperty(_pathGeometry_28, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_28);
01731                 return result;
01732             }
01733
01734             CompositionPathGeometry PathGeometry_29()
01735             {
01736                 if (_pathGeometry_29 != null) { return _pathGeometry_29; }
01737                 var result = _pathGeometry_29 = _c.CreatePathGeometry(new CompositionPath(Geometry_19()));
01738                 var propertySet = result.Properties;
01739                 propertySet.InsertScalar("TEnd", 1F);
01740                 propertySet.InsertScalar("TStart", 0.870000005F);
01741                 BindProperty(_pathGeometry_29, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_29);
01742                 BindProperty(_pathGeometry_29, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_29);
01743                 return result;
01744             }
01745
01746             CompositionPathGeometry PathGeometry_30()
01747             {
01748                 if (_pathGeometry_30 != null) { return _pathGeometry_30; }
01749                 var result = _pathGeometry_30 = _c.CreatePathGeometry(new CompositionPath(Geometry_20()));
01750                 var propertySet = result.Properties;
01751                 propertySet.InsertScalar("TEnd", 1F);
01752                 propertySet.InsertScalar("TStart", 0.870000005F);
01753                 BindProperty(_pathGeometry_30, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_30);
01754                 BindProperty(_pathGeometry_30, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_30);
01755                 return result;
01756             }
01757
01758             CompositionPathGeometry PathGeometry_31()
01759             {
01760                 if (_pathGeometry_31 != null) { return _pathGeometry_31; }
01761                 var result = _pathGeometry_31 = _c.CreatePathGeometry(new CompositionPath(Geometry_21()));
01762                 var propertySet = result.Properties;
01763                 propertySet.InsertScalar("TEnd", 1F);
01764                 propertySet.InsertScalar("TStart", 0.870000005F);
01765                 BindProperty(_pathGeometry_31, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_31);
01766                 BindProperty(_pathGeometry_31, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_31);
01767                 return result;
01768             }
01769
01770             CompositionPathGeometry PathGeometry_32()
01771             {
01772                 if (_pathGeometry_32 != null) { return _pathGeometry_32; }
01773                 var result = _pathGeometry_32 = _c.CreatePathGeometry(new CompositionPath(Geometry_22()));
01774                 var propertySet = result.Properties;
01775                 propertySet.InsertScalar("TEnd", 1F);
01776                 propertySet.InsertScalar("TStart", 0.870000005F);
01777                 BindProperty(_pathGeometry_32, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_32);
01778                 BindProperty(_pathGeometry_32, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_32);
01779                 return result;
01780             }
01781
01782             CompositionPathGeometry PathGeometry_33()
01783             {
01784                 if (_pathGeometry_33 != null) { return _pathGeometry_33; }
01785                 var result = _pathGeometry_33 = _c.CreatePathGeometry(new CompositionPath(Geometry_23()));
01786                 var propertySet = result.Properties;
01787                 propertySet.InsertScalar("TEnd", 1F);
01788                 propertySet.InsertScalar("TStart", 0.870000005F);
01789                 BindProperty(_pathGeometry_33, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_33);
01790                 BindProperty(_pathGeometry_33, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_33);
01791                 return result;
01792             }
01793
01794             CompositionPathGeometry PathGeometry_34()
01795             {
01796                 if (_pathGeometry_34 != null) { return _pathGeometry_34; }
01797                 var result = _pathGeometry_34 = _c.CreatePathGeometry(new CompositionPath(Geometry_24()));
01798                 var propertySet = result.Properties;
01799                 propertySet.InsertScalar("TEnd", 1F);
01800                 propertySet.InsertScalar("TStart", 0.870000005F);
01801                 BindProperty(_pathGeometry_34, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_34);
01802                 BindProperty(_pathGeometry_34, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_34);
01803                 return result;
01804             }
01805
01806             CompositionPathGeometry PathGeometry_35()
01807             {
01808                 if (_pathGeometry_35 != null) { return _pathGeometry_35; }
01809                 var result = _pathGeometry_35 = _c.CreatePathGeometry(new CompositionPath(Geometry_25()));
01810                 var propertySet = result.Properties;
01811                 propertySet.InsertScalar("TEnd", 1F);
01812                 propertySet.InsertScalar("TStart", 0.870000005F);
01813                 BindProperty(_pathGeometry_35, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_35);
01814                 BindProperty(_pathGeometry_35, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_35);
01815                 return result;
01816             }
01817
01818             CompositionPathGeometry PathGeometry_36()
01819             {
01820                 if (_pathGeometry_36 != null) { return _pathGeometry_36; }
01821                 var result = _pathGeometry_36 = _c.CreatePathGeometry(new CompositionPath(Geometry_26()));
01822                 var propertySet = result.Properties;
01823                 propertySet.InsertScalar("TEnd", 1F);
01824                 propertySet.InsertScalar("TStart", 0.870000005F);
01825                 BindProperty(_pathGeometry_36, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_36);
01826                 BindProperty(_pathGeometry_36, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_36);
01827                 return result;
01828             }
01829
01830             CompositionPathGeometry PathGeometry_37()
01831             {
01832                 if (_pathGeometry_37 != null) { return _pathGeometry_37; }
01833                 var result = _pathGeometry_37 = _c.CreatePathGeometry(new CompositionPath(Geometry_27()));
01834                 var propertySet = result.Properties;
01835                 propertySet.InsertScalar("TEnd", 1F);
01836                 propertySet.InsertScalar("TStart", 0.870000005F);
01837                 BindProperty(_pathGeometry_37, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_37);
01838                 BindProperty(_pathGeometry_37, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_37);
01839                 return result;
01840             }
01841
01842             CompositionPathGeometry PathGeometry_38()
01843             {
01844                 if (_pathGeometry_38 != null) { return _pathGeometry_38; }
01845                 var result = _pathGeometry_38 = _c.CreatePathGeometry(new CompositionPath(Geometry_28()));
01846                 var propertySet = result.Properties;
01847                 propertySet.InsertScalar("TEnd", 1F);
01848                 propertySet.InsertScalar("TStart", 0.870000005F);
01849                 BindProperty(_pathGeometry_38, "TrimStart", "Min(my.TStart,my.TEnd)", "my", _pathGeometry_38);
01850                 BindProperty(_pathGeometry_38, "TrimEnd", "Max(my.TStart,my.TEnd)", "my", _pathGeometry_38);
01851                 return result;
01852             }
01853
01854             // - Layer aggregator
01855             // Offset:<187.5, 333.5>
01856             // Rectangle Path 1.RectangleGeometry
01857             CompositionRoundedRectangleGeometry RoundedRectangle_375x667()
01858             {
01859                 var result = _c.CreateRoundedRectangleGeometry();
01860                 result.CornerRadius = new Vector2(9.99999997E-07F, 9.99999997E-07F);
01861                 result.Offset = new Vector2(-187.5F, -333.5F);
01862                 result.Size = new Vector2(375F, 667F);
01863                 return result;
01864             }
01865
01866             // Layer aggregator
01867             // Rectangle Path 1
01868             CompositionSpriteShape SpriteShape_00()
01869             {
01870                 // Offset:<187.5, 333.5>
01871                 var geometry = RoundedRectangle_375x667();
01872                 var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 187.5F, 333.5F), ColorBrush_AlmostDarkTurquoise_FF00D1C1());
01873                 return result;
01874             }
01875
01876             // - - Layer aggregator
01877             // - Layer: Dot-Y
01878             // Transforms: Dot-Y
01879             // Ellipse Path 1
01880             CompositionSpriteShape SpriteShape_01()
01881             {
01882                 // Offset:<196, 267>
01883                 var geometry = Ellipse_4p6();
01884                 var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F), ColorBrush_White());
01885                 return result;
01886             }
01887
01888             // - Layer aggregator
01889             // Layer: E3-Y
01890             // Path 1
01891             CompositionSpriteShape SpriteShape_02()
01892             {
01893                 // Offset:<344.674, 261.877>
01894                 var result = CreateSpriteShape(PathGeometry_00(), new Matrix3x2(1F, 0F, 0F, 1F, 344.674011F, 261.877014F));
01895                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
01896                 result.StrokeDashCap = CompositionStrokeCap.Round;
01897                 result.StrokeStartCap = CompositionStrokeCap.Round;
01898                 result.StrokeEndCap = CompositionStrokeCap.Round;
01899                 result.StrokeMiterLimit = 5F;
01900                 result.StrokeThickness = 9.56200027F;
01901                 return result;
01902             }
01903
01904             // - Layer aggregator
01905             // Layer: E3-B
01906             // Path 1
01907             CompositionSpriteShape SpriteShape_03()
01908             {
01909                 // Offset:<344.739, 261.877>
01910                 var result = CreateSpriteShape(PathGeometry_01(), new Matrix3x2(1F, 0F, 0F, 1F, 344.739014F, 261.877014F));
01911                 result.StrokeBrush = ColorBrush_White();
01912                 result.StrokeDashCap = CompositionStrokeCap.Round;
01913                 result.StrokeStartCap = CompositionStrokeCap.Round;
01914                 result.StrokeEndCap = CompositionStrokeCap.Round;
01915                 result.StrokeMiterLimit = 5F;
01916                 result.StrokeThickness = 9.56200027F;
01917                 return result;
01918             }
01919
01920             // - Layer aggregator
01921             // Layer: I-Y
01922             // Path 1
01923             CompositionSpriteShape SpriteShape_04()
01924             {
01925                 // Offset:<304.135, 282.409>
01926                 var result = CreateSpriteShape(PathGeometry_02(), new Matrix3x2(1F, 0F, 0F, 1F, 304.13501F, 282.408997F));
01927                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
01928                 result.StrokeDashCap = CompositionStrokeCap.Square;
01929                 result.StrokeStartCap = CompositionStrokeCap.Square;
01930                 result.StrokeEndCap = CompositionStrokeCap.Square;
01931                 result.StrokeMiterLimit = 5F;
01932                 result.StrokeThickness = 8.39999962F;
01933                 return result;
01934             }
01935
01936             // - Layer aggregator
01937             // Layer: I-B
01938             // Path 1
01939             CompositionSpriteShape SpriteShape_05()
01940             {
01941                 // Offset:<304.135, 282.409>
01942                 var result = CreateSpriteShape(PathGeometry_03(), new Matrix3x2(1F, 0F, 0F, 1F, 304.13501F, 282.408997F));
01943                 result.StrokeBrush = ColorBrush_White();
01944                 result.StrokeDashCap = CompositionStrokeCap.Square;
01945                 result.StrokeStartCap = CompositionStrokeCap.Square;
01946                 result.StrokeEndCap = CompositionStrokeCap.Square;
01947                 result.StrokeMiterLimit = 5F;
01948                 result.StrokeThickness = 9.19400024F;
01949                 return result;
01950             }
01951
01952             // - Layer aggregator
01953             // Layer: E2-Y
01954             // Path 1
01955             CompositionSpriteShape SpriteShape_06()
01956             {
01957                 // Offset:<331.664, 238.14>
01958                 var result = CreateSpriteShape(PathGeometry_04(), new Matrix3x2(1F, 0F, 0F, 1F, 331.664001F, 238.139999F));
01959                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
01960                 result.StrokeDashCap = CompositionStrokeCap.Round;
01961                 result.StrokeStartCap = CompositionStrokeCap.Round;
01962                 result.StrokeEndCap = CompositionStrokeCap.Round;
01963                 result.StrokeMiterLimit = 5F;
01964                 result.StrokeThickness = 8.39999962F;
01965                 return result;
01966             }
01967
01968             // - Layer aggregator
01969             // Layer: E2-B
01970             // Path 1
01971             CompositionSpriteShape SpriteShape_07()
01972             {
01973                 // Offset:<331.664, 238.14>
01974                 var result = CreateSpriteShape(PathGeometry_05(), new Matrix3x2(1F, 0F, 0F, 1F, 331.664001F, 238.139999F));
01975                 result.StrokeBrush = ColorBrush_White();
01976                 result.StrokeDashCap = CompositionStrokeCap.Round;
01977                 result.StrokeStartCap = CompositionStrokeCap.Round;
01978                 result.StrokeEndCap = CompositionStrokeCap.Round;
01979                 result.StrokeMiterLimit = 5F;
01980                 result.StrokeThickness = 9.56200027F;
01981                 return result;
01982             }
01983
01984             // - Layer aggregator
01985             // Layer: E1-Y
01986             // Path 1
01987             CompositionSpriteShape SpriteShape_08()
01988             {
01989                 // Offset:<344.672, 214.842>
01990                 var result = CreateSpriteShape(PathGeometry_06(), new Matrix3x2(1F, 0F, 0F, 1F, 344.671997F, 214.841995F));
01991                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
01992                 result.StrokeDashCap = CompositionStrokeCap.Round;
01993                 result.StrokeStartCap = CompositionStrokeCap.Round;
01994                 result.StrokeEndCap = CompositionStrokeCap.Round;
01995                 result.StrokeMiterLimit = 5F;
01996                 result.StrokeThickness = 8.39999962F;
01997                 return result;
01998             }
01999
02000             // - Layer aggregator
02001             // Layer: E1-B
02002             // Path 1
02003             CompositionSpriteShape SpriteShape_09()
02004             {
02005                 // Offset:<344.672, 214.842>
02006                 var result = CreateSpriteShape(PathGeometry_07(), new Matrix3x2(1F, 0F, 0F, 1F, 344.671997F, 214.841995F));
02007                 result.StrokeBrush = ColorBrush_White();
02008                 result.StrokeDashCap = CompositionStrokeCap.Round;
02009                 result.StrokeStartCap = CompositionStrokeCap.Round;
02010                 result.StrokeEndCap = CompositionStrokeCap.Round;
02011                 result.StrokeMiterLimit = 5F;
02012                 result.StrokeThickness = 9.56200027F;
02013                 return result;
02014             }
02015
02016             // - Layer aggregator
02017             // Layer: T1a-Y
02018             // Path 1
02019             CompositionSpriteShape SpriteShape_10()
02020             {
02021                 // Offset:<227.677, 234.375>
02022                 var result = CreateSpriteShape(PathGeometry_08(), new Matrix3x2(1F, 0F, 0F, 1F, 227.677002F, 234.375F));
02023                 result.StrokeBrush = ColorBrush_White();
02024                 result.StrokeDashCap = CompositionStrokeCap.Round;
02025                 result.StrokeStartCap = CompositionStrokeCap.Round;
02026                 result.StrokeEndCap = CompositionStrokeCap.Round;
02027                 result.StrokeMiterLimit = 5F;
02028                 result.StrokeThickness = 8.39999962F;
02029                 return result;
02030             }
02031
02032             // Layer aggregator
02033             // Path 1
02034             CompositionSpriteShape SpriteShape_11()
02035             {
02036                 // Offset:<-56.5, 83.5>
02037                 if (_spriteShape_11 != null) { return _spriteShape_11; }
02038                 var result = _spriteShape_11 = CreateSpriteShape(PathGeometry_09(), new Matrix3x2(1F, 0F, 0F, 1F, -56.5F, 83.5F));
02039                 result.Scale = new Vector2(0F, 0F);
02040                 result.StrokeBrush = ColorBrush_White();
02041                 result.StrokeDashCap = CompositionStrokeCap.Round;
02042                 result.StrokeStartCap = CompositionStrokeCap.Round;
02043                 result.StrokeEndCap = CompositionStrokeCap.Round;
02044                 result.StrokeMiterLimit = 5F;
02045                 result.StrokeThickness = 9.19400024F;
02046                 return result;
02047             }
02048
02049             // Layer aggregator
02050             // Path 1
02051             CompositionSpriteShape SpriteShape_12()
02052             {
02053                 // Offset:<221.198, 330.758>
02054                 if (_spriteShape_12 != null) { return _spriteShape_12; }
02055                 var result = _spriteShape_12 = CreateSpriteShape(PathGeometry_10(), new Matrix3x2(1F, 0F, 0F, 1F, 221.197998F, 330.757996F));
02056                 result.Scale = new Vector2(0F, 0F);
02057                 result.StrokeBrush = ColorBrush_White();
02058                 result.StrokeDashCap = CompositionStrokeCap.Square;
02059                 result.StrokeStartCap = CompositionStrokeCap.Square;
02060                 result.StrokeEndCap = CompositionStrokeCap.Square;
02061                 result.StrokeMiterLimit = 5F;
02062                 result.StrokeThickness = 9.19400024F;
02063                 return result;
02064             }
02065
02066             // Layer aggregator
02067             // Path 1
02068             CompositionSpriteShape SpriteShape_13()
02069             {
02070                 // Offset:<-56.5, 83.5>
02071                 if (_spriteShape_13 != null) { return _spriteShape_13; }
02072                 var result = _spriteShape_13 = CreateSpriteShape(PathGeometry_11(), new Matrix3x2(1F, 0F, 0F, 1F, -56.5F, 83.5F));
02073                 result.Scale = new Vector2(0F, 0F);
02074                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
02075                 result.StrokeDashCap = CompositionStrokeCap.Round;
02076                 result.StrokeStartCap = CompositionStrokeCap.Round;
02077                 result.StrokeEndCap = CompositionStrokeCap.Round;
02078                 result.StrokeMiterLimit = 5F;
02079                 result.StrokeThickness = 9.19400024F;
02080                 return result;
02081             }
02082
02083             // Layer aggregator
02084             // Path 1
02085             CompositionSpriteShape SpriteShape_14()
02086             {
02087                 // Offset:<186.256, 349.081>
02088                 if (_spriteShape_14 != null) { return _spriteShape_14; }
02089                 var result = _spriteShape_14 = CreateSpriteShape(PathGeometry_12(), new Matrix3x2(1F, 0F, 0F, 1F, 186.255997F, 349.080994F));
02090                 result.Scale = new Vector2(0F, 0F);
02091                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
02092                 result.StrokeDashCap = CompositionStrokeCap.Round;
02093                 result.StrokeStartCap = CompositionStrokeCap.Round;
02094                 result.StrokeEndCap = CompositionStrokeCap.Round;
02095                 result.StrokeLineJoin = CompositionStrokeLineJoin.Round;
02096                 result.StrokeMiterLimit = 2F;
02097                 result.StrokeThickness = 8.39999962F;
02098                 return result;
02099             }
02100
02101             // Layer aggregator
02102             // Path 1
02103             CompositionSpriteShape SpriteShape_15()
02104             {
02105                 // Offset:<186.256, 349.081>
02106                 if (_spriteShape_15 != null) { return _spriteShape_15; }
02107                 var result = _spriteShape_15 = CreateSpriteShape(PathGeometry_13(), new Matrix3x2(1F, 0F, 0F, 1F, 186.255997F, 349.080994F));
02108                 result.Scale = new Vector2(0F, 0F);
02109                 result.StrokeBrush = ColorBrush_White();
02110                 result.StrokeDashCap = CompositionStrokeCap.Round;
02111                 result.StrokeStartCap = CompositionStrokeCap.Round;
02112                 result.StrokeEndCap = CompositionStrokeCap.Round;
02113                 result.StrokeLineJoin = CompositionStrokeLineJoin.Round;
02114                 result.StrokeMiterLimit = 2F;
02115                 result.StrokeThickness = 9.19400024F;
02116                 return result;
02117             }
02118
02119             // - Layer aggregator
02120             // Layer: O-Y
02121             // Ellipse Path 1
02122             CompositionSpriteShape SpriteShape_16()
02123             {
02124                 // Offset:<196, 267>
02125                 var result = CreateSpriteShape(Ellipse_0_0(), new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F));
02126                 result.StrokeBrush = ColorBrush_White();
02127                 result.StrokeThickness = 8.80000019F;
02128                 return result;
02129             }
02130
02131             // - Layer aggregator
02132             // Layer: O-Y
02133             // Ellipse Path 1
02134             CompositionSpriteShape SpriteShape_17()
02135             {
02136                 // Offset:<196, 267>
02137                 var result = CreateSpriteShape(Ellipse_0_1(), new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F));
02138                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
02139                 result.StrokeDashCap = CompositionStrokeCap.Round;
02140                 result.StrokeStartCap = CompositionStrokeCap.Round;
02141                 result.StrokeEndCap = CompositionStrokeCap.Round;
02142                 result.StrokeThickness = 9.19400024F;
02143                 return result;
02144             }
02145
02146             // - Layer aggregator
02147             // Layer: T1a-Y 2
02148             // Path 1
02149             CompositionSpriteShape SpriteShape_18()
02150             {
02151                 // Offset:<227.677, 234.375>
02152                 var result = CreateSpriteShape(PathGeometry_14(), new Matrix3x2(1F, 0F, 0F, 1F, 227.677002F, 234.375F));
02153                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
02154                 result.StrokeDashCap = CompositionStrokeCap.Round;
02155                 result.StrokeStartCap = CompositionStrokeCap.Round;
02156                 result.StrokeEndCap = CompositionStrokeCap.Round;
02157                 result.StrokeMiterLimit = 5F;
02158                 result.StrokeThickness = 8.39999962F;
02159                 return result;
02160             }
02161
02162             // Layer aggregator
02163             // Path 1
02164             CompositionSpriteShape SpriteShape_19()
02165             {
02166                 // Offset:<221.198, 330.758>
02167                 if (_spriteShape_19 != null) { return _spriteShape_19; }
02168                 var result = _spriteShape_19 = CreateSpriteShape(PathGeometry_15(), new Matrix3x2(1F, 0F, 0F, 1F, 221.197998F, 330.757996F));
02169                 result.Scale = new Vector2(0F, 0F);
02170                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
02171                 result.StrokeDashCap = CompositionStrokeCap.Square;
02172                 result.StrokeStartCap = CompositionStrokeCap.Square;
02173                 result.StrokeEndCap = CompositionStrokeCap.Square;
02174                 result.StrokeMiterLimit = 5F;
02175                 result.StrokeThickness = 9.19400024F;
02176                 return result;
02177             }
02178
02179             // - Layer aggregator
02180             // Layer: T1a-B
02181             // Path 1
02182             CompositionSpriteShape SpriteShape_20()
02183             {
02184                 // Offset:<227.677, 234.375>
02185                 var result = CreateSpriteShape(PathGeometry_16(), new Matrix3x2(1F, 0F, 0F, 1F, 227.677002F, 234.375F));
02186                 result.StrokeBrush = ColorBrush_White();
02187                 result.StrokeDashCap = CompositionStrokeCap.Round;
02188                 result.StrokeStartCap = CompositionStrokeCap.Round;
02189                 result.StrokeEndCap = CompositionStrokeCap.Round;
02190                 result.StrokeMiterLimit = 5F;
02191                 result.StrokeThickness = 9.19400024F;
02192                 return result;
02193             }
02194
02195             // - - Layer aggregator
02196             // - Layer: Dot-Y
02197             // Transforms: Dot-Y
02198             // Ellipse Path 1
02199             CompositionSpriteShape SpriteShape_21()
02200             {
02201                 // Offset:<196, 267>
02202                 var geometry = Ellipse_4p7();
02203                 var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F), ColorBrush_White());
02204                 return result;
02205             }
02206
02207             // Layer aggregator
02208             // Path 1
02209             CompositionSpriteShape SpriteShape_22()
02210             {
02211                 // Offset:<109.52901, 354.143>
02212                 if (_spriteShape_22 != null) { return _spriteShape_22; }
02213                 var result = _spriteShape_22 = CreateSpriteShape(PathGeometry_17(), new Matrix3x2(1F, 0F, 0F, 1F, 109.529007F, 354.143005F));
02214                 result.Scale = new Vector2(0F, 0F);
02215                 result.StrokeBrush = ColorBrush_White();
02216                 result.StrokeDashCap = CompositionStrokeCap.Round;
02217                 result.StrokeStartCap = CompositionStrokeCap.Round;
02218                 result.StrokeEndCap = CompositionStrokeCap.Round;
02219                 result.StrokeMiterLimit = 5F;
02220                 result.StrokeThickness = 8.39999962F;
02221                 return result;
02222             }
02223
02224             // Layer aggregator
02225             // Path 1
02226             CompositionSpriteShape SpriteShape_23()
02227             {
02228                 // Offset:<109.52901, 354.143>
02229                 if (_spriteShape_23 != null) { return _spriteShape_23; }
02230                 var result = _spriteShape_23 = CreateSpriteShape(PathGeometry_18(), new Matrix3x2(1F, 0F, 0F, 1F, 109.529007F, 354.143005F));
02231                 result.Scale = new Vector2(0F, 0F);
02232                 result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87();
02233                 result.StrokeDashCap = CompositionStrokeCap.Round;
02234                 result.StrokeStartCap = CompositionStrokeCap.Round;
02235                 result.StrokeEndCap = CompositionStrokeCap.Round;
02236                 result.StrokeMiterLimit = 5F;
02237                 result.StrokeThickness = 9.19400024F;
02238                 return result;
02239             }
02240
02241             // - Layer aggregator
02242             // Layer: Dot1
02243             // Ellipse Path 1
02244             CompositionSpriteShape SpriteShape_24()
02245             {
02246                 // Offset:<196, 267>
02247                 var geometry = Ellipse_4p7();
02248                 var result = CreateSpriteShape(geometry, new Matrix3x2(1F, 0F, 0F, 1F, 196F, 267F), ColorBrush_White());
02249                 return result;
02250             }
02251
02252             // - Layer aggregator
02253             // Layer: S1-Y
02254             // Path 1
02255             CompositionSpriteShape SpriteShape_25()
02256             {
02257                 // Offset:<179.5, 333.5>
02258                 var result = CreateSpriteShape(PathGeometry_19(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02259                 result.StrokeBrush = ColorBrush_White();
02260                 result.StrokeDashCap = CompositionStrokeCap.Round;
02261                 result.StrokeStartCap = CompositionStrokeCap.Round;
02262                 result.StrokeEndCap = CompositionStrokeCap.Round;
02263                 result.StrokeMiterLimit = 2F;
02264                 result.StrokeThickness = 1.5F;
02265                 return result;
02266             }
02267
02268             // - Layer aggregator
02269             // Layer: S1-Y
02270             // Path 1
02271             CompositionSpriteShape SpriteShape_26()
02272             {
02273                 // Offset:<179.5, 333.5>
02274                 var result = CreateSpriteShape(PathGeometry_20(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02275                 result.StrokeBrush = ColorBrush_White();
02276                 result.StrokeDashCap = CompositionStrokeCap.Round;
02277                 result.StrokeStartCap = CompositionStrokeCap.Round;
02278                 result.StrokeEndCap = CompositionStrokeCap.Round;
02279                 result.StrokeMiterLimit = 2F;
02280                 result.StrokeThickness = 1.5F;
02281                 return result;
02282             }
02283
02284             // - Layer aggregator
02285             // Layer: S7
02286             // Path 1
02287             CompositionSpriteShape SpriteShape_27()
02288             {
02289                 // Offset:<179.5, 333.5>
02290                 var result = CreateSpriteShape(PathGeometry_21(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02291                 result.StrokeBrush = ColorBrush_White();
02292                 result.StrokeDashCap = CompositionStrokeCap.Round;
02293                 result.StrokeStartCap = CompositionStrokeCap.Round;
02294                 result.StrokeEndCap = CompositionStrokeCap.Round;
02295                 result.StrokeMiterLimit = 2F;
02296                 result.StrokeThickness = 1.5F;
02297                 return result;
02298             }
02299
02300             // - Layer aggregator
02301             // Layer: S7
02302             // Path 1
02303             CompositionSpriteShape SpriteShape_28()
02304             {
02305                 // Offset:<179.5, 333.5>
02306                 var result = CreateSpriteShape(PathGeometry_22(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02307                 result.StrokeBrush = ColorBrush_White();
02308                 result.StrokeDashCap = CompositionStrokeCap.Round;
02309                 result.StrokeStartCap = CompositionStrokeCap.Round;
02310                 result.StrokeEndCap = CompositionStrokeCap.Round;
02311                 result.StrokeMiterLimit = 2F;
02312                 result.StrokeThickness = 1.5F;
02313                 return result;
02314             }
02315
02316             // - Layer aggregator
02317             // Layer: S3-Y
02318             // Path 1
02319             CompositionSpriteShape SpriteShape_29()
02320             {
02321                 // Offset:<179.5, 333.5>
02322                 var result = CreateSpriteShape(PathGeometry_23(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02323                 result.StrokeBrush = ColorBrush_White();
02324                 result.StrokeDashCap = CompositionStrokeCap.Round;
02325                 result.StrokeStartCap = CompositionStrokeCap.Round;
02326                 result.StrokeEndCap = CompositionStrokeCap.Round;
02327                 result.StrokeMiterLimit = 2F;
02328                 result.StrokeThickness = 2F;
02329                 return result;
02330             }
02331
02332             // - Layer aggregator
02333             // Layer: S3-Y
02334             // Path 1
02335             CompositionSpriteShape SpriteShape_30()
02336             {
02337                 // Offset:<179.5, 333.5>
02338                 var result = CreateSpriteShape(PathGeometry_24(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02339                 result.StrokeBrush = ColorBrush_White();
02340                 result.StrokeDashCap = CompositionStrokeCap.Round;
02341                 result.StrokeStartCap = CompositionStrokeCap.Round;
02342                 result.StrokeEndCap = CompositionStrokeCap.Round;
02343                 result.StrokeMiterLimit = 2F;
02344                 result.StrokeThickness = 2F;
02345                 return result;
02346             }
02347
02348             // - Layer aggregator
02349             // Layer: S3-Y
02350             // Path 1
02351             CompositionSpriteShape SpriteShape_31()
02352             {
02353                 // Offset:<179.5, 333.5>
02354                 var result = CreateSpriteShape(PathGeometry_25(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02355                 result.StrokeBrush = ColorBrush_White();
02356                 result.StrokeDashCap = CompositionStrokeCap.Round;
02357                 result.StrokeStartCap = CompositionStrokeCap.Round;
02358                 result.StrokeEndCap = CompositionStrokeCap.Round;
02359                 result.StrokeMiterLimit = 2F;
02360                 result.StrokeThickness = 2F;
02361                 return result;
02362             }
02363
02364             // - Layer aggregator
02365             // Layer: S3-Y
02366             // Path 1
02367             CompositionSpriteShape SpriteShape_32()
02368             {
02369                 // Offset:<179.5, 333.5>
02370                 var result = CreateSpriteShape(PathGeometry_26(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02371                 result.StrokeBrush = ColorBrush_White();
02372                 result.StrokeDashCap = CompositionStrokeCap.Round;
02373                 result.StrokeStartCap = CompositionStrokeCap.Round;
02374                 result.StrokeEndCap = CompositionStrokeCap.Round;
02375                 result.StrokeMiterLimit = 2F;
02376                 result.StrokeThickness = 2F;
02377                 return result;
02378             }
02379
02380             // - Layer aggregator
02381             // Layer: S3-Y 2
02382             // Path 1
02383             CompositionSpriteShape SpriteShape_33()
02384             {
02385                 // Offset:<179.5, 333.5>
02386                 var result = CreateSpriteShape(PathGeometry_27(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02387                 result.StrokeBrush = ColorBrush_White();
02388                 result.StrokeDashCap = CompositionStrokeCap.Round;
02389                 result.StrokeStartCap = CompositionStrokeCap.Round;
02390                 result.StrokeEndCap = CompositionStrokeCap.Round;
02391                 result.StrokeMiterLimit = 2F;
02392                 result.StrokeThickness = 2F;
02393                 return result;
02394             }
02395
02396             // - Layer aggregator
02397             // Layer: S3-Y 2
02398             // Path 1
02399             CompositionSpriteShape SpriteShape_34()
02400             {
02401                 // Offset:<179.5, 333.5>
02402                 var result = CreateSpriteShape(PathGeometry_28(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02403                 result.StrokeBrush = ColorBrush_White();
02404                 result.StrokeDashCap = CompositionStrokeCap.Round;
02405                 result.StrokeStartCap = CompositionStrokeCap.Round;
02406                 result.StrokeEndCap = CompositionStrokeCap.Round;
02407                 result.StrokeMiterLimit = 2F;
02408                 result.StrokeThickness = 2F;
02409                 return result;
02410             }
02411
02412             // - Layer aggregator
02413             // Layer: S3-Y 2
02414             // Path 1
02415             CompositionSpriteShape SpriteShape_35()
02416             {
02417                 // Offset:<179.5, 333.5>
02418                 var result = CreateSpriteShape(PathGeometry_29(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02419                 result.StrokeBrush = ColorBrush_White();
02420                 result.StrokeDashCap = CompositionStrokeCap.Round;
02421                 result.StrokeStartCap = CompositionStrokeCap.Round;
02422                 result.StrokeEndCap = CompositionStrokeCap.Round;
02423                 result.StrokeMiterLimit = 2F;
02424                 result.StrokeThickness = 2F;
02425                 return result;
02426             }
02427
02428             // Layer aggregator
02429             // Path 1
02430             CompositionSpriteShape SpriteShape_36()
02431             {
02432                 // Offset:<179.5, 333.5>
02433                 if (_spriteShape_36 != null) { return _spriteShape_36; }
02434                 var result = _spriteShape_36 = CreateSpriteShape(PathGeometry_30(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02435                 result.Scale = new Vector2(0F, 0F);
02436                 result.StrokeBrush = ColorBrush_White();
02437                 result.StrokeDashCap = CompositionStrokeCap.Round;
02438                 result.StrokeStartCap = CompositionStrokeCap.Round;
02439                 result.StrokeEndCap = CompositionStrokeCap.Round;
02440                 result.StrokeMiterLimit = 2F;
02441                 result.StrokeThickness = 1.5F;
02442                 return result;
02443             }
02444
02445             // Layer aggregator
02446             // Path 1
02447             CompositionSpriteShape SpriteShape_37()
02448             {
02449                 // Offset:<179.5, 333.5>
02450                 if (_spriteShape_37 != null) { return _spriteShape_37; }
02451                 var result = _spriteShape_37 = CreateSpriteShape(PathGeometry_31(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02452                 result.Scale = new Vector2(0F, 0F);
02453                 result.StrokeBrush = ColorBrush_White();
02454                 result.StrokeDashCap = CompositionStrokeCap.Round;
02455                 result.StrokeStartCap = CompositionStrokeCap.Round;
02456                 result.StrokeEndCap = CompositionStrokeCap.Round;
02457                 result.StrokeMiterLimit = 2F;
02458                 result.StrokeThickness = 1.5F;
02459                 return result;
02460             }
02461
02462             // Layer aggregator
02463             // Path 1
02464             CompositionSpriteShape SpriteShape_38()
02465             {
02466                 // Offset:<179.5, 333.5>
02467                 if (_spriteShape_38 != null) { return _spriteShape_38; }
02468                 var result = _spriteShape_38 = CreateSpriteShape(PathGeometry_32(), new Matrix3x2(1F, 0F, 0F, 1F, 179.5F, 333.5F));
02469                 result.Scale = new Vector2(0F, 0F);
02470                 result.StrokeBrush = ColorBrush_White();
02471                 result.StrokeDashCap = CompositionStrokeCap.Round;
02472                 result.StrokeStartCap = CompositionStrokeCap.Round;
02473                 result.StrokeEndCap = CompositionStrokeCap.Round;
02474                 result.StrokeMiterLimit = 2F;
02475                 result.StrokeThickness = 1.5F;
02476                 return result;
02477             }
02478
02479             // - Layer aggregator
02480             // Layer: S3-Y 3
02481             // Path 1
02482             CompositionSpriteShape SpriteShape_39()
02483             {
02484                 // Offset:<212.662, 248.428>, Rotation:97.90000401019934 degrees
02485                 var result = CreateSpriteShape(PathGeometry_33(), new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F));
02486                 result.StrokeBrush = ColorBrush_White();
02487                 result.StrokeDashCap = CompositionStrokeCap.Round;
02488                 result.StrokeStartCap = CompositionStrokeCap.Round;
02489                 result.StrokeEndCap = CompositionStrokeCap.Round;
02490                 result.StrokeMiterLimit = 2F;
02491                 result.StrokeThickness = 2F;
02492                 return result;
02493             }
02494
02495             // - Layer aggregator
02496             // Layer: S3-Y 3
02497             // Path 1
02498             CompositionSpriteShape SpriteShape_40()
02499             {
02500                 // Offset:<212.662, 248.428>, Rotation:97.90000401019934 degrees
02501                 var result = CreateSpriteShape(PathGeometry_34(), new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F));
02502                 result.StrokeBrush = ColorBrush_White();
02503                 result.StrokeDashCap = CompositionStrokeCap.Round;
02504                 result.StrokeStartCap = CompositionStrokeCap.Round;
02505                 result.StrokeEndCap = CompositionStrokeCap.Round;
02506                 result.StrokeMiterLimit = 2F;
02507                 result.StrokeThickness = 2F;
02508                 return result;
02509             }
02510
02511             // - Layer aggregator
02512             // Layer: S3-Y 3
02513             // Path 1
02514             CompositionSpriteShape SpriteShape_41()
02515             {
02516                 // Offset:<212.662, 248.428>, Rotation:97.90000401019934 degrees
02517                 var result = CreateSpriteShape(PathGeometry_35(), new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F));
02518                 result.StrokeBrush = ColorBrush_White();
02519                 result.StrokeDashCap = CompositionStrokeCap.Round;
02520                 result.StrokeStartCap = CompositionStrokeCap.Round;
02521                 result.StrokeEndCap = CompositionStrokeCap.Round;
02522                 result.StrokeMiterLimit = 2F;
02523                 result.StrokeThickness = 2F;
02524                 return result;
02525             }
02526
02527             // - Layer aggregator
02528             // Layer: S3-Y 4
02529             // Path 1
02530             CompositionSpriteShape SpriteShape_42()
02531             {
02532                 // Offset:<207.662, 419.42798>, Rotation:-89.09999525232098 degrees,
02533                 // Scale:<0.99999994, 0.99999994>
02534                 var result = CreateSpriteShape(PathGeometry_36(), new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F));
02535                 result.StrokeBrush = ColorBrush_White();
02536                 result.StrokeDashCap = CompositionStrokeCap.Round;
02537                 result.StrokeStartCap = CompositionStrokeCap.Round;
02538                 result.StrokeEndCap = CompositionStrokeCap.Round;
02539                 result.StrokeMiterLimit = 2F;
02540                 result.StrokeThickness = 2F;
02541                 return result;
02542             }
02543
02544             // - Layer aggregator
02545             // Layer: S3-Y 4
02546             // Path 1
02547             CompositionSpriteShape SpriteShape_43()
02548             {
02549                 // Offset:<207.662, 419.42798>, Rotation:-89.09999525232098 degrees,
02550                 // Scale:<0.99999994, 0.99999994>
02551                 var result = CreateSpriteShape(PathGeometry_37(), new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F));
02552                 result.StrokeBrush = ColorBrush_White();
02553                 result.StrokeDashCap = CompositionStrokeCap.Round;
02554                 result.StrokeStartCap = CompositionStrokeCap.Round;
02555                 result.StrokeEndCap = CompositionStrokeCap.Round;
02556                 result.StrokeMiterLimit = 2F;
02557                 result.StrokeThickness = 2F;
02558                 return result;
02559             }
02560
02561             // - Layer aggregator
02562             // Layer: S3-Y 4
02563             // Path 1
02564             CompositionSpriteShape SpriteShape_44()
02565             {
02566                 // Offset:<207.662, 419.42798>, Rotation:-89.09999525232098 degrees,
02567                 // Scale:<0.99999994, 0.99999994>
02568                 var result = CreateSpriteShape(PathGeometry_38(), new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F));
02569                 result.StrokeBrush = ColorBrush_White();
02570                 result.StrokeDashCap = CompositionStrokeCap.Round;
02571                 result.StrokeStartCap = CompositionStrokeCap.Round;
02572                 result.StrokeEndCap = CompositionStrokeCap.Round;
02573                 result.StrokeMiterLimit = 2F;
02574                 result.StrokeThickness = 2F;
02575                 return result;
02576             }
02577
02578             // The root of the composition.
02579             ContainerVisual Root()
02580             {
02581                 if (_root != null) { return _root; }
02582                 var result = _root = _c.CreateContainerVisual();
02583                 var propertySet = result.Properties;
02584                 propertySet.InsertScalar("Progress", 0F);
02585                 propertySet.InsertScalar("t0", 0F);
02586                 // Layer aggregator
02587                 result.Children.InsertAtTop(ShapeVisual_0());
02588                 return result;
02589             }
02590
02591             CubicBezierEasingFunction CubicBezierEasingFunction_0()
02592             {
02593                 return (_cubicBezierEasingFunction_0 == null)
02594                     ? _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.180000007F, 1F))
02595                     : _cubicBezierEasingFunction_0;
02596             }
02597
02598             CubicBezierEasingFunction CubicBezierEasingFunction_1()
02599             {
02600                 return (_cubicBezierEasingFunction_1 == null)
02601                     ? _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction(new Vector2(0.819999993F, 0F), new Vector2(0.833000004F, 0.833000004F))
02602                     : _cubicBezierEasingFunction_1;
02603             }
02604
02605             CubicBezierEasingFunction CubicBezierEasingFunction_2()
02606             {
02607                 return (_cubicBezierEasingFunction_2 == null)
02608                     ? _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.833000004F, 0.833000004F))
02609                     : _cubicBezierEasingFunction_2;
02610             }
02611
02612             CubicBezierEasingFunction CubicBezierEasingFunction_3()
02613             {
02614                 return (_cubicBezierEasingFunction_3 == null)
02615                     ? _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.666999996F, 1F))
02616                     : _cubicBezierEasingFunction_3;
02617             }
02618
02619             CubicBezierEasingFunction CubicBezierEasingFunction_4()
02620             {
02621                 return (_cubicBezierEasingFunction_4 == null)
02622                     ? _cubicBezierEasingFunction_4 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.119999997F, 1F))
02623                     : _cubicBezierEasingFunction_4;
02624             }
02625
02626             CubicBezierEasingFunction CubicBezierEasingFunction_5()
02627             {
02628                 return (_cubicBezierEasingFunction_5 == null)
02629                     ? _cubicBezierEasingFunction_5 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0F), new Vector2(0.119999997F, 1F))
02630                     : _cubicBezierEasingFunction_5;
02631             }
02632
02633             CubicBezierEasingFunction CubicBezierEasingFunction_6()
02634             {
02635                 return (_cubicBezierEasingFunction_6 == null)
02636                     ? _cubicBezierEasingFunction_6 = _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0F), new Vector2(0.666999996F, 1F))
02637                     : _cubicBezierEasingFunction_6;
02638             }
02639
02640             CubicBezierEasingFunction CubicBezierEasingFunction_7()
02641             {
02642                 return (_cubicBezierEasingFunction_7 == null)
02643                     ? _cubicBezierEasingFunction_7 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.0599999987F, 1F))
02644                     : _cubicBezierEasingFunction_7;
02645             }
02646
02647             CubicBezierEasingFunction CubicBezierEasingFunction_8()
02648             {
02649                 return (_cubicBezierEasingFunction_8 == null)
02650                     ? _cubicBezierEasingFunction_8 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.337000012F, 1F))
02651                     : _cubicBezierEasingFunction_8;
02652             }
02653
02654             ExpressionAnimation RootProgress()
02655             {
02656                 if (_rootProgress != null) { return _rootProgress; }
02657                 var result = _rootProgress = _c.CreateExpressionAnimation("_.Progress");
02658                 result.SetReferenceParameter("_", _root);
02659                 return result;
02660             }
02661
02662             ScalarKeyFrameAnimation t0ScalarAnimation_0_to_1()
02663             {
02664                 // Frame 35.26.
02665                 var result = CreateScalarKeyFrameAnimation(0.196966499F, 0F, StepThenHoldEasingFunction());
02666                 result.SetReferenceParameter("_", _root);
02667                 // Frame 44.
02668                 result.InsertKeyFrame(0.245810047F, 1F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.197999999F), new Vector2(0.638000011F, 1F)));
02669                 // Frame 44.
02670                 result.InsertKeyFrame(0.245810062F, 0F, StepThenHoldEasingFunction());
02671                 // Frame 54.
02672                 result.InsertKeyFrame(0.301675946F, 1F, _c.CreateCubicBezierEasingFunction(new Vector2(0.523000002F, 0F), new Vector2(0.795000017F, 1F)));
02673                 return result;
02674             }
02675
02676             // TEnd
02677             ScalarKeyFrameAnimation TEndScalarAnimation_0_to_1_0()
02678             {
02679                 // Frame 0.
02680                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
02681                 // Frame 54.
02682                 result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
02683                 // Frame 74.
02684                 result.InsertKeyFrame(0.413407832F, 1F, CubicBezierEasingFunction_6());
02685                 return result;
02686             }
02687
02688             // TEnd
02689             ScalarKeyFrameAnimation TEndScalarAnimation_0_to_1_1()
02690             {
02691                 // Frame 0.
02692                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
02693                 // Frame 54.
02694                 result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
02695                 // Frame 78.
02696                 result.InsertKeyFrame(0.43575418F, 1F, CubicBezierEasingFunction_6());
02697                 return result;
02698             }
02699
02700             // TEnd
02701             ScalarKeyFrameAnimation TEndScalarAnimation_0p81_to_0p734_0()
02702             {
02703                 // Frame 0.
02704                 var result = CreateScalarKeyFrameAnimation(0F, 0.810000002F, StepThenHoldEasingFunction());
02705                 // Frame 16.
02706                 result.InsertKeyFrame(0.0893854722F, 0.810000002F, HoldThenStepEasingFunction());
02707                 // Frame 27.
02708                 result.InsertKeyFrame(0.150837988F, 0.734000027F, CubicBezierEasingFunction_8());
02709                 return result;
02710             }
02711
02712             // TEnd
02713             ScalarKeyFrameAnimation TEndScalarAnimation_0p81_to_0p734_1()
02714             {
02715                 // Frame 0.
02716                 var result = CreateScalarKeyFrameAnimation(0F, 0.810000002F, StepThenHoldEasingFunction());
02717                 // Frame 18.
02718                 result.InsertKeyFrame(0.100558661F, 0.810000002F, HoldThenStepEasingFunction());
02719                 // Frame 29.
02720                 result.InsertKeyFrame(0.162011176F, 0.734000027F, CubicBezierEasingFunction_8());
02721                 return result;
02722             }
02723
02724             // TEnd
02725             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_00()
02726             {
02727                 // Frame 0.
02728                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02729                 // Frame 29.
02730                 result.InsertKeyFrame(0.162011176F, 1F, HoldThenStepEasingFunction());
02731                 // Frame 33.
02732                 result.InsertKeyFrame(0.184357539F, 0.663559973F, CubicBezierEasingFunction_2());
02733                 // Frame 36.
02734                 result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
02735                 return result;
02736             }
02737
02738             // TEnd
02739             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_01()
02740             {
02741                 // Frame 0.
02742                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02743                 // Frame 29.
02744                 result.InsertKeyFrame(0.162011176F, 1F, HoldThenStepEasingFunction());
02745                 // Frame 33.
02746                 result.InsertKeyFrame(0.184357539F, 0.690559983F, CubicBezierEasingFunction_2());
02747                 // Frame 36.
02748                 result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
02749                 return result;
02750             }
02751
02752             // TEnd
02753             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_02()
02754             {
02755                 // Frame 0.
02756                 if (_tEndScalarAnimation_1_to_0_02 != null) { return _tEndScalarAnimation_1_to_0_02; }
02757                 var result = _tEndScalarAnimation_1_to_0_02 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02758                 // Frame 65.
02759                 result.InsertKeyFrame(0.363128483F, 1F, HoldThenStepEasingFunction());
02760                 // Frame 70.
02761                 result.InsertKeyFrame(0.391061455F, 0.663559973F, CubicBezierEasingFunction_2());
02762                 // Frame 75.
02763                 result.InsertKeyFrame(0.418994427F, 0F, CubicBezierEasingFunction_2());
02764                 return result;
02765             }
02766
02767             // TEnd
02768             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_03()
02769             {
02770                 // Frame 0.
02771                 if (_tEndScalarAnimation_1_to_0_03 != null) { return _tEndScalarAnimation_1_to_0_03; }
02772                 var result = _tEndScalarAnimation_1_to_0_03 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02773                 // Frame 54.
02774                 result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
02775                 // Frame 57.
02776                 result.InsertKeyFrame(0.318435758F, 0.663559973F, CubicBezierEasingFunction_2());
02777                 // Frame 64.
02778                 result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
02779                 return result;
02780             }
02781
02782             // TEnd
02783             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_04()
02784             {
02785                 // Frame 0.
02786                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02787                 // Frame 54.
02788                 result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
02789                 // Frame 57.
02790                 result.InsertKeyFrame(0.318435758F, 0.758560002F, CubicBezierEasingFunction_2());
02791                 // Frame 64.
02792                 result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
02793                 return result;
02794             }
02795
02796             // TEnd
02797             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_05()
02798             {
02799                 // Frame 0.
02800                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02801                 // Frame 54.
02802                 result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
02803                 // Frame 57.
02804                 result.InsertKeyFrame(0.318435758F, 0.704559982F, CubicBezierEasingFunction_2());
02805                 // Frame 64.
02806                 result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
02807                 return result;
02808             }
02809
02810             // TEnd
02811             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_06()
02812             {
02813                 // Frame 0.
02814                 if (_tEndScalarAnimation_1_to_0_06 != null) { return _tEndScalarAnimation_1_to_0_06; }
02815                 var result = _tEndScalarAnimation_1_to_0_06 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02816                 // Frame 97.
02817                 result.InsertKeyFrame(0.541899443F, 1F, HoldThenStepEasingFunction());
02818                 // Frame 100.
02819                 result.InsertKeyFrame(0.558659196F, 0.663559973F, CubicBezierEasingFunction_2());
02820                 // Frame 107.
02821                 result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
02822                 return result;
02823             }
02824
02825             // TEnd
02826             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_07()
02827             {
02828                 // Frame 0.
02829                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02830                 // Frame 97.
02831                 result.InsertKeyFrame(0.541899443F, 1F, HoldThenStepEasingFunction());
02832                 // Frame 100.
02833                 result.InsertKeyFrame(0.558659196F, 0.758560002F, CubicBezierEasingFunction_2());
02834                 // Frame 107.
02835                 result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
02836                 return result;
02837             }
02838
02839             // TEnd
02840             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_08()
02841             {
02842                 // Frame 0.
02843                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02844                 // Frame 80.
02845                 result.InsertKeyFrame(0.446927369F, 1F, HoldThenStepEasingFunction());
02846                 // Frame 83.
02847                 result.InsertKeyFrame(0.463687152F, 0.663559973F, CubicBezierEasingFunction_2());
02848                 // Frame 87.
02849                 result.InsertKeyFrame(0.486033529F, 0F, CubicBezierEasingFunction_2());
02850                 return result;
02851             }
02852
02853             // TEnd
02854             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_09()
02855             {
02856                 // Frame 0.
02857                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02858                 // Frame 84.
02859                 result.InsertKeyFrame(0.469273746F, 1F, HoldThenStepEasingFunction());
02860                 // Frame 87.
02861                 result.InsertKeyFrame(0.486033529F, 0.663559973F, CubicBezierEasingFunction_2());
02862                 // Frame 91.
02863                 result.InsertKeyFrame(0.508379877F, 0F, CubicBezierEasingFunction_2());
02864                 return result;
02865             }
02866
02867             // TEnd
02868             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_10()
02869             {
02870                 // Frame 0.
02871                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02872                 // Frame 85.
02873                 result.InsertKeyFrame(0.47486034F, 1F, HoldThenStepEasingFunction());
02874                 // Frame 90.
02875                 result.InsertKeyFrame(0.502793312F, 0.663559973F, CubicBezierEasingFunction_2());
02876                 // Frame 94.
02877                 result.InsertKeyFrame(0.525139689F, 0F, CubicBezierEasingFunction_2());
02878                 return result;
02879             }
02880
02881             // TEnd
02882             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_11()
02883             {
02884                 // Frame 0.
02885                 if (_tEndScalarAnimation_1_to_0_11 != null) { return _tEndScalarAnimation_1_to_0_11; }
02886                 var result = _tEndScalarAnimation_1_to_0_11 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02887                 // Frame 75.
02888                 result.InsertKeyFrame(0.418994427F, 1F, HoldThenStepEasingFunction());
02889                 // Frame 78.
02890                 result.InsertKeyFrame(0.43575418F, 0.663559973F, CubicBezierEasingFunction_2());
02891                 // Frame 82.
02892                 result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
02893                 return result;
02894             }
02895
02896             // TEnd
02897             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_12()
02898             {
02899                 // Frame 0.
02900                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02901                 // Frame 75.
02902                 result.InsertKeyFrame(0.418994427F, 1F, HoldThenStepEasingFunction());
02903                 // Frame 78.
02904                 result.InsertKeyFrame(0.43575418F, 0.758560002F, CubicBezierEasingFunction_2());
02905                 // Frame 82.
02906                 result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
02907                 return result;
02908             }
02909
02910             // TEnd
02911             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_13()
02912             {
02913                 // Frame 0.
02914                 if (_tEndScalarAnimation_1_to_0_13 != null) { return _tEndScalarAnimation_1_to_0_13; }
02915                 var result = _tEndScalarAnimation_1_to_0_13 = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02916                 // Frame 76.
02917                 result.InsertKeyFrame(0.424580991F, 1F, HoldThenStepEasingFunction());
02918                 // Frame 79.
02919                 result.InsertKeyFrame(0.441340774F, 0.663559973F, CubicBezierEasingFunction_2());
02920                 // Frame 83.
02921                 result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
02922                 return result;
02923             }
02924
02925             // TEnd
02926             ScalarKeyFrameAnimation TEndScalarAnimation_1_to_0_14()
02927             {
02928                 // Frame 0.
02929                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
02930                 // Frame 76.
02931                 result.InsertKeyFrame(0.424580991F, 1F, HoldThenStepEasingFunction());
02932                 // Frame 79.
02933                 result.InsertKeyFrame(0.441340774F, 0.758560002F, CubicBezierEasingFunction_2());
02934                 // Frame 83.
02935                 result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
02936                 return result;
02937             }
02938
02939             // - - - Layer aggregator
02940             // - - Layer: E2-Y
02941             // - ShapeGroup: Group 3 Offset:<331.664, 238.14>
02942             // TrimEnd
02943             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p43_0()
02944             {
02945                 // Frame 0.
02946                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
02947                 // Frame 83.
02948                 result.InsertKeyFrame(0.463687152F, 0F, HoldThenStepEasingFunction());
02949                 // Frame 92.
02950                 result.InsertKeyFrame(0.513966501F, 0.430000007F, CubicBezierEasingFunction_4());
02951                 return result;
02952             }
02953
02954             // - - - Layer aggregator
02955             // - - Layer: E2-B
02956             // - Transforms: E2-B
02957             // TrimEnd
02958             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p43_1()
02959             {
02960                 // Frame 0.
02961                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
02962                 // Frame 86.
02963                 result.InsertKeyFrame(0.480446935F, 0F, HoldThenStepEasingFunction());
02964                 // Frame 95.
02965                 result.InsertKeyFrame(0.530726254F, 0.430000007F, CubicBezierEasingFunction_4());
02966                 return result;
02967             }
02968
02969             // - - - Layer aggregator
02970             // - - Layer: E3-Y
02971             // - ShapeGroup: Group 1 Offset:<344.674, 261.877>
02972             // TrimEnd
02973             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p316_0()
02974             {
02975                 // Frame 0.
02976                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
02977                 // Frame 84.
02978                 result.InsertKeyFrame(0.469273746F, 0F, HoldThenStepEasingFunction());
02979                 // Frame 92.
02980                 result.InsertKeyFrame(0.513966501F, 0.316000015F, CubicBezierEasingFunction_2());
02981                 return result;
02982             }
02983
02984             // - - - Layer aggregator
02985             // - - Layer: E3-B
02986             // - Transforms: E3-B Offset:<0.06500244, 0>
02987             // TrimEnd
02988             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p316_1()
02989             {
02990                 // Frame 0.
02991                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
02992                 // Frame 92.
02993                 result.InsertKeyFrame(0.513966501F, 0F, HoldThenStepEasingFunction());
02994                 // Frame 97.
02995                 result.InsertKeyFrame(0.541899443F, 0.316000015F, CubicBezierEasingFunction_2());
02996                 return result;
02997             }
02998
02999             // - - - Layer aggregator
03000             // - - Layer: E1-Y
03001             // - ShapeGroup: Group 2 Offset:<344.672, 214.842>
03002             // TrimEnd
03003             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p375_0()
03004             {
03005                 // Frame 0.
03006                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
03007                 // Frame 79.
03008                 result.InsertKeyFrame(0.441340774F, 0F, HoldThenStepEasingFunction());
03009                 // Frame 88.
03010                 result.InsertKeyFrame(0.491620123F, 0.375F, CubicBezierEasingFunction_4());
03011                 return result;
03012             }
03013
03014             // - - - Layer aggregator
03015             // - - Layer: E1-B
03016             // - Transforms: E1-B
03017             // TrimEnd
03018             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p375_1()
03019             {
03020                 // Frame 0.
03021                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
03022                 // Frame 84.
03023                 result.InsertKeyFrame(0.469273746F, 0F, HoldThenStepEasingFunction());
03024                 // Frame 93.
03025                 result.InsertKeyFrame(0.519553065F, 0.375F, CubicBezierEasingFunction_4());
03026                 return result;
03027             }
03028
03029             // - - - Layer aggregator
03030             // - - Layer: I-Y
03031             // - ShapeGroup: Group 6 Offset:<304.135, 282.409>
03032             // TrimEnd
03033             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p457_0()
03034             {
03035                 // Frame 0.
03036                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
03037                 // Frame 78.
03038                 result.InsertKeyFrame(0.43575418F, 0F, HoldThenStepEasingFunction());
03039                 // Frame 88.
03040                 result.InsertKeyFrame(0.491620123F, 0.456999987F, CubicBezierEasingFunction_4());
03041                 return result;
03042             }
03043
03044             // - - - Layer aggregator
03045             // - - Layer: I-B
03046             // - Transforms: I-B
03047             // TrimEnd
03048             ScalarKeyFrameAnimation TrimEndScalarAnimation_0_to_0p457_1()
03049             {
03050                 // Frame 0.
03051                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
03052                 // Frame 81.
03053                 result.InsertKeyFrame(0.452513963F, 0F, HoldThenStepEasingFunction());
03054                 // Frame 91.
03055                 result.InsertKeyFrame(0.508379877F, 0.456999987F, CubicBezierEasingFunction_4());
03056                 return result;
03057             }
03058
03059             // - - Layer aggregator
03060             // - Layer: T2a-Y
03061             // TrimEnd
03062             ScalarKeyFrameAnimation TrimEndScalarAnimation_0p5_to_1_0()
03063             {
03064                 // Frame 0.
03065                 var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
03066                 // Frame 72.
03067                 result.InsertKeyFrame(0.402234644F, 0.5F, HoldThenStepEasingFunction());
03068                 // Frame 82.
03069                 result.InsertKeyFrame(0.458100557F, 1F, CubicBezierEasingFunction_7());
03070                 return result;
03071             }
03072
03073             // - - Layer aggregator
03074             // - Layer: T2a-B
03075             // TrimEnd
03076             ScalarKeyFrameAnimation TrimEndScalarAnimation_0p5_to_1_1()
03077             {
03078                 // Frame 0.
03079                 var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
03080                 // Frame 75.
03081                 result.InsertKeyFrame(0.418994427F, 0.5F, HoldThenStepEasingFunction());
03082                 // Frame 85.
03083                 result.InsertKeyFrame(0.47486034F, 1F, CubicBezierEasingFunction_7());
03084                 return result;
03085             }
03086
03087             // - - Layer aggregator
03088             // - Layer: T1b-Y
03089             // TrimEnd
03090             ScalarKeyFrameAnimation TrimEndScalarAnimation_0p117_to_1_0()
03091             {
03092                 // Frame 0.
03093                 var result = CreateScalarKeyFrameAnimation(0F, 0.116999999F, StepThenHoldEasingFunction());
03094                 // Frame 70.
03095                 result.InsertKeyFrame(0.391061455F, 0.116999999F, HoldThenStepEasingFunction());
03096                 // Frame 75.
03097                 result.InsertKeyFrame(0.418994427F, 1F, CubicBezierEasingFunction_2());
03098                 return result;
03099             }
03100
03101             // - - Layer aggregator
03102             // - Layer: T1b-B
03103             // TrimEnd
03104             ScalarKeyFrameAnimation TrimEndScalarAnimation_0p117_to_1_1()
03105             {
03106                 // Frame 0.
03107                 var result = CreateScalarKeyFrameAnimation(0F, 0.116999999F, StepThenHoldEasingFunction());
03108                 // Frame 81.
03109                 result.InsertKeyFrame(0.452513963F, 0.116999999F, HoldThenStepEasingFunction());
03110                 // Frame 88.
03111                 result.InsertKeyFrame(0.491620123F, 1F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.209999993F, 1F)));
03112                 return result;
03113             }
03114
03115             // - - - Layer aggregator
03116             // - - Layer: T1a-B
03117             // - Transforms: T1a-B
03118             // TrimEnd
03119             ScalarKeyFrameAnimation TrimEndScalarAnimation_0p249_to_0p891()
03120             {
03121                 // Frame 0.
03122                 var result = CreateScalarKeyFrameAnimation(0F, 0.248999998F, StepThenHoldEasingFunction());
03123                 // Frame 70.
03124                 result.InsertKeyFrame(0.391061455F, 0.248999998F, HoldThenStepEasingFunction());
03125                 // Frame 84.
03126                 result.InsertKeyFrame(0.469273746F, 0.890999973F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.672999978F, 1F)));
03127                 return result;
03128             }
03129
03130             // - - Layer aggregator
03131             // - Layer: T2b-Y
03132             // TrimEnd
03133             ScalarKeyFrameAnimation TrimEndScalarAnimation_0p411_to_0p665_0()
03134             {
03135                 // Frame 0.
03136                 var result = CreateScalarKeyFrameAnimation(0F, 0.411000013F, StepThenHoldEasingFunction());
03137                 // Frame 76.
03138                 result.InsertKeyFrame(0.424580991F, 0.411000013F, HoldThenStepEasingFunction());
03139                 // Frame 85.
03140                 result.InsertKeyFrame(0.47486034F, 0.665000021F, CubicBezierEasingFunction_4());
03141                 return result;
03142             }
03143
03144             // - - Layer aggregator
03145             // - Layer: T2b-B
03146             // TrimEnd
03147             ScalarKeyFrameAnimation TrimEndScalarAnimation_0p411_to_0p665_1()
03148             {
03149                 // Frame 0.
03150                 var result = CreateScalarKeyFrameAnimation(0F, 0.411000013F, StepThenHoldEasingFunction());
03151                 // Frame 82.
03152                 result.InsertKeyFrame(0.458100557F, 0.411000013F, HoldThenStepEasingFunction());
03153                 // Frame 91.
03154                 result.InsertKeyFrame(0.508379877F, 0.665000021F, CubicBezierEasingFunction_4());
03155                 return result;
03156             }
03157
03158             // - - - Layer aggregator
03159             // - - Layer: O-Y
03160             // - ShapeGroup: Ellipse 1 Offset:<196, 267>
03161             // Ellipse Path 1.EllipseGeometry
03162             // TrimEnd
03163             ScalarKeyFrameAnimation TrimEndScalarAnimation_1_to_0p88()
03164             {
03165                 // Frame 0.
03166                 var result = CreateScalarKeyFrameAnimation(0F, 1F, StepThenHoldEasingFunction());
03167                 // Frame 54.
03168                 result.InsertKeyFrame(0.301675975F, 1F, HoldThenStepEasingFunction());
03169                 // Frame 63.
03170                 result.InsertKeyFrame(0.351955295F, 0.879999995F, CubicBezierEasingFunction_2());
03171                 return result;
03172             }
03173
03174             // - - - Layer aggregator
03175             // - - Layer: O-Y
03176             // - ShapeGroup: Ellipse 1 Offset:<196, 267>
03177             // Ellipse Path 1.EllipseGeometry
03178             // TrimStart
03179             ScalarKeyFrameAnimation TrimStartScalarAnimation_0_to_0p399()
03180             {
03181                 // Frame 0.
03182                 var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
03183                 // Frame 54.
03184                 result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
03185                 // Frame 63.
03186                 result.InsertKeyFrame(0.351955295F, 0.300000012F, CubicBezierEasingFunction_2());
03187                 // Frame 91.
03188                 result.InsertKeyFrame(0.508379877F, 0.398999989F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 1F), new Vector2(0.432000011F, 1F)));
03189                 return result;
03190             }
03191
03192             // - - Layer aggregator
03193             // - Layer: T2a-Y
03194             // TrimStart
03195             ScalarKeyFrameAnimation TrimStartScalarAnimation_0p5_to_0_0()
03196             {
03197                 // Frame 0.
03198                 var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
03199                 // Frame 72.
03200                 result.InsertKeyFrame(0.402234644F, 0.5F, HoldThenStepEasingFunction());
03201                 // Frame 82.
03202                 result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_7());
03203                 return result;
03204             }
03205
03206             // - - Layer aggregator
03207             // - Layer: T2a-B
03208             // TrimStart
03209             ScalarKeyFrameAnimation TrimStartScalarAnimation_0p5_to_0_1()
03210             {
03211                 // Frame 0.
03212                 var result = CreateScalarKeyFrameAnimation(0F, 0.5F, StepThenHoldEasingFunction());
03213                 // Frame 75.
03214                 result.InsertKeyFrame(0.418994427F, 0.5F, HoldThenStepEasingFunction());
03215                 // Frame 85.
03216                 result.InsertKeyFrame(0.47486034F, 0F, CubicBezierEasingFunction_7());
03217                 return result;
03218             }
03219
03220             // - - Layer aggregator
03221             // - Layer: T2b-Y
03222             // TrimStart
03223             ScalarKeyFrameAnimation TrimStartScalarAnimation_0p29_to_0_0()
03224             {
03225                 // Frame 0.
03226                 var result = CreateScalarKeyFrameAnimation(0F, 0.289999992F, StepThenHoldEasingFunction());
03227                 // Frame 76.
03228                 result.InsertKeyFrame(0.424580991F, 0.289999992F, HoldThenStepEasingFunction());
03229                 // Frame 85.
03230                 result.InsertKeyFrame(0.47486034F, 0F, CubicBezierEasingFunction_4());
03231                 return result;
03232             }
03233
03234             // - - Layer aggregator
03235             // - Layer: T2b-B
03236             // TrimStart
03237             ScalarKeyFrameAnimation TrimStartScalarAnimation_0p29_to_0_1()
03238             {
03239                 // Frame 0.
03240                 var result = CreateScalarKeyFrameAnimation(0F, 0.289999992F, StepThenHoldEasingFunction());
03241                 // Frame 82.
03242                 result.InsertKeyFrame(0.458100557F, 0.289999992F, HoldThenStepEasingFunction());
03243                 // Frame 91.
03244                 result.InsertKeyFrame(0.508379877F, 0F, CubicBezierEasingFunction_4());
03245                 return result;
03246             }
03247
03248             // TStart
03249             ScalarKeyFrameAnimation TStartScalarAnimation_0_to_0p249()
03250             {
03251                 // Frame 0.
03252                 if (_tStartScalarAnimation_0_to_0p249 != null) { return _tStartScalarAnimation_0_to_0p249; }
03253                 var result = _tStartScalarAnimation_0_to_0p249 = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
03254                 // Frame 54.
03255                 result.InsertKeyFrame(0.301675975F, 0F, HoldThenStepEasingFunction());
03256                 // Frame 70.
03257                 result.InsertKeyFrame(0.391061455F, 0.248999998F, _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0F), new Vector2(0.833000004F, 1F)));
03258                 return result;
03259             }
03260
03261             // TStart
03262             ScalarKeyFrameAnimation TStartScalarAnimation_0p8_to_0()
03263             {
03264                 // Frame 0.
03265                 var result = CreateScalarKeyFrameAnimation(0F, 0.800000012F, StepThenHoldEasingFunction());
03266                 // Frame 16.
03267                 result.InsertKeyFrame(0.0893854722F, 0.800000012F, HoldThenStepEasingFunction());
03268                 // Frame 20.
03269                 result.InsertKeyFrame(0.111731842F, 0.5F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.856999993F)));
03270                 // Frame 28.
03271                 result.InsertKeyFrame(0.156424582F, 0F, _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0.202000007F), new Vector2(0.938000023F, 1F)));
03272                 return result;
03273             }
03274
03275             // TStart
03276             ScalarKeyFrameAnimation TStartScalarAnimation_0p8_to_0p3()
03277             {
03278                 // Frame 0.
03279                 var result = CreateScalarKeyFrameAnimation(0F, 0.800000012F, StepThenHoldEasingFunction());
03280                 // Frame 18.
03281                 result.InsertKeyFrame(0.100558661F, 0.800000012F, HoldThenStepEasingFunction());
03282                 // Frame 23.
03283                 result.InsertKeyFrame(0.128491625F, 0.5F, _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.82099998F)));
03284                 // Frame 55.
03285                 result.InsertKeyFrame(0.30726257F, 0.300000012F, _c.CreateCubicBezierEasingFunction(new Vector2(0.0370000005F, 0.167999998F), new Vector2(0.263000011F, 1F)));
03286                 return result;
03287             }
03288
03289             // TStart
03290             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_00()
03291             {
03292                 // Frame 0.
03293                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03294                 // Frame 29.
03295                 result.InsertKeyFrame(0.162011176F, 0.870000005F, HoldThenStepEasingFunction());
03296                 // Frame 33.
03297                 result.InsertKeyFrame(0.184357539F, 0.375330001F, CubicBezierEasingFunction_2());
03298                 // Frame 36.
03299                 result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
03300                 return result;
03301             }
03302
03303             // TStart
03304             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_01()
03305             {
03306                 // Frame 0.
03307                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03308                 // Frame 29.
03309                 result.InsertKeyFrame(0.162011176F, 0.870000005F, HoldThenStepEasingFunction());
03310                 // Frame 33.
03311                 result.InsertKeyFrame(0.184357539F, 0.253329992F, CubicBezierEasingFunction_2());
03312                 // Frame 36.
03313                 result.InsertKeyFrame(0.201117322F, 0F, CubicBezierEasingFunction_2());
03314                 return result;
03315             }
03316
03317             // TStart
03318             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_02()
03319             {
03320                 // Frame 0.
03321                 if (_tStartScalarAnimation_0p87_to_0_02 != null) { return _tStartScalarAnimation_0p87_to_0_02; }
03322                 var result = _tStartScalarAnimation_0p87_to_0_02 = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03323                 // Frame 65.
03324                 result.InsertKeyFrame(0.363128483F, 0.870000005F, HoldThenStepEasingFunction());
03325                 // Frame 70.
03326                 result.InsertKeyFrame(0.391061455F, 0.212329999F, CubicBezierEasingFunction_2());
03327                 // Frame 75.
03328                 result.InsertKeyFrame(0.418994427F, 0F, CubicBezierEasingFunction_2());
03329                 return result;
03330             }
03331
03332             // TStart
03333             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_03()
03334             {
03335                 // Frame 0.
03336                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03337                 // Frame 54.
03338                 result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
03339                 // Frame 57.
03340                 result.InsertKeyFrame(0.318435758F, 0.421330005F, CubicBezierEasingFunction_2());
03341                 // Frame 64.
03342                 result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
03343                 return result;
03344             }
03345
03346             // TStart
03347             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_04()
03348             {
03349                 // Frame 0.
03350                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03351                 // Frame 54.
03352                 result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
03353                 // Frame 57.
03354                 result.InsertKeyFrame(0.318435758F, 0.438329995F, CubicBezierEasingFunction_2());
03355                 // Frame 64.
03356                 result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
03357                 return result;
03358             }
03359
03360             // TStart
03361             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_05()
03362             {
03363                 // Frame 0.
03364                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03365                 // Frame 54.
03366                 result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
03367                 // Frame 57.
03368                 result.InsertKeyFrame(0.318435758F, 0.506330013F, CubicBezierEasingFunction_2());
03369                 // Frame 64.
03370                 result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
03371                 return result;
03372             }
03373
03374             // TStart
03375             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_06()
03376             {
03377                 // Frame 0.
03378                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03379                 // Frame 54.
03380                 result.InsertKeyFrame(0.301675975F, 0.870000005F, HoldThenStepEasingFunction());
03381                 // Frame 57.
03382                 result.InsertKeyFrame(0.318435758F, 0.439330012F, CubicBezierEasingFunction_2());
03383                 // Frame 64.
03384                 result.InsertKeyFrame(0.357541889F, 0F, CubicBezierEasingFunction_2());
03385                 return result;
03386             }
03387
03388             // TStart
03389             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_07()
03390             {
03391                 // Frame 0.
03392                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03393                 // Frame 97.
03394                 result.InsertKeyFrame(0.541899443F, 0.870000005F, HoldThenStepEasingFunction());
03395                 // Frame 100.
03396                 result.InsertKeyFrame(0.558659196F, 0.421330005F, CubicBezierEasingFunction_2());
03397                 // Frame 107.
03398                 result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
03399                 return result;
03400             }
03401
03402             // TStart
03403             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_08()
03404             {
03405                 // Frame 0.
03406                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03407                 // Frame 97.
03408                 result.InsertKeyFrame(0.541899443F, 0.870000005F, HoldThenStepEasingFunction());
03409                 // Frame 100.
03410                 result.InsertKeyFrame(0.558659196F, 0.438329995F, CubicBezierEasingFunction_2());
03411                 // Frame 107.
03412                 result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
03413                 return result;
03414             }
03415
03416             // TStart
03417             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_09()
03418             {
03419                 // Frame 0.
03420                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03421                 // Frame 97.
03422                 result.InsertKeyFrame(0.541899443F, 0.870000005F, HoldThenStepEasingFunction());
03423                 // Frame 100.
03424                 result.InsertKeyFrame(0.558659196F, 0.506330013F, CubicBezierEasingFunction_2());
03425                 // Frame 107.
03426                 result.InsertKeyFrame(0.597765386F, 0F, CubicBezierEasingFunction_2());
03427                 return result;
03428             }
03429
03430             // TStart
03431             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_10()
03432             {
03433                 // Frame 0.
03434                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03435                 // Frame 80.
03436                 result.InsertKeyFrame(0.446927369F, 0.870000005F, HoldThenStepEasingFunction());
03437                 // Frame 83.
03438                 result.InsertKeyFrame(0.463687152F, 0.212329999F, CubicBezierEasingFunction_2());
03439                 // Frame 87.
03440                 result.InsertKeyFrame(0.486033529F, 0F, CubicBezierEasingFunction_2());
03441                 return result;
03442             }
03443
03444             // TStart
03445             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_11()
03446             {
03447                 // Frame 0.
03448                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03449                 // Frame 84.
03450                 result.InsertKeyFrame(0.469273746F, 0.870000005F, HoldThenStepEasingFunction());
03451                 // Frame 87.
03452                 result.InsertKeyFrame(0.486033529F, 0.212329999F, CubicBezierEasingFunction_2());
03453                 // Frame 91.
03454                 result.InsertKeyFrame(0.508379877F, 0F, CubicBezierEasingFunction_2());
03455                 return result;
03456             }
03457
03458             // TStart
03459             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_12()
03460             {
03461                 // Frame 0.
03462                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03463                 // Frame 85.
03464                 result.InsertKeyFrame(0.47486034F, 0.870000005F, HoldThenStepEasingFunction());
03465                 // Frame 90.
03466                 result.InsertKeyFrame(0.502793312F, 0.212329999F, CubicBezierEasingFunction_2());
03467                 // Frame 94.
03468                 result.InsertKeyFrame(0.525139689F, 0F, CubicBezierEasingFunction_2());
03469                 return result;
03470             }
03471
03472             // TStart
03473             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_13()
03474             {
03475                 // Frame 0.
03476                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03477                 // Frame 75.
03478                 result.InsertKeyFrame(0.418994427F, 0.870000005F, HoldThenStepEasingFunction());
03479                 // Frame 78.
03480                 result.InsertKeyFrame(0.43575418F, 0.421330005F, CubicBezierEasingFunction_2());
03481                 // Frame 82.
03482                 result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
03483                 return result;
03484             }
03485
03486             // TStart
03487             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_14()
03488             {
03489                 // Frame 0.
03490                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03491                 // Frame 75.
03492                 result.InsertKeyFrame(0.418994427F, 0.870000005F, HoldThenStepEasingFunction());
03493                 // Frame 78.
03494                 result.InsertKeyFrame(0.43575418F, 0.438329995F, CubicBezierEasingFunction_2());
03495                 // Frame 82.
03496                 result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
03497                 return result;
03498             }
03499
03500             // TStart
03501             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_15()
03502             {
03503                 // Frame 0.
03504                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03505                 // Frame 75.
03506                 result.InsertKeyFrame(0.418994427F, 0.870000005F, HoldThenStepEasingFunction());
03507                 // Frame 78.
03508                 result.InsertKeyFrame(0.43575418F, 0.506330013F, CubicBezierEasingFunction_2());
03509                 // Frame 82.
03510                 result.InsertKeyFrame(0.458100557F, 0F, CubicBezierEasingFunction_2());
03511                 return result;
03512             }
03513
03514             // TStart
03515             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_16()
03516             {
03517                 // Frame 0.
03518                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03519                 // Frame 76.
03520                 result.InsertKeyFrame(0.424580991F, 0.870000005F, HoldThenStepEasingFunction());
03521                 // Frame 79.
03522                 result.InsertKeyFrame(0.441340774F, 0.421330005F, CubicBezierEasingFunction_2());
03523                 // Frame 83.
03524                 result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
03525                 return result;
03526             }
03527
03528             // TStart
03529             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_17()
03530             {
03531                 // Frame 0.
03532                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03533                 // Frame 76.
03534                 result.InsertKeyFrame(0.424580991F, 0.870000005F, HoldThenStepEasingFunction());
03535                 // Frame 79.
03536                 result.InsertKeyFrame(0.441340774F, 0.438329995F, CubicBezierEasingFunction_2());
03537                 // Frame 83.
03538                 result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
03539                 return result;
03540             }
03541
03542             // TStart
03543             ScalarKeyFrameAnimation TStartScalarAnimation_0p87_to_0_18()
03544             {
03545                 // Frame 0.
03546                 var result = CreateScalarKeyFrameAnimation(0F, 0.870000005F, StepThenHoldEasingFunction());
03547                 // Frame 76.
03548                 result.InsertKeyFrame(0.424580991F, 0.870000005F, HoldThenStepEasingFunction());
03549                 // Frame 79.
03550                 result.InsertKeyFrame(0.441340774F, 0.506330013F, CubicBezierEasingFunction_2());
03551                 // Frame 83.
03552                 result.InsertKeyFrame(0.463687152F, 0F, CubicBezierEasingFunction_2());
03553                 return result;
03554             }
03555
03556             // Layer aggregator
03557             ShapeVisual ShapeVisual_0()
03558             {
03559                 var result = _c.CreateShapeVisual();
03560                 result.Size = new Vector2(375F, 667F);
03561                 var shapes = result.Shapes;
03562                 // Offset:<187.5, 333.5>
03563                 shapes.Add(SpriteShape_00());
03564                 // Layer: Dot-Y
03565                 shapes.Add(ContainerShape_00());
03566                 // Layer: E3-Y
03567                 shapes.Add(ContainerShape_02());
03568                 // Layer: E3-B
03569                 shapes.Add(ContainerShape_03());
03570                 // Layer: I-Y
03571                 shapes.Add(ContainerShape_04());
03572                 // Layer: I-B
03573                 shapes.Add(ContainerShape_05());
03574                 // Layer: E2-Y
03575                 shapes.Add(ContainerShape_06());
03576                 // Layer: E2-B
03577                 shapes.Add(ContainerShape_07());
03578                 // Layer: E1-Y
03579                 shapes.Add(ContainerShape_08());
03580                 // Layer: E1-B
03581                 shapes.Add(ContainerShape_09());
03582                 // Layer: T1a-Y
03583                 shapes.Add(ContainerShape_10());
03584                 // Layer: T2b-Y
03585                 shapes.Add(SpriteShape_11());
03586                 // Layer: T2a-Y
03587                 shapes.Add(SpriteShape_12());
03588                 // Layer: T2b-B
03589                 shapes.Add(SpriteShape_13());
03590                 // Layer: T1b-Y
03591                 shapes.Add(SpriteShape_14());
03592                 // Layer: T1b-B
03593                 shapes.Add(SpriteShape_15());
03594                 // Layer: O-Y
03595                 shapes.Add(ContainerShape_11());
03596                 // Layer: T1a-Y 2
03597                 shapes.Add(ContainerShape_12());
03598                 // Layer: T2a-B
03599                 shapes.Add(SpriteShape_19());
03600                 // Layer: T1a-B
03601                 shapes.Add(ContainerShape_13());
03602                 // Layer: Dot-Y
03603                 shapes.Add(ContainerShape_14());
03604                 // Layer: L-Y
03605                 shapes.Add(SpriteShape_22());
03606                 // Layer: L-B
03607                 shapes.Add(SpriteShape_23());
03608                 // Layer: Dot1
03609                 shapes.Add(ContainerShape_16());
03610                 // Layer: S1-Y
03611                 shapes.Add(ContainerShape_17());
03612                 // Layer: S7
03613                 shapes.Add(ContainerShape_18());
03614                 // Layer: S3-Y
03615                 shapes.Add(ContainerShape_19());
03616                 // Layer: S3-Y 2
03617                 shapes.Add(ContainerShape_20());
03618                 // Layer: S11
03619                 shapes.Add(SpriteShape_36());
03620                 // Layer: S12
03621                 shapes.Add(SpriteShape_37());
03622                 // Layer: S13
03623                 shapes.Add(SpriteShape_38());
03624                 // Layer: S3-Y 3
03625                 shapes.Add(ContainerShape_21());
03626                 // Layer: S3-Y 4
03627                 shapes.Add(ContainerShape_22());
03628                 return result;
03629             }
03630
03631             StepEasingFunction HoldThenStepEasingFunction()
03632             {
03633                 if (_holdThenStepEasingFunction != null) { return _holdThenStepEasingFunction; }
03634                 var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
03635                 result.IsFinalStepSingleFrame = true;
03636                 return result;
03637             }
03638
03639             StepEasingFunction StepThenHoldEasingFunction()
03640             {
03641                 if (_stepThenHoldEasingFunction != null) { return _stepThenHoldEasingFunction; }
03642                 var result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
03643                 result.IsInitialStepSingleFrame = true;
03644                 return result;
03645             }
03646
03647             // - - Layer aggregator
03648             // - Layer: Dot-Y
03649             // Transforms: Dot-Y
03650             // Offset
03651             Vector2KeyFrameAnimation OffsetVector2Animation_00()
03652             {
03653                 // Frame 0.
03654                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-153.528F, -206.753998F), StepThenHoldEasingFunction());
03655                 // Frame 96.
03656                 result.InsertKeyFrame(0.536312878F, new Vector2(-153.528F, -206.753998F), HoldThenStepEasingFunction());
03657                 // Frame 108.
03658                 result.InsertKeyFrame(0.603351951F, new Vector2(-134.278F, -206.753998F), _c.CreateCubicBezierEasingFunction(new Vector2(0F, 0F), new Vector2(0F, 0.811999977F)));
03659                 // Frame 115.
03660                 result.InsertKeyFrame(0.642458081F, new Vector2(-133.028F, -206.753998F), _c.CreateCubicBezierEasingFunction(new Vector2(0.389999986F, 0.707000017F), new Vector2(0.708000004F, 1F)));
03661                 return result;
03662             }
03663
03664             // - Layer aggregator
03665             // Layer: Dot-Y
03666             // Offset
03667             Vector2KeyFrameAnimation OffsetVector2Animation_01()
03668             {
03669                 // Frame 0.
03670                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(104.781998F, -2.52699995F), StepThenHoldEasingFunction());
03671                 // Frame 96.
03672                 result.InsertKeyFrame(0.536312878F, new Vector2(104.781998F, -2.52699995F), HoldThenStepEasingFunction());
03673                 // Frame 99.
03674                 result.InsertKeyFrame(0.553072631F, new Vector2(104.781998F, -4.52699995F), CubicBezierEasingFunction_0());
03675                 // Frame 102.
03676                 result.InsertKeyFrame(0.569832385F, new Vector2(104.781998F, -2.52699995F), CubicBezierEasingFunction_1());
03677                 // Frame 105.
03678                 result.InsertKeyFrame(0.586592197F, new Vector2(104.781998F, -3.09100008F), CubicBezierEasingFunction_0());
03679                 // Frame 108.
03680                 result.InsertKeyFrame(0.603351951F, new Vector2(104.781998F, -2.52699995F), CubicBezierEasingFunction_1());
03681                 return result;
03682             }
03683
03684             // Offset
03685             Vector2KeyFrameAnimation OffsetVector2Animation_02()
03686             {
03687                 // Frame 0.
03688                 if (_offsetVector2Animation_02 != null) { return _offsetVector2Animation_02; }
03689                 var result = _offsetVector2Animation_02 = CreateVector2KeyFrameAnimation(0F, new Vector2(-225.957001F, -204.322006F), StepThenHoldEasingFunction());
03690                 // Frame 84.
03691                 result.InsertKeyFrame(0.469273746F, new Vector2(-225.957001F, -204.322006F), HoldThenStepEasingFunction());
03692                 // Frame 92.
03693                 result.InsertKeyFrame(0.513966501F, new Vector2(-207.957001F, -204.322006F), CubicBezierEasingFunction_3());
03694                 // Frame 96.
03695                 result.InsertKeyFrame(0.536312878F, new Vector2(-210.957001F, -204.322006F), _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0F), new Vector2(0.666999996F, 1F)));
03696                 return result;
03697             }
03698
03699             // Offset
03700             Vector2KeyFrameAnimation OffsetVector2Animation_03()
03701             {
03702                 // Frame 0.
03703                 if (_offsetVector2Animation_03 != null) { return _offsetVector2Animation_03; }
03704                 var result = _offsetVector2Animation_03 = CreateVector2KeyFrameAnimation(0F, new Vector2(-210.207993F, -219.320999F), StepThenHoldEasingFunction());
03705                 // Frame 78.
03706                 result.InsertKeyFrame(0.43575418F, new Vector2(-210.207993F, -219.320999F), HoldThenStepEasingFunction());
03707                 // Frame 88.
03708                 result.InsertKeyFrame(0.491620123F, new Vector2(-211.175995F, -199.352997F), CubicBezierEasingFunction_4());
03709                 // Frame 92.
03710                 result.InsertKeyFrame(0.513966501F, new Vector2(-210.957993F, -204.320999F), CubicBezierEasingFunction_5());
03711                 return result;
03712             }
03713
03714             // Offset
03715             Vector2KeyFrameAnimation OffsetVector2Animation_04()
03716             {
03717                 // Frame 0.
03718                 if (_offsetVector2Animation_04 != null) { return _offsetVector2Animation_04; }
03719                 var result = _offsetVector2Animation_04 = CreateVector2KeyFrameAnimation(0F, new Vector2(-222.957993F, -204.322006F), StepThenHoldEasingFunction());
03720                 // Frame 83.
03721                 result.InsertKeyFrame(0.463687152F, new Vector2(-222.957993F, -204.322006F), HoldThenStepEasingFunction());
03722                 // Frame 92.
03723                 result.InsertKeyFrame(0.513966501F, new Vector2(-210.957993F, -204.322006F), CubicBezierEasingFunction_4());
03724                 return result;
03725             }
03726
03727             // Offset
03728             Vector2KeyFrameAnimation OffsetVector2Animation_05()
03729             {
03730                 // Frame 0.
03731                 if (_offsetVector2Animation_05 != null) { return _offsetVector2Animation_05; }
03732                 var result = _offsetVector2Animation_05 = CreateVector2KeyFrameAnimation(0F, new Vector2(-230.957001F, -205.695999F), StepThenHoldEasingFunction());
03733                 // Frame 79.
03734                 result.InsertKeyFrame(0.441340774F, new Vector2(-230.957001F, -205.695999F), HoldThenStepEasingFunction());
03735                 // Frame 88.
03736                 result.InsertKeyFrame(0.491620123F, new Vector2(-206.957001F, -205.695999F), CubicBezierEasingFunction_4());
03737                 // Frame 92.
03738                 result.InsertKeyFrame(0.513966501F, new Vector2(-210.957001F, -205.695999F), CubicBezierEasingFunction_5());
03739                 return result;
03740             }
03741
03742             // Offset
03743             Vector2KeyFrameAnimation OffsetVector2Animation_06()
03744             {
03745                 // Frame 0.
03746                 if (_offsetVector2Animation_06 != null) { return _offsetVector2Animation_06; }
03747                 var result = _offsetVector2Animation_06 = CreateVector2KeyFrameAnimation(0F, new Vector2(-210.957001F, -201.322006F), StepThenHoldEasingFunction());
03748                 // Frame 56.
03749                 result.InsertKeyFrame(0.312849164F, new Vector2(-210.957001F, -201.322006F), HoldThenStepEasingFunction());
03750                 // Frame 64.
03751                 result.InsertKeyFrame(0.357541889F, new Vector2(-210.957001F, -204.322006F), CubicBezierEasingFunction_3());
03752                 return result;
03753             }
03754
03755             // - Layer aggregator
03756             // Layer: O-Y
03757             // Offset
03758             Vector2KeyFrameAnimation OffsetVector2Animation_07()
03759             {
03760                 // Frame 0.
03761                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-259.583008F, -193.447006F), StepThenHoldEasingFunction());
03762                 result.SetReferenceParameter("_", _root);
03763                 // Frame 31.
03764                 result.InsertKeyFrame(0.17318435F, new Vector2(-259.583008F, -193.447006F), HoldThenStepEasingFunction());
03765                 // Frame 35.26.
03766                 result.InsertKeyFrame(0.196966484F, new Vector2(-250.582993F, -258.946991F), CubicBezierEasingFunction_2());
03767                 // Frame 44.
03768                 result.InsertExpressionKeyFrame(0.245810047F, "Pow(1-_.t0,3)*Vector2(-250.583,-258.947)+(3*Square(1-_.t0)*_.t0*Vector2(-250.583,-258.947))+(3*(1-_.t0)*Square(_.t0)*Vector2(-249.6143,-337.5837))+(Pow(_.t0,3)*Vector2(-230.458,-339.322))", StepThenHoldEasingFunction());
03769                 // Frame 54.
03770                 result.InsertExpressionKeyFrame(0.301675946F, "Pow(1-_.t0,3)*Vector2(-230.458,-339.322)+(3*Square(1-_.t0)*_.t0*Vector2(-214.2505,-340.7927))+(3*(1-_.t0)*Square(_.t0)*Vector2(-210.958,-164.322))+(Pow(_.t0,3)*Vector2(-210.958,-164.322))", StepThenHoldEasingFunction());
03771                 // Frame 54.
03772                 result.InsertKeyFrame(0.301675975F, new Vector2(-210.957993F, -164.322006F), StepThenHoldEasingFunction());
03773                 // Frame 63.
03774                 result.InsertKeyFrame(0.351955295F, new Vector2(-210.957993F, -207.322006F), _c.CreateCubicBezierEasingFunction(new Vector2(0.180000007F, 0F), new Vector2(0.34799999F, 1F)));
03775                 // Frame 73.
03776                 result.InsertKeyFrame(0.407821238F, new Vector2(-210.957993F, -204.322006F), _c.CreateCubicBezierEasingFunction(new Vector2(0.693000019F, 0F), new Vector2(0.270000011F, 1F)));
03777                 return result;
03778             }
03779
03780             // - - Layer aggregator
03781             // - Layer: Dot-Y
03782             // Transforms: Dot-Y
03783             // Offset
03784             Vector2KeyFrameAnimation OffsetVector2Animation_08()
03785             {
03786                 // Frame 0.
03787                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-156.916F, -206.503998F), StepThenHoldEasingFunction());
03788                 // Frame 28.
03789                 result.InsertKeyFrame(0.156424582F, new Vector2(-156.916F, -206.503998F), HoldThenStepEasingFunction());
03790                 // Frame 54.
03791                 result.InsertKeyFrame(0.301675975F, new Vector2(-117.416F, -206.503998F), CubicBezierEasingFunction_2());
03792                 return result;
03793             }
03794
03795             // - Layer aggregator
03796             // Layer: Dot-Y
03797             // Offset
03798             Vector2KeyFrameAnimation OffsetVector2Animation_09()
03799             {
03800                 // Frame 0.
03801                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(-93.6669998F, -51.8180008F), StepThenHoldEasingFunction());
03802                 // Frame 28.
03803                 result.InsertKeyFrame(0.156424582F, new Vector2(-93.6669998F, -51.8180008F), HoldThenStepEasingFunction());
03804                 // Frame 40.
03805                 result.InsertKeyFrame(0.223463684F, new Vector2(-93.6669998F, -132.817993F), _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.25999999F, 1F)));
03806                 // Frame 54.
03807                 result.InsertKeyFrame(0.301675975F, new Vector2(-93.6669998F, 42.0569992F), _c.CreateCubicBezierEasingFunction(new Vector2(0.74000001F, 0F), new Vector2(0.833000004F, 0.833000004F)));
03808                 return result;
03809             }
03810
03811             // - Layer aggregator
03812             // Layer: Dot1
03813             // Offset
03814             Vector2KeyFrameAnimation OffsetVector2Animation_10()
03815             {
03816                 // Frame 0.
03817                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(98.9800034F, -157.509995F), HoldThenStepEasingFunction());
03818                 // Frame 18.69.
03819                 result.InsertKeyFrame(0.104395606F, new Vector2(-161.020004F, -157.509995F), _c.CreateCubicBezierEasingFunction(new Vector2(0.823000014F, 0F), new Vector2(0.833000004F, 0.833000004F)));
03820                 return result;
03821             }
03822
03823             // Radius
03824             Vector2KeyFrameAnimation RadiusVector2Animation()
03825             {
03826                 // Frame 0.
03827                 if (_radiusVector2Animation != null) { return _radiusVector2Animation; }
03828                 var result = _radiusVector2Animation = CreateVector2KeyFrameAnimation(0F, new Vector2(1.5F, 1.5F), StepThenHoldEasingFunction());
03829                 // Frame 54.
03830                 result.InsertKeyFrame(0.301675975F, new Vector2(1.5F, 1.5F), HoldThenStepEasingFunction());
03831                 // Frame 61.
03832                 result.InsertKeyFrame(0.340782136F, new Vector2(22.2999992F, 22.2999992F), _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0F), new Vector2(0.666999996F, 1F)));
03833                 return result;
03834             }
03835
03836             // - Layer aggregator
03837             // Layer: Dot-Y
03838             Vector2KeyFrameAnimation ShapeVisibilityAnimation_00()
03839             {
03840                 // Frame 0.
03841                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03842                 // Frame 96.
03843                 result.InsertKeyFrame(0.536312878F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03844                 return result;
03845             }
03846
03847             // - Layer aggregator
03848             // Layer: E3-Y
03849             Vector2KeyFrameAnimation ShapeVisibilityAnimation_01()
03850             {
03851                 // Frame 0.
03852                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03853                 // Frame 84.
03854                 result.InsertKeyFrame(0.469273746F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03855                 // Frame 102.
03856                 result.InsertKeyFrame(0.569832385F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03857                 return result;
03858             }
03859
03860             // - Layer aggregator
03861             // Layer: E3-B
03862             Vector2KeyFrameAnimation ShapeVisibilityAnimation_02()
03863             {
03864                 // Frame 0.
03865                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03866                 // Frame 92.
03867                 result.InsertKeyFrame(0.513966501F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03868                 return result;
03869             }
03870
03871             // - Layer aggregator
03872             // Layer: I-Y
03873             Vector2KeyFrameAnimation ShapeVisibilityAnimation_03()
03874             {
03875                 // Frame 0.
03876                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03877                 // Frame 78.
03878                 result.InsertKeyFrame(0.43575418F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03879                 // Frame 93.
03880                 result.InsertKeyFrame(0.519553065F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03881                 return result;
03882             }
03883
03884             Vector2KeyFrameAnimation ShapeVisibilityAnimation_04()
03885             {
03886                 // Frame 0.
03887                 if (_shapeVisibilityAnimation_04 != null) { return _shapeVisibilityAnimation_04; }
03888                 var result = _shapeVisibilityAnimation_04 = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03889                 // Frame 81.
03890                 result.InsertKeyFrame(0.452513963F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03891                 return result;
03892             }
03893
03894             // - Layer aggregator
03895             // Layer: E2-Y
03896             Vector2KeyFrameAnimation ShapeVisibilityAnimation_05()
03897             {
03898                 // Frame 0.
03899                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03900                 // Frame 83.
03901                 result.InsertKeyFrame(0.463687152F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03902                 // Frame 96.
03903                 result.InsertKeyFrame(0.536312878F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03904                 return result;
03905             }
03906
03907             // - Layer aggregator
03908             // Layer: E2-B
03909             Vector2KeyFrameAnimation ShapeVisibilityAnimation_06()
03910             {
03911                 // Frame 0.
03912                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03913                 // Frame 86.
03914                 result.InsertKeyFrame(0.480446935F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03915                 return result;
03916             }
03917
03918             // - Layer aggregator
03919             // Layer: E1-Y
03920             Vector2KeyFrameAnimation ShapeVisibilityAnimation_07()
03921             {
03922                 // Frame 0.
03923                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03924                 // Frame 79.
03925                 result.InsertKeyFrame(0.441340774F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03926                 // Frame 94.
03927                 result.InsertKeyFrame(0.525139689F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03928                 return result;
03929             }
03930
03931             // - Layer aggregator
03932             // Layer: E1-B
03933             Vector2KeyFrameAnimation ShapeVisibilityAnimation_08()
03934             {
03935                 // Frame 0.
03936                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03937                 // Frame 84.
03938                 result.InsertKeyFrame(0.469273746F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03939                 return result;
03940             }
03941
03942             // - Layer aggregator
03943             // Layer: T1a-Y
03944             Vector2KeyFrameAnimation ShapeVisibilityAnimation_09()
03945             {
03946                 // Frame 0.
03947                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03948                 // Frame 59.
03949                 result.InsertKeyFrame(0.329608947F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03950                 // Frame 156.
03951                 result.InsertKeyFrame(0.87150836F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03952                 return result;
03953             }
03954
03955             // - Layer aggregator
03956             // Layer: T2b-Y
03957             Vector2KeyFrameAnimation ShapeVisibilityAnimation_10()
03958             {
03959                 // Frame 0.
03960                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03961                 // Frame 76.
03962                 result.InsertKeyFrame(0.424580991F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03963                 // Frame 92.
03964                 result.InsertKeyFrame(0.513966501F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03965                 return result;
03966             }
03967
03968             // - Layer aggregator
03969             // Layer: T2a-Y
03970             Vector2KeyFrameAnimation ShapeVisibilityAnimation_11()
03971             {
03972                 // Frame 0.
03973                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03974                 // Frame 72.
03975                 result.InsertKeyFrame(0.402234644F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03976                 // Frame 89.
03977                 result.InsertKeyFrame(0.497206718F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03978                 return result;
03979             }
03980
03981             // - Layer aggregator
03982             // Layer: T2b-B
03983             Vector2KeyFrameAnimation ShapeVisibilityAnimation_12()
03984             {
03985                 // Frame 0.
03986                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03987                 // Frame 82.
03988                 result.InsertKeyFrame(0.458100557F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
03989                 return result;
03990             }
03991
03992             // - Layer aggregator
03993             // Layer: T1b-Y
03994             Vector2KeyFrameAnimation ShapeVisibilityAnimation_13()
03995             {
03996                 // Frame 0.
03997                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
03998                 // Frame 70.
03999                 result.InsertKeyFrame(0.391061455F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04000                 // Frame 161.
04001                 result.InsertKeyFrame(0.899441361F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04002                 return result;
04003             }
04004
04005             // - Layer aggregator
04006             // Layer: O-Y
04007             Vector2KeyFrameAnimation ShapeVisibilityAnimation_14()
04008             {
04009                 // Frame 0.
04010                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04011                 // Frame 54.
04012                 result.InsertKeyFrame(0.301675975F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04013                 return result;
04014             }
04015
04016             // - Layer aggregator
04017             // Layer: T1a-Y 2
04018             Vector2KeyFrameAnimation ShapeVisibilityAnimation_15()
04019             {
04020                 // Frame 0.
04021                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04022                 // Frame 59.
04023                 result.InsertKeyFrame(0.329608947F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04024                 return result;
04025             }
04026
04027             // - Layer aggregator
04028             // Layer: T2a-B
04029             Vector2KeyFrameAnimation ShapeVisibilityAnimation_16()
04030             {
04031                 // Frame 0.
04032                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04033                 // Frame 75.
04034                 result.InsertKeyFrame(0.418994427F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04035                 return result;
04036             }
04037
04038             // - Layer aggregator
04039             // Layer: T1a-B
04040             Vector2KeyFrameAnimation ShapeVisibilityAnimation_17()
04041             {
04042                 // Frame 0.
04043                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04044                 // Frame 70.
04045                 result.InsertKeyFrame(0.391061455F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04046                 return result;
04047             }
04048
04049             // - Layer aggregator
04050             // Layer: Dot-Y
04051             Vector2KeyFrameAnimation ShapeVisibilityAnimation_18()
04052             {
04053                 // Frame 0.
04054                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04055                 // Frame 28.
04056                 result.InsertKeyFrame(0.156424582F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04057                 // Frame 54.
04058                 result.InsertKeyFrame(0.301675975F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04059                 return result;
04060             }
04061
04062             // - Layer aggregator
04063             // Layer: L-Y
04064             Vector2KeyFrameAnimation ShapeVisibilityAnimation_19()
04065             {
04066                 // Frame 0.
04067                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04068                 // Frame 16.
04069                 result.InsertKeyFrame(0.0893854722F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04070                 return result;
04071             }
04072
04073             // - Layer aggregator
04074             // Layer: L-B
04075             Vector2KeyFrameAnimation ShapeVisibilityAnimation_20()
04076             {
04077                 // Frame 0.
04078                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04079                 // Frame 18.
04080                 result.InsertKeyFrame(0.100558661F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04081                 return result;
04082             }
04083
04084             // - Layer aggregator
04085             // Layer: Dot1
04086             Vector2KeyFrameAnimation ShapeVisibilityAnimation_21()
04087             {
04088                 // Frame 0.
04089                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04090                 // Frame 17.
04091                 result.InsertKeyFrame(0.0949720666F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04092                 return result;
04093             }
04094
04095             // - Layer aggregator
04096             // Layer: S1-Y
04097             Vector2KeyFrameAnimation ShapeVisibilityAnimation_22()
04098             {
04099                 // Frame 0.
04100                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04101                 // Frame 30.
04102                 result.InsertKeyFrame(0.167597771F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04103                 // Frame 37.
04104                 result.InsertKeyFrame(0.206703916F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04105                 return result;
04106             }
04107
04108             // - Layer aggregator
04109             // Layer: S7
04110             Vector2KeyFrameAnimation ShapeVisibilityAnimation_23()
04111             {
04112                 // Frame 0.
04113                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04114                 // Frame 65.
04115                 result.InsertKeyFrame(0.363128483F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04116                 // Frame 75.
04117                 result.InsertKeyFrame(0.418994427F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04118                 return result;
04119             }
04120
04121             // - Layer aggregator
04122             // Layer: S3-Y
04123             Vector2KeyFrameAnimation ShapeVisibilityAnimation_24()
04124             {
04125                 // Frame 0.
04126                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04127                 // Frame 54.
04128                 result.InsertKeyFrame(0.301675975F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04129                 // Frame 64.
04130                 result.InsertKeyFrame(0.357541889F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04131                 return result;
04132             }
04133
04134             // - Layer aggregator
04135             // Layer: S3-Y 2
04136             Vector2KeyFrameAnimation ShapeVisibilityAnimation_25()
04137             {
04138                 // Frame 0.
04139                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04140                 // Frame 97.
04141                 result.InsertKeyFrame(0.541899443F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04142                 // Frame 107.
04143                 result.InsertKeyFrame(0.597765386F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04144                 return result;
04145             }
04146
04147             // - Layer aggregator
04148             // Layer: S11
04149             Vector2KeyFrameAnimation ShapeVisibilityAnimation_26()
04150             {
04151                 // Frame 0.
04152                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04153                 // Frame 80.
04154                 result.InsertKeyFrame(0.446927369F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04155                 // Frame 90.
04156                 result.InsertKeyFrame(0.502793312F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04157                 return result;
04158             }
04159
04160             // - Layer aggregator
04161             // Layer: S12
04162             Vector2KeyFrameAnimation ShapeVisibilityAnimation_27()
04163             {
04164                 // Frame 0.
04165                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04166                 // Frame 84.
04167                 result.InsertKeyFrame(0.469273746F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04168                 // Frame 94.
04169                 result.InsertKeyFrame(0.525139689F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04170                 return result;
04171             }
04172
04173             // - Layer aggregator
04174             // Layer: S13
04175             Vector2KeyFrameAnimation ShapeVisibilityAnimation_28()
04176             {
04177                 // Frame 0.
04178                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04179                 // Frame 85.
04180                 result.InsertKeyFrame(0.47486034F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04181                 // Frame 95.
04182                 result.InsertKeyFrame(0.530726254F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04183                 return result;
04184             }
04185
04186             // - Layer aggregator
04187             // Layer: S3-Y 3
04188             Vector2KeyFrameAnimation ShapeVisibilityAnimation_29()
04189             {
04190                 // Frame 0.
04191                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04192                 // Frame 75.
04193                 result.InsertKeyFrame(0.418994427F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04194                 // Frame 83.
04195                 result.InsertKeyFrame(0.463687152F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04196                 return result;
04197             }
04198
04199             // - Layer aggregator
04200             // Layer: S3-Y 4
04201             Vector2KeyFrameAnimation ShapeVisibilityAnimation_30()
04202             {
04203                 // Frame 0.
04204                 var result = CreateVector2KeyFrameAnimation(0F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04205                 // Frame 76.
04206                 result.InsertKeyFrame(0.424580991F, new Vector2(1F, 1F), HoldThenStepEasingFunction());
04207                 // Frame 84.
04208                 result.InsertKeyFrame(0.469273746F, new Vector2(0F, 0F), HoldThenStepEasingFunction());
04209                 return result;
04210             }
04211
04212             internal LottieLogo_AnimatedVisual(
04213                 Compositor compositor
04214                 )
04215             {
04216                 _c = compositor;
04217                 _reusableExpressionAnimation = compositor.CreateExpressionAnimation();
04218                 Root();
04219             }
04220
04221             public Visual RootVisual => _root;
04222             public TimeSpan Duration => TimeSpan.FromTicks(c_durationTicks);
04223             public Vector2 Size => new Vector2(375F, 667F);
04224             void IDisposable.Dispose() => _root?.Dispose();
04225         }
04226     }
04227 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ZoomSnapPoint.properties.cpp Source File

  • File List
  • File Members
  • Generated

ZoomSnapPoint.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ZoomSnapPoint.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ZoomSnapPoint)
00012 }
00013
00014 #include "ZoomSnapPoint.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/SwipeControlPage.xaml.cs Source File

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI

SwipeControlPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Numerics;
00007 using Windows.Foundation.Metadata;
00008 using Microsoft.UI.Composition;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Automation.Peers;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Hosting;
00013 using Microsoft.UI.Xaml.Input;
00014 using Microsoft.UI.Xaml.Media;
00015 using Microsoft.UI.Xaml.Navigation;
00016 using Microsoft.UI.Private.Controls;
00017 using Microsoft.UI.Private.Media;
00018 using SwipeControl_TestUI;
00019 using Microsoft.UI.Dispatching;
00020
00021 namespace MUXControlsTestApp
00022 {
00023     public sealed partial class SwipeControlPage : TestPage
00024     {
00025         object asyncEventReportingLock = new object();
00026         List<string> lstAsyncEventMessage = new List<string>();
00027         List<string> fullLogs = new List<string>();
00028         FrameworkElement lastInteractedWithSwipeControlContentContainer;
00029         FrameworkElement lastInteractedWithSwipeControlContentRoot;
00030         SwipeItem pastSender;
00031         UIElement animatedSwipe;
00032         DispatcherTimer _dt;
00033
00034         public SwipeControlPage()
00035         {
00036             // create command, and bind it to this object before initializing the components
00037             var command = new TestCommand(this);
00038             Resources.Add("command", command);
00039
00040             this.InitializeComponent();
00041             Container.SizeChanged += ContainerSizeChangedHandler;
00042             SwipeTestHooks.LastInteractedWithSwipeControlChanged += SwipeTestHooks_LastInteractedWithSwipeControlChanged;
00043             MaterialHelperTestApiSetup();
00044
00045             XamlUICommand uiCommand = new XamlUICommand
00046             {
00047                 Label = "UICommand Label",
00048                 IconSource = new SymbolIconSource { Symbol = Symbol.Setting }
00049             };
00050
00051             uiCommand.ExecuteRequested += UICommand_ExecuteRequested;
00052             this.SwipeItemForUICommand.Command = uiCommand;
00053
00054             if (chkLogSwipeControlMessages.IsChecked == true)
00055             {
00056                 MUXControlsTestHooks.SetLoggingLevelForType("SwipeControl", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00057                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00058             }
00059         }
00060
00061         private void SwipeTestHooks_LastInteractedWithSwipeControlChanged(object sender, object args)
00062         {
00063             if (lastInteractedWithSwipeControlContentContainer != null)
00064             {
00065                 lastInteractedWithSwipeControlContentContainer.SizeChanged -= LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
00066             }
00067             if(lastInteractedWithSwipeControlContentRoot != null)
00068             {
00069                 lastInteractedWithSwipeControlContentRoot.SizeChanged -= LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
00070             }
00071
00072             SwipeControl lastInteractedWithSwipeControl = SwipeTestHooks.GetLastInteractedWithSwipeControl();
00073             if (lastInteractedWithSwipeControl != null)
00074             {
00075                 lastInteractedWithSwipeControlContentContainer = (FrameworkElement)FindVisualChildByName(SwipeTestHooks.GetLastInteractedWithSwipeControl(), "SwipeContentStackPanel");
00076                 lastInteractedWithSwipeControlContentRoot = (FrameworkElement)FindVisualChildByName(SwipeTestHooks.GetLastInteractedWithSwipeControl(), "SwipeContentRoot");
00077             }
00078
00079             if (lastInteractedWithSwipeControlContentContainer != null)
00080             {
00081                 lastInteractedWithSwipeControlContentContainer.SizeChanged += LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
00082             }
00083             if (lastInteractedWithSwipeControlContentRoot != null)
00084             {
00085                 lastInteractedWithSwipeControlContentRoot.SizeChanged += LastInteractedWithSwipeControlSwipeContentElement_SizeChanged;
00086             }
00087
00088             PrintGridWidth();
00089         }
00090
00091         private void LastInteractedWithSwipeControlSwipeContentElement_SizeChanged(object sender, SizeChangedEventArgs e)
00092         {
00093             PrintGridWidth();
00094         }
00095
00096         private void UICommand_ExecuteRequested(XamlUICommand command, ExecuteRequestedEventArgs args)
00097         {
00098             ChangeText(command.Label);
00099         }
00100
00101         // This is a helper that gives access to the textBlock. It's being called in the TestCommand class.
00102         public void ChangeText(string text)
00103         {
00104             textBlock.Text = text;
00105             var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
00106             peer.RaiseAutomationEvent(AutomationEvents.MenuClosed);
00107         }
00108
00109         private void ContainerSizeChangedHandler(object sender, object e)
00110         {
00111             //var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
00112             //peer.RaiseAutomationEvent(AutomationEvents.MenuOpened);
00113
00114             PrintGridWidth();
00115         }
00116
00117         private void MaterialHelperTestApiSetup()
00118         {
00119             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00120             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00121         }
00122
00123         protected override void OnNavigatedFrom(NavigationEventArgs e)
00124         {
00125             // Unset all override flags to avoid impacting subsequent tests
00126             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00127             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00128             SwipeTestHooks.LastInteractedWithSwipeControlChanged -= SwipeTestHooks_LastInteractedWithSwipeControlChanged;
00129             base.OnNavigatedFrom(e);
00130         }
00131
00132         private void OnResetClick(object sender, RoutedEventArgs args)
00133         {
00134             textBlock.Text = "";
00135             TextBox.Text = "";
00136         }
00137
00138         private void PrintGridWidth()
00139         {
00140             String newText = "";
00141
00142             if (lastInteractedWithSwipeControlContentRoot != null)
00143             {
00144                 newText+= lastInteractedWithSwipeControlContentRoot.ActualWidth.ToString();
00145             }
00146             if (lastInteractedWithSwipeControlContentContainer != null)
00147             {
00148                 newText += ", ";
00149                 newText += lastInteractedWithSwipeControlContentContainer.ActualWidth.ToString();
00150             }
00151
00152             TextBox.Text = newText;
00153         }
00154
00155         private void SwipeItemInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args)
00156         {
00157             if (chkLogSwipeControlEvents.IsChecked == true)
00158             {
00159                 AppendAsyncEventMessage("SwipeItemInvoked sender.Text=" + sender.Text + ", args.SwipeControl.Name=" + args.SwipeControl.Name);
00160             }
00161
00162             // ensures that this method is invoked twice for only one swipe action.
00163             if (pastSender == sender)
00164             {
00165                 textBlock.Text = "FailTest";
00166             }
00167             else
00168             {
00169                 textBlock.Text = sender.Text;
00170             }
00171             pastSender = sender;
00172
00173             var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
00174             peer.RaiseAutomationEvent(AutomationEvents.MenuClosed);
00175         }
00176
00177         private void ProgramaticallyCloseSwipeControl3(SwipeItem sender, SwipeItemInvokedEventArgs args)
00178         {
00179             SwipeItemInvoked(sender, args);
00180             textBlock.Text = "sc3.Close()";
00181             sc3.Close();
00182         }
00183
00184         private void ProgramaticallyCloseSwipeControl11(SwipeItem sender, SwipeItemInvokedEventArgs args)
00185         {
00186             SwipeItemInvoked(sender, args);
00187             textBlock.Text = "sc11.Close()";
00188             sc11.Close();
00189         }
00190
00191         private void ProgramaticallyCloseSwipeControl9(SwipeItem sender, SwipeItemInvokedEventArgs args)
00192         {
00193             SwipeItemInvoked(sender, args);
00194             textBlock.Text = "sc9.Close()";
00195             sc9.Close();
00196         }
00197
00198         private void ExecuteRemainOpenInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args)
00199         {
00200             textBlock.Text = sender.Text;
00201         }
00202
00203         private void SwipeItemInvokedAndResizeGrid(SwipeItem sender, SwipeItemInvokedEventArgs args)
00204         {
00205             SwipeItemInvoked(sender, args);
00206
00207             if (sender.Text == "Scale Down")
00208             {
00209                 SwipePanel.Width = 400;
00210             }
00211             else if (sender.Text == "Scale Up")
00212             {
00213                 SwipePanel.Width = 700;
00214             }
00215
00216             PrintGridWidth();
00217         }
00218
00219         protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
00220         {
00221             _dt.Tick -= DispatcherTimer_Tick; // prevent leaks since the dispatcher holds a pointer to this
00222         }
00223
00224         private void TestSwipeControl_Loaded(object sender, RoutedEventArgs e)
00225         {
00226             _dt = new DispatcherTimer();
00227             _dt.Interval = TimeSpan.FromSeconds(0.1);
00228             _dt.Start();
00229             _dt.Tick += DispatcherTimer_Tick;
00230
00231             DependencyObject obj = FindVisualChildByName(SwipeControl4, "ContentRoot");
00232             UIElement ui = obj as UIElement;
00233             this.animatedSwipe = ui;
00234
00235             SetupAnimatedValuesSpy();
00236             SpyAnimatedValues();
00237             SwipeTestHooks.OpenedStatusChanged += SwipeTestHooks_OpenedStatusChanged;
00238             SwipeTestHooks.IdleStatusChanged += SwipeTestHooks_IdleStatusChanged;
00239         }
00240
00241         private void TestSwipeControl_Unloaded(object sender, RoutedEventArgs e)
00242         {
00243             SwipeTestHooks.OpenedStatusChanged -= SwipeTestHooks_OpenedStatusChanged;
00244             SwipeTestHooks.IdleStatusChanged -= SwipeTestHooks_IdleStatusChanged;
00245         }
00246
00247         private void SwipeTestHooks_IdleStatusChanged(SwipeControl sender, object args)
00248         {
00249             if (chkLogSwipeControlEvents.IsChecked == true)
00250             {
00251                 AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged sender.Name=" + sender.Name);
00252             }
00253
00254             if (sender.Name == this.sc1.Name)
00255             {
00256                 if (SwipeTestHooks.GetIsIdle(this.sc1))
00257                 {
00258                     this.SwipeItem1IdleCheckBox.IsChecked = true;
00259                 }
00260                 else
00261                 {
00262                     this.SwipeItem1IdleCheckBox.IsChecked = false;
00263                 }
00264             }
00265             if (sender.Name == this.sc2.Name)
00266             {
00267                 if (SwipeTestHooks.GetIsIdle(this.sc2))
00268                 {
00269                     this.SwipeItem2IdleCheckBox.IsChecked = true;
00270                 }
00271                 else
00272                 {
00273                     this.SwipeItem2IdleCheckBox.IsChecked = false;
00274                 }
00275             }
00276             if (sender.Name == this.sc3.Name)
00277             {
00278                 if (SwipeTestHooks.GetIsIdle(this.sc3))
00279                 {
00280                     this.SwipeItem3IdleCheckBox.IsChecked = true;
00281                 }
00282                 else
00283                 {
00284                     this.SwipeItem3IdleCheckBox.IsChecked = false;
00285                 }
00286
00287                 if (chkLogSwipeControlEvents.IsChecked == true)
00288                 {
00289                     AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged IsIdle=" + this.SwipeItem3IdleCheckBox.IsChecked.ToString());
00290                 }
00291
00292                 Grid contentRootGrid = (Grid)VisualTreeHelper.GetChild(VisualTreeHelper.GetChild(sc3, 0), 0);
00293                 SolidColorBrush solidColorBrush = (SolidColorBrush)contentRootGrid.Background;
00294                 if (solidColorBrush != null)
00295                 {
00296                     Swipe3BackgroundColorTextBlock.Text = solidColorBrush.Color.ToString();
00297                     if (chkLogSwipeControlEvents.IsChecked == true)
00298                     {
00299                         AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged contentRootGrid.Background=" + solidColorBrush.Color.ToString());
00300                     }
00301                 }
00302                 else
00303                 {
00304                     Swipe3BackgroundColorTextBlock.Text = "null";
00305                     if (chkLogSwipeControlEvents.IsChecked == true)
00306                     {
00307                         AppendAsyncEventMessage("SwipeTestHooks_IdleStatusChanged contentRootGrid.Background=null");
00308                     }
00309                 }
00310             }
00311             if (sender.Name == this.sc4.Name)
00312             {
00313                 if (SwipeTestHooks.GetIsIdle(this.sc4))
00314                 {
00315                     this.SwipeItem4IdleCheckBox.IsChecked = true;
00316                 }
00317                 else
00318                 {
00319                     this.SwipeItem4IdleCheckBox.IsChecked = false;
00320                 }
00321             }
00322             if (sender.Name == this.sc5.Name)
00323             {
00324                 if (SwipeTestHooks.GetIsIdle(this.sc5))
00325                 {
00326                     this.SwipeItem5IdleCheckBox.IsChecked = true;
00327                 }
00328                 else
00329                 {
00330                     this.SwipeItem5IdleCheckBox.IsChecked = false;
00331                 }
00332             }
00333             if (sender.Name == this.sc6.Name)
00334             {
00335                 if (SwipeTestHooks.GetIsIdle(this.sc6))
00336                 {
00337                     this.SwipeItem6IdleCheckBox.IsChecked = true;
00338                 }
00339                 else
00340                 {
00341                     this.SwipeItem6IdleCheckBox.IsChecked = false;
00342                 }
00343             }
00344             if (sender.Name == this.sc7.Name)
00345             {
00346                 if (SwipeTestHooks.GetIsIdle(this.sc7))
00347                 {
00348                     this.SwipeItem7IdleCheckBox.IsChecked = true;
00349                 }
00350                 else
00351                 {
00352                     this.SwipeItem7IdleCheckBox.IsChecked = false;
00353                 }
00354             }
00355             if (sender.Name == this.sc8.Name)
00356             {
00357                 if (SwipeTestHooks.GetIsIdle(this.sc8))
00358                 {
00359                     this.SwipeItem8IdleCheckBox.IsChecked = true;
00360                 }
00361                 else
00362                 {
00363                     this.SwipeItem8IdleCheckBox.IsChecked = false;
00364                 }
00365             }
00366             if (sender.Name == this.sc9.Name)
00367             {
00368                 if (SwipeTestHooks.GetIsIdle(this.sc9))
00369                 {
00370                     this.SwipeItem9IdleCheckBox.IsChecked = true;
00371                 }
00372                 else
00373                 {
00374                     this.SwipeItem9IdleCheckBox.IsChecked = false;
00375                 }
00376             }
00377             if (sender.Name == this.sc10.Name)
00378             {
00379                 if (SwipeTestHooks.GetIsIdle(this.sc10))
00380                 {
00381                     this.SwipeItem10IdleCheckBox.IsChecked = true;
00382                 }
00383                 else
00384                 {
00385                     this.SwipeItem10IdleCheckBox.IsChecked = false;
00386                 }
00387             }
00388             if (sender.Name == this.sc11.Name)
00389             {
00390                 if (SwipeTestHooks.GetIsIdle(this.sc11))
00391                 {
00392                     this.SwipeItem11IdleCheckBox.IsChecked = true;
00393                 }
00394                 else
00395                 {
00396                     this.SwipeItem11IdleCheckBox.IsChecked = false;
00397                 }
00398             }
00399         }
00400
00401         private void SwipeTestHooks_OpenedStatusChanged(SwipeControl sender, object args)
00402         {
00403             if (chkLogSwipeControlEvents.IsChecked == true)
00404             {
00405                 AppendAsyncEventMessage("SwipeTestHooks_OpenedStatusChanged sender.Name=" + sender.Name);
00406             }
00407
00408             if (sender.Name == this.sc1.Name)
00409             {
00410                 if (SwipeTestHooks.GetIsOpen(this.sc1))
00411                 {
00412                     this.SwipeItem1OpenCheckBox.IsChecked = true;
00413                 }
00414                 else
00415                 {
00416                     this.SwipeItem1OpenCheckBox.IsChecked = false;
00417                 }
00418             }
00419             if (sender.Name == this.sc2.Name)
00420             {
00421                 if (SwipeTestHooks.GetIsOpen(this.sc2))
00422                 {
00423                     this.SwipeItem2OpenCheckBox.IsChecked = true;
00424                 }
00425                 else
00426                 {
00427                     this.SwipeItem2OpenCheckBox.IsChecked = false;
00428                 }
00429             }
00430             if (sender.Name == this.sc3.Name)
00431             {
00432                 if (SwipeTestHooks.GetIsOpen(this.sc3))
00433                 {
00434                     this.SwipeItem3OpenCheckBox.IsChecked = true;
00435                 }
00436                 else
00437                 {
00438                     this.SwipeItem3OpenCheckBox.IsChecked = false;
00439                 }
00440             }
00441             if (sender.Name == this.sc4.Name)
00442             {
00443                 if (SwipeTestHooks.GetIsOpen(this.sc4))
00444                 {
00445                     this.SwipeItem4OpenCheckBox.IsChecked = true;
00446                 }
00447                 else
00448                 {
00449                     this.SwipeItem4OpenCheckBox.IsChecked = false;
00450                 }
00451             }
00452             if (sender.Name == this.sc5.Name)
00453             {
00454                 if (SwipeTestHooks.GetIsOpen(this.sc5))
00455                 {
00456                     this.SwipeItem5OpenCheckBox.IsChecked = true;
00457                 }
00458                 else
00459                 {
00460                     this.SwipeItem5OpenCheckBox.IsChecked = false;
00461                 }
00462             }
00463             if (sender.Name == this.sc6.Name)
00464             {
00465                 if (SwipeTestHooks.GetIsOpen(this.sc6))
00466                 {
00467                     this.SwipeItem6OpenCheckBox.IsChecked = true;
00468                 }
00469                 else
00470                 {
00471                     this.SwipeItem6OpenCheckBox.IsChecked = false;
00472                 }
00473             }
00474             if (sender.Name == this.sc7.Name)
00475             {
00476                 if (SwipeTestHooks.GetIsOpen(this.sc7))
00477                 {
00478                     this.SwipeItem7OpenCheckBox.IsChecked = true;
00479                 }
00480                 else
00481                 {
00482                     this.SwipeItem7OpenCheckBox.IsChecked = false;
00483                 }
00484             }
00485             if (sender.Name == this.sc8.Name)
00486             {
00487                 if (SwipeTestHooks.GetIsOpen(this.sc8))
00488                 {
00489                     this.SwipeItem8OpenCheckBox.IsChecked = true;
00490                 }
00491                 else
00492                 {
00493                     this.SwipeItem8OpenCheckBox.IsChecked = false;
00494                 }
00495             }
00496             if (sender.Name == this.sc9.Name)
00497             {
00498                 if (SwipeTestHooks.GetIsOpen(this.sc9))
00499                 {
00500                     this.SwipeItem9OpenCheckBox.IsChecked = true;
00501                 }
00502                 else
00503                 {
00504                     this.SwipeItem9OpenCheckBox.IsChecked = false;
00505                 }
00506             }
00507             if (sender.Name == this.sc10.Name)
00508             {
00509                 if (SwipeTestHooks.GetIsOpen(this.sc10))
00510                 {
00511                     this.SwipeItem10OpenCheckBox.IsChecked = true;
00512                 }
00513                 else
00514                 {
00515                     this.SwipeItem10OpenCheckBox.IsChecked = false;
00516                 }
00517             }
00518             if (sender.Name == this.sc11.Name)
00519             {
00520                 if (SwipeTestHooks.GetIsOpen(this.sc11))
00521                 {
00522                     this.SwipeItem11OpenCheckBox.IsChecked = true;
00523                 }
00524                 else
00525                 {
00526                     this.SwipeItem11OpenCheckBox.IsChecked = false;
00527                 }
00528             }
00529         }
00530
00531         private void SetupAnimatedValuesSpy()
00532         {
00533             StopAnimatedValuesSpy();
00534
00535             this.AnimatedValuesSpy = null;
00536             this.PositionAnimation = null;
00537
00538             if (this.animatedSwipe != null)
00539             {
00540                 Visual visualPPChild = ElementCompositionPreview.GetElementVisual(this.animatedSwipe);
00541                 Compositor compositor = visualPPChild.Compositor;
00542
00543                 this.AnimatedValuesSpy = compositor.CreatePropertySet();
00544                 AnimatedValuesSpy.InsertVector3("Offset", new Vector3());
00545
00546                 this.PositionAnimation = compositor.CreateExpressionAnimation("visual.Offset");
00547                 this.PositionAnimation.SetReferenceParameter("visual", visualPPChild);
00548
00549                 CheckSpyingTicksRequirement();
00550                 TickForValuesSpy();
00551             }
00552             else
00553             {
00554                 ResetSpyOutput();
00555             }
00556         }
00557
00558         private void DispatcherTimer_Tick(object sender, object e)
00559         {
00560             SpyAnimatedValues();
00561         }
00562
00563         private void StartAnimatedValuesSpy()
00564         {
00565             if (this.AnimatedValuesSpy != null)
00566             {
00567                 this.AnimatedValuesSpy.StartAnimation("Offset", this.PositionAnimation);
00568             }
00569         }
00570
00571         private void StopAnimatedValuesSpy() // we fail before even reaching this
00572         {
00573             if (this.AnimatedValuesSpy != null)
00574             {
00575                 this.AnimatedValuesSpy.StopAnimation("Offset");
00576             }
00577         }
00578
00579         private void SpyAnimatedValues() // untestsed as well
00580         {
00581             if (this.AnimatedValuesSpy != null)
00582             {
00583                 //StopAnimatedValuesSpy();
00584
00585                 Vector3 position;
00586                 CompositionGetValueStatus status = this.AnimatedValuesSpy.TryGetVector3("Offset", out position);
00587                 if (CompositionGetValueStatus.Succeeded == status)
00588                 {
00589                     // add a position textblock in the file
00590                     this.PositionX.Text = position.X.ToString();
00591                     this.PositionY.Text = position.Y.ToString();
00592                 }
00593                 else
00594                 {
00595                     this.PositionX.Text = this.PositionY.Text = "status=" + status.ToString();
00596                 }
00597
00598                 StartAnimatedValuesSpy();
00599             }
00600         }
00601
00602         private void ResetSpyOutput()
00603         {
00604             this.PositionX.Text = this.PositionY.Text = "0 - reset";
00605         }
00606
00607         private void TickForValuesSpy()
00608         {
00609             this.UIThreadTicksForValuesSpy = 6;
00610             CheckSpyingTicksRequirement();
00611         }
00612
00613         private void CheckSpyingTicksRequirement()
00614         {
00615             if (this.animatedSwipe != null &&
00616                 (this.UIThreadTicksForValuesSpy > 0) && this.AnimatedValuesSpy != null)
00617             {
00618                 if (!this.IsRenderingHooked)
00619                 {
00620                     this.IsRenderingHooked = true;
00621                     Microsoft.UI.Xaml.Media.CompositionTarget.Rendering += CompositionTarget_Rendering;
00622                 }
00623             }
00624             else
00625             {
00626                 if (this.IsRenderingHooked)
00627                 {
00628                     Microsoft.UI.Xaml.Media.CompositionTarget.Rendering -= CompositionTarget_Rendering;
00629                     this.IsRenderingHooked = false;
00630                 }
00631             }
00632         }
00633
00634         private void CompositionTarget_Rendering(object sender, object e)
00635         {
00636             if (this.UIThreadTicksForValuesSpy > 0)
00637             {
00638                 this.UIThreadTicksForValuesSpy--;
00639             }
00640             CheckSpyingTicksRequirement();
00641             SpyAnimatedValues();
00642         }
00643
00644         // Composition property spy stuff below:
00645         private CompositionPropertySet AnimatedValuesSpy
00646         {
00647             get;
00648             set;
00649         }
00650
00651         private ExpressionAnimation PositionAnimation
00652         {
00653             get;
00654             set;
00655         }
00656
00657         private bool IsRenderingHooked
00658         {
00659             get;
00660             set;
00661         }
00662
00663         private uint UIThreadTicksForValuesSpy
00664         {
00665             get;
00666             set;
00667         }
00668
00669         private void ChkLogSwipeControlMessages_Checked(object sender, RoutedEventArgs e)
00670         {
00671             //To turn on info and verbose logging for a particular SwipeControl instance:
00672             //MUXControlsTestHooks.SetLoggingLevelForInstance(sc1, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00673
00674             //To turn on info and verbose logging without any filter:
00675             //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00676
00677             //To turn on info and verbose logging for the SwipeControl type:
00678             MUXControlsTestHooks.SetLoggingLevelForType("SwipeControl", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00679
00680             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00681         }
00682
00683         private void ChkLogSwipeControlMessages_Unchecked(object sender, RoutedEventArgs e)
00684         {
00685             //To turn off info and verbose logging for a particular SwipeControl instance:
00686             //MUXControlsTestHooks.SetLoggingLevelForInstance(swipeControl, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00687
00688             //To turn off info and verbose logging without any filter:
00689             //MUXControlsTestHooks.SetLoggingLevelForInstance(null, isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00690
00691             //To turn off info and verbose logging for the SwipeControl type:
00692             MUXControlsTestHooks.SetLoggingLevelForType("SwipeControl", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00693
00694             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00695         }
00696
00697         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00698         {
00699             // Cut off the terminating new line.
00700             string msg = args.Message.Substring(0, args.Message.Length - 1);
00701             string senderName = string.Empty;
00702
00703             try
00704             {
00705                 FrameworkElement fe = sender as FrameworkElement;
00706
00707                 if (fe != null)
00708                 {
00709                     senderName = "s:" + fe.Name + ", ";
00710                 }
00711             }
00712             catch
00713             {
00714                 AppendAsyncEventMessage("Warning: Failure while accessing sender's Name");
00715             }
00716
00717             if (args.IsVerboseLevel)
00718             {
00719                 AppendAsyncEventMessage("Verbose: " + senderName + "m:" + msg);
00720             }
00721             else
00722             {
00723                 AppendAsyncEventMessage("Info: " + senderName + "m:" + msg);
00724             }
00725         }
00726
00727         private void AppendAsyncEventMessage(string asyncEventMessage)
00728         {
00729             lock (asyncEventReportingLock)
00730             {
00731                 while (asyncEventMessage.Length > 0)
00732                 {
00733                     string msgHead = asyncEventMessage;
00734
00735                     if (asyncEventMessage.Length > 110)
00736                     {
00737                         int commaIndex = asyncEventMessage.IndexOf(',', 110);
00738                         if (commaIndex != -1)
00739                         {
00740                             msgHead = asyncEventMessage.Substring(0, commaIndex);
00741                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
00742                         }
00743                         else
00744                         {
00745                             asyncEventMessage = string.Empty;
00746                         }
00747                     }
00748                     else
00749                     {
00750                         asyncEventMessage = string.Empty;
00751                     }
00752
00753                     lstAsyncEventMessage.Add(msgHead);
00754                 }
00755
00756                 var ignored = this.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
00757
00758             }
00759         }
00760
00761         private void AppendAsyncEventMessage()
00762         {
00763             lock (asyncEventReportingLock)
00764             {
00765                 foreach (string asyncEventMessage in lstAsyncEventMessage)
00766                 {
00767                     if (chkDisplayLogs.IsChecked == true)
00768                     {
00769                         lstSwipeControlEvents.Items.Add(asyncEventMessage);
00770                     }
00771                     fullLogs.Add(asyncEventMessage);
00772                 }
00773                 lstAsyncEventMessage.Clear();
00774             }
00775         }
00776
00777         private void BtnClearSwipeControlEvents_Click(object sender, RoutedEventArgs e)
00778         {
00779             lstSwipeControlEvents.Items.Clear();
00780         }
00781
00782         private void BtnGetFullLog_Click(object sender, RoutedEventArgs e)
00783         {
00784             foreach (string log in fullLogs)
00785             {
00786                 cmbFullLog.Items.Add(log);
00787             }
00788         }
00789
00790         private void BtnClearFullLog_Click(object sender, RoutedEventArgs e)
00791         {
00792             fullLogs.Clear();
00793             cmbFullLog.Items.Clear();
00794         }
00795     }
00796 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarItem Member List

This is the complete list of members for BreadcrumbBarItem, including all inherited members.
_factory | BreadcrumbBarItem | [private, static]
_invokePattern | BreadcrumbBarItem | [private]
BreadcrumbBarItem(UIObject uiObject) | BreadcrumbBarItem | [inline]
Factory | BreadcrumbBarItem | [static]
GetInvokedWaiter() | BreadcrumbBarItem | [inline]
Initialize() | BreadcrumbBarItem | [inline, private]
Invoke() | BreadcrumbBarItem | [inline]
InvokeAndWait(TimeSpan?timeout=null) | BreadcrumbBarItem | [inline]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InkToolBarAutomationPeer)
00012 }
00013
00014 #include "InkToolBarAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadialGradientBrush Member List

This is the complete list of members for RadialGradientBrush, including all inherited members.
abi_enter() | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
Center(winrt::Point const &value) | RadialGradientBrushProperties |
Center() | RadialGradientBrushProperties |
CenterProperty() | RadialGradientBrushProperties | [inline, static]
CheckThread() | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
ClearProperties() | RadialGradientBrushProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< RadialGradientBrush > &&self) noexcept | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline, static]
EnsureCompositionBrush() | RadialGradientBrush | [private]
EnsureProperties() | RadialGradientBrushProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
final_release(std::unique_ptr< RadialGradientBrush > &&self) | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline, static]
GetBase() | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
GetInner() | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
GradientOrigin(winrt::Point const &value) | RadialGradientBrushProperties |
GradientOrigin() | RadialGradientBrushProperties |
GradientOriginProperty() | RadialGradientBrushProperties | [inline, static]
GradientStops() | RadialGradientBrush |
InterpolationSpace(winrt::CompositionColorSpace const &value) | RadialGradientBrushProperties |
InterpolationSpace() | RadialGradientBrushProperties |
InterpolationSpaceProperty() | RadialGradientBrushProperties | [inline, static]
IsOnThread() | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
MappingMode(winrt::BrushMappingMode const &value) | RadialGradientBrushProperties |
MappingMode() | RadialGradientBrushProperties |
MappingModeProperty() | RadialGradientBrushProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
OnCenterPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadialGradientBrush |
RadialGradientBrushProperties::OnCenterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnConnected() | RadialGradientBrush |
OnDisconnected() | RadialGradientBrush |
OnFallbackColorChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | RadialGradientBrush | [private]
OnGradientOriginPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadialGradientBrush |
RadialGradientBrushProperties::OnGradientOriginPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnGradientStopsVectorChanged(winrt::Collections::IObservableVector< winrt::GradientStop > const &sender, winrt::Collections::IVectorChangedEventArgs const &e) | RadialGradientBrush | [private]
OnInterpolationSpacePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadialGradientBrush |
RadialGradientBrushProperties::OnInterpolationSpacePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnMappingModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadialGradientBrush |
RadialGradientBrushProperties::OnMappingModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnRadiusXPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadialGradientBrush |
RadialGradientBrushProperties::OnRadiusXPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnRadiusYPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadialGradientBrush |
RadialGradientBrushProperties::OnRadiusYPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
OnSpreadMethodPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadialGradientBrush |
RadialGradientBrushProperties::OnSpreadMethodPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadialGradientBrushProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
RadialGradientBrush() | RadialGradientBrush |
RadialGradientBrushProperties() | RadialGradientBrushProperties |
RadiusX(double value) | RadialGradientBrushProperties |
RadiusX() | RadialGradientBrushProperties |
RadiusXProperty() | RadialGradientBrushProperties | [inline, static]
RadiusY(double value) | RadialGradientBrushProperties |
RadiusY() | RadialGradientBrushProperties |
RadiusYProperty() | RadialGradientBrushProperties | [inline, static]
ReferenceTracker(Args &&...args) | ReferenceTracker< RadialGradientBrush, winrt::implementation::RadialGradientBrushT > | [inline]
s_CenterProperty | RadialGradientBrushProperties | [static]
s_GradientOriginProperty | RadialGradientBrushProperties | [static]
s_InterpolationSpaceProperty | RadialGradientBrushProperties | [static]
s_MappingModeProperty | RadialGradientBrushProperties | [static]
s_RadiusXProperty | RadialGradientBrushProperties | [static]
s_RadiusYProperty | RadialGradientBrushProperties | [static]
s_SpreadMethodProperty | RadialGradientBrushProperties | [static]
SpreadMethod(winrt::GradientSpreadMethod const &value) | RadialGradientBrushProperties |
SpreadMethod() | RadialGradientBrushProperties |
SpreadMethodProperty() | RadialGradientBrushProperties | [inline, static]
UpdateCompositionExtendMode() | RadialGradientBrush | [private]
UpdateCompositionGradientCenter() | RadialGradientBrush | [private]
UpdateCompositionGradientMappingMode() | RadialGradientBrush | [private]
UpdateCompositionGradientOrigin() | RadialGradientBrush | [private]
UpdateCompositionGradientRadius() | RadialGradientBrush | [private]
UpdateCompositionGradientStops() | RadialGradientBrush | [private]
UpdateCompositionInterpolationSpace() | RadialGradientBrush | [private]
UpdateFallbackBrush() | RadialGradientBrush | [private]
~RadialGradientBrush() | RadialGradientBrush | [inline]
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBarAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

MenuBarAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MenuBarAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(MenuBarAutomationPeer)
00012 }
00013
00014 #include "MenuBarAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollControllerPanRequestedEventArgs Member List

This is the complete list of members for ScrollControllerPanRequestedEventArgs, including all inherited members.
Handled() const | ScrollControllerPanRequestedEventArgs |
Handled(bool handled) | ScrollControllerPanRequestedEventArgs |
PointerPoint() const | ScrollControllerPanRequestedEventArgs |
ScrollControllerPanRequestedEventArgs(const winrt::PointerPoint &pointerPoint) | ScrollControllerPanRequestedEventArgs |
~ScrollControllerPanRequestedEventArgs() | ScrollControllerPanRequestedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/Virtual/PinterestLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • Virtual

PinterestLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utils;
00005 using System;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Specialized;
00008 using System.Linq;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using MUXControlsTestApp.Samples.Model;
00012 using MUXControlsTestApp.Utilities;
00013
00014 namespace MUXControlsTestApp.Samples
00015 {
00016     public sealed partial class PinterestLayoutSamplePage : Page
00017     {
00018         private string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00019
00020         public PinterestLayoutSamplePage()
00021         {
00022             this.InitializeComponent();
00023             repeater.ItemTemplate = elementFactory;
00024
00025             var rnd = new Random();
00026             var data = new TestObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
00027                            new Recipe
00028                            {
00029                                ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00030                                Description = k + " - " + _lorem.Substring(0, rnd.Next(50, 350))
00031                            }));
00032
00033             repeater.ItemsSource = data;
00034             bringIntoView.Click += BringIntoView_Click;
00035         }
00036
00037         private void BringIntoView_Click(object sender, RoutedEventArgs e)
00038         {
00039             int index = 0;
00040             if (int.TryParse(tb.Text, out index))
00041             {
00042                 var anchor = repeater.GetOrCreateElement(index);
00043                 anchor.StartBringIntoView();
00044             }
00045         }
00046     }
00047 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItem.h Source File

  • File List
  • File Members
  • SwipeControl

SwipeItem.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SwipeItem.g.h"
00007 #include "SwipeItem.properties.h"
00008
00009 class SwipeItem :
00010     public ReferenceTracker<SwipeItem, winrt::implementation::SwipeItemT>,
00011     public SwipeItemProperties
00012 {
00013 public:
00014     SwipeItem();
00015     // Property changed handler.
00016     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00017
00018     void GenerateControl(const winrt::AppBarButton& appBarButton, const winrt::Style& swipeItemStyle);
00019
00020     void InvokeSwipe(const winrt::SwipeControl& content);
00021
00022 private:
00023     void OnItemTapped(
00024         const winrt::IInspectable& sender,
00025         const winrt::TappedRoutedEventArgs& args);
00026
00027     void OnPointerPressed(
00028         const winrt::IInspectable& sender,
00029         const winrt::PointerRoutedEventArgs& args);
00030
00031     void OnCommandChanged(const winrt::ICommand& oldCommand, const winrt::ICommand& newCommand);
00032
00033     void AttachEventHandlers(const winrt::AppBarButton& appBarButton);
00034 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollControllerScrollToRequestedEventArgs.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollControllerScrollToRequestedEventArgs.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollControllerScrollToRequestedEventArgs.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollControllerScrollToRequestedEventArgs)
00012 }
00013
00014 #include "ScrollControllerScrollToRequestedEventArgs.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderTemplateSettingsProperties Member List

This is the complete list of members for ExpanderTemplateSettingsProperties, including all inherited members.
ClearProperties() | ExpanderTemplateSettingsProperties | [static]
ContentHeight(double value) | ExpanderTemplateSettingsProperties |
ContentHeight() | ExpanderTemplateSettingsProperties |
ContentHeightProperty() | ExpanderTemplateSettingsProperties | [inline, static]
EnsureProperties() | ExpanderTemplateSettingsProperties | [static]
ExpanderTemplateSettingsProperties() | ExpanderTemplateSettingsProperties |
NegativeContentHeight(double value) | ExpanderTemplateSettingsProperties |
NegativeContentHeight() | ExpanderTemplateSettingsProperties |
NegativeContentHeightProperty() | ExpanderTemplateSettingsProperties | [inline, static]
s_ContentHeightProperty | ExpanderTemplateSettingsProperties | [static]
s_NegativeContentHeightProperty | ExpanderTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewPage Member List

This is the complete list of members for NavigationViewPage, including all inherited members.
_itemInvokedEventsFired | NavigationViewPage | [private]
_selectionChangedEventsFired | NavigationViewPage | [private]
AddFooterItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
AddItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) | NavigationViewPage | [inline, private]
AutoSuggestCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
AutoSuggestCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
BackRequestedStateResetButton_Click(object sender, RoutedEventArgs args) | NavigationViewPage | [inline, private]
BringSettingsIntoViewButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ChangeContent_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ChangeFocusVisualKind_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ChangePaneHeader_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ChangePaneTitle_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ClearMenuButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ClearSelectedItem_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ClearSelectionChangeBlock(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ClosingEventCountResetButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
ContentDialogNavViewButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
CopyGamesLabelButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
CopyVolumeToolTipButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
FindAndGiveAutomationNameToVisualChild(string childName) | NavigationViewPage | [inline, private]
FlipOrientation_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
FlowDirectionCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
FlowDirectionCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
GetChildNavViewItemContentPresenterMarginButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
GetHeaderContentMargin_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
GetHomeItemRevealVisualState_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
GetNavViewActiveVisualStates_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
GetTopLevelNavViewItemContentPresenterMarginButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
IsPaneFooterVisibleCheckBox_CheckedChanged(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
IsTitleBarAutoPaddingEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
IsTitleBarAutoPaddingEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
m_closedEventsFired | NavigationViewPage | [private]
m_closingEventsFired | NavigationViewPage | [private]
m_focusVisualKind | NavigationViewPage | [private]
m_itemInvokedEventsFired | NavigationViewPage |
m_newFooterItemIndex | NavigationViewPage | [private]
m_newItemIndex | NavigationViewPage | [private]
m_selectionChangedEventsFired | NavigationViewPage |
m_useFocusVisualKindReveal | NavigationViewPage | [private]
MoviesEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
MoviesEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
NavigationViewPage() | NavigationViewPage | [inline]
NavigationViewPage_Loaded(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
NavigationViewPage_Unloaded(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
NavView_BackRequested(NavigationView nv, NavigationViewBackRequestedEventArgs args) | NavigationViewPage | [inline, private]
NavView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args) | NavigationViewPage | [inline, private]
NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) | NavigationViewPage | [inline, private]
NavView_PaneClosed(NavigationView sender, object args) | NavigationViewPage | [inline, private]
NavView_PaneClosing(NavigationView sender, NavigationViewPaneClosingEventArgs args) | NavigationViewPage | [inline, private]
NavView_PaneOpened(NavigationView sender, object args) | NavigationViewPage | [inline, private]
NavView_PaneOpening(NavigationView sender, object args) | NavigationViewPage | [inline, private]
NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) | NavigationViewPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | NavigationViewPage | [inline, protected]
OpenPaneButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
PaneAutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) | NavigationViewPage | [inline, private]
PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ReadSettingsSelected_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
RemoveFooterItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
RemoveItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ResetEventCounters_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ScrambleButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ScrollItemIntoViewButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
SelectedItemCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
SelectedItemIsEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
SelectedItemIsEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
SelectionFollowFocus_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
SelectionFollowFocus_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
SetHeaderButton_Click(object sender, RoutedEventArgs args) | NavigationViewPage | [inline, private]
SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ShowFooterItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
TestFrameCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
TestPage_Loaded(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
TitleBarCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ToggleBackgroundChanged(DependencyObject o, DependencyProperty p) | NavigationViewPage | [inline, private]
ToggleButtonStyleCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
ToggleButtonStyleCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewPage | [inline, private]
UpdateToggleBackgroundColor(Button toggleButton) | NavigationViewPage | [inline, private]
WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BiDirectionalScrollController::OperationInfo Member List

This is the complete list of members for BiDirectionalScrollController::OperationInfo, including all inherited members.
CorrelationId | BiDirectionalScrollController::OperationInfo |
OffsetTarget | BiDirectionalScrollController::OperationInfo |
OperationInfo(int correlationId, Point relativeOffsetChange, Point offsetTarget) | BiDirectionalScrollController::OperationInfo | [inline]
RelativeOffsetChange | BiDirectionalScrollController::OperationInfo |
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedIconTestHooks Member List

This is the complete list of members for AnimatedIconTestHooks, including all inherited members.
EnsureGlobalTestHooks() | AnimatedIconTestHooks | [static]
GetGlobalTestHooks() | AnimatedIconTestHooks | [inline, static]
GetLastAnimationSegment(const winrt::AnimatedIcon &animatedIcon) | AnimatedIconTestHooks | [static]
GetLastAnimationSegmentEnd(const winrt::AnimatedIcon &animatedIcon) | AnimatedIconTestHooks | [static]
GetLastAnimationSegmentStart(const winrt::AnimatedIcon &animatedIcon) | AnimatedIconTestHooks | [static]
LastAnimationSegmentChanged(winrt::TypedEventHandler< winrt::AnimatedIcon, winrt::IInspectable > const &value) | AnimatedIconTestHooks | [static]
LastAnimationSegmentChanged(winrt::event_token const &token) | AnimatedIconTestHooks | [static]
m_lastAnimationSegmentChangedEventSource | AnimatedIconTestHooks | [private]
NotifyLastAnimationSegmentChanged(const winrt::AnimatedIcon &sender) | AnimatedIconTestHooks | [static]
s_testHooks | AnimatedIconTestHooks | [private, static]
SetAnimationQueueBehavior(const winrt::AnimatedIcon &animatedIcon, winrt::AnimatedIconAnimationQueueBehavior behavior) | AnimatedIconTestHooks | [static]
SetDurationMultiplier(const winrt::AnimatedIcon &animatedIcon, float multiplier) | AnimatedIconTestHooks | [static]
SetQueueLength(const winrt::AnimatedIcon &animatedIcon, int length) | AnimatedIconTestHooks | [static]
SetSpeedUpMultiplier(const winrt::AnimatedIcon &animatedIcon, float multiplier) | AnimatedIconTestHooks | [static]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemContainerTests Member List

This is the complete list of members for ItemContainerTests, including all inherited members.
ClassInitialize(TestContext testContext) | ItemContainerTests | [inline, static]
IsItemContainerSelected() | ItemContainerTests | [inline, private]
ItemContainerCanUserSelect() | ItemContainerTests | [inline]
TestCleanup() | ItemContainerTests | [inline]
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewListAutomationPeer.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewListAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeViewList.h"
00007 #include "TreeViewListAutomationPeer.h"
00008 #include "TreeViewItemDataAutomationPeer.h"
00009
00010 #include "TreeViewListAutomationPeer.properties.cpp"
00011
00012 TreeViewListAutomationPeer::TreeViewListAutomationPeer(winrt::TreeViewList const& owner)
00013     : ReferenceTracker(owner)
00014 {
00015 }
00016
00017 //IItemsControlAutomationPeerOverrides2
00018 winrt::ItemAutomationPeer TreeViewListAutomationPeer::OnCreateItemAutomationPeer(winrt::IInspectable const& item)
00019 {
00020     winrt::TreeViewItemDataAutomationPeer itemPeer{ item, *this };
00021     return itemPeer;
00022 }
00023
00024 //DropTargetProvider
00025 winrt::hstring TreeViewListAutomationPeer::DropEffect()
00026 {
00027     return winrt::get_self<TreeViewList>(Owner().as<winrt::TreeViewList>())->GetDropTargetDropEffect();
00028 }
00029
00030 winrt::com_array<winrt::hstring> TreeViewListAutomationPeer::DropEffects()
00031 {
00032     throw winrt::hresult_not_implemented();
00033 }
00034
00035 winrt::IInspectable TreeViewListAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00036 {
00037     if (patternInterface == winrt::PatternInterface::DropTarget ||
00038        (patternInterface == winrt::PatternInterface::Selection && IsMultiselect()))
00039     {
00040         return *this;
00041     }
00042
00043     return __super::GetPatternCore(patternInterface);
00044 }
00045
00046 winrt::AutomationControlType TreeViewListAutomationPeer::GetAutomationControlTypeCore()
00047 {
00048     return winrt::AutomationControlType::Tree;
00049 }
00050
00051 // ISelectionProvider
00052 bool TreeViewListAutomationPeer::CanSelectMultiple()
00053 {
00054     return IsMultiselect()? true: __super::CanSelectMultiple();
00055 }
00056
00057 bool TreeViewListAutomationPeer::IsSelectionRequired()
00058 {
00059     return false;
00060 }
00061
00062 winrt::com_array<winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple> TreeViewListAutomationPeer::GetSelection()
00063 {
00064     // The selected items might be collapsed, virtualized, so getting an accurate list of selected items is not possible.
00065     return {};
00066 }
00067
00068 bool TreeViewListAutomationPeer::IsMultiselect()
00069 {
00070     return winrt::get_self<TreeViewList>(Owner().as<winrt::TreeViewList>())->IsMultiselect();
00071 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarAxeTestPage Member List

This is the complete list of members for BreadcrumbBarAxeTestPage, including all inherited members.
BreadcrumbBarAxeTestPage() | BreadcrumbBarAxeTestPage | [inline]
breadCrumbList | BreadcrumbBarAxeTestPage |
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTip.idl Source File

  • File List
  • File Members
  • TeachingTip

TeachingTip.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 enum TeachingTipTailVisibility
00007 {
00008     Auto,
00009     Visible,
00010     Collapsed,
00011 };
00012
00013 [MUX_PUBLIC]
00014 [webhosthidden]
00015 enum TeachingTipCloseReason
00016 {
00017     CloseButton,
00018     LightDismiss,
00019     Programmatic,
00020 };
00021
00022 [MUX_PUBLIC]
00023 [webhosthidden]
00024 enum TeachingTipPlacementMode
00025 {
00026     Auto,
00027     Top,
00028     Bottom,
00029     Left,
00030     Right,
00031     TopRight,
00032     TopLeft,
00033     BottomRight,
00034     BottomLeft,
00035     LeftTop,
00036     LeftBottom,
00037     RightTop,
00038     RightBottom,
00039     Center
00040 };
00041
00042 [MUX_PUBLIC]
00043 [webhosthidden]
00044 enum TeachingTipHeroContentPlacementMode
00045 {
00046     Auto,
00047     Top,
00048     Bottom,
00049 };
00050
00051 [MUX_PUBLIC]
00052 [webhosthidden]
00053 runtimeclass TeachingTipClosedEventArgs
00054 {
00055     TeachingTipCloseReason Reason{ get; };
00056 };
00057
00058 [MUX_PUBLIC]
00059 [webhosthidden]
00060 runtimeclass TeachingTipClosingEventArgs
00061 {
00062     TeachingTipCloseReason Reason{ get; };
00063     Boolean Cancel;
00064     Windows.Foundation.Deferral GetDeferral();
00065 };
00066
00067 [MUX_PUBLIC]
00068 [webhosthidden]
00069 unsealed runtimeclass TeachingTipTemplateSettings : Microsoft.UI.Xaml.DependencyObject
00070 {
00071     TeachingTipTemplateSettings();
00072
00073     Microsoft.UI.Xaml.Thickness TopRightHighlightMargin;
00074     Microsoft.UI.Xaml.Thickness TopLeftHighlightMargin;
00075
00076     Microsoft.UI.Xaml.Controls.IconElement IconElement;
00077
00078     static Microsoft.UI.Xaml.DependencyProperty TopRightHighlightMarginProperty{ get; };
00079     static Microsoft.UI.Xaml.DependencyProperty TopLeftHighlightMarginProperty{ get; };
00080     static Microsoft.UI.Xaml.DependencyProperty IconElementProperty{ get; };
00081 }
00082
00083 [MUX_PUBLIC]
00084 [webhosthidden]
00085 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00086 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00087 unsealed runtimeclass TeachingTip : Microsoft.UI.Xaml.Controls.ContentControl
00088 {
00089     TeachingTip();
00090
00091     String Title;
00092     String Subtitle;
00093
00094     [MUX_DEFAULT_VALUE("false")]
00095     Boolean IsOpen;
00096
00097     Microsoft.UI.Xaml.FrameworkElement Target;
00098
00099     [MUX_DEFAULT_VALUE("winrt::TeachingTipTailVisibility::Auto")]
00100     TeachingTipTailVisibility TailVisibility;
00101
00102     Object ActionButtonContent;
00103     Microsoft.UI.Xaml.Style ActionButtonStyle;
00104     Microsoft.UI.Xaml.Input.ICommand ActionButtonCommand;
00105     Object ActionButtonCommandParameter;
00106
00107     Object CloseButtonContent;
00108     Microsoft.UI.Xaml.Style CloseButtonStyle;
00109     Microsoft.UI.Xaml.Input.ICommand CloseButtonCommand;
00110     Object CloseButtonCommandParameter;
00111
00112     Microsoft.UI.Xaml.Thickness PlacementMargin;
00113     [MUX_DEFAULT_VALUE("true")]
00114     Boolean ShouldConstrainToRootBounds;
00115     [MUX_DEFAULT_VALUE("false")]
00116     Boolean IsLightDismissEnabled;
00117     [MUX_DEFAULT_VALUE("winrt::TeachingTipPlacementMode::Auto")]
00118     TeachingTipPlacementMode PreferredPlacement;
00119     [MUX_DEFAULT_VALUE("winrt::TeachingTipHeroContentPlacementMode::Auto")]
00120     TeachingTipHeroContentPlacementMode HeroContentPlacement;
00121
00122     Microsoft.UI.Xaml.UIElement HeroContent;
00123     IconSource IconSource;
00124
00125     TeachingTipTemplateSettings TemplateSettings{ get; };
00126
00127     event Windows.Foundation.TypedEventHandler<TeachingTip, Object> ActionButtonClick;
00128     event Windows.Foundation.TypedEventHandler<TeachingTip, Object> CloseButtonClick;
00129     event Windows.Foundation.TypedEventHandler<TeachingTip, TeachingTipClosingEventArgs> Closing;
00130     event Windows.Foundation.TypedEventHandler<TeachingTip, TeachingTipClosedEventArgs> Closed;
00131
00132     static Microsoft.UI.Xaml.DependencyProperty IsOpenProperty{ get; };
00133
00134     static Microsoft.UI.Xaml.DependencyProperty TargetProperty{ get; };
00135
00136     static Microsoft.UI.Xaml.DependencyProperty TailVisibilityProperty{ get; };
00137
00138     static Microsoft.UI.Xaml.DependencyProperty TitleProperty{ get; };
00139     static Microsoft.UI.Xaml.DependencyProperty SubtitleProperty{ get; };
00140
00141     static Microsoft.UI.Xaml.DependencyProperty ActionButtonContentProperty{ get; };
00142     static Microsoft.UI.Xaml.DependencyProperty ActionButtonStyleProperty{ get; };
00143     static Microsoft.UI.Xaml.DependencyProperty ActionButtonCommandProperty{ get; };
00144     static Microsoft.UI.Xaml.DependencyProperty ActionButtonCommandParameterProperty{ get; };
00145
00146     static Microsoft.UI.Xaml.DependencyProperty CloseButtonContentProperty{ get; };
00147     static Microsoft.UI.Xaml.DependencyProperty CloseButtonStyleProperty{ get; };
00148     static Microsoft.UI.Xaml.DependencyProperty CloseButtonCommandProperty{ get; };
00149     static Microsoft.UI.Xaml.DependencyProperty CloseButtonCommandParameterProperty{ get; };
00150
00151     static Microsoft.UI.Xaml.DependencyProperty PlacementMarginProperty{ get; };
00152     static Microsoft.UI.Xaml.DependencyProperty ShouldConstrainToRootBoundsProperty{ get; };
00153     static Microsoft.UI.Xaml.DependencyProperty IsLightDismissEnabledProperty{ get; };
00154     static Microsoft.UI.Xaml.DependencyProperty PreferredPlacementProperty{ get; };
00155     static Microsoft.UI.Xaml.DependencyProperty HeroContentPlacementProperty{ get; };
00156
00157     static Microsoft.UI.Xaml.DependencyProperty HeroContentProperty{ get; };
00158     static Microsoft.UI.Xaml.DependencyProperty IconSourceProperty{ get; };
00159
00160     static Microsoft.UI.Xaml.DependencyProperty TemplateSettingsProperty{ get; };
00161 }
00162
00163 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealItem Member List

This is the complete list of members for RevealItem, including all inherited members.
Header | RevealItem
Icon | RevealItem
SubHeader | RevealItem
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewWithDataPage Member List

This is the complete list of members for ItemsViewWithDataPage, including all inherited members.
_flatData | ItemsViewWithDataPage | [private]
_flatData | ItemsViewWithDataPage | [private]
_lorem | ItemsViewWithDataPage | [private]
_oneLevelNestedData | ItemsViewWithDataPage | [private]
_oneLevelNestedData | ItemsViewWithDataPage | [private]
_pageInfo | ItemsViewWithDataPage | [private]
_twoLevelNestedData | ItemsViewWithDataPage | [private]
_twoLevelNestedData | ItemsViewWithDataPage | [private]
ItemsStretchComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
ItemsStretchComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
ItemsViewWithDataPage() | ItemsViewWithDataPage | [inline]
ItemsViewWithDataPage() | ItemsViewWithDataPage | [inline]
LineAlignmentComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
LineAlignmentComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnColumnSpacingSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnColumnSpacingSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnLayoutUpdated(object sender, object e) | ItemsViewWithDataPage | [inline, private]
OnLayoutUpdated(object sender, object e) | ItemsViewWithDataPage | [inline, private]
OnMaintainViewportSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnMaintainViewportSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnMaxRowsOrColumnsSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnMaxRowsOrColumnsSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnNavigatedTo(NavigationEventArgs e) | ItemsViewWithDataPage | [inline, protected]
OnNavigatedTo(NavigationEventArgs e) | ItemsViewWithDataPage | [inline, protected]
OnRecipeDeleted(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnRecipeDeleted(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnRecipeInserted(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnRecipeInserted(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnRendering(object sender, object e) | ItemsViewWithDataPage | [inline, private]
OnRendering(object sender, object e) | ItemsViewWithDataPage | [inline, private]
OnResizeMeButtonClick(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnResizeMeButtonClick(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnRowSpacingSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnRowSpacingSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnScrollButtonClicked(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
OnScrollButtonClicked(object sender, RoutedEventArgs e) | ItemsViewWithDataPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/SpectrumBrush.h Source File

  • File List
  • File Members
  • ColorPicker

SpectrumBrush.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "MaterialHelper.h"
00007
00008 #include "SpectrumBrush.g.h"
00009 #include "SpectrumBrush.properties.h"
00010
00011 #pragma warning(push)
00012 #pragma warning(disable: 6101)  // Returning uninitialized memory '<value>'.  A successful path through the function does not set the named _Out_ parameter.
00013 #include <Microsoft.UI.Private.Composition.Effects_impl.h>
00014 #pragma warning(pop)
00015
00016
00017 class SpectrumBrush :
00018     public ReferenceTracker<SpectrumBrush, winrt::implementation::SpectrumBrushT, winrt::composable>,
00019     public SpectrumBrushProperties
00020 {
00021 public:
00022     // IXamlCompositionBrushOverrides
00023     void OnConnected();
00024     void OnDisconnected();
00025
00026     // Property changed handler
00027     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00028
00029 private:
00030
00031     void CreateSpectrumBrush();
00032     void UpdateSpectrumBrush();
00033
00034     bool m_isConnected{ false };
00035
00036     winrt::CompositionSurfaceBrush m_minSurfaceBrush{ nullptr };
00037     winrt::CompositionSurfaceBrush m_maxSurfaceBrush{ nullptr };
00038
00039     com_ptr<Microsoft::UI::Private::Composition::Effects::CrossFadeEffect> m_brushEffect{ nullptr };
00040     winrt::CompositionEffectBrush m_brush{ nullptr };
00041 };
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewTrace Member List

This is the complete list of members for ScrollViewTrace, including all inherited members.
s_IsDebugOutputEnabled | ScrollViewTrace | [static]
s_IsVerboseDebugOutputEnabled | ScrollViewTrace | [static]
TraceInfo(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ScrollViewTrace | [inline, static]
TracePerfInfo(PCWSTR info) noexcept | ScrollViewTrace | [inline, static]
TraceVerbose(bool includeTraceLogging, const winrt::IInspectable &sender, PCWSTR message,...) noexcept | ScrollViewTrace | [inline, static]
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockIAnimatedIconSource2 Member List

This is the complete list of members for MockIAnimatedIconSource2, including all inherited members.
markers | MockIAnimatedIconSource2 | [private]
Markers | MockIAnimatedIconSource2 |
MockIAnimatedIconSource2() | MockIAnimatedIconSource2 | [inline]
SetColorProperty(string propertyName, Color value) | MockIAnimatedIconSource2 | [inline]
TryCreateAnimatedVisual(Compositor compositor, out object diagnostics) | MockIAnimatedIconSource2 | [inline]
visual | MockIAnimatedIconSource2 | [private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipTestHooks.idl Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipTestHooks.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [default_interface]
00006 [webhosthidden]
00007 runtimeclass TeachingTipTestHooks
00008 {
00009     static void SetExpandEasingFunction(MU_XC_NAMESPACE.TeachingTip teachingTip, Microsoft.UI.Composition.CompositionEasingFunction easingFunction);
00010     static void SetContractEasingFunction(MU_XC_NAMESPACE.TeachingTip teachingTip, Microsoft.UI.Composition.CompositionEasingFunction easingFunction);
00011     static void SetTipShouldHaveShadow(MU_XC_NAMESPACE.TeachingTip teachingTip, Boolean tipShouldHaveShadow);
00012     static void SetContentElevation(MU_XC_NAMESPACE.TeachingTip teachingTip, Single elevation);
00013     static void SetTailElevation(MU_XC_NAMESPACE.TeachingTip teachingTip, Single elevation);
00014     static void SetUseTestScreenBounds(MU_XC_NAMESPACE.TeachingTip teachingTip, Boolean useTestScreenBounds);
00015     static void SetTestScreenBounds(MU_XC_NAMESPACE.TeachingTip teachingTip, Windows.Foundation.Rect testScreenBounds);
00016     static void SetUseTestWindowBounds(MU_XC_NAMESPACE.TeachingTip teachingTip, Boolean useTestWindowBounds);
00017     static void SetTestWindowBounds(MU_XC_NAMESPACE.TeachingTip teachingTip, Windows.Foundation.Rect testWindowBounds);
00018     static void SetTipFollowsTarget(MU_XC_NAMESPACE.TeachingTip teachingTip, Boolean tipFollowsTarget);
00019     static void SetReturnTopForOutOfWindowPlacement(MU_XC_NAMESPACE.TeachingTip teachingTip, Boolean returnTopForOutOfWindowPlacement);
00020     static void SetExpandAnimationDuration(MU_XC_NAMESPACE.TeachingTip teachingTip, Windows.Foundation.TimeSpan animationDurationMultiplier);
00021     static void SetContractAnimationDuration(MU_XC_NAMESPACE.TeachingTip teachingTip, Windows.Foundation.TimeSpan animationDurationMultiplier);
00022
00023     static Boolean GetIsIdle(MU_XC_NAMESPACE.TeachingTip teachingTip);
00024     static MU_XC_NAMESPACE.TeachingTipPlacementMode GetEffectivePlacement(MU_XC_NAMESPACE.TeachingTip teachingTip);
00025     static MU_XC_NAMESPACE.TeachingTipHeroContentPlacementMode GetEffectiveHeroContentPlacement(MU_XC_NAMESPACE.TeachingTip teachingTip);
00026     static Double GetVerticalOffset(MU_XC_NAMESPACE.TeachingTip teachingTip);
00027     static Double GetHorizontalOffset(MU_XC_NAMESPACE.TeachingTip teachingTip);
00028     static Microsoft.UI.Xaml.Visibility GetTitleVisibility(MU_XC_NAMESPACE.TeachingTip teachingTip);
00029     static Microsoft.UI.Xaml.Visibility GetSubtitleVisibility(MU_XC_NAMESPACE.TeachingTip teachingTip);
00030
00031     static Microsoft.UI.Xaml.Controls.Primitives.Popup GetPopup(MU_XC_NAMESPACE.TeachingTip teachingTip);
00032
00033     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.TeachingTip, Object> OpenedStatusChanged;
00034     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.TeachingTip, Object> IdleStatusChanged;
00035     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.TeachingTip, Object> OffsetChanged;
00036     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.TeachingTip, Object> EffectivePlacementChanged;
00037     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.TeachingTip, Object> EffectiveHeroContentPlacementChanged;
00038     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.TeachingTip, Object> TitleVisibilityChanged;
00039     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.TeachingTip, Object> SubtitleVisibilityChanged;
00040 }
00041
00042 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/CppWinRTHelpers.h Source File

  • File List
  • File Members
  • inc

CppWinRTHelpers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 using winrt::com_ptr;
00006 using winrt::weak_ref;
00007 using winrt::hstring;
00008 using std::wstring_view;
00009
00010 namespace winrt
00011 {
00012     template <typename T>
00013     inline hstring hstring_name_of() noexcept
00014     {
00015         return hstring(winrt::name_of<T>());
00016     }
00017 }
00018
00019 inline winrt::IInspectable& to_winrt(::IInspectable*& instance)
00020 {
00021     return reinterpret_cast<winrt::IInspectable&>(instance);
00022 }
00023
00024 inline winrt::DependencyProperty InitializeDependencyProperty(
00025     wstring_view const& propertyNameString,
00026     wstring_view const& propertyTypeNameString,
00027     wstring_view const& ownerTypeNameString,
00028     bool isAttached,
00029     winrt::IInspectable const& defaultValue,
00030     winrt::PropertyChangedCallback const& propertyChangedCallback = nullptr)
00031 {
00032     auto propertyType = winrt::TypeName();
00033     propertyType.Name = propertyTypeNameString;
00034     propertyType.Kind = winrt::TypeKind::Metadata;
00035
00036     auto ownerType = winrt::TypeName();
00037     ownerType.Name = ownerTypeNameString;
00038     ownerType.Kind = winrt::TypeKind::Metadata;
00039
00040     auto propertyMetadata = winrt::PropertyMetadata(defaultValue, propertyChangedCallback);
00041
00042     if (isAttached)
00043     {
00044         return winrt::DependencyProperty::RegisterAttached(propertyNameString, propertyType, ownerType, propertyMetadata);
00045     }
00046     else
00047     {
00048         return winrt::DependencyProperty::Register(propertyNameString, propertyType, ownerType, propertyMetadata);
00049     }
00050 }
00051
00052 // Helper to provide default values and boxing without differences at the call sites
00053 template <typename T, typename Enable = void>
00054 struct ValueHelper
00055 {
00056     static T GetDefaultValue()
00057     {
00058         T defaultValue = T{};
00059         return defaultValue;
00060     }
00061
00062     static winrt::IInspectable BoxValueIfNecessary(T const& value)
00063     {
00064         return winrt::box_value(value);
00065     }
00066
00067     static T CastOrUnbox(winrt::IInspectable const& value)
00068     {
00069         return winrt::unbox_value<T>(value);
00070     }
00071
00072     static winrt::IInspectable BoxedDefaultValue()
00073     {
00074         return BoxValueIfNecessary(GetDefaultValue());
00075     }
00076 };
00077
00078 template <typename T>
00079 struct ValueHelper<T, std::enable_if_t<std::is_base_of_v<winrt::Windows::Foundation::IUnknown, T>>>
00080 {
00081     static T GetDefaultValue()
00082     {
00083         return T{ nullptr };
00084     }
00085
00086     static winrt::IInspectable BoxValueIfNecessary(T const& value)
00087     {
00088         return value;
00089     }
00090
00091     static T CastOrUnbox(winrt::IInspectable const& value)
00092     {
00093         return value.as<T>();
00094     }
00095
00096     static winrt::IInspectable BoxedDefaultValue()
00097     {
00098         return GetDefaultValue();
00099     }
00100 };
00101
00102 template <>
00103 struct ValueHelper<winrt::hstring, void>
00104 {
00105     static winrt::hstring GetDefaultValue()
00106     {
00107         return winrt::hstring{ L"" };
00108     }
00109
00110     static winrt::IInspectable BoxValueIfNecessary(winrt::hstring const& value)
00111     {
00112         return winrt::box_value(value);
00113     }
00114
00115     static winrt::hstring CastOrUnbox(winrt::IInspectable const& value)
00116     {
00117         return winrt::unbox_value<winrt::hstring>(value);
00118     }
00119
00120     static winrt::IInspectable BoxedDefaultValue()
00121     {
00122         return winrt::box_value(L"");
00123     }
00124 };
00125
00126 void SetDefaultStyleKeyWorker(winrt::IControlProtected const& controlProtected, std::wstring_view const& className);
00127
00128 template <typename TThis>
00129 void SetDefaultStyleKey(TThis *pThis)
00130 {
00131     SetDefaultStyleKeyWorker(*pThis, pThis->GetRuntimeClassName());
00132 }
00133
00134 template<typename WinRTReturn>
00135 WinRTReturn GetTemplateChildT(std::wstring_view const& childName, const winrt::IControlProtected& controlProtected)
00136 {
00137     winrt::DependencyObject childAsDO(controlProtected.GetTemplateChild(childName));
00138
00139     if (childAsDO)
00140     {
00141         return childAsDO.try_as<WinRTReturn>();
00142     }
00143     return nullptr;
00144 }
00145
00146 struct ScopedBatchCompleted_revoker
00147 {
00148     ScopedBatchCompleted_revoker() noexcept = default;
00149     ScopedBatchCompleted_revoker(ScopedBatchCompleted_revoker const&) = delete;
00150     ScopedBatchCompleted_revoker& operator=(ScopedBatchCompleted_revoker const&) = delete;
00151     ScopedBatchCompleted_revoker(ScopedBatchCompleted_revoker&& other) noexcept
00152     {
00153         move_from(other);
00154     }
00155
00156     ScopedBatchCompleted_revoker& operator=(ScopedBatchCompleted_revoker&& other) noexcept
00157     {
00158         move_from(other);
00159         return *this;
00160     }
00161
00162     ScopedBatchCompleted_revoker(winrt::CompositionScopedBatch const& batch, winrt::event_token token) :
00163         m_batch(batch),
00164         m_token(token)
00165     {}
00166
00167     ~ScopedBatchCompleted_revoker() noexcept
00168     {
00169         revoke();
00170     }
00171
00172     void revoke() noexcept
00173     {
00174         if (!m_batch)
00175         {
00176             return;
00177         }
00178
00179         m_batch.Completed(m_token);
00180         m_batch = nullptr;
00181     }
00182
00183     explicit operator bool() const noexcept
00184     {
00185         return static_cast<bool>(m_batch);
00186     }
00187 private:
00188     void move_from(ScopedBatchCompleted_revoker& other)
00189     {
00190         if (this != &other)
00191         {
00192             revoke();
00193             m_batch = other.m_batch;
00194             m_token = other.m_token;
00195             other.m_batch = nullptr;
00196             other.m_token.value = 0;
00197         }
00198     }
00199
00200     winrt::CompositionScopedBatch m_batch{nullptr};
00201     winrt::event_token m_token{};
00202 };
00203
00204 inline ScopedBatchCompleted_revoker RegisterScopedBatchCompleted(winrt::CompositionScopedBatch const& object, winrt::TypedEventHandler<winrt::IInspectable, winrt::CompositionBatchCompletedEventArgs> const& handler)
00205 {
00206     const auto value = object.Completed(handler);
00207     return { object, value };
00208 }
00209
00210 // Hold a strong ref to the xamlRoot while we're registered so that the changed revoker works.
00211 // This can be removed when internal bug #21302432 is fixed.
00212 struct XamlRootChanged_revoker
00213 {
00214     XamlRootChanged_revoker() noexcept = default;
00215     XamlRootChanged_revoker(XamlRootChanged_revoker const&) = delete;
00216     XamlRootChanged_revoker& operator=(XamlRootChanged_revoker const&) = delete;
00217     XamlRootChanged_revoker(XamlRootChanged_revoker&& other) noexcept
00218     {
00219         move_from(other);
00220     }
00221
00222     XamlRootChanged_revoker& operator=(XamlRootChanged_revoker&& other) noexcept
00223     {
00224         move_from(other);
00225         return *this;
00226     }
00227
00228     XamlRootChanged_revoker(winrt::XamlRoot const& object, winrt::event_token token) :
00229         m_object(object),
00230         m_token(token)
00231     {}
00232
00233     ~XamlRootChanged_revoker() noexcept
00234     {
00235         revoke();
00236     }
00237
00238     void revoke() noexcept
00239     {
00240         if (!m_object)
00241         {
00242             return;
00243         }
00244
00245         m_object.Changed(m_token);
00246         m_object = nullptr;
00247     }
00248
00249     explicit operator bool() const noexcept
00250     {
00251         return static_cast<bool>(m_object);
00252     }
00253 private:
00254     void move_from(XamlRootChanged_revoker& other)
00255     {
00256         if (this != &other)
00257         {
00258             revoke();
00259             m_object = other.m_object;
00260             m_token = other.m_token;
00261             other.m_object = nullptr;
00262             other.m_token.value = 0;
00263         }
00264     }
00265
00266     winrt::XamlRoot m_object{ nullptr };
00267     winrt::event_token m_token{};
00268 };
00269
00270 inline XamlRootChanged_revoker RegisterXamlRootChanged(winrt::XamlRoot const& object, winrt::TypedEventHandler<winrt::XamlRoot, winrt::XamlRootChangedEventArgs> const& handler)
00271 {
00272     const auto value = object.Changed(handler);
00273     return { object, value };
00274 }
00275
00276 struct PropertyChanged_revoker
00277 {
00278    PropertyChanged_revoker() noexcept = default;
00279    PropertyChanged_revoker(PropertyChanged_revoker const&) = delete;
00280    PropertyChanged_revoker& operator=(PropertyChanged_revoker const&) = delete;
00281    PropertyChanged_revoker(PropertyChanged_revoker&& other) noexcept
00282    {
00283        move_from(other);
00284    }
00285
00286    PropertyChanged_revoker& operator=(PropertyChanged_revoker&& other) noexcept
00287    {
00288        move_from(other);
00289        return *this;
00290    }
00291
00292    PropertyChanged_revoker(winrt::DependencyObject const& object, const winrt::DependencyProperty&  dp, int64_t token) :
00293         m_object(object),
00294         m_property(dp),
00295         m_token(token)
00296     {}
00297
00298     ~PropertyChanged_revoker() noexcept
00299     {
00300         revoke();
00301     }
00302
00303     void revoke() noexcept
00304     {
00305         if (!m_object)
00306         {
00307             return;
00308         }
00309
00310         if (auto object = m_object.get())
00311         {
00312             object.UnregisterPropertyChangedCallback(m_property, m_token);
00313         }
00314
00315         m_object = nullptr;
00316     }
00317
00318     explicit operator bool() const noexcept
00319     {
00320         return static_cast<bool>(m_object);
00321     }
00322 private:
00323     void move_from(PropertyChanged_revoker& other)
00324     {
00325         if (this != &other)
00326         {
00327             revoke();
00328             m_object = other.m_object;
00329             m_token = other.m_token;
00330             m_property = other.m_property;
00331             other.m_object = nullptr;
00332             other.m_token = 0;
00333             other.m_property = nullptr;
00334         }
00335     }
00336
00337     weak_ref<winrt::DependencyObject> m_object;
00338     winrt::DependencyProperty m_property{ nullptr };
00339     int64_t m_token{};
00340 };
00341
00342
00343
00344 inline PropertyChanged_revoker RegisterPropertyChanged(winrt::DependencyObject const& object, winrt::DependencyProperty const& dp, winrt::DependencyPropertyChangedCallback const& callback)
00345 {
00346     const auto value = object.RegisterPropertyChangedCallback(dp, callback);
00347     return { object, dp, value };
00348 }
00349
00350
00351 inline bool SetFocus(winrt::DependencyObject const& object, winrt::FocusState focusState)
00352 {
00353     if (object)
00354     {
00355         auto result = winrt::FocusManager::TryFocusAsync(object, focusState);
00356         if (result.Status() == winrt::AsyncStatus::Completed)
00357         {
00358             return result.GetResults().Succeeded();
00359         }
00360         // Operation was async, let's assume it worked.
00361         return true;
00362     }
00363
00364     return false;
00365 }
00366
00367 // This type exists for types that in metadata derive from FrameworkElement but internally want to derive from Panel
00368 // to get "protected" Children.
00369 //
00370 // Using it is just like any other winrt::implementation::FooT type *except* that you must pass some additional parameters:
00371 // (1) The winrt::Foo type AND
00372 // (2) Any versioned interfaces winrt::IFoo2, winrt::IFoo3, etc that the type implements
00373 //
00374 // Most times you will be using ReferenceTracker too so that pattern would look like:
00375 // class YourType : ReferenceTracker<YourType, DeriveFromPanelHelper_base, winrt::YourType, winrt::IYourType2>  <--- note the extra winrt::YourType here that's normally not needed.
00376 template <typename D, typename T, typename ... I>
00377 struct __declspec(empty_bases) DeriveFromPanelHelper_base : winrt::Microsoft::UI::Xaml::Controls::PanelT<D, winrt::default_interface<T>, winrt::composable, I...>
00378 {
00379     using composable = T;
00380     using class_type = typename T;
00381
00382     operator class_type() const noexcept
00383     {
00384         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00385     }
00386
00387     hstring GetRuntimeClassName() const
00388     {
00389         return hstring{ winrt::name_of<T>() };
00390     }
00391 };
00392
00393 template <typename D, typename T, typename ... I>
00394 struct __declspec(empty_bases)DeriveFromBitmapIconHelper_base : winrt::Microsoft::UI::Xaml::Controls::BitmapIconT<D, winrt::default_interface<T>, winrt::composable, I...>
00395 {
00396     using composable = T;
00397     using class_type = typename T;
00398
00399     operator class_type() const noexcept
00400     {
00401         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00402     }
00403
00404     hstring GetRuntimeClassName() const
00405     {
00406         return hstring{ winrt::name_of<T>() };
00407     }
00408 };
00409
00410 template <typename D, typename T, typename ... I>
00411 struct __declspec(empty_bases)DeriveFromPathIconHelper_base : winrt::Microsoft::UI::Xaml::Controls::PathIconT<D, winrt::default_interface<T>, winrt::composable, I...>
00412 {
00413     using composable = T;
00414     using class_type = typename T;
00415
00416     operator class_type() const noexcept
00417     {
00418         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00419     }
00420
00421     hstring GetRuntimeClassName() const
00422     {
00423         return hstring{ winrt::name_of<T>() };
00424     }
00425 };
00426
00427 template <typename D, typename T, typename ... I>
00428 struct __declspec(empty_bases)DeriveFromBitmapIconSourceHelper_base : winrt::Microsoft::UI::Xaml::Controls::BitmapIconSourceT<D, winrt::default_interface<T>, winrt::composable, I...>
00429 {
00430     using composable = T;
00431     using class_type = typename T;
00432
00433     operator class_type() const noexcept
00434     {
00435         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00436     }
00437
00438     hstring GetRuntimeClassName() const
00439     {
00440         return hstring{ winrt::name_of<T>() };
00441     }
00442 };
00443
00444 template <typename D, typename T, typename ... I>
00445 struct __declspec(empty_bases)DeriveFromPathIconSourceHelper_base : winrt::Microsoft::UI::Xaml::Controls::PathIconSourceT<D, winrt::default_interface<T>, winrt::composable, I...>
00446 {
00447     using composable = T;
00448     using class_type = typename T;
00449
00450     operator class_type() const noexcept
00451     {
00452         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00453     }
00454
00455     hstring GetRuntimeClassName() const
00456     {
00457         return hstring{ winrt::name_of<T>() };
00458     }
00459 };
00460
00461 template <typename D, typename T, typename ... I>
00462 struct __declspec(empty_bases) DeriveFromRangeBaseHelper_base : winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseT<D, winrt::default_interface<T>, winrt::composable, I...>
00463 {
00464     using composable = T;
00465     using class_type = typename T;
00466
00467     operator class_type() const noexcept
00468     {
00469         return static_cast<winrt::IInspectable>(*this).as<class_type>();
00470     }
00471
00472     hstring GetRuntimeClassName() const
00473     {
00474         return hstring{ winrt::name_of<T>() };
00475     }
00476 };
00477
00478 //
00479 // An awaitable object. Completes when the CompleteAwaits() method is called.
00480 // cf. .NET's TaskCompletionSource.
00481 //
00482 struct Awaitable
00483 {
00484     Awaitable()
00485     {
00486         m_signal.attach(::CreateEvent(nullptr, true, false, nullptr));
00487     }
00488
00489     // Awaitable contract.
00490     // Blocks until the awaitable is completed, or error.
00491     bool await_ready() const noexcept
00492     {
00493         return ::WaitForSingleObject(m_signal.get(), 0) == 0;
00494     }
00495
00496     // Registers a callback that will be called when the awaitable is completed.
00497     void await_suspend(std::experimental::coroutine_handle<> resume)
00498     {
00499         m_wait.attach(
00500             winrt::check_pointer(
00501                 ::CreateThreadpoolWait(CoroutineCompletedCallback, resume.address(), nullptr)
00502             )
00503         );
00504         ::SetThreadpoolWait(m_wait.get(), m_signal.get(), nullptr);
00505     }
00506
00507     // Called to get the value of the awaitable.
00508     // This awaitable has no value, so nothing to do.
00509     void await_resume() const noexcept { }
00510
00511 protected:
00512     void CompleteAwaits() const noexcept
00513     {
00514         ::SetEvent(m_signal.get());
00515     }
00516
00517 private:
00518     static void __stdcall CoroutineCompletedCallback(PTP_CALLBACK_INSTANCE, void* context, PTP_WAIT, TP_WAIT_RESULT) noexcept
00519     {
00520         // Resumes anyone waiting on the awaitable.
00521         std::experimental::coroutine_handle<>::from_address(context)();
00522     }
00523
00524     //
00525     // Describes a PTP_WAIT.
00526     //
00527     struct PTP_WAIT_traits
00528     {
00529         using type = PTP_WAIT;
00530
00531         static void close(type value) noexcept
00532         {
00533             ::CloseThreadpoolWait(value);
00534         }
00535
00536         static constexpr type invalid() noexcept
00537         {
00538             return nullptr;
00539         }
00540     };
00541     winrt::handle m_signal;
00542     winrt::handle_type<PTP_WAIT_traits> m_wait;
00543 };
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CornerRadiusFilterConverterProperties Member List

This is the complete list of members for CornerRadiusFilterConverterProperties, including all inherited members.
ClearProperties() | CornerRadiusFilterConverterProperties | [static]
CornerRadiusFilterConverterProperties() | CornerRadiusFilterConverterProperties |
EnsureProperties() | CornerRadiusFilterConverterProperties | [static]
Filter(winrt::CornerRadiusFilterKind const &value) | CornerRadiusFilterConverterProperties |
Filter() | CornerRadiusFilterConverterProperties |
FilterProperty() | CornerRadiusFilterConverterProperties | [inline, static]
s_FilterProperty | CornerRadiusFilterConverterProperties | [static]
s_ScaleProperty | CornerRadiusFilterConverterProperties | [static]
Scale(double value) | CornerRadiusFilterConverterProperties |
Scale() | CornerRadiusFilterConverterProperties |
ScaleProperty() | CornerRadiusFilterConverterProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBarPanelProperties Member List

This is the complete list of members for InfoBarPanelProperties, including all inherited members.
ClearProperties() | InfoBarPanelProperties | [static]
EnsureProperties() | InfoBarPanelProperties | [static]
GetHorizontalOrientationMargin(winrt::DependencyObject const &target) | InfoBarPanelProperties | [static]
GetVerticalOrientationMargin(winrt::DependencyObject const &target) | InfoBarPanelProperties | [static]
HorizontalOrientationMarginProperty() | InfoBarPanelProperties | [inline, static]
HorizontalOrientationPadding(winrt::Thickness const &value) | InfoBarPanelProperties |
HorizontalOrientationPadding() | InfoBarPanelProperties |
HorizontalOrientationPaddingProperty() | InfoBarPanelProperties | [inline, static]
InfoBarPanelProperties() | InfoBarPanelProperties |
s_HorizontalOrientationMarginProperty | InfoBarPanelProperties | [static]
s_HorizontalOrientationPaddingProperty | InfoBarPanelProperties | [static]
s_VerticalOrientationMarginProperty | InfoBarPanelProperties | [static]
s_VerticalOrientationPaddingProperty | InfoBarPanelProperties | [static]
SetHorizontalOrientationMargin(winrt::DependencyObject const &target, winrt::Thickness const &value) | InfoBarPanelProperties | [static]
SetVerticalOrientationMargin(winrt::DependencyObject const &target, winrt::Thickness const &value) | InfoBarPanelProperties | [static]
VerticalOrientationMarginProperty() | InfoBarPanelProperties | [inline, static]
VerticalOrientationPadding(winrt::Thickness const &value) | InfoBarPanelProperties |
VerticalOrientationPadding() | InfoBarPanelProperties |
VerticalOrientationPaddingProperty() | InfoBarPanelProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapControl.idl Source File

  • File List
  • File Members
  • MapControl

MapControl.idl

Go to the documentation of this file.
00001 namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC_V6]
00005 [webhosthidden]
00006 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00007 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00008 unsealed runtimeclass MapControl : Microsoft.UI.Xaml.Controls.Control
00009 {
00010     MapControl();
00011
00012     String MapServiceToken{ get;set; };
00013     Windows.Devices.Geolocation.Geopoint Center{ get;set; };
00014     Windows.Foundation.Collections.IVector<MapLayer> Layers{ get;set; };
00015     Double ZoomLevel{ get;set; };
00016     Boolean InteractiveControlsVisible{ get;set; };
00017
00018     static Microsoft.UI.Xaml.DependencyProperty LayersProperty{ get; };
00019     static Microsoft.UI.Xaml.DependencyProperty MapServiceTokenProperty{ get; };
00020     static Microsoft.UI.Xaml.DependencyProperty CenterProperty{ get; };
00021     static Microsoft.UI.Xaml.DependencyProperty ZoomLevelProperty{ get; };
00022     static Microsoft.UI.Xaml.DependencyProperty InteractiveControlsVisibleProperty{ get; };
00023
00024     event Windows.Foundation.TypedEventHandler<MapControl, MapElementClickEventArgs> MapElementClick;
00025     event Windows.Foundation.TypedEventHandler<MapControl, MapControlMapServiceErrorOccurredEventArgs> MapServiceErrorOccurred;
00026 }
00027
00028 [MUX_PUBLIC_V6]
00029 [webhosthidden]
00030 unsealed runtimeclass MapElement : Microsoft.UI.Xaml.DependencyObject
00031 {
00032 }
00033
00034 [MUX_PUBLIC_V6]
00035 [webhosthidden]
00036 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00037 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00038 unsealed runtimeclass MapIcon : Microsoft.UI.Xaml.Controls.MapElement
00039 {
00040     MapIcon();
00041     Windows.Devices.Geolocation.Geopoint Location{ get;set; };
00042
00043     static Microsoft.UI.Xaml.DependencyProperty LocationProperty{ get; };
00044 }
00045
00046 [MUX_PUBLIC_V6]
00047 [webhosthidden]
00048 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00049 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00050 unsealed runtimeclass MapLayer : Microsoft.UI.Xaml.DependencyObject
00051 {
00052 }
00053
00054 [MUX_PUBLIC_V6]
00055 [webhosthidden]
00056 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00057 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00058 unsealed runtimeclass MapElementsLayer : Microsoft.UI.Xaml.Controls.MapLayer
00059 {
00060     MapElementsLayer();
00061
00062     Windows.Foundation.Collections.IVector<MapElement> MapElements{ get;set; };
00063     static Microsoft.UI.Xaml.DependencyProperty MapElementsProperty{ get; };
00064
00065     event Windows.Foundation.TypedEventHandler<MapElementsLayer, MapElementClickEventArgs> MapElementClick;
00066 }
00067
00068 [MUX_PUBLIC_V6]
00069 [webhosthidden]
00070 runtimeclass MapElementClickEventArgs
00071 {
00072     Windows.Devices.Geolocation.Geopoint Location{ get; };
00073     MapElement Element{ get; };
00074 }
00075
00076 [MUX_PUBLIC_V6]
00077 [webhosthidden]
00078 runtimeclass MapControlMapServiceErrorOccurredEventArgs
00079 {
00080     String DiagnosticMessage{ get; };
00081 }
00082
00083 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/APITests/ColorPickerTests.cs Source File

  • File List
  • File Members
  • ColorPicker
  • APITests

ColorPickerTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp;
00005 using MUXControlsTestApp.Utilities;
00006 using System;
00007 using System.Numerics;
00008 using System.Collections;
00009 using System.Linq;
00010 using System.Threading;
00011 using Windows.Foundation;
00012 using Windows.UI;
00013 using Microsoft.UI.Xaml;
00014 using Microsoft.UI.Xaml.Controls;
00015 using Microsoft.UI.Xaml.Controls.Primitives;
00016 using Microsoft.UI.Xaml.Shapes;
00017 using Microsoft.UI.Xaml.Media;
00018 using Microsoft.UI.Xaml.XamlTypeInfo;
00019 using Common;
00020
00021 using WEX.TestExecution;
00022 using WEX.TestExecution.Markup;
00023 using WEX.Logging.Interop;
00024
00025 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00026 {
00027     [TestClass]
00028     public class ColorPickerTests : ApiTestBase
00029     {
00030         [TestMethod]
00031         public void ColorPickerTest()
00032         {
00033             RunOnUIThread.Execute(() =>
00034             {
00035                 ColorPicker colorPicker = new ColorPicker();
00036                 Verify.IsNotNull(colorPicker);
00037
00038                 Verify.AreEqual(Microsoft.UI.Colors.White, colorPicker.Color);
00039                 Verify.IsNull(colorPicker.PreviousColor);
00040                 Verify.IsFalse(colorPicker.IsAlphaEnabled);
00041                 Verify.IsTrue(colorPicker.IsColorSpectrumVisible);
00042                 Verify.IsTrue(colorPicker.IsColorPreviewVisible);
00043                 Verify.IsTrue(colorPicker.IsColorSliderVisible);
00044                 Verify.IsTrue(colorPicker.IsAlphaSliderVisible);
00045                 Verify.IsFalse(colorPicker.IsMoreButtonVisible);
00046                 Verify.IsTrue(colorPicker.IsColorChannelTextInputVisible);
00047                 Verify.IsTrue(colorPicker.IsAlphaTextInputVisible);
00048                 Verify.IsTrue(colorPicker.IsHexInputVisible);
00049                 Verify.AreEqual(0, colorPicker.MinHue);
00050                 Verify.AreEqual(359, colorPicker.MaxHue);
00051                 Verify.AreEqual(0, colorPicker.MinSaturation);
00052                 Verify.AreEqual(100, colorPicker.MaxSaturation);
00053                 Verify.AreEqual(0, colorPicker.MinValue);
00054                 Verify.AreEqual(100, colorPicker.MaxValue);
00055                 Verify.AreEqual(ColorSpectrumShape.Box, colorPicker.ColorSpectrumShape);
00056                 Verify.AreEqual(ColorSpectrumComponents.HueSaturation, colorPicker.ColorSpectrumComponents);
00057
00058                 // Clamping the min and max properties changes the color value,
00059                 // so let's test this new value before we change those.
00060                 colorPicker.Color = Microsoft.UI.Colors.Green;
00061                 Verify.AreEqual(Microsoft.UI.Colors.Green, colorPicker.Color);
00062
00063                 colorPicker.PreviousColor = Microsoft.UI.Colors.Red;
00064                 colorPicker.IsAlphaEnabled = true;
00065                 colorPicker.IsColorSpectrumVisible = false;
00066                 colorPicker.IsColorPreviewVisible = false;
00067                 colorPicker.IsColorSliderVisible = false;
00068                 colorPicker.IsAlphaSliderVisible = false;
00069                 colorPicker.IsMoreButtonVisible = true;
00070                 colorPicker.IsColorChannelTextInputVisible = false;
00071                 colorPicker.IsAlphaTextInputVisible = false;
00072                 colorPicker.IsHexInputVisible = false;
00073                 colorPicker.MinHue = 10;
00074                 colorPicker.MaxHue = 300;
00075                 colorPicker.MinSaturation = 10;
00076                 colorPicker.MaxSaturation = 90;
00077                 colorPicker.MinValue = 10;
00078                 colorPicker.MaxValue = 90;
00079                 colorPicker.ColorSpectrumShape = ColorSpectrumShape.Ring;
00080                 colorPicker.ColorSpectrumComponents = ColorSpectrumComponents.HueValue;
00081
00082                 Verify.AreNotEqual(Microsoft.UI.Colors.Green, colorPicker.Color);
00083                 Verify.AreEqual(Microsoft.UI.Colors.Red, colorPicker.PreviousColor);
00084                 Verify.IsTrue(colorPicker.IsAlphaEnabled);
00085                 Verify.IsFalse(colorPicker.IsColorSpectrumVisible);
00086                 Verify.IsFalse(colorPicker.IsColorPreviewVisible);
00087                 Verify.IsFalse(colorPicker.IsColorSliderVisible);
00088                 Verify.IsFalse(colorPicker.IsAlphaSliderVisible);
00089                 Verify.IsTrue(colorPicker.IsMoreButtonVisible);
00090                 Verify.IsFalse(colorPicker.IsColorChannelTextInputVisible);
00091                 Verify.IsFalse(colorPicker.IsAlphaTextInputVisible);
00092                 Verify.IsFalse(colorPicker.IsHexInputVisible);
00093                 Verify.AreEqual(10, colorPicker.MinHue);
00094                 Verify.AreEqual(300, colorPicker.MaxHue);
00095                 Verify.AreEqual(10, colorPicker.MinSaturation);
00096                 Verify.AreEqual(90, colorPicker.MaxSaturation);
00097                 Verify.AreEqual(10, colorPicker.MinValue);
00098                 Verify.AreEqual(90, colorPicker.MaxValue);
00099                 Verify.AreEqual(ColorSpectrumShape.Ring, colorPicker.ColorSpectrumShape);
00100                 Verify.AreEqual(ColorSpectrumComponents.HueValue, colorPicker.ColorSpectrumComponents);
00101             });
00102         }
00103
00104         [TestMethod]
00105         public void ColorPickerEventsTest()
00106         {
00107             RunOnUIThread.Execute(() =>
00108             {
00109                 ColorPicker colorPicker = new ColorPicker();
00110
00111                 colorPicker.ColorChanged += (ColorPicker sender, ColorChangedEventArgs args) =>
00112                 {
00113                     Verify.AreEqual(args.OldColor, Microsoft.UI.Colors.White);
00114                     Verify.AreEqual(args.NewColor, Microsoft.UI.Colors.Green);
00115                 };
00116
00117                 colorPicker.Color = Microsoft.UI.Colors.Green;
00118             });
00119         }
00120
00121         [TestMethod]
00122         public void ColorSpectrumTest()
00123         {
00124             RunOnUIThread.Execute(() =>
00125             {
00126                 ColorSpectrum colorSpectrum = new ColorSpectrum();
00127                 Verify.IsNotNull(colorSpectrum);
00128
00129                 Verify.AreEqual(Microsoft.UI.Colors.White, colorSpectrum.Color);
00130                 Verify.AreEqual(new Vector4() { X = 0.0f, Y = 0.0f, Z = 1.0f, W = 1.0f}, colorSpectrum.HsvColor);
00131                 Verify.AreEqual(0, colorSpectrum.MinHue);
00132                 Verify.AreEqual(359, colorSpectrum.MaxHue);
00133                 Verify.AreEqual(0, colorSpectrum.MinSaturation);
00134                 Verify.AreEqual(100, colorSpectrum.MaxSaturation);
00135                 Verify.AreEqual(0, colorSpectrum.MinValue);
00136                 Verify.AreEqual(100, colorSpectrum.MaxValue);
00137                 Verify.AreEqual(ColorSpectrumShape.Box, colorSpectrum.Shape);
00138                 Verify.AreEqual(ColorSpectrumComponents.HueSaturation, colorSpectrum.Components);
00139
00140                 colorSpectrum.Color = Microsoft.UI.Colors.Green;
00141                 colorSpectrum.MinHue = 10;
00142                 colorSpectrum.MaxHue = 300;
00143                 colorSpectrum.MinSaturation = 10;
00144                 colorSpectrum.MaxSaturation = 90;
00145                 colorSpectrum.MinValue = 10;
00146                 colorSpectrum.MaxValue = 90;
00147                 colorSpectrum.Shape = ColorSpectrumShape.Ring;
00148                 colorSpectrum.Components = ColorSpectrumComponents.HueValue;
00149
00150                 Verify.AreEqual(Microsoft.UI.Colors.Green, colorSpectrum.Color);
00151
00152                 // We'll probably encounter some level of rounding error here,
00153                 // so we want to check that the HSV color is *close* to what's expected,
00154                 // not exactly equal.
00155                 Verify.IsLessThan(Math.Abs(colorSpectrum.HsvColor.X - 120.0), 0.1);
00156                 Verify.IsLessThan(Math.Abs(colorSpectrum.HsvColor.Y - 1.0), 0.1);
00157                 Verify.IsLessThan(Math.Abs(colorSpectrum.HsvColor.Z - 0.5), 0.1);
00158
00159                 Verify.AreEqual(10, colorSpectrum.MinHue);
00160                 Verify.AreEqual(300, colorSpectrum.MaxHue);
00161                 Verify.AreEqual(10, colorSpectrum.MinSaturation);
00162                 Verify.AreEqual(90, colorSpectrum.MaxSaturation);
00163                 Verify.AreEqual(10, colorSpectrum.MinValue);
00164                 Verify.AreEqual(90, colorSpectrum.MaxValue);
00165                 Verify.AreEqual(ColorSpectrumShape.Ring, colorSpectrum.Shape);
00166                 Verify.AreEqual(ColorSpectrumComponents.HueValue, colorSpectrum.Components);
00167
00168                 colorSpectrum.HsvColor = new Vector4() { X = 120.0f, Y = 1.0f, Z = 1.0f, W = 1.0f };
00169
00170                 Verify.AreEqual(Microsoft.UI.ColorHelper.FromArgb(255, 0, 255, 0), colorSpectrum.Color);
00171                 Verify.AreEqual(new Vector4() { X = 120.0f, Y = 1.0f, Z = 1.0f, W = 1.0f }, colorSpectrum.HsvColor);
00172             });
00173         }
00174
00175         [TestMethod]
00176         public void ColorSpectrumEventsTest()
00177         {
00178             RunOnUIThread.Execute(() =>
00179             {
00180                 ColorSpectrum colorSpectrum = new ColorSpectrum();
00181
00182                 colorSpectrum.ColorChanged += (ColorSpectrum sender, ColorChangedEventArgs args) =>
00183                 {
00184                     Verify.AreEqual(args.OldColor, Microsoft.UI.Colors.Red);
00185                     Verify.AreEqual(args.NewColor, Microsoft.UI.Colors.Green);
00186                 };
00187
00188                 colorSpectrum.Color = Microsoft.UI.Colors.Green;
00189             });
00190         }
00191
00192         [TestMethod]
00193         public void ColorPickerDerivationTest()
00194         {
00195             RunOnUIThread.Execute(() =>
00196             {
00197                 // Just create the derived type -- all we're exercising here is the initialization path.
00198                 // (ColorSpectrum does things in its initialization path that would QueryInterface the outer).
00199                 MyColorSpectrum colorSpectrum = new MyColorSpectrum();
00200             });
00201
00202             IdleSynchronizer.Wait();
00203         }
00204
00205         [TestMethod]
00206         public void ValidateHueRange()
00207         {
00208             RunOnUIThread.Execute(() =>
00209             {
00210                 var colorPicker = new ColorPicker();
00211                 try
00212                 {
00213                     colorPicker.MinHue = -1;
00214                     Verify.Fail("Invalid argument exception wasn't raised.");
00215                 }
00216                 catch (ArgumentException /*e*/)
00217                 {
00218                     // Due to a bug in C#/WinRT (https://github.com/microsoft/CsWinRT/issues/430),
00219                     // we don't get a specific exception message. We should re-enable this check once that bug is fixed.
00220                     //Verify.IsTrue(e.Message.Contains("MinHue must be between 0 and 359."));
00221                 }
00222             });
00223
00224             IdleSynchronizer.Wait();
00225         }
00226
00227         [TestMethod]
00228         public void ValidateFractionalWidthDoesNotCrash()
00229         {
00230             ColorSpectrum colorSpectrum = null;
00231
00232             RunOnUIThread.Execute(() =>
00233             {
00234                 colorSpectrum = new ColorSpectrum();
00235
00236                 // 332.75 is the fractional value that caused a crash in Settings when DPI was set to 200%
00237                 // and text scaling was set to >160%.  It ensures that we exercise all of the round() fixes
00238                 // that we made in ColorSpectrum to ensure we always round fractional values instead of
00239                 // truncating them.
00240                 colorSpectrum.Width = 332.75;
00241                 colorSpectrum.Height = 332.75;
00242             });
00243
00244             SetAsRootAndWaitForColorSpectrumFill(colorSpectrum);
00245         }
00246
00247         [TestMethod]
00248         public void VerifyClearingHexInputFieldDoesNotCrash()
00249         {
00250             ColorPicker colorPicker = null;
00251
00252             RunOnUIThread.Execute(() =>
00253             {
00254                 colorPicker = new ColorPicker();
00255                 colorPicker.IsHexInputVisible = true;
00256
00257                 Content = colorPicker;
00258             });
00259
00260             IdleSynchronizer.Wait();
00261
00262             RunOnUIThread.Execute(() =>
00263             {
00264                 var hexTextBox = VisualTreeUtils.FindVisualChildByName(colorPicker, "HexTextBox") as TextBox;
00265
00266                 Verify.IsGreaterThan(hexTextBox.Text.Length, 0, "Hex TextBox should have not been empty.");
00267
00268                 // Clearing the hex input field should not crash the app.
00269                 hexTextBox.Text = "";
00270             });
00271         }
00272
00273         [TestMethod]
00274         public void VerifyClearingAlphaChannelInputFieldDoesNotCrash()
00275         {
00276             ColorPicker colorPicker = null;
00277
00278             RunOnUIThread.Execute(() =>
00279             {
00280                 colorPicker = new ColorPicker();
00281                 colorPicker.IsAlphaEnabled = true;
00282
00283                 Content = colorPicker;
00284             });
00285
00286             IdleSynchronizer.Wait();
00287
00288             RunOnUIThread.Execute(() =>
00289             {
00290                 var alphaChannelTextBox = VisualTreeUtils.FindVisualChildByName(colorPicker, "AlphaTextBox") as TextBox;
00291
00292                 Verify.IsGreaterThan(alphaChannelTextBox.Text.Length, 0, "Alpha channel TextBox should have not been empty.");
00293
00294                 // Clearing the alpha channel input field should not crash the app.
00295                 alphaChannelTextBox.Text = "";
00296             });
00297         }
00298
00299         // XamlControlsXamlMetaDataProvider does not exist in the OS repo,
00300         // so we can't execute this test as authored there.
00301         [TestMethod]
00302         public void VerifyColorPropertyMetadata()
00303         {
00304             RunOnUIThread.Execute(() =>
00305             {
00306                 XamlControlsXamlMetaDataProvider provider = new XamlControlsXamlMetaDataProvider();
00307                 var colorPickerType = provider.GetXamlType(typeof(ColorPicker).FullName);
00308                 var colorMember = colorPickerType.GetMember("Color");
00309                 var memberType = colorMember.Type;
00310                 Verify.AreEqual(memberType.BaseType.FullName, "ValueType");
00311             });
00312         }
00313
00314         [TestMethod]
00315         [TestProperty("Ignore", "True")] // https://github.com/microsoft/microsoft-ui-xaml/issues/3982
00316         public void VerifyVisualTree()
00317         {
00318             ColorPicker colorPicker = null;
00319             RunOnUIThread.Execute(() =>
00320             {
00321                 colorPicker = new ColorPicker { IsAlphaEnabled = true, Width=300, Height=600 };
00322             });
00323             TestUtilities.SetAsVisualTreeRoot(colorPicker);
00324
00325             VisualTreeTestHelper.VerifyVisualTree(root: colorPicker, verificationFileNamePrefix: "ColorPicker");
00326         }
00327
00328         // This takes a FrameworkElement parameter so you can pass in either a ColorPicker or a ColorSpectrum.
00329         private void SetAsRootAndWaitForColorSpectrumFill(FrameworkElement element)
00330         {
00331             ManualResetEvent spectrumLoadedEvent = new ManualResetEvent(false);
00332
00333             RunOnUIThread.Execute(() =>
00334             {
00335                 element.Loaded += (sender, args) =>
00336                 {
00337                     var spectrumRectangle = VisualTreeUtils.FindVisualChildByName(element, "SpectrumRectangle") as Rectangle;
00338                     Verify.IsNotNull(spectrumRectangle);
00339
00340                     spectrumRectangle.RegisterPropertyChangedCallback(Shape.FillProperty, (o, dp) =>
00341                     {
00342                         spectrumLoadedEvent.Set();
00343                     });
00344                 };
00345
00346                 Content = element;
00347                 Content.UpdateLayout();
00348             });
00349
00350             spectrumLoadedEvent.WaitOne();
00351         }
00352     }
00353 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/MapElementClickEventArgs.cpp Source File

  • File List
  • File Members
  • MapControl

MapElementClickEventArgs.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MapElementClickEventArgs.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarSelectionChangedEventArgs.cpp Source File

  • File List
  • File Members
  • SelectorBar

SelectorBarSelectionChangedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SelectorBarSelectionChangedEventArgs.h"
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewInteractiveTestsPage Member List

This is the complete list of members for ItemsViewInteractiveTestsPage, including all inherited members.
_colEntities | ItemsViewInteractiveTestsPage | [private]
_entityTemplates | ItemsViewInteractiveTestsPage | [private]
_fullLogs | ItemsViewInteractiveTestsPage | [private]
_linedFlowLayout | ItemsViewInteractiveTestsPage | [private]
_linedFlowLayoutItemCollectionTransitionProvider | ItemsViewInteractiveTestsPage | [private]
_lorem | ItemsViewInteractiveTestsPage | [private]
_lstEntities | ItemsViewInteractiveTestsPage | [private]
_lstLargeEntities | ItemsViewInteractiveTestsPage | [private]
_oldFocusedElement | ItemsViewInteractiveTestsPage | [private]
_scrollViewOffsetChangeCorrelationId | ItemsViewInteractiveTestsPage | [private]
_scrollViewResetCorrelationId | ItemsViewInteractiveTestsPage | [private]
_scrollViewZoomFactorChangeCorrelationId | ItemsViewInteractiveTestsPage | [private]
_stackLayout | ItemsViewInteractiveTestsPage | [private]
_uniformGridLayout | ItemsViewInteractiveTestsPage | [private]
BtnClearFullLog_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
BtnGetCurrentItemIndex_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
BtnGetCurrentItemIndex_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
BtnGetFullLog_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
BtnInsertItems_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
BtnRemoveItems_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
BtnResetScrollView_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
BtnScrollViewScrollTo_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
BtnScrollViewZoomTo_Click(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkHandleItemsInfoRequested_IsCheckedChanged(object sender, RoutedEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
ChkIsItemInvokedEnabled_Checked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkIsItemInvokedEnabled_Unchecked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ChkUseAppAnimator_IsCheckedChanged(object sender, RoutedEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
ChkUseFastPath_IsCheckedChanged(object sender, RoutedEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
ClearFullLog() | ItemsViewInteractiveTestsPage | [inline, private]
CmbItemsSource_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
CmbLayout_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
CmbSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
GetFullLog() | ItemsViewInteractiveTestsPage | [inline, private]
InsertItem(int index) | ItemsViewInteractiveTestsPage | [inline, private]
ItemsView_ItemInvoked(ItemsView sender, ItemsViewItemInvokedEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
ItemsViewInteractiveTestsPage() | ItemsViewInteractiveTestsPage | [inline]
ItemsViewInteractiveTestsPage_KeyDown(object sender, KeyRoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
ItemsViewInteractiveTestsPage_Loaded(object sender, RoutedEventArgs e) | ItemsViewInteractiveTestsPage | [inline, private]
LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
RemoveItem(int index) | ItemsViewInteractiveTestsPage | [inline, private]
ScrollView_ScrollCompleted(ScrollView scrollView, ScrollingScrollCompletedEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
ScrollView_StateChanged(ScrollView scrollView, object args) | ItemsViewInteractiveTestsPage | [inline, private]
ScrollView_ViewChanged(ScrollView scrollView, object args) | ItemsViewInteractiveTestsPage | [inline, private]
ScrollView_ZoomCompleted(ScrollView scrollView, ScrollingZoomCompletedEventArgs args) | ItemsViewInteractiveTestsPage | [inline, private]
UpdateAppAnimator() | ItemsViewInteractiveTestsPage | [inline, private]
UpdateAppAnimatorCheckBox() | ItemsViewInteractiveTestsPage | [inline, private]
UpdateItemsInfoRequestedCheckBoxes() | ItemsViewInteractiveTestsPage | [inline, private]
UpdateItemsInfoRequestedHandler() | ItemsViewInteractiveTestsPage | [inline, private]
UpdateItemsViewIsItemInvokedEnabled() | ItemsViewInteractiveTestsPage | [inline, private]
UpdateItemsViewLayout() | ItemsViewInteractiveTestsPage | [inline, private]
UpdateItemsViewSelectionMode() | ItemsViewInteractiveTestsPage | [inline, private]
UpdateLinedFlowLayoutLineHeight() | ItemsViewInteractiveTestsPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.idl Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedGlobalNavigationButtonVisualSource.idl

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedGlobalNavigationButtonVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedGlobalNavigationButtonVisualSource.json (37639 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 namespace MU_XCAV_NAMESPACE
00022 {
00023     [MUX_PUBLIC]
00024     [webhosthidden]
00025     runtimeclass AnimatedGlobalNavigationButtonVisualSource
00026         : [default] Microsoft.UI.Xaml.Controls.IAnimatedVisualSource, Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
00027     {
00028         AnimatedGlobalNavigationButtonVisualSource();
00029     };
00030 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemsInfoRequestedEventArgs.cpp Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemsInfoRequestedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "LinedFlowLayout.h"
00007 #include "LinedFlowLayoutItemsInfoRequestedEventArgs.h"
00008 #include "LinedFlowLayoutTrace.h"
00009
00010 LinedFlowLayoutItemsInfoRequestedEventArgs::LinedFlowLayoutItemsInfoRequestedEventArgs(
00011     winrt::LinedFlowLayout const& linedFlowLayout,
00012     int itemsRangeStartIndex,
00013     int itemsRangeRequestedLength) :
00014     m_itemsRangeStartIndex(itemsRangeStartIndex),
00015     m_itemsRangeRequestedStartIndex(itemsRangeStartIndex),
00016     m_itemsRangeRequestedLength(itemsRangeRequestedLength)
00017 {
00018     MUX_ASSERT(itemsRangeStartIndex >= 0);
00019     MUX_ASSERT(itemsRangeRequestedLength > 0);
00020
00021     LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, itemsRangeStartIndex, itemsRangeRequestedLength);
00022
00023     m_linedFlowLayout.set(linedFlowLayout);
00024 }
00025
00026 LinedFlowLayoutItemsInfoRequestedEventArgs::~LinedFlowLayoutItemsInfoRequestedEventArgs()
00027 {
00028     LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00029 }
00030
00031 #pragma region ILinedFlowLayoutItemsInfoRequestedEventArgs
00032
00033 void LinedFlowLayoutItemsInfoRequestedEventArgs::ItemsRangeStartIndex(int32_t value)
00034 {
00035     LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, value);
00036
00037     if (value < 0)
00038     {
00039         throw winrt::hresult_invalid_argument(L"'ItemsRangeStartIndex' must be positive.");
00040     }
00041
00042     if (value > m_itemsRangeStartIndex)
00043     {
00044         throw winrt::hresult_invalid_argument(L"'ItemsRangeStartIndex' cannot be increased.");
00045     }
00046
00047     if (m_itemsRangeEstablishedLength != 0 && value + m_itemsRangeEstablishedLength < m_itemsRangeRequestedStartIndex + m_itemsRangeRequestedLength)
00048     {
00049         throw winrt::hresult_invalid_argument(L"Value is too small given the array length already provided.");
00050     }
00051
00052     m_itemsRangeStartIndex = value;
00053 }
00054
00055 void LinedFlowLayoutItemsInfoRequestedEventArgs::MinWidth(double value)
00056 {
00057     if (value < 0.0)
00058     {
00059         m_minWidth = -1.0;
00060     }
00061     else
00062     {
00063         m_minWidth = value;
00064     }
00065 }
00066
00067 void LinedFlowLayoutItemsInfoRequestedEventArgs::MaxWidth(double value)
00068 {
00069     if (value < 0.0)
00070     {
00071         m_maxWidth = -1.0;
00072     }
00073     else
00074     {
00075         m_maxWidth = value;
00076     }
00077 }
00078
00079 void LinedFlowLayoutItemsInfoRequestedEventArgs::SetDesiredAspectRatios(winrt::array_view<double const> const& values)
00080 {
00081     if (auto linedFlowLayout = winrt::get_self<LinedFlowLayout>(m_linedFlowLayout.get()))
00082     {
00083         SetItemsRangeEstablishedLength(values.size());
00084
00085         m_itemsRangeLength = m_itemsRangeEstablishedLength;
00086
00087         linedFlowLayout->SetDesiredAspectRatios(values);
00088     }
00089 }
00090
00091 void LinedFlowLayoutItemsInfoRequestedEventArgs::SetMinWidths(winrt::array_view<double const> const& values)
00092 {
00093     if (auto linedFlowLayout = winrt::get_self<LinedFlowLayout>(m_linedFlowLayout.get()))
00094     {
00095         SetItemsRangeEstablishedLength(values.size());
00096
00097         linedFlowLayout->SetMinWidths(values);
00098     }
00099 }
00100
00101 void LinedFlowLayoutItemsInfoRequestedEventArgs::SetMaxWidths(winrt::array_view<double const> const& values)
00102 {
00103     if (auto linedFlowLayout = winrt::get_self<LinedFlowLayout>(m_linedFlowLayout.get()))
00104     {
00105         SetItemsRangeEstablishedLength(values.size());
00106
00107         linedFlowLayout->SetMaxWidths(values);
00108     }
00109 }
00110
00111 void LinedFlowLayoutItemsInfoRequestedEventArgs::SetItemsRangeEstablishedLength(int value)
00112 {
00113     if (value != m_itemsRangeEstablishedLength)
00114     {
00115         if (value < m_itemsRangeRequestedLength && m_itemsRangeStartIndex == m_itemsRangeRequestedStartIndex)
00116         {
00117             throw winrt::hresult_invalid_argument(L"The provided array length must be greater than or equal to 'ItemsRangeRequestedLength'.");
00118         }
00119
00120         if (m_itemsRangeStartIndex + value < m_itemsRangeRequestedStartIndex + m_itemsRangeRequestedLength && m_itemsRangeStartIndex < m_itemsRangeRequestedStartIndex)
00121         {
00122             throw winrt::hresult_invalid_argument(L"The provided array length is too small given the decreased 'ItemsRangeStartIndex' and the 'ItemsRangeRequestedLength' values.");
00123         }
00124
00125         if (m_itemsRangeEstablishedLength > 0)
00126         {
00127             throw winrt::hresult_invalid_argument(L"All provided arrays must have the same length.");
00128         }
00129
00130         m_itemsRangeEstablishedLength = value;
00131     }
00132 }
00133
00134 #pragma endregion
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooksFactory.h Source File

  • File List
  • File Members
  • ScrollView

ScrollViewTestHooksFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollViewTestHooks.h"
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewSelectionChangedEventArgs Member List

This is the complete list of members for NavigationViewSelectionChangedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< NavigationViewSelectionChangedEventArgs > &&self) noexcept | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< NavigationViewSelectionChangedEventArgs > &&self) | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
IsSettingsSelected() | NavigationViewSelectionChangedEventArgs |
IsSettingsSelected(bool value) | NavigationViewSelectionChangedEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
RecommendedNavigationTransitionInfo() | NavigationViewSelectionChangedEventArgs |
RecommendedNavigationTransitionInfo(winrt::NavigationTransitionInfo const &value) | NavigationViewSelectionChangedEventArgs |
ReferenceTracker(Args &&...args) | ReferenceTracker< NavigationViewSelectionChangedEventArgs, winrt::implementation::NavigationViewSelectionChangedEventArgsT, winrt::composing, winrt::composable > | [inline]
SelectedItem() | NavigationViewSelectionChangedEventArgs |
SelectedItem(winrt::IInspectable const &value) | NavigationViewSelectionChangedEventArgs |
SelectedItemContainer() | NavigationViewSelectionChangedEventArgs |
SelectedItemContainer(winrt::NavigationViewItemBase const &value) | NavigationViewSelectionChangedEventArgs |
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkCanvasAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkCanvasAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkCanvasAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InkCanvasAutomationPeer)
00012 }
00013
00014 #include "InkCanvasAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarTestHooks Member List

This is the complete list of members for SelectorBarTestHooks, including all inherited members.
GetItemsViewPart(const winrt::SelectorBar &selectorBar) SelectorBarTestHooks [static]
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizingStackPanelPage Member List

This is the complete list of members for VirtualizingStackPanelPage, including all inherited members.
Ingredients | VirtualizingStackPanelPage | [private]
PopulateData() | VirtualizingStackPanelPage | [inline, private]
VirtualizingStackPanelPage() | VirtualizingStackPanelPage | [inline]
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedAcceptVisualSource.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnimatedAcceptVisualSource.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnimatedAcceptVisualSource.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(AnimatedAcceptVisualSource)
00012 }
00013
00014 #include "AnimatedAcceptVisualSource.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImageIconTests Member List

This is the complete list of members for ImageIconTests, including all inherited members.
ImageIconTest() ImageIconTests [inline]
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemTemplateSamples/ItemTemplateDemo.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemTemplateSamples

ItemTemplateDemo.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using System.Linq;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Xaml.Controls.Primitives;
00009
00010 namespace MUXControlsTestApp.Samples
00011 {
00012     public sealed partial class ItemTemplateDemo : Page
00013     {
00014         public List<int> Data { get; set; }
00015         public List<MyData> Numbers = new List<MyData>();
00016
00017         public ItemTemplateDemo()
00018         {
00019             Data = Enumerable.Range(0, 1000).ToList();
00020
00021             for(int i=0;i<10;i++)
00022             {
00023                 Numbers.Add(new MyData(i));
00024             }
00025
00026             this.InitializeComponent();
00027         }
00028
00029         private void OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args)
00030         {
00031             args.TemplateKey = (((int)args.DataContext) % 2 == 0) ? "even" : "odd";
00032         }
00033
00034         private void ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
00035         {
00036             Popup popup = args.Element as Popup;
00037
00038             if (popup != null)
00039             {
00040                 popup.IsOpen = true;
00041             }
00042         }
00043
00044         private void ChkSample_CheckedChanged(object sender, RoutedEventArgs e)
00045         {
00046             if (sender == chkSample0)
00047             {
00048                 itemsRepeaterScrollHost0.Visibility = (bool)chkSample0.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00049             }
00050             else if (sender == chkSample1)
00051             {
00052                 itemsRepeaterScrollHost1.Visibility = (bool)chkSample1.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00053             }
00054             else if (sender == chkSample2)
00055             {
00056                 itemsRepeaterScrollHost2.Visibility = (bool)chkSample2.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00057             }
00058             else if (sender == chkSample3)
00059             {
00060                 itemsRepeaterScrollHost3.Visibility = (bool)chkSample3.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00061             }
00062             else if (sender == chkSample4)
00063             {
00064                 itemsRepeaterScrollHost4.Visibility = (bool)chkSample4.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00065             }
00066             else if (sender == chkSample5)
00067             {
00068                 itemsRepeater5.Visibility = (bool)chkSample5.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00069             }
00070             else if (sender == chkSample6)
00071             {
00072                 itemsRepeater6.Visibility = (bool)chkSample6.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00073             }
00074             else if (sender == chkSample7)
00075             {
00076                 itemsRepeater7.Visibility = (bool)chkSample7.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00077             }
00078             else if (sender == chkSample8)
00079             {
00080                 myItemsRepeater8.Visibility = (bool)chkSample8.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00081             }
00082             else if (sender == chkSample9)
00083             {
00084                 itemsRepeater9.Visibility = (bool)chkSample9.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00085             }
00086             else if (sender == chkSample10)
00087             {
00088                 itemsRepeater10.Visibility = (bool)chkSample10.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00089             }
00090             else if (sender == chkSample11)
00091             {
00092                 listView11.Visibility = (bool)chkSample11.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00093             }
00094             else if (sender == chkSample12)
00095             {
00096                 itemsRepeater12.Visibility = (bool)chkSample12.IsChecked ? Visibility.Visible : Visibility.Collapsed;
00097             }
00098         }
00099     }
00100
00101     public class MyData
00102     {
00103         public int number;
00104
00105         public MyData(int number)
00106         {
00107             this.number = number;
00108         }
00109     }
00110
00111     public class MySelector : DataTemplateSelector
00112     {
00113         public DataTemplate TemplateOdd { get; set; }
00114
00115         public DataTemplate TemplateEven { get; set; }
00116
00117         protected override DataTemplate SelectTemplateCore(object item)
00118         {
00119             return (((int)item) % 2 == 0) ? TemplateEven : TemplateOdd;
00120         }
00121     }
00122
00123     public class MyItemsRepeater : ItemsRepeater
00124     {
00125         public MyItemsRepeater()
00126         {
00127         }
00128     }
00129 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressBar/InteractionTests/ProgressBarTests.cs Source File

  • File List
  • File Members
  • ProgressBar
  • InteractionTests

ProgressBarTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019 using MUXTestInfra.Shared.Infra;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00022 {
00023     [TestClass]
00024     public class ProgressBarTests
00025     {
00026         [ClassInitialize]
00027         [TestProperty("RunAs", "User")]
00028         [TestProperty("Classification", "Integration")]
00029         [TestProperty("Platform", "Any")]
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         [TestProperty("TestSuite", "A")]
00042         public void VerifyAxeScanPasses()
00043         {
00044             using (var setup = new TestSetupHelper("ProgressBar-Axe"))
00045             {
00046                 AxeTestHelper.TestForAxeIssues();
00047             }
00048         }
00049
00050         [TestMethod]
00051         [TestProperty("TestSuite", "A")]
00052         public void ChangeValueTest()
00053         {
00054             using (var setup = new TestSetupHelper("ProgressBar Tests"))
00055             {
00056                 Log.Comment("Changing Value of ProgressBar");
00057
00058                 RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");
00059                 Verify.AreEqual(0, progressBar.Value);
00060
00061                 double oldValue = progressBar.Value;
00062
00063                 // NOTE: Interaction tests can only access what accessibility tools see. In this case, we can find the button because we
00064                 // set AutomationProperties.Name on the button in ProgressBarPage.xaml
00065                 Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
00066                 changeValueButton.InvokeAndWait();
00067
00068                 double newValue = progressBar.Value;
00069                 double diff = Math.Abs(oldValue - newValue);
00070
00071                 Log.Comment("ProgressBar value changed");
00072                 Verify.IsGreaterThan(diff, 0.0);
00073             }
00074         }
00075
00076         [TestMethod]
00077         [TestProperty("TestSuite", "A")]
00078         public void UpdateIndicatorWidthTest()
00079         {
00080             using (var setup = new TestSetupHelper("ProgressBar Tests"))
00081             {
00082                 Log.Comment("Set ProgressBar settings to default for testing");
00083
00084                 RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");
00085
00086                 Edit minimumInput = FindElement.ByName<Edit>("MinimumInput");
00087                 Edit maximumInput = FindElement.ByName<Edit>("MaximumInput");
00088                 Edit widthInput = FindElement.ByName<Edit>("WidthInput");
00089
00090                 TextBlock widthInputText = FindElement.ByName<TextBlock>("WidthInputText");
00091                 TextBlock indicatorWidthText = FindElement.ByName<TextBlock>("IndicatorWidthText");
00092
00093                 Button updateMinMaxButton = FindElement.ByName<Button>("UpdateMinMaxButton");
00094                 Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
00095                 Button updateWidthButton = FindElement.ByName<Button>("UpdateWidthButton");
00096
00097                 minimumInput.SetValue("0");
00098                 maximumInput.SetValue("100");
00099                 updateMinMaxButton.InvokeAndWait();
00100
00101                 widthInput.SetValue("100");
00102                 updateWidthButton.InvokeAndWait();
00103
00104                 Verify.AreEqual(progressBar.Minimum, 0);
00105                 Verify.AreEqual(progressBar.Maximum, 100);
00106                 Verify.AreEqual(Convert.ToDouble(widthInputText.DocumentText), 100);
00107
00108                 Log.Comment("Changing value of ProgressBar updates Indicator Width");
00109
00110                 changeValueButton.Invoke();
00111
00112                 Verify.AreEqual(progressBar.Value, Convert.ToDouble(indicatorWidthText.DocumentText));
00113
00114                 Log.Comment("Updating width of ProgressBar also updates Indicator Width");
00115
00116                 widthInput.SetValue("200");
00117                 updateWidthButton.InvokeAndWait();
00118
00119                 Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to ProgressBar width");
00120
00121                 Log.Comment("Changing value of ProgressBar of different width updates Indicator width");
00122
00123                 changeValueButton.InvokeAndWait();
00124
00125                 Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to ProgressBar width");
00126
00127                 Log.Comment("Updating Maximum and Minimum also updates Indicator Width");
00128
00129                 minimumInput.SetValue("10");
00130                 maximumInput.SetValue("16");
00131                 updateMinMaxButton.InvokeAndWait();
00132
00133                 changeValueButton.InvokeAndWait();
00134
00135                 double range = progressBar.Maximum - progressBar.Minimum;
00136                 double adjustedValueFromRange = progressBar.Value - progressBar.Minimum;
00137                 double calculatedValue = (adjustedValueFromRange / range) * Convert.ToDouble(widthInputText.DocumentText);
00138
00139                 Verify.IsLessThan(Math.Abs(calculatedValue - Convert.ToDouble(indicatorWidthText.DocumentText)), 0.5, "Indicator Width is adjusted based on range and ProgressBar width");
00140             }
00141         }
00142
00143         [TestMethod]
00144         [TestProperty("TestSuite", "A")]
00145         public void UpdateMinMaxTest()
00146         {
00147             using (var setup = new TestSetupHelper("ProgressBar Tests"))
00148             {
00149                 Log.Comment("Updating Minimum and Maximum value of ProgressBar");
00150
00151                 RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");
00152
00153                 double oldMinimumInputText = progressBar.Minimum;
00154                 double oldMaximumInputText = progressBar.Maximum;
00155
00156                 Button updateMinMaxButton = FindElement.ByName<Button>("UpdateMinMaxButton");
00157                 Edit minimumInput = FindElement.ByName<Edit>("MinimumInput");
00158                 Edit maximumInput = FindElement.ByName<Edit>("MaximumInput");
00159
00160                 minimumInput.SetValue("10");
00161                 maximumInput.SetValue("15");
00162                 updateMinMaxButton.InvokeAndWait();
00163
00164                 double newMinimumInputText = progressBar.Minimum;
00165                 double newMaximumInputText = progressBar.Maximum;
00166
00167                 Verify.AreNotSame(oldMinimumInputText, newMinimumInputText, "Minimum updated");
00168                 Verify.AreNotSame(oldMaximumInputText, newMaximumInputText, "Maximum updated");
00169
00170                 // Below edge cases are handled by Rangebase
00171
00172                 Log.Comment("Updating Minimum and Maximum when Maximum < Minimum");
00173
00174                 maximumInput.SetValue("5");
00175                 updateMinMaxButton.InvokeAndWait();
00176
00177                 Verify.AreEqual(progressBar.Minimum, progressBar.Maximum, "Maximum updates to equal Minimum");
00178
00179                 Log.Comment("Updating Minimum and Maximum when Minimum > Value");
00180
00181                 minimumInput.SetValue("15");
00182                 updateMinMaxButton.InvokeAndWait();
00183
00184                 Verify.AreEqual(progressBar.Value, progressBar.Minimum, "Value updates to equal Minimum");
00185                 Verify.AreEqual(progressBar.Maximum, progressBar.Minimum, "Maximum also updates to equal Minimum");
00186
00187                 Log.Comment("Updating Minimum and Maximum to be a decimal number");
00188
00189                 minimumInput.SetValue("0.1");
00190                 maximumInput.SetValue("1.1");
00191                 updateMinMaxButton.InvokeAndWait();
00192
00193                 double oldValue = progressBar.Value;
00194
00195                 Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
00196                 changeValueButton.InvokeAndWait();
00197
00198                 double newValue = progressBar.Value;
00199                 double diff = Math.Abs(oldValue - newValue);
00200
00201                 Verify.IsGreaterThan(diff, Convert.ToDouble(0), "Value of ProgressBar increments properly within range with decimal Minimum and Maximum");
00202             }
00203         }
00204
00205         [TestMethod]
00206         [TestProperty("TestSuite", "B")]
00207         public void ChangeStateTest()
00208         {
00209             using (var setup = new TestSetupHelper("ProgressBar Tests"))
00210             {
00211                 Log.Comment("Verify all properties are set to false by default for testing");
00212
00213                 ToggleButton showPausedCheckBox = FindElement.ByName<ToggleButton>("ShowPausedCheckBox");
00214                 ToggleButton showErrorCheckBox = FindElement.ByName<ToggleButton>("ShowErrorCheckBox");
00215                 ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox");
00216                 TextBlock showPausedText = FindElement.ByName<TextBlock>("ShowPausedText");
00217                 TextBlock showErrorText = FindElement.ByName<TextBlock>("ShowErrorText");
00218                 TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
00219                 TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");
00220
00221                 Verify.IsFalse(Convert.ToBoolean(showPausedText.DocumentText));
00222                 Verify.IsFalse(Convert.ToBoolean(showErrorText.DocumentText));
00223                 Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));
00224
00225                 Log.Comment("All properties to false updates ProgressBar to Determinate");
00226
00227                 Verify.AreEqual(visualStateText.DocumentText, "Determinate");
00228
00229                 Log.Comment("ShowPaused = true updates ProgressBar to Paused visual state");
00230
00231                 showPausedCheckBox.ToggleAndWait();
00232
00233                 Verify.IsTrue(Convert.ToBoolean(showPausedText.DocumentText));
00234                 Verify.AreEqual(visualStateText.DocumentText, "Paused");
00235
00236                 Log.Comment("ShowPaused = true && IsIndeterminate = true updates ProgressBar to IndeterminatePaused visual state");
00237
00238                 isIndeterminateCheckBox.ToggleAndWait();
00239
00240                 Verify.IsTrue(Convert.ToBoolean(showPausedText.DocumentText));
00241                 Verify.IsTrue(Convert.ToBoolean(isIndeterminateText.DocumentText));
00242                 Verify.AreEqual(visualStateText.DocumentText, "IndeterminatePaused");
00243
00244                 Log.Comment("IsIndeterminate = true updates ProgressBar to Indeterminate visual state");
00245
00246                 showPausedCheckBox.ToggleAndWait();
00247
00248                 Verify.IsTrue(Convert.ToBoolean(isIndeterminateText.DocumentText));
00249                 Verify.AreEqual(visualStateText.DocumentText, "Indeterminate");
00250
00251                 Log.Comment("ShowError = true && IsIndeterminate = true updates ProgressBar to IndeterminateError visual state");
00252
00253                 showErrorCheckBox.ToggleAndWait();
00254
00255                 Verify.IsTrue(Convert.ToBoolean(showErrorText.DocumentText));
00256                 Verify.AreEqual(visualStateText.DocumentText, "IndeterminateError");
00257
00258                 Log.Comment("ShowError = true updates ProgressBar to Error visual state for Determinate");
00259
00260                 isIndeterminateCheckBox.ToggleAndWait();
00261
00262                 Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));
00263                 Verify.IsTrue(Convert.ToBoolean(showErrorText.DocumentText));
00264                 Verify.AreEqual(visualStateText.DocumentText, "Error");
00265             }
00266         }
00267
00268         [TestMethod]
00269         [TestProperty("TestSuite", "B")]
00270         public void PaddingOffsetTest()
00271         {
00272             using (var setup = new TestSetupHelper("ProgressBar Tests"))
00273             {
00274                 Log.Comment("Set ProgressBar Padding settings to default for testing");
00275
00276                 RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");
00277
00278                 Edit paddingLeftInput = FindElement.ByName<Edit>("PaddingLeftInput");
00279                 Edit paddingRightInput = FindElement.ByName<Edit>("PaddingRightInput");
00280
00281                 TextBlock paddingLeftText = FindElement.ByName<TextBlock>("PaddingLeftText");
00282                 TextBlock paddingRightText = FindElement.ByName<TextBlock>("PaddingRightText");
00283                 TextBlock indicatorWidthText = FindElement.ByName<TextBlock>("IndicatorWidthText");
00284                 TextBlock widthInputText = FindElement.ByName<TextBlock>("WidthInputText");
00285
00286                 paddingLeftInput.SetValue("0");
00287                 paddingRightInput.SetValue("0");
00288
00289                 Button updatePaddingButton = FindElement.ByName<Button>("UpdatePaddingButton");
00290                 updatePaddingButton.InvokeAndWait();
00291
00292                 Verify.AreEqual(Convert.ToDouble(paddingLeftText.DocumentText), 0);
00293                 Verify.AreEqual(Convert.ToDouble(paddingRightText.DocumentText), 0);
00294
00295                 Log.Comment("IndicatorWidth offsets where ProgressBar has Padding");
00296
00297                 paddingLeftInput.SetValue("10");
00298                 paddingRightInput.SetValue("10");
00299
00300                 updatePaddingButton.InvokeAndWait();
00301
00302                 Edit valueInput = FindElement.ByName<Edit>("ValueInput");
00303                 valueInput.SetValue("100");
00304
00305                 Button updateValueButton = FindElement.ByName<Button>("UpdateValueButton");
00306                 updateValueButton.InvokeAndWait();
00307
00308                 double maxIndicatorWidth = Convert.ToDouble(widthInputText.DocumentText) - Convert.ToDouble(paddingLeftText.DocumentText) - Convert.ToDouble(paddingRightText.DocumentText);
00309
00310                 Verify.AreEqual(maxIndicatorWidth, Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator at max width is reduced by Padding");
00311             }
00312         }
00313
00314         [TestMethod]
00315         [TestProperty("TestSuite", "C")]
00316         public void RetemplateUpdateIndicatorWidthTest()
00317         {
00318             using (var setup = new TestSetupHelper("ProgressBar Tests"))
00319             {
00320                 //Log.Comment("Navigate to ProgressBar Re-template Page");
00321                 //Button navigateToReTemplatePage = FindElement.ByName<Button>("NavigateToReTemplatePage");
00322                 //Log.Comment("Set Re-template ProgressBar settings to default for testing");
00323
00324                 RangeValueSpinner progressBar = FindElement.ByName<RangeValueSpinner>("TestProgressBar");
00325
00326                 Edit minimumInput = FindElement.ByName<Edit>("MinimumInput");
00327                 Edit maximumInput = FindElement.ByName<Edit>("MaximumInput");
00328                 Edit widthInput = FindElement.ByName<Edit>("WidthInput");
00329
00330                 TextBlock widthInputText = FindElement.ByName<TextBlock>("WidthInputText");
00331                 TextBlock indicatorWidthText = FindElement.ByName<TextBlock>("IndicatorWidthText");
00332
00333                 Button updateMinMaxButton = FindElement.ByName<Button>("UpdateMinMaxButton");
00334                 Button changeValueButton = FindElement.ByName<Button>("ChangeValueButton");
00335                 Button updateWidthButton = FindElement.ByName<Button>("UpdateWidthButton");
00336
00337                 minimumInput.SetValue("0");
00338                 maximumInput.SetValue("100");
00339                 updateMinMaxButton.InvokeAndWait();
00340
00341                 widthInput.SetValue("100");
00342                 updateWidthButton.InvokeAndWait();
00343
00344                 Verify.AreEqual(progressBar.Minimum, 0);
00345                 Verify.AreEqual(progressBar.Maximum, 100);
00346                 Verify.AreEqual(Convert.ToDouble(widthInputText.DocumentText), 100);
00347
00348                 Log.Comment("Changing value of Re-template ProgressBar updates Indicator Width");
00349
00350                 changeValueButton.Invoke();
00351
00352                 Verify.AreEqual(progressBar.Value, Convert.ToDouble(indicatorWidthText.DocumentText));
00353
00354                 Log.Comment("Updating width of Re-template ProgressBar also updates Indicator Width");
00355
00356                 widthInput.SetValue("200");
00357                 updateWidthButton.InvokeAndWait();
00358
00359                 Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to Re-template ProgressBar width");
00360
00361                 Log.Comment("Changing value of ProgressBar of different width updates Indicator width");
00362
00363                 changeValueButton.InvokeAndWait();
00364
00365                 Verify.AreEqual((progressBar.Value * 2), Convert.ToDouble(indicatorWidthText.DocumentText), "Indicator width is adjusted to ProgressBar width");
00366
00367                 Log.Comment("Updating Maximum and Minimum also updates Indicator Width");
00368
00369                 minimumInput.SetValue("10");
00370                 maximumInput.SetValue("16");
00371                 updateMinMaxButton.InvokeAndWait();
00372
00373                 changeValueButton.InvokeAndWait();
00374
00375                 double range = progressBar.Maximum - progressBar.Minimum;
00376                 double adjustedValueFromRange = progressBar.Value - progressBar.Minimum;
00377                 double calculatedValue = (adjustedValueFromRange / range) * Convert.ToDouble(widthInputText.DocumentText);
00378
00379                 Verify.IsLessThan(Math.Abs(calculatedValue - Convert.ToDouble(indicatorWidthText.DocumentText)), 0.5, "Indicator Width is adjusted based on range and Re-template ProgressBar width");
00380             }
00381         }
00382
00383         [TestMethod]
00384         [TestProperty("TestSuite", "C")]
00385         public void ReTemplateChangeStateTest()
00386         {
00387             using (var setup = new TestSetupHelper("ProgressBar Tests"))
00388             {
00389                 //Log.Comment("Navigate to Progress Bar Re-template Page");
00390                 //Button navigateToReTemplatePage = FindElement.ByName<Button>("NavigateToReTemplatePage");
00391
00392                 Log.Comment("Verify all properties are set to false by default for testing");
00393
00394                 ToggleButton showPausedCheckBox = FindElement.ByName<ToggleButton>("ShowPausedCheckBox");
00395                 ToggleButton showErrorCheckBox = FindElement.ByName<ToggleButton>("ShowErrorCheckBox");
00396                 ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox");
00397                 TextBlock showPausedText = FindElement.ByName<TextBlock>("ShowPausedText");
00398                 TextBlock showErrorText = FindElement.ByName<TextBlock>("ShowErrorText");
00399                 TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
00400                 TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");
00401
00402                 Verify.IsFalse(Convert.ToBoolean(showPausedText.DocumentText));
00403                 Verify.IsFalse(Convert.ToBoolean(showErrorText.DocumentText));
00404                 Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));
00405
00406                 Log.Comment("All properties to false updates Re-template ProgressBar to Determinate");
00407
00408                 Verify.AreEqual(visualStateText.DocumentText, "Determinate");
00409
00410                 Log.Comment("ShowPaused = true updates Re-template ProgressBar to Paused visual state");
00411
00412                 showPausedCheckBox.ToggleAndWait();
00413
00414                 Verify.IsTrue(Convert.ToBoolean(showPausedText.DocumentText));
00415                 Verify.AreEqual(visualStateText.DocumentText, "Paused");
00416
00417                 Log.Comment("IsIndeterminate = true updates Re-template ProgressBar to Indeterminate visual state");
00418
00419                 showPausedCheckBox.ToggleAndWait();
00420                 isIndeterminateCheckBox.ToggleAndWait();
00421
00422                 Verify.IsTrue(Convert.ToBoolean(isIndeterminateText.DocumentText));
00423                 Verify.AreEqual(visualStateText.DocumentText, "Indeterminate");
00424
00425                 Log.Comment("ShowError = true updates Re-template ProgressBar to Error visual state for Determinate");
00426
00427                 isIndeterminateCheckBox.ToggleAndWait();
00428                 showErrorCheckBox.ToggleAndWait();
00429
00430                 Verify.IsFalse(Convert.ToBoolean(isIndeterminateText.DocumentText));
00431                 Verify.IsTrue(Convert.ToBoolean(showErrorText.DocumentText));
00432                 Verify.AreEqual(visualStateText.DocumentText, "Error");
00433             }
00434         }
00435     }
00436 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeItem.cpp Source File

  • File List
  • File Members
  • SwipeControl

SwipeItem.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SwipeControl.h"
00007 #include "SwipeItems.h"
00008 #include "SwipeItemInvokedEventArgs.h"
00009 #include "SwipeItem.h"
00010 #include "RuntimeProfiler.h"
00011 #include "CommandingHelpers.h"
00012
00013 static const double s_swipeItemWidth = 68.0;
00014 static const double s_swipeItemHeight = 60.0;
00015
00016 SwipeItem::SwipeItem()
00017 {
00018     __RP_Marker_ClassById(RuntimeProfiler::ProfId_SwipeItem);
00019 }
00020
00021 #pragma endregion
00022
00023
00024 void SwipeItem::InvokeSwipe(const winrt::SwipeControl& swipeControl)
00025 {
00026     auto eventArgs = winrt::make_self<SwipeItemInvokedEventArgs>();
00027     eventArgs->SwipeControl(swipeControl);
00028     m_invokedEventSource(*this, *eventArgs);
00029
00030     if (s_CommandProperty)
00031     {
00032         auto command = Command().as<winrt::ICommand>();
00033         auto param = CommandParameter();
00034
00035         if (command && command.CanExecute(param))
00036         {
00037             command.Execute(param);
00038         }
00039     }
00040     // It stays open when onInvoked is expand.
00041     if (BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::Close ||
00042         BehaviorOnInvoked() == winrt::SwipeBehaviorOnInvoked::Auto)
00043     {
00044         swipeControl.Close();
00045     }
00046 }
00047
00048 void SwipeItem::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00049 {
00050     if (args.Property() == winrt::SwipeItem::CommandProperty())
00051     {
00052         OnCommandChanged(args.OldValue().as<winrt::ICommand>(), args.NewValue().as<winrt::ICommand>());
00053     }
00054 }
00055
00056 void SwipeItem::OnCommandChanged(const winrt::ICommand& /*oldCommand*/, const winrt::ICommand& newCommand)
00057 {
00058     if (auto newUICommand = newCommand.try_as<winrt::XamlUICommand>())
00059     {
00060         CommandingHelpers::BindToLabelPropertyIfUnset(newUICommand, *this, winrt::SwipeItem::TextProperty());
00061         CommandingHelpers::BindToIconSourcePropertyIfUnset(newUICommand, *this, winrt::SwipeItem::IconSourceProperty());
00062     }
00063 }
00064
00065 void SwipeItem::GenerateControl(const winrt::AppBarButton& appBarButton, const winrt::Style& swipeItemStyle)
00066 {
00067     appBarButton.Style(swipeItemStyle);
00068     if (Background())
00069     {
00070         appBarButton.Background(Background());
00071     }
00072
00073     if (Foreground())
00074     {
00075         appBarButton.Foreground(Foreground());
00076     }
00077
00078     if (auto const source = IconSource())
00079     {
00080         appBarButton.Icon(SharedHelpers::MakeIconElementFrom(source));
00081     }
00082
00083     appBarButton.Label(Text());
00084     AttachEventHandlers(appBarButton);
00085 }
00086
00087
00088 void SwipeItem::AttachEventHandlers(const winrt::AppBarButton& appBarButton)
00089 {
00090     auto weakThis = get_weak();
00091     appBarButton.Tapped({ [weakThis](auto& sender, auto& args) {
00092         if (auto temp = weakThis.get()) temp->OnItemTapped(sender, args);
00093     } });
00094     appBarButton.PointerPressed({ [weakThis](auto& sender, auto& args) {
00095         if (auto temp = weakThis.get()) temp->OnPointerPressed(sender, args);
00096     } });
00097 }
00098
00099 void SwipeItem::OnItemTapped(
00100     const winrt::IInspectable& sender,
00101     const winrt::TappedRoutedEventArgs& args)
00102 {
00103     auto current = winrt::VisualTreeHelper::GetParent(sender.try_as<winrt::DependencyObject>());
00104     while (current)
00105     {
00106         auto control = current.try_as<winrt::SwipeControl>();
00107         if (control)
00108         {
00109             InvokeSwipe(control);
00110             args.Handled(true);
00111         }
00112         current = winrt::VisualTreeHelper::GetParent(current);
00113     }
00114 }
00115
00116 void SwipeItem::OnPointerPressed(
00117     const winrt::IInspectable& /*sender*/,
00118     const winrt::PointerRoutedEventArgs& args)
00119 {
00120     if (args.Pointer().PointerDeviceType() == winrt::PointerDeviceType::Touch)
00121     {
00122         // if we press an item, we want to handle it and not let the parent SwipeControl receive the input
00123         args.Handled(true);
00124     }
00125 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/AnimationUtility.cpp Source File

  • File List
  • File Members
  • Lights

AnimationUtility.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "AnimationUtility.h"
00007
00008 void SetValueDirect(const winrt::CompositionPropertySet& target, std::wstring_view const& propName, const float value)
00009 {
00010     target.InsertScalar(propName, value);
00011 }
00012
00013 void SetValueDirect(const winrt::CompositionPropertySet& target, std::wstring_view const& propName, const winrt::Color& value)
00014 {
00015     target.InsertColor(propName, value);
00016 }
00017
00018 void SetValueDirect(const winrt::SpotLight& target, const SpotlightProperty prop, const winrt::float3& value)
00019 {
00020     switch (prop)
00021     {
00022     case SpotlightProperty::Offset:
00023         target.Offset(value);
00024         break;
00025     case SpotlightProperty::Direction:
00026         target.Direction(value);
00027         break;
00028     }
00029 }
00030
00031 void SetValueDirect(const winrt::SpotLight& target, const SpotlightProperty prop, const float value)
00032 {
00033     switch (prop)
00034     {
00035     case SpotlightProperty::ConstantAttenuation:
00036         target.ConstantAttenuation(value);
00037         break;
00038     case SpotlightProperty::LinearAttenuation:
00039         target.LinearAttenuation(value);
00040         break;
00041     case SpotlightProperty::QuadraticAttenuation:
00042         target.QuadraticAttenuation(value);
00043         break;
00044     case SpotlightProperty::InnerConeAngleInDegrees:
00045         target.InnerConeAngleInDegrees(value);
00046         break;
00047     case SpotlightProperty::InnerConeAngle:
00048         target.InnerConeAngle(value);
00049         break;
00050     case SpotlightProperty::InnerConeIntensity:
00051         target.InnerConeIntensity(value);
00052         break;
00053     case SpotlightProperty::OuterConeAngleInDegrees:
00054         target.OuterConeAngleInDegrees(value);
00055         break;
00056     case SpotlightProperty::OuterConeAngle:
00057         target.OuterConeAngle(value);
00058         break;
00059     case SpotlightProperty::OuterConeIntensity:
00060         target.OuterConeIntensity(value);
00061         break;
00062     }
00063 }
00064
00065 void SetValueDirect(const winrt::CompositionPropertySet& target, const SpotlightProperty prop, const winrt::Color& value)
00066 {
00067     switch (prop)
00068     {
00069     case SpotlightProperty::InnerConeColor:
00070         target.InsertColor(L"InnerConeColor", value);
00071         break;
00072     case SpotlightProperty::OuterConeColor:
00073         target.InsertColor(L"OuterConeColor", value);
00074         break;
00075     }
00076 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealHoverLight.h Source File

  • File List
  • File Members
  • Lights

RevealHoverLight.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "MaterialHelper.h"
00006 #include "SpotLightStateHelper.h"
00007 #include "RevealTestApi.h"
00008
00009 #include "RevealHoverLight.g.h"
00010
00011 class PointerHoverElementHelper;
00012 class SoftLightSwitch;
00013
00014 class RevealHoverLight :
00015     public ReferenceTracker<RevealHoverLight, winrt::implementation::RevealHoverLightT>
00016 {
00017     friend RevealTestApi;
00018     friend MaterialHelperBase;
00019     friend MaterialHelper;
00020 public:
00021     static winrt::hstring& GetLightIdStatic();
00022
00023     // IXamlLightOverrides
00024     winrt::hstring GetId();
00025     void OnConnected(winrt::UIElement const& newElement);
00026     void OnDisconnected(winrt::UIElement const& oldElement);
00027
00028     void OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy);
00029
00030     void GoToState(_In_ winrt::RevealBrushState newState);
00031
00032     void SetIsPressLight(bool isPressLight) { m_isPressLight = isPressLight; }
00033     bool GetIsPressLight() { return m_isPressLight; }
00034     winrt::SpotLight GetLight() { return m_compositionSpotLight; } // For test APIs
00035
00036 public:
00037     // These can be adjusted for tweaking/development on DBG builds
00038 #if DBG
00039     static float s_lightMinSize;
00040     static float s_lightMaxSize;
00041     static float s_sizeAdjustment;
00042     static float s_pressOuterSize;
00043     static float s_innerConeAngleInDegrees;
00044     static float s_outerConeAngleInDegrees;
00045     static float s_spotlightHeight;
00046     static float s_constantAttenuation;
00047     static float s_linearAttenuation;
00048
00049 #else
00050     static const float s_constantAttenuation;
00051     static const float s_linearAttenuation;
00052 #endif
00053
00054     static std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> s_revealHoverSpotlightStates;
00055     static std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> s_pressSpotLightStates;
00056
00057     // For AggregableComObject
00058 protected:
00059     void InitializeImpl(_In_opt_ IInspectable* outer);
00060
00061 private:
00062     enum class LightStates { Off, AnimToHover, AnimToOff, Hover, Pressing, FastRelease, SlowRelease };
00063     enum class LightEvents { GotoNormal, GotoPointerOver, GotoPressed, AnimationComplete };
00064     LightStates m_currentLightState{ LightStates::Off };
00065
00066     void GotoLightState(LightEvents e);
00067     void GotoLightStateHelper(LightStates target, bool skipAnimation = false);
00068
00069     void EnableHoverAnimation();
00070     void DisableHoverAnimation();
00071
00072     winrt::ApplicationTheme GetCurrentTheme(const winrt::UIElement& target);
00073     void CancelCurrentPressStateContinuation();
00074
00075     void OnPointerPressed(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00076     void SwitchLight(bool turnOn);
00077
00078     void EnsureCompositionResources();
00079     void ReleaseCompositionResources();
00080
00081     winrt::weak_ref<winrt::UIElement> m_targetElement{ nullptr };
00082     winrt::ExpressionAnimation m_offsetAnimation{ nullptr };
00083     winrt::ExpressionAnimation m_outerAngleAnimation{ nullptr };
00084     bool m_isHoverAnimationActive{ false };
00085     winrt::CompositionPropertySet m_pointer{ nullptr };
00086     winrt::CompositionPropertySet m_offsetProps{ nullptr };
00087     winrt::SpotLight m_compositionSpotLight{ nullptr };
00088     winrt::CompositionPropertySet m_colorsProxy{ nullptr };
00089     bool m_isDisabledByMaterialPolicy{};
00090
00091     winrt::event_token m_materialPolicyChangedToken{};
00092
00093     std::function<void()> m_cancelCurrentPressStateContinuation;
00094     bool m_isPressed{};
00095     bool m_isPointerOver{};
00096     bool m_shouldLightBeOn{};
00097
00098     bool m_isPressLight{};
00099
00100     // We need to be able to center the hover light when a reveal enabled object is programmatically invoked.
00101     // For mouse and touch we will set this to false and have our light follow the pointer position.
00102     bool m_centerLight{ true };
00103
00104     const RevealHoverSpotlightStateDesc* m_spotLightStates{};
00105     winrt::IInspectable m_elementPointerPressedEventHandler{};
00106 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MockItemsSource Member List

This is the complete list of members for MockItemsSource, including all inherited members.
_getSizeCallsCount | MockItemsSource | [private]
_recordedGetAtCalls | MockItemsSource | [private]
_recordedKeyFromIndexCalls | MockItemsSource | [protected]
Add(object value) | CustomItemsSourceView | [inline]
Clear() | CustomItemsSourceView | [inline]
CollectionChanged | CustomItemsSourceView |
Contains(object value) | CustomItemsSourceView | [inline]
CopyTo(Array array, int index) | CustomItemsSourceView | [inline]
Count | CustomItemsSourceView |
CreateDataSource(WinRTCollection data, bool supportsUniqueIds) | MockItemsSource | [inline, static]
CreateDataSource< T >(ObservableCollection< T > data, bool supportsUniqueIds) | MockItemsSource | [inline, static]
GetAtCore(int index) | MockItemsSource | [inline, protected, virtual]
GetAtFunc | MockItemsSource |
GetEnumerator() | CustomItemsSourceView | [inline]
GetItemIdFunc | MockItemsSource |
GetSizeCore() | MockItemsSource | [inline, protected, virtual]
GetSizeFunc | MockItemsSource |
HasKeyIndexMappingFunc | MockItemsSource |
IndexOf(object value) | CustomItemsSourceView | [inline]
Insert(int index, object value) | CustomItemsSourceView | [inline]
IsFixedSize | CustomItemsSourceView |
IsReadOnly | CustomItemsSourceView |
IsSynchronized | CustomItemsSourceView |
OnItemsSourceChanged(NotifyCollectionChangedEventArgs args) | MockItemsSource | [inline]
Remove(object value) | CustomItemsSourceView | [inline]
RemoveAt(int index) | CustomItemsSourceView | [inline]
SyncRoot | CustomItemsSourceView |
this | CustomItemsSourceView |
ValidateGetAtCalls(params GetAtCallInfo[] expected) | MockItemsSource | [inline]
ValidateGetItemIdCalls(params KeyFromIndexCallInfo[] expected) | MockItemsSource | [inline]
ValidateGetSizeCalls(int expectedCallCount) | MockItemsSource | [inline]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

VirtualizingUniformStackLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.ObjectModel;
00005 using System.Linq;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008
00009 namespace MUXControlsTestApp.Samples
00010 {
00011     public sealed partial class VirtualizingUniformStackLayoutSamplePage : Page
00012     {
00013         ObservableCollection<int> data = new ObservableCollection<int>(Enumerable.Range(0, 1000));
00014         public VirtualizingUniformStackLayoutSamplePage()
00015         {
00016             this.InitializeComponent();
00017
00018             repeater.ItemTemplate = elementFactory;
00019             repeater.ItemsSource = data;
00020             bringIntoView.Click += BringIntoView_Click;
00021             insert.Click += Insert_Click;
00022         }
00023
00024         private void BringIntoView_Click(object sender, RoutedEventArgs e)
00025         {
00026             int index = 0;
00027             if (int.TryParse(tb.Text, out index))
00028             {
00029                 var anchor = repeater.GetOrCreateElement(index);
00030                 anchor.StartBringIntoView();
00031             }
00032         }
00033
00034         private void Insert_Click(object sender, RoutedEventArgs e)
00035         {
00036             int index = 0;
00037             if(!int.TryParse(indexTb.Text, out index))
00038             {
00039                 index = 0;
00040             }
00041
00042             int count = 1;
00043             if(!int.TryParse(countTb.Text, out count))
00044             {
00045                 count = 1;
00046             }
00047
00048             for (int i = 0; i < count; i++)
00049             {
00050                 data.Insert(index, 50000 + i);
00051             }
00052
00053         }
00054     }
00055 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkCanvasAutomationPeer Member List

This is the complete list of members for InkCanvasAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< InkCanvasAutomationPeer > &&self) noexcept | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
final_release(std::unique_ptr< InkCanvasAutomationPeer > &&self) | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | InkCanvasAutomationPeer |
GetBase() | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
GetClassNameCore() | InkCanvasAutomationPeer |
GetInner() | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
InkCanvasAutomationPeer(winrt::InkCanvas const &owner) | InkCanvasAutomationPeer |
IsOnThread() | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterTrace.h Source File

  • File List
  • File Members
  • Repeater

ItemsRepeaterTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsItemsRepeaterTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMSREPEATER || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsItemsRepeaterVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_ITEMSREPEATER || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsItemsRepeaterPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_ITEMSREPEATER || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define ITEMSREPEATER_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 ItemsRepeaterTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define ITEMSREPEATER_TRACE_INFO(sender, message, ...) \
00036 if (IsItemsRepeaterTracingEnabled()) \
00037 { \
00038     ITEMSREPEATER_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (ItemsRepeaterTrace::s_IsDebugOutputEnabled || ItemsRepeaterTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     ITEMSREPEATER_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define ITEMSREPEATER_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 ItemsRepeaterTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define ITEMSREPEATER_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsItemsRepeaterVerboseTracingEnabled()) \
00050 { \
00051     ITEMSREPEATER_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (ItemsRepeaterTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     ITEMSREPEATER_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define ITEMSREPEATER_TRACE_PERF(info) \
00059 if (IsItemsRepeaterPerfTracingEnabled()) \
00060 { \
00061     ItemsRepeaterTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define ITEMSREPEATER_TRACE_INFO_DBG(sender, message, ...)    ITEMSREPEATER_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define ITEMSREPEATER_TRACE_VERBOSE_DBG(sender, message, ...) ITEMSREPEATER_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define ITEMSREPEATER_TRACE_PERF_DBG(info)                    ITEMSREPEATER_TRACE_PERF(info)
00068 #else
00069 #define ITEMSREPEATER_TRACE_INFO_DBG(sender, message, ...)
00070 #define ITEMSREPEATER_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define ITEMSREPEATER_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class ItemsRepeaterTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[384]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "ItemsRepeaterInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_ITEMSREPEATER),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"ItemsRepeater") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[1024]{};
00121         const HRESULT hr = StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args);
00122         if (SUCCEEDED(hr) || hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
00123         {
00124             if (includeTraceLogging)
00125             {
00126                 // TraceViewers
00127                 // http://toolbox/pef
00128                 // http://fastetw/index.aspx
00129                 TraceLoggingWrite(
00130                     g_hLoggingProvider,
00131                     "ItemsRepeaterVerbose" /* eventName */,
00132                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00133                     TraceLoggingKeyword(KEYWORD_ITEMSREPEATER),
00134                     TraceLoggingWideString(buffer, "Message"));
00135             }
00136
00137             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00138             {
00139                 OutputDebugStringW(buffer);
00140             }
00141
00142             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00143
00144             if (globalTestHooks &&
00145                 (globalTestHooks->GetLoggingLevelForType(L"ItemsRepeater") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00146             {
00147                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00148             }
00149         }
00150         va_end(args);
00151     }
00152
00153     static void TracePerfInfo(PCWSTR info) noexcept
00154     {
00155         // TraceViewers
00156         // http://toolbox/pef
00157         // http://fastetw/index.aspx
00158         TraceLoggingWrite(
00159             g_hPerfProvider,
00160             "ItemsRepeaterPerf" /* eventName */,
00161             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00162             TraceLoggingKeyword(KEYWORD_ITEMSREPEATER),
00163             TraceLoggingWideString(info, "Info"));
00164     }
00165 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/ResourceAccessor.cpp Source File

  • File List
  • File Members
  • ResourceHelper

ResourceAccessor.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007
00008 #define LOC_PREFIX L"Microsoft.UI.Xaml"
00009 #define LOC_PREFIX_WINUI L"Microsoft.UI.Xaml"
00010
00011 PCWSTR ResourceAccessor::c_resourceLoc{ LOC_PREFIX L"/Resources" };
00012 PCWSTR ResourceAccessor::c_assetLoc{ L"Files/" LOC_PREFIX L"/Assets"};
00013 PCWSTR ResourceAccessor::c_resourceLocWinUI{ LOC_PREFIX_WINUI L"/Resources" };
00014
00015 winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager  ResourceAccessor::m_resourceManagerWinRT{ nullptr };
00016
00017 winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap ResourceAccessor::GetAssetMap()
00018 {
00019     return ResourceAccessor::GetResourceManager().MainResourceMap().GetSubtree(ResourceAccessor::c_assetLoc);
00020 }
00021
00022 winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap ResourceAccessor::GetResourceMap()
00023 {
00024     return ResourceAccessor::GetResourceManager().MainResourceMap().GetSubtree(ResourceAccessor::c_resourceLoc);
00025 }
00026
00027 winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager ResourceAccessor::GetResourceManagerImpl()
00028 {
00029     winrt::hstring frameworkInstallLocation;
00030     if (m_resourceManagerWinRT == nullptr)
00031     {
00032         if (SharedHelpers::IsInFrameworkPackage(frameworkInstallLocation))
00033         {
00034             ResourceAccessor::m_resourceManagerWinRT = winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager(frameworkInstallLocation + L"\\resources.pri");
00035         }
00036         else
00037         {
00038             ResourceAccessor:: m_resourceManagerWinRT = winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager();
00039         }
00040     }
00041     return m_resourceManagerWinRT;
00042 }
00043
00044 winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager ResourceAccessor::GetResourceManager()
00045 {
00046     auto static resourceManager = ResourceAccessor::GetResourceManagerImpl();
00047     return resourceManager;
00048 }
00049
00050 winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceContext ResourceAccessor::GetResourceContext()
00051 {
00052     auto static m_resourceContextWinRT = ResourceAccessor::GetResourceManager().CreateResourceContext();
00053     return m_resourceContextWinRT;
00054 }
00055
00056
00057 winrt::hstring ResourceAccessor::GetLocalizedStringResource(const wstring_view& resourceName)
00058 {
00059     static auto mrt_lifted_resourceMap = GetResourceMap();
00060     static auto mrt_lifted_resourceContext = GetResourceContext();
00061     return mrt_lifted_resourceMap.GetValue(resourceName, mrt_lifted_resourceContext).ValueAsString();
00062 }
00063
00064 winrt::LoadedImageSurface ResourceAccessor::GetImageSurface(const wstring_view& assetName, winrt::Size imageSize)
00065 {
00066     auto imageUri = winrt::Uri{ std::wstring(L"ms-resource:///Files/Microsoft.UI.Xaml/Assets/") + std::wstring(assetName.data()) + std::wstring(L".png") };
00067     return winrt::LoadedImageSurface::StartLoadFromUri(imageUri, imageSize);
00068 }
00069
00070 winrt::IAsyncOperation<winrt::hstring> ResourceAccessor::GetFileContents(const wstring_view& assetFileName)
00071 {
00072     static auto mrt_lifted_assetMap = GetAssetMap();
00073     static auto mrt_lifted_resourceContext = GetResourceContext();
00074     auto filePath = mrt_lifted_assetMap.GetValue(assetFileName, mrt_lifted_resourceContext).ValueAsString();
00075     auto file = co_await winrt::StorageFile::GetFileFromPathAsync(filePath);
00076     auto fileBuffer = co_await winrt::FileIO::ReadBufferAsync(file);
00077     auto fileReader = winrt::DataReader::FromBuffer(fileBuffer);
00078     co_return fileReader.ReadString(fileReader.UnconsumedBufferLength());
00079 }
00080
00081 winrt::IInspectable ResourceAccessor::ResourceLookup(const winrt::Control& control, const winrt::IInspectable& key)
00082 {
00083     return control.Resources().HasKey(key) ? control.Resources().Lookup(key) : winrt::Application::Current().Resources().TryLookup(key);
00084 }
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/SharedHelpers.cpp Source File

  • File List
  • File Members
  • dll

SharedHelpers.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MUXControlsFactory.h"
00007 #include "SharedHelpers.h"
00008
00009 #include <appmodel.h>
00010 #include <roapi.h>
00011
00012 // This needs to be here instead of in CppWinRTIncludes.h because it includes Microsoft.UI.h,
00013 // which contains definitions of a few types like WindowId that conflict with their definitions
00014 // in Microsoft.UI.Content.h.
00015 #include <winrt\Microsoft.UI.Interop.h>
00016
00017 // Package constants copied from AppModel.h. These values were only defined for Vb and later;
00018 // when passed as flags to ::GetCurrentPackageInfo() on pre-Vb, they are simply ignored.
00019 #define PACKAGE_PROPERTY_STATIC             0x00080000
00020 #define PACKAGE_FILTER_STATIC               PACKAGE_PROPERTY_STATIC
00021 #define PACKAGE_PROPERTY_DYNAMIC            0x00100000
00022 #define PACKAGE_FILTER_DYNAMIC              PACKAGE_PROPERTY_DYNAMIC
00023
00024 bool SharedHelpers::s_isOnXboxInitialized{ false };
00025 bool SharedHelpers::s_isOnXbox{ false };
00026 bool SharedHelpers::s_isMouseModeEnabledInitialized{ false };
00027 bool SharedHelpers::s_isMouseModeEnabled{ false };
00028
00029 bool SharedHelpers::IsAnimationsEnabled()
00030 {
00031     winrt::UISettings uiSettings = winrt::UISettings();
00032     return uiSettings.AnimationsEnabled();
00033 }
00034
00035 bool SharedHelpers::IsInDesignMode()
00036 {
00037     // Design mode V2 can do many things that V1 could not do. Codepaths that were checking for design mode should generally be
00038     // let through if V2 is enabled.
00039     return IsInDesignModeV1();
00040 }
00041
00042 bool SharedHelpers::IsInDesignModeV1()
00043 {
00044     static bool s_isInDesignModeV1 = winrt::Windows::ApplicationModel::DesignMode::DesignModeEnabled() && !IsInDesignModeV2();
00045     return s_isInDesignModeV1;
00046 }
00047
00048 bool SharedHelpers::IsInDesignModeV2()
00049 {
00050     static bool s_isInDesignModeV2 = winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 5) && winrt::Windows::ApplicationModel::DesignMode::DesignMode2Enabled();
00051     return s_isInDesignModeV2;
00052 }
00053
00054 bool SharedHelpers::IsCoreWindowActivationModeAvailable()
00055 {
00056     // In RS3 we got CoreWindow.ActivationMode API which can be queried for window activation state,
00057     // and particularly in a Component UI host appto check if the compoenent is active (while host isn't).
00058     static bool s_isAvailable = winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 5);
00059     return s_isAvailable;
00060 }
00061
00062 bool SharedHelpers::IsApplicationViewGetDisplayRegionsAvailable()
00063 {
00064     static bool s_isApplicationViewGetDisplayRegionsAvailable =
00065         winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 8) ||
00066         winrt::ApiInformation::IsMethodPresent(L"Windows.UI.ViewManagement.ApplicationView", L"GetDisplayRegions");
00067     return s_isApplicationViewGetDisplayRegionsAvailable;
00068 }
00069
00070 namespace
00071 {
00072     constexpr wchar_t c_reunionPackageNamePrefix[] = L"Microsoft.WindowsAppRuntime";
00073     constexpr int c_reunionPackageNamePrefixLength = ARRAYSIZE(c_reunionPackageNamePrefix) - 1;
00074
00075     // Tries to retrieve the current package graph. Will return true if a package graph exists
00076     // and is non-empty, else false.
00077     bool TryGetCurrentPackageGraph(
00078         const std::uint32_t flags,
00079         std::uint32_t& packageCount,
00080         const PACKAGE_INFO*& packageGraph,
00081         std::unique_ptr<BYTE[]>& buffer)
00082     {
00083         std::uint32_t bufferLength{};
00084         LONG rc{ ::GetCurrentPackageInfo(flags, &bufferLength, nullptr, nullptr) };
00085         if ((rc == APPMODEL_ERROR_NO_PACKAGE) || (rc == ERROR_SUCCESS))
00086         {
00087             // No/empty package graph
00088             return false;
00089         }
00090         else if (rc != ERROR_INSUFFICIENT_BUFFER)
00091         {
00092             if (FAILED(HRESULT_FROM_WIN32(rc)))
00093             {
00094                 return false;
00095             }
00096         }
00097
00098         buffer = std::make_unique<BYTE[]>(bufferLength);
00099         if (SUCCEEDED(HRESULT_FROM_WIN32(::GetCurrentPackageInfo(flags, &bufferLength, buffer.get(), &packageCount))))
00100         {
00101             packageGraph = reinterpret_cast<PACKAGE_INFO*>(buffer.get());
00102             return true;
00103         }
00104
00105         return false;
00106     }
00107
00108     bool IsInFrameworkPackageImpl(winrt::hstring& frameworkInstallLocation)
00109     {
00110         // We could be running in an app that is using WinUI "In-App" (i.e. the WinUI dlls are deployed as part of the app).
00111         // Or we could be running in the Project Reunion Framework Package that an app takes a dependency on.
00112         // We determine if we are in a Framework Package by looking at the App's package dependencies. If the app has a Project Reunion dependency
00113         // then we must be running in a Framework Package.
00114         const UINT32 c_filter{ PACKAGE_FILTER_HEAD | PACKAGE_FILTER_DIRECT | PACKAGE_FILTER_STATIC | PACKAGE_FILTER_DYNAMIC | PACKAGE_INFORMATION_BASIC };
00115         std::uint32_t packageCount{};
00116         const PACKAGE_INFO* packageGraph{};
00117         std::unique_ptr<BYTE[]> packageBuffer;
00118         if (TryGetCurrentPackageGraph(c_filter, packageCount, packageGraph, packageBuffer))
00119         {
00120             if (packageGraph)
00121             {
00122                 for (std::uint32_t index=0; index < packageCount; index++)
00123                 {
00124                     const PACKAGE_INFO& packageInfo{ packageGraph[index] };
00125
00126                     // We use FamilyName here and not DisplayName because DisplayName is a localized string, but FamilyName is a stable identifier.
00127                     auto packageFamilyName = packageInfo.packageFamilyName;
00128                     int nameLength{ static_cast<int>(wcslen(packageFamilyName)) };
00129
00130                     if (nameLength < c_reunionPackageNamePrefixLength)
00131                     {
00132                         continue;
00133                     }
00134
00135                     if (
00136                        CompareStringOrdinal(
00137                         packageFamilyName,
00138                         c_reunionPackageNamePrefixLength,
00139                         c_reunionPackageNamePrefix,
00140                         c_reunionPackageNamePrefixLength,
00141                         TRUE) == CSTR_EQUAL)
00142                     {
00143                         frameworkInstallLocation = winrt::hstring(packageInfo.path);
00144                         return true;
00145                     }
00146                 }
00147             }
00148         }
00149         return false;
00150     }
00151 }
00152
00153 bool SharedHelpers::IsInFrameworkPackage()
00154 {
00155     //unused l-value
00156     static winrt::hstring s;
00157     return IsInFrameworkPackageImpl(s);
00158 }
00159
00160 bool SharedHelpers::IsInFrameworkPackage(winrt::hstring& frameworkPackageInstallLocation)
00161 {
00162     static winrt::hstring s_frameworkInstallLocation;
00163     static bool isInFrameworkPackage = IsInFrameworkPackageImpl(s_frameworkInstallLocation);
00164     frameworkPackageInstallLocation = s_frameworkInstallLocation;
00165
00166     return isInFrameworkPackage;
00167 }
00168
00169 // Platform scale helpers
00170 winrt::Rect SharedHelpers::ConvertDipsToPhysical(winrt::UIElement const& xamlRootReference, const winrt::Rect& dipsRect)
00171 {
00172     try
00173     {
00174         const auto scaleFactor = static_cast<float>(xamlRootReference.XamlRoot().RasterizationScale());
00175         return winrt::Rect
00176         {
00177             dipsRect.X * scaleFactor,
00178             dipsRect.Y * scaleFactor,
00179             dipsRect.Width * scaleFactor,
00180             dipsRect.Height * scaleFactor
00181         };
00182     }
00183     catch (winrt::hresult_error)
00184     {
00185         // Calling GetForCurrentView on threads without a CoreWindow throws an error. This comes up in places like LogonUI.
00186         // In this circumstance, we'll just always expand down, since we can't get bounds information.
00187     }
00188
00189     return dipsRect;
00190 }
00191
00192 bool SharedHelpers::IsOnXbox()
00193 {
00194     if (!s_isOnXboxInitialized)
00195     {
00196         auto deviceFamily = winrt::AnalyticsInfo::VersionInfo().DeviceFamily();
00197         s_isOnXbox = (deviceFamily == L"Windows.Xbox")
00198             || (deviceFamily == L"Windows.XBoxSRA")
00199             || (deviceFamily == L"Windows.XBoxERA");
00200         s_isOnXboxInitialized = true;
00201     }
00202     return s_isOnXbox;
00203 }
00204
00205 bool SharedHelpers::IsMouseModeEnabled()
00206 {
00207     if (!s_isMouseModeEnabledInitialized)
00208     {
00209         s_isMouseModeEnabled = winrt::Application::Current().RequiresPointerMode() == winrt::ApplicationRequiresPointerMode::Auto;
00210         s_isMouseModeEnabledInitialized = true;
00211     }
00212     return s_isMouseModeEnabled;
00213 }
00214
00215 void SharedHelpers::ScheduleActionAfterWait(
00216     std::function<void()> const& action,
00217     unsigned int millisecondWait)
00218 {
00219     if(auto dispatcherQueue = winrt::DispatcherQueue::GetForCurrentThread())
00220     {
00221         // The callback that is given to CreateTimer is called off of the UI thread.
00222         // In order to make this useful by making it so we can interact with XAML objects,
00223         // we'll use the dispatcher to first post our work to the UI thread before executing it.
00224         auto timer = winrt::ThreadPoolTimer::CreateTimer(winrt::TimerElapsedHandler(
00225             [action, dispatcherQueue](auto const&)
00226             {
00227                 dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler(action));
00228             }),
00229             std::chrono::milliseconds{ millisecondWait });
00230     }
00231 }
00232
00233
00234 // Stream helpers
00235 winrt::InMemoryRandomAccessStream SharedHelpers::CreateStreamFromBytes(const winrt::array_view<const byte>& bytes)
00236 {
00237     winrt::InMemoryRandomAccessStream stream;
00238     winrt::DataWriter writer(stream);
00239
00240     writer.WriteBytes(winrt::array_view<const byte>(bytes));
00241     SyncWait(writer.StoreAsync());
00242     SyncWait(writer.FlushAsync());
00243     auto detachedStream = writer.DetachStream();
00244     writer.Close();
00245
00246     stream.Seek(0);
00247
00248     return stream;
00249 }
00250
00251 void SharedHelpers::QueueCallbackForCompositionRendering(std::function<void()> callback)
00252 {
00253     try
00254     {
00255         auto renderingEventToken = std::make_shared<winrt::event_token>();
00256         *renderingEventToken = winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering([renderingEventToken, callback](auto&, auto&) {
00257
00258             // Detach event or Rendering will keep calling us back.
00259             winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering(*renderingEventToken);
00260
00261             callback();
00262         });
00263     }
00264     catch (const winrt::hresult_error &e)
00265     {
00266         // DirectUI::CompositionTarget::add_Rendering can fail with RPC_E_WRONG_THREAD if called while the Xaml Core is being shutdown,
00267         // and there is evidence from Watson that such calls are made in real apps (see Bug 13554197).
00268         // Since the core is being shutdown, we no longer care about whatever work we wanted to defer to CT.Rendering, so ignore this error.
00269         if (e.to_abi() != RPC_E_WRONG_THREAD) { throw; }
00270     }
00271 }
00272
00273 // Rect helpers
00274
00275 bool SharedHelpers::DoesRectContainPoint(
00276     const winrt::Rect& rect,
00277     const winrt::Point& point)
00278 {
00279     return winrt::RectHelper::Contains(rect, point);
00280 }
00281
00282 bool SharedHelpers::DoesRectContainPoint(
00283     const winrt::RectInt32& rect,
00284     const winrt::PointInt32& point)
00285 {
00286     const auto doesContain =
00287         rect.X <= point.X &&
00288         rect.X + rect.Width >= point.X &&
00289         rect.Y <= point.Y &&
00290         rect.Y + rect.Height >= point.Y;
00291     return doesContain;
00292 }
00293
00294 // Returns TRUE if either rect is empty or the rects
00295 // have an empty intersection.
00296 bool SharedHelpers::DoRectsIntersect(
00297     const winrt::Rect& rect1,
00298     const winrt::Rect& rect2)
00299 {
00300     const auto doIntersect =
00301         !(rect1.Width <= 0 || rect1.Height <= 0 || rect2.Width <= 0 || rect2.Height <= 0) &&
00302         (rect2.X <= rect1.X + rect1.Width) &&
00303         (rect2.X + rect2.Width >= rect1.X) &&
00304         (rect2.Y <= rect1.Y + rect1.Height) &&
00305         (rect2.Y + rect2.Height >= rect1.Y);
00306     return doIntersect;
00307 }
00308
00309 winrt::IInspectable SharedHelpers::FindResource(const std::wstring_view& resource, const winrt::ResourceDictionary& resources, const winrt::IInspectable& defaultValue)
00310 {
00311     auto boxedResource = box_value(resource);
00312     return resources.HasKey(boxedResource) ? resources.Lookup(boxedResource) : defaultValue;
00313 }
00314
00315 winrt::IInspectable SharedHelpers::FindInApplicationResources(const std::wstring_view& resource, const winrt::IInspectable& defaultValue)
00316 {
00317     return SharedHelpers::FindResource(resource, winrt::Application::Current().Resources(), defaultValue);
00318 }
00319
00320 // When checkVisibility is True, IsAncestor additionally checks if any UIElement from the 'child'
00321 // to the 'parent' chain is Collapsed. It returns False when that is the case.
00322 bool SharedHelpers::IsAncestor(
00323     const winrt::DependencyObject& child,
00324     const winrt::DependencyObject& parent,
00325     bool checkVisibility)
00326 {
00327     if (!child || !parent || child == parent)
00328     {
00329         return false;
00330     }
00331
00332     if (checkVisibility)
00333     {
00334         winrt::IUIElement parentAsUIE = parent.as<winrt::IUIElement>();
00335
00336         if (parentAsUIE && parentAsUIE.Visibility() == winrt::Visibility::Collapsed)
00337         {
00338             return false;
00339         }
00340
00341         winrt::IUIElement childAsUIE = child.as<winrt::IUIElement>();
00342
00343         if (childAsUIE && childAsUIE.Visibility() == winrt::Visibility::Collapsed)
00344         {
00345             return false;
00346         }
00347     }
00348
00349     winrt::DependencyObject parentTemp = winrt::VisualTreeHelper::GetParent(child);
00350     while (parentTemp)
00351     {
00352         if (checkVisibility)
00353         {
00354             winrt::IUIElement parentTempAsUIE = parentTemp.as<winrt::IUIElement>();
00355
00356             if (parentTempAsUIE && parentTempAsUIE.Visibility() == winrt::Visibility::Collapsed)
00357             {
00358                 return false;
00359             }
00360         }
00361
00362         if (parentTemp == parent)
00363         {
00364             return true;
00365         }
00366
00367         parentTemp = winrt::VisualTreeHelper::GetParent(parentTemp);
00368     }
00369
00370     return false;
00371 }
00372
00373 bool SharedHelpers::IsFocusableElement(
00374     winrt::UIElement const& element)
00375 {
00376     if (element.Visibility() == winrt::Visibility::Collapsed)
00377     {
00378         return false;
00379     }
00380
00381     auto const& control = element.try_as<winrt::Control>();
00382
00383     return control && (control.IsEnabled() || control.AllowFocusWhenDisabled()) && control.IsTabStop();
00384 }
00385
00386 #if defined(TITLEBAR_INCLUDED) || defined(SWIPECONTROL_INCLUDED) || defined(TEACHINGTIP_INCLUDED) || defined(TABVIEW_INCLUDED)
00387
00388 winrt::IconElement SharedHelpers::MakeIconElementFrom(winrt::IconSource const& iconSource)
00389 {
00390     if (auto fontIconSource = iconSource.try_as<winrt::FontIconSource>())
00391     {
00392         winrt::FontIcon fontIcon;
00393
00394         fontIcon.Glyph(fontIconSource.Glyph());
00395         fontIcon.FontSize(fontIconSource.FontSize());
00396         if (const auto newForeground = fontIconSource.Foreground())
00397         {
00398             fontIcon.Foreground(newForeground);
00399         }
00400
00401         if (fontIconSource.FontFamily())
00402         {
00403             fontIcon.FontFamily(fontIconSource.FontFamily());
00404         }
00405
00406         fontIcon.FontWeight(fontIconSource.FontWeight());
00407         fontIcon.FontStyle(fontIconSource.FontStyle());
00408         fontIcon.IsTextScaleFactorEnabled(fontIconSource.IsTextScaleFactorEnabled());
00409         fontIcon.MirroredWhenRightToLeft(fontIconSource.MirroredWhenRightToLeft());
00410
00411         return fontIcon;
00412     }
00413     else if (auto symbolIconSource = iconSource.try_as<winrt::SymbolIconSource>())
00414     {
00415         winrt::SymbolIcon symbolIcon;
00416         symbolIcon.Symbol(symbolIconSource.Symbol());
00417         if (const auto newForeground = symbolIconSource.Foreground())
00418         {
00419             symbolIcon.Foreground(newForeground);
00420         }
00421         return symbolIcon;
00422     }
00423 #if defined(IMAGEICON_INCLUDED)
00424     // Note: this check must be done before BitmapIconSource
00425     // since ImageIconSource uses BitmapIconSource as a composable interface,
00426     // so a ImageIconSource will also register as a BitmapIconSource.
00427     else if (auto imageIconSource = iconSource.try_as<winrt::ImageIconSource>())
00428     {
00429         winrt::ImageIcon imageIcon;
00430         if (const auto imageSource = imageIconSource.ImageSource())
00431         {
00432             imageIcon.Source(imageSource);
00433         }
00434         if (const auto newForeground = imageIconSource.Foreground())
00435         {
00436             imageIcon.Foreground(newForeground);
00437         }
00438         return imageIcon;
00439     }
00440 #endif
00441     else if (auto bitmapIconSource = iconSource.try_as<winrt::BitmapIconSource>())
00442     {
00443         winrt::BitmapIcon bitmapIcon;
00444
00445         if (bitmapIconSource.UriSource())
00446         {
00447             bitmapIcon.UriSource(bitmapIconSource.UriSource());
00448         }
00449
00450         bitmapIcon.ShowAsMonochrome(bitmapIconSource.ShowAsMonochrome());
00451
00452         if (const auto newForeground = bitmapIconSource.Foreground())
00453         {
00454             bitmapIcon.Foreground(newForeground);
00455         }
00456
00457         return bitmapIcon;
00458     }
00459 #if defined(ANIMATEDICON_INCLUDED)
00460     // Note: this check must be done before PathIconSource
00461     // since AnimatedIconSource uses PathIconSource as a composable interface,
00462     // so a AnimatedIconSource will also register as a PathIconSource.
00463     else if (auto animatedIconSource = iconSource.try_as<winrt::AnimatedIconSource>())
00464     {
00465         winrt::AnimatedIcon animatedIcon;
00466         if (auto const source = animatedIconSource.Source())
00467         {
00468             animatedIcon.Source(source);
00469         }
00470         if (auto const fallbackIconSource = animatedIconSource.FallbackIconSource())
00471         {
00472             animatedIcon.FallbackIconSource(fallbackIconSource);
00473         }
00474         if (const auto newForeground = animatedIconSource.Foreground())
00475         {
00476             animatedIcon.Foreground(newForeground);
00477         }
00478         return animatedIcon;
00479     }
00480 #endif
00481     else if (auto pathIconSource = iconSource.try_as<winrt::PathIconSource>())
00482     {
00483         winrt::PathIcon pathIcon;
00484
00485         if (pathIconSource.Data())
00486         {
00487             pathIcon.Data(pathIconSource.Data());
00488         }
00489         if (const auto newForeground = pathIconSource.Foreground())
00490         {
00491             pathIcon.Foreground(newForeground);
00492         }
00493         return pathIcon;
00494     }
00495
00496     return nullptr;
00497 }
00498 #endif
00499
00500 void SharedHelpers::SetBinding(
00501     std::wstring_view const& pathString,
00502     winrt::DependencyObject const& target,
00503     winrt::DependencyProperty const& targetProperty)
00504 {
00505     winrt::Binding binding;
00506     winrt::RelativeSource relativeSource;
00507     relativeSource.Mode(winrt::RelativeSourceMode::TemplatedParent);
00508     binding.RelativeSource(relativeSource);
00509
00510     binding.Path(winrt::PropertyPath(pathString));
00511
00512     winrt::BindingOperations::SetBinding(target, targetProperty, binding);
00513 }
00514
00515 // Be cautious: this function may introduce memory leak because Source holds strong reference to target too
00516 // There’s an intermediary object – the BindingExpression when BindingOperations::SetBinding
00517 // For example, if source is NavigationView and target is content control,
00518 // and there is strong reference: NavigationView -> ContentControl
00519 // BindingExpression.Source also make a strong reference to NavigationView
00520 // and it introduces the cycle: ContentControl -> BindingExpression -> NavigationView -> ContentControl
00521 // Prefer to use RelativeSource version of SetBinding if possible.
00522 void SharedHelpers::SetBinding(
00523     winrt::IInspectable const& source,
00524     std::wstring_view const& pathString,
00525     winrt::DependencyObject const& target,
00526     winrt::DependencyProperty const& targetProperty,
00527     winrt::IValueConverter const& converter,
00528     winrt::BindingMode mode)
00529 {
00530     winrt::Binding binding;
00531     binding.Source(source);
00532
00533     binding.Path(winrt::PropertyPath(pathString));
00534     binding.Mode(mode);
00535
00536     if (converter)
00537     {
00538         binding.Converter(converter);
00539     }
00540
00541     winrt::BindingOperations::SetBinding(target, targetProperty, binding);
00542 }
00543
00544 winrt::ITextSelection SharedHelpers::GetRichTextSelection(winrt::RichEditBox const& richEditBox)
00545 {
00546     return richEditBox.Document() ? richEditBox.Document().Selection() : nullptr;
00547 }
00548
00549 winrt::VirtualKey SharedHelpers::GetVirtualKeyFromChar(WCHAR c)
00550 {
00551     switch (c)
00552     {
00553     case L'A':
00554     case L'a':
00555         return winrt::VirtualKey::A;
00556     case L'B':
00557     case L'b':
00558         return winrt::VirtualKey::B;
00559     case L'C':
00560     case L'c':
00561         return winrt::VirtualKey::C;
00562     case L'D':
00563     case L'd':
00564         return winrt::VirtualKey::D;
00565     case L'E':
00566     case L'e':
00567         return winrt::VirtualKey::E;
00568     case L'F':
00569     case L'f':
00570         return winrt::VirtualKey::F;
00571     case L'G':
00572     case L'g':
00573         return winrt::VirtualKey::G;
00574     case L'H':
00575     case L'h':
00576         return winrt::VirtualKey::H;
00577     case L'I':
00578     case L'i':
00579         return winrt::VirtualKey::I;
00580     case L'J':
00581     case L'j':
00582         return winrt::VirtualKey::J;
00583     case L'K':
00584     case L'k':
00585         return winrt::VirtualKey::K;
00586     case L'L':
00587     case L'l':
00588         return winrt::VirtualKey::L;
00589     case L'M':
00590     case L'm':
00591         return winrt::VirtualKey::M;
00592     case L'N':
00593     case L'n':
00594         return winrt::VirtualKey::N;
00595     case L'O':
00596     case L'o':
00597         return winrt::VirtualKey::O;
00598     case L'P':
00599     case L'p':
00600         return winrt::VirtualKey::P;
00601     case L'Q':
00602     case L'q':
00603         return winrt::VirtualKey::Q;
00604     case L'R':
00605     case L'r':
00606         return winrt::VirtualKey::R;
00607     case L'S':
00608     case L's':
00609         return winrt::VirtualKey::S;
00610     case L'T':
00611     case L't':
00612         return winrt::VirtualKey::T;
00613     case L'U':
00614     case L'u':
00615         return winrt::VirtualKey::U;
00616     case L'V':
00617     case L'v':
00618         return winrt::VirtualKey::V;
00619     case L'W':
00620     case L'w':
00621         return winrt::VirtualKey::W;
00622     case L'X':
00623     case L'x':
00624         return winrt::VirtualKey::X;
00625     case L'Y':
00626     case L'y':
00627         return winrt::VirtualKey::Y;
00628     case L'Z':
00629     case L'z':
00630         return winrt::VirtualKey::Z;
00631     default:
00632         return winrt::VirtualKey::None;
00633     }
00634 }
00635
00636 // Sometimes we want to get a string representation from an arbitrary object. E.g. for constructing a UIA Name
00637 // from an automation peer. There is no guarantee that an arbitrary object is convertable to a string, so
00638 // this function may return an empty string.
00639 winrt::hstring SharedHelpers::TryGetStringRepresentationFromObject(winrt::IInspectable obj)
00640 {
00641     winrt::hstring returnHString;
00642
00643     if(obj)
00644     {
00645         if (auto stringable = obj.try_as<winrt::IStringable>())
00646         {
00647             returnHString = stringable.ToString();
00648         }
00649         if(returnHString.empty())
00650         {
00651             returnHString = winrt::unbox_value_or<winrt::hstring>(obj, returnHString);
00652         }
00653     }
00654
00655     return returnHString;
00656 }
00657
00658 /* static */
00659 winrt::float4 SharedHelpers::RgbaColor(const winrt::Color& color)
00660 {
00661     return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
00662 }
00663
00664
00665 // To avoid having to call a potentially throwing cppwinrt api, we call directly through the abi.
00666 // We don't want to include the entirety of the abi headers, so we just reproduce the single interface
00667 // that we need.
00668 namespace ABI::Windows::ApplicationModel::Core
00669 {
00670     MIDL_INTERFACE("0AACF7A4-5E1D-49DF-8034-FB6A68BC5ED1")
00671         ICoreApplication : public IInspectable
00672     {
00673         virtual HRESULT STDMETHODCALLTYPE get_Id(HSTRING * value) = 0;
00674         virtual HRESULT STDMETHODCALLTYPE add_Suspending(void* handler, EventRegistrationToken* token) = 0;
00675         virtual HRESULT STDMETHODCALLTYPE remove_Suspending(EventRegistrationToken token) = 0;
00676         virtual HRESULT STDMETHODCALLTYPE add_Resuming(void* handler, EventRegistrationToken* token) = 0;
00677         virtual HRESULT STDMETHODCALLTYPE remove_Resuming(EventRegistrationToken token) = 0;
00678         virtual HRESULT STDMETHODCALLTYPE get_Properties(void** value) = 0;
00679         virtual HRESULT STDMETHODCALLTYPE GetCurrentView(void** value) = 0;
00680         virtual HRESULT STDMETHODCALLTYPE Run(void* viewSource) = 0;
00681         virtual HRESULT STDMETHODCALLTYPE RunWithActivationFactories(void* activationFactoryCallback) = 0;
00682     };
00683 }
00684
00685
00686 winrt::CoreApplicationView SharedHelpers::TryGetCurrentCoreApplicationView()
00687 {
00688     winrt::CoreApplicationView view{ nullptr };
00689
00690     // We could call winrt::CoreApplication::GetCurrentView() here, but that can throw in some cases. Even if we catch, it will still
00691     // generate exception noise in the debugger.
00692     // Check if we have a CoreWindow to avoid throwing and catching an exception which can be annoying during debugging.
00693     if (winrt::CoreWindow::GetForCurrentThread())
00694     {
00695         auto coreApplication = winrt::get_activation_factory<winrt::CoreApplication, ABI::Windows::ApplicationModel::Core::ICoreApplication>();
00696         auto ignorehr = coreApplication->GetCurrentView(winrt::put_abi(view));
00697     }
00698
00699     return view;
00700 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicRenderingPage::SampledColors Member List

This is the complete list of members for AcrylicRenderingPage::SampledColors, including all inherited members.
c1 | AcrylicRenderingPage::SampledColors
c2 | AcrylicRenderingPage::SampledColors
c3 | AcrylicRenderingPage::SampledColors
c4 | AcrylicRenderingPage::SampledColors
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsView.idl Source File

  • File List
  • File Members
  • ItemsView

ItemsView.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC_V5]
00005 [webhosthidden]
00006 enum ItemsViewSelectionMode
00007 {
00008     None = 0,
00009     Single = 1,
00010     Multiple = 2,
00011     Extended = 3,
00012 };
00013
00014 [MUX_PUBLIC_V5]
00015 [webhosthidden]
00016 runtimeclass ItemsViewItemInvokedEventArgs
00017 {
00018     Object InvokedItem{ get; };
00019 }
00020
00021 [MUX_PUBLIC_V5]
00022 [default_interface]
00023 [webhosthidden]
00024 runtimeclass ItemsViewSelectionChangedEventArgs
00025 {
00026 }
00027
00028 [MUX_PUBLIC_V5]
00029 [webhosthidden]
00030 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00031 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00032 unsealed runtimeclass ItemsView : Microsoft.UI.Xaml.Controls.Control
00033 {
00034     ItemsView();
00035
00036     Object ItemsSource{ get; set; };
00037     ScrollView ScrollView { get; };
00038     Microsoft.UI.Xaml.Controls.Primitives.IScrollController VerticalScrollController { get; set; };
00039     Microsoft.UI.Xaml.IElementFactory ItemTemplate{ get; set; };
00040     Layout Layout{ get; set; };
00041     [MUX_DEFAULT_VALUE("false")]
00042     Boolean IsItemInvokedEnabled { get; set; };
00043     [MUX_DEFAULT_VALUE("ItemsView::s_defaultSelectionMode")]
00044     ItemsViewSelectionMode SelectionMode{ get; set; };
00045     ItemCollectionTransitionProvider ItemTransitionProvider{ get; set; };
00046     [MUX_DEFAULT_VALUE("-1")]
00047     Int32 CurrentItemIndex { get; };
00048     Object SelectedItem { get; };
00049     Windows.Foundation.Collections.IVectorView<Object> SelectedItems { get; };
00050
00051     Boolean TryGetItemIndex(Double horizontalViewportRatio, Double verticalViewportRatio, out Int32 index);
00052     void StartBringItemIntoView(Int32 index, Microsoft.UI.Xaml.BringIntoViewOptions options);
00053     void Select(Int32 itemIndex);
00054     void Deselect(Int32 itemIndex);
00055     Boolean IsSelected(Int32 itemIndex);
00056     void SelectAll();
00057     void DeselectAll();
00058     void InvertSelection();
00059
00060     event Windows.Foundation.TypedEventHandler<ItemsView, ItemsViewItemInvokedEventArgs> ItemInvoked;
00061     event Windows.Foundation.TypedEventHandler<ItemsView, ItemsViewSelectionChangedEventArgs> SelectionChanged;
00062
00063     static Microsoft.UI.Xaml.DependencyProperty IsItemInvokedEnabledProperty{ get; };
00064     static Microsoft.UI.Xaml.DependencyProperty ItemsSourceProperty{ get; };
00065     static Microsoft.UI.Xaml.DependencyProperty ItemTemplateProperty{ get; };
00066     static Microsoft.UI.Xaml.DependencyProperty LayoutProperty{ get; };
00067     static Microsoft.UI.Xaml.DependencyProperty SelectionModeProperty{ get; };
00068     static Microsoft.UI.Xaml.DependencyProperty ItemTransitionProviderProperty{ get; };
00069     static Microsoft.UI.Xaml.DependencyProperty CurrentItemIndexProperty{ get; };
00070     static Microsoft.UI.Xaml.DependencyProperty SelectedItemProperty{ get; };
00071     static Microsoft.UI.Xaml.DependencyProperty ScrollViewProperty{ get; };
00072     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollControllerProperty{ get; };
00073 }
00074
00075 }
00076
00077 namespace MU_XAP_NAMESPACE
00078 {
00079
00080 [MUX_PUBLIC_V5]
00081 [webhosthidden]
00082 unsealed runtimeclass ItemsViewAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer, Microsoft.UI.Xaml.Automation.Provider.ISelectionProvider
00083 {
00084     ItemsViewAutomationPeer(MU_XC_NAMESPACE.ItemsView owner);
00085 }
00086
00087 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/SliderInteraction/TestUI/SliderInteractionPage.xaml.cs Source File

  • File List
  • File Members
  • Interactions
  • SliderInteraction
  • TestUI

SliderInteractionPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Automation;
00008
00009 using Microsoft.UI.Private.Controls;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Media;
00012 using Windows.UI;
00013
00014 namespace MUXControlsTestApp
00015 {
00016     [TopLevelTestPage(Name = "SliderInteraction", Icon = "Slider.png")]
00017     public sealed partial class SliderInteractionPage : TestPage
00018     {
00019         public SliderInteractionPage()
00020         {
00021             this.InitializeComponent();
00022
00023             HorizontalSliderInteraction = new SliderInteraction()
00024             {
00025                 Minimum = 0,
00026                 Maximum = 200 - 2 - 20 // Subtract 2x host border thickness and the width of the scrubber thumb
00027             };
00028
00029             horizontalElement.Interactions.Add(HorizontalSliderInteraction);
00030
00031             VerticalSliderInteraction = new SliderInteraction()
00032             {
00033                 Orientation = Orientation.Vertical,
00034                 Minimum = 0,
00035                 Maximum = 200 - 2 - 20 // Subtract 2x host border thickness and the height of the scrubber thumb
00036             };
00037
00038             verticalElement.Interactions.Add(VerticalSliderInteraction);
00039         }
00040
00041         public SliderInteraction HorizontalSliderInteraction
00042         {
00043             get; private set;
00044         }
00045
00046         public SliderInteraction VerticalSliderInteraction
00047         {
00048             get; private set;
00049         }
00050     }
00051 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/TestUI/AnimatedVisualPlayerPage.xaml.cs Source File

  • File List
  • File Members
  • AnimatedVisualPlayer
  • TestUI

AnimatedVisualPlayerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Linq;
00006 using System.Threading.Tasks;
00007 using AnimatedVisualPlayerTests;
00008 using Common;
00009 using Microsoft.Graphics.Canvas;
00010 using Windows.Graphics;
00011 using Windows.Graphics.Capture;
00012 using Windows.Graphics.DirectX;
00013 using Microsoft.UI.Composition;
00014 using Microsoft.UI.Xaml;
00015 using Microsoft.UI.Xaml.Automation;
00016 using Microsoft.UI.Xaml.Controls;
00017 using Microsoft.UI.Xaml.Hosting;
00018 using Microsoft.UI.Xaml.Media;
00019 using Microsoft.UI;
00020
00021 namespace MUXControlsTestApp
00022 {
00023     public class FallbackGrid : Microsoft.UI.Xaml.Controls.Grid
00024     {
00025         internal const int RectangleWidth = 100;
00026         internal const int RectangleHeight = 100;
00027         internal static readonly Windows.UI.Color RectangleColor = Colors.Red;
00028         // Gets the most recently created FallbackGrid
00029         internal static FallbackGrid Latest;
00030
00031         public FallbackGrid()
00032         {
00033             Latest = this;
00034             Microsoft.UI.Xaml.Shapes.Rectangle rect = new Microsoft.UI.Xaml.Shapes.Rectangle();
00035             rect.MaxWidth = rect.MinWidth = RectangleWidth;
00036             rect.MaxHeight = rect.MinHeight = RectangleHeight;
00037             rect.Fill = new SolidColorBrush(RectangleColor);
00038             Children.Add(rect);
00039         }
00040     }
00041
00042     [TopLevelTestPage(Name = "AnimatedVisualPlayer", Icon = "Animations.png")]
00043     public sealed partial class AnimatedVisualPlayerPage : TestPage
00044     {
00045         public AnimatedVisualPlayerPage()
00046         {
00047             this.InitializeComponent();
00048             SetAutomationPeerNames(PageGrid);
00049         }
00050
00051         // Set the AutomationPeer name to be the same as the x:Name on each FrameworkElement
00052         // that is a child of the given panel, and continue recursively into any panel children.
00053         // This is so we don't need to set both properties on the elements in XAML.
00054         void SetAutomationPeerNames(Panel root)
00055         {
00056             foreach (var child in root.Children)
00057             {
00058                 if (child is FrameworkElement element)
00059                 {
00060                     // Copy the x:Name into the AutomationPeer name unless it already has an AutomationPeer name.
00061                     var name = element.Name;
00062                     if (!string.IsNullOrEmpty(name) && string.IsNullOrEmpty(AutomationProperties.GetName(element)))
00063                     {
00064                         AutomationProperties.SetName(element, name);
00065                     }
00066
00067                     if (child is Panel panel)
00068                     {
00069                         // Recurse to get the rest of the tree.
00070                         SetAutomationPeerNames(panel);
00071                     }
00072                 }
00073             }
00074         }
00075
00076         async void Play(double from, double to, TextBox statusTextBox)
00077         {
00078             IsPlayingTextBoxBeforePlaying.Text = Player.IsPlaying.ToString();
00079
00080             // Start playing and concurrently get the IsPlaying state.
00081             Task task1 = Player.PlayAsync(from, to, false).AsTask();
00082             Task task2 = GetIsPlayingAsync();
00083
00084             // Wait for playing to finish.
00085             await Task.WhenAll(task1, task2);
00086             statusTextBox.Text = Constants.PlayingEndedText;
00087         }
00088
00089         void PlayForward(double fromProgress, double toProgress, TextBox statusTextBox)
00090         {
00091             Player.PlaybackRate = 1;
00092             Play(fromProgress, toProgress, statusTextBox);
00093         }
00094
00095         // Play from 0 to 1.
00096         void PlayButton_Click(object sender, RoutedEventArgs e)
00097         {
00098             IsPlayingTextBoxBeforePlaying.Text = Player.IsPlaying.ToString();
00099             PlayForward(0, 1, ProgressTextBox);
00100         }
00101
00102         // Play from 0 to 1.
00103         void PlayHalfButton_Click(object sender, RoutedEventArgs e)
00104         {
00105             IsPlayingTextBoxBeforePlaying.Text = Player.IsPlaying.ToString();
00106             PlayForward(0, 0.5, ProgressTextBox);
00107         }
00108
00109         // Play forwards from 0.35 to 0.
00110         void ToZeroKeyframeAnimationPlayButton_Click(object sender, RoutedEventArgs e)
00111         {
00112             PlayForward(0.35, 0, ToZeroKeyframeAnimationProgressTextBox);
00113         }
00114
00115         // Play forwards from 0.35 to 0.3.
00116         void AroundTheEndAnimationPlayButton_Click(object sender, RoutedEventArgs e)
00117         {
00118             PlayForward(0.35, 0.3, AroundTheEndAnimationProgressTextBox);
00119         }
00120
00121         // Play forwards from 1 to 0.35.
00122         void FromOneKeyframeAnimationPlayButton_Click(object sender, RoutedEventArgs e)
00123         {
00124             PlayForward(1, 0.35, FromOneKeyframeAnimationProgressTextBox);
00125         }
00126
00127         void SetProgressButton_Click(object sender, RoutedEventArgs e)
00128         {
00129             Player.SetProgress(0.4);
00130         }
00131
00132         void SwitchCacheModeButton_Click(object sender, RoutedEventArgs e)
00133         {
00134             if (Player.AnimationOptimization == Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Latency)
00135             {
00136                 Player.AnimationOptimization = Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Resources;
00137                 SwitchCacheModeButton.Content = "Switch Optimization (Current: Resources)";
00138             }
00139             else if (Player.AnimationOptimization == Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Resources)
00140             {
00141                 Player.AnimationOptimization = Microsoft.UI.Xaml.Controls.PlayerAnimationOptimization.Latency;
00142                 SwitchCacheModeButton.Content = "Switch Optimization (Current: Latency)";
00143             }
00144         }
00145
00146         void StopButton_Click(object sender, RoutedEventArgs e)
00147         {
00148             Player.Stop();
00149         }
00150
00151         // Play backwards from 1 to 0.5 then forwards from 0.5 to 1.
00152         async void ReverseNegativePlaybackRateAnimationPlayButton_Click(object sender, RoutedEventArgs e)
00153         {
00154             // Start playing backwards from 1 to 0.
00155             Player.PlaybackRate = -1;
00156             Task task1 = Player.PlayAsync(0.0, 1.0, false).AsTask();
00157
00158             // Reverse direction after half of the animation duration.
00159             Task task2 = DelayForHalfAnimationDurationThenReverse();
00160
00161             await Task.WhenAll(task1, task2);
00162
00163             SetTextBoxTextToPlayerProgress(ReverseNegativePlaybackRateAnimationTextBox);
00164         }
00165
00166         // Play forward from 0 to 0.5 then backward from 0.5 to 0.
00167         async void ReversePositivePlaybackRateAnimationPlayButton_Click(object sender, RoutedEventArgs e)
00168         {
00169             // Start playing forward from 0 to 1.
00170             Player.PlaybackRate = 1;
00171             Task task1 = Player.PlayAsync(0, 1, false).AsTask();
00172
00173             // Reverse direction after half of the animation duration.
00174             Task task2 = DelayForHalfAnimationDurationThenReverse();
00175
00176             await Task.WhenAll(task1, task2);
00177
00178             SetTextBoxTextToPlayerProgress(ReversePositivePlaybackRateAnimationTextBox);
00179         }
00180
00181         void SetTextBoxTextToPlayerProgress(TextBox textBox)
00182         {
00183             // Read the progress value from the player.
00184             var progressPropertySet = (CompositionPropertySet)Player.ProgressObject;
00185             progressPropertySet.TryGetScalar("progress", out var value);
00186             textBox.Text = value.ToString();
00187         }
00188
00189         void Player_PointerMoved(object sender, RoutedEventArgs e)
00190         {
00191             HittestingTextBox.Text = Constants.PointerMovedText;
00192         }
00193
00194         async Task GetIsPlayingAsync()
00195         {
00196             //
00197             // This artificial delay of 200ms is to ensure that the player's PlayAsync
00198             // has enough time ready to set value of IsPlaying property to true.
00199             //
00200             await Task.Delay(200);
00201
00202             Player.Pause();
00203             IsPlayingTextBoxBeingPlaying.Text = Player.IsPlaying.ToString();
00204             Player.Resume();
00205         }
00206
00207         // Delays for half of the duration of the current play then reverses direction.
00208         async Task DelayForHalfAnimationDurationThenReverse()
00209         {
00210             var delayTimeSpan = TimeSpan.FromTicks((long)(0.5 * Player.Duration.Ticks));
00211             await Task.Delay(delayTimeSpan);
00212
00213             // Pause, change direction, resume in the new direction.
00214             Player.Pause();
00215             Player.PlaybackRate *= -1;
00216             Player.Resume();
00217         }
00218
00219         /*async*/ void FallenBackButton_ClickAsync(Object sender, RoutedEventArgs e)
00220         {
00221             // TODO 23778051: Bring this back when we have a GraphicsCaptureItem that accepts a
00222             // Microsoft.UI.Composition.Visual object instead of a Microsoft.UI.Composition.Visual object.
00223             /*if (IsRS5OrHigher())
00224             {
00225                 // Nullsource is a source that always fails. We use it to trigger the fallback behavior.
00226                 Player.Source = new AnimatedVisuals.Nullsource();
00227
00228                 // Scrape the pixels from the Player. There should be a red rectangle where the content would go.
00229                 var playerVisual = ElementCompositionPreview.GetElementVisual(Player);
00230                 CanvasBitmap canvasBitmap = await RenderVisualToBitmapAsync(playerVisual);
00231
00232                 var colors = canvasBitmap.GetPixelColors();
00233                 var redPixelCount = colors.Where(c => c == FallbackGrid.RectangleColor).Count();
00234
00235                 // Check that the number of red pixels is at least half the number of pixels in the
00236                 // FallbackGrid. We require only half to allow for any scaling or borders or anything
00237                 // that is not important to determining whether or not we are showing the
00238                 // FallbackGrid.
00239                 FallenBackTextBox.Text = redPixelCount >= FallbackGrid.RectangleHeight * FallbackGrid.RectangleWidth * 0.5
00240                     ? Constants.TrueText
00241                     : Constants.FalseText;
00242             }
00243             else*/
00244             {
00245                 var parent = FallbackGrid.Latest?.Parent;
00246                 FallenBackTextBox.Text = parent == Player
00247                     ? Constants.TrueText
00248                     : Constants.FalseText;
00249             }
00250         }
00251
00252         //
00253         // Renders a the given <see cref="Visual"/> to a <see cref="CanvasBitmap"/>. If <paramref name="size"/> is not
00254         // specified, uses the size of <paramref name="visual"/>.
00255         //
00256         // TODO 23778051: Bring this back when we have a GraphicsCaptureItem that accepts a
00257         // Microsoft.UI.Composition.Visual object instead of a Microsoft.UI.Composition.Visual object.
00258         /*static async Task<CanvasBitmap> RenderVisualToBitmapAsync(Visual visual, SizeInt32? size = null)
00259         {
00260             // Get an object that enables capture from a visual.
00261             var graphicsItem = GraphicsCaptureItem.CreateFromVisual(visual);
00262
00263             var canvasDevice = CanvasDevice.GetSharedDevice();
00264
00265             var tcs = new TaskCompletionSource<CanvasBitmap>();
00266
00267             // Create a frame pool with room for only 1 frame because we're getting a single frame, not a video.
00268             const int numberOfBuffers = 1;
00269             using (var framePool = Direct3D11CaptureFramePool.Create(
00270                                 canvasDevice,
00271                                 DirectXPixelFormat.B8G8R8A8UIntNormalized,
00272                                 numberOfBuffers,
00273                                 size ?? graphicsItem.Size))
00274             {
00275                 void OnFrameArrived(Direct3D11CaptureFramePool sender, object args)
00276                 {
00277                     using (var frame = sender.TryGetNextFrame())
00278                     {
00279                         tcs.SetResult(frame != null
00280                             ? CanvasBitmap.CreateFromDirect3D11Surface(canvasDevice, frame.Surface)
00281                             : null);
00282                     }
00283                 }
00284
00285                 using (var session = framePool.CreateCaptureSession(graphicsItem))
00286                 {
00287                     framePool.FrameArrived += OnFrameArrived;
00288
00289                     // Start capturing. The FrameArrived event will occur shortly.
00290                     session.StartCapture();
00291
00292                     // Wait for the frame to arrive.
00293                     var result = await tcs.Task;
00294
00295                     // !!!!!!!! NOTE !!!!!!!!
00296                     // This thread is now running inside the OnFrameArrived callback method.
00297
00298                     // Unsubscribe now that we have captured the frame.
00299                     framePool.FrameArrived -= OnFrameArrived;
00300
00301                     // Yield to allow the OnFrameArrived callback to unwind so that it is safe to
00302                     // Dispose the session and framepool.
00303                     await Task.Yield();
00304                 }
00305             }
00306
00307             return await tcs.Task;
00308         }*/
00309     }
00310 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockVirtualizingLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks

MockVirtualizingLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Windows.Foundation;
00007 using Microsoft.UI.Xaml.Controls;
00008
00009 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks
00010 {
00011     class MockVirtualizingLayout : VirtualizingLayout
00012     {
00013         public Func<Size, VirtualizingLayoutContext, Size> MeasureLayoutFunc { get; set; }
00014         public Func<Size, VirtualizingLayoutContext, Size> ArrangeLayoutFunc { get; set; }
00015
00016         public new void InvalidateMeasure()
00017         {
00018             base.InvalidateMeasure();
00019         }
00020
00021         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00022         {
00023             return MeasureLayoutFunc != null ? MeasureLayoutFunc(availableSize, context) : default(Size);
00024         }
00025
00026         protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00027         {
00028             return ArrangeLayoutFunc != null ? ArrangeLayoutFunc(finalSize, context) : default(Size);
00029         }
00030     }
00031 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

OpacityEffect Member List

This is the complete list of members for OpacityEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1Opacity) | OpacityEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"Opacity", D2D1_OPACITY_PROP_OPACITY, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | OpacityEffect |
DECLARE_POD_PROPERTY(Opacity, float, 1.0f, value >=0.0f &&value<=1.0f) | OpacityEffect |
DECLARE_SINGLE_SOURCE(Source) | OpacityEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | OpacityEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | OpacityEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayout.cpp Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayout.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "LinedFlowLayout.h"
00008 #include "LinedFlowLayoutItemsInfoRequestedEventArgs.h"
00009 #include "LinedFlowLayoutItemCollectionTransitionProvider.h"
00010 #include "RuntimeProfiler.h"
00011 #include "VirtualizingLayoutContext.h"
00012 #include "LayoutsTestHooks.h"
00013 #include "SharedHelpers.h"
00014
00015 // Change to 'true' to turn on debugging outputs in Output window
00016 bool LinedFlowLayoutTrace::s_IsDebugOutputEnabled{ false };
00017 bool LinedFlowLayoutTrace::s_IsVerboseDebugOutputEnabled{ false };
00018
00019 // Maximum difference for scroll offsets to be considered equal. Used in GetFirstAndLastDisplayedLineIndexes for the moment.
00020 const double c_offsetEqualityEpsilon{ 0.01 };
00021
00022 // The desired aspect ratio associated with an item has a weight between 1 and 16. Each time an item's aspect ratio is evaluated, its weight is incremented up to 16.
00023 // The average aspect ratio is computed using those weights. This is to avoid giving too much importance to newly realized items which are still loading their content
00024 // and temporarily provide an aspect ratio that would throw off the average. This stabilizes the m_averageItemsPerLine field which leads to fewer total re-layouts.
00025 const int c_maxAspectRatioWeight{ 16 };
00026
00027 // See m_anchorIndexRetentionCountdown usage below. Represents the measure pass count after which a RecommendedAnchorIndex reset to -1 takes effect.
00028 const int c_maxAnchorIndexRetentionCount{ 10 };
00029
00030 // An area sized 80% of a scroll viewport made of frozen lines is placed before the displayed lines. An identically sized area is also placed after the displayed lines.
00031 const double c_frozenLinesRatio{ 0.8 };
00032
00033 #pragma region ILinedFlowLayout
00034
00035 LinedFlowLayout::LinedFlowLayout()
00036 {
00037     LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00038
00039     __RP_Marker_ClassById(RuntimeProfiler::ProfId_LinedFlowLayout);
00040     LayoutId(L"LinedFlowLayout");
00041
00042     EnsureProperties();
00043
00044     SetIndexBasedLayoutOrientation(winrt::IndexBasedLayoutOrientation::LeftToRight);
00045 }
00046
00047 LinedFlowLayout::~LinedFlowLayout()
00048 {
00049     LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00050
00051     InvalidateMeasureTimerStop(true /*isForDestructor*/);
00052 }
00053
00054 // Locks the 'itemIndex' into its line until the m_averageItemsPerLine or collection changes,
00055 // at which point the ItemsUnlocked event is raised.
00056 int32_t LinedFlowLayout::LockItemToLine(
00057     int32_t itemIndex)
00058 {
00059     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, itemIndex);
00060
00061     if (itemIndex < 0 || itemIndex >= m_itemCount)
00062     {
00063         throw winrt::hresult_out_of_bounds();
00064     }
00065
00066     if (m_averageItemsPerLine.second == 0.0)
00067     {
00068         // LockItemToLine is called before the first measure pass or when ActualLineHeight <= 0.
00069         // Returning -1 as an indication that LockItemToLine must be called later, after the measure pass has established an average items per line.
00070         return -1;
00071     }
00072
00073     const bool usesFastPathLayout = UsesFastPathLayout();
00074     int lockedLineIndex{ -1 };
00075
00076     if (itemIndex == 0)
00077     {
00078         // First item is implicitly locked on the first line - no need to update the m_lockedItemIndexes map.
00079         // Setting the m_isFirstOrLastItemLocked flag though so that ItemsUnlocked is raised when only the first and/or last item was locked.
00080         m_isFirstOrLastItemLocked = true;
00081         lockedLineIndex = 0;
00082     }
00083     else if (itemIndex == m_itemCount - 1)
00084     {
00085         // Last item is implicitly locked on the last line - no need to update the m_lockedItemIndexes map.
00086         // Setting the m_isFirstOrLastItemLocked flag though so that ItemsUnlocked is raised when only the first and/or last item was locked.
00087         m_isFirstOrLastItemLocked = true;
00088         lockedLineIndex = usesFastPathLayout ? GetLineIndex(itemIndex, true /*usesFastPathLayout*/) : GetLineIndexFromAverageItemsPerLine(itemIndex, m_averageItemsPerLine.second);
00089     }
00090
00091     if (m_lockedItemIndexes.find(itemIndex) != m_lockedItemIndexes.end())
00092     {
00093         // Item is already locked - return its current lock line index.
00094         return m_lockedItemIndexes[itemIndex];
00095     }
00096
00097     if (lockedLineIndex == -1)
00098     {
00099         if (usesFastPathLayout)
00100         {
00101             lockedLineIndex = GetLineIndex(itemIndex, true /*usesFastPathLayout*/);
00102         }
00103         else
00104         {
00105             if (m_firstFrozenItemIndex != -1 &&
00106                 m_lastFrozenItemIndex != -1 &&
00107                 itemIndex >= m_firstFrozenItemIndex &&
00108                 itemIndex <= m_lastFrozenItemIndex)
00109             {
00110                 // Item is among the frozen items - Return the current frozen line index for the item.
00111                 lockedLineIndex = GetFrozenLineIndexFromFrozenItemIndex(itemIndex);
00112             }
00113             else
00114             {
00115                 // Else return the line index based on the average items per line.
00116                 lockedLineIndex = GetLineIndexFromAverageItemsPerLine(itemIndex, m_averageItemsPerLine.second);
00117             }
00118         }
00119     }
00120
00121     MUX_ASSERT(lockedLineIndex >= 0);
00122
00123     if (m_lockedItemIndexes.size() > 0)
00124     {
00125         // Check if that line already has locked items. Any unlocked item squeezed between two locked items is declared locked.
00126         for (const auto& lockedItemIterator : m_lockedItemIndexes)
00127         {
00128             if (lockedItemIterator.second == lockedLineIndex)
00129             {
00130                 // Found a locked item on the same line
00131                 const int lockedItemIndex = lockedItemIterator.first;
00132
00133                 if (lockedItemIndex < itemIndex)
00134                 {
00135                     // It is before the newly locked one. Ensure all items in between them are locked.
00136                     for (int lockedItemIndexTmp = lockedItemIndex + 1; lockedItemIndexTmp < itemIndex; lockedItemIndexTmp++)
00137                     {
00138                         if (m_lockedItemIndexes.find(lockedItemIndexTmp) == m_lockedItemIndexes.end())
00139                         {
00140                             m_lockedItemIndexes.insert(std::pair<int, int>(lockedItemIndexTmp, lockedLineIndex));
00141
00142                             NotifyLinedFlowLayoutItemLockedDbg(lockedItemIndexTmp, lockedLineIndex);
00143                         }
00144                     }
00145
00146                     // No other item can possibly be locked on the same line.
00147                     break;
00148                 }
00149                 else
00150                 {
00151                     // It is after the newly locked one. Ensure all items in between them are locked.
00152                     MUX_ASSERT(lockedItemIndex > itemIndex);
00153
00154                     for (int lockedItemIndexTmp = lockedItemIndex - 1; lockedItemIndexTmp > itemIndex; lockedItemIndexTmp--)
00155                     {
00156                         if (m_lockedItemIndexes.find(lockedItemIndexTmp) == m_lockedItemIndexes.end())
00157                         {
00158                             m_lockedItemIndexes.insert(std::pair<int, int>(lockedItemIndexTmp, lockedLineIndex));
00159
00160                             NotifyLinedFlowLayoutItemLockedDbg(lockedItemIndexTmp, lockedLineIndex);
00161                         }
00162                     }
00163
00164                     // No other item can possibly be locked on the same line.
00165                     break;
00166                 }
00167             }
00168         }
00169     }
00170
00171     // Finally lock the provided item itself, unless it's the first or last item.
00172     MUX_ASSERT(m_lockedItemIndexes.find(itemIndex) == m_lockedItemIndexes.end());
00173
00174     if (itemIndex != 0 && itemIndex != m_itemCount - 1)
00175     {
00176         m_lockedItemIndexes.insert(std::pair<int, int>(itemIndex, lockedLineIndex));
00177     }
00178
00179     NotifyLinedFlowLayoutItemLockedDbg(itemIndex, lockedLineIndex);
00180
00181     return lockedLineIndex;
00182 }
00183
00184 void LinedFlowLayout::OnPropertyChanged(
00185     winrt::DependencyPropertyChangedEventArgs const& args)
00186 {
00187     auto dependencyProperty = args.Property();
00188
00189     LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, L"%s(property: %s)\n", METH_NAME, DependencyPropertyToStringDbg(dependencyProperty).c_str());
00190
00191     if (dependencyProperty != s_ActualLineHeightProperty)
00192     {
00193         InvalidateLayout();
00194     }
00195 }
00196
00197 #pragma endregion
00198
00199 #pragma region ILayoutOverrides
00200
00201 winrt::ItemCollectionTransitionProvider LinedFlowLayout::CreateDefaultItemTransitionProvider()
00202 {
00203     return winrt::make<LinedFlowLayoutItemCollectionTransitionProvider>();
00204 }
00205
00206 #pragma endregion
00207
00208 #pragma region IVirtualizingLayoutOverrides
00209
00210 void LinedFlowLayout::InitializeForContextCore(
00211     winrt::VirtualizingLayoutContext const& context)
00212 {
00213     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00214
00215     if (m_wasInitializedForContext)
00216     {
00217         throw winrt::hresult_error(E_INVALID_OPERATION, s_cannotShareLinedFlowLayout);
00218     }
00219
00220     __super::InitializeForContextCore(context);
00221
00222     m_wasInitializedForContext = true;
00223     m_isVirtualizingContext = IsVirtualizingContext(context);
00224     m_itemCount = context.ItemCount();
00225     m_elementManager.SetContext(context);
00226 }
00227
00228 void LinedFlowLayout::UninitializeForContextCore(
00229     winrt::VirtualizingLayoutContext const& context)
00230 {
00231     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00232
00233     MUX_ASSERT(m_wasInitializedForContext);
00234     MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
00235
00236     __super::UninitializeForContextCore(context);
00237
00238     m_wasInitializedForContext = false;
00239     m_itemCount = 0;
00240     if (m_isVirtualizingContext)
00241     {
00242         m_isVirtualizingContext = false;
00243         m_elementManager.ClearRealizedRange();
00244     }
00245
00246     InvalidateMeasureTimerStop(false /*isForDestructor*/);
00247     UnlockItems();
00248 }
00249
00250 winrt::Size LinedFlowLayout::MeasureOverride(
00251     winrt::VirtualizingLayoutContext const& context,
00252     winrt::Size const& availableSize)
00253 {
00254     const float availableWidth = availableSize.Width;
00255
00256 #ifdef DBG
00257     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"availableSize", availableWidth, availableSize.Height);
00258
00259     MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
00260     LogVirtualizingLayoutContextDbg(context);
00261     LogElementManagerDbg();
00262 #endif
00263
00264     if (!m_isVirtualizingContext)
00265     {
00266         // LinedFlowLayout is expected to be hosted by a panel like LayoutPanel. Always perform a complete re-layout in non-virtualizing scenarios.
00267         // No measure passes occur on simple scrolling, and realization window is infinite.
00268         m_forceRelayout = true;
00269
00270         const int newItemCount = context.ItemCount();
00271
00272         if (!UsesArrangeWidthInfo())
00273         {
00274             if (m_itemCount < newItemCount)
00275             {
00276                 // In the non-virtualizing case, the asynchronous measure passes are started only when the item count increased.
00277                 // Ideally InvalidateMeasureTimerStart should be called instead whenever an item is added or replaced, or when
00278                 // the collection is reset, but LinedFlowLayout::OnItemsChangedCore is not invoked in the non-virtualizing case.
00279                 InvalidateMeasureTimerStart(0 /*tickCount*/);
00280             }
00281             else if (m_itemCount > 0 && newItemCount == 0)
00282             {
00283                 // Stop the potential timer as the collection is empty now.
00284                 InvalidateMeasureTimerStop(false /*isForDestructor*/);
00285             }
00286         }
00287
00288         // LayoutPanel.Children.Count may have changed. LinedFlowLayout::OnItemsChangedCore is not invoked in non-virtualizing scenarios.
00289         m_itemCount = newItemCount;
00290
00291         // Item locks are systematically invalidated since the measure pass must be the result of a child or Children collection change.
00292         UnlockItems();
00293     }
00294
00295     MUX_ASSERT(m_itemCount == context.ItemCount());
00296
00297     if (m_measureCountdown > 1)
00298     {
00299         m_measureCountdown--;
00300     }
00301
00302     const bool actualLineHeightChanged = UpdateActualLineHeight(context, availableSize);
00303     const double actualLineHeight = ActualLineHeight();
00304     float desiredWidth = 0.0f;
00305     double linesSpacing = 0.0;
00306     int lineCount = 0;
00307
00308     if (m_itemCount > 0 && actualLineHeight > 0.0)
00309     {
00310         winrt::Point layoutOrigin{};
00311
00312         context.LayoutOrigin(layoutOrigin);
00313
00314         if (std::isinf(availableWidth))
00315         {
00316             // Clearing the items info that may have been gathered during a previous pass while availableSize.Width != infinity.
00317             ResetItemsInfo();
00318
00319             // Set desiredWidth to total desired width of items, plus the MinItemSpacing between them.
00320             desiredWidth = MeasureUnconstrainedLine(context);
00321             lineCount = 1;
00322         }
00323         else
00324         {
00325             // Desired width beyond the available width.
00326             float desiredExtraWidth = 0.0f;
00327
00328             // Do not even attempt to perform the fast path when there is no listener for the ItemsInfoRequested event.
00329             // Instead, fall back to the regular path right away.
00330             if (IsFastPathSupportedDbg() && m_itemsInfoRequestedEventSource)
00331             {
00332                 if (actualLineHeightChanged && !m_forceRelayout)
00333                 {
00334                     // Because ActualLineHeight changed above, MeasureConstrainedLinesFastPath below needs to call
00335                     // ComputeItemsLayoutFastPath to perform a re-layout of all items when the fast path is enabled.
00336                     // The ItemsInfoRequest event needs to be raised though because of a prior ResetItemsInfoForFastPath call,
00337                     // so forceLayoutWithoutItemsInfoRequest cannot simply be used as True.
00338                     m_forceRelayout = true;
00339                 }
00340
00341                 std::tuple<int /*lineCount*/, float /*maxLineWidth*/, ItemsInfo> fastPathLayoutResults = MeasureConstrainedLinesFastPath(
00342                     context,
00343                     availableWidth,
00344                     actualLineHeight,
00345                     false /*forceLayoutWithoutItemsInfoRequest*/);
00346
00347                 lineCount = std::get<0>(fastPathLayoutResults);
00348
00349                 if (lineCount == -1)
00350                 {
00351                     // The items info gathered during the fast path attempt above is handed off
00352                     // to the regular path since in many cases it is enough to not require a
00353                     // new ItemsInfoRequested event to be raised.
00354                     lineCount = MeasureConstrainedLinesRegularPath(
00355                         context,
00356                         std::get<2>(fastPathLayoutResults) /*itemsInfo*/,
00357                         availableWidth,
00358                         actualLineHeight);
00359
00360                     if (lineCount == -1)
00361                     {
00362                         // The fast path was enabled by the ItemsInfoRequested handler. This case can occur when
00363                         // (m_forceRelayout || m_previousAvailableWidth != availableWidth) evaluated to False in the
00364                         // MeasureConstrainedLinesFastPath call above, and a transition out of the regular path is
00365                         // enabled in MeasureConstrainedLinesRegularPath.
00366
00367                         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"MeasureConstrainedLinesRegularPath enabled fast path");
00368
00369                         fastPathLayoutResults = MeasureConstrainedLinesFastPath(
00370                             context,
00371                             availableWidth,
00372                             actualLineHeight,
00373                             true /*forceLayoutWithoutItemsInfoRequest*/);
00374
00375                         lineCount = std::get<0>(fastPathLayoutResults);
00376
00377                         MUX_ASSERT(lineCount > 0);
00378
00379                         m_maxLineWidth = std::get<1>(fastPathLayoutResults);
00380                     }
00381                     else
00382                     {
00383                         m_maxLineWidth = GetLinesDesiredWidth();
00384                     }
00385
00386 #ifdef DBG
00387                     if (m_aspectRatios != nullptr && !m_aspectRatios->IsEmpty())
00388                     {
00389                         // Uncomment for verbose tracing off all stored aspect ratios & weights.
00390                         //m_aspectRatios->LogItemAspectRatiosDbg();
00391                         const int firstRealizedItemIndexDbg = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
00392                         const int lastRealizedItemIndexDbg = firstRealizedItemIndexDbg + m_elementManager.GetRealizedElementCount() - 1;
00393                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"averageAspectRatio (1)", m_aspectRatios->GetAverageAspectRatio(firstRealizedItemIndexDbg, lastRealizedItemIndexDbg, c_maxAspectRatioWeight));
00394                     }
00395 #endif
00396                 }
00397                 else
00398                 {
00399                     m_maxLineWidth = std::get<1>(fastPathLayoutResults);
00400
00401                     // Reset the fields specific to the regular path.
00402                     ExitRegularPath();
00403                 }
00404             }
00405             else
00406             {
00407                 if (UsesArrangeWidthInfo())
00408                 {
00409                     // Necessary for cases where a prior fast path is turned off because the ItemsInfoRequested handler was removed.
00410                     m_itemsInfoArrangeWidths.clear();
00411                 }
00412
00413                 lineCount = MeasureConstrainedLinesRegularPath(
00414                     context,
00415                     s_emptyItemsInfo,
00416                     availableWidth,
00417                     actualLineHeight);
00418
00419                 m_maxLineWidth = GetLinesDesiredWidth();
00420
00421 #ifdef DBG
00422                 if (m_aspectRatios != nullptr && !m_aspectRatios->IsEmpty())
00423                 {
00424                     // Uncomment for verbose tracing off all stored aspect ratios & weights.
00425                     //m_aspectRatios->LogItemAspectRatiosDbg();
00426                     const int firstRealizedItemIndexDbg = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
00427                     const int lastRealizedItemIndexDbg = firstRealizedItemIndexDbg + m_elementManager.GetRealizedElementCount() - 1;
00428                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"averageAspectRatio (2)", m_aspectRatios->GetAverageAspectRatio(firstRealizedItemIndexDbg, lastRealizedItemIndexDbg, c_maxAspectRatioWeight));
00429                 }
00430 #endif
00431             }
00432
00433             desiredWidth = availableWidth;
00434             desiredExtraWidth = m_maxLineWidth - availableWidth;
00435
00436 #ifdef DBG
00437             if (desiredExtraWidth != 0.0f)
00438             {
00439                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredExtraWidth used", desiredExtraWidth);
00440             }
00441 #endif
00442
00443             // Only account for the extra desired width if it goes beyond pixel snapping rounding.
00444             if (desiredExtraWidth > 0.5f / static_cast<float>(m_roundingScaleFactor) * m_averageItemsPerLine.second)
00445             {
00446                 desiredWidth += desiredExtraWidth;
00447             }
00448
00449 #ifdef DBG_VERBOSE
00450             LogLayoutDbg();
00451 #endif
00452         }
00453
00454         linesSpacing = (static_cast<double>(lineCount) - 1) * LineSpacing();
00455
00456         if (m_isVirtualizingContext && m_itemsInfoFirstIndex == -1 && m_aspectRatios != nullptr)
00457         {
00458             const int firstRealizedItemIndex = m_elementManager.GetFirstRealizedDataIndex();
00459             const int lastRealizedItemIndex = firstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;
00460
00461             MUX_ASSERT(firstRealizedItemIndex >= 0);
00462             MUX_ASSERT(lastRealizedItemIndex >= 0);
00463
00464             if (m_aspectRatios->HasLowerWeight(firstRealizedItemIndex, lastRealizedItemIndex, c_maxAspectRatioWeight))
00465             {
00466                 LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Forcing layout pass for low aspect ratio weight");
00467
00468                 // No items info was provided in the ItemsInfoRequest handler and there is at least an aspect ratio with a growing weight.
00469                 // Making sure there is another layout coming so that weights below c_maxAspectRatioWeight can be increased and ultimately
00470                 // reach c_maxAspectRatioWeight. Otherwise scrolling could trigger weight increases, an average-items-per-line change and re-layout.
00471                 InvalidateMeasureAsync();
00472             }
00473         }
00474     }
00475     else
00476     {
00477         if (m_isVirtualizingContext)
00478         {
00479             m_elementManager.ClearRealizedRange();
00480         }
00481         m_elementAvailableWidths = nullptr;
00482         m_elementDesiredWidths = nullptr;
00483         SetAverageItemsPerLine(std::pair<double, double>(0.0 /*averageItemsPerLineRaw*/, 0.0 /*averageItemsPerLineSnapped*/));
00484         ClearItemAspectRatios();
00485         m_averageItemAspectRatioDbg = 0.0f;
00486         m_unsizedNearLineCount = -1;
00487         m_unrealizedNearLineCount = -1;
00488         m_maxLineWidth = 0.0f;
00489         ResetItemsInfo();
00490         ResetLinesInfo();
00491         ResetSizedLines();
00492     }
00493
00494     m_previousAvailableWidth = availableSize.Width;
00495
00496     winrt::Size desiredSize{ desiredWidth, static_cast<float>(lineCount * actualLineHeight + linesSpacing) };
00497
00498 #ifdef DBG
00499     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"desiredSize", desiredSize.Width, desiredSize.Height);
00500     LogElementManagerDbg();
00501 #endif
00502
00503     return desiredSize;
00504 }
00505
00506 winrt::Size LinedFlowLayout::ArrangeOverride(
00507     winrt::VirtualizingLayoutContext const& context,
00508     winrt::Size const& finalSize)
00509 {
00510 #ifdef DBG
00511     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"finalSize", finalSize.Width, finalSize.Height);
00512
00513     MUX_ASSERT(m_itemCount == context.ItemCount());
00514     LogVirtualizingLayoutContextDbg(context);
00515     LogElementManagerDbg();
00516 #endif
00517
00518     if (std::isinf(m_previousAvailableWidth))
00519     {
00520         ArrangeUnconstrainedLine(context);
00521     }
00522     else
00523     {
00524         ArrangeConstrainedLines(context);
00525     }
00526
00527     return finalSize;
00528 }
00529
00530 void LinedFlowLayout::OnItemsChangedCore(
00531     winrt::VirtualizingLayoutContext const& context,
00532     winrt::IInspectable const& source,
00533     winrt::NotifyCollectionChangedEventArgs const& args)
00534 {
00535     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00536
00537     m_elementManager.DataSourceChanged(source, args);
00538
00539     m_itemCount = context.ItemCount();
00540
00541     if (m_itemCount == 0 && !UsesArrangeWidthInfo())
00542     {
00543         // Stop the potential timer as the collection is empty now.
00544         InvalidateMeasureTimerStop(false /*isForDestructor*/);
00545     }
00546
00547     // Discard any potential item sizing info previously collected through the ItemsInfoRequested event.
00548     // Perform a complete re-layout after the data source change.
00549     InvalidateLayout(true /*forceRelayout*/, true /*resetItemsInfo*/, false /*invalidateMeasure*/);
00550
00551     if (args.Action() == winrt::NotifyCollectionChangedAction::Reset)
00552     {
00553         // Discard any aspect ratio previously recorded since the data source has significantly changed.
00554         ClearItemAspectRatios();
00555
00556         // Reset the measure pass countdown to avoid extreme aspect ratio again.
00557         m_measureCountdown = s_measureCountdownStart;
00558
00559         m_averageItemAspectRatioDbg = 0.0f;
00560     }
00561
00562     // Calls InvalidateMeasure() to ensure the layout reflects the data source change.
00563     __super::OnItemsChangedCore(context, source, args);
00564
00565     // Item locks are invalidated by the data source change.
00566     UnlockItems();
00567 }
00568
00569 #pragma endregion
00570
00571 #pragma region private helpers
00572
00573 // Items arrangement when the non-scrolling dimension is constrained.
00574 void LinedFlowLayout::ArrangeConstrainedLines(
00575     winrt::VirtualizingLayoutContext const& context)
00576 {
00577     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00578
00579     const double actualLineHeight = ActualLineHeight();
00580
00581     if (m_lineItemCounts.size() == 0 || actualLineHeight <= 0.0)
00582     {
00583         return;
00584     }
00585
00586     MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
00587
00588     const bool usesArrangeWidthInfo = UsesArrangeWidthInfo();
00589     const float minItemSpacing = static_cast<float>(MinItemSpacing());
00590     const double lineSpacing = LineSpacing();
00591     const int firstSizedLineIndex = m_firstSizedLineIndex == -1 ? 0 : m_firstSizedLineIndex;
00592     const int lineCount = m_firstSizedLineIndex == -1 ? static_cast<int>(m_lineItemCounts.size()) : GetLineCount(m_averageItemsPerLine.second);
00593     const auto itemsStretch = ItemsStretch();
00594     const auto itemsJustification = ItemsJustification();
00595
00596 #ifdef DBG
00597     const int sizedItemCountDbg = LineItemsCountTotal(m_firstSizedItemIndex == -1 ? 0 : m_lastSizedItemIndex - m_firstSizedItemIndex + 1);
00598
00599     if (UsesFastPathLayout())
00600     {
00601         MUX_ASSERT(m_unsizedNearLineCount == -1);
00602     }
00603     else
00604     {
00605         MUX_ASSERT(m_firstSizedItemIndex < m_itemCount);
00606     }
00607
00608     if (m_isVirtualizingContext)
00609     {
00610         const double scrollViewport = context.VisibleRect().Height;
00611         const double scrollOffset = context.VisibleRect().Y;
00612
00613         GetFirstAndLastDisplayedLineIndexes(
00614             scrollViewport,
00615             scrollOffset,
00616             0 /*padding*/,
00617             lineSpacing,
00618             actualLineHeight,
00619             lineCount,
00620             false /*forFullyDisplayedLines*/,
00621             &m_previousFirstDisplayedArrangedLineIndexDbg,
00622             &m_previousLastDisplayedArrangedLineIndexDbg);
00623     }
00624 #endif
00625
00626     int firstFullyRealizedLineIndex{ -1 };
00627     int firstItemInFullyRealizedLine{ -1 };
00628
00629     GetFirstFullyRealizedLineIndex(
00630         &firstFullyRealizedLineIndex,
00631         &firstItemInFullyRealizedLine);
00632
00633     if (firstFullyRealizedLineIndex == -1)
00634     {
00635         // This situation can occur when context.VisibleRect().Height is 0.
00636         MUX_ASSERT(firstItemInFullyRealizedLine == -1);
00637
00638         return;
00639     }
00640
00641     const int itemsInfoArrangeWidthsOffset = m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex;
00642     const int lastSizedLineVectorIndex = static_cast<int>(m_lineItemCounts.size()) - 1;
00643     int sizedItemIndex = firstItemInFullyRealizedLine;
00644
00645     for (int sizedLineVectorIndex = firstFullyRealizedLineIndex - firstSizedLineIndex; sizedLineVectorIndex <= lastSizedLineVectorIndex; sizedLineVectorIndex++)
00646     {
00647         float cumulatedOffset = 0.0f;
00648         float itemSpacing = minItemSpacing;
00649         const int lineItemsCount = m_lineItemCounts[sizedLineVectorIndex];
00650         const float lineArrangeWidth = GetItemsRangeArrangeWidth(sizedItemIndex /*beginSizedItemIndex*/, sizedItemIndex + lineItemsCount - 1 /*endSizedItemIndex*/, usesArrangeWidthInfo);
00651         const double lineExtraAvailableWidth = static_cast<double>(m_previousAvailableWidth) - lineArrangeWidth - itemSpacing * (static_cast<double>(lineItemsCount) - 1);
00652
00653 #ifdef DBG
00654         float cumulatedWidthDbg = 0.0;
00655 #endif
00656
00657         if (itemsStretch == winrt::LinedFlowLayoutItemsStretch::None)
00658         {
00659             if (lineExtraAvailableWidth > 0.0)
00660             {
00661                 switch (itemsJustification)
00662                 {
00663                 case winrt::LinedFlowLayoutItemsJustification::Start:
00664 #ifdef DBG
00665                     cumulatedWidthDbg = static_cast<float>(lineExtraAvailableWidth);
00666 #endif
00667                     break;
00668                 case winrt::LinedFlowLayoutItemsJustification::Center:
00669                     cumulatedOffset = static_cast<float>(lineExtraAvailableWidth / 2.0);
00670 #ifdef DBG
00671                     cumulatedWidthDbg = 2.0f * cumulatedOffset;
00672 #endif
00673                     break;
00674                 case winrt::LinedFlowLayoutItemsJustification::End:
00675                     cumulatedOffset = static_cast<float>(lineExtraAvailableWidth);
00676 #ifdef DBG
00677                     cumulatedWidthDbg = cumulatedOffset;
00678 #endif
00679                     break;
00680                 case winrt::LinedFlowLayoutItemsJustification::SpaceEvenly:
00681                     cumulatedOffset = static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) + 1));
00682                     itemSpacing += cumulatedOffset;
00683 #ifdef DBG
00684                     cumulatedWidthDbg = 2.0f * cumulatedOffset;
00685 #endif
00686                     break;
00687                 case winrt::LinedFlowLayoutItemsJustification::SpaceAround:
00688                     cumulatedOffset = static_cast<float>(lineExtraAvailableWidth / lineItemsCount / 2.0);
00689                     itemSpacing += cumulatedOffset * 2.0f;
00690 #ifdef DBG
00691                     cumulatedWidthDbg = 2.0f * cumulatedOffset;
00692 #endif
00693                     break;
00694                 case winrt::LinedFlowLayoutItemsJustification::SpaceBetween:
00695                     if (lineItemsCount > 1)
00696                     {
00697                         itemSpacing += static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) - 1));
00698                     }
00699                     break;
00700                 }
00701             }
00702             else if (lineExtraAvailableWidth < 0.0)
00703             {
00704                 if (lineExtraAvailableWidth >= -0.5 / m_roundingScaleFactor * lineItemsCount)
00705                 {
00706                     // Because of pixel snapping based on m_roundingScaleFactor, lineExtraAvailableWidth can be slightly different from 0.0.
00707                     // In that case we adjust the minItemSpacing by distributing the small delta equally.
00708                     itemSpacing += static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) - 1));
00709                 }
00710 #ifdef DBG
00711                 else
00712                 {
00713                     // Because of items MinWidth, items could not be scaled down to make them fit in the line.
00714                     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineExtraAvailableWidth", lineExtraAvailableWidth);
00715                 }
00716 #endif
00717             }
00718         }
00719         else if (lineExtraAvailableWidth != 0.0)
00720         {
00721             // Condition #1. Because of pixel snapping based on m_roundingScaleFactor, lineExtraAvailableWidth can be slightly different from 0.0.
00722             // Condition #2. Because of MaxWidth constraining the expansion of line items, lineExtraAvailableWidth can be much larger than 0.0.
00723             // Condition #2. Because Image elements do not expand beyond MinWidth when their natural width is smaller than MinWidth, lineExtraAvailableWidth can be much larger than 0.0.
00724             // In those cases we adjust the minItemSpacing by distributing the small delta equally.
00725             const bool itemSpacingAdjustedForRounding = std::abs(lineExtraAvailableWidth) <= 0.5 / m_roundingScaleFactor * lineItemsCount;
00726             const bool itemSpacingAdjustedForMinMaxWidth = !itemSpacingAdjustedForRounding && lineExtraAvailableWidth > 0.0 && lineCount != firstSizedLineIndex + sizedLineVectorIndex + 1;
00727
00728             if (itemSpacingAdjustedForRounding || itemSpacingAdjustedForMinMaxWidth)
00729             {
00730 #ifdef DBG
00731                 if (itemSpacingAdjustedForMinMaxWidth)
00732                 {
00733                     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineExtraAvailableWidth", lineExtraAvailableWidth);
00734                 }
00735 #endif
00736
00737                 itemSpacing += static_cast<float>(lineExtraAvailableWidth / (static_cast<double>(lineItemsCount) - 1));
00738             }
00739 #ifdef DBG
00740             else
00741             {
00742                 // In addition to those three cases above, the line items' MinWidth may prevent them from being shrunk sufficiently to fit in the available width. In those cases nothing is done.
00743                 LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineExtraAvailableWidth", lineExtraAvailableWidth);
00744             }
00745 #endif
00746         }
00747
00748         const int lineIndex = sizedLineVectorIndex + (m_unsizedNearLineCount == -1 ? 0 : m_unsizedNearLineCount);
00749
00750         MUX_ASSERT(lineIndex < lineCount);
00751
00752         for (int sizedLineItemIndex = 0; sizedLineItemIndex < lineItemsCount; sizedLineItemIndex++)
00753         {
00754             if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
00755             {
00756                 if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
00757                 {
00758                     float arrangeWidth{};
00759
00760                     if (usesArrangeWidthInfo)
00761                     {
00762                         // Use the item info provided by the ItemsInfoRequested handler since the DesiredSize
00763                         // may be different from the computed arrange width when the item content failed to load properly.
00764                         arrangeWidth = m_itemsInfoArrangeWidths[static_cast<size_t>(sizedItemIndex) - itemsInfoArrangeWidthsOffset];
00765                     }
00766                     else
00767                     {
00768                         arrangeWidth = element.DesiredSize().Width;
00769                     }
00770
00771 #ifdef DBG
00772                     if (arrangeWidth == 0.0f)
00773                     {
00774                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, usesArrangeWidthInfo ? L"Unexpected nil arrange width" : L"Unexpected nil desired width", sizedItemIndex);
00775                     }
00776 #endif
00777
00778                     const winrt::Rect elementRect{ cumulatedOffset, static_cast<float>(lineIndex * (actualLineHeight + lineSpacing)), arrangeWidth, static_cast<float>(actualLineHeight)};
00779
00780                     element.Arrange(elementRect);
00781
00782 #ifdef DBG
00783                     if (sizedItemIndex == m_logItemIndexDbg)
00784                     {
00785                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
00786                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_PTR_STR, METH_NAME, this, element, L"Arrange element");
00787                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Arrange line", lineIndex);
00788                     }
00789
00790                     if (m_elementAvailableWidths && m_elementDesiredWidths)
00791                     {
00792                         MUX_ASSERT(!UsesFastPathLayout());
00793
00794                         const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
00795                         auto recordedSizeIterator = m_elementAvailableWidths->find(elementTracker);
00796
00797                         if (recordedSizeIterator == m_elementAvailableWidths->end())
00798                         {
00799                             recordedSizeIterator = m_elementDesiredWidths->find(elementTracker);
00800
00801                             if (recordedSizeIterator != m_elementDesiredWidths->end())
00802                             {
00803                                 const float desiredWidth = recordedSizeIterator->second;
00804
00805                                 if ((std::abs(desiredWidth - element.DesiredSize().Width) >= 1.0f || std::abs(actualLineHeight - element.DesiredSize().Height) >= 1.0f) ||
00806                                     sizedItemIndex == m_logItemIndexDbg)
00807                                 {
00808                                     if (sizedItemIndex != m_logItemIndexDbg)
00809                                     {
00810                                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedItemIndex", sizedItemIndex);
00811                                     }
00812                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredWidth", desiredWidth);
00813                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"element.DesiredSize.Width", element.DesiredSize().Width);
00814                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredHeight", actualLineHeight);
00815                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"element.DesiredSize.Height", element.DesiredSize().Height);
00816                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
00817                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"renderWidth", element.RenderSize().Width);
00818                                 }
00819                             }
00820                         }
00821                         else
00822                         {
00823                             const float arrangeWidthDbg = recordedSizeIterator->second;
00824
00825                             if (std::abs(arrangeWidthDbg - element.DesiredSize().Width) >= 1.0f ||
00826                                 sizedItemIndex == m_logItemIndexDbg)
00827                             {
00828                                 if (sizedItemIndex != m_logItemIndexDbg)
00829                                 {
00830                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedItemIndex", sizedItemIndex);
00831                                 }
00832                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"element.DesiredSize.Width", element.DesiredSize().Width);
00833                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidthDbg", arrangeWidthDbg);
00834                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
00835                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"renderWidth", element.RenderSize().Width);
00836                             }
00837                         }
00838                     }
00839                     else if (sizedItemIndex == m_logItemIndexDbg)
00840                     {
00841                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"desiredWidth", element.DesiredSize().Width);
00842                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
00843                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"renderWidth", element.RenderSize().Width);
00844                     }
00845
00846                     if (sizedLineItemIndex > 0)
00847                     {
00848                         cumulatedWidthDbg += itemSpacing;
00849                     }
00850
00851                     cumulatedWidthDbg += elementRect.Width;
00852 #endif
00853
00854                     cumulatedOffset += elementRect.Width + itemSpacing;
00855                 }
00856             }
00857             else
00858             {
00859                 // The unrealized area was reached.
00860                 return;
00861             }
00862
00863             sizedItemIndex++;
00864         }
00865
00866 #ifdef DBG
00867         if (std::abs(context.VisibleRect().Width - cumulatedWidthDbg) > 1.0f)
00868         {
00869             LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"cumulatedWidth", cumulatedWidthDbg);
00870         }
00871 #endif
00872     }
00873 }
00874
00875 // Items arrangement when the non-scrolling dimension is unconstrained.
00876 void LinedFlowLayout::ArrangeUnconstrainedLine(
00877     winrt::VirtualizingLayoutContext const& context)
00878 {
00879     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00880
00881     if (ActualLineHeight() <= 0.0)
00882     {
00883         return;
00884     }
00885
00886     const float minItemSpacing = static_cast<float>(MinItemSpacing());
00887     float cumulatedOffset = 0.0f;
00888
00889     if (ItemsStretch() == winrt::LinedFlowLayoutItemsStretch::None)
00890     {
00891         switch (ItemsJustification())
00892         {
00893         case winrt::LinedFlowLayoutItemsJustification::SpaceEvenly:
00894             cumulatedOffset = minItemSpacing;
00895             break;
00896         case winrt::LinedFlowLayoutItemsJustification::SpaceAround:
00897             cumulatedOffset = minItemSpacing / 2.0f;
00898             break;
00899         }
00900     }
00901
00902     for (int itemIndex = 0; itemIndex < context.ItemCount(); itemIndex++)
00903     {
00904         const auto element = m_elementManager.GetAt(itemIndex);
00905
00906         if (element)
00907         {
00908             const auto desiredSize = element.DesiredSize();
00909             const auto itemWidth = desiredSize.Width;
00910             const winrt::Rect arrangeRect{ cumulatedOffset, 0.0f, itemWidth, desiredSize.Height };
00911
00912             element.Arrange(arrangeRect);
00913             cumulatedOffset += itemWidth + minItemSpacing;
00914         }
00915     }
00916 }
00917
00918 void LinedFlowLayout::ClearItemAspectRatios()
00919 {
00920     if (m_aspectRatios)
00921     {
00922         m_aspectRatios->Clear();
00923     }
00924 }
00925
00926 // Last major phase of a measure pass:
00927 // - updates the range of frozen lines and items (ComputeFrozenItemsRange calls).
00928 // - breaks down all the sized lines into blocks on lines that require an items distribution (ComputeItemsLayout calls).
00929 //   * when a full re-layout is required, a single block of all sized lines produces a single items distribution.
00930 //   * otherwise two unfrozen blocks before and after the frozen lines can produce up to two items distributions.
00931 //     These two distributions are getting lines at the edges of the unfrozen blocks ready to become frozen due to a scroll viewport size or scroll offset change.
00932 // Returns True when a still sized item has a new desired width.
00933 bool LinedFlowLayout::ComputeFrozenItemsAndLayout(
00934     winrt::VirtualizingLayoutContext const& context,
00935     std::vector<int>& oldLineItemCounts,
00936     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementAvailableWidths,
00937     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementDesiredWidths,
00938     double scrollViewport,
00939     double scrollOffset,
00940     double lineSpacing,
00941     double actualLineHeight,
00942     float availableWidth,
00943     float nearSizedItemsRect,
00944     float farSizedItemsRect,
00945     float nearRealizationRect,
00946     float farRealizationRect,
00947     int lineCount,
00948     int sizedLineCount,
00949     int unsizedNearItemCount,
00950     int sizedItemCount,
00951     int firstStillSizedLineIndex,
00952     int lastStillSizedLineIndex,
00953     int firstStillSizedItemIndex,
00954     int lastStillSizedItemIndex)
00955 {
00956 #ifdef DBG
00957     MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
00958     MUX_ASSERT(nearSizedItemsRect <= nearRealizationRect);
00959     MUX_ASSERT(farSizedItemsRect >= farRealizationRect);
00960     MUX_ASSERT(sizedLineCount <= lineCount);
00961     MUX_ASSERT(sizedItemCount >= m_elementManager.GetRealizedElementCount());
00962 #endif
00963
00964     bool itemHasNewDesiredWidth{};
00965
00966     if (firstStillSizedLineIndex != -1)
00967     {
00968         // Some line indexes are present in the previous measure pass and this new one.
00969 #ifdef DBG
00970         MUX_ASSERT(m_isVirtualizingContext);
00971         MUX_ASSERT(lastStillSizedLineIndex != -1);
00972         MUX_ASSERT(m_firstSizedLineIndex <= firstStillSizedLineIndex);
00973         MUX_ASSERT(m_lastSizedLineIndex >= lastStillSizedLineIndex);
00974         MUX_ASSERT(m_firstSizedItemIndex <= firstStillSizedItemIndex);
00975         MUX_ASSERT(m_lastSizedItemIndex >= lastStillSizedItemIndex);
00976         MUX_ASSERT(m_lastSizedItemIndex - m_firstSizedItemIndex + 1 == sizedItemCount);
00977         MUX_ASSERT(lastStillSizedItemIndex - firstStillSizedItemIndex + 1 <= sizedItemCount);
00978
00979         const int stillSizedItemCountDbg = LineItemsCountTotal(0);
00980         const int preStillSizedItemCountDbg = firstStillSizedItemIndex - m_firstSizedItemIndex;
00981         const int postStillSizedItemCountDbg = m_firstSizedItemIndex + sizedItemCount - lastStillSizedItemIndex - 1;
00982
00983         MUX_ASSERT(preStillSizedItemCountDbg + stillSizedItemCountDbg + postStillSizedItemCountDbg == sizedItemCount);
00984 #endif
00985
00986         const int firstRealizedItemIndex = m_elementManager.GetFirstRealizedDataIndex();
00987         const int lastRealizedItemIndex = firstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;
00988
00989         MUX_ASSERT(firstRealizedItemIndex >= 0);
00990         MUX_ASSERT(lastRealizedItemIndex >= 0);
00991
00992         int adjustedFirstStillSizedItemIndex;
00993         int adjustedLastStillSizedItemIndex;
00994         bool preFrozenItemHasNewDesiredWidth = false;
00995         bool postFrozenItemHasNewDesiredWidth = false;
00996
00997         bool forceRelayout = ComputeFrozenItemsRange(
00998             scrollViewport,
00999             scrollOffset,
01000             lineSpacing,
01001             actualLineHeight,
01002             lineCount,
01003             firstStillSizedLineIndex /*beginSizedLineIndex*/,
01004             lastStillSizedLineIndex  /*endSizedLineIndex*/,
01005             firstStillSizedItemIndex /*beginSizedItemIndex*/,
01006             lastStillSizedItemIndex  /*endSizedItemIndex*/,
01007             adjustedFirstStillSizedItemIndex,
01008             adjustedLastStillSizedItemIndex);
01009
01010         if (!forceRelayout)
01011         {
01012             // m_firstFrozenItemIndex & m_lastFrozenItemIndex may still be -1 for example when scrollViewport==0.0.
01013
01014             if (m_itemsInfoFirstIndex == -1)
01015             {
01016                 if (oldElementDesiredWidths && oldElementAvailableWidths)
01017                 {
01018                     const int clampedAdjustedFirstStillSizedItemIndex = std::clamp(adjustedFirstStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex);
01019                     const int clampedAdjustedLastStillSizedItemIndex = std::clamp(adjustedLastStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex);
01020
01021                     EnsureAndMeasureItemRange(
01022                         context,
01023                         availableWidth,
01024                         actualLineHeight,
01025                         true /*forward*/,
01026                         clampedAdjustedFirstStillSizedItemIndex /*beginRealizedItemIndex*/,
01027                         clampedAdjustedLastStillSizedItemIndex /*endRealizedItemIndex*/);
01028
01029                     // Check if any of the elements from m_firstFrozenItemIndex to m_lastFrozenItemIndex has a new or modified DesiredSize.
01030                     // In that case, a full re-layout is required.
01031                     // When a sized item before the frozen ones has a modified DesiredSize, it does not cause a full re-layout, but
01032                     // the pre-frozen-range is laid out in isolation. The same is applicable to the post-frozen-range.
01033                     std::tuple<bool /*preFrozenItemHasNewDesiredWidth*/, bool /*frozenItemHasNewDesiredWidth*/, bool /*postFrozenItemHasNewDesiredWidth*/> itemRangesHaveNewDesiredWidths =
01034                         ItemRangesHaveNewDesiredWidths(
01035                             oldElementDesiredWidths,
01036                             std::min(firstStillSizedItemIndex, m_firstFrozenItemIndex),
01037                             std::max(lastStillSizedItemIndex, m_lastFrozenItemIndex));
01038
01039                     // forceRelayout is set to True when a frozen item has a new or modified DesiredSize.
01040                     forceRelayout = std::get<1>(itemRangesHaveNewDesiredWidths);
01041
01042                     itemHasNewDesiredWidth = forceRelayout || std::get<0>(itemRangesHaveNewDesiredWidths) || std::get<2>(itemRangesHaveNewDesiredWidths);
01043
01044                     if (!forceRelayout)
01045                     {
01046                         // preFrozenItemHasNewDesiredWidth is set to True when a sized item before the frozen ones has a modified DesiredSize.
01047                         preFrozenItemHasNewDesiredWidth = std::get<0>(itemRangesHaveNewDesiredWidths);
01048
01049                         // postFrozenItemHasNewDesiredWidth is set to True when a sized item after the frozen ones has a modified DesiredSize.
01050                         postFrozenItemHasNewDesiredWidth = std::get<2>(itemRangesHaveNewDesiredWidths);
01051
01052                         if (!preFrozenItemHasNewDesiredWidth && !postFrozenItemHasNewDesiredWidth)
01053                         {
01054                             // Measure realized items based on previously computed available widths 'oldElementAvailableWidths'.
01055                             // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
01056                             MeasureItemRangeRegularPath(
01057                                 oldElementAvailableWidths,
01058                                 actualLineHeight,
01059                                 clampedAdjustedFirstStillSizedItemIndex /*beginRealizedItemIndex*/,
01060                                 clampedAdjustedLastStillSizedItemIndex /*endRealizedItemIndex*/);
01061                         }
01062                         else
01063                         {
01064                             MUX_ASSERT(clampedAdjustedFirstStillSizedItemIndex <= m_firstFrozenItemIndex);
01065                             MUX_ASSERT(clampedAdjustedLastStillSizedItemIndex >= m_lastFrozenItemIndex);
01066
01067                             // Measure frozen items based on previously computed available widths 'oldElementAvailableWidths'.
01068                             // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
01069                             MeasureItemRangeRegularPath(
01070                                 oldElementAvailableWidths,
01071                                 actualLineHeight,
01072                                 m_firstFrozenItemIndex /*beginRealizedItemIndex*/,
01073                                 m_lastFrozenItemIndex /*endRealizedItemIndex*/);
01074
01075                             if (!preFrozenItemHasNewDesiredWidth && clampedAdjustedFirstStillSizedItemIndex <= m_firstFrozenItemIndex - 1)
01076                             {
01077                                 // Measure pre-frozen items based on previously computed available widths 'oldElementAvailableWidths'.
01078                                 // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
01079                                 MeasureItemRangeRegularPath(
01080                                     oldElementAvailableWidths,
01081                                     actualLineHeight,
01082                                     clampedAdjustedFirstStillSizedItemIndex /*beginRealizedItemIndex*/,
01083                                     m_firstFrozenItemIndex - 1 /*endRealizedItemIndex*/);
01084                             }
01085
01086                             if (!postFrozenItemHasNewDesiredWidth && m_lastFrozenItemIndex + 1 <= clampedAdjustedLastStillSizedItemIndex)
01087                             {
01088                                 // Measure post-frozen items based on previously computed available widths 'oldElementAvailableWidths'.
01089                                 // Re-populate m_elementAvailableWidths with the old & re-applied available widths.
01090                                 MeasureItemRangeRegularPath(
01091                                     oldElementAvailableWidths,
01092                                     actualLineHeight,
01093                                     m_lastFrozenItemIndex + 1 /*beginRealizedItemIndex*/,
01094                                     clampedAdjustedLastStillSizedItemIndex /*endRealizedItemIndex*/);
01095                             }
01096                         }
01097                     }
01098                 }
01099             }
01100             else
01101             {
01102                 MeasureItemRange(
01103                     actualLineHeight,
01104                     firstRealizedItemIndex /*beginRealizedItemIndex*/,
01105                     lastRealizedItemIndex  /*endRealizedItemIndex*/);
01106             }
01107         }
01108
01109         if (forceRelayout)
01110         {
01111             // Layout all the sized lines.
01112             InitializeForRelayout(
01113                 sizedLineCount,
01114                 firstStillSizedLineIndex,
01115                 lastStillSizedLineIndex,
01116                 firstStillSizedItemIndex,
01117                 lastStillSizedItemIndex);
01118             oldLineItemCounts.clear();
01119
01120             ComputeItemsLayoutRegularPath(
01121                 availableWidth,
01122                 scrollViewport,
01123                 lineSpacing,
01124                 actualLineHeight,
01125                 m_firstSizedLineIndex /*beginSizedLineIndex*/,
01126                 m_lastSizedLineIndex  /*endSizedLineIndex*/,
01127                 m_firstSizedItemIndex /*beginSizedItemIndex*/,
01128                 m_lastSizedItemIndex  /*endSizedItemIndex*/,
01129                 0 /*beginLineVectorIndex*/,
01130                 m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);
01131
01132             int adjustedFirstSizedItemIndex;
01133             int adjustedLastSizedItemIndex;
01134
01135             ComputeFrozenItemsRange(
01136                 scrollViewport,
01137                 scrollOffset,
01138                 lineSpacing,
01139                 actualLineHeight,
01140                 lineCount,
01141                 m_firstSizedLineIndex /*beginSizedLineIndex*/,
01142                 m_lastSizedLineIndex  /*endSizedLineIndex*/,
01143                 m_firstSizedItemIndex /*beginSizedItemIndex*/,
01144                 m_lastSizedItemIndex  /*endSizedItemIndex*/,
01145                 adjustedFirstSizedItemIndex,
01146                 adjustedLastSizedItemIndex);
01147         }
01148         else
01149         {
01150             MUX_ASSERT(adjustedFirstStillSizedItemIndex != -1 || m_firstSizedLineIndex == firstStillSizedLineIndex);
01151             MUX_ASSERT(adjustedLastStillSizedItemIndex != -1 || m_lastSizedLineIndex == lastStillSizedLineIndex);
01152
01153             if (m_firstSizedLineIndex < firstStillSizedLineIndex)
01154             {
01155                 if (m_firstFrozenLineIndex > firstStillSizedLineIndex)
01156                 {
01157                     MUX_ASSERT(adjustedFirstStillSizedItemIndex - 1 >= firstStillSizedItemIndex);
01158
01159                     EnsureAndMeasureItemRange(
01160                         context,
01161                         availableWidth,
01162                         actualLineHeight,
01163                         false /*forward*/,
01164                         std::clamp(adjustedFirstStillSizedItemIndex - 1, firstRealizedItemIndex, lastRealizedItemIndex) /*beginRealizedItemIndex*/,
01165                         std::clamp(firstStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex) /*endRealizedItemIndex*/);
01166                 }
01167
01168                 // Layout unfrozen & sized lines before the frozen ones.
01169                 MUX_ASSERT(firstStillSizedLineIndex < lineCount);
01170                 MUX_ASSERT(m_firstFrozenLineIndex > 0);
01171                 MUX_ASSERT(m_firstFrozenLineIndex - 1 >= m_firstSizedLineIndex);
01172                 MUX_ASSERT(adjustedFirstStillSizedItemIndex - 1 >= m_firstSizedItemIndex);
01173
01174                 ComputeItemsLayoutRegularPath(
01175                     availableWidth,
01176                     scrollViewport,
01177                     lineSpacing,
01178                     actualLineHeight,
01179                     m_firstFrozenLineIndex - 1 /*beginSizedLineIndex*/,
01180                     m_firstSizedLineIndex /*endSizedLineIndex*/,
01181                     adjustedFirstStillSizedItemIndex - 1 /*beginSizedItemIndex*/,
01182                     m_firstSizedItemIndex /*endSizedItemIndex*/,
01183                     0 /*beginLineVectorIndex*/,
01184                     true /*isLastSizedLineStretchEnabled*/);
01185             }
01186             else if (preFrozenItemHasNewDesiredWidth)
01187             {
01188                 MUX_ASSERT(m_firstFrozenLineIndex > 0);
01189                 MUX_ASSERT(m_firstFrozenItemIndex > 0);
01190                 MUX_ASSERT(m_firstSizedLineIndex <= m_firstFrozenLineIndex - 1);
01191                 MUX_ASSERT(m_firstSizedItemIndex <= m_firstFrozenItemIndex - 1);
01192
01193                 // Re-layout the pre-frozen range since at least one of the items in there has a modified DesiredSize.
01194                 ComputeItemsLayoutRegularPath(
01195                     availableWidth,
01196                     scrollViewport,
01197                     lineSpacing,
01198                     actualLineHeight,
01199                     m_firstFrozenLineIndex - 1 /*beginSizedLineIndex*/,
01200                     m_firstSizedLineIndex /*endSizedLineIndex*/,
01201                     m_firstFrozenItemIndex - 1 /*beginSizedItemIndex*/,
01202                     m_firstSizedItemIndex /*endSizedItemIndex*/,
01203                     0 /*beginLineVectorIndex*/,
01204                     true /*isLastSizedLineStretchEnabled*/);
01205             }
01206
01207             if (m_lastSizedLineIndex > lastStillSizedLineIndex)
01208             {
01209                 if (m_lastFrozenLineIndex < lastStillSizedLineIndex)
01210                 {
01211                     MUX_ASSERT(adjustedLastStillSizedItemIndex + 1 <= lastStillSizedItemIndex);
01212
01213                     EnsureAndMeasureItemRange(
01214                         context,
01215                         availableWidth,
01216                         actualLineHeight,
01217                         true /*forward*/,
01218                         std::clamp(adjustedLastStillSizedItemIndex + 1, firstRealizedItemIndex, lastRealizedItemIndex) /*beginRealizedItemIndex*/,
01219                         std::clamp(lastStillSizedItemIndex, firstRealizedItemIndex, lastRealizedItemIndex) /*endRealizedItemIndex*/);
01220                 }
01221
01222                 // Layout unfrozen & sized lines after the frozen ones.
01223                 MUX_ASSERT(lastStillSizedLineIndex < lineCount);
01224                 MUX_ASSERT(m_lastFrozenLineIndex < lineCount - 1);
01225                 MUX_ASSERT(m_lastFrozenLineIndex + 1 <= m_lastSizedLineIndex);
01226                 MUX_ASSERT(adjustedLastStillSizedItemIndex + 1 <= m_lastSizedItemIndex);
01227
01228                 ComputeItemsLayoutRegularPath(
01229                     availableWidth,
01230                     scrollViewport,
01231                     lineSpacing,
01232                     actualLineHeight,
01233                     m_lastFrozenLineIndex + 1 /*beginSizedLineIndex*/,
01234                     m_lastSizedLineIndex /*endSizedLineIndex*/,
01235                     adjustedLastStillSizedItemIndex + 1 /*beginSizedItemIndex*/,
01236                     m_lastSizedItemIndex /*endSizedItemIndex*/,
01237                     static_cast<int>(m_lineItemCounts.size()) - m_lastSizedLineIndex + m_lastFrozenLineIndex /*beginLineVectorIndex*/,
01238                     m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);
01239             }
01240             else if (postFrozenItemHasNewDesiredWidth)
01241             {
01242                 MUX_ASSERT(m_lastFrozenLineIndex + 1 <= m_lastSizedLineIndex);
01243                 MUX_ASSERT(m_lastFrozenItemIndex + 1 <= m_lastSizedItemIndex);
01244
01245                 // Re-layout the post-frozen range since at least one of the items in there has a modified DesiredSize.
01246                 ComputeItemsLayoutRegularPath(
01247                     availableWidth,
01248                     scrollViewport,
01249                     lineSpacing,
01250                     actualLineHeight,
01251                     m_lastFrozenLineIndex + 1 /*beginSizedLineIndex*/,
01252                     m_lastSizedLineIndex /*endSizedLineIndex*/,
01253                     m_lastFrozenItemIndex + 1 /*beginSizedItemIndex*/,
01254                     m_lastSizedItemIndex /*endSizedItemIndex*/,
01255                     static_cast<int>(m_lineItemCounts.size()) - m_lastSizedLineIndex + m_lastFrozenLineIndex /*beginLineVectorIndex*/,
01256                     m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);
01257             }
01258         }
01259     }
01260     else
01261     {
01262         // No recurring sized lines. Layout all the new sized lines.
01263         ComputeItemsLayoutRegularPath(
01264             availableWidth,
01265             scrollViewport,
01266             lineSpacing,
01267             actualLineHeight,
01268             m_firstSizedLineIndex /*beginSizedLineIndex*/,
01269             m_lastSizedLineIndex  /*endSizedLineIndex*/,
01270             unsizedNearItemCount  /*beginSizedItemIndex*/,
01271             unsizedNearItemCount + sizedItemCount - 1 /*endSizedItemIndex*/,
01272             0 /*beginLineVectorIndex*/,
01273             m_lastSizedLineIndex < lineCount - 1 /*isLastSizedLineStretchEnabled*/);
01274
01275         int adjustedFirstSizedItemIndex;
01276         int adjustedLastSizedItemIndex;
01277
01278         ComputeFrozenItemsRange(
01279             scrollViewport,
01280             scrollOffset,
01281             lineSpacing,
01282             actualLineHeight,
01283             lineCount,
01284             m_firstSizedLineIndex /*beginSizedLineIndex*/,
01285             m_lastSizedLineIndex  /*endSizedLineIndex*/,
01286             unsizedNearItemCount  /*beginSizedItemIndex*/,
01287             unsizedNearItemCount + sizedItemCount - 1 /*endSizedItemIndex*/,
01288             adjustedFirstSizedItemIndex,
01289             adjustedLastSizedItemIndex);
01290     }
01291
01292 #ifdef DBG
01293     if (itemHasNewDesiredWidth)
01294     {
01295         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns True");
01296     }
01297 #endif
01298
01299     return itemHasNewDesiredWidth;
01300 }
01301
01302 // Updates the m_firstFrozenLineIndex, m_lastFrozenLineIndex, m_firstFrozenItemIndex and m_lastFrozenItemIndex fields.
01303 // Returns 'True' when still sized lines must be ignored & a full re-layout must be performed.
01304 // beginSizedLineIndex:
01305 //  - m_firstSizedLineIndex when no scrolling occurred since the last measure pass, or when doing a full re-layout.
01306 //  - or first sized line index common among the previous and current measure passes. Slightly different from m_firstSizedLineIndex because of scrolling.
01307 // endSizedLineIndex:
01308 //  - m_lastSizedLineIndex when no scrolling occurred since the last measure pass, or when doing a full re-layout.
01309 //  - or last sized line index common among the previous and current measure passes. Slightly different from m_lastSizedLineIndex because of scrolling.
01310 // beginSizedItemIndex:
01311 //  - first sized item index when no scrolling occurred since the last measure pass, or when doing a full re-layout.
01312 //  - or first sized item index common among the previous and current measure passes. Slightly different from previously first sized item index because of scrolling.
01313 // endSizedItemIndex:
01314 //  - last sized item index when no scrolling occurred since the last measure pass, or when doing a full re-layout.
01315 //  - or last sized item index common among the previous and current measure passes. Slightly different from previously last sized item index because of scrolling.
01316 // adjustedBeginSizedItemIndex:
01317 //  returned as a variation of beginSizedItemIndex. For example, when the scroll offset decreased, the m_firstFrozenLineIndex and m_firstFrozenItemIndex can decrease
01318 //  and adjustedBeginSizedItemIndex becomes beginSizedItemIndex minus the number of items that have become frozen.
01319 // adjustedEndSizedItemIndex:
01320 //  returned as a variation of endSizedItemIndex. For example, when the scroll offset increased, the m_lastFrozenLineIndex and m_lastFrozenItemIndex can increase
01321 //  and adjustedEndSizedItemIndex becomes endSizedItemIndex plus the number of items that have become frozen.
01322 bool LinedFlowLayout::ComputeFrozenItemsRange(
01323     double scrollViewport,
01324     double scrollOffset,
01325     double lineSpacing,
01326     double actualLineHeight,
01327     int lineCount,
01328     int beginSizedLineIndex,
01329     int endSizedLineIndex,
01330     int beginSizedItemIndex,
01331     int endSizedItemIndex,
01332     int& adjustedBeginSizedItemIndex,
01333     int& adjustedEndSizedItemIndex)
01334 {
01335     MUX_ASSERT(!UsesFastPathLayout());
01336     MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));
01337     MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
01338     MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
01339     MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));
01340
01341     adjustedBeginSizedItemIndex = -1;
01342     adjustedEndSizedItemIndex = -1;
01343
01344     if (!m_isVirtualizingContext)
01345     {
01346         // Layout operating in non-virtualizing mode. All lines and items are frozen.
01347         MUX_ASSERT(m_firstSizedLineIndex == 0);
01348         MUX_ASSERT(m_itemCount > 0);
01349
01350         m_firstFrozenLineIndex = 0;
01351         m_lastFrozenLineIndex = m_lastSizedLineIndex;
01352         m_firstFrozenItemIndex = 0;
01353         m_lastFrozenItemIndex = m_itemCount - 1;
01354         return false;
01355     }
01356
01357     int firstDisplayedLineIndex = -1;
01358     int lastDisplayedLineIndex = -1;
01359
01360     GetFirstAndLastDisplayedLineIndexes(
01361         scrollViewport,
01362         scrollOffset,
01363         0 /*padding*/,
01364         lineSpacing,
01365         actualLineHeight,
01366         lineCount,
01367         false /*forFullyDisplayedLines*/,
01368         &firstDisplayedLineIndex,
01369         &lastDisplayedLineIndex);
01370
01371     if (firstDisplayedLineIndex == -1)
01372     {
01373         // This situation occurs when actualLineHeight + lineSpacing or context.VisibleRect().Height is 0.
01374         m_firstFrozenLineIndex = -1;
01375         m_lastFrozenLineIndex = -1;
01376         m_firstFrozenItemIndex = -1;
01377         m_lastFrozenItemIndex = -1;
01378         return false;
01379     }
01380
01381     MUX_ASSERT(lastDisplayedLineIndex != -1);
01382     MUX_ASSERT(firstDisplayedLineIndex >= m_firstSizedLineIndex);
01383     MUX_ASSERT(lastDisplayedLineIndex <= m_lastSizedLineIndex);
01384
01385     const int linesPerScrollViewport = static_cast<int>(scrollViewport / (actualLineHeight + lineSpacing));
01386
01387     // Frozen lines before the first displayed line use 80% of a scroll viewport or 40% of the sized area whichever is largest.
01388     int nearFrozenLinesCount = std::min(static_cast<int>(c_frozenLinesRatio * linesPerScrollViewport) + 1, firstDisplayedLineIndex - m_firstSizedLineIndex);
01389     nearFrozenLinesCount = std::max(nearFrozenLinesCount, static_cast<int>(c_frozenLinesRatio / 2.0 * (static_cast<double>(firstDisplayedLineIndex) - m_firstSizedLineIndex)));
01390
01391     // Frozen lines after the last displayed line use 80% of a scroll viewport or 40% of the sized area whichever is largest.
01392     int farFrozenLinesCount = std::min(static_cast<int>(c_frozenLinesRatio * linesPerScrollViewport) + 1, m_lastSizedLineIndex - lastDisplayedLineIndex);
01393     farFrozenLinesCount = std::max(farFrozenLinesCount, static_cast<int>(c_frozenLinesRatio / 2.0 * (static_cast<double>(m_lastSizedLineIndex) - lastDisplayedLineIndex)));
01394
01395     m_firstFrozenLineIndex = firstDisplayedLineIndex - nearFrozenLinesCount;
01396     m_lastFrozenLineIndex = lastDisplayedLineIndex + farFrozenLinesCount;
01397
01398     MUX_ASSERT(m_firstFrozenLineIndex >= m_firstSizedLineIndex);
01399     MUX_ASSERT(m_lastFrozenLineIndex <= m_lastSizedLineIndex);
01400
01401 #ifdef DBG
01402     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstFrozenLineIndex", m_firstFrozenLineIndex);
01403     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastFrozenLineIndex", m_lastFrozenLineIndex);
01404
01405     // Check if the previously first displayed & arranged line is still frozen
01406     if (m_previousFirstDisplayedArrangedLineIndexDbg != -1 && (m_previousFirstDisplayedArrangedLineIndexDbg < m_firstFrozenLineIndex || m_previousFirstDisplayedArrangedLineIndexDbg > m_lastFrozenLineIndex))
01407     {
01408         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_previousFirstDisplayedArrangedLineIndexDbg", m_previousFirstDisplayedArrangedLineIndexDbg);
01409     }
01410
01411     // Check if the previously last displayed & arranged line is still frozen
01412     if (m_previousLastDisplayedArrangedLineIndexDbg != -1 && (m_previousLastDisplayedArrangedLineIndexDbg < m_firstFrozenLineIndex || m_previousLastDisplayedArrangedLineIndexDbg > m_lastFrozenLineIndex))
01413     {
01414         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_previousLastDisplayedArrangedLineIndexDbg", m_previousLastDisplayedArrangedLineIndexDbg);
01415     }
01416 #endif
01417
01418     const int nearUnfrozenLinesCount = m_firstFrozenLineIndex - beginSizedLineIndex;
01419     const int farUnfrozenLinesCount = endSizedLineIndex - m_lastFrozenLineIndex;
01420
01421     if (nearUnfrozenLinesCount < 0 || farUnfrozenLinesCount < 0)
01422     {
01423         // nearUnfrozenLinesCount < 0 occurs when the scrolling offset has decreased too fast and the first frozen line has caught up and crossed the previous first sized line
01424         // farUnfrozenLinesCount < 0 occurs when the scrolling offset has increased too fast and the last frozen line has caught up and crossed the previous last sized line
01425         // These conditions can also occur when performing a large programmatic offset jump via ScrollView.ScrollTo/ScrollBy.  Trigger a full re-layout.
01426
01427         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"nearUnfrozenLinesCount", nearUnfrozenLinesCount);
01428         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"farUnfrozenLinesCount", farUnfrozenLinesCount);
01429
01430         return true;
01431     }
01432
01433     int firstFrozenItemIndex = beginSizedItemIndex;
01434     int lastFrozenItemIndex = endSizedItemIndex;
01435
01436     adjustedBeginSizedItemIndex = beginSizedItemIndex;
01437     adjustedEndSizedItemIndex = endSizedItemIndex;
01438
01439     if (m_firstSizedLineIndex < beginSizedLineIndex)
01440     {
01441         MUX_ASSERT(beginSizedItemIndex > 0);
01442         MUX_ASSERT(m_firstSizedItemIndex <= beginSizedItemIndex);
01443
01444         if (nearUnfrozenLinesCount > 0)
01445         {
01446             MUX_ASSERT(beginSizedLineIndex - m_firstSizedLineIndex + nearUnfrozenLinesCount <= static_cast<int>(m_lineItemCounts.size()));
01447
01448             for (int frozenLineVectorIndex = beginSizedLineIndex - m_firstSizedLineIndex;
01449                 frozenLineVectorIndex < beginSizedLineIndex - m_firstSizedLineIndex + nearUnfrozenLinesCount;
01450                 frozenLineVectorIndex++)
01451             {
01452                 MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);
01453
01454                 adjustedBeginSizedItemIndex += m_lineItemCounts[frozenLineVectorIndex];
01455                 m_lineItemCounts[frozenLineVectorIndex] = 0;
01456             }
01457
01458             firstFrozenItemIndex = adjustedBeginSizedItemIndex;
01459         }
01460     }
01461     else if (nearUnfrozenLinesCount > 0)
01462     {
01463         MUX_ASSERT(m_firstSizedLineIndex == beginSizedLineIndex);
01464         MUX_ASSERT(nearUnfrozenLinesCount <= static_cast<int>(m_lineItemCounts.size()));
01465
01466         for (int frozenLineVectorIndex = 0; frozenLineVectorIndex < nearUnfrozenLinesCount; frozenLineVectorIndex++)
01467         {
01468             MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);
01469
01470             firstFrozenItemIndex += m_lineItemCounts[frozenLineVectorIndex];
01471         }
01472     }
01473
01474     if (endSizedLineIndex < m_lastSizedLineIndex)
01475     {
01476         if (farUnfrozenLinesCount > 0)
01477         {
01478             for (int frozenLineVectorIndex = static_cast<int>(m_lineItemCounts.size()) - farUnfrozenLinesCount - m_lastSizedLineIndex + endSizedLineIndex;
01479                 frozenLineVectorIndex < static_cast<int>(m_lineItemCounts.size()) - m_lastSizedLineIndex + endSizedLineIndex;
01480                 frozenLineVectorIndex++)
01481             {
01482                 MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);
01483
01484                 adjustedEndSizedItemIndex -= m_lineItemCounts[frozenLineVectorIndex];
01485                 m_lineItemCounts[frozenLineVectorIndex] = 0;
01486             }
01487
01488             lastFrozenItemIndex = adjustedEndSizedItemIndex;
01489         }
01490     }
01491     else if (farUnfrozenLinesCount > 0)
01492     {
01493         MUX_ASSERT(endSizedLineIndex == m_lastSizedLineIndex);
01494         MUX_ASSERT(farUnfrozenLinesCount <= static_cast<int>(m_lineItemCounts.size()));
01495
01496         for (int frozenLineVectorIndex = static_cast<int>(m_lineItemCounts.size()) - farUnfrozenLinesCount;
01497             frozenLineVectorIndex < static_cast<int>(m_lineItemCounts.size());
01498             frozenLineVectorIndex++)
01499         {
01500             MUX_ASSERT(m_lineItemCounts[frozenLineVectorIndex] > 0);
01501
01502             lastFrozenItemIndex -= m_lineItemCounts[frozenLineVectorIndex];
01503         }
01504     }
01505
01506     m_firstFrozenItemIndex = firstFrozenItemIndex;
01507     m_lastFrozenItemIndex = lastFrozenItemIndex;
01508
01509     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstFrozenItemIndex", firstFrozenItemIndex);
01510     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastFrozenItemIndex", lastFrozenItemIndex);
01511
01512     return false;
01513 }
01514
01515 // Computes an drawback for the provided ItemsLayout. That drawback is stored in ItemsLayout.m_drawback, the smaller the better.
01516 // The drawback is the sum of distances between the available width and the line widths.
01517 void LinedFlowLayout::ComputeItemsLayoutDrawback(
01518     double availableWidth,
01519     bool isLastSizedLineStretchEnabled,
01520     ItemsLayout& itemsLayout) const
01521 {
01522     const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());
01523     const int lineVectorCount = static_cast<int>(isLastSizedLineStretchEnabled ? sizedLineCount : sizedLineCount - 1);
01524
01525     if (lineVectorCount == 0)
01526     {
01527         itemsLayout.m_drawback = 0;
01528         return;
01529     }
01530
01531     const double c_lineTooSmallExponent = 2.0;
01532     // Be careful when using std::pow(..., 3) as a negative input results in a negative output.
01533     // For the moment, c_lineTooLargeExponent is only applied to positive numbers, so its use is safe.
01534     const double c_lineTooLargeExponent = 3.0;
01535     double drawback = 0.0;
01536
01537     for (int lineVectorIndex = 0; lineVectorIndex < lineVectorCount; lineVectorIndex++)
01538     {
01539         const double lineWidthDelta = itemsLayout.m_lineItemWidths[lineVectorIndex] - availableWidth;
01540
01541         if (lineWidthDelta != 0.0)
01542         {
01543             // To minimize the occurrences of lines that exceed the available width, they are graded worse than lines that have room to spare.
01544             drawback += std::pow(lineWidthDelta, lineWidthDelta > 0.0 ? c_lineTooLargeExponent : c_lineTooSmallExponent);
01545         }
01546     }
01547
01548     // The last line does not participate in the grading if it's smaller than the available width, whether ItemsStretch is Fill or not.
01549     if (!isLastSizedLineStretchEnabled)
01550     {
01551         const double lineWidthDelta = itemsLayout.m_lineItemWidths[static_cast<size_t>(sizedLineCount) - 1] - availableWidth;
01552
01553         if (lineWidthDelta > 0.0)
01554         {
01555             // The last line exceeds the available width, grade it as such.
01556             drawback += std::pow(lineWidthDelta, c_lineTooLargeExponent);
01557         }
01558     }
01559
01560     itemsLayout.m_drawback = drawback;
01561 }
01562
01563 // Computes the final item widths based on the best ItemsLayout, available width and stretching mode.
01564 // Items are potentially shrunk to accommodate a smaller available line width, or stretched to accommodate a larger available line width.
01565 void LinedFlowLayout::ComputeItemsLayoutWithLockedItems(
01566     ItemsLayout& itemsLayout,
01567     double availableWidth,
01568     double minItemSpacing,
01569     double actualLineHeight,
01570     double averageAspectRatio,
01571     int beginSizedLineIndex,
01572     int endSizedLineIndex,
01573     int beginSizedItemIndex,
01574     int endSizedItemIndex,
01575     int beginLineVectorIndex,
01576     bool isLastSizedLineStretchEnabled)
01577 {
01578     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedLineIndex", beginSizedLineIndex);
01579     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedLineIndex", endSizedLineIndex);
01580     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedItemIndex", beginSizedItemIndex);
01581     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedItemIndex", endSizedItemIndex);
01582
01583     MUX_ASSERT(!UsesFastPathLayout());
01584     MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
01585     MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
01586     MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));
01587
01588     const bool forward = beginSizedItemIndex <= endSizedItemIndex;
01589     const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemCounts.size());
01590
01591 #ifdef DBG
01592     MUX_ASSERT(sizedLineCount == static_cast<int>(forward ? endSizedLineIndex - beginSizedLineIndex + 1 : beginSizedLineIndex - endSizedLineIndex + 1));
01593
01594     const int sizedLineCountDbg = forward ? endSizedItemIndex - beginSizedItemIndex + 1 : beginSizedItemIndex - endSizedItemIndex + 1;
01595
01596     MUX_ASSERT(sizedLineCountDbg >= sizedLineCount);
01597 #endif
01598
01599     int lineVectorIndex;
01600
01601     for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
01602     {
01603         MUX_ASSERT(itemsLayout.m_lineItemCounts[lineVectorIndex] > 0);
01604
01605         m_lineItemCounts[static_cast<size_t>(beginLineVectorIndex) + lineVectorIndex] = itemsLayout.m_lineItemCounts[lineVectorIndex];
01606     }
01607
01608     const bool itemsAreStretched = ItemsStretch() == winrt::LinedFlowLayoutItemsStretch::Fill;
01609     int sizedItemIndex = beginSizedItemIndex;
01610
01611     for (lineVectorIndex = forward ? 0 : sizedLineCount - 1; ; lineVectorIndex = forward ? lineVectorIndex + 1 : lineVectorIndex - 1)
01612     {
01613         const int lineItemsCount = itemsLayout.m_lineItemCounts[lineVectorIndex];
01614         const double lineItemsWidth = itemsLayout.m_lineItemWidths[lineVectorIndex];
01615         const double minItemSpacings = lineItemsCount > 1 ? (static_cast<double>(lineItemsCount) - 1) * minItemSpacing : 0.0;
01616         double scaleFactor = 1.0;
01617
01618         if (lineItemsWidth - minItemSpacings > 0.0)
01619         {
01620             if (lineItemsWidth > availableWidth)
01621             {
01622                 scaleFactor = ComputeLineShrinkFactor(
01623                     forward,
01624                     sizedItemIndex,
01625                     lineItemsCount,
01626                     lineItemsWidth,
01627                     availableWidth,
01628                     minItemSpacings,
01629                     actualLineHeight,
01630                     averageAspectRatio);
01631                 MUX_ASSERT(scaleFactor >= 0.0);
01632                 MUX_ASSERT(scaleFactor < 1.0);
01633             }
01634             else if ((!forward || lineVectorIndex < (isLastSizedLineStretchEnabled ? sizedLineCount : sizedLineCount - 1)) &&
01635                 lineItemsWidth < availableWidth &&
01636                 itemsAreStretched)
01637             {
01638                 scaleFactor = ComputeLineExpandFactor(
01639                     forward,
01640                     sizedItemIndex,
01641                     lineItemsCount,
01642                     lineItemsWidth,
01643                     availableWidth,
01644                     minItemSpacings,
01645                     actualLineHeight,
01646                     averageAspectRatio);
01647                 MUX_ASSERT(scaleFactor > 1.0);
01648             }
01649         }
01650
01651         if (scaleFactor != 1.0)
01652         {
01653             for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
01654             {
01655                 MUX_ASSERT((forward && sizedItemIndex <= endSizedItemIndex) || (!forward && sizedItemIndex >= endSizedItemIndex));
01656
01657                 double minWidth{};
01658
01659                 if (m_itemsInfoFirstIndex == -1)
01660                 {
01661                     MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndex));
01662
01663                     if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
01664                     {
01665                         if (scaleFactor < 1.0)
01666                         {
01667                             if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
01668                             {
01669                                 minWidth = frameworkElement.MinWidth();
01670                             }
01671                         }
01672
01673                         auto elementAvailableSize = winrt::Size(
01674                             std::max(static_cast<float>(minWidth), static_cast<float>(element.DesiredSize().Width * scaleFactor)),
01675                             static_cast<float>(actualLineHeight));
01676
01677                         element.Measure(elementAvailableSize);
01678
01679                         const float itemWidth = element.DesiredSize().Width;
01680
01681                         elementAvailableSize.Width = itemWidth;
01682
01683                         MUX_ASSERT(m_elementAvailableWidths);
01684
01685                         const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
01686
01687                         if (m_elementAvailableWidths->find(elementTracker) == m_elementAvailableWidths->end())
01688                         {
01689                             m_elementAvailableWidths->insert(std::pair<tracker_ref<winrt::UIElement>, float>(elementTracker, itemWidth));
01690                         }
01691                         else
01692                         {
01693                             m_elementAvailableWidths->emplace(elementTracker, itemWidth);
01694                         }
01695
01696 #ifdef DBG
01697                         if (sizedItemIndex == m_logItemIndexDbg)
01698                         {
01699                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
01700                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize (1)",
01701                                 elementAvailableSize.Width,
01702                                 elementAvailableSize.Height);
01703                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
01704                                 element.DesiredSize().Width,
01705                                 element.DesiredSize().Height);
01706                         }
01707 #endif
01708                     }
01709                 }
01710                 else
01711                 {
01712                     MUX_ASSERT(sizedItemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));
01713
01714                     const float arrangeWidth = GetArrangeWidthFromItemsInfo(sizedItemIndex, actualLineHeight, averageAspectRatio, scaleFactor);
01715
01716                     SetArrangeWidthFromItemsInfo(sizedItemIndex, arrangeWidth);
01717
01718                     if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
01719                     {
01720                         if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
01721                         {
01722                             const auto elementAvailableSize = winrt::Size(
01723                                 arrangeWidth,
01724                                 static_cast<float>(actualLineHeight));
01725
01726                             element.Measure(elementAvailableSize);
01727
01728 #ifdef DBG
01729                             if (sizedItemIndex == m_logItemIndexDbg)
01730                             {
01731                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
01732                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize (2)",
01733                                     elementAvailableSize.Width,
01734                                     elementAvailableSize.Height);
01735                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
01736                                     element.DesiredSize().Width,
01737                                     element.DesiredSize().Height);
01738                             }
01739 #endif
01740                         }
01741                     }
01742                 }
01743
01744                 sizedItemIndex = forward ? sizedItemIndex + 1 : sizedItemIndex - 1;
01745             }
01746         }
01747         else
01748         {
01749             // Measuring items even when no scale factor is applied so that they fill their available width (otherwise background-colored bands appear on the items' left/right edges).
01750             for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
01751             {
01752                 MUX_ASSERT((forward && sizedItemIndex <= endSizedItemIndex) || (!forward && sizedItemIndex >= endSizedItemIndex));
01753                 MUX_ASSERT(m_itemsInfoFirstIndex == -1 || sizedItemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));
01754
01755                 float arrangeWidth{};
01756
01757                 if (m_itemsInfoFirstIndex != -1)
01758                 {
01759                     // Case where LinedFlowLayout.ItemsInfoRequested returned partial sizing information.
01760                     // Retrieve the item's arrange width computed from the m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath,
01761                     // m_itemsInfoMinWidth, m_itemsInfoMaxWidth fields.
01762                     arrangeWidth = GetArrangeWidthFromItemsInfo(sizedItemIndex, actualLineHeight, averageAspectRatio);
01763
01764                     // Store that arrange width in the m_itemsInfoArrangeWidths vector.
01765                     SetArrangeWidthFromItemsInfo(sizedItemIndex, arrangeWidth);
01766                 }
01767
01768                 if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
01769                 {
01770                     if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
01771                     {
01772                         if (m_itemsInfoFirstIndex == -1)
01773                         {
01774                             // Case where LinedFlowLayout.ItemsInfoRequested returned no sizing information.
01775                             // Retrieve the item's arrange width as its desired width.
01776                             arrangeWidth = element.DesiredSize().Width;
01777                         }
01778
01779                         const auto elementAvailableSize = winrt::Size(
01780                             arrangeWidth,
01781                             static_cast<float>(actualLineHeight));
01782
01783                         element.Measure(elementAvailableSize);
01784
01785 #ifdef DBG
01786                         if (sizedItemIndex == m_logItemIndexDbg)
01787                         {
01788                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
01789                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize (3)",
01790                                 elementAvailableSize.Width,
01791                                 elementAvailableSize.Height);
01792                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
01793                                 element.DesiredSize().Width,
01794                                 element.DesiredSize().Height);
01795                         }
01796 #endif
01797                     }
01798                 }
01799
01800                 sizedItemIndex = forward ? sizedItemIndex + 1 : sizedItemIndex - 1;
01801             }
01802
01803             // Making sure the items fill the line when ItemsStretch is Fill.
01804             MUX_ASSERT(!(itemsAreStretched && availableWidth - lineItemsWidth > lineItemsCount && lineItemsWidth > minItemSpacings && lineVectorIndex != sizedLineCount - 1));
01805         }
01806
01807         if (forward && lineVectorIndex == sizedLineCount - 1)
01808         {
01809             break;
01810         }
01811         if (!forward && lineVectorIndex == 0)
01812         {
01813             break;
01814         }
01815     }
01816 }
01817
01818 // Computes the best layout by assigning items to lines - for the fast path.
01819 // This method populates the m_itemsInfoArrangeWidths and m_lineItemCounts vectors successively, using the
01820 // m_itemsInfoDesiredAspectRatiosForFastPath, m_itemsInfoMinWidthsForFastPath, m_itemsInfoMaxWidthsForFastPath,
01821 // m_itemsInfoMinWidth, m_itemsInfoMaxWidth fields.
01822 // Returns the largest line width among all the lines.
01823 float LinedFlowLayout::ComputeItemsLayoutFastPath(
01824     float availableWidth,
01825     double actualLineHeight)
01826 {
01827     MUX_ASSERT(m_itemCount > 0);
01828
01829     EnsureItemsInfoArrangeWidths(m_itemCount);
01830
01831     MUX_ASSERT(UsesFastPathLayout());
01832
01833     // The existing average aspect ratio is used as a fallback aspect ratio for items
01834     // given an aspect ratio <= 0 by the ItemsInfoRequested handler.
01835     const double averageAspectRatio = GetAverageAspectRatio(availableWidth, actualLineHeight);
01836
01837     for (int itemIndex = 0; itemIndex < m_itemCount; itemIndex++)
01838     {
01839         const float arrangeWidth = GetArrangeWidthFromItemsInfo(itemIndex, actualLineHeight, averageAspectRatio);
01840
01841         SetArrangeWidthFromItemsInfo(itemIndex, arrangeWidth);
01842     }
01843
01844     // Final line count is originally unknown. m_lineItemCounts is originally allocated to accommodate 5 items per line.
01845     // The vector is progressively grown as needed when that assumption is too optimistic.
01846     constexpr int c_itemsPerLineAllocation = 5;
01847     // The vector capacity is increased by 25% each time its size becomes too small.
01848     constexpr double c_lineCountGrowthFactor = 1.25;
01849     int allocatedLineCount{ m_itemCount / c_itemsPerLineAllocation + 1 };
01850
01851     EnsureLineItemCounts(allocatedLineCount);
01852
01853     const float minItemSpacing{ static_cast<float>(MinItemSpacing()) };
01854     const bool itemsAreStretched{ ItemsStretch() == winrt::LinedFlowLayoutItemsStretch::Fill };
01855     int lineIndex{ -1 };
01856     int lineItemCount{ 0 };
01857     float lineWidth{ 0.0f };
01858     float maxLineWidth{ 0.0f };
01859
01860     for (int itemIndex = 0; itemIndex < m_itemCount; itemIndex++)
01861     {
01862         const float arrangeWidth{ m_itemsInfoArrangeWidths[itemIndex] };
01863         double scaleFactor{ 1.0 };
01864
01865         if (lineWidth == 0.0f || lineWidth + minItemSpacing + arrangeWidth > availableWidth)
01866         {
01867             bool cumulate{ lineWidth != 0.0f };
01868
01869             if (cumulate)
01870             {
01871                 // Additional item goes beyond the available width.
01872                 MUX_ASSERT(lineWidth > 0.0);
01873                 MUX_ASSERT(lineWidth + minItemSpacing + arrangeWidth > availableWidth);
01874                 MUX_ASSERT(lineItemCount > 0);
01875
01876                 // Determine whether it is better to create a new line or not.
01877
01878                 const double shrinkScaleFactor = ComputeLineShrinkFactor(
01879                     true /*forward*/,
01880                     itemIndex - lineItemCount /*sizedItemIndex*/,
01881                     lineItemCount + 1,
01882                     static_cast<double>(lineWidth) + minItemSpacing + arrangeWidth /*lineItemsWidth*/,
01883                     availableWidth,
01884                     static_cast<double>(lineItemCount) * minItemSpacing /*minItemSpacings*/,
01885                     actualLineHeight,
01886                     averageAspectRatio);
01887
01888                 MUX_ASSERT(shrinkScaleFactor >= 0.0);
01889                 MUX_ASSERT(shrinkScaleFactor < 1.0);
01890
01891                 const double expandScaleFactor = ComputeLineExpandFactor(
01892                     true /*forward*/,
01893                     itemIndex - lineItemCount /*sizedItemIndex*/,
01894                     lineItemCount,
01895                     lineWidth /*lineItemsWidth*/,
01896                     availableWidth,
01897                     (static_cast<double>(lineItemCount) - 1) * minItemSpacing /*minItemSpacings*/,
01898                     actualLineHeight,
01899                     averageAspectRatio);
01900
01901                 MUX_ASSERT(expandScaleFactor > 1.0);
01902
01903                 if (expandScaleFactor - 1.0 < 1.0 - shrinkScaleFactor || shrinkScaleFactor == 0.0)
01904                 {
01905                     // Creating a new line and leaving a gap in the current one requires a smaller
01906                     // expansion than the shrinkage required to add this item.
01907                     // Or the items' min widths prevent the shrinkage required to fit them in the line.
01908                     cumulate = false;
01909
01910                     if (itemsAreStretched)
01911                     {
01912                         // Only expand the items when ItemsStretch is LinedFlowLayoutItemsStretch::Fill.
01913                         scaleFactor = expandScaleFactor;
01914                     }
01915                 }
01916                 else
01917                 {
01918                     // The line items need to shrink less to accommodate this additional item than expand to fill the gap,
01919                     // let it belong to the current line (cumulate == true).
01920                     scaleFactor = shrinkScaleFactor;
01921                 }
01922             }
01923
01924             if (cumulate)
01925             {
01926                 lineWidth += minItemSpacing + arrangeWidth;
01927                 lineItemCount++;
01928             }
01929             else
01930             {
01931                 if (lineIndex >= 0 && m_lineItemCounts[lineIndex] == 0)
01932                 {
01933                     MUX_ASSERT(lineIndex < allocatedLineCount);
01934                     MUX_ASSERT(lineItemCount > 0);
01935                     MUX_ASSERT(lineWidth > 0);
01936
01937                     m_lineItemCounts[lineIndex] = lineItemCount;
01938
01939                     if (lineIndex + 1 == allocatedLineCount)
01940                     {
01941                         allocatedLineCount = std::max(allocatedLineCount + 1, static_cast<int>(c_lineCountGrowthFactor * allocatedLineCount));
01942                         m_lineItemCounts.resize(allocatedLineCount, 0);
01943                     }
01944
01945                     if (scaleFactor == 1.0)
01946                     {
01947                         maxLineWidth = std::max(lineWidth, maxLineWidth);
01948                     }
01949                     else
01950                     {
01951                         // Apply shrinking or expanding scale factor to line's m_itemsInfoArrangeWidths.
01952                         const float totalArrangeWidth = SetItemRangeArrangeWidth(
01953                             itemIndex - lineItemCount /*beginItemIndex*/,
01954                             itemIndex - 1 /*endItemIndex*/,
01955                             actualLineHeight,
01956                             averageAspectRatio,
01957                             scaleFactor);
01958
01959                         maxLineWidth = std::max(totalArrangeWidth + (lineItemCount - 1) * minItemSpacing, maxLineWidth);
01960                     }
01961                 }
01962
01963                 lineWidth = arrangeWidth;
01964                 lineItemCount = 1;
01965                 lineIndex++;
01966             }
01967         }
01968         else
01969         {
01970             lineWidth += minItemSpacing + arrangeWidth;
01971             lineItemCount++;
01972         }
01973
01974         if (lineWidth >= availableWidth)
01975         {
01976             MUX_ASSERT(lineIndex >= 0);
01977             MUX_ASSERT(lineIndex < allocatedLineCount);
01978             MUX_ASSERT(lineItemCount > 0);
01979             MUX_ASSERT(lineWidth > 0);
01980
01981             m_lineItemCounts[lineIndex] = lineItemCount;
01982
01983             if (lineIndex + 1 == allocatedLineCount)
01984             {
01985                 allocatedLineCount = std::max(allocatedLineCount + 1, static_cast<int>(c_lineCountGrowthFactor * allocatedLineCount));
01986                 m_lineItemCounts.resize(allocatedLineCount, 0);
01987             }
01988
01989             if (lineItemCount == 1 && lineWidth != availableWidth)
01990             {
01991                 // The single item on the line is bigger than the available width.
01992                 scaleFactor = ComputeLineShrinkFactor(
01993                     true /*forward*/,
01994                     itemIndex /*sizedItemIndex*/,
01995                     1 /*lineItemCount*/,
01996                     lineWidth /*lineItemsWidth*/,
01997                     availableWidth,
01998                     0.0 /*minItemSpacings*/,
01999                     actualLineHeight,
02000                     averageAspectRatio);
02001
02002                 MUX_ASSERT(scaleFactor >= 0.0);
02003                 MUX_ASSERT(scaleFactor < 1.0);
02004             }
02005
02006             if (scaleFactor != 0.0 && scaleFactor != 1.0)
02007             {
02008                 // Apply shrinking scale factor to line's m_itemsInfoArrangeWidths.
02009                 const float totalArrangeWidth = SetItemRangeArrangeWidth(
02010                     itemIndex - lineItemCount + 1 /*beginItemIndex*/,
02011                     itemIndex /*endItemIndex*/,
02012                     actualLineHeight,
02013                     averageAspectRatio,
02014                     scaleFactor);
02015
02016                 maxLineWidth = std::max(totalArrangeWidth + (lineItemCount - 1) * minItemSpacing, maxLineWidth);
02017             }
02018             else
02019             {
02020                 maxLineWidth = std::max(lineWidth, maxLineWidth);
02021             }
02022
02023             lineWidth = 0.0f;
02024             lineItemCount = 0;
02025         }
02026     }
02027
02028     MUX_ASSERT(lineIndex >= 0);
02029     MUX_ASSERT(lineIndex < allocatedLineCount);
02030
02031     if (lineItemCount > 0)
02032     {
02033         MUX_ASSERT(lineWidth > 0);
02034         MUX_ASSERT(availableWidth >= lineWidth);
02035
02036         maxLineWidth = std::max(lineWidth, maxLineWidth);
02037         m_lineItemCounts[lineIndex] = lineItemCount;
02038     }
02039
02040 #ifdef DBG
02041     for (int lineIndexTmp = 0; lineIndexTmp <= lineIndex; lineIndexTmp++)
02042     {
02043         MUX_ASSERT(m_lineItemCounts[lineIndexTmp] > 0);
02044     }
02045 #endif
02046
02047     m_lineItemCounts.resize(static_cast<size_t>(lineIndex) + 1, 0);
02048
02049 #ifdef DBG
02050     for (int lineIndexTmp = 0; lineIndexTmp <= lineIndex; lineIndexTmp++)
02051     {
02052         MUX_ASSERT(m_lineItemCounts[lineIndexTmp] > 0);
02053     }
02054 #endif
02055
02056     return maxLineWidth;
02057 }
02058
02059 // Computes the ItemsLayout with the best drawback by assigning items to lines - for the regular path.
02060 // This method populates the m_itemsInfoArrangeWidths / m_lineItemCounts vectors and the m_elementAvailableWidths map,
02061 // using the m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath,
02062 // m_itemsInfoMinWidth, m_itemsInfoMaxWidth fields.
02063 // The work is broken down into 6 successive phases:
02064 // Phase 1: Compute an initial layout and its drawback using an available width coming from LinedFlowLayout::MeasureOverride.
02065 //          This phase provides an average line width ALW for the following phases which successively try to compute layouts with a lower drawback.
02066 // Phase 2: Compute another layout and drawback using the resulting average line width ALW from Phase 1 as the available width.
02067 // Phase 3: Compute layouts and drawbacks with an available width within 30% of the average line width ALW from Phase 1 using the smallest head and smallest tail items of prior layouts.
02068 //          The layout with the lowest drawback is kept - it corresponds to a best available width BAW.
02069 // Phase 4: Compute a layout using the average of ALW and BAW for the available width, which may result in an even better drawback.
02070 // Phase 5: Keeping the available width from Phase 4, fine tune that layout by moving best equalizing head and best equalizing tail items into their neighboring lines using internal locks.
02071 //          Whichever item among the best equalizing head and best equalizing tail is present and provides the largest drawback improvement is moved.
02072 // Phase 6: Items are finally measured based on the best outcome of Phase 5.
02073 void LinedFlowLayout::ComputeItemsLayoutRegularPath(
02074     float availableWidth,
02075     double scrollViewport,
02076     double lineSpacing,
02077     double actualLineHeight,
02078     int beginSizedLineIndex,
02079     int endSizedLineIndex,
02080     int beginSizedItemIndex,
02081     int endSizedItemIndex,
02082     int beginLineVectorIndex,
02083     bool isLastSizedLineStretchEnabled)
02084 {
02085 #ifdef DBG
02086     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedLineIndex", beginSizedLineIndex);
02087     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedLineIndex", endSizedLineIndex);
02088     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedItemIndex", beginSizedItemIndex);
02089     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedItemIndex", endSizedItemIndex);
02090
02091     MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));
02092
02093     const int sizedItemCountDbg = m_lastSizedItemIndex - m_firstSizedItemIndex + 1;
02094     const int realizedItemCountDbg = m_elementManager.GetRealizedElementCount();
02095     const int unrealizedNearItemCountDbg = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
02096
02097     MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
02098     MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
02099     MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));
02100     MUX_ASSERT(beginSizedItemIndex > endSizedItemIndex || beginSizedItemIndex >= m_firstSizedItemIndex);
02101     MUX_ASSERT(beginSizedItemIndex > endSizedItemIndex || endSizedItemIndex <= m_firstSizedItemIndex + sizedItemCountDbg - 1);
02102     MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex || endSizedItemIndex >= m_firstSizedItemIndex);
02103     MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex || beginSizedItemIndex <= m_firstSizedItemIndex + sizedItemCountDbg - 1);
02104 #endif
02105
02106     const double minItemSpacing = MinItemSpacing();
02107     const double averageAspectRatio = GetAverageAspectRatio(availableWidth, actualLineHeight);
02108     double averageLineItemsWidth = std::numeric_limits<double>::max();
02109     std::vector<ItemsLayout> itemsLayouts;
02110
02111     // Internal locks are used to force an item to belong to a particular line.
02112     std::map<int /*itemIndex*/, int /*lineIndex*/> internalLockedItemIndexes;
02113
02114     // Phase 1: evaluate layout for an available width equal to the MeasureOverride's available width.
02115     ItemsLayout itemsLayout = GetItemsLayout(
02116         &internalLockedItemIndexes,
02117         scrollViewport,
02118         availableWidth,
02119         availableWidth /*adjustedAvailableWidth*/,
02120         -1.0 /*averageLineItemsWidth*/,
02121         averageAspectRatio,
02122         lineSpacing,
02123         actualLineHeight,
02124         beginSizedLineIndex,
02125         endSizedLineIndex,
02126         beginSizedItemIndex,
02127         endSizedItemIndex,
02128         beginLineVectorIndex,
02129         isLastSizedLineStretchEnabled);
02130
02131     MUX_ASSERT(itemsLayout.m_availableLineItemsWidth > 0.0);
02132     MUX_ASSERT(itemsLayout.m_lineItemCounts.size() > 0);
02133     MUX_ASSERT(itemsLayout.m_lineItemWidths.size() > 0);
02134
02135     itemsLayouts.push_back(itemsLayout);
02136
02137 #ifdef DBG
02138     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"End-of-Phase-1 layout for MeasureOverride's availableWidth", availableWidth);
02139     LogItemsLayoutDbg(itemsLayout, 0);
02140 #endif
02141
02142     std::set<double> availableWidthsProcessed;
02143
02144     if (beginSizedLineIndex != endSizedLineIndex)
02145     {
02146         availableWidthsProcessed.insert(availableWidth);
02147
02148         // Phase 2: evaluate layout for an available width equal to the resulting average desired line items width of Phase 1.
02149         std::set<double> availableWidthsToProcess;
02150
02151         double totalLineItemWidths = 0.0;
02152
02153         for (const auto& lineItemWidthsIterator : itemsLayout.m_lineItemWidths)
02154         {
02155             totalLineItemWidths += lineItemWidthsIterator;
02156         }
02157
02158         averageLineItemsWidth = totalLineItemWidths / itemsLayout.m_lineItemWidths.size();
02159
02160         availableWidthsToProcess.insert(averageLineItemsWidth);
02161
02162         double availableWidthLowerbound = averageLineItemsWidth;
02163         double availableWidthUpperbound = averageLineItemsWidth;
02164
02165         while (availableWidthsToProcess.size() > 0)
02166         {
02167             const double adjustedAvailableWidth = *availableWidthsToProcess.begin();
02168
02169             MUX_ASSERT(adjustedAvailableWidth >= 0.0);
02170
02171             itemsLayout = GetItemsLayout(
02172                 &internalLockedItemIndexes,
02173                 scrollViewport,
02174                 availableWidth,
02175                 adjustedAvailableWidth,
02176                 averageLineItemsWidth,
02177                 averageAspectRatio,
02178                 lineSpacing,
02179                 actualLineHeight,
02180                 beginSizedLineIndex,
02181                 endSizedLineIndex,
02182                 beginSizedItemIndex,
02183                 endSizedItemIndex,
02184                 beginLineVectorIndex,
02185                 isLastSizedLineStretchEnabled);
02186
02187 #ifdef DBG
02188             LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"Phases-2&3 layout for adjustedAvailableWidth", adjustedAvailableWidth);
02189             LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
02190 #endif
02191
02192             itemsLayouts.push_back(itemsLayout);
02193             availableWidthsProcessed.insert(adjustedAvailableWidth);
02194
02195             // Phase 3: evaluate layouts with an available width within 30% of the average desired line items width using the smallest head and smallest tail items of prior layouts.
02196             // Any layouts with an available width further away is not likely to produce the best layout. Pick the layout with the lowest drawback.
02197             const double availableWidthClampingPercent = 0.3;
02198             const bool isExpansionWorthy = IsItemsLayoutExpansionWorthy(itemsLayout);
02199             const bool isContractionWorthy = IsItemsLayoutContractionWorthy(itemsLayout);
02200
02201             if (isExpansionWorthy)
02202             {
02203                 MUX_ASSERT(itemsLayout.m_smallestHeadItemWidth > 0);
02204
02205                 const double availableWidthToProcess = adjustedAvailableWidth + minItemSpacing + itemsLayout.m_smallestHeadItemWidth;
02206
02207                 if (std::abs(availableWidthToProcess - averageLineItemsWidth) < availableWidthClampingPercent * averageLineItemsWidth &&
02208                     availableWidthToProcess > availableWidthUpperbound &&
02209                     availableWidthToProcess != availableWidth &&
02210                     availableWidthsProcessed.find(availableWidthToProcess) == availableWidthsProcessed.end() &&
02211                     availableWidthsToProcess.find(availableWidthToProcess) == availableWidthsToProcess.end())
02212                 {
02213                     availableWidthUpperbound = availableWidthToProcess;
02214                     availableWidthsToProcess.insert(availableWidthToProcess);
02215                 }
02216             }
02217
02218             if (isContractionWorthy)
02219             {
02220                 MUX_ASSERT(itemsLayout.m_smallestTailItemWidth > 0);
02221
02222                 const double availableWidthToProcess = adjustedAvailableWidth - minItemSpacing - itemsLayout.m_smallestTailItemWidth;
02223
02224                 if (availableWidthToProcess > 0.0 &&
02225                     std::abs(availableWidthToProcess - averageLineItemsWidth) < availableWidthClampingPercent * averageLineItemsWidth &&
02226                     availableWidthToProcess < availableWidthLowerbound &&
02227                     availableWidthToProcess != availableWidth &&
02228                     availableWidthsProcessed.find(availableWidthToProcess) == availableWidthsProcessed.end() &&
02229                     availableWidthsToProcess.find(availableWidthToProcess) == availableWidthsToProcess.end())
02230                 {
02231                     availableWidthLowerbound = availableWidthToProcess;
02232                     availableWidthsToProcess.insert(availableWidthToProcess);
02233                 }
02234             }
02235
02236             availableWidthsToProcess.erase(adjustedAvailableWidth);
02237         }
02238     }
02239
02240     ItemsLayout bestItemsLayout = itemsLayouts[0];
02241
02242     if (itemsLayouts.size() > 1)
02243     {
02244         // Figure out the layout with the lowest drawback so far.
02245         double bestDrawback = std::numeric_limits<double>::max();
02246
02247         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsLayouts.size", itemsLayouts.size());
02248
02249         // Find the layout with the smallest drawback so far.
02250         for (const auto& itemsLayoutIterator : itemsLayouts)
02251         {
02252             ItemsLayout itemsLayoutTmp = itemsLayoutIterator;
02253
02254             if (itemsLayoutTmp.m_drawback < bestDrawback)
02255             {
02256                 bestDrawback = itemsLayoutTmp.m_drawback;
02257                 bestItemsLayout = itemsLayoutTmp;
02258             }
02259         }
02260
02261 #ifdef DBG
02262         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End-of-Phase-4 best layout");
02263         LogItemsLayoutDbg(bestItemsLayout, averageLineItemsWidth);
02264
02265         MUX_ASSERT(beginSizedLineIndex != endSizedLineIndex);
02266 #endif
02267
02268         // Phase 4: try a layout with adjustedAvailableWidth = (bestItemsLayout.m_availableLineItemsWidth + averageLineItemsWidth) / 2.0,
02269         // i.e. the average of the best available width so far and the average line width, as it sometimes results in a lower drawback.
02270         // A layout for averageLineItemsWidth was performed in Phase 2, a layout for bestItemsLayout.m_availableLineItemsWidth was performed
02271         // in Phase 3 - the optimum available width is likely to be in the neighborhood of those two numbers and trying a layout with their
02272         // average has proven worthy through experimentations.
02273         const double adjustedAvailableWidth = (bestItemsLayout.m_availableLineItemsWidth + averageLineItemsWidth) / 2.0;
02274
02275         // Make sure adjustedAvailableWidth has not been processed already in Phase 3.
02276         if (availableWidthsProcessed.find(adjustedAvailableWidth) == availableWidthsProcessed.end())
02277         {
02278             itemsLayout = GetItemsLayout(
02279                 &internalLockedItemIndexes,
02280                 scrollViewport,
02281                 availableWidth,
02282                 adjustedAvailableWidth,
02283                 averageLineItemsWidth,
02284                 averageAspectRatio,
02285                 lineSpacing,
02286                 actualLineHeight,
02287                 beginSizedLineIndex,
02288                 endSizedLineIndex,
02289                 beginSizedItemIndex,
02290                 endSizedItemIndex,
02291                 beginLineVectorIndex,
02292                 isLastSizedLineStretchEnabled);
02293
02294 #ifdef DBG
02295             LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"Phase-5 layout for adjustedAvailableWidth", adjustedAvailableWidth);
02296             LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
02297 #endif
02298
02299             if (itemsLayout.m_drawback < bestItemsLayout.m_drawback)
02300             {
02301                 bestItemsLayout = itemsLayout;
02302
02303                 LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End-of-Phase-5 picking phase 5's layout");
02304             }
02305         }
02306
02307         ItemsLayout itemsLayoutToImprove = bestItemsLayout;
02308         // noDrawbackDecreaseCount indicates how many successive attempts at decreasing the drawback have failed.
02309         int noDrawbackDecreaseCount = 0;
02310         const bool forward = beginSizedLineIndex < endSizedLineIndex;
02311
02312         // Phase 5: keeping the available width from Phase 4, fine tune that layout by moving best equalizing head and best equalizing tail items into their neighboring lines using internal locks.
02313         // Whichever item among the best equalizing head and best equalizing tail is present and provides the largest drawback improvement is moved.
02314
02315         // Incrementally improve the drawback by moving the best equalizing head to its previous line, or the best equalizing tail to its next line.
02316         // The move with the best anticipated outcome is performed until several attempts produce no drawback improvements.
02317         do
02318         {
02319             if (itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement != 0.0 &&
02320                 (itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement == 0.0 ||
02321                  itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement > itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement))
02322             {
02323                 if (IsItemsLayoutEqualizationWorthy(itemsLayoutToImprove, true /*withHeadItem*/))
02324                 {
02325                     if (LockItemToLineInternal(
02326                             internalLockedItemIndexes,
02327                             beginSizedLineIndex,
02328                             endSizedLineIndex,
02329                             beginSizedItemIndex,
02330                             endSizedItemIndex,
02331                             forward ? itemsLayoutToImprove.m_bestEqualizingHeadLineIndex - 1 : itemsLayoutToImprove.m_bestEqualizingHeadLineIndex + 1,
02332                             itemsLayoutToImprove.m_bestEqualizingHeadItemIndex))
02333                     {
02334                         itemsLayout = GetItemsLayout(
02335                             &internalLockedItemIndexes,
02336                             scrollViewport,
02337                             availableWidth,
02338                             itemsLayoutToImprove.m_availableLineItemsWidth,
02339                             averageLineItemsWidth,
02340                             averageAspectRatio,
02341                             lineSpacing,
02342                             actualLineHeight,
02343                             beginSizedLineIndex,
02344                             endSizedLineIndex,
02345                             beginSizedItemIndex,
02346                             endSizedItemIndex,
02347                             beginLineVectorIndex,
02348                             isLastSizedLineStretchEnabled);
02349
02350 #ifdef DBG
02351                         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, L"Phase-6 layout after equalization attempt with head item", itemsLayout.m_drawback < bestItemsLayout.m_drawback ? L"improvement" : L"no improvement");
02352                         LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
02353 #endif
02354
02355                         if (itemsLayout.m_drawback < bestItemsLayout.m_drawback)
02356                         {
02357                             bestItemsLayout = itemsLayout;
02358                             noDrawbackDecreaseCount = 0;
02359                         }
02360                         else
02361                         {
02362                             noDrawbackDecreaseCount++;
02363                         }
02364
02365                         itemsLayoutToImprove = itemsLayout;
02366
02367                         continue;
02368                     }
02369                 }
02370             }
02371
02372             if (itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement != 0.0 &&
02373                 (itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement == 0.0 ||
02374                  itemsLayoutToImprove.m_bestEqualizingTailItemDrawbackImprovement > itemsLayoutToImprove.m_bestEqualizingHeadItemDrawbackImprovement))
02375             {
02376                 if (IsItemsLayoutEqualizationWorthy(itemsLayoutToImprove, false /*withHeadItem*/))
02377                 {
02378                     if (LockItemToLineInternal(
02379                             internalLockedItemIndexes,
02380                             beginSizedLineIndex,
02381                             endSizedLineIndex,
02382                             beginSizedItemIndex,
02383                             endSizedItemIndex,
02384                             forward ? itemsLayoutToImprove.m_bestEqualizingTailLineIndex + 1 : itemsLayoutToImprove.m_bestEqualizingTailLineIndex - 1,
02385                             itemsLayoutToImprove.m_bestEqualizingTailItemIndex))
02386                     {
02387                         itemsLayout = GetItemsLayout(
02388                             &internalLockedItemIndexes,
02389                             scrollViewport,
02390                             availableWidth,
02391                             itemsLayoutToImprove.m_availableLineItemsWidth,
02392                             averageLineItemsWidth,
02393                             averageAspectRatio,
02394                             lineSpacing,
02395                             actualLineHeight,
02396                             beginSizedLineIndex,
02397                             endSizedLineIndex,
02398                             beginSizedItemIndex,
02399                             endSizedItemIndex,
02400                             beginLineVectorIndex,
02401                             isLastSizedLineStretchEnabled);
02402
02403 #ifdef DBG
02404                         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_STR, METH_NAME, this, L"Phase-6 layout after equalization attempt with tail item", itemsLayout.m_drawback < bestItemsLayout.m_drawback ? L"improvement" : L"no improvement");
02405                         LogItemsLayoutDbg(itemsLayout, averageLineItemsWidth);
02406 #endif
02407
02408                         if (itemsLayout.m_drawback < bestItemsLayout.m_drawback)
02409                         {
02410                             bestItemsLayout = itemsLayout;
02411                             noDrawbackDecreaseCount = 0;
02412                         }
02413                         else
02414                         {
02415                             noDrawbackDecreaseCount++;
02416                         }
02417
02418                         itemsLayoutToImprove = itemsLayout;
02419                     }
02420                     else
02421                     {
02422                         break;
02423                     }
02424                 }
02425                 else
02426                 {
02427                     break;
02428                 }
02429             }
02430             else
02431             {
02432                 break;
02433             }
02434         }
02435         while (noDrawbackDecreaseCount < static_cast<int>(bestItemsLayout.m_lineItemCounts.size() / 2));
02436         // TODO: Task 38031375 - Performance optimizations.
02437         // Given a line count, investigate what the typical number of iterations without drawback improvement
02438         // leads to no improvements no matter the number of subsequent tries.
02439     }
02440
02441 #ifdef DBG
02442     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"End-of-Phase-6 best layout");
02443     LogItemsLayoutDbg(bestItemsLayout, averageLineItemsWidth);
02444 #endif
02445
02446     // Phase 6: Final item measurements.
02447     ComputeItemsLayoutWithLockedItems(
02448         bestItemsLayout,
02449         availableWidth,
02450         minItemSpacing,
02451         actualLineHeight,
02452         averageAspectRatio,
02453         beginSizedLineIndex,
02454         endSizedLineIndex,
02455         beginSizedItemIndex,
02456         endSizedItemIndex,
02457         beginLineVectorIndex,
02458         isLastSizedLineStretchEnabled);
02459
02460 #ifdef DBG
02461     const bool forwardDbg = beginSizedItemIndex <= endSizedItemIndex;
02462
02463     MUX_ASSERT(!(!forwardDbg && beginSizedLineIndex < endSizedLineIndex));
02464
02465     const int sizedLineCountDbg = forwardDbg ? endSizedLineIndex - beginSizedLineIndex + 1 :
02466         beginSizedLineIndex - endSizedLineIndex + 1;
02467     const int sizedItemCountExpectedDbg = forwardDbg ? endSizedItemIndex - beginSizedItemIndex + 1 :
02468         beginSizedItemIndex - endSizedItemIndex + 1;
02469
02470     MUX_ASSERT(sizedItemCountExpectedDbg >= sizedLineCountDbg);
02471
02472     int sizedItemCountActualDbg = 0;
02473
02474     for (int sizedLineVectorIndexDbg = 0; sizedLineVectorIndexDbg < sizedLineCountDbg; sizedLineVectorIndexDbg++)
02475     {
02476         const int lineItemsCountDbg = m_lineItemCounts[beginLineVectorIndex + sizedLineVectorIndexDbg /*lineVectorIndex*/];
02477
02478         MUX_ASSERT(lineItemsCountDbg > 0);
02479
02480         sizedItemCountActualDbg += lineItemsCountDbg;
02481     }
02482
02483     MUX_ASSERT(sizedItemCountActualDbg == sizedItemCountExpectedDbg);
02484 #endif
02485 }
02486
02487 // Computes the expanding factor for a line with a desired width smaller than the available width.
02488 double LinedFlowLayout::ComputeLineExpandFactor(
02489     bool forward,
02490     int sizedItemIndex,
02491     int lineItemsCount,
02492     double lineItemsWidth,
02493     double availableWidth,
02494     double minItemSpacings,
02495     double actualLineHeight,
02496     double averageAspectRatio)
02497 {
02498     const bool usesFastPathLayout = UsesFastPathLayout();
02499     double scaleFactor;
02500     bool largerScaleFactorNeeded;
02501     std::set<int> ignoredItemIndexes;
02502
02503     MUX_ASSERT(lineItemsWidth < availableWidth);
02504
02505     availableWidth -= minItemSpacings;
02506     lineItemsWidth -= minItemSpacings;
02507
02508     MUX_ASSERT(availableWidth > 0.0);
02509     MUX_ASSERT(lineItemsWidth > 0.0);
02510
02511     do
02512     {
02513         int sizedItemIndexTmp = sizedItemIndex;
02514
02515         largerScaleFactorNeeded = false;
02516         scaleFactor = availableWidth / lineItemsWidth;
02517
02518         for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
02519         {
02520             if (ignoredItemIndexes.find(itemIndex) == ignoredItemIndexes.end())
02521             {
02522                 double minWidth{}, maxWidth{ std::numeric_limits<double>::infinity() }, desiredWidth{};
02523                 winrt::UIElement element = nullptr;
02524
02525                 if (!usesFastPathLayout && m_itemsInfoFirstIndex == -1)
02526                 {
02527                     MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndexTmp));
02528
02529                     if (element = m_elementManager.GetRealizedElement(sizedItemIndexTmp /*dataIndex*/))
02530                     {
02531                         if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
02532                         {
02533                             minWidth = frameworkElement.MinWidth();
02534                             maxWidth = frameworkElement.MaxWidth();
02535                             desiredWidth = element.DesiredSize().Width;
02536                         }
02537                     }
02538                 }
02539                 else
02540                 {
02541                     double desiredAspectRatio = GetDesiredAspectRatioFromItemsInfo(sizedItemIndexTmp, usesFastPathLayout);
02542
02543                     if (desiredAspectRatio <= 0)
02544                     {
02545                         // The average aspect ratio is used as a fallback value for items that were given a negative ratio
02546                         // by the ItemsInfoRequested handler.
02547                         desiredAspectRatio = averageAspectRatio;
02548                     }
02549
02550                     desiredWidth = desiredAspectRatio * actualLineHeight;
02551
02552                     const double desiredMinWidth = GetMinWidthFromItemsInfo(sizedItemIndexTmp);
02553
02554                     if (desiredMinWidth >= 0.0)
02555                     {
02556                         minWidth = desiredMinWidth;
02557                         desiredWidth = std::max(minWidth, desiredWidth);
02558                     }
02559
02560                     const double desiredMaxWidth = GetMaxWidthFromItemsInfo(sizedItemIndexTmp);
02561
02562                     if (desiredMaxWidth >= 0.0)
02563                     {
02564                         maxWidth = desiredMaxWidth;
02565                         desiredWidth = std::min(maxWidth, desiredWidth);
02566                     }
02567                 }
02568
02569                 if (maxWidth < desiredWidth * scaleFactor)
02570                 {
02571                     availableWidth = std::max(0.0, availableWidth - maxWidth);
02572                     lineItemsWidth = std::max(0.0, lineItemsWidth - desiredWidth);
02573
02574                     ignoredItemIndexes.insert(itemIndex);
02575                     largerScaleFactorNeeded = true;
02576                     break;
02577                 }
02578
02579                 if (element != nullptr &&                                               // ItemsInfoRequested event did not provide sizing information.
02580                     (scaleFactor - 1.0) * minWidth > 1.0 / m_roundingScaleFactor &&     // scaleFactor is large enough that the rounded scaled desired width is expected to be larger than the rounded min width.
02581                     std::abs(minWidth - desiredWidth) <= 1.0 / m_roundingScaleFactor)   // element's DesiredSize.Width and element.MinWidth have the same rounded value.
02582                 {
02583                     const auto scaledAvailableSize = winrt::Size(static_cast<float>(desiredWidth * scaleFactor), static_cast<float>(actualLineHeight));
02584                     const auto scaledDesiredSize = GetDesiredSizeForAvailableSize(sizedItemIndexTmp, element, scaledAvailableSize, actualLineHeight);
02585
02586                     if (scaledDesiredSize.Width != -1.0f && std::abs(minWidth - scaledDesiredSize.Width) <= 1.0 / m_roundingScaleFactor)
02587                     {
02588                         // These are cases where the desired width matches the minimum width even though the element is given a larger available width.
02589                         availableWidth = std::max(0.0, availableWidth - minWidth);
02590                         lineItemsWidth = std::max(0.0, lineItemsWidth - minWidth);
02591
02592                         ignoredItemIndexes.insert(itemIndex);
02593                         largerScaleFactorNeeded = true;
02594                         break;
02595                     }
02596                 }
02597             }
02598
02599             sizedItemIndexTmp = forward ? sizedItemIndexTmp + 1 : sizedItemIndexTmp - 1;
02600         }
02601     }
02602     while (availableWidth > 0.0 && lineItemsWidth > 0.0 && largerScaleFactorNeeded);
02603
02604     MUX_ASSERT(scaleFactor > 1.0);
02605
02606     return scaleFactor;
02607 }
02608
02609 // Computes the shrinking factor for a line with a desired width larger than the available width.
02610 // Returns 0 when the items' minimum width prevent enough shrinking to accommodate the available width.
02611 double LinedFlowLayout::ComputeLineShrinkFactor(
02612     bool forward,
02613     int sizedItemIndex,
02614     int lineItemsCount,
02615     double lineItemsWidth,
02616     double availableWidth,
02617     double minItemSpacings,
02618     double actualLineHeight,
02619     double averageAspectRatio)
02620 {
02621     const bool usesFastPathLayout = UsesFastPathLayout();
02622     double scaleFactor;
02623     bool smallerScaleFactorNeeded;
02624     std::set<int> ignoredItemIndexes;
02625
02626     MUX_ASSERT(lineItemsWidth > availableWidth);
02627
02628     availableWidth -= minItemSpacings;
02629     lineItemsWidth -= minItemSpacings;
02630
02631     MUX_ASSERT(availableWidth > 0.0);
02632     MUX_ASSERT(lineItemsWidth > 0.0);
02633
02634     do
02635     {
02636         int sizedItemIndexTmp = sizedItemIndex;
02637
02638         smallerScaleFactorNeeded = false;
02639         scaleFactor = availableWidth / lineItemsWidth;
02640
02641         for (int itemIndex = 0; itemIndex < lineItemsCount; itemIndex++)
02642         {
02643             if (ignoredItemIndexes.find(itemIndex) == ignoredItemIndexes.end())
02644             {
02645                 double minWidth{}, desiredWidth{};
02646
02647                 if (!usesFastPathLayout && m_itemsInfoFirstIndex == -1)
02648                 {
02649                     MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndexTmp));
02650
02651                     if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndexTmp /*dataIndex*/))
02652                     {
02653                         if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
02654                         {
02655                             minWidth = frameworkElement.MinWidth();
02656                         }
02657
02658                         desiredWidth = element.DesiredSize().Width;
02659                     }
02660                 }
02661                 else
02662                 {
02663                     double desiredAspectRatio = GetDesiredAspectRatioFromItemsInfo(sizedItemIndexTmp, usesFastPathLayout);
02664
02665                     if (desiredAspectRatio <= 0)
02666                     {
02667                         // The average aspect ratio is used as a fallback value for items that were given a negative ratio
02668                         // by the ItemsInfoRequested handler.
02669                         desiredAspectRatio = averageAspectRatio;
02670                     }
02671
02672                     desiredWidth = desiredAspectRatio * actualLineHeight;
02673
02674                     const double desiredMaxWidth = GetMaxWidthFromItemsInfo(sizedItemIndexTmp);
02675
02676                     if (desiredMaxWidth >= 0.0)
02677                     {
02678                         desiredWidth = std::min(desiredMaxWidth, desiredWidth);
02679                     }
02680
02681                     const double desiredMinWidth = GetMinWidthFromItemsInfo(sizedItemIndexTmp);
02682
02683                     if (desiredMinWidth >= 0.0)
02684                     {
02685                         minWidth = desiredMinWidth;
02686                         desiredWidth = std::max(minWidth, desiredWidth);
02687                     }
02688                 }
02689
02690                 if (minWidth > desiredWidth * scaleFactor)
02691                 {
02692                     availableWidth = std::max(0.0, availableWidth - minWidth);
02693                     lineItemsWidth = std::max(0.0, lineItemsWidth - desiredWidth);
02694
02695                     ignoredItemIndexes.insert(itemIndex);
02696                     smallerScaleFactorNeeded = true;
02697                     break;
02698                 }
02699             }
02700
02701             sizedItemIndexTmp = forward ? sizedItemIndexTmp + 1 : sizedItemIndexTmp - 1;
02702         }
02703     }
02704     while (availableWidth > 0.0 && lineItemsWidth > 0.0 && smallerScaleFactorNeeded);
02705
02706     MUX_ASSERT(scaleFactor > 0.0);
02707     MUX_ASSERT(scaleFactor < 1.0);
02708
02709     return smallerScaleFactorNeeded ? 0.0 : scaleFactor;
02710 }
02711
02712 // Copies a section of the provided oldItemsInfo vector into m_itemsInfoDesiredAspectRatiosForRegularPath.
02713 void LinedFlowLayout::CopyItemsInfo(
02714     std::vector<double> const& oldItemsInfoDesiredAspectRatios,
02715     std::vector<double> const& oldItemsInfoMinWidths,
02716     std::vector<double> const& oldItemsInfoMaxWidths,
02717     std::vector<float> const& oldItemsInfoArrangeWidths,
02718     int oldStart,
02719     int newStart,
02720     int copyCount)
02721 {
02722     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"oldStart", oldStart);
02723     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newStart", newStart);
02724     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"copyCount", copyCount);
02725
02726     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, oldStart + copyCount, oldItemsInfoDesiredAspectRatios.size());
02727     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, newStart + copyCount, m_itemsInfoDesiredAspectRatiosForRegularPath.size());
02728
02729     MUX_ASSERT(oldStart >= 0);
02730     MUX_ASSERT(newStart >= 0);
02731     MUX_ASSERT(copyCount > 0);
02732     MUX_ASSERT(oldStart + copyCount <= static_cast<int>(oldItemsInfoDesiredAspectRatios.size()));
02733     MUX_ASSERT(newStart + copyCount <= static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));
02734
02735     for (int index = 0; index < copyCount; index++)
02736     {
02737         SetDesiredAspectRatioFromItemsInfo(m_itemsInfoFirstIndex + newStart + index, oldItemsInfoDesiredAspectRatios[static_cast<size_t>(oldStart) + index]);
02738
02739         MUX_ASSERT(m_itemsInfoDesiredAspectRatiosForRegularPath[newStart + index] == oldItemsInfoDesiredAspectRatios[oldStart + index]);
02740
02741         if (oldItemsInfoMinWidths.size() > 0)
02742         {
02743             m_itemsInfoMinWidthsForRegularPath[static_cast<size_t>(newStart) + index] = oldItemsInfoMinWidths[static_cast<size_t>(oldStart) + index];
02744         }
02745
02746         if (oldItemsInfoMaxWidths.size() > 0)
02747         {
02748             m_itemsInfoMaxWidthsForRegularPath[static_cast<size_t>(newStart) + index] = oldItemsInfoMaxWidths[static_cast<size_t>(oldStart) + index];
02749         }
02750
02751         SetArrangeWidthFromItemsInfo(m_itemsInfoFirstIndex + newStart + index, oldItemsInfoArrangeWidths[static_cast<size_t>(oldStart) + index]);
02752
02753         MUX_ASSERT(m_itemsInfoArrangeWidths[newStart + index] == oldItemsInfoArrangeWidths[oldStart + index]);
02754     }
02755 }
02756
02757 // Ensures items are realized and measured to determine their desired width.
02758 // Returns True when there is at least one stored aspect ratio with a weight
02759 // lower than c_maxAspectRatioWeight. In those cases the caller must trigger
02760 // an additional UI thread tick so that those low weights can be increased
02761 // and ultimately hit the c_maxAspectRatioWeight value.
02762 void LinedFlowLayout::EnsureAndMeasureItemRange(
02763     winrt::VirtualizingLayoutContext const& context,
02764     float availableWidth,
02765     double actualLineHeight,
02766     bool forward,
02767     int beginRealizedItemIndex,
02768     int endRealizedItemIndex)
02769 {
02770 #ifdef DBG
02771     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
02772     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);
02773
02774     MUX_ASSERT(!(forward && beginRealizedItemIndex > endRealizedItemIndex));
02775     MUX_ASSERT(!(!forward && beginRealizedItemIndex < endRealizedItemIndex));
02776     MUX_ASSERT(beginRealizedItemIndex < context.ItemCount());
02777     MUX_ASSERT(endRealizedItemIndex < context.ItemCount());
02778     MUX_ASSERT(m_elementDesiredWidths);
02779
02780     int beginNewRealizedItemIndexDbg = -1, endNewRealizedItemIndexDbg = -1;
02781 #endif
02782
02783     bool realizedNewElement = false;
02784
02785     for (int realizedItemIndex = beginRealizedItemIndex; ; realizedItemIndex = forward ? realizedItemIndex + 1 : realizedItemIndex - 1)
02786     {
02787         bool isElementNewlyRealized = false;
02788
02789         if (!m_elementManager.IsDataIndexRealized(realizedItemIndex))
02790         {
02791             EnsureElementRealized(forward, realizedItemIndex);
02792
02793             realizedNewElement = isElementNewlyRealized = true;
02794
02795 #ifdef DBG
02796             if (beginNewRealizedItemIndexDbg == -1)
02797             {
02798                 beginNewRealizedItemIndexDbg = realizedItemIndex;
02799             }
02800             else
02801             {
02802                 endNewRealizedItemIndexDbg = realizedItemIndex;
02803             }
02804 #endif
02805         }
02806
02807         if (m_itemsInfoFirstIndex == -1)
02808         {
02809             if (const auto element = m_elementManager.GetRealizedElement(realizedItemIndex /*dataIndex*/))
02810             {
02811                 const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
02812
02813                 if (m_elementDesiredWidths->find(elementTracker) == m_elementDesiredWidths->end())
02814                 {
02815                     const auto elementAvailableSize = winrt::Size(std::numeric_limits<float>::infinity(), static_cast<float>(actualLineHeight));
02816
02817                     element.Measure(elementAvailableSize);
02818
02819                     const auto desiredSize = element.DesiredSize();
02820
02821                     bool desiredWidthGreaterThanMinWidth{};
02822
02823                     if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
02824                     {
02825                         const float minWidth = static_cast<float>(frameworkElement.MinWidth());
02826
02827                         if (desiredSize.Width > minWidth)
02828                         {
02829                             // Items for which the desired width is greater than the min width are immediately
02830                             // assigned the c_maxAspectRatioWeight weight. For the other items, the weight is
02831                             // incremented from 1 to c_maxAspectRatioWeight as the min width may be due to the
02832                             // item content not being loaded yet.
02833                             desiredWidthGreaterThanMinWidth = true;
02834                         }
02835                     }
02836
02837                     m_elementDesiredWidths->insert(std::pair<tracker_ref<winrt::UIElement>, float>(elementTracker, desiredSize.Width));
02838
02839                     if (desiredSize.Height != 0.0f && m_aspectRatios != nullptr)
02840                     {
02841                         LinedFlowLayoutItemAspectRatios::ItemAspectRatio itemAspectRatio = m_aspectRatios->GetAt(realizedItemIndex);
02842                         const float aspectRatio = desiredSize.Width / desiredSize.Height;
02843
02844                         if (itemAspectRatio.m_weight == 0)
02845                         {
02846                             itemAspectRatio.m_aspectRatio = aspectRatio;
02847                             itemAspectRatio.m_weight = desiredWidthGreaterThanMinWidth ? c_maxAspectRatioWeight : 1;
02848
02849 #ifdef DBG
02850                             if (realizedItemIndex == m_logItemIndexDbg)
02851                             {
02852                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
02853                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"initial aspect ratio", aspectRatio);
02854                             }
02855 #endif
02856                         }
02857                         else
02858                         {
02859                             if (isElementNewlyRealized)
02860                             {
02861                                 itemAspectRatio.m_weight = desiredWidthGreaterThanMinWidth ? c_maxAspectRatioWeight : 1;
02862                             }
02863                             else
02864                             {
02865                                 const int aspectRatioWeight = itemAspectRatio.m_weight;
02866
02867                                 MUX_ASSERT(itemAspectRatio.m_aspectRatio >= 0.0f);
02868                                 MUX_ASSERT(aspectRatioWeight >= 1);
02869                                 MUX_ASSERT(aspectRatioWeight <= c_maxAspectRatioWeight);
02870
02871                                 if (aspectRatioWeight < c_maxAspectRatioWeight)
02872                                 {
02873                                     if (desiredWidthGreaterThanMinWidth)
02874                                     {
02875                                         itemAspectRatio.m_weight = c_maxAspectRatioWeight;
02876                                     }
02877                                     else
02878                                     {
02879                                         itemAspectRatio.m_weight++;
02880                                     }
02881                                 }
02882                             }
02883 #ifdef DBG
02884                             if (realizedItemIndex == m_logItemIndexDbg)
02885                             {
02886                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
02887                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this,
02888                                     itemAspectRatio.m_aspectRatio == aspectRatio ? L"same aspect ratio" : L"new aspect ratio", aspectRatio);
02889                                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"weight", itemAspectRatio.m_weight);
02890                             }
02891 #endif
02892                             if (itemAspectRatio.m_aspectRatio != aspectRatio)
02893                             {
02894                                 itemAspectRatio.m_aspectRatio = aspectRatio;
02895                             }
02896                         }
02897
02898                         m_aspectRatios->SetAt(realizedItemIndex, itemAspectRatio);
02899                     }
02900
02901 #ifdef DBG
02902                     if (realizedItemIndex == m_logItemIndexDbg)
02903                     {
02904                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
02905                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize",
02906                             elementAvailableSize.Width,
02907                             elementAvailableSize.Height);
02908                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
02909                             desiredSize.Width,
02910                             desiredSize.Height);
02911                     }
02912 #endif
02913                 }
02914             }
02915         }
02916
02917         if (realizedItemIndex == endRealizedItemIndex)
02918         {
02919             break;
02920         }
02921     }
02922
02923 #ifdef DBG
02924     if (beginNewRealizedItemIndexDbg != -1)
02925     {
02926         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"newly realized item index range", beginNewRealizedItemIndexDbg, endNewRealizedItemIndexDbg);
02927     }
02928 #endif
02929
02930     if (realizedNewElement && !UsesArrangeWidthInfo())
02931     {
02932         InvalidateMeasureTimerStart(0 /*tickCount*/);
02933     }
02934 }
02935
02936 // Allocates the storage for tracking weighted aspect ratios. Widths that storage to track about 10 viewports worth of items at the most.
02937 void LinedFlowLayout::EnsureAndResizeItemAspectRatios(
02938     double scrollViewport,
02939     double actualLineHeight,
02940     double lineSpacing)
02941 {
02942     MUX_ASSERT(m_averageItemsPerLine.second > 0.0);
02943     MUX_ASSERT(m_firstSizedItemIndex >= 0);
02944     MUX_ASSERT(m_firstSizedItemIndex <= m_lastSizedItemIndex);
02945
02946     EnsureItemAspectRatios();
02947
02948     constexpr int c_scrollViewportCount = 10; // m_aspectRatios is sized large enough to hold aspect ratio information for 10 viewport worth of items.
02949     const int referenceItemIndex = static_cast<int>((m_lastSizedItemIndex - m_firstSizedItemIndex) / 2);
02950     const double c_minItemsPerScrollViewport = 20.0; // Avoid small aspect ratio sampling that is not statistically significant by forcing at least 20 items per viewport.
02951     const double linesPerScrollViewport = scrollViewport / (actualLineHeight + lineSpacing);
02952     const double averageItemsPerScrollViewport = std::max(c_minItemsPerScrollViewport, linesPerScrollViewport * m_averageItemsPerLine.second);
02953     int itemAspectRatiosStorageSize = std::max(static_cast<int>(averageItemsPerScrollViewport * c_scrollViewportCount), m_lastSizedItemIndex - m_firstSizedItemIndex + 1);
02954
02955     itemAspectRatiosStorageSize = std::min(itemAspectRatiosStorageSize, m_itemCount);
02956
02957     m_aspectRatios->Resize(itemAspectRatiosStorageSize, referenceItemIndex);
02958 }
02959
02960 void LinedFlowLayout::EnsureElementAvailableWidths()
02961 {
02962     if (!m_elementAvailableWidths)
02963     {
02964         m_elementAvailableWidths = std::make_shared<std::map<tracker_ref<winrt::UIElement>, float>>();
02965     }
02966 }
02967
02968 void LinedFlowLayout::EnsureElementDesiredWidths()
02969 {
02970     if (!m_elementDesiredWidths)
02971     {
02972         m_elementDesiredWidths = std::make_shared<std::map<tracker_ref<winrt::UIElement>, float>>();
02973     }
02974 }
02975
02976 void LinedFlowLayout::EnsureElementRealized(
02977     bool forward,
02978     int itemIndex)
02979 {
02980     MUX_ASSERT(m_isVirtualizingContext);
02981     MUX_ASSERT(!m_elementManager.IsDataIndexRealized(itemIndex));
02982
02983     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex", itemIndex);
02984
02985     m_elementManager.EnsureElementRealized(forward, itemIndex, LayoutId());
02986 }
02987
02988 void LinedFlowLayout::EnsureItemAspectRatios()
02989 {
02990     if (!m_aspectRatios)
02991     {
02992         m_aspectRatios = std::make_unique<LinedFlowLayoutItemAspectRatios>();
02993     }
02994 }
02995
02996 // Ensures the items in the provided range are realized.
02997 void LinedFlowLayout::EnsureItemRange(
02998     bool forward,
02999     int beginRealizedItemIndex,
03000     int endRealizedItemIndex)
03001 {
03002 #ifdef DBG
03003     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
03004     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);
03005
03006     MUX_ASSERT(!(forward && beginRealizedItemIndex > endRealizedItemIndex));
03007     MUX_ASSERT(!(!forward && beginRealizedItemIndex < endRealizedItemIndex));
03008     MUX_ASSERT(beginRealizedItemIndex < m_itemCount);
03009     MUX_ASSERT(endRealizedItemIndex < m_itemCount);
03010
03011     int beginNewRealizedItemIndexDbg = -1, endNewRealizedItemIndexDbg = -1;
03012 #endif
03013
03014     bool realizedNewElement = false;
03015
03016     for (int realizedItemIndex = beginRealizedItemIndex; ; realizedItemIndex = forward ? realizedItemIndex + 1 : realizedItemIndex - 1)
03017     {
03018         if (!m_elementManager.IsDataIndexRealized(realizedItemIndex))
03019         {
03020             EnsureElementRealized(forward, realizedItemIndex);
03021
03022 #ifdef DBG
03023             if (beginNewRealizedItemIndexDbg == -1)
03024             {
03025                 beginNewRealizedItemIndexDbg = realizedItemIndex;
03026             }
03027             else
03028             {
03029                 endNewRealizedItemIndexDbg = realizedItemIndex;
03030             }
03031 #endif
03032             realizedNewElement = true;
03033         }
03034
03035         if (realizedItemIndex == endRealizedItemIndex)
03036         {
03037             break;
03038         }
03039     }
03040
03041 #ifdef DBG
03042     if (beginNewRealizedItemIndexDbg != -1)
03043     {
03044         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"newly realized item index range", beginNewRealizedItemIndexDbg, endNewRealizedItemIndexDbg);
03045     }
03046 #endif
03047
03048     if (realizedNewElement && !UsesArrangeWidthInfo())
03049     {
03050         InvalidateMeasureTimerStart(0 /*tickCount*/);
03051     }
03052 }
03053
03054 // Ensures items are realized exactly for the context's realization window - for the fast path layout.
03055 void LinedFlowLayout::EnsureItemRangeFastPath(
03056     winrt::VirtualizingLayoutContext const& context,
03057     double actualLineHeight)
03058 {
03059     const int newRecommendedAnchorIndex{ context.RecommendedAnchorIndex() };
03060
03061     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"entry", actualLineHeight);
03062     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_anchorIndex", m_anchorIndex);
03063     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newRecommendedAnchorIndex", newRecommendedAnchorIndex);
03064
03065     MUX_ASSERT(actualLineHeight > 0.0);
03066     MUX_ASSERT(m_itemCount > 0);
03067
03068     const double scrollViewport{ context.VisibleRect().Height };
03069     int newFirstRealizedItemIndex{ 0 };
03070     int newLastRealizedItemIndex{ 0 };
03071
03072     MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));
03073
03074     if (m_isVirtualizingContext)
03075     {
03076         const float realizationRectHeight{ context.RealizationRect().Height };
03077
03078         if (realizationRectHeight == 0.0)
03079         {
03080             return;
03081         }
03082
03083         const int lineCount{ static_cast<int>(m_lineItemCounts.size()) };
03084
03085         MUX_ASSERT(lineCount >= 0);
03086
03087         const double lineSpacing{ LineSpacing() };
03088         float nearRealizationRect{ GetRoundedFloat(context.RealizationRect().Y) };
03089         int firstRealizedLineIndex{ -1 };
03090         int lastRealizedLineIndex{ -1 };
03091
03092         GetFirstAndLastDisplayedLineIndexes(
03093             realizationRectHeight /*scrollViewport*/,
03094             nearRealizationRect,
03095             0 /*padding*/,
03096             lineSpacing,
03097             actualLineHeight,
03098             lineCount,
03099             false /*forFullyDisplayedLines*/,
03100             &firstRealizedLineIndex,
03101             &lastRealizedLineIndex);
03102
03103         MUX_ASSERT(firstRealizedLineIndex >= 0);
03104         MUX_ASSERT(lastRealizedLineIndex >= 0);
03105         MUX_ASSERT(firstRealizedLineIndex < lineCount);
03106         MUX_ASSERT(lastRealizedLineIndex < lineCount);
03107
03108         newFirstRealizedItemIndex = GetFirstItemIndexInLineIndex(firstRealizedLineIndex);
03109         newLastRealizedItemIndex = GetLastItemIndexInLineIndex(lastRealizedLineIndex);
03110
03111         MUX_ASSERT(newFirstRealizedItemIndex >= 0);
03112         MUX_ASSERT(newLastRealizedItemIndex >= 0);
03113         MUX_ASSERT(newFirstRealizedItemIndex < m_itemCount);
03114         MUX_ASSERT(newLastRealizedItemIndex < m_itemCount);
03115
03116         bool realizationRectCenteredAroundAnchor{ false };
03117
03118         if (m_anchorIndex != -1 || newRecommendedAnchorIndex != -1)
03119         {
03120             const int anchorLineIndex = GetLineIndex(newRecommendedAnchorIndex == -1 ? m_anchorIndex : newRecommendedAnchorIndex, true /*usesFastPathLayout*/);
03121
03122             MUX_ASSERT(anchorLineIndex >= 0);
03123             MUX_ASSERT(anchorLineIndex < lineCount);
03124
03125             if (anchorLineIndex < firstRealizedLineIndex || anchorLineIndex > lastRealizedLineIndex)
03126             {
03127                 // The anchor line is disconnected. Centering the realization window around its center.
03128                 const float anchorLineNearEdge = static_cast<float>(anchorLineIndex * (actualLineHeight + lineSpacing));
03129                 const float anchorLineMiddle = static_cast<float>(anchorLineNearEdge + actualLineHeight / 2.0);
03130
03131                 nearRealizationRect = GetRoundedFloat(anchorLineMiddle - realizationRectHeight / 2.0f);
03132                 realizationRectCenteredAroundAnchor = true;
03133
03134                 // Same comments and treatment as in LinedFlowLayout::MeasureConstrainedLinesRegularPath.
03135                 // Sometimes during a bring-into-view operation the RecommendedAnchorIndex momentarily switches from the target index N to -1 and then back to the target index N.
03136                 // To avoid momentarily setting m_anchorIndex to -1, its value is preserved c_maxAnchorIndexRetentionCount times, based purely on experimentations.
03137                 // Without this momentary retention the bring-into-view operation lands on incorrect offsets. If m_anchorIndex were to be preserved without a countdown, large offset changes
03138                 // through ScrollView.ScrollTo calls would not complete.
03139                 // TODO: Bug 41896418 - Investigate why the occurrences of -1 sometimes come up - even when the ScrollView anchoring is turned on.
03140                 //                      Does such a countdown need to be used? What is a reliable countdown starting value?
03141                 if (newRecommendedAnchorIndex == -1)
03142                 {
03143                     MUX_ASSERT(m_anchorIndexRetentionCountdown >= 1 && m_anchorIndexRetentionCountdown <= c_maxAnchorIndexRetentionCount);
03144
03145                     m_anchorIndexRetentionCountdown--;
03146
03147                     if (m_anchorIndexRetentionCountdown == 0)
03148                     {
03149                         m_anchorIndex = -1;
03150                     }
03151                 }
03152                 else
03153                 {
03154                     m_anchorIndexRetentionCountdown = c_maxAnchorIndexRetentionCount;
03155                     m_anchorIndex = newRecommendedAnchorIndex;
03156                 }
03157
03158                 LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Forcing layout pass to decrement m_anchorIndexRetentionCountdown");
03159
03160                 // Layout is invalidated to ensure that m_anchorIndexRetentionCountdown is decremented from c_maxAnchorIndexRetentionCount all the way to 0 (a few lines above).
03161                 // Otherwise m_anchorIndex could be stuck to a value that prevents the realization window from moving to the actual scroller's offset.
03162                 InvalidateMeasureAsync();
03163             }
03164         }
03165
03166         if (realizationRectCenteredAroundAnchor)
03167         {
03168             // Re-evaluate realization range after centering around the anchor line.
03169             GetFirstAndLastDisplayedLineIndexes(
03170                 realizationRectHeight /*scrollViewport*/,
03171                 nearRealizationRect,
03172                 0 /*padding*/,
03173                 lineSpacing,
03174                 actualLineHeight,
03175                 lineCount,
03176                 false /*forFullyDisplayedLines*/,
03177                 &firstRealizedLineIndex,
03178                 &lastRealizedLineIndex);
03179
03180             MUX_ASSERT(firstRealizedLineIndex >= 0);
03181             MUX_ASSERT(lastRealizedLineIndex >= 0);
03182             MUX_ASSERT(firstRealizedLineIndex < lineCount);
03183             MUX_ASSERT(lastRealizedLineIndex < lineCount);
03184
03185             newFirstRealizedItemIndex = GetFirstItemIndexInLineIndex(firstRealizedLineIndex);
03186             newLastRealizedItemIndex = GetLastItemIndexInLineIndex(lastRealizedLineIndex);
03187
03188             MUX_ASSERT(newFirstRealizedItemIndex >= 0);
03189             MUX_ASSERT(newLastRealizedItemIndex >= 0);
03190             MUX_ASSERT(newFirstRealizedItemIndex < m_itemCount);
03191             MUX_ASSERT(newLastRealizedItemIndex < m_itemCount);
03192         }
03193         else if (m_anchorIndex != -1)
03194         {
03195             m_anchorIndex = -1;
03196         }
03197     }
03198     else
03199     {
03200         // All items are realized in non-virtualizing mode.
03201         MUX_ASSERT(context.VisibleRect().Y == 0.0f);
03202
03203         newLastRealizedItemIndex = m_itemCount - 1;
03204     }
03205
03206     const int newRealizedItemCount = newLastRealizedItemIndex - newFirstRealizedItemIndex + 1;
03207
03208     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newFirstRealizedItemIndex", newFirstRealizedItemIndex);
03209     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newLastRealizedItemIndex", newLastRealizedItemIndex);
03210     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"newRealizedItemCount", newRealizedItemCount);
03211
03212     const int oldFirstRealizedItemIndex = m_elementManager.GetFirstRealizedDataIndex(); // -1 and unused in non-virtualizing mode.
03213     const int oldLastRealizedItemIndex = oldFirstRealizedItemIndex == -1 ? -1 : oldFirstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;
03214
03215     // Discard the first realized items fallen off the realization window.
03216     if (oldFirstRealizedItemIndex != -1 && oldFirstRealizedItemIndex < newFirstRealizedItemIndex)
03217     {
03218         MUX_ASSERT(m_isVirtualizingContext);
03219
03220         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized head range",
03221             oldFirstRealizedItemIndex, newFirstRealizedItemIndex - 1);
03222
03223         m_elementManager.DiscardElementsOutsideWindow(
03224             false /*forward*/,
03225             std::min(newFirstRealizedItemIndex, oldFirstRealizedItemIndex + m_elementManager.GetRealizedElementCount()) - 1 /*startIndex*/);
03226     }
03227
03228     MUX_ASSERT(newFirstRealizedItemIndex <= m_elementManager.GetFirstRealizedDataIndex() || -1 == m_elementManager.GetFirstRealizedDataIndex());
03229
03230     int firstStillRealizedItemIndex{ -1 };
03231     int lastStillRealizedItemIndex{ -1 };
03232
03233     if (oldFirstRealizedItemIndex != -1 && oldLastRealizedItemIndex != -1)
03234     {
03235         if (newFirstRealizedItemIndex >= oldFirstRealizedItemIndex && newFirstRealizedItemIndex <= oldLastRealizedItemIndex)
03236         {
03237             firstStillRealizedItemIndex = newFirstRealizedItemIndex;
03238             lastStillRealizedItemIndex = std::min(oldLastRealizedItemIndex, newLastRealizedItemIndex);
03239         }
03240         else if (newLastRealizedItemIndex >= oldFirstRealizedItemIndex && newLastRealizedItemIndex <= oldLastRealizedItemIndex)
03241         {
03242             lastStillRealizedItemIndex = newLastRealizedItemIndex;
03243             firstStillRealizedItemIndex = std::max(oldFirstRealizedItemIndex, newFirstRealizedItemIndex);
03244         }
03245     }
03246
03247     if (m_elementManager.GetFirstRealizedDataIndex() != -1 && newFirstRealizedItemIndex < m_elementManager.GetFirstRealizedDataIndex())
03248     {
03249         MUX_ASSERT(oldFirstRealizedItemIndex > 0);
03250
03251         // Ensure and measure the realized items before the old first realized item.
03252         EnsureItemRange(
03253             false /*forward*/,
03254             std::min(oldFirstRealizedItemIndex - 1, newFirstRealizedItemIndex + newRealizedItemCount - 1) /*beginRealizedItemIndex*/,
03255             newFirstRealizedItemIndex /*endRealizedItemIndex*/);
03256
03257         // Ensure and measure the realized items after the old first realized item.
03258         MUX_ASSERT(newFirstRealizedItemIndex == m_elementManager.GetFirstRealizedDataIndex());
03259
03260         if (firstStillRealizedItemIndex != -1)
03261         {
03262             if (firstStillRealizedItemIndex > 0 && oldFirstRealizedItemIndex <= firstStillRealizedItemIndex - 1)
03263             {
03264                 EnsureItemRange(
03265                     true /*forward*/,
03266                     oldFirstRealizedItemIndex /*beginRealizedItemIndex*/,
03267                     firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
03268             }
03269
03270             if (lastStillRealizedItemIndex + 1 <= newFirstRealizedItemIndex + newRealizedItemCount - 1)
03271             {
03272                 EnsureItemRange(
03273                     true /*forward*/,
03274                     lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
03275                     newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
03276             }
03277         }
03278         else if (newFirstRealizedItemIndex + newRealizedItemCount - 1 >= oldFirstRealizedItemIndex)
03279         {
03280             EnsureItemRange(
03281                 true /*forward*/,
03282                 oldFirstRealizedItemIndex /*beginRealizedItemIndex*/,
03283                 newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
03284         }
03285     }
03286     else
03287     {
03288         // Ensure and measure the realized items.
03289         MUX_ASSERT(newFirstRealizedItemIndex == m_elementManager.GetFirstRealizedDataIndex() || m_elementManager.GetFirstRealizedDataIndex() == -1);
03290
03291         if (firstStillRealizedItemIndex != -1)
03292         {
03293             if (firstStillRealizedItemIndex > 0 && newFirstRealizedItemIndex <= firstStillRealizedItemIndex - 1)
03294             {
03295                 EnsureItemRange(
03296                     true /*forward*/,
03297                     newFirstRealizedItemIndex /*beginRealizedItemIndex*/,
03298                     firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
03299             }
03300
03301             if (lastStillRealizedItemIndex + 1 <= newFirstRealizedItemIndex + newRealizedItemCount - 1)
03302             {
03303                 EnsureItemRange(
03304                     true /*forward*/,
03305                     lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
03306                     newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
03307             }
03308         }
03309         else
03310         {
03311             EnsureItemRange(
03312                 true /*forward*/,
03313                 newFirstRealizedItemIndex /*beginRealizedItemIndex*/,
03314                 newFirstRealizedItemIndex + newRealizedItemCount - 1 /*endRealizedItemIndex*/);
03315         }
03316     }
03317
03318     // Discard the last realized items fallen off the realization window.
03319     if (oldLastRealizedItemIndex != -1 && oldLastRealizedItemIndex > newLastRealizedItemIndex)
03320     {
03321         MUX_ASSERT(m_isVirtualizingContext);
03322         MUX_ASSERT(m_elementManager.GetRealizedElementCount() > newRealizedItemCount);
03323
03324         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized tail range",
03325             newFirstRealizedItemIndex + newRealizedItemCount, m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount() - 1);
03326
03327         m_elementManager.DiscardElementsOutsideWindow(
03328             true /*forward*/,
03329             newLastRealizedItemIndex + 1 /*startIndex*/);
03330     }
03331
03332     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"exit");
03333 }
03334
03335 void LinedFlowLayout::EnsureItemsInfoDesiredAspectRatios(
03336     int itemCount)
03337 {
03338     m_itemsInfoDesiredAspectRatiosForRegularPath.clear();
03339     m_itemsInfoDesiredAspectRatiosForRegularPath.resize(itemCount, -1.0);
03340 }
03341
03342 void LinedFlowLayout::EnsureItemsInfoMinWidths(
03343     int itemCount)
03344 {
03345     m_itemsInfoMinWidthsForRegularPath.clear();
03346     m_itemsInfoMinWidthsForRegularPath.resize(itemCount, -1.0);
03347 }
03348
03349 void LinedFlowLayout::EnsureItemsInfoMaxWidths(
03350     int itemCount)
03351 {
03352     m_itemsInfoMaxWidthsForRegularPath.clear();
03353     m_itemsInfoMaxWidthsForRegularPath.resize(itemCount, -1.0);
03354 }
03355
03356 void LinedFlowLayout::EnsureItemsInfoArrangeWidths(
03357     int itemCount)
03358 {
03359     m_itemsInfoArrangeWidths.clear();
03360     m_itemsInfoArrangeWidths.resize(itemCount, -1.0f);
03361 }
03362
03363 void LinedFlowLayout::EnsureLineItemCounts(
03364     int lineCount)
03365 {
03366     m_lineItemCounts.clear();
03367     m_lineItemCounts.resize(lineCount, 0);
03368 }
03369
03370 void LinedFlowLayout::ExitRegularPath()
03371 {
03372     m_itemsInfoFirstIndex = -1;
03373     m_unsizedNearLineCount = -1;
03374     m_unrealizedNearLineCount = -1;
03375     m_elementAvailableWidths = nullptr;
03376     m_elementDesiredWidths = nullptr;
03377     ResetSizedLines();
03378 }
03379
03380 double LinedFlowLayout::GetArrangeWidth(
03381     double desiredAspectRatio,
03382     double minWidth,
03383     double maxWidth,
03384     double actualLineHeight,
03385     double scaleFactor) const
03386 {
03387     MUX_ASSERT(desiredAspectRatio > 0.0);
03388
03389     double arrangeWidth = desiredAspectRatio * actualLineHeight;
03390
03391     minWidth = std::max(0.0, minWidth);
03392
03393     arrangeWidth = std::max(minWidth, arrangeWidth);
03394
03395     if (maxWidth >= 0.0)
03396     {
03397         arrangeWidth = std::min(maxWidth, arrangeWidth);
03398     }
03399
03400     if (scaleFactor != 1.0)
03401     {
03402         arrangeWidth *= scaleFactor;
03403
03404         if (scaleFactor < 1.0)
03405         {
03406             arrangeWidth = std::max(minWidth, arrangeWidth);
03407         }
03408
03409         if (maxWidth >= 0.0 && scaleFactor > 1.0)
03410         {
03411             arrangeWidth = std::min(maxWidth, arrangeWidth);
03412         }
03413     }
03414
03415     return arrangeWidth;
03416 }
03417
03418 // Fast path layout:
03419 //   Returns the arrange width computed from the m_itemsInfoDesiredAspectRatiosForFastPath, m_itemsInfoMinWidthsForFastPath, m_itemsInfoMaxWidthsForFastPath,
03420 //   m_itemsInfoMinWidth, m_itemsInfoMaxWidth fields.
03421 // Regular path layout:
03422 //   Returns the arrange width computed from the m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath,
03423 //   m_itemsInfoMinWidth, m_itemsInfoMaxWidth fields.
03424 // The desired aspect ratio is combined with the provided scaleFactor.
03425 float LinedFlowLayout::GetArrangeWidthFromItemsInfo(
03426     int sizedItemIndex,
03427     double actualLineHeight,
03428     double averageAspectRatio,
03429     double scaleFactor) const
03430 {
03431     double desiredAspectRatio = GetDesiredAspectRatioFromItemsInfo(sizedItemIndex, UsesFastPathLayout());
03432
03433     if (desiredAspectRatio <= 0)
03434     {
03435         // The average aspect ratio is used as a fallback value for items that were given a negative ratio
03436         // by the ItemsInfoRequested handler.
03437         desiredAspectRatio = averageAspectRatio;
03438     }
03439
03440     return static_cast<float>(GetArrangeWidth(
03441         desiredAspectRatio,
03442         GetMinWidthFromItemsInfo(sizedItemIndex),
03443         GetMaxWidthFromItemsInfo(sizedItemIndex),
03444         actualLineHeight,
03445         scaleFactor));
03446 }
03447
03448 // Returns the current average aspect ratio, either
03449 // based on the m_aspectRatios storage when it's
03450 // populated, or m_averageItemsPerLine when set, or
03451 // finally the default defaultAspectRatio == 1.0.
03452 double LinedFlowLayout::GetAverageAspectRatio(
03453     float availableWidth,
03454     double actualLineHeight) const
03455 {
03456     if (m_aspectRatios == nullptr || m_aspectRatios->IsEmpty())
03457     {
03458         if (m_averageItemsPerLine.second == 0.0 || actualLineHeight == 0.0)
03459         {
03460             constexpr double defaultAspectRatio{ 1.0 };
03461
03462             return defaultAspectRatio;
03463         }
03464         else
03465         {
03466             return availableWidth / m_averageItemsPerLine.second / actualLineHeight;
03467         }
03468     }
03469
03470     return GetAverageAspectRatioFromStorage();
03471 }
03472
03473 // Returns the average aspect ratio from m_aspectRatios or 1.0 when it is empty.
03474 double LinedFlowLayout::GetAverageAspectRatioFromStorage() const
03475 {
03476     constexpr double defaultAspectRatio{ 1.0 };
03477
03478     if (m_aspectRatios == nullptr || m_aspectRatios->IsEmpty())
03479     {
03480         return defaultAspectRatio;
03481     }
03482
03483     const int firstRealizedItemIndex = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
03484     const int lastRealizedItemIndex = firstRealizedItemIndex + m_elementManager.GetRealizedElementCount() - 1;
03485     // Items outside the current realized range must have a weight equal to c_maxAspectRatioWeight to be taken into account.
03486     // Smaller weights may not reflect the real aspect ratio and negatively influence the average.
03487     float averageItemAspectRatio = m_aspectRatios->GetAverageAspectRatio(firstRealizedItemIndex, lastRealizedItemIndex, c_maxAspectRatioWeight);
03488
03489     return averageItemAspectRatio == 0.0f ? defaultAspectRatio : averageItemAspectRatio;
03490 }
03491
03492 std::pair<double, double> LinedFlowLayout::GetAverageItemsPerLine(
03493     float availableWidth)
03494 {
03495     double averageWidth;
03496     const double minItemSpacing = MinItemSpacing();
03497     const double actualLineHeight = ActualLineHeight();
03498
03499     // During initial loading, in cases no sizing information is provided by an ItemsInfoRequested event handler,
03500     // the average item aspect ratio is set no lower than 1.5, 1.25 & 1.0 in the first 3 measure passes.
03501     // This is to avoid the unpopulated items' small MinWidth to artificially result in a small average aspect ratio
03502     // causing a momentary item realization that gets thrown away as soon as the real average aspect ratio is set.
03503     const double minAverageItemAspectRatio = m_measureCountdown * 0.25 + 0.5;
03504
03505     if (m_aspectRatios != nullptr && !m_aspectRatios->IsEmpty())
03506     {
03507         double averageItemAspectRatio = GetAverageAspectRatioFromStorage();
03508
03509         // During initial load, avoid small aspect ratios while the first items are still loading
03510         // to avoid unnecessary item realizations. This is only done when the ItemsInfoRequested event handler did not provide sizing information.
03511         if (m_itemsInfoFirstIndex == -1 && m_measureCountdown > 1 && averageItemAspectRatio < minAverageItemAspectRatio)
03512         {
03513             LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"Forcing layout pass for low initial aspect ratio average");
03514             LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"minAverageItemAspectRatio", minAverageItemAspectRatio);
03515             LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"averageItemAspectRatio", averageItemAspectRatio);
03516
03517             averageItemAspectRatio = minAverageItemAspectRatio;
03518
03519             // Making sure there is another layout coming with a decreased m_measureCountdown value to stop using an adjusted averageItemAspectRatio.
03520             // Layout invalidation is done asynchronously to have an effect since this method, GetAverageItemsPerLine, is called during measure passes.
03521             InvalidateMeasureAsync();
03522         }
03523
03524         m_averageItemAspectRatioDbg = averageItemAspectRatio;
03525
03526         averageWidth = averageItemAspectRatio * actualLineHeight;
03527     }
03528     else
03529     {
03530         m_averageItemAspectRatioDbg = minAverageItemAspectRatio;
03531
03532         // When no item is realized, minAverageItemAspectRatio which starts at 1.5 is used.
03533         averageWidth = minAverageItemAspectRatio * actualLineHeight;
03534     }
03535
03536     if (m_forcedAverageItemAspectRatioDbg != 0.0)
03537     {
03538         averageWidth = m_forcedAverageItemAspectRatioDbg * actualLineHeight;
03539     }
03540
03541     // Account for the minimum spacing between items by adding minItemSpacing
03542     // minItemSpacing is over-counted once for the last item.
03543     averageWidth = std::max(1.0, averageWidth + minItemSpacing);
03544
03545     // minItemSpacing is added to the availableWidth to account for the over-counting above.
03546     double averageItemsPerLineRaw = (availableWidth + minItemSpacing) / averageWidth;
03547
03548     averageItemsPerLineRaw = std::max(1.0, averageItemsPerLineRaw);
03549
03550     std::pair<double, double> averageItemsPerLine = SnapAverageItemsPerLine(
03551         m_averageItemsPerLine.first /*oldAverageItemsPerLineRaw*/,
03552         averageItemsPerLineRaw /*newAverageItemsPerLineRaw*/);
03553
03554     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_DBL, METH_NAME, this, averageItemsPerLine.second);
03555
03556     MUX_ASSERT(averageItemsPerLine.second >= 1.0);
03557
03558     return averageItemsPerLine;
03559 }
03560
03561 double LinedFlowLayout::GetDesiredAspectRatioFromItemsInfo(
03562     int itemIndex,
03563     bool usesFastPathLayout) const
03564 {
03565     MUX_ASSERT(itemIndex >= 0);
03566     MUX_ASSERT(itemIndex < m_itemCount);
03567
03568     double desiredAspectRatio{};
03569
03570     if (usesFastPathLayout)
03571     {
03572         MUX_ASSERT(m_itemsInfoFirstIndex == -1);
03573         MUX_ASSERT(itemIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForFastPath.size()));
03574
03575         desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForFastPath[itemIndex];
03576     }
03577     else
03578     {
03579         MUX_ASSERT(m_itemsInfoFirstIndex >= 0);
03580         MUX_ASSERT(itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));
03581
03582         desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex];
03583     }
03584
03585     return desiredAspectRatio;
03586 }
03587
03588 // Measures the element with the provided availableSize if there is a recorded width from a prior measure call.
03589 // Returns the resulting desired size, or -1,-1 otherwise.
03590 winrt::Size LinedFlowLayout::GetDesiredSizeForAvailableSize(
03591     int itemIndex,
03592     winrt::UIElement const& element,
03593     winrt::Size availableSize,
03594     double actualLineHeightToRestore)
03595 {
03596     MUX_ASSERT(element != nullptr);
03597     MUX_ASSERT(itemIndex >= 0);
03598
03599     // When m_itemsInfoArrangeWidths is populated,
03600     // - m_itemsInfoFirstIndex != -1: Regular path layout case, with items info available (m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath).
03601     // - m_itemsInfoFirstIndex == -1: Fast path layout case, without items info available.
03602     const int itemsInfoArrangeWidthsIndex = itemIndex - (m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex);
03603     float measureWidthToRestore{};
03604
03605     if (itemsInfoArrangeWidthsIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()))
03606     {
03607         const float arrangeWidth = m_itemsInfoArrangeWidths[itemsInfoArrangeWidthsIndex];
03608
03609         if (arrangeWidth < 0.0f)
03610         {
03611             // The m_itemsInfoArrangeWidths vector has not been set for the provided 'itemIndex' yet.
03612             // The effects of measuring 'element' with 'availableSize' below could not be undone.
03613             // Returning -1, -1 to indicate no desired size could be measured.
03614             return winrt::Size{ -1.0f, -1.0f };
03615         }
03616         else
03617         {
03618             measureWidthToRestore = arrangeWidth;
03619         }
03620     }
03621     else if (m_elementAvailableWidths != nullptr && m_elementDesiredWidths != nullptr)
03622     {
03623         // Check if the element has a recorded desired or available width
03624         // to restore after measurement with the provided 'availableSize'.
03625         const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
03626         auto recordedSizeIterator = m_elementAvailableWidths->find(elementTracker);
03627
03628         if (recordedSizeIterator == m_elementAvailableWidths->end())
03629         {
03630             recordedSizeIterator = m_elementDesiredWidths->find(elementTracker);
03631
03632             if (recordedSizeIterator == m_elementDesiredWidths->end())
03633             {
03634                 // No recorded width to use to undo effects of a measure with 'availableSize'.
03635                 return winrt::Size{ -1.0f, -1.0f };
03636             }
03637             else
03638             {
03639                 // Use the previous desired width to undo the effects of the measure with 'availableSize'.
03640                 measureWidthToRestore = recordedSizeIterator->second;
03641             }
03642         }
03643         else
03644         {
03645             // Use the previous available width to undo the effects of the measure with 'availableSize'.
03646             measureWidthToRestore = recordedSizeIterator->second;
03647         }
03648     }
03649
03650     element.Measure(availableSize);
03651
03652     winrt::Size desiredSize = element.DesiredSize();
03653
03654     element.Measure(winrt::Size{ measureWidthToRestore, static_cast<float>(actualLineHeightToRestore) });
03655
03656     return desiredSize;
03657 }
03658
03659 void LinedFlowLayout::GetFirstAndLastDisplayedLineIndexes(
03660     double scrollViewport,
03661     double scrollOffset,
03662     double padding,
03663     double lineSpacing,
03664     double actualLineHeight,
03665     int lineCount,
03666     bool forFullyDisplayedLines,
03667     int* firstDisplayedLineIndex,
03668     int* lastDisplayedLineIndex) const
03669 {
03670     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollViewport", scrollViewport);
03671     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollOffset", scrollOffset);
03672     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"padding", padding);
03673     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"lineSpacing", lineSpacing);
03674     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"actualLineHeight", actualLineHeight);
03675     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lineCount", lineCount);
03676     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"forFullyDisplayedLines", forFullyDisplayedLines);
03677
03678     MUX_ASSERT(m_isVirtualizingContext);
03679     MUX_ASSERT(scrollViewport != std::numeric_limits<double>::infinity());
03680     MUX_ASSERT(lineCount > 0);
03681
03682     *firstDisplayedLineIndex = *lastDisplayedLineIndex = -1;
03683
03684     const double lineHeight = actualLineHeight + lineSpacing;
03685
03686     if (lineHeight == 0.0 || scrollViewport == 0.0)
03687     {
03688         return;
03689     }
03690
03691     const double linesSpacing = lineCount == 0 ? 0.0 : (static_cast<double>(lineCount) - 1) * lineSpacing;
03692     const double scrollExtent = lineCount * actualLineHeight + linesSpacing;
03693     const double maxScrollOffset = std::max(0.0, scrollExtent - scrollViewport);
03694     const double lineSpacingPortion = lineSpacing / lineHeight;
03695
03696     scrollOffset = std::min(maxScrollOffset, scrollOffset);
03697
03698     if (std::abs(scrollOffset) < c_offsetEqualityEpsilon)
03699     {
03700         scrollOffset = 0.0;
03701     }
03702
03703     padding = std::min(padding, scrollViewport / 2.0);
03704
03705     const double nearPadding = std::min(scrollOffset, padding);
03706     const double farPadding = std::min(maxScrollOffset - scrollOffset, padding);
03707
03708     if (!(forFullyDisplayedLines && actualLineHeight + nearPadding + farPadding > scrollViewport))
03709     {
03710         double nearDisplayed = scrollOffset + nearPadding;
03711         double farDisplayed = scrollOffset + scrollViewport - farPadding;
03712
03713         if (farDisplayed > 0.0 && nearDisplayed < scrollExtent)
03714         {
03715             nearDisplayed = std::max(0.0, nearDisplayed);
03716             farDisplayed = std::min(scrollExtent, farDisplayed);
03717
03718             const double fractionalFirstDisplayedLineIndex = nearDisplayed / lineHeight;
03719             const int roundedFirstDisplayedLineIndex = static_cast<int>(fractionalFirstDisplayedLineIndex);
03720
03721             if (static_cast<double>(roundedFirstDisplayedLineIndex) + 1 - fractionalFirstDisplayedLineIndex <= lineSpacingPortion &&
03722                 roundedFirstDisplayedLineIndex + 1 < lineCount)
03723             {
03724                 // The portion displayed before the first displayed item is smaller than the line spacing - it can be ignored.
03725                 *firstDisplayedLineIndex = roundedFirstDisplayedLineIndex + 1;
03726             }
03727             else
03728             {
03729                 *firstDisplayedLineIndex = roundedFirstDisplayedLineIndex;
03730             }
03731
03732             if (forFullyDisplayedLines &&
03733                 fractionalFirstDisplayedLineIndex > roundedFirstDisplayedLineIndex &&
03734                 roundedFirstDisplayedLineIndex + 1 < lineCount)
03735             {
03736                 *firstDisplayedLineIndex = roundedFirstDisplayedLineIndex + 1;
03737             }
03738
03739             MUX_ASSERT(*firstDisplayedLineIndex >= 0);
03740             MUX_ASSERT(*firstDisplayedLineIndex < lineCount);
03741
03742             const double fractionalLastDisplayedLineIndex = (farDisplayed + lineSpacing) / lineHeight;
03743             const int roundedLastDisplayedLineIndex = static_cast<int>(fractionalLastDisplayedLineIndex);
03744
03745             *lastDisplayedLineIndex = roundedLastDisplayedLineIndex;
03746
03747             if (forFullyDisplayedLines)
03748             {
03749                 if (fractionalLastDisplayedLineIndex >= 1.0)
03750                 {
03751                     *lastDisplayedLineIndex = std::min(roundedLastDisplayedLineIndex, lineCount) - 1;
03752                 }
03753             }
03754             else
03755             {
03756                 if (fractionalLastDisplayedLineIndex - roundedLastDisplayedLineIndex <= lineSpacingPortion)
03757                 {
03758                     *lastDisplayedLineIndex = std::max(roundedLastDisplayedLineIndex - 1, 0);
03759                 }
03760             }
03761
03762             MUX_ASSERT(*lastDisplayedLineIndex >= 0);
03763             MUX_ASSERT(*lastDisplayedLineIndex < lineCount);
03764
03765             if (*firstDisplayedLineIndex > *lastDisplayedLineIndex)
03766             {
03767                 *firstDisplayedLineIndex = *lastDisplayedLineIndex = -1;
03768             }
03769         }
03770     }
03771     // else actualLineHeight is large enough that no line can be fully displayed in the scroll viewport.
03772
03773     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, forFullyDisplayedLines ? L"fullyDisplayedLines" : L"displayedLines", *firstDisplayedLineIndex, *lastDisplayedLineIndex);
03774 }
03775
03776 // Returns the index of the first fully realized line, as well as the first item index in that line.
03777 void LinedFlowLayout::GetFirstFullyRealizedLineIndex(
03778     int* firstFullyRealizedLineIndex,
03779     int* firstItemInFullyRealizedLine) const
03780 {
03781     const int firstRealizedItemIndex = m_isVirtualizingContext ? m_elementManager.GetFirstRealizedDataIndex() : 0;
03782
03783     if (firstRealizedItemIndex == -1)
03784     {
03785         *firstFullyRealizedLineIndex = -1;
03786         *firstItemInFullyRealizedLine = -1;
03787         return;
03788     }
03789
03790     int sizedItemIndex = m_firstSizedItemIndex == -1 ? 0 : m_firstSizedItemIndex;
03791     int sizedLineIndex = m_firstSizedLineIndex == -1 ? 0 : m_firstSizedLineIndex;
03792     int sizedLineVectorIndex = 0;
03793
03794     MUX_ASSERT(firstRealizedItemIndex >= 0);
03795     MUX_ASSERT(sizedItemIndex >= 0);
03796     MUX_ASSERT(sizedLineIndex >= 0);
03797
03798     while (sizedItemIndex < firstRealizedItemIndex)
03799     {
03800         sizedItemIndex += m_lineItemCounts[sizedLineVectorIndex];
03801         sizedLineIndex++;
03802         sizedLineVectorIndex++;
03803     }
03804
03805     MUX_ASSERT(m_lastSizedLineIndex == -1 || sizedLineIndex <= m_lastSizedLineIndex);
03806     MUX_ASSERT(m_lastSizedItemIndex == -1 || sizedItemIndex <= m_lastSizedItemIndex);
03807
03808     *firstFullyRealizedLineIndex = sizedLineIndex;
03809     *firstItemInFullyRealizedLine = sizedItemIndex;
03810 }
03811
03812 // Uses the m_lineItemCounts vector to return the index of the first item in the provided line index.
03813 int LinedFlowLayout::GetFirstItemIndexInLineIndex(
03814     int lineVectorIndex) const
03815 {
03816     MUX_ASSERT(lineVectorIndex >= 0);
03817     MUX_ASSERT(lineVectorIndex < static_cast<int>(m_lineItemCounts.size()));
03818
03819     int itemIndex = 0;
03820
03821     for (int lineVectorIndexTmp = 0; lineVectorIndexTmp < lineVectorIndex; lineVectorIndexTmp++)
03822     {
03823         itemIndex += m_lineItemCounts[lineVectorIndexTmp];
03824     }
03825
03826     return itemIndex;
03827 }
03828
03829 int LinedFlowLayout::GetFrozenLineIndexFromFrozenItemIndex(
03830     int frozenItemIndex) const
03831 {
03832     MUX_ASSERT(m_firstSizedLineIndex != -1);
03833     MUX_ASSERT(m_lastSizedLineIndex != -1);
03834     MUX_ASSERT(frozenItemIndex >= m_firstFrozenItemIndex);
03835     MUX_ASSERT(frozenItemIndex <= m_lastFrozenItemIndex);
03836     MUX_ASSERT(m_firstFrozenLineIndex != -1);
03837     MUX_ASSERT(m_lastFrozenLineIndex != -1);
03838
03839     int frozenItemVectorIndex = frozenItemIndex - m_firstFrozenItemIndex;
03840
03841     for (int frozenLineVectorIndex = m_firstFrozenLineIndex - m_firstSizedLineIndex;
03842         frozenLineVectorIndex <= m_lastFrozenLineIndex - m_firstSizedLineIndex;
03843         frozenLineVectorIndex++)
03844     {
03845         MUX_ASSERT(frozenLineVectorIndex >= 0);
03846         MUX_ASSERT(frozenLineVectorIndex < static_cast<int>(m_lineItemCounts.size()));
03847
03848         if (frozenItemVectorIndex < m_lineItemCounts[frozenLineVectorIndex])
03849         {
03850             return frozenLineVectorIndex + m_firstSizedLineIndex;
03851         }
03852         frozenItemVectorIndex -= m_lineItemCounts[frozenLineVectorIndex];
03853     }
03854
03855     MUX_ASSERT(false);
03856     return -1;
03857 }
03858
03859 // Returns the drawback improvement when an item moves from a line to a neighboring one.
03860 // The drawback is nil for the last line when it is smaller than the available width.
03861 double LinedFlowLayout::GetItemDrawbackImprovement(
03862     double movingWidth,
03863     double availableWidth,
03864     double currentLineItemsWidth,
03865     double neighborLineItemsWidth,
03866     int currentLineIndex,
03867     int neighborLineIndex)
03868 {
03869     MUX_ASSERT(movingWidth - MinItemSpacing() <= currentLineItemsWidth);
03870     MUX_ASSERT(std::abs(currentLineIndex - neighborLineIndex) == 1);
03871
03872     const int lastLineIndex = GetLineCount(m_averageItemsPerLine.second) - 1;
03873     double currentDrawback = 0.0;
03874
03875     if (currentLineIndex != lastLineIndex || currentLineItemsWidth > availableWidth)
03876     {
03877         currentDrawback = std::pow(currentLineItemsWidth - availableWidth, 2.0);
03878     }
03879
03880     if (neighborLineIndex != lastLineIndex || neighborLineItemsWidth > availableWidth)
03881     {
03882         currentDrawback += std::pow(neighborLineItemsWidth - availableWidth, 2.0);
03883     }
03884
03885     double newDrawback = 0.0;
03886
03887     if (currentLineIndex != lastLineIndex || currentLineItemsWidth - movingWidth > availableWidth)
03888     {
03889         newDrawback = std::pow(currentLineItemsWidth - movingWidth - availableWidth, 2.0);
03890     }
03891
03892     if (neighborLineIndex != lastLineIndex || neighborLineItemsWidth + movingWidth > availableWidth)
03893     {
03894         newDrawback += std::pow(neighborLineItemsWidth + movingWidth - availableWidth, 2.0);
03895     }
03896
03897     return currentDrawback - newDrawback;
03898 }
03899
03900 // Returns the line index the provided element belongs to, or -1 if not found.
03901 int LinedFlowLayout::GetItemLineIndex(
03902     winrt::UIElement const& element)
03903 {
03904     const int sizedLineVectorCount = static_cast<int>(m_lineItemCounts.size());
03905     int sizedItemIndex = m_firstSizedItemIndex;
03906
03907     for (int sizedLineVectorIndex = 0; sizedLineVectorIndex < sizedLineVectorCount; sizedLineVectorIndex++)
03908     {
03909         const int lineItemsCount = m_lineItemCounts[sizedLineVectorIndex];
03910
03911         for (int itemVectorIndex = 0; itemVectorIndex < lineItemsCount; itemVectorIndex++)
03912         {
03913             if (m_elementManager.IsDataIndexRealized(sizedItemIndex) &&
03914                 m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/) == element)
03915             {
03916                 return sizedLineVectorIndex + m_firstSizedLineIndex;
03917             }
03918
03919             sizedItemIndex++;
03920         }
03921     }
03922
03923     return -1;
03924 }
03925
03926 // Returns the item range for the ItemsInfoRequested event based on the average items per line, the realization rect size and offset.
03927 void LinedFlowLayout::GetItemsInfoRequestedRange(
03928     winrt::VirtualizingLayoutContext const& context,
03929     float availableWidth,
03930     double actualLineHeight,
03931     int* itemsRangeStartIndex,
03932     int* itemsRangeRequestedLength)
03933 {
03934     if (m_isVirtualizingContext)
03935     {
03936         const float nearRealizationRect = GetRoundedFloat(context.RealizationRect().Y);
03937         const float farRealizationRect = nearRealizationRect + context.RealizationRect().Height;
03938
03939         const double lineSpacing = LineSpacing();
03940         float sizedItemsRectHeight = GetSizedItemsRectHeight(context, actualLineHeight, lineSpacing);
03941
03942         const float realizationRectHeightDeficit = std::max(0.0f, sizedItemsRectHeight - farRealizationRect + nearRealizationRect);
03943         float nearSizedItemsRect = nearRealizationRect - realizationRectHeightDeficit / 2.0f;
03944         float farSizedItemsRect = farRealizationRect + realizationRectHeightDeficit / 2.0f;
03945
03946         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"sizedItemsRectHeight", sizedItemsRectHeight);
03947         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"nearRealizationRect", nearRealizationRect);
03948         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"farRealizationRect", farRealizationRect);
03949         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"realizationRectHeightDeficit", realizationRectHeightDeficit);
03950         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"nearSizedItemsRect", nearSizedItemsRect);
03951         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"farSizedItemsRect", farSizedItemsRect);
03952
03953         const double minItemSpacing = MinItemSpacing();
03954         // Either an average was recorded in a prior measure pass, or the items are considered square for an initial rough estimation.
03955         const double averageItemsPerLine = m_averageItemsPerLine.second == 0.0 ? ((availableWidth + minItemSpacing) / (actualLineHeight + minItemSpacing)) : m_averageItemsPerLine.second;
03956
03957         MUX_ASSERT(averageItemsPerLine > 0.0);
03958
03959         const int lineCount = GetLineCount(averageItemsPerLine);
03960
03961         MUX_ASSERT(lineCount >= 0);
03962
03963         const int newRecommendedAnchorIndex = context.RecommendedAnchorIndex();
03964
03965         sizedItemsRectHeight = farSizedItemsRect - nearSizedItemsRect;
03966
03967         if (m_anchorIndex != -1 || newRecommendedAnchorIndex != -1)
03968         {
03969             const int anchorLineIndex = static_cast<int>((newRecommendedAnchorIndex == -1 ? m_anchorIndex : newRecommendedAnchorIndex) / averageItemsPerLine);
03970
03971             MUX_ASSERT(anchorLineIndex >= 0);
03972             MUX_ASSERT(anchorLineIndex < lineCount);
03973
03974             const float anchorLineNearEdge = static_cast<float>(anchorLineIndex * (actualLineHeight + lineSpacing));
03975
03976             // Check if the sized items rect overlaps the anticipated anchor line, with 1 line of margin of error in the line index approximation.
03977             if (anchorLineNearEdge - 2 * actualLineHeight - lineSpacing <= nearSizedItemsRect || anchorLineNearEdge + actualLineHeight + lineSpacing >= farSizedItemsRect)
03978             {
03979                 // Ensure the anchor index is sized by using a non-inflated sizing rect centered around the middle of the anticipated anchor line.
03980                 const float anchorLineMiddle = static_cast<float>(anchorLineNearEdge + actualLineHeight / 2.0);
03981
03982                 sizedItemsRectHeight = farRealizationRect - nearRealizationRect;
03983                 nearSizedItemsRect = GetRoundedFloat(anchorLineMiddle - sizedItemsRectHeight / 2.0f);
03984                 farSizedItemsRect = nearSizedItemsRect + sizedItemsRectHeight;
03985
03986                 LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"nearSizedItemsRect", nearSizedItemsRect);
03987                 LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"farSizedItemsRect", farSizedItemsRect);
03988             }
03989         }
03990
03991         const double linesSpacing = lineCount == 0 ? 0.0 : (static_cast<double>(lineCount) - 1) * lineSpacing;
03992         const double linesHeight = lineCount * actualLineHeight + linesSpacing;
03993         const double scrollViewport = context.VisibleRect().Height;
03994         const double scrollableSize = std::max(0.0, linesHeight - scrollViewport);
03995
03996         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"linesHeight", linesHeight);
03997         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollViewport", scrollViewport);
03998         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"scrollableSize", scrollableSize);
03999         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"sizedItemsRectHeight", sizedItemsRectHeight);
04000
04001         // nearSizedItemsRect must not be negative.
04002         if (nearSizedItemsRect < 0.0)
04003         {
04004             sizedItemsRectHeight += nearSizedItemsRect;
04005             nearSizedItemsRect = 0.0;
04006
04007             MUX_ASSERT(sizedItemsRectHeight >= 0.0f);
04008         }
04009
04010         // farSizedItemsRect must not exceed the extent value.
04011         if (farSizedItemsRect > linesHeight)
04012         {
04013             sizedItemsRectHeight += static_cast<float>(linesHeight - farSizedItemsRect);
04014             farSizedItemsRect = static_cast<float>(linesHeight);
04015
04016             MUX_ASSERT(sizedItemsRectHeight >= 0.0f);
04017         }
04018
04019         // clampedNearSizedItemsRect must not exceed the max offset value.
04020         double clampedNearSizedItemsRect = std::min(scrollableSize, static_cast<double>(nearSizedItemsRect));
04021
04022         // clampedFarSizedItemsRect must not exceed the extent value.
04023         double clampedFarSizedItemsRect = std::max(clampedNearSizedItemsRect + sizedItemsRectHeight, static_cast<double>(farSizedItemsRect));
04024         clampedFarSizedItemsRect = std::min(linesHeight, clampedFarSizedItemsRect);
04025
04026         clampedNearSizedItemsRect = std::min(clampedFarSizedItemsRect - sizedItemsRectHeight, clampedNearSizedItemsRect);
04027         clampedNearSizedItemsRect = std::max(0.0, clampedNearSizedItemsRect);
04028
04029         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"clampedNearSizedItemsRect", clampedNearSizedItemsRect);
04030         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"clampedFarSizedItemsRect", clampedFarSizedItemsRect);
04031
04032         MUX_ASSERT(clampedFarSizedItemsRect - clampedNearSizedItemsRect <= sizedItemsRectHeight + 0.001);
04033         MUX_ASSERT(clampedNearSizedItemsRect >= 0.0);
04034         MUX_ASSERT(clampedNearSizedItemsRect <= scrollableSize);
04035         MUX_ASSERT(clampedFarSizedItemsRect >= 0.0);
04036         MUX_ASSERT(clampedFarSizedItemsRect <= linesHeight);
04037
04038         int firstSizedLineIndex{ -1 };
04039         int lastSizedLineIndex{ -1 };
04040
04041         GetFirstAndLastDisplayedLineIndexes(
04042             clampedFarSizedItemsRect - clampedNearSizedItemsRect /*scrollViewport*/,
04043             clampedNearSizedItemsRect /*scrollOffset*/,
04044             0 /*padding*/,
04045             lineSpacing,
04046             actualLineHeight,
04047             lineCount,
04048             false /*forFullyDisplayedLines*/,
04049             &firstSizedLineIndex,
04050             &lastSizedLineIndex);
04051
04052         MUX_ASSERT(firstSizedLineIndex >= 0);
04053         MUX_ASSERT(lastSizedLineIndex >= 0);
04054         MUX_ASSERT(firstSizedLineIndex < lineCount);
04055         MUX_ASSERT(lastSizedLineIndex < lineCount);
04056
04057         int newFirstSizedItemIndex = std::max(0, static_cast<int>(firstSizedLineIndex * averageItemsPerLine) - 1);
04058         int newLastSizedItemIndex = std::min(m_itemCount - 1, static_cast<int>((lastSizedLineIndex + 1) * averageItemsPerLine));
04059
04060         MUX_ASSERT(newFirstSizedItemIndex >= 0);
04061         MUX_ASSERT(newLastSizedItemIndex >= 0);
04062         MUX_ASSERT(newFirstSizedItemIndex < m_itemCount);
04063         MUX_ASSERT(newLastSizedItemIndex < m_itemCount);
04064
04065         *itemsRangeStartIndex = newFirstSizedItemIndex;
04066         *itemsRangeRequestedLength = newLastSizedItemIndex - newFirstSizedItemIndex + 1;
04067     }
04068     else
04069     {
04070         // All items are realized in non-virtualizing mode, and the fast path requests items info for the entire source collection.
04071         MUX_ASSERT(context.VisibleRect().Y == 0.0f);
04072
04073         *itemsRangeStartIndex = 0;
04074         *itemsRangeRequestedLength = m_itemCount;
04075     }
04076 }
04077
04078 // Used by LinedFlowLayout::GetItemsLayout to determine whether an item is wrapping to a new line or appended
04079 // to the current line. The current item's width is multiplied by this 'item-size-multiplier-threshold' and then
04080 // compared to the expected cumulated line widths and actual cumulated line widths.
04081 double LinedFlowLayout::GetItemWidthMultiplierThreshold() const
04082 {
04083     // If the discrepancy between the actual and expected total line width is greater than twice the processed item width,
04084     // the default wrapping behavior is reversed.
04085     constexpr double c_itemWidthMultiplierThreshold = 2.0;
04086
04087     const double forcedWrapMultiplierDbg = ForcedWrapMultiplierDbg();
04088
04089     return forcedWrapMultiplierDbg != 0.0 ? forcedWrapMultiplierDbg : c_itemWidthMultiplierThreshold;
04090 }
04091
04092 // Computes an ItemsLayout for the provided available width.
04093 // availableWidth: available width as provided by MeasureOverride.
04094 // adjustedAvailableWidth: variation of availableWidth to equalize the items' layout on the lines.
04095 LinedFlowLayout::ItemsLayout LinedFlowLayout::GetItemsLayout(
04096     std::map<int, int>* internalLockedItemIndexes,
04097     double scrollViewport,
04098     double availableWidth,
04099     double adjustedAvailableWidth,
04100     double averageLineItemsWidth,
04101     double averageAspectRatio,
04102     double lineSpacing,
04103     double actualLineHeight,
04104     int beginSizedLineIndex,
04105     int endSizedLineIndex,
04106     int beginSizedItemIndex,
04107     int endSizedItemIndex,
04108     int beginLineVectorIndex,
04109     bool isLastSizedLineStretchEnabled)
04110 {
04111     MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
04112     MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
04113     MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));
04114
04115     const bool forward = beginSizedItemIndex <= endSizedItemIndex;
04116     const int sizedLineCount = forward ? endSizedLineIndex - beginSizedLineIndex + 1 : beginSizedLineIndex - endSizedLineIndex + 1;
04117     const double minItemSpacing = MinItemSpacing();
04118     int lineVectorIndex;
04119     int lineItemsCount = 0;
04120     int lastItemIndex = std::numeric_limits<int>::max();
04121     double cumulatedLinesWidth = 0.0;
04122     double cumulatedWidth = 0.0;
04123     double lastItemWidth = std::numeric_limits<double>::max();
04124     std::vector<double> headItemWidths(sizedLineCount);
04125     std::vector<double> tailItemWidths(sizedLineCount);
04126     std::vector<double> headItemDrawbackImprovements(sizedLineCount);
04127     std::vector<double> tailItemDrawbackImprovements(sizedLineCount);
04128     std::vector<int> headItemIndexes(sizedLineCount, std::numeric_limits<int>::max());
04129     std::vector<int> tailItemIndexes(sizedLineCount, std::numeric_limits<int>::max());
04130
04131 #ifdef DBG
04132     MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));
04133     MUX_ASSERT(internalLockedItemIndexes != nullptr);
04134     MUX_ASSERT(!forward || beginSizedItemIndex >= m_firstSizedItemIndex);
04135     MUX_ASSERT(!forward || endSizedItemIndex <= m_lastSizedItemIndex);
04136     MUX_ASSERT(forward || endSizedItemIndex >= m_firstSizedItemIndex);
04137     MUX_ASSERT(forward || beginSizedItemIndex <= m_lastSizedItemIndex);
04138
04139     VerifyInternalLockedItemsDbg(
04140         *internalLockedItemIndexes,
04141         beginSizedLineIndex,
04142         endSizedLineIndex,
04143         beginSizedItemIndex,
04144         endSizedItemIndex);
04145 #endif
04146
04147     ItemsLayout itemsLayout;
04148
04149     itemsLayout.m_availableLineItemsWidth = adjustedAvailableWidth;
04150     itemsLayout.m_lineItemCounts.resize(sizedLineCount);
04151     itemsLayout.m_lineItemWidths.resize(sizedLineCount);
04152
04153     lineVectorIndex = forward ? 0 : sizedLineCount - 1;
04154
04155 #ifdef DBG
04156     const int lineCountDbg = GetLineCount(m_averageItemsPerLine.second);
04157     const int sizedItemCountDbg = forward ? endSizedItemIndex - beginSizedItemIndex + 1 : beginSizedItemIndex - endSizedItemIndex + 1;
04158
04159     MUX_ASSERT(sizedItemCountDbg >= sizedLineCount);
04160 #endif
04161
04162     for (int sizedItemIndex = beginSizedItemIndex; ; sizedItemIndex = forward ? sizedItemIndex + 1 : sizedItemIndex - 1)
04163     {
04164         double itemWidth{};
04165
04166         if (m_itemsInfoFirstIndex == -1)
04167         {
04168             MUX_ASSERT(m_elementManager.IsDataIndexRealized(sizedItemIndex));
04169
04170             if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
04171             {
04172                 itemWidth = element.DesiredSize().Width;
04173
04174 #ifdef DBG
04175                 const auto frameworkElementDbg = element.try_as<winrt::FrameworkElement>();
04176
04177                 if (frameworkElementDbg)
04178                 {
04179                     if (itemWidth < frameworkElementDbg.MinWidth() - 1.0 / m_roundingScaleFactor)
04180                     {
04181                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, itemWidth, frameworkElementDbg.MinWidth());
04182                     }
04183                     if (itemWidth > frameworkElementDbg.MaxWidth() + 1.0 / m_roundingScaleFactor)
04184                     {
04185                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, itemWidth, frameworkElementDbg.MaxWidth());
04186                     }
04187                     MUX_ASSERT(itemWidth >= frameworkElementDbg.MinWidth() - 1.0 / m_roundingScaleFactor);
04188                     MUX_ASSERT(itemWidth <= frameworkElementDbg.MaxWidth() + 1.0 / m_roundingScaleFactor);
04189                 }
04190 #endif
04191             }
04192         }
04193         else
04194         {
04195             MUX_ASSERT(sizedItemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));
04196
04197             const double desiredMinWidth = GetMinWidthFromItemsInfo(sizedItemIndex);
04198             const double desiredMaxWidth = GetMaxWidthFromItemsInfo(sizedItemIndex);
04199             double desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForRegularPath[static_cast<size_t>(sizedItemIndex) - m_itemsInfoFirstIndex];
04200
04201             if (desiredAspectRatio <= 0.0)
04202             {
04203                 // The average aspect ratio is used as a fallback value for items that were given a negative ratio
04204                 // by the ItemsInfoRequested handler.
04205                 desiredAspectRatio = averageAspectRatio;
04206             }
04207
04208             itemWidth = desiredAspectRatio * actualLineHeight;
04209
04210             if (desiredMinWidth >= 0.0)
04211             {
04212                 itemWidth = std::max(desiredMinWidth, itemWidth);
04213             }
04214
04215             if (desiredMaxWidth >= 0.0)
04216             {
04217                 itemWidth = std::min(desiredMaxWidth, itemWidth);
04218             }
04219         }
04220
04221         const auto& internalLockedItemIndexesIterator = internalLockedItemIndexes->find(sizedItemIndex);
04222         const bool isInternalLockedItem = internalLockedItemIndexesIterator != internalLockedItemIndexes->end();
04223         const int internalLockedLineIndex = isInternalLockedItem ? internalLockedItemIndexesIterator->second : -1;
04224
04225         MUX_ASSERT(!forward || beginSizedLineIndex + lineVectorIndex < lineCountDbg);
04226         MUX_ASSERT(forward || endSizedLineIndex + lineVectorIndex < lineCountDbg);
04227
04228         const bool isLockedItem = IsLockedItem(
04229             forward,
04230             beginSizedLineIndex,
04231             endSizedLineIndex,
04232             sizedItemIndex);
04233
04234         const int lockedLineIndex = isLockedItem ? m_lockedItemIndexes[sizedItemIndex] : -1;
04235
04236         int nextLockedItemIndex, nextLockedLineIndex;
04237
04238         GetNextLockedItem(
04239             internalLockedItemIndexes,
04240             forward,
04241             beginSizedLineIndex,
04242             endSizedLineIndex,
04243             sizedItemIndex,
04244             &nextLockedItemIndex,
04245             &nextLockedLineIndex);
04246
04247         MUX_ASSERT(!(nextLockedItemIndex == -1 && nextLockedLineIndex != -1));
04248         MUX_ASSERT(!(nextLockedItemIndex != -1 && nextLockedLineIndex == -1));
04249
04250         // mustCumulate is set to True when 'element' must be appended to the current line.
04251         const bool mustCumulate =
04252             lineItemsCount == 0 ||                                                                                                                            // No item is present on the current line - it must at least contain one item
04253             (forward && LineHasLockedItem(beginSizedLineIndex + lineVectorIndex, false /*before*/, sizedItemIndex)) ||                                        // A publicly locked item is ahead going forward, and must be on the current line
04254             (!forward && LineHasLockedItem(endSizedLineIndex + lineVectorIndex, true /*before*/, sizedItemIndex)) ||                                          // A publicly locked item is ahead going backward, and must be on the current line
04255             (forward && LineHasInternalLockedItem(*internalLockedItemIndexes, beginSizedLineIndex + lineVectorIndex, false /*before*/, sizedItemIndex)) ||    // An internally locked item is ahead going forward, and must be on the current line
04256             (!forward && LineHasInternalLockedItem(*internalLockedItemIndexes, endSizedLineIndex + lineVectorIndex, true /*before*/, sizedItemIndex)) ||      // An internally locked item is ahead going backward, and must be on the current line
04257             (forward && lineVectorIndex == sizedLineCount - 1) ||                                                                                             // The current line is the last one processed, going forward
04258             (!forward && lineVectorIndex == 0);                                                                                                               // The current line is the last one processed, going backward
04259         // canCumulate is set to True when 'element' has enough room to fit in the current line.
04260         const bool canCumulate = cumulatedWidth + (lineItemsCount == 0.0 ? 0.0 : minItemSpacing) + itemWidth <= adjustedAvailableWidth;
04261         // mustNotCumulate is set to True when 'element' must wrap to the next line.
04262         bool mustNotCumulate = false;
04263         // shouldNotCumulate is set to True when there is no mandatory assignment for 'element', there is still room for it on the current line,
04264         // but in order to equalize lines, wrapping is preferred over not wrapping,
04265         //   - because of an upcoming publicly locked item,
04266         //   - because the cumulated item widths significantly exceeds the expected one given the line index.
04267         bool shouldNotCumulate = false;
04268         // shouldCumulate is set to True when there is no mandatory assignment for 'element', there is no room for it on the current line,
04269         // but in order to equalize lines, wrapping is skipped because the cumulated item widths is significantly lower than the expected one given the line index.
04270         bool shouldCumulate = false;
04271
04272 #ifdef DBG
04273         // mustNotCumulateDbg is a replica of mustNotCumulate below. It is only evaluated in debug mode for the purpose of the assertion
04274         // in order to detect an expected situation where the current item must and must not belong to the current line at the same time.
04275         // This avoids the evaluation of mustNotCumulate when not needed in retail mode.
04276         const bool mustNotCumulateDbg =
04277             (forward && endSizedItemIndex - sizedItemIndex < sizedLineCount - 1 - lineVectorIndex) ||
04278             (!forward && sizedItemIndex - endSizedItemIndex < lineVectorIndex) ||
04279             (forward && isLockedItem && lockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||
04280             (!forward && isLockedItem && lockedLineIndex != endSizedLineIndex + lineVectorIndex) ||
04281             (forward && isInternalLockedItem && internalLockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||
04282             (!forward && isInternalLockedItem && internalLockedLineIndex != endSizedLineIndex + lineVectorIndex) ||
04283             (forward && nextLockedItemIndex != -1 && nextLockedItemIndex - sizedItemIndex < nextLockedLineIndex - (beginSizedLineIndex + lineVectorIndex)) ||
04284             (!forward && nextLockedItemIndex != -1 && sizedItemIndex - nextLockedItemIndex < endSizedLineIndex + lineVectorIndex - nextLockedLineIndex);
04285
04286         MUX_ASSERT(!(mustCumulate && mustNotCumulateDbg));
04287 #endif
04288
04289         if (!mustCumulate)
04290         {
04291             mustNotCumulate =
04292                 (forward && endSizedItemIndex - sizedItemIndex < sizedLineCount - 1 - lineVectorIndex) ||                                                         // There are as many items left as there are lines, going forward
04293                 (!forward && sizedItemIndex - endSizedItemIndex < lineVectorIndex) ||                                                                             // There are as many items left as there are lines, going backward
04294                 (forward && isLockedItem && lockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||                                                          // 'element' is a publicly locked item for the next line, going forward
04295                 (!forward && isLockedItem && lockedLineIndex != endSizedLineIndex + lineVectorIndex) ||                                                           // 'element' is a publicly locked item for the next line, going backward
04296                 (forward && isInternalLockedItem && internalLockedLineIndex != beginSizedLineIndex + lineVectorIndex) ||                                          // 'element' is an internally locked item for the next line, going forward
04297                 (!forward && isInternalLockedItem && internalLockedLineIndex != endSizedLineIndex + lineVectorIndex) ||                                           // 'element' is an internally locked item for the next line, going backward
04298                 (forward && nextLockedItemIndex != -1 && nextLockedItemIndex - sizedItemIndex < nextLockedLineIndex - (beginSizedLineIndex + lineVectorIndex)) || // A locked item is ahead, going forward, just far enough to impose the minimum of one item per line
04299                 (!forward && nextLockedItemIndex != -1 && sizedItemIndex - nextLockedItemIndex < endSizedLineIndex + lineVectorIndex - nextLockedLineIndex);      // A locked item is ahead, going backward, just far enough to impose the minimum of one item per line
04300
04301             if (!mustNotCumulate)
04302             {
04303                 if (canCumulate)
04304                 {
04305                     if (nextLockedItemIndex != -1)
04306                     {
04307                         // Avoiding under-filled lines around publicly locked items.
04308                         int nextPublicLockedItemIndex, nextPublicLockedLineIndex;
04309
04310                         GetNextLockedItem(
04311                             nullptr,
04312                             forward,
04313                             beginSizedLineIndex,
04314                             endSizedLineIndex,
04315                             sizedItemIndex,
04316                             &nextPublicLockedItemIndex,
04317                             &nextPublicLockedLineIndex);
04318
04319                         if (nextPublicLockedItemIndex != -1)
04320                         {
04321                             MUX_ASSERT(nextPublicLockedLineIndex != -1);
04322
04323                             const int linesToFill = forward ? nextPublicLockedLineIndex - beginSizedLineIndex - lineVectorIndex : endSizedLineIndex + lineVectorIndex - nextPublicLockedLineIndex;
04324                             const int linesPerScrollViewport = static_cast<int>(scrollViewport / (actualLineHeight + lineSpacing));
04325
04326                             if (linesToFill <= linesPerScrollViewport)
04327                             {
04328                                 MUX_ASSERT(lineItemsCount > 0);
04329
04330                                 const int itemsAvailable = forward ? nextPublicLockedItemIndex - sizedItemIndex + lineItemsCount : sizedItemIndex - nextPublicLockedItemIndex + lineItemsCount;
04331                                 const int averageItemsToFill = static_cast<int>(m_averageItemsPerLine.second * linesToFill);
04332
04333                                 // shouldNotCumulate is set to true to wrap earlier than necessary to avoid under-filled lines around the publicly locked item.
04334                                 shouldNotCumulate = itemsAvailable < averageItemsToFill;
04335                             }
04336                         }
04337                     }
04338                 }
04339
04340                 if (averageLineItemsWidth > 0.0 && ((canCumulate && !shouldNotCumulate) || !canCumulate))
04341                 {
04342                     MUX_ASSERT(!mustCumulate);
04343                     MUX_ASSERT(!mustNotCumulate);
04344
04345                     // Check if cumulated total line widths is much larger or smaller than expected total based on average line width.
04346                     const int lineCount = forward ? (lineVectorIndex + 1) : (sizedLineCount - lineVectorIndex);
04347                     MUX_ASSERT(lineCount > 0);
04348                     const double itemWidthMultiplierThreshold = GetItemWidthMultiplierThreshold();
04349                     const double expectedCumulatedLinesWidth = averageLineItemsWidth * lineCount;
04350                     const double actualCumulatedLinesWidth = cumulatedLinesWidth + cumulatedWidth + itemWidth;
04351
04352                     if (canCumulate && !shouldNotCumulate)
04353                     {
04354                         if (actualCumulatedLinesWidth - expectedCumulatedLinesWidth > itemWidthMultiplierThreshold * itemWidth)
04355                         {
04356                             // In order to equalize lines, wrapping is preferred over not wrapping because the cumulated item widths significantly exceeds the expected one given the line index.
04357                             shouldNotCumulate = true;
04358                         }
04359                     }
04360                     else
04361                     {
04362                         MUX_ASSERT(!canCumulate);
04363                         MUX_ASSERT(!shouldNotCumulate);
04364
04365                         if (expectedCumulatedLinesWidth - actualCumulatedLinesWidth > itemWidthMultiplierThreshold * itemWidth)
04366                         {
04367                             // In order to equalize lines, not wrapping is preferred over wrapping because the cumulated item widths is significantly lower than the expected one given the line index.
04368                             shouldCumulate = true;
04369                         }
04370                     }
04371                 }
04372             }
04373         }
04374
04375         MUX_ASSERT(!shouldNotCumulate || !shouldCumulate);
04376
04377         if (mustCumulate || ((canCumulate || shouldCumulate) && !mustNotCumulate && !shouldNotCumulate))
04378         {
04379             // The current item sizedItemIndex is appended on the current line.
04380             if (isLockedItem ||
04381                 isInternalLockedItem ||
04382                 sizedItemIndex == beginSizedItemIndex ||
04383                 sizedItemIndex == endSizedItemIndex)
04384             {
04385                 lastItemWidth = std::numeric_limits<double>::max();
04386                 lastItemIndex = std::numeric_limits<int>::max();
04387             }
04388             else
04389             {
04390                 lastItemWidth = itemWidth;
04391                 lastItemIndex = sizedItemIndex;
04392             }
04393
04394             if (lineItemsCount != 0.0)
04395             {
04396                 cumulatedWidth += minItemSpacing;
04397             }
04398
04399             cumulatedWidth += itemWidth;
04400             lineItemsCount++;
04401         }
04402         else
04403         {
04404             // The current item sizedItemIndex creates a brand new line.
04405             MUX_ASSERT(lineItemsCount > 0);
04406
04407             if (lastItemWidth != std::numeric_limits<double>::max())
04408             {
04409                 tailItemWidths[lineVectorIndex] = lastItemWidth;
04410                 tailItemIndexes[lineVectorIndex] = lastItemIndex;
04411
04412                 lastItemWidth = std::numeric_limits<double>::max();
04413                 lastItemIndex = std::numeric_limits<int>::max();
04414             }
04415
04416             cumulatedLinesWidth += cumulatedWidth;
04417             cumulatedWidth = itemWidth;
04418             lineItemsCount = 1;
04419
04420             if (isLockedItem)
04421             {
04422                 lineVectorIndex = lockedLineIndex - (forward ? beginSizedLineIndex : endSizedLineIndex);
04423                 MUX_ASSERT(lineVectorIndex >= 0);
04424                 MUX_ASSERT(lineVectorIndex <= sizedLineCount - 1);
04425             }
04426             else if (isInternalLockedItem)
04427             {
04428                 lineVectorIndex = internalLockedLineIndex - (forward ? beginSizedLineIndex : endSizedLineIndex);
04429                 MUX_ASSERT(lineVectorIndex >= 0);
04430                 MUX_ASSERT(lineVectorIndex <= sizedLineCount - 1);
04431             }
04432             else if (sizedItemIndex == endSizedItemIndex)
04433             {
04434                 lineVectorIndex = forward ? sizedLineCount - 1 : 0;
04435 #ifdef DBG
04436                 if (forward)
04437                 {
04438                     MUX_ASSERT(lineVectorIndex == 0 || itemsLayout.m_lineItemCounts[lineVectorIndex - 1] > 0);
04439                 }
04440                 else
04441                 {
04442                     MUX_ASSERT(lineVectorIndex == sizedLineCount - 1 || itemsLayout.m_lineItemCounts[lineVectorIndex + 1] > 0);
04443                 }
04444 #endif
04445             }
04446             else
04447             {
04448                 MUX_ASSERT(itemsLayout.m_lineItemCounts[lineVectorIndex] > 0);
04449                 lineVectorIndex = forward ? lineVectorIndex + 1 : lineVectorIndex - 1;
04450                 MUX_ASSERT(lineVectorIndex >= 0);
04451                 MUX_ASSERT(lineVectorIndex <= sizedLineCount - 1);
04452             }
04453
04454             if (!isLockedItem &&
04455                 !isInternalLockedItem &&
04456                 sizedItemIndex != beginSizedItemIndex &&
04457                 sizedItemIndex != endSizedItemIndex &&
04458                 ((forward && endSizedItemIndex - sizedItemIndex >= sizedLineCount - lineVectorIndex) ||
04459                     (!forward && sizedItemIndex - endSizedItemIndex > lineVectorIndex)))
04460             {
04461                 headItemWidths[lineVectorIndex] = itemWidth;
04462                 headItemIndexes[lineVectorIndex] = sizedItemIndex;
04463             }
04464         }
04465
04466         itemsLayout.m_lineItemCounts[lineVectorIndex] = lineItemsCount;
04467         itemsLayout.m_lineItemWidths[lineVectorIndex] = cumulatedWidth;
04468
04469         if (sizedItemIndex == endSizedItemIndex)
04470         {
04471             break;
04472         }
04473     }
04474
04475 #ifdef DBG
04476     if (forward)
04477     {
04478         MUX_ASSERT(headItemWidths[0] == 0.0);
04479         MUX_ASSERT(headItemIndexes[0] == std::numeric_limits<int>::max());
04480         MUX_ASSERT(tailItemWidths[sizedLineCount - 1] == 0.0);
04481         MUX_ASSERT(tailItemIndexes[sizedLineCount - 1] == std::numeric_limits<int>::max());
04482     }
04483     else
04484     {
04485         MUX_ASSERT(tailItemWidths[0] == 0.0);
04486         MUX_ASSERT(tailItemIndexes[0] == std::numeric_limits<int>::max());
04487         MUX_ASSERT(headItemWidths[sizedLineCount - 1] == 0.0);
04488         MUX_ASSERT(headItemIndexes[sizedLineCount - 1] == std::numeric_limits<int>::max());
04489     }
04490
04491     for (lineVectorIndex = 1; lineVectorIndex < sizedLineCount; lineVectorIndex++)
04492     {
04493         MUX_ASSERT(headItemIndexes[lineVectorIndex - 1] == std::numeric_limits<int>::max() ||
04494             headItemIndexes[lineVectorIndex] == std::numeric_limits<int>::max() ||
04495             headItemIndexes[lineVectorIndex - 1] < headItemIndexes[lineVectorIndex]);
04496         MUX_ASSERT(tailItemIndexes[lineVectorIndex - 1] == std::numeric_limits<int>::max() ||
04497             tailItemIndexes[lineVectorIndex] == std::numeric_limits<int>::max() ||
04498             tailItemIndexes[lineVectorIndex - 1] < tailItemIndexes[lineVectorIndex]);
04499     }
04500 #endif
04501
04502     for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
04503     {
04504         if (headItemWidths[lineVectorIndex] != 0.0 && itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
04505         {
04506             MUX_ASSERT(!forward || lineVectorIndex - 1 >= 0);
04507             MUX_ASSERT(forward || lineVectorIndex + 1 < sizedLineCount);
04508
04509             headItemDrawbackImprovements[lineVectorIndex] = GetItemDrawbackImprovement(
04510                 headItemWidths[lineVectorIndex] + minItemSpacing,
04511                 adjustedAvailableWidth,
04512                 itemsLayout.m_lineItemWidths[lineVectorIndex],
04513                 itemsLayout.m_lineItemWidths[forward ? lineVectorIndex - 1 : lineVectorIndex + 1],
04514                 beginLineVectorIndex + lineVectorIndex,
04515                 beginLineVectorIndex + (forward ? lineVectorIndex - 1 : lineVectorIndex + 1));
04516         }
04517
04518         if (tailItemWidths[lineVectorIndex] != 0.0 && itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
04519         {
04520             MUX_ASSERT(!forward || lineVectorIndex + 1 < sizedLineCount);
04521             MUX_ASSERT(forward || lineVectorIndex - 1 >= 0);
04522
04523             tailItemDrawbackImprovements[lineVectorIndex] = GetItemDrawbackImprovement(
04524                 tailItemWidths[lineVectorIndex] + minItemSpacing,
04525                 adjustedAvailableWidth,
04526                 itemsLayout.m_lineItemWidths[lineVectorIndex],
04527                 itemsLayout.m_lineItemWidths[forward ? lineVectorIndex + 1 : lineVectorIndex - 1],
04528                 beginLineVectorIndex + lineVectorIndex,
04529                 beginLineVectorIndex + (forward ? lineVectorIndex + 1 : lineVectorIndex - 1));
04530         }
04531     }
04532
04533 #ifdef DBG
04534     if (forward)
04535     {
04536         MUX_ASSERT(headItemDrawbackImprovements[0] == 0.0);
04537         MUX_ASSERT(tailItemDrawbackImprovements[sizedLineCount - 1] == 0.0);
04538     }
04539     else
04540     {
04541         MUX_ASSERT(tailItemDrawbackImprovements[0] == 0.0);
04542         MUX_ASSERT(headItemDrawbackImprovements[sizedLineCount - 1] == 0.0);
04543     }
04544 #endif
04545
04546     double smallestHeadItemWidth = std::numeric_limits<double>::max();
04547     double smallestTailItemWidth = std::numeric_limits<double>::max();
04548     double bestEqualizingHeadItemDrawbackImprovement = 0.0;
04549     double bestEqualizingTailItemDrawbackImprovement = 0.0;
04550     int smallestHeadItemIndex = std::numeric_limits<int>::max();
04551     int smallestTailItemIndex = std::numeric_limits<int>::max();
04552     int smallestHeadLineIndex = std::numeric_limits<int>::max();
04553     int smallestTailLineIndex = std::numeric_limits<int>::max();
04554     int bestEqualizingHeadItemIndex = std::numeric_limits<int>::max();
04555     int bestEqualizingTailItemIndex = std::numeric_limits<int>::max();
04556     int bestEqualizingHeadLineIndex = std::numeric_limits<int>::max();
04557     int bestEqualizingTailLineIndex = std::numeric_limits<int>::max();
04558
04559     for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
04560     {
04561         if (smallestHeadItemWidth > headItemWidths[lineVectorIndex] &&
04562             headItemWidths[lineVectorIndex] > 0.0)
04563         {
04564             smallestHeadItemWidth = headItemWidths[lineVectorIndex];
04565             smallestHeadItemIndex = headItemIndexes[lineVectorIndex];
04566             smallestHeadLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
04567         }
04568
04569         if (bestEqualizingHeadItemDrawbackImprovement < headItemDrawbackImprovements[lineVectorIndex])
04570         {
04571             bestEqualizingHeadItemDrawbackImprovement = headItemDrawbackImprovements[lineVectorIndex];
04572             bestEqualizingHeadItemIndex = headItemIndexes[lineVectorIndex];
04573             bestEqualizingHeadLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
04574         }
04575
04576         if (itemsLayout.m_lineItemWidths[lineVectorIndex] <= adjustedAvailableWidth &&
04577             tailItemWidths[lineVectorIndex] > 0.0 &&
04578             smallestTailItemWidth > tailItemWidths[lineVectorIndex] + adjustedAvailableWidth - itemsLayout.m_lineItemWidths[lineVectorIndex])
04579         {
04580             smallestTailItemWidth = tailItemWidths[lineVectorIndex] + adjustedAvailableWidth - itemsLayout.m_lineItemWidths[lineVectorIndex];
04581             smallestTailItemIndex = tailItemIndexes[lineVectorIndex];
04582             smallestTailLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
04583         }
04584
04585         if (bestEqualizingTailItemDrawbackImprovement < tailItemDrawbackImprovements[lineVectorIndex])
04586         {
04587             bestEqualizingTailItemDrawbackImprovement = tailItemDrawbackImprovements[lineVectorIndex];
04588             bestEqualizingTailItemIndex = tailItemIndexes[lineVectorIndex];
04589             bestEqualizingTailLineIndex = forward ? beginSizedLineIndex + lineVectorIndex : endSizedLineIndex + lineVectorIndex;
04590         }
04591     }
04592
04593 #ifdef DBG
04594     if (forward)
04595     {
04596         MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex > beginSizedLineIndex);
04597         MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex <= endSizedLineIndex);
04598         MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex >= beginSizedLineIndex);
04599         MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex < endSizedLineIndex);
04600
04601         MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex > beginSizedLineIndex);
04602         MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex <= endSizedLineIndex);
04603         MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex >= beginSizedLineIndex);
04604         MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex < endSizedLineIndex);
04605     }
04606     else
04607     {
04608         MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex >= endSizedLineIndex);
04609         MUX_ASSERT(smallestHeadLineIndex == std::numeric_limits<int>::max() || smallestHeadLineIndex < beginSizedLineIndex);
04610         MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex > endSizedLineIndex);
04611         MUX_ASSERT(smallestTailLineIndex == std::numeric_limits<int>::max() || smallestTailLineIndex <= beginSizedLineIndex);
04612
04613         MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex >= endSizedLineIndex);
04614         MUX_ASSERT(bestEqualizingHeadLineIndex == std::numeric_limits<int>::max() || bestEqualizingHeadLineIndex < beginSizedLineIndex);
04615         MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex > endSizedLineIndex);
04616         MUX_ASSERT(bestEqualizingTailLineIndex == std::numeric_limits<int>::max() || bestEqualizingTailLineIndex <= beginSizedLineIndex);
04617     }
04618
04619     MUX_ASSERT(smallestHeadItemIndex != beginSizedItemIndex);
04620     MUX_ASSERT(smallestHeadItemIndex != endSizedItemIndex);
04621     MUX_ASSERT(smallestTailItemIndex != beginSizedItemIndex);
04622     MUX_ASSERT(smallestTailItemIndex != endSizedItemIndex);
04623
04624     MUX_ASSERT(bestEqualizingHeadItemIndex != beginSizedItemIndex);
04625     MUX_ASSERT(bestEqualizingHeadItemIndex != endSizedItemIndex);
04626     MUX_ASSERT(bestEqualizingTailItemIndex != beginSizedItemIndex);
04627     MUX_ASSERT(bestEqualizingTailItemIndex != endSizedItemIndex);
04628 #endif
04629
04630     itemsLayout.m_smallestHeadItemWidth = smallestHeadItemWidth;
04631     itemsLayout.m_smallestTailItemWidth = smallestTailItemWidth;
04632     itemsLayout.m_smallestHeadItemIndex = smallestHeadItemIndex;
04633     itemsLayout.m_smallestTailItemIndex = smallestTailItemIndex;
04634     itemsLayout.m_smallestHeadLineIndex = smallestHeadLineIndex;
04635     itemsLayout.m_smallestTailLineIndex = smallestTailLineIndex;
04636
04637     itemsLayout.m_bestEqualizingHeadItemDrawbackImprovement = bestEqualizingHeadItemDrawbackImprovement;
04638     itemsLayout.m_bestEqualizingTailItemDrawbackImprovement = bestEqualizingTailItemDrawbackImprovement;
04639     itemsLayout.m_bestEqualizingHeadItemIndex = bestEqualizingHeadItemIndex;
04640     itemsLayout.m_bestEqualizingTailItemIndex = bestEqualizingTailItemIndex;
04641     itemsLayout.m_bestEqualizingHeadLineIndex = bestEqualizingHeadLineIndex;
04642     itemsLayout.m_bestEqualizingTailLineIndex = bestEqualizingTailLineIndex;
04643
04644     // When itemsLayout.m_smallestTailItemWidth == std::numeric_limits<double>::max(), i.e. when all itemsLayout.m_lineItemWidths[lineVectorIndex] are greater
04645     // than adjustedAvailableWidth, it's not worth collapsing the adjustedAvailableWidth.
04646     // When all itemsLayout.m_lineItemWidths[lineVectorIndex] are smaller than adjustedAvailableWidth, it's not worth expanding the adjustedAvailableWidth.
04647
04648     ComputeItemsLayoutDrawback(availableWidth, isLastSizedLineStretchEnabled, itemsLayout);
04649
04650 #ifdef DBG
04651     MUX_ASSERT(itemsLayout.m_lineItemCounts[0] > 0);
04652     MUX_ASSERT(itemsLayout.m_lineItemCounts[sizedLineCount - 1] > 0);
04653
04654     int lineItemCountsDbg = 0;
04655
04656     for (lineVectorIndex = 0; lineVectorIndex < static_cast<int>(itemsLayout.m_lineItemCounts.size()); lineVectorIndex++)
04657     {
04658         MUX_ASSERT(itemsLayout.m_lineItemCounts[lineVectorIndex] > 0);
04659
04660         lineItemCountsDbg += itemsLayout.m_lineItemCounts[lineVectorIndex];
04661     }
04662
04663     MUX_ASSERT(sizedItemCountDbg == lineItemCountsDbg);
04664 #endif
04665
04666     return itemsLayout;
04667 }
04668
04669 // Returns the total arrange width of the items within the provided range.
04670 float LinedFlowLayout::GetItemsRangeArrangeWidth(
04671     int beginSizedItemIndex,
04672     int endSizedItemIndex,
04673     bool usesArrangeWidthInfo)
04674 {
04675     MUX_ASSERT(beginSizedItemIndex >= 0);
04676     MUX_ASSERT(endSizedItemIndex < m_itemCount);
04677     MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex);
04678     MUX_ASSERT(!UsesFastPathLayout() || usesArrangeWidthInfo);
04679     MUX_ASSERT(!UsesFastPathLayout() || static_cast<int>(m_itemsInfoArrangeWidths.size()) > endSizedItemIndex);
04680
04681     const int itemsInfoArrangeWidthsOffset = m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex;
04682     float cumulatedArrangeWidth{};
04683
04684     for (int sizedItemIndex = beginSizedItemIndex; sizedItemIndex <= endSizedItemIndex; sizedItemIndex++)
04685     {
04686         if (usesArrangeWidthInfo)
04687         {
04688             // Use the item info provided by the ItemsInfoRequested handler since the DesiredSize.Width
04689             // may still be the MinWidth because the content is loading.
04690             // The use of m_itemsInfoArrangeWidths must be consistent with the one in LinedFlowLayout::ArrangeConstrainedLines.
04691             cumulatedArrangeWidth += m_itemsInfoArrangeWidths[static_cast<size_t>(sizedItemIndex) - itemsInfoArrangeWidthsOffset];
04692         }
04693         else if (m_elementManager.IsDataIndexRealized(sizedItemIndex))
04694         {
04695             if (const auto element = m_elementManager.GetRealizedElement(sizedItemIndex /*dataIndex*/))
04696             {
04697                 cumulatedArrangeWidth += element.DesiredSize().Width;
04698             }
04699         }
04700     }
04701
04702     return cumulatedArrangeWidth;
04703 }
04704
04705 // Uses the m_lineItemCounts vector to return the index of the last item in the provided line index.
04706 int LinedFlowLayout::GetLastItemIndexInLineIndex(
04707     int lineVectorIndex) const
04708 {
04709     MUX_ASSERT(lineVectorIndex >= 0);
04710     MUX_ASSERT(lineVectorIndex < static_cast<int>(m_lineItemCounts.size()));
04711
04712     int firstItemIndexInLineIndex = GetFirstItemIndexInLineIndex(lineVectorIndex);
04713
04714     return firstItemIndexInLineIndex + m_lineItemCounts[lineVectorIndex] - 1;
04715 }
04716
04717 int LinedFlowLayout::GetLineCount(
04718     double averageItemsPerLine) const
04719 {
04720     if (m_itemCount == 0)
04721     {
04722         return 0;
04723     }
04724
04725     MUX_ASSERT(m_itemCount > 0);
04726
04727     const int lineCount = GetLineIndexFromAverageItemsPerLine(m_itemCount - 1, averageItemsPerLine) + 1;
04728
04729 #ifdef DBG_VERBOSE
04730     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, lineCount);
04731 #endif
04732
04733     return lineCount;
04734 }
04735
04736 // Returns the line index for the provided item index.
04737 int LinedFlowLayout::GetLineIndex(
04738     int itemIndex,
04739     bool usesFastPathLayout) const
04740 {
04741     MUX_ASSERT(m_isVirtualizingContext);
04742     MUX_ASSERT(itemIndex >= 0);
04743     MUX_ASSERT(itemIndex < m_itemCount);
04744
04745     if (itemIndex == 0)
04746     {
04747         // May occur while m_averageItemsPerLine.second is still 0.
04748         return 0;
04749     }
04750
04751     int lineIndex = 0;
04752
04753     if (usesFastPathLayout)
04754     {
04755         int lineItemCounts{};
04756
04757         while (lineItemCounts + m_lineItemCounts[lineIndex] <= itemIndex)
04758         {
04759             lineItemCounts += m_lineItemCounts[lineIndex];
04760             lineIndex++;
04761         }
04762     }
04763     else
04764     {
04765         MUX_ASSERT(m_averageItemsPerLine.second >= 1.0);
04766
04767         const auto& lockedItemIterator = m_lockedItemIndexes.find(itemIndex);
04768
04769         // Determine the element's line index depending on its locked status.
04770         if (lockedItemIterator != m_lockedItemIndexes.end())
04771         {
04772             // Since the item is locked, use the line index it's locked on.
04773             lineIndex = lockedItemIterator->second;
04774         }
04775         else
04776         {
04777             int sizedItemIndex = m_firstSizedItemIndex;
04778             const int sizedItemCount = m_lastSizedItemIndex - m_firstSizedItemIndex + 1;
04779             const int sizedLineVectorCount = static_cast<int>(m_lineItemCounts.size());
04780
04781             // If the item is sized, use its sized line index.
04782             if (sizedItemIndex != -1 &&
04783                 itemIndex >= sizedItemIndex &&
04784                 itemIndex < sizedItemIndex + sizedItemCount &&
04785                 m_lastSizedLineIndex - m_firstSizedLineIndex + 1 == sizedLineVectorCount)
04786             {
04787                 MUX_ASSERT(m_firstSizedLineIndex >= 0);
04788
04789                 int sizedLineVectorIndex = 0;
04790
04791                 while (sizedItemIndex + m_lineItemCounts[sizedLineVectorIndex] - 1 < itemIndex)
04792                 {
04793                     sizedItemIndex += m_lineItemCounts[sizedLineVectorIndex];
04794                     sizedLineVectorIndex++;
04795
04796                     MUX_ASSERT(sizedLineVectorIndex < sizedLineVectorCount);
04797                 }
04798
04799                 lineIndex = m_firstSizedLineIndex + sizedLineVectorIndex;
04800             }
04801             else
04802             {
04803                 // As a last resort, use the estimated line index based on the average items per line.
04804                 lineIndex = GetLineIndexFromAverageItemsPerLine(itemIndex, m_averageItemsPerLine.second);
04805             }
04806         }
04807     }
04808
04809     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, L"lineIndex", lineIndex);
04810     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, L"itemIndex", itemIndex);
04811
04812     return lineIndex;
04813 }
04814
04815 int LinedFlowLayout::GetLineIndexFromAverageItemsPerLine(
04816     int itemIndex,
04817     double averageItemsPerLine) const
04818 {
04819     MUX_ASSERT(averageItemsPerLine >= 1.0);
04820
04821     const int lineIndex = static_cast<int>(itemIndex / averageItemsPerLine);
04822
04823     return lineIndex;
04824 }
04825
04826 // Returns the largest line width for a range of lines.
04827 // When item sizing info is used, that range is the sized lines.
04828 // Otherwise it's the frozen lines only.
04829 float LinedFlowLayout::GetLinesDesiredWidth()
04830 {
04831     if (m_firstFrozenLineIndex == -1)
04832     {
04833         // This occurs when GetFirstAndLastDisplayedLineIndexes returns firstDisplayedLineIndex==-1
04834         // because the scrollViewport is still 0.0 for example.
04835         return 0.0;
04836     }
04837
04838     MUX_ASSERT(m_firstSizedLineIndex >= 0);
04839     MUX_ASSERT(m_lastSizedLineIndex >= m_firstSizedLineIndex);
04840     MUX_ASSERT(m_firstSizedItemIndex >= 0);
04841     MUX_ASSERT(m_lastSizedItemIndex >= m_firstSizedItemIndex);
04842     MUX_ASSERT(m_firstFrozenLineIndex >= 0);
04843     MUX_ASSERT(m_lastFrozenLineIndex >= m_firstFrozenLineIndex);
04844     MUX_ASSERT(m_firstFrozenItemIndex >= 0);
04845     MUX_ASSERT(m_lastFrozenItemIndex >= m_firstFrozenItemIndex);
04846
04847     const bool usesArrangeWidthInfo = UsesArrangeWidthInfo();
04848     const float minItemSpacing = static_cast<float>(MinItemSpacing());
04849     const int firstLineIndex = usesArrangeWidthInfo ? m_firstSizedLineIndex : m_firstFrozenLineIndex;
04850     const int lastLineIndex = usesArrangeWidthInfo ? m_lastSizedLineIndex : m_lastFrozenLineIndex;
04851     int itemIndex = usesArrangeWidthInfo ? m_firstSizedItemIndex : m_firstFrozenItemIndex;
04852     float maxLineWidth{};
04853
04854     MUX_ASSERT(!usesArrangeWidthInfo || m_itemsInfoFirstIndex >= 0);
04855
04856     for (int lineIndex = firstLineIndex; lineIndex <= lastLineIndex; lineIndex++)
04857     {
04858         const int lineItemsCount = m_lineItemCounts[static_cast<size_t>(lineIndex) - m_firstSizedLineIndex];
04859         float lineWidth{};
04860
04861         for (int lineItemIndex = 0; lineItemIndex < lineItemsCount; lineItemIndex++)
04862         {
04863             float itemWidth{};
04864
04865             if (usesArrangeWidthInfo)
04866             {
04867                 itemWidth = m_itemsInfoArrangeWidths[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex];
04868             }
04869             else
04870             {
04871                 MUX_ASSERT(m_elementManager.IsDataIndexRealized(itemIndex));
04872
04873                 if (const auto element = m_elementManager.GetRealizedElement(itemIndex))
04874                 {
04875                     itemWidth = element.DesiredSize().Width;
04876                 }
04877             }
04878
04879             if (lineItemIndex > 0)
04880             {
04881                 lineWidth += minItemSpacing;
04882             }
04883
04884             lineWidth += itemWidth;
04885
04886             itemIndex++;
04887         }
04888
04889         maxLineWidth = std::max(lineWidth, maxLineWidth);
04890     }
04891
04892     return maxLineWidth;
04893 }
04894
04895 double LinedFlowLayout::GetMaxWidthFromItemsInfo(
04896     int itemIndex) const
04897 {
04898     MUX_ASSERT(itemIndex >= 0);
04899     MUX_ASSERT(itemIndex < m_itemCount);
04900     MUX_ASSERT(m_itemsInfoMaxWidth >= 0.0 || m_itemsInfoMaxWidth == -1.0);
04901
04902     if (UsesFastPathLayout())
04903     {
04904         // Fast path layout
04905         if (itemIndex < static_cast<int>(m_itemsInfoMaxWidthsForFastPath.size()))
04906         {
04907             return std::min(m_itemsInfoMaxWidth, m_itemsInfoMaxWidthsForFastPath[itemIndex]);
04908         }
04909     }
04910     else
04911     {
04912         // Regular path layout
04913         if (itemIndex - m_itemsInfoFirstIndex >= 0 &&
04914             itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoMaxWidthsForRegularPath.size()))
04915         {
04916             return std::min(m_itemsInfoMaxWidth, m_itemsInfoMaxWidthsForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex]);
04917         }
04918     }
04919
04920     return m_itemsInfoMaxWidth;
04921 }
04922
04923 double LinedFlowLayout::GetMinWidthFromItemsInfo(
04924     int itemIndex) const
04925 {
04926     MUX_ASSERT(itemIndex >= 0);
04927     MUX_ASSERT(itemIndex < m_itemCount);
04928     MUX_ASSERT(m_itemsInfoMinWidth >= 0.0 || m_itemsInfoMinWidth == -1.0);
04929
04930     if (UsesFastPathLayout())
04931     {
04932         // Fast path layout
04933         if (itemIndex < static_cast<int>(m_itemsInfoMinWidthsForFastPath.size()))
04934         {
04935             return std::max(m_itemsInfoMinWidth, m_itemsInfoMinWidthsForFastPath[itemIndex]);
04936         }
04937     }
04938     else
04939     {
04940         // Regular path layout
04941         if (itemIndex - m_itemsInfoFirstIndex >= 0 &&
04942             itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoMinWidthsForRegularPath.size()))
04943         {
04944             return std::max(m_itemsInfoMinWidth, m_itemsInfoMinWidthsForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex]);
04945         }
04946     }
04947
04948     return m_itemsInfoMinWidth;
04949 }
04950
04951 void LinedFlowLayout::GetNextLockedItem(
04952     std::map<int, int>* internalLockedItemIndexes,
04953     bool forward,
04954     int beginLineIndex,
04955     int endLineIndex,
04956     int itemIndex,
04957     int* lockedItemIndex,
04958     int* lockedLineIndex) const
04959 {
04960     *lockedItemIndex = *lockedLineIndex = -1;
04961
04962     int distance = std::numeric_limits<int>::max();
04963
04964     if (internalLockedItemIndexes != nullptr)
04965     {
04966         for (const auto& lockedItemIterator : *internalLockedItemIndexes)
04967         {
04968             if (forward &&
04969                 lockedItemIterator.first > itemIndex &&
04970                 lockedItemIterator.first - itemIndex < distance &&
04971                 lockedItemIterator.second >= beginLineIndex &&
04972                 lockedItemIterator.second <= endLineIndex)
04973             {
04974                 distance = lockedItemIterator.first - itemIndex;
04975                 *lockedItemIndex = lockedItemIterator.first;
04976                 *lockedLineIndex = lockedItemIterator.second;
04977             }
04978             else if (!forward &&
04979                 lockedItemIterator.first < itemIndex &&
04980                 itemIndex - lockedItemIterator.first < distance &&
04981                 lockedItemIterator.second <= beginLineIndex &&
04982                 lockedItemIterator.second >= endLineIndex)
04983             {
04984                 distance = itemIndex - lockedItemIterator.first;
04985                 *lockedItemIndex = lockedItemIterator.first;
04986                 *lockedLineIndex = lockedItemIterator.second;
04987             }
04988         }
04989     }
04990
04991     for (const auto& lockedItemIterator : m_lockedItemIndexes)
04992     {
04993         if (forward &&
04994             lockedItemIterator.first > itemIndex &&
04995             lockedItemIterator.first - itemIndex < distance &&
04996             lockedItemIterator.second >= beginLineIndex &&
04997             lockedItemIterator.second <= endLineIndex)
04998         {
04999             distance = lockedItemIterator.first - itemIndex;
05000             *lockedItemIndex = lockedItemIterator.first;
05001             *lockedLineIndex = lockedItemIterator.second;
05002         }
05003         else if (!forward &&
05004             lockedItemIterator.first < itemIndex &&
05005             itemIndex - lockedItemIterator.first < distance &&
05006             lockedItemIterator.second <= beginLineIndex &&
05007             lockedItemIterator.second >= endLineIndex)
05008         {
05009             distance = itemIndex - lockedItemIterator.first;
05010             *lockedItemIndex = lockedItemIterator.first;
05011             *lockedLineIndex = lockedItemIterator.second;
05012         }
05013     }
05014 }
05015
05016 float LinedFlowLayout::GetRealizationRectHeightDeficit(
05017     winrt::VirtualizingLayoutContext const& context,
05018     double actualLineHeight,
05019     double lineSpacing) const
05020 {
05021     // This layout performs poorly when there are less than 20 lines to operate with in 5 scroll viewports.
05022     // The target realization height is at least 3 viewports and 12 lines, assuming that 2 more viewports worth
05023     // of unrealized sized items are used via the ItemsInfoRequested event. Otherwise the realization rect falls back to 5 viewports.
05024     constexpr float minimumCacheLength = 2.0f;
05025     constexpr float minimumCacheLineCount = 4.0f; // At least 4 x (minimumCacheLength + 1) = 12 lines worth of items.
05026     const float realizationRectHeight = context.RealizationRect().Height;
05027     const float nearRealizationRect = GetRoundedFloat(context.RealizationRect().Y);
05028     const float lineHeight = static_cast<float>(actualLineHeight + lineSpacing);
05029     const float scrollViewport = context.VisibleRect().Height;
05030
05031     // Ensure there is a viewport buffer before and after the visible viewport.
05032     float realizationRectHeightDeficit = std::max(0.0f, (minimumCacheLength + 1.0f) * scrollViewport - realizationRectHeight);
05033
05034     // Ensure there are 12 lines in the resulting 3 viewports.
05035     realizationRectHeightDeficit = std::max(realizationRectHeightDeficit, (minimumCacheLength + 1.0f) * minimumCacheLineCount * lineHeight - realizationRectHeight);
05036
05037     MUX_ASSERT(realizationRectHeightDeficit >= 0.0);
05038
05039     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_FLT, METH_NAME, this, realizationRectHeightDeficit);
05040
05041     return realizationRectHeightDeficit;
05042 }
05043
05044 // Returns the range of realized items given a larger range of sized items.
05045 void LinedFlowLayout::GetRealizedItemsFromSizedItems(
05046     int realizedLineCount,
05047     int lineCount,
05048     int* unrealizedNearItemCount,
05049     int* realizedItemCount) const
05050 {
05051     int unrealizedNearItemCountTmp = static_cast<int>(std::round(m_unrealizedNearLineCount * m_averageItemsPerLine.second));
05052
05053     unrealizedNearItemCountTmp = std::min(m_itemCount - 1, unrealizedNearItemCountTmp);
05054     unrealizedNearItemCountTmp = std::max(m_unrealizedNearLineCount, unrealizedNearItemCountTmp);
05055     unrealizedNearItemCountTmp = std::max(m_firstSizedItemIndex, unrealizedNearItemCountTmp);
05056
05057     int realizedItemCountTmp{};
05058
05059     if (m_unrealizedNearLineCount + realizedLineCount == lineCount)
05060     {
05061         realizedItemCountTmp = m_itemCount - unrealizedNearItemCountTmp;
05062     }
05063     else
05064     {
05065         realizedItemCountTmp = static_cast<int>(std::round(realizedLineCount * m_averageItemsPerLine.second));
05066     }
05067
05068     realizedItemCountTmp = std::max(1, realizedItemCountTmp);
05069     realizedItemCountTmp = std::max(realizedLineCount, realizedItemCountTmp);
05070     realizedItemCountTmp = std::min(m_lastSizedItemIndex - unrealizedNearItemCountTmp + 1, realizedItemCountTmp);
05071
05072     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unrealizedNearItemCount", unrealizedNearItemCountTmp);
05073     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"realizedItemCount", realizedItemCountTmp);
05074     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"realized item index range", unrealizedNearItemCountTmp, unrealizedNearItemCountTmp + realizedItemCountTmp - 1);
05075
05076     MUX_ASSERT(unrealizedNearItemCountTmp < m_itemCount);
05077     MUX_ASSERT(unrealizedNearItemCountTmp >= m_unrealizedNearLineCount);
05078     MUX_ASSERT((m_unrealizedNearLineCount == 0 && unrealizedNearItemCountTmp == 0) || (m_unrealizedNearLineCount > 0 && unrealizedNearItemCountTmp > 0));
05079     MUX_ASSERT(realizedItemCountTmp > 0);
05080     MUX_ASSERT(realizedItemCountTmp >= realizedLineCount);
05081     MUX_ASSERT(unrealizedNearItemCountTmp + realizedItemCountTmp <= m_itemCount);
05082
05083     *unrealizedNearItemCount = unrealizedNearItemCountTmp;
05084     *realizedItemCount = realizedItemCountTmp;
05085 }
05086
05087 float LinedFlowLayout::GetSizedItemsRectHeight(
05088     winrt::VirtualizingLayoutContext const& context,
05089     double actualLineHeight,
05090     double lineSpacing) const
05091 {
05092     // This layout performs poorly when there are less than 20 lines to operate with in 5 scroll viewports.
05093     // The target rect height for the realized + unrealized sized items is at least 5 viewports and 20 lines.
05094     constexpr float minimumCacheLength = 4.0f;
05095     constexpr float minimumCacheLineCount = 4.0f;
05096
05097     // Ensure there are 4 buffer viewports before and after the visible viewport.
05098     const float sizedItemsRectHeight = (minimumCacheLength + 1.0f) * context.VisibleRect().Height;
05099
05100     // Ensure there are 20 lines in the resulting 5 viewports.
05101     return std::max(sizedItemsRectHeight, (minimumCacheLength + 1.0f) * minimumCacheLineCount * static_cast<float>(actualLineHeight + lineSpacing));
05102 }
05103
05104 double LinedFlowLayout::GetRoundedDouble(
05105     double value) const
05106 {
05107     return std::round(value * m_roundingScaleFactor) / m_roundingScaleFactor;
05108 }
05109
05110 float LinedFlowLayout::GetRoundedFloat(
05111     float value) const
05112 {
05113     return static_cast<float>(std::round(value * m_roundingScaleFactor) / m_roundingScaleFactor);
05114 }
05115
05116 void LinedFlowLayout::InitializeForRelayout(
05117     int sizedLineCount,
05118     int& firstStillSizedLineIndex,
05119     int& lastStillSizedLineIndex,
05120     int& firstStillSizedItemIndex,
05121     int& lastStillSizedItemIndex)
05122 {
05123     EnsureLineItemCounts(sizedLineCount);
05124
05125     firstStillSizedLineIndex = -1;
05126     lastStillSizedLineIndex = -1;
05127     firstStillSizedItemIndex = -1;
05128     lastStillSizedItemIndex = -1;
05129 }
05130
05131 // Causes potential items info to be discarded and triggers a complete re-layout so that
05132 // the ItemsInfoRequested event gets raised again to retrieve updated sizing information.
05133 void LinedFlowLayout::InvalidateItemsInfo()
05134 {
05135     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
05136
05137     InvalidateLayout(true /*forceRelayout*/, true /*resetItemsInfo*/, true /*invalidateMeasure*/);
05138 }
05139
05140 // - forceRelayout == True:     forces a re-layout in the next measure pass.
05141 // - resetItemsInfo == True:    resets the items info gathered so far.
05142 // - invalidateMeasure == True: triggers a new measure pass.
05143 void LinedFlowLayout::InvalidateLayout(
05144     bool forceRelayout,
05145     bool resetItemsInfo,
05146     bool invalidateMeasure)
05147 {
05148     MUX_ASSERT(forceRelayout || resetItemsInfo || invalidateMeasure);
05149
05150     if (forceRelayout)
05151     {
05152         // Perform a complete re-layout during the next layout pass.
05153         NotifyLinedFlowLayoutInvalidatedDbg(winrt::LinedFlowLayoutInvalidationTrigger::InvalidateLayoutCall);
05154         m_forceRelayout = true;
05155     }
05156
05157     if (resetItemsInfo)
05158     {
05159         // Discard any potential item sizing info previously collected through the ItemsInfoRequested event.
05160         ResetItemsInfo();
05161     }
05162
05163     if (invalidateMeasure)
05164     {
05165         // Trigger a new layout pass.
05166         __super::InvalidateMeasure();
05167     }
05168 }
05169
05170 // Invokes InvalidateLayout asynchronously with only invalidateMeasure == True to trigger a new measure pass.
05171 void LinedFlowLayout::InvalidateMeasureAsync()
05172 {
05173     auto weakThis = get_weak();
05174
05175     m_dispatcherQueue.TryEnqueue(winrt::DispatcherQueueHandler(
05176         [weakThis]()
05177     {
05178         if (winrt::WindowsXamlManager::GetForCurrentThread() == nullptr)
05179         {
05180             // Exit early if Xaml core has already shut down.
05181             return;
05182         }
05183
05184         if (auto strongThis = weakThis.get())
05185         {
05186             strongThis->InvalidateLayout(false /*forceRelayout*/, false /*resetItemsInfo*/, true /*invalidateMeasure*/);
05187         }
05188     }));
05189 }
05190
05191 // Starts the timer used to trigger an asynchronous measure pass when no items info was provided by the ItemsInfoRequested
05192 // event. Invoked after an item was realized or when the timer expires and the tickCount is still smaller than 7.
05193 // The timer interval begins at 100ms and is then increased by 50% each time it is re-started, until tickCount reaches 7.
05194 // By then the interval is 1.7s and the total time elapsed is about 5s when the timer is no longer re-started.
05195 // Asynchronous measure passes are triggered to check if the ItemsRepeater's children have a new desired size.
05196 // This is done because when a child is re-measured because its content changed, the Xaml layout engine uses its previous
05197 // available size, preventing the ItemsRepeater from being re-measured. The use of LinedFlowLayout::ItemRangesHaveNewDesiredWidths
05198 // in the asynchronous measure pass will ensure that new desired widths for the frozen items will trigger a full re-layout.
05199 void LinedFlowLayout::InvalidateMeasureTimerStart(
05200     int tickCount)
05201 {
05202     MUX_ASSERT(!UsesArrangeWidthInfo());
05203
05204     if (m_invalidateMeasureTimer)
05205     {
05206         if (m_invalidateMeasureTimer.IsEnabled())
05207         {
05208             m_invalidateMeasureTimer.Stop();
05209         }
05210     }
05211     else
05212     {
05213         m_invalidateMeasureTimer = winrt::DispatcherTimer();
05214
05215         m_invalidateMeasureTimer.Tick({ this, &LinedFlowLayout::InvalidateMeasureTimerTick });
05216     }
05217
05218     m_invalidateMeasureTimerTickCount = tickCount;
05219
05220     constexpr double timerFactor = 1.5;
05221     const double timerMultiplier = std::pow(timerFactor, tickCount);
05222
05223     constexpr int64_t timerBase = 1000000; // 100ms
05224     const int64_t timerInterval = static_cast<int64_t>(timerBase * timerMultiplier);
05225
05226     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"tickCount", tickCount);
05227     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"timerInterval", timerInterval);
05228
05229     m_invalidateMeasureTimer.Interval(winrt::TimeSpan::duration(timerInterval));
05230     m_invalidateMeasureTimer.Start();
05231 }
05232
05233 // Stops the timer used to trigger an asynchronous measure pass when no items info was provided by the ItemsInfoRequested event.
05234 void LinedFlowLayout::InvalidateMeasureTimerStop(bool isForDestructor)
05235 {
05236     if (isForDestructor)
05237     {
05238         LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
05239     }
05240     else
05241     {
05242         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
05243     }
05244
05245     if (m_invalidateMeasureTimer && m_invalidateMeasureTimer.IsEnabled())
05246     {
05247         m_invalidateMeasureTimer.Stop();
05248     }
05249 }
05250
05251 // Invoked when the timer used to trigger asynchronous measure passes expires.
05252 // Re-starts it with a longer interval until m_invalidateMeasureTimerTickCount
05253 // reaches the value 7, for a total of 8 invalidations.
05254 void LinedFlowLayout::InvalidateMeasureTimerTick(
05255     winrt::IInspectable const& /*sender*/,
05256     winrt::IInspectable const& /*args*/)
05257 {
05258     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
05259
05260     InvalidateMeasureAsync();
05261
05262     // The asynchronous measure pass is triggered 8 times to check if the ItemsRepeater's children
05263     // have a new desired size. This is done because when a child is re-measured because its content changed,
05264     // the Xaml layout engine uses its previous available size, preventing the ItemsRepeater from being re-measured.
05265     constexpr int maxInvalidateMeasureTimerTickCount = 7;
05266
05267     if (!UsesArrangeWidthInfo() && m_invalidateMeasureTimerTickCount < maxInvalidateMeasureTimerTickCount)
05268     {
05269         InvalidateMeasureTimerStart(m_invalidateMeasureTimerTickCount + 1);
05270     }
05271     else
05272     {
05273         InvalidateMeasureTimerStop(false /*isForDestructor*/);
05274     }
05275 }
05276
05277 // Determines whether using a smaller adjustedAvailableWidth may lead to an ItemsLayout with a smaller drawback.
05278 bool LinedFlowLayout::IsItemsLayoutContractionWorthy(
05279     ItemsLayout const& itemsLayout)
05280 {
05281     if (itemsLayout.m_smallestTailItemWidth == std::numeric_limits<double>::max() || itemsLayout.m_smallestTailItemWidth == 0.0)
05282     {
05283         return false;
05284     }
05285
05286     const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());
05287
05288     if (sizedLineCount > 1)
05289     {
05290         for (int lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
05291         {
05292             if (itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
05293             {
05294                 return true;
05295             }
05296         }
05297     }
05298
05299     return false;
05300 }
05301
05302 bool LinedFlowLayout::IsItemsLayoutEqualizationWorthy(
05303     ItemsLayout const& itemsLayout,
05304     bool withHeadItem)
05305 {
05306     if ((withHeadItem && itemsLayout.m_bestEqualizingHeadItemIndex == std::numeric_limits<int>::max()) ||
05307         (!withHeadItem && itemsLayout.m_bestEqualizingTailItemIndex == std::numeric_limits<int>::max()))
05308     {
05309         return false;
05310     }
05311
05312     const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());
05313
05314     if (sizedLineCount > 1)
05315     {
05316         for (int lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
05317         {
05318             if (itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
05319             {
05320                 return true;
05321             }
05322         }
05323     }
05324
05325     return false;
05326 }
05327
05328 // Determines whether using a larger adjustedAvailableWidth may lead to an ItemsLayout with a smaller drawback.
05329 bool LinedFlowLayout::IsItemsLayoutExpansionWorthy(
05330     ItemsLayout const& itemsLayout)
05331 {
05332     if (itemsLayout.m_smallestHeadItemWidth == std::numeric_limits<double>::max() || itemsLayout.m_smallestHeadItemWidth == 0.0)
05333     {
05334         return false;
05335     }
05336
05337     const int sizedLineCount = static_cast<int>(itemsLayout.m_lineItemWidths.size());
05338     bool isExpansionWorthy = false;
05339
05340     if (sizedLineCount > 1)
05341     {
05342         for (int lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
05343         {
05344             if (itemsLayout.m_lineItemCounts[lineVectorIndex] > 1)
05345             {
05346                 isExpansionWorthy = true;
05347                 break;
05348             }
05349         }
05350     }
05351
05352     if (isExpansionWorthy)
05353     {
05354         int lineVectorIndex;
05355
05356         for (lineVectorIndex = 0; lineVectorIndex < sizedLineCount; lineVectorIndex++)
05357         {
05358             if (itemsLayout.m_lineItemWidths[lineVectorIndex] > itemsLayout.m_availableLineItemsWidth)
05359             {
05360                 break;
05361             }
05362         }
05363
05364         isExpansionWorthy = lineVectorIndex < sizedLineCount;
05365     }
05366
05367     MUX_ASSERT(!isExpansionWorthy || itemsLayout.m_smallestHeadItemWidth > 0);
05368
05369     return isExpansionWorthy;
05370 }
05371
05372 // Returns True when 'itemIndex' is locked in a line within the [beginLineIndex, endLineIndex] range.
05373 bool LinedFlowLayout::IsLockedItem(
05374     bool forward,
05375     int beginLineIndex,
05376     int endLineIndex,
05377     int itemIndex)
05378 {
05379     const auto& lockedItemIterator = m_lockedItemIndexes.find(itemIndex);
05380
05381     if (lockedItemIterator != m_lockedItemIndexes.end())
05382     {
05383         const int lineIndex = lockedItemIterator->second;
05384
05385         if (forward)
05386         {
05387             if (lineIndex >= beginLineIndex && lineIndex <= endLineIndex)
05388             {
05389                 return true;
05390             }
05391         }
05392         else
05393         {
05394             if (lineIndex <= beginLineIndex && lineIndex >= endLineIndex)
05395             {
05396                 return true;
05397             }
05398         }
05399     }
05400
05401     return false;
05402 }
05403
05404 bool LinedFlowLayout::IsVirtualizingContext(
05405     winrt::VirtualizingLayoutContext const& context) const
05406 {
05407     if (context)
05408     {
05409         const auto rect = context.RealizationRect();
05410         const bool hasInfiniteSize = (rect.Height == std::numeric_limits<float>::infinity() || rect.Width == std::numeric_limits<float>::infinity());
05411         return !hasInfiniteSize;
05412     }
05413     return false;
05414 }
05415
05416 bool LinedFlowLayout::LineHasInternalLockedItem(
05417     std::map<int, int> const& internalLockedItemIndexes,
05418     int lineIndex,
05419     bool before,
05420     int itemIndex) const
05421 {
05422     for (const auto& lockedItemIterator : internalLockedItemIndexes)
05423     {
05424         if (lockedItemIterator.second == lineIndex)
05425         {
05426             const int lockedItemIndex = lockedItemIterator.first;
05427
05428             if ((before && lockedItemIndex <= itemIndex) || (!before && lockedItemIndex >= itemIndex))
05429             {
05430                 return true;
05431             }
05432         }
05433     }
05434
05435     return false;
05436 }
05437
05438 bool LinedFlowLayout::LineHasLockedItem(
05439     int lineIndex,
05440     bool before,
05441     int itemIndex)
05442 {
05443     for (const auto& lockedItemIterator : m_lockedItemIndexes)
05444     {
05445         if (lockedItemIterator.second == lineIndex)
05446         {
05447             const int lockedItemIndex = lockedItemIterator.first;
05448
05449             if ((before && lockedItemIndex <= itemIndex) || (!before && lockedItemIndex >= itemIndex))
05450             {
05451                 return true;
05452             }
05453         }
05454     }
05455
05456     return false;
05457 }
05458
05459 // Returns a boolean triplet covering 3 adjacent item ranges: items preceding the frozen ones, the frozen items, and finally the items following the frozen ones.
05460 // A True value is returned either when an item is recorded in m_elementDesiredWidths and not in oldElementDesiredWidths because of fast scrolling, or
05461 // m_elementDesiredWidths & oldElementDesiredWidths have an item with different widths.
05462 std::tuple<bool, bool, bool> LinedFlowLayout::ItemRangesHaveNewDesiredWidths(
05463     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementDesiredWidths,
05464     int beginRealizedItemIndex,
05465     int endRealizedItemIndex)
05466 {
05467     MUX_ASSERT(m_itemsInfoFirstIndex == -1);
05468     MUX_ASSERT(m_elementDesiredWidths);
05469     MUX_ASSERT(oldElementDesiredWidths);
05470     MUX_ASSERT(beginRealizedItemIndex <= endRealizedItemIndex);
05471     MUX_ASSERT(beginRealizedItemIndex <= m_firstFrozenItemIndex);
05472     MUX_ASSERT(endRealizedItemIndex >= m_lastFrozenItemIndex);
05473
05474     bool preFrozenItemHasNewDesiredWidth = false;
05475     bool frozenItemHasNewDesiredWidth = false;
05476
05477     for (int itemIndex = beginRealizedItemIndex; itemIndex <= endRealizedItemIndex; itemIndex++)
05478     {
05479         if (m_elementManager.IsDataIndexRealized(itemIndex))
05480         {
05481             if (const auto element = m_elementManager.GetRealizedElement(itemIndex /*dataIndex*/))
05482             {
05483                 const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
05484                 const bool hasNewDesiredWidth = m_elementDesiredWidths->find(elementTracker) != m_elementDesiredWidths->end();
05485
05486                 if (hasNewDesiredWidth)
05487                 {
05488                     const bool hasOldDesiredWidth = oldElementDesiredWidths->find(elementTracker) != oldElementDesiredWidths->end();
05489                     const float newDesiredWidth = m_elementDesiredWidths->at(elementTracker);
05490                     bool desiredWidthChanged = false;
05491
05492                     MUX_ASSERT(element.DesiredSize().Width == newDesiredWidth);
05493
05494                     if (hasOldDesiredWidth)
05495                     {
05496                         const float oldDesiredWidth = oldElementDesiredWidths->at(elementTracker);
05497
05498                         desiredWidthChanged = oldDesiredWidth != newDesiredWidth;
05499
05500 #ifdef DBG
05501                         if (desiredWidthChanged)
05502                         {
05503                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
05504                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);
05505                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"index causing relayout for changed desired size", itemIndex);
05506                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"oldDesiredWidth", oldDesiredWidth);
05507                         }
05508                         else if (itemIndex == m_logItemIndexDbg)
05509                         {
05510                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
05511                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);
05512                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
05513                             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"oldDesiredWidth", oldDesiredWidth);
05514                         }
05515 #endif
05516                     }
05517 #ifdef DBG
05518                     else
05519                     {
05520                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"index causing relayout for new desired size", itemIndex);
05521                     }
05522 #endif
05523
05524                     if (desiredWidthChanged || !hasOldDesiredWidth)
05525                     {
05526                         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"newDesiredWidth", newDesiredWidth);
05527
05528                         NotifyLinedFlowLayoutInvalidatedDbg(winrt::LinedFlowLayoutInvalidationTrigger::ItemDesiredWidthChange);
05529
05530                         if (itemIndex < m_firstFrozenItemIndex)
05531                         {
05532                             MUX_ASSERT(!preFrozenItemHasNewDesiredWidth);
05533
05534                             preFrozenItemHasNewDesiredWidth = true;
05535
05536                             // Now that preFrozenItemHasNewDesiredWidth was set for the initial unfrozen items range, skip the remaining initial unfrozen items after itemIndex.
05537                             itemIndex = m_firstFrozenItemIndex - 1;
05538                         }
05539                         else if (itemIndex <= m_lastFrozenItemIndex)
05540                         {
05541                             MUX_ASSERT(!frozenItemHasNewDesiredWidth);
05542
05543                             frozenItemHasNewDesiredWidth = true;
05544
05545                             // Now that frozenItemHasNewDesiredWidth was set for the frozen items range, skip the remaining frozen items after itemIndex.
05546                             itemIndex = m_lastFrozenItemIndex;
05547                         }
05548                         else
05549                         {
05550 #ifdef DBG
05551                             if (preFrozenItemHasNewDesiredWidth)
05552                             {
05553                                 if (frozenItemHasNewDesiredWidth)
05554                                 {
05555                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, true, true>");
05556                                 }
05557                                 else
05558                                 {
05559                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, false, true>");
05560                                 }
05561                             }
05562                             else
05563                             {
05564                                 if (frozenItemHasNewDesiredWidth)
05565                                 {
05566                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, true, true>");
05567                                 }
05568                                 else
05569                                 {
05570                                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, false, true>");
05571                                 }
05572                             }
05573 #endif
05574                             return std::tuple<bool, bool, bool>(preFrozenItemHasNewDesiredWidth, frozenItemHasNewDesiredWidth, true /*postFrozenItemHasNewDesiredWidth*/);
05575                         }
05576                     }
05577 #ifdef DBG
05578                     else if (itemIndex == m_logItemIndexDbg)
05579                     {
05580                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
05581                         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"newDesiredWidth", newDesiredWidth);
05582                     }
05583 #endif
05584                 }
05585             }
05586         }
05587     }
05588
05589 #ifdef DBG
05590     if (preFrozenItemHasNewDesiredWidth)
05591     {
05592         if (frozenItemHasNewDesiredWidth)
05593         {
05594             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, true, false>");
05595         }
05596         else
05597         {
05598             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <true, false, false>");
05599         }
05600     }
05601     else
05602     {
05603         if (frozenItemHasNewDesiredWidth)
05604         {
05605             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, true, false>");
05606         }
05607         else
05608         {
05609             LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"returns <false, false, false>");
05610         }
05611     }
05612 #endif
05613
05614     return std::tuple<bool, bool, bool>(preFrozenItemHasNewDesiredWidth, frozenItemHasNewDesiredWidth, false /*postFrozenItemHasNewDesiredWidth*/);
05615 }
05616
05617 int LinedFlowLayout::LineItemsCountTotal(
05618     int expectedTotal)
05619 {
05620     int sizedItemCount = 0;
05621
05622     for (const int lineItemsCount : m_lineItemCounts)
05623     {
05624         sizedItemCount += lineItemsCount;
05625     }
05626
05627     MUX_ASSERT(expectedTotal == 0 || sizedItemCount == expectedTotal);
05628
05629     return sizedItemCount;
05630 }
05631
05632 bool LinedFlowLayout::LockItemToLineInternal(
05633     std::map<int, int>& internalLockedItemIndexes,
05634     int beginSizedLineIndex,
05635     int endSizedLineIndex,
05636     int beginSizedItemIndex,
05637     int endSizedItemIndex,
05638     int lineIndex,
05639     int itemIndex)
05640 {
05641     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, lineIndex, itemIndex);
05642
05643     MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
05644     MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
05645     MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));
05646
05647     if (lineIndex > itemIndex)
05648     {
05649         return false;
05650     }
05651
05652     MUX_ASSERT(lineIndex <= itemIndex);
05653
05654     const int lineCount = GetLineCount(m_averageItemsPerLine.second);
05655
05656     MUX_ASSERT(lineCount > 0);
05657     MUX_ASSERT(lineIndex < lineCount);
05658
05659     if (lineCount - lineIndex > m_itemCount - itemIndex)
05660     {
05661         return false;
05662     }
05663
05664     if (std::abs(beginSizedLineIndex - lineIndex) > std::abs(beginSizedItemIndex - itemIndex))
05665     {
05666         return false;
05667     }
05668
05669     if (std::abs(endSizedLineIndex - lineIndex) > std::abs(endSizedItemIndex - itemIndex))
05670     {
05671         return false;
05672     }
05673
05674     int beforeLockedItemIndex, beforeLockedLineIndex, afterLockedItemIndex, afterLockedLineIndex;
05675
05676     GetNextLockedItem(
05677         &internalLockedItemIndexes,
05678         false /*forward*/,
05679         lineCount - 1 /*beginLineIndex*/,
05680         0 /*endLineIndex*/,
05681         itemIndex,
05682         &beforeLockedItemIndex,
05683         &beforeLockedLineIndex);
05684
05685     GetNextLockedItem(
05686         &internalLockedItemIndexes,
05687         true /*forward*/,
05688         0 /*beginLineIndex*/,
05689         lineCount - 1 /*endLineIndex*/,
05690         itemIndex,
05691         &afterLockedItemIndex,
05692         &afterLockedLineIndex);
05693
05694     if ((beforeLockedItemIndex == -1 || (itemIndex - beforeLockedItemIndex >= lineIndex - beforeLockedLineIndex)) &&
05695         (afterLockedItemIndex == -1 || (afterLockedItemIndex - itemIndex >= afterLockedLineIndex - lineIndex)))
05696     {
05697         internalLockedItemIndexes.insert(std::pair<int, int>(itemIndex, lineIndex));
05698
05699 #ifdef DBG
05700         VerifyInternalLockedItemsDbg(
05701             internalLockedItemIndexes,
05702             beginSizedLineIndex,
05703             endSizedLineIndex,
05704             beginSizedItemIndex,
05705             endSizedItemIndex);
05706 #endif
05707         return true;
05708     }
05709
05710     return false;
05711 }
05712
05713 // The ItemsInfo struct returned as the third tuple element is only filled when the first element, lineCount, is -1.
05714 // This indicates that the regular path layout must take over because the ItemsInfoRequested event did not provide sufficient info for the fast path.
05715 // The returned lineCount is > 0 when the fast path was successfully taken. In that case, the second element returned is the largest line width.
05716 // When is the fast path taken?
05717 //   When an ItemsInfoRequested event handler provided aspect ratios for all items in the source collection.
05718 // When is the regular path taken as a fallback after this method returns?
05719 //   - No ItemsInfoRequested event handler,
05720 //   - Or ItemsInfoRequested event handler provided incomplete information (it does not cover the entire source collection).
05721 // Fast path algorithm overview:
05722 //   - aspect ratios, min and max widths gathered for the entire source collection are used to do a layout of all items.
05723 //   - when a negative or nil aspect ratio is provided for an item, the average aspect ratio is used for it instead.
05724 //   - items are cumulated on the current line as long as their desired width does not exceed the available width.
05725 //   - once the next item goes beyond the available width, a key decision needs to be made: should that item be added to the current line or should it create a new line?
05726 //   - two scale factors are then computed:
05727 //     * the scale factor < 1 required to shrink the items in the current line to fit the available width, were the next item appended.
05728 //     * the scale factor > 1 required to grow the items in the current line to fill the available width, were the next item create a new line.
05729 //   - whichever resulting scale factor is closest to 1 wins. The next item is appended or creates a new line accordingly.
05730 // Fast path characteristics versus regular path:
05731 //   - the fast path lays out the entire collection at once. Scrolling does not raise the ItemsInfoRequested event, and does not trigger a layout.
05732 //     It just causes realized items to be recycled, and new item realizations.
05733 //   - the m_lineItemCounts and m_itemsInfoArrangeWidths vectors grow indefinitely as the source collection grows.
05734 //   - after a certain collection size threshold, the time required to do the full collection layout and the memory requirements negate the efficiency of the algorithm.
05735 //   - it is qualified as 'fast' because it employs a single pass of all items with simple decisions as to whether each item should be the beginning of a new line or not.
05736 //     The regular path involves iterative passes for assigning items to increasingly equalized lines.
05737 //   - a new available width always triggers a full re-layout of the entire collection. In the regular path case, no re-layout is required as long as the average-items-per-line
05738 //     does not change.
05739 //   - the fast path does not have to stick to a line count based on the average item aspect ratio. It has thus more freedom to lay out items with less clipping.
05740 std::tuple<int, float, LinedFlowLayout::ItemsInfo> LinedFlowLayout::MeasureConstrainedLinesFastPath(
05741     winrt::VirtualizingLayoutContext const& context,
05742     float availableWidth,
05743     double actualLineHeight,
05744     bool forceLayoutWithoutItemsInfoRequest)
05745 {
05746     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, availableWidth, actualLineHeight);
05747
05748     MUX_ASSERT(m_itemCount > 0);
05749
05750     float maxLineWidth{ 0.0f };
05751     bool unlockItems{ false };
05752
05753     do
05754     {
05755         if (m_forceRelayout || m_previousAvailableWidth != availableWidth || forceLayoutWithoutItemsInfoRequest)
05756         {
05757             if (forceLayoutWithoutItemsInfoRequest)
05758             {
05759                 // MeasureConstrainedLinesFastPath is invoked with forceLayoutWithoutItemsInfoRequest==True when
05760                 // a transition from the regular path to the fast path was enabled in MeasureConstrainedLinesRegularPath
05761                 // because (m_forceRelayout || m_previousAvailableWidth != availableWidth) == False.
05762                 // In that case, the ItemsInfoRequested handler already provided the info for the entire data source.
05763                 // Reset forceLayoutWithoutItemsInfoRequest so that RaiseItemsInfoRequested is called in the case
05764                 // m_forceRelayout is set to True by EnsureItemRangeFastPath below.
05765                 forceLayoutWithoutItemsInfoRequest = false;
05766             }
05767             else
05768             {
05769                 int itemsRangeStartIndex{};
05770                 int itemsRangeRequestedLength{};
05771
05772                 // Based on the average items per line, the realization rect size and offset, compute the item range for the ItemsInfoRequested event.
05773                 GetItemsInfoRequestedRange(
05774                     context,
05775                     availableWidth,
05776                     actualLineHeight,
05777                     &itemsRangeStartIndex,
05778                     &itemsRangeRequestedLength);
05779
05780                 MUX_ASSERT(itemsRangeStartIndex >= 0);
05781                 MUX_ASSERT(itemsRangeRequestedLength > 0);
05782                 MUX_ASSERT(itemsRangeStartIndex + itemsRangeRequestedLength - 1 < m_itemCount);
05783
05784                 const ItemsInfo itemsInfo = RaiseItemsInfoRequested(itemsRangeStartIndex, itemsRangeRequestedLength);
05785
05786 #ifdef DBG
05787                 LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"ItemsInfo for fast path");
05788                 LogItemsInfoDbg(itemsRangeStartIndex, itemsRangeRequestedLength, itemsInfo);
05789 #endif
05790
05791                 // Fall back to regular layout path when ItemsInfo::m_itemsRangeStartIndex is not 0.
05792                 if (itemsInfo.m_itemsRangeStartIndex != 0)
05793                 {
05794                     if (m_itemsInfoFirstIndex == -1)
05795                     {
05796                         ResetItemsInfo();
05797                     }
05798
05799                     return std::tuple<int, float, ItemsInfo>(-1 /*lineCount*/, 0.0f /*maxLineWidth*/, itemsInfo);
05800                 }
05801
05802                 // Fall back to regular layout path when ItemsInfo::m_itemsRangeLength is smaller than the collection item count.
05803                 if (itemsInfo.m_itemsRangeLength < m_itemCount)
05804                 {
05805                     if (m_itemsInfoFirstIndex == -1)
05806                     {
05807                         ResetItemsInfo();
05808                     }
05809
05810                     return std::tuple<int, float, ItemsInfo>(-1 /*lineCount*/, 0.0f /*maxLineWidth*/, itemsInfo);
05811                 }
05812
05813                 // Carry on with the fast path and reset items info from the potential prior regular path.
05814                 ResetItemsInfo();
05815
05816                 m_itemsInfoMinWidth = itemsInfo.m_minWidth < 0.0 ? -1.0 : itemsInfo.m_minWidth;
05817                 m_itemsInfoMaxWidth = itemsInfo.m_maxWidth < 0.0 ? -1.0 : itemsInfo.m_maxWidth;
05818             }
05819
05820             maxLineWidth = ComputeItemsLayoutFastPath(
05821                 availableWidth,
05822                 actualLineHeight);
05823
05824             // Immediately clear the arrays collected from the ItemsInfoRequested event handler.
05825             // ComputeItemsLayoutFastPath called above is the only method making use of them.
05826             ResetItemsInfoForFastPath();
05827
05828             m_forceRelayout = false;
05829             unlockItems = true;
05830         }
05831         else if (!UsesFastPathLayout())
05832         {
05833             return std::tuple<int, float, ItemsInfo>(-1 /*lineCount*/, 0.0f /*maxLineWidth*/, s_emptyItemsInfo);
05834         }
05835
05836         MUX_ASSERT(!m_forceRelayout);
05837
05838         EnsureItemRangeFastPath(
05839             context,
05840             actualLineHeight);
05841     }
05842     while (m_forceRelayout);
05843
05844     if (m_isVirtualizingContext)
05845     {
05846         if (m_elementManager.GetRealizedElementCount() > 0)
05847         {
05848             MeasureItemRange(
05849                 actualLineHeight,
05850                 m_elementManager.GetFirstRealizedDataIndex() /*beginRealizedItemIndex*/,
05851                 m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount() - 1 /*endRealizedItemIndex*/);
05852         }
05853
05854         if (maxLineWidth == 0.0f)
05855         {
05856             maxLineWidth = m_maxLineWidth;
05857         }
05858     }
05859     else
05860     {
05861         MeasureItemRange(
05862             actualLineHeight,
05863             0 /*beginRealizedItemIndex*/,
05864             m_itemCount - 1 /*endRealizedItemIndex*/);
05865     }
05866
05867     // Set m_averageItemsPerLine for the next re-layout. It is used above to estimate the requested item range for the ItemsInfoRequested event.
05868     const int lineCount = static_cast<int>(m_lineItemCounts.size());
05869
05870     MUX_ASSERT(lineCount >= 1);
05871
05872     // In the multi-line cases, the last line does not contribute to the average evaluation because it is likely incomplete.
05873     const double averageItemsPerLine = (lineCount == 1) ? m_itemCount : (static_cast<double>(m_itemCount) - m_lineItemCounts[static_cast<size_t>(lineCount) - 1]) / (static_cast<double>(lineCount) - 1);
05874
05875     SetAverageItemsPerLine(std::pair<double, double>(averageItemsPerLine /*averageItemsPerLineRaw*/, averageItemsPerLine /*averageItemsPerLineSnapped*/), false /*unlockItems*/);
05876
05877     if (unlockItems)
05878     {
05879         UnlockItems();
05880     }
05881
05882     return std::tuple<int, float, ItemsInfo>(lineCount, maxLineWidth, s_emptyItemsInfo);
05883 }
05884
05885 // Items measurement when the non-scrolling dimension is constrained.
05886 // Algorithm details:
05887 // The layout deals with up to 9 stacks of lines:
05888 // ******************************************
05889 // * E: Unrealized lines                    *
05890 // ******************************************
05891 // * D: Unrealized sized lines              *
05892 // ******************************************
05893 // * C: Realized unfrozen lines             *
05894 // ******************************************
05895 // * B: Realized frozen lines               *
05896 // ******************************************
05897 // * A: Realized frozen displayed lines     *
05898 // ******************************************
05899 // * B: Realized frozen lines               *
05900 // ******************************************
05901 // * C: Realized unfrozen lines             *
05902 // ******************************************
05903 // * D: Unrealized sized lines              *
05904 // ******************************************
05905 // * E: Unrealized lines                    *
05906 // ******************************************
05907 // A, B, C, D, E is the decreasing order for the likelihood of such lines being present.
05908 // Frozen lines contain items that keep their assigned line between successive layouts.
05909 // Because the layout performs poorly with fewer than 5 viewports worth of sizing information,
05910 // the ItemsInfoRequested event is used to gather sizing information for 5 scroll viewports (i.e. 5 x VirtualizingLayoutContext.VisibleRect).
05911 // The resulting information covers the zones D C B A B C D, i.e. any line within zones A B C & D is called 'sized'.
05912 // Likewise, any line within zones A B & C is called 'realized'.
05913 // A zone grows to 1.0 scroll viewport.
05914 // B zone grows to 0.8 scroll viewport.
05915 // C zone grows to 0.2 scroll viewport.
05916 // D zone grows to 1.0 scroll viewport.
05917 // D + C + B + A + B + C + D = 1.0 + 0.2 + 0.8 + 1.0 + 0.8 + 0.2 + 1.0 = 5.0 scroll viewports.
05918 // When the ItemsInfoRequested handler does not provide the minimum information requested, the D zones shrink to nothing while the C zones grow to 1.2 viewports.
05919 // The more lines in a zone the better the ability to optimize its items distribution.
05920 // A better items distribution means:
05921 // - smaller items shrinking to accommodate the available width in the non-scrolling direction,
05922 // - smaller items expansion when ItemsStretch is Fill,
05923 // - smaller items spacing when ItemsStretch is None.
05924 // Displayed lines A and their surrounding lines B are frozen so that items are not re-shuffled while on screen.
05925 // B zone exists for two reasons:
05926 // - the off-UI-thread aspect of scrolling (independent scrolling), so that items freshly brought into view are not reshuffled,
05927 // - have enough lines to perform an acceptable distribution.
05928 // Average items per line:
05929 //   The average items per line is computed based on realized items desired size aspect ratios. The effective average items per line is
05930 //   always a power of 1.1 (i.e. 1.0, 1.1, 1.21, 1.331, 1.4641 etc...), and thus only changes when a new actual value differs by at least 10%.
05931 //   This keeps the effective average number stable, since a change causes a complete re-layout.
05932 // Aspect ratio:
05933 //   The desired size of an item provides a desired aspect ratio (width / height). A weight is given to that aspect ratio: the first aspect ratio computed
05934 //   for a newly realized item gets a weight of 1. Each time that item is re-measured the weight is incremented by 1 until it reaches 16.
05935 //   This is to give more credibility to items that had the time to be properly populated (with an Image for example).
05936 //   Using a weighted average aspect ratio contributes to the stability of the effective average items per line.
05937 // Total line count:
05938 //   The effective average items per line and datasource item count are used to compute the total line count E + D + C + B + A + B + C + D + E.
05939 //   Example: 1000 datasource items / 4.1772 effective average items per line = 240 total lines.
05940 // Realized item count:
05941 //   The effective average items per line and realized line count are used to compute the realized item count.
05942 //   Example: 50 realized lines x 4.1772 effective average items per line = 209 realized items.
05943 // Item locking capability:
05944 //   An item can be locked into a line by calling 'int lineIndex = LinedFlowLayout.LockItemToLine(itemIndex)'.
05945 //   If the item in question belongs to a current A or B zone, its current line assignment is returned.
05946 //   Otherwise it belongs to a C, D or E zone and the returned line index is based on the itemIndex and effective average items per line.
05947 //   When the datasource or effective average items per line changes, the locks are invalidated and the ItemsUnlocked event is raised.
05948 // Line height:
05949 //   When LinedFlowLayout.LineHeight is NaN, the item for the first datasource entry is used to compute LinedFlowLayout.ActualLineHeight.
05950 //   Otherwise ActualLineHeight just reflects the LineHeight value.
05951 // Items distribution:
05952 //   A valid items distributions verifies:
05953 //   - each line has at least one item,
05954 //   - locked items belong to their locked line.
05955 //   Given I items to distribute among L lines, there are (I - L)^L combinations. Which one to pick?
05956 //   A distribution is associated with a drawback number. The smaller that drawback, the better. The LinedFlowLayout computes a few distributions
05957 //   and picks the one with the lowest drawback.
05958 //   Distribution example:
05959 //   ---- ------ --- ------------    *
05960 //   |  | |    | | | |          |    *
05961 //   ---- ------ --- ------------    *
05962 //   -------- --------- --- ----- ---*--
05963 //   |      | |       | | | |   | |  * |
05964 //   -------- --------- --- ----- ---*--
05965 //   ----- ------- ------ -----      *
05966 //   |   | |     | |    | |   |      *
05967 //   ----- ------- ------ -----      *
05968 //   The available width, marked by the * vertical line is 1000px. The desired item widths and LinedFlowLayout.ItemsSpacing provide a desired width for each line.
05969 //   That desired width can be smaller or greater than the available width, as shown in the example above.
05970 //   The calculated drawback is the sum of the squared (desired width - available width).
05971 //   For example (800 - 1000)^2 + (1100 - 1000)^2 + (700 - 1000)^2.
05972 //   When LinedFlowLayout.ItemsStretch is None, the very last line does not participate in the drawback evaluation if its desired width is smaller than the available width.
05973 //   Potentially four items in a distribution are special:
05974 //   ---- ------ --- ------------            *
05975 //   |  | |    | | | |          |            *
05976 //   ---- ------ --- ------------            *
05977 //   ------------ --------- --- ----- -----  *
05978 //   |          | |       | | | |   | |ST |  *
05979 //   ------------ --------- --- ----- -----  *
05980 //   ----- ------- ------ ----- ---------    *
05981 //   |SH | |     | |    | |   | |       |    *
05982 //   ----- ------- ------ ----- ---------    *
05983 //   -------- ----- ------- ------           *
05984 //   |      | |   | |     | |    |           *
05985 //   -------- ----- ------- ------           *
05986 //   - the Smallest Head (SH) item
05987 //   - the Smallest Tail (ST) item
05988 //   The SH item is the smallest item such that by increasing the available width, it will be assigned the prior line (the increase is SH width + ItemsSpacing).
05989 //   The ST item is the smallest item such that by decreasing the available width, it will be assigned the next line (the decrease is SH width + ItemsSpacing).
05990 //   ---- ------ --- ----------              *
05991 //   |  | |    | | | |        |              *
05992 //   ---- ------ --- ----------              *
05993 //   -------------- ------- --- ----- ----- -*-------
05994 //   |BEH         | |     | | | |   | |   | |*      |
05995 //   -------------- ------- --- ----- ----- -*-------
05996 //   ----- ------- ------ ----- ------- -----*--
05997 //   |   | |     | |    | |   | |     | |BET * |
05998 //   ----- ------- ------ ----- ------- -----*--
05999 //   -------- ----- ------- ------           *
06000 //   |      | |   | |     | |    |           *
06001 //   -------- ----- ------- ------           *
06002 //   - the Best Equalizing Head (BEH) item
06003 //   - the Best Equalizing Tail (BET) item
06004 //   The BEH item provides the most drawback improvement if it moves to the prior line.
06005 //   The BET item provides the most drawback improvement if it moves to the next line.
06006 //   Best distribution evaluation:
06007 //     Phase 1: evaluate distribution for an available width equal to the MeasureOverride's availableWidth.
06008 //     Phase 2: evaluate distribution for an available width equal to the resulting average desired line width of Phase 1.
06009 //     Phase 3: evaluate distributions with an available width within 30% of the average desired line width using the SH and ST items of prior distributions. Pick the distribution with the lowest drawback.
06010 //     Phase 4: keeping the available width from Phase 3, fine tune that distribution by moving BEH / BET items into their neighboring lines using internal locks.
06011 //              Whichever item among BEH & BET is present and provides the largest drawback improvement is moved.
06012 // Items scaling:
06013 //   Once the best items distribution is picked, each item is scaled up or down (or unscaled) in order to accommodate the final available width and LinedFlowLayout.ItemsStretch setting.
06014 //   When a desired line width is smaller than the available width and ItemsStretch is Fill, the items are uniformly scaled up and cropped to completly fill the line.
06015 //   When a desired line width is greater than the available width, the items are uniformly scaled down and cropped to just fill the line.
06016 //   All items are measured based on the scaled available widths.
06017 // Complete layouts:
06018 //   A complete re-layout is performed when:
06019 //   - the datasource changed,
06020 //   - LineHeight, ItemsSpacing or LineSpacing changed,
06021 //   - the effective average items per line changed,
06022 //   - a frozen item gets a new desired width.
06023 //   For a re-layout, an items distribution is performed for all realized lines, all at once.
06024 // Partial layouts:
06025 //   When scrolling, items distributions are performed for lines in the updated C & D zones.
06026 int LinedFlowLayout::MeasureConstrainedLinesRegularPath(
06027     winrt::VirtualizingLayoutContext const& context,
06028     ItemsInfo const& itemsInfo,
06029     float availableWidth,
06030     double actualLineHeight)
06031 {
06032     const double lineSpacing = LineSpacing();
06033
06034     MUX_ASSERT(actualLineHeight > 0.0);
06035
06036     const int newRecommendedAnchorIndex = context.RecommendedAnchorIndex();
06037     const double scrollViewport = context.VisibleRect().Height;
06038
06039     MUX_ASSERT(m_isVirtualizingContext == (scrollViewport != std::numeric_limits<double>::infinity()));
06040
06041     int lineCount = 0;
06042     int lineIndexApproximationCache = 0;
06043     bool isDisconnectedAnchorVirtualized = false;
06044
06045     do
06046     {
06047         float nearRealizationRect = GetRoundedFloat(context.RealizationRect().Y);
06048         float farRealizationRect = nearRealizationRect + context.RealizationRect().Height;
06049         float realizationRectHeight = 0.0f;
06050         double clampedNearRealizationRect = 0;
06051         double scrollOffset = 0;
06052
06053         if (m_isVirtualizingContext)
06054         {
06055             // It is assumed that the ItemsInfoRequested event will produce sizing information for lines around the realized ones when ItemsRepeater.VerticalCacheSize is smaller than 4. Only 3 viewports are forcefully realized.
06056             // In the case ItemsInfoRequested can not provide the requested info, it is advised to bump up the ItemsRepeater.VerticalCacheSize to 4 from the default 2.
06057             const float realizationRectHeightDeficit = GetRealizationRectHeightDeficit(context, actualLineHeight, lineSpacing) / 2.0f / m_measureCountdown + static_cast<float>(lineIndexApproximationCache * (actualLineHeight + lineSpacing));
06058             const float inflatedNearRealizationRect = nearRealizationRect - realizationRectHeightDeficit;
06059             const float inflatedFarRealizationRect = farRealizationRect + realizationRectHeightDeficit;
06060             bool realizationRectCenteredAroundAnchor = false;
06061
06062             if (m_anchorIndex != -1 || newRecommendedAnchorIndex != -1)
06063             {
06064                 const int anchorLineIndex = GetLineIndex(newRecommendedAnchorIndex == -1 ? m_anchorIndex : newRecommendedAnchorIndex, false /*usesFastPathLayout*/);
06065                 const float anchorLineNearEdge = static_cast<float>(anchorLineIndex * (actualLineHeight + lineSpacing));
06066
06067                 // Check if the normal inflated realization rect overlaps the anticipated anchor line, with 1 line of margin of error in the line index approximation.
06068                 if (anchorLineNearEdge - 2 * actualLineHeight - lineSpacing <= inflatedNearRealizationRect || anchorLineNearEdge + actualLineHeight + lineSpacing >= inflatedFarRealizationRect)
06069                 {
06070                     // The anchor index would not be realized if the normal path (realizationRectCenteredAroundAnchor == false) were followed.
06071                     // A non-inflated realization rect is centered around the middle of the anticipated anchor line.
06072                     const float anchorLineMiddle = static_cast<float>(anchorLineNearEdge + actualLineHeight / 2.0);
06073
06074                     realizationRectHeight = farRealizationRect - nearRealizationRect;
06075                     nearRealizationRect = GetRoundedFloat(anchorLineMiddle - realizationRectHeight / 2.0f);
06076                     farRealizationRect = nearRealizationRect + realizationRectHeight;
06077                     scrollOffset = std::max(0.0, anchorLineMiddle - scrollViewport / 2.0);
06078                     realizationRectCenteredAroundAnchor = true;
06079
06080                     // Same comments and treatment as in LinedFlowLayout::EnsureItemRangeFastPath.
06081                     // Sometimes during a bring-into-view operation the RecommendedAnchorIndex momentarily switches from the target index N to -1 and then back to the target index N.
06082                     // To avoid momentarily setting m_anchorIndex to -1, its value is preserved c_maxAnchorIndexRetentionCount times, based purely on experimentations.
06083                     // Without this momentary retention the bring-into-view operation lands on incorrect offsets. If m_anchorIndex were to be preserved without a countdown, large offset changes
06084                     // through ScrollView.ScrollTo calls would not complete.
06085                     // TODO: Bug 41896418 - Investigate why the occurrences of -1 sometimes come up - even when the ScrollView anchoring is turned on.
06086                     //                      Does such a countdown need to be used? What is a reliable countdown starting value?
06087                     if (newRecommendedAnchorIndex == -1)
06088                     {
06089                         MUX_ASSERT(m_anchorIndexRetentionCountdown >= 1 && m_anchorIndexRetentionCountdown <= c_maxAnchorIndexRetentionCount);
06090
06091                         m_anchorIndexRetentionCountdown--;
06092
06093                         if (m_anchorIndexRetentionCountdown == 0)
06094                         {
06095                             m_anchorIndex = -1;
06096                         }
06097                     }
06098                     else
06099                     {
06100                         m_anchorIndexRetentionCountdown = c_maxAnchorIndexRetentionCount;
06101                         m_anchorIndex = newRecommendedAnchorIndex;
06102                     }
06103
06104                     // Layout is invalidated to ensure that m_anchorIndexRetentionCountdown is decremented from c_maxAnchorIndexRetentionCount all the way to 0 (a few lines above).
06105                     // Otherwise m_anchorIndex could be stuck to a value that prevents the realization window from moving to the actual scroller's offset.
06106                     InvalidateMeasureAsync();
06107
06108                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_INT, METH_NAME, this, scrollOffset, m_anchorIndex);
06109                 }
06110             }
06111
06112             if (!realizationRectCenteredAroundAnchor)
06113             {
06114                 if (m_anchorIndex != -1)
06115                 {
06116                     m_anchorIndex = -1;
06117                 }
06118
06119                 nearRealizationRect = inflatedNearRealizationRect;
06120                 farRealizationRect = inflatedFarRealizationRect;
06121                 realizationRectHeight = farRealizationRect - nearRealizationRect;
06122                 scrollOffset = context.VisibleRect().Y;
06123             }
06124
06125             clampedNearRealizationRect = std::max(0.0, static_cast<double>(nearRealizationRect));
06126             m_unrealizedNearLineCount = static_cast<int>(clampedNearRealizationRect / (actualLineHeight + lineSpacing));
06127         }
06128         else
06129         {
06130             // All lines are realized in non-virtualizing mode.
06131             m_unrealizedNearLineCount = 0;
06132
06133             MUX_ASSERT(context.VisibleRect().Y == 0.0f);
06134         }
06135
06136         if (m_averageItemsPerLine.second == 0.0)
06137         {
06138             MUX_ASSERT(m_averageItemsPerLine.first == 0.0);
06139
06140             SetAverageItemsPerLine(GetAverageItemsPerLine(availableWidth));
06141         }
06142
06143         std::set<double> averageItemsPerLineProcessed;
06144         bool forceRelayout = false;
06145
06146         if (m_forceRelayout)
06147         {
06148             forceRelayout = true;
06149             m_forceRelayout = false;
06150         }
06151         else if (m_previousAvailableWidth != availableWidth)
06152         {
06153             // Perform a re-layout for example when the width of the owning control changed.
06154             forceRelayout = true;
06155         }
06156
06157         do
06158         {
06159             averageItemsPerLineProcessed.insert(m_averageItemsPerLine.second);
06160
06161             std::pair<double, double> newAverageItemsPerLine{ m_averageItemsPerLine.first, 0.0 };
06162
06163             lineCount = MeasureConstrainedLines(
06164                 context,
06165                 averageItemsPerLineProcessed,
06166                 itemsInfo,
06167                 forceRelayout,
06168                 availableWidth,
06169                 nearRealizationRect,
06170                 farRealizationRect,
06171                 scrollViewport,
06172                 scrollOffset,
06173                 actualLineHeight,
06174                 &newAverageItemsPerLine);
06175
06176             if (lineCount == -1)
06177             {
06178                 // This indicates the fast path can be engaged as the ItemsInfoRequested event handler provided ratios for the entire collection.
06179                 return -1;
06180             }
06181
06182             if (newAverageItemsPerLine.second == m_averageItemsPerLine.second)
06183             {
06184                 // This branch is guaranteed to be hit and end the loop because averageItemsPerLineProcessed is never populated twice with the same value.
06185                 forceRelayout = false;
06186             }
06187             else
06188             {
06189                 // The method MeasureConstrainedLines is not expected to request a new average items per line that was already processed in this layout pass.
06190                 MUX_ASSERT(averageItemsPerLineProcessed.find(newAverageItemsPerLine.second) == averageItemsPerLineProcessed.end());
06191
06192                 const std::pair<double, double> oldAverageItemsPerLine = m_averageItemsPerLine;
06193
06194                 SetAverageItemsPerLine(newAverageItemsPerLine);
06195
06196                 NotifyLinedFlowLayoutInvalidatedDbg(winrt::LinedFlowLayoutInvalidationTrigger::SnappedAverageItemsPerLineChange);
06197
06198                 if (m_isVirtualizingContext)
06199                 {
06200                     // Adjust the realization window, scroll offset and number of unrealized lines before the realized ones according to the new
06201                     // average items per line. The new scroll offset is an approximate value based on the old offset & old and new average items
06202                     // per line. Scroll anchoring through VerticalAnchorRatio will potentially correct that approximation.
06203
06204                     lineCount = GetLineCount(m_averageItemsPerLine.second);
06205                     MUX_ASSERT(lineCount != 0);
06206
06207                     const double linesSpacing = (static_cast<double>(lineCount) - 1) * lineSpacing;
06208                     const double scrollExtent = lineCount * actualLineHeight + linesSpacing;
06209                     const double maxScrollOffset = std::max(0.0, scrollExtent - scrollViewport);
06210                     const double newScrollOffset = std::min(maxScrollOffset, GetRoundedDouble(scrollOffset * oldAverageItemsPerLine.second / newAverageItemsPerLine.second));
06211
06212                     nearRealizationRect = static_cast<float>(GetRoundedDouble(nearRealizationRect + newScrollOffset - scrollOffset));
06213                     farRealizationRect = nearRealizationRect + realizationRectHeight;
06214                     clampedNearRealizationRect = std::max(0.0, static_cast<double>(nearRealizationRect));
06215                     m_unrealizedNearLineCount = static_cast<int>(clampedNearRealizationRect / (actualLineHeight + lineSpacing));
06216                     scrollOffset = newScrollOffset;
06217                 }
06218
06219                 forceRelayout = true;
06220             }
06221         }
06222         while (forceRelayout);
06223
06224         isDisconnectedAnchorVirtualized = newRecommendedAnchorIndex != -1 && !m_elementManager.IsDataIndexRealized(newRecommendedAnchorIndex);
06225
06226         if (isDisconnectedAnchorVirtualized)
06227         {
06228             // This rare case occurs when GetLineIndex for the anchor index returned an approximation off enough that the anchor element was actually not realized in the iteration above.
06229             // Increasing the cache by one line so that the next iteration has a much greater probability of realizing that anchor.
06230             lineIndexApproximationCache++;
06231         }
06232     }
06233     while (isDisconnectedAnchorVirtualized);
06234
06235     // Clear the arrays collected from the ItemsInfoRequested event handler.
06236     ResetItemsInfoForFastPath();
06237
06238 #ifdef DBG
06239     if (m_isVirtualizingContext)
06240     {
06241         const int newRecommendedAnchorIndexDbg = context.RecommendedAnchorIndex();
06242
06243         MUX_ASSERT(newRecommendedAnchorIndexDbg == -1 || m_elementManager.IsDataIndexRealized(newRecommendedAnchorIndexDbg));
06244
06245         const int anchorLineIndexDbg = newRecommendedAnchorIndexDbg == -1 ? -1 : GetLineIndex(newRecommendedAnchorIndexDbg, false /*usesFastPathLayout*/);
06246
06247         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"realized anchor", anchorLineIndexDbg, newRecommendedAnchorIndexDbg);
06248     }
06249 #endif
06250
06251     return lineCount;
06252 }
06253
06254 // Returns the final line count when the regular path is kept to the end,
06255 // or -1 when the ItemsInfoRequested provided ratios for the entire data source,
06256 // indicating that the fast path must be engaged.
06257 int LinedFlowLayout::MeasureConstrainedLines(
06258     winrt::VirtualizingLayoutContext const& context,
06259     std::set<double> const& averageItemsPerLineProcessed,
06260     ItemsInfo const& itemsInfo,
06261     bool forceRelayout,
06262     float availableWidth,
06263     float nearRealizationRect,
06264     float farRealizationRect,
06265     double scrollViewport,
06266     double scrollOffset,
06267     double actualLineHeight,
06268     std::pair<double, double>* newAverageItemsPerLine)
06269 {
06270     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, forceRelayout);
06271     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_unrealizedNearLineCount", m_unrealizedNearLineCount);
06272
06273     MUX_ASSERT(!UsesFastPathLayout());
06274     MUX_ASSERT(actualLineHeight > 0.0);
06275
06276     *newAverageItemsPerLine = m_averageItemsPerLine;
06277
06278     const int lineCount = GetLineCount(m_averageItemsPerLine.second);
06279
06280     if (m_unrealizedNearLineCount >= lineCount)
06281     {
06282         ResetLinesInfo();
06283         ResetSizedLines();
06284         return lineCount;
06285     }
06286
06287     MUX_ASSERT(m_unrealizedNearLineCount < lineCount);
06288     MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
06289
06290     const double lineSpacing = LineSpacing();
06291     const double linesSpacing = lineCount == 0 ? 0.0 : (static_cast<double>(lineCount) - 1) * lineSpacing;
06292     const double linesHeight = lineCount * actualLineHeight + linesSpacing;
06293     const double clampedFarRealizationRect = std::max(0.0, std::min(linesHeight, static_cast<double>(farRealizationRect)));
06294     const int unrealizedFarLineCount = static_cast<int>((linesHeight - clampedFarRealizationRect) / (actualLineHeight + lineSpacing));
06295     const int realizedLineCount = lineCount - m_unrealizedNearLineCount - unrealizedFarLineCount;
06296
06297     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"realizedLineCount", realizedLineCount);
06298
06299     MUX_ASSERT(realizedLineCount <= lineCount);
06300
06301     if (realizedLineCount == 0)
06302     {
06303         ResetLinesInfo();
06304         ResetSizedLines();
06305         return lineCount;
06306     }
06307
06308     MUX_ASSERT(realizedLineCount > 0);
06309
06310     // Determine the rect size which includes the unrealized sized and realized items.
06311     const float sizedItemsRectHeight = GetSizedItemsRectHeight(context, actualLineHeight, lineSpacing);
06312     const float realizationRectHeightDeficit = std::max(0.0f, sizedItemsRectHeight - farRealizationRect + nearRealizationRect);
06313     const float nearSizedItemsRect = nearRealizationRect - realizationRectHeightDeficit / 2.0f;
06314     const float farSizedItemsRect = farRealizationRect + realizationRectHeightDeficit / 2.0f;
06315     const double clampedNearSizedItemsRect = std::max(0.0, static_cast<double>(nearSizedItemsRect));
06316
06317     m_unsizedNearLineCount = static_cast<int>(clampedNearSizedItemsRect / (actualLineHeight + lineSpacing));
06318
06319     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_unsizedNearLineCount", m_unsizedNearLineCount);
06320
06321     MUX_ASSERT(m_unsizedNearLineCount <= m_unrealizedNearLineCount);
06322
06323     const double clampedFarSizedItemsRect = std::max(0.0, std::min(linesHeight, static_cast<double>(farSizedItemsRect)));
06324     const int unsizedFarLineCount = static_cast<int>((linesHeight - clampedFarSizedItemsRect) / (actualLineHeight + lineSpacing));
06325     const int sizedLineCount = lineCount - m_unsizedNearLineCount - unsizedFarLineCount;
06326
06327     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedLineCount", sizedLineCount);
06328
06329     MUX_ASSERT(sizedLineCount <= lineCount);
06330     MUX_ASSERT(sizedLineCount >= realizedLineCount);
06331
06332     const int oldFirstRealizedDataIndex = m_elementManager.GetFirstRealizedDataIndex(); // -1 and unused in non-virtualizing mode.
06333     const int oldLastRealizedDataIndex = oldFirstRealizedDataIndex == -1 ? -1 : oldFirstRealizedDataIndex + m_elementManager.GetRealizedElementCount() - 1;
06334     const int oldFirstSizedItemIndex = m_firstSizedItemIndex;
06335     const int oldLastSizedItemIndex = m_lastSizedItemIndex;
06336     const int oldFirstSizedLineIndex = m_firstSizedLineIndex;
06337     const int oldLastSizedLineIndex = m_lastSizedLineIndex;
06338
06339     m_firstSizedLineIndex = m_unsizedNearLineCount;
06340     m_lastSizedLineIndex = m_unsizedNearLineCount + sizedLineCount - 1;
06341
06342     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstSizedLineIndex", m_firstSizedLineIndex);
06343     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastSizedLineIndex", m_lastSizedLineIndex);
06344
06345     std::vector<int> oldLineItemCounts;
06346     int oldFirstItemsInfoIndex = m_itemsInfoFirstIndex;
06347     int oldLastItemsInfoIndex = m_itemsInfoFirstIndex == -1 ? -1 : m_itemsInfoFirstIndex + static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()) - 1;
06348
06349     if (!forceRelayout)
06350     {
06351         oldLineItemCounts = m_lineItemCounts;
06352     }
06353
06354     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementAvailableWidths;
06355     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementDesiredWidths;
06356
06357     if (m_elementAvailableWidths)
06358     {
06359         oldElementAvailableWidths = m_elementAvailableWidths;
06360         m_elementAvailableWidths = nullptr;
06361     }
06362     EnsureElementAvailableWidths();
06363
06364     if (m_elementDesiredWidths)
06365     {
06366         oldElementDesiredWidths = m_elementDesiredWidths;
06367         m_elementDesiredWidths = nullptr;
06368     }
06369     EnsureElementDesiredWidths();
06370
06371     int firstStillSizedLineIndex;
06372     int lastStillSizedLineIndex;
06373     int firstStillSizedItemIndex;
06374     int lastStillSizedItemIndex;
06375     int firstStillRealizedItemIndex{ -1 };
06376     int lastStillRealizedItemIndex{ -1 };
06377
06378     InitializeForRelayout(
06379         sizedLineCount,
06380         firstStillSizedLineIndex,
06381         lastStillSizedLineIndex,
06382         firstStillSizedItemIndex,
06383         lastStillSizedItemIndex);
06384
06385     if (!forceRelayout && !oldLineItemCounts.empty())
06386     {
06387         if (m_firstSizedLineIndex >= oldFirstSizedLineIndex && m_firstSizedLineIndex <= oldLastSizedLineIndex)
06388         {
06389             firstStillSizedLineIndex = m_firstSizedLineIndex;
06390             lastStillSizedLineIndex = std::min(oldLastSizedLineIndex, m_lastSizedLineIndex);
06391         }
06392         if (m_lastSizedLineIndex >= oldFirstSizedLineIndex && m_lastSizedLineIndex <= oldLastSizedLineIndex)
06393         {
06394             lastStillSizedLineIndex = m_lastSizedLineIndex;
06395             firstStillSizedLineIndex = std::max(oldFirstSizedLineIndex, m_firstSizedLineIndex);
06396         }
06397         if (m_firstSizedLineIndex <= oldFirstSizedLineIndex && m_lastSizedLineIndex >= oldLastSizedLineIndex)
06398         {
06399             firstStillSizedLineIndex = oldFirstSizedLineIndex;
06400             lastStillSizedLineIndex = oldLastSizedLineIndex;
06401         }
06402
06403         MUX_ASSERT(!(firstStillSizedLineIndex == -1 && lastStillSizedLineIndex != -1));
06404         MUX_ASSERT(!(firstStillSizedLineIndex != -1 && lastStillSizedLineIndex == -1));
06405
06406         if (firstStillSizedLineIndex != -1)
06407         {
06408             MUX_ASSERT(lastStillSizedLineIndex != -1);
06409
06410             // When firstStillSizedLineIndex != -1 (and necessarily lastStillSizedLineIndex != -1),
06411             // lines oldLineItemCounts[Max(oldFirstSizedLineIndex, m_firstSizedLineIndex) - oldFirstSizedLineIndex]
06412             // to oldLineItemCounts[Min(oldLastSizedLineIndex, m_lastSizedLineIndex) - oldFirstSizedLineIndex] would become frozen without adjustment.
06413             const int oldFirstLineVectorIndex = std::max(oldFirstSizedLineIndex, m_firstSizedLineIndex) - oldFirstSizedLineIndex;
06414             const int oldLastLineVectorIndex = std::min(oldLastSizedLineIndex, m_lastSizedLineIndex) - oldFirstSizedLineIndex;
06415
06416             MUX_ASSERT(oldFirstLineVectorIndex >= 0);
06417             MUX_ASSERT(oldFirstLineVectorIndex < static_cast<int>(oldLineItemCounts.size()));
06418             MUX_ASSERT(oldLastLineVectorIndex >= 0);
06419             MUX_ASSERT(oldLastLineVectorIndex < static_cast<int>(oldLineItemCounts.size()));
06420
06421             firstStillSizedItemIndex = oldFirstSizedItemIndex;
06422
06423             for (int lineVectorIndex = 0; lineVectorIndex < oldFirstLineVectorIndex; lineVectorIndex++)
06424             {
06425                 firstStillSizedItemIndex += oldLineItemCounts[lineVectorIndex];
06426             }
06427
06428             lastStillSizedItemIndex = firstStillSizedItemIndex;
06429
06430             for (int lineVectorIndex = oldFirstLineVectorIndex; lineVectorIndex <= oldLastLineVectorIndex; lineVectorIndex++)
06431             {
06432                 m_lineItemCounts[static_cast<size_t>(firstStillSizedLineIndex) - m_firstSizedLineIndex + lineVectorIndex - oldFirstLineVectorIndex] =
06433                     oldLineItemCounts[lineVectorIndex];
06434
06435                 lastStillSizedItemIndex += oldLineItemCounts[lineVectorIndex];
06436             }
06437
06438             lastStillSizedItemIndex--;
06439
06440             MUX_ASSERT(firstStillSizedItemIndex <= lastStillSizedItemIndex);
06441         }
06442     }
06443
06444     int sizedItemCount = 0;
06445
06446     if (m_isVirtualizingContext)
06447     {
06448         // Figure out how many items fill the sized rect.
06449
06450         MUX_ASSERT(m_unsizedNearLineCount + sizedLineCount <= lineCount);
06451
06452         if (firstStillSizedLineIndex != -1 && firstStillSizedLineIndex == m_firstSizedLineIndex && lastStillSizedLineIndex == m_lastSizedLineIndex)
06453         {
06454             sizedItemCount = LineItemsCountTotal(0);
06455         }
06456         else if (firstStillSizedLineIndex != -1 && 0 == m_firstSizedLineIndex && lastStillSizedLineIndex == m_lastSizedLineIndex)
06457         {
06458             sizedItemCount = LineItemsCountTotal(0) + firstStillSizedItemIndex;
06459         }
06460         else if (m_unsizedNearLineCount + sizedLineCount < lineCount)
06461         {
06462             sizedItemCount = static_cast<int>(std::round(sizedLineCount * m_averageItemsPerLine.second));
06463
06464             if (firstStillSizedLineIndex != -1 && 0 == m_firstSizedLineIndex)
06465             {
06466                 MUX_ASSERT(oldFirstSizedItemIndex != -1);
06467                 MUX_ASSERT(oldLastSizedItemIndex != -1);
06468
06469                 const int oldSizedItemCount = oldLastSizedItemIndex - oldFirstSizedItemIndex + 1;
06470
06471                 if (sizedItemCount < oldSizedItemCount)
06472                 {
06473                     sizedItemCount = oldSizedItemCount;
06474                 }
06475             }
06476
06477             sizedItemCount = std::min(sizedItemCount, m_itemCount);
06478         }
06479     }
06480
06481     int unsizedNearItemCount = 0;
06482
06483     if (firstStillSizedLineIndex != -1)
06484     {
06485         MUX_ASSERT(m_isVirtualizingContext);
06486
06487         if (m_firstSizedLineIndex == 0)
06488         {
06489             MUX_ASSERT(m_unsizedNearLineCount == 0);
06490
06491             unsizedNearItemCount = 0;
06492         }
06493         else
06494         {
06495             unsizedNearItemCount = firstStillSizedItemIndex;
06496
06497             if (oldFirstSizedLineIndex > m_firstSizedLineIndex)
06498             {
06499                 if (sizedItemCount == 0)
06500                 {
06501                     MUX_ASSERT(m_unsizedNearLineCount + sizedLineCount == lineCount);
06502
06503                     unsizedNearItemCount -=
06504                         std::min(unsizedNearItemCount, static_cast<int>(std::round((static_cast<double>(oldFirstSizedLineIndex) - m_firstSizedLineIndex) * m_averageItemsPerLine.second)));
06505                 }
06506                 else
06507                 {
06508                     const int lineItemsCountTotal = LineItemsCountTotal(0);
06509                     const int newSizedItemCount = sizedItemCount - lineItemsCountTotal;
06510                     const int newNearSizedLineCount = oldFirstSizedLineIndex - m_firstSizedLineIndex;
06511                     const int newFarSizedLineCount = std::max(0, m_lastSizedLineIndex - oldLastSizedLineIndex);
06512
06513                     // newSizedItemCount < newNearSizedLineCount + newFarSizedLineCount occurs when the average items per line of the still sized lines is
06514                     // greater than m_averageItemsPerLine & there are not enough items left to distribute at least one item per new sized line. Do a re-layout in those cases too.
06515                     if (unsizedNearItemCount < m_unsizedNearLineCount + newSizedItemCount ||
06516                         newSizedItemCount < newNearSizedLineCount + newFarSizedLineCount)
06517                     {
06518                         // Performing complete re-layout.
06519                         InitializeForRelayout(
06520                             sizedLineCount,
06521                             firstStillSizedLineIndex,
06522                             lastStillSizedLineIndex,
06523                             firstStillSizedItemIndex,
06524                             lastStillSizedItemIndex);
06525                         firstStillRealizedItemIndex = -1;
06526                         lastStillRealizedItemIndex = -1;
06527                         oldLineItemCounts.clear();
06528                         unsizedNearItemCount = static_cast<int>(std::round(m_unsizedNearLineCount * m_averageItemsPerLine.second));
06529                     }
06530                     else
06531                     {
06532                         // There are at least as many new sized items as there are new sized lines.
06533                         MUX_ASSERT(newSizedItemCount >= newNearSizedLineCount + newFarSizedLineCount);
06534
06535                         // New near and far sized items allocations are proportional to the new line counts.
06536                         const int newNearSizedItemCount = std::max(newNearSizedLineCount, newNearSizedLineCount * newSizedItemCount / (newNearSizedLineCount + newFarSizedLineCount));
06537
06538                         unsizedNearItemCount -= newNearSizedItemCount;
06539                     }
06540                 }
06541             }
06542             else if (unsizedNearItemCount + sizedItemCount + unsizedFarLineCount > m_itemCount)
06543             {
06544                 sizedItemCount = m_itemCount - unsizedNearItemCount - unsizedFarLineCount;
06545             }
06546         }
06547     }
06548     else if (m_isVirtualizingContext)
06549     {
06550         unsizedNearItemCount = static_cast<int>(std::round(m_unsizedNearLineCount * m_averageItemsPerLine.second));
06551     }
06552
06553     MUX_ASSERT(unsizedNearItemCount < m_itemCount);
06554     MUX_ASSERT(unsizedNearItemCount >= m_unsizedNearLineCount);
06555     MUX_ASSERT((m_unsizedNearLineCount == 0 && unsizedNearItemCount == 0) || (m_unsizedNearLineCount > 0 && unsizedNearItemCount > 0));
06556
06557     if (m_unsizedNearLineCount + sizedLineCount == lineCount)
06558     {
06559         sizedItemCount = m_itemCount - unsizedNearItemCount;
06560     }
06561
06562     MUX_ASSERT(sizedItemCount > 0);
06563     MUX_ASSERT(sizedItemCount >= sizedLineCount);
06564     MUX_ASSERT(unsizedNearItemCount + sizedItemCount <= m_itemCount);
06565
06566     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"sizedItemCount", sizedItemCount);
06567     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unsizedNearItemCount", unsizedNearItemCount);
06568
06569     m_firstSizedItemIndex = unsizedNearItemCount;
06570     m_lastSizedItemIndex = m_firstSizedItemIndex + sizedItemCount - 1;
06571
06572     MUX_ASSERT((firstStillSizedItemIndex == -1) == (lastStillSizedItemIndex == -1));
06573     MUX_ASSERT(m_firstSizedItemIndex <= firstStillSizedItemIndex || firstStillSizedItemIndex == -1);
06574     MUX_ASSERT(m_lastSizedItemIndex >= lastStillSizedItemIndex || lastStillSizedItemIndex == -1);
06575
06576     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_firstSizedItemIndex", m_firstSizedItemIndex);
06577     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_lastSizedItemIndex", m_lastSizedItemIndex);
06578
06579     EnsureAndResizeItemAspectRatios(
06580         scrollViewport,
06581         actualLineHeight,
06582         lineSpacing);
06583
06584     if (m_isVirtualizingContext && UpdateItemsInfo(itemsInfo, oldFirstItemsInfoIndex, oldLastItemsInfoIndex))
06585     {
06586         // The fast path was enabled. Reset the fields specific to the regular path, and return -1 to indicate that
06587         // the fast path must be engaged as ratios were provided for the entire data source.
06588         ExitRegularPath();
06589         return -1;
06590     }
06591
06592     int unrealizedNearItemCount{};
06593     int realizedItemCount{};
06594
06595     if (!m_isVirtualizingContext || static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()) < sizedItemCount)
06596     {
06597         // The ItemsInfoRequested handler did not provide sizing information for all sized items, or the context is not virtualizing.
06598         // Fall back to realizing all sized items instead.
06599         unrealizedNearItemCount = unsizedNearItemCount;
06600         realizedItemCount = sizedItemCount;
06601
06602         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unrealizedNearItemCount fallback", unrealizedNearItemCount);
06603         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"realizedItemCount fallback", realizedItemCount);
06604         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"realized item index range fallback", unrealizedNearItemCount, unrealizedNearItemCount + realizedItemCount - 1);
06605     }
06606     else
06607     {
06608         MUX_ASSERT(m_itemsInfoFirstIndex != -1);
06609
06610         GetRealizedItemsFromSizedItems(
06611             realizedLineCount,
06612             lineCount,
06613             &unrealizedNearItemCount,
06614             &realizedItemCount);
06615     }
06616
06617     MUX_ASSERT(sizedItemCount >= realizedItemCount);
06618     MUX_ASSERT(firstStillRealizedItemIndex == -1);
06619     MUX_ASSERT(lastStillRealizedItemIndex == -1);
06620
06621     if (firstStillSizedLineIndex != -1)
06622     {
06623         MUX_ASSERT(lastStillSizedLineIndex != -1);
06624
06625         const int newFirstRealizedDataIndex = unrealizedNearItemCount;
06626         const int newLastRealizedDataIndex = newFirstRealizedDataIndex + realizedItemCount - 1;
06627
06628         MUX_ASSERT(m_firstSizedItemIndex <= newFirstRealizedDataIndex);
06629         MUX_ASSERT(m_lastSizedItemIndex >= newLastRealizedDataIndex);
06630
06631         if (newFirstRealizedDataIndex >= oldFirstRealizedDataIndex && newFirstRealizedDataIndex <= oldLastRealizedDataIndex)
06632         {
06633             firstStillRealizedItemIndex = newFirstRealizedDataIndex;
06634             lastStillRealizedItemIndex = std::min(oldLastRealizedDataIndex, newLastRealizedDataIndex);
06635         }
06636         else if (newLastRealizedDataIndex >= oldFirstRealizedDataIndex && newLastRealizedDataIndex <= oldLastRealizedDataIndex)
06637         {
06638             lastStillRealizedItemIndex = newLastRealizedDataIndex;
06639             firstStillRealizedItemIndex = std::max(oldFirstRealizedDataIndex, newFirstRealizedDataIndex);
06640         }
06641     }
06642
06643     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstStillSizedLineIndex", firstStillSizedLineIndex);
06644     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastStillSizedLineIndex", lastStillSizedLineIndex);
06645     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstStillSizedItemIndex", firstStillSizedItemIndex);
06646     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastStillSizedItemIndex", lastStillSizedItemIndex);
06647     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstStillRealizedItemIndex", firstStillRealizedItemIndex);
06648     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastStillRealizedItemIndex", lastStillRealizedItemIndex);
06649
06650     // Discard the first realized items fallen off the realization window.
06651     if (m_elementManager.GetFirstRealizedDataIndex() != -1 && unrealizedNearItemCount > m_elementManager.GetFirstRealizedDataIndex())
06652     {
06653         MUX_ASSERT(m_isVirtualizingContext);
06654
06655         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized head range",
06656             m_elementManager.GetFirstRealizedDataIndex(), unrealizedNearItemCount - 1);
06657
06658         m_elementManager.DiscardElementsOutsideWindow(
06659             false /*forward*/,
06660             std::min(unrealizedNearItemCount, m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount()) - 1 /*startIndex*/);
06661     }
06662
06663     MUX_ASSERT(unrealizedNearItemCount <= m_elementManager.GetFirstRealizedDataIndex() || -1 == m_elementManager.GetFirstRealizedDataIndex());
06664
06665     if (m_elementManager.GetFirstRealizedDataIndex() != -1 && unrealizedNearItemCount < m_elementManager.GetFirstRealizedDataIndex())
06666     {
06667         MUX_ASSERT(oldFirstRealizedDataIndex > 0);
06668
06669         // Ensure and measure the realized items before the old first realized item.
06670         EnsureAndMeasureItemRange(
06671             context,
06672             availableWidth,
06673             actualLineHeight,
06674             false /*forward*/,
06675             std::min(oldFirstRealizedDataIndex - 1, unrealizedNearItemCount + realizedItemCount - 1) /*beginRealizedItemIndex*/,
06676             unrealizedNearItemCount /*endRealizedItemIndex*/);
06677
06678         // Ensure and measure the realized & unfrozen items after the old first realized item.
06679         MUX_ASSERT(unrealizedNearItemCount == m_elementManager.GetFirstRealizedDataIndex());
06680
06681         if (firstStillRealizedItemIndex != -1)
06682         {
06683             if (firstStillRealizedItemIndex > 0 && oldFirstRealizedDataIndex <= firstStillRealizedItemIndex - 1)
06684             {
06685                 EnsureAndMeasureItemRange(
06686                     context,
06687                     availableWidth,
06688                     actualLineHeight,
06689                     true /*forward*/,
06690                     oldFirstRealizedDataIndex /*beginRealizedItemIndex*/,
06691                     firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
06692             }
06693
06694             if (lastStillRealizedItemIndex + 1 <= unrealizedNearItemCount + realizedItemCount - 1)
06695             {
06696                 EnsureAndMeasureItemRange(
06697                     context,
06698                     availableWidth,
06699                     actualLineHeight,
06700                     true /*forward*/,
06701                     lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
06702                     unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
06703             }
06704         }
06705         else if (unrealizedNearItemCount + realizedItemCount - 1 >= oldFirstRealizedDataIndex)
06706         {
06707             EnsureAndMeasureItemRange(
06708                 context,
06709                 availableWidth,
06710                 actualLineHeight,
06711                 true /*forward*/,
06712                 oldFirstRealizedDataIndex /*beginRealizedItemIndex*/,
06713                 unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
06714         }
06715     }
06716     else
06717     {
06718         // Ensure and measure the realized & unfrozen items.
06719         MUX_ASSERT(unrealizedNearItemCount == m_elementManager.GetFirstRealizedDataIndex() || m_elementManager.GetFirstRealizedDataIndex() == -1);
06720
06721         if (firstStillRealizedItemIndex != -1)
06722         {
06723             if (firstStillRealizedItemIndex > 0 && unrealizedNearItemCount <= firstStillRealizedItemIndex - 1)
06724             {
06725                 EnsureAndMeasureItemRange(
06726                     context,
06727                     availableWidth,
06728                     actualLineHeight,
06729                     true /*forward*/,
06730                     unrealizedNearItemCount /*beginRealizedItemIndex*/,
06731                     firstStillRealizedItemIndex - 1 /*endRealizedItemIndex*/);
06732             }
06733
06734             if (lastStillRealizedItemIndex + 1 <= unrealizedNearItemCount + realizedItemCount - 1)
06735             {
06736                 EnsureAndMeasureItemRange(
06737                     context,
06738                     availableWidth,
06739                     actualLineHeight,
06740                     true /*forward*/,
06741                     lastStillRealizedItemIndex + 1 /*beginRealizedItemIndex*/,
06742                     unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
06743             }
06744         }
06745         else
06746         {
06747             EnsureAndMeasureItemRange(
06748                 context,
06749                 availableWidth,
06750                 actualLineHeight,
06751                 true /*forward*/,
06752                 unrealizedNearItemCount /*beginRealizedItemIndex*/,
06753                 unrealizedNearItemCount + realizedItemCount - 1 /*endRealizedItemIndex*/);
06754         }
06755     }
06756
06757     // Discard the last realized items fallen off the realization window.
06758     if (m_isVirtualizingContext && unrealizedFarLineCount > 0 && m_elementManager.GetRealizedElementCount() > realizedItemCount)
06759     {
06760         LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"discarded realized tail range",
06761             unrealizedNearItemCount + realizedItemCount, m_elementManager.GetFirstRealizedDataIndex() + m_elementManager.GetRealizedElementCount() - 1);
06762
06763         m_elementManager.DiscardElementsOutsideWindow(
06764             true /*forward*/,
06765             unrealizedNearItemCount + realizedItemCount /*startIndex*/);
06766     }
06767
06768     MUX_ASSERT(unrealizedNearItemCount >= 0);
06769     MUX_ASSERT(m_isVirtualizingContext || unrealizedNearItemCount == 0);
06770     MUX_ASSERT(!m_isVirtualizingContext || m_elementManager.GetFirstRealizedDataIndex() == unrealizedNearItemCount);
06771     MUX_ASSERT(m_elementManager.GetRealizedElementCount() == realizedItemCount);
06772
06773     if (const auto firstElement = m_elementManager.GetRealizedElement(unrealizedNearItemCount))
06774     {
06775         UpdateRoundingScaleFactor(firstElement);
06776     }
06777
06778     std::pair<double, double> averageItemsPerLine = GetAverageItemsPerLine(availableWidth);
06779
06780     // Only request a new average items per line value when it has never been attempted in this layout pass.
06781     // Otherwise carry on with the current m_averageItemsPerLine value.
06782     if (averageItemsPerLine.second == m_averageItemsPerLine.second)
06783     {
06784         // When the snapped average-items-per-line value is unchanged, just save the raw value if it changed.
06785         if (averageItemsPerLine.first != m_averageItemsPerLine.first)
06786         {
06787             // The new raw value becomes the source of the snapped value and the reference point for detecting
06788             // deltas accross the median point (1.1^(N+1) - 1.1^N) / 2 greater than 0.1.
06789             SetAverageItemsPerLine(averageItemsPerLine);
06790         }
06791     }
06792     else if (averageItemsPerLineProcessed.find(averageItemsPerLine.second) == averageItemsPerLineProcessed.end())
06793     {
06794         *newAverageItemsPerLine = averageItemsPerLine;
06795
06796         m_firstSizedLineIndex = -1;
06797         m_lastSizedLineIndex = -1;
06798         return lineCount;
06799     }
06800
06801     MUX_ASSERT(!(firstStillSizedLineIndex != -1 && forceRelayout));
06802     MUX_ASSERT(unrealizedNearItemCount >= 0);
06803     MUX_ASSERT(m_isVirtualizingContext || unrealizedNearItemCount == 0);
06804     MUX_ASSERT(!m_isVirtualizingContext || m_elementManager.GetFirstRealizedDataIndex() == unrealizedNearItemCount);
06805     MUX_ASSERT(unsizedNearItemCount <= unrealizedNearItemCount);
06806
06807     const bool itemHasNewDesiredWidth = ComputeFrozenItemsAndLayout(
06808         context,
06809         oldLineItemCounts,
06810         oldElementAvailableWidths,
06811         oldElementDesiredWidths,
06812         scrollViewport,
06813         scrollOffset,
06814         lineSpacing,
06815         actualLineHeight,
06816         availableWidth,
06817         nearSizedItemsRect,
06818         farSizedItemsRect,
06819         nearRealizationRect,
06820         farRealizationRect,
06821         lineCount,
06822         sizedLineCount,
06823         unsizedNearItemCount,
06824         sizedItemCount,
06825         firstStillSizedLineIndex,
06826         lastStillSizedLineIndex,
06827         firstStillSizedItemIndex,
06828         lastStillSizedItemIndex);
06829
06830 #ifdef DBG
06831     const int sizedItemCountDbg = LineItemsCountTotal(m_lastSizedItemIndex - m_firstSizedItemIndex + 1);
06832
06833     VerifyLockedItemsDbg();
06834 #endif
06835
06836     if (itemHasNewDesiredWidth)
06837     {
06838         // When at least one item has a new desired width, the average items-per-line evaluation may change.
06839         averageItemsPerLine = GetAverageItemsPerLine(availableWidth);
06840
06841         if (averageItemsPerLine.second != m_averageItemsPerLine.second &&
06842             averageItemsPerLineProcessed.find(averageItemsPerLine.second) == averageItemsPerLineProcessed.end())
06843         {
06844             // Computed average items-per-line is different and has not been processed yet.
06845             m_firstSizedLineIndex = -1;
06846             m_lastSizedLineIndex = -1;
06847
06848             // Return the new average which will trigger a new layout.
06849             *newAverageItemsPerLine = averageItemsPerLine;
06850         }
06851     }
06852
06853     return lineCount;
06854 }
06855
06856 // Measures a range of realized items based on the final arrange widths stored in m_itemsInfoArrangeWidths.
06857 void LinedFlowLayout::MeasureItemRange(
06858     double actualLineHeight,
06859     int beginRealizedItemIndex,
06860     int endRealizedItemIndex)
06861 {
06862     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginRealizedItemIndex", beginRealizedItemIndex);
06863     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endRealizedItemIndex", endRealizedItemIndex);
06864
06865     MUX_ASSERT(beginRealizedItemIndex >= 0);
06866     MUX_ASSERT(beginRealizedItemIndex <= endRealizedItemIndex);
06867     MUX_ASSERT(m_itemsInfoArrangeWidths.size() > 0);
06868
06869     const int itemsInfoArrangeWidthsOffset = m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex;
06870
06871     for (int realizedItemIndex = beginRealizedItemIndex; realizedItemIndex <= endRealizedItemIndex; realizedItemIndex++)
06872     {
06873         MUX_ASSERT(m_elementManager.IsDataIndexRealized(realizedItemIndex));
06874
06875         const auto element = m_elementManager.GetRealizedElement(realizedItemIndex /*dataIndex*/);
06876
06877         // Making sure the element is not null for safety.
06878         if (element)
06879         {
06880             MUX_ASSERT(realizedItemIndex - itemsInfoArrangeWidthsOffset<static_cast<int>(m_itemsInfoArrangeWidths.size()));
06881
06882             const float arrangeWidth = m_itemsInfoArrangeWidths[static_cast<size_t>(realizedItemIndex) - itemsInfoArrangeWidthsOffset];
06883
06884             if (arrangeWidth >= 0.0f)
06885             {
06886                 element.Measure(winrt::Size{ arrangeWidth, static_cast<float>(actualLineHeight) });
06887             }
06888
06889 #ifdef DBG
06890             if (realizedItemIndex == m_logItemIndexDbg)
06891             {
06892                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
06893                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize",
06894                     arrangeWidth,
06895                     actualLineHeight);
06896                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
06897                     element.DesiredSize().Width,
06898                     element.DesiredSize().Height);
06899             }
06900 #endif
06901         }
06902     }
06903 }
06904
06905 // Measures a range of realized items based on previously computed available widths elementAvailableWidths.
06906 // Re-populates m_elementAvailableWidths with the old & re-applied available widths.
06907 void LinedFlowLayout::MeasureItemRangeRegularPath(
06908     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> elementAvailableWidths,
06909     double actualLineHeight,
06910     int beginRealizedItemIndex,
06911     int endRealizedItemIndex)
06912 {
06913     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"with ElementAvailableSize", beginRealizedItemIndex, endRealizedItemIndex);
06914
06915     MUX_ASSERT(m_itemsInfoFirstIndex == -1);
06916     MUX_ASSERT(beginRealizedItemIndex <= endRealizedItemIndex);
06917     MUX_ASSERT(elementAvailableWidths);
06918
06919     for (int realizedItemIndex = beginRealizedItemIndex; realizedItemIndex <= endRealizedItemIndex; realizedItemIndex++)
06920     {
06921         MUX_ASSERT(m_elementManager.IsDataIndexRealized(realizedItemIndex));
06922
06923         const auto element = m_elementManager.GetRealizedElement(realizedItemIndex /*dataIndex*/);
06924
06925         // Making sure the element is not null for safety.
06926         if (element)
06927         {
06928             const auto elementTracker = tracker_ref<winrt::UIElement>(this, element);
06929             float elementAvailableWidth{ -1.0f };
06930
06931             if (elementAvailableWidths->find(elementTracker) != elementAvailableWidths->end())
06932             {
06933                 // The element has an existing recorded available width because it needs to be scaled up or down, to fill or fit the available line width respectively.
06934                 elementAvailableWidth = elementAvailableWidths->at(elementTracker);
06935
06936                 MUX_ASSERT(m_elementAvailableWidths);
06937                 MUX_ASSERT(m_elementAvailableWidths->find(elementTracker) == m_elementAvailableWidths->end());
06938
06939                 // Maintain that recording and measure the element again with it.
06940                 m_elementAvailableWidths->insert(std::pair<tracker_ref<winrt::UIElement>, float>(elementTracker, elementAvailableWidth));
06941             }
06942             else if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
06943             {
06944                 // The element has no recorded available width because it is not scaled down or up, so only its desired width is recorded.
06945                 const float minWidth = static_cast<float>(frameworkElement.MinWidth());
06946
06947                 if (element.DesiredSize().Width == minWidth)
06948                 {
06949                     // Making sure the item is measured and stretched according to the MinWidth value (otherwise background-colored bands appear on the items' left/right edges).
06950                     elementAvailableWidth = minWidth;
06951                 }
06952             }
06953
06954             if (elementAvailableWidth != -1.0f)
06955             {
06956                 element.Measure(winrt::Size{ elementAvailableWidth, static_cast<float>(actualLineHeight) });
06957             }
06958 #ifdef DBG
06959             if (realizedItemIndex == m_logItemIndexDbg)
06960             {
06961                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
06962                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"measured with elementAvailableSize",
06963                     elementAvailableWidth,
06964                     actualLineHeight);
06965                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"element.DesiredSize",
06966                     element.DesiredSize().Width,
06967                     element.DesiredSize().Height);
06968             }
06969 #endif
06970         }
06971     }
06972 }
06973
06974 // Items measurement when the non-scrolling dimension is unconstrained.
06975 float LinedFlowLayout::MeasureUnconstrainedLine(
06976     winrt::VirtualizingLayoutContext const& context)
06977 {
06978     MUX_ASSERT(m_itemCount == context.ItemCount());
06979     MUX_ASSERT(m_isVirtualizingContext == IsVirtualizingContext(context));
06980     MUX_ASSERT(!UsesArrangeWidthInfo());
06981
06982     const float actualLineHeight = static_cast<float>(ActualLineHeight());
06983     const winrt::Size measureAvailableSize{ std::numeric_limits<float>::infinity(), actualLineHeight };
06984     float desiredWidth = 0.0f;
06985     bool isNewlyRealizedElementMeasuredWithMinWidth = false;
06986
06987     for (int itemIndex = 0; itemIndex < m_itemCount; itemIndex++)
06988     {
06989         bool isElementNewlyRealized = false;
06990
06991         if (m_isVirtualizingContext && !m_elementManager.IsDataIndexRealized(itemIndex))
06992         {
06993             EnsureElementRealized(true /*forward*/, itemIndex);
06994
06995             isElementNewlyRealized = true;
06996         }
06997
06998         if (auto element = m_elementManager.GetAt(itemIndex))
06999         {
07000             element.Measure(measureAvailableSize);
07001
07002             if (const auto frameworkElement = element.try_as<winrt::FrameworkElement>())
07003             {
07004                 const float minWidth = static_cast<float>(frameworkElement.MinWidth());
07005
07006                 if (element.DesiredSize().Width == minWidth)
07007                 {
07008                     // Making sure the item is stretched according to the MinWidth value.
07009                     element.Measure(winrt::Size{ minWidth, actualLineHeight });
07010
07011                     if (isElementNewlyRealized)
07012                     {
07013                         isNewlyRealizedElementMeasuredWithMinWidth = true;
07014                     }
07015                 }
07016             }
07017
07018             desiredWidth += element.DesiredSize().Width;
07019         }
07020     }
07021
07022     if (isNewlyRealizedElementMeasuredWithMinWidth)
07023     {
07024         InvalidateMeasureTimerStart(0 /*tickCount*/);
07025     }
07026
07027     SetAverageItemsPerLine(SnapAverageItemsPerLine(
07028         m_averageItemsPerLine.first /*oldAverageItemsPerLineRaw*/,
07029         m_itemCount /*newAverageItemsPerLineRaw*/));
07030
07031     if (m_itemCount > 0)
07032     {
07033         desiredWidth += static_cast<float>((m_itemCount - 1) * MinItemSpacing());
07034     }
07035
07036     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_DBL, METH_NAME, this, desiredWidth);
07037
07038     return desiredWidth;
07039 }
07040
07041 // Raises the LayoutsTestHooks LinedFlowLayoutInvalidated event for testing purposes.
07042 void LinedFlowLayout::NotifyLinedFlowLayoutInvalidatedDbg(
07043     winrt::LinedFlowLayoutInvalidationTrigger const& invalidationTrigger)
07044 {
07045     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT, METH_NAME, this, static_cast<int>(invalidationTrigger));
07046
07047     com_ptr<LayoutsTestHooks> globalTestHooks = LayoutsTestHooks::GetGlobalTestHooks();
07048
07049     if (globalTestHooks)
07050     {
07051         globalTestHooks->NotifyLinedFlowLayoutInvalidated(*this, invalidationTrigger);
07052     }
07053 }
07054
07055 // Raises the LayoutsTestHooks LinedFlowLayoutItemLocked event for testing purposes.
07056 void LinedFlowLayout::NotifyLinedFlowLayoutItemLockedDbg(
07057     int itemIndex,
07058     int lineIndex)
07059 {
07060     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, itemIndex, lineIndex);
07061
07062     com_ptr<LayoutsTestHooks> globalTestHooks = LayoutsTestHooks::GetGlobalTestHooks();
07063
07064     if (globalTestHooks)
07065     {
07066         globalTestHooks->NotifyLinedFlowLayoutItemLocked(*this, itemIndex, lineIndex);
07067     }
07068 }
07069
07070 LinedFlowLayout::ItemsInfo LinedFlowLayout::RaiseItemsInfoRequested(
07071     int itemsRangeStartIndex,
07072     int itemsRangeRequestedLength)
07073 {
07074     MUX_ASSERT(itemsRangeStartIndex >= 0);
07075     MUX_ASSERT(itemsRangeRequestedLength > 0);
07076     MUX_ASSERT(itemsRangeStartIndex + itemsRangeRequestedLength - 1 < m_itemCount);
07077
07078     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsRangeStartIndex", itemsRangeStartIndex);
07079     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsRangeRequestedLength", itemsRangeRequestedLength);
07080
07081     if (m_itemsInfoRequestedEventSource)
07082     {
07083         auto itemsInfoRequestedEventArgs = winrt::make_self<LinedFlowLayoutItemsInfoRequestedEventArgs>(*this, itemsRangeStartIndex, itemsRangeRequestedLength);
07084
07085         if (itemsInfoRequestedEventArgs != nullptr)
07086         {
07087             m_itemsInfoRequestedEventSource(*this, *itemsInfoRequestedEventArgs);
07088
07089             // Disconnect the LinedFlowLayout from the LinedFlowLayoutItemsInfoRequestedEventArgs so that any subsequent calls to
07090             // SetDesiredAspectRatios/SetMinWiths/SetMaxWiths have no effect.
07091             itemsInfoRequestedEventArgs->ResetLinedFlowLayout();
07092
07093             // The original LinedFlowLayoutItemsInfoRequestedEventArgs.ItemsRangeStartIndex value may have been overwritten by the handler to a smaller value.
07094             // This allows a handler to provide more information than requested, because it's available and performant to do so. It reduces subsequent needs to
07095             // raise the ItemsRangeStartIndex event again.
07096             return ItemsInfo{
07097                 itemsInfoRequestedEventArgs->ItemsRangeStartIndex(),
07098                 itemsInfoRequestedEventArgs->ItemsRangeLength(),
07099                 static_cast<float>(itemsInfoRequestedEventArgs->MinWidth()),
07100                 static_cast<float>(itemsInfoRequestedEventArgs->MaxWidth()) };
07101         }
07102     }
07103
07104     return s_emptyItemsInfo;
07105 }
07106
07107 // Returns the index of the first sized item, or -1 if there is none.
07108 // This property is meant to be accessed by LinedFlowLayout consumers
07109 // when a sizing information changed and LinedFlowLayout.InvalidateItemsInfo
07110 // may need to be called. If the sizing information changed for an item outside
07111 // the [RequestedRangeStartIndex, RequestedRangeStartIndex + RequestedRangeLength - 1]
07112 // range, there is no need to call InvalidateItemsInfo. It would trigger a wasteful
07113 // layout pass.
07114 int LinedFlowLayout::RequestedRangeStartIndex()
07115 {
07116     return UsesFastPathLayout() ? 0 : m_itemsInfoFirstIndex;
07117 }
07118
07119 // Returns the number of sized items. Like RequestedRangeStartIndex, this property
07120 // is meant to be used to determine whether LinedFlowLayout.InvalidateItemsInfo must be
07121 // called after a sizing information change (i.e. a temporary aspect ratio needs to
07122 // be replaced with its final value for example).
07123 int LinedFlowLayout::RequestedRangeLength()
07124 {
07125     return UsesFastPathLayout() ? m_itemCount : static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size());
07126 }
07127
07128 // Based on info provided by a potential ItemsInfoRequested event handler, returns True when the info covers the entire data source and the fast path must be engaged, and False to stay in the regular path.
07129 // Before returning False, this method updates the m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath, m_itemsInfoArrangeWidths and
07130 // m_itemsInfoFirstIndex fields. The m_itemsInfoMinWidth and m_itemsInfoMaxWidth fields are updated irrespective of the return value.
07131 bool LinedFlowLayout::RequestItemsInfo(
07132     ItemsInfo const& itemsInfo,
07133     int beginSizedItemIndex,
07134     int endSizedItemIndex)
07135 {
07136     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"beginSizedItemIndex", beginSizedItemIndex);
07137     LINEDFLOWLAYOUT_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"endSizedItemIndex", endSizedItemIndex);
07138
07139     MUX_ASSERT(beginSizedItemIndex <= endSizedItemIndex);
07140     MUX_ASSERT(beginSizedItemIndex >= m_firstSizedItemIndex);
07141     MUX_ASSERT(endSizedItemIndex <= m_lastSizedItemIndex);
07142
07143     ItemsInfo newItemsInfo{};
07144     int desiredAspectRatiosCount{};
07145
07146     if (itemsInfo.m_itemsRangeStartIndex != -1 &&
07147         beginSizedItemIndex >= itemsInfo.m_itemsRangeStartIndex &&
07148         endSizedItemIndex <= itemsInfo.m_itemsRangeStartIndex + itemsInfo.m_itemsRangeLength - 1)
07149     {
07150         // The items info gathered during the fast path attempt covers the current request.
07151         // Use it instead of launching a new request.
07152         newItemsInfo = itemsInfo;
07153
07154         desiredAspectRatiosCount = newItemsInfo.m_itemsRangeLength;
07155
07156         MUX_ASSERT(desiredAspectRatiosCount == static_cast<int>(m_itemsInfoDesiredAspectRatiosForFastPath.size()));
07157         MUX_ASSERT(desiredAspectRatiosCount >= endSizedItemIndex - beginSizedItemIndex + 1);
07158     }
07159     else
07160     {
07161         const int itemsRangeStartIndex{ beginSizedItemIndex };
07162         const int itemsRangeRequestedLength{ endSizedItemIndex - beginSizedItemIndex + 1 };
07163
07164         MUX_ASSERT(itemsRangeStartIndex + itemsRangeRequestedLength - 1 < m_itemCount);
07165
07166         newItemsInfo = RaiseItemsInfoRequested(itemsRangeStartIndex, itemsRangeRequestedLength);
07167
07168 #ifdef DBG
07169         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR, METH_NAME, this, L"ItemsInfo for regular path");
07170         LogItemsInfoDbg(itemsRangeStartIndex, itemsRangeRequestedLength, newItemsInfo);
07171 #endif
07172
07173         desiredAspectRatiosCount = newItemsInfo.m_itemsRangeLength;
07174
07175         if (desiredAspectRatiosCount <= 0)
07176         {
07177             // No aspect ratios were provided. Discard all info and use the fallback pass with larger realization rect.
07178             ResetItemsInfo();
07179             return false;
07180         }
07181
07182         MUX_ASSERT(newItemsInfo.m_itemsRangeStartIndex >= 0);
07183         MUX_ASSERT(newItemsInfo.m_itemsRangeStartIndex <= beginSizedItemIndex);
07184         MUX_ASSERT(newItemsInfo.m_itemsRangeStartIndex + desiredAspectRatiosCount - 1 >= endSizedItemIndex);
07185     }
07186
07187     m_itemsInfoMinWidth = newItemsInfo.m_minWidth < 0.0 ? -1.0 : newItemsInfo.m_minWidth;
07188     m_itemsInfoMaxWidth = newItemsInfo.m_maxWidth < 0.0 ? -1.0 : newItemsInfo.m_maxWidth;
07189
07190     const int minWidthsCount = static_cast<int>(m_itemsInfoMinWidthsForFastPath.size());
07191     const int maxWidthsCount = static_cast<int>(m_itemsInfoMaxWidthsForFastPath.size());
07192     const int itemsRangeLength = std::min(desiredAspectRatiosCount, m_itemCount - newItemsInfo.m_itemsRangeStartIndex);
07193
07194     MUX_ASSERT(itemsRangeLength > 0);
07195
07196     if (itemsRangeLength == m_itemCount)
07197     {
07198         // The ItemsInfoRequested event handler provided ratios for the entire data source. This situation can occur when a measure path
07199         // is performed and (m_forceRelayout || m_previousAvailableWidth != availableWidth) evaluated to False in the initial fast path attempt,
07200         // in LinedFlowLayout::MeasureConstrainedLinesFastPath. The ItemsInfoRequested event was thus skipped. Here a transition from regular path
07201         // to fast path is enabled. One of two unfortunate behaviors needs to be picked:
07202         // a. Remain in the regular path until a future measure path with m_forceRelayout==True or a different availableWidth is triggered.
07203         //    The m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath
07204         //    vectors could grow very large hindering performance.
07205         // b. Stop the regular path and backtrack to the fast path since aspect ratios were provided for the entire collection.
07206         //    This can result in a re-arrangement of the visible items.
07207         // Option b. is picked for its perf benefits.
07208         return true;
07209     }
07210
07211     if (m_itemsInfoFirstIndex == -1)
07212     {
07213         m_itemsInfoFirstIndex = newItemsInfo.m_itemsRangeStartIndex;
07214     }
07215     else
07216     {
07217         m_itemsInfoFirstIndex = std::min(newItemsInfo.m_itemsRangeStartIndex, m_itemsInfoFirstIndex);
07218     }
07219
07220     const int minItemsInfoRequiredSize = std::min(newItemsInfo.m_itemsRangeStartIndex + itemsRangeLength - m_itemsInfoFirstIndex, m_itemCount);
07221
07222     if (static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()) < minItemsInfoRequiredSize)
07223     {
07224         m_itemsInfoDesiredAspectRatiosForRegularPath.resize(minItemsInfoRequiredSize, -1.0);
07225     }
07226
07227     if (minWidthsCount > 0 && static_cast<int>(m_itemsInfoMinWidthsForRegularPath.size()) < minItemsInfoRequiredSize)
07228     {
07229         m_itemsInfoMinWidthsForRegularPath.resize(minItemsInfoRequiredSize, -1.0);
07230     }
07231
07232     if (maxWidthsCount > 0 && static_cast<int>(m_itemsInfoMaxWidthsForRegularPath.size()) < minItemsInfoRequiredSize)
07233     {
07234         m_itemsInfoMaxWidthsForRegularPath.resize(minItemsInfoRequiredSize, -1.0);
07235     }
07236
07237     if (static_cast<int>(m_itemsInfoArrangeWidths.size()) < minItemsInfoRequiredSize)
07238     {
07239         m_itemsInfoArrangeWidths.resize(minItemsInfoRequiredSize, -1.0f);
07240     }
07241
07242     const int itemsInfoIndexStart = newItemsInfo.m_itemsRangeStartIndex - m_itemsInfoFirstIndex;
07243
07244     for (int index = 0; index < itemsRangeLength; index++)
07245     {
07246         const double desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForFastPath[index];
07247
07248         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"desiredAspectRatio", desiredAspectRatio);
07249
07250         SetDesiredAspectRatioFromItemsInfo(
07251             m_itemsInfoFirstIndex + itemsInfoIndexStart + index,
07252             desiredAspectRatio);
07253
07254         MUX_ASSERT(m_itemsInfoDesiredAspectRatiosForRegularPath[itemsInfoIndexStart + index] == desiredAspectRatio);
07255
07256         if (minWidthsCount > 0 && index < minWidthsCount)
07257         {
07258             LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"minWidth", m_itemsInfoMinWidthsForFastPath[index]);
07259
07260             m_itemsInfoMinWidthsForRegularPath[static_cast<size_t>(itemsInfoIndexStart) + index] = m_itemsInfoMinWidthsForFastPath[index];
07261         }
07262
07263         if (maxWidthsCount > 0 && index < maxWidthsCount)
07264         {
07265             LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"maxWidth", m_itemsInfoMaxWidthsForFastPath[index]);
07266
07267             m_itemsInfoMaxWidthsForRegularPath[static_cast<size_t>(itemsInfoIndexStart) + index] = m_itemsInfoMaxWidthsForFastPath[index];
07268         }
07269     }
07270
07271     return false;
07272 }
07273
07274 void LinedFlowLayout::ResetItemsInfo()
07275 {
07276     m_itemsInfoDesiredAspectRatiosForRegularPath.clear();
07277     m_itemsInfoMinWidthsForRegularPath.clear();
07278     m_itemsInfoMaxWidthsForRegularPath.clear();
07279     m_itemsInfoArrangeWidths.clear();
07280     m_itemsInfoFirstIndex = -1;
07281     m_itemsInfoMinWidth = -1.0f;
07282     m_itemsInfoMaxWidth = -1.0f;
07283 }
07284
07285 void LinedFlowLayout::ResetItemsInfoForFastPath()
07286 {
07287     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
07288
07289     m_itemsInfoDesiredAspectRatiosForFastPath.clear();
07290     m_itemsInfoMinWidthsForFastPath.clear();
07291     m_itemsInfoMaxWidthsForFastPath.clear();
07292 }
07293
07294 void LinedFlowLayout::ResetLinesInfo()
07295 {
07296     m_lineItemCounts.clear();
07297 }
07298
07299 void LinedFlowLayout::ResetSizedLines()
07300 {
07301     m_firstSizedLineIndex = -1;
07302     m_lastSizedLineIndex = -1;
07303     m_firstSizedItemIndex = -1;
07304     m_lastSizedItemIndex = -1;
07305     m_firstFrozenLineIndex = -1;
07306     m_lastFrozenLineIndex = -1;
07307     m_firstFrozenItemIndex = -1;
07308     m_lastFrozenItemIndex = -1;
07309 }
07310
07311 // Stores the item's arrange width in the m_itemsInfoArrangeWidths vector.
07312 void LinedFlowLayout::SetArrangeWidthFromItemsInfo(
07313     int itemIndex,
07314     float arrangeWidth)
07315 {
07316 #ifdef DBG
07317     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex", itemIndex);
07318
07319     if (itemIndex == m_logItemIndexDbg)
07320     {
07321         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
07322         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
07323     }
07324     else
07325     {
07326         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"arrangeWidth", arrangeWidth);
07327     }
07328 #endif
07329
07330     MUX_ASSERT(m_itemsInfoFirstIndex >= -1);
07331
07332     // m_itemsInfoFirstIndex >=  0: Regular path layout case, with items info available (m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath).
07333     // m_itemsInfoFirstIndex == -1: Fast path layout case, without items info available.
07334     const int itemsInfoArrangeWidthsIndex = itemIndex - (m_itemsInfoFirstIndex == -1 ? 0 : m_itemsInfoFirstIndex);
07335
07336     MUX_ASSERT(itemsInfoArrangeWidthsIndex >= 0);
07337     MUX_ASSERT(itemsInfoArrangeWidthsIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));
07338
07339     m_itemsInfoArrangeWidths[itemsInfoArrangeWidthsIndex] = arrangeWidth;
07340 }
07341
07342 void LinedFlowLayout::SetAverageItemsPerLine(
07343     std::pair<double, double> averageItemsPerLine,
07344     bool unlockItems)
07345 {
07346     if (averageItemsPerLine.second == m_averageItemsPerLine.second)
07347     {
07348         // When the old and new snapped average-items-per-line are identical,
07349         // just retain the raw value change.
07350         m_averageItemsPerLine.first = averageItemsPerLine.first;
07351     }
07352     else
07353     {
07354         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL_DBL, METH_NAME, this, m_averageItemsPerLine.second, averageItemsPerLine.second);
07355
07356         m_averageItemsPerLine = averageItemsPerLine;
07357
07358         if (unlockItems)
07359         {
07360             UnlockItems();
07361         }
07362
07363         com_ptr<LayoutsTestHooks> globalTestHooks = LayoutsTestHooks::GetGlobalTestHooks();
07364
07365         if (globalTestHooks)
07366         {
07367             globalTestHooks->NotifyLinedFlowLayoutSnappedAverageItemsPerLineChanged(*this);
07368         }
07369     }
07370 }
07371
07372 void LinedFlowLayout::SetDesiredAspectRatioFromItemsInfo(
07373     int itemIndex,
07374     double desiredAspectRatio)
07375 {
07376 #ifdef DBG
07377     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex", itemIndex);
07378
07379     if (itemIndex == m_logItemIndexDbg)
07380     {
07381         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
07382         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"desiredAspectRatio", desiredAspectRatio);
07383     }
07384     else
07385     {
07386         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"desiredAspectRatio", desiredAspectRatio);
07387     }
07388
07389     MUX_ASSERT(itemIndex < m_itemCount);
07390     MUX_ASSERT(m_itemsInfoFirstIndex >= 0);
07391     MUX_ASSERT(itemIndex - m_itemsInfoFirstIndex >= 0);
07392     MUX_ASSERT(itemIndex - m_itemsInfoFirstIndex < static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size()));
07393 #endif
07394
07395     m_itemsInfoDesiredAspectRatiosForRegularPath[static_cast<size_t>(itemIndex) - m_itemsInfoFirstIndex] = desiredAspectRatio;
07396 }
07397
07398 // Returns the total arrange width for the provided index range.
07399 float LinedFlowLayout::SetItemRangeArrangeWidth(
07400     int beginItemIndex,
07401     int endItemIndex,
07402     double actualLineHeight,
07403     double averageAspectRatio,
07404     double scaleFactor)
07405 {
07406     MUX_ASSERT(beginItemIndex <= endItemIndex);
07407     MUX_ASSERT(beginItemIndex >= 0);
07408     MUX_ASSERT(endItemIndex < static_cast<int>(m_itemsInfoArrangeWidths.size()));
07409
07410     float totalArrangeWidth = 0.0f;
07411
07412     for (int itemIndex = beginItemIndex; itemIndex <= endItemIndex; itemIndex++)
07413     {
07414         const float arrangeWidth = GetArrangeWidthFromItemsInfo(itemIndex, actualLineHeight, averageAspectRatio, scaleFactor);
07415
07416         SetArrangeWidthFromItemsInfo(itemIndex, arrangeWidth);
07417
07418         totalArrangeWidth += arrangeWidth;
07419     }
07420
07421     return totalArrangeWidth;
07422 }
07423
07424 // Snaps the provided average items per line to a power of 1.1, taking into account the old averageItemsPerLine raw (i.e. unsnapped) value.
07425 std::pair<double, double> LinedFlowLayout::SnapAverageItemsPerLine(
07426     double oldAverageItemsPerLineRaw,
07427     double newAverageItemsPerLineRaw) const
07428 {
07429     MUX_ASSERT(oldAverageItemsPerLineRaw == 0.0 || oldAverageItemsPerLineRaw >= 1.0);
07430     MUX_ASSERT(newAverageItemsPerLineRaw == 0.0 || newAverageItemsPerLineRaw >= 1.0);
07431
07432     // A snapped average-items-per-line value must be a power of 1.1.
07433     constexpr double valuePower = 1.1;
07434     // When the raw value crosses the median line betweeen two successive powers of 1.1, the old snapped value is retained unless the raw delta is greater than 0.1.
07435     constexpr double distanceThreshold = 0.1;
07436     const double appliedValuePower = m_forcedAverageItemsPerLineDividerDbg == 0.0 ? valuePower : m_forcedAverageItemsPerLineDividerDbg;
07437     const double oldAverageItemsPerLineSnapped = (oldAverageItemsPerLineRaw == 0.0) ? 0.0 : SnapToPower(oldAverageItemsPerLineRaw, appliedValuePower);
07438     const double newAverageItemsPerLineSnapped = (newAverageItemsPerLineRaw == 0.0) ? 0.0 : SnapToPower(newAverageItemsPerLineRaw, appliedValuePower);
07439
07440     if (oldAverageItemsPerLineSnapped != newAverageItemsPerLineSnapped &&
07441         std::abs(oldAverageItemsPerLineRaw - newAverageItemsPerLineRaw) <= distanceThreshold)
07442     {
07443         // The old and new snapped values are different, but their respective raw values are close (i.e. within a distanceThreshold delta).
07444         // Instead of returning newAverageItemsPerLineSnapped, return oldAverageItemsPerLineSnapped so the applied average items per line
07445         // is more stable when the raw values hover around the middle point between 1.1^N and 1.1^(N+1).
07446         // Example:
07447         // 1.1^14 = 3.7975, 1.1^15 = 4.1772. Their middle point is about 3.9874.
07448         // oldAverageItemsPerLineRaw = 3.95 snapped to oldAverageItemsPerLineSnapped = 1.1^14 = 3.7975.
07449         // newAverageItemsPerLineRaw = 4.00 would normally snap to 1.1^15 = 4.1772, but because |3.95 - 4.00| <= 0.1, the old pair is returned.
07450         return std::pair<double, double>(oldAverageItemsPerLineRaw, oldAverageItemsPerLineSnapped);
07451     }
07452
07453     return std::pair<double, double>(newAverageItemsPerLineRaw, newAverageItemsPerLineSnapped);
07454 }
07455
07456 // Snaps the provided value to a power of valuePower.
07457 // Example: value=3.75 snaps to 1.1^14 = 3.7975, valuePower being 1.1.
07458 double LinedFlowLayout::SnapToPower(
07459     double value,
07460     double valuePower) const
07461 {
07462 #ifdef DBG
07463     constexpr double defaultValuePowerDbg = 1.1;
07464
07465     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"value", value);
07466     if (valuePower != defaultValuePowerDbg)
07467     {
07468         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valuePower", valuePower);
07469     }
07470
07471     MUX_ASSERT(value >= 1.0);
07472 #endif
07473
07474     const double dividerLog = std::log(valuePower);
07475     const double valueLog = std::log(value);
07476     const double valueExp = std::ceil(valueLog / dividerLog);
07477     const double valueRndCeil = std::pow(valuePower, valueExp);
07478     const double valueRndFloor = valueRndCeil / valuePower;
07479
07480 #ifdef DBG
07481     if (valuePower != defaultValuePowerDbg)
07482     {
07483         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"dividerLog", dividerLog);
07484         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueLog", valueLog);
07485     }
07486     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueExp", valueExp);
07487     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueRndCeil", valueRndCeil);
07488     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"valueRndFloor", valueRndFloor);
07489 #endif
07490
07491     // Return valuePower^valueExp or valuePower^(valueExp - 1), whichever is closest to value.
07492     if (std::abs(valueRndCeil - value) <= std::abs(valueRndFloor - value))
07493     {
07494         return valueRndCeil;
07495     }
07496     else
07497     {
07498         return valueRndFloor;
07499     }
07500 }
07501
07502 // Raises the ItemsUnlocked event when there are locked items.
07503 // This event is raised when previously locked items are cleared and declared unlocked because the source collection
07504 // or the average items per line changed.
07505 void LinedFlowLayout::UnlockItems()
07506 {
07507     if (m_lockedItemIndexes.size() > 0 || m_isFirstOrLastItemLocked)
07508     {
07509         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, m_lockedItemIndexes.size(), m_isFirstOrLastItemLocked);
07510
07511         m_lockedItemIndexes.clear();
07512         m_isFirstOrLastItemLocked = false;
07513         m_itemsUnlockedEventSource(*this, nullptr);
07514     }
07515 }
07516
07517 // Computes the ActualLineHeight property value. Returns True when it changed.
07518 bool LinedFlowLayout::UpdateActualLineHeight(
07519     winrt::VirtualizingLayoutContext const& context,
07520     winrt::Size const& availableSize)
07521 {
07522     const double lineHeight = LineHeight();
07523     const double oldActualLineHeight = ActualLineHeight();
07524     double newActualLineHeight{ 0.0 };
07525
07526     if (std::isnan(lineHeight))
07527     {
07528         if (context.ItemCount() > 0)
07529         {
07530             winrt::UIElement element = nullptr;
07531             winrt::Size desiredSize{ -1.0f, -1.0f };
07532
07533             // Element for first data item determines ActualLineHeight value.
07534             if (oldActualLineHeight != 0.0 &&
07535                 m_elementManager.IsDataIndexRealized(0) &&
07536                 (element = m_elementManager.GetRealizedElement(0)))
07537             {
07538                 // Check if the realized element at index 0 has a recorded desired or available size
07539                 // to restore after measurement with the provided 'availableSize'.
07540                 desiredSize = GetDesiredSizeForAvailableSize(0, element, availableSize, oldActualLineHeight);
07541
07542                 if (desiredSize.Height != -1.0f)
07543                 {
07544                     newActualLineHeight = desiredSize.Height;
07545                 }
07546                 // Else use context.GetOrCreateElementAt instead.
07547             }
07548
07549             if (desiredSize.Height == -1.0f)
07550             {
07551                 // The element for the first item is not realized or has no recorded measurement size, so generate a new element and let it be recycled.
07552                 // Since LineHeight is NaN, this element is not meant to have a height based on content asynchronously loaded.
07553                 // That would lead to a temporary incorrect ActualLineHeight and potentially numerous item realizations.
07554                 if (element = context.GetOrCreateElementAt(0 /*dataIndex*/, winrt::ElementRealizationOptions::ForceCreate))
07555                 {
07556                     element.Measure(availableSize);
07557                     newActualLineHeight = element.DesiredSize().Height;
07558                     //TODO: Bug 41896454.
07559                     //      Why is this RecycleElement call triggering endless measure passes?
07560                     //      This element needs to be discarded or else bring-into-view operations to index 0 will be animated (because index 0 is considered realized).
07561                     //context.RecycleElement(element);
07562                 }
07563             }
07564         }
07565     }
07566     else
07567     {
07568         newActualLineHeight = lineHeight;
07569     }
07570
07571     if (oldActualLineHeight != newActualLineHeight)
07572     {
07573         LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_DBL, METH_NAME, this, newActualLineHeight);
07574
07575         ActualLineHeight(newActualLineHeight);
07576
07577         return true;
07578     }
07579
07580     return false;
07581 }
07582
07583 // Updates the m_aspectRatios storage based on the items info collected from the ItemsInfoRequested event handler.
07584 // The aspect ratios put in the storage immediately get the maximum weight c_maxAspectRatioWeight as the application-provided
07585 // information is fully trusted.
07586 // The application may not provide accurate aspect ratios though. It may temporarily provide placeholder ratios until the
07587 // accurate values are evaluated, at which point it calls LinedFlowLayout.InvalidateItemsInfo. m_aspectRatios then gets updated
07588 // with new aspect ratios with the maximum weight c_maxAspectRatioWeight again.
07589 // The application may also provide aspect ratios <= 0 instead of valid placeholder values. Those temporary values, unlike
07590 // the positive placeholder values, are not stored in m_aspectRatios. The average aspect ratio is a replacement for negative values.
07591 void LinedFlowLayout::UpdateAspectRatiosWithItemsInfo()
07592 {
07593     MUX_ASSERT(m_aspectRatios != nullptr);
07594
07595     const int itemsInfoCount = static_cast<int>(m_itemsInfoDesiredAspectRatiosForRegularPath.size());
07596     const double actualLineHeight = ActualLineHeight();
07597
07598     for (int index = 0; index < itemsInfoCount; index++)
07599     {
07600         double desiredAspectRatio = m_itemsInfoDesiredAspectRatiosForRegularPath[index];
07601
07602         if (desiredAspectRatio <= 0.0)
07603         {
07604             continue;
07605         }
07606
07607         const double minWidth = GetMinWidthFromItemsInfo(m_itemsInfoFirstIndex + index);
07608         const double maxWidth = GetMaxWidthFromItemsInfo(m_itemsInfoFirstIndex + index);
07609
07610         if (minWidth > 0.0 || maxWidth >= 0.0)
07611         {
07612             double desiredWidth = desiredAspectRatio * actualLineHeight;
07613
07614             if (minWidth > 0.0 && minWidth > desiredWidth)
07615             {
07616                 desiredWidth = minWidth;
07617             }
07618
07619             if (maxWidth >= 0.0 && maxWidth < desiredWidth)
07620             {
07621                 desiredWidth = maxWidth;
07622             }
07623
07624             desiredAspectRatio = desiredWidth / actualLineHeight;
07625         }
07626
07627         LinedFlowLayoutItemAspectRatios::ItemAspectRatio itemAspectRatio = m_aspectRatios->GetAt(m_itemsInfoFirstIndex + index);
07628         const float aspectRatio = static_cast<float>(desiredAspectRatio);
07629         bool updateItemAspectRatio = false;
07630
07631         if (itemAspectRatio.m_weight == 0)
07632         {
07633             itemAspectRatio.m_aspectRatio = aspectRatio;
07634             itemAspectRatio.m_weight = c_maxAspectRatioWeight;
07635             updateItemAspectRatio = true;
07636
07637 #ifdef DBG
07638             if (m_itemsInfoFirstIndex + index == m_logItemIndexDbg)
07639             {
07640                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
07641                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"ItemsInfo aspect ratio", aspectRatio);
07642             }
07643 #endif
07644         }
07645         else
07646         {
07647             MUX_ASSERT(itemAspectRatio.m_aspectRatio >= 0.0f);
07648             MUX_ASSERT(itemAspectRatio.m_weight >= 1);
07649             MUX_ASSERT(itemAspectRatio.m_weight <= c_maxAspectRatioWeight);
07650
07651             if (itemAspectRatio.m_weight != c_maxAspectRatioWeight)
07652             {
07653                 itemAspectRatio.m_weight = c_maxAspectRatioWeight;
07654                 updateItemAspectRatio = true;
07655             }
07656
07657             // Ignore aspect ratio deltas coming from pixel snapping rounding. The aspect ratios coming from UIElement.Measure are preserved.
07658             if (std::abs(itemAspectRatio.m_aspectRatio - aspectRatio) > 0.5 / (m_roundingScaleFactor * actualLineHeight))
07659             {
07660 #ifdef DBG
07661                 if (m_itemsInfoFirstIndex + index == m_logItemIndexDbg)
07662                 {
07663                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"logItemIndexDbg", m_logItemIndexDbg);
07664                     LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"ItemsInfo aspect ratio overwriting", itemAspectRatio.m_aspectRatio, aspectRatio);
07665                 }
07666 #endif
07667                 itemAspectRatio.m_aspectRatio = aspectRatio;
07668                 updateItemAspectRatio = true;
07669             }
07670         }
07671
07672         if (updateItemAspectRatio)
07673         {
07674             m_aspectRatios->SetAt(m_itemsInfoFirstIndex + index, itemAspectRatio);
07675         }
07676     }
07677 }
07678
07679 // Raises the ItemsInfoRequested event to potentially fill the m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath,
07680 // m_itemsInfoFirstIndex, m_itemsInfoMinWidth, m_itemsInfoMaxWidth fields with item sizing information.
07681 // Returns True when the provided info covers the entire data source and the fast path must be engaged, and False to stay in the regular path.
07682 bool LinedFlowLayout::UpdateItemsInfo(
07683     ItemsInfo const& itemsInfo,
07684     int oldFirstItemsInfoIndex,
07685     int oldLastItemsInfoIndex)
07686 {
07687 #ifdef DBG
07688     LogItemsInfoDbg(-1, -1, itemsInfo);
07689     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"oldFirstItemsInfoIndex", oldFirstItemsInfoIndex);
07690     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"oldLastItemsInfoIndex", oldLastItemsInfoIndex);
07691 #endif
07692
07693     // Raise ItemsInfoRequested events.
07694     if (oldFirstItemsInfoIndex == -1 || m_lastSizedItemIndex < oldFirstItemsInfoIndex || m_firstSizedItemIndex > oldLastItemsInfoIndex)
07695     {
07696         // No overlapping of old items info and new sized items. Build the items info from scratch.
07697         ResetItemsInfo();
07698
07699         // Raise event for [m_firstSizedItemIndex, m_lastSizedItemIndex] range.
07700         if (RequestItemsInfo(itemsInfo, m_firstSizedItemIndex /*beginSizedItemIndex*/, m_lastSizedItemIndex /*endSizedItemIndex*/))
07701         {
07702             return true;
07703         }
07704
07705         UpdateAspectRatiosWithItemsInfo();
07706     }
07707     else if (m_firstSizedItemIndex < oldFirstItemsInfoIndex || m_lastSizedItemIndex > oldLastItemsInfoIndex)
07708     {
07709         // Partial overlapping.
07710         MUX_ASSERT(oldLastItemsInfoIndex != -1);
07711
07712         // TODO as part of perf Task 42298247 - see if these copies can be avoided by copying vector elements 'in place'.
07713         std::vector<double> oldItemsInfoDesiredAspectRatios = m_itemsInfoDesiredAspectRatiosForRegularPath;
07714         std::vector<double> oldItemsInfoMinWidths = m_itemsInfoMinWidthsForRegularPath;
07715         std::vector<double> oldItemsInfoMaxWidths = m_itemsInfoMaxWidthsForRegularPath;
07716         std::vector<float> oldItemsInfoArrangeWidths = m_itemsInfoArrangeWidths;
07717
07718         const int newItemsInfoCount = m_lastSizedItemIndex - m_firstSizedItemIndex + 1;
07719
07720         EnsureItemsInfoDesiredAspectRatios(newItemsInfoCount /*itemCount*/);
07721
07722         if (m_itemsInfoMinWidthsForRegularPath.size() > 0)
07723         {
07724             EnsureItemsInfoMinWidths(newItemsInfoCount /*itemCount*/);
07725         }
07726
07727         if (m_itemsInfoMaxWidthsForRegularPath.size() > 0)
07728         {
07729             EnsureItemsInfoMaxWidths(newItemsInfoCount /*itemCount*/);
07730         }
07731
07732         EnsureItemsInfoArrangeWidths(newItemsInfoCount /*itemCount*/);
07733
07734         m_itemsInfoFirstIndex = m_firstSizedItemIndex;
07735
07736         const bool oldFirstOverlaps = oldFirstItemsInfoIndex >= m_firstSizedItemIndex && oldFirstItemsInfoIndex <= m_lastSizedItemIndex;
07737         const bool oldLastOverlaps = oldLastItemsInfoIndex >= m_firstSizedItemIndex && oldLastItemsInfoIndex <= m_lastSizedItemIndex;
07738         const bool newFirstOverlaps = m_firstSizedItemIndex >= oldFirstItemsInfoIndex && m_firstSizedItemIndex <= oldLastItemsInfoIndex;
07739         const bool newLastOverlaps = m_lastSizedItemIndex >= oldFirstItemsInfoIndex && m_lastSizedItemIndex <= oldLastItemsInfoIndex;
07740
07741         if (oldFirstOverlaps || oldLastOverlaps || newFirstOverlaps || newLastOverlaps)
07742         {
07743             MUX_ASSERT(!newFirstOverlaps || !newLastOverlaps);
07744
07745             // Fill m_itemsInfoDesiredAspectRatiosForRegularPath, m_itemsInfoMinWidthsForRegularPath, m_itemsInfoMaxWidthsForRegularPath, m_itemsInfoArrangeWidths vectors with overlapping
07746             // oldItemsInfoDesiredAspectRatios, oldItemsInfoMinWidths, oldItemsInfoMaxWidths, oldItemsInfoArrangeWidths ones.
07747             if (oldFirstOverlaps && oldLastOverlaps)
07748             {
07749                 CopyItemsInfo(
07750                     oldItemsInfoDesiredAspectRatios,
07751                     oldItemsInfoMinWidths,
07752                     oldItemsInfoMaxWidths,
07753                     oldItemsInfoArrangeWidths,
07754                     0 /*oldStart*/,
07755                     oldFirstItemsInfoIndex - m_firstSizedItemIndex /*newStart*/,
07756                     oldLastItemsInfoIndex - oldFirstItemsInfoIndex + 1 /*copyCount*/);
07757             }
07758             else if (newFirstOverlaps && oldLastOverlaps)
07759             {
07760                 CopyItemsInfo(
07761                     oldItemsInfoDesiredAspectRatios,
07762                     oldItemsInfoMinWidths,
07763                     oldItemsInfoMaxWidths,
07764                     oldItemsInfoArrangeWidths,
07765                     m_firstSizedItemIndex - oldFirstItemsInfoIndex /*oldStart*/,
07766                     0 /*newStart*/,
07767                     oldLastItemsInfoIndex - m_firstSizedItemIndex + 1 /*copyCount*/);
07768             }
07769             else if (oldFirstOverlaps && newLastOverlaps)
07770             {
07771                 CopyItemsInfo(
07772                     oldItemsInfoDesiredAspectRatios,
07773                     oldItemsInfoMinWidths,
07774                     oldItemsInfoMaxWidths,
07775                     oldItemsInfoArrangeWidths,
07776                     0 /*oldStart*/,
07777                     oldFirstItemsInfoIndex - m_firstSizedItemIndex /*newStart*/,
07778                     m_lastSizedItemIndex - oldFirstItemsInfoIndex + 1 /*copyCount*/);
07779             }
07780         }
07781
07782         if (m_firstSizedItemIndex < oldFirstItemsInfoIndex)
07783         {
07784             // Raise event for [m_firstSizedItemIndex, oldFirstItemsInfoIndex - 1] range.
07785             if (RequestItemsInfo(itemsInfo, m_firstSizedItemIndex /*beginSizedItemIndex*/, oldFirstItemsInfoIndex - 1 /*endSizedItemIndex*/))
07786             {
07787                 return true;
07788             }
07789         }
07790
07791         if (m_lastSizedItemIndex > oldLastItemsInfoIndex)
07792         {
07793             // Raise event for [oldLastItemsInfoIndex + 1, m_lastSizedItemIndex] range.
07794             if (RequestItemsInfo(itemsInfo, oldLastItemsInfoIndex + 1 /*beginSizedItemIndex*/, m_lastSizedItemIndex /*endSizedItemIndex*/))
07795             {
07796                 return true;
07797             }
07798         }
07799
07800         UpdateAspectRatiosWithItemsInfo();
07801     }
07802     else
07803     {
07804         // Full overlapping. [m_firstSizedItemIndex, m_lastSizedItemIndex] is a subset of [oldFirstItemsInfoIndex, oldLastItemsInfoIndex].
07805         // m_itemsInfoDesiredAspectRatiosForRegularPath left unchanged.
07806         MUX_ASSERT(m_itemsInfoFirstIndex != -1);
07807         MUX_ASSERT(m_firstSizedItemIndex >= oldFirstItemsInfoIndex);
07808         MUX_ASSERT(m_firstSizedItemIndex <= oldLastItemsInfoIndex);
07809         MUX_ASSERT(m_lastSizedItemIndex >= oldFirstItemsInfoIndex);
07810         MUX_ASSERT(m_lastSizedItemIndex <= oldLastItemsInfoIndex);
07811     }
07812
07813     return false;
07814 }
07815
07816 void LinedFlowLayout::UpdateRoundingScaleFactor(
07817     winrt::UIElement const& xamlRootReference)
07818 {
07819     try
07820     {
07821         m_roundingScaleFactor = static_cast<float>(xamlRootReference.XamlRoot().RasterizationScale());
07822     }
07823     catch (winrt::hresult_error)
07824     {
07825         // Calling GetForCurrentView on threads without a CoreWindow throws an error.
07826         // In this circumstance, we'll just always round to the closest integer.
07827         m_roundingScaleFactor = 1.0f;
07828     }
07829 }
07830
07831 // Returns True when an ItemsInfoRequested handler provided sizing information for
07832 // the request item range or more.  In either cases, m_itemsInfoArrangeWidths is populated
07833 // with arrange widths resulting from the provided information.
07834 // When returning True,
07835 //  - when the handler provided information for less than the entire source collection, m_itemsInfoFirstIndex is >= 0.
07836 //  - when the handler provided information the entire source collection, m_itemsInfoFirstIndex is -1.
07837 bool LinedFlowLayout::UsesArrangeWidthInfo() const
07838 {
07839     return m_itemsInfoArrangeWidths.size() > 0;
07840 }
07841
07842 // Returns True when an ItemsInfoRequested handler provided sizing information for
07843 // the entire source collection.  In that case, the fast path can be performed, and
07844 // it is characterized by having a populated m_itemsInfoArrangeWidths vector and m_itemsInfoFirstIndex remaining at -1.
07845 bool LinedFlowLayout::UsesFastPathLayout() const
07846 {
07847     return UsesArrangeWidthInfo() && m_itemsInfoFirstIndex == -1;
07848 }
07849
07850 #ifdef DBG
07851
07852 winrt::hstring LinedFlowLayout::DependencyPropertyToStringDbg(
07853     winrt::IDependencyProperty const& dependencyProperty)
07854 {
07855     if (dependencyProperty == s_ItemsJustificationProperty)
07856     {
07857         return L"ItemsJustification";
07858     }
07859     else if (dependencyProperty == s_ItemsStretchProperty)
07860     {
07861         return L"ItemsStretch";
07862     }
07863     else if (dependencyProperty == s_MinItemSpacingProperty)
07864     {
07865         return L"MinItemSpacing";
07866     }
07867     else if (dependencyProperty == s_LineSpacingProperty)
07868     {
07869         return L"LineSpacing";
07870     }
07871     else if (dependencyProperty == s_LineHeightProperty)
07872     {
07873         return L"LineHeight";
07874     }
07875     else if (dependencyProperty == s_ActualLineHeightProperty)
07876     {
07877         return L"ActualLineHeight";
07878     }
07879     else
07880     {
07881         return L"UNKNOWN";
07882     }
07883 }
07884
07885 void LinedFlowLayout::LogElementManagerDbg()
07886 {
07887     const int firstRealizedDataIndex = m_elementManager.GetFirstRealizedDataIndex();
07888
07889     if (firstRealizedDataIndex != - 1)
07890     {
07891         const int realizedElementCount = m_elementManager.GetRealizedElementCount();
07892
07893         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstRealizedDataIndex", firstRealizedDataIndex);
07894         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastRealizedDataIndex", firstRealizedDataIndex + realizedElementCount - 1);
07895         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"realizedElementCount", realizedElementCount);
07896     }
07897 }
07898
07899 void LinedFlowLayout::LogItemsInfoDbg(
07900     int itemsRangeStartIndex,
07901     int itemsRangeRequestedLength,
07902     ItemsInfo const& itemsInfo)
07903 {
07904     if (itemsRangeStartIndex != -1 && itemsRangeRequestedLength != -1)
07905     {
07906         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsRangeStartIndex", itemsRangeStartIndex);
07907         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemsRangeRequestedLength", itemsRangeRequestedLength);
07908     }
07909
07910     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"ii.m_itemsRangeStartIndex", itemsInfo.m_itemsRangeStartIndex);
07911     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"ii.m_itemsRangeLength", itemsInfo.m_itemsRangeLength);
07912     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"ii.m_minWidth", itemsInfo.m_minWidth);
07913     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"ii.m_maxWidth", itemsInfo.m_maxWidth);
07914
07915     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_itemsInfoDesiredAspectRatiosForFastPath.size", m_itemsInfoDesiredAspectRatiosForFastPath.size());
07916     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_itemsInfoMinWidthsForFastPath.size", m_itemsInfoMinWidthsForFastPath.size());
07917     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_itemsInfoMaxWidthsForFastPath.size", m_itemsInfoMaxWidthsForFastPath.size());
07918 }
07919
07920 void LinedFlowLayout::LogItemsLayoutDbg(
07921     ItemsLayout const& itemsLayout,
07922     double averageLineItemsWidth) const
07923 {
07924     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"drawback", itemsLayout.m_drawback);
07925     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"availableLineItemsWidth", itemsLayout.m_availableLineItemsWidth);
07926     if (averageLineItemsWidth > 0)
07927     {
07928         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"averageLineItemsWidth",
07929             averageLineItemsWidth);
07930         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"delta (%)",
07931             std::abs(itemsLayout.m_availableLineItemsWidth - averageLineItemsWidth) / averageLineItemsWidth * 100.0);
07932     }
07933
07934     if (itemsLayout.m_smallestHeadLineIndex != std::numeric_limits<int>::max())
07935     {
07936         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"smallestHeadLineIndex", itemsLayout.m_smallestHeadLineIndex);
07937     }
07938
07939     if (itemsLayout.m_smallestHeadItemIndex != std::numeric_limits<int>::max())
07940     {
07941         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"smallestHeadItemIndex", itemsLayout.m_smallestHeadItemIndex);
07942     }
07943
07944     if (itemsLayout.m_smallestHeadItemWidth != std::numeric_limits<double>::max())
07945     {
07946         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"smallestHeadItemWidth", itemsLayout.m_smallestHeadItemWidth);
07947     }
07948
07949     if (itemsLayout.m_smallestTailLineIndex != std::numeric_limits<int>::max())
07950     {
07951         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"smallestTailLineIndex", itemsLayout.m_smallestTailLineIndex);
07952     }
07953
07954     if (itemsLayout.m_smallestTailItemIndex != std::numeric_limits<int>::max())
07955     {
07956         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"smallestTailItemIndex", itemsLayout.m_smallestTailItemIndex);
07957     }
07958
07959     if (itemsLayout.m_smallestTailItemWidth != std::numeric_limits<double>::max())
07960     {
07961         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"smallestTailItemWidth", itemsLayout.m_smallestTailItemWidth);
07962     }
07963
07964     if (itemsLayout.m_bestEqualizingHeadLineIndex != std::numeric_limits<int>::max())
07965     {
07966         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"bestEqualizingHeadLineIndex", itemsLayout.m_bestEqualizingHeadLineIndex);
07967     }
07968
07969     if (itemsLayout.m_bestEqualizingHeadItemIndex != std::numeric_limits<int>::max())
07970     {
07971         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"bestEqualizingHeadItemIndex", itemsLayout.m_bestEqualizingHeadItemIndex);
07972     }
07973
07974     if (itemsLayout.m_bestEqualizingHeadItemDrawbackImprovement != 0.0)
07975     {
07976         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"bestEqualizingHeadItemDrawbackImprovement", itemsLayout.m_bestEqualizingHeadItemDrawbackImprovement);
07977     }
07978
07979     if (itemsLayout.m_bestEqualizingTailLineIndex != std::numeric_limits<int>::max())
07980     {
07981         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"bestEqualizingTailLineIndex", itemsLayout.m_bestEqualizingTailLineIndex);
07982     }
07983
07984     if (itemsLayout.m_bestEqualizingTailItemIndex != std::numeric_limits<int>::max())
07985     {
07986         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"bestEqualizingTailItemIndex", itemsLayout.m_bestEqualizingTailItemIndex);
07987     }
07988
07989     if (itemsLayout.m_bestEqualizingTailItemDrawbackImprovement != 0.0)
07990     {
07991         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"bestEqualizingTailItemDrawbackImprovement", itemsLayout.m_bestEqualizingTailItemDrawbackImprovement);
07992     }
07993
07994     // Uncomment for verbose tracing of line item counts and widths:
07995     //for (int index = 0; index < static_cast<int>(itemsLayout.m_lineItemWidths.size()); index++)
07996     //{
07997     //    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT_INT, METH_NAME, this, L"line item count", index, itemsLayout.m_lineItemCounts[index]);
07998     //    LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"line size", itemsLayout.m_lineItemWidths[index]);
07999     //}
08000 }
08001
08002 void LinedFlowLayout::LogLayoutDbg()
08003 {
08004     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"averageItemAspectRatioDbg", m_averageItemAspectRatioDbg);
08005     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"averageItemsPerLine raw", m_averageItemsPerLine.first);
08006     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"averageItemsPerLine snapped", m_averageItemsPerLine.second);
08007     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"measureCountdown", m_measureCountdown);
08008     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemCount", m_itemCount);
08009     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unsizedNearLineCount", m_unsizedNearLineCount);
08010     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstSizedLineIndex", m_firstSizedLineIndex);
08011     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastSizedLineIndex", m_lastSizedLineIndex);
08012     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstSizedItemIndex", m_firstSizedItemIndex);
08013     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastSizedItemIndex", m_lastSizedItemIndex);
08014     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"unrealizedNearLineCount", m_unrealizedNearLineCount);
08015     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstRealizedItemIndex", FirstRealizedItemIndexDbg());
08016     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastRealizedItemIndex", LastRealizedItemIndexDbg());
08017     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstFrozenLineIndex", m_firstFrozenLineIndex);
08018     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastFrozenLineIndex", m_lastFrozenLineIndex);
08019     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstFrozenItemIndex", m_firstFrozenItemIndex);
08020     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastFrozenItemIndex", m_lastFrozenItemIndex);
08021     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"m_previousAvailableWidth", m_previousAvailableWidth);
08022
08023     for (const auto& lockedItemIterator : m_lockedItemIndexes)
08024     {
08025         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"lockedItem", lockedItemIterator.first, lockedItemIterator.second);
08026     }
08027
08028     for (const int lineItemsCount : m_lineItemCounts)
08029     {
08030         LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lineItemsCount", lineItemsCount);
08031     }
08032 }
08033
08034 void LinedFlowLayout::LogVirtualizingLayoutContextDbg(
08035     winrt::VirtualizingLayoutContext const& context) const
08036 {
08037     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"ItemCount", context.ItemCount());
08038     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"RecommendedAnchorIndex", context.RecommendedAnchorIndex());
08039     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"RealizationRect", context.RealizationRect().Y, context.RealizationRect().Height);
08040     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"VisibleRect", context.VisibleRect().Y, context.VisibleRect().Height);
08041     LINEDFLOWLAYOUT_TRACE_VERBOSE(*this, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"LayoutOrigin", context.LayoutOrigin().Y);
08042 }
08043
08044 void LinedFlowLayout::VerifyInternalLockedItemsDbg(
08045     std::map<int, int> const& internalLockedItemIndexes,
08046     int beginSizedLineIndex,
08047     int endSizedLineIndex,
08048     int beginSizedItemIndex,
08049     int endSizedItemIndex)
08050 {
08051     MUX_ASSERT(!(beginSizedLineIndex < endSizedLineIndex && beginSizedItemIndex >= endSizedItemIndex));
08052     MUX_ASSERT(!(beginSizedLineIndex > endSizedLineIndex && beginSizedItemIndex <= endSizedItemIndex));
08053     MUX_ASSERT(std::abs(beginSizedLineIndex - endSizedLineIndex) <= std::abs(beginSizedItemIndex - endSizedItemIndex));
08054
08055     if (internalLockedItemIndexes.size() == 0)
08056     {
08057         return;
08058     }
08059
08060     int previousLockedItemIndex = endSizedItemIndex >= beginSizedItemIndex ? beginSizedItemIndex : endSizedItemIndex;
08061     int previousLockedLineIndex = endSizedItemIndex >= beginSizedItemIndex ? beginSizedLineIndex : endSizedLineIndex;
08062
08063     for (const auto& lockedItemIterator : internalLockedItemIndexes)
08064     {
08065         const int lockedItemIndex = lockedItemIterator.first;
08066         const int lockedLineIndex = lockedItemIterator.second;
08067
08068         MUX_ASSERT(lockedLineIndex >= previousLockedLineIndex);
08069         MUX_ASSERT(lockedItemIndex > previousLockedItemIndex);
08070         MUX_ASSERT(lockedItemIndex - previousLockedItemIndex >= lockedLineIndex - previousLockedLineIndex);
08071
08072         previousLockedItemIndex = lockedItemIndex;
08073         previousLockedLineIndex = lockedLineIndex;
08074     }
08075
08076     const int lockedItemIndex = endSizedItemIndex >= beginSizedItemIndex ? endSizedItemIndex : beginSizedItemIndex;
08077     const int lockedLineIndex = endSizedItemIndex >= beginSizedItemIndex ? endSizedLineIndex : beginSizedLineIndex;
08078
08079     MUX_ASSERT(lockedLineIndex >= previousLockedLineIndex);
08080     MUX_ASSERT(lockedItemIndex > previousLockedItemIndex);
08081     MUX_ASSERT(lockedItemIndex - previousLockedItemIndex >= lockedLineIndex - previousLockedLineIndex);
08082 }
08083
08084 void LinedFlowLayout::VerifyLockedItemsDbg()
08085 {
08086     if (m_lockedItemIndexes.size() == 0)
08087     {
08088         return;
08089     }
08090
08091     int sizedItemIndex = m_firstSizedItemIndex;
08092
08093     for (int sizedLineVectorIndex = 0; sizedLineVectorIndex < static_cast<int>(m_lineItemCounts.size()); sizedLineVectorIndex++)
08094     {
08095         const int lineItemsCount = m_lineItemCounts[sizedLineVectorIndex];
08096         const int lineIndex = sizedLineVectorIndex + m_firstSizedLineIndex;
08097
08098         for (int itemVectorIndex = 0; itemVectorIndex < lineItemsCount; itemVectorIndex++)
08099         {
08100             if (sizedItemIndex >= m_firstFrozenItemIndex &&
08101                 sizedItemIndex <= m_lastFrozenItemIndex &&
08102                 m_lockedItemIndexes.find(sizedItemIndex) != m_lockedItemIndexes.end() &&
08103                 m_lockedItemIndexes[sizedItemIndex] != lineIndex)
08104             {
08105                 LINEDFLOWLAYOUT_TRACE_INFO(*this, TRACE_MSG_METH_INT_INT, METH_NAME, this, m_lockedItemIndexes[sizedItemIndex], lineIndex);
08106                 MUX_ASSERT(false);
08107             }
08108
08109             sizedItemIndex++;
08110         }
08111     }
08112 }
08113
08114 #endif
08115
08116 #pragma endregion
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewportTests::TestStackLayout Member List

This is the complete list of members for ViewportTests::TestStackLayout, including all inherited members.
MeasureOverride(VirtualizingLayoutContext context, Size availableSize) | ViewportTests::TestStackLayout | [inline, protected]
SuggestedAnchor | ViewportTests::TestStackLayout |
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlAutomationPeer.h Source File

  • File List
  • File Members
  • PagerControl

PagerControlAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PagerControl.h"
00007 #include "PagerControlAutomationPeer.g.h"
00008
00009 class PagerControlAutomationPeer :
00010     public ReferenceTracker<PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider>
00011 {
00012
00013 public:
00014     PagerControlAutomationPeer(winrt::PagerControl const& owner);
00015
00016     /* IAutomationPeerOverrides */
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     hstring GetClassNameCore();
00019     hstring GetNameCore();
00020     winrt::AutomationControlType GetAutomationControlTypeCore();
00021
00022     // ISelectionProvider
00023     bool CanSelectMultiple() { return false; };
00024     bool IsSelectionRequired() { return true; };
00025     winrt::com_array<winrt::IInspectable> GetSelection();
00026
00027     void RaiseSelectionChanged(double oldIndex, double newIndex);
00028
00029 private:
00030     com_ptr<PagerControl> GetImpl();
00031 };
00032
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarFlyoutCommandBar Member List

This is the complete list of members for CommandBarFlyoutCommandBar, including all inherited members.
abi_enter() | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
AttachControlEventHandlers() | CommandBarFlyoutCommandBar | [private]
AttachEventsToSecondaryStoryboards() | CommandBarFlyoutCommandBar | [private]
AttachItemEventHandlers() | CommandBarFlyoutCommandBar | [private]
BindOwningFlyoutPresenterToCornerRadius() | CommandBarFlyoutCommandBar |
CacheLocalizedStringResources() | CommandBarFlyoutCommandBar |
CheckThread() | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
ClearLocalizedStringResourceCache() | CommandBarFlyoutCommandBar |
ClearProperties() | CommandBarFlyoutCommandBarProperties | [static]
ClearShadow() | CommandBarFlyoutCommandBar |
CommandBarFlyoutCommandBar() | CommandBarFlyoutCommandBar |
CommandBarFlyoutCommandBarProperties() | CommandBarFlyoutCommandBarProperties |
DeleteInstanceOnUIThread(std::unique_ptr< CommandBarFlyoutCommandBar > &&self) noexcept | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline, static]
DetachEventHandlers() | CommandBarFlyoutCommandBar | [private]
EnsureAutomationSetCountAndPosition() | CommandBarFlyoutCommandBar | [private]
EnsureLocalizedControlTypes() | CommandBarFlyoutCommandBar | [private]
EnsureProperties() | CommandBarFlyoutCommandBarProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
EnsureTabStopUniqueness(winrt::IObservableVector< winrt::ICommandBarElement > const &commands, winrt::Control const &moreButton) | CommandBarFlyoutCommandBar | [private, static]
final_release(std::unique_ptr< CommandBarFlyoutCommandBar > &&self) | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline, static]
FlyoutTemplateSettings(winrt::CommandBarFlyoutCommandBarTemplateSettings const &value) | CommandBarFlyoutCommandBarProperties |
FlyoutTemplateSettings() | CommandBarFlyoutCommandBarProperties |
FlyoutTemplateSettingsProperty() | CommandBarFlyoutCommandBarProperties | [inline, static]
FocusCommand(winrt::IObservableVector< winrt::ICommandBarElement > commands, winrt::Control moreButton, winrt::FocusState focusState, bool firstCommand, bool ensureTabStopUniqueness) | CommandBarFlyoutCommandBar | [private, static]
FocusControl(winrt::Control newFocus, winrt::Control oldFocus, winrt::FocusState focusState, bool updateTabStop) | CommandBarFlyoutCommandBar | [private, static]
GetBase() | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
GetFirstTabStopControl(winrt::IObservableVector< winrt::ICommandBarElement > const &commands) | CommandBarFlyoutCommandBar | [private, static]
GetInner() | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
HasCloseAnimation() | CommandBarFlyoutCommandBar |
HasOpenAnimation() | CommandBarFlyoutCommandBar |
HasSecondaryOpenCloseAnimations() | CommandBarFlyoutCommandBar |
HasVisibleLabel(TCommand const &command) | CommandBarFlyoutCommandBar | [inline, private]
IsControlFocusable(winrt::Control const &control, bool checkTabStop) | CommandBarFlyoutCommandBar | [private, static]
IsOnThread() | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
OnApplyTemplate() | CommandBarFlyoutCommandBar |
OnCommandBarElementDependencyPropertyChanged() | CommandBarFlyoutCommandBar |
OnKeyDown(winrt::KeyRoutedEventArgs const &args) | CommandBarFlyoutCommandBar |
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | CommandBarFlyoutCommandBar |
OnSystemBackdropPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | CommandBarFlyoutCommandBarProperties | [static]
OpenAnimationKind() | CommandBarFlyoutCommandBar | [inline]
PlayCloseAnimation(const winrt::weak_ref< winrt::CommandBarFlyout > &weakCommandBarFlyout, std::function< void()> onCompleteFunc) | CommandBarFlyoutCommandBar |
PlayOpenAnimation() | CommandBarFlyoutCommandBar |
PopulateAccessibleControls() | CommandBarFlyoutCommandBar | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< CommandBarFlyoutCommandBar, winrt::implementation::CommandBarFlyoutCommandBarT > | [inline]
s_FlyoutTemplateSettingsProperty | CommandBarFlyoutCommandBarProperties | [static]
s_SystemBackdropProperty | CommandBarFlyoutCommandBarProperties | [static]
SetKnownCommandLocalizedControlTypes(winrt::ICommandBarElement const &command) | CommandBarFlyoutCommandBar | [private]
SetOwningFlyout(winrt::CommandBarFlyout const &owningFlyout) | CommandBarFlyoutCommandBar |
SetPresenter(winrt::FlyoutPresenter const &presenter) | CommandBarFlyoutCommandBar |
SetPresenterName(winrt::FlyoutPresenter const &presenter) | CommandBarFlyoutCommandBar | [private]
SystemBackdrop(winrt::SystemBackdrop const &value) | CommandBarFlyoutCommandBarProperties |
SystemBackdrop() | CommandBarFlyoutCommandBarProperties |
SystemBackdropProperty() | CommandBarFlyoutCommandBarProperties | [inline, static]
TryConnectSystemBackdrop() | CommandBarFlyoutCommandBar | [private]
UpdateFlowsFromAndFlowsTo() | CommandBarFlyoutCommandBar | [private]
UpdateItemVisualState(winrt::Control const &item, bool isPrimaryItem) | CommandBarFlyoutCommandBar | [private]
UpdateTemplateSettings() | CommandBarFlyoutCommandBar | [private]
UpdateUI(bool useTransitions=true, bool isForSizeChange=false) | CommandBarFlyoutCommandBar | [private]
UpdateVisualState(bool useTransitions, bool isForSizeChange=false) | CommandBarFlyoutCommandBar | [private]
~CommandBarFlyoutCommandBar() | CommandBarFlyoutCommandBar |
Generated on Sun Dec 1 2024 20:52:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarScrollingEventArgs.h Source File

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarScrollingEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "AnnotatedScrollBarScrollingEventArgs.g.h"
00007
00008 class AnnotatedScrollBarScrollingEventArgs :
00009     public ReferenceTracker<AnnotatedScrollBarScrollingEventArgs, winrt::implementation::AnnotatedScrollBarScrollingEventArgsT, winrt::composable, winrt::composing>
00010 {
00011 public:
00012     AnnotatedScrollBarScrollingEventArgs(double scrollOffset, winrt::AnnotatedScrollBarScrollingEventKind scrollingEventKind);
00013
00014 #pragma region IAnnotatedScrollBarScrollingEventArgs
00015     winrt::AnnotatedScrollBarScrollingEventKind ScrollingEventKind();
00016     double ScrollOffset();
00017     void Cancel(bool cancel);
00018     bool Cancel();
00019 #pragma endregion
00020
00021 private:
00022     winrt::AnnotatedScrollBarScrollingEventKind m_scrollingEventKind;
00023     double m_scrollOffset{ 0.0 };
00024     bool m_cancel{ false };
00025 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

final Member List

This is the complete list of members for final, including all inherited members.
Add(const winrt::UIElement &element, int dataIndex) | final |
Add(const winrt::UIElement &element) | final |
AddRange(const IndexRange &addRange, bool raiseOnSelectionChanged) | final | [private]
AnchorIndex() | final |
AnchorIndex(int value) | final |
AsyncWebViewOperations() | final |
await_ready() const noexcept | Awaitable | [inline]
await_resume() const noexcept | Awaitable | [inline]
await_suspend(std::experimental::coroutine_handle<> resume) | Awaitable | [inline]
Awaitable() | Awaitable | [inline]
begin() const | final | [inline]
ChildrenNodeCount() | final |
Clear() | final |
Clear() | final |
ClearElement(const winrt::UIElement &element) | final |
ClearElement(const winrt::UIElement &element, bool isClearedDueToCollectionChange) | final |
ClearElementToAnimator(const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo) | final | [private]
ClearElementToElementFactory(const winrt::UIElement &element) | final |
ClearElementToPinnedPool(const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo, bool isClearedDueToCollectionChange) | final | [private]
ClearElementToUniqueIdResetPool(const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo) | final | [private]
ClearRealizedRange(int realizedIndex, int count) | final |
ClearRealizedRange() | final |
ClearSelection() | final | [private]
CompleteAwaits() const noexcept | Awaitable | [inline, protected]
ConvertToNullableBool(SelectionState isSelected) | final | [static]
DataCount() | final |
DataSourceChanged(const winrt::IInspectable &source, winrt::NotifyCollectionChangedEventArgs const &args) | final |
DEFINE_TRACELOGGING_EVENT_PARAM1(MapControl_WebViewNavigationCompleted, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DEFINE_TRACELOGGING_EVENT_PARAM2(WebView2_FireNavigationCompleted, uint64_t, ObjectPointer, bool, hasEventHandlers, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DEFINE_TRACELOGGING_EVENT_PARAM2(WebView2_CreateCoreObjects, bool, IsStart, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DEFINE_TRACELOGGING_EVENT_PARAM2(WebView2_TryCompleteInitialization, bool, IsStart, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DEFINE_TRACELOGGING_EVENT_PARAM2(MapControl_InitializeWebMap, bool, IsStart, uint64_t, ObjectPointer, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DEFINE_TRACELOGGING_EVENT_PARAM2(MapControl_WebMessageReceived_Error, uint64_t, ObjectPointer, PCWSTR, Message, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DEFINE_TRACELOGGING_EVENT_PARAM4(PublicApiCall, bool, IsStart, uint64_t, ObjectPointer, PCSTR, MethodName, uint32_t, HR, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DEFINE_TRACELOGGING_EVENT_PARAM4(PerfXamlEvent, bool, IsStart, uint64_t, ObjectPointer, PCSTR, EventName, bool, IsInteresting, TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE)) | final |
DiscardElementsOutsideWindow(bool forward, int startIndex) | final |
DiscardElementsOutsideWindow(const winrt::Rect &window, const ScrollOrientation &orientation) | final | [private]
DoPhasedWorkCallback() | final | [private]
DurationInMilliSeconds() const | final |
ElementManager(const ITrackerHandleManager *owner, bool useLayoutBounds=true) | final | [inline]
ElementManager(const ElementManager &that) | final |
ElementManager::operator=(const ElementManager &other) | final |
end() const | final | [inline]
EnsureElementRealized(bool forward, int dataIndex, const wstring_view &layoutId) | final |
EnsureEventSubscriptions() | final | [private]
EnsureFirstLastRealizedIndices() | final | [private]
EvaluateIsSelectedBasedOnChildrenNodes() | final |
FindFocusCandidate(int clearedIndex, winrt::UIElement &focusedChild) | final | [private]
FirstRealizedElementIndexDefault | final | [private, static]
GetAt(int realizedIndex) | final |
GetAt(int index, bool realizeChild) | final |
GetDataIndexFromRealizedRangeIndex(int rangeIndex) const | final |
GetElement(int index, bool forceCreate, bool suppressAutoRecycle) | final |
GetElementDataIndex(const winrt::UIElement &suggestedAnchor) const | final |
GetElementFromElementFactory(int index) | final | [private]
GetElementFromPinnedElements(int index) | final | [private]
GetElementFromUniqueIdResetPool(int index) | final | [private]
GetElementIfAlreadyHeldByLayout(int index) | final | [private]
GetElementIndex(const winrt::com_ptr< VirtualizationInfo > &virtInfo) | final |
GetFirstRealizedDataIndex() const | final |
GetLayoutBoundsForDataIndex(int dataIndex) const | final |
GetLayoutBoundsForRealizedIndex(int realizedIndex) const | final |
GetRealizedElement(int dataIndex) | final |
GetRealizedElementCount() const | final |
GetRealizedRangeIndexFromDataIndex(int dataIndex) const | final |
HookupCollectionChangedHandler() | final | [private]
IMPLEMENT_TELEMETRY_CLASS(XamlTelemetry, XamlTelemetryLogging) | final | [private]
IndexPath() | final |
Insert(int realizedIndex, int dataIndex, const winrt::UIElement &element) | final |
Intersects(const winrt::Rect &lhs, const winrt::Rect &rhs, const ScrollOrientation &orientation) | final | [private, static]
InvalidateRealizedIndicesHeldByLayout() | final | [private]
IsDataIndexRealized(int index) const | final |
IsIndexValidInData(int currentIndex) const | final |
IsSelected(int index) | final |
IsSelectedWithPartial() | final |
IsSelectedWithPartial(int index) | final |
IsValidIndex(int index) | final | [private]
IsVirtualizingContext() const | final | [private]
IsWindowConnected(const winrt::Rect &window, const ScrollOrientation &orientation, bool scrollOrientationSameAsFlow) const | final |
ItemsSourceView() | final |
LastRealizedElementIndexDefault | final | [private, static]
m_budgetInMs | final | [private, static]
m_childrenNodes | final | [private]
m_dataSource | final | [private]
m_ElementFactoryGetArgs | final | [private]
m_ElementFactoryRecycleArgs | final | [private]
m_elementMap | final | [private]
m_frequency | final | [private]
m_lastFocusedElement | final | [private]
m_manager | final | [private]
m_owner | final | [private]
m_owner | final | [private]
m_pendingWork | final | [private, static]
m_phaser | final | [private]
m_pinnedPool | final | [private]
m_realizedElementLayoutBounds | final | [private]
m_realizedElements | final | [private]
m_renderingToken | final | [private, static]
m_resetPool | final | [private]
m_selected | final | [private]
m_selectedIndicesCached | final | [private]
m_selectedIndicesCacheIsValid | final | [private]
m_source | final | [private]
m_start | final | [private]
m_timer | final | [private, static]
m_transitionProvider | final | [private]
MarkCallbackRecieved() | final | [private]
MoveFocusFromClearedIndex(int clearedIndex) | final | [private]
OnBeginMeasure(const ScrollOrientation &orientation) | final |
OnElementBoundsChanged(const winrt::UIElement &element, winrt::Rect oldBounds, winrt::Rect newBounds) | final |
OnElementPrepared(const winrt::UIElement &element) | final |
OnFocusChanged(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | final | [private]
OnItemsAdded(int index, int count) | final | [private]
OnItemsAdded(int index, int count) | final | [private]
OnItemsRemoved(int index, int count) | final | [private]
OnItemsRemoved(int index, int count) | final | [private]
OnItemsSourceChanged(const winrt::IInspectable &source, const winrt::NotifyCollectionChangedEventArgs &args) | final |
OnItemsSourceChanged(const winrt::IInspectable &source, const winrt::NotifyCollectionChangedEventArgs &args) | final |
OnLayoutChanging() | final |
OnLayoutChanging() | final |
OnOwnerArranged() | final |
OnOwnerArranged() | final |
OnRendering(const winrt::IInspectable &sender, const winrt::IInspectable &args) | final | [private, static]
OnSelectionChanged() | final | [private]
OnSourceListChanged(const winrt::IInspectable &dataSource, const winrt::NotifyCollectionChangedEventArgs &args) | final | [private]
OnTransitionProviderChanged(const winrt::ItemCollectionTransitionProvider &newTransitionProvider) | final |
OnTransitionProviderTransitionCompleted(const winrt::ItemCollectionTransitionProvider &sender, const winrt::ItemCollectionTransitionCompletedEventArgs &args) | final | [private]
PhaseElement(const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo) | final |
Phaser(ItemsRepeater *owner) | final |
PrunePinnedElements() | final |
QPCTimer() | final |
QueueTick() | final | [private, static]
RealizedChildrenNodeCount() | final |
RegisterForCallback() | final | [private]
RegisterWork(int priority, const std::function< void()> &workFunc) | final | [static]
Remove(int index) | final |
RemoveRange(const IndexRange &removeRange, bool raiseOnSelectionChanged) | final | [private]
Reset() | final |
Select(int index, bool select) | final |
Select(int index, bool select, bool raiseOnSelectionChanged) | final | [private]
SelectAll() | final |
SelectedCount() | final |
SelectedIndex() | final |
SelectedIndex(int value) | final |
SelectedIndices() | final |
SelectionNode(SelectionModel *manager, SelectionNode *parent) | final |
SelectRange(const IndexRange &range, bool select) | final |
SetContext(const winrt::VirtualizingLayoutContext &virtualContext) | final |
SetLayoutBoundsForDataIndex(int dataIndex, const winrt::Rect &bounds) | final |
SetLayoutBoundsForRealizedIndex(int realizedIndex, const winrt::Rect &bounds) | final |
ShouldYield() | final | [static]
SortElements(const winrt::Rect &visibleWindow) | final | [private]
Source() | final |
Source(const winrt::IInspectable &value) | final |
StopPhasing(const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo) | final |
StopWaiting() | final | [inline]
ToggleSelect(int index) | final |
TransitionManager(ItemsRepeater *owner) | final |
UnhookCollectionChangedHandler() | final | [private]
UniqueIdElementPool(ItemsRepeater *owner) | final |
UpdateElementIndex(const winrt::UIElement &element, const winrt::com_ptr< VirtualizationInfo > &virtInfo, int index) | final | [private]
UpdateFocusedElement() | final | [private]
UpdatePin(const winrt::UIElement &element, bool addPin) | final |
ValidatePhaseOrdering(int currentPhase, int nextPhase) | final | [private, static]
ViewManager(ItemsRepeater *owner) | final |
~SelectionNode() | final |
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ElementFactoryGetArgsDownlevel Member List

This is the complete list of members for ElementFactoryGetArgsDownlevel, including all inherited members.
abi_enter() | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
CheckThread() | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
Data() | ElementFactoryGetArgsDownlevel |
Data(winrt::IInspectable const &value) | ElementFactoryGetArgsDownlevel |
DeleteInstanceOnUIThread(std::unique_ptr< ElementFactoryGetArgsDownlevel > &&self) noexcept | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
final_release(std::unique_ptr< ElementFactoryGetArgsDownlevel > &&self) | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline, static]
GetBase() | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
GetInner() | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
GetRuntimeClassName() const | ElementFactoryGetArgsDownlevel | [inline]
Index() | ElementFactoryGetArgsDownlevel |
Index(int value) | ElementFactoryGetArgsDownlevel |
IsOnThread() | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
operator class_type() const noexcept | ElementFactoryGetArgsDownlevel | [inline]
Parent() | ElementFactoryGetArgsDownlevel |
Parent(winrt::UIElement const &value) | ElementFactoryGetArgsDownlevel |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ElementFactoryGetArgsDownlevel, reference_tracker_implements_t< winrt::IElementFactoryGetArgs >::type > | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderTemplateSettings Member List

This is the complete list of members for ExpanderTemplateSettings, including all inherited members.
ClearProperties() | ExpanderTemplateSettingsProperties | [static]
ContentHeight(double value) | ExpanderTemplateSettingsProperties |
ContentHeight() | ExpanderTemplateSettingsProperties |
ContentHeightProperty() | ExpanderTemplateSettingsProperties | [inline, static]
EnsureProperties() | ExpanderTemplateSettingsProperties | [static]
ExpanderTemplateSettings() | ExpanderTemplateSettings |
ExpanderTemplateSettingsProperties() | ExpanderTemplateSettingsProperties |
NegativeContentHeight(double value) | ExpanderTemplateSettingsProperties |
NegativeContentHeight() | ExpanderTemplateSettingsProperties |
NegativeContentHeightProperty() | ExpanderTemplateSettingsProperties | [inline, static]
s_ContentHeightProperty | ExpanderTemplateSettingsProperties | [static]
s_NegativeContentHeightProperty | ExpanderTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterAutomationPeer.cpp Source File

  • File List
  • File Members
  • Repeater

RepeaterAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include <UIAutomationCore.h>
00007 #include <UIAutomationCoreApi.h>
00008 #include <Vector.h>
00009 #include "ItemsRepeater.common.h"
00010 #include "RepeaterAutomationPeer.h"
00011 #include "ItemsRepeater.h"
00012
00013 #include "RepeaterAutomationPeer.properties.cpp"
00014
00015 RepeaterAutomationPeer::RepeaterAutomationPeer(winrt::ItemsRepeater const& owner) :
00016     ReferenceTracker(owner)
00017 {
00018 }
00019
00020 #pragma region IAutomationPeerOverrides
00021
00022 winrt::IVector<winrt::AutomationPeer> RepeaterAutomationPeer::GetChildrenCore()
00023 {
00024     const auto repeater = Owner().as<winrt::ItemsRepeater>();
00025     const auto childrenPeers = GetInner().as<winrt::IAutomationPeerOverrides>().GetChildrenCore();
00026     const unsigned peerCount = childrenPeers.Size();
00027
00028     std::vector<std::pair<int /* index */, winrt::AutomationPeer>> realizedPeers;
00029     realizedPeers.reserve(static_cast<int>(peerCount));
00030
00031     // Filter out unrealized peers.
00032     {
00033         for (unsigned i = 0u; i < peerCount; ++i)
00034         {
00035             auto childPeer = childrenPeers.GetAt(i);
00036             if (auto childElement = GetElement(childPeer, repeater))
00037             {
00038                 auto virtInfo = ItemsRepeater::GetVirtualizationInfo(childElement);
00039                 if (virtInfo->IsRealized())
00040                 {
00041                     realizedPeers.push_back(std::make_pair(virtInfo->Index(), childPeer));
00042                 }
00043             }
00044         }
00045     }
00046
00047     // Sort peers by index.
00048     std::sort(realizedPeers.begin(), realizedPeers.end(), [](const auto& lhs, const auto& rhs) { return lhs.first < rhs.first; });
00049
00050     // Select peers.
00051     {
00052         auto peers = winrt::make<Vector<winrt::AutomationPeer, MakeVectorParam<VectorFlag::DependencyObjectBase>()>>(
00053             static_cast<int>(realizedPeers.size()) /* capacity */);
00054         for (auto& entry : realizedPeers)
00055         {
00056             peers.Append(entry.second);
00057         }
00058         return peers;
00059     }
00060 }
00061
00062 winrt::AutomationControlType RepeaterAutomationPeer::GetAutomationControlTypeCore()
00063 {
00064     return winrt::AutomationControlType::Group;
00065 }
00066
00067 #pragma endregion
00068
00069 // Get the immediate child element of repeater under which this childPeer came from.
00070 winrt::UIElement RepeaterAutomationPeer::GetElement(const winrt::AutomationPeer& childPeer, const winrt::ItemsRepeater& repeater)
00071 {
00072     auto childElement = static_cast<winrt::DependencyObject>(childPeer.as<winrt::FrameworkElementAutomationPeer>().Owner());
00073
00074     auto parent = CachedVisualTreeHelpers::GetParent(childElement);
00075     // Child peer could have given a descendant of the repeater's child. We
00076     // want to get to the immediate child.
00077     while (parent && parent.try_as<winrt::ItemsRepeater>() != repeater)
00078     {
00079         childElement = parent;
00080         parent = CachedVisualTreeHelpers::GetParent(childElement);
00081     }
00082
00083     return childElement.as<winrt::UIElement>();
00084 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBarTests Member List

This is the complete list of members for TitleBarTests, including all inherited members.
BasicTest() | TitleBarTests | [inline]
ClassInitialize(TestContext testContext) | TitleBarTests | [inline, static]
TestCleanup() | TitleBarTests | [inline]
Generated on Sun Dec 1 2024 20:53:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ViewChangeBase.h Source File

  • File List
  • File Members
  • ScrollPresenter

ViewChangeBase.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 enum class ScrollPresenterViewChangeResult
00007 {
00008     Completed = 0,
00009     Interrupted = 1,
00010     Ignored = 2,
00011 };
00012
00013 class ViewChangeBase
00014 {
00015 };
00016
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControl.cpp Source File

  • File List
  • File Members
  • PagerControl

PagerControl.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "Vector.h"
00007 #include "PagerControl.h"
00008 #include "RuntimeProfiler.h"
00009 #include "ResourceAccessor.h"
00010 #include "PagerControlSelectedIndexChangedEventArgs.h"
00011 #include "PagerControlTemplateSettings.h"
00012 #include <PagerControlAutomationPeer.h>
00013
00014 constexpr auto c_numberBoxVisibleVisualState = L"NumberBoxVisible"sv;
00015 constexpr auto c_comboBoxVisibleVisualState = L"ComboBoxVisible"sv;
00016 constexpr auto c_numberPanelVisibleVisualState = L"NumberPanelVisible"sv;
00017
00018 constexpr auto c_firstPageButtonVisibleVisualState = L"FirstPageButtonVisible"sv;
00019 constexpr auto c_firstPageButtonNotVisibleVisualState = L"FirstPageButtonCollapsed"sv;
00020 constexpr auto c_firstPageButtonHiddenVisualState = L"FirstPageButtonHidden"sv;
00021 constexpr auto c_firstPageButtonEnabledVisualState = L"FirstPageButtonEnabled"sv;
00022 constexpr auto c_firstPageButtonDisabledVisualState = L"FirstPageButtonDisabled"sv;
00023
00024 constexpr auto c_previousPageButtonVisibleVisualState = L"PreviousPageButtonVisible"sv;
00025 constexpr auto c_previousPageButtonNotVisibleVisualState = L"PreviousPageButtonCollapsed"sv;
00026 constexpr auto c_previousPageButtonHiddenVisualState = L"PreviousPageButtonHidden"sv;
00027 constexpr auto c_previousPageButtonEnabledVisualState = L"PreviousPageButtonEnabled"sv;
00028 constexpr auto c_previousPageButtonDisabledVisualState = L"PreviousPageButtonDisabled"sv;
00029
00030 constexpr auto c_nextPageButtonVisibleVisualState = L"NextPageButtonVisible"sv;
00031 constexpr auto c_nextPageButtonNotVisibleVisualState = L"NextPageButtonCollapsed"sv;
00032 constexpr auto c_nextPageButtonHiddenVisualState = L"NextPageButtonHidden"sv;
00033 constexpr auto c_nextPageButtonEnabledVisualState = L"NextPageButtonEnabled"sv;
00034 constexpr auto c_nextPageButtonDisabledVisualState = L"NextPageButtonDisabled"sv;
00035
00036 constexpr auto c_lastPageButtonVisibleVisualState = L"LastPageButtonVisible"sv;
00037 constexpr auto c_lastPageButtonNotVisibleVisualState = L"LastPageButtonCollapsed"sv;
00038 constexpr auto c_lastPageButtonHiddenVisualState = L"LastPageButtonHidden"sv;
00039 constexpr auto c_lastPageButtonEnabledVisualState = L"LastPageButtonEnabled"sv;
00040 constexpr auto c_lastPageButtonDisabledVisualState = L"LastPageButtonDisabled"sv;
00041
00042 constexpr auto c_finiteItemsModeState = L"FiniteItems"sv;
00043 constexpr auto c_infiniteItemsModeState = L"InfiniteItems"sv;
00044
00045 constexpr auto c_rootGridName = L"RootGrid"sv;
00046 constexpr auto c_comboBoxName = L"ComboBoxDisplay"sv;
00047 constexpr auto c_numberBoxName = L"NumberBoxDisplay"sv;
00048
00049 constexpr auto c_numberPanelRepeaterName = L"NumberPanelItemsRepeater"sv;
00050 constexpr auto c_numberPanelIndicatorName = L"NumberPanelCurrentPageIndicator"sv;
00051 constexpr auto c_firstPageButtonName = L"FirstPageButton"sv;
00052 constexpr auto c_previousPageButtonName = L"PreviousPageButton"sv;
00053 constexpr auto c_nextPageButtonName = L"NextPageButton"sv;
00054 constexpr auto c_lastPageButtonName = L"LastPageButton"sv;
00055
00056 static constexpr auto c_numberPanelButtonStyleName = L"PagerControlNumberPanelButtonStyle"sv;
00057 const int c_AutoDisplayModeNumberOfPagesThreshold = 10; // This integer determines when to switch between NumberBoxDisplayMode and ComboBoxDisplayMode
00058 const int c_infiniteModeComboBoxItemsIncrement = 100;
00059
00060 /* Common functions */
00061 PagerControl::PagerControl()
00062 {
00063     __RP_Marker_ClassById(RuntimeProfiler::ProfId_PagerControl);
00064
00065     m_comboBoxEntries = winrt::make<Vector<IInspectable>>().as<winrt::IObservableVector<IInspectable>>();
00066     m_numberPanelElements = winrt::make<Vector<IInspectable>>().as<winrt::IObservableVector<IInspectable>>();
00067
00068     const auto templateSettings = winrt::make<PagerControlTemplateSettings>();
00069     templateSettings.SetValue(PagerControlTemplateSettingsProperties::s_PagesProperty, m_comboBoxEntries);
00070     templateSettings.SetValue(PagerControlTemplateSettingsProperties::s_NumberPanelItemsProperty, m_numberPanelElements);
00071     SetValue(s_TemplateSettingsProperty, templateSettings);
00072
00073     SetDefaultStyleKey(this);
00074 }
00075
00076 PagerControl::~PagerControl()
00077 {
00078     m_rootGridKeyDownRevoker.revoke();
00079     m_comboBoxSelectionChangedRevoker.revoke();
00080     m_firstPageButtonClickRevoker.revoke();
00081     m_previousPageButtonClickRevoker.revoke();
00082     m_nextPageButtonClickRevoker.revoke();
00083     m_lastPageButtonClickRevoker.revoke();
00084 }
00085
00086 void PagerControl::OnApplyTemplate()
00087 {
00088     if (PrefixText().empty())
00089     {
00090         PrefixText(ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPrefixTextName));
00091     }
00092     if (SuffixText().empty())
00093     {
00094         SuffixText(ResourceAccessor::GetLocalizedStringResource(SR_PagerControlSuffixTextName));
00095     }
00096     if (const auto rootGrid = GetTemplateChildT<winrt::FrameworkElement>(c_rootGridName, *this))
00097     {
00098         m_rootGridKeyDownRevoker = rootGrid.KeyDown(winrt::auto_revoke, { this, &PagerControl::OnRootGridKeyDown });
00099     }
00100
00101     if (const auto firstPageButton = GetTemplateChildT<winrt::Button>(c_firstPageButtonName, *this))
00102     {
00103         winrt::AutomationProperties::SetName(firstPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlFirstPageButtonTextName));
00104         m_firstPageButtonClickRevoker = firstPageButton.Click(winrt::auto_revoke, { this, &PagerControl::FirstButtonClicked });
00105     }
00106     if (const auto previousPageButton = GetTemplateChildT<winrt::Button>(c_previousPageButtonName, *this))
00107     {
00108         winrt::AutomationProperties::SetName(previousPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPreviousPageButtonTextName));
00109         m_previousPageButtonClickRevoker = previousPageButton.Click(winrt::auto_revoke, { this, &PagerControl::PreviousButtonClicked });
00110     }
00111     if (const auto nextPageButton = GetTemplateChildT<winrt::Button>(c_nextPageButtonName, *this))
00112     {
00113         winrt::AutomationProperties::SetName(nextPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlNextPageButtonTextName));
00114         m_nextPageButtonClickRevoker = nextPageButton.Click(winrt::auto_revoke, { this, &PagerControl::NextButtonClicked });
00115     }
00116     if (const auto lastPageButton = GetTemplateChildT<winrt::Button>(c_lastPageButtonName, *this))
00117     {
00118         winrt::AutomationProperties::SetName(lastPageButton, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlLastPageButtonTextName));
00119         m_lastPageButtonClickRevoker = lastPageButton.Click(winrt::auto_revoke, { this, &PagerControl::LastButtonClicked });
00120     }
00121
00122     m_comboBoxSelectionChangedRevoker.revoke();
00123     [this](const winrt::ComboBox comboBox) {
00124         m_comboBox.set(comboBox);
00125         if (comboBox)
00126         {
00127             FillComboBoxCollectionToSize(NumberOfPages());
00128             comboBox.SelectedIndex(SelectedPageIndex() - 1);
00129             winrt::AutomationProperties::SetName(comboBox, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPageTextName));
00130             m_comboBoxSelectionChangedRevoker = comboBox.SelectionChanged(winrt::auto_revoke, { this, &PagerControl::ComboBoxSelectionChanged });
00131         }
00132     }(GetTemplateChildT<winrt::ComboBox>(c_comboBoxName, *this));
00133
00134     m_numberBoxValueChangedRevoker.revoke();
00135     [this](const winrt::NumberBox numberBox) {
00136         m_numberBox.set(numberBox);
00137         if (numberBox)
00138         {
00139             numberBox.Value(static_cast<double>(SelectedPageIndex()) + 1);
00140             winrt::AutomationProperties::SetName(numberBox, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPageTextName));
00141             m_numberBoxValueChangedRevoker = numberBox.ValueChanged(winrt::auto_revoke, { this,&PagerControl::NumberBoxValueChanged });
00142         }
00143     }(GetTemplateChildT<winrt::NumberBox>(c_numberBoxName, *this));
00144
00145     m_numberPanelRepeater.set(GetTemplateChildT<winrt::ItemsRepeater>(c_numberPanelRepeaterName, *this));
00146     m_selectedPageIndicator.set(GetTemplateChildT<winrt::FrameworkElement>(c_numberPanelIndicatorName, *this));
00147
00148     // This is for the initial loading of the control
00149     OnDisplayModeChanged();
00150     UpdateOnEdgeButtonVisualStates();
00151     OnNumberOfPagesChanged(0);
00152
00153     // Update button visibilities
00154     OnButtonVisibilityChanged(FirstButtonVisibility(),
00155         c_firstPageButtonVisibleVisualState,
00156         c_firstPageButtonNotVisibleVisualState,
00157         c_firstPageButtonHiddenVisualState,
00158         0);
00159     OnButtonVisibilityChanged(PreviousButtonVisibility(),
00160         c_previousPageButtonVisibleVisualState,
00161         c_previousPageButtonNotVisibleVisualState,
00162         c_previousPageButtonHiddenVisualState,
00163         0);
00164     OnButtonVisibilityChanged(NextButtonVisibility(),
00165         c_nextPageButtonVisibleVisualState,
00166         c_nextPageButtonNotVisibleVisualState,
00167         c_nextPageButtonHiddenVisualState,
00168         NumberOfPages() - 1);
00169     OnButtonVisibilityChanged(LastButtonVisibility(),
00170         c_lastPageButtonVisibleVisualState,
00171         c_lastPageButtonNotVisibleVisualState,
00172         c_lastPageButtonHiddenVisualState,
00173         NumberOfPages() - 1);
00174
00175     OnSelectedPageIndexChange(-1);
00176 }
00177
00178 void PagerControl::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00179 {
00180     winrt::IDependencyProperty property = args.Property();
00181     if (this->Template() != nullptr)
00182     {
00183         if (property == FirstButtonVisibilityProperty())
00184         {
00185             OnButtonVisibilityChanged(FirstButtonVisibility(),
00186                 c_firstPageButtonVisibleVisualState,
00187                 c_firstPageButtonNotVisibleVisualState,
00188                 c_firstPageButtonHiddenVisualState,
00189                 0);
00190         }
00191         else if (property == PreviousButtonVisibilityProperty())
00192         {
00193             OnButtonVisibilityChanged(PreviousButtonVisibility(),
00194                 c_previousPageButtonVisibleVisualState,
00195                 c_previousPageButtonNotVisibleVisualState,
00196                 c_previousPageButtonHiddenVisualState,
00197                 0);
00198         }
00199         else if (property == NextButtonVisibilityProperty())
00200         {
00201             OnButtonVisibilityChanged(NextButtonVisibility(),
00202                 c_nextPageButtonVisibleVisualState,
00203                 c_nextPageButtonNotVisibleVisualState,
00204                 c_nextPageButtonHiddenVisualState,
00205                 NumberOfPages() - 1);
00206         }
00207         else if (property == LastButtonVisibilityProperty())
00208         {
00209             OnButtonVisibilityChanged(LastButtonVisibility(),
00210                 c_lastPageButtonVisibleVisualState,
00211                 c_lastPageButtonNotVisibleVisualState,
00212                 c_lastPageButtonHiddenVisualState,
00213                 NumberOfPages() - 1);
00214         }
00215         else if (property == DisplayModeProperty())
00216         {
00217             OnDisplayModeChanged();
00218             // Why are we calling this you might ask.
00219             // The reason is that that method only updates what it currently needs to update.
00220             // So when we switch to ComboBox from NumberPanel, the NumberPanel element list might be out of date.
00221             UpdateTemplateSettingElementLists();
00222         }
00223         else if (property == NumberOfPagesProperty())
00224         {
00225             OnNumberOfPagesChanged(winrt::unbox_value<int>(args.OldValue()));
00226         }
00227         else if (property == SelectedPageIndexProperty())
00228         {
00229             OnSelectedPageIndexChange(winrt::unbox_value<int>(args.OldValue()));
00230         }
00231         else if (property == ButtonPanelAlwaysShowFirstLastPageIndexProperty())
00232         {
00233             UpdateNumberPanel(NumberOfPages());
00234         }
00235     }
00236 }
00237
00238 winrt::AutomationPeer PagerControl::OnCreateAutomationPeer()
00239 {
00240     return winrt::make<PagerControlAutomationPeer>(*this);
00241 }
00242
00243 /* Property changed handlers */
00244 void PagerControl::OnDisplayModeChanged()
00245 {
00246     // Cache for performance reasons
00247     const auto displayMode = DisplayMode();
00248
00249     if (displayMode == winrt::PagerControlDisplayMode::ButtonPanel)
00250     {
00251         winrt::VisualStateManager::GoToState(*this, c_numberPanelVisibleVisualState, false);
00252     }
00253     else if (displayMode == winrt::PagerControlDisplayMode::ComboBox)
00254     {
00255         winrt::VisualStateManager::GoToState(*this, c_comboBoxVisibleVisualState, false);
00256     }
00257     else if (displayMode == winrt::PagerControlDisplayMode::NumberBox)
00258     {
00259         winrt::VisualStateManager::GoToState(*this, c_numberBoxVisibleVisualState, false);
00260     }
00261     else
00262     {
00263         UpdateDisplayModeAutoState();
00264     }
00265 }
00266
00267 void PagerControl::UpdateDisplayModeAutoState()
00268 {
00269     const int numberOfPages = NumberOfPages();
00270     if (numberOfPages > -1)
00271     {
00272         winrt::VisualStateManager::GoToState(*this, numberOfPages < c_AutoDisplayModeNumberOfPagesThreshold ?
00273             c_comboBoxVisibleVisualState : c_numberBoxVisibleVisualState, false);
00274     }
00275     else
00276     {
00277         winrt::VisualStateManager::GoToState(*this, c_numberBoxVisibleVisualState, false);
00278     }
00279 }
00280
00281 void PagerControl::OnNumberOfPagesChanged(const int oldValue)
00282 {
00283     m_lastNumberOfPagesCount = oldValue;
00284     const int numberOfPages = NumberOfPages();
00285     if (numberOfPages < SelectedPageIndex() && numberOfPages > -1)
00286     {
00287         SelectedPageIndex(numberOfPages - 1);
00288     }
00289     UpdateTemplateSettingElementLists();
00290     if (DisplayMode() == winrt::PagerControlDisplayMode::Auto)
00291     {
00292         UpdateDisplayModeAutoState();
00293     }
00294     if (numberOfPages > -1)
00295     {
00296         winrt::VisualStateManager::GoToState(*this, c_finiteItemsModeState, false);
00297         if (const auto numberBox = m_numberBox.get())
00298         {
00299             numberBox.Maximum(numberOfPages);
00300         }
00301     }
00302     else
00303     {
00304         winrt::VisualStateManager::GoToState(*this, c_infiniteItemsModeState, false);
00305         if (const auto numberBox = m_numberBox.get())
00306         {
00307             numberBox.Maximum(INFINITY);
00308         }
00309     }
00310     UpdateOnEdgeButtonVisualStates();
00311 }
00312
00313 void PagerControl::OnSelectedPageIndexChange(const int oldValue)
00314 {
00315     // If we don't have any pages, there is nothing we should do.
00316     // Ensure that SelectedPageIndex will end up in the valid range of values
00317     // Special case is NumberOfPages being 0, in that case, don't verify upperbound restrictions
00318     if (SelectedPageIndex() > NumberOfPages() - 1 && NumberOfPages() > 0)
00319     {
00320         SelectedPageIndex(NumberOfPages() - 1);
00321     }
00322     else if (SelectedPageIndex() < 0)
00323     {
00324         SelectedPageIndex(0);
00325     }
00326     // Now handle the value changes
00327     m_lastSelectedPageIndex = oldValue;
00328
00329     if (const auto comboBox = m_comboBox.get())
00330     {
00331         if (SelectedPageIndex() < (int32_t)m_comboBoxEntries.Size())
00332         {
00333             comboBox.SelectedIndex(SelectedPageIndex());
00334         }
00335     }
00336     if (const auto numBox = m_numberBox.get())
00337     {
00338         numBox.Value(static_cast<double>(SelectedPageIndex()) + 1);
00339     }
00340
00341     UpdateOnEdgeButtonVisualStates();
00342     UpdateTemplateSettingElementLists();
00343
00344     if (DisplayMode() == winrt::PagerControlDisplayMode::ButtonPanel)
00345     {
00346         // NumberPanel needs to update based on multiple parameters.
00347         // SelectedPageIndex is one of them, so let's do that now!
00348         UpdateNumberPanel(NumberOfPages());
00349     }
00350
00351     // Fire value property change for UIA
00352     if (const auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this).try_as<winrt::PagerControlAutomationPeer>())
00353     {
00354         winrt::get_self<PagerControlAutomationPeer>(peer)->RaiseSelectionChanged(m_lastSelectedPageIndex, SelectedPageIndex());
00355     }
00356     RaiseSelectedIndexChanged();
00357 }
00358
00359 void PagerControl::RaiseSelectedIndexChanged()
00360 {
00361     const auto args = winrt::make_self<PagerControlSelectedIndexChangedEventArgs>(m_lastSelectedPageIndex, SelectedPageIndex());
00362     m_selectedIndexChangedEventSource(*this, *args);
00363 }
00364
00365 void PagerControl::OnButtonVisibilityChanged(const winrt::PagerControlButtonVisibility visibility,
00366     const wstring_view visibleStateName,
00367     const wstring_view collapsedStateName,
00368     const wstring_view hiddenStateName,
00369     const int hiddenOnEdgePageCriteria)
00370 {
00371     if (visibility == winrt::PagerControlButtonVisibility::Visible)
00372     {
00373         winrt::VisualStateManager::GoToState(*this, visibleStateName, false);
00374     }
00375     else if (visibility == winrt::PagerControlButtonVisibility::Hidden)
00376     {
00377         winrt::VisualStateManager::GoToState(*this, collapsedStateName, false);
00378     }
00379     else
00380     {
00381         if (SelectedPageIndex() != hiddenOnEdgePageCriteria)
00382         {
00383             winrt::VisualStateManager::GoToState(*this, visibleStateName, false);
00384         }
00385         else
00386         {
00387             winrt::VisualStateManager::GoToState(*this, hiddenStateName, false);
00388         }
00389     }
00390 }
00391
00392 void PagerControl::UpdateTemplateSettingElementLists()
00393 {
00394     // Cache values for performance :)
00395     const auto displayMode = DisplayMode();
00396     const auto numberOfPages = NumberOfPages();
00397
00398     if (displayMode == winrt::PagerControlDisplayMode::ComboBox ||
00399         displayMode == winrt::PagerControlDisplayMode::Auto)
00400     {
00401         if (numberOfPages > -1)
00402         {
00403             FillComboBoxCollectionToSize(numberOfPages);
00404         }
00405         else
00406         {
00407             if (m_comboBoxEntries.Size() < c_infiniteModeComboBoxItemsIncrement)
00408             {
00409                 FillComboBoxCollectionToSize(c_infiniteModeComboBoxItemsIncrement);
00410             }
00411         }
00412     }
00413     else if (displayMode == winrt::PagerControlDisplayMode::ButtonPanel)
00414     {
00415         UpdateNumberPanel(numberOfPages);
00416     }
00417 }
00418
00419 void PagerControl::FillComboBoxCollectionToSize(const int numberOfPages)
00420 {
00421     const int currentComboBoxItemsCount = (int32_t)m_comboBoxEntries.Size();
00422     if (currentComboBoxItemsCount <= numberOfPages)
00423     {
00424         // We are increasing the number of pages, so add the missing numbers.
00425         for (int i = currentComboBoxItemsCount; i < numberOfPages; i++)
00426         {
00427             m_comboBoxEntries.Append(winrt::box_value(i + 1));
00428         }
00429     }
00430     else
00431     {
00432         // We are decreasing the number of pages, so remove numbers starting at the end.
00433         for (int i = currentComboBoxItemsCount; i > numberOfPages; i--)
00434         {
00435             m_comboBoxEntries.RemoveAtEnd();
00436         }
00437     }
00438 }
00439
00440 void PagerControl::UpdateOnEdgeButtonVisualStates()
00441 {
00442     // Cache those values as we need them often and accessing a DP is (relatively) expensive
00443     const int selectedPageIndex = SelectedPageIndex();
00444     const int numberOfPages = NumberOfPages();
00445
00446     // Handle disabled/enabled status of buttons
00447     if (selectedPageIndex == 0)
00448     {
00449         winrt::VisualStateManager::GoToState(*this, c_firstPageButtonDisabledVisualState, false);
00450         winrt::VisualStateManager::GoToState(*this, c_previousPageButtonDisabledVisualState, false);
00451         winrt::VisualStateManager::GoToState(*this, c_nextPageButtonEnabledVisualState, false);
00452         winrt::VisualStateManager::GoToState(*this, c_lastPageButtonEnabledVisualState, false);
00453     }
00454     else if (selectedPageIndex >= numberOfPages - 1)
00455     {
00456         winrt::VisualStateManager::GoToState(*this, c_firstPageButtonEnabledVisualState, false);
00457         winrt::VisualStateManager::GoToState(*this, c_previousPageButtonEnabledVisualState, false);
00458         if (numberOfPages > -1)
00459         {
00460             winrt::VisualStateManager::GoToState(*this, c_nextPageButtonDisabledVisualState, false);
00461         }
00462         else
00463         {
00464             winrt::VisualStateManager::GoToState(*this, c_nextPageButtonEnabledVisualState, false);
00465         }
00466         winrt::VisualStateManager::GoToState(*this, c_lastPageButtonDisabledVisualState, false);
00467     }
00468     else
00469     {
00470         winrt::VisualStateManager::GoToState(*this, c_firstPageButtonEnabledVisualState, false);
00471         winrt::VisualStateManager::GoToState(*this, c_previousPageButtonEnabledVisualState, false);
00472         winrt::VisualStateManager::GoToState(*this, c_nextPageButtonEnabledVisualState, false);
00473         winrt::VisualStateManager::GoToState(*this, c_lastPageButtonEnabledVisualState, false);
00474     }
00475
00476     // Handle HiddenOnEdge states
00477     if (FirstButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
00478     {
00479         if (selectedPageIndex != 0)
00480         {
00481             winrt::VisualStateManager::GoToState(*this, c_firstPageButtonVisibleVisualState, false);
00482         }
00483         else
00484         {
00485             winrt::VisualStateManager::GoToState(*this, c_firstPageButtonHiddenVisualState, false);
00486         }
00487     }
00488     if (PreviousButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
00489     {
00490         if (selectedPageIndex != 0)
00491         {
00492             winrt::VisualStateManager::GoToState(*this, c_previousPageButtonVisibleVisualState, false);
00493         }
00494         else
00495         {
00496             winrt::VisualStateManager::GoToState(*this, c_previousPageButtonHiddenVisualState, false);
00497         }
00498     }
00499     if (NextButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
00500     {
00501         if (selectedPageIndex != numberOfPages - 1)
00502         {
00503             winrt::VisualStateManager::GoToState(*this, c_nextPageButtonVisibleVisualState, false);
00504         }
00505         else
00506         {
00507             winrt::VisualStateManager::GoToState(*this, c_nextPageButtonHiddenVisualState, false);
00508         }
00509     }
00510     if (LastButtonVisibility() == winrt::PagerControlButtonVisibility::HiddenOnEdge)
00511     {
00512         if (selectedPageIndex != numberOfPages - 1)
00513         {
00514             winrt::VisualStateManager::GoToState(*this, c_lastPageButtonVisibleVisualState, false);
00515         }
00516         else
00517         {
00518             winrt::VisualStateManager::GoToState(*this, c_lastPageButtonHiddenVisualState, false);
00519         }
00520     }
00521 }
00522
00523 /* NumberPanel logic */
00524 void PagerControl::UpdateNumberPanel(const int numberOfPages)
00525 {
00526     if (numberOfPages < 0)
00527     {
00528         UpdateNumberOfPanelCollectionInfiniteItems();
00529     }
00530     else if (numberOfPages < 8)
00531     {
00532         UpdateNumberPanelCollectionAllItems(numberOfPages);
00533     }
00534     else
00535     {
00536         const auto selectedIndex = SelectedPageIndex();
00537         // Idea: Choose correct "template" based on SelectedPageIndex (x) and NumberOfPages (n)
00538         // 1 2 3 4 5 6 ... n <-- Items
00539         if (selectedIndex < 4)
00540         {
00541             // First four items selected, create following pattern:
00542             // 1 2 3 4 5... n
00543             UpdateNumberPanelCollectionStartWithEllipsis(numberOfPages, selectedIndex);
00544         }
00545         else if (selectedIndex >= numberOfPages - 4)
00546         {
00547             // Last four items selected, create following pattern:
00548             //1 [...] n-4 n-3 n-2 n-1 n
00549             UpdateNumberPanelCollectionEndWithEllipsis(numberOfPages, selectedIndex);
00550         }
00551         else
00552         {
00553             // Neither start or end, so lets do this:
00554             // 1 [...] x-2 x-1 x x+1 x+2 [...] n
00555             // where x > 4 and x < n - 4
00556             UpdateNumberPanelCollectionCenterWithEllipsis(numberOfPages, selectedIndex);
00557         }
00558     }
00559 }
00560
00561 void PagerControl::UpdateNumberOfPanelCollectionInfiniteItems()
00562 {
00563     const int selectedIndex = SelectedPageIndex();
00564
00565     m_numberPanelElements.Clear();
00566     if (selectedIndex < 3)
00567     {
00568         AppendButtonToNumberPanelList(1, 0);
00569         AppendButtonToNumberPanelList(2, 0);
00570         AppendButtonToNumberPanelList(3, 0);
00571         AppendButtonToNumberPanelList(4, 0);
00572         AppendButtonToNumberPanelList(5, 0);
00573         MoveIdentifierToElement(selectedIndex);
00574     }
00575     else
00576     {
00577         AppendButtonToNumberPanelList(1, 0);
00578         AppendEllipsisIconToNumberPanelList();
00579         AppendButtonToNumberPanelList(selectedIndex, 0);
00580         AppendButtonToNumberPanelList(selectedIndex + 1, 0);
00581         AppendButtonToNumberPanelList(selectedIndex + 2, 0);
00582         MoveIdentifierToElement(3);
00583     }
00584 }
00585
00586 void PagerControl::UpdateNumberPanelCollectionAllItems(int numberOfPages)
00587 {
00588     // Check that the NumberOfPages did not change, so we can skip recreating collection
00589     if (m_lastNumberOfPagesCount != numberOfPages)
00590     {
00591         m_numberPanelElements.Clear();
00592         for (int i = 0; i < numberOfPages && i < 7; i++)
00593         {
00594             AppendButtonToNumberPanelList(i + 1, numberOfPages);
00595         }
00596     }
00597     MoveIdentifierToElement(SelectedPageIndex());
00598 }
00599
00600 void PagerControl::UpdateNumberPanelCollectionStartWithEllipsis(int numberOfPages, int selectedIndex)
00601 {
00602     if (m_lastNumberOfPagesCount != numberOfPages)
00603     {
00604         // Do a recalculation as the number of pages changed.
00605         m_numberPanelElements.Clear();
00606         AppendButtonToNumberPanelList(1, numberOfPages);
00607         AppendButtonToNumberPanelList(2, numberOfPages);
00608         AppendButtonToNumberPanelList(3, numberOfPages);
00609         AppendButtonToNumberPanelList(4, numberOfPages);
00610         AppendButtonToNumberPanelList(5, numberOfPages);
00611         if (ButtonPanelAlwaysShowFirstLastPageIndex())
00612         {
00613             AppendEllipsisIconToNumberPanelList();
00614             AppendButtonToNumberPanelList(numberOfPages, numberOfPages);
00615         }
00616     }
00617     // SelectedIndex is definitely the correct index here as we are counting from start
00618     MoveIdentifierToElement(selectedIndex);
00619 }
00620
00621 void PagerControl::UpdateNumberPanelCollectionEndWithEllipsis(int numberOfPages, int selectedIndex)
00622 {
00623     if (m_lastNumberOfPagesCount != numberOfPages)
00624     {
00625         // Do a recalculation as the number of pages changed.
00626         m_numberPanelElements.Clear();
00627         if (ButtonPanelAlwaysShowFirstLastPageIndex())
00628         {
00629             AppendButtonToNumberPanelList(1, numberOfPages);
00630             AppendEllipsisIconToNumberPanelList();
00631         }
00632         AppendButtonToNumberPanelList(numberOfPages - 4, numberOfPages);
00633         AppendButtonToNumberPanelList(numberOfPages - 3, numberOfPages);
00634         AppendButtonToNumberPanelList(numberOfPages - 2, numberOfPages);
00635         AppendButtonToNumberPanelList(numberOfPages - 1, numberOfPages);
00636         AppendButtonToNumberPanelList(numberOfPages, numberOfPages);
00637     }
00638     // We can only be either the last, the second from last or third from last
00639     // => SelectedIndex = NumberOfPages - y with y in {1,2,3}
00640     if (ButtonPanelAlwaysShowFirstLastPageIndex())
00641     {
00642         // Last item sits at index 4.
00643         // SelectedPageIndex for the last page is NumberOfPages - 1.
00644         // => SelectedItem = SelectedIndex - NumberOfPages + 7;
00645         MoveIdentifierToElement(selectedIndex - numberOfPages + 7);
00646     }
00647     else
00648     {
00649         // Last item sits at index 6.
00650         // SelectedPageIndex for the last page is NumberOfPages - 1.
00651         // => SelectedItem = SelectedIndex - NumberOfPages + 5;
00652         MoveIdentifierToElement(selectedIndex - numberOfPages + 5);
00653     }
00654 }
00655
00656 void PagerControl::UpdateNumberPanelCollectionCenterWithEllipsis(int numberOfPages, int selectedIndex)
00657 {
00658     const auto showFirstLastPageIndex = ButtonPanelAlwaysShowFirstLastPageIndex();
00659     if (m_lastNumberOfPagesCount != numberOfPages)
00660     {
00661         // Do a recalculation as the number of pages changed.
00662         m_numberPanelElements.Clear();
00663         if (showFirstLastPageIndex)
00664         {
00665             AppendButtonToNumberPanelList(1, numberOfPages);
00666             AppendEllipsisIconToNumberPanelList();
00667         }
00668         AppendButtonToNumberPanelList(selectedIndex, numberOfPages);
00669         AppendButtonToNumberPanelList(selectedIndex + 1, numberOfPages);
00670         AppendButtonToNumberPanelList(selectedIndex + 2, numberOfPages);
00671         if (showFirstLastPageIndex)
00672         {
00673             AppendEllipsisIconToNumberPanelList();
00674             AppendButtonToNumberPanelList(numberOfPages, numberOfPages);
00675         }
00676     }
00677     // "selectedIndex + 1" is our representation for SelectedIndex.
00678     if (showFirstLastPageIndex)
00679     {
00680         // SelectedIndex + 1 is the fifth element.
00681         // Collections are base zero, so the index to underline is 3.
00682         MoveIdentifierToElement(3);
00683     }
00684     else
00685     {
00686         // SelectedIndex + 1 is the third element.
00687         // Collections are base zero, so the index to underline is 1.
00688         MoveIdentifierToElement(1);
00689     }
00690 }
00691
00692 void PagerControl::MoveIdentifierToElement(int index)
00693 {
00694     if (const auto indicator = m_selectedPageIndicator.get())
00695     {
00696         if (const auto repeater = m_numberPanelRepeater.get())
00697         {
00698             repeater.UpdateLayout();
00699             if (const auto element = repeater.TryGetElement(index).try_as<winrt::FrameworkElement>())
00700             {
00701                 const auto boundingRect = element.TransformToVisual(repeater).TransformBounds(winrt::Rect::Rect(0, 0, (float)repeater.ActualWidth(), (float)repeater.ActualHeight()));
00702                 winrt::Thickness newMargin;
00703                 newMargin.Left = boundingRect.X;
00704                 newMargin.Top = 0;
00705                 newMargin.Right = 0;
00706                 newMargin.Bottom = 0;
00707                 indicator.Margin(newMargin);
00708                 indicator.Width(element.ActualWidth());
00709             }
00710         }
00711     }
00712 }
00713
00714 void PagerControl::AppendButtonToNumberPanelList(const int pageNumber, const int numberOfPages)
00715 {
00716     winrt::Button button;
00717     button.Content(winrt::box_value(pageNumber));
00718     const auto buttonClickedFunc = [this](auto const& sender, auto const& args) {
00719         if (const auto button = sender.try_as<winrt::Button>())
00720         {
00721             const int unboxedValue = winrt::unbox_value<int>(button.Content());
00722             SelectedPageIndex(unboxedValue - 1);
00723         }
00724     };
00725     button.Click(buttonClickedFunc);
00726     // Set the default style of buttons
00727     button.Style(unbox_value<winrt::Style>(ResourceAccessor::ResourceLookup(*this, box_value(c_numberPanelButtonStyleName))));
00728     winrt::AutomationProperties::SetName(button, ResourceAccessor::GetLocalizedStringResource(SR_PagerControlPageTextName) + L" " + winrt::to_hstring(pageNumber));
00729     winrt::AutomationProperties::SetPositionInSet(button, pageNumber);
00730     winrt::AutomationProperties::SetSizeOfSet(button, numberOfPages);
00731     m_numberPanelElements.Append(button);
00732 }
00733
00734 void PagerControl::AppendEllipsisIconToNumberPanelList()
00735 {
00736     winrt::SymbolIcon ellipsisIcon;
00737     ellipsisIcon.Symbol(winrt::Symbol::More);
00738     m_numberPanelElements.Append(ellipsisIcon);
00739 }
00740
00741 /* Interaction event listeners */
00742 void PagerControl::OnRootGridKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args)
00743 {
00744     if (args.Key() == winrt::VirtualKey::Left || args.Key() == winrt::VirtualKey::GamepadDPadLeft)
00745     {
00746         auto options = winrt::FindNextElementOptions();
00747         options.SearchRoot(this->XamlRoot().Content());
00748         winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Left, options);
00749     }
00750     else if (args.Key() == winrt::VirtualKey::Right || args.Key() == winrt::VirtualKey::GamepadDPadRight)
00751     {
00752         auto options = winrt::FindNextElementOptions();
00753         options.SearchRoot(this->XamlRoot().Content());
00754         winrt::FocusManager::TryMoveFocus(winrt::FocusNavigationDirection::Right, options);
00755     }
00756 }
00757
00758 void PagerControl::ComboBoxSelectionChanged(const winrt::IInspectable& sender, const winrt::SelectionChangedEventArgs& args)
00759 {
00760     if (const auto comboBox = m_comboBox.get())
00761     {
00762         SelectedPageIndex(comboBox.SelectedIndex());
00763     }
00764 }
00765
00766 void PagerControl::NumberBoxValueChanged(const winrt::IInspectable& sender, const winrt::NumberBoxValueChangedEventArgs& args)
00767 {
00768     SelectedPageIndex((int)(args.NewValue()) - 1);
00769 }
00770
00771 void PagerControl::FirstButtonClicked(const IInspectable& sender, const winrt::RoutedEventArgs& e)
00772 {
00773     SelectedPageIndex(0);
00774     if (const auto command = FirstButtonCommand())
00775     {
00776         command.Execute(nullptr);
00777     }
00778 }
00779
00780 void PagerControl::PreviousButtonClicked(const IInspectable& sender, const winrt::RoutedEventArgs& e)
00781 {
00782     // In this method, SelectedPageIndex is always greater than 1.
00783     SelectedPageIndex(SelectedPageIndex() - 1);
00784     if (const auto command = PreviousButtonCommand())
00785     {
00786         command.Execute(nullptr);
00787     }
00788 }
00789
00790 void PagerControl::NextButtonClicked(const IInspectable& sender, const winrt::RoutedEventArgs& e)
00791 {
00792     // In this method, SelectedPageIndex is always less than maximum.
00793     SelectedPageIndex(SelectedPageIndex() + 1);
00794     if (const auto command = NextButtonCommand())
00795     {
00796         command.Execute(nullptr);
00797     }
00798 }
00799
00800 void PagerControl::LastButtonClicked(const IInspectable& sender, const winrt::RoutedEventArgs& e)
00801 {
00802     SelectedPageIndex(NumberOfPages() - 1);
00803     if (const auto command = LastButtonCommand())
00804     {
00805         command.Execute(nullptr);
00806     }
00807 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealFallbackPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealFallbackPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.Foundation.Metadata;
00005 using Windows.UI;
00006 using Microsoft.UI.Composition;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Automation;
00009 using Microsoft.UI.Xaml.Media;
00010 using Microsoft.UI.Private.Media;
00011 using MUXControlsTestApp.Utilities;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     public sealed partial class RevealFallbackPage : TestPage
00016     {
00017         RevealTestApi _revealTestApi;
00018         RevealBrushTestApi _revealBrushTestApi;
00019         RevealBackgroundBrush _resourceButtonRevealBackgroundBrush;
00020         RevealBackgroundBrush _resourceButtonRevealBackgroundPointerOver;
00021         RevealBackgroundBrush _resourceButtonRevealBackgroundPressed;
00022         RevealBorderBrush _resourceButtonRevealBorderBrush;
00023         RevealBorderBrush _resourceButtonRevealBorderBrushPointerOver;
00024         RevealBorderBrush _resourceButtonRevealBorderBrushPressed;
00025
00026         public RevealFallbackPage()
00027         {
00028             this.InitializeComponent();
00029
00030             AutomationProperties.SetName(this, "RevealFallbackPage");
00031             AutomationProperties.SetAutomationId(this, "RevealFallbackPage");
00032
00033             _revealTestApi = new RevealTestApi();
00034             _revealBrushTestApi = new RevealBrushTestApi();
00035         }
00036
00037         private void RunTestButton_Clicked(object sender, RoutedEventArgs e)
00038         {
00039             using (var setup = new MaterialSetupHelper())
00040             {
00041                 // Initialize local references to Page.Resources overrides for the RevealBrushes we'll use
00042                 _resourceButtonRevealBackgroundBrush = Resources["ButtonRevealBackground"] as RevealBackgroundBrush;
00043                 _resourceButtonRevealBackgroundPointerOver = Resources["ButtonRevealBackgroundPointerOver"] as RevealBackgroundBrush;
00044                 _resourceButtonRevealBackgroundPressed = Resources["ButtonRevealBackgroundPressed"] as RevealBackgroundBrush;
00045                 _resourceButtonRevealBorderBrush = Resources["ButtonRevealBorderBrush"] as RevealBorderBrush;
00046                 _resourceButtonRevealBorderBrushPointerOver = Resources["ButtonRevealBorderBrushPointerOver"] as RevealBorderBrush;
00047                 _resourceButtonRevealBorderBrushPressed = Resources["ButtonRevealBorderBrushPressed"] as RevealBorderBrush;
00048
00049                 // Apply reveal styles
00050                 RevealButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
00051                 RevealRepeatButton.Style = Application.Current.Resources["RepeatButtonRevealStyle"] as Style;
00052                 RevealToggleButton.Style = Application.Current.Resources["ToggleButtonRevealStyle"] as Style;
00053                 LargeButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
00054                 NarrowButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
00055
00056                 switch (TestNameComboBox.GetSelectedText())
00057                 {
00058                     case "RevealAlwaysUseFallback":
00059                         {
00060                             RunRevealAlwaysUseFallback();
00061                             break;
00062                         }
00063                 }
00064             }
00065         }
00066
00067         // Toggle ForceFallback property and validate brush + light state of two easily accessible (Default VSM state) brushes
00068         private void RunRevealAlwaysUseFallback()
00069         {
00070             _revealBrushTestApi.RevealBrush = LargeButton.Background as RevealBrush;
00071             bool isInFallbackMode = _revealBrushTestApi.IsInFallbackMode;
00072
00073             if (isInFallbackMode)
00074             {
00075                 TestResult.Text = "RevealAlwaysUseFallback: Skipped";
00076             }
00077             else
00078             {
00079                 // 1. Force fallback + validate
00080                 AlwaysUseFallbackHelper(true);
00081                 RevealBrush largeButtonBackgroundBrush = LargeButton.Background as RevealBrush;
00082                 RevealBrush largeButtonBorderBrush = LargeButton.BorderBrush as RevealBrush;
00083
00084                 // Validate brushes
00085                 bool fallbackBackgroundBrushResult = VerifyFallbackColor(largeButtonBackgroundBrush, Microsoft.UI.Colors.Orange);
00086                 bool fallbackBorderBrushResult = VerifyFallbackColor(largeButtonBorderBrush, Microsoft.UI.Colors.Transparent);
00087
00088                 // Validate lights
00089                 bool fallbackBackroundLightResult = VerifyAmbientLight(largeButtonBackgroundBrush, true) &&
00090                                                      VerifyBorderLight(largeButtonBackgroundBrush, false) &&
00091                                                      VerifyHoverLight(largeButtonBackgroundBrush, false);
00092
00093                 bool fallbackBorderLightResult = VerifyAmbientLight(largeButtonBorderBrush, true) &&
00094                                                      VerifyBorderLight(largeButtonBorderBrush, false) &&
00095                                                      VerifyHoverLight(largeButtonBorderBrush, false);
00096
00097                 // 2. Unforce fallback + validate
00098                 AlwaysUseFallbackHelper(false);
00099
00100                 // Validate brushes
00101                 bool backgroundBrushResult = VerifyRevealBrush(largeButtonBackgroundBrush);
00102                 bool borderBrushResult = VerifyRevealBrush(largeButtonBorderBrush);
00103
00104                 // Validate lights
00105                 bool backroundLightResult = VerifyAmbientLight(largeButtonBackgroundBrush, true) &&
00106                                                      VerifyBorderLight(largeButtonBackgroundBrush, false) &&
00107                                                      VerifyHoverLight(largeButtonBackgroundBrush, true);
00108
00109                 bool borderLightResult = VerifyAmbientLight(largeButtonBorderBrush, true) &&
00110                                                      VerifyBorderLight(largeButtonBorderBrush, true) &&
00111                                                      VerifyHoverLight(largeButtonBorderBrush, false);
00112
00113                 bool brushesResult = fallbackBackgroundBrushResult && fallbackBorderBrushResult && backgroundBrushResult && borderBrushResult;
00114                 bool lightsResult = fallbackBackroundLightResult && fallbackBorderLightResult && backroundLightResult && borderLightResult;
00115                 bool result = brushesResult && lightsResult;
00116
00117                 string brushesResultString = System.String.Format("({0},{1},{2},{3})", fallbackBackgroundBrushResult, fallbackBorderBrushResult, backgroundBrushResult, borderBrushResult);
00118                 string lightsResultString = System.String.Format("({0},{1},{2},{3})", fallbackBackroundLightResult, fallbackBorderLightResult, backroundLightResult, borderLightResult);
00119
00120                 TestResult.Text = result ? "" : "Errors: brushes=" + brushesResultString + ", lights=" + lightsResultString;
00121             }
00122         }
00123
00124         private void AlwaysUseFallbackButton_Checked(object sender, RoutedEventArgs e)
00125         {
00126             AlwaysUseFallbackHelper(true);
00127         }
00128
00129         private void AlwaysUseFallbackButton_Unchecked(object sender, RoutedEventArgs e)
00130         {
00131             AlwaysUseFallbackHelper(false);
00132         }
00133
00134         void AlwaysUseFallbackHelper(bool value)
00135         {
00136             _resourceButtonRevealBackgroundBrush.AlwaysUseFallback = value;
00137             _resourceButtonRevealBackgroundPointerOver.AlwaysUseFallback = value;
00138             _resourceButtonRevealBackgroundPressed.AlwaysUseFallback = value;
00139             _resourceButtonRevealBorderBrush.AlwaysUseFallback = value;
00140             _resourceButtonRevealBorderBrushPointerOver.AlwaysUseFallback = value;
00141             _resourceButtonRevealBorderBrushPressed.AlwaysUseFallback = value;
00142         }
00143
00144         bool VerifyRevealBrush(RevealBrush testBrush)
00145         {
00146             _revealBrushTestApi.RevealBrush = testBrush;
00147             bool isInFallbackMode = _revealBrushTestApi.IsInFallbackMode;
00148             CompositionBrush compositionBrush = _revealBrushTestApi.CompositionBrush;
00149
00150             return !isInFallbackMode &&
00151                    (compositionBrush != null && compositionBrush is CompositionEffectBrush);
00152         }
00153
00154         bool VerifyFallbackColor(RevealBrush testBrush, Color fallbackColor)
00155         {
00156             _revealBrushTestApi.RevealBrush = testBrush;
00157             bool isInFallbackMode = _revealBrushTestApi.IsInFallbackMode;
00158             CompositionBrush compositionBrush = _revealBrushTestApi.CompositionBrush;
00159
00160             // In fallbackmode, comp brush is set to null if color is transparent
00161             // it's used to boost performance for LVIP.
00162             if (isInFallbackMode && fallbackColor.Equals(Microsoft.UI.Colors.Transparent))
00163             {
00164                 return compositionBrush == null;
00165             }
00166
00167             return isInFallbackMode &&
00168                    (compositionBrush != null && compositionBrush is CompositionColorBrush) &&
00169                    (compositionBrush as CompositionColorBrush).Color.Equals(fallbackColor);
00170         }
00171
00172         bool VerifyAmbientLight(RevealBrush testBrush, bool value)
00173         {
00174             _revealBrushTestApi.RevealBrush = testBrush;
00175             bool ambientLightSet = _revealBrushTestApi.IsAmbientLightSet;
00176             return value ? ambientLightSet : !ambientLightSet;
00177         }
00178
00179         bool VerifyBorderLight(RevealBrush testBrush, bool value)
00180         {
00181             _revealBrushTestApi.RevealBrush = testBrush;
00182             bool borderLightSet = _revealBrushTestApi.IsBorderLightSet;
00183             return value ? borderLightSet : !borderLightSet;
00184         }
00185
00186         bool VerifyHoverLight(RevealBrush testBrush, bool value)
00187         {
00188             _revealBrushTestApi.RevealBrush = testBrush;
00189             bool hoverLightSet = _revealBrushTestApi.IsHoverLightSet;
00190             return value ? hoverLightSet : !hoverLightSet;
00191         }
00192     }
00193 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipAutomationPeer.h Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "TeachingTip.h"
00006 #include "TeachingTipAutomationPeer.g.h"
00007
00008 class TeachingTipAutomationPeer :
00009     public ReferenceTracker<TeachingTipAutomationPeer, winrt::implementation::TeachingTipAutomationPeerT, winrt::IWindowProvider>
00010 {
00011
00012 public:
00013     TeachingTipAutomationPeer(winrt::TeachingTip const& owner);
00014
00015     // IAutomationPeerOverrides
00016     winrt::AutomationControlType GetAutomationControlTypeCore();
00017     winrt::hstring GetClassNameCore();
00018
00019     winrt::WindowInteractionState InteractionState();
00020     bool IsModal();
00021     bool IsTopmost();
00022     bool Maximizable();
00023     bool Minimizable();
00024     winrt::WindowVisualState VisualState();
00025     void Close();
00026     void SetVisualState(winrt::WindowVisualState state);
00027     bool WaitForInputIdle(int32_t milliseconds);
00028
00029     void RaiseWindowClosedEvent();
00030     void RaiseWindowOpenedEvent(wstring_view const& displayString);
00031
00032 private:
00033     winrt::TeachingTip GetTeachingTip();
00034 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingBringingIntoViewEventArgs.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingBringingIntoViewEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollPresenterTrace.h"
00007 #include "ScrollingBringingIntoViewEventArgs.h"
00008
00009 winrt::ScrollingSnapPointsMode ScrollingBringingIntoViewEventArgs::SnapPointsMode()
00010 {
00011     return m_snapPointsMode;
00012 }
00013
00014 void ScrollingBringingIntoViewEventArgs::SnapPointsMode(winrt::ScrollingSnapPointsMode snapPointsMode)
00015 {
00016     m_snapPointsMode = snapPointsMode;
00017 }
00018
00019 winrt::BringIntoViewRequestedEventArgs ScrollingBringingIntoViewEventArgs::RequestEventArgs()
00020 {
00021     return m_requestEventArgs;
00022 }
00023
00024 double ScrollingBringingIntoViewEventArgs::TargetHorizontalOffset()
00025 {
00026     return m_targetHorizontalOffset;
00027 }
00028
00029 double ScrollingBringingIntoViewEventArgs::TargetVerticalOffset()
00030 {
00031     return m_targetVerticalOffset;
00032 }
00033
00034 int32_t ScrollingBringingIntoViewEventArgs::CorrelationId()
00035 {
00036     return m_offsetsChangeCorrelationId;
00037 }
00038
00039 bool ScrollingBringingIntoViewEventArgs::Cancel()
00040 {
00041     return m_cancel;
00042 }
00043
00044 void ScrollingBringingIntoViewEventArgs::Cancel(bool value)
00045 {
00046     m_cancel = value;
00047 }
00048
00049 void ScrollingBringingIntoViewEventArgs::OffsetsChangeCorrelationId(int32_t offsetsChangeCorrelationId)
00050 {
00051     m_offsetsChangeCorrelationId = offsetsChangeCorrelationId;
00052 }
00053
00054 void ScrollingBringingIntoViewEventArgs::RequestEventArgs(const winrt::BringIntoViewRequestedEventArgs& requestEventArgs)
00055 {
00056     m_requestEventArgs = requestEventArgs;
00057 }
00058
00059 void ScrollingBringingIntoViewEventArgs::TargetOffsets(double targetHorizontalOffset, double targetVerticalOffset)
00060 {
00061     m_targetHorizontalOffset = targetHorizontalOffset;
00062     m_targetVerticalOffset = targetVerticalOffset;
00063 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Collections/Vector.h Source File

  • File List
  • File Members
  • Collections

Vector.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "VectorIterator.h"
00006 #include "VectorChangedEventArgs.h"
00007 #include <algorithm>
00008
00009 // Nearly all Vector need to set DependencyObjectBase flag
00010 // to make DependencyObject as ComposableBase
00011 // Otherwise we may hit memory leak when interact with .net.
00012 // One exception is AcrylicBrush::CreateAcrylicBrushWorker
00013 // because we know we don't have memory leak.
00014 enum class VectorFlag {
00015     None = 0, // not Observable, not Bindable and not DependencyObjectBase
00016     Observable = 1,
00017     DependencyObjectBase = 2,
00018     Bindable = 4,
00019     NoTrackerRef = 8
00020 };
00021
00022 template <VectorFlag ...all>
00023 constexpr int MakeVectorParam();
00024
00025 template <VectorFlag first, VectorFlag ...others>
00026 constexpr int  MakeVectorParamImpl()
00027 {
00028     return static_cast<int>(first) | MakeVectorParam<others...>();
00029 };
00030
00031 template <VectorFlag ...all>
00032 constexpr int MakeVectorParam()
00033 {
00034     return MakeVectorParamImpl<all...>();
00035 };
00036
00037 template <>
00038 constexpr int MakeVectorParam()
00039 {
00040     return 0;
00041 };
00042
00043 template <int flag> struct VectorFlagHelper
00044 {
00045     static constexpr bool isObservable = !!(flag & static_cast<int>(VectorFlag::Observable));
00046     static constexpr bool isDependencyObjectBase = !!(flag & static_cast<int>(VectorFlag::DependencyObjectBase));
00047     static constexpr bool isBindable = !!(flag & static_cast<int>(VectorFlag::Bindable));
00048     static constexpr bool isNoTrackerRef = !!(flag & static_cast<int>(VectorFlag::NoTrackerRef));
00049 };
00050
00051 // TStorageWrapperImpl is used to do the data conversion from T <-> T_Storage
00052 // isNoTrackerRef = true :T <-> T
00053 // isNoTrackerRef = false  : T <-> tracker_ref<T>
00054
00055 template <typename T, bool isNoTrackerRef = false> struct TStorageWrapperImpl;
00056 template <typename T, bool isNoTrackerRef> struct TStorageWrapperImpl
00057 {
00058     using Holder = typename tracker_ref<T>;
00059
00060     static Holder wrap(const T& value, const ITrackerHandleManager* trackerHandleManager)
00061     {
00062         Holder holder{ trackerHandleManager };
00063         holder.set(value);
00064         return holder;
00065     }
00066
00067     static T unwrap(const Holder& holder, bool useSafeGet = false)
00068     {
00069         return holder.safe_get(useSafeGet);
00070     }
00071 };
00072 template <typename T> struct TStorageWrapperImpl<T, true>
00073 {
00074     using Holder = typename T;
00075
00076     static Holder wrap(const T& value, ITrackerHandleManager* trackerHandleManager)
00077     {
00078         return value;
00079     }
00080
00081     static T unwrap(const Holder& holder, bool useSafeGet = false)
00082     {
00083         return holder;
00084     }
00085 };
00086
00087 // ObservableTraits defines Observable functions and Observable data types
00088 // isObservable = false, dummy data type and dummy functions
00089 template <class T, bool isObservable, bool isBindable>
00090 struct ObservableTraits
00091 {
00092     typedef struct Dummy { Dummy(ITrackerHandleManager*) {} } EventSource;
00093     using EventHandler = typename std::conditional<isBindable,
00094         winrt::BindableVectorChangedEventHandler,
00095         winrt::VectorChangedEventHandler<T>
00096     >::type;
00097     typedef typename std::conditional<isBindable,
00098         winrt::IBindableObservableVector,
00099         winrt::IObservableVector<winrt::IInspectable>>::type SenderType;
00100     using EventToken = typename winrt::event_token;
00101
00102     static void RaiseEvent(...) { };
00103     static winrt::event_token AddEventHandler(...) { return {}; };
00104     static void RemoveEventHandler(...) { };
00105 };
00106
00107 // IsObservable = true;
00108 template <class T, bool isBindable>
00109 struct ObservableTraits<T, true, isBindable>
00110 {
00111     using SenderType = typename std::conditional<isBindable,
00112         winrt::IBindableObservableVector,
00113         winrt::IObservableVector<T>>::type;
00114
00115     using EventSource = typename std::conditional<isBindable,
00116         event_source<winrt::BindableVectorChangedEventHandler>,
00117         event_source<winrt::VectorChangedEventHandler<T>>
00118     >::type;
00119
00120     using EventHandler = typename std::conditional<isBindable,
00121         winrt::BindableVectorChangedEventHandler,
00122         winrt::VectorChangedEventHandler<T>
00123     >::type;
00124
00125     using EventToken = typename winrt::event_token;
00126
00127     static void RaiseEvent(EventSource* e, SenderType sender, winrt::CollectionChange collectionChange, uint32_t index)
00128     {
00129         auto args = winrt::make<VectorChangedEventArgs>(collectionChange, index);
00130         (*e)(sender, args);
00131     }
00132     static winrt::event_token AddEventHandler(EventSource* e, EventHandler const& handler)
00133     {
00134         return e->add(handler);
00135     };
00136     static void RemoveEventHandler(EventSource* e, winrt::event_token const& token)
00137     {
00138         e->remove(token);
00139     };
00140 };
00141
00142 // This are callback functions and the owner of inner vector should implement this interface.
00143 // The Inner Vector doesn't hold ITrackerHandleManager, also doesn't have enough information to send out the event
00144 // All the information is deduced from the owner
00145 template <typename EventSource, typename T>
00146 struct IVectorOwner
00147 {
00148     virtual ITrackerHandleManager* GetExternalTrackerHandleManager() = 0;
00149     virtual winrt::IInspectable GetVectorEventSender() = 0;
00150     virtual EventSource* GetVectorEventSource() = 0;
00151     virtual std::function<bool(T const& value, uint32_t& index)> GetCustomIndexOfFunction() { return nullptr; };
00152 };
00153
00154 // Vector Inner Implementation without Observable function
00155 template <typename VectorOptions, typename Wrapper>
00156 struct VectorInnerImpl
00157 {
00158 private:
00159     using T_type = typename VectorOptions::T_type;
00160
00161     typename T_type GetAt(uint32_t const index, bool useSafeGet)
00162     {
00163         if (index < static_cast<uint32_t>(m_vector.size()))
00164         {
00165             return unwrap(m_vector[index], useSafeGet);
00166         }
00167         else
00168         {
00169             throw winrt::hresult_out_of_bounds();
00170         }
00171     }
00172
00173 public:
00174     VectorInnerImpl(ITrackerHandleManager* trackerHandleManager)
00175     {
00176         m_trackerHandleManager = trackerHandleManager;
00177     }
00178     uint32_t Size()
00179     {
00180         return static_cast<uint32_t>(m_vector.size());
00181     }
00182
00183     typename T_type GetAt(uint32_t const index)
00184     {
00185         return GetAt(index, false);
00186     }
00187
00188     typename T_type SafeGetAt(uint32_t const index)
00189     {
00190         return GetAt(index, true);
00191     }
00192
00193     void SetAt(uint32_t const index, typename T_type const& value)
00194     {
00195         if (index < static_cast<uint32_t>(m_vector.size()))
00196         {
00197             m_vector[index] = wrap(value);
00198             RaiseChildrenChanged(winrt::CollectionChange::ItemChanged, index);
00199         }
00200         else
00201         {
00202             throw winrt::hresult_out_of_bounds();
00203         }
00204     }
00205
00206     void Append(typename T_type const& value)
00207     {
00208         m_vector.push_back(wrap(value));
00209         RaiseChildrenChanged(winrt::CollectionChange::ItemInserted, static_cast<uint32_t>(m_vector.size()) - 1);
00210     }
00211
00212     bool IndexOf(typename T_type const& value, uint32_t& index)
00213     {
00214         index = 0;
00215
00216         auto it = std::find(m_vector.begin(), m_vector.end(), wrap(value));
00217
00218         if (it != m_vector.end())
00219         {
00220             index = (uint32_t)(it - m_vector.begin());
00221             return true;
00222         }
00223         return false;
00224     }
00225
00226     bool IndexOf_OptimizedForRemove(typename T_type const& value, uint32_t& index)
00227     {
00228         index = 0;
00229
00230         if (m_optimizedIndexOf_StartNextSearchAt >= m_vector.size())
00231         {
00232             if (m_vector.size() == 0)
00233             {
00234                 m_optimizedIndexOf_StartNextSearchAt = 0;
00235             }
00236             else
00237             {
00238                 m_optimizedIndexOf_StartNextSearchAt = static_cast<unsigned int>(m_vector.size() - 1);
00239             }
00240         }
00241
00242         const auto& searchFor = wrap(value);
00243
00244         auto it = std::find(m_vector.begin() + m_optimizedIndexOf_StartNextSearchAt, m_vector.end(), searchFor);
00245         bool found = (it != m_vector.end());
00246         if (!found && m_optimizedIndexOf_StartNextSearchAt > 0)
00247         {
00248             // Note: if std::find fails, it returns the second iterator and not always the end of the vector.
00249             it = std::find(m_vector.begin(), m_vector.begin() + m_optimizedIndexOf_StartNextSearchAt, searchFor);
00250             found = (it != m_vector.begin() + m_optimizedIndexOf_StartNextSearchAt);
00251         }
00252
00253         if (found)
00254         {
00255             index = (uint32_t)(it - m_vector.begin());
00256             if (index > 0)
00257             {
00258                 // Next time we search start near this index. We assume that the remove is being processed from the end
00259                 // of the vector towards index 0, so the next item being removed is probably at "index - 1". Start the
00260                 // next search there.
00261                 m_optimizedIndexOf_StartNextSearchAt = index - 1;
00262             }
00263             else
00264             {
00265                 m_optimizedIndexOf_StartNextSearchAt = index;
00266             }
00267             return true;
00268         }
00269
00270         return false;
00271     }
00272
00273     uint32_t GetMany(uint32_t const startIndex, winrt::array_view<T_type> values)
00274     {
00275         if (startIndex >= m_vector.size())
00276         {
00277             return 0;
00278         }
00279
00280         uint32_t actual = static_cast<uint32_t>(m_vector.size() - startIndex);
00281
00282         if (actual > values.size())
00283         {
00284             actual = values.size();
00285         }
00286
00287         for (uint32_t i = 0; i < actual; i++)
00288         {
00289             values[i] = GetAt(startIndex + i);
00290         }
00291         return actual;
00292     }
00293
00294     void InsertAt(uint32_t const index, typename T_type const& value)
00295     {
00296         if (index <= static_cast<uint32_t>(m_vector.size()))
00297         {
00298             m_vector.insert(m_vector.begin() + index, wrap(value));
00299             RaiseChildrenChanged(winrt::CollectionChange::ItemInserted, index);
00300         }
00301         else
00302         {
00303             throw winrt::hresult_out_of_bounds();
00304         }
00305
00306     }
00307
00308     void RemoveAt(uint32_t const index)
00309     {
00310         if (index < static_cast<uint32_t>(m_vector.size()))
00311         {
00312             m_vector.erase(m_vector.begin() + index);
00313             RaiseChildrenChanged(winrt::CollectionChange::ItemRemoved, index);
00314         }
00315         else
00316         {
00317             throw winrt::hresult_out_of_bounds();
00318         }
00319     }
00320
00321     void RemoveAtEnd()
00322     {
00323         if (!m_vector.empty())
00324         {
00325             m_vector.pop_back();
00326             RaiseChildrenChanged(winrt::CollectionChange::ItemRemoved, static_cast<uint32_t>(m_vector.size()));
00327         }
00328     }
00329
00330     void Clear()
00331     {
00332         m_vector.clear();
00333         RaiseChildrenChanged(winrt::CollectionChange::Reset, 0u);
00334     }
00335
00336     void ReplaceAll(winrt::array_view<T_type const> values)
00337     {
00338         Clear();
00339         for (auto value : values)
00340         {
00341             Append(value);
00342         }
00343     }
00344
00345     virtual void RaiseChildrenChanged(winrt::CollectionChange collectionChange, unsigned int index) {};
00346
00347     void reserve(unsigned int n) { m_vector.reserve(n); }
00348 protected:
00349     using T_Storage = typename Wrapper::Holder;
00350
00351     inline ITrackerHandleManager* GetTrackerHandlerManager() { return m_trackerHandleManager; }
00352     inline T_Storage wrap(typename T_type value)
00353     {
00354         return Wrapper::wrap(value, GetTrackerHandlerManager());
00355     }
00356     inline typename T_type unwrap(T_Storage const& hold, bool useSafeGet = false)
00357     {
00358         return Wrapper::unwrap(hold, useSafeGet);
00359     }
00360
00361     std::vector<T_Storage> m_vector;
00362     ITrackerHandleManager* m_trackerHandleManager{ nullptr };
00363
00364     //
00365     // IndexOf optimization for scenarios where lots of items are removed from a large vector, such as unchecking a
00366     // selected subtree in a large TreeView
00367     //
00368     // e.g. A TreeView has a single root with 10 children, each with 10,000 children inside them. The entire TreeView
00369     // is selected, and the user unchecks one of the 10 first-level children. The SelectedItems vector of the TreeView
00370     // has all 100,000 (roughly - it includes the parent nodes too) items, and we're going to remove 10,000. TreeView's
00371     // deselection logic makes sure an item is selected before removing it from the SelectedItems vector, and it does
00372     // this with an IndexOf. So naively, unchecking one top-level child is going to run 10,000 IndexOf operations into
00373     // a vector of 100,000. If the child being unchecked is near the end of the TreeView, then its entries are near the
00374     // end of the vector of 100,000, and each IndexOf will have to search linearly to the end of the vector, making the
00375     // operation extremely slow.
00376     //
00377     // Instead, we optimize by starting the search not at index 0 but partway through the list, specifically near where
00378     // we found a previous hit. The assumption is that all 10,000 items being unchecked were checked when the top-level
00379     // child was checked, so they're all next to each other in the SelectedItems vector, and we can find them quickly
00380     // if we start near where we found the previous hit.
00381     //
00382     // Note that it's _near_ the previous hit and not _at_ the previous hit because of another optimization. Removing
00383     // 10,000 items means shuffling the vector 10,000 times, which is also a slow operation. The last item being removed
00384     // is going to be shuffled up 9,999 times only to be deleted in the end. To avoid wasted shuffling, we iterate the
00385     // child collection backwards when deselecting. But this also means IndexOf can't start the next search at the same
00386     // index but rather at that index - 1. In this example, item 89,999 was just removed, and next we're going to remove
00387     // item 89,998. Starting the next search at index 89,999 actualy has the worst performance, because it guarantees that
00388     // we're going to search linearly from 89,999 to the end of the vector, then wrap around at the beginning and search
00389     // through every item in the vector before finding our hit at the last possible index 89,998.
00390     //
00391     unsigned int m_optimizedIndexOf_StartNextSearchAt = 0;
00392 };
00393
00394 // Vector Inner implementation with Observable function
00395 template <typename VectorOptions, typename Wrapper = TStorageWrapperImpl<typename VectorOptions::T_type, VectorOptions::NoTrackRef>>
00396 struct ObservableVectorInnerImpl:
00397     VectorInnerImpl<VectorOptions, Wrapper>
00398 {
00399 private:
00400     using T_type = typename VectorOptions::T_type;
00401     using Traits = typename VectorOptions::Traits;
00402     using SenderType = typename VectorOptions::SenderType;
00403     using EventSource = typename VectorOptions::EventSource;
00404     using EventHandler = typename VectorOptions::EventHandler;
00405     using EventToken = typename VectorOptions::EventToken;
00406
00407 public:
00408     ObservableVectorInnerImpl(IVectorOwner<EventSource, T_type>* pIVectorExternal) :
00409         VectorInnerImpl<VectorOptions, Wrapper>(pIVectorExternal->GetExternalTrackerHandleManager()),
00410         m_pIVectorExternal(pIVectorExternal)
00411     {
00412     }
00413
00414     void RaiseChildrenChanged(winrt::CollectionChange collectionChange, unsigned int index) override
00415     {
00416         if (auto sender = m_pIVectorExternal->GetVectorEventSender().try_as< SenderType>()) {
00417             Traits::RaiseEvent(m_pIVectorExternal->GetVectorEventSource(), sender, collectionChange, index);
00418         }
00419     }
00420
00421     winrt::event_token AddEventHandler(EventHandler const& handler)
00422     {
00423         return Traits::AddEventHandler(m_pIVectorExternal->GetVectorEventSource(), handler);
00424     };
00425
00426     void RemoveEventHandler(winrt::event_token const& token)
00427     {
00428        Traits::RemoveEventHandler(m_pIVectorExternal->GetVectorEventSource(), token);
00429     };
00430
00431 private:
00432     IVectorOwner<EventSource, T_type>* m_pIVectorExternal{ nullptr };
00433 };
00434
00435
00436 // VectorInterfaceHelper hold all the variable data types which depends on bindable flag
00437 // isBindable = false
00438 template <typename T, bool isBindable> struct VectorInterfaceHelper
00439 {
00440     using VectorType = winrt::IVector<T>;
00441     using IteratorType = winrt::IIterator<T>;
00442     using IterableType = winrt::IIterable<T>;
00443     using VectorViewType = winrt::IVectorView<T>;
00444     using ObservableVectorType = winrt::IObservableVector<T>;
00445 };
00446
00447 // isBindable = true
00448 template <typename T> struct VectorInterfaceHelper<T, true>
00449 {
00450     using VectorType = winrt::IBindableVector;
00451     using IteratorType = winrt::IBindableIterator;
00452     using VectorViewType = winrt::IBindableVectorView;
00453     using IterableType = winrt::IBindableIterable;
00454     using ObservableVectorType = winrt::IBindableObservableVector;
00455 };
00456
00457 // Parameter used to support SetComposableBasePointersImplT for Vector
00458 // Internally derive from DependencyObject to get ReferenceTracker behavior.
00459 // But No Xaml application have problem to create DependencyObject.
00460 // Create a dummy object for it.
00461 template <bool isDependencyObjectBase>
00462 struct ComposableBasePointersImplTType
00463 {
00464     using WinRTBase = typename winrt::DependencyObject;
00465     using WinRTBaseFactoryInterface = typename winrt::IDependencyObjectFactory;
00466 };
00467
00468 template <>
00469 struct ComposableBasePointersImplTType<false>
00470 {
00471     using WinRTBase = typename winrt::IInspectable;
00472     using WinRTBaseFactoryInterface = typename winrt::IInspectable;
00473 };
00474
00475 // VectorOptions hold all dynamic information which is used for Vector implementation and Observable implementation.
00476 template <typename T, bool isObservable, bool isBindable, bool isDependencyObjectBase, bool isNoTrackerRef = false>
00477 struct VectorOptionsBase: VectorInterfaceHelper<T, isBindable>, ComposableBasePointersImplTType<isDependencyObjectBase>
00478 {
00479     static constexpr bool Bindable = isBindable;
00480     static constexpr bool Observable = isObservable;
00481     static constexpr bool DependencyObjectBase = isDependencyObjectBase;
00482     static constexpr bool NoTrackRef = isNoTrackerRef;
00483
00484     //using type = typename VectorOptions<T, isObservable, isBindable, isDependencyObjectBase>;
00485     using T_type = typename T;
00486     using Traits = typename ObservableTraits<T, isObservable, isBindable>;
00487     using SenderType = typename Traits::SenderType;
00488     using EventSource = typename Traits::EventSource;
00489     using EventHandler = typename Traits::EventHandler;
00490     using EventToken = typename Traits::EventToken;
00491     using IVectorOwner = typename IVectorOwner<EventSource, T>;
00492 };
00493
00494 template <typename T, bool isObservable, bool isBindable, bool isDependencyObjectBase, bool isNoTrackerRef>
00495 struct VectorOptions: VectorOptionsBase<T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef>
00496 {
00497 };
00498
00499 template <typename T, bool isObservable, bool isDependencyObjectBase, bool isNoTrackerRef>
00500 struct VectorOptions<T, isObservable, true, isDependencyObjectBase, isNoTrackerRef>:
00501     VectorOptionsBase<winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef>
00502 {
00503 };
00504
00505 template <typename T, int flag, typename Helper = VectorFlagHelper<flag>>
00506 struct VectorOptionsFromFlag :
00507     VectorOptions<T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef>
00508 {
00509 };
00510
00511 // Implement IObservable or IBindableObservable Interface
00512 #define Implement_IObservable(Options) \
00513     public: \
00514         winrt::event_token VectorChanged(typename Options##::EventHandler const& value) \
00515         { \
00516             auto inner = this->GetVectorInnerImpl(); \
00517             return inner->AddEventHandler(value); \
00518         } \
00519         void VectorChanged(typename Options##::EventToken const& token) \
00520         { \
00521             auto inner = this->GetVectorInnerImpl(); \
00522             inner->RemoveEventHandler(token); \
00523         } \
00524     private:
00525
00526 // Implement IVector or IBindableVector Interface which will not modify the data
00527 #define Implement_IVector_Read_Functions(Options) \
00528     public: \
00529         typename Options##::VectorViewType GetView() \
00530         { \
00531             throw winrt::hresult_not_implemented(); \
00532         } \
00533         uint32_t Size() \
00534         { \
00535             auto inner = this->GetVectorInnerImpl(); \
00536             return inner->Size(); \
00537         } \
00538         typename Options##::T_type GetAt(uint32_t index) \
00539         { \
00540             auto inner = this->GetVectorInnerImpl(); \
00541             return inner->GetAt(index); \
00542         } \
00543         bool IndexOf(typename Options##::T_type const& value, uint32_t& index) \
00544         { \
00545             if (auto indexOfFunction = GetCustomIndexOfFunction()) \
00546             { \
00547                 return indexOfFunction(value, index); \
00548             } \
00549             else \
00550             { \
00551                 auto inner = this->GetVectorInnerImpl(); \
00552                 return inner->IndexOf(value, index); \
00553             } \
00554         } \
00555         uint32_t GetMany(uint32_t const startIndex, winrt::array_view<typename Options##::T_type> values) \
00556         { \
00557             auto inner = this->GetVectorInnerImpl(); \
00558             return inner->GetMany(startIndex, values); \
00559         } \
00560     private:
00561
00562 // Implement IVector or IBindableVector Interface which will modify the data
00563 #define Implement_IVector_Modify_Functions(Options) \
00564     public: \
00565         void SetAt(uint32_t const index, typename Options##::T_type const& value) \
00566         { \
00567             auto inner = this->GetVectorInnerImpl(); \
00568             inner->SetAt(index, value); \
00569         } \
00570         void Append(typename Options##::T_type const& value) \
00571         { \
00572             auto inner = this->GetVectorInnerImpl(); \
00573             return inner->Append(value); \
00574         } \
00575         void InsertAt(uint32_t index, typename Options##::T_type const& value) \
00576         { \
00577             auto inner = this->GetVectorInnerImpl(); \
00578             return inner->InsertAt(index, value); \
00579         } \
00580         void RemoveAt(uint32_t index) \
00581         { \
00582             auto inner = this->GetVectorInnerImpl(); \
00583             return inner->RemoveAt(index); \
00584         } \
00585         void RemoveAtEnd() \
00586         { \
00587             auto inner = this->GetVectorInnerImpl(); \
00588             return inner->RemoveAtEnd(); \
00589         } \
00590         void Clear() \
00591         { \
00592             auto inner = this->GetVectorInnerImpl(); \
00593             return inner->Clear(); \
00594         } \
00595         void ReplaceAll(winrt::array_view<typename Options##::T_type const> value) \
00596         { \
00597             auto inner = this->GetVectorInnerImpl(); \
00598             return inner->ReplaceAll(value); \
00599         } \
00600         private:
00601
00602 // Implement IIterator or IBindableIterator Interface
00603 #define Implement_IIterator(Options) \
00604     public: \
00605         typename Options##::IteratorType First() \
00606         { \
00607             return winrt::make<VectorIterator<typename Options##::T_type, Options##::Bindable, Options::DependencyObjectBase>>(*this); \
00608         } \
00609     private:
00610
00611 // Implement IVectorOwner, also define the Inner Vector and Event Source
00612 #define Implement_Vector_External(Options) \
00613     private: \
00614         using VectorInnerType = ObservableVectorInnerImpl<##Options##>; \
00615     protected: \
00616         typename VectorInnerType *GetVectorInnerImpl() { return &m_vectorInnerImpl; } \
00617         ITrackerHandleManager* GetExternalTrackerHandleManager() { return this; }; \
00618         winrt::IInspectable GetVectorEventSender() { return *this; }; \
00619         typename Options##::EventSource *GetVectorEventSource() { return &m_vectorEventSource; }; \
00620     private: \
00621         typename VectorInnerType m_vectorInnerImpl{ this }; \
00622         typename Options##::EventSource m_vectorEventSource{ this }; \
00623     private:
00624
00625 // Implement all interfaces for IXXVector/IXXIterator/IXXObservable
00626 #define Implement_Vector(Options) \
00627     Implement_IVector_Read_Functions(##Options##) \
00628     Implement_IVector_Modify_Functions(##Options##) \
00629     Implement_IIterator(##Options##) \
00630     Implement_IObservable(##Options##) \
00631     Implement_Vector_External(##Options##)
00632
00633 // Implement all interfaces for IXXVector/IXXIterator/IXXObservable except those which will modify the vector
00634 // Like TreeViewNode, we need do additional work before Add/Remove/Modify the vector
00635 #define Implement_Vector_Read(Options) \
00636     Implement_IVector_Read_Functions(##Options##) \
00637     Implement_IIterator(##Options##) \
00638     Implement_IObservable(##Options##) \
00639     Implement_Vector_External(##Options##)
00640
00641 // Implement all interfaces for IXXVector/IXXIterator/IXXObservable except those which will modify the vector
00642 // Like TreeViewNode, we need do additional work before Add/Remove/Modify the vector
00643 #define Implement_Vector_Read_NoObservable(Options) \
00644     Implement_IVector_Read_Functions(##Options##) \
00645     Implement_IIterator(##Options##) \
00646     Implement_Vector_External(##Options##)
00647
00648
00649 template <typename T, bool isObservable, bool isBindable, bool isDependencyObjectBase, bool isNoTrackerRef, typename Options = VectorOptions<T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef>>
00650 class VectorBase :
00651     public ReferenceTracker<
00652     VectorBase<T, isObservable, isBindable, isDependencyObjectBase, isNoTrackerRef, Options>,
00653     typename reference_tracker_implements_t<typename Options::VectorType>::type,
00654     typename Options::IterableType,
00655     std::conditional_t<isObservable, typename Options::ObservableVectorType, void>>,
00656     public Options::IVectorOwner
00657 {
00658     Implement_Vector(Options)
00659
00660 public:
00661     VectorBase()
00662     {
00663     }
00664
00665     VectorBase(uint32_t capacity) : VectorBase()
00666     {
00667         GetVectorInnerImpl()->reserve(capacity);
00668     }
00669
00670 protected:
00671     void SetCustomIndexOfFunction(std::function<bool(T const& value, uint32_t& index)> indexOfFunction)
00672     {
00673         m_indexOfFunction = indexOfFunction;
00674     }
00675     virtual std::function<bool(T const& value, uint32_t& index)> GetCustomIndexOfFunction() { return m_indexOfFunction; };
00676 private:
00677     std::function<bool(T const& value, uint32_t& index)> m_indexOfFunction{ };
00678 };
00679
00680
00681 template<typename T,
00682     int flags = MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>(),
00683     typename Helper = VectorFlagHelper<flags>>
00684 class Vector :
00685     public VectorBase<T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef>
00686 {
00687 public:
00688     Vector() {}
00689     Vector(uint32_t capacity) : VectorBase<T, Helper::isObservable, Helper::isBindable, Helper::isDependencyObjectBase, Helper::isNoTrackerRef>(capacity) {}
00690
00691     // The same copy of data for NavigationView split into two parts in top navigationview. So two or more vectors are created to provide multiple datasource for controls.
00692     // InspectingDataSource is converting C# collections to Vector<winrt::IInspectable>. When GetAt(index) for things like string, a new IInspectable is always returned by C# projection.
00693     // ListView use indexOf for selection, so a copied/filtered view of C# collection doesn't work for SelectedItem(s) anymore because IInspectable comparsion always return false.
00694     // As a workaround, the copied/filtered vector requires others help to IndexOf the orignial C# collection.
00695     // So the comparison is done by C# vector other than Inspectable directly comparision. Here is an example:
00696     // Raw data A is: Home-Apps-Music-Sports
00697     // data is splitted two vectors: B and C. B includes Homes, and C includes Apps-Music-Sports
00698     // Music is the selected item. SplitDataSource is the class help to manage the raw data and provides splitted vectors to ListViews
00699     // ListView call C.indexOf("Music")
00700     //                  C ask SplitDataSource.IndexOf
00701     //                      SplitDataSource calls A.IndexOf (C# provided it)
00702     //                      SpiltDataSource help to convert the indexInRawData to indexInC
00703     //                  return index in C
00704     Vector(std::function<int(typename T const& value)> indexOfFunction) : m_indexOfFunction(indexOfFunction)
00705     {
00706         if (m_indexOfFunction)
00707         {
00708             this->SetCustomIndexOfFunction(
00709                 [this](T const& value, uint32_t& index) {
00710                 return CustomIndexOf(value, index);
00711             });
00712         }
00713     }
00714
00715 private:
00716     bool CustomIndexOf(T const& value, uint32_t& index)
00717     {
00718         if (m_indexOfFunction)
00719         {
00720             auto delegateIndex = m_indexOfFunction(value);
00721             if (delegateIndex != -1)
00722             {
00723                 index = static_cast<uint32_t>(delegateIndex);
00724                 return true;
00725             }
00726         }
00727         return false;
00728     }
00729
00730 private:
00731     std::function<int(T const& value)> m_indexOfFunction{};
00732 };
00733
00734
00735 // This type implements IObservableVector<T> *and* IObservableVector<IInspectable> so that the collection can be bound into an ItemsControl
00736 // This implementation currently only supports a reference type for T (e.g. int and string are not yet supported for T).
00737 template <typename T>
00738 struct ObservableVector :
00739     public winrt::implements<ObservableVector<T>,
00740     Vector<T>,
00741     winrt::IObservableVector<winrt::IInspectable>,
00742     winrt::IVector<winrt::IInspectable>,
00743     winrt::IVectorView<winrt::IInspectable>,
00744     winrt::IIterable<winrt::IInspectable>>
00745 {
00746     winrt::event_token VectorChanged(winrt::VectorChangedEventHandler<winrt::IInspectable> const& handler)
00747     {
00748         // Unfortunately we can't just forward the delegates to IObservableVector<T> because callers assume that the sender
00749         // is IObservableVector<IInspectable> so we have to re-raise. Luckily we can reuse the args.
00750         if (!m_innerChangedRevoker)
00751         {
00752             m_innerChangedRevoker = static_cast<winrt::IObservableVector<T>>(*this).VectorChanged(winrt::auto_revoke,
00753                 [this](auto&& sender, auto &&args)
00754                 {
00755                     m_changed(*this, args);
00756                 });
00757         }
00758         return m_changed.add(handler);
00759     }
00760
00761     void VectorChanged(winrt::event_token const cookie)
00762     {
00763         m_changed.remove(cookie);
00764     }
00765
00766     winrt::IIterator<winrt::IInspectable> First()
00767     {
00768         return winrt::make<Iterator>(Vector<T>::First());
00769     }
00770
00771     winrt::IVectorView<winrt::IInspectable> GetView()
00772     {
00773         throw winrt::hresult_not_implemented();
00774     }
00775
00776     uint32_t Size()
00777     {
00778         auto inner = this->GetVectorInnerImpl();
00779         return inner->Size();
00780     }
00781
00782     winrt::IInspectable GetAt(uint32_t index)
00783     {
00784         auto inner = this->GetVectorInnerImpl();
00785         return inner->GetAt(index);
00786     }
00787
00788     bool IndexOf(winrt::IInspectable const& value, uint32_t& index)
00789     {
00790         auto inner = this->GetVectorInnerImpl();
00791         return inner->IndexOf(value.as<T>(), index);
00792     }
00793
00794     uint32_t GetMany(uint32_t const startIndex, winrt::array_view<winrt::IInspectable> values)
00795     {
00796         throw winrt::hresult_not_implemented();
00797     }
00798
00799     void SetAt(uint32_t const index, winrt::IInspectable const& value)
00800     {
00801         auto inner = this->GetVectorInnerImpl();
00802         inner->SetAt(index, value.as<T>());
00803     }
00804     void Append(winrt::IInspectable const& value)
00805     {
00806         auto inner = this->GetVectorInnerImpl();
00807         return inner->Append(value.as<T>());
00808     }
00809     void InsertAt(uint32_t index, winrt::IInspectable const& value)
00810     {
00811         auto inner = this->GetVectorInnerImpl();
00812         return inner->InsertAt(index, value.as<T>());
00813     }
00814     void RemoveAt(uint32_t index)
00815     {
00816         auto inner = this->GetVectorInnerImpl();
00817         return inner->RemoveAt(index);
00818     }
00819     void RemoveAtEnd()
00820     {
00821         auto inner = this->GetVectorInnerImpl();
00822         return inner->RemoveAtEnd();
00823     }
00824     void Clear()
00825     {
00826         auto inner = this->GetVectorInnerImpl();
00827         return inner->Clear();
00828     }
00829     void ReplaceAll(winrt::array_view<winrt::IInspectable const> value)
00830     {
00831         throw winrt::hresult_not_implemented();
00832     }
00833
00834 private:
00835     struct Iterator : winrt::implements<Iterator, winrt::IIterator<winrt::IInspectable>>
00836     {
00837         explicit Iterator(winrt::IIterator<T>&& inner) noexcept :
00838             m_inner(std::move(inner))
00839         {
00840         }
00841
00842         winrt::IInspectable Current() const
00843         {
00844             return m_inner.Current();
00845         }
00846
00847         bool HasCurrent() const noexcept
00848         {
00849             return m_inner.HasCurrent();
00850         }
00851
00852         bool MoveNext() noexcept
00853         {
00854             return m_inner.MoveNext();
00855         }
00856
00857         uint32_t GetMany(winrt::array_view<winrt::IInspectable> value)
00858         {
00859             throw winrt::hresult_not_implemented();
00860         }
00861
00862     private:
00863         winrt::IIterator<T> m_inner;
00864     };
00865
00866     winrt::event<winrt::VectorChangedEventHandler<winrt::IInspectable>> m_changed;
00867     typename winrt::IObservableVector<T>::VectorChanged_revoker m_innerChangedRevoker;
00868 };
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/ItemCollectionTransitionProviderDerived.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

ItemCollectionTransitionProviderDerived.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Windows.Foundation;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using System.Collections.Generic;
00009
00010 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00011 {
00012     public class ItemCollectionTransitionProviderDerived : ItemCollectionTransitionProvider
00013     {
00014         public Func<ItemCollectionTransition, bool> ShouldAnimateFunc { get; set; }
00015
00016         public Action<IList<ItemCollectionTransition>> StartTransitionsFunc { get; set; }
00017
00018         protected override bool ShouldAnimateCore(ItemCollectionTransition transition)
00019         {
00020             return ShouldAnimateFunc != null && ShouldAnimateFunc(transition);
00021         }
00022
00023         protected override void StartTransitions(IList<ItemCollectionTransition> transitions)
00024         {
00025             StartTransitionsFunc?.Invoke(transitions);
00026         }
00027     }
00028 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ListViewAnchoringPage Member List

This is the complete list of members for ListViewAnchoringPage, including all inherited members.
_cvs | ListViewAnchoringPage | [private]
_groupedListViewBaseViewModel | ListViewAnchoringPage | [private]
_itemsStackPanelTemplate | ListViewAnchoringPage | [private]
_pageOperationCount | ListViewAnchoringPage | [private]
_pageOperations | ListViewAnchoringPage | [private]
_pageOperationTimer | ListViewAnchoringPage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnClearListViewItemsSource_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetItemsStackPanelItemsUpdatingScrollMode_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetListViewItemActualHeight_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetListViewItemHeight_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetListViewSize_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetModernCollectionBasePanelGroupHeaderPlacement_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetModernCollectionBasePanelGroupPadding_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetModernCollectionBasePanelVerticalAlignment_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetPageSize_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetScrollViewerVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetScrollViewerVerticalOffset_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnGetStackPanelVerticalAlignment_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnPageShrinkSize_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnResetListViewItemsSource_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetItemsStackPanelItemsUpdatingScrollMode_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetListViewFlatItemsSource_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetListViewGroupedItemsSource_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetListViewItemHeight_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetModernCollectionBasePanelGroupHeaderPlacement_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetModernCollectionBasePanelGroupPadding_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetModernCollectionBasePanelVerticalAlignment_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetPageSize_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetScrollViewerVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetScrollViewerVerticalOffset_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSetStackPanelVerticalAlignment_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSourceAppendItem_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSourceInsertItem_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSourceRemoveFirstItem_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
BtnSourceRemoveLastItem_Click(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
ChkModernCollectionBasePanelAreStickyGroupHeadersEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
CmbListViewItemsPanelType_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewAnchoringPage | [inline, private]
FindElementOfTypeInSubtree< T >(DependencyObject element) | ListViewAnchoringPage | [inline, private, static]
GetItemsStackPanel() | ListViewAnchoringPage | [inline, private]
GetItemsWrapGrid() | ListViewAnchoringPage | [inline, private]
GetStackPanel() | ListViewAnchoringPage | [inline, private]
GetThicknessFromString(string thickness) | ListViewAnchoringPage | [inline, private]
ListViewAnchoringPage() | ListViewAnchoringPage | [inline]
ListViewAnchoringPage_Loaded(object sender, RoutedEventArgs e) | ListViewAnchoringPage | [inline, private]
PageOperationTimer_Tick(object sender, object e) | ListViewAnchoringPage | [inline, private]
QueuedOperationType enum name | ListViewAnchoringPage | [private]
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CornerRadiusToThicknessConverter.properties.h Source File

  • File List
  • File Members
  • Generated

CornerRadiusToThicknessConverter.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class CornerRadiusToThicknessConverterProperties
00008 {
00009 public:
00010     CornerRadiusToThicknessConverterProperties();
00011
00012     void ConversionKind(winrt::CornerRadiusToThicknessConverterKind const& value);
00013     winrt::CornerRadiusToThicknessConverterKind ConversionKind();
00014
00015     void Multiplier(double value);
00016     double Multiplier();
00017
00018     static winrt::DependencyProperty ConversionKindProperty() { return s_ConversionKindProperty; }
00019     static winrt::DependencyProperty MultiplierProperty() { return s_MultiplierProperty; }
00020
00021     static GlobalDependencyProperty s_ConversionKindProperty;
00022     static GlobalDependencyProperty s_MultiplierProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ObservableTraits< T, true, isBindable > Member List

This is the complete list of members for ObservableTraits< T, true, isBindable >, including all inherited members.
AddEventHandler(EventSource *e, EventHandler const &handler) | ObservableTraits< T, true, isBindable > | [inline, static]
RaiseEvent(EventSource *e, SenderType sender, winrt::CollectionChange collectionChange, uint32_t index) | ObservableTraits< T, true, isBindable > | [inline, static]
RemoveEventHandler(EventSource *e, winrt::event_token const &token) | ObservableTraits< T, true, isBindable > | [inline, static]
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

ProgressBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ProgressBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ProgressBar)
00012 }
00013
00014 #include "ProgressBar.g.cpp"
00015
00016 GlobalDependencyProperty ProgressBarProperties::s_IsIndeterminateProperty{ nullptr };
00017 GlobalDependencyProperty ProgressBarProperties::s_ShowErrorProperty{ nullptr };
00018 GlobalDependencyProperty ProgressBarProperties::s_ShowPausedProperty{ nullptr };
00019 GlobalDependencyProperty ProgressBarProperties::s_TemplateSettingsProperty{ nullptr };
00020
00021 ProgressBarProperties::ProgressBarProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void ProgressBarProperties::EnsureProperties()
00027 {
00028     if (!s_IsIndeterminateProperty)
00029     {
00030         s_IsIndeterminateProperty =
00031             InitializeDependencyProperty(
00032                 L"IsIndeterminate",
00033                 winrt::name_of<bool>(),
00034                 winrt::name_of<winrt::ProgressBar>(),
00035                 false /* isAttached */,
00036                 ValueHelper<bool>::BoxedDefaultValue(),
00037                 winrt::PropertyChangedCallback(&OnIsIndeterminatePropertyChanged));
00038     }
00039     if (!s_ShowErrorProperty)
00040     {
00041         s_ShowErrorProperty =
00042             InitializeDependencyProperty(
00043                 L"ShowError",
00044                 winrt::name_of<bool>(),
00045                 winrt::name_of<winrt::ProgressBar>(),
00046                 false /* isAttached */,
00047                 ValueHelper<bool>::BoxedDefaultValue(),
00048                 winrt::PropertyChangedCallback(&OnShowErrorPropertyChanged));
00049     }
00050     if (!s_ShowPausedProperty)
00051     {
00052         s_ShowPausedProperty =
00053             InitializeDependencyProperty(
00054                 L"ShowPaused",
00055                 winrt::name_of<bool>(),
00056                 winrt::name_of<winrt::ProgressBar>(),
00057                 false /* isAttached */,
00058                 ValueHelper<bool>::BoxedDefaultValue(),
00059                 winrt::PropertyChangedCallback(&OnShowPausedPropertyChanged));
00060     }
00061     if (!s_TemplateSettingsProperty)
00062     {
00063         s_TemplateSettingsProperty =
00064             InitializeDependencyProperty(
00065                 L"TemplateSettings",
00066                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00067                 winrt::name_of<winrt::ProgressBar>(),
00068                 false /* isAttached */,
00069                 ValueHelper<winrt::ProgressBarTemplateSettings>::BoxedDefaultValue(),
00070                 nullptr);
00071     }
00072 }
00073
00074 void ProgressBarProperties::ClearProperties()
00075 {
00076     s_IsIndeterminateProperty = nullptr;
00077     s_ShowErrorProperty = nullptr;
00078     s_ShowPausedProperty = nullptr;
00079     s_TemplateSettingsProperty = nullptr;
00080 }
00081
00082 void ProgressBarProperties::OnIsIndeterminatePropertyChanged(
00083     winrt::DependencyObject const& sender,
00084     winrt::DependencyPropertyChangedEventArgs const& args)
00085 {
00086     auto owner = sender.as<winrt::ProgressBar>();
00087     winrt::get_self<ProgressBar>(owner)->OnIsIndeterminatePropertyChanged(args);
00088 }
00089
00090 void ProgressBarProperties::OnShowErrorPropertyChanged(
00091     winrt::DependencyObject const& sender,
00092     winrt::DependencyPropertyChangedEventArgs const& args)
00093 {
00094     auto owner = sender.as<winrt::ProgressBar>();
00095     winrt::get_self<ProgressBar>(owner)->OnShowErrorPropertyChanged(args);
00096 }
00097
00098 void ProgressBarProperties::OnShowPausedPropertyChanged(
00099     winrt::DependencyObject const& sender,
00100     winrt::DependencyPropertyChangedEventArgs const& args)
00101 {
00102     auto owner = sender.as<winrt::ProgressBar>();
00103     winrt::get_self<ProgressBar>(owner)->OnShowPausedPropertyChanged(args);
00104 }
00105
00106 void ProgressBarProperties::IsIndeterminate(bool value)
00107 {
00108     [[gsl::suppress(con)]]
00109     {
00110     static_cast<ProgressBar*>(this)->SetValue(s_IsIndeterminateProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00111     }
00112 }
00113
00114 bool ProgressBarProperties::IsIndeterminate()
00115 {
00116     return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_IsIndeterminateProperty));
00117 }
00118
00119 void ProgressBarProperties::ShowError(bool value)
00120 {
00121     [[gsl::suppress(con)]]
00122     {
00123     static_cast<ProgressBar*>(this)->SetValue(s_ShowErrorProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00124     }
00125 }
00126
00127 bool ProgressBarProperties::ShowError()
00128 {
00129     return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_ShowErrorProperty));
00130 }
00131
00132 void ProgressBarProperties::ShowPaused(bool value)
00133 {
00134     [[gsl::suppress(con)]]
00135     {
00136     static_cast<ProgressBar*>(this)->SetValue(s_ShowPausedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00137     }
00138 }
00139
00140 bool ProgressBarProperties::ShowPaused()
00141 {
00142     return ValueHelper<bool>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_ShowPausedProperty));
00143 }
00144
00145 void ProgressBarProperties::TemplateSettings(winrt::ProgressBarTemplateSettings const& value)
00146 {
00147     [[gsl::suppress(con)]]
00148     {
00149     static_cast<ProgressBar*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::ProgressBarTemplateSettings>::BoxValueIfNecessary(value));
00150     }
00151 }
00152
00153 winrt::ProgressBarTemplateSettings ProgressBarProperties::TemplateSettings()
00154 {
00155     return ValueHelper<winrt::ProgressBarTemplateSettings>::CastOrUnbox(static_cast<ProgressBar*>(this)->GetValue(s_TemplateSettingsProperty));
00156 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterWithCompositionScrollControllersPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterWithCompositionScrollControllersPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Xaml.Controls.Primitives;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class ScrollPresenterWithCompositionScrollControllersPage : TestPage
00013     {
00014         public ScrollPresenterWithCompositionScrollControllersPage()
00015         {
00016             this.InitializeComponent();
00017             horizontalCompositionScrollController.LogMessage += CompositionScrollController_LogMessage;
00018             verticalCompositionScrollController.LogMessage += CompositionScrollController_LogMessage;
00019         }
00020
00021         private void CompositionScrollController_LogMessage(CompositionScrollController sender, string args)
00022         {
00023             LogMessage(args);
00024         }
00025
00026         private void CmbHorizontalScrollController_SelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
00027         {
00028             ComboBox cmbHorizontalScrollController = sender as ComboBox;
00029             ScrollPresenter scrollPresenter = cmbHorizontalScrollController == cmbHorizontalScrollController1 ? scrollPresenter1 : scrollPresenter2;
00030             CompositionScrollController oldCompositionScrollController = scrollPresenter.HorizontalScrollController as CompositionScrollController;
00031
00032             switch (cmbHorizontalScrollController.SelectedIndex)
00033             {
00034                 case 0:
00035                     if (scrollPresenter.HorizontalScrollController != null)
00036                     {
00037                         scrollPresenter.HorizontalScrollController = null;
00038                         LogMessage(scrollPresenter.Name + ".HorizontalScrollController reset");
00039                     }
00040                     break;
00041                 case 1:
00042                     scrollPresenter.HorizontalScrollController = horizontalCompositionScrollController;
00043                     LogMessage(scrollPresenter.Name + ".HorizontalScrollController set to horizontalScrollController");
00044                     break;
00045                 case 2:
00046                     scrollPresenter.HorizontalScrollController = verticalCompositionScrollController;
00047                     LogMessage(scrollPresenter.Name + ".HorizontalScrollController set to verticalScrollController");
00048                     break;
00049             }
00050
00051             if (oldCompositionScrollController != null)
00052                 oldCompositionScrollController.IsEnabled = true;
00053         }
00054
00055         private void CmbVerticalScrollController_SelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
00056         {
00057             ComboBox cmbVerticalScrollController = sender as ComboBox;
00058             ScrollPresenter scrollPresenter = cmbVerticalScrollController == cmbVerticalScrollController1 ? scrollPresenter1 : scrollPresenter2;
00059             CompositionScrollController oldCompositionScrollController = scrollPresenter.VerticalScrollController as CompositionScrollController;
00060
00061             switch (cmbVerticalScrollController.SelectedIndex)
00062             {
00063                 case 0:
00064                     if (scrollPresenter.VerticalScrollController != null)
00065                     {
00066                         scrollPresenter.VerticalScrollController = null;
00067                         LogMessage(scrollPresenter.Name + ".VerticalScrollController reset");
00068                     }
00069                     break;
00070                 case 1:
00071                     scrollPresenter.VerticalScrollController = verticalCompositionScrollController;
00072                     LogMessage(scrollPresenter.Name + ".VerticalScrollController set to verticalScrollController");
00073                     break;
00074                 case 2:
00075                     scrollPresenter.VerticalScrollController = horizontalCompositionScrollController;
00076                     LogMessage(scrollPresenter.Name + ".VerticalScrollController set to horizontalScrollController");
00077                     break;
00078             }
00079
00080             if (oldCompositionScrollController != null)
00081                 oldCompositionScrollController.IsEnabled = true;
00082         }
00083
00084         private void LogMessage(string message)
00085         {
00086             if (chkLog.IsChecked.Value)
00087             {
00088                 lstLog.Items.Add(message);
00089             }
00090         }
00091
00092         private void BtnClearLog_Click(object sender, RoutedEventArgs e)
00093         {
00094             lstLog.Items.Clear();
00095         }
00096
00097         private void ChkIsHorizontallyScrollable_Checked(object sender, RoutedEventArgs e)
00098         {
00099             CheckBox chkIsHorizontallyScrollable = sender as CheckBox;
00100             ComboBox cmbHorizontalScrollController = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? cmbHorizontalScrollController1 : cmbHorizontalScrollController2;
00101             ScrollPresenter scrollPresenter = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? scrollPresenter1 : scrollPresenter2;
00102
00103             scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Enabled;
00104             switch (cmbHorizontalScrollController.SelectedIndex)
00105             {
00106                 case 1:
00107                     horizontalCompositionScrollController.IsEnabled = true;
00108                     break;
00109                 case 2:
00110                     verticalCompositionScrollController.IsEnabled = true;
00111                     break;
00112             }
00113         }
00114
00115         private void ChkIsHorizontallyScrollable_Unchecked(object sender, RoutedEventArgs e)
00116         {
00117             CheckBox chkIsHorizontallyScrollable = sender as CheckBox;
00118             ComboBox cmbHorizontalScrollController = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? cmbHorizontalScrollController1 : cmbHorizontalScrollController2;
00119             ScrollPresenter scrollPresenter = chkIsHorizontallyScrollable == chkIsHorizontallyScrollable1 ? scrollPresenter1 : scrollPresenter2;
00120
00121             scrollPresenter.HorizontalScrollMode = ScrollingScrollMode.Disabled;
00122             switch (cmbHorizontalScrollController.SelectedIndex)
00123             {
00124                 case 1:
00125                     horizontalCompositionScrollController.IsEnabled = false;
00126                     break;
00127                 case 2:
00128                     verticalCompositionScrollController.IsEnabled = false;
00129                     break;
00130             }
00131         }
00132
00133         private void ChkIsVerticallyScrollable_Checked(object sender, RoutedEventArgs e)
00134         {
00135             CheckBox chkIsVerticallyScrollable = sender as CheckBox;
00136             ComboBox cmbVerticalScrollController = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? cmbVerticalScrollController1 : cmbVerticalScrollController2;
00137             ScrollPresenter scrollPresenter = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? scrollPresenter1 : scrollPresenter2;
00138
00139             scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Enabled;
00140             switch (cmbVerticalScrollController.SelectedIndex)
00141             {
00142                 case 1:
00143                     verticalCompositionScrollController.IsEnabled = true;
00144                     break;
00145                 case 2:
00146                     horizontalCompositionScrollController.IsEnabled = true;
00147                     break;
00148             }
00149         }
00150
00151         private void ChkIsVerticallyScrollable_Unchecked(object sender, RoutedEventArgs e)
00152         {
00153             CheckBox chkIsVerticallyScrollable = sender as CheckBox;
00154             ComboBox cmbVerticalScrollController = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? cmbVerticalScrollController1 : cmbVerticalScrollController2;
00155             ScrollPresenter scrollPresenter = chkIsVerticallyScrollable == chkIsVerticallyScrollable1 ? scrollPresenter1 : scrollPresenter2;
00156
00157             scrollPresenter.VerticalScrollMode = ScrollingScrollMode.Disabled;
00158             switch (cmbVerticalScrollController.SelectedIndex)
00159             {
00160                 case 1:
00161                     verticalCompositionScrollController.IsEnabled = false;
00162                     break;
00163                 case 2:
00164                     horizontalCompositionScrollController.IsEnabled = false;
00165                     break;
00166             }
00167         }
00168
00169         private void ChkIsVisible_Checked(object sender, RoutedEventArgs e)
00170         {
00171             scrollPresenter2.Visibility = Visibility.Visible;
00172         }
00173
00174         private void ChkIsVisible_Unchecked(object sender, RoutedEventArgs e)
00175         {
00176             scrollPresenter2.Visibility = Visibility.Collapsed;
00177         }
00178
00179         private void ChkIsThumbPositionMirrored_Checked(object sender, RoutedEventArgs e)
00180         {
00181             if (sender == chkIsHorizontalThumbPositionMirrored)
00182                 horizontalCompositionScrollController.IsThumbPositionMirrored = true;
00183             else
00184                 verticalCompositionScrollController.IsThumbPositionMirrored = true;
00185         }
00186
00187         private void ChkIsThumbPositionMirrored_Unchecked(object sender, RoutedEventArgs e)
00188         {
00189             if (sender == chkIsHorizontalThumbPositionMirrored)
00190                 horizontalCompositionScrollController.IsThumbPositionMirrored = false;
00191             else
00192                 verticalCompositionScrollController.IsThumbPositionMirrored = false;
00193         }
00194
00195         private void ChkIsAnimatingThumbOffset_Checked(object sender, RoutedEventArgs e)
00196         {
00197             if (sender == chkIsAnimatingHorizontalThumbOffset)
00198                 horizontalCompositionScrollController.IsAnimatingThumbOffset = true;
00199             else
00200                 verticalCompositionScrollController.IsAnimatingThumbOffset = true;
00201         }
00202
00203         private void ChkIsAnimatingThumbOffset_Unchecked(object sender, RoutedEventArgs e)
00204         {
00205             if (sender == chkIsAnimatingHorizontalThumbOffset)
00206                 horizontalCompositionScrollController.IsAnimatingThumbOffset = false;
00207             else
00208                 verticalCompositionScrollController.IsAnimatingThumbOffset = false;
00209         }
00210
00211         private void ChkIsThumbPannable_Checked(object sender, RoutedEventArgs e)
00212         {
00213             if (sender == chkIsHorizontalThumbPannable)
00214                 horizontalCompositionScrollController.IsThumbPannable = true;
00215             else
00216                 verticalCompositionScrollController.IsThumbPannable = true;
00217         }
00218
00219         private void ChkIsThumbPannable_Unchecked(object sender, RoutedEventArgs e)
00220         {
00221             if (sender == chkIsHorizontalThumbPannable)
00222                 horizontalCompositionScrollController.IsThumbPannable = false;
00223             else
00224                 verticalCompositionScrollController.IsThumbPannable = false;
00225         }
00226
00227         private void txtHorizontalOverriddenOffsetsChangeDuration_TextChanged(object sender, TextChangedEventArgs e)
00228         {
00229             try
00230             {
00231                 double durationOverride = Convert.ToDouble(txtHorizontalOverriddenOffsetsChangeDuration.Text);
00232                 horizontalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.FromMilliseconds(durationOverride);
00233             }
00234             catch
00235             {
00236                 horizontalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.MinValue;
00237             }
00238         }
00239
00240         private void txtVerticalOverriddenOffsetsChangeDuration_TextChanged(object sender, TextChangedEventArgs e)
00241         {
00242             try
00243             {
00244                 double durationOverride = Convert.ToDouble(txtVerticalOverriddenOffsetsChangeDuration.Text);
00245                 verticalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.FromMilliseconds(durationOverride);
00246             }
00247             catch
00248             {
00249                 verticalCompositionScrollController.OverriddenOffsetChangeDuration = TimeSpan.MinValue;
00250             }
00251         }
00252
00253         private void cmbHorizontalOverriddenOffsetsChangeAnimation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00254         {
00255             switch (cmbHorizontalOverriddenOffsetsChangeAnimation.SelectedIndex)
00256             {
00257                 case 0:
00258                     horizontalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Default;
00259                     break;
00260                 case 1:
00261                     horizontalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Accordion;
00262                     break;
00263                 case 2:
00264                     horizontalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Teleportation;
00265                     break;
00266             }
00267         }
00268
00269         private void cmbVerticalOverriddenOffsetsChangeAnimation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00270         {
00271             switch (cmbVerticalOverriddenOffsetsChangeAnimation.SelectedIndex)
00272             {
00273                 case 0:
00274                     verticalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Default;
00275                     break;
00276                 case 1:
00277                     verticalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Accordion;
00278                     break;
00279                 case 2:
00280                     verticalCompositionScrollController.OffsetChangeAnimationType = CompositionScrollController.AnimationType.Teleportation;
00281                     break;
00282             }
00283         }
00284     }
00285 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapLayer Member List

This is the complete list of members for MapLayer, including all inherited members.
Id | MapLayer
MapLayer() | MapLayer
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

InfoBarTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class InfoBarTemplateSettingsProperties
00008 {
00009 public:
00010     InfoBarTemplateSettingsProperties();
00011
00012     void IconElement(winrt::IconElement const& value);
00013     winrt::IconElement IconElement();
00014
00015     static winrt::DependencyProperty IconElementProperty() { return s_IconElementProperty; }
00016
00017     static GlobalDependencyProperty s_IconElementProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewItemAutomationPeer.h Source File

  • File List
  • File Members
  • TabView

TabViewItemAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TabViewItem.h"
00007 #include "TabViewItemAutomationPeer.g.h"
00008
00009 class TabViewItemAutomationPeer :
00010     public ReferenceTracker < TabViewItemAutomationPeer,
00011     winrt::implementation::TabViewItemAutomationPeerT,
00012     winrt::ISelectionItemProvider >
00013 {
00014
00015 public:
00016     TabViewItemAutomationPeer(winrt::TabViewItem const& owner);
00017
00018     // IAutomationPeerOverrides
00019     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00020     winrt::hstring GetNameCore();
00021     hstring GetClassNameCore();
00022     winrt::AutomationControlType GetAutomationControlTypeCore();
00023
00024     // ISelectionItemProvider
00025     bool IsSelected();
00026     winrt::IRawElementProviderSimple SelectionContainer();
00027     void AddToSelection();
00028     void RemoveFromSelection();
00029     void Select();
00030
00031 private:
00032     winrt::TabView GetParentTabView();
00033 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InktoolBarPencilButton.h Source File

  • File List
  • File Members
  • InkToolBar

InktoolBarPencilButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InktoolBarPencilButton.g.h"
00011
00012 #include "InkToolBarPenButton.h"
00013
00014 class InkToolBarPencilButton :
00015     public winrt::implementation::InkToolBarPencilButtonT<InkToolBarPencilButton, InkToolBarPenButton>
00016 {
00017 public:
00018     ForwardRefToBaseReferenceTracker(InkToolBarPenButton)
00019 };
00020
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/NullSelector.h Source File

  • File List
  • File Members
  • ItemsView

NullSelector.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SelectorBase.h"
00007
00008 class NullSelector : public SelectorBase
00009 {
00010 public:
00011     NullSelector();
00012     ~NullSelector();
00013 };
Generated on Sun Dec 1 2024 20:51:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorChangedEventArgs Member List

This is the complete list of members for VectorChangedEventArgs, including all inherited members.
CollectionChange() | VectorChangedEventArgs | [inline]
Index() | VectorChangedEventArgs | [inline]
m_action | VectorChangedEventArgs | [private]
m_index | VectorChangedEventArgs | [private]
VectorChangedEventArgs(winrt::CollectionChange action, unsigned int index) | VectorChangedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBarItem Member List

This is the complete list of members for BreadcrumbBarItem, including all inherited members.
abi_enter() | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
BreadcrumbBarItem() | BreadcrumbBarItem |
CheckThread() | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
CloneEllipsisItemSource(const winrt::Collections::IVector< winrt::IInspectable > &ellipsisItemsSource) | BreadcrumbBarItem | [private]
CloseFlyout() | BreadcrumbBarItem |
DeleteInstanceOnUIThread(std::unique_ptr< BreadcrumbBarItem > &&self) noexcept | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
final_release(std::unique_ptr< BreadcrumbBarItem > &&self) | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline, static]
GetBase() | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
GetInner() | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
HookListeners(bool forEllipsisDropDownItem) | BreadcrumbBarItem | [private]
IgnorePointerId(const winrt::PointerRoutedEventArgs &args) | BreadcrumbBarItem | [private]
InstantiateFlyout() | BreadcrumbBarItem | [private]
IsEllipsisDropDownItem() const | BreadcrumbBarItem | [inline]
IsOnThread() | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
OnApplyTemplate() | BreadcrumbBarItem |
OnBreadcrumbBarItemClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | BreadcrumbBarItem | [private]
OnChildPreviewKeyDown(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | BreadcrumbBarItem | [private]
OnClickEvent(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | BreadcrumbBarItem |
OnCreateAutomationPeer() | BreadcrumbBarItem |
OnEllipsisItemClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | BreadcrumbBarItem | [private]
OnFlowDirectionChanged(winrt::DependencyObject const &, winrt::DependencyProperty const &) | BreadcrumbBarItem | [private]
OnFlyoutElementIndexChangedEvent(const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementIndexChangedEventArgs &) | BreadcrumbBarItem | [private]
OnFlyoutElementPreparedEvent(winrt::ItemsRepeater sender, winrt::ItemsRepeaterElementPreparedEventArgs args) | BreadcrumbBarItem | [private]
OnIsEnabledChanged(const winrt::IInspectable &sender, const winrt::DependencyPropertyChangedEventArgs &args) | BreadcrumbBarItem | [private]
OnLoadedEvent(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | BreadcrumbBarItem | [private]
OnPointerCanceled(winrt::PointerRoutedEventArgs const &args) | BreadcrumbBarItem |
OnPointerCaptureLost(winrt::PointerRoutedEventArgs const &args) | BreadcrumbBarItem |
OnPointerEntered(winrt::PointerRoutedEventArgs const &args) | BreadcrumbBarItem |
OnPointerExited(winrt::PointerRoutedEventArgs const &args) | BreadcrumbBarItem |
OnPointerMoved(winrt::PointerRoutedEventArgs const &args) | BreadcrumbBarItem |
OnPointerPressed(winrt::PointerRoutedEventArgs const &args) | BreadcrumbBarItem |
OnPointerReleased(winrt::PointerRoutedEventArgs const &args) | BreadcrumbBarItem |
OnVisualPropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | BreadcrumbBarItem | [private]
OpenFlyout() | BreadcrumbBarItem | [private]
ProcessPointerCanceled(const winrt::PointerRoutedEventArgs &args) | BreadcrumbBarItem | [private]
ProcessPointerOver(const winrt::PointerRoutedEventArgs &args) | BreadcrumbBarItem | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
RaiseItemClickedEvent(const winrt::IInspectable &content, const uint32_t index) | BreadcrumbBarItem |
ReferenceTracker(Args &&...args) | ReferenceTracker< BreadcrumbBarItem, winrt::implementation::BreadcrumbBarItemT > | [inline]
ResetTrackedPointerId() | BreadcrumbBarItem | [private]
ResetVisualProperties() | BreadcrumbBarItem |
RevokeListeners() | BreadcrumbBarItem | [private]
RevokePartsListeners() | BreadcrumbBarItem | [private]
SetEllipsisDropDownItemDataTemplate(const winrt::IInspectable &newDataTemplate) | BreadcrumbBarItem |
SetEllipsisItem(const winrt::BreadcrumbBarItem &ellipsisItem) | BreadcrumbBarItem |
SetIndex(const uint32_t index) | BreadcrumbBarItem |
SetIsEllipsisDropDownItem(bool isEllipsisDropDownItem) | BreadcrumbBarItem |
SetParentBreadcrumb(const winrt::BreadcrumbBar &parent) | BreadcrumbBarItem |
SetPropertiesForEllipsisItem() | BreadcrumbBarItem |
SetPropertiesForLastItem() | BreadcrumbBarItem |
UpdateButtonCommonVisualState(bool useTransitions) | BreadcrumbBarItem | [private]
UpdateEllipsisDropDownItemCommonVisualState(bool useTransitions) | BreadcrumbBarItem | [private]
UpdateFlyoutIndex(const winrt::UIElement &element, const uint32_t index) | BreadcrumbBarItem | [private]
UpdateInlineItemTypeVisualState(bool useTransitions) | BreadcrumbBarItem | [private]
UpdateItemTypeVisualState() | BreadcrumbBarItem | [private]
~BreadcrumbBarItem() | BreadcrumbBarItem |
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MonochromaticOverlayPresenterProperties Member List

This is the complete list of members for MonochromaticOverlayPresenterProperties, including all inherited members.
ClearProperties() | MonochromaticOverlayPresenterProperties | [static]
EnsureProperties() | MonochromaticOverlayPresenterProperties | [static]
MonochromaticOverlayPresenterProperties() | MonochromaticOverlayPresenterProperties |
OnReplacementColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MonochromaticOverlayPresenterProperties | [static]
OnSourceElementPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MonochromaticOverlayPresenterProperties | [static]
ReplacementColor(winrt::Color const &value) | MonochromaticOverlayPresenterProperties |
ReplacementColor() | MonochromaticOverlayPresenterProperties |
ReplacementColorProperty() | MonochromaticOverlayPresenterProperties | [inline, static]
s_ReplacementColorProperty | MonochromaticOverlayPresenterProperties | [static]
s_SourceElementProperty | MonochromaticOverlayPresenterProperties | [static]
SourceElement(winrt::UIElement const &value) | MonochromaticOverlayPresenterProperties |
SourceElement() | MonochromaticOverlayPresenterProperties |
SourceElementProperty() | MonochromaticOverlayPresenterProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItemAutomationPeer.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Flat

RepeaterItemAutomationPeer.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Automation.Peers;
00006 using Microsoft.UI.Xaml.Automation.Provider;
00007
00008 namespace MUXControlsTestApp.Samples.Selection
00009 {
00010     public class RepeaterItemAutomationPeer : FrameworkElementAutomationPeer, ISelectionItemProvider
00011     {
00012         private RepeaterItem _owner;
00013         public RepeaterItemAutomationPeer(FrameworkElement owner) : base(owner)
00014         {
00015             _owner = (RepeaterItem)owner;
00016         }
00017
00018         protected override object GetPatternCore(PatternInterface patternInterface)
00019         {
00020             if (patternInterface == PatternInterface.SelectionItem)
00021             {
00022                 return this;
00023             }
00024
00025             return base.GetPatternCore(patternInterface);
00026         }
00027
00028         public void AddToSelection()
00029         {
00030             _owner.SelectionModel.Select(_owner.RepeatedIndex);
00031         }
00032
00033         public void RemoveFromSelection()
00034         {
00035             _owner.SelectionModel.Deselect(_owner.RepeatedIndex);
00036         }
00037
00038         public void Select()
00039         {
00040             _owner.SelectionModel.Select(_owner.RepeatedIndex);
00041         }
00042
00043         public bool IsSelected
00044         {
00045             get
00046             {
00047                 return _owner.SelectionModel.IsSelected(_owner.RepeatedIndex).Value;
00048             }
00049         }
00050
00051         public IRawElementProviderSimple SelectionContainer
00052         {
00053             get
00054             {
00055                 // TODO: could cache this to avoid the walk every time
00056                 IRawElementProviderSimple containerPeer = null;
00057                 FrameworkElement element = _owner;
00058                 while (element != null && !(element is SelectionContainer))
00059                 {
00060                     element = (FrameworkElement)element.Parent;
00061                 }
00062
00063                 if (element != null)
00064                 {
00065                     var container = (SelectionContainer)element;
00066                     containerPeer = ProviderFromPeer(CreatePeerForElement(container));
00067                 }
00068
00069                 return containerPeer;
00070             }
00071         }
00072
00073         protected override AutomationControlType GetAutomationControlTypeCore()
00074         {
00075             return AutomationControlType.ListItem;
00076         }
00077
00078         protected override string GetLocalizedControlTypeCore()
00079         {
00080             return "Item";
00081         }
00082     }
00083 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ChildrenInTabFocusOrderIterable Member List

This is the complete list of members for ChildrenInTabFocusOrderIterable, including all inherited members.
abi_enter() | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
CheckThread() | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
ChildrenInTabFocusOrderIterable(const winrt::ItemsRepeater &repeater) | ChildrenInTabFocusOrderIterable |
DeleteInstanceOnUIThread(std::unique_ptr< ChildrenInTabFocusOrderIterable > &&self) noexcept | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
final_release(std::unique_ptr< ChildrenInTabFocusOrderIterable > &&self) | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline, static]
First() | ChildrenInTabFocusOrderIterable |
GetBase() | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
GetInner() | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
IsOnThread() | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ChildrenInTabFocusOrderIterable, reference_tracker_implements_t< winrt::IIterable< winrt::DependencyObject > >::type > | [inline]
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/InteractionTests/PagerControlTestPageElements.cs Source File

  • File List
  • File Members
  • PagerControl
  • InteractionTests

PagerControlTestPageElements.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00005 using Common;
00006
00007 using WEX.TestExecution;
00008 using WEX.TestExecution.Markup;
00009 using WEX.Logging.Interop;
00010
00011 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00012 using Microsoft.Windows.Apps.Test.Foundation;
00013
00014 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00015 {
00016     public class PagerControlTestPageElements
00017     {
00018         public UIObject GetPagerControl()
00019         {
00020             return GetElement(ref PagerControl, "TestPager");
00021         }
00022         private UIObject PagerControl;
00023
00024         public UIObject GetPagerNumberBox()
00025         {
00026             return GetElementWithinPager(ref PagerNumberBox, "NumberBoxDisplay");
00027         }
00028         private UIObject PagerNumberBox;
00029
00030         public ComboBox GetPagerComboBox()
00031         {
00032             if (PagerComboBox == null)
00033             {
00034                 UIObject uiObject = null;
00035                 GetElementWithinPager(ref uiObject, "ComboBoxDisplay");
00036                 PagerComboBox = new ComboBox(uiObject);
00037             }
00038             return PagerComboBox;
00039         }
00040         private ComboBox PagerComboBox;
00041
00042         public UIObject GetNumberPanelButton(string elementName)
00043         {
00044             foreach (var element in GetPagerControl().Children)
00045             {
00046                 if (element.Name == elementName)
00047                 {
00048                     return element;
00049                 }
00050             }
00051             return null;
00052         }
00053
00054         public UIObject GetFirstPageButton()
00055         {
00056             return GetElementWithinPager(ref FirstPageButton, "FirstPageButton");
00057         }
00058         private UIObject FirstPageButton;
00059
00060         public UIObject GetPreviousPageButton()
00061         {
00062             return GetElementWithinPager(ref PreviousPageButton, "PreviousPageButton");
00063         }
00064         private UIObject PreviousPageButton;
00065
00066         public UIObject GetNextPageButton()
00067         {
00068             return GetElementWithinPager(ref NextPageButton, "NextPageButton");
00069         }
00070         private UIObject NextPageButton;
00071
00072         public UIObject GetLastPageButton()
00073         {
00074             return GetElementWithinPager(ref LastPageButton, "LastPageButton");
00075         }
00076         private UIObject LastPageButton;
00077
00078         public ComboBox GetFirstPageButtonVisibilityComboBox()
00079         {
00080             return GetElement(ref FirstPageButtonVisibilityComboBox, "FirstPageButtonVisibilityComboBox");
00081         }
00082         private ComboBox FirstPageButtonVisibilityComboBox;
00083
00084         public ComboBox GetPreviousPageButtonVisibilityComboBox()
00085         {
00086             return GetElement(ref PreviousPageButtonVisibilityComboBox, "PreviousPageButtonVisibilityComboBox");
00087         }
00088         private ComboBox PreviousPageButtonVisibilityComboBox;
00089
00090         public ComboBox GetNextPageButtonVisibilityComboBox()
00091         {
00092             return GetElement(ref NextPageButtonVisibilityComboBox, "NextPageButtonVisibilityComboBox");
00093         }
00094         private ComboBox NextPageButtonVisibilityComboBox;
00095
00096         public ComboBox GetLastPageButtonVisibilityComboBox()
00097         {
00098             return GetElement(ref LastPageButtonVisibilityComboBox, "LastPageButtonVisibilityComboBox");
00099         }
00100         private ComboBox LastPageButtonVisibilityComboBox;
00101
00102         public ComboBox GetDisplayModeComboBox()
00103         {
00104             return GetElement(ref DisplayModeComboBox, "PagerDisplayModeComboBox");
00105         }
00106         private ComboBox DisplayModeComboBox;
00107
00108         public CheckBox GetFirstPageButtonVisibilityCheckBox()
00109         {
00110             return GetElement(ref FirstPageButtonVisibilityCheckBox, "FirstPageButtonVisibilityCheckBox");
00111         }
00112         private CheckBox FirstPageButtonVisibilityCheckBox;
00113
00114         public CheckBox GetPreviousPageButtonVisibilityCheckBox()
00115         {
00116             return GetElement(ref PreviousPageButtonVisibilityCheckBox, "PreviousPageButtonVisibilityCheckBox");
00117         }
00118         private CheckBox PreviousPageButtonVisibilityCheckBox;
00119
00120         public CheckBox GetNextPageButtonVisibilityCheckBox()
00121         {
00122             return GetElement(ref NextPageButtonVisibilityCheckBox, "NextPageButtonVisibilityCheckBox");
00123         }
00124         private CheckBox NextPageButtonVisibilityCheckBox;
00125
00126         public CheckBox GetLastPageButtonVisibilityCheckBox()
00127         {
00128             return GetElement(ref LastPageButtonVisibilityCheckBox, "LastPageButtonVisibilityCheckBox");
00129         }
00130         private CheckBox LastPageButtonVisibilityCheckBox;
00131
00132         public CheckBox GetFirstPageButtonIsEnabledCheckBox()
00133         {
00134             return GetElement(ref FirstPageButtonIsEnabledCheckBox, "FirstPageButtonIsEnabledCheckBox");
00135         }
00136         private CheckBox FirstPageButtonIsEnabledCheckBox;
00137
00138         public CheckBox GetPreviousPageButtonIsEnabledCheckBox()
00139         {
00140             return GetElement(ref PreviousPageButtonIsEnabledCheckBox, "PreviousPageButtonIsEnabledCheckBox");
00141         }
00142         private CheckBox PreviousPageButtonIsEnabledCheckBox;
00143
00144         public CheckBox GetNextPageButtonIsEnabledCheckBox()
00145         {
00146             return GetElement(ref NextPageButtonIsEnabledCheckBox, "NextPageButtonIsEnabledCheckBox");
00147         }
00148         private CheckBox NextPageButtonIsEnabledCheckBox;
00149
00150         public CheckBox GetLastPageButtonIsEnabledCheckBox()
00151         {
00152             return GetElement(ref LastPageButtonIsEnabledCheckBox, "LastPageButtonIsEnabledCheckBox");
00153         }
00154         private CheckBox LastPageButtonIsEnabledCheckBox;
00155
00156         public CheckBox GetNumberBoxVisibilityCheckBox()
00157         {
00158             return GetElement(ref NumberBoxVisibilityCheckBox, "NumberBoxVisibilityCheckBox");
00159         }
00160         private CheckBox NumberBoxVisibilityCheckBox;
00161
00162         public CheckBox GetNumberBoxIsEnabledCheckBox()
00163         {
00164             return GetElement(ref NumberBoxIsEnabledCheckBox, "NumberBoxIsEnabledCheckBox");
00165         }
00166         private CheckBox NumberBoxIsEnabledCheckBox;
00167
00168         public CheckBox GetComboBoxVisibilityCheckBox()
00169         {
00170             return GetElement(ref ComboBoxVisibilityCheckBox, "ComboBoxVisibilityCheckBox");
00171         }
00172         private CheckBox ComboBoxVisibilityCheckBox;
00173
00174         public CheckBox GetComboBoxIsEnabledCheckBox()
00175         {
00176             return GetElement(ref ComboBoxIsEnabledCheckBox, "ComboBoxIsEnabledCheckBox");
00177         }
00178         private CheckBox ComboBoxIsEnabledCheckBox;
00179
00180         public CheckBox GetNumberPanelVisibilityCheckBox()
00181         {
00182             return GetElement(ref NumberPanelVisibilityCheckBox, "NumberPanelVisibilityCheckBox");
00183         }
00184         private CheckBox NumberPanelVisibilityCheckBox;
00185
00186         public TextBlock GetNumberPanelContentTextBlock()
00187         {
00188             return GetElement(ref NumberPanelContentTextBlock, "NumberPanelContentTextBlock");
00189         }
00190         private TextBlock NumberPanelContentTextBlock;
00191
00192         public Button GetUpdateMarginTextBlockButton()
00193         {
00194             return GetElement(ref UpdateMarginTextBlockButton, "UpdateMarginTextBlockButton");
00195         }
00196         private Button UpdateMarginTextBlockButton;
00197
00198         public TextBlock GetCurrentPageIdentifierLeftMarginTextBlock()
00199         {
00200             return GetElement(ref CurrentPageIdentifierLeftMarginTextBlock, "CurrentPageIdentifierLeftMarginTextBlock");
00201         }
00202         private TextBlock CurrentPageIdentifierLeftMarginTextBlock;
00203
00204         public TextBlock GetNumberOfPagesTextBlock()
00205         {
00206             return GetElement(ref NumberOfPagesTextBlock, "NumberOfPagesTextBlock");
00207         }
00208         private TextBlock NumberOfPagesTextBlock;
00209
00210         public Button GetNumberOfPagesSetterButton()
00211         {
00212             return GetElement(ref NumberOfPagesSetterButton, "NumberOfPagesSetterButton");
00213         }
00214         private Button NumberOfPagesSetterButton;
00215
00216         public TextBlock GetCurrentPageTextBlock()
00217         {
00218             return GetElement(ref CurrentPageTextBlock, "CurrentPageTextBlock");
00219         }
00220         private TextBlock CurrentPageTextBlock;
00221
00222         public TextBlock GetPreviousPageTextBlock()
00223         {
00224             return GetElement(ref PreviousPageTextBlock, "PreviousPageTextBlock");
00225         }
00226         private TextBlock PreviousPageTextBlock;
00227
00228         public Button GetIncreaseNumberOfPagesButton()
00229         {
00230             return GetElement(ref IncreaseNumberOfPagesButton, "IncreaseNumberOfPagesButton");
00231         }
00232         private Button IncreaseNumberOfPagesButton;
00233
00234         public Button GetCheckIfButtonsHiddenButton()
00235         {
00236             return GetElement(ref CheckIfButtonsHiddenButton, "CheckIfButtonsHiddenButton");
00237         }
00238         private Button CheckIfButtonsHiddenButton;
00239         public TextBlock GetCheckIfButtonsHiddenLabel()
00240         {
00241             return GetElement(ref CheckIfButtonsHiddenLabel, "CheckIfButtonsHiddenLabel");
00242         }
00243         private TextBlock CheckIfButtonsHiddenLabel;
00244
00245         public Button GetEnterInfinityModeButton()
00246         {
00247             return GetElement(ref EnterInfinityModeButton, "NumberOfPagesInfinityButton");
00248         }
00249         private Button EnterInfinityModeButton;
00250
00251         private T GetElement<T>(ref T element, string elementName) where T : UIObject
00252         {
00253             if (element == null)
00254             {
00255                 Log.Comment("Find the " + elementName);
00256                 element = FindElement.ByNameOrId<T>(elementName);
00257                 Verify.IsNotNull(element);
00258             }
00259             return element;
00260         }
00261
00262         private T GetElementWithinPager<T>(ref T element, string elementName) where T : UIObject
00263         {
00264             if (element == null)
00265             {
00266                 Log.Comment("Find the " + elementName);
00267
00268                 foreach (T child in GetPagerControl().Children)
00269                 {
00270                     if (child.AutomationId == elementName)
00271                     {
00272                         element = child;
00273                     }
00274                 }
00275                 Verify.IsNotNull(element);
00276             }
00277             return element;
00278         }
00279
00280
00281     }
00282 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewTestsWithInputHelper Member List

This is the complete list of members for ScrollViewTestsWithInputHelper, including all inherited members.
AreClose(double expected, double actual, double delta=0.1) | ScrollViewTestsWithInputHelper | [inline, private]
ClassInitialize(TestContext testContext) | ScrollViewTestsWithInputHelper | [inline, static]
ClearTraces() | ScrollViewTestsWithInputHelper | [inline, private]
GetScrollPresenterView(out double horizontalOffset, out double verticalOffset, out float zoomFactor) | ScrollViewTestsWithInputHelper | [inline, private]
LogAndClearTraces() | ScrollViewTestsWithInputHelper | [inline, private]
LogEditValue(string editName) | ScrollViewTestsWithInputHelper | [inline, private]
LogEditValue(string editName, Edit edit) | ScrollViewTestsWithInputHelper | [inline, private]
LogTraces() | ScrollViewTestsWithInputHelper | [inline, private]
PanScrollViewer() | ScrollViewTestsWithInputHelper | [inline]
PrepareForScrollViewManipulationStart(string stateTextBoxName="txtScrollPresenterState") | ScrollViewTestsWithInputHelper | [inline, private]
PressGamepadButtonAndVerifyOffsetAndFocus(GamepadButton gamepadButton, string expectedFocusedItemName, double expectedHorizontalOffset, double expectedVerticalOffset, int?expectedViewChangeCount=null) | ScrollViewTestsWithInputHelper | [inline, private]
ScrollHorizontallyWithEndHomeKeys() | ScrollViewTestsWithInputHelper | [inline]
ScrollHorizontallyWithEndHomeKeysInRTL() | ScrollViewTestsWithInputHelper | [inline]
ScrollThenPanScrollView() | ScrollViewTestsWithInputHelper | [inline]
SetScrollPresenterLoggingLevel(bool isPrivateLoggingEnabled) | ScrollViewTestsWithInputHelper | [inline, private]
SetScrollViewLoggingLevel(bool isPrivateLoggingEnabled) | ScrollViewTestsWithInputHelper | [inline, private]
SetupScrollViewTestWithImage(string suffix, out UIObject imageInScrollView, out ScrollPresenter scrollPresenter) | ScrollViewTestsWithInputHelper | [inline, private]
SetupSimpleSingleScrollViewTest(out UIObject buttonInScrollView11, out ScrollPresenter scrollPresenter11) | ScrollViewTestsWithInputHelper | [inline, private]
TapResetViewsButton() | ScrollViewTestsWithInputHelper | [inline, private]
TestCleanup() | ScrollViewTestsWithInputHelper | [inline]
TryWaitForScrollViewManipulationEnd(string scrollViewName, string stateTextBoxName="txtScrollPresenterState") | ScrollViewTestsWithInputHelper | [inline, private]
UpdateTraces() | ScrollViewTestsWithInputHelper | [inline, private]
VerifyAreClose(double expected, double actual, double delta, string message) | ScrollViewTestsWithInputHelper | [inline, private]
VerifyScrollViewGamePadBumperInteraction() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewGamePadHorizontalInteraction() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewGamePadInteraction() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewGamePadTriggerInteraction() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewIgnoresGamepadInput() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewIgnoresKeyboardInput() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewKeyboardInteraction() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewKeyboardInteractionWithXYFocusEnabled() | ScrollViewTestsWithInputHelper | [inline]
VerifyScrollViewRemainsAtView(double expectedHorizontalOffset, double expectedVerticalOffset, float expectedZoomFactor) | ScrollViewTestsWithInputHelper | [inline, private]
ViewChangeCount() | ScrollViewTestsWithInputHelper | [inline, private]
WaitForBoxChecked(string checkBoxName) | ScrollViewTestsWithInputHelper | [inline, private]
WaitForEditValue(string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true) | ScrollViewTestsWithInputHelper | [inline, private]
WaitForManipulationEnd(string elementName, string stateTextBoxName, bool throwOnError=true) | ScrollViewTestsWithInputHelper | [inline, private]
WaitForScrollViewFinalSize(UIObject scrollViewUIObject, double expectedWidth, double expectedHeight) | ScrollViewTestsWithInputHelper | [inline, private]
WaitForScrollViewManipulationEnd(string scrollViewName, string stateTextBoxName="txtScrollPresenterState") | ScrollViewTestsWithInputHelper | [inline, private]
WaitForScrollViewOffsets(double expectedHorizontalOffset, double expectedVerticalOffset) | ScrollViewTestsWithInputHelper | [inline, private]
Generated on Sun Dec 1 2024 20:53:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbTests::MockClass Member List

This is the complete list of members for BreadcrumbTests::MockClass, including all inherited members.
MockClass() | BreadcrumbTests::MockClass | [inline]
MockProperty | BreadcrumbTests::MockClass |
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarCustomPen Member List

This is the complete list of members for InkToolBarCustomPen, including all inherited members.
abi_enter() | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
CheckThread() | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
CreateInkDrawingAttributes(winrt::Brush brush, double strokeWidth) | InkToolBarCustomPen | [inline]
CreateInkDrawingAttributesCore(winrt::Brush brush, double strokeWidth) | InkToolBarCustomPen | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< InkToolBarCustomPen > &&self) noexcept | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
final_release(std::unique_ptr< InkToolBarCustomPen > &&self) | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline, static]
GetBase() | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
GetInner() | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
IsOnThread() | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkToolBarCustomPen, winrt::implementation::InkToolBarCustomPenT > | [inline]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MyContainerSelector Member List

This is the complete list of members for MyContainerSelector, including all inherited members.
SelectTemplateCore(object item, DependencyObject container) | MyContainerSelector | [inline, protected]
TemplateEven | MyContainerSelector |
TemplateOdd | MyContainerSelector |
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/APITests/BreadcrumbTests.cs Source File

  • File List
  • File Members
  • Breadcrumb
  • APITests

BreadcrumbTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006
00007 using Microsoft.UI.Xaml.Controls;
00008 using Common;
00009 using Microsoft.UI.Xaml.Markup;
00010 using System.Collections.Generic;
00011 using Microsoft.UI.Xaml.Media;
00012 using System.Security.Cryptography.X509Certificates;
00013 using Microsoft.UI.Xaml.Automation.Peers;
00014 using Microsoft.UI.Xaml.Automation.Provider;
00015 using System.Linq;
00016
00017 using WEX.TestExecution;
00018 using WEX.TestExecution.Markup;
00019 using WEX.Logging.Interop;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00022 {
00023
00024     [TestClass]
00025     public class BreadcrumbTests : ApiTestBase
00026     {
00027
00028         [TestMethod]
00029         public void VerifyBreadcrumbDefaultAPIValues()
00030         {
00031             RunOnUIThread.Execute(() =>
00032             {
00033                 BreadcrumbBar breadcrumb = new BreadcrumbBar();
00034                 var stackPanel = new StackPanel();
00035                 stackPanel.Children.Add(breadcrumb);
00036
00037                 Content = stackPanel;
00038                 Content.UpdateLayout();
00039
00040                 Verify.IsNull(breadcrumb.ItemsSource, "The default ItemsSource property value must be null");
00041                 Verify.IsNull(breadcrumb.ItemTemplate, "The default ItemTemplate property value must be null");
00042             });
00043         }
00044
00045         [TestMethod]
00046         public void VerifyDefaultBreadcrumb()
00047         {
00048             BreadcrumbBar breadcrumb = null;
00049             RunOnUIThread.Execute(() =>
00050             {
00051                 breadcrumb = new BreadcrumbBar();
00052                 var stackPanel = new StackPanel();
00053                 stackPanel.Children.Add(breadcrumb);
00054
00055                 Content = stackPanel;
00056                 Content.UpdateLayout();
00057             });
00058
00059             IdleSynchronizer.Wait();
00060
00061             RunOnUIThread.Execute(() =>
00062             {
00063                 ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
00064                 Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");
00065
00066                 var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1);
00067                 Verify.IsNull(breadcrumbNode1, "There should be no items.");
00068             });
00069         }
00070
00071         [TestMethod]
00072         public void VerifyCustomItemTemplate()
00073         {
00074             BreadcrumbBar breadcrumb = null;
00075             BreadcrumbBar breadcrumb2 = null;
00076             RunOnUIThread.Execute(() =>
00077             {
00078                 breadcrumb = new BreadcrumbBar();
00079                 breadcrumb.ItemsSource = new List<string>() { "Node 1", "Node 2" };
00080
00081                 // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
00082                 var itemTemplate = (DataTemplate)XamlReader.Load(
00083                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00084                             <TextBlock Text='{Binding}'/>
00085                         </DataTemplate>");
00086
00087                 breadcrumb.ItemTemplate = itemTemplate;
00088
00089                 breadcrumb2 = new BreadcrumbBar();
00090                 breadcrumb2.ItemsSource = new List<string>() { "Node 1", "Node 2" };
00091
00092                 // Set a custom ItemTemplate which is already a BreadcrumbBarItem. No wrapping should be performed.
00093                 var itemTemplate2 = (DataTemplate)XamlReader.Load(
00094                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00095                             xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
00096                             <controls:BreadcrumbBarItem Foreground='Blue'>
00097                               <TextBlock Text = '{Binding}'/>
00098                             </controls:BreadcrumbBarItem>
00099                         </DataTemplate>");
00100
00101                 breadcrumb2.ItemTemplate = itemTemplate2;
00102
00103                 var stackPanel = new StackPanel();
00104                 stackPanel.Children.Add(breadcrumb);
00105                 stackPanel.Children.Add(breadcrumb2);
00106
00107                 Content = stackPanel;
00108                 Content.UpdateLayout();
00109             });
00110
00111             IdleSynchronizer.Wait();
00112
00113             RunOnUIThread.Execute(() =>
00114             {
00115                 ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
00116                 ItemsRepeater breadcrumbItemsRepeater2 = (ItemsRepeater)breadcrumb2.FindVisualChildByName("PART_ItemsRepeater");
00117                 Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");
00118                 Verify.IsNotNull(breadcrumbItemsRepeater2, "The underlying items repeater could not be retrieved");
00119
00120                 var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
00121                 var breadcrumbNode2 = breadcrumbItemsRepeater2.TryGetElement(1) as BreadcrumbBarItem;
00122                 Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
00123                 Verify.IsNotNull(breadcrumbNode2, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
00124
00125                 // change this conditions
00126                 bool testCondition = !(breadcrumbNode1.Foreground is SolidColorBrush brush && brush.Color == Colors.Blue);
00127                 Verify.IsTrue(testCondition, "Default foreground color of the BreadcrumbBarItem should not have been [blue].");
00128
00129                 testCondition = breadcrumbNode2.Foreground is SolidColorBrush brush2 && brush2.Color == Colors.Blue;
00130                 Verify.IsTrue(testCondition, "The foreground color of the BreadcrumbBarItem should have been [blue].");
00131             });
00132         }
00133
00134         [TestMethod]
00135         public void VerifyNumericItemsSource()
00136         {
00137             BreadcrumbBar breadcrumb = null;
00138             BreadcrumbBar breadcrumb2 = null;
00139             RunOnUIThread.Execute(() =>
00140             {
00141                 // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
00142                 var itemTemplate = (DataTemplate)XamlReader.Load(
00143                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00144                             <TextBlock Text='{Binding}'/>
00145                         </DataTemplate>");
00146
00147                 breadcrumb = new BreadcrumbBar();
00148                 breadcrumb.ItemsSource = new List<int>() { 1, 2 };
00149                 breadcrumb.ItemTemplate = itemTemplate;
00150
00151                 breadcrumb2 = new BreadcrumbBar();
00152                 breadcrumb2.ItemsSource = new List<float>() { 1.4f, 4.5f };
00153                 breadcrumb2.ItemTemplate = itemTemplate;
00154
00155                 var stackPanel = new StackPanel();
00156                 stackPanel.Children.Add(breadcrumb);
00157                 stackPanel.Children.Add(breadcrumb2);
00158
00159                 Content = stackPanel;
00160                 Content.UpdateLayout();
00161             });
00162
00163             IdleSynchronizer.Wait();
00164
00165             RunOnUIThread.Execute(() =>
00166             {
00167                 ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
00168                 Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");
00169
00170                 ItemsRepeater breadcrumbItemsRepeater2 = (ItemsRepeater)breadcrumb2.FindVisualChildByName("PART_ItemsRepeater");
00171                 Verify.IsNotNull(breadcrumbItemsRepeater2, "The underlying items repeater could not be retrieved");
00172
00173                 var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
00174                 var breadcrumbNode2 = breadcrumbItemsRepeater2.TryGetElement(1) as BreadcrumbBarItem;
00175                 Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
00176                 Verify.IsNotNull(breadcrumbNode2, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
00177             });
00178         }
00179
00180         class MockClass
00181         {
00182             public string MockProperty { get; set; }
00183
00184             public MockClass()
00185             {
00186             }
00187         };
00188
00189         [TestMethod]
00190         public void VerifyObjectItemsSource()
00191         {
00192             BreadcrumbBar breadcrumb = null;
00193             RunOnUIThread.Execute(() =>
00194             {
00195                 // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
00196                 var itemTemplate = (DataTemplate)XamlReader.Load(
00197                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00198                             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00199                             xmlns:controls='using:Microsoft.UI.Xaml.Controls'
00200                             xmlns:local='using:Microsoft.UI.Xaml.Tests.MUXControls.ApiTests'>
00201                             <controls:BreadcrumbBarItem Content='{Binding}'>
00202                                 <controls:BreadcrumbBarItem.ContentTemplate>
00203                                     <DataTemplate>
00204                                         <TextBlock Text='{Binding MockProperty}'/>
00205                                     </DataTemplate>
00206                                 </controls:BreadcrumbBarItem.ContentTemplate>
00207                             </controls:BreadcrumbBarItem>
00208                         </DataTemplate>");
00209
00210
00211                 breadcrumb = new BreadcrumbBar();
00212                 breadcrumb.ItemsSource = new List<MockClass>() {
00213                     new MockClass { MockProperty = "Node 1" },
00214                     new MockClass { MockProperty = "Node 2" },
00215                 };
00216                 breadcrumb.ItemTemplate = itemTemplate;
00217
00218                 var stackPanel = new StackPanel();
00219                 stackPanel.Children.Add(breadcrumb);
00220
00221                 Content = stackPanel;
00222                 Content.UpdateLayout();
00223             });
00224
00225             IdleSynchronizer.Wait();
00226
00227             RunOnUIThread.Execute(() =>
00228             {
00229                 ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
00230                 Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");
00231
00232                 var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
00233                 Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
00234             });
00235         }
00236
00237         [TestMethod]
00238         public void VerifyDropdownItemTemplate()
00239         {
00240             BreadcrumbBar breadcrumb = null;
00241
00242             RunOnUIThread.Execute(() =>
00243             {
00244                 breadcrumb = new BreadcrumbBar();
00245                 breadcrumb.ItemsSource = new List<MockClass>() {
00246                     new MockClass { MockProperty = "Node 1" },
00247                     new MockClass { MockProperty = "Node 2" },
00248                 };
00249
00250                 // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
00251                 var itemTemplate = (DataTemplate)XamlReader.Load(
00252                     @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00253                             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00254                             xmlns:controls='using:Microsoft.UI.Xaml.Controls'
00255                             xmlns:local='using:Microsoft.UI.Xaml.Tests.MUXControls.ApiTests'>
00256                             <controls:BreadcrumbBarItem Content='{Binding}'>
00257                                 <controls:BreadcrumbBarItem.ContentTemplate>
00258                                     <DataTemplate>
00259                                         <TextBlock Text='{Binding MockProperty}'/>
00260                                     </DataTemplate>
00261                                 </controls:BreadcrumbBarItem.ContentTemplate>
00262                             </controls:BreadcrumbBarItem>
00263                         </DataTemplate>");
00264
00265                 breadcrumb.ItemTemplate = itemTemplate;
00266
00267                 var stackPanel = new StackPanel();
00268                 stackPanel.Width = 60;
00269                 stackPanel.Children.Add(breadcrumb);
00270
00271                 Content = stackPanel;
00272                 Content.UpdateLayout();
00273             });
00274
00275             IdleSynchronizer.Wait();
00276
00277             Button ellipsisButton = null;
00278             RunOnUIThread.Execute(() =>
00279             {
00280                 ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
00281                 Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater (1) could not be retrieved");
00282
00283                 var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(0) as BreadcrumbBarItem;
00284                 Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate (1) should have been wrapped in a BreadcrumbBarItem.");
00285
00286                 ellipsisButton = (Button)breadcrumbNode1.FindVisualChildByName("PART_ItemButton");
00287                 Verify.IsNotNull(ellipsisButton, "The ellipsis item (1) could not be retrieved");
00288
00289                 var automationPeer = new ButtonAutomationPeer(ellipsisButton);
00290                 var invokationPattern = automationPeer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
00291                 invokationPattern?.Invoke();
00292             });
00293
00294             // GetOpenPopups returns empty list in RS3. The scenario works, this just seems to be a
00295             // test/infra issue in RS3, so filtering it out for now.
00296             if (PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone3))
00297             {
00298                 IdleSynchronizer.Wait();
00299
00300                 RunOnUIThread.Execute(() =>
00301                 {
00302                     var flyout = VisualTreeHelper.GetOpenPopupsForXamlRoot(Content.XamlRoot).Last();
00303                     Verify.IsNotNull(flyout, "Flyout could not be retrieved");
00304                     var ellipsisItemsRepeater = TestUtilities.FindDescendents<ItemsRepeater>(flyout).Single();
00305                     Verify.IsNotNull(ellipsisItemsRepeater, "The underlying flyout items repeater (1) could not be retrieved");
00306
00307                     ellipsisItemsRepeater.Loaded += (object sender, RoutedEventArgs e) =>
00308                     {
00309                         TextBlock ellipsisNode1 = ellipsisItemsRepeater.TryGetElement(0) as TextBlock;
00310                         Verify.IsNotNull(ellipsisNode1, "Our flyout ItemTemplate (1) should have been wrapped in a TextBlock.");
00311
00312                     // change this conditions
00313                     bool testCondition = !(ellipsisNode1.Foreground is SolidColorBrush brush && brush.Color == Colors.Blue);
00314                         Verify.IsTrue(testCondition, "Default foreground color of the BreadcrumbBarItem should not have been [blue].");
00315                     };
00316                 });
00317             }
00318         }
00319
00320         [TestMethod]
00321         public void VerifyDropdownItemTemplateWithNoControl()
00322         {
00323             BreadcrumbBar breadcrumb = null;
00324
00325             RunOnUIThread.Execute(() =>
00326             {
00327                 breadcrumb = new BreadcrumbBar();
00328                 breadcrumb.ItemsSource = new List<string>() { "Node 1", "Node 2" };
00329
00330                 // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
00331                 var itemTemplate = (DataTemplate)XamlReader.Load(
00332                     @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00333                             <TextBlock Text='{Binding}'/>
00334                         </DataTemplate>");
00335
00336                 breadcrumb.ItemTemplate = itemTemplate;
00337
00338                 var stackPanel = new StackPanel();
00339                 stackPanel.Width = 60;
00340                 stackPanel.Children.Add(breadcrumb);
00341
00342                 Content = stackPanel;
00343                 Content.UpdateLayout();
00344             });
00345
00346             IdleSynchronizer.Wait();
00347
00348             Button ellipsisButton = null;
00349             RunOnUIThread.Execute(() =>
00350             {
00351                 ItemsRepeater breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
00352                 Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater (1) could not be retrieved");
00353
00354                 var breadcrumbNode1 = breadcrumbItemsRepeater.TryGetElement(0) as BreadcrumbBarItem;
00355                 Verify.IsNotNull(breadcrumbNode1, "Our custom ItemTemplate (1) should have been wrapped in a BreadcrumbBarItem.");
00356
00357                 ellipsisButton = (Button)breadcrumbNode1.FindVisualChildByName("PART_ItemButton");
00358                 Verify.IsNotNull(ellipsisButton, "The ellipsis item (1) could not be retrieved");
00359
00360                 var automationPeer = new ButtonAutomationPeer(ellipsisButton);
00361                 var invokationPattern = automationPeer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
00362                 invokationPattern?.Invoke();
00363             });
00364
00365             // GetOpenPopups returns empty list in RS3. The scenario works, this just seems to be a
00366             // test/infra issue in RS3, so filtering it out for now.
00367             if (PlatformConfiguration.IsOsVersionGreaterThan(OSVersion.Redstone3))
00368             {
00369                 IdleSynchronizer.Wait();
00370
00371                 RunOnUIThread.Execute(() =>
00372                 {
00373                     var flyout = VisualTreeHelper.GetOpenPopupsForXamlRoot(Content.XamlRoot).Last();
00374                     Verify.IsNotNull(flyout, "Flyout could not be retrieved");
00375                     var ellipsisItemsRepeater = TestUtilities.FindDescendents<ItemsRepeater>(flyout).Single();
00376                     Verify.IsNotNull(ellipsisItemsRepeater, "The underlying flyout items repeater (1) could not be retrieved");
00377
00378                     ellipsisItemsRepeater.Loaded += (object sender, RoutedEventArgs e) =>
00379                     {
00380                         TextBlock ellipsisNode1 = ellipsisItemsRepeater.TryGetElement(0) as TextBlock;
00381                         Verify.IsNotNull(ellipsisNode1, "Our flyout ItemTemplate (1) should have been wrapped in a TextBlock.");
00382
00383                     // change this conditions
00384                     bool testCondition = !(ellipsisNode1.Foreground is SolidColorBrush brush && brush.Color == Colors.Blue);
00385                         Verify.IsTrue(testCondition, "Default foreground color of the BreadcrumbBarItem should not have been [blue].");
00386                     };
00387                 });
00388             }
00389         }
00390
00391         [TestMethod]
00392         public void VerifyCollectionChangeGetsRespected()
00393         {
00394             BreadcrumbBar breadcrumb = null;
00395             ItemsRepeater breadcrumbItemsRepeater = null;
00396             RunOnUIThread.Execute(() =>
00397             {
00398                 // Set a custom ItemTemplate to be wrapped in a BreadcrumbBarItem.
00399                 var itemTemplate = (DataTemplate)XamlReader.Load(
00400                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
00401                             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
00402                             xmlns:controls='using:Microsoft.UI.Xaml.Controls'
00403                             xmlns:local='using:Microsoft.UI.Xaml.Tests.MUXControls.ApiTests'>
00404                             <controls:BreadcrumbBarItem Content='{Binding}'>
00405                                 <controls:BreadcrumbBarItem.ContentTemplate>
00406                                     <DataTemplate>
00407                                         <TextBlock Text='{Binding MockProperty}'/>
00408                                     </DataTemplate>
00409                                 </controls:BreadcrumbBarItem.ContentTemplate>
00410                             </controls:BreadcrumbBarItem>
00411                         </DataTemplate>");
00412
00413
00414                 breadcrumb = new BreadcrumbBar();
00415                 breadcrumb.ItemsSource = new List<MockClass>() {
00416                     new MockClass { MockProperty = "Node 1" },
00417                     new MockClass { MockProperty = "Node 2" },
00418                 };
00419                 breadcrumb.ItemTemplate = itemTemplate;
00420
00421                 var stackPanel = new StackPanel();
00422                 stackPanel.Children.Add(breadcrumb);
00423
00424                 Content = stackPanel;
00425                 Content.UpdateLayout();
00426             });
00427
00428             IdleSynchronizer.Wait();
00429
00430             RunOnUIThread.Execute(() =>
00431             {
00432                 breadcrumbItemsRepeater = (ItemsRepeater)breadcrumb.FindVisualChildByName("PART_ItemsRepeater");
00433                 Verify.IsNotNull(breadcrumbItemsRepeater, "The underlying items repeater could not be retrieved");
00434
00435                 var breadcrumbNode2 = breadcrumbItemsRepeater.TryGetElement(1) as BreadcrumbBarItem;
00436                 Verify.IsNotNull(breadcrumbNode2, "Our custom ItemTemplate should have been wrapped in a BreadcrumbBarItem.");
00437
00438                 breadcrumb.ItemsSource = new List<MockClass>() {
00439                     new MockClass { MockProperty = "Node 1" },
00440                     new MockClass { MockProperty = "Node 2" },
00441                     new MockClass { MockProperty = "Node 3" },
00442                     new MockClass { MockProperty = "Node 4" },
00443                 };
00444             });
00445
00446             IdleSynchronizer.Wait();
00447
00448
00449             RunOnUIThread.Execute(() =>
00450             {
00451                 var breadcrumbNode3 = breadcrumbItemsRepeater.TryGetElement(3) as BreadcrumbBarItem;
00452                 Verify.IsNotNull(breadcrumbNode3, "A fourth item should have been rendered by the BreadcrumControl");
00453             });
00454         }
00455     }
00456 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/common.h Source File

  • File List
  • File Members
  • inc

common.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 using namespace ::Windows::Foundation;
00007 using namespace ::Windows::Foundation::Numerics;
00008
00009 using namespace std::chrono_literals;
00010 using namespace std::string_view_literals;
00011
00012 using ResourceIdType = const winrt::hstring &;
00013
00014 #include "ErrorHandling.h"
00015 #include "CppWinRTHelpers.h"
00016 #include "RuntimeClassHelpers.h"
00017 #include "SharedHelpers.h"
00018 #include "BoxHelpers.h"
00019 #include "CastHelpers.h"
00020 #include "event.h"
00021 #include "AutoHandle.h"
00022 #include "GlobalDependencyProperty.h"
00023 #include "CollectionHelper.h"
00024 #include "RoutedEventHelpers.h"
00025 #include "MUXControlsFactory.h"
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipClosingEventArgs.cpp Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipClosingEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TeachingTipClosingEventArgs.h"
00007
00008 winrt::TeachingTipCloseReason TeachingTipClosingEventArgs::Reason()
00009 {
00010     return m_reason;
00011 }
00012
00013 void TeachingTipClosingEventArgs::Reason(const winrt::TeachingTipCloseReason& reason)
00014 {
00015     m_reason = reason;
00016 }
00017
00018 bool TeachingTipClosingEventArgs::Cancel()
00019 {
00020     return m_cancel;
00021 }
00022
00023 void TeachingTipClosingEventArgs::Cancel(const bool cancel)
00024 {
00025     m_cancel = cancel;
00026 }
00027
00028 winrt::Deferral TeachingTipClosingEventArgs::GetDeferral()
00029 {
00030     m_deferralCount++;
00031
00032     com_ptr<TeachingTipClosingEventArgs> strongThis = get_strong();
00033
00034     winrt::Deferral instance{ [strongThis]()
00035     {
00036         strongThis->CheckThread();
00037         strongThis->DecrementDeferralCount();
00038     }
00039     };
00040     return instance;
00041 }
00042
00043 void TeachingTipClosingEventArgs::SetDeferral(const winrt::Deferral& deferral)
00044 {
00045     m_deferral.set(deferral);
00046 }
00047
00048 void TeachingTipClosingEventArgs::DecrementDeferralCount()
00049 {
00050     MUX_ASSERT(m_deferralCount > 0);
00051     m_deferralCount--;
00052     if (m_deferralCount == 0)
00053     {
00054         m_deferral.get().Complete();
00055     }
00056 }
00057
00058 void TeachingTipClosingEventArgs::IncrementDeferralCount()
00059 {
00060     m_deferralCount++;
00061 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NumberBox Member List

This is the complete list of members for NumberBox, including all inherited members.
abi_enter() | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
AcceptsExpression(bool value) | NumberBoxProperties |
AcceptsExpression() | NumberBoxProperties |
AcceptsExpressionProperty() | NumberBoxProperties | [inline, static]
CheckThread() | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
ClearProperties() | NumberBoxProperties | [static]
CoerceMaximum() | NumberBox | [private]
CoerceMinimum() | NumberBox | [private]
CoerceValue() | NumberBox | [private]
DeleteInstanceOnUIThread(std::unique_ptr< NumberBox > &&self) noexcept | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline, static]
Description(winrt::IInspectable const &value) | NumberBoxProperties |
Description() | NumberBoxProperties |
DescriptionProperty() | NumberBoxProperties | [inline, static]
EnsureProperties() | NumberBoxProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
final_release(std::unique_ptr< NumberBox > &&self) | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline, static]
GetBase() | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
GetInner() | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
GetRegionalSettingsAwareDecimalFormatter() | NumberBox | [private]
Header(winrt::IInspectable const &value) | NumberBoxProperties |
Header() | NumberBoxProperties |
HeaderProperty() | NumberBoxProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | NumberBoxProperties |
HeaderTemplate() | NumberBoxProperties |
HeaderTemplateProperty() | NumberBoxProperties | [inline, static]
InputScope(winrt::InputScope const &value) | NumberBoxProperties |
InputScope() | NumberBoxProperties |
InputScopeProperty() | NumberBoxProperties | [inline, static]
IsInBounds(double value) | NumberBox | [private]
IsOnThread() | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
IsWrapEnabled(bool value) | NumberBoxProperties |
IsWrapEnabled() | NumberBoxProperties |
IsWrapEnabledProperty() | NumberBoxProperties | [inline, static]
LargeChange(double value) | NumberBoxProperties |
LargeChange() | NumberBoxProperties |
LargeChangeProperty() | NumberBoxProperties | [inline, static]
m_valueChangedEventSource | NumberBoxProperties |
Maximum(double value) | NumberBoxProperties |
Maximum() | NumberBoxProperties |
MaximumProperty() | NumberBoxProperties | [inline, static]
Minimum(double value) | NumberBoxProperties |
Minimum() | NumberBoxProperties |
MinimumProperty() | NumberBoxProperties | [inline, static]
MoveCaretToTextEnd() | NumberBox | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
NumberBox() | NumberBox |
NumberBoxProperties() | NumberBoxProperties |
NumberFormatter(winrt::INumberFormatter2 const &value) | NumberBoxProperties |
NumberFormatter() | NumberBoxProperties |
NumberFormatterProperty() | NumberBoxProperties | [inline, static]
OnApplyTemplate() | NumberBox |
OnAutomationPropertiesLabeledByPropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | NumberBox | [private]
OnAutomationPropertiesNamePropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | NumberBox | [private]
OnCreateAutomationPeer() | NumberBox | [virtual]
OnHeaderPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnHeaderTemplatePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnHeaderTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnIsEnabledChanged(const winrt::IInspectable &, const winrt::DependencyPropertyChangedEventArgs &) | NumberBox | [private]
OnIsWrapEnabledPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnIsWrapEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnMaximumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnMaximumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnMinimumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnMinimumPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnNumberBoxGotFocus(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | NumberBox | [private]
OnNumberBoxKeyDown(winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args) | NumberBox | [private]
OnNumberBoxKeyUp(winrt::IInspectable const &sender, winrt::KeyRoutedEventArgs const &args) | NumberBox | [private]
OnNumberBoxLostFocus(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | NumberBox | [private]
OnNumberBoxScroll(winrt::IInspectable const &sender, winrt::PointerRoutedEventArgs const &args) | NumberBox | [private]
OnNumberFormatterPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnNumberFormatterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnSmallChangePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnSmallChangePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnSpinButtonPlacementModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnSpinButtonPlacementModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnSpinDownClick(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | NumberBox | [private]
OnSpinUpClick(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | NumberBox | [private]
OnTextBoxLoaded(winrt::IInspectable const &, winrt::RoutedEventArgs const &) | NumberBox |
OnTextPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnValidationModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnValidationModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
OnValuePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NumberBox |
NumberBoxProperties::OnValuePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NumberBoxProperties | [static]
PlaceholderText(winrt::hstring const &value) | NumberBoxProperties |
PlaceholderText() | NumberBoxProperties |
PlaceholderTextProperty() | NumberBoxProperties | [inline, static]
PreventKeyboardDisplayOnProgrammaticFocus(bool value) | NumberBoxProperties |
PreventKeyboardDisplayOnProgrammaticFocus() | NumberBoxProperties |
PreventKeyboardDisplayOnProgrammaticFocusProperty() | NumberBoxProperties | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
ReevaluateForwardedUIAProperties() | NumberBox | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< NumberBox, winrt::implementation::NumberBoxT > | [inline]
s_AcceptsExpressionProperty | NumberBoxProperties | [static]
s_DescriptionProperty | NumberBoxProperties | [static]
s_HeaderProperty | NumberBoxProperties | [static]
s_HeaderTemplateProperty | NumberBoxProperties | [static]
s_InputScopeProperty | NumberBoxProperties | [static]
s_IsWrapEnabledProperty | NumberBoxProperties | [static]
s_LargeChangeProperty | NumberBoxProperties | [static]
s_MaximumProperty | NumberBoxProperties | [static]
s_MinimumProperty | NumberBoxProperties | [static]
s_NumberFormatterProperty | NumberBoxProperties | [static]
s_PlaceholderTextProperty | NumberBoxProperties | [static]
s_PreventKeyboardDisplayOnProgrammaticFocusProperty | NumberBoxProperties | [static]
s_SelectionFlyoutProperty | NumberBoxProperties | [static]
s_SelectionHighlightColorProperty | NumberBoxProperties | [static]
s_SmallChangeProperty | NumberBoxProperties | [static]
s_SpinButtonPlacementModeProperty | NumberBoxProperties | [static]
s_TextAlignmentProperty | NumberBoxProperties | [static]
s_TextProperty | NumberBoxProperties | [static]
s_TextReadingOrderProperty | NumberBoxProperties | [static]
s_ValidationModeProperty | NumberBoxProperties | [static]
s_ValueProperty | NumberBoxProperties | [static]
SelectionFlyout(winrt::FlyoutBase const &value) | NumberBoxProperties |
SelectionFlyout() | NumberBoxProperties |
SelectionFlyoutProperty() | NumberBoxProperties | [inline, static]
SelectionHighlightColor(winrt::SolidColorBrush const &value) | NumberBoxProperties |
SelectionHighlightColor() | NumberBoxProperties |
SelectionHighlightColorProperty() | NumberBoxProperties | [inline, static]
SetDefaultInputScope() | NumberBox | [private]
SmallChange(double value) | NumberBoxProperties |
SmallChange() | NumberBoxProperties |
SmallChangeProperty() | NumberBoxProperties | [inline, static]
SpinButtonPlacementMode(winrt::NumberBoxSpinButtonPlacementMode const &value) | NumberBoxProperties |
SpinButtonPlacementMode() | NumberBoxProperties |
SpinButtonPlacementModeProperty() | NumberBoxProperties | [inline, static]
StepValue(double change) | NumberBox | [private]
Text(winrt::hstring const &value) | NumberBoxProperties |
Text() | NumberBoxProperties |
TextAlignment(winrt::TextAlignment const &value) | NumberBoxProperties |
TextAlignment() | NumberBoxProperties |
TextAlignmentProperty() | NumberBoxProperties | [inline, static]
TextProperty() | NumberBoxProperties | [inline, static]
TextReadingOrder(winrt::TextReadingOrder const &value) | NumberBoxProperties |
TextReadingOrder() | NumberBoxProperties |
TextReadingOrderProperty() | NumberBoxProperties | [inline, static]
UnhookEvents() | NumberBox | [private]
UpdateHeaderPresenterState() | NumberBox | [private]
UpdateSpinButtonEnabled() | NumberBox | [private]
UpdateSpinButtonPlacement() | NumberBox | [private]
UpdateTextToValue() | NumberBox | [private]
UpdateValueToText() | NumberBox | [private]
UpdateVisualStateForIsEnabledChange() | NumberBox | [private]
ValidateInput() | NumberBox | [private]
ValidateNumberFormatter(winrt::INumberFormatter2 value) | NumberBox |
ValidationMode(winrt::NumberBoxValidationMode const &value) | NumberBoxProperties |
ValidationMode() | NumberBoxProperties |
ValidationModeProperty() | NumberBoxProperties | [inline, static]
Value(double value) | NumberBox |
Value() | NumberBox |
ValueChanged(winrt::TypedEventHandler< winrt::NumberBox, winrt::NumberBoxValueChangedEventArgs > const &value) | NumberBoxProperties |
ValueChanged(winrt::event_token const &token) | NumberBoxProperties |
ValueProperty() | NumberBoxProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ColorSpectrum.properties.cpp Source File

  • File List
  • File Members
  • Generated

ColorSpectrum.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ColorSpectrum.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ColorSpectrum)
00012 }
00013
00014 #include "ColorSpectrum.g.cpp"
00015
00016 GlobalDependencyProperty ColorSpectrumProperties::s_ColorProperty{ nullptr };
00017 GlobalDependencyProperty ColorSpectrumProperties::s_ComponentsProperty{ nullptr };
00018 GlobalDependencyProperty ColorSpectrumProperties::s_HsvColorProperty{ nullptr };
00019 GlobalDependencyProperty ColorSpectrumProperties::s_MaxHueProperty{ nullptr };
00020 GlobalDependencyProperty ColorSpectrumProperties::s_MaxSaturationProperty{ nullptr };
00021 GlobalDependencyProperty ColorSpectrumProperties::s_MaxValueProperty{ nullptr };
00022 GlobalDependencyProperty ColorSpectrumProperties::s_MinHueProperty{ nullptr };
00023 GlobalDependencyProperty ColorSpectrumProperties::s_MinSaturationProperty{ nullptr };
00024 GlobalDependencyProperty ColorSpectrumProperties::s_MinValueProperty{ nullptr };
00025 GlobalDependencyProperty ColorSpectrumProperties::s_ShapeProperty{ nullptr };
00026
00027 ColorSpectrumProperties::ColorSpectrumProperties()
00028     : m_colorChangedEventSource{static_cast<ColorSpectrum*>(this)}
00029 {
00030     EnsureProperties();
00031 }
00032
00033 void ColorSpectrumProperties::EnsureProperties()
00034 {
00035     if (!s_ColorProperty)
00036     {
00037         s_ColorProperty =
00038             InitializeDependencyProperty(
00039                 L"Color",
00040                 winrt::name_of<winrt::Color>(),
00041                 winrt::name_of<winrt::ColorSpectrum>(),
00042                 false /* isAttached */,
00043                 ValueHelper<winrt::Color>::BoxValueIfNecessary({ 255, 255, 255, 255 }),
00044                 winrt::PropertyChangedCallback(&OnColorPropertyChanged));
00045     }
00046     if (!s_ComponentsProperty)
00047     {
00048         s_ComponentsProperty =
00049             InitializeDependencyProperty(
00050                 L"Components",
00051                 winrt::name_of<winrt::ColorSpectrumComponents>(),
00052                 winrt::name_of<winrt::ColorSpectrum>(),
00053                 false /* isAttached */,
00054                 ValueHelper<winrt::ColorSpectrumComponents>::BoxValueIfNecessary(winrt::ColorSpectrumComponents::HueSaturation),
00055                 winrt::PropertyChangedCallback(&OnComponentsPropertyChanged));
00056     }
00057     if (!s_HsvColorProperty)
00058     {
00059         s_HsvColorProperty =
00060             InitializeDependencyProperty(
00061                 L"HsvColor",
00062                 winrt::name_of<winrt::float4>(),
00063                 winrt::name_of<winrt::ColorSpectrum>(),
00064                 false /* isAttached */,
00065                 ValueHelper<winrt::float4>::BoxValueIfNecessary({ 0, 0, 1, 1 }),
00066                 winrt::PropertyChangedCallback(&OnHsvColorPropertyChanged));
00067     }
00068     if (!s_MaxHueProperty)
00069     {
00070         s_MaxHueProperty =
00071             InitializeDependencyProperty(
00072                 L"MaxHue",
00073                 winrt::name_of<int>(),
00074                 winrt::name_of<winrt::ColorSpectrum>(),
00075                 false /* isAttached */,
00076                 ValueHelper<int>::BoxValueIfNecessary(359),
00077                 winrt::PropertyChangedCallback(&OnMaxHuePropertyChanged));
00078     }
00079     if (!s_MaxSaturationProperty)
00080     {
00081         s_MaxSaturationProperty =
00082             InitializeDependencyProperty(
00083                 L"MaxSaturation",
00084                 winrt::name_of<int>(),
00085                 winrt::name_of<winrt::ColorSpectrum>(),
00086                 false /* isAttached */,
00087                 ValueHelper<int>::BoxValueIfNecessary(100),
00088                 winrt::PropertyChangedCallback(&OnMaxSaturationPropertyChanged));
00089     }
00090     if (!s_MaxValueProperty)
00091     {
00092         s_MaxValueProperty =
00093             InitializeDependencyProperty(
00094                 L"MaxValue",
00095                 winrt::name_of<int>(),
00096                 winrt::name_of<winrt::ColorSpectrum>(),
00097                 false /* isAttached */,
00098                 ValueHelper<int>::BoxValueIfNecessary(100),
00099                 winrt::PropertyChangedCallback(&OnMaxValuePropertyChanged));
00100     }
00101     if (!s_MinHueProperty)
00102     {
00103         s_MinHueProperty =
00104             InitializeDependencyProperty(
00105                 L"MinHue",
00106                 winrt::name_of<int>(),
00107                 winrt::name_of<winrt::ColorSpectrum>(),
00108                 false /* isAttached */,
00109                 ValueHelper<int>::BoxValueIfNecessary(0),
00110                 winrt::PropertyChangedCallback(&OnMinHuePropertyChanged));
00111     }
00112     if (!s_MinSaturationProperty)
00113     {
00114         s_MinSaturationProperty =
00115             InitializeDependencyProperty(
00116                 L"MinSaturation",
00117                 winrt::name_of<int>(),
00118                 winrt::name_of<winrt::ColorSpectrum>(),
00119                 false /* isAttached */,
00120                 ValueHelper<int>::BoxValueIfNecessary(0),
00121                 winrt::PropertyChangedCallback(&OnMinSaturationPropertyChanged));
00122     }
00123     if (!s_MinValueProperty)
00124     {
00125         s_MinValueProperty =
00126             InitializeDependencyProperty(
00127                 L"MinValue",
00128                 winrt::name_of<int>(),
00129                 winrt::name_of<winrt::ColorSpectrum>(),
00130                 false /* isAttached */,
00131                 ValueHelper<int>::BoxValueIfNecessary(0),
00132                 winrt::PropertyChangedCallback(&OnMinValuePropertyChanged));
00133     }
00134     if (!s_ShapeProperty)
00135     {
00136         s_ShapeProperty =
00137             InitializeDependencyProperty(
00138                 L"Shape",
00139                 winrt::name_of<winrt::ColorSpectrumShape>(),
00140                 winrt::name_of<winrt::ColorSpectrum>(),
00141                 false /* isAttached */,
00142                 ValueHelper<winrt::ColorSpectrumShape>::BoxValueIfNecessary(winrt::ColorSpectrumShape::Box),
00143                 winrt::PropertyChangedCallback(&OnShapePropertyChanged));
00144     }
00145 }
00146
00147 void ColorSpectrumProperties::ClearProperties()
00148 {
00149     s_ColorProperty = nullptr;
00150     s_ComponentsProperty = nullptr;
00151     s_HsvColorProperty = nullptr;
00152     s_MaxHueProperty = nullptr;
00153     s_MaxSaturationProperty = nullptr;
00154     s_MaxValueProperty = nullptr;
00155     s_MinHueProperty = nullptr;
00156     s_MinSaturationProperty = nullptr;
00157     s_MinValueProperty = nullptr;
00158     s_ShapeProperty = nullptr;
00159 }
00160
00161 void ColorSpectrumProperties::OnColorPropertyChanged(
00162     winrt::DependencyObject const& sender,
00163     winrt::DependencyPropertyChangedEventArgs const& args)
00164 {
00165     auto owner = sender.as<winrt::ColorSpectrum>();
00166     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00167 }
00168
00169 void ColorSpectrumProperties::OnComponentsPropertyChanged(
00170     winrt::DependencyObject const& sender,
00171     winrt::DependencyPropertyChangedEventArgs const& args)
00172 {
00173     auto owner = sender.as<winrt::ColorSpectrum>();
00174     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00175 }
00176
00177 void ColorSpectrumProperties::OnHsvColorPropertyChanged(
00178     winrt::DependencyObject const& sender,
00179     winrt::DependencyPropertyChangedEventArgs const& args)
00180 {
00181     auto owner = sender.as<winrt::ColorSpectrum>();
00182     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00183 }
00184
00185 void ColorSpectrumProperties::OnMaxHuePropertyChanged(
00186     winrt::DependencyObject const& sender,
00187     winrt::DependencyPropertyChangedEventArgs const& args)
00188 {
00189     auto owner = sender.as<winrt::ColorSpectrum>();
00190     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00191 }
00192
00193 void ColorSpectrumProperties::OnMaxSaturationPropertyChanged(
00194     winrt::DependencyObject const& sender,
00195     winrt::DependencyPropertyChangedEventArgs const& args)
00196 {
00197     auto owner = sender.as<winrt::ColorSpectrum>();
00198     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00199 }
00200
00201 void ColorSpectrumProperties::OnMaxValuePropertyChanged(
00202     winrt::DependencyObject const& sender,
00203     winrt::DependencyPropertyChangedEventArgs const& args)
00204 {
00205     auto owner = sender.as<winrt::ColorSpectrum>();
00206     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00207 }
00208
00209 void ColorSpectrumProperties::OnMinHuePropertyChanged(
00210     winrt::DependencyObject const& sender,
00211     winrt::DependencyPropertyChangedEventArgs const& args)
00212 {
00213     auto owner = sender.as<winrt::ColorSpectrum>();
00214     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00215 }
00216
00217 void ColorSpectrumProperties::OnMinSaturationPropertyChanged(
00218     winrt::DependencyObject const& sender,
00219     winrt::DependencyPropertyChangedEventArgs const& args)
00220 {
00221     auto owner = sender.as<winrt::ColorSpectrum>();
00222     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00223 }
00224
00225 void ColorSpectrumProperties::OnMinValuePropertyChanged(
00226     winrt::DependencyObject const& sender,
00227     winrt::DependencyPropertyChangedEventArgs const& args)
00228 {
00229     auto owner = sender.as<winrt::ColorSpectrum>();
00230     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00231 }
00232
00233 void ColorSpectrumProperties::OnShapePropertyChanged(
00234     winrt::DependencyObject const& sender,
00235     winrt::DependencyPropertyChangedEventArgs const& args)
00236 {
00237     auto owner = sender.as<winrt::ColorSpectrum>();
00238     winrt::get_self<ColorSpectrum>(owner)->OnPropertyChanged(args);
00239 }
00240
00241 void ColorSpectrumProperties::Color(winrt::Color const& value)
00242 {
00243     [[gsl::suppress(con)]]
00244     {
00245     static_cast<ColorSpectrum*>(this)->SetValue(s_ColorProperty, ValueHelper<winrt::Color>::BoxValueIfNecessary(value));
00246     }
00247 }
00248
00249 winrt::Color ColorSpectrumProperties::Color()
00250 {
00251     return ValueHelper<winrt::Color>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_ColorProperty));
00252 }
00253
00254 void ColorSpectrumProperties::Components(winrt::ColorSpectrumComponents const& value)
00255 {
00256     [[gsl::suppress(con)]]
00257     {
00258     static_cast<ColorSpectrum*>(this)->SetValue(s_ComponentsProperty, ValueHelper<winrt::ColorSpectrumComponents>::BoxValueIfNecessary(value));
00259     }
00260 }
00261
00262 winrt::ColorSpectrumComponents ColorSpectrumProperties::Components()
00263 {
00264     return ValueHelper<winrt::ColorSpectrumComponents>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_ComponentsProperty));
00265 }
00266
00267 void ColorSpectrumProperties::HsvColor(winrt::float4 const& value)
00268 {
00269     [[gsl::suppress(con)]]
00270     {
00271     static_cast<ColorSpectrum*>(this)->SetValue(s_HsvColorProperty, ValueHelper<winrt::float4>::BoxValueIfNecessary(value));
00272     }
00273 }
00274
00275 winrt::float4 ColorSpectrumProperties::HsvColor()
00276 {
00277     return ValueHelper<winrt::float4>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_HsvColorProperty));
00278 }
00279
00280 void ColorSpectrumProperties::MaxHue(int value)
00281 {
00282     [[gsl::suppress(con)]]
00283     {
00284     static_cast<ColorSpectrum*>(this)->SetValue(s_MaxHueProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00285     }
00286 }
00287
00288 int ColorSpectrumProperties::MaxHue()
00289 {
00290     return ValueHelper<int>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_MaxHueProperty));
00291 }
00292
00293 void ColorSpectrumProperties::MaxSaturation(int value)
00294 {
00295     [[gsl::suppress(con)]]
00296     {
00297     static_cast<ColorSpectrum*>(this)->SetValue(s_MaxSaturationProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00298     }
00299 }
00300
00301 int ColorSpectrumProperties::MaxSaturation()
00302 {
00303     return ValueHelper<int>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_MaxSaturationProperty));
00304 }
00305
00306 void ColorSpectrumProperties::MaxValue(int value)
00307 {
00308     [[gsl::suppress(con)]]
00309     {
00310     static_cast<ColorSpectrum*>(this)->SetValue(s_MaxValueProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00311     }
00312 }
00313
00314 int ColorSpectrumProperties::MaxValue()
00315 {
00316     return ValueHelper<int>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_MaxValueProperty));
00317 }
00318
00319 void ColorSpectrumProperties::MinHue(int value)
00320 {
00321     [[gsl::suppress(con)]]
00322     {
00323     static_cast<ColorSpectrum*>(this)->SetValue(s_MinHueProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00324     }
00325 }
00326
00327 int ColorSpectrumProperties::MinHue()
00328 {
00329     return ValueHelper<int>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_MinHueProperty));
00330 }
00331
00332 void ColorSpectrumProperties::MinSaturation(int value)
00333 {
00334     [[gsl::suppress(con)]]
00335     {
00336     static_cast<ColorSpectrum*>(this)->SetValue(s_MinSaturationProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00337     }
00338 }
00339
00340 int ColorSpectrumProperties::MinSaturation()
00341 {
00342     return ValueHelper<int>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_MinSaturationProperty));
00343 }
00344
00345 void ColorSpectrumProperties::MinValue(int value)
00346 {
00347     [[gsl::suppress(con)]]
00348     {
00349     static_cast<ColorSpectrum*>(this)->SetValue(s_MinValueProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00350     }
00351 }
00352
00353 int ColorSpectrumProperties::MinValue()
00354 {
00355     return ValueHelper<int>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_MinValueProperty));
00356 }
00357
00358 void ColorSpectrumProperties::Shape(winrt::ColorSpectrumShape const& value)
00359 {
00360     [[gsl::suppress(con)]]
00361     {
00362     static_cast<ColorSpectrum*>(this)->SetValue(s_ShapeProperty, ValueHelper<winrt::ColorSpectrumShape>::BoxValueIfNecessary(value));
00363     }
00364 }
00365
00366 winrt::ColorSpectrumShape ColorSpectrumProperties::Shape()
00367 {
00368     return ValueHelper<winrt::ColorSpectrumShape>::CastOrUnbox(static_cast<ColorSpectrum*>(this)->GetValue(s_ShapeProperty));
00369 }
00370
00371 winrt::event_token ColorSpectrumProperties::ColorChanged(winrt::TypedEventHandler<winrt::ColorSpectrum, winrt::ColorChangedEventArgs> const& value)
00372 {
00373     return m_colorChangedEventSource.add(value);
00374 }
00375
00376 void ColorSpectrumProperties::ColorChanged(winrt::event_token const& token)
00377 {
00378     m_colorChangedEventSource.remove(token);
00379 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RefreshVisualizer.properties.cpp Source File

  • File List
  • File Members
  • Generated

RefreshVisualizer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RefreshVisualizer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(RefreshVisualizer)
00012 }
00013
00014 #include "RefreshVisualizer.g.cpp"
00015
00016 GlobalDependencyProperty RefreshVisualizerProperties::s_ContentProperty{ nullptr };
00017 GlobalDependencyProperty RefreshVisualizerProperties::s_InfoProviderProperty{ nullptr };
00018 GlobalDependencyProperty RefreshVisualizerProperties::s_OrientationProperty{ nullptr };
00019 GlobalDependencyProperty RefreshVisualizerProperties::s_StateProperty{ nullptr };
00020
00021 RefreshVisualizerProperties::RefreshVisualizerProperties()
00022     : m_refreshRequestedEventSource{static_cast<RefreshVisualizer*>(this)}
00023     , m_refreshStateChangedEventSource{static_cast<RefreshVisualizer*>(this)}
00024 {
00025     EnsureProperties();
00026 }
00027
00028 void RefreshVisualizerProperties::EnsureProperties()
00029 {
00030     if (!s_ContentProperty)
00031     {
00032         s_ContentProperty =
00033             InitializeDependencyProperty(
00034                 L"Content",
00035                 winrt::name_of<winrt::UIElement>(),
00036                 winrt::name_of<winrt::RefreshVisualizer>(),
00037                 false /* isAttached */,
00038                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00039                 winrt::PropertyChangedCallback(&OnContentPropertyChanged));
00040     }
00041     if (!s_InfoProviderProperty)
00042     {
00043         s_InfoProviderProperty =
00044             InitializeDependencyProperty(
00045                 L"InfoProvider",
00046                 winrt::name_of<winrt::IInspectable>(),
00047                 winrt::name_of<winrt::RefreshVisualizer>(),
00048                 true /* isAttached */,
00049                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00050                 winrt::PropertyChangedCallback(&OnInfoProviderPropertyChanged));
00051     }
00052     if (!s_OrientationProperty)
00053     {
00054         s_OrientationProperty =
00055             InitializeDependencyProperty(
00056                 L"Orientation",
00057                 winrt::name_of<winrt::RefreshVisualizerOrientation>(),
00058                 winrt::name_of<winrt::RefreshVisualizer>(),
00059                 false /* isAttached */,
00060                 ValueHelper<winrt::RefreshVisualizerOrientation>::BoxValueIfNecessary(winrt::RefreshVisualizerOrientation::Auto),
00061                 winrt::PropertyChangedCallback(&OnOrientationPropertyChanged));
00062     }
00063     if (!s_StateProperty)
00064     {
00065         s_StateProperty =
00066             InitializeDependencyProperty(
00067                 L"State",
00068                 winrt::name_of<winrt::RefreshVisualizerState>(),
00069                 winrt::name_of<winrt::RefreshVisualizer>(),
00070                 false /* isAttached */,
00071                 ValueHelper<winrt::RefreshVisualizerState>::BoxValueIfNecessary(winrt::RefreshVisualizerState::Idle),
00072                 winrt::PropertyChangedCallback(&OnStatePropertyChanged));
00073     }
00074 }
00075
00076 void RefreshVisualizerProperties::ClearProperties()
00077 {
00078     s_ContentProperty = nullptr;
00079     s_InfoProviderProperty = nullptr;
00080     s_OrientationProperty = nullptr;
00081     s_StateProperty = nullptr;
00082 }
00083
00084 void RefreshVisualizerProperties::OnContentPropertyChanged(
00085     winrt::DependencyObject const& sender,
00086     winrt::DependencyPropertyChangedEventArgs const& args)
00087 {
00088     auto owner = sender.as<winrt::RefreshVisualizer>();
00089     winrt::get_self<RefreshVisualizer>(owner)->OnPropertyChanged(args);
00090 }
00091
00092 void RefreshVisualizerProperties::OnInfoProviderPropertyChanged(
00093     winrt::DependencyObject const& sender,
00094     winrt::DependencyPropertyChangedEventArgs const& args)
00095 {
00096     auto owner = sender.as<winrt::RefreshVisualizer>();
00097     winrt::get_self<RefreshVisualizer>(owner)->OnPropertyChanged(args);
00098 }
00099
00100 void RefreshVisualizerProperties::OnOrientationPropertyChanged(
00101     winrt::DependencyObject const& sender,
00102     winrt::DependencyPropertyChangedEventArgs const& args)
00103 {
00104     auto owner = sender.as<winrt::RefreshVisualizer>();
00105     winrt::get_self<RefreshVisualizer>(owner)->OnPropertyChanged(args);
00106 }
00107
00108 void RefreshVisualizerProperties::OnStatePropertyChanged(
00109     winrt::DependencyObject const& sender,
00110     winrt::DependencyPropertyChangedEventArgs const& args)
00111 {
00112     auto owner = sender.as<winrt::RefreshVisualizer>();
00113     winrt::get_self<RefreshVisualizer>(owner)->OnPropertyChanged(args);
00114 }
00115
00116 void RefreshVisualizerProperties::Content(winrt::UIElement const& value)
00117 {
00118     [[gsl::suppress(con)]]
00119     {
00120     static_cast<RefreshVisualizer*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00121     }
00122 }
00123
00124 winrt::UIElement RefreshVisualizerProperties::Content()
00125 {
00126     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<RefreshVisualizer*>(this)->GetValue(s_ContentProperty));
00127 }
00128
00129
00130 void RefreshVisualizerProperties::Orientation(winrt::RefreshVisualizerOrientation const& value)
00131 {
00132     [[gsl::suppress(con)]]
00133     {
00134     static_cast<RefreshVisualizer*>(this)->SetValue(s_OrientationProperty, ValueHelper<winrt::RefreshVisualizerOrientation>::BoxValueIfNecessary(value));
00135     }
00136 }
00137
00138 winrt::RefreshVisualizerOrientation RefreshVisualizerProperties::Orientation()
00139 {
00140     return ValueHelper<winrt::RefreshVisualizerOrientation>::CastOrUnbox(static_cast<RefreshVisualizer*>(this)->GetValue(s_OrientationProperty));
00141 }
00142
00143 void RefreshVisualizerProperties::State(winrt::RefreshVisualizerState const& value)
00144 {
00145     [[gsl::suppress(con)]]
00146     {
00147     static_cast<RefreshVisualizer*>(this)->SetValue(s_StateProperty, ValueHelper<winrt::RefreshVisualizerState>::BoxValueIfNecessary(value));
00148     }
00149 }
00150
00151 winrt::RefreshVisualizerState RefreshVisualizerProperties::State()
00152 {
00153     return ValueHelper<winrt::RefreshVisualizerState>::CastOrUnbox(static_cast<RefreshVisualizer*>(this)->GetValue(s_StateProperty));
00154 }
00155
00156 winrt::event_token RefreshVisualizerProperties::RefreshRequested(winrt::TypedEventHandler<winrt::RefreshVisualizer, winrt::RefreshRequestedEventArgs> const& value)
00157 {
00158     return m_refreshRequestedEventSource.add(value);
00159 }
00160
00161 void RefreshVisualizerProperties::RefreshRequested(winrt::event_token const& token)
00162 {
00163     m_refreshRequestedEventSource.remove(token);
00164 }
00165
00166 winrt::event_token RefreshVisualizerProperties::RefreshStateChanged(winrt::TypedEventHandler<winrt::RefreshVisualizer, winrt::RefreshStateChangedEventArgs> const& value)
00167 {
00168     return m_refreshStateChangedEventSource.add(value);
00169 }
00170
00171 void RefreshVisualizerProperties::RefreshStateChanged(winrt::event_token const& token)
00172 {
00173     m_refreshStateChangedEventSource.remove(token);
00174 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

is_flags_enum< T > Member List

This is the complete list of members for is_flags_enum< T >, including all inherited members.
value is_flags_enum< T > [static]
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NestedItemsControlsPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

NestedItemsControlsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Input;
00007 using Microsoft.UI.Xaml.Media;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     public sealed partial class NestedItemsControlsPage : TestPage
00012     {
00013         private ItemsControl _outerItemsControl = null;
00014
00015         public NestedItemsControlsPage()
00016         {
00017             this.InitializeComponent();
00018
00019             Loaded += NestedItemsControlsPage_Loaded;
00020         }
00021
00022         private void UpdateOuterItemsControl()
00023         {
00024             if (cmbUseOuterItemsControl != null)
00025             {
00026                 if (_outerItemsControl != null)
00027                 {
00028                     _outerItemsControl.Visibility = Visibility.Collapsed;
00029                 }
00030
00031                 switch (cmbUseOuterItemsControl.SelectedIndex)
00032                 {
00033                     case 0:
00034                     {
00035                         _outerItemsControl = outerItemsControl1;
00036                         break;
00037                     }
00038                     case 1:
00039                     {
00040                         _outerItemsControl = outerItemsControl2;
00041                         break;
00042                     }
00043                     case 2:
00044                     {
00045                         _outerItemsControl = outerItemsControl3;
00046                         break;
00047                     }
00048                     case 3:
00049                     {
00050                         _outerItemsControl = outerItemsControl4;
00051                         break;
00052                     }
00053                 }
00054
00055                 if (_outerItemsControl != null)
00056                 {
00057                     _outerItemsControl.Visibility = Visibility.Visible;
00058
00059                     ChkOuterItemsControlIsTabStop_IsCheckedChanged(null, null);
00060                     CmbOuterItemsControlTabNavigation_SelectionChanged(null, null);
00061                     CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged(null, null);
00062                 }
00063             }
00064         }
00065
00066         private void NestedItemsControlsPage_Loaded(object sender, RoutedEventArgs e)
00067         {
00068             UpdateOuterItemsControl();
00069         }
00070
00071         private void CmbUseOuterItemsControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
00072         {
00073             UpdateOuterItemsControl();
00074         }
00075
00076         private void ChkOuterItemsControlIsTabStop_IsCheckedChanged(object sender, RoutedEventArgs e)
00077         {
00078             if (_outerItemsControl != null && chkOuterItemsControlIsTabStop != null)
00079             {
00080                 _outerItemsControl.IsTabStop = (bool)chkOuterItemsControlIsTabStop.IsChecked;
00081             }
00082         }
00083
00084         private void CmbOuterItemsControlTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00085         {
00086             if (_outerItemsControl != null && cmbOuterItemsControlTabNavigation != null)
00087             {
00088                 _outerItemsControl.TabNavigation = (KeyboardNavigationMode)cmbOuterItemsControlTabNavigation.SelectedIndex;
00089             }
00090         }
00091
00092         private void CmbOuterItemsControlXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00093         {
00094             if (_outerItemsControl != null && cmbOuterItemsControlXYFocusKeyboardNavigation != null)
00095             {
00096                 _outerItemsControl.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbOuterItemsControlXYFocusKeyboardNavigation.SelectedIndex;
00097             }
00098         }
00099
00100         private void CmbOuterItemsPresenterHeader_SelectionChanged(object sender, SelectionChangedEventArgs e)
00101         {
00102             if (_outerItemsControl != null && cmbOuterItemsPresenterHeader != null)
00103             {
00104                 ItemsPresenter outerItemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(_outerItemsControl);
00105
00106                 if (outerItemsPresenter != null)
00107                 {
00108                     switch (cmbOuterItemsPresenterHeader.SelectedIndex)
00109                     {
00110                         case 0: /*None*/
00111                             outerItemsPresenter.Header = null;
00112                             break;
00113                         case 1: /*No TabStop*/
00114                             outerItemsPresenter.Header = new TextBlock()
00115                             {
00116                                 FontSize = 18.0,
00117                                 Margin = new Thickness(10.0),
00118                                 Text = "ItemsPresenter Header"
00119                             };
00120                             break;
00121                         case 2: /*Single TabStop*/
00122                             outerItemsPresenter.Header = new Button()
00123                             {
00124                                 Content = "ItemsPresenter Header",
00125                                 FontSize = 18.0,
00126                                 Margin = new Thickness(10.0)
00127                             };
00128                             break;
00129                         case 3: /*Nested TabStops*/
00130                             outerItemsPresenter.Header = new Button()
00131                             {
00132                                 Content = new Button()
00133                                 {
00134                                     Content = "ItemsPresenter Header",
00135                                     Margin = new Thickness(10.0)
00136                                 },
00137                                 FontSize = 18.0,
00138                                 Margin = new Thickness(10.0)
00139                             };
00140                             break;
00141                     }
00142                 }
00143             }
00144         }
00145
00146         private void CmbOuterItemsPresenterFooter_SelectionChanged(object sender, SelectionChangedEventArgs e)
00147         {
00148             if (_outerItemsControl != null && cmbOuterItemsPresenterFooter != null)
00149             {
00150                 ItemsPresenter outerItemsPresenter = FindElementOfTypeInSubtree<ItemsPresenter>(_outerItemsControl);
00151
00152                 if (outerItemsPresenter != null)
00153                 {
00154                     switch (cmbOuterItemsPresenterFooter.SelectedIndex)
00155                     {
00156                         case 0: /*None*/
00157                             outerItemsPresenter.Footer = null;
00158                             break;
00159                         case 1: /*No TabStop*/
00160                             outerItemsPresenter.Footer = new TextBlock()
00161                             {
00162                                 FontSize = 18.0,
00163                                 Margin = new Thickness(10.0),
00164                                 Text = "ItemsPresenter Footer"
00165                             };
00166                             break;
00167                         case 2: /*Single TabStop*/
00168                             outerItemsPresenter.Footer = new Button()
00169                             {
00170                                 Content = "ItemsPresenter Footer",
00171                                 FontSize = 18.0,
00172                                 Margin = new Thickness(10.0)
00173                             };
00174                             break;
00175                         case 3: /*Nested TabStops*/
00176                             outerItemsPresenter.Footer = new Button()
00177                             {
00178                                 Content = new Button()
00179                                 {
00180                                     Content = "ItemsPresenter Footer",
00181                                     Margin = new Thickness(10.0)
00182                                 },
00183                                 FontSize = 18.0,
00184                                 Margin = new Thickness(10.0)
00185                             };
00186                             break;
00187                     }
00188                 }
00189             }
00190         }
00191
00192         private static T FindElementOfTypeInSubtree<T>(DependencyObject element) where T : DependencyObject
00193         {
00194             if (element == null)
00195                 return null;
00196
00197             if (element is T)
00198                 return (T)element;
00199
00200             int childrenCount = VisualTreeHelper.GetChildrenCount(element);
00201             for (int i = 0; i < childrenCount; i++)
00202             {
00203                 var result = FindElementOfTypeInSubtree<T>(VisualTreeHelper.GetChild(element, i));
00204                 if (result != null)
00205                     return result;
00206             }
00207
00208             return null;
00209         }
00210     }
00211 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeControl.properties.h Source File

  • File List
  • File Members
  • Generated

SwipeControl.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class SwipeControlProperties
00008 {
00009 public:
00010     SwipeControlProperties();
00011
00012     void BottomItems(winrt::SwipeItems const& value);
00013     winrt::SwipeItems BottomItems();
00014
00015     void LeftItems(winrt::SwipeItems const& value);
00016     winrt::SwipeItems LeftItems();
00017
00018     void RightItems(winrt::SwipeItems const& value);
00019     winrt::SwipeItems RightItems();
00020
00021     void TopItems(winrt::SwipeItems const& value);
00022     winrt::SwipeItems TopItems();
00023
00024     static winrt::DependencyProperty BottomItemsProperty() { return s_BottomItemsProperty; }
00025     static winrt::DependencyProperty LeftItemsProperty() { return s_LeftItemsProperty; }
00026     static winrt::DependencyProperty RightItemsProperty() { return s_RightItemsProperty; }
00027     static winrt::DependencyProperty TopItemsProperty() { return s_TopItemsProperty; }
00028
00029     static GlobalDependencyProperty s_BottomItemsProperty;
00030     static GlobalDependencyProperty s_LeftItemsProperty;
00031     static GlobalDependencyProperty s_RightItemsProperty;
00032     static GlobalDependencyProperty s_TopItemsProperty;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036
00037     static void OnBottomItemsPropertyChanged(
00038         winrt::DependencyObject const& sender,
00039         winrt::DependencyPropertyChangedEventArgs const& args);
00040
00041     static void OnLeftItemsPropertyChanged(
00042         winrt::DependencyObject const& sender,
00043         winrt::DependencyPropertyChangedEventArgs const& args);
00044
00045     static void OnRightItemsPropertyChanged(
00046         winrt::DependencyObject const& sender,
00047         winrt::DependencyPropertyChangedEventArgs const& args);
00048
00049     static void OnTopItemsPropertyChanged(
00050         winrt::DependencyObject const& sender,
00051         winrt::DependencyPropertyChangedEventArgs const& args);
00052 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.cpp Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedChevronRightDownSmallVisualSource.cpp

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedChevronRightDownSmallVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedChevronRightDownSmallVisualSource.json (27906 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 // ____________________________________
00022 // |       Object stats       | Count |
00023 // |__________________________|_______|
00024 // | All CompositionObjects   |    37 |
00025 // |--------------------------+-------|
00026 // | Expression animators     |     3 |
00027 // | KeyFrame animators       |     2 |
00028 // | Reference parameters     |     3 |
00029 // | Expression operations    |     4 |
00030 // |--------------------------+-------|
00031 // | Animated brushes         |     1 |
00032 // | Animated gradient stops  |     - |
00033 // | ExpressionAnimations     |     2 |
00034 // | PathKeyFrameAnimations   |     - |
00035 // |--------------------------+-------|
00036 // | ContainerVisuals         |     2 |
00037 // | ShapeVisuals             |     1 |
00038 // |--------------------------+-------|
00039 // | ContainerShapes          |     1 |
00040 // | CompositionSpriteShapes  |     1 |
00041 // |--------------------------+-------|
00042 // | Brushes                  |     1 |
00043 // | Gradient stops           |     - |
00044 // | CompositionVisualSurface |     - |
00045 // ------------------------------------
00046 #include "pch.h"
00047 #include "AnimatedVisuals\AnimatedChevronRightDownSmallVisualSource.h"
00048 #include <winrt/Windows.Foundation.Metadata.h>
00049 #include <winrt/Windows.Foundation.Collections.h>
00050 #include <winrt/Microsoft.UI.Composition.h>
00051 #include "d2d1.h"
00052 #include <d2d1_1.h>
00053 #include <d2d1helper.h>
00054 #include <Windows.Graphics.Interop.h>
00055 #include <winrt/Windows.Graphics.Effects.h>
00056
00057 using namespace winrt::Microsoft::UI::Xaml::Controls;
00058 using namespace winrt::Windows::Foundation;
00059 using namespace winrt::Windows::Foundation::Numerics;
00060 using namespace winrt::Windows::Graphics;
00061 using namespace winrt::Windows::UI;
00062 using namespace winrt::Microsoft::UI::Composition;
00063 using TimeSpan = winrt::Windows::Foundation::TimeSpan;
00064
00065 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00066 {
00067     CppWinRTActivatableClassWithBasicFactory(AnimatedChevronRightDownSmallVisualSource)
00068 }
00069 #include "AnimatedVisuals\AnimatedChevronRightDownSmallVisualSource.g.cpp"
00070
00071 class CanvasGeometry : public winrt::implements<CanvasGeometry,
00072     IGeometrySource2D,
00073     ::ABI::Windows::Graphics::IGeometrySource2DInterop>
00074 {
00075     winrt::com_ptr<ID2D1Geometry> _geometry{ nullptr };
00076
00077 public:
00078     CanvasGeometry(winrt::com_ptr<ID2D1Geometry> geometry)
00079         : _geometry{ geometry }
00080     { }
00081
00082     // IGeometrySource2D.
00083     winrt::com_ptr<ID2D1Geometry> Geometry() { return _geometry; }
00084
00085     // IGeometrySource2DInterop.
00086     IFACEMETHODIMP GetGeometry(ID2D1Geometry** value) override
00087     {
00088         _geometry.copy_to(value);
00089         return S_OK;
00090     }
00091
00092     // IGeometrySource2DInterop.
00093     IFACEMETHODIMP TryGetGeometryUsingFactory(ID2D1Factory*, ID2D1Geometry**) override
00094     {
00095         return E_NOTIMPL;
00096     }
00097 };
00098 class AnimatedChevronRightDownSmallVisualSource_AnimatedVisual : public winrt::implements<AnimatedChevronRightDownSmallVisualSource_AnimatedVisual,
00099         winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual,
00100         IClosable>
00101 {
00102     winrt::com_ptr<ID2D1Factory> _d2dFactory{ nullptr };
00103     static constexpr int64_t c_durationTicks{ 36666666L };
00104     Compositor const _c{ nullptr };
00105     ExpressionAnimation const _reusableExpressionAnimation{ nullptr };
00106     CompositionPropertySet const _themeProperties{ nullptr };
00107     ContainerVisual _root{ nullptr };
00108     CubicBezierEasingFunction _cubicBezierEasingFunction_0{ nullptr };
00109     CubicBezierEasingFunction _cubicBezierEasingFunction_1{ nullptr };
00110     CubicBezierEasingFunction _cubicBezierEasingFunction_2{ nullptr };
00111     ExpressionAnimation _rootProgress{ nullptr };
00112     StepEasingFunction _holdThenStepEasingFunction{ nullptr };
00113
00114     static void StartProgressBoundAnimation(
00115         CompositionObject target,
00116         winrt::hstring animatedPropertyName,
00117         CompositionAnimation animation,
00118         ExpressionAnimation controllerProgressExpression)
00119     {
00120         target.StartAnimation(animatedPropertyName, animation);
00121         const auto controller = target.TryGetAnimationController(animatedPropertyName);
00122         controller.Pause();
00123         controller.StartAnimation(L"Progress", controllerProgressExpression);
00124     }
00125
00126     void BindProperty(
00127         CompositionObject target,
00128         winrt::hstring animatedPropertyName,
00129         winrt::hstring expression,
00130         winrt::hstring referenceParameterName,
00131         CompositionObject referencedObject)
00132     {
00133         _reusableExpressionAnimation.ClearAllParameters();
00134         _reusableExpressionAnimation.Expression(expression);
00135         _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00136         target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00137     }
00138
00139     ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00140     {
00141         const auto result = _c.CreateScalarKeyFrameAnimation();
00142         result.Duration(TimeSpan{ c_durationTicks });
00143         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00144         return result;
00145     }
00146
00147     Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
00148     {
00149         const auto result = _c.CreateVector2KeyFrameAnimation();
00150         result.Duration(TimeSpan{ c_durationTicks });
00151         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00152         return result;
00153     }
00154
00155     CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush)
00156     {
00157         const auto result = _c.CreateSpriteShape(geometry);
00158         result.TransformMatrix(transformMatrix);
00159         result.FillBrush(fillBrush);
00160         return result;
00161     }
00162
00163     // - - - - - PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff
00164     // Controls - 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 -
00165     // TreeViewExpand - 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 -
00166     // NormalOffToNormalOn Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff
00167     // Controls - 08 - TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 -
00168     // TreeViewExpand - 07 - PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand
00169     // - 08 - PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00170     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00171     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00172     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00173     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00174     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00175     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00176     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00177     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00178     // TreeViewExpand - 18 - PressedOffToNormalOn
00179     // - - - - Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00180     // Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00181     // Layer 2 Layer 2
00182     // - - ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00183     // Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00184     // RotationDegrees:270
00185     winrt::com_ptr<CanvasGeometry> Geometry()
00186     {
00187         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00188         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00189         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00190         winrt::check_hresult(path->Open(sink.put()));
00191         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00192         sink->BeginFigure({ -3.85400009F, -2.10400009F }, D2D1_FIGURE_BEGIN_FILLED);
00193         sink->AddBezier({ { -3.65899992F, -2.29900002F }, { -3.34100008F, -2.29900002F }, { -3.14599991F, -2.10400009F } });
00194         sink->AddLine({ 0.0F, 1.04299998F });
00195         sink->AddLine({ 3.14599991F, -2.10400009F });
00196         sink->AddBezier({ { 3.34100008F, -2.29900002F }, { 3.65899992F, -2.29900002F }, { 3.85400009F, -2.10400009F } });
00197         sink->AddBezier({ { 4.04899979F, -1.90900004F }, { 4.04899979F, -1.59099996F }, { 3.85400009F, -1.39600003F } });
00198         sink->AddLine({ 0.354000002F, 2.10400009F });
00199         sink->AddBezier({ { 0.158999994F, 2.29900002F }, { -0.158999994F, 2.29900002F }, { -0.354000002F, 2.10400009F } });
00200         sink->AddLine({ -3.85400009F, -1.39600003F });
00201         sink->AddBezier({ { -4.04899979F, -1.59099996F }, { -4.04899979F, -1.90900004F }, { -3.85400009F, -2.10400009F } });
00202         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00203         winrt::check_hresult(sink->Close());
00204         auto result = winrt::make_self<CanvasGeometry>(path);
00205         return result;
00206     }
00207
00208     // - - - PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff
00209     // Controls - 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 -
00210     // TreeViewExpand - 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 -
00211     // NormalOffToNormalOn Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff
00212     // Controls - 08 - TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 -
00213     // TreeViewExpand - 07 - PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand
00214     // - 08 - PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00215     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00216     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00217     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00218     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00219     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00220     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00221     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00222     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00223     // TreeViewExpand - 18 - PressedOffToNormalOn
00224     // - - Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00225     // Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00226     // Layer 2 Layer 2
00227     // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00228     // Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00229     // RotationDegrees:270
00230     // Color bound to theme property value: Foreground
00231     CompositionColorBrush ThemeColor_Foreground()
00232     {
00233         const auto result = _c.CreateColorBrush();
00234         BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
00235         return result;
00236     }
00237
00238     // - PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff Controls
00239     // - 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 - TreeViewExpand
00240     // - 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 -
00241     // NormalOffToNormalOn Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff
00242     // Controls - 08 - TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 -
00243     // TreeViewExpand - 07 - PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand
00244     // - 08 - PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00245     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00246     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00247     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00248     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00249     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00250     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00251     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00252     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00253     // TreeViewExpand - 18 - PressedOffToNormalOn
00254     // Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00255     // Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00256     // Layer 2
00257     CompositionContainerShape ContainerShape()
00258     {
00259         const auto result = _c.CreateContainerShape();
00260         result.Scale({ 4.0F, 4.0F });
00261         // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00262         // Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00263         // RotationDegrees:270
00264         result.Shapes().Append(SpriteShape());
00265         StartProgressBoundAnimation(result, L"RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_90_to_90(), RootProgress());
00266         StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation(), _rootProgress);
00267         return result;
00268     }
00269
00270     // - - - PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff
00271     // Controls - 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 -
00272     // TreeViewExpand - 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 -
00273     // NormalOffToNormalOn Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff
00274     // Controls - 08 - TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 -
00275     // TreeViewExpand - 07 - PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand
00276     // - 08 - PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00277     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00278     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00279     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00280     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00281     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00282     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00283     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00284     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00285     // TreeViewExpand - 18 - PressedOffToNormalOn
00286     // - - Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00287     // Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00288     // Layer 2 Layer 2
00289     // ShapeGroup: Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00290     // Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1 Group 1
00291     // RotationDegrees:270
00292     CompositionPathGeometry PathGeometry()
00293     {
00294         return _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry())));
00295     }
00296
00297     // - - PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff
00298     // Controls - 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 -
00299     // TreeViewExpand - 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 -
00300     // NormalOffToNormalOn Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff
00301     // Controls - 08 - TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 -
00302     // TreeViewExpand - 07 - PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand
00303     // - 08 - PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00304     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00305     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00306     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00307     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00308     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00309     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00310     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00311     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00312     // TreeViewExpand - 18 - PressedOffToNormalOn
00313     // - Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer
00314     // 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00315     // Layer 2
00316     // Path 1 Path 1 Path 1 Path 1 Path 1 Path 1 Path 1 Path 1 Path 1 Path 1 Path 1 Path 1
00317     // Path 1 Path 1 Path 1 Path 1 Path 1 Path 1
00318     CompositionSpriteShape SpriteShape()
00319     {
00320         // Rotation:-90 degrees
00321         const auto geometry = PathGeometry();
00322         const auto result = CreateSpriteShape(geometry, { 0.0F, -1.0F, 1.0F, 0.0F, 0.0F, 0.0F }, ThemeColor_Foreground());
00323         return result;
00324     }
00325
00326     // Transforms for Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff Controls -
00327     // 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 - TreeViewExpand -
00328     // 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 - NormalOffToNormalOn
00329     // Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff Controls - 08 -
00330     // TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 - TreeViewExpand - 07 -
00331     // PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand - 08 -
00332     // PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00333     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00334     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00335     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00336     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00337     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00338     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00339     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00340     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00341     // TreeViewExpand - 18 - PressedOffToNormalOn Scale(1,1,0)
00342     ContainerVisual ContainerVisual_0()
00343     {
00344         const auto result = _c.CreateContainerVisual();
00345         result.Clip(InsetClip_0());
00346         result.Size({ 48.0F, 48.0F });
00347         // Scale:<1, 1>
00348         result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
00349         // Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00350         // Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00351         // Layer 2
00352         result.Children().InsertAtTop(ShapeVisual_0());
00353         return result;
00354     }
00355
00356     // The root of the composition.
00357     ContainerVisual Root()
00358     {
00359         const auto result = _root = _c.CreateContainerVisual();
00360         const auto propertySet = result.Properties();
00361         propertySet.InsertScalar(L"Progress", 0.0F);
00362         // PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff Controls -
00363         // 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 - TreeViewExpand -
00364         // 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 - NormalOffToNormalOn
00365         // Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff Controls - 08 -
00366         // TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 - TreeViewExpand - 07 -
00367         // PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand - 08 -
00368         // PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00369         // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00370         // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00371         // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00372         // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00373         // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00374         // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00375         // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00376         // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00377         // TreeViewExpand - 18 - PressedOffToNormalOn
00378         result.Children().InsertAtTop(ContainerVisual_0());
00379         return result;
00380     }
00381
00382     CubicBezierEasingFunction CubicBezierEasingFunction_0()
00383     {
00384         return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
00385     }
00386
00387     CubicBezierEasingFunction CubicBezierEasingFunction_1()
00388     {
00389         return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.75F, 1.0F });
00390     }
00391
00392     CubicBezierEasingFunction CubicBezierEasingFunction_2()
00393     {
00394         return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
00395     }
00396
00397     ExpressionAnimation RootProgress()
00398     {
00399         const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
00400         result.SetReferenceParameter(L"_", _root);
00401         return result;
00402     }
00403
00404     // PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff Controls -
00405     // 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 - TreeViewExpand -
00406     // 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 - NormalOffToNormalOn
00407     // Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff Controls - 08 -
00408     // TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 - TreeViewExpand - 07 -
00409     // PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand - 08 -
00410     // PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00411     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00412     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00413     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00414     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00415     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00416     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00417     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00418     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00419     // TreeViewExpand - 18 - PressedOffToNormalOn
00420     InsetClip InsetClip_0()
00421     {
00422         const auto result = _c.CreateInsetClip();
00423         return result;
00424     }
00425
00426     // - - PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff
00427     // Controls - 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 -
00428     // TreeViewExpand - 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 -
00429     // NormalOffToNormalOn Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff
00430     // Controls - 08 - TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 -
00431     // TreeViewExpand - 07 - PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand
00432     // - 08 - PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00433     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00434     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00435     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00436     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00437     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00438     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00439     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00440     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00441     // TreeViewExpand - 18 - PressedOffToNormalOn
00442     // - Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer
00443     // 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00444     // Layer 2
00445     // Rotation
00446     ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_90_to_90()
00447     {
00448         // Frame 0.
00449         const auto result = CreateScalarKeyFrameAnimation(0.0F, 90.0F, HoldThenStepEasingFunction());
00450         // Frame 9.
00451         result.InsertKeyFrame(0.0409090891F, 0.0F, CubicBezierEasingFunction_0());
00452         // Frame 10.
00453         result.InsertKeyFrame(0.0454545468F, 90.0F, _holdThenStepEasingFunction);
00454         // Frame 20.
00455         result.InsertKeyFrame(0.0909090936F, 90.0F, _holdThenStepEasingFunction);
00456         // Frame 29.
00457         result.InsertKeyFrame(0.131818175F, 0.0F, _cubicBezierEasingFunction_0);
00458         // Frame 30.
00459         result.InsertKeyFrame(0.13636364F, 0.0F, _holdThenStepEasingFunction);
00460         // Frame 40.
00461         result.InsertKeyFrame(0.181818187F, 90.0F, _cubicBezierEasingFunction_0);
00462         // Frame 60.
00463         result.InsertKeyFrame(0.272727281F, 0.0F, _holdThenStepEasingFunction);
00464         // Frame 70.
00465         result.InsertKeyFrame(0.318181813F, 0.0F, _holdThenStepEasingFunction);
00466         // Frame 79.
00467         result.InsertKeyFrame(0.359090894F, 90.0F, _cubicBezierEasingFunction_0);
00468         // Frame 80.
00469         result.InsertKeyFrame(0.363636374F, 90.0F, _holdThenStepEasingFunction);
00470         // Frame 89.
00471         result.InsertKeyFrame(0.404545456F, 0.0F, _cubicBezierEasingFunction_0);
00472         // Frame 90.
00473         result.InsertKeyFrame(0.409090906F, 90.0F, _holdThenStepEasingFunction);
00474         // Frame 100.
00475         result.InsertKeyFrame(0.454545468F, 90.0F, _holdThenStepEasingFunction);
00476         // Frame 109.
00477         result.InsertKeyFrame(0.49545455F, 0.0F, _cubicBezierEasingFunction_0);
00478         // Frame 110.
00479         result.InsertKeyFrame(0.5F, 0.0F, _holdThenStepEasingFunction);
00480         // Frame 119.
00481         result.InsertKeyFrame(0.540909111F, 90.0F, _cubicBezierEasingFunction_0);
00482         // Frame 120.
00483         result.InsertKeyFrame(0.545454562F, 0.0F, _holdThenStepEasingFunction);
00484         // Frame 130.
00485         result.InsertKeyFrame(0.590909064F, 0.0F, _holdThenStepEasingFunction);
00486         // Frame 139.
00487         result.InsertKeyFrame(0.631818175F, 90.0F, _cubicBezierEasingFunction_0);
00488         // Frame 140.
00489         result.InsertKeyFrame(0.636363626F, 0.0F, _holdThenStepEasingFunction);
00490         // Frame 149.
00491         result.InsertKeyFrame(0.677272737F, 90.0F, _cubicBezierEasingFunction_0);
00492         // Frame 150.
00493         result.InsertKeyFrame(0.681818187F, 0.0F, _holdThenStepEasingFunction);
00494         // Frame 160.
00495         result.InsertKeyFrame(0.727272749F, 0.0F, _holdThenStepEasingFunction);
00496         // Frame 170.
00497         result.InsertKeyFrame(0.772727251F, 90.0F, _holdThenStepEasingFunction);
00498         // Frame 179.
00499         result.InsertKeyFrame(0.813636363F, 0.0F, _cubicBezierEasingFunction_0);
00500         // Frame 180.
00501         result.InsertKeyFrame(0.818181813F, 90.0F, _holdThenStepEasingFunction);
00502         return result;
00503     }
00504
00505     // PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff Controls -
00506     // 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 - TreeViewExpand -
00507     // 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 - NormalOffToNormalOn
00508     // Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff Controls - 08 -
00509     // TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 - TreeViewExpand - 07 -
00510     // PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand - 08 -
00511     // PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00512     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00513     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00514     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00515     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00516     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00517     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00518     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00519     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00520     // TreeViewExpand - 18 - PressedOffToNormalOn
00521     // Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00522     // Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00523     // Layer 2
00524     ShapeVisual ShapeVisual_0()
00525     {
00526         const auto result = _c.CreateShapeVisual();
00527         result.Size({ 48.0F, 48.0F });
00528         result.Shapes().Append(ContainerShape());
00529         return result;
00530     }
00531
00532     StepEasingFunction HoldThenStepEasingFunction()
00533     {
00534         const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
00535         result.IsFinalStepSingleFrame(true);
00536         return result;
00537     }
00538
00539     // - - PreComp layer: Controls - 08 - TreeViewExpand - 01 - NormalOnToNormalOff
00540     // Controls - 08 - TreeViewExpand - 02 - NormalOnToPointerOverOn Controls - 08 -
00541     // TreeViewExpand - 03 - NormalOnToPressedOn Controls - 08 - TreeViewExpand - 04 -
00542     // NormalOffToNormalOn Controls - 08 - TreeViewExpand - 05 -NormalOffToPointerOverOff
00543     // Controls - 08 - TreeViewExpand - 06 - NormalOffToPressedOff Controls - 08 -
00544     // TreeViewExpand - 07 - PointerOverOnToPointerOverOff Controls - 08 - TreeViewExpand
00545     // - 08 - PointerOverOnToNormalOn Controls - 08 - TreeViewExpand - 09 -
00546     // PointerOverOnToPressedOn Controls - 08 - TreeViewExpand - 10 -
00547     // PointerOverOffToPointerOverOn Controls - 08 - TreeViewExpand - 11 -
00548     // PointerOverOffToNormalOff Controls - 08 - TreeViewExpand - 12 -
00549     // PointerOverOffToPressedOff Controls - 08 - TreeViewExpand - 13 -
00550     // PressedOnToPressedOff Controls - 08 - TreeViewExpand - 14 -
00551     // PressedOnToPointerOverOff Controls - 08 - TreeViewExpand - 15 -
00552     // PressedOnToNormalOff Controls - 08 - TreeViewExpand - 16 - PressedOffToPressedOn
00553     // Controls - 08 - TreeViewExpand - 17 - PressedOffToPointerOverOn Controls - 08 -
00554     // TreeViewExpand - 18 - PressedOffToNormalOn
00555     // - Shape tree root for layer: Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer
00556     // 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2 Layer 2
00557     // Layer 2
00558     // Offset
00559     Vector2KeyFrameAnimation OffsetVector2Animation()
00560     {
00561         // Frame 0.
00562         const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00563         // Frame 10.
00564         result.InsertKeyFrame(0.0454545468F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
00565         // Frame 30.
00566         result.InsertKeyFrame(0.13636364F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00567         // Frame 40.
00568         result.InsertKeyFrame(0.181818187F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00569         // Frame 45.
00570         result.InsertKeyFrame(0.204545453F, { 24.0F, 30.0F }, CubicBezierEasingFunction_1());
00571         // Frame 59.
00572         result.InsertKeyFrame(0.268181831F, { 24.0F, 24.0F }, CubicBezierEasingFunction_2());
00573         // Frame 60.
00574         result.InsertKeyFrame(0.272727281F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
00575         // Frame 70.
00576         result.InsertKeyFrame(0.318181813F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
00577         // Frame 80.
00578         result.InsertKeyFrame(0.363636374F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00579         // Frame 90.
00580         result.InsertKeyFrame(0.409090906F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
00581         // Frame 100.
00582         result.InsertKeyFrame(0.454545468F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
00583         // Frame 110.
00584         result.InsertKeyFrame(0.5F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00585         // Frame 120.
00586         result.InsertKeyFrame(0.545454562F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
00587         // Frame 130.
00588         result.InsertKeyFrame(0.590909064F, { 24.1709995F, 24.0F }, _holdThenStepEasingFunction);
00589         // Frame 140.
00590         result.InsertKeyFrame(0.636363626F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00591         // Frame 180.
00592         result.InsertKeyFrame(0.818181813F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00593         // Frame 185.
00594         result.InsertKeyFrame(0.840909064F, { 24.0F, 30.0F }, _cubicBezierEasingFunction_1);
00595         // Frame 199.
00596         result.InsertKeyFrame(0.904545426F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
00597         // Frame 200.
00598         result.InsertKeyFrame(0.909090936F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00599         // Frame 205.
00600         result.InsertKeyFrame(0.931818187F, { 24.0F, 30.0F }, _cubicBezierEasingFunction_1);
00601         // Frame 219.
00602         result.InsertKeyFrame(0.99545455F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
00603         return result;
00604     }
00605
00606     static IGeometrySource2D CanvasGeometryToIGeometrySource2D(winrt::com_ptr<CanvasGeometry> geo)
00607     {
00608         return geo.as<IGeometrySource2D>();
00609     }
00610
00611 public:
00612     AnimatedChevronRightDownSmallVisualSource_AnimatedVisual(
00613         Compositor compositor,
00614         CompositionPropertySet themeProperties)
00615         : _c{compositor}
00616         , _themeProperties{themeProperties}
00617         , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
00618     {
00619         winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
00620         const auto _ = Root();
00621     }
00622
00623     void Close()
00624     {
00625         if (_root)
00626         {
00627             _root.Close();
00628         }
00629     }
00630
00631     TimeSpan Duration() const
00632     {
00633         return TimeSpan{ c_durationTicks };
00634     }
00635
00636     Visual RootVisual() const
00637     {
00638         return _root;
00639     }
00640
00641     winrt::float2 Size() const
00642     {
00643         return { 48.0F, 48.0F };
00644     }
00645
00646     static bool IsRuntimeCompatible()
00647     {
00648         return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
00649     }
00650 };
00651
00652 winrt::float4 AnimatedChevronRightDownSmallVisualSource::ColorAsVector4(Color color)
00653 {
00654     return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
00655 }
00656
00657 CompositionPropertySet AnimatedChevronRightDownSmallVisualSource::EnsureThemeProperties(Compositor compositor)
00658 {
00659     if (_themeProperties == nullptr)
00660     {
00661         _themeProperties = compositor.CreatePropertySet();
00662         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00663     }
00664
00665     return _themeProperties;
00666 }
00667
00668 Color AnimatedChevronRightDownSmallVisualSource::Foreground()
00669 {
00670     return _themeForeground;
00671 }
00672
00673 void AnimatedChevronRightDownSmallVisualSource::Foreground(Color value)
00674 {
00675     _themeForeground = value;
00676     if (_themeProperties != nullptr)
00677     {
00678         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00679     }
00680 }
00681
00682 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedChevronRightDownSmallVisualSource::TryCreateAnimatedVisual(
00683     Compositor const& compositor)
00684 {
00685     IInspectable diagnostics = nullptr;
00686     return TryCreateAnimatedVisual(compositor, diagnostics);
00687 }
00688
00689 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedChevronRightDownSmallVisualSource::TryCreateAnimatedVisual(
00690     Compositor const& compositor,
00691     IInspectable& diagnostics)
00692 {
00693     const auto _ = EnsureThemeProperties(compositor);
00694     diagnostics = nullptr;
00695
00696     if (AnimatedChevronRightDownSmallVisualSource_AnimatedVisual::IsRuntimeCompatible())
00697     {
00698         return winrt::make<AnimatedChevronRightDownSmallVisualSource_AnimatedVisual>(
00699             compositor,
00700             _themeProperties);
00701     }
00702
00703     return nullptr;
00704 }
00705
00706 double AnimatedChevronRightDownSmallVisualSource::FrameCount()
00707 {
00708     return 220.0;
00709 }
00710
00711 double AnimatedChevronRightDownSmallVisualSource::Framerate()
00712 {
00713     return 60.0;
00714 }
00715
00716 TimeSpan AnimatedChevronRightDownSmallVisualSource::Duration()
00717 {
00718     return TimeSpan{ 36666666L };
00719 }
00720
00721 double AnimatedChevronRightDownSmallVisualSource::FrameToProgress(double frameNumber)
00722 {
00723     return frameNumber / 220.0;
00724 }
00725
00726 winrt::Windows::Foundation::Collections::IMapView<hstring, double> AnimatedChevronRightDownSmallVisualSource::Markers()
00727 {
00728     return winrt::single_threaded_map<winrt::hstring, double>(
00729         std::map<winrt::hstring, double>
00730         {
00731             { L"NormalOnToNormalOff_Start", 0.0 },
00732             { L"NormalOnToNormalOff_End", 0.0411363636363636 },
00733             { L"NormalOnToPointerOverOn_Start", 0.0456818181818182 },
00734             { L"NormalOnToPointerOverOn_End", 0.0865909090909091 },
00735             { L"NormalOnToPressedOn_Start", 0.0911363636363636 },
00736             { L"NormalOnToPressedOn_End", 0.132045454545455 },
00737             { L"NormalOffToNormalOn_Start", 0.136590909090909 },
00738             { L"NormalOffToNormalOn_End", 0.268409090909091 },
00739             { L"NormalOffToPointerOverOff_Start", 0.272954545454545 },
00740             { L"NormalOffToPointerOverOff_End", 0.313863636363636 },
00741             { L"NormalOffToPressedOff_Start", 0.318409090909091 },
00742             { L"NormalOffToPressedOff_End", 0.359318181818182 },
00743             { L"PointerOverOnToPointerOverOff_Start", 0.363863636363636 },
00744             { L"PointerOverOnToPointerOverOff_End", 0.404772727272727 },
00745             { L"PointerOverOnToNormalOn_Start", 0.409318181818182 },
00746             { L"PointerOverOnToNormalOn_End", 0.450227272727273 },
00747             { L"PointerOverOnToPressedOn_Start", 0.454772727272727 },
00748             { L"PointerOverOnToPressedOn_End", 0.495681818181818 },
00749             { L"PointerOverOffToPointerOverOn_Start", 0.500227272727273 },
00750             { L"PointerOverOffToPointerOverOn_End", 0.541136363636364 },
00751             { L"PointerOverOffToNormalOff_Start", 0.545681818181818 },
00752             { L"PointerOverOffToNormalOff_End", 0.586590909090909 },
00753             { L"PointerOverOffToPressedOff_Start", 0.591136363636364 },
00754             { L"PointerOverOffToPressedOff_End", 0.632045454545455 },
00755             { L"PressedOnToPressedOff_Start", 0.636590909090909 },
00756             { L"PressedOnToPressedOff_End", 0.6775 },
00757             { L"PressedOnToPointerOverOff_Start", 0.682045454545455 },
00758             { L"PressedOnToPointerOverOff_End", 0.722954545454546 },
00759             { L"PressedOnToNormalOff_Start", 0.7275 },
00760             { L"PressedOnToNormalOff_End", 0.768409090909091 },
00761             { L"PressedOffToPressedOn_Start", 0.772954545454546 },
00762             { L"PressedOffToPressedOn_End", 0.813863636363636 },
00763             { L"PressedOffToPointerOverOn_Start", 0.818409090909091 },
00764             { L"PressedOffToPointerOverOn_End", 0.904772727272727 },
00765             { L"PressedOffToNormalOn_Start", 0.909318181818182 },
00766             { L"PressedOffToNormalOn_End", 0.995681818181818 },
00767         }
00768     ).GetView();
00769 }
00770
00771 void AnimatedChevronRightDownSmallVisualSource::SetColorProperty(hstring const& propertyName, Color value)
00772 {
00773     if (propertyName == L"Foreground")
00774     {
00775         _themeForeground = value;
00776     }
00777     else
00778     {
00779         return;
00780     }
00781
00782     if (_themeProperties != nullptr)
00783     {
00784         _themeProperties.InsertVector4(propertyName, ColorAsVector4(value));
00785     }
00786 }
00787
00788 void AnimatedChevronRightDownSmallVisualSource::SetScalarProperty(hstring const&, double)
00789 {
00790 }
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarClosingEventArgs.h Source File

  • File List
  • File Members
  • InfoBar

InfoBarClosingEventArgs.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 #pragma once
00003
00004 #include "InfoBarClosingEventArgs.g.h"
00005
00006 class InfoBarClosingEventArgs :
00007     public ReferenceTracker<InfoBarClosingEventArgs, winrt::implementation::InfoBarClosingEventArgsT, winrt::composable, winrt::composing>
00008 {
00009 public:
00010     winrt::InfoBarCloseReason Reason();
00011     void Reason(const winrt::InfoBarCloseReason& reason);
00012     bool Cancel();
00013     void Cancel(const bool cancel);
00014
00015 private:
00016     winrt::InfoBarCloseReason m_reason{ winrt::InfoBarCloseReason::CloseButton };
00017     bool m_cancel{ false };
00018 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/CommandBarFlyoutCommandBarTemplateSettings.h Source File

  • File List
  • File Members
  • CommandBarFlyout

CommandBarFlyoutCommandBarTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "CommandBarFlyoutCommandBarTemplateSettings.g.h"
00007 #include "CommandBarFlyoutCommandBarTemplateSettings.properties.h"
00008
00009 class CommandBarFlyoutCommandBarTemplateSettings :
00010     public winrt::implementation::CommandBarFlyoutCommandBarTemplateSettingsT<CommandBarFlyoutCommandBarTemplateSettings>,
00011     public CommandBarFlyoutCommandBarTemplateSettingsProperties
00012 {
00013 };
00014
00015 // Not actually a factory since this class is not activatable,
00016 // but XamlMetadataProviderGenerated.h needs this type to exist
00017 // to properly plug into the DP ensure/clear pipeline.
00018 struct CommandBarFlyoutCommandBarTemplateSettingsFactory
00019 {
00020     static void ClearProperties() { CommandBarFlyoutCommandBarTemplateSettings::ClearProperties(); }
00021     static void EnsureProperties() { CommandBarFlyoutCommandBarTemplateSettings::EnsureProperties(); }
00022 };
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollView.h Source File

  • File List
  • File Members
  • ScrollView

ScrollView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollBarController.h"
00007 #include "ScrollViewTrace.h"
00008 #include "ScrollView.g.h"
00009 #include "ScrollView.properties.h"
00010 #include "ScrollViewBringIntoViewOperation.h"
00011
00012 namespace winrt::Windows::UI::ViewManagement
00013 {
00014     struct UISettingsAutoHideScrollBarsChangedEventArgs;
00015 };
00016
00017 class ScrollView :
00018     public ReferenceTracker<ScrollView, winrt::implementation::ScrollViewT>,
00019     public ScrollViewProperties
00020 {
00021 public:
00022     ScrollView();
00023     ~ScrollView();
00024
00025     // Properties' default values.
00026     static const winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility s_defaultHorizontalScrollBarVisibility{ winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility::Auto };
00027     static const winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility s_defaultVerticalScrollBarVisibility{ winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollBarVisibility::Auto };
00028     static const winrt::ScrollingChainMode s_defaultHorizontalScrollChainMode{ winrt::ScrollingChainMode::Auto };
00029     static const winrt::ScrollingChainMode s_defaultVerticalScrollChainMode{ winrt::ScrollingChainMode::Auto };
00030     static const winrt::ScrollingRailMode s_defaultHorizontalScrollRailMode{ winrt::ScrollingRailMode::Enabled };
00031     static const winrt::ScrollingRailMode s_defaultVerticalScrollRailMode{ winrt::ScrollingRailMode::Enabled };
00032     static const winrt::Visibility s_defaultComputedHorizontalScrollBarVisibility{ winrt::Visibility::Collapsed };
00033     static const winrt::Visibility s_defaultComputedVerticalScrollBarVisibility{ winrt::Visibility::Collapsed };
00034     static const winrt::ScrollingScrollMode s_defaultHorizontalScrollMode{ winrt::ScrollingScrollMode::Auto };
00035     static const winrt::ScrollingScrollMode s_defaultVerticalScrollMode{ winrt::ScrollingScrollMode::Auto };
00036     static const winrt::ScrollingScrollMode s_defaultComputedHorizontalScrollMode{ winrt::ScrollingScrollMode::Disabled };
00037     static const winrt::ScrollingScrollMode s_defaultComputedVerticalScrollMode{ winrt::ScrollingScrollMode::Disabled };
00038     static const int32_t s_noOpCorrelationId;
00039     static const winrt::ScrollingChainMode s_defaultZoomChainMode{ winrt::ScrollingChainMode::Auto };
00040     static const winrt::ScrollingZoomMode s_defaultZoomMode{ winrt::ScrollingZoomMode::Disabled };
00041     static const winrt::ScrollingInputKinds s_defaultIgnoredInputKinds{ winrt::ScrollingInputKinds::None };
00042     static const winrt::ScrollingContentOrientation s_defaultContentOrientation{ winrt::ScrollingContentOrientation::Vertical };
00043     static constexpr double s_defaultMinZoomFactor{ 0.1 };
00044     static constexpr double s_defaultMaxZoomFactor{ 10.0 };
00045     static constexpr bool s_defaultAnchorAtExtent{ true };
00046     static constexpr double s_defaultAnchorRatio{ 0.0 };
00047
00048 #pragma region IScrollView
00049
00050     winrt::UIElement CurrentAnchor();
00051     winrt::ScrollPresenter ScrollPresenter() const;
00052     winrt::CompositionPropertySet ExpressionAnimationSources();
00053
00054     double HorizontalOffset();
00055     double VerticalOffset();
00056     float ZoomFactor();
00057     double ExtentWidth();
00058     double ExtentHeight();
00059     double ViewportWidth();
00060     double ViewportHeight();
00061     double ScrollableWidth();
00062     double ScrollableHeight();
00063
00064     winrt::ScrollingInteractionState State();
00065
00066     winrt::ScrollingInputKinds IgnoredInputKinds();
00067     void IgnoredInputKinds(winrt::ScrollingInputKinds const& value);
00068
00069     void RegisterAnchorCandidate(winrt::UIElement const& element);
00070     void UnregisterAnchorCandidate(winrt::UIElement const& element);
00071
00072     int32_t ScrollTo(double horizontalOffset, double verticalOffset);
00073     int32_t ScrollTo(double horizontalOffset, double verticalOffset, winrt::ScrollingScrollOptions const& options);
00074     int32_t ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta);
00075     int32_t ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta, winrt::ScrollingScrollOptions const& options);
00076     int32_t AddScrollVelocity(winrt::float2 offsetsVelocity, winrt::IReference<winrt::float2> inertiaDecayRate);
00077     int32_t ZoomTo(float zoomFactor, winrt::IReference<winrt::float2> centerPoint);
00078     int32_t ZoomTo(float zoomFactor, winrt::IReference<winrt::float2> centerPoint, winrt::ScrollingZoomOptions const& options);
00079     int32_t ZoomBy(float zoomFactorDelta, winrt::IReference<winrt::float2> centerPoint);
00080     int32_t ZoomBy(float zoomFactorDelta, winrt::IReference<winrt::float2> centerPoint, winrt::ScrollingZoomOptions const& options);
00081     int32_t AddZoomVelocity(float zoomFactorVelocity, winrt::IReference<winrt::float2> centerPoint, winrt::IReference<float> inertiaDecayRate);
00082 #pragma endregion
00083
00084     // Invoked by ScrollViewTestHooks
00085     void ScrollControllersAutoHidingChangedDbg();
00086
00087     static void ValidateAnchorRatio(double value);
00088     static void ValidateZoomFactoryBoundary(double value);
00089
00090     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00091
00092 #ifdef DBG
00093     static winrt::hstring DependencyPropertyToString(const winrt::IDependencyProperty& dependencyProperty);
00094 #endif
00095
00096 public:
00097 #pragma region IFrameworkElementOverrides
00098     // unoverridden methods provided by FrameworkElementOverridesHelper
00099     void OnApplyTemplate(); // not actually final for 'derived' classes
00100 #pragma endregion
00101
00102 #pragma region IControlOverrides
00103     void OnGotFocus(winrt::RoutedEventArgs const& args);
00104     void OnKeyDown(winrt::KeyRoutedEventArgs const& args);
00105 #pragma endregion
00106
00107 private:
00108     void OnScrollViewGettingFocus(
00109         const winrt::IInspectable& sender,
00110         const winrt::GettingFocusEventArgs& args);
00111     void OnScrollViewIsEnabledChanged(
00112         const winrt::IInspectable& sender,
00113         const winrt::DependencyPropertyChangedEventArgs& args);
00114     void OnScrollViewUnloaded(
00115         const winrt::IInspectable& sender,
00116         const winrt::RoutedEventArgs& args);
00117     void OnScrollViewPointerEntered(
00118         const winrt::IInspectable& sender,
00119         const winrt::PointerRoutedEventArgs& args);
00120     void OnScrollViewPointerMoved(
00121         const winrt::IInspectable& sender,
00122         const winrt::PointerRoutedEventArgs& args);
00123     void OnScrollViewPointerExited(
00124         const winrt::IInspectable& sender,
00125         const winrt::PointerRoutedEventArgs& args);
00126     void OnScrollViewPointerPressed(
00127         const winrt::IInspectable& sender,
00128         const winrt::PointerRoutedEventArgs& args);
00129     void OnScrollViewPointerReleased(
00130         const winrt::IInspectable& sender,
00131         const winrt::PointerRoutedEventArgs& args);
00132     void OnScrollViewPointerCanceled(
00133         const winrt::IInspectable& sender,
00134         const winrt::PointerRoutedEventArgs& args);
00135
00136     void OnHorizontalScrollControllerPointerEntered(
00137         const winrt::IInspectable& sender,
00138         const winrt::PointerRoutedEventArgs& args);
00139     void OnHorizontalScrollControllerPointerExited(
00140         const winrt::IInspectable& sender,
00141         const winrt::PointerRoutedEventArgs& args);
00142     void OnVerticalScrollControllerPointerEntered(
00143         const winrt::IInspectable& sender,
00144         const winrt::PointerRoutedEventArgs& args);
00145     void OnVerticalScrollControllerPointerExited(
00146         const winrt::IInspectable& sender,
00147         const winrt::PointerRoutedEventArgs& args);
00148     void OnNoIndicatorStateStoryboardCompleted(
00149         const winrt::IInspectable& sender,
00150         const winrt::IInspectable& args);
00151     void OnIndicatorStateStoryboardCompleted(
00152         const winrt::IInspectable& sender,
00153         const winrt::IInspectable& args);
00154     void OnScrollControllerCanScrollChanged(
00155         const winrt::IScrollController& sender,
00156         const winrt::IInspectable& args);
00157     void OnScrollControllerIsScrollingWithMouseChanged(
00158         const winrt::IScrollController& sender,
00159         const winrt::IInspectable& args);
00160     void OnHideIndicatorsTimerTick(
00161         const winrt::IInspectable& sender,
00162         const winrt::IInspectable& args);
00163     void OnAutoHideScrollBarsChanged(
00164         winrt::UISettings const& uiSettings,
00165         winrt::UISettingsAutoHideScrollBarsChangedEventArgs const& args);
00166     // Internal event handlers
00167     void OnScrollPresenterExtentChanged(
00168         const winrt::IInspectable& sender,
00169         const winrt::IInspectable& args);
00170     void OnScrollPresenterStateChanged(
00171         const winrt::IInspectable& sender,
00172         const winrt::IInspectable& args);
00173     void OnScrollAnimationStarting(
00174         const winrt::IInspectable& sender,
00175         const winrt::ScrollingScrollAnimationStartingEventArgs& args);
00176     void OnZoomAnimationStarting(
00177         const winrt::IInspectable& sender,
00178         const winrt::ScrollingZoomAnimationStartingEventArgs& args);
00179     void OnScrollPresenterScrollStarting(
00180         const winrt::IInspectable& sender,
00181         const winrt::ScrollingScrollStartingEventArgs& args);
00182     void OnScrollPresenterZoomStarting(
00183         const winrt::IInspectable& sender,
00184         const winrt::ScrollingZoomStartingEventArgs& args);
00185     void OnScrollPresenterViewChanged(
00186         const winrt::IInspectable& sender,
00187         const winrt::IInspectable& args);
00188     void OnScrollPresenterPropertyChanged(
00189         const winrt::DependencyObject& sender,
00190         const winrt::DependencyProperty& args);
00191     void OnScrollPresenterScrollCompleted(
00192         const winrt::IInspectable& sender,
00193         const winrt::ScrollingScrollCompletedEventArgs& args);
00194     void OnScrollPresenterZoomCompleted(
00195         const winrt::IInspectable& sender,
00196         const winrt::ScrollingZoomCompletedEventArgs& args);
00197     void OnScrollPresenterBringingIntoView(
00198         const winrt::IInspectable& sender,
00199         const winrt::ScrollingBringingIntoViewEventArgs& args);
00200     void OnScrollPresenterAnchorRequested(
00201         const winrt::IInspectable& sender,
00202         const winrt::ScrollingAnchorRequestedEventArgs& args);
00203     void OnCompositionTargetRendering(
00204         const winrt::IInspectable& sender,
00205         const winrt::IInspectable& args);
00206
00207     void ResetHideIndicatorsTimer(bool restart = false);
00208
00209     void HookUISettingsEvent();
00210     void HookCompositionTargetRendering();
00211     void UnhookCompositionTargetRendering();
00212     void HookScrollViewEvents();
00213     void UnhookScrollViewEvents();
00214     void HookScrollPresenterEvents();
00215     void UnhookScrollPresenterEvents(bool isForDestructor);
00216     void HookHorizontalScrollControllerEvents();
00217     void UnhookHorizontalScrollControllerEvents(bool isForDestructor);
00218     void HookVerticalScrollControllerEvents();
00219     void UnhookVerticalScrollControllerEvents(bool isForDestructor);
00220
00221     void UpdateScrollPresenter(const winrt::ScrollPresenter& scrollPresenter);
00222     void UpdateHorizontalScrollController(
00223         const winrt::IScrollController& horizontalScrollController,
00224         const winrt::IUIElement& horizontalScrollControllerElement);
00225     void UpdateVerticalScrollController(
00226         const winrt::IScrollController& verticalScrollController,
00227         const winrt::IUIElement& verticalScrollControllerElement);
00228     void UpdateScrollControllersSeparator(const winrt::IUIElement& scrollControllersSeparator);
00229     void UpdateScrollPresenterHorizontalScrollController(const winrt::IScrollController& horizontalScrollController);
00230     void UpdateScrollPresenterVerticalScrollController(const winrt::IScrollController& verticalScrollController);
00231     void UpdateScrollControllersVisibility(bool horizontalChange, bool verticalChange);
00232
00233     bool IsInputKindIgnored(winrt::ScrollingInputKinds const& inputKind);
00234
00235     bool AreAllScrollControllersCollapsed(bool useSafeGet = false) const;
00236     bool AreBothScrollControllersVisible() const;
00237     bool AreScrollControllersAutoHiding();
00238     bool IsScrollControllersSeparatorVisible() const;
00239     void HideIndicators(bool useTransitions = true, bool useSafeGet = false);
00240     void HideIndicatorsAfterDelay();
00241     void UpdateScrollControllersAutoHiding(bool forceUpdate = false);
00242     void UpdateVisualStates(
00243         bool useTransitions = true,
00244         bool showIndicators = false,
00245         bool hideIndicators = false,
00246         bool scrollControllersAutoHidingChanged = false,
00247         bool updateScrollControllersAutoHiding = false,
00248         bool onlyForAutoHidingScrollControllers = false);
00249     void UpdateScrollControllersVisualState(bool useTransitions = true, bool showIndicators = false, bool hideIndicators = false);
00250     void UpdateScrollControllersSeparatorVisualState(bool useTransitions = true, bool scrollControllersAutoHidingChanged = false);
00251     void GoToState(std::wstring_view const& stateName, bool useTransitions = true);
00252
00253     void HandleKeyDownForStandardScroll(winrt::KeyRoutedEventArgs);
00254     void HandleKeyDownForXYNavigation(winrt::KeyRoutedEventArgs);
00255
00256     void HandleScrollControllerPointerEntered(
00257         bool isForHorizontalScrollController);
00258     void HandleScrollControllerPointerExited(
00259         bool isForHorizontalScrollController);
00260
00261     bool DoScrollForKey(winrt::VirtualKey key, double scrollProportion);
00262     void DoScroll(double offsetAmount, winrt::Orientation orientation);
00263
00264     bool CanScrollDown();
00265     bool CanScrollUp();
00266     bool CanScrollRight();
00267     bool CanScrollLeft();
00268     bool CanScrollVerticallyInDirection(bool inPositiveDirection);
00269     bool CanScrollHorizontallyInDirection(bool inPositiveDirection);
00270     bool CanScrollInDirection(winrt::FocusNavigationDirection drection);
00271
00272     winrt::DependencyObject GetNextFocusCandidate(winrt::FocusNavigationDirection direction, bool isPageNavigation);
00273
00274     static constexpr std::wstring_view s_rootPartName{ L"PART_Root"sv };
00275     static constexpr std::wstring_view s_scrollPresenterPartName{ L"PART_ScrollPresenter"sv };
00276     static constexpr std::wstring_view s_horizontalScrollBarPartName{ L"PART_HorizontalScrollBar"sv };
00277     static constexpr std::wstring_view s_verticalScrollBarPartName{ L"PART_VerticalScrollBar"sv };
00278     static constexpr std::wstring_view s_scrollBarsSeparatorPartName{ L"PART_ScrollBarsSeparator"sv };
00279     static constexpr std::wstring_view s_IScrollAnchorProviderNotImpl{ L"Template part named PART_ScrollPresenter does not implement IScrollAnchorProvider."sv };
00280     static constexpr std::wstring_view s_noScrollPresenterPart{ L"No template part named PART_ScrollPresenter was loaded."sv };
00281
00282     winrt::com_ptr<ScrollBarController> m_horizontalScrollBarController{ nullptr };
00283     winrt::com_ptr<ScrollBarController> m_verticalScrollBarController{ nullptr };
00284
00285     tracker_ref<winrt::IScrollController> m_horizontalScrollController{ this };
00286     tracker_ref<winrt::IScrollController> m_verticalScrollController{ this };
00287     tracker_ref<winrt::IUIElement> m_horizontalScrollControllerElement{ this };
00288     tracker_ref<winrt::IUIElement> m_verticalScrollControllerElement{ this };
00289     tracker_ref<winrt::IUIElement> m_scrollControllersSeparatorElement{ this };
00290     tracker_ref<winrt::IScrollPresenter> m_scrollPresenter{ this };
00291
00292     winrt::DispatcherTimer m_hideIndicatorsTimer{ nullptr };
00293
00294     // Event Tokens
00295     winrt::event_token m_gettingFocusToken{};
00296     winrt::event_token m_isEnabledChangedToken{};
00297     winrt::event_token m_unloadedToken{};
00298
00299     winrt::event_token m_scrollPresenterExtentChangedToken{};
00300     winrt::event_token m_scrollPresenterStateChangedToken{};
00301     winrt::event_token m_scrollPresenterScrollAnimationStartingToken{};
00302     winrt::event_token m_scrollPresenterZoomAnimationStartingToken{};
00303     winrt::event_token m_scrollPresenterScrollStartingToken{};
00304     winrt::event_token m_scrollPresenterZoomStartingToken{};
00305     winrt::event_token m_scrollPresenterViewChangedToken{};
00306     winrt::event_token m_scrollPresenterScrollCompletedToken{};
00307     winrt::event_token m_scrollPresenterZoomCompletedToken{};
00308     winrt::event_token m_scrollPresenterBringingIntoViewToken{};
00309     winrt::event_token m_scrollPresenterAnchorRequestedToken{};
00310     winrt::event_token m_scrollPresenterComputedHorizontalScrollModeChangedToken{};
00311     winrt::event_token m_scrollPresenterComputedVerticalScrollModeChangedToken{};
00312
00313     winrt::event_token m_horizontalScrollControllerCanScrollChangedToken{};
00314     winrt::event_token m_verticalScrollControllerCanScrollChangedToken{};
00315
00316     winrt::event_token m_horizontalScrollControllerIsScrollingWithMouseChangedToken{};
00317     winrt::event_token m_verticalScrollControllerIsScrollingWithMouseChangedToken{};
00318
00319     winrt::Microsoft::UI::Xaml::Media::CompositionTarget::Rendering_revoker m_renderingToken{};
00320
00321     winrt::IInspectable m_onPointerEnteredEventHandler{ nullptr };
00322     winrt::IInspectable m_onPointerMovedEventHandler{ nullptr };
00323     winrt::IInspectable m_onPointerExitedEventHandler{ nullptr };
00324     winrt::IInspectable m_onPointerPressedEventHandler{ nullptr };
00325     winrt::IInspectable m_onPointerReleasedEventHandler{ nullptr };
00326     winrt::IInspectable m_onPointerCanceledEventHandler{ nullptr };
00327
00328     winrt::IInspectable m_onHorizontalScrollControllerPointerEnteredHandler{ nullptr };
00329     winrt::IInspectable m_onHorizontalScrollControllerPointerExitedHandler{ nullptr };
00330     winrt::IInspectable m_onVerticalScrollControllerPointerEnteredHandler{ nullptr };
00331     winrt::IInspectable m_onVerticalScrollControllerPointerExitedHandler{ nullptr };
00332
00333     winrt::FocusInputDeviceKind m_focusInputDeviceKind{ winrt::FocusInputDeviceKind::None };
00334
00335     // Used to detect changes for UISettings.AutoHideScrollBars
00336     struct AutoHideScrollBarsState; // type erasure for lightup compilation
00337     static std::unique_ptr<AutoHideScrollBarsState> MakeAutoHideScrollBarsState();
00338     std::unique_ptr<AutoHideScrollBarsState> m_autoHideScrollBarsState = MakeAutoHideScrollBarsState();
00339
00340     bool m_autoHideScrollControllersValid{ false };
00341     bool m_autoHideScrollControllers{ false };
00342
00343     bool m_isLeftMouseButtonPressedForFocus{ false };
00344
00345     // Set to True when the mouse scrolling indicators are currently showing.
00346     bool m_showingMouseIndicators{ false };
00347
00348     // Set to True to prevent the normal fade-out of the scrolling indicators.
00349     bool m_keepIndicatorsShowing{ false };
00350
00351     // Set to True to favor mouse indicators over panning indicators for the scroll controllers.
00352     bool m_preferMouseIndicators{ false };
00353
00354     // Indicates whether the NoIndicator visual state has a Storyboard for which a completion event was hooked up.
00355     bool m_hasNoIndicatorStateStoryboardCompletedHandler{ false };
00356
00357     // Set to the values of IScrollController::IsScrollingWithMouse.
00358     bool m_isHorizontalScrollControllerScrollingWithMouse{ false };
00359     bool m_isVerticalScrollControllerScrollingWithMouse{ false };
00360
00361     // Set to True when the pointer is over the optional scroll controllers.
00362     bool m_isPointerOverHorizontalScrollController{ false };
00363     bool m_isPointerOverVerticalScrollController{ false };
00364
00365     int m_verticalAddScrollVelocityDirection{ 0 };
00366     int32_t m_verticalAddScrollVelocityOffsetChangeCorrelationId{ -1 };
00367
00368     int m_horizontalAddScrollVelocityDirection{ 0 };
00369     int32_t m_horizontalAddScrollVelocityOffsetChangeCorrelationId{ -1 };
00370
00371     // List of temporary ScrollViewBringIntoViewOperation instances used to track expected
00372     // ScrollPresenter::BringingIntoView occurrences due to navigation.
00373     std::list<std::shared_ptr<ScrollViewBringIntoViewOperation>> m_bringIntoViewOperations;
00374
00375     // Private constants
00376     // 2 seconds delay used to hide the indicators for example when OS animations are turned off.
00377     static constexpr int64_t s_noIndicatorCountdown = 2000 * 10000;
00378
00379     static constexpr std::wstring_view s_noIndicatorStateName{ L"NoIndicator"sv };
00380     static constexpr std::wstring_view s_touchIndicatorStateName{ L"TouchIndicator"sv };
00381     static constexpr std::wstring_view s_mouseIndicatorStateName{ L"MouseIndicator"sv };
00382
00383     static constexpr std::wstring_view s_scrollBarsSeparatorExpanded{ L"ScrollBarsSeparatorExpanded"sv };
00384     static constexpr std::wstring_view s_scrollBarsSeparatorCollapsed{ L"ScrollBarsSeparatorCollapsed"sv };
00385     static constexpr std::wstring_view s_scrollBarsSeparatorCollapsedDisabled{ L"ScrollBarsSeparatorCollapsedDisabled"sv };
00386     static constexpr std::wstring_view s_scrollBarsSeparatorCollapsedWithoutAnimation{ L"ScrollBarsSeparatorCollapsedWithoutAnimation"sv };
00387     static constexpr std::wstring_view s_scrollBarsSeparatorDisplayedWithoutAnimation{ L"ScrollBarsSeparatorDisplayedWithoutAnimation"sv };
00388     static constexpr std::wstring_view s_scrollBarsSeparatorExpandedWithoutAnimation{ L"ScrollBarsSeparatorExpandedWithoutAnimation"sv };
00389 };
00390
00391 extern template void std::default_delete<ScrollView::AutoHideScrollBarsState>::operator()(ScrollView::AutoHideScrollBarsState*) const noexcept;
00392 extern template void std::default_delete<const ScrollView::AutoHideScrollBarsState>::operator()(const ScrollView::AutoHideScrollBarsState*) const noexcept;
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarRangeBasePage Member List

This is the complete list of members for AnnotatedScrollBarRangeBasePage, including all inherited members.
adapter | AnnotatedScrollBarRangeBasePage | [private]
AnnotatedScrollBar_DetailLabelRequested(object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args) | AnnotatedScrollBarRangeBasePage | [inline]
AnnotatedScrollBarRangeBasePage() | AnnotatedScrollBarRangeBasePage | [inline]
AnnotatedScrollBarRangeBasePage_Loaded(object sender, RoutedEventArgs e) | AnnotatedScrollBarRangeBasePage | [inline, private]
GetOffsetLabel(double offset) | AnnotatedScrollBarRangeBasePage | [inline, private]
GetOffsetOfItem(int itemNumber) | AnnotatedScrollBarRangeBasePage | [inline, private]
GetSquareColor(int squareNum) | AnnotatedScrollBarRangeBasePage | [inline, private]
LabelCollection | AnnotatedScrollBarRangeBasePage |
MOCK_GetItemsPerRow() | AnnotatedScrollBarRangeBasePage | [inline, private]
MOCK_GetStaticRowHeight() | AnnotatedScrollBarRangeBasePage | [inline, private]
PopulateLabels() | AnnotatedScrollBarRangeBasePage | [inline, private]
PopulateSquares(int rows) | AnnotatedScrollBarRangeBasePage | [inline, private]
SquareCollection | AnnotatedScrollBarRangeBasePage |
~AnnotatedScrollBarRangeBasePage() | AnnotatedScrollBarRangeBasePage | [inline, private]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ExpanderTests Member List

This is the complete list of members for ExpanderTests, including all inherited members.
AutomationPeerTest() | ExpanderTests | [inline]
ClassInitialize(TestContext testContext) | ExpanderTests | [inline, static]
ExpandCollapseAutomationTests() | ExpanderTests | [inline]
TestCleanup() | ExpanderTests | [inline]
VerifyAxeScanPasses() | ExpanderTests | [inline]
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TopModeTests Member List

This is the complete list of members for TopModeTests, including all inherited members.
ClassInitialize(TestContext testContext) | TopModeTests | [inline, static]
ClickClearSelectionButton() | NavigationViewTestsBase | [inline, protected]
ClickOnNavigationViewItemChevron(UIObject nvi) | TopModeTests | [inline, private]
ComboBoxName enum name | NavigationViewTestsBase | [protected]
compact | NavigationViewTestsBase | [protected]
ControlHeight enum name | NavigationViewTestsBase | [protected]
ControlWidth enum name | NavigationViewTestsBase | [protected]
EnsureNavViewClosed() | NavigationViewTestsBase | [inline, protected]
EnsurePaneHeaderCanBeModifiedHelper(RegressionTestType navviewMode) | NavigationViewTestsBase | [inline, protected]
expanded | NavigationViewTestsBase | [protected]
GetTopNavigationItems(TopNavPosition position) | NavigationViewTestsBase | [inline, protected]
InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement(string expectedKeyTipTargetElementId) | NavigationViewTestsBase | [inline, protected]
InvokeOverflowButton() | NavigationViewTestsBase | [inline, protected]
IsItemInTopNavPrimaryList(string text) | NavigationViewTestsBase | [inline, protected]
minimal | NavigationViewTestsBase | [protected]
OpenOverflowMenuAndInvokeItem(string itemName) | NavigationViewTestsBase | [inline, protected]
PaneOpenCloseTestCaseRetry(int retryNumber, Action action) | NavigationViewTestsBase | [inline, protected]
PaneOpenStatus enum name | NavigationViewTestsBase | [protected]
SetNavViewHeight(ControlHeight height) | NavigationViewTestsBase | [inline, protected]
SetNavViewWidth(ControlWidth width) | NavigationViewTestsBase | [inline, protected]
SetThreshold(Threshold threshold, ComboBoxName name) | NavigationViewTestsBase | [inline, protected]
TestCleanup() | NavigationViewTestsBase | [inline]
Threshold enum name | NavigationViewTestsBase | [protected]
TopNavigationChevronClickTest() | TopModeTests | [inline]
TopNavigationHaveCorrectSelectionWhenChangingMenuItems() | TopModeTests | [inline]
TopNavigationItemsAccessibilitySetTest() | TopModeTests | [inline]
TopNavigationMenuItemTemplateBindingTest() | TopModeTests | [inline]
TopNavigationOverflowButtonClickTest() | TopModeTests | [inline]
TopNavigationOverflowButtonTest() | TopModeTests | [inline]
TopNavigationOverflowWidthLongNavItemTest() | TopModeTests | [inline]
TopNavigationSecondClickOnSuppressSelectionItemTest() | TopModeTests | [inline]
TopNavigationSelectionTest() | TopModeTests | [inline]
TopNavigationSetSelectedItemToNullInItemInvoke() | TopModeTests | [inline]
TopNavigationWithAccessKeysTest() | TopModeTests | [inline]
TopNavigationWithHierarchyOverflowButtonClickTest() | TopModeTests | [inline]
TopNavPosition enum name | NavigationViewTestsBase | [protected]
TopPaddingTest() | TopModeTests | [inline]
UIObjectContains(UIObject uIObject, string itemName) | NavigationViewTestsBase | [inline, protected]
UIObjectToString(UIObject uIObject) | NavigationViewTestsBase | [inline, protected]
VerifyBackAndCloseButtonsVisibility(bool inLeftMinimalPanelDisplayMode) | NavigationViewTestsBase | [inline, protected]
VerifyMoreButtonIsOnlyReadOnce() | TopModeTests | [inline]
VerifyNavigationViewContentChangeOnTopNavImpactsLayout() | TopModeTests | [inline]
VerifyOverflowButtonIsCollapsedWhenOverflowMenuIsEmpty() | TopModeTests | [inline]
VerifyOverflowMenuCornerRadius() | TopModeTests | [inline]
VerifyTopNavigationItemFocusVisualKindRevealTest() | TopModeTests | [inline]
VerifyTopNavigationMinimalVisualStateOnTopNav() | TopModeTests | [inline]
WaitAndAssertPaneStatus(PaneOpenStatus status) | NavigationViewTestsBase | [inline, protected]
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingControlAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

RatingControlAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RatingControlAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RatingControlAutomationPeer)
00012 }
00013
00014 #include "RatingControlAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/APITests/MapControlTests.cs Source File

  • File List
  • File Members
  • MapControl
  • APITests

MapControlTests.cs

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using System.Collections.Generic;
00007 using Microsoft.UI.Xaml.Controls;
00008 using MUXControlsTestApp.Utilities;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00015 {
00016
00017     [TestClass]
00018     public class MapControlTests : ApiTestBase
00019     {
00020
00021     }
00022 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBar.h Source File

  • File List
  • File Members
  • TitleBar

TitleBar.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "TitleBar.g.h"
00010 #include "TitleBar.properties.h"
00011
00012 class TitleBar :
00013     public ReferenceTracker<TitleBar, winrt::implementation::TitleBarT>,
00014     public TitleBarProperties
00015 {
00016
00017 public:
00018     TitleBar();
00019     virtual ~TitleBar();
00020
00021     // IFrameworkElement
00022     void OnApplyTemplate();
00023
00024     // UIElement
00025     winrt::AutomationPeer OnCreateAutomationPeer();
00026
00027     void OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00028
00029
00030 private:
00031     void UpdatePadding();
00032     void UpdateIcon();
00033     void UpdateBackButton();
00034     void UpdatePaneToggleButton();
00035     void UpdateHeight();
00036     void UpdateTheme();
00037     void UpdateTitle();
00038     void UpdateSubtitle();
00039     void UpdateHeader();
00040     void UpdateContent();
00041     void UpdateFooter();
00042     void UpdateDragRegion();
00043     void UpdateInteractableElementsList();
00044     void UpdateHeaderSpacing();
00045
00046     void OnInputActivationChanged(const winrt::InputActivationListener& sender, const winrt::InputActivationListenerActivationChangedEventArgs& args);
00047     void OnBackButtonClick(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00048     void OnPaneToggleButtonClick(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args);
00049     void OnSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00050     void OnLayoutUpdated(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00051
00052     void LoadBackButton();
00053     void LoadPaneToggleButton();
00054
00055     winrt::event_token m_inputActivationChangedToken{};
00056     winrt::Button::Click_revoker m_backButtonClickRevoker{};
00057     winrt::Button::Click_revoker m_paneToggleButtonClickRevoker{};
00058     winrt::FrameworkElement::ActualThemeChanged_revoker m_actualThemeChangedRevoker{};
00059     winrt::FrameworkElement::SizeChanged_revoker m_contentChangedRevoker{};
00060
00061     std::list<winrt::FrameworkElement> m_interactableElementsList{};
00062     winrt::InputActivationListener m_inputActivationListener = nullptr;
00063
00064     tracker_ref<winrt::ColumnDefinition> m_leftPaddingColumn{ this };
00065     tracker_ref<winrt::ColumnDefinition> m_rightPaddingColumn{ this };
00066     tracker_ref<winrt::Button> m_backButton{ this };
00067     tracker_ref<winrt::Button> m_paneToggleButton{ this };
00068     tracker_ref<winrt::TextBlock> m_titleTextBlock{ this };
00069     tracker_ref<winrt::TextBlock> m_subtitleTextBlock{ this };
00070     tracker_ref<winrt::Grid> m_contentAreaGrid{ this };
00071     tracker_ref<winrt::FrameworkElement> m_headerArea{ this };
00072     tracker_ref<winrt::FrameworkElement> m_contentArea{ this };
00073     tracker_ref<winrt::FrameworkElement> m_footerArea{ this };
00074
00075     double m_compactModeThresholdWidth{ 0.0 };
00076
00077     static constexpr std::wstring_view s_leftPaddingColumnName{ L"LeftPaddingColumn"sv };
00078     static constexpr std::wstring_view s_rightPaddingColumnName{ L"RightPaddingColumn"sv };
00079     static constexpr std::wstring_view s_layoutRootPartName{ L"PART_LayoutRoot"sv };
00080     static constexpr std::wstring_view s_backButtonPartName{ L"PART_BackButton"sv };
00081     static constexpr std::wstring_view s_paneToggleButtonPartName{ L"PART_PaneToggleButton"sv };
00082     static constexpr std::wstring_view s_headerContentPresenterPartName{ L"PART_HeaderContentPresenter"sv };
00083     static constexpr std::wstring_view s_contentPresenterGridPartName{ L"PART_ContentPresenterGrid"sv };
00084     static constexpr std::wstring_view s_contentPresenterPartName{ L"PART_ContentPresenter"sv };
00085     static constexpr std::wstring_view s_footerPresenterPartName{ L"PART_FooterContentPresenter"sv };
00086
00087     static constexpr std::wstring_view s_compactVisualStateName{ L"Compact"sv };
00088     static constexpr std::wstring_view s_expandedVisualStateName{ L"Expanded"sv };
00089     static constexpr std::wstring_view s_compactHeightVisualStateName{ L"CompactHeight"sv };
00090     static constexpr std::wstring_view s_expandedHeightVisualStateName{ L"ExpandedHeight"sv };
00091     static constexpr std::wstring_view s_defaultSpacingVisualStateName{ L"DefaultSpacing"sv };
00092     static constexpr std::wstring_view s_negativeInsetVisualStateName{ L"NegativeInsetSpacing"sv };
00093     static constexpr std::wstring_view s_iconVisibleVisualStateName{ L"IconVisible"sv };
00094     static constexpr std::wstring_view s_iconCollapsedVisualStateName{ L"IconCollapsed"sv };
00095     static constexpr std::wstring_view s_iconDeactivatedVisualStateName{ L"IconDeactivated"sv };
00096     static constexpr std::wstring_view s_backButtonVisibleVisualStateName{ L"BackButtonVisible"sv };
00097     static constexpr std::wstring_view s_backButtonCollapsedVisualStateName{ L"BackButtonCollapsed"sv };
00098     static constexpr std::wstring_view s_backButtonDeactivatedVisualStateName{ L"BackButtonDeactivated"sv };
00099     static constexpr std::wstring_view s_paneToggleButtonVisibleVisualStateName{ L"PaneToggleButtonVisible"sv };
00100     static constexpr std::wstring_view s_paneToggleButtonCollapsedVisualStateName{ L"PaneToggleButtonCollapsed"sv };
00101     static constexpr std::wstring_view s_paneToggleButtonDeactivatedVisualStateName{ L"PaneToggleButtonDeactivated"sv };
00102     static constexpr std::wstring_view s_titleTextVisibleVisualStateName{ L"TitleTextVisible"sv };
00103     static constexpr std::wstring_view s_titleTextCollapsedVisualStateName{ L"TitleTextCollapsed"sv };
00104     static constexpr std::wstring_view s_titleTextDeactivatedVisualStateName{ L"TitleTextDeactivated"sv };
00105     static constexpr std::wstring_view s_subtitleTextVisibleVisualStateName{ L"SubtitleTextVisible"sv };
00106     static constexpr std::wstring_view s_subtitleTextCollapsedVisualStateName{ L"SubtitleTextCollapsed"sv };
00107     static constexpr std::wstring_view s_subtitleTextDeactivatedVisualStateName{ L"SubtitleTextDeactivated"sv };
00108     static constexpr std::wstring_view s_headerVisibleVisualStateName{ L"HeaderVisible"sv };
00109     static constexpr std::wstring_view s_headerCollapsedVisualStateName{ L"HeaderCollapsed"sv };
00110     static constexpr std::wstring_view s_headerDeactivatedVisualStateName{ L"HeaderDeactivated"sv };
00111     static constexpr std::wstring_view s_contentVisibleVisualStateName{ L"ContentVisible"sv };
00112     static constexpr std::wstring_view s_contentCollapsedVisualStateName{ L"ContentCollapsed"sv };
00113     static constexpr std::wstring_view s_contentDeactivatedVisualStateName{ L"ContentDeactivated"sv };
00114     static constexpr std::wstring_view s_footerVisibleVisualStateName{ L"FooterVisible"sv };
00115     static constexpr std::wstring_view s_footerCollapsedVisualStateName{ L"FooterCollapsed"sv };
00116     static constexpr std::wstring_view s_footerDeactivatedVisualStateName{ L"FooterDeactivated"sv };
00117
00118     static constexpr std::wstring_view s_titleBarButtonForegroundColorName{ L"TitleBarButtonForegroundColor"sv };
00119     static constexpr std::wstring_view s_titleBarButtonBackgroundColorName{ L"TitleBarButtonBackgroundColor"sv };
00120     static constexpr std::wstring_view s_titleBarButtonHoverForegroundColorName{ L"TitleBarButtonHoverForegroundColor"sv };
00121     static constexpr std::wstring_view s_titleBarButtonHoverBackgroundColorName{ L"TitleBarButtonHoverBackgroundColor"sv };
00122     static constexpr std::wstring_view s_titleBarButtonPressedForegroundColorName{ L"TitleBarButtonPressedForegroundColor"sv };
00123     static constexpr std::wstring_view s_titleBarButtonPressedBackgroundColorName{ L"TitleBarButtonPressedBackgroundColor"sv };
00124     static constexpr std::wstring_view s_titleBarButtonInactiveForegroundColorName{ L"TitleBarButtonInactiveForegroundColor"sv };
00125 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBarTemplateSettingsProperties Member List

This is the complete list of members for TitleBarTemplateSettingsProperties, including all inherited members.
ClearProperties() | TitleBarTemplateSettingsProperties | [static]
EnsureProperties() | TitleBarTemplateSettingsProperties | [static]
IconElement(winrt::IconElement const &value) | TitleBarTemplateSettingsProperties |
IconElement() | TitleBarTemplateSettingsProperties |
IconElementProperty() | TitleBarTemplateSettingsProperties | [inline, static]
s_IconElementProperty | TitleBarTemplateSettingsProperties | [static]
TitleBarTemplateSettingsProperties() | TitleBarTemplateSettingsProperties |
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/InteractionTrackerOwner.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

InteractionTrackerOwner.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "InteractionTrackerOwner.h"
00007 #include "ScrollPresenter.h"
00008
00009 InteractionTrackerOwner::InteractionTrackerOwner(const winrt::ScrollPresenter& scrollPresenter)
00010 {
00011     SCROLLPRESENTER_TRACE_VERBOSE(scrollPresenter, TRACE_MSG_METH_PTR, METH_NAME, this, scrollPresenter);
00012
00013     m_owner = scrollPresenter;
00014 }
00015
00016 InteractionTrackerOwner::~InteractionTrackerOwner()
00017 {
00018     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00019
00020     m_owner = nullptr;
00021 }
00022
00023 #pragma region IInteractionTrackerOwner
00024 void InteractionTrackerOwner::ValuesChanged(
00025     const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerValuesChangedArgs& args)
00026 {
00027     if (!m_owner)
00028     {
00029         return;
00030     }
00031
00032     if (auto rawOwner = m_owner.get())
00033     {
00034         auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
00035         if (scrollPresenter)
00036         {
00037             scrollPresenter->ValuesChanged(args);
00038         }
00039     }
00040 }
00041
00042 void InteractionTrackerOwner::RequestIgnored(
00043     const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerRequestIgnoredArgs& args)
00044 {
00045     if (!m_owner)
00046     {
00047         return;
00048     }
00049
00050     if (auto rawOwner = m_owner.get())
00051     {
00052         auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
00053         if (scrollPresenter)
00054         {
00055             scrollPresenter->RequestIgnored(args);
00056         }
00057     }
00058 }
00059
00060 void InteractionTrackerOwner::InteractingStateEntered(
00061     const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerInteractingStateEnteredArgs& args)
00062 {
00063     if (!m_owner)
00064     {
00065         return;
00066     }
00067
00068     if (auto rawOwner = m_owner.get())
00069     {
00070         auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
00071         if (scrollPresenter)
00072         {
00073             scrollPresenter->InteractingStateEntered(args);
00074         }
00075     }
00076 }
00077
00078 void InteractionTrackerOwner::InertiaStateEntered(
00079     const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerInertiaStateEnteredArgs& args)
00080 {
00081     if (!m_owner)
00082     {
00083         return;
00084     }
00085
00086     if (auto rawOwner = m_owner.get())
00087     {
00088         auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
00089         if (scrollPresenter)
00090         {
00091             scrollPresenter->InertiaStateEntered(args);
00092         }
00093     }
00094 }
00095
00096 void InteractionTrackerOwner::IdleStateEntered(
00097     const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerIdleStateEnteredArgs& args)
00098 {
00099     if (!m_owner)
00100     {
00101         return;
00102     }
00103
00104     if (auto rawOwner = m_owner.get())
00105     {
00106         auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
00107         if (scrollPresenter)
00108         {
00109             scrollPresenter->IdleStateEntered(args);
00110         }
00111     }
00112 }
00113
00114 void InteractionTrackerOwner::CustomAnimationStateEntered(
00115     const winrt::InteractionTracker& /*sender*/, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs& args)
00116 {
00117     if (!m_owner)
00118     {
00119         return;
00120     }
00121
00122     if (auto rawOwner = m_owner.get())
00123     {
00124         auto scrollPresenter = winrt::get_self<ScrollPresenter>(rawOwner);
00125         if (scrollPresenter)
00126         {
00127             scrollPresenter->CustomAnimationStateEntered(args);
00128         }
00129     }
00130 }
00131 #pragma endregion
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlProperties Member List

This is the complete list of members for PagerControlProperties, including all inherited members.
ButtonPanelAlwaysShowFirstLastPageIndex(bool value) | PagerControlProperties |
ButtonPanelAlwaysShowFirstLastPageIndex() | PagerControlProperties |
ButtonPanelAlwaysShowFirstLastPageIndexProperty() | PagerControlProperties | [inline, static]
ClearProperties() | PagerControlProperties | [static]
DisplayMode(winrt::PagerControlDisplayMode const &value) | PagerControlProperties |
DisplayMode() | PagerControlProperties |
DisplayModeProperty() | PagerControlProperties | [inline, static]
EnsureProperties() | PagerControlProperties | [static]
FirstButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
FirstButtonCommand() | PagerControlProperties |
FirstButtonCommandProperty() | PagerControlProperties | [inline, static]
FirstButtonStyle(winrt::Style const &value) | PagerControlProperties |
FirstButtonStyle() | PagerControlProperties |
FirstButtonStyleProperty() | PagerControlProperties | [inline, static]
FirstButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
FirstButtonVisibility() | PagerControlProperties |
FirstButtonVisibilityProperty() | PagerControlProperties | [inline, static]
LastButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
LastButtonCommand() | PagerControlProperties |
LastButtonCommandProperty() | PagerControlProperties | [inline, static]
LastButtonStyle(winrt::Style const &value) | PagerControlProperties |
LastButtonStyle() | PagerControlProperties |
LastButtonStyleProperty() | PagerControlProperties | [inline, static]
LastButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
LastButtonVisibility() | PagerControlProperties |
LastButtonVisibilityProperty() | PagerControlProperties | [inline, static]
m_selectedIndexChangedEventSource | PagerControlProperties |
NextButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
NextButtonCommand() | PagerControlProperties |
NextButtonCommandProperty() | PagerControlProperties | [inline, static]
NextButtonStyle(winrt::Style const &value) | PagerControlProperties |
NextButtonStyle() | PagerControlProperties |
NextButtonStyleProperty() | PagerControlProperties | [inline, static]
NextButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
NextButtonVisibility() | PagerControlProperties |
NextButtonVisibilityProperty() | PagerControlProperties | [inline, static]
NumberOfPages(int value) | PagerControlProperties |
NumberOfPages() | PagerControlProperties |
NumberOfPagesProperty() | PagerControlProperties | [inline, static]
OnButtonPanelAlwaysShowFirstLastPageIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnDisplayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnFirstButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnFirstButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnFirstButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnLastButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnLastButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnLastButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNextButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNextButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNextButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnNumberOfPagesPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPagerInputCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPrefixTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPreviousButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPreviousButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnPreviousButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnSelectedPageIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnSuffixTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PagerControlProperties | [static]
PagerControlProperties() | PagerControlProperties |
PagerInputCommand(winrt::ICommand const &value) | PagerControlProperties |
PagerInputCommand() | PagerControlProperties |
PagerInputCommandProperty() | PagerControlProperties | [inline, static]
PrefixText(winrt::hstring const &value) | PagerControlProperties |
PrefixText() | PagerControlProperties |
PrefixTextProperty() | PagerControlProperties | [inline, static]
PreviousButtonCommand(winrt::ICommand const &value) | PagerControlProperties |
PreviousButtonCommand() | PagerControlProperties |
PreviousButtonCommandProperty() | PagerControlProperties | [inline, static]
PreviousButtonStyle(winrt::Style const &value) | PagerControlProperties |
PreviousButtonStyle() | PagerControlProperties |
PreviousButtonStyleProperty() | PagerControlProperties | [inline, static]
PreviousButtonVisibility(winrt::PagerControlButtonVisibility const &value) | PagerControlProperties |
PreviousButtonVisibility() | PagerControlProperties |
PreviousButtonVisibilityProperty() | PagerControlProperties | [inline, static]
s_ButtonPanelAlwaysShowFirstLastPageIndexProperty | PagerControlProperties | [static]
s_DisplayModeProperty | PagerControlProperties | [static]
s_FirstButtonCommandProperty | PagerControlProperties | [static]
s_FirstButtonStyleProperty | PagerControlProperties | [static]
s_FirstButtonVisibilityProperty | PagerControlProperties | [static]
s_LastButtonCommandProperty | PagerControlProperties | [static]
s_LastButtonStyleProperty | PagerControlProperties | [static]
s_LastButtonVisibilityProperty | PagerControlProperties | [static]
s_NextButtonCommandProperty | PagerControlProperties | [static]
s_NextButtonStyleProperty | PagerControlProperties | [static]
s_NextButtonVisibilityProperty | PagerControlProperties | [static]
s_NumberOfPagesProperty | PagerControlProperties | [static]
s_PagerInputCommandProperty | PagerControlProperties | [static]
s_PrefixTextProperty | PagerControlProperties | [static]
s_PreviousButtonCommandProperty | PagerControlProperties | [static]
s_PreviousButtonStyleProperty | PagerControlProperties | [static]
s_PreviousButtonVisibilityProperty | PagerControlProperties | [static]
s_SelectedPageIndexProperty | PagerControlProperties | [static]
s_SuffixTextProperty | PagerControlProperties | [static]
s_TemplateSettingsProperty | PagerControlProperties | [static]
SelectedIndexChanged(winrt::TypedEventHandler< winrt::PagerControl, winrt::PagerControlSelectedIndexChangedEventArgs > const &value) | PagerControlProperties |
SelectedIndexChanged(winrt::event_token const &token) | PagerControlProperties |
SelectedPageIndex(int value) | PagerControlProperties |
SelectedPageIndex() | PagerControlProperties |
SelectedPageIndexProperty() | PagerControlProperties | [inline, static]
SuffixText(winrt::hstring const &value) | PagerControlProperties |
SuffixText() | PagerControlProperties |
SuffixTextProperty() | PagerControlProperties | [inline, static]
TemplateSettings(winrt::PagerControlTemplateSettings const &value) | PagerControlProperties |
TemplateSettings() | PagerControlProperties |
TemplateSettingsProperty() | PagerControlProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewInfoBadge.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewInfoBadge.xaml.cs

Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.IO;
00004 using System.Linq;
00005 using System.Runtime.InteropServices.WindowsRuntime;
00006 using Windows.Foundation;
00007 using Windows.Foundation.Collections;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Data;
00012 using Microsoft.UI.Xaml.Input;
00013 using Microsoft.UI.Xaml.Media;
00014 using Microsoft.UI.Xaml.Navigation;
00015
00016 // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
00017
00018 namespace MUXControlsTestApp
00019 {
00020     /// <summary>
00021     /// An empty page that can be used on its own or navigated to within a Frame.
00022     /// </summary>
00023     public sealed partial class NavigationViewInfoBadgeTestPage : TestPage
00024     {
00025         public NavigationViewInfoBadgeTestPage()
00026         {
00027             this.InitializeComponent();
00028         }
00029
00030         private void FlipOrientationButton_Clicked(object sender, RoutedEventArgs e)
00031         {
00032             NavView.PaneDisplayMode = NavView.PaneDisplayMode == Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Top ? Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Auto : Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Top;
00033         }
00034     }
00035 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterAutomationPeer Member List

This is the complete list of members for ScrollPresenterAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
CheckThread() | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ScrollPresenterAutomationPeer > &&self) noexcept | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
final_release(std::unique_ptr< ScrollPresenterAutomationPeer > &&self) | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline, static]
get_HorizontallyScrollableImpl() | ScrollPresenterAutomationPeer | [private]
get_HorizontalScrollPercentImpl() | ScrollPresenterAutomationPeer | [private]
get_HorizontalViewSizeImpl() | ScrollPresenterAutomationPeer | [private]
get_VerticallyScrollableImpl() | ScrollPresenterAutomationPeer | [private]
get_VerticalScrollPercentImpl() | ScrollPresenterAutomationPeer | [private]
get_VerticalViewSizeImpl() | ScrollPresenterAutomationPeer | [private]
GetAutomationControlTypeCore() | ScrollPresenterAutomationPeer |
GetBase() | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
GetInner() | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
GetPatternCore(winrt::PatternInterface const &patternInterface) | ScrollPresenterAutomationPeer |
GetPatternCoreImpl(winrt::PatternInterface patternInterface) | ScrollPresenterAutomationPeer | [private]
GetScrollPercent(double zoomedExtent, double viewport, double offset) | ScrollPresenterAutomationPeer | [private, static]
GetScrollPresenter() | ScrollPresenterAutomationPeer | [private]
GetViewPercent(double zoomedExtent, double viewport) | ScrollPresenterAutomationPeer | [private, static]
HorizontallyScrollable() | ScrollPresenterAutomationPeer |
HorizontalScrollPercent() | ScrollPresenterAutomationPeer |
HorizontalViewSize() | ScrollPresenterAutomationPeer |
IsOnThread() | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider > | [inline]
s_maximumPercent | ScrollPresenterAutomationPeer | [private, static]
s_minimumPercent | ScrollPresenterAutomationPeer | [private, static]
s_noScroll | ScrollPresenterAutomationPeer | [private, static]
Scroll(winrt::ScrollAmount const &horizontalAmount, winrt::ScrollAmount const &verticalAmount) | ScrollPresenterAutomationPeer |
ScrollPresenterAutomationPeer(winrt::ScrollPresenter const &owner) | ScrollPresenterAutomationPeer |
SetScrollPercent(double horizontalPercent, double verticalPercent) | ScrollPresenterAutomationPeer |
UpdateScrollPatternProperties() | ScrollPresenterAutomationPeer |
VerticallyScrollable() | ScrollPresenterAutomationPeer |
VerticalScrollPercent() | ScrollPresenterAutomationPeer |
VerticalViewSize() | ScrollPresenterAutomationPeer |
~ScrollPresenterAutomationPeer() | ScrollPresenterAutomationPeer | [inline]
Generated on Sun Dec 1 2024 20:53:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommandBarCenterPage Member List

This is the complete list of members for CommandBarCenterPage, including all inherited members.
CommandBarCenterPage() CommandBarCenterPage [inline]
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemContainer/TestUI/ItemContainerLayoutPage.xaml.cs Source File

  • File List
  • File Members
  • ItemContainer
  • TestUI

ItemContainerLayoutPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Controls;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public sealed partial class ItemContainerLayoutPage : TestPage
00018     {
00019         public ItemContainerLayoutPage()
00020         {
00021             this.InitializeComponent();
00022             this.Loaded += ItemContainerLayoutPage_Loaded;
00023         }
00024
00025         private void ItemContainerLayoutPage_Loaded(object sender, RoutedEventArgs e)
00026         {
00027             // Workaround for xaml parsing error crash: Bug 41701000
00028             itemContainer3.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
00029             itemContainer4.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
00030             itemContainer13.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
00031             itemContainer14.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
00032             itemContainer23.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
00033             itemContainer24.MultiSelectMode = ItemContainerMultiSelectMode.Multiple;
00034         }
00035     }
00036 }
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ComboBoxTests Member List

This is the complete list of members for ComboBoxTests, including all inherited members.
SetupComboBox(bool useContent=true) | ComboBoxTests | [inline, private]
VerifyComboBoxEditModeCornerRadius() | ComboBoxTests | [inline]
VerifyComboBoxOverlayCornerRadius() | ComboBoxTests | [inline]
VerifyVisualTree() | ComboBoxTests | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemAutomationPeer Member List

This is the complete list of members for TreeViewItemAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
AddToSelection() | TreeViewItemAutomationPeer |
CheckThread() | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
Collapse() | TreeViewItemAutomationPeer |
DeleteInstanceOnUIThread(std::unique_ptr< TreeViewItemAutomationPeer > &&self) noexcept | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
Expand() | TreeViewItemAutomationPeer |
ExpandCollapseState() | TreeViewItemAutomationPeer |
final_release(std::unique_ptr< TreeViewItemAutomationPeer > &&self) | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline, static]
GetAutomationControlTypeCore() | TreeViewItemAutomationPeer |
GetBase() | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
GetClassNameCore() | TreeViewItemAutomationPeer |
GetInner() | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
GetLevelCore() | TreeViewItemAutomationPeer |
GetNameCore() | TreeViewItemAutomationPeer |
GetParentListView() | TreeViewItemAutomationPeer | [private]
GetParentTreeView() | TreeViewItemAutomationPeer | [private]
GetPatternCore(winrt::PatternInterface const &patternInterface) | TreeViewItemAutomationPeer |
GetPositionInSetCore() | TreeViewItemAutomationPeer |
GetSizeOfSetCore() | TreeViewItemAutomationPeer |
GetTreeViewNode() | TreeViewItemAutomationPeer | [private]
IsOnThread() | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
IsSelected() | TreeViewItemAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
RaiseExpandCollapseAutomationEvent(winrt::ExpandCollapseState newState) | TreeViewItemAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< TreeViewItemAutomationPeer, winrt::implementation::TreeViewItemAutomationPeerT, winrt::ISelectionItemProvider > | [inline]
RemoveFromSelection() | TreeViewItemAutomationPeer |
Select() | TreeViewItemAutomationPeer |
SelectionContainer() | TreeViewItemAutomationPeer |
TreeViewItemAutomationPeer(winrt::TreeViewItem const &owner) | TreeViewItemAutomationPeer |
UpdateSelection(bool select) | TreeViewItemAutomationPeer | [private]
Generated on Sun Dec 1 2024 20:53:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CompositionScrollController::OperationInfo Member List

This is the complete list of members for CompositionScrollController::OperationInfo, including all inherited members.
CorrelationId | CompositionScrollController::OperationInfo |
OffsetTarget | CompositionScrollController::OperationInfo |
OperationInfo(int correlationId, double relativeOffsetChange, double offsetTarget) | CompositionScrollController::OperationInfo | [inline]
RelativeOffsetChange | CompositionScrollController::OperationInfo |
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RecyclePool Member List

This is the complete list of members for RecyclePool, including all inherited members.
abi_enter() | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
ClearProperties() | RecyclePool | [static]
DeleteInstanceOnUIThread(std::unique_ptr< RecyclePool > &&self) noexcept | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline, static]
EnsureOwnerIsPanelOrNull(const winrt::UIElement &owner) | RecyclePool | [private]
EnsureProperties() | RecyclePool | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
final_release(std::unique_ptr< RecyclePool > &&self) | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
GetInner() | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
GetOriginTemplate(winrt::UIElement const &element) | RecyclePool | [static]
GetPoolInstance(winrt::DataTemplate const &dataTemplate) | RecyclePool | [static]
GetReuseKey(winrt::UIElement const &element) | RecyclePool | [static]
GetRuntimeClassName() const | RecyclePool | [inline]
IsOnThread() | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
m_elements | RecyclePool | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
PoolInstanceProperty() | RecyclePool | [inline, static]
PutElement(winrt::UIElement const &element, winrt::hstring const &key) | RecyclePool |
PutElement(winrt::UIElement const &element, winrt::hstring const &key, winrt::UIElement const &owner) | RecyclePool |
PutElementCore(winrt::UIElement const &element, winrt::hstring const &key, winrt::UIElement const &owner) | RecyclePool |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
RecyclePool() | RecyclePool |
ReferenceTracker(Args &&...args) | ReferenceTracker< RecyclePool, winrt::implementation::RecyclePoolT, winrt::composing > | [inline]
ReuseKeyProperty() | RecyclePool | [inline, static]
s_originTemplateProperty | RecyclePool | [private, static]
s_PoolInstanceProperty | RecyclePool | [private, static]
s_reuseKeyProperty | RecyclePool | [private, static]
SetOriginTemplate(winrt::UIElement const &element, winrt::DataTemplate const &value) | RecyclePool | [static]
SetPoolInstance(winrt::DataTemplate const &dataTemplate, winrt::RecyclePool const &recyclePool) | RecyclePool | [static]
SetReuseKey(winrt::UIElement const &element, winrt::hstring const &value) | RecyclePool | [static]
TryGetElement(winrt::hstring const &key) | RecyclePool |
TryGetElement(winrt::hstring const &key, winrt::UIElement const &owner) | RecyclePool |
TryGetElementCore(winrt::hstring const &key, winrt::UIElement const &owner) | RecyclePool |
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VisualPropertiesPage Member List

This is the complete list of members for VisualPropertiesPage, including all inherited members.
BackgroundPropertyComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | VisualPropertiesPage | [inline, private]
ForegroundPropertyComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | VisualPropertiesPage | [inline, private]
InitializeSampleTreeView() | VisualPropertiesPage | [inline, private]
SetControlStackPanelBackground(SolidColorBrush color) | VisualPropertiesPage | [inline, private]
SetControlStackPanelForeground(SolidColorBrush color) | VisualPropertiesPage | [inline, private]
ShowDialog_Click(object sender, RoutedEventArgs e) | VisualPropertiesPage | [inline, private]
treeViewFolder | VisualPropertiesPage | [private]
VisualPropertiesPage() | VisualPropertiesPage | [inline]
VisualPropertiesPage_Loaded(object sender, RoutedEventArgs e) | VisualPropertiesPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MyCommand Member List

This is the complete list of members for MyCommand, including all inherited members.
_canExecute | MyCommand | [private]
_parentPage | MyCommand | [private]
CanExecute(object o) | MyCommand | [inline]
CanExecuteChanged | MyCommand |
Execute(object o) | MyCommand | [inline]
MyCommand() | MyCommand | [inline]
MyCommand(SplitButtonPage parentPage) | MyCommand | [inline]
UpdateCanExecute(bool canExecute) | MyCommand | [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: LayoutPanel/LayoutPanel.idl Source File

  • File List
  • File Members
  • LayoutPanel

LayoutPanel.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PREVIEW]
00005 [webhosthidden]
00006 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00007 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00008 unsealed runtimeclass LayoutPanel : Microsoft.UI.Xaml.Controls.Panel
00009 {
00010     LayoutPanel();
00011
00012     Layout Layout{ get; set; };
00013     static Microsoft.UI.Xaml.DependencyProperty LayoutProperty{ get; };
00014
00015     Microsoft.UI.Xaml.Media.Brush BorderBrush{ get; set; };
00016     static Microsoft.UI.Xaml.DependencyProperty BorderBrushProperty{ get; };
00017
00018     Microsoft.UI.Xaml.Thickness BorderThickness{ get; set; };
00019     static Microsoft.UI.Xaml.DependencyProperty BorderThicknessProperty{ get; };
00020
00021     Microsoft.UI.Xaml.Thickness Padding{ get; set; };
00022     static Microsoft.UI.Xaml.DependencyProperty PaddingProperty{ get; };
00023
00024     Microsoft.UI.Xaml.CornerRadius CornerRadius{ get; set; };
00025     static Microsoft.UI.Xaml.DependencyProperty CornerRadiusProperty{ get; };
00026 }
00027
00028 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedVisualPlayerTests Member List

This is the complete list of members for AnimatedVisualPlayerTests, including all inherited members.
AccessibilityTest() | AnimatedVisualPlayerTests | [inline]
AroundTheEndAnimationTest() | AnimatedVisualPlayerTests | [inline, private]
Button(string name) | AnimatedVisualPlayerTests | [private, static]
ClassInitialize(TestContext testContext) | AnimatedVisualPlayerTests | [inline, static]
ClickWaitAndVerifyText(Button clickTarget, Edit edit, string expectedValue,[global::System.Runtime.CompilerServices.CallerMemberName] string testName="") | AnimatedVisualPlayerTests | [inline, private]
Edit(string name) | AnimatedVisualPlayerTests | [private, static]
FallenBackTest() | AnimatedVisualPlayerTests | [inline, private]
FromOneKeyframeAnimationTest() | AnimatedVisualPlayerTests | [inline, private]
HittestingTest() | AnimatedVisualPlayerTests | [inline, private]
ReverseNegativePlaybackRateAnimationTest() | AnimatedVisualPlayerTests | [inline, private]
ReversePositivePlaybackRateAnimationTest() | AnimatedVisualPlayerTests | [inline, private]
SettingAnimationOptimizationDoesNotCrash() | AnimatedVisualPlayerTests | [inline]
TestCleanup() | AnimatedVisualPlayerTests | [inline]
ToZeroKeyframeAnimationTest() | AnimatedVisualPlayerTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PinterestLayoutSamplePage Member List

This is the complete list of members for PinterestLayoutSamplePage, including all inherited members.
_lorem | PinterestLayoutSamplePage | [private]
BringIntoView_Click(object sender, RoutedEventArgs e) | PinterestLayoutSamplePage | [inline, private]
BringIntoView_Click(object sender, RoutedEventArgs e) | PinterestLayoutSamplePage | [inline, private]
PinterestLayoutSamplePage() | PinterestLayoutSamplePage | [inline]
PinterestLayoutSamplePage() | PinterestLayoutSamplePage | [inline]
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BiDirectionalScrollControllerScrollingScrollCompletedEventArgs Member List

This is the complete list of members for BiDirectionalScrollControllerScrollingScrollCompletedEventArgs, including all inherited members.
BiDirectionalScrollControllerScrollingScrollCompletedEventArgs(int offsetsChangeCorrelationId) | BiDirectionalScrollControllerScrollingScrollCompletedEventArgs | [inline, private]
OffsetsChangeCorrelationId | BiDirectionalScrollControllerScrollingScrollCompletedEventArgs |
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsFocusTestPageElements Member List

This is the complete list of members for RadioButtonsFocusTestPageElements, including all inherited members.
FocusedIndexTextBlock1 | RadioButtonsFocusTestPageElements | [private]
FocusedIndexTextBlock2 | RadioButtonsFocusTestPageElements | [private]
GetElement< T >(ref T element, string elementName) | RadioButtonsFocusTestPageElements | [inline, private]
GetFocusedIndexTextBlock1() | RadioButtonsFocusTestPageElements | [inline]
GetFocusedIndexTextBlock2() | RadioButtonsFocusTestPageElements | [inline]
GetIndexToSelectTextBox1() | RadioButtonsFocusTestPageElements | [inline]
GetIndexToSelectTextBox2() | RadioButtonsFocusTestPageElements | [inline]
GetRadioButtons1HasFocusCheckBox() | RadioButtonsFocusTestPageElements | [inline]
GetRadioButtons2HasFocusCheckBox() | RadioButtonsFocusTestPageElements | [inline]
GetSelectByIndexButton1() | RadioButtonsFocusTestPageElements | [inline]
GetSelectByIndexButton2() | RadioButtonsFocusTestPageElements | [inline]
GetSelectedIndexTextBlock1() | RadioButtonsFocusTestPageElements | [inline]
GetSelectedIndexTextBlock2() | RadioButtonsFocusTestPageElements | [inline]
GetTestRadioButtons1() | RadioButtonsFocusTestPageElements | [inline]
GetTestRadioButtons2() | RadioButtonsFocusTestPageElements | [inline]
IndexToSelectTextBox1 | RadioButtonsFocusTestPageElements | [private]
IndexToSelectTextBox2 | RadioButtonsFocusTestPageElements | [private]
RadioButtons1HasFocusCheckBox | RadioButtonsFocusTestPageElements | [private]
RadioButtons2HasFocusCheckBox | RadioButtonsFocusTestPageElements | [private]
SelectByIndexButton | RadioButtonsFocusTestPageElements | [private]
SelectByIndexButton2 | RadioButtonsFocusTestPageElements | [private]
SelectedIndexTextBlock1 | RadioButtonsFocusTestPageElements | [private]
SelectedIndexTextBlock2 | RadioButtonsFocusTestPageElements | [private]
TestRadioButtons1 | RadioButtonsFocusTestPageElements | [private]
TestRadioButtons2 | RadioButtonsFocusTestPageElements | [private]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemCollapsedEventArgs Member List

This is the complete list of members for NavigationViewItemCollapsedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
CollapsedItem() | NavigationViewItemCollapsedEventArgs |
CollapsedItemContainer() | NavigationViewItemCollapsedEventArgs |
CollapsedItemContainer(winrt::NavigationViewItemBase const &value) | NavigationViewItemCollapsedEventArgs |
DeleteInstanceOnUIThread(std::unique_ptr< NavigationViewItemCollapsedEventArgs > &&self) noexcept | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< NavigationViewItemCollapsedEventArgs > &&self) | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
NavigationViewItemCollapsedEventArgs(const winrt::NavigationView &navigationView) | NavigationViewItemCollapsedEventArgs |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable > | [inline]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BiDirectionalScrollController::UniScrollController Member List

This is the complete list of members for BiDirectionalScrollController::UniScrollController, including all inherited members.
AddScrollVelocityRequested | BiDirectionalScrollController::UniScrollController |
CanScroll | BiDirectionalScrollController::UniScrollController |
CanScrollChanged | BiDirectionalScrollController::UniScrollController |
GetScrollAnimation(int correlationId, Vector2 startPosition, Vector2 endPosition, CompositionAnimation defaultAnimation) | BiDirectionalScrollController::UniScrollController | [inline]
IsRailEnabled | BiDirectionalScrollController::UniScrollController | [private]
IsScrollable | BiDirectionalScrollController::UniScrollController | [private]
IsScrollingWithMouse | BiDirectionalScrollController::UniScrollController |
IsScrollingWithMouseChanged | BiDirectionalScrollController::UniScrollController |
MaxOffset | BiDirectionalScrollController::UniScrollController | [private]
MinOffset | BiDirectionalScrollController::UniScrollController | [private]
NotifyRequestedScrollCompleted(int correlationId) | BiDirectionalScrollController::UniScrollController | [inline]
Offset | BiDirectionalScrollController::UniScrollController | [private]
Orientation | BiDirectionalScrollController::UniScrollController | [private]
Owner | BiDirectionalScrollController::UniScrollController | [private]
PanningInfo | BiDirectionalScrollController::UniScrollController |
panningInfo | BiDirectionalScrollController::UniScrollController | [private]
RaiseAddScrollVelocityRequested(float offsetVelocity, float?inertiaDecayRate) | BiDirectionalScrollController::UniScrollController | [inline, private]
RaiseCanScrollChanged() | BiDirectionalScrollController::UniScrollController | [inline, private]
RaiseIsScrollingWithMouseChanged() | BiDirectionalScrollController::UniScrollController | [inline, private]
RaiseLogMessage(string message) | BiDirectionalScrollController::UniScrollController | [inline, private]
RaisePanRequested(PointerPoint pointerPoint) | BiDirectionalScrollController::UniScrollController | [inline, private]
RaiseScrollByRequested(double offsetDelta, ScrollingAnimationMode animationMode) | BiDirectionalScrollController::UniScrollController | [inline, private]
RaiseScrollToRequested(double offset, ScrollingAnimationMode animationMode) | BiDirectionalScrollController::UniScrollController | [inline, private]
ScrollByRequested | BiDirectionalScrollController::UniScrollController |
ScrollCompleted | BiDirectionalScrollController::UniScrollController |
ScrollToRequested | BiDirectionalScrollController::UniScrollController |
SetIsScrollable(bool isScrollable) | BiDirectionalScrollController::UniScrollController | [inline]
SetPanningFrameworkElement(FrameworkElement value) | BiDirectionalScrollController::UniScrollController | [inline, private]
SetValues(double minOffset, double maxOffset, double offset, double viewportLength) | BiDirectionalScrollController::UniScrollController | [inline]
UniScrollController(BiDirectionalScrollController owner, Orientation orientation) | BiDirectionalScrollController::UniScrollController | [inline]
UpdateCanScroll() | BiDirectionalScrollController::UniScrollController | [inline, private]
UpdatePanningFrameworkElementLength() | BiDirectionalScrollController::UniScrollController | [inline, private]
ViewportLength | BiDirectionalScrollController::UniScrollController | [private]
Generated on Sun Dec 1 2024 20:54:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

LinedFlowLayoutProperties Member List

This is the complete list of members for LinedFlowLayoutProperties, including all inherited members.
ActualLineHeight(double value) | LinedFlowLayoutProperties |
ActualLineHeight() | LinedFlowLayoutProperties |
ActualLineHeightProperty() | LinedFlowLayoutProperties | [inline, static]
ClearProperties() | LinedFlowLayoutProperties | [static]
EnsureProperties() | LinedFlowLayoutProperties | [static]
ItemsInfoRequested(winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::LinedFlowLayoutItemsInfoRequestedEventArgs > const &value) | LinedFlowLayoutProperties |
ItemsInfoRequested(winrt::event_token const &token) | LinedFlowLayoutProperties |
ItemsJustification(winrt::LinedFlowLayoutItemsJustification const &value) | LinedFlowLayoutProperties |
ItemsJustification() | LinedFlowLayoutProperties |
ItemsJustificationProperty() | LinedFlowLayoutProperties | [inline, static]
ItemsStretch(winrt::LinedFlowLayoutItemsStretch const &value) | LinedFlowLayoutProperties |
ItemsStretch() | LinedFlowLayoutProperties |
ItemsStretchProperty() | LinedFlowLayoutProperties | [inline, static]
ItemsUnlocked(winrt::TypedEventHandler< winrt::LinedFlowLayout, winrt::IInspectable > const &value) | LinedFlowLayoutProperties |
ItemsUnlocked(winrt::event_token const &token) | LinedFlowLayoutProperties |
LinedFlowLayoutProperties() | LinedFlowLayoutProperties |
LineHeight(double value) | LinedFlowLayoutProperties |
LineHeight() | LinedFlowLayoutProperties |
LineHeightProperty() | LinedFlowLayoutProperties | [inline, static]
LineSpacing(double value) | LinedFlowLayoutProperties |
LineSpacing() | LinedFlowLayoutProperties |
LineSpacingProperty() | LinedFlowLayoutProperties | [inline, static]
m_itemsInfoRequestedEventSource | LinedFlowLayoutProperties |
m_itemsUnlockedEventSource | LinedFlowLayoutProperties |
MinItemSpacing(double value) | LinedFlowLayoutProperties |
MinItemSpacing() | LinedFlowLayoutProperties |
MinItemSpacingProperty() | LinedFlowLayoutProperties | [inline, static]
OnActualLineHeightPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LinedFlowLayoutProperties | [static]
OnItemsJustificationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LinedFlowLayoutProperties | [static]
OnItemsStretchPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LinedFlowLayoutProperties | [static]
OnLineHeightPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LinedFlowLayoutProperties | [static]
OnLineSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LinedFlowLayoutProperties | [static]
OnMinItemSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | LinedFlowLayoutProperties | [static]
s_ActualLineHeightProperty | LinedFlowLayoutProperties | [static]
s_ItemsJustificationProperty | LinedFlowLayoutProperties | [static]
s_ItemsStretchProperty | LinedFlowLayoutProperties | [static]
s_LineHeightProperty | LinedFlowLayoutProperties | [static]
s_LineSpacingProperty | LinedFlowLayoutProperties | [static]
s_MinItemSpacingProperty | LinedFlowLayoutProperties | [static]
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterPrimitives.idl Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterPrimitives.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XCP_NAMESPACE
00002 {
00003
00004 #ifdef ApplicableRangeType
00005 [MUX_PREVIEW]
00006 [webhosthidden]
00007 enum SnapPointApplicableRangeType
00008 {
00009     Mandatory = 0,
00010     Optional = 1,
00011 };
00012 #endif
00013
00014 [MUX_PUBLIC_V5]
00015 [webhosthidden]
00016 enum ScrollSnapPointsAlignment
00017 {
00018     Near = 0,
00019     Center = 1,
00020     Far = 2,
00021 };
00022
00023 [MUX_PUBLIC_V5]
00024 [webhosthidden]
00025 [marshaling_behavior(agile)]
00026 [threading(both)]
00027 unsealed runtimeclass SnapPointBase
00028 {
00029 #ifdef ApplicableRangeType
00030     [MUX_PREVIEW]
00031     Double ApplicableRange { get; };
00032 #endif
00033 }
00034
00035 [MUX_PUBLIC_V5]
00036 [webhosthidden]
00037 [marshaling_behavior(agile)]
00038 [threading(both)]
00039 unsealed runtimeclass ScrollSnapPointBase
00040     : SnapPointBase
00041 {
00042     ScrollSnapPointsAlignment Alignment { get; };
00043 }
00044
00045 [MUX_PUBLIC_V5]
00046 [webhosthidden]
00047 [marshaling_behavior(agile)]
00048 [threading(both)]
00049 unsealed runtimeclass ScrollSnapPoint
00050     : ScrollSnapPointBase
00051 {
00052     ScrollSnapPoint(
00053         Double snapPointValue,
00054         ScrollSnapPointsAlignment alignment);
00055 #ifdef ApplicableRangeType
00056     [MUX_PREVIEW]
00057     ScrollSnapPoint(
00058         Double snapPointValue,
00059         Double applicableRange,
00060         ScrollSnapPointsAlignment alignment);
00061 #endif
00062
00063     Double Value { get; };
00064 }
00065
00066 [MUX_PUBLIC_V5]
00067 [webhosthidden]
00068 [marshaling_behavior(agile)]
00069 [threading(both)]
00070 unsealed runtimeclass RepeatedScrollSnapPoint
00071     : ScrollSnapPointBase
00072 {
00073     RepeatedScrollSnapPoint(
00074         Double offset,
00075         Double interval,
00076         Double start,
00077         Double end,
00078         ScrollSnapPointsAlignment alignment);
00079 #ifdef ApplicableRangeType
00080     [MUX_PREVIEW]
00081     RepeatedScrollSnapPoint(
00082         Double offset,
00083         Double interval,
00084         Double start,
00085         Double end,
00086         Double applicableRange,
00087         ScrollSnapPointsAlignment alignment);
00088 #endif
00089
00090     Double Offset { get; };
00091     Double Interval { get; };
00092     Double Start { get; };
00093     Double End { get; };
00094 }
00095
00096 [MUX_PUBLIC_V5]
00097 [webhosthidden]
00098 [marshaling_behavior(agile)]
00099 [threading(both)]
00100 unsealed runtimeclass ZoomSnapPointBase
00101     : SnapPointBase
00102 {
00103 }
00104
00105 [MUX_PUBLIC_V5]
00106 [webhosthidden]
00107 [marshaling_behavior(agile)]
00108 [threading(both)]
00109 unsealed runtimeclass ZoomSnapPoint
00110     : ZoomSnapPointBase
00111 {
00112     ZoomSnapPoint(
00113         Double snapPointValue);
00114 #ifdef ApplicableRangeType
00115     [MUX_PREVIEW]
00116     ZoomSnapPoint(
00117         Double snapPointValue,
00118         Double applicableRange);
00119 #endif
00120
00121     Double Value { get; };
00122 }
00123
00124 [MUX_PUBLIC_V5]
00125 [webhosthidden]
00126 [marshaling_behavior(agile)]
00127 [threading(both)]
00128 unsealed runtimeclass RepeatedZoomSnapPoint
00129     : ZoomSnapPointBase
00130 {
00131     RepeatedZoomSnapPoint(
00132         Double offset,
00133         Double interval,
00134         Double start,
00135         Double end);
00136 #ifdef ApplicableRangeType
00137     [MUX_PREVIEW]
00138     RepeatedZoomSnapPoint(
00139         Double offset,
00140         Double interval,
00141         Double start,
00142         Double end,
00143         Double applicableRange);
00144 #endif
00145
00146     Double Offset { get; };
00147     Double Interval { get; };
00148     Double Start { get; };
00149     Double End { get; };
00150 }
00151
00152 [MUX_PUBLIC_V5]
00153 [webhosthidden]
00154 runtimeclass ScrollControllerScrollToRequestedEventArgs
00155 {
00156     ScrollControllerScrollToRequestedEventArgs(Double offset, MU_XC_NAMESPACE.ScrollingScrollOptions options);
00157
00158     Double Offset { get; };
00159     MU_XC_NAMESPACE.ScrollingScrollOptions Options { get; };
00160     Int32 CorrelationId { get; set; };
00161 }
00162
00163 [MUX_PUBLIC_V5]
00164 [webhosthidden]
00165 runtimeclass ScrollControllerScrollByRequestedEventArgs
00166 {
00167     ScrollControllerScrollByRequestedEventArgs(Double offsetDelta, MU_XC_NAMESPACE.ScrollingScrollOptions options);
00168
00169     Double OffsetDelta { get; };
00170     MU_XC_NAMESPACE.ScrollingScrollOptions Options { get; };
00171     Int32 CorrelationId { get; set; };
00172 }
00173
00174 [MUX_PUBLIC_V5]
00175 [webhosthidden]
00176 runtimeclass ScrollControllerAddScrollVelocityRequestedEventArgs
00177 {
00178     ScrollControllerAddScrollVelocityRequestedEventArgs(Single offsetVelocity, Windows.Foundation.IReference<Single> inertiaDecayRate);
00179
00180     Single OffsetVelocity { get; };
00181     Windows.Foundation.IReference<Single> InertiaDecayRate { get; };
00182     Int32 CorrelationId { get; set; };
00183 }
00184
00185 [MUX_PUBLIC_V5]
00186 [webhosthidden]
00187 runtimeclass ScrollControllerPanRequestedEventArgs
00188 {
00189     ScrollControllerPanRequestedEventArgs(Microsoft.UI.Input.PointerPoint pointerPoint);
00190
00191     Microsoft.UI.Input.PointerPoint PointerPoint { get; };
00192     Boolean Handled { get; set; };
00193 }
00194
00195 [MUX_PUBLIC_V5]
00196 [webhosthidden]
00197 interface IScrollControllerPanningInfo
00198 {
00199     Boolean IsRailEnabled{ get; };
00200     Microsoft.UI.Xaml.Controls.Orientation PanOrientation{ get; };
00201     Microsoft.UI.Xaml.UIElement PanningElementAncestor{ get; };
00202
00203     void SetPanningElementExpressionAnimationSources(
00204         Microsoft.UI.Composition.CompositionPropertySet propertySet,
00205         String minOffsetPropertyName,
00206         String maxOffsetPropertyName,
00207         String offsetPropertyName,
00208         String multiplierPropertyName);
00209
00210     event Windows.Foundation.TypedEventHandler<IScrollControllerPanningInfo, Object> Changed;
00211     event Windows.Foundation.TypedEventHandler<IScrollControllerPanningInfo, ScrollControllerPanRequestedEventArgs> PanRequested;
00212 }
00213
00214 [MUX_PUBLIC_V5]
00215 [webhosthidden]
00216 interface IScrollController
00217 {
00218     IScrollControllerPanningInfo PanningInfo{ get; };
00219     Boolean CanScroll{ get; };
00220     Boolean IsScrollingWithMouse{ get; };
00221     void SetIsScrollable(Boolean isScrollable);
00222     void SetValues(Double minOffset, Double maxOffset, Double offset, Double viewportLength);
00223     Microsoft.UI.Composition.CompositionAnimation GetScrollAnimation(
00224         Int32 correlationId,
00225         Windows.Foundation.Numerics.Vector2 startPosition,
00226         Windows.Foundation.Numerics.Vector2 endPosition,
00227         Microsoft.UI.Composition.CompositionAnimation defaultAnimation);
00228     void NotifyRequestedScrollCompleted(Int32 correlationId);
00229     event Windows.Foundation.TypedEventHandler<IScrollController, Object> CanScrollChanged;
00230     event Windows.Foundation.TypedEventHandler<IScrollController, Object> IsScrollingWithMouseChanged;
00231     event Windows.Foundation.TypedEventHandler<IScrollController, ScrollControllerScrollToRequestedEventArgs> ScrollToRequested;
00232     event Windows.Foundation.TypedEventHandler<IScrollController, ScrollControllerScrollByRequestedEventArgs> ScrollByRequested;
00233     event Windows.Foundation.TypedEventHandler<IScrollController, ScrollControllerAddScrollVelocityRequestedEventArgs> AddScrollVelocityRequested;
00234 }
00235
00236 [MUX_PUBLIC_V5]
00237 [webhosthidden]
00238 [contentproperty("Content")]
00239 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00240 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00241 unsealed runtimeclass ScrollPresenter :
00242     Microsoft.UI.Xaml.FrameworkElement,
00243     Microsoft.UI.Xaml.Controls.IScrollAnchorProvider
00244 {
00245     ScrollPresenter();
00246
00247     Microsoft.UI.Xaml.Media.Brush Background { get; set; };
00248     Microsoft.UI.Xaml.UIElement Content { get; set; };
00249     Microsoft.UI.Composition.CompositionPropertySet ExpressionAnimationSources { get; };
00250     Double HorizontalOffset { get; };
00251     Double VerticalOffset { get; };
00252     Single ZoomFactor { get; };
00253     Double ExtentWidth { get; };
00254     Double ExtentHeight { get; };
00255     Double ViewportWidth { get; };
00256     Double ViewportHeight { get; };
00257     Double ScrollableWidth { get; };
00258     Double ScrollableHeight { get; };
00259     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultContentOrientation")]
00260     MU_XC_NAMESPACE.ScrollingContentOrientation ContentOrientation { get; set; };
00261     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultHorizontalScrollChainMode")]
00262     MU_XC_NAMESPACE.ScrollingChainMode HorizontalScrollChainMode { get; set; };
00263     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultVerticalScrollChainMode")]
00264     MU_XC_NAMESPACE.ScrollingChainMode VerticalScrollChainMode { get; set; };
00265     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultHorizontalScrollRailMode")]
00266     MU_XC_NAMESPACE.ScrollingRailMode HorizontalScrollRailMode { get; set; };
00267     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultVerticalScrollRailMode")]
00268     MU_XC_NAMESPACE.ScrollingRailMode VerticalScrollRailMode { get; set; };
00269     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultHorizontalScrollMode")]
00270     MU_XC_NAMESPACE.ScrollingScrollMode HorizontalScrollMode { get; set; };
00271     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultVerticalScrollMode")]
00272     MU_XC_NAMESPACE.ScrollingScrollMode VerticalScrollMode { get; set; };
00273     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultComputedHorizontalScrollMode")]
00274     MU_XC_NAMESPACE.ScrollingScrollMode ComputedHorizontalScrollMode { get; };
00275     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultComputedVerticalScrollMode")]
00276     MU_XC_NAMESPACE.ScrollingScrollMode ComputedVerticalScrollMode { get; };
00277     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultZoomChainMode")]
00278     MU_XC_NAMESPACE.ScrollingChainMode ZoomChainMode { get; set; };
00279     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultZoomMode")]
00280     MU_XC_NAMESPACE.ScrollingZoomMode ZoomMode { get; set; };
00281     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultIgnoredInputKinds")]
00282     MU_XC_NAMESPACE.ScrollingInputKinds IgnoredInputKinds { get; set; };
00283     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultMinZoomFactor")]
00284     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateZoomFactoryBoundary")]
00285     Double MinZoomFactor { get; set; };
00286     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultMaxZoomFactor")]
00287     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateZoomFactoryBoundary")]
00288     Double MaxZoomFactor { get; set; };
00289     MU_XC_NAMESPACE.ScrollingInteractionState State { get; };
00290     IScrollController HorizontalScrollController { get; set; };
00291     IScrollController VerticalScrollController { get; set; };
00292     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultAnchorRatio")]
00293     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateAnchorRatio")]
00294     Double HorizontalAnchorRatio { get; set; };
00295     [MUX_DEFAULT_VALUE("ScrollPresenter::s_defaultAnchorRatio")]
00296     [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateAnchorRatio")]
00297     Double VerticalAnchorRatio { get; set; };
00298     Windows.Foundation.Collections.IVector<ScrollSnapPointBase> HorizontalSnapPoints { get; };
00299     Windows.Foundation.Collections.IVector<ScrollSnapPointBase> VerticalSnapPoints { get; };
00300     Windows.Foundation.Collections.IVector<ZoomSnapPointBase> ZoomSnapPoints { get; };
00301     [method_name("ScrollTo")]
00302     Int32 ScrollTo(
00303         Double horizontalOffset,
00304         Double verticalOffset);
00305     [method_name("ScrollToWithOptions")]
00306     Int32 ScrollTo(
00307         Double horizontalOffset,
00308         Double verticalOffset,
00309         MU_XC_NAMESPACE.ScrollingScrollOptions options);
00310     [method_name("ScrollBy")]
00311     Int32 ScrollBy(
00312         Double horizontalOffsetDelta,
00313         Double verticalOffsetDelta);
00314     [method_name("ScrollByWithOptions")]
00315     Int32 ScrollBy(
00316         Double horizontalOffsetDelta,
00317         Double verticalOffsetDelta,
00318         MU_XC_NAMESPACE.ScrollingScrollOptions options);
00319     Int32 AddScrollVelocity(
00320         Windows.Foundation.Numerics.Vector2 offsetsVelocity,
00321         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> inertiaDecayRate);
00322     [method_name("ZoomTo")]
00323     Int32 ZoomTo(
00324         Single zoomFactor,
00325         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint);
00326     [method_name("ZoomToWithOptions")]
00327     Int32 ZoomTo(
00328         Single zoomFactor,
00329         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint,
00330         MU_XC_NAMESPACE.ScrollingZoomOptions options);
00331     [method_name("ZoomBy")]
00332     Int32 ZoomBy(
00333         Single zoomFactorDelta,
00334         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint);
00335     [method_name("ZoomByWithOptions")]
00336     Int32 ZoomBy(
00337         Single zoomFactorDelta,
00338         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint,
00339         MU_XC_NAMESPACE.ScrollingZoomOptions options);
00340     Int32 AddZoomVelocity(
00341         Single zoomFactorVelocity,
00342         Windows.Foundation.IReference<Windows.Foundation.Numerics.Vector2> centerPoint,
00343         Windows.Foundation.IReference<Single> inertiaDecayRate);
00344
00345     event Windows.Foundation.TypedEventHandler<ScrollPresenter, Object> ExtentChanged;
00346     event Windows.Foundation.TypedEventHandler<ScrollPresenter, Object> StateChanged;
00347     event Windows.Foundation.TypedEventHandler<ScrollPresenter, Object> ViewChanged;
00348
00349     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingScrollAnimationStartingEventArgs> ScrollAnimationStarting;
00350     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingZoomAnimationStartingEventArgs> ZoomAnimationStarting;
00351     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingScrollCompletedEventArgs> ScrollCompleted;
00352     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingZoomCompletedEventArgs> ZoomCompleted;
00353     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingBringingIntoViewEventArgs> BringingIntoView;
00354     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingAnchorRequestedEventArgs> AnchorRequested;
00355
00356     [MUX_PREVIEW]
00357     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingScrollStartingEventArgs> ScrollStarting;
00358     [MUX_PREVIEW]
00359     event Windows.Foundation.TypedEventHandler<ScrollPresenter, MU_XC_NAMESPACE.ScrollingZoomStartingEventArgs> ZoomStarting;
00360
00361     static Microsoft.UI.Xaml.DependencyProperty BackgroundProperty { get; };
00362     static Microsoft.UI.Xaml.DependencyProperty ContentProperty { get; };
00363     static Microsoft.UI.Xaml.DependencyProperty ContentOrientationProperty { get; };
00364     static Microsoft.UI.Xaml.DependencyProperty HorizontalScrollChainModeProperty { get; };
00365     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollChainModeProperty { get; };
00366     static Microsoft.UI.Xaml.DependencyProperty HorizontalScrollRailModeProperty { get; };
00367     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollRailModeProperty { get; };
00368     static Microsoft.UI.Xaml.DependencyProperty HorizontalScrollModeProperty { get; };
00369     static Microsoft.UI.Xaml.DependencyProperty VerticalScrollModeProperty { get; };
00370     static Microsoft.UI.Xaml.DependencyProperty ComputedHorizontalScrollModeProperty { get; };
00371     static Microsoft.UI.Xaml.DependencyProperty ComputedVerticalScrollModeProperty { get; };
00372     static Microsoft.UI.Xaml.DependencyProperty ZoomChainModeProperty { get; };
00373     static Microsoft.UI.Xaml.DependencyProperty ZoomModeProperty { get; };
00374     static Microsoft.UI.Xaml.DependencyProperty IgnoredInputKindsProperty { get; };
00375     static Microsoft.UI.Xaml.DependencyProperty MinZoomFactorProperty { get; };
00376     static Microsoft.UI.Xaml.DependencyProperty MaxZoomFactorProperty { get; };
00377     static Microsoft.UI.Xaml.DependencyProperty HorizontalAnchorRatioProperty { get; };
00378     static Microsoft.UI.Xaml.DependencyProperty VerticalAnchorRatioProperty { get; };
00379 }
00380
00381 }
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TestUI/TreeViewPage.xaml.cs Source File

  • File List
  • File Members
  • TreeView
  • TestUI

TreeViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using System.Text;
00008 using Windows.ApplicationModel.DataTransfer;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Automation;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Controls.Primitives;
00013 using Microsoft.UI.Xaml.Navigation;
00014 using Microsoft.UI.Xaml.Media;
00015 using Microsoft.UI.Private.Media;
00016 using System.Collections.ObjectModel;
00017 using MUXControlsTestApp.Utilities;
00018 using System.Threading.Tasks;
00019
00020 namespace MUXControlsTestApp
00021 {
00022     [TopLevelTestPage(Name = "TreeView", Icon = "TreeView.png")]
00023     public sealed partial class TreeViewPage : TestPage
00024     {
00025         bool _disableClickToExpand;
00026         public TreeViewItem flyoutTVI;
00027         TreeViewNode _visualRoot;
00028         TreeViewNode _virtualizedNode;
00029         public ObservableCollection<TreeViewItemSource> TestTreeViewItemsSource { get; set; }
00030         public ObservableCollection<TreeViewItemSource> TestTreeView2ItemsSource { get; set; }
00031
00032         public TreeViewPage()
00033         {
00034             this.DataContext = this;
00035             this.InitializeComponent();
00036
00037             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00038             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00039
00040             _disableClickToExpand = false;
00041
00042             SetupCustomDragUIOverride.Click += SetupCustomDragUIOverride_Click;
00043
00044             _visualRoot = CreateTree();
00045             TestTreeView.RootNodes.Add(_visualRoot);
00046
00047             TestTreeView2.RootNodes.Add(new TreeViewNode() { Content = "item1" });
00048             TestTreeView2.RootNodes.Add(new TreeViewNode() { Content = "item2" });
00049
00050             TestTreeViewItemsSource = PrepareItemsSource();
00051
00052             var item1 = new TreeViewItemSource() { Content = "item1" };
00053             var item2 = new TreeViewItemSource() { Content = "item2" };
00054             TestTreeView2ItemsSource = new ObservableCollection<TreeViewItemSource>() { item1, item2 };
00055         }
00056
00057         private ObservableCollection<TreeViewItemSource> PrepareItemsSource(bool expandRootNode = false)
00058         {
00059             var root0 = new TreeViewItemSource() { Content = "Root.0" };
00060             var root1 = new TreeViewItemSource() { Content = "Root.1" };
00061             var root2 = new TreeViewItemSource() { Content = "Root.2" };
00062             var root = new TreeViewItemSource() { Content = "Root", Children = { root0, root1, root2 }, IsExpanded = expandRootNode };
00063
00064             return new ObservableCollection<TreeViewItemSource>{root};
00065         }
00066
00067         private async Task<ObservableCollection<TreeViewItemSource>> PrepareItemsSourceAsync()
00068         {
00069             return await Task.Run(() => {
00070                 var items = PrepareItemsSource(expandRootNode: true);
00071
00072                 var root0 = items[0].Children[0];
00073                 var x0 = new TreeViewItemSource { Content = "Root.0.0" };
00074                 root0.Children.Add(x0);
00075
00076                 var root1 = items[0].Children[1];
00077                 var y0 = new TreeViewItemSource { Content = "Root.1.0" };
00078                 var y1 = new TreeViewItemSource { Content = "Root.1.1" };
00079                 root1.Children.Add(y0);
00080                 root1.Children.Add(y1);
00081                 root1.IsExpanded = true;
00082
00083                 return items;
00084             });
00085         }
00086
00087         protected override void OnNavigatedFrom(NavigationEventArgs e)
00088         {
00089             // Unset all override flags to avoid impacting subsequent tests
00090             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00091             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00092             base.OnNavigatedFrom(e);
00093         }
00094
00095         private string GetSelection(TreeView tree)
00096         {
00097             int count = tree.SelectedNodes.Count;
00098
00099             if (count != tree.SelectedItems.Count)
00100             {
00101                 return "SelectedNodes.Count != SelectedItems.Count";
00102             }
00103
00104             List<string> result = new List<string>();
00105             for (int i = 0; i < count; i++)
00106             {
00107                 // Make sure selectedNodes and SelectedItems are in sync
00108                 var node = tree.SelectedNodes[i];
00109                 var item = IsInContentMode() ? node.Content : node;
00110                 if (item != tree.SelectedItems[i])
00111                 {
00112                     return "$SelectedNodes[{i}] != SelectedItems[{i}]";
00113                 }
00114
00115                 result.Add(GetNodeContent(node));
00116             }
00117
00118             result.Sort();
00119
00120             // Verify SelectedItem and SelectedNode for single selection
00121             if(tree.SelectionMode == TreeViewSelectionMode.Single && result.Count > 0)
00122             {
00123                 if(tree.SelectedItem != tree.SelectedItems[0] || tree.SelectedNode != tree.SelectedNodes[0])
00124                 {
00125                     return "SelectedItem!=SelectedItems[0] || SelectedNode!=SelectedNodes[0]";
00126                 }
00127             }
00128
00129             return result.Count > 0 ? "Selected: " + string.Join(", ", result) : "Nothing selected";
00130         }
00131
00132         private void GetSelected_Click(object sender, RoutedEventArgs e)
00133         {
00134             if (IsInContentMode())
00135             {
00136                 Results.Text = GetSelection(ContentModeTestTreeView);
00137             }
00138             else
00139             {
00140                 Results.Text = GetSelection(TestTreeView);
00141             }
00142         }
00143
00144         private void TestTreeView_ItemInvoked(TreeView sender, TreeViewItemInvokedEventArgs args)
00145         {
00146             var data = ((TreeViewNode)args.InvokedItem).Content.ToString();
00147             Results.Text = "ItemClicked:" + data;
00148
00149             if (!_disableClickToExpand)
00150             {
00151                 var node = args.InvokedItem as TreeViewNode;
00152                 node.IsExpanded = !node.IsExpanded;
00153             }
00154         }
00155
00156         private void TestTreeViewContentMode_ItemInvoked(TreeView sender, TreeViewItemInvokedEventArgs args)
00157         {
00158             var item = args.InvokedItem as TreeViewItemSource;
00159             Results.Text = "ItemClicked:" + item.Content;
00160
00161             if (!_disableClickToExpand)
00162             {
00163                 item.IsExpanded = !item.IsExpanded;
00164             }
00165         }
00166
00167         private void MoveNodesToNewTreeView_Click(object sender, RoutedEventArgs e)
00168         {
00169             if (IsInContentMode())
00170             {
00171                 ContentModeTestTreeView.ItemsSource = null;
00172                 TestTreeView2ItemsSource.Add(TestTreeViewItemsSource[0]);
00173                 ContentModeTestStackPanel.Children.Remove(ContentModeTestTreeView);
00174             }
00175             else if (_visualRoot != null)
00176             {
00177                 TestTreeView.RootNodes.Remove(_visualRoot);
00178                 TestTreeView2.RootNodes.Add(_visualRoot);
00179                 TestStackPanel.Children.Remove(TestTreeView);
00180             }
00181         }
00182
00183         private void DisableClickToExpand_Click(object sender, RoutedEventArgs e)
00184         {
00185             _disableClickToExpand = true;
00186         }
00187
00188         private void SetupExpandingNodeEvent_Click(object sender, RoutedEventArgs e)
00189         {
00190             if (IsInContentMode())
00191             {
00192                 TreeViewItemSource item = new TreeViewItemSource() { Content = "Virtualized", HasUnrealizedChildren = true };
00193                 TestTreeViewItemsSource[0].Children.Add(item);
00194                 ContentModeTestTreeView.Expanding += ContentModeTestTreeView_Expanding;
00195             }
00196             else if(_visualRoot != null)
00197             {
00198                 _virtualizedNode = new TreeViewNode() { Content = "Virtualized" };
00199                 _virtualizedNode.HasUnrealizedChildren = true;
00200                 _visualRoot.Children.Add(_virtualizedNode);
00201
00202                 TestTreeView.Expanding += TestTreeView_Expanding;
00203             }
00204         }
00205
00206         private void LabelItems_Click(object sender, RoutedEventArgs e)
00207         {
00208             if (IsInContentMode())
00209             {
00210                 SetAutomationIdForNodes(ContentModeTestTreeView);
00211             }
00212             else
00213             {
00214                 SetAutomationIdForNodes(TestTreeView);
00215             }
00216         }
00217
00218         private void SetAutomationIdForNodes(TreeView tree)
00219         {
00220             var listControl = FindVisualChildByName(this.TestTreeView, "ListControl") as TreeViewList;
00221             Stack<TreeViewNode> pendingNodes = new Stack<TreeViewNode>();
00222             foreach (var node in tree.RootNodes)
00223             {
00224                 pendingNodes.Push(node);
00225             }
00226             while (pendingNodes.Count > 0)
00227             {
00228                 var currentNode = pendingNodes.Pop();
00229                 foreach (var child in currentNode.Children)
00230                 {
00231                     pendingNodes.Push(child);
00232                 }
00233
00234                 var container = tree.ContainerFromNode(currentNode);
00235                 if (container != null)
00236                 {
00237                     AutomationProperties.SetAutomationId(container as DependencyObject, GetNodeContent(currentNode));
00238                 }
00239             }
00240         }
00241
00242         private String GetNodeContent(TreeViewNode node)
00243         {
00244             if (IsInContentMode())
00245             {
00246                 TreeViewItemSource item = node.Content as TreeViewItemSource;
00247                 return item.Content;
00248             }
00249             return node.Content.ToString();
00250         }
00251
00252         private string GetRootNodeChildrenOrder(TreeView tree)
00253         {
00254             List<string> result = new List<string>();
00255             Stack<TreeViewNode> pendingNodes = new Stack<TreeViewNode>();
00256             pendingNodes.Push(tree.RootNodes[0]);
00257             while (pendingNodes.Count > 0)
00258             {
00259                 var currentNode = pendingNodes.Pop();
00260                 var size = currentNode.Children.Count;
00261                 for (int i = 0; i < size; i++)
00262                 {
00263                     pendingNodes.Push(currentNode.Children[size - 1 - i]);
00264                 }
00265
00266                 result.Add(GetNodeContent(currentNode));
00267             }
00268
00269             return string.Join(" | ", result);
00270         }
00271
00272         private string GetItemsSourceOrder()
00273         {
00274             List<string> result = new List<string>();
00275             Stack<TreeViewItemSource> pendingItems = new Stack<TreeViewItemSource>();
00276             pendingItems.Push(TestTreeViewItemsSource[0]);
00277             while (pendingItems.Count > 0)
00278             {
00279                 var currentItem = pendingItems.Pop();
00280                 var size = currentItem.Children.Count;
00281                 for (int i = 0; i < size; i++)
00282                 {
00283                     pendingItems.Push(currentItem.Children[size - 1 - i]);
00284                 }
00285                 result.Add(currentItem.Content);
00286             }
00287
00288             return string.Join(" | ", result);
00289         }
00290
00291         private void GetChildrenOrder_Click(object sender, RoutedEventArgs e)
00292         {
00293             if (IsInContentMode())
00294             {
00295                 var itemsSourceOrder = GetItemsSourceOrder();
00296                 var treeViewNodeOrder = GetRootNodeChildrenOrder(ContentModeTestTreeView);
00297                 // Make sure ItemsSource and TreeViewNode orders are in sync
00298                 if (itemsSourceOrder == treeViewNodeOrder)
00299                 {
00300                     Results.Text = itemsSourceOrder;
00301                 }
00302                 else
00303                 {
00304                     Results.Text = $"ItemsSourceOrder: {itemsSourceOrder}; TreeViewNodeOrder: {treeViewNodeOrder}";
00305                 }
00306             }
00307             else
00308             {
00309                 Results.Text = GetRootNodeChildrenOrder(TestTreeView);
00310             }
00311         }
00312
00313         private void ToggleSelectionMode_Click(object sender, RoutedEventArgs e)
00314         {
00315             var selectionMode = TreeViewSelectionMode.Single;
00316             if (TestTreeView.SelectionMode == TreeViewSelectionMode.Single)
00317             {
00318                 selectionMode = TreeViewSelectionMode.Multiple;
00319             }
00320             else if (TestTreeView.SelectionMode == TreeViewSelectionMode.Multiple)
00321             {
00322                 selectionMode = TreeViewSelectionMode.None;
00323             }
00324             else
00325             {
00326                 selectionMode = TreeViewSelectionMode.Single;
00327             }
00328
00329             TestTreeView.SelectionMode = selectionMode;
00330             ContentModeTestTreeView.SelectionMode = selectionMode;
00331         }
00332
00333         private void GetItemCommonStates_Click(object sender, RoutedEventArgs e)
00334         {
00335             string commonStates = string.Empty;
00336             var listControl = FindVisualChildByName(this.TestTreeView, "ListControl") as TreeViewList;
00337             if (IsInContentMode())
00338             {
00339                 listControl = FindVisualChildByName(ContentModeTestTreeView, "ListControl") as TreeViewList;
00340             }
00341
00342             for (int i = 0; i < listControl.Items.Count; i++)
00343             {
00344                 var container = (TreeViewItem)listControl.ContainerFromIndex(0);
00345                 var groups = VisualStateManager.GetVisualStateGroups((FrameworkElement)VisualTreeHelper.GetChild(container, 0));
00346                 foreach (var group in groups)
00347                 {
00348                     if (group.Name == "CommonStates")
00349                     {
00350                         commonStates += group.CurrentState.Name + " ";
00351                     }
00352                 }
00353             }
00354
00355             Results.Text = commonStates;
00356         }
00357
00358         private void TestTreeView_Expanding(TreeView sender, TreeViewExpandingEventArgs args)
00359         {
00360             var loadingNode = args.Node;
00361             if (loadingNode == _virtualizedNode)
00362             {
00363                 loadingNode.Children.Add(new TreeViewNode() { Content = "Loaded: 1" });
00364                 loadingNode.Children.Add(new TreeViewNode() { Content = "Loaded: 2" });
00365                 loadingNode.Children.Add(new TreeViewNode() { Content = "Loaded: 3" });
00366                 loadingNode.HasUnrealizedChildren = false;
00367
00368                 Results.Text = "Loaded";
00369             }
00370         }
00371
00372         private void ContentModeTestTreeView_Expanding(TreeView sender, TreeViewExpandingEventArgs args)
00373         {
00374             var loadingItem = args.Item as TreeViewItemSource;
00375             var count = TestTreeViewItemsSource[0].Children.Count;
00376             if (loadingItem == TestTreeViewItemsSource[0].Children[count-1])
00377             {
00378                 loadingItem.Children.Add(new TreeViewItemSource() { Content = "Loaded: 1" });
00379                 loadingItem.Children.Add(new TreeViewItemSource() { Content = "Loaded: 2" });
00380                 loadingItem.Children.Add(new TreeViewItemSource() { Content = "Loaded: 3" });
00381                 loadingItem.HasUnrealizedChildren = false;
00382
00383                 Results.Text = "Loaded";
00384             }
00385         }
00386
00387         private void ChangeFlowDirection_Click(object sender, RoutedEventArgs e)
00388         {
00389             TestTreeView.FlowDirection = FlowDirection.RightToLeft;
00390             ContentModeTestTreeView.FlowDirection = FlowDirection.RightToLeft;
00391         }
00392
00393         private void GetItemCount_Click(object sender, RoutedEventArgs e)
00394         {
00395             var listControl = FindVisualChildByName(TestTreeView, "ListControl") as TreeViewList;
00396             if (IsInContentMode())
00397             {
00398                 listControl = FindVisualChildByName(ContentModeTestTreeView, "ListControl") as TreeViewList;
00399             }
00400             Results.Text = (listControl.Items.Count).ToString();
00401         }
00402
00403         private void GetTree2ItemCount_Click(object sender, RoutedEventArgs e)
00404         {
00405             var listControl = FindVisualChildByName(TestTreeView2, "ListControl") as TreeViewList;
00406             if (IsInContentMode())
00407             {
00408                 listControl = FindVisualChildByName(ContentModeTestTreeView2, "ListControl") as TreeViewList;
00409             }
00410             Results.Text = (listControl.Items.Count).ToString();
00411         }
00412
00413         private void GetFlyoutTreeViewItemCount_Click(object sender, RoutedEventArgs e)
00414         {
00415             var listControl = FindVisualChildByName(this.FlyoutTreeView, "ListControl") as TreeViewList;
00416             flyoutTVI = (TreeViewItem)listControl.ContainerFromIndex(0);
00417             Results.Text = (listControl.Items.Count).ToString();
00418         }
00419
00420         private void SetupNoReorderNodes_Click(object sender, RoutedEventArgs e)
00421         {
00422             var treeView = IsInContentMode() ? ContentModeTestTreeView : TestTreeView;
00423             var listControl = FindVisualChildByName(treeView, "ListControl") as TreeViewList;
00424             var lockedItem = (TreeViewItem)listControl.ContainerFromIndex(1);
00425             lockedItem.AllowDrop = false;
00426
00427             if (IsInContentMode())
00428             {
00429                 var lockedNode = treeView.ItemFromContainer(lockedItem) as TreeViewItemSource;
00430                 lockedNode.Children.Add(new TreeViewItemSource() { Content = "Locked1" });
00431                 lockedNode.Children.Add(new TreeViewItemSource() { Content = "Locked2" });
00432                 lockedNode.Children.Add(new TreeViewItemSource() { Content = "Locked3" });
00433             }
00434             else
00435             {
00436                 var lockedNode = treeView.NodeFromContainer(lockedItem);
00437                 lockedNode.Children.Add(new TreeViewNode() { Content = "Locked1" });
00438                 lockedNode.Children.Add(new TreeViewNode() { Content = "Locked2" });
00439                 lockedNode.Children.Add(new TreeViewNode() { Content = "Locked3" });
00440             }
00441         }
00442
00443         private TreeViewNode CreateTree()
00444         {
00445             var root = new TreeViewNode() { Content = "Root" };
00446             var root0 = new TreeViewNode() { Content = "Root.0" };
00447             var root1 = new TreeViewNode() { Content = "Root.1" };
00448             var root2 = new TreeViewNode() { Content = "Root.2" };
00449
00450             root.Children.Add(root0);
00451             root.Children.Add(root1);
00452             root.Children.Add(root2);
00453
00454             return root;
00455         }
00456
00457         private void TreeViewInFlyout_Click(object sender, RoutedEventArgs e)
00458         {
00459             FrameworkElement element = sender as FrameworkElement;
00460             if (element != null)
00461             {
00462                 if (FlyoutTreeView.RootNodes.Count == 0)
00463                 {
00464                     FlyoutTreeView.RootNodes.Add(CreateTree());
00465                 }
00466                 else
00467                 {
00468                     FlyoutTreeView.RootNodes[0] = CreateTree();
00469                 }
00470
00471                 FlyoutBase.ShowAttachedFlyout(element);
00472             }
00473         }
00474
00475         private void ChangeSelectionAfterFlyout_Click(object sender, RoutedEventArgs e)
00476         {
00477             flyoutTVI.IsSelected = false;
00478         }
00479
00480         private void SetupDragToDropTarget_Click(object sender, RoutedEventArgs e)
00481         {
00482             TestTreeView.Height = 200;
00483             TestTreeView2.Visibility = Visibility.Collapsed;
00484
00485             ContentModeTestTreeView.Height = 200;
00486             ContentModeTestTreeView2.Visibility = Visibility.Collapsed;
00487
00488             TestTreeView.DragItemsStarting += TestTreeView_DragItemsStarting;
00489             TestTreeView.DragOver += TreeView_DragOver;
00490             TestTreeView.Drop += TreeView_Drop;
00491
00492             ContentModeTestTreeView.DragItemsStarting += TestTreeView_DragItemsStarting;
00493             ContentModeTestTreeView.DragOver += TreeView_DragOver;
00494             ContentModeTestTreeView.Drop += TreeView_Drop;
00495
00496             DraggableElement.DragStarting += Draggable_DragStarting;
00497         }
00498
00499         private void SetupCustomDragUIOverride_Click(object sender, RoutedEventArgs e)
00500         {
00501             List<TreeViewItem> items = FindVisualChildrenByType<TreeViewItem>(this.TestTreeView);
00502             TreeViewItem lastItem = items.Last();
00503
00504             lastItem.DragEnter += Item_DragEnter;
00505             AutomationProperties.SetName(lastItem, "CustomDragUIOverrideDropTarget");
00506         }
00507
00508         private void Item_DragEnter(object sender, DragEventArgs e)
00509         {
00510             e.DragUIOverride.Caption = "test caption";
00511             e.DragUIOverride.IsCaptionVisible = true;
00512             e.DragUIOverride.IsGlyphVisible = false;
00513             e.DragUIOverride.IsContentVisible = false;
00514             e.Handled = true;
00515         }
00516
00517         private async void TreeView_Drop(object sender, DragEventArgs e)
00518         {
00519             try
00520             {
00521                 var text = await e.DataView.GetTextAsync();
00522                 Results.Text = "Dropped: " + text;
00523             }
00524             catch (Exception ex)
00525             {
00526                 ExceptionMessage.Text = ex.ToString();
00527             }
00528         }
00529
00530         private void Draggable_DragStarting(UIElement sender, DragStartingEventArgs args)
00531         {
00532             args.Data.SetText("Test Item");
00533             args.Data.RequestedOperation = DataPackageOperation.Copy;
00534             Results.Text = "Drag started";
00535         }
00536
00537         private void TreeView_DragOver(object sender, DragEventArgs e)
00538         {
00539             e.AcceptedOperation = DataPackageOperation.Copy;
00540         }
00541
00542         private void SizeTreeViewsForDrags_Click(object sender, RoutedEventArgs e)
00543         {
00544             TestTreeView.Height = 200;
00545             TestTreeView2.Height = 200;
00546         }
00547
00548         private void DropTarget_DragOver(object sender, DragEventArgs e)
00549         {
00550             e.AcceptedOperation = DataPackageOperation.Copy;
00551         }
00552
00553         private async void DropTarget_Drop(object sender, DragEventArgs e)
00554         {
00555             try
00556             {
00557                 var text = await e.DataView.GetTextAsync();
00558                 DropTargetTextBlock.Text = text;
00559             }
00560             catch (Exception ex)
00561             {
00562                 ExceptionMessage.Text = ex.ToString();
00563             }
00564         }
00565
00566         private void TestTreeView_DragItemsStarting(TreeView sender, TreeViewDragItemsStartingEventArgs e)
00567         {
00568             var items = new StringBuilder();
00569             if (IsInContentMode())
00570             {
00571                 foreach (TreeViewItemSource item in e.Items)
00572                 {
00573                     if (items.Length > 0) items.AppendLine();
00574                     items.Append(item.Content);
00575                 }
00576             }
00577             else
00578             {
00579                 foreach (TreeViewNode node in e.Items)
00580                 {
00581                     if (items.Length > 0) items.AppendLine();
00582                     items.Append(node.Content.ToString());
00583                 }
00584             }
00585
00586             e.Data.SetText(items.ToString());
00587             e.Data.RequestedOperation = DataPackageOperation.Copy;
00588         }
00589
00590         private void AddSecondLevelOfNodes_Click(object sender, RoutedEventArgs e)
00591         {
00592             if (IsInContentMode())
00593             {
00594                 var root0 = TestTreeViewItemsSource[0].Children[0];
00595                 var x0 = new TreeViewItemSource { Content = "Root.0.0" };
00596                 root0.Children.Add(x0);
00597
00598                 var root1 = TestTreeViewItemsSource[0].Children[1];
00599                 var y0 = new TreeViewItemSource { Content = "Root.1.0" };
00600                 var y1 = new TreeViewItemSource { Content = "Root.1.1" };
00601                 var y2 = new TreeViewItemSource { Content = "Root.1.2" };
00602                 root1.Children.Add(y0);
00603                 root1.Children.Add(y1);
00604                 root1.Children.Add(y2);
00605             }
00606             else if (_visualRoot != null)
00607             {
00608                 var root0 = _visualRoot.Children[0];
00609                 var x0 = new TreeViewNode { Content = "Root.0.0" };
00610                 root0.Children.Add(x0);
00611
00612                 var root1 = _visualRoot.Children[1];
00613                 var y0 = new TreeViewNode { Content = "Root.1.0" };
00614                 var y1 = new TreeViewNode { Content = "Root.1.1" };
00615                 var y2 = new TreeViewNode { Content = "Root.1.2" };
00616                 root1.Children.Add(y0);
00617                 root1.Children.Add(y1);
00618                 root1.Children.Add(y2);
00619             }
00620         }
00621
00622         private void RemoveSecondLevelOfNode_Click(object sender, RoutedEventArgs e)
00623         {
00624             if (IsInContentMode())
00625             {
00626                 var root0 = TestTreeViewItemsSource[0].Children[0];
00627                 root0.Children.RemoveAt(0);
00628             }
00629             else if (_visualRoot != null)
00630             {
00631                 var root0 = _visualRoot.Children[0];
00632                 root0.Children.RemoveAt(0);
00633             }
00634         }
00635
00636         private void ModifySecondLevelOfNode_Click(object sender, RoutedEventArgs e)
00637         {
00638             if (IsInContentMode())
00639             {
00640                 var y0 = new TreeViewItemSource { Content = "THIS IS NEW" };
00641                 var root0 = TestTreeViewItemsSource[0].Children[0];
00642                 root0.Children[0] = y0;
00643             }
00644             else if (_visualRoot != null)
00645             {
00646                 var y0 = new TreeViewNode { Content = "THIS IS NEW" };
00647                 var root0 = _visualRoot.Children[0];
00648                 root0.Children[0] = y0;
00649             }
00650         }
00651
00652         private void SetRoot1HasUnrealizedChildren_Click(object sender, RoutedEventArgs e)
00653         {
00654             if (_visualRoot != null)
00655             {
00656                 var root1 = _visualRoot.Children[1];
00657                 root1.HasUnrealizedChildren = true;
00658                 TestTreeView.Expanding += (tv, args) =>
00659                 {
00660                     Results.Text = "Expanding Raised";
00661                 };
00662
00663                 TestTreeViewItemsSource[0].Children[1].HasUnrealizedChildren = true;
00664                 ContentModeTestTreeView.Expanding += (tv, args) =>
00665                 {
00666                     Results.Text = "Expanding Raised";
00667                 };
00668             }
00669         }
00670
00671         private void SetupDragDropHandlersForApiTest_Click(object sender, RoutedEventArgs e)
00672         {
00673             TestTreeView.Height = 200;
00674             TestTreeView2.Height = 200;
00675             TestTreeView.DragItemsStarting += DragItemsStartingForApiTest;
00676             TestTreeView.DragItemsCompleted += DragItemsCompletedForApiTest;
00677             TestTreeView2.DragEnter += DragEnterForApiTest;
00678             TestTreeView2.DragOver += DragOverForApiTest;
00679             TestTreeView2.DragLeave += DragLeaveForApiTest;
00680             TestTreeView2.Drop += DropForApiTest;
00681
00682             ContentModeTestTreeView.Height = 200;
00683             ContentModeTestTreeView2.Height = 200;
00684             ContentModeTestTreeView.DragItemsStarting += DragItemsStartingForApiTest;
00685             ContentModeTestTreeView.DragItemsCompleted += DragItemsCompletedForApiTest;
00686             ContentModeTestTreeView2.DragEnter += DragEnterForApiTest;
00687             ContentModeTestTreeView2.DragOver += DragOverForApiTest;
00688             ContentModeTestTreeView2.DragLeave += DragLeaveForApiTest;
00689             ContentModeTestTreeView2.Drop += DropForApiTest;
00690         }
00691
00692         private void DragEnterForApiTest(object sender, DragEventArgs args)
00693         {
00694             args.AcceptedOperation = DataPackageOperation.Copy;
00695             Results.Text = "DragEnter";
00696         }
00697
00698         private void DragOverForApiTest(object sender, DragEventArgs args)
00699         {
00700             args.AcceptedOperation = DataPackageOperation.Copy;
00701             if (!Results.Text.Contains("DragOver"))
00702             {
00703                 Results.Text += "->DragOver";
00704             }
00705         }
00706
00707         private void DragLeaveForApiTest(object sender, DragEventArgs args)
00708         {
00709             Results.Text += "->DragLeave";
00710         }
00711
00712         private void DropForApiTest(object sender, DragEventArgs args)
00713         {
00714             Results.Text += "->Drop";
00715         }
00716
00717         private void DisableItemDrag_Click(object sender, RoutedEventArgs e)
00718         {
00719             TestTreeView.CanDragItems = false;
00720             ContentModeTestTreeView.CanDragItems = false;
00721         }
00722
00723         private void DisableItemReorder_Click(object sender, RoutedEventArgs e)
00724         {
00725             TestTreeView.CanReorderItems = false;
00726             ContentModeTestTreeView.CanReorderItems = false;
00727         }
00728
00729         private void DragItemsStartingForApiTest(TreeView sender, TreeViewDragItemsStartingEventArgs args)
00730         {
00731             Results.Text = "DragItemsStarting:" + GetDraggedItemsNames(args.Items);
00732         }
00733
00734         private void DragItemsCompletedForApiTest(TreeView sender, TreeViewDragItemsCompletedEventArgs args)
00735         {
00736             Results.Text += "\nDragItemsCompleted:" + GetDraggedItemsNames(args.Items);
00737
00738             var parent = args.NewParentItem;
00739             if (parent != null)
00740             {
00741                 var parentName = IsInContentMode() ? (parent as TreeViewItemSource).Content : (parent as TreeViewNode).Content.ToString();
00742                 Results.Text += "\nNewParent: " + parentName;
00743             }
00744         }
00745
00746         private String GetDraggedItemsNames(IEnumerable<object> items)
00747         {
00748             var names = new StringBuilder();
00749             if (IsInContentMode())
00750             {
00751                 foreach (TreeViewItemSource item in items)
00752                 {
00753                     if (names.Length > 0) names.Append("|");
00754                     names.Append(item.Content);
00755                 }
00756             }
00757             else
00758             {
00759                 foreach (TreeViewNode node in items)
00760                 {
00761                     if (names.Length > 0) names.Append("|");
00762                     names.Append(node.Content.ToString());
00763                 }
00764             }
00765
00766             return names.ToString();
00767         }
00768
00769         private void ItemTemplateSelectorTestPage_Click(object sender, RoutedEventArgs e)
00770         {
00771             this.Frame.NavigateWithoutAnimation(typeof(TreeViewItemTemplateSelectorTestPage));
00772         }
00773
00774         private void AddNodeWithEmpyUnrealizedChildren_Click(object sender, RoutedEventArgs e)
00775         {
00776             if (_visualRoot != null)
00777             {
00778                 var node = new TreeViewNode() {
00779                     Content = "Root.3",
00780                     HasUnrealizedChildren = true,
00781                     IsExpanded = true
00782                 };
00783                 _visualRoot.Children.Add(node);
00784             }
00785         }
00786
00787         private void SetContentMode_Click(object sender, RoutedEventArgs e)
00788         {
00789             Mode.Text = "content mode";
00790         }
00791
00792         private void ResetContentMode_Click(object sender, RoutedEventArgs e)
00793         {
00794             Mode.Text = string.Empty;
00795         }
00796
00797         private bool IsInContentMode()
00798         {
00799             return Mode.Text.Equals("content mode");
00800         }
00801
00802         private void GetCheckBoxStates(TreeView tree)
00803         {
00804             StringBuilder sb = new StringBuilder();
00805             Stack<TreeViewNode> pendingNodes = new Stack<TreeViewNode>();
00806             pendingNodes.Push(tree.RootNodes[0]);
00807             while (pendingNodes.Count > 0)
00808             {
00809                 var currentNode = pendingNodes.Pop();
00810                 var children = currentNode.Children;
00811                 var size = children.Count;
00812                 for (int i = 0; i < size; i++)
00813                 {
00814                     pendingNodes.Push(currentNode.Children[size - 1 - i]);
00815                 }
00816                 var treeViewItem = tree.ContainerFromNode(currentNode) as TreeViewItem;
00817                 var checkBox = FindVisualChildByName(treeViewItem, "MultiSelectCheckBox") as CheckBox;
00818                 if (checkBox.IsChecked == true)
00819                 {
00820                     // selected
00821                     sb.Append("s|");
00822                 }
00823                 else if (checkBox.IsChecked == false)
00824                 {
00825                     // unselected
00826                     sb.Append("u|");
00827                 }
00828                 else
00829                 {
00830                     // partial selected
00831                     sb.Append("p|");
00832                 }
00833             }
00834
00835             Results.Text = sb.ToString();
00836         }
00837
00838         private void GetMultiSelectCheckBoxStates_Click(object sender, RoutedEventArgs e)
00839         {
00840             if (IsInContentMode())
00841             {
00842                 GetCheckBoxStates(ContentModeTestTreeView);
00843             }
00844             else
00845             {
00846                 GetCheckBoxStates(TestTreeView);
00847             }
00848         }
00849
00850         private void ToggleSelectedNodes_Click(object sender, RoutedEventArgs e)
00851         {
00852             if (IsInContentMode())
00853             {
00854                 ContentModeTestTreeView.SelectionMode = TreeViewSelectionMode.Multiple;
00855                 var item0 = TestTreeViewItemsSource[0].Children[0];
00856                 var item2 = TestTreeViewItemsSource[0].Children[2];
00857                 var selectedItems = ContentModeTestTreeView.SelectedItems;
00858                 if (selectedItems.Contains(item0))
00859                 {
00860                     selectedItems.Remove(item0);
00861                     selectedItems.Remove(item2);
00862                 }
00863                 else
00864                 {
00865                     selectedItems.Add(item0);
00866                     selectedItems.Add(item2);
00867                 }
00868             }
00869             else
00870             {
00871                 TestTreeView.SelectionMode = TreeViewSelectionMode.Multiple;
00872                 var node0 = TestTreeView.RootNodes[0].Children[0];
00873                 var node2 = TestTreeView.RootNodes[0].Children[2];
00874                 var selectedNodes = TestTreeView.SelectedNodes;
00875                 if (selectedNodes.Contains(node0))
00876                 {
00877                     selectedNodes.Remove(node0);
00878                     selectedNodes.Remove(node2);
00879                 }
00880                 else
00881                 {
00882                     selectedNodes.Add(node0);
00883                     selectedNodes.Add(node2);
00884                 }
00885             }
00886         }
00887
00888         private void AddInheritedTreeViewNode_Click(object sender, RoutedEventArgs e)
00889         {
00890             if (_visualRoot != null)
00891             {
00892                 var node = new TreeViewNode2() { Content = "Inherited from TreeViewNode" };
00893                 _visualRoot.Children.Add(node);
00894             }
00895         }
00896
00897         private void ClearNodes_Click(object sender, RoutedEventArgs e)
00898         {
00899             try
00900             {
00901                 if (IsInContentMode())
00902                 {
00903                     TestTreeViewItemsSource.Clear();
00904                 }
00905                 else if (_visualRoot != null)
00906                 {
00907                     _visualRoot.Children.Clear();
00908                     _visualRoot = null;
00909                     TestTreeView.RootNodes.Clear();
00910                 }
00911             }
00912             catch (Exception ex)
00913             {
00914                 ExceptionMessage.Text = ex.ToString();
00915             }
00916         }
00917
00918         private void AddRootNode_Click(object sender, RoutedEventArgs e)
00919         {
00920             try
00921             {
00922                 if (IsInContentMode())
00923                 {
00924                     var newNode = new TreeViewItemSource() { Content = "Root" + TestTreeViewItemsSource.Count };
00925                     TestTreeViewItemsSource.Add(newNode);
00926                 }
00927                 else
00928                 {
00929                     var newNode = new TreeViewNode() { Content = "Root" + TestTreeView.RootNodes.Count };
00930                     TestTreeView.RootNodes.Add(newNode);
00931                     if (_visualRoot == null)
00932                     {
00933                         _visualRoot = newNode;
00934                     }
00935                 }
00936             }
00937             catch (Exception ex)
00938             {
00939                 ExceptionMessage.Text = ex.ToString();
00940             }
00941         }
00942
00943         private void AddExtraNodes_Click(object sender, RoutedEventArgs e)
00944         {
00945             for (int i = 1; i <= 50; i++)
00946             {
00947                 TestTreeView.RootNodes.Add(new TreeViewNode() { Content = "Node " + i });
00948             }
00949         }
00950
00951         private void SelectLastRootNode_Click(object sender, RoutedEventArgs e)
00952         {
00953             TestTreeView.SelectedNode = TestTreeView.RootNodes[TestTreeView.RootNodes.Count-1];
00954         }
00955
00956         private void TreeViewLateDataInitTestPage_Click(object sender, RoutedEventArgs e)
00957         {
00958             Frame.NavigateWithoutAnimation(typeof(TreeViewLateDataInitTest));
00959         }
00960
00961         private void ToggleRoot0Selection_Click(object sender, RoutedEventArgs e)
00962         {
00963             TestTreeView.SelectedNode = TestTreeView.SelectedNode == null ? TestTreeView.RootNodes[0].Children[0] : null;
00964             ContentModeTestTreeView.SelectedItem = ContentModeTestTreeView.SelectedItem==null ? TestTreeViewItemsSource[0].Children[0] : null;
00965         }
00966
00967         private void TreeViewNodeInMarkupTestPage_Click(object sender, RoutedEventArgs e)
00968         {
00969             Frame.NavigateWithoutAnimation(typeof(TreeViewNodeInMarkupTestPage));
00970         }
00971
00972         private void TreeViewUnrealizedChildrenTestPage_Click(object sender, RoutedEventArgs e)
00973         {
00974             Frame.NavigateWithoutAnimation(typeof(TreeViewUnrealizedChildrenTestPage));
00975         }
00976
00977         private void TreeViewItemsSourceTestPage_Click(object sender, RoutedEventArgs e)
00978         {
00979             Frame.NavigateWithoutAnimation(typeof(TreeViewItemsSourceTestPage));
00980         }
00981
00982         private void ClearException_Click(object sender, RoutedEventArgs e)
00983         {
00984             ExceptionMessage.Text = string.Empty;
00985         }
00986
00987         private async void ResetItemsSourceAsync_Click(object sender, RoutedEventArgs e)
00988         {
00989             TestTreeViewItemsSource = await PrepareItemsSourceAsync();
00990             this.Bindings.Update();
00991         }
00992
00993         private void ResetItemsSource_Click(object sender, RoutedEventArgs e)
00994         {
00995             ContentModeTestTreeView.ItemsSource = PrepareItemsSource(expandRootNode: true);
00996         }
00997
00998         private void ExpandRootNode_Click(object sender, RoutedEventArgs e)
00999         {
01000             TestTreeViewItemsSource[0].IsExpanded = !TestTreeViewItemsSource[0].IsExpanded;
01001         }
01002
01003         private void SwapItemsSource_Click(object sender, RoutedEventArgs e)
01004         {
01005             if (ContentModeTestTreeView.ItemsSource == TestTreeView2ItemsSource)
01006             {
01007                 this.ContentModeTestTreeView.ItemsSource = TestTreeViewItemsSource;
01008             }
01009             else
01010             {
01011                 this.ContentModeTestTreeView.ItemsSource = TestTreeView2ItemsSource;
01012             }
01013         }
01014
01015         private void TwoWayBoundButton_Click(object sender, RoutedEventArgs e)
01016         {
01017             TwoWayBoundButton.Content = TestTreeView.RootNodes[0].Children[1];
01018         }
01019
01020         private void SelectRoot2Item_Click(object sender, RoutedEventArgs e)
01021         {
01022             TestTreeView.SelectedItem = TestTreeView.RootNodes[0].Children[2];
01023         }
01024         private void ReadBindingResult_Click(object sender, RoutedEventArgs e)
01025         {
01026             Results.Text = ((TwoWayBoundButton.Content as TreeViewNode).Content as string)
01027                 + ";" + (TestTreeView.SelectedItem as TreeViewNode).Content as string;
01028         }
01029
01030         private void LoadPerfTreeView_Click(object sender, RoutedEventArgs e)
01031         {
01032             TreeViewNode rootNode = new TreeViewNode() { Content = "Root" };
01033             for (int level1Index = 0; level1Index < 10; level1Index++)
01034             {
01035                 TreeViewNode level1 = new TreeViewNode()
01036                 {
01037                     Content = level1Index,
01038                 };
01039                 rootNode.Children.Add(level1);
01040
01041                 for (int level2Index = 0; level2Index < 5000; level2Index++)
01042                 {
01043                     TreeViewNode level2 = new TreeViewNode()
01044                     {
01045                         Content = level1Index + "_" + level2Index,
01046                     };
01047                     level1.Children.Add(level2);
01048                 }
01049             }
01050             PerfScenarioTreeView.RootNodes.Clear();
01051             PerfScenarioTreeView.RootNodes.Add(rootNode);
01052         }
01053     }
01054 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewDisplayModeChangedEventArgs Member List

This is the complete list of members for NavigationViewDisplayModeChangedEventArgs, including all inherited members.
DisplayMode() | NavigationViewDisplayModeChangedEventArgs
DisplayMode(winrt::NavigationViewDisplayMode value) | NavigationViewDisplayModeChangedEventArgs
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorMatrixEffect Member List

This is the complete list of members for ColorMatrixEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1ColorMatrix) | ColorMatrixEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"ColorMatrix", D2D1_COLORMATRIX_PROP_COLOR_MATRIX, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"AlphaMode", D2D1_COLORMATRIX_PROP_ALPHA_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_COLORMATRIX_ALPHA_MODE},{L"ClampOutput", D2D1_COLORMATRIX_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | ColorMatrixEffect |
DECLARE_POD_PROPERTY(ColorMatrix, winrt::Matrix5x4,(winrt::Matrix5x4{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0}), true) | ColorMatrixEffect |
DECLARE_POD_PROPERTY(AlphaMode, winrt::CanvasAlphaMode, winrt::CanvasAlphaMode::Premultiplied, value!=winrt::CanvasAlphaMode::Ignore) | ColorMatrixEffect |
DECLARE_POD_PROPERTY(ClampOutput, bool, false, true) | ColorMatrixEffect |
DECLARE_SINGLE_SOURCE(Source) | ColorMatrixEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | ColorMatrixEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | ColorMatrixEffect | [inline]
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ListViewBasePage Member List

This is the complete list of members for ListViewBasePage, including all inherited members.
_colEntities | ListViewBasePage | [private]
_listViewBase | ListViewBasePage | [private]
_lstQueuedOperations | ListViewBasePage | [private]
_modernPanelTemplate | ListViewBasePage | [private]
_queuedOperationsTimer | ListViewBasePage | [private]
_scrollViewer | ListViewBasePage | [private]
AppendEventMessage(string eventMessage) | ListViewBasePage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceAddItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceGetItemCount_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceInsertItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceRaiseResetNotification_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceRemoveAllItems_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceRemoveItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceReplaceItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnDataSourceSetItemCount_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetItemsPanelMargin_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetItemsPanelOrientation_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetListViewBaseReorderMode_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetListViewBaseSelectionMode_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetListViewBaseTabNavigation_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetScrollViewerExtentHeight_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetScrollViewerExtentWidth_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetScrollViewerHorizontalOffset_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetScrollViewerVerticalOffset_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetScrollViewerViewportHeight_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnGetScrollViewerViewportWidth_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnQueueDataSourceAddItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnQueueDataSourceInsertItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnQueueDataSourceRaiseResetNotification_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnQueueDataSourceRemoveAllItems_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnQueueDataSourceRemoveItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnQueueDataSourceReplaceItem_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnSetItemsPanelMargin_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnSetItemsPanelOrientation_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnSetListViewBaseReorderMode_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnSetListViewBaseSelectionMode_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
BtnSetListViewBaseTabNavigation_Click(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkDataSource_Checked(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkDataSource_Unchecked(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseAllowDrop_IsCheckedChanged(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseCanDragItems_IsCheckedChanged(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseCanReorderItems_IsCheckedChanged(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseIsItemClickEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseIsSwipeEnabled_IsCheckedChanged(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseProperties_Checked(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseProperties_Unchecked(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkListViewBaseSingleSelectionFollowsFocus_IsCheckedChanged(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
CmbListViewBaseFooter_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewBasePage | [inline, private]
CmbListViewBaseHeader_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewBasePage | [inline, private]
CmbListViewBaseItemsPanelType_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewBasePage | [inline, private]
CmbScrollViewerHorizontalSnapPointsAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewBasePage | [inline, private]
CmbScrollViewerHorizontalSnapPointsType_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewBasePage | [inline, private]
CmbScrollViewerVerticalSnapPointsAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewBasePage | [inline, private]
CmbScrollViewerVerticalSnapPointsType_SelectionChanged(object sender, SelectionChangedEventArgs e) | ListViewBasePage | [inline, private]
DataSourceAddItem() | ListViewBasePage | [inline, private]
DataSourceInsertItem(int newItemIndex) | ListViewBasePage | [inline, private]
DataSourceRaiseResetNotification() | ListViewBasePage | [inline, private]
DataSourceRemoveAllItems() | ListViewBasePage | [inline, private]
DataSourceRemoveItem(int oldItemIndex) | ListViewBasePage | [inline, private]
DataSourceReplaceItem(int itemIndex) | ListViewBasePage | [inline, private]
EnqueueOperation(QueuedOperationType queuedOperationType) | ListViewBasePage | [inline, private]
EnqueueOperation(QueuedOperation queuedOperation) | ListViewBasePage | [inline, private]
ExecuteQueuedOperations() | ListViewBasePage | [inline, private]
FindElementOfTypeInSubtree< T >(DependencyObject element) | ListViewBasePage | [inline, private, static]
GetBitmapImage(int index) | ListViewBasePage | [inline, private]
GetThicknessFromString(string thickness) | ListViewBasePage | [inline, private]
ListViewBase_ItemClick(object sender, ItemClickEventArgs e) | ListViewBasePage | [inline, private]
ListViewBasePage() | ListViewBasePage | [inline]
ListViewBasePage_Loaded(object sender, RoutedEventArgs e) | ListViewBasePage | [inline, private]
NbItemsWrapGridMaximumRowsOrColumns_ValueChanged(object sender, object e) | ListViewBasePage | [inline, private]
OnNavigatedTo(NavigationEventArgs e) | ListViewBasePage | [inline, protected]
QueuedOperationsTimer_Tick(object sender, object e) | ListViewBasePage | [inline, private]
QueuedOperationType enum name | ListViewBasePage | [private]
RestoreScrollViewerWidth() | ListViewBasePage | [inline, private]
UpdateDataSourceItemCount() | ListViewBasePage | [inline, private]
UpdateItemsPanelMargin() | ListViewBasePage | [inline, private]
UpdateItemsPanelOrientation() | ListViewBasePage | [inline, private]
UpdateItemsPanelProperties() | ListViewBasePage | [inline, private]
UpdateItemsPanelType() | ListViewBasePage | [inline, private]
UpdateItemsWrapGridMaximumRowsOrColumns() | ListViewBasePage | [inline, private]
UpdateListViewBaseReorderMode() | ListViewBasePage | [inline, private]
UpdateListViewBaseSelectionMode() | ListViewBasePage | [inline, private]
UpdateListViewBaseSingleSelectionFollowsFocus() | ListViewBasePage | [inline, private]
UpdateListViewBaseTabNavigation() | ListViewBasePage | [inline, private]
UpdateModernPanelUIVisibility(Visibility visibility) | ListViewBasePage | [inline, private]
UpdateScrollViewerExtentHeight() | ListViewBasePage | [inline, private]
UpdateScrollViewerExtentWidth() | ListViewBasePage | [inline, private]
UpdateScrollViewerHorizontalOffset() | ListViewBasePage | [inline, private]
UpdateScrollViewerHorizontalSnapPointsType() | ListViewBasePage | [inline, private]
UpdateScrollViewerProperties() | ListViewBasePage | [inline, private]
UpdateScrollViewerScrollOrientation() | ListViewBasePage | [inline, private]
UpdateScrollViewerSizeProperties() | ListViewBasePage | [inline, private]
UpdateScrollViewerVerticalOffset() | ListViewBasePage | [inline, private]
UpdateScrollViewerVerticalSnapPointsType() | ListViewBasePage | [inline, private]
UpdateScrollViewerViewportHeight() | ListViewBasePage | [inline, private]
UpdateScrollViewerViewportWidth() | ListViewBasePage | [inline, private]
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ResetableCollection-g< T > Member List

This is the complete list of members for ResetableCollection-g< T >, including all inherited members.
_rnd | ResetableCollection-g< T > | [private]
ResetableCollection(IEnumerable< T > collection) | ResetableCollection-g< T > | [inline]
ShuffleAndReset() | ResetableCollection-g< T > | [inline]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/MicaBackdrop/MicaBackdrop.h Source File

  • File List
  • File Members
  • Materials
  • MicaBackdrop

MicaBackdrop.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "winrt/Microsoft.UI.Composition.SystemBackdrops.h"
00006 #include <winrt/windows.system.h>
00007
00008 #include "MicaBackdrop.g.h"
00009 #include "MicaBackdrop.properties.h"
00010
00011 using namespace winrt::Microsoft::UI::Composition;
00012 using namespace winrt::Microsoft::UI::Composition::SystemBackdrops;
00013
00014 class MicaBackdrop :
00015     public ReferenceTracker<MicaBackdrop, winrt::implementation::MicaBackdropT>,
00016     public MicaBackdropProperties
00017 {
00018 public:
00019     MicaBackdrop() = default;
00020     virtual ~MicaBackdrop() = default;
00021
00022     void OnTargetConnected(ICompositionSupportsSystemBackdrop connectedTarget, winrt::Microsoft::UI::Xaml::XamlRoot xamlRoot);
00023     void OnTargetDisconnected(ICompositionSupportsSystemBackdrop disconnectedTarget);
00024
00025     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00026
00027 private:
00028     class ControllerEntry
00029     {
00030     public:
00031         ControllerEntry(ICompositionSupportsSystemBackdrop target, MicaController controller, SystemBackdropConfiguration configuration);
00032         ~ControllerEntry();
00033
00034         // Block copy and assignment. This class is meant to be constructed in-place in the list.
00035         ControllerEntry(const ControllerEntry& other) = delete;
00036         ControllerEntry& operator=(const ControllerEntry& other) = delete;
00037
00038         ICompositionSupportsSystemBackdrop m_target;
00039         MicaController m_controller;
00040     };
00041
00042     std::vector<std::unique_ptr<ControllerEntry>> m_controllers;
00043 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/RepeaterTestUIPage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI

RepeaterTestUIPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Private.Controls;
00006 using Microsoft.UI.Xaml.Controls;
00007 using MUXControlsTestApp.Samples;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     [TopLevelTestPage(Name="ItemsRepeater", Icon="ItemsRepeater.png")]
00012     public sealed partial class RepeaterTestUIPage : Page
00013     {
00014         private VirtualizingLayout _stackLayout;
00015         private VirtualizingLayout _gridLayout;
00016         private VirtualizingLayout _flowLayout;
00017
00018         public RepeaterTestUIPage()
00019         {
00020             this.InitializeComponent();
00021
00022             objectModelTest.Click += delegate
00023             {
00024                 Frame.NavigateWithoutAnimation(typeof(ObjectModelTestPage));
00025             };
00026
00027             defaultDemo.Click += delegate
00028             {
00029                 Frame.NavigateWithoutAnimation(typeof(Defaults));
00030             };
00031
00032             basicDemo.Click += delegate
00033             {
00034                 Frame.NavigateWithoutAnimation(typeof(BasicDemo));
00035             };
00036
00037             linedFlowLayoutDemo.Click += delegate
00038             {
00039                 Frame.NavigateWithoutAnimation(typeof(LinedFlowLayoutDemo));
00040             };
00041
00042             uniformGridLayoutDemo.Click += delegate
00043             {
00044                 Frame.NavigateWithoutAnimation(typeof(UniformGridLayoutDemo));
00045             };
00046
00047             keyboardNavigationSample.Click += delegate
00048             {
00049                 Frame.NavigateWithoutAnimation(typeof(KeyboardNavigationSample));
00050             };
00051
00052             itemsSourceDemo.Click += delegate
00053             {
00054                 Frame.NavigateWithoutAnimation(typeof(ElementsInItemsSourcePage));
00055             };
00056
00057             itemTemplateDemo.Click += delegate
00058             {
00059                 Frame.NavigateWithoutAnimation(typeof(ItemTemplateDemo));
00060             };
00061
00062             collectionChangeDemo.Click += delegate
00063             {
00064                 Frame.NavigateWithoutAnimation(typeof(CollectionChangeDemo));
00065             };
00066
00067             sortingAndFilteringDemo.Click += delegate {
00068                 Frame.NavigateWithoutAnimation(typeof(SortingAndFilteringPage));
00069             };
00070
00071             variableSizedItemsDemo.Click += delegate {
00072                 Frame.NavigateWithoutAnimation(typeof(VariableSizedItemsPage));
00073             };
00074
00075             animationsDemo.Click += delegate
00076             {
00077                 Frame.NavigateWithoutAnimation(typeof(AnimationsDemoPage));
00078             };
00079
00080             circleLayoutDemo.Click += delegate
00081             {
00082                 Frame.NavigateWithoutAnimation(typeof(CircleLayoutSamplePage));
00083             };
00084
00085             nonVirtualStackLayoutDemo.Click += delegate
00086             {
00087                 Frame.NavigateWithoutAnimation(typeof(NonVirtualStackLayoutSamplePage));
00088             };
00089
00090             virtualFixedStackLayoutDemo.Click += delegate
00091             {
00092                 Frame.NavigateWithoutAnimation(typeof(VirtualizingUniformStackLayoutSamplePage));
00093             };
00094
00095             virtualStackLayoutDemo.Click += delegate
00096             {
00097                 Frame.NavigateWithoutAnimation(typeof(VirtualizingStackLayoutSamplePage));
00098             };
00099
00100             pinterestLayoutDemo.Click += delegate
00101             {
00102                 Frame.NavigateWithoutAnimation(typeof(PinterestLayoutSamplePage));
00103             };
00104
00105             flowLayoutDemo.Click += delegate
00106             {
00107                 Frame.NavigateWithoutAnimation(typeof(FlowLayoutDemoPage));
00108             };
00109
00110             activityFeedLayoutDemo.Click += delegate
00111             {
00112                 Frame.NavigateWithoutAnimation(typeof(ActivityFeedSamplePage));
00113             };
00114
00115             storeDemo.Click += delegate
00116             {
00117                 Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.StoreDemoPage));
00118             };
00119
00120             flatSelectionDemo.Click += delegate
00121             {
00122                 Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.Selection.FlatSample));
00123             };
00124
00125             groupedSelectionDemo.Click += delegate
00126             {
00127                 Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.Selection.GroupedSample));
00128             };
00129
00130             treeSelectionDemo.Click += delegate
00131             {
00132                 Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.Selection.TreeViewSample));
00133             };
00134
00135             animatedScrollDemo.Click += delegate {
00136                 Frame.NavigateWithoutAnimation(typeof(MUXControlsTestApp.Samples.ScaleAnimatedVerticalListDemo));
00137             };
00138
00139             noGroupingList.Click += delegate
00140             {
00141                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00142                     new PageInfo()
00143                     {
00144                         Level0Layout = GetStackLayout(),
00145                         NumLevels = 0,
00146                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00147                     });
00148             };
00149
00150             noGroupingGrid.Click += delegate
00151             {
00152                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00153                     new PageInfo()
00154                     {
00155                         Level0Layout = GetGridLayout(),
00156                         NumLevels = 0,
00157                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00158                     });
00159             };
00160
00161             noGroupingFlow.Click += delegate
00162             {
00163                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00164                     new PageInfo()
00165                     {
00166                         Level0Layout = GetFlowLayout(),
00167                         NumLevels = 0,
00168                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00169                     });
00170             };
00171
00172             groupedList.Click += delegate
00173             {
00174                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00175                     new PageInfo()
00176                     {
00177                         Level0Layout = GetStackLayout(),
00178                         Level1Layout = GetStackLayout(),
00179                         NumLevels = 1,
00180                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00181                     });
00182             };
00183
00184             groupedGrid.Click += delegate
00185             {
00186                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00187                     new PageInfo()
00188                     {
00189                         Level0Layout = GetStackLayout(),
00190                         Level1Layout = GetGridLayout(),
00191                         NumLevels = 1,
00192                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00193                     });
00194             };
00195
00196             groupedFlow.Click += delegate
00197             {
00198                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00199                     new PageInfo()
00200                     {
00201                         Level0Layout = GetStackLayout(),
00202                         Level1Layout = GetFlowLayout(),
00203                         NumLevels = 1,
00204                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00205                     });
00206             };
00207
00208             nestedList.Click += delegate
00209             {
00210                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00211                     new PageInfo()
00212                     {
00213                         Level0Layout = GetStackLayout(),
00214                         Level1Layout = GetStackLayout(),
00215                         Level2Layout = GetStackLayout(),
00216                         NumLevels = 2,
00217                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00218                     });
00219             };
00220
00221             nestedGrid.Click += delegate
00222             {
00223                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00224                     new PageInfo()
00225                     {
00226                         Level0Layout = GetStackLayout(),
00227                         Level1Layout = GetStackLayout(),
00228                         Level2Layout = GetGridLayout(),
00229                         NumLevels = 2,
00230                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00231                     });
00232             };
00233
00234             nestedFlow.Click += delegate
00235             {
00236                 Frame.NavigateWithoutAnimation(typeof(ItemsViewWithDataPage),
00237                     new PageInfo()
00238                     {
00239                         Level0Layout = GetStackLayout(),
00240                         Level1Layout = GetStackLayout(),
00241                         Level2Layout = GetFlowLayout(),
00242                         NumLevels = 2,
00243                         Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00244                     });
00245             };
00246         }
00247
00248         private void CmbOutputDebugStringLevels_SelectionChanged(object sender, SelectionChangedEventArgs e)
00249         {
00250             if (chkScrollView != null && chkScrollView.IsChecked == true)
00251             {
00252                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00253                     "ScrollView",
00254                     cmbOutputDebugStringLevels.SelectedIndex == 1 || cmbOutputDebugStringLevels.SelectedIndex == 2,
00255                     cmbOutputDebugStringLevels.SelectedIndex == 2);
00256             }
00257
00258             if (chkLinedFlowLayout != null && chkLinedFlowLayout.IsChecked == true)
00259             {
00260                 MUXControlsTestHooks.SetOutputDebugStringLevelForType(
00261                     "LinedFlowLayout",
00262                     cmbOutputDebugStringLevels.SelectedIndex == 1 || cmbOutputDebugStringLevels.SelectedIndex == 2,
00263                     cmbOutputDebugStringLevels.SelectedIndex == 2);
00264             }
00265         }
00266
00267         private VirtualizingLayout GetStackLayout()
00268         {
00269             if (_stackLayout == null)
00270             {
00271                 _stackLayout = new StackLayout()
00272                 {
00273                     Spacing = double.Parse(lineSpacing.Text),
00274                     Orientation = orientation.IsOn ? Orientation.Horizontal : Orientation.Vertical,
00275                 };
00276             }
00277
00278             return _stackLayout;
00279         }
00280
00281         private VirtualizingLayout GetGridLayout()
00282         {
00283             if (_gridLayout == null)
00284             {
00285                 _gridLayout = new UniformGridLayout()
00286                 {
00287                     MinItemWidth = 150,
00288                     MinItemHeight = 150,
00289                     MinRowSpacing = double.Parse(itemSpacing.Text),
00290                     MinColumnSpacing = double.Parse(lineSpacing.Text),
00291                     ItemsJustification = (UniformGridLayoutItemsJustification)Enum.Parse(typeof(UniformGridLayoutItemsJustification), lineAlignment.Text),
00292                     Orientation = orientation.IsOn ?  Orientation.Vertical: Orientation.Horizontal,
00293                 };
00294             }
00295
00296             return _gridLayout;
00297         }
00298
00299         private VirtualizingLayout GetFlowLayout()
00300         {
00301             if (_flowLayout == null)
00302             {
00303                 _flowLayout = new FlowLayout()
00304                 {
00305                     MinRowSpacing = double.Parse(itemSpacing.Text),
00306                     MinColumnSpacing = double.Parse(lineSpacing.Text),
00307                     LineAlignment = (FlowLayoutLineAlignment)Enum.Parse(typeof(FlowLayoutLineAlignment), lineAlignment.Text),
00308                     Orientation = orientation.IsOn ? Orientation.Vertical : Orientation.Horizontal,
00309                 };
00310             }
00311
00312             return _flowLayout;
00313         }
00314
00315     }
00316
00317     public class PageInfo
00318     {
00319         public VirtualizingLayout Level0Layout { get; set; }
00320         public VirtualizingLayout Level1Layout { get; set; }
00321         public VirtualizingLayout Level2Layout { get; set; }
00322         public int NumLevels { get; set; }
00323         public Orientation Orientation { get; set; }
00324     }
00325 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavViewPageData Member List

This is the complete list of members for NavViewPageData, including all inherited members.
Name | NavViewPageData |
NavViewPageData(string name) | NavViewPageData | [inline]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeItem.properties.h Source File

  • File List
  • File Members
  • Generated

SwipeItem.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class SwipeItemProperties
00008 {
00009 public:
00010     SwipeItemProperties();
00011
00012     void Background(winrt::Brush const& value);
00013     winrt::Brush Background();
00014
00015     void BehaviorOnInvoked(winrt::SwipeBehaviorOnInvoked const& value);
00016     winrt::SwipeBehaviorOnInvoked BehaviorOnInvoked();
00017
00018     void Command(winrt::ICommand const& value);
00019     winrt::ICommand Command();
00020
00021     void CommandParameter(winrt::IInspectable const& value);
00022     winrt::IInspectable CommandParameter();
00023
00024     void Foreground(winrt::Brush const& value);
00025     winrt::Brush Foreground();
00026
00027     void IconSource(winrt::IconSource const& value);
00028     winrt::IconSource IconSource();
00029
00030     void Text(winrt::hstring const& value);
00031     winrt::hstring Text();
00032
00033     static winrt::DependencyProperty BackgroundProperty() { return s_BackgroundProperty; }
00034     static winrt::DependencyProperty BehaviorOnInvokedProperty() { return s_BehaviorOnInvokedProperty; }
00035     static winrt::DependencyProperty CommandProperty() { return s_CommandProperty; }
00036     static winrt::DependencyProperty CommandParameterProperty() { return s_CommandParameterProperty; }
00037     static winrt::DependencyProperty ForegroundProperty() { return s_ForegroundProperty; }
00038     static winrt::DependencyProperty IconSourceProperty() { return s_IconSourceProperty; }
00039     static winrt::DependencyProperty TextProperty() { return s_TextProperty; }
00040
00041     static GlobalDependencyProperty s_BackgroundProperty;
00042     static GlobalDependencyProperty s_BehaviorOnInvokedProperty;
00043     static GlobalDependencyProperty s_CommandProperty;
00044     static GlobalDependencyProperty s_CommandParameterProperty;
00045     static GlobalDependencyProperty s_ForegroundProperty;
00046     static GlobalDependencyProperty s_IconSourceProperty;
00047     static GlobalDependencyProperty s_TextProperty;
00048
00049     winrt::event_token Invoked(winrt::TypedEventHandler<winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs> const& value);
00050     void Invoked(winrt::event_token const& token);
00051
00052     event_source<winrt::TypedEventHandler<winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs>> m_invokedEventSource;
00053
00054     static void EnsureProperties();
00055     static void ClearProperties();
00056
00057     static void OnBackgroundPropertyChanged(
00058         winrt::DependencyObject const& sender,
00059         winrt::DependencyPropertyChangedEventArgs const& args);
00060
00061     static void OnBehaviorOnInvokedPropertyChanged(
00062         winrt::DependencyObject const& sender,
00063         winrt::DependencyPropertyChangedEventArgs const& args);
00064
00065     static void OnCommandPropertyChanged(
00066         winrt::DependencyObject const& sender,
00067         winrt::DependencyPropertyChangedEventArgs const& args);
00068
00069     static void OnCommandParameterPropertyChanged(
00070         winrt::DependencyObject const& sender,
00071         winrt::DependencyPropertyChangedEventArgs const& args);
00072
00073     static void OnForegroundPropertyChanged(
00074         winrt::DependencyObject const& sender,
00075         winrt::DependencyPropertyChangedEventArgs const& args);
00076
00077     static void OnIconSourcePropertyChanged(
00078         winrt::DependencyObject const& sender,
00079         winrt::DependencyPropertyChangedEventArgs const& args);
00080
00081     static void OnTextPropertyChanged(
00082         winrt::DependencyObject const& sender,
00083         winrt::DependencyPropertyChangedEventArgs const& args);
00084 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/ItemTemplateTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

ItemTemplateTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using System;
00007 using System.Collections.Generic;
00008 using System.Linq;
00009 using System.Runtime.InteropServices;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Markup;
00013 using Microsoft.UI.Xaml.Media;
00014 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00015 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks;
00016 using Microsoft.UI.Xaml.Controls;
00017 using Microsoft.UI.Private.Controls;
00018
00019 using WEX.TestExecution;
00020 using WEX.TestExecution.Markup;
00021 using WEX.Logging.Interop;
00022
00023 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00024 {
00025     using RecyclingElementFactory = Microsoft.UI.Xaml.Controls.RecyclingElementFactory;
00026
00027     [TestClass]
00028     public class ItemTemplateTests : ApiTestBase
00029     {
00030         [TestMethod]
00031         public void ValidateRecycling()
00032         {
00033             RunOnUIThread.Execute(() =>
00034             {
00035                 var elementFactory = new RecyclingElementFactory()
00036                 {
00037                     RecyclePool = new RecyclePool(),
00038                 };
00039                 elementFactory.Templates["even"] = (DataTemplate)XamlReader.Load(
00040                     @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00041                         <TextBlock Text='even' />
00042                     </DataTemplate>");
00043                 elementFactory.Templates["odd"] = (DataTemplate)XamlReader.Load(
00044                     @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00045                         <TextBlock Text='odd' />
00046                     </DataTemplate>");
00047
00048                 elementFactory.SelectTemplateKey +=
00049                 delegate (RecyclingElementFactory sender, SelectTemplateEventArgs args)
00050                 {
00051                     args.TemplateKey = ((int)args.DataContext % 2 == 0) ? "even" : "odd";
00052                 };
00053
00054                 const int numItems = 10;
00055                 ItemsRepeater repeater = new ItemsRepeater()
00056                 {
00057                     ItemsSource = Enumerable.Range(0, numItems),
00058                     ItemTemplate = elementFactory,
00059                 };
00060
00061                 var context = new ElementFactoryGetArgs();
00062                 context.Parent = repeater;
00063                 var clearContext = new ElementFactoryRecycleArgs();
00064                 clearContext.Parent = repeater;
00065
00066                 // Element0 is of type even, a new one should be created
00067                 context.Data = 0;
00068                 var element0 = elementFactory.GetElement(context);
00069                 Verify.IsNotNull(element0);
00070                 Verify.AreEqual("even", (element0 as TextBlock).Text);
00071                 clearContext.Element = element0;
00072                 elementFactory.RecycleElement(clearContext);
00073
00074                 // Element1 is of type odd, a new one should be created
00075                 context.Data = 1;
00076                 var element1 = elementFactory.GetElement(context);
00077                 Verify.IsNotNull(element1);
00078                 Verify.AreNotSame(element0, element1);
00079                 Verify.AreEqual("odd", (element1 as TextBlock).Text);
00080                 clearContext.Element = element1;
00081                 elementFactory.RecycleElement(clearContext);
00082
00083                 // Element0 should be recycled for element2
00084                 context.Data = 2;
00085                 var element2 = elementFactory.GetElement(context);
00086                 Verify.AreEqual("even", (element2 as TextBlock).Text);
00087                 Verify.AreSame(element0, element2);
00088
00089                 // Element1 should be recycled for element3
00090                 context.Data = 3;
00091                 var element3 = elementFactory.GetElement(context);
00092                 Verify.AreEqual("odd", (element3 as TextBlock).Text);
00093                 Verify.AreSame(element1, element3);
00094             });
00095         }
00096
00097         // Validate data context propagation and template selection
00098         [TestMethod]
00099         public void ValidateBindingAndTemplateSelection()
00100         {
00101             RunOnUIThread.Execute(() =>
00102             {
00103                 var staticTemplate = (DataTemplate)XamlReader.Load(
00104                    @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00105                         <TextBlock Text='static' />
00106                     </DataTemplate>");
00107                 var bindTemplate = (DataTemplate)XamlReader.Load(
00108                     @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00109                         <TextBlock Text='{Binding}' />
00110                     </DataTemplate>");
00111                 var elementFactory = new RecyclingElementFactory()
00112                 {
00113                     RecyclePool = new RecyclePool(),
00114                     Templates =
00115                     {
00116                         { "static", staticTemplate },
00117                         { "bind", bindTemplate }
00118                     }
00119                 };
00120
00121                 elementFactory.SelectTemplateKey +=
00122                 delegate (RecyclingElementFactory sender, SelectTemplateEventArgs args)
00123                 {
00124                     args.TemplateKey = ((int)args.DataContext % 2 == 0) ? "bind" : "static";
00125                 };
00126
00127                 const int numItems = 10;
00128                 ItemsRepeater repeater = null;
00129                 Content = CreateAndInitializeRepeater
00130                 (
00131                     itemsSource: Enumerable.Range(0, numItems),
00132                     elementFactory: elementFactory,
00133                     layout: new StackLayout(),
00134                     repeater: ref repeater
00135                 );
00136
00137                 Content.UpdateLayout();
00138
00139                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00140                 for (int i = 0; i < numItems; i++)
00141                 {
00142                     var element = (TextBlock)repeater.TryGetElement(i);
00143                     if (i % 2 == 0)
00144                     {
00145                         // Text is bound to the data for even indicies
00146                         Verify.AreEqual(i.ToString(), element.Text);
00147                         Verify.AreEqual(i, element.DataContext);
00148                     }
00149                     else
00150                     {
00151                         // Text explicitly set on the element only for odd indicies
00152                         Verify.AreEqual("static", element.Text);
00153                     }
00154                 }
00155             });
00156         }
00157
00158         [TestMethod]
00159         public void ValidateCustomRecyclingElementFactory()
00160         {
00161             RunOnUIThread.Execute(() =>
00162             {
00163                 var itemTemplate = (DataTemplate)XamlReader.Load(
00164                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00165                             <TextBlock Text='uninitialized' />
00166                         </DataTemplate>");
00167                 ItemsRepeater repeater = null;
00168                 const int numItems = 10;
00169                 Content = CreateAndInitializeRepeater
00170                 (
00171                    itemsSource: Enumerable.Range(0, numItems).Select(i => string.Format("Item #{0}", i)),
00172                    elementFactory: new RecyclingElementFactoryDerived()
00173                    {
00174                        Templates = { { "key", itemTemplate } },
00175                        RecyclePool = new RecyclePool(),
00176                        GetElementFunc = delegate (int index, UIElement owner, UIElement elementFromBase)
00177                        {
00178                            ((TextBlock)elementFromBase).Text = index.ToString();
00179                            return elementFromBase;
00180                        },
00181                        ClearElementFunc = delegate (UIElement element, UIElement owner)
00182                        {
00183                            ((TextBlock)element).Text = "uninitialized";
00184                        },
00185                        SelectTemplateIdFunc = delegate (object data, UIElement owner)
00186                        {
00187                            return "key";
00188                        },
00189                    },
00190                    layout: new StackLayout(),
00191                    repeater: ref repeater
00192                 );
00193
00194                 Content.UpdateLayout();
00195                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00196                 for (int i = 0; i < numItems; i++)
00197                 {
00198                     var element = (TextBlock)repeater.TryGetElement(i);
00199                     Verify.AreEqual(i.ToString(), element.Text);
00200                 }
00201             });
00202         }
00203
00204         [TestMethod]
00205         public void ValidateRecyclingElementFactoryWithSingleTemplate()
00206         {
00207             RunOnUIThread.Execute(() =>
00208             {
00209                 var itemTemplate = (DataTemplate)XamlReader.Load(
00210                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00211                             <TextBlock Text='uninitialized' />
00212                         </DataTemplate>");
00213                 ItemsRepeater repeater = null;
00214                 const int numItems = 10;
00215                 var elementFactory = new RecyclingElementFactoryDerived()
00216                 {
00217                     Templates = { { "key", itemTemplate } },
00218                     RecyclePool = new RecyclePool(),
00219                     GetElementFunc = delegate (int index, UIElement owner, UIElement elementFromBase)
00220                     {
00221                         ((TextBlock)elementFromBase).Text = index.ToString();
00222                         return elementFromBase;
00223                     },
00224                     ClearElementFunc = delegate (UIElement element, UIElement owner)
00225                     {
00226                         ((TextBlock)element).Text = "uninitialized";
00227                     },
00228                 };
00229
00230                 elementFactory.SelectTemplateKey += delegate (RecyclingElementFactory sender, SelectTemplateEventArgs args)
00231                 {
00232                     Verify.Fail("SelectTemplateKey event should not be raised when using a single template");
00233                 };
00234
00235                 Content = CreateAndInitializeRepeater
00236                 (
00237                    itemsSource: Enumerable.Range(0, numItems).Select(i => string.Format("Item #{0}", i)),
00238                    elementFactory: elementFactory,
00239                    layout: new StackLayout(),
00240                    repeater: ref repeater
00241                 );
00242
00243                 Content.UpdateLayout();
00244                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00245                 for (int i = 0; i < numItems; i++)
00246                 {
00247                     var element = (TextBlock)repeater.TryGetElement(i);
00248                     Verify.AreEqual(i.ToString(), element.Text);
00249                 }
00250             });
00251         }
00252
00253         [TestMethod]
00254         public void ValidateDataTemplateWithElementNameBinding()
00255         {
00256             ValidateDataTemplateWithElementNameBinding(useNestedElements: false);
00257         }
00258
00259         [TestMethod]
00260         public void ValidateDataTemplateWithNestedElementNameBinding()
00261         {
00262             ValidateDataTemplateWithElementNameBinding(useNestedElements: true);
00263         }
00264
00265         private void ValidateDataTemplateWithElementNameBinding(bool useNestedElements)
00266         {
00267             const int numItems = 5;
00268             ItemsRepeater itemsRepeater = null;
00269
00270             RunOnUIThread.Execute(() =>
00271             {
00272                 DataTemplate dataTemplate = null;
00273
00274                 if (useNestedElements)
00275                 {
00276                     dataTemplate = XamlReader.Load(
00277                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00278                             <Border BorderThickness='1'>
00279                                 <TextBlock Text='{Binding}' Tag='{Binding ElementName=siblingTextBlock, Path=Text}'/>
00280                             </Border>
00281                         </DataTemplate>") as DataTemplate;
00282                 }
00283                 else
00284                 {
00285                     dataTemplate = XamlReader.Load(
00286                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00287                             <TextBlock Text='{Binding}' Tag='{Binding ElementName=siblingTextBlock, Path=Text}'/>
00288                         </DataTemplate>") as DataTemplate;
00289                 }
00290
00291                 var stackPanel = new StackPanel()
00292                 {
00293                     Name = "stackPanel",
00294                     Width = 200
00295                 };
00296
00297                 var siblingTextBlock = new TextBlock()
00298                 {
00299                     Name = "siblingTextBlock",
00300                     Text = "DataSource"
00301                 };
00302
00303                 itemsRepeater = new ItemsRepeater()
00304                 {
00305                     Name = "itemsRepeater",
00306                     ItemsSource = Enumerable.Range(0, numItems).Select(i => i.ToString()),
00307                     Layout = new StackLayout(),
00308                     ItemTemplate = dataTemplate
00309                 };
00310
00311                 stackPanel.Children.Add(siblingTextBlock);
00312                 stackPanel.Children.Add(itemsRepeater);
00313
00314                 Content = stackPanel;
00315
00316                 Content.UpdateLayout();
00317             });
00318
00319             IdleSynchronizer.Wait();
00320
00321             RunOnUIThread.Execute(() =>
00322             {
00323                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(itemsRepeater));
00324
00325                 for (int i = 0; i < numItems; i++)
00326                 {
00327                     TextBlock itemTextBlock = null;
00328
00329                     if (useNestedElements)
00330                     {
00331                         Border itemBorder = itemsRepeater.TryGetElement(i) as Border;
00332                         itemTextBlock = itemBorder.Child as TextBlock;
00333                     }
00334                     else
00335                     {
00336                         itemTextBlock = itemsRepeater.TryGetElement(i) as TextBlock;
00337                     }
00338
00339                     Verify.IsNotNull(itemTextBlock);
00340                     Verify.AreEqual(i.ToString(), itemTextBlock.Text);
00341                     Verify.AreEqual("DataSource", itemTextBlock.Tag);
00342                 }
00343
00344                 itemsRepeater.ItemsSource = null;
00345                 Content.UpdateLayout();
00346             });
00347         }
00348
00349         [TestMethod]
00350         [TestProperty("IsolationLevel", "Method")] // Task 28232821: DCPP Test: ItemsRepeater tests are running in isolation mode due to test instability.
00351         public void ValidateDataTemplateAsItemTemplate()
00352         {
00353             RunOnUIThread.Execute(() =>
00354             {
00355                 var dataTemplate = (DataTemplate)XamlReader.Load(
00356                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00357                             <TextBlock Text='{Binding}' />
00358                         </DataTemplate>");
00359                 ItemsRepeater repeater = null;
00360                 const int numItems = 10;
00361
00362                 Content = CreateAndInitializeRepeater
00363                 (
00364                    itemsSource: Enumerable.Range(0, numItems).Select(i => i.ToString()),
00365                    elementFactory: dataTemplate,
00366                    layout: new StackLayout(),
00367                    repeater: ref repeater
00368                 );
00369
00370                 Content.UpdateLayout();
00371                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00372                 for (int i = 0; i < numItems; i++)
00373                 {
00374                     var element = (TextBlock)repeater.TryGetElement(i);
00375                     Verify.AreEqual(i.ToString(), element.Text);
00376                 }
00377
00378                 repeater.ItemsSource = null;
00379                 Content.UpdateLayout();
00380             });
00381         }
00382
00383         [TestMethod]
00384         public void ValidateDataTemplateSelectorAsItemTemplate()
00385         {
00386             RunOnUIThread.Execute(() =>
00387             {
00388                 var dataTemplateOdd = (DataTemplate)XamlReader.Load(
00389                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00390                             <TextBlock Text='{Binding}' Height='30' />
00391                         </DataTemplate>");
00392                 var dataTemplateEven = (DataTemplate)XamlReader.Load(
00393                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00394                             <TextBlock Text='{Binding}' Height='40' />
00395                         </DataTemplate>");
00396                 ItemsRepeater repeater = null;
00397                 const int numItems = 10;
00398                 var selector = new MySelector()
00399                 {
00400                     TemplateOdd = dataTemplateOdd,
00401                     TemplateEven = dataTemplateEven
00402                 };
00403
00404                 Content = CreateAndInitializeRepeater
00405                 (
00406                    itemsSource: Enumerable.Range(0, numItems),
00407                    elementFactory: selector,
00408                    layout: new StackLayout(),
00409                    repeater: ref repeater
00410                 );
00411
00412                 Content.UpdateLayout();
00413                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00414                 for (int i = 0; i < numItems; i++)
00415                 {
00416                     var element = (TextBlock)repeater.TryGetElement(i);
00417                     Verify.AreEqual(i.ToString(), element.Text);
00418                     Verify.AreEqual(i % 2 == 0 ? 40 : 30, element.Height);
00419                 }
00420
00421                 repeater.ItemsSource = null;
00422                 Content.UpdateLayout();
00423             });
00424         }
00425
00426         [TestMethod]
00427         public void ValidateNoSizeWhenEmptyDataTemplate()
00428         {
00429             ItemsRepeater repeater = null;
00430             RunOnUIThread.Execute(() =>
00431             {
00432                 var elementFactory = new RecyclingElementFactory();
00433                 elementFactory.RecyclePool = new RecyclePool();
00434                 elementFactory.Templates["Item"] = (DataTemplate)XamlReader.Load(
00435                     @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' />");
00436
00437                 repeater = new ItemsRepeater() {
00438                     ItemsSource = Enumerable.Range(0, 10).Select(i => string.Format("Item #{0}", i)),
00439                     ItemTemplate = elementFactory,
00440                     // Default is StackLayout, so do not have to explicitly set.
00441                     // Layout = new StackLayout(),
00442                 };
00443                 repeater.UpdateLayout();
00444
00445                 // Asserting render size is zero
00446                 Verify.IsLessThan(repeater.RenderSize.Width, 0.0001);
00447                 Verify.IsLessThan(repeater.RenderSize.Height, 0.0001);
00448             });
00449         }
00450
00451         [TestMethod]
00452         public void ValidateCorrectSizeWhenEmptyDataTemplateInSelector()
00453         {
00454             RunOnUIThread.Execute(() =>
00455             {
00456                 var dataTemplateOdd = (DataTemplate)XamlReader.Load(
00457                         @"<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00458                             <TextBlock Text='{Binding}' Height='30' Width='50' />
00459                         </DataTemplate>");
00460                 var dataTemplateEven = (DataTemplate)XamlReader.Load(
00461                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' />");
00462                 ItemsRepeater repeater = null;
00463                 const int numItems = 10;
00464                 var selector = new MySelector() {
00465                     TemplateOdd = dataTemplateOdd,
00466                     TemplateEven = dataTemplateEven
00467                 };
00468
00469                 repeater = new ItemsRepeater() {
00470                     ItemTemplate = selector,
00471                     Layout = new StackLayout(),
00472                     ItemsSource = Enumerable.Range(0, numItems)
00473                 };
00474
00475                 repeater.VerticalAlignment = VerticalAlignment.Top;
00476                 repeater.HorizontalAlignment = HorizontalAlignment.Left;
00477                 Content = repeater;
00478
00479                 Content.UpdateLayout();
00480                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00481                 for (int i = 0; i < numItems; i++)
00482                 {
00483                     var element = (FrameworkElement)repeater.TryGetElement(i);
00484                     if (i % 2 == 0)
00485                     {
00486                         Verify.AreEqual(element.Height, 0);
00487                     }
00488                     else
00489                     {
00490                         Verify.AreEqual(element.Height, 30);
00491                     }
00492                 }
00493
00494                 Verify.AreEqual(5 * 30, repeater.ActualHeight);
00495
00496                 // ItemsRepeater stretches page, so actual width is width of page and not 50
00497                 //Verify.AreEqual(50, repeater.ActualWidth);
00498
00499
00500                 repeater.ItemsSource = null;
00501                 Content.UpdateLayout();
00502             });
00503         }
00504
00505         [TestMethod]
00506         public void ValidateReyclingElementFactoryWithNoTemplate()
00507         {
00508             RunOnUIThread.Execute(() =>
00509             {
00510                 var elementFactory = new RecyclingElementFactoryDerived()
00511                 {
00512                     RecyclePool = new RecyclePool()
00513                 };
00514
00515                 Verify.Throws<COMException>(delegate
00516                 {
00517                     var context = new ElementFactoryGetArgs();
00518                     context.Parent = null;
00519                     context.Data = 0;
00520
00521                     elementFactory.GetElement(context);
00522                 });
00523             });
00524         }
00525
00526         // Validate ability to create and use a view generator from scratch
00527         [TestMethod]
00528         [TestProperty("IsolationLevel", "Method")] // Task 28232821: DCPP Test: ItemsRepeater tests are running in isolation mode due to test instability.
00529         public void ValidateCustomElementFactory()
00530         {
00531             RunOnUIThread.Execute(() =>
00532             {
00533                 ItemsRepeater repeater = null;
00534                 const int numItems = 10;
00535                 Content = CreateAndInitializeRepeater
00536                 (
00537                    itemsSource: Enumerable.Range(0, numItems),
00538                    elementFactory: new MockElementFactory()
00539                    {
00540                        GetElementFunc = delegate (int index, UIElement owner)
00541                        {
00542                            return new Button() { Content = index.ToString() };
00543                        },
00544                        ClearElementFunc = delegate (UIElement element, UIElement owner)
00545                        {
00546                            Verify.AreEqual(typeof(Button), element.GetType());
00547                        }
00548                    },
00549                    layout: new StackLayout(),
00550                    repeater: ref repeater
00551                 );
00552
00553                 Content.UpdateLayout();
00554                 for (int i = 0; i < numItems; i++)
00555                 {
00556                     var element = (Button)repeater.TryGetElement(i);
00557                     Verify.AreEqual(i.ToString(), element.Content.ToString());
00558                 }
00559             });
00560         }
00561
00562         [TestMethod]
00563         public void ValidateTemplateSwitchingRefreshesElementsVirtualizingLayout()
00564         {
00565             RunOnUIThread.Execute(() =>
00566             {
00567                 ValidateTemplateSwitchingRefreshesElements(new StackLayout());
00568             });
00569         }
00570
00571         [TestMethod]
00572         public void ValidateTemplateSwitchingRefreshesElementsNonVirtualizingLayout()
00573         {
00574             RunOnUIThread.Execute(() =>
00575             {
00576                 ValidateTemplateSwitchingRefreshesElements(new NonVirtualStackLayout());
00577             });
00578         }
00579
00580         public void ValidateTemplateSwitchingRefreshesElements(Layout layout)
00581         {
00582             var dataTemplate1 = (DataTemplate)XamlReader.Load(
00583                      @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00584                             <TextBlock Text='{Binding}' />
00585                        </DataTemplate>");
00586
00587             var dataTemplate2 = (DataTemplate)XamlReader.Load(
00588                     @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00589                             <Button Content='{Binding}' />
00590                       </DataTemplate>");
00591             ItemsRepeater repeater = null;
00592             const int numItems = 10;
00593             Content = CreateAndInitializeRepeater
00594             (
00595                itemsSource: Enumerable.Range(0, numItems).Select(i => i.ToString()),
00596                elementFactory: dataTemplate1,
00597                layout: layout,
00598                repeater: ref repeater
00599             );
00600
00601             Content.UpdateLayout();
00602             Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00603             for (int i = 0; i < numItems; i++)
00604             {
00605                 var element = (TextBlock)repeater.TryGetElement(i);
00606                 Verify.AreEqual(i.ToString(), element.Text);
00607             }
00608
00609             repeater.ItemTemplate = dataTemplate2;
00610             Content.UpdateLayout();
00611
00612             // The old elements have been recycled but still parented under this repeater.
00613             Verify.AreEqual(numItems * 2, VisualTreeHelper.GetChildrenCount(repeater));
00614             for (int i = 0; i < numItems; i++)
00615             {
00616                 var element = (Button)repeater.TryGetElement(i);
00617                 Verify.AreEqual(i.ToString(), element.Content);
00618             }
00619         }
00620
00621         [TestMethod]
00622         public void ValidateNullItemTemplateAndContainerInItems()
00623         {
00624             RunOnUIThread.Execute(() =>
00625             {
00626                 const int numItems = 10;
00627                 ItemsRepeater repeater = null;
00628                 Content = CreateAndInitializeRepeater
00629                 (
00630                     itemsSource: Enumerable.Range(0, numItems).Select(i => new Button() { Content = i }), // ItemsSource is UIElements
00631                     elementFactory: null, // No ItemTemplate
00632                     layout: new StackLayout(),
00633                     repeater: ref repeater
00634                 );
00635
00636                 Content.UpdateLayout();
00637
00638                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00639
00640                 for (int i = 0; i < numItems; i++)
00641                 {
00642                     var element = (Button)repeater.TryGetElement(i);
00643                     Verify.AreEqual(i, element.Content);
00644                 }
00645
00646                 Button button0 = (Button)repeater.TryGetElement(0);
00647                 Verify.IsNotNull(button0.Parent);
00648
00649                 repeater.ItemsSource = null;
00650                 Verify.IsNull(button0.Parent);
00651             });
00652         }
00653
00654         [TestMethod]
00655         public void VerifySelectTemplateLayoutFallback()
00656         {
00657             RunOnUIThread.Execute(() =>
00658             {
00659                 var dataTemplateOdd = (DataTemplate)XamlReader.Load(
00660                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00661                             <TextBlock Text='static' Height='30' />
00662                         </DataTemplate>");
00663                 var dataTemplateEven = (DataTemplate)XamlReader.Load(
00664                         @"<DataTemplate  xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
00665                             <TextBlock Text='{Binding}' Height='30' />
00666                         </DataTemplate>");
00667                 ItemsRepeater repeater = null;
00668                 const int numItems = 10;
00669                 var selector = new MyContainerSelector() {
00670                     TemplateOdd = dataTemplateOdd,
00671                     TemplateEven = dataTemplateEven
00672                 };
00673
00674                 Content = CreateAndInitializeRepeater
00675                 (
00676                    itemsSource: Enumerable.Range(0, numItems),
00677                    elementFactory: selector,
00678                    layout: new StackLayout(),
00679                    repeater: ref repeater
00680                 );
00681
00682                 Content.UpdateLayout();
00683
00684                 Verify.AreEqual(numItems, VisualTreeHelper.GetChildrenCount(repeater));
00685                 for (int i = 0; i < numItems; i++)
00686                 {
00687                     var element = (TextBlock)repeater.TryGetElement(i);
00688                     if (i % 2 == 0)
00689                     {
00690                         // Text is bound to the data for even indices
00691                         Verify.AreEqual(i.ToString(), element.Text);
00692                         Verify.AreEqual(i, element.DataContext);
00693                     }
00694                     else
00695                     {
00696                         // Text explicitly set on the element only for odd indices
00697                         Verify.AreEqual("static", element.Text);
00698                     }
00699                 }
00700             });
00701         }
00702
00703         [TestMethod]
00704         [TestProperty("Ignore", "True")] // TODO 33512007: ThrowExceptionForHR ignoring previous error message
00705         public void VerifyNullTemplateGivesMeaningfullError()
00706         {
00707             RunOnUIThread.Execute(() =>
00708             {
00709                 ItemsRepeater repeater = null;
00710                 const int numItems = 10;
00711
00712                 Content = CreateAndInitializeRepeater
00713                 (
00714                     itemsSource: Enumerable.Range(0, numItems),
00715                     // DataTemplateSelector always returns null, but throws hresult_invalid_argument when container is null
00716                     elementFactory: new DataTemplateSelector(),
00717                     layout: new StackLayout(),
00718                     repeater: ref repeater
00719                 );
00720                 bool threwException = false;
00721                 try
00722                 {
00723                     Content.UpdateLayout();
00724                 } catch(Exception e)
00725                 {
00726                     threwException = true;
00727                     Verify.IsTrue(e.Message.Contains("Null encountered as data template. That is not a valid value for a data template, and can not be used."));
00728                 }
00729                 Verify.IsTrue(threwException);
00730                 // Set content to null so testapp does not try to update layout again
00731                 Content = null;
00732             });
00733         }
00734
00735         private ItemsRepeaterScrollHost CreateAndInitializeRepeater(
00736             object itemsSource,
00737             Layout layout,
00738             object elementFactory,
00739             ref ItemsRepeater repeater)
00740         {
00741             repeater = new ItemsRepeater()
00742             {
00743                 ItemsSource = itemsSource,
00744                 Layout = layout,
00745                 ItemTemplate = elementFactory,
00746             };
00747
00748             return new ItemsRepeaterScrollHost()
00749             {
00750                 Width = 400,
00751                 Height = 400,
00752                 ScrollViewer = new Microsoft.UI.Xaml.Controls.ScrollViewer()
00753                 {
00754                     Content = repeater
00755                 }
00756             };
00757         }
00758
00759         private List<UIElement> GetAllElementsFromPool(RecyclePool pool, string key="")
00760         {
00761             List<UIElement> elements = new List<UIElement>();
00762             bool poolEmpty = false;
00763             while(!poolEmpty)
00764             {
00765                 var next = pool.TryGetElement(key);
00766                 if(next != null)
00767                 {
00768                     elements.Add(next);
00769                 }
00770
00771                 poolEmpty = next == null;
00772             }
00773
00774             return elements;
00775         }
00776     }
00777
00778     public class MySelector : DataTemplateSelector
00779     {
00780         public DataTemplate TemplateOdd { get; set; }
00781
00782         public DataTemplate TemplateEven { get; set; }
00783
00784         protected override DataTemplate SelectTemplateCore(object item)
00785         {
00786             return (((int)item) % 2 == 0) ? TemplateEven : TemplateOdd;
00787         }
00788     }
00789
00790     public class MyContainerSelector : DataTemplateSelector
00791     {
00792         public DataTemplate TemplateOdd { get; set; }
00793
00794         public DataTemplate TemplateEven { get; set; }
00795
00796         protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
00797         {
00798             return (((int)item) % 2 == 0) ? TemplateEven : TemplateOdd;
00799         }
00800
00801     }
00802 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewTestHooksHelper.cs Source File

  • File List
  • File Members
  • ScrollView
  • TestUI

ScrollViewTestHooksHelper.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Private.Controls;
00007 using System;
00008
00009 using WEX.Logging.Interop;
00010
00011 namespace MUXControlsTestApp.Utilities
00012 {
00013     // Utility class used to set up ScrollView test hooks and automatically reset them when the instance gets disposed.
00014     public class ScrollViewTestHooksHelper : IDisposable
00015     {
00016         public ScrollViewTestHooksHelper(ScrollView scrollView, bool? autoHideScrollControllers = null)
00017         {
00018             RunOnUIThread.Execute(() =>
00019             {
00020                 if (scrollView != null)
00021                 {
00022                     ScrollView = scrollView;
00023
00024                     ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, autoHideScrollControllers);
00025                 }
00026             });
00027         }
00028
00029         public ScrollView ScrollView
00030         {
00031             get;
00032             set;
00033         }
00034
00035         public bool? AutoHideScrollControllers
00036         {
00037             get
00038             {
00039                 return ScrollView == null ? true : ScrollViewTestHooks.GetAutoHideScrollControllers(ScrollView);
00040             }
00041
00042             set
00043             {
00044                 if (value != AutoHideScrollControllers)
00045                 {
00046                     Log.Comment($"ScrollViewTestHooksHelper: AutoHideScrollControllers set to {value}.");
00047                     if (ScrollView != null)
00048                     {
00049                          ScrollViewTestHooks.SetAutoHideScrollControllers(ScrollView, value);
00050                     }
00051                 }
00052             }
00053         }
00054
00055         public void Dispose()
00056         {
00057             RunOnUIThread.Execute(() =>
00058             {
00059                 Log.Comment("PrivateLoggingHelper disposal: Resetting AutoHideScrollControllers.");
00060                 AutoHideScrollControllers = null;
00061             });
00062         }
00063     }
00064 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlRootChanged_revoker Member List

This is the complete list of members for XamlRootChanged_revoker, including all inherited members.
move_from(XamlRootChanged_revoker &other) | XamlRootChanged_revoker | [inline, private]
operator bool() const noexcept | XamlRootChanged_revoker | [inline, explicit]
operator=(XamlRootChanged_revoker const &) | XamlRootChanged_revoker |
operator=(XamlRootChanged_revoker &&other) noexcept | XamlRootChanged_revoker | [inline]
revoke() noexcept | XamlRootChanged_revoker | [inline]
XamlRootChanged_revoker() noexcept | XamlRootChanged_revoker |
XamlRootChanged_revoker(XamlRootChanged_revoker const &) | XamlRootChanged_revoker |
XamlRootChanged_revoker(XamlRootChanged_revoker &&other) noexcept | XamlRootChanged_revoker | [inline]
XamlRootChanged_revoker(winrt::XamlRoot const &object, winrt::event_token token) | XamlRootChanged_revoker | [inline]
~XamlRootChanged_revoker() noexcept | XamlRootChanged_revoker | [inline]
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPicturePage::SportsGroup Member List

This is the complete list of members for PersonPicturePage::SportsGroup, including all inherited members.
Name | PersonPicturePage::SportsGroup |
SportsGroup(string name) | PersonPicturePage::SportsGroup | [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CornerRadiusFilterConverter Member List

This is the complete list of members for CornerRadiusFilterConverter, including all inherited members.
ClearProperties() | CornerRadiusFilterConverterProperties | [static]
Convert(winrt::CornerRadius const &radius, winrt::CornerRadiusFilterKind const &filterKind) | CornerRadiusFilterConverter |
Convert(winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language) | CornerRadiusFilterConverter |
ConvertBack(winrt::IInspectable const &value, winrt::TypeName const &targetType, winrt::IInspectable const &parameter, winrt::hstring const &language) | CornerRadiusFilterConverter |
CornerRadiusFilterConverterProperties() | CornerRadiusFilterConverterProperties |
EnsureProperties() | CornerRadiusFilterConverterProperties | [static]
Filter(winrt::CornerRadiusFilterKind const &value) | CornerRadiusFilterConverterProperties |
Filter() | CornerRadiusFilterConverterProperties |
FilterProperty() | CornerRadiusFilterConverterProperties | [inline, static]
GetDoubleValue(winrt::CornerRadius const &radius, winrt::CornerRadiusFilterKind const &filterKind) | CornerRadiusFilterConverter | [private]
s_FilterProperty | CornerRadiusFilterConverterProperties | [static]
s_ScaleProperty | CornerRadiusFilterConverterProperties | [static]
Scale(double value) | CornerRadiusFilterConverterProperties |
Scale() | CornerRadiusFilterConverterProperties |
ScaleProperty() | CornerRadiusFilterConverterProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SharedHelpers Member List

This is the complete list of members for SharedHelpers, including all inherited members.
ConvertDipsToPhysical(winrt::UIElement const &xamlRootReference, const winrt::Rect &dipsRect) | SharedHelpers | [static]
CopyVector(winrt::IObservableVector< ElementType > const &source, winrt::IObservableVector< ElementType > const &destination) | SharedHelpers | [inline, static]
CreateStreamFromBytes(const winrt::array_view< const byte > &bytes) | SharedHelpers | [static]
DoesRectContainPoint(const winrt::Rect &rect, const winrt::Point &point) | SharedHelpers | [static]
DoesRectContainPoint(const winrt::RectInt32 &rect, const winrt::PointInt32 &point) | SharedHelpers | [static]
DoRectsIntersect(const winrt::Rect &rect1, const winrt::Rect &rect2) | SharedHelpers | [static]
EraseIfExists(std::map< IndexType, ElementType > &map, IndexType const &index) | SharedHelpers | [inline, static]
FindInApplicationResources(const std::wstring_view &resource, const winrt::IInspectable &defaultValue=nullptr) | SharedHelpers | [static]
FindInVisualTree(winrt::FrameworkElement const &parent, std::function< bool(winrt::FrameworkElement element)> const &isMatch) | SharedHelpers | [inline, static]
FindInVisualTreeByName(winrt::FrameworkElement const &parent, std::wstring_view const &name) | SharedHelpers | [inline, static]
FindInVisualTreeByType(winrt::FrameworkElement const &parent) | SharedHelpers | [inline, static]
FindResource(const std::wstring_view &resource, const winrt::ResourceDictionary &resources, const winrt::IInspectable &defaultValue=nullptr) | SharedHelpers | [static]
ForwardVectorChange(winrt::IObservableVector< ElementType > const &source, winrt::IObservableVector< ElementType > const &destination, winrt::IVectorChangedEventArgs const &args) | SharedHelpers | [inline, static]
GetAncestorOfType(winrt::DependencyObject const &firstGuess) | SharedHelpers | [inline, static]
GetRichTextSelection(winrt::RichEditBox const &richEditBox) | SharedHelpers | [static]
GetVirtualKeyFromChar(WCHAR c) | SharedHelpers | [static]
IsAncestor(const winrt::DependencyObject &child, const winrt::DependencyObject &parent, bool checkVisibility=false) | SharedHelpers | [static]
IsAnimationsEnabled() | SharedHelpers | [static]
IsApplicationViewGetDisplayRegionsAvailable() | SharedHelpers | [static]
IsBringIntoViewOptionsVerticalAlignmentRatioAvailable() | SharedHelpers | [static]
IsCoreWindowActivationModeAvailable() | SharedHelpers | [static]
IsFocusableElement(winrt::UIElement const &element) | SharedHelpers | [static]
IsInDesignMode() | SharedHelpers | [static]
IsInDesignModeV1() | SharedHelpers | [static]
IsInDesignModeV2() | SharedHelpers | [static]
IsInFrameworkPackage() | SharedHelpers | [static]
IsInFrameworkPackage(winrt::hstring &frameworkPackageInstallLocation) | SharedHelpers | [static]
IsMouseModeEnabled() | SharedHelpers | [static]
IsOnXbox() | SharedHelpers | [static]
IsTrue(winrt::IReference< bool > const &nullableBool) | SharedHelpers | [inline, static]
QueueCallbackForCompositionRendering(std::function< void()> callback) | SharedHelpers | [static]
RaiseAutomationPropertyChangedEvent(winrt::UIElement const &element, ParameterType oldValue, ParameterType newValue) | SharedHelpers | [inline, static]
RgbaColor(winrt::Color const &color) | SharedHelpers | [static]
s_isMouseModeEnabled | SharedHelpers | [private, static]
s_isMouseModeEnabledInitialized | SharedHelpers | [private, static]
s_isOnXbox | SharedHelpers | [private, static]
s_isOnXboxInitialized | SharedHelpers | [private, static]
ScheduleActionAfterWait(std::function< void()> const &action, unsigned int millisecondWait) | SharedHelpers | [static]
SetBinding(std::wstring_view const &pathString, winrt::DependencyObject const &target, winrt::DependencyProperty const &targetProperty) | SharedHelpers | [static]
SetBinding(winrt::IInspectable const &source, std::wstring_view const &pathString, winrt::DependencyObject const &target, winrt::DependencyProperty const &targetProperty, winrt::IValueConverter const &converter=nullptr, winrt::BindingMode mode=winrt::BindingMode::OneWay) | SharedHelpers | [static]
SharedHelpers() | SharedHelpers | [private]
SyncWait(const winrt::IAsyncAction &asyncAction) | SharedHelpers | [inline, static]
SyncWait(winrt::IAsyncOperation< T > asyncOperation) | SharedHelpers | [inline, static]
TryGetCurrentCoreApplicationView() | SharedHelpers | [static]
TryGetStringRepresentationFromObject(winrt::IInspectable obj) | SharedHelpers | [static]
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TestHooks/MUXControlsTestHooksLoggingMessageEventArgs.h Source File

  • File List
  • File Members
  • TestHooks

MUXControlsTestHooksLoggingMessageEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "MUXControlsTestHooksLoggingMessageEventArgs.g.h"
00007
00008 class MUXControlsTestHooksLoggingMessageEventArgs
00009     : public winrt::implementation::MUXControlsTestHooksLoggingMessageEventArgsT<MUXControlsTestHooksLoggingMessageEventArgs>
00010 {
00011 public:
00012     void SetMessage(const wstring_view& message);
00013     void SetIsVerboseLevel(bool isVerboseLevel);
00014
00015     // IMUXControlsTestHooksLoggingMessageEventArgs overrides
00016     winrt::hstring Message();
00017     bool IsVerboseLevel();
00018
00019 private:
00020     winrt::hstring m_message{ };
00021     bool m_isVerboseLevel{ false };
00022 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewItem Member List

This is the complete list of members for TabViewItem, including all inherited members.
abi_enter() | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
BeginCheckingForDrag(const uint32_t &pointerId) | TabViewItem | [private]
c_overlayCornerRadiusKey | TabViewItem | [private, static]
c_targetRectWidthIncrement | TabViewItem | [private, static]
CheckThread() | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
ClearProperties() | TabViewItemProperties | [static]
CloseRequested(winrt::TypedEventHandler< winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs > const &value) | TabViewItemProperties |
CloseRequested(winrt::event_token const &token) | TabViewItemProperties |
DeleteInstanceOnUIThread(std::unique_ptr< TabViewItem > &&self) noexcept | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline, static]
EnsureProperties() | TabViewItemProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
final_release(std::unique_ptr< TabViewItem > &&self) | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline, static]
GetBase() | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
GetCloseButton() const | TabViewItem | [inline]
GetInner() | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
GetParentTabView() | TabViewItem |
Header(winrt::IInspectable const &value) | TabViewItemProperties |
Header() | TabViewItemProperties |
HeaderProperty() | TabViewItemProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | TabViewItemProperties |
HeaderTemplate() | TabViewItemProperties |
HeaderTemplateProperty() | TabViewItemProperties | [inline, static]
HideLeftAdjacentTabSeparator() | TabViewItem | [private]
IconSource(winrt::IconSource const &value) | TabViewItemProperties |
IconSource() | TabViewItemProperties |
IconSourceProperty() | TabViewItemProperties | [inline, static]
IsBeingDragged() const | TabViewItem | [inline]
IsClosable(bool value) | TabViewItemProperties |
IsClosable() | TabViewItemProperties |
IsClosableProperty() | TabViewItemProperties | [inline, static]
IsOnThread() | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
IsOutsideDragRectangle(const winrt::Point &testPoint, const winrt::Point &dragRectangleCenter) | TabViewItem | [private]
m_closeRequestedEventSource | TabViewItemProperties |
m_hasPointerCapture | TabViewItem | [private]
m_isBeingDragged | TabViewItem | [private]
m_isCheckingforDrag | TabViewItem | [private]
m_isMiddlePointerButtonPressed | TabViewItem | [private]
m_isPointerOver | TabViewItem | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
OnApplyTemplate() | TabViewItem |
OnCloseButtonClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabViewItem | [private]
OnCloseButtonOverlayModeChanged(winrt::TabViewCloseButtonOverlayMode const &mode) | TabViewItem |
OnCreateAutomationPeer() | TabViewItem |
OnForegroundPropertyChanged(const winrt::DependencyObject &, const winrt::DependencyProperty &) | TabViewItem | [private]
OnHeaderChanged() | TabViewItem | [private]
OnHeaderPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabViewItem |
TabViewItemProperties::OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewItemProperties | [static]
OnIconSourceChanged() | TabViewItem | [private]
OnIconSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabViewItem |
TabViewItemProperties::OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewItemProperties | [static]
OnIsClosablePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabViewItem |
TabViewItemProperties::OnIsClosablePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewItemProperties | [static]
OnIsSelectedPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | TabViewItem | [private]
OnKeyDown(winrt::KeyRoutedEventArgs const &e) | TabViewItem |
OnLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabViewItem |
OnPointerCanceled(winrt::PointerRoutedEventArgs const &args) | TabViewItem |
OnPointerCaptureLost(winrt::PointerRoutedEventArgs const &args) | TabViewItem |
OnPointerEntered(winrt::PointerRoutedEventArgs const &args) | TabViewItem |
OnPointerExited(winrt::PointerRoutedEventArgs const &args) | TabViewItem |
OnPointerMoved(winrt::PointerRoutedEventArgs const &args) | TabViewItem |
OnPointerPressed(winrt::PointerRoutedEventArgs const &args) | TabViewItem |
OnPointerReleased(winrt::PointerRoutedEventArgs const &args) | TabViewItem |
OnSizeChanged(const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args) | TabViewItem | [private]
OnTabDragCompleted(const winrt::IInspectable &sender, const winrt::TabViewTabDragCompletedEventArgs &args) | TabViewItem | [private]
OnTabDragStarting(const winrt::IInspectable &sender, const winrt::TabViewTabDragStartingEventArgs &args) | TabViewItem | [private]
OnTabViewWidthModeChanged(winrt::TabViewWidthMode const &mode) | TabViewItem |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
RaiseRequestClose(TabViewTabCloseRequestedEventArgs const &args) | TabViewItem |
ReferenceTracker(Args &&...args) | ReferenceTracker< TabViewItem, winrt::implementation::TabViewItemT > | [inline]
RequestClose() | TabViewItem | [private]
RestoreLeftAdjacentTabSeparatorVisibility() | TabViewItem | [private]
s_HeaderProperty | TabViewItemProperties | [static]
s_HeaderTemplateProperty | TabViewItemProperties | [static]
s_IconSourceProperty | TabViewItemProperties | [static]
s_IsClosableProperty | TabViewItemProperties | [static]
s_TabViewTemplateSettingsProperty | TabViewItemProperties | [static]
SetParentTabView(winrt::TabView const &tabView) | TabViewItem |
ShouldStartDrag(winrt::PointerRoutedEventArgs const &args) | TabViewItem | [private]
StartBringTabIntoView() | TabViewItem |
StopCheckingForDrag(const uint32_t &pointerId) | TabViewItem | [private]
TabViewItem() | TabViewItem |
TabViewItemProperties() | TabViewItemProperties |
TabViewTemplateSettings(winrt::TabViewItemTemplateSettings const &value) | TabViewItemProperties |
TabViewTemplateSettings() | TabViewItemProperties |
TabViewTemplateSettingsProperty() | TabViewItemProperties | [inline, static]
UpdateCloseButton() | TabViewItem | [private]
UpdateDragDropVisualState(bool isVisible) | TabViewItem | [private]
UpdateForeground() | TabViewItem | [private]
UpdateSelectedBackgroundPathTranslateTransform() | TabViewItem | [private]
UpdateTabGeometry() | TabViewItem | [private]
UpdateWidthModeVisualState() | TabViewItem | [private]
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshContainer/TestUI/RefreshContainerPage.xaml.cs Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshContainer
  • TestUI

RefreshContainerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.ComponentModel;
00007 using System.IO;
00008 using System.Linq;
00009 using System.Runtime.InteropServices.WindowsRuntime;
00010 using Windows.Foundation;
00011 using Windows.Foundation.Collections;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Controls.Primitives;
00015 using Microsoft.UI.Xaml.Data;
00016 using Microsoft.UI.Xaml.Input;
00017 using Microsoft.UI.Xaml.Media;
00018 using Microsoft.UI.Xaml.Navigation;
00019 using Microsoft.UI.Private.Controls;
00020 using Windows.UI.Core;
00021 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests;
00022 using Common;
00023
00024 using MUXControlsTestApp.Utilities;
00025
00026 using WEX.TestExecution;
00027 using WEX.TestExecution.Markup;
00028 using WEX.Logging.Interop;
00029
00030 namespace MUXControlsTestApp
00031 {
00032     public sealed partial class RefreshContainerPage : TestPage
00033     {
00034         private DispatcherTimer containerTimer = new DispatcherTimer();
00035         private DispatcherTimer visualizerTimer = new DispatcherTimer();
00036         private bool delayRefresh = true;
00037         private bool containerHasHandler = true;
00038         private int refreshCount = 0;
00039
00040         public RefreshContainerPage()
00041         {
00042             this.InitializeComponent();
00043             this.Loaded += OnMainPageLoaded;
00044
00045             containerTimer.Interval = new TimeSpan(0, 0, 0, 0, 800);
00046             containerTimer.Tick += containerTimer_Tick;
00047             visualizerTimer.Interval = new TimeSpan(0, 0, 0, 0, 800);
00048             visualizerTimer.Tick += visualizerTimer_Tick;
00049             LogController.InitializeLogging();
00050         }
00051
00052         protected override void OnNavigatedFrom(NavigationEventArgs e)
00053         {
00054             base.OnNavigatedFrom(e);
00055             containerTimer.Stop();
00056             visualizerTimer.Stop();
00057         }
00058
00059         private void OnMainPageLoaded(object sender, RoutedEventArgs e)
00060         {
00061             this.RefreshContainer.Visualizer.RefreshStateChanged += RefreshVisualizer_RefreshStateChanged;
00062             ResetStatesComboBox();
00063             this.RefreshOnContainerButton.Click += RefreshOnContainerButton_Click;
00064             this.RefreshOnVisualizerButton.Click += RefreshOnVisualizerButton_Click;
00065             this.ResetStates.Click += ResetStates_Click;
00066             this.AdaptButton.Click += AdaptButton_Click;
00067             this.RotateButton.Click += RotateButton_Click;
00068             this.ChangeAlignment.Click += ChangeAlignmentButton_Click;
00069             this.AddOrRemoveRefreshDelay.Click += AddOrRemoveRefreshDelayButton_Click;
00070
00071             this.RCRefreshRequestedComboBox.Items.Add("Off");
00072             this.RCRefreshRequestedComboBox.Items.Add("On");
00073             this.RCRefreshRequestedComboBox.SelectionChanged += RCRefreshRequestedComboBox_SelectionChanged;
00074             this.RCRefreshRequestedComboBox.SelectedIndex = 1;
00075             this.RCRefreshRequestedComboBoxSwitcher.Click += RCRefreshRequestedComboBoxSwitcher_Click;
00076             this.RVRefreshRequestedComboBox.Items.Add("Off");
00077             this.RVRefreshRequestedComboBox.Items.Add("On");
00078             this.RVRefreshRequestedComboBox.SelectionChanged += RVRefreshRequestedComboBox_SelectionChanged;
00079             this.RVRefreshRequestedComboBox.SelectedIndex = 0;
00080             this.RVRefreshRequestedComboBoxSwitcher.Click += RVRefreshRequestedComboBoxSwitcher_Click;
00081
00082             ((IRefreshVisualizerPrivate)this.RefreshContainer.Visualizer).InfoProvider.InteractionRatioChanged += RefreshInfoProvider_InteractionRatioChanged;
00083             var boarderChild = VisualTreeHelper.GetChild(listView, 0);
00084             var sv = VisualTreeHelper.GetChild(boarderChild, 0);
00085             var sbas = (ScrollViewer)sv;
00086             sbas.ViewChanging += Sv_ViewChanging;
00087         }
00088
00089         private void RCRefreshRequestedComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00090         {
00091             if(this.RCRefreshRequestedComboBox.SelectedIndex == 0)
00092             {
00093                 this.RefreshContainer.RefreshRequested -= RefreshContainer_RefreshRequested;
00094             }
00095             else
00096             {
00097                 this.RefreshContainer.RefreshRequested += RefreshContainer_RefreshRequested;
00098             }
00099         }
00100
00101         private void RVRefreshRequestedComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00102         {
00103             if (this.RVRefreshRequestedComboBox.SelectedIndex == 0)
00104             {
00105                 this.RefreshContainer.Visualizer.RefreshRequested -= RefreshVisualizer_RefreshRequested;
00106             }
00107             else
00108             {
00109                 this.RefreshContainer.Visualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
00110             }
00111         }
00112
00113         private void RefreshContainer_RefreshRequested(object sender, RefreshRequestedEventArgs e)
00114         {
00115             if (delayRefresh)
00116             {
00117                 this.ContainerRefreshCompletionDeferral = e.GetDeferral();
00118             }
00119             else
00120             {
00121                 e.GetDeferral().Complete();
00122             }
00123             refreshCount++;
00124             this.RefreshCount.Text = refreshCount.ToString();
00125             containerTimer.Start();
00126         }
00127         private void RefreshVisualizer_RefreshRequested(object sender, RefreshRequestedEventArgs e)
00128         {
00129             if (delayRefresh)
00130             {
00131                 this.VisualizerRefreshCompletionDeferral = e.GetDeferral();
00132             }
00133             else
00134             {
00135                 e.GetDeferral().Complete();
00136             }
00137             refreshCount++;
00138             this.RefreshCount.Text = refreshCount.ToString();
00139             visualizerTimer.Start();
00140         }
00141
00142         private void Sv_ViewChanging(object sender, ScrollViewerViewChangingEventArgs e)
00143         {
00144             this.ScrollerOffset.Text = e.NextView.VerticalOffset.ToString();
00145         }
00146
00147         private void RefreshInfoProvider_InteractionRatioChanged(IRefreshInfoProvider sender, RefreshInteractionRatioChangedEventArgs args)
00148         {
00149             this.InteractionRatio.Text = args.InteractionRatio.ToString();
00150         }
00151
00152         private void RCRefreshRequestedComboBoxSwitcher_Click(object sender, RoutedEventArgs e)
00153         {
00154             this.RCRefreshRequestedComboBox.SelectedIndex = ((this.RCRefreshRequestedComboBox.SelectedIndex + 1) % 2);
00155         }
00156         private void RVRefreshRequestedComboBoxSwitcher_Click(object sender, RoutedEventArgs e)
00157         {
00158             this.RVRefreshRequestedComboBox.SelectedIndex = ((this.RVRefreshRequestedComboBox.SelectedIndex + 1) % 2);
00159         }
00160
00161         private void RefreshOnContainerButton_Click(object sender, RoutedEventArgs e)
00162         {
00163             this.RefreshContainer.RequestRefresh();
00164         }
00165
00166         private void RefreshOnVisualizerButton_Click(object sender, RoutedEventArgs e)
00167         {
00168             this.RefreshContainer.Visualizer.RequestRefresh();
00169         }
00170
00171         private void RotateButton_Click(object sender, RoutedEventArgs e)
00172         {
00173             switch(this.RefreshContainer.PullDirection)
00174             {
00175                 case (RefreshPullDirection.TopToBottom):
00176                     this.RefreshContainer.PullDirection = RefreshPullDirection.LeftToRight;
00177                     break;
00178                 case (RefreshPullDirection.LeftToRight):
00179                     this.RefreshContainer.PullDirection = RefreshPullDirection.BottomToTop;
00180                     break;
00181                 case (RefreshPullDirection.BottomToTop):
00182                     this.RefreshContainer.PullDirection = RefreshPullDirection.RightToLeft;
00183                     break;
00184                 case (RefreshPullDirection.RightToLeft):
00185                     this.RefreshContainer.PullDirection = RefreshPullDirection.TopToBottom;
00186                     break;
00187             }
00188         }
00189
00190         private void ChangeAlignmentButton_Click(object sender, RoutedEventArgs e)
00191         {
00192             switch(this.RefreshContainer.VerticalAlignment)
00193             {
00194                 case (VerticalAlignment.Center):
00195                     if(this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Center)
00196                     {
00197                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
00198                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Top;
00199                     }
00200                     if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Left)
00201                     {
00202                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
00203                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Bottom;
00204                     }
00205                     if (this.RefreshContainer.HorizontalAlignment == HorizontalAlignment.Right)
00206                     {
00207                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Center;
00208                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
00209                     }
00210                     break;
00211                 case (VerticalAlignment.Top):
00212                     {
00213                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Left;
00214                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
00215                         break;
00216                     }
00217                 case (VerticalAlignment.Bottom):
00218                     {
00219                         this.RefreshContainer.HorizontalAlignment = HorizontalAlignment.Right;
00220                         this.RefreshContainer.VerticalAlignment = VerticalAlignment.Center;
00221                         break;
00222                     }
00223             }
00224         }
00225
00226         private void AddOrRemoveRefreshDelayButton_Click(object sender, RoutedEventArgs e)
00227         {
00228             delayRefresh = !delayRefresh;
00229         }
00230
00231         private void ChangeRefreshRequestedButton_Click(object sender, RoutedEventArgs e)
00232         {
00233             if(containerHasHandler)
00234             {
00235                 this.RefreshContainer.RefreshRequested -= RefreshContainer_RefreshRequested;
00236                 this.RefreshContainer.Visualizer.RefreshRequested += RefreshVisualizer_RefreshRequested;
00237             }
00238             else
00239             {
00240                 this.RefreshContainer.RefreshRequested += RefreshContainer_RefreshRequested;
00241                 this.RefreshContainer.Visualizer.RefreshRequested -= RefreshVisualizer_RefreshRequested;
00242             }
00243             containerHasHandler = !containerHasHandler;
00244         }
00245
00246         private void AdaptButton_Click(object sender, RoutedEventArgs e)
00247         {
00248             IRefreshContainerPrivate refreshContainerPrivate = (IRefreshContainerPrivate)this.RefreshContainer;
00249             IRefreshVisualizerPrivate refreshVisualizerPrivate = (IRefreshVisualizerPrivate)this.RefreshContainer.Visualizer;
00250
00251             refreshVisualizerPrivate.InfoProvider = refreshContainerPrivate.RefreshInfoProviderAdapter.AdaptFromTree(this.listView, this.RefreshContainer.Visualizer.RenderSize);
00252
00253             refreshContainerPrivate.RefreshInfoProviderAdapter.SetAnimations(this.RefreshContainer.Visualizer);
00254             refreshVisualizerPrivate.InfoProvider.InteractionRatioChanged += RefreshInfoProvider_InteractionRatioChanged;
00255         }
00256
00257         private void RefreshVisualizer_RefreshStateChanged(RefreshVisualizer sender, RefreshStateChangedEventArgs args)
00258         {
00259             UpdateStatesComboBox(args.NewState);
00260         }
00261
00262         private void ResetStates_Click(object sender, RoutedEventArgs e)
00263         {
00264             ResetStatesComboBox();
00265         }
00266
00267         private void UpdateStatesComboBox(RefreshVisualizerState state)
00268         {
00269             this.States.Items.Add(state.ToString());
00270             this.States.SelectedIndex = this.States.Items.Count - 1;
00271         }
00272
00273         private void ResetStatesComboBox()
00274         {
00275             this.States.Items.Clear();
00276             UpdateStatesComboBox(this.RefreshContainer.Visualizer.State);
00277         }
00278
00279         private Deferral ContainerRefreshCompletionDeferral
00280         {
00281             get;
00282             set;
00283         }
00284
00285         private Deferral VisualizerRefreshCompletionDeferral
00286         {
00287             get;
00288             set;
00289         }
00290
00291         async private void containerTimer_Tick(object sender, object e)
00292         {
00293             CoreDispatcher disp = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher;
00294             if (disp.HasThreadAccess)
00295             {
00296                 containerTimer_TickImpl();
00297             }
00298             else
00299             {
00300                 await disp.RunAsync(CoreDispatcherPriority.Normal, () =>
00301                  {
00302                      containerTimer_TickImpl();
00303                  });
00304             }
00305         }
00306         async private void visualizerTimer_Tick(object sender, object e)
00307         {
00308             CoreDispatcher disp = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher;
00309             if (disp.HasThreadAccess)
00310             {
00311                 visualizerTimer_TickImpl();
00312             }
00313             else
00314             {
00315                 await disp.RunAsync(CoreDispatcherPriority.Normal, () =>
00316                 {
00317                     visualizerTimer_TickImpl();
00318                 });
00319             }
00320         }
00321
00322         private void containerTimer_TickImpl()
00323         {
00324             containerTimer.Stop();
00325             if (this.ContainerRefreshCompletionDeferral != null)
00326             {
00327                 this.ContainerRefreshCompletionDeferral.Complete();
00328                 this.ContainerRefreshCompletionDeferral.Dispose();
00329                 this.ContainerRefreshCompletionDeferral = null;
00330             }
00331         }
00332
00333         private void visualizerTimer_TickImpl()
00334         {
00335             visualizerTimer.Stop();
00336             if (this.VisualizerRefreshCompletionDeferral != null)
00337             {
00338                 this.VisualizerRefreshCompletionDeferral.Complete();
00339                 this.VisualizerRefreshCompletionDeferral.Dispose();
00340                 this.VisualizerRefreshCompletionDeferral = null;
00341             }
00342         }
00343     }
00344 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonProperties Member List

This is the complete list of members for SplitButtonProperties, including all inherited members.
ClearProperties() | SplitButtonProperties | [static]
Click(winrt::TypedEventHandler< winrt::SplitButton, winrt::SplitButtonClickEventArgs > const &value) | SplitButtonProperties |
Click(winrt::event_token const &token) | SplitButtonProperties |
Command(winrt::ICommand const &value) | SplitButtonProperties |
Command() | SplitButtonProperties |
CommandParameter(winrt::IInspectable const &value) | SplitButtonProperties |
CommandParameter() | SplitButtonProperties |
CommandParameterProperty() | SplitButtonProperties | [inline, static]
CommandProperty() | SplitButtonProperties | [inline, static]
EnsureProperties() | SplitButtonProperties | [static]
Flyout(winrt::FlyoutBase const &value) | SplitButtonProperties |
Flyout() | SplitButtonProperties |
FlyoutProperty() | SplitButtonProperties | [inline, static]
m_clickEventSource | SplitButtonProperties |
OnCommandParameterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SplitButtonProperties | [static]
OnCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SplitButtonProperties | [static]
OnFlyoutPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SplitButtonProperties | [static]
s_CommandParameterProperty | SplitButtonProperties | [static]
s_CommandProperty | SplitButtonProperties | [static]
s_FlyoutProperty | SplitButtonProperties | [static]
SplitButtonProperties() | SplitButtonProperties |
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealHoverLight.cpp Source File

  • File List
  • File Members
  • Lights

RevealHoverLight.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RevealHoverLight.h"
00007 #include "IsTargetDPHelper.h"
00008 #include "SpotLightStateHelper.h"
00009
00010 #pragma warning(push)
00011 #pragma warning(disable: 6101)  // Returning uninitialized memory '<value>'.  A successful path through the function does not set the named _Out_ parameter.
00012 #include "Microsoft.UI.Private.Composition.Effects_impl.h"
00013 #pragma warning(pop)
00014
00015 #include "RevealHoverLight.properties.cpp"
00016
00017 static constexpr EasingInfo c_LinearEasing = EasingInfo{ EasingTypes::Linear,{ 0.f, 0.f },{ 0.f, 0.f } };
00018 static constexpr EasingInfo c_CubicEasing1 = EasingInfo{ EasingTypes::CubicBezier,{ 0.5f, 0.f } ,{ 0.6f, 1.f } };
00019 static constexpr EasingInfo c_CubicEasingRelease = EasingInfo{ EasingTypes::CubicBezier,{ 0.33f, 0.f },{ 0.67f, 1.f } };
00020 static constexpr winrt::TimeSpan c_HalfDuration = 166ms;
00021
00022 // Due to "Bug 14047529: Flash when moving mouse over NavigationView items due to reveal backplate"
00023 // we are removing the proposed AnimToOff/AnimToHover 166ms fade animations until Comp delivers brush cross-fade capability.
00024 // Note that the fade animations are implemented with InnerConeColor/OuterConeColor on RS2 and InnerConeIntensity/OuterConeIntensity on RS3+.
00025 // For RS2, removing the animations has the side effect that hover light to sometimes not show up on tap; this is due to issues in the PointerSourceWrapper's
00026 // simulated touch mode in the RS2 OS release. To work around, we use a 1ms color animation. This can still lead to a flash, but a very brief one.
00027 // For RS3+, we directly switch light on/off, which completely resolves the flash.
00028 static constexpr std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> sc_revealHoverSpotlightStates = { {
00029         // AnimToOff
00030         // Flags, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00031         {
00032             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeColor         , L"InnerConeColor"         , 1ms, { 255, 0, 0, 0 } },
00033             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeColor         , L"OuterConeColor"         , 1ms, { 255, 0, 0, 0 } },
00034             { RevealHoverSpotlightFlags::None,    SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity"     , c_HalfDuration, 0.f },
00035             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity"     , c_HalfDuration, 0.f },
00036             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterAngleScale        , L"OuterAngleScale"        , c_HalfDuration, 1.f },
00037         },
00038
00039         // AnimToHover
00040         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00041         {
00042             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeColor         , L"InnerConeColor"         , 1ms, { 255, 255, 255, 255 } },
00043             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeColor         , L"OuterConeColor"         , 1ms, { 255, 255, 255, 255 } },
00044             { RevealHoverSpotlightFlags::None,    SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity"     , c_HalfDuration, 1.f },
00045             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity"     , c_HalfDuration, 1.f },
00046             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterAngleScale        , L"OuterAngleScale"        , c_HalfDuration, 1.f },
00047         },
00048
00049         // Pressing
00050         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00051         {
00052             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::InnerConeColor         , L"InnerConeColor" },
00053             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterConeColor         , L"OuterConeColor" },
00054             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity" },
00055             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity" },
00056             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterAngleScale        , L"OuterAngleScale" },
00057         },
00058
00059         // FastRelease
00060         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00061         {
00062             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::InnerConeColor         , L"InnerConeColor" },
00063             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterConeColor         , L"OuterConeColor" },
00064             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity" },
00065             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity" },
00066             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterAngleScale        , L"OuterAngleScale" },
00067         },
00068
00069         // SlowRelease
00070         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00071         {
00072             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::InnerConeColor         , L"InnerConeColor" },
00073             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterConeColor         , L"OuterConeColor" },
00074             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity" },
00075             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity" },
00076             { RevealHoverSpotlightFlags::Ignore,  SpotlightProperty::OuterAngleScale        , L"OuterAngleScale" },
00077         },
00078
00079     } };
00080
00081 static constexpr std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> sc_pressSpotLightStates = { {
00082         // AnimToOff
00083         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00084         {
00085             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeColor         , L"InnerConeColor"         , 1ms, { 255, 0, 0, 0 },      c_CubicEasing1 },
00086             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeColor         , L"OuterConeColor"         , 1ms, { 255, 0, 0, 0 },      c_CubicEasing1 },
00087             { RevealHoverSpotlightFlags::None,    SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity"     , c_HalfDuration, 0.f,        c_CubicEasing1 },
00088             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity"     , c_HalfDuration, 0.f,        c_CubicEasing1 },
00089             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterAngleScale        , L"OuterAngleScale"        , c_HalfDuration, 1.f,        c_CubicEasing1 },
00090         },
00091
00092         // AnimToHover
00093         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00094         {
00095             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeColor         , L"InnerConeColor"         , 1ms, { 255, 0, 0, 0 },       c_CubicEasing1 },
00096             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeColor         , L"OuterConeColor"         , 1ms, { 255, 0, 0, 0 },       c_CubicEasing1 },
00097             { RevealHoverSpotlightFlags::None,    SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity"     , c_HalfDuration, 0.f,         c_CubicEasing1 },
00098             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity"     , c_HalfDuration, 0.f,         c_CubicEasing1 },
00099             { RevealHoverSpotlightFlags::None,    SpotlightProperty::OuterAngleScale        , L"OuterAngleScale"        , c_HalfDuration, 1.f,         c_CubicEasing1 },
00100         },
00101
00102         // Pressing
00103         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00104         {
00105             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeColor         , L"InnerConeColor"         , 66ms,{ 255, 255, 255, 255 },            c_LinearEasing },
00106             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeColor         , L"OuterConeColor"         , 66ms,{ 255, 255, 255, 255 },            c_LinearEasing },
00107             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity"     , 66ms, 1.f,                              c_LinearEasing },
00108             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity"     , 66ms, 1.f,                              c_CubicEasing1 },
00109             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterAngleScale        , L"OuterAngleScale"        , 66ms, 1.f,                              c_LinearEasing },
00110         },
00111
00112         // FastRelease
00113         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00114         {
00115             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeColor         , L"InnerConeColor"         , 200ms,{ 255, 0, 0, 0 },                c_CubicEasingRelease },
00116             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeColor         , L"OuterConeColor"         , 266ms,{ 255, 0, 0, 0 },                c_CubicEasingRelease },
00117             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity"     , 200ms, 0.f,                             c_CubicEasingRelease },
00118             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity"     , 266ms, 0.f,                             c_CubicEasingRelease },
00119             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterAngleScale        , L"OuterAngleScale"        , 266ms, 4.44f,                           c_CubicEasingRelease },
00120         },
00121
00122         // SlowRelease
00123         // Ignore, Animate, SpotlightProperty, PropertyName, Duration, Value, EasingType, EasingControlPoint1, EasingControlPoint2
00124         {
00125             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeColor         , L"InnerConeColor"         , 1000ms,{ 255, 0, 0, 0 },               c_CubicEasingRelease },
00126             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeColor         , L"OuterConeColor"         , 1500ms,{ 255, 0, 0, 0 },               c_CubicEasingRelease },
00127             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::InnerConeIntensity     , L"InnerConeIntensity"     , 1000ms, 0.f,                            c_CubicEasingRelease },
00128             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterConeIntensity     , L"OuterConeIntensity"     , 1500ms, 0.f,                            c_CubicEasingRelease },
00129             { RevealHoverSpotlightFlags::Animate, SpotlightProperty::OuterAngleScale        , L"OuterAngleScale"        , 1500ms, 4.44f,                          c_CubicEasingRelease },
00130         },
00131     } };
00132
00133 #if DBG
00134 // NOTE: These arrays exist because in debug they need to be mutable so that the test API can change values dynamically.
00135 // We default them to the const data blobs above but then they can be modified. Below the code chooses the mutable one
00136 // in debug and the const one in retail.
00137 std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> RevealHoverLight::s_revealHoverSpotlightStates = sc_revealHoverSpotlightStates;
00138 std::array<RevealHoverSpotlightStateDesc, RevealHoverSpotlightState_StateCount> RevealHoverLight::s_pressSpotLightStates = sc_pressSpotLightStates;
00139
00140 float RevealHoverLight::s_lightMinSize{ 16.0f };
00141 float RevealHoverLight::s_lightMaxSize{ 512.0f };
00142 float RevealHoverLight::s_sizeAdjustment{ 12.0f };
00143 float RevealHoverLight::s_pressOuterSize{ 47.25f };
00144 float RevealHoverLight::s_innerConeAngleInDegrees{ 0.f };
00145 float RevealHoverLight::s_outerConeAngleInDegrees{ 0.f };
00146 float RevealHoverLight::s_spotlightHeight{ 256.f };
00147 float RevealHoverLight::s_constantAttenuation{ 2.f };
00148 float RevealHoverLight::s_linearAttenuation{ 0.5f };
00149 static constexpr auto c_PointerOffsetExpression = L"pointer.Position + Vector3(0, 0, props.SpotlightHeight)";
00150 static constexpr auto c_CenteredOffsetExpression = L"Vector3((visual.Size.X / 2), (visual.Size.Y / 2), props.SpotlightHeight)";
00151 static constexpr auto c_OuterAngleExpression = L"ATan((Clamp(Max(visual.Size.X, visual.Size.Y) + props.SizeAdjustment, props.MinSize, props.MaxSize) * props.OuterAngleScale) / props.SpotlightHeight)";
00152 static constexpr auto c_PressOuterAngleExpression = L"ATan(((props.PressOuterSize) * props.OuterAngleScale) / props.SpotlightHeight)";
00153 #else
00154 const float RevealHoverLight::s_constantAttenuation{ 2.f };
00155 const float RevealHoverLight::s_linearAttenuation{ 0.5f };
00156 static constexpr auto c_PointerOffsetExpression = L"pointer.Position + Vector3(0, 0, 256)";
00157 static constexpr auto c_CenteredOffsetExpression = L"Vector3((visual.Size.X / 2), (visual.Size.Y / 2), 256)";
00158 static constexpr auto c_OuterAngleExpression = L"ATan((Clamp(Max(visual.Size.X, visual.Size.Y) + 12, 16, 512) * props.OuterAngleScale) / 256)";
00159 static constexpr auto c_PressOuterAngleExpression = L"ATan(((47.25) * props.OuterAngleScale) / 256)";
00160 #endif
00161
00162
00163 winrt::hstring& RevealHoverLight::GetLightIdStatic()
00164 {
00165     static winrt::hstring s_RevealHoverLightId{ MUXCONTROLSMEDIA_NAMESPACE_STR L".RevealHoverLight" };
00166     return s_RevealHoverLightId;
00167 }
00168
00169 winrt::hstring RevealHoverLight::GetId()
00170 {
00171     return GetLightIdStatic();
00172 }
00173
00174 void RevealHoverLight::OnConnected(winrt::UIElement const& newElement)
00175 {
00176     m_targetElement = winrt::make_weak(newElement);
00177
00178     m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });
00179
00180     if (!m_isDisabledByMaterialPolicy)
00181     {
00182         EnsureCompositionResources();
00183     }
00184 }
00185
00186 void RevealHoverLight::OnDisconnected(winrt::UIElement const& /*oldElement*/)
00187 {
00188     ReleaseCompositionResources();
00189
00190     m_targetElement = nullptr;
00191
00192     MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
00193     m_materialPolicyChangedToken.value = 0;
00194 }
00195
00196 void RevealHoverLight::EnsureCompositionResources()
00197 {
00198     if (!m_compositionSpotLight)
00199     {
00200         if (auto element = m_targetElement.get())
00201         {
00202             auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00203
00204             m_compositionSpotLight = compositor.CreateSpotLight();
00205             CompositionLight(m_compositionSpotLight);
00206
00207             // Set non-default constant values
00208             m_compositionSpotLight.ConstantAttenuation(s_constantAttenuation);
00209             m_compositionSpotLight.LinearAttenuation(s_linearAttenuation);
00210
00211             // Not initializing these prevents spotlight from rendering
00212             m_compositionSpotLight.InnerConeAngleInDegrees(0);
00213             m_compositionSpotLight.OuterConeAngleInDegrees(0);
00214
00215             // Set non-animatable initial state. In DBG mode, it can be adjusted via the PropertySet through RevealTestApi
00216             m_offsetProps = compositor.CreatePropertySet();
00217 #if DBG
00218             m_offsetProps.InsertScalar(L"MinSize", s_lightMinSize);
00219             m_offsetProps.InsertScalar(L"MaxSize", s_lightMaxSize);
00220             m_offsetProps.InsertScalar(L"SizeAdjustment", s_sizeAdjustment);
00221             m_offsetProps.InsertScalar(L"PressOuterSize", s_pressOuterSize);
00222             m_offsetProps.InsertScalar(L"SpotlightHeight", s_spotlightHeight);
00223 #endif
00224
00225             m_offsetAnimation = compositor.CreateExpressionAnimation(c_CenteredOffsetExpression);
00226             m_offsetAnimation.SetReferenceParameter(L"props", m_offsetProps);
00227
00228             m_outerAngleAnimation = compositor.CreateExpressionAnimation(m_isPressLight ? c_PressOuterAngleExpression : c_OuterAngleExpression);
00229             m_outerAngleAnimation.SetReferenceParameter(L"props", m_offsetProps);
00230
00231             m_colorsProxy = CreateSpotLightColorsProxy(m_compositionSpotLight);
00232
00233             // hook into PointerPressed event so we know if pressed is invoked by mouse/touch versus keyboard
00234             m_elementPointerPressedEventHandler = winrt::box_value<winrt::PointerEventHandler>({ this, &RevealHoverLight::OnPointerPressed });
00235             element.AddHandler(winrt::UIElement::PointerPressedEvent(), m_elementPointerPressedEventHandler, true);
00236
00237             // Set animatable initial state
00238 #if DBG
00239             m_spotLightStates = m_isPressLight ? s_pressSpotLightStates.data() : s_revealHoverSpotlightStates.data();
00240 #else
00241             m_spotLightStates = m_isPressLight ? sc_pressSpotLightStates.data() : sc_revealHoverSpotlightStates.data();
00242 #endif
00243             SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToOff]);
00244
00245             m_pointer = winrt::ElementCompositionPreview::GetPointerPositionPropertySet(element);
00246             const auto elementVisual = winrt::ElementCompositionPreview::GetElementVisual(element);
00247
00248             m_offsetAnimation.SetReferenceParameter(L"pointer", m_pointer);
00249             m_offsetAnimation.SetReferenceParameter(L"visual", elementVisual);
00250             m_outerAngleAnimation.SetReferenceParameter(L"visual", elementVisual);
00251
00252             if (m_shouldLightBeOn)
00253             {
00254                 SwitchLight(true);
00255             }
00256         }
00257     }
00258 }
00259
00260 void RevealHoverLight::ReleaseCompositionResources()
00261 {
00262     CancelCurrentPressStateContinuation();
00263
00264     if (m_targetElement)
00265     {
00266         auto element = m_targetElement.get();
00267
00268         if (m_elementPointerPressedEventHandler)
00269         {
00270             // clean up PointerPressed event
00271             element.RemoveHandler(winrt::UIElement::PointerPressedEvent(), m_elementPointerPressedEventHandler);
00272         }
00273     }
00274     m_elementPointerPressedEventHandler = nullptr;
00275
00276     DisableHoverAnimation();
00277     m_offsetAnimation = nullptr;
00278     m_outerAngleAnimation = nullptr;
00279     m_compositionSpotLight = nullptr;
00280
00281     if (m_pointer)
00282     {
00283         m_pointer.Close();
00284         m_pointer = nullptr;
00285     }
00286
00287     m_colorsProxy = nullptr;
00288     m_offsetAnimation = nullptr;
00289     m_offsetProps = nullptr;
00290
00291     CompositionLight(nullptr);
00292 }
00293
00294 void RevealHoverLight::OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy)
00295 {
00296     // MaterialHelper::LightPolicyChangedHelper<RevealHoverLight>(this, isDisabledByMaterialPolicy); // Bug 24355584: DCPP: Reveal is disabled
00297     MaterialHelper::LightPolicyChangedHelper<RevealHoverLight>(this, true);
00298
00299 }
00300
00301 void RevealHoverLight::GoToState(_In_ winrt::RevealBrushState newState)
00302 {
00303     switch (newState)
00304     {
00305     case winrt::RevealBrushState::Normal:
00306         GotoLightState(LightEvents::GotoNormal);
00307         break;
00308     case winrt::RevealBrushState::PointerOver:
00309         GotoLightState(LightEvents::GotoPointerOver);
00310         break;
00311     case winrt::RevealBrushState::Pressed:
00312         GotoLightState(LightEvents::GotoPressed);
00313         break;
00314     }
00315 }
00316
00317 // There are 5 possible states for the hover light: { Off, AnimToHover, AnimToOff, Hover, Pressing }
00318 // There are 4 possible events which can result in a state change: { GotoNormal, GotoPointerOver, GotoPressed, AnimationComplete }.
00319 //    >> The first three  correspond to VSM state transitionswhile AnimationComplete signifies that an animated state transition is finished.
00320 //
00321 // Of the 20 possible transitions, 19 (?) either do nothing or switch to another state. There is a little bit of logic nescessary
00322 // when in the state Releasing and the animation completes (what happens depends on whether the pointer is pressed and / or hovering)
00323 void RevealHoverLight::GotoLightState(LightEvents e)
00324 {
00325     // Update pointer flags before transitioning to the next state
00326     switch (e)
00327     {
00328     case LightEvents::GotoNormal:
00329     {
00330         m_centerLight = true;
00331         m_isPointerOver = false;
00332         m_isPressed = false;
00333     }
00334     break;
00335
00336     case LightEvents::GotoPointerOver:
00337     {
00338         m_centerLight = false;
00339         m_isPointerOver = true;
00340         m_isPressed = false;
00341     }
00342     break;
00343
00344     case LightEvents::GotoPressed:
00345     {
00346         m_isPressed = true;
00347     }
00348     break;
00349     case LightEvents::AnimationComplete:
00350         break;
00351     }
00352
00353     const auto initState = m_currentLightState;
00354     switch (initState)
00355     {
00356     case LightStates::Off:
00357         switch (e)
00358         {
00359         case LightEvents::GotoNormal:
00360             break;
00361         case LightEvents::GotoPointerOver:
00362             GotoLightStateHelper(LightStates::AnimToHover);
00363             break;
00364         case LightEvents::GotoPressed:
00365             GotoLightStateHelper(LightStates::Pressing);
00366             break;
00367         case LightEvents::AnimationComplete:
00368             break;
00369         }
00370         break;
00371
00372     case LightStates::AnimToHover:
00373         switch (e)
00374         {
00375         case LightEvents::GotoNormal:
00376             GotoLightStateHelper(LightStates::AnimToOff);
00377             break;
00378         case LightEvents::GotoPointerOver:
00379             break;
00380         case LightEvents::GotoPressed:
00381             GotoLightStateHelper(LightStates::Pressing);
00382             break;
00383         case LightEvents::AnimationComplete:
00384             GotoLightStateHelper(LightStates::Hover);
00385             break;
00386         }
00387         break;
00388
00389     case LightStates::AnimToOff:
00390         switch (e)
00391         {
00392         case LightEvents::GotoNormal:
00393             break;
00394         case LightEvents::GotoPointerOver:
00395             GotoLightStateHelper(LightStates::AnimToHover);
00396             break;
00397         case LightEvents::GotoPressed:
00398             GotoLightStateHelper(LightStates::Pressing);
00399             break;
00400         case LightEvents::AnimationComplete:
00401             GotoLightStateHelper(LightStates::Off);
00402             break;
00403         }
00404         break;
00405
00406     case LightStates::Hover:
00407         switch (e)
00408         {
00409         case LightEvents::GotoNormal:
00410             GotoLightStateHelper(LightStates::AnimToOff);
00411             break;
00412         case LightEvents::GotoPointerOver:
00413             break;
00414         case LightEvents::GotoPressed:
00415             GotoLightStateHelper(LightStates::Pressing);
00416             break;
00417         case LightEvents::AnimationComplete:
00418             break;
00419         }
00420         break;
00421
00422     case LightStates::Pressing:
00423     {
00424         // Once the press is done, we always reset to pointer-based offset
00425         if (m_compositionSpotLight)
00426         {
00427             m_offsetAnimation.Expression(c_PointerOffsetExpression);
00428             m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
00429         }
00430
00431         switch (e)
00432         {
00433         case LightEvents::GotoNormal:
00434             GotoLightStateHelper(LightStates::AnimToOff);
00435             break;
00436         case LightEvents::GotoPointerOver:
00437             break;
00438         case LightEvents::GotoPressed:
00439         {
00440             // This indicates a press, then release then press again while the first press animation is still going
00441             GotoLightStateHelper(LightStates::AnimToHover, true);
00442             GotoLightStateHelper(LightStates::Pressing);
00443         }
00444         break;
00445         case LightEvents::AnimationComplete:
00446         {
00447             if (m_isPressed)
00448             {
00449                 GotoLightStateHelper(LightStates::SlowRelease);
00450             }
00451             else
00452             {
00453                 GotoLightStateHelper(LightStates::FastRelease);
00454             }
00455         }
00456         break;
00457         }
00458     }
00459     break;
00460
00461     case LightStates::FastRelease:
00462         switch (e)
00463         {
00464         case LightEvents::GotoNormal:
00465             GotoLightStateHelper(LightStates::AnimToOff);
00466             break;
00467         case LightEvents::GotoPointerOver:
00468             break;
00469         case LightEvents::GotoPressed:
00470             // This indicates a press, then release then press again while the first press animation is still going
00471             GotoLightStateHelper(LightStates::AnimToHover, true);
00472             GotoLightStateHelper(LightStates::Pressing);
00473             break;
00474         case LightEvents::AnimationComplete:
00475             if (!m_isPressed && m_isPointerOver)
00476             {
00477                 GotoLightStateHelper(LightStates::AnimToHover, true);
00478             }
00479             break;
00480         }
00481         break;
00482
00483     case LightStates::SlowRelease:
00484         switch (e)
00485         {
00486         case LightEvents::GotoNormal:
00487             GotoLightStateHelper(LightStates::AnimToOff);
00488             break;
00489         case LightEvents::GotoPointerOver:
00490             // This indicates a semi-long press, where button is released before it's done. Complete it with a FastRelease animation.
00491             GotoLightStateHelper(LightStates::FastRelease);
00492             break;
00493         case LightEvents::GotoPressed:
00494             // This indicates a press, then release then press again while the first press animation is still going
00495             GotoLightStateHelper(LightStates::AnimToHover, true);
00496             GotoLightStateHelper(LightStates::Pressing);
00497             break;
00498         case LightEvents::AnimationComplete:
00499             if (!m_isPressed && m_isPointerOver)
00500             {
00501                 GotoLightStateHelper(LightStates::AnimToHover, true);
00502             }
00503             break;
00504         }
00505         break;
00506     }
00507 }
00508
00509 void RevealHoverLight::GotoLightStateHelper(LightStates target, bool skipAnimation)
00510 {
00511     CancelCurrentPressStateContinuation();
00512
00513     m_currentLightState = target;
00514
00515     switch (target)
00516     {
00517     case LightStates::Off:
00518     {
00519         SwitchLight(false);
00520     }
00521     break;
00522
00523     case LightStates::AnimToOff:
00524     {
00525         SwitchLight(true);
00526
00527         if (skipAnimation)
00528         {
00529             SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToOff]);
00530             GotoLightState(LightEvents::AnimationComplete);
00531         }
00532         else
00533         {
00534             PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToOff], &m_cancelCurrentPressStateContinuation, [=]
00535                 {
00536                     GotoLightState(LightEvents::AnimationComplete);
00537                 });
00538         }
00539     }
00540     break;
00541
00542     case LightStates::AnimToHover:
00543     {
00544         if (m_compositionSpotLight)
00545         {
00546             m_offsetAnimation.Expression(c_PointerOffsetExpression);
00547             m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
00548         }
00549
00550         SwitchLight(true);
00551
00552         if (skipAnimation)
00553         {
00554             SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToHover]);
00555             GotoLightState(LightEvents::AnimationComplete);
00556         }
00557         else
00558         {
00559             PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_AnimToHover], &m_cancelCurrentPressStateContinuation, [=]
00560                 {
00561                     GotoLightState(LightEvents::AnimationComplete);
00562                 });
00563         }
00564     }
00565     break;
00566
00567     case LightStates::Hover:
00568     {
00569         SwitchLight(true);
00570     }
00571     break;
00572
00573     case LightStates::Pressing:
00574     {
00575         if (m_compositionSpotLight)
00576         {
00577             auto targetControl = m_targetElement.get().try_as<winrt::Control>();
00578
00579             // m_targetElement can be Grid or other kind of element which is not a control.
00580             // In this case, we only check m_centerLight, and set focusState directly to keyboard.
00581             // This is not a perfect solution, The light may appear in the wrong place if apps
00582             // apply RevealBrush.State to elements really deep in the template:
00583             // m_centerLight alone is not correct if reveal light is added on Pressed(as usually happens for touch),
00584             // in that case the light misses the PointerPressed event since it's not yet hooked up at that time,
00585             // and we will still do keyboard placement.
00586
00587             // To avoid these types of cases, we should suggest customer that RevealState is always applied to immediate child of a Control
00588             // Like below, we add UserControl:
00589             //  <Grid><UserControl><Border Name="myBorderElement"></Border></UserControl></Grid>
00590             //  then RevealBrush::SetState(myBorderElement, RevealBrushState::Pressed);
00591             auto const focusState = targetControl ? targetControl.FocusState() : winrt::FocusState::Keyboard;
00592
00593             // Only center the hover light if the element has KB focus and to the best of our knowledge
00594             // it is the keyboard and not pointer that's responsible for current press.
00595             if (focusState == winrt::FocusState::Keyboard && m_centerLight)
00596             {
00597                 m_offsetAnimation.Expression(c_CenteredOffsetExpression);
00598                 m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
00599             }
00600             else
00601             {
00602                 m_offsetAnimation.Expression(c_PointerOffsetExpression);
00603                 m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
00604             }
00605         }
00606         SwitchLight(true);
00607
00608         if (skipAnimation)
00609         {
00610             SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_Pressing]);
00611             GotoLightState(LightEvents::AnimationComplete);
00612         }
00613         else
00614         {
00615             PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_Pressing], &m_cancelCurrentPressStateContinuation, [=]
00616                 {
00617                     GotoLightState(LightEvents::AnimationComplete);
00618                 });
00619         }
00620     }
00621     break;
00622
00623     case LightStates::FastRelease:
00624     {
00625         SwitchLight(true);
00626
00627         if (skipAnimation)
00628         {
00629             SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_FastRelease]);
00630             GotoLightState(LightEvents::AnimationComplete);
00631         }
00632         else
00633         {
00634             PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_FastRelease], &m_cancelCurrentPressStateContinuation, [=]
00635                 {
00636                     GotoLightState(LightEvents::AnimationComplete);
00637                 });
00638         }
00639     }
00640     break;
00641
00642     case LightStates::SlowRelease:
00643     {
00644         SwitchLight(true);
00645
00646         if (skipAnimation)
00647         {
00648             SetSpotLightStateImmediate(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_SlowRelease]);
00649             GotoLightState(LightEvents::AnimationComplete);
00650         }
00651         else
00652         {
00653             PlaySpotLightStateAnimation(m_compositionSpotLight, m_colorsProxy, m_offsetProps, m_spotLightStates[RevealHoverSpotlightState_SlowRelease], &m_cancelCurrentPressStateContinuation, [=]
00654                 {
00655                     GotoLightState(LightEvents::AnimationComplete);
00656                 });
00657         }
00658     }
00659     break;
00660     }
00661 }
00662
00663 void RevealHoverLight::CancelCurrentPressStateContinuation()
00664 {
00665     if (m_cancelCurrentPressStateContinuation)
00666     {
00667         m_cancelCurrentPressStateContinuation();
00668         m_cancelCurrentPressStateContinuation = nullptr;
00669     }
00670 }
00671
00672 void  RevealHoverLight::OnPointerPressed(const winrt::IInspectable& /*sender*/, const winrt::PointerRoutedEventArgs& /*args*/)
00673 {
00674     m_centerLight = false;
00675
00676     // Sometimes we get pointer pressed after the VSM has already gone to the pressed state. Handle that case by
00677     // updating the expression if we get these out of sequence.
00678     if (m_isPressed && m_compositionSpotLight)
00679     {
00680         m_offsetAnimation.Expression(c_PointerOffsetExpression);
00681         m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
00682     }
00683 }
00684
00685 // Flip the light switch and toggle the expression animations that correctly size and position it (i.e. stop the animations when light is off).
00686 void RevealHoverLight::SwitchLight(bool turnOn)
00687 {
00688     if (m_compositionSpotLight && (!m_cancelCurrentPressStateContinuation || turnOn))
00689     {
00690         m_shouldLightBeOn = turnOn;
00691         m_shouldLightBeOn ? EnableHoverAnimation() : DisableHoverAnimation();
00692
00693         m_colorsProxy.InsertScalar(L"LightIntensity", turnOn ? 1.f : 0.f);
00694
00695         // Also use the more performanant IsEnabled property if it is available (RS4+).
00696         if (auto lightWithEnabledProperty = m_compositionSpotLight.try_as<winrt::ICompositionLight3>())
00697         {
00698             lightWithEnabledProperty.IsEnabled(turnOn);
00699         }
00700     }
00701 }
00702
00703 void RevealHoverLight::EnableHoverAnimation()
00704 {
00705     if (m_compositionSpotLight && !m_isHoverAnimationActive)
00706     {
00707         m_isHoverAnimationActive = true;
00708         m_compositionSpotLight.StartAnimation(L"Offset", m_offsetAnimation);
00709         m_compositionSpotLight.StartAnimation(L"OuterConeAngle", m_outerAngleAnimation);
00710     }
00711 }
00712
00713 void RevealHoverLight::DisableHoverAnimation()
00714 {
00715     if (m_compositionSpotLight && m_isHoverAnimationActive)
00716     {
00717         m_isHoverAnimationActive = false;
00718         m_compositionSpotLight.StopAnimation(L"Offset");
00719         m_compositionSpotLight.StopAnimation(L"OuterConeAngle");
00720     }
00721 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PersonPictureAutomationPeer Member List

This is the complete list of members for PersonPictureAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< PersonPictureAutomationPeer > &&self) noexcept | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
final_release(std::unique_ptr< PersonPictureAutomationPeer > &&self) | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | PersonPictureAutomationPeer |
GetBase() | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
GetClassNameCore() | PersonPictureAutomationPeer |
GetInner() | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
IsOnThread() | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
PersonPictureAutomationPeer(winrt::PersonPicture const &owner) | PersonPictureAutomationPeer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< PersonPictureAutomationPeer, winrt::implementation::PersonPictureAutomationPeerT > | [inline]
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IRefreshInfoProviderAdapter Member List

This is the complete list of members for IRefreshInfoProviderAdapter, including all inherited members.
AdaptFromTree(Microsoft.UI.Xaml.UIElement root, Windows.Foundation.Size visualizerSize) | IRefreshInfoProviderAdapter
SetAnimations(Microsoft.UI.Xaml.UIElement refreshVisualizerAnimatableContainer) | IRefreshInfoProviderAdapter
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedChevronUpDownSmallVisualSource_AnimatedVisual Member List

This is the complete list of members for AnimatedChevronUpDownSmallVisualSource_AnimatedVisual, including all inherited members.
_reusableExpressionAnimation(compositor.CreateExpressionAnimation()) | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline]
AnimatedChevronUpDownSmallVisualSource_AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
CanvasGeometryToIGeometrySource2D(winrt::com_ptr< CanvasGeometry > geo) | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private, static]
Close() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline]
ContainerVisual_0() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_1() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_2() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_3() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
Duration() const | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline]
Geometry() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
InsetClip_0() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, static]
OffsetVector2Animation() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
PathGeometry() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
Root() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
RootProgress() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
RootVisual() const | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline]
RotationAngleInDegreesScalarAnimation_180_to_180() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
Size() const | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline]
SpriteShape() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
ThemeColor_Foreground() | AnimatedChevronUpDownSmallVisualSource_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorSpectrum::ColorSpectrumFactory Member List

This is the complete list of members for ColorSpectrum::ColorSpectrumFactory, including all inherited members.
Create(UIObject element) ColorSpectrum::ColorSpectrumFactory [inline]
Generated on Sun Dec 1 2024 20:53:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DesktopAcrylicBackdrop::ControllerEntry Member List

This is the complete list of members for DesktopAcrylicBackdrop::ControllerEntry, including all inherited members.
ControllerEntry(ICompositionSupportsSystemBackdrop target, DesktopAcrylicController controller, SystemBackdropConfiguration configuration) | DesktopAcrylicBackdrop::ControllerEntry
ControllerEntry(const ControllerEntry &other) | DesktopAcrylicBackdrop::ControllerEntry
m_controller | DesktopAcrylicBackdrop::ControllerEntry
m_target | DesktopAcrylicBackdrop::ControllerEntry
operator=(const ControllerEntry &other) | DesktopAcrylicBackdrop::ControllerEntry
~ControllerEntry() | DesktopAcrylicBackdrop::ControllerEntry
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationViewAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationViewAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(NavigationViewAutomationPeer)
00012 }
00013
00014 #include "NavigationViewAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapControlTests Member List

This is the complete list of members for MapControlTests, including all inherited members.
AddMultipleElementsOnMap() | MapControlTests | [inline]
ClassInitialize(TestContext testContext) | MapControlTests | [inline, static]
TestCleanup() | MapControlTests | [inline]
ValidadePinClickEvent() | MapControlTests | [inline]
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TransitionManager.cpp Source File

  • File List
  • File Members
  • Repeater

TransitionManager.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "TransitionManager.h"
00008 #include "ItemsRepeater.h"
00009 #include "ItemCollectionTransition.h"
00010
00011 TransitionManager::TransitionManager(ItemsRepeater* owner) :
00012     m_owner(owner),
00013     m_transitionProvider(owner)
00014 {
00015     // ItemsRepeater is not fully constructed yet. Don't interact with it.
00016 }
00017
00018 void TransitionManager::OnTransitionProviderChanged(const winrt::ItemCollectionTransitionProvider& newTransitionProvider)
00019 {
00020     // While an element is hiding, we have ownership of it. We need
00021     // to know when its animation completes so that we give it back
00022     // to the view generator.
00023     if (m_transitionProvider)
00024     {
00025         MUX_ASSERT(m_transitionCompleted.value);
00026         m_transitionProvider.get().TransitionCompleted(m_transitionCompleted);
00027     }
00028
00029     m_transitionProvider.set(newTransitionProvider);
00030
00031     if (newTransitionProvider)
00032     {
00033         m_transitionCompleted = newTransitionProvider.TransitionCompleted({ this, &TransitionManager::OnTransitionProviderTransitionCompleted });
00034     }
00035 }
00036
00037 void TransitionManager::OnLayoutChanging()
00038 {
00039     m_hasRecordedLayoutTransitions = true;
00040 }
00041
00042 void TransitionManager::OnItemsSourceChanged(const winrt::IInspectable&, const winrt::NotifyCollectionChangedEventArgs& args)
00043 {
00044     switch (args.Action())
00045     {
00046     case winrt::NotifyCollectionChangedAction::Add:
00047         m_hasRecordedAdds = true;
00048         break;
00049     case winrt::NotifyCollectionChangedAction::Remove:
00050         m_hasRecordedRemoves = true;
00051         break;
00052     case winrt::NotifyCollectionChangedAction::Replace:
00053         m_hasRecordedAdds = true;
00054         m_hasRecordedRemoves = true;
00055         break;
00056     case winrt::NotifyCollectionChangedAction::Reset:
00057         m_hasRecordedResets = true;
00058         break;
00059     }
00060 }
00061
00062 void TransitionManager::OnElementPrepared(const winrt::UIElement& element)
00063 {
00064     if (m_transitionProvider)
00065     {
00066         winrt::ItemCollectionTransitionTriggers triggers = static_cast<winrt::ItemCollectionTransitionTriggers>(0);
00067         if (m_hasRecordedAdds) triggers |= winrt::ItemCollectionTransitionTriggers::CollectionChangeAdd;
00068         if (m_hasRecordedResets) triggers |= winrt::ItemCollectionTransitionTriggers::CollectionChangeReset;
00069         if (m_hasRecordedLayoutTransitions) triggers |= winrt::ItemCollectionTransitionTriggers::LayoutTransition;
00070
00071         if (triggers != static_cast<winrt::ItemCollectionTransitionTriggers>(0))
00072         {
00073             m_transitionProvider.get().QueueTransition(
00074                 winrt::make<ItemCollectionTransition>(
00075                     m_transitionProvider.get(),
00076                     element,
00077                     winrt::ItemCollectionTransitionOperation::Add,
00078                     triggers));
00079         }
00080     }
00081 }
00082
00083 bool TransitionManager::ClearElement(const winrt::UIElement& element)
00084 {
00085     bool canClear = false;
00086
00087     if (m_transitionProvider)
00088     {
00089         auto triggers = static_cast<winrt::ItemCollectionTransitionTriggers>(0);
00090         if (m_hasRecordedRemoves) triggers |= winrt::ItemCollectionTransitionTriggers::CollectionChangeRemove;
00091         if (m_hasRecordedResets) triggers |= winrt::ItemCollectionTransitionTriggers::CollectionChangeReset;
00092
00093         auto transition =
00094             winrt::make<ItemCollectionTransition>(
00095                 m_transitionProvider.get(),
00096                 element,
00097                 winrt::ItemCollectionTransitionOperation::Remove,
00098                 triggers);
00099
00100         canClear =
00101             triggers != static_cast<winrt::ItemCollectionTransitionTriggers>(0) &&
00102             m_transitionProvider.get().ShouldAnimate(transition);
00103
00104         if (canClear)
00105         {
00106             m_transitionProvider.get().QueueTransition(transition);
00107         }
00108     }
00109
00110     return canClear;
00111 }
00112
00113 void TransitionManager::OnElementBoundsChanged(const winrt::UIElement& element, winrt::Rect oldBounds, winrt::Rect newBounds)
00114 {
00115     if (m_transitionProvider)
00116     {
00117         auto triggers = static_cast<winrt::ItemCollectionTransitionTriggers>(0);
00118         if (m_hasRecordedAdds) triggers |= winrt::ItemCollectionTransitionTriggers::CollectionChangeAdd;
00119         if (m_hasRecordedRemoves) triggers |= winrt::ItemCollectionTransitionTriggers::CollectionChangeRemove;
00120         if (m_hasRecordedResets) triggers |= winrt::ItemCollectionTransitionTriggers::CollectionChangeReset;
00121         if (m_hasRecordedLayoutTransitions) triggers |= winrt::ItemCollectionTransitionTriggers::LayoutTransition;
00122
00123         // A bounds change can occur during initial layout or when resizing the owning control,
00124         // which won't trigger an explicit layout transition but should still be treated as one.
00125         if (triggers == static_cast<winrt::ItemCollectionTransitionTriggers>(0))
00126         {
00127             triggers = winrt::ItemCollectionTransitionTriggers::LayoutTransition;
00128         }
00129
00130         m_transitionProvider.get().QueueTransition(
00131             winrt::make<ItemCollectionTransition>(
00132                 m_transitionProvider.get(),
00133                 element,
00134                 triggers,
00135                 oldBounds,
00136                 newBounds));
00137     }
00138 }
00139
00140 void TransitionManager::OnOwnerArranged()
00141 {
00142     m_hasRecordedAdds = false;
00143     m_hasRecordedRemoves = false;
00144     m_hasRecordedResets = false;
00145     m_hasRecordedLayoutTransitions = false;
00146 }
00147
00148 void TransitionManager::OnTransitionProviderTransitionCompleted(const winrt::ItemCollectionTransitionProvider& /*sender*/, const winrt::ItemCollectionTransitionCompletedEventArgs& args)
00149 {
00150     if (args.Transition().Operation() == winrt::ItemCollectionTransitionOperation::Remove)
00151     {
00152         auto element = args.Element();
00153
00154         if (CachedVisualTreeHelpers::GetParent(element) == static_cast<winrt::DependencyObject>(*m_owner))
00155         {
00156             m_owner->ViewManager().ClearElementToElementFactory(element);
00157
00158             // Invalidate arrange so that repeater can arrange this element off-screen.
00159             m_owner->InvalidateArrange();
00160         }
00161     }
00162 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealTestApi Member List

This is the complete list of members for RevealTestApi, including all inherited members.
abi_enter() | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
BackgroundLight() | RevealTestApi |
BackgroundLightMaxSize() | RevealTestApi |
BackgroundLightMaxSize(double value) | RevealTestApi |
BackgroundLightMinSize() | RevealTestApi |
BackgroundLightMinSize(double value) | RevealTestApi |
BorderLight() | RevealTestApi |
BorderLight_ShouldBeOn(winrt::RevealBorderLight const &value) | RevealTestApi |
BorderWideLight() | RevealTestApi |
CheckThread() | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< RevealTestApi > &&self) noexcept | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
final_release(std::unique_ptr< RevealTestApi > &&self) | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline, static]
GetAsRevealBorderLight(winrt::XamlLight const &value) | RevealTestApi |
GetAsRevealHoverLight(winrt::XamlLight const &value) | RevealTestApi |
GetBackgroundSpotlightProxy(winrt::ApplicationTheme theme) | RevealTestApi | [static]
GetBase() | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
GetHoverLightOffsetExpression(winrt::RevealHoverLight const &value) | RevealTestApi |
GetInner() | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
GetSpotLight(winrt::XamlLight const &value) | RevealTestApi |
GetWindowLightAt(uint32_t i) | RevealTestApi | [private]
HoverLight_IsPointerOver(winrt::RevealHoverLight const &value) | RevealTestApi |
HoverLight_IsPressed(winrt::RevealHoverLight const &value) | RevealTestApi |
HoverLight_ShouldBeOn(winrt::RevealHoverLight const &value) | RevealTestApi |
IsOnThread() | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable > | [inline]
RevealTestApi() | RevealTestApi |
TargetTheme() | RevealTestApi |
TargetTheme(winrt::ApplicationTheme const &value) | RevealTestApi |
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioMenuFlyoutItem/RadioMenuFlyoutItem.cpp Source File

  • File List
  • File Members
  • RadioMenuFlyoutItem

RadioMenuFlyoutItem.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RadioMenuFlyoutItem.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009
00010 thread_local std::unique_ptr<std::map<winrt::hstring, winrt::weak_ref<RadioMenuFlyoutItem>>> RadioMenuFlyoutItem::s_selectionMap;
00011
00012 RadioMenuFlyoutItem::RadioMenuFlyoutItem()
00013 {
00014     __RP_Marker_ClassById(RuntimeProfiler::ProfId_RadioMenuFlyoutItem);
00015
00016     m_InternalIsCheckedChangedRevoker = RegisterPropertyChanged(*this, winrt::ToggleMenuFlyoutItem::IsCheckedProperty(), { this, &RadioMenuFlyoutItem::OnInternalIsCheckedChanged });
00017
00018     if (!s_selectionMap)
00019     {
00020         // Ensure that this object exists
00021         s_selectionMap = std::make_unique<std::map<winrt::hstring, winrt::weak_ref<RadioMenuFlyoutItem>>>();
00022     }
00023
00024     Loaded({ this, &RadioMenuFlyoutItem::OnLoaded });
00025     Unloaded({ this, &RadioMenuFlyoutItem::OnUnloaded });
00026
00027     SetDefaultStyleKey(this);
00028 }
00029
00030 void RadioMenuFlyoutItem::OnLoaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&)
00031 {
00032     UpdateCheckedItemInGroup();
00033 }
00034
00035 void RadioMenuFlyoutItem::OnUnloaded(winrt::IInspectable const&, winrt::RoutedEventArgs const&)
00036 {
00037     // If this is the checked item, remove it from the lookup.
00038     if (m_isChecked && s_selectionMap)
00039     {
00040         SharedHelpers::EraseIfExists(*s_selectionMap, m_groupName);
00041     }
00042 }
00043
00044 void RadioMenuFlyoutItem::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00045 {
00046     winrt::IDependencyProperty property = args.Property();
00047
00048     if (property == s_IsCheckedProperty)
00049     {
00050         if (InternalIsChecked() != IsChecked())
00051         {
00052             m_isSafeUncheck = true;
00053             InternalIsChecked(IsChecked());
00054             m_isSafeUncheck = false;
00055             UpdateCheckedItemInGroup();
00056         }
00057         m_isChecked = IsChecked();
00058     }
00059     else if (property == s_GroupNameProperty)
00060     {
00061         m_groupName = GroupName();
00062     }
00063 }
00064
00065 void RadioMenuFlyoutItem::OnInternalIsCheckedChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00066 {
00067     if (!InternalIsChecked())
00068     {
00069         if (m_isSafeUncheck)
00070         {
00071             // The uncheck is due to another radio button being checked -- that's all right.
00072             IsChecked(false);
00073         }
00074         else
00075         {
00076             // The uncheck is due to user interaction -- not allowed.
00077             InternalIsChecked(true);
00078         }
00079     }
00080     else if (!IsChecked())
00081     {
00082         IsChecked(true);
00083         UpdateCheckedItemInGroup();
00084     }
00085 }
00086
00087 void RadioMenuFlyoutItem::UpdateCheckedItemInGroup()
00088 {
00089     if (IsChecked())
00090     {
00091         const auto groupName = GroupName();
00092
00093         if (const auto previousCheckedItemWeak = (*s_selectionMap)[groupName])
00094         {
00095             if (auto previousCheckedItem = previousCheckedItemWeak.get())
00096             {
00097                 if (previousCheckedItem.get() != this)
00098                 {
00099                     // Uncheck the previously checked item.
00100                     previousCheckedItem->IsChecked(false);
00101                 }
00102             }
00103         }
00104         (*s_selectionMap)[groupName] = this->get_weak();
00105     }
00106 }
00107
00108 void RadioMenuFlyoutItem::OnAreCheckStatesEnabledPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyPropertyChangedEventArgs& args)
00109 {
00110     if (unbox_value<bool>(args.NewValue()))
00111     {
00112         if (auto const& subMenu = sender.try_as<winrt::MenuFlyoutSubItem>())
00113         {
00114             // Every time the submenu is loaded, see if it contains a checked RadioMenuFlyoutItem or not.
00115             subMenu.Loaded(
00116             {
00117                 [subMenuWeak = winrt::make_weak(subMenu)](winrt::IInspectable const& sender, auto const&)
00118                 {
00119                     if (auto subMenu = subMenuWeak.get())
00120                     {
00121                         bool isAnyItemChecked = false;
00122                         for (auto const& item : subMenu.Items())
00123                         {
00124                             if (auto const& radioItem = item.try_as<winrt::RadioMenuFlyoutItem>())
00125                             {
00126                                 isAnyItemChecked = isAnyItemChecked || radioItem.IsChecked();
00127                             }
00128                         }
00129
00130                         winrt::VisualStateManager::GoToState(subMenu, isAnyItemChecked ? L"Checked" : L"Unchecked", false);
00131                     }
00132                 }
00133             });
00134         }
00135     }
00136 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DelegatingItemsSource Member List

This is the complete list of members for DelegatingItemsSource, including all inherited members.
_data | DelegatingItemsSource | [private]
Add(object value) | CustomItemsSourceView | [inline]
Clear() | CustomItemsSourceView | [inline]
CollectionChanged | CustomItemsSourceView |
Contains(object value) | CustomItemsSourceView | [inline]
CopyTo(Array array, int index) | CustomItemsSourceView | [inline]
Count | CustomItemsSourceView |
DelegatingItemsSource(IList data) | DelegatingItemsSource | [inline]
GetAt(int index) | DelegatingItemsSource | [inline]
GetAtCore(int index) | DelegatingItemsSource | [inline, protected, virtual]
GetEnumerator() | CustomItemsSourceView | [inline]
GetSizeCore() | DelegatingItemsSource | [inline, protected, virtual]
IndexFromKey(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
IndexFromKeyCore(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline, protected, virtual]
IndexOf(object value) | CustomItemsSourceView | [inline]
Insert(int index, object value) | CustomItemsSourceView | [inline]
IsFixedSize | CustomItemsSourceView |
IsReadOnly | CustomItemsSourceView |
IsSynchronized | CustomItemsSourceView |
KeyFromIndex(int index) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
KeyFromIndexCore(int index) | DelegatingItemsSource | [inline, protected, virtual]
KeyFromIndexFunc | DelegatingItemsSource |
OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) | DelegatingItemsSource | [inline, private]
OnItemsSourceChanged(NotifyCollectionChangedEventArgs args) | CustomItemsSourceView | [inline, protected]
Remove(object value) | CustomItemsSourceView | [inline]
RemoveAt(int index) | CustomItemsSourceView | [inline]
SyncRoot | CustomItemsSourceView |
this | CustomItemsSourceView |
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsSourceViewProperties Member List

This is the complete list of members for ItemsSourceViewProperties, including all inherited members.
ClearProperties() | ItemsSourceViewProperties | [static]
CollectionChanged(winrt::NotifyCollectionChangedEventHandler const &value) | ItemsSourceViewProperties |
CollectionChanged(winrt::event_token const &token) | ItemsSourceViewProperties |
EnsureProperties() | ItemsSourceViewProperties | [static]
ItemsSourceViewProperties() | ItemsSourceViewProperties |
m_collectionChangedEventSource | ItemsSourceViewProperties |
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformStackLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

VirtualizingUniformStackLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Diagnostics;
00006 using Windows.Foundation;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009
00010 namespace MUXControlsTestApp.Samples
00011 {
00012     public class VirtualizingUniformStackLayout : VirtualizingLayout
00013     {
00014         public double ItemWidth { get; set; }
00015         public double ItemHeight { get; set; }
00016
00017         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00018         {
00019             var realizationRect = context.RealizationRect;
00020             int itemCount = context.ItemCount;
00021             int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
00022             int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
00023             Debug.WriteLine("Measure:" + realizationRect.ToString());
00024
00025             // Viewport + Buffer Rect.
00026             for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
00027             {
00028                 var element = context.GetOrCreateElementAt(currentIndex);
00029                 element.Measure(new Size(ItemWidth, ItemHeight));
00030             }
00031
00032             // Anchor
00033             var anchorIndex = context.RecommendedAnchorIndex;
00034             if (anchorIndex >= 0)
00035             {
00036                 var anchorElement = context.GetOrCreateElementAt(anchorIndex);
00037                 anchorElement.Measure(new Size(ItemWidth, ItemHeight));
00038             }
00039
00040             return new Size(ItemWidth, context.ItemCount * ItemHeight);
00041         }
00042
00043         protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00044         {
00045             var realizationRect = context.RealizationRect;
00046             int itemCount = context.ItemCount;
00047             int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
00048             int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
00049             Debug.WriteLine("Arrange:" + realizationRect.ToString());
00050
00051             // Viewport + Buffer Rect.
00052             for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
00053             {
00054                 var element = context.GetOrCreateElementAt(currentIndex);
00055                 var arrangeRect = new Rect(0, currentIndex * ItemHeight, ItemWidth, ItemHeight);
00056                 element.Arrange(arrangeRect);
00057                 Debug.WriteLine("   Arrange:" + currentIndex + " :" + arrangeRect);
00058             }
00059
00060             // Anchor
00061             var anchorIndex = context.RecommendedAnchorIndex;
00062             if (anchorIndex >= 0)
00063             {
00064                 var anchor = context.GetOrCreateElementAt(anchorIndex);
00065                 var arrangeRect = new Rect(0, anchorIndex * ItemHeight, ItemWidth, ItemHeight);
00066                 anchor.Arrange(arrangeRect);
00067                 Debug.WriteLine("   Arrange:" + anchorIndex + " :" + arrangeRect);
00068             }
00069
00070             return finalSize;
00071         }
00072
00073         #region Private Helper Methods
00074
00075         private int FirstRealizedIndexInRect(Rect realizationRect, int itemCount)
00076         {
00077             return Math.Max(0, Math.Min((int)(realizationRect.Y / ItemHeight), itemCount - 1));
00078         }
00079
00080         private int LastRealizedIndexInRect(Rect realizationRect, int itemCount)
00081         {
00082             int index = realizationRect.Bottom == double.PositiveInfinity ? itemCount - 1 : (int)(realizationRect.Bottom / ItemHeight);
00083             return Math.Max(0, Math.Min(index, itemCount - 1));
00084         }
00085
00086         #endregion Private Methods
00087     }
00088 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/XamlControlsResources.properties.h Source File

  • File List
  • File Members
  • Generated

XamlControlsResources.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class XamlControlsResourcesProperties
00008 {
00009 public:
00010     XamlControlsResourcesProperties();
00011
00012     void UseCompactResources(bool value);
00013     bool UseCompactResources();
00014
00015     static winrt::DependencyProperty UseCompactResourcesProperty() { return s_UseCompactResourcesProperty; }
00016
00017     static GlobalDependencyProperty s_UseCompactResourcesProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021
00022     static void OnUseCompactResourcesPropertyChanged(
00023         winrt::DependencyObject const& sender,
00024         winrt::DependencyPropertyChangedEventArgs const& args);
00025 };
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewTrace.h Source File

  • File List
  • File Members
  • TabView

TabViewTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsTabViewTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_TABVIEW || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsTabViewVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_TABVIEW || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsTabViewPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_TABVIEW || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define TABVIEW_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 TabViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define TABVIEW_TRACE_INFO(sender, message, ...) \
00036 if (IsTabViewTracingEnabled()) \
00037 { \
00038     TABVIEW_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (TabViewTrace::s_IsDebugOutputEnabled || TabViewTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     TABVIEW_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define TABVIEW_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 TabViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define TABVIEW_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsTabViewVerboseTracingEnabled()) \
00050 { \
00051     TABVIEW_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (TabViewTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     TABVIEW_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define TABVIEW_TRACE_PERF(info) \
00059 if (IsTabViewPerfTracingEnabled()) \
00060 { \
00061     TabViewTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define TABVIEW_TRACE_INFO_DBG(sender, message, ...)    TABVIEW_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define TABVIEW_TRACE_VERBOSE_DBG(sender, message, ...) TABVIEW_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define TABVIEW_TRACE_PERF_DBG(info)    TABVIEW_TRACE_PERF(info)
00068 #else
00069 #define TABVIEW_TRACE_INFO_DBG(sender, message, ...)
00070 #define TABVIEW_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define TABVIEW_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class TabViewTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[384]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "TabViewInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_TABVIEW),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"TabView") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[1024]{};
00121         const HRESULT hr = StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args);
00122         if (SUCCEEDED(hr) || hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
00123         {
00124             if (includeTraceLogging)
00125             {
00126                 // TraceViewers
00127                 // http://toolbox/pef
00128                 // http://fastetw/index.aspx
00129                 TraceLoggingWrite(
00130                     g_hLoggingProvider,
00131                     "TabViewVerbose" /* eventName */,
00132                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00133                     TraceLoggingKeyword(KEYWORD_TABVIEW),
00134                     TraceLoggingWideString(buffer, "Message"));
00135             }
00136
00137             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00138             {
00139                 OutputDebugStringW(buffer);
00140             }
00141
00142             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00143
00144             if (globalTestHooks &&
00145                 (globalTestHooks->GetLoggingLevelForType(L"TabView") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00146             {
00147                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00148             }
00149         }
00150         va_end(args);
00151     }
00152
00153     static void TracePerfInfo(PCWSTR info) noexcept
00154     {
00155         // TraceViewers
00156         // http://toolbox/pef
00157         // http://fastetw/index.aspx
00158         TraceLoggingWrite(
00159             g_hPerfProvider,
00160             "TabViewPerf" /* eventName */,
00161             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00162             TraceLoggingKeyword(KEYWORD_TABVIEW),
00163             TraceLoggingWideString(info, "Info"));
00164     }
00165 };
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/PullToRefreshHelperTestApiFactory.h Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

PullToRefreshHelperTestApiFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PullToRefreshHelperTestApi.h"
00007
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingAxeTestPage Member List

This is the complete list of members for ProgressRingAxeTestPage, including all inherited members.
ProgressRingAxeTestPage() ProgressRingAxeTestPage [inline]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockViewGenerator.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks

MockViewGenerator.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Private.Controls;
00009 using Common;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks
00016 {
00017     using ElementFactory = Microsoft.UI.Xaml.Controls.ElementFactory;
00018
00019     public class MockElementFactory : ElementFactory
00020     {
00021         private List<GetElementCallInfo> _recordedGetElementCalls = new List<GetElementCallInfo>();
00022         private List<RecycleElementCallInfo> _recordedRecycleElementCalls = new List<RecycleElementCallInfo>();
00023
00024         public Func<int, UIElement, UIElement> GetElementFunc { get; set; }
00025         public Action<UIElement, UIElement> ClearElementFunc { get; set; }
00026
00027         public static MockElementFactory CreateElementFactory<T>(List<T> mapping) where T : UIElement
00028         {
00029             return new MockElementFactory
00030             {
00031                 GetElementFunc = (index, owner) => mapping[index]
00032             };
00033         }
00034
00035         public static MockElementFactory CreateElementFactory<T>(
00036             Dictionary<int, T> mapping) where T : UIElement
00037         {
00038             return new MockElementFactory
00039             {
00040                 GetElementFunc = (index, owner) => mapping[index]
00041             };
00042         }
00043
00044         public void ValidateGetElementCalls(params GetElementCallInfo[] expected)
00045         {
00046             Log.Comment("Validating GetElement calls");
00047             Verify.AreEqual(expected.Length, _recordedGetElementCalls.Count);
00048             for (int i = 0; i < expected.Length; ++i)
00049             {
00050                 Verify.AreEqual(expected[i].Index, _recordedGetElementCalls[i].Index);
00051                 Verify.AreEqual(expected[i].Owner, _recordedGetElementCalls[i].Owner);
00052             }
00053
00054             _recordedGetElementCalls.Clear();
00055         }
00056
00057         public void ValidateRecycleElementCalls(params RecycleElementCallInfo[] expected)
00058         {
00059             Log.Comment("Validating RecycleElement calls");
00060             Verify.AreEqual(expected.Length, _recordedRecycleElementCalls.Count);
00061             for (int i = 0; i < expected.Length; ++i)
00062             {
00063                 Verify.AreEqual(expected[i].Element, _recordedRecycleElementCalls[i].Element);
00064                 Verify.AreEqual(expected[i].Owner, _recordedRecycleElementCalls[i].Owner);
00065             }
00066
00067             _recordedRecycleElementCalls.Clear();
00068         }
00069
00070         protected override UIElement GetElementCore(ElementFactoryGetArgs args)
00071         {
00072             int index = RepeaterTestHooks.GetElementFactoryElementIndex();
00073             _recordedGetElementCalls.Add(new GetElementCallInfo(index, args.Parent));
00074             return GetElementFunc != null ? GetElementFunc(index, args.Parent) : null;
00075         }
00076
00077         protected override void RecycleElementCore(ElementFactoryRecycleArgs args)
00078         {
00079             _recordedRecycleElementCalls.Add(new RecycleElementCallInfo(args.Element, args.Parent));
00080             if (ClearElementFunc != null) { ClearElementFunc(args.Element, args.Parent); }
00081         }
00082
00083         public class GetElementCallInfo
00084         {
00085             public int Index { get; private set; }
00086             public UIElement Owner { get; private set; }
00087
00088             public GetElementCallInfo(int index, UIElement owner)
00089             {
00090                 Index = index;
00091                 Owner = owner;
00092             }
00093         }
00094
00095         public class RecycleElementCallInfo
00096         {
00097             public UIElement Element { get; private set; }
00098             public UIElement Owner { get; private set; }
00099
00100             public RecycleElementCallInfo(UIElement element, UIElement owner)
00101             {
00102                 Element = element;
00103                 Owner = owner;
00104             }
00105         }
00106     }
00107 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImageIcon Member List

This is the complete list of members for ImageIcon, including all inherited members.
abi_enter() | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
CheckThread() | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
ClearProperties() | ImageIconProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< ImageIcon > &&self) noexcept | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline, static]
EnsureProperties() | ImageIconProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
final_release(std::unique_ptr< ImageIcon > &&self) | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline, static]
GetBase() | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
GetInner() | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
ImageIcon() | ImageIcon |
ImageIconProperties() | ImageIconProperties |
IsOnThread() | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
OnApplyTemplate() | ImageIcon |
OnSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ImageIcon |
ImageIconProperties::OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ImageIconProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ImageIcon, DeriveFromBitmapIconHelper_base, winrt::ImageIcon > | [inline]
s_SourceProperty | ImageIconProperties | [static]
Source(winrt::ImageSource const &value) | ImageIconProperties |
Source() | ImageIconProperties |
SourceProperty() | ImageIconProperties | [inline, static]
~ImageIcon() | ImageIcon | [inline]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef > Member List

This is the complete list of members for VectorOptions< T, isObservable, true, isDependencyObjectBase, isNoTrackerRef >, including all inherited members.
Bindable | VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef > | [static]
DependencyObjectBase | VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef > | [static]
NoTrackRef | VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef > | [static]
Observable | VectorOptionsBase< winrt::IInspectable, isObservable, true, isDependencyObjectBase, isNoTrackerRef > | [static]
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewCaseBundle Member List

This is the complete list of members for NavigationViewCaseBundle, including all inherited members.
CmbNavigationViewOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewCaseBundle | [inline, private]
NavigationViewCaseBundle() | NavigationViewCaseBundle | [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MyData Member List

This is the complete list of members for MyData, including all inherited members.
DataContent | MyData
DataHeader | MyData
DataIconSource | MyData
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlCompBrush Member List

This is the complete list of members for XamlCompBrush, including all inherited members.
SetCompositionBrush(winrt::CompositionBrush const &brush) XamlCompBrush [inline]
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/PersonPicture.cpp Source File

  • File List
  • File Members
  • PersonPicture

PersonPicture.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "InitialsGenerator.h"
00007 #include "PersonPicture.h"
00008 #include "PersonPictureAutomationPeer.h"
00009 #include "ResourceAccessor.h"
00010 #include "Utils.h"
00011 #include "RuntimeProfiler.h"
00012 #include "PersonPictureTemplateSettings.h"
00013
00014 PersonPicture::PersonPicture()
00015 {
00016     __RP_Marker_ClassById(RuntimeProfiler::ProfId_PersonPicture);
00017
00018     SetDefaultStyleKey(this);
00019
00020     TemplateSettings(winrt::make<PersonPictureTemplateSettings>());
00021
00022     Unloaded({ this, &PersonPicture::OnUnloaded });
00023     SizeChanged({ this, &PersonPicture::OnSizeChanged });
00024 }
00025
00026 void PersonPicture::LoadImageAsync(
00027     std::shared_ptr<winrt::IRandomAccessStreamReference> thumbStreamReference,
00028     std::function<void(winrt::BitmapImage)> completedFunction)
00029 {
00030     com_ptr<PersonPicture> strongThis = get_strong();
00031     auto operation = thumbStreamReference->OpenReadAsync();
00032
00033     operation.Completed(
00034         winrt::AsyncOperationCompletedHandler<winrt::IRandomAccessStreamWithContentType>(
00035             [strongThis, completedFunction](
00036                 winrt::IAsyncOperation<winrt::IRandomAccessStreamWithContentType> operation,
00037                 winrt::AsyncStatus asyncStatus)
00038     {
00039         strongThis->DispatcherQueue().TryEnqueue(winrt::DispatcherQueueHandler(
00040             [strongThis, asyncStatus, completedFunction, operation]()
00041         {
00042             winrt::BitmapImage bitmap;
00043
00044             // Handle the failure case here to ensure we are on the UI thread.
00045             if (asyncStatus != winrt::AsyncStatus::Completed)
00046             {
00047                 strongThis->m_profilePictureReadAsync.set(nullptr);
00048                 return;
00049             }
00050
00051             try
00052             {
00053                 bitmap.SetSourceAsync(operation.GetResults()).Completed(
00054                     winrt::AsyncActionCompletedHandler(
00055                         [strongThis, completedFunction, bitmap](winrt::IAsyncAction, winrt::AsyncStatus asyncStatus)
00056                 {
00057                     if (asyncStatus != winrt::AsyncStatus::Completed)
00058                     {
00059                         strongThis->m_profilePictureReadAsync.set(nullptr);
00060                         return;
00061                     }
00062
00063                     completedFunction(bitmap);
00064                     strongThis->m_profilePictureReadAsync.set(nullptr);
00065                 }));
00066             }
00067             catch (const winrt::hresult_error &e)
00068             {
00069                 strongThis->m_profilePictureReadAsync.set(nullptr);
00070
00071                 // Ignore the exception if the image is invalid
00072                 if (e.to_abi() == E_INVALIDARG)
00073                 {
00074                     return;
00075                 }
00076                 else
00077                 {
00078                     throw;
00079                 }
00080             }
00081         }));
00082     }));
00083
00084     m_profilePictureReadAsync.set(operation);
00085 }
00086
00087 winrt::AutomationPeer PersonPicture::OnCreateAutomationPeer()
00088 {
00089     return winrt::make<PersonPictureAutomationPeer>(*this);
00090 }
00091
00092 void PersonPicture::OnApplyTemplate()
00093 {
00094     // Retrieve pointers to stable controls
00095     winrt::IControlProtected thisAsControlProtected = *this;
00096
00097     m_initialsTextBlock.set(GetTemplateChildT<winrt::TextBlock>(L"InitialsTextBlock", thisAsControlProtected));
00098
00099     m_badgeNumberTextBlock.set(GetTemplateChildT<winrt::TextBlock>(L"BadgeNumberTextBlock", thisAsControlProtected));
00100     m_badgeGlyphIcon.set(GetTemplateChildT<winrt::FontIcon>(L"BadgeGlyphIcon", thisAsControlProtected));
00101     m_badgingEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"BadgingEllipse", thisAsControlProtected));
00102     m_badgingBackgroundEllipse.set(GetTemplateChildT<winrt::Ellipse>(L"BadgingBackgroundEllipse", thisAsControlProtected));
00103
00104     UpdateBadge();
00105     UpdateIfReady();
00106 }
00107
00108 winrt::hstring PersonPicture::GetInitials()
00109 {
00110     if (!Initials().empty())
00111     {
00112         return Initials();
00113     }
00114     else if (!m_displayNameInitials.empty())
00115     {
00116         return m_displayNameInitials;
00117     }
00118     else
00119     {
00120         return m_contactDisplayNameInitials;
00121     }
00122 }
00123
00124 winrt::ImageSource PersonPicture::GetImageSource()
00125 {
00126     if (ProfilePicture())
00127     {
00128         return ProfilePicture();
00129     }
00130     else
00131     {
00132         return m_contactImageSource.get();
00133     }
00134 }
00135
00136 void PersonPicture::UpdateIfReady()
00137 {
00138     winrt::hstring initials = GetInitials();
00139     winrt::ImageSource imageSrc = GetImageSource();
00140
00141     auto templateSettings = winrt::get_self<PersonPictureTemplateSettings>(TemplateSettings());
00142     templateSettings->ActualInitials(initials);
00143     if (imageSrc)
00144     {
00145         auto imageBrush = templateSettings->ActualImageBrush();
00146         if (!imageBrush)
00147         {
00148             imageBrush = winrt::ImageBrush{};
00149             imageBrush.Stretch(winrt::Stretch::UniformToFill);
00150             templateSettings->ActualImageBrush(imageBrush);
00151         }
00152
00153         imageBrush.ImageSource(imageSrc);
00154     }
00155     else
00156     {
00157         templateSettings->ActualImageBrush(nullptr);
00158     }
00159
00160     // If the control is converted to 'Group-mode', we'll clear individual-specific information.
00161     // When IsGroup evaluates to false, we will restore state.
00162     if (IsGroup())
00163     {
00164         winrt::VisualStateManager::GoToState(*this, L"Group", false);
00165     }
00166     else
00167     {
00168         if (imageSrc)
00169         {
00170             winrt::VisualStateManager::GoToState(*this, L"Photo", false);
00171         }
00172         else if (!initials.empty())
00173         {
00174             winrt::VisualStateManager::GoToState(*this, L"Initials", false);
00175         }
00176         else
00177         {
00178             winrt::VisualStateManager::GoToState(*this, L"NoPhotoOrInitials", false);
00179         }
00180     }
00181
00182     UpdateAutomationName();
00183 }
00184
00185 void PersonPicture::UpdateBadge()
00186 {
00187     if (BadgeImageSource())
00188     {
00189         UpdateBadgeImageSource();
00190     }
00191     else if (BadgeNumber() != 0)
00192     {
00193         UpdateBadgeNumber();
00194     }
00195     else if (!BadgeGlyph().empty())
00196     {
00197         UpdateBadgeGlyph();
00198     }
00199     // No badge properties set, so clear the badge XAML
00200     else
00201     {
00202         winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);
00203
00204         if (auto badgeNumberTextBlock = m_badgeNumberTextBlock.get())
00205         {
00206             badgeNumberTextBlock.Text(L"");
00207         }
00208
00209         if (auto badgeGlyphIcon = m_badgeGlyphIcon.get())
00210         {
00211             badgeGlyphIcon.Glyph(L"");
00212         }
00213     }
00214
00215     UpdateAutomationName();
00216 }
00217
00218 void PersonPicture::UpdateBadgeNumber()
00219 {
00220     if (!m_badgingEllipse || !m_badgeNumberTextBlock)
00221     {
00222         return;
00223     }
00224
00225     const int badgeNumber = BadgeNumber();
00226
00227     if (badgeNumber <= 0)
00228     {
00229         winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);
00230         m_badgeNumberTextBlock.get().Text(L"");
00231         return;
00232     }
00233
00234     // should have badging number to show if we are here
00235     winrt::VisualStateManager::GoToState(*this, L"BadgeWithoutImageSource", false);
00236
00237     if (badgeNumber <= 99)
00238     {
00239         m_badgeNumberTextBlock.get().Text(std::to_wstring(badgeNumber));
00240     }
00241     else
00242     {
00243         m_badgeNumberTextBlock.get().Text(L"99+");
00244     }
00245 }
00246
00247 void PersonPicture::UpdateBadgeGlyph()
00248 {
00249     if (!m_badgingEllipse || !m_badgeGlyphIcon)
00250     {
00251         return;
00252     }
00253
00254     winrt::hstring badgeGlyph = BadgeGlyph();
00255
00256     if (badgeGlyph.empty())
00257     {
00258         winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);
00259         m_badgeGlyphIcon.get().Glyph(L"");
00260         return;
00261     }
00262
00263     // should have badging Glyph to show if we are here
00264     winrt::VisualStateManager::GoToState(*this, L"BadgeWithoutImageSource", false);
00265
00266     m_badgeGlyphIcon.get().Glyph(badgeGlyph);
00267 }
00268
00269 void PersonPicture::UpdateBadgeImageSource()
00270 {
00271     if (m_badgeImageBrush == nullptr)
00272     {
00273         m_badgeImageBrush.set(GetTemplateChildT<winrt::ImageBrush>(L"BadgeImageBrush", *this));
00274     }
00275
00276     if (!m_badgingEllipse || !m_badgeImageBrush)
00277     {
00278         return;
00279     }
00280
00281     m_badgeImageBrush.get().ImageSource(BadgeImageSource());
00282
00283     if (BadgeImageSource())
00284     {
00285         winrt::VisualStateManager::GoToState(*this, L"BadgeWithImageSource", false);
00286     }
00287     else
00288     {
00289         winrt::VisualStateManager::GoToState(*this, L"NoBadge", false);
00290     }
00291 }
00292
00293 void PersonPicture::UpdateAutomationName()
00294 {
00295     winrt::Contact contact = Contact();
00296     std::wstring automationName;
00297     std::wstring contactName;
00298
00299     // The AutomationName for the control is in the format: PersonName, BadgeInformation.
00300     // PersonName is set based on the name / initial properties in the order below.
00301     // if none exist, it defaults to "Person"
00302     if (IsGroup())
00303     {
00304         contactName = ResourceAccessor::GetLocalizedStringResource(SR_GroupName);
00305     }
00306     else if (contact && !contact.DisplayName().empty())
00307     {
00308         contactName = contact.DisplayName();
00309     }
00310     else if (!DisplayName().empty())
00311     {
00312         contactName = DisplayName();
00313     }
00314     else if (!Initials().empty())
00315     {
00316         contactName = Initials();
00317     }
00318     else
00319     {
00320         contactName = ResourceAccessor::GetLocalizedStringResource(SR_PersonName);
00321     }
00322
00323     // BadgeInformation portion of the AutomationName is set to 'n items' if there is a BadgeNumber,
00324     // or 'icon' for BadgeGlyph or BadgeImageSource. If BadgeText is specified, it will override
00325     // the string 'items' or 'icon'
00326     if (BadgeNumber() > 0)
00327     {
00328         if (!BadgeText().empty())
00329         {
00330             automationName = StringUtil::FormatString(
00331                 ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemTextOverride),
00332                 contactName.data(),
00333                 BadgeNumber(),
00334                 BadgeText().data());
00335         }
00336         else
00337         {
00338             automationName = StringUtil::FormatString(
00339                 GetLocalizedPluralBadgeItemStringResource(BadgeNumber()),
00340                 contactName.data(),
00341                 BadgeNumber());
00342         }
00343     }
00344     else if (!BadgeGlyph().empty() || BadgeImageSource())
00345     {
00346         if (!BadgeText().empty())
00347         {
00348             automationName = StringUtil::FormatString(
00349                 ResourceAccessor::GetLocalizedStringResource(SR_BadgeIconTextOverride),
00350                 contactName.data(),
00351                 BadgeText().data());
00352         }
00353         else
00354         {
00355             automationName = StringUtil::FormatString(
00356                 ResourceAccessor::GetLocalizedStringResource(SR_BadgeIcon),
00357                 contactName.data());
00358         }
00359     }
00360     else
00361     {
00362         automationName = contactName;
00363     }
00364
00365     winrt::AutomationProperties::SetName(*this, automationName);
00366 }
00367
00368 winrt::hstring PersonPicture::GetLocalizedPluralBadgeItemStringResource(unsigned int numericValue)
00369 {
00370     const UINT32 valueMod10 = numericValue % 10;
00371     winrt::hstring value;
00372
00373     if (numericValue == 1)  // Singular
00374     {
00375         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemSingular);
00376     }
00377     else if (numericValue == 2) // 2
00378     {
00379         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural7);
00380     }
00381     else if (numericValue == 3 || numericValue == 4) // 3,4
00382     {
00383         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural2);
00384     }
00385     else if (numericValue >= 5 && numericValue <= 10) // 5-10
00386     {
00387         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural5);
00388     }
00389     else if (numericValue >= 11 && numericValue <= 19) // 11-19
00390     {
00391         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural6);
00392     }
00393     else if (valueMod10 == 1) // 21, 31, 41, etc.
00394     {
00395         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural1);
00396     }
00397     else if (valueMod10 >= 2 && valueMod10 <= 4) // 22-24, 32-34, 42-44, etc.
00398     {
00399         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural3);
00400     }
00401     else // Everything else... 0, 20, 25-30, 35-40, etc.
00402     {
00403         value = ResourceAccessor::GetLocalizedStringResource(SR_BadgeItemPlural4);
00404     }
00405
00406     return value;
00407 }
00408
00409 void PersonPicture::UpdateControlForContact(bool isNewContact)
00410 {
00411     winrt::Contact contact = Contact();
00412
00413     if (!contact)
00414     {
00415         // Explicitly setting to empty/nullptr ensures the bound XAML is
00416         // correctly updated.
00417         m_contactDisplayNameInitials.set(L"");
00418         m_contactImageSource.set(nullptr);
00419         UpdateIfReady();
00420         return;
00421     }
00422
00423     // It's possible for a second update to occur before the first finished loading
00424     // a profile picture (regardless of second having a picture or not).
00425     // Cancellation of any previously-activated tasks will mitigate race conditions.
00426     if (auto profilePictureReadAsync = m_profilePictureReadAsync.get())
00427     {
00428         profilePictureReadAsync.Cancel();
00429     }
00430
00431     m_contactDisplayNameInitials.set(InitialsGenerator::InitialsFromContactObject(contact));
00432
00433     // Order of preference (but all work): Large, Small, Source, Thumbnail
00434     std::shared_ptr<winrt::IRandomAccessStreamReference> thumbStreamReference = std::make_shared<winrt::IRandomAccessStreamReference>();
00435
00436     if (PreferSmallImage() && contact.SmallDisplayPicture())
00437     {
00438         *thumbStreamReference = contact.SmallDisplayPicture();
00439     }
00440     else
00441     {
00442         if (contact.LargeDisplayPicture())
00443         {
00444             *thumbStreamReference = contact.LargeDisplayPicture();
00445         }
00446         else if (contact.SmallDisplayPicture())
00447         {
00448             *thumbStreamReference = contact.SmallDisplayPicture();
00449         }
00450         else if (contact.SourceDisplayPicture())
00451         {
00452             *thumbStreamReference = contact.SourceDisplayPicture();
00453         }
00454         else if (contact.Thumbnail())
00455         {
00456             *thumbStreamReference = contact.Thumbnail();
00457         }
00458     }
00459
00460     // If we have profile picture data available per the above, async load the picture from the platform.
00461     if (*thumbStreamReference != nullptr)
00462     {
00463         if (isNewContact)
00464         {
00465             // Prevent the case where context of a contact changes, but we show an old person while the new one is loaded.
00466             m_contactImageSource.set(nullptr);
00467         }
00468
00469         // The dispatcher is not available in design mode, so when in design mode bypass the call to LoadImageAsync.
00470         if (!SharedHelpers::IsInDesignMode())
00471         {
00472             com_ptr<PersonPicture> strongThis = get_strong();
00473
00474             LoadImageAsync(
00475                 thumbStreamReference,
00476                 [strongThis](winrt::BitmapImage profileBitmap)
00477             {
00478                 profileBitmap.DecodePixelType(winrt::DecodePixelType::Logical);
00479
00480                 // We want to constrain the shorter side to the same dimension as the control, allowing the decoder to
00481                 // choose the other dimension without distorting the image.
00482                 if (profileBitmap.PixelHeight() < profileBitmap.PixelWidth())
00483                 {
00484                     profileBitmap.DecodePixelHeight(static_cast<int>(strongThis->Height()));
00485                 }
00486                 else
00487                 {
00488                     profileBitmap.DecodePixelWidth(static_cast<int>(strongThis->Width()));
00489                 }
00490
00491                 strongThis->m_contactImageSource.set(winrt::ImageSource(profileBitmap));
00492                 strongThis->UpdateIfReady();
00493             });
00494         }
00495     }
00496     else
00497     {
00498         // Else clause indicates that (Contact->Thumbnail == nullptr).
00499         m_contactImageSource.set(nullptr);
00500     }
00501
00502     UpdateIfReady();
00503 }
00504
00505 void PersonPicture::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args)
00506 {
00507     winrt::IDependencyProperty property = args.Property();
00508
00509     if (property == s_BadgeNumberProperty ||
00510         property == s_BadgeGlyphProperty ||
00511         property == s_BadgeImageSourceProperty)
00512     {
00513         UpdateBadge();
00514     }
00515     else if (property == s_BadgeTextProperty)
00516     {
00517         UpdateAutomationName();
00518     }
00519     else if (property == s_ContactProperty)
00520     {
00521         OnContactChanged(args);
00522     }
00523     else if (property == s_DisplayNameProperty)
00524     {
00525         OnDisplayNameChanged(args);
00526     }
00527     else if (property == s_ProfilePictureProperty ||
00528         property == s_InitialsProperty ||
00529         property == s_IsGroupProperty)
00530     {
00531         UpdateIfReady();
00532     }
00533     // No additional action required for s_PreferSmallImageProperty
00534 }
00535
00536 void PersonPicture::OnDisplayNameChanged(winrt::DependencyPropertyChangedEventArgs const& /* args */)
00537 {
00538     m_displayNameInitials.set(InitialsGenerator::InitialsFromDisplayName(DisplayName()));
00539
00540     UpdateIfReady();
00541 }
00542
00543 void PersonPicture::OnContactChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00544 {
00545     bool isNewContact = true;
00546
00547     if (args && args.OldValue() && args.NewValue())
00548     {
00549         winrt::Contact oldContact = args.OldValue().as<winrt::Contact>();
00550         winrt::Contact newContact = args.NewValue().as<winrt::Contact>();
00551
00552         // Verify that the IDs are not null before comparing the old and new contact object.
00553         // If both contact IDs are null, it will be treated as a newcontact.
00554         if (!oldContact.Id().empty() || !newContact.Id().empty())
00555         {
00556             isNewContact = oldContact.Id() != newContact.Id();
00557         }
00558     }
00559
00560     UpdateControlForContact(isNewContact);
00561 }
00562
00563 void PersonPicture::OnSizeChanged(winrt::IInspectable const& /*sender*/, const winrt::SizeChangedEventArgs &args)
00564 {
00565     {
00566         const bool widthChanged = (args.NewSize().Width != args.PreviousSize().Width);
00567         const bool heightChanged = (args.NewSize().Height != args.PreviousSize().Height);
00568         double newSize;
00569
00570         if (widthChanged && heightChanged)
00571         {
00572             // Maintain circle by enforcing the new size on both Width and Height.
00573             // To do so, we will use the minimum value.
00574             newSize = (args.NewSize().Width < args.NewSize().Height) ? args.NewSize().Width : args.NewSize().Height;
00575         }
00576         else if (widthChanged)
00577         {
00578             newSize = args.NewSize().Width;
00579         }
00580         else if (heightChanged)
00581         {
00582             newSize = args.NewSize().Height;
00583         }
00584         else
00585         {
00586             return;
00587         }
00588
00589         Height(newSize);
00590         Width(newSize);
00591     }
00592
00593     // Calculate the FontSize of the control's text. Design guidelines have specified the
00594     // font size to be 42% of the container. Since it's circular, 42% of either Width or Height.
00595     // Note that we cap it to a minimum of 1, since a font size of less than 1 is an invalid value
00596     // that will result in a failure.
00597     const double fontSize = std::max(1.0, Width() * .42);
00598
00599     if (auto initialsTextBlock = m_initialsTextBlock.get())
00600     {
00601         initialsTextBlock.FontSize(fontSize);
00602     }
00603
00604     if (m_badgingEllipse && m_badgingBackgroundEllipse && m_badgeNumberTextBlock && m_badgeGlyphIcon)
00605     {
00606         // Maintain badging circle and font size by enforcing the new size on both Width and Height.
00607         // Design guidelines have specified the font size to be 60% of the badging plate, and we want to keep
00608         // badging plate to be about 50% of the control so that don't block the initial/profile picture.
00609         const double newSize = (args.NewSize().Width < args.NewSize().Height) ? args.NewSize().Width : args.NewSize().Height;
00610         m_badgingEllipse.get().Height(newSize * 0.5);
00611         m_badgingEllipse.get().Width(newSize * 0.5);
00612         m_badgingBackgroundEllipse.get().Height(newSize * 0.5);
00613         m_badgingBackgroundEllipse.get().Width(newSize * 0.5);
00614         m_badgeNumberTextBlock.get().FontSize(std::max(1.0, m_badgingEllipse.get().Height() * 0.6));
00615         m_badgeGlyphIcon.get().FontSize(std::max(1.0, m_badgingEllipse.get().Height() * 0.6));
00616     }
00617 }
00618
00619 void PersonPicture::OnUnloaded(winrt::IInspectable const& /*sender*/, winrt::RoutedEventArgs const& /*e*/)
00620 {
00621     if (auto profilePictureReadAsync = m_profilePictureReadAsync.get())
00622     {
00623         profilePictureReadAsync.Cancel();
00624     }
00625 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadialGradientBrushTests Member List

This is the complete list of members for RadialGradientBrushTests, including all inherited members.
AddGradientStopTest() | RadialGradientBrushTests | [inline]
ClassInitialize(TestContext testContext) | RadialGradientBrushTests | [inline, static]
GradientRenderingTest() | RadialGradientBrushTests | [inline]
RemoveGradientStopTest() | RadialGradientBrushTests | [inline]
TestCleanup() | RadialGradientBrushTests | [inline]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvas.idl Source File

  • File List
  • File Members
  • InkCanvas

InkCanvas.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003     [MUX_PREVIEW]
00004     delegate void DoInkPresenterWork(Windows.UI.Input.Inking.InkPresenter presenter);
00005
00006
00007     [MUX_PREVIEW]
00008     unsealed runtimeclass InkCanvas : Microsoft.UI.Xaml.FrameworkElement
00009     {
00010         InkCanvas();
00011
00012         [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00013         [MUX_DEFAULT_VALUE("true")]
00014         Boolean IsEnabled{ get; set; };
00015
00016         Windows.Foundation.IAsyncAction QueueInkPresenterWorkItem(DoInkPresenterWork workItem);
00017
00018         static Microsoft.UI.Xaml.DependencyProperty IsEnabledProperty{ get; };
00019     };
00020 }
00021
00022
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkCanvas/InkCanvasAutomationPeer.h Source File

  • File List
  • File Members
  • InkCanvas

InkCanvasAutomationPeer.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002
00003 #include "InkCanvas.h"
00004
00005 #include "InkCanvasAutomationPeer.g.h"
00006
00007 class InkCanvasAutomationPeer :
00008     public ReferenceTracker<InkCanvasAutomationPeer, winrt::implementation::InkCanvasAutomationPeerT>
00009 {
00010 public:
00011     InkCanvasAutomationPeer(winrt::InkCanvas const& owner);
00012
00013     // IAutomationPeerOverrides
00014     hstring GetClassNameCore();
00015     winrt::AutomationControlType GetAutomationControlTypeCore();
00016 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs.h"
00007
00008 LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs::LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs(
00009     winrt::LinedFlowLayoutInvalidationTrigger const& invalidationTrigger)
00010 {
00011     m_invalidationTrigger = invalidationTrigger;
00012 }
00013
00014 #pragma region ILayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
00015
00016 winrt::LinedFlowLayoutInvalidationTrigger LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs::InvalidationTrigger()
00017 {
00018     return m_invalidationTrigger;
00019 }
00020
00021 #pragma endregion
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollControllerScrollToRequestedEventArgs Member List

This is the complete list of members for ScrollControllerScrollToRequestedEventArgs, including all inherited members.
CorrelationId() const | ScrollControllerScrollToRequestedEventArgs |
CorrelationId(int32_t correlationId) | ScrollControllerScrollToRequestedEventArgs |
Offset() const | ScrollControllerScrollToRequestedEventArgs |
Options() const | ScrollControllerScrollToRequestedEventArgs |
ScrollControllerScrollToRequestedEventArgs(double offset, winrt::ScrollingScrollOptions const &options) | ScrollControllerScrollToRequestedEventArgs |
~ScrollControllerScrollToRequestedEventArgs() | ScrollControllerScrollToRequestedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewportTests::TestGridLayout Member List

This is the complete list of members for ViewportTests::TestGridLayout, including all inherited members.
MeasureOverride(VirtualizingLayoutContext context, Size availableSize) | ViewportTests::TestGridLayout | [inline, protected]
SuggestedAnchor | ViewportTests::TestGridLayout |
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MonochromaticOverlayPresenterPage Member List

This is the complete list of members for MonochromaticOverlayPresenterPage, including all inherited members.
MonochromaticOverlayPresenterPage() MonochromaticOverlayPresenterPage [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.h Source File

  • File List
  • File Members
  • AnimatedVisualPlayer

AnimatedVisualPlayerAutomationPeer.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002
00003 #include "AnimatedVisualPlayer.h"
00004
00005 #include "AnimatedVisualPlayerAutomationPeer.g.h"
00006
00007 class AnimatedVisualPlayerAutomationPeer :
00008     public ReferenceTracker<AnimatedVisualPlayerAutomationPeer, winrt::implementation::AnimatedVisualPlayerAutomationPeerT>
00009 {
00010 public:
00011     AnimatedVisualPlayerAutomationPeer(winrt::AnimatedVisualPlayer const& owner);
00012
00013     // IAutomationPeerOverrides
00014     hstring GetClassNameCore();
00015     winrt::AutomationControlType GetAutomationControlTypeCore();
00016 };
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsViewTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

ItemsViewTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ItemsViewTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ItemsViewTestHooks)
00012 }
00013
00014 #include "ItemsViewTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealBorderLight.properties.cpp Source File

  • File List
  • File Members
  • Generated

RevealBorderLight.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RevealBorderLight.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Media
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RevealBorderLight)
00012 }
00013
00014 #include "RevealBorderLight.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItemAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

TreeViewItemAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TreeViewItemAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TreeViewItemAutomationPeer)
00012 }
00013
00014 #include "TreeViewItemAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterRepeaterAnchoringPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterRepeaterAnchoringPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using Windows.UI;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Media;
00012 using Microsoft.UI.Xaml.Navigation;
00013 using Microsoft.UI.Private.Controls;
00014 using System.Collections.Specialized;
00015 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00016 using Microsoft.UI.Dispatching;
00017
00018 namespace MUXControlsTestApp
00019 {
00020     public sealed partial class ScrollPresenterRepeaterAnchoringPage : TestPage
00021     {
00022         private SampleDataSource dataSource = null;
00023         private DispatcherTimer timer = new DispatcherTimer();
00024         private Object asyncEventReportingLock = new Object();
00025         private List<string> lstAsyncEventMessage = new List<string>();
00026         private List<QueuedOperation> lstQueuedOperations = new List<QueuedOperation>();
00027         private List<QueuedOperation> lstTriggeredOperations = new List<QueuedOperation>();
00028         private Border currentAnchor = null;
00029         private UIElement anchorElement = null;
00030         private double lastScrollPresenterOffset = 0.0;
00031
00032         public ScrollPresenterRepeaterAnchoringPage()
00033         {
00034             InitializeComponent();
00035
00036             Loaded += ScrollPresenterRepeaterAnchoringPage_Loaded;
00037
00038             timer.Interval = new TimeSpan(0, 0, 2 /*sec*/);
00039             timer.Tick += Timer_Tick;
00040
00041             cnsAnchorPoint.Width = scrollPresenter.Width;
00042             cnsAnchorPoint.Height = scrollPresenter.Height;
00043             repeater.ItemTemplate = elementFactory;
00044         }
00045
00046         protected override void OnNavigatedFrom(NavigationEventArgs e)
00047         {
00048             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00049             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00050
00051             UpdateRaiseAnchorNotifications(false /*raiseAnchorNotifications*/);
00052
00053             base.OnNavigatedFrom(e);
00054         }
00055
00056         private void ScrollPresenterRepeaterAnchoringPage_Loaded(object sender, RoutedEventArgs e)
00057         {
00058             try
00059             {
00060                 if (chkLogScrollPresenterMessages.IsChecked == true)
00061                 {
00062                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00063                     MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00064                 }
00065
00066                 UpdateRaiseAnchorNotifications(true /*raiseAnchorNotifications*/);
00067
00068                 UpdateHorizontalAnchorRatio();
00069                 UpdateVerticalAnchorRatio();
00070
00071                 if (chkLogScrollPresenterEvents.IsChecked == true)
00072                 {
00073                     scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
00074                     scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00075                 }
00076                 scrollPresenter.AnchorRequested += ScrollPresenter_AnchorRequested;
00077                 scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00078             }
00079             catch (Exception ex)
00080             {
00081                 txtExceptionReport.Text = ex.ToString();
00082                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00083             }
00084         }
00085
00086         private void CmbItemHeightMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00087         {
00088             if (repeater != null)
00089             {
00090                 switch (cmbItemHeightMode.SelectedIndex)
00091                 {
00092                     case 0: // Random
00093                         Random rand = new Random(123);
00094                         dataSource = new SampleDataSource(
00095                             this,
00096                             Enumerable.Range(0, 32).Select(i => new DataItem(string.Format("Item #{0}", i), 100 + rand.Next(0, 200))).ToList());
00097                         break;
00098                     case 1: // Increasing
00099                         dataSource = new SampleDataSource(
00100                             this,
00101                             Enumerable.Range(0, 32).Select(i => new DataItem(string.Format("Item #{0}", i), 100 + i * 10)).ToList());
00102                         break;
00103                     case 2: // Constant
00104                         dataSource = new SampleDataSource(
00105                             this,
00106                             Enumerable.Range(0, 32).Select(i => new DataItem(string.Format("Item #{0}", i), 100)).ToList());
00107                         break;
00108                 }
00109                 repeater.ItemsSource = dataSource;
00110             }
00111         }
00112
00113         private void Timer_Tick(object sender, object e)
00114         {
00115             timer.Stop();
00116             ExecuteQueuedOperations();
00117         }
00118
00119         private void BtnInsert_Click(object sender, RoutedEventArgs e)
00120         {
00121             try
00122             {
00123                 switch (cmbDelayMode.SelectedIndex)
00124                 {
00125                     case 0: // No delay
00126                         dataSource.Insert(int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false);
00127                         break;
00128                     case 1: // Timer expiration
00129                         lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Insert, 0, 0, int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
00130                         AppendAsyncEventMessage("Queued Insert NewIndex=" + txtNewStartIndex.Text + ", NewCount=" + txtNewCount.Text);
00131                         timer.Start();
00132                         break;
00133                     case 2: // Offset crosses 350
00134                         lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Insert, 0, 0, int.Parse(txtNewStartIndex.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
00135                         AppendAsyncEventMessage("Triggerable Insert NewIndex=" + txtNewStartIndex.Text + ", NewCount=" + txtNewCount.Text);
00136                         break;
00137                 }
00138             }
00139             catch (Exception ex)
00140             {
00141                 txtExceptionReport.Text = ex.ToString();
00142                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00143             }
00144         }
00145
00146         private void BtnRemove_Click(object sender, RoutedEventArgs e)
00147         {
00148             try
00149             {
00150                 switch (cmbDelayMode.SelectedIndex)
00151                 {
00152                     case 0: // No delay
00153                         dataSource.Remove(int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), tglResetMode.IsChecked ?? false);
00154                         break;
00155                     case 1: // Timer expiration
00156                         lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Remove, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, 0, tglResetMode.IsChecked ?? false));
00157                         AppendAsyncEventMessage("Queued Remove OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text);
00158                         timer.Start();
00159                         break;
00160                     case 2: // Offset crosses 350
00161                         lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Remove, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, 0, tglResetMode.IsChecked ?? false));
00162                         AppendAsyncEventMessage("Triggerable Remove OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text);
00163                         break;
00164                 }
00165             }
00166             catch (Exception ex)
00167             {
00168                 txtExceptionReport.Text = ex.ToString();
00169                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00170             }
00171         }
00172
00173         private void BtnReplace_Click(object sender, RoutedEventArgs e)
00174         {
00175             try
00176             {
00177                 switch (cmbDelayMode.SelectedIndex)
00178                 {
00179                     case 0: // No delay
00180                         dataSource.Replace(int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false);
00181                         break;
00182                     case 1: // Timer expiration
00183                         lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Replace, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
00184                         AppendAsyncEventMessage("Queued Replace OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text + ", NewCount=" + txtNewCount.Text);
00185                         timer.Start();
00186                         break;
00187                     case 2: // Offset crosses 350
00188                         lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Replace, int.Parse(txtOldStartIndex.Text), int.Parse(txtOldCount.Text), 0, int.Parse(txtNewCount.Text), tglResetMode.IsChecked ?? false));
00189                         AppendAsyncEventMessage("Triggerable Replace OldIndex=" + txtOldStartIndex.Text + ", OldCount=" + txtOldCount.Text + ", NewCount=" + txtNewCount.Text);
00190                         break;
00191                 }
00192             }
00193             catch (Exception ex)
00194             {
00195                 txtExceptionReport.Text = ex.ToString();
00196                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00197             }
00198         }
00199
00200         private void BtnReset_Click(object sender, RoutedEventArgs e)
00201         {
00202             try
00203             {
00204                 switch (cmbDelayMode.SelectedIndex)
00205                 {
00206                     case 0: // No delay
00207                         dataSource.Reset();
00208                         break;
00209                     case 1: // Timer expiration
00210                         lstQueuedOperations.Add(new QueuedOperation(QueuedOperationType.Reset, 0, 0, 0, 0, true));
00211                         AppendAsyncEventMessage("Queued Reset");
00212                         timer.Start();
00213                         break;
00214                     case 2: // Offset crosses 350
00215                         lstTriggeredOperations.Add(new QueuedOperation(QueuedOperationType.Reset, 0, 0, 0, 0, true));
00216                         AppendAsyncEventMessage("Triggerable Reset");
00217                         break;
00218                 }
00219             }
00220             catch (Exception ex)
00221             {
00222                 txtExceptionReport.Text = ex.ToString();
00223                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00224             }
00225         }
00226
00227         private void ExecuteQueuedOperations()
00228         {
00229             try
00230             {
00231                 while (lstQueuedOperations.Count > 0)
00232                 {
00233                     QueuedOperation qo = lstQueuedOperations[0];
00234
00235                     switch (qo.Type)
00236                     {
00237                         case QueuedOperationType.Insert:
00238                             AppendAsyncEventMessage("Unqueuing Insert NewIndex=" + qo.NewIndex + ", NewCount=" + qo.NewCount);
00239                             dataSource.Insert(qo.NewIndex, qo.NewCount, qo.Reset);
00240                             break;
00241                         case QueuedOperationType.Remove:
00242                             AppendAsyncEventMessage("Unqueuing Remove OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount);
00243                             dataSource.Remove(qo.OldIndex, qo.OldCount, qo.Reset);
00244                             break;
00245                         case QueuedOperationType.Replace:
00246                             AppendAsyncEventMessage("Unqueuing Replace OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount + ", NewCount=" + qo.NewCount);
00247                             dataSource.Replace(qo.OldIndex, qo.OldCount, qo.NewCount, qo.Reset);
00248                             break;
00249                         case QueuedOperationType.Reset:
00250                             AppendAsyncEventMessage("Unqueuing Reset");
00251                             dataSource.Reset();
00252                             break;
00253                     }
00254
00255                     lstQueuedOperations.RemoveAt(0);
00256                 }
00257             }
00258             catch (Exception ex)
00259             {
00260                 txtExceptionReport.Text = ex.ToString();
00261                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00262             }
00263         }
00264
00265         private void ExecuteTriggerableOperations()
00266         {
00267             try
00268             {
00269                 while (lstTriggeredOperations.Count > 0)
00270                 {
00271                     QueuedOperation qo = lstTriggeredOperations[0];
00272
00273                     switch (qo.Type)
00274                     {
00275                         case QueuedOperationType.Insert:
00276                             AppendAsyncEventMessage("Triggering Insert NewIndex=" + qo.NewIndex + ", NewCount=" + qo.NewCount);
00277                             dataSource.Insert(qo.NewIndex, qo.NewCount, qo.Reset);
00278                             break;
00279                         case QueuedOperationType.Remove:
00280                             AppendAsyncEventMessage("Triggering Remove OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount);
00281                             dataSource.Remove(qo.OldIndex, qo.OldCount, qo.Reset);
00282                             break;
00283                         case QueuedOperationType.Replace:
00284                             AppendAsyncEventMessage("Triggering Replace OldIndex=" + qo.OldIndex + ", OldCount=" + qo.OldCount + ", NewCount=" + qo.NewCount);
00285                             dataSource.Replace(qo.OldIndex, qo.OldCount, qo.NewCount, qo.Reset);
00286                             break;
00287                         case QueuedOperationType.Reset:
00288                             AppendAsyncEventMessage("Triggering Reset");
00289                             dataSource.Reset();
00290                             break;
00291                     }
00292
00293                     lstTriggeredOperations.RemoveAt(0);
00294                 }
00295             }
00296             catch (Exception ex)
00297             {
00298                 txtExceptionReport.Text = ex.ToString();
00299                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00300             }
00301         }
00302
00303         private void ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args)
00304         {
00305             AppendAsyncEventMessage("ExtentChanged ExtentWidth=" + sender.ExtentWidth.ToString() + ", ExtentHeight=" + sender.ExtentHeight.ToString());
00306         }
00307
00308         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00309         {
00310             AppendAsyncEventMessage("StateChanged " + sender.State.ToString());
00311         }
00312
00313         private void ScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
00314         {
00315             if (chkLogScrollPresenterEvents.IsChecked == true)
00316             {
00317                 AppendAsyncEventMessage("ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset.ToString() + ", S=" + sender.ZoomFactor.ToString());
00318             }
00319
00320             double newScrollPresenterOffset = scrollPresenter.VerticalOffset;
00321
00322             if (lstTriggeredOperations.Count > 0 &&
00323                 ((lastScrollPresenterOffset <= 350.0 && newScrollPresenterOffset > 350.0) || (lastScrollPresenterOffset >= 350.0 && newScrollPresenterOffset < 350.0)))
00324             {
00325                 ExecuteTriggerableOperations();
00326             }
00327
00328             lastScrollPresenterOffset = newScrollPresenterOffset;
00329         }
00330
00331         private void ScrollPresenter_AnchorRequested(ScrollPresenter sender, ScrollingAnchorRequestedEventArgs args)
00332         {
00333             try
00334             {
00335                 if (chkLogScrollPresenterEvents.IsChecked == true)
00336                 {
00337                     IList<UIElement> anchorCandidates = args.AnchorCandidates;
00338
00339                     AppendAsyncEventMessage("AnchorRequested anchor=" + (args.AnchorElement == null ? "null" : "non-null") + ", count=" + anchorCandidates.Count);
00340                 }
00341
00342                 args.AnchorElement = anchorElement;
00343             }
00344             catch (Exception ex)
00345             {
00346                 if (string.IsNullOrEmpty(txtExceptionReport.Text))
00347                 {
00348                     txtExceptionReport.Text = ex.ToString();
00349                     lstScrollPresenterEvents.Items.Add(ex.ToString());
00350                 }
00351             }
00352         }
00353
00354         private void BtnGetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
00355         {
00356             UpdateHorizontalAnchorRatio();
00357         }
00358
00359         private void BtnSetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
00360         {
00361             try
00362             {
00363                 scrollPresenter.HorizontalAnchorRatio = Convert.ToDouble(txtHorizontalAnchorRatio.Text);
00364             }
00365             catch (Exception ex)
00366             {
00367                 txtExceptionReport.Text = ex.ToString();
00368                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00369             }
00370         }
00371
00372         private void BtnGetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
00373         {
00374             UpdateVerticalAnchorRatio();
00375         }
00376
00377         private void BtnSetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
00378         {
00379             try
00380             {
00381                 scrollPresenter.VerticalAnchorRatio = Convert.ToDouble(txtVerticalAnchorRatio.Text);
00382             }
00383             catch (Exception ex)
00384             {
00385                 txtExceptionReport.Text = ex.ToString();
00386                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00387             }
00388         }
00389
00390         private void BtnGetCurrentAnchor_Click(object sender, RoutedEventArgs e)
00391         {
00392             try
00393             {
00394                 if (scrollPresenter.CurrentAnchor == null)
00395                 {
00396                     txtCurrentAnchor.Text = "null";
00397                 }
00398                 else
00399                 {
00400                     FrameworkElement currentAnchorAsFE = scrollPresenter.CurrentAnchor as FrameworkElement;
00401
00402                     txtCurrentAnchor.Text = currentAnchorAsFE == null ? "UIElement" : currentAnchorAsFE.Name;
00403                 }
00404             }
00405             catch (Exception ex)
00406             {
00407                 txtExceptionReport.Text = ex.ToString();
00408                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00409             }
00410         }
00411
00412         private void BtnGetAnchorElement_Click(object sender, RoutedEventArgs e)
00413         {
00414             try
00415             {
00416                 string asyncEventMessage = "AnchorElement=";
00417
00418                 if (anchorElement == null)
00419                 {
00420                     cmbAnchorElement.SelectedIndex = 0;
00421                     asyncEventMessage += "null";
00422                 }
00423                 else if (anchorElement == scrollPresenter)
00424                 {
00425                     cmbAnchorElement.SelectedIndex = 1;
00426                     asyncEventMessage += "scrollPresenter";
00427                 }
00428                 else if (anchorElement == tblCollapsedAnchorElement)
00429                 {
00430                     cmbAnchorElement.SelectedIndex = 2;
00431                     asyncEventMessage += "collapsed";
00432                 }
00433                 else if (anchorElement == border)
00434                 {
00435                     cmbAnchorElement.SelectedIndex = 3;
00436                     asyncEventMessage += "border";
00437                 }
00438                 else
00439                 {
00440                     cmbAnchorElement.SelectedIndex = 4;
00441                     asyncEventMessage += "item";
00442                 }
00443                 AppendAsyncEventMessage(asyncEventMessage);
00444             }
00445             catch (Exception ex)
00446             {
00447                 txtExceptionReport.Text = ex.ToString();
00448                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00449             }
00450         }
00451
00452         private void BtnSetAnchorElement_Click(object sender, RoutedEventArgs e)
00453         {
00454             try
00455             {
00456                 switch (cmbAnchorElement.SelectedIndex)
00457                 {
00458                     case 0:
00459                         anchorElement = null;
00460                         break;
00461                     case 1:
00462                         anchorElement = scrollPresenter;
00463                         break;
00464                     case 2:
00465                         anchorElement = tblCollapsedAnchorElement;
00466                         break;
00467                     case 3:
00468                         anchorElement = border;
00469                         break;
00470                     case 4:
00471                         anchorElement = repeater.TryGetElement(int.Parse(txtItemIndex.Text));
00472                         break;
00473                 }
00474             }
00475             catch (Exception ex)
00476             {
00477                 txtExceptionReport.Text = ex.ToString();
00478                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00479             }
00480         }
00481
00482         private void CmbAnchorElement_SelectionChanged(object sender, SelectionChangedEventArgs e)
00483         {
00484             if (tblItemIndex != null && txtItemIndex != null && cmbAnchorElement != null)
00485                 tblItemIndex.Visibility = txtItemIndex.Visibility = cmbAnchorElement.SelectedIndex == 4 ? Visibility.Visible : Visibility.Collapsed;
00486         }
00487
00488         private void UpdateHorizontalAnchorRatio()
00489         {
00490             txtHorizontalAnchorRatio.Text = scrollPresenter.HorizontalAnchorRatio.ToString();
00491         }
00492
00493         private void UpdateVerticalAnchorRatio()
00494         {
00495             txtVerticalAnchorRatio.Text = scrollPresenter.VerticalAnchorRatio.ToString();
00496         }
00497
00498         private void BtnClearScrollPresenterEvents_Click(object sender, RoutedEventArgs e)
00499         {
00500             lstScrollPresenterEvents.Items.Clear();
00501         }
00502
00503         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
00504         {
00505             txtExceptionReport.Text = string.Empty;
00506         }
00507
00508         private void BtnInvalidateArrange_Click(object sender, RoutedEventArgs e)
00509         {
00510             scrollPresenter.InvalidateArrange();
00511         }
00512
00513         private void ChkUseAnimator_Checked(object sender, RoutedEventArgs e)
00514         {
00515             repeater.ItemTransitionProvider = new Utils.DefaultItemCollectionTransitionProvider();
00516         }
00517
00518         private void ChkUseAnimator_Unchecked(object sender, RoutedEventArgs e)
00519         {
00520             repeater.ItemTransitionProvider = null;
00521         }
00522
00523         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00524         {
00525             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00526             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00527         }
00528
00529         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00530         {
00531             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00532             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00533         }
00534
00535         private void UpdateRaiseAnchorNotifications(bool raiseAnchorNotifications)
00536         {
00537             if (raiseAnchorNotifications)
00538             {
00539                 if (!ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
00540                 {
00541                     ScrollPresenterTestHooks.AreAnchorNotificationsRaised = true;
00542                     ScrollPresenterTestHooks.AnchorEvaluated += ScrollPresenterTestHooks_AnchorEvaluated;
00543                 }
00544             }
00545             else
00546             {
00547                 if (ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
00548                 {
00549                     ScrollPresenterTestHooks.AreAnchorNotificationsRaised = false;
00550                     ScrollPresenterTestHooks.AnchorEvaluated -= ScrollPresenterTestHooks_AnchorEvaluated;
00551                 }
00552
00553                 if (currentAnchor != null)
00554                 {
00555                     currentAnchor.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00556                     currentAnchor = null;
00557                 }
00558                 cnsAnchorPoint.Visibility = Visibility.Collapsed;
00559             }
00560         }
00561
00562         private void ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e)
00563         {
00564             scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
00565             scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00566         }
00567
00568         private void ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e)
00569         {
00570             scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
00571             scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
00572         }
00573
00574         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00575         {
00576             // Cut off the terminating new line.
00577             string msg = args.Message.Substring(0, args.Message.Length - 1);
00578             string asyncEventMessage = string.Empty;
00579             string senderName = string.Empty;
00580
00581             try
00582             {
00583                 FrameworkElement fe = sender as FrameworkElement;
00584
00585                 if (fe != null)
00586                 {
00587                     senderName = "s:" + fe.Name + ", ";
00588                 }
00589             }
00590             catch
00591             {
00592             }
00593
00594             if (args.IsVerboseLevel)
00595             {
00596                 asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
00597             }
00598             else
00599             {
00600                 asyncEventMessage = "Info: " + senderName + "m:" + msg;
00601             }
00602
00603             AppendAsyncEventMessage(asyncEventMessage);
00604         }
00605
00606         private void ScrollPresenterTestHooks_AnchorEvaluated(ScrollPresenter sender, ScrollPresenterTestHooksAnchorEvaluatedEventArgs args)
00607         {
00608             string anchorName;
00609             Border newAnchor = null;
00610
00611             if (args.AnchorElement == null)
00612             {
00613                 anchorName = "null";
00614             }
00615             else
00616             {
00617                 if (args.AnchorElement is FrameworkElement)
00618                 {
00619                     FrameworkElement anchorElementAsFE = args.AnchorElement as FrameworkElement;
00620
00621                     if (string.IsNullOrWhiteSpace(anchorElementAsFE.Name))
00622                         anchorName = "unnamed-FE";
00623                     else
00624                         anchorName = anchorElementAsFE.Name;
00625
00626                     newAnchor = anchorElementAsFE as Border;
00627                 }
00628                 else
00629                 {
00630                     anchorName = "UIE";
00631                 }
00632             }
00633
00634             if (newAnchor != currentAnchor)
00635             {
00636                 if (currentAnchor != null)
00637                 {
00638                     currentAnchor.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse);
00639                 }
00640                 if (newAnchor != null)
00641                 {
00642                     newAnchor.BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Orange);
00643                 }
00644                 currentAnchor = newAnchor;
00645             }
00646
00647             if (double.IsNaN(args.ViewportAnchorPointHorizontalOffset) && double.IsNaN(args.ViewportAnchorPointVerticalOffset))
00648             {
00649                 cnsAnchorPoint.Visibility = Visibility.Collapsed;
00650             }
00651             else
00652             {
00653                 cnsAnchorPoint.Visibility = Visibility.Visible;
00654
00655                 if (double.IsNaN(args.ViewportAnchorPointHorizontalOffset))
00656                 {
00657                     rectAnchorPoint.Width = scrollPresenter.Width;
00658                     Canvas.SetLeft(rectAnchorPoint, 0);
00659                 }
00660                 else
00661                 {
00662                     rectAnchorPoint.Width = double.IsNaN(args.ViewportAnchorPointVerticalOffset) ? 2 : 4;
00663                     Canvas.SetLeft(rectAnchorPoint, args.ViewportAnchorPointHorizontalOffset * scrollPresenter.ZoomFactor - scrollPresenter.HorizontalOffset - rectAnchorPoint.Width / 2);
00664                 }
00665
00666                 if (double.IsNaN(args.ViewportAnchorPointVerticalOffset))
00667                 {
00668                     rectAnchorPoint.Height = scrollPresenter.Height;
00669                     Canvas.SetTop(rectAnchorPoint, 0);
00670                 }
00671                 else
00672                 {
00673                     rectAnchorPoint.Height = double.IsNaN(args.ViewportAnchorPointHorizontalOffset) ? 2 : 4;
00674                     Canvas.SetTop(rectAnchorPoint, args.ViewportAnchorPointVerticalOffset * scrollPresenter.ZoomFactor - scrollPresenter.VerticalOffset - rectAnchorPoint.Height / 2);
00675                 }
00676             }
00677
00678             if (chkLogScrollPresenterAnchorNotifications.IsChecked == true)
00679             {
00680                 AppendAsyncEventMessage("  AnchorEvaluated: s:" + sender.Name + ", a:" + anchorName + ", ap:(" + (int)args.ViewportAnchorPointHorizontalOffset + ", " + (int)args.ViewportAnchorPointVerticalOffset + ")");
00681             }
00682         }
00683
00684         private void AppendAsyncEventMessage(string asyncEventMessage)
00685         {
00686             lock (asyncEventReportingLock)
00687             {
00688                 lstAsyncEventMessage.Add(asyncEventMessage);
00689
00690                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
00691             }
00692         }
00693
00694         private void AppendAsyncEventMessage()
00695         {
00696             lock (asyncEventReportingLock)
00697             {
00698                 foreach (string asyncEventMessage in lstAsyncEventMessage)
00699                 {
00700                     lstScrollPresenterEvents.Items.Add(asyncEventMessage);
00701                 }
00702                 lstAsyncEventMessage.Clear();
00703             }
00704         }
00705
00706         private enum QueuedOperationType
00707         {
00708             Insert,
00709             Remove,
00710             Replace,
00711             Reset,
00712         }
00713
00714         private class QueuedOperation
00715         {
00716             public QueuedOperation(QueuedOperationType type, int oldIndex, int oldCount, int newIndex, int newCount, bool reset)
00717             {
00718                 this.Type = type;
00719                 this.OldIndex = oldIndex;
00720                 this.OldCount = oldCount;
00721                 this.NewIndex = newIndex;
00722                 this.NewCount = newCount;
00723             }
00724
00725             public QueuedOperationType Type { get; set; }
00726             public int OldIndex { get; set; }
00727             public int NewIndex { get; set; }
00728             public int OldCount { get; set; }
00729             public int NewCount { get; set; }
00730             public bool Reset { get; set; }
00731         }
00732
00733         private class SampleDataSource : CustomItemsSourceViewWithUniqueIdMapping
00734         {
00735             List<DataItem> _inner;
00736
00737             public SampleDataSource(ScrollPresenterRepeaterAnchoringPage owner, List<DataItem> source)
00738             {
00739                 Owner = owner;
00740                 Inner = source;
00741             }
00742
00743             protected override int GetSizeCore()
00744             {
00745                 return Inner.Count;
00746             }
00747
00748             public List<DataItem> Inner
00749             {
00750                 get
00751                 {
00752                     return _inner;
00753                 }
00754
00755                 set
00756                 {
00757                     _inner = value;
00758                 }
00759             }
00760
00761             private ScrollPresenterRepeaterAnchoringPage Owner
00762             {
00763                 get;
00764                 set;
00765             }
00766
00767             protected override object GetAtCore(int index)
00768             {
00769                 return Inner[index];
00770             }
00771
00772             protected override string KeyFromIndexCore(int index)
00773             {
00774                 // data is the same as its unique id
00775                 return Inner[index].ToString();
00776             }
00777
00778             public void Insert(int index, int count, bool reset)
00779             {
00780                 try
00781                 {
00782                     Owner.AppendAsyncEventMessage("SampleDataSource Insert NewIndex=" + index + ", NewCount=" + count + ", Reset=" + reset);
00783
00784                     for (int i = 0; i < count; i++)
00785                     {
00786                         switch (Owner.cmbItemHeightMode.SelectedIndex)
00787                         {
00788                             case 0: // Random
00789                                 Random rand = new Random(123);
00790                                 Inner.Insert(index + i, new DataItem(string.Format("ItemI #{0}", Inner.Count), 100 + rand.Next(0, 200)));
00791                                 break;
00792                             case 1: // Increasing
00793                                 Inner.Insert(index + i, new DataItem(string.Format("ItemI #{0}", Inner.Count), 100 + i * 10));
00794                                 break;
00795                             case 2: // Constant
00796                                 Inner.Insert(index + i, new DataItem(string.Format("ItemI #{0}", Inner.Count), 100));
00797                                 break;
00798                         }
00799                     }
00800
00801                     if (reset)
00802                     {
00803                         OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00804                     }
00805                     else
00806                     {
00807                         OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00808                             NotifyCollectionChangedAction.Add,
00809                             oldStartingIndex: -1,
00810                             oldItemsCount: 0,
00811                             newStartingIndex: index,
00812                             newItemsCount: count));
00813                     }
00814                 }
00815                 catch (Exception ex)
00816                 {
00817                     Owner.txtExceptionReport.Text = ex.ToString();
00818                     Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
00819                 }
00820             }
00821
00822             public void Remove(int index, int count, bool reset)
00823             {
00824                 try
00825                 {
00826                     Owner.AppendAsyncEventMessage("SampleDataSource Remove OldIndex=" + index + ", OldCount=" + count + ", Reset=" + reset);
00827
00828                     for (int i = 0; i < count; i++)
00829                     {
00830                         Inner.RemoveAt(index);
00831                     }
00832
00833                     if (reset)
00834                     {
00835                         OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00836                     }
00837                     else
00838                     {
00839                         OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00840                             NotifyCollectionChangedAction.Remove,
00841                             oldStartingIndex: index,
00842                             oldItemsCount: count,
00843                             newStartingIndex: -1,
00844                             newItemsCount: 0));
00845                     }
00846                 }
00847                 catch (Exception ex)
00848                 {
00849                     Owner.txtExceptionReport.Text = ex.ToString();
00850                     Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
00851                 }
00852             }
00853
00854             public void Replace(int index, int oldCount, int newCount, bool reset)
00855             {
00856                 try
00857                 {
00858                     Owner.AppendAsyncEventMessage("SampleDataSource Replace OldIndex=" + index + ", OldCount=" + oldCount + ", NewCount=" + newCount + ", Reset=" + reset);
00859
00860                     for (int i = 0; i < oldCount; i++)
00861                     {
00862                         Inner.RemoveAt(index);
00863                     }
00864
00865                     for (int i = 0; i < newCount; i++)
00866                     {
00867                         switch (Owner.cmbItemHeightMode.SelectedIndex)
00868                         {
00869                             case 0: // Random
00870                                 Random rand = new Random(123);
00871                                 Inner.Insert(index, new DataItem(string.Format("ItemR #{0}", Inner.Count), 100 + rand.Next(0, 200)));
00872                                 break;
00873                             case 1: // Increasing
00874                                 Inner.Insert(index, new DataItem(string.Format("ItemR #{0}", Inner.Count), 100 + i * 10));
00875                                 break;
00876                             case 2: // Constant
00877                                 Inner.Insert(index, new DataItem(string.Format("ItemR #{0}", Inner.Count), 100));
00878                                 break;
00879                         }
00880                     }
00881
00882                     if (reset)
00883                     {
00884                         OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00885                     }
00886                     else
00887                     {
00888                         OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00889                             NotifyCollectionChangedAction.Replace,
00890                             oldStartingIndex: index,
00891                             oldItemsCount: oldCount,
00892                             newStartingIndex: index,
00893                             newItemsCount: newCount));
00894                     }
00895                 }
00896                 catch (Exception ex)
00897                 {
00898                     Owner.txtExceptionReport.Text = ex.ToString();
00899                     Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
00900                 }
00901             }
00902
00903             public void Reset()
00904             {
00905                 try
00906                 {
00907                     Owner.AppendAsyncEventMessage("SampleDataSource Reset");
00908
00909                     Random rand = new Random(123);
00910
00911                     for (int i = 0; i < 10; i++)
00912                     {
00913                         int from = rand.Next(0, Inner.Count - 1);
00914                         var value = Inner[from];
00915                         Inner.RemoveAt(from);
00916                         int to = rand.Next(0, Inner.Count - 1);
00917                         Inner.Insert(to, value);
00918                     }
00919
00920                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00921                 }
00922                 catch (Exception ex)
00923                 {
00924                     Owner.txtExceptionReport.Text = ex.ToString();
00925                     Owner.lstScrollPresenterEvents.Items.Add(ex.ToString());
00926                 }
00927             }
00928         }
00929     }
00930
00931     public class DataItem
00932     {
00933         public DataItem(string text, int number)
00934         {
00935             Text = text;
00936             Number = number;
00937         }
00938
00939         public string Text
00940         {
00941             get;
00942             set;
00943         }
00944
00945         public int Number
00946         {
00947             get;
00948             set;
00949         }
00950     }
00951 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BringIntoViewOffsetsChange Member List

This is the complete list of members for BringIntoViewOffsetsChange, including all inherited members.
BringIntoViewOffsetsChange(const ITrackerHandleManager *owner, double zoomedHorizontalOffset, double zoomedVerticalOffset, ScrollPresenterViewKind offsetsKind, winrt::IInspectable const &options, winrt::UIElement const &element, winrt::Rect const &elementRect, double horizontalAlignmentRatio, double verticalAlignmentRatio, double horizontalOffset, double verticalOffset) | BringIntoViewOffsetsChange |
Element() const | BringIntoViewOffsetsChange | [inline]
ElementRect() const | BringIntoViewOffsetsChange | [inline]
HorizontalAlignmentRatio() const | BringIntoViewOffsetsChange | [inline]
HorizontalOffset() const | BringIntoViewOffsetsChange | [inline]
m_elementRect | BringIntoViewOffsetsChange | [private]
m_horizontalAlignmentRatio | BringIntoViewOffsetsChange | [private]
m_horizontalOffset | BringIntoViewOffsetsChange | [private]
m_owner | BringIntoViewOffsetsChange | [private]
m_verticalAlignmentRatio | BringIntoViewOffsetsChange | [private]
m_verticalOffset | BringIntoViewOffsetsChange | [private]
OffsetsChange(double zoomedHorizontalOffset, double zoomedVerticalOffset, ScrollPresenterViewKind offsetsKind, winrt::IInspectable const &options) | OffsetsChange |
Options() const | ViewChange | [inline]
VerticalAlignmentRatio() const | BringIntoViewOffsetsChange | [inline]
VerticalOffset() const | BringIntoViewOffsetsChange | [inline]
ViewChange(ScrollPresenterViewKind viewKind, winrt::IInspectable const &options) | ViewChange |
ViewKind() const | ViewChange | [inline]
ZoomedHorizontalOffset() const | OffsetsChange | [inline]
ZoomedHorizontalOffset(double zoomedHorizontalOffset) | OffsetsChange |
ZoomedVerticalOffset() const | OffsetsChange | [inline]
ZoomedVerticalOffset(double zoomedVerticalOffset) | OffsetsChange |
~BringIntoViewOffsetsChange() | BringIntoViewOffsetsChange |
~OffsetsChange() | OffsetsChange |
~ViewChange() | ViewChange |
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPagerTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

PipsPagerTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PipsPagerTemplateSettings.h"
00008
00009 GlobalDependencyProperty PipsPagerTemplateSettingsProperties::s_PipsPagerItemsProperty{ nullptr };
00010
00011 PipsPagerTemplateSettingsProperties::PipsPagerTemplateSettingsProperties()
00012 {
00013     EnsureProperties();
00014 }
00015
00016 void PipsPagerTemplateSettingsProperties::EnsureProperties()
00017 {
00018     if (!s_PipsPagerItemsProperty)
00019     {
00020         s_PipsPagerItemsProperty =
00021             InitializeDependencyProperty(
00022                 L"PipsPagerItems",
00023                 winrt::name_of<winrt::IVector<int>>(),
00024                 winrt::name_of<winrt::PipsPagerTemplateSettings>(),
00025                 false /* isAttached */,
00026                 ValueHelper<winrt::IVector<int>>::BoxedDefaultValue(),
00027                 nullptr);
00028     }
00029 }
00030
00031 void PipsPagerTemplateSettingsProperties::ClearProperties()
00032 {
00033     s_PipsPagerItemsProperty = nullptr;
00034 }
00035
00036 void PipsPagerTemplateSettingsProperties::PipsPagerItems(winrt::IVector<int> const& value)
00037 {
00038     [[gsl::suppress(con)]]
00039     {
00040     static_cast<PipsPagerTemplateSettings*>(this)->SetValue(s_PipsPagerItemsProperty, ValueHelper<winrt::IVector<int>>::BoxValueIfNecessary(value));
00041     }
00042 }
00043
00044 winrt::IVector<int> PipsPagerTemplateSettingsProperties::PipsPagerItems()
00045 {
00046     return ValueHelper<winrt::IVector<int>>::CastOrUnbox(static_cast<PipsPagerTemplateSettings*>(this)->GetValue(s_PipsPagerItemsProperty));
00047 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BorderThicknessPage Member List

This is the complete list of members for BorderThicknessPage, including all inherited members.
BorderThicknessPage() BorderThicknessPage [inline]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicTestApi.cpp Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicTestApi.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "AcrylicTestApi.h"
00007 #include "AcrylicBrush.h"
00008
00009 #include "AcrylicTestApi.properties.cpp"
00010
00011 winrt::AcrylicBrush AcrylicTestApi::AcrylicBrush()
00012 {
00013     return m_acrylicBrush;
00014 }
00015
00016 void AcrylicTestApi::AcrylicBrush(winrt::AcrylicBrush const& value)
00017 {
00018     m_acrylicBrush = value;
00019 }
00020
00021 bool AcrylicTestApi::IsUsingAcrylicBrush()
00022 {
00023     return winrt::get_self<::AcrylicBrush>(m_acrylicBrush)->m_isUsingAcrylicBrush;
00024 }
00025
00026 winrt::CompositionBrush AcrylicTestApi::CompositionBrush()
00027 {
00028     return (winrt::get_self<::AcrylicBrush>(m_acrylicBrush))->m_brush;
00029 }
00030
00031 winrt::CompositionBrush AcrylicTestApi::NoiseBrush()
00032 {
00033     return (winrt::get_self<::AcrylicBrush>(m_acrylicBrush))->m_noiseBrush;
00034 }
00035
00036 void AcrylicTestApi::ForceCreateAcrylicBrush(bool useCrossFadeEffect)
00037 {
00038     auto acrylicBrush = winrt::get_self<::AcrylicBrush>(m_acrylicBrush);
00039
00040     acrylicBrush->CreateAcrylicBrush(useCrossFadeEffect, true);
00041 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewAxeTestPage.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

TabViewAxeTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     [AxeScanTestPage(Name = "TabView-Axe")]
00007     public sealed partial class TabViewAxeTestPage : TestPage
00008     {
00009         public TabViewAxeTestPage()
00010         {
00011             this.InitializeComponent();
00012         }
00013     }
00014 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/MicrosoftTelemetry.h Source File

  • File List
  • File Members
  • Telemetry

MicrosoftTelemetry.h

Go to the documentation of this file.
00001 ﻿/* ++
00002
00003 Copyright (c) Microsoft Corporation. All rights reserved.
00004 Licensed under the MIT License. See LICENSE in the project root for license information.
00005
00006 Module Name:
00007
00008     MicrosoftTelemetry.h
00009
00010 Abstract:
00011
00012     Macro definitions used by this project's TraceLogging ETW providers:
00013
00014     - Configuration macros that select the ETW Provider Groups to be used by
00015       this project.
00016     - Constants for tags that are commonly used in Microsoft's
00017       TraceLogging-based ETW.
00018
00019     Different versions of this file use different definitions for the
00020     TraceLoggingOption configuration macros. The definitions in this file are
00021     empty. As a result, providers using this configuration file will not join
00022     any ETW Provider Groups and will not be given any special treatment by
00023     group-sensitive ETW listeners.
00024
00025 Environment:
00026
00027     User mode or kernel mode.
00028
00029 --*/
00030
00031 #pragma once
00032
00033 // Event privacy tags. Use the PDT macro values for the tag parameter, e.g.:
00034 // TraceLoggingWrite(...,
00035 //   TelemetryPrivacyDataTag(PDT_BrowsingHistory | PDT_ProductAndServiceUsage),
00036 //   ...);
00037 #define TelemetryPrivacyDataTag(tag) TraceLoggingUInt64((tag), "PartA_PrivTags")
00038 #define PDT_BrowsingHistory                    0x0000000000000002u
00039 #define PDT_DeviceConnectivityAndConfiguration 0x0000000000000800u
00040 #define PDT_InkingTypingAndSpeechUtterance     0x0000000000020000u
00041 #define PDT_ProductAndServicePerformance       0x0000000001000000u
00042 #define PDT_ProductAndServiceUsage             0x0000000002000000u
00043 #define PDT_SoftwareSetupAndInventory          0x0000000080000000u
00044
00045 // Event categories specified via keywords, e.g.:
00046 // TraceLoggingWrite(...,
00047 //     TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
00048 //     ...);
00049 #define MICROSOFT_KEYWORD_CRITICAL_DATA 0x0000800000000000 // Bit 47
00050 #define MICROSOFT_KEYWORD_MEASURES      0x0000400000000000 // Bit 46
00051 #define MICROSOFT_KEYWORD_TELEMETRY     0x0000200000000000 // Bit 45
00052 #define MICROSOFT_KEYWORD_RESERVED_44   0x0000100000000000 // Bit 44 (reserved for future assignment)
00053
00054 // Event categories specified via event tags, e.g.:
00055 // TraceLoggingWrite(...,
00056 //     TraceLoggingEventTag(MICROSOFT_EVENTTAG_REALTIME_LATENCY),
00057 //     ...);
00058 #define MICROSOFT_EVENTTAG_DROP_USER_IDS            0x00008000
00059 #define MICROSOFT_EVENTTAG_AGGREGATE                0x00010000
00060 #define MICROSOFT_EVENTTAG_DROP_PII_EXCEPT_IP       0x00020000
00061 #define MICROSOFT_EVENTTAG_COSTDEFERRED_LATENCY     0x00040000
00062 #define MICROSOFT_EVENTTAG_CORE_DATA                0x00080000
00063 #define MICROSOFT_EVENTTAG_INJECT_XTOKEN            0x00100000
00064 #define MICROSOFT_EVENTTAG_REALTIME_LATENCY         0x00200000
00065 #define MICROSOFT_EVENTTAG_NORMAL_LATENCY           0x00400000
00066 #define MICROSOFT_EVENTTAG_CRITICAL_PERSISTENCE     0x00800000
00067 #define MICROSOFT_EVENTTAG_NORMAL_PERSISTENCE       0x01000000
00068 #define MICROSOFT_EVENTTAG_DROP_PII                 0x02000000
00069 #define MICROSOFT_EVENTTAG_HASH_PII                 0x04000000
00070 #define MICROSOFT_EVENTTAG_MARK_PII                 0x08000000
00071
00072 // Field categories specified via field tags, e.g.:
00073 // TraceLoggingWrite(...,
00074 //     TraceLoggingString(szUser, "UserName", "User's name", MICROSOFT_FIELDTAG_HASH_PII),
00075 //     ...);
00076 #define MICROSOFT_FIELDTAG_DROP_PII 0x04000000
00077 #define MICROSOFT_FIELDTAG_HASH_PII 0x08000000
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushBasicPage Member List

This is the complete list of members for AcrylicBrushBasicPage, including all inherited members.
AcrylicBrushBasicPage() | AcrylicBrushBasicPage | [inline]
AnimateBackgroundButton_Checked(object sender, RoutedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
AnimateBackgroundButton_Unchecked(object sender, RoutedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) | AcrylicBrushBasicPage | [inline, private]
FallbackColorButton_Checked(object sender, RoutedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
FallbackColorButton_Unchecked(object sender, RoutedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
myAcrylicBrush | AcrylicBrushBasicPage | [private]
TestPage_Loaded(object sender, RoutedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
TintColorButton_Checked(object sender, RoutedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
TintColorButton_Unchecked(object sender, RoutedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
TintOpacity_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e) | AcrylicBrushBasicPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealBrush.h Source File

  • File List
  • File Members
  • Materials
  • Reveal

RevealBrush.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "MaterialHelper.h"
00006 #include "RevealBrushTestApi.h"
00007
00008 #include "RevealBrush.g.h"
00009 #include "RevealBorderBrush.g.h"
00010 #include "RevealBackgroundBrush.g.h"
00011 #include "RevealBrush.properties.h"
00012
00013
00014 class RevealBrush :
00015     public winrt::implementation::RevealBrushT<RevealBrush>,
00016     public RevealBrushProperties
00017 {
00018     friend RevealBrushTestApi;
00019     friend MaterialHelper;
00020 public:
00021     RevealBrush();
00022     virtual ~RevealBrush();
00023
00024     // IXamlCompositionBrushOverrides
00025     void OnConnected();
00026     void OnDisconnected();
00027
00028     // Property changed handler
00029     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00030     void OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy);
00031     void OnNoiseChanged(const com_ptr<MaterialHelperBase>& sender);
00032
00033     static void StopAttachingLights();
00034
00035     static void AttachLights();
00036     static void AttachLightsToAncestor(const winrt::UIElement& root, bool trackRootToDisconnectFrom);
00037
00038     static void ClearProperties();
00039     static void EnsureProperties();
00040
00041     // Properties' statics.
00042     static GlobalDependencyProperty s_IsContainerProperty;
00043
00044 public:
00045     // Default value on public DP - ok to be public
00046     static const winrt::Color sc_defaultColor;
00047
00048 protected:
00049     // DependencyProperty changed event handlers
00050     void OnColorChanged();
00051     void OnTargetThemeChanged();
00052
00053     void CreateRevealBrush();
00054     void UpdateRevealBrush();
00055
00056     // Effect factories:
00057     static winrt::IGraphicsEffect CreateRevealHoverEffect();
00058     static winrt::IGraphicsEffect CreateRevealBorderEffect(bool isInverted, bool hasBaseColor);
00059
00060     void OnFallbackColorChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args);
00061
00062     void UpdateLightTargets(bool ambientToo);
00063
00064     bool IsInFallbackMode();
00065
00066     winrt::event_token m_materialPolicyChangedToken{};
00067
00068     bool m_isConnected{};
00069     bool m_isBorder{};
00070     bool m_isBorderLightSet{};
00071     bool m_isHoverLightSet{};
00072     bool m_isAmbientLightSet{};
00073     bool m_isInFallbackMode{};
00074     bool m_noiseChanged{};
00075     bool m_hasBaseColor{};
00076     bool m_isDisabledByMaterialPolicy{};
00077
00078     winrt::CompositionBrush m_brush{ nullptr };
00079     winrt::event_token m_fallbackColorChangedToken{};
00080     winrt::event_token m_noiseChangedToken{};
00081
00082     static const winrt::Color sc_ambientContributionColor;
00083     static const float sc_diffuseAmount;
00084     static const float sc_specularAmount;
00085     static const float sc_specularShine;
00086     static const float sc_diffuseAmountBorder;
00087     static const float sc_specularAmountBorder;
00088     static const float sc_specularShineBorder;
00089     static const winrt::Matrix5x4 sc_colorToAlphaMatrix;    // Converts the RGB in the noise texture into an alpha mask
00090     static const winrt::Matrix5x4 sc_luminanceToAlphaMatrix;
00091
00092
00093 private:
00094     // Property changed event handler.
00095     static void OnIsContainerPropertyChanged(
00096         const winrt::DependencyObject& sender,
00097         const winrt::DependencyPropertyChangedEventArgs& args);
00098
00099 public:
00100     static void OnStatePropertyChanged(
00101         const winrt::DependencyObject& sender,
00102         const winrt::DependencyPropertyChangedEventArgs& args);
00103
00104 private:
00105     void EnsureNoiseBrush();
00106     winrt::CompositionEffectFactory GetOrCreateRevealBrushCompositionEffectFactory(
00107         bool isBorder,
00108         bool isInverted,
00109         bool hasBaseColor,
00110         const winrt::Compositor& compositor);
00111
00112     static bool IsOnXboxAndNotMouseMode();
00113     void RemoveTargetBrush(const wstring_view& lightID);
00114
00115     void PolicyStatusChangedHelper(bool isDisabledByMaterialPolicy);
00116
00117     static bool ValidatePublicRootAncestor();
00118     static winrt::UIElement GetAncestor(const winrt::UIElement& root);
00119     static void AttachLightsToElement(const winrt::UIElement& element, bool trackAsRootToDisconnectFrom);
00120     static void AttachLightsImpl();
00121
00122     winrt::CompositionSurfaceBrush m_noiseBrush{ nullptr };
00123 };
00124
00125 class RevealBorderBrush :
00126     public ReferenceTracker<RevealBorderBrush, winrt::implementation::RevealBorderBrushT, RevealBrush>
00127 {
00128 public:
00129     RevealBorderBrush();
00130 };
00131
00132 class RevealBackgroundBrush :
00133     public ReferenceTracker<RevealBackgroundBrush, winrt::implementation::RevealBackgroundBrushT, RevealBrush>
00134 {};
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TwoPaneViewTests Member List

This is the complete list of members for TwoPaneViewTests, including all inherited members.
c_defaultMinTallModeHeight | TwoPaneViewTests | [private]
c_defaultMinWideModeWidth | TwoPaneViewTests | [private]
VerifyDefaultsAndBasicSetting() | TwoPaneViewTests | [inline]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ViewportTests Member List

This is the complete list of members for ViewportTests, including all inherited members.
CanBringIntoViewElements() | ViewportTests | [inline]
CanGrowCacheBuffer() | ViewportTests | [inline]
GetMonitoringLayout(Size desiredSize, List< Rect > realizationRects, List< Rect > visibleRects) | ViewportTests | [inline, private, static]
RunElementTrackingTestRoutine(Action< ObservableCollection< ObservableCollection< string >>, TestScrollingSurface[], ItemsRepeater > testRoutine) | ViewportTests | [inline, private]
ValidateItemsRepeaterScrollHostScenario() | ViewportTests | [inline]
ValidateLoadUnload() | ViewportTests | [inline]
ValidateNoScrollingSurfaceInPopupScenario() | ViewportTests | [inline]
ValidateNoScrollingSurfaceScenario() | ViewportTests | [inline]
ValidateNoScrollingSurfaceScenario(bool hostItemsRepeaterInPopup) | ViewportTests | [inline, private]
ValidateOneScrollPresenterScenario() | ViewportTests | [inline]
ValidateRealizedRange(ItemsRepeater repeater, int expectedFirstGroupIndex, int expectedLastGroupIndex, int expectedFirstItemGroupIndex, int expectedFirstItemIndex, int expectedLastItemGroupIndex, int expectedLastItemIndex) | ViewportTests | [inline, private]
ValidateTwoScrollPresentersScenario() | ViewportTests | [inline]
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ImageIcon.properties.h Source File

  • File List
  • File Members
  • Generated

ImageIcon.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ImageIconProperties
00008 {
00009 public:
00010     ImageIconProperties();
00011
00012     void Source(winrt::ImageSource const& value);
00013     winrt::ImageSource Source();
00014
00015     static winrt::DependencyProperty SourceProperty() { return s_SourceProperty; }
00016
00017     static GlobalDependencyProperty s_SourceProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021
00022     static void OnSourcePropertyChanged(
00023         winrt::DependencyObject const& sender,
00024         winrt::DependencyPropertyChangedEventArgs const& args);
00025 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MUXControlsTestHooksLoggingMessageEventArgs Member List

This is the complete list of members for MUXControlsTestHooksLoggingMessageEventArgs, including all inherited members.
IsVerboseLevel() | MUXControlsTestHooksLoggingMessageEventArgs
Message() | MUXControlsTestHooksLoggingMessageEventArgs
SetIsVerboseLevel(bool isVerboseLevel) | MUXControlsTestHooksLoggingMessageEventArgs
SetMessage(const wstring_view &message) | MUXControlsTestHooksLoggingMessageEventArgs
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MySelector Member List

This is the complete list of members for MySelector, including all inherited members.
SelectTemplateCore(object item) | MySelector | [inline, protected]
TemplateEven | MySelector |
TemplateOdd | MySelector |
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Navigation;
00010 using Microsoft.UI.Xaml.Automation;
00011 using Microsoft.UI.Private.Media;
00012 using Windows.ApplicationModel.Core;
00013 using System.Runtime.InteropServices;
00014 using Windows.UI.Core;
00015 using MUXControlsTestApp.Utilities;
00016 using System.Collections.Generic;
00017
00018 namespace MUXControlsTestApp
00019 {
00020     public sealed partial class NavigationViewPage : TestPage
00021     {
00022         private int m_newItemIndex = 0;
00023         private int m_newFooterItemIndex = 0;
00024         private int m_closingEventsFired = 0;
00025         private int m_closedEventsFired = 0;
00026         private bool m_useFocusVisualKindReveal = false;
00027         // FocusVisualKind impacts other testing, recover to setting in unload page
00028         private FocusVisualKind m_focusVisualKind;
00029
00030         private int _selectionChangedEventsFired = 0;
00031         public int m_selectionChangedEventsFired
00032         {
00033             get
00034             {
00035                 return _selectionChangedEventsFired;
00036             }
00037             set
00038             {
00039                 _selectionChangedEventsFired = value;
00040                 NumberOfSelectionChangedEventsRaisedTextBlock.Text = _selectionChangedEventsFired.ToString();
00041             }
00042         }
00043
00044         private int _itemInvokedEventsFired = 0;
00045         public int m_itemInvokedEventsFired
00046         {
00047             get
00048             {
00049                 return _itemInvokedEventsFired;
00050             }
00051             set
00052             {
00053                 _itemInvokedEventsFired = value;
00054                 NumberOfItemInvokedEventsRaisedTextBlock.Text = _itemInvokedEventsFired.ToString();
00055             }
00056         }
00057
00058
00059         public NavigationViewPage()
00060         {
00061             this.InitializeComponent();
00062
00063             this.Loaded += NavigationViewPage_Loaded;
00064             this.Unloaded += NavigationViewPage_Unloaded;
00065
00066             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00067             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00068
00069             IntegerItem.Content = 7; // Testing that boxed ints don't cause crashes in tooltips
00070         }
00071
00072         protected override void OnNavigatedFrom(NavigationEventArgs e)
00073         {
00074             // Unset all override flags to avoid impacting subsequent tests
00075             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00076             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00077
00078             base.OnNavigatedFrom(e);
00079         }
00080
00081         private void NavigationViewPage_Loaded(object sender, RoutedEventArgs e)
00082         {
00083             m_focusVisualKind = Application.Current.FocusVisualKind;
00084
00085             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00086             if (rootGrid != null)
00087             {
00088                 Grid paneContentGrid = rootGrid.FindName("PaneContentGrid") as Grid;
00089                 if (paneContentGrid != null)
00090                 {
00091                     Button toggleButton = paneContentGrid.FindName("TogglePaneButton") as Button;
00092                     if (toggleButton != null)
00093                     {
00094                         toggleButton.RegisterPropertyChangedCallback(Button.BackgroundProperty, new DependencyPropertyChangedCallback(ToggleBackgroundChanged));
00095                         UpdateToggleBackgroundColor(toggleButton);
00096                     }
00097                 }
00098             }
00099
00100             SettingsItemVisibilityCheckbox.IsChecked = NavView.IsSettingsVisible;
00101             PaneToggleButtonVisiblityCheckbox.IsChecked = NavView.IsPaneToggleButtonVisible;
00102             HeaderVisiblityCheckbox.IsChecked = NavView.AlwaysShowHeader;
00103
00104             NavView.SelectedItem = HomeItem;
00105
00106             FindAndGiveAutomationNameToVisualChild("NavigationViewBackButton");
00107         }
00108
00109         private void NavigationViewPage_Unloaded(object sender, RoutedEventArgs e)
00110         {
00111             Application.Current.FocusVisualKind = m_focusVisualKind;
00112         }
00113
00114         private void ToggleBackgroundChanged(DependencyObject o, DependencyProperty p)
00115         {
00116             UpdateToggleBackgroundColor(o as Button);
00117         }
00118
00119         private void UpdateToggleBackgroundColor(Button toggleButton)
00120         {
00121             if (toggleButton.Background != null && toggleButton.Background is SolidColorBrush)
00122             {
00123                 ToggleButtonBackgroundColor.Text = (toggleButton.Background as SolidColorBrush).Color.ToString();
00124             }
00125             else
00126             {
00127                 ToggleButtonBackgroundColor.Text = String.Empty;
00128             }
00129         }
00130
00131         private void OpenPaneButton_Click(object sender, RoutedEventArgs e)
00132         {
00133             NavView.IsPaneOpen = true;
00134         }
00135
00136         private void ChangeContent_Click(object sender, RoutedEventArgs e)
00137         {
00138             NavView.Content = new TextBox();
00139         }
00140
00141         private void CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00142         {
00143             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00144             NavView.CompactModeThresholdWidth = tag;
00145         }
00146
00147         private void ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00148         {
00149             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00150             NavView.ExpandedModeThresholdWidth = tag;
00151         }
00152
00153         private void TestPage_Loaded(object sender, RoutedEventArgs e)
00154         {
00155         }
00156
00157         private void PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00158         {
00159             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00160             var mode = (NavigationViewPaneDisplayMode)Enum.Parse(typeof(NavigationViewPaneDisplayMode), tag);
00161             NavView.PaneDisplayMode = mode;
00162         }
00163
00164         private void SelectedItemCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00165         {
00166             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00167             if (tag == "Home")
00168             {
00169                 NavView.SelectedItem = HomeItem;
00170             }
00171             else if (tag == "Apps")
00172             {
00173                 AppsItem.IsSelected = true;
00174             }
00175             else if (tag == "Games")
00176             {
00177                 NavView.SelectedItem = GamesItem;
00178             }
00179             else if (tag == "Music")
00180             {
00181                 NavView.SelectedItem = MusicItem;
00182             }
00183             else if (tag == "Movies")
00184             {
00185                 NavView.SelectedItem = MoviesItem;
00186             }
00187             else if (tag == "TV")
00188             {
00189                 NavView.SelectedItem = TVItem;
00190             }
00191             else if (tag == "Settings")
00192             {
00193                 NavView.SelectedItem = NavView.SettingsItem;
00194             }
00195         }
00196
00197         private void SelectedItemIsEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00198         {
00199             if (NavView.SelectedItem != null)
00200             {
00201                 (NavView.SelectedItem as Control).IsEnabled = true;
00202             }
00203         }
00204
00205         private void SelectedItemIsEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00206         {
00207             if (NavView.SelectedItem != null)
00208             {
00209                 (NavView.SelectedItem as Control).IsEnabled = false;
00210             }
00211         }
00212
00213         private void SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00214         {
00215             NavView.IsSettingsVisible = true;
00216         }
00217
00218         private void SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00219         {
00220             NavView.IsSettingsVisible = false;
00221         }
00222
00223         private void PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00224         {
00225             NavView.IsPaneToggleButtonVisible = true;
00226         }
00227
00228         private void PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00229         {
00230             NavView.IsPaneToggleButtonVisible = false;
00231         }
00232
00233         private void ToggleButtonStyleCheckbox_Checked(object sender, RoutedEventArgs e)
00234         {
00235             NavView.PaneToggleButtonStyle = this.Resources["AlternateToggleButtonStyle"] as Style;
00236         }
00237
00238         private void ToggleButtonStyleCheckbox_Unchecked(object sender, RoutedEventArgs e)
00239         {
00240             NavView.PaneToggleButtonStyle = Application.Current.Resources["PaneToggleButtonStyle"] as Style;
00241         }
00242
00243         private void CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00244         {
00245             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00246             NavView.CompactPaneLength = tag;
00247         }
00248
00249         private void OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e)
00250         {
00251             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00252             NavView.OpenPaneLength = tag;
00253         }
00254
00255         private void NavView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
00256         {
00257             switch (args.DisplayMode)
00258             {
00259                 case NavigationViewDisplayMode.Minimal:
00260                     DisplayModeTextBox.Text = "Minimal";
00261                     DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DodgerBlue);
00262                     break;
00263                 case NavigationViewDisplayMode.Compact:
00264                     DisplayModeTextBox.Text = "Compact";
00265                     DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkMagenta);
00266                     break;
00267                 case NavigationViewDisplayMode.Expanded:
00268                     DisplayModeTextBox.Text = "Expanded";
00269                     DisplayModeTextBox.Foreground = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.DarkRed);
00270                     break;
00271             }
00272         }
00273
00274         private void HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e)
00275         {
00276             NavView.AlwaysShowHeader = true;
00277         }
00278
00279         private void HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00280         {
00281             NavView.AlwaysShowHeader = false;
00282         }
00283
00284         private void FindAndGiveAutomationNameToVisualChild(string childName)
00285         {
00286             DependencyObject obj = FindVisualChildByName(this.NavView, childName);
00287
00288             if (obj != null)
00289             {
00290                 AutomationProperties.SetName(obj, childName);
00291             }
00292         }
00293
00294         private void WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00295         {
00296             var tag = Convert.ToDouble(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00297             NavView.Width = tag;
00298         }
00299
00300         private void AddItemButton_Click(object sender, RoutedEventArgs e)
00301         {
00302             var menuItem = new NavigationViewItem();
00303             menuItem.Content = "New Menu Item " + m_newItemIndex.ToString();
00304             menuItem.Icon = new SymbolIcon(Symbol.AllApps);
00305             NavView.MenuItems.Add(menuItem);
00306             m_newItemIndex++;
00307         }
00308
00309         private void RemoveItemButton_Click(object sender, RoutedEventArgs e)
00310         {
00311             if (NavView.MenuItems.Count > 0)
00312             {
00313                 NavView.MenuItems.RemoveAt(NavView.MenuItems.Count - 1);
00314             }
00315         }
00316
00317         private void ShowFooterItemButton_Click(object sender, RoutedEventArgs e)
00318         {
00319             FooterItem.Visibility = Visibility.Visible;
00320         }
00321
00322         private void AddFooterItemButton_Click(object sender, RoutedEventArgs e)
00323         {
00324             var menuItem = new NavigationViewItem();
00325             menuItem.Content = "New Footer Menu Item " + m_newFooterItemIndex.ToString();
00326             menuItem.Icon = new SymbolIcon(Symbol.AllApps);
00327             NavView.FooterMenuItems.Add(menuItem);
00328             m_newFooterItemIndex++;
00329         }
00330
00331         private void RemoveFooterItemButton_Click(object sender, RoutedEventArgs e)
00332         {
00333             if (NavView.FooterMenuItems.Count > 0)
00334             {
00335                 NavView.FooterMenuItems.RemoveAt(NavView.FooterMenuItems.Count - 1);
00336             }
00337         }
00338
00339         private void ClearMenuButton_Click(object sender, RoutedEventArgs e)
00340         {
00341             NavView.MenuItems.Clear();
00342         }
00343
00344         private void HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00345         {
00346             var tag = Convert.ToString(((sender as ComboBox).SelectedItem as ComboBoxItem).Tag);
00347             if (tag == "Default")
00348             {
00349                 MainGridRow.Height = new GridLength(1, GridUnitType.Star);
00350             }
00351             else if (tag == "300")
00352             {
00353                 MainGridRow.Height = new GridLength(300, GridUnitType.Pixel);
00354             }
00355         }
00356
00357         private void ResetEventCounters_Click(object sender, RoutedEventArgs e)
00358         {
00359             m_itemInvokedEventsFired = 0;
00360             m_selectionChangedEventsFired = 0;
00361         }
00362
00363         private void NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
00364         {
00365             m_itemInvokedEventsFired++;
00366
00367             // Reset argument type indicatiors
00368             ItemInvokedItemType.Text = "null";
00369             ItemInvokedItemContainerType.Text = "null";
00370
00371             if (args.InvokedItem != null)
00372             {
00373                 ItemInvokedItemType.Text = args.InvokedItem.GetType().ToString();
00374             }
00375
00376             if (args.InvokedItemContainer != null)
00377             {
00378                 ItemInvokedItemContainerType.Text = args.InvokedItemContainer.GetType().ToString();
00379             }
00380
00381             var curSelected = sender.SelectedItem as NavigationViewItem;
00382             var text = args.InvokedItem as string;
00383             if (curSelected != null && (string)curSelected.Content == text)
00384             {
00385                 if(InvokedItemState.Text == "ItemWasSelectedInItemInvoked")
00386                 {
00387                     InvokedItemState.Text = "ItemWasInvokedSecomdTimeWithCorrectSelection";
00388                 }
00389                 else
00390                 {
00391                     InvokedItemState.Text = "ItemWasSelectedInItemInvoked";
00392                 }
00393             }
00394             else
00395             {
00396                 InvokedItemState.Text = "Error:ItemUnselectedInItemInvoked";
00397             }
00398         }
00399
00400         private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
00401         {
00402             SelectionChangedRaised.Text = "True";
00403             // Reset argument type indicatiors
00404             SelectionChangedItemType.Text = "null";
00405             SelectionChangedItemContainerType.Text = "null";
00406
00407             m_selectionChangedEventsFired++;
00408             if (args.SelectedItem != null)
00409             {
00410                 SelectionChangedItemType.Text = args.SelectedItem.GetType().ToString();
00411
00412                 var itemdata = args.SelectedItem as NavigationViewItem;
00413                 if (itemdata != null)
00414                 {
00415                     if (itemdata.Content != null)
00416                     {
00417                         NavView.Header = itemdata.Content + " as header";
00418                     }
00419                     else if(args.IsSettingsSelected) // to handle settings without content case in top nav
00420                     {
00421                         NavView.Header = "Settings as header";
00422                     }
00423                 }
00424             }
00425
00426             if (args.SelectedItemContainer != null)
00427             {
00428                 SelectionChangedItemContainerType.Text = args.SelectedItemContainer.GetType().ToString();
00429             }
00430
00431             if (NavView.SelectedItem == null)
00432             {
00433                 SelectedItemIsEnabledCheckbox.IsChecked = null;
00434             }
00435             else
00436             {
00437                 SelectedItemIsEnabledCheckbox.IsChecked = (NavView.SelectedItem as Control).IsEnabled;
00438             }
00439         }
00440
00441         private void ClearSelectionChangeBlock(object sender,RoutedEventArgs e)
00442         {
00443             SelectionChangedRaised.Text = "False";
00444         }
00445
00446         private void MoviesEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00447         {
00448             MoviesItem.IsEnabled = true;
00449             TVItem.IsEnabled = true;
00450         }
00451
00452         private void MoviesEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00453         {
00454             MoviesItem.IsEnabled = false;
00455             TVItem.IsEnabled = false;
00456         }
00457
00458         private void FlowDirectionCheckbox_Checked(object sender, RoutedEventArgs e)
00459         {
00460             this.FlowDirection = FlowDirection.LeftToRight;
00461         }
00462
00463         private void FlowDirectionCheckbox_Unchecked(object sender, RoutedEventArgs e)
00464         {
00465             this.FlowDirection = FlowDirection.RightToLeft;
00466         }
00467
00468         private void IsTitleBarAutoPaddingEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00469         {
00470             NavView.IsTitleBarAutoPaddingEnabled = true;
00471         }
00472
00473         private void IsTitleBarAutoPaddingEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00474         {
00475             NavView.IsTitleBarAutoPaddingEnabled = false;
00476         }
00477
00478         private void TitleBarCheckbox_Checked(object sender, RoutedEventArgs e)
00479         {
00480             if (CoreWindow.GetForCurrentThread() != null)
00481             {
00482                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00483                 titleBar.ExtendViewIntoTitleBar = false;
00484             }
00485         }
00486
00487         private void TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e)
00488         {
00489             if (CoreWindow.GetForCurrentThread() != null)
00490             {
00491                 CoreApplicationViewTitleBar titleBar = CoreApplication.GetCurrentView().TitleBar;
00492                 titleBar.ExtendViewIntoTitleBar = true;
00493             }
00494         }
00495
00496         private void TestFrameCheckbox_Checked(object sender, RoutedEventArgs e)
00497         {
00498             UpdateTestFrameVisibility(Visibility.Visible);
00499         }
00500
00501         private void TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e)
00502         {
00503             UpdateTestFrameVisibility(Visibility.Collapsed);
00504         }
00505
00506         private void AutoSuggestCheckbox_Checked(object sender, RoutedEventArgs e)
00507         {
00508             // recreate AutoSuggestBox
00509             var autoSuggestBox = new AutoSuggestBox();
00510             AutomationProperties.SetName(autoSuggestBox, "PaneAutoSuggestBox");
00511             NavView.AutoSuggestBox = autoSuggestBox;
00512         }
00513
00514         private void AutoSuggestCheckbox_Unchecked(object sender, RoutedEventArgs e)
00515         {
00516             NavView.AutoSuggestBox = null;
00517         }
00518
00519         private void ScrambleButton_Click(object sender, RoutedEventArgs e)
00520         {
00521             foreach (var entry in NavView.MenuItems)
00522             {
00523                 NavigationViewItem item = entry as NavigationViewItem;
00524
00525                 if (item != null)
00526                 {
00527                     char[] newTitle = item.Content.ToString().ToCharArray();
00528                     Array.Reverse(newTitle);
00529                     item.Content = new string(newTitle);
00530                 }
00531             }
00532         }
00533
00534         private void CopyGamesLabelButton_Click(object sender, RoutedEventArgs e)
00535         {
00536             var popups = VisualTreeHelper.GetOpenPopupsForXamlRoot(XamlRoot);
00537             if (popups != null && popups.Count > 0)
00538             {
00539                 Popup popup = popups[0];
00540                 ToolTip toolTip = popup.Child as ToolTip;
00541                 ToolTipStatusTextBlock.Text = toolTip.Content.ToString();
00542             }
00543             else
00544             {
00545                 ToolTipStatusTextBlock.Text = "There are no popups";
00546             }
00547         }
00548
00549         private void ClosingEventCountResetButton_Click(object sender, RoutedEventArgs e)
00550         {
00551             LastIngEventText.Text = "";
00552             LastEdEventText.Text = "";
00553             m_closingEventsFired = 0;
00554             m_closedEventsFired = 0;
00555             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00556         }
00557
00558         private void NavView_PaneClosing(NavigationView sender, NavigationViewPaneClosingEventArgs args)
00559         {
00560             if (CancelClosingEvents != null && (bool)CancelClosingEvents.IsChecked)
00561             {
00562                 args.Cancel = true;
00563             }
00564
00565             LastIngEventText.Text = "PaneClosing event fired";
00566
00567             m_closingEventsFired++;
00568             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00569
00570         }
00571
00572         private void NavView_PaneClosed(NavigationView sender, object args)
00573         {
00574             LastEdEventText.Text = "PaneClosed event fired";
00575
00576             m_closedEventsFired++;
00577             ClosingEventCountTextBlock.Text = m_closingEventsFired + "-" + m_closedEventsFired;
00578             PaneOpenedOrClosedEvent.Text = "Closed";
00579         }
00580
00581         private void NavView_PaneOpening(NavigationView sender, object args)
00582         {
00583             LastIngEventText.Text = "PaneOpening event fired";
00584         }
00585
00586         private void NavView_PaneOpened(NavigationView sender, object args)
00587         {
00588             LastEdEventText.Text = "PaneOpened event fired";
00589             PaneOpenedOrClosedEvent.Text = "Opened";
00590         }
00591
00592         private void ChangePaneTitle_Click(object sender, RoutedEventArgs e)
00593         {
00594             NavView.PaneTitle = string.IsNullOrEmpty(NavView.PaneTitle) ? "NavView Test" : string.Empty;
00595         }
00596
00597         private void CopyVolumeToolTipButton_Click(object sender, RoutedEventArgs e)
00598         {
00599             var contentGrid = FindVisualChildByName(VolumeItem, "ContentGrid") as Grid;
00600             ToolTip tooltip = ToolTipService.GetToolTip(contentGrid) as ToolTip;
00601             if (tooltip == null || tooltip.Content == null)
00602             {
00603                 ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is null";
00604             }
00605             else
00606             {
00607                 ToolTipStatusTextBlock.Text = "The volume navigation view item tooltip content is definitely not null";
00608             }
00609         }
00610
00611         private void SetHeaderButton_Click(object sender, RoutedEventArgs args)
00612         {
00613             NavView.Header = new TextBlock() { Text = "Bananas" };
00614         }
00615
00616         private void IsPaneFooterVisibleCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
00617         {
00618             if (IsPaneFooterVisibleCheckBox != null && PaneFooter != null)
00619             {
00620                 PaneFooter.Visibility = IsPaneFooterVisibleCheckBox.IsChecked==true ? Visibility.Visible : Visibility.Collapsed;
00621             }
00622         }
00623
00624         private void BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e)
00625         {
00626             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Visible;
00627         }
00628
00629         private void BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e)
00630         {
00631             NavView.IsBackButtonVisible = NavigationViewBackButtonVisible.Collapsed;
00632         }
00633
00634         private void BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e)
00635         {
00636             NavView.IsBackEnabled = true;
00637         }
00638
00639         private void BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
00640         {
00641             NavView.IsBackEnabled = false;
00642         }
00643
00644         private void SelectionFollowFocus_Checked(object sender, RoutedEventArgs e)
00645         {
00646             NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Enabled;
00647         }
00648
00649         private void SelectionFollowFocus_Unchecked(object sender, RoutedEventArgs e)
00650         {
00651             NavView.SelectionFollowsFocus = NavigationViewSelectionFollowsFocus.Disabled;
00652         }
00653
00654         private void NavView_BackRequested(NavigationView nv, NavigationViewBackRequestedEventArgs args)
00655         {
00656             BackRequestedStateTextBlock.Text = "Back was requested";
00657         }
00658
00659         private void BackRequestedStateResetButton_Click(object sender, RoutedEventArgs args)
00660         {
00661             BackRequestedStateTextBlock.Text = "Test reset";
00662         }
00663
00664         private void FlipOrientation_Click(object sender, RoutedEventArgs e)
00665         {
00666             NavView.PaneDisplayMode = NavView.PaneDisplayMode == NavigationViewPaneDisplayMode.Top ? NavigationViewPaneDisplayMode.Auto : NavigationViewPaneDisplayMode.Top;
00667             FindAndGiveAutomationNameToVisualChild("SettingsItem");
00668         }
00669
00670         private void ClearSelectedItem_Click(object sender, RoutedEventArgs e)
00671         {
00672             NavView.SelectedItem = null;
00673         }
00674
00675         private void GetHomeItemRevealVisualState_Click(object sender, RoutedEventArgs e)
00676         {
00677             var found = Utilities.VisualStateHelper.ContainsVisualState(HomeItem, "OnLeftNavigationReveal");
00678             OnLeftNavigationRevealVisualState.Text = found ? "True" : "False";
00679         }
00680
00681         private void ChangeFocusVisualKind_Click(object sender, RoutedEventArgs e)
00682         {
00683             m_useFocusVisualKindReveal = !m_useFocusVisualKindReveal;
00684             if (m_useFocusVisualKindReveal)
00685             {
00686                 Application.Current.FocusVisualKind = FocusVisualKind.Reveal;
00687             }
00688             else
00689             {
00690                 Application.Current.FocusVisualKind = m_focusVisualKind;
00691             }
00692
00693             // Force HomeItem to update visualstate
00694             if (HomeItem.Content.Equals("Home"))
00695             {
00696                 HomeItem.Content = "Home1";
00697             }
00698             else
00699             {
00700                 HomeItem.Content = "Home";
00701             }
00702         }
00703
00704         private void GetHeaderContentMargin_Click(object sender, RoutedEventArgs e)
00705         {
00706             string margin = "Can't find HeaderContent";
00707             Grid rootGrid = VisualTreeHelper.GetChild(NavView, 0) as Grid;
00708             if (rootGrid != null)
00709             {
00710                 var control = rootGrid.FindName("HeaderContent") as FrameworkElement;
00711                 if (control != null)
00712                 {
00713                     margin = control.Margin.ToString();
00714                 }
00715             }
00716             HeaderContentMarginResult.Text = margin;
00717         }
00718
00719         private void GetNavViewActiveVisualStates_Click(object sender, RoutedEventArgs e)
00720         {
00721             var visualstates = Utilities.VisualStateHelper.GetCurrentVisualStateName(NavView);
00722             NavViewActiveVisualStatesResult.Text = string.Join(",", visualstates);
00723         }
00724
00725         private void ChangePaneHeader_Click(object sender, RoutedEventArgs e)
00726         {
00727             if (NavView.PaneHeader == null)
00728             {
00729                 TextBlock text = new TextBlock();
00730                 text.Text = "Modified Pane Header";
00731                 NavView.PaneHeader = text;
00732             }
00733             else if (NavView.PaneHeader is TextBlock)
00734             {
00735                 TextBox text = new TextBox();
00736                 text.Text = "Large Pane Header";
00737                 text.IsReadOnly = true;
00738                 text.FontSize = 26;
00739                 NavView.PaneHeader = text;
00740             }
00741             else
00742             {
00743                 NavView.PaneHeader = null;
00744             }
00745
00746             FindAndGiveAutomationNameToVisualChild("PaneHeaderOnTopPane");
00747             FindAndGiveAutomationNameToVisualChild("PaneHeaderContentBorder");
00748         }
00749
00750         private void ReadSettingsSelected_Click(object sender, RoutedEventArgs e)
00751         {
00752             DependencyObject settings = FindVisualChildByName(NavView, "SettingsItem");
00753
00754             SettingsSelectedState.Text = (settings as NavigationViewItem).IsSelected.ToString();
00755         }
00756
00757         private async void ContentDialogNavViewButton_Click(object sender, RoutedEventArgs e)
00758         {
00759             DialogWithNavView dialog = new DialogWithNavView();
00760             dialog.XamlRoot = this.XamlRoot;
00761             await dialog.ShowAsync();
00762         }
00763
00764         private void GetTopLevelNavViewItemContentPresenterMarginButton_Click(object sender, RoutedEventArgs e)
00765         {
00766             if (FindVisualChildByName(HasChildItem, "ContentPresenter") is ContentPresenter presenter)
00767             {
00768                 NavViewItemContentPresenterMarginTextBlock.Text = presenter.Margin.ToString();
00769             }
00770         }
00771
00772         private void GetChildNavViewItemContentPresenterMarginButton_Click(object sender, RoutedEventArgs e)
00773         {
00774             if (FindVisualChildByName(ChildItem, "ContentPresenter") is ContentPresenter presenter)
00775             {
00776                 NavViewItemContentPresenterMarginTextBlock.Text = presenter.Margin.ToString();
00777             }
00778         }
00779
00780         private void BringSettingsIntoViewButton_Click(object sender, RoutedEventArgs e)
00781         {
00782             if (NavView.SettingsItem is NavigationViewItem settingsItem)
00783             {
00784                 settingsItem.StartBringIntoView();
00785             }
00786         }
00787
00788         private void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
00789         {
00790             var suggestions = new List<string>();
00791             suggestions.Add(sender.Text);
00792             suggestions.Add(sender.Text + "1");
00793             PaneAutoSuggestBox.ItemsSource = suggestions;
00794         }
00795
00796         private void PaneAutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args)
00797         {
00798             SuggestionChosenCheckbox.IsChecked = true;
00799         }
00800
00801         private void ScrollItemIntoViewButton_Click(object sender, RoutedEventArgs e)
00802         {
00803             var tag = Convert.ToString((ScrollItemIntoViewComboBox.SelectedItem as ComboBoxItem).Tag);
00804             switch (tag)
00805             {
00806                 case "Home":
00807                     HomeItem.StartBringIntoView();
00808                     break;
00809                 case "HasChildItem":
00810                     HasChildItem.StartBringIntoView();
00811                     break;
00812             }
00813         }
00814     }
00815 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPenButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarPenButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarPenButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarPenButton)
00012 }
00013
00014 #include "InkToolBarPenButton.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarPenButtonProperties::s_MaxStrokeWidthProperty{ nullptr };
00017 GlobalDependencyProperty InkToolBarPenButtonProperties::s_MinStrokeWidthProperty{ nullptr };
00018 GlobalDependencyProperty InkToolBarPenButtonProperties::s_PaletteProperty{ nullptr };
00019 GlobalDependencyProperty InkToolBarPenButtonProperties::s_SelectedBrushProperty{ nullptr };
00020 GlobalDependencyProperty InkToolBarPenButtonProperties::s_SelectedBrushIndexProperty{ nullptr };
00021 GlobalDependencyProperty InkToolBarPenButtonProperties::s_SelectedStrokeWidthProperty{ nullptr };
00022
00023 InkToolBarPenButtonProperties::InkToolBarPenButtonProperties()
00024 {
00025     EnsureProperties();
00026 }
00027
00028 void InkToolBarPenButtonProperties::EnsureProperties()
00029 {
00030     InkToolBarToolButton::EnsureProperties();
00031     if (!s_MaxStrokeWidthProperty)
00032     {
00033         s_MaxStrokeWidthProperty =
00034             InitializeDependencyProperty(
00035                 L"MaxStrokeWidth",
00036                 winrt::name_of<double>(),
00037                 winrt::name_of<winrt::InkToolBarPenButton>(),
00038                 false /* isAttached */,
00039                 ValueHelper<double>::BoxedDefaultValue(),
00040                 nullptr);
00041     }
00042     if (!s_MinStrokeWidthProperty)
00043     {
00044         s_MinStrokeWidthProperty =
00045             InitializeDependencyProperty(
00046                 L"MinStrokeWidth",
00047                 winrt::name_of<double>(),
00048                 winrt::name_of<winrt::InkToolBarPenButton>(),
00049                 false /* isAttached */,
00050                 ValueHelper<double>::BoxedDefaultValue(),
00051                 nullptr);
00052     }
00053     if (!s_PaletteProperty)
00054     {
00055         s_PaletteProperty =
00056             InitializeDependencyProperty(
00057                 L"Palette",
00058                 winrt::name_of<winrt::IVector<winrt::Brush>>(),
00059                 winrt::name_of<winrt::InkToolBarPenButton>(),
00060                 false /* isAttached */,
00061                 ValueHelper<winrt::IVector<winrt::Brush>>::BoxedDefaultValue(),
00062                 nullptr);
00063     }
00064     if (!s_SelectedBrushProperty)
00065     {
00066         s_SelectedBrushProperty =
00067             InitializeDependencyProperty(
00068                 L"SelectedBrush",
00069                 winrt::name_of<winrt::Brush>(),
00070                 winrt::name_of<winrt::InkToolBarPenButton>(),
00071                 false /* isAttached */,
00072                 ValueHelper<winrt::Brush>::BoxedDefaultValue(),
00073                 nullptr);
00074     }
00075     if (!s_SelectedBrushIndexProperty)
00076     {
00077         s_SelectedBrushIndexProperty =
00078             InitializeDependencyProperty(
00079                 L"SelectedBrushIndex",
00080                 winrt::name_of<int>(),
00081                 winrt::name_of<winrt::InkToolBarPenButton>(),
00082                 false /* isAttached */,
00083                 ValueHelper<int>::BoxedDefaultValue(),
00084                 nullptr);
00085     }
00086     if (!s_SelectedStrokeWidthProperty)
00087     {
00088         s_SelectedStrokeWidthProperty =
00089             InitializeDependencyProperty(
00090                 L"SelectedStrokeWidth",
00091                 winrt::name_of<double>(),
00092                 winrt::name_of<winrt::InkToolBarPenButton>(),
00093                 false /* isAttached */,
00094                 ValueHelper<double>::BoxedDefaultValue(),
00095                 nullptr);
00096     }
00097 }
00098
00099 void InkToolBarPenButtonProperties::ClearProperties()
00100 {
00101     s_MaxStrokeWidthProperty = nullptr;
00102     s_MinStrokeWidthProperty = nullptr;
00103     s_PaletteProperty = nullptr;
00104     s_SelectedBrushProperty = nullptr;
00105     s_SelectedBrushIndexProperty = nullptr;
00106     s_SelectedStrokeWidthProperty = nullptr;
00107     InkToolBarToolButton::ClearProperties();
00108 }
00109
00110 void InkToolBarPenButtonProperties::MaxStrokeWidth(double value)
00111 {
00112     [[gsl::suppress(con)]]
00113     {
00114     static_cast<InkToolBarPenButton*>(this)->SetValue(s_MaxStrokeWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00115     }
00116 }
00117
00118 double InkToolBarPenButtonProperties::MaxStrokeWidth()
00119 {
00120     return ValueHelper<double>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_MaxStrokeWidthProperty));
00121 }
00122
00123 void InkToolBarPenButtonProperties::MinStrokeWidth(double value)
00124 {
00125     [[gsl::suppress(con)]]
00126     {
00127     static_cast<InkToolBarPenButton*>(this)->SetValue(s_MinStrokeWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00128     }
00129 }
00130
00131 double InkToolBarPenButtonProperties::MinStrokeWidth()
00132 {
00133     return ValueHelper<double>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_MinStrokeWidthProperty));
00134 }
00135
00136 void InkToolBarPenButtonProperties::Palette(winrt::IVector<winrt::Brush> const& value)
00137 {
00138     [[gsl::suppress(con)]]
00139     {
00140     static_cast<InkToolBarPenButton*>(this)->SetValue(s_PaletteProperty, ValueHelper<winrt::IVector<winrt::Brush>>::BoxValueIfNecessary(value));
00141     }
00142 }
00143
00144 winrt::IVector<winrt::Brush> InkToolBarPenButtonProperties::Palette()
00145 {
00146     return ValueHelper<winrt::IVector<winrt::Brush>>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_PaletteProperty));
00147 }
00148
00149 void InkToolBarPenButtonProperties::SelectedBrush(winrt::Brush const& value)
00150 {
00151     [[gsl::suppress(con)]]
00152     {
00153     static_cast<InkToolBarPenButton*>(this)->SetValue(s_SelectedBrushProperty, ValueHelper<winrt::Brush>::BoxValueIfNecessary(value));
00154     }
00155 }
00156
00157 winrt::Brush InkToolBarPenButtonProperties::SelectedBrush()
00158 {
00159     return ValueHelper<winrt::Brush>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_SelectedBrushProperty));
00160 }
00161
00162 void InkToolBarPenButtonProperties::SelectedBrushIndex(int value)
00163 {
00164     [[gsl::suppress(con)]]
00165     {
00166     static_cast<InkToolBarPenButton*>(this)->SetValue(s_SelectedBrushIndexProperty, ValueHelper<int>::BoxValueIfNecessary(value));
00167     }
00168 }
00169
00170 int InkToolBarPenButtonProperties::SelectedBrushIndex()
00171 {
00172     return ValueHelper<int>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_SelectedBrushIndexProperty));
00173 }
00174
00175 void InkToolBarPenButtonProperties::SelectedStrokeWidth(double value)
00176 {
00177     [[gsl::suppress(con)]]
00178     {
00179     static_cast<InkToolBarPenButton*>(this)->SetValue(s_SelectedStrokeWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00180     }
00181 }
00182
00183 double InkToolBarPenButtonProperties::SelectedStrokeWidth()
00184 {
00185     return ValueHelper<double>::CastOrUnbox(static_cast<InkToolBarPenButton*>(this)->GetValue(s_SelectedStrokeWidthProperty));
00186 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioMenuFlyoutItem.properties.h Source File

  • File List
  • File Members
  • Generated

RadioMenuFlyoutItem.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class RadioMenuFlyoutItemProperties
00008 {
00009 public:
00010     RadioMenuFlyoutItemProperties();
00011
00012     static void SetAreCheckStatesEnabled(winrt::MenuFlyoutSubItem const& target, bool value);
00013     static bool GetAreCheckStatesEnabled(winrt::MenuFlyoutSubItem const& target);
00014
00015     void GroupName(winrt::hstring const& value);
00016     winrt::hstring GroupName();
00017
00018     void IsChecked(bool value);
00019     bool IsChecked();
00020
00021     static winrt::DependencyProperty AreCheckStatesEnabledProperty() { return s_AreCheckStatesEnabledProperty; }
00022     static winrt::DependencyProperty GroupNameProperty() { return s_GroupNameProperty; }
00023     static winrt::DependencyProperty IsCheckedProperty() { return s_IsCheckedProperty; }
00024
00025     static GlobalDependencyProperty s_AreCheckStatesEnabledProperty;
00026     static GlobalDependencyProperty s_GroupNameProperty;
00027     static GlobalDependencyProperty s_IsCheckedProperty;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031
00032     static void OnGroupNamePropertyChanged(
00033         winrt::DependencyObject const& sender,
00034         winrt::DependencyPropertyChangedEventArgs const& args);
00035
00036     static void OnIsCheckedPropertyChanged(
00037         winrt::DependencyObject const& sender,
00038         winrt::DependencyPropertyChangedEventArgs const& args);
00039 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IVectorOwner< EventSource, T > Member List

This is the complete list of members for IVectorOwner< EventSource, T >, including all inherited members.
GetCustomIndexOfFunction | IVectorOwner< EventSource, T > | [inline]
GetExternalTrackerHandleManager()=0 | IVectorOwner< EventSource, T > | [pure virtual]
GetVectorEventSender()=0 | IVectorOwner< EventSource, T > | [pure virtual]
GetVectorEventSource()=0 | IVectorOwner< EventSource, T > | [pure virtual]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Microsoft.UI.Xaml.FrameworkPackagePRI/Properties/AssemblyInfo.cs Source File

  • File List
  • File Members
  • Microsoft.UI.Xaml.FrameworkPackagePRI
  • Properties

AssemblyInfo.cs

Go to the documentation of this file.
00001 ﻿using System.Reflection;
00002 using System.Runtime.CompilerServices;
00003 using System.Runtime.InteropServices;
00004
00005 // General Information about an assembly is controlled through the following
00006 // set of attributes. Change these attribute values to modify the information
00007 // associated with an assembly.
00008 [assembly: AssemblyTitle("Microsoft.UI.Xaml.Controls")]
00009 [assembly: AssemblyDescription("")]
00010 [assembly: AssemblyConfiguration("")]
00011 [assembly: AssemblyCompany("")]
00012 [assembly: AssemblyProduct("Windows UI Library")]
00013 [assembly: AssemblyCopyright("Copyright ©  2019")]
00014 [assembly: AssemblyTrademark("")]
00015 [assembly: AssemblyCulture("")]
00016
00017 // Version information for an assembly consists of the following four values:
00018 //
00019 //      Major Version
00020 //      Minor Version
00021 //      Build Number
00022 //      Revision
00023 //
00024 // You can specify all the values or you can default the Build and Revision Numbers
00025 // by using the '*' as shown below:
00026 // [assembly: AssemblyVersion("1.0.*")]
00027 [assembly: AssemblyVersion("1.0.0.0")]
00028 [assembly: AssemblyFileVersion("1.0.0.0")]
00029 [assembly: ComVisible(false)]
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/VirtualizingStackPanelPage.xaml.cs Source File

  • File List
  • File Members
  • ParallaxView
  • TestUI

VirtualizingStackPanelPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.ObjectModel;
00005 using MUXControlsTestApp.Utilities;
00006
00007 namespace MUXControlsTestApp
00008 {
00009     public sealed partial class VirtualizingStackPanelPage : TestPage
00010     {
00011         private ObservableCollection<Ingredient> Ingredients = new ObservableCollection<Ingredient>();
00012
00013         public VirtualizingStackPanelPage()
00014         {
00015             this.InitializeComponent();
00016             PopulateData();
00017         }
00018
00019         private void PopulateData()
00020         {
00021             this.Ingredients.Add(new Ingredient("Banana", "10 lbs", "Assets/ingredient1.png"));
00022             this.Ingredients.Add(new Ingredient("Strawberry", "27 lbs", "Assets/ingredient2.png"));
00023             this.Ingredients.Add(new Ingredient("Lemon", "12 lbs", "Assets/ingredient5.png"));
00024             this.Ingredients.Add(new Ingredient("Orange", "54 lbs", "Assets/ingredient3.png"));
00025             this.Ingredients.Add(new Ingredient("Vanilla", "2 lbs", "Assets/ingredient8.png"));
00026             this.Ingredients.Add(new Ingredient("Mint", "5 lbs", "Assets/ingredient4.png"));
00027             this.Ingredients.Add(new Ingredient("Banana", "9 lbs", "Assets/ingredient1.png"));
00028             this.Ingredients.Add(new Ingredient("Strawberry", "21 lbs", "Assets/ingredient2.png"));
00029             this.Ingredients.Add(new Ingredient("Lemon", "10 lbs", "Assets/ingredient5.png"));
00030             this.Ingredients.Add(new Ingredient("Orange", "57 lbs", "Assets/ingredient3.png"));
00031             this.Ingredients.Add(new Ingredient("Vanilla", "1 lbs", "Assets/ingredient8.png"));
00032             this.Ingredients.Add(new Ingredient("Mint", "4 lbs", "Assets/ingredient4.png"));
00033
00034             this.IngredientList.ItemsSource = this.Ingredients;
00035         }
00036     }
00037 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/LayoutExtensions.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

LayoutExtensions.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml.Controls;
00006
00007 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00008 {
00009     public static class LayoutExtension
00010     {
00011         public static void SetOrientation(this VirtualizingLayout layout, ScrollOrientation scrollOrientation)
00012         {
00013             // Note:
00014             // The public properties of UniformGridLayout and FlowLayout interpret orientation the opposite to
00015             // how FlowLayoutAlgorithm interprets it.
00016             // For simplicity, all of our test validation code is written in terms that match the implementation.
00017             // For this reason, we need to switch the orientation whenever we set UniformGridLayout.Orientation
00018             // or StackLayout.Orientation.
00019             if (layout is StackLayout)
00020             {
00021                 ((StackLayout)layout).Orientation = scrollOrientation.ToLayoutOrientation();
00022             }
00023             else if (layout is UniformGridLayout)
00024             {
00025                 ((UniformGridLayout)layout).Orientation = scrollOrientation.ToOrthogonalLayoutOrientation();
00026             }
00027             else if (layout is FlowLayout)
00028             {
00029                 ((FlowLayout)layout).Orientation = scrollOrientation.ToOrthogonalLayoutOrientation();
00030             }
00031             else
00032             {
00033                 throw new InvalidOperationException("layout unknown");
00034             }
00035         }
00036     }
00037 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooks.idl Source File

  • File List
  • File Members
  • SelectorBar

SelectorBarTestHooks.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [default_interface]
00006 [webhosthidden]
00007 runtimeclass SelectorBarTestHooks
00008 {
00009     static MU_XC_NAMESPACE.ItemsView GetItemsViewPart(MU_XC_NAMESPACE.SelectorBar selectorBar);
00010 }
00011
00012 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewIsPaneOpenPage Member List

This is the complete list of members for NavigationViewIsPaneOpenPage, including all inherited members.
NavigationView_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs args) | NavigationViewIsPaneOpenPage | [inline, private]
NavigationViewIsPaneOpenPage() | NavigationViewIsPaneOpenPage | [inline]
Generated on Sun Dec 1 2024 20:54:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewTestsWithInputHelper Member List

This is the complete list of members for ItemsViewTestsWithInputHelper, including all inherited members.
BringFocusedItemIntoView() | ItemsViewTestsWithInputHelper | [inline]
CanDragItemContainerAfterPan() | ItemsViewTestsWithInputHelper | [inline]
ClassInitialize(TestContext testContext) | ItemsViewTestsWithInputHelper | [inline, static]
ClearTraces() | ItemsViewTestsWithInputHelper | [inline, private]
ClickedItemBroughtIntoView() | ItemsViewTestsWithInputHelper | [inline]
GetCurrentItemIndex() | ItemsViewTestsWithInputHelper | [inline, private]
GetScrollViewView(out double horizontalOffset, out double verticalOffset, out float zoomFactor) | ItemsViewTestsWithInputHelper | [inline, private]
GetSelectedItems() | ItemsViewTestsWithInputHelper | [inline, private]
InsertAndRemoveItems() | ItemsViewTestsWithInputHelper | [inline]
InvokeScrollViewScrollToButton() | ItemsViewTestsWithInputHelper | [inline, private]
InvokeScrollViewZoomToButton() | ItemsViewTestsWithInputHelper | [inline, private]
ItemInvokedCount() | ItemsViewTestsWithInputHelper | [inline, private]
ItemsViewExtendedSelectionMode() | ItemsViewTestsWithInputHelper | [inline]
ItemsViewItemsContainerDragStartingEventRaised() | ItemsViewTestsWithInputHelper | [inline]
ItemsViewMultipleSelectionMode() | ItemsViewTestsWithInputHelper | [inline]
KeyboardNavigationInItemsViewWithLinedFlowLayout() | ItemsViewTestsWithInputHelper | [inline]
KeyboardNavigationInItemsViewWithLinedFlowLayoutAndInnerFocusableControl() | ItemsViewTestsWithInputHelper | [inline]
KeyboardNavigationInItemsViewWithStackLayout() | ItemsViewTestsWithInputHelper | [inline]
KeyboardNavigationInItemsViewWithUniformGridLayout() | ItemsViewTestsWithInputHelper | [inline]
KeyboardNavigationWithFastKeystrokes(string layout, Key key) | ItemsViewTestsWithInputHelper | [inline, private]
KeyboardNavigationWithLayout(string layout, bool useLateralMoves, bool useFocusableControlInItemContainer=false) | ItemsViewTestsWithInputHelper | [inline, private]
KeyDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
KeyDownInItemsViewAndStackLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
KeyPageDownInItemsViewAndLinedFlowLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
KeyPageDownInItemsViewAndStackLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
KeyPageUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
KeyPageUpInItemsViewAndStackLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
KeyUpInItemsViewAndLinedFlowLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
KeyUpInItemsViewAndStackLayoutWithFastKeystrokes() | ItemsViewTestsWithInputHelper | [inline]
LogAndClearTraces() | ItemsViewTestsWithInputHelper | [inline, private]
LogEditValue(string editName) | ItemsViewTestsWithInputHelper | [inline, private]
LogEditValue(string editName, Edit edit) | ItemsViewTestsWithInputHelper | [inline, private]
LogScrollViewInfo(UIObject itemsViewUIObject, double?expectedVerticalOffset=null, bool?getScrollViewView=true) | ItemsViewTestsWithInputHelper | [inline, private]
LogTraces() | ItemsViewTestsWithInputHelper | [inline, private]
PanAnnotatedScrollBar(bool handleItemsInfoRequested) | ItemsViewTestsWithInputHelper | [inline, private]
PanAnnotatedScrollBarWithItemsInfo() | ItemsViewTestsWithInputHelper | [inline]
PanAnnotatedScrollBarWithoutItemsInfo() | ItemsViewTestsWithInputHelper | [inline]
PanItemsView() | ItemsViewTestsWithInputHelper | [inline]
PrepareForScrollViewManipulationStart(string stateTextBoxName="txtScrollViewState") | ItemsViewTestsWithInputHelper | [inline, private]
ResetItemsView(ComboBox cmbItemsSource, ComboBox cmbLayout) | ItemsViewTestsWithInputHelper | [inline, private]
SetCheckBoxValue(string checkBoxName, bool checkBoxValue) | ItemsViewTestsWithInputHelper | [inline, private]
SetUpItemsViewForSelectionTests(string selectionMode, bool provideExtraDesiredAspectRatioItemsInfo=false) | ItemsViewTestsWithInputHelper | [inline, private]
ShiftTabIntoItemsViewWithoutCurrentItem() | ItemsViewTestsWithInputHelper | [inline]
StartBringItemIntoView() | ItemsViewTestsWithInputHelper | [inline]
StartBringItemIntoView(bool clearItemAspectRatios) | ItemsViewTestsWithInputHelper | [inline, private]
TabIntoItemsViewWithoutCurrentItem() | ItemsViewTestsWithInputHelper | [inline]
TabIntoItemsViewWithoutCurrentItem(bool useShiftTab) | ItemsViewTestsWithInputHelper | [inline, private]
TabNavigationThroughItemsView(bool useItemContainer, string selectionMode) | ItemsViewTestsWithInputHelper | [inline, private]
TabNavigationThroughItemsViewWithContentControlsAndSingleSelectionMode() | ItemsViewTestsWithInputHelper | [inline]
TabNavigationThroughItemsViewWithItemContainersAndMultipleSelectionMode() | ItemsViewTestsWithInputHelper | [inline]
TabNavigationThroughItemsViewWithItemContainersAndSingleSelectionMode() | ItemsViewTestsWithInputHelper | [inline]
TapResetScrollViewButton() | ItemsViewTestsWithInputHelper | [inline, private]
TestCleanup() | ItemsViewTestsWithInputHelper | [inline]
UpdateTraces() | ItemsViewTestsWithInputHelper | [inline, private]
UseLinedFlowLayoutWithoutLineHeight() | ItemsViewTestsWithInputHelper | [inline]
UseLinedFlowLayoutWithoutMinWidth() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemCollectionTransitionProviderAnimations() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndMultipleSelection() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndNoSelection() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemsViewIsItemInvokedEnabledWithItemContainerAndSingleSelection() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndMultipleSelection() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndNoSelection() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemsViewIsItemInvokedEnabledWithoutItemContainerAndSingleSelection() | ItemsViewTestsWithInputHelper | [inline]
VerifyItemsViewItemInvokedEvent(bool useItemContainer, bool isItemInvokedEnabled, string selectionMode) | ItemsViewTestsWithInputHelper | [inline, private]
WaitForBoxChecked(string checkBoxName) | ItemsViewTestsWithInputHelper | [inline, private]
WaitForEditValue(string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true) | ItemsViewTestsWithInputHelper | [inline, private]
WaitForManipulationEnd(string elementName, string stateTextBoxName, bool throwOnError=true) | ItemsViewTestsWithInputHelper | [inline, private]
WaitForScrollViewManipulationEnd(string scrollViewName, string stateTextBoxName="txtScrollViewState") | ItemsViewTestsWithInputHelper | [inline, private]
Generated on Sun Dec 1 2024 20:53:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Data Member List

This is the complete list of members for Data, including all inherited members.
_next | Data | [private, static]
CreateNested(int levels=3, int groupsAtLevel=5, int countAtLeaf=10) | Data | [inline, static]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/APITests/ProgressRingTests.cs Source File

  • File List
  • File Members
  • ProgressRing
  • APITests

ProgressRingTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using Microsoft.UI.Xaml.Controls;
00006 using MUXControlsTestApp.Utilities;
00007 using Microsoft.UI.Xaml.Automation.Peers;
00008 using Microsoft.UI.Xaml.Automation.Provider;
00009 using Microsoft.UI.Xaml.Automation.Peers;
00010 using Microsoft.UI.Xaml.Media;
00011 using Microsoft.UI.Xaml.Automation;
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00017 {
00018     [TestClass]
00019     public class ProgressRingTests : ApiTestBase
00020     {
00021         [TestMethod]
00022         public void VerifyAccessibilityView()
00023         {
00024             RunOnUIThread.Execute(() =>
00025             {
00026                 var progressRing = new ProgressRing();
00027                 progressRing.IsActive = true;
00028
00029                 Verify.AreNotEqual(AccessibilityView.Raw, AutomationProperties.GetAccessibilityView(progressRing));
00030
00031                 progressRing.IsActive = false;
00032                 Verify.AreEqual(AccessibilityView.Raw, AutomationProperties.GetAccessibilityView(progressRing));
00033             });
00034         }
00035     }
00036 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButton.cpp Source File

  • File List
  • File Members
  • SplitButton

SplitButton.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SplitButton.h"
00007 #include "SplitButtonAutomationPeer.h"
00008 #include "SplitButtonTestHelper.h"
00009 #include "SplitButtonEventArgs.h"
00010 #include "RuntimeProfiler.h"
00011 #include "ResourceAccessor.h"
00012
00013 SplitButton::SplitButton()
00014 {
00015     __RP_Marker_ClassById(RuntimeProfiler::ProfId_SplitButton);
00016
00017     SetDefaultStyleKey(this);
00018
00019     m_keyDownRevoker = KeyDown(winrt::auto_revoke, { this, &SplitButton::OnSplitButtonKeyDown });
00020     m_keyUpRevoker = KeyUp(winrt::auto_revoke, { this, &SplitButton::OnSplitButtonKeyUp });
00021 }
00022
00023 void SplitButton::OnApplyTemplate()
00024 {
00025     UnregisterEvents();
00026
00027     winrt::IControlProtected controlProtected{ *this };
00028     m_primaryButton.set(GetTemplateChildT<winrt::Button>(L"PrimaryButton", controlProtected));
00029     m_secondaryButton.set(GetTemplateChildT<winrt::Button>(L"SecondaryButton", controlProtected));
00030
00031     if (auto primaryButton = m_primaryButton.get())
00032     {
00033         m_clickPrimaryRevoker = primaryButton.Click(winrt::auto_revoke, { this, &SplitButton::OnClickPrimary });
00034
00035         m_pressedPrimaryRevoker = RegisterPropertyChanged(primaryButton, winrt::ButtonBase::IsPressedProperty(), { this, &SplitButton::OnVisualPropertyChanged });
00036         m_pointerOverPrimaryRevoker = RegisterPropertyChanged(primaryButton, winrt::ButtonBase::IsPointerOverProperty(), { this, &SplitButton::OnVisualPropertyChanged });
00037
00038         // Register for pointer events so we can keep track of the last used pointer type
00039         m_pointerEnteredPrimaryRevoker = primaryButton.PointerEntered(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00040         m_pointerExitedPrimaryRevoker = primaryButton.PointerExited(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00041         m_pointerPressedPrimaryRevoker = primaryButton.PointerPressed(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00042         m_pointerReleasedPrimaryRevoker = primaryButton.PointerReleased(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00043         m_pointerCanceledPrimaryRevoker = primaryButton.PointerCanceled(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00044         m_pointerCaptureLostPrimaryRevoker = primaryButton.PointerCaptureLost(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00045     }
00046
00047     if (auto secondaryButton = m_secondaryButton.get())
00048     {
00049         // Do localization for the secondary button
00050         auto secondaryName = ResourceAccessor::GetLocalizedStringResource(SR_SplitButtonSecondaryButtonName);
00051         winrt::AutomationProperties::SetName(secondaryButton, secondaryName);
00052
00053         m_clickSecondaryRevoker = secondaryButton.Click(winrt::auto_revoke, { this, &SplitButton::OnClickSecondary });
00054
00055         m_pressedSecondaryRevoker = RegisterPropertyChanged(secondaryButton, winrt::ButtonBase::IsPressedProperty(), { this, &SplitButton::OnVisualPropertyChanged });
00056         m_pointerOverSecondaryRevoker = RegisterPropertyChanged(secondaryButton, winrt::ButtonBase::IsPointerOverProperty(), { this, &SplitButton::OnVisualPropertyChanged });
00057
00058         // Register for pointer events so we can keep track of the last used pointer type
00059         m_pointerEnteredSecondaryRevoker = secondaryButton.PointerEntered(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00060         m_pointerExitedSecondaryRevoker = secondaryButton.PointerExited(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00061         m_pointerPressedSecondaryRevoker = secondaryButton.PointerPressed(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00062         m_pointerReleasedSecondaryRevoker = secondaryButton.PointerReleased(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00063         m_pointerCanceledSecondaryRevoker = secondaryButton.PointerCanceled(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00064         m_pointerCaptureLostSecondaryRevoker = secondaryButton.PointerCaptureLost(winrt::auto_revoke, { this, &SplitButton::OnPointerEvent });
00065     }
00066
00067     // Register events on flyout
00068     RegisterFlyoutEvents();
00069
00070     UpdateVisualStates();
00071
00072     m_hasLoaded = true;
00073 }
00074
00075 void SplitButton::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00076 {
00077     winrt::IDependencyProperty property = args.Property();
00078
00079     if (property == s_FlyoutProperty)
00080     {
00081         OnFlyoutChanged();
00082     }
00083 }
00084
00085 winrt::AutomationPeer SplitButton::OnCreateAutomationPeer()
00086 {
00087     return winrt::make<SplitButtonAutomationPeer>(*this);
00088 }
00089
00090 void SplitButton::OnFlyoutChanged()
00091 {
00092     RegisterFlyoutEvents();
00093
00094     UpdateVisualStates();
00095 }
00096
00097 void SplitButton::RegisterFlyoutEvents()
00098 {
00099     m_flyoutOpenedRevoker.revoke();
00100     m_flyoutClosedRevoker.revoke();
00101     m_flyoutPlacementChangedRevoker.revoke();
00102
00103     if (Flyout())
00104     {
00105         m_flyoutOpenedRevoker = Flyout().Opened(winrt::auto_revoke, { this, &SplitButton::OnFlyoutOpened });
00106
00107         m_flyoutClosedRevoker = Flyout().Closed(winrt::auto_revoke, { this, &SplitButton::OnFlyoutClosed });
00108
00109         m_flyoutPlacementChangedRevoker = RegisterPropertyChanged(Flyout(), winrt::FlyoutBase::PlacementProperty(), { this, &SplitButton::OnFlyoutPlacementChanged });
00110     }
00111 }
00112
00113 void SplitButton::OnVisualPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00114 {
00115     UpdateVisualStates();
00116 }
00117
00118 void SplitButton::UpdateVisualStates(bool useTransitions)
00119 {
00120     // place the secondary button
00121     if (m_lastPointerDeviceType == winrt::PointerDeviceType::Touch || m_isKeyDown)
00122     {
00123         winrt::VisualStateManager::GoToState(*this, L"SecondaryButtonSpan", useTransitions);
00124     }
00125     else
00126     {
00127         winrt::VisualStateManager::GoToState(*this, L"SecondaryButtonRight", useTransitions);
00128     }
00129
00130     // change visual state
00131     auto primaryButton = m_primaryButton.get();
00132     auto secondaryButton = m_secondaryButton.get();
00133     if (!IsEnabled()) {
00134         winrt::VisualStateManager::GoToState(*this, L"Disabled", useTransitions);
00135     }
00136     else if (primaryButton && secondaryButton)
00137     {
00138         if (m_isFlyoutOpen)
00139         {
00140             if (InternalIsChecked())
00141             {
00142                 winrt::VisualStateManager::GoToState(*this, L"CheckedFlyoutOpen", useTransitions);
00143             }
00144             else
00145             {
00146                 winrt::VisualStateManager::GoToState(*this, L"FlyoutOpen", useTransitions);
00147             }
00148         }
00149         // SplitButton and ToggleSplitButton share a template -- this section is driving the checked states for ToggleSplitButton.
00150         else if (InternalIsChecked())
00151         {
00152             if (m_lastPointerDeviceType == winrt::PointerDeviceType::Touch || m_isKeyDown)
00153             {
00154                 if (primaryButton.IsPressed() || secondaryButton.IsPressed() || m_isKeyDown)
00155                 {
00156                     winrt::VisualStateManager::GoToState(*this, L"CheckedTouchPressed", useTransitions);
00157                 }
00158                 else
00159                 {
00160                     winrt::VisualStateManager::GoToState(*this, L"Checked", useTransitions);
00161                 }
00162             }
00163             else if (primaryButton.IsPressed())
00164             {
00165                 winrt::VisualStateManager::GoToState(*this, L"CheckedPrimaryPressed", useTransitions);
00166             }
00167             else if (primaryButton.IsPointerOver())
00168             {
00169                 winrt::VisualStateManager::GoToState(*this, L"CheckedPrimaryPointerOver", useTransitions);
00170             }
00171             else if (secondaryButton.IsPressed())
00172             {
00173                 winrt::VisualStateManager::GoToState(*this, L"CheckedSecondaryPressed", useTransitions);
00174             }
00175             else if (secondaryButton.IsPointerOver())
00176             {
00177                 winrt::VisualStateManager::GoToState(*this, L"CheckedSecondaryPointerOver", useTransitions);
00178             }
00179             else
00180             {
00181                 winrt::VisualStateManager::GoToState(*this, L"Checked", useTransitions);
00182             }
00183         }
00184         else
00185         {
00186             if (m_lastPointerDeviceType == winrt::PointerDeviceType::Touch || m_isKeyDown)
00187             {
00188                 if (primaryButton.IsPressed() || secondaryButton.IsPressed() || m_isKeyDown)
00189                 {
00190                     winrt::VisualStateManager::GoToState(*this, L"TouchPressed", useTransitions);
00191                 }
00192                 else
00193                 {
00194                     winrt::VisualStateManager::GoToState(*this, L"Normal", useTransitions);
00195                 }
00196             }
00197             else if (primaryButton.IsPressed())
00198             {
00199                 winrt::VisualStateManager::GoToState(*this, L"PrimaryPressed", useTransitions);
00200             }
00201             else if (primaryButton.IsPointerOver())
00202             {
00203                 winrt::VisualStateManager::GoToState(*this, L"PrimaryPointerOver", useTransitions);
00204             }
00205             else if (secondaryButton.IsPressed())
00206             {
00207                 winrt::VisualStateManager::GoToState(*this, L"SecondaryPressed", useTransitions);
00208             }
00209             else if (secondaryButton.IsPointerOver())
00210             {
00211                 winrt::VisualStateManager::GoToState(*this, L"SecondaryPointerOver", useTransitions);
00212             }
00213             else
00214             {
00215                 winrt::VisualStateManager::GoToState(*this, L"Normal", useTransitions);
00216             }
00217         }
00218     }
00219 }
00220
00221 void SplitButton::OpenFlyout()
00222 {
00223     if (auto flyout = Flyout())
00224     {
00225         winrt::FlyoutShowOptions options{};
00226         options.Placement(winrt::FlyoutPlacementMode::BottomEdgeAlignedLeft);
00227         flyout.ShowAt(*this, options);
00228     }
00229 }
00230
00231 void SplitButton::CloseFlyout()
00232 {
00233     if (auto flyout = Flyout())
00234     {
00235         flyout.Hide();
00236     }
00237 }
00238
00239 void SplitButton::ExecuteCommand()
00240 {
00241     if (const auto& command = Command())
00242     {
00243         const auto& commandParameter = CommandParameter();
00244
00245         if (command.CanExecute(commandParameter))
00246         {
00247             command.Execute(commandParameter);
00248         }
00249     }
00250 }
00251
00252 void SplitButton::OnFlyoutOpened(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00253 {
00254     m_isFlyoutOpen = true;
00255     UpdateVisualStates();
00256     SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Collapsed, winrt::ExpandCollapseState::Expanded);
00257 }
00258
00259 void SplitButton::OnFlyoutClosed(const winrt::IInspectable& sender, const winrt::IInspectable& args)
00260 {
00261     m_isFlyoutOpen = false;
00262     UpdateVisualStates();
00263     SharedHelpers::RaiseAutomationPropertyChangedEvent(*this, winrt::ExpandCollapseState::Expanded, winrt::ExpandCollapseState::Collapsed);
00264 }
00265
00266 void SplitButton::OnFlyoutPlacementChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00267 {
00268     UpdateVisualStates();
00269 }
00270
00271 void SplitButton::OnClickPrimary(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args)
00272 {
00273     auto eventArgs = winrt::make_self<SplitButtonClickEventArgs>();
00274     m_clickEventSource(*this, *eventArgs);
00275
00276     if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00277     {
00278         peer.RaiseAutomationEvent(winrt::AutomationEvents::InvokePatternOnInvoked);
00279     }
00280 }
00281
00282 void SplitButton::OnClickSecondary(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args)
00283 {
00284     OpenFlyout();
00285 }
00286
00287 void SplitButton::Invoke()
00288 {
00289     bool invoked = false;
00290
00291     if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(m_primaryButton.get()))
00292     {
00293         if (winrt::IInvokeProvider invokeProvider = peer.GetPattern(winrt::PatternInterface::Invoke).try_as<winrt::IInvokeProvider>())
00294         {
00295             invokeProvider.Invoke();
00296             invoked = true;
00297         }
00298     }
00299
00300     // If we don't have a primary button that provides an invoke provider, we'll fall back to calling OnClickPrimary manually.
00301     if (!invoked)
00302     {
00303         OnClickPrimary(nullptr, nullptr);
00304     }
00305 }
00306
00307 void SplitButton::OnPointerEvent(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args)
00308 {
00309     winrt::PointerDeviceType pointerDeviceType = args.Pointer().PointerDeviceType();
00310
00311     // Allows the test app to simulate how the control responds to touch input.
00312     if (SplitButtonTestHelper::SimulateTouch())
00313     {
00314         pointerDeviceType = winrt::PointerDeviceType::Touch;
00315     }
00316
00317     if (m_lastPointerDeviceType != pointerDeviceType)
00318     {
00319         m_lastPointerDeviceType = pointerDeviceType;
00320         UpdateVisualStates();
00321     }
00322 }
00323
00324 void SplitButton::OnSplitButtonKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args)
00325 {
00326     const winrt::VirtualKey key = args.Key();
00327     if (key == winrt::VirtualKey::Space || key == winrt::VirtualKey::Enter || key == winrt::VirtualKey::GamepadA)
00328     {
00329         m_isKeyDown = true;
00330         UpdateVisualStates();
00331     }
00332 }
00333
00334 void SplitButton::OnSplitButtonKeyUp(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args)
00335 {
00336     const winrt::VirtualKey key = args.Key();
00337     if (key == winrt::VirtualKey::Space || key == winrt::VirtualKey::Enter || key == winrt::VirtualKey::GamepadA)
00338     {
00339         m_isKeyDown = false;
00340         UpdateVisualStates();
00341
00342         // Consider this a click on the primary button
00343         if (IsEnabled())
00344         {
00345             OnClickPrimary(nullptr, nullptr);
00346             ExecuteCommand();
00347             args.Handled(true);
00348         }
00349     }
00350     else if (key == winrt::VirtualKey::Down)
00351     {
00352         const winrt::CoreVirtualKeyStates menuState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu);
00353         const bool menuKeyDown = (menuState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00354
00355         if (IsEnabled() && menuKeyDown)
00356         {
00357             // Open the menu on alt-down
00358             OpenFlyout();
00359             args.Handled(true);
00360         }
00361     }
00362     else if (key == winrt::VirtualKey::F4 && IsEnabled())
00363     {
00364         // Open the menu on F4
00365         OpenFlyout();
00366         args.Handled(true);
00367     }
00368 }
00369
00370 void SplitButton::UnregisterEvents()
00371 {
00372     // This explicitly unregisters all events related to the two buttons in OnApplyTemplate
00373     // in case the new template doesn't have all the expected elements.
00374
00375     m_clickPrimaryRevoker.revoke();
00376     m_pressedPrimaryRevoker.revoke();
00377     m_pointerOverPrimaryRevoker.revoke();
00378
00379     m_pointerEnteredPrimaryRevoker.revoke();
00380     m_pointerExitedPrimaryRevoker.revoke();
00381     m_pointerPressedPrimaryRevoker.revoke();
00382     m_pointerReleasedPrimaryRevoker.revoke();
00383     m_pointerCanceledPrimaryRevoker.revoke();
00384     m_pointerCaptureLostPrimaryRevoker.revoke();
00385
00386     m_clickSecondaryRevoker.revoke();
00387     m_pressedSecondaryRevoker.revoke();
00388     m_pointerOverSecondaryRevoker.revoke();
00389
00390     m_pointerEnteredSecondaryRevoker.revoke();
00391     m_pointerExitedSecondaryRevoker.revoke();
00392     m_pointerPressedSecondaryRevoker.revoke();
00393     m_pointerReleasedSecondaryRevoker.revoke();
00394     m_pointerCanceledSecondaryRevoker.revoke();
00395     m_pointerCaptureLostSecondaryRevoker.revoke();
00396 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BreadcrumbBar Member List

This is the complete list of members for BreadcrumbBar, including all inherited members.
abi_enter() | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
BreadcrumbBar() | BreadcrumbBar |
BreadcrumbBarProperties() | BreadcrumbBarProperties |
CheckThread() | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
ClearProperties() | BreadcrumbBarProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< BreadcrumbBar > &&self) noexcept | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline, static]
EnsureProperties() | BreadcrumbBarProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
final_release(std::unique_ptr< BreadcrumbBar > &&self) | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline, static]
FocusElementAt(int index) | BreadcrumbBar | [private]
ForceUpdateLastElement() | BreadcrumbBar | [private]
GetBase() | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
GetFindNextElementOptions() | BreadcrumbBar | [private]
GetHiddenElementsList(uint32_t firstShownElement) const | BreadcrumbBar | [private]
GetInner() | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
HiddenElements() const | BreadcrumbBar |
IsOnThread() | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
ItemClicked(winrt::TypedEventHandler< winrt::BreadcrumbBar, winrt::BreadcrumbBarItemClickedEventArgs > const &value) | BreadcrumbBarProperties |
ItemClicked(winrt::event_token const &token) | BreadcrumbBarProperties |
ItemsSource(winrt::IInspectable const &value) | BreadcrumbBarProperties |
ItemsSource() | BreadcrumbBarProperties |
ItemsSourceProperty() | BreadcrumbBarProperties | [inline, static]
ItemTemplate(winrt::IInspectable const &value) | BreadcrumbBarProperties |
ItemTemplate() | BreadcrumbBarProperties |
ItemTemplateProperty() | BreadcrumbBarProperties | [inline, static]
m_itemClickedEventSource | BreadcrumbBarProperties |
MoveFocus(int initialIndexIncrement) | BreadcrumbBar | [private]
MoveFocusNext() | BreadcrumbBar | [private]
MoveFocusPrevious() | BreadcrumbBar | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
OnAccessKeyInvoked(const winrt::UIElement &, const winrt::AccessKeyInvokedEventArgs &args) | BreadcrumbBar | [private]
OnApplyTemplate() | BreadcrumbBar |
OnBreadcrumbBarItemsRepeaterLoaded(const winrt::IInspectable &, const winrt::RoutedEventArgs &) | BreadcrumbBar | [private]
OnBreadcrumbBarItemsSourceCollectionChanged(const winrt::IInspectable &, const winrt::IInspectable &) | BreadcrumbBar | [private]
OnChildPreviewKeyDown(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | BreadcrumbBar | [private]
OnElementClearingEvent(const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementClearingEventArgs &) | BreadcrumbBar | [private]
OnElementIndexChangedEvent(const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementIndexChangedEventArgs &) | BreadcrumbBar | [private]
OnElementPreparedEvent(const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementPreparedEventArgs &) | BreadcrumbBar | [private]
OnFlowDirectionChanged(winrt::DependencyObject const &, winrt::DependencyProperty const &) | BreadcrumbBar | [private]
OnGettingFocus(const winrt::IInspectable &, const winrt::GettingFocusEventArgs &args) | BreadcrumbBar | [private]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | BreadcrumbBarProperties | [static]
OnItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | BreadcrumbBarProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | BreadcrumbBar |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
RaiseItemClickedEvent(const winrt::IInspectable &content, const uint32_t index) | BreadcrumbBar |
ReferenceTracker(Args &&...args) | ReferenceTracker< BreadcrumbBar, winrt::implementation::BreadcrumbBarT > | [inline]
ReIndexVisibleElementsForAccessibility() const | BreadcrumbBar |
ResetLastBreadcrumbBarItem() | BreadcrumbBar | [private]
RevokeListeners() | BreadcrumbBar |
s_ItemsSourceProperty | BreadcrumbBarProperties | [static]
s_ItemTemplateProperty | BreadcrumbBarProperties | [static]
UpdateBreadcrumbBarItemsFlowDirection() | BreadcrumbBar | [private]
UpdateEllipsisBreadcrumbBarItemDropDownItemTemplate() | BreadcrumbBar | [private]
UpdateItemsRepeaterItemsSource() | BreadcrumbBar | [private]
UpdateItemTemplate() | BreadcrumbBar | [private]
UpdateLastElement(const winrt::BreadcrumbBarItem &newLastBreadcrumbBarItem) | BreadcrumbBar | [private]
~BreadcrumbBar() | BreadcrumbBar | [inline]
Generated on Sun Dec 1 2024 20:52:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/ButtonInteractionInvokedEventArgs.h Source File

  • File List
  • File Members
  • Interactions
  • ButtonInteraction

ButtonInteractionInvokedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ButtonInteractionInvokedEventArgs.g.h"
00007
00008 class ButtonInteractionInvokedEventArgs :
00009     public ReferenceTracker<ButtonInteractionInvokedEventArgs, winrt::implementation::ButtonInteractionInvokedEventArgsT, winrt::composing, winrt::composable>
00010 {
00011 public:
00012     ButtonInteractionInvokedEventArgs(winrt::UIElement const& target);
00013
00014     winrt::UIElement Target();
00015
00016 private:
00017     tracker_ref<winrt::UIElement> m_target{ this };
00018 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ParallaxView Member List

This is the complete list of members for ParallaxView, including all inherited members.
abi_enter() | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
ArrangeOverride(winrt::Size const &finalSize) | ParallaxView |
CheckThread() | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
Child(winrt::UIElement const &value) | ParallaxViewProperties |
Child() | ParallaxViewProperties |
ChildProperty() | ParallaxViewProperties | [inline, static]
ClearProperties() | ParallaxViewProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< ParallaxView > &&self) noexcept | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline, static]
EnsureAnimatedVariables() | ParallaxView | [private]
EnsureProperties() | ParallaxViewProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
final_release(std::unique_ptr< ParallaxView > &&self) | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline, static]
GetBase() | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
GetInner() | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
GetVisualTargetedPropertyName(winrt::Orientation orientation) | ParallaxView | [private, static]
HookChildPropertyChanged(const winrt::FrameworkElement &child) | ParallaxView | [private]
HookLoaded() | ParallaxView | [private]
HookSizeChanged() | ParallaxView | [private]
HorizontalShift(double value) | ParallaxViewProperties |
HorizontalShift() | ParallaxViewProperties |
HorizontalShiftProperty() | ParallaxViewProperties | [inline, static]
HorizontalSourceEndOffset(double value) | ParallaxViewProperties |
HorizontalSourceEndOffset() | ParallaxViewProperties |
HorizontalSourceEndOffsetProperty() | ParallaxViewProperties | [inline, static]
HorizontalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const &value) | ParallaxViewProperties |
HorizontalSourceOffsetKind() | ParallaxViewProperties |
HorizontalSourceOffsetKindProperty() | ParallaxViewProperties | [inline, static]
HorizontalSourceStartOffset(double value) | ParallaxViewProperties |
HorizontalSourceStartOffset() | ParallaxViewProperties |
HorizontalSourceStartOffsetProperty() | ParallaxViewProperties | [inline, static]
IsHorizontalShiftClamped(bool value) | ParallaxViewProperties |
IsHorizontalShiftClamped() | ParallaxViewProperties |
IsHorizontalShiftClampedProperty() | ParallaxViewProperties | [inline, static]
IsOnThread() | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
IsVerticalShiftClamped(bool value) | ParallaxViewProperties |
IsVerticalShiftClamped() | ParallaxViewProperties |
IsVerticalShiftClampedProperty() | ParallaxViewProperties | [inline, static]
MaxHorizontalShiftRatio(double value) | ParallaxViewProperties |
MaxHorizontalShiftRatio() | ParallaxViewProperties |
MaxHorizontalShiftRatioProperty() | ParallaxViewProperties | [inline, static]
MaxVerticalShiftRatio(double value) | ParallaxViewProperties |
MaxVerticalShiftRatio() | ParallaxViewProperties |
MaxVerticalShiftRatioProperty() | ParallaxViewProperties | [inline, static]
MeasureOverride(winrt::Size const &availableSize) | ParallaxView |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
OnChildPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | ParallaxView | [private]
ParallaxViewProperties::OnChildPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalShiftPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalSourceEndOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalSourceOffsetKindPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnHorizontalSourceStartOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnIsHorizontalShiftClampedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnIsVerticalShiftClampedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | ParallaxView | [private]
OnMaxHorizontalShiftRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnMaxVerticalShiftRatioPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ParallaxView |
OnScrollInputHelperInfoChanged(bool horizontalInfoChanged, bool verticalInfoChanged) | ParallaxView |
OnSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | ParallaxView | [private]
OnSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalShiftPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalSourceEndOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalSourceOffsetKindPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
OnVerticalSourceStartOffsetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ParallaxViewProperties | [static]
ParallaxView() | ParallaxView |
ParallaxViewProperties() | ParallaxViewProperties |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ParallaxView, DeriveFromPanelHelper_base, winrt::ParallaxView > | [inline]
RefreshAutomaticHorizontalOffsets() | ParallaxView |
RefreshAutomaticVerticalOffsets() | ParallaxView |
s_ChildProperty | ParallaxViewProperties | [static]
s_HorizontalShiftProperty | ParallaxViewProperties | [static]
s_HorizontalSourceEndOffsetProperty | ParallaxViewProperties | [static]
s_HorizontalSourceOffsetKindProperty | ParallaxViewProperties | [static]
s_HorizontalSourceStartOffsetProperty | ParallaxViewProperties | [static]
s_IsHorizontalShiftClampedProperty | ParallaxViewProperties | [static]
s_IsVerticalShiftClampedProperty | ParallaxViewProperties | [static]
s_MaxHorizontalShiftRatioProperty | ParallaxViewProperties | [static]
s_MaxVerticalShiftRatioProperty | ParallaxViewProperties | [static]
s_SourceProperty | ParallaxViewProperties | [static]
s_VerticalShiftProperty | ParallaxViewProperties | [static]
s_VerticalSourceEndOffsetProperty | ParallaxViewProperties | [static]
s_VerticalSourceOffsetKindProperty | ParallaxViewProperties | [static]
s_VerticalSourceStartOffsetProperty | ParallaxViewProperties | [static]
Source(winrt::UIElement const &value) | ParallaxViewProperties |
Source() | ParallaxViewProperties |
SourceProperty() | ParallaxViewProperties | [inline, static]
UnhookChildPropertyChanged(bool isInDestructor) | ParallaxView | [private]
UpdateChild(const winrt::UIElement &oldChild, const winrt::UIElement &newChild) | ParallaxView | [private]
UpdateEndOffsetExpression(winrt::Orientation orientation) | ParallaxView | [private]
UpdateExpressionAnimation(winrt::Orientation orientation) | ParallaxView | [private]
UpdateStartOffsetExpression(winrt::Orientation orientation) | ParallaxView | [private]
VerticalShift(double value) | ParallaxViewProperties |
VerticalShift() | ParallaxViewProperties |
VerticalShiftProperty() | ParallaxViewProperties | [inline, static]
VerticalSourceEndOffset(double value) | ParallaxViewProperties |
VerticalSourceEndOffset() | ParallaxViewProperties |
VerticalSourceEndOffsetProperty() | ParallaxViewProperties | [inline, static]
VerticalSourceOffsetKind(winrt::ParallaxSourceOffsetKind const &value) | ParallaxViewProperties |
VerticalSourceOffsetKind() | ParallaxViewProperties |
VerticalSourceOffsetKindProperty() | ParallaxViewProperties | [inline, static]
VerticalSourceStartOffset(double value) | ParallaxViewProperties |
VerticalSourceStartOffset() | ParallaxViewProperties |
VerticalSourceStartOffsetProperty() | ParallaxViewProperties | [inline, static]
~ParallaxView() | ParallaxView |
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ISpotDiffuseEffect Member List

This is the complete list of members for ISpotDiffuseEffect, including all inherited members.
DiffuseAmount([out, retval] float *value) | ISpotDiffuseEffect
DiffuseAmount([in] float value) | ISpotDiffuseEffect
Focus([out, retval] float *value) | ISpotDiffuseEffect
Focus([in] float value) | ISpotDiffuseEffect
HeightMapInterpolationMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation *value) | ISpotDiffuseEffect
HeightMapInterpolationMode([in] Microsoft.UI.Private.Composition.Effects.CanvasImageInterpolation value) | ISpotDiffuseEffect
HeightMapKernelSize([out, retval] Windows.Foundation.Numerics.Vector2 *value) | ISpotDiffuseEffect
HeightMapKernelSize([in] Windows.Foundation.Numerics.Vector2 value) | ISpotDiffuseEffect
HeightMapScale([out, retval] float *value) | ISpotDiffuseEffect
HeightMapScale([in] float value) | ISpotDiffuseEffect
LightColor([out, retval] Windows.UI.Color *value) | ISpotDiffuseEffect
LightColor([in] Windows.UI.Color value) | ISpotDiffuseEffect
LightPosition([out, retval] Windows.Foundation.Numerics.Vector3 *value) | ISpotDiffuseEffect
LightPosition([in] Windows.Foundation.Numerics.Vector3 value) | ISpotDiffuseEffect
LightTarget([out, retval] Windows.Foundation.Numerics.Vector3 *value) | ISpotDiffuseEffect
LightTarget([in] Windows.Foundation.Numerics.Vector3 value) | ISpotDiffuseEffect
LimitingConeAngle([out, retval] float *value) | ISpotDiffuseEffect
LimitingConeAngle([in] float value) | ISpotDiffuseEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ISpotDiffuseEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ISpotDiffuseEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RevealListViewItemPresenter.properties.cpp Source File

  • File List
  • File Members
  • Generated

RevealListViewItemPresenter.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RevealListViewItemPresenter.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RevealListViewItemPresenter)
00012 }
00013
00014 #include "RevealListViewItemPresenter.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ResourceHelper/ResourceAccessor.h Source File

  • File List
  • File Members
  • ResourceHelper

ResourceAccessor.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007
00008 /// <summary>
00009 /// Resource Accessor
00010 /// </summary>
00011 class ResourceAccessor sealed
00012 {
00013 private:
00014     /// <summary>
00015     /// Declare a private constructor to prevent instance creation.
00016     /// </summary>
00017     ResourceAccessor() = delete;
00018
00019     /// <summary>
00020     /// String containing the resource location
00021     /// </summary>
00022     static PCWSTR c_resourceLoc;
00023     static PCWSTR c_assetLoc;
00024     static PCWSTR c_resourceLocWinUI;
00025
00026     static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap GetAssetMap();
00027     static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceMap GetResourceMap();
00028     static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager GetResourceManagerImpl();
00029     static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager GetResourceManager();
00030     static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceContext GetResourceContext();
00031     static winrt::Microsoft::Windows::ApplicationModel::Resources::ResourceManager m_resourceManagerWinRT;
00032 public:
00033     static winrt::hstring GetLocalizedStringResource(const wstring_view &resourceName);
00034     static winrt::LoadedImageSurface GetImageSurface(const wstring_view &assetName, winrt::Size imageSize);
00035     static winrt::Windows::Foundation::IAsyncOperation<winrt::hstring> GetFileContents(const wstring_view& assetFileName);
00036     static winrt::IInspectable ResourceLookup(const winrt::Control& control, const winrt::IInspectable& key);
00037
00038     static bool IsResourceIdNull(ResourceIdType resourceId)
00039     {
00040         return resourceId.size() == 0;
00041     }
00042 };
00043
00044 #define SR_BasicRatingString L"BasicRatingString"
00045 #define SR_CommunityRatingString L"CommunityRatingString"
00046 #define SR_RatingsControlName L"RatingsControlName"
00047 #define SR_RatingControlName L"RatingControlName"
00048 #define SR_RatingUnset L"RatingUnset"
00049 #define SR_NavigationButtonToggleName L"NavigationButtonToggleName"
00050 #define SR_NavigationButtonClosedName L"NavigationButtonClosedName"
00051 #define SR_NavigationButtonOpenName L"NavigationButtonOpenName"
00052 #define SR_NavigationViewItemDefaultControlName L"NavigationViewItemDefaultControlName"
00053 #define SR_NavigationBackButtonName L"NavigationBackButtonName"
00054 #define SR_NavigationBackButtonToolTip L"NavigationBackButtonToolTip"
00055 #define SR_NavigationCloseButtonName L"NavigationCloseButtonName"
00056 #define SR_NavigationOverflowButtonName L"NavigationOverflowButtonName"
00057 #define SR_NavigationOverflowButtonText L"NavigationOverflowButtonText"
00058 #define SR_NavigationOverflowButtonToolTip L"NavigationOverflowButtonToolTip"
00059 #define SR_SettingsButtonName L"SettingsButtonName"
00060 #define SR_NavigationViewSearchButtonName L"NavigationViewSearchButtonName"
00061 #define SR_TextAlphaLabel L"TextAlphaLabel"
00062 #define SR_AutomationNameAlphaSlider L"AutomationNameAlphaSlider"
00063 #define SR_AutomationNameAlphaTextBox L"AutomationNameAlphaTextBox"
00064 #define SR_AutomationNameHueSlider L"AutomationNameHueSlider"
00065 #define SR_AutomationNameSaturationSlider L"AutomationNameSaturationSlider"
00066 #define SR_AutomationNameValueSlider L"AutomationNameValueSlider"
00067 #define SR_TextBlueLabel L"TextBlueLabel"
00068 #define SR_AutomationNameBlueTextBox L"AutomationNameBlueTextBox"
00069 #define SR_AutomationNameColorModelComboBox L"AutomationNameColorModelComboBox"
00070 #define SR_AutomationNameColorSpectrum L"AutomationNameColorSpectrum"
00071 #define SR_TextGreenLabel L"TextGreenLabel"
00072 #define SR_AutomationNameGreenTextBox L"AutomationNameGreenTextBox"
00073 #define SR_HelpTextColorSpectrum L"HelpTextColorSpectrum"
00074 #define SR_AutomationNameRGBHexTextBox L"AutomationNameRGBHexTextBox"
00075 #define SR_AutomationNameHSVHexTextBox L"AutomationNameHSVHexTextBox"
00076 #define SR_ContentHSVComboBoxItem L"ContentHSVComboBoxItem"
00077 #define SR_TextHueLabel L"TextHueLabel"
00078 #define SR_AutomationNameHueTextBox L"AutomationNameHueTextBox"
00079 #define SR_LocalizedControlTypeColorSpectrum L"LocalizedControlTypeColorSpectrum"
00080 #define SR_TextRedLabel L"TextRedLabel"
00081 #define SR_AutomationNameRedTextBox L"AutomationNameRedTextBox"
00082 #define SR_ContentRGBComboBoxItem L"ContentRGBComboBoxItem"
00083 #define SR_TextSaturationLabel L"TextSaturationLabel"
00084 #define SR_AutomationNameSaturationTextBox L"AutomationNameSaturationTextBox"
00085 #define SR_TextValueLabel L"TextValueLabel"
00086 #define SR_ValueStringColorSpectrumWithColorName L"ValueStringColorSpectrumWithColorName"
00087 #define SR_ValueStringColorSpectrumWithoutColorName L"ValueStringColorSpectrumWithoutColorName"
00088 #define SR_ValueStringHueSliderWithColorName L"ValueStringHueSliderWithColorName"
00089 #define SR_ValueStringHueSliderWithoutColorName L"ValueStringHueSliderWithoutColorName"
00090 #define SR_ValueStringSaturationSliderWithColorName L"ValueStringSaturationSliderWithColorName"
00091 #define SR_ValueStringSaturationSliderWithoutColorName L"ValueStringSaturationSliderWithoutColorName"
00092 #define SR_ValueStringValueSliderWithColorName L"ValueStringValueSliderWithColorName"
00093 #define SR_ValueStringValueSliderWithoutColorName L"ValueStringValueSliderWithoutColorName"
00094 #define SR_AutomationNameValueTextBox L"AutomationNameValueTextBox"
00095 #define SR_ToolTipStringAlphaSlider L"ToolTipStringAlphaSlider"
00096 #define SR_ToolTipStringHueSliderWithColorName L"ToolTipStringHueSliderWithColorName"
00097 #define SR_ToolTipStringHueSliderWithoutColorName L"ToolTipStringHueSliderWithoutColorName"
00098 #define SR_ToolTipStringSaturationSliderWithColorName L"ToolTipStringSaturationSliderWithColorName"
00099 #define SR_ToolTipStringSaturationSliderWithoutColorName L"ToolTipStringSaturationSliderWithoutColorName"
00100 #define SR_ToolTipStringValueSliderWithColorName L"ToolTipStringValueSliderWithColorName"
00101 #define SR_ToolTipStringValueSliderWithoutColorName L"ToolTipStringValueSliderWithoutColorName"
00102 #define SR_AutomationNameMoreButtonCollapsed L"AutomationNameMoreButtonCollapsed"
00103 #define SR_AutomationNameMoreButtonExpanded L"AutomationNameMoreButtonExpanded"
00104 #define SR_HelpTextMoreButton L"HelpTextMoreButton"
00105 #define SR_TextMoreButtonLabelCollapsed L"TextMoreButtonLabelCollapsed"
00106 #define SR_TextMoreButtonLabelExpanded L"TextMoreButtonLabelExpanded"
00107 #define SR_BadgeItemPlural1 L"BadgeItemPlural1"
00108 #define SR_BadgeItemPlural2 L"BadgeItemPlural2"
00109 #define SR_BadgeItemPlural3 L"BadgeItemPlural3"
00110 #define SR_BadgeItemPlural4 L"BadgeItemPlural4"
00111 #define SR_BadgeItemPlural5 L"BadgeItemPlural5"
00112 #define SR_BadgeItemPlural6 L"BadgeItemPlural6"
00113 #define SR_BadgeItemPlural7 L"BadgeItemPlural7"
00114 #define SR_BadgeItemSingular L"BadgeItemSingular"
00115 #define SR_BadgeItemTextOverride L"BadgeItemTextOverride"
00116 #define SR_BadgeIcon L"BadgeIcon"
00117 #define SR_BadgeIconTextOverride L"BadgeIconTextOverride"
00118 #define SR_PersonName L"PersonName"
00119 #define SR_GroupName L"GroupName"
00120 #define SR_CancelDraggingString L"CancelDraggingString"
00121 #define SR_DefaultItemString L"DefaultItemString"
00122 #define SR_DropIntoNodeString L"DropIntoNodeString"
00123 #define SR_FallBackPlaceString L"FallBackPlaceString"
00124 #define SR_PagerControlPageTextName L"PagerControlPageText"
00125 #define SR_PagerControlPrefixTextName L"PagerControlPrefixText"
00126 #define SR_PagerControlSuffixTextName L"PagerControlSuffixText"
00127 #define SR_PagerControlFirstPageButtonTextName L"PagerControlFirstPageButtonText"
00128 #define SR_PagerControlPreviousPageButtonTextName L"PagerControlPreviousPageButtonText"
00129 #define SR_PagerControlNextPageButtonTextName L"PagerControlNextPageButtonText"
00130 #define SR_PagerControlLastPageButtonTextName L"PagerControlLastPageButtonText"
00131 #define SR_PipsPagerNameText L"PipsPagerNameText"
00132 #define SR_PipsPagerNextPageButtonText L"PipsPagerNextPageButtonText"
00133 #define SR_PipsPagerPreviousPageButtonText L"PipsPagerPreviousPageButtonText"
00134 #define SR_PipsPagerPageText L"PipsPagerPageText"
00135 #define SR_PlaceAfterString L"PlaceAfterString"
00136 #define SR_PlaceBeforeString L"PlaceBeforeString"
00137 #define SR_PlaceBetweenString L"PlaceBetweenString"
00138 #define SR_ProgressRingName L"ProgressRingName"
00139 #define SR_ProgressRingIndeterminateStatus L"ProgressRingIndeterminateStatus"
00140 #define SR_ProgressBarIndeterminateStatus L"ProgressBarIndeterminateStatus"
00141 #define SR_ProgressBarPausedStatus L"ProgressBarPausedStatus"
00142 #define SR_ProgressBarErrorStatus L"ProgressBarErrorStatus"
00143 #define SR_RatingLocalizedControlType L"RatingLocalizedControlType"
00144 #define SR_BreadcrumbBarItemLocalizedControlType L"BreadcrumbBarItemLocalizedControlType"
00145 #define SR_SplitButtonSecondaryButtonName L"SplitButtonSecondaryButtonName"
00146 #define SR_ProofingMenuItemLabel L"ProofingMenuItemLabel"
00147 #define SR_TextCommandLabelCut L"TextCommandLabelCut"
00148 #define SR_TextCommandLabelCopy L"TextCommandLabelCopy"
00149 #define SR_TextCommandLabelPaste L"TextCommandLabelPaste"
00150 #define SR_TextCommandLabelSelectAll L"TextCommandLabelSelectAll"
00151 #define SR_TextCommandLabelBold L"TextCommandLabelBold"
00152 #define SR_TextCommandLabelItalic L"TextCommandLabelItalic"
00153 #define SR_TextCommandLabelUnderline L"TextCommandLabelUnderline"
00154 #define SR_TextCommandLabelUndo L"TextCommandLabelUndo"
00155 #define SR_TextCommandLabelRedo L"TextCommandLabelRedo"
00156 #define SR_TextCommandDescriptionCut L"TextCommandDescriptionCut"
00157 #define SR_TextCommandDescriptionCopy L"TextCommandDescriptionCopy"
00158 #define SR_TextCommandDescriptionPaste L"TextCommandDescriptionPaste"
00159 #define SR_TextCommandDescriptionSelectAll L"TextCommandDescriptionSelectAll"
00160 #define SR_TextCommandDescriptionBold L"TextCommandDescriptionBold"
00161 #define SR_TextCommandDescriptionItalic L"TextCommandDescriptionItalic"
00162 #define SR_TextCommandDescriptionUnderline L"TextCommandDescriptionUnderline"
00163 #define SR_TextCommandDescriptionUndo L"TextCommandDescriptionUndo"
00164 #define SR_TextCommandDescriptionRedo L"TextCommandDescriptionRedo"
00165 #define SR_TextCommandKeyboardAcceleratorKeyCut L"TextCommandKeyboardAcceleratorKeyCut"
00166 #define SR_TextCommandKeyboardAcceleratorKeyCopy L"TextCommandKeyboardAcceleratorKeyCopy"
00167 #define SR_TextCommandKeyboardAcceleratorKeyPaste L"TextCommandKeyboardAcceleratorKeyPaste"
00168 #define SR_TextCommandKeyboardAcceleratorKeySelectAll L"TextCommandKeyboardAcceleratorKeySelectAll"
00169 #define SR_TextCommandKeyboardAcceleratorKeyBold L"TextCommandKeyboardAcceleratorKeyBold"
00170 #define SR_TextCommandKeyboardAcceleratorKeyItalic L"TextCommandKeyboardAcceleratorKeyItalic"
00171 #define SR_TextCommandKeyboardAcceleratorKeyUnderline L"TextCommandKeyboardAcceleratorKeyUnderline"
00172 #define SR_TextCommandKeyboardAcceleratorKeyUndo L"TextCommandKeyboardAcceleratorKeyUndo"
00173 #define SR_TextCommandKeyboardAcceleratorKeyRedo L"TextCommandKeyboardAcceleratorKeyRedo"
00174 #define SR_TeachingTipAlternateCloseButtonName L"TeachingTipAlternateCloseButtonName"
00175 #define SR_TeachingTipAlternateCloseButtonTooltip L"TeachingTipAlternateCloseButtonTooltip"
00176 #define SR_TeachingTipCustomLandmarkName L"TeachingTipCustomLandmarkName"
00177 #define SR_TeachingTipNotification L"TeachingTipNotification"
00178 #define SR_TeachingTipNotificationWithoutAppName L"TeachingTipNotificationWithoutAppName"
00179 #define SR_TabViewAddButtonName L"TabViewAddButtonName"
00180 #define SR_TabViewAddButtonTooltip L"TabViewAddButtonTooltip"
00181 #define SR_TabViewCloseButtonName L"TabViewCloseButtonName"
00182 #define SR_TabViewCloseButtonTooltip L"TabViewCloseButtonTooltip"
00183 #define SR_TabViewCloseButtonTooltipWithKA L"TabViewCloseButtonTooltipWithKA"
00184 #define SR_TabViewScrollDecreaseButtonTooltip L"TabViewScrollDecreaseButtonTooltip"
00185 #define SR_TabViewScrollIncreaseButtonTooltip L"TabViewScrollIncreaseButtonTooltip"
00186 #define SR_NumberBoxUpSpinButtonName L"NumberBoxUpSpinButtonName"
00187 #define SR_NumberBoxDownSpinButtonName L"NumberBoxDownSpinButtonName"
00188 #define SR_NumberBoxMaximumValueStatus L"NumberBoxMaximumValueStatus"
00189 #define SR_NumberBoxMinimumValueStatus L"NumberBoxMinimumValueStatus"
00190 #define SR_ExpanderDefaultControlName L"ExpanderDefaultControlName"
00191 #define SR_ItemContainerDefaultControlName L"ItemContainerDefaultControlName"
00192 #define SR_SelectorBarItemDefaultControlName L"SelectorBarItemDefaultControlName"
00193
00194 #define SR_InfoBarCloseButtonName L"InfoBarCloseButtonName"
00195 #define SR_InfoBarOpenedNotification L"InfoBarOpenedNotification"
00196 #define SR_InfoBarClosedNotification L"InfoBarClosedNotification"
00197 #define SR_InfoBarCustomLandmarkName L"InfoBarCustomLandmarkName"
00198 #define SR_InfoBarCloseButtonTooltip L"InfoBarCloseButtonTooltip"
00199 #define SR_InfoBarSeverityInformationalName L"InfoBarSeverityInformationalName"
00200 #define SR_InfoBarSeveritySuccessName L"InfoBarSeveritySuccessName"
00201 #define SR_InfoBarSeverityWarningName L"InfoBarSeverityWarningName"
00202 #define SR_InfoBarSeverityErrorName L"InfoBarSeverityErrorName"
00203 #define SR_InfoBarIconSeverityInformationalName L"InfoBarIconSeverityInformationalName"
00204 #define SR_InfoBarIconSeveritySuccessName L"InfoBarIconSeveritySuccessName"
00205 #define SR_InfoBarIconSeverityWarningName L"InfoBarIconSeverityWarningName"
00206 #define SR_InfoBarIconSeverityErrorName L"InfoBarIconSeverityErrorName"
00207
00208 #define SR_AutomationNameEllipsisBreadcrumbBarItem L"AutomationNameEllipsisBreadcrumbBarItem"
00209
00210 #define SR_CommandBarFlyoutCommandBarLocalizedControlType L"CommandBarFlyoutCommandBarLocalizedControlType"
00211 #define SR_CommandBarFlyoutAppBarButtonLocalizedControlType L"CommandBarFlyoutAppBarButtonLocalizedControlType"
00212 #define SR_CommandBarFlyoutAppBarToggleButtonLocalizedControlType L"CommandBarFlyoutAppBarToggleButtonLocalizedControlType"
00213
00214 #define SR_WarningSuitableWebView2NotFound L"WarningSuitableWebView2NotFound"
00215 #define SR_DownloadWebView2Runtime L"DownloadWebView2Runtime"
00216
00217 #define IR_NoiseAsset_256X256_PNG L"NoiseAsset_256X256_PNG"
00218
00219 #define FR_Map_Html L"map.html"
Generated on Sun Dec 1 2024 20:52:12 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterScrollHost::CandidateInfo Member List

This is the complete list of members for ItemsRepeaterScrollHost::CandidateInfo, including all inherited members.
CandidateInfo(const ITrackerHandleManager *owner, winrt::UIElement element) | ItemsRepeaterScrollHost::CandidateInfo | [inline]
Element() const | ItemsRepeaterScrollHost::CandidateInfo | [inline]
IsRelativeBoundsSet() const | ItemsRepeaterScrollHost::CandidateInfo | [inline]
m_element | ItemsRepeaterScrollHost::CandidateInfo | [private]
RelativeBounds() const | ItemsRepeaterScrollHost::CandidateInfo | [inline]
RelativeBounds(winrt::Rect bounds) | ItemsRepeaterScrollHost::CandidateInfo | [inline]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/ParallaxView.idl Source File

  • File List
  • File Members
  • ParallaxView

ParallaxView.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 enum ParallaxSourceOffsetKind
00007 {
00008     Absolute = 0,
00009     Relative = 1,
00010 };
00011
00012 [MUX_PUBLIC]
00013 [webhosthidden]
00014 [contentproperty("Child")]
00015 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00016 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00017 unsealed runtimeclass ParallaxView : Microsoft.UI.Xaml.FrameworkElement
00018 {
00019     ParallaxView();
00020
00021     Microsoft.UI.Xaml.UIElement Child { get; set; };
00022     Double HorizontalShift { get; set; };
00023     Double HorizontalSourceEndOffset { get; set; };
00024     [MUX_DEFAULT_VALUE("winrt::ParallaxSourceOffsetKind::Relative")]
00025     ParallaxSourceOffsetKind HorizontalSourceOffsetKind { get; set; };
00026     Double HorizontalSourceStartOffset { get; set; };
00027     [MUX_DEFAULT_VALUE("true")]
00028     Boolean IsHorizontalShiftClamped { get; set; };
00029     [MUX_DEFAULT_VALUE("true")]
00030     Boolean IsVerticalShiftClamped { get; set; };
00031     [MUX_DEFAULT_VALUE("1.0")]
00032     Double MaxHorizontalShiftRatio { get; set; };
00033     [MUX_DEFAULT_VALUE("1.0")]
00034     Double MaxVerticalShiftRatio { get; set; };
00035     Microsoft.UI.Xaml.UIElement Source { get; set; };
00036     Double VerticalShift { get; set; };
00037     Double VerticalSourceEndOffset { get; set; };
00038     [MUX_DEFAULT_VALUE("winrt::ParallaxSourceOffsetKind::Relative")]
00039     ParallaxSourceOffsetKind VerticalSourceOffsetKind { get; set; };
00040     Double VerticalSourceStartOffset { get; set; };
00041     void RefreshAutomaticHorizontalOffsets();
00042     void RefreshAutomaticVerticalOffsets();
00043
00044     static Microsoft.UI.Xaml.DependencyProperty ChildProperty { get; };
00045     static Microsoft.UI.Xaml.DependencyProperty HorizontalSourceEndOffsetProperty { get; };
00046     static Microsoft.UI.Xaml.DependencyProperty HorizontalSourceOffsetKindProperty { get; };
00047     static Microsoft.UI.Xaml.DependencyProperty HorizontalSourceStartOffsetProperty { get; };
00048     static Microsoft.UI.Xaml.DependencyProperty MaxHorizontalShiftRatioProperty { get; };
00049     static Microsoft.UI.Xaml.DependencyProperty HorizontalShiftProperty { get; };
00050     static Microsoft.UI.Xaml.DependencyProperty IsHorizontalShiftClampedProperty { get; };
00051     static Microsoft.UI.Xaml.DependencyProperty IsVerticalShiftClampedProperty { get; };
00052     static Microsoft.UI.Xaml.DependencyProperty SourceProperty { get; };
00053     static Microsoft.UI.Xaml.DependencyProperty VerticalSourceEndOffsetProperty { get; };
00054     static Microsoft.UI.Xaml.DependencyProperty VerticalSourceOffsetKindProperty { get; };
00055     static Microsoft.UI.Xaml.DependencyProperty VerticalSourceStartOffsetProperty { get; };
00056     static Microsoft.UI.Xaml.DependencyProperty MaxVerticalShiftRatioProperty { get; };
00057     static Microsoft.UI.Xaml.DependencyProperty VerticalShiftProperty { get; };
00058 }
00059
00060 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarBallpointPenButton.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarBallpointPenButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarBallpointPenButton.g.h"
00011
00012 #include "InkToolBarPenButton.h"
00013
00014 class InkToolBarBallpointPenButton :
00015     public winrt::implementation::InkToolBarBallpointPenButtonT<InkToolBarBallpointPenButton, InkToolBarPenButton>
00016 {
00017 public:
00018     ForwardRefToBaseReferenceTracker(InkToolBarPenButton)
00019 };
00020
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlAutomationPeer.idl Source File

  • File List
  • File Members
  • PagerControl

PagerControlAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PREVIEW]
00005 [webhosthidden]
00006 unsealed runtimeclass PagerControlAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00007 {
00008     PagerControlAutomationPeer(MU_XC_NAMESPACE.PagerControl owner);
00009 }
00010
00011 }
00012
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtons.h Source File

  • File List
  • File Members
  • RadioButtons

RadioButtons.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007
00008 #include "RadioButtonsElementFactory.h"
00009 #include "RadioButtons.g.h"
00010 #include "RadioButtons.properties.h"
00011 #include "ColumnMajorUniformToLargestGridLayout.h"
00012
00013 // This is an object that RadioButtons intends to attach to its child RadioButton elements.
00014 // It contains the revokers for the events on RadioButton that RadioButttons listens to
00015 // in order to manage selection.  Attaching the revokers to the object allows the parent
00016 // RadioButtons the ability to "Set it and forget it" since the lifetime of the RadioButton
00017 // and these event registrations are now intrically linked.
00018 class ChildHandlers : public winrt::implements<ChildHandlers, winrt::IInspectable>
00019 {
00020 public:
00021     winrt::ToggleButton::Checked_revoker checkedRevoker;
00022     winrt::ToggleButton::Unchecked_revoker uncheckedRevoker;
00023 };
00024
00025 class RadioButtons :
00026     public ReferenceTracker<RadioButtons, winrt::implementation::RadioButtonsT>,
00027     public RadioButtonsProperties
00028 {
00029
00030 public:
00031     RadioButtons();
00032
00033     // IUIElement
00034     virtual winrt::AutomationPeer OnCreateAutomationPeer();
00035
00036     // IFrameworkElement
00037     void OnApplyTemplate();
00038
00039     winrt::UIElement ContainerFromIndex(int index);
00040
00041     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00042
00043     GlobalDependencyProperty s_childHandlersProperty{ nullptr };
00044
00045     //Test hooks helpers, only function while m_testHooksEnabled = true
00046     void SetTestHooksEnabled(bool enabled);
00047     ~RadioButtons();
00048     int GetRows();
00049     int GetColumns();
00050     int GetLargerColumns();
00051
00052 private:
00053
00054     void OnGettingFocus(const winrt::IInspectable&, const winrt::GettingFocusEventArgs& args);
00055     void OnRepeaterLoaded(const winrt::IInspectable&, const winrt::RoutedEventArgs&);
00056     void OnRepeaterElementPrepared(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementPreparedEventArgs& args);
00057     void OnRepeaterElementClearing(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementClearingEventArgs& args);
00058     void OnRepeaterElementIndexChanged(const winrt::ItemsRepeater&, const winrt::ItemsRepeaterElementIndexChangedEventArgs& args);
00059     void OnRepeaterCollectionChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00060     void OnChildChecked(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00061     void OnChildUnchecked(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
00062     void OnChildPreviewKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args);
00063     void OnAccessKeyInvoked(const winrt::UIElement&, const winrt::AccessKeyInvokedEventArgs& args);
00064
00065     void OnIsEnabledChanged(const winrt::IInspectable&, const winrt::DependencyPropertyChangedEventArgs&);
00066     void UpdateVisualStateForIsEnabledChange();
00067
00068     void UpdateItemsSource();
00069     winrt::IInspectable GetItemsSource();
00070
00071     void UpdateSelectedIndex();
00072     void UpdateSelectedItem();
00073
00074     void Select(int index);
00075     winrt::IInspectable GetDataAtIndex(int index, bool containerIsChecked);
00076
00077     void UpdateItemTemplate();
00078
00079     winrt::FindNextElementOptions GetFindNextElementOptions(bool useThisAsSearchRoot);
00080     bool MoveFocusNext();
00081     bool MoveFocusPrevious();
00082     bool MoveFocus(int initialIndexIncrement);
00083     bool HandleEdgeCaseFocus(bool first, const winrt::IInspectable& source);
00084
00085     int m_selectedIndex{ -1 };
00086     // This is used to guard against reentrency when calling select, since select changes
00087     // the Selected Index/Item which in turn calls select.
00088     bool m_currentlySelecting{ false };
00089     // We block selection before the control has loaded.
00090     // This is to ensure that we do not overwrite a provided Selected Index/Item value.
00091     bool m_blockSelecting{ true };
00092
00093     tracker_ref<winrt::ItemsRepeater> m_repeater{ this };
00094
00095     com_ptr<RadioButtonsElementFactory> m_radioButtonsElementFactory{ nullptr };
00096
00097     winrt::Control::Loaded_revoker m_repeaterLoadedRevoker{};
00098     winrt::Control::IsEnabledChanged_revoker m_isEnabledChangedRevoker{};
00099     winrt::ItemsSourceView::CollectionChanged_revoker m_itemsSourceChanged{};
00100     winrt::ItemsRepeater::ElementPrepared_revoker m_repeaterElementPreparedRevoker{};
00101     winrt::ItemsRepeater::ElementClearing_revoker m_repeaterElementClearingRevoker{};
00102     winrt::ItemsRepeater::ElementIndexChanged_revoker m_repeaterElementIndexChangedRevoker{};
00103
00104     //Test hooks helpers, only function while m_testHooksEnabled == true
00105     bool m_testHooksEnabled{ false };
00106     void OnLayoutChanged(const winrt::ColumnMajorUniformToLargestGridLayout&, const winrt::IInspectable&);
00107     winrt::event_token m_layoutChangedToken{};
00108     void AttachToLayoutChanged();
00109     void DetatchFromLayoutChanged();
00110     com_ptr<ColumnMajorUniformToLargestGridLayout> GetLayout();
00111
00112     static constexpr wstring_view s_repeaterName{ L"InnerRepeater"sv };
00113     static constexpr wstring_view s_childHandlersPropertyName{ L"ChildHandlers"sv };
00114 };
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuBarItemFlyout Member List

This is the complete list of members for MenuBarItemFlyout, including all inherited members.
abi_enter() | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
CheckThread() | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
CreatePresenter() | MenuBarItemFlyout |
DeleteInstanceOnUIThread(std::unique_ptr< MenuBarItemFlyout > &&self) noexcept | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
final_release(std::unique_ptr< MenuBarItemFlyout > &&self) | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline, static]
GetBase() | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
GetInner() | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
IsOnThread() | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
OnPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MenuBarItemFlyout | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MenuBarItemFlyout, winrt::implementation::MenuBarItemFlyoutT > | [inline]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedFindVisualSource.h Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedFindVisualSource.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 //------------------------------------------------------------------------------
00003 // <auto-generated>
00004 //     This code was generated by a tool.
00005 //
00006 //       LottieGen version:
00007 //           7.1.0+ge1fa92580f
00008 //
00009 //       Command:
00010 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedFindVisualSource.json
00011 //
00012 //       Input file:
00013 //           AnimatedFindVisualSource.json (14456 bytes created 23:37-07:00 Oct 5 2021)
00014 //
00015 //       LottieGen source:
00016 //           http://aka.ms/Lottie
00017 //
00018 //     Changes to this file may cause incorrect behavior and will be lost if
00019 //     the code is regenerated.
00020 // </auto-generated>
00021 //------------------------------------------------------------------------------
00022 #include "common.h"
00023 #include "AnimatedVisuals\AnimatedFindVisualSource.g.h"
00024
00025 // Name:        Controls_05_Search
00026 // Frame rate:  60 fps
00027 // Frame count: 80
00028 // Duration:    1333.3 mS
00029 // _____________________________________________________________________________________________
00030 // |           Marker           |           Constant           | Frame |   mS   |   Progress   |
00031 // |____________________________|______________________________|_______|________|______________|
00032 // | NormalToPointerOver_Start  | M_NormalToPointerOver_Start  |     0 |    0.0 | 0.0F         |
00033 // | NormalToPointerOver_End    | M_NormalToPointerOver_End    |     9 |  150.0 | 0.113124996F |
00034 // | NormalToPressed_Start      | M_NormalToPressed_Start      |    10 |  166.7 | 0.125624999F |
00035 // | NormalToPressed_End        | M_NormalToPressed_End        |    19 |  316.7 | 0.238124996F |
00036 // | PointerOverToNormal_Start  | M_PointerOverToNormal_Start  |    20 |  333.3 | 0.250625014F |
00037 // | PointerOverToNormal_End    | M_PointerOverToNormal_End    |    29 |  483.3 | 0.363124996F |
00038 // | PointerOverToPressed_Start | M_PointerOverToPressed_Start |    30 |  500.0 | 0.375625014F |
00039 // | PointerOverToPressed_End   | M_PointerOverToPressed_End   |    39 |  650.0 | 0.488124996F |
00040 // | PressedToNormal_Start      | M_PressedToNormal_Start      |    40 |  666.7 | 0.500625014F |
00041 // | PressedToNormal_End        | M_PressedToNormal_End        |    59 |  983.3 | 0.738125026F |
00042 // | PressedToPointerOver_Start | M_PressedToPointerOver_Start |    60 | 1000.0 | 0.750625014F |
00043 // | PressedToPointerOver_End   | M_PressedToPointerOver_End   |    79 | 1316.7 | 0.988125026F |
00044 // ---------------------------------------------------------------------------------------------
00045 // _________________________________________________________
00046 // | Theme property |  Accessor  | Type  |  Default value  |
00047 // |________________|____________|_______|_________________|
00048 // | Foreground     | Foreground | Color | #FF000000 Black |
00049 // ---------------------------------------------------------
00050 class AnimatedFindVisualSource
00051     : public winrt::implementation::AnimatedFindVisualSourceT<AnimatedFindVisualSource>
00052 {
00053     winrt::Microsoft::UI::Composition::CompositionPropertySet _themeProperties{ nullptr };
00054     winrt::Windows::UI::Color _themeForeground{ 0xFF, 0x00, 0x00, 0x00 };
00055     winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00056
00057     static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4(winrt::Windows::UI::Color color);
00058 public:
00059     // Animation duration: 1.333 seconds.
00060     static constexpr int64_t c_durationTicks{ 13333333L };
00061
00062     // Marker: NormalToPointerOver_Start.
00063     static constexpr float M_NormalToPointerOver_Start{ 0.0F };
00064
00065     // Marker: NormalToPointerOver_End.
00066     static constexpr float M_NormalToPointerOver_End{ 0.113124996F };
00067
00068     // Marker: NormalToPressed_Start.
00069     static constexpr float M_NormalToPressed_Start{ 0.125624999F };
00070
00071     // Marker: NormalToPressed_End.
00072     static constexpr float M_NormalToPressed_End{ 0.238124996F };
00073
00074     // Marker: PointerOverToNormal_Start.
00075     static constexpr float M_PointerOverToNormal_Start{ 0.250625014F };
00076
00077     // Marker: PointerOverToNormal_End.
00078     static constexpr float M_PointerOverToNormal_End{ 0.363124996F };
00079
00080     // Marker: PointerOverToPressed_Start.
00081     static constexpr float M_PointerOverToPressed_Start{ 0.375625014F };
00082
00083     // Marker: PointerOverToPressed_End.
00084     static constexpr float M_PointerOverToPressed_End{ 0.488124996F };
00085
00086     // Marker: PressedToNormal_Start.
00087     static constexpr float M_PressedToNormal_Start{ 0.500625014F };
00088
00089     // Marker: PressedToNormal_End.
00090     static constexpr float M_PressedToNormal_End{ 0.738125026F };
00091
00092     // Marker: PressedToPointerOver_Start.
00093     static constexpr float M_PressedToPointerOver_Start{ 0.750625014F };
00094
00095     // Marker: PressedToPointerOver_End.
00096     static constexpr float M_PressedToPointerOver_End{ 0.988125026F };
00097
00098     // Theme property: Foreground.
00099     static inline const winrt::Windows::UI::Color c_themeForeground{ 0xFF, 0x00, 0x00, 0x00 };
00100
00101
00102     winrt::Windows::UI::Color Foreground();
00103     void Foreground(winrt::Windows::UI::Color value);
00104
00105     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00106         winrt::Microsoft::UI::Composition::Compositor const& compositor);
00107
00108     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00109         winrt::Microsoft::UI::Composition::Compositor const& compositor,
00110         winrt::Windows::Foundation::IInspectable& diagnostics);
00111
00112     // Gets the number of frames in the animation.
00113     double FrameCount();
00114
00115     // Gets the framerate of the animation.
00116     double Framerate();
00117
00118     // Gets the duration of the animation.
00119     winrt::Windows::Foundation::TimeSpan Duration();
00120
00121     // Converts a zero-based frame number to the corresponding progress value denoting the
00122     // start of the frame.
00123     double FrameToProgress(double frameNumber);
00124
00125     // Returns a map from marker names to corresponding progress values.
00126     winrt::Windows::Foundation::Collections::IMapView<hstring, double> Markers();
00127
00128     // Sets the color property with the given name, or does nothing if no such property
00129     // exists.
00130     void SetColorProperty(hstring const& propertyName, winrt::Windows::UI::Color value);
00131
00132     // Sets the scalar property with the given name, or does nothing if no such property
00133     // exists.
00134     void SetScalarProperty(hstring const& propertyName, double value);
00135 };
Generated on Sun Dec 1 2024 20:51:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarToggleButton.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarToggleButton.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarToggleButton.g.h"
00011
00012 class InkToolBarToggleButton :
00013     public ReferenceTracker<InkToolBarToggleButton, winrt::implementation::InkToolBarToggleButtonT, winrt::composable>
00014 {
00015 public:
00016
00017     winrt::InkToolBarToggle ToggleKind() { winrt::throw_hresult(E_NOTIMPL); }
00018 };
00019
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/RefreshVisualizer/RefreshVisualizer.idl Source File

  • File List
  • File Members
  • PullToRefresh
  • RefreshVisualizer

RefreshVisualizer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 enum RefreshVisualizerOrientation
00007 {
00008     Auto = 0,
00009     Normal = 1,
00010     Rotate90DegreesCounterclockwise = 2,
00011     Rotate270DegreesCounterclockwise = 3,
00012 };
00013
00014 [MUX_PUBLIC]
00015 [webhosthidden]
00016 enum RefreshVisualizerState
00017 {
00018     Idle = 0,
00019     Peeking = 1,
00020     Interacting = 2,
00021     Pending = 3,
00022     Refreshing = 4,
00023 };
00024
00025 [MUX_PUBLIC]
00026 [webhosthidden]
00027 runtimeclass RefreshInteractionRatioChangedEventArgs
00028 {
00029     Double InteractionRatio { get; };
00030 }
00031
00032 [MUX_PUBLIC]
00033 [webhosthidden]
00034 runtimeclass RefreshRequestedEventArgs
00035 {
00036     Windows.Foundation.Deferral GetDeferral();
00037 }
00038
00039 [MUX_PUBLIC]
00040 [webhosthidden]
00041 runtimeclass RefreshStateChangedEventArgs
00042 {
00043     RefreshVisualizerState OldState { get; };
00044     RefreshVisualizerState NewState { get; };
00045 }
00046
00047 [MUX_PUBLIC]
00048 [webhosthidden]
00049 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00050 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00051 unsealed runtimeclass RefreshVisualizer : Microsoft.UI.Xaml.Controls.Control
00052 {
00053     RefreshVisualizer();
00054
00055     void RequestRefresh();
00056     [MUX_DEFAULT_VALUE("winrt::RefreshVisualizerOrientation::Auto")]
00057     RefreshVisualizerOrientation Orientation { get; set; };
00058     Microsoft.UI.Xaml.UIElement Content { get; set; };
00059     [MUX_DEFAULT_VALUE("winrt::RefreshVisualizerState::Idle")]
00060     RefreshVisualizerState State { get; };
00061     event Windows.Foundation.TypedEventHandler<RefreshVisualizer, RefreshRequestedEventArgs> RefreshRequested;
00062     event Windows.Foundation.TypedEventHandler<RefreshVisualizer, RefreshStateChangedEventArgs> RefreshStateChanged;
00063
00064     [MUX_PROPERTY_TYPE("winrt::IInspectable")]
00065     static Microsoft.UI.Xaml.DependencyProperty InfoProviderProperty { get; };
00066     static Microsoft.UI.Xaml.DependencyProperty OrientationProperty { get; };
00067     static Microsoft.UI.Xaml.DependencyProperty ContentProperty { get; };
00068     static Microsoft.UI.Xaml.DependencyProperty StateProperty { get; };
00069 }
00070
00071 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTip.properties.h Source File

  • File List
  • File Members
  • Generated

TeachingTip.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TeachingTipProperties
00008 {
00009 public:
00010     TeachingTipProperties();
00011
00012     void ActionButtonCommand(winrt::ICommand const& value);
00013     winrt::ICommand ActionButtonCommand();
00014
00015     void ActionButtonCommandParameter(winrt::IInspectable const& value);
00016     winrt::IInspectable ActionButtonCommandParameter();
00017
00018     void ActionButtonContent(winrt::IInspectable const& value);
00019     winrt::IInspectable ActionButtonContent();
00020
00021     void ActionButtonStyle(winrt::Style const& value);
00022     winrt::Style ActionButtonStyle();
00023
00024     void CloseButtonCommand(winrt::ICommand const& value);
00025     winrt::ICommand CloseButtonCommand();
00026
00027     void CloseButtonCommandParameter(winrt::IInspectable const& value);
00028     winrt::IInspectable CloseButtonCommandParameter();
00029
00030     void CloseButtonContent(winrt::IInspectable const& value);
00031     winrt::IInspectable CloseButtonContent();
00032
00033     void CloseButtonStyle(winrt::Style const& value);
00034     winrt::Style CloseButtonStyle();
00035
00036     void HeroContent(winrt::UIElement const& value);
00037     winrt::UIElement HeroContent();
00038
00039     void HeroContentPlacement(winrt::TeachingTipHeroContentPlacementMode const& value);
00040     winrt::TeachingTipHeroContentPlacementMode HeroContentPlacement();
00041
00042     void IconSource(winrt::IconSource const& value);
00043     winrt::IconSource IconSource();
00044
00045     void IsLightDismissEnabled(bool value);
00046     bool IsLightDismissEnabled();
00047
00048     void IsOpen(bool value);
00049     bool IsOpen();
00050
00051     void PlacementMargin(winrt::Thickness const& value);
00052     winrt::Thickness PlacementMargin();
00053
00054     void PreferredPlacement(winrt::TeachingTipPlacementMode const& value);
00055     winrt::TeachingTipPlacementMode PreferredPlacement();
00056
00057     void ShouldConstrainToRootBounds(bool value);
00058     bool ShouldConstrainToRootBounds();
00059
00060     void Subtitle(winrt::hstring const& value);
00061     winrt::hstring Subtitle();
00062
00063     void TailVisibility(winrt::TeachingTipTailVisibility const& value);
00064     winrt::TeachingTipTailVisibility TailVisibility();
00065
00066     void Target(winrt::FrameworkElement const& value);
00067     winrt::FrameworkElement Target();
00068
00069     void TemplateSettings(winrt::TeachingTipTemplateSettings const& value);
00070     winrt::TeachingTipTemplateSettings TemplateSettings();
00071
00072     void Title(winrt::hstring const& value);
00073     winrt::hstring Title();
00074
00075     static winrt::DependencyProperty ActionButtonCommandProperty() { return s_ActionButtonCommandProperty; }
00076     static winrt::DependencyProperty ActionButtonCommandParameterProperty() { return s_ActionButtonCommandParameterProperty; }
00077     static winrt::DependencyProperty ActionButtonContentProperty() { return s_ActionButtonContentProperty; }
00078     static winrt::DependencyProperty ActionButtonStyleProperty() { return s_ActionButtonStyleProperty; }
00079     static winrt::DependencyProperty CloseButtonCommandProperty() { return s_CloseButtonCommandProperty; }
00080     static winrt::DependencyProperty CloseButtonCommandParameterProperty() { return s_CloseButtonCommandParameterProperty; }
00081     static winrt::DependencyProperty CloseButtonContentProperty() { return s_CloseButtonContentProperty; }
00082     static winrt::DependencyProperty CloseButtonStyleProperty() { return s_CloseButtonStyleProperty; }
00083     static winrt::DependencyProperty HeroContentProperty() { return s_HeroContentProperty; }
00084     static winrt::DependencyProperty HeroContentPlacementProperty() { return s_HeroContentPlacementProperty; }
00085     static winrt::DependencyProperty IconSourceProperty() { return s_IconSourceProperty; }
00086     static winrt::DependencyProperty IsLightDismissEnabledProperty() { return s_IsLightDismissEnabledProperty; }
00087     static winrt::DependencyProperty IsOpenProperty() { return s_IsOpenProperty; }
00088     static winrt::DependencyProperty PlacementMarginProperty() { return s_PlacementMarginProperty; }
00089     static winrt::DependencyProperty PreferredPlacementProperty() { return s_PreferredPlacementProperty; }
00090     static winrt::DependencyProperty ShouldConstrainToRootBoundsProperty() { return s_ShouldConstrainToRootBoundsProperty; }
00091     static winrt::DependencyProperty SubtitleProperty() { return s_SubtitleProperty; }
00092     static winrt::DependencyProperty TailVisibilityProperty() { return s_TailVisibilityProperty; }
00093     static winrt::DependencyProperty TargetProperty() { return s_TargetProperty; }
00094     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00095     static winrt::DependencyProperty TitleProperty() { return s_TitleProperty; }
00096
00097     static GlobalDependencyProperty s_ActionButtonCommandProperty;
00098     static GlobalDependencyProperty s_ActionButtonCommandParameterProperty;
00099     static GlobalDependencyProperty s_ActionButtonContentProperty;
00100     static GlobalDependencyProperty s_ActionButtonStyleProperty;
00101     static GlobalDependencyProperty s_CloseButtonCommandProperty;
00102     static GlobalDependencyProperty s_CloseButtonCommandParameterProperty;
00103     static GlobalDependencyProperty s_CloseButtonContentProperty;
00104     static GlobalDependencyProperty s_CloseButtonStyleProperty;
00105     static GlobalDependencyProperty s_HeroContentProperty;
00106     static GlobalDependencyProperty s_HeroContentPlacementProperty;
00107     static GlobalDependencyProperty s_IconSourceProperty;
00108     static GlobalDependencyProperty s_IsLightDismissEnabledProperty;
00109     static GlobalDependencyProperty s_IsOpenProperty;
00110     static GlobalDependencyProperty s_PlacementMarginProperty;
00111     static GlobalDependencyProperty s_PreferredPlacementProperty;
00112     static GlobalDependencyProperty s_ShouldConstrainToRootBoundsProperty;
00113     static GlobalDependencyProperty s_SubtitleProperty;
00114     static GlobalDependencyProperty s_TailVisibilityProperty;
00115     static GlobalDependencyProperty s_TargetProperty;
00116     static GlobalDependencyProperty s_TemplateSettingsProperty;
00117     static GlobalDependencyProperty s_TitleProperty;
00118
00119     winrt::event_token ActionButtonClick(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00120     void ActionButtonClick(winrt::event_token const& token);
00121     winrt::event_token CloseButtonClick(winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable> const& value);
00122     void CloseButtonClick(winrt::event_token const& token);
00123     winrt::event_token Closed(winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosedEventArgs> const& value);
00124     void Closed(winrt::event_token const& token);
00125     winrt::event_token Closing(winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosingEventArgs> const& value);
00126     void Closing(winrt::event_token const& token);
00127
00128     event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_actionButtonClickEventSource;
00129     event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::IInspectable>> m_closeButtonClickEventSource;
00130     event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosedEventArgs>> m_closedEventSource;
00131     event_source<winrt::TypedEventHandler<winrt::TeachingTip, winrt::TeachingTipClosingEventArgs>> m_closingEventSource;
00132
00133     static void EnsureProperties();
00134     static void ClearProperties();
00135
00136     static void OnActionButtonCommandPropertyChanged(
00137         winrt::DependencyObject const& sender,
00138         winrt::DependencyPropertyChangedEventArgs const& args);
00139
00140     static void OnActionButtonCommandParameterPropertyChanged(
00141         winrt::DependencyObject const& sender,
00142         winrt::DependencyPropertyChangedEventArgs const& args);
00143
00144     static void OnActionButtonContentPropertyChanged(
00145         winrt::DependencyObject const& sender,
00146         winrt::DependencyPropertyChangedEventArgs const& args);
00147
00148     static void OnActionButtonStylePropertyChanged(
00149         winrt::DependencyObject const& sender,
00150         winrt::DependencyPropertyChangedEventArgs const& args);
00151
00152     static void OnCloseButtonCommandPropertyChanged(
00153         winrt::DependencyObject const& sender,
00154         winrt::DependencyPropertyChangedEventArgs const& args);
00155
00156     static void OnCloseButtonCommandParameterPropertyChanged(
00157         winrt::DependencyObject const& sender,
00158         winrt::DependencyPropertyChangedEventArgs const& args);
00159
00160     static void OnCloseButtonContentPropertyChanged(
00161         winrt::DependencyObject const& sender,
00162         winrt::DependencyPropertyChangedEventArgs const& args);
00163
00164     static void OnCloseButtonStylePropertyChanged(
00165         winrt::DependencyObject const& sender,
00166         winrt::DependencyPropertyChangedEventArgs const& args);
00167
00168     static void OnHeroContentPropertyChanged(
00169         winrt::DependencyObject const& sender,
00170         winrt::DependencyPropertyChangedEventArgs const& args);
00171
00172     static void OnHeroContentPlacementPropertyChanged(
00173         winrt::DependencyObject const& sender,
00174         winrt::DependencyPropertyChangedEventArgs const& args);
00175
00176     static void OnIconSourcePropertyChanged(
00177         winrt::DependencyObject const& sender,
00178         winrt::DependencyPropertyChangedEventArgs const& args);
00179
00180     static void OnIsLightDismissEnabledPropertyChanged(
00181         winrt::DependencyObject const& sender,
00182         winrt::DependencyPropertyChangedEventArgs const& args);
00183
00184     static void OnIsOpenPropertyChanged(
00185         winrt::DependencyObject const& sender,
00186         winrt::DependencyPropertyChangedEventArgs const& args);
00187
00188     static void OnPlacementMarginPropertyChanged(
00189         winrt::DependencyObject const& sender,
00190         winrt::DependencyPropertyChangedEventArgs const& args);
00191
00192     static void OnPreferredPlacementPropertyChanged(
00193         winrt::DependencyObject const& sender,
00194         winrt::DependencyPropertyChangedEventArgs const& args);
00195
00196     static void OnShouldConstrainToRootBoundsPropertyChanged(
00197         winrt::DependencyObject const& sender,
00198         winrt::DependencyPropertyChangedEventArgs const& args);
00199
00200     static void OnSubtitlePropertyChanged(
00201         winrt::DependencyObject const& sender,
00202         winrt::DependencyPropertyChangedEventArgs const& args);
00203
00204     static void OnTailVisibilityPropertyChanged(
00205         winrt::DependencyObject const& sender,
00206         winrt::DependencyPropertyChangedEventArgs const& args);
00207
00208     static void OnTargetPropertyChanged(
00209         winrt::DependencyObject const& sender,
00210         winrt::DependencyPropertyChangedEventArgs const& args);
00211
00212     static void OnTemplateSettingsPropertyChanged(
00213         winrt::DependencyObject const& sender,
00214         winrt::DependencyPropertyChangedEventArgs const& args);
00215
00216     static void OnTitlePropertyChanged(
00217         winrt::DependencyObject const& sender,
00218         winrt::DependencyPropertyChangedEventArgs const& args);
00219 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBar Member List

This is the complete list of members for InfoBar, including all inherited members.
abi_enter() | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
ActionButton(winrt::ButtonBase const &value) | InfoBarProperties |
ActionButton() | InfoBarProperties |
ActionButtonProperty() | InfoBarProperties | [inline, static]
CheckThread() | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
ClearProperties() | InfoBarProperties | [static]
CloseButtonClick(winrt::TypedEventHandler< winrt::InfoBar, winrt::IInspectable > const &value) | InfoBarProperties |
CloseButtonClick(winrt::event_token const &token) | InfoBarProperties |
CloseButtonCommand(winrt::ICommand const &value) | InfoBarProperties |
CloseButtonCommand() | InfoBarProperties |
CloseButtonCommandParameter(winrt::IInspectable const &value) | InfoBarProperties |
CloseButtonCommandParameter() | InfoBarProperties |
CloseButtonCommandParameterProperty() | InfoBarProperties | [inline, static]
CloseButtonCommandProperty() | InfoBarProperties | [inline, static]
CloseButtonStyle(winrt::Style const &value) | InfoBarProperties |
CloseButtonStyle() | InfoBarProperties |
CloseButtonStyleProperty() | InfoBarProperties | [inline, static]
Closed(winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosedEventArgs > const &value) | InfoBarProperties |
Closed(winrt::event_token const &token) | InfoBarProperties |
Closing(winrt::TypedEventHandler< winrt::InfoBar, winrt::InfoBarClosingEventArgs > const &value) | InfoBarProperties |
Closing(winrt::event_token const &token) | InfoBarProperties |
Content(winrt::IInspectable const &value) | InfoBarProperties |
Content() | InfoBarProperties |
ContentProperty() | InfoBarProperties | [inline, static]
ContentTemplate(winrt::DataTemplate const &value) | InfoBarProperties |
ContentTemplate() | InfoBarProperties |
ContentTemplateProperty() | InfoBarProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< InfoBar > &&self) noexcept | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline, static]
EnsureProperties() | InfoBarProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
final_release(std::unique_ptr< InfoBar > &&self) | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline, static]
GetBase() | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
GetCloseButtonResourceName(winrt::InfoBarSeverity severity) | InfoBar | [private]
GetIconSeverityLevelResourceName(winrt::InfoBarSeverity severity) | InfoBar | [private]
GetInner() | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
GetSeverityLevelResourceName(winrt::InfoBarSeverity severity) | InfoBar | [private]
IconSource(winrt::IconSource const &value) | InfoBarProperties |
IconSource() | InfoBarProperties |
IconSourceProperty() | InfoBarProperties | [inline, static]
InfoBar() | InfoBar |
InfoBarProperties() | InfoBarProperties |
IsClosable(bool value) | InfoBarProperties |
IsClosable() | InfoBarProperties |
IsClosableProperty() | InfoBarProperties | [inline, static]
IsIconVisible(bool value) | InfoBarProperties |
IsIconVisible() | InfoBarProperties |
IsIconVisibleProperty() | InfoBarProperties | [inline, static]
IsOnThread() | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
IsOpen(bool value) | InfoBarProperties |
IsOpen() | InfoBarProperties |
IsOpenProperty() | InfoBarProperties | [inline, static]
m_closeButtonClickEventSource | InfoBarProperties |
m_closedEventSource | InfoBarProperties |
m_closingEventSource | InfoBarProperties |
Message(winrt::hstring const &value) | InfoBarProperties |
Message() | InfoBarProperties |
MessageProperty() | InfoBarProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
OnActionButtonPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnActionButtonPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
OnApplyTemplate() | InfoBar |
OnCloseButtonClick(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | InfoBar | [private]
OnCreateAutomationPeer() | InfoBar |
OnForegroundChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | InfoBar | [private]
OnIconSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
OnIsClosablePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnIsClosablePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
OnIsIconVisiblePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnIsIconVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
OnIsOpenPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnIsOpenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
OnMessagePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnMessagePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
OnSeverityPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnSeverityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
OnTitlePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | InfoBar |
InfoBarProperties::OnTitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InfoBarProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
RaiseClosedEvent() | InfoBar | [private]
RaiseClosingEvent() | InfoBar | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< InfoBar, winrt::implementation::InfoBarT > | [inline]
s_ActionButtonProperty | InfoBarProperties | [static]
s_CloseButtonCommandParameterProperty | InfoBarProperties | [static]
s_CloseButtonCommandProperty | InfoBarProperties | [static]
s_CloseButtonStyleProperty | InfoBarProperties | [static]
s_ContentProperty | InfoBarProperties | [static]
s_ContentTemplateProperty | InfoBarProperties | [static]
s_IconSourceProperty | InfoBarProperties | [static]
s_IsClosableProperty | InfoBarProperties | [static]
s_IsIconVisibleProperty | InfoBarProperties | [static]
s_IsOpenProperty | InfoBarProperties | [static]
s_MessageProperty | InfoBarProperties | [static]
s_SeverityProperty | InfoBarProperties | [static]
s_TemplateSettingsProperty | InfoBarProperties | [static]
s_TitleProperty | InfoBarProperties | [static]
Severity(winrt::InfoBarSeverity const &value) | InfoBarProperties |
Severity() | InfoBarProperties |
SeverityProperty() | InfoBarProperties | [inline, static]
TemplateSettings(winrt::InfoBarTemplateSettings const &value) | InfoBarProperties |
TemplateSettings() | InfoBarProperties |
TemplateSettingsProperty() | InfoBarProperties | [inline, static]
Title(winrt::hstring const &value) | InfoBarProperties |
Title() | InfoBarProperties |
TitleProperty() | InfoBarProperties | [inline, static]
UpdateCloseButton() | InfoBar | [private]
UpdateContentPosition() | InfoBar | [private]
UpdateForeground() | InfoBar | [private]
UpdateIcon() | InfoBar | [private]
UpdateIconVisibility() | InfoBar | [private]
UpdateSeverity() | InfoBar | [private]
UpdateVisibility(bool notify=true, bool force=false) | InfoBar | [private]
~InfoBar() | InfoBar | [inline]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationView Member List

This is the complete list of members for NavigationView, including all inherited members.
abi_enter() | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
AlwaysShowHeader(bool value) | NavigationViewProperties |
AlwaysShowHeader() | NavigationViewProperties |
AlwaysShowHeaderProperty() | NavigationViewProperties | [inline, static]
AnimateSelectionChanged(const winrt::IInspectable &currentItem) | NavigationView | [private]
AnimateSelectionChangedToItem(const winrt::IInspectable &selectedItem) | NavigationView | [private]
ApplyCustomMenuItemContainerStyling(const winrt::NavigationViewItemBase &nvib, const winrt::ItemsRepeater &ir, int index) | NavigationView | [private]
ArrangeTopNavItems(winrt::Size const &availableSize) | NavigationView | [private]
AttemptClosePaneLightly() | NavigationView | [private]
AutoSuggestBox(winrt::AutoSuggestBox const &value) | NavigationViewProperties |
AutoSuggestBox() | NavigationViewProperties |
AutoSuggestBoxProperty() | NavigationViewProperties | [inline, static]
BackRequested(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewBackRequestedEventArgs > const &value) | NavigationViewProperties |
BackRequested(winrt::event_token const &token) | NavigationViewProperties |
BumperNavigation(int offset) | NavigationView | [private]
ChangeIsExpandedNavigationViewItem(const winrt::NavigationViewItem &nvi, bool isExpanded) | NavigationView | [private]
ChangeSelection(const winrt::IInspectable &prevItem, const winrt::IInspectable &nextItem) | NavigationView | [private]
ChangeSelectStatusForItem(winrt::IInspectable const &item, bool selected) | NavigationView | [private]
CheckThread() | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
ClearAllNavigationViewItemBaseRevokers() noexcept | NavigationView | [private]
ClearNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase &nvib) | NavigationView | [private]
ClearProperties() | NavigationViewProperties | [static]
CloseFlyoutIfRequired(const winrt::NavigationViewItem &selectedItem) | NavigationView | [private]
ClosePane() | NavigationView | [private]
ClosePaneIfNeccessaryAfterItemIsClicked(const winrt::NavigationViewItem &selectedItem) | NavigationView | [private]
CloseTopNavigationViewFlyout() | NavigationView | [private]
CoerceToGreaterThanZero(double &value) | NavigationView |
Collapse(const winrt::NavigationViewItem &item) | NavigationView |
Collapsed(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemCollapsedEventArgs > const &value) | NavigationViewProperties |
Collapsed(winrt::event_token const &token) | NavigationViewProperties |
CompactModeThresholdWidth(double value) | NavigationViewProperties |
CompactModeThresholdWidth() | NavigationViewProperties |
CompactModeThresholdWidthProperty() | NavigationViewProperties | [inline, static]
CompactPaneLength(double value) | NavigationViewProperties |
CompactPaneLength() | NavigationViewProperties |
CompactPaneLengthProperty() | NavigationViewProperties | [inline, static]
CompletePendingSelectionChange() | NavigationView | [private]
ContainerFromMenuItem(winrt::IInspectable const &item) | NavigationView |
ContentOverlay(winrt::UIElement const &value) | NavigationViewProperties |
ContentOverlay() | NavigationViewProperties |
ContentOverlayProperty() | NavigationViewProperties | [inline, static]
CreateAndAttachHeaderAnimation(const winrt::Visual &visual) | NavigationView | [static]
CreateAndHookEventsToSettings() | NavigationView | [private]
CreateNavigationTransitionInfo(NavigationRecommendedTransitionDirection recommendedTransitionDirection) | NavigationView | [private]
DeleteInstanceOnUIThread(std::unique_ptr< NavigationView > &&self) noexcept | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline, static]
DisplayMode(winrt::NavigationViewDisplayMode const &value) | NavigationViewProperties |
DisplayMode() | NavigationViewProperties |
DisplayModeChanged(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewDisplayModeChangedEventArgs > const &value) | NavigationViewProperties |
DisplayModeChanged(winrt::event_token const &token) | NavigationViewProperties |
DisplayModeProperty() | NavigationViewProperties | [inline, static]
DoesNavigationViewItemHaveChildren(const winrt::NavigationViewItem &nvi) | NavigationView | [private]
DoesRepeaterHaveRealizedContainers(const winrt::ItemsRepeater &ir) | NavigationView | [private]
EnsureProperties() | NavigationViewProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
Expand(const winrt::NavigationViewItem &item) | NavigationView |
ExpandedModeThresholdWidth(double value) | NavigationViewProperties |
ExpandedModeThresholdWidth() | NavigationViewProperties |
ExpandedModeThresholdWidthProperty() | NavigationViewProperties | [inline, static]
Expanding(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemExpandingEventArgs > const &value) | NavigationViewProperties |
Expanding(winrt::event_token const &token) | NavigationViewProperties |
final_release(std::unique_ptr< NavigationView > &&self) | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline, static]
FindLowestLevelContainerToDisplaySelectionIndicator() | NavigationView | [private]
FindMovableItemsBeyondAvailableWidth(float availableWidth) | NavigationView | [private]
FindMovableItemsRecoverToPrimaryList(float availableWidth, std::vector< int > const &includeItems) | NavigationView | [private]
FindMovableItemsToBeRemovedFromPrimaryList(float widthToBeRemoved, std::vector< int > const &excludeItems) | NavigationView | [private]
FindSelectionIndicator(const winrt::IInspectable &item) | NavigationView |
FocusNextDownItem(const winrt::NavigationViewItem &nvi, const winrt::KeyRoutedEventArgs &args) | NavigationView | [private]
FocusNextUpItem(const winrt::NavigationViewItem &nvi, const winrt::KeyRoutedEventArgs &args) | NavigationView | [private]
FooterMenuItems(winrt::IVector< winrt::IInspectable > const &value) | NavigationViewProperties |
FooterMenuItems() | NavigationViewProperties |
FooterMenuItemsProperty() | NavigationViewProperties | [inline, static]
FooterMenuItemsSource(winrt::IInspectable const &value) | NavigationViewProperties |
FooterMenuItemsSource() | NavigationViewProperties |
FooterMenuItemsSourceProperty() | NavigationViewProperties | [inline, static]
GetBase() | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
GetChildren(const winrt::NavigationViewItem &nvi) | NavigationView | [private]
GetChildrenForItemInIndexPath(const winrt::IndexPath &ip, bool forceRealize=false) | NavigationView | [private]
GetChildrenForItemInIndexPath(const winrt::UIElement &firstContainer, const winrt::IndexPath &ip, bool forceRealize=false) | NavigationView | [private]
GetChildRepeaterForIndexPath(const winrt::IndexPath &ip) | NavigationView | [private]
GetContainerCountInRepeater(const winrt::ItemsRepeater &ir) | NavigationView | [private]
GetContainerForData(const winrt::IInspectable &data) | NavigationView | [private]
GetContainerForData(const winrt::IInspectable &data) | NavigationView |
GetContainerForIndex(int index, bool inFooter) | NavigationView | [private]
GetContainerForIndexPath(const winrt::IndexPath &ip, bool lastVisible=false, bool forceRealize=false) | NavigationView | [private]
GetContainerForIndexPath(const winrt::UIElement &firstContainer, const winrt::IndexPath &ip, bool lastVisible, bool forceRealize) | NavigationView | [private]
GetIndexFromItem(const winrt::ItemsRepeater &ir, const winrt::IInspectable &data) | NavigationView | [private]
GetIndexPathForContainer(const winrt::NavigationViewItemBase &nvib) | NavigationView |
GetIndexPathOfItem(const winrt::IInspectable &data) | NavigationView | [private]
GetInner() | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
GetItemFromIndex(const winrt::ItemsRepeater &ir, int index) | NavigationView | [private, static]
GetNavigationViewItemCountInPrimaryList() | NavigationView |
GetNavigationViewItemCountInTopNav() | NavigationView |
GetNavigationViewItemsFactory() | NavigationView | [inline]
GetPaneToggleButtonHeight() | NavigationView | [private]
GetPaneToggleButtonWidth() | NavigationView | [private]
GetParentItemsRepeaterForContainer(const winrt::NavigationViewItemBase &nvib) | NavigationView |
GetParentNavigationViewItemForContainer(const winrt::NavigationViewItemBase &nvib) | NavigationView | [private]
GetParentRootItemsRepeaterForContainer(const winrt::NavigationViewItemBase &nvib) | NavigationView |
GetRecommendedTransitionDirection(winrt::DependencyObject const &prev, winrt::DependencyObject const &next) | NavigationView | [private]
GetSelectedContainer() | NavigationView |
GetSelectedItemIndex() | NavigationView | [private]
GetSplitView() | NavigationView |
GetTemplateSettings() | NavigationView | [inline, private]
GetTopDataProvider() | NavigationView | [inline]
GetTopNavigationViewActualWidth() | NavigationView | [private]
GetVisualStateDisplayMode(const winrt::NavigationViewDisplayMode &displayMode) | NavigationView | [private]
HandleKeyEventForNavigationViewItem(const winrt::NavigationViewItem &nvi, const winrt::KeyRoutedEventArgs &args) | NavigationView | [private]
HandleTopNavigationMeasureOverride(winrt::Size const &availableSize) | NavigationView | [private]
HandleTopNavigationMeasureOverrideNormal(const winrt::Windows::Foundation::Size &availableSize) | NavigationView | [private]
HandleTopNavigationMeasureOverrideOverflow(const winrt::Windows::Foundation::Size &availableSize) | NavigationView | [private]
HasTopNavigationViewItemNotInPrimaryList() | NavigationView | [private]
Header(winrt::IInspectable const &value) | NavigationViewProperties |
Header() | NavigationViewProperties |
HeaderProperty() | NavigationViewProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | NavigationViewProperties |
HeaderTemplate() | NavigationViewProperties |
HeaderTemplateProperty() | NavigationViewProperties | [inline, static]
InvalidateTopNavPrimaryLayout() | NavigationView | [private]
IsBackButtonVisible(winrt::NavigationViewBackButtonVisible const &value) | NavigationViewProperties |
IsBackButtonVisible() | NavigationViewProperties |
IsBackButtonVisibleProperty() | NavigationViewProperties | [inline, static]
IsBackEnabled(bool value) | NavigationViewProperties |
IsBackEnabled() | NavigationViewProperties |
IsBackEnabledProperty() | NavigationViewProperties | [inline, static]
IsContainerTheSelectedItemInTheSelectionModel(const winrt::NavigationViewItemBase &nvib) | NavigationView | [private]
IsFullScreenOrTabletMode() | NavigationView |
IsLightDismissible() | NavigationView | [private]
IsNavigationViewListSingleSelectionFollowsFocus() | NavigationView | [inline, private]
IsOnThread() | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
IsOverlay() | NavigationView | [private]
IsPaneOpen(bool value) | NavigationViewProperties |
IsPaneOpen() | NavigationViewProperties |
IsPaneOpenProperty() | NavigationViewProperties | [inline, static]
IsPaneToggleButtonVisible(bool value) | NavigationViewProperties |
IsPaneToggleButtonVisible() | NavigationViewProperties |
IsPaneToggleButtonVisibleProperty() | NavigationViewProperties | [inline, static]
IsPaneVisible(bool value) | NavigationViewProperties |
IsPaneVisible() | NavigationViewProperties |
IsPaneVisibleProperty() | NavigationViewProperties | [inline, static]
IsRootGridOfFlyout(const winrt::DependencyObject &element) | NavigationView | [private]
IsRootItemsRepeater(const winrt::DependencyObject &element) | NavigationView | [private]
IsSelectionSuppressed(const winrt::IInspectable &item) | NavigationView | [private]
IsSettingsItem(winrt::IInspectable const &item) | NavigationView | [private]
IsSettingsVisible(bool value) | NavigationViewProperties |
IsSettingsVisible() | NavigationViewProperties |
IsSettingsVisibleProperty() | NavigationViewProperties | [inline, static]
IsTitleBarAutoPaddingEnabled(bool value) | NavigationViewProperties |
IsTitleBarAutoPaddingEnabled() | NavigationViewProperties |
IsTitleBarAutoPaddingEnabledProperty() | NavigationViewProperties | [inline, static]
IsTopLevelItem(const winrt::NavigationViewItemBase &nvib) | NavigationView | [private]
IsTopNavigationView() | NavigationView | [private]
IsTopPrimaryListVisible() | NavigationView | [private]
IsVisible(const winrt::DependencyObject &obj) | NavigationView | [private]
ItemInvoked(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewItemInvokedEventArgs > const &value) | NavigationViewProperties |
ItemInvoked(winrt::event_token const &token) | NavigationViewProperties |
KeepAtLeastOneItemInPrimaryList(std::vector< int > &itemInPrimaryToBeRemoved, bool shouldKeepFirst) | NavigationView | [private]
KeyboardFocusFirstItemFromItem(const winrt::NavigationViewItemBase &nvib) | NavigationView | [private]
KeyboardFocusLastItemFromItem(const winrt::NavigationViewItemBase &nvib) | NavigationView | [private]
LeftNavRepeater() | NavigationView |
m_backRequestedEventSource | NavigationViewProperties |
m_collapsedEventSource | NavigationViewProperties |
m_displayModeChangedEventSource | NavigationViewProperties |
m_expandingEventSource | NavigationViewProperties |
m_itemInvokedEventSource | NavigationViewProperties |
m_itemsWithRevokerObjects | NavigationView | [private]
m_paneClosedEventSource | NavigationViewProperties |
m_paneClosingEventSource | NavigationViewProperties |
m_paneOpenedEventSource | NavigationViewProperties |
m_paneOpeningEventSource | NavigationViewProperties |
m_selectionChangedEventSource | NavigationViewProperties |
MeasureOverride(winrt::Size const &availableSize) | NavigationView |
MeasureTopNavigationViewDesiredWidth(winrt::Size const &availableSize) | NavigationView | [private]
MeasureTopNavMenuItemsHostDesiredWidth(winrt::Size const &availableSize) | NavigationView | [private]
MenuItemContainerStyle(winrt::Style const &value) | NavigationViewProperties |
MenuItemContainerStyle() | NavigationViewProperties |
MenuItemContainerStyleProperty() | NavigationViewProperties | [inline, static]
MenuItemContainerStyleSelector(winrt::StyleSelector const &value) | NavigationViewProperties |
MenuItemContainerStyleSelector() | NavigationViewProperties |
MenuItemContainerStyleSelectorProperty() | NavigationViewProperties | [inline, static]
MenuItemFromContainer(winrt::DependencyObject const &container) | NavigationView |
MenuItems(winrt::IVector< winrt::IInspectable > const &value) | NavigationViewProperties |
MenuItems() | NavigationViewProperties |
MenuItemsProperty() | NavigationViewProperties | [inline, static]
MenuItemsSource(winrt::IInspectable const &value) | NavigationViewProperties |
MenuItemsSource() | NavigationViewProperties |
MenuItemsSourceProperty() | NavigationViewProperties | [inline, static]
MenuItemTemplate(winrt::DataTemplate const &value) | NavigationViewProperties |
MenuItemTemplate() | NavigationViewProperties |
MenuItemTemplateProperty() | NavigationViewProperties | [inline, static]
MenuItemTemplateSelector(winrt::DataTemplateSelector const &value) | NavigationViewProperties |
MenuItemTemplateSelector() | NavigationViewProperties |
MenuItemTemplateSelectorProperty() | NavigationViewProperties | [inline, static]
NavigationView() | NavigationView |
NavigationViewItemBaseOrSettingsContentFromData(const winrt::IInspectable &data) | NavigationView | [private]
NavigationViewItemOrSettingsContentFromData(const winrt::IInspectable &data) | NavigationView | [private]
NavigationViewProperties() | NavigationViewProperties |
NeedRearrangeOfTopElementsAfterOverflowSelectionChanged(int selectedOriginalIndex) | NavigationView | [private]
NeedTopPaddingForRS5OrHigher(winrt::CoreApplicationViewTitleBar const &coreTitleBar) | NavigationView | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
OnAccessKeyInvoked(winrt::IInspectable const &sender, winrt::AccessKeyInvokedEventArgs const &args) | NavigationView | [private]
OnAlwaysShowHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnAnimationComplete(const winrt::IInspectable &sender, const winrt::CompositionBatchCompletedEventArgs &args) | NavigationView | [private]
OnApplyTemplate() | NavigationView |
OnAutoSuggestBoxPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnAutoSuggestBoxQuerySubmitted(const winrt::AutoSuggestBox &sender, const winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs &args) | NavigationView | [private]
OnBackButtonClicked(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | NavigationView | [private]
OnCompactModeThresholdWidthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnCompactPaneLengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnCreateAutomationPeer() | NavigationView |
OnDisplayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnExpandedModeThresholdWidthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnFlyoutClosing(const winrt::IInspectable &sender, const winrt::FlyoutBaseClosingEventArgs &args) | NavigationView | [private]
OnFooterItemsSourceCollectionChanged(const winrt::IInspectable &, const winrt::IInspectable &) | NavigationView | [private]
OnFooterMenuItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnFooterMenuItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnHeaderTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsBackButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsBackEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsPaneOpenChanged() | NavigationView | [private]
OnIsPaneOpenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsPaneToggleButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsPaneVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsSettingsVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnIsTitleBarAutoPaddingEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnItemsContainerSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | NavigationView | [private]
OnKeyDown(winrt::KeyRoutedEventArgs const &args) | NavigationView |
OnLayoutUpdated(const winrt::IInspectable &sender, const winrt::IInspectable &e) | NavigationView | [private]
OnLoaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | NavigationView |
OnMenuItemContainerStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemContainerStyleSelectorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemsSourceCollectionChanged(const winrt::IInspectable &, const winrt::IInspectable &) | NavigationView | [private]
OnMenuItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnMenuItemTemplateSelectorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnNavigationViewItemBaseVisibilityPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | NavigationView | [private]
OnNavigationViewItemClicked(const winrt::NavigationViewItem &sender) | NavigationView |
OnNavigationViewItemExpandedPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | NavigationView | [private]
OnNavigationViewItemInvoked(const winrt::NavigationViewItem &nvi) | NavigationView |
OnNavigationViewItemIsSelectedPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | NavigationView | [private]
OnNavigationViewItemKeyDown(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | NavigationView | [private]
OnNavigationViewItemOnGotFocus(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &e) | NavigationView | [private]
OnOpenPaneLengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnOverflowItemsSourceCollectionChanged(const winrt::IInspectable &, const winrt::IInspectable &) | NavigationView | [private]
OnOverflowLabelModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneDisplayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneFooterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneSearchButtonClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | NavigationView | [private]
OnPaneTitleHolderSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | NavigationView | [private]
OnPaneTitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPaneToggleButtonClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | NavigationView | [private]
OnPaneToggleButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnPreviewKeyDown(winrt::KeyRoutedEventArgs const &args) | NavigationView |
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | NavigationView |
OnRepeaterElementClearing(const winrt::ItemsRepeater &ir, const winrt::ItemsRepeaterElementClearingEventArgs &args) | NavigationView |
OnRepeaterElementPrepared(const winrt::ItemsRepeater &ir, const winrt::ItemsRepeaterElementPreparedEventArgs &args) | NavigationView |
OnRepeaterGettingFocus(const winrt::IInspectable &sender, const winrt::GettingFocusEventArgs &args) | NavigationView | [private]
OnRepeaterLoaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | NavigationView |
OnSelectedItemLayoutUpdated(const winrt::IInspectable &sender, const winrt::IInspectable &obj) | NavigationView | [private]
OnSelectedItemPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | NavigationView | [private]
NavigationViewProperties::OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnSelectionFollowsFocusPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnSelectionModelChildrenRequested(const winrt::SelectionModel &selectionModel, const winrt::SelectionModelChildrenRequestedEventArgs &e) | NavigationView | [private]
OnSelectionModelSelectionChanged(const winrt::SelectionModel &selectionModel, const winrt::SelectionModelSelectionChangedEventArgs &e) | NavigationView | [private]
OnSettingsInvoked() | NavigationView |
OnSettingsItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnShoulderNavigationEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | NavigationViewProperties | [static]
OnSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | NavigationView | [private]
OnSplitViewClosedCompactChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | NavigationView | [private]
OnSplitViewPaneClosed(const winrt::DependencyObject &sender, const winrt::IInspectable &obj) | NavigationView | [private]
OnSplitViewPaneClosing(const winrt::DependencyObject &sender, const winrt::SplitViewPaneClosingEventArgs &args) | NavigationView | [private]
OnSplitViewPaneOpened(const winrt::DependencyObject &sender, const winrt::IInspectable &obj) | NavigationView | [private]
OnSplitViewPaneOpening(const winrt::DependencyObject &sender, const winrt::IInspectable &obj) | NavigationView | [private]
OnTitleBarIsVisibleChanged(const winrt::CoreApplicationViewTitleBar &sender, const winrt::IInspectable &args) | NavigationView | [private]
OnTitleBarMetricsChanged(const winrt::IInspectable &sender, const winrt::IInspectable &args) | NavigationView | [private]
OnTopNavDataSourceChanged(winrt::NotifyCollectionChangedEventArgs const &args) | NavigationView |
OnUnloaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | NavigationView |
OpenPane() | NavigationView | [private]
OpenPaneLength(double value) | NavigationViewProperties |
OpenPaneLength() | NavigationViewProperties |
OpenPaneLengthProperty() | NavigationViewProperties | [inline, static]
OverflowLabelMode(winrt::NavigationViewOverflowLabelMode const &value) | NavigationViewProperties |
OverflowLabelMode() | NavigationViewProperties |
OverflowLabelModeProperty() | NavigationViewProperties | [inline, static]
PaneClosed(winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value) | NavigationViewProperties |
PaneClosed(winrt::event_token const &token) | NavigationViewProperties |
PaneClosing(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewPaneClosingEventArgs > const &value) | NavigationViewProperties |
PaneClosing(winrt::event_token const &token) | NavigationViewProperties |
PaneCustomContent(winrt::UIElement const &value) | NavigationViewProperties |
PaneCustomContent() | NavigationViewProperties |
PaneCustomContentProperty() | NavigationViewProperties | [inline, static]
PaneDisplayMode(winrt::NavigationViewPaneDisplayMode const &value) | NavigationViewProperties |
PaneDisplayMode() | NavigationViewProperties |
PaneDisplayModeProperty() | NavigationViewProperties | [inline, static]
PaneFooter(winrt::UIElement const &value) | NavigationViewProperties |
PaneFooter() | NavigationViewProperties |
PaneFooterProperty() | NavigationViewProperties | [inline, static]
PaneHeader(winrt::UIElement const &value) | NavigationViewProperties |
PaneHeader() | NavigationViewProperties |
PaneHeaderProperty() | NavigationViewProperties | [inline, static]
PaneOpened(winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value) | NavigationViewProperties |
PaneOpened(winrt::event_token const &token) | NavigationViewProperties |
PaneOpening(winrt::TypedEventHandler< winrt::NavigationView, winrt::IInspectable > const &value) | NavigationViewProperties |
PaneOpening(winrt::event_token const &token) | NavigationViewProperties |
PaneTitle(winrt::hstring const &value) | NavigationViewProperties |
PaneTitle() | NavigationViewProperties |
PaneTitleProperty() | NavigationViewProperties | [inline, static]
PaneToggleButtonStyle(winrt::Style const &value) | NavigationViewProperties |
PaneToggleButtonStyle() | NavigationViewProperties |
PaneToggleButtonStyleProperty() | NavigationViewProperties | [inline, static]
PlayIndicatorAnimations(const winrt::UIElement &indicator, float yFrom, float yTo, winrt::Size beginSize, winrt::Size endSize, bool isOutgoing) | NavigationView | [private]
PlayIndicatorNonSameLevelAnimations(const winrt::UIElement &indicator, bool isOutgoing, bool fromTop) | NavigationView | [private]
PlayIndicatorNonSameLevelTopPrimaryAnimation(const winrt::UIElement &indicator, bool isOutgoing) | NavigationView | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
RaiseCollapsedEvent(const winrt::NavigationViewItemBase &container) | NavigationView | [private]
RaiseDisplayModeChanged(const winrt::NavigationViewDisplayMode &displayMode) | NavigationView | [private]
RaiseExpandingEvent(const winrt::NavigationViewItemBase &container) | NavigationView | [private]
RaiseItemInvoked(winrt::IInspectable const &item, bool isSettings, winrt::NavigationViewItemBase const &container=nullptr, NavigationRecommendedTransitionDirection recommendedDirection=NavigationRecommendedTransitionDirection::Default) | NavigationView | [private]
RaiseItemInvokedForNavigationViewItem(const winrt::NavigationViewItem &nvi) | NavigationView | [private]
RaiseSelectionChangedEvent(winrt::IInspectable const &nextItem, bool isSettingsItem, NavigationRecommendedTransitionDirection recommendedDirection=NavigationRecommendedTransitionDirection::Default) | NavigationView | [private]
RecycleContainer(const winrt::UIElement &container) | NavigationView | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< NavigationView, winrt::implementation::NavigationViewT > | [inline]
ResetAndRearrangeTopNavItems(winrt::Size const &availableSize) | NavigationView | [private]
ResetElementAnimationProperties(const winrt::UIElement &element, float desiredOpacity) | NavigationView | [private]
ResolveContainerForItem(const winrt::IInspectable &item) | NavigationView | [private]
RevokeNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase &nvib) | NavigationView | [private]
s_AlwaysShowHeaderProperty | NavigationViewProperties | [static]
s_AutoSuggestBoxProperty | NavigationViewProperties | [static]
s_CompactModeThresholdWidthProperty | NavigationViewProperties | [static]
s_CompactPaneLengthProperty | NavigationViewProperties | [static]
s_ContentOverlayProperty | NavigationViewProperties | [static]
s_DisplayModeProperty | NavigationViewProperties | [static]
s_ExpandedModeThresholdWidthProperty | NavigationViewProperties | [static]
s_FooterMenuItemsProperty | NavigationViewProperties | [static]
s_FooterMenuItemsSourceProperty | NavigationViewProperties | [static]
s_HeaderProperty | NavigationViewProperties | [static]
s_HeaderTemplateProperty | NavigationViewProperties | [static]
s_IsBackButtonVisibleProperty | NavigationViewProperties | [static]
s_IsBackEnabledProperty | NavigationViewProperties | [static]
s_IsPaneOpenProperty | NavigationViewProperties | [static]
s_IsPaneToggleButtonVisibleProperty | NavigationViewProperties | [static]
s_IsPaneVisibleProperty | NavigationViewProperties | [static]
s_IsSettingsVisibleProperty | NavigationViewProperties | [static]
s_IsTitleBarAutoPaddingEnabledProperty | NavigationViewProperties | [static]
s_MenuItemContainerStyleProperty | NavigationViewProperties | [static]
s_MenuItemContainerStyleSelectorProperty | NavigationViewProperties | [static]
s_MenuItemsProperty | NavigationViewProperties | [static]
s_MenuItemsSourceProperty | NavigationViewProperties | [static]
s_MenuItemTemplateProperty | NavigationViewProperties | [static]
s_MenuItemTemplateSelectorProperty | NavigationViewProperties | [static]
s_OpenPaneLengthProperty | NavigationViewProperties | [static]
s_OverflowLabelModeProperty | NavigationViewProperties | [static]
s_PaneCustomContentProperty | NavigationViewProperties | [static]
s_PaneDisplayModeProperty | NavigationViewProperties | [static]
s_PaneFooterProperty | NavigationViewProperties | [static]
s_PaneHeaderProperty | NavigationViewProperties | [static]
s_PaneTitleProperty | NavigationViewProperties | [static]
s_PaneToggleButtonStyleProperty | NavigationViewProperties | [static]
s_SelectedItemProperty | NavigationViewProperties | [static]
s_SelectionFollowsFocusProperty | NavigationViewProperties | [static]
s_SettingsItemProperty | NavigationViewProperties | [static]
s_ShoulderNavigationEnabledProperty | NavigationViewProperties | [static]
s_TemplateSettingsProperty | NavigationViewProperties | [static]
SearchEntireTreeForContainer(const winrt::ItemsRepeater &rootRepeater, const winrt::IInspectable &data) | NavigationView | [private]
SearchEntireTreeForIndexPath(const winrt::ItemsRepeater &rootRepeater, const winrt::IInspectable &data, bool isFooterRepeater) | NavigationView | [private]
SearchEntireTreeForIndexPath(const winrt::NavigationViewItem &parentContainer, const winrt::IInspectable &data, const winrt::IndexPath &ip) | NavigationView | [private]
SelectandMoveOverflowItem(winrt::IInspectable const &selectedItem, winrt::IndexPath const &selectedIndex, bool closeFlyout) | NavigationView | [private]
SelectedItem(winrt::IInspectable const &value) | NavigationViewProperties |
SelectedItem() | NavigationViewProperties |
SelectedItemProperty() | NavigationViewProperties | [inline, static]
SelectionChanged(winrt::TypedEventHandler< winrt::NavigationView, winrt::NavigationViewSelectionChangedEventArgs > const &value) | NavigationViewProperties |
SelectionChanged(winrt::event_token const &token) | NavigationViewProperties |
SelectionFollowsFocus(winrt::NavigationViewSelectionFollowsFocus const &value) | NavigationViewProperties |
SelectionFollowsFocus() | NavigationViewProperties |
SelectionFollowsFocusProperty() | NavigationViewProperties | [inline, static]
SelectOverflowItem(winrt::IInspectable const &item, winrt::IndexPath const &ip) | NavigationView | [private]
SelectSelectableItemWithOffset(int startIndex, int offset, winrt::ItemsRepeater const &repeater, int repeaterCollectionSize) | NavigationView | [private]
SetDisplayMode(const winrt::NavigationViewDisplayMode &displayMode, bool forceSetDisplayMode=false) | NavigationView | [private]
SetDropShadow() | NavigationView | [private]
SetNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase &nvib) | NavigationView | [inline, private]
SetNavigationViewItemRevokers(const winrt::NavigationViewItem &nvi) | NavigationView | [private]
SetOverflowButtonVisibility(winrt::Visibility const &visibility) | NavigationView | [private]
SetPaneTitleFrameworkElementParent(const winrt::ContentControl &parent, const winrt::FrameworkElement &paneTitle, bool shouldNotContainPaneTitle) | NavigationView | [private]
SetPaneToggleButtonAutomationName() | NavigationView | [private]
SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(winrt::IInspectable const &item) | NavigationView | [private]
SettingsItem(winrt::IInspectable const &value) | NavigationViewProperties |
SettingsItem() | NavigationViewProperties |
SettingsItemProperty() | NavigationViewProperties | [inline, static]
ShadowCasterEaseOutStoryboard_Completed(const winrt::Grid &shadowCaster) | NavigationView | [private]
ShoulderNavigationEnabled(winrt::NavigationViewShoulderNavigationEnabled const &value) | NavigationViewProperties |
ShoulderNavigationEnabled() | NavigationViewProperties |
ShoulderNavigationEnabledProperty() | NavigationViewProperties | [inline, static]
ShouldShowBackButton() | NavigationView | [private]
ShouldShowBackOrCloseButton() | NavigationView | [private]
ShouldShowCloseButton() | NavigationView | [private]
ShowHideChildrenItemsRepeater(const winrt::NavigationViewItem &nvi) | NavigationView | [private]
ShrinkTopNavigationSize(float desiredWidth, winrt::Size const &availableSize) | NavigationView | [private]
SwapPaneHeaderContent(tracker_ref< winrt::ContentControl > newParent, tracker_ref< winrt::ContentControl > oldParent, winrt::hstring const &propertyPathName) | NavigationView | [private]
SyncItemTemplates() | NavigationView | [private]
TemplateSettings(winrt::NavigationViewTemplateSettings const &value) | NavigationViewProperties |
TemplateSettings() | NavigationViewProperties |
TemplateSettingsProperty() | NavigationViewProperties | [inline, static]
ToggleIsExpandedNavigationViewItem(const winrt::NavigationViewItem &nvi) | NavigationView | [private]
TopNavigationViewItemContentChanged() | NavigationView |
UndoSelectionAndRevertSelectionTo(winrt::IInspectable const &prevSelectedItem, winrt::IInspectable const &nextItem) | NavigationView | [private]
UnhookEventsAndClearFields(bool isFromDestructor=false) | NavigationView | [private]
UnselectPrevItem(winrt::IInspectable const &prevItem, winrt::IInspectable const &nextItem) | NavigationView | [private]
UnsetDropShadow() | NavigationView | [private]
UpdateAdaptiveLayout(double width, bool forceSetDisplayMode=false) | NavigationView | [private]
UpdateBackAndCloseButtonsVisibility() | NavigationView | [private]
UpdateContentBindingsForPaneDisplayMode() | NavigationView | [private]
UpdateFooterRepeaterItemsSource(bool sourceCollectionReseted, bool sourceCollectionChanged) | NavigationView | [private]
UpdateHeaderVisibility() | NavigationView | [private]
UpdateHeaderVisibility(winrt::NavigationViewDisplayMode displayMode) | NavigationView | [private]
UpdateIsChildSelected(const winrt::IndexPath &prevIP, const winrt::IndexPath &nextIP) | NavigationView | [private]
UpdateIsChildSelectedForIndexPath(const winrt::IndexPath &ip, bool isChildSelected) | NavigationView | [private]
UpdateIsClosedCompact() | NavigationView | [private]
UpdateItemsRepeaterItemsSource(const winrt::ItemsRepeater &listView, const winrt::IInspectable &itemsSource) | NavigationView | [private, static]
UpdateLeftNavigationOnlyVisualState(bool useTransitions) | NavigationView | [private]
UpdateLeftRepeaterItemSource(const winrt::IInspectable &items) | NavigationView | [private]
UpdateNavigationViewItemsFactory() | NavigationView | [private]
UpdateOpenPaneLength(double width) | NavigationView | [private]
UpdatePaneButtonsWidths() | NavigationView | [private]
UpdatePaneDisplayMode() | NavigationView | [private]
UpdatePaneDisplayMode(winrt::NavigationViewPaneDisplayMode oldDisplayMode, winrt::NavigationViewPaneDisplayMode newDisplayMode) | NavigationView | [private]
UpdatePaneLayout() | NavigationView | [private]
UpdatePaneOverlayGroup() | NavigationView | [private]
UpdatePaneTabFocusNavigation() | NavigationView | [private]
UpdatePaneTitleFrameworkElementParents() | NavigationView | [private]
UpdatePaneTitleMargins() | NavigationView | [private]
UpdatePaneToggleButtonVisibility() | NavigationView | [private]
UpdatePaneToggleSize() | NavigationView | [private]
UpdatePaneVisibility() | NavigationView | [private]
UpdateRepeaterItemsSource(bool forceSelectionModelUpdate) | NavigationView | [private]
UpdateSelectedItemFromMenuItems(const winrt::impl::com_ref< winrt::IVector< winrt::IInspectable >> &menuItems, bool foundFirstSelected=false) | NavigationView | [private]
UpdateSelectionForMenuItems() | NavigationView | [private]
UpdateSelectionModelSelection(const winrt::IndexPath &ip) | NavigationView | [private]
UpdateSelectionModelSelectionForSelectedItem(const winrt::IInspectable &selectedItem) | NavigationView | [private]
UpdateSettingsItemToolTip() | NavigationView | [private]
UpdateSingleSelectionFollowsFocusTemplateSetting() | NavigationView | [inline, private]
UpdateTitleBarPadding() | NavigationView | [private]
UpdateTopNavigationWidthCache() | NavigationView | [private]
UpdateTopNavOverflowRepeaterItemsSource(const winrt::IInspectable &items) | NavigationView | [private]
UpdateTopNavPrimaryRepeaterItemsSource(const winrt::IInspectable &items) | NavigationView | [private]
UpdateTopNavRepeatersItemSource(const winrt::IInspectable &items) | NavigationView | [private]
UpdateVisualState(bool useTransitions=false) | NavigationView | [private]
UpdateVisualStateForDisplayModeGroup(const winrt::NavigationViewDisplayMode &displayMode) | NavigationView | [private]
UpdateVisualStateForOverflowButton() | NavigationView | [private]
~NavigationView() | NavigationView | [virtual]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/Common.idl Source File

  • File List
  • File Members
  • ColorPicker

Common.idl

Go to the documentation of this file.
00001 namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 enum ColorSpectrumShape
00007 {
00008     Box = 0,
00009     Ring = 1,
00010 };
00011
00012 [MUX_PUBLIC]
00013 [webhosthidden]
00014 enum ColorSpectrumComponents
00015 {
00016     HueValue = 0,
00017     ValueHue = 1,
00018     HueSaturation = 2,
00019     SaturationHue = 3,
00020     SaturationValue = 4,
00021     ValueSaturation = 5,
00022 };
00023
00024 [MUX_PUBLIC]
00025 [webhosthidden]
00026 enum ColorPickerHsvChannel
00027 {
00028     Hue = 0,
00029     Saturation = 1,
00030     Value = 2,
00031     Alpha = 3,
00032 };
00033
00034 [MUX_PUBLIC]
00035 [webhosthidden]
00036 runtimeclass ColorChangedEventArgs
00037 {
00038     Windows.UI.Color OldColor { get; };
00039     Windows.UI.Color NewColor { get; };
00040 }
00041
00042 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewRS4Page Member List

This is the complete list of members for NavigationViewRS4Page, including all inherited members.
AddItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
AutoSuggestCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
AutoSuggestCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
BackRequestedStateResetButton_Click(object sender, RoutedEventArgs args) | NavigationViewRS4Page | [inline, private]
ChangeContent_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ChangePaneTitle_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ClearHeaderButton_Click(object sender, RoutedEventArgs args) | NavigationViewRS4Page | [inline, private]
ClearMenuButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ClearSelectedItem_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ClosingEventCountResetButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewRS4Page | [inline, private]
CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewRS4Page | [inline, private]
CopyGamesLabelButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
CopyVolumeToolTipButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewRS4Page | [inline, private]
FindAndGiveAutomationNameToVisualChild(string childName) | NavigationViewRS4Page | [inline, private]
FlipOrientation_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewRS4Page | [inline, private]
m_closedEventsFired | NavigationViewRS4Page | [private]
m_closingEventsFired | NavigationViewRS4Page | [private]
m_newItemIndex | NavigationViewRS4Page | [private]
MoviesEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
MoviesEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
NavigationViewRS4Page() | NavigationViewRS4Page | [inline]
NavigationViewRS4Page_Loaded(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
NavView_BackRequested(NavigationView nv, NavigationViewBackRequestedEventArgs args) | NavigationViewRS4Page | [inline, private]
NavView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args) | NavigationViewRS4Page | [inline, private]
NavView_PaneClosed(NavigationView sender, object args) | NavigationViewRS4Page | [inline, private]
NavView_PaneClosing(NavigationView sender, NavigationViewPaneClosingEventArgs args) | NavigationViewRS4Page | [inline, private]
NavView_PaneOpened(NavigationView sender, object args) | NavigationViewRS4Page | [inline, private]
NavView_PaneOpening(NavigationView sender, object args) | NavigationViewRS4Page | [inline, private]
NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) | NavigationViewRS4Page | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | NavigationViewRS4Page | [inline, protected]
OpenPaneButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewRS4Page | [inline, private]
PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
RemoveItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ScrambleButton_Click(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
SelectedItemCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewRS4Page | [inline, private]
SelectionFollowFocus_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
SelectionFollowFocus_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
SetHeaderButton_Click(object sender, RoutedEventArgs args) | NavigationViewRS4Page | [inline, private]
SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
TestFrameCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
TestPage_Loaded(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
TitleBarCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ToggleBackgroundChanged(DependencyObject o, DependencyProperty p) | NavigationViewRS4Page | [inline, private]
ToggleButtonStyleCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
ToggleButtonStyleCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewRS4Page | [inline, private]
UpdateToggleBackgroundColor(Button toggleButton) | NavigationViewRS4Page | [inline, private]
WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewRS4Page | [inline, private]
Generated on Sun Dec 1 2024 20:54:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/IndexPath.properties.cpp Source File

  • File List
  • File Members
  • Generated

IndexPath.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "IndexPath.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(IndexPath)
00012 }
00013
00014 #include "IndexPath.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemHeader Member List

This is the complete list of members for NavigationViewItemHeader, including all inherited members.
ForwardRefToBaseReferenceTracker(NavigationViewItemBase) NavigationViewItemHeader() | NavigationViewItemHeader |
OnApplyTemplate() override | NavigationViewItemHeader |
OnNavigationViewItemBaseDepthChanged() override | NavigationViewItemHeader | [private]
OnSplitViewPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | NavigationViewItemHeader | [private]
UpdateIsClosedCompact() | NavigationViewItemHeader | [private]
UpdateItemIndentation() | NavigationViewItemHeader | [private]
UpdateVisualState(bool useTransitions) | NavigationViewItemHeader | [private]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TwoPaneViewProperties Member List

This is the complete list of members for TwoPaneViewProperties, including all inherited members.
ClearProperties() | TwoPaneViewProperties | [static]
EnsureProperties() | TwoPaneViewProperties | [static]
m_modeChangedEventSource | TwoPaneViewProperties |
MinTallModeHeight(double value) | TwoPaneViewProperties |
MinTallModeHeight() | TwoPaneViewProperties |
MinTallModeHeightProperty() | TwoPaneViewProperties | [inline, static]
MinWideModeWidth(double value) | TwoPaneViewProperties |
MinWideModeWidth() | TwoPaneViewProperties |
MinWideModeWidthProperty() | TwoPaneViewProperties | [inline, static]
Mode(winrt::TwoPaneViewMode const &value) | TwoPaneViewProperties |
Mode() | TwoPaneViewProperties |
ModeChanged(winrt::TypedEventHandler< winrt::TwoPaneView, winrt::IInspectable > const &value) | TwoPaneViewProperties |
ModeChanged(winrt::event_token const &token) | TwoPaneViewProperties |
ModeProperty() | TwoPaneViewProperties | [inline, static]
OnMinTallModeHeightPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnMinWideModeWidthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnPane1LengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnPane1PropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnPane2LengthPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnPane2PropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnPanePriorityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnTallModeConfigurationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
OnWideModeConfigurationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TwoPaneViewProperties | [static]
Pane1(winrt::UIElement const &value) | TwoPaneViewProperties |
Pane1() | TwoPaneViewProperties |
Pane1Length(winrt::GridLength const &value) | TwoPaneViewProperties |
Pane1Length() | TwoPaneViewProperties |
Pane1LengthProperty() | TwoPaneViewProperties | [inline, static]
Pane1Property() | TwoPaneViewProperties | [inline, static]
Pane2(winrt::UIElement const &value) | TwoPaneViewProperties |
Pane2() | TwoPaneViewProperties |
Pane2Length(winrt::GridLength const &value) | TwoPaneViewProperties |
Pane2Length() | TwoPaneViewProperties |
Pane2LengthProperty() | TwoPaneViewProperties | [inline, static]
Pane2Property() | TwoPaneViewProperties | [inline, static]
PanePriority(winrt::TwoPaneViewPriority const &value) | TwoPaneViewProperties |
PanePriority() | TwoPaneViewProperties |
PanePriorityProperty() | TwoPaneViewProperties | [inline, static]
s_MinTallModeHeightProperty | TwoPaneViewProperties | [static]
s_MinWideModeWidthProperty | TwoPaneViewProperties | [static]
s_ModeProperty | TwoPaneViewProperties | [static]
s_Pane1LengthProperty | TwoPaneViewProperties | [static]
s_Pane1Property | TwoPaneViewProperties | [static]
s_Pane2LengthProperty | TwoPaneViewProperties | [static]
s_Pane2Property | TwoPaneViewProperties | [static]
s_PanePriorityProperty | TwoPaneViewProperties | [static]
s_TallModeConfigurationProperty | TwoPaneViewProperties | [static]
s_WideModeConfigurationProperty | TwoPaneViewProperties | [static]
TallModeConfiguration(winrt::TwoPaneViewTallModeConfiguration const &value) | TwoPaneViewProperties |
TallModeConfiguration() | TwoPaneViewProperties |
TallModeConfigurationProperty() | TwoPaneViewProperties | [inline, static]
TwoPaneViewProperties() | TwoPaneViewProperties |
WideModeConfiguration(winrt::TwoPaneViewWideModeConfiguration const &value) | TwoPaneViewProperties |
WideModeConfiguration() | TwoPaneViewProperties |
WideModeConfigurationProperty() | TwoPaneViewProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BridgeAnotherClass Member List

This is the complete list of members for BridgeAnotherClass, including all inherited members.
Prop BridgeAnotherClass
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollOptions.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollOptions.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenter.h"
00007 #include "ScrollingScrollOptions.g.h"
00008
00009 class ScrollingScrollOptions :
00010     public winrt::implementation::ScrollingScrollOptionsT<ScrollingScrollOptions>
00011 {
00012 public:
00013     ScrollingScrollOptions(winrt::ScrollingAnimationMode const& animationMode);
00014     ScrollingScrollOptions(winrt::ScrollingAnimationMode const& animationMode, winrt::ScrollingSnapPointsMode const& snapPointsMode);
00015
00016     ~ScrollingScrollOptions()
00017     {
00018         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00019     }
00020
00021     static constexpr winrt::ScrollingAnimationMode s_defaultAnimationMode{ winrt::ScrollingAnimationMode::Auto };
00022     static constexpr winrt::ScrollingSnapPointsMode s_defaultSnapPointsMode{ winrt::ScrollingSnapPointsMode::Default };
00023
00024     winrt::ScrollingAnimationMode AnimationMode() const;
00025     void AnimationMode(winrt::ScrollingAnimationMode const& animationMode);
00026
00027     winrt::ScrollingSnapPointsMode SnapPointsMode() const;
00028     void SnapPointsMode(winrt::ScrollingSnapPointsMode const& snapPointsMode);
00029
00030 private:
00031     winrt::ScrollingAnimationMode m_animationMode{ s_defaultAnimationMode };
00032     winrt::ScrollingSnapPointsMode m_snapPointsMode{ s_defaultSnapPointsMode };
00033 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewerIRefreshInfoProviderAdapter Member List

This is the complete list of members for ScrollViewerIRefreshInfoProviderAdapter, including all inherited members.
abi_enter() | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
Adapt(winrt::FxScrollViewer const &adaptee, winrt::Size const &size) | ScrollViewerIRefreshInfoProviderAdapter |
AdaptFromTree(winrt::UIElement const &root, winrt::Size const &size) | ScrollViewerIRefreshInfoProviderAdapter |
AdaptFromTreeRecursiveHelper(const winrt::DependencyObject &, int depth) | ScrollViewerIRefreshInfoProviderAdapter | [private]
CheckThread() | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
CleanupIRefreshInfoProvider() | ScrollViewerIRefreshInfoProviderAdapter | [private]
CleanupScrollViewer() | ScrollViewerIRefreshInfoProviderAdapter | [private]
DeleteInstanceOnUIThread(std::unique_ptr< ScrollViewerIRefreshInfoProviderAdapter > &&self) noexcept | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
final_release(std::unique_ptr< ScrollViewerIRefreshInfoProviderAdapter > &&self) | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
GetScrollContent() | ScrollViewerIRefreshInfoProviderAdapter | [private]
IsOnThread() | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
IsOrientationVertical() | ScrollViewerIRefreshInfoProviderAdapter | [private]
IsWithinOffsetThreshold() | ScrollViewerIRefreshInfoProviderAdapter | [private]
MakeInteractionSource(const winrt::UIElement &contentParent) | ScrollViewerIRefreshInfoProviderAdapter | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
OnRefreshCompleted(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollViewerIRefreshInfoProviderAdapter | [private]
OnRefreshStarted(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollViewerIRefreshInfoProviderAdapter | [private]
OnScrollViewerDirectManipulationCompleted(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollViewerIRefreshInfoProviderAdapter | [private]
OnScrollViewerLoaded(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ScrollViewerIRefreshInfoProviderAdapter | [private]
OnScrollViewerViewChanging(const winrt::IInspectable &sender, const winrt::Microsoft::UI::Xaml::Controls::ScrollViewerViewChangingEventArgs &args) | ScrollViewerIRefreshInfoProviderAdapter | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ScrollViewerIRefreshInfoProviderAdapter, winrt::implementation::ScrollViewerIRefreshInfoProviderAdapterT, winrt::composable, winrt::composing > | [inline]
ScrollViewerIRefreshInfoProviderAdapter(winrt::RefreshPullDirection const &refreshPullDirection, winrt::IAdapterAnimationHandler const &animationHandler) | ScrollViewerIRefreshInfoProviderAdapter |
SetAnimations(winrt::UIElement const &refreshVisualizerContainer) | ScrollViewerIRefreshInfoProviderAdapter |
~ScrollViewerIRefreshInfoProviderAdapter() | ScrollViewerIRefreshInfoProviderAdapter |
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemTemplateSettings Member List

This is the complete list of members for TreeViewItemTemplateSettings, including all inherited members.
ClearProperties() | TreeViewItemTemplateSettingsProperties | [static]
CollapsedGlyphVisibility(winrt::Visibility const &value) | TreeViewItemTemplateSettingsProperties |
CollapsedGlyphVisibility() | TreeViewItemTemplateSettingsProperties |
CollapsedGlyphVisibilityProperty() | TreeViewItemTemplateSettingsProperties | [inline, static]
DragItemsCount(int value) | TreeViewItemTemplateSettingsProperties |
DragItemsCount() | TreeViewItemTemplateSettingsProperties |
DragItemsCountProperty() | TreeViewItemTemplateSettingsProperties | [inline, static]
EnsureProperties() | TreeViewItemTemplateSettingsProperties | [static]
ExpandedGlyphVisibility(winrt::Visibility const &value) | TreeViewItemTemplateSettingsProperties |
ExpandedGlyphVisibility() | TreeViewItemTemplateSettingsProperties |
ExpandedGlyphVisibilityProperty() | TreeViewItemTemplateSettingsProperties | [inline, static]
Indentation(winrt::Thickness const &value) | TreeViewItemTemplateSettingsProperties |
Indentation() | TreeViewItemTemplateSettingsProperties |
IndentationProperty() | TreeViewItemTemplateSettingsProperties | [inline, static]
s_CollapsedGlyphVisibilityProperty | TreeViewItemTemplateSettingsProperties | [static]
s_DragItemsCountProperty | TreeViewItemTemplateSettingsProperties | [static]
s_ExpandedGlyphVisibilityProperty | TreeViewItemTemplateSettingsProperties | [static]
s_IndentationProperty | TreeViewItemTemplateSettingsProperties | [static]
TreeViewItemTemplateSettings() | TreeViewItemTemplateSettings |
TreeViewItemTemplateSettingsProperties() | TreeViewItemTemplateSettingsProperties |
Generated on Sun Dec 1 2024 20:53:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionProvider Member List

This is the complete list of members for ItemCollectionTransitionProvider, including all inherited members.
abi_enter() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
CleanTransitionsBatch() | ItemCollectionTransitionProvider | [private]
ClearProperties() | ItemCollectionTransitionProviderProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< ItemCollectionTransitionProvider > &&self) noexcept | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline, static]
EnsureProperties() | ItemCollectionTransitionProviderProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< ItemCollectionTransitionProvider > &&self) | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
GetInner() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
IsOnThread() | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
ItemCollectionTransitionProviderProperties() | ItemCollectionTransitionProviderProperties |
m_keepAliveTimersMap | ItemCollectionTransitionProvider | [private]
m_transitionCompletedEventSource | ItemCollectionTransitionProviderProperties |
m_transitionsMap | ItemCollectionTransitionProvider | [private]
m_transitionsWithAnimationsMap | ItemCollectionTransitionProvider | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
NotifyTransitionCompleted(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider |
OnKeepAliveTimerTick(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ItemCollectionTransitionProvider | [private]
OnRendering(const winrt::IInspectable &sender, const winrt::IInspectable &args) | ItemCollectionTransitionProvider | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
QueueTransition(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider |
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemCollectionTransitionProvider, winrt::implementation::ItemCollectionTransitionProviderT, winrt::composing, winrt::composable > | [inline]
ShouldAnimate(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider |
ShouldAnimateCore(winrt::ItemCollectionTransition const &transition) | ItemCollectionTransitionProvider | [virtual]
StartNewKeepAliveTimer() | ItemCollectionTransitionProvider | [private]
StartTransitions(winrt::IVector< winrt::ItemCollectionTransition > const &transitions) | ItemCollectionTransitionProvider | [virtual]
TransitionCompleted(winrt::TypedEventHandler< winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs > const &value) | ItemCollectionTransitionProviderProperties |
TransitionCompleted(winrt::event_token const &token) | ItemCollectionTransitionProviderProperties |
~ItemCollectionTransitionProvider() | ItemCollectionTransitionProvider |
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/DisplayRegionHelperTestApi.h Source File

  • File List
  • File Members
  • TwoPaneView

DisplayRegionHelperTestApi.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "DisplayRegionHelperTestApi.g.h"
00007
00008 class DisplayRegionHelperTestApi :
00009     public winrt::implementation::DisplayRegionHelperTestApiT<DisplayRegionHelperTestApi>
00010 {
00011 public:
00012     static bool SimulateDisplayRegions();
00013     static void SimulateDisplayRegions(bool value);
00014
00015     static winrt::TwoPaneViewMode SimulateMode();
00016     static void SimulateMode(winrt::TwoPaneViewMode const& value);
00017 };
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBarAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

TitleBarAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TitleBarAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TitleBarAutomationPeer)
00012 }
00013
00014 #include "TitleBarAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBadge/TestUI/InfoBadgePage.xaml.cs Source File

  • File List
  • File Members
  • InfoBadge
  • TestUI

InfoBadgePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012 using Microsoft.UI.Xaml.Controls;
00013 using IconSource = Microsoft.UI.Xaml.Controls.IconSource;
00014 using FontIconSource = Microsoft.UI.Xaml.Controls.FontIconSource;
00015 using BitmapIconSource = Microsoft.UI.Xaml.Controls.BitmapIconSource;
00016 using SymbolIconSource = Microsoft.UI.Xaml.Controls.SymbolIconSource;
00017 using PathIconSource = Microsoft.UI.Xaml.Controls.PathIconSource;
00018 using Microsoft.UI.Xaml.Media.Imaging;
00019 using Microsoft.UI.Xaml.Controls.AnimatedVisuals;
00020 using ColorChangedEventArgs = Microsoft.UI.Xaml.Controls.ColorChangedEventArgs;
00021
00022 //using InfoBadge = Microsoft.UI.Xaml.Controls.InfoBadge;
00023
00024 namespace MUXControlsTestApp
00025 {
00026     [TopLevelTestPage(Name = "InfoBadge")]
00027     public sealed partial class InfoBadgePage : TestPage
00028     {
00029         IconSource pageIconSource = null;
00030         SolidColorBrush iconForegroundBrush = new SolidColorBrush();
00031
00032         public InfoBadgePage()
00033         {
00034             this.InitializeComponent();
00035             iconForegroundBrush.Color = IconForegroundColorPicker.Color;
00036         }
00037
00038         public void IconComboBoxSelectionChanged(object sender, SelectionChangedEventArgs args)
00039         {
00040             if (IconComboBox.SelectedItem == this.NullIcon)
00041             {
00042                 UpdateIcon(null);
00043             }
00044             else if (IconComboBox.SelectedItem == this.FontIcon)
00045             {
00046                 UpdateIcon(MakeFontIcon());
00047             }
00048             else if (IconComboBox.SelectedItem == this.BitmapIcon)
00049             {
00050                 UpdateIcon(MakeBitmapIcon());
00051             }
00052             else if (IconComboBox.SelectedItem == this.ImageIcon)
00053             {
00054                 UpdateIcon(MakeImageIcon());
00055             }
00056             else if (IconComboBox.SelectedItem == this.SymbolIcon)
00057             {
00058                 UpdateIcon(MakeSymbolIcon());
00059             }
00060             else if (IconComboBox.SelectedItem == this.PathIcon)
00061             {
00062                 UpdateIcon(MakePathIcon());
00063             }
00064             else if (IconComboBox.SelectedItem == this.AnimatedIcon)
00065             {
00066                 UpdateIcon(MakeAnimatedIcon());
00067             }
00068         }
00069
00070         public void OnIconForegroundColorPickerColorChanged(object sender, ColorChangedEventArgs args)
00071         {
00072             iconForegroundBrush.Color = args.NewColor;
00073             if (pageIconSource != null)
00074             {
00075                 pageIconSource.Foreground = iconForegroundBrush;
00076             }
00077         }
00078
00079         public void OnForegroundToNullButtonClicked(object sender, RoutedEventArgs args)
00080         {
00081             if (pageIconSource != null)
00082             {
00083                 pageIconSource.Foreground = null;
00084             }
00085         }
00086
00087         public void OnClearForegroundButtonClicked(object sender, RoutedEventArgs args)
00088         {
00089             if (pageIconSource != null)
00090             {
00091                 pageIconSource.ClearValue(IconSource.ForegroundProperty);
00092             }
00093         }
00094
00095         private void UpdateIcon(IconSource iconSource)
00096         {
00097             pageIconSource = iconSource;
00098             DynamicInfoBadge.IconSource = iconSource;
00099         }
00100
00101         private FontIconSource MakeFontIcon()
00102         {
00103             FontIconSource iconSource = new FontIconSource();
00104             iconSource.Glyph = "99+";
00105             iconSource.FontFamily = new FontFamily("XamlAutoFontFamily");
00106             iconSource.Foreground = iconForegroundBrush;
00107             return iconSource;
00108         }
00109
00110         private BitmapIconSource MakeBitmapIcon()
00111         {
00112             BitmapIconSource iconSource = new BitmapIconSource();
00113             iconSource.ShowAsMonochrome = false;
00114             Uri uri = new Uri("ms-appx:/Assets/ingredient1.png");
00115             iconSource.UriSource = uri;
00116             iconSource.Foreground = iconForegroundBrush;
00117             return iconSource;
00118         }
00119
00120         private ImageIconSource MakeImageIcon()
00121         {
00122             ImageIconSource iconSource = new ImageIconSource();
00123             var uri = new Uri("https://raw.githubusercontent.com/DiemenDesign/LibreICONS/master/svg-color/libre-camera-panorama.svg");
00124             iconSource.ImageSource = new SvgImageSource(uri);
00125             iconSource.Foreground = iconForegroundBrush;
00126             return iconSource;
00127         }
00128
00129         private SymbolIconSource MakeSymbolIcon()
00130         {
00131             SymbolIconSource iconSource = new SymbolIconSource();
00132             iconSource.Symbol = Symbol.Setting;
00133             iconSource.Foreground = iconForegroundBrush;
00134             return iconSource;
00135         }
00136
00137         private PathIconSource MakePathIcon()
00138         {
00139             PathIconSource iconSource = new PathIconSource();
00140             var geometry = new RectangleGeometry();
00141             geometry.Rect = new Windows.Foundation.Rect { Width=5, Height=2, X=0, Y=0 };
00142             iconSource.Data = geometry;
00143             iconSource.Foreground = iconForegroundBrush;
00144             return iconSource;
00145         }
00146
00147         private AnimatedIconSource MakeAnimatedIcon()
00148         {
00149             AnimatedIconSource iconSource = new AnimatedIconSource();
00150             iconSource.Source = new AnimatedSettingsVisualSource();
00151             iconSource.FallbackIconSource = new SymbolIconSource { Symbol = Symbol.Setting, Foreground = iconForegroundBrush };
00152             iconSource.Foreground = iconForegroundBrush;
00153             return iconSource;
00154         }
00155     }
00156 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooksFactory.cpp Source File

  • File List
  • File Members
  • Repeater

RepeaterTestHooksFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RepeaterTestHooksFactory.h"
00007
00008 #include "RepeaterTestHooks.properties.cpp"
00009
00010 RepeaterTestHooks* RepeaterTestHooks::s_testHooks = nullptr;
00011
00012 void RepeaterTestHooks::EnsureHooks()
00013 {
00014     if (!s_testHooks)
00015     {
00016         s_testHooks = winrt::make_self<RepeaterTestHooks>().detach();
00017     }
00018 }
00019
00020 winrt::event_token RepeaterTestHooks::BuildTreeCompleted(winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> const& value)
00021 {
00022     EnsureHooks();
00023     return s_testHooks->BuildTreeCompletedImpl(value);
00024 }
00025
00026 void RepeaterTestHooks::BuildTreeCompleted(winrt::event_token const& token)
00027 {
00028     if (s_testHooks)
00029     {
00030         s_testHooks->BuildTreeCompletedImpl(token);
00031     }
00032 }
00033
00034 void RepeaterTestHooks::NotifyBuildTreeCompleted()
00035 {
00036     if (s_testHooks)
00037     {
00038         s_testHooks->NotifyBuildTreeCompletedImpl();
00039     }
00040 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewTearOutWindowWithoutDataItems.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

TabViewTearOutWindowWithoutDataItems.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Media;
00007 using System.Linq;
00008 using Windows.Graphics;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     public sealed partial class TabViewTearOutWindowWithoutDataItems : Window
00013     {
00014         public static readonly SizeInt32 DefaultWindowSize = new(1000, 300);
00015
00016         TabViewTearOutWindowWithoutDataItems tearOutWindow;
00017
00018         public TabViewTearOutWindowWithoutDataItems()
00019         {
00020             this.InitializeComponent();
00021             Title = "MUXControlsTestApp.Desktop - Secondary TabViewTearOutWindow";
00022         }
00023
00024         // A user has begun interacting with a tab, such that they might want to tear it out into its own window.
00025         // We'll create a hidden window with the tab's contents that will be shown if the user tears out the tab.
00026         private void OnTabTearOutWindowRequested(TabView _, TabViewTabTearOutWindowRequestedEventArgs args)
00027         {
00028             tearOutWindow = new() { ExtendsContentIntoTitleBar = true };
00029             tearOutWindow.TearOutTabsTabView.TabItems.Clear();
00030             tearOutWindow.AppWindow.Hide();
00031             tearOutWindow.AppWindow.Resize(DefaultWindowSize);
00032             args.NewWindowId = tearOutWindow.AppWindow.Id;
00033         }
00034
00035         // A user has torn out a tab, so now is the time we need to remove the torn-out item from our item list.
00036         private void OnTabTearOutRequested(TabView tabView, TabViewTabTearOutRequestedEventArgs args)
00037         {
00038             foreach (var tab in args.Tabs.Cast<TabViewItem>())
00039             {
00040                 tabView.TabItems.Remove(tab);
00041                 tearOutWindow.TearOutTabsTabView.TabItems.Add(tab);
00042             }
00043         }
00044
00045         // A tab being dragged from within this process has been dropped on another tab view.  This gives the tab view
00046         // the opportunity to check to see whether it actually want to accepts the new tab.  In the case of this test app,
00047         // however, we'll just always accept a dropped tab.
00048         private void OnExternalTornOutTabsDropping(TabView _, TabViewExternalTornOutTabsDroppingEventArgs args)
00049         {
00050             args.AllowDrop = true;
00051         }
00052
00053         // The tab being dragged has now been dropped onto another tab view.  We'll add its item to our item list.
00054         // The tab view will take care of disposing of the window.
00055         private void OnExternalTornOutTabsDropped(TabView tabView, TabViewExternalTornOutTabsDroppedEventArgs args)
00056         {
00057             int insertionIndex = args.DropIndex;
00058
00059             foreach (var tab in args.Tabs.Cast<TabViewItem>())
00060             {
00061                 TabView otherTabView = null;
00062                 DependencyObject current = tab;
00063
00064                 while (otherTabView == null)
00065                 {
00066                     if (current is TabView foundTabView)
00067                     {
00068                         otherTabView = foundTabView;
00069                     }
00070
00071                     current = VisualTreeHelper.GetParent(current);
00072                 }
00073
00074                 otherTabView?.TabItems.Remove(tab);
00075                 tabView.TabItems.Insert(insertionIndex++, tab);
00076             }
00077         }
00078     }
00079 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/Virtual/VirtualizingUniformStackLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • Virtual

VirtualizingUniformStackLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utils;
00005 using System;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Specialized;
00008 using System.Linq;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using MUXControlsTestApp.Utilities;
00012
00013 namespace MUXControlsTestApp.Samples
00014 {
00015     public sealed partial class VirtualizingUniformStackLayoutSamplePage : Page
00016     {
00017         TestObservableCollection<int> data = new TestObservableCollection<int>(Enumerable.Range(0, 1000));
00018         public VirtualizingUniformStackLayoutSamplePage()
00019         {
00020             this.InitializeComponent();
00021
00022             repeater.ItemTemplate = elementFactory;
00023             repeater.ItemsSource = data;
00024             bringIntoView.Click += BringIntoView_Click;
00025             insert.Click += Insert_Click;
00026         }
00027
00028         private void BringIntoView_Click(object sender, RoutedEventArgs e)
00029         {
00030             int index = 0;
00031             if (int.TryParse(tb.Text, out index))
00032             {
00033                 var anchor = repeater.GetOrCreateElement(index);
00034                 anchor.StartBringIntoView();
00035             }
00036         }
00037
00038         private void Insert_Click(object sender, RoutedEventArgs e)
00039         {
00040             int index = 0;
00041             if(!int.TryParse(indexTb.Text, out index))
00042             {
00043                 index = 0;
00044             }
00045
00046             int count = 1;
00047             if(!int.TryParse(countTb.Text, out count))
00048             {
00049                 count = 1;
00050             }
00051
00052             for (int i = 0; i < count; i++)
00053             {
00054                 data.Insert(index, 50000 + i);
00055             }
00056
00057         }
00058     }
00059 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTabDragStartingEventArgs Member List

This is the complete list of members for TabViewTabDragStartingEventArgs, including all inherited members.
Cancel() | TabViewTabDragStartingEventArgs | [inline]
Cancel(bool value) | TabViewTabDragStartingEventArgs | [inline]
Data() | TabViewTabDragStartingEventArgs | [inline]
Item() | TabViewTabDragStartingEventArgs | [inline]
Tab() | TabViewTabDragStartingEventArgs | [inline]
TabViewTabDragStartingEventArgs(winrt::DragItemsStartingEventArgs const &args, winrt::IInspectable const &item, winrt::TabViewItem tab) | TabViewTabDragStartingEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewPage Member List

This is the complete list of members for ScrollViewPage, including all inherited members.
CmbScrollViewOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewPage | [inline, private]
ScrollViewPage() | ScrollViewPage | [inline]
Generated on Sun Dec 1 2024 20:54:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/ToggleSplitButton.cpp Source File

  • File List
  • File Members
  • SplitButton

ToggleSplitButton.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ToggleSplitButton.h"
00007 #include "SplitButton.h"
00008 #include "SplitButtonEventArgs.h"
00009 #include "ToggleSplitButtonAutomationPeer.h"
00010 #include "RuntimeProfiler.h"
00011 #include "ResourceAccessor.h"
00012
00013 ToggleSplitButton::ToggleSplitButton()
00014 {
00015     __RP_Marker_ClassById(RuntimeProfiler::ProfId_SplitButton);
00016
00017     SetDefaultStyleKey(this);
00018 }
00019
00020 void ToggleSplitButton::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00021 {
00022     winrt::IDependencyProperty property = args.Property();
00023
00024     if (property == s_IsCheckedProperty)
00025     {
00026         OnIsCheckedChanged();
00027     }
00028 }
00029
00030 winrt::AutomationPeer ToggleSplitButton::OnCreateAutomationPeer()
00031 {
00032     return winrt::make<ToggleSplitButtonAutomationPeer>(*this);
00033 }
00034
00035 void ToggleSplitButton::OnIsCheckedChanged()
00036 {
00037     if (m_hasLoaded)
00038     {
00039         auto eventArgs = winrt::make_self<ToggleSplitButtonIsCheckedChangedEventArgs>();
00040         m_isCheckedChangedEventSource(*this, *eventArgs);
00041
00042         if (auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00043         {
00044             const auto newValue = IsChecked() ? winrt::ToggleState::On : winrt::ToggleState::Off;
00045             const auto oldValue = (newValue == winrt::ToggleState::On) ? winrt::ToggleState::Off : winrt::ToggleState::On;
00046             peer.RaisePropertyChangedEvent(winrt::TogglePatternIdentifiers::ToggleStateProperty(), box_value(oldValue), box_value(newValue));
00047         }
00048     }
00049
00050     UpdateVisualStates();
00051 }
00052
00053 void ToggleSplitButton::OnClickPrimary(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args)
00054 {
00055     Toggle();
00056
00057     __super::OnClickPrimary(sender, args);
00058 }
00059
00060 bool ToggleSplitButton::InternalIsChecked()
00061 {
00062     return IsChecked();
00063 }
00064
00065 void ToggleSplitButton::Toggle()
00066 {
00067     IsChecked(!IsChecked());
00068 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressRing.properties.h Source File

  • File List
  • File Members
  • Generated

ProgressRing.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ProgressRingProperties
00008 {
00009 public:
00010     ProgressRingProperties();
00011
00012     void DeterminateSource(winrt::IAnimatedVisualSource const& value);
00013     winrt::IAnimatedVisualSource DeterminateSource();
00014
00015     void IndeterminateSource(winrt::IAnimatedVisualSource const& value);
00016     winrt::IAnimatedVisualSource IndeterminateSource();
00017
00018     void IsActive(bool value);
00019     bool IsActive();
00020
00021     void IsIndeterminate(bool value);
00022     bool IsIndeterminate();
00023
00024     void Maximum(double value);
00025     double Maximum();
00026
00027     void Minimum(double value);
00028     double Minimum();
00029
00030     void TemplateSettings(winrt::ProgressRingTemplateSettings const& value);
00031     winrt::ProgressRingTemplateSettings TemplateSettings();
00032
00033     void Value(double value);
00034     double Value();
00035
00036     static winrt::DependencyProperty DeterminateSourceProperty() { return s_DeterminateSourceProperty; }
00037     static winrt::DependencyProperty IndeterminateSourceProperty() { return s_IndeterminateSourceProperty; }
00038     static winrt::DependencyProperty IsActiveProperty() { return s_IsActiveProperty; }
00039     static winrt::DependencyProperty IsIndeterminateProperty() { return s_IsIndeterminateProperty; }
00040     static winrt::DependencyProperty MaximumProperty() { return s_MaximumProperty; }
00041     static winrt::DependencyProperty MinimumProperty() { return s_MinimumProperty; }
00042     static winrt::DependencyProperty TemplateSettingsProperty() { return s_TemplateSettingsProperty; }
00043     static winrt::DependencyProperty ValueProperty() { return s_ValueProperty; }
00044
00045     static GlobalDependencyProperty s_DeterminateSourceProperty;
00046     static GlobalDependencyProperty s_IndeterminateSourceProperty;
00047     static GlobalDependencyProperty s_IsActiveProperty;
00048     static GlobalDependencyProperty s_IsIndeterminateProperty;
00049     static GlobalDependencyProperty s_MaximumProperty;
00050     static GlobalDependencyProperty s_MinimumProperty;
00051     static GlobalDependencyProperty s_TemplateSettingsProperty;
00052     static GlobalDependencyProperty s_ValueProperty;
00053
00054     static void EnsureProperties();
00055     static void ClearProperties();
00056
00057     static void OnDeterminateSourcePropertyChanged(
00058         winrt::DependencyObject const& sender,
00059         winrt::DependencyPropertyChangedEventArgs const& args);
00060
00061     static void OnIndeterminateSourcePropertyChanged(
00062         winrt::DependencyObject const& sender,
00063         winrt::DependencyPropertyChangedEventArgs const& args);
00064
00065     static void OnIsActivePropertyChanged(
00066         winrt::DependencyObject const& sender,
00067         winrt::DependencyPropertyChangedEventArgs const& args);
00068
00069     static void OnIsIndeterminatePropertyChanged(
00070         winrt::DependencyObject const& sender,
00071         winrt::DependencyPropertyChangedEventArgs const& args);
00072
00073     static void OnMaximumPropertyChanged(
00074         winrt::DependencyObject const& sender,
00075         winrt::DependencyPropertyChangedEventArgs const& args);
00076
00077     static void OnMinimumPropertyChanged(
00078         winrt::DependencyObject const& sender,
00079         winrt::DependencyPropertyChangedEventArgs const& args);
00080
00081     static void OnValuePropertyChanged(
00082         winrt::DependencyObject const& sender,
00083         winrt::DependencyPropertyChangedEventArgs const& args);
00084 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/TestUI/ItemsViewIntegrationPage.xaml.cs Source File

  • File List
  • File Members
  • ItemsView
  • TestUI

ItemsViewIntegrationPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Diagnostics;
00008 using Microsoft.UI;
00009 using Microsoft.UI.Private.Controls;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Controls;
00012 using Microsoft.UI.Xaml.Controls.Primitives;
00013 using Microsoft.UI.Xaml.Input;
00014 using Microsoft.UI.Xaml.Media;
00015 using Microsoft.UI.Xaml.Media.Imaging;
00016 using Microsoft.UI.Xaml.Navigation;
00017 using MUXControlsTestApp.Samples.Model;
00018
00019 using ItemsRepeater = Microsoft.UI.Xaml.Controls.ItemsRepeater;
00020 using ScrollView = Microsoft.UI.Xaml.Controls.ScrollView;
00021 using ItemsView = Microsoft.UI.Xaml.Controls.ItemsView;
00022 using ScrollingScrollAnimationStartingEventArgs = Microsoft.UI.Xaml.Controls.ScrollingScrollAnimationStartingEventArgs;
00023 using ScrollingZoomAnimationStartingEventArgs = Microsoft.UI.Xaml.Controls.ScrollingZoomAnimationStartingEventArgs;
00024 using ScrollingScrollCompletedEventArgs = Microsoft.UI.Xaml.Controls.ScrollingScrollCompletedEventArgs;
00025 using ScrollingZoomCompletedEventArgs = Microsoft.UI.Xaml.Controls.ScrollingZoomCompletedEventArgs;
00026 using MUXControlsTestHooks = Microsoft.UI.Private.Controls.MUXControlsTestHooks;
00027 using MUXControlsTestHooksLoggingMessageEventArgs = Microsoft.UI.Private.Controls.MUXControlsTestHooksLoggingMessageEventArgs;
00028 using ItemsViewTestHooks = Microsoft.UI.Private.Controls.ItemsViewTestHooks;
00029
00030 namespace MUXControlsTestApp
00031 {
00032     public sealed partial class ItemsViewIntegrationPage : TestPage
00033     {
00034         private object _asyncEventReportingLock = new object();
00035         private List<string> _lstAsyncEventMessage = new List<string>();
00036         private List<string> _fullLogs = new List<string>();
00037         private ObservableCollection<Entity> _colPhotos = null;
00038         private DataTemplate[] _photoTemplates = new DataTemplate[8];
00039         private SolidColorBrush _redBrush = new SolidColorBrush(Colors.Red);
00040         private SolidColorBrush _whiteBrush = new SolidColorBrush(Colors.White);
00041         private ScrollView _scrollView = null;
00042         private BringIntoViewOptions _bringIntoViewOptions = null;
00043         private int[] _yearPhotoCounts = null;
00044         private int[,] _monthPhotoCounts = null;
00045         private bool _populateAnnotatedScrollBar = true;
00046         private int _requestedDetailLabelYearIndex = 0;
00047         private int _requestedDetailLabelPhotoInYearIndex = 0;
00048         private int _populateAnnotatedScrollBarPending = 0;
00049         private int _populateHeaderPending = 0;
00050         private int _yearCount = 2; // 16;    TODO: Restore 16 after bug "43218932 - Out of memory error when loading images" was fixed.
00051         private int _averageMonthCount = 2; // 50;    TODO: Restore 50 after bug "43218932 - Out of memory error when loading images" was fixed.
00052         private string[] _months = new string[12] { "December", "November", "October", "September", "August", "July", "June", "May", "April", "March", "February", "January" };
00053
00054         public ItemsViewIntegrationPage()
00055         {
00056             this.InitializeComponent();
00057
00058             if (chkLogAnnotatedScrollBarMessages.IsChecked == true ||
00059                 chkLogLinedFlowLayoutMessages.IsChecked == true ||
00060                 chkLogItemsViewMessages.IsChecked == true ||
00061                 chkLogScrollPresenterMessages.IsChecked == true ||
00062                 chkLogScrollViewMessages.IsChecked == true ||
00063                 chkLogItemsRepeaterMessages.IsChecked == true)
00064             {
00065                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00066
00067                 if (chkLogItemsRepeaterMessages.IsChecked == true)
00068                 {
00069                     MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00070                 }
00071                 if (chkLogScrollPresenterMessages.IsChecked == true)
00072                 {
00073                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00074                 }
00075                 if (chkLogScrollViewMessages.IsChecked == true)
00076                 {
00077                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00078                 }
00079                 if (chkLogItemsViewMessages.IsChecked == true)
00080                 {
00081                     MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00082                 }
00083                 if (chkLogLinedFlowLayoutMessages.IsChecked == true)
00084                 {
00085                     MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00086                 }
00087                 if (chkLogAnnotatedScrollBarMessages.IsChecked == true)
00088                 {
00089                     MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00090                 }
00091             }
00092
00093             this.Loaded += ItemsViewIntegrationPage_Loaded;
00094             this.KeyDown += ItemsViewIntegrationPage_KeyDown;
00095             PopulatePhotosCollection();
00096         }
00097
00098         ~ItemsViewIntegrationPage()
00099         {
00100         }
00101
00102         protected override void OnNavigatedFrom(NavigationEventArgs e)
00103         {
00104             MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00105             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00106             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00107             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00108             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00109             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00110
00111             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00112
00113             UnhookLinedFlowLayoutEvents(justItemsInfoRequested: false, exceptItemsInfoRequested: false);
00114             UnhookScrollViewEvents();
00115             UnhookAnnotatedScrollBarEvents();
00116             UnhookPhotosCollectionChanged();
00117
00118             ChkLogLinedFlowLayoutEvents_Unchecked(null, null);
00119             ChkLogScrollPresenterEvents_Unchecked(null, null);
00120             ChkLogScrollViewEvents_Unchecked(null, null);
00121             ChkLogItemsViewEvents_Unchecked(null, null);
00122             ChkLogItemsRepeaterEvents_Unchecked(null, null);
00123             ChkLogAnnotatedScrollBarEvents_Unchecked(null, null);
00124
00125             base.OnNavigatedFrom(e);
00126         }
00127
00128         private void ItemsViewIntegrationPage_Loaded(object sender, RoutedEventArgs args)
00129         {
00130             _scrollView = itemsView.GetValue(ItemsView.ScrollViewProperty) as ScrollView;
00131
00132             HookScrollViewEvents();
00133
00134             itemsView.ItemsSource = _colPhotos;
00135
00136             UpdateItemsInfoRequestedHandler();
00137             HookLinedFlowLayoutEvents(justItemsInfoRequested: false, exceptItemsInfoRequested: true);
00138             HookAnnotatedScrollBarEvents();
00139
00140             BtnGetAverageMonthCount_Click(null, null);
00141             BtnGetYearCount_Click(null, null);
00142         }
00143
00144         private void ItemsViewIntegrationPage_KeyDown(object sender, KeyRoutedEventArgs e)
00145         {
00146             if (e.Key == Windows.System.VirtualKey.G)
00147             {
00148                 GetFullLog();
00149             }
00150             else if (e.Key == Windows.System.VirtualKey.C)
00151             {
00152                 ClearFullLog();
00153             }
00154         }
00155
00156         private void HookAnnotatedScrollBarEvents()
00157         {
00158             annotatedScrollBar.Scrolling += AnnotatedScrollBar_Scrolling;
00159             annotatedScrollBar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequested;
00160             annotatedScrollBar.SizeChanged += AnnotatedScrollBar_SizeChanged;
00161         }
00162
00163         private void UnhookAnnotatedScrollBarEvents()
00164         {
00165             annotatedScrollBar.Scrolling -= AnnotatedScrollBar_Scrolling;
00166             annotatedScrollBar.DetailLabelRequested -= AnnotatedScrollBar_DetailLabelRequested;
00167             annotatedScrollBar.SizeChanged -= AnnotatedScrollBar_SizeChanged;
00168         }
00169
00170         private void HookLinedFlowLayoutEvents(bool justItemsInfoRequested, bool exceptItemsInfoRequested)
00171         {
00172             if (!exceptItemsInfoRequested)
00173             {
00174                 linedFlowLayout.ItemsInfoRequested += LinedFlowLayout_ItemsInfoRequested;
00175             }
00176             if (justItemsInfoRequested)
00177             {
00178                 return;
00179             }
00180             linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlocked;
00181         }
00182
00183         private void HookScrollViewEvents()
00184         {
00185             if (_scrollView != null)
00186             {
00187                 _scrollView.ExtentChanged += ScrollView_ExtentChanged;
00188                 _scrollView.ViewChanged += ScrollView_ViewChanged;
00189                 _scrollView.ScrollCompleted += ScrollView_ScrollCompleted;
00190                 _scrollView.SizeChanged += ScrollView_SizeChanged;
00191             }
00192         }
00193
00194         private void UnhookScrollViewEvents()
00195         {
00196             if (_scrollView != null)
00197             {
00198                 _scrollView.ExtentChanged -= ScrollView_ExtentChanged;
00199                 _scrollView.ViewChanged -= ScrollView_ViewChanged;
00200                 _scrollView.ScrollCompleted -= ScrollView_ScrollCompleted;
00201                 _scrollView.SizeChanged -= ScrollView_SizeChanged;
00202             }
00203         }
00204
00205         private void UnhookLinedFlowLayoutEvents(bool justItemsInfoRequested, bool exceptItemsInfoRequested)
00206         {
00207             if (!exceptItemsInfoRequested)
00208             {
00209                 linedFlowLayout.ItemsInfoRequested -= LinedFlowLayout_ItemsInfoRequested;
00210             }
00211             if (justItemsInfoRequested)
00212             {
00213                 return;
00214             }
00215             linedFlowLayout.ItemsUnlocked -= LinedFlowLayout_ItemsUnlocked;
00216         }
00217
00218         private void HookPhotosCollectionChanged()
00219         {
00220             if (_colPhotos != null)
00221             {
00222                 _colPhotos.CollectionChanged += Photos_CollectionChanged;
00223             }
00224         }
00225
00226         private void UnhookPhotosCollectionChanged()
00227         {
00228             if (_colPhotos != null)
00229             {
00230                 _colPhotos.CollectionChanged -= Photos_CollectionChanged;
00231             }
00232         }
00233
00234         // Gets the item index from the most recent DetailLabelRequested event, using
00235         // the cached _requestedDetailLabelYearIndex & _requestedDetailLabelPhotoInYearIndex values.
00236         private int GetItemIndexFromLastDetailLabelRequest()
00237         {
00238             int cumulatedPhotos = 0;
00239
00240             for (int yearIndex = 0; yearIndex < _requestedDetailLabelYearIndex; yearIndex++)
00241             {
00242                 Debug.Assert(yearIndex < _yearPhotoCounts.Length);
00243                 cumulatedPhotos += _yearPhotoCounts[yearIndex];
00244             }
00245
00246             return cumulatedPhotos + _requestedDetailLabelPhotoInYearIndex;
00247         }
00248
00249         private string GetMonthNameFromIndex(int monthIndex)
00250         {
00251             if (monthIndex == 12)
00252             {
00253                 // Workaround for AnnotatedScrollBarDetailLabelRequestedEventArgs.Value exceeding AnnotatedScrollBar.Maximum + AnnotatedScrollBar.ViewportSize
00254                 monthIndex = 11;
00255             }
00256
00257             return _months[monthIndex];
00258         }
00259
00260         // Populates the AnnotatedScrollBar's Label collection based on the indexes of the last photo in each year (chronologically speaking).
00261         private void PopulateAnnotatedScrollBar()
00262         {
00263             Debug.Assert(_populateAnnotatedScrollBarPending > 0);
00264             _populateAnnotatedScrollBarPending--;
00265
00266             if (_populateAnnotatedScrollBarPending > 0)
00267             {
00268                 return;
00269             }
00270
00271             if (chkGeneralInfoLogs.IsChecked == true)
00272             {
00273                 AppendAsyncEventMessage($"PopulateAnnotatedScrollBar");
00274             }
00275
00276             if (annotatedScrollBar.Labels.Count > 0)
00277             {
00278                 AppendAsyncEventMessage($"PopulateAnnotatedScrollBar - Clearing AnnotatedScrollBar labels");
00279                 annotatedScrollBar.Labels.Clear();
00280             }
00281
00282             if (itemsView.ItemsSource == null || _yearPhotoCounts == null || _monthPhotoCounts == null)
00283             {
00284                 return;
00285             }
00286
00287             double lineAndSpacingSize = linedFlowLayout.ActualLineHeight + linedFlowLayout.LineSpacing;
00288             int cumulatedPhotos = _yearPhotoCounts[0];
00289             DateTime today = DateTime.Now.Date;
00290
00291             AnnotatedScrollBarLabel annotatedScrollBarLabel = new AnnotatedScrollBarLabel(today.Year.ToString(), 0.0);
00292             annotatedScrollBar.Labels.Add(annotatedScrollBarLabel);
00293             AppendAsyncEventMessage($"PopulateAnnotatedScrollBar - Adding AnnotatedScrollBarLabel with Content={annotatedScrollBarLabel.Content}, ScrollOffset={annotatedScrollBarLabel.ScrollOffset}");
00294
00295             for (int yearIndex = 1; yearIndex < _yearCount; yearIndex++)
00296             {
00297                 int year = today.Year - yearIndex;
00298                 int lineIndex = linedFlowLayout.LockItemToLine(cumulatedPhotos);
00299                 double value = lineIndex * lineAndSpacingSize;
00300
00301                 annotatedScrollBarLabel = new AnnotatedScrollBarLabel(year.ToString(), value);
00302                 annotatedScrollBar.Labels.Add(annotatedScrollBarLabel);
00303                 AppendAsyncEventMessage($"PopulateAnnotatedScrollBar - Adding AnnotatedScrollBarLabel with Content={annotatedScrollBarLabel.Content}, ScrollOffset={annotatedScrollBarLabel.ScrollOffset}");
00304
00305                 cumulatedPhotos += _yearPhotoCounts[yearIndex];
00306             }
00307         }
00308
00309         private void PopulateHeaderAsync()
00310         {
00311             _populateHeaderPending++;
00312             var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, PopulateHeader);
00313         }
00314
00315         // Retrieves the first and last relevant ItemContainer instances from the ItemsView and populates the tblHeader TextBlock with the range.
00316         // 'relevant' means at least 16px are displayed on screen vertically.
00317         // 'FirstMonth FirstYear - LastMonth LastYear' when range exceeds one month, and
00318         // 'Month Year' when the range falls within a single month.
00319         private void PopulateHeader()
00320         {
00321             Debug.Assert(_populateHeaderPending > 0);
00322             _populateHeaderPending--;
00323
00324             if (_populateHeaderPending > 0 || _scrollView == null)
00325             {
00326                 return;
00327             }
00328
00329             const double requiredDisplayedHeight = 16.0;
00330             int firstRelevantItemContainerIndex;
00331             int lastRelevantItemContainerIndex;
00332
00333             itemsView.TryGetItemIndex(
00334                         horizontalViewportRatio: 0.0,
00335                         verticalViewportRatio: ((linedFlowLayout.LineSpacing - linedFlowLayout.LineHeight) / 2.0 + requiredDisplayedHeight) / _scrollView.ViewportHeight,
00336                         index: out firstRelevantItemContainerIndex);
00337             itemsView.TryGetItemIndex(
00338                         horizontalViewportRatio: 1.0,
00339                         verticalViewportRatio: 1.0 + ((linedFlowLayout.LineHeight + linedFlowLayout.LineSpacing) / 2.0 - requiredDisplayedHeight) / _scrollView.ViewportHeight,
00340                         index: out lastRelevantItemContainerIndex);
00341
00342             string headerText = string.Empty;
00343
00344             if (firstRelevantItemContainerIndex != -1 && lastRelevantItemContainerIndex != -1)
00345             {
00346                 ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
00347
00348                 if (itemsRepeater != null)
00349                 {
00350                     if (chkGeneralInfoLogs.IsChecked == true)
00351                     {
00352                         Entity firstRelevantPhoto = _colPhotos[firstRelevantItemContainerIndex];
00353                         Entity lastRelevantPhoto = _colPhotos[lastRelevantItemContainerIndex];
00354
00355                         AppendAsyncEventMessage($"PopulateHeader firstRelevantPhoto={firstRelevantPhoto.Description}, lastRelevantPhoto={lastRelevantPhoto.Description}");
00356                     }
00357
00358                     int cumulatedPhotos = 0;
00359                     int firstYearIndex = -1, lastYearIndex = -1;
00360                     int firstMonthIndex = -1, lastMonthIndex = -1;
00361
00362                     for (int yearIndex = 0; yearIndex < _yearCount; yearIndex++)
00363                     {
00364                         int monthIndex;
00365
00366                         for (monthIndex = 0; monthIndex < 12; monthIndex++)
00367                         {
00368                             cumulatedPhotos += _monthPhotoCounts[yearIndex, monthIndex];
00369
00370                             if (cumulatedPhotos > firstRelevantItemContainerIndex && firstYearIndex == -1)
00371                             {
00372                                 firstYearIndex = yearIndex;
00373                                 firstMonthIndex = monthIndex;
00374                             }
00375
00376                             if (cumulatedPhotos > lastRelevantItemContainerIndex)
00377                             {
00378                                 break;
00379                             }
00380                         }
00381
00382                         if (cumulatedPhotos > lastRelevantItemContainerIndex)
00383                         {
00384                             lastYearIndex = yearIndex;
00385                             lastMonthIndex = monthIndex;
00386                             break;
00387                         }
00388                     }
00389
00390                     DateTime today = DateTime.Now.Date;
00391                     int year = today.Year - firstYearIndex;
00392                     string monthName = GetMonthNameFromIndex(firstMonthIndex);
00393                     headerText = monthName + " " + year.ToString();
00394
00395                     if (lastMonthIndex != firstMonthIndex || lastYearIndex != firstYearIndex)
00396                     {
00397                         year = today.Year - lastYearIndex;
00398                         monthName = GetMonthNameFromIndex(lastMonthIndex);
00399                         headerText += " - " + monthName + " " + year.ToString();
00400                     }
00401                 }
00402             }
00403             else if (chkGeneralInfoLogs.IsChecked == true)
00404             {
00405                 AppendAsyncEventMessage($"PopulateHeader firstRelevantItemContainerIndex={firstRelevantItemContainerIndex}, lastRelevantItemContainerIndex={lastRelevantItemContainerIndex}");
00406             }
00407
00408             tblHeader.Text = headerText;
00409         }
00410
00411         // Creates an observable collection of photos. Each photo is associated with a Description string 'Month Year - #Number'.
00412         private void PopulatePhotosCollection()
00413         {
00414             _yearPhotoCounts = new int[_yearCount];
00415             _monthPhotoCounts = new int[_yearCount, 12];
00416
00417             if (_colPhotos != null)
00418             {
00419                 UnhookPhotosCollectionChanged();
00420             }
00421
00422             _colPhotos = new ObservableCollection<Entity>();
00423
00424             var rnd = chkUseConstantMonthCount.IsChecked == true ? null : new Random();
00425             DateTime today = DateTime.Now.Date;
00426
00427             for (int yearIndex = 0; yearIndex < _yearCount; yearIndex++)
00428             {
00429                 int year = today.Year - yearIndex;
00430                 int yearCount = 0;
00431
00432                 for (int monthIndex = 0; monthIndex < 12; monthIndex++)
00433                 {
00434                     int monthCount;
00435
00436                     if (chkUseConstantMonthCount.IsChecked == true)
00437                     {
00438                         monthCount = Math.Max(1, _averageMonthCount);
00439                     }
00440                     else
00441                     {
00442                         monthCount = rnd.Next(_averageMonthCount / 10, (19 * _averageMonthCount) / 10 + 1);
00443
00444                         if (monthIndex == 11 && yearCount == 0 && monthCount == 0)
00445                         {
00446                             monthCount = 1;
00447                         }
00448                     }
00449
00450                     _monthPhotoCounts[yearIndex, monthIndex] = monthCount;
00451                     yearCount += monthCount;
00452
00453                     for (int photoIndex = 0; photoIndex < monthCount; photoIndex++)
00454                     {
00455                         _colPhotos.Add(new Entity()
00456                         {
00457                             ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", chkUseConstantMonthCount.IsChecked == true ? (yearIndex * 50 + monthIndex * 5 + photoIndex) % 126 + 1 : rnd.Next(1, 127))),
00458                             Description = GetMonthNameFromIndex(monthIndex) + " " + year + " - #" + photoIndex
00459                         });
00460                     }
00461                 }
00462
00463                 Debug.Assert(yearIndex < _yearPhotoCounts.Length);
00464                 _yearPhotoCounts[yearIndex] = yearCount;
00465             }
00466
00467             PopulateHeaderAsync();
00468             HookPhotosCollectionChanged();
00469         }
00470
00471         // Asynchronously re-populating the AnnotatedScrollBar because ScrollView_ExtentChanged may not be called after items get unlocked.
00472         private void Photos_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
00473         {
00474             _populateAnnotatedScrollBarPending++;
00475             var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Low, PopulateAnnotatedScrollBar);
00476
00477             PopulateHeaderAsync();
00478         }
00479
00480         private void AnnotatedScrollBar_Scrolling(AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args)
00481         {
00482             try
00483             {
00484                 if (itemsView != null && args.ScrollingEventKind == AnnotatedScrollBarScrollingEventKind.Click)
00485                 {
00486                     // Tell AnnotatedScrollBar to not raise a scroll request
00487                     args.Cancel = true;
00488
00489                     // The user clicked the labels area to scroll to a particular offset.
00490                     int targetItemIndex = GetItemIndexFromLastDetailLabelRequest();
00491
00492                     // Launch a bring-into-view operation to the target item index.
00493                     if (_bringIntoViewOptions == null)
00494                     {
00495                         _bringIntoViewOptions = new BringIntoViewOptions()
00496                         {
00497                             AnimationDesired = false,
00498                             TargetRect = new Windows.Foundation.Rect(0, 0, 1, _scrollView.ViewportHeight)
00499                         };
00500                     }
00501
00502                     itemsView.StartBringItemIntoView(targetItemIndex, _bringIntoViewOptions);
00503                 }
00504             }
00505             catch (Exception ex)
00506             {
00507                 txtExceptionReport.Text = ex.ToString();
00508                 AppendAsyncEventMessage(ex.ToString());
00509             }
00510         }
00511
00512         // Handler for providing a tooltip value when the user hovers over the AnnotatedScrollBar.
00513         private void AnnotatedScrollBar_DetailLabelRequested(AnnotatedScrollBar sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)
00514         {
00515             try
00516             {
00517                 if (itemsView == null || itemsView.ItemsSource == null)
00518                 {
00519                     return;
00520                 }
00521
00522                 Debug.Assert(_yearPhotoCounts != null);
00523                 Debug.Assert(_monthPhotoCounts != null);
00524
00525                 double lineAndSpacingSize = linedFlowLayout.ActualLineHeight + linedFlowLayout.LineSpacing;
00526                 double value = args.ScrollOffset;
00527                 double previousLabelValue = 0.0;
00528                 double labelValue = 0.0;
00529                 int cumulatedPhotos = _yearPhotoCounts[0];
00530                 int yearIndex;
00531
00532                 // Phase 1: Find the Label values before and after the provided args.Value.
00533                 for (yearIndex = 1; yearIndex < _yearCount; yearIndex++)
00534                 {
00535                     int lineIndex = linedFlowLayout.LockItemToLine(cumulatedPhotos);
00536                     labelValue = lineIndex * lineAndSpacingSize;
00537
00538                     if (labelValue > value)
00539                     {
00540                         break;
00541                     }
00542
00543                     previousLabelValue = labelValue;
00544
00545                     Debug.Assert(yearIndex < _yearPhotoCounts.Length);
00546                     cumulatedPhotos += _yearPhotoCounts[yearIndex];
00547                 }
00548
00549                 if (yearIndex == _yearCount)
00550                 {
00551                     labelValue = _scrollView.ExtentHeight;
00552                 }
00553
00554                 Debug.Assert(value >= previousLabelValue);
00555                 Debug.Assert(value <= labelValue);
00556
00557                 // Phase 2: Find the approximate photo index in that resulting year.
00558                 DateTime today = DateTime.Now.Date;
00559                 int yearPhotoIndex = 0;
00560                 int monthIndex;
00561                 int year = today.Year - yearIndex + 1;
00562
00563                 Debug.Assert(yearIndex - 1 < _yearPhotoCounts.Length);
00564                 int yearPhotoCount = _yearPhotoCounts[yearIndex - 1];
00565
00566                 double yearValueSpan = labelValue - previousLabelValue;
00567                 int approximatePhotoInYear = (int)(yearPhotoCount * (value - previousLabelValue) / yearValueSpan);
00568
00569                 Debug.Assert(approximatePhotoInYear >= 0);
00570
00571                 // Phase3: Find the month index for the resulting approximate photo index.
00572                 for (monthIndex = 0; monthIndex < 12; monthIndex++)
00573                 {
00574                     yearPhotoIndex += _monthPhotoCounts[yearIndex - 1, monthIndex];
00575
00576                     if (yearPhotoIndex > approximatePhotoInYear)
00577                     {
00578                         break;
00579                     }
00580                 }
00581
00582                 // Phase 4: Get the month name from the resulting month index.
00583                 string monthName = GetMonthNameFromIndex(monthIndex);
00584
00585                 // Phase 5: Provide a sub-label string.
00586                 args.Content = monthName + " " + year.ToString();
00587                 // Caching information for the case an AnnotatedScrollBar_Scrolling event is raised for this args.Value.
00588                 _requestedDetailLabelYearIndex = yearIndex - 1;
00589                 _requestedDetailLabelPhotoInYearIndex = approximatePhotoInYear;
00590
00591                 if (chkLogAnnotatedScrollBarEvents.IsChecked == true)
00592                 {
00593                     AppendAsyncEventMessage($"AnnotatedScrollBar_DetailLabelRequested args.ScrollOffset={args.ScrollOffset}, _requestedDetailLabelYearIndex={_requestedDetailLabelYearIndex}, _requestedDetailLabelPhotoInYearIndex={_requestedDetailLabelPhotoInYearIndex}");
00594                 }
00595             }
00596             catch (Exception ex)
00597             {
00598                 txtExceptionReport.Text = ex.ToString();
00599                 AppendAsyncEventMessage(ex.ToString());
00600             }
00601         }
00602
00603         private void AnnotatedScrollBar_SizeChanged(object sender, object args)
00604         {
00605             try
00606             {
00607                 _populateAnnotatedScrollBarPending++;
00608                 PopulateAnnotatedScrollBar();
00609             }
00610             catch (Exception ex)
00611             {
00612                 txtExceptionReport.Text = ex.ToString();
00613                 AppendAsyncEventMessage(ex.ToString());
00614             }
00615         }
00616
00617         // Raised to give the application code a chance to provide items sizing information to minimize the number of UI elements being realized.
00618         // - args.ItemsRangeStartIndex: indicates the index of the first item in the source collection for which sizing information is requested.
00619         // - args.ItemsRangeRequestedLength: indicates the number of items in the source collection for which sizing information is requested.
00620         //   For example, the numbers may be ItemsRangeStartIndex=50 and ItemsRangeRequestedLength=80, indicating that information is requested for the [50, 129] item range.
00621         // - args.SetDesiredAspectRatios: if the app code decides to provide information at all, it must call this method. It allows to provide an array of aspect ratios.
00622         // - args.SetMinWidths: when aspect ratios are provided via SetDesiredAspectRatios, the app code can also provide heterogeneous minimum sizing information for the same items.
00623         // - args.SetMaxWidths: when aspect ratios are provided via SetDesiredAspectRatios, the app code can also provide heterogeneous maximum sizing information for the same items.
00624         // - args.MinWidth: when aspect ratios are provided via SetDesiredAspectRatios, the app code can also provide homogeneous minimum sizing information for the same items.
00625         // - args.MaxWidth: when aspect ratios are provided via SetDesiredAspectRatios, the app code can also provide homogeneous maximum sizing information for the same items.
00626         //   Using MinWidth is more efficient than using SetMinWidths, but both SetMinWidths and MinWidth can be used at the same time. The greatest of the two values is used in that
00627         //   case. Likewise, SetMaxWidths and MaxWidth can be used at the same time. Not using SetMaxWidths and MaxWidth is best because it gives more freedom to the LinedFlowLayout.
00628         // A few points:
00629         // - providing sizing information for fewer items than the requested range would be pointless because it would be unused.
00630         // - providing minimum or maximun sizing information without also providing aspect ratios would be pointless because it would be unused.
00631         // - app code can:
00632         //   * not provide any sizing information at all (Do not hook up to this event at all then).
00633         //   * provide sizing information for the requested range only.
00634         //   * provide sizing information for more items than the requested range. In order to do that, app code can set args.ItemsRangeStartIndex to a smaller number
00635         //     and/or provide aspect ratios for more items than args.ItemsRangeRequestedLength.
00636         // - the more items are covered in an ItemsInfoRequested response, the less likely the event is going to be raised again to retrieve more information.
00637         // - the information provided by the ItemsInfoRequested handler must reflect reality. It must not mislead the LinedFlowLayout.
00638         //   If an item's natural aspect ratio is 1.75, the handler must return that value.
00639         //   If an item's MinWidth is 48px, the handler must return that value.
00640         //   If an item's MaxWidth is 480px, the handler must return that value. It is preferable to not use max widths at all though and thus not use SetMaxWidths/MaxWidth.
00641         // - app code can dynamically switch between not providing information, providing the requested information, and providing more information, each time the event is raised.
00642         // - when providing sizing information for the entire source collection, the LinedFlowLayout uses a simpler/faster layout algorithm. That simpler algorithm lays out the entire collection
00643         //   in a single path. It uses more memory than the regular layout though because it caches the resulting width of all items and item count of all lines.
00644         //   As the source collection grows, the simpler algo becomes less efficient than the regular one, but currently it is unknown where the transition point is. A perf analysis is pending.
00645         private void LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args)
00646         {
00647             if (chkGeneralInfoLogs.IsChecked == true)
00648             {
00649                 AppendAsyncEventMessage($"LinedFlowLayout_ItemsInfoRequested - args.ItemsRangeStartIndex={args.ItemsRangeStartIndex}, args.ItemsRangeRequestedLength={args.ItemsRangeRequestedLength}");
00650             }
00651
00652             double minWidth = 0.0;
00653
00654             switch (cmbItemTemplate.SelectedIndex)
00655             {
00656                 case 0:
00657                     minWidth = 48.0;
00658                     break;
00659                 case 2:
00660                 case 5:
00661                 case 6:
00662                 case 7:
00663                     minWidth = 72.0;
00664                     break;
00665                 case 1:
00666                     minWidth = 76.0;
00667                     break;
00668                 case 3:
00669                     minWidth = 96.0;
00670                     break;
00671                 case 4:
00672                     minWidth = 146.0;
00673                     break;
00674             }
00675
00676             args.MinWidth = minWidth;
00677
00678             double[] desiredAspectRatios = new double[chkUseFastPath.IsChecked == true ? _colPhotos.Count : args.ItemsRangeRequestedLength];
00679
00680             if (chkUseFastPath.IsChecked == true)
00681             {
00682                 args.ItemsRangeStartIndex = 0;
00683
00684                 for (int index = 0; index < _colPhotos.Count; index++)
00685                 {
00686                     desiredAspectRatios[index] = _colPhotos[index].AspectRatio;
00687                 }
00688             }
00689             else
00690             {
00691                 for (int index = 0; index < args.ItemsRangeRequestedLength; index++)
00692                 {
00693                     desiredAspectRatios[index] = _colPhotos[args.ItemsRangeStartIndex + index].AspectRatio;
00694                 }
00695             }
00696
00697             args.SetDesiredAspectRatios(desiredAspectRatios);
00698         }
00699
00700         // Raised when the average-items-per-line value changed and the AnnotatedScrollBar's Labels collection needs to be re-populated.
00701         private void LinedFlowLayout_ItemsUnlocked(LinedFlowLayout sender, object args)
00702         {
00703             if (chkGeneralInfoLogs.IsChecked == true)
00704             {
00705                 AppendAsyncEventMessage("LinedFlowLayout_ItemsUnlocked");
00706             }
00707
00708             // Declare the re-population need for when the ScrollView extent was changed based on the new average-items-per-line value.
00709             // Note: Not expecting this to be the final way to re-populate the AnnotatedScrollBar. Looking into a more reliable/easy way
00710             // because average-items-per-line changes may not result in extent changes.
00711             // At the moment, LockItemToLine cannot be called within this handler.
00712             _populateAnnotatedScrollBar = true;
00713         }
00714
00715         // Queues up a refresh of the displayed range caption,
00716         // Re-populates the AnnotatedScrollBar when required.
00717         private void ScrollView_ExtentChanged(ScrollView sender, object args)
00718         {
00719             if (chkGeneralInfoLogs.IsChecked == true)
00720             {
00721                 AppendAsyncEventMessage($"ScrollView_ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
00722             }
00723
00724             PopulateHeaderAsync();
00725
00726             if (_populateAnnotatedScrollBar)
00727             {
00728                 _populateAnnotatedScrollBar = false;
00729                 _populateAnnotatedScrollBarPending++;
00730                 PopulateAnnotatedScrollBar();
00731             }
00732         }
00733
00734         private void ScrollView_SizeChanged(object sender, SizeChangedEventArgs e)
00735         {
00736             if (_bringIntoViewOptions != null)
00737             {
00738                 // Sizing the TargetRect in order to bring the target item to the top of the viewport.
00739                 _bringIntoViewOptions.TargetRect = new Windows.Foundation.Rect(0, 0, 1, _scrollView.ViewportHeight);
00740             }
00741         }
00742
00743         private void ScrollView_ViewChanged(ScrollView sender, object args)
00744         {
00745             PopulateHeaderAsync();
00746         }
00747
00748         // Queues up a refresh of the displayed range caption
00749         private void ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args)
00750         {
00751             if (chkGeneralInfoLogs.IsChecked == true)
00752             {
00753                 AppendAsyncEventMessage($"ScrollView_ScrollCompleted CorrelationId={args.CorrelationId}");
00754             }
00755
00756             PopulateHeaderAsync();
00757         }
00758
00759         private void RepopulateAndApplyPhotosCollection()
00760         {
00761             try
00762             {
00763                 bool isItemsSourceSet = itemsView.ItemsSource == _colPhotos;
00764
00765                 PopulatePhotosCollection();
00766
00767                 if (isItemsSourceSet)
00768                 {
00769                     itemsView.ItemsSource = _colPhotos;
00770                 }
00771             }
00772             catch (Exception ex)
00773             {
00774                 txtExceptionReport.Text = ex.ToString();
00775                 AppendAsyncEventMessage(ex.ToString());
00776             }
00777         }
00778
00779         private void UpdateItemsInfoRequestedHandler()
00780         {
00781             UnhookLinedFlowLayoutEvents(justItemsInfoRequested: true, exceptItemsInfoRequested: false);
00782
00783             if (chkHandleItemsInfoRequested.IsChecked == true || chkUseFastPath.IsChecked == true)
00784             {
00785                 HookLinedFlowLayoutEvents(justItemsInfoRequested: true, exceptItemsInfoRequested: false);
00786             }
00787         }
00788
00789         private void ChkCustomUI_Checked(object sender, RoutedEventArgs args)
00790         {
00791             if (grdCustomUI != null)
00792                 grdCustomUI.Visibility = Visibility.Visible;
00793         }
00794
00795         private void ChkCustomUI_Unchecked(object sender, RoutedEventArgs args)
00796         {
00797             if (grdCustomUI != null)
00798                 grdCustomUI.Visibility = Visibility.Collapsed;
00799         }
00800
00801         private void ChkPageMethods_Checked(object sender, RoutedEventArgs e)
00802         {
00803             if (grdPageMethods != null)
00804                 grdPageMethods.Visibility = Visibility.Visible;
00805         }
00806
00807         private void ChkPageMethods_Unchecked(object sender, RoutedEventArgs e)
00808         {
00809             if (grdPageMethods != null)
00810                 grdPageMethods.Visibility = Visibility.Collapsed;
00811         }
00812
00813         private void ChkLogs_Checked(object sender, RoutedEventArgs args)
00814         {
00815             if (grdLogs != null)
00816                 grdLogs.Visibility = Visibility.Visible;
00817         }
00818
00819         private void ChkLogs_Unchecked(object sender, RoutedEventArgs args)
00820         {
00821             if (grdLogs != null)
00822                 grdLogs.Visibility = Visibility.Collapsed;
00823         }
00824
00825         private void AnnotatedScrollBar_ScrollingLog(AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args)
00826         {
00827             AppendAsyncEventMessage($"AnnotatedScrollBar.Scrolling ScrollingEventKind={args.ScrollingEventKind}, ScrollOffset={args.ScrollOffset}");
00828         }
00829
00830         private void AnnotatedScrollBar_DetailLabelRequestedLog(AnnotatedScrollBar sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args)
00831         {
00832             AppendAsyncEventMessage($"AnnotatedScrollBar.DetailLabelRequested ScrollOffset={args.ScrollOffset}");
00833         }
00834
00835         private void Image_ImageOpened(object sender, RoutedEventArgs e)
00836         {
00837             // When the Image has a TextBlock sibling, set its Foreground to White to indicate the image loading success.
00838             TextBlock textBlock = null;
00839             Image image = sender as Image;
00840
00841             if (image != null)
00842             {
00843                 Panel itemPanel = image.Parent as Panel;
00844
00845                 if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
00846                 {
00847                     textBlock = itemPanel.Children[1] as TextBlock;
00848
00849                     if (textBlock != null)
00850                     {
00851                         textBlock.Foreground = _whiteBrush;
00852                     }
00853                 }
00854             }
00855
00856             // This event is too chatty so its reporting is turned off by default.
00857             //if (chkLogImageEvents.IsChecked == true)
00858             //{
00859             //    AppendAsyncEventMessage("Image_ImageOpened, Item Id={textBlock?.Text}");
00860             //}
00861         }
00862
00863         private void Image_ImageFailed(object sender, ExceptionRoutedEventArgs e)
00864         {
00865             // When the Image has a TextBlock sibling, set its Foreground to Red to indicate the image loading failure.
00866             TextBlock textBlock = null;
00867             Image image = sender as Image;
00868
00869             if (image != null)
00870             {
00871                 Panel itemPanel = image.Parent as Panel;
00872
00873                 if (itemPanel != null && itemPanel.Name == "itemPanel" && itemPanel.Children.Count >= 2)
00874                 {
00875                     textBlock = itemPanel.Children[1] as TextBlock;
00876
00877                     if (textBlock != null)
00878                     {
00879                         textBlock.Foreground = _redBrush;
00880                     }
00881                 }
00882             }
00883
00884             if (chkLogImageEvents.IsChecked == true)
00885             {
00886                 string uri = string.Empty;
00887
00888                 if (image != null)
00889                 {
00890                     BitmapImage bitmapImage = image.Source as BitmapImage;
00891
00892                     if (bitmapImage != null)
00893                     {
00894                         Uri uriSource = bitmapImage.UriSource;
00895
00896                         if (uriSource != null)
00897                         {
00898                             uri = uriSource.ToString();
00899                         }
00900                     }
00901                 }
00902
00903                 AppendAsyncEventMessage($"Image_ImageFailed ErrorMessage={e.ErrorMessage}, Item Id={textBlock?.Text}, Item Uri={uri}");
00904             }
00905         }
00906
00907         private void ItemContainer_DragStartingLog(UIElement sender, DragStartingEventArgs args)
00908         {
00909             AppendAsyncEventMessage("ItemContainer.DragStarting");
00910         }
00911
00912         private void ItemsView_LoadedLog(object sender, RoutedEventArgs args)
00913         {
00914             AppendAsyncEventMessage("ItemsView.Loaded");
00915             if (chkLogItemsRepeaterEvents.IsChecked == true)
00916             {
00917                 LogItemsRepeaterInfo();
00918             }
00919             if (chkLogScrollViewEvents.IsChecked == true)
00920             {
00921                 LogScrollViewInfo();
00922             }
00923             LogItemsViewInfo();
00924         }
00925
00926         private void ItemsView_SizeChangedLog(object sender, SizeChangedEventArgs args)
00927         {
00928             AppendAsyncEventMessage($"ItemsView.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={itemsView.ActualWidth} x {itemsView.ActualHeight}");
00929
00930             if (chkLogItemsRepeaterEvents.IsChecked == true)
00931             {
00932                 LogItemsRepeaterInfo();
00933             }
00934             if (chkLogScrollViewEvents.IsChecked == true)
00935             {
00936                 LogScrollViewInfo();
00937             }
00938             LogItemsViewInfo();
00939         }
00940
00941         private void ItemsView_GettingFocusLog(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
00942         {
00943             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00944             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00945             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00946             string newFEName = (newFE == null) ? "null" : newFE.Name;
00947
00948             AppendAsyncEventMessage($"ItemsView.GettingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00949         }
00950
00951         private void ItemsView_LostFocusLog(object sender, RoutedEventArgs args)
00952         {
00953             AppendAsyncEventMessage("ItemsView.LostFocus");
00954         }
00955
00956         private void ItemsView_LosingFocusLog(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
00957         {
00958             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
00959             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
00960             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
00961             string newFEName = (newFE == null) ? "null" : newFE.Name;
00962
00963             AppendAsyncEventMessage($"ItemsView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}");
00964         }
00965
00966         private void ItemsView_GotFocusLog(object sender, RoutedEventArgs args)
00967         {
00968             AppendAsyncEventMessage("ItemsView.GotFocus");
00969         }
00970
00971         private void ItemsRepeater_LayoutUpdatedLog(object sender, object args)
00972         {
00973             if (chkGeneralVerboseLogs.IsChecked == true)
00974             {
00975                 AppendAsyncEventMessage("ItemsRepeater.LayoutUpdated");
00976             }
00977         }
00978
00979         private void ItemsRepeater_LoadedLog(object sender, RoutedEventArgs args)
00980         {
00981             AppendAsyncEventMessage("ItemsRepeater.Loaded");
00982             LogItemsRepeaterInfo();
00983             if (chkLogItemsViewEvents.IsChecked == true)
00984             {
00985                 LogItemsViewInfo();
00986             }
00987         }
00988
00989         private void ItemsRepeater_SizeChangedLog(object sender, SizeChangedEventArgs args)
00990         {
00991             AppendAsyncEventMessage($"ItemsRepeater.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={(sender as FrameworkElement).ActualWidth} x {(sender as FrameworkElement).ActualHeight}");
00992
00993             LogItemsRepeaterInfo();
00994             if (chkLogItemsViewEvents.IsChecked == true)
00995             {
00996                 LogItemsViewInfo();
00997             }
00998         }
00999
01000         private void LinedFlowLayout_ItemsUnlockedLog(LinedFlowLayout sender, object args)
01001         {
01002             AppendAsyncEventMessage("LinedFlowLayout.ItemsUnlocked");
01003         }
01004
01005         private void LinedFlowLayout_ArrangeInvalidatedLog(Layout sender, object args)
01006         {
01007             AppendAsyncEventMessage("LinedFlowLayout.ArrangeInvalidated");
01008         }
01009
01010         private void LinedFlowLayout_MeasureInvalidatedLog(Layout sender, object args)
01011         {
01012             AppendAsyncEventMessage("LinedFlowLayout.MeasureInvalidated");
01013         }
01014
01015         private void ScrollController_AddScrollVelocityRequestedLog(IScrollController sender, ScrollControllerAddScrollVelocityRequestedEventArgs args)
01016         {
01017             AppendAsyncEventMessage($"ScrollController.AddScrollVelocityRequested CorrelationId={args.CorrelationId}, OffsetVelocity={args.OffsetVelocity}");
01018         }
01019
01020         private void ScrollController_ScrollToRequestedLog(IScrollController sender, ScrollControllerScrollToRequestedEventArgs args)
01021         {
01022             AppendAsyncEventMessage($"ScrollController.ScrollToRequested CorrelationId={args.CorrelationId}, Offset={args.Offset}, AnimationMode={args.Options.AnimationMode}");
01023         }
01024
01025         private void ScrollController_ScrollByRequestedLog(IScrollController sender, ScrollControllerScrollByRequestedEventArgs args)
01026         {
01027             AppendAsyncEventMessage($"ScrollController.ScrollByRequested CorrelationId={args.CorrelationId}, Offset={args.OffsetDelta}, AnimationMode={args.Options.AnimationMode}");
01028         }
01029
01030         private void ScrollPresenter_LoadedLog(object sender, RoutedEventArgs args)
01031         {
01032             AppendAsyncEventMessage("ScrollPresenter.Loaded");
01033         }
01034
01035         private void ScrollPresenter_SizeChangedLog(object sender, SizeChangedEventArgs args)
01036         {
01037             AppendAsyncEventMessage($"ScrollPresenter.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={(sender as FrameworkElement).ActualWidth} x {(sender as FrameworkElement).ActualHeight}");
01038         }
01039
01040         private void ScrollPresenter_ExtentChangedLog(ScrollPresenter sender, object args)
01041         {
01042             AppendAsyncEventMessage($"ScrollPresenter.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
01043         }
01044
01045         private void ScrollPresenter_StateChangedLog(ScrollPresenter sender, object args)
01046         {
01047             AppendAsyncEventMessage($"ScrollPresenter.StateChanged {sender.State}");
01048         }
01049
01050         private void ScrollPresenter_ViewChangedLog(ScrollPresenter sender, object args)
01051         {
01052             AppendAsyncEventMessage($"ScrollPresenter.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01053         }
01054
01055         private void ScrollPresenter_ScrollAnimationStartingLog(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
01056         {
01057             AppendAsyncEventMessage($"ScrollPresenter.ScrollAnimationStarting CorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
01058         }
01059
01060         private void ScrollPresenter_ZoomAnimationStartingLog(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
01061         {
01062             AppendAsyncEventMessage($"ScrollPresenter.ZoomAnimationStarting CorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
01063         }
01064
01065         private void ScrollPresenter_ScrollCompletedLog(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
01066         {
01067             AppendAsyncEventMessage($"ScrollPresenter.ScrollCompleted CorrelationId={args.CorrelationId}");
01068         }
01069
01070         private void ScrollPresenter_ZoomCompletedLog(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args)
01071         {
01072             AppendAsyncEventMessage($"ScrollPresenter.ZoomCompleted CorrelationId={args.CorrelationId}");
01073         }
01074
01075         private void ScrollView_LoadedLog(object sender, RoutedEventArgs args)
01076         {
01077             AppendAsyncEventMessage("ScrollView.Loaded");
01078             LogScrollViewInfo();
01079             if (chkLogItemsViewEvents.IsChecked == true)
01080             {
01081                 LogItemsViewInfo();
01082             }
01083         }
01084
01085         private void ScrollView_SizeChangedLog(object sender, SizeChangedEventArgs args)
01086         {
01087             AppendAsyncEventMessage($"ScrollView.SizeChanged PreviousSize={args.PreviousSize}, NewSize={args.NewSize}, ActualSize={itemsView.ActualWidth} x {itemsView.ActualHeight}");
01088
01089             LogScrollViewInfo();
01090             if (chkLogItemsViewEvents.IsChecked == true)
01091             {
01092                 LogItemsViewInfo();
01093             }
01094         }
01095
01096         private void ScrollView_ExtentChangedLog(ScrollView sender, object args)
01097         {
01098             AppendAsyncEventMessage($"ScrollView.ExtentChanged ExtentWidth={sender.ExtentWidth}, ExtentHeight={sender.ExtentHeight}, ScrollableWidth={sender.ScrollableWidth}, ScrollableHeight={sender.ScrollableHeight}");
01099         }
01100
01101         private void ScrollView_StateChangedLog(ScrollView sender, object args)
01102         {
01103             AppendAsyncEventMessage($"ScrollView.StateChanged {sender.State}");
01104         }
01105
01106         private void ScrollView_ViewChangedLog(ScrollView sender, object args)
01107         {
01108             AppendAsyncEventMessage($"ScrollView.ViewChanged HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01109         }
01110
01111         private void ScrollView_ScrollAnimationStartingLog(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
01112         {
01113             AppendAsyncEventMessage($"ScrollView.ScrollAnimationStarting CorrelationId={args.CorrelationId}, SP=({args.StartPosition.X}, {args.StartPosition.Y}), EP=({args.EndPosition.X}, {args.EndPosition.Y})");
01114         }
01115
01116         private void ScrollView_ZoomAnimationStartingLog(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
01117         {
01118             AppendAsyncEventMessage($"ScrollView.ZoomAnimationStarting CorrelationId={args.CorrelationId}, CenterPoint={args.CenterPoint}, SZF={args.StartZoomFactor}, EZF={args.EndZoomFactor}");
01119         }
01120
01121         private void ScrollView_ScrollCompletedLog(ScrollView sender, ScrollingScrollCompletedEventArgs args)
01122         {
01123             AppendAsyncEventMessage($"ScrollView.ScrollCompleted CorrelationId={args.CorrelationId}");
01124         }
01125
01126         private void ScrollView_ZoomCompletedLog(ScrollView sender, ScrollingZoomCompletedEventArgs args)
01127         {
01128             AppendAsyncEventMessage($"ScrollView.ZoomCompleted CorrelationId={args.CorrelationId}");
01129         }
01130
01131         private void LogItemsRepeaterInfo()
01132         {
01133             ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
01134
01135             AppendAsyncEventMessage($"ItemsRepeater Info: ItemsSource={itemsRepeater.ItemsSource}, ItemTemplate={itemsRepeater.ItemTemplate}, Layout={itemsRepeater.Layout}");
01136         }
01137
01138         private void LogScrollViewInfo()
01139         {
01140             ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
01141
01142             AppendAsyncEventMessage($"ScrollView Info: HorizontalOffset={scrollView.HorizontalOffset}, VerticalOffset={scrollView.VerticalOffset}, ZoomFactor={scrollView.ZoomFactor}");
01143             AppendAsyncEventMessage($"ScrollView Info: ViewportWidth={scrollView.ViewportWidth}, ExtentHeight={scrollView.ViewportHeight}");
01144             AppendAsyncEventMessage($"ScrollView Info: ExtentWidth={scrollView.ExtentWidth}, ExtentHeight={scrollView.ExtentHeight}");
01145             AppendAsyncEventMessage($"ScrollView Info: ScrollableWidth={scrollView.ScrollableWidth}, ScrollableHeight={scrollView.ScrollableHeight}");
01146         }
01147
01148         private void LogItemsViewInfo()
01149         {
01150             //AppendAsyncEventMessage($"ItemsView Info: ItemsSource={itemsView.ItemsSource}, ItemTemplate={itemsView.ItemTemplate}, Layout={itemsView.Layout}");
01151         }
01152
01153         private void BtnGetAverageMonthCount_Click(object sender, RoutedEventArgs args)
01154         {
01155             txtAverageMonthCount.Text = _averageMonthCount.ToString();
01156         }
01157
01158         private void BtnSetAverageMonthCount_Click(object sender, RoutedEventArgs args)
01159         {
01160             try
01161             {
01162                 _averageMonthCount = Math.Max(1, Convert.ToInt32(txtAverageMonthCount.Text));
01163             }
01164             catch (Exception ex)
01165             {
01166                 txtExceptionReport.Text = ex.ToString();
01167                 AppendAsyncEventMessage(ex.ToString());
01168             }
01169         }
01170
01171         private void BtnApplyAverageMonthCount_Click(object sender, RoutedEventArgs args)
01172         {
01173             RepopulateAndApplyPhotosCollection();
01174         }
01175
01176         private void ChkUseConstantMonthCount_IsCheckedChanged(object sender, RoutedEventArgs args)
01177         {
01178             try
01179             {
01180                 PopulatePhotosCollection();
01181                 itemsView.ItemsSource = _colPhotos;
01182             }
01183             catch (Exception ex)
01184             {
01185                 txtExceptionReport.Text = ex.ToString();
01186                 AppendAsyncEventMessage(ex.ToString());
01187             }
01188         }
01189
01190         private void ChkHandleItemsInfoRequested_IsCheckedChanged(object sender, RoutedEventArgs args)
01191         {
01192             UpdateItemsInfoRequestedHandler();
01193         }
01194
01195         private void ChkUseFastPath_IsCheckedChanged(object sender, RoutedEventArgs args)
01196         {
01197             UpdateItemsInfoRequestedHandler();
01198         }
01199
01200         private void ChkAnnotatedScrollBarIsEnabled_IsCheckedChanged(object sender, RoutedEventArgs args)
01201         {
01202             annotatedScrollBar.IsEnabled = (bool)chkAnnotatedScrollBarIsEnabled.IsChecked;
01203         }
01204
01205         private void BtnGetFullLog_Click(object sender, RoutedEventArgs e)
01206         {
01207             GetFullLog();
01208         }
01209
01210         private void BtnClearFullLog_Click(object sender, RoutedEventArgs e)
01211         {
01212             ClearFullLog();
01213         }
01214
01215         private void BtnGetScrollViewState_Click(object sender, RoutedEventArgs args)
01216         {
01217             try
01218             {
01219                 txtScrollViewState.Text = _scrollView.State.ToString();
01220             }
01221             catch (Exception ex)
01222             {
01223                 txtExceptionReport.Text = ex.ToString();
01224                 AppendAsyncEventMessage(ex.ToString());
01225             }
01226         }
01227
01228
01229         private void BtnGetScrollViewVerticalOffset_Click(object sender, RoutedEventArgs args)
01230         {
01231             try
01232             {
01233                 txtScrollViewVerticalOffset.Text = _scrollView.VerticalOffset.ToString();
01234             }
01235             catch (Exception ex)
01236             {
01237                 txtExceptionReport.Text = ex.ToString();
01238                 AppendAsyncEventMessage(ex.ToString());
01239             }
01240         }
01241
01242         private void BtnSetScrollViewVerticalOffset_Click(object sender, RoutedEventArgs args)
01243         {
01244             try
01245             {
01246                 double verticalOffset = Convert.ToDouble(txtScrollViewVerticalOffset.Text);
01247                 int correlationId = _scrollView.ScrollTo(_scrollView.HorizontalOffset, verticalOffset);
01248
01249                 if (chkGeneralInfoLogs.IsChecked == true)
01250                 {
01251                     AppendAsyncEventMessage($"BtnSetScrollViewVerticalOffset_Click ScrollView.ScrollTo({verticalOffset}), CorrelationId={correlationId}");
01252                 }
01253             }
01254             catch (Exception ex)
01255             {
01256                 txtExceptionReport.Text = ex.ToString();
01257                 AppendAsyncEventMessage(ex.ToString());
01258             }
01259         }
01260
01261         private void BtnGetYearCount_Click(object sender, RoutedEventArgs args)
01262         {
01263             txtYearCount.Text = _yearCount.ToString();
01264         }
01265
01266         private void BtnSetYearCount_Click(object sender, RoutedEventArgs args)
01267         {
01268             try
01269             {
01270                 _yearCount = Math.Max(1, Convert.ToInt32(txtYearCount.Text));
01271             }
01272             catch (Exception ex)
01273             {
01274                 txtExceptionReport.Text = ex.ToString();
01275                 AppendAsyncEventMessage(ex.ToString());
01276             }
01277         }
01278
01279         private void BtnApplyYearCount_Click(object sender, RoutedEventArgs args)
01280         {
01281             RepopulateAndApplyPhotosCollection();
01282         }
01283
01284         private void BtnForcePopulateHeader_Click(object sender, RoutedEventArgs args)
01285         {
01286             _populateHeaderPending++;
01287             PopulateHeader();
01288         }
01289
01290         private void BtnSetItemsSource_Click(object sender, RoutedEventArgs args)
01291         {
01292             try
01293             {
01294                 itemsView.ItemsSource = _colPhotos;
01295             }
01296             catch (Exception ex)
01297             {
01298                 txtExceptionReport.Text = ex.ToString();
01299                 AppendAsyncEventMessage(ex.ToString());
01300             }
01301         }
01302
01303         private void BtnResetItemsSource_Click(object sender, RoutedEventArgs args)
01304         {
01305             try
01306             {
01307                 itemsView.ItemsSource = null;
01308             }
01309             catch (Exception ex)
01310             {
01311                 txtExceptionReport.Text = ex.ToString();
01312                 AppendAsyncEventMessage(ex.ToString());
01313             }
01314         }
01315
01316         private void BtnClearItemsSource_Click(object sender, RoutedEventArgs args)
01317         {
01318             try
01319             {
01320                 _yearCount = 0;
01321                 _yearPhotoCounts = null;
01322                 _monthPhotoCounts = null;
01323                 _colPhotos.Clear();
01324             }
01325             catch (Exception ex)
01326             {
01327                 txtExceptionReport.Text = ex.ToString();
01328                 AppendAsyncEventMessage(ex.ToString());
01329             }
01330         }
01331
01332         private void BtnAddItemsSourceItem_Click(object sender, RoutedEventArgs args)
01333         {
01334             try
01335             {
01336                 int monthIndex = 0;
01337
01338                 if (_colPhotos == null || _yearPhotoCounts == null || _monthPhotoCounts == null)
01339                 {
01340                     // A collection with a single photo is instantiated.
01341                     _yearCount = 1;
01342                     _yearPhotoCounts = new int[_yearCount];
01343                     _monthPhotoCounts = new int[_yearCount, 12];
01344                     if (_colPhotos == null)
01345                     {
01346                         _colPhotos = new ObservableCollection<Entity>();
01347
01348                         HookPhotosCollectionChanged();
01349                     }
01350                 }
01351                 else
01352                 {
01353                     int lastYearIndex = _yearCount - 1;
01354                     int lastPopulatedMonthIndex = 11;
01355                     int lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];
01356
01357                     while (lastPopulatedMonthCount == 0)
01358                     {
01359                         lastPopulatedMonthIndex--;
01360                         lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];
01361                     }
01362
01363                     if (lastPopulatedMonthCount >= _averageMonthCount)
01364                     {
01365                         if (lastPopulatedMonthIndex == 11)
01366                         {
01367                             // Add a new year without photos.
01368                             int[] yearPhotoCounts = new int[_yearCount + 1];
01369                             int[,] monthPhotoCounts = new int[_yearCount + 1, 12];
01370
01371                             for (int yearIndexTmp = 0; yearIndexTmp < _yearCount; yearIndexTmp++)
01372                             {
01373                                 yearPhotoCounts[yearIndexTmp] = _yearPhotoCounts[yearIndexTmp];
01374
01375                                 for (int monthIndexTmp = 0; monthIndexTmp < 12; monthIndexTmp++)
01376                                 {
01377                                     monthPhotoCounts[yearIndexTmp, monthIndexTmp] = _monthPhotoCounts[yearIndexTmp, monthIndexTmp];
01378                                 }
01379                             }
01380
01381                             _yearCount++;
01382                             _yearPhotoCounts = yearPhotoCounts;
01383                             _monthPhotoCounts = monthPhotoCounts;
01384                         }
01385                         else
01386                         {
01387                             monthIndex = lastPopulatedMonthIndex + 1;
01388                         }
01389                     }
01390                 }
01391
01392                 // Adding one photo to December of the last year.
01393                 DateTime today = DateTime.Now.Date;
01394                 int yearIndex = _yearCount - 1;
01395                 int year = today.Year - yearIndex;
01396                 int photoIndex = _monthPhotoCounts[yearIndex, monthIndex];
01397
01398                 _yearPhotoCounts[yearIndex] = _yearPhotoCounts[yearIndex] + 1;
01399                 _monthPhotoCounts[yearIndex, monthIndex] = photoIndex + 1;
01400
01401                 Random rnd = new Random();
01402
01403                 _colPhotos.Add(new Entity()
01404                 {
01405                     ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", rnd.Next(1, 127))),
01406                     Description = GetMonthNameFromIndex(monthIndex) + " " + year + " - #" + photoIndex
01407                 });
01408             }
01409             catch (Exception ex)
01410             {
01411                 txtExceptionReport.Text = ex.ToString();
01412                 AppendAsyncEventMessage(ex.ToString());
01413             }
01414         }
01415
01416         private void BtnRemoveLastItemsSourceItem_Click(object sender, RoutedEventArgs args)
01417         {
01418             try
01419             {
01420                 if (_colPhotos == null || _yearPhotoCounts == null || _monthPhotoCounts == null)
01421                 {
01422                     return;
01423                 }
01424
01425                 int lastYearIndex = _yearCount - 1;
01426                 int lastPopulatedMonthIndex = 11;
01427                 int lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];
01428
01429                 while (lastPopulatedMonthCount == 0)
01430                 {
01431                     lastPopulatedMonthIndex--;
01432                     lastPopulatedMonthCount = _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex];
01433                 }
01434
01435                 if (lastPopulatedMonthCount > 1)
01436                 {
01437                     _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex] = lastPopulatedMonthCount - 1;
01438                 }
01439                 else
01440                 {
01441                     if (lastPopulatedMonthIndex == 0)
01442                     {
01443                         // Remove last year as it is now empty.
01444                         _yearCount--;
01445
01446                         if (_yearCount == 0)
01447                         {
01448                             _yearPhotoCounts = null;
01449                             _monthPhotoCounts = null;
01450                         }
01451                         else
01452                         {
01453                             int[] yearPhotoCounts = new int[_yearCount];
01454                             int[,] monthPhotoCounts = new int[_yearCount, 12];
01455
01456                             for (int yearIndexTmp = 0; yearIndexTmp < _yearCount; yearIndexTmp++)
01457                             {
01458                                 yearPhotoCounts[yearIndexTmp] = _yearPhotoCounts[yearIndexTmp];
01459
01460                                 for (int monthIndexTmp = 0; monthIndexTmp < 12; monthIndexTmp++)
01461                                 {
01462                                     monthPhotoCounts[yearIndexTmp, monthIndexTmp] = _monthPhotoCounts[yearIndexTmp, monthIndexTmp];
01463                                 }
01464                             }
01465
01466                             _yearPhotoCounts = yearPhotoCounts;
01467                             _monthPhotoCounts = monthPhotoCounts;
01468                         }
01469                     }
01470                     else
01471                     {
01472                         _monthPhotoCounts[lastYearIndex, lastPopulatedMonthIndex] = 0;
01473                     }
01474                 }
01475
01476                 _colPhotos.RemoveAt(_colPhotos.Count - 1);
01477             }
01478             catch (Exception ex)
01479             {
01480                 txtExceptionReport.Text = ex.ToString();
01481                 AppendAsyncEventMessage(ex.ToString());
01482             }
01483         }
01484
01485         private void BtnParentItemsView_Click(object sender, RoutedEventArgs args)
01486         {
01487             try
01488             {
01489                 gridParent.Children.Insert(0, itemsView);
01490             }
01491             catch (Exception ex)
01492             {
01493                 txtExceptionReport.Text = ex.ToString();
01494                 AppendAsyncEventMessage(ex.ToString());
01495             }
01496         }
01497
01498         private void BtnUnparentItemsView_Click(object sender, RoutedEventArgs args)
01499         {
01500             try
01501             {
01502                 gridParent.Children.Remove(itemsView);
01503             }
01504             catch (Exception ex)
01505             {
01506                 txtExceptionReport.Text = ex.ToString();
01507                 AppendAsyncEventMessage(ex.ToString());
01508             }
01509         }
01510
01511         private void BtnUnparentReparentItemsView_Click(object sender, RoutedEventArgs args)
01512         {
01513             try
01514             {
01515                 gridParent.Children.Remove(itemsView);
01516                 gridParent.Children.Insert(0, itemsView);
01517             }
01518             catch (Exception ex)
01519             {
01520                 txtExceptionReport.Text = ex.ToString();
01521                 AppendAsyncEventMessage(ex.ToString());
01522             }
01523         }
01524
01525         private void BtnUnparentDiscardItemsView_Click(object sender, RoutedEventArgs args)
01526         {
01527             try
01528             {
01529                 gridParent.Children.Remove(itemsView);
01530                 itemsView = null;
01531
01532                 GC.Collect();
01533                 GC.WaitForPendingFinalizers();
01534             }
01535             catch (Exception ex)
01536             {
01537                 txtExceptionReport.Text = ex.ToString();
01538                 AppendAsyncEventMessage(ex.ToString());
01539             }
01540         }
01541
01542         private void CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs args)
01543         {
01544             try
01545             {
01546                 if (itemsView != null)
01547                 {
01548                     int templateIndex = cmbItemTemplate.SelectedIndex;
01549
01550                     if (_photoTemplates[templateIndex] == null)
01551                     {
01552                         _photoTemplates[templateIndex] = Resources["photoTemplate" + (templateIndex + 1).ToString()] as DataTemplate;
01553                     }
01554
01555                     switch (templateIndex)
01556                     {
01557                         case 0:
01558                         case 2:
01559                         case 5:
01560                         case 6:
01561                         case 7:
01562                             linedFlowLayout.LineHeight = 96.0;
01563                             break;
01564
01565                         case 1:
01566                         case 3:
01567                             linedFlowLayout.LineHeight = 146.0;
01568                             break;
01569
01570                         case 4:
01571                             linedFlowLayout.LineHeight = 296.0;
01572                             break;
01573                     }
01574
01575                     itemsView.ItemTemplate = _photoTemplates[templateIndex];
01576                 }
01577             }
01578             catch (Exception ex)
01579             {
01580                 txtExceptionReport.Text = ex.ToString();
01581                 AppendAsyncEventMessage(ex.ToString());
01582             }
01583         }
01584
01585         private void CmbSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
01586         {
01587             try
01588             {
01589                 if (itemsView != null && cmbSelectionMode != null && itemsView.SelectionMode != (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex)
01590                 {
01591                     itemsView.SelectionMode = (ItemsViewSelectionMode)cmbSelectionMode.SelectedIndex;
01592                 }
01593             }
01594             catch (Exception ex)
01595             {
01596                 txtExceptionReport.Text = ex.ToString();
01597                 AppendAsyncEventMessage(ex.ToString());
01598             }
01599         }
01600
01601         private void BtnClearLogs_Click(object sender, RoutedEventArgs args)
01602         {
01603             lstLogs.Items.Clear();
01604         }
01605
01606         private void ChkLogAnnotatedScrollBarEvents_Checked(object sender, RoutedEventArgs args)
01607         {
01608             if (annotatedScrollBar != null)
01609             {
01610                 annotatedScrollBar.Scrolling += AnnotatedScrollBar_ScrollingLog;
01611                 annotatedScrollBar.DetailLabelRequested += AnnotatedScrollBar_DetailLabelRequestedLog;
01612
01613                 IScrollController scrollController = annotatedScrollBar as IScrollController;
01614
01615                 scrollController.ScrollByRequested += ScrollController_ScrollByRequestedLog;
01616                 scrollController.ScrollToRequested += ScrollController_ScrollToRequestedLog;
01617                 scrollController.AddScrollVelocityRequested += ScrollController_AddScrollVelocityRequestedLog;
01618             }
01619         }
01620
01621         private void ChkLogAnnotatedScrollBarEvents_Unchecked(object sender, RoutedEventArgs args)
01622         {
01623             if (annotatedScrollBar != null)
01624             {
01625                 annotatedScrollBar.Scrolling -= AnnotatedScrollBar_ScrollingLog;
01626                 annotatedScrollBar.DetailLabelRequested -= AnnotatedScrollBar_DetailLabelRequestedLog;
01627
01628                 IScrollController scrollController = annotatedScrollBar as IScrollController;
01629
01630                 scrollController.ScrollByRequested -= ScrollController_ScrollByRequestedLog;
01631                 scrollController.ScrollToRequested -= ScrollController_ScrollToRequestedLog;
01632                 scrollController.AddScrollVelocityRequested -= ScrollController_AddScrollVelocityRequestedLog;
01633             }
01634         }
01635
01636         private void ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs args)
01637         {
01638             if (itemsView != null)
01639             {
01640                 ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
01641
01642                 if (itemsRepeater != null)
01643                 {
01644                     itemsRepeater.LayoutUpdated += ItemsRepeater_LayoutUpdatedLog;
01645                     itemsRepeater.Loaded += ItemsRepeater_LoadedLog;
01646                     itemsRepeater.SizeChanged += ItemsRepeater_SizeChangedLog;
01647                 }
01648             }
01649         }
01650
01651         private void ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs args)
01652         {
01653             if (itemsView != null)
01654             {
01655                 ItemsRepeater itemsRepeater = ItemsViewTestHooks.GetItemsRepeaterPart(itemsView);
01656
01657                 if (itemsRepeater != null)
01658                 {
01659                     itemsRepeater.LayoutUpdated -= ItemsRepeater_LayoutUpdatedLog;
01660                     itemsRepeater.Loaded -= ItemsRepeater_LoadedLog;
01661                     itemsRepeater.SizeChanged -= ItemsRepeater_SizeChangedLog;
01662                 }
01663             }
01664         }
01665
01666         private void ChkLogLinedFlowLayoutEvents_Checked(object sender, RoutedEventArgs args)
01667         {
01668             if (linedFlowLayout != null)
01669             {
01670                 linedFlowLayout.ItemsUnlocked += LinedFlowLayout_ItemsUnlockedLog;
01671                 linedFlowLayout.ArrangeInvalidated += LinedFlowLayout_ArrangeInvalidatedLog;
01672                 linedFlowLayout.MeasureInvalidated += LinedFlowLayout_MeasureInvalidatedLog;
01673             }
01674         }
01675
01676         private void ChkLogLinedFlowLayoutEvents_Unchecked(object sender, RoutedEventArgs args)
01677         {
01678             if (linedFlowLayout != null)
01679             {
01680                 linedFlowLayout.ItemsUnlocked -= LinedFlowLayout_ItemsUnlockedLog;
01681                 linedFlowLayout.ArrangeInvalidated -= LinedFlowLayout_ArrangeInvalidatedLog;
01682                 linedFlowLayout.MeasureInvalidated -= LinedFlowLayout_MeasureInvalidatedLog;
01683             }
01684         }
01685
01686         private void ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs args)
01687         {
01688             if (itemsView != null)
01689             {
01690                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
01691
01692                 if (scrollView != null)
01693                 {
01694                     ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
01695
01696                     if (scrollPresenter != null)
01697                     {
01698                         scrollPresenter.Loaded += ScrollPresenter_LoadedLog;
01699                         scrollPresenter.SizeChanged += ScrollPresenter_SizeChangedLog;
01700                         scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChangedLog;
01701                         scrollPresenter.StateChanged += ScrollPresenter_StateChangedLog;
01702                         scrollPresenter.ViewChanged += ScrollPresenter_ViewChangedLog;
01703                         scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStartingLog;
01704                         scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStartingLog;
01705                         scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompletedLog;
01706                         scrollPresenter.ZoomCompleted += ScrollPresenter_ZoomCompletedLog;
01707                     }
01708                 }
01709             }
01710         }
01711
01712         private void ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs args)
01713         {
01714             if (itemsView != null)
01715             {
01716                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
01717
01718                 if (scrollView != null)
01719                 {
01720                     ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
01721
01722                     if (scrollPresenter != null)
01723                     {
01724                         scrollPresenter.Loaded -= ScrollPresenter_LoadedLog;
01725                         scrollPresenter.SizeChanged -= ScrollPresenter_SizeChangedLog;
01726                         scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChangedLog;
01727                         scrollPresenter.StateChanged -= ScrollPresenter_StateChangedLog;
01728                         scrollPresenter.ViewChanged -= ScrollPresenter_ViewChangedLog;
01729                         scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStartingLog;
01730                         scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStartingLog;
01731                         scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompletedLog;
01732                         scrollPresenter.ZoomCompleted -= ScrollPresenter_ZoomCompletedLog;
01733                     }
01734                 }
01735             }
01736         }
01737
01738         private void ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs args)
01739         {
01740             if (itemsView != null)
01741             {
01742                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
01743
01744                 if (scrollView != null)
01745                 {
01746                     scrollView.Loaded += ScrollView_LoadedLog;
01747                     scrollView.SizeChanged += ScrollView_SizeChangedLog;
01748                     scrollView.ExtentChanged += ScrollView_ExtentChangedLog;
01749                     scrollView.StateChanged += ScrollView_StateChangedLog;
01750                     scrollView.ViewChanged += ScrollView_ViewChangedLog;
01751                     scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStartingLog;
01752                     scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStartingLog;
01753                     scrollView.ScrollCompleted += ScrollView_ScrollCompletedLog;
01754                     scrollView.ZoomCompleted += ScrollView_ZoomCompletedLog;
01755                 }
01756             }
01757         }
01758
01759         private void ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs args)
01760         {
01761             if (itemsView != null)
01762             {
01763                 ScrollView scrollView = ItemsViewTestHooks.GetScrollViewPart(itemsView);
01764
01765                 if (scrollView != null)
01766                 {
01767                     scrollView.Loaded -= ScrollView_LoadedLog;
01768                     scrollView.SizeChanged -= ScrollView_SizeChangedLog;
01769                     scrollView.ExtentChanged -= ScrollView_ExtentChangedLog;
01770                     scrollView.StateChanged -= ScrollView_StateChangedLog;
01771                     scrollView.ViewChanged -= ScrollView_ViewChangedLog;
01772                     scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStartingLog;
01773                     scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStartingLog;
01774                     scrollView.ScrollCompleted -= ScrollView_ScrollCompletedLog;
01775                     scrollView.ZoomCompleted -= ScrollView_ZoomCompletedLog;
01776                 }
01777             }
01778         }
01779
01780         private void ChkLogItemsViewEvents_Checked(object sender, RoutedEventArgs args)
01781         {
01782             if (itemsView != null)
01783             {
01784                 itemsView.GettingFocus += ItemsView_GettingFocusLog;
01785                 itemsView.GotFocus += ItemsView_GotFocusLog;
01786                 itemsView.LosingFocus += ItemsView_LosingFocusLog;
01787                 itemsView.LostFocus += ItemsView_LostFocusLog;
01788                 itemsView.Loaded += ItemsView_LoadedLog;
01789                 itemsView.SizeChanged += ItemsView_SizeChangedLog;
01790             }
01791         }
01792
01793         private void ChkLogItemsViewEvents_Unchecked(object sender, RoutedEventArgs args)
01794         {
01795             if (itemsView != null)
01796             {
01797                 itemsView.GettingFocus -= ItemsView_GettingFocusLog;
01798                 itemsView.GotFocus -= ItemsView_GotFocusLog;
01799                 itemsView.LosingFocus -= ItemsView_LosingFocusLog;
01800                 itemsView.LostFocus -= ItemsView_LostFocusLog;
01801                 itemsView.Loaded -= ItemsView_LoadedLog;
01802                 itemsView.SizeChanged -= ItemsView_SizeChangedLog;
01803             }
01804         }
01805
01806         private void ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs args)
01807         {
01808             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01809             if (chkLogItemsViewMessages.IsChecked == false &&
01810                 chkLogScrollViewMessages.IsChecked == false &&
01811                 chkLogScrollPresenterMessages.IsChecked == false &&
01812                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01813                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01814                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01815         }
01816
01817         private void ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs args)
01818         {
01819             MUXControlsTestHooks.SetLoggingLevelForType("ItemsRepeater", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01820             if (chkLogItemsViewMessages.IsChecked == false &&
01821                 chkLogScrollViewMessages.IsChecked == false &&
01822                 chkLogScrollPresenterMessages.IsChecked == false &&
01823                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01824                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01825                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01826         }
01827
01828         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs args)
01829         {
01830             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01831             if (chkLogItemsViewMessages.IsChecked == false &&
01832                 chkLogItemsRepeaterMessages.IsChecked == false &&
01833                 chkLogScrollViewMessages.IsChecked == false &&
01834                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01835                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01836                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01837         }
01838
01839         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs args)
01840         {
01841             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01842             if (chkLogItemsViewMessages.IsChecked == false &&
01843                 chkLogItemsRepeaterMessages.IsChecked == false &&
01844                 chkLogScrollViewMessages.IsChecked == false &&
01845                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01846                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01847                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01848         }
01849
01850         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs args)
01851         {
01852             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01853             if (chkLogItemsViewMessages.IsChecked == false &&
01854                 chkLogItemsRepeaterMessages.IsChecked == false &&
01855                 chkLogScrollPresenterMessages.IsChecked == false &&
01856                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01857                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01858                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01859         }
01860
01861         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs args)
01862         {
01863             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01864             if (chkLogItemsViewMessages.IsChecked == false &&
01865                 chkLogItemsRepeaterMessages.IsChecked == false &&
01866                 chkLogScrollPresenterMessages.IsChecked == false &&
01867                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01868                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01869                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01870         }
01871
01872         private void ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs args)
01873         {
01874             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01875             if (chkLogScrollViewMessages.IsChecked == false &&
01876                 chkLogScrollPresenterMessages.IsChecked == false &&
01877                 chkLogItemsRepeaterMessages.IsChecked == false &&
01878                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01879                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01880                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01881         }
01882
01883         private void ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs args)
01884         {
01885             MUXControlsTestHooks.SetLoggingLevelForType("ItemsView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01886             if (chkLogScrollViewMessages.IsChecked == false &&
01887                 chkLogScrollPresenterMessages.IsChecked == false &&
01888                 chkLogItemsRepeaterMessages.IsChecked == false &&
01889                 chkLogLinedFlowLayoutMessages.IsChecked == false &&
01890                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01891                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01892         }
01893
01894         private void ChkLogLinedFlowLayoutMessages_Checked(object sender, RoutedEventArgs args)
01895         {
01896             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01897             if (chkLogScrollViewMessages.IsChecked == false &&
01898                 chkLogScrollPresenterMessages.IsChecked == false &&
01899                 chkLogItemsRepeaterMessages.IsChecked == false &&
01900                 chkLogItemsViewMessages.IsChecked == false &&
01901                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01902                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01903         }
01904
01905         private void ChkLogLinedFlowLayoutMessages_Unchecked(object sender, RoutedEventArgs args)
01906         {
01907             MUXControlsTestHooks.SetLoggingLevelForType("LinedFlowLayout", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01908             if (chkLogScrollViewMessages.IsChecked == false &&
01909                 chkLogScrollPresenterMessages.IsChecked == false &&
01910                 chkLogItemsRepeaterMessages.IsChecked == false &&
01911                 chkLogItemsViewMessages.IsChecked == false &&
01912                 chkLogAnnotatedScrollBarMessages.IsChecked == false)
01913                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01914         }
01915
01916         private void ChkLogAnnotatedScrollBarMessages_Checked(object sender, RoutedEventArgs args)
01917         {
01918             MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01919             if (chkLogScrollViewMessages.IsChecked == false &&
01920                 chkLogScrollPresenterMessages.IsChecked == false &&
01921                 chkLogItemsRepeaterMessages.IsChecked == false &&
01922                 chkLogItemsViewMessages.IsChecked == false &&
01923                 chkLogLinedFlowLayoutMessages.IsChecked == false)
01924                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01925         }
01926
01927         private void ChkLogAnnotatedScrollBarMessages_Unchecked(object sender, RoutedEventArgs args)
01928         {
01929             MUXControlsTestHooks.SetLoggingLevelForType("AnnotatedScrollBar", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
01930             if (chkLogScrollViewMessages.IsChecked == false &&
01931                 chkLogScrollPresenterMessages.IsChecked == false &&
01932                 chkLogItemsRepeaterMessages.IsChecked == false &&
01933                 chkLogItemsViewMessages.IsChecked == false &&
01934                 chkLogLinedFlowLayoutMessages.IsChecked == false)
01935                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
01936         }
01937
01938         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
01939         {
01940             // Cut off the terminating new line.
01941             string msg = args.Message.Substring(0, args.Message.Length - 1);
01942             string asyncEventMessage;
01943             string senderName = string.Empty;
01944
01945             while (msg.Contains("0x"))
01946             {
01947                 int index = msg.IndexOf("0x");
01948
01949                 string toReplace = msg.Substring(index, 10);
01950
01951                 msg = msg.Replace(toReplace, "PTR");
01952             }
01953
01954             try
01955             {
01956                 FrameworkElement fe = sender as FrameworkElement;
01957
01958                 if (fe != null)
01959                 {
01960                     senderName = "s:" + fe.Name + ", ";
01961                 }
01962             }
01963             catch
01964             {
01965             }
01966
01967             if (args.IsVerboseLevel)
01968             {
01969                 asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
01970             }
01971             else
01972             {
01973                 asyncEventMessage = "Info: " + senderName + "m:" + msg;
01974             }
01975
01976             AppendAsyncEventMessage(asyncEventMessage);
01977         }
01978
01979         private void AppendAsyncEventMessage(string asyncEventMessage)
01980         {
01981             lock (_asyncEventReportingLock)
01982             {
01983                 while (asyncEventMessage.Length > 0)
01984                 {
01985                     string msgHead = asyncEventMessage;
01986
01987                     if (asyncEventMessage.Length > 110)
01988                     {
01989                         int commaIndex = asyncEventMessage.IndexOf(',', 110);
01990                         if (commaIndex != -1)
01991                         {
01992                             msgHead = asyncEventMessage.Substring(0, commaIndex);
01993                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
01994                         }
01995                         else
01996                         {
01997                             asyncEventMessage = string.Empty;
01998                         }
01999                     }
02000                     else
02001                     {
02002                         asyncEventMessage = string.Empty;
02003                     }
02004
02005                     _lstAsyncEventMessage.Add(msgHead);
02006                 }
02007
02008                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
02009             }
02010         }
02011
02012         private void AppendAsyncEventMessage()
02013         {
02014             lock (_asyncEventReportingLock)
02015             {
02016                 foreach (string asyncEventMessage in _lstAsyncEventMessage)
02017                 {
02018                     lstLogs.Items.Add(asyncEventMessage);
02019                     _fullLogs.Add(asyncEventMessage);
02020                 }
02021                 _lstAsyncEventMessage.Clear();
02022             }
02023         }
02024
02025         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs args)
02026         {
02027             txtExceptionReport.Text = string.Empty;
02028         }
02029
02030         private void GetFullLog()
02031         {
02032             this.txtStatus.Text = "GetFullLog. Populating cmbFullLog...";
02033             chkLogCleared.IsChecked = false;
02034             foreach (string log in _fullLogs)
02035             {
02036                 this.cmbFullLog.Items.Add(log);
02037             }
02038             chkLogUpdated.IsChecked = true;
02039             this.txtStatus.Text = "GetFullLog. Done.";
02040         }
02041
02042         private void ClearFullLog()
02043         {
02044             this.txtStatus.Text = "ClearFullLog. Clearing cmbFullLog & fullLogs...";
02045             chkLogUpdated.IsChecked = false;
02046             _fullLogs.Clear();
02047             this.cmbFullLog.Items.Clear();
02048             chkLogCleared.IsChecked = true;
02049             this.txtStatus.Text = "ClearFullLog. Done.";
02050         }
02051     }
02052 }
Generated on Sun Dec 1 2024 20:51:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemAutomationPeer.idl Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass NavigationViewItemAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer, Microsoft.UI.Xaml.Automation.Provider.IExpandCollapseProvider
00007 {
00008     [method_name("CreateInstanceWithOwner")] NavigationViewItemAutomationPeer(MU_XC_NAMESPACE.NavigationViewItem owner);
00009 }
00010
00011
00012 [MUX_PUBLIC]
00013 [webhosthidden]
00014 unsealed runtimeclass NavigationViewAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00015 {
00016     NavigationViewAutomationPeer(MU_XC_NAMESPACE.NavigationView owner);
00017 }
00018
00019
00020 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MonochromaticOverlayPresenter Member List

This is the complete list of members for MonochromaticOverlayPresenter, including all inherited members.
abi_enter() | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
CheckThread() | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
ClearProperties() | MonochromaticOverlayPresenterProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< MonochromaticOverlayPresenter > &&self) noexcept | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline, static]
EnsureProperties() | MonochromaticOverlayPresenterProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
final_release(std::unique_ptr< MonochromaticOverlayPresenter > &&self) | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline, static]
GetBase() | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
GetInner() | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
InvalidateBrush() | MonochromaticOverlayPresenter | [private]
IsOnThread() | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
MonochromaticOverlayPresenter() | MonochromaticOverlayPresenter |
MonochromaticOverlayPresenterProperties() | MonochromaticOverlayPresenterProperties |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | MonochromaticOverlayPresenter |
OnReplacementColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MonochromaticOverlayPresenterProperties | [static]
OnSourceElementPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MonochromaticOverlayPresenterProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MonochromaticOverlayPresenter, winrt::implementation::MonochromaticOverlayPresenterT > | [inline]
ReplacementColor(winrt::Color const &value) | MonochromaticOverlayPresenterProperties |
ReplacementColor() | MonochromaticOverlayPresenterProperties |
ReplacementColorProperty() | MonochromaticOverlayPresenterProperties | [inline, static]
s_ReplacementColorProperty | MonochromaticOverlayPresenterProperties | [static]
s_SourceElementProperty | MonochromaticOverlayPresenterProperties | [static]
SourceElement(winrt::UIElement const &value) | MonochromaticOverlayPresenterProperties |
SourceElement() | MonochromaticOverlayPresenterProperties |
SourceElementProperty() | MonochromaticOverlayPresenterProperties | [inline, static]
UpdateBrush() | MonochromaticOverlayPresenter | [private]
~MonochromaticOverlayPresenter() | MonochromaticOverlayPresenter | [inline]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventTraits< RoutedEventType::GettingFocus > Member List

This is the complete list of members for RoutedEventTraits< RoutedEventType::GettingFocus >, including all inherited members.
Event() RoutedEventTraits< RoutedEventType::GettingFocus > [inline, static]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/FlipViewPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

FlipViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     [TopLevelTestPage(Name = "FlipView", Icon = "FlipView.png")]
00007     public sealed partial class FlipViewPage : TestPage
00008     {
00009         public FlipViewPage()
00010         {
00011             this.InitializeComponent();
00012         }
00013     }
00014 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SelectorBar.properties.h Source File

  • File List
  • File Members
  • Generated

SelectorBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class SelectorBarProperties
00008 {
00009 public:
00010     SelectorBarProperties();
00011
00012     void Items(winrt::IVector<winrt::SelectorBarItem> const& value);
00013     winrt::IVector<winrt::SelectorBarItem> Items();
00014
00015     void SelectedItem(winrt::SelectorBarItem const& value);
00016     winrt::SelectorBarItem SelectedItem();
00017
00018     static winrt::DependencyProperty ItemsProperty() { return s_ItemsProperty; }
00019     static winrt::DependencyProperty SelectedItemProperty() { return s_SelectedItemProperty; }
00020
00021     static GlobalDependencyProperty s_ItemsProperty;
00022     static GlobalDependencyProperty s_SelectedItemProperty;
00023
00024     winrt::event_token SelectionChanged(winrt::TypedEventHandler<winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs> const& value);
00025     void SelectionChanged(winrt::event_token const& token);
00026
00027     event_source<winrt::TypedEventHandler<winrt::SelectorBar, winrt::SelectorBarSelectionChangedEventArgs>> m_selectionChangedEventSource;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031
00032     static void OnItemsPropertyChanged(
00033         winrt::DependencyObject const& sender,
00034         winrt::DependencyPropertyChangedEventArgs const& args);
00035
00036     static void OnSelectedItemPropertyChanged(
00037         winrt::DependencyObject const& sender,
00038         winrt::DependencyPropertyChangedEventArgs const& args);
00039 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DataModelWithINPC Member List

This is the complete list of members for DataModelWithINPC, including all inherited members.
_value | DataModelWithINPC | [private]
OnPropertyChanged(string propertyName) | DataModelWithINPC | [inline, protected, virtual]
PropertyChanged | DataModelWithINPC |
Value | DataModelWithINPC |
Generated on Sun Dec 1 2024 20:54:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapControl Member List

This is the complete list of members for MapControl, including all inherited members.
abi_enter() | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
AddMapIcon(winrt::Geopoint mapIconPoint, winrt::hstring layerId) | MapControl | [private]
Center(winrt::Geopoint const &value) | MapControlProperties |
Center() | MapControlProperties |
CenterProperty() | MapControlProperties | [inline, static]
CheckThread() | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
ClearLayer(winrt::hstring layerId) | MapControl | [private]
ClearProperties() | MapControlProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< MapControl > &&self) noexcept | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline, static]
EnsureProperties() | MapControlProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
final_release(std::unique_ptr< MapControl > &&self) | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline, static]
GetBase() | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
GetCoreWebView2() | MapControl | [private]
GetInner() | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
GetMapHtmlContent() | MapControl | [private, static]
InitializeWebMap() | MapControl | [private]
InteractiveControlsVisible(bool value) | MapControlProperties |
InteractiveControlsVisible() | MapControlProperties |
InteractiveControlsVisibleProperty() | MapControlProperties | [inline, static]
IsOnThread() | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
LayerElementsChanged(const winrt::MapElementsLayer &layer, winrt::IVector< winrt::MapElement > elements, const winrt::Collections::IVectorChangedEventArgs &args, winrt::hstring elementId) | MapControl |
Layers(winrt::IVector< winrt::MapLayer > const &value) | MapControlProperties |
Layers() | MapControlProperties |
LayersProperty() | MapControlProperties | [inline, static]
m_mapElementClickEventSource | MapControlProperties |
m_mapServiceErrorOccurredEventSource | MapControlProperties |
MapControl() | MapControl |
MapControlProperties() | MapControlProperties |
MapElementClick(winrt::TypedEventHandler< winrt::MapControl, winrt::MapElementClickEventArgs > const &value) | MapControlProperties |
MapElementClick(winrt::event_token const &token) | MapControlProperties |
MapServiceErrorOccurred(winrt::TypedEventHandler< winrt::MapControl, winrt::MapControlMapServiceErrorOccurredEventArgs > const &value) | MapControlProperties |
MapServiceErrorOccurred(winrt::event_token const &token) | MapControlProperties |
MapServiceToken(winrt::hstring const &value) | MapControlProperties |
MapServiceToken() | MapControlProperties |
MapServiceTokenProperty() | MapControlProperties | [inline, static]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
OnApplyTemplate() | MapControl |
OnCenterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnInteractiveControlsVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnLayerAdded(const winrt::MapElementsLayer layer) | MapControl | [private]
OnLayersPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnLayersVectorChanged(const winrt::IObservableVector< winrt::MapLayer > &, const winrt::Collections::IVectorChangedEventArgs &args) | MapControl | [private]
OnMapServiceTokenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | MapControl |
OnZoomLevelPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< MapControl, winrt::implementation::MapControlT > | [inline]
RemoveMapIcon(winrt::hstring pointId, winrt::hstring layerId) | MapControl | [private]
ResetLayerCollection() | MapControl | [private]
s_CenterProperty | MapControlProperties | [static]
s_InteractiveControlsVisibleProperty | MapControlProperties | [static]
s_LayersProperty | MapControlProperties | [static]
s_mapHtmlContent | MapControl | [private, static]
s_MapServiceTokenProperty | MapControlProperties | [static]
s_ZoomLevelProperty | MapControlProperties | [static]
SetUpWebView() | MapControl | [private]
UpdateCenterInWebPage() | MapControl | [private]
UpdateControlsInWebPage() | MapControl | [private]
UpdateMapIcon(winrt::Geopoint mapIconPoint, winrt::hstring pointId, winrt::hstring layerId) | MapControl |
UpdateMapServiceTokenInWebPage() | MapControl | [private]
UpdateZoomLevelInWebPage() | MapControl | [private]
WebMessageReceived(winrt::WebView2 sender, winrt::CoreWebView2WebMessageReceivedEventArgs args) | MapControl | [private]
ZoomLevel(double value) | MapControlProperties |
ZoomLevel() | MapControlProperties |
ZoomLevelProperty() | MapControlProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarAutomationPeer.h Source File

  • File List
  • File Members
  • MenuBar

MenuBarAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "MenuBar.h"
00007 #include "MenuBarAutomationPeer.g.h"
00008
00009 class MenuBarAutomationPeer :
00010     public ReferenceTracker<MenuBarAutomationPeer, winrt::implementation::MenuBarAutomationPeerT>
00011 {
00012
00013 public:
00014     MenuBarAutomationPeer(winrt::MenuBar const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::AutomationControlType GetAutomationControlTypeCore();
00018
00019 };
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/CollectionChangeEventArgsConverters.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

CollectionChangeEventArgsConverters.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections;
00006 using System.Collections.Generic;
00007 using System.Collections.ObjectModel;
00008 using System.Collections.Specialized;
00009 using System.Linq;
00010 using Windows.Foundation.Collections;
00011 using MUXControlsTestApp.Utilities;
00012
00013 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00014 {
00015     public static class CollectionChangeEventArgsConverters
00016     {
00017         public static NotifyCollectionChangedEventArgs ConvertToDataSourceChangedEventArgs(this IVectorChangedEventArgs args)
00018         {
00019             List<object> addedItems = new List<object>();
00020             List<object> removedItems = new List<object>();
00021
00022             NotifyCollectionChangedEventArgs newArgs;
00023
00024             switch (args.CollectionChange)
00025             {
00026                 case CollectionChange.ItemInserted:
00027                     addedItems.Add(null);
00028                     newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, addedItems, (int)args.Index);
00029                     break;
00030                 case CollectionChange.ItemRemoved:
00031                     removedItems.Add(null);
00032                     newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, removedItems, (int)args.Index);
00033                     break;
00034                 case CollectionChange.ItemChanged:
00035                     addedItems.Add(null);
00036                     removedItems.Add(null);
00037                     newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, addedItems, removedItems, (int)args.Index);
00038                     break;
00039                 case CollectionChange.Reset:
00040                     newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);
00041                     break;
00042                 default:
00043                     throw new InvalidOperationException();
00044             }
00045
00046             return newArgs;
00047         }
00048
00049         public static NotifyCollectionChangedEventArgs CreateNotifyArgs(
00050             NotifyCollectionChangedAction action,
00051             int oldStartingIndex,
00052             int oldItemsCount,
00053             int newStartingIndex,
00054             int newItemsCount)
00055         {
00056             NotifyCollectionChangedEventArgs newArgs = null;
00057
00058             List<object> addedItems = new List<object>();
00059             List<object> removedItems = new List<object>();
00060
00061             switch (action)
00062             {
00063                 case NotifyCollectionChangedAction.Add:
00064                     {
00065                         for (int i = 0; i < newItemsCount; i++)
00066                         {
00067                             addedItems.Add(null);
00068                         }
00069
00070                         newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, addedItems, newStartingIndex);
00071                     }
00072                     break;
00073                 case NotifyCollectionChangedAction.Remove:
00074                     {
00075                         for (int i = 0; i < oldItemsCount; i++)
00076                         {
00077                             removedItems.Add(null);
00078                         }
00079                         newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, removedItems, oldStartingIndex);
00080                     }
00081                     break;
00082                 case NotifyCollectionChangedAction.Replace:
00083                     {
00084                         for (int i = 0; i < newItemsCount; i++)
00085                         {
00086                             addedItems.Add(null);
00087                         }
00088                         for (int i = 0; i < oldItemsCount; i++)
00089                         {
00090                             removedItems.Add(null);
00091                         }
00092                         newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, addedItems, removedItems, newStartingIndex);
00093                     }
00094                     break;
00095                 case NotifyCollectionChangedAction.Move:
00096                     {
00097                         List<object> movedItems = new List<object>();
00098                         for (int i = 0; i < oldItemsCount; i++)
00099                         {
00100                             movedItems.Add(null);
00101                         }
00102                         newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, movedItems, newStartingIndex, oldStartingIndex);
00103                     }
00104                   break;
00105                 case NotifyCollectionChangedAction.Reset:
00106                     newArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);
00107                     break;
00108                 default:
00109                     throw new InvalidOperationException();
00110             }
00111
00112             return newArgs;
00113         }
00114     }
00115 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/RefreshInfoProviderImpl.h Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

RefreshInfoProviderImpl.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #define DEFAULT_EXECUTION_RATIO 0.8
00007
00008
00009 class RefreshInfoProviderImpl
00010     : public ReferenceTracker<
00011         RefreshInfoProviderImpl,
00012         reference_tracker_implements_t<winrt::IRefreshInfoProvider>::type,
00013         winrt::IInteractionTrackerOwner>
00014 {
00015 public:
00016     RefreshInfoProviderImpl();
00017     ~RefreshInfoProviderImpl();
00018     RefreshInfoProviderImpl(const winrt::RefreshPullDirection& refreshPullDirection, const winrt::Size& refreshVisualizerSize, const winrt::Compositor& compositor);
00019     void UpdateIsInteractingForRefresh(bool value);
00020
00021     //IInteractionTrackerOwner;
00022     void ValuesChanged(const winrt::InteractionTracker& sender, const winrt::InteractionTrackerValuesChangedArgs& args);
00023     void RequestIgnored(const winrt::InteractionTracker& sender, const winrt::InteractionTrackerRequestIgnoredArgs& args);
00024     void InteractingStateEntered(const winrt::InteractionTracker& sender, const winrt::InteractionTrackerInteractingStateEnteredArgs& args);
00025     void InertiaStateEntered(const winrt::InteractionTracker& sender, const winrt::InteractionTrackerInertiaStateEnteredArgs& args);
00026     void IdleStateEntered(const winrt::InteractionTracker& sender, const winrt::InteractionTrackerIdleStateEnteredArgs& args);
00027     void CustomAnimationStateEntered(const winrt::InteractionTracker& sender, const winrt::InteractionTrackerCustomAnimationStateEnteredArgs& args);
00028
00029     //IRefreshInfoProvider
00030     void OnRefreshStarted();
00031     void OnRefreshCompleted();
00032     winrt::event_token InteractionRatioChanged(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::RefreshInteractionRatioChangedEventArgs>& handler);
00033     void InteractionRatioChanged(const winrt::event_token& token);
00034     winrt::event_token IsInteractingForRefreshChanged(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>& handler);
00035     void IsInteractingForRefreshChanged(const winrt::event_token& token);
00036     winrt::event_token RefreshStarted(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>& handler);
00037     void RefreshStarted(const winrt::event_token& token);
00038     winrt::event_token RefreshCompleted(const winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>& handler);
00039     void RefreshCompleted(const winrt::event_token& token);
00040     double ExecutionRatio();
00041     winrt::hstring InteractionRatioCompositionProperty();
00042     winrt::CompositionPropertySet CompositionProperties();
00043     bool IsInteractingForRefresh();
00044
00045     //private helpers
00046     void RaiseInteractionRatioChanged(double interactionRatio);
00047     void RaiseIsInteractingForRefreshChanged();
00048     void RaiseRefreshStarted();
00049     void RaiseRefreshCompleted();
00050     void SetPeekingMode(bool peeking);
00051
00052     bool AreClose(double interactionRatio, double target);
00053
00054 private:
00055     winrt::RefreshPullDirection m_refreshPullDirection{ winrt::RefreshPullDirection::TopToBottom };
00056     winrt::Size m_refreshVisualizerSize{ 1.0f, 1.0f };
00057     bool m_isInteractingForRefresh{ false };
00058     int m_interactionRatioChangedCount{ 0 };
00059     winrt::CompositionPropertySet m_compositionProperties{ nullptr };
00060     PCWSTR m_interactionRatioCompositionProperty = L"InteractionRatio";
00061     double m_executionRatio{ DEFAULT_EXECUTION_RATIO };
00062     bool m_peeking{ false };
00063
00064     event_source<winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>> m_IsInteractingForRefreshChangedEventSource{ this };
00065     event_source<winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::RefreshInteractionRatioChangedEventArgs>> m_InteractionRatioChangedEventSource{ this };
00066     event_source<winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>> m_RefreshStartedEventSource{ this };
00067     event_source<winrt::TypedEventHandler<winrt::IRefreshInfoProvider, winrt::IInspectable>> m_RefreshCompletedEventSource{ this };
00068 };
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewTests Member List

This is the complete list of members for ScrollViewTests, including all inherited members.
c_defaultAnchorRatio | ScrollViewTests | [private]
c_defaultComputedHorizontalScrollMode | ScrollViewTests | [private]
c_defaultComputedVerticalScrollMode | ScrollViewTests | [private]
c_defaultContentOrientation | ScrollViewTests | [private]
c_defaultHorizontalScrollChainMode | ScrollViewTests | [private]
c_defaultHorizontalScrollMode | ScrollViewTests | [private]
c_defaultHorizontalScrollRailMode | ScrollViewTests | [private]
c_defaultIgnoredInputKinds | ScrollViewTests | [private]
c_defaultMaxZoomFactor | ScrollViewTests | [private]
c_defaultMinZoomFactor | ScrollViewTests | [private]
c_defaultUIScrollViewContentHeight | ScrollViewTests | [private]
c_defaultUIScrollViewContentWidth | ScrollViewTests | [private]
c_defaultUIScrollViewHeight | ScrollViewTests | [private]
c_defaultUIScrollViewWidth | ScrollViewTests | [private]
c_defaultVerticalScrollChainMode | ScrollViewTests | [private]
c_defaultVerticalScrollMode | ScrollViewTests | [private]
c_defaultVerticalScrollRailMode | ScrollViewTests | [private]
c_defaultZoomChainMode | ScrollViewTests | [private]
c_defaultZoomMode | ScrollViewTests | [private]
c_epsilon | ScrollViewTests | [private]
c_MaxWaitDuration | ScrollViewTests | [private]
IsDebuggerPresent() | ScrollViewTests | [private]
m_scrollViewVisualStateCounts | ScrollViewTests | [private]
m_trackScrollViewStateChanges | ScrollViewTests | [private]
MUXControlsTestHooks_LoggingMessageForVisualStateChange(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollViewTests | [inline, private]
SetupDefaultUI(ScrollView scrollView, Rectangle rectangleScrollViewContent=null, AutoResetEvent scrollViewLoadedEvent=null, AutoResetEvent scrollViewUnloadedEvent=null, bool setAsContentRoot=true, bool useParentGrid=false) | ScrollViewTests | [inline, private]
VerifyAnchorCandidateRegistration() | ScrollViewTests | [inline]
VerifyDefaultPropertyValues() | ScrollViewTests | [inline]
VerifyPropertyValuesAfterTemplateApplication() | ScrollViewTests | [inline]
VerifyScrollPresenterAttachedProperties() | ScrollViewTests | [inline]
VerifyVisualStates() | ScrollViewTests | [inline]
VerifyVisualStates(ScrollBarVisibility scrollBarVisibility, bool autoHideScrollControllers) | ScrollViewTests | [inline, private]
VerifyVisualStates(uint expectedMouseIndicatorStateCount, uint expectedTouchIndicatorStateCount, uint expectedNoIndicatorStateCount, uint expectedScrollBarsSeparatorCollapsedStateCount, uint expectedScrollBarsSeparatorCollapsedDisabledStateCount, uint expectedScrollBarsSeparatorExpandedStateCount, uint expectedScrollBarsSeparatorDisplayedWithoutAnimationStateCount, uint expectedScrollBarsSeparatorExpandedWithoutAnimationStateCount, uint expectedScrollBarsSeparatorCollapsedWithoutAnimationStateCount) | ScrollViewTests | [inline, private]
WaitForEvent(string logComment, EventWaitHandle eventWaitHandle) | ScrollViewTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedBackVisualSource.cpp Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedBackVisualSource.cpp

Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //
00005 //       LottieGen version:
00006 //           7.1.0+ge1fa92580f
00007 //
00008 //       Command:
00009 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedBackVisualSource.json
00010 //
00011 //       Input file:
00012 //           AnimatedBackVisualSource.json (21751 bytes created 23:37-07:00 Oct 5 2021)
00013 //
00014 //       LottieGen source:
00015 //           http://aka.ms/Lottie
00016 //
00017 //     Changes to this file may cause incorrect behavior and will be lost if
00018 //     the code is regenerated.
00019 // </auto-generated>
00020 //------------------------------------------------------------------------------
00021 // ____________________________________
00022 // |       Object stats       | Count |
00023 // |__________________________|_______|
00024 // | All CompositionObjects   |    89 |
00025 // |--------------------------+-------|
00026 // | Expression animators     |    12 |
00027 // | KeyFrame animators       |     9 |
00028 // | Reference parameters     |    12 |
00029 // | Expression operations    |     4 |
00030 // |--------------------------+-------|
00031 // | Animated brushes         |     1 |
00032 // | Animated gradient stops  |     - |
00033 // | ExpressionAnimations     |     2 |
00034 // | PathKeyFrameAnimations   |     - |
00035 // |--------------------------+-------|
00036 // | ContainerVisuals         |     3 |
00037 // | ShapeVisuals             |     2 |
00038 // |--------------------------+-------|
00039 // | ContainerShapes          |     1 |
00040 // | CompositionSpriteShapes  |     6 |
00041 // |--------------------------+-------|
00042 // | Brushes                  |     1 |
00043 // | Gradient stops           |     - |
00044 // | CompositionVisualSurface |     - |
00045 // ------------------------------------
00046 #include "pch.h"
00047 #include "AnimatedVisuals\AnimatedBackVisualSource.h"
00048 #include <winrt/Windows.Foundation.Metadata.h>
00049 #include <winrt/Windows.Foundation.Collections.h>
00050 #include <winrt/Microsoft.UI.Composition.h>
00051 #include "d2d1.h"
00052 #include <d2d1_1.h>
00053 #include <d2d1helper.h>
00054 #include <Windows.Graphics.Interop.h>
00055 #include <Windows.Graphics.Effects.Interop.h>
00056 #include <winrt/Windows.Graphics.Effects.h>
00057
00058 using namespace winrt::Microsoft::UI::Xaml::Controls;
00059 using namespace winrt::Windows::Foundation;
00060 using namespace winrt::Windows::Foundation::Numerics;
00061 using namespace winrt::Windows::Graphics;
00062 using namespace winrt::Windows::UI;
00063 using namespace winrt::Microsoft::UI::Composition;
00064 using TimeSpan = winrt::Windows::Foundation::TimeSpan;
00065
00066 namespace winrt::Microsoft::UI::Xaml::Controls::AnimatedVisuals
00067 {
00068     CppWinRTActivatableClassWithBasicFactory(AnimatedBackVisualSource)
00069 }
00070 #include "AnimatedVisuals\AnimatedBackVisualSource.g.cpp"
00071
00072 class CanvasGeometry : public winrt::implements<CanvasGeometry,
00073     IGeometrySource2D,
00074     ::ABI::Windows::Graphics::IGeometrySource2DInterop>
00075 {
00076     winrt::com_ptr<ID2D1Geometry> _geometry{ nullptr };
00077
00078 public:
00079     CanvasGeometry(winrt::com_ptr<ID2D1Geometry> geometry)
00080         : _geometry{ geometry }
00081     { }
00082
00083     // IGeometrySource2D.
00084     winrt::com_ptr<ID2D1Geometry> Geometry() { return _geometry; }
00085
00086     // IGeometrySource2DInterop.
00087     IFACEMETHODIMP GetGeometry(ID2D1Geometry** value) override
00088     {
00089         _geometry.copy_to(value);
00090         return S_OK;
00091     }
00092
00093     // IGeometrySource2DInterop.
00094     IFACEMETHODIMP TryGetGeometryUsingFactory(ID2D1Factory*, ID2D1Geometry**) override
00095     {
00096         return E_NOTIMPL;
00097     }
00098 };
00099 class AnimatedBackVisualSource_AnimatedVisual : public winrt::implements<AnimatedBackVisualSource_AnimatedVisual,
00100         winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual,
00101         IClosable>
00102 {
00103     winrt::com_ptr<ID2D1Factory> _d2dFactory{ nullptr };
00104     static constexpr int64_t c_durationTicks{ 13333333L };
00105     Compositor const _c{ nullptr };
00106     ExpressionAnimation const _reusableExpressionAnimation{ nullptr };
00107     CompositionPropertySet const _themeProperties{ nullptr };
00108     CompositionColorBrush _themeColor_Foreground{ nullptr };
00109     CompositionPathGeometry _pathGeometry_0{ nullptr };
00110     CompositionPathGeometry _pathGeometry_1{ nullptr };
00111     CompositionPathGeometry _pathGeometry_2{ nullptr };
00112     ContainerVisual _root{ nullptr };
00113     CubicBezierEasingFunction _cubicBezierEasingFunction_0{ nullptr };
00114     CubicBezierEasingFunction _cubicBezierEasingFunction_1{ nullptr };
00115     CubicBezierEasingFunction _cubicBezierEasingFunction_2{ nullptr };
00116     CubicBezierEasingFunction _cubicBezierEasingFunction_3{ nullptr };
00117     CubicBezierEasingFunction _cubicBezierEasingFunction_4{ nullptr };
00118     ExpressionAnimation _rootProgress{ nullptr };
00119     InsetClip _insetClip_0{ nullptr };
00120     StepEasingFunction _holdThenStepEasingFunction{ nullptr };
00121     StepEasingFunction _stepThenHoldEasingFunction{ nullptr };
00122
00123     static void StartProgressBoundAnimation(
00124         CompositionObject target,
00125         winrt::hstring animatedPropertyName,
00126         CompositionAnimation animation,
00127         ExpressionAnimation controllerProgressExpression)
00128     {
00129         target.StartAnimation(animatedPropertyName, animation);
00130         const auto controller = target.TryGetAnimationController(animatedPropertyName);
00131         controller.Pause();
00132         controller.StartAnimation(L"Progress", controllerProgressExpression);
00133     }
00134
00135     void BindProperty(
00136         CompositionObject target,
00137         winrt::hstring animatedPropertyName,
00138         winrt::hstring expression,
00139         winrt::hstring referenceParameterName,
00140         CompositionObject referencedObject)
00141     {
00142         _reusableExpressionAnimation.ClearAllParameters();
00143         _reusableExpressionAnimation.Expression(expression);
00144         _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
00145         target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
00146     }
00147
00148     BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation(float initialProgress, bool initialValue)
00149     {
00150         const auto result = _c.CreateBooleanKeyFrameAnimation();
00151         result.Duration(TimeSpan{ c_durationTicks });
00152         result.InsertKeyFrame(initialProgress, initialValue);
00153         return result;
00154     }
00155
00156     ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
00157     {
00158         const auto result = _c.CreateScalarKeyFrameAnimation();
00159         result.Duration(TimeSpan{ c_durationTicks });
00160         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00161         return result;
00162     }
00163
00164     Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction)
00165     {
00166         const auto result = _c.CreateVector2KeyFrameAnimation();
00167         result.Duration(TimeSpan{ c_durationTicks });
00168         result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
00169         return result;
00170     }
00171
00172     CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush)
00173     {
00174         const auto result = _c.CreateSpriteShape(geometry);
00175         result.TransformMatrix(transformMatrix);
00176         result.FillBrush(fillBrush);
00177         return result;
00178     }
00179
00180     // PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
00181     // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00182     // 03 - Back - 06 - PressedToPointerOver
00183     BooleanKeyFrameAnimation IsVisibleBooleanAnimation_0()
00184     {
00185         // Frame 10.
00186         const auto result = CreateBooleanKeyFrameAnimation(0.125F, true);
00187         return result;
00188     }
00189
00190     // PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 - Back
00191     // - 03 - PointerOverToNormal
00192     BooleanKeyFrameAnimation IsVisibleBooleanAnimation_1()
00193     {
00194         // Frame 30.
00195         const auto result = CreateBooleanKeyFrameAnimation(0.375F, false);
00196         return result;
00197     }
00198
00199     winrt::com_ptr<CanvasGeometry> Geometry_0()
00200     {
00201         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00202         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00203         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00204         winrt::check_hresult(path->Open(sink.put()));
00205         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00206         sink->BeginFigure({ 7.5F, 0.499000013F }, D2D1_FIGURE_BEGIN_FILLED);
00207         sink->AddBezier({ { 7.77600002F, 0.499000013F }, { 8.0F, 0.275000006F }, { 8.0F, -0.00100000005F } });
00208         sink->AddBezier({ { 8.0F, -0.27700001F }, { 7.77600002F, -0.500999987F }, { 7.5F, -0.500999987F } });
00209         sink->AddLine({ 7.5F, 0.499000013F });
00210         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00211         winrt::check_hresult(sink->Close());
00212         auto result = winrt::make_self<CanvasGeometry>(path);
00213         return result;
00214     }
00215
00216     winrt::com_ptr<CanvasGeometry> Geometry_1()
00217     {
00218         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00219         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00220         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00221         winrt::check_hresult(path->Open(sink.put()));
00222         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00223         sink->BeginFigure({ -5.33400011F, 0.495000005F }, D2D1_FIGURE_BEGIN_FILLED);
00224         sink->AddLine({ 7.5F, 0.499000013F });
00225         sink->AddLine({ 7.5F, -0.500999987F });
00226         sink->AddLine({ -5.33099985F, -0.504999995F });
00227         sink->AddLine({ -5.33400011F, 0.495000005F });
00228         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00229         winrt::check_hresult(sink->Close());
00230         auto result = winrt::make_self<CanvasGeometry>(path);
00231         return result;
00232     }
00233
00234     winrt::com_ptr<CanvasGeometry> Geometry_2()
00235     {
00236         winrt::com_ptr<ID2D1PathGeometry> path{ nullptr };
00237         winrt::check_hresult(_d2dFactory->CreatePathGeometry(path.put()));
00238         winrt::com_ptr<ID2D1GeometrySink> sink{ nullptr };
00239         winrt::check_hresult(path->Open(sink.put()));
00240         sink->SetFillMode(D2D1_FILL_MODE_WINDING);
00241         sink->BeginFigure({ -0.837000012F, 6.86800003F }, D2D1_FIGURE_BEGIN_FILLED);
00242         sink->AddBezier({ { -0.633000016F, 7.0539999F }, { -0.317000002F, 7.03999996F }, { -0.130999997F, 6.83599997F } });
00243         sink->AddBezier({ { 0.0549999997F, 6.63199997F }, { 0.0410000011F, 6.31500006F }, { -0.163000003F, 6.12900019F } });
00244         sink->AddLine({ -6.33099985F, 0.499000013F });
00245         sink->AddLine({ -5.32800007F, 0.488999993F });
00246         sink->AddLine({ -5.32800007F, -0.510999978F });
00247         sink->AddLine({ -6.32800007F, -0.500999987F });
00248         sink->AddLine({ -0.163000003F, -6.12900019F });
00249         sink->AddBezier({ { 0.0410000011F, -6.31500006F }, { 0.0549999997F, -6.63199997F }, { -0.130999997F, -6.83599997F } });
00250         sink->AddBezier({ { -0.317000002F, -7.03999996F }, { -0.633000016F, -7.0539999F }, { -0.837000012F, -6.86800003F } });
00251         sink->AddLine({ -7.75299978F, -0.55400002F });
00252         sink->AddBezier({ { -7.89300013F, -0.425999999F }, { -7.97300005F, -0.257999986F }, { -7.99300003F, -0.0850000009F } });
00253         sink->AddBezier({ { -7.99800014F, -0.0579999983F }, { -8.0F, -0.0299999993F }, { -8.0F, -0.00100000005F } });
00254         sink->AddBezier({ { -8.0F, 0.0260000005F }, { -7.99800014F, 0.0520000011F }, { -7.99399996F, 0.0780000016F } });
00255         sink->AddBezier({ { -7.97599983F, 0.254000008F }, { -7.89499998F, 0.423999995F }, { -7.75299978F, 0.55400002F } });
00256         sink->AddLine({ -0.837000012F, 6.86800003F });
00257         sink->EndFigure(D2D1_FIGURE_END_CLOSED);
00258         winrt::check_hresult(sink->Close());
00259         auto result = winrt::make_self<CanvasGeometry>(path);
00260         return result;
00261     }
00262
00263     // Color bound to theme property value: Foreground
00264     CompositionColorBrush ThemeColor_Foreground()
00265     {
00266         const auto result = _themeColor_Foreground = _c.CreateColorBrush();
00267         BindProperty(result, L"Color", L"ColorRGB(_theme.Foreground.W,_theme.Foreground.X,_theme.Foreground.Y,_theme.Foreground.Z)", L"_theme", _themeProperties);
00268         return result;
00269     }
00270
00271     // - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
00272     // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00273     // 03 - Back - 06 - PressedToPointerOver
00274     // Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
00275     // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00276     // 03 - Back - 06 - PressedToPointerOver
00277     // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00278     CompositionContainerShape ContainerShape()
00279     {
00280         const auto result = _c.CreateContainerShape();
00281         const auto shapes = result.Shapes();
00282         // Transforms: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2 Scale:2.25,2.25
00283         shapes.Append(SpriteShape_0());
00284         // Transforms: Stem 2 Stem 2 Stem 2 Stem 2
00285         shapes.Append(SpriteShape_1());
00286         StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_0(), _rootProgress);
00287         return result;
00288     }
00289
00290     CompositionPathGeometry PathGeometry_0()
00291     {
00292         return _pathGeometry_0 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_0())));
00293     }
00294
00295     CompositionPathGeometry PathGeometry_1()
00296     {
00297         return _pathGeometry_1 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_1())));
00298     }
00299
00300     CompositionPathGeometry PathGeometry_2()
00301     {
00302         return _pathGeometry_2 = _c.CreatePathGeometry(CompositionPath(CanvasGeometryToIGeometrySource2D(Geometry_2())));
00303     }
00304
00305     // - - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
00306     // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00307     // 03 - Back - 06 - PressedToPointerOver
00308     // - Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00309     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00310     // Controls - 03 - Back - 06 - PressedToPointerOver
00311     // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00312     // Path 1 Path 1 Path 1 Path 1
00313     CompositionSpriteShape SpriteShape_0()
00314     {
00315         // Scale:<2.25, 2.25>
00316         const auto geometry = PathGeometry_0();
00317         const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 0.0F, 0.0F }, ThemeColor_Foreground());
00318         return result;
00319     }
00320
00321     // - - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
00322     // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00323     // 03 - Back - 06 - PressedToPointerOver
00324     // - Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00325     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00326     // Controls - 03 - Back - 06 - PressedToPointerOver
00327     // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00328     // Path 1 Path 1 Path 1 Path 1
00329     CompositionSpriteShape SpriteShape_1()
00330     {
00331         const auto result = _c.CreateSpriteShape(PathGeometry_1());
00332         result.CenterPoint({ 7.5F, -0.00300000003F });
00333         result.Offset({ 9.375F, -0.00400000019F });
00334         result.FillBrush(_themeColor_Foreground);
00335         StartProgressBoundAnimation(result, L"Scale.X", ScaleXScalarAnimation_2p25_to_2p25(), RootProgress());
00336         StartProgressBoundAnimation(result, L"Scale.Y", ScaleYScalarAnimation_2p25_to_2p25(), _rootProgress);
00337         return result;
00338     }
00339
00340     // - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
00341     // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00342     // 03 - Back - 06 - PressedToPointerOver
00343     // Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
00344     // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00345     // 03 - Back - 06 - PressedToPointerOver
00346     // Path 1 Path 1 Path 1 Path 1
00347     CompositionSpriteShape SpriteShape_2()
00348     {
00349         const auto result = _c.CreateSpriteShape(PathGeometry_2());
00350         result.Scale({ 2.25F, 2.25F });
00351         result.FillBrush(_themeColor_Foreground);
00352         StartProgressBoundAnimation(result, L"Offset", OffsetVector2Animation_1(), _rootProgress);
00353         return result;
00354     }
00355
00356     // - PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
00357     // Back - 03 - PointerOverToNormal
00358     // Opacity for layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
00359     // Back - 03 - PointerOverToNormal
00360     // Path 1 Path 1
00361     CompositionSpriteShape SpriteShape_3()
00362     {
00363         // Offset:<24, 24>, Scale:<2.25, 2.25>
00364         const auto geometry = _pathGeometry_0;
00365         const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 24.0F, 24.0F }, _themeColor_Foreground);
00366         return result;
00367     }
00368
00369     // - PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
00370     // Back - 03 - PointerOverToNormal
00371     // Opacity for layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
00372     // Back - 03 - PointerOverToNormal
00373     // Path 1 Path 1
00374     CompositionSpriteShape SpriteShape_4()
00375     {
00376         // Offset:<24, 23.99975>, Scale:<2.25, 2.25>
00377         const auto geometry = _pathGeometry_1;
00378         const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 24.0F, 23.9997501F }, _themeColor_Foreground);
00379         return result;
00380     }
00381
00382     // - PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
00383     // Back - 03 - PointerOverToNormal
00384     // Opacity for layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
00385     // Back - 03 - PointerOverToNormal
00386     // Path 1 Path 1
00387     CompositionSpriteShape SpriteShape_5()
00388     {
00389         // Offset:<24, 24>, Scale:<2.25, 2.25>
00390         const auto geometry = _pathGeometry_2;
00391         const auto result = CreateSpriteShape(geometry, { 2.25F, 0.0F, 0.0F, 2.25F, 24.0F, 24.0F }, _themeColor_Foreground);
00392         return result;
00393     }
00394
00395     // PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
00396     // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00397     // 03 - Back - 06 - PressedToPointerOver
00398     ContainerVisual ContainerVisual_0()
00399     {
00400         const auto result = _c.CreateContainerVisual();
00401         result.Clip(InsetClip_0());
00402         result.IsVisible(false);
00403         result.Size({ 48.0F, 48.0F });
00404         // Scale:<1, 1>
00405         result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
00406         // Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
00407         // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00408         // 03 - Back - 06 - PressedToPointerOver
00409         result.Children().InsertAtTop(ShapeVisual_0());
00410         StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_0(), _rootProgress);
00411         StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_0(), _rootProgress);
00412         return result;
00413     }
00414
00415     // PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 - Back
00416     // - 03 - PointerOverToNormal
00417     ContainerVisual ContainerVisual_1()
00418     {
00419         const auto result = _c.CreateContainerVisual();
00420         result.Clip(_insetClip_0);
00421         result.Size({ 48.0F, 48.0F });
00422         // Scale:<1, 1>
00423         result.TransformMatrix({ 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F });
00424         // Opacity for layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 -
00425         // Back - 03 - PointerOverToNormal
00426         result.Children().InsertAtTop(ShapeVisual_1());
00427         StartProgressBoundAnimation(result, L"Opacity", OpacityScalarAnimation_1_to_1_1(), _rootProgress);
00428         StartProgressBoundAnimation(result, L"IsVisible", IsVisibleBooleanAnimation_1(), _rootProgress);
00429         return result;
00430     }
00431
00432     // The root of the composition.
00433     ContainerVisual Root()
00434     {
00435         const auto result = _root = _c.CreateContainerVisual();
00436         const auto propertySet = result.Properties();
00437         propertySet.InsertScalar(L"Progress", 0.0F);
00438         propertySet.InsertScalar(L"t0", 0.0F);
00439         const auto children = result.Children();
00440         // PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
00441         // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00442         // 03 - Back - 06 - PressedToPointerOver
00443         children.InsertAtTop(ContainerVisual_0());
00444         // PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 - Back
00445         // - 03 - PointerOverToNormal
00446         children.InsertAtTop(ContainerVisual_1());
00447         StartProgressBoundAnimation(propertySet, L"t0", t0ScalarAnimation_0_to_1(), _rootProgress);
00448         return result;
00449     }
00450
00451     CubicBezierEasingFunction CubicBezierEasingFunction_0()
00452     {
00453         return _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.166999996F }, { 0.0F, 1.0F });
00454     }
00455
00456     CubicBezierEasingFunction CubicBezierEasingFunction_1()
00457     {
00458         return _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction({ 0.550000012F, 0.0F }, { 0.75F, 1.0F });
00459     }
00460
00461     CubicBezierEasingFunction CubicBezierEasingFunction_2()
00462     {
00463         return _cubicBezierEasingFunction_2 = _c.CreateCubicBezierEasingFunction({ 0.349999994F, 0.0F }, { 0.0F, 1.0F });
00464     }
00465
00466     CubicBezierEasingFunction CubicBezierEasingFunction_3()
00467     {
00468         return _cubicBezierEasingFunction_3 = _c.CreateCubicBezierEasingFunction({ 0.166999996F, 0.0F }, { 0.0F, 1.0F });
00469     }
00470
00471     CubicBezierEasingFunction CubicBezierEasingFunction_4()
00472     {
00473         return _cubicBezierEasingFunction_4 = _c.CreateCubicBezierEasingFunction({ 0.850000024F, 0.0F }, { 0.75F, 1.0F });
00474     }
00475
00476     ExpressionAnimation RootProgress()
00477     {
00478         const auto result = _rootProgress = _c.CreateExpressionAnimation(L"_.Progress");
00479         result.SetReferenceParameter(L"_", _root);
00480         return result;
00481     }
00482
00483     InsetClip InsetClip_0()
00484     {
00485         const auto result = _insetClip_0 = _c.CreateInsetClip();
00486         return result;
00487     }
00488
00489     // PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
00490     // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00491     // 03 - Back - 06 - PressedToPointerOver
00492     // Layer opacity animation
00493     ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_0()
00494     {
00495         // Frame 0.
00496         const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _stepThenHoldEasingFunction);
00497         // Frame 10.
00498         result.InsertKeyFrame(0.125F, 1.0F, _holdThenStepEasingFunction);
00499         // Frame 20.
00500         result.InsertKeyFrame(0.25F, 0.0F, _holdThenStepEasingFunction);
00501         // Frame 30.
00502         result.InsertKeyFrame(0.375F, 1.0F, _holdThenStepEasingFunction);
00503         return result;
00504     }
00505
00506     // PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 - Back
00507     // - 03 - PointerOverToNormal
00508     // Layer opacity animation
00509     ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_1_1()
00510     {
00511         // Frame 0.
00512         const auto result = CreateScalarKeyFrameAnimation(0.0F, 1.0F, _holdThenStepEasingFunction);
00513         // Frame 10.
00514         result.InsertKeyFrame(0.125F, 0.0F, _holdThenStepEasingFunction);
00515         // Frame 20.
00516         result.InsertKeyFrame(0.25F, 1.0F, _holdThenStepEasingFunction);
00517         return result;
00518     }
00519
00520     // - - - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00521     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00522     // Controls - 03 - Back - 06 - PressedToPointerOver
00523     // - - Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00524     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00525     // Controls - 03 - Back - 06 - PressedToPointerOver
00526     // - Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00527     // Transforms: Stem 2 Stem 2 Stem 2 Stem 2
00528     // Scale
00529     ScalarKeyFrameAnimation ScaleXScalarAnimation_2p25_to_2p25()
00530     {
00531         // Frame 0.
00532         const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.25F, StepThenHoldEasingFunction());
00533         // Frame 10.
00534         result.InsertKeyFrame(0.125F, 2.25F, HoldThenStepEasingFunction());
00535         // Frame 19.
00536         result.InsertKeyFrame(0.237499997F, 1.62211001F, CubicBezierEasingFunction_0());
00537         // Frame 30.
00538         result.InsertKeyFrame(0.375F, 2.25F, _holdThenStepEasingFunction);
00539         // Frame 39.
00540         result.InsertKeyFrame(0.487500012F, 1.62211001F, _cubicBezierEasingFunction_0);
00541         // Frame 40.
00542         result.InsertKeyFrame(0.5F, 1.62211001F, _holdThenStepEasingFunction);
00543         // Frame 50.
00544         result.InsertKeyFrame(0.625F, 2.26947999F, CubicBezierEasingFunction_1());
00545         // Frame 59.
00546         result.InsertKeyFrame(0.737500012F, 2.25F, CubicBezierEasingFunction_2());
00547         // Frame 60.
00548         result.InsertKeyFrame(0.75F, 1.62211001F, _holdThenStepEasingFunction);
00549         // Frame 70.
00550         result.InsertKeyFrame(0.875F, 2.26947999F, _cubicBezierEasingFunction_1);
00551         // Frame 79.
00552         result.InsertKeyFrame(0.987500012F, 2.25F, _cubicBezierEasingFunction_2);
00553         return result;
00554     }
00555
00556     // - - - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00557     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00558     // Controls - 03 - Back - 06 - PressedToPointerOver
00559     // - - Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00560     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00561     // Controls - 03 - Back - 06 - PressedToPointerOver
00562     // - Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00563     // Transforms: Stem 2 Stem 2 Stem 2 Stem 2
00564     // Scale
00565     ScalarKeyFrameAnimation ScaleYScalarAnimation_2p25_to_2p25()
00566     {
00567         // Frame 0.
00568         const auto result = CreateScalarKeyFrameAnimation(0.0F, 2.25F, _stepThenHoldEasingFunction);
00569         // Frame 10.
00570         result.InsertKeyFrame(0.125F, 2.25F, _holdThenStepEasingFunction);
00571         // Frame 19.
00572         result.InsertKeyFrame(0.237499997F, 2.25F, CubicBezierEasingFunction_3());
00573         // Frame 30.
00574         result.InsertKeyFrame(0.375F, 2.25F, _holdThenStepEasingFunction);
00575         // Frame 39.
00576         result.InsertKeyFrame(0.487500012F, 2.25F, _cubicBezierEasingFunction_3);
00577         // Frame 40.
00578         result.InsertKeyFrame(0.5F, 2.25F, _holdThenStepEasingFunction);
00579         // Frame 50.
00580         result.InsertKeyFrame(0.625F, 2.25F, _cubicBezierEasingFunction_1);
00581         // Frame 59.
00582         result.InsertKeyFrame(0.737500012F, 2.25F, _cubicBezierEasingFunction_2);
00583         // Frame 60.
00584         result.InsertKeyFrame(0.75F, 2.25F, _holdThenStepEasingFunction);
00585         // Frame 70.
00586         result.InsertKeyFrame(0.875F, 2.25F, _cubicBezierEasingFunction_1);
00587         // Frame 79.
00588         result.InsertKeyFrame(0.987500012F, 2.25F, _cubicBezierEasingFunction_2);
00589         return result;
00590     }
00591
00592     ScalarKeyFrameAnimation t0ScalarAnimation_0_to_1()
00593     {
00594         // Frame 50.
00595         const auto result = CreateScalarKeyFrameAnimation(0.62500006F, 0.0F, _stepThenHoldEasingFunction);
00596         result.SetReferenceParameter(L"_", _root);
00597         // Frame 59.
00598         result.InsertKeyFrame(0.737499952F, 1.0F, _cubicBezierEasingFunction_2);
00599         // Frame 70.
00600         result.InsertKeyFrame(0.87500006F, 0.0F, _stepThenHoldEasingFunction);
00601         // Frame 79.
00602         result.InsertKeyFrame(0.987499952F, 1.0F, _cubicBezierEasingFunction_2);
00603         return result;
00604     }
00605
00606     // PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back -
00607     // 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00608     // 03 - Back - 06 - PressedToPointerOver
00609     // Layer aggregator
00610     ShapeVisual ShapeVisual_0()
00611     {
00612         const auto result = _c.CreateShapeVisual();
00613         result.Size({ 48.0F, 48.0F });
00614         const auto shapes = result.Shapes();
00615         // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00616         shapes.Append(ContainerShape());
00617         // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00618         shapes.Append(SpriteShape_2());
00619         return result;
00620     }
00621
00622     // PreComp layer: Controls - 03 - Back - 01 - NormalToPointerOver Controls - 03 - Back
00623     // - 03 - PointerOverToNormal
00624     // Layer aggregator
00625     ShapeVisual ShapeVisual_1()
00626     {
00627         const auto result = _c.CreateShapeVisual();
00628         result.Size({ 48.0F, 48.0F });
00629         const auto shapes = result.Shapes();
00630         // Layer: Round Cap 2 Round Cap 2
00631         shapes.Append(SpriteShape_3());
00632         // Layer: Round Cap 2 Round Cap 2
00633         shapes.Append(SpriteShape_4());
00634         // Layer: Round Cap 2 Round Cap 2
00635         shapes.Append(SpriteShape_5());
00636         return result;
00637     }
00638
00639     StepEasingFunction HoldThenStepEasingFunction()
00640     {
00641         const auto result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
00642         result.IsFinalStepSingleFrame(true);
00643         return result;
00644     }
00645
00646     StepEasingFunction StepThenHoldEasingFunction()
00647     {
00648         const auto result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
00649         result.IsInitialStepSingleFrame(true);
00650         return result;
00651     }
00652
00653     // - - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
00654     // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00655     // 03 - Back - 06 - PressedToPointerOver
00656     // - Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00657     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00658     // Controls - 03 - Back - 06 - PressedToPointerOver
00659     // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00660     // Offset
00661     Vector2KeyFrameAnimation OffsetVector2Animation_0()
00662     {
00663         // Frame 0.
00664         const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
00665         result.SetReferenceParameter(L"_", _root);
00666         // Frame 10.
00667         result.InsertKeyFrame(0.125F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00668         // Frame 19.
00669         result.InsertKeyFrame(0.237499997F, { 24.9379997F, 24.0F }, _cubicBezierEasingFunction_0);
00670         // Frame 30.
00671         result.InsertKeyFrame(0.375F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00672         // Frame 39.
00673         result.InsertKeyFrame(0.487500012F, { 24.9379997F, 24.0F }, _cubicBezierEasingFunction_0);
00674         // Frame 40.
00675         result.InsertKeyFrame(0.5F, { 24.9379997F, 24.0F }, _holdThenStepEasingFunction);
00676         // Frame 50.
00677         result.InsertKeyFrame(0.625F, { 20.25F, 24.0F }, _cubicBezierEasingFunction_1);
00678         // Frame 59.
00679         result.InsertExpressionKeyFrame(0.737499952F, L"Pow(1-_.t0,3)*Vector2(20.25,24)+(3*Square(1-_.t0)*_.t0*Vector2(20.094,24))+(3*(1-_.t0)*Square(_.t0)*Vector2(23.375,24))+(Pow(_.t0,3)*Vector2(24,24))", _stepThenHoldEasingFunction);
00680         // Frame 59.
00681         result.InsertKeyFrame(0.737500012F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
00682         // Frame 60.
00683         result.InsertKeyFrame(0.75F, { 24.9379997F, 24.0F }, _holdThenStepEasingFunction);
00684         // Frame 70.
00685         result.InsertKeyFrame(0.875F, { 20.25F, 24.0F }, _cubicBezierEasingFunction_1);
00686         // Frame 79.
00687         result.InsertExpressionKeyFrame(0.987499952F, L"Pow(1-_.t0,3)*Vector2(20.25,24)+(3*Square(1-_.t0)*_.t0*Vector2(20.094,24))+(3*(1-_.t0)*Square(_.t0)*Vector2(23.375,24))+(Pow(_.t0,3)*Vector2(24,24))", _stepThenHoldEasingFunction);
00688         // Frame 79.
00689         result.InsertKeyFrame(0.987500012F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
00690         return result;
00691     }
00692
00693     // - - PreComp layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 - Back
00694     // - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal Controls -
00695     // 03 - Back - 06 - PressedToPointerOver
00696     // - Opacity for layer: Controls - 03 - Back - 02 - NormalToPressed Controls - 03 -
00697     // Back - 04 - PointerOverToPressed  Controls - 03 - Back - 05 - PressedToNormal
00698     // Controls - 03 - Back - 06 - PressedToPointerOver
00699     // Layer: Round Cap 2 Round Cap 2 Round Cap 2 Round Cap 2
00700     // Offset
00701     Vector2KeyFrameAnimation OffsetVector2Animation_1()
00702     {
00703         // Frame 0.
00704         const auto result = CreateVector2KeyFrameAnimation(0.0F, { 24.0F, 24.0F }, _stepThenHoldEasingFunction);
00705         // Frame 10.
00706         result.InsertKeyFrame(0.125F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00707         // Frame 19.
00708         result.InsertKeyFrame(0.237499997F, { 33.0F, 24.0F }, _cubicBezierEasingFunction_0);
00709         // Frame 30.
00710         result.InsertKeyFrame(0.375F, { 24.0F, 24.0F }, _holdThenStepEasingFunction);
00711         // Frame 39.
00712         result.InsertKeyFrame(0.487500012F, { 33.0F, 24.0F }, _cubicBezierEasingFunction_0);
00713         // Frame 40.
00714         result.InsertKeyFrame(0.5F, { 33.0F, 24.0F }, _holdThenStepEasingFunction);
00715         // Frame 50.
00716         result.InsertKeyFrame(0.625F, { 19.9839993F, 24.0F }, CubicBezierEasingFunction_4());
00717         // Frame 59.
00718         result.InsertKeyFrame(0.737500012F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
00719         // Frame 60.
00720         result.InsertKeyFrame(0.75F, { 33.0F, 24.0F }, _holdThenStepEasingFunction);
00721         // Frame 70.
00722         result.InsertKeyFrame(0.875F, { 19.9839993F, 24.0F }, _cubicBezierEasingFunction_4);
00723         // Frame 79.
00724         result.InsertKeyFrame(0.987500012F, { 24.0F, 24.0F }, _cubicBezierEasingFunction_2);
00725         return result;
00726     }
00727
00728     static IGeometrySource2D CanvasGeometryToIGeometrySource2D(winrt::com_ptr<CanvasGeometry> geo)
00729     {
00730         return geo.as<IGeometrySource2D>();
00731     }
00732
00733 public:
00734     AnimatedBackVisualSource_AnimatedVisual(
00735         Compositor compositor,
00736         CompositionPropertySet themeProperties)
00737         : _c{compositor}
00738         , _themeProperties{themeProperties}
00739         , _reusableExpressionAnimation(compositor.CreateExpressionAnimation())
00740     {
00741         winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, _d2dFactory.put()));
00742         const auto _ = Root();
00743     }
00744
00745     void Close()
00746     {
00747         if (_root)
00748         {
00749             _root.Close();
00750         }
00751     }
00752
00753     TimeSpan Duration() const
00754     {
00755         return TimeSpan{ c_durationTicks };
00756     }
00757
00758     Visual RootVisual() const
00759     {
00760         return _root;
00761     }
00762
00763     winrt::float2 Size() const
00764     {
00765         return { 48.0F, 48.0F };
00766     }
00767
00768     static bool IsRuntimeCompatible()
00769     {
00770         return winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 7);
00771     }
00772 };
00773
00774 winrt::float4 AnimatedBackVisualSource::ColorAsVector4(Color color)
00775 {
00776     return { static_cast<float>(color.R), static_cast<float>(color.G), static_cast<float>(color.B), static_cast<float>(color.A) };
00777 }
00778
00779 CompositionPropertySet AnimatedBackVisualSource::EnsureThemeProperties(Compositor compositor)
00780 {
00781     if (_themeProperties == nullptr)
00782     {
00783         _themeProperties = compositor.CreatePropertySet();
00784         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00785     }
00786
00787     return _themeProperties;
00788 }
00789
00790 Color AnimatedBackVisualSource::Foreground()
00791 {
00792     return _themeForeground;
00793 }
00794
00795 void AnimatedBackVisualSource::Foreground(Color value)
00796 {
00797     _themeForeground = value;
00798     if (_themeProperties != nullptr)
00799     {
00800         _themeProperties.InsertVector4(L"Foreground", ColorAsVector4((Color)_themeForeground));
00801     }
00802 }
00803
00804 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedBackVisualSource::TryCreateAnimatedVisual(
00805     Compositor const& compositor)
00806 {
00807     IInspectable diagnostics = nullptr;
00808     return TryCreateAnimatedVisual(compositor, diagnostics);
00809 }
00810
00811 winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual AnimatedBackVisualSource::TryCreateAnimatedVisual(
00812     Compositor const& compositor,
00813     IInspectable& diagnostics)
00814 {
00815     const auto _ = EnsureThemeProperties(compositor);
00816     diagnostics = nullptr;
00817
00818     if (AnimatedBackVisualSource_AnimatedVisual::IsRuntimeCompatible())
00819     {
00820         return winrt::make<AnimatedBackVisualSource_AnimatedVisual>(
00821             compositor,
00822             _themeProperties);
00823     }
00824
00825     return nullptr;
00826 }
00827
00828 double AnimatedBackVisualSource::FrameCount()
00829 {
00830     return 80.0;
00831 }
00832
00833 double AnimatedBackVisualSource::Framerate()
00834 {
00835     return 60.0;
00836 }
00837
00838 TimeSpan AnimatedBackVisualSource::Duration()
00839 {
00840     return TimeSpan{ 13333333L };
00841 }
00842
00843 double AnimatedBackVisualSource::FrameToProgress(double frameNumber)
00844 {
00845     return frameNumber / 80.0;
00846 }
00847
00848 winrt::Windows::Foundation::Collections::IMapView<hstring, double> AnimatedBackVisualSource::Markers()
00849 {
00850     return winrt::single_threaded_map<winrt::hstring, double>(
00851         std::map<winrt::hstring, double>
00852         {
00853             { L"NormalToPointerOver_Start", 0.0 },
00854             { L"NormalToPointerOver_End", 0.113125 },
00855             { L"NormalToPressed_Start", 0.125625 },
00856             { L"NormalToPressed_End", 0.238125 },
00857             { L"PointerOverToNormal_Start", 0.250625 },
00858             { L"PointerOverToNormal_End", 0.363125 },
00859             { L"PointerOverToPressed_Start", 0.375625 },
00860             { L"PointerOverToPressed_End", 0.488125 },
00861             { L"PressedToNormal_Start", 0.500625 },
00862             { L"PressedToNormal_End", 0.738125 },
00863             { L"PressedToPointerOver_Start", 0.750625 },
00864             { L"PressedToPointerOver_End", 0.988125 },
00865         }
00866     ).GetView();
00867 }
00868
00869 void AnimatedBackVisualSource::SetColorProperty(hstring const& propertyName, Color value)
00870 {
00871     if (propertyName == L"Foreground")
00872     {
00873         _themeForeground = value;
00874     }
00875     else
00876     {
00877         return;
00878     }
00879
00880     if (_themeProperties != nullptr)
00881     {
00882         _themeProperties.InsertVector4(propertyName, ColorAsVector4(value));
00883     }
00884 }
00885
00886 void AnimatedBackVisualSource::SetScalarProperty(hstring const&, double)
00887 {
00888 }
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InfoBar/InfoBarClosedEventArgs.h Source File

  • File List
  • File Members
  • InfoBar

InfoBarClosedEventArgs.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002
00003 #include "InfoBarClosedEventArgs.g.h"
00004
00005 class InfoBarClosedEventArgs :
00006     public winrt::implementation::InfoBarClosedEventArgsT<InfoBarClosedEventArgs>
00007 {
00008 public:
00009     winrt::InfoBarCloseReason Reason();
00010     void Reason(const winrt::InfoBarCloseReason& reason);
00011
00012 private:
00013     winrt::InfoBarCloseReason m_reason{ winrt::InfoBarCloseReason::CloseButton };
00014 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/TestUI/SelectorBarSamplePage.xaml.cs Source File

  • File List
  • File Members
  • SelectorBar
  • TestUI

SelectorBarSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005 using MUXControlsTestApp.Samples.Model;
00006 using System;
00007 using System.Collections.ObjectModel;
00008
00009 namespace MUXControlsTestApp
00010 {
00011     public sealed partial class SelectorBarSamplePage : TestPage
00012     {
00013         private ObservableCollection<Recipe> _colRemotePhotos = null;
00014         private ObservableCollection<Recipe> _colSharedPhotos = null;
00015         private ObservableCollection<Recipe> _colFavoritePhotos = null;
00016
00017         public SelectorBarSamplePage()
00018         {
00019             this.InitializeComponent();
00020
00021             _colRemotePhotos = new ObservableCollection<Recipe>();
00022             _colSharedPhotos = new ObservableCollection<Recipe>();
00023             _colFavoritePhotos = new ObservableCollection<Recipe>();
00024
00025             int imageCount = 20;
00026
00027             for (int itemIndex = 0; itemIndex < imageCount; itemIndex++)
00028             {
00029                 _colRemotePhotos.Add(new Recipe()
00030                 {
00031                     ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 1))
00032                 });
00033                 _colSharedPhotos.Add(new Recipe()
00034                 {
00035                     ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + imageCount + 1))
00036                 });
00037                 _colFavoritePhotos.Add(new Recipe()
00038                 {
00039                     ImageUri = new Uri(string.Format("ms-appx:///Images/vette{0}.jpg", itemIndex % 126 + 2 * imageCount + 1))
00040                 });
00041             }
00042         }
00043
00044         ~SelectorBarSamplePage()
00045         {
00046         }
00047
00048         private void SelectorBar_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args)
00049         {
00050             if (sender.SelectedItem == selectorBarItemRemote)
00051             {
00052                 photos.ItemsSource = _colRemotePhotos;
00053             }
00054             else if (sender.SelectedItem == selectorBarItemShared)
00055             {
00056                 photos.ItemsSource = _colSharedPhotos;
00057             }
00058             else
00059             {
00060                 photos.ItemsSource = _colFavoritePhotos;
00061             }
00062
00063             if (tblSelectedSelectorBarItem != null)
00064             {
00065                 tblSelectedSelectorBarItem.Text = sender.SelectedItem == null ? "null" : sender.SelectedItem.Name;
00066             }
00067         }
00068     }
00069 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TreeViewItemTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

TreeViewItemTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TreeViewItemTemplateSettingsProperties
00008 {
00009 public:
00010     TreeViewItemTemplateSettingsProperties();
00011
00012     void CollapsedGlyphVisibility(winrt::Visibility const& value);
00013     winrt::Visibility CollapsedGlyphVisibility();
00014
00015     void DragItemsCount(int value);
00016     int DragItemsCount();
00017
00018     void ExpandedGlyphVisibility(winrt::Visibility const& value);
00019     winrt::Visibility ExpandedGlyphVisibility();
00020
00021     void Indentation(winrt::Thickness const& value);
00022     winrt::Thickness Indentation();
00023
00024     static winrt::DependencyProperty CollapsedGlyphVisibilityProperty() { return s_CollapsedGlyphVisibilityProperty; }
00025     static winrt::DependencyProperty DragItemsCountProperty() { return s_DragItemsCountProperty; }
00026     static winrt::DependencyProperty ExpandedGlyphVisibilityProperty() { return s_ExpandedGlyphVisibilityProperty; }
00027     static winrt::DependencyProperty IndentationProperty() { return s_IndentationProperty; }
00028
00029     static GlobalDependencyProperty s_CollapsedGlyphVisibilityProperty;
00030     static GlobalDependencyProperty s_DragItemsCountProperty;
00031     static GlobalDependencyProperty s_ExpandedGlyphVisibilityProperty;
00032     static GlobalDependencyProperty s_IndentationProperty;
00033
00034     static void EnsureProperties();
00035     static void ClearProperties();
00036 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InspectingDataSourceTests::CustomEnumerable Member List

This is the complete list of members for InspectingDataSourceTests::CustomEnumerable, including all inherited members.
CustomEnumerable() | InspectingDataSourceTests::CustomEnumerable | [inline]
GetEnumerator() | InspectingDataSourceTests::CustomEnumerable | [inline]
GetEnumerator() | InspectingDataSourceTests::CustomEnumerable | [inline, private]
myList | InspectingDataSourceTests::CustomEnumerable | [private]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemBaseRevokers.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemBaseRevokers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class NavigationViewItemBaseRevokers : public winrt::implements<NavigationViewItemBaseRevokers, winrt::IInspectable>
00007 {
00008 public:
00009     winrt::UIElement::KeyDown_revoker keyDownRevoker{};
00010     winrt::UIElement::GotFocus_revoker gotFocusRevoker{};
00011     PropertyChanged_revoker isSelectedRevoker{};
00012     PropertyChanged_revoker isExpandedRevoker{};
00013     PropertyChanged_revoker visibilityRevoker{};
00014
00015     void RevokeAll() {
00016         if (keyDownRevoker) keyDownRevoker.revoke();
00017         if (gotFocusRevoker) gotFocusRevoker.revoke();
00018         if (visibilityRevoker) visibilityRevoker.revoke();
00019         if (isSelectedRevoker) isSelectedRevoker.revoke();
00020         if (isExpandedRevoker) isExpandedRevoker.revoke();
00021     }
00022 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterTestHooks.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterTestHooks.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollPresenterTestHooksFactory.h"
00007 #include "Vector.h"
00008
00009 com_ptr<ScrollPresenterTestHooks> ScrollPresenterTestHooks::s_testHooks{};
00010
00011 ScrollPresenterTestHooks::ScrollPresenterTestHooks()
00012 {
00013 }
00014
00015 com_ptr<ScrollPresenterTestHooks> ScrollPresenterTestHooks::EnsureGlobalTestHooks()
00016 {
00017     static bool s_initialized = []() {
00018         s_testHooks = winrt::make_self<ScrollPresenterTestHooks>();
00019         return true;
00020     }();
00021     return s_testHooks;
00022 }
00023
00024 bool ScrollPresenterTestHooks::AreAnchorNotificationsRaised()
00025 {
00026     auto hooks = EnsureGlobalTestHooks();
00027     return hooks->m_areAnchorNotificationsRaised;
00028 }
00029
00030 void ScrollPresenterTestHooks::AreAnchorNotificationsRaised(bool areAnchorNotificationsRaised)
00031 {
00032     auto hooks = EnsureGlobalTestHooks();
00033     hooks->m_areAnchorNotificationsRaised = areAnchorNotificationsRaised;
00034 }
00035
00036 bool ScrollPresenterTestHooks::AreInteractionSourcesNotificationsRaised()
00037 {
00038     auto hooks = EnsureGlobalTestHooks();
00039     return hooks->m_areInteractionSourcesNotificationsRaised;
00040 }
00041
00042 void ScrollPresenterTestHooks::AreInteractionSourcesNotificationsRaised(bool areInteractionSourcesNotificationsRaised)
00043 {
00044     auto hooks = EnsureGlobalTestHooks();
00045     hooks->m_areInteractionSourcesNotificationsRaised = areInteractionSourcesNotificationsRaised;
00046 }
00047
00048 bool ScrollPresenterTestHooks::AreExpressionAnimationStatusNotificationsRaised()
00049 {
00050     auto hooks = EnsureGlobalTestHooks();
00051     return hooks->m_areExpressionAnimationStatusNotificationsRaised;
00052 }
00053
00054 void ScrollPresenterTestHooks::AreExpressionAnimationStatusNotificationsRaised(bool areExpressionAnimationStatusNotificationsRaised)
00055 {
00056     auto hooks = EnsureGlobalTestHooks();
00057     hooks->m_areExpressionAnimationStatusNotificationsRaised = areExpressionAnimationStatusNotificationsRaised;
00058 }
00059
00060 winrt::IReference<bool> ScrollPresenterTestHooks::IsAnimationsEnabledOverride()
00061 {
00062     auto hooks = EnsureGlobalTestHooks();
00063     return hooks->m_isAnimationsEnabledOverride;
00064 }
00065
00066 void ScrollPresenterTestHooks::IsAnimationsEnabledOverride(winrt::IReference<bool> isAnimationsEnabledOverride)
00067 {
00068     auto hooks = EnsureGlobalTestHooks();
00069     hooks->m_isAnimationsEnabledOverride = isAnimationsEnabledOverride;
00070 }
00071
00072 void ScrollPresenterTestHooks::GetOffsetsChangeVelocityParameters(int& millisecondsPerUnit, int& minMilliseconds, int& maxMilliseconds)
00073 {
00074     auto hooks = EnsureGlobalTestHooks();
00075     millisecondsPerUnit = hooks->m_offsetsChangeMsPerUnit;
00076     minMilliseconds = hooks->m_offsetsChangeMinMs;
00077     maxMilliseconds = hooks->m_offsetsChangeMaxMs;
00078 }
00079
00080 void ScrollPresenterTestHooks::SetOffsetsChangeVelocityParameters(int millisecondsPerUnit, int minMilliseconds, int maxMilliseconds)
00081 {
00082     auto hooks = EnsureGlobalTestHooks();
00083     hooks->m_offsetsChangeMsPerUnit = millisecondsPerUnit;
00084     hooks->m_offsetsChangeMinMs = minMilliseconds;
00085     hooks->m_offsetsChangeMaxMs = maxMilliseconds;
00086 }
00087
00088 void ScrollPresenterTestHooks::GetZoomFactorChangeVelocityParameters(int& millisecondsPerUnit, int& minMilliseconds, int& maxMilliseconds)
00089 {
00090     auto hooks = EnsureGlobalTestHooks();
00091     millisecondsPerUnit = hooks->m_zoomFactorChangeMsPerUnit;
00092     minMilliseconds = hooks->m_zoomFactorChangeMinMs;
00093     maxMilliseconds = hooks->m_zoomFactorChangeMaxMs;
00094 }
00095
00096 void ScrollPresenterTestHooks::SetZoomFactorChangeVelocityParameters(int millisecondsPerUnit, int minMilliseconds, int maxMilliseconds)
00097 {
00098     auto hooks = EnsureGlobalTestHooks();
00099     hooks->m_zoomFactorChangeMsPerUnit = millisecondsPerUnit;
00100     hooks->m_zoomFactorChangeMinMs = minMilliseconds;
00101     hooks->m_zoomFactorChangeMaxMs = maxMilliseconds;
00102 }
00103
00104 void ScrollPresenterTestHooks::GetContentLayoutOffsetX(const winrt::ScrollPresenter& scrollPresenter, float& contentLayoutOffsetX)
00105 {
00106     if (scrollPresenter)
00107     {
00108         contentLayoutOffsetX = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetContentLayoutOffsetXDbg();
00109     }
00110     else
00111     {
00112         contentLayoutOffsetX = 0.0f;
00113     }
00114 }
00115
00116 void ScrollPresenterTestHooks::SetContentLayoutOffsetX(const winrt::ScrollPresenter& scrollPresenter, float contentLayoutOffsetX)
00117 {
00118     if (scrollPresenter)
00119     {
00120         winrt::get_self<ScrollPresenter>(scrollPresenter)->SetContentLayoutOffsetXDbg(contentLayoutOffsetX);
00121     }
00122 }
00123
00124 void ScrollPresenterTestHooks::GetContentLayoutOffsetY(const winrt::ScrollPresenter& scrollPresenter, float& contentLayoutOffsetY)
00125 {
00126     if (scrollPresenter)
00127     {
00128         contentLayoutOffsetY = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetContentLayoutOffsetYDbg();
00129     }
00130     else
00131     {
00132         contentLayoutOffsetY = 0.0f;
00133     }
00134 }
00135
00136 void ScrollPresenterTestHooks::SetContentLayoutOffsetY(const winrt::ScrollPresenter& scrollPresenter, float contentLayoutOffsetY)
00137 {
00138     if (scrollPresenter)
00139     {
00140         winrt::get_self<ScrollPresenter>(scrollPresenter)->SetContentLayoutOffsetYDbg(contentLayoutOffsetY);
00141     }
00142 }
00143
00144 winrt::hstring ScrollPresenterTestHooks::GetTransformExpressionAnimationExpression(const winrt::ScrollPresenter& scrollPresenter)
00145 {
00146     if (scrollPresenter)
00147     {
00148        return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetTransformExpressionAnimationExpressionDbg();
00149     }
00150
00151     return L"";
00152 }
00153
00154 void ScrollPresenterTestHooks::SetTransformExpressionAnimationExpression(const winrt::ScrollPresenter& scrollPresenter, winrt::hstring const& transformExpressionAnimationExpression)
00155 {
00156     if (scrollPresenter)
00157     {
00158         winrt::get_self<ScrollPresenter>(scrollPresenter)->SetTransformExpressionAnimationExpressionDbg(transformExpressionAnimationExpression);
00159     }
00160 }
00161
00162 winrt::hstring ScrollPresenterTestHooks::GetMinPositionExpressionAnimationExpression(const winrt::ScrollPresenter& scrollPresenter)
00163 {
00164     if (scrollPresenter)
00165     {
00166         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetMinPositionExpressionAnimationExpressionDbg();
00167     }
00168
00169     return L"";
00170 }
00171
00172 void ScrollPresenterTestHooks::SetMinPositionExpressionAnimationExpression(const winrt::ScrollPresenter& scrollPresenter, winrt::hstring const& minPositionExpressionAnimationExpression)
00173 {
00174     if (scrollPresenter)
00175     {
00176         winrt::get_self<ScrollPresenter>(scrollPresenter)->SetMinPositionExpressionAnimationExpressionDbg(minPositionExpressionAnimationExpression);
00177     }
00178 }
00179
00180 winrt::hstring ScrollPresenterTestHooks::GetMaxPositionExpressionAnimationExpression(const winrt::ScrollPresenter& scrollPresenter)
00181 {
00182     if (scrollPresenter)
00183     {
00184         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetMaxPositionExpressionAnimationExpressionDbg();
00185     }
00186
00187     return L"";
00188 }
00189
00190 void ScrollPresenterTestHooks::SetMaxPositionExpressionAnimationExpression(const winrt::ScrollPresenter& scrollPresenter, winrt::hstring const& maxPositionExpressionAnimationExpression)
00191 {
00192     if (scrollPresenter)
00193     {
00194         winrt::get_self<ScrollPresenter>(scrollPresenter)->SetMaxPositionExpressionAnimationExpressionDbg(maxPositionExpressionAnimationExpression);
00195     }
00196 }
00197
00198 winrt::float2 ScrollPresenterTestHooks::GetArrangeRenderSizesDelta(const winrt::ScrollPresenter& scrollPresenter)
00199 {
00200     if (scrollPresenter)
00201     {
00202         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetArrangeRenderSizesDeltaDbg();
00203     }
00204     return winrt::float2{ 0.0f, 0.0f };
00205 }
00206
00207 winrt::float2 ScrollPresenterTestHooks::GetPosition(const winrt::ScrollPresenter& scrollPresenter)
00208 {
00209     if (scrollPresenter)
00210     {
00211         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetPositionDbg();
00212     }
00213     return winrt::float2{ 0.0f, 0.0f };
00214 }
00215
00216 winrt::float2 ScrollPresenterTestHooks::GetMinPosition(const winrt::ScrollPresenter& scrollPresenter)
00217 {
00218     if (scrollPresenter)
00219     {
00220         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetMinPositionDbg();
00221     }
00222     return winrt::float2{ 0.0f, 0.0f };
00223 }
00224
00225 void ScrollPresenterTestHooks::SetMinPosition(const winrt::ScrollPresenter& scrollPresenter, winrt::float2 minPosition)
00226 {
00227     if (scrollPresenter)
00228     {
00229         return winrt::get_self<ScrollPresenter>(scrollPresenter)->SetMinPositionDbg(minPosition);
00230     }
00231 }
00232
00233 winrt::float2 ScrollPresenterTestHooks::GetMaxPosition(const winrt::ScrollPresenter& scrollPresenter)
00234 {
00235     if (scrollPresenter)
00236     {
00237         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetMaxPositionDbg();
00238     }
00239     return winrt::float2{ 0.0f, 0.0f };
00240 }
00241
00242 void ScrollPresenterTestHooks::SetMaxPosition(const winrt::ScrollPresenter& scrollPresenter, winrt::float2 maxPosition)
00243 {
00244     if (scrollPresenter)
00245     {
00246         return winrt::get_self<ScrollPresenter>(scrollPresenter)->SetMaxPositionDbg(maxPosition);
00247     }
00248 }
00249
00250 winrt::ScrollPresenterViewChangeResult ScrollPresenterTestHooks::GetScrollCompletedResult(const winrt::ScrollingScrollCompletedEventArgs& scrollCompletedEventArgs)
00251 {
00252     if (scrollCompletedEventArgs)
00253     {
00254         const ScrollPresenterViewChangeResult result = winrt::get_self<ScrollingScrollCompletedEventArgs>(scrollCompletedEventArgs)->Result();
00255         return TestHooksViewChangeResult(result);
00256     }
00257     return winrt::ScrollPresenterViewChangeResult::Completed;
00258 }
00259
00260 winrt::ScrollPresenterViewChangeResult ScrollPresenterTestHooks::GetZoomCompletedResult(const winrt::ScrollingZoomCompletedEventArgs& zoomCompletedEventArgs)
00261 {
00262     if (zoomCompletedEventArgs)
00263     {
00264         const ScrollPresenterViewChangeResult result = winrt::get_self<ScrollingZoomCompletedEventArgs>(zoomCompletedEventArgs)->Result();
00265         return TestHooksViewChangeResult(result);
00266     }
00267     return winrt::ScrollPresenterViewChangeResult::Completed;
00268 }
00269
00270 void ScrollPresenterTestHooks::NotifyAnchorEvaluated(
00271     const winrt::ScrollPresenter& sender,
00272     const winrt::UIElement& anchorElement,
00273     double viewportAnchorPointHorizontalOffset,
00274     double viewportAnchorPointVerticalOffset)
00275 {
00276     auto hooks = EnsureGlobalTestHooks();
00277     if (hooks->m_anchorEvaluatedEventSource)
00278     {
00279         auto anchorEvaluatedEventArgs = winrt::make<ScrollPresenterTestHooksAnchorEvaluatedEventArgs>(
00280             anchorElement, viewportAnchorPointHorizontalOffset, viewportAnchorPointVerticalOffset);
00281
00282         hooks->m_anchorEvaluatedEventSource(sender, anchorEvaluatedEventArgs);
00283     }
00284 }
00285
00286 winrt::event_token ScrollPresenterTestHooks::AnchorEvaluated(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksAnchorEvaluatedEventArgs> const& value)
00287 {
00288     auto hooks = EnsureGlobalTestHooks();
00289     return hooks->m_anchorEvaluatedEventSource.add(value);
00290 }
00291
00292 void ScrollPresenterTestHooks::AnchorEvaluated(winrt::event_token const& token)
00293 {
00294     auto hooks = EnsureGlobalTestHooks();
00295     hooks->m_anchorEvaluatedEventSource.remove(token);
00296 }
00297
00298 void ScrollPresenterTestHooks::NotifyInteractionSourcesChanged(
00299     const winrt::ScrollPresenter& sender,
00300     const winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection& interactionSources)
00301 {
00302     auto hooks = EnsureGlobalTestHooks();
00303     if (hooks->m_interactionSourcesChangedEventSource)
00304     {
00305         auto interactionSourcesChangedEventArgs = winrt::make<ScrollPresenterTestHooksInteractionSourcesChangedEventArgs>(
00306             interactionSources);
00307
00308         hooks->m_interactionSourcesChangedEventSource(sender, interactionSourcesChangedEventArgs);
00309     }
00310 }
00311
00312 winrt::event_token ScrollPresenterTestHooks::InteractionSourcesChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs> const& value)
00313 {
00314     auto hooks = EnsureGlobalTestHooks();
00315     return hooks->m_interactionSourcesChangedEventSource.add(value);
00316 }
00317
00318 void ScrollPresenterTestHooks::InteractionSourcesChanged(winrt::event_token const& token)
00319 {
00320     auto hooks = EnsureGlobalTestHooks();
00321     hooks->m_interactionSourcesChangedEventSource.remove(token);
00322 }
00323
00324 void ScrollPresenterTestHooks::NotifyExpressionAnimationStatusChanged(
00325     const winrt::ScrollPresenter& sender,
00326     bool isExpressionAnimationStarted,
00327     wstring_view const& propertyName)
00328 {
00329     auto hooks = EnsureGlobalTestHooks();
00330     if (hooks->m_expressionAnimationStatusChangedEventSource)
00331     {
00332         auto expressionAnimationStatusChangedEventArgs = winrt::make<ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs>(
00333             isExpressionAnimationStarted, propertyName);
00334
00335         hooks->m_expressionAnimationStatusChangedEventSource(sender, expressionAnimationStatusChangedEventArgs);
00336     }
00337 }
00338
00339 winrt::event_token ScrollPresenterTestHooks::ExpressionAnimationStatusChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs> const& value)
00340 {
00341     auto hooks = EnsureGlobalTestHooks();
00342     return hooks->m_expressionAnimationStatusChangedEventSource.add(value);
00343 }
00344
00345 void ScrollPresenterTestHooks::ExpressionAnimationStatusChanged(winrt::event_token const& token)
00346 {
00347     auto hooks = EnsureGlobalTestHooks();
00348     hooks->m_expressionAnimationStatusChangedEventSource.remove(token);
00349 }
00350
00351 void ScrollPresenterTestHooks::NotifyContentLayoutOffsetXChanged(const winrt::ScrollPresenter& sender)
00352 {
00353     auto hooks = EnsureGlobalTestHooks();
00354     if (hooks->m_contentLayoutOffsetXChangedEventSource)
00355     {
00356         hooks->m_contentLayoutOffsetXChangedEventSource(sender, nullptr);
00357     }
00358 }
00359
00360 winrt::event_token ScrollPresenterTestHooks::ContentLayoutOffsetXChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value)
00361 {
00362     auto hooks = EnsureGlobalTestHooks();
00363     return hooks->m_contentLayoutOffsetXChangedEventSource.add(value);
00364 }
00365
00366 void ScrollPresenterTestHooks::ContentLayoutOffsetXChanged(winrt::event_token const& token)
00367 {
00368     auto hooks = EnsureGlobalTestHooks();
00369     hooks->m_contentLayoutOffsetXChangedEventSource.remove(token);
00370 }
00371
00372 void ScrollPresenterTestHooks::NotifyContentLayoutOffsetYChanged(const winrt::ScrollPresenter& sender)
00373 {
00374     auto hooks = EnsureGlobalTestHooks();
00375     if (hooks->m_contentLayoutOffsetYChangedEventSource)
00376     {
00377         hooks->m_contentLayoutOffsetYChangedEventSource(sender, nullptr);
00378     }
00379 }
00380
00381 winrt::event_token ScrollPresenterTestHooks::ContentLayoutOffsetYChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value)
00382 {
00383     auto hooks = EnsureGlobalTestHooks();
00384     return hooks->m_contentLayoutOffsetYChangedEventSource.add(value);
00385 }
00386
00387 void ScrollPresenterTestHooks::ContentLayoutOffsetYChanged(winrt::event_token const& token)
00388 {
00389     auto hooks = EnsureGlobalTestHooks();
00390     hooks->m_contentLayoutOffsetYChangedEventSource.remove(token);
00391 }
00392
00393 winrt::IVector<winrt::ScrollSnapPointBase> ScrollPresenterTestHooks::GetConsolidatedHorizontalScrollSnapPoints(const winrt::ScrollPresenter& scrollPresenter)
00394 {
00395     if (scrollPresenter)
00396     {
00397         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetConsolidatedHorizontalScrollSnapPointsDbg();
00398     }
00399     else
00400     {
00401         return winrt::make<Vector<winrt::ScrollSnapPointBase>>();
00402     }
00403 }
00404
00405 winrt::IVector<winrt::ScrollSnapPointBase> ScrollPresenterTestHooks::GetConsolidatedVerticalScrollSnapPoints(const winrt::ScrollPresenter& scrollPresenter)
00406 {
00407     if (scrollPresenter)
00408     {
00409         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetConsolidatedVerticalScrollSnapPointsDbg();
00410     }
00411     else
00412     {
00413         return winrt::make<Vector<winrt::ScrollSnapPointBase>>();
00414     }
00415 }
00416
00417 winrt::IVector<winrt::ZoomSnapPointBase> ScrollPresenterTestHooks::GetConsolidatedZoomSnapPoints(const winrt::ScrollPresenter& scrollPresenter)
00418 {
00419     if (scrollPresenter)
00420     {
00421         return winrt::get_self<ScrollPresenter>(scrollPresenter)->GetConsolidatedZoomSnapPointsDbg();
00422     }
00423     else
00424     {
00425         return winrt::make<Vector<winrt::ZoomSnapPointBase>>();
00426     }
00427 }
00428
00429 winrt::float2 ScrollPresenterTestHooks::GetHorizontalSnapPointActualApplicableZone(
00430     const winrt::ScrollPresenter& scrollPresenter,
00431     const winrt::ScrollSnapPointBase& scrollSnapPoint)
00432 {
00433     if (scrollSnapPoint)
00434     {
00435         const auto snapPointWrapper = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetHorizontalSnapPointWrapperDbg(scrollSnapPoint);
00436         auto zone = snapPointWrapper->ActualApplicableZone();
00437
00438         return winrt::float2{ static_cast<float>(std::get<0>(zone)), static_cast<float>(std::get<1>(zone)) };
00439     }
00440     else
00441     {
00442         return winrt::float2{ 0.0f, 0.0f };
00443     }
00444 }
00445
00446 winrt::float2 ScrollPresenterTestHooks::GetVerticalSnapPointActualApplicableZone(
00447     const winrt::ScrollPresenter& scrollPresenter,
00448     const winrt::ScrollSnapPointBase& scrollSnapPoint)
00449 {
00450     if (scrollSnapPoint)
00451     {
00452         const auto snapPointWrapper = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetVerticalSnapPointWrapperDbg(scrollSnapPoint);
00453         auto zone = snapPointWrapper->ActualApplicableZone();
00454
00455         return winrt::float2{ static_cast<float>(std::get<0>(zone)), static_cast<float>(std::get<1>(zone)) };
00456     }
00457     else
00458     {
00459         return winrt::float2{ 0.0f, 0.0f };
00460     }
00461 }
00462
00463 winrt::float2 ScrollPresenterTestHooks::GetZoomSnapPointActualApplicableZone(
00464     const winrt::ScrollPresenter& scrollPresenter,
00465     const winrt::ZoomSnapPointBase& zoomSnapPoint)
00466 {
00467     if (zoomSnapPoint)
00468     {
00469         const auto snapPointWrapper = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetZoomSnapPointWrapperDbg(zoomSnapPoint);
00470         auto zone = snapPointWrapper->ActualApplicableZone();
00471
00472         return winrt::float2{ static_cast<float>(std::get<0>(zone)), static_cast<float>(std::get<1>(zone)) };
00473     }
00474     else
00475     {
00476         return winrt::float2{ 0.0f, 0.0f };
00477     }
00478 }
00479
00480 int ScrollPresenterTestHooks::GetHorizontalSnapPointCombinationCount(
00481     const winrt::ScrollPresenter& scrollPresenter,
00482     const winrt::ScrollSnapPointBase& scrollSnapPoint)
00483 {
00484     if (scrollSnapPoint)
00485     {
00486         const auto snapPointWrapper = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetHorizontalSnapPointWrapperDbg(scrollSnapPoint);
00487
00488         return snapPointWrapper->CombinationCount();
00489     }
00490     else
00491     {
00492         return 0;
00493     }
00494 }
00495
00496 int ScrollPresenterTestHooks::GetVerticalSnapPointCombinationCount(
00497     const winrt::ScrollPresenter& scrollPresenter,
00498     const winrt::ScrollSnapPointBase& scrollSnapPoint)
00499 {
00500     if (scrollSnapPoint)
00501     {
00502         const auto snapPointWrapper = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetVerticalSnapPointWrapperDbg(scrollSnapPoint);
00503
00504         return snapPointWrapper->CombinationCount();
00505     }
00506     else
00507     {
00508         return 0;
00509     }
00510 }
00511
00512 int ScrollPresenterTestHooks::GetZoomSnapPointCombinationCount(
00513     const winrt::ScrollPresenter& scrollPresenter,
00514     const winrt::ZoomSnapPointBase& zoomSnapPoint)
00515 {
00516     if (zoomSnapPoint)
00517     {
00518         const auto snapPointWrapper = winrt::get_self<ScrollPresenter>(scrollPresenter)->GetZoomSnapPointWrapperDbg(zoomSnapPoint);
00519
00520         return snapPointWrapper->CombinationCount();
00521     }
00522     else
00523     {
00524         return 0;
00525     }
00526 }
00527
00528 winrt::Color ScrollPresenterTestHooks::GetSnapPointVisualizationColor(const winrt::SnapPointBase& snapPoint)
00529 {
00530
00531 #ifdef DBG
00532     if (snapPoint)
00533     {
00534         return winrt::get_self<SnapPointBase>(snapPoint)->VisualizationColor();
00535     }
00536 #endif // DBG
00537     return winrt::Colors::Black();
00538 }
00539
00540 void ScrollPresenterTestHooks::SetSnapPointVisualizationColor(const winrt::SnapPointBase& snapPoint, const winrt::Color& color)
00541 {
00542 #ifdef DBG
00543     if (snapPoint)
00544     {
00545         winrt::get_self<SnapPointBase>(snapPoint)->VisualizationColor(color);
00546     }
00547 #endif // DBG
00548 }
00549
00550 winrt::ScrollPresenterViewChangeResult ScrollPresenterTestHooks::TestHooksViewChangeResult(ScrollPresenterViewChangeResult result)
00551 {
00552     switch (result)
00553     {
00554     case ScrollPresenterViewChangeResult::Ignored:
00555         return winrt::ScrollPresenterViewChangeResult::Ignored;
00556     case ScrollPresenterViewChangeResult::Interrupted:
00557         return winrt::ScrollPresenterViewChangeResult::Interrupted;
00558     default:
00559         return winrt::ScrollPresenterViewChangeResult::Completed;
00560     }
00561 }
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2BasicPage.xaml.cs Source File

  • File List
  • File Members
  • WebView2
  • TestUI

WebView2BasicPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI;
00005 using Microsoft.UI.Text;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Automation;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Controls.Primitives;
00010 using Microsoft.UI.Xaml.Data;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Navigation;
00014 using Microsoft.Web.WebView2.Core;
00015
00016 using System;
00017 using System.Collections.Generic;
00018 using System.Diagnostics;
00019 using System.Runtime.InteropServices;
00020 using System.Threading.Tasks;
00021 using Windows.Foundation;
00022 using Windows.Globalization;
00023 using Windows.System;
00024 using Windows.UI;
00025 using Windows.ApplicationModel.DataTransfer;
00026 using WinRT;
00027
00028 namespace MUXControlsTestApp
00029 {
00030     public class EnumToStringConverter : IValueConverter
00031     {
00032         public object Convert(object value, Type targetType, object parameter, string language)
00033         {
00034             string EnumString;
00035             try
00036             {
00037                 EnumString = Enum.GetName((value.GetType()), value);
00038                 return EnumString;
00039             }
00040             catch
00041             {
00042                 return string.Empty;
00043             }
00044         }
00045
00046         // No need to implement converting back on a one-way binding
00047         public object ConvertBack(object value, Type targetType, object parameter, string language)
00048         {
00049             throw new NotImplementedException();
00050         }
00051     }
00052
00053     public class UriToStringConverter : IValueConverter
00054     {
00055         // TextBlock can display Uris without conversion.
00056         public object Convert(object value, Type targetType, object parameter, string language)
00057         {
00058             return value;
00059         }
00060
00061         public object ConvertBack(object value, Type targetType, object parameter, string language)
00062         {
00063             Uri newUri;
00064             string uriString = value as string;
00065             try
00066             {
00067                 Uri.TryCreate(uriString, UriKind.RelativeOrAbsolute, out newUri);
00068                 return newUri;
00069             }
00070             catch
00071             {
00072                 return null;
00073             }
00074         }
00075     }
00076
00077     static class WebView2Extensions
00078     {
00079         public static Task<CoreWebView2NavigationCompletedEventArgs> GetNavigationCompletedTask(this WebView2 wv2)
00080         {
00081             var tcs = new TaskCompletionSource<CoreWebView2NavigationCompletedEventArgs>();
00082             TypedEventHandler<WebView2, CoreWebView2NavigationCompletedEventArgs> handler = null;
00083
00084             handler = (WebView2 sender, CoreWebView2NavigationCompletedEventArgs e) =>
00085             {
00086                 tcs.SetResult(e);
00087                 wv2.NavigationCompleted -= handler;
00088             };
00089
00090             wv2.NavigationCompleted += handler;
00091
00092             return tcs.Task;
00093         }
00094
00095         public static Task<CoreWebView2NavigationStartingEventArgs> GetNavigationStartingTask(this WebView2 wv2)
00096         {
00097             var tcs = new TaskCompletionSource<CoreWebView2NavigationStartingEventArgs>();
00098             TypedEventHandler<WebView2, CoreWebView2NavigationStartingEventArgs> handler = null;
00099
00100             handler = (WebView2 sender, CoreWebView2NavigationStartingEventArgs e) =>
00101             {
00102                 tcs.SetResult(e);
00103                 wv2.NavigationStarting -= handler;
00104             };
00105
00106             wv2.NavigationStarting += handler;
00107
00108             return tcs.Task;
00109         }
00110
00111         public static Task<CoreWebView2InitializedEventArgs> GetCoreWebView2InitializedTask(this WebView2 wv2)
00112         {
00113             var tcs = new TaskCompletionSource<CoreWebView2InitializedEventArgs>();
00114             TypedEventHandler<WebView2, CoreWebView2InitializedEventArgs> handler = null;
00115
00116             handler = (WebView2 sender, CoreWebView2InitializedEventArgs e) =>
00117             {
00118                 tcs.SetResult(e);
00119                 wv2.CoreWebView2Initialized -= handler;
00120             };
00121
00122             wv2.CoreWebView2Initialized += handler;
00123
00124             return tcs.Task;
00125         }
00126     }
00127
00128     public class WebView2WithCursor : WebView2
00129     {
00130         public Microsoft.UI.Input.InputCursor WrappedProtectedCursor => this.ProtectedCursor;
00131     }
00132
00133     public sealed partial class WebView2BasicPage : TestPage
00134     {
00135         enum TestList
00136         {
00137             BasicRenderingTest,
00138             MouseLeftClickTest,
00139             MouseMiddleClickTest,
00140             MouseRightClickTest,
00141             MouseXButton1ClickTest,
00142             MouseXButton2ClickTest,
00143             MouseWheelScrollTest,
00144             NavigationErrorTest,
00145             Focus_BasicTabTest,
00146             Focus_ReverseTabTest,
00147             Focus_BackAndForthTabTest,
00148             Focus_MouseActivateTest,
00149             ExecuteScriptTest,
00150             MultipleWebviews_BasicRenderingTest,
00151             MultipleWebviews_FocusTest,
00152             MultipleWebviews_LanguageTest,
00153             CopyPasteTest,
00154             BasicKeyboardTest,
00155             WebMessageReceivedTest,
00156             MouseCaptureTest,
00157             ReloadTest,
00158             NavigateToStringTest,
00159             SourceBindingTest,
00160             GoBackAndForwardTest,
00161             NavigationStartingTest,
00162             NavigationStartingInvalidTest,
00163             ResizeTest,
00164             BasicTapTouchTest,
00165             BasicFlingTouchTest,
00166             BasicStretchTouchTest,
00167             BasicPanTouchTest,
00168             BasicLongPressTouchTest,
00169             ScaledTouchTest,
00170             MoveTest,
00171             ReparentElementTest,
00172             SourceBeforeLoadTest,
00173             VisibilityHiddenTest,
00174             VisibilityTurnedOnTest,
00175             ParentVisibilityHiddenTest,
00176             ParentVisibilityTurnedOnTest,
00177             SpecificTouchTest,
00178             CursorUpdateTest,
00179             CursorClickUpdateTest,
00180             WebView2CleanedUpTest,
00181             QueryCoreWebView2BasicTest,
00182             CoreWebView2InitializedTest,
00183             CoreWebView2Initialized_FailedTest,
00184             WindowHiddenTest,
00185             WindowlessPopupTest,
00186             PointerReleaseWithoutPressTest,
00187             HostNameToFolderMappingTest,
00188             NavigateToVideoTest,
00189             NavigateToLocalImageTest,
00190             CloseThenDPIChangeTest,
00191             AddHostObjectToScriptTest,
00192             UserAgentTest,
00193             KeyboardAcceleratorTest,
00194             AccessKeyTest,
00195             NonAsciiUriTest,
00196             OffTreeWebViewInputTest,
00197             HtmlDropdownTest,
00198             HiddenThenVisibleTest,
00199             ParentHiddenThenVisibleTest,
00200             LifetimeTabTest,
00201             DragDropIntoWebView2Test,
00202             CustomConfiguration_BasicTest,
00203             CustomConfiguration_EnsureAgainAfterDefaultTest,
00204             CustomConfiguration_EnsureAgainAfterCustomTest
00205         };
00206
00207         // Map of TestList entry to its webpage (index in TestPageNames[])
00208         readonly Dictionary<TestList, int> TestInfoDictionary = new Dictionary<TestList, int>()
00209         {
00210             { TestList.BasicRenderingTest, 0 },
00211             { TestList.MouseLeftClickTest, 1 },
00212             { TestList.MouseMiddleClickTest, 1 },
00213             { TestList.MouseRightClickTest, 1 },
00214             { TestList.MouseXButton1ClickTest, 1 },
00215             { TestList.MouseXButton2ClickTest, 1 },
00216             { TestList.MouseWheelScrollTest, 2 },
00217             { TestList.NavigationErrorTest, 0 },
00218             { TestList.Focus_BasicTabTest, 3 },
00219             { TestList.Focus_ReverseTabTest, 3 },
00220             { TestList.Focus_BackAndForthTabTest, 3 },
00221             { TestList.Focus_MouseActivateTest, 3 },
00222             { TestList.ExecuteScriptTest, 4 },
00223             { TestList.MultipleWebviews_BasicRenderingTest, 0 },
00224             { TestList.MultipleWebviews_FocusTest, 3 },
00225             { TestList.MultipleWebviews_LanguageTest, 0 },
00226             { TestList.CopyPasteTest, 3 },
00227             { TestList.BasicKeyboardTest, 5 },
00228             { TestList.WebMessageReceivedTest, 5 },
00229             { TestList.MouseCaptureTest, 5 },
00230             { TestList.ReloadTest, 5 },
00231             { TestList.NavigateToStringTest, 4 },
00232             { TestList.SourceBindingTest, 5 },
00233             { TestList.GoBackAndForwardTest, 0 },
00234             { TestList.NavigationStartingTest, 0 },
00235             { TestList.NavigationStartingInvalidTest, 4 },
00236             { TestList.ResizeTest, 0 },
00237             { TestList.BasicTapTouchTest, 2 },
00238             { TestList.BasicFlingTouchTest, 2 },
00239             { TestList.BasicStretchTouchTest, 2 },
00240             { TestList.BasicPanTouchTest, 2 },
00241             { TestList.BasicLongPressTouchTest, 2 },
00242             { TestList.ScaledTouchTest, 2 },
00243             { TestList.MoveTest, 0 },
00244             { TestList.ReparentElementTest, 0 },
00245             { TestList.SourceBeforeLoadTest, 0 },
00246             { TestList.VisibilityHiddenTest, 3 },
00247             { TestList.VisibilityTurnedOnTest, 3 },
00248             { TestList.ParentVisibilityHiddenTest, 3 },
00249             { TestList.ParentVisibilityTurnedOnTest, 3 },
00250             { TestList.SpecificTouchTest, 6 },
00251             { TestList.CursorUpdateTest, 1 },
00252             { TestList.CursorClickUpdateTest, 1 },
00253             { TestList.WebView2CleanedUpTest, 1 },
00254             { TestList.QueryCoreWebView2BasicTest, 0 },
00255             { TestList.CoreWebView2InitializedTest, 0 },
00256             { TestList.CoreWebView2Initialized_FailedTest, 0 },
00257             { TestList.WindowHiddenTest, 3 },
00258             { TestList.WindowlessPopupTest, 1 },
00259             { TestList.PointerReleaseWithoutPressTest, 1 },
00260             { TestList.HostNameToFolderMappingTest, 0 },
00261             { TestList.NavigateToVideoTest, 4 },
00262             { TestList.NavigateToLocalImageTest, 0 },
00263             { TestList.CloseThenDPIChangeTest, 0 },
00264             { TestList.AddHostObjectToScriptTest, 0 },
00265             { TestList.UserAgentTest, 0 },
00266             { TestList.KeyboardAcceleratorTest, 5 },
00267             { TestList.AccessKeyTest, 5 },
00268             { TestList.NonAsciiUriTest, 7 },
00269             { TestList.OffTreeWebViewInputTest, 1 },
00270             { TestList.HtmlDropdownTest, 5 },
00271             { TestList.HiddenThenVisibleTest, 1 },
00272             { TestList.ParentHiddenThenVisibleTest, 1 },
00273             { TestList.LifetimeTabTest, 0 },
00274             { TestList.DragDropIntoWebView2Test, 3 },
00275             { TestList.CustomConfiguration_BasicTest, 0 },
00276             { TestList.CustomConfiguration_EnsureAgainAfterDefaultTest, 0 },
00277             { TestList.CustomConfiguration_EnsureAgainAfterCustomTest, 0 }
00278         };
00279
00280         readonly string[] TestPageNames =
00281         {
00282             "SimplePage.html",
00283             "SimplePageWithButton.html",
00284             "SimplePageWithScrollableColoredBlocks.html",
00285             "SimplePageForFocus.html",
00286             "SimplePageWithText.html",
00287             "SimpleInputPage.html",
00288             "SimplePageWithManyButtons.html",
00289             "SimplePageWithNonÅscií.html",
00290         };
00291
00292         readonly WebView2Common _helpers;
00293
00294         bool _isUserInitiated = false;
00295         bool _isRedirected = false;
00296         bool _areWebviewElementsCleanedUp = false;
00297         bool _isApplicationLanguageOverrideSet = false;
00298         string _customUserDataFolder = string.Empty;
00299
00300         double _originalHeight;
00301         double _originalWidth;
00302
00303         public WebView2BasicPage()
00304         {
00305             InitializeComponent();
00306             _helpers = new WebView2Common(this);
00307             _helpers.CopyTestPagesLocally();
00308
00309             // setup first webview and tabstops in the right order
00310             var tabStop1 = new Button()
00311             {
00312                 Name = "TabStopButton1",
00313                 Content = "[x1] TabStop1"
00314             };
00315             AutomationProperties.SetName(tabStop1, "TabStopButton1");
00316             tabStop1.GotFocus += (sender, args) =>
00317             {
00318                 focusLog.Text += "Focus on: [x1]" + "\n";
00319                 focusScrollViewer.ChangeView(null, focusScrollViewer.ScrollableHeight, null);
00320             };
00321             var tabStop2 = new Button()
00322             {
00323                 Name = "TabStopButton2",
00324                 Content = "[x2] TabStop2"
00325             };
00326             AutomationProperties.SetName(tabStop2, "TabStopButton2");
00327             tabStop2.GotFocus += (sender, args) =>
00328             {
00329                 focusLog.Text += "Focus on: [x2]" + "\n";
00330                 focusScrollViewer.ChangeView(null, focusScrollViewer.ScrollableHeight, null);
00331             };
00332
00333             AddWebViewControl("MyWebView2");
00334             // adding tabstop buttons x1 and x2 before and after default webview and its title, respectively
00335             var defaultStackPanel = WebView2Collection.Children[0] as StackPanel;
00336             var titleStackPanel = defaultStackPanel.Children[0] as StackPanel;
00337             titleStackPanel.Children.Add(tabStop1);
00338             defaultStackPanel.Children.Add(tabStop2);
00339         }
00340
00341         public void OnSetSourceButtonClicked(object sender, RoutedEventArgs args)
00342         {
00343             ClearStatus();
00344             string newUriString = UriTextBox.Text;
00345             foreach (var unit in WebView2Collection.Children)
00346             {
00347                 var webviewStackPanel = unit as StackPanel;
00348                 if (webviewStackPanel != null)
00349                 {
00350                     string stackPanelName = webviewStackPanel.Name;
00351                     string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
00352                     var toggleBox = FindName(webviewName + "Toggle") as ToggleSwitch;
00353                     Debug.Assert(toggleBox != null);
00354                     if (toggleBox.IsOn)
00355                     {
00356                         var webview = FindName(webviewName) as WebView2;
00357                         Debug.Assert(webview != null);
00358                         WebView2Common.NavigateToUri(webview, newUriString);
00359                     }
00360                 }
00361             }
00362         }
00363
00364         public async void OnEnsureCWV2ButtonClicked(object sender, RoutedEventArgs args)
00365         {
00366             ClearStatus();
00367             foreach (var unit in WebView2Collection.Children)
00368             {
00369                 var webviewStackPanel = unit as StackPanel;
00370                 if (webviewStackPanel != null)
00371                 {
00372                     string stackPanelName = webviewStackPanel.Name;
00373                     string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
00374                     var toggleBox = FindName(webviewName + "Toggle") as ToggleSwitch;
00375                     Debug.Assert(toggleBox != null);
00376                     if (toggleBox.IsOn)
00377                     {
00378                         var webview = FindName(webviewName) as WebView2;
00379                         Debug.Assert(webview != null);
00380                         await webview.EnsureCoreWebView2Async();
00381                         Status1.Text = "EnsureCoreWebView2Async() completed";
00382                     }
00383                 }
00384             }
00385         }
00386
00387         public void OnAddWebviewButtonClicked(object sender, RoutedEventArgs args)
00388         {
00389             string prefixName = "MyWebView2";
00390             var numWebViews = WebView2Collection.Children.Count;
00391             char suffix = (char)('A' + numWebViews + 1); // choosing between A-Z based on existing webviews
00392             string finalName = prefixName + suffix;
00393             AddWebViewControl(finalName);
00394         }
00395
00396         public void OnNavigateToStringButtonClicked(object sender, RoutedEventArgs args)
00397         {
00398             string navigateToStringString = NavigateToStringString.Text;
00399             var MyWebView2 = FindName("MyWebView2") as WebView2;
00400             MyWebView2.NavigateToString(NavigateToStringString.Text);
00401         }
00402
00403         public void OnVideoButtonClicked(object sender, RoutedEventArgs args)
00404         {
00405             NavigateToVideo(FindName("MyWebView2") as WebView2);
00406         }
00407
00408         public void OnGoBackButtonClicked(object sender, RoutedEventArgs args)
00409         {
00410             var MyWebView2 = FindName("MyWebView2") as WebView2;
00411             MyWebView2.GoBack();
00412         }
00413
00414         public void OnGoForwardButtonClicked(object sender, RoutedEventArgs args)
00415         {
00416             var MyWebView2 = FindName("MyWebView2") as WebView2;
00417             MyWebView2.GoForward();
00418         }
00419
00420         public string GetDocumentTitle(WebView2 wv2)
00421         {
00422             string documentTitle = string.Empty;
00423
00424             var core_wv2 = wv2.CoreWebView2;
00425             if (core_wv2 != null)
00426             {
00427                 documentTitle = core_wv2.DocumentTitle;
00428             }
00429
00430             var DocumentTitleTextBlock = FindName("DocumentTitleTextBlock") as TextBlock;
00431             DocumentTitleTextBlock.Text = documentTitle;
00432
00433             return documentTitle;
00434         }
00435
00436         public void OnGetDocumentTitleButtonClicked(object sender, RoutedEventArgs args)
00437         {
00438             GetDocumentTitle(FindName("MyWebView2") as WebView2);
00439         }
00440
00441         void UpdateSourceOnEnter(object sender, KeyRoutedEventArgs args)
00442         {
00443             if (args.Key == VirtualKey.Enter)
00444             {
00445                 var ActualUriTextBlock = FindName("ActualUriTextBlock") as TextBlock;
00446                 ActualUriTextBlock.Text = UriTextBox.Text;
00447             }
00448         }
00449
00450         // By design, NavigateToString() doesn't work if the HTML has <video> specified with a
00451         // local URI, so SetVirtualHostNameToFolderMapping() is used to work around this limitation.
00452         public static void NavigateToVideo(WebView2 webview)
00453         {
00454             var core_wv2 = webview.CoreWebView2;
00455             if (core_wv2 != null)
00456             {
00457                 core_wv2.SetVirtualHostNameToFolderMapping(
00458                     "appassets.example", "assets",
00459                     Microsoft.Web.WebView2.Core.CoreWebView2HostResourceAccessKind.Allow);
00460
00461                 string uriString = "https://appassets.example/CastingVideo.mp4";
00462                 WebView2Common.NavigateToUri(webview, uriString);
00463             }
00464         }
00465
00466         public void TransformWebView(object sender, RoutedEventArgs args)
00467         {
00468             var MyWebView2 = FindName("MyWebView2") as WebView2;
00469             MyWebView2.RenderTransformOrigin = new Windows.Foundation.Point(0, 0);
00470             var rotateTransform = new RotateTransform { Angle = 45 };
00471             var scaleTransform = new ScaleTransform { ScaleX = 1.2, ScaleY = 1.2 };
00472             TransformGroup transformGroup = new TransformGroup();
00473             transformGroup.Children.Add(rotateTransform);
00474             transformGroup.Children.Add(scaleTransform);
00475             MyWebView2.RenderTransform = transformGroup;
00476
00477             RotateScaleButton.Content = "Reset";
00478         }
00479
00480         public void ResetTransformWebView(object sender, RoutedEventArgs args)
00481         {
00482             var MyWebView2 = FindName("MyWebView2") as WebView2;
00483             MyWebView2.RenderTransformOrigin = new Windows.Foundation.Point(0, 0);
00484             var rotateTransform = new RotateTransform { Angle = 0 };
00485             var scaleTransform = new ScaleTransform { ScaleX = 1, ScaleY = 1 };
00486             TransformGroup transformGroup = new TransformGroup();
00487             transformGroup.Children.Add(rotateTransform);
00488             transformGroup.Children.Add(scaleTransform);
00489             MyWebView2.RenderTransform = transformGroup;
00490
00491             RotateScaleButton.Content = "Rotate and Scale";
00492         }
00493
00494         public void OnResizeWebViewVisualButtonClicked(object sender, RoutedEventArgs args)
00495         {
00496             var MyWebView2 = FindName("MyWebView2") as WebView2;
00497             _originalWidth = MyWebView2.ActualWidth;
00498             _originalHeight = MyWebView2.ActualHeight;
00499             MyWebView2.Width = MyWebView2.ActualWidth / 2;
00500             MyWebView2.Height = MyWebView2.ActualHeight / 2;
00501
00502             MyWebView2.UpdateLayout();
00503
00504             ResizeWebViewVisualButton.Content = "Reset";
00505         }
00506
00507         public void ResetWebViewVisual(object sender, RoutedEventArgs args)
00508         {
00509             var MyWebView2 = FindName("MyWebView2") as WebView2;
00510             MyWebView2.Width = _originalWidth;
00511             MyWebView2.Height = _originalHeight;
00512             MyWebView2.UpdateLayout();
00513
00514             ResizeWebViewVisualButton.Content = "Resize visual";
00515         }
00516
00517         public void OnToggleWebViewVisibilityButtonClicked(object sender, RoutedEventArgs args)
00518         {
00519             var MyWebView2 = FindName("MyWebView2") as WebView2;
00520             MyWebView2.Visibility = Visibility.Collapsed;
00521
00522             ToggleWebViewVisibilityButton.Content = "Reset";
00523         }
00524
00525         public void ResetWebViewVisibility(object sender, RoutedEventArgs args)
00526         {
00527             var MyWebView2 = FindName("MyWebView2") as WebView2;
00528             MyWebView2.Visibility = Visibility.Visible;
00529
00530             ToggleWebViewVisibilityButton.Content = "Hide WebView";
00531         }
00532
00533         public void ClearStatus()
00534         {
00535             _helpers.ClearStatus();
00536             var messageReceivedBox = FindName("MessageReceived") as CheckBox;
00537             messageReceivedBox.IsChecked = false;
00538             AnaheimFocusTextBox.Text = string.Empty;
00539         }
00540
00541         private void TestNameComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00542         {
00543             // if there are more webviews than just default one, remove them
00544             if (WebView2Collection.Children.Count > 1)
00545             {
00546                 RemoveWebViewControls(true /* keep default webview */);
00547             }
00548
00549             var MyWebView2 = FindName("MyWebView2") as WebView2;
00550             TestList test = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
00551             switch (test)
00552             {
00553                 case TestList.MultipleWebviews_BasicRenderingTest:
00554                     {
00555                         AddWebViewControl("MyWebView2B");
00556                         AddWebViewControl("MyWebView2C");
00557                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00558                     }
00559                     break;
00560                 case TestList.MultipleWebviews_FocusTest:
00561                     {
00562                         AddWebViewControl("MyWebView2B");
00563                         // both webviews will load different webpages
00564                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00565                         WebView2Common.LoadWebPage((FindName("MyWebView2B") as WebView2), TestPageNames[0]);
00566                     }
00567                     break;
00568                 case TestList.MultipleWebviews_LanguageTest:
00569                     {
00570                         // Set Application Language override to zh-Hans - create new WV2
00571                         ApplicationLanguages.PrimaryLanguageOverride = "zh-Hans";
00572                         _isApplicationLanguageOverrideSet = true;
00573                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00574
00575                         // TODO_WebView2: When we expose API to set custom UserData, update the 2nd WebView to use a different language
00576                         //                (same UserData implies same browser instance and therefore requires same Language)
00577                         AddWebViewControl("MyWebView2B");
00578                         StackPanel MyWebView2B_Ancestor = FindName("MyWebView2BStackPanel") as StackPanel;
00579                         WebView2Common.LoadWebPage((FindName("MyWebView2B") as WebView2), TestPageNames[TestInfoDictionary[test]]);
00580                     }
00581                     break;
00582                 case TestList.SourceBeforeLoadTest:
00583                     {
00584                         // Remove existing WebView, we're going to replace it
00585                         Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
00586
00587                         Uri uri = WebView2Common.GetTestPageUri("SimplePageWithButton.html");
00588                         var newWebView2 = new WebView2() {
00589                             Name = "MyWebView2",
00590                             Margin = new Thickness(8, 8, 8, 8),
00591                             // Set the source before we put the webview in the tree
00592                             Source = uri
00593                         };
00594                         AutomationProperties.SetName(newWebView2, "MyWebView2");
00595                         parentBorder.Child = newWebView2;
00596                         AddWebViewEventHandlers(newWebView2);
00597                     }
00598                     break;
00599                 case TestList.VisibilityTurnedOnTest:
00600                     {
00601                         MyWebView2.Visibility = Visibility.Collapsed;
00602                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00603                     }
00604                     break;
00605                 case TestList.ParentVisibilityTurnedOnTest:
00606                     {
00607                         var testContentsBorder = FindName("TestContentsBorder") as Border;
00608                         testContentsBorder.Visibility = Visibility.Collapsed;
00609                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00610                     }
00611                     break;
00612                 case TestList.QueryCoreWebView2BasicTest:
00613                     {
00614                         // Defer 1st source set to CompleteCurrentTest to avoid race conditions
00615                     }
00616                     break;
00617                 case TestList.CoreWebView2InitializedTest:
00618                     {
00619                         // Defer 1st source set to CompleteCurrentTest to listen to event during CoreWV initialization
00620                     }
00621                     break;
00622                 case TestList.CoreWebView2Initialized_FailedTest:
00623                     {
00624                         // Defer 1st source set to CompleteCurrentTest to listen to event during CoreWV initialization
00625                     }
00626                     break;
00627                 case TestList.WindowlessPopupTest:
00628                     {
00629                         // Remove existing WebView so it doesn't get confused with the one in the popup
00630                         _ = RemoveExistingWebViewControl(MyWebView2);
00631
00632                         // Create popup contents: a new webview
00633                         var webviewInPopup = new WebView2() {
00634                             Name = "popWebView2",
00635                             Margin = new Thickness(8, 8, 8, 8),
00636                             Height = 500,
00637                             Width = 500,
00638                         };
00639                         AutomationProperties.SetName(webviewInPopup, "popWebView2");
00640                         AddWebViewEventHandlers(webviewInPopup);
00641
00642                         // Add a ToggleSwitch back in so that OnWebMessageReceived can find it
00643                         var toggleSwitch = new ToggleSwitch()
00644                         {
00645                             Name = "popWebView2" + "Toggle",
00646                             IsOn = true,
00647                             OffContent = "Not selected",
00648                             OnContent = "Selected",
00649                             IsTabStop = false
00650                         };
00651                         var messageReceivedSP = (FindName("MessageReceived") as CheckBox).Parent as StackPanel;
00652                         messageReceivedSP.Children.Add(toggleSwitch);
00653
00654                         // Create Popup
00655                         var popupOpened = new System.Threading.AutoResetEvent(false);
00656                         Popup popup = new Popup {
00657                             HorizontalOffset = 50,
00658                             VerticalOffset = 50,
00659                             Child = webviewInPopup,
00660                         };
00661                         popup.Opened += (sender, args) =>
00662                         {
00663                             popupOpened.Set();
00664                         };
00665
00666                         // Place popup and open it
00667                         Border testContentsBorder = FindName("TestContentsBorder") as Border;
00668                         testContentsBorder.Child = popup;
00669                         if (!popup.IsOpen) { popup.IsOpen = true; }
00670
00671                         // Wait up to 5 seconds for the popup to open
00672                         popupOpened.WaitOne(TimeSpan.FromSeconds(5));
00673                     }
00674                     break;
00675                 case TestList.CursorUpdateTest:
00676                 case TestList.CursorClickUpdateTest:
00677                     {
00678                         // Remove existing WebView, we're going to replace it
00679                         Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
00680
00681                         // Insert webview with public ProtectedCursor
00682                         var newWebView2 = new WebView2WithCursor() {
00683                             Name = "MyWebView2",
00684                             Margin = new Thickness(8, 8, 8, 8),
00685                         };
00686                         AutomationProperties.SetName(newWebView2, "MyWebView2");
00687                         parentBorder.Child = newWebView2;
00688                         AddWebViewEventHandlers(newWebView2);
00689                         WebView2Common.LoadWebPage(newWebView2, TestPageNames[TestInfoDictionary[test]]);
00690                     }
00691                     break;
00692                 case TestList.KeyboardAcceleratorTest:
00693                     {
00694                         var f5Accelerator = new KeyboardAccelerator();
00695                         f5Accelerator.Key = VirtualKey.F5;
00696                         f5Accelerator.Invoked += (sender, args) =>
00697                         {
00698                             Status2.Text = "F5";
00699                         };
00700                         MyWebView2.KeyboardAccelerators.Add(f5Accelerator);
00701                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00702                     }
00703                     break;
00704                 case TestList.AccessKeyTest:
00705                     {
00706                         MyWebView2.AccessKey = "W";
00707                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00708                     }
00709                     break;
00710                 case TestList.NonAsciiUriTest:
00711                     {
00712                         // Put the URI with non-ascii characters in a TextBox, so we can easily copy/paste for manual testing.
00713                         var box = FindName("CopyPasteTextBox2") as TextBox;
00714                         string fileLocation = WebView2Common.GetTestPageUri("SimplePageWithNonÅscií.html").ToString();
00715                         string query = "?query=";
00716                         box.Text = fileLocation + query;
00717
00718                         WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00719                     }
00720                     break;
00721                 case TestList.OffTreeWebViewInputTest:
00722                     {
00723                         Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
00724                         parentBorder.BorderBrush = new SolidColorBrush(Colors.Pink);
00725                     }
00726                     break;
00727                 case TestList.HiddenThenVisibleTest:
00728                     {
00729                         // Remove existing WebView, we're going to replace it with a hidden one
00730                         Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
00731                         var parentStackPanel = parentBorder.Parent as StackPanel;
00732                         parentStackPanel.Children.Remove(parentBorder);
00733
00734                         // Create a new border that gets its size from the webview
00735                         var newBorder = new Border()
00736                         {
00737                             BorderBrush = new SolidColorBrush(Colors.Red),
00738                             BorderThickness = new Thickness(5)
00739                         };
00740
00741                         // Add a new, collapsed WebView2 into the tree
00742                         var uri = WebView2Common.GetTestPageUri(TestPageNames[TestInfoDictionary[test]]);
00743                         var newWebView2 = new WebView2()
00744                         {
00745                             Name = "MyWebView2",
00746                             Margin = new Thickness(8, 8, 8, 8),
00747                             Width = 670,
00748                             Height = 370,
00749                             Source = uri,
00750                             Visibility = Visibility.Collapsed,
00751                         };
00752                         AutomationProperties.SetName(newWebView2, "MyWebView2");
00753                         newBorder.Child = newWebView2;
00754                         parentStackPanel.Children.Add(newBorder);
00755                         AddWebViewEventHandlers(newWebView2);
00756                     }
00757                     break;
00758                 case TestList.ParentHiddenThenVisibleTest:
00759                     {
00760                         // Remove existing WebView, we're going to replace it with a hidden one
00761                         Border parentBorder = RemoveExistingWebViewControl(MyWebView2);
00762                         var parentStackPanel = parentBorder.Parent as StackPanel;
00763                         parentStackPanel.Children.Remove(parentBorder);
00764
00765                         // Create a new, collapsed border that gets its size from the webview
00766                         var newBorder = new Border()
00767                         {
00768                             BorderBrush = new SolidColorBrush(Colors.Red),
00769                             BorderThickness = new Thickness(5),
00770                             Visibility = Visibility.Collapsed
00771                         };
00772
00773                         // Add a new WebView2 into the tree
00774                         var uri = WebView2Common.GetTestPageUri(TestPageNames[TestInfoDictionary[test]]);
00775                         var newWebView2 = new WebView2()
00776                         {
00777                             Name = "MyWebView2",
00778                             Margin = new Thickness(8, 8, 8, 8),
00779                             Width = 670,
00780                             Height = 370,
00781                             Source = uri,
00782                             Visibility = Visibility.Visible,
00783                         };
00784                         AutomationProperties.SetName(newWebView2, "MyWebView2");
00785                         newBorder.Child = newWebView2;
00786                         parentStackPanel.Children.Add(newBorder);
00787                         AddWebViewEventHandlers(newWebView2);
00788                     }
00789                     break;
00790
00791                 case TestList.CustomConfiguration_BasicTest:
00792                 case TestList.CustomConfiguration_EnsureAgainAfterCustomTest:
00793                     {
00794                         // Defer load so we can use custom Environment and ControllerOptions
00795                     }
00796                     break;
00797
00798                 default:
00799                     WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[test]]);
00800                     break;
00801             }
00802         }
00803
00804         private void OnNavigationStarting(WebView2 sender, CoreWebView2NavigationStartingEventArgs args)
00805         {
00806             // Be careful if changing this message. The "NavigationStarting" string is expected
00807             // to be logged exactly once per NavigationStarting event by the NonAsciiUriTest.
00808             AppendMessage(string.Format("[{0}]: Got NavigationStarting ({1}).", sender.Name, args.Uri));
00809
00810             string expectedUri = "http://www.blockedbynavigationstarting.invalid/";
00811             if (args.Uri.ToString() == expectedUri)
00812             {
00813                 args.Cancel = true;
00814             }
00815             else
00816             {
00817                 Status1.Text = sender.Name + " navigation starting...";
00818                 Status3.Text = args.Uri;
00819                 _isUserInitiated = args.IsUserInitiated;
00820                 _isRedirected = args.IsRedirected;
00821             }
00822         }
00823
00824         private void OnNavigationCompleted(WebView2 sender, CoreWebView2NavigationCompletedEventArgs args)
00825         {
00826             AppendMessage(string.Format("[{0}]: Got NavigationCompleted.", sender.Name));
00827
00828             if (args.IsSuccess)
00829             {
00830                 Status2.Text += string.Format("{0},", sender.Name); // indicating webview has loaded
00831             }
00832             else
00833             {
00834                 HandleWebError(args);
00835             }
00836         }
00837
00838         private static bool AreEqualIgnoringSpace(string string1, string string2)
00839         {
00840             string1 = string1.Replace(" ", "%20");
00841             string2 = string2.Replace(" ", "%20");
00842             return string1 == string2;
00843         }
00844
00845         private void OnWebMessageReceived(WebView2 sender, CoreWebView2WebMessageReceivedEventArgs args)
00846         {
00847             try
00848             {
00849                 AppendMessage(string.Format("[{0}]: Got WebMessageReceived ({1}).", sender.Name, args.TryGetWebMessageAsString()));
00850             }
00851             catch
00852             {
00853                 AppendMessage(string.Format("[{0}]: Got WebMessageReceived ({1}).", sender.Name, string.Empty));
00854             }
00855
00856             // Do not process message if webview is not enabled or source is not validated.
00857             Status1.Text = string.Empty;
00858             Status2.Text = string.Empty;
00859             string webMessageAsString = string.Empty;
00860             string webMessageAsJson = string.Empty;
00861
00862             // TODO_WebView2: Create wrapper WebView2Info with easy access to state like toggleswitch
00863             var toggleSwitch = FindName(sender.Name + "Toggle") as ToggleSwitch;
00864             if (AreEqualIgnoringSpace(args.Source, sender.Source.ToString()) && toggleSwitch.IsOn)
00865             {
00866                 try
00867                 {
00868                     webMessageAsString = args.TryGetWebMessageAsString();
00869                     if (IsFocusMessage(webMessageAsString))
00870                     {
00871                         AnaheimFocusTextBox.Text = webMessageAsString;
00872                         focusLog.Text += webMessageAsString + "\n";
00873                         focusScrollViewer.ChangeView(null, focusScrollViewer.ScrollableHeight, null);
00874                     }
00875                     else if (IsW2CenterPointMessage(webMessageAsString))
00876                     {
00877                         MiscTextBox.Text = webMessageAsString;
00878                     }
00879                     else
00880                     {
00881                         Status1.Text = webMessageAsJson = args.WebMessageAsJson;
00882                         Status2.Text = webMessageAsString;
00883                     }
00884                 }
00885                 catch
00886                 {
00887                     Status1.Text = webMessageAsJson = args.WebMessageAsJson;
00888                     Status2.Text = "Invalid string (try args.WebMessageAsJson instead)";
00889                 }
00890             }
00891
00892             if (!IsTransientWebMessage(webMessageAsString))
00893             {
00894                 VerifyWebMessageBasedTest(webMessageAsString, webMessageAsJson);
00895             }
00896         }
00897
00898         private static bool IsW2CenterPointMessage(string webMessageAsString)
00899         {
00900             return webMessageAsString.StartsWith("w2 CenterPoint:");
00901         }
00902
00903         private static bool IsFocusMessage(string webMessageAsString)
00904         {
00905             return webMessageAsString.StartsWith("Focus on:") || webMessageAsString.StartsWith("Blur on:");
00906         }
00907
00908         private void OnCoreProcessFailed(WebView2 sender, CoreWebView2ProcessFailedEventArgs args)
00909         {
00910             AppendMessage(string.Format("[{0}]: Got CoreProcessFailed ({1}).", sender.Name, args.ProcessFailedKind.ToString()));
00911         }
00912
00913         private void OnCoreWebView2Initialized(WebView2 sender, CoreWebView2InitializedEventArgs args)
00914         {
00915             if (args.Exception != null)
00916             {
00917                 AppendMessage(string.Format("[{0}]: Got CoreWebView2Initialized with exception ({1}).", sender.Name, args.Exception.ToString()));
00918             }
00919             else
00920             {
00921                 AppendMessage(string.Format("[{0}]: Got CoreWebView2Initialized.", sender.Name));
00922             }
00923         }
00924
00925         void AddWebViewControl(string webviewName)
00926         {
00927             if (FindName(webviewName) != null)
00928             {
00929                 Debug.Fail("Webview already exists by name " + webviewName);
00930                 return;
00931             }
00932
00933             var textBlock = new TextBlock()
00934             {
00935                 Text = webviewName,
00936                 FontWeight = FontWeights.Bold,
00937                 FontSize = 11,
00938                 Margin = new Thickness(0, 2, 0, 2)
00939             };
00940
00941             var toggleSwitch = new ToggleSwitch()
00942             {
00943                 Name = webviewName + "Toggle",
00944                 IsOn = true,
00945                 OffContent = "Not selected",
00946                 OnContent = "Selected",
00947                 IsTabStop = false
00948             };
00949
00950             var stackPanelText = new StackPanel()
00951             {
00952                 Orientation = Orientation.Horizontal
00953             };
00954             stackPanelText.Children.Add(textBlock);
00955             stackPanelText.Children.Add(toggleSwitch);
00956
00957             ApplicationTheme appTheme = Application.Current.RequestedTheme;
00958             Color backgroundColor = (appTheme == ApplicationTheme.Light) ? Colors.White : Colors.Black;
00959             var webView2 = new WebView2()
00960             {
00961                 Name = webviewName,
00962                 Margin = new Thickness(8, 8, 8, 8),
00963                 DefaultBackgroundColor = backgroundColor
00964             };
00965             AutomationProperties.SetName(webView2, webviewName);
00966
00967             var border = new Border()
00968             {
00969                 Width = 670,
00970                 Height = 370,
00971                 BorderBrush = new SolidColorBrush(Colors.Blue),
00972                 BorderThickness = new Thickness(1),
00973                 Name = webviewName + "Border"
00974             };
00975             border.Child = webView2;
00976
00977             Binding binding = new Binding()
00978             {
00979                 Mode = BindingMode.TwoWay,
00980                 Source = WebViewBorderWidthSlider,
00981                 Path = new PropertyPath("Value")
00982             };
00983             border.SetBinding(Border.WidthProperty, binding);
00984
00985             var stackPanel = new StackPanel()
00986             {
00987                 Name = webviewName + "StackPanel"  // makes it easy to get webview name by following this naming convention
00988             };
00989             stackPanel.Children.Add(stackPanelText);
00990             stackPanel.Children.Add(border);
00991             WebView2Collection.Children.Add(stackPanel);
00992
00993             AddWebViewEventHandlers(webView2);
00994         }
00995
00996         void MoveWebViewControl(string webviewName, WebView2 webView2)
00997         {
00998             var border = new Border()
00999             {
01000                 Width = 670,
01001                 Height = 370,
01002                 BorderBrush = new SolidColorBrush(Colors.Pink),
01003                 BorderThickness = new Thickness(1)
01004             };
01005             border.Child = webView2;
01006
01007             var stackPanel = new StackPanel()
01008             {
01009                 Name = webviewName + "StackPanel"
01010             };
01011             stackPanel.Children.Add(border);
01012             WebView2Collection.Children.Add(stackPanel);
01013         }
01014
01015         Border RemoveExistingWebViewControl(WebView2 webview)
01016         {
01017             RemoveWebViewEventHandlers(webview);
01018             webview.Close();
01019             Border parentBorder = webview.Parent as Border;
01020             parentBorder.Child = null;
01021             return parentBorder;
01022         }
01023
01024         void AddWebViewEventHandlers(WebView2 webview)
01025         {
01026             webview.NavigationStarting += OnNavigationStarting;
01027             webview.NavigationCompleted += OnNavigationCompleted;
01028             webview.WebMessageReceived += OnWebMessageReceived;
01029             webview.CoreProcessFailed += OnCoreProcessFailed;
01030             webview.CoreWebView2Initialized += OnCoreWebView2Initialized;
01031         }
01032
01033         void RemoveWebViewEventHandlers(WebView2 webview)
01034         {
01035             webview.NavigationStarting -= OnNavigationStarting;
01036             webview.NavigationCompleted -= OnNavigationCompleted;
01037             webview.WebMessageReceived -= OnWebMessageReceived;
01038             webview.CoreProcessFailed -= OnCoreProcessFailed;
01039             webview.CoreWebView2Initialized -= OnCoreWebView2Initialized;
01040         }
01041
01042         void RemoveWebViewControls(bool keepDefault = false)
01043         {
01044             int lastToRemove = keepDefault ? 1 : 0;
01045             for (int i = WebView2Collection.Children.Count - 1; i >= lastToRemove; i--)
01046             {
01047                 StackPanel webviewStackPanel = WebView2Collection.Children[i] as StackPanel;
01048                 Debug.Assert(webviewStackPanel != null);
01049                 string stackPanelName = webviewStackPanel.Name;
01050                 string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
01051                 var webview = FindName(webviewName) as WebView2;
01052                 if (webview != null)
01053                 {
01054                     RemoveWebViewEventHandlers(webview);
01055                     webview.Close();
01056                 }
01057
01058                 WebView2Collection.Children.RemoveAt(i);
01059             }
01060         }
01061
01062         // Ensure destruction and cleanup (including UIA tree of web content) of all webviews
01063         //
01064         // NOTE: We need a small wait before completing this test, otherwise WebView2 tests were failing sporadically.
01065         // This is because the UIA tree from the browser HWND does not get disconnected synchronously on WebView2 Element destruction,
01066         // and its presence after leaving the test page prevents the test runner from activating (also via UIA) the next test.
01067         //
01068         // TODO_WebView2: Work with Anaheim to provide a "Disconnect" method on CoreWebView2 that synchronously removes web UIA tree.
01069         private async Task CleanupWebViewElements()
01070         {
01071             RemoveWebViewControls();
01072             GC.Collect();
01073             await Task.Delay(3000);
01074             _areWebviewElementsCleanedUp = true;
01075         }
01076
01077         // Handle specific error codes here
01078         void HandleWebError(CoreWebView2NavigationCompletedEventArgs args)
01079         {
01080             var errorStatus = args.WebErrorStatus;
01081             Status2.Text = errorStatus.ToString("G");
01082         }
01083
01084         private void DraggableText_DragStarting(UIElement sender, DragStartingEventArgs args)
01085         {
01086             TextBlock draggableTexTextBlock = sender as TextBlock;
01087             args.Data.SetText(draggableTexTextBlock.Text);
01088             args.Data.RequestedOperation = DataPackageOperation.Copy;
01089         }
01090
01091         // Some tests receive multiple messages from WebMessageReceived, but we only care about the last one
01092         bool IsTransientWebMessage(string webMessageAsString)
01093         {
01094             TestList selectedTest = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
01095
01096             // The transient message each of these generates is the tap acknowledgment - "Tap received, zoom: 1"
01097             bool isTapWhenWaitingForSomethingElse = webMessageAsString == "Tap received, zoom: 1" && IsTransientTapTest(selectedTest);
01098             // Tests may receive a resize message when the webview is initially sized
01099             bool isInitialResize = webMessageAsString == "Webview resized." && selectedTest != TestList.ResizeTest;
01100             // Tests may receive a resize message when the webview is initially displayed on screen
01101             bool isInitialWindowVisible = webMessageAsString.StartsWith("Visibility state is now") && !IsVisiblityTest(selectedTest);
01102
01103             return isTapWhenWaitingForSomethingElse ||
01104                    isInitialResize ||
01105                    isInitialWindowVisible ||
01106                    IsW2CenterPointMessage(webMessageAsString) ||
01107                    IsFocusMessage(webMessageAsString);
01108         }
01109
01110         private static bool IsTransientTapTest(TestList selectedTest)
01111         {
01112             return selectedTest == TestList.BasicFlingTouchTest     ||
01113                    selectedTest == TestList.BasicPanTouchTest       ||
01114                    selectedTest == TestList.BasicLongPressTouchTest ||
01115                    selectedTest == TestList.BasicStretchTouchTest;
01116         }
01117
01118         private static bool IsVisiblityTest(TestList selectedTest)
01119         {
01120             return selectedTest == TestList.WindowHiddenTest           ||
01121                    selectedTest == TestList.VisibilityHiddenTest       ||
01122                    selectedTest == TestList.VisibilityTurnedOnTest     ||
01123                    selectedTest == TestList.ParentVisibilityHiddenTest ||
01124                    selectedTest == TestList.ParentVisibilityTurnedOnTest;
01125         }
01126
01127         public void VerifyWebMessageBasedTest(string stringResult, string jsonResult)
01128         {
01129             TestList selectedTest = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
01130             using (var logger = new ResultsLogger(selectedTest.ToString(), TestResult))
01131             {
01132                 string expectedStringResult = string.Empty;
01133                 string expectedJsonResult = string.Empty;
01134
01135                 switch (selectedTest)
01136                 {
01137                     case TestList.MouseLeftClickTest:
01138                         expectedStringResult = "Left mouse button clicked.";
01139                         break;
01140
01141                     case TestList.MouseMiddleClickTest:
01142                         expectedStringResult = "Middle mouse button clicked.";
01143                         break;
01144
01145                     case TestList.MouseRightClickTest:
01146                         expectedStringResult = "Right mouse button clicked.";
01147                         break;
01148
01149                     case TestList.MouseXButton1ClickTest:
01150                         expectedStringResult = "First X mouse button clicked.";
01151                         break;
01152
01153                     case TestList.MouseXButton2ClickTest:
01154                         expectedStringResult = "Second X mouse button clicked.";
01155                         break;
01156
01157                     case TestList.MouseWheelScrollTest:
01158                         expectedStringResult = "End of page reached.";
01159                         break;
01160
01161                     case TestList.WebMessageReceivedTest:
01162                         {
01163                              expectedStringResult = "Input button clicked.";
01164                              expectedJsonResult = "\"Input button clicked.\"";
01165                         }
01166                         break;
01167
01168                     case TestList.ResizeTest:
01169                         expectedStringResult = "Webview resized.";
01170                         break;
01171
01172                     case TestList.BasicTapTouchTest:
01173                         expectedStringResult = "Tap received, zoom: 1";
01174                         break;
01175
01176                     case TestList.BasicFlingTouchTest:
01177                         expectedStringResult = "Far side of page reached.";
01178                         break;
01179
01180                     case TestList.BasicStretchTouchTest:
01181                         {
01182                             string[] split = stringResult.Split(' ');
01183                             string zoom = split[split.Length - 1];
01184                             float zoomResultAsFloat = float.Parse(zoom);
01185                             logger.Verify((zoomResultAsFloat > 1.0),
01186                                           string.Format("Test {0}: Expected zoom value greater than 1.0, actual zoom was {1}",
01187                                                         selectedTest.ToString(), zoom));
01188                         }
01189                         break;
01190
01191                     case TestList.BasicPanTouchTest:
01192                         expectedStringResult = "Far side of page reached.";
01193                         break;
01194
01195                     case TestList.BasicLongPressTouchTest:
01196                         expectedStringResult = "Long press received.";
01197                         break;
01198
01199                     case TestList.HostNameToFolderMappingTest:
01200                         expectedStringResult = "Left mouse button clicked.";
01201                         break;
01202
01203                     case TestList.NavigateToLocalImageTest:
01204                         expectedStringResult = "Image loaded.";
01205                         break;
01206
01207                     case TestList.ScaledTouchTest:
01208                         expectedStringResult = "Tap received, zoom: 1";
01209                         break;
01210
01211                     case TestList.VisibilityHiddenTest:
01212                     case TestList.ParentVisibilityHiddenTest:
01213                         expectedStringResult = "Visibility state is now hidden";
01214                         break;
01215
01216                     case TestList.VisibilityTurnedOnTest:
01217                     case TestList.ParentVisibilityTurnedOnTest:
01218                         {
01219                             // We start the test by hiding the WebView so ignore that message if it comes through
01220                             if (stringResult == "Visibility state is now hidden") return;
01221                             expectedStringResult = "Visibility state is now visible";
01222                         }
01223                         break;
01224
01225                     case TestList.SpecificTouchTest:
01226                         {
01227                             expectedStringResult = "Received: 35";
01228                         }
01229                         break;
01230
01231                     case TestList.WindowHiddenTest:
01232                         {
01233                             // We hide the window before showing it again, so ignore the first message
01234                             if (stringResult == "Visibility state is now hidden") return;
01235                             expectedStringResult = "Visibility state is now visible";
01236                         }
01237                         break;
01238
01239                     case TestList.WindowlessPopupTest:
01240                         expectedStringResult = "Left mouse button clicked.";
01241                         break;
01242
01243                     case TestList.AddHostObjectToScriptTest:
01244                         expectedStringResult = "Example property from host object";
01245                         break;
01246
01247                     case TestList.OffTreeWebViewInputTest:
01248                         expectedStringResult = "Left mouse button clicked.";
01249                         break;
01250
01251                     case TestList.HiddenThenVisibleTest:
01252                     case TestList.ParentHiddenThenVisibleTest:
01253                         expectedStringResult = "Left mouse button clicked.";
01254                         break;
01255
01256                     case TestList.DragDropIntoWebView2Test:
01257                         expectedStringResult = "Input on w2: Draggable Text";
01258                         break;
01259
01260                     default:
01261                         {
01262                             logger.LogError("Unexpected test type in VerifyWebMessageBasedTest(), got message: " + stringResult);
01263                             return;
01264                         }
01265                 }
01266
01267                 bool allWebMessagesReceived = true;
01268                 // Most tests just validate string equality - do that here.
01269                 // Tests doing other validation would do it elsewhere (leaving expectedStringResult/expectedJsonResult empty).
01270                 if (expectedStringResult != string.Empty)
01271                 {
01272                     logger.Verify((expectedStringResult == stringResult),
01273                                     string.Format("Test {0}: Expected string text {1} did not match with sampled string text {2}",
01274                                                 selectedTest.ToString(), expectedStringResult, stringResult));
01275                     allWebMessagesReceived = allWebMessagesReceived && (expectedStringResult == stringResult);
01276                 }
01277
01278                 if (expectedJsonResult != string.Empty)
01279                 {
01280                     logger.Verify((expectedJsonResult == jsonResult),
01281                                     string.Format("Test {0}: Expected Json result {1} did not match with sampled Json result {2}",
01282                                                     selectedTest.ToString(), expectedJsonResult, jsonResult));
01283                     allWebMessagesReceived = allWebMessagesReceived && (expectedJsonResult == jsonResult);
01284                 }
01285
01286                 // Explicitly check a box to show that the web message was received. CompleteCurrentTest() also logs
01287                 // its pass/fail to the same place, so sometimes we can get false positives here if we're relying
01288                 // on that method to do work before the web message is sent.
01289                 if (allWebMessagesReceived)
01290                 {
01291                     var messageReceivedBox = FindName("MessageReceived") as CheckBox;
01292                     messageReceivedBox.IsChecked = true;
01293                 }
01294             }
01295         }
01296
01297         // Apply appropriate verification based on test ID
01298         async public void CompleteCurrentTest(object sender, RoutedEventArgs args)
01299         {
01300             var MyWebView2 = FindName("MyWebView2") as WebView2;
01301             TestList selectedTest = (TestList)Enum.Parse(typeof(TestList), TestNameComboBox.GetSelectedText());
01302             using (var logger = new ResultsLogger(selectedTest.ToString(), TestResult))
01303             {
01304
01305                 switch (selectedTest)
01306                 {
01307
01308                     case TestList.NavigationErrorTest:
01309                         {
01310                             var task = MyWebView2.GetNavigationCompletedTask();
01311                             MyWebView2.Source = new Uri("http://www.test.invalid");
01312                             await task;
01313
01314                             var testStatus = Status2.Text;
01315                             bool result = testStatus.Equals("HostNameNotResolved");
01316                             logger.Verify(result,
01317                                           string.Format("Test {0}: Expected web error status {1} did not match with received error status {2}",
01318                                                         selectedTest, "HostNameNotResolved", testStatus));
01319                         }
01320                         break;
01321
01322                     case TestList.ExecuteScriptTest:
01323                         {
01324                             string expectedResult = "1000";
01325                             string result = await MyWebView2.ExecuteScriptAsync("timer();"); // calling timer function which takes >1s to complete
01326                             logger.Verify(result == expectedResult,
01327                                           string.Format("Test {0}: Expected result {1} did not match with returned result {2}",
01328                                                         selectedTest, expectedResult.ToString(), result));
01329                         }
01330                         break;
01331
01332                     case TestList.MultipleWebviews_BasicRenderingTest:
01333                         {
01334                             // Clear any other message that may be there
01335                             Status2.Text = string.Empty;
01336                             // wait for the other webviews to complete navigation before testing
01337                             var tasks = new List<Task>();
01338                             foreach (var unit in WebView2Collection.Children)
01339                             {
01340                                 var webviewStackPanel = unit as StackPanel;
01341                                 Debug.Assert(webviewStackPanel != null);
01342                                 string stackPanelName = webviewStackPanel.Name;
01343                                 string webviewName = stackPanelName.Replace("StackPanel", ""); // as per convention, stackpanel name is foowebviewStackPanel
01344                                 var webview = FindName(webviewName) as WebView2;
01345                                 Debug.Assert(webview != null);
01346                                 tasks.Add(webview.GetNavigationCompletedTask());
01347
01348                                 WebView2Common.LoadWebPage(webview, TestPageNames[0]);
01349                                 var parentOfWebview = webview.Parent as Border;
01350                                 parentOfWebview.Height = 100;
01351                                 parentOfWebview.UpdateLayout();
01352                             }
01353                             await Task.WhenAll(tasks);
01354                         }
01355                         break;
01356
01357                     case TestList.MultipleWebviews_LanguageTest:
01358                         {
01359                             var tasks = new List<Task>();
01360
01361                             var wv1_name = "MyWebView2";
01362                             var wv1 = FindName(wv1_name) as WebView2;
01363                             tasks.Add(wv1.GetNavigationCompletedTask());
01364                             var wv2_name = "MyWebView2B";
01365                             var wv2 = FindName(wv2_name) as WebView2;
01366                             tasks.Add(wv2.GetNavigationCompletedTask());
01367
01368                             wv1.Reload();
01369                             wv2.Reload();
01370                             await Task.WhenAll(tasks);
01371
01372                             string wv1_expectedLanguage = "\"zh-CN\"";
01373                             string wv1_language = await wv1.ExecuteScriptAsync("getLanguage();");
01374                             logger.Verify((wv1_language == wv1_expectedLanguage),
01375                                           string.Format("Test {0}: {1} Language {2} did not match expected value {3}",
01376                                                          selectedTest.ToString(), wv1_name, wv1_language, wv1_expectedLanguage));
01377
01378                             // TODO_WebView2: When we expose API to set custom UserData, update the 2nd WebView to use a different language
01379                             //                (same UserData implies same browser instance and therefore requires same Language)
01380
01381                             string wv2_expectedLanguage = "\"zh-CN\"";
01382                             string wv2_language = await wv2.ExecuteScriptAsync("getLanguage();");
01383                             logger.Verify((wv2_language == wv2_expectedLanguage),
01384                                           string.Format("Test {0}: {1} Language {2} did not match expected value {3}",
01385                                                          selectedTest.ToString(), wv2_name, wv2_language, wv2_expectedLanguage));
01386                         }
01387                         break;
01388
01389                     case TestList.BasicKeyboardTest:
01390                         {
01391                             string expectedText = "Hello 123 Worm";
01392                             string textResult = CopyPasteTextBox2.Text;
01393                             logger.Verify((textResult == expectedText),
01394                                           string.Format("Test {0}: Expected text {1} did not match with sampled text {2}.",
01395                                                         selectedTest.ToString(), expectedText, textResult));
01396                         }
01397                         break;
01398
01399                     case TestList.MouseCaptureTest:
01400                         {
01401                             string textResult = CopyPasteTextBox2.Text;
01402                             string expectedResult = "MouseCaptureResult";
01403                             logger.Verify((textResult == expectedResult),
01404                                            string.Format("Test {0}: Expected text {1} did not match with sampled text {2}",
01405                                                          selectedTest.ToString(), expectedResult, textResult));
01406                         }
01407                         break;
01408
01409                     case TestList.ReloadTest:
01410                         {
01411                             Uri prevUri = MyWebView2.Source;
01412                             await MyWebView2.ExecuteScriptAsync("document.getElementById(\"w1\").value='injectedText';");
01413                             var task = MyWebView2.GetNavigationCompletedTask();
01414                             MyWebView2.Reload();
01415                             await task;
01416                             string finalTextContent = await MyWebView2.ExecuteScriptAsync("document.getElementById(\"w1\").value;");
01417                             logger.Verify((finalTextContent == "\"\""),
01418                                           string.Format("Test {0}: TextBox value was not cleared (\"\"), value: {1}",
01419                                                         selectedTest.ToString(), finalTextContent));
01420                             Uri newUri = MyWebView2.Source;
01421                             logger.Verify((prevUri.ToString() == newUri.ToString()),
01422                                           string.Format("Test {0}: Previous Uri {1} did not match the post-reload Uri {2}",
01423                                                         selectedTest.ToString(), prevUri.ToString(), newUri.ToString()));
01424                         }
01425                         break;
01426
01427                     case TestList.NavigateToStringTest:
01428                         {
01429                             var task = MyWebView2.GetNavigationCompletedTask();
01430                             WebView2Common.NavigateToStringMessage(MyWebView2);
01431                             await task;
01432
01433                             string expectedText = "\"You've navigated to a string message.\"";
01434                             string textResult = await MyWebView2.ExecuteScriptAsync("document.body.textContent;");
01435                             logger.Verify((expectedText == textResult),
01436                                           string.Format("Test {0}: Expected content: {1} did not match with sampled content: {2}",
01437                                                          selectedTest.ToString(), expectedText, textResult));
01438                             string expectedSourceUri = "about:blank";
01439                             string sourceUri = MyWebView2.Source.ToString();
01440                             logger.Verify((expectedText == textResult) && (expectedSourceUri == sourceUri),
01441                                           string.Format("Test {0}: Expected Uri: {1} did not match with sampled Uri: {2}",
01442                                                         selectedTest.ToString(), expectedSourceUri, sourceUri));
01443                         }
01444                         break;
01445
01446                     case TestList.SourceBindingTest:
01447                         {
01448                             string expectedInitialUri = WebView2Common.GetTestPageUri("SimplePage.html").ToString();
01449                             var ActualUriTextBlock = FindName("ActualUriTextBlock") as TextBlock;
01450                             string initialActualSourceUri = ActualUriTextBlock.Text;
01451                             logger.Verify(AreEqualIgnoringSpace(expectedInitialUri, initialActualSourceUri),
01452                                           string.Format("Test {0}: Expected source bound text, {1}, did not match actual text binding {2}",
01453                                                        selectedTest.ToString(), expectedInitialUri, initialActualSourceUri));
01454                             var task = MyWebView2.GetNavigationCompletedTask();
01455                             _ = MyWebView2.ExecuteScriptAsync("navigateToTextPage();");
01456                             // Confirm that navigation to SimplePageWithText.html occurred,
01457                             // meaning SimplePage intermediate was correctly loaded from textbox.
01458                             string expectedFinalSourceUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
01459                             await task;
01460                             string finalActualSourceUri = ActualUriTextBlock.Text;
01461                             logger.Verify(AreEqualIgnoringSpace(finalActualSourceUri, expectedFinalSourceUri),
01462                                           string.Format("Test {0}: Expected navigate to bound uri text {1} failed with current uri {2}",
01463                                                         selectedTest.ToString(), expectedFinalSourceUri, finalActualSourceUri));
01464                         }
01465                         break;
01466
01467                     case TestList.GoBackAndForwardTest:
01468                         {
01469                             var goBackButton = FindName("GoBackButton") as Button;
01470                             var goForwardButton = FindName("GoForwardButton") as Button;
01471                             bool canGoBackBindingVerify = !goBackButton.IsEnabled; // Verify both buttons are initially disabled
01472                             bool canGoForwardBindingVerify = !goForwardButton.IsEnabled;
01473                             ActualUriTextBlock = FindName("ActualUriTextBlock") as TextBlock;
01474
01475                             // Part 1: [SimplePage.html] calls  navigateToTextPage() -> Navigates to [SimplePageWithText.html].
01476                             //         Ensure we are at the right URI (via  ActualUriTextBlock)
01477                             //         Scope task to make sure we unsubscribe from NavigationStarting before starting Part 2.
01478                             {
01479                                 var task = MyWebView2.GetNavigationCompletedTask();
01480                                 _ = MyWebView2.ExecuteScriptAsync("navigateToTextPage();");
01481                                 await task;
01482                                 var expectedInitialUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
01483                                 var initialActualSourceUri = ActualUriTextBlock.Text;
01484                                 logger.Verify(AreEqualIgnoringSpace(expectedInitialUri, initialActualSourceUri),
01485                                               string.Format("\nTest {0}: Failed, Expected initial Uri {1} did not match actual Uri {2}",
01486                                                             selectedTest, expectedInitialUri, initialActualSourceUri));
01487                             }
01488
01489                             // Part 2: Use GoBack to navigate back. Ensure we are back at [SimplePage.html].
01490                             {
01491                                 canGoBackBindingVerify = canGoBackBindingVerify && goBackButton.IsEnabled; // Should both be true now
01492                                 logger.Verify(canGoBackBindingVerify,
01493                                               string.Format("\nTest {0}: Failed, canGoBackBindingVerify failed {1}",
01494                                                             selectedTest, canGoBackBindingVerify));
01495                                 var task = MyWebView2.GetNavigationCompletedTask();
01496                                 MyWebView2.GoBack();
01497                                 string expectedSecondSourceUri = WebView2Common.GetTestPageUri("SimplePage.html").ToString();
01498                                 await task;
01499                                 string actualSecondSourceUri = ActualUriTextBlock.Text;
01500                                 logger.Verify(AreEqualIgnoringSpace(expectedSecondSourceUri, actualSecondSourceUri),
01501                                               string.Format("\nTest {0}: Failed, Expected intermediate Uri {1} did not match actual Uri {2}",
01502                                                             selectedTest, expectedSecondSourceUri, actualSecondSourceUri));
01503                             }
01504
01505                             // Part 3: Use GoForward to navigate forward. Ensure we are back at [SimplePageWithText.html"].
01506                             {
01507                                 canGoForwardBindingVerify = canGoForwardBindingVerify && goForwardButton.IsEnabled; // Should both be true now
01508                                 logger.Verify(canGoForwardBindingVerify,
01509                                               string.Format("\nTest {0}: Failed, canGoForwardBindingVerify failed {1}",
01510                                                             selectedTest, canGoForwardBindingVerify));
01511                                 var task = MyWebView2.GetNavigationCompletedTask();
01512                                 MyWebView2.GoForward();
01513                                 string expectedFinalSourceUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
01514                                 await task;
01515                                 string actualFinalSourceUri = ActualUriTextBlock.Text;
01516                                 logger.Verify(AreEqualIgnoringSpace(expectedFinalSourceUri, actualFinalSourceUri),
01517                                             string.Format("\nTest {0}: Failed, Expected final Uri {1} did not match actual Uri {2}",
01518                                                             selectedTest, expectedFinalSourceUri, actualFinalSourceUri));
01519                             }
01520                         }
01521                         break;
01522
01523                     case TestList.NavigationStartingTest:
01524                         {
01525                             // Part 1: [SimplePage.html] calls navigateToTextPage() -> Navigates to [SimplePageWithText.html].
01526                             //         Ensure we get expected NavigationStarting event/args.
01527                             var startTask = MyWebView2.GetNavigationStartingTask();
01528                             _ = MyWebView2.ExecuteScriptAsync("navigateToTextPage();");
01529                             await startTask;
01530                             string startingStatus = Status1.Text;
01531                             string expectedStatus = "MyWebView2 navigation starting...";
01532                             logger.Verify((startingStatus == expectedStatus),
01533                                             string.Format("Test {0}: Failed, Expected navigation status: {1} did not match actual navigation status: {2}",
01534                                                         selectedTest, expectedStatus, startingStatus));
01535                             string navigationStartingUri = Status3.Text;
01536                             string expectedUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
01537                             logger.Verify(AreEqualIgnoringSpace(navigationStartingUri, expectedUri),
01538                                             string.Format("Test {0}: Failed, Expected NavigationStarting Uri {1} did not match actual NavigationStarting Uri {2}",
01539                                                         selectedTest, expectedUri, navigationStartingUri));
01540                             logger.Verify(_isUserInitiated,
01541                                             string.Format("Test {0}: Failed, NavigationStartingArgs.IsUserInitiated value: {1}, did not match expected value: true",
01542                                                         selectedTest, _isUserInitiated.ToString()));
01543                             logger.Verify(!_isRedirected,
01544                                             string.Format("Test {0}: Failed, NavigationStartingArgs.IsRedirected value: {1}, did not match expected value: false",
01545                                                         selectedTest, _isRedirected.ToString()));
01546                         }
01547                         break;
01548
01549                     case TestList.NavigationStartingInvalidTest:
01550                         {
01551                             // Part 2: [SimplePage.html] navigates to http://www.blockedbynavigationstarting.invalid -> navigation cancelled via OnNavigationStarting.
01552                             //         Ensure we are still on [SimplePage.html] at end.
01553                             var startTask2 = MyWebView2.GetNavigationStartingTask();
01554                             _ = MyWebView2.ExecuteScriptAsync("navigateToInvalidPage();");
01555                             await startTask2;
01556
01557                             string navigationStartingUri = Status3.Text;
01558                             string expectedUri = WebView2Common.GetTestPageUri("SimplePageWithText.html").ToString();
01559                             logger.Verify(AreEqualIgnoringSpace(navigationStartingUri, expectedUri),
01560                                         string.Format("Test {0}: Failed, Expected NavigationStarting Uri {1} did not match actual NavigationStarting Uri {2}",
01561                                                         selectedTest, expectedUri, navigationStartingUri));
01562                         }
01563                         break;
01564
01565                     case TestList.ResizeTest:
01566                         {
01567                             // Clear any previous resize message from when we created the webview
01568                             Status2.Text = string.Empty;
01569
01570                             MyWebView2.Width = MyWebView2.ActualWidth / 2;
01571                             MyWebView2.Height = MyWebView2.ActualHeight / 2;
01572                             MyWebView2.UpdateLayout();
01573                         }
01574                         break;
01575
01576                     case TestList.MoveTest:
01577                         {
01578                             var yPos1 = await MyWebView2.ExecuteScriptAsync("getWindowYPosition();");
01579
01580                             var tcs = new TaskCompletionSource<bool>();
01581                             Task renderedTask = tcs.Task;
01582                             EventHandler<RenderedEventArgs> renderedHandler = null;
01583                             renderedHandler += (sender, args) =>
01584                             {
01585                                 CompositionTarget.Rendered -= renderedHandler;
01586                                 tcs.SetResult(true);
01587                             };
01588                             CompositionTarget.Rendered += renderedHandler;
01589
01590                             var panel = FindName("WebView2Collection") as StackPanel;
01591                             Thickness margin = panel.Margin;
01592                             margin.Top = margin.Top += 100;
01593                             panel.Margin = margin;
01594                             panel.UpdateLayout();
01595
01596                             await renderedTask;
01597
01598                             var yPos2 = await MyWebView2.ExecuteScriptAsync("getWindowYPosition();");
01599                             logger.Verify((yPos1 != yPos2),
01600                                           string.Format("Test {0} Part 1: Failed, Expected MyWebView2 to move",
01601                                                         selectedTest));
01602
01603                             var xPos = await MyWebView2.ExecuteScriptAsync("getWindowXPosition();");
01604                             // Get the point at the top-left of the TestPage panel, relative to the webview
01605                             // Expected screenPoint value: (-22, -400)
01606                             GeneralTransform gt = TransformToVisual(MyWebView2);
01607                             Point screenPoint = gt.TransformPoint(new Point(0,0));
01608                             double expectedX = screenPoint.X * -1;
01609                             // This offset accounts for the elements above the webview on the page--
01610                             // specifically TestPage panel, which has its top at 60px, and the title bar.
01611                             // This offset is also valid only when the MUXC test app window is in the top left corner of the main monitor display.
01612                             // Otherwise, the test will fail.
01613                             int offset = 60;
01614                             double expectedY = screenPoint.Y * -1 + offset;
01615
01616                             logger.Verify((xPos == expectedX.ToString()),
01617                                           string.Format("Test {0} Part 2: Failed, Expected MyWebView2 xPosition to be {1}, Actual: {2}",
01618                                                         selectedTest, expectedX.ToString(), xPos.ToString()));
01619                             logger.Verify((yPos2 == expectedY.ToString()),
01620                                           string.Format("Test {0} Part 3: Failed, Expected MyWebView2 yPosition to be {1}, Actual: {2}",
01621                                                         selectedTest, expectedY.ToString(), yPos2.ToString()));
01622
01623                             var width = await MyWebView2.ExecuteScriptAsync("getWindowWidth();");
01624                             var height = await MyWebView2.ExecuteScriptAsync("getWindowHeight();");
01625                             logger.Verify((width == MyWebView2.ActualWidth.ToString()),
01626                                           string.Format("Test {0} Part 4: Failed, Expected MyWebView2 width to be {1}, Actual: {2}",
01627                                                         selectedTest, MyWebView2.ActualWidth.ToString(), width.ToString()));
01628                             logger.Verify((height == MyWebView2.ActualHeight.ToString()),
01629                                           string.Format("Test {0} Part 5: Failed, Expected MyWebView2 height to be {1}, Actual: {2}",
01630                                                         selectedTest, MyWebView2.ActualHeight.ToString(), height.ToString()));
01631                         }
01632                         break;
01633
01634                     case TestList.ReparentElementTest:
01635                         {
01636                             // Pull the webview out of its border
01637                             var parentOfWebview = MyWebView2.Parent as Border;
01638                             parentOfWebview.Child = null;
01639
01640                             // Make the old location smaller so we can see the webview in its new
01641                             // position even on a small screen
01642                             parentOfWebview.Height = 10;
01643
01644                             // Put the Webview inside a new border in WebView2Collection
01645                             MoveWebViewControl("MyWebView2", MyWebView2);
01646                         }
01647                         break;
01648
01649                     case TestList.SourceBeforeLoadTest:
01650                         {
01651                             // TODO_WebView2: This test should validate rendering
01652                             logger.Verify((MyWebView2.Source != null),
01653                                 string.Format("Test {0}: Failed, Expected MyWebView2.Source to be {1}",
01654                                     selectedTest, WebView2Common.GetTestPageUri("SimplePageWithButton.html").ToString()));
01655                         }
01656                         break;
01657
01658                     case TestList.VisibilityHiddenTest:
01659                         {
01660                             MyWebView2.Visibility = Visibility.Collapsed;
01661                         }
01662                         break;
01663
01664                     case TestList.VisibilityTurnedOnTest:
01665                         {
01666                             // Show the ancestor that was previously hidden
01667                             MyWebView2.Visibility = Visibility.Visible;
01668                         }
01669                         break;
01670
01671                     case TestList.ParentVisibilityHiddenTest:
01672                         {
01673                             // Hide the parent border
01674                             var testContentsBorder = FindName("TestContentsBorder") as Border;
01675                             testContentsBorder.Visibility = Visibility.Collapsed;
01676                         }
01677                         break;
01678
01679                     case TestList.ParentVisibilityTurnedOnTest:
01680                         {
01681                             // Show the ancestor that was previously hidden
01682                             var testContentsBorder = FindName("TestContentsBorder") as Border;
01683                             testContentsBorder.Visibility = Visibility.Visible;
01684                         }
01685                         break;
01686
01687                     case TestList.QueryCoreWebView2BasicTest:
01688                         {
01689                             // First load test's default webpage SimplePage.html
01690                             var navCompletedTask1 = MyWebView2.GetNavigationCompletedTask();
01691                             WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
01692                             await navCompletedTask1;
01693
01694                             // Validate CoreWebView2.DocumentTitle
01695                             string expectedTitle1 = "Simple Page";
01696                             string actualTitle1 = GetDocumentTitle(MyWebView2);
01697                             logger.Verify((expectedTitle1 == actualTitle1),
01698                                           string.Format("Part 1: Expected WV2.CWV2.DocumentTitle: {0}, actual: {1}",
01699                                                          expectedTitle1, actualTitle1));
01700
01701                             // Load a different page
01702                             var navCompletedTask2 = MyWebView2.GetNavigationCompletedTask();
01703                             WebView2Common.LoadWebPage(MyWebView2, TestPageNames[1]);
01704                             await navCompletedTask2;
01705
01706                             string expectedTitle2 = "Simple Page With Button";
01707                             string actualTitle2 = GetDocumentTitle(MyWebView2);
01708                             logger.Verify((expectedTitle2 == actualTitle2),
01709                                           string.Format("Part 2: Expected WV2.CWV2.DocumentTitle: {0}, actual: {1}",
01710                                                          expectedTitle2, actualTitle2));
01711
01712                             // Close() WebView2 - CWV2 should be shutdown + reference cleared
01713                             MyWebView2.Close();
01714                             string expectedTitle3 = string.Empty;
01715                             string actualTitle3 = GetDocumentTitle(MyWebView2);
01716                             logger.Verify((expectedTitle3 == actualTitle3),
01717                                           string.Format("Part 3: Expected WV2.CWV2.DocumentTitle: {0}, actual: {1}",
01718                                                          expectedTitle3, actualTitle3));
01719                         }
01720                         break;
01721
01722                     case TestList.CursorUpdateTest:
01723                     case TestList.CursorClickUpdateTest:
01724                         {
01725                             WebView2WithCursor webviewWithCursor = MyWebView2 as WebView2WithCursor;
01726                             Microsoft.UI.Input.InputCursor cursor = webviewWithCursor.WrappedProtectedCursor;
01727                             logger.Verify(cursor != null, "ProtectedCursor was null");
01728                             if (cursor == null) break;
01729                             Microsoft.UI.Input.InputSystemCursor cursorAsInputSystemCursor = cursor.As<Microsoft.UI.Input.InputSystemCursor>();
01730                             var actualCursorType = cursorAsInputSystemCursor.CursorShape;
01731                             var expectedCursorType = Microsoft.UI.Input.InputSystemCursorShape.Hand;
01732                             logger.Verify((expectedCursorType == actualCursorType),
01733                                           string.Format("Expected cursor type ({0}) did not match actual: {1}",
01734                                                         expectedCursorType, actualCursorType));
01735                         }
01736                         break;
01737
01738                     case TestList.CoreWebView2InitializedTest:
01739                         {
01740                             // First load test's default webpage SimplePage.html
01741                             var tasks = new List<Task>();
01742                             var initializedTask = MyWebView2.GetCoreWebView2InitializedTask();
01743                             tasks.Add(MyWebView2.GetNavigationCompletedTask());
01744                             tasks.Add(initializedTask);
01745
01746                             WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
01747                             await Task.WhenAll(tasks);
01748
01749                             CoreWebView2InitializedEventArgs eventArgs = initializedTask.Result;
01750                             bool isExceptionNull = (eventArgs.Exception == null);
01751
01752                             logger.Verify(isExceptionNull,
01753                                           string.Format("Expected CoreWV2InitializedEventArgs.Exception to be null, actual: {0}",
01754                                                          eventArgs.Exception));
01755                         }
01756                         break;
01757
01758                     case TestList.CoreWebView2Initialized_FailedTest:
01759                         {
01760                             // Try to load test's default webpage SimplePage.html
01761                             // This should fail since we uninstalled WebView2Runtime
01762                             var tasks = new List<Task>();
01763                             var initializedTask = MyWebView2.GetCoreWebView2InitializedTask();
01764
01765                             WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
01766                             await initializedTask;
01767
01768                             CoreWebView2InitializedEventArgs eventArgs = initializedTask.Result;
01769                             bool exceptionFired = (eventArgs.Exception != null);
01770
01771                             logger.Verify(exceptionFired,
01772                                           string.Format("Expected CoreWV2InitializedEventArgs.Exception to fire"));
01773                         }
01774                         break;
01775
01776                     case TestList.WindowlessPopupTest:
01777                         {
01778                             var popWebView2 = FindName("popWebView2") as WebView2;
01779                             var navCompletedTask = popWebView2.GetNavigationCompletedTask();
01780                             WebView2Common.LoadWebPage(popWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
01781                             await navCompletedTask;
01782                         }
01783                         break;
01784
01785                     case TestList.HostNameToFolderMappingTest:
01786                         {
01787                             var task = MyWebView2.GetNavigationCompletedTask();
01788                             var core_wv2 = MyWebView2.CoreWebView2;
01789                             if (core_wv2 != null)
01790                             {
01791                                 core_wv2.SetVirtualHostNameToFolderMapping(
01792                                     "testapp.example", "assets",
01793                                     Microsoft.Web.WebView2.Core.CoreWebView2HostResourceAccessKind.Allow);
01794                             }
01795
01796                             string uriString = "https://testapp.example/SimplePageWithButton.html";
01797                             WebView2Common.NavigateToUri(MyWebView2, uriString);
01798                             await task;
01799                         }
01800                         break;
01801
01802                     case TestList.NavigateToVideoTest:
01803                         {
01804                             var task = MyWebView2.GetNavigationCompletedTask();
01805                             NavigateToVideo(MyWebView2);
01806                             await task;
01807
01808                             string expectedSourceUri = "https://appassets.example/CastingVideo.mp4";
01809                             string sourceUri = MyWebView2.Source.ToString(); // Actually expecting "https://appassets.example/CastingVideo.mp4 []"
01810                             logger.Verify(sourceUri.StartsWith(expectedSourceUri),
01811                                           string.Format("Test {0}: Expected Uri: {1} did not match with sampled Uri: {2}",
01812                                                         selectedTest.ToString(), expectedSourceUri, sourceUri));
01813                         }
01814                         break;
01815
01816                     case TestList.NavigateToLocalImageTest:
01817                         {
01818                             var task = MyWebView2.GetNavigationCompletedTask();
01819                             var core_wv2 = MyWebView2.CoreWebView2;
01820                             if (core_wv2 != null)
01821                             {
01822                                 core_wv2.SetVirtualHostNameToFolderMapping(
01823                                     "testapp.example", "assets",
01824                                     Microsoft.Web.WebView2.Core.CoreWebView2HostResourceAccessKind.Allow);
01825                             }
01826
01827                             string uriString = "https://testapp.example/SimplePageWithImage.html";
01828                             WebView2Common.NavigateToUri(MyWebView2, uriString);
01829                             await task;
01830                         }
01831                         break;
01832
01833                     case TestList.ScaledTouchTest:
01834                         {
01835                             MyWebView2.RenderTransformOrigin = new Windows.Foundation.Point(0, 0);
01836                             var scaleTransform = new ScaleTransform { ScaleX = 1.2, ScaleY = 1.2 };
01837                             TransformGroup transformGroup = new TransformGroup();
01838                             transformGroup.Children.Add(scaleTransform);
01839                             MyWebView2.RenderTransform = transformGroup;
01840                         }
01841                         break;
01842
01843                     case TestList.CloseThenDPIChangeTest:
01844                         {
01845                             MyWebView2.Close();
01846                         }
01847                         break;
01848
01849                     case TestList.AddHostObjectToScriptTest:
01850                         {
01851                             var core_wv2 = MyWebView2.CoreWebView2;
01852                             logger.Verify(core_wv2 != null, string.Format(
01853                                 "Test {0}: CoreWebView2 was null.", selectedTest.ToString()));
01854
01855                             bool winrtNotImpl = false;
01856                             try
01857                             {
01858                                 core_wv2.AddHostObjectToScript("bridge", new Bridge());
01859                                 core_wv2.RemoveHostObjectFromScript("bridge");
01860                             }
01861                             catch (NotImplementedException)
01862                             {
01863                                 // WinRT version of AddHostObjectToScript is not implemented yet,
01864                                 // expect a NotImplementedException for now
01865                                 winrtNotImpl = true;
01866                             }
01867                             logger.Verify(winrtNotImpl == true, string.Format(
01868                                 "Test {0}: Expected NotImplementedException but did not receive it.", selectedTest.ToString()));
01869
01870                             // There is a interop we can use to access the method
01871                             var interop = core_wv2.As<ICoreWebView2Interop>();
01872                             try
01873                             {
01874                                 interop.AddHostObjectToScript("bridge", new Bridge());
01875
01876                                 // AddHostObjectToScript represents the host objects in JavaScript using JavaScript async proxies.
01877                                 // Accessing any member off of the proxy gives back a promise for another async proxy. You need to
01878                                 // await a proxy to get to an actual value. The async proxies have no knowledge of the members of
01879                                 // the actual host object, so JSON.toString on an async proxy won’t tell you anything interesting
01880                                 // because the async proxy doesn’t know it has a property named Property. When you do bridge.Property
01881                                 // you immediately get back an async proxy representing the result of doing a property get on ‘Property’
01882                                 // on that object and a message is sent off to the host process to find that value, but that async proxy
01883                                 // may resolve to an exception if there isn’t actually a property named Property on the actual host object.
01884                                 string result = await MyWebView2.ExecuteScriptAsync(
01885                                     "(async function() { " +
01886                                         "let result = await window.chrome.webview.hostObjects.bridge.AnotherObject.Prop; " +
01887                                         "window.chrome.webview.postMessage(result); })();");
01888                                 // Listen for WebMessageReceived
01889
01890                                 core_wv2.RemoveHostObjectFromScript("bridge");
01891                             }
01892                             catch (Exception e)
01893                             {
01894                                 logger.Verify(false, string.Format("Test {0}: Unexpected exception: {1}",
01895                                     selectedTest.ToString(), e.ToString()));
01896                             }
01897                         }
01898                         break;
01899
01900                     case TestList.UserAgentTest:
01901                         {
01902                             var userAgent = string.Empty;
01903                             var core_wv2 = MyWebView2.CoreWebView2;
01904                             if (core_wv2 == null)
01905                             {
01906                                 logger.LogError(string.Format("Test {0}: Couldn't get CoreWebView2 object", selectedTest.ToString()));
01907                                 break;
01908                             }
01909
01910                             var core_wv2_settings = core_wv2.Settings;
01911                             if (core_wv2_settings == null)
01912                             {
01913                                 logger.LogError(string.Format("Test {0}: Couldn't get CoreWebView2Settings object", selectedTest.ToString()));
01914                                 break;
01915                             }
01916
01917                             userAgent = core_wv2_settings.UserAgent;
01918
01919                             // The "Edg" token identifies the Chromium Edge browser
01920                             // For more information, see https://docs.microsoft.com/en-us/microsoft-edge/web-platform/user-agent-guidance
01921                             logger.Verify(userAgent.Contains("Edg"),
01922                                 string.Format("Test {0}: Expected a valid UserAgent, got {1}", selectedTest.ToString(), userAgent));
01923                         }
01924                         break;
01925
01926                     case TestList.KeyboardAcceleratorTest:
01927                         {
01928                             logger.Verify(Status2.Text != "F5",
01929                                 string.Format("Test {0}: Typing 't' should not have invoked an F5 handler",
01930                                     selectedTest.ToString()));
01931                         }
01932                         break;
01933
01934                     case TestList.OffTreeWebViewInputTest:
01935                         {
01936                             // Create a new webview
01937                             ApplicationTheme appTheme = Application.Current.RequestedTheme;
01938                             Color backgroundColor = (appTheme == ApplicationTheme.Light) ? Colors.White : Colors.Black;
01939                             var webView2 = new WebView2() {
01940                                 Name = "MyWebView2",
01941                                 Margin = new Thickness(8, 8, 8, 8),
01942                                 DefaultBackgroundColor = backgroundColor
01943                             };
01944                             AutomationProperties.SetName(webView2, "MyWebView2");
01945                             AddWebViewEventHandlers(webView2);
01946
01947                             // Ensure the webview before we add it to the tree
01948                             var task = webView2.EnsureCoreWebView2Async();
01949                             await task;
01950
01951                             // Navigate
01952                             var navCompletedTask = webView2.GetNavigationCompletedTask();
01953                             WebView2Common.LoadWebPage(webView2, TestPageNames[TestInfoDictionary[selectedTest]]);
01954                             await navCompletedTask;
01955
01956                             // Add the webview to the tree so we can see it
01957                             var border = FindName("MyWebView2Border") as Border;
01958                             border.Child = webView2;
01959                         }
01960                         break;
01961
01962                     case TestList.HtmlDropdownTest:
01963                         {
01964                             var selctedOption = await MyWebView2.ExecuteScriptAsync("getSelectedOption();");
01965                             logger.Verify(selctedOption.Equals("\"2\""),
01966                                 string.Format("Test {0} Failed, Expected option \"2\" to be selcted, actually got {1}",
01967                                     selectedTest, selctedOption));
01968                         }
01969                         break;
01970
01971                     case TestList.HiddenThenVisibleTest:
01972                         {
01973                             logger.Verify(MyWebView2.Visibility == Visibility.Collapsed,
01974                                  string.Format("Test {0}: Incorrect setup, Expected MyWebView2.Visibility to be Collapsed, was {1}",
01975                                     selectedTest, MyWebView2.Visibility));
01976
01977                             // Make WebView2 visible
01978                             MyWebView2.Visibility = Visibility.Visible;
01979
01980                             logger.Verify(MyWebView2.IsHitTestVisible,
01981                                  string.Format("Test {0}: Failed, Expected MyWebView2.IsHitTestVisible to be true, was {1}",
01982                                     selectedTest, MyWebView2.IsHitTestVisible));
01983                         }
01984                         break;
01985
01986                     case TestList.ParentHiddenThenVisibleTest:
01987                         {
01988                             var parentBorder = MyWebView2.Parent as Border;
01989
01990                             logger.Verify(parentBorder.Visibility == Visibility.Collapsed,
01991                                  string.Format("Test {0}: Incorrect setup, Expected parentBorder.Visibility to be Collapsed, was {1}",
01992                                     selectedTest, parentBorder.Visibility));
01993
01994                             // Make WebView2's parent Border visible
01995                             parentBorder.Visibility = Visibility.Visible;
01996
01997                             logger.Verify(MyWebView2.IsHitTestVisible,
01998                                  string.Format("Test {0}: Failed, Expected MyWebView2.IsHitTestVisible to be true, was {1}",
01999                                     selectedTest, MyWebView2.IsHitTestVisible));
02000                         }
02001                         break;
02002
02003                     case TestList.LifetimeTabTest:
02004                         {
02005                             MyWebView2.Close();
02006                         }
02007                         break;
02008
02009                     case TestList.CustomConfiguration_BasicTest:
02010                         {
02011                             // Create a custom environment
02012                             var exePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
02013                             var userDataFolder = exePath + ".CustomUDF";
02014
02015                             CoreWebView2EnvironmentOptions environmentOptions = new CoreWebView2EnvironmentOptions();
02016                             environmentOptions.Language = "zh-Hans";
02017
02018                             CoreWebView2Environment environment =
02019                                 await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
02020                                     String.Empty /* browserExecutableFolder */, userDataFolder, environmentOptions);
02021
02022                             // Create custom ControllerOptions
02023                             CoreWebView2ControllerOptions controllerOptions = environment.CreateCoreWebView2ControllerOptions();
02024                             controllerOptions.IsInPrivateModeEnabled = true;
02025
02026                             // Create the WebView2 using the custom Environment
02027                             await MyWebView2.EnsureCoreWebView2Async(environment, controllerOptions);
02028
02029                             var navCompletedTask = MyWebView2.GetNavigationCompletedTask();
02030                             WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02031                             await navCompletedTask;
02032
02033                             // Save the UDF path so we can delete it later
02034                             _customUserDataFolder = MyWebView2.CoreWebView2.Environment.UserDataFolder;
02035
02036                              // Check that the WebView2 has the language set by custom CoreWebView2EnvironmentOptions
02037                             //
02038                             // "zh-Hans" and "zh-CN" both represent simplified Chinese, but one may be preferred in some contexts.
02039                             // When "zh-Hans" is set via CWV2EnvironmentOptions, calling JS getLanugage() on WV2Runtime
02040                             // maps it to "zh-CN" on Win10, and keeps "zh-Hans" on Win11, so check for both possibilities.
02041                             string expectedLanguage = "\"zh-Hans\"";
02042                             string expectedLanguageAlternate = "\"zh-CN\"";
02043                             string expectedLanguageList = expectedLanguage + " OR " + expectedLanguageAlternate;
02044                             string actualLanguage = await MyWebView2.ExecuteScriptAsync("getLanguage();");
02045
02046                             logger.Verify((actualLanguage == expectedLanguage || actualLanguage == expectedLanguageAlternate),
02047                                           string.Format("Test {0}: Custom Environment's Language {1} did not match expected value in {2}",
02048                                                          selectedTest.ToString(), actualLanguage, expectedLanguageList));
02049                         }
02050                         break;
02051
02052                     case TestList.CustomConfiguration_EnsureAgainAfterDefaultTest:
02053                         {
02054                             // Ensure again after (automatic) Source-based creation
02055                             var navCompletedTask = MyWebView2.GetNavigationCompletedTask();
02056
02057                             // TEST 1: EnsureCoreWebView2Async() : <--- should succeed for any configuration
02058                             try
02059                             {
02060                                 LogHeader("TEST 1", "Ensure again with (), expecting: SUCCESS");
02061                                 await MyWebView2.EnsureCoreWebView2Async();
02062                                 WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02063                                 await navCompletedTask;
02064                                 LogSuccess("TEST 1");
02065                             }
02066                             catch (Exception e)
02067                             {
02068                                 LogFailure_Exception(logger, "TEST 1", e);
02069                             }
02070
02071                             // TEST 2: EnsureCoreWebView2Async(null) <--- should succeed for any configuration
02072                             try
02073                             {
02074                                LogHeader("TEST 2", "Ensure again with (null), expecting: SUCCESS");
02075                                await MyWebView2.EnsureCoreWebView2Async(null);
02076                                WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02077                                await navCompletedTask;
02078                                LogSuccess("TEST 2");
02079                             }
02080                             catch (Exception e)
02081                             {
02082                                LogFailure_Exception(logger, "TEST 2", e);
02083                             }
02084
02085                             // TEST 3: EnsureCoreWebView2Async(null, null) <--- should succeed for any configuration
02086                             try
02087                             {
02088                                LogHeader("TEST 3", "Ensure again with (null, null), expecting: SUCCESS");
02089                                await MyWebView2.EnsureCoreWebView2Async(null, null);
02090                                WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02091                                await navCompletedTask;
02092                                LogSuccess("TEST 3");
02093                             }
02094                             catch (Exception e)
02095                             {
02096                                LogFailure_Exception(logger, "TEST 3", e);
02097                             }
02098
02099                             CoreWebView2Environment DefaultEnvironment = MyWebView2.CoreWebView2.Environment;
02100
02101                             // TODO : Different CoreWebView2Environment instance is returned from CoreWebView2.Environment getter than
02102                             //        the one cached during implicit CoreWebView2 creation. Need to follow up with  Edge team on this.
02103                             //        Bug 48528478: WebView2: myWV2.EnsureCoreWebView2Async(myWV2.CoreWebView2.CoreWebView2Environment)
02104                             //                      unexpectedly fails on default-initialized WebView2
02105                             //
02106                             // // TEST  4: EnsureCoreWebView2Async(DefaultEnvironment) <--- should succeed (Default Environment & ControllerOptions)
02107                             // try
02108                             // {
02109                             //     LogHeader("TEST 4", "Ensure again with (DefaultEnvironment), expecting: SUCCESS");
02110                             //     await MyWebView2.EnsureCoreWebView2Async(DefaultEnvironment);
02111                             //     WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02112                             //     await navCompletedTask;
02113                             //     LogSuccess("TEST 4");
02114                             // }
02115                             // catch (Exception e)
02116                             // {
02117                             //     LogFailure_Exception(logger, "TEST 4", e);
02118                             // }
02119
02120                             // Create an equivalent custom environment to the default
02121                             CoreWebView2EnvironmentOptions environmentOptions = new CoreWebView2EnvironmentOptions();
02122                             CoreWebView2Environment EquivalentCustomEnvironment =
02123                                 await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
02124                                     String.Empty /* browserExecutableFolder */, String.Empty /* UserDataFolder */, environmentOptions);
02125
02126                             // Ensure Again Test 5: EnsureCoreWebView2Async(EquivalentCustomEnvironment) <--- should fail (different environment instance)
02127                             try
02128                             {
02129                                 _helpers.AppendMessage("[TEST 5] Ensure again with (EquivalentCustomEnvironment), expecting: ARGUMENT_EXCEPTION");
02130                                 await MyWebView2.EnsureCoreWebView2Async(EquivalentCustomEnvironment);
02131                                 LogFailure(logger, "[TEST 5]", "ArgumentException wasn't raised.");
02132                             }
02133                             catch (ArgumentException e)
02134                             {
02135                                if (e is ArgumentException)
02136                                {
02137                                     LogSuccess("TEST 5");
02138                                }
02139                                else
02140                                {
02141                                     LogFailure_Exception(logger, "TEST 5", e);
02142                                }
02143                             }
02144
02145                             CoreWebView2ControllerOptions EquivalentCustomOptions = DefaultEnvironment.CreateCoreWebView2ControllerOptions();
02146
02147                             // Ensure Again Test 6: EnsureCoreWebView2Async(DefaultEnvironment, EquivalentCustomOptions) <--- should fail (different options instance)
02148                             try
02149                             {
02150                                 _helpers.AppendMessage("[TEST 6] Ensure again with (DefaultEnvironment, EquivalentCustomOptions), expecting: ARGUMENT_EXCEPTION");
02151                                 await MyWebView2.EnsureCoreWebView2Async(DefaultEnvironment, EquivalentCustomOptions);
02152                                 LogFailure(logger, "[TEST 6]", "ArgumentException wasn't raised.");
02153                             }
02154                             catch (ArgumentException e)
02155                             {
02156                                if (e is ArgumentException)
02157                                {
02158                                     LogSuccess("TEST 6");
02159                                }
02160                                else
02161                                {
02162                                     LogFailure_Exception(logger, "TEST 6", e);
02163                                }
02164                             }
02165                         }
02166                         break;
02167
02168                     case TestList.CustomConfiguration_EnsureAgainAfterCustomTest:
02169                         {
02170                             // Create a custom environment
02171                             CoreWebView2EnvironmentOptions environmentOptions = new CoreWebView2EnvironmentOptions();
02172                             environmentOptions.Language = "zh-Hans";
02173
02174                             CoreWebView2Environment CustomEnvironment =
02175                                 await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
02176                                     String.Empty /* browserExecutableFolder */, String.Empty /* UserDataFolder */, environmentOptions);
02177
02178                             CoreWebView2ControllerOptions CustomOptions = CustomEnvironment.CreateCoreWebView2ControllerOptions();
02179                             CustomOptions.IsInPrivateModeEnabled = true;
02180
02181                             // Create the WebView2 using the custom environment and options: EnsureCoreWebView2Async(customEnvironment, customOptions);
02182                             _helpers.AppendMessage("[SETUP] Create WebView2 & initialize with (CustomEnvironment, CustomOptions)...");
02183                             await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment, CustomOptions);
02184                             var navCompletedTask = MyWebView2.GetNavigationCompletedTask();
02185                             WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02186                             await navCompletedTask;
02187
02188                             // TEST 1: EnsureCoreWebView2Async() : <--- should succeed for any configuration
02189                             try
02190                             {
02191                                 LogHeader("TEST 1", "Ensure again with (), expecting: SUCCESS");
02192                                 await MyWebView2.EnsureCoreWebView2Async();
02193                                 WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02194                                 await navCompletedTask;
02195                                 LogSuccess("TEST 1");
02196                             }
02197                             catch (Exception e)
02198                             {
02199                                 LogFailure_Exception(logger, "TEST 1", e);
02200                             }
02201
02202                             // TEST 2: EnsureCoreWebView2Async(null) <--- should succeed for any configuration
02203                             try
02204                             {
02205                                LogHeader("TEST 2", "Ensure again with (null), expecting: SUCCESS");
02206                                await MyWebView2.EnsureCoreWebView2Async(null);
02207                                WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02208                                await navCompletedTask;
02209                                LogSuccess("TEST 2");
02210                             }
02211                             catch (Exception e)
02212                             {
02213                                LogFailure_Exception(logger, "TEST 2", e);
02214                             }
02215
02216                             // TEST 3: EnsureCoreWebView2Async(null, null) <--- should succeed for any configuration
02217                             try
02218                             {
02219                                LogHeader("TEST 3", "Ensure again with (null, null), expecting: SUCCESS");
02220                                await MyWebView2.EnsureCoreWebView2Async(null, null);
02221                                WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02222                                await navCompletedTask;
02223                                LogSuccess("TEST 3");
02224                             }
02225                             catch (Exception e)
02226                             {
02227                                LogFailure_Exception(logger, "TEST 3", e);
02228                             }
02229
02230                             // TEST 4: EnsureCoreWebView2Async(CustomEnvironment) <--- should fail (different ControllerOptions)
02231                             try
02232                             {
02233                                 LogHeader("TEST 4", "Ensure again with (CustomEnvironment), expecting: ARGUMENT_EXCEPTION.");
02234                                 await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment);
02235                                 LogFailure(logger, "TEST 4", " ArgumentException wasn't raised");
02236                             }
02237                             catch (Exception e)
02238                             {
02239                                if (e is ArgumentException)
02240                                {
02241                                     LogSuccess("TEST 4");
02242                                }
02243                                else
02244                                {
02245                                     LogFailure_Exception(logger, "TEST 4", e);
02246                                }
02247                             }
02248
02249                             // TEST  5: EnsureCoreWebView2Async(CustomEnvironment, CustomOptions) <--- should succeed (same Environment & CotnrollerOptions)
02250                             try
02251                             {
02252                                 LogHeader("TEST 5", "Ensure again with (CustomEnvironment, CustomOptions), expecting: SUCCESS");
02253                                 await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment, CustomOptions);
02254                                 WebView2Common.LoadWebPage(MyWebView2, TestPageNames[TestInfoDictionary[selectedTest]]);
02255                                 await navCompletedTask;
02256                                 LogSuccess("TEST 5");
02257                             }
02258                             catch (Exception e)
02259                             {
02260                                 LogFailure_Exception(logger, "TEST 5", e);
02261                             }
02262
02263                             CoreWebView2Environment EquivalentCustomEnvironment =
02264                                 await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(
02265                                     String.Empty /* browserExecutableFolder */, String.Empty /* UserDataFolder */, environmentOptions);
02266
02267                             // Ensure Again Test 6: EnsureCoreWebView2Async(EquivalentCustomEnvironment>) <--- should fail (different environment instance)
02268                             try
02269                             {
02270                                 _helpers.AppendMessage("[TEST 6] Ensure again with (EquivalentCustomEnvironment), expecting: ARGUMENT_EXCEPTION");
02271                                 await MyWebView2.EnsureCoreWebView2Async(EquivalentCustomEnvironment);
02272                                 LogFailure(logger, "[TEST 6]", "ArgumentException wasn't raised.");
02273                             }
02274                             catch (ArgumentException e)
02275                             {
02276                                if (e is ArgumentException)
02277                                {
02278                                     LogSuccess("TEST 6");
02279                                }
02280                                else
02281                                {
02282                                     LogFailure_Exception(logger, "TEST 6", e);
02283                                }
02284                             }
02285
02286                             // Ensure Again Test 7: EnsureCoreWebView2Async(EquivalentCustomEnvironment, CustomOptions>) <--- should fail (different environment instance)
02287                             try
02288                             {
02289                                 _helpers.AppendMessage("[TEST 7] Ensure again with (EquivalentCustomEnvironment, CustomOptions), expecting: ARGUMENT_EXCEPTION");
02290                                 await MyWebView2.EnsureCoreWebView2Async(EquivalentCustomEnvironment, CustomOptions);
02291                                 LogFailure(logger, "[TEST 7]", "ArgumentException wasn't raised.");
02292                             }
02293                             catch (ArgumentException e)
02294                             {
02295                                if (e is ArgumentException)
02296                                {
02297                                     LogSuccess("TEST 7");
02298                                }
02299                                else
02300                                {
02301                                     LogFailure_Exception(logger, "TEST 7", e);
02302                                }
02303                             }
02304
02305                             CoreWebView2ControllerOptions EquivalentCustomOptions = CustomEnvironment.CreateCoreWebView2ControllerOptions();
02306                             EquivalentCustomOptions.IsInPrivateModeEnabled = true;
02307
02308                             // Ensure Again Test 8 EnsureCoreWebView2Async(CustomEnvironment, EquivalentCustomOptions>) <--- should fail (different options instance)
02309                             try
02310                             {
02311                                 _helpers.AppendMessage("[TEST 8] Ensure again with (CustomEnvironment, EquivalentCustomOptions), expecting: ARGUMENT_EXCEPTION");
02312                                 await MyWebView2.EnsureCoreWebView2Async(CustomEnvironment, EquivalentCustomOptions);
02313                                 LogFailure(logger, "[TEST 8]", "ArgumentException wasn't raised.");
02314                             }
02315                             catch (ArgumentException e)
02316                             {
02317                                if (e is ArgumentException)
02318                                {
02319                                     LogSuccess("TEST 8");
02320                                }
02321                                else
02322                                {
02323                                     LogFailure_Exception(logger, "TEST 8", e);
02324                                }
02325                             }
02326                         }
02327                         break;
02328
02329                     default:
02330                         break;
02331                 }
02332             }
02333         }
02334
02335         async public void CleanupCurrentTest(object sender, RoutedEventArgs args)
02336         {
02337             // Ensure any WebViewElements are destroyed + removed from UIA tree prior to signaling test completion
02338             // to avoid impacting next test.
02339             await CleanupWebViewElements();
02340
02341             if (_isApplicationLanguageOverrideSet)
02342             {
02343                 ApplicationLanguages.PrimaryLanguageOverride = string.Empty;
02344                 _isApplicationLanguageOverrideSet = false;
02345             }
02346
02347             if (_customUserDataFolder != string.Empty)
02348             {
02349                 // Delete the custom UserDataFolder
02350                 System.IO.Directory.Delete(_customUserDataFolder, true);
02351                 _customUserDataFolder = string.Empty;
02352             }
02353
02354             CleanupResultTextBox.Text = "Cleanup completed.";
02355         }
02356
02357         protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
02358         {
02359             if (TestNameComboBox.GetSelectedText() != "")
02360             {
02361                 // For test stability, webviews should be fully cleaned up before we leave the test page.
02362                 Debug.Assert(_areWebviewElementsCleanedUp);
02363             }
02364             else
02365             {
02366                 // If we're not running a test, we should clean up any WebView2s before navigating away.
02367                 if (!_areWebviewElementsCleanedUp)
02368                 {
02369                     CleanupCurrentTest(null, null);
02370                 }
02371             }
02372         }
02373
02374         private void AppendMessage(string message)
02375         {
02376             MessageLog.Text = MessageLog.Text + message + Environment.NewLine;
02377         }
02378
02379         private void LogHeader(string testName, string header)
02380         {
02381             _helpers.AppendMessage(string.Format("[{0}]: {1}.", testName, header));
02382         }
02383
02384         private void LogSuccess(string testName)
02385         {
02386             _helpers.AppendMessage(string.Format("[{0}] Passed.", testName));
02387         }
02388
02389         private void LogFailure(ResultsLogger logger, string testName, string message)
02390         {
02391             string failureText = string.Format("[{0}] Failed: {1}.", testName, message);
02392             _helpers.AppendMessage(failureText);
02393             logger.LogError(failureText);
02394         }
02395
02396         private void LogFailure_Exception(ResultsLogger logger, string testName, Exception e)
02397         {
02398             string failureText = string.Format("[{0}] Failed: Got {1}({2}).", testName, e, e.Message);
02399             _helpers.AppendMessage(failureText);
02400             logger.LogError(failureText);
02401         }
02402     }
02403
02404     [ComImport]
02405     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
02406     [Guid("912b34a7-d10b-49c4-af18-7cb7e604e01a")]
02407     public interface ICoreWebView2Interop
02408     {
02409         // IDL: HRESULT AddHostObjectToScript([in] LPCWSTR name, [in] VARIANT* object);
02410         void AddHostObjectToScript([In] string name, [In] ref object obj);
02411     }
02412
02413     // Example classes from public documentation of CoreWebView2's AddHostObjectToScript
02414 #pragma warning disable CS0618
02415     // The.NET version of CoreWebView2.AddHostObjectToScript currently relies on the host object
02416     // implementing IDispatch and so uses the deprecated ClassInterfaceType.AutoDual feature of.NET.
02417     // This may change in the future, see https://github.com/MicrosoftEdge/WebView2Feedback/issues/517
02418     // for more information
02419     [ClassInterface(ClassInterfaceType.AutoDual)]
02420 #pragma warning restore CS0618
02421     [ComVisible(true)]
02422     public class BridgeAnotherClass
02423     {
02424         // Sample property.
02425         public string Prop { get; set; } = "Example property from host object";
02426     }
02427
02428 #pragma warning disable CS0618
02429     [ClassInterface(ClassInterfaceType.AutoDual)]
02430 #pragma warning restore CS0618
02431     [ComVisible(true)]
02432     public class Bridge
02433     {
02434         public string Func(string param)
02435         {
02436             return "Example: " + param;
02437         }
02438
02439         public BridgeAnotherClass AnotherObject { get; set; } = new BridgeAnotherClass();
02440
02441         // Sample indexed property.
02442         [System.Runtime.CompilerServices.IndexerName("Items")]
02443         public string this[int index]
02444         {
02445             get { return m_dictionary[index]; }
02446             set { m_dictionary[index] = value; }
02447         }
02448         private Dictionary<int, string> m_dictionary = new Dictionary<int, string>();
02449     }
02450 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemCollectionTransitionProviderProperties Member List

This is the complete list of members for ItemCollectionTransitionProviderProperties, including all inherited members.
ClearProperties() | ItemCollectionTransitionProviderProperties | [static]
EnsureProperties() | ItemCollectionTransitionProviderProperties | [static]
ItemCollectionTransitionProviderProperties() | ItemCollectionTransitionProviderProperties |
m_transitionCompletedEventSource | ItemCollectionTransitionProviderProperties |
TransitionCompleted(winrt::TypedEventHandler< winrt::ItemCollectionTransitionProvider, winrt::ItemCollectionTransitionCompletedEventArgs > const &value) | ItemCollectionTransitionProviderProperties |
TransitionCompleted(winrt::event_token const &token) | ItemCollectionTransitionProviderProperties |
Generated on Sun Dec 1 2024 20:52:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerSlider Member List

This is the complete list of members for ColorPickerSlider, including all inherited members.
_factory | ColorPickerSlider | [private, static]
_valuePattern | ColorPickerSlider | [private]
ColorPickerSlider(UIObject uiObject) | ColorPickerSlider | [inline]
Factory | ColorPickerSlider | [static]
GetColorChangedWaiter() | ColorPickerSlider | [inline]
Initialize() | ColorPickerSlider | [inline, private]
IsReadOnly | ColorPickerSlider |
SetValue(string value) | ColorPickerSlider | [inline, virtual]
Value | ColorPickerSlider |
Generated on Sun Dec 1 2024 20:53:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBarTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

TitleBarTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TitleBarTemplateSettings.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(TitleBarTemplateSettings)
00012 }
00013
00014 #include "TitleBarTemplateSettings.g.cpp"
00015
00016 GlobalDependencyProperty TitleBarTemplateSettingsProperties::s_IconElementProperty{ nullptr };
00017
00018 TitleBarTemplateSettingsProperties::TitleBarTemplateSettingsProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void TitleBarTemplateSettingsProperties::EnsureProperties()
00024 {
00025     if (!s_IconElementProperty)
00026     {
00027         s_IconElementProperty =
00028             InitializeDependencyProperty(
00029                 L"IconElement",
00030                 winrt::name_of<winrt::IconElement>(),
00031                 winrt::name_of<winrt::TitleBarTemplateSettings>(),
00032                 false /* isAttached */,
00033                 ValueHelper<winrt::IconElement>::BoxedDefaultValue(),
00034                 nullptr);
00035     }
00036 }
00037
00038 void TitleBarTemplateSettingsProperties::ClearProperties()
00039 {
00040     s_IconElementProperty = nullptr;
00041 }
00042
00043 void TitleBarTemplateSettingsProperties::IconElement(winrt::IconElement const& value)
00044 {
00045     [[gsl::suppress(con)]]
00046     {
00047     static_cast<TitleBarTemplateSettings*>(this)->SetValue(s_IconElementProperty, ValueHelper<winrt::IconElement>::BoxValueIfNecessary(value));
00048     }
00049 }
00050
00051 winrt::IconElement TitleBarTemplateSettingsProperties::IconElement()
00052 {
00053     return ValueHelper<winrt::IconElement>::CastOrUnbox(static_cast<TitleBarTemplateSettings*>(this)->GetValue(s_IconElementProperty));
00054 }
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WorkInfo Member List

This is the complete list of members for WorkInfo, including all inherited members.
InvokeWorkFunc() const | WorkInfo | [inline]
m_priority | WorkInfo | [private]
m_workFunc | WorkInfo | [private]
Priority() const | WorkInfo | [inline]
WorkInfo(int priority, const std::function< void()> &workFunc) | WorkInfo | [inline]
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterRepeaterAnchoringPage::SampleDataSource Member List

This is the complete list of members for ScrollPresenterRepeaterAnchoringPage::SampleDataSource, including all inherited members.
_inner | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [private]
Add(object value) | CustomItemsSourceView | [inline]
Clear() | CustomItemsSourceView | [inline]
CollectionChanged | CustomItemsSourceView |
Contains(object value) | CustomItemsSourceView | [inline]
CopyTo(Array array, int index) | CustomItemsSourceView | [inline]
Count | CustomItemsSourceView |
GetAtCore(int index) | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline, protected, virtual]
GetEnumerator() | CustomItemsSourceView | [inline]
GetSizeCore() | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline, protected, virtual]
IndexFromKey(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
IndexFromKeyCore(string id) | CustomItemsSourceViewWithUniqueIdMapping | [inline, protected, virtual]
IndexOf(object value) | CustomItemsSourceView | [inline]
Inner | ScrollPresenterRepeaterAnchoringPage::SampleDataSource |
Insert(int index, int count, bool reset) | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline]
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping::Insert(int index, object value) | CustomItemsSourceView | [inline]
IsFixedSize | CustomItemsSourceView |
IsReadOnly | CustomItemsSourceView |
IsSynchronized | CustomItemsSourceView |
KeyFromIndex(int index) | CustomItemsSourceViewWithUniqueIdMapping | [inline]
KeyFromIndexCore(int index) | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline, protected, virtual]
OnItemsSourceChanged(NotifyCollectionChangedEventArgs args) | CustomItemsSourceView | [inline, protected]
Owner | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [private]
Remove(int index, int count, bool reset) | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline]
Microsoft::UI::Xaml::Tests::MUXControls::ApiTests::RepeaterTests::Common::CustomItemsSourceViewWithUniqueIdMapping::Remove(object value) | CustomItemsSourceView | [inline]
RemoveAt(int index) | CustomItemsSourceView | [inline]
Replace(int index, int oldCount, int newCount, bool reset) | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline]
Reset() | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline]
SampleDataSource(ScrollPresenterRepeaterAnchoringPage owner, List< DataItem > source) | ScrollPresenterRepeaterAnchoringPage::SampleDataSource | [inline]
SyncRoot | CustomItemsSourceView |
this | CustomItemsSourceView |
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTestsWithInputHelper Member List

This is the complete list of members for ScrollPresenterTestsWithInputHelper, including all inherited members.
ClassInitialize(TestContext testContext) | ScrollPresenterTestsWithInputHelper | [inline, static]
ClearTraces() | ScrollPresenterTestsBase | [inline, protected]
defaultAnimatedViewChangeTimeout | ScrollPresenterTestsWithInputHelper | [private]
GatherScrollSnapPointsTestPageElements() | ScrollPresenterTestsWithInputHelper | [inline, private]
GetScrollPresenterContentLayoutOffset(out double contentLayoutOffsetX, out double contentLayoutOffsetY) | ScrollPresenterTestsWithInputHelper | [inline, private]
GetScrollPresenterView(out double horizontalOffset, out double verticalOffset, out float zoomFactor) | ScrollPresenterTestsWithInputHelper | [inline, private]
GoToChainingAndRailingPage() | ScrollPresenterTestsWithInputHelper | [inline, private]
GoToManipulationModePage() | ScrollPresenterTestsWithInputHelper | [inline, private]
GoToScrollSnapPointsPage() | ScrollPresenterTestsWithInputHelper | [inline, private]
GoToSimpleContentsPage() | ScrollPresenterTestsWithInputHelper | [inline, private]
LogAndClearTraces() | ScrollPresenterTestsBase | [inline, protected]
LogAndClearTraces(bool recordWarning) | ScrollPresenterTestsBase | [inline, protected]
LogTraces() | ScrollPresenterTestsBase | [inline, protected]
LogTraces(bool recordWarning) | ScrollPresenterTestsBase | [inline, protected]
mouseWheelDeltaForVelocityUnit | ScrollPresenterTestsWithInputHelper | [private]
MoveTowardsTwoManditoryIrregularSnapPoint(ScrollSnapPointsAlignment alignment, bool withTouch) | ScrollPresenterTestsWithInputHelper | [inline, private]
MoveWithinARepeatedMandatorySnapPoint(bool withOffsetEqualToStart, ScrollSnapPointsAlignment alignment, bool withTouch) | ScrollPresenterTestsWithInputHelper | [inline, private]
OverpanWithAnchoredSkrinkingContent() | ScrollPresenterTestsWithInputHelper | [inline]
OverpanWithAnchoredSkrinkingContent(bool isForHorizontalDirection) | ScrollPresenterTestsWithInputHelper | [inline, private]
OverpanWithAnchoredSkrinkingContentVert() | ScrollPresenterTestsWithInputHelper | [inline]
PanTowardsTwoManditoryIrregularSnapPoint_Center() | ScrollPresenterTestsWithInputHelper | [inline]
PanTowardsTwoManditoryIrregularSnapPoint_Far() | ScrollPresenterTestsWithInputHelper | [inline]
PanTowardsTwoManditoryIrregularSnapPoint_Near() | ScrollPresenterTestsWithInputHelper | [inline]
PanToZero(UIObject scrollPresenterUIObject, Edit text, int maxTries=10) | ScrollPresenterTestsWithInputHelper | [inline, private]
PanUntilInputWorks(Edit text, UIObject scrollPresenterUIObject) | ScrollPresenterTestsWithInputHelper | [inline, private]
PanWithChainingFromScrollPresenterToScrollViewer() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithChainingFromScrollPresenterToScrollViewer_Auto() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithChainingFromScrollPresenterToScrollViewerWithChainingMode(bool useChainingModeAlways) | ScrollPresenterTestsWithInputHelper | [inline]
PanWithChainingFromScrollViewerToScrollPresenter() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithinARepeatedMandatorySnapPoint_Center() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithinARepeatedMandatorySnapPoint_Far() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithinARepeatedMandatorySnapPoint_Near() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Center() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Far() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithinARepeatedMandatorySnapPointWithDifferentOffset_Near() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithoutRailing() | ScrollPresenterTestsWithInputHelper | [inline]
PanWithRailing() | ScrollPresenterTestsWithInputHelper | [inline]
PinchRectangle() | ScrollPresenterTestsWithInputHelper | [inline]
PinchRectangleWithMouseWheel() | ScrollPresenterTestsWithInputHelper | [inline]
PrepareForScrollPresenterManipulationStart(string scrollPresenterName, string stateTextBoxName="txtScrollPresenterState") | ScrollPresenterTestsWithInputHelper | [inline, private]
PrepareForScrollViewerManipulationStart(string stateTextBoxName="txtScrollViewerState") | ScrollPresenterTestsWithInputHelper | [inline, private]
ScrollSnapPointsAlignment enum name | ScrollPresenterTestsWithInputHelper | [private]
ScrollTowardsTwoManditoryIrregularSnapPoint_Center() | ScrollPresenterTestsWithInputHelper | [inline]
ScrollTowardsTwoManditoryIrregularSnapPoint_Far() | ScrollPresenterTestsWithInputHelper | [inline]
ScrollTowardsTwoManditoryIrregularSnapPoint_Near() | ScrollPresenterTestsWithInputHelper | [inline]
ScrollWithinARepeatedMandatorySnapPoint_Center() | ScrollPresenterTestsWithInputHelper | [inline]
ScrollWithinARepeatedMandatorySnapPoint_Far() | ScrollPresenterTestsWithInputHelper | [inline]
ScrollWithinARepeatedMandatorySnapPoint_Near() | ScrollPresenterTestsWithInputHelper | [inline]
ScrollWithMouseWheel() | ScrollPresenterTestsWithInputHelper | [inline]
ScrollWithNonSystemManipulationMode() | ScrollPresenterTestsWithInputHelper | [inline]
SetLoggingLevel(bool isPrivateLoggingEnabled) | ScrollPresenterTestsBase | [inline, protected]
SetOutputDebugStringLevel(string outputDebugStringLevel) | ScrollPresenterTestsBase | [inline, protected]
SnapPointsPageChangeOffset(ScrollSnapPointsTestPageElements elements, String amount, double value) | ScrollPresenterTestsWithInputHelper | [inline, private]
StretchImage() | ScrollPresenterTestsWithInputHelper | [inline]
StretchImageWithMouseWheel() | ScrollPresenterTestsWithInputHelper | [inline]
TapResetViewsButton() | ScrollPresenterTestsWithInputHelper | [inline, private]
TestCleanup() | ScrollPresenterTestsWithInputHelper | [inline]
TryWaitForScrollPresenterManipulationEnd(string scrollPresenterName, string stateTextBoxName="txtScrollPresenterState") | ScrollPresenterTestsWithInputHelper | [inline, private]
WaitForEditValue(string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true) | ScrollPresenterTestsBase | [inline, protected]
WaitForManipulationEnd(string elementName, string stateTextBoxName, bool failOnError=true, bool logTraces=true) | ScrollPresenterTestsWithInputHelper | [inline, private]
WaitForOffsetToSettle(Edit text, double millisecondsTimeout, bool failOnError) | ScrollPresenterTestsWithInputHelper | [inline, private]
WaitForOffsetUpdated(Edit text, double expected, double modulo=double.PositiveInfinity, double alternateMin=double.PositiveInfinity, double alternateMax=double.PositiveInfinity, double millisecondsTimeout=defaultAnimatedViewChangeTimeout, bool failOnError=true) | ScrollPresenterTestsWithInputHelper | [inline, private]
WaitForOffsetUpdated(double expectedMin, double expectedMax, Edit text, double alternateMin=double.PositiveInfinity, double alternateMax=double.PositiveInfinity, double modulo=double.PositiveInfinity, double millisecondsTimeout=defaultAnimatedViewChangeTimeout, bool failOnError=true) | ScrollPresenterTestsWithInputHelper | [inline, private]
WaitForScrollPresenterFinalSize(UIObject scrollPresenterUIObject, double expectedWidth, double expectedHeight) | ScrollPresenterTestsWithInputHelper | [inline, private]
WaitForScrollPresenterManipulationEnd(string scrollPresenterName, string stateTextBoxName="txtScrollPresenterState") | ScrollPresenterTestsWithInputHelper | [inline, private]
WaitForScrollViewerManipulationEnd(string scrollViewerName, string stateTextBoxName="txtScrollViewerState") | ScrollPresenterTestsWithInputHelper | [inline, private]
Generated on Sun Dec 1 2024 20:53:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshVisualizerPage Member List

This is the complete list of members for RefreshVisualizerPage, including all inherited members.
adapterTimer | RefreshVisualizerPage | [private]
BackgroundColorCounter | RefreshVisualizerPage | [private]
ChangeBackgroundClick(object sender, RoutedEventArgs e) | RefreshVisualizerPage | [inline, private]
ChangeForegroundClick(object sender, RoutedEventArgs e) | RefreshVisualizerPage | [inline, private]
ForegroundColorCounter | RefreshVisualizerPage | [private]
grid | RefreshVisualizerPage | [private]
icon | RefreshVisualizerPage | [private]
InsertButtonClick(object sender, RoutedEventArgs e) | RefreshVisualizerPage | [inline, private]
InsertGridButtonClick(object sender, RoutedEventArgs e) | RefreshVisualizerPage | [inline, private]
MainPageLoaded(object sender, object e) | RefreshVisualizerPage | [inline, private]
MarginValueChanged(object sender, RangeBaseValueChangedEventArgs e) | RefreshVisualizerPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | RefreshVisualizerPage | [inline, protected]
OrientationComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | RefreshVisualizerPage | [inline, private]
RefreshButtonClick(object sender, RoutedEventArgs e) | RefreshVisualizerPage | [inline, private]
RefreshCompletionDeferral | RefreshVisualizerPage | [private]
RefreshVisualizer_RefreshRequested(object sender, RefreshRequestedEventArgs e) | RefreshVisualizerPage | [inline, private]
RefreshVisualizer_RefreshStateChanged(RefreshVisualizer sender, RefreshStateChangedEventArgs args) | RefreshVisualizerPage | [inline, private]
RefreshVisualizerPage() | RefreshVisualizerPage | [inline]
SizeValueChanged(object sender, RangeBaseValueChangedEventArgs e) | RefreshVisualizerPage | [inline, private]
timer | RefreshVisualizerPage | [private]
Timer_Tick(object sender, object e) | RefreshVisualizerPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/TestUI/RadioButtonsCaseBundle.xaml.cs Source File

  • File List
  • File Members
  • RadioButtons
  • TestUI

RadioButtonsCaseBundle.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp;
00005 using Microsoft.UI.Xaml.Controls;
00006
00007 namespace RadioButtons_TestUI
00008 {
00009     [TopLevelTestPage(Name = "RadioButtons", Icon = "RadioButton.png")]
00010     public sealed partial class RadioButtonsCaseBundle : TestPage
00011     {
00012         public RadioButtonsCaseBundle()
00013         {
00014             this.InitializeComponent();
00015
00016             RadioButtonsPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RadioButtonsPage), 0); };
00017             RadioButtonsFocusPage.Click += delegate { Frame.NavigateWithoutAnimation(typeof(RadioButtonsFocusPage), 0); };
00018         }
00019     }
00020 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitButtonTestHelper Member List

This is the complete list of members for SplitButtonTestHelper, including all inherited members.
EnsureInstance() | SplitButtonTestHelper | [private, static]
s_instance | SplitButtonTestHelper | [private, static]
SimulateTouch(bool value) | SplitButtonTestHelper | [static]
SimulateTouch() | SplitButtonTestHelper | [static]
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewSummaryPage::QueuedOperation Member List

This is the complete list of members for ItemsViewSummaryPage::QueuedOperation, including all inherited members.
DoubleValue | ItemsViewSummaryPage::QueuedOperation |
IntValue | ItemsViewSummaryPage::QueuedOperation |
QueuedOperation(QueuedOperationType type) | ItemsViewSummaryPage::QueuedOperation | [inline]
QueuedOperation(QueuedOperationType type, double value) | ItemsViewSummaryPage::QueuedOperation | [inline]
QueuedOperation(QueuedOperationType type, int value) | ItemsViewSummaryPage::QueuedOperation | [inline]
QueuedOperation(QueuedOperationType type, string value) | ItemsViewSummaryPage::QueuedOperation | [inline]
StringValue | ItemsViewSummaryPage::QueuedOperation |
Type | ItemsViewSummaryPage::QueuedOperation |
Generated on Sun Dec 1 2024 20:54:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator Member List

This is the complete list of members for ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator, including all inherited members.
ChildrenInTabFocusOrderIterator(const winrt::ItemsRepeater &repeater) | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator |
Current() | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator |
GetMany(winrt::array_view< winrt::DependencyObject > values) | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator | [inline]
HasCurrent() | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator | [inline]
m_index | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator | [private]
m_realizedChildren | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator | [private]
MoveNext() | ChildrenInTabFocusOrderIterable::ChildrenInTabFocusOrderIterator | [inline]
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/APITests/BaselineResources2dot5stable.cs Source File

  • File List
  • File Members
  • CommonStyles
  • APITests

BaselineResources2dot5stable.cs

Go to the documentation of this file.
00001 ﻿// This file is auto generated using MuxBaselineResourceGenerator. please do not edit or modify.
00002 using System;
00003 using System.Collections.Generic;
00004 using System.Collections.ObjectModel;
00005 using System.Text;
00006
00007 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00008 {
00009     public static class BaselineResources
00010     {
00011         public static readonly IList<String> BaselineResourcesList2dot5Stable = new ReadOnlyCollection<string>(new List<string>{
00012 "SystemControlTransparentBrush",
00013 "SystemControlBackgroundTransparentRevealBorderBrush",
00014 "SystemControlHighlightAltTransparentRevealBorderBrush",
00015 "SystemControlTransparentRevealBackgroundBrush",
00016 "SystemControlHighlightAccent3RevealBackgroundBrush",
00017 "SystemRevealListMediumColor",
00018 "SystemControlHighlightListMediumRevealBackgroundBrush",
00019 "SystemControlHighlightAccent2RevealBackgroundBrush",
00020 "SystemRevealListLowColor",
00021 "SystemControlHighlightListLowRevealBackgroundBrush",
00022 "SystemControlTransientBorderBrush",
00023 "SystemControlTransparentRevealBorderBrush",
00024 "SystemControlHighlightTransparentRevealBorderBrush",
00025 "SystemRevealBaseMediumLowColor",
00026 "SystemControlHighlightBaseMediumLowRevealBorderBrush",
00027 "SystemRevealBaseLowColor",
00028 "SystemControlBackgroundBaseLowRevealBackgroundBrush",
00029 "SystemControlBackgroundBaseMediumLowRevealBaseLowBackgroundBrush",
00030 "SystemControlHighlightAccentRevealBackgroundBrush",
00031 "SystemControlHighlightBaseMediumLowRevealAccentBackgroundBrush",
00032 "SystemChromeAltHighColor",
00033 "SystemControlTransientBackgroundBrush",
00034 "SystemRevealBaseMediumColor",
00035 "SystemRevealBaseMediumHighColor",
00036 "SystemRevealBaseHighColor",
00037 "SystemRevealChromeWhiteColor",
00038 "SystemRevealChromeMediumColor",
00039 "SystemRevealChromeMediumLowColor",
00040 "SystemRevealChromeBlackMediumColor",
00041 "SystemRevealChromeBlackHighColor",
00042 "ScrollBarThumbBackgroundColor",
00043 "ScrollBarPanningThumbBackgroundColor",
00044 "SystemControlChromeMediumLowAcrylicElementMediumBrush",
00045 "SystemControlAcrylicElementBrush",
00046 "SystemControlHighlightAccent3RevealAccent2BackgroundBrush",
00047 "SystemControlHighlightListMediumRevealListLowBackgroundBrush",
00048 "SystemControlHighlightListAccentMediumLowBrush",
00049 "SystemControlHighlightListAccentVeryHighBrush",
00050 "ComboBoxBackgroundUnfocused",
00051 "SystemControlTransparentRevealListLowBorderBrush",
00052 "UseSystemFocusVisuals",
00053 "TreeViewItemMinHeight",
00054 "TreeViewItemForeground",
00055 "TreeViewItemForegroundSelected",
00056 "TreeViewItemForegroundSelectedPressed",
00057 "TreeViewItemForegroundSelectedPointerOver",
00058 "TreeViewItemForegroundSelectedDisabled",
00059 "TreeViewItemForegroundPressed",
00060 "TreeViewItemForegroundPointerOver",
00061 "TreeViewItemForegroundDisabled",
00062 "TreeViewItemCheckGlyphSelected",
00063 "TreeViewItemCheckBoxBorderSelected",
00064 "TreeViewItemCheckBoxBackgroundSelected",
00065 "TreeViewItemBorderThemeThickness",
00066 "TreeViewItemBorderBrush",
00067 "TreeViewItemBorderBrushSelected",
00068 "TreeViewItemBorderBrushSelectedPressed",
00069 "TreeViewItemBorderBrushSelectedPointerOver",
00070 "TreeViewItemBorderBrushSelectedDisabled",
00071 "TreeViewItemBorderBrushPressed",
00072 "TreeViewItemBorderBrushPointerOver",
00073 "TreeViewItemBorderBrushDisabled",
00074 "TreeViewItemBackground",
00075 "TreeViewItemBackgroundSelected",
00076 "TreeViewItemBackgroundSelectedPressed",
00077 "TreeViewItemBackgroundSelectedPointerOver",
00078 "TreeViewItemBackgroundSelectedDisabled",
00079 "TreeViewItemBackgroundPressed",
00080 "TreeViewItemBackgroundPointerOver",
00081 "TreeViewItemBackgroundDisabled",
00082 "TopNavigationViewItemSeparatorForeground",
00083 "TopNavigationViewItemRevealIconForegroundFocused",
00084 "TopNavigationViewItemRevealContentForegroundFocused",
00085 "TopNavigationViewItemRevealBackgroundFocused",
00086 "TopNavigationViewItemForeground",
00087 "TopNavigationViewItemForegroundSelected",
00088 "TopNavigationViewItemForegroundPressed",
00089 "TopNavigationViewItemForegroundPointerOver",
00090 "TopNavigationViewItemForegroundDisabled",
00091 "TopNavigationViewItemBackgroundSelected",
00092 "TopNavigationViewItemBackgroundPressed",
00093 "TopNavigationViewItemBackgroundPointerOver",
00094 "ToolTipForeground",
00095 "ToolTipForegroundThemeBrush",
00096 "ToolTipContentThemeFontSize",
00097 "ToolTipBorderThemeThickness",
00098 "ToolTipBorderThemePadding",
00099 "ToolTipBorderThemeBrush",
00100 "ToolTipBorderBrush",
00101 "ToolTipBackground",
00102 "ToolTipBackgroundThemeBrush",
00103 "ToggleSwitchTrackPressedBackgroundThemeBrush",
00104 "ToggleSwitchTrackPointerOverBackgroundThemeBrush",
00105 "ToggleSwitchTrackDisabledBackgroundThemeBrush",
00106 "ToggleSwitchTrackBorderThemeBrush",
00107 "ToggleSwitchTrackBackgroundThemeBrush",
00108 "ToggleSwitchThumbPressedForegroundThemeBrush",
00109 "ToggleSwitchThumbPressedBackgroundThemeBrush",
00110 "ToggleSwitchThumbPointerOverBorderThemeBrush",
00111 "ToggleSwitchThumbPointerOverBackgroundThemeBrush",
00112 "ToggleSwitchThumbDisabledBorderThemeBrush",
00113 "ToggleSwitchThumbDisabledBackgroundThemeBrush",
00114 "ToggleSwitchThumbBorderThemeBrush",
00115 "ToggleSwitchThumbBackgroundThemeBrush",
00116 "ToggleSwitchStrokeOn",
00117 "ToggleSwitchStrokeOnPressed",
00118 "ToggleSwitchStrokeOnPointerOver",
00119 "ToggleSwitchStrokeOnDisabled",
00120 "ToggleSwitchStrokeOff",
00121 "ToggleSwitchStrokeOffPressed",
00122 "ToggleSwitchStrokeOffPointerOver",
00123 "ToggleSwitchStrokeOffDisabled",
00124 "ToggleSwitchOuterBorderStrokeThickness",
00125 "ToggleSwitchOuterBorderDisabledBorderThemeBrush",
00126 "ToggleSwitchOuterBorderBorderThemeBrush",
00127 "ToggleSwitchOnStrokeThickness",
00128 "ToggleSwitchKnobFillOn",
00129 "ToggleSwitchKnobFillOnPressed",
00130 "ToggleSwitchKnobFillOnPointerOver",
00131 "ToggleSwitchKnobFillOnDisabled",
00132 "ToggleSwitchKnobFillOff",
00133 "ToggleSwitchKnobFillOffPressed",
00134 "ToggleSwitchKnobFillOffPointerOver",
00135 "ToggleSwitchKnobFillOffDisabled",
00136 "ToggleSwitchHeaderForeground",
00137 "ToggleSwitchHeaderForegroundThemeBrush",
00138 "ToggleSwitchHeaderForegroundDisabled",
00139 "ToggleSwitchHeaderDisabledForegroundThemeBrush",
00140 "ToggleSwitchForegroundThemeBrush",
00141 "ToggleSwitchFillOn",
00142 "ToggleSwitchFillOnPressed",
00143 "ToggleSwitchFillOnPointerOver",
00144 "ToggleSwitchFillOnDisabled",
00145 "ToggleSwitchFillOff",
00146 "ToggleSwitchFillOffPressed",
00147 "ToggleSwitchFillOffPointerOver",
00148 "ToggleSwitchFillOffDisabled",
00149 "ToggleSwitchDisabledForegroundThemeBrush",
00150 "ToggleSwitchCurtainPressedBackgroundThemeBrush",
00151 "ToggleSwitchCurtainPointerOverBackgroundThemeBrush",
00152 "ToggleSwitchCurtainDisabledBackgroundThemeBrush",
00153 "ToggleSwitchCurtainBackgroundThemeBrush",
00154 "ToggleSwitchContentForeground",
00155 "ToggleSwitchContentForegroundDisabled",
00156 "ToggleSwitchContainerBackground",
00157 "ToggleSwitchContainerBackgroundPressed",
00158 "ToggleSwitchContainerBackgroundPointerOver",
00159 "ToggleSwitchContainerBackgroundDisabled",
00160 "ToggleMenuFlyoutItemRevealBorderBrush",
00161 "ToggleMenuFlyoutItemRevealBorderBrushPressed",
00162 "ToggleMenuFlyoutItemRevealBorderBrushPointerOver",
00163 "ToggleMenuFlyoutItemRevealBorderBrushDisabled",
00164 "ToggleMenuFlyoutItemRevealBackground",
00165 "ToggleMenuFlyoutItemRevealBackgroundPressed",
00166 "ToggleMenuFlyoutItemRevealBackgroundPointerOver",
00167 "ToggleMenuFlyoutItemRevealBackgroundDisabled",
00168 "ToggleButtonRevealBorderThemeThickness",
00169 "ToggleButtonRevealBorderBrush",
00170 "ToggleButtonRevealBorderBrushPressed",
00171 "ToggleButtonRevealBorderBrushPointerOver",
00172 "ToggleButtonRevealBorderBrushIndeterminate",
00173 "ToggleButtonRevealBorderBrushIndeterminatePressed",
00174 "ToggleButtonRevealBorderBrushIndeterminatePointerOver",
00175 "ToggleButtonRevealBorderBrushIndeterminateDisabled",
00176 "ToggleButtonRevealBorderBrushDisabled",
00177 "ToggleButtonRevealBorderBrushChecked",
00178 "ToggleButtonRevealBorderBrushCheckedPressed",
00179 "ToggleButtonRevealBorderBrushCheckedPointerOver",
00180 "ToggleButtonRevealBorderBrushCheckedDisabled",
00181 "ToggleButtonRevealBackground",
00182 "ToggleButtonRevealBackgroundPressed",
00183 "ToggleButtonRevealBackgroundPointerOver",
00184 "ToggleButtonRevealBackgroundIndeterminate",
00185 "ToggleButtonRevealBackgroundIndeterminatePressed",
00186 "ToggleButtonRevealBackgroundIndeterminatePointerOver",
00187 "ToggleButtonRevealBackgroundIndeterminateDisabled",
00188 "ToggleButtonRevealBackgroundDisabled",
00189 "ToggleButtonRevealBackgroundChecked",
00190 "ToggleButtonRevealBackgroundCheckedPressed",
00191 "ToggleButtonRevealBackgroundCheckedPointerOver",
00192 "ToggleButtonRevealBackgroundCheckedDisabled",
00193 "ToggleButtonPressedForegroundThemeBrush",
00194 "ToggleButtonPressedBackgroundThemeBrush",
00195 "ToggleButtonPointerOverBackgroundThemeBrush",
00196 "ToggleButtonForeground",
00197 "ToggleButtonForegroundThemeBrush",
00198 "ToggleButtonForegroundPressed",
00199 "ToggleButtonForegroundPointerOver",
00200 "ToggleButtonForegroundIndeterminate",
00201 "ToggleButtonForegroundIndeterminatePressed",
00202 "ToggleButtonForegroundIndeterminatePointerOver",
00203 "ToggleButtonForegroundIndeterminateDisabled",
00204 "ToggleButtonForegroundDisabled",
00205 "ToggleButtonForegroundChecked",
00206 "ToggleButtonForegroundCheckedPressed",
00207 "ToggleButtonForegroundCheckedPointerOver",
00208 "ToggleButtonForegroundCheckedDisabled",
00209 "ToggleButtonDisabledForegroundThemeBrush",
00210 "ToggleButtonDisabledBorderThemeBrush",
00211 "ToggleButtonCheckedPressedForegroundThemeBrush",
00212 "ToggleButtonCheckedPressedBorderThemeBrush",
00213 "ToggleButtonCheckedPressedBackgroundThemeBrush",
00214 "ToggleButtonCheckedPointerOverBorderThemeBrush",
00215 "ToggleButtonCheckedPointerOverBackgroundThemeBrush",
00216 "ToggleButtonCheckedForegroundThemeBrush",
00217 "ToggleButtonCheckedDisabledForegroundThemeBrush",
00218 "ToggleButtonCheckedDisabledBackgroundThemeBrush",
00219 "ToggleButtonCheckedBorderThemeBrush",
00220 "ToggleButtonCheckedBackgroundThemeBrush",
00221 "ToggleButtonBorderThemeThickness",
00222 "ToggleButtonBorderThemeBrush",
00223 "ToggleButtonBorderBrush",
00224 "ToggleButtonBorderBrushPressed",
00225 "ToggleButtonBorderBrushPointerOver",
00226 "ToggleButtonBorderBrushIndeterminate",
00227 "ToggleButtonBorderBrushIndeterminatePressed",
00228 "ToggleButtonBorderBrushIndeterminatePointerOver",
00229 "ToggleButtonBorderBrushIndeterminateDisabled",
00230 "ToggleButtonBorderBrushDisabled",
00231 "ToggleButtonBorderBrushChecked",
00232 "ToggleButtonBorderBrushCheckedPressed",
00233 "ToggleButtonBorderBrushCheckedPointerOver",
00234 "ToggleButtonBorderBrushCheckedDisabled",
00235 "ToggleButtonBackground",
00236 "ToggleButtonBackgroundThemeBrush",
00237 "ToggleButtonBackgroundPressed",
00238 "ToggleButtonBackgroundPointerOver",
00239 "ToggleButtonBackgroundIndeterminate",
00240 "ToggleButtonBackgroundIndeterminatePressed",
00241 "ToggleButtonBackgroundIndeterminatePointerOver",
00242 "ToggleButtonBackgroundIndeterminateDisabled",
00243 "ToggleButtonBackgroundDisabled",
00244 "ToggleButtonBackgroundChecked",
00245 "ToggleButtonBackgroundCheckedPressed",
00246 "ToggleButtonBackgroundCheckedPointerOver",
00247 "ToggleButtonBackgroundCheckedDisabled",
00248 "TimePickerThirdHostThemeMargin",
00249 "TimePickerSpacerThemeWidth",
00250 "TimePickerSpacerFill",
00251 "TimePickerSpacerFillDisabled",
00252 "TimePickerSelectorThemeMinWidth",
00253 "TimePickerLightDismissOverlayBackground",
00254 "TimePickerHeaderThemeMargin",
00255 "TimePickerHeaderThemeFontWeight",
00256 "TimePickerHeaderForeground",
00257 "TimePickerHeaderForegroundThemeBrush",
00258 "TimePickerHeaderForegroundDisabled",
00259 "TimePickerForegroundThemeBrush",
00260 "TimePickerFlyoutPresenterSpacerFill",
00261 "TimePickerFlyoutPresenterHighlightFill",
00262 "TimePickerFlyoutPresenterBorderBrush",
00263 "TimePickerFlyoutPresenterBackground",
00264 "TimePickerFirstHostThemeMargin",
00265 "TimePickerButtonForeground",
00266 "TimePickerButtonForegroundPressed",
00267 "TimePickerButtonForegroundPointerOver",
00268 "TimePickerButtonForegroundFocused",
00269 "TimePickerButtonForegroundDisabled",
00270 "TimePickerButtonBorderBrush",
00271 "TimePickerButtonBorderBrushPressed",
00272 "TimePickerButtonBorderBrushPointerOver",
00273 "TimePickerButtonBorderBrushDisabled",
00274 "TimePickerButtonBackground",
00275 "TimePickerButtonBackgroundPressed",
00276 "TimePickerButtonBackgroundPointerOver",
00277 "TimePickerButtonBackgroundFocused",
00278 "TimePickerButtonBackgroundDisabled",
00279 "TimePickerBorderThemeThickness",
00280 "TextControlThemePadding",
00281 "TextControlPlaceholderForegroundFocused",
00282 "TextControlForegroundFocused",
00283 "TextControlButtonForeground",
00284 "TextControlBorderThemeThickness",
00285 "TextControlBorderThemeThicknessFocused",
00286 "TextControlBorderBrush",
00287 "TextControlBorderBrushPointerOver",
00288 "TextControlBackgroundFocused",
00289 "TextBoxPlaceholderTextThemeBrush",
00290 "TextBoxForegroundThemeBrush",
00291 "TextBoxForegroundHeaderThemeBrush",
00292 "TextBoxDisabledForegroundThemeBrush",
00293 "TextBoxDisabledBorderThemeBrush",
00294 "TextBoxDisabledBackgroundThemeBrush",
00295 "TextBoxButtonPressedForegroundThemeBrush",
00296 "TextBoxButtonPressedBorderThemeBrush",
00297 "TextBoxButtonPressedBackgroundThemeBrush",
00298 "TextBoxButtonPointerOverForegroundThemeBrush",
00299 "TextBoxButtonPointerOverBorderThemeBrush",
00300 "TextBoxButtonPointerOverBackgroundThemeBrush",
00301 "TextBoxButtonForegroundThemeBrush",
00302 "TextBoxButtonBorderThemeBrush",
00303 "TextBoxButtonBackgroundThemeBrush",
00304 "TextBoxBorderThemeBrush",
00305 "TextBoxBackgroundThemeBrush",
00306 "TeachingTipTransientBackground",
00307 "TeachingTipTopHighlightBrush",
00308 "TeachingTipTitleForegroundBrush",
00309 "TeachingTipSubtitleForegroundBrush",
00310 "TeachingTipForegroundBrush",
00311 "TeachingTipBorderBrush",
00312 "TeachingTipBackgroundBrush",
00313 "TeachingTipAlternateCloseButtonBorderThickness",
00314 "TabViewScrollButtonBackground",
00315 "TabViewItemSeparator",
00316 "TabViewItemIconForeground",
00317 "TabViewItemIconForegroundSelected",
00318 "TabViewItemIconForegroundPressed",
00319 "TabViewItemIconForegroundPointerOver",
00320 "TabViewItemIconForegroundDisabled",
00321 "TabViewItemHeaderSelectedCloseButtonForeground",
00322 "TabViewItemHeaderSelectedCloseButtonBackground",
00323 "TabViewItemHeaderPressedCloseButtonForeground",
00324 "TabViewItemHeaderPressedCloseButtonBackground",
00325 "TabViewItemHeaderPointerOverCloseButtonForeground",
00326 "TabViewItemHeaderPointerOverCloseButtonBackground",
00327 "TabViewItemHeaderForeground",
00328 "TabViewItemHeaderForegroundSelected",
00329 "TabViewItemHeaderForegroundPressed",
00330 "TabViewItemHeaderForegroundPointerOver",
00331 "TabViewItemHeaderForegroundDisabled",
00332 "TabViewItemHeaderDisabledCloseButtonForeground",
00333 "TabViewItemHeaderDisabledCloseButtonBackground",
00334 "TabViewItemHeaderCloseButtonForeground",
00335 "TabViewItemHeaderCloseButtonForegroundPressed",
00336 "TabViewItemHeaderCloseButtonForegroundPointerOver",
00337 "TabViewItemHeaderCloseButtonBackground",
00338 "TabViewItemHeaderCloseButtonBackgroundPressed",
00339 "TabViewItemHeaderCloseButtonBackgroundPointerOver",
00340 "TabViewItemHeaderBackground",
00341 "TabViewItemHeaderBackgroundSelected",
00342 "TabViewItemHeaderBackgroundPressed",
00343 "TabViewItemHeaderBackgroundPointerOver",
00344 "TabViewItemHeaderBackgroundDisabled",
00345 "TabViewButtonForeground",
00346 "TabViewButtonForegroundPressed",
00347 "TabViewButtonForegroundPointerOver",
00348 "TabViewButtonForegroundDisabled",
00349 "TabViewButtonForegroundActiveTab",
00350 "TabViewButtonBackground",
00351 "TabViewButtonBackgroundPressed",
00352 "TabViewButtonBackgroundPointerOver",
00353 "TabViewButtonBackgroundDisabled",
00354 "TabViewButtonBackgroundActiveTab",
00355 "TabViewBackground",
00356 "SystemRevealChromeLowColor",
00357 "SystemRevealChromeHighColor",
00358 "SystemRevealChromeGrayColor",
00359 "SystemRevealChromeBlackMediumLowColor",
00360 "SystemRevealChromeBlackLowColor",
00361 "SystemRevealChromeAltLowColor",
00362 "SystemRevealAltMediumLowColor",
00363 "SystemRevealAltMediumHighColor",
00364 "SystemRevealAltMediumColor",
00365 "SystemRevealAltLowColor",
00366 "SystemRevealAltHighColor",
00367 "SystemControlHighlightBaseMediumRevealBorderBrush",
00368 "SystemControlHighlightBaseMediumHighRevealBorderBrush",
00369 "SystemControlHighlightBaseLowRevealBorderBrush",
00370 "SystemControlHighlightBaseHighRevealBorderBrush",
00371 "SystemControlHighlightAccentRevealBorderBrush",
00372 "SystemControlForegroundRevealTransparentBorderBrush",
00373 "SystemControlErrorBackgroundColor",
00374 "SystemControlChromeMediumLowAcrylicWindowMediumBrush",
00375 "SystemControlChromeMediumAcrylicWindowMediumBrush",
00376 "SystemControlChromeMediumAcrylicElementMediumBrush",
00377 "SystemControlChromeLowAcrylicWindowBrush",
00378 "SystemControlChromeLowAcrylicElementBrush",
00379 "SystemControlChromeHighAcrylicWindowMediumBrush",
00380 "SystemControlChromeHighAcrylicElementMediumBrush",
00381 "SystemControlBaseMediumLowAcrylicWindowMediumBrush",
00382 "SystemControlBaseMediumLowAcrylicElementMediumBrush",
00383 "SystemControlBaseLowAcrylicWindowBrush",
00384 "SystemControlBaseLowAcrylicElementBrush",
00385 "SystemControlBaseHighAcrylicWindowMediumHighBrush",
00386 "SystemControlBaseHighAcrylicWindowMediumBrush",
00387 "SystemControlBaseHighAcrylicWindowBrush",
00388 "SystemControlBaseHighAcrylicElementMediumHighBrush",
00389 "SystemControlBaseHighAcrylicElementMediumBrush",
00390 "SystemControlBaseHighAcrylicElementBrush",
00391 "SystemControlBackgroundListMediumRevealBorderBrush",
00392 "SystemControlBackgroundListLowRevealBorderBrush",
00393 "SystemControlBackgroundChromeWhiteRevealBorderBrush",
00394 "SystemControlBackgroundChromeMediumRevealBorderBrush",
00395 "SystemControlBackgroundChromeMediumLowRevealBorderBrush",
00396 "SystemControlBackgroundChromeBlackMediumRevealChromeBorderBrush",
00397 "SystemControlBackgroundChromeBlackHighRevealBorderBrush",
00398 "SystemControlBackgroundBaseMediumRevealBorderBrush",
00399 "SystemControlBackgroundBaseMediumLowRevealBorderBrush",
00400 "SystemControlBackgroundBaseMediumHighRevealBorderBrush",
00401 "SystemControlBackgroundBaseLowRevealBorderBrush",
00402 "SystemControlBackgroundBaseHighRevealBorderBrush",
00403 "SystemControlBackgroundAltHighRevealBackgroundBrush",
00404 "SystemControlBackgroundAccentRevealBorderBrush",
00405 "SystemControlAltMediumLowAcrylicWindowMediumBrush",
00406 "SystemControlAltMediumLowAcrylicElementMediumBrush",
00407 "SystemControlAltLowAcrylicWindowBrush",
00408 "SystemControlAltLowAcrylicElementBrush",
00409 "SystemControlAltHighAcrylicWindowBrush",
00410 "SystemControlAltHighAcrylicElementBrush",
00411 "SystemControlAcrylicWindowMediumHighBrush",
00412 "SystemControlAcrylicWindowBrush",
00413 "SystemControlAcrylicElementMediumHighBrush",
00414 "SystemControlAccentDark2AcrylicWindowAccentDark2MediumHighBrush",
00415 "SystemControlAccentDark2AcrylicElementAccentDark2MediumHighBrush",
00416 "SystemControlAccentDark1AcrylicWindowAccentDark1Brush",
00417 "SystemControlAccentDark1AcrylicElementAccentDark1Brush",
00418 "SystemControlAccentAcrylicWindowAccentMediumHighBrush",
00419 "SystemControlAccentAcrylicElementAccentMediumHighBrush",
00420 "SystemChromeMediumHighColor",
00421 "SystemChromeAltMediumHighColor",
00422 "SwipeItemPreThresholdExecuteForeground",
00423 "SwipeItemPreThresholdExecuteBackground",
00424 "SwipeItemPostThresholdExecuteForeground",
00425 "SwipeItemPostThresholdExecuteBackground",
00426 "SwipeItemForeground",
00427 "SwipeItemBackground",
00428 "SwipeItemBackgroundPressed",
00429 "SplitViewRightBorderThemeThickness",
00430 "SplitViewPaneAnimationOpenPreDuration",
00431 "SplitViewPaneAnimationOpenDuration",
00432 "SplitViewPaneAnimationCloseDuration",
00433 "SplitViewOpenPaneThemeLength",
00434 "SplitViewLightDismissOverlayBackground",
00435 "SplitViewLeftBorderThemeThickness",
00436 "SplitViewCompactPaneThemeLength",
00437 "SplitButtonForeground",
00438 "SplitButtonForegroundPressed",
00439 "SplitButtonForegroundPointerOver",
00440 "SplitButtonForegroundDisabled",
00441 "SplitButtonForegroundChecked",
00442 "SplitButtonForegroundCheckedPressed",
00443 "SplitButtonForegroundCheckedPointerOver",
00444 "SplitButtonForegroundCheckedDisabled",
00445 "SplitButtonBorderThemeThickness",
00446 "SplitButtonBorderBrush",
00447 "SplitButtonBorderBrushPressed",
00448 "SplitButtonBorderBrushPointerOver",
00449 "SplitButtonBorderBrushDisabled",
00450 "SplitButtonBorderBrushChecked",
00451 "SplitButtonBorderBrushCheckedPressed",
00452 "SplitButtonBorderBrushCheckedPointerOver",
00453 "SplitButtonBorderBrushCheckedDisabled",
00454 "SplitButtonBackground",
00455 "SplitButtonBackgroundPressed",
00456 "SplitButtonBackgroundPointerOver",
00457 "SplitButtonBackgroundDisabled",
00458 "SplitButtonBackgroundChecked",
00459 "SplitButtonBackgroundCheckedPressed",
00460 "SplitButtonBackgroundCheckedPointerOver",
00461 "SplitButtonBackgroundCheckedDisabled",
00462 "SliderTrackValueFill",
00463 "SliderTrackValueFillPressed",
00464 "SliderTrackValueFillPointerOver",
00465 "SliderTrackValueFillDisabled",
00466 "SliderTrackThemeHeight",
00467 "SliderTrackPressedBackgroundThemeBrush",
00468 "SliderTrackPointerOverBackgroundThemeBrush",
00469 "SliderTrackFill",
00470 "SliderTrackFillPressed",
00471 "SliderTrackFillPointerOver",
00472 "SliderTrackFillDisabled",
00473 "SliderTrackDisabledBackgroundThemeBrush",
00474 "SliderTrackDecreasePressedBackgroundThemeBrush",
00475 "SliderTrackDecreasePointerOverBackgroundThemeBrush",
00476 "SliderTrackDecreaseDisabledBackgroundThemeBrush",
00477 "SliderTrackDecreaseBackgroundThemeBrush",
00478 "SliderTrackBackgroundThemeBrush",
00479 "SliderTickmarkOutsideBackgroundThemeBrush",
00480 "SliderTickMarkOutsideDisabledForegroundThemeBrush",
00481 "SliderTickMarkInlineDisabledForegroundThemeBrush",
00482 "SliderTickMarkInlineBackgroundThemeBrush",
00483 "SliderTickBarFill",
00484 "SliderTickBarFillDisabled",
00485 "SliderThumbPressedBorderThemeBrush",
00486 "SliderThumbPressedBackgroundThemeBrush",
00487 "SliderThumbPointerOverBorderThemeBrush",
00488 "SliderThumbPointerOverBackgroundThemeBrush",
00489 "SliderThumbDisabledBackgroundThemeBrush",
00490 "SliderThumbBorderThemeBrush",
00491 "SliderThumbBackground",
00492 "SliderThumbBackgroundThemeBrush",
00493 "SliderThumbBackgroundPressed",
00494 "SliderThumbBackgroundPointerOver",
00495 "SliderThumbBackgroundDisabled",
00496 "SliderOutsideTickBarThemeHeight",
00497 "SliderInlineTickBarFill",
00498 "SliderHeaderThemeMargin",
00499 "SliderHeaderThemeFontWeight",
00500 "SliderHeaderForeground",
00501 "SliderHeaderForegroundThemeBrush",
00502 "SliderHeaderForegroundDisabled",
00503 "SliderDisabledBorderThemeBrush",
00504 "SliderContainerBackground",
00505 "SliderContainerBackgroundPressed",
00506 "SliderContainerBackgroundPointerOver",
00507 "SliderContainerBackgroundDisabled",
00508 "SliderBorderThemeThickness",
00509 "SliderBorderThemeBrush",
00510 "ScrollViewScrollBarsSeparatorBackground",
00511 "ScrollBarTrackStroke",
00512 "ScrollBarTrackStrokePointerOver",
00513 "ScrollBarTrackStrokeDisabled",
00514 "ScrollBarTrackFill",
00515 "ScrollBarTrackFillPointerOver",
00516 "ScrollBarTrackFillDisabled",
00517 "ScrollBarTrackBorderThemeThickness",
00518 "ScrollBarTrackBorderThemeBrush",
00519 "ScrollBarTrackBackgroundThemeBrush",
00520 "ScrollBarThumbPressedBorderThemeBrush",
00521 "ScrollBarThumbPressedBackgroundThemeBrush",
00522 "ScrollBarThumbPointerOverBorderThemeBrush",
00523 "ScrollBarThumbPointerOverBackgroundThemeBrush",
00524 "ScrollBarThumbFill",
00525 "ScrollBarThumbFillPressed",
00526 "ScrollBarThumbFillPointerOver",
00527 "ScrollBarThumbFillDisabled",
00528 "ScrollBarThumbBorderThemeBrush",
00529 "ScrollBarThumbBackground",
00530 "ScrollBarThumbBackgroundThemeBrush",
00531 "ScrollBarSize",
00532 "ScrollBarPanningThumbBackground",
00533 "ScrollBarPanningThumbBackgroundDisabled",
00534 "ScrollBarPanningBorderThemeThickness",
00535 "ScrollBarPanningBorderThemeBrush",
00536 "ScrollBarPanningBackgroundThemeBrush",
00537 "ScrollBarForeground",
00538 "ScrollBarExpandDuration",
00539 "ScrollBarExpandBeginTime",
00540 "ScrollBarContractFinalKeyframe",
00541 "ScrollBarContractDuration",
00542 "ScrollBarContractDelay",
00543 "ScrollBarContractBeginTime",
00544 "ScrollBarButtonPressedForegroundThemeBrush",
00545 "ScrollBarButtonPressedBorderThemeBrush",
00546 "ScrollBarButtonPressedBackgroundThemeBrush",
00547 "ScrollBarButtonPointerOverForegroundThemeBrush",
00548 "ScrollBarButtonPointerOverBorderThemeBrush",
00549 "ScrollBarButtonPointerOverBackgroundThemeBrush",
00550 "ScrollBarButtonForegroundThemeBrush",
00551 "ScrollBarButtonBorderBrush",
00552 "ScrollBarButtonBorderBrushPressed",
00553 "ScrollBarButtonBorderBrushPointerOver",
00554 "ScrollBarButtonBorderBrushDisabled",
00555 "ScrollBarButtonBackground",
00556 "ScrollBarButtonBackgroundPressed",
00557 "ScrollBarButtonBackgroundPointerOver",
00558 "ScrollBarButtonBackgroundDisabled",
00559 "ScrollBarButtonArrowIconFontSize",
00560 "ScrollBarButtonArrowForeground",
00561 "ScrollBarButtonArrowForegroundPressed",
00562 "ScrollBarButtonArrowForegroundPointerOver",
00563 "ScrollBarButtonArrowForegroundDisabled",
00564 "ScrollBarBorderBrush",
00565 "ScrollBarBorderBrushPointerOver",
00566 "ScrollBarBorderBrushDisabled",
00567 "ScrollBarBackground",
00568 "ScrollBarBackgroundPointerOver",
00569 "ScrollBarBackgroundDisabled",
00570 "RepeatButtonRevealBorderThemeThickness",
00571 "RepeatButtonRevealBorderBrush",
00572 "RepeatButtonRevealBorderBrushPressed",
00573 "RepeatButtonRevealBorderBrushPointerOver",
00574 "RepeatButtonRevealBorderBrushDisabled",
00575 "RepeatButtonRevealBackground",
00576 "RepeatButtonRevealBackgroundPressed",
00577 "RepeatButtonRevealBackgroundPointerOver",
00578 "RepeatButtonRevealBackgroundDisabled",
00579 "RepeatButtonPressedForegroundThemeBrush",
00580 "RepeatButtonPressedBackgroundThemeBrush",
00581 "RepeatButtonPointerOverForegroundThemeBrush",
00582 "RepeatButtonPointerOverBackgroundThemeBrush",
00583 "RepeatButtonForeground",
00584 "RepeatButtonForegroundThemeBrush",
00585 "RepeatButtonForegroundPressed",
00586 "RepeatButtonForegroundPointerOver",
00587 "RepeatButtonForegroundDisabled",
00588 "RepeatButtonDisabledForegroundThemeBrush",
00589 "RepeatButtonDisabledBorderThemeBrush",
00590 "RepeatButtonDisabledBackgroundThemeBrush",
00591 "RepeatButtonBorderThemeThickness",
00592 "RepeatButtonBorderThemeBrush",
00593 "RepeatButtonBorderBrush",
00594 "RepeatButtonBorderBrushPressed",
00595 "RepeatButtonBorderBrushPointerOver",
00596 "RepeatButtonBorderBrushDisabled",
00597 "RepeatButtonBackground",
00598 "RepeatButtonBackgroundPressed",
00599 "RepeatButtonBackgroundPointerOver",
00600 "RepeatButtonBackgroundDisabled",
00601 "RefreshVisualizerForeground",
00602 "RefreshVisualizerBackground",
00603 "RefreshContainerForegroundBrush",
00604 "RefreshContainerBackgroundBrush",
00605 "RatingControlUnselectedForeground",
00606 "RatingControlSelectedForeground",
00607 "RatingControlPointerOverUnselectedForeground",
00608 "RatingControlPointerOverSelectedForeground",
00609 "RatingControlPointerOverPlaceholderForeground",
00610 "RatingControlPlaceholderForeground",
00611 "RatingControlDisabledSelectedForeground",
00612 "RatingControlCaptionForeground",
00613 "RadioButtonsHeaderForeground",
00614 "RadioButtonsHeaderForegroundDisabled",
00615 "RadioButtonPressedForegroundThemeBrush",
00616 "RadioButtonPressedBorderThemeBrush",
00617 "RadioButtonPressedBackgroundThemeBrush",
00618 "RadioButtonPointerOverForegroundThemeBrush",
00619 "RadioButtonPointerOverBorderThemeBrush",
00620 "RadioButtonPointerOverBackgroundThemeBrush",
00621 "RadioButtonOuterEllipseStroke",
00622 "RadioButtonOuterEllipseStrokePressed",
00623 "RadioButtonOuterEllipseStrokePointerOver",
00624 "RadioButtonOuterEllipseStrokeDisabled",
00625 "RadioButtonOuterEllipseFill",
00626 "RadioButtonOuterEllipseFillPressed",
00627 "RadioButtonOuterEllipseFillPointerOver",
00628 "RadioButtonOuterEllipseFillDisabled",
00629 "RadioButtonOuterEllipseCheckedStroke",
00630 "RadioButtonOuterEllipseCheckedStrokePressed",
00631 "RadioButtonOuterEllipseCheckedStrokePointerOver",
00632 "RadioButtonOuterEllipseCheckedStrokeDisabled",
00633 "RadioButtonOuterEllipseCheckedFill",
00634 "RadioButtonOuterEllipseCheckedFillPressed",
00635 "RadioButtonOuterEllipseCheckedFillPointerOver",
00636 "RadioButtonOuterEllipseCheckedFillDisabled",
00637 "RadioButtonForeground",
00638 "RadioButtonForegroundThemeBrush",
00639 "RadioButtonForegroundPressed",
00640 "RadioButtonForegroundPointerOver",
00641 "RadioButtonForegroundDisabled",
00642 "RadioButtonDisabledForegroundThemeBrush",
00643 "RadioButtonDisabledBorderThemeBrush",
00644 "RadioButtonDisabledBackgroundThemeBrush",
00645 "RadioButtonContentPointerOverForegroundThemeBrush",
00646 "RadioButtonContentForegroundThemeBrush",
00647 "RadioButtonContentDisabledForegroundThemeBrush",
00648 "RadioButtonCheckGlyphStroke",
00649 "RadioButtonCheckGlyphStrokePressed",
00650 "RadioButtonCheckGlyphStrokePointerOver",
00651 "RadioButtonCheckGlyphStrokeDisabled",
00652 "RadioButtonCheckGlyphFill",
00653 "RadioButtonCheckGlyphFillPressed",
00654 "RadioButtonCheckGlyphFillPointerOver",
00655 "RadioButtonCheckGlyphFillDisabled",
00656 "RadioButtonBorderThemeThickness",
00657 "RadioButtonBorderThemeBrush",
00658 "RadioButtonBorderBrush",
00659 "RadioButtonBorderBrushPressed",
00660 "RadioButtonBorderBrushPointerOver",
00661 "RadioButtonBorderBrushDisabled",
00662 "RadioButtonBackground",
00663 "RadioButtonBackgroundThemeBrush",
00664 "RadioButtonBackgroundPressed",
00665 "RadioButtonBackgroundPointerOver",
00666 "RadioButtonBackgroundDisabled",
00667 "ProgressRingForegroundThemeBrush",
00668 "ProgressRingBackgroundThemeBrush",
00669 "ProgressBarThemeMinHeight",
00670 "ProgressBarIndicatorPauseOpacity",
00671 "ProgressBarIndeterminateForegroundThemeBrush",
00672 "ProgressBarForegroundThemeBrush",
00673 "ProgressBarBorderThemeThickness",
00674 "ProgressBarBorderThemeBrush",
00675 "ProgressBarBackgroundThemeBrush",
00676 "PivotTitleThemeFontWeight",
00677 "PivotTitleFontSize",
00678 "PivotTitleFontFamily",
00679 "PivotPreviousButtonForeground",
00680 "PivotPreviousButtonForegroundPressed",
00681 "PivotPreviousButtonForegroundPointerOver",
00682 "PivotPreviousButtonBorderBrush",
00683 "PivotPreviousButtonBorderBrushPressed",
00684 "PivotPreviousButtonBorderBrushPointerOver",
00685 "PivotPreviousButtonBackground",
00686 "PivotPreviousButtonBackgroundPressed",
00687 "PivotPreviousButtonBackgroundPointerOver",
00688 "PivotPortraitThemePadding",
00689 "PivotNextButtonForeground",
00690 "PivotNextButtonForegroundPressed",
00691 "PivotNextButtonForegroundPointerOver",
00692 "PivotNextButtonBorderBrush",
00693 "PivotNextButtonBorderBrushPressed",
00694 "PivotNextButtonBorderBrushPointerOver",
00695 "PivotNextButtonBackground",
00696 "PivotNextButtonBackgroundPressed",
00697 "PivotNextButtonBackgroundPointerOver",
00698 "PivotNavButtonPressedForegroundThemeBrush",
00699 "PivotNavButtonPressedBorderThemeBrush",
00700 "PivotNavButtonPressedBackgroundThemeBrush",
00701 "PivotNavButtonPointerOverForegroundThemeBrush",
00702 "PivotNavButtonPointerOverBorderThemeBrush",
00703 "PivotNavButtonPointerOverBackgroundThemeBrush",
00704 "PivotNavButtonMargin",
00705 "PivotNavButtonForegroundThemeBrush",
00706 "PivotNavButtonBorderThemeThickness",
00707 "PivotNavButtonBorderThemeBrush",
00708 "PivotNavButtonBackgroundThemeBrush",
00709 "PivotLandscapeThemePadding",
00710 "PivotItemMargin",
00711 "PivotItemBackground",
00712 "PivotHeaderItemThemeFontWeight",
00713 "PivotHeaderItemSelectedPipeFill",
00714 "PivotHeaderItemMargin",
00715 "PivotHeaderItemLockedTranslation",
00716 "PivotHeaderItemForegroundUnselected",
00717 "PivotHeaderItemForegroundUnselectedPressed",
00718 "PivotHeaderItemForegroundUnselectedPointerOver",
00719 "PivotHeaderItemForegroundSelected",
00720 "PivotHeaderItemForegroundSelectedPressed",
00721 "PivotHeaderItemForegroundSelectedPointerOver",
00722 "PivotHeaderItemForegroundDisabled",
00723 "PivotHeaderItemFontSize",
00724 "PivotHeaderItemFontFamily",
00725 "PivotHeaderItemFocusPipeFill",
00726 "PivotHeaderItemCharacterSpacing",
00727 "PivotHeaderItemBackgroundUnselected",
00728 "PivotHeaderItemBackgroundUnselectedPressed",
00729 "PivotHeaderItemBackgroundUnselectedPointerOver",
00730 "PivotHeaderItemBackgroundSelected",
00731 "PivotHeaderItemBackgroundSelectedPressed",
00732 "PivotHeaderItemBackgroundSelectedPointerOver",
00733 "PivotHeaderItemBackgroundDisabled",
00734 "PivotHeaderForegroundUnselectedBrush",
00735 "PivotHeaderForegroundSelectedBrush",
00736 "PivotHeaderBackground",
00737 "PivotHeaderBackgroundUnselectedBrush",
00738 "PivotHeaderBackgroundSelectedBrush",
00739 "PivotForegroundThemeBrush",
00740 "PivotBackground",
00741 "PersonPictureForegroundThemeBrush",
00742 "PersonPictureEllipseStrokeThickness",
00743 "PersonPictureEllipseFillThemeBrush",
00744 "PersonPictureEllipseBadgeStrokeThickness",
00745 "PersonPictureEllipseBadgeStrokeThemeBrush",
00746 "PersonPictureEllipseBadgeStrokeOpacity",
00747 "PersonPictureEllipseBadgeImageSourceStrokeOpacity",
00748 "PersonPictureEllipseBadgeForegroundThemeBrush",
00749 "PersonPictureEllipseBadgeFillThemeBrush",
00750 "PagerControlSelectionIndicatorForeground",
00751 "PagerControlPageNavigationButtonForegroundPressed",
00752 "PagerControlPageNavigationButtonForegroundPointerOver",
00753 "PagerControlPageNavigationButtonForegroundDisabled",
00754 "PagerControlPageNavigationButtonBackgroundPressed",
00755 "PagerControlPageNavigationButtonBackgroundPointerOver",
00756 "PagerControlPageNavigationButtonBackgroundDisabled",
00757 "OverlayCornerRadius",
00758 "NumberBoxPopupSpinButtonBorderThickness",
00759 "NumberBoxPopupSpinButtonBackground",
00760 "NumberBoxPopupIndicatorForeground",
00761 "NumberBoxPopupBorderThickness",
00762 "NumberBoxPopupBorderBrush",
00763 "NumberBoxPopupBackground",
00764 "NavigationViewTopPaneBackground",
00765 "NavigationViewSelectionIndicatorForeground",
00766 "NavigationViewItemSeparatorForeground",
00767 "NavigationViewItemForeground",
00768 "NavigationViewItemForegroundSelected",
00769 "NavigationViewItemForegroundSelectedPressed",
00770 "NavigationViewItemForegroundSelectedPointerOver",
00771 "NavigationViewItemForegroundSelectedDisabled",
00772 "NavigationViewItemForegroundPressed",
00773 "NavigationViewItemForegroundPointerOver",
00774 "NavigationViewItemForegroundDisabled",
00775 "NavigationViewItemForegroundChecked",
00776 "NavigationViewItemForegroundCheckedPressed",
00777 "NavigationViewItemForegroundCheckedPointerOver",
00778 "NavigationViewItemForegroundCheckedDisabled",
00779 "NavigationViewItemBorderBrush",
00780 "NavigationViewItemBorderBrushSelected",
00781 "NavigationViewItemBorderBrushSelectedPressed",
00782 "NavigationViewItemBorderBrushSelectedPointerOver",
00783 "NavigationViewItemBorderBrushSelectedDisabled",
00784 "NavigationViewItemBorderBrushPressed",
00785 "NavigationViewItemBorderBrushPointerOver",
00786 "NavigationViewItemBorderBrushDisabled",
00787 "NavigationViewItemBorderBrushChecked",
00788 "NavigationViewItemBorderBrushCheckedPressed",
00789 "NavigationViewItemBorderBrushCheckedPointerOver",
00790 "NavigationViewItemBorderBrushCheckedDisabled",
00791 "NavigationViewItemBackground",
00792 "NavigationViewItemBackgroundSelected",
00793 "NavigationViewItemBackgroundSelectedPressed",
00794 "NavigationViewItemBackgroundSelectedPointerOver",
00795 "NavigationViewItemBackgroundSelectedDisabled",
00796 "NavigationViewItemBackgroundPressed",
00797 "NavigationViewItemBackgroundPointerOver",
00798 "NavigationViewItemBackgroundDisabled",
00799 "NavigationViewItemBackgroundChecked",
00800 "NavigationViewItemBackgroundCheckedPressed",
00801 "NavigationViewItemBackgroundCheckedPointerOver",
00802 "NavigationViewItemBackgroundCheckedDisabled",
00803 "NavigationViewExpandedPaneBackground",
00804 "NavigationViewDefaultPaneBackground",
00805 "NavigationViewButtonForegroundPressed",
00806 "NavigationViewButtonForegroundPointerOver",
00807 "NavigationViewButtonForegroundDisabled",
00808 "NavigationViewButtonBackgroundPressed",
00809 "NavigationViewButtonBackgroundPointerOver",
00810 "NavigationViewButtonBackgroundDisabled",
00811 "NavigationViewBackButtonBackground",
00812 "MenuFlyoutThemeMinHeight",
00813 "MenuFlyoutSubItemRevealBorderBrush",
00814 "MenuFlyoutSubItemRevealBorderBrushSubMenuOpened",
00815 "MenuFlyoutSubItemRevealBorderBrushPressed",
00816 "MenuFlyoutSubItemRevealBorderBrushPointerOver",
00817 "MenuFlyoutSubItemRevealBorderBrushDisabled",
00818 "MenuFlyoutSubItemRevealBackground",
00819 "MenuFlyoutSubItemRevealBackgroundSubMenuOpened",
00820 "MenuFlyoutSubItemRevealBackgroundPressed",
00821 "MenuFlyoutSubItemRevealBackgroundPointerOver",
00822 "MenuFlyoutSubItemRevealBackgroundDisabled",
00823 "MenuFlyoutSubItemForeground",
00824 "MenuFlyoutSubItemForegroundSubMenuOpened",
00825 "MenuFlyoutSubItemForegroundPressed",
00826 "MenuFlyoutSubItemForegroundPointerOver",
00827 "MenuFlyoutSubItemForegroundDisabled",
00828 "MenuFlyoutSubItemChevron",
00829 "MenuFlyoutSubItemChevronSubMenuOpened",
00830 "MenuFlyoutSubItemChevronPressed",
00831 "MenuFlyoutSubItemChevronPointerOver",
00832 "MenuFlyoutSubItemChevronDisabled",
00833 "MenuFlyoutSubItemBackground",
00834 "MenuFlyoutSubItemBackgroundSubMenuOpened",
00835 "MenuFlyoutSubItemBackgroundPressed",
00836 "MenuFlyoutSubItemBackgroundPointerOver",
00837 "MenuFlyoutSubItemBackgroundDisabled",
00838 "MenuFlyoutSeparatorThemePadding",
00839 "MenuFlyoutSeparatorThemeHeight",
00840 "MenuFlyoutSeparatorThemeBrush",
00841 "MenuFlyoutPresenterThemePadding",
00842 "MenuFlyoutPresenterBorderThemeThickness",
00843 "MenuFlyoutPresenterBorderBrush",
00844 "MenuFlyoutPresenterBackground",
00845 "MenuFlyoutLightDismissOverlayBackground",
00846 "MenuFlyoutItemThemePadding",
00847 "MenuFlyoutItemThemePaddingNarrow",
00848 "MenuFlyoutItemRevealBorderBrush",
00849 "MenuFlyoutItemRevealBorderBrushPressed",
00850 "MenuFlyoutItemRevealBorderBrushPointerOver",
00851 "MenuFlyoutItemRevealBorderBrushDisabled",
00852 "MenuFlyoutItemRevealBackground",
00853 "MenuFlyoutItemRevealBackgroundPressed",
00854 "MenuFlyoutItemRevealBackgroundPointerOver",
00855 "MenuFlyoutItemRevealBackgroundDisabled",
00856 "MenuFlyoutItemPressedForegroundThemeBrush",
00857 "MenuFlyoutItemPressedBackgroundThemeBrush",
00858 "MenuFlyoutItemPointerOverForegroundThemeBrush",
00859 "MenuFlyoutItemPointerOverBackgroundThemeBrush",
00860 "MenuFlyoutItemPlaceholderThemeThickness",
00861 "MenuFlyoutItemKeyboardAcceleratorTextForeground",
00862 "MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed",
00863 "MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver",
00864 "MenuFlyoutItemKeyboardAcceleratorTextForegroundDisabled",
00865 "MenuFlyoutItemForeground",
00866 "MenuFlyoutItemForegroundPressed",
00867 "MenuFlyoutItemForegroundPointerOver",
00868 "MenuFlyoutItemForegroundDisabled",
00869 "MenuFlyoutItemFocusedForegroundThemeBrush",
00870 "MenuFlyoutItemFocusedBackgroundThemeBrush",
00871 "MenuFlyoutItemDoublePlaceholderThemeThickness",
00872 "MenuFlyoutItemDisabledForegroundThemeBrush",
00873 "MenuFlyoutItemChevronMargin",
00874 "MenuFlyoutItemCheckGlyphMargin",
00875 "MenuFlyoutItemBackground",
00876 "MenuFlyoutItemBackgroundPressed",
00877 "MenuFlyoutItemBackgroundPointerOver",
00878 "MenuFlyoutItemBackgroundDisabled",
00879 "MenuBarItemBorderThickness",
00880 "MenuBarItemBorderBrush",
00881 "MenuBarItemBorderBrushSelected",
00882 "MenuBarItemBorderBrushPressed",
00883 "MenuBarItemBorderBrushPointerOver",
00884 "MenuBarItemBackground",
00885 "MenuBarItemBackgroundSelected",
00886 "MenuBarItemBackgroundPressed",
00887 "MenuBarItemBackgroundPointerOver",
00888 "MenuBarBackground",
00889 "MediaTransportControlsTitleSafeBounds",
00890 "MediaTransportControlsPanelBackground",
00891 "MediaTransportControlsFlyoutBackground",
00892 "MUX_RatingControlDefaultFontInfo",
00893 "ListViewItemSelectionCheckMarkVisualEnabled",
00894 "ListViewItemSelectedPointerOverBorderThemeBrush",
00895 "ListViewItemSelectedPointerOverBackgroundThemeBrush",
00896 "ListViewItemSelectedForegroundThemeBrush",
00897 "ListViewItemSelectedBorderThemeThickness",
00898 "ListViewItemSelectedBackgroundThemeBrush",
00899 "ListViewItemRevealPlaceholderBackground",
00900 "ListViewItemRevealBorderThemeThickness",
00901 "ListViewItemRevealBorderBrush",
00902 "ListViewItemRevealBorderBrushPressed",
00903 "ListViewItemRevealBorderBrushPointerOver",
00904 "ListViewItemRevealBackground",
00905 "ListViewItemRevealBackgroundSelected",
00906 "ListViewItemRevealBackgroundSelectedPressed",
00907 "ListViewItemRevealBackgroundSelectedPointerOver",
00908 "ListViewItemRevealBackgroundPressed",
00909 "ListViewItemRevealBackgroundPointerOver",
00910 "ListViewItemReorderThemeOpacity",
00911 "ListViewItemReorderTargetThemeScale",
00912 "ListViewItemReorderTargetThemeOpacity",
00913 "ListViewItemReorderHintThemeOffset",
00914 "ListViewItemPointerOverBackgroundThemeBrush",
00915 "ListViewItemPlaceholderBackground",
00916 "ListViewItemPlaceholderBackgroundThemeBrush",
00917 "ListViewItemOverlaySecondaryForegroundThemeBrush",
00918 "ListViewItemOverlayForegroundThemeBrush",
00919 "ListViewItemOverlayBackgroundThemeBrush",
00920 "ListViewItemMinWidth",
00921 "ListViewItemMinHeight",
00922 "ListViewItemForeground",
00923 "ListViewItemForegroundSelected",
00924 "ListViewItemForegroundPointerOver",
00925 "ListViewItemFocusVisualSecondaryBrush",
00926 "ListViewItemFocusVisualPrimaryBrush",
00927 "ListViewItemFocusSecondaryBorderBrush",
00928 "ListViewItemFocusBorderThemeBrush",
00929 "ListViewItemFocusBorderBrush",
00930 "ListViewItemDragThemeOpacity",
00931 "ListViewItemDragForeground",
00932 "ListViewItemDragForegroundThemeBrush",
00933 "ListViewItemDragBackground",
00934 "ListViewItemDragBackgroundThemeBrush",
00935 "ListViewItemDisabledThemeOpacity",
00936 "ListViewItemContentOffsetX",
00937 "ListViewItemCompactSelectedBorderThemeThickness",
00938 "ListViewItemCheckThemeBrush",
00939 "ListViewItemCheckSelectingThemeBrush",
00940 "ListViewItemCheckMode",
00941 "ListViewItemCheckHintThemeBrush",
00942 "ListViewItemCheckBrush",
00943 "ListViewItemCheckBoxBrush",
00944 "ListViewItemBackground",
00945 "ListViewItemBackgroundSelected",
00946 "ListViewItemBackgroundSelectedPressed",
00947 "ListViewItemBackgroundSelectedPointerOver",
00948 "ListViewItemBackgroundPressed",
00949 "ListViewItemBackgroundPointerOver",
00950 "ListBoxItemSelectedPointerOverBackgroundThemeBrush",
00951 "ListBoxItemSelectedForegroundThemeBrush",
00952 "ListBoxItemSelectedDisabledForegroundThemeBrush",
00953 "ListBoxItemSelectedDisabledBackgroundThemeBrush",
00954 "ListBoxItemSelectedBackgroundThemeBrush",
00955 "ListBoxItemPressedForegroundThemeBrush",
00956 "ListBoxItemPressedBackgroundThemeBrush",
00957 "ListBoxItemPointerOverForegroundThemeBrush",
00958 "ListBoxItemPointerOverBackgroundThemeBrush",
00959 "ListBoxItemDisabledForegroundThemeBrush",
00960 "ListBoxForegroundThemeBrush",
00961 "ListBoxFocusBackgroundThemeBrush",
00962 "ListBoxDisabledForegroundThemeBrush",
00963 "ListBoxBorderThemeThickness",
00964 "ListBoxBorderThemeBrush",
00965 "ListBoxBackgroundThemeBrush",
00966 "InfoBarWarningSeverityIconForeground",
00967 "InfoBarWarningSeverityBackgroundBrush",
00968 "InfoBarTitleForeground",
00969 "InfoBarSuccessSeverityIconForeground",
00970 "InfoBarSuccessSeverityBackgroundBrush",
00971 "InfoBarMessageForeground",
00972 "InfoBarInformationalSeverityIconForeground",
00973 "InfoBarInformationalSeverityBackgroundBrush",
00974 "InfoBarHyperlinkButtonForeground",
00975 "InfoBarErrorSeverityIconForeground",
00976 "InfoBarErrorSeverityBackgroundBrush",
00977 "InfoBarBorderThickness",
00978 "InfoBarBorderBrush",
00979 "GridViewItemRevealPlaceholderBackground",
00980 "GridViewItemRevealBorderThemeThickness",
00981 "GridViewItemRevealBorderBrush",
00982 "GridViewItemRevealBackground",
00983 "GridViewItemRevealBackgroundSelected",
00984 "GridViewItemRevealBackgroundSelectedPressed",
00985 "GridViewItemRevealBackgroundSelectedPointerOver",
00986 "GridViewItemRevealBackgroundPressed",
00987 "GridViewItemRevealBackgroundPointerOver",
00988 "FlyoutPresenterBackground",
00989 "FlyoutBorderThemeThickness",
00990 "FlyoutBorderThemePadding",
00991 "FlyoutBorderThemeBrush",
00992 "FlipViewNextPreviousButtonBorderBrush",
00993 "FlipViewNextPreviousButtonBorderBrushPressed",
00994 "FlipViewNextPreviousButtonBorderBrushPointerOver",
00995 "FlipViewNextPreviousButtonBackground",
00996 "FlipViewNextPreviousButtonBackgroundPressed",
00997 "FlipViewNextPreviousButtonBackgroundPointerOver",
00998 "FlipViewNextPreviousArrowForeground",
00999 "FlipViewNextPreviousArrowForegroundPressed",
01000 "FlipViewNextPreviousArrowForegroundPointerOver",
01001 "FlipViewItemBackground",
01002 "FlipViewButtonPressedForegroundThemeBrush",
01003 "FlipViewButtonPressedBorderThemeBrush",
01004 "FlipViewButtonPressedBackgroundThemeBrush",
01005 "FlipViewButtonPointerOverForegroundThemeBrush",
01006 "FlipViewButtonPointerOverBorderThemeBrush",
01007 "FlipViewButtonPointerOverBackgroundThemeBrush",
01008 "FlipViewButtonForegroundThemeBrush",
01009 "FlipViewButtonBorderThemeThickness",
01010 "FlipViewButtonBorderThemeBrush",
01011 "FlipViewButtonBackgroundThemeBrush",
01012 "FlipViewBackground",
01013 "ExpanderHeaderBackground",
01014 "ExpanderChevronForeground",
01015 "ExpanderChevronBackground",
01016 "DateTimePickerFlyoutButtonForegroundPressed",
01017 "DateTimePickerFlyoutButtonForegroundPointerOver",
01018 "DateTimePickerFlyoutButtonBorderBrush",
01019 "DateTimePickerFlyoutButtonBorderBrushPressed",
01020 "DateTimePickerFlyoutButtonBorderBrushPointerOver",
01021 "DateTimePickerFlyoutButtonBackground",
01022 "DateTimePickerFlyoutButtonBackgroundPressed",
01023 "DateTimePickerFlyoutButtonBackgroundPointerOver",
01024 "DatePickerSpacingThemeWidth",
01025 "DatePickerSpacingThemeHeight",
01026 "DatePickerSpacerThemeWidth",
01027 "DatePickerSpacerFill",
01028 "DatePickerSpacerFillDisabled",
01029 "DatePickerSelectorThemeMinWidth",
01030 "DatePickerLightDismissOverlayBackground",
01031 "DatePickerHeaderThemeMargin",
01032 "DatePickerHeaderThemeFontWeight",
01033 "DatePickerHeaderForeground",
01034 "DatePickerHeaderForegroundThemeBrush",
01035 "DatePickerHeaderForegroundDisabled",
01036 "DatePickerForegroundThemeBrush",
01037 "DatePickerFlyoutPresenterSpacerFill",
01038 "DatePickerFlyoutPresenterHighlightFill",
01039 "DatePickerFlyoutPresenterBorderBrush",
01040 "DatePickerFlyoutPresenterBackground",
01041 "DatePickerButtonForeground",
01042 "DatePickerButtonForegroundPressed",
01043 "DatePickerButtonForegroundPointerOver",
01044 "DatePickerButtonForegroundFocused",
01045 "DatePickerButtonForegroundDisabled",
01046 "DatePickerButtonBorderBrush",
01047 "DatePickerButtonBorderBrushPressed",
01048 "DatePickerButtonBorderBrushPointerOver",
01049 "DatePickerButtonBorderBrushDisabled",
01050 "DatePickerButtonBackground",
01051 "DatePickerButtonBackgroundPressed",
01052 "DatePickerButtonBackgroundPointerOver",
01053 "DatePickerButtonBackgroundFocused",
01054 "DatePickerButtonBackgroundDisabled",
01055 "DatePickerBorderThemeThickness",
01056 "ControlCornerRadius",
01057 "ContentDialogTitleMaxHeight",
01058 "ContentDialogTitleMargin",
01059 "ContentDialogPadding",
01060 "ContentDialogMinWidth",
01061 "ContentDialogMinHeight",
01062 "ContentDialogMaxWidth",
01063 "ContentDialogMaxHeight",
01064 "ContentDialogLightDismissOverlayBackground",
01065 "ContentDialogForeground",
01066 "ContentDialogDimmingThemeBrush",
01067 "ContentDialogContentScrollViewerMargin",
01068 "ContentDialogContentMargin",
01069 "ContentDialogContentForegroundBrush",
01070 "ContentDialogCommandSpaceMargin",
01071 "ContentDialogButtonMinWidth",
01072 "ContentDialogButtonMinHeight",
01073 "ContentDialogButtonMaxWidth",
01074 "ContentDialogButtonHeight",
01075 "ContentDialogButton2HostMargin",
01076 "ContentDialogButton1HostMargin",
01077 "ContentDialogBorderWidth",
01078 "ContentDialogBorderThemeBrush",
01079 "ContentDialogBorderBrush",
01080 "ContentDialogBackground",
01081 "ContentDialogBackgroundThemeBrush",
01082 "CommandBarOverflowTouchMinWidth",
01083 "CommandBarOverflowPresenterBorderUpThickness",
01084 "CommandBarOverflowPresenterBorderUpPadding",
01085 "CommandBarOverflowPresenterBorderThickness",
01086 "CommandBarOverflowPresenterBorderPadding",
01087 "CommandBarOverflowPresenterBorderDownThickness",
01088 "CommandBarOverflowPresenterBorderDownPadding",
01089 "CommandBarOverflowPresenterBorderBrush",
01090 "CommandBarOverflowPresenterBackground",
01091 "CommandBarOverflowMinWidth",
01092 "CommandBarOverflowMaxWidth",
01093 "CommandBarOverflowMaxHeight",
01094 "CommandBarLightDismissOverlayBackground",
01095 "CommandBarHighContrastBorder",
01096 "CommandBarForeground",
01097 "CommandBarFlyoutButtonBackground",
01098 "CommandBarFlyoutBorderUpThemeThickness",
01099 "CommandBarFlyoutBorderThemeThickness",
01100 "CommandBarFlyoutBorderDownThemeThickness",
01101 "CommandBarEllipsisIconForegroundDisabled",
01102 "CommandBarBackground",
01103 "ComboBoxThemeMinWidth",
01104 "ComboBoxSelectedPointerOverBackgroundThemeBrush",
01105 "ComboBoxSelectedBackgroundThemeBrush",
01106 "ComboBoxPressedHighlightThemeBrush",
01107 "ComboBoxPressedForegroundThemeBrush",
01108 "ComboBoxPressedBorderThemeBrush",
01109 "ComboBoxPressedBackgroundThemeBrush",
01110 "ComboBoxPopupThemeTouchMinWidth",
01111 "ComboBoxPopupThemeMinWidth",
01112 "ComboBoxPopupForegroundThemeBrush",
01113 "ComboBoxPopupBorderThemeThickness",
01114 "ComboBoxPopupBorderThemeBrush",
01115 "ComboBoxPopupBackgroundThemeBrush",
01116 "ComboBoxPointerOverBorderThemeBrush",
01117 "ComboBoxPointerOverBackgroundThemeBrush",
01118 "ComboBoxPlaceholderTextThemeFontWeight",
01119 "ComboBoxPlaceholderTextForegroundThemeBrush",
01120 "ComboBoxPlaceHolderForeground",
01121 "ComboBoxPlaceHolderForegroundPressed",
01122 "ComboBoxPlaceHolderForegroundPointerOver",
01123 "ComboBoxPlaceHolderForegroundFocused",
01124 "ComboBoxPlaceHolderForegroundFocusedPressed",
01125 "ComboBoxPlaceHolderForegroundDisabled",
01126 "ComboBoxLightDismissOverlayBackground",
01127 "ComboBoxItemThemeTouchPadding",
01128 "ComboBoxItemThemePadding",
01129 "ComboBoxItemThemeGameControllerPadding",
01130 "ComboBoxItemSelectedPointerOverBackgroundThemeBrush",
01131 "ComboBoxItemSelectedForegroundThemeBrush",
01132 "ComboBoxItemSelectedDisabledForegroundThemeBrush",
01133 "ComboBoxItemSelectedDisabledBackgroundThemeBrush",
01134 "ComboBoxItemSelectedBackgroundThemeBrush",
01135 "ComboBoxItemRevealThemeTouchPadding",
01136 "ComboBoxItemRevealThemePadding",
01137 "ComboBoxItemRevealThemeGameControllerPadding",
01138 "ComboBoxItemRevealBorderThemeThickness",
01139 "ComboBoxItemRevealBorderBrush",
01140 "ComboBoxItemRevealBorderBrushSelected",
01141 "ComboBoxItemRevealBorderBrushSelectedUnfocused",
01142 "ComboBoxItemRevealBorderBrushSelectedPressed",
01143 "ComboBoxItemRevealBorderBrushSelectedPointerOver",
01144 "ComboBoxItemRevealBorderBrushSelectedDisabled",
01145 "ComboBoxItemRevealBorderBrushPressed",
01146 "ComboBoxItemRevealBorderBrushPointerOver",
01147 "ComboBoxItemRevealBorderBrushDisabled",
01148 "ComboBoxItemRevealBackground",
01149 "ComboBoxItemRevealBackgroundSelected",
01150 "ComboBoxItemRevealBackgroundSelectedUnfocused",
01151 "ComboBoxItemRevealBackgroundSelectedPressed",
01152 "ComboBoxItemRevealBackgroundSelectedPointerOver",
01153 "ComboBoxItemRevealBackgroundSelectedDisabled",
01154 "ComboBoxItemRevealBackgroundPressed",
01155 "ComboBoxItemRevealBackgroundPointerOver",
01156 "ComboBoxItemRevealBackgroundDisabled",
01157 "ComboBoxItemPressedForegroundThemeBrush",
01158 "ComboBoxItemPressedBackgroundThemeBrush",
01159 "ComboBoxItemPointerOverForegroundThemeBrush",
01160 "ComboBoxItemPointerOverBackgroundThemeBrush",
01161 "ComboBoxItemForeground",
01162 "ComboBoxItemForegroundSelected",
01163 "ComboBoxItemForegroundSelectedUnfocused",
01164 "ComboBoxItemForegroundSelectedPressed",
01165 "ComboBoxItemForegroundSelectedPointerOver",
01166 "ComboBoxItemForegroundSelectedDisabled",
01167 "ComboBoxItemForegroundPressed",
01168 "ComboBoxItemForegroundPointerOver",
01169 "ComboBoxItemForegroundDisabled",
01170 "ComboBoxItemDisabledForegroundThemeBrush",
01171 "ComboBoxItemBorderBrush",
01172 "ComboBoxItemBorderBrushSelected",
01173 "ComboBoxItemBorderBrushSelectedUnfocused",
01174 "ComboBoxItemBorderBrushSelectedPressed",
01175 "ComboBoxItemBorderBrushSelectedPointerOver",
01176 "ComboBoxItemBorderBrushSelectedDisabled",
01177 "ComboBoxItemBorderBrushPressed",
01178 "ComboBoxItemBorderBrushPointerOver",
01179 "ComboBoxItemBorderBrushDisabled",
01180 "ComboBoxItemBackground",
01181 "ComboBoxItemBackgroundSelected",
01182 "ComboBoxItemBackgroundSelectedUnfocused",
01183 "ComboBoxItemBackgroundSelectedPressed",
01184 "ComboBoxItemBackgroundSelectedPointerOver",
01185 "ComboBoxItemBackgroundSelectedDisabled",
01186 "ComboBoxItemBackgroundPressed",
01187 "ComboBoxItemBackgroundPointerOver",
01188 "ComboBoxItemBackgroundDisabled",
01189 "ComboBoxHeaderThemeMargin",
01190 "ComboBoxHeaderThemeFontWeight",
01191 "ComboBoxHeaderForeground",
01192 "ComboBoxHeaderForegroundThemeBrush",
01193 "ComboBoxHeaderForegroundDisabled",
01194 "ComboBoxForeground",
01195 "ComboBoxForegroundThemeBrush",
01196 "ComboBoxForegroundPressed",
01197 "ComboBoxForegroundPointerOver",
01198 "ComboBoxForegroundFocused",
01199 "ComboBoxForegroundFocusedPressed",
01200 "ComboBoxForegroundDisabled",
01201 "ComboBoxFocusedForegroundThemeBrush",
01202 "ComboBoxFocusedDropDownBackgroundPointerPressed",
01203 "ComboBoxFocusedDropDownBackgroundPointerOver",
01204 "ComboBoxFocusedBorderThemeBrush",
01205 "ComboBoxFocusedBackgroundThemeBrush",
01206 "ComboBoxEditableDropDownGlyphForeground",
01207 "ComboBoxDropdownContentMargin",
01208 "ComboBoxDropdownBorderThickness",
01209 "ComboBoxDropdownBorderPadding",
01210 "ComboBoxDropDownGlyphForeground",
01211 "ComboBoxDropDownGlyphForegroundFocused",
01212 "ComboBoxDropDownGlyphForegroundFocusedPressed",
01213 "ComboBoxDropDownGlyphForegroundDisabled",
01214 "ComboBoxDropDownForeground",
01215 "ComboBoxDropDownBorderBrush",
01216 "ComboBoxDropDownBackground",
01217 "ComboBoxDropDownBackgroundPointerPressed",
01218 "ComboBoxDropDownBackgroundPointerOver",
01219 "ComboBoxDisabledForegroundThemeBrush",
01220 "ComboBoxDisabledBorderThemeBrush",
01221 "ComboBoxDisabledBackgroundThemeBrush",
01222 "ComboBoxBorderThemeThickness",
01223 "ComboBoxBorderThemeBrush",
01224 "ComboBoxBorderBrush",
01225 "ComboBoxBorderBrushPressed",
01226 "ComboBoxBorderBrushPointerOver",
01227 "ComboBoxBorderBrushDisabled",
01228 "ComboBoxBackground",
01229 "ComboBoxBackgroundThemeBrush",
01230 "ComboBoxBackgroundPressed",
01231 "ComboBoxBackgroundPointerOver",
01232 "ComboBoxBackgroundFocused",
01233 "ComboBoxBackgroundDisabled",
01234 "ComboBoxBackgroundBorderBrushUnfocused",
01235 "ComboBoxBackgroundBorderBrushFocused",
01236 "ComboBoxArrowThemeFontSize",
01237 "ComboBoxArrowPressedForegroundThemeBrush",
01238 "ComboBoxArrowForegroundThemeBrush",
01239 "ComboBoxArrowDisabledForegroundThemeBrush",
01240 "ColorPickerSliderTrackFillDisabled",
01241 "ColorPickerSliderThumbBackground",
01242 "ColorPickerSliderThumbBackgroundPressed",
01243 "ColorPickerSliderThumbBackgroundPointerOver",
01244 "ColorPickerSliderThumbBackgroundDisabled",
01245 "CheckBoxPressedForegroundThemeBrush",
01246 "CheckBoxPressedBorderThemeBrush",
01247 "CheckBoxPressedBackgroundThemeBrush",
01248 "CheckBoxPointerOverForegroundThemeBrush",
01249 "CheckBoxPointerOverBorderThemeBrush",
01250 "CheckBoxPointerOverBackgroundThemeBrush",
01251 "CheckBoxForegroundUnchecked",
01252 "CheckBoxForegroundUncheckedPressed",
01253 "CheckBoxForegroundUncheckedPointerOver",
01254 "CheckBoxForegroundUncheckedDisabled",
01255 "CheckBoxForegroundThemeBrush",
01256 "CheckBoxForegroundIndeterminate",
01257 "CheckBoxForegroundIndeterminatePressed",
01258 "CheckBoxForegroundIndeterminatePointerOver",
01259 "CheckBoxForegroundIndeterminateDisabled",
01260 "CheckBoxForegroundChecked",
01261 "CheckBoxForegroundCheckedPressed",
01262 "CheckBoxForegroundCheckedPointerOver",
01263 "CheckBoxForegroundCheckedDisabled",
01264 "CheckBoxDisabledForegroundThemeBrush",
01265 "CheckBoxDisabledBorderThemeBrush",
01266 "CheckBoxDisabledBackgroundThemeBrush",
01267 "CheckBoxContentForegroundThemeBrush",
01268 "CheckBoxContentDisabledForegroundThemeBrush",
01269 "CheckBoxCheckedStrokeThickness",
01270 "CheckBoxCheckGlyphForegroundUnchecked",
01271 "CheckBoxCheckGlyphForegroundUncheckedPressed",
01272 "CheckBoxCheckGlyphForegroundUncheckedPointerOver",
01273 "CheckBoxCheckGlyphForegroundUncheckedDisabled",
01274 "CheckBoxCheckGlyphForegroundIndeterminate",
01275 "CheckBoxCheckGlyphForegroundIndeterminatePressed",
01276 "CheckBoxCheckGlyphForegroundIndeterminatePointerOver",
01277 "CheckBoxCheckGlyphForegroundIndeterminateDisabled",
01278 "CheckBoxCheckGlyphForegroundChecked",
01279 "CheckBoxCheckGlyphForegroundCheckedPressed",
01280 "CheckBoxCheckGlyphForegroundCheckedPointerOver",
01281 "CheckBoxCheckGlyphForegroundCheckedDisabled",
01282 "CheckBoxCheckBackgroundStrokeUnchecked",
01283 "CheckBoxCheckBackgroundStrokeUncheckedPressed",
01284 "CheckBoxCheckBackgroundStrokeUncheckedPointerOver",
01285 "CheckBoxCheckBackgroundStrokeUncheckedDisabled",
01286 "CheckBoxCheckBackgroundStrokeIndeterminate",
01287 "CheckBoxCheckBackgroundStrokeIndeterminatePressed",
01288 "CheckBoxCheckBackgroundStrokeIndeterminatePointerOver",
01289 "CheckBoxCheckBackgroundStrokeIndeterminateDisabled",
01290 "CheckBoxCheckBackgroundStrokeChecked",
01291 "CheckBoxCheckBackgroundStrokeCheckedPressed",
01292 "CheckBoxCheckBackgroundStrokeCheckedPointerOver",
01293 "CheckBoxCheckBackgroundStrokeCheckedDisabled",
01294 "CheckBoxCheckBackgroundFillUnchecked",
01295 "CheckBoxCheckBackgroundFillUncheckedPressed",
01296 "CheckBoxCheckBackgroundFillUncheckedPointerOver",
01297 "CheckBoxCheckBackgroundFillUncheckedDisabled",
01298 "CheckBoxCheckBackgroundFillIndeterminate",
01299 "CheckBoxCheckBackgroundFillIndeterminatePressed",
01300 "CheckBoxCheckBackgroundFillIndeterminatePointerOver",
01301 "CheckBoxCheckBackgroundFillIndeterminateDisabled",
01302 "CheckBoxCheckBackgroundFillChecked",
01303 "CheckBoxCheckBackgroundFillCheckedPressed",
01304 "CheckBoxCheckBackgroundFillCheckedPointerOver",
01305 "CheckBoxCheckBackgroundFillCheckedDisabled",
01306 "CheckBoxBorderThemeThickness",
01307 "CheckBoxBorderThemeBrush",
01308 "CheckBoxBorderBrushUnchecked",
01309 "CheckBoxBorderBrushUncheckedPressed",
01310 "CheckBoxBorderBrushUncheckedPointerOver",
01311 "CheckBoxBorderBrushUncheckedDisabled",
01312 "CheckBoxBorderBrushIndeterminate",
01313 "CheckBoxBorderBrushIndeterminatePressed",
01314 "CheckBoxBorderBrushIndeterminatePointerOver",
01315 "CheckBoxBorderBrushIndeterminateDisabled",
01316 "CheckBoxBorderBrushChecked",
01317 "CheckBoxBorderBrushCheckedPressed",
01318 "CheckBoxBorderBrushCheckedPointerOver",
01319 "CheckBoxBorderBrushCheckedDisabled",
01320 "CheckBoxBackgroundUnchecked",
01321 "CheckBoxBackgroundUncheckedPressed",
01322 "CheckBoxBackgroundUncheckedPointerOver",
01323 "CheckBoxBackgroundUncheckedDisabled",
01324 "CheckBoxBackgroundThemeBrush",
01325 "CheckBoxBackgroundIndeterminate",
01326 "CheckBoxBackgroundIndeterminatePressed",
01327 "CheckBoxBackgroundIndeterminatePointerOver",
01328 "CheckBoxBackgroundIndeterminateDisabled",
01329 "CheckBoxBackgroundChecked",
01330 "CheckBoxBackgroundCheckedPressed",
01331 "CheckBoxBackgroundCheckedPointerOver",
01332 "CheckBoxBackgroundCheckedDisabled",
01333 "CalendarViewWeekDayForegroundDisabled",
01334 "CalendarViewTodayForeground",
01335 "CalendarViewSelectedPressedBorderBrush",
01336 "CalendarViewSelectedHoverBorderBrush",
01337 "CalendarViewSelectedForeground",
01338 "CalendarViewSelectedBorderBrush",
01339 "CalendarViewPressedForeground",
01340 "CalendarViewPressedBorderBrush",
01341 "CalendarViewOutOfScopeForeground",
01342 "CalendarViewOutOfScopeBackground",
01343 "CalendarViewNavigationButtonForegroundPressed",
01344 "CalendarViewNavigationButtonForegroundPointerOver",
01345 "CalendarViewNavigationButtonForegroundDisabled",
01346 "CalendarViewNavigationButtonBorderBrush",
01347 "CalendarViewNavigationButtonBorderBrushPointerOver",
01348 "CalendarViewNavigationButtonBackground",
01349 "CalendarViewHoverBorderBrush",
01350 "CalendarViewForeground",
01351 "CalendarViewFocusBorderBrush",
01352 "CalendarViewCalendarItemRevealBorderBrush",
01353 "CalendarViewCalendarItemRevealBackground",
01354 "CalendarViewCalendarItemForeground",
01355 "CalendarViewCalendarItemBackground",
01356 "CalendarViewBorderBrush",
01357 "CalendarViewBlackoutForeground",
01358 "CalendarViewBackground",
01359 "CalendarDatePickerTextForeground",
01360 "CalendarDatePickerTextForegroundSelected",
01361 "CalendarDatePickerTextForegroundDisabled",
01362 "CalendarDatePickerLightDismissOverlayBackground",
01363 "CalendarDatePickerHeaderForegroundDisabled",
01364 "CalendarDatePickerForeground",
01365 "CalendarDatePickerForegroundDisabled",
01366 "CalendarDatePickerCalendarGlyphForeground",
01367 "CalendarDatePickerCalendarGlyphForegroundDisabled",
01368 "CalendarDatePickerBorderThemeThickness",
01369 "CalendarDatePickerBorderBrush",
01370 "CalendarDatePickerBorderBrushPressed",
01371 "CalendarDatePickerBorderBrushPointerOver",
01372 "CalendarDatePickerBorderBrushDisabled",
01373 "CalendarDatePickerBackground",
01374 "CalendarDatePickerBackgroundPressed",
01375 "CalendarDatePickerBackgroundPointerOver",
01376 "CalendarDatePickerBackgroundFocused",
01377 "CalendarDatePickerBackgroundDisabled",
01378 "ButtonRevealBorderThemeThickness",
01379 "ButtonRevealBorderBrush",
01380 "ButtonRevealBorderBrushPressed",
01381 "ButtonRevealBorderBrushPointerOver",
01382 "ButtonRevealBorderBrushDisabled",
01383 "ButtonRevealBackground",
01384 "ButtonRevealBackgroundPressed",
01385 "ButtonRevealBackgroundPointerOver",
01386 "ButtonRevealBackgroundDisabled",
01387 "ButtonPressedForegroundThemeBrush",
01388 "ButtonPressedBackgroundThemeBrush",
01389 "ButtonPointerOverForegroundThemeBrush",
01390 "ButtonPointerOverBackgroundThemeBrush",
01391 "ButtonForeground",
01392 "ButtonForegroundThemeBrush",
01393 "ButtonForegroundPressed",
01394 "ButtonForegroundPointerOver",
01395 "ButtonForegroundDisabled",
01396 "ButtonDisabledForegroundThemeBrush",
01397 "ButtonDisabledBorderThemeBrush",
01398 "ButtonDisabledBackgroundThemeBrush",
01399 "ButtonBorderThemeThickness",
01400 "ButtonBorderThemeBrush",
01401 "ButtonBorderBrush",
01402 "ButtonBorderBrushPressed",
01403 "ButtonBorderBrushPointerOver",
01404 "ButtonBorderBrushDisabled",
01405 "ButtonBackground",
01406 "ButtonBackgroundThemeBrush",
01407 "ButtonBackgroundPressed",
01408 "ButtonBackgroundPointerOver",
01409 "ButtonBackgroundDisabled",
01410 "AutoSuggestBoxSuggestionsListBorderBrush",
01411 "AutoSuggestBoxSuggestionsListBackground",
01412 "AutoSuggestBoxLightDismissOverlayBackground",
01413 "AutoSuggestBoxIconFontSize",
01414 "AppBarToggleButtonRevealBorderThemeThickness",
01415 "AppBarToggleButtonRevealBorderBrush",
01416 "AppBarToggleButtonRevealBorderBrushPressed",
01417 "AppBarToggleButtonRevealBorderBrushPointerOver",
01418 "AppBarToggleButtonRevealBorderBrushDisabled",
01419 "AppBarToggleButtonRevealBorderBrushChecked",
01420 "AppBarToggleButtonRevealBorderBrushCheckedPressed",
01421 "AppBarToggleButtonRevealBorderBrushCheckedPointerOver",
01422 "AppBarToggleButtonRevealBorderBrushCheckedDisabled",
01423 "AppBarToggleButtonRevealBackground",
01424 "AppBarToggleButtonRevealBackgroundHighLightOverlay",
01425 "AppBarToggleButtonRevealBackgroundHighLightOverlayPressed",
01426 "AppBarToggleButtonRevealBackgroundHighLightOverlayPointerOver",
01427 "AppBarToggleButtonRevealBackgroundHighLightOverlayCheckedPressed",
01428 "AppBarToggleButtonRevealBackgroundHighLightOverlayCheckedPointerOver",
01429 "AppBarToggleButtonRevealBackgroundDisabled",
01430 "AppBarToggleButtonPointerOverBackgroundThemeBrush",
01431 "AppBarToggleButtonOverflowLabelForegroundPressed",
01432 "AppBarToggleButtonOverflowLabelForegroundPointerOver",
01433 "AppBarToggleButtonOverflowLabelForegroundDisabled",
01434 "AppBarToggleButtonOverflowLabelForegroundCheckedPressed",
01435 "AppBarToggleButtonOverflowLabelForegroundCheckedPointerOver",
01436 "AppBarToggleButtonOverflowLabelForegroundCheckedDisabled",
01437 "AppBarToggleButtonKeyboardAcceleratorTextForeground",
01438 "AppBarToggleButtonKeyboardAcceleratorTextForegroundPressed",
01439 "AppBarToggleButtonKeyboardAcceleratorTextForegroundPointerOver",
01440 "AppBarToggleButtonKeyboardAcceleratorTextForegroundDisabled",
01441 "AppBarToggleButtonKeyboardAcceleratorTextForegroundChecked",
01442 "AppBarToggleButtonKeyboardAcceleratorTextForegroundCheckedPressed",
01443 "AppBarToggleButtonKeyboardAcceleratorTextForegroundCheckedPointerOver",
01444 "AppBarToggleButtonKeyboardAcceleratorTextForegroundCheckedDisabled",
01445 "AppBarToggleButtonForeground",
01446 "AppBarToggleButtonForegroundPressed",
01447 "AppBarToggleButtonForegroundPointerOver",
01448 "AppBarToggleButtonForegroundDisabled",
01449 "AppBarToggleButtonForegroundChecked",
01450 "AppBarToggleButtonForegroundCheckedPressed",
01451 "AppBarToggleButtonForegroundCheckedPointerOver",
01452 "AppBarToggleButtonForegroundCheckedDisabled",
01453 "AppBarToggleButtonCheckedPressedForegroundThemeBrush",
01454 "AppBarToggleButtonCheckedPressedBorderThemeBrush",
01455 "AppBarToggleButtonCheckedPressedBackgroundThemeBrush",
01456 "AppBarToggleButtonCheckedPointerOverBorderThemeBrush",
01457 "AppBarToggleButtonCheckedPointerOverBackgroundThemeBrush",
01458 "AppBarToggleButtonCheckedForegroundThemeBrush",
01459 "AppBarToggleButtonCheckedDisabledForegroundThemeBrush",
01460 "AppBarToggleButtonCheckedDisabledBorderThemeBrush",
01461 "AppBarToggleButtonCheckedDisabledBackgroundThemeBrush",
01462 "AppBarToggleButtonCheckedBorderThemeBrush",
01463 "AppBarToggleButtonCheckedBackgroundThemeBrush",
01464 "AppBarToggleButtonCheckGlyphForeground",
01465 "AppBarToggleButtonCheckGlyphForegroundPressed",
01466 "AppBarToggleButtonCheckGlyphForegroundPointerOver",
01467 "AppBarToggleButtonCheckGlyphForegroundDisabled",
01468 "AppBarToggleButtonCheckGlyphForegroundChecked",
01469 "AppBarToggleButtonCheckGlyphForegroundCheckedPressed",
01470 "AppBarToggleButtonCheckGlyphForegroundCheckedPointerOver",
01471 "AppBarToggleButtonCheckGlyphForegroundCheckedDisabled",
01472 "AppBarToggleButtonBorderBrush",
01473 "AppBarToggleButtonBorderBrushPressed",
01474 "AppBarToggleButtonBorderBrushPointerOver",
01475 "AppBarToggleButtonBorderBrushDisabled",
01476 "AppBarToggleButtonBorderBrushChecked",
01477 "AppBarToggleButtonBorderBrushCheckedPressed",
01478 "AppBarToggleButtonBorderBrushCheckedPointerOver",
01479 "AppBarToggleButtonBorderBrushCheckedDisabled",
01480 "AppBarToggleButtonBackground",
01481 "AppBarToggleButtonBackgroundHighLightOverlay",
01482 "AppBarToggleButtonBackgroundHighLightOverlayPressed",
01483 "AppBarToggleButtonBackgroundHighLightOverlayPointerOver",
01484 "AppBarToggleButtonBackgroundHighLightOverlayCheckedPressed",
01485 "AppBarToggleButtonBackgroundHighLightOverlayCheckedPointerOver",
01486 "AppBarToggleButtonBackgroundDisabled",
01487 "AppBarToggleButtonBackgroundChecked",
01488 "AppBarToggleButtonBackgroundCheckedPressed",
01489 "AppBarToggleButtonBackgroundCheckedPointerOver",
01490 "AppBarToggleButtonBackgroundCheckedDisabled",
01491 "AppBarEllipsisButtonRevealBorderThemeThickness",
01492 "AppBarEllipsisButtonRevealBorderBrush",
01493 "AppBarEllipsisButtonRevealBorderBrushPressed",
01494 "AppBarEllipsisButtonRevealBorderBrushPointerOver",
01495 "AppBarEllipsisButtonRevealBorderBrushDisabled",
01496 "AppBarEllipsisButtonRevealBackground",
01497 "AppBarEllipsisButtonRevealBackgroundPressed",
01498 "AppBarEllipsisButtonRevealBackgroundPointerOver",
01499 "AppBarEllipsisButtonRevealBackgroundDisabled",
01500 "AppBarButtonSubItemChevronForeground",
01501 "AppBarButtonSubItemChevronForegroundSubMenuOpened",
01502 "AppBarButtonSubItemChevronForegroundPressed",
01503 "AppBarButtonSubItemChevronForegroundPointerOver",
01504 "AppBarButtonSubItemChevronForegroundDisabled",
01505 "AppBarButtonRevealBorderThemeThickness",
01506 "AppBarButtonRevealBorderBrush",
01507 "AppBarButtonRevealBorderBrushPressed",
01508 "AppBarButtonRevealBorderBrushPointerOver",
01509 "AppBarButtonRevealBorderBrushDisabled",
01510 "AppBarButtonRevealBackground",
01511 "AppBarButtonRevealBackgroundPressed",
01512 "AppBarButtonRevealBackgroundPointerOver",
01513 "AppBarButtonRevealBackgroundDisabled",
01514 "AppBarButtonKeyboardAcceleratorTextForeground",
01515 "AppBarButtonKeyboardAcceleratorTextForegroundSubMenuOpened",
01516 "AppBarButtonKeyboardAcceleratorTextForegroundPressed",
01517 "AppBarButtonKeyboardAcceleratorTextForegroundPointerOver",
01518 "AppBarButtonKeyboardAcceleratorTextForegroundDisabled",
01519 "AppBarButtonForeground",
01520 "AppBarButtonForegroundSubMenuOpened",
01521 "AppBarButtonForegroundPressed",
01522 "AppBarButtonForegroundPointerOver",
01523 "AppBarButtonForegroundDisabled",
01524 "AppBarButtonBorderBrush",
01525 "AppBarButtonBorderBrushSubMenuOpened",
01526 "AppBarButtonBorderBrushPressed",
01527 "AppBarButtonBorderBrushPointerOver",
01528 "AppBarButtonBorderBrushDisabled",
01529 "AppBarButtonBackground",
01530 "AppBarButtonBackgroundSubMenuOpened",
01531 "AppBarButtonBackgroundPressed",
01532 "AppBarButtonBackgroundPointerOver",
01533 "AppBarButtonBackgroundDisabled",
01534 "AccentButtonForeground",
01535 "AccentButtonForegroundPressed",
01536 "AccentButtonForegroundPointerOver",
01537 "AccentButtonForegroundDisabled",
01538 "AccentButtonBorderBrush",
01539 "AccentButtonBorderBrushPressed",
01540 "AccentButtonBorderBrushPointerOver",
01541 "AccentButtonBorderBrushDisabled",
01542 "AccentButtonBackground",
01543 "AccentButtonBackgroundPressed",
01544 "AccentButtonBackgroundPointerOver",
01545 "AccentButtonBackgroundDisabled",
01546 "DefaultToolTipStyle",
01547 "DefaultToggleSwitchStyle",
01548 "ToggleMenuFlyoutItemRevealBorderThickness",
01549 "ToggleMenuFlyoutItemRevealStyle",
01550 "TimePickerHostPadding",
01551 "RightCornerRadiusFilterConverter",
01552 "DefaultTextBoxStyle",
01553 "DefaultSplitViewStyle",
01554 "TopLeftCornerRadiusDoubleValueConverter",
01555 "BottomRightCornerRadiusDoubleValueConverter",
01556 "SliderThumbCornerRadius",
01557 "SliderHorizontalThumbHeight",
01558 "SliderHorizontalThumbWidth",
01559 "SliderVerticalThumbWidth",
01560 "SliderVerticalThumbHeight",
01561 "DefaultSliderStyle",
01562 "DefaultRichEditBoxStyle",
01563 "DefaultProgressBarStyle",
01564 "ButtonPadding",
01565 "DefaultToggleButtonStyle",
01566 "TopLeftCornerRadiusDoubleValueConverter8x",
01567 "BottomRightCornerRadiusDoubleValueConverter8x",
01568 "DefaultScrollBarStyle",
01569 "DefaultRepeatButtonStyle",
01570 "DefaultPivotHeaderItemStyle",
01571 "DefaultPivotStyle",
01572 "DefaultPivotItemStyle",
01573 "DefaultPasswordBoxStyle",
01574 "MenuFlyoutSubItemRevealBorderThickness",
01575 "MenuFlyoutSubItemRevealStyle",
01576 "DefaultMenuFlyoutPresenterStyle",
01577 "MenuFlyoutItemRevealBorderThickness",
01578 "MenuFlyoutItemRevealStyle",
01579 "DefaultMediaTransportControlsStyle",
01580 "ListViewItemRevealStyle",
01581 "DefaultListBoxStyle",
01582 "ListBoxItemPadding",
01583 "DefaultListBoxItemStyle",
01584 "GridViewItemRevealStyle",
01585 "DefaultFlyoutPresenterStyle",
01586 "LeftCornerRadiusFilterConverter",
01587 "BottomCornerRadiusFilterConverter",
01588 "TopCornerRadiusFilterConverter",
01589 "DefaultFlipViewStyle",
01590 "DefaultFlipViewItemStyle",
01591 "DatePickerHostPadding",
01592 "DatePickerHostMonthPadding",
01593 "DefaultDatePickerStyle",
01594 "DefaultDatePickerFlyoutPresenterStyle",
01595 "DefaultButtonStyle",
01596 "DefaultContentDialogStyle",
01597 "DefaultCommandBarOverflowPresenterStyle",
01598 "CommandBarRevealStyle",
01599 "ComboBoxPadding",
01600 "ComboBoxTextBoxStyle",
01601 "ComboBoxEditableTextPadding",
01602 "ComboBoxMinHeight",
01603 "DefaultComboBoxStyle",
01604 "ComboBoxItemRevealStyle",
01605 "DefaultCheckBoxStyle",
01606 "CalendarViewRevealStyle",
01607 "DefaultCalendarDatePicker",
01608 "AutoSuggestBoxTextBoxStyle",
01609 "DefaultAutoSuggestBoxStyle",
01610 "DefaultAppBarToggleButtonStyle",
01611 "DefaultAppBarButtonStyle",
01612 "DefaultRadioMenuFlyoutItemStyle",
01613 "PaneToggleButtonHeight",
01614 "PaneToggleButtonWidth",
01615 "NavigationViewToggleBorderThickness",
01616 "PagerControlNumberPanelButtonWidth",
01617 "NavigationViewHeaderMargin",
01618 "NavigationViewItemBorderThickness",
01619 "TopNavigationViewOverflowButtonHeight",
01620 "TopNavigationViewOverflowButtonWidth",
01621 "NavigationViewItemExpandedGlyph",
01622 "TopNavigationViewItemIconOnlyExpandChevronMargin",
01623 "TopNavigationViewItemContentOnlyContentPresenterMargin",
01624 "TopNavigationViewItemContentOnlyExpandChevronMargin",
01625 "TopNavigationViewItemContentPresenterMargin",
01626 "TopNavigationViewItemExpandChevronMargin",
01627 "NavigationViewItemExpandedGlyphFontSize",
01628 "NavigationViewItemExpandChevronMargin",
01629 "TopNavigationViewItemOnOverflowNoIconContentPresenterMargin",
01630 "TopNavigationViewItemOnOverflowContentPresenterMargin",
01631 "TopNavigationViewItemOnOverflowExpandChevronMargin",
01632 "TopNavigationViewItemOnOverflowExpandChevronPadding",
01633 "NavigationViewItemOnLeftMinHeight",
01634 "NavigationViewCompactItemContentPresenterMargin",
01635 "NavigationViewItemOnLeftIconBoxMargin",
01636 "NavigationViewItemContentPresenterMargin",
01637 "InfoBarCloseButtonSize",
01638 "CommandBarFlyoutAppBarToggleButtonStyleBase",
01639 "CommandBarFlyoutAppBarButtonStyleBase",
01640 "AppBarToggleButtonRevealStyle",
01641 "AppBarButtonRevealStyle",
01642 "TopThicknessFilterConverter",
01643 "TopNavigationViewPaneCustomContentMinWidth",
01644 "TopNavigationViewOverflowMenuPadding",
01645 "TopNavigationViewOverflowButtonMargin",
01646 "TopNavigationViewItemSeparatorWidth",
01647 "TopNavigationViewItemSeparatorMargin",
01648 "TopNavigationViewItemMargin",
01649 "TopNavigationViewAutoSuggestBoxMargin",
01650 "ToggleSwitchTopHeaderMargin",
01651 "ToggleSwitchThemeMinWidth",
01652 "ToggleSwitchPreContentMargin",
01653 "ToggleSwitchPostContentMargin",
01654 "ToggleButtonRevealStyle",
01655 "TimePickerTopHeaderMargin",
01656 "TimePickerThemeMinWidth",
01657 "TimePickerThemeMaxWidth",
01658 "TimePickerFlyoutPresenterItemPadding",
01659 "TimePickerFlyoutPresenterItemHeight",
01660 "TimePickerFlyoutPresenterHighlightHeight",
01661 "TimePickerFlyoutPresenterAcceptDismissHostGridHeight",
01662 "TextBoxTopHeaderMargin",
01663 "TeachingTipTopHighlightOffsetForBorder",
01664 "TeachingTipTopHighlightHeight",
01665 "TeachingTipTitleStackPanelMarginWithHeaderCloseButton",
01666 "TeachingTipTitleStackPanelMarginWithFooterCloseButton",
01667 "TeachingTipTailShortSideLength",
01668 "TeachingTipTailPolygonMarginTop",
01669 "TeachingTipTailPolygonMarginRight",
01670 "TeachingTipTailPolygonMarginLeft",
01671 "TeachingTipTailPolygonMarginBottom",
01672 "TeachingTipTailMargin",
01673 "TeachingTipRightButtonMargin",
01674 "TeachingTipMinWidth",
01675 "TeachingTipMinHeight",
01676 "TeachingTipMaxWidth",
01677 "TeachingTipMaxHeight",
01678 "TeachingTipMainContentPresentMargin",
01679 "TeachingTipMainContentAbsentMargin",
01680 "TeachingTipLeftButtonMargin",
01681 "TeachingTipIconPresenterMarginWithoutIcon",
01682 "TeachingTipIconPresenterMarginWithIcon",
01683 "TeachingTipContentMargin",
01684 "TeachingTipContentBorderThicknessUntargeted",
01685 "TeachingTipContentBorderThicknessTop",
01686 "TeachingTipContentBorderThicknessRight",
01687 "TeachingTipContentBorderThicknessLeft",
01688 "TeachingTipContentBorderThicknessBottom",
01689 "TeachingTipBorderThickness",
01690 "TeachingTipAlternateCloseButtonSize",
01691 "TeachingTipAlternateCloseButtonGlyphSize",
01692 "TabViewShadowDepth",
01693 "TabViewRightInsetCornerConverter",
01694 "TabViewLeftInsetCornerConverter",
01695 "TabViewItemSeparatorMargin",
01696 "TabViewItemScrollButtonWidth",
01697 "TabViewItemScrollButtonPadding",
01698 "TabViewItemScrollButtonHeight",
01699 "TabViewItemMinWidth",
01700 "TabViewItemMaxWidth",
01701 "TabViewItemHeaderPadding",
01702 "TabViewItemHeaderIconSize",
01703 "TabViewItemHeaderIconMargin",
01704 "TabViewItemHeaderFontSize",
01705 "TabViewItemHeaderCloseMargin",
01706 "TabViewItemHeaderCloseFontSize",
01707 "TabViewItemHeaderCloseButtonSize",
01708 "TabViewHeaderPadding",
01709 "SwipeItemStyle",
01710 "SplitButtonSecondaryButtonSize",
01711 "SplitButtonRevealStyle",
01712 "SplitButtonPrimaryButtonSize",
01713 "SliderVerticalWidth",
01714 "SliderTopHeaderMargin",
01715 "SliderPreContentMargin",
01716 "SliderPostContentMargin",
01717 "SliderHorizontalHeight",
01718 "SemanticZoomRevealStyle",
01719 "ScrollViewScrollBarsSeparatorExpandDuration",
01720 "ScrollViewScrollBarsSeparatorExpandDelay",
01721 "ScrollViewScrollBarsSeparatorExpandDelayWithoutAnimation",
01722 "ScrollViewScrollBarsSeparatorDisplayDelayWithoutAnimation",
01723 "ScrollViewScrollBarsSeparatorContractDuration",
01724 "ScrollViewScrollBarsSeparatorContractDelay",
01725 "ScrollViewScrollBarsSeparatorContractDelayWithoutAnimation",
01726 "ScrollViewScrollBarsSeparatorContractDelayDisabled",
01727 "ScrollViewScrollBarsNoTouchDuration",
01728 "RightThicknessFilterConverter",
01729 "RichEditBoxTopHeaderMargin",
01730 "RepeatButtonRevealStyle",
01731 "RadioButtonsTopHeaderMargin",
01732 "RadioButtonsRowSpacing",
01733 "RadioButtonsColumnSpacing",
01734 "ProgressRingStrokeThickness",
01735 "PivotTitleContentControlStyle",
01736 "PasswordBoxTopHeaderMargin",
01737 "PaneToggleButtonStyle",
01738 "PaneToggleButtonSize",
01739 "PagerControlPageNavigationButtonStyle",
01740 "PagerControlNumberPanelButtonStyle",
01741 "NumberBoxSpinButtonBorderThickness",
01742 "NumberBoxPopupVerticalOffset",
01743 "NumberBoxPopupShadowDepth",
01744 "NumberBoxPopupIndicatorMargin",
01745 "NumberBoxPopupHorizonalOffset",
01746 "NumberBoxIconMargin",
01747 "NavigationViewTopPaneHeight",
01748 "NavigationViewTitleHeaderContentControlTextStyle",
01749 "NavigationViewPaneTitlePresenterMargin",
01750 "NavigationViewPaneSearchButtonStyle",
01751 "NavigationViewPaneHeaderRowMinHeight",
01752 "NavigationViewOverflowButtonStyleWhenPaneOnTop",
01753 "NavigationViewOverflowButtonNoLabelStyleWhenPaneOnTop",
01754 "NavigationViewMinimalHeaderMargin",
01755 "NavigationViewItemSeparatorMargin",
01756 "NavigationViewItemSeparatorHeight",
01757 "NavigationViewItemMargin",
01758 "NavigationViewItemInnerHeaderMargin",
01759 "NavigationViewItemHeaderTextStyle",
01760 "NavigationViewItemChildrenMenuFlyoutPadding",
01761 "NavigationViewCompactPaneLength",
01762 "NavigationViewCompactItemSeparatorMargin",
01763 "NavigationViewAutoSuggestBoxMargin",
01764 "NavigationBackButtonWidth",
01765 "NavigationBackButtonHeight",
01766 "MenuFlyoutScrollerMargin",
01767 "MenuBarHeight",
01768 "MUX_NavigationViewSettingsItemStyleWhenOnTopPane",
01769 "MUX_NavigationViewItemPresenterStyleWhenOnTopPane",
01770 "MUX_NavigationViewItemPresenterStyleWhenOnTopPaneWithRevealFocus",
01771 "MUX_NavigationViewItemPresenterStyleWhenOnTopPaneOverflow",
01772 "MUX_NavigationViewItemPresenterStyleWhenOnLeftPane",
01773 "MUX_NavigationViewItemPresenterStyleWhenOnLeftPaneWithRevealFocus",
01774 "ListViewItemRevealBackgroundShowsAboveContentStyle",
01775 "ListViewItemExpanded",
01776 "ListPickerFlyoutPresenterItemStyle",
01777 "LeftThicknessFilterConverter",
01778 "InfoBarWarningIconGlyph",
01779 "InfoBarTitleVerticalOrientationMargin",
01780 "InfoBarTitleHorizontalOrientationMargin",
01781 "InfoBarTitleFontWeight",
01782 "InfoBarTitleFontSize",
01783 "InfoBarSuccessIconGlyph",
01784 "InfoBarPanelVerticalOrientationPadding",
01785 "InfoBarPanelMargin",
01786 "InfoBarPanelHorizontalOrientationPadding",
01787 "InfoBarMinHeight",
01788 "InfoBarMessageVerticalOrientationMargin",
01789 "InfoBarMessageHorizontalOrientationMargin",
01790 "InfoBarMessageFontWeight",
01791 "InfoBarMessageFontSize",
01792 "InfoBarInformationalIconGlyph",
01793 "InfoBarIconMargin",
01794 "InfoBarIconFontSize",
01795 "InfoBarHyperlinkButtonPadding",
01796 "InfoBarHyperlinkButtonMinHeight",
01797 "InfoBarHyperlinkButtonFontSize",
01798 "InfoBarErrorIconGlyph",
01799 "InfoBarContentRootPadding",
01800 "InfoBarCloseButtonSymbol",
01801 "InfoBarCloseButtonStyle",
01802 "InfoBarCloseButtonGlyphSize",
01803 "InfoBarActionVerticalOrientationMargin",
01804 "InfoBarActionHorizontalOrientationMargin",
01805 "InfoBarActionButtonPadding",
01806 "InfoBarActionButtonMinWidth",
01807 "InfoBarActionButtonMinHeight",
01808 "InfoBarActionButtonCornerRadius",
01809 "GridViewItemRevealBackgroundShowsAboveContentStyle",
01810 "ForegroundImageDefaultTemplate",
01811 "ForegroundGlyphDefaultTemplate",
01812 "ExpanderPopinVerticalOffset",
01813 "ExpanderChevronWidth",
01814 "ExpanderChevronMargin",
01815 "ExpanderChevronGlyph",
01816 "EllipsisButtonRevealStyle",
01817 "DropDownButtonRevealStyle",
01818 "DefaultToggleMenuFlyoutItemStyle",
01819 "DefaultRadioButtonStyle",
01820 "DefaultMenuFlyoutSubItemStyle",
01821 "DefaultMenuFlyoutItemStyle",
01822 "DefaultListViewItemStyle",
01823 "DefaultCommandBarStyle",
01824 "DateTimePickerFlyoutButtonStyle",
01825 "DateTimeFlyoutBorderPadding",
01826 "DatePickerTopHeaderMargin",
01827 "DatePickerThemeMinWidth",
01828 "DatePickerThemeMaxWidth",
01829 "DatePickerFlyoutPresenterMonthPadding",
01830 "DatePickerFlyoutPresenterItemPadding",
01831 "DatePickerFlyoutPresenterItemHeight",
01832 "DatePickerFlyoutPresenterHighlightHeight",
01833 "DatePickerFlyoutPresenterAcceptDismissHostGridHeight",
01834 "CommandBarWithoutRevealStyle",
01835 "CommandBarOverflowPresenterMargin",
01836 "CommandBarMoreButtonMargin",
01837 "CommandBarFlyoutEllipsisButtonStyle",
01838 "CommandBarFlyoutCommandBarOverflowPresenterStyle",
01839 "CommandBarFlyoutAppBarToggleButtonStyle",
01840 "CommandBarFlyoutAppBarButtonStyle",
01841 "ComboBoxTopHeaderMargin",
01842 "ComboBoxPopupMaxNumberOfItems",
01843 "ComboBoxPopupMaxNumberOfItemsThatCanBeShownOnOneSide",
01844 "ColorPickerBorderStyle",
01845 "CalendarDatePickerTopHeaderMargin",
01846 "ButtonRevealStyle",
01847 "BottomThicknessFilterConverter",
01848 "BackgroundImageDefaultTemplate",
01849 "BackgroundGlyphDefaultTemplate",
01850 "AutoSuggestBoxTopHeaderMargin",
01851 "AppBarToggleButtonTextLabelOnRightMargin",
01852 "AppBarToggleButtonTextLabelMargin",
01853 "AppBarToggleButtonRevealOverflowStyle",
01854 "AppBarToggleButtonRevealLabelsOnRightStyle",
01855 "AppBarToggleButtonOverflowTextTouchMargin",
01856 "AppBarToggleButtonOverflowTextLabelPadding",
01857 "AppBarToggleButtonOverflowCheckTouchMargin",
01858 "AppBarToggleButtonOverflowCheckMargin",
01859 "AppBarThemeMinHeight",
01860 "AppBarThemeCompactHeight",
01861 "AppBarButtonTextLabelOnRightMargin",
01862 "AppBarButtonTextLabelMargin",
01863 "AppBarButtonRevealOverflowStyle",
01864 "AppBarButtonRevealLabelsOnRightStyle",
01865 "AppBarButtonOverflowTextTouchMargin",
01866 "AppBarButtonOverflowTextLabelPadding",
01867 "AppBarButtonContentViewboxMargin",
01868 "AppBarButtonContentViewboxCompactMargin",
01869 "AppBarButtonContentViewboxCollapsedMargin",
01870 "AppBarButtonContentHeight",
01871 "AccentButtonStyle",});
01872     }
01873 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnimatedIconSource.properties.h Source File

  • File List
  • File Members
  • Generated

AnimatedIconSource.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class AnimatedIconSourceProperties
00008 {
00009 public:
00010     AnimatedIconSourceProperties();
00011
00012     void FallbackIconSource(winrt::IconSource const& value);
00013     winrt::IconSource FallbackIconSource();
00014
00015     void MirroredWhenRightToLeft(bool value);
00016     bool MirroredWhenRightToLeft();
00017
00018     void Source(winrt::IAnimatedVisualSource2 const& value);
00019     winrt::IAnimatedVisualSource2 Source();
00020
00021     static winrt::DependencyProperty FallbackIconSourceProperty() { return s_FallbackIconSourceProperty; }
00022     static winrt::DependencyProperty MirroredWhenRightToLeftProperty() { return s_MirroredWhenRightToLeftProperty; }
00023     static winrt::DependencyProperty SourceProperty() { return s_SourceProperty; }
00024
00025     static GlobalDependencyProperty s_FallbackIconSourceProperty;
00026     static GlobalDependencyProperty s_MirroredWhenRightToLeftProperty;
00027     static GlobalDependencyProperty s_SourceProperty;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031 };
Generated on Sun Dec 1 2024 20:51:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages

NonVirtualStackLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Windows.Foundation;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008
00009 namespace MUXControlsTestApp.Samples
00010 {
00011     public class NonVirtualStackLayout : NonVirtualizingLayout
00012     {
00013         protected override Size MeasureOverride(NonVirtualizingLayoutContext context, Size availableSize)
00014         {
00015             double extentHeight = 0.0;
00016             double extentWidth = 0.0;
00017             foreach(var element in context.Children)
00018             {
00019                 element.Measure(availableSize);
00020                 extentHeight += element.DesiredSize.Height;
00021                 extentWidth = Math.Max(extentWidth, element.DesiredSize.Width);
00022             }
00023
00024             return new Size(extentWidth, extentHeight);
00025         }
00026
00027         protected override Size ArrangeOverride(NonVirtualizingLayoutContext context, Size finalSize)
00028         {
00029             double offset = 0.0;
00030             foreach (var element in context.Children)
00031             {
00032                 element.Arrange(new Rect(0, offset, element.DesiredSize.Width, element.DesiredSize.Height));
00033                 offset += element.DesiredSize.Height;
00034             }
00035
00036             return finalSize;
00037         }
00038     }
00039 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomPenButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarCustomPenButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarCustomPenButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarCustomPenButton)
00012 }
00013
00014 #include "InkToolBarCustomPenButton.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarCustomPenButtonProperties::s_ConfigurationContentProperty{ nullptr };
00017 GlobalDependencyProperty InkToolBarCustomPenButtonProperties::s_CustomPenProperty{ nullptr };
00018
00019 InkToolBarCustomPenButtonProperties::InkToolBarCustomPenButtonProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void InkToolBarCustomPenButtonProperties::EnsureProperties()
00025 {
00026     InkToolBarPenButton::EnsureProperties();
00027     if (!s_ConfigurationContentProperty)
00028     {
00029         s_ConfigurationContentProperty =
00030             InitializeDependencyProperty(
00031                 L"ConfigurationContent",
00032                 winrt::name_of<winrt::UIElement>(),
00033                 winrt::name_of<winrt::InkToolBarCustomPenButton>(),
00034                 false /* isAttached */,
00035                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00036                 nullptr);
00037     }
00038     if (!s_CustomPenProperty)
00039     {
00040         s_CustomPenProperty =
00041             InitializeDependencyProperty(
00042                 L"CustomPen",
00043                 winrt::name_of<winrt::InkToolBarCustomPen>(),
00044                 winrt::name_of<winrt::InkToolBarCustomPenButton>(),
00045                 false /* isAttached */,
00046                 ValueHelper<winrt::InkToolBarCustomPen>::BoxedDefaultValue(),
00047                 nullptr);
00048     }
00049 }
00050
00051 void InkToolBarCustomPenButtonProperties::ClearProperties()
00052 {
00053     s_ConfigurationContentProperty = nullptr;
00054     s_CustomPenProperty = nullptr;
00055     InkToolBarPenButton::ClearProperties();
00056 }
00057
00058 void InkToolBarCustomPenButtonProperties::ConfigurationContent(winrt::UIElement const& value)
00059 {
00060     [[gsl::suppress(con)]]
00061     {
00062     static_cast<InkToolBarCustomPenButton*>(this)->SetValue(s_ConfigurationContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00063     }
00064 }
00065
00066 winrt::UIElement InkToolBarCustomPenButtonProperties::ConfigurationContent()
00067 {
00068     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<InkToolBarCustomPenButton*>(this)->GetValue(s_ConfigurationContentProperty));
00069 }
00070
00071 void InkToolBarCustomPenButtonProperties::CustomPen(winrt::InkToolBarCustomPen const& value)
00072 {
00073     [[gsl::suppress(con)]]
00074     {
00075     static_cast<InkToolBarCustomPenButton*>(this)->SetValue(s_CustomPenProperty, ValueHelper<winrt::InkToolBarCustomPen>::BoxValueIfNecessary(value));
00076     }
00077 }
00078
00079 winrt::InkToolBarCustomPen InkToolBarCustomPenButtonProperties::CustomPen()
00080 {
00081     return ValueHelper<winrt::InkToolBarCustomPen>::CastOrUnbox(static_cast<InkToolBarCustomPenButton*>(this)->GetValue(s_CustomPenProperty));
00082 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

OffsetsChange Member List

This is the complete list of members for OffsetsChange, including all inherited members.
OffsetsChange(double zoomedHorizontalOffset, double zoomedVerticalOffset, ScrollPresenterViewKind offsetsKind, winrt::IInspectable const &options) | OffsetsChange |
Options() const | ViewChange | [inline]
ViewChange(ScrollPresenterViewKind viewKind, winrt::IInspectable const &options) | ViewChange |
ViewKind() const | ViewChange | [inline]
ZoomedHorizontalOffset() const | OffsetsChange | [inline]
ZoomedHorizontalOffset(double zoomedHorizontalOffset) | OffsetsChange |
ZoomedVerticalOffset() const | OffsetsChange | [inline]
ZoomedVerticalOffset(double zoomedVerticalOffset) | OffsetsChange |
~OffsetsChange() | OffsetsChange |
~ViewChange() | ViewChange |
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/RuntimeProfiler.cpp Source File

  • File List
  • File Members
  • Telemetry

RuntimeProfiler.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include "RuntimeProfiler.h"
00006 #include "MuxcTraceLogging.h"
00007
00008 // Version of binary, defined in dllmain.cpp from WinUIrc.ver
00009 extern const char *gFileVersion;
00010
00011 #define DEFINE_PROFILEGROUP(name, group, size) \
00012     CMethodProfileGroup<size>        name(group)
00013
00014 namespace RuntimeProfiler {
00015
00016     struct FunctionTelemetryCount
00017     {
00018         volatile LONG      *pInstanceCount{ nullptr };
00019         volatile UINT16     uTypeIndex{ 0 };
00020         volatile UINT16     uMethodIndex{ 0 };
00021     };
00022
00023     class CMethodProfileGroupBase
00024     {
00025     public:
00026         virtual void RegisterMethod(UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept = 0;
00027         virtual void FireEvent(bool bSuspend) noexcept = 0;
00028     };
00029
00030     template <size_t size>
00031     class CMethodProfileGroup: public CMethodProfileGroupBase
00032     {
00033     public:
00034         static const int TableSize = size;
00035
00036         CMethodProfileGroup(ProfileGroup group)
00037         :   m_cMethods(0)
00038         ,   m_group(group)
00039         {
00040             //  Note: We are declaring these objects in a global scope which
00041             //      basically means that anything we call here in the
00042             //      constructor needs to be safe to call during DllMain.
00043         }
00044
00045         ~CMethodProfileGroup()
00046         {
00047             //  Ditto from above.
00048             UninitializeRuntimeProfiler();
00049         }
00050
00051         void RegisterMethod(UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept override
00052         {
00053             static_assert(sizeof(LONG) == sizeof(UINT32), "Since we're using InterlockedIncrement, make sure that this is the same size independent of build flavors.");
00054
00055             //  Zero-based index
00056             const LONG WriteIndex = ::InterlockedIncrement(&m_cMethods) - 1;
00057
00058             if (WriteIndex < (LONG)(m_Counts.max_size()))
00059             {
00060                 m_Counts[WriteIndex].uTypeIndex          = uTypeIndex;
00061                 m_Counts[WriteIndex].uMethodIndex        = uMethodIndex;
00062
00063                 //  Note:  This pointer is the last thing to be set, this is
00064                 //    intentional, FireEvent will check the this pointer and
00065                 //    if set will assume that the rest of this structure is
00066                 //    valid, do not change the order.
00067                 m_Counts[WriteIndex].pInstanceCount      = pCount;
00068
00069                 //  FireEvent() will reset counts to zero and we don't want
00070                 //  RegisterMethod() to be called again, thus we set the
00071                 //  initial static value to -1, to be incremented to 0 on first
00072                 //  call and we increment again for an accurate count.
00073                 ::InterlockedIncrement(pCount);
00074             }
00075         }
00076
00077         void FireEvent(bool bSuspend) noexcept override
00078         {
00079             if (!g_IsTelemetryProviderEnabled)
00080             {
00081                 // Trace logging provider for Microsoft telemetry is not enabled. Exit right away.
00082                 return;
00083             }
00084
00085             const UINT32      ArraySize = (UINT32)(m_Counts.max_size());
00086             const bool        bOverflow = ((UINT32)(m_cMethods) >= ArraySize);
00087             UINT32      cMethods = (UINT32)m_cMethods;
00088             bool        bStringOverflow = false;
00089             UINT16      cMethodsLogged = 0;
00090             bool        bSeparator = false;
00091
00092             //  Each entry will look like this:
00093             //  [XX|YYYY]:ZZZ
00094             //  Conservatively accounting for 20 characters per entry depending
00095             //  on the length of the numbers.
00096             WCHAR       OutputBuffer[20 * TableSize];
00097             size_t      cchDest = ARRAYSIZE(OutputBuffer);
00098
00099             // min
00100             cMethods = std::min(cMethods, ArraySize);
00101
00102             PWSTR       pszDest = &(OutputBuffer[0]);
00103
00104             for (UINT32 ii = 0; ii < cMethods; ii++)
00105             {
00106                 LONG        cHits;
00107
00108                 if (!m_Counts[ii].pInstanceCount)
00109                 {
00110                     //  In the middle of RegisterMethod on another thread,
00111                     //  we'll forgo logging this method for now and pick it
00112                     //  up on the next FireEvent().
00113                     continue;
00114                 }
00115
00116                 //  Zeroing out AND getting value.
00117                 cHits = InterlockedExchange(m_Counts[ii].pInstanceCount, 0);
00118
00119                 if (0 != cHits)
00120                 {
00121                     //  We're using id's instead.  The entry in the list will
00122                     //  look like '[type index|method index]:count'
00123                     const HRESULT hr = StringCchPrintfExW(
00124                             pszDest,
00125                             cchDest,
00126                             &pszDest,
00127                             &cchDest,
00128                             STRSAFE_NULL_ON_FAILURE,
00129                             L"%ls[%d|%d]:%d",
00130                             (bSeparator?L",":L""),
00131                             (int)m_Counts[ii].uTypeIndex,
00132                             (int)m_Counts[ii].uMethodIndex,
00133                             cHits);
00134
00135                     if (S_OK == hr)
00136                     {
00137                         cMethodsLogged++;
00138                         bSeparator = true;
00139                     }
00140                     else if ((STRSAFE_E_INSUFFICIENT_BUFFER == hr) ||
00141                              (STRSAFE_E_INVALID_PARAMETER == hr))
00142                     {
00143                         //  The only legit ways to get invalid parameter
00144                         //    here is ccDest == 0, so it's effectively an
00145                         //    overflow condition.
00146                         bStringOverflow = true;
00147                         break;
00148                     }
00149                 }
00150             }
00151
00152             if (0 == cMethodsLogged)
00153             {
00154                 return;
00155             }
00156
00157             TraceLoggingWrite(
00158                 g_hTelemetryProvider,
00159                 "RuntimeProfiler",
00160                 TraceLoggingDescription("XAML methods that have been called."),
00161                 TraceLoggingString(gFileVersion, "BinaryVersion"),
00162                 TraceLoggingWideString(OutputBuffer, "ApiCounts"),
00163                 TraceLoggingUInt32(((UINT32)m_group), "ProfileGroupId"),
00164                 TraceLoggingUInt32(((UINT32)cMethods),"TotalCount"),
00165                 TraceLoggingBoolean(bSuspend, "OnSuspend"),
00166                 TraceLoggingBoolean(bOverflow, "Overflow"),
00167                 TraceLoggingBoolean(bStringOverflow, "StringOverflow"),
00168                 TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"),
00169                 TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
00170                 TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
00171         }
00172
00173     private:
00174         std::array<FunctionTelemetryCount, TableSize>   m_Counts = {0};
00175         LONG                                            m_cMethods;
00176         ProfileGroup                                    m_group;
00177     };  //  class CMethodProfileGroup
00178
00179
00180     //  Yes, we're declaring this as a global, the ctor/dtor are implemented
00181     //  very carefully and this will not create issues with DllMain().
00182     DEFINE_PROFILEGROUP(gGroupClasses, PG_Class, ProfId_Size + ProfMemberId_Size);
00183
00184     struct ProfileGroupInfo
00185     {
00186         CMethodProfileGroupBase    *pGroup;
00187         const char                 *pszGroupName;
00188     } gProfileGroups[] =
00189     {
00190         { static_cast<CMethodProfileGroupBase*>(&gGroupClasses), "Classes" },
00191     };
00192
00193     using namespace std::chrono;
00194     constexpr auto  EventFrequency = 20min;
00195
00196     void FireEvent(bool bSuspend) noexcept
00197     {
00198         for (auto group : gProfileGroups)
00199         {
00200             group.pGroup->FireEvent(bSuspend);
00201         }
00202     }
00203
00204     VOID CALLBACK TPTimerCallback(PTP_CALLBACK_INSTANCE, PVOID, PTP_TIMER) noexcept
00205     {
00206         FireEvent(false);
00207     }
00208
00209     bool g_runtimeProfilerInitialized{ false };
00210     PTP_TIMER g_pTimer{ nullptr };
00211
00212     void UninitializeRuntimeProfiler()
00213     {
00214         if (nullptr != g_pTimer)
00215         {
00216             //  Canceling timer.
00217
00218             //  Note:  We're called on a global destructor, so we are not
00219             //    calling WaitForThreadpoolTimerCallbacks() to prevent
00220             //    deadlocks.
00221             SetThreadpoolTimer(g_pTimer, nullptr, 0, 0);
00222             CloseThreadpoolTimer(g_pTimer);
00223
00224             g_pTimer = nullptr;
00225         }
00226
00227         g_runtimeProfilerInitialized = false;
00228     }
00229
00230     void InitializeRuntimeProfiler()
00231     {
00232         g_pTimer = ::CreateThreadpoolTimer(TPTimerCallback, nullptr, nullptr);
00233
00234         if (nullptr != g_pTimer)
00235         {
00236             LARGE_INTEGER   lidueTime;
00237             FILETIME        ftdueTime;
00238
00239             //  Setting periodic timer.  Using negative time in 100 nanosecond
00240             //  intervals to indicate relative time.
00241             lidueTime.QuadPart = -10000 * (LONGLONG)(std::chrono::milliseconds(EventFrequency).count());
00242
00243             ftdueTime.dwHighDateTime = (DWORD)(lidueTime.HighPart);
00244             ftdueTime.dwLowDateTime  = lidueTime.LowPart;
00245
00246             //  Setting the callback window length to 60 seconds since the
00247             //  timing of the event is not critical
00248             SetThreadpoolTimer(g_pTimer, &ftdueTime, (DWORD)(std::chrono::milliseconds(EventFrequency).count()), 60 * 1000);
00249         }
00250
00251         g_runtimeProfilerInitialized = g_pTimer != nullptr;
00252     }
00253
00254     void RegisterMethod(ProfileGroup group, UINT16 uTypeIndex, UINT16 uMethodIndex, volatile LONG *pCount) noexcept
00255     {
00256         if (!g_runtimeProfilerInitialized)
00257         {
00258             InitializeRuntimeProfiler();
00259         }
00260
00261         CMethodProfileGroupBase *pGroup = gProfileGroups[(int)group].pGroup;
00262         return (pGroup->RegisterMethod(uTypeIndex, uMethodIndex, pCount));
00263     }
00264
00265 } // namespace RuntimeProfiler
00266
00267 //  This will be exported by WUX Extension library
00268 STDAPI_(void) SendTelemetryOnSuspend() noexcept
00269 {
00270     RuntimeProfiler::FireEvent(true);
00271 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Item Member List

This is the complete list of members for Item, including all inherited members.
Name Item
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingControlTests Member List

This is the complete list of members for RatingControlTests, including all inherited members.
VerifyDefaultsAndBasicSetting() | RatingControlTests | [inline]
VerifyDontCrashWhenCollapsedAndValueSet() | RatingControlTests | [inline]
VerifySizeIsChangeableFromResource() | RatingControlTests | [inline]
VerifyValuesCoercion() | RatingControlTests | [inline]
Generated on Sun Dec 1 2024 20:53:35 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderAdapterFactory.h Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

ScrollViewerIRefreshInfoProviderAdapterFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollViewerIRefreshInfoProviderAdapter.h"
00007
00008
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TeachingTipTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

TeachingTipTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TeachingTipTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TeachingTipTestHooks)
00012 }
00013
00014 #include "TeachingTipTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RatingControl/RatingControlAutomationPeer.h Source File

  • File List
  • File Members
  • RatingControl

RatingControlAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RatingControl.h"
00007
00008 #include "RatingControlAutomationPeer.g.h"
00009
00010 // Needed because IValueProvider.Value and IRangeValueProvider.Value conflict on their return type, this level of indirection enables it to work.
00011 template <typename Owner>
00012 struct ValueProviderThunk : winrt::implements<ValueProviderThunk<Owner>, winrt::IValueProvider, winrt::composable, winrt::composing>
00013 {
00014     bool IsReadOnly() { return static_cast<Owner*>(this)->IsReadOnly(); }
00015     hstring Value() { return static_cast<Owner*>(this)->IValueProvider_Value(); }
00016     void SetValue(hstring const& value) { static_cast<Owner*>(this)->SetValue(value); }
00017 };
00018
00019 class RatingControlAutomationPeer :
00020     public ReferenceTracker<
00021         RatingControlAutomationPeer,
00022         winrt::implementation::RatingControlAutomationPeerT,
00023         ValueProviderThunk<RatingControlAutomationPeer>,
00024         winrt::IRangeValueProvider>
00025 {
00026
00027 public:
00028     RatingControlAutomationPeer(winrt::FrameworkElement const& owner);
00029
00030     // IAutomationPeerOverrides
00031     hstring GetLocalizedControlTypeCore();
00032
00033     // IValueProvider properties
00034     bool IsReadOnly();
00035     hstring IValueProvider_Value();
00036     // Methods
00037     void SetValue(hstring const& value);
00038
00039     // IRangeValueProvider properties
00040     // IsReadOnly shared with IValueProvider
00041     double SmallChange();
00042     double LargeChange();
00043     double Maximum();
00044     double Minimum();
00045     double Value();
00046     // Methods
00047     void SetValue(double value);
00048
00049     // IAutomationPeerOverrides
00050     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00051     winrt::AutomationControlType GetAutomationControlTypeCore();
00052
00053     void RaisePropertyChangedEvent(double newValue);
00054
00055 private:
00056     winrt::RatingControl GetRatingControl();
00057
00058     int DetermineFractionDigits(double value);
00059     int DetermineSignificantDigits(double value, int fractionDigits);
00060
00061     winrt::hstring GenerateValue_ValueString(const winrt::hstring& resourceString, double ratingValue);
00062 };
00063
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TeachingTip/TeachingTipAutomationPeer.idl Source File

  • File List
  • File Members
  • TeachingTip

TeachingTipAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass TeachingTipAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00007 {
00008     TeachingTipAutomationPeer(MU_XC_NAMESPACE.TeachingTip owner);
00009 }
00010
00011 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MaterialHelperTestApi.properties.cpp Source File

  • File List
  • File Members
  • Generated

MaterialHelperTestApi.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "MaterialHelperTestApi.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Media
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(MaterialHelperTestApi)
00012 }
00013
00014 #include "MaterialHelperTestApi.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarCustomPenButtonProperties Member List

This is the complete list of members for InkToolBarCustomPenButtonProperties, including all inherited members.
ClearProperties() | InkToolBarCustomPenButtonProperties | [static]
ConfigurationContent(winrt::UIElement const &value) | InkToolBarCustomPenButtonProperties |
ConfigurationContent() | InkToolBarCustomPenButtonProperties |
ConfigurationContentProperty() | InkToolBarCustomPenButtonProperties | [inline, static]
CustomPen(winrt::InkToolBarCustomPen const &value) | InkToolBarCustomPenButtonProperties |
CustomPen() | InkToolBarCustomPenButtonProperties |
CustomPenProperty() | InkToolBarCustomPenButtonProperties | [inline, static]
EnsureProperties() | InkToolBarCustomPenButtonProperties | [static]
InkToolBarCustomPenButtonProperties() | InkToolBarCustomPenButtonProperties |
s_ConfigurationContentProperty | InkToolBarCustomPenButtonProperties | [static]
s_CustomPenProperty | InkToolBarCustomPenButtonProperties | [static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollSnapPointBase Member List

This is the complete list of members for ScrollSnapPointBase, including all inherited members.
Alignment() | ScrollSnapPointBase |
OnUpdateViewport(double newViewport) | ScrollSnapPointBase |
ScrollSnapPointBase() | ScrollSnapPointBase | [protected]
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizingDataSource Member List

This is the complete list of members for VirtualizingDataSource, including all inherited members.
EmptyTreeNode(TreeViewNode node) | VirtualizingDataSource | [inline, static]
FillTreeNode(TreeViewNode node) | VirtualizingDataSource | [inline, static]
Generated on Sun Dec 1 2024 20:54:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MyItemsRepeater Member List

This is the complete list of members for MyItemsRepeater, including all inherited members.
MyItemsRepeater() MyItemsRepeater [inline]
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollSnapPoint.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollSnapPoint.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollSnapPoint.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollSnapPoint)
00012 }
00013
00014 #include "ScrollSnapPoint.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

XamlAmbientLightProperties Member List

This is the complete list of members for XamlAmbientLightProperties, including all inherited members.
ClearProperties() | XamlAmbientLightProperties | [static]
Color(winrt::Color const &value) | XamlAmbientLightProperties |
Color() | XamlAmbientLightProperties |
ColorProperty() | XamlAmbientLightProperties | [inline, static]
EnsureProperties() | XamlAmbientLightProperties | [static]
GetIsTarget(winrt::DependencyObject const &target) | XamlAmbientLightProperties | [static]
IsTargetProperty() | XamlAmbientLightProperties | [inline, static]
OnColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | XamlAmbientLightProperties | [static]
s_ColorProperty | XamlAmbientLightProperties | [static]
s_IsTargetProperty | XamlAmbientLightProperties | [static]
SetIsTarget(winrt::DependencyObject const &target, bool value) | XamlAmbientLightProperties | [static]
XamlAmbientLightProperties() | XamlAmbientLightProperties |
Generated on Sun Dec 1 2024 20:53:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RecyclePool.properties.cpp Source File

  • File List
  • File Members
  • Generated

RecyclePool.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RecyclePool.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(RecyclePool)
00012 }
00013
00014 #include "RecyclePool.g.cpp"
00015
00016 GlobalDependencyProperty RecyclePoolProperties::s_PoolInstanceProperty{ nullptr };
00017
00018 RecyclePoolProperties::RecyclePoolProperties()
00019 {
00020 }
00021
00022 void RecyclePoolProperties::EnsureProperties()
00023 {
00024     if (!s_PoolInstanceProperty)
00025     {
00026         s_PoolInstanceProperty =
00027             InitializeDependencyProperty(
00028                 L"PoolInstance",
00029                 winrt::name_of<winrt::RecyclePool>(),
00030                 winrt::name_of<winrt::RecyclePool>(),
00031                 true /* isAttached */,
00032                 ValueHelper<winrt::RecyclePool>::BoxedDefaultValue(),
00033                 nullptr);
00034     }
00035 }
00036
00037 void RecyclePoolProperties::ClearProperties()
00038 {
00039     s_PoolInstanceProperty = nullptr;
00040 }
00041
00042
00043 void RecyclePoolProperties::SetPoolInstance(winrt::DataTemplate const& target, winrt::RecyclePool const& value)
00044 {
00045     target.SetValue(s_PoolInstanceProperty, ValueHelper<winrt::RecyclePool>::BoxValueIfNecessary(value));
00046 }
00047
00048 winrt::RecyclePool RecyclePoolProperties::GetPoolInstance(winrt::DataTemplate const& target)
00049 {
00050     return ValueHelper<winrt::RecyclePool>::CastOrUnbox(target.GetValue(s_PoolInstanceProperty));
00051 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ZoomSnapPointBase.properties.cpp Source File

  • File List
  • File Members
  • Generated

ZoomSnapPointBase.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ZoomSnapPointBase.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ZoomSnapPointBase)
00012 }
00013
00014 #include "ZoomSnapPointBase.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayout.h Source File

  • File List
  • File Members
  • Repeater

UniformGridLayout.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "VirtualizingLayout.h"
00007 #include "UniformGridLayout.g.h"
00008 #include "UniformGridLayout.properties.h"
00009 #include "IFlowLayoutAlgorithmDelegates.h"
00010 #include "OrientationBasedMeasures.h"
00011 #include "UniformGridLayoutState.h"
00012
00013 class UniformGridLayout :
00014     public ReferenceTracker<UniformGridLayout, winrt::implementation::UniformGridLayoutT, VirtualizingLayout>,
00015     public IFlowLayoutAlgorithmDelegates,
00016     public OrientationBasedMeasures,
00017     public UniformGridLayoutProperties
00018 {
00019 public:
00020     UniformGridLayout();
00021
00022 #pragma region IVirtualizingLayoutOverrides
00023     void InitializeForContextCore(winrt::VirtualizingLayoutContext const& context);
00024     void UninitializeForContextCore(winrt::VirtualizingLayoutContext const& context);
00025     winrt::Size MeasureOverride(
00026         winrt::VirtualizingLayoutContext const& context,
00027         winrt::Size const& availableSize);
00028     winrt::Size ArrangeOverride(
00029         winrt::VirtualizingLayoutContext const& context,
00030         winrt::Size const& finalSize);
00031
00032     void OnItemsChangedCore(
00033         winrt::VirtualizingLayoutContext const& context,
00034         winrt::IInspectable const& source,
00035         winrt::NotifyCollectionChangedEventArgs const& args);
00036 #pragma endregion
00037
00038 #pragma region IFlowLayoutAlgorithmDelegates
00039     winrt::Size Algorithm_GetMeasureSize(int index, const winrt::Size& availableSize, const winrt::VirtualizingLayoutContext& context) override;
00040     winrt::Size Algorithm_GetProvisionalArrangeSize(int index, const winrt::Size& measureSize, winrt::Size const& desiredSize, const winrt::VirtualizingLayoutContext& context) override;
00041     bool Algorithm_ShouldBreakLine(int index, double remainingSpace) override;
00042     winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForRealizationRect(
00043         const winrt::Size& availableSize,
00044         const winrt::VirtualizingLayoutContext& context) override;
00045     winrt::FlowLayoutAnchorInfo Algorithm_GetAnchorForTargetElement(
00046         int targetIndex,
00047         const winrt::Size& availableSize,
00048         const winrt::VirtualizingLayoutContext& context) override;
00049     winrt::Rect Algorithm_GetExtent(const winrt::Size& availableSize,
00050         const winrt::VirtualizingLayoutContext& context,
00051         const winrt::UIElement& firstRealized,
00052         int firstRealizedItemIndex,
00053         const winrt::Rect& firstRealizedLayoutBounds,
00054         const winrt::UIElement& lastRealized,
00055         int lastRealizedItemIndex,
00056         const winrt::Rect& lastRealizedLayoutBounds) override;
00057     void Algorithm_OnElementMeasured(
00058         const winrt::UIElement& /*element*/,
00059         int /*index*/,
00060         const winrt::Size& /*availableSize*/,
00061         const winrt::Size& /*measureSize*/,
00062         const winrt::Size& /*desiredSize*/,
00063         const winrt::Size& /*provisionalArrangeSize*/,
00064         const winrt::VirtualizingLayoutContext& /*context*/) override {}
00065     void Algorithm_OnLineArranged(
00066         int /*startIndex*/,
00067         int /*countInLine*/,
00068         double /*lineSize*/,
00069         const winrt::VirtualizingLayoutContext& /*context*/) override {}
00070 #pragma endregion
00071
00072     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00073
00074 private:
00075     // Methods
00076     int GetItemsPerLine(winrt::Size const& availableSize, winrt::VirtualizingLayoutContext const& context);
00077     float GetMinorSizeWithSpacing(winrt::VirtualizingLayoutContext const& context);
00078     float GetMajorSizeWithSpacing(winrt::VirtualizingLayoutContext const& context);
00079
00080     winrt::Rect GetLayoutRectForDataIndex(const winrt::Size& availableSize, int index, const winrt::Rect& lastExtent, const winrt::VirtualizingLayoutContext& context);
00081
00082     winrt::com_ptr<UniformGridLayoutState> GetAsGridState(const winrt::IInspectable& state)
00083     {
00084         return winrt::get_self<UniformGridLayoutState>(state.as<winrt::UniformGridLayoutState>())->get_strong();
00085     }
00086
00087     ::FlowLayoutAlgorithm& GetFlowAlgorithm(const winrt::VirtualizingLayoutContext& context)
00088     {
00089         return GetAsGridState(context.LayoutState())->FlowAlgorithm();
00090     }
00091
00092     void InvalidateLayout()
00093     {
00094         __super::InvalidateMeasure();
00095     }
00096
00097     double LineSpacing()
00098     {
00099         return Orientation() == winrt::Orientation::Horizontal ? m_minRowSpacing: m_minColumnSpacing;
00100     }
00101
00102     double MinItemSpacing()
00103     {
00104         return Orientation() == winrt::Orientation::Horizontal ? m_minColumnSpacing: m_minRowSpacing;
00105     }
00106
00107     void UpdateIndexBasedLayoutOrientation(const winrt::Orientation& orientation);
00108
00109     // Fields
00110     double m_minItemWidth{NAN};
00111     double m_minItemHeight{NAN};
00112     double m_minRowSpacing{};
00113     double m_minColumnSpacing{};
00114     winrt::UniformGridLayoutItemsJustification m_itemsJustification{ winrt::UniformGridLayoutItemsJustification::Start };
00115     winrt::UniformGridLayoutItemsStretch m_itemsStretch{ winrt::UniformGridLayoutItemsStretch::None };
00116     unsigned int m_maximumRowsOrColumns{MAXUINT};
00117     // !!! WARNING !!!
00118     // Any storage here needs to be related to layout configuration.
00119     // layout specific state needs to be stored in UniformGridLayoutState.
00120  };
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshRequestedEventArgs Member List

This is the complete list of members for RefreshRequestedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
DecrementDeferralCount() | RefreshRequestedEventArgs |
DeleteInstanceOnUIThread(std::unique_ptr< RefreshRequestedEventArgs > &&self) noexcept | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
final_release(std::unique_ptr< RefreshRequestedEventArgs > &&self) | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
GetDeferral() | RefreshRequestedEventArgs |
GetInner() | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
IncrementDeferralCount() | RefreshRequestedEventArgs |
IsOnThread() | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< RefreshRequestedEventArgs, winrt::implementation::RefreshRequestedEventArgsT, winrt::composing, winrt::composable > | [inline]
RefreshRequestedEventArgs(const winrt::Deferral &handler) | RefreshRequestedEventArgs |
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Flat/RepeaterItem.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Flat

RepeaterItem.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.System;
00005 using Microsoft.UI.Input;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Automation.Peers;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Xaml.Input;
00010 using System.ComponentModel;
00011
00012 namespace MUXControlsTestApp.Samples.Selection
00013 {
00014     class RepeaterItem : ContentControl
00015     {
00016         public RepeaterItem()
00017         {
00018             IsTabStop = true;
00019             UseSystemFocusVisuals = true;
00020             Margin = new Thickness(3);
00021         }
00022
00023         public SelectionModel SelectionModel
00024         {
00025             get { return (SelectionModel)GetValue(SelectionModelProperty); }
00026             set { SetValue(SelectionModelProperty, value); }
00027         }
00028
00029         public static readonly DependencyProperty SelectionModelProperty =
00030             DependencyProperty.Register("SelectionModel", typeof(SelectionModel), typeof(RepeaterItem), new PropertyMetadata(null, new PropertyChangedCallback(OnPropertyChanged)));
00031
00032         public int RepeatedIndex
00033         {
00034             get { return (int)GetValue(RepeatedIndexProperty); }
00035             set { SetValue(RepeatedIndexProperty, value); }
00036         }
00037
00038         public static readonly DependencyProperty RepeatedIndexProperty =
00039             DependencyProperty.Register("RepeatedIndex", typeof(int), typeof(RepeaterItem), new PropertyMetadata(0, new PropertyChangedCallback(OnPropertyChanged)));
00040
00041         public bool IsSelected
00042         {
00043             get { return (bool)GetValue(IsSelectedProperty); }
00044             set { SetValue(IsSelectedProperty, value); }
00045         }
00046
00047         public static readonly DependencyProperty IsSelectedProperty =
00048             DependencyProperty.Register("IsSelected", typeof(bool), typeof(RepeaterItem), new PropertyMetadata(false));
00049
00050         private static void OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
00051         {
00052             if (args.Property == RepeatedIndexProperty)
00053             {
00054                 var item = obj as RepeaterItem;
00055                 if (item.SelectionModel != null)
00056                 {
00057                     item.IsSelected = item.SelectionModel.IsSelected(item.RepeatedIndex).Value;
00058                 }
00059             }
00060             else if (args.Property == SelectionModelProperty)
00061             {
00062                 if (args.OldValue != null)
00063                 {
00064                     (args.OldValue as SelectionModel).PropertyChanged -= (obj as RepeaterItem).OnselectionModelChanged;
00065                 }
00066
00067                 if (args.NewValue != null)
00068                 {
00069                     (args.NewValue as SelectionModel).PropertyChanged += (obj as RepeaterItem).OnselectionModelChanged;
00070                 }
00071             }
00072         }
00073
00074         protected override void OnKeyUp(KeyRoutedEventArgs e)
00075         {
00076             if (SelectionModel != null)
00077             {
00078                 if (e.Key == VirtualKey.Escape)
00079                 {
00080                     SelectionModel.ClearSelection();
00081                 }
00082                 else if (e.Key == VirtualKey.Space)
00083                 {
00084                     SelectionModel.Select(RepeatedIndex);
00085                 }
00086                 else if (!SelectionModel.SingleSelect)
00087                 {
00088                     var isShiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
00089                     var isCtrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(Windows.UI.Core.CoreVirtualKeyStates.Down);
00090                     if (e.Key == VirtualKey.A && isCtrlPressed)
00091                     {
00092                         SelectionModel.SelectAll();
00093                     }
00094                     else if (isShiftPressed)
00095                     {
00096                         SelectionModel.SelectRangeFromAnchor(RepeatedIndex);
00097                     }
00098                 }
00099             }
00100
00101             base.OnKeyUp(e);
00102         }
00103
00104         protected override void OnPointerPressed(PointerRoutedEventArgs e)
00105         {
00106             if (SelectionModel != null)
00107             {
00108                 if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Shift) && !SelectionModel.SingleSelect)
00109                 {
00110                     if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
00111                     {
00112                         SelectionModel.DeselectRangeFromAnchor(RepeatedIndex);
00113                     }
00114                     else
00115                     {
00116                         SelectionModel.SelectRangeFromAnchor(RepeatedIndex);
00117                     }
00118                 }
00119                 else if (e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
00120                 {
00121                     if (SelectionModel.IsSelected(RepeatedIndex).Value)
00122                     {
00123                         SelectionModel.Deselect(RepeatedIndex);
00124                     }
00125                     else
00126                     {
00127                         SelectionModel.Select(RepeatedIndex);
00128                     }
00129                 }
00130                 else
00131                 {
00132                     SelectionModel.Select(RepeatedIndex);
00133                     this.Focus(FocusState.Keyboard);
00134                 }
00135             }
00136
00137             base.OnPointerPressed(e);
00138         }
00139
00140         protected override AutomationPeer OnCreateAutomationPeer()
00141         {
00142             return new RepeaterItemAutomationPeer(this);
00143         }
00144
00145         private void OnselectionModelChanged(object sender, PropertyChangedEventArgs e)
00146         {
00147             if (e.PropertyName == "SelectedIndices")
00148             {
00149                 bool oldValue = IsSelected;
00150                 bool newValue = SelectionModel.IsSelected(RepeatedIndex).Value;
00151                 if (oldValue != newValue)
00152                 {
00153                     IsSelected = newValue;
00154
00155                     // AutomationEvents.PropertyChanged is used as a value that means dont raise anything
00156                     AutomationEvents eventToRaise =
00157                         oldValue ?
00158                             (SelectionModel.SingleSelect ? AutomationEvents.PropertyChanged : AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection) :
00159                             (SelectionModel.SingleSelect ? AutomationEvents.SelectionItemPatternOnElementSelected : AutomationEvents.SelectionItemPatternOnElementAddedToSelection);
00160
00161                     if (eventToRaise != AutomationEvents.PropertyChanged && AutomationPeer.ListenerExists(eventToRaise))
00162                     {
00163                         var peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);
00164                         peer.RaiseAutomationEvent(eventToRaise);
00165                     }
00166                 }
00167             }
00168         }
00169     }
00170 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SimpleXamlStartStopEvent_RAII Member List

This is the complete list of members for SimpleXamlStartStopEvent_RAII, including all inherited members.
m_objectPointer | SimpleXamlStartStopEvent_RAII | [protected]
operator=(const SimpleXamlStartStopEvent_RAII &) | SimpleXamlStartStopEvent_RAII |
operator=(SimpleXamlStartStopEvent_RAII &&) | SimpleXamlStartStopEvent_RAII |
SimpleXamlStartStopEvent_RAII(const SimpleXamlStartStopEvent_RAII &) | SimpleXamlStartStopEvent_RAII |
SimpleXamlStartStopEvent_RAII(SimpleXamlStartStopEvent_RAII &&) | SimpleXamlStartStopEvent_RAII |
SimpleXamlStartStopEvent_RAII(uint64_t objectPointer) | SimpleXamlStartStopEvent_RAII | [inline, protected]
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealListViewItemPresenter.h Source File

  • File List
  • File Members
  • Materials
  • Reveal

RevealListViewItemPresenter.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RevealListViewItemPresenter.g.h"
00007
00008 class RevealListViewItemPresenter :
00009     public ReferenceTracker<RevealListViewItemPresenter, winrt::implementation::RevealListViewItemPresenterT>
00010 {
00011 public:
00012     bool GoToElementStateCore(winrt::hstring const& stateName, bool useTransitions);
00013 };
00014
00015 #include "RevealListViewItemPresenter.properties.cpp"
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/Phaser.cpp Source File

  • File List
  • File Members
  • Repeater

Phaser.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ItemsRepeater.common.h"
00007 #include "QPCTimer.h"
00008 #include "BuildTreeScheduler.h"
00009 #include "VirtualizationInfo.h"
00010 #include "ItemsRepeater.h"
00011 #include "Phaser.h"
00012
00013 ElementInfo::ElementInfo(const winrt::UIElement& element, const winrt::com_ptr<VirtualizationInfo>& virtInfo) :
00014     m_element(element),
00015     m_virtInfo(virtInfo)
00016 {
00017     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_INT, METH_NAME, this, virtInfo->Index());
00018 }
00019
00020 Phaser::Phaser(ItemsRepeater* owner) :
00021     m_owner(owner)
00022 {
00023     // ItemsRepeater is not fully constructed yet. Don't interact with it.
00024 }
00025
00026 void Phaser::PhaseElement(
00027     const winrt::UIElement& element,
00028     const winrt::com_ptr<VirtualizationInfo>& virtInfo)
00029 {
00030     auto dataTemplateComponent = virtInfo->DataTemplateComponent();
00031     auto nextPhase = virtInfo->Phase();
00032     bool shouldPhase = false;
00033
00034     if (nextPhase > 0)
00035     {
00036         if (dataTemplateComponent)
00037         {
00038             // Perf optimization: RecyclingElementFactory sets up the virtualization info so we don't need to update it here.
00039             shouldPhase = true;
00040         }
00041         else
00042         {
00043             throw winrt::hresult_error(E_FAIL, L"Phase was set on virtualization info, but dataTemplateComponent was not.");
00044         }
00045     }
00046     else if(nextPhase == VirtualizationInfo::PhaseNotSpecified)
00047     {
00048         // If virtInfo->Phase is not specified, virtInfo->DataTemplateComponent cannot be valid.
00049         MUX_ASSERT(!dataTemplateComponent);
00050         // ItemsRepeater might be using a custom view generator in which case, virtInfo would not be bootstrapped.
00051         // In this case, fallback to querying for the data template component and setup virtualization info now.
00052         dataTemplateComponent = winrt::XamlBindingHelper::GetDataTemplateComponent(element);
00053         if (dataTemplateComponent)
00054         {
00055             // Clear out old data.
00056             dataTemplateComponent.Recycle();
00057
00058             nextPhase = VirtualizationInfo::PhaseReachedEnd;
00059             const auto index = virtInfo->Index();
00060             const auto data = m_owner->ItemsSourceView().GetAt(index);
00061             // Run Phase 0
00062             dataTemplateComponent.ProcessBindings(data, index, 0 /* currentPhase */, nextPhase);
00063
00064             // Update phase on virtInfo. Set data and templateComponent only if x:Phase was used.
00065             virtInfo->UpdatePhasingInfo(nextPhase, nextPhase > 0 ? data : nullptr, nextPhase > 0 ? dataTemplateComponent : nullptr);
00066             shouldPhase = nextPhase > 0;
00067         }
00068     }
00069
00070     if (shouldPhase)
00071     {
00072         // Insert at the top since we remove from bottom during DoPhasedWorkCallback. This keeps the ordering of items
00073         // the same as the order in which items are realized.
00074         m_pendingElements.insert(m_pendingElements.begin(), ElementInfo(element, virtInfo));
00075         RegisterForCallback();
00076     }
00077 }
00078
00079 void Phaser::StopPhasing(const winrt::UIElement& element, const winrt::com_ptr<VirtualizationInfo>& virtInfo)
00080 {
00081     // We need to remove the element from the pending elements list. We cannot just change the phase to -1
00082     // since it will get updated when the element gets recycled.
00083     if (virtInfo->DataTemplateComponent())
00084     {
00085         auto it = std::find_if(m_pendingElements.begin(), m_pendingElements.end(), [&element](const ElementInfo& info) { return info.Element() == element; });
00086
00087         if (it != m_pendingElements.end())
00088         {
00089             m_pendingElements.erase(it);
00090         }
00091     }
00092
00093     // Clean Phasing information for this item.
00094     virtInfo->UpdatePhasingInfo(VirtualizationInfo::PhaseNotSpecified, nullptr /* data */, nullptr /* dataTemplateComponent */);
00095 }
00096
00097 void Phaser::DoPhasedWorkCallback()
00098 {
00099     MarkCallbackRecieved();
00100
00101     if (!m_pendingElements.empty() && !BuildTreeScheduler::ShouldYield())
00102     {
00103         const auto visibleWindow = m_owner->VisibleWindow();
00104         SortElements(visibleWindow);
00105         int currentIndex = static_cast<int>(m_pendingElements.size()) - 1;
00106         do
00107         {
00108             const auto info = m_pendingElements[currentIndex];
00109             const auto element = info.Element();
00110             const auto virtInfo = info.VirtInfo();
00111             const auto dataIndex = virtInfo->Index();
00112
00113             const int currentPhase = virtInfo->Phase();
00114             if (currentPhase > 0)
00115             {
00116                 int nextPhase = VirtualizationInfo::PhaseReachedEnd;
00117                 virtInfo->DataTemplateComponent().ProcessBindings(virtInfo->Data(), -1 /* item index unused */, currentPhase, nextPhase);
00118                 ValidatePhaseOrdering(currentPhase, nextPhase);
00119
00120                 const auto previousAvailableSize = winrt::LayoutInformation::GetAvailableSize(element);
00121                 element.Measure(previousAvailableSize);
00122
00123                 if (nextPhase > 0)
00124                 {
00125                     virtInfo->Phase(nextPhase);
00126                     // If we are the first item or
00127                     // If the current items phase is higher than the next items phase, then move to the next item.
00128                     if (currentIndex == 0 ||
00129                         virtInfo->Phase() > m_pendingElements[static_cast<std::vector<ElementInfo>::size_type>(currentIndex) - 1].VirtInfo()->Phase())
00130                     {
00131                         currentIndex--;
00132                     }
00133                 }
00134                 else
00135                 {
00136                     m_pendingElements.erase(m_pendingElements.begin() + currentIndex);
00137                     currentIndex--;
00138                 }
00139             }
00140             else
00141             {
00142                 throw winrt::hresult_error(E_FAIL, L"Cleared element found in pending list which is not expected");
00143             }
00144
00145             const auto pendingCount = static_cast<int>(m_pendingElements.size());
00146             if (currentIndex == -1)
00147             {
00148                 // Reached the top, start from the bottom again
00149                 currentIndex = pendingCount - 1;
00150             }
00151             else if (currentIndex > -1 && currentIndex < pendingCount - 1)
00152             {
00153                 // If the next element is oustide the visible window and there are elements in the visible window
00154                 // go back to the visible window.
00155                 bool nextItemIsVisible = SharedHelpers::DoRectsIntersect(visibleWindow, m_pendingElements[currentIndex].VirtInfo()->ArrangeBounds());
00156                 if (!nextItemIsVisible)
00157                 {
00158                     bool haveVisibleItems = SharedHelpers::DoRectsIntersect(visibleWindow, m_pendingElements[static_cast<size_t>(pendingCount) - 1].VirtInfo()->ArrangeBounds());
00159                     if (haveVisibleItems)
00160                     {
00161                         currentIndex = pendingCount - 1;
00162                     }
00163                 }
00164             }
00165         } while (!m_pendingElements.empty() && !BuildTreeScheduler::ShouldYield());
00166     }
00167
00168     if (!m_pendingElements.empty())
00169     {
00170         RegisterForCallback();
00171     }
00172 }
00173
00174 void Phaser::RegisterForCallback()
00175 {
00176     if (!m_registeredForCallback)
00177     {
00178         MUX_ASSERT(!m_pendingElements.empty());
00179         m_registeredForCallback = true;
00180         BuildTreeScheduler::RegisterWork(
00181             m_pendingElements[m_pendingElements.size() - 1].VirtInfo()->Phase(), // Use the phase of the last one in the sorted list
00182             [this]()
00183         {
00184             DoPhasedWorkCallback();
00185         });
00186     }
00187 }
00188
00189 void Phaser::MarkCallbackRecieved()
00190 {
00191     m_registeredForCallback = false;
00192 }
00193
00194 /* static */
00195 void Phaser::ValidatePhaseOrdering(int currentPhase, int nextPhase)
00196 {
00197     if (nextPhase > 0 && nextPhase <= currentPhase)
00198     {
00199         // nextPhase <= currentPhase is invalid
00200         throw winrt::hresult_error(E_FAIL, L"Phases are required to be monotonically increasing.");
00201     }
00202 }
00203
00204 void Phaser::SortElements(const winrt::Rect& visibleWindow)
00205 {
00206     // Sort in descending order (inVisibleWindow, phase)
00207     std::sort(
00208         m_pendingElements.begin(),
00209         m_pendingElements.end(),
00210         [visibleWindow](const auto& lhs, const auto& rhs)
00211     {
00212         const auto lhsBounds = lhs.VirtInfo()->ArrangeBounds();
00213         const auto lhsIntersects = SharedHelpers::DoRectsIntersect(lhsBounds, visibleWindow);
00214         const auto rhsBounds = rhs.VirtInfo()->ArrangeBounds();
00215         const auto rhsIntersects = SharedHelpers::DoRectsIntersect(rhsBounds, visibleWindow);
00216
00217         if ((lhsIntersects && rhsIntersects) ||
00218             (!lhsIntersects && !rhsIntersects))
00219         {
00220             // Both are in the visible window or both are not
00221             return lhs.VirtInfo()->Phase() < rhs.VirtInfo()->Phase();
00222         }
00223         else if (lhsIntersects)
00224         {
00225             // Left is in visible window
00226             return false;
00227         }
00228         else
00229         {
00230             return true;
00231         }
00232     }
00233     );
00234 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemInvokedEventArgs.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewItemInvokedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeViewItemInvokedEventArgs.h"
00007
00008 winrt::IInspectable TreeViewItemInvokedEventArgs::InvokedItem()
00009 {
00010     return m_invokedItem.get();
00011 }
00012
00013 bool TreeViewItemInvokedEventArgs::Handled()
00014 {
00015     return m_Handled;
00016 }
00017
00018 void TreeViewItemInvokedEventArgs::Handled(bool value)
00019 {
00020     m_Handled = value;
00021 }
00022
00023 void TreeViewItemInvokedEventArgs::InvokedItem(const winrt::IInspectable& invokedItem)
00024 {
00025     m_invokedItem.set(invokedItem);
00026 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TestUI/TabViewSizingPage.xaml.cs Source File

  • File List
  • File Members
  • TabView
  • TestUI

TabViewSizingPage.xaml.cs

Go to the documentation of this file.
00001 ﻿
00002 using System;
00003 using Microsoft.UI.Xaml;
00004 using Microsoft.UI.Xaml.Controls;
00005 using Microsoft.UI.Xaml.Controls.Primitives;
00006 using Microsoft.UI.Xaml.Media;
00007 using Microsoft.UI.Xaml.Markup;
00008 using Windows.UI;
00009 using System.Windows.Input;
00010 using Microsoft.UI.Xaml.Automation;
00011
00012 using Microsoft.UI.Xaml.Controls;
00013
00014 namespace MUXControlsTestApp
00015 {
00016     public sealed partial class TabViewSizingPage : Page
00017     {
00018         public TabViewSizingPage()
00019         {
00020             this.InitializeComponent();
00021         }
00022
00023         int _newTabNumber = 1;
00024
00025         private void SetSmallWidth_Click(object sender, object args)
00026         {
00027             LayoutRoot.Width = 500;
00028         }
00029
00030         private void SetLargeWidth_Click(object sender, object args)
00031         {
00032             LayoutRoot.Width = 800;
00033         }
00034
00035         private void GetWidthsButton_Click(object sender, object args)
00036         {
00037             WidthEqualText.Text = TabViewEqual.ActualWidth.ToString();
00038             WidthSizeToContentText.Text = TabViewSizeToContent.ActualWidth.ToString();
00039         }
00040
00041         private void Tabview_AddTabButtonClick(TabView sender, object args)
00042         {
00043             TabViewItem item = new TabViewItem();
00044             item.IconSource = new Microsoft.UI.Xaml.Controls.SymbolIconSource { Symbol = Symbol.Accept };
00045             item.Header = "New Tab " + _newTabNumber++;
00046             item.Content = item.Header;
00047
00048             sender.TabItems.Add(item);
00049         }
00050
00051         private void Tabs_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs e)
00052         {
00053             sender.TabItems.Remove(e.Tab);
00054         }
00055     }
00056 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealScenarioGrid Member List

This is the complete list of members for RevealScenarioGrid, including all inherited members.
BackgroundComboBoxChanged(object sender, SelectionChangedEventArgs e) | RevealScenarioGrid | [inline, private]
backgroundTypeSource | RevealScenarioGrid | [private]
ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | RevealScenarioGrid | [inline, private]
ComboBox_SelectionChanged_1(object sender, SelectionChangedEventArgs e) | RevealScenarioGrid | [inline, private]
gridItemTypeSource | RevealScenarioGrid | [private]
gridSource | RevealScenarioGrid | [private]
RevealScenarioGrid() | RevealScenarioGrid | [inline]
selectionModeSource | RevealScenarioGrid | [private]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewAutomationPeer Member List

This is the complete list of members for TabViewAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
CanSelectMultiple() | TabViewAutomationPeer |
CheckThread() | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< TabViewAutomationPeer > &&self) noexcept | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
final_release(std::unique_ptr< TabViewAutomationPeer > &&self) | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline, static]
GetAutomationControlTypeCore() | TabViewAutomationPeer |
GetBase() | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
GetClassNameCore() | TabViewAutomationPeer |
GetInner() | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
GetPatternCore(winrt::PatternInterface const &patternInterface) | TabViewAutomationPeer |
GetSelection() | TabViewAutomationPeer |
IsOnThread() | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
IsSelectionRequired() | TabViewAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TabViewAutomationPeer, winrt::implementation::TabViewAutomationPeerT, winrt::ISelectionProvider > | [inline]
TabViewAutomationPeer(winrt::TabView const &owner) | TabViewAutomationPeer |
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ElementFromElementElementFactory Member List

This is the complete list of members for ElementFromElementElementFactory, including all inherited members.
GetElementCore(Microsoft.UI.Xaml.ElementFactoryGetArgs args) | ElementFromElementElementFactory | [inline, protected]
RecycleElementCore(Microsoft.UI.Xaml.ElementFactoryRecycleArgs args) | ElementFromElementElementFactory | [inline, protected]
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MenuBar/MenuBarAutomationPeer.idl Source File

  • File List
  • File Members
  • MenuBar

MenuBarAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 /* MenuBarAutomationPeer Content */
00005 [MUX_PUBLIC]
00006 [webhosthidden]
00007 unsealed runtimeclass MenuBarAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00008 {
00009     MenuBarAutomationPeer(MU_XC_NAMESPACE.MenuBar owner);
00010 }
00011
00012 /* MenuBarItemAutomationPeer Content */
00013 [MUX_PUBLIC]
00014 [webhosthidden]
00015 unsealed runtimeclass MenuBarItemAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer,
00016 Microsoft.UI.Xaml.Automation.Provider.IExpandCollapseProvider,
00017 Microsoft.UI.Xaml.Automation.Provider.IInvokeProvider
00018 {
00019     MenuBarItemAutomationPeer(MU_XC_NAMESPACE.MenuBarItem owner);
00020 }
00021
00022 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/WinEventLogLevels.h Source File

  • File List
  • File Members
  • Common

WinEventLogLevels.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // From winmeta.h
00005
00006 #define WINEVENT_LEVEL_LOG_ALWAYS 0x0
00007 #define WINEVENT_LEVEL_CRITICAL 0x1
00008 #define WINEVENT_LEVEL_ERROR 0x2
00009 #define WINEVENT_LEVEL_WARNING 0x3
00010 #define WINEVENT_LEVEL_INFO 0x4
00011 #define WINEVENT_LEVEL_VERBOSE 0x5
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerElements Member List

This is the complete list of members for PipsPagerElements, including all inherited members.
CurrentMaxVisualIndicatorsTextBlock | PipsPagerElements | [private]
CurrentNumberOfPagesTextBlock | PipsPagerElements | [private]
CurrentOrientationTextBlock | PipsPagerElements | [private]
CurrentPageTextBlock | PipsPagerElements | [private]
FocusedPageIndexTextBlock | PipsPagerElements | [private]
GetCurrentMaxVisualIndicatorsTextBlock() | PipsPagerElements | [inline]
GetCurrentNumberOfPagesTextBlock() | PipsPagerElements | [inline]
GetCurrentOrientationTextBlock() | PipsPagerElements | [inline]
GetCurrentPageTextBlock() | PipsPagerElements | [inline]
GetElement< T >(ref T element, string elementName) | PipsPagerElements | [inline, private]
GetElementWithinPager< T >(ref T element, string elementName) | PipsPagerElements | [inline, private]
GetFocusedPageIndexTextBlock() | PipsPagerElements | [inline]
GetHorizontalOrientationPipsPagerButtonHeightTextBlock() | PipsPagerElements | [inline]
GetHorizontalOrientationPipsPagerButtonWidthTextBlock() | PipsPagerElements | [inline]
GetMaxVisualIndicatorsComboBox() | PipsPagerElements | [inline]
GetNextPageButton() | PipsPagerElements | [inline]
GetNextPageButtonIsEnabledCheckBox() | PipsPagerElements | [inline]
GetNextPageButtonIsVisibleCheckBox() | PipsPagerElements | [inline]
GetNextPageButtonVisibilityComboBox() | PipsPagerElements | [inline]
GetNumberOfPagesComboBox() | PipsPagerElements | [inline]
GetOrientationComboBox() | PipsPagerElements | [inline]
GetPipsPager() | PipsPagerElements | [inline]
GetPipsPagerButtonSizesButton() | PipsPagerElements | [inline]
GetPipWithPageNumber(string elementName) | PipsPagerElements | [inline]
GetPreviousPageButton() | PipsPagerElements | [inline]
GetPreviousPageButtonIsEnabledCheckBox() | PipsPagerElements | [inline]
GetPreviousPageButtonIsVisibleCheckBox() | PipsPagerElements | [inline]
GetPreviousPageButtonVisibilityComboBox() | PipsPagerElements | [inline]
GetVerticalOrientationPipsPagerButtonHeightTextBlock() | PipsPagerElements | [inline]
GetVerticalOrientationPipsPagerButtonWidthTextBlock() | PipsPagerElements | [inline]
GetWrapModeComboBox() | PipsPagerElements | [inline]
HorizontalOrientationPipsPagerButtonHeightTextBlock | PipsPagerElements | [private]
HorizontalOrientationPipsPagerButtonWidthTextBlock | PipsPagerElements | [private]
MaxVisualIndicatorsComboBox | PipsPagerElements | [private]
NextPageButton | PipsPagerElements | [private]
NextPageButtonIsEnabledCheckBox | PipsPagerElements | [private]
NextPageButtonIsVisibleCheckBox | PipsPagerElements | [private]
NextPageButtonVisibilityComboBox | PipsPagerElements | [private]
NumberOfPagesComboBox | PipsPagerElements | [private]
OrientationComboBox | PipsPagerElements | [private]
PipsPager | PipsPagerElements | [private]
PreviousPageButton | PipsPagerElements | [private]
PreviousPageButtonIsEnabledCheckBox | PipsPagerElements | [private]
PreviousPageButtonIsVisibleCheckBox | PipsPagerElements | [private]
PreviousPageButtonVisibilityComboBox | PipsPagerElements | [private]
RetrievePipsPagerButtonSizesButton | PipsPagerElements | [private]
VerticalOrientationPipsPagerButtonHeightTextBlock | PipsPagerElements | [private]
VerticalOrientationPipsPagerButtonWidthTextBlock | PipsPagerElements | [private]
WrapModeComboBox | PipsPagerElements | [private]
Generated on Sun Dec 1 2024 20:53:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshInfoProviderImplementation Member List

This is the complete list of members for RefreshInfoProviderImplementation, including all inherited members.
compositionProperties | RefreshInfoProviderImplementation | [private]
CompositionProperties | RefreshInfoProviderImplementation |
CustomAnimationStateEntered(InteractionTracker sender, InteractionTrackerCustomAnimationStateEnteredArgs args) | RefreshInfoProviderImplementation | [inline]
executionRatio | RefreshInfoProviderImplementation | [private]
ExecutionRatio | RefreshInfoProviderImplementation |
IdleStateEntered(InteractionTracker sender, InteractionTrackerIdleStateEnteredArgs args) | RefreshInfoProviderImplementation | [inline]
InertiaStateEntered(InteractionTracker sender, InteractionTrackerInertiaStateEnteredArgs args) | RefreshInfoProviderImplementation | [inline]
InteractingStateEntered(InteractionTracker sender, InteractionTrackerInteractingStateEnteredArgs args) | RefreshInfoProviderImplementation | [inline]
InteractionRatioChanged | RefreshInfoProviderImplementation |
interactionRatioChangedCount | RefreshInfoProviderImplementation | [private]
InteractionRatioCompositionProperty | RefreshInfoProviderImplementation |
interactionRatioName | RefreshInfoProviderImplementation | [private]
IsInteractingForRefresh | RefreshInfoProviderImplementation |
isInteractingForRefresh | RefreshInfoProviderImplementation | [private]
IsInteractingForRefreshChanged | RefreshInfoProviderImplementation |
OnRefreshCompleted() | RefreshInfoProviderImplementation | [inline]
OnRefreshStarted() | RefreshInfoProviderImplementation | [inline]
RaiseInteractionRatioChanged(double interactionRatio) | RefreshInfoProviderImplementation | [inline, private]
RefreshCompleted | RefreshInfoProviderImplementation |
RefreshInfoProviderImplementation(RefreshPullDirection refreshPullDirection, Size refreshVisualizerSize, Compositor compositor) | RefreshInfoProviderImplementation | [inline]
refreshPullDirection | RefreshInfoProviderImplementation | [private]
RefreshStarted | RefreshInfoProviderImplementation |
refreshVisualizerSize | RefreshInfoProviderImplementation | [private]
RequestIgnored(InteractionTracker sender, InteractionTrackerRequestIgnoredArgs args) | RefreshInfoProviderImplementation | [inline]
UpdateIsInteractingForRefresh(bool value) | RefreshInfoProviderImplementation | [inline]
ValuesChanged(InteractionTracker sender, InteractionTrackerValuesChangedArgs args) | RefreshInfoProviderImplementation | [inline]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl.h Source File

  • File List
  • File Members
  • SwipeControl

SwipeControl.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SwipeControlTrace.h"
00007 #include "SwipeControl.g.h"
00008
00009 #include "SwipeControl.properties.h"
00010
00011 enum class CreatedContent { Left, Top, Bottom, Right, None };
00012
00013 class SwipeControl :
00014     public ReferenceTracker<SwipeControl, winrt::implementation::SwipeControlT>,
00015     public SwipeControlProperties
00016 {
00017 public:
00018     SwipeControl();
00019     virtual ~SwipeControl();
00020
00021 #pragma region ISwipeControl
00022
00023     void Close();
00024
00025 #pragma endregion
00026
00027 #pragma region IFrameworkElementOverrides
00028     void OnApplyTemplate();
00029
00030     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00031     winrt::Size MeasureOverride(winrt::Size const& availableSize);
00032 #pragma endregion
00033
00034     void CustomAnimationStateEntered(
00035         winrt::InteractionTrackerCustomAnimationStateEnteredArgs const& args);
00036
00037     void RequestIgnored(
00038         winrt::InteractionTrackerRequestIgnoredArgs const& args);
00039
00040     void IdleStateEntered(
00041         winrt::InteractionTrackerIdleStateEnteredArgs const& args);
00042
00043     void InteractingStateEntered(
00044         winrt::InteractionTrackerInteractingStateEnteredArgs const& args);
00045
00046     void InertiaStateEntered(
00047         winrt::InteractionTrackerInertiaStateEnteredArgs const& args);
00048
00049     void ValuesChanged(
00050         winrt::InteractionTrackerValuesChangedArgs const& args);
00051
00052     winrt::SwipeItems GetCurrentItems() { return m_currentItems.get(); }
00053
00054 #pragma region TestHookHelpers
00055     static winrt::SwipeControl GetLastInteractedWithSwipeControl();
00056     bool GetIsOpen();
00057     bool GetIsIdle();
00058 #pragma endregion
00059
00060 private:
00061     void OnLeftItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/);
00062     void OnRightItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/);
00063     void OnBottomItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/);
00064     void OnTopItemsCollectionChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/);
00065     void OnLoaded(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/);
00066
00067     void AttachEventHandlers();
00068     void DetachEventHandlers(bool useSafeGet);
00069     void OnSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00070     void OnSwipeContentStackPanelSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args);
00071     void OnPointerPressedEvent(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00072     void InputEaterGridTapped(const winrt::IInspectable& /*sender*/, const winrt::TappedRoutedEventArgs& args);
00073
00074     void AttachDismissingHandlers();
00075     void DetachDismissingHandlers();
00076     void DismissSwipeOnAcceleratorKeyActivator(const winrt::Windows::UI::Core::CoreDispatcher & sender, const winrt::AcceleratorKeyEventArgs & args);
00077
00078     // Used on platforms where we have XamlRoot.
00079     void CurrentXamlRootChanged(const winrt::XamlRoot & sender, const winrt::XamlRootChangedEventArgs & args);
00080
00081     void DismissSwipeOnAnExternalTap(winrt::Point const& tapPoint);
00082
00083     void GetTemplateParts();
00084
00085     void InitializeInteractionTracker();
00086     void ConfigurePositionInertiaRestingValues();
00087
00088     winrt::Visual FindVisualInteractionSourceVisual();
00089     void EnsureClip();
00090
00091     void CloseWithoutAnimation();
00092     void CloseIfNotRemainOpenExecuteItem();
00093
00094     void CreateLeftContent();
00095     void CreateRightContent();
00096     void CreateTopContent();
00097     void CreateBottomContent();
00098     void CreateContent(const winrt::SwipeItems& items);
00099
00100     void AlignStackPanel();
00101     void PopulateContentItems();
00102     void SetupExecuteExpressionAnimation();
00103     void SetupClipAnimation();
00104     void UpdateColors();
00105
00106     winrt::AppBarButton GetSwipeItemButton(const winrt::SwipeItem& swipeItem);
00107     void UpdateColorsIfExecuteItem();
00108     void UpdateColorsIfRevealItems();
00109     void UpdateExecuteForegroundColor(const winrt::SwipeItem& swipeItem);
00110     void UpdateExecuteBackgroundColor(const winrt::SwipeItem& swipeItem);
00111
00112     void OnLeftItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args);
00113     void OnRightItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args);
00114     void OnTopItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args);
00115     void OnBottomItemsChanged(const winrt::IObservableVector<winrt::SwipeItem>& sender, const winrt::IVectorChangedEventArgs args);
00116
00117     void TryGetSwipeVisuals();
00118     void UpdateIsOpen(bool isOpen);
00119     void UpdateThresholdReached(float value);
00120
00121     void ThrowIfHasVerticalAndHorizontalContent(bool IsHorizontal = false);
00122
00123     std::wstring GetAnimationTarget(winrt::UIElement child);
00124
00125     winrt::SwipeControl GetThis();
00126
00127     winrt::IInteractionTrackerOwner m_interactionTrackerOwner{ nullptr };
00128
00129     tracker_ref<winrt::Grid> m_rootGrid{ this };
00130     tracker_ref<winrt::Grid> m_content{ this };
00131     tracker_ref<winrt::Grid> m_inputEater{ this };
00132     tracker_ref<winrt::Grid> m_swipeContentRoot{ this };
00133     tracker_ref<winrt::StackPanel> m_swipeContentStackPanel{ this };
00134
00135     tracker_ref<winrt::InteractionTracker> m_interactionTracker{ this };
00136     tracker_ref<winrt::VisualInteractionSource> m_visualInteractionSource{ this };
00137     tracker_ref<winrt::Compositor> m_compositor{ this };
00138
00139     tracker_ref<winrt::Visual> m_mainContentVisual{ this };
00140     tracker_ref<winrt::Visual> m_swipeContentRootVisual{ this };
00141     tracker_ref<winrt::Visual> m_swipeContentVisual{ this };
00142     tracker_ref<winrt::InsetClip> m_insetClip{ this };
00143
00144     tracker_ref<winrt::ExpressionAnimation> m_swipeAnimation{ this };
00145     tracker_ref<winrt::ExpressionAnimation> m_executeExpressionAnimation{ this };
00146     tracker_ref<winrt::ExpressionAnimation> m_clipExpressionAnimation{ this };
00147     tracker_ref<winrt::ExpressionAnimation> m_maxPositionExpressionAnimation{ this };
00148     tracker_ref<winrt::ExpressionAnimation> m_minPositionExpressionAnimation{ this };
00149
00150     tracker_ref<winrt::Style> m_swipeItemStyle{ this };
00151
00152     // Cache the current content object to minimize work if there are multiple swipes in the same direction.
00153     tracker_ref<winrt::SwipeItems> m_currentItems{ this };
00154
00155     winrt::event_token m_loadedToken{};
00156     winrt::event_token m_leftItemsChangedToken{};
00157     winrt::event_token m_rightItemsChangedToken{};
00158     winrt::event_token m_topItemsChangedToken{};
00159     winrt::event_token m_bottomItemsChangedToken{};
00160     winrt::event_token m_onSizeChangedToken{};
00161     winrt::event_token m_onSwipeContentStackPanelSizeChangedToken{};
00162     winrt::event_token m_inputEaterTappedToken{};
00163     tracker_ref<winrt::IInspectable> m_onPointerPressedEventHandler{ this };
00164
00165     // Used on platforms where we have XamlRoot.
00166     RoutedEventHandler_revoker m_xamlRootPointerPressedEventRevoker{};
00167     RoutedEventHandler_revoker m_xamlRootKeyDownEventRevoker{};
00168     winrt::XamlRoot::Changed_revoker m_xamlRootChangedRevoker{};
00169     winrt::CoreAcceleratorKeys::AcceleratorKeyActivated_revoker m_acceleratorKeyActivatedRevoker;
00170
00171     bool m_hasInitialLoadedEventFired{ false };
00172
00173     bool m_lastActionWasClosing{ false };
00174     bool m_lastActionWasOpening{ false };
00175     bool m_isInteracting{ false };
00176     bool m_isIdle{ true };
00177     bool m_isOpen{ false };
00178     bool m_thresholdReached{ false };
00179     //Near content = left or top
00180     //Far content = right or bottom
00181     bool m_blockNearContent{ false };
00182     bool m_blockFarContent{ false };
00183     bool m_isHorizontal{ true };
00184     CreatedContent m_createdContent{ CreatedContent::None };
00185
00186     static bool IsTranslationFacadeAvailableForSwipeControl(const winrt::UIElement& element);
00187     static wstring_view DirectionToInset(const CreatedContent& createdContent);
00188
00189     static constexpr wstring_view s_isNearOpenPropertyName{ L"isNearOpen"sv };
00190     static inline const std::wstring isNearOpenPropertyName() { return s_isNearOpenPropertyName.data(); }
00191     static constexpr wstring_view s_isFarOpenPropertyName{ L"isFarOpen"sv };
00192     static inline const std::wstring isFarOpenPropertyName() { return s_isFarOpenPropertyName.data(); }
00193     static constexpr wstring_view s_isNearContentPropertyName{ L"isNearContent"sv };
00194     static inline const std::wstring isNearContentPropertyName() { return s_isNearContentPropertyName.data(); }
00195     static constexpr wstring_view s_blockNearContentPropertyName{ L"blockNearContent"sv };
00196     static inline const std::wstring blockNearContentPropertyName() { return s_blockNearContentPropertyName.data(); }
00197     static constexpr wstring_view s_blockFarContentPropertyName{ L"blockFarContent"sv };
00198     static inline const std::wstring blockFarContentPropertyName() { return s_blockFarContentPropertyName.data(); }
00199
00200     static constexpr wstring_view s_hasLeftContentPropertyName{ L"hasLeftContent"sv };
00201     static inline const std::wstring hasLeftContentPropertyName() { return s_hasLeftContentPropertyName.data(); }
00202     static constexpr wstring_view s_hasRightContentPropertyName{ L"hasRightContent"sv };
00203     static inline const std::wstring hasRightContentPropertyName() { return s_hasRightContentPropertyName.data(); }
00204     static constexpr wstring_view s_hasTopContentPropertyName{ L"hasTopContent"sv };
00205     static inline const std::wstring hasTopContentPropertyName() { return s_hasTopContentPropertyName.data(); }
00206     static constexpr wstring_view s_hasBottomContentPropertyName{ L"hasBottomContent"sv };
00207     static inline const std::wstring hasBottomContentPropertyName() { return s_hasBottomContentPropertyName.data(); }
00208     static constexpr wstring_view s_isHorizontalPropertyName{ L"isHorizontal"sv };
00209     static inline const std::wstring isHorizontalPropertyName() { return s_isHorizontalPropertyName.data(); }
00210
00211     static constexpr wstring_view s_trackerPropertyName{ L"tracker"sv };
00212     static inline const std::wstring trackerPropertyName() { return s_trackerPropertyName.data(); }
00213     static constexpr wstring_view s_foregroundVisualPropertyName{ L"foregroundVisual"sv };
00214     static inline const std::wstring foregroundVisualPropertyName() { return s_foregroundVisualPropertyName.data(); }
00215     static constexpr wstring_view s_swipeContentVisualPropertyName{ L"swipeContentVisual"sv };
00216     static inline const std::wstring swipeContentVisualPropertyName() { return s_swipeContentVisualPropertyName.data(); }
00217     static constexpr wstring_view s_swipeContentSizeParameterName{ L"swipeContentVisual"sv };
00218     static inline const std::wstring swipeContentSizeParameterName() { return s_swipeContentSizeParameterName.data(); }
00219     static constexpr wstring_view s_swipeRootVisualPropertyName{ L"swipeRootVisual"sv };
00220     static inline const std::wstring swipeRootVisualPropertyName() { return s_swipeRootVisualPropertyName.data(); }
00221     static constexpr wstring_view s_maxThresholdPropertyName{ L"maxThreshold"sv };
00222     static inline const std::wstring maxThresholdPropertyName() { return s_maxThresholdPropertyName.data(); }
00223
00224     static constexpr wstring_view s_minPositionPropertyName{ L"minPosition"sv };
00225     static constexpr wstring_view s_maxPositionPropertyName{ L"maxPosition"sv };
00226
00227     static constexpr wstring_view s_leftInsetTargetName{ L"LeftInset"sv };
00228     static constexpr wstring_view s_rightInsetTargetName{ L"RightInset"sv };
00229     static constexpr wstring_view s_topInsetTargetName{ L"TopInset"sv };
00230     static constexpr wstring_view s_bottomInsetTargetName{ L"BottomInset"sv };
00231
00232     static constexpr wstring_view s_translationPropertyName{ L"Translation"sv };
00233
00234     static constexpr wstring_view s_rootGridName{ L"RootGrid"sv };
00235     static constexpr wstring_view s_inputEaterName{ L"InputEater"sv };
00236     static constexpr wstring_view s_ContentRootName{ L"ContentRoot"sv };
00237     static constexpr wstring_view s_swipeContentRootName{ L"SwipeContentRoot"sv };
00238     static constexpr wstring_view s_swipeContentStackPanelName{ L"SwipeContentStackPanel"sv };
00239     static constexpr wstring_view s_swipeItemStyleName{ L"SwipeItemStyle"sv };
00240
00241
00242     static constexpr wstring_view s_swipeItemBackgroundResourceName{ L"SwipeItemBackground"sv };
00243     static constexpr wstring_view s_swipeItemForegroundResourceName{ L"SwipeItemForeground"sv };
00244     static constexpr wstring_view s_executeSwipeItemPreThresholdBackgroundResourceName{ L"SwipeItemPreThresholdExecuteBackground"sv };
00245     static constexpr wstring_view s_executeSwipeItemPostThresholdBackgroundResourceName{ L"SwipeItemPostThresholdExecuteBackground"sv };
00246     static constexpr wstring_view s_executeSwipeItemPreThresholdForegroundResourceName{ L"SwipeItemPreThresholdExecuteForeground"sv };
00247     static constexpr wstring_view s_executeSwipeItemPostThresholdForegroundResourceName{ L"SwipeItemPostThresholdExecuteForeground"sv };
00248 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ArithmeticCompositeEffect Member List

This is the complete list of members for ArithmeticCompositeEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1ArithmeticComposite) | ArithmeticCompositeEffect |
DECLARE_DUAL_SOURCES(Source1, Source2) | ArithmeticCompositeEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"MultiplyAmount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORX},{L"Source1Amount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORY},{L"Source2Amount", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORZ},{L"Offset", D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_VECTORW},{L"ClampOutput", D2D1_ARITHMETICCOMPOSITE_PROP_CLAMP_OUTPUT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | ArithmeticCompositeEffect |
DECLARE_POD_PROPERTY(MultiplyAmount, float, 1.0f, true) | ArithmeticCompositeEffect |
DECLARE_POD_PROPERTY(Source1Amount, float, 0.0f, true) | ArithmeticCompositeEffect |
DECLARE_POD_PROPERTY(Source2Amount, float, 0.0f, true) | ArithmeticCompositeEffect |
DECLARE_POD_PROPERTY(Offset, float, 0.0f, true) | ArithmeticCompositeEffect |
DECLARE_POD_PROPERTY(ClampOutput, bool, false, true) | ArithmeticCompositeEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | ArithmeticCompositeEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | ArithmeticCompositeEffect | [inline]
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItemTemplateSettings.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewItemTemplateSettings.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeViewItemTemplateSettings.h"
00007
00008 TreeViewItemTemplateSettings::TreeViewItemTemplateSettings()
00009 {
00010     EnsureProperties();
00011 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/XamlMember.h Source File

  • File List
  • File Members
  • dll

XamlMember.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class XamlMember :
00007     public winrt::implements<XamlMember, winrt::IXamlMember>
00008 {
00009 public:
00010     XamlMember(
00011         wstring_view const& memberName,
00012         const winrt::IXamlType& type,
00013         std::function<winrt::IInspectable(const winrt::IInspectable&)> getter,
00014         std::function<void(const winrt::IInspectable&, const winrt::IInspectable&)> setter,
00015         bool isDependencyProperty,
00016         bool isAttachable);
00017
00018     // IXamlMember
00019     bool IsAttachable();
00020     bool IsDependencyProperty();
00021     bool IsReadOnly();
00022     winrt::hstring Name();
00023     winrt::IXamlType TargetType();
00024     winrt::IXamlType Type();
00025     winrt::IInspectable GetValue(winrt::IInspectable const& instance);
00026
00027     void SetValue(winrt::IInspectable const& instance, winrt::IInspectable const& value);
00028
00029 private:
00030
00031     hstring m_memberName{};
00032     winrt::IXamlType m_type{};
00033     bool m_isDependencyProperty{};
00034     bool m_isAttachable{};
00035     std::function<winrt::IInspectable(winrt::IInspectable)> m_getter{};
00036     std::function<void(winrt::IInspectable, winrt::IInspectable)> m_setter{};
00037 };
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/event.h Source File

  • File List
  • File Members
  • inc

event.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include <set>
00007
00008 //
00009 // This is simple event implementation that is single-threaded and allows for customization of
00010 // the storage type to be a TrackerPtr
00011 //
00012
00013 extern __declspec(selectany) int64_t s_eventHandlerId = 0;
00014
00015 template <typename ImplT, typename T, typename StorageT = T>
00016 class event_base
00017 {
00018 protected:
00019     std::shared_ptr<std::map<int64_t, StorageT>> m_handlers;
00020
00021 public:
00022
00023     event_base(const event_base &) = delete;
00024     event_base & operator=(const event_base &) = delete;
00025
00026     event_base() = default;
00027
00028     ~event_base()
00029     {
00030     }
00031
00032     winrt::event_token add(const T & value)
00033     {
00034         auto token = InterlockedIncrement64(&s_eventHandlerId);
00035
00036         // Make a new map because add/remove during event call-out can happen and we want to
00037         // swap in a new container instead of modifying the one that we're iterating over.
00038         // This is a tradeoff -- either we copy the map every time during invoke in case add/remove
00039         // happens or we make a new copy during add/remove. We (and the C++/WinRT implementation
00040         // we're copied from) choose the latter.
00041         auto handlers = std::make_shared<std::map<int64_t, StorageT>>();
00042
00043         if (auto * before = m_handlers.get())
00044         {
00045             handlers->insert(before->begin(), before->end());
00046         }
00047
00048         auto holder = Impl()->wrap(value);
00049         handlers->insert({ token, holder });
00050         m_handlers = std::move(handlers);
00051         return winrt::event_token{ token };
00052     }
00053
00054     void remove(const winrt::event_token token)
00055     {
00056         // See comment in add(), we make a copy of the map on add/remove just like the C++/WinRT event implementation.
00057         auto handlers = std::make_shared<std::map<int64_t, StorageT>>();
00058
00059         if (auto * before = m_handlers.get())
00060         {
00061             handlers->insert(before->begin(), before->end());
00062         }
00063
00064         handlers->erase(token.value);
00065         m_handlers = std::move(handlers);
00066     }
00067
00068     template <typename... A> void operator()(A const & ... args) const
00069     {
00070         auto handlers = m_handlers;
00071
00072         if (auto * map = handlers.get())
00073         {
00074             for (const auto & pair : *map)
00075             {
00076                 auto handler = Impl()->unwrap(pair.second);
00077                 handler(args...);
00078             }
00079         }
00080     }
00081
00082     explicit operator bool() const noexcept
00083     {
00084         return static_cast<bool>(m_handlers) && m_handlers.get()->size() > 0;
00085     }
00086
00087 private:
00088     const ImplT* Impl() const { return static_cast<const ImplT*>(this); }
00089 };
00090
00091 template <typename T>
00092 class event_source :
00093     public event_base<event_source<T>, T, tracker_ref<T>>,
00094     public ReferenceTrackerContainerBase,
00095     public ReferenceTrackerStorageHelper<event_source<T>, T>
00096 {
00097 public:
00098     event_source(ITrackerHandleManager* owner)
00099         : ReferenceTrackerContainerBase{ owner }
00100     {
00101     }
00102 };
00103
00104 // Bug #11634051 if we don't have winrt::Implements we can remove this.
00105 template <typename T>
00106 class event :
00107     public event_base<event<T>, T, T>,
00108     public NonReferenceTrackerStorageHelper<T>
00109 {
00110 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTestHooks Member List

This is the complete list of members for ScrollPresenterTestHooks, including all inherited members.
AnchorEvaluated(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksAnchorEvaluatedEventArgs > const &value) | ScrollPresenterTestHooks | [static]
AnchorEvaluated(winrt::event_token const &token) | ScrollPresenterTestHooks | [static]
AreAnchorNotificationsRaised() | ScrollPresenterTestHooks | [static]
AreAnchorNotificationsRaised(bool areAnchorNotificationsRaised) | ScrollPresenterTestHooks | [static]
AreExpressionAnimationStatusNotificationsRaised() | ScrollPresenterTestHooks | [static]
AreExpressionAnimationStatusNotificationsRaised(bool areExpressionAnimationStatusNotificationsRaised) | ScrollPresenterTestHooks | [static]
AreInteractionSourcesNotificationsRaised() | ScrollPresenterTestHooks | [static]
AreInteractionSourcesNotificationsRaised(bool areInteractionSourcesNotificationsRaised) | ScrollPresenterTestHooks | [static]
ContentLayoutOffsetXChanged(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value) | ScrollPresenterTestHooks | [static]
ContentLayoutOffsetXChanged(winrt::event_token const &token) | ScrollPresenterTestHooks | [static]
ContentLayoutOffsetYChanged(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::IInspectable > const &value) | ScrollPresenterTestHooks | [static]
ContentLayoutOffsetYChanged(winrt::event_token const &token) | ScrollPresenterTestHooks | [static]
EnsureGlobalTestHooks() | ScrollPresenterTestHooks | [static]
ExpressionAnimationStatusChanged(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs > const &value) | ScrollPresenterTestHooks | [static]
ExpressionAnimationStatusChanged(winrt::event_token const &token) | ScrollPresenterTestHooks | [static]
GetArrangeRenderSizesDelta(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetConsolidatedHorizontalScrollSnapPoints(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetConsolidatedVerticalScrollSnapPoints(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetConsolidatedZoomSnapPoints(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetContentLayoutOffsetX(const winrt::ScrollPresenter &scrollPresenter, float &contentLayoutOffsetX) | ScrollPresenterTestHooks | [static]
GetContentLayoutOffsetY(const winrt::ScrollPresenter &scrollPresenter, float &contentLayoutOffsetY) | ScrollPresenterTestHooks | [static]
GetGlobalTestHooks() | ScrollPresenterTestHooks | [inline, static]
GetHorizontalSnapPointActualApplicableZone(const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint) | ScrollPresenterTestHooks | [static]
GetHorizontalSnapPointCombinationCount(const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint) | ScrollPresenterTestHooks | [static]
GetMaxPosition(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetMaxPositionExpressionAnimationExpression(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetMinPosition(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetMinPositionExpressionAnimationExpression(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetOffsetsChangeVelocityParameters(int &millisecondsPerUnit, int &minMilliseconds, int &maxMilliseconds) | ScrollPresenterTestHooks | [static]
GetPosition(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetScrollCompletedResult(const winrt::ScrollingScrollCompletedEventArgs &scrollCompletedEventArgs) | ScrollPresenterTestHooks | [static]
GetSnapPointVisualizationColor(const winrt::SnapPointBase &snapPoint) | ScrollPresenterTestHooks | [static]
GetTransformExpressionAnimationExpression(const winrt::ScrollPresenter &scrollPresenter) | ScrollPresenterTestHooks | [static]
GetVerticalSnapPointActualApplicableZone(const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint) | ScrollPresenterTestHooks | [static]
GetVerticalSnapPointCombinationCount(const winrt::ScrollPresenter &scrollPresenter, const winrt::ScrollSnapPointBase &scrollSnapPoint) | ScrollPresenterTestHooks | [static]
GetZoomCompletedResult(const winrt::ScrollingZoomCompletedEventArgs &zoomCompletedEventArgs) | ScrollPresenterTestHooks | [static]
GetZoomFactorChangeVelocityParameters(int &millisecondsPerUnit, int &minMilliseconds, int &maxMilliseconds) | ScrollPresenterTestHooks | [static]
GetZoomSnapPointActualApplicableZone(const winrt::ScrollPresenter &scrollPresenter, const winrt::ZoomSnapPointBase &zoomSnapPoint) | ScrollPresenterTestHooks | [static]
GetZoomSnapPointCombinationCount(const winrt::ScrollPresenter &scrollPresenter, const winrt::ZoomSnapPointBase &zoomSnapPoint) | ScrollPresenterTestHooks | [static]
InteractionSourcesChanged(winrt::TypedEventHandler< winrt::ScrollPresenter, winrt::ScrollPresenterTestHooksInteractionSourcesChangedEventArgs > const &value) | ScrollPresenterTestHooks | [static]
InteractionSourcesChanged(winrt::event_token const &token) | ScrollPresenterTestHooks | [static]
IsAnimationsEnabledOverride() | ScrollPresenterTestHooks | [static]
IsAnimationsEnabledOverride(winrt::IReference< bool > isAnimationsEnabledOverride) | ScrollPresenterTestHooks | [static]
m_anchorEvaluatedEventSource | ScrollPresenterTestHooks | [private]
m_contentLayoutOffsetXChangedEventSource | ScrollPresenterTestHooks | [private]
m_contentLayoutOffsetYChangedEventSource | ScrollPresenterTestHooks | [private]
m_expressionAnimationStatusChangedEventSource | ScrollPresenterTestHooks | [private]
m_interactionSourcesChangedEventSource | ScrollPresenterTestHooks | [private]
NotifyAnchorEvaluated(const winrt::ScrollPresenter &sender, const winrt::UIElement &anchorElement, double viewportAnchorPointHorizontalOffset, double viewportAnchorPointVerticalOffset) | ScrollPresenterTestHooks | [static]
NotifyContentLayoutOffsetXChanged(const winrt::ScrollPresenter &sender) | ScrollPresenterTestHooks | [static]
NotifyContentLayoutOffsetYChanged(const winrt::ScrollPresenter &sender) | ScrollPresenterTestHooks | [static]
NotifyExpressionAnimationStatusChanged(const winrt::ScrollPresenter &sender, bool isExpressionAnimationStarted, wstring_view const &propertyName) | ScrollPresenterTestHooks | [static]
NotifyInteractionSourcesChanged(const winrt::ScrollPresenter &sender, const winrt::Microsoft::UI::Composition::Interactions::CompositionInteractionSourceCollection &interactionSources) | ScrollPresenterTestHooks | [static]
s_testHooks | ScrollPresenterTestHooks | [private, static]
ScrollPresenterTestHooks() | ScrollPresenterTestHooks |
SetContentLayoutOffsetX(const winrt::ScrollPresenter &scrollPresenter, float contentLayoutOffsetX) | ScrollPresenterTestHooks | [static]
SetContentLayoutOffsetY(const winrt::ScrollPresenter &scrollPresenter, float contentLayoutOffsetY) | ScrollPresenterTestHooks | [static]
SetMaxPosition(const winrt::ScrollPresenter &scrollPresenter, winrt::float2 maxPosition) | ScrollPresenterTestHooks | [static]
SetMaxPositionExpressionAnimationExpression(const winrt::ScrollPresenter &scrollPresenter, winrt::hstring const &maxPositionExpressionAnimationExpression) | ScrollPresenterTestHooks | [static]
SetMinPosition(const winrt::ScrollPresenter &scrollPresenter, winrt::float2 minPosition) | ScrollPresenterTestHooks | [static]
SetMinPositionExpressionAnimationExpression(const winrt::ScrollPresenter &scrollPresenter, winrt::hstring const &minPositionExpressionAnimationExpression) | ScrollPresenterTestHooks | [static]
SetOffsetsChangeVelocityParameters(int millisecondsPerUnit, int minMilliseconds, int maxMilliseconds) | ScrollPresenterTestHooks | [static]
SetSnapPointVisualizationColor(const winrt::SnapPointBase &snapPoint, const winrt::Color &color) | ScrollPresenterTestHooks | [static]
SetTransformExpressionAnimationExpression(const winrt::ScrollPresenter &scrollPresenter, winrt::hstring const &transformExpressionAnimationExpression) | ScrollPresenterTestHooks | [static]
SetZoomFactorChangeVelocityParameters(int millisecondsPerUnit, int minMilliseconds, int maxMilliseconds) | ScrollPresenterTestHooks | [static]
TestHooksViewChangeResult(ScrollPresenterViewChangeResult result) | ScrollPresenterTestHooks | [private, static]
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemPresenter.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemPresenter.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewItemPresenterTemplateSettings.h"
00007 #include "NavigationViewItemPresenter.g.h"
00008 #include "NavigationViewHelper.h"
00009 #include "NavigationViewItemPresenter.properties.h"
00010
00011 class NavigationViewItem;
00012
00013 class NavigationViewItemPresenter:
00014     public ReferenceTracker<NavigationViewItemPresenter, winrt::implementation::NavigationViewItemPresenterT>,
00015     public NavigationViewItemPresenterProperties
00016 {
00017 public:
00018     NavigationViewItemPresenter();
00019
00020     // IFrameworkElementOverrides
00021     void OnApplyTemplate();
00022
00023     // IFrameworkElementOverrides
00024     bool GoToElementStateCore(winrt::hstring const& stateName, bool useTransitions);
00025
00026     winrt::UIElement GetSelectionIndicator();
00027
00028     void UpdateContentLeftIndentation(double leftIndentation);
00029
00030     void RotateExpandCollapseChevron(bool isExpanded);
00031
00032     void UpdateCompactPaneLength(double compactPaneLength,bool shouldUpdate);
00033
00034     void UpdateClosedCompactVisualState(bool isTopLevelItem, bool isClosedCompact);
00035
00036     void LoadChevron();
00037
00038 private:
00039     NavigationViewItem * GetNavigationViewItem();
00040     void UpdateMargin();
00041     void UnhookEventsAndClearFields();
00042     void ResetTrackedPointerId();
00043     bool IgnorePointerId(const winrt::PointerRoutedEventArgs& args);
00044
00045     void OnExpandCollapseChevronPointerPressed(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00046     void OnExpandCollapseChevronPointerReleased(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00047     void OnExpandCollapseChevronPointerExited(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00048     void OnExpandCollapseChevronPointerCanceled(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00049     void OnExpandCollapseChevronPointerCaptureLost(const winrt::IInspectable& sender, const winrt::PointerRoutedEventArgs& args);
00050
00051     bool m_isChevronPressed{ false };
00052     double m_compactPaneLengthValue { 40 };
00053     double m_leftIndentation{ 0 };
00054     uint32_t m_trackedPointerId{ 0 };
00055
00056     NavigationViewItemHelper<NavigationViewItemPresenter> m_helper{ this };
00057     tracker_ref<winrt::Grid> m_contentGrid{ this };
00058     tracker_ref<winrt::ContentPresenter> m_infoBadgePresenter{ this };
00059     tracker_ref<winrt::Grid> m_expandCollapseChevron{ this };
00060
00061     winrt::UIElement::PointerPressed_revoker m_expandCollapseChevronPointerPressedRevoker{};
00062     winrt::UIElement::PointerReleased_revoker m_expandCollapseChevronPointerReleasedRevoker{};
00063     RoutedEventHandler_revoker m_expandCollapseChevronPointerExitedRevoker{};
00064     RoutedEventHandler_revoker m_expandCollapseChevronPointerCanceledRevoker{};
00065     RoutedEventHandler_revoker m_expandCollapseChevronPointerCaptureLostRevoker{};
00066
00067     tracker_ref<winrt::Storyboard> m_chevronExpandedStoryboard{ this };
00068     tracker_ref<winrt::Storyboard> m_chevronCollapsedStoryboard{ this };
00069 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PictureLibrary Member List

This is the complete list of members for PictureLibrary, including all inherited members.
CreateLarge() | PictureLibrary | [inline, static]
CreateSmall() | PictureLibrary | [inline, static]
PictureLibrary() | PictureLibrary | [inline]
s_LargeLibrary | PictureLibrary | [private, static]
s_SmallLibrary | PictureLibrary | [private, static]
Title | PictureLibrary |
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/APITests/ScrollViewerAdapterTests.cs Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter
  • APITests

ScrollViewerAdapterTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using MUXControlsTestApp.Utilities;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009 using Microsoft.UI.Private.Controls;
00010 using Windows.Foundation;
00011 using System.Threading;
00012 using Common;
00013
00014 using WEX.TestExecution;
00015 using WEX.TestExecution.Markup;
00016 using WEX.Logging.Interop;
00017
00018 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00019 {
00020     [TestClass]
00021     public class ScrollViewerAdapterTests : ApiTestBase
00022     {
00023         [TestMethod]
00024         public void CanInstantiate()
00025         {
00026             RunOnUIThread.Execute(() =>
00027             {
00028                 ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
00029             });
00030         }
00031
00032         [TestMethod]
00033         public void AdaptOnNullThrows()
00034         {
00035             RunOnUIThread.Execute(() =>
00036             {
00037                 ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
00038                 Verify.IsNotNull(adapter);
00039                 Verify.Throws<ArgumentException>(() => { adapter.Adapt(null, new Size(1.0, 1.0)); });
00040             });
00041         }
00042
00043         [TestMethod]
00044         public void AdaptOnSVWithNonUIElementContentThrows()
00045         {
00046             RunOnUIThread.Execute(() =>
00047             {
00048                 ScrollViewer sv = new ScrollViewer();
00049                 sv.Content = 1;
00050                 Content = sv;
00051                 Content.UpdateLayout();
00052                 ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
00053                 Verify.IsNotNull(adapter);
00054                 Verify.Throws<ArgumentException>(() => { adapter.Adapt(sv, new Size(1.0, 1.0)); });
00055             });
00056         }
00057
00058         [TestMethod]
00059         public void AdaptOnSVWithoutContentThrows()
00060         {
00061             var resetEvent = new AutoResetEvent(false);
00062             RunOnUIThread.Execute(() =>
00063             {
00064                 ScrollViewer sv = new ScrollViewer();
00065                 sv.Loaded += (object sender, RoutedEventArgs e) => { resetEvent.Set(); };
00066                 Content = sv;
00067                 Content.UpdateLayout();
00068                 Verify.IsNull(sv.Content);
00069                 ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
00070                 Verify.IsNotNull(adapter);
00071                 Verify.Throws<ArgumentException>(() => { adapter.Adapt(sv, new Size(1.0, 1.0)); });
00072             });
00073         }
00074
00075         [TestMethod]
00076         public void AdaptOnSV()
00077         {
00078             var resetEvent = new AutoResetEvent(false);
00079             RunOnUIThread.Execute(() =>
00080             {
00081                 ScrollViewer sv = new ScrollViewer();
00082                 sv.Content = new Button();
00083                 sv.Loaded += (object sender, RoutedEventArgs e) => { resetEvent.Set(); };
00084
00085                 Content = sv;
00086                 Content.UpdateLayout();
00087                 ScrollViewerIRefreshInfoProviderAdapter adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
00088                 adapter.Adapt(sv, new Size(1.0, 1.0));
00089             });
00090         }
00091
00092         [TestMethod]
00093         public void AdaptOnSVWithoutWaitingForLoaded()
00094         {
00095             var objects = new Dictionary<string, WeakReference>();
00096             RunOnUIThread.Execute(() =>
00097             {
00098                 ScrollViewer sv = new ScrollViewer();
00099                 objects["sv"] = new WeakReference(sv);
00100                 sv.Content = new Button();
00101                 var adapter = new ScrollViewerIRefreshInfoProviderAdapter(RefreshPullDirection.TopToBottom, null);
00102                 objects["adapter"] = new WeakReference(adapter);
00103                 adapter.Adapt(sv, new Size(1.0, 1.0));
00104                 Content = sv;
00105                 Content.UpdateLayout();
00106
00107                 adapter = null;
00108                 Content = null;
00109             });
00110
00111             IdleSynchronizer.Wait();
00112             GC.Collect();
00113             GC.WaitForPendingFinalizers();
00114             GC.Collect();
00115
00116             RunOnUIThread.Execute(() => CheckLeaks(objects));
00117         }
00118
00119         void CheckLeaks(Dictionary<string, WeakReference> objects)
00120         {
00121             foreach (var pair in objects)
00122             {
00123                 Log.Comment("Checking if object {0} has been collected", pair.Key);
00124                 object target = pair.Value.Target;
00125                 if (target != null)
00126                 {
00127                     Verify.DisableVerifyFailureExceptions = true; // throwing exceptions makes running this in TDP harder
00128                     Verify.Fail(String.Format("Object {0} is still alive when it should not be.", target));
00129                     Verify.DisableVerifyFailureExceptions = false;
00130                 }
00131             }
00132             objects.Clear();
00133         }
00134     }
00135
00136 }
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/SelectionSample/Common/SelectionContainerAutomationPeer.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • SelectionSample
  • Common

SelectionContainerAutomationPeer.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Automation.Peers;
00008 using Microsoft.UI.Xaml.Automation.Provider;
00009
00010 namespace MUXControlsTestApp.Samples.Selection
00011 {
00012     public class SelectionContainerAutomationPeer : FrameworkElementAutomationPeer, ISelectionProvider
00013     {
00014         private SelectionContainer _owner;
00015
00016         public SelectionContainerAutomationPeer(FrameworkElement owner) :
00017             base(owner)
00018         {
00019             _owner = (SelectionContainer)owner;
00020         }
00021
00022         protected override object GetPatternCore(PatternInterface patternInterface)
00023         {
00024             if (patternInterface == PatternInterface.Selection)
00025             {
00026                 return this;
00027             }
00028
00029             return base.GetPatternCore(patternInterface);
00030         }
00031
00032         public IRawElementProviderSimple[] GetSelection()
00033         {
00034             List<IRawElementProviderSimple> selected = new List<IRawElementProviderSimple>();
00035             // TODO: Need to get peers here or work with accesibility team to figure
00036             // out what to give here. The selected elements might not be realized.
00037             return selected.ToArray();
00038         }
00039
00040         public bool CanSelectMultiple
00041         {
00042             get
00043             {
00044                 return !_owner.SelectionModel.SingleSelect;
00045             }
00046         }
00047
00048         public bool IsSelectionRequired
00049         {
00050             get
00051             {
00052                 return false;
00053             }
00054         }
00055
00056         internal void SelectionChanged(SelectionModelSelectionChangedEventArgs args)
00057         {
00058             RaiseAutomationEvent(AutomationEvents.SelectionPatternOnInvalidated);
00059         }
00060     }
00061 }
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealFallbackPage Member List

This is the complete list of members for RevealFallbackPage, including all inherited members.
_resourceButtonRevealBackgroundBrush | RevealFallbackPage | [private]
_resourceButtonRevealBackgroundPointerOver | RevealFallbackPage | [private]
_resourceButtonRevealBackgroundPressed | RevealFallbackPage | [private]
_resourceButtonRevealBorderBrush | RevealFallbackPage | [private]
_resourceButtonRevealBorderBrushPointerOver | RevealFallbackPage | [private]
_resourceButtonRevealBorderBrushPressed | RevealFallbackPage | [private]
_revealBrushTestApi | RevealFallbackPage | [private]
_revealTestApi | RevealFallbackPage | [private]
AlwaysUseFallbackButton_Checked(object sender, RoutedEventArgs e) | RevealFallbackPage | [inline, private]
AlwaysUseFallbackButton_Unchecked(object sender, RoutedEventArgs e) | RevealFallbackPage | [inline, private]
AlwaysUseFallbackHelper(bool value) | RevealFallbackPage | [inline, private]
RevealFallbackPage() | RevealFallbackPage | [inline]
RunRevealAlwaysUseFallback() | RevealFallbackPage | [inline, private]
RunTestButton_Clicked(object sender, RoutedEventArgs e) | RevealFallbackPage | [inline, private]
VerifyAmbientLight(RevealBrush testBrush, bool value) | RevealFallbackPage | [inline, private]
VerifyBorderLight(RevealBrush testBrush, bool value) | RevealFallbackPage | [inline, private]
VerifyFallbackColor(RevealBrush testBrush, Color fallbackColor) | RevealFallbackPage | [inline, private]
VerifyHoverLight(RevealBrush testBrush, bool value) | RevealFallbackPage | [inline, private]
VerifyRevealBrush(RevealBrush testBrush) | RevealFallbackPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ParallaxViewStackPanelPage Member List

This is the complete list of members for ParallaxViewStackPanelPage, including all inherited members.
ParallaxViewStackPanelPage() ParallaxViewStackPanelPage [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomToolButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarCustomToolButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarCustomToolButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarCustomToolButton)
00012 }
00013
00014 #include "InkToolBarCustomToolButton.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarCustomToolButtonProperties::s_ConfigurationContentProperty{ nullptr };
00017
00018 InkToolBarCustomToolButtonProperties::InkToolBarCustomToolButtonProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void InkToolBarCustomToolButtonProperties::EnsureProperties()
00024 {
00025     InkToolBarToolButton::EnsureProperties();
00026     if (!s_ConfigurationContentProperty)
00027     {
00028         s_ConfigurationContentProperty =
00029             InitializeDependencyProperty(
00030                 L"ConfigurationContent",
00031                 winrt::name_of<winrt::UIElement>(),
00032                 winrt::name_of<winrt::InkToolBarCustomToolButton>(),
00033                 false /* isAttached */,
00034                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00035                 nullptr);
00036     }
00037 }
00038
00039 void InkToolBarCustomToolButtonProperties::ClearProperties()
00040 {
00041     s_ConfigurationContentProperty = nullptr;
00042     InkToolBarToolButton::ClearProperties();
00043 }
00044
00045 void InkToolBarCustomToolButtonProperties::ConfigurationContent(winrt::UIElement const& value)
00046 {
00047     [[gsl::suppress(con)]]
00048     {
00049     static_cast<InkToolBarCustomToolButton*>(this)->SetValue(s_ConfigurationContentProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00050     }
00051 }
00052
00053 winrt::UIElement InkToolBarCustomToolButtonProperties::ConfigurationContent()
00054 {
00055     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<InkToolBarCustomToolButton*>(this)->GetValue(s_ConfigurationContentProperty));
00056 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerProperties Member List

This is the complete list of members for PipsPagerProperties, including all inherited members.
ClearProperties() | PipsPagerProperties | [static]
EnsureProperties() | PipsPagerProperties | [static]
m_selectedIndexChangedEventSource | PipsPagerProperties |
MaxVisiblePips(int value) | PipsPagerProperties |
MaxVisiblePips() | PipsPagerProperties |
MaxVisiblePipsProperty() | PipsPagerProperties | [inline, static]
NextButtonStyle(winrt::Style const &value) | PipsPagerProperties |
NextButtonStyle() | PipsPagerProperties |
NextButtonStyleProperty() | PipsPagerProperties | [inline, static]
NextButtonVisibility(winrt::PipsPagerButtonVisibility const &value) | PipsPagerProperties |
NextButtonVisibility() | PipsPagerProperties |
NextButtonVisibilityProperty() | PipsPagerProperties | [inline, static]
NormalPipStyle(winrt::Style const &value) | PipsPagerProperties |
NormalPipStyle() | PipsPagerProperties |
NormalPipStyleProperty() | PipsPagerProperties | [inline, static]
NumberOfPages(int value) | PipsPagerProperties |
NumberOfPages() | PipsPagerProperties |
NumberOfPagesProperty() | PipsPagerProperties | [inline, static]
OnMaxVisiblePipsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNextButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNextButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNormalPipStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnNumberOfPagesPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnOrientationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnPreviousButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnPreviousButtonVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnSelectedPageIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnSelectedPipStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
OnWrapModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | PipsPagerProperties | [static]
Orientation(winrt::Orientation const &value) | PipsPagerProperties |
Orientation() | PipsPagerProperties |
OrientationProperty() | PipsPagerProperties | [inline, static]
PipsPagerProperties() | PipsPagerProperties |
PreviousButtonStyle(winrt::Style const &value) | PipsPagerProperties |
PreviousButtonStyle() | PipsPagerProperties |
PreviousButtonStyleProperty() | PipsPagerProperties | [inline, static]
PreviousButtonVisibility(winrt::PipsPagerButtonVisibility const &value) | PipsPagerProperties |
PreviousButtonVisibility() | PipsPagerProperties |
PreviousButtonVisibilityProperty() | PipsPagerProperties | [inline, static]
s_MaxVisiblePipsProperty | PipsPagerProperties | [static]
s_NextButtonStyleProperty | PipsPagerProperties | [static]
s_NextButtonVisibilityProperty | PipsPagerProperties | [static]
s_NormalPipStyleProperty | PipsPagerProperties | [static]
s_NumberOfPagesProperty | PipsPagerProperties | [static]
s_OrientationProperty | PipsPagerProperties | [static]
s_PreviousButtonStyleProperty | PipsPagerProperties | [static]
s_PreviousButtonVisibilityProperty | PipsPagerProperties | [static]
s_SelectedPageIndexProperty | PipsPagerProperties | [static]
s_SelectedPipStyleProperty | PipsPagerProperties | [static]
s_TemplateSettingsProperty | PipsPagerProperties | [static]
s_WrapModeProperty | PipsPagerProperties | [static]
SelectedIndexChanged(winrt::TypedEventHandler< winrt::PipsPager, winrt::PipsPagerSelectedIndexChangedEventArgs > const &value) | PipsPagerProperties |
SelectedIndexChanged(winrt::event_token const &token) | PipsPagerProperties |
SelectedPageIndex(int value) | PipsPagerProperties |
SelectedPageIndex() | PipsPagerProperties |
SelectedPageIndexProperty() | PipsPagerProperties | [inline, static]
SelectedPipStyle(winrt::Style const &value) | PipsPagerProperties |
SelectedPipStyle() | PipsPagerProperties |
SelectedPipStyleProperty() | PipsPagerProperties | [inline, static]
TemplateSettings(winrt::PipsPagerTemplateSettings const &value) | PipsPagerProperties |
TemplateSettings() | PipsPagerProperties |
TemplateSettingsProperty() | PipsPagerProperties | [inline, static]
WrapMode(winrt::PipsPagerWrapMode const &value) | PipsPagerProperties |
WrapMode() | PipsPagerProperties |
WrapModeProperty() | PipsPagerProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IRefreshInfoProvider Member List

This is the complete list of members for IRefreshInfoProvider, including all inherited members.
InteractionRatioChanged | IRefreshInfoProvider
IsInteractingForRefreshChanged | IRefreshInfoProvider
OnRefreshCompleted() | IRefreshInfoProvider
OnRefreshStarted() | IRefreshInfoProvider
RefreshCompleted | IRefreshInfoProvider
RefreshStarted | IRefreshInfoProvider
Generated on Sun Dec 1 2024 20:53:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/NestedListViewsPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

NestedListViewsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Input;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     public sealed partial class NestedListViewsPage : TestPage
00011     {
00012         private ListView _outerListView = null;
00013
00014         public NestedListViewsPage()
00015         {
00016             this.InitializeComponent();
00017
00018             Loaded += NestedListViewsPage_Loaded;
00019         }
00020
00021         private void UpdateOuterListView()
00022         {
00023             if (cmbUseOuterListView != null)
00024             {
00025                 if (_outerListView != null)
00026                 {
00027                     _outerListView.Visibility = Visibility.Collapsed;
00028                 }
00029
00030                 switch (cmbUseOuterListView.SelectedIndex)
00031                 {
00032                     case 0:
00033                     {
00034                         _outerListView = outerListView1;
00035                         break;
00036                     }
00037                     case 1:
00038                     {
00039                         _outerListView = outerListView2;
00040                         break;
00041                     }
00042                     case 2:
00043                     {
00044                         _outerListView = outerListView3;
00045                         break;
00046                     }
00047                     case 3:
00048                     {
00049                         _outerListView = outerListView4;
00050                         break;
00051                     }
00052                 }
00053
00054                 if (_outerListView != null)
00055                 {
00056                     _outerListView.Visibility = Visibility.Visible;
00057
00058                     ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged(null, null);
00059                     CmbOuterListViewSelectionMode_SelectionChanged(null, null);
00060                     CmbOuterListViewTabNavigation_SelectionChanged(null, null);
00061                     CmbOuterListViewHeader_SelectionChanged(null, null);
00062                     CmbOuterListViewFooter_SelectionChanged(null, null);
00063                 }
00064             }
00065         }
00066
00067         private void NestedListViewsPage_Loaded(object sender, RoutedEventArgs e)
00068         {
00069             UpdateOuterListView();
00070         }
00071
00072         private void CmbUseOuterListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
00073         {
00074             UpdateOuterListView();
00075         }
00076
00077         private void ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged(object sender, RoutedEventArgs e)
00078         {
00079             if (_outerListView != null && chkOuterListViewSingleSelectionFollowsFocus != null)
00080             {
00081                 _outerListView.SingleSelectionFollowsFocus = (bool)chkOuterListViewSingleSelectionFollowsFocus.IsChecked;
00082             }
00083         }
00084
00085         private void CmbOuterListViewSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
00086         {
00087             if (_outerListView != null && cmbOuterListViewSelectionMode != null)
00088             {
00089                 _outerListView.SelectionMode = (ListViewSelectionMode)cmbOuterListViewSelectionMode.SelectedIndex;
00090             }
00091         }
00092
00093         private void CmbOuterListViewTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00094         {
00095             if (_outerListView != null && cmbOuterListViewTabNavigation != null)
00096             {
00097                 _outerListView.TabNavigation = (KeyboardNavigationMode)cmbOuterListViewTabNavigation.SelectedIndex;
00098             }
00099         }
00100
00101         private void CmbOuterListViewHeader_SelectionChanged(object sender, SelectionChangedEventArgs e)
00102         {
00103             if (_outerListView != null && cmbOuterListViewHeader != null)
00104             {
00105                 switch (cmbOuterListViewHeader.SelectedIndex)
00106                 {
00107                     case 0: /*None*/
00108                         _outerListView.Header = null;
00109                         break;
00110                     case 1: /*Non-focusable*/
00111                         _outerListView.Header = new TextBlock()
00112                         {
00113                             FontSize = 18.0,
00114                             Margin = new Thickness(10.0),
00115                             Text = "Header"
00116                         };
00117                         break;
00118                     case 2: /*Focusable*/
00119                         _outerListView.Header = new Button()
00120                         {
00121                             Content = "Header",
00122                             FontSize = 18.0,
00123                             Margin = new Thickness(10.0)
00124                         };
00125                         break;
00126                 }
00127             }
00128         }
00129
00130         private void CmbOuterListViewFooter_SelectionChanged(object sender, SelectionChangedEventArgs e)
00131         {
00132             if (_outerListView != null && cmbOuterListViewFooter != null)
00133             {
00134                 switch (cmbOuterListViewFooter.SelectedIndex)
00135                 {
00136                     case 0: /*None*/
00137                         _outerListView.Footer = null;
00138                         break;
00139                     case 1: /*Non-focusable*/
00140                         _outerListView.Footer = new TextBlock()
00141                         {
00142                             FontSize = 18.0,
00143                             Margin = new Thickness(10.0),
00144                             Text = "Footer"
00145                         };
00146                         break;
00147                     case 2: /*Focusable*/
00148                         _outerListView.Footer = new Button()
00149                         {
00150                             Content = "Footer",
00151                             FontSize = 18.0,
00152                             Margin = new Thickness(10.0)
00153                         };
00154                         break;
00155                 }
00156             }
00157         }
00158     }
00159 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PointerInfo< T > Member List

This is the complete list of members for PointerInfo< T >, including all inherited members.
IsMouseButtonPressed(bool isForLeftMouseButton) const | PointerInfo< T > | [inline]
IsMousePointerOver() const | PointerInfo< T > | [inline]
IsPenPointerOver() const | PointerInfo< T > | [inline]
IsPointerIdTracked(uint32_t pointerId) const | PointerInfo< T > | [inline]
IsPointerOver() const | PointerInfo< T > | [inline]
IsPressed() const | PointerInfo< T > | [inline]
IsTouchPointerOver() const | PointerInfo< T > | [inline]
IsTrackingPointer() const | PointerInfo< T > | [inline]
PointerInfo() | PointerInfo< T > | [inline]
ResetAll() | PointerInfo< T > | [inline]
ResetIsMouseButtonPressed(bool isForLeftMouseButton) | PointerInfo< T > | [inline]
ResetIsMousePointerOver() | PointerInfo< T > | [inline]
ResetIsPenPointerOver() | PointerInfo< T > | [inline]
ResetIsTouchPointerOver() | PointerInfo< T > | [inline]
ResetPointerPressed() | PointerInfo< T > | [inline]
ResetTrackedPointerId() | PointerInfo< T > | [inline]
SetIsMouseButtonPressed(bool isForLeftMouseButton) | PointerInfo< T > | [inline]
SetIsMousePointerOver() | PointerInfo< T > | [inline]
SetIsPenPointerOver() | PointerInfo< T > | [inline]
SetIsTouchPointerOver() | PointerInfo< T > | [inline]
SetPointerPressed() | PointerInfo< T > | [inline]
TrackPointerId(uint32_t pointerId) | PointerInfo< T > | [inline]
~PointerInfo() | PointerInfo< T > | [inline]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VectorIterator< T, isBindable, isDependencyObjectBase, Traits > Member List

This is the complete list of members for VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, including all inherited members.
abi_enter() | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
CheckThread() | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
Current() | VectorIterator< T, isBindable, isDependencyObjectBase, Traits > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< VectorIterator< T, isBindable, isDependencyObjectBase, Traits > > &&self) noexcept | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
final_release(std::unique_ptr< VectorIterator< T, isBindable, isDependencyObjectBase, Traits > > &&self) | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline, static]
GetBase() | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
GetInner() | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
GetMany(winrt::array_view< T > values) | VectorIterator< T, isBindable, isDependencyObjectBase, Traits > | [inline]
HasCurrent() | VectorIterator< T, isBindable, isDependencyObjectBase, Traits > | [inline]
IsOnThread() | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
MoveNext() | VectorIterator< T, isBindable, isDependencyObjectBase, Traits > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< VectorIterator< T, isBindable, isDependencyObjectBase, Traits >, reference_tracker_implements_t< Traits::IteratorType >::type > | [inline]
VectorIterator(typename Traits::VectorType const &vector) | VectorIterator< T, isBindable, isDependencyObjectBase, Traits > | [inline]
Generated on Sun Dec 1 2024 20:53:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBarPanningInfo.h Source File

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBarPanningInfo.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class AnnotatedScrollBarPanningInfo
00007     : public ReferenceTracker<
00008         AnnotatedScrollBarPanningInfo,
00009         reference_tracker_implements_t<winrt::IScrollControllerPanningInfo>::type>
00010 {
00011 public:
00012     AnnotatedScrollBarPanningInfo();
00013     ~AnnotatedScrollBarPanningInfo();
00014
00015 #pragma region IScrollControllerPanningInfo
00016     bool IsRailEnabled();
00017     winrt::Orientation PanOrientation();
00018     winrt::UIElement PanningElementAncestor();
00019
00020     void SetPanningElementExpressionAnimationSources(
00021         const winrt::CompositionPropertySet& propertySet,
00022         const winrt::hstring& minOffsetPropertyName,
00023         const winrt::hstring& maxOffsetPropertyName,
00024         const winrt::hstring& offsetPropertyName,
00025         const winrt::hstring& multiplierPropertyName);
00026
00027     winrt::event_token Changed(const winrt::TypedEventHandler<winrt::IScrollControllerPanningInfo, winrt::IInspectable>& handler);
00028     void Changed(const winrt::event_token& token);
00029
00030     winrt::event_token PanRequested(const winrt::TypedEventHandler<winrt::IScrollControllerPanningInfo, winrt::ScrollControllerPanRequestedEventArgs>& handler);
00031     void PanRequested(const winrt::event_token& token);
00032 #pragma endregion
00033
00034     void PanningFrameworkElement(const winrt::FrameworkElement& value);
00035     void PanningElementAncestor(const winrt::UIElement& value);
00036     void PanningElementOffsetMultiplier(float value);
00037     bool RaisePanRequested(const winrt::PointerPoint& pointerPoint);
00038
00039 private:
00040     void RaiseChanged();
00041
00042     void EnsureThumbAnimation();
00043     void StartThumbAnimation();
00044     void StopThumbAnimation();
00045     void UpdateThumbExpression();
00046
00047     void UpdatePanningElementOffsetMultiplier();
00048
00049     tracker_ref<winrt::Visual> m_panningVisual{ this };
00050     tracker_ref<winrt::FrameworkElement> m_panningFrameworkElement{ this };
00051     tracker_ref<winrt::UIElement> m_panningElementAncestor{ this };
00052     winrt::CompositionPropertySet m_expressionAnimationSources{ nullptr };
00053     winrt::ExpressionAnimation m_thumbOffsetAnimation{ nullptr };
00054     winrt::hstring m_minOffsetPropertyName{ L"" };
00055     winrt::hstring m_maxOffsetPropertyName{ L"" };
00056     winrt::hstring m_offsetPropertyName{ L"" };
00057     winrt::hstring m_multiplierPropertyName{ L"" };
00058     float m_panningElementOffsetMultiplier{ 1.0f };
00059
00060     event_source<winrt::TypedEventHandler<winrt::IScrollControllerPanningInfo, winrt::IInspectable>> m_changedEventSource{ this };
00061     event_source<winrt::TypedEventHandler<winrt::IScrollControllerPanningInfo, winrt::ScrollControllerPanRequestedEventArgs>> m_panRequestedEventSource{ this };
00062 };
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarTrace.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 // REVIEW:  Not sure how to shoehorn in the Error and warning trace info used by inking.  The controls stuff
00012 //          seems to only deal with INFO and VERBOSE.
00013 #define INKTOOLBAR_TRACE_ERROR INKTOOLBAR_TRACE_INFO
00014 #define INKTOOLBAR_TRACE_WARNING INKTOOLBAR_TRACE_INFO
00015
00016 inline bool IsInkToolBarTracingEnabled()
00017 {
00018     return g_IsLoggingProviderEnabled &&
00019         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00020         (g_LoggingProviderMatchAnyKeyword & KEYWORD_INKTOOLBAR || g_LoggingProviderMatchAnyKeyword == 0);
00021 }
00022
00023 inline bool IsInkToolBarVerboseTracingEnabled()
00024 {
00025     return g_IsLoggingProviderEnabled &&
00026         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00027         (g_LoggingProviderMatchAnyKeyword & KEYWORD_INKTOOLBAR || g_LoggingProviderMatchAnyKeyword == 0);
00028 }
00029
00030 #define INKTOOLBAR_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00031 InkToolBarTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00032
00033 #define INKTOOLBAR_TRACE_INFO(sender, message, ...) \
00034 if (IsInkToolBarTracingEnabled()) \
00035 { \
00036     INKTOOLBAR_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00037 } \
00038 else if (InkToolBarTrace::s_IsDebugOutputEnabled || InkToolBarTrace::s_IsVerboseDebugOutputEnabled) \
00039 { \
00040     INKTOOLBAR_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00041 } \
00042
00043 #define INKTOOLBAR_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00044 InkToolBarTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00045
00046 #define INKTOOLBAR_TRACE_VERBOSE(sender, message, ...) \
00047 if (IsInkToolBarVerboseTracingEnabled()) \
00048 { \
00049     INKTOOLBAR_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00050 } \
00051 else if (InkToolBarTrace::s_IsVerboseDebugOutputEnabled) \
00052 { \
00053     INKTOOLBAR_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00054 } \
00055
00056 #define INKTOOLBAR_TRACE_PERF(info) \
00057 if (IsInkToolBarPerfTracingEnabled()) \
00058 { \
00059     InkToolBarTrace::TracePerfInfo(info); \
00060 } \
00061
00062 #ifdef DBG
00063 #define INKTOOLBAR_TRACE_INFO_DBG(sender, message, ...)    INKTOOLBAR_TRACE_INFO(sender, message, __VA_ARGS__)
00064 #define INKTOOLBAR_TRACE_VERBOSE_DBG(sender, message, ...) INKTOOLBAR_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00065 #define INKTOOLBAR_TRACE_PERF_DBG(info)                    INKTOOLBAR_TRACE_PERF(info)
00066 #else
00067 #define INKTOOLBAR_TRACE_INFO_DBG(sender, message, ...)
00068 #define INKTOOLBAR_TRACE_VERBOSE_DBG(sender, message, ...)
00069 #define INKTOOLBAR_TRACE_PERF_DBG(info)
00070 #endif // DBG
00071
00072 class InkToolBarTrace
00073 {
00074 public:
00075     static bool s_IsDebugOutputEnabled;
00076     static bool s_IsVerboseDebugOutputEnabled;
00077
00078     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00079     {
00080         va_list args;
00081         va_start(args, message);
00082         WCHAR buffer[384]{};
00083         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00084         {
00085             if (includeTraceLogging)
00086             {
00087                 TraceLoggingWrite(
00088                     g_hLoggingProvider,
00089                     "InkToolBarInfo" /* eventName */,
00090                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00091                     TraceLoggingKeyword(KEYWORD_INKTOOLBAR),
00092                     TraceLoggingWideString(buffer, "Message"));
00093             }
00094
00095             if (s_IsDebugOutputEnabled)
00096             {
00097                 OutputDebugStringW(buffer);
00098             }
00099
00100             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00101
00102             if (globalTestHooks &&
00103                 (globalTestHooks->GetLoggingLevelForType(L"InkToolBar") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00104             {
00105                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00106             }
00107         }
00108         va_end(args);
00109     }
00110
00111     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00112     {
00113         va_list args;
00114         va_start(args, message);
00115         WCHAR buffer[384]{};
00116         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00117         {
00118             if (includeTraceLogging)
00119             {
00120                 TraceLoggingWrite(
00121                     g_hLoggingProvider,
00122                     "InkToolBarVerbose" /* eventName */,
00123                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00124                     TraceLoggingKeyword(KEYWORD_INKTOOLBAR),
00125                     TraceLoggingWideString(buffer, "Message"));
00126             }
00127
00128             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00129             {
00130                 OutputDebugStringW(buffer);
00131             }
00132
00133             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00134
00135             if (globalTestHooks &&
00136                 (globalTestHooks->GetLoggingLevelForType(L"InkToolBar") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00137             {
00138                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00139             }
00140         }
00141         va_end(args);
00142     }
00143 };
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LayoutPanel.properties.h Source File

  • File List
  • File Members
  • Generated

LayoutPanel.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class LayoutPanelProperties
00008 {
00009 public:
00010     LayoutPanelProperties();
00011
00012     void BorderBrush(winrt::Brush const& value);
00013     winrt::Brush BorderBrush();
00014
00015     void BorderThickness(winrt::Thickness const& value);
00016     winrt::Thickness BorderThickness();
00017
00018     void CornerRadius(winrt::CornerRadius const& value);
00019     winrt::CornerRadius CornerRadius();
00020
00021     void Layout(winrt::Layout const& value);
00022     winrt::Layout Layout();
00023
00024     void Padding(winrt::Thickness const& value);
00025     winrt::Thickness Padding();
00026
00027     static winrt::DependencyProperty BorderBrushProperty() { return s_BorderBrushProperty; }
00028     static winrt::DependencyProperty BorderThicknessProperty() { return s_BorderThicknessProperty; }
00029     static winrt::DependencyProperty CornerRadiusProperty() { return s_CornerRadiusProperty; }
00030     static winrt::DependencyProperty LayoutProperty() { return s_LayoutProperty; }
00031     static winrt::DependencyProperty PaddingProperty() { return s_PaddingProperty; }
00032
00033     static GlobalDependencyProperty s_BorderBrushProperty;
00034     static GlobalDependencyProperty s_BorderThicknessProperty;
00035     static GlobalDependencyProperty s_CornerRadiusProperty;
00036     static GlobalDependencyProperty s_LayoutProperty;
00037     static GlobalDependencyProperty s_PaddingProperty;
00038
00039     static void EnsureProperties();
00040     static void ClearProperties();
00041
00042     static void OnBorderBrushPropertyChanged(
00043         winrt::DependencyObject const& sender,
00044         winrt::DependencyPropertyChangedEventArgs const& args);
00045
00046     static void OnBorderThicknessPropertyChanged(
00047         winrt::DependencyObject const& sender,
00048         winrt::DependencyPropertyChangedEventArgs const& args);
00049
00050     static void OnCornerRadiusPropertyChanged(
00051         winrt::DependencyObject const& sender,
00052         winrt::DependencyPropertyChangedEventArgs const& args);
00053
00054     static void OnLayoutPropertyChanged(
00055         winrt::DependencyObject const& sender,
00056         winrt::DependencyPropertyChangedEventArgs const& args);
00057
00058     static void OnPaddingPropertyChanged(
00059         winrt::DependencyObject const& sender,
00060         winrt::DependencyPropertyChangedEventArgs const& args);
00061 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedVisualPlayer/AnimatedVisualPlayerAutomationPeer.cpp Source File

  • File List
  • File Members
  • AnimatedVisualPlayer

AnimatedVisualPlayerAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿#include "pch.h"
00002 #include "common.h"
00003 #include "AnimatedVisualPlayerAutomationPeer.h"
00004 #include "AnimatedVisualPlayer.h"
00005
00006 #include "AnimatedVisualPlayerAutomationPeer.properties.cpp"
00007
00008 AnimatedVisualPlayerAutomationPeer::AnimatedVisualPlayerAutomationPeer(winrt::AnimatedVisualPlayer const& owner)
00009     : ReferenceTracker(owner)
00010 {
00011 }
00012
00013 hstring AnimatedVisualPlayerAutomationPeer::GetClassNameCore()
00014 {
00015     return winrt::hstring_name_of<winrt::AnimatedVisualPlayer>();
00016 }
00017
00018 winrt::AutomationControlType AnimatedVisualPlayerAutomationPeer::GetAutomationControlTypeCore()
00019 {
00020     return winrt::AutomationControlType::Image;
00021 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RefreshContainer.properties.h Source File

  • File List
  • File Members
  • Generated

RefreshContainer.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class RefreshContainerProperties
00008 {
00009 public:
00010     RefreshContainerProperties();
00011
00012     void PullDirection(winrt::RefreshPullDirection const& value);
00013     winrt::RefreshPullDirection PullDirection();
00014
00015     void Visualizer(winrt::RefreshVisualizer const& value);
00016     winrt::RefreshVisualizer Visualizer();
00017
00018     static winrt::DependencyProperty PullDirectionProperty() { return s_PullDirectionProperty; }
00019     static winrt::DependencyProperty VisualizerProperty() { return s_VisualizerProperty; }
00020
00021     static GlobalDependencyProperty s_PullDirectionProperty;
00022     static GlobalDependencyProperty s_VisualizerProperty;
00023
00024     winrt::event_token RefreshRequested(winrt::TypedEventHandler<winrt::RefreshContainer, winrt::RefreshRequestedEventArgs> const& value);
00025     void RefreshRequested(winrt::event_token const& token);
00026
00027     event_source<winrt::TypedEventHandler<winrt::RefreshContainer, winrt::RefreshRequestedEventArgs>> m_refreshRequestedEventSource;
00028
00029     static void EnsureProperties();
00030     static void ClearProperties();
00031
00032     static void OnPullDirectionPropertyChanged(
00033         winrt::DependencyObject const& sender,
00034         winrt::DependencyPropertyChangedEventArgs const& args);
00035
00036     static void OnVisualizerPropertyChanged(
00037         winrt::DependencyObject const& sender,
00038         winrt::DependencyPropertyChangedEventArgs const& args);
00039 };
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: dll/FloatUtil.cpp Source File

  • File List
  • File Members
  • dll

FloatUtil.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include "FloatUtil.h"
00006
00007 // Represents a value that is not a number (NaN).
00008 const float FloatUtil::NaN = std::numeric_limits<float>::quiet_NaN();
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicBrushLuminosityTestPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI

AcrylicBrushLuminosityTestPage.xaml.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml.Media;
00002 using Windows.Foundation.Metadata;
00003
00004 // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
00005
00006 namespace MUXControlsTestApp
00007 {
00008     /// <summary>
00009     /// An empty page that can be used on its own or navigated to within a Frame.
00010     /// </summary>
00011     public sealed partial class AcrylicBrushLuminosityTestPage : TestPage
00012     {
00013         public AcrylicBrushLuminosityTestPage()
00014         {
00015             this.InitializeComponent();
00016
00017             ((AcrylicBrush)Resources["AcrylicBlackWithLuminosityOpacity"]).TintLuminosityOpacity = 0.2;
00018             ((AcrylicBrush)Resources["AcrylicDarkGreyWithLuminosityOpacity"]).TintLuminosityOpacity = 0.2;
00019         }
00020     }
00021 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WindowPage Member List

This is the complete list of members for WindowPage, including all inherited members.
BtnOpenNewMainPage_Click(object sender, RoutedEventArgs e) | WindowPage | [inline, private]
BtnOpenNewWindowRootPage_Click(object sender, RoutedEventArgs e) | WindowPage | [inline, private]
WindowPage() | WindowPage | [inline]
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MicaBackdropProperties Member List

This is the complete list of members for MicaBackdropProperties, including all inherited members.
ClearProperties() | MicaBackdropProperties | [static]
EnsureProperties() | MicaBackdropProperties | [static]
Kind(winrt::MicaKind const &value) | MicaBackdropProperties |
Kind() | MicaBackdropProperties |
KindProperty() | MicaBackdropProperties | [inline, static]
MicaBackdropProperties() | MicaBackdropProperties |
OnKindPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MicaBackdropProperties | [static]
s_KindProperty | MicaBackdropProperties | [static]
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PagerControlAutomationPeer Member List

This is the complete list of members for PagerControlAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
CanSelectMultiple() | PagerControlAutomationPeer | [inline]
CheckThread() | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< PagerControlAutomationPeer > &&self) noexcept | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
final_release(std::unique_ptr< PagerControlAutomationPeer > &&self) | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline, static]
GetAutomationControlTypeCore() | PagerControlAutomationPeer |
GetBase() | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
GetClassNameCore() | PagerControlAutomationPeer |
GetImpl() | PagerControlAutomationPeer | [private]
GetInner() | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
GetNameCore() | PagerControlAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | PagerControlAutomationPeer |
GetSelection() | PagerControlAutomationPeer |
IsOnThread() | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
IsSelectionRequired() | PagerControlAutomationPeer | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
PagerControlAutomationPeer(winrt::PagerControl const &owner) | PagerControlAutomationPeer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
RaiseSelectionChanged(double oldIndex, double newIndex) | PagerControlAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< PagerControlAutomationPeer, winrt::implementation::PagerControlAutomationPeerT, winrt::ISelectionProvider > | [inline]
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CrossFadeEffect Member List

This is the complete list of members for CrossFadeEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1CrossFade) | CrossFadeEffect |
DECLARE_DUAL_SOURCES(Source1, Source2) | CrossFadeEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"Weight", D2D1_CROSSFADE_PROP_WEIGHT, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | CrossFadeEffect |
DECLARE_POD_PROPERTY(Weight, float, 0.5f, value >=0.0f &&value<=1.0f) | CrossFadeEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | CrossFadeEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | CrossFadeEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RefreshStateChangedEventArgs Member List

This is the complete list of members for RefreshStateChangedEventArgs, including all inherited members.
NewState() | RefreshStateChangedEventArgs
OldState() | RefreshStateChangedEventArgs
RefreshStateChangedEventArgs(winrt::RefreshVisualizerState oldValue, winrt::RefreshVisualizerState newValue) | RefreshStateChangedEventArgs
Generated on Sun Dec 1 2024 20:53:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MyData Member List

This is the complete list of members for MyData, including all inherited members.
MyData(int number) | MyData | [inline]
number | MyData |
Generated on Sun Dec 1 2024 20:54:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CompositionScrollControllerPanningInfo Member List

This is the complete list of members for CompositionScrollControllerPanningInfo, including all inherited members.
Changed | CompositionScrollControllerPanningInfo |
CompositionScrollControllerPanningInfo(DispatcherQueue dispatcherQueue, bool isRailEnabled, Orientation panOrientation) | CompositionScrollControllerPanningInfo | [inline, private]
dispatcherQueue | CompositionScrollControllerPanningInfo | [private]
EnsureThumbAnimation() | CompositionScrollControllerPanningInfo | [inline, private]
expressionAnimationSources | CompositionScrollControllerPanningInfo | [private]
isAnimatingThumbOffset | CompositionScrollControllerPanningInfo | [private]
IsAnimatingThumbOffset | CompositionScrollControllerPanningInfo | [private]
isRailEnabled | CompositionScrollControllerPanningInfo | [private]
IsRailEnabled | CompositionScrollControllerPanningInfo |
isThumbPannable | CompositionScrollControllerPanningInfo | [private]
IsThumbPannable | CompositionScrollControllerPanningInfo | [private]
isThumbPositionMirrored | CompositionScrollControllerPanningInfo | [private]
IsThumbPositionMirrored | CompositionScrollControllerPanningInfo | [private]
LogMessage | CompositionScrollControllerPanningInfo |
maxOffset | CompositionScrollControllerPanningInfo | [private]
maxOffsetPropertyName | CompositionScrollControllerPanningInfo | [private]
minOffset | CompositionScrollControllerPanningInfo | [private]
minOffsetPropertyName | CompositionScrollControllerPanningInfo | [private]
multiplierPropertyName | CompositionScrollControllerPanningInfo | [private]
offsetPropertyName | CompositionScrollControllerPanningInfo | [private]
PanningElementAncestor | CompositionScrollControllerPanningInfo |
panningElementAncestor | CompositionScrollControllerPanningInfo | [private]
PanningElementOffsetMultiplier | CompositionScrollControllerPanningInfo | [private]
panningFrameworkElement | CompositionScrollControllerPanningInfo | [private]
panningVisual | CompositionScrollControllerPanningInfo | [private]
PanningVisual | CompositionScrollControllerPanningInfo | [private]
PanOrientation | CompositionScrollControllerPanningInfo |
panOrientation | CompositionScrollControllerPanningInfo | [private]
PanRequested | CompositionScrollControllerPanningInfo |
RaiseChanged() | CompositionScrollControllerPanningInfo | [inline, private]
RaiseLogMessage(string logMessage) | CompositionScrollControllerPanningInfo | [inline, private]
RaisePanRequested(PointerPoint pointerPoint) | CompositionScrollControllerPanningInfo | [inline, private]
SetPanningElementExpressionAnimationSources(CompositionPropertySet propertySet, string minOffsetPropertyName, string maxOffsetPropertyName, string offsetPropertyName, string multiplierPropertyName) | CompositionScrollControllerPanningInfo | [inline]
SetPanningFrameworkElement(FrameworkElement value) | CompositionScrollControllerPanningInfo | [inline, private]
StartThumbAnimation() | CompositionScrollControllerPanningInfo | [inline, private]
StopThumbAnimation() | CompositionScrollControllerPanningInfo | [inline, private]
thumbOffsetAnimation | CompositionScrollControllerPanningInfo | [private]
UpdatePanningElementOffsetMultiplier() | CompositionScrollControllerPanningInfo | [inline, private]
UpdatePanningFrameworkElementLength(double minOffset, double maxOffset, double viewportLength) | CompositionScrollControllerPanningInfo | [inline, private]
UpdateThumbExpression() | CompositionScrollControllerPanningInfo | [inline, private]
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedSettingsVisualSource.h Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedSettingsVisualSource.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 //------------------------------------------------------------------------------
00003 // <auto-generated>
00004 //     This code was generated by a tool.
00005 //
00006 //       LottieGen version:
00007 //           7.1.0+ge1fa92580f
00008 //
00009 //       Command:
00010 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedSettingsVisualSource.json
00011 //
00012 //       Input file:
00013 //           AnimatedSettingsVisualSource.json (28705 bytes created 23:37-07:00 Oct 5 2021)
00014 //
00015 //       LottieGen source:
00016 //           http://aka.ms/Lottie
00017 //
00018 //     Changes to this file may cause incorrect behavior and will be lost if
00019 //     the code is regenerated.
00020 // </auto-generated>
00021 //------------------------------------------------------------------------------
00022 #include "common.h"
00023 #include "AnimatedVisuals\AnimatedSettingsVisualSource.g.h"
00024
00025 // Name:        Controls_04_Settings
00026 // Frame rate:  60 fps
00027 // Frame count: 120
00028 // Duration:    2000.0 mS
00029 // ______________________________________________________________________________________________
00030 // |           Marker           |           Constant           | Frame |   mS   |   Progress    |
00031 // |____________________________|______________________________|_______|________|_______________|
00032 // | NormalToPointerOver_Start  | M_NormalToPointerOver_Start  |     0 |    0.0 | 0.0F          |
00033 // | NormalToPointerOver_End    | M_NormalToPointerOver_End    |     9 |  150.0 | 0.0754166692F |
00034 // | NormalToPressed_Start      | M_NormalToPressed_Start      |    10 |  166.7 | 0.0837500021F |
00035 // | NormalToPressed_End        | M_NormalToPressed_End        |    19 |  316.7 | 0.158749998F  |
00036 // | PointerOverToNormal_Start  | M_PointerOverToNormal_Start  |    20 |  333.3 | 0.167083338F  |
00037 // | PointerOverToNormal_End    | M_PointerOverToNormal_End    |    29 |  483.3 | 0.242083326F  |
00038 // | PointerOverToPressed_Start | M_PointerOverToPressed_Start |    30 |  500.0 | 0.250416666F  |
00039 // | PointerOverToPressed_End   | M_PointerOverToPressed_End   |    39 |  650.0 | 0.325416654F  |
00040 // | PressedToNormal_Start      | M_PressedToNormal_Start      |    40 |  666.7 | 0.33375001F   |
00041 // | PressedToNormal_End        | M_PressedToNormal_End        |    79 | 1316.7 | 0.658749998F  |
00042 // | PressedToPointerOver_Start | M_PressedToPointerOver_Start |    80 | 1333.3 | 0.667083323F  |
00043 // | PressedToPointerOver_End   | M_PressedToPointerOver_End   |   119 | 1983.3 | 0.992083311F  |
00044 // ----------------------------------------------------------------------------------------------
00045 // _______________________________________________________
00046 // | Theme property |  Accessor  | Type  | Default value |
00047 // |________________|____________|_______|_______________|
00048 // | Foreground     | Foreground | Color |   #FF131718   |
00049 // -------------------------------------------------------
00050 class AnimatedSettingsVisualSource
00051     : public winrt::implementation::AnimatedSettingsVisualSourceT<AnimatedSettingsVisualSource>
00052 {
00053     winrt::Microsoft::UI::Composition::CompositionPropertySet _themeProperties{ nullptr };
00054     winrt::Windows::UI::Color _themeForeground{ 0xFF, 0x13, 0x17, 0x18 };
00055     winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00056
00057     static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4(winrt::Windows::UI::Color color);
00058 public:
00059     // Animation duration: 2.000 seconds.
00060     static constexpr int64_t c_durationTicks{ 20000000L };
00061
00062     // Marker: NormalToPointerOver_Start.
00063     static constexpr float M_NormalToPointerOver_Start{ 0.0F };
00064
00065     // Marker: NormalToPointerOver_End.
00066     static constexpr float M_NormalToPointerOver_End{ 0.0754166692F };
00067
00068     // Marker: NormalToPressed_Start.
00069     static constexpr float M_NormalToPressed_Start{ 0.0837500021F };
00070
00071     // Marker: NormalToPressed_End.
00072     static constexpr float M_NormalToPressed_End{ 0.158749998F };
00073
00074     // Marker: PointerOverToNormal_Start.
00075     static constexpr float M_PointerOverToNormal_Start{ 0.167083338F };
00076
00077     // Marker: PointerOverToNormal_End.
00078     static constexpr float M_PointerOverToNormal_End{ 0.242083326F };
00079
00080     // Marker: PointerOverToPressed_Start.
00081     static constexpr float M_PointerOverToPressed_Start{ 0.250416666F };
00082
00083     // Marker: PointerOverToPressed_End.
00084     static constexpr float M_PointerOverToPressed_End{ 0.325416654F };
00085
00086     // Marker: PressedToNormal_Start.
00087     static constexpr float M_PressedToNormal_Start{ 0.33375001F };
00088
00089     // Marker: PressedToNormal_End.
00090     static constexpr float M_PressedToNormal_End{ 0.658749998F };
00091
00092     // Marker: PressedToPointerOver_Start.
00093     static constexpr float M_PressedToPointerOver_Start{ 0.667083323F };
00094
00095     // Marker: PressedToPointerOver_End.
00096     static constexpr float M_PressedToPointerOver_End{ 0.992083311F };
00097
00098     // Theme property: Foreground.
00099     static inline const winrt::Windows::UI::Color c_themeForeground{ 0xFF, 0x13, 0x17, 0x18 };
00100
00101
00102     winrt::Windows::UI::Color Foreground();
00103     void Foreground(winrt::Windows::UI::Color value);
00104
00105     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00106         winrt::Microsoft::UI::Composition::Compositor const& compositor);
00107
00108     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00109         winrt::Microsoft::UI::Composition::Compositor const& compositor,
00110         winrt::Windows::Foundation::IInspectable& diagnostics);
00111
00112     // Gets the number of frames in the animation.
00113     double FrameCount();
00114
00115     // Gets the framerate of the animation.
00116     double Framerate();
00117
00118     // Gets the duration of the animation.
00119     winrt::Windows::Foundation::TimeSpan Duration();
00120
00121     // Converts a zero-based frame number to the corresponding progress value denoting the
00122     // start of the frame.
00123     double FrameToProgress(double frameNumber);
00124
00125     // Returns a map from marker names to corresponding progress values.
00126     winrt::Windows::Foundation::Collections::IMapView<hstring, double> Markers();
00127
00128     // Sets the color property with the given name, or does nothing if no such property
00129     // exists.
00130     void SetColorProperty(hstring const& propertyName, winrt::Windows::UI::Color value);
00131
00132     // Sets the scalar property with the given name, or does nothing if no such property
00133     // exists.
00134     void SetScalarProperty(hstring const& propertyName, double value);
00135 };
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarEraserButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarEraserButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarEraserButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarEraserButton)
00012 }
00013
00014 #include "InkToolBarEraserButton.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarEraserButtonProperties::s_ArePrecisionErasersVisibleProperty{ nullptr };
00017 GlobalDependencyProperty InkToolBarEraserButtonProperties::s_IsClearAllVisibleProperty{ nullptr };
00018 GlobalDependencyProperty InkToolBarEraserButtonProperties::s_IsStrokeEraserVisibleProperty{ nullptr };
00019 GlobalDependencyProperty InkToolBarEraserButtonProperties::s_SelectedEraserProperty{ nullptr };
00020
00021 InkToolBarEraserButtonProperties::InkToolBarEraserButtonProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void InkToolBarEraserButtonProperties::EnsureProperties()
00027 {
00028     InkToolBarToolButton::EnsureProperties();
00029     if (!s_ArePrecisionErasersVisibleProperty)
00030     {
00031         s_ArePrecisionErasersVisibleProperty =
00032             InitializeDependencyProperty(
00033                 L"ArePrecisionErasersVisible",
00034                 winrt::name_of<bool>(),
00035                 winrt::name_of<winrt::InkToolBarEraserButton>(),
00036                 false /* isAttached */,
00037                 ValueHelper<bool>::BoxedDefaultValue(),
00038                 nullptr);
00039     }
00040     if (!s_IsClearAllVisibleProperty)
00041     {
00042         s_IsClearAllVisibleProperty =
00043             InitializeDependencyProperty(
00044                 L"IsClearAllVisible",
00045                 winrt::name_of<bool>(),
00046                 winrt::name_of<winrt::InkToolBarEraserButton>(),
00047                 false /* isAttached */,
00048                 ValueHelper<bool>::BoxedDefaultValue(),
00049                 nullptr);
00050     }
00051     if (!s_IsStrokeEraserVisibleProperty)
00052     {
00053         s_IsStrokeEraserVisibleProperty =
00054             InitializeDependencyProperty(
00055                 L"IsStrokeEraserVisible",
00056                 winrt::name_of<bool>(),
00057                 winrt::name_of<winrt::InkToolBarEraserButton>(),
00058                 false /* isAttached */,
00059                 ValueHelper<bool>::BoxedDefaultValue(),
00060                 nullptr);
00061     }
00062     if (!s_SelectedEraserProperty)
00063     {
00064         s_SelectedEraserProperty =
00065             InitializeDependencyProperty(
00066                 L"SelectedEraser",
00067                 winrt::name_of<winrt::InkToolBarEraserKind>(),
00068                 winrt::name_of<winrt::InkToolBarEraserButton>(),
00069                 false /* isAttached */,
00070                 ValueHelper<winrt::InkToolBarEraserKind>::BoxedDefaultValue(),
00071                 nullptr);
00072     }
00073 }
00074
00075 void InkToolBarEraserButtonProperties::ClearProperties()
00076 {
00077     s_ArePrecisionErasersVisibleProperty = nullptr;
00078     s_IsClearAllVisibleProperty = nullptr;
00079     s_IsStrokeEraserVisibleProperty = nullptr;
00080     s_SelectedEraserProperty = nullptr;
00081     InkToolBarToolButton::ClearProperties();
00082 }
00083
00084 void InkToolBarEraserButtonProperties::ArePrecisionErasersVisible(bool value)
00085 {
00086     [[gsl::suppress(con)]]
00087     {
00088     static_cast<InkToolBarEraserButton*>(this)->SetValue(s_ArePrecisionErasersVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00089     }
00090 }
00091
00092 bool InkToolBarEraserButtonProperties::ArePrecisionErasersVisible()
00093 {
00094     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_ArePrecisionErasersVisibleProperty));
00095 }
00096
00097 void InkToolBarEraserButtonProperties::IsClearAllVisible(bool value)
00098 {
00099     [[gsl::suppress(con)]]
00100     {
00101     static_cast<InkToolBarEraserButton*>(this)->SetValue(s_IsClearAllVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00102     }
00103 }
00104
00105 bool InkToolBarEraserButtonProperties::IsClearAllVisible()
00106 {
00107     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_IsClearAllVisibleProperty));
00108 }
00109
00110 void InkToolBarEraserButtonProperties::IsStrokeEraserVisible(bool value)
00111 {
00112     [[gsl::suppress(con)]]
00113     {
00114     static_cast<InkToolBarEraserButton*>(this)->SetValue(s_IsStrokeEraserVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00115     }
00116 }
00117
00118 bool InkToolBarEraserButtonProperties::IsStrokeEraserVisible()
00119 {
00120     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_IsStrokeEraserVisibleProperty));
00121 }
00122
00123 void InkToolBarEraserButtonProperties::SelectedEraser(winrt::InkToolBarEraserKind const& value)
00124 {
00125     [[gsl::suppress(con)]]
00126     {
00127     static_cast<InkToolBarEraserButton*>(this)->SetValue(s_SelectedEraserProperty, ValueHelper<winrt::InkToolBarEraserKind>::BoxValueIfNecessary(value));
00128     }
00129 }
00130
00131 winrt::InkToolBarEraserKind InkToolBarEraserButtonProperties::SelectedEraser()
00132 {
00133     return ValueHelper<winrt::InkToolBarEraserKind>::CastOrUnbox(static_cast<InkToolBarEraserButton*>(this)->GetValue(s_SelectedEraserProperty));
00134 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTestsBase Member List

This is the complete list of members for NavigationViewTestsBase, including all inherited members.
ClickClearSelectionButton() | NavigationViewTestsBase | [inline, protected]
ComboBoxName enum name | NavigationViewTestsBase | [protected]
compact | NavigationViewTestsBase | [protected]
ControlHeight enum name | NavigationViewTestsBase | [protected]
ControlWidth enum name | NavigationViewTestsBase | [protected]
EnsureNavViewClosed() | NavigationViewTestsBase | [inline, protected]
EnsurePaneHeaderCanBeModifiedHelper(RegressionTestType navviewMode) | NavigationViewTestsBase | [inline, protected]
expanded | NavigationViewTestsBase | [protected]
GetTopNavigationItems(TopNavPosition position) | NavigationViewTestsBase | [inline, protected]
InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement(string expectedKeyTipTargetElementId) | NavigationViewTestsBase | [inline, protected]
InvokeOverflowButton() | NavigationViewTestsBase | [inline, protected]
IsItemInTopNavPrimaryList(string text) | NavigationViewTestsBase | [inline, protected]
minimal | NavigationViewTestsBase | [protected]
OpenOverflowMenuAndInvokeItem(string itemName) | NavigationViewTestsBase | [inline, protected]
PaneOpenCloseTestCaseRetry(int retryNumber, Action action) | NavigationViewTestsBase | [inline, protected]
PaneOpenStatus enum name | NavigationViewTestsBase | [protected]
SetNavViewHeight(ControlHeight height) | NavigationViewTestsBase | [inline, protected]
SetNavViewWidth(ControlWidth width) | NavigationViewTestsBase | [inline, protected]
SetThreshold(Threshold threshold, ComboBoxName name) | NavigationViewTestsBase | [inline, protected]
TestCleanup() | NavigationViewTestsBase | [inline]
Threshold enum name | NavigationViewTestsBase | [protected]
TopNavPosition enum name | NavigationViewTestsBase | [protected]
UIObjectContains(UIObject uIObject, string itemName) | NavigationViewTestsBase | [inline, protected]
UIObjectToString(UIObject uIObject) | NavigationViewTestsBase | [inline, protected]
VerifyBackAndCloseButtonsVisibility(bool inLeftMinimalPanelDisplayMode) | NavigationViewTestsBase | [inline, protected]
WaitAndAssertPaneStatus(PaneOpenStatus status) | NavigationViewTestsBase | [inline, protected]
Generated on Sun Dec 1 2024 20:53:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GroupedItemsControlGroupItem Member List

This is the complete list of members for GroupedItemsControlGroupItem, including all inherited members.
GroupedItemsControlGroupItem() | GroupedItemsControlGroupItem | [inline]
GroupedItemsControlGroupItem(string name) | GroupedItemsControlGroupItem | [inline]
Items | GroupedItemsControlGroupItem |
Name | GroupedItemsControlGroupItem |
Generated on Sun Dec 1 2024 20:54:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TwoPaneView/TestUI/TwoPaneViewPage.xaml.cs Source File

  • File List
  • File Members
  • TwoPaneView
  • TestUI

TwoPaneViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Windows.UI;
00005 using Windows.UI.ViewManagement;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Private.Controls;
00010 using Windows.Foundation;
00011 using Windows.Graphics.Display;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     [TopLevelTestPage(Name = "TwoPaneView")]
00016     public sealed partial class TwoPaneViewPage : TestPage
00017     {
00018         // Need to be the same as c_defaultMinWideModeWidth/c_defaultMinTallModeHeight in TwoPaneViewFactory.cpp
00019         private const double c_defaultMinWideModeWidth = 641.0;
00020         private const double c_defaultMinTallModeHeight = 641.0;
00021
00022         // Need to be the same as c_simulatedPaneWidth/c_simulatedPaneHeight/c_simulatedMiddle in TwoPaneViewTests.cs
00023         private const double c_simulatedPaneWidth = 300.0;
00024         private const double c_simulatedPaneHeight = 400.0;
00025         private const double c_simulatedMiddle = 12.0;
00026
00027         // Need to be the same as c_controlMargin in TwoPaneViewTests.cs
00028         private Thickness c_controlMargin = new Thickness(40, 10, 30, 20);
00029
00030         public TwoPaneViewPage()
00031         {
00032             this.InitializeComponent();
00033
00034             DisplayRegionHelperTestApi.SimulateDisplayRegions = false;
00035
00036             TwoPaneView.ModeChanged += TwoPaneView_ModeChanged;
00037             ConfigurationTextBlock.Text = TwoPaneView.Mode.ToString();
00038         }
00039
00040         private void TwoPaneView_ModeChanged(TwoPaneView sender, object args)
00041         {
00042             ConfigurationTextBlock.Text = TwoPaneView.Mode.ToString();
00043         }
00044
00045         private string ViewModeToString(TwoPaneViewMode configuration)
00046         {
00047             switch (configuration)
00048             {
00049                 case TwoPaneViewMode.SinglePane: return "SinglePane";
00050                 case TwoPaneViewMode.Wide: return "Wide";
00051                 case TwoPaneViewMode.Tall: return "Tall";
00052             }
00053             return string.Empty;
00054         }
00055
00056         private void PanePriorityComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00057         {
00058             if (TwoPaneView == null) return;
00059
00060             TwoPaneView.PanePriority = PanePriorityComboBox.SelectedIndex == 0 ? TwoPaneViewPriority.Pane1 : TwoPaneViewPriority.Pane2;
00061         }
00062
00063         private void WideModeConfigurationComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00064         {
00065             if (TwoPaneView == null) return;
00066
00067             switch (WideModeConfigurationComboBox.SelectedIndex)
00068             {
00069                 case 0: TwoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.LeftRight; break;
00070                 case 1: TwoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.RightLeft; break;
00071                 case 2: TwoPaneView.WideModeConfiguration = TwoPaneViewWideModeConfiguration.SinglePane; break;
00072             }
00073         }
00074
00075         private void TallModeConfigurationComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00076         {
00077             if (TwoPaneView == null) return;
00078
00079             switch (TallModeConfigurationComboBox.SelectedIndex)
00080             {
00081                 case 0: TwoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.TopBottom; break;
00082                 case 1: TwoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.BottomTop; break;
00083                 case 2: TwoPaneView.TallModeConfiguration = TwoPaneViewTallModeConfiguration.SinglePane; break;
00084             }
00085         }
00086
00087         private void MinWideModeWidthTextBox_TextChanged(object sender, TextChangedEventArgs e)
00088         {
00089             if (TwoPaneView == null) return;
00090
00091             double newWidth;
00092             if (double.TryParse(MinWideModeWidthTextBox.Text, out newWidth))
00093             {
00094                 TwoPaneView.MinWideModeWidth = newWidth;
00095             }
00096         }
00097
00098         private void MinTallModeHeightTextBox_TextChanged(object sender, TextChangedEventArgs e)
00099         {
00100             if (TwoPaneView == null) return;
00101
00102             double newHeight;
00103             if (double.TryParse(MinTallModeHeightTextBox.Text, out newHeight))
00104             {
00105                 TwoPaneView.MinTallModeHeight = newHeight;
00106             }
00107         }
00108
00109         private void WidthComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00110         {
00111             if (TwoPaneView == null) return;
00112
00113             switch (WidthComboBox.SelectedIndex)
00114             {
00115                 case 0: TwoPaneView.Width = double.NaN ; break;
00116                 case 1: TwoPaneView.Width = c_defaultMinWideModeWidth + 10; break;
00117                 case 2: TwoPaneView.Width = c_defaultMinWideModeWidth - 10; break;
00118             }
00119         }
00120
00121         private void HeightComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00122         {
00123             if (TwoPaneView == null) return;
00124
00125             switch (HeightComboBox.SelectedIndex)
00126             {
00127                 case 0: TwoPaneView.Height = double.NaN; break;
00128                 case 1: TwoPaneView.Height = c_defaultMinTallModeHeight + 10; break;
00129                 case 2: TwoPaneView.Height = c_defaultMinTallModeHeight - 10; break;
00130             }
00131         }
00132
00133         private void SimulateComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00134         {
00135             if (TwoPaneView == null) return;
00136
00137             switch (SimulateComboBox.SelectedIndex)
00138             {
00139                 case 0:
00140                     DisplayRegionHelperTestApi.SimulateDisplayRegions = false;
00141                     SimulatedWindow.Width = double.NaN;
00142                     SimulatedWindow.Height = double.NaN;
00143                     break;
00144
00145                 case 1:
00146                     DisplayRegionHelperTestApi.SimulateDisplayRegions = true;
00147                     DisplayRegionHelperTestApi.SimulateMode = TwoPaneViewMode.Wide;
00148                     SimulatedWindow.Width = c_simulatedPaneWidth * 2 + c_simulatedMiddle;
00149                     SimulatedWindow.Height = c_simulatedPaneHeight;
00150                     break;
00151
00152                 case 2:
00153                     DisplayRegionHelperTestApi.SimulateDisplayRegions = true;
00154                     DisplayRegionHelperTestApi.SimulateMode = TwoPaneViewMode.Tall;
00155                     SimulatedWindow.Width = c_simulatedPaneHeight;
00156                     SimulatedWindow.Height = c_simulatedPaneWidth * 2 + c_simulatedMiddle;
00157                     break;
00158             }
00159         }
00160
00161         private void AddMarginCheckBox_Checked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
00162         {
00163             TwoPaneView.Margin = c_controlMargin;
00164         }
00165
00166         private void AddMarginCheckBox_Unchecked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
00167         {
00168             TwoPaneView.Margin = new Thickness(0);
00169         }
00170
00171         private void OneSideCheckBox_Checked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
00172         {
00173             TwoPaneView.HorizontalAlignment = HorizontalAlignment.Left;
00174             TwoPaneView.Width = c_simulatedPaneWidth;
00175         }
00176
00177         private void OneSideCheckBox_Unchecked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
00178         {
00179             TwoPaneView.HorizontalAlignment = HorizontalAlignment.Stretch;
00180             TwoPaneView.Width = double.NaN;
00181         }
00182
00183         private void PaneSizeChanged(object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e)
00184         {
00185             TextBlock widthTextBlock = (sender == Pane1Content) ? WidthText1 : WidthText2;
00186             TextBlock heightTextBlock = (sender == Pane1Content) ? HeightText1 : HeightText2;
00187
00188             widthTextBlock.Text = ((int)e.NewSize.Width).ToString();
00189             heightTextBlock.Text = ((int)e.NewSize.Height).ToString();
00190
00191             if (TwoPaneView.Mode == TwoPaneViewMode.SinglePane)
00192             {
00193                 SpacingTextBox.Text = "0";
00194             }
00195             else
00196             {
00197                 GeneralTransform t = Pane1Content.TransformToVisual(SimulatedWindow);
00198                 Rect bounds = new Rect(0, 0, Pane1Content.ActualWidth, Pane1Content.ActualHeight);
00199                 Rect rc1 = t.TransformBounds(bounds);
00200
00201                 t = Pane2Content.TransformToVisual(SimulatedWindow);
00202                 bounds = new Rect(0, 0, Pane2Content.ActualWidth, Pane2Content.ActualHeight);
00203                 Rect rc2 = t.TransformBounds(bounds);
00204
00205                 int spacing = (int)((TwoPaneView.Mode == TwoPaneViewMode.Wide)
00206                     ? rc2.X - (rc1.X + rc1.Width)
00207                     : rc2.Y - (rc1.Y + rc1.Height));
00208
00209                 SpacingTextBox.Text = spacing.ToString();
00210             }
00211         }
00212
00213         private void TwoPaneView_SizeChanged(object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e)
00214         {
00215             ControlWidthText.Text = ((int)e.NewSize.Width).ToString();
00216             ControlHeightText.Text = ((int)e.NewSize.Height).ToString();
00217         }
00218
00219         private void Pane1LengthTextBox_TextChanged(object sender, TextChangedEventArgs e)
00220         {
00221             UpdateLength(1);
00222         }
00223
00224         private void Pane1LengthComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00225         {
00226             UpdateLength(1);
00227         }
00228
00229         private void Pane2LengthTextBox_TextChanged(object sender, TextChangedEventArgs e)
00230         {
00231             UpdateLength(2);
00232         }
00233
00234         private void Pane2LengthComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
00235         {
00236             UpdateLength(2);
00237         }
00238
00239         private void UpdateLength(int pane)
00240         {
00241             if (TwoPaneView == null) return;
00242
00243             TextBox textBox = pane == 1 ? Pane1LengthTextBox : Pane2LengthTextBox;
00244             ComboBox comboBox = pane == 1 ? Pane1LengthComboBox : Pane2LengthComboBox;
00245
00246             double value;
00247             if (double.TryParse(textBox.Text, out value))
00248             {
00249                 GridUnitType type = GridUnitType.Auto;
00250
00251                 switch (comboBox.SelectedIndex)
00252                 {
00253                     case 1: type = GridUnitType.Pixel; break;
00254                     case 2: type = GridUnitType.Star;  break;
00255                 }
00256
00257                 GridLength gridLength = new GridLength(value, type);
00258
00259                 if (pane == 1)
00260                 {
00261                     TwoPaneView.Pane1Length = gridLength;
00262                 }
00263                 else
00264                 {
00265                     TwoPaneView.Pane2Length = gridLength;
00266                 }
00267             }
00268         }
00269     }
00270 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealBorderLight Member List

This is the complete list of members for RevealBorderLight, including all inherited members.
abi_enter() | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
CheckThread() | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< RevealBorderLight > &&self) noexcept | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline, static]
EnsureCompositionResources() | RevealBorderLight | [private]
EnsureLocalLight() | RevealBorderLight | [private]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
final_release(std::unique_ptr< RevealBorderLight > &&self) | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline, static]
GetBase() | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
GetDarkThemeIdStatic() | RevealBorderLight | [static]
GetId() | RevealBorderLight |
GetInner() | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
GetLight() | RevealBorderLight | [inline, private]
GetLightThemeIdStatic() | RevealBorderLight | [static]
GetShouldLightBeOn() | RevealBorderLight | [private]
HookupWindowPointerHandlers() | RevealBorderLight | [private]
IsOnThread() | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
MaterialHelper | RevealBorderLight | [private]
MaterialHelperBase | RevealBorderLight | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
OnConnected(winrt::UIElement const &newElement) | RevealBorderLight |
OnDisconnected(winrt::UIElement const &oldElement) | RevealBorderLight |
OnMaterialPolicyStatusChanged(const com_ptr< MaterialHelperBase > &sender, bool isDisabledByMaterialPolicy) | RevealBorderLight |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< RevealBorderLight, winrt::implementation::RevealBorderLightT > | [inline]
ReleaseCompositionResources() | RevealBorderLight | [private]
ReleaseLocalLight() | RevealBorderLight | [private]
RevealTestApi | RevealBorderLight | [private]
SetIsLightTheme(bool isLightTheme) | RevealBorderLight | [inline]
SetIsWideLight(bool isWideLight) | RevealBorderLight | [inline]
SwitchLight(bool turnOn) | RevealBorderLight | [private]
UnhookWindowPointerHandlers() | RevealBorderLight | [private]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InspectingDataSourceTests::ObservableVectorWithUniqueIds Member List

This is the complete list of members for InspectingDataSourceTests::ObservableVectorWithUniqueIds, including all inherited members.
IndexFromKey(string id) | InspectingDataSourceTests::ObservableVectorWithUniqueIds | [inline]
KeyFromIndex(int index) | InspectingDataSourceTests::ObservableVectorWithUniqueIds | [inline]
ObservableVectorWithUniqueIds(IEnumerable< int > data) | InspectingDataSourceTests::ObservableVectorWithUniqueIds | [inline]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeControlTests Member List

This is the complete list of members for SwipeControlTests, including all inherited members.
AdditionalGridDoesntOverExtendHorizontal() | SwipeControlTests | [inline]
CanAddSameSwipeItemsInBothSidesHorizontal() | SwipeControlTests | [inline]
CanClearItemsWithoutCrashing() | SwipeControlTests | [inline]
CanSwipeAndTapBothItemsHorizontal() | SwipeControlTests | [inline]
CanSwipeAndTapFirstRevealedItemHorizontal() | SwipeControlTests | [inline]
CanSwipeAndTapFirstRevealedItemVertical() | SwipeControlTests | [inline]
CanSwipeAndTapSecondRevealedItemVertical() | SwipeControlTests | [inline]
CanSwipeAndTapSecondtRevealedItemHorizontal() | SwipeControlTests | [inline]
CanSwipeBackFromAnOpenedSwipe() | SwipeControlTests | [inline]
CanSwipeMultipleItemsWithSameSwipeService() | SwipeControlTests | [inline]
CanSwipeOtherDirectionAfterClosingAnOpenedSwipe() | SwipeControlTests | [inline]
CanSwipeToExecuteHorizontal() | SwipeControlTests | [inline]
CanSwipeToExecuteVertical() | SwipeControlTests | [inline]
CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedHorizontal() | SwipeControlTests | [inline]
CantOverSwipeToTheOtherSideWhenSwipeItemsAreRevealedVertical() | SwipeControlTests | [inline]
ClassInitialize(TestContext testContext) | SwipeControlTests | [inline, static]
ClearTraces() | SwipeControlTests | [inline, private]
ClickingOutsideARevealedSwipeDismissesIt() | SwipeControlTests | [inline]
CloseOnOpenedAndClosedSwipeItemsWorks() | SwipeControlTests | [inline]
ContentGridDoesntOverExtendHorizontal() | SwipeControlTests | [inline]
DismissRevealedSwipe(bool withOutsideTap) | SwipeControlTests | [inline, private]
LogAndClearTraces() | SwipeControlTests | [inline, private]
LogAndClearTraces(bool recordWarning) | SwipeControlTests | [inline, private]
LogTraces() | SwipeControlTests | [inline, private]
LogTraces(bool recordWarning) | SwipeControlTests | [inline, private]
OnlyProgramaticCloseWillCloseRemainOpenExecuteItems() | SwipeControlTests | [inline]
PerformSwipe(UIObject element, Direction direction) | SwipeControlTests | [inline, private]
PressingAnyKeyDismissesSwipe() | SwipeControlTests | [inline]
SetLoggingLevel(bool isPrivateLoggingEnabled) | SwipeControlTests | [inline, private]
SetOutputDebugStringLevel(string outputDebugStringLevel) | SwipeControlTests | [inline, private]
SwipeContentBackgroundResetsOnClose() | SwipeControlTests | [inline]
SwipeDismissThenSwipe() | SwipeControlTests | [inline]
SwipeDoesntJumpWhenItReverts() | SwipeControlTests | [inline]
SwipeIsNotTabStop() | SwipeControlTests | [inline]
SwipeItemInheritsICommand2Properties() | SwipeControlTests | [inline]
SwipeItemsAreNullifiedWhenTheAnimationIsDone() | SwipeControlTests | [inline]
SwipingDoesntChangeTheBoundsOfSwipeControl() | SwipeControlTests | [inline]
SwipingDoesntModifyTheSizeOfSwipeControl() | SwipeControlTests | [inline]
TapItem(String item) | SwipeControlTests | [inline, private]
TappingOutsideARevealedSwipeDismissesIt() | SwipeControlTests | [inline]
TestCleanup() | SwipeControlTests | [inline]
TogglingTheWindowStateDismissesSwipe() | SwipeControlTests | [inline]
ValidateItemsLessThanThresholdDontRevertHorizontal() | SwipeControlTests | [inline]
ValidateSwipeCanHaveNoItemsOnASideHorizontal() | SwipeControlTests | [inline]
ValidateSwipeDoesntCrashOnAddingMoreItemsThanItsSizeHorizontal() | SwipeControlTests | [inline]
WaitForCheckBoxUpdated(CheckBox checkBox, ToggleState state, double millisecondsTimeout=4000, bool throwOnError=true) | SwipeControlTests | [inline, private]
WaitForChecked(CheckBox checkBox) | SwipeControlTests | [inline, private]
WaitForUnchecked(CheckBox checkBox) | SwipeControlTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/TextControlsPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

TextControlsPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 using System.Collections.ObjectModel;
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using MUXControlsTestApp.Utilities;
00007
00008 namespace MUXControlsTestApp
00009 {
00010     [TopLevelTestPage(Name = "TextControls")]
00011     public sealed partial class TextControlsPage : TestPage
00012     {
00013         private bool isRootGridDefaultSize = true;
00014
00015         public TextControlsPage()
00016         {
00017             this.InitializeComponent();
00018             resizeWindowButton.Click += ResizeRootGrid;
00019         }
00020
00021         private void ResizeRootGrid(object sender, RoutedEventArgs e)
00022         {
00023             if (isRootGridDefaultSize)
00024             {
00025                 this.FindVisualParentByType<TestFrame>().SetRootGridSizeToCustomSize(1, 1);
00026             }
00027             else
00028             {
00029                 // Reset to default size
00030                 this.FindVisualParentByType<TestFrame>().SetRootGridSizeToCustomSize(-1, -1);
00031             }
00032             isRootGridDefaultSize = !isRootGridDefaultSize;
00033         }
00034     }
00035 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ISaturationEffect Member List

This is the complete list of members for ISaturationEffect, including all inherited members.
Saturation([out, retval] float *value) | ISaturationEffect
Saturation([in] float value) | ISaturationEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ISaturationEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ISaturationEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Customers Member List

This is the complete list of members for Customers, including all inherited members.
Customers() Customers [inline]
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorHelpers.h Source File

  • File List
  • File Members
  • ColorPicker

ColorHelpers.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "CppWinRTHelpers.h"
00007 #include "ColorConversion.h"
00008
00009 enum class IncrementDirection
00010 {
00011     Lower,
00012     Higher,
00013 };
00014
00015 enum class IncrementAmount
00016 {
00017     Small,
00018     Large,
00019 };
00020
00021 Hsv IncrementColorChannel(
00022     const Hsv &originalHsv,
00023     winrt::ColorPickerHsvChannel channel,
00024     IncrementDirection direction,
00025     IncrementAmount amount,
00026     bool shouldWrap,
00027     double minBound,
00028     double maxBound);
00029
00030 template <typename T>
00031 int sgn(T val);
00032
00033 Hsv FindNextNamedColor(
00034     const Hsv& originalHsv,
00035     winrt::ColorPickerHsvChannel channel,
00036     IncrementDirection direction,
00037     bool shouldWrap,
00038     double minBound,
00039     double maxBound);
00040
00041 double IncrementAlphaChannel(
00042     double originalAlpha,
00043     IncrementDirection direction,
00044     IncrementAmount amount,
00045     bool shouldWrap,
00046     double minBound,
00047     double maxBound);
00048
00049 void CreateCheckeredBackgroundAsync(
00050     int width,
00051     int height,
00052     winrt::Color checkerColor,
00053     std::shared_ptr<std::vector<byte>> const& bgraCheckeredPixelData,
00054     winrt::IAsyncAction &asyncActionToAssign,
00055     winrt::DispatcherQueue &dispatcherQueue,
00056     std::function<void(winrt::WriteableBitmap)> completedFunction);
00057
00058 winrt::WriteableBitmap CreateBitmapFromPixelData(
00059     int pixelWidth,
00060     int pixelHeight,
00061     std::shared_ptr<std::vector<byte>> const& bgraPixelData);
00062
00063 winrt::LoadedImageSurface CreateSurfaceFromPixelData(
00064     int pixelWidth,
00065     int pixelHeight,
00066     std::shared_ptr<std::vector<byte>> const& bgraPixelData);
00067
00068 void CancelAsyncAction(winrt::IAsyncAction const& action);
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewsWithSimpleContentsPage Member List

This is the complete list of members for ScrollViewsWithSimpleContentsPage, including all inherited members.
btnClearFullLog_Click(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
btnGetFullLog_Click(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
btnResetViews_Click(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
ClearFullLog() | ScrollViewsWithSimpleContentsPage | [inline, private]
CmbIgnoredInputKinds_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
CmbShowScrollView_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
fullLogs | ScrollViewsWithSimpleContentsPage | [private]
GetFullLog() | ScrollViewsWithSimpleContentsPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollViewsWithSimpleContentsPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, protected]
ResetView(ScrollView scrollView) | ScrollViewsWithSimpleContentsPage | [inline, private]
ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) | ScrollViewsWithSimpleContentsPage | [inline, private]
ScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollViewsWithSimpleContentsPage | [inline, private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollViewsWithSimpleContentsPage | [inline, private]
ScrollPresenter_ZoomCompleted(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) | ScrollViewsWithSimpleContentsPage | [inline, private]
scrollView52ZoomFactorChangeCorrelationId | ScrollViewsWithSimpleContentsPage | [private]
ScrollViewsWithSimpleContentsPage() | ScrollViewsWithSimpleContentsPage | [inline]
ScrollViewsWithSimpleContentsPage_KeyDown(object sender, KeyRoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
ScrollViewsWithSimpleContentsPage_Loaded(object sender, RoutedEventArgs e) | ScrollViewsWithSimpleContentsPage | [inline, private]
SelectedScrollView | ScrollViewsWithSimpleContentsPage | [private]
~ScrollViewsWithSimpleContentsPage() | ScrollViewsWithSimpleContentsPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:36 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TStorageWrapperImpl< T, isNoTrackerRef > Member List

This is the complete list of members for TStorageWrapperImpl< T, isNoTrackerRef >, including all inherited members.
unwrap(const Holder &holder, bool useSafeGet=false) | TStorageWrapperImpl< T, isNoTrackerRef > | [inline, static]
wrap(const T &value, const ITrackerHandleManager *trackerHandleManager) | TStorageWrapperImpl< T, isNoTrackerRef > | [inline, static]
Generated on Sun Dec 1 2024 20:53:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeControl_TestUI/SwipeControlClearPage.xaml.cs Source File

  • File List
  • File Members
  • SwipeControl
  • SwipeControl_TestUI

SwipeControlClearPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006
00007 namespace MUXControlsTestApp
00008 {
00009     /// <summary>
00010     /// Test page used for clearing existing SwipeControls
00011     /// </summary>
00012     public sealed partial class SwipeControlClearPage : TestPage
00013     {
00014         private string[] items = new string[] { "some text" };
00015
00016         public SwipeControlClearPage()
00017         {
00018             this.InitializeComponent();
00019             SwipeItemsChildSum.Text = (DefaultSwipeItemsHorizontal.Count + DefaultSwipeItemsVertical.Count).ToString();
00020
00021             leftSwipe.ItemsSource = items;
00022             topSwipe.ItemsSource = items;
00023             rightSwipe.ItemsSource = items;
00024             bottomSwipe.ItemsSource = items;
00025         }
00026
00027         public void AddSwipeItemsButton_Click(object sender, RoutedEventArgs e)
00028         {
00029             DefaultSwipeItemsHorizontal.Clear();
00030             DefaultSwipeItemsVertical.Clear();
00031
00032             DefaultSwipeItemsHorizontal.Mode = Microsoft.UI.Xaml.Controls.SwipeMode.Reveal;
00033             DefaultSwipeItemsHorizontal.Add(DefaultSwipeItemHorizontal);
00034
00035             // Using swipecontrol inside datatemplate prevents us from setting that:
00036             // Swipecontrol is in horizontal mode, can not add vertical swipe items...
00037             //DefaultSwipeItemsVertical.Mode = Microsoft.UI.Xaml.Controls.SwipeMode.Reveal;
00038             //DefaultSwipeItemsVertical.Add(DefaultSwipeItemVertical);
00039
00040             SwipeItemsChildSum.Text = (DefaultSwipeItemsHorizontal.Count + DefaultSwipeItemsVertical.Count).ToString();
00041         }
00042         public void ClearSwipeItemsButton_Click(object sender, RoutedEventArgs e)
00043         {
00044             DefaultSwipeItemsHorizontal.Clear();
00045             DefaultSwipeItemsVertical.Clear();
00046             SwipeItemsChildSum.Text = (DefaultSwipeItemsHorizontal.Count + DefaultSwipeItemsVertical.Count).ToString();
00047         }
00048
00049     }
00050 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrumAutomationPeer.idl Source File

  • File List
  • File Members
  • ColorPicker

ColorSpectrumAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass ColorSpectrumAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00007 {
00008     [method_name("CreateInstanceWithOwner")] ColorSpectrumAutomationPeer(MU_XCP_NAMESPACE.ColorSpectrum owner);
00009 }
00010
00011 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IUnknownAccessor< T, Enable > Member List

This is the complete list of members for IUnknownAccessor< T, Enable >, including all inherited members.
get(T const &value) IUnknownAccessor< T, Enable > [inline, static]
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewBlankPage1 Member List

This is the complete list of members for NavigationViewBlankPage1, including all inherited members.
NavigationViewBlankPage1() NavigationViewBlankPage1 [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/AutoHandle.h Source File

  • File List
  • File Members
  • Common

AutoHandle.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // Macros to make it easier to declare / instantiate instances of the template class for specific handle data type
00007 #define DECLARE_AUTOHANDLE_CLASS(className, handlePolicy) \
00008     typedef MUXControls::Common::AutoHandle<handlePolicy> className; \
00009
00010 namespace MUXControls { namespace Common {
00011
00012     template <typename THandlePolicy>
00013     class AutoHandle
00014     {
00015     public:
00016         using THandleType = typename THandlePolicy::THandleType;
00017
00018         AutoHandle();
00019         explicit AutoHandle(THandleType handle); // Conversion constructor
00020         AutoHandle(AutoHandle&& other);
00021         ~AutoHandle();
00022
00023         AutoHandle& operator=(AutoHandle&& other);
00024         AutoHandle& operator=(const THandleType& other);
00025
00026         bool operator==(THandleType handle) const;
00027         bool operator!=(THandleType handle) const;
00028
00029         THandleType* operator&()
00030         {
00031             return &m_handle;
00032         }
00033
00034         operator THandleType() const;
00035
00036         void Attach(THandleType handle);
00037
00038         THandleType Detach()
00039         {
00040             THandleType handle = m_handle;
00041             THandlePolicy::Invalidate(m_handle);
00042             return handle;
00043         }
00044
00045         void Release();
00046
00047         bool IsValid() const;
00048
00049     private:
00050         AutoHandle(const AutoHandle&); // not implemented
00051         AutoHandle& operator=(const AutoHandle&); // not implemented
00052
00053         THandleType m_handle;
00054     };
00055
00056     template <typename THandlePolicy>
00057     AutoHandle<THandlePolicy>::AutoHandle()
00058         : m_handle(THandlePolicy::Invalidate(m_handle))
00059     {
00060     }
00061
00062     template <typename THandlePolicy>
00063     AutoHandle<THandlePolicy>::AutoHandle(THandleType handle)
00064         : m_handle(handle)
00065     {
00066     }
00067
00068     template <typename THandlePolicy>
00069     AutoHandle<THandlePolicy>::AutoHandle(AutoHandle&& other)
00070         : m_handle(other.Detach())
00071     {
00072     }
00073
00074     template <typename THandlePolicy>
00075     AutoHandle<THandlePolicy>::~AutoHandle()
00076     {
00077         Release();
00078     }
00079
00080     template <typename THandlePolicy>
00081     AutoHandle<THandlePolicy>& AutoHandle<THandlePolicy>::operator=(const THandleType& other)
00082     {
00083         Attach(other);
00084         return *this;
00085     }
00086
00087     template <typename THandlePolicy>
00088     AutoHandle<THandlePolicy>& AutoHandle<THandlePolicy>::operator=(AutoHandle&& other)
00089     {
00090         Attach(other.Detach());
00091         return *this;
00092     }
00093
00094     template <typename THandlePolicy>
00095     bool AutoHandle<THandlePolicy>::operator==(THandleType handle) const
00096     {
00097         return (m_handle == handle);
00098     }
00099
00100     template <typename THandlePolicy>
00101     bool AutoHandle<THandlePolicy>::operator!=(THandleType handle) const
00102     {
00103         return (m_handle != handle);
00104     }
00105
00106     template <typename THandlePolicy>
00107     AutoHandle<THandlePolicy>::operator THandleType() const
00108     {
00109         return m_handle;
00110     }
00111
00112     template <typename THandlePolicy>
00113     void AutoHandle<THandlePolicy>::Attach(THandleType handle)
00114     {
00115         if (m_handle != handle)
00116         {
00117             Release();
00118         }
00119
00120         m_handle = handle;
00121     }
00122
00123     template <typename THandlePolicy>
00124     void AutoHandle<THandlePolicy>::Release()
00125     {
00126         if (THandlePolicy::IsValid(m_handle))
00127         {
00128             THandlePolicy::Close(m_handle);
00129         }
00130
00131         THandlePolicy::Invalidate(m_handle);
00132     }
00133
00134     template <typename THandlePolicy>
00135     bool AutoHandle<THandlePolicy>::IsValid() const
00136     {
00137         return THandlePolicy::IsValid(m_handle);
00138     }
00139
00140     class HandlePolicy
00141     {
00142     public:
00143         using THandleType = HANDLE;
00144
00145         static void Close(HANDLE& handle)
00146         {
00147             ::CloseHandle(handle);
00148         }
00149
00150         static bool IsValid(const HANDLE& handle)
00151         {
00152             return (INVALID_HANDLE_VALUE != handle) && handle;
00153         }
00154
00155         static HANDLE Invalidate(HANDLE& handle)
00156         {
00157             handle = INVALID_HANDLE_VALUE;
00158             return handle;
00159         }
00160     };
00161
00162     // Declare most used AutoHandles
00163     DECLARE_AUTOHANDLE_CLASS(Handle, HandlePolicy);
00164
00165 } } // namespace MUXControls::Common
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeater.cpp Source File

  • File List
  • File Members
  • Repeater

ItemsRepeater.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "ItemsRepeater.h"
00008 #include "RepeaterLayoutContext.h"
00009 #include "ChildrenInTabFocusOrderIterable.h"
00010 #include "SharedHelpers.h"
00011 #include "RepeaterAutomationPeer.h"
00012 #include "ViewportManagerWithPlatformFeatures.h"
00013 #include "RuntimeProfiler.h"
00014 #include "ItemTemplateWrapper.h"
00015
00016 // Change to 'true' to turn on debugging outputs in Output window
00017 bool ItemsRepeaterTrace::s_IsDebugOutputEnabled{ false };
00018 bool ItemsRepeaterTrace::s_IsVerboseDebugOutputEnabled{ false };
00019
00020 #ifdef DBG
00021 int ItemsRepeater::s_logItemIndexDbg{ -1 };
00022 #endif // DBG
00023
00024 winrt::Point ItemsRepeater::ClearedElementsArrangePosition = winrt::Point(-10000.0f, -10000.0f);
00025 winrt::Rect ItemsRepeater::InvalidRect = { -1.f, -1.f, -1.f, -1.f };
00026
00027 ItemsRepeater::ItemsRepeater()
00028 {
00029     __RP_Marker_ClassById(RuntimeProfiler::ProfId_ItemsRepeater);
00030
00031     m_viewportManager = std::make_shared<ViewportManagerWithPlatformFeatures>(this);
00032
00033     winrt::AutomationProperties::SetAccessibilityView(*this, winrt::AccessibilityView::Raw);
00034     TabFocusNavigation(winrt::KeyboardNavigationMode::Once);
00035     XYFocusKeyboardNavigation(winrt::XYFocusKeyboardNavigationMode::Enabled);
00036
00037     Loaded({ this, &ItemsRepeater::OnLoaded });
00038     Unloaded({ this, &ItemsRepeater::OnUnloaded });
00039     LayoutUpdated({ this, &ItemsRepeater::OnLayoutUpdated });
00040 }
00041
00042 #pragma region IUIElementOverrides
00043
00044 winrt::AutomationPeer ItemsRepeater::OnCreateAutomationPeer()
00045 {
00046     return winrt::make<RepeaterAutomationPeer>(*this);
00047 }
00048
00049 #pragma endregion
00050
00051 #pragma region IUIElementOverrides7
00052
00053 winrt::IIterable<winrt::DependencyObject> ItemsRepeater::GetChildrenInTabFocusOrder()
00054 {
00055     return CreateChildrenInTabFocusOrderIterable();
00056 }
00057
00058 #pragma endregion
00059
00060 #pragma region IUIElementOverrides8
00061
00062 void ItemsRepeater::OnBringIntoViewRequested(winrt::BringIntoViewRequestedEventArgs const& e)
00063 {
00064     m_viewportManager->OnBringIntoViewRequested(e);
00065 }
00066
00067 #pragma endregion
00068
00069 #pragma region IFrameworkElementOverrides
00070
00071 winrt::Size ItemsRepeater::MeasureOverride(winrt::Size const& availableSize)
00072 {
00073     ITEMSREPEATER_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_DBL_DBL, METH_NAME, this, L"MeasureOverride availableSize:", availableSize.Width, availableSize.Height);
00074
00075     if (m_isLayoutInProgress)
00076     {
00077         throw winrt::hresult_error(E_FAIL, L"Reentrancy detected during layout.");
00078     }
00079
00080     if (IsProcessingCollectionChange())
00081     {
00082         throw winrt::hresult_error(E_FAIL, L"Cannot run layout in the middle of a collection change.");
00083     }
00084
00085     auto layout = GetEffectiveLayout();
00086
00087     if (layout)
00088     {
00089         auto const stackLayout = layout.try_as<winrt::StackLayout>();
00090
00091         if (stackLayout && ++m_stackLayoutMeasureCounter >= s_maxStackLayoutIterations)
00092         {
00093             ITEMSREPEATER_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"MeasureOverride shortcut - m_stackLayoutMeasureCounter:", m_stackLayoutMeasureCounter);
00094             // Shortcut the apparent layout cycle by returning the previous desired size.
00095             // This can occur when children have variable sizes that prevent the ItemsPresenter's desired size from settling.
00096             const winrt::Rect layoutExtent = m_viewportManager->GetLayoutExtent();
00097             const winrt::Size desiredSize{ layoutExtent.Width - layoutExtent.X, layoutExtent.Height - layoutExtent.Y };
00098             return desiredSize;
00099         }
00100     }
00101
00102     m_viewportManager->OnOwnerMeasuring();
00103
00104     m_isLayoutInProgress = true;
00105     auto layoutInProgress = gsl::finally([this]()
00106         {
00107             m_isLayoutInProgress = false;
00108         });
00109
00110     m_viewManager.PrunePinnedElements();
00111     winrt::Rect extent{};
00112     winrt::Size desiredSize{};
00113
00114     if (layout)
00115     {
00116         auto layoutContext = GetLayoutContext();
00117
00118         // Expensive operation, do it only in debug builds.
00119 #ifdef DBG
00120         auto virtualContext = winrt::get_self<VirtualizingLayoutContext>(layoutContext);
00121         virtualContext->Indent(Indent());
00122 #endif
00123
00124         // Checking if we have an data template and it is empty
00125         if (m_isItemTemplateEmpty) {
00126             // Has no content, so we will draw nothing and request zero space
00127             extent = winrt::Rect{ m_layoutOrigin.X, m_layoutOrigin.Y, 0, 0 };
00128         }
00129         else {
00130             desiredSize = layout.Measure(layoutContext, availableSize);
00131             extent = winrt::Rect{ m_layoutOrigin.X, m_layoutOrigin.Y, desiredSize.Width, desiredSize.Height };
00132         }
00133
00134         // Clear auto recycle candidate elements that have not been kept alive by layout - i.e layout did not
00135         // call GetElementAt(index).
00136         auto children = Children();
00137         for (unsigned i = 0u; i < children.Size(); ++i)
00138         {
00139             auto element = children.GetAt(i);
00140             auto virtInfo = GetVirtualizationInfo(element);
00141
00142             if (virtInfo->Owner() == ElementOwner::Layout &&
00143                 virtInfo->AutoRecycleCandidate() &&
00144                 !virtInfo->KeepAlive())
00145             {
00146                 ITEMSREPEATER_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"AutoClear - virtInfo Index:", virtInfo->Index());
00147                 ClearElementImpl(element);
00148             }
00149         }
00150     }
00151
00152     m_viewportManager->SetLayoutExtent(extent);
00153     m_lastAvailableSize = availableSize;
00154     return desiredSize;
00155 }
00156
00157 winrt::Size ItemsRepeater::ArrangeOverride(winrt::Size const& finalSize)
00158 {
00159     ITEMSREPEATER_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR_DBL_DBL, METH_NAME, this, L"ArrangeOverride finalSize:", finalSize.Width, finalSize.Height);
00160
00161     if (m_isLayoutInProgress)
00162     {
00163         throw winrt::hresult_error(E_FAIL, L"Reentrancy detected during layout.");
00164     }
00165
00166     if (IsProcessingCollectionChange())
00167     {
00168         throw winrt::hresult_error(E_FAIL, L"Cannot run layout in the middle of a collection change.");
00169     }
00170
00171     m_isLayoutInProgress = true;
00172     auto layoutInProgress = gsl::finally([this]()
00173         {
00174             m_isLayoutInProgress = false;
00175         });
00176
00177     winrt::Size arrangeSize{};
00178
00179     if (auto layout = GetEffectiveLayout())
00180     {
00181         arrangeSize = layout.Arrange(GetLayoutContext(), finalSize);
00182     }
00183
00184     // The view manager might clear elements during this call.
00185     // That's why we call it before arranging cleared elements
00186     // off screen.
00187     m_viewManager.OnOwnerArranged();
00188
00189     auto children = Children();
00190     for (unsigned i = 0u; i < children.Size(); ++i)
00191     {
00192         auto element = children.GetAt(i);
00193         auto virtInfo = GetVirtualizationInfo(element);
00194         virtInfo->KeepAlive(false);
00195
00196         if (virtInfo->Owner() == ElementOwner::ElementFactory ||
00197             virtInfo->Owner() == ElementOwner::PinnedPool)
00198         {
00199             // Toss it away. And arrange it with size 0 so that XYFocus won't use it.
00200             element.Arrange(winrt::Rect{
00201                 ClearedElementsArrangePosition.X - static_cast<float>(element.DesiredSize().Width),
00202                 ClearedElementsArrangePosition.Y - static_cast<float>(element.DesiredSize().Height),
00203                 0.0f,
00204                 0.0f });
00205         }
00206         else
00207         {
00208             const auto newBounds = CachedVisualTreeHelpers::GetLayoutSlot(element.as<winrt::FrameworkElement>());
00209
00210             if (virtInfo->ArrangeBounds() != ItemsRepeater::InvalidRect &&
00211                 newBounds != virtInfo->ArrangeBounds())
00212             {
00213                 m_transitionManager.OnElementBoundsChanged(element, virtInfo->ArrangeBounds(), newBounds);
00214             }
00215
00216             virtInfo->ArrangeBounds(newBounds);
00217         }
00218     }
00219
00220     m_viewportManager->OnOwnerArranged();
00221     m_transitionManager.OnOwnerArranged();
00222
00223     return arrangeSize;
00224 }
00225
00226 #pragma endregion
00227
00228 #pragma region IRepeater interface.
00229
00230 winrt::ItemsSourceView ItemsRepeater::ItemsSourceView()
00231 {
00232     return m_itemsSourceView.get();
00233 }
00234
00235 int32_t ItemsRepeater::GetElementIndex(winrt::UIElement const& element)
00236 {
00237     return GetElementIndexImpl(element);
00238 }
00239
00240 winrt::UIElement ItemsRepeater::TryGetElement(int index)
00241 {
00242     return GetElementFromIndexImpl(index);
00243 }
00244
00245 void ItemsRepeater::PinElement(winrt::UIElement const& element)
00246 {
00247     m_viewManager.UpdatePin(element, true /* addPin */);
00248 }
00249
00250 void ItemsRepeater::UnpinElement(winrt::UIElement const& element)
00251 {
00252     m_viewManager.UpdatePin(element, false /* addPin */);
00253 }
00254
00255 winrt::UIElement ItemsRepeater::GetOrCreateElement(int index)
00256 {
00257     return GetOrCreateElementImpl(index);
00258 }
00259
00260 #pragma endregion
00261
00262 winrt::UIElement ItemsRepeater::GetElementImpl(int index, bool forceCreate, bool suppressAutoRecycle)
00263 {
00264     auto element = m_viewManager.GetElement(index, forceCreate, suppressAutoRecycle);
00265     return element;
00266 }
00267
00268 void ItemsRepeater::ClearElementImpl(const winrt::UIElement& element)
00269 {
00270     // Clearing an element due to a collection change
00271     // is more strict in that pinned elements will be forcibly
00272     // unpinned and sent back to the view generator.
00273     const bool isClearedDueToCollectionChange =
00274         IsProcessingCollectionChange() &&
00275         (m_processingItemsSourceChange.get().Action() == winrt::NotifyCollectionChangedAction::Remove ||
00276             m_processingItemsSourceChange.get().Action() == winrt::NotifyCollectionChangedAction::Replace ||
00277             m_processingItemsSourceChange.get().Action() == winrt::NotifyCollectionChangedAction::Reset);
00278
00279     m_viewManager.ClearElement(element, isClearedDueToCollectionChange);
00280     m_viewportManager->OnElementCleared(element);
00281 }
00282
00283 int ItemsRepeater::GetElementIndexImpl(const winrt::UIElement& element)
00284 {
00285     // Verify that element is actually a child of this ItemsRepeater
00286     auto const parent = winrt::VisualTreeHelper::GetParent(element);
00287     if (parent == *this)
00288     {
00289         auto virtInfo = TryGetVirtualizationInfo(element);
00290         return m_viewManager.GetElementIndex(virtInfo);
00291     }
00292     return -1;
00293 }
00294
00295 winrt::UIElement ItemsRepeater::GetElementFromIndexImpl(int index)
00296 {
00297     winrt::UIElement result = nullptr;
00298
00299     auto children = Children();
00300     for (unsigned i = 0u; i < children.Size() && !result; ++i)
00301     {
00302         auto element = children.GetAt(i);
00303         auto virtInfo = TryGetVirtualizationInfo(element);
00304         if (virtInfo && virtInfo->IsRealized() && virtInfo->Index() == index)
00305         {
00306             result = element;
00307         }
00308     }
00309
00310     return result;
00311 }
00312
00313 winrt::UIElement ItemsRepeater::GetOrCreateElementImpl(int index)
00314 {
00315     if (ItemsSourceView() == nullptr)
00316     {
00317         throw winrt::hresult_error(E_FAIL, L"ItemsSource doesn't have a value");
00318     }
00319
00320     if (index < 0 || index >= ItemsSourceView().Count())
00321     {
00322         throw winrt::hresult_invalid_argument(L"Argument index is invalid.");
00323     }
00324
00325     if (m_isLayoutInProgress)
00326     {
00327         throw winrt::hresult_error(E_FAIL, L"GetOrCreateElement invocation is not allowed during layout.");
00328     }
00329
00330     auto element = GetElementFromIndexImpl(index);
00331     const bool isAnchorOutsideRealizedRange = !element;
00332
00333     if (isAnchorOutsideRealizedRange)
00334     {
00335         if (!GetEffectiveLayout())
00336         {
00337             throw winrt::hresult_error(E_FAIL, L"Cannot make an Anchor when there is no attached layout.");
00338         }
00339
00340         element = GetLayoutContext().GetOrCreateElementAt(index);
00341         element.Measure({ std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() });
00342     }
00343
00344     m_viewportManager->OnMakeAnchor(element, isAnchorOutsideRealizedRange);
00345     InvalidateMeasure();
00346
00347     return element;
00348 }
00349
00350 /*static*/
00351 winrt::com_ptr<VirtualizationInfo> ItemsRepeater::TryGetVirtualizationInfo(const winrt::UIElement& element)
00352 {
00353     auto value = element.GetValue(GetVirtualizationInfoProperty());
00354     return winrt::get_self<VirtualizationInfo>(value)->get_strong();
00355 }
00356
00357 /*static*/
00358 winrt::com_ptr<VirtualizationInfo> ItemsRepeater::GetVirtualizationInfo(const winrt::UIElement& element)
00359 {
00360     auto result = TryGetVirtualizationInfo(element);
00361
00362     if (!result)
00363     {
00364         result = CreateAndInitializeVirtualizationInfo(element);
00365     }
00366
00367     return result;
00368 }
00369
00370 /* static */
00371 winrt::com_ptr<VirtualizationInfo> ItemsRepeater::CreateAndInitializeVirtualizationInfo(const winrt::UIElement& element)
00372 {
00373     MUX_ASSERT(!TryGetVirtualizationInfo(element));
00374     auto result = winrt::make_self<VirtualizationInfo>();
00375     element.SetValue(GetVirtualizationInfoProperty(), result.as<winrt::IInspectable>());
00376     return result;
00377 }
00378
00379 void ItemsRepeater::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00380 {
00381     winrt::IDependencyProperty property = args.Property();
00382
00383     if (property == s_ItemsSourceProperty)
00384     {
00385         if (args.NewValue() != args.OldValue())
00386         {
00387             auto newValue = args.NewValue();
00388             auto newDataSource = newValue.try_as<winrt::ItemsSourceView>();
00389             if (newValue && !newDataSource)
00390             {
00391                 newDataSource = winrt::ItemsSourceView(newValue);
00392             }
00393
00394             OnDataSourcePropertyChanged(m_itemsSourceView.get(), newDataSource);
00395         }
00396     }
00397     else if (property == s_ItemTemplateProperty)
00398     {
00399         OnItemTemplateChanged(args.OldValue().as<winrt::IElementFactory>(), args.NewValue().as<winrt::IElementFactory>());
00400     }
00401     else if (property == s_LayoutProperty)
00402     {
00403         OnLayoutChanged(args.OldValue().as<winrt::Layout>(), args.NewValue().as<winrt::Layout>());
00404     }
00405     else if (property == s_ItemTransitionProviderProperty)
00406     {
00407         OnTransitionProviderChanged(args.OldValue().as<winrt::ItemCollectionTransitionProvider>(), args.NewValue().as<winrt::ItemCollectionTransitionProvider>());
00408     }
00409     else if (property == s_HorizontalCacheLengthProperty)
00410     {
00411         m_viewportManager->HorizontalCacheLength(unbox_value<double>(args.NewValue()));
00412     }
00413     else if (property == s_VerticalCacheLengthProperty)
00414     {
00415         m_viewportManager->VerticalCacheLength(unbox_value<double>(args.NewValue()));
00416     }
00417 }
00418
00419 void ItemsRepeater::OnElementPrepared(const winrt::UIElement& element, int index)
00420 {
00421     m_viewportManager->OnElementPrepared(element);
00422     if (m_elementPreparedEventSource)
00423     {
00424         if (!m_elementPreparedArgs)
00425         {
00426             m_elementPreparedArgs = tracker_ref<winrt::ItemsRepeaterElementPreparedEventArgs>(this, winrt::make<ItemsRepeaterElementPreparedEventArgs>(element, index));
00427         }
00428         else
00429         {
00430             winrt::get_self<ItemsRepeaterElementPreparedEventArgs>(m_elementPreparedArgs.get())->Update(element, index);
00431         }
00432
00433         m_elementPreparedEventSource(*this, m_elementPreparedArgs.get());
00434     }
00435 }
00436
00437 void ItemsRepeater::OnElementClearing(const winrt::UIElement& element)
00438 {
00439     if (m_elementClearingEventSource)
00440     {
00441         if (!m_elementClearingArgs)
00442         {
00443             m_elementClearingArgs = tracker_ref<winrt::ItemsRepeaterElementClearingEventArgs>(this, winrt::make<ItemsRepeaterElementClearingEventArgs>(element));
00444         }
00445         else
00446         {
00447             winrt::get_self<ItemsRepeaterElementClearingEventArgs>(m_elementClearingArgs.get())->Update(element);
00448         }
00449
00450         m_elementClearingEventSource(*this, m_elementClearingArgs.get());
00451     }
00452 }
00453
00454 void ItemsRepeater::OnElementIndexChanged(const winrt::UIElement& element, int oldIndex, int newIndex)
00455 {
00456     if (m_elementIndexChangedEventSource)
00457     {
00458         if (!m_elementIndexChangedArgs)
00459         {
00460             m_elementIndexChangedArgs = tracker_ref<winrt::ItemsRepeaterElementIndexChangedEventArgs>(this, winrt::make<ItemsRepeaterElementIndexChangedEventArgs>(element, oldIndex, newIndex));
00461         }
00462         else
00463         {
00464             winrt::get_self<ItemsRepeaterElementIndexChangedEventArgs>(m_elementIndexChangedArgs.get())->Update(element, oldIndex, newIndex);
00465         }
00466
00467         m_elementIndexChangedEventSource(*this, m_elementIndexChangedArgs.get());
00468     }
00469 }
00470
00471 // Provides an indentation based on repeater elements in the UI Tree that
00472 // can be used to make logging a little easier to read.
00473 int ItemsRepeater::Indent()
00474 {
00475 #ifdef DBG
00476     // Expensive, so we do it only in debug builds.
00477     auto parent = this->Parent().as<winrt::FrameworkElement>();
00478     while (parent && !parent.try_as<winrt::ItemsRepeater>())
00479     {
00480         parent = parent.Parent().as<winrt::FrameworkElement>();
00481     }
00482
00483     if (parent)
00484     {
00485         auto parentRepeater = winrt::get_self<ItemsRepeater>(parent.as<winrt::ItemsRepeater>());
00486         return parentRepeater->Indent() * 4;
00487     }
00488 #endif
00489
00490     return 4;
00491 }
00492
00493 void ItemsRepeater::OnLoaded(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
00494 {
00495     // If we skipped an unload event, reset the scrollers now and invalidate measure so that we get a new
00496     // layout pass during which we will hookup new scrollers.
00497     // The potential cache buffer is also reset so that the realization window regrows from scratch.
00498     if (_loadedCounter > _unloadedCounter)
00499     {
00500         InvalidateMeasure();
00501         m_viewportManager->ResetScrollers();
00502         m_viewportManager->ResetLayoutRealizationWindowCacheBuffer();
00503     }
00504     ++_loadedCounter;
00505 }
00506
00507 void ItemsRepeater::OnUnloaded(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
00508 {
00509     m_stackLayoutMeasureCounter = 0u;
00510
00511     ++_unloadedCounter;
00512     // Only reset the scrollers if this unload event is in-sync.
00513     // The potential cache buffer is also reset so that the realization window regrows from scratch.
00514     if (_unloadedCounter == _loadedCounter)
00515     {
00516         m_viewportManager->ResetScrollers();
00517         m_viewportManager->ResetLayoutRealizationWindowCacheBuffer();
00518     }
00519 }
00520
00521 void ItemsRepeater::OnLayoutUpdated(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/)
00522 {
00523     // Now that the layout has settled, reset the measure counter to detect the next potential StackLayout layout cycle.
00524     m_stackLayoutMeasureCounter = 0u;
00525
00526     EnsureDefaultLayoutState();
00527 }
00528
00529 void ItemsRepeater::OnDataSourcePropertyChanged(const winrt::ItemsSourceView& oldValue, const winrt::ItemsSourceView& newValue)
00530 {
00531     if (m_isLayoutInProgress)
00532     {
00533         throw winrt::hresult_error(E_FAIL, L"Cannot set ItemsSourceView during layout.");
00534     }
00535
00536     EnsureDefaultLayoutState();
00537
00538     if (m_itemsSourceViewChanged)
00539     {
00540         m_itemsSourceViewChanged.revoke();
00541     }
00542
00543     m_itemsSourceView.set(newValue);
00544
00545     if (newValue)
00546     {
00547         m_itemsSourceViewChanged = newValue.CollectionChanged(winrt::auto_revoke, { this, &ItemsRepeater::OnItemsSourceViewChanged });
00548     }
00549
00550     if (auto const layout = GetEffectiveLayout())
00551     {
00552         auto const args = winrt::NotifyCollectionChangedEventArgs(
00553             winrt::NotifyCollectionChangedAction::Reset,
00554             nullptr /* newItems */,
00555             nullptr /* oldItems */,
00556             -1 /* newIndex */,
00557             -1 /* oldIndex */);
00558         auto const processingChange = gsl::finally([this]()
00559             {
00560                 m_processingItemsSourceChange.set(nullptr);
00561             });
00562         m_processingItemsSourceChange.set(args);
00563
00564         if (auto const virtualLayout = layout.try_as<winrt::VirtualizingLayout>())
00565         {
00566             // After a data source change, reset the potential cache buffer so that the realization window regrows from scratch.
00567             m_viewportManager->ResetLayoutRealizationWindowCacheBuffer();
00568
00569             virtualLayout.OnItemsChangedCore(GetLayoutContext(), newValue, args);
00570         }
00571         else if (auto const nonVirtualLayout = layout.try_as<winrt::NonVirtualizingLayout>())
00572         {
00573             // Walk through all the elements and make sure they are cleared for
00574             // non-virtualizing layouts.
00575             for (const auto& element : Children())
00576             {
00577                 if (GetVirtualizationInfo(element)->IsRealized())
00578                 {
00579                     ClearElementImpl(element);
00580                 }
00581             }
00582
00583             Children().Clear();
00584         }
00585
00586         InvalidateMeasure();
00587     }
00588 }
00589
00590 void ItemsRepeater::OnItemTemplateChanged(const winrt::IElementFactory& oldValue, const winrt::IElementFactory& newValue)
00591 {
00592     if (m_isLayoutInProgress && oldValue)
00593     {
00594         throw winrt::hresult_error(E_FAIL, L"ItemTemplate cannot be changed during layout.");
00595     }
00596
00597     EnsureDefaultLayoutState();
00598
00599     // Since the ItemTemplate has changed, we need to re-evaluate all the items that
00600     // have already been created and are now in the tree. The easiest way to do that
00601     // would be to do a reset.. Note that this has to be done before we change the template
00602     // so that the cleared elements go back into the old template.
00603     if (auto const layout = GetEffectiveLayout())
00604     {
00605         auto const args = winrt::NotifyCollectionChangedEventArgs(
00606             winrt::NotifyCollectionChangedAction::Reset,
00607             nullptr /* newItems */,
00608             nullptr /* oldItems */,
00609             -1 /* newIndex */,
00610             -1 /* oldIndex */);
00611         auto const processingChange = gsl::finally([this]()
00612             {
00613                 m_processingItemsSourceChange.set(nullptr);
00614             });
00615         m_processingItemsSourceChange.set(args);
00616
00617         if (auto const virtualLayout = layout.try_as<winrt::VirtualizingLayout>())
00618         {
00619             virtualLayout.OnItemsChangedCore(GetLayoutContext(), newValue, args);
00620         }
00621         else if (auto const nonVirtualLayout = layout.try_as<winrt::NonVirtualizingLayout>())
00622         {
00623             // Walk through all the elements and make sure they are cleared for
00624             // non-virtualizing layouts.
00625             for (auto const& child : Children())
00626             {
00627                 if (GetVirtualizationInfo(child)->IsRealized())
00628                 {
00629                     ClearElementImpl(child);
00630                 }
00631             }
00632         }
00633     }
00634
00635     // Clear flag for bug #776
00636     m_isItemTemplateEmpty = false;
00637
00638     // DataTemplate and DataTemplateSelector implement IElementFactory so
00639     // the wrapper is likely not required but removing it now has some compat
00640     // implications, so keeping the logic as it is for now. For example, ownership
00641     // of the items is with Repeater today because the wrapper is doing the
00642     // recycling as opposed to the DataTemplate.
00643     if (auto dataTemplate = newValue.try_as<winrt::DataTemplate>())
00644     {
00645         m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(dataTemplate);
00646         if (auto content = dataTemplate.LoadContent().as<winrt::FrameworkElement>())
00647         {
00648             // Due to bug https://github.com/microsoft/microsoft-ui-xaml/issues/3057, we need to get the framework
00649             // to take ownership of the extra implicit ref that was returned by LoadContent. The simplest way to do
00650             // this is to add it to a Children collection and immediately remove it.
00651             auto children = Children();
00652             children.Append(content);
00653             children.RemoveAtEnd();
00654         }
00655         else
00656         {
00657             // We have a DataTemplate which is empty, so we need to set it to true
00658             m_isItemTemplateEmpty = true;
00659         }
00660     }
00661     else if (auto selector = newValue.try_as<winrt::DataTemplateSelector>())
00662     {
00663         m_itemTemplateWrapper = winrt::make<ItemTemplateWrapper>(selector);
00664     }
00665     else if (auto customElementFactory = newValue.try_as<winrt::IElementFactory>())
00666     {
00667         m_itemTemplateWrapper = customElementFactory;
00668     }
00669     else
00670     {
00671         throw winrt::hresult_invalid_argument(L"ItemTemplate");
00672     }
00673
00674     InvalidateMeasure();
00675 }
00676
00677 void ItemsRepeater::OnLayoutChanged(winrt::Layout oldValue, winrt::Layout newValue)
00678 {
00679     bool isInitialSetup = !m_wasLayoutChangedCalled;
00680     m_wasLayoutChangedCalled = true;
00681
00682     if (m_isLayoutInProgress)
00683     {
00684         throw winrt::hresult_error(E_FAIL, L"Layout cannot be changed during layout.");
00685     }
00686
00687     m_viewManager.OnLayoutChanging();
00688     m_transitionManager.OnLayoutChanging();
00689
00690     if(!oldValue && !isInitialSetup)
00691     {
00692         oldValue = GetDefaultLayout();
00693     }
00694     if(!newValue)
00695     {
00696         newValue = GetDefaultLayout();
00697     }
00698
00699     if (oldValue)
00700     {
00701         oldValue.UninitializeForContext(GetLayoutContext());
00702         m_measureInvalidated.revoke();
00703         m_arrangeInvalidated.revoke();
00704         m_stackLayoutMeasureCounter = 0u;
00705
00706         // Walk through all the elements and make sure they are cleared
00707         auto children = Children();
00708         for (unsigned i = 0u; i < children.Size(); ++i)
00709         {
00710             auto element = children.GetAt(i);
00711             if (GetVirtualizationInfo(element)->IsRealized())
00712             {
00713                 ClearElementImpl(element);
00714             }
00715         }
00716
00717         m_layoutState.set(nullptr);
00718     }
00719
00720     if (newValue)
00721     {
00722         newValue.InitializeForContext(GetLayoutContext());
00723         m_measureInvalidated = newValue.MeasureInvalidated(winrt::auto_revoke, { this, &ItemsRepeater::InvalidateMeasureForLayout });
00724         m_arrangeInvalidated = newValue.ArrangeInvalidated(winrt::auto_revoke, { this, &ItemsRepeater::InvalidateArrangeForLayout });
00725
00726         if (m_ownsTransitionProvider)
00727         {
00728             m_transitionManager.OnTransitionProviderChanged(newValue.CreateDefaultItemTransitionProvider());
00729         }
00730     }
00731
00732     bool isVirtualizingLayout = newValue != nullptr && newValue.try_as<winrt::VirtualizingLayout>() != nullptr;
00733     m_viewportManager->OnLayoutChanged(isVirtualizingLayout);
00734     InvalidateMeasure();
00735 }
00736
00737 void ItemsRepeater::OnTransitionProviderChanged(const winrt::ItemCollectionTransitionProvider& /* oldValue */, const winrt::ItemCollectionTransitionProvider& newValue)
00738 {
00739     m_ownsTransitionProvider = false;
00740     m_transitionManager.OnTransitionProviderChanged(newValue);
00741 }
00742
00743 void ItemsRepeater::OnItemsSourceViewChanged(const winrt::IInspectable& sender, const winrt::NotifyCollectionChangedEventArgs& args)
00744 {
00745     if (m_isLayoutInProgress)
00746     {
00747         // Bad things will follow if the data changes while we are in the middle of a layout pass.
00748         throw winrt::hresult_error(E_FAIL, L"Changes in data source are not allowed during layout.");
00749     }
00750
00751     if (IsProcessingCollectionChange())
00752     {
00753         throw winrt::hresult_error(E_FAIL, L"Changes in the data source are not allowed during another change in the data source.");
00754     }
00755
00756     m_processingItemsSourceChange.set(args);
00757     auto processingChange = gsl::finally([this]()
00758         {
00759             m_processingItemsSourceChange.set(nullptr);
00760         });
00761
00762     m_transitionManager.OnItemsSourceChanged(sender, args);
00763     m_viewManager.OnItemsSourceChanged(sender, args);
00764
00765     if (auto layout = GetEffectiveLayout())
00766     {
00767         if (auto virtualLayout = layout.try_as<winrt::VirtualizingLayout>())
00768         {
00769             virtualLayout.OnItemsChangedCore(GetLayoutContext(), sender, args);
00770         }
00771         else
00772         {
00773             // NonVirtualizingLayout
00774             InvalidateMeasure();
00775         }
00776     }
00777 }
00778
00779 void ItemsRepeater::InvalidateMeasureForLayout(winrt::Layout const&, winrt::IInspectable const&)
00780 {
00781     InvalidateMeasure();
00782 }
00783
00784 void ItemsRepeater::InvalidateArrangeForLayout(winrt::Layout const&, winrt::IInspectable const&)
00785 {
00786     InvalidateArrange();
00787 }
00788
00789 void ItemsRepeater::EnsureDefaultLayoutState()
00790 {
00791     if (!m_wasLayoutChangedCalled)
00792     {
00793         // Initialize the cached layout to the default value
00794         // OnLayoutChanged has not been called yet for this ItemsRepeater.
00795         // This is the first call for the default VirtualizingLayout layout after the control's creation.
00796         auto layout = GetEffectiveLayout().as<winrt::VirtualizingLayout>();
00797         OnLayoutChanged(nullptr, layout);
00798     }
00799 }
00800
00801 winrt::VirtualizingLayoutContext ItemsRepeater::GetLayoutContext()
00802 {
00803     if (!m_layoutContext)
00804     {
00805         m_layoutContext.set(winrt::make<RepeaterLayoutContext>(*this));
00806     }
00807     return m_layoutContext.get();
00808 }
00809
00810 winrt::IIterable<winrt::DependencyObject> ItemsRepeater::CreateChildrenInTabFocusOrderIterable()
00811 {
00812     auto children = Children();
00813     if (children.Size() > 0u)
00814     {
00815         return winrt::make<ChildrenInTabFocusOrderIterable>(*this);
00816     }
00817     return nullptr;
00818 }
00819
00820 winrt::Layout ItemsRepeater::GetEffectiveLayout()
00821 {
00822     if(auto layout = Layout())
00823     {
00824         return layout;
00825     }
00826     else
00827     {
00828         return GetDefaultLayout();
00829     }
00830 }
00831
00832 winrt::Layout ItemsRepeater::GetDefaultLayout()
00833 {
00834     // Default to StackLayout if the Layout property was not set.
00835     // We use thread_local here to get a unique instance per thread, since Layout objects
00836     // are not sharable across different xaml threads.
00837     static thread_local winrt::Layout defaultLayout = winrt::StackLayout();
00838     return defaultLayout;
00839 }
00840
00841 #pragma region RepeaterTestHooks methods
00842
00843 /*static*/
00844 int ItemsRepeater::GetLogItemIndex()
00845 {
00846 #ifdef DBG
00847     return s_logItemIndexDbg;
00848 #else
00849     return -1;
00850 #endif
00851 }
00852
00853 /*static*/
00854 void ItemsRepeater::SetLogItemIndex(int logItemIndex)
00855 {
00856 #ifdef DBG
00857     s_logItemIndexDbg = logItemIndex;
00858     VirtualizationInfo::SetLogItemIndex(logItemIndex);
00859 #endif
00860 }
00861
00862 #pragma endregion
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RepeaterTestHooksFactory.h Source File

  • File List
  • File Members
  • Repeater

RepeaterTestHooksFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RepeaterTestHooks.h"
00007
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingControlAutomationPeer Member List

This is the complete list of members for RatingControlAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
CheckThread() | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< RatingControlAutomationPeer > &&self) noexcept | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline, static]
DetermineFractionDigits(double value) | RatingControlAutomationPeer | [private]
DetermineSignificantDigits(double value, int fractionDigits) | RatingControlAutomationPeer | [private]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
final_release(std::unique_ptr< RatingControlAutomationPeer > &&self) | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline, static]
GenerateValue_ValueString(const winrt::hstring &resourceString, double ratingValue) | RatingControlAutomationPeer | [private]
GetAutomationControlTypeCore() | RatingControlAutomationPeer |
GetBase() | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
GetInner() | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
GetLocalizedControlTypeCore() | RatingControlAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | RatingControlAutomationPeer |
GetRatingControl() | RatingControlAutomationPeer | [private]
IsOnThread() | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
IsReadOnly() | RatingControlAutomationPeer |
IValueProvider_Value() | RatingControlAutomationPeer |
LargeChange() | RatingControlAutomationPeer |
Maximum() | RatingControlAutomationPeer |
Minimum() | RatingControlAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
RaisePropertyChangedEvent(double newValue) | RatingControlAutomationPeer |
RatingControlAutomationPeer(winrt::FrameworkElement const &owner) | RatingControlAutomationPeer |
ReferenceTracker(Args &&...args) | ReferenceTracker< RatingControlAutomationPeer, winrt::implementation::RatingControlAutomationPeerT, ValueProviderThunk< RatingControlAutomationPeer >, winrt::IRangeValueProvider > | [inline]
SetValue(hstring const &value) | RatingControlAutomationPeer |
SetValue(double value) | RatingControlAutomationPeer |
SmallChange() | RatingControlAutomationPeer |
Value() | RatingControlAutomationPeer |
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GaussianBlurEffect Member List

This is the complete list of members for GaussianBlurEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1GaussianBlur) | GaussianBlurEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"BlurAmount", D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Optimization", D2D1_GAUSSIANBLUR_PROP_OPTIMIZATION, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BorderMode", D2D1_GAUSSIANBLUR_PROP_BORDER_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | GaussianBlurEffect |
DECLARE_POD_PROPERTY(BlurAmount, float, 3.0f, value >=0.0f &&value<=250.0f) | GaussianBlurEffect |
DECLARE_POD_PROPERTY(Optimization, winrt::EffectOptimization, winrt::EffectOptimization::Balanced, true) | GaussianBlurEffect |
DECLARE_POD_PROPERTY(BorderMode, winrt::EffectBorderMode, winrt::EffectBorderMode::Soft, true) | GaussianBlurEffect |
DECLARE_SINGLE_SOURCE(Source) | GaussianBlurEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | GaussianBlurEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | GaussianBlurEffect | [inline]
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewVisualStateCounts Member List

This is the complete list of members for ScrollViewVisualStateCounts, including all inherited members.
MouseIndicatorStateCount | ScrollViewVisualStateCounts |
NoIndicatorStateCount | ScrollViewVisualStateCounts |
ResetStateCounts() | ScrollViewVisualStateCounts | [inline]
ScrollBarsSeparatorCollapsedDisabledStateCount | ScrollViewVisualStateCounts |
ScrollBarsSeparatorCollapsedStateCount | ScrollViewVisualStateCounts |
ScrollBarsSeparatorCollapsedWithoutAnimationStateCount | ScrollViewVisualStateCounts |
ScrollBarsSeparatorDisplayedWithoutAnimationStateCount | ScrollViewVisualStateCounts |
ScrollBarsSeparatorExpandedStateCount | ScrollViewVisualStateCounts |
ScrollBarsSeparatorExpandedWithoutAnimationStateCount | ScrollViewVisualStateCounts |
TouchIndicatorStateCount | ScrollViewVisualStateCounts |
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItem.properties.h Source File

  • File List
  • File Members
  • Generated

NavigationViewItem.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class NavigationViewItemProperties
00008 {
00009 public:
00010     NavigationViewItemProperties();
00011
00012     void CompactPaneLength(double value);
00013     double CompactPaneLength();
00014
00015     void HasUnrealizedChildren(bool value);
00016     bool HasUnrealizedChildren();
00017
00018     void Icon(winrt::IconElement const& value);
00019     winrt::IconElement Icon();
00020
00021     void InfoBadge(winrt::InfoBadge const& value);
00022     winrt::InfoBadge InfoBadge();
00023
00024     void IsChildSelected(bool value);
00025     bool IsChildSelected();
00026
00027     void IsExpanded(bool value);
00028     bool IsExpanded();
00029
00030     void MenuItems(winrt::IVector<winrt::IInspectable> const& value);
00031     winrt::IVector<winrt::IInspectable> MenuItems();
00032
00033     void MenuItemsSource(winrt::IInspectable const& value);
00034     winrt::IInspectable MenuItemsSource();
00035
00036     void SelectsOnInvoked(bool value);
00037     bool SelectsOnInvoked();
00038
00039     static winrt::DependencyProperty CompactPaneLengthProperty() { return s_CompactPaneLengthProperty; }
00040     static winrt::DependencyProperty HasUnrealizedChildrenProperty() { return s_HasUnrealizedChildrenProperty; }
00041     static winrt::DependencyProperty IconProperty() { return s_IconProperty; }
00042     static winrt::DependencyProperty InfoBadgeProperty() { return s_InfoBadgeProperty; }
00043     static winrt::DependencyProperty IsChildSelectedProperty() { return s_IsChildSelectedProperty; }
00044     static winrt::DependencyProperty IsExpandedProperty() { return s_IsExpandedProperty; }
00045     static winrt::DependencyProperty MenuItemsProperty() { return s_MenuItemsProperty; }
00046     static winrt::DependencyProperty MenuItemsSourceProperty() { return s_MenuItemsSourceProperty; }
00047     static winrt::DependencyProperty SelectsOnInvokedProperty() { return s_SelectsOnInvokedProperty; }
00048
00049     static GlobalDependencyProperty s_CompactPaneLengthProperty;
00050     static GlobalDependencyProperty s_HasUnrealizedChildrenProperty;
00051     static GlobalDependencyProperty s_IconProperty;
00052     static GlobalDependencyProperty s_InfoBadgeProperty;
00053     static GlobalDependencyProperty s_IsChildSelectedProperty;
00054     static GlobalDependencyProperty s_IsExpandedProperty;
00055     static GlobalDependencyProperty s_MenuItemsProperty;
00056     static GlobalDependencyProperty s_MenuItemsSourceProperty;
00057     static GlobalDependencyProperty s_SelectsOnInvokedProperty;
00058
00059     static void EnsureProperties();
00060     static void ClearProperties();
00061
00062     static void OnHasUnrealizedChildrenPropertyChanged(
00063         winrt::DependencyObject const& sender,
00064         winrt::DependencyPropertyChangedEventArgs const& args);
00065
00066     static void OnIconPropertyChanged(
00067         winrt::DependencyObject const& sender,
00068         winrt::DependencyPropertyChangedEventArgs const& args);
00069
00070     static void OnInfoBadgePropertyChanged(
00071         winrt::DependencyObject const& sender,
00072         winrt::DependencyPropertyChangedEventArgs const& args);
00073
00074     static void OnIsExpandedPropertyChanged(
00075         winrt::DependencyObject const& sender,
00076         winrt::DependencyPropertyChangedEventArgs const& args);
00077
00078     static void OnMenuItemsPropertyChanged(
00079         winrt::DependencyObject const& sender,
00080         winrt::DependencyPropertyChangedEventArgs const& args);
00081
00082     static void OnMenuItemsSourcePropertyChanged(
00083         winrt::DependencyObject const& sender,
00084         winrt::DependencyPropertyChangedEventArgs const& args);
00085 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/TestUI/AcrylicMarkupPage.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Acrylic
  • TestUI

AcrylicMarkupPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Composition;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using Microsoft.UI.Xaml.Navigation;
00009 using Microsoft.UI.Private.Media;
00010
00011 namespace MUXControlsTestApp
00012 {
00013     public sealed partial class AcrylicMarkupPage : TestPage
00014     {
00015         AcrylicTestApi _acrylicTestApi;
00016         AcrylicBrush _acrylicBrush;
00017
00018         public AcrylicMarkupPage()
00019         {
00020             this.InitializeComponent();
00021
00022             _acrylicTestApi = new AcrylicTestApi();
00023
00024             MaterialHelperTestApi.IgnoreAreEffectsFast = true;
00025             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00026         }
00027
00028         protected override void OnNavigatedFrom(NavigationEventArgs e)
00029         {
00030             // Unset all override flags to avoid impacting subsequent tests
00031             MaterialHelperTestApi.IgnoreAreEffectsFast = false;
00032             MaterialHelperTestApi.SimulateDisabledByPolicy = false;
00033             base.OnNavigatedFrom(e);
00034         }
00035
00036         private void RunTestButton_Clicked(object sender, RoutedEventArgs e)
00037         {
00038             bool[] results = { false, false};
00039
00040             _acrylicTestApi.AcrylicBrush = AcrylicBrush1;
00041             results[0] = VerifyAcrylic();
00042
00043             _acrylicTestApi.AcrylicBrush = AcrylicBrush3;
00044             _acrylicBrush = AcrylicBrush3;
00045             results[1] = VerifyFallbackColor(); // forced fallback
00046
00047             bool result = results[0] && results[1];
00048             string resultString = System.String.Format("({0},{1})", results[0], results[1]);
00049
00050             TestResult.Text = "AcrylicFromMarkup: " + (result ? "Passed" : ("Failed " + resultString));
00051         }
00052
00053         bool VerifyFallbackColor()
00054         {
00055             bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
00056             var compositionBrush = UpdateCompositionBrush();
00057             return !isUsingAcrylicBrush &&
00058                    (compositionBrush != null && compositionBrush is CompositionColorBrush) &&
00059                    (compositionBrush as CompositionColorBrush).Color.Equals(_acrylicBrush.FallbackColor);
00060         }
00061
00062         bool VerifyAcrylic()
00063         {
00064             bool isUsingAcrylicBrush = UpdateIsUsingAcrylicBrush();
00065             var compositionBrush = UpdateCompositionBrush();
00066             var noiseBrush = UpdateNoiseBrush();
00067             return isUsingAcrylicBrush &&
00068                    (compositionBrush != null && compositionBrush is CompositionEffectBrush) &&
00069                    (noiseBrush != null && noiseBrush is CompositionSurfaceBrush);
00070         }
00071
00072         private CompositionBrush UpdateCompositionBrush()
00073         {
00074             CompositionBrush result = null;
00075             if (_acrylicTestApi.AcrylicBrush != null)
00076             {
00077                 result = _acrylicTestApi.CompositionBrush;
00078
00079                 // ToString() here will log the type of the brush - useful to check whether we are in fallback mode
00080                 CompositionBrushPointer.Text = (result == null) ? "null" : result.ToString();
00081             }
00082             return result;
00083         }
00084
00085         private CompositionBrush UpdateNoiseBrush()
00086         {
00087             CompositionBrush result = null;
00088             if (_acrylicTestApi.AcrylicBrush != null)
00089             {
00090                 result = _acrylicTestApi.NoiseBrush;
00091                 NoiseBrushPointer.Text = (result == null) ? "null" : result.ToString();
00092             }
00093             return result;
00094         }
00095
00096         private bool UpdateIsUsingAcrylicBrush()
00097         {
00098             bool result = _acrylicTestApi.IsUsingAcrylicBrush;
00099             IsUsingAcrylicBrush.Text = result.ToString();
00100             return result;
00101         }
00102
00103     }
00104 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/InteractionTests/TitleBarTests.cs Source File

  • File List
  • File Members
  • TitleBar
  • InteractionTests

TitleBarTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class TitleBarTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("Platform", "Any")]
00029         public static void ClassInitialize(TestContext testContext)
00030         {
00031             TestEnvironment.Initialize(testContext, TestApplicationInfo.MUXExperimentalTestApp);
00032         }
00033
00034         [TestCleanup]
00035         public void TestCleanup()
00036         {
00037             TestEnvironment.AssemblyCleanupWorker(TestApplicationInfo.MUXExperimentalTestApp);
00038         }
00039
00040         // [TestMethod]
00041         public void BasicTest()
00042         {
00043             Log.Comment("TitleBar Basic Test");
00044             using (var setup = new TestSetupHelper("TitleBar Tests"))
00045             {
00046                 Log.Comment("Sample test");
00047             }
00048         }
00049     }
00050 }
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AccessibilityTests Member List

This is the complete list of members for AccessibilityTests, including all inherited members.
CreateLayout(ItemsRepeater repeater) | AccessibilityTests | [inline, private]
CreateRepeater(object dataSource, object elementFactory, VirtualizingLayout layout=null) | AccessibilityTests | [inline, private]
ValidateChildrenPeers() | AccessibilityTests | [inline]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizingStackLayoutSamplePage Member List

This is the complete list of members for VirtualizingStackLayoutSamplePage, including all inherited members.
_lorem | VirtualizingStackLayoutSamplePage | [private]
BringIntoView_Click(object sender, RoutedEventArgs e) | VirtualizingStackLayoutSamplePage | [inline, private]
BringIntoView_Click(object sender, RoutedEventArgs e) | VirtualizingStackLayoutSamplePage | [inline, private]
VirtualizingStackLayoutSamplePage() | VirtualizingStackLayoutSamplePage | [inline]
VirtualizingStackLayoutSamplePage() | VirtualizingStackLayoutSamplePage | [inline]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarCustomPenButton Member List

This is the complete list of members for InkToolBarCustomPenButton, including all inherited members.
ClearProperties() | InkToolBarCustomPenButtonProperties | [static]
ConfigurationContent() | InkToolBarCustomPenButton | [inline]
ConfigurationContent(winrt::UIElement value) | InkToolBarCustomPenButton | [inline]
InkToolBarCustomPenButtonProperties::ConfigurationContent(winrt::UIElement const &value) | InkToolBarCustomPenButtonProperties |
ConfigurationContentProperty() | InkToolBarCustomPenButtonProperties | [inline, static]
CustomPen() | InkToolBarCustomPenButton | [inline]
CustomPen(winrt::InkToolBarCustomPen value) | InkToolBarCustomPenButton | [inline]
InkToolBarCustomPenButtonProperties::CustomPen(winrt::InkToolBarCustomPen const &value) | InkToolBarCustomPenButtonProperties |
CustomPenProperty() | InkToolBarCustomPenButtonProperties | [inline, static]
EnsureProperties() | InkToolBarCustomPenButtonProperties | [static]
InkToolBarCustomPenButtonProperties() | InkToolBarCustomPenButtonProperties |
s_ConfigurationContentProperty | InkToolBarCustomPenButtonProperties | [static]
s_CustomPenProperty | InkToolBarCustomPenButtonProperties | [static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewListAutomationPeer.h Source File

  • File List
  • File Members
  • TreeView

TreeViewListAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TreeViewListAutomationPeer.g.h"
00007
00008 class TreeViewListAutomationPeer :
00009     public ReferenceTracker<
00010         TreeViewListAutomationPeer,
00011         winrt::implementation::TreeViewListAutomationPeerT,
00012         winrt::IDropTargetProvider,
00013         winrt::ISelectionProvider>
00014 {
00015 public:
00016     TreeViewListAutomationPeer(winrt::TreeViewList const& owner);
00017
00018     // IAutomationPeerOverrides
00019     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00020     winrt::AutomationControlType GetAutomationControlTypeCore();
00021
00022     // IItemsControlAutomationPeerOverrides2
00023     winrt::ItemAutomationPeer OnCreateItemAutomationPeer(winrt::IInspectable const& item);
00024
00025     // IDropTargetProvider
00026     winrt::hstring DropEffect();
00027     winrt::com_array<winrt::hstring> DropEffects();
00028
00029     // ISelectionProvider
00030     bool CanSelectMultiple();
00031     bool IsSelectionRequired();
00032     winrt::com_array<winrt::Microsoft::UI::Xaml::Automation::Provider::IRawElementProviderSimple> GetSelection();
00033
00034 private:
00035     bool IsMultiselect();
00036 };
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BorderEffect Member List

This is the complete list of members for BorderEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D1Border) | BorderEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"ExtendX", D2D1_BORDER_PROP_EDGE_MODE_X, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"ExtendY", D2D1_BORDER_PROP_EDGE_MODE_Y, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | BorderEffect |
DECLARE_POD_PROPERTY(ExtendX, winrt::CanvasEdgeBehavior, winrt::CanvasEdgeBehavior::Clamp, true) | BorderEffect |
DECLARE_POD_PROPERTY(ExtendY, winrt::CanvasEdgeBehavior, winrt::CanvasEdgeBehavior::Clamp, true) | BorderEffect |
DECLARE_SINGLE_SOURCE(Source) | BorderEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | BorderEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | BorderEffect | [inline]
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBarAutomationPeer.h Source File

  • File List
  • File Members
  • TitleBar

TitleBarAutomationPeer.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 #include "TitleBar.h"
00003 #include "TitleBarAutomationPeer.g.h"
00004
00005 class TitleBarAutomationPeer :
00006     public ReferenceTracker<TitleBarAutomationPeer, winrt::implementation::TitleBarAutomationPeerT>
00007 {
00008
00009 public:
00010     TitleBarAutomationPeer(winrt::TitleBar const& owner);
00011
00012     // IAutomationPeerOverrides
00013     winrt::AutomationControlType GetAutomationControlTypeCore();
00014     winrt::hstring GetClassNameCore();
00015     winrt::hstring GetNameCore();
00016 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadioButtons/RadioButtonsTestHooks.cpp Source File

  • File List
  • File Members
  • RadioButtons

RadioButtonsTestHooks.cpp

Go to the documentation of this file.
00001 ﻿#include "pch.h"
00002 #include "common.h"
00003 #include "RadioButtonsTestHooks.h"
00004
00005 #include "RadioButtonsTestHooks.properties.cpp"
00006
00007 com_ptr<RadioButtonsTestHooks> RadioButtonsTestHooks::s_testHooks{};
00008
00009 com_ptr<RadioButtonsTestHooks> RadioButtonsTestHooks::EnsureGlobalTestHooks()
00010 {
00011     static bool s_initialized = []() {
00012         s_testHooks = winrt::make_self<RadioButtonsTestHooks>();
00013         return true;
00014     }();
00015     return s_testHooks;
00016 }
00017
00018 void RadioButtonsTestHooks::SetTestHooksEnabled(const winrt::RadioButtons& radioButtons, bool enabled)
00019 {
00020     if (radioButtons)
00021     {
00022         winrt::get_self<RadioButtons>(radioButtons)->SetTestHooksEnabled(enabled);
00023     }
00024 }
00025
00026 void RadioButtonsTestHooks::NotifyLayoutChanged(const winrt::RadioButtons& sender)
00027 {
00028     auto hooks = EnsureGlobalTestHooks();
00029     if (hooks->m_layoutChangedEventSource)
00030     {
00031         hooks->m_layoutChangedEventSource(sender, nullptr);
00032     }
00033 }
00034
00035 winrt::event_token RadioButtonsTestHooks::LayoutChanged(winrt::TypedEventHandler<winrt::RadioButtons, winrt::IInspectable> const& value)
00036 {
00037     auto hooks = EnsureGlobalTestHooks();
00038     return hooks->m_layoutChangedEventSource.add(value);
00039 }
00040
00041 void RadioButtonsTestHooks::LayoutChanged(winrt::event_token const& token)
00042 {
00043     auto hooks = EnsureGlobalTestHooks();
00044     hooks->m_layoutChangedEventSource.remove(token);
00045 }
00046
00047 int RadioButtonsTestHooks::GetRows(const winrt::RadioButtons& radioButtons)
00048 {
00049     if (radioButtons)
00050     {
00051         return winrt::get_self<RadioButtons>(radioButtons)->GetRows();
00052     }
00053     return -1;
00054 }
00055
00056 int RadioButtonsTestHooks::GetColumns(const winrt::RadioButtons& radioButtons)
00057 {
00058     if (radioButtons)
00059     {
00060         return winrt::get_self<RadioButtons>(radioButtons)->GetColumns();
00061     }
00062     return -1;
00063 }
00064
00065 int RadioButtonsTestHooks::GetLargerColumns(const winrt::RadioButtons& radioButtons)
00066 {
00067     if (radioButtons)
00068     {
00069         return winrt::get_self<RadioButtons>(radioButtons)->GetLargerColumns();
00070     }
00071     return -1;
00072 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NamedGroup-g< T > Member List

This is the complete list of members for NamedGroup-g< T >, including all inherited members.
Name | NamedGroup-g< T > |
NamedGroup(string name, IEnumerable< T > collection) | NamedGroup-g< T > | [inline]
Generated on Sun Dec 1 2024 20:53:42 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrushFactory.cpp Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicBrushFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "AcrylicBrushFactory.h"
00007
00008 AcrylicBrushFactory::AcrylicBrushFactory()
00009 {
00010     AcrylicBrush::EnsureProperties();
00011 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarItem.h Source File

  • File List
  • File Members
  • SelectorBar

SelectorBarItem.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008 #include "ItemContainer.h"
00009 #include "SelectorBarItem.g.h"
00010 #include "SelectorBarItem.properties.h"
00011
00012 class SelectorBarItem :
00013     public winrt::implementation::SelectorBarItemT<SelectorBarItem, ItemContainer>,
00014     public SelectorBarItemProperties
00015 {
00016 public:
00017     ForwardRefToBaseReferenceTracker(ItemContainer)
00018
00019     SelectorBarItem();
00020     ~SelectorBarItem();
00021
00022     // IUIElement
00023     winrt::AutomationPeer OnCreateAutomationPeer() override;
00024
00025     // IFrameworkElement
00026     void OnApplyTemplate() override;
00027
00028     void OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00029
00030     // These functions are ambiguous with ItemContainer, disambiguate
00031     using SelectorBarItemProperties::EnsureProperties;
00032     using SelectorBarItemProperties::ClearProperties;
00033
00034 private:
00035 #ifdef DBG
00036     static winrt::hstring DependencyPropertyToString(const winrt::IDependencyProperty& dependencyProperty);
00037 #endif
00038     void UpdatePartsVisibility(bool isForIcon, bool isForText);
00039
00040     tracker_ref<winrt::ContentPresenter> m_iconVisual{ this };
00041     tracker_ref<winrt::TextBlock> m_textVisual{ this };
00042
00043     static constexpr std::wstring_view s_iconVisualPartName{ L"PART_IconVisual"sv };
00044     static constexpr std::wstring_view s_textVisualPartName{ L"PART_TextVisual"sv };
00045 };
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonTestApi.cpp Source File

  • File List
  • File Members
  • SplitButton

SplitButtonTestApi.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SplitButtonTestHelper.h"
00007 #include "SplitButtonTestApi.h"
00008
00009 #include "SplitButtonTestApi.properties.cpp"
00010
00011 bool SplitButtonTestApi::SimulateTouch()
00012 {
00013     return SplitButtonTestHelper::SimulateTouch();
00014 }
00015
00016 void SplitButtonTestApi::SimulateTouch(bool value)
00017 {
00018     SplitButtonTestHelper::SimulateTouch(value);
00019 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MapControl/TestUI/MapControlApiKey.cs Source File

  • File List
  • File Members
  • MapControl
  • TestUI

MapControlApiKey.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012 using Windows.Devices.Geolocation;
00013 using System.Collections.Generic;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     public static class MapControlApiKey
00018     {
00019         public const string AzureMapsToken = "<AzureMapsToken>";
00020     }
00021 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealScenarios Member List

This is the complete list of members for RevealScenarios, including all inherited members.
ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | RevealScenarios | [inline, private]
listSource | RevealScenarios | [private]
RevealList_SelectionChanged(object sender, SelectionChangedEventArgs e) | RevealScenarios | [inline, private]
RevealScenarios() | RevealScenarios | [inline]
themeSource | RevealScenarios | [private]
ToggleSwitch_Toggled(object sender, RoutedEventArgs e) | RevealScenarios | [inline, private]
Generated on Sun Dec 1 2024 20:54:26 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterWithSimpleScrollControllersPage Member List

This is the complete list of members for ScrollPresenterWithSimpleScrollControllersPage, including all inherited members.
BtnClearLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
BtnResetHorizontalScrollController_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
BtnResetVerticalScrollController_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
BtnSetHorizontalScrollController_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
BtnSetVerticalScrollController_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
canvasScrollControllerConsumer | ScrollPresenterWithSimpleScrollControllersPage | [private]
ChkLog_Checked(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
ChkLog_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
CmbIScrollControllerConsumer_SelectionChanged(object sender, SelectionChangedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
horizontalScrollController | ScrollPresenterWithSimpleScrollControllersPage | [private]
LogMessage(string message) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
ScrollPresenterWithSimpleScrollControllersPage() | ScrollPresenterWithSimpleScrollControllersPage | [inline]
ScrollPresenterWithSimpleScrollControllersPageOnLoaded(object sender, RoutedEventArgs e) | ScrollPresenterWithSimpleScrollControllersPage | [inline, private]
verticalScrollController | ScrollPresenterWithSimpleScrollControllersPage | [private]
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

InfoBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InfoBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InfoBar)
00012 }
00013
00014 #include "InfoBar.g.cpp"
00015
00016 GlobalDependencyProperty InfoBarProperties::s_ActionButtonProperty{ nullptr };
00017 GlobalDependencyProperty InfoBarProperties::s_CloseButtonCommandProperty{ nullptr };
00018 GlobalDependencyProperty InfoBarProperties::s_CloseButtonCommandParameterProperty{ nullptr };
00019 GlobalDependencyProperty InfoBarProperties::s_CloseButtonStyleProperty{ nullptr };
00020 GlobalDependencyProperty InfoBarProperties::s_ContentProperty{ nullptr };
00021 GlobalDependencyProperty InfoBarProperties::s_ContentTemplateProperty{ nullptr };
00022 GlobalDependencyProperty InfoBarProperties::s_IconSourceProperty{ nullptr };
00023 GlobalDependencyProperty InfoBarProperties::s_IsClosableProperty{ nullptr };
00024 GlobalDependencyProperty InfoBarProperties::s_IsIconVisibleProperty{ nullptr };
00025 GlobalDependencyProperty InfoBarProperties::s_IsOpenProperty{ nullptr };
00026 GlobalDependencyProperty InfoBarProperties::s_MessageProperty{ nullptr };
00027 GlobalDependencyProperty InfoBarProperties::s_SeverityProperty{ nullptr };
00028 GlobalDependencyProperty InfoBarProperties::s_TemplateSettingsProperty{ nullptr };
00029 GlobalDependencyProperty InfoBarProperties::s_TitleProperty{ nullptr };
00030
00031 InfoBarProperties::InfoBarProperties()
00032     : m_closeButtonClickEventSource{static_cast<InfoBar*>(this)}
00033     , m_closedEventSource{static_cast<InfoBar*>(this)}
00034     , m_closingEventSource{static_cast<InfoBar*>(this)}
00035 {
00036     EnsureProperties();
00037 }
00038
00039 void InfoBarProperties::EnsureProperties()
00040 {
00041     if (!s_ActionButtonProperty)
00042     {
00043         s_ActionButtonProperty =
00044             InitializeDependencyProperty(
00045                 L"ActionButton",
00046                 winrt::name_of<winrt::ButtonBase>(),
00047                 winrt::name_of<winrt::InfoBar>(),
00048                 false /* isAttached */,
00049                 ValueHelper<winrt::ButtonBase>::BoxedDefaultValue(),
00050                 winrt::PropertyChangedCallback(&OnActionButtonPropertyChanged));
00051     }
00052     if (!s_CloseButtonCommandProperty)
00053     {
00054         s_CloseButtonCommandProperty =
00055             InitializeDependencyProperty(
00056                 L"CloseButtonCommand",
00057                 winrt::name_of<winrt::ICommand>(),
00058                 winrt::name_of<winrt::InfoBar>(),
00059                 false /* isAttached */,
00060                 ValueHelper<winrt::ICommand>::BoxedDefaultValue(),
00061                 nullptr);
00062     }
00063     if (!s_CloseButtonCommandParameterProperty)
00064     {
00065         s_CloseButtonCommandParameterProperty =
00066             InitializeDependencyProperty(
00067                 L"CloseButtonCommandParameter",
00068                 winrt::name_of<winrt::IInspectable>(),
00069                 winrt::name_of<winrt::InfoBar>(),
00070                 false /* isAttached */,
00071                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00072                 nullptr);
00073     }
00074     if (!s_CloseButtonStyleProperty)
00075     {
00076         s_CloseButtonStyleProperty =
00077             InitializeDependencyProperty(
00078                 L"CloseButtonStyle",
00079                 winrt::name_of<winrt::Style>(),
00080                 winrt::name_of<winrt::InfoBar>(),
00081                 false /* isAttached */,
00082                 ValueHelper<winrt::Style>::BoxedDefaultValue(),
00083                 nullptr);
00084     }
00085     if (!s_ContentProperty)
00086     {
00087         s_ContentProperty =
00088             InitializeDependencyProperty(
00089                 L"Content",
00090                 winrt::name_of<winrt::IInspectable>(),
00091                 winrt::name_of<winrt::InfoBar>(),
00092                 false /* isAttached */,
00093                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00094                 nullptr);
00095     }
00096     if (!s_ContentTemplateProperty)
00097     {
00098         s_ContentTemplateProperty =
00099             InitializeDependencyProperty(
00100                 L"ContentTemplate",
00101                 winrt::name_of<winrt::DataTemplate>(),
00102                 winrt::name_of<winrt::InfoBar>(),
00103                 false /* isAttached */,
00104                 ValueHelper<winrt::DataTemplate>::BoxedDefaultValue(),
00105                 nullptr);
00106     }
00107     if (!s_IconSourceProperty)
00108     {
00109         s_IconSourceProperty =
00110             InitializeDependencyProperty(
00111                 L"IconSource",
00112                 winrt::name_of<winrt::IconSource>(),
00113                 winrt::name_of<winrt::InfoBar>(),
00114                 false /* isAttached */,
00115                 ValueHelper<winrt::IconSource>::BoxedDefaultValue(),
00116                 winrt::PropertyChangedCallback(&OnIconSourcePropertyChanged));
00117     }
00118     if (!s_IsClosableProperty)
00119     {
00120         s_IsClosableProperty =
00121             InitializeDependencyProperty(
00122                 L"IsClosable",
00123                 winrt::name_of<bool>(),
00124                 winrt::name_of<winrt::InfoBar>(),
00125                 false /* isAttached */,
00126                 ValueHelper<bool>::BoxValueIfNecessary(true),
00127                 winrt::PropertyChangedCallback(&OnIsClosablePropertyChanged));
00128     }
00129     if (!s_IsIconVisibleProperty)
00130     {
00131         s_IsIconVisibleProperty =
00132             InitializeDependencyProperty(
00133                 L"IsIconVisible",
00134                 winrt::name_of<bool>(),
00135                 winrt::name_of<winrt::InfoBar>(),
00136                 false /* isAttached */,
00137                 ValueHelper<bool>::BoxValueIfNecessary(true),
00138                 winrt::PropertyChangedCallback(&OnIsIconVisiblePropertyChanged));
00139     }
00140     if (!s_IsOpenProperty)
00141     {
00142         s_IsOpenProperty =
00143             InitializeDependencyProperty(
00144                 L"IsOpen",
00145                 winrt::name_of<bool>(),
00146                 winrt::name_of<winrt::InfoBar>(),
00147                 false /* isAttached */,
00148                 ValueHelper<bool>::BoxValueIfNecessary(false),
00149                 winrt::PropertyChangedCallback(&OnIsOpenPropertyChanged));
00150     }
00151     if (!s_MessageProperty)
00152     {
00153         s_MessageProperty =
00154             InitializeDependencyProperty(
00155                 L"Message",
00156                 winrt::name_of<winrt::hstring>(),
00157                 winrt::name_of<winrt::InfoBar>(),
00158                 false /* isAttached */,
00159                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00160                 winrt::PropertyChangedCallback(&OnMessagePropertyChanged));
00161     }
00162     if (!s_SeverityProperty)
00163     {
00164         s_SeverityProperty =
00165             InitializeDependencyProperty(
00166                 L"Severity",
00167                 winrt::name_of<winrt::InfoBarSeverity>(),
00168                 winrt::name_of<winrt::InfoBar>(),
00169                 false /* isAttached */,
00170                 ValueHelper<winrt::InfoBarSeverity>::BoxValueIfNecessary(winrt::InfoBarSeverity::Informational),
00171                 winrt::PropertyChangedCallback(&OnSeverityPropertyChanged));
00172     }
00173     if (!s_TemplateSettingsProperty)
00174     {
00175         s_TemplateSettingsProperty =
00176             InitializeDependencyProperty(
00177                 L"TemplateSettings",
00178                 winrt::name_of<winrt::InfoBarTemplateSettings>(),
00179                 winrt::name_of<winrt::InfoBar>(),
00180                 false /* isAttached */,
00181                 ValueHelper<winrt::InfoBarTemplateSettings>::BoxedDefaultValue(),
00182                 nullptr);
00183     }
00184     if (!s_TitleProperty)
00185     {
00186         s_TitleProperty =
00187             InitializeDependencyProperty(
00188                 L"Title",
00189                 winrt::name_of<winrt::hstring>(),
00190                 winrt::name_of<winrt::InfoBar>(),
00191                 false /* isAttached */,
00192                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00193                 winrt::PropertyChangedCallback(&OnTitlePropertyChanged));
00194     }
00195 }
00196
00197 void InfoBarProperties::ClearProperties()
00198 {
00199     s_ActionButtonProperty = nullptr;
00200     s_CloseButtonCommandProperty = nullptr;
00201     s_CloseButtonCommandParameterProperty = nullptr;
00202     s_CloseButtonStyleProperty = nullptr;
00203     s_ContentProperty = nullptr;
00204     s_ContentTemplateProperty = nullptr;
00205     s_IconSourceProperty = nullptr;
00206     s_IsClosableProperty = nullptr;
00207     s_IsIconVisibleProperty = nullptr;
00208     s_IsOpenProperty = nullptr;
00209     s_MessageProperty = nullptr;
00210     s_SeverityProperty = nullptr;
00211     s_TemplateSettingsProperty = nullptr;
00212     s_TitleProperty = nullptr;
00213 }
00214
00215 void InfoBarProperties::OnActionButtonPropertyChanged(
00216     winrt::DependencyObject const& sender,
00217     winrt::DependencyPropertyChangedEventArgs const& args)
00218 {
00219     auto owner = sender.as<winrt::InfoBar>();
00220     winrt::get_self<InfoBar>(owner)->OnActionButtonPropertyChanged(args);
00221 }
00222
00223 void InfoBarProperties::OnIconSourcePropertyChanged(
00224     winrt::DependencyObject const& sender,
00225     winrt::DependencyPropertyChangedEventArgs const& args)
00226 {
00227     auto owner = sender.as<winrt::InfoBar>();
00228     winrt::get_self<InfoBar>(owner)->OnIconSourcePropertyChanged(args);
00229 }
00230
00231 void InfoBarProperties::OnIsClosablePropertyChanged(
00232     winrt::DependencyObject const& sender,
00233     winrt::DependencyPropertyChangedEventArgs const& args)
00234 {
00235     auto owner = sender.as<winrt::InfoBar>();
00236     winrt::get_self<InfoBar>(owner)->OnIsClosablePropertyChanged(args);
00237 }
00238
00239 void InfoBarProperties::OnIsIconVisiblePropertyChanged(
00240     winrt::DependencyObject const& sender,
00241     winrt::DependencyPropertyChangedEventArgs const& args)
00242 {
00243     auto owner = sender.as<winrt::InfoBar>();
00244     winrt::get_self<InfoBar>(owner)->OnIsIconVisiblePropertyChanged(args);
00245 }
00246
00247 void InfoBarProperties::OnIsOpenPropertyChanged(
00248     winrt::DependencyObject const& sender,
00249     winrt::DependencyPropertyChangedEventArgs const& args)
00250 {
00251     auto owner = sender.as<winrt::InfoBar>();
00252     winrt::get_self<InfoBar>(owner)->OnIsOpenPropertyChanged(args);
00253 }
00254
00255 void InfoBarProperties::OnMessagePropertyChanged(
00256     winrt::DependencyObject const& sender,
00257     winrt::DependencyPropertyChangedEventArgs const& args)
00258 {
00259     auto owner = sender.as<winrt::InfoBar>();
00260     winrt::get_self<InfoBar>(owner)->OnMessagePropertyChanged(args);
00261 }
00262
00263 void InfoBarProperties::OnSeverityPropertyChanged(
00264     winrt::DependencyObject const& sender,
00265     winrt::DependencyPropertyChangedEventArgs const& args)
00266 {
00267     auto owner = sender.as<winrt::InfoBar>();
00268     winrt::get_self<InfoBar>(owner)->OnSeverityPropertyChanged(args);
00269 }
00270
00271 void InfoBarProperties::OnTitlePropertyChanged(
00272     winrt::DependencyObject const& sender,
00273     winrt::DependencyPropertyChangedEventArgs const& args)
00274 {
00275     auto owner = sender.as<winrt::InfoBar>();
00276     winrt::get_self<InfoBar>(owner)->OnTitlePropertyChanged(args);
00277 }
00278
00279 void InfoBarProperties::ActionButton(winrt::ButtonBase const& value)
00280 {
00281     [[gsl::suppress(con)]]
00282     {
00283     static_cast<InfoBar*>(this)->SetValue(s_ActionButtonProperty, ValueHelper<winrt::ButtonBase>::BoxValueIfNecessary(value));
00284     }
00285 }
00286
00287 winrt::ButtonBase InfoBarProperties::ActionButton()
00288 {
00289     return ValueHelper<winrt::ButtonBase>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_ActionButtonProperty));
00290 }
00291
00292 void InfoBarProperties::CloseButtonCommand(winrt::ICommand const& value)
00293 {
00294     [[gsl::suppress(con)]]
00295     {
00296     static_cast<InfoBar*>(this)->SetValue(s_CloseButtonCommandProperty, ValueHelper<winrt::ICommand>::BoxValueIfNecessary(value));
00297     }
00298 }
00299
00300 winrt::ICommand InfoBarProperties::CloseButtonCommand()
00301 {
00302     return ValueHelper<winrt::ICommand>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_CloseButtonCommandProperty));
00303 }
00304
00305 void InfoBarProperties::CloseButtonCommandParameter(winrt::IInspectable const& value)
00306 {
00307     [[gsl::suppress(con)]]
00308     {
00309     static_cast<InfoBar*>(this)->SetValue(s_CloseButtonCommandParameterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00310     }
00311 }
00312
00313 winrt::IInspectable InfoBarProperties::CloseButtonCommandParameter()
00314 {
00315     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_CloseButtonCommandParameterProperty));
00316 }
00317
00318 void InfoBarProperties::CloseButtonStyle(winrt::Style const& value)
00319 {
00320     [[gsl::suppress(con)]]
00321     {
00322     static_cast<InfoBar*>(this)->SetValue(s_CloseButtonStyleProperty, ValueHelper<winrt::Style>::BoxValueIfNecessary(value));
00323     }
00324 }
00325
00326 winrt::Style InfoBarProperties::CloseButtonStyle()
00327 {
00328     return ValueHelper<winrt::Style>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_CloseButtonStyleProperty));
00329 }
00330
00331 void InfoBarProperties::Content(winrt::IInspectable const& value)
00332 {
00333     [[gsl::suppress(con)]]
00334     {
00335     static_cast<InfoBar*>(this)->SetValue(s_ContentProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00336     }
00337 }
00338
00339 winrt::IInspectable InfoBarProperties::Content()
00340 {
00341     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_ContentProperty));
00342 }
00343
00344 void InfoBarProperties::ContentTemplate(winrt::DataTemplate const& value)
00345 {
00346     [[gsl::suppress(con)]]
00347     {
00348     static_cast<InfoBar*>(this)->SetValue(s_ContentTemplateProperty, ValueHelper<winrt::DataTemplate>::BoxValueIfNecessary(value));
00349     }
00350 }
00351
00352 winrt::DataTemplate InfoBarProperties::ContentTemplate()
00353 {
00354     return ValueHelper<winrt::DataTemplate>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_ContentTemplateProperty));
00355 }
00356
00357 void InfoBarProperties::IconSource(winrt::IconSource const& value)
00358 {
00359     [[gsl::suppress(con)]]
00360     {
00361     static_cast<InfoBar*>(this)->SetValue(s_IconSourceProperty, ValueHelper<winrt::IconSource>::BoxValueIfNecessary(value));
00362     }
00363 }
00364
00365 winrt::IconSource InfoBarProperties::IconSource()
00366 {
00367     return ValueHelper<winrt::IconSource>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_IconSourceProperty));
00368 }
00369
00370 void InfoBarProperties::IsClosable(bool value)
00371 {
00372     [[gsl::suppress(con)]]
00373     {
00374     static_cast<InfoBar*>(this)->SetValue(s_IsClosableProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00375     }
00376 }
00377
00378 bool InfoBarProperties::IsClosable()
00379 {
00380     return ValueHelper<bool>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_IsClosableProperty));
00381 }
00382
00383 void InfoBarProperties::IsIconVisible(bool value)
00384 {
00385     [[gsl::suppress(con)]]
00386     {
00387     static_cast<InfoBar*>(this)->SetValue(s_IsIconVisibleProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00388     }
00389 }
00390
00391 bool InfoBarProperties::IsIconVisible()
00392 {
00393     return ValueHelper<bool>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_IsIconVisibleProperty));
00394 }
00395
00396 void InfoBarProperties::IsOpen(bool value)
00397 {
00398     [[gsl::suppress(con)]]
00399     {
00400     static_cast<InfoBar*>(this)->SetValue(s_IsOpenProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00401     }
00402 }
00403
00404 bool InfoBarProperties::IsOpen()
00405 {
00406     return ValueHelper<bool>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_IsOpenProperty));
00407 }
00408
00409 void InfoBarProperties::Message(winrt::hstring const& value)
00410 {
00411     [[gsl::suppress(con)]]
00412     {
00413     static_cast<InfoBar*>(this)->SetValue(s_MessageProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00414     }
00415 }
00416
00417 winrt::hstring InfoBarProperties::Message()
00418 {
00419     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_MessageProperty));
00420 }
00421
00422 void InfoBarProperties::Severity(winrt::InfoBarSeverity const& value)
00423 {
00424     [[gsl::suppress(con)]]
00425     {
00426     static_cast<InfoBar*>(this)->SetValue(s_SeverityProperty, ValueHelper<winrt::InfoBarSeverity>::BoxValueIfNecessary(value));
00427     }
00428 }
00429
00430 winrt::InfoBarSeverity InfoBarProperties::Severity()
00431 {
00432     return ValueHelper<winrt::InfoBarSeverity>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_SeverityProperty));
00433 }
00434
00435 void InfoBarProperties::TemplateSettings(winrt::InfoBarTemplateSettings const& value)
00436 {
00437     [[gsl::suppress(con)]]
00438     {
00439     static_cast<InfoBar*>(this)->SetValue(s_TemplateSettingsProperty, ValueHelper<winrt::InfoBarTemplateSettings>::BoxValueIfNecessary(value));
00440     }
00441 }
00442
00443 winrt::InfoBarTemplateSettings InfoBarProperties::TemplateSettings()
00444 {
00445     return ValueHelper<winrt::InfoBarTemplateSettings>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_TemplateSettingsProperty));
00446 }
00447
00448 void InfoBarProperties::Title(winrt::hstring const& value)
00449 {
00450     [[gsl::suppress(con)]]
00451     {
00452     static_cast<InfoBar*>(this)->SetValue(s_TitleProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00453     }
00454 }
00455
00456 winrt::hstring InfoBarProperties::Title()
00457 {
00458     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<InfoBar*>(this)->GetValue(s_TitleProperty));
00459 }
00460
00461 winrt::event_token InfoBarProperties::CloseButtonClick(winrt::TypedEventHandler<winrt::InfoBar, winrt::IInspectable> const& value)
00462 {
00463     return m_closeButtonClickEventSource.add(value);
00464 }
00465
00466 void InfoBarProperties::CloseButtonClick(winrt::event_token const& token)
00467 {
00468     m_closeButtonClickEventSource.remove(token);
00469 }
00470
00471 winrt::event_token InfoBarProperties::Closed(winrt::TypedEventHandler<winrt::InfoBar, winrt::InfoBarClosedEventArgs> const& value)
00472 {
00473     return m_closedEventSource.add(value);
00474 }
00475
00476 void InfoBarProperties::Closed(winrt::event_token const& token)
00477 {
00478     m_closedEventSource.remove(token);
00479 }
00480
00481 winrt::event_token InfoBarProperties::Closing(winrt::TypedEventHandler<winrt::InfoBar, winrt::InfoBarClosingEventArgs> const& value)
00482 {
00483     return m_closingEventSource.add(value);
00484 }
00485
00486 void InfoBarProperties::Closing(winrt::event_token const& token)
00487 {
00488     m_closingEventSource.remove(token);
00489 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarCustomToggleButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarCustomToggleButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarCustomToggleButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InkToolBarCustomToggleButton)
00012 }
00013
00014 #include "InkToolBarCustomToggleButton.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarMenuButton.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBarMenuButton.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBarMenuButton.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBarMenuButton)
00012 }
00013
00014 #include "InkToolBarMenuButton.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarMenuButtonProperties::s_IsExtensionGlyphShownProperty{ nullptr };
00017 GlobalDependencyProperty InkToolBarMenuButtonProperties::s_MenuKindProperty{ nullptr };
00018
00019 InkToolBarMenuButtonProperties::InkToolBarMenuButtonProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void InkToolBarMenuButtonProperties::EnsureProperties()
00025 {
00026     if (!s_IsExtensionGlyphShownProperty)
00027     {
00028         s_IsExtensionGlyphShownProperty =
00029             InitializeDependencyProperty(
00030                 L"IsExtensionGlyphShown",
00031                 winrt::name_of<bool>(),
00032                 winrt::name_of<winrt::InkToolBarMenuButton>(),
00033                 false /* isAttached */,
00034                 ValueHelper<bool>::BoxedDefaultValue(),
00035                 nullptr);
00036     }
00037     if (!s_MenuKindProperty)
00038     {
00039         s_MenuKindProperty =
00040             InitializeDependencyProperty(
00041                 L"MenuKind",
00042                 winrt::name_of<winrt::InkToolBarMenuKind>(),
00043                 winrt::name_of<winrt::InkToolBarMenuButton>(),
00044                 false /* isAttached */,
00045                 ValueHelper<winrt::InkToolBarMenuKind>::BoxedDefaultValue(),
00046                 nullptr);
00047     }
00048 }
00049
00050 void InkToolBarMenuButtonProperties::ClearProperties()
00051 {
00052     s_IsExtensionGlyphShownProperty = nullptr;
00053     s_MenuKindProperty = nullptr;
00054 }
00055
00056 void InkToolBarMenuButtonProperties::IsExtensionGlyphShown(bool value)
00057 {
00058     [[gsl::suppress(con)]]
00059     {
00060     static_cast<InkToolBarMenuButton*>(this)->SetValue(s_IsExtensionGlyphShownProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00061     }
00062 }
00063
00064 bool InkToolBarMenuButtonProperties::IsExtensionGlyphShown()
00065 {
00066     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBarMenuButton*>(this)->GetValue(s_IsExtensionGlyphShownProperty));
00067 }
00068
00069 void InkToolBarMenuButtonProperties::MenuKind(winrt::InkToolBarMenuKind const& value)
00070 {
00071     [[gsl::suppress(con)]]
00072     {
00073     static_cast<InkToolBarMenuButton*>(this)->SetValue(s_MenuKindProperty, ValueHelper<winrt::InkToolBarMenuKind>::BoxValueIfNecessary(value));
00074     }
00075 }
00076
00077 winrt::InkToolBarMenuKind InkToolBarMenuButtonProperties::MenuKind()
00078 {
00079     return ValueHelper<winrt::InkToolBarMenuKind>::CastOrUnbox(static_cast<InkToolBarMenuButton*>(this)->GetValue(s_MenuKindProperty));
00080 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollingScrollCompletedEventArgs.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollingScrollCompletedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenter.h"
00007 #include "ScrollingScrollCompletedEventArgs.g.h"
00008
00009 class ScrollingScrollCompletedEventArgs :
00010     public winrt::implementation::ScrollingScrollCompletedEventArgsT<ScrollingScrollCompletedEventArgs>
00011 {
00012 public:
00013     ScrollingScrollCompletedEventArgs()
00014     {
00015         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00016     }
00017
00018     ~ScrollingScrollCompletedEventArgs()
00019     {
00020         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00021     }
00022
00023     // IScrollingScrollCompletedEventArgs overrides
00024     int32_t CorrelationId();
00025     ScrollPresenterViewChangeResult Result();
00026
00027     void OffsetsChangeCorrelationId(int32_t offsetsChangeCorrelationId);
00028     void Result(ScrollPresenterViewChangeResult result);
00029
00030 private:
00031     int32_t m_offsetsChangeCorrelationId{ -1 };
00032     ScrollPresenterViewChangeResult m_result{ ScrollPresenterViewChangeResult::Completed };
00033 };
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TitleBar/TitleBarTemplateSettings.h Source File

  • File List
  • File Members
  • TitleBar

TitleBarTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "TitleBarTemplateSettings.g.h"
00007 #include "TitleBarTemplateSettings.properties.h"
00008
00009 class TitleBarTemplateSettings :
00010     public winrt::implementation::TitleBarTemplateSettingsT<TitleBarTemplateSettings>,
00011     public TitleBarTemplateSettingsProperties
00012 {
00013 public:
00014     TitleBarTemplateSettings();
00015 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PersonPicture/TestUI/PersonPicturePage.xaml.cs Source File

  • File List
  • File Members
  • PersonPicture
  • TestUI

PersonPicturePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.ObjectModel;
00006 using System.Reflection;
00007 using Windows.ApplicationModel.Contacts;
00008 using Windows.Storage;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Automation;
00011 using Microsoft.UI.Xaml.Automation.Peers;
00012 using Microsoft.UI.Xaml.Controls;
00013 using Microsoft.UI.Xaml.Data;
00014 using Microsoft.UI.Xaml.Media;
00015 using Microsoft.UI.Xaml.Media.Imaging;
00016 using Microsoft.UI.Xaml.Shapes;
00017 using MUXControlsTestApp.Utilities;
00018
00019 namespace MUXControlsTestApp
00020 {
00021     [TopLevelTestPage(Name="PersonPicture", Icon="PersonPicture.png")]
00022     public sealed partial class PersonPicturePage : TestPage
00023     {
00024         private Uri imageUri = new Uri(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Assets", "ingredient2.png"));
00025         private bool primaryEllipseLoaded = false;
00026
00027         public PersonPicturePage()
00028         {
00029             this.InitializeComponent();
00030             this.TestPersonPicture.Loaded += PersonPicture_Loaded;
00031             this.TestPersonPicture.LayoutUpdated += PersonPicture_LayoutUpdated;
00032         }
00033
00034         private void PersonPicture_LayoutUpdated(object sender, object e)
00035         {
00036             // Register items that are delay loaded
00037             if (!primaryEllipseLoaded)
00038             {
00039                 string primaryEllipseName = "PersonPictureEllipse";
00040                 Ellipse primaryEllipse = FindVisualChildByName(this.TestPersonPicture, primaryEllipseName) as Ellipse;
00041                 if (primaryEllipse != null)
00042                 {
00043                     // Capture initial state of the property
00044                     PrimaryEllipseFillChanged(primaryEllipse, Ellipse.FillProperty);
00045
00046                     primaryEllipse.RegisterPropertyChangedCallback(Ellipse.FillProperty, new DependencyPropertyChangedCallback(PrimaryEllipseFillChanged));
00047                     primaryEllipseLoaded = true;
00048                 }
00049             }
00050         }
00051
00052         private void PersonPicture_Loaded(object sender, RoutedEventArgs e)
00053         {
00054             string InitialTextBlockName = "InitialsTextBlock";
00055             TextBlock initialTextBlock = FindVisualChildByName(this.TestPersonPicture, InitialTextBlockName) as TextBlock;
00056             if (initialTextBlock != null)
00057             {
00058                 AutomationProperties.SetName(initialTextBlock, InitialTextBlockName);
00059                 AutomationProperties.SetAccessibilityView(initialTextBlock, AccessibilityView.Content);
00060             }
00061
00062             string badgeTextBlockName = "BadgeNumberTextBlock";
00063             TextBlock badgeTextBlock = FindVisualChildByName(this.TestPersonPicture, badgeTextBlockName) as TextBlock;
00064             if (badgeTextBlock != null)
00065             {
00066                 AutomationProperties.SetName(badgeTextBlock, badgeTextBlockName);
00067                 AutomationProperties.SetAccessibilityView(badgeTextBlock, AccessibilityView.Content);
00068             }
00069
00070             string badgeGlyphIconName = "BadgeGlyphIcon";
00071             FontIcon badgeFontIcon = FindVisualChildByName(this.TestPersonPicture, badgeGlyphIconName) as FontIcon;
00072             if (badgeFontIcon != null)
00073             {
00074                 AutomationProperties.SetName(badgeFontIcon, badgeGlyphIconName);
00075                 AutomationProperties.SetAccessibilityView(badgeFontIcon, AccessibilityView.Content);
00076             }
00077
00078             string badgeEllipseName = "BadgingEllipse";
00079             Ellipse badgeEllipse = FindVisualChildByName(this.TestPersonPicture, badgeEllipseName) as Ellipse;
00080             if (badgeEllipse != null)
00081             {
00082                 AutomationProperties.SetName(badgeEllipse, badgeEllipseName);
00083                 AutomationProperties.SetAccessibilityView(badgeEllipse, AccessibilityView.Content);
00084             }
00085
00086             CollectionViewSource cvs = rootGrid.FindName("cvs") as CollectionViewSource;
00087             cvs.Source = GetGroupedPeople();
00088             cvs.IsSourceGrouped = true;
00089         }
00090
00091         private void FindAndGiveAutomationNameToVisualChild(string childName)
00092         {
00093             DependencyObject obj = FindVisualChildByName(this.TestPersonPicture, childName);
00094
00095             if (obj != null)
00096             {
00097                 AutomationProperties.SetName(obj, childName);
00098             }
00099         }
00100
00101         private void PrimaryEllipseFillChanged(DependencyObject o, DependencyProperty p)
00102         {
00103             if (((Ellipse)o).Fill != null)
00104             {
00105                 BgEllipseFilled.IsChecked = true;
00106             }
00107             else
00108             {
00109                 BgEllipseFilled.IsChecked = false;
00110             }
00111         }
00112
00113         private void BadgeNumberTextBox_TextChanged(object sender, RoutedEventArgs e)
00114         {
00115             int result = 0;
00116             int.TryParse(BadgeNumberTextBox.Text, out result);
00117             TestPersonPicture.BadgeNumber = result;
00118         }
00119
00120         private void BadgeGlyphTextBox_TextChanged(object sender, TextChangedEventArgs e)
00121         {
00122             TestPersonPicture.BadgeGlyph = BadgeGlyphTextBox.Text;
00123         }
00124
00125         private void InitialTextBox_TextChanged(object sender, TextChangedEventArgs e)
00126         {
00127             TestPersonPicture.Initials = InitialTextBox.Text;
00128         }
00129
00130         private void GroupCheckBox_Checked(object sender, RoutedEventArgs e)
00131         {
00132             TestPersonPicture.IsGroup = true;
00133         }
00134
00135         private void GroupCheckBox_Unchecked(object sender, RoutedEventArgs e)
00136         {
00137             TestPersonPicture.IsGroup = false;
00138         }
00139
00140         private void DisplayNameTextBox_TextChanged(object sender, TextChangedEventArgs e)
00141         {
00142             TestPersonPicture.DisplayName = DisplayNameTextBox.Text;
00143         }
00144
00145         private void ContactBtn_Click(object sender, RoutedEventArgs e)
00146         {
00147             Contact contact = new Contact();
00148             contact.FirstName = "Test";
00149             contact.LastName = "Contact";
00150
00151             TestPersonPicture.Contact = contact;
00152         }
00153
00154         private async void ContactImageBtn_Click(object sender, RoutedEventArgs e)
00155         {
00156             Contact contact = new Contact();
00157             contact.SourceDisplayPicture = await StorageFile.GetFileFromPathAsync(imageUri.ToString());
00158
00159             TestPersonPicture.Contact = contact;
00160         }
00161
00162         private void ClearContactBtn_Click(object sender, RoutedEventArgs e)
00163         {
00164             TestPersonPicture.Contact = null;
00165         }
00166
00167         private void ImageBtn_Click(object sender, RoutedEventArgs e)
00168         {
00169             TestPersonPicture.ProfilePicture = new BitmapImage(imageUri);
00170         }
00171
00172         private void ClearImageBtn_Click(object sender, RoutedEventArgs e)
00173         {
00174             TestPersonPicture.ProfilePicture = null;
00175         }
00176
00177         private void TestPersonPicture_SizeChanged(object sender, SizeChangedEventArgs e)
00178         {
00179             if (Math.Round(TestPersonPicture.Width) == Math.Round(TestPersonPicture.Height))
00180             {
00181                 DimensionsMatch.IsChecked = true;
00182             }
00183             else
00184             {
00185                 DimensionsMatch.IsChecked = false;
00186             }
00187         }
00188
00189         private static ObservableCollection<SportsGroup> GetGroupedPeople()
00190         {
00191             ObservableCollection<SportsGroup> groupedPeople = new ObservableCollection<SportsGroup>();
00192
00193             for (int i = 0; i< 4; ++i)
00194             {
00195                 SportsGroup group = null;
00196
00197                 switch (i)
00198                 {
00199                 case 0:
00200                     group = new SportsGroup("Tennis");
00201
00202                     group.Add(new SportsPerson(1, "RF", "Roger Federer"));
00203                     group.Add(new SportsPerson(2, "RN", "Rafael Nadal"));
00204                     group.Add(new SportsPerson(3, "ND", "Novak Djokovic"));
00205                     group.Add(new SportsPerson(4, "AM", "Andy Murray"));
00206                     group.Add(new SportsPerson(5, "GD", "Grigor Dimitrov"));
00207                     break;
00208
00209                 case 1:
00210                     group = new SportsGroup("Soccer");
00211
00212                     group.Add(new SportsPerson(6, "CR", "Cristiano Ronaldo"));
00213                     group.Add(new SportsPerson(7, "LM", "Lionel Messi"));
00214                     group.Add(new SportsPerson(8, "N", "Neymar"));
00215                     group.Add(new SportsPerson(9, "AI", "Andres Iniesta"));
00216                     group.Add(new SportsPerson(10, "GB", "Gareth Bale"));
00217                     group.Add(new SportsPerson(11, "X", "Xavi"));
00218                     group.Add(new SportsPerson(12, "JR", "James Rodriguez"));
00219                     group.Add(new SportsPerson(13, "R", "Ronaldinho"));
00220                     group.Add(new SportsPerson(14, "AR", "Arjen Robben"));
00221                     break;
00222
00223                 case 2:
00224                     group = new SportsGroup("Basketball");
00225
00226                     group.Add(new SportsPerson(15, "AI", "Allen Iverson"));
00227                     group.Add(new SportsPerson(16, "DW", "Dwayne Wade"));
00228                     group.Add(new SportsPerson(17, "LJ", "LeBron James"));
00229                     group.Add(new SportsPerson(18, "KD", "Kevin Durant"));
00230                     group.Add(new SportsPerson(19, "KB", "Kobe Bryant"));
00231                     break;
00232
00233                 case 3:
00234                     group = new SportsGroup("Formula 1");
00235
00236                     group.Add(new SportsPerson(20, "AP", "Alain Prost"));
00237                     group.Add(new SportsPerson(21, "AS", "Ayrton Senna"));
00238                     group.Add(new SportsPerson(22, "MS", "Michael Schumacher"));
00239                     group.Add(new SportsPerson(23, "NL", "Niki Lauda"));
00240                     group.Add(new SportsPerson(24, "SV", "Sebastian Vettel"));
00241                     break;
00242                 }
00243
00244                 groupedPeople.Add(group);
00245             }
00246
00247             return groupedPeople;
00248         }
00249
00250         public class SportsPerson
00251         {
00252             public SportsPerson(int badgeNumber, string initials, string displayName)
00253             {
00254                 BadgeNumber = badgeNumber;
00255                 Initials = initials;
00256                 DisplayName = displayName;
00257             }
00258
00259             public int BadgeNumber { get; set; }
00260             public string Initials { get; set; }
00261             public string DisplayName { get; set; }
00262         }
00263
00264         public class SportsGroup : ObservableCollection<SportsPerson>
00265         {
00266             public SportsGroup(string name)
00267             {
00268                 Name = name;
00269             }
00270
00271             public string Name { get; set; }
00272         }
00273     }
00274 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler Member List

This is the complete list of members for ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, including all inherited members.
abi_enter() | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
CheckThread() | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler > &&self) noexcept | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
final_release(std::unique_ptr< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler > &&self) | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline, static]
getAnimatedPropertyName() | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler | [private]
GetBase() | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
GetInner() | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
InteractionTrackerAnimation(const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider, const winrt::InteractionTracker &interactionTracker) | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler |
IsOnThread() | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
IsOrientationVertical() | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler | [private]
m_refreshPullDirection | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ScrollViewerIRefreshInfoProviderDefaultAnimationHandler, reference_tracker_implements_t< winrt::IAdapterAnimationHandler >::type > | [inline]
RefreshCompletedAnimation(const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider) | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler |
RefreshCompletedBatchCompleted(const winrt::IInspectable &sender, const winrt::CompositionBatchCompletedEventArgs &args) | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler | [private]
RefreshRequestedAnimation(const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider, double executionRatio) | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler |
ScrollViewerIRefreshInfoProviderDefaultAnimationHandler(const winrt::UIElement &container, const winrt::RefreshPullDirection &refreshPullDirection) | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler |
ValidateAndStoreParameters(const winrt::UIElement &refreshVisualizer, const winrt::UIElement &infoProvider, const winrt::InteractionTracker &interactionTracker) | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler | [private]
~ScrollViewerIRefreshInfoProviderDefaultAnimationHandler() | ScrollViewerIRefreshInfoProviderDefaultAnimationHandler |
Generated on Sun Dec 1 2024 20:53:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Breadcrumb/BreadcrumbBar.idl Source File

  • File List
  • File Members
  • Breadcrumb

BreadcrumbBar.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003 [MUX_PUBLIC]
00004 [default_interface]
00005 [webhosthidden]
00006 runtimeclass BreadcrumbBarItemClickedEventArgs
00007 {
00008     Int32 Index { get; };
00009     Object Item { get; };
00010 }
00011
00012 [MUX_PUBLIC]
00013 [webhosthidden]
00014 unsealed runtimeclass BreadcrumbBarItem : Microsoft.UI.Xaml.Controls.ContentControl
00015 {
00016     BreadcrumbBarItem();
00017 }
00018
00019 [MUX_PUBLIC]
00020 [webhosthidden]
00021 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00022 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00023 unsealed runtimeclass BreadcrumbBar : Microsoft.UI.Xaml.Controls.Control
00024 {
00025     BreadcrumbBar();
00026
00027     Object ItemsSource{ get; set; };
00028     Object ItemTemplate{ get; set; };
00029
00030     event Windows.Foundation.TypedEventHandler<BreadcrumbBar, BreadcrumbBarItemClickedEventArgs> ItemClicked;
00031
00032     static Microsoft.UI.Xaml.DependencyProperty ItemsSourceProperty{ get; };
00033     static Microsoft.UI.Xaml.DependencyProperty ItemTemplateProperty{ get; };
00034 }
00035
00036 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/NonVirtualStackLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

NonVirtualStackLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Windows.Foundation;
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Controls;
00008
00009 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00010 {
00011     public class NonVirtualStackLayout : NonVirtualizingLayout
00012     {
00013         protected override Size MeasureOverride(NonVirtualizingLayoutContext context, Size availableSize)
00014         {
00015             double extentHeight = 0.0;
00016             double extentWidth = 0.0;
00017             foreach (var element in context.Children)
00018             {
00019                 element.Measure(availableSize);
00020                 extentHeight += element.DesiredSize.Height;
00021                 extentWidth = Math.Max(extentWidth, element.DesiredSize.Width);
00022             }
00023
00024             return new Size(extentWidth, extentHeight);
00025         }
00026
00027         protected override Size ArrangeOverride(NonVirtualizingLayoutContext context, Size finalSize)
00028         {
00029             double offset = 0.0;
00030             foreach (var element in context.Children)
00031             {
00032                 element.Arrange(new Rect(0, offset, element.DesiredSize.Width, element.DesiredSize.Height));
00033                 offset += element.DesiredSize.Height;
00034             }
00035
00036             return finalSize;
00037         }
00038     }
00039 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/VirtualizingUniformCarouselStackLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

VirtualizingUniformCarouselStackLayout.cs

Go to the documentation of this file.
00001 ﻿using Microsoft.UI.Xaml.Controls;
00002 using System;
00003 using System.Diagnostics;
00004 using Windows.Foundation;
00005
00006 namespace Flick
00007 {
00008     public class VirtualizingUniformCarouselStackLayout : VirtualizingLayout
00009     {
00010         public double ItemWidth { get; set; }
00011         public double ItemHeight { get; set; }
00012         public double Spacing { get; set; }
00013
00014         // Number of times to repeat the count to give the
00015         // illusion of infinite scrolling.
00016         public int RepeatCount { get; private set; } = 500;
00017
00018         public bool Repeat { get; set; } = false;
00019
00020         protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
00021         {
00022             var realizationRect = context.RealizationRect;
00023             int itemCount = context.ItemCount;
00024
00025             if (realizationRect.Width == 0 || realizationRect.Width < itemCount * (ItemWidth + Spacing)) // TODO: Better math
00026             {
00027                 int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
00028                 int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
00029                 Debug.WriteLine("Measure:" + realizationRect.ToString());
00030
00031                 // Viewport + Buffer Rect.
00032                 for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
00033                 {
00034                     var realIndex = Math.Abs(currentIndex % context.ItemCount);
00035                     var element = context.GetOrCreateElementAt(realIndex);
00036                     element.Measure(new Size(ItemWidth, ItemHeight));
00037                 }
00038
00039                 return new Size(((ItemWidth + Spacing) * context.ItemCount * 1000) - Spacing, ItemHeight);
00040             }
00041             else
00042             {
00043                 for(int i=0; i< itemCount; i++)
00044                 {
00045                     var element = context.GetOrCreateElementAt(i);
00046                     element.Measure(new Size(ItemWidth, ItemHeight));
00047                 }
00048
00049                 return new Size((ItemWidth + Spacing) * context.ItemCount - Spacing, ItemHeight);
00050             }
00051         }
00052
00053         protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize)
00054         {
00055             var realizationRect = context.RealizationRect;
00056             int itemCount = context.ItemCount;
00057
00058             if (realizationRect.Width < itemCount * (ItemWidth + Spacing)) // TODO: Better math
00059             {
00060                 int firstRealizedIndex = FirstRealizedIndexInRect(realizationRect, itemCount);
00061                 int lastRealizedIndex = LastRealizedIndexInRect(realizationRect, itemCount);
00062                 Debug.WriteLine("Arrange:" + realizationRect.ToString());
00063
00064                 // Viewport + Buffer Rect.
00065                 for (int currentIndex = firstRealizedIndex; currentIndex <= lastRealizedIndex; currentIndex++)
00066                 {
00067                     var realIndex = Math.Abs(currentIndex % context.ItemCount);
00068                     var element = context.GetOrCreateElementAt(realIndex);
00069                     var arrangeRect = new Rect(currentIndex * (ItemWidth + Spacing), 0, ItemWidth, ItemHeight);
00070                     element.Arrange(arrangeRect);
00071                     Debug.WriteLine("   Arrange:" + currentIndex + " :" + arrangeRect);
00072                 }
00073             }
00074             else
00075             {
00076                 for (int i = 0; i < itemCount; i++)
00077                 {
00078                     var element = context.GetOrCreateElementAt(i);
00079                     var arrangeRect = new Rect(i * (ItemWidth + Spacing), 0, ItemWidth, ItemHeight);
00080                     element.Arrange(arrangeRect);
00081                     Debug.WriteLine("   Arrange:" + i + " :" + arrangeRect);
00082                 }
00083             }
00084
00085             return finalSize;
00086         }
00087
00088         #region Private Helper Methods
00089
00090         private int FirstRealizedIndexInRect(Rect realizationRect, int itemCount)
00091         {
00092             return (int)(realizationRect.X / (ItemWidth + Spacing));
00093         }
00094
00095         private int LastRealizedIndexInRect(Rect realizationRect, int itemCount)
00096         {
00097             int index = (int)(realizationRect.Right / (ItemWidth + Spacing));
00098             return index;
00099         }
00100
00101         #endregion Private Methods
00102     }
00103 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItem.properties.h Source File

  • File List
  • File Members
  • Generated

TabViewItem.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TabViewItemProperties
00008 {
00009 public:
00010     TabViewItemProperties();
00011
00012     void Header(winrt::IInspectable const& value);
00013     winrt::IInspectable Header();
00014
00015     void HeaderTemplate(winrt::DataTemplate const& value);
00016     winrt::DataTemplate HeaderTemplate();
00017
00018     void IconSource(winrt::IconSource const& value);
00019     winrt::IconSource IconSource();
00020
00021     void IsClosable(bool value);
00022     bool IsClosable();
00023
00024     void TabViewTemplateSettings(winrt::TabViewItemTemplateSettings const& value);
00025     winrt::TabViewItemTemplateSettings TabViewTemplateSettings();
00026
00027     static winrt::DependencyProperty HeaderProperty() { return s_HeaderProperty; }
00028     static winrt::DependencyProperty HeaderTemplateProperty() { return s_HeaderTemplateProperty; }
00029     static winrt::DependencyProperty IconSourceProperty() { return s_IconSourceProperty; }
00030     static winrt::DependencyProperty IsClosableProperty() { return s_IsClosableProperty; }
00031     static winrt::DependencyProperty TabViewTemplateSettingsProperty() { return s_TabViewTemplateSettingsProperty; }
00032
00033     static GlobalDependencyProperty s_HeaderProperty;
00034     static GlobalDependencyProperty s_HeaderTemplateProperty;
00035     static GlobalDependencyProperty s_IconSourceProperty;
00036     static GlobalDependencyProperty s_IsClosableProperty;
00037     static GlobalDependencyProperty s_TabViewTemplateSettingsProperty;
00038
00039     winrt::event_token CloseRequested(winrt::TypedEventHandler<winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs> const& value);
00040     void CloseRequested(winrt::event_token const& token);
00041
00042     event_source<winrt::TypedEventHandler<winrt::TabViewItem, winrt::TabViewTabCloseRequestedEventArgs>> m_closeRequestedEventSource;
00043
00044     static void EnsureProperties();
00045     static void ClearProperties();
00046
00047     static void OnHeaderPropertyChanged(
00048         winrt::DependencyObject const& sender,
00049         winrt::DependencyPropertyChangedEventArgs const& args);
00050
00051     static void OnIconSourcePropertyChanged(
00052         winrt::DependencyObject const& sender,
00053         winrt::DependencyPropertyChangedEventArgs const& args);
00054
00055     static void OnIsClosablePropertyChanged(
00056         winrt::DependencyObject const& sender,
00057         winrt::DependencyPropertyChangedEventArgs const& args);
00058 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipTests Member List

This is the complete list of members for TeachingTipTests, including all inherited members.
AutomationNameIsForwardedToPopup() | TeachingTipTests | [inline]
AutoPlacement() | TeachingTipTests | [inline]
CanSwitchShouldConstrainToRootBounds() | TeachingTipTests | [inline]
ClassInitialize(TestContext testContext) | TeachingTipTests | [inline, static]
ClearTeachingTipDebugMessages() | TeachingTipTests | [inline, private]
CloseOpenAndCloseWithJustKeyboardViaF6() | TeachingTipTests | [inline, private]
CloseReasonIsAccurate() | TeachingTipTests | [inline]
CloseTeachingTipByLightDismiss(bool useEscKey) | TeachingTipTests | [inline, private]
CloseTeachingTipProgrammatically() | TeachingTipTests | [inline, private]
defaultAnimatedViewChangeTimeout | TeachingTipTests | [private]
elements | TeachingTipTests | [private]
EnableLightDismiss(bool enable) | TeachingTipTests | [inline, private]
F6PutsFocusOnCloseButton() | TeachingTipTests | [inline]
GetEffectivePlacement() | TeachingTipTests | [inline, private]
GetScrollViewerVerticalOffset() | TeachingTipTests | [inline, private]
GetTargetBounds() | TeachingTipTests | [inline, private]
GetTeachingTipDebugMessage(int index) | TeachingTipTests | [inline, private]
GetTipVerticalOffset() | TeachingTipTests | [inline, private]
NoIconDoesNotCrash() | TeachingTipTests | [inline]
OpenTeachingTip() | TeachingTipTests | [inline, private]
PressTipCloseButton() | TeachingTipTests | [inline, private]
PressXCloseButton() | TeachingTipTests | [inline, private]
PreviousTargetUnloadingLeavesTeachingTipOpen() | TeachingTipTests | [inline]
ScrollBy(double ammount) | TeachingTipTests | [inline, private]
ScrollTargetIntoView() | TeachingTipTests | [inline, private]
SetActionButtonContentTo(string option) | TeachingTipTests | [inline, private]
SetAutomationName(AutomationNameOptions automationName) | TeachingTipTests | [inline, private]
SetCloseButtonContent(CloseButtonContentOptions closeButtonContent) | TeachingTipTests | [inline, private]
SetHeroContent(HeroContentOptions heroContent) | TeachingTipTests | [inline, private]
SetIcon(IconOptions icon) | TeachingTipTests | [inline, private]
SetPreferredPlacement(PlacementOptions placement) | TeachingTipTests | [inline, private]
SetReturnTopForOutOfWindowPlacement(bool returnTopForOutOfWindowPlacement) | TeachingTipTests | [inline, private]
SetShouldConstrainToRootBounds(bool constrain) | TeachingTipTests | [inline, private]
SetSubtitle(SubtitleContentOptions subtitle) | TeachingTipTests | [inline, private]
SetTeachingTipLocation(TipLocationOptions location) | TeachingTipTests | [inline, private]
SettingTitleOrSubtitleToEmptyStringCollapsesTextBox() | TeachingTipTests | [inline]
SetTipFollowsTarget(bool tipFollowsTarget) | TeachingTipTests | [inline, private]
SetTipIsTargeted(bool targeted) | TeachingTipTests | [inline, private]
SetTitle(TitleContentOptions title) | TeachingTipTests | [inline, private]
SpecifiedPlacement() | TeachingTipTests | [inline]
SpecifiedPlacementRTL() | TeachingTipTests | [inline]
TargetUnloadingClosesTeachingTip() | TeachingTipTests | [inline]
TeachingTipRemovalClosesPopup() | TeachingTipTests | [inline]
TestAutoPlacementForWindowOrScreenBounds(Vector4 targetRect, bool forWindowBounds) | TeachingTipTests | [inline, private]
TestAutoPlacementForWindowOrScreenBounds(Vector4 targetRect, bool forWindowBounds, string valueOverride) | TeachingTipTests | [inline, private]
TestCleanup() | TeachingTipTests | [inline]
TestContext | TeachingTipTests |
TestTeachingTipInXamlPage() | TeachingTipTests | [inline]
TipCanFollowTarget() | TeachingTipTests | [inline]
TipFollowsTargetOnWindowResize() | TeachingTipTests | [inline]
TipsWhichDoNotFitDoNotOpen() | TeachingTipTests | [inline]
UseF6ToReturnToTestPageToCloseTip() | TeachingTipTests | [inline, private]
UseTestBounds(double x, double y, double width, double height, Vector4 targetRect, bool forWindowBounds) | TeachingTipTests | [inline, private]
UseTestScreenBounds(double x, double y, double width, double height) | TeachingTipTests | [inline, private]
UseTestWindowBounds(double x, double y, double width, double height) | TeachingTipTests | [inline, private]
VerifyPlacement(String placement) | TeachingTipTests | [inline, private]
VerifyTeachingTipButtonsNameAutomationProperty() | TeachingTipTests | [inline]
VerifyTeachingTipGetsFocus() | TeachingTipTests | [inline]
VerifyTeachingTipNotIncludedInTabOrder() | TeachingTipTests | [inline]
VerifyTeachingTipTargetChange() | TeachingTipTests | [inline]
VerifyTheming() | TeachingTipTests | [inline]
WaitForCheckBoxUpdated(CheckBox checkBox, ToggleState state, double millisecondsTimeout, bool throwOnError) | TeachingTipTests | [inline, private]
WaitForChecked(CheckBox checkBox, double millisecondsTimeout=2000, bool throwOnError=true) | TeachingTipTests | [inline, private]
WaitForOffsetToSettle(Edit text, double millisecondsTimeout, bool failOnError) | TeachingTipTests | [inline, private]
WaitForOffsetUpdated(double expectedValue, double millisecondsTimeout=defaultAnimatedViewChangeTimeout, bool failOnError=true) | TeachingTipTests | [inline, private]
WaitForTipClosed() | TeachingTipTests | [inline, private]
WaitForTipOpened() | TeachingTipTests | [inline, private]
WaitForUnchecked(CheckBox checkBox, double millisecondsTimeout=2000, bool throwOnError=true) | TeachingTipTests | [inline, private]
Generated on Sun Dec 1 2024 20:53:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadialGradientBrushPage Member List

This is the complete list of members for RadialGradientBrushPage, including all inherited members.
_random | RadialGradientBrushPage | [private]
AddGradientStopButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
AddRandomGradientStop(RadialGradientBrush gradientBrush) | RadialGradientBrushPage | [inline, private]
DynamicGradientBrush | RadialGradientBrushPage |
DynamicGradientBrushInterpolationSpace | RadialGradientBrushPage |
DynamicGradientBrushSpreadMethod | RadialGradientBrushPage |
GenerateRenderTargetBitmapButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
GetColorSpaceValueNames() | RadialGradientBrushPage | [inline]
GetPixelAtPoint(Point p, RenderTargetBitmap rtb, byte[] pixelArray) | RadialGradientBrushPage | [inline, private]
GetSpreadMethodValueNames() | RadialGradientBrushPage | [inline]
RadialGradientBrushPage() | RadialGradientBrushPage | [inline]
RandomizeCenter(RadialGradientBrush gradientBrush) | RadialGradientBrushPage | [inline, private]
RandomizeCenterButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
RandomizeGradientOrigin(RadialGradientBrush gradientBrush) | RadialGradientBrushPage | [inline, private]
RandomizeGradientOriginButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
RandomizeRadius(RadialGradientBrush gradientBrush) | RadialGradientBrushPage | [inline, private]
RandomizeRadiusButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
RemoveGradientStopButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
RemoveRandomGradientStop(RadialGradientBrush gradientBrush) | RadialGradientBrushPage | [inline, private]
ReplaceGradientButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
ToggleMappingMode(RadialGradientBrush gradientBrush) | RadialGradientBrushPage | [inline, private]
ToggleMappingModeButton_Click(object sender, RoutedEventArgs e) | RadialGradientBrushPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTearOutTests Member List

This is the complete list of members for TabViewTearOutTests, including all inherited members.
_tabCondition | TabViewTearOutTests | [private, static]
_tabViewCondition | TabViewTearOutTests | [private, static]
_tabViewTearOutApp | TabViewTearOutTests | [private, static]
_windowCondition | TabViewTearOutTests | [private, static]
CanReorderTabs() | TabViewTearOutTests | [inline]
CanSelectTabs() | TabViewTearOutTests | [inline]
CanTearOutAndRejoinTabs() | TabViewTearOutTests | [inline]
ClassCleanup() | TabViewTearOutTests | [inline, static]
ClassInitialize(TestContext testContext) | TabViewTearOutTests | [inline, static]
GetTabsFromTabView(Tab tabView) | TabViewTearOutTests | [inline, private, static]
GetTabViewFromWindow(Window window) | TabViewTearOutTests | [inline, private, static]
GetTabViewTearOutAppWindows() | TabViewTearOutTests | [inline, private, static]
TabViewTearOutApp | TabViewTearOutTests | [static]
TestCleanup() | TabViewTearOutTests | [inline, static]
Generated on Sun Dec 1 2024 20:53:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBar.cpp Source File

  • File List
  • File Members
  • SelectorBar

SelectorBar.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SelectorBar.h"
00007 #include "SelectorBarItem.h"
00008 #include "SelectorBarTestHooks.h"
00009 #include "SelectorBarSelectionChangedEventArgs.h"
00010 #include "RuntimeProfiler.h"
00011 #include "SharedHelpers.h"
00012 #include "Vector.h"
00013
00014 // Change to 'true' to turn on debugging outputs in Output window
00015 bool SelectorBarTrace::s_IsDebugOutputEnabled{ false };
00016 bool SelectorBarTrace::s_IsVerboseDebugOutputEnabled{ false };
00017
00018 SelectorBar::SelectorBar()
00019 {
00020     SELECTORBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00021
00022     __RP_Marker_ClassById(RuntimeProfiler::ProfId_SelectorBar);
00023
00024     EnsureProperties();
00025     SetDefaultStyleKey(this);
00026
00027     auto items = winrt::make<ObservableVector<winrt::SelectorBarItem>>();
00028     SetValue(s_ItemsProperty, items);
00029
00030     m_loadedRevoker = Loaded(winrt::auto_revoke, { this, &SelectorBar::OnLoaded });
00031 }
00032
00033 SelectorBar::~SelectorBar()
00034 {
00035     SELECTORBAR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00036 }
00037
00038 // Invoked by SelectorBarTestHooks
00039 winrt::ItemsView SelectorBar::GetItemsViewPart() const
00040 {
00041     return m_itemsView.get();
00042 }
00043
00044 void SelectorBar::OnApplyTemplate()
00045 {
00046     SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00047
00048     m_itemsViewSelectedItemPropertyChangedRevoker.revoke();
00049
00050     __super::OnApplyTemplate();
00051
00052     winrt::IControlProtected controlProtected{ *this };
00053
00054     m_itemsView.set(GetTemplateChildT<winrt::ItemsView>(s_itemsViewPartName, controlProtected));
00055
00056     if (const auto& itemsView = m_itemsView.get())
00057     {
00058         m_itemsViewSelectedItemPropertyChangedRevoker = RegisterPropertyChanged(itemsView, winrt::ItemsView::SelectedItemProperty(), { this, &SelectorBar::OnItemsViewSelectedItemPropertyChanged });
00059
00060         if (auto scrollView = itemsView.ScrollView())
00061         {
00062             // Allow the items to scroll horizontally if the SelectorBar is sized too small horizontally (the default
00063             // ScrollView ContentOrientation is Vertical for vertical scrolling which is not useful for the SelectorBar).
00064             scrollView.ContentOrientation(winrt::ScrollingContentOrientation::Horizontal);
00065         }
00066     }
00067
00068     if (SelectedItem() != nullptr)
00069     {
00070         ValidateSelectedItem();
00071         UpdateItemsViewSelectionFromSelectedItem();
00072     }
00073 }
00074
00075 void SelectorBar::OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
00076 {
00077     const auto dependencyProperty = args.Property();
00078
00079     if (dependencyProperty == s_SelectedItemProperty)
00080     {
00081         SELECTORBAR_TRACE_INFO_DBG(*this, TRACE_MSG_METH_STR, METH_NAME, this, "SelectedItem property changed");
00082
00083         ValidateSelectedItem();
00084         UpdateItemsViewSelectionFromSelectedItem();
00085         RaiseSelectionChanged();
00086     }
00087 }
00088
00089 void SelectorBar::OnItemsViewSelectedItemPropertyChanged(
00090     const winrt::DependencyObject& sender,
00091     const winrt::DependencyProperty& args)
00092 {
00093     SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00094
00095     UpdateSelectedItemFromItemsView();
00096 }
00097
00098 void SelectorBar::OnGotFocus(
00099     winrt::RoutedEventArgs const& args)
00100 {
00101     SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00102
00103     __super::OnGotFocus(args);
00104
00105     const auto selectedItem = SelectedItem();
00106     const auto selectedItemIsFocusable = selectedItem == nullptr ? false : SharedHelpers::IsFocusableElement(selectedItem);
00107
00108     if (selectedItem == nullptr || !selectedItemIsFocusable)
00109     {
00110         // Automatically attempt to select an item when the SelectorBar got focus without any selection.
00111         if (const auto& itemsView = m_itemsView.get())
00112         {
00113             const int currentItemIndex = itemsView.CurrentItemIndex();
00114
00115             if (currentItemIndex != -1)
00116             {
00117                 // Select the current item index
00118                 itemsView.Select(currentItemIndex);
00119             }
00120         }
00121
00122         if (SelectedItem() == nullptr)
00123         {
00124             SelectFirstFocusableItem();
00125         }
00126     }
00127 }
00128
00129 void SelectorBar::OnLoaded(
00130     const winrt::IInspectable& sender,
00131     const winrt::RoutedEventArgs& args)
00132 {
00133     SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00134
00135     if (SelectedItem() == nullptr)
00136     {
00137         UpdateSelectedItemFromItemsView();
00138     }
00139 }
00140
00141 void SelectorBar::RaiseSelectionChanged()
00142 {
00143     if (m_selectionChangedEventSource)
00144     {
00145         SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00146
00147         auto selectorBarSelectionChangedEventArgs = winrt::make_self<SelectorBarSelectionChangedEventArgs>();
00148
00149         m_selectionChangedEventSource(*this, *selectorBarSelectionChangedEventArgs);
00150     }
00151 }
00152
00153 void SelectorBar::SelectFirstFocusableItem()
00154 {
00155     SELECTORBAR_TRACE_VERBOSE(*this, TRACE_MSG_METH, METH_NAME, this);
00156
00157     MUX_ASSERT(SelectedItem() == nullptr);
00158
00159     const auto items = Items();
00160     const auto itemsCount = items.Size();
00161
00162     for (uint32_t itemIndex = 0; itemIndex < itemsCount; itemIndex++)
00163     {
00164         const auto item = items.GetAt(itemIndex);
00165
00166         if (item != nullptr && SharedHelpers::IsFocusableElement(item))
00167         {
00168             SelectedItem(item);
00169             break;
00170         }
00171     }
00172 }
00173
00174 void SelectorBar::UpdateItemsViewSelectionFromSelectedItem()
00175 {
00176     SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00177
00178     if (const auto& itemsView = m_itemsView.get())
00179     {
00180         const auto selectedItem = SelectedItem();
00181
00182         if (selectedItem == nullptr)
00183         {
00184             itemsView.DeselectAll();
00185         }
00186         else
00187         {
00188             uint32_t selectedIndex{};
00189             const bool result = Items().IndexOf(selectedItem, selectedIndex);
00190             MUX_ASSERT(result);
00191             itemsView.Select(selectedIndex);
00192         }
00193     }
00194 }
00195
00196 void SelectorBar::UpdateSelectedItemFromItemsView()
00197 {
00198     SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00199
00200     if (const auto& itemsView = m_itemsView.get())
00201     {
00202         const auto selectedItem = SelectedItem();
00203         const auto itemsViewSelectedItem = itemsView.SelectedItem().as<winrt::SelectorBarItem>();
00204
00205         if (selectedItem != itemsViewSelectedItem)
00206         {
00207             SelectedItem(itemsViewSelectedItem);
00208         }
00209     }
00210 }
00211
00212 void SelectorBar::ValidateSelectedItem()
00213 {
00214     SELECTORBAR_TRACE_INFO(*this, TRACE_MSG_METH, METH_NAME, this);
00215
00216     const auto selectedItem = SelectedItem();
00217
00218     if (selectedItem)
00219     {
00220         uint32_t selectedIndex{};
00221         const bool result = Items().IndexOf(selectedItem, selectedIndex);
00222
00223         if (!result)
00224         {
00225             throw winrt::hresult_invalid_argument(L"SelectedItem must be an element of Items.");
00226         }
00227     }
00228 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ComboBoxHelper.properties.h Source File

  • File List
  • File Members
  • Generated

ComboBoxHelper.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ComboBoxHelperProperties
00008 {
00009 public:
00010     ComboBoxHelperProperties();
00011
00012     static void SetKeepInteriorCornersSquare(winrt::ComboBox const& target, bool value);
00013     static bool GetKeepInteriorCornersSquare(winrt::ComboBox const& target);
00014
00015     static winrt::DependencyProperty KeepInteriorCornersSquareProperty() { return s_KeepInteriorCornersSquareProperty; }
00016
00017     static GlobalDependencyProperty s_KeepInteriorCornersSquareProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollViewBlankPage Member List

This is the complete list of members for ScrollViewBlankPage, including all inherited members.
AppendAsyncEventMessage(string asyncEventMessage) | ScrollViewBlankPage | [inline, private]
AppendAsyncEventMessage() | ScrollViewBlankPage | [inline, private]
asyncEventReportingLock | ScrollViewBlankPage | [private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkCustomUI_Checked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkCustomUI_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
LogScrollPresenterInfo() | ScrollViewBlankPage | [inline, private]
LogScrollViewInfo() | ScrollViewBlankPage | [inline, private]
lstAsyncEventMessage | ScrollViewBlankPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollViewBlankPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollViewBlankPage | [inline, protected]
ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_Loaded(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_ScrollStarting(ScrollPresenter sender, ScrollingScrollStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_SizeChanged(object sender, SizeChangedEventArgs e) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_StateChanged(ScrollPresenter sender, object args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_ViewChanged(ScrollPresenter sender, object args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_ZoomAnimationStarting(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_ZoomCompleted(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollPresenter_ZoomStarting(ScrollPresenter sender, ScrollingZoomStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_ExtentChanged(ScrollView sender, object args) | ScrollViewBlankPage | [inline, private]
ScrollView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_GotFocus(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ScrollView_Loaded(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ScrollView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_LostFocus(object sender, RoutedEventArgs e) | ScrollViewBlankPage | [inline, private]
ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_ScrollStarting(ScrollView sender, ScrollingScrollStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_SizeChanged(object sender, SizeChangedEventArgs e) | ScrollViewBlankPage | [inline, private]
ScrollView_StateChanged(ScrollView sender, object args) | ScrollViewBlankPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | ScrollViewBlankPage | [inline, private]
ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_ZoomCompleted(ScrollView sender, ScrollingZoomCompletedEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollView_ZoomStarting(ScrollView sender, ScrollingZoomStartingEventArgs args) | ScrollViewBlankPage | [inline, private]
ScrollViewBlankPage() | ScrollViewBlankPage | [inline]
~ScrollViewBlankPage() | ScrollViewBlankPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GroupedRepeaterItemAutomationPeer Member List

This is the complete list of members for GroupedRepeaterItemAutomationPeer, including all inherited members.
_owner | GroupedRepeaterItemAutomationPeer | [private]
AddToSelection() | GroupedRepeaterItemAutomationPeer | [inline]
GetAutomationControlTypeCore() | GroupedRepeaterItemAutomationPeer | [inline, protected]
GetLocalizedControlTypeCore() | GroupedRepeaterItemAutomationPeer | [inline, protected]
GetPatternCore(PatternInterface patternInterface) | GroupedRepeaterItemAutomationPeer | [inline, protected]
GroupedRepeaterItemAutomationPeer(FrameworkElement owner) | GroupedRepeaterItemAutomationPeer | [inline]
IsSelected | GroupedRepeaterItemAutomationPeer |
RemoveFromSelection() | GroupedRepeaterItemAutomationPeer | [inline]
Select() | GroupedRepeaterItemAutomationPeer | [inline]
SelectionContainer | GroupedRepeaterItemAutomationPeer |
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlAutomationPeer.cpp Source File

  • File List
  • File Members
  • PagerControl

PagerControlAutomationPeer.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "PagerControl.h"
00008 #include "PagerControlAutomationPeer.h"
00009 #include "Utils.h"
00010
00011 #include "PagerControlAutomationPeer.properties.cpp"
00012
00013 PagerControlAutomationPeer::PagerControlAutomationPeer(winrt::PagerControl const& owner)
00014     : ReferenceTracker(owner)
00015 {
00016 }
00017
00018 // IAutomationPeerOverrides
00019 winrt::IInspectable PagerControlAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
00020 {
00021     if (patternInterface == winrt::PatternInterface::Selection)
00022     {
00023         return *this;
00024     }
00025
00026     return __super::GetPatternCore(patternInterface);
00027 }
00028
00029 hstring PagerControlAutomationPeer::GetClassNameCore()
00030 {
00031     return winrt::hstring_name_of<winrt::PagerControl>();
00032 }
00033
00034 hstring PagerControlAutomationPeer::GetNameCore()
00035 {
00036     winrt::hstring name = __super::GetNameCore();
00037
00038     if (name.empty())
00039     {
00040         if (const auto PagerControl = Owner().try_as<winrt::PagerControl>())
00041         {
00042             name = SharedHelpers::TryGetStringRepresentationFromObject(PagerControl.GetValue(winrt::AutomationProperties::NameProperty()));
00043         }
00044     }
00045
00046     return name;
00047 }
00048
00049 winrt::AutomationControlType PagerControlAutomationPeer::GetAutomationControlTypeCore()
00050 {
00051     return winrt::AutomationControlType::Menu;
00052 }
00053
00054 com_ptr<PagerControl> PagerControlAutomationPeer::GetImpl()
00055 {
00056     com_ptr<PagerControl> impl = nullptr;
00057
00058     if (const auto pagerControl = Owner().try_as<winrt::PagerControl>())
00059     {
00060         impl = winrt::get_self<PagerControl>(pagerControl)->get_strong();
00061     }
00062
00063     return impl;
00064 }
00065
00066 winrt::com_array<winrt::IInspectable> PagerControlAutomationPeer::GetSelection()
00067 {
00068     if (const auto pager = GetImpl())
00069     {
00070         return { winrt::box_value(pager->SelectedPageIndex()) };
00071     }
00072     return {};
00073 }
00074
00075 void PagerControlAutomationPeer::RaiseSelectionChanged(double oldIndex, double newIndex)
00076 {
00077     if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
00078     {
00079         RaisePropertyChangedEvent(winrt::SelectionPatternIdentifiers::SelectionProperty(),
00080             winrt::PropertyValue::CreateDouble(oldIndex),
00081             winrt::PropertyValue::CreateDouble(newIndex));
00082     }
00083 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ListViewHeaderPage Member List

This is the complete list of members for ListViewHeaderPage, including all inherited members.
Ingredients | ListViewHeaderPage | [private]
ListViewHeaderPage() | ListViewHeaderPage | [inline]
PopulateData() | ListViewHeaderPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorPickerSliderAutomationPeer.h Source File

  • File List
  • File Members
  • ColorPicker

ColorPickerSliderAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ColorPickerSlider.h"
00007
00008 #include "ColorPickerSliderAutomationPeer.g.h"
00009
00010 class ColorPickerSliderAutomationPeer :
00011     public ReferenceTracker<ColorPickerSliderAutomationPeer, winrt::implementation::ColorPickerSliderAutomationPeerT, winrt::IValueProvider>
00012 {
00013 public:
00014     ColorPickerSliderAutomationPeer(winrt::ColorPickerSlider const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018
00019     // IValueProvider properties and methods
00020     bool IsReadOnly();
00021     winrt::hstring Value();
00022     void SetValue(winrt::hstring const& value);
00023
00024     void RaisePropertyChangedEvent(winrt::Color oldColor, winrt::Color newColor, int oldValue, int newValue);
00025
00026 private:
00027     winrt::hstring GetValueString(winrt::Color color, int value);
00028 };
00029
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkCanvas Member List

This is the complete list of members for InkCanvas, including all inherited members.
abi_enter() | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
AttachToCompositionTarget() | InkCanvas | [protected]
AttachToVisualLink() | InkCanvas | [private]
CheckThread() | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
ClearProperties() | InkCanvasProperties | [static]
CreateInkPresenter() | InkCanvas | [private]
DeleteInstanceOnUIThread(std::unique_ptr< InkCanvas > &&self) noexcept | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline, static]
DetachFromCompositionTarget() | InkCanvas | [protected]
DetachFromVisualLink() | InkCanvas | [private]
EnsureProperties() | InkCanvasProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
final_release(std::unique_ptr< InkCanvas > &&self) | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline, static]
GetBase() | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
GetInner() | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
InkCanvas() | InkCanvas |
InkCanvasProperties() | InkCanvasProperties |
InkPresenter() | InkCanvas | [inline]
IsEnabled(bool value) | InkCanvasProperties |
IsEnabled() | InkCanvasProperties |
IsEnabledProperty() | InkCanvasProperties | [inline, static]
IsOnThread() | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
m_hostHwnd | InkCanvas | [private]
m_inkRootVisual | InkCanvas | [private]
m_layoutUpdatedRevoker | InkCanvas | [protected]
m_sizeChanged_revoker | InkCanvas | [private]
m_targetData | InkCanvas | [protected]
m_threadData | InkCanvas | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
OnCreateAutomationPeer() | InkCanvas |
OnIsEnabledPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | InkCanvas |
InkCanvasProperties::OnIsEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | InkCanvasProperties | [static]
OnLoaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | InkCanvas |
OnUnloaded(winrt::IInspectable const &sender, winrt::RoutedEventArgs const &args) | InkCanvas |
PositionInkVisual() | InkCanvas | [protected]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
QueueInkPresenterWorkItem(winrt::DoInkPresenterWork workItem) | InkCanvas |
ReferenceTracker(Args &&...args) | ReferenceTracker< InkCanvas, winrt::implementation::InkCanvasT > | [inline]
s_IsEnabledProperty | InkCanvasProperties | [static]
UpdateInkPresenterSize() | InkCanvas | [private]
UseSystemVisualLink() | InkCanvas | [protected]
~InkCanvas() | InkCanvas | [virtual]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MapControlProperties Member List

This is the complete list of members for MapControlProperties, including all inherited members.
Center(winrt::Geopoint const &value) | MapControlProperties |
Center() | MapControlProperties |
CenterProperty() | MapControlProperties | [inline, static]
ClearProperties() | MapControlProperties | [static]
EnsureProperties() | MapControlProperties | [static]
InteractiveControlsVisible(bool value) | MapControlProperties |
InteractiveControlsVisible() | MapControlProperties |
InteractiveControlsVisibleProperty() | MapControlProperties | [inline, static]
Layers(winrt::IVector< winrt::MapLayer > const &value) | MapControlProperties |
Layers() | MapControlProperties |
LayersProperty() | MapControlProperties | [inline, static]
m_mapElementClickEventSource | MapControlProperties |
m_mapServiceErrorOccurredEventSource | MapControlProperties |
MapControlProperties() | MapControlProperties |
MapElementClick(winrt::TypedEventHandler< winrt::MapControl, winrt::MapElementClickEventArgs > const &value) | MapControlProperties |
MapElementClick(winrt::event_token const &token) | MapControlProperties |
MapServiceErrorOccurred(winrt::TypedEventHandler< winrt::MapControl, winrt::MapControlMapServiceErrorOccurredEventArgs > const &value) | MapControlProperties |
MapServiceErrorOccurred(winrt::event_token const &token) | MapControlProperties |
MapServiceToken(winrt::hstring const &value) | MapControlProperties |
MapServiceToken() | MapControlProperties |
MapServiceTokenProperty() | MapControlProperties | [inline, static]
OnCenterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnInteractiveControlsVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnLayersPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnMapServiceTokenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
OnZoomLevelPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | MapControlProperties | [static]
s_CenterProperty | MapControlProperties | [static]
s_InteractiveControlsVisibleProperty | MapControlProperties | [static]
s_LayersProperty | MapControlProperties | [static]
s_MapServiceTokenProperty | MapControlProperties | [static]
s_ZoomLevelProperty | MapControlProperties | [static]
ZoomLevel(double value) | MapControlProperties |
ZoomLevel() | MapControlProperties |
ZoomLevelProperty() | MapControlProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarClosedEventArgs.properties.cpp Source File

  • File List
  • File Members
  • Generated

InfoBarClosedEventArgs.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InfoBarClosedEventArgs.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InfoBarClosedEventArgs)
00012 }
00013
00014 #include "InfoBarClosedEventArgs.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: WebView2/TestUI/WebView2Page.xaml.cs Source File

  • File List
  • File Members
  • WebView2
  • TestUI

WebView2Page.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     [TopLevelTestPage(Name = "WebView2", Icon = "WebView2.png")]
00009     public sealed partial class WebView2Page : TestPage
00010     {
00011         public WebView2Page()
00012         {
00013             InitializeComponent();
00014
00015             navigateToBasicWebView2.Click += delegate { Frame.NavigateWithoutAnimation(typeof(WebView2BasicPage), 0); };
00016             navigateToCoreObjectsWebView2.Click += delegate { Frame.NavigateWithoutAnimation(typeof(WebView2CoreObjectsPage), 0); };
00017         }
00018     }
00019 }
Generated on Sun Dec 1 2024 20:52:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeItemProperties Member List

This is the complete list of members for SwipeItemProperties, including all inherited members.
Background(winrt::Brush const &value) | SwipeItemProperties |
Background() | SwipeItemProperties |
BackgroundProperty() | SwipeItemProperties | [inline, static]
BehaviorOnInvoked(winrt::SwipeBehaviorOnInvoked const &value) | SwipeItemProperties |
BehaviorOnInvoked() | SwipeItemProperties |
BehaviorOnInvokedProperty() | SwipeItemProperties | [inline, static]
ClearProperties() | SwipeItemProperties | [static]
Command(winrt::ICommand const &value) | SwipeItemProperties |
Command() | SwipeItemProperties |
CommandParameter(winrt::IInspectable const &value) | SwipeItemProperties |
CommandParameter() | SwipeItemProperties |
CommandParameterProperty() | SwipeItemProperties | [inline, static]
CommandProperty() | SwipeItemProperties | [inline, static]
EnsureProperties() | SwipeItemProperties | [static]
Foreground(winrt::Brush const &value) | SwipeItemProperties |
Foreground() | SwipeItemProperties |
ForegroundProperty() | SwipeItemProperties | [inline, static]
IconSource(winrt::IconSource const &value) | SwipeItemProperties |
IconSource() | SwipeItemProperties |
IconSourceProperty() | SwipeItemProperties | [inline, static]
Invoked(winrt::TypedEventHandler< winrt::SwipeItem, winrt::SwipeItemInvokedEventArgs > const &value) | SwipeItemProperties |
Invoked(winrt::event_token const &token) | SwipeItemProperties |
m_invokedEventSource | SwipeItemProperties |
OnBackgroundPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnBehaviorOnInvokedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnCommandParameterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnForegroundPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
OnTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SwipeItemProperties | [static]
s_BackgroundProperty | SwipeItemProperties | [static]
s_BehaviorOnInvokedProperty | SwipeItemProperties | [static]
s_CommandParameterProperty | SwipeItemProperties | [static]
s_CommandProperty | SwipeItemProperties | [static]
s_ForegroundProperty | SwipeItemProperties | [static]
s_IconSourceProperty | SwipeItemProperties | [static]
s_TextProperty | SwipeItemProperties | [static]
SwipeItemProperties() | SwipeItemProperties |
Text(winrt::hstring const &value) | SwipeItemProperties |
Text() | SwipeItemProperties |
TextProperty() | SwipeItemProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NestedListViewsPage Member List

This is the complete list of members for NestedListViewsPage, including all inherited members.
_outerListView | NestedListViewsPage | [private]
ChkOuterListViewSingleSelectionFollowsFocus_IsCheckedChanged(object sender, RoutedEventArgs e) | NestedListViewsPage | [inline, private]
CmbOuterListViewFooter_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedListViewsPage | [inline, private]
CmbOuterListViewHeader_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedListViewsPage | [inline, private]
CmbOuterListViewSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedListViewsPage | [inline, private]
CmbOuterListViewTabNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedListViewsPage | [inline, private]
CmbUseOuterListView_SelectionChanged(object sender, SelectionChangedEventArgs e) | NestedListViewsPage | [inline, private]
NestedListViewsPage() | NestedListViewsPage | [inline]
NestedListViewsPage_Loaded(object sender, RoutedEventArgs e) | NestedListViewsPage | [inline, private]
UpdateOuterListView() | NestedListViewsPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarToolButton Member List

This is the complete list of members for InkToolBarToolButton, including all inherited members.
abi_enter() | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
CheckThread() | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
ClearProperties() | InkToolBarToolButtonProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< InkToolBarToolButton > &&self) noexcept | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline, static]
EnsureProperties() | InkToolBarToolButtonProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
final_release(std::unique_ptr< InkToolBarToolButton > &&self) | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline, static]
GetBase() | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
GetInner() | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
InkToolBarToolButtonProperties() | InkToolBarToolButtonProperties |
IsExtensionGlyphShown() | InkToolBarToolButton | [inline]
IsExtensionGlyphShown(bool value) | InkToolBarToolButton | [inline]
IsExtensionGlyphShownProperty() | InkToolBarToolButtonProperties | [inline, static]
IsOnThread() | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkToolBarToolButton, winrt::implementation::InkToolBarToolButtonT, winrt::composable > | [inline]
s_IsExtensionGlyphShownProperty | InkToolBarToolButtonProperties | [static]
ToggleKind() | InkToolBarToolButton | [inline]
ToolKind() | InkToolBarToolButton | [inline]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ReferenceTracker< D, ImplT, I > Member List

This is the complete list of members for ReferenceTracker< D, ImplT, I >, including all inherited members.
abi_enter() | ReferenceTracker< D, ImplT, I > | [inline]
CheckThread() | ReferenceTracker< D, ImplT, I > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< D > &&self) noexcept | ReferenceTracker< D, ImplT, I > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< D, ImplT, I > | [inline]
final_release(std::unique_ptr< D > &&self) | ReferenceTracker< D, ImplT, I > | [inline, static]
GetBase() | ReferenceTracker< D, ImplT, I > | [inline]
GetInner() | ReferenceTracker< D, ImplT, I > | [inline]
IsOnThread() | ReferenceTracker< D, ImplT, I > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< D, ImplT, I > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< D, ImplT, I > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< D, ImplT, I > | [inline]
Generated on Sun Dec 1 2024 20:53:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: inc/enum_vector.h Source File

  • File List
  • File Members
  • inc

enum_vector.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002
00003 template<typename E, class T>
00004 class enum_vector : public std::vector<T> {
00005 public:
00006     T& operator[] (E e) {
00007         return std::vector<T, N>::operator[]((std::size_t)e);
00008     }
00009
00010     const T& operator[] (E e) const {
00011         return std::vector<T, N>::operator[]((std::size_t)e);
00012     }
00013 };
00014
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorPickerTests Member List

This is the complete list of members for ColorPickerTests, including all inherited members.
ColorPickerDerivationTest() | ColorPickerTests | [inline]
ColorPickerEventsTest() | ColorPickerTests | [inline]
ColorPickerTest() | ColorPickerTests | [inline]
ColorSpectrumEventsTest() | ColorPickerTests | [inline]
ColorSpectrumTest() | ColorPickerTests | [inline]
SetAsRootAndWaitForColorSpectrumFill(FrameworkElement element) | ColorPickerTests | [inline, private]
ValidateFractionalWidthDoesNotCrash() | ColorPickerTests | [inline]
ValidateHueRange() | ColorPickerTests | [inline]
VerifyClearingAlphaChannelInputFieldDoesNotCrash() | ColorPickerTests | [inline]
VerifyClearingHexInputFieldDoesNotCrash() | ColorPickerTests | [inline]
VerifyColorPropertyMetadata() | ColorPickerTests | [inline]
VerifyVisualTree() | ColorPickerTests | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItemStyleSelector Member List

This is the complete list of members for TreeViewItemStyleSelector, including all inherited members.
SelectStyleCore(object item, DependencyObject container) | TreeViewItemStyleSelector | [inline, protected]
Style1 | TreeViewItemStyleSelector |
Style2 | TreeViewItemStyleSelector |
Generated on Sun Dec 1 2024 20:54:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/AnnotatedScrollBarLabel.properties.cpp Source File

  • File List
  • File Members
  • Generated

AnnotatedScrollBarLabel.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "AnnotatedScrollBarLabel.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(AnnotatedScrollBarLabel)
00012 }
00013
00014 #include "AnnotatedScrollBarLabel.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTabDroppedOutsideEventArgs Member List

This is the complete list of members for TabViewTabDroppedOutsideEventArgs, including all inherited members.
Item() | TabViewTabDroppedOutsideEventArgs | [inline]
Tab() | TabViewTabDroppedOutsideEventArgs | [inline]
TabViewTabDroppedOutsideEventArgs(winrt::IInspectable const &item, winrt::TabViewItem tab) | TabViewTabDroppedOutsideEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/BasicDemo.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples

BasicDemo.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml;
00005 using Microsoft.UI.Xaml.Controls;
00006 using Microsoft.UI.Xaml.Media;
00007 using System.Collections.ObjectModel;
00008 using System.Linq;
00009
00010 namespace MUXControlsTestApp.Samples
00011 {
00012     public sealed partial class BasicDemo : TestPage
00013     {
00014         public ObservableCollection<string> simpleStringsList = new ObservableCollection<string>();
00015
00016         public BasicDemo()
00017         {
00018             this.InitializeComponent();
00019             repeater.ItemTemplate = elementFactory;
00020             var stack = repeater.Layout as StackLayout;
00021             int numItems = (stack != null && !stack.IsVirtualizationEnabled) ? 10 : 10000;
00022             repeater.ItemsSource = Enumerable.Range(0, numItems).Select(x => x.ToString());
00023         }
00024
00025         private void OnAddRecipeButton_Click(object sender, RoutedEventArgs e)
00026         {
00027             InsertAtStartChildCountLabel.Text = VisualTreeHelper.GetChildrenCount(insertStartTestRepeater).ToString();
00028             simpleStringsList.Insert(0,"Item" + simpleStringsList.Count );
00029         }
00030
00031         private void OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args)
00032         {
00033             args.TemplateKey = (int.Parse(args.DataContext.ToString()) % 2 == 0) ? "even" : "odd";
00034         }
00035     }
00036 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MicaBackdrop::ControllerEntry Member List

This is the complete list of members for MicaBackdrop::ControllerEntry, including all inherited members.
ControllerEntry(ICompositionSupportsSystemBackdrop target, MicaController controller, SystemBackdropConfiguration configuration) | MicaBackdrop::ControllerEntry
ControllerEntry(const ControllerEntry &other) | MicaBackdrop::ControllerEntry
m_controller | MicaBackdrop::ControllerEntry
m_target | MicaBackdrop::ControllerEntry
operator=(const ControllerEntry &other) | MicaBackdrop::ControllerEntry
~ControllerEntry() | MicaBackdrop::ControllerEntry
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/RevealListViewItemPresenter.cpp Source File

  • File List
  • File Members
  • Materials
  • Reveal

RevealListViewItemPresenter.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "RevealListViewItemPresenter.h"
00007 #include "RevealBrush.h"
00008
00009 bool RevealListViewItemPresenter::GoToElementStateCore(winrt::hstring const& state, bool useTransitions)
00010 {
00011     RevealBrush::EnsureProperties();
00012
00013     const auto goToState = [this](winrt::RevealBrushState state) {
00014         SetValue(RevealBrush::s_StateProperty, box_value(state));
00015     };
00016
00017     // Handle all of the states in the ListViewItemPresenter "Common" state group.
00018     if (state == L"Normal" || state == L"Selected" || state == L"Disabled")
00019     {
00020         goToState(winrt::RevealBrushState::Normal);
00021     }
00022     else if (state == L"PointerOver" || state == L"PointerOverSelected")
00023     {
00024         goToState(winrt::RevealBrushState::PointerOver);
00025     }
00026     else if (state == L"Pressed" || state == L"PointerOverPressed" || state == L"PressedSelected")
00027     {
00028         goToState(winrt::RevealBrushState::Pressed);
00029     }
00030
00031     return __super::GoToElementStateCore(state, useTransitions);
00032 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ImageIcon/InteractionTests/ImageIconTests.cs Source File

  • File List
  • File Members
  • ImageIcon
  • InteractionTests

ImageIconTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class ImageIconTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("Platform", "Any")]
00029         [TestProperty("MUXControlsTestSuite", "SuiteB")]
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         public void BasicTest()
00042         {
00043             Log.Comment("ImageIcon Basic Test");
00044         }
00045     }
00046 }
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PhasingTests::ElementPhasingManager Member List

This is the complete list of members for PhasingTests::ElementPhasingManager, including all inherited members.
_data | PhasingTests::ElementPhasingManager | [private]
_numPhases | PhasingTests::ElementPhasingManager | [private]
Data | PhasingTests::ElementPhasingManager |
ElementPhasingManager(int numPhases) | PhasingTests::ElementPhasingManager | [inline]
IsCleared | PhasingTests::ElementPhasingManager |
ProcessBindings(object item, int itemIndex, int phase, out int nextPhase) | PhasingTests::ElementPhasingManager | [inline]
ProcessedCalls | PhasingTests::ElementPhasingManager | [static]
Recycle() | PhasingTests::ElementPhasingManager | [inline]
Generated on Sun Dec 1 2024 20:53:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MathToken Member List

This is the complete list of members for MathToken, including all inherited members.
Char | MathToken |
MathToken(MathTokenType t, wchar_t c) | MathToken | [inline]
MathToken(MathTokenType t, double d) | MathToken | [inline]
Type | MathToken |
Value | MathToken |
Generated on Sun Dec 1 2024 20:52:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBarPenButton.properties.h Source File

  • File List
  • File Members
  • Generated

InkToolBarPenButton.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class InkToolBarPenButtonProperties
00008 {
00009 public:
00010     InkToolBarPenButtonProperties();
00011
00012     void MaxStrokeWidth(double value);
00013     double MaxStrokeWidth();
00014
00015     void MinStrokeWidth(double value);
00016     double MinStrokeWidth();
00017
00018     void Palette(winrt::IVector<winrt::Brush> const& value);
00019     winrt::IVector<winrt::Brush> Palette();
00020
00021     void SelectedBrush(winrt::Brush const& value);
00022     winrt::Brush SelectedBrush();
00023
00024     void SelectedBrushIndex(int value);
00025     int SelectedBrushIndex();
00026
00027     void SelectedStrokeWidth(double value);
00028     double SelectedStrokeWidth();
00029
00030     static winrt::DependencyProperty MaxStrokeWidthProperty() { return s_MaxStrokeWidthProperty; }
00031     static winrt::DependencyProperty MinStrokeWidthProperty() { return s_MinStrokeWidthProperty; }
00032     static winrt::DependencyProperty PaletteProperty() { return s_PaletteProperty; }
00033     static winrt::DependencyProperty SelectedBrushProperty() { return s_SelectedBrushProperty; }
00034     static winrt::DependencyProperty SelectedBrushIndexProperty() { return s_SelectedBrushIndexProperty; }
00035     static winrt::DependencyProperty SelectedStrokeWidthProperty() { return s_SelectedStrokeWidthProperty; }
00036
00037     static GlobalDependencyProperty s_MaxStrokeWidthProperty;
00038     static GlobalDependencyProperty s_MinStrokeWidthProperty;
00039     static GlobalDependencyProperty s_PaletteProperty;
00040     static GlobalDependencyProperty s_SelectedBrushProperty;
00041     static GlobalDependencyProperty s_SelectedBrushIndexProperty;
00042     static GlobalDependencyProperty s_SelectedStrokeWidthProperty;
00043
00044     static void EnsureProperties();
00045     static void ClearProperties();
00046 };
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/FlowLayoutState.cpp Source File

  • File List
  • File Members
  • Repeater

FlowLayoutState.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "FlowLayoutAlgorithm.h"
00008 #include "FlowLayoutState.h"
00009
00010 #include "FlowLayoutState.properties.cpp"
00011
00012 void FlowLayoutState::InitializeForContext(
00013     const winrt::VirtualizingLayoutContext& context,
00014     IFlowLayoutAlgorithmDelegates* callbacks)
00015 {
00016     m_flowAlgorithm.InitializeForContext(context, callbacks);
00017
00018     if (m_lineSizeEstimationBuffer.size() == 0)
00019     {
00020         m_lineSizeEstimationBuffer.resize(BufferSize, 0.0f);
00021         m_itemsPerLineEstimationBuffer.resize(BufferSize, 0.0f);
00022     }
00023
00024     context.LayoutStateCore(*this);
00025 }
00026
00027 void FlowLayoutState::UninitializeForContext(const winrt::VirtualizingLayoutContext& context)
00028 {
00029     m_flowAlgorithm.UninitializeForContext(context);
00030 }
00031
00032 void FlowLayoutState::OnLineArranged(int startIndex, int countInLine, double lineSize, const winrt::VirtualizingLayoutContext& context)
00033 {
00034     // If we do not have any estimation information, use the line for estimation.
00035     // If we do have some estimation information, don't account for the last line which is quite likely
00036     // different from the rest of the lines and can throw off estimation.
00037     if (m_totalLinesMeasured == 0 || startIndex + countInLine != context.ItemCount())
00038     {
00039         const int estimationBufferIndex = startIndex % m_lineSizeEstimationBuffer.size();
00040         const bool alreadyMeasured = m_lineSizeEstimationBuffer[estimationBufferIndex] != 0;
00041
00042         if (!alreadyMeasured)
00043         {
00044             ++m_totalLinesMeasured;
00045         }
00046
00047         m_totalLineSize -= m_lineSizeEstimationBuffer[estimationBufferIndex];
00048         m_totalLineSize += lineSize;
00049         m_lineSizeEstimationBuffer[estimationBufferIndex] = lineSize;
00050
00051         m_totalItemsPerLine -= m_itemsPerLineEstimationBuffer[estimationBufferIndex];
00052         m_totalItemsPerLine += countInLine;
00053         m_itemsPerLineEstimationBuffer[estimationBufferIndex] = countInLine;
00054     }
00055 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicTestApi.h Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicTestApi.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "AcrylicTestApi.g.h"
00007
00008 class AcrylicTestApi :
00009     public ReferenceTracker<AcrylicTestApi, winrt::implementation::AcrylicTestApiT, winrt::composable>
00010 {
00011 public:
00012     winrt::AcrylicBrush AcrylicBrush();
00013     void AcrylicBrush(winrt::AcrylicBrush const& value);
00014     bool IsUsingAcrylicBrush();
00015     winrt::CompositionBrush CompositionBrush();
00016     winrt::CompositionBrush NoiseBrush();
00017
00018     // AcrylicBrush has three kinds of effect: fallback color, crossfading acrylic(for animation) and non crossfading acrylic
00019     // This function will ignore the internal state and create a new crossfading acrylic or non crossfading acrylic effect brush.
00020     void ForceCreateAcrylicBrush(bool useCrossFadeEffect);
00021
00022 private:
00023     winrt::AcrylicBrush m_acrylicBrush{ nullptr };
00024 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual Member List

This is the complete list of members for AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual, including all inherited members.
_reusableExpressionAnimation(compositor.CreateExpressionAnimation()) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline]
AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CanvasGeometryToIGeometrySource2D(winrt::com_ptr< CanvasGeometry > geo) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private, static]
Close() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline]
ContainerShape_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ContainerShape_1() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ContainerShape_2() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_1() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CreateBooleanKeyFrameAnimation(float initialProgress, bool initialValue) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, winrt::float3x2 transformMatrix, CompositionBrush fillBrush) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_1() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_2() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
CubicBezierEasingFunction_3() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Duration() const | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline]
Geometry_00() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_01() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_02() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_03() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_04() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_05() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_06() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_07() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_08() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_09() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_10() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Geometry_11() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
InsetClip_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, static]
IsVisibleBooleanAnimation_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
IsVisibleBooleanAnimation_1() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
OffsetVector2Animation_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
OffsetVector2Animation_1() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
OpacityScalarAnimation_1_to_1_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
OpacityScalarAnimation_1_to_1_1() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_00() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_01() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_02() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_03() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_04() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_05() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_06() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_07() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_08() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_09() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_10() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
PathGeometry_11() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Root() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
RootProgress() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
RootVisual() const | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline]
ScaleXScalarAnimation_2p749_to_2p749() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ScaleYScalarAnimation_2p75_to_2p75() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_1() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Size() const | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline]
SpriteShape_00() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_01() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_02() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_03() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_04() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_05() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_06() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_07() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_08() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_09() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_10() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_11() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_12() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_13() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_14() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_15() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_16() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
SpriteShape_17() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
ThemeColor_Foreground() | AnimatedGlobalNavigationButtonVisualSource_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarStencilButtonProperties Member List

This is the complete list of members for InkToolBarStencilButtonProperties, including all inherited members.
ClearProperties() | InkToolBarStencilButtonProperties | [static]
EnsureProperties() | InkToolBarStencilButtonProperties | [static]
InkToolBarStencilButtonProperties() | InkToolBarStencilButtonProperties |
IsProtractorItemVisible(bool value) | InkToolBarStencilButtonProperties |
IsProtractorItemVisible() | InkToolBarStencilButtonProperties |
IsProtractorItemVisibleProperty() | InkToolBarStencilButtonProperties | [inline, static]
IsRulerItemVisible(bool value) | InkToolBarStencilButtonProperties |
IsRulerItemVisible() | InkToolBarStencilButtonProperties |
IsRulerItemVisibleProperty() | InkToolBarStencilButtonProperties | [inline, static]
Protractor(winrt::InkPresenterProtractor const &value) | InkToolBarStencilButtonProperties |
Protractor() | InkToolBarStencilButtonProperties |
ProtractorProperty() | InkToolBarStencilButtonProperties | [inline, static]
Ruler(winrt::InkPresenterRuler const &value) | InkToolBarStencilButtonProperties |
Ruler() | InkToolBarStencilButtonProperties |
RulerProperty() | InkToolBarStencilButtonProperties | [inline, static]
s_IsProtractorItemVisibleProperty | InkToolBarStencilButtonProperties | [static]
s_IsRulerItemVisibleProperty | InkToolBarStencilButtonProperties | [static]
s_ProtractorProperty | InkToolBarStencilButtonProperties | [static]
s_RulerProperty | InkToolBarStencilButtonProperties | [static]
s_SelectedStencilProperty | InkToolBarStencilButtonProperties | [static]
SelectedStencil(winrt::InkToolBarStencilKind const &value) | InkToolBarStencilButtonProperties |
SelectedStencil() | InkToolBarStencilButtonProperties |
SelectedStencilProperty() | InkToolBarStencilButtonProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SliderInteraction.properties.cpp Source File

  • File List
  • File Members
  • Generated

SliderInteraction.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SliderInteraction.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(SliderInteraction)
00012 }
00013
00014 #include "SliderInteraction.g.cpp"
00015
00016
00017 SliderInteractionProperties::SliderInteractionProperties()
00018     : m_propertyChangedEventSource{static_cast<SliderInteraction*>(this)}
00019 {
00020 }
00021
00022 void SliderInteractionProperties::EnsureProperties()
00023 {
00024 }
00025
00026 void SliderInteractionProperties::ClearProperties()
00027 {
00028 }
00029
00030 winrt::event_token SliderInteractionProperties::PropertyChanged(winrt::PropertyChangedEventHandler const& value)
00031 {
00032     return m_propertyChangedEventSource.add(value);
00033 }
00034
00035 void SliderInteractionProperties::PropertyChanged(winrt::event_token const& token)
00036 {
00037     m_propertyChangedEventSource.remove(token);
00038 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsRepeaterScrollHost.cpp Source File

  • File List
  • File Members
  • Repeater

ItemsRepeaterScrollHost.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "ItemsRepeaterScrollHost.h"
00008 #include "DoubleUtil.h"
00009 #include "RuntimeProfiler.h"
00010
00011 #include "ItemsRepeaterScrollHost.properties.cpp"
00012
00013 ItemsRepeaterScrollHost::ItemsRepeaterScrollHost()
00014 {
00015     __RP_Marker_ClassById(RuntimeProfiler::ProfId_ItemsRepeaterScrollHost);
00016 }
00017
00018 winrt::UIElement ItemsRepeaterScrollHost::CurrentAnchor()
00019 {
00020     return GetAnchorElement();
00021 }
00022
00023 winrt::FxScrollViewer ItemsRepeaterScrollHost::ScrollViewer()
00024 {
00025     winrt::FxScrollViewer value = nullptr;
00026     auto children = Children();
00027     if (children.Size() > 0)
00028     {
00029         value = children.GetAt(0).try_as<winrt::FxScrollViewer>();
00030     }
00031
00032     return value;
00033 }
00034
00035 void ItemsRepeaterScrollHost::ScrollViewer(winrt::FxScrollViewer const& value)
00036 {
00037     m_scrollViewerViewChanging.revoke();
00038     m_scrollViewerViewChanged.revoke();
00039     m_scrollViewerSizeChanged.revoke();
00040
00041     auto children = Children();
00042     children.Clear();
00043     children.Append(value);
00044 }
00045
00046 #pragma region IFrameworkElementOverrides
00047
00048 winrt::Size ItemsRepeaterScrollHost::MeasureOverride(winrt::Size const& availableSize)
00049 {
00050     winrt::Size desiredSize = {};
00051     if (auto scrollViewer = ScrollViewer())
00052     {
00053         scrollViewer.Measure(availableSize);
00054         desiredSize = scrollViewer.DesiredSize();
00055     }
00056
00057     return desiredSize;
00058 }
00059
00060 winrt::Size ItemsRepeaterScrollHost::ArrangeOverride(winrt::Size const& finalSize)
00061 {
00062     const winrt::Size result = finalSize;
00063     if (auto scrollViewer = ScrollViewer())
00064     {
00065         scrollViewer.Arrange({ 0, 0, finalSize.Width, finalSize.Height });
00066     }
00067
00068     return result;
00069 }
00070
00071 #pragma endregion
00072
00073 #pragma region IScrollAnchorProvider
00074
00075 double ItemsRepeaterScrollHost::HorizontalAnchorRatio()
00076 {
00077     return m_horizontalEdge;
00078 }
00079
00080 void ItemsRepeaterScrollHost::HorizontalAnchorRatio(double value)
00081 {
00082     m_horizontalEdge = value;
00083 }
00084
00085 double ItemsRepeaterScrollHost::VerticalAnchorRatio()
00086 {
00087     return m_verticalEdge;
00088 }
00089
00090 void ItemsRepeaterScrollHost::VerticalAnchorRatio(double value)
00091 {
00092     m_verticalEdge = value;
00093 }
00094
00095 // TODO: this API should go on UIElement.
00096 void ItemsRepeaterScrollHost::StartBringIntoView(
00097     winrt::UIElement const& element,
00098     double alignmentX,
00099     double alignmentY,
00100     double offsetX,
00101     double offsetY,
00102     bool animate)
00103 {
00104
00105     m_pendingBringIntoView = {
00106         this /* owner */,
00107         element,
00108         alignmentX,
00109         alignmentY,
00110         offsetX,
00111         offsetY,
00112         !!animate };
00113 }
00114
00115 bool ItemsRepeaterScrollHost::IsHorizontallyScrollable()
00116 {
00117     return true;
00118 }
00119
00120 bool ItemsRepeaterScrollHost::IsVerticallyScrollable()
00121 {
00122     return true;
00123 }
00124
00125 winrt::UIElement ItemsRepeaterScrollHost::AnchorElement()
00126 {
00127     return GetAnchorElement();
00128 }
00129
00130
00131 winrt::event_token ItemsRepeaterScrollHost::ViewportChanged(winrt::ViewportChangedEventHandler const& value)
00132 {
00133     return m_viewportChanged.add(value);
00134 }
00135
00136 void ItemsRepeaterScrollHost::ViewportChanged(winrt::event_token const& token)
00137 {
00138     m_viewportChanged.remove(token);
00139 }
00140
00141 winrt::event_token ItemsRepeaterScrollHost::PostArrange(winrt::PostArrangeEventHandler const& value)
00142 {
00143     return m_postArrange.add(value);
00144 }
00145
00146 void ItemsRepeaterScrollHost::PostArrange(winrt::event_token const& token)
00147 {
00148     m_postArrange.remove(token);
00149 }
00150
00151 winrt::event_token ItemsRepeaterScrollHost::ConfigurationChanged(
00152     winrt::ConfigurationChangedEventHandler const& /*value*/)
00153 {
00154     return {};
00155 }
00156
00157 void ItemsRepeaterScrollHost::ConfigurationChanged(
00158     winrt::event_token const& /*token*/)
00159 {
00160 }
00161
00162 void ItemsRepeaterScrollHost::RegisterAnchorCandidate(winrt::UIElement const& element)
00163 {
00164     if (HorizontalAnchorRatio() != DoubleUtil::NaN || VerticalAnchorRatio() != DoubleUtil::NaN)
00165     {
00166         if (const auto scrollViewer = ScrollViewer())
00167         {
00168
00169 #ifdef DBG
00170             // We should not be registring the same element twice. Even through it is functionally ok,
00171             // we will end up spending more time during arrange than we must.
00172             // However checking if an element is already in the list every time a new element is registered is worse for perf.
00173             // So, I'm leaving an assert here to catch regression in our code but in release builds we run without the check.
00174             const auto elem = element;
00175             const auto it = std::find_if(m_candidates.cbegin(), m_candidates.cend(), [&elem](const CandidateInfo& c) { return c.Element() == elem; });
00176             if (it != m_candidates.cend())
00177             {
00178                 MUX_ASSERT(false);
00179             }
00180 #endif // DBG
00181
00182             m_candidates.push_back(CandidateInfo(this /* owner */, element));
00183             m_isAnchorElementDirty = true;
00184         }
00185     }
00186 }
00187
00188 void ItemsRepeaterScrollHost::UnregisterAnchorCandidate(winrt::UIElement const& element)
00189 {
00190     const auto elem = element;
00191     const auto it = std::find_if(m_candidates.cbegin(), m_candidates.cend(), [&elem](const CandidateInfo& c) { return c.Element() == elem; });
00192     if (it != m_candidates.cend())
00193     {
00194         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Unregistered candidate:", it - m_candidates.begin());
00195         m_candidates.erase(it);
00196         m_isAnchorElementDirty = true;
00197     }
00198 }
00199
00200 winrt::Rect ItemsRepeaterScrollHost::GetRelativeViewport(
00201     winrt::UIElement const& element)
00202 {
00203     if (const auto scrollViewer = ScrollViewer())
00204     {
00205         const auto elem = element;
00206         const bool hasLockedViewport = HasPendingBringIntoView();
00207         const auto transformer = elem.TransformToVisual(hasLockedViewport ? scrollViewer.ContentTemplateRoot() : scrollViewer);
00208         const auto zoomFactor = static_cast<double>(scrollViewer.ZoomFactor());
00209         const double viewportWidth = scrollViewer.ViewportWidth() / zoomFactor;
00210         const double viewportHeight = scrollViewer.ViewportHeight() / zoomFactor;
00211
00212         auto elementOffset = transformer.TransformPoint(winrt::Point{});
00213
00214         elementOffset.X = -elementOffset.X;
00215         elementOffset.Y = -elementOffset.Y + static_cast<float>(m_pendingViewportShift);
00216
00217         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_DBL, METH_NAME, this, L"Pending shift:", m_pendingViewportShift);
00218
00219         if (hasLockedViewport)
00220         {
00221             elementOffset.X += m_pendingBringIntoView.ChangeViewOffset().X;
00222             elementOffset.Y += m_pendingBringIntoView.ChangeViewOffset().Y;
00223         }
00224
00225         return { elementOffset.X, elementOffset.Y, static_cast<float>(viewportWidth), static_cast<float>(viewportHeight) };
00226     }
00227
00228     return {};
00229 }
00230
00231 #pragma endregion
00232
00233 void ItemsRepeaterScrollHost::ApplyPendingChangeView(const winrt::FxScrollViewer& scrollViewer)
00234 {
00235     auto bringIntoView = m_pendingBringIntoView;
00236     MUX_ASSERT(!bringIntoView.ChangeViewCalled());
00237
00238     bringIntoView.ChangeViewCalled(true);
00239
00240     const auto layoutSlot = CachedVisualTreeHelpers::GetLayoutSlot(bringIntoView.TargetElement().as<winrt::FrameworkElement>());
00241
00242     // Arrange bounds are absolute.
00243     const auto arrangeBounds = bringIntoView
00244         .TargetElement()
00245         .TransformToVisual(scrollViewer.ContentTemplateRoot())
00246         .TransformBounds(winrt::Rect{ 0, 0, layoutSlot.Width, layoutSlot.Height });
00247
00248     const auto scrollableArea = winrt::Point(
00249         static_cast<float>(scrollViewer.ViewportWidth() - arrangeBounds.Width),
00250         static_cast<float>(scrollViewer.ViewportHeight() - arrangeBounds.Height));
00251
00252     // Calculate the target offset based on the alignment and offset parameters.
00253     // Make sure that we are constrained to the ScrollViewer's extent.
00254     const auto changeViewOffset = winrt::Point{
00255         std::max(0.0f, static_cast<float>(std::min(
00256             arrangeBounds.X + bringIntoView.OffsetX() - scrollableArea.X * bringIntoView.AlignmentX(),
00257             scrollViewer.ExtentWidth() - scrollViewer.ViewportWidth()))),
00258         std::max(0.0f, static_cast<float>(std::min(
00259             arrangeBounds.Y + bringIntoView.OffsetY() - scrollableArea.Y * bringIntoView.AlignmentY(),
00260             scrollViewer.ExtentHeight() - scrollViewer.ViewportHeight()))) };
00261     bringIntoView.ChangeViewOffset(changeViewOffset);
00262
00263     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_FLT_FLT, METH_NAME, this, L"ItemsRepeaterScrollHost scroll to absolute offset:", changeViewOffset.X, changeViewOffset.Y);
00264     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Animate:", bringIntoView.Animate());
00265
00266     scrollViewer.ChangeView(
00267         box_value(static_cast<double>(changeViewOffset.X)).as<winrt::IReference<double>>(),
00268         box_value(static_cast<double>(changeViewOffset.Y)).as<winrt::IReference<double>>(),
00269         nullptr,
00270         !bringIntoView.Animate());
00271
00272     m_pendingBringIntoView = std::move(bringIntoView);
00273 }
00274
00275 double ItemsRepeaterScrollHost::TrackElement(const winrt::UIElement& element, winrt::Rect previousBounds, const winrt::FxScrollViewer& scrollViewer)
00276 {
00277     const auto bounds = winrt::LayoutInformation::GetLayoutSlot(element.as<winrt::FrameworkElement>());
00278     const auto transformer = element.TransformToVisual(scrollViewer.ContentTemplateRoot());
00279     const auto newBounds = transformer.TransformBounds(winrt::Rect{
00280         0.0f,
00281         0.0f,
00282         bounds.Width,
00283         bounds.Height });
00284
00285     const auto oldEdgeOffset = previousBounds.Y + HorizontalAnchorRatio() * previousBounds.Height;
00286     const auto newEdgeOffset = newBounds.Y + HorizontalAnchorRatio() * newBounds.Height;
00287
00288     const auto unconstrainedPendingViewportShift = newEdgeOffset - oldEdgeOffset;
00289     auto pendingViewportShift = unconstrainedPendingViewportShift;
00290
00291     // ScrollViewer.ChangeView is not synchronous, so we need to account for the pending ChangeView call
00292     // and make sure we are locked on the target viewport.
00293     const auto verticalOffset =
00294         HasPendingBringIntoView() && !m_pendingBringIntoView.Animate() ?
00295         m_pendingBringIntoView.ChangeViewOffset().Y :
00296         scrollViewer.VerticalOffset();
00297
00298     // Constrain the viewport shift to the extent
00299     if (verticalOffset + pendingViewportShift < 0)
00300     {
00301         pendingViewportShift = -verticalOffset;
00302     }
00303     else if (verticalOffset + scrollViewer.ViewportHeight() + pendingViewportShift > scrollViewer.ExtentHeight())
00304     {
00305         pendingViewportShift = scrollViewer.ExtentHeight() - scrollViewer.ViewportHeight() - verticalOffset;
00306     }
00307
00308     if (std::abs(pendingViewportShift) > 1)
00309     {
00310         // TODO: do we need to account for the zoom factor?
00311         // BUG:
00312         //  Unfortunately, if we have to correct while animating, we almost never
00313         //  update the ongoing animation correctly and we end up missing our target
00314         //  viewport. We should address that when building element tracking as part
00315         //  of the framework.
00316         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"Viewport shift:", pendingViewportShift);
00317         scrollViewer.ChangeView(
00318             nullptr,
00319             box_value(verticalOffset + pendingViewportShift).as<winrt::IReference<double>>(),
00320             nullptr,
00321             true /* disableAnimation */);
00322     }
00323     else
00324     {
00325         pendingViewportShift = 0.0;
00326
00327         // We can't shift the viewport to follow the tracked element. The viewport relative
00328         // to the tracked element will have changed. We need to raise ViewportChanged to make
00329         // sure the repeaters will get a second layout pass to fill any empty space they have.
00330         if (std::abs(unconstrainedPendingViewportShift) > 1)
00331         {
00332             m_viewportChanged(*this, true /* isFinal */);
00333         }
00334     }
00335
00336     return pendingViewportShift;
00337 }
00338
00339 winrt::UIElement ItemsRepeaterScrollHost::GetAnchorElement(_Out_opt_ winrt::Rect* relativeBounds)
00340 {
00341     if (m_isAnchorElementDirty)
00342     {
00343         if (const auto scrollViewer = ScrollViewer())
00344         {
00345             // ScrollViewer.ChangeView is not synchronous, so we need to account for the pending ChangeView call
00346             // and make sure we are locked on the target viewport.
00347             const auto verticalOffset =
00348                 HasPendingBringIntoView() && !m_pendingBringIntoView.Animate() ?
00349                 m_pendingBringIntoView.ChangeViewOffset().Y :
00350                 scrollViewer.VerticalOffset();
00351             const double viewportEdgeOffset = verticalOffset + HorizontalAnchorRatio() * scrollViewer.ViewportHeight() + m_pendingViewportShift;
00352
00353             const CandidateInfo* bestCandidate{ nullptr };
00354             double bestCandidateDistance = std::numeric_limits<float>::max();
00355
00356             for (auto& candidate : m_candidates)
00357             {
00358                 const auto element = candidate.Element();
00359
00360                 if (!candidate.IsRelativeBoundsSet())
00361                 {
00362                     const auto bounds = winrt::LayoutInformation::GetLayoutSlot(element.as<winrt::FrameworkElement>());
00363                     const auto transformer = element.TransformToVisual(scrollViewer.ContentTemplateRoot());
00364                     candidate.RelativeBounds(transformer.TransformBounds(winrt::Rect{
00365                         0.0f,
00366                         0.0f,
00367                         bounds.Width,
00368                         bounds.Height }));
00369                 }
00370
00371                 const double elementEdgeOffset = candidate.RelativeBounds().Y + HorizontalAnchorRatio() * candidate.RelativeBounds().Height;
00372                 const double candidateDistance = std::abs(elementEdgeOffset - viewportEdgeOffset);
00373                 if (candidateDistance < bestCandidateDistance)
00374                 {
00375                     bestCandidate = &candidate;
00376                     bestCandidateDistance = candidateDistance;
00377                 }
00378             }
00379
00380             if (bestCandidate)
00381             {
00382                 m_anchorElement.set(bestCandidate->Element());
00383                 m_anchorElementRelativeBounds = bestCandidate->RelativeBounds();
00384             }
00385             else
00386             {
00387                 m_anchorElement.set(nullptr);
00388                 m_anchorElementRelativeBounds = CandidateInfo::InvalidBounds;
00389             }
00390         }
00391
00392         m_isAnchorElementDirty = false;
00393     }
00394
00395     if (relativeBounds)
00396     {
00397         *relativeBounds = m_anchorElementRelativeBounds;
00398     }
00399
00400     return m_anchorElement.get();
00401 }
00402
00403 void ItemsRepeaterScrollHost::OnScrollViewerViewChanging(
00404     const winrt::IInspectable& sender,
00405     const winrt::ScrollViewerViewChangingEventArgs& args)
00406 {
00407     m_viewportChanged(*this, false /* isFinal */);
00408 }
00409
00410 void ItemsRepeaterScrollHost::OnScrollViewerViewChanged(
00411     winrt::IInspectable const&,
00412     winrt::ScrollViewerViewChangedEventArgs const& args)
00413 {
00414     const bool isFinal = !args.IsIntermediate();
00415
00416     if (isFinal)
00417     {
00418         m_pendingViewportShift = 0.0;
00419
00420         if (HasPendingBringIntoView() &&
00421             m_pendingBringIntoView.ChangeViewCalled() == true)
00422         {
00423             m_pendingBringIntoView.Reset();
00424         }
00425     }
00426
00427     m_viewportChanged(*this, isFinal);
00428 }
00429
00430 void ItemsRepeaterScrollHost::OnScrollViewerSizeChanged(
00431     const winrt::IInspectable& sender,
00432     const winrt::SizeChangedEventArgs& args)
00433 {
00434     m_viewportChanged(*this, true /* isFinal */);
00435 }
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/SwipeItems.properties.cpp Source File

  • File List
  • File Members
  • Generated

SwipeItems.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "SwipeItems.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(SwipeItems)
00012 }
00013
00014 #include "SwipeItems.g.cpp"
00015
00016 GlobalDependencyProperty SwipeItemsProperties::s_ModeProperty{ nullptr };
00017
00018 SwipeItemsProperties::SwipeItemsProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void SwipeItemsProperties::EnsureProperties()
00024 {
00025     if (!s_ModeProperty)
00026     {
00027         s_ModeProperty =
00028             InitializeDependencyProperty(
00029                 L"Mode",
00030                 winrt::name_of<winrt::SwipeMode>(),
00031                 winrt::name_of<winrt::SwipeItems>(),
00032                 false /* isAttached */,
00033                 ValueHelper<winrt::SwipeMode>::BoxValueIfNecessary(winrt::SwipeMode::Reveal),
00034                 winrt::PropertyChangedCallback(&OnModePropertyChanged));
00035     }
00036 }
00037
00038 void SwipeItemsProperties::ClearProperties()
00039 {
00040     s_ModeProperty = nullptr;
00041 }
00042
00043 void SwipeItemsProperties::OnModePropertyChanged(
00044     winrt::DependencyObject const& sender,
00045     winrt::DependencyPropertyChangedEventArgs const& args)
00046 {
00047     auto owner = sender.as<winrt::SwipeItems>();
00048     winrt::get_self<SwipeItems>(owner)->OnPropertyChanged(args);
00049 }
00050
00051 void SwipeItemsProperties::Mode(winrt::SwipeMode const& value)
00052 {
00053     [[gsl::suppress(con)]]
00054     {
00055     static_cast<SwipeItems*>(this)->SetValue(s_ModeProperty, ValueHelper<winrt::SwipeMode>::BoxValueIfNecessary(value));
00056     }
00057 }
00058
00059 winrt::SwipeMode SwipeItemsProperties::Mode()
00060 {
00061     return ValueHelper<winrt::SwipeMode>::CastOrUnbox(static_cast<SwipeItems*>(this)->GetValue(s_ModeProperty));
00062 }
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewIntegrationPage Member List

This is the complete list of members for ItemsViewIntegrationPage, including all inherited members.
_asyncEventReportingLock | ItemsViewIntegrationPage | [private]
_averageMonthCount | ItemsViewIntegrationPage | [private]
_bringIntoViewOptions | ItemsViewIntegrationPage | [private]
_colPhotos | ItemsViewIntegrationPage | [private]
_fullLogs | ItemsViewIntegrationPage | [private]
_lstAsyncEventMessage | ItemsViewIntegrationPage | [private]
_monthPhotoCounts | ItemsViewIntegrationPage | [private]
_months | ItemsViewIntegrationPage | [private]
_photoTemplates | ItemsViewIntegrationPage | [private]
_populateAnnotatedScrollBar | ItemsViewIntegrationPage | [private]
_populateAnnotatedScrollBarPending | ItemsViewIntegrationPage | [private]
_populateHeaderPending | ItemsViewIntegrationPage | [private]
_redBrush | ItemsViewIntegrationPage | [private]
_requestedDetailLabelPhotoInYearIndex | ItemsViewIntegrationPage | [private]
_requestedDetailLabelYearIndex | ItemsViewIntegrationPage | [private]
_scrollView | ItemsViewIntegrationPage | [private]
_whiteBrush | ItemsViewIntegrationPage | [private]
_yearCount | ItemsViewIntegrationPage | [private]
_yearPhotoCounts | ItemsViewIntegrationPage | [private]
AnnotatedScrollBar_DetailLabelRequested(AnnotatedScrollBar sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
AnnotatedScrollBar_DetailLabelRequestedLog(AnnotatedScrollBar sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
AnnotatedScrollBar_Scrolling(AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args) | ItemsViewIntegrationPage | [inline, private]
AnnotatedScrollBar_ScrollingLog(AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args) | ItemsViewIntegrationPage | [inline, private]
AnnotatedScrollBar_SizeChanged(object sender, object args) | ItemsViewIntegrationPage | [inline, private]
AppendAsyncEventMessage(string asyncEventMessage) | ItemsViewIntegrationPage | [inline, private]
AppendAsyncEventMessage() | ItemsViewIntegrationPage | [inline, private]
BtnAddItemsSourceItem_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnApplyAverageMonthCount_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnApplyYearCount_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnClearExceptionReport_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnClearFullLog_Click(object sender, RoutedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
BtnClearItemsSource_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnClearLogs_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnForcePopulateHeader_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnGetAverageMonthCount_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnGetFullLog_Click(object sender, RoutedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
BtnGetScrollViewState_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnGetScrollViewVerticalOffset_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnGetYearCount_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnParentItemsView_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnRemoveLastItemsSourceItem_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnResetItemsSource_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnSetAverageMonthCount_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnSetItemsSource_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnSetScrollViewVerticalOffset_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnSetYearCount_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnUnparentDiscardItemsView_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnUnparentItemsView_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
BtnUnparentReparentItemsView_Click(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkAnnotatedScrollBarIsEnabled_IsCheckedChanged(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkCustomUI_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkCustomUI_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkHandleItemsInfoRequested_IsCheckedChanged(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogAnnotatedScrollBarEvents_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogAnnotatedScrollBarEvents_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogAnnotatedScrollBarMessages_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogAnnotatedScrollBarMessages_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsRepeaterEvents_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsRepeaterEvents_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsRepeaterMessages_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsRepeaterMessages_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsViewEvents_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsViewEvents_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsViewMessages_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogItemsViewMessages_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogLinedFlowLayoutEvents_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogLinedFlowLayoutEvents_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogLinedFlowLayoutMessages_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogLinedFlowLayoutMessages_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogs_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogs_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkPageMethods_Checked(object sender, RoutedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
ChkPageMethods_Unchecked(object sender, RoutedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
ChkUseConstantMonthCount_IsCheckedChanged(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ChkUseFastPath_IsCheckedChanged(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ClearFullLog() | ItemsViewIntegrationPage | [inline, private]
CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
CmbSelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
GetFullLog() | ItemsViewIntegrationPage | [inline, private]
GetItemIndexFromLastDetailLabelRequest() | ItemsViewIntegrationPage | [inline, private]
GetMonthNameFromIndex(int monthIndex) | ItemsViewIntegrationPage | [inline, private]
HookAnnotatedScrollBarEvents() | ItemsViewIntegrationPage | [inline, private]
HookLinedFlowLayoutEvents(bool justItemsInfoRequested, bool exceptItemsInfoRequested) | ItemsViewIntegrationPage | [inline, private]
HookPhotosCollectionChanged() | ItemsViewIntegrationPage | [inline, private]
HookScrollViewEvents() | ItemsViewIntegrationPage | [inline, private]
Image_ImageFailed(object sender, ExceptionRoutedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
Image_ImageOpened(object sender, RoutedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
ItemContainer_DragStartingLog(UIElement sender, DragStartingEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsRepeater_LayoutUpdatedLog(object sender, object args) | ItemsViewIntegrationPage | [inline, private]
ItemsRepeater_LoadedLog(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsRepeater_SizeChangedLog(object sender, SizeChangedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsView_GettingFocusLog(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsView_GotFocusLog(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsView_LoadedLog(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsView_LosingFocusLog(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsView_LostFocusLog(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsView_SizeChangedLog(object sender, SizeChangedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ItemsViewIntegrationPage() | ItemsViewIntegrationPage | [inline]
ItemsViewIntegrationPage_KeyDown(object sender, KeyRoutedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
ItemsViewIntegrationPage_Loaded(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
LinedFlowLayout_ArrangeInvalidatedLog(Layout sender, object args) | ItemsViewIntegrationPage | [inline, private]
LinedFlowLayout_ItemsInfoRequested(LinedFlowLayout sender, LinedFlowLayoutItemsInfoRequestedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
LinedFlowLayout_ItemsUnlocked(LinedFlowLayout sender, object args) | ItemsViewIntegrationPage | [inline, private]
LinedFlowLayout_ItemsUnlockedLog(LinedFlowLayout sender, object args) | ItemsViewIntegrationPage | [inline, private]
LinedFlowLayout_MeasureInvalidatedLog(Layout sender, object args) | ItemsViewIntegrationPage | [inline, private]
LogItemsRepeaterInfo() | ItemsViewIntegrationPage | [inline, private]
LogItemsViewInfo() | ItemsViewIntegrationPage | [inline, private]
LogScrollViewInfo() | ItemsViewIntegrationPage | [inline, private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ItemsViewIntegrationPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ItemsViewIntegrationPage | [inline, protected]
Photos_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
PopulateAnnotatedScrollBar() | ItemsViewIntegrationPage | [inline, private]
PopulateHeader() | ItemsViewIntegrationPage | [inline, private]
PopulateHeaderAsync() | ItemsViewIntegrationPage | [inline, private]
PopulatePhotosCollection() | ItemsViewIntegrationPage | [inline, private]
RepopulateAndApplyPhotosCollection() | ItemsViewIntegrationPage | [inline, private]
ScrollController_AddScrollVelocityRequestedLog(IScrollController sender, ScrollControllerAddScrollVelocityRequestedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollController_ScrollByRequestedLog(IScrollController sender, ScrollControllerScrollByRequestedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollController_ScrollToRequestedLog(IScrollController sender, ScrollControllerScrollToRequestedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_ExtentChangedLog(ScrollPresenter sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_LoadedLog(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_ScrollAnimationStartingLog(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_ScrollCompletedLog(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_SizeChangedLog(object sender, SizeChangedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_StateChangedLog(ScrollPresenter sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_ViewChangedLog(ScrollPresenter sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_ZoomAnimationStartingLog(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollPresenter_ZoomCompletedLog(ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ExtentChanged(ScrollView sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ExtentChangedLog(ScrollView sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_LoadedLog(object sender, RoutedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ScrollAnimationStartingLog(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ScrollCompleted(ScrollView sender, ScrollingScrollCompletedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ScrollCompletedLog(ScrollView sender, ScrollingScrollCompletedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_SizeChanged(object sender, SizeChangedEventArgs e) | ItemsViewIntegrationPage | [inline, private]
ScrollView_SizeChangedLog(object sender, SizeChangedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_StateChangedLog(ScrollView sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ViewChangedLog(ScrollView sender, object args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ZoomAnimationStartingLog(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args) | ItemsViewIntegrationPage | [inline, private]
ScrollView_ZoomCompletedLog(ScrollView sender, ScrollingZoomCompletedEventArgs args) | ItemsViewIntegrationPage | [inline, private]
UnhookAnnotatedScrollBarEvents() | ItemsViewIntegrationPage | [inline, private]
UnhookLinedFlowLayoutEvents(bool justItemsInfoRequested, bool exceptItemsInfoRequested) | ItemsViewIntegrationPage | [inline, private]
UnhookPhotosCollectionChanged() | ItemsViewIntegrationPage | [inline, private]
UnhookScrollViewEvents() | ItemsViewIntegrationPage | [inline, private]
UpdateItemsInfoRequestedHandler() | ItemsViewIntegrationPage | [inline, private]
~ItemsViewIntegrationPage() | ItemsViewIntegrationPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/MenuBar.properties.h Source File

  • File List
  • File Members
  • Generated

MenuBar.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class MenuBarProperties
00008 {
00009 public:
00010     MenuBarProperties();
00011
00012     void Items(winrt::IVector<winrt::MenuBarItem> const& value);
00013     winrt::IVector<winrt::MenuBarItem> Items();
00014
00015     static winrt::DependencyProperty ItemsProperty() { return s_ItemsProperty; }
00016
00017     static GlobalDependencyProperty s_ItemsProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsProperties Member List

This is the complete list of members for RadioButtonsProperties, including all inherited members.
ClearProperties() | RadioButtonsProperties | [static]
EnsureProperties() | RadioButtonsProperties | [static]
Header(winrt::IInspectable const &value) | RadioButtonsProperties |
Header() | RadioButtonsProperties |
HeaderProperty() | RadioButtonsProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | RadioButtonsProperties |
HeaderTemplate() | RadioButtonsProperties |
HeaderTemplateProperty() | RadioButtonsProperties | [inline, static]
Items(winrt::IVector< winrt::IInspectable > const &value) | RadioButtonsProperties |
Items() | RadioButtonsProperties |
ItemsProperty() | RadioButtonsProperties | [inline, static]
ItemsSource(winrt::IInspectable const &value) | RadioButtonsProperties |
ItemsSource() | RadioButtonsProperties |
ItemsSourceProperty() | RadioButtonsProperties | [inline, static]
ItemTemplate(winrt::IInspectable const &value) | RadioButtonsProperties |
ItemTemplate() | RadioButtonsProperties |
ItemTemplateProperty() | RadioButtonsProperties | [inline, static]
m_selectionChangedEventSource | RadioButtonsProperties |
MaxColumns(int value) | RadioButtonsProperties |
MaxColumns() | RadioButtonsProperties |
MaxColumnsProperty() | RadioButtonsProperties | [inline, static]
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnHeaderTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnMaxColumnsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnSelectedIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
RadioButtonsProperties() | RadioButtonsProperties |
s_HeaderProperty | RadioButtonsProperties | [static]
s_HeaderTemplateProperty | RadioButtonsProperties | [static]
s_ItemsProperty | RadioButtonsProperties | [static]
s_ItemsSourceProperty | RadioButtonsProperties | [static]
s_ItemTemplateProperty | RadioButtonsProperties | [static]
s_MaxColumnsProperty | RadioButtonsProperties | [static]
s_SelectedIndexProperty | RadioButtonsProperties | [static]
s_SelectedItemProperty | RadioButtonsProperties | [static]
SelectedIndex(int value) | RadioButtonsProperties |
SelectedIndex() | RadioButtonsProperties |
SelectedIndexProperty() | RadioButtonsProperties | [inline, static]
SelectedItem(winrt::IInspectable const &value) | RadioButtonsProperties |
SelectedItem() | RadioButtonsProperties |
SelectedItemProperty() | RadioButtonsProperties | [inline, static]
SelectionChanged(winrt::SelectionChangedEventHandler const &value) | RadioButtonsProperties |
SelectionChanged(winrt::event_token const &token) | RadioButtonsProperties |
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColorToSolidColorBrushConverter Member List

This is the complete list of members for ColorToSolidColorBrushConverter, including all inherited members.
Convert(object value, Type targetType, object parameter, string language) | ColorToSolidColorBrushConverter | [inline]
ConvertBack(object value, Type targetType, object parameter, string language) | ColorToSolidColorBrushConverter | [inline]
Generated on Sun Dec 1 2024 20:54:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/NonVirtualLayoutPages/NonVirtualStackLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • NonVirtualLayoutPages

NonVirtualStackLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using System.Collections.ObjectModel;
00009
00010 namespace MUXControlsTestApp.Samples
00011 {
00012     public sealed partial class NonVirtualStackLayoutSamplePage : Page
00013     {
00014         private ObservableCollection<int> _numbers = new ObservableCollection<int>();
00015         private ObservableCollection<UIElement> _uiElements = new ObservableCollection<UIElement>();
00016         private SolidColorBrush _solidColorBrushRed = new SolidColorBrush(Colors.Red);
00017         private SolidColorBrush _solidColorBrushGreen = new SolidColorBrush(Colors.Green);
00018
00019         public NonVirtualStackLayoutSamplePage()
00020         {
00021             this.InitializeComponent();
00022
00023             for (int i = 0; i < 10; i++)
00024             {
00025                 _numbers.Add(i);
00026                 _uiElements.Add(new TextBlock() { Text = i.ToString(), Foreground = _solidColorBrushRed });
00027             }
00028
00029             itemsRepeater1.ItemsSource = _numbers;
00030             itemsRepeater2.ItemsSource = _uiElements;
00031         }
00032
00033         private void BtnClear1_Click(object sender, RoutedEventArgs e)
00034         {
00035             _numbers.Clear();
00036         }
00037
00038         private void BtnReplace1_Click(object sender, RoutedEventArgs e)
00039         {
00040             int childIndex = int.Parse(txtChildIndex1.Text);
00041             _numbers[childIndex] = _numbers.Count;
00042         }
00043
00044         private void BtnInsert1_Click(object sender, RoutedEventArgs e)
00045         {
00046             int childIndex = int.Parse(txtChildIndex1.Text);
00047             _numbers.Insert(childIndex, _numbers.Count);
00048         }
00049
00050         private void BtnRemoveAt1_Click(object sender, RoutedEventArgs e)
00051         {
00052             int childIndex = int.Parse(txtChildIndex1.Text);
00053             _numbers.RemoveAt(childIndex);
00054         }
00055
00056         private void BtnClear2_Click(object sender, RoutedEventArgs e)
00057         {
00058             _uiElements.Clear();
00059         }
00060
00061         private void BtnReplace2_Click(object sender, RoutedEventArgs e)
00062         {
00063             int childIndex = int.Parse(txtChildIndex2.Text);
00064             _uiElements[childIndex] = new TextBlock() { Text = _uiElements.Count.ToString(), Foreground = _solidColorBrushGreen };
00065         }
00066
00067         private void BtnInsert2_Click(object sender, RoutedEventArgs e)
00068         {
00069             int childIndex = int.Parse(txtChildIndex2.Text);
00070             _uiElements.Insert(childIndex, new TextBlock() { Text = _uiElements.Count.ToString(), Foreground = _solidColorBrushGreen });
00071         }
00072
00073         private void BtnRemoveAt2_Click(object sender, RoutedEventArgs e)
00074         {
00075             int childIndex = int.Parse(txtChildIndex2.Text);
00076             _uiElements.RemoveAt(childIndex);
00077         }
00078     }
00079 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedChevronDownSmallVisualSource_AnimatedVisual Member List

This is the complete list of members for AnimatedChevronDownSmallVisualSource_AnimatedVisual, including all inherited members.
_reusableExpressionAnimation(compositor.CreateExpressionAnimation()) | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline]
AnimatedChevronDownSmallVisualSource_AnimatedVisual(Compositor compositor, CompositionPropertySet themeProperties) | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
CanvasGeometryToIGeometrySource2D(winrt::com_ptr< CanvasGeometry > geo) | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private, static]
Close() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline]
ContainerVisual_0() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
ContainerVisual_1() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
CreateBooleanKeyFrameAnimation(float initialProgress, bool initialValue) | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
CreateVector2KeyFrameAnimation(float initialProgress, winrt::float2 initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
Duration() const | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline]
Geometry() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
InsetClip_0() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, static]
IsVisibleBooleanAnimation_0() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
IsVisibleBooleanAnimation_1() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
OffsetVector2Animation_0() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
OffsetVector2Animation_1() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
PathGeometry() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
Root() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
RootProgress() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
RootVisual() const | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline]
ShapeVisual_0() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
ShapeVisual_1() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
Size() const | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline]
SpriteShape_0() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
SpriteShape_1() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private, static]
ThemeColor_Foreground() | AnimatedChevronDownSmallVisualSource_AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkToolBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkToolBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkToolBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkToolBar)
00012 }
00013
00014 #include "InkToolBar.g.cpp"
00015
00016 GlobalDependencyProperty InkToolBarProperties::s_ActiveToolProperty{ nullptr };
00017 GlobalDependencyProperty InkToolBarProperties::s_ButtonFlyoutPlacementProperty{ nullptr };
00018 GlobalDependencyProperty InkToolBarProperties::s_ChildrenProperty{ nullptr };
00019 GlobalDependencyProperty InkToolBarProperties::s_InitialControlsProperty{ nullptr };
00020 GlobalDependencyProperty InkToolBarProperties::s_InkDrawingAttributesProperty{ nullptr };
00021 GlobalDependencyProperty InkToolBarProperties::s_IsRulerButtonCheckedProperty{ nullptr };
00022 GlobalDependencyProperty InkToolBarProperties::s_IsStencilButtonCheckedProperty{ nullptr };
00023 GlobalDependencyProperty InkToolBarProperties::s_OrientationProperty{ nullptr };
00024 GlobalDependencyProperty InkToolBarProperties::s_TargetInkCanvasProperty{ nullptr };
00025 GlobalDependencyProperty InkToolBarProperties::s_TargetInkPresenterProperty{ nullptr };
00026
00027 InkToolBarProperties::InkToolBarProperties()
00028     : m_activeToolChangedEventSource{static_cast<InkToolBar*>(this)}
00029     , m_eraseAllClickedEventSource{static_cast<InkToolBar*>(this)}
00030     , m_eraserFlyoutItemClickedEventSource{static_cast<InkToolBar*>(this)}
00031     , m_inkDrawingAttributesChangedEventSource{static_cast<InkToolBar*>(this)}
00032     , m_isStencilButtonCheckedChangedEventSource{static_cast<InkToolBar*>(this)}
00033 {
00034     EnsureProperties();
00035 }
00036
00037 void InkToolBarProperties::EnsureProperties()
00038 {
00039     if (!s_ActiveToolProperty)
00040     {
00041         s_ActiveToolProperty =
00042             InitializeDependencyProperty(
00043                 L"ActiveTool",
00044                 winrt::name_of<winrt::InkToolBarToolButton>(),
00045                 winrt::name_of<winrt::InkToolBar>(),
00046                 false /* isAttached */,
00047                 ValueHelper<winrt::InkToolBarToolButton>::BoxedDefaultValue(),
00048                 nullptr);
00049     }
00050     if (!s_ButtonFlyoutPlacementProperty)
00051     {
00052         s_ButtonFlyoutPlacementProperty =
00053             InitializeDependencyProperty(
00054                 L"ButtonFlyoutPlacement",
00055                 winrt::name_of<winrt::InkToolBarButtonFlyoutPlacement>(),
00056                 winrt::name_of<winrt::InkToolBar>(),
00057                 false /* isAttached */,
00058                 ValueHelper<winrt::InkToolBarButtonFlyoutPlacement>::BoxedDefaultValue(),
00059                 nullptr);
00060     }
00061     if (!s_ChildrenProperty)
00062     {
00063         s_ChildrenProperty =
00064             InitializeDependencyProperty(
00065                 L"Children",
00066                 winrt::name_of<winrt::DependencyObjectCollection>(),
00067                 winrt::name_of<winrt::InkToolBar>(),
00068                 false /* isAttached */,
00069                 ValueHelper<winrt::DependencyObjectCollection>::BoxedDefaultValue(),
00070                 nullptr);
00071     }
00072     if (!s_InitialControlsProperty)
00073     {
00074         s_InitialControlsProperty =
00075             InitializeDependencyProperty(
00076                 L"InitialControls",
00077                 winrt::name_of<winrt::InkToolBarInitialControls>(),
00078                 winrt::name_of<winrt::InkToolBar>(),
00079                 false /* isAttached */,
00080                 ValueHelper<winrt::InkToolBarInitialControls>::BoxedDefaultValue(),
00081                 nullptr);
00082     }
00083     if (!s_InkDrawingAttributesProperty)
00084     {
00085         s_InkDrawingAttributesProperty =
00086             InitializeDependencyProperty(
00087                 L"InkDrawingAttributes",
00088                 winrt::name_of<winrt::InkDrawingAttributes>(),
00089                 winrt::name_of<winrt::InkToolBar>(),
00090                 false /* isAttached */,
00091                 ValueHelper<winrt::InkDrawingAttributes>::BoxedDefaultValue(),
00092                 nullptr);
00093     }
00094     if (!s_IsRulerButtonCheckedProperty)
00095     {
00096         s_IsRulerButtonCheckedProperty =
00097             InitializeDependencyProperty(
00098                 L"IsRulerButtonChecked",
00099                 winrt::name_of<bool>(),
00100                 winrt::name_of<winrt::InkToolBar>(),
00101                 false /* isAttached */,
00102                 ValueHelper<bool>::BoxedDefaultValue(),
00103                 nullptr);
00104     }
00105     if (!s_IsStencilButtonCheckedProperty)
00106     {
00107         s_IsStencilButtonCheckedProperty =
00108             InitializeDependencyProperty(
00109                 L"IsStencilButtonChecked",
00110                 winrt::name_of<bool>(),
00111                 winrt::name_of<winrt::InkToolBar>(),
00112                 false /* isAttached */,
00113                 ValueHelper<bool>::BoxedDefaultValue(),
00114                 nullptr);
00115     }
00116     if (!s_OrientationProperty)
00117     {
00118         s_OrientationProperty =
00119             InitializeDependencyProperty(
00120                 L"Orientation",
00121                 winrt::name_of<winrt::Orientation>(),
00122                 winrt::name_of<winrt::InkToolBar>(),
00123                 false /* isAttached */,
00124                 ValueHelper<winrt::Orientation>::BoxedDefaultValue(),
00125                 nullptr);
00126     }
00127     if (!s_TargetInkCanvasProperty)
00128     {
00129         s_TargetInkCanvasProperty =
00130             InitializeDependencyProperty(
00131                 L"TargetInkCanvas",
00132                 winrt::name_of<winrt::InkCanvas>(),
00133                 winrt::name_of<winrt::InkToolBar>(),
00134                 false /* isAttached */,
00135                 ValueHelper<winrt::InkCanvas>::BoxedDefaultValue(),
00136                 nullptr);
00137     }
00138     if (!s_TargetInkPresenterProperty)
00139     {
00140         s_TargetInkPresenterProperty =
00141             InitializeDependencyProperty(
00142                 L"TargetInkPresenter",
00143                 winrt::name_of<winrt::IInspectable>(),
00144                 winrt::name_of<winrt::InkToolBar>(),
00145                 false /* isAttached */,
00146                 ValueHelper<winrt::IInspectable>::BoxedDefaultValue(),
00147                 nullptr);
00148     }
00149 }
00150
00151 void InkToolBarProperties::ClearProperties()
00152 {
00153     s_ActiveToolProperty = nullptr;
00154     s_ButtonFlyoutPlacementProperty = nullptr;
00155     s_ChildrenProperty = nullptr;
00156     s_InitialControlsProperty = nullptr;
00157     s_InkDrawingAttributesProperty = nullptr;
00158     s_IsRulerButtonCheckedProperty = nullptr;
00159     s_IsStencilButtonCheckedProperty = nullptr;
00160     s_OrientationProperty = nullptr;
00161     s_TargetInkCanvasProperty = nullptr;
00162     s_TargetInkPresenterProperty = nullptr;
00163 }
00164
00165 void InkToolBarProperties::ActiveTool(winrt::InkToolBarToolButton const& value)
00166 {
00167     [[gsl::suppress(con)]]
00168     {
00169     static_cast<InkToolBar*>(this)->SetValue(s_ActiveToolProperty, ValueHelper<winrt::InkToolBarToolButton>::BoxValueIfNecessary(value));
00170     }
00171 }
00172
00173 winrt::InkToolBarToolButton InkToolBarProperties::ActiveTool()
00174 {
00175     return ValueHelper<winrt::InkToolBarToolButton>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_ActiveToolProperty));
00176 }
00177
00178 void InkToolBarProperties::ButtonFlyoutPlacement(winrt::InkToolBarButtonFlyoutPlacement const& value)
00179 {
00180     [[gsl::suppress(con)]]
00181     {
00182     static_cast<InkToolBar*>(this)->SetValue(s_ButtonFlyoutPlacementProperty, ValueHelper<winrt::InkToolBarButtonFlyoutPlacement>::BoxValueIfNecessary(value));
00183     }
00184 }
00185
00186 winrt::InkToolBarButtonFlyoutPlacement InkToolBarProperties::ButtonFlyoutPlacement()
00187 {
00188     return ValueHelper<winrt::InkToolBarButtonFlyoutPlacement>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_ButtonFlyoutPlacementProperty));
00189 }
00190
00191 void InkToolBarProperties::Children(winrt::DependencyObjectCollection const& value)
00192 {
00193     [[gsl::suppress(con)]]
00194     {
00195     static_cast<InkToolBar*>(this)->SetValue(s_ChildrenProperty, ValueHelper<winrt::DependencyObjectCollection>::BoxValueIfNecessary(value));
00196     }
00197 }
00198
00199 winrt::DependencyObjectCollection InkToolBarProperties::Children()
00200 {
00201     return ValueHelper<winrt::DependencyObjectCollection>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_ChildrenProperty));
00202 }
00203
00204 void InkToolBarProperties::InitialControls(winrt::InkToolBarInitialControls const& value)
00205 {
00206     [[gsl::suppress(con)]]
00207     {
00208     static_cast<InkToolBar*>(this)->SetValue(s_InitialControlsProperty, ValueHelper<winrt::InkToolBarInitialControls>::BoxValueIfNecessary(value));
00209     }
00210 }
00211
00212 winrt::InkToolBarInitialControls InkToolBarProperties::InitialControls()
00213 {
00214     return ValueHelper<winrt::InkToolBarInitialControls>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_InitialControlsProperty));
00215 }
00216
00217 void InkToolBarProperties::InkDrawingAttributes(winrt::InkDrawingAttributes const& value)
00218 {
00219     [[gsl::suppress(con)]]
00220     {
00221     static_cast<InkToolBar*>(this)->SetValue(s_InkDrawingAttributesProperty, ValueHelper<winrt::InkDrawingAttributes>::BoxValueIfNecessary(value));
00222     }
00223 }
00224
00225 winrt::InkDrawingAttributes InkToolBarProperties::InkDrawingAttributes()
00226 {
00227     return ValueHelper<winrt::InkDrawingAttributes>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_InkDrawingAttributesProperty));
00228 }
00229
00230 void InkToolBarProperties::IsRulerButtonChecked(bool value)
00231 {
00232     [[gsl::suppress(con)]]
00233     {
00234     static_cast<InkToolBar*>(this)->SetValue(s_IsRulerButtonCheckedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00235     }
00236 }
00237
00238 bool InkToolBarProperties::IsRulerButtonChecked()
00239 {
00240     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_IsRulerButtonCheckedProperty));
00241 }
00242
00243 void InkToolBarProperties::IsStencilButtonChecked(bool value)
00244 {
00245     [[gsl::suppress(con)]]
00246     {
00247     static_cast<InkToolBar*>(this)->SetValue(s_IsStencilButtonCheckedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00248     }
00249 }
00250
00251 bool InkToolBarProperties::IsStencilButtonChecked()
00252 {
00253     return ValueHelper<bool>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_IsStencilButtonCheckedProperty));
00254 }
00255
00256 void InkToolBarProperties::Orientation(winrt::Orientation const& value)
00257 {
00258     [[gsl::suppress(con)]]
00259     {
00260     static_cast<InkToolBar*>(this)->SetValue(s_OrientationProperty, ValueHelper<winrt::Orientation>::BoxValueIfNecessary(value));
00261     }
00262 }
00263
00264 winrt::Orientation InkToolBarProperties::Orientation()
00265 {
00266     return ValueHelper<winrt::Orientation>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_OrientationProperty));
00267 }
00268
00269 void InkToolBarProperties::TargetInkCanvas(winrt::InkCanvas const& value)
00270 {
00271     [[gsl::suppress(con)]]
00272     {
00273     static_cast<InkToolBar*>(this)->SetValue(s_TargetInkCanvasProperty, ValueHelper<winrt::InkCanvas>::BoxValueIfNecessary(value));
00274     }
00275 }
00276
00277 winrt::InkCanvas InkToolBarProperties::TargetInkCanvas()
00278 {
00279     return ValueHelper<winrt::InkCanvas>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_TargetInkCanvasProperty));
00280 }
00281
00282 void InkToolBarProperties::TargetInkPresenter(winrt::IInspectable const& value)
00283 {
00284     [[gsl::suppress(con)]]
00285     {
00286     static_cast<InkToolBar*>(this)->SetValue(s_TargetInkPresenterProperty, ValueHelper<winrt::IInspectable>::BoxValueIfNecessary(value));
00287     }
00288 }
00289
00290 winrt::IInspectable InkToolBarProperties::TargetInkPresenter()
00291 {
00292     return ValueHelper<winrt::IInspectable>::CastOrUnbox(static_cast<InkToolBar*>(this)->GetValue(s_TargetInkPresenterProperty));
00293 }
00294
00295 winrt::event_token InkToolBarProperties::ActiveToolChanged(winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> const& value)
00296 {
00297     return m_activeToolChangedEventSource.add(value);
00298 }
00299
00300 void InkToolBarProperties::ActiveToolChanged(winrt::event_token const& token)
00301 {
00302     m_activeToolChangedEventSource.remove(token);
00303 }
00304
00305 winrt::event_token InkToolBarProperties::EraseAllClicked(winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> const& value)
00306 {
00307     return m_eraseAllClickedEventSource.add(value);
00308 }
00309
00310 void InkToolBarProperties::EraseAllClicked(winrt::event_token const& token)
00311 {
00312     m_eraseAllClickedEventSource.remove(token);
00313 }
00314
00315 winrt::event_token InkToolBarProperties::EraserFlyoutItemClicked(winrt::TypedEventHandler<winrt::InkToolBarEraserFlyoutItemClickedEventArgs, winrt::IInspectable> const& value)
00316 {
00317     return m_eraserFlyoutItemClickedEventSource.add(value);
00318 }
00319
00320 void InkToolBarProperties::EraserFlyoutItemClicked(winrt::event_token const& token)
00321 {
00322     m_eraserFlyoutItemClickedEventSource.remove(token);
00323 }
00324
00325 winrt::event_token InkToolBarProperties::InkDrawingAttributesChanged(winrt::TypedEventHandler<winrt::InkToolBar, winrt::IInspectable> const& value)
00326 {
00327     return m_inkDrawingAttributesChangedEventSource.add(value);
00328 }
00329
00330 void InkToolBarProperties::InkDrawingAttributesChanged(winrt::event_token const& token)
00331 {
00332     m_inkDrawingAttributesChangedEventSource.remove(token);
00333 }
00334
00335 winrt::event_token InkToolBarProperties::IsStencilButtonCheckedChanged(winrt::TypedEventHandler<winrt::InkToolBar, winrt::InkToolBarIsStencilButtonCheckedChangedEventArgs> const& value)
00336 {
00337     return m_isStencilButtonCheckedChangedEventSource.add(value);
00338 }
00339
00340 void InkToolBarProperties::IsStencilButtonCheckedChanged(winrt::event_token const& token)
00341 {
00342     m_isStencilButtonCheckedChangedEventSource.remove(token);
00343 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/ApiTests/Lights_ApiTests/LightConfigurationTests.cs Source File

  • File List
  • File Members
  • Lights
  • ApiTests
  • Lights_ApiTests

LightConfigurationTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using MUXControlsTestApp.Utilities;
00007 using Windows.ApplicationModel.Core;
00008 using Windows.Foundation.Metadata;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Media;
00012 using Microsoft.UI.Xaml.Controls.Primitives;
00013 using System.Threading;
00014 using Microsoft.UI.Xaml.Markup;
00015 using System.Collections.Generic;
00016 using MUXControlsTestApp;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021
00022 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00023 {
00024     public class MainWindowLightConfiguration : IDisposable
00025     {
00026         public CoreApplicationView View = null;
00027         public MainWindowLightConfiguration()
00028         {
00029             RunOnUIThread.Execute(() =>
00030             {
00031                 View = CoreApplication.MainView;
00032             });
00033             IdleSynchronizer.Wait();
00034         }
00035
00036         public void Dispose()
00037         {
00038         }
00039     }
00040
00041     public class SecondaryWindowLightConfiguration : IDisposable
00042     {
00043         public CoreApplicationView View = null;
00044         public SecondaryWindowLightConfiguration()
00045         {
00046             View = ViewHelper.MakeSecondaryView(() =>
00047             {
00048                 App.CurrentWindow.Content = new Frame();
00049             });
00050         }
00051
00052         public void Dispose()
00053         {
00054             ViewHelper.CloseSecondaryView(View);
00055         }
00056     }
00057
00058     [TestClass]
00059     public class LightConfigurationTests : ApiTestBase
00060     {
00061         MediaPlayerElement _mpe;
00062         AutoResetEvent _mediaFullScreened;
00063         AutoResetEvent _cleanupVerified;
00064
00065         DispatcherTimer _lightValidationTimer;
00066         TimeSpan _pollInterval = new TimeSpan(16667);      // 16ms
00067         int _pollMaxRetries = 60;
00068         int _pollRetry = 0;
00069         UIElement _visualRoot;
00070         UIElement _popupRoot;
00071         UIElement _fullWindowMediaRoot;
00072         AutoResetEvent _validationCompleted;
00073
00074         // Tracked by Task 30789390: Re-enable disabled tests
00075         //[TestMethod]
00076         [TestProperty("Ignore", "True")] // TODO 29556562: Disabled after converting MUXControlsTestApp to a desktop .NET 5 app.  Re-enable when fixed.
00077         public void VerifyLightsOnMainWindow()
00078         {
00079             using (var config = new MainWindowLightConfiguration())
00080             {
00081                 VerifyLights(config.View, false, false);
00082             }
00083         }
00084
00085         [TestMethod]
00086         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125 and internal issue 18287798
00087         public void VerifyLightsOnSecondaryWindow()
00088         {
00089             using (var config = new SecondaryWindowLightConfiguration())
00090             {
00091                 VerifyLights(config.View, false, false);
00092             }
00093         }
00094
00095         [TestMethod]
00096         [TestProperty("Ignore", "True")] // TODO 29556562: Disabled after converting MUXControlsTestApp to a desktop .NET 5 app.  Re-enable when fixed.
00097         public void VerifyLightsAfterResettingContentOnMainWindow()
00098         {
00099             using (var config = new MainWindowLightConfiguration())
00100             {
00101                 VerifyLights(config.View, false, true);
00102             }
00103         }
00104
00105         [TestMethod]
00106         [TestProperty("Ignore", "True")] // Disabled as per tracking issue #3125 and internal issue 17808897
00107         public void VerifyLightsAfterResettingContentOnSecondaryWindow()
00108         {
00109             using (var config = new SecondaryWindowLightConfiguration())
00110             {
00111                 VerifyLights(config.View, false, true);
00112             }
00113         }
00114
00115         [TestMethod]
00116         [TestProperty("Ignore", "True")]  // Disabled as per tracking issue #3125 and internal issue 17808897
00117         public void VerifyLightsAttachedDuringLayoutOnSecondaryWindow()
00118         {
00119             using (var config = new SecondaryWindowLightConfiguration())
00120             {
00121                 VerifyLights(config.View, true, false);
00122             }
00123         }
00124
00125         void VerifyLights(CoreApplicationView whichView, bool forceLightAttachDuringLayout, bool resetWindowContent)
00126         {
00127             AutoResetEvent popupOpened = null;
00128             Popup myPopup = null;
00129             StackPanel mySPRoot = null;
00130
00131             RunOnUIThread.Execute(whichView, () =>
00132             {
00133                 mySPRoot = new StackPanel();
00134
00135                 // Lights will be created when the first RevealBrush enters the tree
00136                 if (!forceLightAttachDuringLayout)
00137                 {
00138                     Button myButton = new Button();
00139                     myButton.Width = 75;
00140                     myButton.Height = 50;
00141                     myButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
00142                     mySPRoot.Children.Add(myButton);
00143                 }
00144                 else
00145                 {
00146                     string popupWithGridview = TestUtilities.ProcessTestXamlForRepo(
00147                         @"<Popup xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:controls='using:Microsoft.UI.Xaml.Controls' x:Name='MarkupPopup' IsOpen='False'>
00148                         <Popup.Resources>
00149                             <Style TargetType='GridViewItem' x:Key='RevealExampleGridViewItem'>
00150                                 <Setter Property='Background' Value='Transparent' />
00151                                 <Setter Property='HorizontalContentAlignment' Value='Center' />
00152                                 <Setter Property='VerticalContentAlignment' Value='Center' />
00153                                 <Setter Property='Template'>
00154                                     <Setter.Value>
00155                                         <ControlTemplate TargetType='GridViewItem'>
00156                                             <controls:RevealListViewItemPresenter ContentTransitions='{TemplateBinding ContentTransitions}'
00157                                         SelectionCheckMarkVisualEnabled='{ThemeResource GridViewItemSelectionCheckMarkVisualEnabled}'
00158                                         CheckBrush='Transparent'
00159                                         CheckBoxBrush='Transparent'
00160                                         DragBackground='{ThemeResource GridViewItemDragBackground}'
00161                                         DragForeground='{ThemeResource GridViewItemDragForeground}'
00162                                         FocusBorderBrush='{ThemeResource GridViewItemFocusBorderBrush}'
00163                                         FocusSecondaryBorderBrush='{ThemeResource GridViewItemFocusSecondaryBorderBrush}'
00164                                         PlaceholderBackground='Transparent'
00165                                         PointerOverBackground='Transparent'
00166                                         PointerOverForeground='{ThemeResource GridViewItemForegroundPointerOver}'
00167                                         SelectedBackground='Transparent'
00168                                         SelectedForeground='{ThemeResource GridViewItemForegroundSelected}'
00169                                         SelectedPointerOverBackground='Transparent'
00170                                         PressedBackground='Transparent'
00171                                         SelectedPressedBackground='Transparent'
00172                                         DisabledOpacity='{ThemeResource ListViewItemDisabledThemeOpacity}'
00173                                         DragOpacity='{ThemeResource ListViewItemDragThemeOpacity}'
00174                                         ReorderHintOffset='{ThemeResource GridViewItemReorderHintThemeOffset}'
00175                                         HorizontalContentAlignment='{TemplateBinding HorizontalContentAlignment}'
00176                                         VerticalContentAlignment='{TemplateBinding VerticalContentAlignment}'
00177                                         ContentMargin='{TemplateBinding Padding}'
00178                                         CheckMode='{ThemeResource GridViewItemCheckMode}' />
00179                                         </ControlTemplate>
00180                                     </Setter.Value>
00181                                 </Setter>
00182                             </Style>
00183
00184                             <DataTemplate x:Key='BackgroundBrushDataTemplate'>
00185                                 <Grid Margin='5' Background='{Binding Value}' >
00186                                     <TextBlock
00187                                 Margin='3'
00188                                 FontSize='12'
00189                                 MinWidth='200'
00190                                 MinHeight='36'
00191                                 MaxWidth='330'
00192                                 TextWrapping='Wrap'
00193                                 Text='{Binding Key}' />
00194                                 </Grid>
00195                             </DataTemplate>
00196                             <DataTemplate x:Key='BorderBrushDataTemplate'>
00197                                 <Border Margin='5' BorderBrush='{Binding Value}' BorderThickness='3'>
00198                                     <TextBlock
00199                                 Margin='3'
00200                                 FontSize='12'
00201                                 MinWidth='200'
00202                                 MinHeight='36'
00203                                 MaxWidth='330'
00204                                 TextWrapping='Wrap'
00205                                 Text='{Binding Key}' />
00206                                 </Border>
00207                             </DataTemplate>
00208                         </Popup.Resources>
00209                         <GridView Name='BackgroundList' ItemsSource='{Binding RevealBackgroundBrushes, Mode=OneWay}' ItemContainerStyle='{StaticResource RevealExampleGridViewItem}' ItemTemplate='{StaticResource BackgroundBrushDataTemplate}' MaxWidth='700' Margin='10' MaxHeight='200'/>
00210                     </Popup>");
00211
00212                     myPopup = XamlReader.Load(popupWithGridview) as Popup;
00213                     myPopup.DataContext = this;
00214                     mySPRoot.Children.Add(myPopup);
00215                 }
00216
00217                 if (whichView != CoreApplication.MainView)
00218                 {
00219                     App.CurrentWindow.Content = mySPRoot;
00220                 }
00221                 else
00222                 {
00223                     Content = mySPRoot;
00224                 }
00225             });
00226             IdleSynchronizer.Wait();
00227
00228             if (resetWindowContent)
00229             {
00230                 RunOnUIThread.Execute(whichView, () =>
00231                 {
00232                     StackPanel newSPRoot = new StackPanel();
00233                     Button myButton = new Button();
00234                     myButton.Width = 75;
00235                     myButton.Height = 50;
00236                     myButton.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
00237                     newSPRoot.Children.Add(myButton);
00238
00239                     if (whichView != CoreApplication.MainView)
00240                     {
00241                         App.CurrentWindow.Content = newSPRoot;
00242
00243                     }
00244                     else
00245                     {
00246                         Content = newSPRoot;
00247                     }
00248                 });
00249                 IdleSynchronizer.Wait();
00250             }
00251
00252             RunOnUIThread.Execute(whichView, () =>
00253             {
00254                 if (forceLightAttachDuringLayout)
00255                 {
00256                     myPopup.IsOpen = true;
00257                 }
00258
00259             // Find and store public Visual Root
00260             _visualRoot = GetTopParent(App.CurrentWindow.Content);
00261
00262                 popupOpened = new AutoResetEvent(false);
00263             // Make an unparented popup and open it so we can check that the popup root has lights set on it too.
00264             Popup popup = new Popup();
00265                 popup.Child = new Grid();
00266                 popup.Opened += (sender, args) =>
00267                 {
00268
00269                 // Find and store Popup Root
00270                 _popupRoot = GetTopParent(popup.Child);
00271                     Verify.AreNotEqual(_visualRoot, _popupRoot);
00272                     popup.IsOpen = false;
00273                     popupOpened.Set();
00274                 };
00275                 popup.IsOpen = true;
00276             });
00277             IdleSynchronizer.Wait();
00278
00279             Verify.IsTrue(popupOpened.WaitOne(TimeSpan.FromMinutes(2)), "Waiting for popup to open ");
00280             IdleSynchronizer.Wait();
00281
00282             RunOnUIThread.Execute(whichView, () =>
00283             {
00284                 _mediaFullScreened = new AutoResetEvent(false);
00285
00286                 Log.Comment("Creating MediaPlayerElement and going to full screen.");
00287                 _mpe = new MediaPlayerElement();
00288                 _mpe.AreTransportControlsEnabled = true;
00289                 mySPRoot.Children.Add(_mpe);
00290                 _mpe.IsFullWindow = true;
00291                 XamlControlsResources.EnsureRevealLights(_mpe.TransportControls);
00292                 CompositionTarget.Rendering += CompositionTarget_Rendering;
00293             });
00294
00295             Verify.IsTrue(_mediaFullScreened.WaitOne(TimeSpan.FromMinutes(2)), "Waiting for media player to go full screen");
00296             IdleSynchronizer.Wait();
00297
00298             // Validate each root has the expected lights
00299             RunOnUIThread.Execute(whichView, () =>
00300             {
00301                 _pollRetry = 0;
00302                 _validationCompleted = new AutoResetEvent(false);
00303                 _lightValidationTimer = new DispatcherTimer();
00304                 _lightValidationTimer.Interval = _pollInterval;
00305                 _lightValidationTimer.Tick += PollTimer_Tick;
00306                 _lightValidationTimer.Start();
00307             });
00308
00309             Verify.IsTrue(_validationCompleted.WaitOne(TimeSpan.FromMinutes(2)), "Waiting for light validation to complete");
00310             IdleSynchronizer.Wait();
00311
00312             RunOnUIThread.Execute(whichView, () =>
00313             {
00314                 if (whichView == CoreApplication.MainView)
00315                 {
00316                     Content = null;
00317                 }
00318                 else
00319                 {
00320                     App.CurrentWindow.Content = null;
00321                 }
00322             });
00323             IdleSynchronizer.Wait();
00324
00325             _cleanupVerified = new AutoResetEvent(false);
00326             RunOnUIThread.Execute(whichView, () =>
00327             {
00328             // RevealBrush cleans itself up in a CompositionTarget.Rendering callback. Put the cleanup validation in CT.R
00329             // as well to let the cleanup code run.
00330             CompositionTarget.Rendering += CTR_CheckCleanup;
00331             });
00332
00333             Verify.IsTrue(_cleanupVerified.WaitOne(TimeSpan.FromMinutes(1)), "Waiting for cleanup validation");
00334         }
00335
00336         private void CompositionTarget_Rendering(object sender, object e)
00337         {
00338             CompositionTarget.Rendering -= CompositionTarget_Rendering;
00339
00340             // Find and store FullWindow Media Root
00341             _fullWindowMediaRoot = GetTopParent(_mpe.TransportControls);
00342             Verify.AreNotEqual(_visualRoot, _fullWindowMediaRoot);
00343
00344             _mpe.IsFullWindow = false;
00345             _mediaFullScreened.Set();
00346         }
00347
00348         private void CTR_CheckCleanup(object sender, object e)
00349         {
00350             CompositionTarget.Rendering -= CTR_CheckCleanup;
00351
00352             Log.Comment("Check that lights are detached once all RevealBrushes in the main tree are gone");
00353
00354             Verify.AreEqual(_visualRoot.Lights.Count, 0, "App.CurrentWindow.Content.Lights.Count should be 0");
00355             Verify.AreEqual(_popupRoot.Lights.Count, 0, "PopupRoot.Lights.Count should be 0");
00356             // In RS3 we made a change where WUX internally sets lights on the RootScrollViewer on the RootVisual instead. If that
00357             // happens, then we don't need to attach lights to the other roots. This change was made around the time that
00358             // Symbol.GlobalNavigationButton was added.
00359             bool wuxSetsRSVLightOnRootVisual = ApiInformation.IsEnumNamedValuePresent("Microsoft.UI.Xaml.Controls.Symbol", "GlobalNavigationButton");
00360             if (!wuxSetsRSVLightOnRootVisual)
00361             {
00362                 Verify.AreEqual(_fullWindowMediaRoot.Lights.Count, 5, "FullWindowMediaRoot.Lights.Count should be 5 (because they were manually added)");
00363             }
00364             else
00365             {
00366                 Verify.AreEqual(_fullWindowMediaRoot.Lights.Count, 0, "FullWindowMediaRoot.Lights.Count should be 0 (because they were never manually added)");
00367             }
00368
00369             _cleanupVerified.Set();
00370         }
00371
00372         private UIElement GetTopParent(UIElement current)
00373         {
00374             UIElement parent = current;
00375             do
00376             {
00377                 current = parent;
00378                 parent = (UIElement)VisualTreeHelper.GetParent(current);
00379             } while (parent != null);
00380
00381             return current;
00382         }
00383
00384         private void PollTimer_Tick(object sender, object e)
00385         {
00386             int expectedLightsOnPopupRoot = 5;
00387             int expectedLightsOnFWMediaRoot = 5;
00388
00389             // In RS3 we made a change where WUX internally sets lights on the RootScrollViewer on the RootVisual instead. If that
00390             // happens, then we don't need to attach lights to the other roots. This change was made around the time that
00391             // Symbol.GlobalNavigationButton was added.
00392             bool wuxSetsRSVLightOnRootVisual = ApiInformation.IsEnumNamedValuePresent("Microsoft.UI.Xaml.Controls.Symbol", "GlobalNavigationButton");
00393             if (wuxSetsRSVLightOnRootVisual)
00394             {
00395                 Log.Comment("WUX sets RootScrollViewer lights on root visual");
00396                 expectedLightsOnPopupRoot = 0;
00397                 expectedLightsOnFWMediaRoot = 0;
00398             }
00399
00400             bool rootHaslights = _visualRoot.Lights.Count == 5;
00401             bool popupRootHaslights = _popupRoot.Lights.Count == expectedLightsOnPopupRoot;
00402             bool fullWindowMediaHaslights = _fullWindowMediaRoot.Lights.Count == expectedLightsOnFWMediaRoot;
00403
00404             _pollRetry++;
00405             Log.Comment("Validating lights, attempt #" + _pollRetry);
00406
00407             if ((rootHaslights && popupRootHaslights && fullWindowMediaHaslights) ||
00408                 _pollRetry == _pollMaxRetries)
00409             {
00410                 Verify.AreEqual(_visualRoot.Lights.Count, 5, "App.CurrentWindow.Content.Lights.Count should be 5");
00411                 Verify.AreEqual(_popupRoot.Lights.Count, expectedLightsOnPopupRoot, "PopupRoot.Lights.Count should be " + expectedLightsOnPopupRoot);
00412                 Verify.AreEqual(_fullWindowMediaRoot.Lights.Count, expectedLightsOnFWMediaRoot, "FullWindowMediaRoot.Lights.Count should be " + expectedLightsOnFWMediaRoot);
00413
00414                 ((DispatcherTimer)sender).Stop();
00415                 _validationCompleted.Set();
00416             }
00417             else
00418             {
00419                 Log.Comment("App.CurrentWindow.Content.Lights.Count is " + _visualRoot.Lights.Count + ", should be 5");
00420                 Log.Comment("PopupRoot.Lights.Count is " + _popupRoot.Lights.Count + ", should be " + expectedLightsOnPopupRoot);
00421                 Log.Comment("FullWindowMediaRoot.Lights.Count is " + _fullWindowMediaRoot.Lights.Count + ", should be " + expectedLightsOnFWMediaRoot);
00422             }
00423         }
00424
00425         public static IEnumerable<string> BackgroundBrushNames
00426         {
00427             get
00428             {
00429                 return new List<string>() {
00430                     "SystemControlBackgroundBaseLowRevealBackgroundBrush",
00431                     "SystemControlTransparentRevealBackgroundBrush",
00432                     "SystemControlHighlightAccentRevealBackgroundBrush",
00433                     "SystemControlHighlightAccent3RevealBackgroundBrush",
00434                     "SystemControlHighlightAccent2RevealBackgroundBrush",
00435                     "SystemControlHighlightListMediumRevealBackgroundBrush",
00436                     "SystemControlHighlightListLowRevealBackgroundBrush",
00437                     "SystemControlBackgroundBaseMediumLowRevealBaseLowBackgroundBrush",
00438                     "SystemControlHighlightBaseMediumLowRevealAccentBackgroundBrush",
00439                     "SystemControlHighlightListMediumRevealListLowBackgroundBrush",
00440                     "SystemControlHighlightAccent3RevealAccent2BackgroundBrush"
00441                 };
00442             }
00443         }
00444
00445         public static string GetBrushName(string fullName)
00446         {
00447             //SystemControlTransparentRevealBackgroundBrush
00448             //SystemControlBackgroundTransparentRevealBorderBrush
00449             if (fullName == null || fullName.Length <= 24)
00450                 return string.Empty;
00451
00452             return fullName.Substring(19, fullName.Length - 24);
00453         }
00454
00455         public IEnumerable<KeyValuePair<string, Brush>> RevealBackgroundBrushes
00456         {
00457             get
00458             {
00459                 foreach (var brushName in BackgroundBrushNames)
00460                 {
00461                     var brush = Application.Current.Resources[brushName] as Brush;
00462                     if (brush != null)
00463                         yield return new KeyValuePair<string, Brush>(GetBrushName(brushName), brush);
00464                 }
00465             }
00466         }
00467
00468     }
00469 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationView.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006
00007 #include "NavigationView.h"
00008 #include "Vector.h"
00009 #include "BindableVector.h"
00010 #include "NavigationViewDisplayModeChangedEventArgs.h"
00011 #include "NavigationViewPaneClosingEventArgs.h"
00012 #include "NavigationViewBackRequestedEventArgs.h"
00013 #include "ResourceAccessor.h"
00014 #include "CppWinRTHelpers.h"
00015 #include "NavigationViewItem.h"
00016 #include "NavigationViewSelectionChangedEventArgs.h"
00017 #include "NavigationViewItemInvokedEventArgs.h"
00018 #include "RuntimeProfiler.h"
00019 #include "Utils.h"
00020 #include "MuxcTraceLogging.h"
00021 #include "NavigationViewItemBaseRevokers.h"
00022 #include "IndexPath.h"
00023 #include "InspectingDataSource.h"
00024 #include "NavigationViewAutomationPeer.h"
00025 #include "StackLayout.h"
00026 #include "ItemsRepeater.h"
00027 #include <ItemsRepeater.common.h>
00028 #include "NavigationViewItemExpandingEventArgs.h"
00029 #include "NavigationViewItemCollapsedEventArgs.h"
00030 #include "InspectingDataSource.h"
00031
00032 // General items
00033 static constexpr auto c_togglePaneButtonName = L"TogglePaneButton"sv;
00034 static constexpr auto c_paneTitleHolderFrameworkElement = L"PaneTitleHolder"sv;
00035 static constexpr auto c_paneTitleFrameworkElement = L"PaneTitleTextBlock"sv;
00036 static constexpr auto c_rootSplitViewName = L"RootSplitView"sv;
00037 static constexpr auto c_menuItemsHost = L"MenuItemsHost"sv;
00038 static constexpr auto c_footerMenuItemsHost = L"FooterMenuItemsHost"sv;
00039 static constexpr auto c_selectionIndicatorName = L"SelectionIndicator"sv;
00040 static constexpr auto c_paneContentGridName = L"PaneContentGrid"sv;
00041 static constexpr auto c_rootGridName = L"RootGrid"sv;
00042 static constexpr auto c_contentGridName = L"ContentGrid"sv;
00043 static constexpr auto c_searchButtonName = L"PaneAutoSuggestButton"sv;
00044 static constexpr auto c_paneToggleButtonIconGridColumnName = L"PaneToggleButtonIconWidthColumn"sv;
00045 static constexpr auto c_togglePaneTopPadding = L"TogglePaneTopPadding"sv;
00046 static constexpr auto c_contentPaneTopPadding = L"ContentPaneTopPadding"sv;
00047 static constexpr auto c_contentLeftPadding = L"ContentLeftPadding"sv;
00048 static constexpr auto c_navViewBackButton = L"NavigationViewBackButton"sv;
00049 static constexpr auto c_navViewBackButtonToolTip = L"NavigationViewBackButtonToolTip"sv;
00050 static constexpr auto c_navViewCloseButton = L"NavigationViewCloseButton"sv;
00051 static constexpr auto c_navViewCloseButtonToolTip = L"NavigationViewCloseButtonToolTip"sv;
00052 static constexpr auto c_paneShadowReceiverCanvas = L"PaneShadowReceiver"sv;
00053 static constexpr auto c_flyoutRootGrid = L"FlyoutRootGrid"sv;
00054 static constexpr auto c_settingsItemTag = L"Settings"sv;
00055
00056 // DisplayMode Top specific items
00057 static constexpr auto c_topNavMenuItemsHost = L"TopNavMenuItemsHost"sv;
00058 static constexpr auto c_topNavFooterMenuItemsHost = L"TopFooterMenuItemsHost"sv;
00059 static constexpr auto c_topNavOverflowButton = L"TopNavOverflowButton"sv;
00060 static constexpr auto c_topNavMenuItemsOverflowHost = L"TopNavMenuItemsOverflowHost"sv;
00061 static constexpr auto c_topNavGrid = L"TopNavGrid"sv;
00062 static constexpr auto c_topNavContentOverlayAreaGrid = L"TopNavContentOverlayAreaGrid"sv;
00063 static constexpr auto c_leftNavPaneAutoSuggestBoxPresenter = L"PaneAutoSuggestBoxPresenter"sv;
00064 static constexpr auto c_topNavPaneAutoSuggestBoxPresenter = L"TopPaneAutoSuggestBoxPresenter"sv;
00065 static constexpr auto c_paneTitlePresenter = L"PaneTitlePresenter"sv;
00066
00067 // DisplayMode Left specific items
00068 static constexpr auto c_leftNavFooterContentBorder = L"FooterContentBorder"sv;
00069 static constexpr auto c_leftNavPaneHeaderContentBorder = L"PaneHeaderContentBorder"sv;
00070 static constexpr auto c_leftNavPaneCustomContentBorder = L"PaneCustomContentBorder"sv;
00071
00072 static constexpr auto c_itemsContainer = L"ItemsContainerGrid"sv;
00073 static constexpr auto c_itemsContainerRow = L"ItemsContainerRow"sv;
00074 static constexpr auto c_menuItemsScrollViewer = L"MenuItemsScrollViewer"sv;
00075 static constexpr auto c_footerItemsScrollViewer = L"FooterItemsScrollViewer"sv;
00076
00077 static constexpr auto c_paneHeaderOnTopPane = L"PaneHeaderOnTopPane"sv;
00078 static constexpr auto c_paneTitleOnTopPane = L"PaneTitleOnTopPane"sv;
00079 static constexpr auto c_paneCustomContentOnTopPane = L"PaneCustomContentOnTopPane"sv;
00080 static constexpr auto c_paneFooterOnTopPane = L"PaneFooterOnTopPane"sv;
00081 static constexpr auto c_paneHeaderCloseButtonColumn = L"PaneHeaderCloseButtonColumn"sv;
00082 static constexpr auto c_paneHeaderToggleButtonColumn = L"PaneHeaderToggleButtonColumn"sv;
00083 static constexpr auto c_paneHeaderContentBorderRow = L"PaneHeaderContentBorderRow"sv;
00084
00085 static constexpr auto c_separatorVisibleStateName = L"SeparatorVisible";
00086 static constexpr auto c_separatorCollapsedStateName = L"SeparatorCollapsed";
00087
00088 static constexpr int c_backButtonHeight = 40;
00089 static constexpr int c_backButtonWidth = 40;
00090 static constexpr int c_paneToggleButtonHeight = 40;
00091 static constexpr int c_paneToggleButtonWidth = 40;
00092 static constexpr int c_toggleButtonHeightWithNoBackButton = 56;
00093 static constexpr int c_backButtonRowDefinition = 1;
00094 static constexpr float c_paneElevationTranslationZ = 32;
00095 static constexpr double c_paneOverlayShadowDepth = 16.0;
00096
00097 static constexpr int c_mainMenuBlockIndex = 0;
00098 static constexpr int c_footerMenuBlockIndex = 1;
00099
00100 static constexpr auto c_shadowCaster = L"ShadowCaster"sv;
00101 static constexpr auto c_shadowCasterEaseOutStoryboard = L"ShadowCasterEaseOutStoryboard"sv;
00102 static constexpr auto c_paneOverlayShadowDepthName{ L"PaneOverlayShadowDepth"sv };
00103
00104 constexpr int s_itemNotFound{ -1 };
00105
00106 static winrt::Size c_infSize{ std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity() };
00107
00108 // Change to 'true' to turn on debugging outputs in Output window
00109 bool NavigationViewTrace::s_IsDebugOutputEnabled{ false };
00110 bool NavigationViewTrace::s_IsVerboseDebugOutputEnabled{ false };
00111
00112 NavigationView::~NavigationView()
00113 {
00114     UnhookEventsAndClearFields(true);
00115 }
00116
00117 // IUIElement / IUIElementOverridesHelper
00118 winrt::AutomationPeer NavigationView::OnCreateAutomationPeer()
00119 {
00120     return winrt::make<NavigationViewAutomationPeer>(*this);
00121 }
00122
00123 void NavigationView::UnhookEventsAndClearFields(bool isFromDestructor)
00124 {
00125     m_titleBarMetricsChangedRevoker.revoke();
00126     m_titleBarIsVisibleChangedRevoker.revoke();
00127     m_paneToggleButtonClickRevoker.revoke();
00128
00129     m_settingsItem.set(nullptr);
00130
00131     m_paneSearchButtonClickRevoker.revoke();
00132     m_paneSearchButton.set(nullptr);
00133
00134     m_paneHeaderOnTopPane.set(nullptr);
00135     m_paneTitleOnTopPane.set(nullptr);
00136
00137     m_itemsContainerSizeChangedRevoker.revoke();
00138     m_paneTitleHolderFrameworkElementSizeChangedRevoker.revoke();
00139     m_paneTitleHolderFrameworkElement.set(nullptr);
00140
00141     m_paneTitleFrameworkElement.set(nullptr);
00142     m_paneTitlePresenter.set(nullptr);
00143
00144     m_paneHeaderCloseButtonColumn.set(nullptr);
00145     m_paneHeaderToggleButtonColumn.set(nullptr);
00146     m_paneHeaderContentBorderRow.set(nullptr);
00147
00148     m_leftNavItemsRepeaterElementPreparedRevoker.revoke();
00149     m_leftNavItemsRepeaterElementClearingRevoker.revoke();
00150     m_leftNavRepeaterLoadedRevoker.revoke();
00151     m_leftNavRepeaterGettingFocusRevoker.revoke();
00152     m_leftNavRepeater.set(nullptr);
00153
00154     m_topNavItemsRepeaterElementPreparedRevoker.revoke();
00155     m_topNavItemsRepeaterElementClearingRevoker.revoke();
00156     m_topNavRepeaterLoadedRevoker.revoke();
00157     m_topNavRepeaterGettingFocusRevoker.revoke();
00158     m_topNavRepeater.set(nullptr);
00159
00160     m_leftNavFooterMenuItemsRepeaterElementPreparedRevoker.revoke();
00161     m_leftNavFooterMenuItemsRepeaterElementClearingRevoker.revoke();
00162     m_leftNavFooterMenuRepeaterLoadedRevoker.revoke();
00163     m_leftNavFooterMenuRepeaterGettingFocusRevoker.revoke();
00164     m_leftNavFooterMenuRepeater.set(nullptr);
00165
00166     m_topNavFooterMenuItemsRepeaterElementPreparedRevoker.revoke();
00167     m_topNavFooterMenuItemsRepeaterElementClearingRevoker.revoke();
00168     m_topNavFooterMenuRepeaterLoadedRevoker.revoke();
00169     m_topNavFooterMenuRepeaterGettingFocusRevoker.revoke();
00170     m_topNavFooterMenuRepeater.set(nullptr);
00171
00172     m_footerItemsCollectionChangedRevoker.revoke();
00173     m_menuItemsCollectionChangedRevoker.revoke();
00174
00175     m_topNavOverflowItemsRepeaterElementPreparedRevoker.revoke();
00176     m_topNavOverflowItemsRepeaterElementClearingRevoker.revoke();
00177     m_topNavRepeaterOverflowView.set(nullptr);
00178
00179     m_topNavOverflowItemsCollectionChangedRevoker.revoke();
00180
00181     m_shadowCasterEaseOutStoryboardRevoker.revoke();
00182
00183     if (isFromDestructor)
00184     {
00185         m_selectionChangedRevoker.revoke();
00186         m_autoSuggestBoxQuerySubmittedRevoker.revoke();
00187         ClearAllNavigationViewItemBaseRevokers();
00188     }
00189 }
00190
00191 NavigationView::NavigationView()
00192 {
00193     __RP_Marker_ClassById(RuntimeProfiler::ProfId_NavigationView);
00194     SetValue(s_TemplateSettingsProperty, winrt::make<::NavigationViewTemplateSettings>());
00195     SetDefaultStyleKey(this);
00196
00197     SizeChanged({ this, &NavigationView::OnSizeChanged });
00198
00199     m_selectionModelSource = winrt::make<Vector<winrt::IInspectable>>(2);
00200     m_selectionModelSource.Append(nullptr);
00201     m_selectionModelSource.Append(nullptr);
00202
00203     auto items = winrt::make<Vector<winrt::IInspectable>>();
00204     SetValue(s_MenuItemsProperty, items);
00205
00206     auto footerItems = winrt::make<Vector<winrt::IInspectable>>();
00207     SetValue(s_FooterMenuItemsProperty, footerItems);
00208
00209     auto weakThis = get_weak();
00210     m_topDataProvider.OnRawDataChanged(
00211         [weakThis](const winrt::NotifyCollectionChangedEventArgs& args)
00212         {
00213             if (auto target = weakThis.get())
00214             {
00215                 target->OnTopNavDataSourceChanged(args);
00216             }
00217         });
00218
00219     Unloaded({ this, &NavigationView::OnUnloaded });
00220     Loaded({ this, &NavigationView::OnLoaded });
00221
00222     m_selectionModel.SingleSelect(true);
00223     m_selectionModel.Source(m_selectionModelSource);
00224     m_selectionChangedRevoker = m_selectionModel.SelectionChanged(winrt::auto_revoke, { this, &NavigationView::OnSelectionModelSelectionChanged });
00225     m_childrenRequestedRevoker = m_selectionModel.ChildrenRequested(winrt::auto_revoke, { this, &NavigationView::OnSelectionModelChildrenRequested });
00226
00227     m_navigationViewItemsFactory = winrt::make_self<NavigationViewItemsFactory>();
00228
00229     static const auto s_NavigationViewItemBaseRevokersPropertyInit = []()
00230     {
00231         s_NavigationViewItemBaseRevokersProperty =
00232             InitializeDependencyProperty(
00233                 L"NavigationViewItemBaseRevokers",
00234                 winrt::name_of<winrt::IInspectable>(),
00235                 winrt::name_of<winrt::NavigationViewItemBase>(),
00236                 true /* isAttached */,
00237                 nullptr /* defaultValue */);
00238         return false;
00239     }();
00240 }
00241
00242 void NavigationView::OnSelectionModelChildrenRequested(const winrt::SelectionModel& selectionModel, const winrt::SelectionModelChildrenRequestedEventArgs& e)
00243 {
00244     // this is main menu or footer
00245     if (e.SourceIndex().GetSize() == 1)
00246     {
00247         e.Children(e.Source());
00248     }
00249     else if (auto nvi = e.Source().try_as<winrt::NavigationViewItem>())
00250     {
00251         e.Children(GetChildren(nvi));
00252     }
00253     else if (auto const children = GetChildrenForItemInIndexPath(e.SourceIndex(), true /*forceRealize*/))
00254     {
00255         e.Children(children);
00256     }
00257 }
00258
00259 void NavigationView::OnFooterItemsSourceCollectionChanged(const winrt::IInspectable&, const winrt::IInspectable&)
00260 {
00261     UpdateFooterRepeaterItemsSource(false /*sourceCollectionReset*/, true /*sourceCollectionChanged*/);
00262
00263     // Pane footer items changed. This means we might need to reevaluate the pane layout.
00264     UpdatePaneLayout();
00265 }
00266
00267 void NavigationView::OnOverflowItemsSourceCollectionChanged(const winrt::IInspectable&, const winrt::IInspectable&)
00268 {
00269     if (m_topNavRepeaterOverflowView.get().ItemsSourceView().Count() == 0)
00270     {
00271         SetOverflowButtonVisibility(winrt::Visibility::Collapsed);
00272     }
00273 }
00274
00275 void NavigationView::OnSelectionModelSelectionChanged(const winrt::SelectionModel& selectionModel, const winrt::SelectionModelSelectionChangedEventArgs& e)
00276 {
00277     auto selectedItem = selectionModel.SelectedItem();
00278
00279     // Ignore this callback if:
00280     // 1. the SelectedItem property of NavigationView is already set to the item
00281     //    being passed in this callback. This is because the item has already been selected
00282     //    via API and we are just updating the m_selectionModel state to accurately reflect the new selection.
00283     // 2. Template has not been applied yet. SelectionModel's selectedIndex state will get properly updated
00284     //    after the repeater finishes loading.
00285     // TODO: Update SelectedItem comparison to work for the exact same item datasource scenario
00286     if (m_shouldIgnoreNextSelectionChange || selectedItem == SelectedItem() || !m_appliedTemplate)
00287     {
00288         return;
00289     }
00290
00291     bool setSelectedItem = true;
00292     auto const selectedIndex = selectionModel.SelectedIndex();
00293
00294     if (IsTopNavigationView())
00295     {
00296         // If selectedIndex does not exist, means item is being deselected through API
00297         auto const isInOverflow = (selectedIndex && selectedIndex.GetSize() > 1)
00298             ? selectedIndex.GetAt(0) == c_mainMenuBlockIndex && !m_topDataProvider.IsItemInPrimaryList(selectedIndex.GetAt(1))
00299             : false;
00300         if (isInOverflow)
00301         {
00302             // We only want to close the overflow flyout and move the item on selection if it is a leaf node
00303             auto const itemShouldBeMoved = [selectedIndex, this]()
00304             {
00305                 if (auto const selectedContainer = GetContainerForIndexPath(selectedIndex))
00306                 {
00307                     if (auto const selectedNVI = selectedContainer.try_as<winrt::NavigationViewItem>())
00308                     {
00309                         if (DoesNavigationViewItemHaveChildren(selectedNVI))
00310                         {
00311                             return false;
00312                         }
00313                     }
00314                 }
00315                 return true;
00316             }();
00317
00318             if (itemShouldBeMoved)
00319             {
00320                 SelectandMoveOverflowItem(selectedItem, selectedIndex, true /*closeFlyout*/);
00321                 setSelectedItem = false;
00322             }
00323             else
00324             {
00325                 m_moveTopNavOverflowItemOnFlyoutClose = true;
00326             }
00327         }
00328     }
00329
00330     if (setSelectedItem)
00331     {
00332         SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(selectedItem);
00333     }
00334 }
00335
00336 void NavigationView::SelectandMoveOverflowItem(winrt::IInspectable const& selectedItem, winrt::IndexPath const& selectedIndex, bool closeFlyout)
00337 {
00338     // SelectOverflowItem is moving data in/out of overflow.
00339     auto scopeGuard = gsl::finally([this]()
00340         {
00341             m_selectionChangeFromOverflowMenu = false;
00342         });
00343     m_selectionChangeFromOverflowMenu = true;
00344
00345     if (closeFlyout)
00346     {
00347         CloseTopNavigationViewFlyout();
00348     }
00349
00350     if (!IsSelectionSuppressed(selectedItem))
00351     {
00352         SelectOverflowItem(selectedItem, selectedIndex);
00353     }
00354 }
00355
00356 // We only need to close the flyout if the selected item is a leaf node
00357 void NavigationView::CloseFlyoutIfRequired(const winrt::NavigationViewItem& selectedItem)
00358 {
00359     auto const selectedIndex = m_selectionModel.SelectedIndex();
00360     const bool isInModeWithFlyout = [this]()
00361     {
00362         if (auto splitView = m_rootSplitView.get())
00363         {
00364             // Check if the pane is closed and if the splitview is in either compact mode.
00365             const auto splitViewDisplayMode = splitView.DisplayMode();
00366             return (!splitView.IsPaneOpen() && (splitViewDisplayMode == winrt::SplitViewDisplayMode::CompactOverlay || splitViewDisplayMode == winrt::SplitViewDisplayMode::CompactInline)) ||
00367                     PaneDisplayMode() == winrt::NavigationViewPaneDisplayMode::Top;
00368         }
00369         return false;
00370     }();
00371
00372     if (isInModeWithFlyout && selectedIndex && !DoesNavigationViewItemHaveChildren(selectedItem))
00373     {
00374         // Item selected is a leaf node, find top level parent and close flyout
00375         if (auto const rootItem = GetContainerForIndex(selectedIndex.GetAt(1), selectedIndex.GetAt(0) == c_footerMenuBlockIndex /* inFooter */))
00376         {
00377             if (auto const nvi = rootItem.try_as<winrt::NavigationViewItem>())
00378             {
00379                 auto const nviImpl = winrt::get_self<NavigationViewItem>(nvi);
00380                 if (nviImpl->ShouldRepeaterShowInFlyout())
00381                 {
00382                     nvi.IsExpanded(false);
00383                 }
00384             }
00385         }
00386     }
00387 }
00388
00389 void NavigationView::OnApplyTemplate()
00390 {
00391     // Stop update anything because of PropertyChange during OnApplyTemplate. Update them all together at the end of this function
00392     m_appliedTemplate = false;
00393     auto scopeGuard = gsl::finally([this]()
00394         {
00395             m_fromOnApplyTemplate = false;
00396         });
00397     m_fromOnApplyTemplate = true;
00398
00399     UnhookEventsAndClearFields();
00400
00401     winrt::IControlProtected controlProtected = *this;
00402
00403     // Set up the pane toggle button click handler
00404     if (auto paneToggleButton = GetTemplateChildT<winrt::Button>(c_togglePaneButtonName, controlProtected))
00405     {
00406         m_paneToggleButton.set(paneToggleButton);
00407         m_paneToggleButtonClickRevoker = paneToggleButton.Click(winrt::auto_revoke, { this, &NavigationView::OnPaneToggleButtonClick });
00408
00409         SetPaneToggleButtonAutomationName();
00410
00411         winrt::KeyboardAccelerator keyboardAccelerator;
00412         keyboardAccelerator.Key(winrt::VirtualKey::Back);
00413         keyboardAccelerator.Modifiers(winrt::VirtualKeyModifiers::Windows);
00414         paneToggleButton.KeyboardAccelerators().Append(keyboardAccelerator);
00415     }
00416
00417     m_leftNavPaneHeaderContentBorder.set(GetTemplateChildT<winrt::ContentControl>(c_leftNavPaneHeaderContentBorder, controlProtected));
00418     m_leftNavPaneCustomContentBorder.set(GetTemplateChildT<winrt::ContentControl>(c_leftNavPaneCustomContentBorder, controlProtected));
00419     m_leftNavFooterContentBorder.set(GetTemplateChildT<winrt::ContentControl>(c_leftNavFooterContentBorder, controlProtected));
00420     m_paneHeaderOnTopPane.set(GetTemplateChildT<winrt::ContentControl>(c_paneHeaderOnTopPane, controlProtected));
00421     m_paneTitleOnTopPane.set(GetTemplateChildT<winrt::ContentControl>(c_paneTitleOnTopPane, controlProtected));
00422     m_paneCustomContentOnTopPane.set(GetTemplateChildT<winrt::ContentControl>(c_paneCustomContentOnTopPane, controlProtected));
00423     m_paneFooterOnTopPane.set(GetTemplateChildT<winrt::ContentControl>(c_paneFooterOnTopPane, controlProtected));
00424
00425     // Get a pointer to the root SplitView
00426     if (auto splitView = GetTemplateChildT<winrt::SplitView>(c_rootSplitViewName, controlProtected))
00427     {
00428         m_rootSplitView.set(splitView);
00429         m_splitViewIsPaneOpenChangedRevoker = RegisterPropertyChanged(splitView,
00430             winrt::SplitView::IsPaneOpenProperty(),
00431             { this, &NavigationView::OnSplitViewClosedCompactChanged });
00432
00433         m_splitViewDisplayModeChangedRevoker = RegisterPropertyChanged(splitView,
00434             winrt::SplitView::DisplayModeProperty(),
00435             { this, &NavigationView::OnSplitViewClosedCompactChanged });
00436
00437         m_splitViewPaneClosedRevoker = splitView.PaneClosed(winrt::auto_revoke, { this, &NavigationView::OnSplitViewPaneClosed });
00438         m_splitViewPaneClosingRevoker = splitView.PaneClosing(winrt::auto_revoke, { this, &NavigationView::OnSplitViewPaneClosing });
00439         m_splitViewPaneOpenedRevoker = splitView.PaneOpened(winrt::auto_revoke, { this, &NavigationView::OnSplitViewPaneOpened });
00440         m_splitViewPaneOpeningRevoker = splitView.PaneOpening(winrt::auto_revoke, { this, &NavigationView::OnSplitViewPaneOpening });
00441
00442         UpdateIsClosedCompact();
00443     }
00444
00445     m_topNavGrid.set(GetTemplateChildT<winrt::Grid>(c_topNavGrid, controlProtected));
00446
00447     // Change code to NOT do this if we're in top nav mode, to prevent it from being realized:
00448     if (auto leftNavRepeater = GetTemplateChildT<winrt::ItemsRepeater>(c_menuItemsHost, controlProtected))
00449     {
00450         m_leftNavRepeater.set(leftNavRepeater);
00451
00452         // API is currently in preview, so setting this via code.
00453         // Disabling virtualization for now because of https://github.com/microsoft/microsoft-ui-xaml/issues/2095
00454         if (auto stackLayout = leftNavRepeater.Layout().try_as<winrt::StackLayout>())
00455         {
00456             auto stackLayoutImpl = winrt::get_self<StackLayout>(stackLayout);
00457             stackLayoutImpl->IsVirtualizationEnabled(false);
00458         }
00459
00460         m_leftNavItemsRepeaterElementPreparedRevoker = leftNavRepeater.ElementPrepared(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementPrepared });
00461         m_leftNavItemsRepeaterElementClearingRevoker = leftNavRepeater.ElementClearing(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementClearing });
00462
00463         m_leftNavRepeaterLoadedRevoker = leftNavRepeater.Loaded(winrt::auto_revoke, { this, &NavigationView::OnRepeaterLoaded });
00464
00465         m_leftNavRepeaterGettingFocusRevoker = leftNavRepeater.GettingFocus(winrt::auto_revoke, { this, &NavigationView::OnRepeaterGettingFocus });
00466
00467         leftNavRepeater.ItemTemplate(*m_navigationViewItemsFactory);
00468     }
00469
00470     // Change code to NOT do this if we're in left nav mode, to prevent it from being realized:
00471     if (auto topNavRepeater = GetTemplateChildT<winrt::ItemsRepeater>(c_topNavMenuItemsHost, controlProtected))
00472     {
00473         m_topNavRepeater.set(topNavRepeater);
00474
00475         // API is currently in preview, so setting this via code
00476         if (auto stackLayout = topNavRepeater.Layout().try_as<winrt::StackLayout>())
00477         {
00478             auto stackLayoutImpl = winrt::get_self<StackLayout>(stackLayout);
00479             stackLayoutImpl->IsVirtualizationEnabled(false);
00480         }
00481
00482         m_topNavItemsRepeaterElementPreparedRevoker = topNavRepeater.ElementPrepared(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementPrepared });
00483         m_topNavItemsRepeaterElementClearingRevoker = topNavRepeater.ElementClearing(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementClearing });
00484
00485         m_topNavRepeaterLoadedRevoker = topNavRepeater.Loaded(winrt::auto_revoke, { this, &NavigationView::OnRepeaterLoaded });
00486
00487         m_topNavRepeaterGettingFocusRevoker = topNavRepeater.GettingFocus(winrt::auto_revoke, { this, &NavigationView::OnRepeaterGettingFocus });
00488
00489         topNavRepeater.ItemTemplate(*m_navigationViewItemsFactory);
00490     }
00491
00492     // Change code to NOT do this if we're in left nav mode, to prevent it from being realized:
00493     if (auto topNavListOverflowRepeater = GetTemplateChildT<winrt::ItemsRepeater>(c_topNavMenuItemsOverflowHost, controlProtected))
00494     {
00495         m_topNavRepeaterOverflowView.set(topNavListOverflowRepeater);
00496
00497         // API is currently in preview, so setting this via code.
00498         // Disabling virtualization for now because of https://github.com/microsoft/microsoft-ui-xaml/issues/2095
00499         if (auto stackLayout = topNavListOverflowRepeater.Layout().try_as<winrt::StackLayout>())
00500         {
00501             auto stackLayoutImpl = winrt::get_self<StackLayout>(stackLayout);
00502             stackLayoutImpl->IsVirtualizationEnabled(false);
00503         }
00504
00505         m_topNavOverflowItemsRepeaterElementPreparedRevoker = topNavListOverflowRepeater.ElementPrepared(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementPrepared });
00506         m_topNavOverflowItemsRepeaterElementClearingRevoker = topNavListOverflowRepeater.ElementClearing(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementClearing });
00507
00508         topNavListOverflowRepeater.ItemTemplate(*m_navigationViewItemsFactory);
00509     }
00510
00511     if (auto topNavOverflowButton = GetTemplateChildT<winrt::Button>(c_topNavOverflowButton, controlProtected))
00512     {
00513         m_topNavOverflowButton.set(topNavOverflowButton);
00514         winrt::AutomationProperties::SetName(topNavOverflowButton, ResourceAccessor::GetLocalizedStringResource(SR_NavigationOverflowButtonName));
00515         topNavOverflowButton.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_NavigationOverflowButtonText)));
00516         auto visual = winrt::ElementCompositionPreview::GetElementVisual(topNavOverflowButton);
00517         CreateAndAttachHeaderAnimation(visual);
00518
00519         auto const toolTip = winrt::ToolTipService::GetToolTip(topNavOverflowButton);
00520         if (!toolTip)
00521         {
00522             auto const tooltip = winrt::ToolTip();
00523             tooltip.Content(box_value(ResourceAccessor::GetLocalizedStringResource(SR_NavigationOverflowButtonToolTip)));
00524             winrt::ToolTipService::SetToolTip(topNavOverflowButton, tooltip);
00525         }
00526
00527         if (auto const flyoutBase = topNavOverflowButton.Flyout())
00528         {
00529             flyoutBase.ShouldConstrainToRootBounds(false);
00530             m_flyoutClosingRevoker = flyoutBase.Closing(winrt::auto_revoke, { this, &NavigationView::OnFlyoutClosing });
00531         }
00532     }
00533
00534     // Change code to NOT do this if we're in top nav mode, to prevent it from being realized:
00535     if (auto leftFooterMenuNavRepeater = GetTemplateChildT<winrt::ItemsRepeater>(c_footerMenuItemsHost, controlProtected))
00536     {
00537         m_leftNavFooterMenuRepeater.set(leftFooterMenuNavRepeater);
00538
00539         // API is currently in preview, so setting this via code.
00540         // Disabling virtualization for now because of https://github.com/microsoft/microsoft-ui-xaml/issues/2095
00541         if (auto stackLayout = leftFooterMenuNavRepeater.Layout().try_as<winrt::StackLayout>())
00542         {
00543             auto stackLayoutImpl = winrt::get_self<StackLayout>(stackLayout);
00544             stackLayoutImpl->IsVirtualizationEnabled(false);
00545         }
00546
00547         m_leftNavFooterMenuItemsRepeaterElementPreparedRevoker = leftFooterMenuNavRepeater.ElementPrepared(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementPrepared });
00548         m_leftNavFooterMenuItemsRepeaterElementClearingRevoker = leftFooterMenuNavRepeater.ElementClearing(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementClearing });
00549
00550         m_leftNavFooterMenuRepeaterLoadedRevoker = leftFooterMenuNavRepeater.Loaded(winrt::auto_revoke, { this, &NavigationView::OnRepeaterLoaded });
00551
00552         m_leftNavFooterMenuRepeaterGettingFocusRevoker = leftFooterMenuNavRepeater.GettingFocus(winrt::auto_revoke, { this, &NavigationView::OnRepeaterGettingFocus });
00553
00554         leftFooterMenuNavRepeater.ItemTemplate(*m_navigationViewItemsFactory);
00555     }
00556
00557     // Change code to NOT do this if we're in left nav mode, to prevent it from being realized:
00558     if (auto topFooterMenuNavRepeater = GetTemplateChildT<winrt::ItemsRepeater>(c_topNavFooterMenuItemsHost, controlProtected))
00559     {
00560         m_topNavFooterMenuRepeater.set(topFooterMenuNavRepeater);
00561
00562         // API is currently in preview, so setting this via code.
00563         // Disabling virtualization for now because of https://github.com/microsoft/microsoft-ui-xaml/issues/2095
00564         if (auto stackLayout = topFooterMenuNavRepeater.Layout().try_as<winrt::StackLayout>())
00565         {
00566             auto stackLayoutImpl = winrt::get_self<StackLayout>(stackLayout);
00567             stackLayoutImpl->IsVirtualizationEnabled(false);
00568         }
00569
00570         m_topNavFooterMenuItemsRepeaterElementPreparedRevoker = topFooterMenuNavRepeater.ElementPrepared(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementPrepared });
00571         m_topNavFooterMenuItemsRepeaterElementClearingRevoker = topFooterMenuNavRepeater.ElementClearing(winrt::auto_revoke, { this, &NavigationView::OnRepeaterElementClearing });
00572
00573         m_topNavFooterMenuRepeaterLoadedRevoker = topFooterMenuNavRepeater.Loaded(winrt::auto_revoke, { this, &NavigationView::OnRepeaterLoaded });
00574
00575         m_topNavFooterMenuRepeaterGettingFocusRevoker = topFooterMenuNavRepeater.GettingFocus(winrt::auto_revoke, { this, &NavigationView::OnRepeaterGettingFocus });
00576
00577         topFooterMenuNavRepeater.ItemTemplate(*m_navigationViewItemsFactory);
00578     }
00579
00580     m_topNavContentOverlayAreaGrid.set(GetTemplateChildT<winrt::Border>(c_topNavContentOverlayAreaGrid, controlProtected));
00581     m_leftNavPaneAutoSuggestBoxPresenter.set(GetTemplateChildT<winrt::ContentControl>(c_leftNavPaneAutoSuggestBoxPresenter, controlProtected));
00582     m_topNavPaneAutoSuggestBoxPresenter.set(GetTemplateChildT<winrt::ContentControl>(c_topNavPaneAutoSuggestBoxPresenter, controlProtected));
00583
00584     // Get pointer to the pane content area, for use in the selection indicator animation
00585     m_paneContentGrid.set(GetTemplateChildT<winrt::UIElement>(c_paneContentGridName, controlProtected));
00586
00587     m_contentLeftPadding.set(GetTemplateChildT<winrt::FrameworkElement>(c_contentLeftPadding, controlProtected));
00588
00589     m_paneHeaderCloseButtonColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(c_paneHeaderCloseButtonColumn, controlProtected));
00590     m_paneHeaderToggleButtonColumn.set(GetTemplateChildT<winrt::ColumnDefinition>(c_paneHeaderToggleButtonColumn, controlProtected));
00591     m_paneHeaderContentBorderRow.set(GetTemplateChildT<winrt::RowDefinition>(c_paneHeaderContentBorderRow, controlProtected));
00592     m_paneTitleFrameworkElement.set(GetTemplateChildT<winrt::FrameworkElement>(c_paneTitleFrameworkElement, controlProtected));
00593     m_paneTitlePresenter.set(GetTemplateChildT<winrt::ContentControl>(c_paneTitlePresenter, controlProtected));
00594
00595     if (auto paneTitleHolderFrameworkElement = GetTemplateChildT<winrt::FrameworkElement>(c_paneTitleHolderFrameworkElement, controlProtected))
00596     {
00597         m_paneTitleHolderFrameworkElement.set(paneTitleHolderFrameworkElement);
00598         m_paneTitleHolderFrameworkElementSizeChangedRevoker = paneTitleHolderFrameworkElement.SizeChanged(winrt::auto_revoke, { this, &NavigationView::OnPaneTitleHolderSizeChanged });
00599     }
00600
00601     // Set automation name on search button
00602     if (auto button = GetTemplateChildT<winrt::Button>(c_searchButtonName, controlProtected))
00603     {
00604         m_paneSearchButton.set(button);
00605         m_paneSearchButtonClickRevoker = button.Click(winrt::auto_revoke, { this, &NavigationView::OnPaneSearchButtonClick });
00606
00607         auto searchButtonName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationViewSearchButtonName);
00608         winrt::AutomationProperties::SetName(button, searchButtonName);
00609         auto toolTip = winrt::ToolTip();
00610         toolTip.Content(box_value(searchButtonName));
00611         winrt::ToolTipService::SetToolTip(button, toolTip);
00612     }
00613
00614     if (auto backButton = GetTemplateChildT<winrt::Button>(c_navViewBackButton, controlProtected))
00615     {
00616         m_backButton.set(backButton);
00617         m_backButtonClickedRevoker = backButton.Click(winrt::auto_revoke, { this, &NavigationView::OnBackButtonClicked });
00618
00619         winrt::hstring navigationName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationBackButtonName);
00620         winrt::AutomationProperties::SetName(backButton, navigationName);
00621     }
00622
00623     // Register for changes in title bar layout
00624     if (auto currentView = SharedHelpers::TryGetCurrentCoreApplicationView())
00625     {
00626         if (auto coreTitleBar = currentView.TitleBar())
00627         {
00628             m_coreTitleBar.set(coreTitleBar);
00629             m_titleBarMetricsChangedRevoker = coreTitleBar.LayoutMetricsChanged(winrt::auto_revoke, { this, &NavigationView::OnTitleBarMetricsChanged });
00630             m_titleBarIsVisibleChangedRevoker = coreTitleBar.IsVisibleChanged(winrt::auto_revoke, { this, &NavigationView::OnTitleBarIsVisibleChanged });
00631
00632             if (!m_topNavGrid)
00633             {
00634                 m_togglePaneTopPadding.set(GetTemplateChildT<winrt::FrameworkElement>(c_togglePaneTopPadding, controlProtected));
00635                 m_contentPaneTopPadding.set(GetTemplateChildT<winrt::FrameworkElement>(c_contentPaneTopPadding, controlProtected));
00636             }
00637         }
00638     }
00639
00640     if (auto backButtonToolTip = GetTemplateChildT<winrt::ToolTip>(c_navViewBackButtonToolTip, controlProtected))
00641     {
00642         winrt::hstring navigationBackButtonToolTip = ResourceAccessor::GetLocalizedStringResource(SR_NavigationBackButtonToolTip);
00643         backButtonToolTip.Content(box_value(navigationBackButtonToolTip));
00644     }
00645
00646     if (auto closeButton = GetTemplateChildT<winrt::Button>(c_navViewCloseButton, controlProtected))
00647     {
00648         m_closeButton.set(closeButton);
00649         m_closeButtonClickedRevoker = closeButton.Click(winrt::auto_revoke, { this, &NavigationView::OnPaneToggleButtonClick });
00650
00651         winrt::hstring navigationName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationCloseButtonName);
00652         winrt::AutomationProperties::SetName(closeButton, navigationName);
00653     }
00654
00655     if (auto closeButtonToolTip = GetTemplateChildT<winrt::ToolTip>(c_navViewCloseButtonToolTip, controlProtected))
00656     {
00657         winrt::hstring navigationCloseButtonToolTip = ResourceAccessor::GetLocalizedStringResource(SR_NavigationButtonOpenName);
00658         closeButtonToolTip.Content(box_value(navigationCloseButtonToolTip));
00659     }
00660
00661     m_itemsContainerRow.set(GetTemplateChildT<winrt::RowDefinition>(c_itemsContainerRow, controlProtected));
00662     m_menuItemsScrollViewer.set(GetTemplateChildT<winrt::FrameworkElement>(c_menuItemsScrollViewer, controlProtected));
00663     m_footerItemsScrollViewer.set(GetTemplateChildT<winrt::FrameworkElement>(c_footerItemsScrollViewer, controlProtected));
00664
00665
00666     m_itemsContainerSizeChangedRevoker.revoke();
00667     if (const auto itemsContainer = GetTemplateChildT<winrt::FrameworkElement>(c_itemsContainer, controlProtected))
00668     {
00669         m_itemsContainer.set(itemsContainer);
00670         m_itemsContainerSizeChangedRevoker = itemsContainer.SizeChanged(winrt::auto_revoke, { this,&NavigationView::OnItemsContainerSizeChanged });
00671     }
00672
00673     // Get hold of the outermost grid and enable XYKeyboardNavigationMode
00674     // However, we only want this to work in the content pane + the hamburger button (which is not inside the splitview)
00675     // so disable it on the grid in the content area of the SplitView
00676     if (auto rootGrid = GetTemplateChildT<winrt::Grid>(c_rootGridName, controlProtected))
00677     {
00678         rootGrid.XYFocusKeyboardNavigation(winrt::XYFocusKeyboardNavigationMode::Enabled);
00679     }
00680
00681     if (auto contentGrid = GetTemplateChildT<winrt::Grid>(c_contentGridName, controlProtected))
00682     {
00683         contentGrid.XYFocusKeyboardNavigation(winrt::XYFocusKeyboardNavigationMode::Disabled);
00684     }
00685
00686     m_accessKeyInvokedRevoker = AccessKeyInvoked(winrt::auto_revoke, { this, &NavigationView::OnAccessKeyInvoked });
00687
00688     m_shadowCaster.set(GetTemplateChildT<winrt::Grid>(c_shadowCaster, controlProtected));
00689     m_shadowCasterEaseOutStoryboard.set(GetTemplateChildT<winrt::Storyboard>(c_shadowCasterEaseOutStoryboard, controlProtected));
00690
00691     m_appliedTemplate = true;
00692
00693     // Do initial setup
00694     UpdatePaneDisplayMode();
00695     UpdateHeaderVisibility();
00696     UpdatePaneTitleFrameworkElementParents();
00697     UpdateTitleBarPadding();
00698     UpdatePaneTabFocusNavigation();
00699     UpdateBackAndCloseButtonsVisibility();
00700     UpdateSingleSelectionFollowsFocusTemplateSetting();
00701     UpdatePaneVisibility();
00702     UpdateVisualState();
00703     UpdatePaneTitleMargins();
00704     UpdatePaneLayout();
00705     UpdatePaneOverlayGroup();
00706 }
00707
00708 void NavigationView::UpdateRepeaterItemsSource(bool forceSelectionModelUpdate)
00709 {
00710     auto const itemsSource = [this]()
00711     {
00712         if (auto const menuItemsSource = MenuItemsSource())
00713         {
00714             return menuItemsSource;
00715         }
00716         UpdateSelectionForMenuItems();
00717         return MenuItems().as<winrt::IInspectable>();
00718     }();
00719
00720     // Selection Model has same representation of data regardless
00721     // of pane mode, so only update if the ItemsSource data itself
00722     // has changed.
00723     if (forceSelectionModelUpdate)
00724     {
00725         m_selectionModelSource.SetAt(0, itemsSource);
00726     }
00727
00728     m_menuItemsCollectionChangedRevoker.revoke();
00729     m_menuItemsSource = winrt::ItemsSourceView(itemsSource);
00730     m_menuItemsCollectionChangedRevoker = m_menuItemsSource.CollectionChanged(winrt::auto_revoke, { this, &NavigationView::OnMenuItemsSourceCollectionChanged });
00731
00732     if (IsTopNavigationView())
00733     {
00734         UpdateLeftRepeaterItemSource(nullptr);
00735         UpdateTopNavRepeatersItemSource(itemsSource);
00736         InvalidateTopNavPrimaryLayout();
00737     }
00738     else
00739     {
00740         UpdateTopNavRepeatersItemSource(nullptr);
00741         UpdateLeftRepeaterItemSource(m_menuItemsSource);
00742     }
00743 }
00744
00745 void NavigationView::UpdateLeftRepeaterItemSource(const winrt::IInspectable& items)
00746 {
00747     UpdateItemsRepeaterItemsSource(m_leftNavRepeater.get(), items);
00748     // Left pane repeater has a new items source, update pane layout.
00749     UpdatePaneLayout();
00750 }
00751
00752 void NavigationView::UpdateTopNavRepeatersItemSource(const winrt::IInspectable& items)
00753 {
00754     // Change data source and setup vectors
00755     m_topDataProvider.SetDataSource(items);
00756
00757     // rebinding
00758     UpdateTopNavPrimaryRepeaterItemsSource(items);
00759     UpdateTopNavOverflowRepeaterItemsSource(items);
00760 }
00761
00762 void NavigationView::UpdateTopNavPrimaryRepeaterItemsSource(const winrt::IInspectable& items)
00763 {
00764     if (items)
00765     {
00766         UpdateItemsRepeaterItemsSource(m_topNavRepeater.get(), m_topDataProvider.GetPrimaryItems());
00767     }
00768     else
00769     {
00770         UpdateItemsRepeaterItemsSource(m_topNavRepeater.get(), nullptr);
00771     }
00772 }
00773
00774 void NavigationView::UpdateTopNavOverflowRepeaterItemsSource(const winrt::IInspectable& items)
00775 {
00776     m_topNavOverflowItemsCollectionChangedRevoker.revoke();
00777
00778     if (const auto overflowRepeater = m_topNavRepeaterOverflowView.get())
00779     {
00780         if (items)
00781         {
00782             const auto itemsSource = m_topDataProvider.GetOverflowItems();
00783             overflowRepeater.ItemsSource(itemsSource);
00784
00785             // We listen to changes to the overflow menu item collection so we can set the visibility of the overflow button
00786             // to collapsed when it no longer has any items.
00787             //
00788             // Normally, MeasureOverride() kicks off updating the button's visibility, however, it is not run when the overflow menu
00789             // only contains a *single* item and we
00790             // - either remove that menu item or
00791             // - remove menu items displayed in the NavigationView pane until there is enough room for the single overflow menu item
00792             //   to be displayed in the pane
00793             m_topNavOverflowItemsCollectionChangedRevoker = overflowRepeater.ItemsSourceView().CollectionChanged(winrt::auto_revoke, { this, &NavigationView::OnOverflowItemsSourceCollectionChanged });
00794         }
00795         else
00796         {
00797             overflowRepeater.ItemsSource(nullptr);
00798         }
00799     }
00800 }
00801
00802 void NavigationView::UpdateItemsRepeaterItemsSource(const winrt::ItemsRepeater& ir,
00803     const winrt::IInspectable& itemsSource)
00804 {
00805     if (ir)
00806     {
00807         ir.ItemsSource(itemsSource);
00808     }
00809 }
00810
00811 void NavigationView::UpdateFooterRepeaterItemsSource(bool sourceCollectionReset, bool sourceCollectionChanged)
00812 {
00813     if (!m_appliedTemplate) return;
00814
00815     auto const itemsSource = [this]()
00816     {
00817         if (auto const menuItemsSource = FooterMenuItemsSource())
00818         {
00819             return menuItemsSource;
00820         }
00821         UpdateSelectionForMenuItems();
00822         return FooterMenuItems().as<winrt::IInspectable>();
00823     }();
00824
00825
00826     UpdateItemsRepeaterItemsSource(m_leftNavFooterMenuRepeater.get(), nullptr);
00827     UpdateItemsRepeaterItemsSource(m_topNavFooterMenuRepeater.get(), nullptr);
00828
00829     if (!m_settingsItem || sourceCollectionChanged || sourceCollectionReset)
00830     {
00831         auto dataSource = winrt::make<Vector<winrt::IInspectable>>();
00832
00833         if (!m_settingsItem)
00834         {
00835             m_settingsItem.set(winrt::make < ::NavigationViewItem>());
00836             auto settingsItem = m_settingsItem.get();
00837             settingsItem.Name(L"SettingsItem");
00838             m_navigationViewItemsFactory.get()->SettingsItem(settingsItem);
00839         }
00840
00841         if (sourceCollectionReset)
00842         {
00843             m_footerItemsCollectionChangedRevoker.revoke();
00844             m_footerItemsSource = nullptr;
00845         }
00846
00847         if (!m_footerItemsSource)
00848         {
00849             m_footerItemsSource = winrt::ItemsSourceView(itemsSource);
00850             m_footerItemsCollectionChangedRevoker = m_footerItemsSource.CollectionChanged(winrt::auto_revoke, { this, &NavigationView::OnFooterItemsSourceCollectionChanged });
00851         }
00852
00853         if (m_footerItemsSource)
00854         {
00855             auto settingsItem = m_settingsItem.get();
00856             const auto size = m_footerItemsSource.Count();
00857
00858             for (int32_t i = 0; i < size; i++)
00859             {
00860                 auto item = m_footerItemsSource.GetAt(i).as<winrt::IInspectable>();
00861                 dataSource.Append(item);
00862             }
00863
00864             if (IsSettingsVisible())
00865             {
00866                 CreateAndHookEventsToSettings();
00867                 // add settings item to the end of footer
00868                 dataSource.Append(settingsItem);
00869             }
00870         }
00871
00872         m_selectionModelSource.SetAt(1, dataSource);
00873     }
00874
00875     if (IsTopNavigationView())
00876     {
00877         UpdateItemsRepeaterItemsSource(m_topNavFooterMenuRepeater.get(), m_selectionModelSource.GetAt(1));
00878     }
00879     else
00880     {
00881         if (const auto repeater = m_leftNavFooterMenuRepeater.get())
00882         {
00883             UpdateItemsRepeaterItemsSource(m_leftNavFooterMenuRepeater.get(), m_selectionModelSource.GetAt(1));
00884
00885             // Footer items changed and we need to recalculate the layout.
00886             // However repeater "lags" behind, so we need to force it to reevaluate itself now.
00887             repeater.InvalidateMeasure();
00888             repeater.UpdateLayout();
00889
00890             // Footer items changed, so let's update the pane layout.
00891             UpdatePaneLayout();
00892         }
00893
00894         if (const auto settings = m_settingsItem.get())
00895         {
00896             settings.StartBringIntoView();
00897         }
00898     }
00899 }
00900
00901 void NavigationView::OnFlyoutClosing(const winrt::IInspectable& sender, const winrt::FlyoutBaseClosingEventArgs& args)
00902 {
00903     // If the user selected an parent item in the overflow flyout then the item has not been moved to top primary yet.
00904     // So we need to move it.
00905     if (m_moveTopNavOverflowItemOnFlyoutClose && !m_selectionChangeFromOverflowMenu)
00906     {
00907         m_moveTopNavOverflowItemOnFlyoutClose = false;
00908
00909         auto const selectedIndex = m_selectionModel.SelectedIndex();
00910         if (selectedIndex.GetSize() > 0)
00911         {
00912             if (auto const firstContainer = GetContainerForIndex(selectedIndex.GetAt(1), false /*infooter*/))
00913             {
00914                 if (auto const firstNVI = firstContainer.try_as<winrt::NavigationViewItem>())
00915                 {
00916                     // We want to collapse the top level item before we move it
00917                     firstNVI.IsExpanded(false);
00918                 }
00919             }
00920
00921             SelectandMoveOverflowItem(SelectedItem(), selectedIndex, false /*closeFlyout*/);
00922         }
00923     }
00924 }
00925
00926 void NavigationView::OnNavigationViewItemBaseVisibilityPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00927 {
00928     UpdatePaneLayout();
00929 }
00930
00931 void NavigationView::OnNavigationViewItemIsSelectedPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00932 {
00933     if (auto const nvi = sender.try_as<winrt::NavigationViewItem>())
00934     {
00935         // Check whether the container that triggered this call back is the selected container
00936         const bool isContainerSelectedInModel = IsContainerTheSelectedItemInTheSelectionModel(nvi);
00937         const bool isSelectedInContainer = nvi.IsSelected();
00938
00939         if (isSelectedInContainer && !isContainerSelectedInModel)
00940         {
00941             auto indexPath = GetIndexPathForContainer(nvi);
00942             UpdateSelectionModelSelection(indexPath);
00943         }
00944         else if (!isSelectedInContainer && isContainerSelectedInModel)
00945         {
00946             auto indexPath = GetIndexPathForContainer(nvi);
00947             auto indexPathFromModel = m_selectionModel.SelectedIndex();
00948
00949             if (indexPathFromModel && indexPath.CompareTo(indexPathFromModel) == 0)
00950             {
00951                 m_selectionModel.DeselectAt(indexPath);
00952             }
00953         }
00954
00955         if (isSelectedInContainer)
00956         {
00957             nvi.IsChildSelected(false);
00958         }
00959     }
00960 }
00961
00962 void NavigationView::OnNavigationViewItemExpandedPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00963 {
00964     if (auto const nvi = sender.try_as<winrt::NavigationViewItem>())
00965     {
00966         if (nvi.IsExpanded())
00967         {
00968             RaiseExpandingEvent(nvi);
00969         }
00970
00971         ShowHideChildrenItemsRepeater(nvi);
00972
00973         if (!nvi.IsExpanded())
00974         {
00975             RaiseCollapsedEvent(nvi);
00976         }
00977     }
00978 }
00979
00980 void NavigationView::RaiseItemInvokedForNavigationViewItem(const winrt::NavigationViewItem& nvi)
00981 {
00982     winrt::IInspectable nextItem = nullptr;
00983     auto prevItem = SelectedItem();
00984     auto parentIR = GetParentItemsRepeaterForContainer(nvi);
00985
00986     if (auto itemsSourceView = parentIR.ItemsSourceView())
00987     {
00988         auto inspectingDataSource = static_cast<InspectingDataSource*>(winrt::get_self<ItemsSourceView>(itemsSourceView));
00989         auto itemIndex = parentIR.GetElementIndex(nvi);
00990
00991         // Check that index is NOT -1, meaning it is actually realized
00992         if (itemIndex != -1)
00993         {
00994             // Something went wrong, item might not be realized yet.
00995             nextItem = inspectingDataSource->GetAt(itemIndex);
00996         }
00997     }
00998
00999     // Determine the recommeded transition direction.
01000     // Any transitions other than `Default` only apply in top nav scenarios.
01001     auto recommendedDirection = [this, prevItem, nvi, parentIR]()
01002     {
01003         if (IsTopNavigationView() && nvi.SelectsOnInvoked())
01004         {
01005             const bool isInOverflow = parentIR == m_topNavRepeaterOverflowView.get();
01006             if (isInOverflow)
01007             {
01008                 return NavigationRecommendedTransitionDirection::FromOverflow;
01009             }
01010             else if (prevItem)
01011             {
01012                 return GetRecommendedTransitionDirection(NavigationViewItemBaseOrSettingsContentFromData(prevItem), nvi);
01013             }
01014         }
01015         return NavigationRecommendedTransitionDirection::Default;
01016     }();
01017
01018     RaiseItemInvoked(nextItem, IsSettingsItem(nvi) /*isSettings*/, nvi, recommendedDirection);
01019 }
01020
01021 void NavigationView::OnNavigationViewItemInvoked(const winrt::NavigationViewItem& nvi)
01022 {
01023     m_shouldRaiseItemInvokedAfterSelection = true;
01024
01025     const auto selectedItem = SelectedItem();
01026     const bool updateSelection = m_selectionModel && nvi.SelectsOnInvoked();
01027     if (updateSelection)
01028     {
01029         const auto ip = GetIndexPathForContainer(nvi);
01030
01031         // Determine if we will update collapse/expand which will happen iff the item has children
01032         if (DoesNavigationViewItemHaveChildren(nvi))
01033         {
01034             m_shouldIgnoreUIASelectionRaiseAsExpandCollapseWillRaise = true;
01035         }
01036         UpdateSelectionModelSelection(ip);
01037     }
01038
01039     // Item was invoked but already selected, so raise event here.
01040     if (selectedItem == SelectedItem())
01041     {
01042         RaiseItemInvokedForNavigationViewItem(nvi);
01043     }
01044
01045     ToggleIsExpandedNavigationViewItem(nvi);
01046     ClosePaneIfNeccessaryAfterItemIsClicked(nvi);
01047
01048     if (updateSelection)
01049     {
01050         CloseFlyoutIfRequired(nvi);
01051     }
01052 }
01053
01054 bool NavigationView::IsRootItemsRepeater(const winrt::DependencyObject& element)
01055 {
01056     if (element)
01057     {
01058         return (element == m_topNavRepeater.get() ||
01059             element == m_leftNavRepeater.get() ||
01060             element == m_topNavRepeaterOverflowView.get() ||
01061             element == m_leftNavFooterMenuRepeater.get() ||
01062             element == m_topNavFooterMenuRepeater.get());
01063     }
01064     return false;
01065 }
01066
01067 bool NavigationView::IsRootGridOfFlyout(const winrt::DependencyObject& element)
01068 {
01069     if (auto grid = element.try_as<winrt::Grid>())
01070     {
01071         return grid.Name() == c_flyoutRootGrid;
01072     }
01073     return false;
01074 }
01075
01076 winrt::ItemsRepeater NavigationView::GetParentRootItemsRepeaterForContainer(const winrt::NavigationViewItemBase& nvib)
01077 {
01078     auto parentIR = GetParentItemsRepeaterForContainer(nvib);
01079     auto currentNvib = nvib;
01080     while (!IsRootItemsRepeater(parentIR))
01081     {
01082         currentNvib = GetParentNavigationViewItemForContainer(currentNvib);
01083         if (!currentNvib)
01084         {
01085             return nullptr;
01086         }
01087
01088         parentIR = GetParentItemsRepeaterForContainer(currentNvib);
01089     }
01090     return parentIR;
01091 }
01092
01093 winrt::ItemsRepeater NavigationView::GetParentItemsRepeaterForContainer(const winrt::NavigationViewItemBase& nvib)
01094 {
01095     if (auto parent = winrt::VisualTreeHelper::GetParent(nvib))
01096     {
01097         if (auto parentIR = parent.try_as<winrt::ItemsRepeater>())
01098         {
01099             return parentIR;
01100         }
01101     }
01102     return nullptr;
01103 }
01104
01105 winrt::NavigationViewItem NavigationView::GetParentNavigationViewItemForContainer(const winrt::NavigationViewItemBase& nvib)
01106 {
01107     // TODO: This scenario does not find parent items when in a flyout, which causes problems if item if first loaded
01108     // straight in the flyout. Fix. This logic can be merged with the 'GetIndexPathForContainer' logic below.
01109     winrt::DependencyObject parent = GetParentItemsRepeaterForContainer(nvib);
01110     if (!IsRootItemsRepeater(parent))
01111     {
01112         while (parent)
01113         {
01114             parent = winrt::VisualTreeHelper::GetParent(parent);
01115             if (auto const nvi = parent.try_as<winrt::NavigationViewItem>())
01116             {
01117                 return nvi;
01118             }
01119         }
01120     }
01121     return nullptr;
01122 }
01123
01124 winrt::IndexPath NavigationView::GetIndexPathForContainer(const winrt::NavigationViewItemBase& nvib)
01125 {
01126     auto path = std::vector<int>();
01127     bool isInFooterMenu = false;
01128
01129     winrt::DependencyObject child = nvib;
01130     auto parent = winrt::VisualTreeHelper::GetParent(child);
01131     if (!parent)
01132     {
01133         return IndexPath::CreateFromIndices(path);
01134     }
01135
01136     // Search through VisualTree for a root itemsrepeater
01137     while (parent && !IsRootItemsRepeater(parent) && !IsRootGridOfFlyout(parent))
01138     {
01139         if (auto parentIR = parent.try_as<winrt::ItemsRepeater>())
01140         {
01141             if (auto childElement = child.try_as<winrt::UIElement>())
01142             {
01143                 path.insert(path.begin(), parentIR.GetElementIndex(childElement));
01144             }
01145         }
01146         child = parent;
01147         parent = winrt::VisualTreeHelper::GetParent(parent);
01148     }
01149
01150     // If the item is in a flyout, then we need to final index of its parent
01151     if (IsRootGridOfFlyout(parent))
01152     {
01153         if (auto const nvi = m_lastItemExpandedIntoFlyout.get())
01154         {
01155             child = nvi;
01156             parent = IsTopNavigationView() ? m_topNavRepeater.get() : m_leftNavRepeater.get();
01157         }
01158     }
01159
01160     // If item is in one of the disconnected ItemRepeaters, account for that in IndexPath calculations
01161     if (parent == m_topNavRepeaterOverflowView.get())
01162     {
01163         // Convert index of selected item in overflow to index in datasource
01164         const auto containerIndex = m_topNavRepeaterOverflowView.get().GetElementIndex(child.try_as<winrt::UIElement>());
01165         const auto item = m_topDataProvider.GetOverflowItems().GetAt(containerIndex);
01166         const auto indexAtRoot = m_topDataProvider.IndexOf(item);
01167         path.insert(path.begin(), indexAtRoot);
01168     }
01169     else if (parent == m_topNavRepeater.get())
01170     {
01171         // Convert index of selected item in overflow to index in datasource
01172         const auto containerIndex = m_topNavRepeater.get().GetElementIndex(child.try_as<winrt::UIElement>());
01173         const auto item = m_topDataProvider.GetPrimaryItems().GetAt(containerIndex);
01174         const auto indexAtRoot = m_topDataProvider.IndexOf(item);
01175         path.insert(path.begin(), indexAtRoot);
01176     }
01177     else if (auto parentIR = parent.try_as<winrt::ItemsRepeater>())
01178     {
01179         path.insert(path.begin(), parentIR.GetElementIndex(child.try_as<winrt::UIElement>()));
01180     }
01181
01182     isInFooterMenu = parent == m_leftNavFooterMenuRepeater.get() || parent == m_topNavFooterMenuRepeater.get();
01183
01184     path.insert(path.begin(), isInFooterMenu ? c_footerMenuBlockIndex : c_mainMenuBlockIndex);
01185
01186     return IndexPath::CreateFromIndices(path);
01187 }
01188
01189 void NavigationView::OnRepeaterElementPrepared(const winrt::ItemsRepeater& ir, const winrt::ItemsRepeaterElementPreparedEventArgs& args)
01190 {
01191     if (auto nvib = args.Element().try_as<winrt::NavigationViewItemBase>())
01192     {
01193         auto nvibImpl = winrt::get_self<NavigationViewItemBase>(nvib);
01194         nvibImpl->SetNavigationViewParent(*this);
01195         nvibImpl->IsTopLevelItem(IsTopLevelItem(nvib));
01196         nvibImpl->IsInNavigationViewOwnedRepeater(true);
01197
01198         // Visual state info propagation
01199         auto position = [this, ir]()
01200         {
01201             if (IsTopNavigationView())
01202             {
01203                 if (ir == m_topNavRepeater.get())
01204                 {
01205                     return NavigationViewRepeaterPosition::TopPrimary;
01206                 }
01207                 if (ir == m_topNavFooterMenuRepeater.get())
01208                 {
01209                     return NavigationViewRepeaterPosition::TopFooter;
01210                 }
01211                 return NavigationViewRepeaterPosition::TopOverflow;
01212             }
01213             if (ir == m_leftNavFooterMenuRepeater.get())
01214             {
01215                 return NavigationViewRepeaterPosition::LeftFooter;
01216             }
01217             return NavigationViewRepeaterPosition::LeftNav;
01218         }();
01219         nvibImpl->Position(position);
01220
01221         if (auto const parentNVI = GetParentNavigationViewItemForContainer(nvib))
01222         {
01223             auto const parentNVIImpl = winrt::get_self<NavigationViewItem>(parentNVI);
01224             const auto itemDepth = parentNVIImpl->ShouldRepeaterShowInFlyout() ? 0 : parentNVIImpl->Depth() + 1;
01225             nvibImpl->Depth(itemDepth);
01226         }
01227         else
01228         {
01229             nvibImpl->Depth(0);
01230         }
01231
01232         // Apply any custom container styling
01233         ApplyCustomMenuItemContainerStyling(nvib, ir, args.Index());
01234
01235         SetNavigationViewItemBaseRevokers(nvib);
01236
01237         if (auto nvi = args.Element().try_as<winrt::NavigationViewItem>())
01238         {
01239             // Propagate depth to children items if they exist
01240             const auto childDepth = [position, nvibImpl]()
01241             {
01242                 if (position == NavigationViewRepeaterPosition::TopPrimary)
01243                 {
01244                     return 0;
01245                 }
01246                 return nvibImpl->Depth() + 1;
01247
01248             }();
01249             winrt::get_self<NavigationViewItem>(nvi)->PropagateDepthToChildren(childDepth);
01250
01251             SetNavigationViewItemRevokers(nvi);
01252
01253             auto item = MenuItemFromContainer(nvi);
01254
01255             if (SelectedItem() == item && IsVisible(nvi))
01256             {
01257                 if (m_isSelectionChangedPending && m_pendingSelectionChangedItem)
01258                 {
01259                     MUX_ASSERT(m_pendingSelectionChangedItem == item);
01260                 }
01261
01262                 m_selectedItemLayoutUpdatedRevoker = nvi.LayoutUpdated(winrt::auto_revoke, { this, &NavigationView::OnSelectedItemLayoutUpdated });
01263             }
01264         }
01265     }
01266 }
01267
01268 void NavigationView::ApplyCustomMenuItemContainerStyling(const winrt::NavigationViewItemBase& nvib, const winrt::ItemsRepeater& ir, int index)
01269 {
01270     if (auto menuItemContainerStyle = MenuItemContainerStyle())
01271     {
01272         nvib.Style(menuItemContainerStyle);
01273     }
01274     else if (auto menuItemContainerStyleSelector = MenuItemContainerStyleSelector())
01275     {
01276         if (auto itemsSourceView = ir.ItemsSourceView())
01277         {
01278             if (auto item = itemsSourceView.GetAt(index))
01279             {
01280                 if (auto selectedStyle = menuItemContainerStyleSelector.SelectStyle(item, nvib))
01281                 {
01282                     nvib.Style(selectedStyle);
01283                 }
01284             }
01285         }
01286     }
01287 }
01288
01289 void NavigationView::OnRepeaterElementClearing(const winrt::ItemsRepeater& ir, const winrt::ItemsRepeaterElementClearingEventArgs& args)
01290 {
01291     if (auto nvib = args.Element().try_as<winrt::NavigationViewItemBase>())
01292     {
01293         auto const nvibImpl = winrt::get_self<NavigationViewItemBase>(nvib);
01294         nvibImpl->Depth(0);
01295         nvibImpl->IsTopLevelItem(false);
01296         nvibImpl->IsInNavigationViewOwnedRepeater(false);
01297         ClearNavigationViewItemBaseRevokers(nvib);
01298     }
01299 }
01300
01301 // Hook up the Settings Item Invoked event listener
01302 void NavigationView::CreateAndHookEventsToSettings()
01303 {
01304     if (!m_settingsItem)
01305     {
01306         return;
01307     }
01308
01309     auto const settingsItem = m_settingsItem.get();
01310     auto const settingsIcon = winrt::AnimatedIcon();
01311     settingsIcon.Source(winrt::AnimatedSettingsVisualSource());
01312     auto const settingsFallbackIcon = winrt::SymbolIconSource();
01313     settingsFallbackIcon.Symbol(winrt::Symbol::Setting);
01314     settingsIcon.FallbackIconSource(settingsFallbackIcon);
01315     settingsItem.Icon(settingsIcon);
01316
01317     // Do localization for settings item label and Automation Name
01318     auto localizedSettingsName = ResourceAccessor::GetLocalizedStringResource(SR_SettingsButtonName);
01319     winrt::AutomationProperties::SetName(settingsItem, localizedSettingsName);
01320     settingsItem.Tag(box_value(c_settingsItemTag));
01321     UpdateSettingsItemToolTip();
01322
01323     // Add the name only in case of horizontal nav
01324     if (!IsTopNavigationView())
01325     {
01326         settingsItem.Content(box_value(localizedSettingsName));
01327     }
01328     else
01329     {
01330         settingsItem.Content(nullptr);
01331     }
01332
01333     // hook up SettingsItem
01334     SetValue(s_SettingsItemProperty, settingsItem);
01335 }
01336
01337 winrt::Size NavigationView::MeasureOverride(winrt::Size const& availableSize)
01338 {
01339     if (IsTopNavigationView() && IsTopPrimaryListVisible())
01340     {
01341         if (availableSize.Width == std::numeric_limits<float>::infinity())
01342         {
01343             // We have infinite space, so move all items to primary list
01344             m_topDataProvider.MoveAllItemsToPrimaryList();
01345         }
01346         else
01347         {
01348             HandleTopNavigationMeasureOverride(availableSize);
01349 #ifdef DEBUG
01350             if (m_topDataProvider.Size() > 0)
01351             {
01352                 // We should always have at least one item in primary.
01353                 MUX_ASSERT(m_topDataProvider.GetPrimaryItems().Size() > 0);
01354             }
01355 #endif // DEBUG
01356         }
01357     }
01358
01359     m_layoutUpdatedToken.revoke();
01360     m_layoutUpdatedToken = LayoutUpdated(winrt::auto_revoke, { this, &NavigationView::OnLayoutUpdated });
01361
01362     return __super::MeasureOverride(availableSize);
01363 }
01364
01365 void NavigationView::OnLayoutUpdated(const winrt::IInspectable& sender, const winrt::IInspectable& e)
01366 {
01367     // We only need to handle once after MeasureOverride, so revoke the token.
01368     m_layoutUpdatedToken.revoke();
01369
01370     // In topnav, when an item in overflow menu is clicked, the animation is delayed because that item is not move to primary list yet.
01371     // And it depends on LayoutUpdated to re-play the animation. m_lastSelectedItemPendingAnimationInTopNav is the last selected overflow item.
01372     if (auto lastSelectedItemInTopNav = m_lastSelectedItemPendingAnimationInTopNav.get())
01373     {
01374         m_lastSelectedItemPendingAnimationInTopNav.set(nullptr);
01375         AnimateSelectionChanged(lastSelectedItemInTopNav);
01376     }
01377
01378     if (m_OrientationChangedPendingAnimation)
01379     {
01380         m_OrientationChangedPendingAnimation = false;
01381         AnimateSelectionChanged(SelectedItem());
01382     }
01383 }
01384
01385 void NavigationView::OnSizeChanged(winrt::IInspectable const& /*sender*/, winrt::SizeChangedEventArgs const& args)
01386 {
01387     const auto width = args.NewSize().Width;
01388     UpdateOpenPaneLength(width);
01389     UpdateAdaptiveLayout(width);
01390     UpdateTitleBarPadding();
01391     UpdateBackAndCloseButtonsVisibility();
01392     UpdatePaneLayout();
01393 }
01394
01395 void NavigationView::OnItemsContainerSizeChanged(const winrt::IInspectable& sender, const winrt::SizeChangedEventArgs& args)
01396 {
01397     UpdatePaneLayout();
01398 }
01399
01400 void NavigationView::UpdateOpenPaneLength(double width)
01401 {
01402     if (!IsTopNavigationView() && m_rootSplitView)
01403     {
01404         m_OpenPaneLength = std::max(0.0, std::min(width, OpenPaneLength()));
01405
01406         const auto templateSettings = GetTemplateSettings();
01407         templateSettings->OpenPaneLength(m_OpenPaneLength);
01408     }
01409 }
01410
01411 // forceSetDisplayMode: On first call to SetDisplayMode, force setting to initial values
01412 void NavigationView::UpdateAdaptiveLayout(double width, bool forceSetDisplayMode)
01413 {
01414     // In top nav, there is no adaptive pane layout
01415     if (IsTopNavigationView())
01416     {
01417         return;
01418     }
01419
01420     if (!m_rootSplitView)
01421     {
01422         return;
01423     }
01424
01425     // If we decide we want it to animate open/closed when you resize the
01426     // window we'll have to change how we figure out the initial state
01427     // instead of this:
01428     m_initialListSizeStateSet = false; // see UpdateIsClosedCompact()
01429
01430     winrt::NavigationViewDisplayMode displayMode = winrt::NavigationViewDisplayMode::Compact;
01431
01432     const auto paneDisplayMode = PaneDisplayMode();
01433     if (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::Auto)
01434     {
01435         if (width >= ExpandedModeThresholdWidth())
01436         {
01437             displayMode = winrt::NavigationViewDisplayMode::Expanded;
01438         }
01439         else if (width > 0 && width < CompactModeThresholdWidth())
01440         {
01441             displayMode = winrt::NavigationViewDisplayMode::Minimal;
01442         }
01443     }
01444     else if (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::Left)
01445     {
01446         displayMode = winrt::NavigationViewDisplayMode::Expanded;
01447     }
01448     else if (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::LeftCompact)
01449     {
01450         displayMode = winrt::NavigationViewDisplayMode::Compact;
01451     }
01452     else if (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::LeftMinimal)
01453     {
01454         displayMode = winrt::NavigationViewDisplayMode::Minimal;
01455     }
01456     else
01457     {
01458         MUX_FAIL_FAST();
01459     }
01460
01461     if (!forceSetDisplayMode && m_InitialNonForcedModeUpdate) {
01462         if (displayMode == winrt::NavigationViewDisplayMode::Minimal ||
01463             displayMode == winrt::NavigationViewDisplayMode::Compact) {
01464             ClosePane();
01465         }
01466         m_InitialNonForcedModeUpdate = false;
01467     }
01468
01469     const auto previousMode = DisplayMode();
01470     SetDisplayMode(displayMode, forceSetDisplayMode);
01471
01472     if (displayMode == winrt::NavigationViewDisplayMode::Expanded && IsPaneVisible())
01473     {
01474         if (!m_wasForceClosed)
01475         {
01476             OpenPane();
01477         }
01478     }
01479
01480     if (previousMode == winrt::NavigationViewDisplayMode::Expanded
01481         && displayMode == winrt::NavigationViewDisplayMode::Compact)
01482     {
01483         m_initialListSizeStateSet = false;
01484         ClosePane();
01485     }
01486
01487     if (displayMode == winrt::NavigationViewDisplayMode::Minimal)
01488     {
01489         ClosePane();
01490     }
01491 }
01492
01493 void NavigationView::UpdatePaneLayout()
01494 {
01495     if (!IsTopNavigationView())
01496     {
01497         const auto totalAvailableHeight = [this]() {
01498             if (const auto &paneContentRow = m_itemsContainerRow.get())
01499             {
01500                 const double itemsContainerMargin = [this]() {
01501                     if (const auto itemsContainer = m_itemsContainer.get())
01502                     {
01503                         const auto margin = itemsContainer.Margin();
01504                         return margin.Top + margin.Bottom;
01505                     }
01506                     return 0.0;
01507                 }();
01508                 return paneContentRow.ActualHeight() - itemsContainerMargin;
01509             }
01510             return 0.0;
01511         }();
01512
01513         // Only continue if we have a positive amount of space to manage.
01514         if (totalAvailableHeight > 0)
01515         {
01516             const auto heightForMenuItems = [this, totalAvailableHeight]() {
01517
01518                 // We need this value more than twice, so cache it.
01519                 const auto totalAvailableHeightHalf = totalAvailableHeight / 2;
01520
01521                 if (const auto& footerItemsScrollViewer = m_footerItemsScrollViewer.get())
01522                 {
01523                     if (const auto& footerItemsRepeater = m_leftNavFooterMenuRepeater.get())
01524                     {
01525                         if (const auto& menuItems = m_leftNavRepeater.get())
01526                         {
01527                             const auto footersDesiredHeight = [this, footerItemsRepeater]() {
01528                                 double footerItemsRepeaterTopBottomMargin = 0.0;
01529                                 if (footerItemsRepeater.Visibility() == winrt::Visibility::Visible)
01530                                 {
01531                                     const auto footerItemsRepeaterMargin = footerItemsRepeater.Margin();
01532                                     footerItemsRepeaterTopBottomMargin = footerItemsRepeaterMargin.Top + footerItemsRepeaterMargin.Bottom;
01533                                 }
01534                                 auto footerItemsDesiredHeight = LayoutUtils::MeasureAndGetDesiredHeightFor(footerItemsRepeater, c_infSize);
01535                                 return footerItemsDesiredHeight + footerItemsRepeaterTopBottomMargin;
01536                             }();
01537
01538                             const auto paneFooterActualHeight = [this]() {
01539                                 if (const auto& paneFooter = m_leftNavFooterContentBorder.get())
01540                                 {
01541                                     double paneFooterTopBottomMargin = 0.0;
01542                                     if (paneFooter.Visibility() == winrt::Visibility::Visible)
01543                                     {
01544                                         const auto paneFooterMargin = paneFooter.Margin();
01545                                         paneFooterTopBottomMargin = paneFooterMargin.Top + paneFooterMargin.Bottom;
01546                                     }
01547                                     return paneFooter.ActualHeight() + paneFooterTopBottomMargin;
01548                                 }
01549                                 return 0.0;
01550                             }();
01551
01552                             // This is the value computed during the measure pass of the layout process. This will be the value used to determine
01553                             // the partition logic between menuItems and footerGroup, since the ActualHeight may be taller if there's more space.
01554                             const auto menuItemsDesiredHeight = menuItems.DesiredSize().Height;
01555
01556                             // This is what the height ended up being, so will be the value that is used to calculate the partition
01557                             // between menuItems and footerGroup.
01558                             const auto menuItemsActualHeight = [this, menuItems]() {
01559                                 double menuItemsTopBottomMargin = 0.0;
01560                                 if (menuItems.Visibility() == winrt::Visibility::Visible)
01561                                 {
01562                                     const auto menuItemsMargin = menuItems.Margin();
01563                                     menuItemsTopBottomMargin = menuItemsMargin.Top + menuItemsMargin.Bottom;
01564                                 }
01565                                 return menuItems.ActualHeight() + menuItemsTopBottomMargin;
01566                             }();
01567
01568                             // Footer and PaneFooter are included in the footerGroup to calculate available height for menu items.
01569                             const auto footerGroupDesiredHeight = footersDesiredHeight + paneFooterActualHeight;
01570
01571                             if (m_footerItemsSource.Count() == 0 && !IsSettingsVisible())
01572                             {
01573                                 winrt::VisualStateManager::GoToState(*this, c_separatorCollapsedStateName, false);
01574                                 return totalAvailableHeight;
01575                             }
01576                             else if (m_menuItemsSource.Count() == 0)
01577                             {
01578                                 footerItemsScrollViewer.MaxHeight(totalAvailableHeight);
01579                                 winrt::VisualStateManager::GoToState(*this, c_separatorCollapsedStateName, false);
01580                                 return 0.0;
01581                             }
01582                             else if (totalAvailableHeight >= menuItemsDesiredHeight + footerGroupDesiredHeight)
01583                             {
01584                                 // We have enough space for two so let everyone get as much as they need.
01585                                 footerItemsScrollViewer.MaxHeight(footersDesiredHeight);
01586                                 winrt::VisualStateManager::GoToState(*this, c_separatorCollapsedStateName, false);
01587                                 return totalAvailableHeight - footerGroupDesiredHeight;
01588                             }
01589                             else if (menuItemsDesiredHeight <= totalAvailableHeightHalf)
01590                             {
01591                                 // Footer items exceed over the half, so let's limit them.
01592                                 footerItemsScrollViewer.MaxHeight(totalAvailableHeight - menuItemsActualHeight);
01593                                 winrt::VisualStateManager::GoToState(*this, c_separatorVisibleStateName,false);
01594                                 return menuItemsActualHeight;
01595                             }
01596                             else if (footerGroupDesiredHeight <= totalAvailableHeightHalf)
01597                             {
01598                                 // Menu items exceed over the half, so let's limit them.
01599                                 footerItemsScrollViewer.MaxHeight(footersDesiredHeight);
01600                                 winrt::VisualStateManager::GoToState(*this, c_separatorVisibleStateName, false);
01601                                 return totalAvailableHeight - footerGroupDesiredHeight;
01602                             }
01603                             else
01604                             {
01605                                 // Both are more than half the height, so split evenly.
01606                                 footerItemsScrollViewer.MaxHeight(totalAvailableHeightHalf);
01607                                 winrt::VisualStateManager::GoToState(*this, c_separatorVisibleStateName, false);
01608                                 return totalAvailableHeightHalf;
01609                             }
01610                         }
01611                         else
01612                         {
01613                             // Couldn't determine the menuItems.
01614                             // Let's just take all the height and let the other repeater deal with it.
01615                             return totalAvailableHeight - footerItemsRepeater.ActualHeight();
01616                         }
01617                     }
01618                     // We have no idea how much space to occupy as we are not able to get the size of the footer repeater.
01619                     // Stick with 50% as backup.
01620                     footerItemsScrollViewer.MaxHeight(totalAvailableHeightHalf);
01621                 }
01622                 // We couldn't find a good strategy, so limit to 50% percent for the menu items.
01623                 return totalAvailableHeightHalf;
01624             }();
01625             // Footer items should have precedence as that usually contains very
01626             // important items such as settings or the profile.
01627
01628             if (const auto& menuItemsScrollViewer = m_menuItemsScrollViewer.get())
01629             {
01630                 // Update max height for menu items.
01631                 menuItemsScrollViewer.MaxHeight(heightForMenuItems);
01632             }
01633         }
01634     }
01635 }
01636
01637 void NavigationView::OnPaneToggleButtonClick(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
01638 {
01639     if (IsPaneOpen())
01640     {
01641         m_wasForceClosed = true;
01642         ClosePane();
01643     }
01644     else
01645     {
01646         m_wasForceClosed = false;
01647         OpenPane();
01648     }
01649 }
01650
01651 void NavigationView::OnPaneSearchButtonClick(const winrt::IInspectable& /*sender*/, const winrt::RoutedEventArgs& /*args*/)
01652 {
01653     m_wasForceClosed = false;
01654     OpenPane();
01655
01656     if (auto autoSuggestBox = AutoSuggestBox())
01657     {
01658         autoSuggestBox.Focus(winrt::FocusState::Keyboard);
01659     }
01660 }
01661
01662 void NavigationView::OnPaneTitleHolderSizeChanged(const winrt::IInspectable& /*sender*/, const winrt::SizeChangedEventArgs& /*args*/)
01663 {
01664     UpdateBackAndCloseButtonsVisibility();
01665 }
01666
01667 void NavigationView::OpenPane()
01668 {
01669     auto scopeGuard = gsl::finally([this]()
01670         {
01671             m_isOpenPaneForInteraction = false;
01672         });
01673     m_isOpenPaneForInteraction = true;
01674     IsPaneOpen(true);
01675 }
01676
01677 // Call this when you want an uncancellable close
01678 void NavigationView::ClosePane()
01679 {
01680     auto scopeGuard = gsl::finally([this]()
01681         {
01682             m_isOpenPaneForInteraction = false;
01683         });
01684     m_isOpenPaneForInteraction = true;
01685     IsPaneOpen(false); // the SplitView is two-way bound to this value
01686 }
01687
01688 // Call this when NavigationView itself is going to trigger a close
01689 // where you will stop the close if the cancel is triggered
01690 bool NavigationView::AttemptClosePaneLightly()
01691 {
01692     bool pendingPaneClosingCancel = false;
01693
01694     auto eventArgs = winrt::make_self<NavigationViewPaneClosingEventArgs>();
01695     m_paneClosingEventSource(*this, *eventArgs);
01696     pendingPaneClosingCancel = eventArgs->Cancel();
01697
01698     if (!pendingPaneClosingCancel || m_wasForceClosed)
01699     {
01700         m_blockNextClosingEvent = true;
01701         ClosePane();
01702         return true;
01703     }
01704
01705     return false;
01706 }
01707
01708 void NavigationView::OnSplitViewClosedCompactChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& args)
01709 {
01710     if (args == winrt::SplitView::IsPaneOpenProperty() ||
01711         args == winrt::SplitView::DisplayModeProperty())
01712     {
01713         UpdateIsClosedCompact();
01714     }
01715 }
01716
01717 void NavigationView::OnSplitViewPaneClosed(const winrt::DependencyObject& /*sender*/, const winrt::IInspectable& obj)
01718 {
01719     m_paneClosedEventSource(*this, nullptr);
01720 }
01721
01722 void NavigationView::OnSplitViewPaneClosing(const winrt::DependencyObject& /*sender*/, const winrt::SplitViewPaneClosingEventArgs& args)
01723 {
01724     bool pendingPaneClosingCancel = false;
01725     if (m_paneClosingEventSource)
01726     {
01727         if (!m_blockNextClosingEvent) // If this is true, we already sent one out "manually" and don't need to forward SplitView's event
01728         {
01729             auto eventArgs = winrt::make_self<NavigationViewPaneClosingEventArgs>();
01730             eventArgs->SplitViewClosingArgs(args);
01731             m_paneClosingEventSource(*this, *eventArgs);
01732             pendingPaneClosingCancel = eventArgs->Cancel();
01733         }
01734         else
01735         {
01736             m_blockNextClosingEvent = false;
01737         }
01738     }
01739
01740     if (!pendingPaneClosingCancel) // will be set in above event!
01741     {
01742         if (auto splitView = m_rootSplitView.get())
01743         {
01744             if (auto paneList = m_leftNavRepeater.get())
01745             {
01746                 if (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactInline)
01747                 {
01748                     winrt::VisualStateManager::GoToState(*this, L"ListSizeCompact", true /*useTransitions*/);
01749                     UpdatePaneToggleSize();
01750                 }
01751             }
01752         }
01753     }
01754 }
01755
01756 void NavigationView::OnSplitViewPaneOpened(const winrt::DependencyObject& /*sender*/, const winrt::IInspectable& obj)
01757 {
01758     m_paneOpenedEventSource(*this, nullptr);
01759 }
01760
01761 void NavigationView::OnSplitViewPaneOpening(const winrt::DependencyObject& /*sender*/, const winrt::IInspectable& obj)
01762 {
01763     if (m_leftNavRepeater)
01764     {
01765         winrt::VisualStateManager::GoToState(*this, L"ListSizeFull", true /*useTransitions*/);
01766     }
01767
01768     m_paneOpeningEventSource(*this, nullptr);
01769 }
01770
01771 void NavigationView::UpdateIsClosedCompact()
01772 {
01773     if (auto splitView = m_rootSplitView.get())
01774     {
01775         // Check if the pane is closed and if the splitview is in either compact mode.
01776         const auto splitViewDisplayMode = splitView.DisplayMode();
01777         m_isClosedCompact = !splitView.IsPaneOpen() && (splitViewDisplayMode == winrt::SplitViewDisplayMode::CompactOverlay || splitViewDisplayMode == winrt::SplitViewDisplayMode::CompactInline);
01778         winrt::VisualStateManager::GoToState(*this, m_isClosedCompact ? L"ClosedCompact" : L"NotClosedCompact", true /*useTransitions*/);
01779
01780         // Set the initial state of the list size
01781         if (!m_initialListSizeStateSet)
01782         {
01783             m_initialListSizeStateSet = true;
01784             winrt::VisualStateManager::GoToState(*this, m_isClosedCompact ? L"ListSizeCompact" : L"ListSizeFull", true /*useTransitions*/);
01785         }
01786
01787         UpdateTitleBarPadding();
01788         UpdateBackAndCloseButtonsVisibility();
01789         UpdatePaneTitleMargins();
01790         UpdatePaneToggleSize();
01791     }
01792 }
01793
01794 void NavigationView::UpdatePaneButtonsWidths()
01795 {
01796     const auto templateSettings = GetTemplateSettings();
01797
01798     const auto newButtonWidths = [this]()
01799     {
01800         return CompactPaneLength();
01801     }();
01802
01803     templateSettings->PaneToggleButtonWidth(newButtonWidths);
01804     templateSettings->SmallerPaneToggleButtonWidth(std::max(0.0, newButtonWidths - 8));
01805 }
01806
01807 void NavigationView::OnBackButtonClicked(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args)
01808 {
01809     auto eventArgs = winrt::make_self<NavigationViewBackRequestedEventArgs>();
01810     m_backRequestedEventSource(*this, *eventArgs);
01811 }
01812
01813 bool NavigationView::IsOverlay()
01814 {
01815     if (auto splitView = m_rootSplitView.get())
01816     {
01817         return splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay;
01818     }
01819     else
01820     {
01821         return false;
01822     }
01823 }
01824
01825 bool NavigationView::IsLightDismissible()
01826 {
01827     if (auto splitView = m_rootSplitView.get())
01828     {
01829         return splitView.DisplayMode() != winrt::SplitViewDisplayMode::Inline && splitView.DisplayMode() != winrt::SplitViewDisplayMode::CompactInline;
01830     }
01831     else
01832     {
01833         return false;
01834     }
01835 }
01836
01837 bool NavigationView::ShouldShowBackButton()
01838 {
01839     if (m_backButton)
01840     {
01841         if (DisplayMode() == winrt::NavigationViewDisplayMode::Minimal && IsPaneOpen())
01842         {
01843             return false;
01844         }
01845
01846         return ShouldShowBackOrCloseButton();
01847     }
01848
01849     return false;
01850 }
01851
01852 bool NavigationView::ShouldShowCloseButton()
01853 {
01854     if (m_backButton && m_closeButton)
01855     {
01856         if (!IsPaneOpen())
01857         {
01858             return false;
01859         }
01860
01861         const auto paneDisplayMode = PaneDisplayMode();
01862
01863         if (paneDisplayMode != winrt::NavigationViewPaneDisplayMode::LeftMinimal &&
01864             (paneDisplayMode != winrt::NavigationViewPaneDisplayMode::Auto || DisplayMode() != winrt::NavigationViewDisplayMode::Minimal))
01865         {
01866             return false;
01867         }
01868
01869         return ShouldShowBackOrCloseButton();
01870     }
01871
01872     return false;
01873 }
01874
01875 bool NavigationView::ShouldShowBackOrCloseButton()
01876 {
01877     const auto visibility = IsBackButtonVisible();
01878     return (visibility == winrt::NavigationViewBackButtonVisible::Visible || (visibility == winrt::NavigationViewBackButtonVisible::Auto && !SharedHelpers::IsOnXbox()));
01879 }
01880
01881 // The automation name and tooltip for the pane toggle button changes depending on whether it is open or closed
01882 // put the logic here as it will be called in a couple places
01883 void NavigationView::SetPaneToggleButtonAutomationName()
01884 {
01885     winrt::hstring navigationName;
01886     if (IsPaneOpen())
01887     {
01888         navigationName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationButtonOpenName);
01889     }
01890     else
01891     {
01892         navigationName = ResourceAccessor::GetLocalizedStringResource(SR_NavigationButtonClosedName);
01893     }
01894
01895     if (auto paneToggleButton = m_paneToggleButton.get())
01896     {
01897         winrt::AutomationProperties::SetName(paneToggleButton, navigationName);
01898         auto toolTip = winrt::ToolTip();
01899         toolTip.Content(box_value(navigationName));
01900         winrt::ToolTipService::SetToolTip(paneToggleButton, toolTip);
01901     }
01902 }
01903
01904 void NavigationView::UpdateSettingsItemToolTip()
01905 {
01906     if (auto settingsItem = m_settingsItem.get())
01907     {
01908         if (!IsTopNavigationView() && IsPaneOpen())
01909         {
01910             winrt::ToolTipService::SetToolTip(settingsItem, nullptr);
01911         }
01912         else
01913         {
01914             auto localizedSettingsName = ResourceAccessor::GetLocalizedStringResource(SR_SettingsButtonName);
01915             auto toolTip = winrt::ToolTip();
01916             toolTip.Content(box_value(localizedSettingsName));
01917             winrt::ToolTipService::SetToolTip(settingsItem, toolTip);
01918         }
01919     }
01920 }
01921
01922 // Updates the PaneTitleHolder.Visibility and PaneTitleTextBlock.Parent properties based on the PaneDisplayMode, PaneTitle and IsPaneToggleButtonVisible properties.
01923 void NavigationView::UpdatePaneTitleFrameworkElementParents()
01924 {
01925     if (auto&& paneTitleHolderFrameworkElement = m_paneTitleHolderFrameworkElement.get())
01926     {
01927         const auto isPaneToggleButtonVisible = IsPaneToggleButtonVisible();
01928         const auto isTopNavigationView = IsTopNavigationView();
01929         const auto paneTitleSize = PaneTitle().size();
01930
01931         m_isLeftPaneTitleEmpty = (isPaneToggleButtonVisible ||
01932             isTopNavigationView ||
01933             paneTitleSize == 0 ||
01934             (PaneDisplayMode() == winrt::NavigationViewPaneDisplayMode::LeftMinimal && !IsPaneOpen()));
01935
01936         paneTitleHolderFrameworkElement.Visibility(m_isLeftPaneTitleEmpty ? winrt::Visibility::Collapsed : winrt::Visibility::Visible);
01937
01938         if (auto&& paneTitleFrameworkElement = m_paneTitleFrameworkElement.get())
01939         {
01940             const auto paneTitleTopPane = m_paneTitleOnTopPane.get();
01941
01942             const auto first = SetPaneTitleFrameworkElementParent(m_paneToggleButton.get(), paneTitleFrameworkElement, isTopNavigationView || !isPaneToggleButtonVisible);
01943             const auto second = SetPaneTitleFrameworkElementParent(m_paneTitlePresenter.get(), paneTitleFrameworkElement, isTopNavigationView || isPaneToggleButtonVisible);
01944             const auto third = SetPaneTitleFrameworkElementParent(paneTitleTopPane, paneTitleFrameworkElement, !isTopNavigationView || isPaneToggleButtonVisible);
01945             first ? first() : second ? second() : third ? third() : []() {}();
01946
01947             if (paneTitleTopPane)
01948             {
01949                 paneTitleTopPane.Visibility(third && paneTitleSize != 0 ? winrt::Visibility::Visible : winrt::Visibility::Collapsed);
01950             }
01951         }
01952     }
01953 }
01954
01955 std::function<void()> NavigationView::SetPaneTitleFrameworkElementParent(const winrt::ContentControl& parent, const winrt::FrameworkElement& paneTitle, bool shouldNotContainPaneTitle)
01956 {
01957     if (parent)
01958     {
01959         if ((parent.Content() == paneTitle) == shouldNotContainPaneTitle)
01960         {
01961             if (shouldNotContainPaneTitle)
01962             {
01963                 parent.Content(nullptr);
01964             }
01965             else
01966             {
01967                 return [parent, paneTitle]() { parent.Content(paneTitle); };
01968             }
01969         }
01970     }
01971     return nullptr;
01972 }
01973
01974 winrt::float2 c_frame1point1 = winrt::float2(0.9f, 0.1f);
01975 winrt::float2 c_frame1point2 = winrt::float2(1.0f, 0.2f);
01976 winrt::float2 c_frame2point1 = winrt::float2(0.1f, 0.9f);
01977 winrt::float2 c_frame2point2 = winrt::float2(0.2f, 1.0f);
01978
01979 void NavigationView::AnimateSelectionChangedToItem(const winrt::IInspectable& selectedItem)
01980 {
01981     if (selectedItem && !IsSelectionSuppressed(selectedItem))
01982     {
01983         AnimateSelectionChanged(selectedItem);
01984     }
01985 }
01986
01987 // Please clear the field m_lastSelectedItemPendingAnimationInTopNav when calling this method to prevent garbage value and incorrect animation
01988 // when the layout is invalidated as it's called in OnLayoutUpdated.
01989 void NavigationView::AnimateSelectionChanged(const winrt::IInspectable& nextItem)
01990 {
01991     // If we are delaying animation due to item movement in top nav overflow or
01992     // the template is not applied, dont do anything
01993     if (m_lastSelectedItemPendingAnimationInTopNav || !m_appliedTemplate)
01994     {
01995         return;
01996     }
01997
01998     winrt::UIElement prevIndicator = m_activeIndicator.get();
01999     winrt::UIElement nextIndicator = FindSelectionIndicator(nextItem);
02000
02001     bool haveValidAnimation = false;
02002     // It's possible that AnimateSelectionChanged is called multiple times before the first animation is complete.
02003     // To have better user experience, if the selected target is the same, keep the first animation
02004     // If the selected target is not the same, abort the first animation and launch another animation.
02005     if (m_prevIndicator || m_nextIndicator) // There is ongoing animation
02006     {
02007         if (nextIndicator && m_nextIndicator.get() == nextIndicator) // animate to the same target, just wait for animation complete
02008         {
02009             if (prevIndicator && prevIndicator != m_prevIndicator.get())
02010             {
02011                 ResetElementAnimationProperties(prevIndicator, 0.0f);
02012             }
02013             haveValidAnimation = true;
02014         }
02015         else
02016         {
02017             // If the last animation is still playing, force it to complete.
02018             OnAnimationComplete(nullptr, nullptr);
02019         }
02020     }
02021
02022     if (!haveValidAnimation)
02023     {
02024         winrt::UIElement paneContentGrid = m_paneContentGrid.get();
02025
02026         if ((prevIndicator != nextIndicator) && paneContentGrid && prevIndicator && nextIndicator && SharedHelpers::IsAnimationsEnabled())
02027         {
02028             // Make sure both indicators are visible and in their original locations
02029             ResetElementAnimationProperties(prevIndicator, 1.0f);
02030             ResetElementAnimationProperties(nextIndicator, 1.0f);
02031
02032             // get the item positions in the pane
02033             const winrt::Point point = winrt::Point(0, 0);
02034             float prevPos;
02035             float nextPos;
02036
02037             const winrt::Point prevPosPoint = prevIndicator.TransformToVisual(paneContentGrid).TransformPoint(point);
02038             const winrt::Point nextPosPoint = nextIndicator.TransformToVisual(paneContentGrid).TransformPoint(point);
02039             const winrt::Size prevSize = prevIndicator.RenderSize();
02040             const winrt::Size nextSize = nextIndicator.RenderSize();
02041
02042             bool areElementsAtSameDepth = false;
02043             if (IsTopNavigationView())
02044             {
02045                 prevPos = prevPosPoint.X;
02046                 nextPos = nextPosPoint.X;
02047                 areElementsAtSameDepth = prevPosPoint.Y == nextPosPoint.Y;
02048             }
02049             else
02050             {
02051                 prevPos = prevPosPoint.Y;
02052                 nextPos = nextPosPoint.Y;
02053                 areElementsAtSameDepth = prevPosPoint.X == nextPosPoint.X;
02054             }
02055
02056             winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(*this);
02057             winrt::CompositionScopedBatch scopedBatch = visual.Compositor().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
02058
02059             if (!areElementsAtSameDepth)
02060             {
02061                 const bool isNextBelow = prevPosPoint.Y < nextPosPoint.Y;
02062                 prevIndicator.RenderSize().Height > prevIndicator.RenderSize().Width ?
02063                     PlayIndicatorNonSameLevelAnimations(prevIndicator, true, isNextBelow ? false : true) :
02064                     PlayIndicatorNonSameLevelTopPrimaryAnimation(prevIndicator, true);
02065
02066                 nextIndicator.RenderSize().Height > nextIndicator.RenderSize().Width ?
02067                     PlayIndicatorNonSameLevelAnimations(nextIndicator, false, isNextBelow ? true : false) :
02068                     PlayIndicatorNonSameLevelTopPrimaryAnimation(nextIndicator, false);
02069             }
02070             else
02071             {
02072
02073                 const float outgoingEndPosition = static_cast<float>(nextPos - prevPos);
02074                 const float incomingStartPosition = static_cast<float>(prevPos - nextPos);
02075
02076                 // Play the animation on both the previous and next indicators
02077                 PlayIndicatorAnimations(prevIndicator,
02078                     0,
02079                     outgoingEndPosition,
02080                     prevSize,
02081                     nextSize,
02082                     true);
02083                 PlayIndicatorAnimations(nextIndicator,
02084                     incomingStartPosition,
02085                     0,
02086                     prevSize,
02087                     nextSize,
02088                     false);
02089             }
02090
02091             scopedBatch.End();
02092             m_prevIndicator.set(prevIndicator);
02093             m_nextIndicator.set(nextIndicator);
02094
02095             auto strongThis = get_strong();
02096             scopedBatch.Completed(
02097                 [strongThis](auto sender, auto args)
02098                 {
02099                     strongThis->OnAnimationComplete(sender, args);
02100                 });
02101         }
02102         else if (prevIndicator != nextIndicator)
02103         {
02104             // if all else fails, or if animations are turned off, attempt to correctly set the positions and opacities of the indicators.
02105             ResetElementAnimationProperties(prevIndicator, 0.0f);
02106             ResetElementAnimationProperties(nextIndicator, 1.0f);
02107         }
02108
02109         m_activeIndicator.set(nextIndicator);
02110     }
02111 }
02112
02113 void NavigationView::PlayIndicatorNonSameLevelAnimations(const winrt::UIElement& indicator, bool isOutgoing, bool fromTop)
02114 {
02115     winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(indicator);
02116     winrt::Compositor comp = visual.Compositor();
02117
02118     // Determine scaling of indicator (whether it is appearing or dissapearing)
02119     const float beginScale = isOutgoing ? 1.0f : 0.0f;
02120     const float endScale = isOutgoing ? 0.0f : 1.0f;
02121     const winrt::ScalarKeyFrameAnimation scaleAnim = comp.CreateScalarKeyFrameAnimation();
02122     scaleAnim.InsertKeyFrame(0.0f, beginScale);
02123     scaleAnim.InsertKeyFrame(1.0f, endScale);
02124     scaleAnim.Duration(600ms);
02125
02126     // Determine where the indicator is animating from/to
02127     const winrt::Size size = indicator.RenderSize();
02128     const float dimension = IsTopNavigationView() ? size.Width : size.Height;
02129     const float newCenter = fromTop ? 0.0f : dimension;
02130     auto indicatorCenterPoint = visual.CenterPoint();
02131     indicatorCenterPoint.y = newCenter;
02132     visual.CenterPoint(indicatorCenterPoint);
02133
02134     visual.StartAnimation(L"Scale.Y", scaleAnim);
02135 }
02136
02137 void NavigationView::PlayIndicatorNonSameLevelTopPrimaryAnimation(const winrt::UIElement& indicator, bool isOutgoing)
02138 {
02139     winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(indicator);
02140     winrt::Compositor comp = visual.Compositor();
02141
02142     // Determine scaling of indicator (whether it is appearing or dissapearing)
02143     const float beginScale = isOutgoing ? 1.0f : 0.0f;
02144     const float endScale = isOutgoing ? 0.0f : 1.0f;
02145     const winrt::ScalarKeyFrameAnimation scaleAnim = comp.CreateScalarKeyFrameAnimation();
02146     scaleAnim.InsertKeyFrame(0.0f, beginScale);
02147     scaleAnim.InsertKeyFrame(1.0f, endScale);
02148     scaleAnim.Duration(600ms);
02149
02150     // Determine where the indicator is animating from/to
02151     const winrt::Size size = indicator.RenderSize();
02152     const float newCenter = size.Width /2;
02153     auto indicatorCenterPoint = visual.CenterPoint();
02154     indicatorCenterPoint.y = newCenter;
02155     visual.CenterPoint(indicatorCenterPoint);
02156
02157     visual.StartAnimation(L"Scale.X", scaleAnim);
02158 }
02159
02160 void NavigationView::PlayIndicatorAnimations(const winrt::UIElement& indicator, float from, float to, winrt::Size beginSize, winrt::Size endSize, bool isOutgoing)
02161 {
02162     const winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(indicator);
02163     const winrt::Compositor comp = visual.Compositor();
02164
02165     const winrt::Size size = indicator.RenderSize();
02166     const float dimension = IsTopNavigationView() ? size.Width : size.Height;
02167
02168     float beginScale = 1.0f;
02169     float endScale = 1.0f;
02170     if (IsTopNavigationView() && fabs(size.Width) > 0.001f)
02171     {
02172         beginScale = beginSize.Width / size.Width;
02173         endScale = endSize.Width / size.Width;
02174     }
02175
02176     winrt::StepEasingFunction singleStep = comp.CreateStepEasingFunction();
02177     singleStep.IsFinalStepSingleFrame(true);
02178
02179     if (isOutgoing)
02180     {
02181         // fade the outgoing indicator so it looks nice when animating over the scroll area
02182         winrt::ScalarKeyFrameAnimation opacityAnim = comp.CreateScalarKeyFrameAnimation();
02183         opacityAnim.InsertKeyFrame(0.0f, 1.0);
02184         opacityAnim.InsertKeyFrame(0.333f, 1.0, singleStep);
02185         opacityAnim.InsertKeyFrame(1.0f, 0.0, comp.CreateCubicBezierEasingFunction(c_frame2point1, c_frame2point2));
02186         opacityAnim.Duration(600ms);
02187
02188         visual.StartAnimation(L"Opacity", opacityAnim);
02189     }
02190
02191     winrt::ScalarKeyFrameAnimation posAnim = comp.CreateScalarKeyFrameAnimation();
02192     posAnim.InsertKeyFrame(0.0f, from < to ? from : (from + (dimension * (beginScale - 1))));
02193     posAnim.InsertKeyFrame(0.333f, from < to ? (to + (dimension * (endScale - 1))) : to, singleStep);
02194     posAnim.Duration(600ms);
02195
02196     winrt::ScalarKeyFrameAnimation scaleAnim = comp.CreateScalarKeyFrameAnimation();
02197     scaleAnim.InsertKeyFrame(0.0f, beginScale);
02198     scaleAnim.InsertKeyFrame(0.333f, abs(to - from) / dimension + (from < to ? endScale : beginScale), comp.CreateCubicBezierEasingFunction(c_frame1point1, c_frame1point2));
02199     scaleAnim.InsertKeyFrame(1.0f, endScale, comp.CreateCubicBezierEasingFunction(c_frame2point1, c_frame2point2));
02200     scaleAnim.Duration(600ms);
02201
02202     winrt::ScalarKeyFrameAnimation centerAnim = comp.CreateScalarKeyFrameAnimation();
02203     centerAnim.InsertKeyFrame(0.0f, from < to ? 0.0f : dimension);
02204     centerAnim.InsertKeyFrame(1.0f, from < to ? dimension : 0.0f, singleStep);
02205     centerAnim.Duration(200ms);
02206
02207     if (IsTopNavigationView())
02208     {
02209         visual.StartAnimation(L"Offset.X", posAnim);
02210         visual.StartAnimation(L"Scale.X", scaleAnim);
02211         visual.StartAnimation(L"CenterPoint.X", centerAnim);
02212     }
02213     else
02214     {
02215         visual.StartAnimation(L"Offset.Y", posAnim);
02216         visual.StartAnimation(L"Scale.Y", scaleAnim);
02217         visual.StartAnimation(L"CenterPoint.Y", centerAnim);
02218     }
02219 }
02220
02221 void NavigationView::OnAnimationComplete(const winrt::IInspectable& /*sender*/, const winrt::CompositionBatchCompletedEventArgs& /*args*/)
02222 {
02223     auto indicator = m_prevIndicator.get();
02224     ResetElementAnimationProperties(indicator, 0.0f);
02225     m_prevIndicator.set(nullptr);
02226
02227     indicator = m_nextIndicator.get();
02228     ResetElementAnimationProperties(indicator, 1.0f);
02229     m_nextIndicator.set(nullptr);
02230 }
02231
02232 void NavigationView::ResetElementAnimationProperties(const winrt::UIElement& element, float desiredOpacity)
02233 {
02234     if (element)
02235     {
02236         element.Opacity(desiredOpacity);
02237         if (winrt::Visual visual = winrt::ElementCompositionPreview::GetElementVisual(element))
02238         {
02239             visual.Offset(winrt::float3(0.0f, 0.0f, 0.0f));
02240             visual.Scale(winrt::float3(1.0f, 1.0f, 1.0f));
02241             visual.Opacity(desiredOpacity);
02242         }
02243     }
02244 }
02245
02246 winrt::NavigationViewItemBase NavigationView::NavigationViewItemBaseOrSettingsContentFromData(const winrt::IInspectable& data)
02247 {
02248     return GetContainerForData<winrt::NavigationViewItemBase>(data);
02249 }
02250
02251 winrt::NavigationViewItem NavigationView::NavigationViewItemOrSettingsContentFromData(const winrt::IInspectable& data)
02252 {
02253     return GetContainerForData<winrt::NavigationViewItem>(data);
02254 }
02255
02256 bool NavigationView::IsSelectionSuppressed(const winrt::IInspectable& item)
02257 {
02258     if (item)
02259     {
02260         if (auto nvi = NavigationViewItemOrSettingsContentFromData(item))
02261         {
02262             return !winrt::get_self<NavigationViewItem>(nvi)->SelectsOnInvoked();
02263         }
02264     }
02265
02266     return false;
02267 }
02268
02269 winrt::UIElement NavigationView::FindSelectionIndicator(const winrt::IInspectable& item)
02270 {
02271     if (item)
02272     {
02273         if (auto const container = NavigationViewItemOrSettingsContentFromData(item))
02274         {
02275             if (const auto indicator = winrt::get_self<NavigationViewItem>(container)->GetSelectionIndicator())
02276             {
02277                 return indicator;
02278             }
02279             else
02280             {
02281                 // Indicator was not found, so maybe the layout hasn't updated yet.
02282                 // So let's do that now.
02283                 container.UpdateLayout();
02284                 // Before manually calling ApplyTemplate, make sure the NavigationViewItem is aware
02285                 // of its owning NavigationView (it is required info for the NavigationViewItem ApplyTemplate process).
02286                 winrt::get_self<NavigationViewItem>(container)->SetNavigationViewParent(*this);
02287                 container.ApplyTemplate();
02288                 return winrt::get_self<NavigationViewItem>(container)->GetSelectionIndicator();
02289             }
02290         }
02291     }
02292     return nullptr;
02293 }
02294
02295 void NavigationView::RaiseSelectionChangedEvent(winrt::IInspectable const& nextItem, bool isSettingsItem, NavigationRecommendedTransitionDirection recommendedDirection)
02296 {
02297     auto eventArgs = winrt::make_self<NavigationViewSelectionChangedEventArgs>();
02298     eventArgs->SelectedItem(nextItem);
02299     eventArgs->IsSettingsSelected(isSettingsItem);
02300     if (nextItem)
02301     {
02302         if (auto container = NavigationViewItemBaseOrSettingsContentFromData(nextItem))
02303         {
02304             eventArgs->SelectedItemContainer(container);
02305         }
02306         else if (container = GetContainerForIndexPath(m_selectionModel.SelectedIndex(), false /* lastVisible */, true /* forceRealize */))
02307         {
02308             MUX_ASSERT(MenuItemFromContainer(container) == nextItem);
02309             eventArgs->SelectedItemContainer(container);
02310         }
02311     }
02312     eventArgs->RecommendedNavigationTransitionInfo(CreateNavigationTransitionInfo(recommendedDirection));
02313     m_selectionChangedEventSource(*this, *eventArgs);
02314 }
02315
02316 // SelectedItem change can be invoked by API or user's action like clicking. if it's not from API, m_shouldRaiseInvokeItemInSelectionChange would be true
02317 // If nextItem is selectionsuppressed, we should undo the selection. We didn't undo it OnSelectionChange because we want change by API has the same undo logic.
02318 void NavigationView::ChangeSelection(const winrt::IInspectable& prevItem, const winrt::IInspectable& nextItem)
02319 {
02320     const bool isSettingsItem = IsSettingsItem(nextItem);
02321
02322     if (IsSelectionSuppressed(nextItem))
02323     {
02324         // This should not be a common codepath. Only happens if customer passes a 'selectionsuppressed' item via API.
02325         UndoSelectionAndRevertSelectionTo(prevItem, nextItem);
02326         RaiseItemInvoked(nextItem, isSettingsItem);
02327     }
02328     else
02329     {
02330         // Other transition other than default only apply to topnav
02331         // when clicking overflow on topnav, transition is from bottom
02332         // otherwise if prevItem is on left side of nextActualItem, transition is from left
02333         //           if prevItem is on right side of nextActualItem, transition is from right
02334         // click on Settings item is considered Default
02335         auto recommendedDirection = [this, prevItem, nextItem]()
02336         {
02337             if (IsTopNavigationView())
02338             {
02339                 if (m_selectionChangeFromOverflowMenu)
02340                 {
02341                     return NavigationRecommendedTransitionDirection::FromOverflow;
02342                 }
02343                 else if (prevItem && nextItem)
02344                 {
02345                     return GetRecommendedTransitionDirection(NavigationViewItemBaseOrSettingsContentFromData(prevItem),
02346                         NavigationViewItemBaseOrSettingsContentFromData(nextItem));
02347                 }
02348             }
02349             return NavigationRecommendedTransitionDirection::Default;
02350         }();
02351
02352         // Bug 17850504, Customer may use NavigationViewItem.IsSelected in ItemInvoke or SelectionChanged Event.
02353         // To keep the logic the same as RS4, ItemInvoke is before unselect the old item
02354         // And SelectionChanged is after we selected the new item.
02355         const auto selectedItem = SelectedItem();
02356         if (m_shouldRaiseItemInvokedAfterSelection)
02357         {
02358             // If selection changed inside ItemInvoked, the flag does not get said to false and the event get's raised again,so we need to set it to false now!
02359             m_shouldRaiseItemInvokedAfterSelection = false;
02360             RaiseItemInvoked(nextItem, isSettingsItem, NavigationViewItemOrSettingsContentFromData(nextItem), recommendedDirection);
02361         }
02362         // Selection was modified inside ItemInvoked, skip everything here!
02363         if (selectedItem != SelectedItem())
02364         {
02365             return;
02366         }
02367         UnselectPrevItem(prevItem, nextItem);
02368         ChangeSelectStatusForItem(nextItem, true /*selected*/);
02369         UpdateSelectionModelSelectionForSelectedItem(nextItem);
02370
02371         {
02372             auto scopeGuard = gsl::finally([this]()
02373             {
02374                 m_shouldIgnoreUIASelectionRaiseAsExpandCollapseWillRaise = false;
02375             });
02376
02377             // Selection changed and we need to notify UIA
02378             // HOWEVER expand collapse can also trigger if an item can expand/collapse
02379             // There are multiple cases when selection changes:
02380             // - Through click on item with no children -> No expand/collapse change
02381             // - Through click on item with children -> Expand/collapse change
02382             // - Through API with item without children -> No expand/collapse change
02383             // - Through API with item with children -> No expand/collapse change
02384             if (!m_shouldIgnoreUIASelectionRaiseAsExpandCollapseWillRaise)
02385             {
02386                 if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
02387                 {
02388                     auto navViewItemPeer = peer.as<winrt::NavigationViewAutomationPeer>();
02389                     winrt::get_self<NavigationViewAutomationPeer>(navViewItemPeer)->RaiseSelectionChangedEvent(
02390                         prevItem, nextItem
02391                     );
02392                 }
02393             }
02394         }
02395
02396         // If this item has an associated container, we'll raise the SelectionChanged event on it immediately.
02397         if (auto const nvi = NavigationViewItemOrSettingsContentFromData(nextItem))
02398         {
02399             AnimateSelectionChanged(nvi);
02400             RaiseSelectionChangedEvent(nextItem, isSettingsItem, recommendedDirection);
02401             ClosePaneIfNeccessaryAfterItemIsClicked(nvi);
02402         }
02403         else
02404         {
02405             // Otherwise, we'll wait until a container gets realized for this item and raise it then.
02406             m_isSelectionChangedPending = true;
02407             m_pendingSelectionChangedItem = nextItem;
02408             m_pendingSelectionChangedDirection = recommendedDirection;
02409
02410             // Previously we used get_weak() here, but we hit a refcounting problem where
02411             // in some scenarios the outer object gets an extra Release() in this process.
02412             auto weakThis {winrt::make_weak(static_cast<winrt::NavigationView>(*this))};
02413             DispatcherQueue().TryEnqueue(
02414                 winrt::DispatcherQueuePriority::Low,
02415                 winrt::DispatcherQueueHandler([weakThis]()
02416                 {
02417                     if(auto strongThis = weakThis.get())
02418                     {
02419                         NavigationView* rawThis = winrt::get_self<NavigationView>(strongThis);
02420                         rawThis->CompletePendingSelectionChange();
02421                     }
02422                 }));
02423         }
02424     }
02425 }
02426
02427
02428
02429 void NavigationView::CompletePendingSelectionChange()
02430 {
02431     // It may be the case that this item is in a collapsed repeater, in which case
02432     // no container will be realized for it.  We'll assume that this this is the case
02433     // if the UI thread has fallen idle without any SelectionChanged being raised.
02434     // In this case, we'll raise the SelectionChanged at that time, as otherwise it'll never be raised.
02435     if (m_isSelectionChangedPending)
02436     {
02437         AnimateSelectionChanged(FindLowestLevelContainerToDisplaySelectionIndicator());
02438
02439         m_isSelectionChangedPending = false;
02440
02441         auto item = m_pendingSelectionChangedItem;
02442         auto direction = m_pendingSelectionChangedDirection;
02443
02444         m_pendingSelectionChangedItem = nullptr;
02445         m_pendingSelectionChangedDirection = NavigationRecommendedTransitionDirection::Default;
02446
02447         RaiseSelectionChangedEvent(item, IsSettingsItem(item), direction);
02448     }
02449 }
02450
02451 void NavigationView::UpdateSelectionModelSelectionForSelectedItem(const winrt::IInspectable& selectedItem)
02452 {
02453     winrt::IndexPath indexPath{ nullptr };
02454
02455     if (auto container = NavigationViewItemBaseOrSettingsContentFromData(selectedItem))
02456     {
02457         indexPath = GetIndexPathForContainer(container);
02458     }
02459     else
02460     {
02461         indexPath = GetIndexPathOfItem(selectedItem);
02462     }
02463
02464     if (indexPath && indexPath.GetSize() > 0)
02465     {
02466         // The SelectedItem property has already been updated. So we want to block any logic from executing
02467         // in the SelectionModel selection changed callback.
02468         auto scopeGuard = gsl::finally([this]()
02469             {
02470                 m_shouldIgnoreNextSelectionChange = false;
02471             });
02472         m_shouldIgnoreNextSelectionChange = true;
02473         UpdateSelectionModelSelection(indexPath);
02474     }
02475 }
02476
02477 void NavigationView::UpdateSelectionModelSelection(const winrt::IndexPath& ip)
02478 {
02479     auto const prevIndexPath = m_selectionModel.SelectedIndex();
02480     m_selectionModel.SelectAt(ip);
02481     UpdateIsChildSelected(prevIndexPath, ip);
02482 }
02483
02484 void NavigationView::UpdateIsChildSelected(const winrt::IndexPath& prevIP, const winrt::IndexPath& nextIP)
02485 {
02486     if (prevIP && prevIP.GetSize() > 0)
02487     {
02488         UpdateIsChildSelectedForIndexPath(prevIP, false /*isChildSelected*/);
02489     }
02490
02491     if (nextIP && nextIP.GetSize() > 0)
02492     {
02493         UpdateIsChildSelectedForIndexPath(nextIP, true /*isChildSelected*/);
02494     }
02495 }
02496
02497 void NavigationView::UpdateIsChildSelectedForIndexPath(const winrt::IndexPath& ip, bool isChildSelected)
02498 {
02499     // Update the isChildSelected property for every container on the IndexPath (with the exception of the actual container pointed to by the indexpath)
02500     auto container = GetContainerForIndex(ip.GetAt(1), ip.GetAt(0) == c_footerMenuBlockIndex /*inFooter*/);
02501     // first index is fo mainmenu or footer
02502     // second is index of item in mainmenu or footer
02503     // next in menuitem children
02504     auto index = 2;
02505     while (container)
02506     {
02507         if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
02508         {
02509             nvi.IsChildSelected(isChildSelected);
02510             if (auto const nextIR = winrt::get_self<NavigationViewItem>(nvi)->GetRepeater())
02511             {
02512                 if (index < ip.GetSize() - 1)
02513                 {
02514                     container = nextIR.TryGetElement(ip.GetAt(index));
02515                     index++;
02516                     continue;
02517                 }
02518             }
02519         }
02520         container = nullptr;
02521     }
02522 }
02523
02524 void NavigationView::RaiseItemInvoked(winrt::IInspectable const& item,
02525     bool isSettings,
02526     winrt::NavigationViewItemBase const& container,
02527     NavigationRecommendedTransitionDirection recommendedDirection)
02528 {
02529     auto invokedItem = item;
02530     auto invokedContainer = container;
02531
02532     auto eventArgs = winrt::make_self<NavigationViewItemInvokedEventArgs>();
02533
02534     if (container)
02535     {
02536         invokedItem = container.Content();
02537     }
02538     else
02539     {
02540         // InvokedItem is container for Settings, but Content of item for other ListViewItem
02541         if (!isSettings)
02542         {
02543             if (auto containerFromData = NavigationViewItemBaseOrSettingsContentFromData(item))
02544             {
02545                 invokedItem = containerFromData.Content();
02546                 invokedContainer = containerFromData;
02547             }
02548         }
02549         else
02550         {
02551             MUX_ASSERT(item);
02552             invokedContainer = item.try_as<winrt::NavigationViewItemBase>();
02553             MUX_ASSERT(invokedContainer);
02554         }
02555     }
02556     eventArgs->InvokedItem(invokedItem);
02557     eventArgs->InvokedItemContainer(invokedContainer);
02558     eventArgs->IsSettingsInvoked(isSettings);
02559     eventArgs->RecommendedNavigationTransitionInfo(CreateNavigationTransitionInfo(recommendedDirection));
02560     m_itemInvokedEventSource(*this, *eventArgs);
02561 }
02562
02563 // forceSetDisplayMode: On first call to SetDisplayMode, force setting to initial values
02564 void NavigationView::SetDisplayMode(const winrt::NavigationViewDisplayMode& displayMode, bool forceSetDisplayMode)
02565 {
02566     // Need to keep the VisualStateGroup "DisplayModeGroup" updated even if the actual
02567     // display mode is not changed. This is due to the fact that there can be a transition between
02568     // 'Minimal' and 'MinimalWithBackButton'.
02569     UpdateVisualStateForDisplayModeGroup(displayMode);
02570
02571     if (forceSetDisplayMode || DisplayMode() != displayMode)
02572     {
02573         // Update header visibility based on what the new display mode will be
02574         UpdateHeaderVisibility(displayMode);
02575
02576         UpdatePaneTabFocusNavigation();
02577
02578         UpdatePaneToggleSize();
02579
02580         RaiseDisplayModeChanged(displayMode);
02581     }
02582 }
02583
02584 // To support TopNavigationView, DisplayModeGroup in visualstate(We call it VisualStateDisplayMode) is decoupled with DisplayMode.
02585 // The VisualStateDisplayMode is the combination of TopNavigationView, DisplayMode, PaneDisplayMode.
02586 // Here is the mapping:
02587 //    TopNav -> Minimal
02588 //    PaneDisplayMode::Left || (PaneDisplayMode::Auto && DisplayMode::Expanded) -> Expanded
02589 //    PaneDisplayMode::LeftCompact || (PaneDisplayMode::Auto && DisplayMode::Compact) -> Compact
02590 //    Map others to Minimal or MinimalWithBackButton
02591 NavigationViewVisualStateDisplayMode NavigationView::GetVisualStateDisplayMode(const winrt::NavigationViewDisplayMode& displayMode)
02592 {
02593     const auto paneDisplayMode = PaneDisplayMode();
02594
02595     if (IsTopNavigationView())
02596     {
02597         return NavigationViewVisualStateDisplayMode::Minimal;
02598     }
02599
02600     if (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::Left ||
02601         (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::Auto && displayMode == winrt::NavigationViewDisplayMode::Expanded))
02602     {
02603         return NavigationViewVisualStateDisplayMode::Expanded;
02604     }
02605
02606     if (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::LeftCompact ||
02607         (paneDisplayMode == winrt::NavigationViewPaneDisplayMode::Auto && displayMode == winrt::NavigationViewDisplayMode::Compact))
02608     {
02609         return NavigationViewVisualStateDisplayMode::Compact;
02610     }
02611
02612     // In minimal mode, when the NavView is closed, the HeaderContent doesn't have
02613     // its own dedicated space, and must 'share' the top of the NavView with the
02614     // pane toggle button ('hamburger' button) and the back button.
02615     // When the NavView is open, the close button is taking space instead of the back button.
02616     if (ShouldShowBackButton() || ShouldShowCloseButton())
02617     {
02618         return NavigationViewVisualStateDisplayMode::MinimalWithBackButton;
02619     }
02620     else
02621     {
02622         return NavigationViewVisualStateDisplayMode::Minimal;
02623     }
02624 }
02625
02626 void NavigationView::UpdateVisualStateForDisplayModeGroup(const winrt::NavigationViewDisplayMode& displayMode)
02627 {
02628     if (auto splitView = m_rootSplitView.get())
02629     {
02630         const auto visualStateDisplayMode = GetVisualStateDisplayMode(displayMode);
02631         auto visualStateName = L"";
02632         auto splitViewDisplayMode = winrt::SplitViewDisplayMode::Overlay;
02633         const auto visualStateNameMinimal = L"Minimal";
02634
02635         switch (visualStateDisplayMode)
02636         {
02637         case NavigationViewVisualStateDisplayMode::MinimalWithBackButton:
02638             visualStateName = L"MinimalWithBackButton";
02639             splitViewDisplayMode = winrt::SplitViewDisplayMode::Overlay;
02640             break;
02641         case NavigationViewVisualStateDisplayMode::Minimal:
02642             visualStateName = visualStateNameMinimal;
02643             splitViewDisplayMode = winrt::SplitViewDisplayMode::Overlay;
02644             break;
02645         case NavigationViewVisualStateDisplayMode::Compact:
02646             visualStateName = L"Compact";
02647             splitViewDisplayMode = winrt::SplitViewDisplayMode::CompactOverlay;
02648             break;
02649         case NavigationViewVisualStateDisplayMode::Expanded:
02650             visualStateName = L"Expanded";
02651             splitViewDisplayMode = winrt::SplitViewDisplayMode::CompactInline;
02652             break;
02653         }
02654
02655         // When the pane is made invisible we need to collapse the pane part of the SplitView
02656         if (!IsPaneVisible())
02657         {
02658             splitViewDisplayMode = winrt::SplitViewDisplayMode::CompactOverlay;
02659         }
02660
02661         auto handled = false;
02662         if (visualStateName == visualStateNameMinimal && IsTopNavigationView())
02663         {
02664             // TopNavigationMinimal was introduced in 19H1. We need to fallback to Minimal if the customer uses an older template.
02665             handled = winrt::VisualStateManager::GoToState(*this, L"TopNavigationMinimal", false /*useTransitions*/);
02666         }
02667         if (!handled)
02668         {
02669             winrt::VisualStateManager::GoToState(*this, visualStateName, false /*useTransitions*/);
02670         }
02671
02672         // Updating the splitview 'DisplayMode' property in some diplaymodes causes children to be added to the popup root.
02673         // This causes an exception if the NavigationView is in the popup root itself (as SplitView is trying to add children to the tree while it is being measured).
02674         // Due to this, we want to defer updating this property for all calls coming from `OnApplyTemplate`to the OnLoaded function.
02675         if (m_fromOnApplyTemplate)
02676         {
02677             m_updateVisualStateForDisplayModeFromOnLoaded = true;
02678         }
02679         else
02680         {
02681             splitView.DisplayMode(splitViewDisplayMode);
02682         }
02683     }
02684 }
02685
02686 void NavigationView::OnNavigationViewItemClicked(const winrt::NavigationViewItem& sender)
02687 {
02688     OnNavigationViewItemInvoked(sender);
02689     sender.Focus(winrt::FocusState::Pointer);
02690 }
02691
02692 void NavigationView::OnNavigationViewItemKeyDown(const winrt::IInspectable& sender, const winrt::KeyRoutedEventArgs& args)
02693 {
02694     if ((args.OriginalKey() == winrt::VirtualKey::GamepadA
02695         || args.Key() == winrt::VirtualKey::Enter
02696         || args.Key() == winrt::VirtualKey::Space))
02697     {
02698         // Only handle those keys if the key is not being held down!
02699         if (!args.KeyStatus().WasKeyDown)
02700         {
02701             if (auto nvi = sender.try_as<winrt::NavigationViewItem>())
02702             {
02703                 HandleKeyEventForNavigationViewItem(nvi, args);
02704             }
02705         }
02706     }
02707     else
02708     {
02709         if (auto nvi = sender.try_as<winrt::NavigationViewItem>())
02710         {
02711             HandleKeyEventForNavigationViewItem(nvi, args);
02712         }
02713     }
02714 }
02715
02716 void NavigationView::HandleKeyEventForNavigationViewItem(const winrt::NavigationViewItem& nvi, const winrt::KeyRoutedEventArgs& args)
02717 {
02718     const auto key = args.Key();
02719     switch (key)
02720     {
02721     case winrt::VirtualKey::Enter:
02722     case winrt::VirtualKey::Space:
02723         args.Handled(true);
02724         OnNavigationViewItemInvoked(nvi);
02725         break;
02726     case winrt::VirtualKey::Home:
02727         args.Handled(true);
02728         KeyboardFocusFirstItemFromItem(nvi);
02729         break;
02730     case winrt::VirtualKey::End:
02731         args.Handled(true);
02732         KeyboardFocusLastItemFromItem(nvi);
02733         break;
02734     case winrt::VirtualKey::Down:
02735         FocusNextDownItem(nvi, args);
02736         break;
02737     case winrt::VirtualKey::Up:
02738         FocusNextUpItem(nvi, args);
02739         break;
02740     }
02741 }
02742
02743 void NavigationView::FocusNextUpItem(const winrt::NavigationViewItem& nvi, const winrt::KeyRoutedEventArgs& args)
02744 {
02745     if (args.OriginalSource() != nvi)
02746     {
02747         return;
02748     }
02749
02750     bool shouldHandleFocus = true;
02751     auto const nviImpl = winrt::get_self<NavigationViewItem>(nvi);
02752     auto options = winrt::FindNextElementOptions();
02753     options.SearchRoot(this->XamlRoot().Content());
02754     auto const nextFocusableElement = winrt::FocusManager::FindNextElement(winrt::FocusNavigationDirection::Up, options);
02755
02756     if (auto const nextFocusableNVI = nextFocusableElement.try_as<winrt::NavigationViewItem>())
02757     {
02758
02759         auto const nextFocusableNVIImpl = winrt::get_self<NavigationViewItem>(nextFocusableNVI);
02760
02761         if (nextFocusableNVIImpl->Depth() == nviImpl->Depth())
02762         {
02763             // If we not at the top of the list for our current depth and the item above us has children, check whether we should move focus onto a child
02764             if (DoesNavigationViewItemHaveChildren(nextFocusableNVI))
02765             {
02766                 // Focus on last lowest level visible container
02767                 if (auto const childRepeater = nextFocusableNVIImpl->GetRepeater())
02768                 {
02769                     if (auto const lastFocusableElement = winrt::FocusManager::FindLastFocusableElement(childRepeater))
02770                     {
02771                         if (auto lastFocusableNVI = lastFocusableElement.try_as<winrt::Control>())
02772                         {
02773                             args.Handled(lastFocusableNVI.Focus(winrt::FocusState::Keyboard));
02774                         }
02775                     }
02776                     else
02777                     {
02778                         args.Handled(nextFocusableNVIImpl->Focus(winrt::FocusState::Keyboard));
02779                     }
02780
02781                 }
02782             }
02783             else
02784             {
02785                 // Traversing up a list where XYKeyboardFocus will result in correct behavior
02786                 shouldHandleFocus = false;
02787             }
02788         }
02789     }
02790
02791     // We are at the top of the list, focus on parent
02792     if (shouldHandleFocus && !args.Handled() && nviImpl->Depth() > 0)
02793     {
02794         if (auto const parentContainer = GetParentNavigationViewItemForContainer(nvi))
02795         {
02796             args.Handled(parentContainer.Focus(winrt::FocusState::Keyboard));
02797         }
02798     }
02799 }
02800
02801 // If item has focusable children, move focus to first focusable child, otherise just defer to default XYKeyboardFocus behavior
02802 void NavigationView::FocusNextDownItem(const winrt::NavigationViewItem& nvi, const winrt::KeyRoutedEventArgs& args)
02803 {
02804     if (args.OriginalSource() != nvi)
02805     {
02806         return;
02807     }
02808
02809     if (DoesNavigationViewItemHaveChildren(nvi))
02810     {
02811         auto const nviImpl = winrt::get_self<NavigationViewItem>(nvi);
02812         if (auto const childRepeater = nviImpl->GetRepeater())
02813         {
02814             auto const firstFocusableElement = winrt::FocusManager::FindFirstFocusableElement(childRepeater);
02815             if (auto controlFirst = firstFocusableElement.try_as<winrt::Control>())
02816             {
02817                 args.Handled(controlFirst.Focus(winrt::FocusState::Keyboard));
02818             }
02819         }
02820     }
02821 }
02822
02823 void NavigationView::KeyboardFocusFirstItemFromItem(const winrt::NavigationViewItemBase& nvib)
02824 {
02825     auto const firstElement = [this, nvib]()
02826     {
02827         auto const parentIR = GetParentRootItemsRepeaterForContainer(nvib);
02828         return parentIR.TryGetElement(0);
02829     }();
02830
02831     if (auto controlFirst = firstElement.try_as<winrt::Control>())
02832     {
02833         controlFirst.Focus(winrt::FocusState::Keyboard);
02834     }
02835 }
02836
02837 void NavigationView::KeyboardFocusLastItemFromItem(const winrt::NavigationViewItemBase& nvib)
02838 {
02839     auto const parentIR = GetParentRootItemsRepeaterForContainer(nvib);
02840
02841     if (auto itemsSourceView = parentIR.ItemsSourceView())
02842     {
02843         const auto lastIndex = itemsSourceView.Count() - 1;
02844         if (auto lastElement = parentIR.TryGetElement(lastIndex))
02845         {
02846             if (auto controlLast = lastElement.try_as<winrt::Control>())
02847             {
02848                 controlLast.Focus(winrt::FocusState::Programmatic);
02849             }
02850         }
02851     }
02852 }
02853
02854 void NavigationView::OnRepeaterGettingFocus(const winrt::IInspectable& sender, const winrt::GettingFocusEventArgs& args)
02855 {
02856     // If focus change was invoked by Tab key and there is a selected item in the ItemsRepeater that is getting focus, put focus on that selected item.
02857     if (m_TabKeyPrecedesFocusChange && args.InputDevice() == winrt::FocusInputDeviceKind::Keyboard && m_selectionModel.SelectedIndex())
02858     {
02859         if (auto const oldFocusedElement = args.OldFocusedElement())
02860         {
02861             if (auto const newRootItemsRepeater = sender.try_as<winrt::ItemsRepeater>())
02862             {
02863                 auto const isFocusOutsideCurrentRootRepeater = [this, oldFocusedElement, newRootItemsRepeater]()
02864                 {
02865                     bool isFocusOutsideCurrentRootRepeater = true;
02866                     auto treeWalkerCursor = oldFocusedElement;
02867
02868                     // check if last focused element was in same root repeater
02869                     while (treeWalkerCursor)
02870                     {
02871                         if (auto oldFocusedNavigationItemBase = treeWalkerCursor.try_as<winrt::NavigationViewItemBase>())
02872                         {
02873                             auto const oldParentRootRepeater = GetParentRootItemsRepeaterForContainer(oldFocusedNavigationItemBase);
02874                             isFocusOutsideCurrentRootRepeater = oldParentRootRepeater != newRootItemsRepeater;
02875                             break;
02876                         }
02877
02878                         treeWalkerCursor = winrt::VisualTreeHelper::GetParent(treeWalkerCursor);
02879                     }
02880
02881                     return isFocusOutsideCurrentRootRepeater;
02882                 }();
02883
02884                 auto const rootRepeaterForSelectedItem = [this]()
02885                 {
02886                     if (IsTopNavigationView())
02887                     {
02888                         return m_selectionModel.SelectedIndex().GetAt(0) == c_mainMenuBlockIndex ? m_topNavRepeater.get() : m_topNavFooterMenuRepeater.get();
02889                     }
02890                     return m_selectionModel.SelectedIndex().GetAt(0) == c_mainMenuBlockIndex ? m_leftNavRepeater.get() : m_leftNavFooterMenuRepeater.get();
02891                 }();
02892
02893                 // If focus is coming from outside the root repeater,
02894                 // and selected item is within current repeater
02895                 // we should put focus on selected item
02896                 if (newRootItemsRepeater == rootRepeaterForSelectedItem && isFocusOutsideCurrentRootRepeater)
02897                 {
02898                     auto const selectedContainer = GetContainerForIndexPath(m_selectionModel.SelectedIndex(), true /* lastVisible */);
02899                     if (args.TrySetNewFocusedElement(selectedContainer))
02900                     {
02901                         args.Handled(true);
02902                     }
02903                 }
02904                 else if (!isFocusOutsideCurrentRootRepeater)
02905                 {
02906                     // Tab or Shift-Tab from within the same root repeater should move focus outside it
02907                     auto navigationViewItemBase = args.NewFocusedElement().try_as<winrt::NavigationViewItemBase>();
02908                     if (navigationViewItemBase &&
02909                        (args.Direction() == winrt::FocusNavigationDirection::Previous ||
02910                         args.Direction() == winrt::FocusNavigationDirection::Next))
02911                     {
02912                         // We need to find the next tab stop outside the root repeater.
02913                         // winrt::FocusManager::FindNextElement will at first give us NavigationViewItems
02914                         // within the root repeater. This is why we need to set IsTabStop = false for
02915                         // the found the elements within the root repeater so that FindNextElement eventually
02916                         // finds an element outside the root repeater.
02917                         std::vector<winrt::NavigationViewItemBase> containersWithTabFocusOff{};
02918
02919                         const winrt::FindNextElementOptions options;
02920                         options.SearchRoot(this->XamlRoot().Content());
02921
02922                         auto nextElement = winrt::FocusManager::FindNextElement(args.Direction(), options);
02923                         while (auto nvib = nextElement.try_as<winrt::NavigationViewItemBase>())
02924                         {
02925                             // Verify the item is in the root repeater we are trying to leave
02926                             if (newRootItemsRepeater == GetParentRootItemsRepeaterForContainer(nvib))
02927                             {
02928                                 nvib.IsTabStop(false);
02929                                 // Keep track of the container so that we can re-enable tab stop once focus leaves
02930                                 containersWithTabFocusOff.push_back(nvib);
02931                                 nextElement = winrt::FocusManager::FindNextElement(args.Direction(), options);
02932                             }
02933                             else
02934                             {
02935                                 break;
02936                             }
02937                         }
02938
02939                         for (auto nvib : containersWithTabFocusOff)
02940                         {
02941                             nvib.IsTabStop(true);
02942                         }
02943
02944                         if (args.TrySetNewFocusedElement(nextElement))
02945                         {
02946                             args.Handled(true);
02947                         }
02948                     }
02949                 }
02950             }
02951         }
02952     }
02953
02954     m_TabKeyPrecedesFocusChange = false;
02955 }
02956
02957 void NavigationView::OnNavigationViewItemOnGotFocus(const winrt::IInspectable& sender, winrt::RoutedEventArgs const& e)
02958 {
02959     if (auto nvi = sender.try_as<winrt::NavigationViewItem>())
02960     {
02961         // Achieve selection follows focus behavior
02962         if (IsNavigationViewListSingleSelectionFollowsFocus())
02963         {
02964             // if nvi is already selected we don't need to invoke it again
02965             // otherwise ItemInvoked fires twice when item was tapped
02966             // or fired when window gets focus
02967             if (nvi.SelectsOnInvoked() && !nvi.IsSelected())
02968             {
02969                 if (IsTopNavigationView())
02970                 {
02971                     if (auto parentIR = GetParentItemsRepeaterForContainer(nvi))
02972                     {
02973                         if (parentIR != m_topNavRepeaterOverflowView.get())
02974                         {
02975                             OnNavigationViewItemInvoked(nvi);
02976                         }
02977                     }
02978                 }
02979                 else
02980                 {
02981                     OnNavigationViewItemInvoked(nvi);
02982                 }
02983             }
02984         }
02985     }
02986 }
02987
02988 void NavigationView::OnSettingsInvoked()
02989 {
02990     auto settingsItem = m_settingsItem.get();
02991     if (settingsItem)
02992     {
02993         OnNavigationViewItemInvoked(settingsItem);
02994     }
02995 }
02996
02997 void NavigationView::OnPreviewKeyDown(winrt::KeyRoutedEventArgs const& e)
02998 {
02999     m_TabKeyPrecedesFocusChange = false;
03000     __super::OnPreviewKeyDown(e);
03001 }
03002
03003 void NavigationView::OnKeyDown(winrt::KeyRoutedEventArgs const& e)
03004 {
03005     const auto& eventArgs = e;
03006     const auto key = eventArgs.Key();
03007
03008     bool handled = false;
03009     m_TabKeyPrecedesFocusChange = false;
03010
03011     switch (key)
03012     {
03013     case winrt::VirtualKey::GamepadView:
03014         if (!IsPaneOpen() && !IsTopNavigationView())
03015         {
03016             OpenPane();
03017             handled = true;
03018         }
03019         break;
03020     case winrt::VirtualKey::GoBack:
03021     case winrt::VirtualKey::XButton1:
03022         if (IsPaneOpen() && IsLightDismissible())
03023         {
03024             handled = AttemptClosePaneLightly();
03025         }
03026         break;
03027     case winrt::VirtualKey::GamepadLeftShoulder:
03028         handled = BumperNavigation(-1);
03029         break;
03030     case winrt::VirtualKey::GamepadRightShoulder:
03031         handled = BumperNavigation(1);
03032         break;
03033     case winrt::VirtualKey::Tab:
03034         // arrow keys navigation through ItemsRepeater don't get here
03035         // so handle tab key to distinguish between tab focus and arrow focus navigation
03036         m_TabKeyPrecedesFocusChange = true;
03037         break;
03038     case winrt::VirtualKey::Left:
03039         const auto altState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu);
03040         const bool isAltPressed = (altState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
03041
03042         if (isAltPressed && IsPaneOpen() && IsLightDismissible())
03043         {
03044             handled = AttemptClosePaneLightly();
03045         }
03046
03047         break;
03048     }
03049
03050     eventArgs.Handled(handled);
03051
03052     __super::OnKeyDown(e);
03053 }
03054
03055 bool NavigationView::BumperNavigation(int offset)
03056 {
03057     // By passing an offset indicating direction (ideally 1 or -1, meaning right or left respectively)
03058     // we'll try to move focus to an item. We won't be moving focus to items in the overflow menu and this won't
03059     // work on left navigation, only dealing with the top primary list here and only with items that don't have
03060     // !SelectsOnInvoked set to true. If !SelectsOnInvoked is true, we'll skip the item and try focusing on the next one
03061     // that meets the conditions, in the same direction.
03062     const auto shoulderNavigationEnabledParamValue = ShoulderNavigationEnabled();
03063     const auto shoulderNavigationForcedDisabled = (shoulderNavigationEnabledParamValue == winrt::NavigationViewShoulderNavigationEnabled::Never);
03064     const auto shoulderNavigationOptionalDisabled = (shoulderNavigationEnabledParamValue == winrt::NavigationViewShoulderNavigationEnabled::WhenSelectionFollowsFocus
03065         && SelectionFollowsFocus() == winrt::NavigationViewSelectionFollowsFocus::Disabled);
03066
03067     if (!IsTopNavigationView()
03068         || shoulderNavigationOptionalDisabled
03069         || shoulderNavigationForcedDisabled)
03070     {
03071         return false;
03072     }
03073
03074     const auto shoulderNavigationSelectionFollowsFocusEnabled = (SelectionFollowsFocus() == winrt::NavigationViewSelectionFollowsFocus::Enabled
03075         && shoulderNavigationEnabledParamValue == winrt::NavigationViewShoulderNavigationEnabled::WhenSelectionFollowsFocus);
03076
03077     const auto shoulderNavigationEnabled = (shoulderNavigationSelectionFollowsFocusEnabled
03078         || shoulderNavigationEnabledParamValue == winrt::NavigationViewShoulderNavigationEnabled::Always);
03079
03080     if (!shoulderNavigationEnabled)
03081     {
03082         return false;
03083     }
03084
03085     auto item = SelectedItem();
03086
03087     if (item)
03088     {
03089         if (auto nvi = NavigationViewItemOrSettingsContentFromData(item))
03090         {
03091             auto indexPath = GetIndexPathForContainer(nvi);
03092             const auto isInFooter = indexPath.GetAt(0) == c_footerMenuBlockIndex;
03093
03094             const auto indexInMainList = isInFooter ? -1 : indexPath.GetAt(1);
03095             const auto indexInFooter = isInFooter ? indexPath.GetAt(1) : -1;
03096
03097             auto topNavRepeater = m_topNavRepeater.get();
03098             const auto topPrimaryListSize = m_topDataProvider.GetPrimaryListSize();
03099
03100             auto footerRepeater = m_topNavFooterMenuRepeater.get();
03101             auto footerItemsSize = FooterMenuItems().Size();
03102
03103             if (IsSettingsVisible())
03104             {
03105                 footerItemsSize++;
03106             }
03107
03108             if (indexInMainList >= 0)
03109             {
03110
03111                 if (SelectSelectableItemWithOffset(indexInMainList, offset, topNavRepeater, topPrimaryListSize))
03112                 {
03113                     return true;
03114                 }
03115
03116                 // No sutable item found in main list so try to select item in footer
03117                 if (offset > 0)
03118                 {
03119                     return SelectSelectableItemWithOffset(-1, offset, footerRepeater, footerItemsSize);
03120                 }
03121
03122                 return false;
03123             }
03124
03125             if (indexInFooter >= 0)
03126             {
03127
03128                 if (SelectSelectableItemWithOffset(indexInFooter, offset, footerRepeater, footerItemsSize))
03129                 {
03130                     return true;
03131                 }
03132
03133                 // No sutable item found in footer so try to select item in main list
03134                 if (offset < 0)
03135                 {
03136                     return SelectSelectableItemWithOffset(topPrimaryListSize, offset, topNavRepeater, topPrimaryListSize);
03137                 }
03138             }
03139         }
03140     }
03141
03142     return false;
03143 }
03144
03145 bool NavigationView::SelectSelectableItemWithOffset(int startIndex, int offset, winrt::ItemsRepeater const& repeater, int repeaterCollectionSize)
03146 {
03147     startIndex += offset;
03148     while (startIndex > -1 && startIndex < repeaterCollectionSize)
03149     {
03150         auto newItem = repeater.TryGetElement(startIndex);
03151         if (auto newNavViewItem = newItem.try_as<winrt::NavigationViewItem>())
03152         {
03153             // This is done to skip Separators or other items that are not NavigationViewItems
03154             if (winrt::get_self<NavigationViewItem>(newNavViewItem)->SelectsOnInvoked())
03155             {
03156                 newNavViewItem.IsSelected(true);
03157                 return true;
03158             }
03159         }
03160
03161         startIndex += offset;
03162     }
03163     return false;
03164 }
03165
03166 winrt::IInspectable NavigationView::MenuItemFromContainer(winrt::DependencyObject const& container)
03167 {
03168     if (container)
03169     {
03170         if (auto const nvib = container.try_as<winrt::NavigationViewItemBase>())
03171         {
03172             if (auto const parentRepeater = GetParentItemsRepeaterForContainer(nvib))
03173             {
03174                 auto const containerIndex = parentRepeater.GetElementIndex(nvib);
03175                 if (containerIndex >= 0)
03176                 {
03177                     return GetItemFromIndex(parentRepeater, containerIndex);
03178                 }
03179             }
03180         }
03181     }
03182     return nullptr;
03183 }
03184
03185 winrt::DependencyObject NavigationView::ContainerFromMenuItem(winrt::IInspectable const& item)
03186 {
03187     if (const auto& data = item)
03188     {
03189         return NavigationViewItemBaseOrSettingsContentFromData(item);
03190     }
03191
03192     return nullptr;
03193 }
03194
03195 void NavigationView::OnTopNavDataSourceChanged(winrt::NotifyCollectionChangedEventArgs const& args)
03196 {
03197     CloseTopNavigationViewFlyout();
03198
03199     // Assume that raw data doesn't change very often for navigationview.
03200     // So here is a simple implementation and for each data item change, it request a layout change
03201     // update this in the future if there is performance problem
03202
03203     // If it's Uninitialized, it means that we didn't start the layout yet.
03204     if (m_topNavigationMode != TopNavigationViewLayoutState::Uninitialized)
03205     {
03206         m_topDataProvider.MoveAllItemsToPrimaryList();
03207     }
03208
03209     m_lastSelectedItemPendingAnimationInTopNav.set(nullptr);
03210 }
03211
03212 int NavigationView::GetNavigationViewItemCountInPrimaryList()
03213 {
03214     return m_topDataProvider.GetNavigationViewItemCountInPrimaryList();
03215 }
03216
03217 int NavigationView::GetNavigationViewItemCountInTopNav()
03218 {
03219     return m_topDataProvider.GetNavigationViewItemCountInTopNav();
03220 }
03221
03222 winrt::SplitView NavigationView::GetSplitView()
03223 {
03224     return m_rootSplitView.get();
03225 }
03226
03227 void NavigationView::TopNavigationViewItemContentChanged()
03228 {
03229     if (m_appliedTemplate)
03230     {
03231         if (!MenuItemsSource())
03232         {
03233             m_topDataProvider.InvalidWidthCache();
03234         }
03235         InvalidateMeasure();
03236     }
03237 }
03238
03239 void NavigationView::OnAccessKeyInvoked(winrt::IInspectable const& sender, winrt::AccessKeyInvokedEventArgs const& args)
03240 {
03241     if (args.Handled())
03242     {
03243         return;
03244     }
03245
03246     // For topnav, invoke Morebutton, otherwise togglebutton
03247     auto button = IsTopNavigationView() ? m_topNavOverflowButton.get() : m_paneToggleButton.get();
03248     if (button)
03249     {
03250         if (auto peer = winrt::FrameworkElementAutomationPeer::FromElement(button).try_as<winrt::ButtonAutomationPeer>())
03251         {
03252             peer.Invoke();
03253             args.Handled(true);
03254         }
03255     }
03256 }
03257
03258 winrt::NavigationTransitionInfo NavigationView::CreateNavigationTransitionInfo(NavigationRecommendedTransitionDirection recommendedTransitionDirection)
03259 {
03260     // In current implementation, if click is from overflow item, just recommend FromRight Slide animation.
03261     if (recommendedTransitionDirection == NavigationRecommendedTransitionDirection::FromOverflow)
03262     {
03263         recommendedTransitionDirection = NavigationRecommendedTransitionDirection::FromRight;
03264     }
03265
03266     if ((recommendedTransitionDirection == NavigationRecommendedTransitionDirection::FromLeft
03267         || recommendedTransitionDirection == NavigationRecommendedTransitionDirection::FromRight))
03268     {
03269         winrt::SlideNavigationTransitionInfo sliderNav;
03270         const winrt::SlideNavigationTransitionEffect effect =
03271             recommendedTransitionDirection == NavigationRecommendedTransitionDirection::FromRight ?
03272             winrt::SlideNavigationTransitionEffect::FromRight :
03273             winrt::SlideNavigationTransitionEffect::FromLeft;
03274
03275
03276         sliderNav.Effect(effect);
03277         return sliderNav;
03278     }
03279     else
03280     {
03281         winrt::EntranceNavigationTransitionInfo defaultInfo;
03282         return defaultInfo;
03283     }
03284 }
03285
03286 NavigationRecommendedTransitionDirection NavigationView::GetRecommendedTransitionDirection(winrt::DependencyObject const& prev, winrt::DependencyObject const& next)
03287 {
03288     auto recommendedTransitionDirection = NavigationRecommendedTransitionDirection::Default;
03289     auto ir = m_topNavRepeater.get();
03290
03291     if (prev && next && ir)
03292     {
03293         auto prevIndexPath = GetIndexPathForContainer(prev.try_as<winrt::NavigationViewItemBase>());
03294         auto nextIndexPath = GetIndexPathForContainer(next.try_as<winrt::NavigationViewItemBase>());
03295
03296         const auto compare = prevIndexPath.CompareTo(nextIndexPath);
03297
03298         switch (compare)
03299         {
03300             case -1:
03301                 recommendedTransitionDirection = NavigationRecommendedTransitionDirection::FromRight;
03302                 break;
03303             case 1:
03304                 recommendedTransitionDirection = NavigationRecommendedTransitionDirection::FromLeft;
03305                 break;
03306             default:
03307                 recommendedTransitionDirection = NavigationRecommendedTransitionDirection::Default;
03308                 break;
03309         }
03310     }
03311     return recommendedTransitionDirection;
03312 }
03313
03314 NavigationViewTemplateSettings* NavigationView::GetTemplateSettings()
03315 {
03316     return winrt::get_self<NavigationViewTemplateSettings>(TemplateSettings());
03317 }
03318
03319 bool NavigationView::IsNavigationViewListSingleSelectionFollowsFocus()
03320 {
03321     return (SelectionFollowsFocus() == winrt::NavigationViewSelectionFollowsFocus::Enabled);
03322 }
03323
03324 void NavigationView::UpdateSingleSelectionFollowsFocusTemplateSetting()
03325 {
03326     GetTemplateSettings()->SingleSelectionFollowsFocus(IsNavigationViewListSingleSelectionFollowsFocus());
03327 }
03328
03329 void NavigationView::OnMenuItemsSourceCollectionChanged(const winrt::IInspectable&, const winrt::IInspectable&)
03330 {
03331     if (!IsTopNavigationView())
03332     {
03333         UpdatePaneLayout();
03334     }
03335 }
03336
03337 void NavigationView::OnSelectedItemPropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args)
03338 {
03339
03340     const auto newItem = args.NewValue();
03341     const auto oldItem = args.OldValue();
03342
03343     ChangeSelection(oldItem, newItem);
03344
03345     if (m_appliedTemplate && IsTopNavigationView())
03346     {
03347         if (!m_layoutUpdatedToken ||
03348             (newItem && m_topDataProvider.IndexOf(newItem) != s_itemNotFound && m_topDataProvider.IndexOf(newItem, NavigationViewSplitVectorID::PrimaryList) == s_itemNotFound)) // selection is in overflow
03349         {
03350             InvalidateTopNavPrimaryLayout();
03351         }
03352     }
03353 }
03354
03355 void NavigationView::SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(winrt::IInspectable const& item)
03356 {
03357     SelectedItem(item);
03358 }
03359
03360 void NavigationView::ChangeSelectStatusForItem(winrt::IInspectable const& item, bool selected)
03361 {
03362     if (auto container = NavigationViewItemOrSettingsContentFromData(item))
03363     {
03364         // If we unselect an item, ListView doesn't tolerate setting the SelectedItem to nullptr.
03365         // Instead we remove IsSelected from the item itself, and it make ListView to unselect it.
03366         // If we select an item, we follow the unselect to simplify the code.
03367         container.IsSelected(selected);
03368     }
03369     else if (selected)
03370     {
03371         // If we are selecting an item and have not found a realized container for it,
03372         // we may need to manually resolve a container for this in order to update the
03373         // SelectionModel's selected IndexPath.
03374         auto const ip = GetIndexPathOfItem(item);
03375         if (ip && ip.GetSize() > 0)
03376         {
03377             // The SelectedItem property has already been updated. So we want to block any logic from executing
03378             // in the SelectionModel selection changed callback.
03379             auto scopeGuard = gsl::finally([this]()
03380                 {
03381                     m_shouldIgnoreNextSelectionChange = false;
03382                 });
03383             m_shouldIgnoreNextSelectionChange = true;
03384             UpdateSelectionModelSelection(ip);
03385         }
03386     }
03387 }
03388
03389 bool NavigationView::IsSettingsItem(winrt::IInspectable const& item)
03390 {
03391     bool isSettingsItem = false;
03392     if (item)
03393     {
03394         if (auto settingItem = m_settingsItem.get())
03395         {
03396             isSettingsItem = (settingItem == item) || (settingItem.Content() == item);
03397         }
03398     }
03399     return isSettingsItem;
03400 }
03401
03402 void NavigationView::UnselectPrevItem(winrt::IInspectable const& prevItem, winrt::IInspectable const& nextItem)
03403 {
03404     if (prevItem && prevItem != nextItem)
03405     {
03406         auto scopeGuard = gsl::finally([this, setIgnoreNextSelectionChangeToFalse = !m_shouldIgnoreNextSelectionChange]()
03407         {
03408             if (setIgnoreNextSelectionChangeToFalse)
03409             {
03410                 m_shouldIgnoreNextSelectionChange = false;
03411             }
03412         });
03413         m_shouldIgnoreNextSelectionChange = true;
03414         ChangeSelectStatusForItem(prevItem, false /*selected*/);
03415     }
03416 }
03417
03418 void NavigationView::UndoSelectionAndRevertSelectionTo(winrt::IInspectable const& prevSelectedItem, winrt::IInspectable const& nextItem)
03419 {
03420     winrt::IInspectable selectedItem{ nullptr };
03421     if (prevSelectedItem)
03422     {
03423         if (IsSelectionSuppressed(prevSelectedItem))
03424         {
03425             AnimateSelectionChanged(nullptr);
03426         }
03427         else
03428         {
03429             ChangeSelectStatusForItem(prevSelectedItem, true /*selected*/);
03430             AnimateSelectionChangedToItem(prevSelectedItem);
03431             selectedItem = prevSelectedItem;
03432         }
03433     }
03434     else
03435     {
03436         // Bug 18033309, A SelectsOnInvoked=false item is clicked, if we don't unselect it from listview, the second click will not raise ItemClicked
03437         // because listview doesn't raise SelectionChange.
03438         ChangeSelectStatusForItem(nextItem, false /*selected*/);
03439     }
03440     SelectedItem(selectedItem);
03441 }
03442
03443 void NavigationView::CloseTopNavigationViewFlyout()
03444 {
03445     if (auto button = m_topNavOverflowButton.get())
03446     {
03447         if (auto flyout = button.Flyout())
03448         {
03449             flyout.Hide();
03450         }
03451     }
03452 }
03453
03454 void NavigationView::UpdateVisualState(bool useTransitions)
03455 {
03456     if (m_appliedTemplate)
03457     {
03458         const auto box = AutoSuggestBox();
03459         winrt::VisualStateManager::GoToState(*this, box ? L"AutoSuggestBoxVisible" : L"AutoSuggestBoxCollapsed", false /*useTransitions*/);
03460
03461         const bool isVisible = IsSettingsVisible();
03462         winrt::VisualStateManager::GoToState(*this, isVisible ? L"SettingsVisible" : L"SettingsCollapsed", false /*useTransitions*/);
03463
03464         if (IsTopNavigationView())
03465         {
03466             UpdateVisualStateForOverflowButton();
03467         }
03468         else
03469         {
03470             UpdateLeftNavigationOnlyVisualState(useTransitions);
03471         }
03472     }
03473 }
03474
03475 void NavigationView::UpdateVisualStateForOverflowButton()
03476 {
03477     auto state = (OverflowLabelMode() == winrt::NavigationViewOverflowLabelMode::MoreLabel) ?
03478         L"OverflowButtonWithLabel" :
03479         L"OverflowButtonNoLabel";
03480     winrt::VisualStateManager::GoToState(*this, state, false /* useTransitions*/);
03481 }
03482
03483 void NavigationView::UpdateLeftNavigationOnlyVisualState(bool useTransitions)
03484 {
03485     const bool isToggleButtonVisible = IsPaneToggleButtonVisible();
03486     winrt::VisualStateManager::GoToState(*this, isToggleButtonVisible || !m_isLeftPaneTitleEmpty ? L"TogglePaneButtonVisible" : L"TogglePaneButtonCollapsed", false /*useTransitions*/);
03487 }
03488
03489 void NavigationView::SetNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase& nvib)
03490 {
03491     auto nvibRevokers = winrt::make_self<NavigationViewItemBaseRevokers>();
03492     nvibRevokers->visibilityRevoker = RegisterPropertyChanged(nvib, winrt::UIElement::VisibilityProperty(), { this, &NavigationView::OnNavigationViewItemBaseVisibilityPropertyChanged });
03493     nvib.SetValue(s_NavigationViewItemBaseRevokersProperty, nvibRevokers.as<winrt::IInspectable>());
03494     m_itemsWithRevokerObjects.insert(nvib);
03495 }
03496
03497 void NavigationView::SetNavigationViewItemRevokers(const winrt::NavigationViewItem& nvi)
03498 {
03499     if (auto const revokers = nvi.GetValue(s_NavigationViewItemBaseRevokersProperty))
03500     {
03501         if (auto const revokersAsNVIBR = revokers.try_as<NavigationViewItemBaseRevokers>())
03502         {
03503             revokersAsNVIBR->keyDownRevoker = nvi.KeyDown(winrt::auto_revoke, { this, &NavigationView::OnNavigationViewItemKeyDown });
03504             revokersAsNVIBR->gotFocusRevoker = nvi.GotFocus(winrt::auto_revoke, { this, &NavigationView::OnNavigationViewItemOnGotFocus });
03505             revokersAsNVIBR->isSelectedRevoker = RegisterPropertyChanged(nvi, winrt::NavigationViewItemBase::IsSelectedProperty(), { this, &NavigationView::OnNavigationViewItemIsSelectedPropertyChanged });
03506             revokersAsNVIBR->isExpandedRevoker = RegisterPropertyChanged(nvi, winrt::NavigationViewItem::IsExpandedProperty(), { this, &NavigationView::OnNavigationViewItemExpandedPropertyChanged });
03507         }
03508     }
03509 }
03510
03511 void NavigationView::ClearNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase& nvib)
03512 {
03513     RevokeNavigationViewItemBaseRevokers(nvib);
03514     nvib.SetValue(s_NavigationViewItemBaseRevokersProperty, nullptr);
03515     m_itemsWithRevokerObjects.erase(nvib);
03516 }
03517
03518 void NavigationView::ClearAllNavigationViewItemBaseRevokers() noexcept
03519 {
03520     for (const auto& nvib : m_itemsWithRevokerObjects)
03521     {
03522         // ClearAllNavigationViewItemBaseRevokers is only called in the destructor, where exceptions cannot be thrown.
03523         // If the associated NV has not yet been cleaned up, we must detach these revokers or risk a call into freed
03524         // memory being made.  However if they have been cleaned up these calls will throw. In this case we can ignore
03525         // those exceptions.
03526         if (nvib)
03527         {
03528             try
03529             {
03530                 RevokeNavigationViewItemBaseRevokers(nvib);
03531                 nvib.SetValue(s_NavigationViewItemBaseRevokersProperty, nullptr);
03532             }
03533             catch (...) {}
03534         }
03535     }
03536     m_itemsWithRevokerObjects.clear();
03537 }
03538
03539 void NavigationView::RevokeNavigationViewItemBaseRevokers(const winrt::NavigationViewItemBase& nvib)
03540 {
03541     if (auto const revokers = nvib.GetValue(s_NavigationViewItemBaseRevokersProperty))
03542     {
03543         if (auto const revokersAsNVIBR = revokers.try_as<NavigationViewItemBaseRevokers>()) {
03544             revokersAsNVIBR->RevokeAll();
03545         }
03546     }
03547 }
03548
03549 void NavigationView::InvalidateTopNavPrimaryLayout()
03550 {
03551     if (m_appliedTemplate && IsTopNavigationView())
03552     {
03553         InvalidateMeasure();
03554     }
03555 }
03556
03557 float NavigationView::MeasureTopNavigationViewDesiredWidth(winrt::Size const& availableSize)
03558 {
03559     return LayoutUtils::MeasureAndGetDesiredWidthFor(m_topNavGrid.get(), availableSize);
03560 }
03561
03562 float NavigationView::MeasureTopNavMenuItemsHostDesiredWidth(winrt::Size const& availableSize)
03563 {
03564     return LayoutUtils::MeasureAndGetDesiredWidthFor(m_topNavRepeater.get(), availableSize);
03565 }
03566
03567 float NavigationView::GetTopNavigationViewActualWidth()
03568 {
03569     const double width = LayoutUtils::GetActualWidthFor(m_topNavGrid.get());
03570     MUX_ASSERT(width < std::numeric_limits<float>::max());
03571     return static_cast<float>(width);
03572 }
03573
03574 bool NavigationView::HasTopNavigationViewItemNotInPrimaryList()
03575 {
03576     return m_topDataProvider.GetPrimaryListSize() != m_topDataProvider.Size();
03577 }
03578
03579 void NavigationView::ResetAndRearrangeTopNavItems(winrt::Size const& availableSize)
03580 {
03581     if (HasTopNavigationViewItemNotInPrimaryList())
03582     {
03583         m_topDataProvider.MoveAllItemsToPrimaryList();
03584     }
03585     ArrangeTopNavItems(availableSize);
03586 }
03587
03588 void NavigationView::HandleTopNavigationMeasureOverride(winrt::Size const& availableSize)
03589 {
03590     // Determine if TopNav is in Overflow
03591     if (HasTopNavigationViewItemNotInPrimaryList())
03592     {
03593         HandleTopNavigationMeasureOverrideOverflow(availableSize);
03594     }
03595     else
03596     {
03597         HandleTopNavigationMeasureOverrideNormal(availableSize);
03598     }
03599
03600     if (m_topNavigationMode == TopNavigationViewLayoutState::Uninitialized)
03601     {
03602         m_topNavigationMode = TopNavigationViewLayoutState::Initialized;
03603     }
03604 }
03605
03606 void NavigationView::HandleTopNavigationMeasureOverrideNormal(const winrt::Windows::Foundation::Size& availableSize)
03607 {
03608     const auto desiredWidth = MeasureTopNavigationViewDesiredWidth(c_infSize);
03609     if (desiredWidth > availableSize.Width)
03610     {
03611         ResetAndRearrangeTopNavItems(availableSize);
03612     }
03613 }
03614
03615 void NavigationView::HandleTopNavigationMeasureOverrideOverflow(const winrt::Windows::Foundation::Size& availableSize)
03616 {
03617     const auto desiredWidth = MeasureTopNavigationViewDesiredWidth(c_infSize);
03618     if (desiredWidth > availableSize.Width)
03619     {
03620         ShrinkTopNavigationSize(desiredWidth, availableSize);
03621     }
03622     else if (desiredWidth < availableSize.Width)
03623     {
03624         const auto fullyRecoverWidth = m_topDataProvider.WidthRequiredToRecoveryAllItemsToPrimary();
03625         if (availableSize.Width >= desiredWidth + fullyRecoverWidth + m_topNavigationRecoveryGracePeriodWidth)
03626         {
03627             // It's possible to recover from Overflow to Normal state, so we restart the MeasureOverride from first step
03628             ResetAndRearrangeTopNavItems(availableSize);
03629         }
03630         else
03631         {
03632             auto movableItems = FindMovableItemsRecoverToPrimaryList(availableSize.Width - desiredWidth, {}/*includeItems*/);
03633             m_topDataProvider.MoveItemsToPrimaryList(movableItems);
03634         }
03635     }
03636 }
03637
03638 void NavigationView::ArrangeTopNavItems(winrt::Size const& availableSize)
03639 {
03640     SetOverflowButtonVisibility(winrt::Visibility::Collapsed);
03641     const auto desiredWidth = MeasureTopNavigationViewDesiredWidth(c_infSize);
03642     if (!(desiredWidth < availableSize.Width))
03643     {
03644         // overflow
03645         SetOverflowButtonVisibility(winrt::Visibility::Visible);
03646         const auto desiredWidthForOverflowButton = MeasureTopNavigationViewDesiredWidth(c_infSize);
03647
03648         MUX_ASSERT(desiredWidthForOverflowButton >= desiredWidth);
03649         m_topDataProvider.OverflowButtonWidth(desiredWidthForOverflowButton - desiredWidth);
03650
03651         ShrinkTopNavigationSize(desiredWidthForOverflowButton, availableSize);
03652     }
03653 }
03654
03655 void NavigationView::SetOverflowButtonVisibility(winrt::Visibility const& visibility)
03656 {
03657     if (visibility != TemplateSettings().OverflowButtonVisibility())
03658     {
03659         GetTemplateSettings()->OverflowButtonVisibility(visibility);
03660     }
03661 }
03662
03663 void NavigationView::SelectOverflowItem(winrt::IInspectable const& item, winrt::IndexPath const& ip)
03664 {
03665
03666     auto const itemBeingMoved = [item, ip, this]()
03667     {
03668         if (ip.GetSize() > 2)
03669         {
03670             return GetItemFromIndex(m_topNavRepeaterOverflowView.get(), m_topDataProvider.ConvertOriginalIndexToIndex(ip.GetAt(1)));
03671         }
03672         return item;
03673     }();
03674
03675     // Calculate selected overflow item size.
03676     auto selectedOverflowItemIndex = m_topDataProvider.IndexOf(itemBeingMoved);
03677     MUX_ASSERT(selectedOverflowItemIndex != s_itemNotFound);
03678     const auto selectedOverflowItemWidth = m_topDataProvider.GetWidthForItem(selectedOverflowItemIndex);
03679
03680     bool needInvalidMeasure = !m_topDataProvider.IsValidWidthForItem(selectedOverflowItemIndex);
03681
03682     if (!needInvalidMeasure)
03683     {
03684         const auto actualWidth = GetTopNavigationViewActualWidth();
03685         const auto desiredWidth = MeasureTopNavigationViewDesiredWidth(c_infSize);
03686         // This assert triggers on the InfoBadge page, however it seems to recover fine, disabling the assert for now.
03687         // Github issue: https://github.com/microsoft/microsoft-ui-xaml/issues/5771
03688         // MUX_ASSERT(desiredWidth <= actualWidth);
03689
03690         // Calculate selected item size
03691         auto selectedItemIndex = s_itemNotFound;
03692         auto selectedItemWidth = 0.f;
03693         if (auto selectedItem = SelectedItem())
03694         {
03695             selectedItemIndex = m_topDataProvider.IndexOf(selectedItem);
03696             if (selectedItemIndex != s_itemNotFound)
03697             {
03698                 selectedItemWidth = m_topDataProvider.GetWidthForItem(selectedItemIndex);
03699             }
03700         }
03701
03702         const auto widthAtLeastToBeRemoved = desiredWidth + selectedOverflowItemWidth - actualWidth;
03703
03704         // calculate items to be removed from primary because a overflow item is selected.
03705         // SelectedItem is assumed to be removed from primary first, then added it back if it should not be removed
03706         auto itemsToBeRemoved = FindMovableItemsToBeRemovedFromPrimaryList(widthAtLeastToBeRemoved, { } /*excludeItems*/);
03707
03708         // calculate the size to be removed
03709         const auto toBeRemovedItemWidth = m_topDataProvider.CalculateWidthForItems(itemsToBeRemoved);
03710
03711         const auto widthAvailableToRecover = toBeRemovedItemWidth - widthAtLeastToBeRemoved;
03712         auto itemsToBeAdded = FindMovableItemsRecoverToPrimaryList(widthAvailableToRecover, { selectedOverflowItemIndex }/*includeItems*/);
03713
03714         CollectionHelper::unique_push_back(itemsToBeAdded, selectedOverflowItemIndex);
03715
03716         // Keep track of the item being moved in order to know where to animate selection indicator
03717         m_lastSelectedItemPendingAnimationInTopNav.set(itemBeingMoved);
03718         if (ip && ip.GetSize() > 0)
03719         {
03720             for (std::vector<int>::iterator it = itemsToBeRemoved.begin(); it != itemsToBeRemoved.end(); ++it)
03721             {
03722                 if (*it == ip.GetAt(1))
03723                 {
03724                     if (auto const indicator = m_activeIndicator.get())
03725                     {
03726                         // If the previously selected item is being moved into overflow, hide its indicator
03727                         // as we will no longer need to animate from its location.
03728                         AnimateSelectionChanged(nullptr);
03729                     }
03730                     break;
03731                 }
03732             }
03733         }
03734
03735         if (m_topDataProvider.HasInvalidWidth(itemsToBeAdded))
03736         {
03737             needInvalidMeasure = true;
03738         }
03739         else
03740         {
03741             // Exchange items between Primary and Overflow
03742             {
03743                 m_topDataProvider.MoveItemsToPrimaryList(itemsToBeAdded);
03744                 m_topDataProvider.MoveItemsOutOfPrimaryList(itemsToBeRemoved);
03745             }
03746
03747             if (NeedRearrangeOfTopElementsAfterOverflowSelectionChanged(selectedOverflowItemIndex))
03748             {
03749                 needInvalidMeasure = true;
03750             }
03751
03752             if (!needInvalidMeasure)
03753             {
03754                 SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(item);
03755                 InvalidateMeasure();
03756             }
03757         }
03758     }
03759
03760     // TODO: Verify that this is no longer needed and delete
03761     if (needInvalidMeasure)
03762     {
03763         // not all items have known width, need to redo the layout
03764         m_topDataProvider.MoveAllItemsToPrimaryList();
03765         SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(item);
03766         InvalidateTopNavPrimaryLayout();
03767     }
03768 }
03769
03770 bool NavigationView::NeedRearrangeOfTopElementsAfterOverflowSelectionChanged(int selectedOriginalIndex)
03771 {
03772     bool needRearrange = false;
03773
03774     const auto primaryList = m_topDataProvider.GetPrimaryItems();
03775     const auto primaryListSize = primaryList.Size();
03776     const auto indexInPrimary = m_topDataProvider.ConvertOriginalIndexToIndex(selectedOriginalIndex);
03777     // We need to verify that through various overflow selection combinations, the primary
03778     // items have not been put into a state of non-logical item layout (aka not in proper sequence).
03779     // To verify this, if the newly selected item has items following it in the primary items:
03780     // - we verify that they are meant to follow the selected item as specified in the original order
03781     // - we verify that the preceding item is meant to directly precede the selected item in the original order
03782     // If these two conditions are not met, we move all items to the primary list and trigger a re-arrangement of the items.
03783     if (indexInPrimary < static_cast<int>(primaryListSize - 1))
03784     {
03785         auto nextIndexInPrimary = indexInPrimary + 1;
03786         auto nextIndexInOriginal = selectedOriginalIndex + 1;
03787         const auto prevIndexInOriginal = selectedOriginalIndex - 1;
03788
03789         // Check whether item preceding the selected is not directly preceding
03790         // in the original.
03791         if (indexInPrimary > 0)
03792         {
03793             std::vector<int> prevIndexInVector;
03794             prevIndexInVector.push_back(nextIndexInPrimary - 1);
03795             auto prevOriginalIndexOfPrevPrimaryItem = m_topDataProvider.ConvertPrimaryIndexToIndex(prevIndexInVector);
03796             if (prevOriginalIndexOfPrevPrimaryItem.at(0) != prevIndexInOriginal)
03797             {
03798                 needRearrange = true;
03799             }
03800         }
03801
03802
03803         // Check whether items following the selected item are out of order
03804         while (!needRearrange && nextIndexInPrimary < static_cast<int>(primaryListSize))
03805         {
03806             std::vector<int> nextIndexInVector;
03807             nextIndexInVector.push_back(nextIndexInPrimary);
03808             auto originalIndex = m_topDataProvider.ConvertPrimaryIndexToIndex(nextIndexInVector);
03809             if (nextIndexInOriginal != originalIndex.at(0))
03810             {
03811                 needRearrange = true;
03812                 break;
03813             }
03814             nextIndexInPrimary++;
03815             nextIndexInOriginal++;
03816         }
03817     }
03818
03819     return needRearrange;
03820 }
03821
03822 void NavigationView::ShrinkTopNavigationSize(float desiredWidth, winrt::Size const& availableSize)
03823 {
03824     UpdateTopNavigationWidthCache();
03825
03826     const auto selectedItemIndex = GetSelectedItemIndex();
03827
03828     const auto possibleWidthForPrimaryList = MeasureTopNavMenuItemsHostDesiredWidth(c_infSize) - (desiredWidth - availableSize.Width);
03829     if (possibleWidthForPrimaryList >= 0)
03830     {
03831         // Remove all items which is not visible except first item and selected item.
03832         auto itemToBeRemoved = FindMovableItemsBeyondAvailableWidth(possibleWidthForPrimaryList);
03833         // should keep at least one item in primary
03834         KeepAtLeastOneItemInPrimaryList(itemToBeRemoved, true/*shouldKeepFirst*/);
03835         m_topDataProvider.MoveItemsOutOfPrimaryList(itemToBeRemoved);
03836     }
03837
03838     // measure again to make sure SelectedItem is realized
03839     desiredWidth = MeasureTopNavigationViewDesiredWidth(c_infSize);
03840
03841     const auto widthAtLeastToBeRemoved = desiredWidth - availableSize.Width;
03842     if (widthAtLeastToBeRemoved > 0)
03843     {
03844         auto itemToBeRemoved = FindMovableItemsToBeRemovedFromPrimaryList(widthAtLeastToBeRemoved, { selectedItemIndex });
03845
03846         // At least one item is kept on primary list
03847         KeepAtLeastOneItemInPrimaryList(itemToBeRemoved, false/*shouldKeepFirst*/);
03848
03849         // There should be no item is virtualized in this step
03850         MUX_ASSERT(!m_topDataProvider.HasInvalidWidth(itemToBeRemoved));
03851         m_topDataProvider.MoveItemsOutOfPrimaryList(itemToBeRemoved);
03852     }
03853 }
03854
03855 std::vector<int> NavigationView::FindMovableItemsRecoverToPrimaryList(float availableWidth, std::vector<int> const& includeItems)
03856 {
03857     std::vector<int> toBeMoved;
03858
03859     const auto size = m_topDataProvider.Size();
03860
03861     // Included Items take high priority, all of them are included in recovery list
03862     for (const auto index : includeItems)
03863     {
03864         const auto width = m_topDataProvider.GetWidthForItem(index);
03865         toBeMoved.push_back(index);
03866         availableWidth -= width;
03867     }
03868
03869     int i = 0;
03870     while (i < size && availableWidth > 0)
03871     {
03872         if (!m_topDataProvider.IsItemInPrimaryList(i) && !CollectionHelper::contains(includeItems, i))
03873         {
03874             const auto width = m_topDataProvider.GetWidthForItem(i);
03875             if (availableWidth >= width)
03876             {
03877                 toBeMoved.push_back(i);
03878                 availableWidth -= width;
03879             }
03880             else
03881             {
03882                 break;
03883             }
03884         }
03885         i++;
03886     }
03887     // Keep at one item is not in primary list. Two possible reason:
03888     //  1, Most likely it's caused by m_topNavigationRecoveryGracePeriod
03889     //  2, virtualization and it doesn't have cached width
03890     if (i == size && !toBeMoved.empty())
03891     {
03892         toBeMoved.pop_back();
03893     }
03894     return toBeMoved;
03895 }
03896
03897 std::vector<int> NavigationView::FindMovableItemsToBeRemovedFromPrimaryList(float widthAtLeastToBeRemoved, std::vector<int> const& excludeItems)
03898 {
03899     std::vector<int> toBeMoved;
03900
03901     int i = m_topDataProvider.Size() - 1;
03902     while (i >= 0 && widthAtLeastToBeRemoved > 0)
03903     {
03904         if (m_topDataProvider.IsItemInPrimaryList(i))
03905         {
03906             if (!CollectionHelper::contains(excludeItems, i))
03907             {
03908                 const auto width = m_topDataProvider.GetWidthForItem(i);
03909                 toBeMoved.push_back(i);
03910                 widthAtLeastToBeRemoved -= width;
03911             }
03912         }
03913         i--;
03914     }
03915
03916     return toBeMoved;
03917 }
03918
03919 std::vector<int> NavigationView::FindMovableItemsBeyondAvailableWidth(float availableWidth)
03920 {
03921     std::vector<int> toBeMoved;
03922     if (auto ir = m_topNavRepeater.get())
03923     {
03924         const int selectedItemIndexInPrimary = m_topDataProvider.IndexOf(SelectedItem(), NavigationViewSplitVectorID::PrimaryList);
03925         const int size = m_topDataProvider.GetPrimaryListSize();
03926
03927         float requiredWidth = 0;
03928
03929         for (int i = 0; i < size; i++)
03930         {
03931             if (i != selectedItemIndexInPrimary)
03932             {
03933                 bool shouldMove = true;
03934                 if (requiredWidth <= availableWidth)
03935                 {
03936                     const auto container = ir.TryGetElement(i);
03937                     if (container)
03938                     {
03939                         if (const auto containerAsUIElement = container.try_as<winrt::UIElement>())
03940                         {
03941                             const auto width = containerAsUIElement.DesiredSize().Width;
03942                             requiredWidth += width;
03943                             shouldMove = requiredWidth > availableWidth;
03944                         }
03945                     }
03946                     else
03947                     {
03948                         // item is virtualized but not realized.
03949                     }
03950                 }
03951
03952                 if (shouldMove)
03953                 {
03954                     toBeMoved.push_back(i);
03955                 }
03956             }
03957         }
03958     }
03959
03960     return m_topDataProvider.ConvertPrimaryIndexToIndex(toBeMoved);
03961 }
03962
03963 void NavigationView::KeepAtLeastOneItemInPrimaryList(std::vector<int>& itemInPrimaryToBeRemoved, bool shouldKeepFirst)
03964 {
03965     if (!itemInPrimaryToBeRemoved.empty() && static_cast<int>(itemInPrimaryToBeRemoved.size()) == m_topDataProvider.GetPrimaryListSize())
03966     {
03967         if (shouldKeepFirst)
03968         {
03969             itemInPrimaryToBeRemoved.erase(itemInPrimaryToBeRemoved.begin());
03970         }
03971         else
03972         {
03973             itemInPrimaryToBeRemoved.pop_back();
03974         }
03975     }
03976 }
03977
03978 int NavigationView::GetSelectedItemIndex()
03979 {
03980     return m_topDataProvider.IndexOf(SelectedItem());
03981 }
03982
03983 double NavigationView::GetPaneToggleButtonWidth()
03984 {
03985     return unbox_value<double>(SharedHelpers::FindInApplicationResources(L"PaneToggleButtonWidth", box_value(c_paneToggleButtonWidth)));
03986 }
03987
03988 double NavigationView::GetPaneToggleButtonHeight()
03989 {
03990     return unbox_value<double>(SharedHelpers::FindInApplicationResources(L"PaneToggleButtonHeight", box_value(c_paneToggleButtonHeight)));
03991 }
03992
03993 void NavigationView::UpdateTopNavigationWidthCache()
03994 {
03995     const int size = m_topDataProvider.GetPrimaryListSize();
03996     if (auto&& ir = m_topNavRepeater.get())
03997     {
03998         for (int i = 0; i < size; i++)
03999         {
04000             if (const auto container = ir.TryGetElement(i))
04001             {
04002                 if (const auto containerAsUIElement = container.try_as<winrt::UIElement>())
04003                 {
04004                     const auto width = containerAsUIElement.DesiredSize().Width;
04005                     m_topDataProvider.UpdateWidthForPrimaryItem(i, width);
04006                 }
04007             }
04008             else
04009             {
04010                 break;
04011             }
04012         }
04013     }
04014 }
04015
04016 bool NavigationView::IsTopNavigationView()
04017 {
04018     return PaneDisplayMode() == winrt::NavigationViewPaneDisplayMode::Top;
04019 }
04020
04021 bool NavigationView::IsTopPrimaryListVisible()
04022 {
04023     return m_topNavRepeater && (TemplateSettings().TopPaneVisibility() == winrt::Visibility::Visible);
04024 }
04025
04026 void NavigationView::CoerceToGreaterThanZero(double& value)
04027 {
04028     // Property coercion for OpenPaneLength, CompactPaneLength, CompactModeThresholdWidth, ExpandedModeThresholdWidth
04029     value = std::max(value, 0.0);
04030 }
04031
04032 void NavigationView::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
04033 {
04034     winrt::IDependencyProperty property = args.Property();
04035
04036     if (property == s_IsPaneOpenProperty)
04037     {
04038         OnIsPaneOpenChanged();
04039         UpdateVisualStateForDisplayModeGroup(DisplayMode());
04040     }
04041     else if (property == s_CompactModeThresholdWidthProperty ||
04042         property == s_ExpandedModeThresholdWidthProperty)
04043     {
04044         UpdateAdaptiveLayout(ActualWidth());
04045     }
04046     else if (property == s_AlwaysShowHeaderProperty || property == s_HeaderProperty)
04047     {
04048         UpdateHeaderVisibility();
04049     }
04050     else if (property == s_SelectedItemProperty)
04051     {
04052         OnSelectedItemPropertyChanged(args);
04053     }
04054     else if (property == s_PaneTitleProperty)
04055     {
04056         UpdatePaneTitleFrameworkElementParents();
04057         UpdateBackAndCloseButtonsVisibility();
04058         UpdatePaneToggleSize();
04059     }
04060     else if (property == s_IsBackButtonVisibleProperty)
04061     {
04062         UpdateBackAndCloseButtonsVisibility();
04063         UpdateAdaptiveLayout(ActualWidth());
04064         if (IsTopNavigationView())
04065         {
04066             InvalidateTopNavPrimaryLayout();
04067         }
04068
04069         if (g_IsTelemetryProviderEnabled && IsBackButtonVisible() == winrt::NavigationViewBackButtonVisible::Collapsed)
04070         {
04071             //  Explicitly disabling BackUI on NavigationView
04072             [[gsl::suppress(con.4)]] TraceLoggingWrite(
04073                 g_hTelemetryProvider,
04074                 "NavigationView_DisableBackUI",
04075                 TraceLoggingDescription("Developer explicitly disables the BackUI on NavigationView"));
04076         }
04077         // Enabling back button shifts grid instead of resizing, so let's update the layout.
04078         if (const auto& backButton = m_backButton.get())
04079         {
04080             backButton.UpdateLayout();
04081         }
04082         UpdatePaneLayout();
04083     }
04084     else if (property == s_MenuItemsSourceProperty)
04085     {
04086         UpdateRepeaterItemsSource(true /*forceSelectionModelUpdate*/);
04087     }
04088     else if (property == s_MenuItemsProperty)
04089     {
04090         UpdateRepeaterItemsSource(true /*forceSelectionModelUpdate*/);
04091     }
04092     else if (property == s_FooterMenuItemsSourceProperty)
04093     {
04094         UpdateFooterRepeaterItemsSource(true /*sourceCollectionReset*/, true /*sourceCollectionChanged*/);
04095     }
04096     else if (property == s_FooterMenuItemsProperty)
04097     {
04098         UpdateFooterRepeaterItemsSource(true /*sourceCollectionReset*/, true /*sourceCollectionChanged*/);
04099     }
04100     else if (property == s_PaneDisplayModeProperty)
04101     {
04102         // m_wasForceClosed is set to true because ToggleButton is clicked and Pane is closed.
04103         // When PaneDisplayMode is changed, reset the force flag to make the Pane can be opened automatically again.
04104         m_wasForceClosed = false;
04105
04106         UpdatePaneToggleButtonVisibility();
04107         UpdatePaneDisplayMode(auto_unbox(args.OldValue()), auto_unbox(args.NewValue()));
04108         UpdatePaneTitleFrameworkElementParents();
04109         UpdatePaneVisibility();
04110         UpdateVisualState();
04111         UpdatePaneButtonsWidths();
04112     }
04113     else if (property == s_IsPaneVisibleProperty)
04114     {
04115         UpdatePaneVisibility();
04116         UpdateVisualStateForDisplayModeGroup(DisplayMode());
04117
04118         // When NavView is in expaneded mode with fixed window size, setting IsPaneVisible to false doesn't closes the pane
04119         // We manually close/open it for this case
04120         if (!IsPaneVisible() && IsPaneOpen())
04121         {
04122             ClosePane();
04123         }
04124
04125         if (IsPaneVisible() && DisplayMode() == winrt::NavigationViewDisplayMode::Expanded && !IsPaneOpen())
04126         {
04127             OpenPane();
04128         }
04129     }
04130     else if (property == s_OverflowLabelModeProperty)
04131     {
04132         if (m_appliedTemplate)
04133         {
04134             UpdateVisualStateForOverflowButton();
04135             InvalidateTopNavPrimaryLayout();
04136         }
04137     }
04138     else if (property == s_AutoSuggestBoxProperty)
04139     {
04140         InvalidateTopNavPrimaryLayout();
04141         if (args.OldValue())
04142         {
04143             m_autoSuggestBoxQuerySubmittedRevoker.revoke();
04144         }
04145         if (const auto newAutoSuggestBox = args.NewValue().try_as<winrt::AutoSuggestBox>())
04146         {
04147             m_autoSuggestBoxQuerySubmittedRevoker = newAutoSuggestBox.QuerySubmitted(winrt::auto_revoke, {this, &NavigationView::OnAutoSuggestBoxQuerySubmitted });
04148         }
04149         UpdateVisualState(false);
04150     }
04151     else if (property == s_SelectionFollowsFocusProperty)
04152     {
04153         UpdateSingleSelectionFollowsFocusTemplateSetting();
04154     }
04155     else if (property == s_IsPaneToggleButtonVisibleProperty)
04156     {
04157         UpdatePaneTitleFrameworkElementParents();
04158         UpdateBackAndCloseButtonsVisibility();
04159         UpdatePaneToggleButtonVisibility();
04160         UpdateTitleBarPadding();
04161         UpdateVisualState();
04162     }
04163     else if (property == s_IsSettingsVisibleProperty)
04164     {
04165         UpdateFooterRepeaterItemsSource(false /*sourceCollectionReset*/, true /*sourceCollectionChanged*/);
04166     }
04167     else if (property == s_CompactPaneLengthProperty)
04168     {
04169         // Update pane-button-grid width when pane is closed and we are not in minimal
04170         UpdatePaneButtonsWidths();
04171     }
04172     else if (property == s_IsTitleBarAutoPaddingEnabledProperty)
04173     {
04174         UpdateTitleBarPadding();
04175     }
04176     else if (property == s_MenuItemTemplateProperty ||
04177         property == s_MenuItemTemplateSelectorProperty)
04178     {
04179         SyncItemTemplates();
04180     }
04181     else if (property == s_PaneFooterProperty)
04182     {
04183         UpdatePaneLayout();
04184     }
04185     else if (property == s_OpenPaneLengthProperty)
04186     {
04187         UpdateOpenPaneLength(ActualWidth());
04188     }
04189 }
04190
04191 void NavigationView::UpdateNavigationViewItemsFactory()
04192 {
04193     winrt::IInspectable newItemTemplate = MenuItemTemplate();
04194     if (!newItemTemplate)
04195     {
04196         newItemTemplate = MenuItemTemplateSelector();
04197     }
04198     m_navigationViewItemsFactory->UserElementFactory(newItemTemplate);
04199 }
04200
04201 void NavigationView::SyncItemTemplates()
04202 {
04203     UpdateNavigationViewItemsFactory();
04204 }
04205
04206 void NavigationView::OnRepeaterLoaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
04207 {
04208     if (auto item = SelectedItem())
04209     {
04210         if (!IsSelectionSuppressed(item))
04211         {
04212             if (auto navViewItem = NavigationViewItemOrSettingsContentFromData(item))
04213             {
04214                 navViewItem.IsSelected(true);
04215             }
04216
04217             // Make sure the SelectionModel m_selectionModel and actual selection are in sync. An item may have been selected
04218             // while the ItemsRepeater was still unloaded. Thus m_selectionModel still does not know about that selection.
04219             UpdateSelectionModelSelectionForSelectedItem(item);
04220         }
04221         AnimateSelectionChanged(item);
04222     }
04223 }
04224
04225 // If app is .net app, the lifetime of NavigationView maybe depends on garbage collection.
04226 // Unlike other revoker, TitleBar is in global space and we need to stop receiving changed event when it's unloaded.
04227 // So we do hook it in Loaded and Unhook it in Unloaded
04228 void NavigationView::OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
04229 {
04230     m_titleBarMetricsChangedRevoker.revoke();
04231     m_titleBarIsVisibleChangedRevoker.revoke();
04232 }
04233
04234 void NavigationView::OnLoaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args)
04235 {
04236     if (m_updateVisualStateForDisplayModeFromOnLoaded)
04237     {
04238         m_updateVisualStateForDisplayModeFromOnLoaded = false;
04239         UpdateVisualStateForDisplayModeGroup(DisplayMode());
04240     }
04241
04242     if (auto coreTitleBar = m_coreTitleBar.get())
04243     {
04244         m_titleBarMetricsChangedRevoker = coreTitleBar.LayoutMetricsChanged(winrt::auto_revoke, { this, &NavigationView::OnTitleBarMetricsChanged });
04245         m_titleBarIsVisibleChangedRevoker = coreTitleBar.IsVisibleChanged(winrt::auto_revoke, { this, &NavigationView::OnTitleBarIsVisibleChanged });
04246     }
04247     // Update pane buttons now since we the CompactPaneLength is actually known now.
04248     UpdatePaneButtonsWidths();
04249 }
04250
04251 void NavigationView::OnIsPaneOpenChanged()
04252 {
04253     const auto isPaneOpen = IsPaneOpen();
04254     if (isPaneOpen && m_wasForceClosed)
04255     {
04256         m_wasForceClosed = false; // remove the pane open flag since Pane is opened.
04257     }
04258     else if (!m_isOpenPaneForInteraction && !isPaneOpen)
04259     {
04260         if (const auto splitView = m_rootSplitView.get())
04261         {
04262             // splitview.IsPaneOpen and nav.IsPaneOpen is two way binding. If nav.IsPaneOpen=false and splitView.IsPaneOpen=true,
04263             // then the pane has been closed by API and we treat it as a forced close.
04264             // If, however, splitView.IsPaneOpen=false, then nav.IsPaneOpen is just following the SplitView here and the pane
04265             // was closed, for example, due to app window resizing. We don't set the force flag in this situation.
04266             m_wasForceClosed = splitView.IsPaneOpen();
04267         }
04268         else
04269         {
04270             // If there is no SplitView (for example it hasn't been loaded yet) then nav.IsPaneOpen was set directly
04271             // so we treat it as a closed force.
04272             m_wasForceClosed = true;
04273         }
04274     }
04275
04276     SetPaneToggleButtonAutomationName();
04277     UpdatePaneTabFocusNavigation();
04278     UpdateSettingsItemToolTip();
04279     UpdatePaneTitleFrameworkElementParents();
04280     UpdatePaneOverlayGroup();
04281     UpdatePaneButtonsWidths();
04282
04283     if (auto splitView = m_rootSplitView.get())
04284     {
04285         if (IsPaneOpen())
04286         {
04287             SetDropShadow();
04288         }
04289         else
04290         {
04291             UnsetDropShadow();
04292         }
04293     }
04294 }
04295
04296 void NavigationView::UpdatePaneToggleButtonVisibility()
04297 {
04298     const auto visible = IsPaneToggleButtonVisible() && !IsTopNavigationView();
04299     GetTemplateSettings()->PaneToggleButtonVisibility(Util::VisibilityFromBool(visible));
04300 }
04301
04302 void NavigationView::UpdatePaneDisplayMode()
04303 {
04304     if (!m_appliedTemplate)
04305     {
04306         return;
04307     }
04308     if (!IsTopNavigationView())
04309     {
04310         UpdateAdaptiveLayout(ActualWidth(), true /*forceSetDisplayMode*/);
04311
04312         SwapPaneHeaderContent(m_leftNavPaneHeaderContentBorder, m_paneHeaderOnTopPane, L"PaneHeader");
04313         SwapPaneHeaderContent(m_leftNavPaneCustomContentBorder, m_paneCustomContentOnTopPane, L"PaneCustomContent");
04314         SwapPaneHeaderContent(m_leftNavFooterContentBorder, m_paneFooterOnTopPane, L"PaneFooter");
04315
04316         CreateAndHookEventsToSettings();
04317
04318         if (auto paneToggleButton = m_paneToggleButton.get())
04319         {
04320             KeyTipTarget(paneToggleButton);
04321         }
04322     }
04323     else
04324     {
04325         ClosePane();
04326         SetDisplayMode(winrt::NavigationViewDisplayMode::Minimal, true);
04327
04328         SwapPaneHeaderContent(m_paneHeaderOnTopPane, m_leftNavPaneHeaderContentBorder, L"PaneHeader");
04329         SwapPaneHeaderContent(m_paneCustomContentOnTopPane, m_leftNavPaneCustomContentBorder, L"PaneCustomContent");
04330         SwapPaneHeaderContent(m_paneFooterOnTopPane, m_leftNavFooterContentBorder, L"PaneFooter");
04331
04332         CreateAndHookEventsToSettings();
04333
04334         if (auto topNavOverflowButton = m_topNavOverflowButton.get())
04335         {
04336             KeyTipTarget(topNavOverflowButton);
04337         }
04338     }
04339
04340     UpdateContentBindingsForPaneDisplayMode();
04341     UpdateRepeaterItemsSource(false /*forceSelectionModelUpdate*/);
04342     UpdateFooterRepeaterItemsSource(false /*sourceCollectionReset*/, false /*sourceCollectionChanged*/);
04343     if (auto selectedItem = SelectedItem())
04344     {
04345         m_OrientationChangedPendingAnimation = true;
04346     }
04347 }
04348
04349 void NavigationView::UpdatePaneDisplayMode(winrt::NavigationViewPaneDisplayMode oldDisplayMode, winrt::NavigationViewPaneDisplayMode newDisplayMode)
04350 {
04351     if (!m_appliedTemplate)
04352     {
04353         return;
04354     }
04355
04356     UpdatePaneDisplayMode();
04357
04358     // For better user experience, We help customer to Open/Close Pane automatically when we switch between LeftMinimal <-> Left.
04359     // From other navigation PaneDisplayMode to LeftMinimal, we expect pane is closed.
04360     // From LeftMinimal to Left, it is expected the pane is open. For other configurations, this seems counterintuitive.
04361     // See #1702 and #1787
04362     if (!IsTopNavigationView())
04363     {
04364         // In rare cases it is possible to end up in a state where two calls to OnPropertyChanged for PaneDisplayMode can end up on the stack
04365         // Calls above to UpdatePaneDisplayMode() can result in further property updates.
04366         // As a result of this reentrancy, we can end up with an incorrect result for IsPaneOpen as the later OnPropertyChanged for PaneDisplayMode
04367         // will complete during the OnPropertyChanged of the earlier one.
04368         // To avoid this, we only call OpenPane()/ClosePane() if PaneDisplayMode has not changed.
04369         if (newDisplayMode == PaneDisplayMode())
04370         {
04371             if (IsPaneOpen())
04372             {
04373                 if (newDisplayMode == winrt::NavigationViewPaneDisplayMode::LeftMinimal)
04374                 {
04375                     ClosePane();
04376                 }
04377             }
04378             else
04379             {
04380                 if (oldDisplayMode == winrt::NavigationViewPaneDisplayMode::LeftMinimal
04381                     && newDisplayMode == winrt::NavigationViewPaneDisplayMode::Left)
04382                 {
04383                     OpenPane();
04384                 }
04385             }
04386         }
04387
04388     }
04389 }
04390
04391 void NavigationView::UpdatePaneVisibility()
04392 {
04393     auto templateSettings = GetTemplateSettings();
04394     if (IsPaneVisible())
04395     {
04396         if (IsTopNavigationView())
04397         {
04398             templateSettings->LeftPaneVisibility(winrt::Visibility::Collapsed);
04399             templateSettings->TopPaneVisibility(winrt::Visibility::Visible);
04400         }
04401         else
04402         {
04403             templateSettings->TopPaneVisibility(winrt::Visibility::Collapsed);
04404             templateSettings->LeftPaneVisibility(winrt::Visibility::Visible);
04405         }
04406
04407         winrt::VisualStateManager::GoToState(*this, L"PaneVisible", false /*useTransitions*/);
04408     }
04409     else
04410     {
04411         templateSettings->TopPaneVisibility(winrt::Visibility::Collapsed);
04412         templateSettings->LeftPaneVisibility(winrt::Visibility::Collapsed);
04413
04414         winrt::VisualStateManager::GoToState(*this, L"PaneCollapsed", false /*useTransitions*/);
04415     }
04416 }
04417
04418 void NavigationView::SwapPaneHeaderContent(tracker_ref<winrt::ContentControl> newParentTrackRef, tracker_ref<winrt::ContentControl> oldParentTrackRef, winrt::hstring const& propertyPathName)
04419 {
04420     if (auto newParent = newParentTrackRef.get())
04421     {
04422         if (auto oldParent = oldParentTrackRef.get())
04423         {
04424             oldParent.ClearValue(winrt::ContentControl::ContentProperty());
04425         }
04426
04427         SharedHelpers::SetBinding(propertyPathName, newParent, winrt::ContentControl::ContentProperty());
04428     }
04429 }
04430
04431 void NavigationView::UpdateContentBindingsForPaneDisplayMode()
04432 {
04433     winrt::UIElement autoSuggestBoxContentControl = nullptr;
04434     winrt::UIElement notControl = nullptr;
04435     if (!IsTopNavigationView())
04436     {
04437         autoSuggestBoxContentControl = m_leftNavPaneAutoSuggestBoxPresenter.get();
04438         notControl = m_topNavPaneAutoSuggestBoxPresenter.get();
04439     }
04440     else
04441     {
04442         autoSuggestBoxContentControl = m_topNavPaneAutoSuggestBoxPresenter.get();
04443         notControl = m_leftNavPaneAutoSuggestBoxPresenter.get();
04444     }
04445
04446     if (autoSuggestBoxContentControl)
04447     {
04448         if (notControl)
04449         {
04450             notControl.ClearValue(winrt::ContentControl::ContentProperty());
04451         }
04452
04453         SharedHelpers::SetBinding(L"AutoSuggestBox", autoSuggestBoxContentControl, winrt::ContentControl::ContentProperty());
04454     }
04455 }
04456
04457 void NavigationView::UpdateHeaderVisibility()
04458 {
04459     if (!m_appliedTemplate)
04460     {
04461         return;
04462     }
04463
04464     UpdateHeaderVisibility(DisplayMode());
04465 }
04466
04467 void NavigationView::UpdateHeaderVisibility(winrt::NavigationViewDisplayMode displayMode)
04468 {
04469     // Ignore AlwaysShowHeader property in case DisplayMode is Minimal and it's not Top NavigationView
04470     bool showHeader = Header() && (AlwaysShowHeader() || (!IsTopNavigationView() && displayMode == winrt::NavigationViewDisplayMode::Minimal));
04471     winrt::VisualStateManager::GoToState(*this, showHeader ? L"HeaderVisible" : L"HeaderCollapsed", false /*useTransitions*/);
04472 }
04473
04474 void NavigationView::UpdatePaneTabFocusNavigation()
04475 {
04476     if (!m_appliedTemplate)
04477     {
04478         return;
04479     }
04480
04481     winrt::KeyboardNavigationMode mode = winrt::KeyboardNavigationMode::Local;
04482
04483     if (auto splitView = m_rootSplitView.get())
04484     {
04485         // If the pane is open in an overlay (light-dismiss) mode, trap keyboard focus inside the pane
04486         if (IsPaneOpen() && (splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay))
04487         {
04488             mode = winrt::KeyboardNavigationMode::Cycle;
04489         }
04490     }
04491
04492     if (auto paneContentGrid = m_paneContentGrid.get())
04493     {
04494         paneContentGrid.TabFocusNavigation(mode);
04495     }
04496 }
04497
04498 void NavigationView::UpdatePaneToggleSize()
04499 {
04500     if (m_backButton)
04501     {
04502         if (auto splitView = m_rootSplitView.get())
04503         {
04504             double width = GetTemplateSettings()->PaneToggleButtonWidth();
04505             double togglePaneButtonWidth = width;
04506
04507             if (ShouldShowBackButton() && splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay)
04508             {
04509                 double backButtonWidth = c_backButtonWidth;
04510                 if (auto backButton = m_backButton.get())
04511                 {
04512                     backButtonWidth = backButton.Width();
04513                 }
04514
04515                 width += backButtonWidth;
04516             }
04517
04518             if (!m_isClosedCompact && PaneTitle().size() > 0)
04519             {
04520                 if (splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay && IsPaneOpen())
04521                 {
04522                     width = m_OpenPaneLength;
04523                     togglePaneButtonWidth = m_OpenPaneLength - ((ShouldShowBackButton() || ShouldShowCloseButton()) ? c_backButtonWidth : 0);
04524                 }
04525                 else if (!(splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay && !IsPaneOpen()))
04526                 {
04527                     width = m_OpenPaneLength;
04528                     togglePaneButtonWidth = m_OpenPaneLength;
04529                 }
04530             }
04531
04532             if (auto toggleButton = m_paneToggleButton.get())
04533             {
04534                 toggleButton.Width(togglePaneButtonWidth);
04535             }
04536         }
04537     }
04538 }
04539
04540 void NavigationView::UpdateBackAndCloseButtonsVisibility()
04541 {
04542     if (!m_appliedTemplate)
04543     {
04544         return;
04545     }
04546
04547     const auto shouldShowBackButton = ShouldShowBackButton();
04548     const auto backButtonVisibility = Util::VisibilityFromBool(shouldShowBackButton);
04549     const auto visualStateDisplayMode = GetVisualStateDisplayMode(DisplayMode());
04550     const bool useLeftPaddingForBackOrCloseButton =
04551         (visualStateDisplayMode == NavigationViewVisualStateDisplayMode::Minimal && !IsTopNavigationView()) ||
04552         visualStateDisplayMode == NavigationViewVisualStateDisplayMode::MinimalWithBackButton;
04553     double leftPaddingForBackOrCloseButton = 0.0;
04554     double paneHeaderPaddingForToggleButton = 0.0;
04555     double paneHeaderPaddingForCloseButton = 0.0;
04556     double paneHeaderContentBorderRowMinHeight = 0.0;
04557
04558     GetTemplateSettings()->BackButtonVisibility(backButtonVisibility);
04559
04560     if (m_paneToggleButton && IsPaneToggleButtonVisible())
04561     {
04562         paneHeaderContentBorderRowMinHeight = GetPaneToggleButtonHeight();
04563         paneHeaderPaddingForToggleButton = GetPaneToggleButtonWidth();
04564
04565         if (useLeftPaddingForBackOrCloseButton)
04566         {
04567             leftPaddingForBackOrCloseButton = paneHeaderPaddingForToggleButton;
04568         }
04569     }
04570
04571     if (auto backButton = m_backButton.get())
04572     {
04573         if (!m_topNavGrid)
04574         {
04575             backButton.Visibility(backButtonVisibility);
04576         }
04577
04578         if (useLeftPaddingForBackOrCloseButton && backButtonVisibility == winrt::Visibility::Visible)
04579         {
04580             leftPaddingForBackOrCloseButton += backButton.Width();
04581         }
04582     }
04583
04584     if (auto closeButton = m_closeButton.get())
04585     {
04586         const auto closeButtonVisibility = Util::VisibilityFromBool(ShouldShowCloseButton());
04587
04588         closeButton.Visibility(closeButtonVisibility);
04589
04590         if (closeButtonVisibility == winrt::Visibility::Visible)
04591         {
04592             paneHeaderContentBorderRowMinHeight = std::max(paneHeaderContentBorderRowMinHeight, closeButton.Height());
04593
04594             if (useLeftPaddingForBackOrCloseButton)
04595             {
04596                 paneHeaderPaddingForCloseButton = closeButton.Width();
04597                 leftPaddingForBackOrCloseButton += paneHeaderPaddingForCloseButton;
04598             }
04599         }
04600     }
04601
04602     if (auto contentLeftPadding = m_contentLeftPadding.get())
04603     {
04604         contentLeftPadding.Width(leftPaddingForBackOrCloseButton);
04605     }
04606
04607     if (auto paneHeaderToggleButtonColumn = m_paneHeaderToggleButtonColumn.get())
04608     {
04609         // Account for the PaneToggleButton's width in the PaneHeader's placement.
04610         paneHeaderToggleButtonColumn.Width(winrt::GridLengthHelper::FromValueAndType(paneHeaderPaddingForToggleButton, winrt::GridUnitType::Pixel));
04611     }
04612
04613     if (auto paneHeaderCloseButtonColumn = m_paneHeaderCloseButtonColumn.get())
04614     {
04615         // Account for the CloseButton's width in the PaneHeader's placement.
04616         paneHeaderCloseButtonColumn.Width(winrt::GridLengthHelper::FromValueAndType(paneHeaderPaddingForCloseButton, winrt::GridUnitType::Pixel));
04617     }
04618
04619     if (auto paneHeaderContentBorderRow = m_paneHeaderContentBorderRow.get())
04620     {
04621         paneHeaderContentBorderRow.MinHeight(paneHeaderContentBorderRowMinHeight);
04622     }
04623
04624     if (auto paneContentGridAsUIE = m_paneContentGrid.get())
04625     {
04626         if (auto paneContentGrid = paneContentGridAsUIE.try_as<winrt::Grid>())
04627         {
04628             auto rowDefs = paneContentGrid.RowDefinitions();
04629
04630             if (rowDefs.Size() >= c_backButtonRowDefinition)
04631             {
04632                 auto rowDef = rowDefs.GetAt(c_backButtonRowDefinition);
04633
04634                 int backButtonRowHeight = 0;
04635                 if (!IsOverlay() && shouldShowBackButton)
04636                 {
04637                     backButtonRowHeight = c_backButtonHeight;
04638                 }
04639                 else if (!m_backButton)
04640                 {
04641                     // This row represented the height of the hamburger+margin before we had a back button
04642                     backButtonRowHeight = c_toggleButtonHeightWithNoBackButton;
04643                 }
04644
04645                 const auto length = winrt::GridLengthHelper::FromPixels(backButtonRowHeight);
04646                 rowDef.Height(length);
04647             }
04648         }
04649     }
04650
04651     if (m_topNavGrid)
04652     {
04653         winrt::VisualStateManager::GoToState(*this, shouldShowBackButton ? L"BackButtonVisible" : L"BackButtonCollapsed", false /*useTransitions*/);
04654     }
04655     UpdateTitleBarPadding();
04656 }
04657
04658 void NavigationView::UpdatePaneTitleMargins()
04659 {
04660     if (!m_topNavGrid)
04661     {
04662         if (auto paneTitleFrameworkElement = m_paneTitleFrameworkElement.get())
04663         {
04664             double width = GetPaneToggleButtonWidth();
04665
04666             if (ShouldShowBackButton() && IsOverlay())
04667             {
04668                 width += c_backButtonWidth;
04669             }
04670
04671             paneTitleFrameworkElement.Margin({ width, 0, 0, 0 }); // see "Hamburger title" on uni
04672         }
04673     }
04674 }
04675
04676 void NavigationView::UpdateSelectionForMenuItems()
04677 {
04678     // Allow customer to set selection by NavigationViewItem.IsSelected.
04679     // If there are more than two items are set IsSelected=true, the first one is actually selected.
04680     // If SelectedItem is set, IsSelected is ignored.
04681     //         <NavigationView.MenuItems>
04682     //              <NavigationViewItem Content = "Collection" IsSelected = "True" / >
04683     //         </NavigationView.MenuItems>
04684     if (!SelectedItem())
04685     {
04686         bool foundFirstSelected = false;
04687
04688         // firstly check Menu items
04689         if (auto menuItems = MenuItems().try_as<winrt::IVector<winrt::IInspectable>>())
04690         {
04691             foundFirstSelected = UpdateSelectedItemFromMenuItems(menuItems);
04692         }
04693
04694         // then do same for footer items and tell wenever selected item alreadyfound in MenuItems
04695         if (auto footerItems = FooterMenuItems().try_as<winrt::IVector<winrt::IInspectable>>())
04696         {
04697             UpdateSelectedItemFromMenuItems(footerItems, foundFirstSelected);
04698         }
04699     }
04700 }
04701
04702 bool NavigationView::UpdateSelectedItemFromMenuItems(const winrt::impl::com_ref<winrt::IVector<winrt::IInspectable>>& menuItems, bool foundFirstSelected)
04703 {
04704     for (int i = 0; i < static_cast<int>(menuItems.Size()); i++)
04705     {
04706         if (auto item = menuItems.GetAt(i).try_as<winrt::NavigationViewItem>())
04707         {
04708             if (item.IsSelected())
04709             {
04710                 if (!foundFirstSelected)
04711                 {
04712                     auto scopeGuard = gsl::finally([this]()
04713                         {
04714                             m_shouldIgnoreNextSelectionChange = false;
04715                         });
04716                     m_shouldIgnoreNextSelectionChange = true;
04717                     SelectedItem(item);
04718                     foundFirstSelected = true;
04719                 }
04720                 else
04721                 {
04722                     item.IsSelected(false);
04723                 }
04724             }
04725         }
04726     }
04727     return foundFirstSelected;
04728 }
04729
04730 void NavigationView::OnTitleBarMetricsChanged(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/)
04731 {
04732     UpdateTitleBarPadding();
04733 }
04734
04735 void NavigationView::OnTitleBarIsVisibleChanged(const winrt::CoreApplicationViewTitleBar& /*sender*/, const winrt::IInspectable& /*args*/)
04736 {
04737     UpdateTitleBarPadding();
04738 }
04739
04740 void NavigationView::ClosePaneIfNeccessaryAfterItemIsClicked(const winrt::NavigationViewItem& selectedContainer)
04741 {
04742     if (IsPaneOpen() && DisplayMode() != winrt::NavigationViewDisplayMode::Expanded && !DoesNavigationViewItemHaveChildren(selectedContainer) && !m_shouldIgnoreNextSelectionChange)
04743     {
04744         ClosePane();
04745     }
04746 }
04747
04748 bool NavigationView::NeedTopPaddingForRS5OrHigher(winrt::CoreApplicationViewTitleBar const& coreTitleBar)
04749 {
04750     // Starting on RS5, we will be using the following IsVisible API together with ExtendViewIntoTitleBar
04751     // to decide whether to try to add top padding or not.
04752     // We don't add padding when in fullscreen or tablet mode.
04753     return coreTitleBar.IsVisible() && coreTitleBar.ExtendViewIntoTitleBar()
04754         && !IsFullScreenOrTabletMode();
04755 }
04756
04757 void NavigationView::UpdateTitleBarPadding()
04758 {
04759     if (!m_appliedTemplate)
04760     {
04761         return;
04762     }
04763
04764     double topPadding = 0;
04765
04766     if (auto coreTitleBar = m_coreTitleBar.get()) // null in win32
04767     {
04768         bool needsTopPadding = false;
04769
04770         // Do not set a top padding when the IsTitleBarAutoPaddingEnabled property is set to False.
04771         if (IsTitleBarAutoPaddingEnabled())
04772         {
04773             if (!m_backButton)
04774             {
04775                 needsTopPadding = true;
04776             }
04777             else if (!m_topNavGrid)
04778             {
04779                 // For RS4 apps maintain the behavior that we shipped for RS4.
04780                 // We keep this behavior for app compact purposes.
04781                 needsTopPadding = !coreTitleBar.ExtendViewIntoTitleBar();
04782             }
04783             else
04784             {
04785                 needsTopPadding = NeedTopPaddingForRS5OrHigher(coreTitleBar);
04786             }
04787         }
04788
04789         if (needsTopPadding)
04790         {
04791             // Only add extra padding if the NavView is the "root" of the app,
04792             // but not if the app is expanding into the titlebar
04793             winrt::UIElement root = XamlRoot().Content();
04794             winrt::GeneralTransform gt = TransformToVisual(root);
04795             winrt::Point pos = gt.TransformPoint(winrt::Point());
04796
04797             if (pos.Y == 0.0f)
04798             {
04799                 topPadding = coreTitleBar.Height();
04800             }
04801         }
04802     }
04803
04804     if (!m_topNavGrid)
04805     {
04806         if (auto fe = m_togglePaneTopPadding.get())
04807         {
04808             fe.Height(topPadding);
04809         }
04810
04811         if (auto fe = m_contentPaneTopPadding.get())
04812         {
04813             fe.Height(topPadding);
04814         }
04815     }
04816
04817     const auto paneTitleHolderFrameworkElement = m_paneTitleHolderFrameworkElement.get();
04818     const auto paneToggleButton = m_paneToggleButton.get();
04819
04820     const bool setPaneTitleHolderFrameworkElementMargin = paneTitleHolderFrameworkElement && paneTitleHolderFrameworkElement.Visibility() == winrt::Visibility::Visible;
04821     const bool setPaneToggleButtonMargin = !setPaneTitleHolderFrameworkElementMargin && paneToggleButton && paneToggleButton.Visibility() == winrt::Visibility::Visible;
04822
04823     if (setPaneTitleHolderFrameworkElementMargin || setPaneToggleButtonMargin)
04824     {
04825         auto thickness = winrt::ThicknessHelper::FromLengths(0, 0, 0, 0);
04826
04827         if (ShouldShowBackButton())
04828         {
04829             if (IsOverlay())
04830             {
04831                 thickness = winrt::ThicknessHelper::FromLengths(c_backButtonWidth, 0, 0, 0);
04832             }
04833             else
04834             {
04835                 thickness = winrt::ThicknessHelper::FromLengths(0, c_backButtonHeight, 0, 0);
04836             }
04837         }
04838         else if (ShouldShowCloseButton() && IsOverlay())
04839         {
04840             thickness = winrt::ThicknessHelper::FromLengths(c_backButtonWidth, 0, 0, 0);
04841         }
04842
04843         if (setPaneTitleHolderFrameworkElementMargin)
04844         {
04845             // The PaneHeader is hosted by PaneTitlePresenter and PaneTitleHolder.
04846             paneTitleHolderFrameworkElement.Margin(thickness);
04847         }
04848         else
04849         {
04850             // The PaneHeader is hosted by PaneToggleButton
04851             paneToggleButton.Margin(thickness);
04852         }
04853     }
04854
04855     if (auto templateSettings = TemplateSettings())
04856     {
04857         // 0.0 and 0.00000000 is not the same in double world. try to reduce the number of TopPadding update event. epsilon is 0.1 here.
04858         if (fabs(templateSettings.TopPadding() - topPadding) > 0.1)
04859         {
04860             GetTemplateSettings()->TopPadding(topPadding);
04861         }
04862     }
04863 }
04864
04865 void NavigationView::OnAutoSuggestBoxQuerySubmitted(const winrt::AutoSuggestBox& sender, const winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs& args)
04866 {
04867     // When in compact or minimal, we want to close pane when an item gets chosen.
04868     if (DisplayMode() != winrt::NavigationViewDisplayMode::Expanded && args.ChosenSuggestion() != nullptr)
04869     {
04870         ClosePane();
04871     }
04872 }
04873
04874 void NavigationView::RaiseDisplayModeChanged(const winrt::NavigationViewDisplayMode& displayMode)
04875 {
04876     SetValue(s_DisplayModeProperty, box_value(displayMode));
04877     auto eventArgs = winrt::make_self<NavigationViewDisplayModeChangedEventArgs>();
04878     eventArgs->DisplayMode(displayMode);
04879     m_displayModeChangedEventSource(*this, *eventArgs);
04880 }
04881
04882 // This method attaches the series of animations which are fired off dependent upon the amount
04883 // of space give and the length of the strings involved. It occurs upon re-rendering.
04884 void NavigationView::CreateAndAttachHeaderAnimation(const winrt::Visual& visual)
04885 {
04886     auto compositor = visual.Compositor();
04887     auto cubicFunction = compositor.CreateCubicBezierEasingFunction({ 0.0f, 0.35f }, { 0.15f, 1.0f });
04888     auto moveAnimation = compositor.CreateVector3KeyFrameAnimation();
04889     moveAnimation.Target(L"Offset");
04890     moveAnimation.InsertExpressionKeyFrame(1.0f, L"this.FinalValue", cubicFunction);
04891     moveAnimation.Duration(200ms);
04892
04893     auto collection = compositor.CreateImplicitAnimationCollection();
04894     collection.Insert(L"Offset", moveAnimation);
04895     visual.ImplicitAnimations(collection);
04896 }
04897
04898 bool NavigationView::IsFullScreenOrTabletMode()
04899 {
04900     // ApplicationView::GetForCurrentView() is an expensive call - make sure to cache the ApplicationView
04901     if (!m_applicationView)
04902     {
04903         if (winrt::CoreWindow::GetForCurrentThread())
04904         {
04905             try
04906             {
04907                 m_applicationView = winrt::ViewManagement::ApplicationView::GetForCurrentView();
04908             }
04909             catch (winrt::hresult_error)
04910             {
04911                 // Calling GetForCurrentView on threads without a CoreWindow throws an error.
04912             }
04913         }
04914     }
04915
04916     // UIViewSettings::GetForCurrentView() is an expensive call - make sure to cache the UIViewSettings
04917     if (!m_uiViewSettings)
04918     {
04919         m_uiViewSettings = winrt::ViewManagement::UIViewSettings::GetForCurrentView();
04920     }
04921
04922     bool isFullScreenMode = m_applicationView.IsFullScreenMode();
04923     bool isTabletMode = m_uiViewSettings.UserInteractionMode() == winrt::ViewManagement::UserInteractionMode::Touch;
04924
04925     return isFullScreenMode || isTabletMode;
04926 }
04927
04928 void NavigationView::SetDropShadow()
04929 {
04930     const auto displayMode = DisplayMode();
04931
04932     if (displayMode == winrt::NavigationViewDisplayMode::Compact || displayMode == winrt::NavigationViewDisplayMode::Minimal)
04933     {
04934         if (const auto shadowCaster = m_shadowCaster.get())
04935         {
04936             shadowCaster.Shadow(winrt::ThemeShadow{});
04937
04938             const auto translation = shadowCaster.Translation();
04939             const double shadowDepth = unbox_value<double>(SharedHelpers::FindInApplicationResources(c_paneOverlayShadowDepthName, box_value(c_paneOverlayShadowDepth)));
04940
04941             shadowCaster.Translation({ translation.x, translation.y, static_cast<float>(shadowDepth) });
04942         }
04943     }
04944 }
04945
04946 void NavigationView::UnsetDropShadow()
04947 {
04948     const auto shadowCaster = m_shadowCaster.get();
04949
04950     if (const auto shadowCasterEaseOutStoryboard = m_shadowCasterEaseOutStoryboard.get())
04951     {
04952         shadowCasterEaseOutStoryboard.Begin();
04953
04954         m_shadowCasterEaseOutStoryboardRevoker =
04955             shadowCasterEaseOutStoryboard.Completed(winrt::auto_revoke,
04956                 {
04957                     [this, shadowCaster](auto const&, auto const&) { ShadowCasterEaseOutStoryboard_Completed(shadowCaster); }
04958                 });
04959     }
04960 }
04961
04962 void NavigationView::ShadowCasterEaseOutStoryboard_Completed(const winrt::Grid& shadowCaster)
04963 {
04964     if (shadowCaster.Shadow())
04965     {
04966         shadowCaster.Shadow(nullptr);
04967     }
04968 }
04969
04970 void NavigationView::UpdatePaneOverlayGroup()
04971 {
04972     if (const auto splitView = m_rootSplitView.get())
04973     {
04974         if (IsPaneOpen() && (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay))
04975         {
04976             winrt::VisualStateManager::GoToState(*this, L"PaneOverlaying", true /*useTransitions*/);
04977         }
04978         else
04979         {
04980             winrt::VisualStateManager::GoToState(*this, L"PaneNotOverlaying", true /*useTransitions*/);
04981         }
04982     }
04983 }
04984
04985 template<typename T> T NavigationView::GetContainerForData(const winrt::IInspectable& data)
04986 {
04987     if (!data)
04988     {
04989         return nullptr;
04990     }
04991
04992     if (auto nvi = data.try_as<T>())
04993     {
04994         return nvi;
04995     }
04996
04997     // First conduct a basic top level search in main menu, which should succeed for a lot of scenarios.
04998     const auto mainRepeater = IsTopNavigationView() ? m_topNavRepeater.get() : m_leftNavRepeater.get();
04999     auto itemIndex = GetIndexFromItem(mainRepeater, data);
05000     if (itemIndex >= 0)
05001     {
05002         if (auto container = mainRepeater.TryGetElement(itemIndex))
05003         {
05004             return container.try_as<T>();
05005         }
05006     }
05007
05008     // then look in footer menu
05009     const auto footerRepeater = IsTopNavigationView() ? m_topNavFooterMenuRepeater.get() : m_leftNavFooterMenuRepeater.get();
05010     itemIndex = GetIndexFromItem(footerRepeater, data);
05011     if (itemIndex >= 0)
05012     {
05013         if (auto container = footerRepeater.TryGetElement(itemIndex))
05014         {
05015             return container.try_as<T>();
05016         }
05017     }
05018
05019     // If unsuccessful, unfortunately we are going to have to search through the whole tree
05020     // TODO: Either fix or remove implementation for TopNav.
05021     // It may not be required due to top nav rarely having realized children in its default state.
05022     if (auto const container = SearchEntireTreeForContainer(mainRepeater, data))
05023     {
05024         return container.try_as<T>();
05025     }
05026
05027     if (auto const container = SearchEntireTreeForContainer(footerRepeater, data))
05028     {
05029         return container.try_as<T>();
05030     }
05031
05032     return nullptr;
05033 }
05034
05035 winrt::UIElement NavigationView::SearchEntireTreeForContainer(const winrt::ItemsRepeater& rootRepeater, const winrt::IInspectable& data)
05036 {
05037     // TODO: Temporary inefficient solution that results in unnecessary time complexity, fix.
05038     const auto index = GetIndexFromItem(rootRepeater, data);
05039     if (index != -1)
05040     {
05041         return rootRepeater.TryGetElement(index);
05042     }
05043
05044     for (int i = 0; i < GetContainerCountInRepeater(rootRepeater); i++)
05045     {
05046         if (auto const container = rootRepeater.TryGetElement(i))
05047         {
05048             if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
05049             {
05050                 if (auto const nviRepeater = winrt::get_self<NavigationViewItem>(nvi)->GetRepeater())
05051                 {
05052                     if (auto const foundElement = SearchEntireTreeForContainer(nviRepeater, data))
05053                     {
05054                         return foundElement;
05055                     }
05056                 }
05057             }
05058         }
05059     }
05060     return nullptr;
05061 }
05062
05063 winrt::IndexPath NavigationView::SearchEntireTreeForIndexPath(const winrt::ItemsRepeater& rootRepeater, const winrt::IInspectable& data, bool isFooterRepeater)
05064 {
05065     for (int i = 0; i < GetContainerCountInRepeater(rootRepeater); i++)
05066     {
05067         if (auto const container = rootRepeater.TryGetElement(i))
05068         {
05069             if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
05070             {
05071                 auto const ip = winrt::make<IndexPath>(std::vector<int>({ isFooterRepeater ? c_footerMenuBlockIndex : c_mainMenuBlockIndex, i }));
05072                 if (auto const indexPath = SearchEntireTreeForIndexPath(nvi, data, ip))
05073                 {
05074                     return indexPath;
05075                 }
05076             }
05077         }
05078     }
05079     return nullptr;
05080 }
05081
05082 // There are two possibilities here if the passed in item has children. Either the children of the passed in container have already been realized,
05083 // in which case we simply just iterate through the children containers, or they have not been realized yet and we have to iterate through the data
05084 // and manually realize each item.
05085 winrt::IndexPath NavigationView::SearchEntireTreeForIndexPath(const winrt::NavigationViewItem& parentContainer, const winrt::IInspectable& data, const winrt::IndexPath& ip)
05086 {
05087     bool areChildrenRealized = false;
05088     if (auto const childrenRepeater = winrt::get_self<NavigationViewItem>(parentContainer)->GetRepeater())
05089     {
05090         if (DoesRepeaterHaveRealizedContainers(childrenRepeater))
05091         {
05092             areChildrenRealized = true;
05093             for (int i = 0; i < GetContainerCountInRepeater(childrenRepeater); i++)
05094             {
05095                 if (auto const container = childrenRepeater.TryGetElement(i))
05096                 {
05097                     if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
05098                     {
05099                         auto const newIndexPath = winrt::get_self<IndexPath>(ip)->CloneWithChildIndex(i);
05100                         if (nvi.Content() == data)
05101                         {
05102                             return newIndexPath;
05103                         }
05104                         else
05105                         {
05106                             if (auto const foundIndexPath = SearchEntireTreeForIndexPath(nvi, data, newIndexPath))
05107                             {
05108                                 return foundIndexPath;
05109                             }
05110                         }
05111                     }
05112                 }
05113                 else
05114                 {
05115                     // We found an unrealized child, so we'll want to manually realize and search if we don't find the item.
05116                     areChildrenRealized = false;
05117                 }
05118             }
05119         }
05120     }
05121
05122     //If children are not realized, manually realize and search.
05123     if (!areChildrenRealized)
05124     {
05125         if (auto const childrenData = GetChildren(parentContainer))
05126         {
05127             // Get children data in an enumarable form
05128             auto newDataSource = childrenData.try_as<winrt::ItemsSourceView>();
05129             if (childrenData && !newDataSource)
05130             {
05131                 newDataSource = winrt::ItemsSourceView(childrenData);
05132             }
05133
05134             for (int i = 0; i < newDataSource.Count(); i++)
05135             {
05136                 auto const newIndexPath = winrt::get_self<IndexPath>(ip)->CloneWithChildIndex(i);
05137                 auto const childData = newDataSource.GetAt(i);
05138                 if (childData == data)
05139                 {
05140                     return newIndexPath;
05141                 }
05142                 else
05143                 {
05144                     // Resolve databinding for item and search through that item's children
05145                     if (auto const nvib = ResolveContainerForItem(childData))
05146                     {
05147                         if (auto const nvi = nvib.try_as<winrt::NavigationViewItem>())
05148                         {
05149                             // Process x:bind
05150                             if (auto extension = CachedVisualTreeHelpers::GetDataTemplateComponent(nvi))
05151                             {
05152                                 // Clear out old data.
05153                                 extension.Recycle();
05154                                 int nextPhase = VirtualizationInfo::PhaseReachedEnd;
05155                                 // Run Phase 0
05156                                 extension.ProcessBindings(childData, i, 0 /* currentPhase */, nextPhase);
05157
05158                                 // TODO: If nextPhase is not -1, ProcessBinding for all the phases
05159                             }
05160
05161                             if (auto const foundIndexPath = SearchEntireTreeForIndexPath(nvi, data, newIndexPath))
05162                             {
05163                                 return foundIndexPath;
05164                             }
05165
05166                             //TODO: Recycle container!
05167                         }
05168                     }
05169                 }
05170             }
05171         }
05172     }
05173
05174     return nullptr;
05175 }
05176
05177 winrt::NavigationViewItemBase NavigationView::ResolveContainerForItem(const winrt::IInspectable& item)
05178 {
05179     auto const args = winrt::ElementFactoryGetArgs();
05180     args.Data(item);
05181
05182     if (auto container = m_navigationViewItemsFactory.get()->GetElement(args))
05183     {
05184         if (auto nvib = container.try_as<winrt::NavigationViewItemBase>())
05185         {
05186             return nvib;
05187         }
05188     }
05189     return nullptr;
05190 }
05191
05192 void NavigationView::RecycleContainer(const winrt::UIElement& container)
05193 {
05194     auto const args = winrt::ElementFactoryRecycleArgs();
05195     args.Element(container);
05196     m_navigationViewItemsFactory.get()->RecycleElement(args);
05197 }
05198
05199 int NavigationView::GetContainerCountInRepeater(const winrt::ItemsRepeater& ir)
05200 {
05201     if (ir)
05202     {
05203         if (auto const repeaterItemSourceView = ir.ItemsSourceView())
05204         {
05205             return repeaterItemSourceView.Count();
05206         }
05207     }
05208     return -1;
05209 }
05210
05211 bool NavigationView::DoesRepeaterHaveRealizedContainers(const winrt::ItemsRepeater& ir)
05212 {
05213     if (ir)
05214     {
05215         if (ir.TryGetElement(0))
05216         {
05217             return true;
05218         }
05219     }
05220     return false;
05221 }
05222
05223 int NavigationView::GetIndexFromItem(const winrt::ItemsRepeater& ir, const winrt::IInspectable& data)
05224 {
05225     if (ir)
05226     {
05227         if (auto itemsSourceView = ir.ItemsSourceView())
05228         {
05229             return itemsSourceView.IndexOf(data);
05230         }
05231     }
05232     return -1;
05233 }
05234
05235 winrt::IInspectable NavigationView::GetItemFromIndex(const winrt::ItemsRepeater& ir, int index)
05236 {
05237     if (ir)
05238     {
05239         if (auto itemsSourceView = ir.ItemsSourceView())
05240         {
05241             return itemsSourceView.GetAt(index);
05242         }
05243     }
05244     return nullptr;
05245 }
05246
05247 winrt::IndexPath NavigationView::GetIndexPathOfItem(const winrt::IInspectable& data)
05248 {
05249     if (auto const nvib = data.try_as<winrt::NavigationViewItemBase>())
05250     {
05251         return GetIndexPathForContainer(nvib);
05252     }
05253
05254     // In the databinding scenario, we need to conduct a search where we go through every item,
05255     // realizing it if necessary.
05256     if (IsTopNavigationView())
05257     {
05258         // First search through primary list
05259         if (auto const ip = SearchEntireTreeForIndexPath(m_topNavRepeater.get(), data, false /*isFooterRepeater*/))
05260         {
05261             return ip;
05262         }
05263
05264         // If item was not located in primary list, search through overflow
05265         if (auto const ip = SearchEntireTreeForIndexPath(m_topNavRepeaterOverflowView.get(), data, false /*isFooterRepeater*/))
05266         {
05267             return ip;
05268         }
05269
05270         // If item was not located in primary list and overflow, search through footer
05271         if (auto const ip = SearchEntireTreeForIndexPath(m_topNavFooterMenuRepeater.get(), data, true /*isFooterRepeater*/))
05272         {
05273             return ip;
05274         }
05275     }
05276     else
05277     {
05278         if (auto const ip = SearchEntireTreeForIndexPath(m_leftNavRepeater.get(), data, false /*isFooterRepeater*/))
05279         {
05280             return ip;
05281         }
05282
05283         // If item was not located in primary list, search through footer
05284         if (auto const ip = SearchEntireTreeForIndexPath(m_leftNavFooterMenuRepeater.get(), data, true /*isFooterRepeater*/))
05285         {
05286             return ip;
05287         }
05288     }
05289
05290     return winrt::make<IndexPath>(std::vector<int>(0));
05291 }
05292
05293 winrt::UIElement NavigationView::GetContainerForIndex(int index, bool inFooter)
05294 {
05295     if (IsTopNavigationView())
05296     {
05297         // Get the repeater that is presenting the first item
05298         auto ir = inFooter ? m_topNavFooterMenuRepeater.get()
05299             : (m_topDataProvider.IsItemInPrimaryList(index) ? m_topNavRepeater.get() : m_topNavRepeaterOverflowView.get());
05300
05301             // Get the index of the item in the repeater
05302             const auto irIndex = inFooter ? index : m_topDataProvider.ConvertOriginalIndexToIndex(index);
05303
05304         // Get the container of the first item
05305         if (auto const container = ir.TryGetElement(irIndex))
05306         {
05307             return container;
05308         }
05309     }
05310     else
05311     {
05312         if (auto container = inFooter ? m_leftNavFooterMenuRepeater.get().TryGetElement(index)
05313             : m_leftNavRepeater.get().TryGetElement(index))
05314         {
05315             return container.try_as<winrt::NavigationViewItemBase>();
05316         }
05317     }
05318     return nullptr;
05319 }
05320
05321 winrt::NavigationViewItemBase NavigationView::GetContainerForIndexPath(const winrt::IndexPath& ip, bool lastVisible, bool forceRealize)
05322 {
05323     if (ip && ip.GetSize() > 0)
05324     {
05325         if (auto const container = GetContainerForIndex(ip.GetAt(1), ip.GetAt(0) == c_footerMenuBlockIndex /*inFooter*/))
05326         {
05327             if (lastVisible)
05328             {
05329                 if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
05330                 {
05331                     if (!nvi.IsExpanded())
05332                     {
05333                         return nvi;
05334                     }
05335                 }
05336             }
05337
05338             // TODO: Fix below for top flyout scenario once the flyout is introduced in the XAML.
05339             // We want to be able to retrieve containers for items that are in the flyout.
05340             // This will return nullptr if requesting children containers of
05341             // items in the primary list, or unrealized items in the overflow popup.
05342             // However this should not happen.
05343             return GetContainerForIndexPath(container, ip, lastVisible, forceRealize);
05344         }
05345     }
05346     return nullptr;
05347 }
05348
05349
05350 winrt::NavigationViewItemBase NavigationView::GetContainerForIndexPath(const winrt::UIElement& firstContainer, const winrt::IndexPath& ip, bool lastVisible, bool forceRealize)
05351 {
05352     auto container = firstContainer;
05353     if (ip.GetSize() > 2)
05354     {
05355         for (int i = 2; i < ip.GetSize(); i++)
05356         {
05357             bool succeededGettingNextContainer = false;
05358             if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
05359             {
05360                 if (lastVisible && nvi.IsExpanded() == false)
05361                 {
05362                     return nvi;
05363                 }
05364
05365                 if (auto const nviRepeater = winrt::get_self<NavigationViewItem>(nvi)->GetRepeater())
05366                 {
05367                     auto const index = ip.GetAt(i);
05368                     if (auto const nextContainer = forceRealize ? nviRepeater.GetOrCreateElement(index) : nviRepeater.TryGetElement(index))
05369                     {
05370                         container = nextContainer;
05371                         succeededGettingNextContainer = true;
05372                     }
05373                 }
05374             }
05375             // If any of the above checks failed, it means something went wrong and we have an index for a non-existent repeater.
05376             if (!succeededGettingNextContainer)
05377             {
05378                 return nullptr;
05379             }
05380         }
05381     }
05382     return container.try_as<winrt::NavigationViewItemBase>();
05383 }
05384
05385 bool NavigationView::IsContainerTheSelectedItemInTheSelectionModel(const winrt::NavigationViewItemBase& nvib)
05386 {
05387     if (auto selectedItem = m_selectionModel.SelectedItem())
05388     {
05389         auto selectedItemContainer = selectedItem.try_as<winrt::NavigationViewItemBase>();
05390         if (!selectedItemContainer)
05391         {
05392             selectedItemContainer = GetContainerForIndexPath(m_selectionModel.SelectedIndex());
05393         }
05394
05395         return selectedItemContainer == nvib;
05396     }
05397     return false;
05398 }
05399
05400 winrt::ItemsRepeater NavigationView::LeftNavRepeater()
05401 {
05402     return m_leftNavRepeater.get();
05403 }
05404
05405 winrt::NavigationViewItem NavigationView::GetSelectedContainer()
05406 {
05407     if (auto selectedItem = SelectedItem())
05408     {
05409         if (auto selectedItemContainer = selectedItem.try_as<winrt::NavigationViewItem>())
05410         {
05411             return selectedItemContainer;
05412         }
05413         else
05414         {
05415             return NavigationViewItemOrSettingsContentFromData(selectedItem);
05416         }
05417     }
05418     return nullptr;
05419 }
05420
05421 void NavigationView::Expand(const winrt::NavigationViewItem& item)
05422 {
05423     ChangeIsExpandedNavigationViewItem(item, true /*isExpanded*/);
05424 }
05425
05426 void NavigationView::Collapse(const winrt::NavigationViewItem& item)
05427 {
05428     ChangeIsExpandedNavigationViewItem(item, false /*isExpanded*/);
05429 }
05430
05431 bool NavigationView::DoesNavigationViewItemHaveChildren(const winrt::NavigationViewItem& nvi)
05432 {
05433     if (nvi.MenuItemsSource()) {
05434         if (const auto sourceView = winrt::make<InspectingDataSource>(nvi.MenuItemsSource()))
05435         {
05436             return sourceView.Count() > 0;
05437         }
05438     }
05439     return nvi.MenuItems().Size() > 0 || nvi.HasUnrealizedChildren();
05440 }
05441
05442 void NavigationView::ToggleIsExpandedNavigationViewItem(const winrt::NavigationViewItem& nvi)
05443 {
05444     ChangeIsExpandedNavigationViewItem(nvi, !nvi.IsExpanded());
05445 }
05446
05447 void NavigationView::ChangeIsExpandedNavigationViewItem(const winrt::NavigationViewItem& nvi, bool isExpanded)
05448 {
05449     if (DoesNavigationViewItemHaveChildren(nvi))
05450     {
05451         nvi.IsExpanded(isExpanded);
05452     }
05453 }
05454
05455 winrt::NavigationViewItem NavigationView::FindLowestLevelContainerToDisplaySelectionIndicator()
05456 {
05457     auto indexIntoIndex = 1;
05458     auto const selectedIndex = m_selectionModel.SelectedIndex();
05459     if (selectedIndex && selectedIndex.GetSize() > 1)
05460     {
05461         if (auto container = GetContainerForIndex(selectedIndex.GetAt(indexIntoIndex), selectedIndex.GetAt(0) == c_footerMenuBlockIndex /* inFooter */))
05462         {
05463             if (auto nvi = container.try_as<winrt::NavigationViewItem>())
05464             {
05465                 auto nviImpl = winrt::get_self<NavigationViewItem>(nvi);
05466                 auto isRepeaterVisible = nviImpl->IsRepeaterVisible();
05467                 while (nvi && isRepeaterVisible && !nvi.IsSelected() && nvi.IsChildSelected())
05468                 {
05469                     indexIntoIndex++;
05470                     isRepeaterVisible = false;
05471                     if (auto const repeater = nviImpl->GetRepeater())
05472                     {
05473                         if (auto const childContainer = repeater.TryGetElement(selectedIndex.GetAt(indexIntoIndex)))
05474                         {
05475                             nvi = childContainer.try_as<winrt::NavigationViewItem>();
05476                             nviImpl = winrt::get_self<NavigationViewItem>(nvi);
05477                             isRepeaterVisible = nviImpl->IsRepeaterVisible();
05478                         }
05479                     }
05480                 }
05481                 return nvi;
05482             }
05483         }
05484     }
05485     return nullptr;
05486 }
05487
05488 void NavigationView::ShowHideChildrenItemsRepeater(const winrt::NavigationViewItem& nvi)
05489 {
05490     auto nviImpl = winrt::get_self<NavigationViewItem>(nvi);
05491
05492     nviImpl->ShowHideChildren();
05493
05494     if (nviImpl->ShouldRepeaterShowInFlyout())
05495     {
05496         nvi.IsExpanded() ? m_lastItemExpandedIntoFlyout.set(nvi) : m_lastItemExpandedIntoFlyout.set(nullptr);
05497     }
05498
05499     // If SelectedItem is being hidden/shown, animate SelectionIndicator
05500     if (!nvi.IsSelected() && nvi.IsChildSelected())
05501     {
05502         if (!nviImpl->IsRepeaterVisible() && nvi.IsChildSelected())
05503         {
05504             AnimateSelectionChanged(nvi);
05505         }
05506         else
05507         {
05508             AnimateSelectionChanged(FindLowestLevelContainerToDisplaySelectionIndicator());
05509         }
05510     }
05511
05512     nviImpl->RotateExpandCollapseChevron(nvi.IsExpanded());
05513 }
05514
05515 winrt::IInspectable NavigationView::GetChildren(const winrt::NavigationViewItem& nvi)
05516 {
05517     if (nvi.MenuItems().Size() > 0)
05518     {
05519         return nvi.MenuItems();
05520     }
05521     return nvi.MenuItemsSource();
05522 }
05523
05524 winrt::ItemsRepeater NavigationView::GetChildRepeaterForIndexPath(const winrt::IndexPath& ip)
05525 {
05526     if (auto const container = GetContainerForIndexPath(ip).try_as<winrt::NavigationViewItem>())
05527     {
05528         return winrt::get_self<NavigationViewItem>(container)->GetRepeater();
05529     }
05530     return nullptr;
05531 }
05532
05533
05534 winrt::IInspectable NavigationView::GetChildrenForItemInIndexPath(const winrt::IndexPath& ip, bool forceRealize)
05535 {
05536     if (ip && ip.GetSize() > 1)
05537     {
05538         if (auto const container = GetContainerForIndex(ip.GetAt(1), ip.GetAt(0) == c_footerMenuBlockIndex /*inFooter*/))
05539         {
05540             return GetChildrenForItemInIndexPath(container, ip, forceRealize);
05541         }
05542     }
05543     return nullptr;
05544 }
05545
05546 winrt::IInspectable NavigationView::GetChildrenForItemInIndexPath(const winrt::UIElement& firstContainer, const winrt::IndexPath& ip, bool forceRealize)
05547 {
05548     auto container = firstContainer;
05549     bool shouldRecycleContainer = false;
05550     if (ip.GetSize() > 2)
05551     {
05552         for (int i = 2; i < ip.GetSize(); i++)
05553         {
05554             bool succeededGettingNextContainer = false;
05555             if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
05556             {
05557                 auto const nextContainerIndex = ip.GetAt(i);
05558                 auto const nviRepeater = winrt::get_self<NavigationViewItem>(nvi)->GetRepeater();
05559                 if (nviRepeater && DoesRepeaterHaveRealizedContainers(nviRepeater))
05560                 {
05561                     if (auto const nextContainer = nviRepeater.TryGetElement(nextContainerIndex))
05562                     {
05563                         container = nextContainer;
05564                         succeededGettingNextContainer = true;
05565                     }
05566                 }
05567                 else if (forceRealize)
05568                 {
05569                     if (auto const childrenData = GetChildren(nvi))
05570                     {
05571                         if (shouldRecycleContainer)
05572                         {
05573                             RecycleContainer(nvi);
05574                             shouldRecycleContainer = false;
05575                         }
05576
05577                         // Get children data in an enumarable form
05578                         auto newDataSource = childrenData.try_as<winrt::ItemsSourceView>();
05579                         if (childrenData && !newDataSource)
05580                         {
05581                             newDataSource = winrt::ItemsSourceView(childrenData);
05582                         }
05583
05584                         if (auto const data = newDataSource.GetAt(nextContainerIndex))
05585                         {
05586                             // Resolve databinding for item and search through that item's children
05587                             if (auto const nvib = ResolveContainerForItem(data))
05588                             {
05589                                 if (auto const nextContainer = nvib.try_as<winrt::NavigationViewItem>())
05590                                 {
05591                                     // Process x:bind
05592                                     if (auto extension = CachedVisualTreeHelpers::GetDataTemplateComponent(nextContainer))
05593                                     {
05594                                         // Clear out old data.
05595                                         extension.Recycle();
05596                                         int nextPhase = VirtualizationInfo::PhaseReachedEnd;
05597                                         // Run Phase 0
05598                                         extension.ProcessBindings(data, nextContainerIndex, 0 /* currentPhase */, nextPhase);
05599
05600                                         // TODO: If nextPhase is not -1, ProcessBinding for all the phases
05601                                     }
05602
05603                                     container = nextContainer;
05604                                     shouldRecycleContainer = true;
05605                                     succeededGettingNextContainer = true;
05606                                 }
05607                             }
05608                         }
05609                     }
05610                 }
05611
05612             }
05613             // If any of the above checks failed, it means something went wrong and we have an index for a non-existent repeater.
05614             if (!succeededGettingNextContainer)
05615             {
05616                 return nullptr;
05617             }
05618         }
05619     }
05620
05621     if (auto const nvi = container.try_as<winrt::NavigationViewItem>())
05622     {
05623         auto const children = GetChildren(nvi);
05624         if (shouldRecycleContainer)
05625         {
05626             RecycleContainer(nvi);
05627         }
05628         return children;
05629     }
05630
05631     return nullptr;
05632 }
05633
05634 void NavigationView::RaiseExpandingEvent(const winrt::NavigationViewItemBase& container)
05635 {
05636     auto eventArgs = winrt::make_self<NavigationViewItemExpandingEventArgs>(*this);
05637     eventArgs->ExpandingItemContainer(container);
05638     m_expandingEventSource(*this, *eventArgs);
05639 }
05640
05641 void NavigationView::RaiseCollapsedEvent(const winrt::NavigationViewItemBase& container)
05642 {
05643     auto eventArgs = winrt::make_self<NavigationViewItemCollapsedEventArgs>(*this);
05644     eventArgs->CollapsedItemContainer(container);
05645     m_collapsedEventSource(*this, *eventArgs);
05646 }
05647
05648 bool NavigationView::IsTopLevelItem(const winrt::NavigationViewItemBase& nvib)
05649 {
05650     return IsRootItemsRepeater(GetParentItemsRepeaterForContainer(nvib));
05651 }
05652
05653 bool NavigationView::IsVisible(const winrt::DependencyObject& obj)
05654 {
05655     // We'll go up the visual tree until we find this NavigationView.
05656     // If everything up the tree was visible, then this object was visible.
05657     winrt::DependencyObject current = obj;
05658     winrt::NavigationView navView = *this;
05659
05660     while (current && current != navView)
05661     {
05662         if (auto currentAsUIE = current.try_as<winrt::UIElement>())
05663         {
05664             if (currentAsUIE.Visibility() != winrt::Visibility::Visible)
05665             {
05666                 return false;
05667             }
05668         }
05669
05670         current = winrt::VisualTreeHelper::GetParent(current);
05671     }
05672
05673     // If we found this NavigationView, then this is both in the visual tree and visible.
05674     // Otherwise, it's not in the visual tree, and thus is not visible.
05675     return current == navView;
05676 }
05677
05678 void NavigationView::OnSelectedItemLayoutUpdated(const winrt::IInspectable& sender, const winrt::IInspectable&)
05679 {
05680     if (m_isSelectionChangedPending)
05681     {
05682         m_isSelectionChangedPending = false;
05683
05684         auto item = m_pendingSelectionChangedItem;
05685         auto direction = m_pendingSelectionChangedDirection;
05686
05687         m_pendingSelectionChangedItem = nullptr;
05688         m_pendingSelectionChangedDirection = NavigationRecommendedTransitionDirection::Default;
05689
05690         m_selectedItemLayoutUpdatedRevoker.revoke();
05691
05692         if (auto const nvi = NavigationViewItemOrSettingsContentFromData(item))
05693         {
05694             AnimateSelectionChanged(nvi);
05695         }
05696
05697         RaiseSelectionChangedEvent(item, IsSettingsItem(item), direction);
05698     }
05699 }
Generated on Sun Dec 1 2024 20:52:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtons Member List

This is the complete list of members for RadioButtons, including all inherited members.
abi_enter() | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
AttachToLayoutChanged() | RadioButtons | [private]
CheckThread() | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
ClearProperties() | RadioButtonsProperties | [static]
ContainerFromIndex(int index) | RadioButtons |
DeleteInstanceOnUIThread(std::unique_ptr< RadioButtons > &&self) noexcept | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline, static]
DetatchFromLayoutChanged() | RadioButtons | [private]
EnsureProperties() | RadioButtonsProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
final_release(std::unique_ptr< RadioButtons > &&self) | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline, static]
GetBase() | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
GetColumns() | RadioButtons |
GetDataAtIndex(int index, bool containerIsChecked) | RadioButtons | [private]
GetFindNextElementOptions(bool useThisAsSearchRoot) | RadioButtons | [private]
GetInner() | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
GetItemsSource() | RadioButtons | [private]
GetLargerColumns() | RadioButtons |
GetLayout() | RadioButtons | [private]
GetRows() | RadioButtons |
HandleEdgeCaseFocus(bool first, const winrt::IInspectable &source) | RadioButtons | [private]
Header(winrt::IInspectable const &value) | RadioButtonsProperties |
Header() | RadioButtonsProperties |
HeaderProperty() | RadioButtonsProperties | [inline, static]
HeaderTemplate(winrt::DataTemplate const &value) | RadioButtonsProperties |
HeaderTemplate() | RadioButtonsProperties |
HeaderTemplateProperty() | RadioButtonsProperties | [inline, static]
IsOnThread() | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
Items(winrt::IVector< winrt::IInspectable > const &value) | RadioButtonsProperties |
Items() | RadioButtonsProperties |
ItemsProperty() | RadioButtonsProperties | [inline, static]
ItemsSource(winrt::IInspectable const &value) | RadioButtonsProperties |
ItemsSource() | RadioButtonsProperties |
ItemsSourceProperty() | RadioButtonsProperties | [inline, static]
ItemTemplate(winrt::IInspectable const &value) | RadioButtonsProperties |
ItemTemplate() | RadioButtonsProperties |
ItemTemplateProperty() | RadioButtonsProperties | [inline, static]
m_selectionChangedEventSource | RadioButtonsProperties |
MaxColumns(int value) | RadioButtonsProperties |
MaxColumns() | RadioButtonsProperties |
MaxColumnsProperty() | RadioButtonsProperties | [inline, static]
MoveFocus(int initialIndexIncrement) | RadioButtons | [private]
MoveFocusNext() | RadioButtons | [private]
MoveFocusPrevious() | RadioButtons | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
OnAccessKeyInvoked(const winrt::UIElement &, const winrt::AccessKeyInvokedEventArgs &args) | RadioButtons | [private]
OnApplyTemplate() | RadioButtons |
OnChildChecked(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | RadioButtons | [private]
OnChildPreviewKeyDown(const winrt::IInspectable &sender, const winrt::KeyRoutedEventArgs &args) | RadioButtons | [private]
OnChildUnchecked(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | RadioButtons | [private]
OnCreateAutomationPeer() | RadioButtons | [virtual]
OnGettingFocus(const winrt::IInspectable &, const winrt::GettingFocusEventArgs &args) | RadioButtons | [private]
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnHeaderTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnIsEnabledChanged(const winrt::IInspectable &, const winrt::DependencyPropertyChangedEventArgs &) | RadioButtons | [private]
OnItemsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnItemTemplatePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnLayoutChanged(const winrt::ColumnMajorUniformToLargestGridLayout &, const winrt::IInspectable &) | RadioButtons | [private]
OnMaxColumnsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | RadioButtons |
OnRepeaterCollectionChanged(const winrt::IInspectable &, const winrt::IInspectable &) | RadioButtons | [private]
OnRepeaterElementClearing(const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementClearingEventArgs &args) | RadioButtons | [private]
OnRepeaterElementIndexChanged(const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementIndexChangedEventArgs &args) | RadioButtons | [private]
OnRepeaterElementPrepared(const winrt::ItemsRepeater &, const winrt::ItemsRepeaterElementPreparedEventArgs &args) | RadioButtons | [private]
OnRepeaterLoaded(const winrt::IInspectable &, const winrt::RoutedEventArgs &) | RadioButtons | [private]
OnSelectedIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioButtonsProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
RadioButtons() | RadioButtons |
RadioButtonsProperties() | RadioButtonsProperties |
ReferenceTracker(Args &&...args) | ReferenceTracker< RadioButtons, winrt::implementation::RadioButtonsT > | [inline]
s_HeaderProperty | RadioButtonsProperties | [static]
s_HeaderTemplateProperty | RadioButtonsProperties | [static]
s_ItemsProperty | RadioButtonsProperties | [static]
s_ItemsSourceProperty | RadioButtonsProperties | [static]
s_ItemTemplateProperty | RadioButtonsProperties | [static]
s_MaxColumnsProperty | RadioButtonsProperties | [static]
s_SelectedIndexProperty | RadioButtonsProperties | [static]
s_SelectedItemProperty | RadioButtonsProperties | [static]
Select(int index) | RadioButtons | [private]
SelectedIndex(int value) | RadioButtonsProperties |
SelectedIndex() | RadioButtonsProperties |
SelectedIndexProperty() | RadioButtonsProperties | [inline, static]
SelectedItem(winrt::IInspectable const &value) | RadioButtonsProperties |
SelectedItem() | RadioButtonsProperties |
SelectedItemProperty() | RadioButtonsProperties | [inline, static]
SelectionChanged(winrt::SelectionChangedEventHandler const &value) | RadioButtonsProperties |
SelectionChanged(winrt::event_token const &token) | RadioButtonsProperties |
SetTestHooksEnabled(bool enabled) | RadioButtons |
UpdateItemsSource() | RadioButtons | [private]
UpdateItemTemplate() | RadioButtons | [private]
UpdateSelectedIndex() | RadioButtons | [private]
UpdateSelectedItem() | RadioButtons | [private]
UpdateVisualStateForIsEnabledChange() | RadioButtons | [private]
~RadioButtons() | RadioButtons |
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedIconTestHooks.idl Source File

  • File List
  • File Members
  • AnimatedIcon

AnimatedIconTestHooks.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 enum AnimatedIconAnimationQueueBehavior
00007 {
00008     Cut,
00009     QueueOne,
00010     SpeedUpQueueOne,
00011 };
00012
00013 [MUX_INTERNAL]
00014 [default_interface]
00015 [webhosthidden]
00016 runtimeclass AnimatedIconTestHooks
00017 {
00018     static void SetAnimationQueueBehavior(MU_XC_NAMESPACE.AnimatedIcon animatedIcon, AnimatedIconAnimationQueueBehavior easingFunction);
00019     static void SetDurationMultiplier(MU_XC_NAMESPACE.AnimatedIcon animatedIcon, Single multiplier);
00020     static void SetSpeedUpMultiplier(MU_XC_NAMESPACE.AnimatedIcon animatedIcon, Single multiplier);
00021     static void SetQueueLength(MU_XC_NAMESPACE.AnimatedIcon animatedIcon, Int32 length);
00022
00023     static String GetLastAnimationSegment(MU_XC_NAMESPACE.AnimatedIcon animatedIcon);
00024     static String GetLastAnimationSegmentStart(MU_XC_NAMESPACE.AnimatedIcon animatedIcon);
00025     static String GetLastAnimationSegmentEnd(MU_XC_NAMESPACE.AnimatedIcon animatedIcon);
00026     static event Windows.Foundation.TypedEventHandler<MU_XC_NAMESPACE.AnimatedIcon, Object> LastAnimationSegmentChanged;
00027 };
00028
00029 }
Generated on Sun Dec 1 2024 20:51:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/NavigationViewItemPresenterTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

NavigationViewItemPresenterTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "NavigationViewItemPresenterTemplateSettings.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(NavigationViewItemPresenterTemplateSettings)
00012 }
00013
00014 #include "NavigationViewItemPresenterTemplateSettings.g.cpp"
00015
00016 GlobalDependencyProperty NavigationViewItemPresenterTemplateSettingsProperties::s_IconWidthProperty{ nullptr };
00017 GlobalDependencyProperty NavigationViewItemPresenterTemplateSettingsProperties::s_SmallerIconWidthProperty{ nullptr };
00018
00019 NavigationViewItemPresenterTemplateSettingsProperties::NavigationViewItemPresenterTemplateSettingsProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void NavigationViewItemPresenterTemplateSettingsProperties::EnsureProperties()
00025 {
00026     if (!s_IconWidthProperty)
00027     {
00028         s_IconWidthProperty =
00029             InitializeDependencyProperty(
00030                 L"IconWidth",
00031                 winrt::name_of<double>(),
00032                 winrt::name_of<winrt::NavigationViewItemPresenterTemplateSettings>(),
00033                 false /* isAttached */,
00034                 ValueHelper<double>::BoxedDefaultValue(),
00035                 nullptr);
00036     }
00037     if (!s_SmallerIconWidthProperty)
00038     {
00039         s_SmallerIconWidthProperty =
00040             InitializeDependencyProperty(
00041                 L"SmallerIconWidth",
00042                 winrt::name_of<double>(),
00043                 winrt::name_of<winrt::NavigationViewItemPresenterTemplateSettings>(),
00044                 false /* isAttached */,
00045                 ValueHelper<double>::BoxedDefaultValue(),
00046                 nullptr);
00047     }
00048 }
00049
00050 void NavigationViewItemPresenterTemplateSettingsProperties::ClearProperties()
00051 {
00052     s_IconWidthProperty = nullptr;
00053     s_SmallerIconWidthProperty = nullptr;
00054 }
00055
00056 void NavigationViewItemPresenterTemplateSettingsProperties::IconWidth(double value)
00057 {
00058     [[gsl::suppress(con)]]
00059     {
00060     static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->SetValue(s_IconWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00061     }
00062 }
00063
00064 double NavigationViewItemPresenterTemplateSettingsProperties::IconWidth()
00065 {
00066     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->GetValue(s_IconWidthProperty));
00067 }
00068
00069 void NavigationViewItemPresenterTemplateSettingsProperties::SmallerIconWidth(double value)
00070 {
00071     [[gsl::suppress(con)]]
00072     {
00073     static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->SetValue(s_SmallerIconWidthProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00074     }
00075 }
00076
00077 double NavigationViewItemPresenterTemplateSettingsProperties::SmallerIconWidth()
00078 {
00079     return ValueHelper<double>::CastOrUnbox(static_cast<NavigationViewItemPresenterTemplateSettings*>(this)->GetValue(s_SmallerIconWidthProperty));
00080 }
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedFindVisualSource Member List

This is the complete list of members for AnimatedFindVisualSource, including all inherited members.
ColorAsVector4(winrt::Windows::UI::Color color) | AnimatedFindVisualSource | [private, static]
Duration() | AnimatedFindVisualSource |
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | AnimatedFindVisualSource | [private]
Foreground() | AnimatedFindVisualSource | [inline]
Foreground(winrt::Windows::UI::Color value) | AnimatedFindVisualSource |
FrameCount() | AnimatedFindVisualSource |
Framerate() | AnimatedFindVisualSource |
FrameToProgress(double frameNumber) | AnimatedFindVisualSource |
Markers() | AnimatedFindVisualSource |
SetColorProperty(hstring const &propertyName, winrt::Windows::UI::Color value) | AnimatedFindVisualSource |
SetScalarProperty(hstring const &propertyName, double value) | AnimatedFindVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor) | AnimatedFindVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics) | AnimatedFindVisualSource |
Generated on Sun Dec 1 2024 20:52:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsRepeaterScrollHost Member List

This is the complete list of members for ItemsRepeaterScrollHost, including all inherited members.
abi_enter() | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
AnchorElement() | ItemsRepeaterScrollHost |
ApplyPendingChangeView(const winrt::FxScrollViewer &scrollViewer) | ItemsRepeaterScrollHost | [private]
ArrangeOverride(winrt::Size const &finalSize) | ItemsRepeaterScrollHost |
CheckThread() | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
ConfigurationChanged(winrt::ConfigurationChangedEventHandler const &value) | ItemsRepeaterScrollHost |
ConfigurationChanged(winrt::event_token const &token) | ItemsRepeaterScrollHost |
CurrentAnchor() | ItemsRepeaterScrollHost |
DeleteInstanceOnUIThread(std::unique_ptr< ItemsRepeaterScrollHost > &&self) noexcept | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
final_release(std::unique_ptr< ItemsRepeaterScrollHost > &&self) | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline, static]
GetAnchorElement(_Out_opt_ winrt::Rect *relativeBounds=nullptr) | ItemsRepeaterScrollHost | [private]
GetBase() | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
GetInner() | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
GetRelativeViewport(winrt::UIElement const &element) | ItemsRepeaterScrollHost |
HasPendingBringIntoView() const | ItemsRepeaterScrollHost | [inline, private]
HorizontalAnchorRatio() | ItemsRepeaterScrollHost |
HorizontalAnchorRatio(double value) | ItemsRepeaterScrollHost |
IsHorizontallyScrollable() | ItemsRepeaterScrollHost |
IsOnThread() | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
IsVerticallyScrollable() | ItemsRepeaterScrollHost |
ItemsRepeaterScrollHost() | ItemsRepeaterScrollHost |
m_candidates | ItemsRepeaterScrollHost | [private]
MeasureOverride(winrt::Size const &availableSize) | ItemsRepeaterScrollHost |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
OnScrollViewerSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | ItemsRepeaterScrollHost | [private]
OnScrollViewerViewChanged(winrt::IInspectable const &sender, winrt::ScrollViewerViewChangedEventArgs const &args) | ItemsRepeaterScrollHost | [private]
OnScrollViewerViewChanging(const winrt::IInspectable &sender, const winrt::ScrollViewerViewChangingEventArgs &args) | ItemsRepeaterScrollHost | [private]
PostArrange(winrt::PostArrangeEventHandler const &value) | ItemsRepeaterScrollHost |
PostArrange(winrt::event_token const &token) | ItemsRepeaterScrollHost |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ItemsRepeaterScrollHost, DeriveFromPanelHelper_base, winrt::ItemsRepeaterScrollHost, winrt::cloaked< winrt::IRepeaterScrollingSurface > > | [inline]
RegisterAnchorCandidate(winrt::UIElement const &element) | ItemsRepeaterScrollHost |
ScrollViewer() | ItemsRepeaterScrollHost |
ScrollViewer(winrt::FxScrollViewer const &value) | ItemsRepeaterScrollHost |
StartBringIntoView(winrt::UIElement const &element, double alignmentX, double alignmentY, double offsetX, double offsetY, bool animate) | ItemsRepeaterScrollHost |
TrackElement(const winrt::UIElement &element, winrt::Rect previousBounds, const winrt::FxScrollViewer &scrollViewer) | ItemsRepeaterScrollHost | [private]
UnregisterAnchorCandidate(winrt::UIElement const &element) | ItemsRepeaterScrollHost |
VerticalAnchorRatio() | ItemsRepeaterScrollHost |
VerticalAnchorRatio(double value) | ItemsRepeaterScrollHost |
ViewportChanged(winrt::ViewportChangedEventHandler const &value) | ItemsRepeaterScrollHost |
ViewportChanged(winrt::event_token const &token) | ItemsRepeaterScrollHost |
Generated on Sun Dec 1 2024 20:52:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PerfXamlEvent_RAII Member List

This is the complete list of members for PerfXamlEvent_RAII, including all inherited members.
m_eventName | PerfXamlEvent_RAII | [private]
m_isInteresting | PerfXamlEvent_RAII | [private]
m_objectPointer | PerfXamlEvent_RAII | [private]
operator=(const PerfXamlEvent_RAII &) | PerfXamlEvent_RAII |
operator=(PerfXamlEvent_RAII &&) | PerfXamlEvent_RAII |
PerfXamlEvent_RAII(uint64_t objectPointer, PCSTR eventName, bool isInteresting) | PerfXamlEvent_RAII | [inline]
PerfXamlEvent_RAII(const PerfXamlEvent_RAII &) | PerfXamlEvent_RAII |
PerfXamlEvent_RAII(PerfXamlEvent_RAII &&) | PerfXamlEvent_RAII |
~PerfXamlEvent_RAII() | PerfXamlEvent_RAII | [inline]
Generated on Sun Dec 1 2024 20:53:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooks.idl Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooks.idl

Go to the documentation of this file.
00001 ﻿namespace MU_PRIVATE_CONTROLS_NAMESPACE
00002 {
00003
00004 [MUX_INTERNAL]
00005 [webhosthidden]
00006 enum LinedFlowLayoutInvalidationTrigger
00007 {
00008     InvalidateLayoutCall = 0,
00009     SnappedAverageItemsPerLineChange = 1,
00010     ItemDesiredWidthChange = 2,
00011 };
00012
00013 [MUX_INTERNAL]
00014 [webhosthidden]
00015 runtimeclass LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs
00016 {
00017     LinedFlowLayoutInvalidationTrigger InvalidationTrigger { get; };
00018 }
00019
00020 [MUX_INTERNAL]
00021 [webhosthidden]
00022 runtimeclass LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs
00023 {
00024     Int32 ItemIndex { get; };
00025     Int32 LineIndex { get; };
00026 }
00027
00028 [MUX_INTERNAL]
00029 [webhosthidden]
00030 [default_interface]
00031 runtimeclass LayoutsTestHooks
00032 {
00033     static event Windows.Foundation.TypedEventHandler<Object, Object> LinedFlowLayoutSnappedAverageItemsPerLineChanged;
00034     static event Windows.Foundation.TypedEventHandler<Object, LayoutsTestHooksLinedFlowLayoutInvalidatedEventArgs> LinedFlowLayoutInvalidated;
00035     static event Windows.Foundation.TypedEventHandler<Object, LayoutsTestHooksLinedFlowLayoutItemLockedEventArgs> LinedFlowLayoutItemLocked;
00036
00037     static MU_XC_NAMESPACE.IndexBasedLayoutOrientation GetLayoutForcedIndexBasedLayoutOrientation(Object layout);
00038     static void SetLayoutForcedIndexBasedLayoutOrientation(Object layout, MU_XC_NAMESPACE.IndexBasedLayoutOrientation forcedIndexBasedLayoutOrientation);
00039     static void ResetLayoutForcedIndexBasedLayoutOrientation(Object layout);
00040
00041     static void LayoutInvalidateMeasure(Object layout, Boolean relayout);
00042
00043     static Int32 GetLayoutFirstRealizedItemIndex(Object layout);
00044     static Int32 GetLayoutLastRealizedItemIndex(Object layout);
00045
00046     static Int32 GetLinedFlowLayoutFirstFrozenItemIndex(Object linedFlowLayout);
00047     static Int32 GetLinedFlowLayoutLastFrozenItemIndex(Object linedFlowLayout);
00048
00049     static Double GetLinedFlowLayoutAverageItemAspectRatio(Object linedFlowLayout);
00050     static Double GetLinedFlowLayoutRawAverageItemsPerLine(Object linedFlowLayout);
00051     static Double GetLinedFlowLayoutSnappedAverageItemsPerLine(Object linedFlowLayout);
00052
00053     static Double GetLinedFlowLayoutForcedAverageItemsPerLineDivider(Object linedFlowLayout);
00054     static void SetLinedFlowLayoutForcedAverageItemsPerLineDivider(Object linedFlowLayout, Double forcedAverageItemsPerLineDivider);
00055
00056     static Double GetLinedFlowLayoutForcedAverageItemAspectRatio(Object linedFlowLayout);
00057     static void SetLinedFlowLayoutForcedAverageItemAspectRatio(Object linedFlowLayout, Double forcedAverageItemAspectRatio);
00058
00059     static Double GetLinedFlowLayoutForcedWrapMultiplier(Object linedFlowLayout);
00060     static void SetLinedFlowLayoutForcedWrapMultiplier(Object linedFlowLayout, Double forcedWrapMultiplier);
00061
00062     static Boolean GetLinedFlowLayoutIsFastPathSupported(Object linedFlowLayout);
00063     static void SetLinedFlowLayoutIsFastPathSupported(Object linedFlowLayout, Boolean isFastPathSupported);
00064
00065     static Int32 GetLinedFlowLayoutLogItemIndex(Object linedFlowLayout);
00066     static void SetLinedFlowLayoutLogItemIndex(Object linedFlowLayout, Int32 itemIndex);
00067
00068     static Int32 GetLinedFlowLayoutLineIndex(Object linedFlowLayout, Int32 itemIndex);
00069
00070     static void ClearLinedFlowLayoutItemAspectRatios(Object linedFlowLayout);
00071     static void UnlockLinedFlowLayoutItems(Object linedFlowLayout);
00072 }
00073
00074 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterExpressionAnimationSourcesPage Member List

This is the complete list of members for ScrollPresenterExpressionAnimationSourcesPage, including all inherited members.
btnClearFullLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
btnGetFullLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e) | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
fullLogs | ScrollPresenterExpressionAnimationSourcesPage | [private]
hIndicatorOffsetExpression | ScrollPresenterExpressionAnimationSourcesPage | [private]
hIndicatorWidthExpression | ScrollPresenterExpressionAnimationSourcesPage | [private]
hScrollBarVisual | ScrollPresenterExpressionAnimationSourcesPage | [private]
hScrollIndicatorSpriteVisual | ScrollPresenterExpressionAnimationSourcesPage | [private]
hScrollIndicatorVisual | ScrollPresenterExpressionAnimationSourcesPage | [private]
isLoggingMessages | ScrollPresenterExpressionAnimationSourcesPage | [private]
layoutCompletedCount | ScrollPresenterExpressionAnimationSourcesPage | [private]
MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args) | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | ScrollPresenterExpressionAnimationSourcesPage | [inline, protected]
ScrollPresenter_SizeChanged(object sender, SizeChangedEventArgs e) | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
ScrollPresenterExpressionAnimationSourcesPage() | ScrollPresenterExpressionAnimationSourcesPage | [inline]
ScrollPresenterExpressionAnimationSourcesPage_Loaded(object sender, RoutedEventArgs e) | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
SetLayoutCompleted() | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
SetupScrollbars() | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
UpdateScrollbars() | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
vIndicatorHeightExpression | ScrollPresenterExpressionAnimationSourcesPage | [private]
vIndicatorOffsetExpression | ScrollPresenterExpressionAnimationSourcesPage | [private]
vScrollBarVisual | ScrollPresenterExpressionAnimationSourcesPage | [private]
vScrollIndicatorSpriteVisual | ScrollPresenterExpressionAnimationSourcesPage | [private]
vScrollIndicatorVisual | ScrollPresenterExpressionAnimationSourcesPage | [private]
~ScrollPresenterExpressionAnimationSourcesPage() | ScrollPresenterExpressionAnimationSourcesPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IndexPath.h Source File

  • File List
  • File Members
  • Repeater

IndexPath.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "IndexPath.g.h"
00007
00008 class IndexPath : public winrt::implementation::IndexPathT<IndexPath>
00009 {
00010 public:
00011     IndexPath(int index);
00012     IndexPath(int groupIndex, int itemIndex);
00013     IndexPath(const winrt::IVector<int>& indices);
00014     IndexPath(const std::vector<int>& indices);
00015
00016     template <typename ... Args>
00017     static winrt::IndexPath CreateFrom(Args&& ... args)
00018     {
00019         return winrt::make<IndexPath>(std::forward<Args>(args) ...);
00020     }
00021
00022     template <typename T>
00023     static winrt::IndexPath CreateFromIndices(T&& indices)
00024     {
00025         return winrt::make<IndexPath>(std::forward<T>(indices));
00026     }
00027
00028 #pragma region IIndexPath
00029     int32_t GetSize();
00030     int32_t GetAt(int index);
00031     int32_t CompareTo(winrt::IndexPath const& rhs);
00032 #pragma endregion
00033
00034 #pragma region IStringable
00035     hstring ToString();
00036 #pragma endregion
00037
00038     bool IsValid() const;
00039     winrt::IndexPath CloneWithChildIndex(int childIndex) const;
00040
00041 private:
00042     std::vector<int> m_path;
00043 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManagerWithPlatformFeatures.cpp Source File

  • File List
  • File Members
  • Repeater

ViewportManagerWithPlatformFeatures.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "ViewportManagerWithPlatformFeatures.h"
00008 #include "ItemsRepeater.h"
00009 #include "Layout.h"
00010
00011 // Pixel delta by which to inflate the cache buffer on each side.  Rather than fill the entire
00012 // cache buffer all at once, we chunk the work to make the UI thread more responsive.  We inflate
00013 // the cache buffer from 0 to a max value determined by the Maximum[Horizontal,Vertical]CacheLength
00014 // properties.
00015 constexpr double CacheBufferPerSideInflationPixelDelta = 40.0;
00016
00017 ViewportManagerWithPlatformFeatures::ViewportManagerWithPlatformFeatures(ItemsRepeater* owner) :
00018     m_owner(owner),
00019     m_scroller(owner),
00020     m_makeAnchorElement(owner)
00021 {
00022     // ItemsRepeater is not fully constructed yet. Don't interact with it.
00023 }
00024
00025 winrt::UIElement ViewportManagerWithPlatformFeatures::SuggestedAnchor() const
00026 {
00027     // The element generated during the ItemsRepeater.MakeAnchor call has precedence over the next tick.
00028     winrt::UIElement suggestedAnchor = m_makeAnchorElement.get();
00029
00030     if (!suggestedAnchor)
00031     {
00032         const auto anchorElement =
00033             m_scroller ?
00034             m_scroller.get().CurrentAnchor() :
00035             nullptr;
00036
00037         if (anchorElement)
00038         {
00039             // We can't simply return anchorElement because, in case of nested ItemsRepeaters, it may not
00040             // be a direct child of ours, or even an indirect child. We need to walk up the tree starting
00041             // from anchorElement to figure out what child of ours (if any) to use as the suggested element.
00042             winrt::UIElement owner = *m_owner;
00043             auto child = anchorElement;
00044             auto parent = CachedVisualTreeHelpers::GetParent(child).as<winrt::UIElement>();
00045             while (parent)
00046             {
00047                 if (parent == owner)
00048                 {
00049                     suggestedAnchor = child;
00050                     break;
00051                 }
00052
00053                 child = parent;
00054                 parent = CachedVisualTreeHelpers::GetParent(parent).as<winrt::UIElement>();
00055             }
00056
00057             ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"SuggestedAnchor returns IScrollAnchorProvider.CurrentAnchor.", suggestedAnchor);
00058         }
00059 #ifdef DBG
00060         else
00061         {
00062             ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"SuggestedAnchor returns null.");
00063         }
00064 #endif // DBG
00065     }
00066 #ifdef DBG
00067     else
00068     {
00069         // Since we have an anchor element, we do not want the scroll anchor provider to start anchoring some other element.
00070         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"SuggestedAnchor returns non-null m_makeAnchorElement.", m_makeAnchorElement);
00071     }
00072 #endif // DBG
00073     return suggestedAnchor;
00074 }
00075
00076 void ViewportManagerWithPlatformFeatures::HorizontalCacheLength(double value)
00077 {
00078     if (m_maximumHorizontalCacheLength != value)
00079     {
00080         ValidateCacheLength(value);
00081         m_maximumHorizontalCacheLength = value;
00082         ResetCacheBuffer();
00083     }
00084 }
00085
00086 void ViewportManagerWithPlatformFeatures::VerticalCacheLength(double value)
00087 {
00088     if (m_maximumVerticalCacheLength != value)
00089     {
00090         ValidateCacheLength(value);
00091         m_maximumVerticalCacheLength = value;
00092         ResetCacheBuffer();
00093     }
00094 }
00095
00096 winrt::Rect ViewportManagerWithPlatformFeatures::GetLayoutVisibleWindowDiscardAnchor() const
00097 {
00098     auto visibleWindow = m_visibleWindow;
00099
00100     if (HasScroller())
00101     {
00102         visibleWindow.X += m_layoutExtent.X + m_expectedViewportShift.X + m_unshiftableShift.X;
00103         visibleWindow.Y += m_layoutExtent.Y + m_expectedViewportShift.Y + m_unshiftableShift.Y;
00104     }
00105
00106     return visibleWindow;
00107 }
00108
00109 winrt::Rect ViewportManagerWithPlatformFeatures::GetLayoutVisibleWindow() const
00110 {
00111     auto visibleWindow = m_visibleWindow;
00112
00113     if (m_makeAnchorElement && m_isAnchorOutsideRealizedRange)
00114     {
00115         // The anchor is not necessarily laid out yet. Its position should default
00116         // to zero and the layout origin is expected to change once layout is done.
00117         // Until then, we need a window that's going to protect the anchor from
00118         // getting recycled.
00119
00120         // Also, we only want to mess with the realization rect iff the anchor is not inside it.
00121         // If we fiddle with an anchor that is already inside the realization rect,
00122         // shifting the realization rect results in repeater, layout and scroller thinking that it needs to act upon StartBringIntoView.
00123         // We do NOT want that!
00124
00125         visibleWindow.X = 0.0f;
00126         visibleWindow.Y = 0.0f;
00127     }
00128     else if (HasScroller())
00129     {
00130         visibleWindow.X += m_layoutExtent.X + m_expectedViewportShift.X + m_unshiftableShift.X;
00131         visibleWindow.Y += m_layoutExtent.Y + m_expectedViewportShift.Y + m_unshiftableShift.Y;
00132     }
00133
00134     return visibleWindow;
00135 }
00136
00137 winrt::Rect ViewportManagerWithPlatformFeatures::GetLayoutRealizationWindow() const
00138 {
00139     auto realizationWindow = GetLayoutVisibleWindow();
00140     if (HasScroller())
00141     {
00142         realizationWindow.X -= static_cast<float>(m_horizontalCacheBufferPerSide);
00143         realizationWindow.Y -= static_cast<float>(m_verticalCacheBufferPerSide);
00144         realizationWindow.Width += static_cast<float>(m_horizontalCacheBufferPerSide) * 2.0f;
00145         realizationWindow.Height += static_cast<float>(m_verticalCacheBufferPerSide) * 2.0f;
00146     }
00147
00148     return realizationWindow;
00149 }
00150
00151 void ViewportManagerWithPlatformFeatures::SetVisibleWindow(const winrt::Rect& visibleWindow)
00152 {
00153     if (visibleWindow.X != m_visibleWindow.X || visibleWindow.Y != m_visibleWindow.Y ||
00154         visibleWindow.Width != m_visibleWindow.Width || visibleWindow.Height != m_visibleWindow.Height)
00155     {
00156         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
00157             GetLayoutId().data(), L"m_visibleWindow set:",
00158             visibleWindow.X, visibleWindow.Y, visibleWindow.Width, visibleWindow.Height);
00159
00160         m_visibleWindow = visibleWindow;
00161     }
00162 }
00163
00164 void ViewportManagerWithPlatformFeatures::SetPendingViewportShift(const winrt::Point& pendingViewportShift)
00165 {
00166     if (pendingViewportShift.X != m_pendingViewportShift.X || pendingViewportShift.Y != m_pendingViewportShift.Y)
00167     {
00168         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00169             GetLayoutId().data(), L"m_pendingViewportShift set:",
00170             pendingViewportShift.X, pendingViewportShift.Y);
00171
00172         m_pendingViewportShift = pendingViewportShift;
00173     }
00174 }
00175
00176 void ViewportManagerWithPlatformFeatures::SetExpectedViewportShift(float expectedViewportShiftX, float expectedViewportShiftY)
00177 {
00178     if (expectedViewportShiftX != m_expectedViewportShift.X || expectedViewportShiftY != m_expectedViewportShift.Y)
00179     {
00180         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00181             GetLayoutId().data(), L"m_expectedViewportShift set:",
00182             expectedViewportShiftX, expectedViewportShiftY);
00183
00184         m_expectedViewportShift.X = expectedViewportShiftX;
00185         m_expectedViewportShift.Y = expectedViewportShiftY;
00186     }
00187 }
00188
00189 void ViewportManagerWithPlatformFeatures::SetUnshiftableShift(float unshiftableShiftX, float unshiftableShiftY)
00190 {
00191     if (unshiftableShiftX != m_unshiftableShift.X || unshiftableShiftY != m_unshiftableShift.Y)
00192     {
00193         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00194             GetLayoutId().data(), L"m_unshiftableShift set:",
00195             unshiftableShiftX, unshiftableShiftY);
00196
00197         m_unshiftableShift.X = unshiftableShiftX;
00198         m_unshiftableShift.Y = unshiftableShiftY;
00199     }
00200 }
00201
00202 void ViewportManagerWithPlatformFeatures::SetLayoutExtent(const winrt::Rect& layoutExtent)
00203 {
00204 #ifdef DBG
00205     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00206         GetLayoutId().data(), L"layoutExtent:", layoutExtent.X, layoutExtent.Y);
00207
00208     TraceFieldsDbg();
00209 #endif // DBG
00210
00211     SetExpectedViewportShift(m_expectedViewportShift.X + m_layoutExtent.X - layoutExtent.X, m_expectedViewportShift.Y + m_layoutExtent.Y - layoutExtent.Y);
00212
00213     // We tolerate viewport imprecisions up to 1 pixel to avoid invaliding layout too much.
00214     if (std::abs(m_expectedViewportShift.X) > 1.f || std::abs(m_expectedViewportShift.Y) > 1.f)
00215     {
00216         // There are cases where we might be expecting a shift but not get it. We will
00217         // be waiting for the effective viewport event but if the scroller is not able
00218         // to perform the shift (perhaps because it cannot scroll in negative offset),
00219         // then we will end up not realizing elements in the visible window.
00220         // To avoid this, we register to layout updated for this layout pass. If we
00221         // get an effective viewport, we know we have a new viewport and we unregister from
00222         // layout updated. If we get the layout updated handler, then we know that the
00223         // scroller was unable to perform the shift and we invalidate measure and unregister
00224         // from the layout updated event.
00225         if (!m_layoutUpdatedRevoker)
00226         {
00227             m_layoutUpdatedRevoker = m_owner->LayoutUpdated(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnLayoutUpdated });
00228         }
00229     }
00230
00231     if (layoutExtent.X != m_layoutExtent.X || layoutExtent.Y != m_layoutExtent.Y ||
00232         layoutExtent.Width != m_layoutExtent.Width || layoutExtent.Height != m_layoutExtent.Height)
00233     {
00234         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00235             GetLayoutId().data(), L"m_layoutExtent set:",
00236             layoutExtent.X, layoutExtent.Y);
00237
00238         m_layoutExtent = layoutExtent;
00239     }
00240
00241     SetPendingViewportShift(m_expectedViewportShift);
00242
00243     // We just finished a measure pass and have a new extent.
00244     // Let's make sure the scroller will run its arrange so that it tracks the anchor.
00245     if (m_scroller)
00246     {
00247         m_scroller.as<winrt::UIElement>().InvalidateArrange();
00248     }
00249 }
00250
00251 void ViewportManagerWithPlatformFeatures::ResetLayoutExtent()
00252 {
00253     if (m_layoutExtent.X != 0.0f || m_layoutExtent.Y != 0.0f ||
00254         m_layoutExtent.Width != 0.0f || m_layoutExtent.Height != 0.0f)
00255     {
00256         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
00257             GetLayoutId().data(), L"m_layoutExtent reset:",
00258             m_layoutExtent.X, m_layoutExtent.Y, m_layoutExtent.Width, m_layoutExtent.Height);
00259
00260         m_layoutExtent = {};
00261     }
00262 }
00263
00264 void ViewportManagerWithPlatformFeatures::ResetVisibleWindow()
00265 {
00266     if (m_visibleWindow.X != 0.0f || m_visibleWindow.Y != 0.0f ||
00267         m_visibleWindow.Width != 0.0f || m_visibleWindow.Height != 0.0f)
00268     {
00269         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
00270             GetLayoutId().data(), L"m_visibleWindow reset:",
00271             m_visibleWindow.X, m_visibleWindow.Y, m_visibleWindow.Width, m_visibleWindow.Height);
00272
00273         m_visibleWindow = {};
00274     }
00275 }
00276
00277 void ViewportManagerWithPlatformFeatures::ResetExpectedViewportShift()
00278 {
00279     if (m_expectedViewportShift.X != 0.0f || m_expectedViewportShift.Y != 0.0f)
00280     {
00281         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00282             GetLayoutId().data(), L"m_expectedViewportShift reset:",
00283             m_expectedViewportShift.X, m_expectedViewportShift.Y);
00284
00285         m_expectedViewportShift = {};
00286     }
00287 }
00288
00289 void ViewportManagerWithPlatformFeatures::ResetPendingViewportShift()
00290 {
00291     if (m_pendingViewportShift.X != 0.0f || m_pendingViewportShift.Y != 0.0f)
00292     {
00293         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00294             GetLayoutId().data(), L"m_pendingViewportShift reset:",
00295             m_pendingViewportShift.X, m_pendingViewportShift.Y);
00296
00297         m_pendingViewportShift = {};
00298     }
00299 }
00300
00301 void ViewportManagerWithPlatformFeatures::ResetUnshiftableShift()
00302 {
00303     if (m_unshiftableShift.X != 0.0f || m_unshiftableShift.Y != 0.0f)
00304     {
00305         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00306             GetLayoutId().data(), L"m_unshiftableShift reset:",
00307             m_unshiftableShift.X, m_unshiftableShift.Y);
00308
00309         m_unshiftableShift = {};
00310     }
00311 }
00312
00313 void ViewportManagerWithPlatformFeatures::OnLayoutChanged(bool isVirtualizing)
00314 {
00315     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this,
00316         GetLayoutId().data(), isVirtualizing);
00317
00318     m_managingViewportDisabled = !isVirtualizing;
00319
00320     ResetLayoutExtent();
00321     ResetExpectedViewportShift();
00322     ResetPendingViewportShift();
00323
00324     if (m_managingViewportDisabled)
00325     {
00326         m_effectiveViewportChangedRevoker.revoke();
00327     }
00328     else if (!m_effectiveViewportChangedRevoker)
00329     {
00330         m_effectiveViewportChangedRevoker = m_owner->EffectiveViewportChanged(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged });
00331     }
00332
00333     ResetUnshiftableShift();
00334     ResetCacheBuffer();
00335 }
00336
00337 void ViewportManagerWithPlatformFeatures::OnElementPrepared(const winrt::UIElement& element)
00338 {
00339     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, element);
00340
00341     // The newly prepared element is not registered as an anchor candidate right away. It first needs to be arranged at least once so its position
00342     // tracked by the scroller is valid.
00343     // The element is first put into a list of prepared elements. Then once arranged it is put into a list of prepared+arranged elements. Then finally
00344     // at the beginning of the following measure pass, it is registered as an anchor candidate.
00345
00346     const auto itPreparedElement = std::find_if(m_preparedElements.cbegin(), m_preparedElements.cend(), [&element](const tracker_ref<winrt::UIElement>& preparedElement) { return preparedElement.get() == element; });
00347
00348     if (itPreparedElement == m_preparedElements.cend())
00349     {
00350         m_preparedElements.push_back(tracker_ref<winrt::UIElement>{ m_owner, element });
00351     }
00352 }
00353
00354 void ViewportManagerWithPlatformFeatures::OnElementCleared(const winrt::UIElement& element)
00355 {
00356     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_PTR, METH_NAME, this, element);
00357
00358     // Remove the element from the prepared and prepared+arranged lists so it no longer gets registered as an anchor candidate for the scroller
00359     // after the next arrange pass.
00360
00361     const auto itPreparedElement = std::find_if(m_preparedElements.cbegin(), m_preparedElements.cend(),
00362         [&element](const tracker_ref<winrt::UIElement>& preparedElement) { return preparedElement.get() == element; });
00363
00364     if (itPreparedElement != m_preparedElements.cend())
00365     {
00366         m_preparedElements.erase(itPreparedElement);
00367     }
00368
00369     const auto itPreparedAndArrangedElement = std::find_if(m_preparedAndArrangedElements.cbegin(), m_preparedAndArrangedElements.cend(),
00370         [&element](const tracker_ref<winrt::UIElement>& preparedAndArrangedElement) { return preparedAndArrangedElement.get() == element; });
00371
00372     if (itPreparedAndArrangedElement != m_preparedAndArrangedElements.cend())
00373     {
00374         m_preparedAndArrangedElements.erase(itPreparedAndArrangedElement);
00375     }
00376
00377     if (element.CanBeScrollAnchor())
00378     {
00379         // Unregister the element as an anchor candidate since it was already declared as such.
00380         element.CanBeScrollAnchor(false);
00381     }
00382 }
00383
00384 void ViewportManagerWithPlatformFeatures::OnOwnerMeasuring()
00385 {
00386     // This is because of a bug that causes effective viewport to not
00387     // fire if you register during arrange.
00388     // Bug 17411076: EffectiveViewport: registering for effective viewport in arrange should invalidate viewport
00389     EnsureScroller();
00390
00391     winrt::Rect currentLayoutRealizationWindow = GetLayoutRealizationWindow();
00392
00393     if ((m_horizontalCacheBufferPerSide != 0.0 || m_verticalCacheBufferPerSide != 0.0) &&
00394         (m_lastLayoutRealizationWindow.Width <= 0.0f || m_lastLayoutRealizationWindow.Height <= 0.0f ||
00395          currentLayoutRealizationWindow.Width <= 0.0f || currentLayoutRealizationWindow.Height <= 0.0f ||
00396          !SharedHelpers::DoRectsIntersect(m_lastLayoutRealizationWindow, currentLayoutRealizationWindow)))
00397     {
00398         // Two consecutive measure passes use disconnected realization windows.
00399         // Reset the potential cache buffer so that it regrows from scratch.
00400         ResetLayoutRealizationWindowCacheBuffer();
00401     }
00402
00403     m_lastLayoutRealizationWindow = currentLayoutRealizationWindow;
00404
00405     if (m_skipScrollAnchorRegistrationsDuringNextMeasurePass)
00406     {
00407         ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"m_skipScrollAnchorRegistrationsDuringNextMeasurePass reset.");
00408
00409         m_skipScrollAnchorRegistrationsDuringNextMeasurePass = false;
00410     }
00411     else if (!m_skipScrollAnchorRegistrationsDuringNextArrangePass)
00412     {
00413         // Now that a new measure pass is starting, register the previously arranged elements as anchor candidates for the scroller.
00414         RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates();
00415     }
00416
00417 #ifdef DBG
00418     TraceScrollerDbg();
00419 #endif // DBG
00420 }
00421
00422 void ViewportManagerWithPlatformFeatures::OnOwnerArranged()
00423 {
00424 #ifdef DBG
00425     ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());
00426
00427     TraceScrollerDbg();
00428     TraceFieldsDbg();
00429 #endif // DBG
00430
00431     if (!m_skipScrollAnchorRegistrationsDuringNextMeasurePass)
00432     {
00433         if (m_skipScrollAnchorRegistrationsDuringNextArrangePass)
00434         {
00435             ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"m_skipScrollAnchorRegistrationsDuringNextArrangePass reset.");
00436
00437             m_skipScrollAnchorRegistrationsDuringNextArrangePass = false;
00438         }
00439         else
00440         {
00441             // Now that an arrange pass completed, register the prepared elements as arranged. They will be registered as anchor candidates
00442             // during the next measure pass.
00443             RegisterPreparedElementsAsArranged();
00444         }
00445     }
00446
00447     ResetExpectedViewportShift();
00448
00449     if (!m_managingViewportDisabled)
00450     {
00451         // This is because of a bug that causes effective viewport to not
00452         // fire if you register during arrange.
00453         // Bug 17411076: EffectiveViewport: registering for effective viewport in arrange should invalidate viewport
00454         // EnsureScroller();
00455
00456         if (HasScroller())
00457         {
00458             const double maximumHorizontalCacheBufferPerSide = m_maximumHorizontalCacheLength * m_visibleWindow.Width / 2.0;
00459             const double maximumVerticalCacheBufferPerSide = m_maximumVerticalCacheLength * m_visibleWindow.Height / 2.0;
00460
00461             const bool continueBuildingCache =
00462                 m_horizontalCacheBufferPerSide < maximumHorizontalCacheBufferPerSide ||
00463                 m_verticalCacheBufferPerSide < maximumVerticalCacheBufferPerSide;
00464
00465             if (continueBuildingCache)
00466             {
00467                 m_horizontalCacheBufferPerSide += CacheBufferPerSideInflationPixelDelta;
00468                 m_verticalCacheBufferPerSide += CacheBufferPerSideInflationPixelDelta;
00469
00470                 m_horizontalCacheBufferPerSide = std::min(m_horizontalCacheBufferPerSide, maximumHorizontalCacheBufferPerSide);
00471                 m_verticalCacheBufferPerSide = std::min(m_verticalCacheBufferPerSide, maximumVerticalCacheBufferPerSide);
00472
00473                 // Since we grow the cache buffer at the end of the arrange pass,
00474                 // we need to register work even if we just reached cache potential.
00475                 RegisterCacheBuildWork();
00476             }
00477         }
00478     }
00479 }
00480
00481 void ViewportManagerWithPlatformFeatures::OnLayoutUpdated(winrt::IInspectable const& sender, winrt::IInspectable const& args)
00482 {
00483     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());
00484
00485     m_layoutUpdatedRevoker.revoke();
00486     if (m_managingViewportDisabled)
00487     {
00488         return;
00489     }
00490
00491     // We were expecting a viewport shift but we never got one and we are not going to in this
00492     // layout pass. We likely will never get this shift, so lets assume that we are never going to get it and
00493     // adjust our expected shift to track that. One case where this can happen is when there is no scroller
00494     // that can scroll in the direction where the shift is expected.
00495     if (m_pendingViewportShift.X != 0.0f || m_pendingViewportShift.Y != 0.0f)
00496     {
00497         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00498             GetLayoutId().data(), L"Layout Updated with pending shift - invalidating measure",
00499             m_pendingViewportShift.X,
00500             m_pendingViewportShift.Y);
00501
00502         // Assume this is never going to come.
00503         SetUnshiftableShift(m_unshiftableShift.X + m_pendingViewportShift.X, m_unshiftableShift.Y + m_pendingViewportShift.Y);
00504         ResetPendingViewportShift();
00505         ResetExpectedViewportShift();
00506
00507         TryInvalidateMeasure();
00508     }
00509 }
00510
00511 void ViewportManagerWithPlatformFeatures::OnMakeAnchor(const winrt::UIElement& anchor, const bool isAnchorOutsideRealizedRange)
00512 {
00513 #ifdef DBG
00514     if (anchor == nullptr)
00515     {
00516         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"Resets m_makeAnchorElement.", m_makeAnchorElement);
00517     }
00518     else
00519     {
00520         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"Sets m_makeAnchorElement.", anchor);
00521     }
00522 #endif // DBG
00523
00524     m_makeAnchorElement.set(anchor);
00525     m_isAnchorOutsideRealizedRange = isAnchorOutsideRealizedRange;
00526 }
00527
00528 void ViewportManagerWithPlatformFeatures::OnBringIntoViewRequested(const winrt::BringIntoViewRequestedEventArgs& args)
00529 {
00530     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());
00531
00532     if (!m_managingViewportDisabled)
00533     {
00534         // We do not animate bring-into-view operations where the anchor is disconnected because
00535         // it doesn't look good (the blank space is obvious because the layout can't keep track
00536         // of two realized ranges while the animation is going on).
00537         if (m_isAnchorOutsideRealizedRange)
00538         {
00539             args.AnimationDesired(false);
00540         }
00541
00542         // During the time between a bring into view request and the element coming into view we do not
00543         // want the anchor provider to pick some anchor and jump to it. Instead we want to anchor on the
00544         // element that is being brought into view. We can do this by making just that element as a potential
00545         // anchor candidate and ensure no other element of this repeater is an anchor candidate.
00546         // Once the layout pass is done and we render the frame, the element will be in frame and we can
00547         // switch back to letting the anchor provider pick a suitable anchor.
00548
00549         // get the targetChild - i.e the immediate child of this repeater that is being brought into view.
00550         // Note that the element being brought into view could be a descendant.
00551         const auto targetChild = GetImmediateChildOfRepeater(args.TargetElement());
00552
00553         // Make sure that only the target child can be the anchor during the bring into view operation.
00554         UnregisterScrollAnchorCandidates(targetChild /*exceptionElement*/, false /*registerAsPreparedAndArrangedElements*/);
00555
00556         // Register to rendering event to go back to how things were before where any child can be the anchor.
00557         m_isBringIntoViewInProgress = true;
00558         if (!m_renderingToken)
00559         {
00560             winrt::Microsoft::UI::Xaml::Media::CompositionTarget compositionTarget{ nullptr };
00561             m_renderingToken = compositionTarget.Rendering(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnCompositionTargetRendering });
00562         }
00563     }
00564 }
00565
00566 winrt::UIElement ViewportManagerWithPlatformFeatures::GetImmediateChildOfRepeater(winrt::UIElement const& descendant)
00567 {
00568     winrt::UIElement targetChild = descendant;
00569     winrt::UIElement parent = CachedVisualTreeHelpers::GetParent(descendant).as<winrt::UIElement>();
00570     while (parent != nullptr && parent != static_cast<winrt::DependencyObject>(*m_owner))
00571     {
00572         targetChild = parent;
00573         parent = CachedVisualTreeHelpers::GetParent(parent).as<winrt::UIElement>();
00574     }
00575
00576     if (!parent)
00577     {
00578         throw winrt::hresult_error(E_FAIL, L"OnBringIntoViewRequested called with args.target element not under the ItemsRepeater that recieved the call");
00579     }
00580
00581     return targetChild;
00582 }
00583
00584 void ViewportManagerWithPlatformFeatures::OnCompositionTargetRendering(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*args*/)
00585 {
00586     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_PTR, METH_NAME, this, GetLayoutId().data(), L"Resets m_makeAnchorElement.", m_makeAnchorElement);
00587
00588     MUX_ASSERT(!m_managingViewportDisabled);
00589
00590     m_renderingToken.revoke();
00591
00592     m_isBringIntoViewInProgress = false;
00593
00594     if (m_makeAnchorElement)
00595     {
00596         m_makeAnchorElement.set(nullptr);
00597
00598         if (m_isAnchorOutsideRealizedRange)
00599         {
00600             m_isAnchorOutsideRealizedRange = false;
00601
00602             // During the bring-into-view operation, the layout anchor was positioned at the top/left
00603             // of the viewport (see ViewportManagerWithPlatformFeatures::GetLayoutVisibleWindow()).
00604             // Now it may move within the viewport and require different items to be generated given
00605             // its final position. Thus a new measure pass is requested.
00606             TryInvalidateMeasure();
00607         }
00608     }
00609
00610     // Now that the item has been brought into view, we can let the anchor provider pick a new anchor.
00611     for (const auto& child : m_owner->Children())
00612     {
00613         if (!child.CanBeScrollAnchor())
00614         {
00615             auto info = ItemsRepeater::GetVirtualizationInfo(child);
00616             if (info->IsRealized() && info->IsHeldByLayout())
00617             {
00618                 child.CanBeScrollAnchor(true);
00619             }
00620         }
00621     }
00622 }
00623
00624 void ViewportManagerWithPlatformFeatures::ResetScrollers()
00625 {
00626     m_scroller.set(nullptr);
00627     m_scrollPresenterScrollStartingRevoker.revoke();
00628     m_scrollPresenterZoomStartingRevoker.revoke();
00629     m_effectiveViewportChangedRevoker.revoke();
00630     m_skipScrollAnchorRegistrationsDuringNextMeasurePass = false;
00631     m_skipScrollAnchorRegistrationsDuringNextArrangePass = false;
00632     m_ensuredScroller = false;
00633 }
00634
00635 void ViewportManagerWithPlatformFeatures::OnCacheBuildActionCompleted()
00636 {
00637     if (m_cacheBuildActionOutstanding)
00638     {
00639         ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"m_cacheBuildActionOutstanding reset.");
00640
00641         m_cacheBuildActionOutstanding = false;
00642     }
00643
00644     if (!m_managingViewportDisabled)
00645     {
00646         m_owner->InvalidateMeasure();
00647     }
00648 }
00649
00650 // Detect an imminent ScrollPresenter view change triggered by a ScrollTo, ScrollBy, ZoomTo, or ZoomBy call (which is likely originated from a ScrollBar interaction)
00651 // in order to generate items around the destination area. This is to avoid the ScrollPresenter showing blank content because the Compositor thread moved the ScrollPresenter.Content
00652 // visual before the ItemsRepeater was measured and arranged for the destination view.
00653 // This event handler checks if that anticipated view, without UI re-generation, would create a blank region in the ScrollPresenter. In the interest of performance, less than
00654 // 5% blank is tolerated and will not trigger a re-generation. Beyond that, UpdateViewport is called with the anticipated realization window. This is trigger an ItemsRepeater
00655 // measure/arrange pass based on the anticipated view.
00656 void ViewportManagerWithPlatformFeatures::OnScrollPresenterScrollStarting(winrt::ScrollPresenter const& scrollPresenter, winrt::ScrollingScrollStartingEventArgs const& args)
00657 {
00658     OnScrollPresenterViewChangeStarting(scrollPresenter, args.HorizontalOffset(), args.VerticalOffset(), args.ZoomFactor());
00659 }
00660
00661 void ViewportManagerWithPlatformFeatures::OnScrollPresenterZoomStarting(winrt::ScrollPresenter const& scrollPresenter, winrt::ScrollingZoomStartingEventArgs const& args)
00662 {
00663     OnScrollPresenterViewChangeStarting(scrollPresenter, args.HorizontalOffset(), args.VerticalOffset(), args.ZoomFactor());
00664 }
00665
00666 void ViewportManagerWithPlatformFeatures::OnScrollPresenterViewChangeStarting(winrt::ScrollPresenter const& scrollPresenter, double horizontalOffset, double verticalOffset, float zoomFactor)
00667 {
00668     const float blankViewportRatioTolerated = 0.05f;
00669     const float anticipatedHorizontalOffset = static_cast<float>(horizontalOffset);
00670     const float anticipatedVerticalOffset = static_cast<float>(verticalOffset);
00671     const float anticipatedZoomFactor = zoomFactor;
00672     const float anticipatedExtentWidth = static_cast<float>(scrollPresenter.ExtentWidth() * anticipatedZoomFactor);
00673     const float anticipatedExtentHeight = static_cast<float>(scrollPresenter.ExtentHeight() * anticipatedZoomFactor);
00674     const float viewportWidth = static_cast<float>(scrollPresenter.ViewportWidth());
00675     const float viewportHeight = static_cast<float>(scrollPresenter.ViewportHeight());
00676     const float unzoomedAnticipatedHorizontalOffset = anticipatedHorizontalOffset / anticipatedZoomFactor;
00677     const float unzoomedAnticipatedVerticalOffset = anticipatedVerticalOffset / anticipatedZoomFactor;
00678     const float scaledViewportWidth = viewportWidth / anticipatedZoomFactor;
00679     const float scaledViewportHeight = viewportHeight / anticipatedZoomFactor;
00680     const winrt::UIElement owner = *m_owner;
00681     const winrt::FrameworkElement ownerAsFE = owner.as<winrt::FrameworkElement>();
00682
00683 #ifdef DBG
00684     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
00685         L"Anticipated HorizontalOffset, VerticalOffset:", anticipatedHorizontalOffset, anticipatedVerticalOffset);
00686     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT, METH_NAME, this, GetLayoutId().data(),
00687         L"Anticipated ZoomFactor:", anticipatedZoomFactor);
00688
00689     TraceFieldsDbg();
00690 #endif // DBG
00691
00692     winrt::Rect anticipatedLayoutRealizationWindow = {
00693         unzoomedAnticipatedHorizontalOffset,
00694         unzoomedAnticipatedVerticalOffset,
00695         scaledViewportWidth,
00696         scaledViewportHeight };
00697
00698     if (anticipatedExtentWidth < viewportWidth)
00699     {
00700         const winrt::HorizontalAlignment horizontalAlignment = ownerAsFE.HorizontalAlignment();
00701
00702         if (horizontalAlignment == winrt::HorizontalAlignment::Center || horizontalAlignment == winrt::HorizontalAlignment::Stretch)
00703         {
00704             anticipatedLayoutRealizationWindow.X -= (viewportWidth - anticipatedExtentWidth) / 2.0f / anticipatedZoomFactor;
00705         }
00706         else if (horizontalAlignment == winrt::HorizontalAlignment::Right)
00707         {
00708             anticipatedLayoutRealizationWindow.X -= (viewportWidth - anticipatedExtentWidth) / anticipatedZoomFactor;
00709         }
00710     }
00711
00712     if (anticipatedExtentHeight < viewportHeight)
00713     {
00714         const winrt::VerticalAlignment verticalAlignment = ownerAsFE.VerticalAlignment();
00715
00716         if (verticalAlignment == winrt::VerticalAlignment::Center || verticalAlignment == winrt::VerticalAlignment::Stretch)
00717         {
00718             anticipatedLayoutRealizationWindow.Y -= (viewportHeight - anticipatedExtentHeight) / 2.0f / anticipatedZoomFactor;
00719         }
00720         else if (verticalAlignment == winrt::VerticalAlignment::Bottom)
00721         {
00722             anticipatedLayoutRealizationWindow.Y -= (viewportHeight - anticipatedExtentHeight) / anticipatedZoomFactor;
00723         }
00724     }
00725
00726     // No UI re-generation is performed if the last recorded realization window, m_lastLayoutRealizationWindow, is empty. This avoids UI generation when the actual effective viewport is empty.
00727     if (m_lastLayoutRealizationWindow.Width > 0.0f && m_lastLayoutRealizationWindow.Height > 0.0f &&
00728         m_unshiftableShift == winrt::Point() && // Do not affect start of a bring-into-view operation when the target layout anchor is realized and arranged, which results in m_unshiftableShift being set.
00729         (anticipatedLayoutRealizationWindow.X < m_lastLayoutRealizationWindow.X - blankViewportRatioTolerated * scaledViewportWidth ||
00730          anticipatedLayoutRealizationWindow.X > m_lastLayoutRealizationWindow.X + m_lastLayoutRealizationWindow.Width - (1.0f - blankViewportRatioTolerated) * scaledViewportWidth ||
00731          anticipatedLayoutRealizationWindow.Y < m_lastLayoutRealizationWindow.Y - blankViewportRatioTolerated * scaledViewportHeight ||
00732          anticipatedLayoutRealizationWindow.Y > m_lastLayoutRealizationWindow.Y + m_lastLayoutRealizationWindow.Height - (1.0f - blankViewportRatioTolerated) * scaledViewportHeight))
00733     {
00734         // Using the smallest effective viewport, viewportWidth x viewportHeight, to cover the ScrollPresenter's viewport. It may still be too large if a part of the scroller is not displayed on screen.
00735         const bool invalidatedMeasure = UpdateViewport(anticipatedLayoutRealizationWindow);
00736
00737         if (invalidatedMeasure)
00738         {
00739             UnregisterScrollAnchorCandidates(nullptr /*exceptionElement*/, true /*registerAsPreparedAndArrangedElements*/);
00740
00741             ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"m_skipScrollAnchorRegistrationsDuringNextMeasurePass/m_skipScrollAnchorRegistrationsDuringNextArrangePass set.");
00742
00743             // During such a UI re-generation, scroll anchoring is momentarily turned off to avoid unwanted anchoring-driven scrolls.
00744             m_skipScrollAnchorRegistrationsDuringNextMeasurePass = true;
00745             m_skipScrollAnchorRegistrationsDuringNextArrangePass = true;
00746         }
00747     }
00748 }
00749
00750 void ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged(winrt::FrameworkElement const& sender, winrt::EffectiveViewportChangedEventArgs const& args)
00751 {
00752     winrt::Rect effectiveViewport = args.EffectiveViewport();
00753
00754 #ifdef DBG
00755     MUX_ASSERT(!m_managingViewportDisabled);
00756
00757     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
00758         L"EffectiveViewport:", effectiveViewport.X, effectiveViewport.Y, effectiveViewport.Width, effectiveViewport.Height);
00759
00760     TraceScrollerDbg();
00761 #endif // DBG
00762
00763     bool invalidateMeasure = false;
00764     const bool invalidatedMeasure = UpdateViewport(args.EffectiveViewport());
00765     const winrt::Point emptyPoint = {};
00766     const winrt::Rect emptyRect = {};
00767
00768     if (m_pendingViewportShift != emptyPoint)
00769     {
00770         ResetPendingViewportShift();
00771         invalidateMeasure = true;
00772     }
00773
00774     if (m_unshiftableShift != emptyPoint)
00775     {
00776         ResetUnshiftableShift();
00777         invalidateMeasure = true;
00778     }
00779
00780     if (m_visibleWindow == emptyRect && m_layoutExtent != emptyRect)
00781     {
00782         // We got cleared.
00783         ResetLayoutExtent();
00784         invalidateMeasure = true;
00785     }
00786
00787     if (invalidateMeasure && !invalidatedMeasure)
00788     {
00789         TryInvalidateMeasure();
00790     }
00791
00792     // We got a new viewport, we don't need to wait for layout updated anymore to
00793     // see if our request for a pending shift was handled.
00794     m_layoutUpdatedRevoker.revoke();
00795 }
00796
00797 void ViewportManagerWithPlatformFeatures::EnsureScroller()
00798 {
00799     if (!m_ensuredScroller)
00800     {
00801         ResetScrollers();
00802
00803         auto parent = CachedVisualTreeHelpers::GetParent(*m_owner);
00804         while (parent)
00805         {
00806             if (const auto scroller = parent.try_as<winrt::Controls::IScrollAnchorProvider>())
00807             {
00808                 m_scroller.set(scroller);
00809                 break;
00810             }
00811
00812             parent = CachedVisualTreeHelpers::GetParent(parent);
00813         }
00814
00815         if (!m_managingViewportDisabled)
00816         {
00817             // When the ItemsRepeater is hosted in a Popup, m_scroller is null, but ItemsRepeater::EffectiveViewportChanged will still get raised.
00818             m_effectiveViewportChangedRevoker = m_owner->EffectiveViewportChanged(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged });
00819         }
00820
00821         if (const auto scrollPresenter2 = m_scroller.try_as<winrt::IScrollPresenter2>())
00822         {
00823             m_scrollPresenterScrollStartingRevoker = scrollPresenter2.ScrollStarting(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnScrollPresenterScrollStarting });
00824             m_scrollPresenterZoomStartingRevoker = scrollPresenter2.ZoomStarting(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnScrollPresenterZoomStarting });
00825         }
00826
00827         m_ensuredScroller = true;
00828     }
00829 }
00830
00831 // Returns True when m_visibleWindow changes and TryInvalidateMeasure is invoked.
00832 bool ViewportManagerWithPlatformFeatures::UpdateViewport(winrt::Rect const& effectiveViewport)
00833 {
00834 #ifdef DBG
00835     MUX_ASSERT(!m_managingViewportDisabled);
00836
00837     const auto previousVisibleWindowDbg = m_visibleWindow;
00838
00839     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
00840         L"Previous Effective Viewport:", previousVisibleWindowDbg.X, previousVisibleWindowDbg.Y, previousVisibleWindowDbg.Width, previousVisibleWindowDbg.Height);
00841     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
00842         L"Current Effective Viewport:", effectiveViewport.X, effectiveViewport.Y, effectiveViewport.Width, effectiveViewport.Height);
00843     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this, GetLayoutId().data(),
00844         L"Effective Viewport shift:", effectiveViewport.X - previousVisibleWindowDbg.X, effectiveViewport.Y - previousVisibleWindowDbg.Y, effectiveViewport.Width - previousVisibleWindowDbg.Width, effectiveViewport.Height - previousVisibleWindowDbg.Height);
00845 #endif // DBG
00846
00847     if (-effectiveViewport.X <= ItemsRepeater::ClearedElementsArrangePosition.X &&
00848         -effectiveViewport.Y <= ItemsRepeater::ClearedElementsArrangePosition.Y)
00849     {
00850         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"Viewport is invalid. Visible window cleared.");
00851
00852         // We got cleared.
00853         ResetVisibleWindow();
00854     }
00855     else
00856     {
00857         const float roundingTolerance = 0.01f;
00858
00859         if (std::abs(m_visibleWindow.X - effectiveViewport.X) > roundingTolerance ||
00860             std::abs(m_visibleWindow.Y - effectiveViewport.Y) > roundingTolerance ||
00861             std::abs(m_visibleWindow.Width - effectiveViewport.Width) > roundingTolerance ||
00862             std::abs(m_visibleWindow.Height - effectiveViewport.Height) > roundingTolerance)
00863         {
00864             SetVisibleWindow(effectiveViewport);
00865
00866             TryInvalidateMeasure();
00867             return true;
00868         }
00869     }
00870
00871     return false;
00872 }
00873
00874 void ViewportManagerWithPlatformFeatures::ResetLayoutRealizationWindowCacheBuffer()
00875 {
00876     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, GetLayoutId().data());
00877
00878     ResetCacheBuffer(false /*registerCacheBuildWork*/);
00879 }
00880
00881 void ViewportManagerWithPlatformFeatures::ResetCacheBuffer(bool registerCacheBuildWork)
00882 {
00883 #ifdef DBG
00884     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_INT, METH_NAME, this,
00885         GetLayoutId().data(), L"registerCacheBuildWork:", registerCacheBuildWork);
00886
00887     if (m_horizontalCacheBufferPerSide != 0.0)
00888     {
00889         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL, METH_NAME, this,
00890             GetLayoutId().data(), L"m_horizontalCacheBufferPerSide reset:", m_horizontalCacheBufferPerSide);
00891     }
00892     if (m_verticalCacheBufferPerSide != 0.0)
00893     {
00894         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL, METH_NAME, this,
00895             GetLayoutId().data(), L"m_verticalCacheBufferPerSide reset:", m_verticalCacheBufferPerSide);
00896     }
00897 #endif // DBG
00898
00899     m_horizontalCacheBufferPerSide = 0.0;
00900     m_verticalCacheBufferPerSide = 0.0;
00901
00902     if (!m_managingViewportDisabled && registerCacheBuildWork)
00903     {
00904         // We need to start building the realization buffer again.
00905         RegisterCacheBuildWork();
00906     }
00907 }
00908
00909 void ViewportManagerWithPlatformFeatures::ValidateCacheLength(double cacheLength)
00910 {
00911     if (cacheLength < 0.0 || std::isinf(cacheLength) || std::isnan(cacheLength))
00912     {
00913         throw winrt::hresult_invalid_argument(L"The maximum cache length must be equal or superior to zero.");
00914     }
00915 }
00916
00917 void ViewportManagerWithPlatformFeatures::RegisterPreparedElementsAsArranged()
00918 {
00919     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_preparedElements.size:", m_preparedElements.size());
00920
00921     if (m_preparedElements.size() == 0)
00922     {
00923         return;
00924     }
00925
00926     for (tracker_ref<winrt::UIElement> preparedElementTracker : m_preparedElements)
00927     {
00928         const winrt::UIElement preparedElement = preparedElementTracker.get();
00929
00930         const auto it = std::find_if(m_preparedAndArrangedElements.cbegin(), m_preparedAndArrangedElements.cend(),
00931             [&preparedElement](const tracker_ref<winrt::UIElement>& preparedAndArrangedElement) { return preparedAndArrangedElement.get() == preparedElement; });
00932
00933         if (it == m_preparedAndArrangedElements.cend())
00934         {
00935             m_preparedAndArrangedElements.push_back(tracker_ref<winrt::UIElement>{ m_owner, preparedElement });
00936         }
00937     }
00938
00939     m_preparedElements.clear();
00940 }
00941
00942 void ViewportManagerWithPlatformFeatures::RegisterPreparedAndArrangedElementsAsScrollAnchorCandidates()
00943 {
00944     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_preparedAndArrangedElements.size:", m_preparedAndArrangedElements.size());
00945
00946     if (m_preparedAndArrangedElements.size() == 0)
00947     {
00948         return;
00949     }
00950
00951     for (tracker_ref<winrt::UIElement> anchorCandidateTracker : m_preparedAndArrangedElements)
00952     {
00953         const winrt::UIElement anchorCandidate = anchorCandidateTracker.get();
00954
00955         if (!anchorCandidate.CanBeScrollAnchor())
00956         {
00957             const auto info = ItemsRepeater::GetVirtualizationInfo(anchorCandidate);
00958
00959             if (info->IsRealized() && info->IsHeldByLayout())
00960             {
00961                 anchorCandidate.CanBeScrollAnchor(true);
00962             }
00963         }
00964     }
00965
00966     m_preparedAndArrangedElements.clear();
00967 }
00968
00969 void ViewportManagerWithPlatformFeatures::RegisterCacheBuildWork()
00970 {
00971     MUX_ASSERT(!m_managingViewportDisabled);
00972
00973     if (!m_cacheBuildActionOutstanding)
00974     {
00975         // We capture 'owner' (a strong reference on ItemsRepeater) to make sure ItemsRepeater is still around
00976         // when the async action completes. By protecting ItemsRepeater, we also ensure that this instance
00977         // of ViewportManager (referenced by 'this' pointer) is valid because the lifetime of ItemsRepeater
00978         // and ViewportManager is the same (see ItemsRepeater::m_viewportManager).
00979         // We can't simply hold a strong reference on ViewportManager because it's not a COM object.
00980         auto strongOwner = m_owner->get_strong();
00981         m_cacheBuildActionOutstanding =
00982             m_owner->DispatcherQueue().TryEnqueue([this, strongOwner](auto&&...)
00983             {
00984                 OnCacheBuildActionCompleted();
00985             });
00986
00987         ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_STR_INT, METH_NAME, this,
00988             GetLayoutId().data(), L"m_cacheBuildActionOutstanding set:", m_cacheBuildActionOutstanding);
00989     }
00990 #ifdef DBG
00991     else
00992     {
00993         ITEMSREPEATER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this,
00994             GetLayoutId().data(), L"m_cacheBuildActionOutstanding already set.");
00995     }
00996 #endif // DBG
00997 }
00998
00999 void ViewportManagerWithPlatformFeatures::TryInvalidateMeasure()
01000 {
01001     // Don't invalidate measure if we have an invalid window.
01002     if (m_visibleWindow != winrt::Rect())
01003     {
01004         // We invalidate measure instead of just invalidating arrange because
01005         // we don't invalidate measure in UpdateViewport if the view is changing to
01006         // avoid layout cycles.
01007         ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, GetLayoutId().data(), L"Invalidating measure due to viewport change.");
01008
01009         m_owner->InvalidateMeasure();
01010     }
01011 }
01012
01013 void ViewportManagerWithPlatformFeatures::UnregisterScrollAnchorCandidates(winrt::UIElement const& exceptionElement, bool registerAsPreparedAndArrangedElements)
01014 {
01015     ITEMSREPEATER_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"registerAsPreparedAndArrangedElements:", registerAsPreparedAndArrangedElements);
01016
01017     for (const winrt::UIElement& child : m_owner->Children())
01018     {
01019         if (child.CanBeScrollAnchor() && child != exceptionElement)
01020         {
01021             child.CanBeScrollAnchor(false);
01022
01023             if (registerAsPreparedAndArrangedElements)
01024             {
01025                 m_preparedAndArrangedElements.push_back(tracker_ref<winrt::UIElement>{ m_owner, child });
01026             }
01027         }
01028     }
01029 }
01030
01031 winrt::hstring ViewportManagerWithPlatformFeatures::GetLayoutId() const
01032 {
01033     if (auto layout = m_owner->Layout())
01034     {
01035         return layout.as<Layout>()->LayoutId();
01036     }
01037
01038     return winrt::hstring{};
01039 }
01040
01041 #ifdef DBG
01042 void ViewportManagerWithPlatformFeatures::TraceFieldsDbg()
01043 {
01044     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
01045         GetLayoutId().data(), L"m_expectedViewportShift:", m_expectedViewportShift.X, m_expectedViewportShift.Y);
01046     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
01047         GetLayoutId().data(), L"m_pendingViewportShift:", m_pendingViewportShift.X, m_pendingViewportShift.Y);
01048     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
01049         GetLayoutId().data(), L"m_unshiftableShift:", m_unshiftableShift.X, m_unshiftableShift.Y);
01050     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
01051         GetLayoutId().data(), L"m_visibleWindow:", m_visibleWindow.X, m_visibleWindow.Y, m_visibleWindow.Width, m_visibleWindow.Height);
01052     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
01053         GetLayoutId().data(), L"m_lastLayoutRealizationWindow:", m_lastLayoutRealizationWindow.X, m_lastLayoutRealizationWindow.Y, m_lastLayoutRealizationWindow.Width, m_lastLayoutRealizationWindow.Height);
01054     ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT, METH_NAME, this,
01055         GetLayoutId().data(), L"m_layoutExtent:", m_layoutExtent.X, m_layoutExtent.Y, m_layoutExtent.Width, m_layoutExtent.Height);
01056 }
01057
01058 void ViewportManagerWithPlatformFeatures::TraceScrollerDbg()
01059 {
01060     if (const auto scrollViewerDbg = m_scroller.try_as<winrt::Controls::IScrollViewer>())
01061     {
01062         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL_DBL, METH_NAME, this,
01063             GetLayoutId().data(), L"ScrollViewer Offsets:", scrollViewerDbg.HorizontalOffset(), scrollViewerDbg.VerticalOffset());
01064
01065         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL_DBL, METH_NAME, this,
01066             GetLayoutId().data(), L"ScrollViewer Scrollable Sizes:", scrollViewerDbg.ScrollableWidth(), scrollViewerDbg.ScrollableHeight());
01067     }
01068     else if (const auto scrollPresenterDbg = m_scroller.try_as<winrt::Controls::Primitives::IScrollPresenter>())
01069     {
01070         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL_DBL, METH_NAME, this,
01071             GetLayoutId().data(), L"ScrollPresenter Offsets:", scrollPresenterDbg.HorizontalOffset(), scrollPresenterDbg.VerticalOffset());
01072
01073         ITEMSREPEATER_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_STR_DBL_DBL, METH_NAME, this,
01074             GetLayoutId().data(), L"ScrollPresenter Scrollable Sizes:", scrollPresenterDbg.ScrollableWidth(), scrollPresenterDbg.ScrollableHeight());
01075     }
01076 }
01077 #endif // DBG
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/AnimatedVisuals/AnimatedChevronRightDownSmallVisualSource.h Source File

  • File List
  • File Members
  • AnimatedIcon
  • AnimatedVisuals

AnimatedChevronRightDownSmallVisualSource.h

Go to the documentation of this file.
00001 ﻿#pragma once
00002 //------------------------------------------------------------------------------
00003 // <auto-generated>
00004 //     This code was generated by a tool.
00005 //
00006 //       LottieGen version:
00007 //           7.1.0+ge1fa92580f
00008 //
00009 //       Command:
00010 //           LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFile AnimatedChevronRightDownSmallVisualSource.json
00011 //
00012 //       Input file:
00013 //           AnimatedChevronRightDownSmallVisualSource.json (27906 bytes created 23:37-07:00 Oct 5 2021)
00014 //
00015 //       LottieGen source:
00016 //           http://aka.ms/Lottie
00017 //
00018 //     Changes to this file may cause incorrect behavior and will be lost if
00019 //     the code is regenerated.
00020 // </auto-generated>
00021 //------------------------------------------------------------------------------
00022 #include "common.h"
00023 #include "AnimatedVisuals\AnimatedChevronRightDownSmallVisualSource.g.h"
00024
00025
00026 // Name:        Controls_08_SideChevron_TreeViewExpand
00027 // Frame rate:  60 fps
00028 // Frame count: 220
00029 // Duration:    3666.7 mS
00030 // ________________________________________________________________________________________________________________
00031 // |               Marker                |               Constant                | Frame |   mS   |   Progress    |
00032 // |_____________________________________|_______________________________________|_______|________|_______________|
00033 // | NormalOnToNormalOff_Start           | M_NormalOnToNormalOff_Start           |     0 |    0.0 | 0.0F          |
00034 // | NormalOnToNormalOff_End             | M_NormalOnToNormalOff_End             |     9 |  150.0 | 0.0411363654F |
00035 // | NormalOnToPointerOverOn_Start       | M_NormalOnToPointerOverOn_Start       |    10 |  166.7 | 0.0456818193F |
00036 // | NormalOnToPointerOverOn_End         | M_NormalOnToPointerOverOn_End         |    19 |  316.7 | 0.0865909085F |
00037 // | NormalOnToPressedOn_Start           | M_NormalOnToPressedOn_Start           |    20 |  333.3 | 0.0911363661F |
00038 // | NormalOnToPressedOn_End             | M_NormalOnToPressedOn_End             |    29 |  483.3 | 0.132045448F  |
00039 // | NormalOffToNormalOn_Start           | M_NormalOffToNormalOn_Start           |    30 |  500.0 | 0.136590913F  |
00040 // | NormalOffToNormalOn_End             | M_NormalOffToNormalOn_End             |    59 |  983.3 | 0.268409103F  |
00041 // | NormalOffToPointerOverOff_Start     | M_NormalOffToPointerOverOff_Start     |    60 | 1000.0 | 0.272954553F  |
00042 // | NormalOffToPointerOverOff_End       | M_NormalOffToPointerOverOff_End       |    69 | 1150.0 | 0.313863635F  |
00043 // | NormalOffToPressedOff_Start         | M_NormalOffToPressedOff_Start         |    70 | 1166.7 | 0.318409085F  |
00044 // | NormalOffToPressedOff_End           | M_NormalOffToPressedOff_End           |    79 | 1316.7 | 0.359318167F  |
00045 // | PointerOverOnToPointerOverOff_Start | M_PointerOverOnToPointerOverOff_Start |    80 | 1333.3 | 0.363863647F  |
00046 // | PointerOverOnToPointerOverOff_End   | M_PointerOverOnToPointerOverOff_End   |    89 | 1483.3 | 0.404772729F  |
00047 // | PointerOverOnToNormalOn_Start       | M_PointerOverOnToNormalOn_Start       |    90 | 1500.0 | 0.409318179F  |
00048 // | PointerOverOnToNormalOn_End         | M_PointerOverOnToNormalOn_End         |    99 | 1650.0 | 0.450227261F  |
00049 // | PointerOverOnToPressedOn_Start      | M_PointerOverOnToPressedOn_Start      |   100 | 1666.7 | 0.454772741F  |
00050 // | PointerOverOnToPressedOn_End        | M_PointerOverOnToPressedOn_End        |   109 | 1816.7 | 0.495681822F  |
00051 // | PointerOverOffToPointerOverOn_Start | M_PointerOverOffToPointerOverOn_Start |   110 | 1833.3 | 0.500227273F  |
00052 // | PointerOverOffToPointerOverOn_End   | M_PointerOverOffToPointerOverOn_End   |   119 | 1983.3 | 0.541136384F  |
00053 // | PointerOverOffToNormalOff_Start     | M_PointerOverOffToNormalOff_Start     |   120 | 2000.0 | 0.545681834F  |
00054 // | PointerOverOffToNormalOff_End       | M_PointerOverOffToNormalOff_End       |   129 | 2150.0 | 0.586590886F  |
00055 // | PointerOverOffToPressedOff_Start    | M_PointerOverOffToPressedOff_Start    |   130 | 2166.7 | 0.591136336F  |
00056 // | PointerOverOffToPressedOff_End      | M_PointerOverOffToPressedOff_End      |   139 | 2316.7 | 0.632045448F  |
00057 // | PressedOnToPressedOff_Start         | M_PressedOnToPressedOff_Start         |   140 | 2333.3 | 0.636590898F  |
00058 // | PressedOnToPressedOff_End           | M_PressedOnToPressedOff_End           |   149 | 2483.3 | 0.67750001F   |
00059 // | PressedOnToPointerOverOff_Start     | M_PressedOnToPointerOverOff_Start     |   150 | 2500.0 | 0.68204546F   |
00060 // | PressedOnToPointerOverOff_End       | M_PressedOnToPointerOverOff_End       |   159 | 2650.0 | 0.722954571F  |
00061 // | PressedOnToNormalOff_Start          | M_PressedOnToNormalOff_Start          |   160 | 2666.7 | 0.727500021F  |
00062 // | PressedOnToNormalOff_End            | M_PressedOnToNormalOff_End            |   169 | 2816.7 | 0.768409073F  |
00063 // | PressedOffToPressedOn_Start         | M_PressedOffToPressedOn_Start         |   170 | 2833.3 | 0.772954524F  |
00064 // | PressedOffToPressedOn_End           | M_PressedOffToPressedOn_End           |   179 | 2983.3 | 0.813863635F  |
00065 // | PressedOffToPointerOverOn_Start     | M_PressedOffToPointerOverOn_Start     |   180 | 3000.0 | 0.818409085F  |
00066 // | PressedOffToPointerOverOn_End       | M_PressedOffToPointerOverOn_End       |   199 | 3316.7 | 0.904772699F  |
00067 // | PressedOffToNormalOn_Start          | M_PressedOffToNormalOn_Start          |   200 | 3333.3 | 0.909318209F  |
00068 // | PressedOffToNormalOn_End            | M_PressedOffToNormalOn_End            |   219 | 3650.0 | 0.995681822F  |
00069 // ----------------------------------------------------------------------------------------------------------------
00070 // _______________________________________________________
00071 // | Theme property |  Accessor  | Type  | Default value |
00072 // |________________|____________|_______|_______________|
00073 // | Foreground     | Foreground | Color |   #FF060808   |
00074 // -------------------------------------------------------
00075 class AnimatedChevronRightDownSmallVisualSource
00076     : public winrt::implementation::AnimatedChevronRightDownSmallVisualSourceT<AnimatedChevronRightDownSmallVisualSource>
00077 {
00078     winrt::Microsoft::UI::Composition::CompositionPropertySet _themeProperties{ nullptr };
00079     winrt::Windows::UI::Color _themeForeground{ 0xFF, 0x06, 0x08, 0x08 };
00080     winrt::Microsoft::UI::Composition::CompositionPropertySet EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor);
00081
00082     static winrt::Windows::Foundation::Numerics::float4 ColorAsVector4(winrt::Windows::UI::Color color);
00083 public:
00084     // Animation duration: 3.667 seconds.
00085     static constexpr int64_t c_durationTicks{ 36666666L };
00086
00087     // Marker: NormalOnToNormalOff_Start.
00088     static constexpr float M_NormalOnToNormalOff_Start{ 0.0F };
00089
00090     // Marker: NormalOnToNormalOff_End.
00091     static constexpr float M_NormalOnToNormalOff_End{ 0.0411363654F };
00092
00093     // Marker: NormalOnToPointerOverOn_Start.
00094     static constexpr float M_NormalOnToPointerOverOn_Start{ 0.0456818193F };
00095
00096     // Marker: NormalOnToPointerOverOn_End.
00097     static constexpr float M_NormalOnToPointerOverOn_End{ 0.0865909085F };
00098
00099     // Marker: NormalOnToPressedOn_Start.
00100     static constexpr float M_NormalOnToPressedOn_Start{ 0.0911363661F };
00101
00102     // Marker: NormalOnToPressedOn_End.
00103     static constexpr float M_NormalOnToPressedOn_End{ 0.132045448F };
00104
00105     // Marker: NormalOffToNormalOn_Start.
00106     static constexpr float M_NormalOffToNormalOn_Start{ 0.136590913F };
00107
00108     // Marker: NormalOffToNormalOn_End.
00109     static constexpr float M_NormalOffToNormalOn_End{ 0.268409103F };
00110
00111     // Marker: NormalOffToPointerOverOff_Start.
00112     static constexpr float M_NormalOffToPointerOverOff_Start{ 0.272954553F };
00113
00114     // Marker: NormalOffToPointerOverOff_End.
00115     static constexpr float M_NormalOffToPointerOverOff_End{ 0.313863635F };
00116
00117     // Marker: NormalOffToPressedOff_Start.
00118     static constexpr float M_NormalOffToPressedOff_Start{ 0.318409085F };
00119
00120     // Marker: NormalOffToPressedOff_End.
00121     static constexpr float M_NormalOffToPressedOff_End{ 0.359318167F };
00122
00123     // Marker: PointerOverOnToPointerOverOff_Start.
00124     static constexpr float M_PointerOverOnToPointerOverOff_Start{ 0.363863647F };
00125
00126     // Marker: PointerOverOnToPointerOverOff_End.
00127     static constexpr float M_PointerOverOnToPointerOverOff_End{ 0.404772729F };
00128
00129     // Marker: PointerOverOnToNormalOn_Start.
00130     static constexpr float M_PointerOverOnToNormalOn_Start{ 0.409318179F };
00131
00132     // Marker: PointerOverOnToNormalOn_End.
00133     static constexpr float M_PointerOverOnToNormalOn_End{ 0.450227261F };
00134
00135     // Marker: PointerOverOnToPressedOn_Start.
00136     static constexpr float M_PointerOverOnToPressedOn_Start{ 0.454772741F };
00137
00138     // Marker: PointerOverOnToPressedOn_End.
00139     static constexpr float M_PointerOverOnToPressedOn_End{ 0.495681822F };
00140
00141     // Marker: PointerOverOffToPointerOverOn_Start.
00142     static constexpr float M_PointerOverOffToPointerOverOn_Start{ 0.500227273F };
00143
00144     // Marker: PointerOverOffToPointerOverOn_End.
00145     static constexpr float M_PointerOverOffToPointerOverOn_End{ 0.541136384F };
00146
00147     // Marker: PointerOverOffToNormalOff_Start.
00148     static constexpr float M_PointerOverOffToNormalOff_Start{ 0.545681834F };
00149
00150     // Marker: PointerOverOffToNormalOff_End.
00151     static constexpr float M_PointerOverOffToNormalOff_End{ 0.586590886F };
00152
00153     // Marker: PointerOverOffToPressedOff_Start.
00154     static constexpr float M_PointerOverOffToPressedOff_Start{ 0.591136336F };
00155
00156     // Marker: PointerOverOffToPressedOff_End.
00157     static constexpr float M_PointerOverOffToPressedOff_End{ 0.632045448F };
00158
00159     // Marker: PressedOnToPressedOff_Start.
00160     static constexpr float M_PressedOnToPressedOff_Start{ 0.636590898F };
00161
00162     // Marker: PressedOnToPressedOff_End.
00163     static constexpr float M_PressedOnToPressedOff_End{ 0.67750001F };
00164
00165     // Marker: PressedOnToPointerOverOff_Start.
00166     static constexpr float M_PressedOnToPointerOverOff_Start{ 0.68204546F };
00167
00168     // Marker: PressedOnToPointerOverOff_End.
00169     static constexpr float M_PressedOnToPointerOverOff_End{ 0.722954571F };
00170
00171     // Marker: PressedOnToNormalOff_Start.
00172     static constexpr float M_PressedOnToNormalOff_Start{ 0.727500021F };
00173
00174     // Marker: PressedOnToNormalOff_End.
00175     static constexpr float M_PressedOnToNormalOff_End{ 0.768409073F };
00176
00177     // Marker: PressedOffToPressedOn_Start.
00178     static constexpr float M_PressedOffToPressedOn_Start{ 0.772954524F };
00179
00180     // Marker: PressedOffToPressedOn_End.
00181     static constexpr float M_PressedOffToPressedOn_End{ 0.813863635F };
00182
00183     // Marker: PressedOffToPointerOverOn_Start.
00184     static constexpr float M_PressedOffToPointerOverOn_Start{ 0.818409085F };
00185
00186     // Marker: PressedOffToPointerOverOn_End.
00187     static constexpr float M_PressedOffToPointerOverOn_End{ 0.904772699F };
00188
00189     // Marker: PressedOffToNormalOn_Start.
00190     static constexpr float M_PressedOffToNormalOn_Start{ 0.909318209F };
00191
00192     // Marker: PressedOffToNormalOn_End.
00193     static constexpr float M_PressedOffToNormalOn_End{ 0.995681822F };
00194
00195     // Theme property: Foreground.
00196     static inline const winrt::Windows::UI::Color c_themeForeground{ 0xFF, 0x06, 0x08, 0x08 };
00197
00198
00199     winrt::Windows::UI::Color Foreground();
00200     void Foreground(winrt::Windows::UI::Color value);
00201
00202     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00203         winrt::Microsoft::UI::Composition::Compositor const& compositor);
00204
00205     winrt::Microsoft::UI::Xaml::Controls::IAnimatedVisual TryCreateAnimatedVisual(
00206         winrt::Microsoft::UI::Composition::Compositor const& compositor,
00207         winrt::Windows::Foundation::IInspectable& diagnostics);
00208
00209     // Gets the number of frames in the animation.
00210     double FrameCount();
00211
00212     // Gets the framerate of the animation.
00213     double Framerate();
00214
00215     // Gets the duration of the animation.
00216     winrt::Windows::Foundation::TimeSpan Duration();
00217
00218     // Converts a zero-based frame number to the corresponding progress value denoting the
00219     // start of the frame.
00220     double FrameToProgress(double frameNumber);
00221
00222     // Returns a map from marker names to corresponding progress values.
00223     winrt::Windows::Foundation::Collections::IMapView<hstring, double> Markers();
00224
00225     // Sets the color property with the given name, or does nothing if no such property
00226     // exists.
00227     void SetColorProperty(hstring const& propertyName, winrt::Windows::UI::Color value);
00228
00229     // Sets the scalar property with the given name, or does nothing if no such property
00230     // exists.
00231     void SetScalarProperty(hstring const& propertyName, double value);
00232 };
Generated on Sun Dec 1 2024 20:51:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IColorMatrixEffect Member List

This is the complete list of members for IColorMatrixEffect, including all inherited members.
AlphaMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode *value) | IColorMatrixEffect
AlphaMode([in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value) | IColorMatrixEffect
ClampOutput([out, retval] boolean *value) | IColorMatrixEffect
ClampOutput([in] boolean value) | IColorMatrixEffect
ColorMatrix([out, retval] Matrix5x4 *value) | IColorMatrixEffect
ColorMatrix([in] Matrix5x4 value) | IColorMatrixEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IColorMatrixEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IColorMatrixEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

DisplayRegionHelperTestApi Member List

This is the complete list of members for DisplayRegionHelperTestApi, including all inherited members.
SimulateDisplayRegions() | DisplayRegionHelperTestApi | [static]
SimulateDisplayRegions(bool value) | DisplayRegionHelperTestApi | [static]
SimulateMode() | DisplayRegionHelperTestApi | [static]
SimulateMode(winrt::TwoPaneViewMode const &value) | DisplayRegionHelperTestApi | [static]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayoutItemAspectRatios.cpp Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayoutItemAspectRatios.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "LinedFlowLayoutItemAspectRatios.h"
00007
00008 // Returns True when there is at least one stored ratio in the provided index range,
00009 // with a strictly positive weight lower than the provided number.
00010 bool LinedFlowLayoutItemAspectRatios::HasLowerWeight(
00011     int firstItemIndex,
00012     int lastItemIndex,
00013     int weight) const
00014 {
00015     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00016     {
00017         if (itemAspectRatioBlock->HasLowerWeight(firstItemIndex, lastItemIndex, weight))
00018         {
00019             LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstItemIndex", firstItemIndex);
00020             LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastItemIndex", lastItemIndex);
00021             LINEDFLOWLAYOUT_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"returns True");
00022
00023             return true;
00024         }
00025     }
00026
00027     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstItemIndex", firstItemIndex);
00028     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastItemIndex", lastItemIndex);
00029     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, L"returns False");
00030
00031     return false;
00032 }
00033
00034 // Returns False when at least one aspect ratio is being tracked.
00035 bool LinedFlowLayoutItemAspectRatios::IsEmpty() const
00036 {
00037     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00038     {
00039         if (itemAspectRatioBlock->StartIndex() != -1)
00040         {
00041             // StartIndex() != -1 indicates that this block tracks at least one aspect ratio.
00042             return false;
00043         }
00044     }
00045
00046     return true;
00047 }
00048
00049 // Returns the average of the weighted aspect ratios. Items outside the provided index range must
00050 // have a weight equal to the provided number to be included.
00051 float LinedFlowLayoutItemAspectRatios::GetAverageAspectRatio(
00052     int firstItemIndex,
00053     int lastItemIndex,
00054     int weight) const
00055 {
00056     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"firstItemIndex", firstItemIndex);
00057     LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"lastItemIndex", lastItemIndex);
00058
00059     MUX_ASSERT(!IsEmpty());
00060
00061     float totalAspectRatios{ 0.0f };
00062     int totalWeights{ 0 };
00063
00064     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00065     {
00066         const ItemAspectRatio itemAspectRatioBlockTotals = itemAspectRatioBlock->GetTotals(firstItemIndex, lastItemIndex, weight);
00067
00068         totalAspectRatios += itemAspectRatioBlockTotals.m_aspectRatio;
00069         totalWeights += itemAspectRatioBlockTotals.m_weight;
00070     }
00071
00072     if (totalAspectRatios > 0.0f && totalWeights > 0)
00073     {
00074         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"totalAspectRatios", totalAspectRatios);
00075         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"totalWeights", totalWeights);
00076         LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"returned value", totalAspectRatios / totalWeights);
00077
00078         return totalAspectRatios / totalWeights;
00079     }
00080
00081     return 0.0f;
00082 }
00083
00084 // Returns the ItemAspectRatio stored for the provided item index, or s_emptyItemAspectRatio
00085 // when no storage was done for that index.
00086 LinedFlowLayoutItemAspectRatios::ItemAspectRatio LinedFlowLayoutItemAspectRatios::GetAt(
00087     int itemIndex) const
00088 {
00089     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00090     {
00091         if (itemAspectRatioBlock->IncludesItemIndex(itemIndex))
00092         {
00093             return itemAspectRatioBlock->GetAt(itemIndex);
00094         }
00095     }
00096
00097     return s_emptyItemAspectRatio;
00098 }
00099
00100 // Stores the ItemAspectRatio for the specified index.
00101 void LinedFlowLayoutItemAspectRatios::SetAt(int itemIndex, ItemAspectRatio itemAspectRatio)
00102 {
00103     // Look through the existing blocks to see if one already covers the provided index.
00104     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00105     {
00106         if (itemAspectRatioBlock->IncludesItemIndex(itemIndex))
00107         {
00108             // Found a match for the provided index. Use that existing block to store the ItemAspectRatio.
00109             itemAspectRatioBlock->SetAt(itemIndex, itemAspectRatio);
00110             return;
00111         }
00112     }
00113
00114     // Get a block to store the ItemAspectRatio. GetEmptyOrFurthestBlock either returns a still empty block or the furthest away block from itemIndex.
00115     std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlockToReuse = GetEmptyOrFurthestBlock(itemIndex);
00116
00117     MUX_ASSERT(itemAspectRatioBlockToReuse != nullptr);
00118
00119     if (itemAspectRatioBlockToReuse->StartIndex() != -1)
00120     {
00121         // Clear the furthest block from itemIndex.
00122         itemAspectRatioBlockToReuse->Clear();
00123     }
00124
00125     // Use it to store the provided ItemAspectRatio.
00126     // Blocks are such that m_startIndex has to be a multiple of c_blockSize: 0, 64, 128, etc... to avoid having two blocks covering the same item index.
00127     itemAspectRatioBlockToReuse->StartIndex((itemIndex / ItemAspectRatioBlock::BlockSize()) * ItemAspectRatioBlock::BlockSize());
00128     itemAspectRatioBlockToReuse->SetAt(itemIndex, itemAspectRatio);
00129 }
00130
00131 // Keeps 4 cleared blocks at most for future use and deletes all the others.
00132 void LinedFlowLayoutItemAspectRatios::Clear()
00133 {
00134     const int c_minBlockCount{ 4 };
00135
00136     // Keep at most c_minBlockCount ItemAspectRatioBlock instances allocated for future use, to avoid reallocations.
00137     while (m_itemAspectRatioBlocks.size() > c_minBlockCount)
00138     {
00139         m_itemAspectRatioBlocks.erase(m_itemAspectRatioBlocks.begin());
00140     }
00141
00142     // Each remaining ItemAspectRatioBlock is cleared for future reuse.
00143     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00144     {
00145         itemAspectRatioBlock->Clear();
00146     }
00147
00148     MUX_ASSERT(IsEmpty());
00149 }
00150
00151 // Allocates enough blocks to store 'size' ItemAspectRatio instances. When the required number of blocks
00152 // is smaller than the already existing ones, the furthest away block(s) from 'referenceItemIndex' are deleted.
00153 void LinedFlowLayoutItemAspectRatios::Resize(
00154     int size,
00155     int referenceItemIndex)
00156 {
00157     LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_INT_INT, METH_NAME, this, size, referenceItemIndex);
00158
00159     MUX_ASSERT(size >= 1);
00160     MUX_ASSERT(referenceItemIndex >= 0);
00161
00162     const int requiredBlocks = static_cast<int>(std::ceil(static_cast<double>(size) / ItemAspectRatioBlock::BlockSize()));
00163     const int existingBlocks = static_cast<int>(m_itemAspectRatioBlocks.size());
00164
00165     if (requiredBlocks == existingBlocks)
00166     {
00167         return;
00168     }
00169
00170     LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"size", size);
00171     LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"referenceItemIndex", referenceItemIndex);
00172     LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"requiredBlocks", requiredBlocks);
00173     LINEDFLOWLAYOUT_TRACE_INFO(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"existingBlocks", existingBlocks);
00174
00175     if (requiredBlocks > existingBlocks)
00176     {
00177         for (int block = existingBlocks + 1; block <= requiredBlocks; block++)
00178         {
00179             std::shared_ptr<ItemAspectRatioBlock> newItemAspectRatioBlock =
00180                 std::make_shared<ItemAspectRatioBlock>();
00181
00182             m_itemAspectRatioBlocks.insert(newItemAspectRatioBlock);
00183         }
00184     }
00185     else
00186     {
00187         for (int block = requiredBlocks; block < existingBlocks; block++)
00188         {
00189             std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlockToRemove = GetEmptyOrFurthestBlock(referenceItemIndex);
00190
00191             MUX_ASSERT(itemAspectRatioBlockToRemove != nullptr);
00192
00193             m_itemAspectRatioBlocks.erase(itemAspectRatioBlockToRemove);
00194         }
00195     }
00196
00197     MUX_ASSERT(requiredBlocks == static_cast<int>(m_itemAspectRatioBlocks.size()));
00198 }
00199
00200 // Returns an empty block if one still exists, or else the furthest block away from 'fromItemIndex'.
00201 std::shared_ptr<LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock> LinedFlowLayoutItemAspectRatios::GetEmptyOrFurthestBlock(
00202     int fromItemIndex)
00203 {
00204     std::shared_ptr<ItemAspectRatioBlock> furthestItemAspectRatioBlock{ nullptr };
00205
00206     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00207     {
00208         if (itemAspectRatioBlock->StartIndex() == -1)
00209         {
00210             return itemAspectRatioBlock;
00211         }
00212         else if (furthestItemAspectRatioBlock == nullptr ||
00213             std::abs((furthestItemAspectRatioBlock->StartIndex() + furthestItemAspectRatioBlock->EndIndex()) / 2 - fromItemIndex) < std::abs((itemAspectRatioBlock->StartIndex() + itemAspectRatioBlock->EndIndex()) / 2 - fromItemIndex))
00214         {
00215             furthestItemAspectRatioBlock = itemAspectRatioBlock;
00216         }
00217     }
00218
00219     return furthestItemAspectRatioBlock;
00220 }
00221
00222 // Returns True when there is at least one stored ratio in the block, within the provided
00223 // index range, with a strictly positive weight lower than the provided number.
00224 bool LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock::HasLowerWeight(
00225     int firstItemIndex,
00226     int lastItemIndex,
00227     int weight) const
00228 {
00229     if (m_startIndex == -1)
00230     {
00231         return false;
00232     }
00233
00234     for (int itemAspectRatioIndex = 0; itemAspectRatioIndex < c_blockSize; itemAspectRatioIndex++)
00235     {
00236         const int currentWeight = m_aspectRatios[itemAspectRatioIndex].m_weight;
00237         const int currentIndex = m_startIndex + itemAspectRatioIndex;
00238
00239         if (currentWeight > 0 && currentWeight < weight &&
00240             currentIndex >= firstItemIndex && currentIndex <= lastItemIndex)
00241         {
00242             return true;
00243         }
00244     }
00245
00246     return false;
00247 }
00248
00249 bool LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock::IncludesItemIndex(
00250     int itemIndex) const
00251 {
00252     return StartIndex() <= itemIndex && EndIndex() >= itemIndex;
00253 }
00254
00255 // Returns an ItemAspectRatio for which the ratio is the total of the block's weighted ratios, and the weight is the total of
00256 // the block's weights. Items outside the provided index range must have a weight equal to the provided number to be included.
00257 LinedFlowLayoutItemAspectRatios::ItemAspectRatio LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock::GetTotals(
00258     int firstItemIndex,
00259     int lastItemIndex,
00260     int weight) const
00261 {
00262     if (m_startIndex == -1)
00263     {
00264         return LinedFlowLayoutItemAspectRatios::s_emptyItemAspectRatio;
00265     }
00266
00267     float totalAspectRatios{ 0.0f };
00268     int totalWeights{ 0 };
00269
00270     for (int itemAspectRatioIndex = 0; itemAspectRatioIndex < c_blockSize; itemAspectRatioIndex++)
00271     {
00272         const int currentWeight = m_aspectRatios[itemAspectRatioIndex].m_weight;
00273         const int currentIndex = m_startIndex + itemAspectRatioIndex;
00274
00275         if (currentWeight == weight || (currentIndex >= firstItemIndex && currentIndex <= lastItemIndex))
00276         {
00277             LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex included", currentIndex);
00278             LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"weight included", currentWeight);
00279             LINEDFLOWLAYOUT_TRACE_VERBOSE_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"aspect ratio included", m_aspectRatios[itemAspectRatioIndex].m_aspectRatio);
00280
00281             totalAspectRatios += m_aspectRatios[itemAspectRatioIndex].m_aspectRatio * currentWeight;
00282             totalWeights += currentWeight;
00283         }
00284 #ifdef DBG
00285         else if (currentWeight != 0)
00286         {
00287             LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex excluded", currentIndex);
00288             LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"weight excluded", currentWeight);
00289             LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"aspect ratio excluded", m_aspectRatios[itemAspectRatioIndex].m_aspectRatio);
00290         }
00291 #endif
00292     }
00293
00294     return { totalAspectRatios, totalWeights };
00295 }
00296
00297 // Returns the ItemAspectRatio stored in this block for the provided item index.
00298 LinedFlowLayoutItemAspectRatios::ItemAspectRatio LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock::GetAt(
00299     int itemIndex) const
00300 {
00301     MUX_ASSERT(m_startIndex >= 0);
00302     MUX_ASSERT(itemIndex >= m_startIndex);
00303     MUX_ASSERT(itemIndex <= m_startIndex + c_blockSize - 1);
00304
00305     return m_aspectRatios[itemIndex - m_startIndex];
00306 }
00307
00308 // Sets the ItemAspectRatio in this block for the provided item index.
00309 void LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock::SetAt(int itemIndex, ItemAspectRatio itemAspectRatio)
00310 {
00311     MUX_ASSERT(m_startIndex >= 0);
00312     MUX_ASSERT(itemIndex >= m_startIndex);
00313     MUX_ASSERT(itemIndex <= m_startIndex + c_blockSize - 1);
00314
00315     m_aspectRatios[itemIndex - m_startIndex].m_aspectRatio = itemAspectRatio.m_aspectRatio;
00316     m_aspectRatios[itemIndex - m_startIndex].m_weight = itemAspectRatio.m_weight;
00317 }
00318
00319 // Clears the block for future reuse.
00320 void LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock::Clear()
00321 {
00322     m_startIndex = -1;
00323
00324     for (int itemAspectRatioIndex = 0; itemAspectRatioIndex < c_blockSize; itemAspectRatioIndex++)
00325     {
00326         m_aspectRatios[itemAspectRatioIndex].m_aspectRatio = 0.0f;
00327         m_aspectRatios[itemAspectRatioIndex].m_weight = 0;
00328     }
00329 }
00330
00331 #ifdef DBG
00332 void LinedFlowLayoutItemAspectRatios::LogItemAspectRatiosDbg()
00333 {
00334     LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"Block count", m_itemAspectRatioBlocks.size());
00335
00336     for (std::shared_ptr<ItemAspectRatioBlock> itemAspectRatioBlock : m_itemAspectRatioBlocks)
00337     {
00338         itemAspectRatioBlock->LogItemAspectRatioBlockDbg();
00339     }
00340 }
00341
00342 void LinedFlowLayoutItemAspectRatios::ItemAspectRatioBlock::LogItemAspectRatioBlockDbg()
00343 {
00344     LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"m_startIndex", m_startIndex);
00345
00346     for (int itemAspectRatioIndex = 0; itemAspectRatioIndex < c_blockSize; itemAspectRatioIndex++)
00347     {
00348         const float aspectRatio = m_aspectRatios[itemAspectRatioIndex].m_aspectRatio;
00349         const int weight = m_aspectRatios[itemAspectRatioIndex].m_weight;
00350
00351         MUX_ASSERT(!(m_startIndex == -1 && aspectRatio != 0.0f));
00352         MUX_ASSERT(!(m_startIndex == -1 && weight != 0));
00353
00354         if (weight != 0)
00355         {
00356             LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"itemIndex", m_startIndex + itemAspectRatioIndex);
00357             LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, L"aspectRatio", aspectRatio);
00358             LINEDFLOWLAYOUT_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, L"weight", weight);
00359         }
00360     }
00361 }
00362 #endif
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ElementFactory.h Source File

  • File List
  • File Members
  • Repeater

ElementFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ElementFactory.g.h"
00007
00008 class ElementFactory :
00009     public winrt::implementation::ElementFactoryT<ElementFactory>
00010 {
00011 public:
00012 #pragma region IElementFactory
00013     winrt::UIElement GetElement(winrt::ElementFactoryGetArgs const& args);
00014     void RecycleElement(winrt::ElementFactoryRecycleArgs const& args);
00015 #pragma endregion
00016
00017 #pragma region IElementFactoryOverrides
00018     virtual winrt::UIElement GetElementCore(winrt::ElementFactoryGetArgs const& args);
00019     virtual void RecycleElementCore(winrt::ElementFactoryRecycleArgs const& args);
00020 #pragma endregion
00021
00022     // TODO: Bug 14901501: Figure out a better way to have reference tracking for types doing in-component derivation (e.g. RecyclingElementFactory : ElementFactory)
00023     virtual int32_t __stdcall NonDelegatingQueryInterface(const winrt::guid& id, void** object)
00024     {
00025         return __super::NonDelegatingQueryInterface(id, object);
00026     }
00027
00028     virtual unsigned long __stdcall NonDelegatingAddRef()
00029     {
00030         return __super::NonDelegatingAddRef();
00031     }
00032
00033     virtual unsigned long __stdcall NonDelegatingRelease()
00034     {
00035         return __super::NonDelegatingRelease();
00036     }
00037
00038 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/EffectiveViewportScrollViewerTests.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests

EffectiveViewportScrollViewerTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using System.Linq;
00007 using Windows.Foundation;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using System.Threading;
00011 using System.Collections.Generic;
00012 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks;
00013 using System.Numerics;
00014 using Common;
00015 using System.Collections.ObjectModel;
00016 using Microsoft.UI.Xaml.Media;
00017 using Windows.UI;
00018 using System.Runtime.InteropServices.WindowsRuntime;
00019 using Microsoft.UI.Xaml.Markup;
00020 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00021
00022 using WEX.TestExecution;
00023 using WEX.TestExecution.Markup;
00024 using WEX.Logging.Interop;
00025
00026 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests
00027 {
00028     [TestClass]
00029     public class EffectiveViewportTests : ApiTestBase
00030     {
00031         [TestMethod]
00032         public void ValidateBasicScrollViewerScenario()
00033         {
00034             var realizationRects = new List<Rect>();
00035             var viewChangeCompletedEvent = new AutoResetEvent(false);
00036             ScrollViewer scrollViewer = null;
00037             ManualResetEvent viewChanged = new ManualResetEvent(false);
00038             ManualResetEvent layoutMeasured = new ManualResetEvent(false);
00039
00040             RunOnUIThread.Execute(() =>
00041             {
00042                 var repeater = new ItemsRepeater() {
00043                     Layout = GetMonitoringLayout(new Size(500, 600), realizationRects, layoutMeasured),
00044                     HorizontalCacheLength = 0.0,
00045                     VerticalCacheLength = 0.0
00046                 };
00047
00048                 scrollViewer = new ScrollViewer {
00049                     Content = repeater,
00050                     Width = 200,
00051                     Height = 300,
00052                     HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden,
00053                     VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
00054                 };
00055
00056                 scrollViewer.ViewChanged += (sender, args) =>
00057                 {
00058                     if (!args.IsIntermediate)
00059                     {
00060                         Log.Comment("ViewChanged " + scrollViewer.HorizontalOffset + ":" + scrollViewer.VerticalOffset);
00061                         viewChanged.Set();
00062                     }
00063                 };
00064
00065                 Content = scrollViewer;
00066             });
00067
00068             Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");
00069
00070             RunOnUIThread.Execute(() =>
00071             {
00072                 // First layout pass will invalidate measure during the first arrange
00073                 // so that we can get a viewport during the second measure/arrange pass.
00074                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00075                 Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
00076                 realizationRects.Clear();
00077
00078                 viewChanged.Reset();
00079                 layoutMeasured.Reset();
00080                 scrollViewer.ChangeView(null, 100.0, 1.0f, disableAnimation: true);
00081             });
00082
00083             IdleSynchronizer.Wait();
00084             Verify.IsTrue(viewChanged.WaitOne(), "Did not receive view changed event");
00085             Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");
00086             viewChanged.Reset();
00087             layoutMeasured.Reset();
00088
00089             RunOnUIThread.Execute(() =>
00090             {
00091                 Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
00092                 realizationRects.Clear();
00093                 viewChangeCompletedEvent.Reset();
00094
00095                 // Max viewport offset is (300, 400). Horizontal viewport offset
00096                 // is expected to get coerced from 400 to 300.
00097                 scrollViewer.ChangeView(400, 100.0, 1.0f, disableAnimation: true);
00098             });
00099
00100             IdleSynchronizer.Wait();
00101             Verify.IsTrue(viewChanged.WaitOne(), "Did not receive view changed event");
00102             Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");
00103             viewChanged.Reset();
00104             layoutMeasured.Reset();
00105
00106             RunOnUIThread.Execute(() =>
00107             {
00108                 Verify.AreEqual(new Rect(300, 100, 200, 300), realizationRects.Last());
00109                 realizationRects.Clear();
00110                 viewChangeCompletedEvent.Reset();
00111
00112                 scrollViewer.ChangeView(null, null, 2.0f, disableAnimation: true);
00113             });
00114
00115             IdleSynchronizer.Wait();
00116             Verify.IsTrue(viewChanged.WaitOne(), "Did not receive view changed event");
00117             Verify.IsTrue(layoutMeasured.WaitOne(), "Did not receive measure on layout");
00118             viewChanged.Reset();
00119             layoutMeasured.Reset();
00120
00121             RunOnUIThread.Execute(() =>
00122             {
00123                 Verify.AreEqual(new Rect(150, 50, 100, 150), realizationRects.Last());
00124                 realizationRects.Clear();
00125             });
00126         }
00127
00128         [TestMethod]
00129         public void ValidateOneScrollViewerScenario()
00130         {
00131             var realizationRects = new List<Rect>();
00132             ScrollViewer scrollViewer = null;
00133             var viewChangeCompletedEvent = new AutoResetEvent(false);
00134
00135             RunOnUIThread.Execute(() =>
00136             {
00137                 var repeater = new ItemsRepeater()
00138                 {
00139                     Layout = GetMonitoringLayout(new Size(500, 600), realizationRects),
00140                     HorizontalCacheLength = 0.0,
00141                     VerticalCacheLength = 0.0
00142                 };
00143
00144                 scrollViewer = new ScrollViewer
00145                 {
00146                     Content = repeater,
00147                     Width = 200,
00148                     Height = 300
00149                 };
00150
00151                 Content = scrollViewer;
00152                 Content.UpdateLayout();
00153
00154                 Verify.AreEqual(2, realizationRects.Count);
00155                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00156                 Verify.AreEqual(new Rect(0, 0, 200, 300), realizationRects[1]);
00157                 realizationRects.Clear();
00158
00159                 scrollViewer.ViewChanged += (Object sender, ScrollViewerViewChangedEventArgs args) =>
00160                 {
00161                     if (!args.IsIntermediate)
00162                     {
00163                         viewChangeCompletedEvent.Set();
00164                     }
00165                 };
00166             });
00167             IdleSynchronizer.Wait();
00168
00169             RunOnUIThread.Execute(() =>
00170             {
00171                 scrollViewer.ChangeView(0.0, 100.0, null, true);
00172             });
00173             Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00174
00175             RunOnUIThread.Execute(() =>
00176             {
00177                 Verify.AreEqual(new Rect(0, 100, 200, 300), realizationRects.Last());
00178                 realizationRects.Clear();
00179
00180                 viewChangeCompletedEvent.Reset();
00181                 scrollViewer.ChangeView(null, null, 2.0f, true);
00182             });
00183             Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00184
00185             RunOnUIThread.Execute(() =>
00186             {
00187                 Verify.AreEqual(
00188                     new Rect(0, 50, 100, 150),
00189                     realizationRects.Last());
00190                 realizationRects.Clear();
00191             });
00192         }
00193
00194         [TestMethod]
00195         public void ValidateTwoScrollViewerScenario()
00196         {
00197             var realizationRects = new List<Rect>();
00198             ScrollViewer horizontalScroller = null;
00199             ScrollViewer verticalScroller = null;
00200             var horizontalViewChangeCompletedEvent = new AutoResetEvent(false);
00201             var verticalViewChangeCompletedEvent = new AutoResetEvent(false);
00202
00203             RunOnUIThread.Execute(() =>
00204             {
00205                 var repeater = new ItemsRepeater()
00206                 {
00207                     Layout = GetMonitoringLayout(new Size(500, 500), realizationRects),
00208                     HorizontalCacheLength = 0.0,
00209                     VerticalCacheLength = 0.0
00210                 };
00211
00212                 horizontalScroller = new ScrollViewer
00213                 {
00214                     Content = repeater,
00215                     HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,
00216                     VerticalScrollBarVisibility = ScrollBarVisibility.Disabled,
00217                     HorizontalScrollMode = ScrollMode.Enabled,
00218                     VerticalScrollMode = ScrollMode.Disabled
00219                 };
00220
00221                 verticalScroller = new ScrollViewer
00222                 {
00223                     Content = horizontalScroller,
00224                     Width = 200,
00225                     Height = 200
00226                 };
00227
00228                 Content = verticalScroller;
00229                 Content.UpdateLayout();
00230
00231                 Verify.AreEqual(2, realizationRects.Count);
00232                 Verify.AreEqual(new Rect(0, 0, 0, 0), realizationRects[0]);
00233                 Verify.AreEqual(new Rect(0, 0, 200, 200), realizationRects[1]);
00234                 realizationRects.Clear();
00235
00236                 horizontalScroller.ViewChanged += (Object sender, ScrollViewerViewChangedEventArgs args) =>
00237                 {
00238                     if (!args.IsIntermediate)
00239                     {
00240                         horizontalViewChangeCompletedEvent.Set();
00241                     }
00242                 };
00243
00244                 verticalScroller.ViewChanged += (Object sender, ScrollViewerViewChangedEventArgs args) =>
00245                 {
00246                     if (!args.IsIntermediate)
00247                     {
00248                         verticalViewChangeCompletedEvent.Set();
00249                     }
00250                 };
00251             });
00252             IdleSynchronizer.Wait();
00253
00254             RunOnUIThread.Execute(() =>
00255             {
00256                 verticalScroller.ChangeView(0.0, 100.0, null, true);
00257             });
00258             Verify.IsTrue(verticalViewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00259
00260             RunOnUIThread.Execute(() =>
00261             {
00262                 Verify.AreEqual(new Rect(0, 100, 200, 200), realizationRects.Last());
00263                 realizationRects.Clear();
00264
00265                 // Max viewport offset is (300, 300). Horizontal viewport offset
00266                 // is expected to get coerced from 400 to 300.
00267                 horizontalScroller.ChangeView(400.0, 100.0, null, true);
00268             });
00269             Verify.IsTrue(horizontalViewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00270
00271             RunOnUIThread.Execute(() =>
00272             {
00273                 Verify.AreEqual(new Rect(300, 100, 200, 200), realizationRects.Last());
00274                 realizationRects.Clear();
00275             });
00276         }
00277
00278         [TestMethod]
00279         public void CanGrowCacheBufferWithScrollViewer()
00280         {
00281             ScrollViewer scroller = null;
00282             ItemsRepeater repeater = null;
00283             var measureRealizationRects = new List<Rect>();
00284             var arrangeRealizationRects = new List<Rect>();
00285             var fullCacheEvent = new ManualResetEvent(initialState: false);
00286
00287             RunOnUIThread.Execute(() =>
00288             {
00289                 Log.Comment("Preparing the visual tree...");
00290
00291                 scroller = new ScrollViewer
00292                 {
00293                     Width = 400,
00294                     Height = 400
00295                 };
00296
00297                 var layout = new MockVirtualizingLayout
00298                 {
00299                     MeasureLayoutFunc = (availableSize, context) =>
00300                     {
00301                         var ctx = (VirtualizingLayoutContext)context;
00302                         Log.Comment("MeasureLayout - Rect:" +  ctx.RealizationRect);
00303                         if(measureRealizationRects.Count == 0 || measureRealizationRects.Last() != ctx.RealizationRect)
00304                         {
00305                             measureRealizationRects.Add(ctx.RealizationRect);
00306                         }
00307
00308                         return new Size(1000, 2000);
00309                     },
00310
00311                     ArrangeLayoutFunc = (finalSize, context) =>
00312                     {
00313                         var ctx = (VirtualizingLayoutContext)context;
00314                         Log.Comment("ArrangeLayout - Rect:" +  ctx.RealizationRect);
00315                         if(arrangeRealizationRects.Count == 0 || arrangeRealizationRects.Last() != ctx.RealizationRect)
00316                         {
00317                             arrangeRealizationRects.Add(ctx.RealizationRect);
00318                         }
00319
00320                         if (ctx.RealizationRect.Height == scroller.Height * (repeater.VerticalCacheLength + 1))
00321                         {
00322                             fullCacheEvent.Set();
00323                         }
00324
00325                         return finalSize;
00326                     }
00327                 };
00328
00329                 repeater = new ItemsRepeater()
00330                 {
00331                     Layout = layout
00332                 };
00333
00334                 scroller.Content = repeater;
00335                 Content = scroller;
00336             });
00337
00338             if (!fullCacheEvent.WaitOne(DefaultWaitTimeInMS)) Verify.Fail("Cache full size never reached.");
00339             IdleSynchronizer.Wait();
00340
00341             RunOnUIThread.Execute(() =>
00342             {
00343                 var cacheLength = repeater.VerticalCacheLength;
00344                 var expectedRealizationWindow = new Rect(
00345                     -cacheLength / 2 * scroller.Width,
00346                     -cacheLength / 2 * scroller.Height,
00347                     (1 + cacheLength) * scroller.Width,
00348                     (1 + cacheLength) * scroller.Height);
00349
00350                 Log.Comment("Validate that the realization window reached full size.");
00351                 Verify.AreEqual(expectedRealizationWindow, measureRealizationRects.Last());
00352                 Verify.AreEqual(expectedRealizationWindow, arrangeRealizationRects.Last());
00353
00354                 Log.Comment("Validate that the realization window grew by 40 pixels each time during the process.");
00355                 for (int i = 2; i < measureRealizationRects.Count; ++i)
00356                 {
00357                     Verify.AreEqual(-40, measureRealizationRects[i].X - measureRealizationRects[i - 1].X);
00358                     Verify.AreEqual(-40, measureRealizationRects[i].Y - measureRealizationRects[i - 1].Y);
00359                     Verify.AreEqual(80, measureRealizationRects[i].Width - measureRealizationRects[i - 1].Width);
00360                     Verify.AreEqual(80, measureRealizationRects[i].Height - measureRealizationRects[i - 1].Height);
00361
00362                     Verify.AreEqual(-40, arrangeRealizationRects[i].X - arrangeRealizationRects[i - 1].X);
00363                     Verify.AreEqual(-40, arrangeRealizationRects[i].Y - arrangeRealizationRects[i - 1].Y);
00364                     Verify.AreEqual(80, arrangeRealizationRects[i].Width - arrangeRealizationRects[i - 1].Width);
00365                     Verify.AreEqual(80, arrangeRealizationRects[i].Height - arrangeRealizationRects[i - 1].Height);
00366                 }
00367             });
00368         }
00369
00370         [TestMethod]
00371         public void CanBringIntoViewElements()
00372         {
00373             ScrollViewer scroller = null;
00374             ItemsRepeater itemsRepeater = null;
00375             var rootLoadedEvent = new AutoResetEvent(initialState: false);
00376             var viewChangeCompletedEvent = new AutoResetEvent(initialState: false);
00377             var viewChangedOffsets = new List<double>();
00378
00379             RunOnUIThread.Execute(() =>
00380             {
00381                 var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00382                 var root = (Grid)XamlReader.Load(TestUtilities.ProcessTestXamlForRepo(
00383                      @"<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
00384                          <Grid.Resources>
00385                            <controls:StackLayout x:Name='VerticalStackLayout'/>
00386                            <controls:RecyclingElementFactory x:Key='ElementFactory'>
00387                              <controls:RecyclingElementFactory.RecyclePool>
00388                                <controls:RecyclePool/>
00389                              </controls:RecyclingElementFactory.RecyclePool>
00390                              <DataTemplate x:Key='ItemTemplate'>
00391                                <Border Background='LightGray' Margin='5' Height='94'>
00392                                  <TextBlock Text='{Binding}' TextWrapping='WrapWholeWords'/>
00393                                </Border>
00394                              </DataTemplate>
00395                            </controls:RecyclingElementFactory>
00396                          </Grid.Resources>
00397                          <ScrollViewer x:Name='Scroller' Width='400' Height='600' Background='Gray'>
00398                            <controls:ItemsRepeater
00399                              x:Name='ItemsRepeater'
00400                              ItemTemplate='{StaticResource ElementFactory}'
00401                              Layout='{StaticResource VerticalStackLayout}'
00402                              HorizontalCacheLength='0'
00403                              VerticalCacheLength='0'/>
00404                          </ScrollViewer>
00405                        </Grid>"));
00406
00407                 var elementFactory = (RecyclingElementFactory)root.Resources["ElementFactory"];
00408                 scroller = (ScrollViewer)root.FindName("Scroller");
00409                 itemsRepeater = (ItemsRepeater)root.FindName("ItemsRepeater");
00410
00411                 var items = Enumerable.Range(0, 400).Select(i => string.Format("{0}: {1}", i, lorem.Substring(0, 250)));
00412
00413                 itemsRepeater.ItemsSource = items;
00414
00415                 scroller.ViewChanged += (o, e) =>
00416                 {
00417                     Log.Comment($"ScrollViewer.ViewChanged - VerticalOffset: {scroller.VerticalOffset}");
00418                     viewChangedOffsets.Add(scroller.VerticalOffset);
00419                     if (!e.IsIntermediate)
00420                     {
00421                         viewChangeCompletedEvent.Set();
00422                     }
00423                 };
00424
00425                 Content = root;
00426
00427                 root.Loaded += delegate
00428                 {
00429                     rootLoadedEvent.Set();
00430                 };
00431             });
00432             Verify.IsTrue(rootLoadedEvent.WaitOne(DefaultWaitTimeInMS));
00433             IdleSynchronizer.Wait();
00434
00435             RunOnUIThread.Execute(() =>
00436             {
00437                 Log.Comment("\r\nStartBringIntoView for item index 100, w/ 0.5 vertical alignment.");
00438                 viewChangeCompletedEvent.Reset();
00439                 itemsRepeater.GetOrCreateElement(100).StartBringIntoView(new BringIntoViewOptions {
00440                     VerticalAlignmentRatio = 0.5
00441                 });
00442                 itemsRepeater.UpdateLayout();
00443             });
00444
00445             Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00446             IdleSynchronizer.Wait();
00447
00448             Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
00449             Verify.AreEqual(1, viewChangedOffsets.Count);
00450             viewChangedOffsets.Clear();
00451
00452             ValidateRealizedRange(itemsRepeater, 96, 103);
00453
00454             RunOnUIThread.Execute(() =>
00455             {
00456                 Log.Comment("\r\nStartBringIntoView for item index 103 (already realized) w/ animation.");
00457                 viewChangeCompletedEvent.Reset();
00458                 itemsRepeater.TryGetElement(103).StartBringIntoView(new BringIntoViewOptions
00459                 {
00460                     VerticalAlignmentRatio = 0.5,
00461                     AnimationDesired = true
00462                 });
00463                 itemsRepeater.UpdateLayout();
00464             });
00465
00466             Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00467             IdleSynchronizer.Wait();
00468
00469             Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
00470             Verify.IsLessThanOrEqual(1, viewChangedOffsets.Count);
00471             viewChangedOffsets.Clear();
00472
00473             ValidateRealizedRange(itemsRepeater, 99, 107);
00474
00475             RunOnUIThread.Execute(() =>
00476             {
00477                 Log.Comment("\r\nStartBringIntoView for disconnected item index 0, to the top w/ unfulfilled animation and 0.5 vertical alignment.");
00478                 viewChangeCompletedEvent.Reset();
00479                 itemsRepeater.GetOrCreateElement(0).StartBringIntoView(new BringIntoViewOptions
00480                 {
00481                     VerticalAlignmentRatio = 0.5,
00482                     AnimationDesired = true
00483                 });
00484                 itemsRepeater.UpdateLayout();
00485             });
00486
00487             Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00488             IdleSynchronizer.Wait();
00489
00490             Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
00491             Verify.AreEqual(1, viewChangedOffsets.Count);
00492             viewChangedOffsets.Clear();
00493
00494             ValidateRealizedRange(itemsRepeater, 0, 6);
00495
00496             RunOnUIThread.Execute(() =>
00497             {
00498                 // You can't align the first item in the middle obviously.
00499                 Verify.AreEqual(0, scroller.VerticalOffset);
00500
00501                 Log.Comment("\r\nStartBringIntoView for item index 20.");
00502                 viewChangeCompletedEvent.Reset();
00503                 itemsRepeater.GetOrCreateElement(20).StartBringIntoView(new BringIntoViewOptions
00504                 {
00505                     VerticalAlignmentRatio = 0.0
00506                 });
00507                 itemsRepeater.UpdateLayout();
00508             });
00509
00510             Verify.IsTrue(viewChangeCompletedEvent.WaitOne(DefaultWaitTimeInMS));
00511             IdleSynchronizer.Wait();
00512
00513             Log.Comment($"ScrollViewer.ViewChanged - Count: {viewChangedOffsets.Count}");
00514             Verify.AreEqual(1, viewChangedOffsets.Count);
00515
00516             ValidateRealizedRange(itemsRepeater, 19, 26);
00517         }
00518
00519         private void ValidateRealizedRange(
00520             ItemsRepeater itemsRepeater,
00521             int expectedFirstItemIndex,
00522             int expectedLastItemIndex)
00523         {
00524             Log.Comment("Validating Realized Range...");
00525             int actualFirstItemIndex = -1;
00526             int actualLastItemIndex = -1;
00527             int itemIndex = 0;
00528
00529             RunOnUIThread.Execute(() =>
00530             {
00531                 var items = itemsRepeater.ItemsSource as IEnumerable<string>;
00532
00533                 foreach (var item in items)
00534                 {
00535                     var itemElement = itemsRepeater.TryGetElement(itemIndex);
00536
00537                     if (itemElement != null)
00538                     {
00539                         actualFirstItemIndex =
00540                             actualFirstItemIndex == -1 ?
00541                             itemIndex :
00542                             actualFirstItemIndex;
00543                         actualLastItemIndex = itemIndex;
00544
00545                         Log.Comment($"Realized Index - {itemIndex}");
00546                     }
00547
00548                     ++itemIndex;
00549                 }
00550             });
00551
00552             Log.Comment($"FirstItemIndex - {expectedFirstItemIndex}  {actualFirstItemIndex}");
00553             Log.Comment($"LastItemIndex  - {expectedLastItemIndex}  {actualLastItemIndex}");
00554             Verify.AreEqual(expectedFirstItemIndex, actualFirstItemIndex);
00555             Verify.AreEqual(expectedLastItemIndex, actualLastItemIndex);
00556         }
00557
00558         private static VirtualizingLayout GetMonitoringLayout(Size desiredSize, List<Rect> realizationRects, ManualResetEvent layoutMeasured = null)
00559         {
00560             return new MockVirtualizingLayout
00561             {
00562                 MeasureLayoutFunc = (availableSize, context) =>
00563                 {
00564                     var ctx = (VirtualizingLayoutContext)context;
00565                     Log.Comment("MeasureLayout:" + ctx.RealizationRect);
00566                     realizationRects.Add(ctx.RealizationRect);
00567                     if (layoutMeasured != null)
00568                     {
00569                         layoutMeasured.Set();
00570                     }
00571                     return desiredSize;
00572                 },
00573
00574                 ArrangeLayoutFunc = (finalSize, context) => finalSize
00575             };
00576         }
00577     }
00578 }
Generated on Sun Dec 1 2024 20:52:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollingZoomOptions.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollingZoomOptions.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollingZoomOptions.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollingZoomOptions)
00012 }
00013
00014 #include "ScrollingZoomOptions.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CommonStylesVisualTreeTestSamples Member List

This is the complete list of members for CommonStylesVisualTreeTestSamples, including all inherited members.
VerifyVisualTreeExampleForLightTheme() | CommonStylesVisualTreeTestSamples | [inline]
VerifyVisualTreeExampleLoadAndVerifyForAllThemes() | CommonStylesVisualTreeTestSamples | [inline]
VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName() | CommonStylesVisualTreeTestSamples | [inline]
VerifyVisualTreeExampleWithCustomerFilter() | CommonStylesVisualTreeTestSamples | [inline]
VerifyVisualTreeExampleWithCustomerPropertyValueTranslator() | CommonStylesVisualTreeTestSamples | [inline]
VerifyVisualTreeForAppBarAndAppBarToggleButton() | CommonStylesVisualTreeTestSamples | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MenuFlyoutPage Member List

This is the complete list of members for MenuFlyoutPage, including all inherited members.
Grid_ContextRequested(UIElement sender, ContextRequestedEventArgs args) | MenuFlyoutPage | [inline, private]
itemChangeTimer | MenuFlyoutPage | [private]
itemsToToggle | MenuFlyoutPage | [private]
MenuFlyoutPage() | MenuFlyoutPage | [inline]
OnMenuFlyoutChangingItemsClosed(object sender, object e) | MenuFlyoutPage | [inline, private]
OnMenuFlyoutChangingItemsOpened(object sender, object e) | MenuFlyoutPage | [inline, private]
OnMenuFlyoutChangingSubItemsClosed(object sender, object e) | MenuFlyoutPage | [inline, private]
OnMenuFlyoutChangingSubItemsOpened(object sender, object e) | MenuFlyoutPage | [inline, private]
sharedFlyout | MenuFlyoutPage | [private]
subItemChangeTimer | MenuFlyoutPage | [private]
subItemsToToggle | MenuFlyoutPage | [private]
TestMenuFlyoutItemClick(object sender, object e) | MenuFlyoutPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectorBarItem Member List

This is the complete list of members for SelectorBarItem, including all inherited members.
ClearProperties() | SelectorBarItemProperties | [static]
EnsureProperties() | SelectorBarItemProperties | [static]
ForwardRefToBaseReferenceTracker(ItemContainer) SelectorBarItem() | SelectorBarItem |
Icon(winrt::IconElement const &value) | SelectorBarItemProperties |
Icon() | SelectorBarItemProperties |
IconProperty() | SelectorBarItemProperties | [inline, static]
OnApplyTemplate() override | SelectorBarItem |
OnCreateAutomationPeer() override | SelectorBarItem |
OnIconPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBarItemProperties | [static]
OnPropertyChanged(winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBarItem |
OnTextPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | SelectorBarItemProperties | [static]
s_IconProperty | SelectorBarItemProperties | [static]
s_TextProperty | SelectorBarItemProperties | [static]
SelectorBarItemProperties() | SelectorBarItemProperties |
Text(winrt::hstring const &value) | SelectorBarItemProperties |
Text() | SelectorBarItemProperties |
TextProperty() | SelectorBarItemProperties | [inline, static]
UpdatePartsVisibility(bool isForIcon, bool isForText) | SelectorBarItem | [private]
~SelectorBarItem() | SelectorBarItem |
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewItemInvokedEventArgs.h Source File

  • File List
  • File Members
  • ItemsView

ItemsViewItemInvokedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsViewItemInvokedEventArgs.g.h"
00007
00008 class ItemsViewItemInvokedEventArgs :
00009     public ReferenceTracker<ItemsViewItemInvokedEventArgs, winrt::implementation::ItemsViewItemInvokedEventArgsT, winrt::composable, winrt::composing>
00010 {
00011 public:
00012     ItemsViewItemInvokedEventArgs(const winrt::IInspectable& invokedItem);
00013
00014     ~ItemsViewItemInvokedEventArgs()
00015     {
00016         ITEMSVIEW_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00017     }
00018
00019 #pragma region IItemsViewItemInvokedEventArgs
00020     winrt::IInspectable InvokedItem();
00021 #pragma endregion
00022
00023 private:
00024     tracker_ref<winrt::IInspectable> m_invokedItem{ this };
00025 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsTestPageElements Member List

This is the complete list of members for RadioButtonsTestPageElements, including all inherited members.
BorderWidthTextBox | RadioButtonsTestPageElements | [private]
ClearRadioButtonsEventsButton | RadioButtonsTestPageElements | [private]
CustomCheckedCheckBox | RadioButtonsTestPageElements | [private]
CustomContentTextBox | RadioButtonsTestPageElements | [private]
CustomDisabledCheckBox | RadioButtonsTestPageElements | [private]
CustomIndexTextBox | RadioButtonsTestPageElements | [private]
FocusedIndexTextBlock | RadioButtonsTestPageElements | [private]
FocusedItemTextBlock | RadioButtonsTestPageElements | [private]
FocusSelectedItemButton | RadioButtonsTestPageElements | [private]
GetBorderWidthTextBox() | RadioButtonsTestPageElements | [inline]
GetClearRadioButtonsEventsButton() | RadioButtonsTestPageElements | [inline]
GetCustomCheckedCheckBox() | RadioButtonsTestPageElements | [inline]
GetCustomContentTextBox() | RadioButtonsTestPageElements | [inline]
GetCustomDisabledCheckBox() | RadioButtonsTestPageElements | [inline]
GetCustomIndexTextBox() | RadioButtonsTestPageElements | [inline]
GetElement< T >(ref T element, string elementName) | RadioButtonsTestPageElements | [inline, private]
GetFocusedIndexTextBlock() | RadioButtonsTestPageElements | [inline]
GetFocusedItemTextBlock() | RadioButtonsTestPageElements | [inline]
GetFocusSelectedItemButton() | RadioButtonsTestPageElements | [inline]
GetIndexToSelectTextBlock() | RadioButtonsTestPageElements | [inline]
GetInsertDisplayRadioButtonButton() | RadioButtonsTestPageElements | [inline]
GetItemTypeComboBox() | RadioButtonsTestPageElements | [inline]
GetLayoutNumberOfColumnsTextBlock() | RadioButtonsTestPageElements | [inline]
GetLayoutNumberOfLargerColumnsTextBlock() | RadioButtonsTestPageElements | [inline]
GetLayoutNumberOfRowsTextBlock() | RadioButtonsTestPageElements | [inline]
GetMaxColumnsTextBlock() | RadioButtonsTestPageElements | [inline]
GetNumberOfItemsTextBlock() | RadioButtonsTestPageElements | [inline]
GetRadioButtonsEventsList() | RadioButtonsTestPageElements | [inline]
GetRadioButtonsHasFocusCheckBox() | RadioButtonsTestPageElements | [inline]
GetReproTextBlock() | RadioButtonsTestPageElements | [inline]
GetSelectByIndexButton() | RadioButtonsTestPageElements | [inline]
GetSelectByItemButton() | RadioButtonsTestPageElements | [inline]
GetSelectedIndexTextBlock() | RadioButtonsTestPageElements | [inline]
GetSelectedItemTextBlock() | RadioButtonsTestPageElements | [inline]
GetSelectedPositionInSetTextBlock() | RadioButtonsTestPageElements | [inline]
GetSelectedSizeOfSetTextBlock() | RadioButtonsTestPageElements | [inline]
GetSetBorderWidthButton() | RadioButtonsTestPageElements | [inline]
GetSetMaxColumnsButton() | RadioButtonsTestPageElements | [inline]
GetSetNumberOfItemsButton() | RadioButtonsTestPageElements | [inline]
GetSourceComboBox() | RadioButtonsTestPageElements | [inline]
GetTestRadioButtons() | RadioButtonsTestPageElements | [inline]
IndexToSelectTextBlock | RadioButtonsTestPageElements | [private]
InsertDisplayRadioButtonButton | RadioButtonsTestPageElements | [private]
ItemTypeComboBox | RadioButtonsTestPageElements | [private]
LayoutNumberOfColumnsTextBlock | RadioButtonsTestPageElements | [private]
LayoutNumberOfLargerColumnsTextBlock | RadioButtonsTestPageElements | [private]
LayoutNumberOfRowsTextBlock | RadioButtonsTestPageElements | [private]
MaxColumnsTextBlock | RadioButtonsTestPageElements | [private]
NumberOfItemsTextBlock | RadioButtonsTestPageElements | [private]
RadioButtonsEventsList | RadioButtonsTestPageElements | [private]
RadioButtonsHasFocusCheckBox | RadioButtonsTestPageElements | [private]
RadioButtonsSourceLocation enum name | RadioButtonsTestPageElements |
RadioButtonsSourceType enum name | RadioButtonsTestPageElements |
ReproTextBlock | RadioButtonsTestPageElements | [private]
SelectByIndexButton | RadioButtonsTestPageElements | [private]
SelectByItemButton | RadioButtonsTestPageElements | [private]
SelectedIndexTextBlock | RadioButtonsTestPageElements | [private]
SelectedItemTextBlock | RadioButtonsTestPageElements | [private]
SelectedPositionInSetTextBlock | RadioButtonsTestPageElements | [private]
SelectedSizeOfSetTextBlock | RadioButtonsTestPageElements | [private]
SetBorderWidthButton | RadioButtonsTestPageElements | [private]
SetMaxColumnsButton | RadioButtonsTestPageElements | [private]
SetNumberOfItemsButton | RadioButtonsTestPageElements | [private]
SourceComboBox | RadioButtonsTestPageElements | [private]
TestRadioButtons | RadioButtonsTestPageElements | [private]
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ColorPicker/ColorSpectrum.idl Source File

  • File List
  • File Members
  • ColorPicker

ColorSpectrum.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XCP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00007 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00008 unsealed runtimeclass ColorSpectrum : Microsoft.UI.Xaml.Controls.Control
00009 {
00010     ColorSpectrum();
00011
00012     [MUX_DEFAULT_VALUE("{ 255, 255, 255, 255 }")]
00013     Windows.UI.Color Color { get; set; };
00014     [MUX_DEFAULT_VALUE("{ 0, 0, 1, 1 }")]
00015     Windows.Foundation.Numerics.Vector4 HsvColor { get; set; };
00016     [MUX_DEFAULT_VALUE("0")]
00017     Int32 MinHue { get; set; };
00018     [MUX_DEFAULT_VALUE("359")]
00019     Int32 MaxHue { get; set; };
00020     [MUX_DEFAULT_VALUE("0")]
00021     Int32 MinSaturation { get; set; };
00022     [MUX_DEFAULT_VALUE("100")]
00023     Int32 MaxSaturation { get; set; };
00024     [MUX_DEFAULT_VALUE("0")]
00025     Int32 MinValue { get; set; };
00026     [MUX_DEFAULT_VALUE("100")]
00027     Int32 MaxValue { get; set; };
00028     [MUX_DEFAULT_VALUE("winrt::ColorSpectrumShape::Box")]
00029     MU_XC_NAMESPACE.ColorSpectrumShape Shape { get; set; };
00030     [MUX_DEFAULT_VALUE("winrt::ColorSpectrumComponents::HueSaturation")]
00031     MU_XC_NAMESPACE.ColorSpectrumComponents Components { get; set; };
00032     event Windows.Foundation.TypedEventHandler<ColorSpectrum, MU_XC_NAMESPACE.ColorChangedEventArgs> ColorChanged;
00033
00034     static Microsoft.UI.Xaml.DependencyProperty ColorProperty { get; };
00035     static Microsoft.UI.Xaml.DependencyProperty HsvColorProperty { get; };
00036     static Microsoft.UI.Xaml.DependencyProperty MinHueProperty { get; };
00037     static Microsoft.UI.Xaml.DependencyProperty MaxHueProperty { get; };
00038     static Microsoft.UI.Xaml.DependencyProperty MinSaturationProperty { get; };
00039     static Microsoft.UI.Xaml.DependencyProperty MaxSaturationProperty { get; };
00040     static Microsoft.UI.Xaml.DependencyProperty MinValueProperty { get; };
00041     static Microsoft.UI.Xaml.DependencyProperty MaxValueProperty { get; };
00042     static Microsoft.UI.Xaml.DependencyProperty ShapeProperty { get; };
00043     static Microsoft.UI.Xaml.DependencyProperty ComponentsProperty { get; };
00044 }
00045
00046 }
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterTestHooksHelper.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterTestHooksHelper.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using Microsoft.UI.Composition.Interactions;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls.Primitives;
00010 using Microsoft.UI.Private.Controls;
00011
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 namespace MUXControlsTestApp.Utilities
00017 {
00018     public class ExpressionAnimationStatusChange
00019     {
00020         public ExpressionAnimationStatusChange(bool isExpressionAnimationStarted, string propertyName)
00021         {
00022             IsExpressionAnimationStarted = isExpressionAnimationStarted;
00023             PropertyName = propertyName;
00024         }
00025
00026         public bool IsExpressionAnimationStarted { get; set; }
00027
00028         public string PropertyName { get; set; }
00029     }
00030
00031     // Utility class used to turn on ScrollPresenter test hooks and automatically turn them off when the instance gets disposed.
00032     public class ScrollPresenterTestHooksHelper : IDisposable
00033     {
00034         Dictionary<ScrollPresenter, CompositionInteractionSourceCollection> m_interactionSources = null;
00035         Dictionary<ScrollPresenter, List<ExpressionAnimationStatusChange>> m_expressionAnimationStatusChanges = null;
00036
00037         public ScrollPresenterTestHooksHelper(
00038             bool enableAnchorNotifications = true,
00039             bool enableInteractionSourcesNotifications = true,
00040             bool enableExpressionAnimationStatusNotifications = true,
00041             bool? isAnimationsEnabledOverride = null)
00042         {
00043             RunOnUIThread.Execute(() =>
00044             {
00045                 if (enableAnchorNotifications)
00046                 {
00047                     TurnOnAnchorNotifications();
00048                 }
00049
00050                 if (enableInteractionSourcesNotifications)
00051                 {
00052                     TurnOnInteractionSourcesNotifications();
00053                 }
00054
00055                 if (enableExpressionAnimationStatusNotifications)
00056                 {
00057                     TurnOnExpressionAnimationStatusNotifications();
00058                 }
00059
00060                 if (isAnimationsEnabledOverride.HasValue)
00061                 {
00062                     SetIsAnimationsEnabledOverride(isAnimationsEnabledOverride.Value);
00063                 }
00064
00065                 m_interactionSources = new Dictionary<ScrollPresenter, CompositionInteractionSourceCollection>();
00066                 m_expressionAnimationStatusChanges = new Dictionary<ScrollPresenter, List<ExpressionAnimationStatusChange>>();
00067             });
00068         }
00069
00070         public void TurnOnAnchorNotifications()
00071         {
00072             if (!ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
00073             {
00074                 Log.Comment("ScrollPresenterTestHooksHelper: Turning on anchor notifications.");
00075                 ScrollPresenterTestHooks.AreAnchorNotificationsRaised = true;
00076                 ScrollPresenterTestHooks.AnchorEvaluated += ScrollPresenterTestHooks_AnchorEvaluated;
00077             }
00078         }
00079
00080         public void TurnOffAnchorNotifications()
00081         {
00082             if (ScrollPresenterTestHooks.AreAnchorNotificationsRaised)
00083             {
00084                 Log.Comment("ScrollPresenterTestHooksHelper: Turning off anchor notifications.");
00085                 ScrollPresenterTestHooks.AreAnchorNotificationsRaised = false;
00086                 ScrollPresenterTestHooks.AnchorEvaluated -= ScrollPresenterTestHooks_AnchorEvaluated;
00087             }
00088         }
00089
00090         public void TurnOnInteractionSourcesNotifications()
00091         {
00092             if (!ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised)
00093             {
00094                 Log.Comment("ScrollPresenterTestHooksHelper: Turning on InteractionSources notifications.");
00095                 ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised = true;
00096                 ScrollPresenterTestHooks.InteractionSourcesChanged += ScrollPresenterTestHooks_InteractionSourcesChanged;
00097             }
00098         }
00099
00100         public void TurnOffInteractionSourcesNotifications()
00101         {
00102             if (ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised)
00103             {
00104                 Log.Comment("ScrollPresenterTestHooksHelper: Turning off InteractionSources notifications.");
00105                 ScrollPresenterTestHooks.AreInteractionSourcesNotificationsRaised = false;
00106                 ScrollPresenterTestHooks.InteractionSourcesChanged -= ScrollPresenterTestHooks_InteractionSourcesChanged;
00107             }
00108         }
00109
00110         public void TurnOnExpressionAnimationStatusNotifications()
00111         {
00112             if (!ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised)
00113             {
00114                 Log.Comment("ScrollPresenterTestHooksHelper: Turning on ExpressionAnimation status notifications.");
00115                 ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised = true;
00116                 ScrollPresenterTestHooks.ExpressionAnimationStatusChanged += ScrollPresenterTestHooks_ExpressionAnimationStatusChanged;
00117             }
00118         }
00119
00120         public void TurnOffExpressionAnimationStatusNotifications()
00121         {
00122             if (ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised)
00123             {
00124                 Log.Comment("ScrollPresenterTestHooksHelper: Turning off ExpressionAnimation status notifications.");
00125                 ScrollPresenterTestHooks.AreExpressionAnimationStatusNotificationsRaised = false;
00126                 ScrollPresenterTestHooks.ExpressionAnimationStatusChanged -= ScrollPresenterTestHooks_ExpressionAnimationStatusChanged;
00127             }
00128         }
00129
00130         public void SetIsAnimationsEnabledOverride(bool isAnimationsEnabledOverride)
00131         {
00132             if (!ScrollPresenterTestHooks.IsAnimationsEnabledOverride.HasValue || ScrollPresenterTestHooks.IsAnimationsEnabledOverride.Value != isAnimationsEnabledOverride)
00133             {
00134                 Log.Comment($"ScrollPresenterTestHooksHelper: Setting IsAnimationsEnabledOverride to {isAnimationsEnabledOverride}.");
00135                 ScrollPresenterTestHooks.IsAnimationsEnabledOverride = isAnimationsEnabledOverride;
00136             }
00137         }
00138
00139         public void ResetIsAnimationsEnabledOverride()
00140         {
00141             if (ScrollPresenterTestHooks.IsAnimationsEnabledOverride.HasValue)
00142             {
00143                 Log.Comment($"ScrollPresenterTestHooksHelper: Resetting IsAnimationsEnabledOverride from {ScrollPresenterTestHooks.IsAnimationsEnabledOverride.Value}.");
00144                 ScrollPresenterTestHooks.IsAnimationsEnabledOverride = null;
00145             }
00146         }
00147
00148         public void Dispose()
00149         {
00150             RunOnUIThread.Execute(() =>
00151             {
00152                 TurnOffAnchorNotifications();
00153                 TurnOffInteractionSourcesNotifications();
00154                 TurnOffExpressionAnimationStatusNotifications();
00155                 ResetIsAnimationsEnabledOverride();
00156
00157                 m_interactionSources.Clear();
00158                 m_expressionAnimationStatusChanges.Clear();
00159             });
00160         }
00161
00162         public CompositionInteractionSourceCollection GetInteractionSources(ScrollPresenter scrollPresenter)
00163         {
00164             if (m_interactionSources.ContainsKey(scrollPresenter))
00165             {
00166                 return m_interactionSources[scrollPresenter];
00167             }
00168             else
00169             {
00170                 return null;
00171             }
00172         }
00173
00174         public List<ExpressionAnimationStatusChange> GetExpressionAnimationStatusChanges(ScrollPresenter scrollPresenter)
00175         {
00176             if (m_expressionAnimationStatusChanges.ContainsKey(scrollPresenter))
00177             {
00178                 return m_expressionAnimationStatusChanges[scrollPresenter];
00179             }
00180             else
00181             {
00182                 return null;
00183             }
00184         }
00185
00186         public void ResetExpressionAnimationStatusChanges(ScrollPresenter scrollPresenter)
00187         {
00188             if (m_expressionAnimationStatusChanges.ContainsKey(scrollPresenter))
00189             {
00190                 m_expressionAnimationStatusChanges.Remove(scrollPresenter);
00191             }
00192         }
00193
00194         public static void LogInteractionSources(CompositionInteractionSourceCollection interactionSources)
00195         {
00196             if (interactionSources == null)
00197             {
00198                 Log.Warning("LogInteractionSources: parameter interactionSources is null");
00199                 throw new ArgumentNullException("interactionSources");
00200             }
00201
00202             Log.Comment("    Interaction sources count: " + interactionSources.Count);
00203
00204             foreach (ICompositionInteractionSource interactionSource in interactionSources)
00205             {
00206                 VisualInteractionSource visualInteractionSource = interactionSource as VisualInteractionSource;
00207                 if (visualInteractionSource != null)
00208                 {
00209                     Log.Comment("    VisualInteractionSource: ManipulationRedirectionMode: " + visualInteractionSource.ManipulationRedirectionMode);
00210                     Log.Comment("    VisualInteractionSource: IsPositionXRailsEnabled: " + visualInteractionSource.IsPositionXRailsEnabled +
00211                         ", IsPositionYRailsEnabled:" + visualInteractionSource.IsPositionYRailsEnabled);
00212                     Log.Comment("    VisualInteractionSource: PositionXChainingMode: " + visualInteractionSource.PositionXChainingMode +
00213                         ", PositionYChainingMode:" + visualInteractionSource.PositionYChainingMode +
00214                         ", ScaleChainingMode:" + visualInteractionSource.ScaleChainingMode);
00215                     Log.Comment("    VisualInteractionSource: PositionXSourceMode: " + visualInteractionSource.PositionXSourceMode +
00216                         ", PositionYSourceMode:" + visualInteractionSource.PositionYSourceMode +
00217                         ", ScaleSourceMode:" + visualInteractionSource.ScaleSourceMode);
00218                     Log.Comment("    VisualInteractionSource: PointerWheelConfig: (" + visualInteractionSource.PointerWheelConfig.PositionXSourceMode +
00219                         ", " + visualInteractionSource.PointerWheelConfig.PositionYSourceMode +
00220                         ", " + visualInteractionSource.PointerWheelConfig.ScaleSourceMode + ")");
00221                 }
00222             }
00223         }
00224
00225         public static void LogExpressionAnimationStatusChanges(List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges)
00226         {
00227             if (expressionAnimationStatusChanges == null)
00228             {
00229                 Log.Comment("expressionAnimationStatusChanges is null");
00230                 return;
00231             }
00232
00233             Log.Comment("expressionAnimationStatusChanges:");
00234             foreach (ExpressionAnimationStatusChange expressionAnimationStatusChange in expressionAnimationStatusChanges)
00235             {
00236                 Log.Comment($"  IsExpressionAnimationStarted: {expressionAnimationStatusChange.IsExpressionAnimationStarted}, PropertyName: {expressionAnimationStatusChange.PropertyName}");
00237             }
00238         }
00239
00240         private void ScrollPresenterTestHooks_AnchorEvaluated(ScrollPresenter sender, ScrollPresenterTestHooksAnchorEvaluatedEventArgs args)
00241         {
00242             string anchorName = (args.AnchorElement is FrameworkElement) ? (args.AnchorElement as FrameworkElement).Name : string.Empty;
00243
00244             Log.Comment("  AnchorEvaluated: s:" + sender.Name + ", a:" + anchorName + ", ap:(" + args.ViewportAnchorPointHorizontalOffset + "," + args.ViewportAnchorPointVerticalOffset + ")");
00245         }
00246
00247         private void ScrollPresenterTestHooks_InteractionSourcesChanged(ScrollPresenter sender, ScrollPresenterTestHooksInteractionSourcesChangedEventArgs args)
00248         {
00249             Log.Comment("  InteractionSourcesChanged: s: " + sender.Name);
00250             if (!m_interactionSources.ContainsKey(sender))
00251             {
00252                 m_interactionSources.Add(sender, args.InteractionSources);
00253             }
00254             else
00255             {
00256                 m_interactionSources[sender] = args.InteractionSources;
00257             }
00258             LogInteractionSources(args.InteractionSources);
00259         }
00260
00261         private void ScrollPresenterTestHooks_ExpressionAnimationStatusChanged(ScrollPresenter sender, ScrollPresenterTestHooksExpressionAnimationStatusChangedEventArgs args)
00262         {
00263             Log.Comment($"  ExpressionAnimationStatusChanged: s: {sender.Name}, IsExpressionAnimationStarted: {args.IsExpressionAnimationStarted}, PropertyName: {args.PropertyName}");
00264             List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = null;
00265
00266             if (!m_expressionAnimationStatusChanges.ContainsKey(sender))
00267             {
00268                 expressionAnimationStatusChanges = new List<ExpressionAnimationStatusChange>();
00269                 m_expressionAnimationStatusChanges.Add(sender, expressionAnimationStatusChanges);
00270             }
00271             else
00272             {
00273                 expressionAnimationStatusChanges = m_expressionAnimationStatusChanges[sender];
00274             }
00275
00276             expressionAnimationStatusChanges.Add(new ExpressionAnimationStatusChange(args.IsExpressionAnimationStarted, args.PropertyName));
00277         }
00278     }
00279 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewTemplateSettings.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewTemplateSettings.g.h"
00007 #include "NavigationViewTemplateSettings.properties.h"
00008
00009 class NavigationViewTemplateSettings :
00010     public winrt::implementation::NavigationViewTemplateSettingsT<NavigationViewTemplateSettings>,
00011     public NavigationViewTemplateSettingsProperties
00012 {
00013 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Telemetry/MuxcTraceLogging.h Source File

  • File List
  • File Members
  • Telemetry

MuxcTraceLogging.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "WinEventLogLevels.h"
00007 #include <TraceLoggingProvider.h>
00008
00009 // In the OS repo, we want to pick up the published version of MicrosoftTelemetry.h,
00010 // so we'll use the "telemetry/" prefix to differentiate that version from the one
00011 // in our repo.
00012 #include <MicrosoftTelemetry.h>
00013
00014 #pragma warning(push)
00015 #pragma warning(disable: 6387 6553 26400 26401 26409 26439)
00016 #include <wil/TraceLogging.h>
00017 #pragma warning(pop)
00018
00019 // Keywords
00020 #define KEYWORD_ITEMSREPEATER      0x0000000000000001
00021 #define KEYWORD_SCROLLPRESENTER    0x0000000000000002
00022 #define KEYWORD_PTR                0x0000000000000004
00023 #define KEYWORD_SCROLLVIEW         0x0000000000000008
00024 #define KEYWORD_SWIPECONTROL       0x0000000000000010
00025 #define KEYWORD_COMMANDBARFLYOUT   0x0000000000000020
00026 #define KEYWORD_WEBVIEW2           0x0000000000000040
00027 #define KEYWORD_TABVIEW            0x0000000000000080
00028 #define KEYWORD_ITEMSVIEW          0x0000000000000100
00029 #define KEYWORD_ITEMCONTAINER      0x0000000000000200
00030 #define KEYWORD_LINEDFLOWLAYOUT    0x0000000000000400
00031 #define KEYWORD_ANNOTATEDSCROLLBAR 0x0000000000000800
00032 #define KEYWORD_SELECTORBAR        0x0000000000001000
00033 #define KEYWORD_NAVIGATIONVIEW     0x0000000000002000
00034 #define KEYWORD_INKTOOLBAR         0x0000000000004000
00035
00036 // Common output formats
00037 #define TRACE_MSG_METH L"%s[0x%p]()\n"
00038 #define TRACE_MSG_METH_DBL L"%s[0x%p](%lf)\n"
00039 #define TRACE_MSG_METH_DBL_DBL L"%s[0x%p](%lf, %lf)\n"
00040 #define TRACE_MSG_METH_DBL_INT L"%s[0x%p](%lf, %d)\n"
00041 #define TRACE_MSG_METH_DBL_DBL_INT L"%s[0x%p](%lf, %lf, %d)\n"
00042 #define TRACE_MSG_METH_DBL_DBL_FLT L"%s[0x%p](%lf, %lf, %f)\n"
00043 #define TRACE_MSG_METH_DBL_DBL_STR L"%s[0x%p](%lf, %lf, %s)\n"
00044 #define TRACE_MSG_METH_FLT L"%s[0x%p](%f)\n"
00045 #define TRACE_MSG_METH_FLT_FLT L"%s[0x%p](%f, %f)\n"
00046 #define TRACE_MSG_METH_FLT_FLT_FLT L"%s[0x%p](%f, %f, %f)\n"
00047 #define TRACE_MSG_METH_FLT_FLT_FLT_FLT L"%s[0x%p](%f, %f, %f, %f)\n"
00048 #define TRACE_MSG_METH_FLT_FLT_STR_INT L"%s[0x%p](%f, %f, %s, %d)\n"
00049 #define TRACE_MSG_METH_INT L"%s[0x%p](%d)\n"
00050 #define TRACE_MSG_METH_INT_INT L"%s[0x%p](%d, %d)\n"
00051 #define TRACE_MSG_METH_PTR L"%s[0x%p](0x%p)\n"
00052 #define TRACE_MSG_METH_PTR_PTR L"%s[0x%p](0x%p, 0x%p)\n"
00053 #define TRACE_MSG_METH_PTR_DBL L"%s[0x%p](0x%p, %lf)\n"
00054 #define TRACE_MSG_METH_PTR_INT L"%s[0x%p](0x%p, %d)\n"
00055 #define TRACE_MSG_METH_PTR_STR L"%s[0x%p](0x%p, %s)\n"
00056 #define TRACE_MSG_METH_STR L"%s[0x%p](%s)\n"
00057 #define TRACE_MSG_METH_IND_STR L"%s[0x%p](%*s)\n"
00058 #define TRACE_MSG_METH_IND_STR_STR L"%s[0x%p](%*s, %s)\n"
00059 #define TRACE_MSG_METH_IND_STR_STR_INT L"%s[0x%p](%*s, %s, %d)\n"
00060 #define TRACE_MSG_METH_IND_STR_STR_FLT L"%s[0x%p](%*s, %s, %f)\n"
00061 #define TRACE_MSG_METH_IND_STR_STR_FLT_FLT L"%s[0x%p](%*s, %s, %f, %f)\n"
00062 #define TRACE_MSG_METH_IND_STR_STR_FLT_FLT_FLT_FLT L"%s[0x%p](%*s, %s, %f, %f, %f, %f)\n"
00063 #define TRACE_MSG_METH_IND_STR_STR_INT_FLT_FLT_FLT_FLT L"%s[0x%p](%*s, %s, %d, %f, %f, %f, %f)\n"
00064 #define TRACE_MSG_METH_STR_STR L"%s[0x%p](%s, %s)\n"
00065 #define TRACE_MSG_METH_STR_DBL L"%s[0x%p](%s, %lf)\n"
00066 #define TRACE_MSG_METH_STR_DBL_DBL L"%s[0x%p](%s, %lf, %lf)\n"
00067 #define TRACE_MSG_METH_STR_FLT L"%s[0x%p](%s, %f)\n"
00068 #define TRACE_MSG_METH_STR_INT L"%s[0x%p](%s, %d)\n"
00069 #define TRACE_MSG_METH_STR_STR_PTR L"%s[0x%p](%s, %s, 0x%p)\n"
00070 #define TRACE_MSG_METH_STR_STR_DBL L"%s[0x%p](%s, %s, %lf)\n"
00071 #define TRACE_MSG_METH_STR_STR_INT L"%s[0x%p](%s, %s, %d)\n"
00072 #define TRACE_MSG_METH_STR_STR_STR L"%s[0x%p](%s, %s, %s)\n"
00073 #define TRACE_MSG_METH_STR_INT_INT L"%s[0x%p](%s, %d, %d)\n"
00074 #define TRACE_MSG_METH_STR_FLT_FLT L"%s[0x%p](%s, %f, %f)\n"
00075 #define TRACE_MSG_METH_STR_STR_FLT_FLT L"%s[0x%p](%s, %s, %f, %f)\n"
00076 #define TRACE_MSG_METH_STR_STR_FLT_FLT_FLT_FLT L"%s[0x%p](%s, %s, %f, %f, %f, %f)\n"
00077 #define TRACE_MSG_METH_STR_STR_FLT L"%s[0x%p](%s, %s, %f)\n"
00078 #define TRACE_MSG_METH_STR_STR_INT_INT L"%s[0x%p](%s, %s, %d, %d)\n"
00079 #define TRACE_MSG_METH_STR_STR_DBL_DBL L"%s[0x%p](%s, %s, %lf, %lf)\n"
00080
00081 #define TRACE_MSG_METH_METH L"%s[0x%p] - calls %s()\n"
00082 #define TRACE_MSG_METH_METH_INT L"%s[0x%p] - calls %s(%d)\n"
00083 #define TRACE_MSG_METH_METH_STR L"%s[0x%p] - calls %s(%s)\n"
00084 #define TRACE_MSG_METH_METH_STR_STR L"%s[0x%p] - calls %s(%s, %s)\n"
00085 #define TRACE_MSG_METH_METH_FLT_STR L"%s[0x%p] - calls %s(%f, %s)\n"
00086 #define TRACE_MSG_METH_METH_FLT_FLT_FLT L"%s[0x%p] - calls %s(%f, %f, %f)\n"
00087
00088 // Current method name
00089 #define METH_NAME StringUtil::Utf8ToUtf16(__FUNCTION__).c_str()
00090
00091 // TraceLogging provider name for telemetry.
00092 #define TELEMETRY_PROVIDER_NAME "Microsoft.UI.Xaml.Controls"
00093
00094 TRACELOGGING_DECLARE_PROVIDER(g_hTelemetryProvider);
00095 extern bool g_IsTelemetryProviderEnabled;
00096 extern UCHAR g_TelemetryProviderLevel;
00097 extern ULONGLONG g_TelemetryProviderMatchAnyKeyword;
00098 extern GUID g_TelemetryProviderActivityId;
00099
00100 // TraceLogging provider name for performance.
00101 #define PERF_PROVIDER_NAME "Microsoft.UI.Xaml.Controls.Perf"
00102
00103 TRACELOGGING_DECLARE_PROVIDER(g_hPerfProvider);
00104 extern bool g_IsPerfProviderEnabled;
00105 extern UCHAR g_PerfProviderLevel;
00106 extern ULONGLONG g_PerfProviderMatchAnyKeyword;
00107 extern GUID g_PerfProviderActivityId;
00108
00109 // TraceLogging provider name for debugging.
00110 #define DEBUG_PROVIDER_NAME "Microsoft.UI.Xaml.Controls.Debug"
00111
00112 TRACELOGGING_DECLARE_PROVIDER(g_hLoggingProvider);
00113 extern bool g_IsLoggingProviderEnabled;
00114 extern UCHAR g_LoggingProviderLevel;
00115 extern ULONGLONG g_LoggingProviderMatchAnyKeyword;
00116 extern GUID g_LoggingProviderActivityId;
00117
00118 extern void RegisterTraceLogging();
00119 extern void UnRegisterTraceLogging();
00120
00121 #pragma warning(push)
00122 #pragma warning(disable: 6387)
00123 // GUID for "Microsoft-Windows-Xaml": {531a35ab-63ce-4bcf-aa98-f88c7a89e455}
00124 DECLARE_TRACELOGGING_CLASS(XamlTelemetryLogging, "Microsoft-Windows-XAML", (0x531a35ab, 0x63ce, 0x4bcf, 0xaa, 0x98, 0xf8, 0x8c, 0x7a, 0x89, 0xe4, 0x55));
00125
00126 class XamlTelemetry final : public TelemetryBase
00127 {
00128     IMPLEMENT_TELEMETRY_CLASS(XamlTelemetry, XamlTelemetryLogging);
00129
00130 public:
00131
00132     // Calling into a public API
00133     DEFINE_TRACELOGGING_EVENT_PARAM4(PublicApiCall,
00134         bool, IsStart,
00135         uint64_t, ObjectPointer,
00136         PCSTR, MethodName,
00137         uint32_t, HR,
00138         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00139
00140     // An event that the perf_xaml plugin cares about
00141     //
00142     // perf_xaml is a WPA plugin that looks at Xaml events and picks out important ones to provide an overview of Xaml
00143     // UI thread performance. One of its most helpful features is the ability to match start and stop events and
00144     // automatically calculate a duration for event pairs. This lets you quickly see information like the durations of
00145     // all frames that Xaml rendered without having to comb through events and manually subtract timestamps. Xaml logs
00146     // too many kinds of events for the plugin to automatically match up and calculate everything, so the plugin has a
00147     // hardcoded list of important events that it looks for. The hardcoded list means that if Xaml wanted to log new
00148     // events that are relevant to perf, the plugin must also be updated to teach it about those new events.
00149     //
00150     // This PerfXamlEvent is meant to solve that problem. The PerfXamlEvent is part of the hardcoded list that the
00151     // plugin looks for. The plugin also knows that this event is special, and carries a string (the "EventName" param)
00152     // that describes the operation being traced. The plugin then matches up PerfXamlEvent pairs and displays the string
00153     // directly in the table that it produces. For Xaml this means adding a new row in the plugin's Xaml Frame Analysis
00154     // table just involves logging a pair of PerfXamlEvent events and providing a string for the operation that the
00155     // event is meant to trace.
00156     //
00157     // This event also carries an "IsInteresting" bool param. The perf_xaml plugin has a concept of regions of interest,
00158     // which span from some triggering event to the end of the next UI thread frame. Regions of interest are meant to
00159     // mark large changes in the visual tree, which produce long-running frames that are the most susceptible to perf
00160     // problems. One example is page navigation - navigating to a new page brings in an entire tree of elements that
00161     // need to run layout and render, so the next UI thread frame is one that we'll want to pay particularly close
00162     // attention to. A PerfXamlEvent with "IsInteresting" true will tell perf_xaml to start a region of interest, if
00163     // we're not already in one.
00164     DEFINE_TRACELOGGING_EVENT_PARAM4(PerfXamlEvent,
00165         bool, IsStart,
00166         uint64_t, ObjectPointer,
00167         PCSTR, EventName,
00168         bool, IsInteresting,
00169         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00170
00171     DEFINE_TRACELOGGING_EVENT_PARAM2(WebView2_FireNavigationCompleted,
00172         uint64_t, ObjectPointer,
00173         bool, hasEventHandlers,
00174         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00175
00176     DEFINE_TRACELOGGING_EVENT_PARAM2(WebView2_CreateCoreObjects,
00177         bool, IsStart,
00178         uint64_t, ObjectPointer,
00179         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00180
00181     DEFINE_TRACELOGGING_EVENT_PARAM2(WebView2_TryCompleteInitialization,
00182         bool, IsStart,
00183         uint64_t, ObjectPointer,
00184         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00185
00186     DEFINE_TRACELOGGING_EVENT_PARAM2(MapControl_InitializeWebMap,
00187         bool, IsStart,
00188         uint64_t, ObjectPointer,
00189         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00190
00191     DEFINE_TRACELOGGING_EVENT_PARAM1(MapControl_WebViewNavigationCompleted,
00192         uint64_t, ObjectPointer,
00193         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00194
00195     DEFINE_TRACELOGGING_EVENT_PARAM2(MapControl_WebMessageReceived_Error,
00196         uint64_t, ObjectPointer,
00197         PCWSTR, Message,
00198         TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
00199 };
00200 #pragma warning(pop)
00201
00202 struct PerfXamlEvent_RAII
00203 {
00204 public:
00205     PerfXamlEvent_RAII(uint64_t objectPointer, PCSTR eventName, bool isInteresting)
00206         : m_objectPointer(objectPointer)
00207         , m_eventName(eventName)
00208         , m_isInteresting(isInteresting)
00209     {
00210         XamlTelemetry::PerfXamlEvent(true, m_objectPointer, m_eventName, m_isInteresting);
00211     }
00212
00213     ~PerfXamlEvent_RAII()
00214     {
00215         XamlTelemetry::PerfXamlEvent(false, m_objectPointer, m_eventName, m_isInteresting);
00216     }
00217
00218     // Disallow copying/moving
00219     PerfXamlEvent_RAII(const PerfXamlEvent_RAII&) = delete;
00220     PerfXamlEvent_RAII(PerfXamlEvent_RAII&&) = delete;
00221     PerfXamlEvent_RAII& operator=(const PerfXamlEvent_RAII&) = delete;
00222     PerfXamlEvent_RAII& operator=(PerfXamlEvent_RAII&&) = delete;
00223
00224 private:
00225     uint64_t m_objectPointer;
00226     PCSTR m_eventName;
00227     bool m_isInteresting;
00228 };
00229
00230 struct SimpleXamlStartStopEvent_RAII
00231 {
00232 public:
00233     // Disallow copying/moving
00234     SimpleXamlStartStopEvent_RAII(const SimpleXamlStartStopEvent_RAII&) = delete;
00235     SimpleXamlStartStopEvent_RAII(SimpleXamlStartStopEvent_RAII&&) = delete;
00236     SimpleXamlStartStopEvent_RAII& operator=(const SimpleXamlStartStopEvent_RAII&) = delete;
00237     SimpleXamlStartStopEvent_RAII& operator=(SimpleXamlStartStopEvent_RAII&&) = delete;
00238
00239 protected:
00240     SimpleXamlStartStopEvent_RAII(uint64_t objectPointer)
00241         : m_objectPointer(objectPointer)
00242     {
00243     }
00244
00245     uint64_t m_objectPointer;
00246 };
Generated on Sun Dec 1 2024 20:52:20 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonAutomationPeer.h Source File

  • File List
  • File Members
  • SplitButton

SplitButtonAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "SplitButton.h"
00007 #include "SplitButtonAutomationPeer.g.h"
00008
00009 class SplitButtonAutomationPeer :
00010     public ReferenceTracker<SplitButtonAutomationPeer, winrt::implementation::SplitButtonAutomationPeerT>
00011 {
00012
00013 public:
00014     SplitButtonAutomationPeer(winrt::SplitButton const& owner);
00015
00016     // IAutomationPeerOverrides
00017     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00018     hstring GetClassNameCore();
00019     winrt::AutomationControlType GetAutomationControlTypeCore();
00020
00021     // IExpandCollapseProvider
00022     winrt::ExpandCollapseState ExpandCollapseState();
00023     void Expand();
00024     void Collapse();
00025
00026     // IInvokeProvider
00027     void Invoke();
00028
00029 private:
00030     com_ptr<SplitButton> GetImpl();
00031 };
00032
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/CornerRadiusToThicknessConverter.idl Source File

  • File List
  • File Members
  • Common

CornerRadiusToThicknessConverter.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XCP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 [default_interface]
00007 runtimeclass CornerRadiusToThicknessConverter : Microsoft.UI.Xaml.DependencyObject, Microsoft.UI.Xaml.Data.IValueConverter
00008 {
00009     CornerRadiusToThicknessConverter();
00010
00011     [MUX_DEFAULT_VALUE("winrt::CornerRadiusToThicknessConverterKind::FilterLeftAndRightFromTop")]
00012     CornerRadiusToThicknessConverterKind  ConversionKind{ get; set; };
00013     [MUX_DEFAULT_VALUE("1.0f")]
00014     Double Multiplier{ get; set; };
00015
00016     static Microsoft.UI.Xaml.DependencyProperty ConversionKindProperty{ get; };
00017     static Microsoft.UI.Xaml.DependencyProperty MultiplierProperty{ get; };
00018 };
00019
00020 [MUX_PUBLIC]
00021 [webhosthidden]
00022 enum CornerRadiusToThicknessConverterKind
00023 {
00024     FilterTopAndBottomFromLeft,
00025     FilterTopAndBottomFromRight,
00026     FilterLeftAndRightFromTop,
00027     FilterLeftAndRightFromBottom,
00028     FilterTopFromTopLeft,
00029     FilterTopFromTopRight,
00030     FilterRightFromTopRight,
00031     FilterRightFromBottomRight,
00032     FilterBottomFromBottomRight,
00033     FilterBottomFromBottomLeft,
00034     FilterLeftFromBottomLeft,
00035     FilterLeftFromTopLeft,
00036 };
00037
00038 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/UniformGridLayout.cpp Source File

  • File List
  • File Members
  • Repeater

UniformGridLayout.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "FlowLayoutAlgorithm.h"
00008 #include "UniformGridLayoutState.h"
00009 #include "UniformGridLayout.h"
00010 #include "RuntimeProfiler.h"
00011 #include "VirtualizingLayoutContext.h"
00012
00013 #pragma region IUniformGridLayout
00014
00015 UniformGridLayout::UniformGridLayout()
00016 {
00017     __RP_Marker_ClassById(RuntimeProfiler::ProfId_UniformGridLayout);
00018     LayoutId(L"UniformGridLayout");
00019
00020     UpdateIndexBasedLayoutOrientation(winrt::Orientation::Horizontal);
00021 }
00022
00023 #pragma endregion
00024
00025 #pragma region IVirtualizingLayoutOverrides
00026
00027 void UniformGridLayout::InitializeForContextCore(winrt::VirtualizingLayoutContext const& context)
00028 {
00029     auto state = context.LayoutState();
00030     winrt::com_ptr<UniformGridLayoutState> gridState = nullptr;
00031     if (state)
00032     {
00033         gridState = GetAsGridState(state);
00034     }
00035
00036     if (!gridState)
00037     {
00038         if (state)
00039         {
00040             throw winrt::hresult_error(E_FAIL, L"LayoutState must derive from UniformGridLayoutState.");
00041         }
00042
00043         // Custom deriving layouts could potentially be stateful.
00044         // If that is the case, we will just create the base state required by UniformGridLayout ourselves.
00045         gridState = winrt::make_self<UniformGridLayoutState>();
00046     }
00047
00048     gridState->InitializeForContext(context, this);
00049 }
00050
00051 void UniformGridLayout::UninitializeForContextCore(winrt::VirtualizingLayoutContext const& context)
00052 {
00053     auto gridState = GetAsGridState(context.LayoutState());
00054     gridState->UninitializeForContext(context);
00055 }
00056
00057 winrt::Size UniformGridLayout::MeasureOverride(
00058     winrt::VirtualizingLayoutContext const& context,
00059     winrt::Size const& availableSize)
00060 {
00061     // Set the width and height on the grid state. If the user already set them then use the preset.
00062     // If not, we have to measure the first element and get back a size which we're going to be using for the rest of the items.
00063     auto gridState = GetAsGridState(context.LayoutState());
00064     gridState->EnsureElementSize(availableSize, context, m_minItemWidth, m_minItemHeight, m_itemsStretch, Orientation(), MinRowSpacing(), MinColumnSpacing(), m_maximumRowsOrColumns);
00065
00066     const auto desiredSize = GetFlowAlgorithm(context).Measure(
00067         availableSize,
00068         context,
00069         true, /* isWrapping*/
00070         MinItemSpacing(),
00071         LineSpacing(),
00072         m_maximumRowsOrColumns /* maxItemsPerLine */,
00073         OrientationBasedMeasures::GetScrollOrientation(),
00074         true /* isVirtualizationEnabled */,
00075         LayoutId());
00076
00077     return { desiredSize.Width, desiredSize.Height };
00078 }
00079
00080 winrt::Size UniformGridLayout::ArrangeOverride(
00081     winrt::VirtualizingLayoutContext const& context,
00082     winrt::Size const& finalSize)
00083 {
00084     const auto value = GetFlowAlgorithm(context).Arrange(
00085         finalSize,
00086         context,
00087         true /* isWrapping */,
00088         static_cast<FlowLayoutAlgorithm::LineAlignment>(m_itemsJustification),
00089         LayoutId());
00090
00091     auto gridState = GetAsGridState(context.LayoutState());
00092     gridState->InvalidateElementSize();
00093
00094     return { value.Width, value.Height };
00095 }
00096
00097 void UniformGridLayout::OnItemsChangedCore(
00098     winrt::VirtualizingLayoutContext const& context,
00099     winrt::IInspectable const& source,
00100     winrt::NotifyCollectionChangedEventArgs const& args)
00101 {
00102     GetFlowAlgorithm(context).OnItemsSourceChanged(source, args, context);
00103     // Always invalidate layout to keep the view accurate.
00104     InvalidateLayout();
00105 }
00106 #pragma endregion
00107
00108 #pragma region IFlowLayoutAlgorithmDelegates
00109
00110 winrt::Size UniformGridLayout::Algorithm_GetMeasureSize(int index, const winrt::Size & availableSize, const winrt::VirtualizingLayoutContext& context)
00111 {
00112     const auto gridState = GetAsGridState(context.LayoutState());
00113     return winrt::Size{ static_cast<float>(gridState->EffectiveItemWidth()),static_cast<float>(gridState->EffectiveItemHeight()) };
00114 }
00115
00116 winrt::Size UniformGridLayout::Algorithm_GetProvisionalArrangeSize(int /*index*/, const winrt::Size & /*measureSize*/, winrt::Size const& /*desiredSize*/, const winrt::VirtualizingLayoutContext& context)
00117 {
00118     const auto gridState = GetAsGridState(context.LayoutState());
00119     return winrt::Size{ static_cast<float>(gridState->EffectiveItemWidth()),static_cast<float>(gridState->EffectiveItemHeight()) };
00120 }
00121
00122 bool UniformGridLayout::Algorithm_ShouldBreakLine(int /*index*/, double remainingSpace)
00123 {
00124     return remainingSpace < 0;
00125 }
00126
00127 winrt::FlowLayoutAnchorInfo UniformGridLayout::Algorithm_GetAnchorForRealizationRect(
00128     const winrt::Size & availableSize,
00129     const winrt::VirtualizingLayoutContext & context)
00130 {
00131     winrt::Rect bounds = winrt::Rect{ NAN, NAN, NAN, NAN };
00132     int anchorIndex = -1;
00133
00134     const int itemsCount = context.ItemCount();
00135     const auto realizationRect = context.RealizationRect();
00136     if (itemsCount > 0 && MajorSize(realizationRect) > 0)
00137     {
00138         const auto gridState = GetAsGridState(context.LayoutState());
00139         const auto lastExtent = gridState->FlowAlgorithm().LastExtent();
00140         const int itemsPerLine = GetItemsPerLine(availableSize, context);
00141         const double majorSize = (itemsCount / itemsPerLine) * (double)(GetMajorSizeWithSpacing(context));
00142         const double realizationWindowStartWithinExtent = static_cast<double>(MajorStart(realizationRect)) - static_cast<double>(MajorStart(lastExtent));
00143         if ((realizationWindowStartWithinExtent + MajorSize(realizationRect)) >= 0 && realizationWindowStartWithinExtent <= majorSize)
00144         {
00145             const double offset = std::max(0.0f, MajorStart(realizationRect) - MajorStart(lastExtent));
00146             const int anchorRowIndex = static_cast<int>(offset / GetMajorSizeWithSpacing(context));
00147
00148             anchorIndex = std::max(0, std::min(itemsCount - 1, anchorRowIndex * itemsPerLine));
00149             bounds = GetLayoutRectForDataIndex(availableSize, anchorIndex, lastExtent, context);
00150         }
00151     }
00152
00153     return winrt::FlowLayoutAnchorInfo
00154     {
00155         anchorIndex,
00156         MajorStart(bounds)
00157     };
00158 }
00159
00160 winrt::FlowLayoutAnchorInfo UniformGridLayout::Algorithm_GetAnchorForTargetElement(
00161     int targetIndex,
00162     const winrt::Size & availableSize,
00163     const winrt::VirtualizingLayoutContext & context)
00164 {
00165     int index = -1;
00166     double offset = NAN;
00167     const int count = context.ItemCount();
00168     if (targetIndex >= 0 && targetIndex < count)
00169     {
00170         const int itemsPerLine = GetItemsPerLine(availableSize, context);
00171         const int indexOfFirstInLine = (targetIndex / itemsPerLine) * itemsPerLine;
00172         index = indexOfFirstInLine;
00173         auto state = GetAsGridState(context.LayoutState());
00174         offset = MajorStart(GetLayoutRectForDataIndex(availableSize, indexOfFirstInLine, state->FlowAlgorithm().LastExtent(), context));
00175     }
00176
00177     return winrt::FlowLayoutAnchorInfo
00178     {
00179         index,
00180         offset
00181     };
00182 }
00183
00184 winrt::Rect UniformGridLayout::Algorithm_GetExtent(
00185     const winrt::Size& availableSize,
00186     const winrt::VirtualizingLayoutContext& context,
00187     const winrt::UIElement& firstRealized,
00188     int firstRealizedItemIndex,
00189     const winrt::Rect& firstRealizedLayoutBounds,
00190     const winrt::UIElement& lastRealized,
00191     int lastRealizedItemIndex,
00192     const winrt::Rect& lastRealizedLayoutBounds)
00193 {
00194     UNREFERENCED_PARAMETER(lastRealized);
00195
00196     auto extent = winrt::Rect{};
00197
00198     // Constants
00199     const int itemsCount = context.ItemCount();
00200     const float availableSizeMinor = Minor(availableSize);
00201     const int itemsPerLine =
00202         std::min( // note use of unsigned ints
00203             std::max(1u, std::isfinite(availableSizeMinor)
00204                 ? static_cast<unsigned int>((availableSizeMinor + MinItemSpacing()) / GetMinorSizeWithSpacing(context))
00205                 : itemsCount),
00206             std::max(1u, m_maximumRowsOrColumns));
00207     const float lineSize = GetMajorSizeWithSpacing(context);
00208
00209     if (itemsCount > 0)
00210     {
00211         // Only use all of the space if item stretch is fill, otherwise size layout according to items placed
00212         MinorSize(extent) =
00213             std::isfinite(availableSizeMinor) && m_itemsStretch == winrt::UniformGridLayoutItemsStretch::Fill ?
00214             availableSizeMinor :
00215             std::max(0.0f, itemsPerLine * GetMinorSizeWithSpacing(context) - static_cast<float>(MinItemSpacing()));
00216         MajorSize(extent) = std::max(0.0f, (itemsCount / itemsPerLine) * lineSize - static_cast<float>(LineSpacing()));
00217
00218         if (firstRealized)
00219         {
00220             MUX_ASSERT(lastRealized);
00221
00222             MajorStart(extent) = MajorStart(firstRealizedLayoutBounds) - (firstRealizedItemIndex / itemsPerLine) * lineSize;
00223             int remainingItems = itemsCount - lastRealizedItemIndex - 1;
00224             MajorSize(extent) = MajorEnd(lastRealizedLayoutBounds) - MajorStart(extent) + (remainingItems / itemsPerLine) * lineSize;
00225         }
00226         else
00227         {
00228             ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR, METH_NAME, this, LayoutId().data(), L"Estimating extent with no realized elements.");
00229         }
00230     }
00231     else
00232     {
00233         MUX_ASSERT(firstRealizedItemIndex == -1);
00234         MUX_ASSERT(lastRealizedItemIndex == -1);
00235     }
00236
00237     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_STR_FLT_FLT, METH_NAME, this,
00238         LayoutId().data(),
00239         L"Extent:", extent.Width, extent.Height);
00240     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this,
00241         L"Based on lineSize:", lineSize);
00242     ITEMSREPEATER_TRACE_INFO_DBG(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this,
00243         L"Based on items per line:", itemsPerLine);
00244     return extent;
00245 }
00246
00247 #pragma endregion
00248
00249 void UniformGridLayout::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00250 {
00251     auto property = args.Property();
00252     if (property == s_OrientationProperty)
00253     {
00254         auto orientation = unbox_value<winrt::Orientation>(args.NewValue());
00255
00256         //Note: For UniformGridLayout Vertical Orientation means we have a Horizontal ScrollOrientation. Horizontal Orientation means we have a Vertical ScrollOrientation.
00257         //i.e. the properties are the inverse of each other.
00258         const auto scrollOrientation = (orientation == winrt::Orientation::Horizontal) ? ScrollOrientation::Vertical : ScrollOrientation::Horizontal;
00259         OrientationBasedMeasures::SetScrollOrientation(scrollOrientation);
00260
00261         UpdateIndexBasedLayoutOrientation(orientation);
00262     }
00263     else if (property == s_MinColumnSpacingProperty)
00264     {
00265         m_minColumnSpacing = unbox_value<double>(args.NewValue());
00266     }
00267     else if (property == s_MinRowSpacingProperty)
00268     {
00269         m_minRowSpacing = unbox_value<double>(args.NewValue());
00270     }
00271     else if (property == s_ItemsJustificationProperty)
00272     {
00273         m_itemsJustification = unbox_value<winrt::UniformGridLayoutItemsJustification>(args.NewValue());
00274     }
00275     else if (property == s_ItemsStretchProperty)
00276     {
00277         m_itemsStretch = unbox_value<winrt::UniformGridLayoutItemsStretch>(args.NewValue());
00278     }
00279     else if (property == s_MinItemWidthProperty)
00280     {
00281         m_minItemWidth = unbox_value<double>(args.NewValue());
00282     }
00283     else if (property == s_MinItemHeightProperty)
00284     {
00285         m_minItemHeight = unbox_value<double>(args.NewValue());
00286     }
00287     else if (property == s_MaximumRowsOrColumnsProperty)
00288     {
00289         m_maximumRowsOrColumns = static_cast<unsigned int>(unbox_value<int>(args.NewValue()));
00290     }
00291
00292     InvalidateLayout();
00293 }
00294
00295 #pragma region private helpers
00296
00297 int UniformGridLayout::GetItemsPerLine(winrt::Size const& availableSize, winrt::VirtualizingLayoutContext const& context)
00298 {
00299     const int itemsPerLine = std::min( // note use of unsigned ints
00300         std::max(1u, static_cast<unsigned int>((Minor(availableSize) + MinItemSpacing()) / GetMinorSizeWithSpacing(context))),
00301         std::max(1u, m_maximumRowsOrColumns));
00302
00303     return itemsPerLine;
00304 }
00305
00306 float UniformGridLayout::GetMinorSizeWithSpacing(winrt::VirtualizingLayoutContext const& context)
00307 {
00308     const auto minItemSpacing = MinItemSpacing();
00309     const auto gridState = GetAsGridState(context.LayoutState());
00310     return GetScrollOrientation() == ScrollOrientation::Vertical ?
00311         static_cast<float>(gridState->EffectiveItemWidth() + minItemSpacing) :
00312         static_cast<float>(gridState->EffectiveItemHeight() + minItemSpacing);
00313 }
00314
00315 float UniformGridLayout::GetMajorSizeWithSpacing(winrt::VirtualizingLayoutContext const& context)
00316 {
00317     const auto lineSpacing = LineSpacing();
00318     const auto gridState = GetAsGridState(context.LayoutState());
00319     return GetScrollOrientation() == ScrollOrientation::Vertical ?
00320         static_cast<float>(gridState->EffectiveItemHeight() + lineSpacing) :
00321         static_cast<float>(gridState->EffectiveItemWidth() + lineSpacing);
00322 }
00323
00324 winrt::Rect UniformGridLayout::GetLayoutRectForDataIndex(
00325     const winrt::Size& availableSize,
00326     int index,
00327     const winrt::Rect& lastExtent,
00328     const winrt::VirtualizingLayoutContext& context)
00329 {
00330     const int itemsPerLine = GetItemsPerLine(availableSize, context);
00331     const int rowIndex = static_cast<int>(index / itemsPerLine);
00332     const int indexInRow = index - (rowIndex * itemsPerLine);
00333
00334     auto gridState = GetAsGridState(context.LayoutState());
00335     const winrt::Rect bounds = MinorMajorRect(
00336         indexInRow * GetMinorSizeWithSpacing(context) + MinorStart(lastExtent),
00337         rowIndex * GetMajorSizeWithSpacing(context) + MajorStart(lastExtent),
00338         GetScrollOrientation() == ScrollOrientation::Vertical ? static_cast<float>(gridState->EffectiveItemWidth()) : static_cast<float>(gridState->EffectiveItemHeight()),
00339         GetScrollOrientation() == ScrollOrientation::Vertical ? static_cast<float>(gridState->EffectiveItemHeight()) : static_cast<float>(gridState->EffectiveItemWidth()));
00340
00341     return bounds;
00342 }
00343
00344 void UniformGridLayout::UpdateIndexBasedLayoutOrientation(const winrt::Orientation& orientation)
00345 {
00346     SetIndexBasedLayoutOrientation(orientation == winrt::Orientation::Horizontal ?
00347         winrt::IndexBasedLayoutOrientation::LeftToRight : winrt::IndexBasedLayoutOrientation::TopToBottom);
00348 }
00349
00350 #pragma endregion
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabView Member List

This is the complete list of members for TabView, including all inherited members.
abi_enter() | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
AddTabButtonClick(winrt::TypedEventHandler< winrt::TabView, winrt::IInspectable > const &value) | TabViewProperties |
AddTabButtonClick(winrt::event_token const &token) | TabViewProperties |
AddTabButtonCommand(winrt::ICommand const &value) | TabViewProperties |
AddTabButtonCommand() | TabViewProperties |
AddTabButtonCommandParameter(winrt::IInspectable const &value) | TabViewProperties |
AddTabButtonCommandParameter() | TabViewProperties |
AddTabButtonCommandParameterProperty() | TabViewProperties | [inline, static]
AddTabButtonCommandProperty() | TabViewProperties | [inline, static]
AllowDropTabs(bool value) | TabViewProperties |
AllowDropTabs() | TabViewProperties |
AllowDropTabsProperty() | TabViewProperties | [inline, static]
AttachMoveSizeLoopEvents() | TabView |
BringSelectedTabIntoView() | TabView | [private]
CanDragTabs(bool value) | TabViewProperties |
CanDragTabs() | TabViewProperties |
CanDragTabsProperty() | TabViewProperties | [inline, static]
CanReorderTabs(bool value) | TabViewProperties |
CanReorderTabs() | TabViewProperties |
CanReorderTabsProperty() | TabViewProperties | [inline, static]
CanTearOutTabs(bool value) | TabViewProperties |
CanTearOutTabs() | TabViewProperties |
CanTearOutTabsProperty() | TabViewProperties | [inline, static]
CheckThread() | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
ClearProperties() | TabViewProperties | [static]
CloseButtonOverlayMode(winrt::TabViewCloseButtonOverlayMode const &value) | TabViewProperties |
CloseButtonOverlayMode() | TabViewProperties |
CloseButtonOverlayModeProperty() | TabViewProperties | [inline, static]
ContainerFromIndex(int index) | TabView |
ContainerFromItem(winrt::IInspectable const &item) | TabView |
DeleteInstanceOnUIThread(std::unique_ptr< TabView > &&self) noexcept | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline, static]
DragTabWithinTabView(const winrt::WindowRectChangingEventArgs &args) | TabView | [private]
DragTornOutTab(const winrt::WindowRectChangingEventArgs &args) | TabView | [private]
EnsureProperties() | TabViewProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
ExternalTornOutTabsDropped(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppedEventArgs > const &value) | TabViewProperties |
ExternalTornOutTabsDropped(winrt::event_token const &token) | TabViewProperties |
ExternalTornOutTabsDropping(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewExternalTornOutTabsDroppingEventArgs > const &value) | TabViewProperties |
ExternalTornOutTabsDropping(winrt::event_token const &token) | TabViewProperties |
final_release(std::unique_ptr< TabView > &&self) | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline, static]
FindTabViewItemFromDragItem(const winrt::IInspectable &item) | TabView | [private]
GetAppWindowCoordinateConverter() | TabView |
GetAppWindowId() | TabView | [private]
GetBase() | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
GetInner() | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
GetInputNonClientPointerSource() | TabView |
GetItemCount() | TabView |
GetTabAtPoint(const winrt::Point &point) | TabView | [private]
GetTabCloseButtonTooltipText() | TabView | [inline]
GetTabInsertionIndex(winrt::TabView const &otherTabView, winrt::PointInt32 const &screenPosition) | TabView | [private]
GetTabViewWithTearOutList() | TabView | [static]
IndexFromContainer(winrt::DependencyObject const &container) | TabView |
IsAddTabButtonVisible(bool value) | TabViewProperties |
IsAddTabButtonVisible() | TabViewProperties |
IsAddTabButtonVisibleProperty() | TabViewProperties | [inline, static]
IsFocusable(winrt::DependencyObject const &object, bool checkTabStop=false) | TabView | [private, static]
IsOnThread() | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
ItemFromContainer(winrt::DependencyObject const &container) | TabView |
m_addTabButtonClickEventSource | TabViewProperties |
m_externalTornOutTabsDroppedEventSource | TabViewProperties |
m_externalTornOutTabsDroppingEventSource | TabViewProperties |
m_selectionChangedEventSource | TabViewProperties |
m_tabCloseRequestedEventSource | TabViewProperties |
m_tabDragCompletedEventSource | TabViewProperties |
m_tabDragStartingEventSource | TabViewProperties |
m_tabDroppedOutsideEventSource | TabViewProperties |
m_tabItemsChangedEventSource | TabViewProperties |
m_tabStripDragOverEventSource | TabViewProperties |
m_tabStripDropEventSource | TabViewProperties |
m_tabTearOutRequestedEventSource | TabViewProperties |
m_tabTearOutWindowRequestedEventSource | TabViewProperties |
m_tabViewBoundsTuples | TabView | [private]
MeasureOverride(winrt::Size const &availableSize) | TabView |
MoveFocus(bool moveForward) | TabView |
MoveSelection(bool moveForward) | TabView | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
OnAddButtonClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabView | [private]
OnAddButtonKeyDown(const winrt::IInspectable &sender, winrt::KeyRoutedEventArgs const &args) | TabView | [private]
OnApplyTemplate() | TabView |
OnCanTearOutTabsPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabView |
TabViewProperties::OnCanTearOutTabsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnCloseButtonOverlayModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabView |
TabViewProperties::OnCloseButtonOverlayModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnCreateAutomationPeer() | TabView |
OnCtrlF4Invoked(const winrt::KeyboardAccelerator &sender, const winrt::KeyboardAcceleratorInvokedEventArgs &args) | TabView | [private]
OnCtrlShiftTabInvoked(const winrt::KeyboardAccelerator &sender, const winrt::KeyboardAcceleratorInvokedEventArgs &args) | TabView | [private]
OnCtrlTabInvoked(const winrt::KeyboardAccelerator &sender, const winrt::KeyboardAcceleratorInvokedEventArgs &args) | TabView | [private]
OnEnteredMoveSize(const winrt::InputNonClientPointerSource &sender, const winrt::EnteredMoveSizeEventArgs &args) | TabView | [private]
OnEnteringMoveSize(const winrt::InputNonClientPointerSource &sender, const winrt::EnteringMoveSizeEventArgs &args) | TabView | [private]
OnExitedMoveSize(const winrt::InputNonClientPointerSource &sender, const winrt::ExitedMoveSizeEventArgs &args) | TabView | [private]
OnItemsChanged(winrt::IInspectable const &item) | TabView |
OnItemsPresenterSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | TabView | [private]
OnListViewDragEnter(const winrt::IInspectable &sender, const winrt::DragEventArgs &args) | TabView | [private]
OnListViewDraggingPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyProperty &args) | TabView | [private]
OnListViewDragItemsCompleted(const winrt::IInspectable &sender, const winrt::DragItemsCompletedEventArgs &args) | TabView | [private]
OnListViewDragItemsStarting(const winrt::IInspectable &sender, const winrt::DragItemsStartingEventArgs &args) | TabView | [private]
OnListViewDragLeave(const winrt::IInspectable &sender, const winrt::DragEventArgs &args) | TabView | [private]
OnListViewDragOver(const winrt::IInspectable &sender, const winrt::DragEventArgs &args) | TabView | [private]
OnListViewDrop(const winrt::IInspectable &sender, const winrt::DragEventArgs &args) | TabView | [private]
OnListViewGettingFocus(const winrt::IInspectable &sender, const winrt::GettingFocusEventArgs &args) | TabView | [private]
OnListViewLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabView | [private]
OnListViewSelectionChanged(const winrt::IInspectable &sender, const winrt::SelectionChangedEventArgs &args) | TabView | [private]
OnListViewSizeChanged(const winrt::IInspectable &sender, const winrt::SizeChangedEventArgs &args) | TabView | [private]
OnLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabView | [private]
OnScrollDecreaseClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabView | [private]
OnScrollIncreaseClick(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabView | [private]
OnScrollViewerLoaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabView | [private]
OnScrollViewerViewChanged(winrt::IInspectable const &sender, winrt::ScrollViewerViewChangedEventArgs const &args) | TabView | [private]
OnSelectedIndexPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabView |
TabViewProperties::OnSelectedIndexPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnSelectedItemPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabView |
TabViewProperties::OnSelectedItemPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnTabItemsSourcePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabView |
TabViewProperties::OnTabItemsSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnTabStripPointerEntered(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | TabView | [private]
OnTabStripPointerExited(const winrt::IInspectable &sender, const winrt::PointerRoutedEventArgs &args) | TabView | [private]
OnTabWidthModePropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TabView |
TabViewProperties::OnTabWidthModePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TabViewProperties | [static]
OnUnloaded(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) | TabView | [private]
OnWindowRectChanging(const winrt::InputNonClientPointerSource &sender, const winrt::WindowRectChangingEventArgs &args) | TabView | [private]
PopulateTabViewList() | TabView | [private]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< TabView, winrt::implementation::TabViewT > | [inline]
RequestCloseCurrentTab() | TabView | [private]
RequestCloseTab(winrt::TabViewItem const &item, bool updateTabWidths) | TabView |
s_AddTabButtonCommandParameterProperty | TabViewProperties | [static]
s_AddTabButtonCommandProperty | TabViewProperties | [static]
s_AllowDropTabsProperty | TabViewProperties | [static]
s_CanDragTabsProperty | TabViewProperties | [static]
s_CanReorderTabsProperty | TabViewProperties | [static]
s_CanTearOutTabsProperty | TabViewProperties | [static]
s_CloseButtonOverlayModeProperty | TabViewProperties | [static]
s_IsAddTabButtonVisibleProperty | TabViewProperties | [static]
s_SelectedIndexProperty | TabViewProperties | [static]
s_SelectedItemProperty | TabViewProperties | [static]
s_TabItemsProperty | TabViewProperties | [static]
s_TabItemsSourceProperty | TabViewProperties | [static]
s_TabItemTemplateProperty | TabViewProperties | [static]
s_TabItemTemplateSelectorProperty | TabViewProperties | [static]
s_TabStripFooterProperty | TabViewProperties | [static]
s_TabStripFooterTemplateProperty | TabViewProperties | [static]
s_TabStripHeaderProperty | TabViewProperties | [static]
s_TabStripHeaderTemplateProperty | TabViewProperties | [static]
s_tabViewWithTearOutList | TabView | [private, static]
s_TabWidthModeProperty | TabViewProperties | [static]
s_tabWithTearOutListMutex | TabView | [private, static]
SelectedIndex(int value) | TabViewProperties |
SelectedIndex() | TabViewProperties |
SelectedIndexProperty() | TabViewProperties | [inline, static]
SelectedItem(winrt::IInspectable const &value) | TabViewProperties |
SelectedItem() | TabViewProperties |
SelectedItemProperty() | TabViewProperties | [inline, static]
SelectionChanged(winrt::SelectionChangedEventHandler const &value) | TabViewProperties |
SelectionChanged(winrt::event_token const &token) | TabViewProperties |
SetTabSeparatorOpacity(int index, int opacityValue) | TabView |
SetTabSeparatorOpacity(int index) | TabView |
TabCloseRequested(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabCloseRequestedEventArgs > const &value) | TabViewProperties |
TabCloseRequested(winrt::event_token const &token) | TabViewProperties |
TabDragCompleted(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragCompletedEventArgs > const &value) | TabViewProperties |
TabDragCompleted(winrt::event_token const &token) | TabViewProperties |
TabDragStarting(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDragStartingEventArgs > const &value) | TabViewProperties |
TabDragStarting(winrt::event_token const &token) | TabViewProperties |
TabDroppedOutside(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabDroppedOutsideEventArgs > const &value) | TabViewProperties |
TabDroppedOutside(winrt::event_token const &token) | TabViewProperties |
TabItems(winrt::IVector< winrt::IInspectable > const &value) | TabViewProperties |
TabItems() | TabViewProperties |
TabItemsChanged(winrt::TypedEventHandler< winrt::TabView, winrt::IVectorChangedEventArgs > const &value) | TabViewProperties |
TabItemsChanged(winrt::event_token const &token) | TabViewProperties |
TabItemsProperty() | TabViewProperties | [inline, static]
TabItemsSource(winrt::IInspectable const &value) | TabViewProperties |
TabItemsSource() | TabViewProperties |
TabItemsSourceProperty() | TabViewProperties | [inline, static]
TabItemTemplate(winrt::DataTemplate const &value) | TabViewProperties |
TabItemTemplate() | TabViewProperties |
TabItemTemplateProperty() | TabViewProperties | [inline, static]
TabItemTemplateSelector(winrt::DataTemplateSelector const &value) | TabViewProperties |
TabItemTemplateSelector() | TabViewProperties |
TabItemTemplateSelectorProperty() | TabViewProperties | [inline, static]
TabStripDragOver(winrt::DragEventHandler const &value) | TabViewProperties |
TabStripDragOver(winrt::event_token const &token) | TabViewProperties |
TabStripDrop(winrt::DragEventHandler const &value) | TabViewProperties |
TabStripDrop(winrt::event_token const &token) | TabViewProperties |
TabStripFooter(winrt::IInspectable const &value) | TabViewProperties |
TabStripFooter() | TabViewProperties |
TabStripFooterProperty() | TabViewProperties | [inline, static]
TabStripFooterTemplate(winrt::DataTemplate const &value) | TabViewProperties |
TabStripFooterTemplate() | TabViewProperties |
TabStripFooterTemplateProperty() | TabViewProperties | [inline, static]
TabStripHeader(winrt::IInspectable const &value) | TabViewProperties |
TabStripHeader() | TabViewProperties |
TabStripHeaderProperty() | TabViewProperties | [inline, static]
TabStripHeaderTemplate(winrt::DataTemplate const &value) | TabViewProperties |
TabStripHeaderTemplate() | TabViewProperties |
TabStripHeaderTemplateProperty() | TabViewProperties | [inline, static]
TabTearOutRequested(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutRequestedEventArgs > const &value) | TabViewProperties |
TabTearOutRequested(winrt::event_token const &token) | TabViewProperties |
TabTearOutWindowRequested(winrt::TypedEventHandler< winrt::TabView, winrt::TabViewTabTearOutWindowRequestedEventArgs > const &value) | TabViewProperties |
TabTearOutWindowRequested(winrt::event_token const &token) | TabViewProperties |
TabView() | TabView |
TabViewProperties() | TabViewProperties |
TabWidthMode(winrt::TabViewWidthMode const &value) | TabViewProperties |
TabWidthMode() | TabViewProperties |
TabWidthModeProperty() | TabViewProperties | [inline, static]
TearOutTab(winrt::TabViewItem const &tabBeingDragged, winrt::Point const &pointerPosition) | TabView | [private]
UnhookEventsAndClearFields() | TabView | [private]
UpdateBottomBorderLineVisualStates() | TabView | [private]
UpdateIsItemDraggedOver(bool isItemDraggedOver) | TabView | [private]
UpdateListViewItemContainerTransitions() | TabView | [private]
UpdateNonClientRegion() | TabView | [private]
UpdateScrollViewerDecreaseAndIncreaseButtonsViewState() | TabView | [private]
UpdateSelectedIndex() | TabView | [private]
UpdateSelectedItem() | TabView | [private]
UpdateTabBottomBorderLineVisualStates() | TabView | [private]
UpdateTabContent() | TabView |
UpdateTabIndex(winrt::TabViewItem const &tabBeingDragged, winrt::Point const &pointerPosition) | TabView | [private]
UpdateTabViewWithTearOutList() | TabView |
UpdateTabWidths(bool shouldUpdateWidths=true, bool fillAllAvailableSpace=true) | TabView |
~TabView() | TabView |
Generated on Sun Dec 1 2024 20:53:14 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnnotatedScrollBar/AnnotatedScrollBar.idl Source File

  • File List
  • File Members
  • AnnotatedScrollBar

AnnotatedScrollBar.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XC_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC_V5]
00005 [webhosthidden]
00006 enum AnnotatedScrollBarScrollingEventKind
00007 {
00008     Click = 0,
00009     Drag = 1,
00010     IncrementButton = 2,
00011     DecrementButton = 3,
00012 };
00013
00014 [MUX_PUBLIC_V5]
00015 [webhosthidden]
00016 runtimeclass AnnotatedScrollBarDetailLabelRequestedEventArgs
00017 {
00018     Object Content{ get; set; };
00019     Double ScrollOffset{ get; };
00020 }
00021
00022 [MUX_PUBLIC_V5]
00023 [webhosthidden]
00024 runtimeclass AnnotatedScrollBarScrollingEventArgs
00025 {
00026     Double ScrollOffset{ get; };
00027     AnnotatedScrollBarScrollingEventKind ScrollingEventKind{ get; };
00028     Boolean Cancel{ get; set; };
00029 }
00030
00031 [MUX_PUBLIC_V5]
00032 [webhosthidden]
00033 runtimeclass AnnotatedScrollBarLabel
00034 {
00035     AnnotatedScrollBarLabel(Object content, Double scrollOffset);
00036
00037     Object Content{ get; };
00038     Double ScrollOffset{ get; };
00039 }
00040
00041
00042 [MUX_PUBLIC_V5]
00043 [webhosthidden]
00044 [MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
00045 [MUX_PROPERTY_CHANGED_CALLBACK_METHODNAME("OnPropertyChanged")]
00046 unsealed runtimeclass AnnotatedScrollBar : Microsoft.UI.Xaml.Controls.Control
00047 {
00048     AnnotatedScrollBar();
00049
00050     Microsoft.UI.Xaml.Controls.Primitives.IScrollController ScrollController{ get; };
00051     Windows.Foundation.Collections.IVector<AnnotatedScrollBarLabel> Labels{ get; set; };
00052     Microsoft.UI.Xaml.IElementFactory LabelTemplate{ get; set; };
00053     Microsoft.UI.Xaml.IElementFactory DetailLabelTemplate{ get; set; } ;
00054     Double SmallChange{ get; set; };
00055
00056     event Windows.Foundation.TypedEventHandler<AnnotatedScrollBar, AnnotatedScrollBarScrollingEventArgs> Scrolling;
00057     event Windows.Foundation.TypedEventHandler<AnnotatedScrollBar, AnnotatedScrollBarDetailLabelRequestedEventArgs> DetailLabelRequested;
00058
00059     static Microsoft.UI.Xaml.DependencyProperty LabelsProperty{ get; };
00060     static Microsoft.UI.Xaml.DependencyProperty LabelTemplateProperty{ get; };
00061     static Microsoft.UI.Xaml.DependencyProperty DetailLabelTemplateProperty{ get; };
00062     static Microsoft.UI.Xaml.DependencyProperty SmallChangeProperty{ get; };
00063 }
00064
00065 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/PagerControlTemplateSettings.h Source File

  • File List
  • File Members
  • PagerControl

PagerControlTemplateSettings.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "PagerControlTemplateSettings.g.h"
00007 #include "PagerControlTemplateSettings.properties.h"
00008
00009 class PagerControlTemplateSettings :
00010     public winrt::implementation::PagerControlTemplateSettingsT<PagerControlTemplateSettings>,
00011     public PagerControlTemplateSettingsProperties
00012 {
00013 public:
00014     PagerControlTemplateSettings() { };
00015 };
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InkToolBarEraserFlyoutItemClickedEventArgs Member List

This is the complete list of members for InkToolBarEraserFlyoutItemClickedEventArgs, including all inherited members.
abi_enter() | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
CheckThread() | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< InkToolBarEraserFlyoutItemClickedEventArgs > &&self) noexcept | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
EraserFlyoutItemKind() | InkToolBarEraserFlyoutItemClickedEventArgs | [inline]
final_release(std::unique_ptr< InkToolBarEraserFlyoutItemClickedEventArgs > &&self) | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline, static]
GetBase() | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
GetInner() | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
Handled() | InkToolBarEraserFlyoutItemClickedEventArgs | [inline]
Handled(bool value) | InkToolBarEraserFlyoutItemClickedEventArgs | [inline]
IsOnThread() | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InkToolBarEraserFlyoutItemClickedEventArgs, winrt::implementation::InkToolBarEraserFlyoutItemClickedEventArgsT > | [inline]
Generated on Sun Dec 1 2024 20:52:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InfoBarAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

InfoBarAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InfoBarAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(InfoBarAutomationPeer)
00012 }
00013
00014 #include "InfoBarAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/ResetableCollection.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples

ResetableCollection.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Specialized;
00008 using MUXControlsTestApp.Utilities;
00009
00010 namespace MUXControlsTestApp.Utils
00011 {
00012     public class ResetableCollection<T> : ObservableCollection<T>
00013     {
00014         private Random _rnd = new Random(123);
00015
00016         public ResetableCollection(IEnumerable<T> collection)
00017             : base(collection)
00018         { }
00019
00020         public void ShuffleAndReset()
00021         {
00022             for (int i = 0; i < 5; i++)
00023             {
00024                 int from = _rnd.Next(0, Items.Count - 1);
00025                 var value = Items[from];
00026                 Items.RemoveAt(from);
00027                 int to = _rnd.Next(0, Items.Count - 1);
00028                 Items.Insert(to, value);
00029             }
00030
00031             OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
00032         }
00033     }
00034 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PagerControl/APITests/PagerControlTests.cs Source File

  • File List
  • File Members
  • PagerControl
  • APITests

PagerControlTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utilities;
00005 using System;
00006 using System.Threading;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Markup;
00009 using Microsoft.UI.Xaml.Media;
00010 using Common;
00011 using Microsoft.UI.Xaml.Controls;
00012 using System.Collections.Generic;
00013 using Microsoft.UI.Xaml.Automation.Peers;
00014 using Microsoft.UI.Xaml.Automation;
00015 using Microsoft.UI.Xaml.Automation.Provider;
00016 using Microsoft.UI.Xaml.Automation.Peers;
00017 using Microsoft.UI.Xaml.Controls;
00018
00019 using WEX.TestExecution;
00020 using WEX.TestExecution.Markup;
00021 using WEX.Logging.Interop;
00022
00023 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00024 {
00025
00026     [TestClass]
00027     public class PagerControlTests : ApiTestBase
00028     {
00029
00030         [TestMethod]
00031         public void VerifyAutomationPeerBehavior()
00032         {
00033             RunOnUIThread.Execute(() =>
00034             {
00035                 var pagerControl = new PagerControl();
00036                 pagerControl.NumberOfPages = 5;
00037                 Content = pagerControl;
00038
00039                 var peer = PagerControlAutomationPeer.CreatePeerForElement(pagerControl);
00040                 var selectionPeer = peer as ISelectionProvider;
00041                 Verify.AreEqual(false, selectionPeer.CanSelectMultiple);
00042                 Verify.AreEqual(true, selectionPeer.IsSelectionRequired);
00043                 Verify.AreEqual(AutomationLandmarkType.Navigation, peer.GetLandmarkType());
00044             });
00045         }
00046
00047         [TestMethod]
00048         public void VerifyNumberPanelButtonUIABehavior()
00049         {
00050             RunOnUIThread.Execute(()=>{
00051                 var pagerControl = new PagerControl();
00052                 pagerControl.NumberOfPages = 5;
00053                 pagerControl.DisplayMode = PagerControlDisplayMode.ButtonPanel;
00054                 Content = pagerControl;
00055             });
00056
00057             IdleSynchronizer.Wait();
00058
00059             RunOnUIThread.Execute(() =>
00060             {
00061                 var rootGrid = VisualTreeHelper.GetChild(Content, 0) as Grid;
00062                 var repeater = VisualTreeHelper.GetChild(rootGrid, 2) as ItemsRepeater;
00063
00064                 for(int i=0;i<5;i++)
00065                 {
00066                     var button = repeater.TryGetElement(i);
00067                     Verify.IsNotNull(button);
00068                     Verify.AreEqual(i + 1, button.GetValue(AutomationProperties.PositionInSetProperty));
00069                     Verify.AreEqual(5, button.GetValue(AutomationProperties.SizeOfSetProperty));
00070                 }
00071             });
00072         }
00073
00074         [TestMethod]
00075         public void VerifyComboBoxItemsListNormal()
00076         {
00077             PagerControl control = null;
00078             RunOnUIThread.Execute(() =>
00079             {
00080                 control = new PagerControl();
00081                 control.NumberOfPages = 5;
00082                 control.DisplayMode = PagerControlDisplayMode.ComboBox;
00083                 Content = control;
00084             });
00085
00086             IdleSynchronizer.Wait();
00087
00088             RunOnUIThread.Execute(() =>
00089             {
00090                 Verify.AreEqual(control.NumberOfPages, control.TemplateSettings.Pages.Count);
00091                 for(int i=0;i<control.NumberOfPages;i++)
00092                 {
00093                     Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
00094                 }
00095                 control.NumberOfPages = 100;
00096             });
00097
00098             IdleSynchronizer.Wait();
00099
00100             RunOnUIThread.Execute(() =>
00101             {
00102                 Verify.AreEqual(control.NumberOfPages, control.TemplateSettings.Pages.Count);
00103                 for (int i = 0; i < control.NumberOfPages; i++)
00104                 {
00105                     Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
00106                 }
00107             });
00108         }
00109
00110         [TestMethod]
00111         public void VerifyComboBoxItemsInfiniteItems()
00112         {
00113             PagerControl control = null;
00114             RunOnUIThread.Execute(() =>
00115             {
00116                 control = new PagerControl();
00117                 control.NumberOfPages = 5;
00118                 control.DisplayMode = PagerControlDisplayMode.ComboBox;
00119                 Content = control;
00120                 control.NumberOfPages = -1;
00121             });
00122
00123             IdleSynchronizer.Wait();
00124
00125             RunOnUIThread.Execute(() =>
00126             {
00127                 Verify.AreEqual(100, control.TemplateSettings.Pages.Count);
00128                 for (int i = 0; i < 100; i++)
00129                 {
00130                     Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
00131                 }
00132                 control.NumberOfPages = 200;
00133                 control.UpdateLayout();
00134                 control.NumberOfPages = -1;
00135             });
00136
00137             IdleSynchronizer.Wait();
00138
00139             RunOnUIThread.Execute(() =>
00140             {
00141                 Verify.AreEqual(200, control.TemplateSettings.Pages.Count);
00142                 for (int i = 0; i < 200; i++)
00143                 {
00144                     Verify.AreEqual(i + 1, control.TemplateSettings.Pages[i]);
00145                 }
00146             });
00147         }
00148
00149         [TestMethod]
00150         public void VerifyEmptyPagerDoesNotCrash()
00151         {
00152             RunOnUIThread.Execute(() =>
00153             {
00154                 Content = new PagerControl();
00155             });
00156
00157             IdleSynchronizer.Wait();
00158
00159             RunOnUIThread.Execute(() =>
00160             {
00161                 Verify.IsNotNull(Content);
00162             });
00163         }
00164
00165         [TestMethod]
00166         public void VerifySelectedIndexChangedEventArgs()
00167         {
00168             PagerControl pager = null;
00169             var previousIndex = -2;
00170             var newIndex = -2;
00171             RunOnUIThread.Execute(() =>
00172             {
00173                 pager = new PagerControl();
00174                 pager.SelectedIndexChanged += Pager_SelectedIndexChanged;
00175                 Content = pager;
00176
00177             });
00178
00179             IdleSynchronizer.Wait();
00180
00181             RunOnUIThread.Execute(() =>
00182             {
00183                 VerifySelectionChanged(-1, 0);
00184
00185                 pager.NumberOfPages = 10;
00186                 VerifySelectionChanged(-1, 0);
00187
00188                 pager.SelectedPageIndex = 9;
00189                 VerifySelectionChanged(0, 9);
00190
00191                 pager.SelectedPageIndex = 4;
00192                 VerifySelectionChanged(9, 4);
00193             });
00194
00195             void Pager_SelectedIndexChanged(PagerControl sender, PagerControlSelectedIndexChangedEventArgs args)
00196             {
00197                 previousIndex = args.PreviousPageIndex;
00198                 newIndex = args.NewPageIndex;
00199             }
00200
00201             void VerifySelectionChanged(int expectedPreviousIndex, int expectedNewIndex)
00202             {
00203                 Verify.AreEqual(expectedPreviousIndex, previousIndex, "Expected PreviousPageIndex:" + expectedPreviousIndex + ", actual: " + previousIndex);
00204                 Verify.AreEqual(expectedNewIndex, newIndex, "Expected PreviousPageIndex:" + expectedNewIndex + ", actual: " + newIndex);
00205             }
00206         }
00207     }
00208 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AcrylicBrushProperties Member List

This is the complete list of members for AcrylicBrushProperties, including all inherited members.
AcrylicBrushProperties() | AcrylicBrushProperties |
AlwaysUseFallback(bool value) | AcrylicBrushProperties |
AlwaysUseFallback() | AcrylicBrushProperties |
AlwaysUseFallbackProperty() | AcrylicBrushProperties | [inline, static]
ClearProperties() | AcrylicBrushProperties | [static]
EnsureProperties() | AcrylicBrushProperties | [static]
OnAlwaysUseFallbackPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AcrylicBrushProperties | [static]
OnTintColorPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AcrylicBrushProperties | [static]
OnTintLuminosityOpacityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AcrylicBrushProperties | [static]
OnTintOpacityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AcrylicBrushProperties | [static]
OnTintTransitionDurationPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | AcrylicBrushProperties | [static]
s_AlwaysUseFallbackProperty | AcrylicBrushProperties | [static]
s_TintColorProperty | AcrylicBrushProperties | [static]
s_TintLuminosityOpacityProperty | AcrylicBrushProperties | [static]
s_TintOpacityProperty | AcrylicBrushProperties | [static]
s_TintTransitionDurationProperty | AcrylicBrushProperties | [static]
TintColor(winrt::Color const &value) | AcrylicBrushProperties |
TintColor() | AcrylicBrushProperties |
TintColorProperty() | AcrylicBrushProperties | [inline, static]
TintLuminosityOpacity(winrt::IReference< double > const &value) | AcrylicBrushProperties |
TintLuminosityOpacity() | AcrylicBrushProperties |
TintLuminosityOpacityProperty() | AcrylicBrushProperties | [inline, static]
TintOpacity(double value) | AcrylicBrushProperties |
TintOpacity() | AcrylicBrushProperties |
TintOpacityProperty() | AcrylicBrushProperties | [inline, static]
TintTransitionDuration(winrt::TimeSpan const &value) | AcrylicBrushProperties |
TintTransitionDuration() | AcrylicBrushProperties |
TintTransitionDurationProperty() | AcrylicBrushProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:37 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

MyCustomNonVirtualizingStackLayout Member List

This is the complete list of members for MyCustomNonVirtualizingStackLayout, including all inherited members.
ArrangeOverride(NonVirtualizingLayoutContext context, Size finalSize) | MyCustomNonVirtualizingStackLayout | [inline, protected]
NonVirtualizingLayout::ArrangeOverride(winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &finalSize) | NonVirtualizingLayout | [virtual]
InitializeForContextCore(winrt::LayoutContext const &context) | NonVirtualizingLayout | [virtual]
MeasureOverride(NonVirtualizingLayoutContext context, Size availableSize) | MyCustomNonVirtualizingStackLayout | [inline, protected]
NonVirtualizingLayout::MeasureOverride(winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &availableSize) | NonVirtualizingLayout | [virtual]
NonVirtualizingLayout() | NonVirtualizingLayout |
UninitializeForContextCore(winrt::LayoutContext const &context) | NonVirtualizingLayout | [virtual]
Generated on Sun Dec 1 2024 20:53:34 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewAxeTestPage Member List

This is the complete list of members for NavigationViewAxeTestPage, including all inherited members.
NavigationViewAxeTestPage() NavigationViewAxeTestPage [inline]
Generated on Sun Dec 1 2024 20:54:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BasicDemo Member List

This is the complete list of members for BasicDemo, including all inherited members.
BasicDemo() | BasicDemo | [inline]
OnAddRecipeButton_Click(object sender, RoutedEventArgs e) | BasicDemo | [inline, private]
OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args) | BasicDemo | [inline, private]
simpleStringsList | BasicDemo |
Generated on Sun Dec 1 2024 20:54:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LayoutsTestHooksFactory.h Source File

  • File List
  • File Members
  • Repeater

LayoutsTestHooksFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "LayoutsTestHooks.h"
00007
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ITintEffect Member List

This is the complete list of members for ITintEffect, including all inherited members.
ClampOutput([out, retval] boolean *value) | ITintEffect
ClampOutput([in] boolean value) | ITintEffect
Color([out, retval] Windows.UI.Color *value) | ITintEffect
Color([in] Windows.UI.Color value) | ITintEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ITintEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ITintEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedVisual Member List

This is the complete list of members for AnimatedVisual, including all inherited members.
AnimatedVisual(Compositor compositor, winrt::CompositionPropertySet themeProperties) | AnimatedVisual | [inline]
BindProperty(CompositionObject target, winrt::hstring animatedPropertyName, winrt::hstring expression, winrt::hstring referenceParameterName, CompositionObject referencedObject) | AnimatedVisual | [inline, private]
Close() | AnimatedVisual | [inline]
ContainerShape() | AnimatedVisual | [inline, private]
CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedVisual | [inline, private]
CreateSpriteShape(CompositionGeometry geometry, float3x2 transformMatrix) | AnimatedVisual | [inline, private]
CreateVector2KeyFrameAnimation(float initialProgress, float2 initialValue, CompositionEasingFunction initialEasingFunction) | AnimatedVisual | [inline, private]
CubicBezierEasingFunction_0() | AnimatedVisual | [inline, private]
Duration() const | AnimatedVisual | [inline]
Ellipse_7_0() | AnimatedVisual | [inline, private]
Ellipse_7_1() | AnimatedVisual | [inline, private]
Ellipse_7_2() | AnimatedVisual | [inline, private]
HoldThenStepEasingFunction() | AnimatedVisual | [inline, private]
IsRuntimeCompatible() | AnimatedVisual | [inline, static]
Root() | AnimatedVisual | [inline, private]
RootProgress() | AnimatedVisual | [inline, private]
RootVisual() const | AnimatedVisual | [inline]
ShapeVisibilityAnimation() | AnimatedVisual | [inline, private]
ShapeVisual_0() | AnimatedVisual | [inline, private]
Size() const | AnimatedVisual | [inline]
SpriteShape_0() | AnimatedVisual | [inline, private]
SpriteShape_1() | AnimatedVisual | [inline, private]
SpriteShape_2() | AnimatedVisual | [inline, private]
StartProgressBoundAnimation(CompositionObject target, winrt::hstring animatedPropertyName, CompositionAnimation animation, ExpressionAnimation controllerProgressExpression) | AnimatedVisual | [inline, private, static]
StepThenHoldEasingFunction() | AnimatedVisual | [inline, private]
ThemeColor_Background() | AnimatedVisual | [inline, private]
ThemeColor_Foreground_0() | AnimatedVisual | [inline, private]
ThemeColor_Foreground_1() | AnimatedVisual | [inline, private]
TrimEndScalarAnimation_0_to_1() | AnimatedVisual | [inline, private]
Generated on Sun Dec 1 2024 20:53:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/InkCanvas.properties.cpp Source File

  • File List
  • File Members
  • Generated

InkCanvas.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "InkCanvas.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(InkCanvas)
00012 }
00013
00014 #include "InkCanvas.g.cpp"
00015
00016 GlobalDependencyProperty InkCanvasProperties::s_IsEnabledProperty{ nullptr };
00017
00018 InkCanvasProperties::InkCanvasProperties()
00019 {
00020     EnsureProperties();
00021 }
00022
00023 void InkCanvasProperties::EnsureProperties()
00024 {
00025     if (!s_IsEnabledProperty)
00026     {
00027         s_IsEnabledProperty =
00028             InitializeDependencyProperty(
00029                 L"IsEnabled",
00030                 winrt::name_of<bool>(),
00031                 winrt::name_of<winrt::InkCanvas>(),
00032                 false /* isAttached */,
00033                 ValueHelper<bool>::BoxValueIfNecessary(true),
00034                 winrt::PropertyChangedCallback(&OnIsEnabledPropertyChanged));
00035     }
00036 }
00037
00038 void InkCanvasProperties::ClearProperties()
00039 {
00040     s_IsEnabledProperty = nullptr;
00041 }
00042
00043 void InkCanvasProperties::OnIsEnabledPropertyChanged(
00044     winrt::DependencyObject const& sender,
00045     winrt::DependencyPropertyChangedEventArgs const& args)
00046 {
00047     auto owner = sender.as<winrt::InkCanvas>();
00048     winrt::get_self<InkCanvas>(owner)->OnIsEnabledPropertyChanged(args);
00049 }
00050
00051 void InkCanvasProperties::IsEnabled(bool value)
00052 {
00053     [[gsl::suppress(con)]]
00054     {
00055     static_cast<InkCanvas*>(this)->SetValue(s_IsEnabledProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00056     }
00057 }
00058
00059 bool InkCanvasProperties::IsEnabled()
00060 {
00061     return ValueHelper<bool>::CastOrUnbox(static_cast<InkCanvas*>(this)->GetValue(s_IsEnabledProperty));
00062 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemFontInfo.properties.h Source File

  • File List
  • File Members
  • Generated

RatingItemFontInfo.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class RatingItemFontInfoProperties
00008 {
00009 public:
00010     RatingItemFontInfoProperties();
00011
00012     void DisabledGlyph(winrt::hstring const& value);
00013     winrt::hstring DisabledGlyph();
00014
00015     void Glyph(winrt::hstring const& value);
00016     winrt::hstring Glyph();
00017
00018     void PlaceholderGlyph(winrt::hstring const& value);
00019     winrt::hstring PlaceholderGlyph();
00020
00021     void PointerOverGlyph(winrt::hstring const& value);
00022     winrt::hstring PointerOverGlyph();
00023
00024     void PointerOverPlaceholderGlyph(winrt::hstring const& value);
00025     winrt::hstring PointerOverPlaceholderGlyph();
00026
00027     void UnsetGlyph(winrt::hstring const& value);
00028     winrt::hstring UnsetGlyph();
00029
00030     static winrt::DependencyProperty DisabledGlyphProperty() { return s_DisabledGlyphProperty; }
00031     static winrt::DependencyProperty GlyphProperty() { return s_GlyphProperty; }
00032     static winrt::DependencyProperty PlaceholderGlyphProperty() { return s_PlaceholderGlyphProperty; }
00033     static winrt::DependencyProperty PointerOverGlyphProperty() { return s_PointerOverGlyphProperty; }
00034     static winrt::DependencyProperty PointerOverPlaceholderGlyphProperty() { return s_PointerOverPlaceholderGlyphProperty; }
00035     static winrt::DependencyProperty UnsetGlyphProperty() { return s_UnsetGlyphProperty; }
00036
00037     static GlobalDependencyProperty s_DisabledGlyphProperty;
00038     static GlobalDependencyProperty s_GlyphProperty;
00039     static GlobalDependencyProperty s_PlaceholderGlyphProperty;
00040     static GlobalDependencyProperty s_PointerOverGlyphProperty;
00041     static GlobalDependencyProperty s_PointerOverPlaceholderGlyphProperty;
00042     static GlobalDependencyProperty s_UnsetGlyphProperty;
00043
00044     static void EnsureProperties();
00045     static void ClearProperties();
00046 };
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewDisplayModeChangedEventArgs.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewDisplayModeChangedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewDisplayModeChangedEventArgs.g.h"
00007
00008 class NavigationViewDisplayModeChangedEventArgs :
00009     public winrt::implementation::NavigationViewDisplayModeChangedEventArgsT<NavigationViewDisplayModeChangedEventArgs>
00010 {
00011 public:
00012 #pragma region INavigationViewDisplayModeChangedEventArgs
00013     winrt::NavigationViewDisplayMode DisplayMode();
00014 #pragma endregion
00015
00016     void DisplayMode(winrt::NavigationViewDisplayMode value);
00017
00018 private:
00019     winrt::NavigationViewDisplayMode m_DisplayMode{};
00020 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/TestUI/Common/NavigationViewIsPaneOpenPage.xaml.cs Source File

  • File List
  • File Members
  • NavigationView
  • TestUI
  • Common

NavigationViewIsPaneOpenPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Controls;
00005
00006 namespace MUXControlsTestApp
00007 {
00008     public sealed partial class NavigationViewIsPaneOpenPage : TestPage
00009     {
00010         public NavigationViewIsPaneOpenPage()
00011         {
00012             this.InitializeComponent();
00013
00014         }
00015
00016         // This NavigationViewItem can be used to check whether selecting an item right after showing it still shows the selection indicator
00017         // See https://github.com/microsoft/microsoft-ui-xaml/issues/2941 for context
00018         private void NavigationView_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs args)
00019         {
00020             if((args.InvokedItem as string) == "Apps")
00021             {
00022                 CollapsedItem.Visibility = Microsoft.UI.Xaml.Visibility.Visible;
00023
00024                 NavView.SelectedItem = CollapsedItem;
00025             }
00026         }
00027     }
00028 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ViewportManagerDownlevel.h Source File

  • File List
  • File Members
  • Repeater

ViewportManagerDownlevel.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "ViewportManager.h"
00006
00007 class ItemsRepeater;
00008
00009 // Manages virtualization windows (visible/realization).
00010 // This class does the equivalent behavior as ViewportManagerWithPlatformFeatures class
00011 // except that here we do not use EffectiveViewport and ScrollAnchoring features added to the framework in RS5.
00012 // Instead we use the IRepeaterScrollingSurface internal API. This class is used when building in MUX and
00013 // should work down-level.
00014 class ViewportManagerDownLevel : public ViewportManager
00015 {
00016 public:
00017     ViewportManagerDownLevel(ItemsRepeater* owner);
00018
00019     winrt::UIElement SuggestedAnchor() const override;
00020
00021     double HorizontalCacheLength() const override { return m_maximumHorizontalCacheLength; }
00022     void HorizontalCacheLength(double value) override;
00023
00024     double VerticalCacheLength() const override { return m_maximumVerticalCacheLength; }
00025     void VerticalCacheLength(double value) override;
00026
00027     winrt::Rect GetLayoutVisibleWindow() const override;
00028     winrt::Rect GetLayoutRealizationWindow() const override;
00029
00030     void SetLayoutExtent(const winrt::Rect& extent) override;
00031     winrt::Rect GetLayoutExtent() const override { return m_layoutExtent; }
00032     winrt::Point GetOrigin() const override{ return winrt::Point(m_layoutExtent.X, m_layoutExtent.Y); }
00033
00034     void OnLayoutChanged(bool isVirtualizing) override;
00035     void OnElementPrepared(const winrt::UIElement& element) override {}
00036     void OnElementCleared(const winrt::UIElement& element) override;
00037     void OnOwnerMeasuring() override;
00038     void OnOwnerArranged() override;
00039     void OnMakeAnchor(const winrt::UIElement& anchor, const bool isAnchorOutsideRealizedRange) override;
00040     void OnBringIntoViewRequested(const winrt::BringIntoViewRequestedEventArgs& args) override;
00041
00042     void ResetLayoutRealizationWindowCacheBuffer() override;
00043     void ResetScrollers() override;
00044
00045     winrt::UIElement MadeAnchor() const override { return m_makeAnchorElement.get(); }
00046
00047 private:
00048     struct ScrollerInfo;
00049
00050     void OnCacheBuildActionCompleted();
00051     void OnViewportChanged(const winrt::IRepeaterScrollingSurface& sender, const bool isFinal);
00052     void OnPostArrange(const winrt::IRepeaterScrollingSurface& sender);
00053     void OnConfigurationChanged(const winrt::IRepeaterScrollingSurface& sender);
00054
00055     void EnsureScrollers();
00056     bool HasScrollers() const { return !!m_horizontalScroller || !!m_verticalScroller; }
00057     bool AddScroller(const winrt::IRepeaterScrollingSurface& scroller);
00058     void UpdateViewport();
00059     void ResetCacheBuffer(bool registerCacheBuildWork = true);
00060     void ValidateCacheLength(double cacheLength);
00061     void RegisterCacheBuildWork();
00062     void TryInvalidateMeasure();
00063     winrt::IRepeaterScrollingSurface GetOuterScroller() const;
00064
00065     winrt::hstring GetLayoutId();
00066
00067     ItemsRepeater* m_owner{ nullptr };
00068
00069     // List of parent scrollers.
00070     // The list stops when we reach the root scroller OR when both m_horizontalScroller
00071     // and m_verticalScroller are set. In the latter case, we don't care about the other
00072     // scroller that we haven't reached yet.
00073     bool m_ensuredScrollers{ false };
00074     std::vector<ScrollerInfo> m_parentScrollers;
00075
00076     // In order to support the Store scenario (vertical list of horizontal lists),
00077     // we need to build a synthetic virtualization window by taking the horizontal and
00078     // vertical components of the viewport from two different scrollers.
00079     tracker_ref<winrt::IRepeaterScrollingSurface> m_horizontalScroller;
00080     tracker_ref<winrt::IRepeaterScrollingSurface> m_verticalScroller;
00081     // Invariant: !m_innerScrollableScroller || m_horizontalScroller == m_innerScrollableScroller || m_verticalScroller == m_innerScrollableScroller.
00082     tracker_ref<winrt::IRepeaterScrollingSurface> m_innerScrollableScroller;
00083
00084     tracker_ref<winrt::UIElement> m_makeAnchorElement;
00085     bool m_isAnchorOutsideRealizedRange{};  // Value is only valid when m_makeAnchorElement is set.
00086
00087     tracker_ref<winrt::IAsyncAction> m_cacheBuildAction;
00088
00089     winrt::Rect m_lastLayoutRealizationWindow{};
00090     winrt::Rect m_visibleWindow{};
00091     winrt::Rect m_layoutExtent{};
00092     winrt::Point m_expectedViewportShift{};
00093
00094     // Realization window cache fields
00095     double m_maximumHorizontalCacheLength{ 2.0 };
00096     double m_maximumVerticalCacheLength{ 2.0 };
00097     double m_horizontalCacheBufferPerSide{};
00098     double m_verticalCacheBufferPerSide{};
00099
00100     // For non-virtualizing layouts, we do not need to keep
00101     // updating viewports and invalidating measure often. So when
00102     // a non virtualizing layout is used, we stop doing all that work.
00103     bool m_managingViewportDisabled{ false };
00104
00105     // Event tokens
00106     winrt::IRepeaterScrollingSurface::PostArrange_revoker m_postArrangeToken;
00107
00108     // Stores information about a parent scrolling surface.
00109     // We subscribe to...
00110     // - ViewportChanged only on scrollers that are scrollable in at least one direction.
00111     // - ConfigurationChanged on all scrollers.
00112     // - PostArrange only on the outer most scroller, because we need to wait for that one
00113     //   to arrange its children before we can reliably figure out our relative viewport.
00114     struct ScrollerInfo
00115     {
00116         ScrollerInfo(
00117             const ITrackerHandleManager* owner,
00118             winrt::IRepeaterScrollingSurface scroller) :
00119             m_scroller(owner, scroller)
00120         { }
00121
00122         winrt::IRepeaterScrollingSurface Scroller() const
00123         {
00124             return m_scroller.get();
00125         }
00126
00127         winrt::IRepeaterScrollingSurface::ViewportChanged_revoker ViewportChangedToken{};
00128         winrt::IRepeaterScrollingSurface::PostArrange_revoker PostArrangeToken{};
00129         winrt::IRepeaterScrollingSurface::ConfigurationChanged_revoker ConfigurationChangedToken{};
00130
00131     private:
00132         tracker_ref<winrt::IRepeaterScrollingSurface> m_scroller;
00133     };
00134 };
Generated on Sun Dec 1 2024 20:52:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

CornerRadiusPage Member List

This is the complete list of members for CornerRadiusPage, including all inherited members.
_controlCornerRadius | CornerRadiusPage | [private]
_overlayCornerRadius | CornerRadiusPage | [private]
AutoSuggestSource | CornerRadiusPage |
ControlCornerRadius | CornerRadiusPage |
ControlCornerRadiusProperty | CornerRadiusPage | [static]
ControlCornerRadiusSize | CornerRadiusPage |
CornerRadiusPage() | CornerRadiusPage | [inline]
OverlayCornerRadius | CornerRadiusPage |
OverlayCornerRadiusProperty | CornerRadiusPage | [static]
OverlayCornerRadiusSize | CornerRadiusPage |
ShowDialog_Click(object sender, RoutedEventArgs e) | CornerRadiusPage | [inline, private]
ShowRoundedDialog_Click(object sender, RoutedEventArgs e) | CornerRadiusPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PrefixConverter Member List

This is the complete list of members for PrefixConverter, including all inherited members.
Convert(object value, Type targetType, object parameter, string language) | PrefixConverter | [inline]
ConvertBack(object value, Type targetType, object parameter, string language) | PrefixConverter | [inline]
Generated on Sun Dec 1 2024 20:54:23 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemContainerAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ItemContainerAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ItemContainerAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ItemContainerAutomationPeer)
00012 }
00013
00014 #include "ItemContainerAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NumberBox/APITests/NumberBoxTests.cs Source File

  • File List
  • File Members
  • NumberBox
  • APITests

NumberBoxTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using System.Linq;
00009 using System.Collections.Generic;
00010 using MUXControlsTestApp;
00011 using Microsoft.UI.Xaml.Controls.Primitives;
00012 using Microsoft.UI.Xaml.Input;
00013 using MUXControls.TestAppUtils;
00014 using Microsoft.UI.Xaml.Automation.Peers;
00015 using Microsoft.UI.Xaml.Automation;
00016
00017 using WEX.TestExecution;
00018 using WEX.TestExecution.Markup;
00019 using WEX.Logging.Interop;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00022 {
00023     [TestClass]
00024     public class NumberBoxTests : ApiTestBase
00025     {
00026         [TestMethod]
00027         public void VerifyTextAlignmentPropogates()
00028         {
00029             var numberBox = SetupNumberBox();
00030             TextBox textBox = null;
00031
00032             RunOnUIThread.Execute(() =>
00033             {
00034                 Content.UpdateLayout();
00035
00036                 textBox = TestUtilities.FindDescendents<TextBox>(numberBox).Where(e => e.Name == "InputBox").Single();
00037                 Verify.AreEqual(TextAlignment.Left, textBox.TextAlignment, "The default TextAlignment should be left.");
00038
00039                 numberBox.TextAlignment = TextAlignment.Right;
00040                 Content.UpdateLayout();
00041
00042                 Verify.AreEqual(TextAlignment.Right, textBox.TextAlignment, "The TextAlignment should have been updated to Right.");
00043             });
00044         }
00045
00046         [TestMethod]
00047         public void VerifyInputScopePropogates()
00048         {
00049             var numberBox = SetupNumberBox();
00050
00051             RunOnUIThread.Execute(() =>
00052             {
00053                 Content.UpdateLayout();
00054                 var inputTextBox = TestUtilities.FindDescendents<TextBox>(numberBox).Where(e => e.Name == "InputBox").Single();
00055
00056                 Verify.AreEqual(1, inputTextBox.InputScope.Names.Count);
00057                 Verify.AreEqual(InputScopeNameValue.Number, inputTextBox.InputScope.Names[0].NameValue, "The default InputScope should be 'Number'.");
00058
00059                 var scopeName = new InputScopeName();
00060                 scopeName.NameValue = InputScopeNameValue.CurrencyAmountAndSymbol;
00061                 var scope = new InputScope();
00062                 scope.Names.Add(scopeName);
00063
00064                 numberBox.InputScope = scope;
00065                 Content.UpdateLayout();
00066
00067                 Verify.AreEqual(1, inputTextBox.InputScope.Names.Count);
00068                 Verify.AreEqual(InputScopeNameValue.CurrencyAmountAndSymbol, inputTextBox.InputScope.Names[0].NameValue, "The InputScope should be 'CurrencyAmountAndSymbol'.");
00069             });
00070
00071             return;
00072         }
00073
00074         [TestMethod]
00075         [TestProperty("Ignore", "True")] // Task 31597497: DCPP Bug: Unreliable test, UAP.Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.NumberBoxTests.VerifyIsEnabledChangeUpdatesVisualState
00076         public void VerifyIsEnabledChangeUpdatesVisualState()
00077         {
00078             var numberBox = SetupNumberBox();
00079
00080             VisualStateGroup commonStatesGroup = null;
00081             RunOnUIThread.Execute(() =>
00082             {
00083                 // Check 1: Set IsEnabled to true.
00084                 numberBox.IsEnabled = true;
00085                 Content.UpdateLayout();
00086
00087                 var numberBoxLayoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(numberBox, 0);
00088                 commonStatesGroup = VisualStateManager.GetVisualStateGroups(numberBoxLayoutRoot).First(vsg => vsg.Name.Equals("CommonStates"));
00089
00090                 Verify.AreEqual("Normal", commonStatesGroup.CurrentState.Name);
00091
00092                 // Check 2: Set IsEnabled to false.
00093                 numberBox.IsEnabled = false;
00094             });
00095             IdleSynchronizer.Wait();
00096
00097             RunOnUIThread.Execute(() =>
00098             {
00099                 Verify.AreEqual("Disabled", commonStatesGroup.CurrentState.Name);
00100
00101                 // Check 3: Set IsEnabled back to true.
00102                 numberBox.IsEnabled = true;
00103             });
00104             IdleSynchronizer.Wait();
00105
00106             RunOnUIThread.Execute(() =>
00107             {
00108                 Verify.AreEqual("Normal", commonStatesGroup.CurrentState.Name);
00109             });
00110         }
00111
00112         [TestMethod]
00113         public void VerifyUIANameBehavior()
00114         {
00115             NumberBox numberBox = null;
00116             TextBox textBox = null;
00117
00118             RunOnUIThread.Execute(() =>
00119             {
00120                 numberBox = new NumberBox();
00121                 Content = numberBox;
00122                 Content.UpdateLayout();
00123
00124                 textBox = TestPage.FindVisualChildrenByType<TextBox>(numberBox)[0];
00125                 Verify.IsNotNull(textBox);
00126                 numberBox.Header = "Some header";
00127             });
00128
00129             IdleSynchronizer.Wait();
00130
00131             RunOnUIThread.Execute(() =>
00132             {
00133                 VerifyUIAName("Some header");
00134                 numberBox.Header = new Button();
00135                 AutomationProperties.SetName(numberBox, "Some UIA name");
00136             });
00137
00138             IdleSynchronizer.Wait();
00139
00140             RunOnUIThread.Execute(() =>
00141             {
00142                 VerifyUIAName("Some UIA name");
00143                 numberBox.Header = new Button();
00144             });
00145
00146             IdleSynchronizer.Wait();
00147
00148             RunOnUIThread.Execute(() =>
00149             {
00150                 VerifyUIAName("Some UIA name");
00151                 numberBox.Minimum = 0;
00152                 numberBox.Maximum = 10;
00153             });
00154
00155             IdleSynchronizer.Wait();
00156
00157             RunOnUIThread.Execute(() =>
00158             {
00159                 VerifyUIAName("Some UIA name Minimum0 Maximum10");
00160                 numberBox.Minimum = 50;
00161                 numberBox.Maximum = 100;
00162             });
00163
00164             IdleSynchronizer.Wait();
00165
00166             RunOnUIThread.Execute(() =>
00167             {
00168                 VerifyUIAName("Some UIA name Minimum50 Maximum100");
00169             });
00170
00171             void VerifyUIAName(string value)
00172             {
00173                 Verify.AreEqual(value, FrameworkElementAutomationPeer.CreatePeerForElement(textBox).GetName());
00174             }
00175         }
00176
00177         private NumberBox SetupNumberBox()
00178         {
00179             NumberBox numberBox = null;
00180             RunOnUIThread.Execute(() =>
00181             {
00182                 numberBox = new NumberBox();
00183                 Content = numberBox;
00184             });
00185
00186             return numberBox;
00187         }
00188     }
00189 }
Generated on Sun Dec 1 2024 20:52:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/VisualStatesPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

VisualStatesPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System.Collections.Generic;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using MUXControlsTestApp.Utilities;
00009
00010 namespace MUXControlsTestApp
00011 {
00012     [TopLevelTestPage(Name = "VisualStates")]
00013     public sealed partial class VisualStatesPage : Page
00014     {
00015         private List<ControlStateViewer> viewers = new List<ControlStateViewer>()
00016         {
00017             new ControlStateViewer(typeof(Button),
00018                 new List<string>(){ "Normal", "PointerOver", "Pressed", "Disabled" }),
00019
00020             new ControlStateViewer(typeof(Button),
00021                 new List<string>(){ "Normal", "PointerOver", "Pressed", "Disabled" },
00022                 Application.Current.Resources["AccentButtonStyle"] as Style),
00023
00024             new ControlStateViewer(typeof(ToggleButton),
00025                 new List<string>(){ "Normal", "PointerOver", "Pressed", "Disabled", "Checked", "CheckedPointerOver", "CheckedPressed", "CheckedDisabled", "Indeterminate", "IndeterminatePointerOver", "IndeterminatePressed", "IndeterminateDisabled" }),
00026
00027             new ControlStateViewer(typeof(Microsoft.UI.Xaml.Controls.DropDownButton),
00028                 new List<string>(){ "Normal", "PointerOver", "Pressed", "Disabled" }),
00029
00030             new ControlStateViewer(typeof(Microsoft.UI.Xaml.Controls.SplitButton),
00031                 new List<string>{ "Normal", "FlyoutOpen", "TouchPressed", "PrimaryPointerOver", "PrimaryPressed", "SecondaryPointerOver", "SecondaryPressed" }),
00032
00033             new ControlStateViewer(typeof(Microsoft.UI.Xaml.Controls.ToggleSplitButton),
00034                 new List<string>{ "Checked", "CheckedFlyoutOpen", "CheckedTouchPressed", "CheckedPrimaryPointerOver", "CheckedPrimaryPressed", "CheckedSecondaryPointerOver", "CheckedSecondaryPressed" }),
00035
00036             new ControlStateViewer(typeof(HyperlinkButton),
00037                 new List<string>(){ "Normal", "PointerOver", "Pressed", "Disabled" }),
00038
00039             new ControlStateViewer(typeof(CheckBox),
00040                 new List<string>(){ "UncheckedNormal", "UncheckedPointerOver", "UncheckedPressed", "UncheckedDisabled", "CheckedNormal", "CheckedPointerOver", "CheckedPressed", "CheckedDisabled", "IndeterminateNormal", "IndeterminatePointerOver", "IndeterminatePressed", "IndeterminateDisabled" }),
00041
00042             new ControlStateViewer(typeof(RadioButton),
00043                 new List<string>(){ "Unchecked|Normal", "Unchecked|PointerOver", "Unchecked|Pressed", "Unchecked|Disabled", "Checked|Normal", "Checked|PointerOver", "Checked|Pressed", "Checked|Disabled" }),
00044
00045             new ControlStateViewer(typeof(ToggleSwitch),
00046                 new List<string>(){ "Off|Normal", "Off|PointerOver", "Off|Pressed", "Off|Disabled", "On|Normal", "On|PointerOver", "On|Pressed", "On|Disabled" }),
00047
00048             new ControlStateViewer(typeof(Slider),
00049                 new List<string>(){ "Normal", "PointerOver", "Pressed", "Disabled" }),
00050
00051             new ControlStateViewer(typeof(TextBox),
00052                 new List<string>(){ "Normal", "PointerOver", "Focused", "Disabled" }),
00053         };
00054
00055         public VisualStatesPage()
00056         {
00057             this.InitializeComponent();
00058
00059             foreach (var viewer in viewers)
00060             {
00061                 ControlPanel.Children.Add(viewer);
00062             }
00063         }
00064     }
00065 }
Generated on Sun Dec 1 2024 20:51:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewItem.cpp Source File

  • File List
  • File Members
  • TreeView

TreeViewItem.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TreeViewItem.h"
00007 #include "TreeViewItemAutomationPeer.h"
00008 #include "TreeViewList.h"
00009 #include "TreeViewItemTemplateSettings.h"
00010 #include <winrt/Microsoft.UI.Dispatching.h>
00011
00012 TreeViewItem::TreeViewItem()
00013 {
00014     SetDefaultStyleKey(this);
00015     SetValue(s_TreeViewItemTemplateSettingsProperty, winrt::make<::TreeViewItemTemplateSettings>());
00016 }
00017
00018 TreeViewItem::~TreeViewItem()
00019 {
00020     // We only need to use safe_get in the deconstruction loop
00021     RecycleEvents(true /* useSafeGet */);
00022 }
00023
00024 // IControlOverrides
00025 void TreeViewItem::OnKeyDown(winrt::KeyRoutedEventArgs const& e)
00026 {
00027     if (const auto targetNode = TreeNode())
00028     {
00029         const auto treeView = AncestorTreeView();
00030         const auto key = e.Key();
00031         const auto originalKey = e.OriginalKey();
00032
00033         // If in multi-selection and gamepad a is pressed
00034         if (originalKey == winrt::VirtualKey::GamepadA &&
00035             treeView->ListControl()->IsMultiselect())
00036         {
00037             HandleGamepadAInMultiselectMode(targetNode);
00038             e.Handled(true);
00039         }
00040         else if (IsInReorderMode(key))
00041         {
00042             HandleReorder(key);
00043             e.Handled(true);
00044         }
00045         // Collapse/Expand
00046         else if (IsExpandCollapse(key))
00047         {
00048             const auto handled = HandleExpandCollapse(key);
00049             if (handled)
00050             {
00051                 e.Handled(true);
00052             }
00053         }
00054         else if (key == winrt::VirtualKey::Space &&
00055                  treeView->ListControl()->IsMultiselect())
00056         {
00057             const auto selectionBox = m_selectionBox.get();
00058             const bool isSelected = CheckBoxSelectionState(selectionBox) == TreeNodeSelectionState::Selected;
00059             selectionBox.IsChecked(!isSelected);
00060             e.Handled(true);
00061         }
00062     }
00063
00064     // Call to base for all other key presses
00065     __super::OnKeyDown(e);
00066 }
00067
00068 void TreeViewItem::OnDrop(winrt::DragEventArgs const& args)
00069 {
00070     if (!args.Handled() && args.AcceptedOperation() == winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move)
00071     {
00072         const winrt::TreeViewItem droppedOnItem = *this;
00073         const auto treeView = AncestorTreeView();
00074         if (treeView)
00075         {
00076             const auto treeViewList = treeView->ListControl();
00077             if (const auto droppedNode = treeViewList->DraggedTreeViewNode())
00078             {
00079                 if (treeViewList->IsMutiSelectWithSelectedItems())
00080                 {
00081                     const auto droppedOnNode = treeView->NodeFromContainer(droppedOnItem);
00082                     const auto selectedRoots = treeViewList->GetRootsOfSelectedSubtrees();
00083                     for (const auto node : selectedRoots)
00084                     {
00085                         const auto nodeIndex = treeViewList->FlatIndex(node);
00086                         if (treeViewList->IsFlatIndexValid(nodeIndex))
00087                         {
00088                             treeViewList->RemoveNodeFromParent(node);
00089                             winrt::get_self<TreeViewNodeVector>(droppedOnNode.Children())->Append(node);
00090                         }
00091                     }
00092
00093                     args.Handled(true);
00094                     treeView->MutableListControl()->OnDrop(args);
00095                 }
00096                 else
00097                 {
00098                     const auto droppedOnNode = treeView->NodeFromContainer(droppedOnItem);
00099
00100                     // Remove the item that was dragged
00101                     unsigned int removeIndex;
00102                     droppedNode.Parent().Children().IndexOf(droppedNode, removeIndex);
00103
00104                     if (droppedNode != droppedOnNode)
00105                     {
00106                         winrt::get_self<TreeViewNodeVector>(droppedNode.Parent().Children())->RemoveAt(removeIndex);
00107
00108                         // Append the dragged dropped item as a child of the node it was dropped onto
00109                         winrt::get_self<TreeViewNodeVector>(droppedOnNode.Children())->Append(droppedNode);
00110
00111                         // If not set to true then the Reorder code of listview will override what is being done here.
00112                         args.Handled(true);
00113                         treeView->MutableListControl()->OnDrop(args);
00114                     }
00115                     else
00116                     {
00117                         args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
00118                     }
00119
00120                 }
00121             }
00122         }
00123     }
00124
00125     __super::OnDrop(args);
00126 }
00127
00128 void TreeViewItem::OnDragOver(winrt::DragEventArgs const& args)
00129 {
00130     const auto treeView = AncestorTreeView();
00131     if (treeView && !args.Handled())
00132     {
00133         const auto treeViewList = treeView->ListControl();
00134         winrt::TreeViewItem draggedOverItem = *this;
00135         winrt::TreeViewNode draggedOverNode = treeView->NodeFromContainer(draggedOverItem);
00136         winrt::TreeViewNode draggedNode = treeViewList->DraggedTreeViewNode();
00137
00138         if (draggedNode && treeView->CanReorderItems())
00139         {
00140             if (treeViewList->IsMutiSelectWithSelectedItems())
00141             {
00142                 if (treeViewList->IsSelected(draggedOverNode))
00143                 {
00144                     args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
00145                     treeView->MutableListControl()->SetDraggedOverItem(nullptr);
00146                 }
00147                 else
00148                 {
00149                     args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move);
00150                     treeView->MutableListControl()->SetDraggedOverItem(draggedOverItem);
00151                 }
00152             }
00153             else
00154             {
00155                 winrt::TreeViewNode walkNode = draggedOverNode.Parent();
00156                 while (walkNode && walkNode != draggedNode)
00157                 {
00158                     walkNode = walkNode.Parent();
00159                 }
00160
00161                 const auto mutableTreeViewList = treeView->MutableListControl();
00162                 if (walkNode != draggedNode && draggedNode != draggedOverNode)
00163                 {
00164                     args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move);
00165                     mutableTreeViewList->SetDraggedOverItem(draggedOverItem);
00166                 }
00167
00168                 mutableTreeViewList->UpdateDropTargetDropEffect(false, false, nullptr);
00169             }
00170         }
00171     }
00172
00173     __super::OnDragOver(args);
00174 }
00175
00176 void TreeViewItem::OnDragEnter(winrt::DragEventArgs const& args)
00177 {
00178     winrt::TreeViewItem draggedOverItem = *this;
00179
00180     args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::None);
00181     args.DragUIOverride().IsGlyphVisible(true);
00182
00183     const auto treeView = AncestorTreeView();
00184     if (treeView && treeView->CanReorderItems() && !args.Handled())
00185     {
00186         const auto treeViewList = treeView->ListControl();
00187         winrt::TreeViewNode draggedNode = treeViewList->DraggedTreeViewNode();
00188         if (draggedNode)
00189         {
00190             winrt::TreeViewNode draggedOverNode = treeView->NodeFromContainer(draggedOverItem);
00191             winrt::TreeViewNode walkNode = draggedOverNode.Parent();
00192
00193             while (walkNode && walkNode != draggedNode)
00194             {
00195                 walkNode = walkNode.Parent();
00196             }
00197
00198             if (walkNode != draggedNode && draggedNode != draggedOverNode)
00199             {
00200                 args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Move);
00201             }
00202
00203             winrt::TreeViewNode droppedOnNode = TreeNode();
00204             if (droppedOnNode != draggedNode) // Don't expand if drag hovering on itself.
00205             {
00206                 // Set up timer.
00207                 if (!draggedOverNode.IsExpanded() && draggedOverNode.HasChildren())
00208                 {
00209                     if (m_expandContentTimer)
00210                     {
00211                         m_expandContentTimer.Stop();
00212                         m_expandContentTimer.Start();
00213                     }
00214                     else
00215                     {
00216                         // Initialize timer.
00217                         const winrt::TimeSpan interval = winrt::TimeSpan::duration(c_dragOverInterval);
00218
00219                         m_expandContentTimer = winrt::DispatcherTimer();
00220                         m_expandContentTimer.Interval(interval);
00221                         m_expandContentTimer.Tick({ this, &TreeViewItem::OnExpandContentTimerTick });
00222                         m_expandContentTimer.Start();
00223                     }
00224                 }
00225             }
00226         }
00227     }
00228
00229     __super::OnDragEnter(args);
00230 }
00231
00232 void TreeViewItem::OnDragLeave(winrt::DragEventArgs const& args)
00233 {
00234     if (!args.Handled())
00235     {
00236         if (auto treeView = AncestorTreeView())
00237         {
00238             const auto mutableTreeViewList = treeView->MutableListControl();
00239             mutableTreeViewList->SetDraggedOverItem(nullptr);
00240         }
00241
00242         if (m_expandContentTimer)
00243         {
00244             m_expandContentTimer.Stop();
00245         }
00246     }
00247
00248     __super::OnDragLeave(args);
00249 }
00250
00251 // IUIElementOverrides
00252 winrt::AutomationPeer TreeViewItem::OnCreateAutomationPeer()
00253 {
00254     return winrt::make<TreeViewItemAutomationPeer>(*this);
00255 }
00256
00257 // IFrameworkElementOverrides
00258 void TreeViewItem::OnApplyTemplate()
00259 {
00260     RecycleEvents();
00261
00262     winrt::IControlProtected controlProtected = *this;
00263     m_selectionBox.set(GetTemplateChildT<winrt::CheckBox>(c_multiSelectCheckBoxName, controlProtected));
00264     RegisterPropertyChangedCallback(winrt::SelectorItem::IsSelectedProperty(), { this, &TreeViewItem::OnIsSelectedChanged });
00265
00266     if (m_selectionBox)
00267     {
00268         m_checkedEventRevoker = m_selectionBox.get().Checked(winrt::auto_revoke, { this, &TreeViewItem::OnCheckToggle });
00269         m_uncheckedEventRevoker = m_selectionBox.get().Unchecked(winrt::auto_revoke, { this, &TreeViewItem::OnCheckToggle });
00270     }
00271
00272     const auto chevron = GetTemplateChildT<winrt::UIElement>(c_expandCollapseChevronName, controlProtected);
00273     if (chevron)
00274     {
00275         m_expandCollapseChevronPointerPressedToken = chevron.PointerPressed({ this, &TreeViewItem::OnExpandCollapseChevronPointerPressed });
00276         m_expandCollapseChevron.set(chevron);
00277     }
00278     const auto node = TreeNode();
00279     if (node && IsInContentMode())
00280     {
00281         UpdateNodeIsExpandedAsync(node, IsExpanded());
00282         node.HasUnrealizedChildren(HasUnrealizedChildren());
00283     }
00284
00285     __super::OnApplyTemplate();
00286 }
00287
00288 template<typename T>
00289 T TreeViewItem::GetAncestorView()
00290 {
00291     winrt::DependencyObject treeViewItemAncestor = *this;
00292     T ancestorView = nullptr;
00293     while (treeViewItemAncestor && !ancestorView)
00294     {
00295         treeViewItemAncestor = winrt::VisualTreeHelper::GetParent(treeViewItemAncestor);
00296         ancestorView = treeViewItemAncestor.try_as<T>();
00297     }
00298     return ancestorView;
00299 }
00300
00301 com_ptr<TreeView> TreeViewItem::AncestorTreeView()
00302 {
00303     if (!m_ancestorTreeView.get())
00304     {
00305         m_ancestorTreeView = winrt::make_weak<winrt::TreeView>(GetAncestorView<winrt::TreeView>());
00306     }
00307     return winrt::get_self<TreeView>(m_ancestorTreeView.get())->get_strong();
00308 }
00309
00310 void TreeViewItem::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00311 {
00312     winrt::IDependencyProperty property = args.Property();
00313     if (auto node = TreeNode())
00314     {
00315         if (property == s_IsExpandedProperty)
00316         {
00317             bool value = unbox_value<bool>(args.NewValue());
00318             if (node.IsExpanded() != value)
00319             {
00320                 UpdateNodeIsExpandedAsync(node, value);
00321             }
00322             RaiseExpandCollapseAutomationEvent(value);
00323         }
00324         else if (property == s_ItemsSourceProperty)
00325         {
00326             SetItemsSource(node, args.NewValue());
00327         }
00328         else if (property == s_HasUnrealizedChildrenProperty)
00329         {
00330             bool value = unbox_value<bool>(args.NewValue());
00331             node.HasUnrealizedChildren(value);
00332         }
00333     }
00334 }
00335
00336 void TreeViewItem::SetItemsSource(winrt::TreeViewNode const& node, winrt::IInspectable const& value)
00337 {
00338     const auto treeViewNode = winrt::get_self<TreeViewNode>(node);
00339     treeViewNode->ItemsSource(value);
00340     if (IsInContentMode())
00341     {
00342         // The children have changed, validate and update GlyphOpacity
00343         const bool hasChildren = HasUnrealizedChildren() || treeViewNode->HasChildren();
00344         GlyphOpacity(hasChildren ? 1.0 : 0.0);
00345     }
00346 }
00347
00348 void TreeViewItem::OnExpandContentTimerTick(const winrt::IInspectable& /*sender*/, const winrt::IInspectable& /*e*/)
00349 {
00350     if (m_expandContentTimer)
00351     {
00352         m_expandContentTimer.Stop();
00353     }
00354
00355     if (auto draggedOverNode = TreeNode())
00356     {
00357         if (draggedOverNode && !draggedOverNode.IsExpanded())
00358         {
00359             draggedOverNode.IsExpanded(true);
00360         }
00361     }
00362 }
00363
00364 void TreeViewItem::RaiseExpandCollapseAutomationEvent(bool isExpanded)
00365 {
00366     if (winrt::AutomationPeer::ListenerExists(winrt::AutomationEvents::PropertyChanged))
00367     {
00368         const auto expandState = isExpanded ? winrt::ExpandCollapseState::Expanded : winrt::ExpandCollapseState::Collapsed;
00369         if (const auto peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00370         {
00371             const auto treeViewItemPeer = peer.as<winrt::TreeViewItemAutomationPeer>();
00372             winrt::get_self<TreeViewItemAutomationPeer>(treeViewItemPeer)->RaiseExpandCollapseAutomationEvent(expandState);
00373         }
00374     }
00375 }
00376
00377 bool TreeViewItem::IsInReorderMode(winrt::VirtualKey key)
00378 {
00379     const auto ctrlState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control);
00380     const bool isControlPressed = (ctrlState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00381
00382     const auto altState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu);
00383     const bool isAltPressed = (altState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00384
00385     const auto shiftState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Shift);
00386     const bool isShiftPressed = (shiftState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00387
00388     const bool isDirectionPressed = IsDirectionalKey(key);
00389
00390     bool canReorderItems = false;
00391     if (auto treeView = AncestorTreeView())
00392     {
00393         canReorderItems = treeView->CanReorderItems();
00394     }
00395
00396     return canReorderItems && isDirectionPressed && isShiftPressed && isAltPressed && !isControlPressed;
00397 }
00398
00399 void TreeViewItem::UpdateTreeViewItemVisualState(TreeNodeSelectionState const& state)
00400 {
00401     if (state == TreeNodeSelectionState::Selected)
00402     {
00403         winrt::VisualStateManager::GoToState(*this, L"TreeViewMultiSelectEnabledSelected", false);
00404     }
00405     else
00406     {
00407         winrt::VisualStateManager::GoToState(*this, L"TreeViewMultiSelectEnabledUnselected", false);
00408     }
00409 }
00410
00411 void TreeViewItem::OnCheckToggle(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& /*args*/)
00412 {
00413     if (const auto treeView = AncestorTreeView())
00414     {
00415         const auto listControl = treeView->ListControl();
00416         const int index = listControl->IndexFromContainer(*this);
00417         const auto selectionState = CheckBoxSelectionState(sender.as<winrt::CheckBox>());
00418         listControl->ListViewModel()->SelectByIndex(index, selectionState);
00419         UpdateTreeViewItemVisualState(selectionState);
00420         RaiseSelectionChangeEvents(selectionState == TreeNodeSelectionState::Selected);
00421     }
00422 }
00423
00424 void TreeViewItem::RaiseSelectionChangeEvents(bool isSelected)
00425 {
00426     if (winrt::AutomationPeer peer = winrt::FrameworkElementAutomationPeer::FromElement(*this))
00427     {
00428         const auto treeViewItemPeer = winrt::get_self<TreeViewItemAutomationPeer>(peer.as<winrt::TreeViewItemAutomationPeer>());
00429
00430         const auto selectionEvent = isSelected ? winrt::AutomationEvents::SelectionItemPatternOnElementAddedToSelection : winrt::AutomationEvents::SelectionItemPatternOnElementRemovedFromSelection;
00431         treeViewItemPeer->RaiseAutomationEvent(selectionEvent);
00432
00433         const auto isSelectedProperty = winrt::SelectionItemPatternIdentifiers::IsSelectedProperty();
00434         treeViewItemPeer->RaisePropertyChangedEvent(isSelectedProperty, box_value(!isSelected).as<winrt::IReference<bool>>(), box_value(isSelected).as<winrt::IReference<bool>>());
00435     }
00436 }
00437
00438 void TreeViewItem::UpdateSelection(bool isSelected)
00439 {
00440     if (const auto treeView = AncestorTreeView())
00441     {
00442         if (const auto node = TreeNode())
00443         {
00444             treeView->UpdateSelection(node, isSelected);
00445         }
00446     }
00447 }
00448
00449 void TreeViewItem::UpdateSelectionVisual(TreeNodeSelectionState const& state)
00450 {
00451     if (const auto treeView = AncestorTreeView())
00452     {
00453         if (const auto listControl = treeView->ListControl())
00454         {
00455             if (listControl->IsMultiselect())
00456             {
00457                 UpdateMultipleSelection(state);
00458             }
00459             else
00460             {
00461                 if (const auto node = TreeNode())
00462                 {
00463                     const auto viewModel = listControl->ListViewModel();
00464                     const auto isNodeSelected = viewModel->IsNodeSelected(node);
00465                     if (isNodeSelected != IsSelected())
00466                     {
00467                         IsSelected(isNodeSelected);
00468                     }
00469                 }
00470             }
00471         }
00472     }
00473 }
00474
00475 void TreeViewItem::OnIsSelectedChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& args)
00476 {
00477     UpdateSelection(unbox_value<bool>(GetValue(args)));
00478 }
00479
00480 void TreeViewItem::UpdateMultipleSelection(TreeNodeSelectionState const& state)
00481 {
00482     switch(state)
00483     {
00484     case TreeNodeSelectionState::Selected:
00485         m_selectionBox.get().IsChecked(true);
00486         break;
00487     case TreeNodeSelectionState::PartialSelected:
00488         m_selectionBox.get().IsChecked(nullptr);
00489         break;
00490     case TreeNodeSelectionState::UnSelected:
00491         m_selectionBox.get().IsChecked(false);
00492         break;
00493     }
00494     UpdateTreeViewItemVisualState(state);
00495 }
00496
00497 bool TreeViewItem::IsSelectedInternal()
00498 {
00499     // Check Selector::IsChecked for single selection since we use
00500     // ListView's single selection. In multiple selection we roll our own.
00501     bool isSelected = IsSelected();
00502     if (const auto treeView = AncestorTreeView())
00503     {
00504         const auto listControl = treeView->ListControl();
00505         if (listControl && listControl->IsMultiselect())
00506         {
00507             const TreeNodeSelectionState state = CheckBoxSelectionState(m_selectionBox.get());
00508             isSelected = state == TreeNodeSelectionState::Selected;
00509         }
00510     }
00511
00512     return isSelected;
00513 }
00514
00515 void TreeViewItem::UpdateIndentation(int depth)
00516 {
00517     winrt::Thickness thickness;
00518     thickness.Left = static_cast<double>(depth) * 16;
00519     thickness.Top = 0;
00520     thickness.Right = 0;
00521     thickness.Bottom = 0;
00522
00523     const auto templateSettings = winrt::get_self<::TreeViewItemTemplateSettings>(TreeViewItemTemplateSettings());
00524     templateSettings->Indentation(thickness);
00525 }
00526
00527 bool TreeViewItem::IsExpandCollapse(winrt::VirtualKey key)
00528 {
00529     const auto ctrlState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Control);
00530     const bool isControlPressed = (ctrlState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00531
00532     const auto altState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Menu);
00533     const bool isAltPressed = (altState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00534
00535     const auto shiftState = winrt::InputKeyboardSource::GetKeyStateForCurrentThread(winrt::VirtualKey::Shift);
00536     const bool isShiftPressed = (shiftState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
00537
00538     const bool isDirectionPressed = IsDirectionalKey(key);
00539
00540     return (isDirectionPressed && !isShiftPressed && !isAltPressed && !isControlPressed);
00541 }
00542
00543 void TreeViewItem::ReorderItems(const winrt::ListView& listControl, const winrt::TreeViewNode& targetNode, int position, int childIndex, bool isForwards)
00544 {
00545     const int positionModifier = isForwards ? 1 : -1;
00546     if (auto skippedItem = listControl.ContainerFromIndex(position + positionModifier))
00547     {
00548         skippedItem.as<winrt::TreeViewItem>().Focus(winrt::FocusState::Keyboard);
00549     }
00550
00551     const auto parentNode = targetNode.Parent();
00552     const auto children = winrt::get_self<TreeViewNodeVector>(parentNode.Children());
00553     children->RemoveAt(childIndex);
00554     children->InsertAt(childIndex + positionModifier, targetNode);
00555     listControl.UpdateLayout();
00556
00557     const auto treeView = AncestorTreeView();
00558     if (const auto lvi = treeView->ContainerFromNode(targetNode))
00559     {
00560         const auto targetItem = lvi.as<winrt::TreeViewItem>();
00561         targetItem.Focus(winrt::FocusState::Keyboard);
00562         winrt::get_self<TreeViewList>(listControl.as<winrt::TreeViewList>())->UpdateDropTargetDropEffect(false, false, targetItem);
00563         winrt::AutomationPeer ancestorPeer = winrt::FrameworkElementAutomationPeer::FromElement(listControl);
00564         ancestorPeer.RaiseAutomationEvent(winrt::AutomationEvents::Dropped);
00565     }
00566 }
00567
00568 void TreeViewItem::HandleGamepadAInMultiselectMode(const winrt::TreeViewNode& node)
00569 {
00570     if (node.HasChildren())
00571     {
00572         // Non-leaf node: cycle between selection and expansion
00573         if (!m_expansionCycled)
00574         {
00575             node.IsExpanded(!node.IsExpanded());
00576             m_expansionCycled = true;
00577         }
00578         else
00579         {
00580             m_expansionCycled = ToggleSelection();
00581         }
00582     }
00583     else
00584     {
00585         // Leaf node: toggle selection
00586         ToggleSelection();
00587     }
00588 }
00589
00590 bool TreeViewItem::ToggleSelection()
00591 {
00592     const auto currentState = CheckBoxSelectionState(m_selectionBox.get());
00593     const auto newState = currentState == TreeNodeSelectionState::Selected ? TreeNodeSelectionState::UnSelected : TreeNodeSelectionState::Selected;
00594     UpdateMultipleSelection(newState);
00595     return newState == TreeNodeSelectionState::Selected;
00596 }
00597
00598 void TreeViewItem::HandleReorder(winrt::VirtualKey key)
00599 {
00600     winrt::TreeViewNode targetNode = TreeNode();
00601
00602     winrt::TreeViewNode parentNode = targetNode.Parent();
00603     const auto listControl = AncestorTreeView()->ListControl();
00604     unsigned int position = listControl->IndexFromContainer(*this);
00605     if (key == winrt::VirtualKey::Up || key == winrt::VirtualKey::Left && position != 0)
00606     {
00607         unsigned int childIndex;
00608         parentNode.Children().IndexOf(targetNode, childIndex);
00609
00610         if (childIndex != 0)
00611         {
00612             if (targetNode.IsExpanded())
00613             {
00614                 targetNode.IsExpanded(false);
00615             }
00616
00617             ReorderItems(*listControl, targetNode, position, childIndex, false);
00618         }
00619     }
00620     else if ((key == winrt::VirtualKey::Down || key == winrt::VirtualKey::Right) && (position != listControl->Items().Size() - 1))
00621     {
00622         unsigned int childIndex;
00623         parentNode.Children().IndexOf(targetNode, childIndex);
00624         if (childIndex != parentNode.Children().Size() - 1)
00625         {
00626             if (targetNode.IsExpanded())
00627             {
00628                 targetNode.IsExpanded(false);
00629             }
00630
00631             ReorderItems(*listControl, targetNode, position, childIndex, true);
00632         }
00633     }
00634 }
00635
00636 bool TreeViewItem::HandleExpandCollapse(winrt::VirtualKey key)
00637 {
00638     const auto treeView = AncestorTreeView();
00639     const winrt::TreeViewNode targetNode = treeView->NodeFromContainer(*this);
00640     const auto flowDirectionReversed = (FlowDirection() == winrt::FlowDirection::RightToLeft);
00641     const bool isExpanded = targetNode.IsExpanded();
00642     bool handled = false;
00643
00644     // Inputs for Collapse/Move to parent
00645     if ((key == winrt::VirtualKey::Left && !flowDirectionReversed) ||
00646         (key == winrt::VirtualKey::Right && flowDirectionReversed))
00647     {
00648         if (isExpanded)// Is expanded : need to collapse
00649         {
00650             targetNode.IsExpanded(false);
00651             const auto targetValue = treeView->ContainerFromNode(targetNode);
00652             if (targetValue)
00653             {
00654                 const auto targetItem = targetValue.as<winrt::TreeViewItem>();
00655                 targetItem.Focus(winrt::FocusState::Keyboard);
00656             }
00657
00658             handled = true;
00659         }
00660         else // Is collapsed: need to select parent
00661         {
00662             if (auto parentNode = targetNode.Parent())
00663             {
00664                 if (auto parentValue = treeView->ContainerFromNode(parentNode))
00665                 {
00666                     const auto parentItem = parentValue.as<winrt::TreeViewItem>();
00667                     parentItem.Focus(winrt::FocusState::Keyboard);
00668                     handled = true;
00669                 }
00670             }
00671         }
00672     }
00673     // Inputs for Expand/Move to first child
00674     else if ((key == winrt::VirtualKey::Right && !flowDirectionReversed) ||
00675              (key == winrt::VirtualKey::Left && flowDirectionReversed))
00676     {
00677         if (!isExpanded && targetNode.HasChildren()) // Is collapsed : need to expand
00678         {
00679             targetNode.IsExpanded(true);
00680             handled = true;
00681         }
00682         else if (targetNode.Children().Size() > 0) // Is expanded and has children: need to select first child (if applicable)
00683         {
00684             const auto childNode = targetNode.Children().GetAt(0).as<winrt::TreeViewNode>();
00685             const auto childValue = treeView->ContainerFromNode(childNode);
00686             if (childValue)
00687             {
00688                 const auto childItem = childValue.as<winrt::TreeViewItem>();
00689                 childItem.Focus(winrt::FocusState::Keyboard);
00690                 handled = true;
00691             }
00692         }
00693     }
00694
00695     return handled;
00696 }
00697
00698 void TreeViewItem::OnExpandCollapseChevronPointerPressed(
00699     const winrt::IInspectable& /*sender*/,
00700     const winrt::PointerRoutedEventArgs& args)
00701 {
00702     const winrt::TreeViewNode targetNode = TreeNode();
00703     const auto isExpanded = !targetNode.IsExpanded();
00704     targetNode.IsExpanded(isExpanded);
00705
00706     args.Handled(true);
00707 }
00708
00709 void TreeViewItem::RecycleEvents(bool useSafeGet)
00710 {
00711     if (auto chevron = useSafeGet ? m_expandCollapseChevron.safe_get() : m_expandCollapseChevron.get())
00712     {
00713         if (m_expandCollapseChevronPointerPressedToken.value)
00714         {
00715             chevron.PointerCanceled(m_expandCollapseChevronPointerPressedToken);
00716             m_expandCollapseChevronPointerPressedToken.value = 0;
00717         }
00718     }
00719 }
00720
00721 /* static */
00722 bool constexpr TreeViewItem::IsDirectionalKey(winrt::VirtualKey key)
00723 {
00724     return
00725         key == winrt::VirtualKey::Up ||
00726         key == winrt::VirtualKey::Down ||
00727         key == winrt::VirtualKey::Left ||
00728         key == winrt::VirtualKey::Right;
00729 }
00730
00731 winrt::TreeViewNode TreeViewItem::TreeNode()
00732 {
00733     if (auto treeView = AncestorTreeView())
00734     {
00735         return treeView->NodeFromContainer(*this);
00736     }
00737
00738     return nullptr;
00739 }
00740
00741 //Setting IsExpanded changes the itemssource collection on the listview, which cannot be done during layout.
00742 //We schedule it on the dispatcher so that it runs after layout pass.
00743 void TreeViewItem::UpdateNodeIsExpandedAsync(winrt::TreeViewNode const& node, bool isExpanded)
00744 {
00745     DispatcherQueue().TryEnqueue(
00746         winrt::Microsoft::UI::Dispatching::DispatcherQueueHandler([node, isExpanded]()
00747         {
00748             node.IsExpanded(isExpanded);
00749         }));
00750 }
00751
00752 bool TreeViewItem::IsInContentMode()
00753 {
00754     const auto treeView = AncestorTreeView();
00755     const auto treeViewList = treeView->ListControl();
00756     return treeViewList->ListViewModel()->IsContentMode();
00757 }
00758
00759 TreeNodeSelectionState TreeViewItem::CheckBoxSelectionState(winrt::CheckBox const& checkBox)
00760 {
00761     winrt::IReference<bool> winrtBool = checkBox.IsChecked();
00762     if (winrtBool)
00763     {
00764         if (winrtBool.Value())
00765         {
00766             return TreeNodeSelectionState::Selected;
00767         }
00768
00769         return TreeNodeSelectionState::UnSelected;
00770     }
00771
00772     return TreeNodeSelectionState::PartialSelected;
00773 }
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/PipsPagerAutomationPeer.idl Source File

  • File List
  • File Members
  • PipsPager

PipsPagerAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass PipsPagerAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer
00007 {
00008     PipsPagerAutomationPeer(MU_XC_NAMESPACE.PipsPager owner);
00009 }
00010
00011 }
00012
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ProgressBarTemplateSettings.properties.cpp Source File

  • File List
  • File Members
  • Generated

ProgressBarTemplateSettings.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ProgressBarTemplateSettings.h"
00008
00009 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_ClipRectProperty{ nullptr };
00010 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_Container2AnimationEndPositionProperty{ nullptr };
00011 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_Container2AnimationStartPositionProperty{ nullptr };
00012 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_ContainerAnimationEndPositionProperty{ nullptr };
00013 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_ContainerAnimationMidPositionProperty{ nullptr };
00014 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_ContainerAnimationStartPositionProperty{ nullptr };
00015 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_EllipseAnimationEndPositionProperty{ nullptr };
00016 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_EllipseAnimationWellPositionProperty{ nullptr };
00017 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_EllipseDiameterProperty{ nullptr };
00018 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_EllipseOffsetProperty{ nullptr };
00019 GlobalDependencyProperty ProgressBarTemplateSettingsProperties::s_IndicatorLengthDeltaProperty{ nullptr };
00020
00021 ProgressBarTemplateSettingsProperties::ProgressBarTemplateSettingsProperties()
00022 {
00023     EnsureProperties();
00024 }
00025
00026 void ProgressBarTemplateSettingsProperties::EnsureProperties()
00027 {
00028     if (!s_ClipRectProperty)
00029     {
00030         s_ClipRectProperty =
00031             InitializeDependencyProperty(
00032                 L"ClipRect",
00033                 winrt::name_of<winrt::RectangleGeometry>(),
00034                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00035                 false /* isAttached */,
00036                 ValueHelper<winrt::RectangleGeometry>::BoxedDefaultValue(),
00037                 nullptr);
00038     }
00039     if (!s_Container2AnimationEndPositionProperty)
00040     {
00041         s_Container2AnimationEndPositionProperty =
00042             InitializeDependencyProperty(
00043                 L"Container2AnimationEndPosition",
00044                 winrt::name_of<double>(),
00045                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00046                 false /* isAttached */,
00047                 ValueHelper<double>::BoxedDefaultValue(),
00048                 nullptr);
00049     }
00050     if (!s_Container2AnimationStartPositionProperty)
00051     {
00052         s_Container2AnimationStartPositionProperty =
00053             InitializeDependencyProperty(
00054                 L"Container2AnimationStartPosition",
00055                 winrt::name_of<double>(),
00056                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00057                 false /* isAttached */,
00058                 ValueHelper<double>::BoxedDefaultValue(),
00059                 nullptr);
00060     }
00061     if (!s_ContainerAnimationEndPositionProperty)
00062     {
00063         s_ContainerAnimationEndPositionProperty =
00064             InitializeDependencyProperty(
00065                 L"ContainerAnimationEndPosition",
00066                 winrt::name_of<double>(),
00067                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00068                 false /* isAttached */,
00069                 ValueHelper<double>::BoxedDefaultValue(),
00070                 nullptr);
00071     }
00072     if (!s_ContainerAnimationMidPositionProperty)
00073     {
00074         s_ContainerAnimationMidPositionProperty =
00075             InitializeDependencyProperty(
00076                 L"ContainerAnimationMidPosition",
00077                 winrt::name_of<double>(),
00078                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00079                 false /* isAttached */,
00080                 ValueHelper<double>::BoxedDefaultValue(),
00081                 nullptr);
00082     }
00083     if (!s_ContainerAnimationStartPositionProperty)
00084     {
00085         s_ContainerAnimationStartPositionProperty =
00086             InitializeDependencyProperty(
00087                 L"ContainerAnimationStartPosition",
00088                 winrt::name_of<double>(),
00089                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00090                 false /* isAttached */,
00091                 ValueHelper<double>::BoxedDefaultValue(),
00092                 nullptr);
00093     }
00094     if (!s_EllipseAnimationEndPositionProperty)
00095     {
00096         s_EllipseAnimationEndPositionProperty =
00097             InitializeDependencyProperty(
00098                 L"EllipseAnimationEndPosition",
00099                 winrt::name_of<double>(),
00100                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00101                 false /* isAttached */,
00102                 ValueHelper<double>::BoxedDefaultValue(),
00103                 nullptr);
00104     }
00105     if (!s_EllipseAnimationWellPositionProperty)
00106     {
00107         s_EllipseAnimationWellPositionProperty =
00108             InitializeDependencyProperty(
00109                 L"EllipseAnimationWellPosition",
00110                 winrt::name_of<double>(),
00111                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00112                 false /* isAttached */,
00113                 ValueHelper<double>::BoxedDefaultValue(),
00114                 nullptr);
00115     }
00116     if (!s_EllipseDiameterProperty)
00117     {
00118         s_EllipseDiameterProperty =
00119             InitializeDependencyProperty(
00120                 L"EllipseDiameter",
00121                 winrt::name_of<double>(),
00122                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00123                 false /* isAttached */,
00124                 ValueHelper<double>::BoxedDefaultValue(),
00125                 nullptr);
00126     }
00127     if (!s_EllipseOffsetProperty)
00128     {
00129         s_EllipseOffsetProperty =
00130             InitializeDependencyProperty(
00131                 L"EllipseOffset",
00132                 winrt::name_of<double>(),
00133                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00134                 false /* isAttached */,
00135                 ValueHelper<double>::BoxedDefaultValue(),
00136                 nullptr);
00137     }
00138     if (!s_IndicatorLengthDeltaProperty)
00139     {
00140         s_IndicatorLengthDeltaProperty =
00141             InitializeDependencyProperty(
00142                 L"IndicatorLengthDelta",
00143                 winrt::name_of<double>(),
00144                 winrt::name_of<winrt::ProgressBarTemplateSettings>(),
00145                 false /* isAttached */,
00146                 ValueHelper<double>::BoxedDefaultValue(),
00147                 nullptr);
00148     }
00149 }
00150
00151 void ProgressBarTemplateSettingsProperties::ClearProperties()
00152 {
00153     s_ClipRectProperty = nullptr;
00154     s_Container2AnimationEndPositionProperty = nullptr;
00155     s_Container2AnimationStartPositionProperty = nullptr;
00156     s_ContainerAnimationEndPositionProperty = nullptr;
00157     s_ContainerAnimationMidPositionProperty = nullptr;
00158     s_ContainerAnimationStartPositionProperty = nullptr;
00159     s_EllipseAnimationEndPositionProperty = nullptr;
00160     s_EllipseAnimationWellPositionProperty = nullptr;
00161     s_EllipseDiameterProperty = nullptr;
00162     s_EllipseOffsetProperty = nullptr;
00163     s_IndicatorLengthDeltaProperty = nullptr;
00164 }
00165
00166 void ProgressBarTemplateSettingsProperties::ClipRect(winrt::RectangleGeometry const& value)
00167 {
00168     [[gsl::suppress(con)]]
00169     {
00170     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ClipRectProperty, ValueHelper<winrt::RectangleGeometry>::BoxValueIfNecessary(value));
00171     }
00172 }
00173
00174 winrt::RectangleGeometry ProgressBarTemplateSettingsProperties::ClipRect()
00175 {
00176     return ValueHelper<winrt::RectangleGeometry>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ClipRectProperty));
00177 }
00178
00179 void ProgressBarTemplateSettingsProperties::Container2AnimationEndPosition(double value)
00180 {
00181     [[gsl::suppress(con)]]
00182     {
00183     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_Container2AnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00184     }
00185 }
00186
00187 double ProgressBarTemplateSettingsProperties::Container2AnimationEndPosition()
00188 {
00189     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_Container2AnimationEndPositionProperty));
00190 }
00191
00192 void ProgressBarTemplateSettingsProperties::Container2AnimationStartPosition(double value)
00193 {
00194     [[gsl::suppress(con)]]
00195     {
00196     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_Container2AnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00197     }
00198 }
00199
00200 double ProgressBarTemplateSettingsProperties::Container2AnimationStartPosition()
00201 {
00202     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_Container2AnimationStartPositionProperty));
00203 }
00204
00205 void ProgressBarTemplateSettingsProperties::ContainerAnimationEndPosition(double value)
00206 {
00207     [[gsl::suppress(con)]]
00208     {
00209     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ContainerAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00210     }
00211 }
00212
00213 double ProgressBarTemplateSettingsProperties::ContainerAnimationEndPosition()
00214 {
00215     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ContainerAnimationEndPositionProperty));
00216 }
00217
00218 void ProgressBarTemplateSettingsProperties::ContainerAnimationMidPosition(double value)
00219 {
00220     [[gsl::suppress(con)]]
00221     {
00222     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ContainerAnimationMidPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00223     }
00224 }
00225
00226 double ProgressBarTemplateSettingsProperties::ContainerAnimationMidPosition()
00227 {
00228     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ContainerAnimationMidPositionProperty));
00229 }
00230
00231 void ProgressBarTemplateSettingsProperties::ContainerAnimationStartPosition(double value)
00232 {
00233     [[gsl::suppress(con)]]
00234     {
00235     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_ContainerAnimationStartPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00236     }
00237 }
00238
00239 double ProgressBarTemplateSettingsProperties::ContainerAnimationStartPosition()
00240 {
00241     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_ContainerAnimationStartPositionProperty));
00242 }
00243
00244 void ProgressBarTemplateSettingsProperties::EllipseAnimationEndPosition(double value)
00245 {
00246     [[gsl::suppress(con)]]
00247     {
00248     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseAnimationEndPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00249     }
00250 }
00251
00252 double ProgressBarTemplateSettingsProperties::EllipseAnimationEndPosition()
00253 {
00254     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseAnimationEndPositionProperty));
00255 }
00256
00257 void ProgressBarTemplateSettingsProperties::EllipseAnimationWellPosition(double value)
00258 {
00259     [[gsl::suppress(con)]]
00260     {
00261     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseAnimationWellPositionProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00262     }
00263 }
00264
00265 double ProgressBarTemplateSettingsProperties::EllipseAnimationWellPosition()
00266 {
00267     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseAnimationWellPositionProperty));
00268 }
00269
00270 void ProgressBarTemplateSettingsProperties::EllipseDiameter(double value)
00271 {
00272     [[gsl::suppress(con)]]
00273     {
00274     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseDiameterProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00275     }
00276 }
00277
00278 double ProgressBarTemplateSettingsProperties::EllipseDiameter()
00279 {
00280     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseDiameterProperty));
00281 }
00282
00283 void ProgressBarTemplateSettingsProperties::EllipseOffset(double value)
00284 {
00285     [[gsl::suppress(con)]]
00286     {
00287     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_EllipseOffsetProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00288     }
00289 }
00290
00291 double ProgressBarTemplateSettingsProperties::EllipseOffset()
00292 {
00293     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_EllipseOffsetProperty));
00294 }
00295
00296 void ProgressBarTemplateSettingsProperties::IndicatorLengthDelta(double value)
00297 {
00298     [[gsl::suppress(con)]]
00299     {
00300     static_cast<ProgressBarTemplateSettings*>(this)->SetValue(s_IndicatorLengthDeltaProperty, ValueHelper<double>::BoxValueIfNecessary(value));
00301     }
00302 }
00303
00304 double ProgressBarTemplateSettingsProperties::IndicatorLengthDelta()
00305 {
00306     return ValueHelper<double>::CastOrUnbox(static_cast<ProgressBarTemplateSettings*>(this)->GetValue(s_IndicatorLengthDeltaProperty));
00307 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewTemplateSettings.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewTemplateSettings.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewTemplateSettings.h"
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ProgressRingAutomationPeer Member List

This is the complete list of members for ProgressRingAutomationPeer, including all inherited members.
abi_enter() | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
CheckThread() | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< ProgressRingAutomationPeer > &&self) noexcept | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
final_release(std::unique_ptr< ProgressRingAutomationPeer > &&self) | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline, static]
GetAutomationControlTypeCore() | ProgressRingAutomationPeer |
GetBase() | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
GetClassNameCore() | ProgressRingAutomationPeer |
GetImpl() | ProgressRingAutomationPeer | [private]
GetInner() | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
GetLocalizedControlTypeCore() | ProgressRingAutomationPeer |
GetNameCore() | ProgressRingAutomationPeer |
GetPatternCore(winrt::PatternInterface const &patternInterface) | ProgressRingAutomationPeer |
IsOnThread() | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
IsReadOnly() | ProgressRingAutomationPeer | [inline]
LargeChange() | ProgressRingAutomationPeer |
Maximum() | ProgressRingAutomationPeer |
Minimum() | ProgressRingAutomationPeer |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
ProgressRingAutomationPeer(winrt::ProgressRing const &owner) | ProgressRingAutomationPeer |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ProgressRingAutomationPeer, winrt::implementation::ProgressRingAutomationPeerT > | [inline]
SetValue(double value) | ProgressRingAutomationPeer |
SmallChange() | ProgressRingAutomationPeer |
Value() | ProgressRingAutomationPeer |
Generated on Sun Dec 1 2024 20:53:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/ItemsSourceSamples/CollectionChangeDemo.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • ItemsSourceSamples

CollectionChangeDemo.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Collections.Specialized;
00008 using System.Linq;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011
00012 namespace MUXControlsTestApp.Samples
00013 {
00014     public sealed partial class CollectionChangeDemo : Page
00015     {
00016         MyDataSource _dataSource = new MyDataSource(Enumerable.Range(0, 10).Select(i => i.ToString()).ToList());
00017         public List<object> ResettingListItems { get; set; } = new List<object> { "item0", "item1", "item2", "item3", "item4", "item5", "item6", "item7", "item8", "item9" };
00018         public CollectionChangeDemo()
00019         {
00020             this.InitializeComponent();
00021             goBackButton.Click += delegate { Frame.GoBack(); };
00022             insertButton.Click += delegate { _dataSource.Insert(int.Parse(newStartIndex.Text), int.Parse(newCount.Text), resetMode.IsChecked ?? false); };
00023             removeButton.Click += delegate { _dataSource.Remove(int.Parse(oldStartIndex.Text), int.Parse(oldCount.Text), resetMode.IsChecked ?? false); };
00024             replaceButton.Click += delegate { _dataSource.Replace(int.Parse(oldStartIndex.Text), int.Parse(oldCount.Text), int.Parse(newCount.Text), resetMode.IsChecked ?? false); };
00025             moveButton.Click += delegate { _dataSource.Move(int.Parse(oldStartIndex.Text), int.Parse(newStartIndex.Text), int.Parse(oldCount.Text), resetMode.IsChecked ?? false); };
00026             resetButton.Click += delegate { _dataSource.Reset(); };
00027
00028             repeater.ItemTemplate = elementFactory;
00029             repeater.ItemsSource = _dataSource;
00030         }
00031
00032         private void OnSelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args)
00033         {
00034             args.TemplateKey = (int.Parse(args.DataContext.ToString()) % 2 == 0) ? "even" : "odd";
00035         }
00036
00037         private void ResettingCollectionRemoveItemButton_ItemClick(object sender, RoutedEventArgs e)
00038         {
00039             ResettingListItems.Remove((sender as Button).Content);
00040             ResettingListItems = new List<object>(ResettingListItems);
00041             ResettingCollectionRepeater.ItemsSource = ResettingListItems;
00042         }
00043         private void OnItemClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
00044         {
00045             int index = repeater.GetElementIndex(sender as UIElement);
00046             _dataSource.Remove(index, 1 /* count */ , true /* reset */);
00047         }
00048
00049         private class MyDataSource : CustomItemsSourceViewWithUniqueIdMapping
00050         {
00051             List<string> _inner;
00052
00053             public MyDataSource(List<string> source)
00054             {
00055                 Inner = source;
00056             }
00057
00058             protected override int GetSizeCore()
00059             {
00060                 return Inner.Count;
00061             }
00062
00063             public List<string> Inner
00064             {
00065                 get
00066                 {
00067                     return _inner;
00068                 }
00069
00070                 set
00071                 {
00072                     _inner = value;
00073                 }
00074             }
00075
00076             protected override object GetAtCore(int index)
00077             {
00078                 return Inner[index];
00079             }
00080
00081             protected override string KeyFromIndexCore(int index)
00082             {
00083                 // data is the same as its unique id
00084                 return Inner[index].ToString();
00085             }
00086
00087             public void Insert(int index, int count, bool reset)
00088             {
00089                 for (int i = 0; i < count; i++)
00090                 {
00091                     Inner.Insert(index + i, (1000 + i).ToString());
00092                 }
00093
00094                 if (reset)
00095                 {
00096                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00097                 }
00098                 else
00099                 {
00100                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00101                         NotifyCollectionChangedAction.Add,
00102                         oldStartingIndex: -1,
00103                         oldItemsCount: 0,
00104                         newStartingIndex: index,
00105                         newItemsCount: count));
00106                 }
00107             }
00108
00109             public void Remove(int index, int count, bool reset)
00110             {
00111                 for (int i = 0; i < count; i++)
00112                 {
00113                     Inner.RemoveAt(index);
00114                 }
00115
00116                 if (reset)
00117                 {
00118                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00119                 }
00120                 else
00121                 {
00122                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00123                         NotifyCollectionChangedAction.Remove,
00124                         oldStartingIndex: index,
00125                         oldItemsCount: count,
00126                         newStartingIndex: -1,
00127                         newItemsCount: 0));
00128                 }
00129             }
00130
00131             public void Replace(int index, int oldCount, int newCount, bool reset)
00132             {
00133                 for (int i = 0; i < oldCount; i++)
00134                 {
00135                     Inner.RemoveAt(index);
00136                 }
00137
00138                 for (int i = 0; i < newCount; i++)
00139                 {
00140                     Inner.Insert(index, (10000 + i).ToString());
00141                 }
00142
00143                 if (reset)
00144                 {
00145                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00146                 }
00147                 else
00148                 {
00149                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00150                         NotifyCollectionChangedAction.Replace,
00151                         oldStartingIndex: index,
00152                         oldItemsCount: oldCount,
00153                         newStartingIndex: index,
00154                         newItemsCount: newCount));
00155                 }
00156             }
00157
00158             public void Move(int oldIndex, int newIndex, int count, bool reset)
00159             {
00160                 var items = Inner.GetRange(oldIndex, count);
00161                 Inner.RemoveRange(oldIndex, count);
00162                 Inner.InsertRange(newIndex, items);
00163
00164                 if (reset)
00165                 {
00166                     OnItemsSourceChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
00167                 }
00168                 else
00169                 {
00170                     OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(
00171                         NotifyCollectionChangedAction.Move,
00172                         oldStartingIndex: oldIndex,
00173                         oldItemsCount: count,
00174                         newStartingIndex: newIndex,
00175                         newItemsCount: count));
00176                 }
00177             }
00178
00179             public void Reset()
00180             {
00181                 Random rand = new Random(123);
00182                 for (int i = 0; i < 10; i++)
00183                 {
00184                     int from = rand.Next(0, Inner.Count - 1);
00185                     var value = Inner[from];
00186                     Inner.RemoveAt(from);
00187                     int to = rand.Next(0, Inner.Count - 1);
00188                     Inner.Insert(to, value);
00189                 }
00190
00191                 // something changed, but i dont want to tell you the
00192                 // exact changes
00193                 OnItemsSourceChanged(CollectionChangeEventArgsConverters.CreateNotifyArgs(NotifyCollectionChangedAction.Reset, -1, -1, -1, -1));
00194             }
00195         }
00196     }
00197 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

GenericInkCallback Member List

This is the complete list of members for GenericInkCallback, including all inherited members.
GenericInkCallback(const std::function< void()> &func) | GenericInkCallback | [inline]
Invoke() | GenericInkCallback | [inline]
m_func | GenericInkCallback | [private]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTip Member List

This is the complete list of members for TeachingTip, including all inherited members.
abi_enter() | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
ActionButtonClick(winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value) | TeachingTipProperties |
ActionButtonClick(winrt::event_token const &token) | TeachingTipProperties |
ActionButtonCommand(winrt::ICommand const &value) | TeachingTipProperties |
ActionButtonCommand() | TeachingTipProperties |
ActionButtonCommandParameter(winrt::IInspectable const &value) | TeachingTipProperties |
ActionButtonCommandParameter() | TeachingTipProperties |
ActionButtonCommandParameterProperty() | TeachingTipProperties | [inline, static]
ActionButtonCommandProperty() | TeachingTipProperties | [inline, static]
ActionButtonContent(winrt::IInspectable const &value) | TeachingTipProperties |
ActionButtonContent() | TeachingTipProperties |
ActionButtonContentProperty() | TeachingTipProperties | [inline, static]
ActionButtonStyle(winrt::Style const &value) | TeachingTipProperties |
ActionButtonStyle() | TeachingTipProperties |
ActionButtonStyleProperty() | TeachingTipProperties | [inline, static]
BottomLeftPlacementTopLeftHighlightMargin(double width, double height) | TeachingTip | [inline, private]
BottomLeftPlacementTopRightHighlightMargin(double width, double height) | TeachingTip | [inline, private]
BottomPlacementTopLeftHighlightMargin(double width, double height) | TeachingTip | [inline, private]
BottomPlacementTopRightHighlightMargin(double width, double height) | TeachingTip | [inline, private]
BottomRightPlacementTopLeftHighlightMargin(double width, double height) | TeachingTip | [inline, private]
BottomRightPlacementTopRightHighlightMargin(double width, double height) | TeachingTip | [inline, private]
CheckThread() | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
ClearProperties() | TeachingTipProperties | [static]
CloseButtonClick(winrt::TypedEventHandler< winrt::TeachingTip, winrt::IInspectable > const &value) | TeachingTipProperties |
CloseButtonClick(winrt::event_token const &token) | TeachingTipProperties |
CloseButtonCommand(winrt::ICommand const &value) | TeachingTipProperties |
CloseButtonCommand() | TeachingTipProperties |
CloseButtonCommandParameter(winrt::IInspectable const &value) | TeachingTipProperties |
CloseButtonCommandParameter() | TeachingTipProperties |
CloseButtonCommandParameterProperty() | TeachingTipProperties | [inline, static]
CloseButtonCommandProperty() | TeachingTipProperties | [inline, static]
CloseButtonContent(winrt::IInspectable const &value) | TeachingTipProperties |
CloseButtonContent() | TeachingTipProperties |
CloseButtonContentProperty() | TeachingTipProperties | [inline, static]
CloseButtonStyle(winrt::Style const &value) | TeachingTipProperties |
CloseButtonStyle() | TeachingTipProperties |
CloseButtonStyleProperty() | TeachingTipProperties | [inline, static]
Closed(winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosedEventArgs > const &value) | TeachingTipProperties |
Closed(winrt::event_token const &token) | TeachingTipProperties |
ClosePopup() | TeachingTip | [private]
ClosePopupOnUnloadEvent(winrt::IInspectable const &, winrt::RoutedEventArgs const &e) | TeachingTip | [private]
ClosePopupWithAnimationIfAvailable() | TeachingTip | [private]
Closing(winrt::TypedEventHandler< winrt::TeachingTip, winrt::TeachingTipClosingEventArgs > const &value) | TeachingTipProperties |
Closing(winrt::event_token const &token) | TeachingTipProperties |
CreateContractAnimation() | TeachingTip | [private]
CreateExpandAnimation() | TeachingTip | [private]
CreateLightDismissIndicatorPopup() | TeachingTip | [private]
CreateNewPopup() | TeachingTip | [private]
DeleteInstanceOnUIThread(std::unique_ptr< TeachingTip > &&self) noexcept | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline, static]
DetermineEffectivePlacement() | TeachingTip | [private]
DetermineEffectivePlacementTargeted(double contentHight, double contentWidth) | TeachingTip | [private]
DetermineEffectivePlacementUntargeted(double contentHight, double contentWidth) | TeachingTip | [private]
DetermineSpaceAroundTarget() | TeachingTip | [private]
EnsureProperties() | TeachingTipProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
EstablishShadows() | TeachingTip | [private]
final_release(std::unique_ptr< TeachingTip > &&self) | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline, static]
GetBase() | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
GetEffectiveHeroContentPlacement() | TeachingTip |
GetEffectivePlacement() | TeachingTip |
GetEffectiveScreenBoundsInCoreWindowSpace(const winrt::Rect &windowBounds) | TeachingTip | [private]
GetEffectiveWindowBoundsInCoreWindowSpace(const winrt::Rect &windowBounds) | TeachingTip | [private]
GetFlowDirectionAdjustedPlacement(const winrt::TeachingTipPlacementMode &placementMode) | TeachingTip | [private]
GetHorizontalOffset() | TeachingTip |
GetInner() | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
GetIsIdle() | TeachingTip |
GetPlacementFallbackOrder(winrt::TeachingTipPlacementMode preferredPalcement) | TeachingTip | [private, static]
GetSubtitleVisibility() | TeachingTip |
GetTeachingTipCornerRadius() | TeachingTip | [private]
GetTitleVisibility() | TeachingTip |
GetVerticalOffset() | TeachingTip |
GetWindowBounds() | TeachingTip | [private]
HandleF6Clicked(bool fromPopup=false) | TeachingTip | [private]
HeroContent(winrt::UIElement const &value) | TeachingTipProperties |
HeroContent() | TeachingTipProperties |
HeroContentPlacement(winrt::TeachingTipHeroContentPlacementMode const &value) | TeachingTipProperties |
HeroContentPlacement() | TeachingTipProperties |
HeroContentPlacementProperty() | TeachingTipProperties | [inline, static]
HeroContentProperty() | TeachingTipProperties | [inline, static]
IconSource(winrt::IconSource const &value) | TeachingTipProperties |
IconSource() | TeachingTipProperties |
IconSourceProperty() | TeachingTipProperties | [inline, static]
IsLightDismissEnabled(bool value) | TeachingTipProperties |
IsLightDismissEnabled() | TeachingTipProperties |
IsLightDismissEnabledProperty() | TeachingTipProperties | [inline, static]
IsOnThread() | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
IsOpen(bool value) | TeachingTipProperties |
IsOpen() | TeachingTipProperties |
IsOpenChangedToClose() | TeachingTip | [private]
IsOpenChangedToOpen() | TeachingTip | [private]
IsOpenProperty() | TeachingTipProperties | [inline, static]
IsPlacementBottom(winrt::TeachingTipPlacementMode placement) | TeachingTip | [inline, private, static]
IsPlacementLeft(winrt::TeachingTipPlacementMode placement) | TeachingTip | [inline, private, static]
IsPlacementRight(winrt::TeachingTipPlacementMode placement) | TeachingTip | [inline, private, static]
IsPlacementTop(winrt::TeachingTipPlacementMode placement) | TeachingTip | [inline, private, static]
LeftEdgePlacementTopLeftHighlightMargin(double width, double height) | TeachingTip | [inline, private]
m_actionButtonClickEventSource | TeachingTipProperties |
m_closeButtonClickEventSource | TeachingTipProperties |
m_closedEventSource | TeachingTipProperties |
m_closingEventSource | TeachingTipProperties |
m_TargetUnloadedRevoker | TeachingTip | [private]
MinimumTipEdgeToTailCenter() | TeachingTip | [private]
MinimumTipEdgeToTailEdgeMargin() | TeachingTip | [private]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
OnActionButtonClicked(const winrt::IInspectable &, const winrt::RoutedEventArgs &) | TeachingTip | [private]
OnActionButtonCommandParameterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnActionButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnActionButtonContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnActionButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnApplyTemplate() | TeachingTip |
OnAutomationIdChanged(const winrt::IInspectable &, const winrt::IInspectable &) | TeachingTip | [private]
OnAutomationNameChanged(const winrt::IInspectable &, const winrt::IInspectable &) | TeachingTip | [private]
OnCloseButtonClicked(const winrt::IInspectable &, const winrt::RoutedEventArgs &) | TeachingTip | [private]
OnCloseButtonCommandParameterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnCloseButtonCommandPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnCloseButtonContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnCloseButtonStylePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnContentChanged(const winrt::IInspectable &oldContent, const winrt::IInspectable &newContent) | TeachingTip |
OnContentSizeChanged(const winrt::IInspectable &, const winrt::SizeChangedEventArgs &args) | TeachingTip | [private]
OnCreateAutomationPeer() | TeachingTip |
OnF6AcceleratorKeyClicked(const winrt::CoreDispatcher &, const winrt::AcceleratorKeyEventArgs &args) | TeachingTip | [private]
OnF6PopupPreviewKeyDownClicked(const winrt::IInspectable &, const winrt::KeyRoutedEventArgs &args) | TeachingTip | [private]
OnF6PreviewKeyDownClicked(const winrt::IInspectable &, const winrt::KeyRoutedEventArgs &args) | TeachingTip | [private]
OnHeroContentPlacementChanged() | TeachingTip | [private]
OnHeroContentPlacementPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnHeroContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnIconSourceChanged() | TeachingTip | [private]
OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnIsLightDismissEnabledChanged() | TeachingTip | [private]
OnIsLightDismissEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnIsOpenChanged() | TeachingTip | [private]
OnIsOpenPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnLightDismissIndicatorPopupClosed(const winrt::IInspectable &, const winrt::IInspectable &) | TeachingTip | [private]
OnPlacementMarginChanged() | TeachingTip | [private]
OnPlacementMarginPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnPopupClosed(const winrt::IInspectable &, const winrt::IInspectable &) | TeachingTip | [private]
OnPopupOpened(const winrt::IInspectable &, const winrt::IInspectable &) | TeachingTip | [private]
OnPreferredPlacementPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | TeachingTip |
OnPropertyChanged(const winrt::DependencyObject &sender, const winrt::DependencyPropertyChangedEventArgs &args) | TeachingTip | [private, static]
OnShouldConstrainToRootBoundsChanged() | TeachingTip | [private]
OnShouldConstrainToRootBoundsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnSubtitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnTailVisibilityChanged() | TeachingTip | [private]
OnTailVisibilityPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnTargetChanged() | TeachingTip | [private]
OnTargetLayoutUpdated(const winrt::IInspectable &, const winrt::IInspectable &) | TeachingTip | [private]
OnTargetLoaded(const winrt::IInspectable &, const winrt::IInspectable &) | TeachingTip | [private]
OnTargetPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OnTitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TeachingTipProperties | [static]
OtherPlacementTopRightHighlightMargin(double width, double height) | TeachingTip | [inline, private, static]
PlacementMargin(winrt::Thickness const &value) | TeachingTipProperties |
PlacementMargin() | TeachingTipProperties |
PlacementMarginProperty() | TeachingTipProperties | [inline, static]
PositionPopup() | TeachingTip | [private]
PositionTargetedPopup() | TeachingTip | [private]
PositionUntargetedPopup() | TeachingTip | [private]
PreferredPlacement(winrt::TeachingTipPlacementMode const &value) | TeachingTipProperties |
PreferredPlacement() | TeachingTipProperties |
PreferredPlacementProperty() | TeachingTipProperties | [inline, static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
RaiseClosingEvent(bool attachDeferralCompletedHandler) | TeachingTip | [private]
ReferenceTracker(Args &&...args) | ReferenceTracker< TeachingTip, winrt::implementation::TeachingTipT > | [inline]
RepositionPopup() | TeachingTip | [private]
RevokeViewportChangedEvent() | TeachingTip | [private]
RightEdgePlacementTopLeftHighlightMargin(double width, double height) | TeachingTip | [inline, private]
s_ActionButtonCommandParameterProperty | TeachingTipProperties | [static]
s_ActionButtonCommandProperty | TeachingTipProperties | [static]
s_ActionButtonContentProperty | TeachingTipProperties | [static]
s_ActionButtonStyleProperty | TeachingTipProperties | [static]
s_CloseButtonCommandParameterProperty | TeachingTipProperties | [static]
s_CloseButtonCommandProperty | TeachingTipProperties | [static]
s_CloseButtonContentProperty | TeachingTipProperties | [static]
s_CloseButtonStyleProperty | TeachingTipProperties | [static]
s_defaultTipHeightAndWidth | TeachingTip | [private, static]
s_HeroContentPlacementProperty | TeachingTipProperties | [static]
s_HeroContentProperty | TeachingTipProperties | [static]
s_IconSourceProperty | TeachingTipProperties | [static]
s_IsLightDismissEnabledProperty | TeachingTipProperties | [static]
s_IsOpenProperty | TeachingTipProperties | [static]
s_PlacementMarginProperty | TeachingTipProperties | [static]
s_PreferredPlacementProperty | TeachingTipProperties | [static]
s_ShouldConstrainToRootBoundsProperty | TeachingTipProperties | [static]
s_SubtitleProperty | TeachingTipProperties | [static]
s_tailOcclusionAmount | TeachingTip | [private, static]
s_TailVisibilityProperty | TeachingTipProperties | [static]
s_TargetProperty | TeachingTipProperties | [static]
s_TemplateSettingsProperty | TeachingTipProperties | [static]
s_TitleProperty | TeachingTipProperties | [static]
s_untargetedTipWindowEdgeMargin | TeachingTip | [private, static]
SetContentElevation(float elevation) | TeachingTip |
SetContractAnimationDuration(const winrt::TimeSpan &contractAnimationDuration) | TeachingTip |
SetContractEasingFunction(const winrt::CompositionEasingFunction &easingFunction) | TeachingTip |
SetExpandAnimationDuration(const winrt::TimeSpan &expandAnimationDuration) | TeachingTip |
SetExpandEasingFunction(const winrt::CompositionEasingFunction &easingFunction) | TeachingTip |
SetIsIdle(bool isIdle) | TeachingTip |
SetPopupAutomationProperties() | TeachingTip | [private]
SetReturnTopForOutOfWindowPlacement(bool useScreenBoundsForAutoPlacement) | TeachingTip |
SetTailElevation(float elevation) | TeachingTip |
SetTestScreenBounds(const winrt::Rect &testScreenBounds) | TeachingTip |
SetTestWindowBounds(const winrt::Rect &testWindowBounds) | TeachingTip |
SetTipFollowsTarget(bool tipFollowsTarget) | TeachingTip |
SetTipShouldHaveShadow(bool tipShadow) | TeachingTip |
SetUseTestScreenBounds(bool useTestScreenBounds) | TeachingTip |
SetUseTestWindowBounds(bool useTestWindowBounds) | TeachingTip |
SetViewportChangedEvent(const gsl::strict_not_null< winrt::FrameworkElement > &target) | TeachingTip | [private]
ShouldConstrainToRootBounds(bool value) | TeachingTipProperties |
ShouldConstrainToRootBounds() | TeachingTipProperties |
ShouldConstrainToRootBoundsProperty() | TeachingTipProperties | [inline, static]
StartContractToClose() | TeachingTip | [private]
StartExpandToOpen() | TeachingTip | [private]
Subtitle(winrt::hstring const &value) | TeachingTipProperties |
Subtitle() | TeachingTipProperties |
SubtitleProperty() | TeachingTipProperties | [inline, static]
TailLongSideActualLength() | TeachingTip | [private]
TailLongSideLength() | TeachingTip | [private]
TailShortSideLength() | TeachingTip | [private]
TailVisibility(winrt::TeachingTipTailVisibility const &value) | TeachingTipProperties |
TailVisibility() | TeachingTipProperties |
TailVisibilityProperty() | TeachingTipProperties | [inline, static]
Target(winrt::FrameworkElement const &value) | TeachingTipProperties |
Target() | TeachingTipProperties |
TargetProperty() | TeachingTipProperties | [inline, static]
TeachingTip() | TeachingTip |
TeachingTipProperties() | TeachingTipProperties |
TeachingTipTestHooks class | TeachingTip | [friend]
TemplateSettings(winrt::TeachingTipTemplateSettings const &value) | TeachingTipProperties |
TemplateSettings() | TeachingTipProperties |
TemplateSettingsProperty() | TeachingTipProperties | [inline, static]
Title(winrt::hstring const &value) | TeachingTipProperties |
Title() | TeachingTipProperties |
TitleProperty() | TeachingTipProperties | [inline, static]
ToggleVisibilityForEmptyContent(const wstring_view visibleStateName, const wstring_view collapsedStateName, const winrt::hstring &content) | TeachingTip | [private]
TopEdgePlacementTopLeftHighlightMargin(double width, double height) | TeachingTip | [inline, private]
TopLeftCornerRadius() | TeachingTip | [inline, private]
TopRightCornerRadius() | TeachingTip | [inline, private]
TrySetCenterPoint(const winrt::IUIElement &element, const winrt::float3 &centerPoint) | TeachingTip | [private]
UntargetedTipCenterPlacementOffset(float nearWindowCoordinateInCoreWindowSpace, float farWindowCoordinateInCoreWindowSpace, double tipSize, double nearOffset, double farOffset) | TeachingTip | [inline, private, static]
UntargetedTipFarPlacementOffset(float farWindowCoordinateInCoreWindowSpace, double tipSize, double offset) | TeachingTip | [inline, private, static]
UntargetedTipNearPlacementOffset(float nearWindowCoordinateInCoreWindowSpace, double offset) | TeachingTip | [inline, private, static]
UpdateButtonAutomationProperties(const winrt::Button button, const winrt::IInspectable content) | TeachingTip | [private]
UpdateButtonsState() | TeachingTip | [private]
UpdateDynamicHeroContentPlacementToBottom() | TeachingTip | [private]
UpdateDynamicHeroContentPlacementToBottomImpl() | TeachingTip | [private]
UpdateDynamicHeroContentPlacementToTop() | TeachingTip | [private]
UpdateDynamicHeroContentPlacementToTopImpl() | TeachingTip | [private]
UpdatePopupRequestedTheme() | TeachingTip | [private]
UpdateSizeBasedTemplateSettings() | TeachingTip | [private]
UpdateTail() | TeachingTip | [private]
XamlRootChanged(const winrt::XamlRoot &, const winrt::XamlRootChangedEventArgs &) | TeachingTip | [private]
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTrace.h Source File

  • File List
  • File Members
  • ScrollView

ScrollViewTrace.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007 #include "MuxcTraceLogging.h"
00008 #include "Utils.h"
00009 #include "MUXControlsTestHooks.h"
00010
00011 inline bool IsScrollViewTracingEnabled()
00012 {
00013     return g_IsLoggingProviderEnabled &&
00014         g_LoggingProviderLevel >= WINEVENT_LEVEL_INFO &&
00015         (g_LoggingProviderMatchAnyKeyword & KEYWORD_SCROLLVIEW || g_LoggingProviderMatchAnyKeyword == 0);
00016 }
00017
00018 inline bool IsScrollViewVerboseTracingEnabled()
00019 {
00020     return g_IsLoggingProviderEnabled &&
00021         g_LoggingProviderLevel >= WINEVENT_LEVEL_VERBOSE &&
00022         (g_LoggingProviderMatchAnyKeyword & KEYWORD_SCROLLVIEW || g_LoggingProviderMatchAnyKeyword == 0);
00023 }
00024
00025 inline bool IsScrollViewPerfTracingEnabled()
00026 {
00027     return g_IsPerfProviderEnabled &&
00028         g_PerfProviderLevel >= WINEVENT_LEVEL_INFO &&
00029         (g_PerfProviderMatchAnyKeyword & KEYWORD_SCROLLVIEW || g_PerfProviderMatchAnyKeyword == 0);
00030 }
00031
00032 #define SCROLLVIEW_TRACE_INFO_ENABLED(includeTraceLogging, sender, message, ...) \
00033 ScrollViewTrace::TraceInfo(includeTraceLogging, sender, message, __VA_ARGS__); \
00034
00035 #define SCROLLVIEW_TRACE_INFO(sender, message, ...) \
00036 if (IsScrollViewTracingEnabled()) \
00037 { \
00038     SCROLLVIEW_TRACE_INFO_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00039 } \
00040 else if (ScrollViewTrace::s_IsDebugOutputEnabled || ScrollViewTrace::s_IsVerboseDebugOutputEnabled) \
00041 { \
00042     SCROLLVIEW_TRACE_INFO_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00043 } \
00044
00045 #define SCROLLVIEW_TRACE_VERBOSE_ENABLED(includeTraceLogging, sender, message, ...) \
00046 ScrollViewTrace::TraceVerbose(includeTraceLogging, sender, message, __VA_ARGS__); \
00047
00048 #define SCROLLVIEW_TRACE_VERBOSE(sender, message, ...) \
00049 if (IsScrollViewVerboseTracingEnabled()) \
00050 { \
00051     SCROLLVIEW_TRACE_VERBOSE_ENABLED(true /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00052 } \
00053 else if (ScrollViewTrace::s_IsVerboseDebugOutputEnabled) \
00054 { \
00055     SCROLLVIEW_TRACE_VERBOSE_ENABLED(false /*includeTraceLogging*/, sender, message, __VA_ARGS__); \
00056 } \
00057
00058 #define SCROLLVIEW_TRACE_PERF(info) \
00059 if (IsScrollViewPerfTracingEnabled()) \
00060 { \
00061     ScrollViewTrace::TracePerfInfo(info); \
00062 } \
00063
00064 #ifdef DBG
00065 #define SCROLLVIEW_TRACE_INFO_DBG(sender, message, ...)    SCROLLVIEW_TRACE_INFO(sender, message, __VA_ARGS__)
00066 #define SCROLLVIEW_TRACE_VERBOSE_DBG(sender, message, ...) SCROLLVIEW_TRACE_VERBOSE(sender, message, __VA_ARGS__)
00067 #define SCROLLVIEW_TRACE_PERF_DBG(info)                    SCROLLVIEW_TRACE_PERF(info)
00068 #else
00069 #define SCROLLVIEW_TRACE_INFO_DBG(sender, message, ...)
00070 #define SCROLLVIEW_TRACE_VERBOSE_DBG(sender, message, ...)
00071 #define SCROLLVIEW_TRACE_PERF_DBG(info)
00072 #endif // DBG
00073
00074 class ScrollViewTrace
00075 {
00076 public:
00077     static bool s_IsDebugOutputEnabled;
00078     static bool s_IsVerboseDebugOutputEnabled;
00079
00080     static void TraceInfo(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00081     {
00082         va_list args;
00083         va_start(args, message);
00084         WCHAR buffer[256]{};
00085         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00086         {
00087             if (includeTraceLogging)
00088             {
00089                 // TraceViewers
00090                 // http://toolbox/pef
00091                 // http://fastetw/index.aspx
00092                 TraceLoggingWrite(
00093                     g_hLoggingProvider,
00094                     "ScrollViewInfo" /* eventName */,
00095                     TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00096                     TraceLoggingKeyword(KEYWORD_SCROLLVIEW),
00097                     TraceLoggingWideString(buffer, "Message"));
00098             }
00099
00100             if (s_IsDebugOutputEnabled)
00101             {
00102                 OutputDebugStringW(buffer);
00103             }
00104
00105             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00106
00107             if (globalTestHooks &&
00108                 (globalTestHooks->GetLoggingLevelForType(L"ScrollView") >= WINEVENT_LEVEL_INFO || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_INFO))
00109             {
00110                 globalTestHooks->LogMessage(sender, buffer, false /*isVerboseLevel*/);
00111             }
00112         }
00113         va_end(args);
00114     }
00115
00116     static void TraceVerbose(bool includeTraceLogging, const winrt::IInspectable& sender, PCWSTR message, ...) noexcept
00117     {
00118         va_list args;
00119         va_start(args, message);
00120         WCHAR buffer[256]{};
00121         if (SUCCEEDED(StringCchVPrintfW(buffer, ARRAYSIZE(buffer), message, args)))
00122         {
00123             if (includeTraceLogging)
00124             {
00125                 // TraceViewers
00126                 // http://toolbox/pef
00127                 // http://fastetw/index.aspx
00128                 TraceLoggingWrite(
00129                     g_hLoggingProvider,
00130                     "ScrollViewVerbose" /* eventName */,
00131                     TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE),
00132                     TraceLoggingKeyword(KEYWORD_SCROLLVIEW),
00133                     TraceLoggingWideString(buffer, "Message"));
00134             }
00135
00136             if (s_IsDebugOutputEnabled || s_IsVerboseDebugOutputEnabled)
00137             {
00138                 OutputDebugStringW(buffer);
00139             }
00140
00141             com_ptr<MUXControlsTestHooks> globalTestHooks = MUXControlsTestHooks::GetGlobalTestHooks();
00142
00143             if (globalTestHooks &&
00144                 (globalTestHooks->GetLoggingLevelForType(L"ScrollView") >= WINEVENT_LEVEL_VERBOSE || globalTestHooks->GetLoggingLevelForInstance(sender) >= WINEVENT_LEVEL_VERBOSE))
00145             {
00146                 globalTestHooks->LogMessage(sender, buffer, true /*isVerboseLevel*/);
00147             }
00148         }
00149         va_end(args);
00150     }
00151
00152     static void TracePerfInfo(PCWSTR info) noexcept
00153     {
00154         // TraceViewers
00155         // http://toolbox/pef
00156         // http://fastetw/index.aspx
00157         TraceLoggingWrite(
00158             g_hPerfProvider,
00159             "ScrollViewPerf" /* eventName */,
00160             TraceLoggingLevel(WINEVENT_LEVEL_INFO),
00161             TraceLoggingKeyword(KEYWORD_SCROLLVIEW),
00162             TraceLoggingWideString(info, "Info"));
00163     }
00164 };
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VirtualizationInfo Member List

This is the complete list of members for VirtualizationInfo, including all inherited members.
AddPin() | VirtualizationInfo |
ArrangeBounds() const | VirtualizationInfo | [inline]
ArrangeBounds(winrt::Rect value) | VirtualizationInfo | [inline]
AutoRecycleCandidate() | VirtualizationInfo | [inline]
AutoRecycleCandidate(bool value) | VirtualizationInfo | [inline]
Data() const | VirtualizationInfo | [inline]
DataTemplateComponent() const | VirtualizationInfo | [inline]
Index() const | VirtualizationInfo | [inline]
IsHeldByLayout() const | VirtualizationInfo |
IsInPinnedPool() const | VirtualizationInfo |
IsInUniqueIdResetPool() const | VirtualizationInfo |
IsPinned() const | VirtualizationInfo |
IsRealized() const | VirtualizationInfo |
KeepAlive() | VirtualizationInfo | [inline]
KeepAlive(bool value) | VirtualizationInfo | [inline]
m_arrangeBounds | VirtualizationInfo | [private]
m_data | VirtualizationInfo | [private]
m_dataTemplateComponent | VirtualizationInfo | [private]
m_uniqueId | VirtualizationInfo | [private]
MoveOwnershipToAnimator() | VirtualizationInfo |
MoveOwnershipToElementFactory() | VirtualizationInfo |
MoveOwnershipToLayoutFromElementFactory(int index, wstring_view uniqueId) | VirtualizationInfo |
MoveOwnershipToLayoutFromPinnedPool() | VirtualizationInfo |
MoveOwnershipToLayoutFromUniqueIdResetPool() | VirtualizationInfo |
MoveOwnershipToPinnedPool() | VirtualizationInfo |
MoveOwnershipToUniqueIdResetPoolFromLayout() | VirtualizationInfo |
MustClearDataContext() const | VirtualizationInfo | [inline]
MustClearDataContext(bool mustClearDataContext) | VirtualizationInfo | [inline]
Owner() const | VirtualizationInfo | [inline]
Phase() const | VirtualizationInfo | [inline]
Phase(int phase) | VirtualizationInfo | [inline]
PhaseNotSpecified | VirtualizationInfo | [static]
PhaseReachedEnd | VirtualizationInfo | [static]
RemovePin() | VirtualizationInfo |
UniqueId() const | VirtualizationInfo | [inline]
UpdateIndex(int newIndex) | VirtualizationInfo |
UpdatePhasingInfo(int phase, const winrt::IInspectable &data, const winrt::IDataTemplateComponent &component) | VirtualizationInfo |
VirtualizationInfo() | VirtualizationInfo |
Generated on Sun Dec 1 2024 20:53:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AnimatedIcon/TestUI/AnimatedIconPage.xaml.cs Source File

  • File List
  • File Members
  • AnimatedIcon
  • TestUI

AnimatedIconPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Controls.Primitives;
00008 using Microsoft.UI.Xaml.Media;
00009 using Microsoft.UI.Xaml.Markup;
00010 using Windows.UI;
00011 using System.Windows.Input;
00012
00013 using AnimatedIcon = Microsoft.UI.Xaml.Controls.AnimatedIcon;
00014 using Microsoft.UI.Private.Controls;
00015
00016 namespace MUXControlsTestApp
00017 {
00018     [TopLevelTestPage(Name = "AnimatedIcon")]
00019     public sealed partial class AnimatedIconPage : TestPage
00020     {
00021         public AnimatedIconPage()
00022         {
00023             this.InitializeComponent();
00024             this.Loaded += AnimatedIconPage_Loaded;
00025             AnimatedIconTestHooks.LastAnimationSegmentChanged += AnimatedIconTestHooks_LastAnimationSegmentChanged;
00026         }
00027
00028         private void AnimatedIconTestHooks_LastAnimationSegmentChanged(AnimatedIcon sender, object args)
00029         {
00030             var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
00031             var grid = VisualTreeHelper.GetChild(rootGrid, 0);
00032             var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;
00033
00034             if(sender == CheckIcon)
00035             {
00036                 LastTransitionTextBlock.Text = AnimatedIconTestHooks.GetLastAnimationSegment(CheckIcon);
00037             }
00038         }
00039
00040         private void AnimatedIconPage_Loaded(object sender, RoutedEventArgs e)
00041         {
00042             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
00043             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
00044             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
00045             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIconNavView_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
00046             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIconNavView_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
00047             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
00048             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SideChevron_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
00049             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SideChevron_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
00050             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
00051             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.HamburgerIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
00052             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.HamburgerIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
00053             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
00054             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SettingsIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
00055             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SettingsIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
00056             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
00057             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.BackIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
00058             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.BackIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
00059             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
00060             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SearchIcon_Cut.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.Cut);
00061             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SearchIcon_Queue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.QueueOne);
00062             AnimatedIconTestHooks.SetAnimationQueueBehavior(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne);
00063         }
00064
00065         private void Slider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00066         {
00067             if (this.DropDownIcon_Cut != null)
00068             {
00069                 AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00070             }
00071             if (this.DropDownIcon_Queue != null)
00072             {
00073                 AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00074             }
00075             if (this.DropDownIcon_SpeedUpQueue != null)
00076             {
00077                 AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00078             }
00079             if (this.DropDownIconNavView_Cut != null)
00080             {
00081                 AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIconNavView_Cut.GetAnimatedIcon(), (float)e.NewValue);
00082             }
00083             if (this.DropDownIconNavView_Queue != null)
00084             {
00085                 AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIconNavView_Queue.GetAnimatedIcon(), (float)e.NewValue);
00086             }
00087             if (this.DropDownIconNavView_SpeedUpQueue != null)
00088             {
00089                 AnimatedIconTestHooks.SetDurationMultiplier(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00090             }
00091             if (this.SideChevron_Cut != null)
00092             {
00093                 AnimatedIconTestHooks.SetDurationMultiplier(this.SideChevron_Cut.GetAnimatedIcon(), (float)e.NewValue);
00094             }
00095             if (this.SideChevron_Queue != null)
00096             {
00097                 AnimatedIconTestHooks.SetDurationMultiplier(this.SideChevron_Queue.GetAnimatedIcon(), (float)e.NewValue);
00098             }
00099             if (this.SideChevron_SpeedUpQueue != null)
00100             {
00101                 AnimatedIconTestHooks.SetDurationMultiplier(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00102             }
00103             if (this.HamburgerIcon_Cut != null)
00104             {
00105                 AnimatedIconTestHooks.SetDurationMultiplier(this.HamburgerIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00106             }
00107             if (this.HamburgerIcon_Queue != null)
00108             {
00109                 AnimatedIconTestHooks.SetDurationMultiplier(this.HamburgerIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00110             }
00111             if (this.HamburgerIcon_SpeedUpQueue != null)
00112             {
00113                 AnimatedIconTestHooks.SetDurationMultiplier(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00114             }
00115             if (this.SettingsIcon_Cut != null)
00116             {
00117                 AnimatedIconTestHooks.SetDurationMultiplier(this.SettingsIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00118             }
00119             if (this.SettingsIcon_Queue != null)
00120             {
00121                 AnimatedIconTestHooks.SetDurationMultiplier(this.SettingsIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00122             }
00123             if (this.SettingsIcon_SpeedUpQueue != null)
00124             {
00125                 AnimatedIconTestHooks.SetDurationMultiplier(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00126             }
00127             if (this.BackIcon_Cut != null)
00128             {
00129                 AnimatedIconTestHooks.SetDurationMultiplier(this.BackIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00130             }
00131             if (this.BackIcon_Queue != null)
00132             {
00133                 AnimatedIconTestHooks.SetDurationMultiplier(this.BackIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00134             }
00135             if (this.BackIcon_SpeedUpQueue != null)
00136             {
00137                 AnimatedIconTestHooks.SetDurationMultiplier(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00138             }
00139             if (this.SearchIcon_Cut != null)
00140             {
00141                 AnimatedIconTestHooks.SetDurationMultiplier(this.SearchIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00142             }
00143             if (this.SearchIcon_Queue != null)
00144             {
00145                 AnimatedIconTestHooks.SetDurationMultiplier(this.SearchIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00146             }
00147             if (this.SearchIcon_SpeedUpQueue != null)
00148             {
00149                 AnimatedIconTestHooks.SetDurationMultiplier(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00150             }
00151             if (this.AnimatedCheckbox != null)
00152             {
00153                 var rootGrid = VisualTreeHelper.GetChild(AnimatedCheckbox, 0);
00154                 var grid = VisualTreeHelper.GetChild(rootGrid, 0);
00155                 var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;
00156
00157                 AnimatedIconTestHooks.SetDurationMultiplier(CheckIcon, (float)e.NewValue);
00158             }
00159             if (this.LargeAnimatedCheckbox != null)
00160             {
00161                 var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
00162                 var grid = VisualTreeHelper.GetChild(rootGrid, 0);
00163                 var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;
00164
00165                 AnimatedIconTestHooks.SetDurationMultiplier(CheckIcon, (float)e.NewValue);
00166             }
00167         }
00168
00169         private void SpeedUpSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00170         {
00171             if (this.DropDownIcon_Cut != null)
00172             {
00173                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00174             }
00175             if (this.DropDownIcon_Queue != null)
00176             {
00177                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00178             }
00179             if (this.DropDownIcon_SpeedUpQueue != null)
00180             {
00181                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00182             }
00183             if (this.DropDownIconNavView_Cut != null)
00184             {
00185                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIconNavView_Cut.GetAnimatedIcon(), (float)e.NewValue);
00186             }
00187             if (this.DropDownIconNavView_Queue != null)
00188             {
00189                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIconNavView_Queue.GetAnimatedIcon(), (float)e.NewValue);
00190             }
00191             if (this.DropDownIconNavView_SpeedUpQueue != null)
00192             {
00193                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00194             }
00195             if (this.SideChevron_Cut != null)
00196             {
00197                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SideChevron_Cut.GetAnimatedIcon(), (float)e.NewValue);
00198             }
00199             if (this.SideChevron_Queue != null)
00200             {
00201                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SideChevron_Queue.GetAnimatedIcon(), (float)e.NewValue);
00202             }
00203             if (this.SideChevron_SpeedUpQueue != null)
00204             {
00205                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00206             }
00207             if (this.HamburgerIcon_Cut != null)
00208             {
00209                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.HamburgerIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00210             }
00211             if (this.HamburgerIcon_Queue != null)
00212             {
00213                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.HamburgerIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00214             }
00215             if (this.HamburgerIcon_SpeedUpQueue != null)
00216             {
00217                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00218             }
00219             if (this.SettingsIcon_Cut != null)
00220             {
00221                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SettingsIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00222             }
00223             if (this.SettingsIcon_Queue != null)
00224             {
00225                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SettingsIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00226             }
00227             if (this.SettingsIcon_SpeedUpQueue != null)
00228             {
00229                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00230             }
00231             if (this.BackIcon_Cut != null)
00232             {
00233                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.BackIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00234             }
00235             if (this.BackIcon_Queue != null)
00236             {
00237                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.BackIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00238             }
00239             if (this.BackIcon_SpeedUpQueue != null)
00240             {
00241                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00242             }
00243             if (this.SearchIcon_Cut != null)
00244             {
00245                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SearchIcon_Cut.GetAnimatedIcon(), (float)e.NewValue);
00246             }
00247             if (this.SearchIcon_Queue != null)
00248             {
00249                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SearchIcon_Queue.GetAnimatedIcon(), (float)e.NewValue);
00250             }
00251             if (this.SearchIcon_SpeedUpQueue != null)
00252             {
00253                 AnimatedIconTestHooks.SetSpeedUpMultiplier(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), (float)e.NewValue);
00254             }
00255             if (this.AnimatedCheckbox != null)
00256             {
00257                 var rootGrid = VisualTreeHelper.GetChild(AnimatedCheckbox, 0);
00258                 var grid = VisualTreeHelper.GetChild(rootGrid, 0);
00259                 var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;
00260
00261                 AnimatedIconTestHooks.SetSpeedUpMultiplier(CheckIcon, (float)e.NewValue);
00262             }
00263             if (this.LargeAnimatedCheckbox != null)
00264             {
00265                 var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
00266                 var grid = VisualTreeHelper.GetChild(rootGrid, 0);
00267                 var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;
00268
00269                 AnimatedIconTestHooks.SetSpeedUpMultiplier(CheckIcon, (float)e.NewValue);
00270             }
00271         }
00272
00273         private void QueueLengthSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
00274         {
00275             if (this.DropDownIcon_Cut != null)
00276             {
00277                 AnimatedIconTestHooks.SetQueueLength(this.DropDownIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
00278             }
00279             if (this.DropDownIcon_Queue != null)
00280             {
00281                 AnimatedIconTestHooks.SetQueueLength(this.DropDownIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
00282             }
00283             if (this.DropDownIcon_SpeedUpQueue != null)
00284             {
00285                 AnimatedIconTestHooks.SetQueueLength(this.DropDownIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
00286             }
00287             if (this.DropDownIconNavView_Cut != null)
00288             {
00289                 AnimatedIconTestHooks.SetQueueLength(this.DropDownIconNavView_Cut.GetAnimatedIcon(), (int)e.NewValue);
00290             }
00291             if (this.DropDownIconNavView_Queue != null)
00292             {
00293                 AnimatedIconTestHooks.SetQueueLength(this.DropDownIconNavView_Queue.GetAnimatedIcon(), (int)e.NewValue);
00294             }
00295             if (this.DropDownIconNavView_SpeedUpQueue != null)
00296             {
00297                 AnimatedIconTestHooks.SetQueueLength(this.DropDownIconNavView_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
00298             }
00299             if (this.SideChevron_Cut != null)
00300             {
00301                 AnimatedIconTestHooks.SetQueueLength(this.SideChevron_Cut.GetAnimatedIcon(), (int)e.NewValue);
00302             }
00303             if (this.SideChevron_Queue != null)
00304             {
00305                 AnimatedIconTestHooks.SetQueueLength(this.SideChevron_Queue.GetAnimatedIcon(), (int)e.NewValue);
00306             }
00307             if (this.SideChevron_SpeedUpQueue != null)
00308             {
00309                 AnimatedIconTestHooks.SetQueueLength(this.SideChevron_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
00310             }
00311             if (this.HamburgerIcon_Cut != null)
00312             {
00313                 AnimatedIconTestHooks.SetQueueLength(this.HamburgerIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
00314             }
00315             if (this.HamburgerIcon_Queue != null)
00316             {
00317                 AnimatedIconTestHooks.SetQueueLength(this.HamburgerIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
00318             }
00319             if (this.HamburgerIcon_SpeedUpQueue != null)
00320             {
00321                 AnimatedIconTestHooks.SetQueueLength(this.HamburgerIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
00322             }
00323             if (this.SettingsIcon_Cut != null)
00324             {
00325                 AnimatedIconTestHooks.SetQueueLength(this.SettingsIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
00326             }
00327             if (this.SettingsIcon_Queue != null)
00328             {
00329                 AnimatedIconTestHooks.SetQueueLength(this.SettingsIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
00330             }
00331             if (this.SettingsIcon_SpeedUpQueue != null)
00332             {
00333                 AnimatedIconTestHooks.SetQueueLength(this.SettingsIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
00334             }
00335             if (this.BackIcon_Cut != null)
00336             {
00337                 AnimatedIconTestHooks.SetQueueLength(this.BackIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
00338             }
00339             if (this.BackIcon_Queue != null)
00340             {
00341                 AnimatedIconTestHooks.SetQueueLength(this.BackIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
00342             }
00343             if (this.BackIcon_SpeedUpQueue != null)
00344             {
00345                 AnimatedIconTestHooks.SetQueueLength(this.BackIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
00346             }
00347             if (this.SearchIcon_Cut != null)
00348             {
00349                 AnimatedIconTestHooks.SetQueueLength(this.SearchIcon_Cut.GetAnimatedIcon(), (int)e.NewValue);
00350             }
00351             if (this.SearchIcon_Queue != null)
00352             {
00353                 AnimatedIconTestHooks.SetQueueLength(this.SearchIcon_Queue.GetAnimatedIcon(), (int)e.NewValue);
00354             }
00355             if (this.SearchIcon_SpeedUpQueue != null)
00356             {
00357                 AnimatedIconTestHooks.SetQueueLength(this.SearchIcon_SpeedUpQueue.GetAnimatedIcon(), (int)e.NewValue);
00358             }
00359             if (this.AnimatedCheckbox != null)
00360             {
00361                 var rootGrid = VisualTreeHelper.GetChild(AnimatedCheckbox, 0);
00362                 var grid = VisualTreeHelper.GetChild(rootGrid, 0);
00363                 var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;
00364
00365                 AnimatedIconTestHooks.SetQueueLength(CheckIcon, (int)e.NewValue);
00366             }
00367             if (this.LargeAnimatedCheckbox != null)
00368             {
00369                 var rootGrid = VisualTreeHelper.GetChild(LargeAnimatedCheckbox, 0);
00370                 var grid = VisualTreeHelper.GetChild(rootGrid, 0);
00371                 var CheckIcon = VisualTreeHelper.GetChild(grid, 1) as AnimatedIcon;
00372
00373                 AnimatedIconTestHooks.SetQueueLength(CheckIcon, (int)e.NewValue);
00374             }
00375         }
00376         public void IsLeftToRightChecked(object sender, RoutedEventArgs args)
00377         {
00378             this.FlowDirection = FlowDirection.LeftToRight;
00379         }
00380
00381         public void IsLeftToRightUnchecked(object sender, RoutedEventArgs args)
00382         {
00383             this.FlowDirection = FlowDirection.RightToLeft;
00384         }
00385
00386         private void ChangeFallbackGlyphButton_Click(object sender, RoutedEventArgs e)
00387         {
00388             boundFallback.FallbackGlyph = "\uE9AE";
00389         }
00390     }
00391 }
Generated on Sun Dec 1 2024 20:51:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ComboBox/ComboBoxHelper.h Source File

  • File List
  • File Members
  • ComboBox

ComboBoxHelper.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "ComboBoxHelper.g.h"
00006 #include "ComboBoxHelper.properties.h"
00007
00008 class ComboBoxHelper
00009     : public winrt::implementation::ComboBoxHelperT<ComboBoxHelper>
00010     , public ComboBoxHelperProperties
00011 {
00012 public:
00013     ComboBoxHelper();
00014
00015     static void EnsureProperties();
00016     static void ClearProperties();
00017
00018     static winrt::DependencyProperty DropDownEventRevokersProperty() { return s_DropDownEventRevokersProperty; }
00019     static void OnKeepInteriorCornersSquarePropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyPropertyChangedEventArgs& args);
00020
00021     static GlobalDependencyProperty s_DropDownEventRevokersProperty;
00022 private:
00023     static void OnDropDownOpened(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00024     static void OnDropDownClosed(const winrt::IInspectable& sender, const winrt::IInspectable& args);
00025
00026     static void UpdateCornerRadius(const winrt::ComboBox& comboBox, bool isDropDownOpen);
00027     static bool IsPopupOpenDown(const winrt::ComboBox& comboBox);
00028 };
00029
00030 class ComboBoxDropDownEventRevokers
00031     : public winrt::implements<ComboBoxDropDownEventRevokers, winrt::Windows::Foundation::IInspectable>
00032 {
00033 public:
00034     void RevokeAll()
00035     {
00036         m_dropDownOpenedRevoker.revoke();
00037         m_dropDownClosedRevoker.revoke();
00038     }
00039
00040     winrt::ComboBox::DropDownOpened_revoker m_dropDownOpenedRevoker;
00041     winrt::ComboBox::DropDownClosed_revoker m_dropDownClosedRevoker;
00042 };
Generated on Sun Dec 1 2024 20:51:45 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TeachingTipTemplateSettingsProperties Member List

This is the complete list of members for TeachingTipTemplateSettingsProperties, including all inherited members.
ClearProperties() | TeachingTipTemplateSettingsProperties | [static]
EnsureProperties() | TeachingTipTemplateSettingsProperties | [static]
IconElement(winrt::IconElement const &value) | TeachingTipTemplateSettingsProperties |
IconElement() | TeachingTipTemplateSettingsProperties |
IconElementProperty() | TeachingTipTemplateSettingsProperties | [inline, static]
s_IconElementProperty | TeachingTipTemplateSettingsProperties | [static]
s_TopLeftHighlightMarginProperty | TeachingTipTemplateSettingsProperties | [static]
s_TopRightHighlightMarginProperty | TeachingTipTemplateSettingsProperties | [static]
TeachingTipTemplateSettingsProperties() | TeachingTipTemplateSettingsProperties |
TopLeftHighlightMargin(winrt::Thickness const &value) | TeachingTipTemplateSettingsProperties |
TopLeftHighlightMargin() | TeachingTipTemplateSettingsProperties |
TopLeftHighlightMarginProperty() | TeachingTipTemplateSettingsProperties | [inline, static]
TopRightHighlightMargin(winrt::Thickness const &value) | TeachingTipTemplateSettingsProperties |
TopRightHighlightMargin() | TeachingTipTemplateSettingsProperties |
TopRightHighlightMarginProperty() | TeachingTipTemplateSettingsProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Common/ColorConversion.h Source File

  • File List
  • File Members
  • Common

ColorConversion.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "CppWinRTHelpers.h"
00007
00008 // Helper classes used for converting between RGB, HSV, and hex.
00009 class Rgb
00010 {
00011 public:
00012     double r{};
00013     double g{};
00014     double b{};
00015     Rgb() = default;
00016     Rgb(double r, double g, double b);
00017 };
00018
00019 class Hsv
00020 {
00021 public:
00022     double h{};
00023     double s{};
00024     double v{};
00025     Hsv() = default;
00026     Hsv(double h, double s, double v);
00027 };
00028
00029 std::optional<unsigned long> TryParseInt(const wstring_view& s);
00030 std::optional<unsigned long> TryParseInt(const wstring_view& str, int base);
00031
00032 Hsv RgbToHsv(const Rgb &rgb);
00033 Rgb HsvToRgb(const Hsv &hsv);
00034
00035 Rgb HexToRgb(const wstring_view& input);
00036 winrt::hstring RgbToHex(const Rgb &rgb);
00037
00038 std::tuple<Rgb, double> HexToRgba(const wstring_view& input);
00039 winrt::hstring RgbaToHex(const Rgb &rgb, double alpha);
00040
00041 winrt::Color ColorFromRgba(const Rgb &rgb, double alpha = 1.0);
00042 Rgb RgbFromColor(const winrt::Color &color);
00043
00044 // We represent HSV and alpha using a Vector4 (float4 in C++/WinRT).
00045 // We'll use the following helper methods to convert between the four dimensions and HSVA.
00046 namespace hsv
00047 {
00048     inline float GetHue(const winrt::float4 &hsva) { return hsva.x; }
00049     inline void SetHue(winrt::float4 &hsva, float hue) { hsva.x = hue; }
00050     inline float GetSaturation(const winrt::float4 &hsva) { return hsva.y; }
00051     inline void SetSaturation(winrt::float4 &hsva, float saturation) { hsva.y = saturation; }
00052     inline float GetValue(const winrt::float4 &hsva) { return hsva.z; }
00053     inline void SetValue(winrt::float4 &hsva, float value) { hsva.z = value; }
00054     inline float GetAlpha(const winrt::float4 &hsva) { return hsva.w; }
00055     inline void SetAlpha(winrt::float4 &hsva, float alpha) { hsva.w = alpha; }
00056 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/SnapPoint.cpp Source File

  • File List
  • File Members
  • ScrollPresenter

SnapPoint.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "TypeLogging.h"
00007 #include "ScrollPresenterTypeLogging.h"
00008 #include "SnapPoint.h"
00009
00010 winrt::hstring SnapPointBase::GetTargetExpression(winrt::hstring const& target) const
00011 {
00012     return StringUtil::FormatString(L"this.Target.%1!s!", target.data());
00013 }
00014
00015 winrt::hstring SnapPointBase::GetIsInertiaFromImpulseExpression(winrt::hstring const& target) const
00016 {
00017     // Returns 't.IsInertiaFromImpulse' or 'this.Target.IsInertiaFromImpulse'.
00018     return StringUtil::FormatString(L"%1!s!.IsInertiaFromImpulse", target.data());
00019 }
00020
00021 bool SnapPointBase::operator<(const SnapPointBase* snapPoint)
00022 {
00023     const SnapPointSortPredicate mySortPredicate = SortPredicate();
00024     const SnapPointSortPredicate theirSortPredicate = snapPoint->SortPredicate();
00025     if (mySortPredicate.primary < theirSortPredicate.primary)
00026     {
00027         return true;
00028     }
00029     if (theirSortPredicate.primary < mySortPredicate.primary)
00030     {
00031         return false;
00032     }
00033
00034     if (mySortPredicate.secondary < theirSortPredicate.secondary)
00035     {
00036         return true;
00037     }
00038     if (theirSortPredicate.secondary < mySortPredicate.secondary)
00039     {
00040         return false;
00041     }
00042
00043     if (mySortPredicate.tertiary < theirSortPredicate.tertiary)
00044     {
00045         return true;
00046     }
00047     return false;
00048 }
00049
00050 bool SnapPointBase::operator==(const SnapPointBase* snapPoint)
00051 {
00052     const SnapPointSortPredicate mySortPredicate = SortPredicate();
00053     const SnapPointSortPredicate theirSortPredicate = snapPoint->SortPredicate();
00054     if (std::abs(mySortPredicate.primary - theirSortPredicate.primary) < s_equalityEpsilon
00055         && std::abs(mySortPredicate.secondary - theirSortPredicate.secondary) < s_equalityEpsilon
00056         && mySortPredicate.tertiary == theirSortPredicate.tertiary)
00057     {
00058         return true;
00059     }
00060     return false;
00061 }
00062
00063 #ifdef ApplicableRangeType
00064 double SnapPointBase::ApplicableRange()
00065 {
00066     return m_specifiedApplicableRange;
00067 }
00068
00069 winrt::SnapPointApplicableRangeType SnapPointBase::ApplicableRangeType()
00070 {
00071     return m_applicableRangeType;
00072 }
00073 #endif
00074
00075 #ifdef DBG
00076 winrt::Color SnapPointBase::VisualizationColor()
00077 {
00078     return m_visualizationColor;
00079 }
00080
00081 void SnapPointBase::VisualizationColor(winrt::Color color)
00082 {
00083     m_visualizationColor = color;
00084 }
00085 #endif // DBG
00086
00087 // Returns True if this snap point snaps around the provided value.
00088 bool SnapPointBase::SnapsAt(
00089     std::tuple<double, double> actualApplicableZone,
00090     double value) const
00091 {
00092     if (std::get<0>(actualApplicableZone) <= value &&
00093         std::get<1>(actualApplicableZone) >= value)
00094     {
00095         const double snappedValue = Evaluate(actualApplicableZone, static_cast<float>(value));
00096
00097         return std::abs(value - snappedValue) < s_equalityEpsilon;
00098     }
00099
00100     return false;
00101 }
00102
00103 void SnapPointBase::SetBooleanParameter(
00104     winrt::ExpressionAnimation const& expressionAnimation,
00105     wstring_view const& booleanName,
00106     bool booleanValue) const
00107 {
00108     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_INT, METH_NAME, this, booleanName, booleanValue);
00109
00110     expressionAnimation.SetBooleanParameter(booleanName, booleanValue);
00111 }
00112
00113 void SnapPointBase::SetScalarParameter(
00114     winrt::ExpressionAnimation const& expressionAnimation,
00115     wstring_view const& scalarName,
00116     float scalarValue) const
00117 {
00118     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR_FLT, METH_NAME, this, scalarName, scalarValue);
00119
00120     expressionAnimation.SetScalarParameter(scalarName, scalarValue);
00121 }
00122
00123 /////////////////////////////////////////////////////////////////////
00124 /////////////////      Scroll Snap Points     ///////////////////////
00125 /////////////////////////////////////////////////////////////////////
00126
00127 // Required for Modern Idl bug, should never be called.
00128 ScrollSnapPointBase::ScrollSnapPointBase()
00129 {
00130     // throw (ERROR_CALL_NOT_IMPLEMENTED);
00131 }
00132
00133 winrt::ScrollSnapPointsAlignment ScrollSnapPointBase::Alignment()
00134 {
00135     return m_alignment;
00136 }
00137
00138 // Returns True when this snap point is sensitive to the viewport size and is interested in future updates.
00139 bool ScrollSnapPointBase::OnUpdateViewport(double newViewport)
00140 {
00141     switch (m_alignment)
00142     {
00143     case winrt::ScrollSnapPointsAlignment::Near:
00144         MUX_ASSERT(m_alignmentAdjustment == 0.0);
00145         return false;
00146     case winrt::ScrollSnapPointsAlignment::Center:
00147         m_alignmentAdjustment = -newViewport / 2.0;
00148         break;
00149     case winrt::ScrollSnapPointsAlignment::Far:
00150         m_alignmentAdjustment = -newViewport;
00151         break;
00152     }
00153     return true;
00154 }
00155
00156 /////////////////////////////////////////////////////////////////////
00157 //////////////    Irregular Scroll Snap Points   ////////////////////
00158 /////////////////////////////////////////////////////////////////////
00159 #include "ScrollSnapPoint.properties.cpp"
00160
00161 ScrollSnapPoint::ScrollSnapPoint(
00162     double snapPointValue,
00163     winrt::ScrollSnapPointsAlignment alignment)
00164 {
00165     m_value = snapPointValue;
00166     m_alignment = alignment;
00167 }
00168
00169 #ifdef ApplicableRangeType
00170 ScrollSnapPoint::ScrollSnapPoint(
00171     double snapPointValue,
00172     double applicableRange,
00173     winrt::ScrollSnapPointsAlignment alignment)
00174 {
00175     if (applicableRange <= 0)
00176     {
00177         throw winrt::hresult_invalid_argument(L"'applicableRange' must be strictly positive.");
00178     }
00179
00180     m_value = snapPointValue;
00181     m_alignment = alignment;
00182     m_specifiedApplicableRange = applicableRange;
00183     m_actualApplicableZone = std::tuple<double, double>{ snapPointValue - applicableRange, snapPointValue + applicableRange};
00184     m_applicableRangeType = winrt::SnapPointApplicableRangeType::Optional;
00185 }
00186 #endif
00187
00188 double ScrollSnapPoint::Value()
00189 {
00190     return m_value;
00191 }
00192
00193 winrt::ExpressionAnimation ScrollSnapPoint::CreateRestingPointExpression(
00194     double ignoredValue,
00195     std::tuple<double, double> actualImpulseApplicableZone,
00196     winrt::InteractionTracker const& interactionTracker,
00197     winrt::hstring const& target,
00198     winrt::hstring const& scale,
00199     bool isInertiaFromImpulse)
00200 {
00201     winrt::hstring expression = StringUtil::FormatString(L"%1!s!*%2!s!", s_snapPointValue.data(), scale.data());
00202
00203     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());
00204
00205     auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);
00206
00207     SetScalarParameter(restingPointExpressionAnimation, s_snapPointValue, static_cast<float>(ActualValue()));
00208
00209     return restingPointExpressionAnimation;
00210 }
00211
00212 winrt::ExpressionAnimation ScrollSnapPoint::CreateConditionalExpression(
00213     std::tuple<double, double> actualApplicableZone,
00214     std::tuple<double, double> actualImpulseApplicableZone,
00215     winrt::InteractionTracker const& interactionTracker,
00216     winrt::hstring const& target,
00217     winrt::hstring const& scale,
00218     bool isInertiaFromImpulse)
00219 {
00220     const wstring_view scaledValue = L"(%1!s!*%2!s!)";
00221     winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(L"this.Target");
00222     winrt::hstring targetExpression = GetTargetExpression(target);
00223     winrt::hstring scaledMinApplicableRange = StringUtil::FormatString(
00224         scaledValue.data(),
00225         s_minApplicableValue.data(),
00226         scale.data());
00227     winrt::hstring scaledMaxApplicableRange = StringUtil::FormatString(
00228         scaledValue.data(),
00229         s_maxApplicableValue.data(),
00230         scale.data());
00231     winrt::hstring scaledMinImpulseApplicableRange = StringUtil::FormatString(
00232         scaledValue.data(),
00233         s_minImpulseApplicableValue.data(),
00234         scale.data());
00235     winrt::hstring scaledMaxImpulseApplicableRange = StringUtil::FormatString(
00236         scaledValue.data(),
00237         s_maxImpulseApplicableValue.data(),
00238         scale.data());
00239     winrt::hstring expression = StringUtil::FormatString(
00240         L"%1!s!?(%2!s!>=%5!s!&&%2!s!<=%6!s!):(%2!s!>=%3!s!&&%2!s!<= %4!s!)",
00241         isInertiaFromImpulseExpression.data(),
00242         targetExpression.data(),
00243         scaledMinApplicableRange.data(),
00244         scaledMaxApplicableRange.data(),
00245         scaledMinImpulseApplicableRange.data(),
00246         scaledMaxImpulseApplicableRange.data());
00247
00248     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());
00249
00250     auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);
00251
00252     SetScalarParameter(conditionExpressionAnimation, s_minApplicableValue, static_cast<float>(std::get<0>(actualApplicableZone)));
00253     SetScalarParameter(conditionExpressionAnimation, s_maxApplicableValue, static_cast<float>(std::get<1>(actualApplicableZone)));
00254
00255     UpdateConditionalExpressionAnimationForImpulse(
00256         conditionExpressionAnimation,
00257         actualImpulseApplicableZone);
00258
00259     return conditionExpressionAnimation;
00260 }
00261
00262 void ScrollSnapPoint::UpdateConditionalExpressionAnimationForImpulse(
00263     winrt::ExpressionAnimation const& conditionExpressionAnimation,
00264     std::tuple<double, double> actualImpulseApplicableZone) const
00265 {
00266     SetScalarParameter(conditionExpressionAnimation, s_minImpulseApplicableValue, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
00267     SetScalarParameter(conditionExpressionAnimation, s_maxImpulseApplicableValue, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
00268 }
00269
00270 void ScrollSnapPoint::UpdateRestingPointExpressionAnimationForImpulse(
00271     winrt::ExpressionAnimation const& restingValueExpressionAnimation,
00272     double ignoredValue,
00273     std::tuple<double, double> actualImpulseApplicableZone) const
00274 {
00275     // An irregular snap point like ScrollSnapPoint is either completely ignored in impulse mode or not ignored at all, unlike repeated snap points
00276     // which can be partially ignored. Its conditional expression depends on the impulse mode, whereas its resting point expression does not,
00277     // thus this method has no job to do.
00278 }
00279
00280 SnapPointSortPredicate ScrollSnapPoint::SortPredicate() const
00281 {
00282     const double actualValue = ActualValue();
00283
00284     // Irregular snap point should be sorted before repeated snap points so it gives a tertiary sort value of 0 (repeated snap points get 1)
00285     return SnapPointSortPredicate{ actualValue, actualValue, 0 };
00286 }
00287
00288 std::tuple<double, double> ScrollSnapPoint::DetermineActualApplicableZone(
00289     const SnapPointBase* previousSnapPoint,
00290     const SnapPointBase* nextSnapPoint)
00291 {
00292     return std::make_tuple(
00293         DetermineMinActualApplicableZone(previousSnapPoint),
00294         DetermineMaxActualApplicableZone(nextSnapPoint));
00295 }
00296
00297 std::tuple<double, double> ScrollSnapPoint::DetermineActualImpulseApplicableZone(
00298     const SnapPointBase* previousSnapPoint,
00299     const SnapPointBase* nextSnapPoint,
00300     double currentIgnoredValue,
00301     double previousIgnoredValue,
00302     double nextIgnoredValue)
00303 {
00304     return std::make_tuple(
00305         DetermineMinActualImpulseApplicableZone(
00306             previousSnapPoint,
00307             currentIgnoredValue,
00308             previousIgnoredValue),
00309         DetermineMaxActualImpulseApplicableZone(
00310             nextSnapPoint,
00311             currentIgnoredValue,
00312             nextIgnoredValue));
00313 }
00314
00315 double ScrollSnapPoint::ActualValue() const
00316 {
00317     return m_value + m_alignmentAdjustment;
00318 }
00319
00320 double ScrollSnapPoint::DetermineMinActualApplicableZone(
00321     const SnapPointBase* previousSnapPoint) const
00322 {
00323     // If we are not passed a previousSnapPoint it means we are the first in the list, see if we expand to negative Infinity or stay put.
00324     if (!previousSnapPoint)
00325     {
00326 #ifdef ApplicableRangeType
00327         if (applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
00328         {
00329             return -INFINITY;
00330         }
00331         else
00332         {
00333             return ActualValue() - m_specifiedApplicableRange;
00334         }
00335 #else
00336         return -INFINITY;
00337 #endif
00338     }
00339     // If we are passed a previousSnapPoint then we need to account for its influence on us.
00340     else
00341     {
00342         const double previousMaxInfluence = previousSnapPoint->Influence(ActualValue());
00343
00344 #ifdef ApplicableRangeType
00345         switch (m_applicableRangeType)
00346         {
00347         case winrt::SnapPointApplicableRangeType::Optional:
00348             return std::max(previousMaxInfluence, ActualValue() - m_specifiedApplicableRange);
00349         case winrt::SnapPointApplicableRangeType::Mandatory:
00350             return previousMaxInfluence;
00351         default:
00352             MUX_ASSERT(false);
00353             return 0.0;
00354         }
00355 #else
00356         return previousMaxInfluence;
00357 #endif
00358     }
00359 }
00360
00361 double ScrollSnapPoint::DetermineMinActualImpulseApplicableZone(
00362     const SnapPointBase* previousSnapPoint,
00363     double currentIgnoredValue,
00364     double previousIgnoredValue) const
00365 {
00366     if (!previousSnapPoint)
00367     {
00368         return -INFINITY;
00369     }
00370     else
00371     {
00372         const double previousMaxInfluence = previousSnapPoint->ImpulseInfluence(ActualValue(), previousIgnoredValue);
00373
00374         if (isnan(currentIgnoredValue))
00375         {
00376             return previousMaxInfluence;
00377         }
00378         else
00379         {
00380             return std::max(previousMaxInfluence, ActualValue());
00381         }
00382     }
00383 }
00384
00385 double ScrollSnapPoint::DetermineMaxActualApplicableZone(
00386     const SnapPointBase* nextSnapPoint) const
00387 {
00388     // If we are not passed a nextSnapPoint it means we are the last in the list, see if we expand to Infinity or stay put.
00389     if (!nextSnapPoint)
00390     {
00391 #ifdef ApplicableRangeType
00392         if (m_applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
00393         {
00394             return INFINITY;
00395         }
00396         else
00397         {
00398             return ActualValue() + m_specifiedApplicableRange;
00399         }
00400 #else
00401         return INFINITY;
00402 #endif
00403     }
00404     // If we are passed a nextSnapPoint then we need to account for its influence on us.
00405     else
00406     {
00407         const double nextMinInfluence = nextSnapPoint->Influence(ActualValue());
00408
00409 #ifdef ApplicableRangeType
00410         switch (m_applicableRangeType)
00411         {
00412         case winrt::SnapPointApplicableRangeType::Optional:
00413             return std::min(ActualValue() + m_specifiedApplicableRange, nextMinInfluence);
00414         case winrt::SnapPointApplicableRangeType::Mandatory:
00415             return nextMinInfluence;
00416         default:
00417             MUX_ASSERT(false);
00418             return 0.0;
00419         }
00420 #else
00421         return nextMinInfluence;
00422 #endif
00423     }
00424 }
00425
00426 double ScrollSnapPoint::DetermineMaxActualImpulseApplicableZone(
00427     const SnapPointBase* nextSnapPoint,
00428     double currentIgnoredValue,
00429     double nextIgnoredValue) const
00430 {
00431     if (!nextSnapPoint)
00432     {
00433         return INFINITY;
00434     }
00435     else
00436     {
00437         const double nextMinInfluence = nextSnapPoint->ImpulseInfluence(ActualValue(), nextIgnoredValue);
00438
00439         if (isnan(currentIgnoredValue))
00440         {
00441             return nextMinInfluence;
00442         }
00443         else
00444         {
00445             return std::min(ActualValue(), nextMinInfluence);
00446         }
00447     }
00448 }
00449
00450 double ScrollSnapPoint::Influence(double edgeOfMidpoint) const
00451 {
00452     const double actualValue = ActualValue();
00453     const double midPoint = (actualValue + edgeOfMidpoint) / 2;
00454
00455 #ifdef ApplicableRangeType
00456     switch (m_applicableRangeType)
00457     {
00458     case winrt::SnapPointApplicableRangeType::Optional:
00459         if (actualValue <= edgeOfMidpoint)
00460         {
00461             return std::min(actualValue + m_specifiedApplicableRange, midPoint);
00462         }
00463         else
00464         {
00465             return std::max(actualValue - m_specifiedApplicableRange, midPoint);
00466         }
00467     case winrt::SnapPointApplicableRangeType::Mandatory:
00468         return midPoint;
00469     default:
00470         MUX_ASSERT(false);
00471         return 0.0;
00472     }
00473 #else
00474     return midPoint;
00475 #endif
00476 }
00477
00478 double ScrollSnapPoint::ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const
00479 {
00480     const double actualValue = ActualValue();
00481     const double midPoint = (actualValue + edgeOfMidpoint) / 2.0;
00482
00483     if (isnan(ignoredValue))
00484     {
00485         return midPoint;
00486     }
00487     else
00488     {
00489         if (actualValue <= edgeOfMidpoint)
00490         {
00491             return std::min(actualValue, midPoint);
00492         }
00493         else
00494         {
00495             return std::max(actualValue, midPoint);
00496         }
00497     }
00498 }
00499
00500 void ScrollSnapPoint::Combine(
00501     int& combinationCount,
00502     winrt::SnapPointBase const& snapPoint) const
00503 {
00504     auto snapPointAsIrregular = snapPoint.try_as<winrt::ScrollSnapPoint>();
00505     if (snapPointAsIrregular)
00506     {
00507 #ifdef ApplicableRangeType
00508         //TODO: The m_specifiedApplicableRange field is never expected to change after creation. A correction will be needed here.
00509         m_specifiedApplicableRange = std::max(snapPointAsIrregular.ApplicableRange(), m_specifiedApplicableRange);
00510 #else
00511         MUX_ASSERT(m_specifiedApplicableRange == INFINITY);
00512 #endif
00513         combinationCount++;
00514     }
00515     else
00516     {
00517         // TODO: Provide custom error message
00518         throw winrt::hresult_error(E_INVALIDARG);
00519     }
00520 }
00521
00522 int ScrollSnapPoint::SnapCount() const
00523 {
00524     return 1;
00525 }
00526
00527 double ScrollSnapPoint::Evaluate(
00528     std::tuple<double, double> actualApplicableZone,
00529     double value) const
00530 {
00531     if (value >= std::get<0>(actualApplicableZone) && value <= std::get<1>(actualApplicableZone))
00532     {
00533         return ActualValue();
00534     }
00535     return value;
00536 }
00537
00538 /////////////////////////////////////////////////////////////////////
00539 /////////////////    Repeated Snap Points    ////////////////////////
00540 /////////////////////////////////////////////////////////////////////
00541 #include "RepeatedScrollSnapPoint.properties.cpp"
00542
00543 RepeatedScrollSnapPoint::RepeatedScrollSnapPoint(
00544     double offset,
00545     double interval,
00546     double start,
00547     double end,
00548     winrt::ScrollSnapPointsAlignment alignment)
00549 {
00550     ValidateConstructorParameters(
00551 #ifdef ApplicableRangeType
00552         false /*applicableRangeToo*/,
00553         0 /*applicableRange*/,
00554 #endif
00555         offset,
00556         interval,
00557         start,
00558         end);
00559
00560     m_offset = offset;
00561     m_interval = interval;
00562     m_start = start;
00563     m_end = end;
00564     m_alignment = alignment;
00565 }
00566
00567 #ifdef ApplicableRangeType
00568 RepeatedScrollSnapPoint::RepeatedScrollSnapPoint(
00569     double offset,
00570     double interval,
00571     double start,
00572     double end,
00573     double applicableRange,
00574     winrt::ScrollSnapPointsAlignment alignment)
00575 {
00576     ValidateConstructorParameters(
00577         true /*applicableRangeToo*/,
00578         applicableRange,
00579         offset,
00580         interval,
00581         start,
00582         end);
00583
00584     m_offset = offset;
00585     m_interval = interval;
00586     m_start = start;
00587     m_end = end;
00588     m_specifiedApplicableRange = applicableRange;
00589     m_applicableRangeType = winrt::SnapPointApplicableRangeType::Optional;
00590     m_alignment = alignment;
00591 }
00592 #endif
00593
00594 double RepeatedScrollSnapPoint::Offset()
00595 {
00596     return m_offset;
00597 }
00598
00599 double RepeatedScrollSnapPoint::Interval()
00600 {
00601     return m_interval;
00602 }
00603
00604 double RepeatedScrollSnapPoint::Start()
00605 {
00606     return m_start;
00607 }
00608
00609 double RepeatedScrollSnapPoint::End()
00610 {
00611     return m_end;
00612 }
00613
00614 winrt::ExpressionAnimation RepeatedScrollSnapPoint::CreateRestingPointExpression(
00615     double ignoredValue,
00616     std::tuple<double, double> actualImpulseApplicableZone,
00617     winrt::InteractionTracker const& interactionTracker,
00618     winrt::hstring const& target,
00619     winrt::hstring const& scale,
00620     bool isInertiaFromImpulse)
00621 {
00622     /*
00623     fracTarget = (target / scale - first) / interval       // Unsnapped value in fractional unscaled intervals from first snapping value
00624     prevSnap = ((Floor(fracTarget) * interval) + first)    // First unscaled snapped value before unsnapped value
00625     nextSnap = ((Ceil(fracTarget) * interval) + first)     // First unscaled snapped value after unsnapped value
00626     effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of unscaled applicable zone
00627
00628     Expression:
00629      ((Abs(target / scale - prevSnap) >= Abs(target / scale - nextSnap)) && (nextSnap <= effectiveEnd))
00630      ?
00631      // nextSnap value is closer to unsnapped value and within applicable zone.
00632      (
00633       IsInertiaFromImpulse
00634       ?
00635       // Impulse mode.
00636       (
00637        nextSnap == impIgn
00638        ?
00639        (
00640         // Next snapped value is ignored. Pick the previous snapped value if any, else the ignored value.
00641         (impIgn == first ? first * scale : (impIgn - interval) * scale)
00642        )
00643        :
00644        // Pick next snapped value.
00645        nextSnap * scale
00646       )
00647       :
00648       // Regular mode. Pick next snapped value.
00649       nextSnap * scale
00650      )
00651      :
00652      // prevSnap value is closer to unsnapped value.
00653      (
00654       IsInertiaFromImpulse
00655       ?
00656       // Impulse mode.
00657       (
00658        prevSnap == impIgn
00659        ?
00660        // Previous snapped value is ignored. Pick the next snapped value if any, else the ignored value.
00661        (impIgn + interval <= effectiveEnd ? (impIgn + interval) * scale : impIgn * scale)
00662        :
00663        (
00664         prevSnap < first i.e. fracTarget < -0.5
00665         ?
00666         // Pick next snapped value as previous snapped value is outside applicable zone.
00667         nextSnap * scale
00668         :
00669         // Pick previous snapped value as it is within applicable zone.
00670         prevSnap * scale
00671        )
00672       )
00673       :
00674       // Regular mode.
00675       (
00676        prevSnap < first i.e. fracTarget < -0.5
00677        ?
00678        // Pick next snapped value as previous snapped value is outside applicable zone.
00679        nextSnap * scale
00680        :
00681        // Pick previous snapped value as it is within applicable zone.
00682        prevSnap * scale
00683       )
00684      )
00685     */
00686
00687     winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
00688     winrt::hstring expression = StringUtil::FormatString(
00689         L"((Abs(T.%2!s!/T.Scale-(Floor((T.%2!s!/T.Scale-P)/V)*V+P))>=Abs(T.%2!s!/T.Scale-(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)))&&((Ceil((T.%2!s!/T.Scale-P)/V)*V+P)<=(%1!s!?iE:E)))?(%1!s!?((Ceil((T.%2!s!/T.Scale-P)/V)*V+P)==M?((M==P?P*T.Scale:(M-V)*T.Scale)):(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale):(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale):(%1!s!?((Floor((T.%2!s!/T.Scale-P)/V)*V+P)==M?(M+V<=(%1!s!?iE:E)?(M+V)*T.Scale:M*T.Scale):(T.%2!s!/T.Scale<P-0.5*V?(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale:(Floor((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale)):(T.%2!s!/T.Scale<P-0.5*V?(Ceil((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale:(Floor((T.%2!s!/T.Scale-P)/V)*V+P)*T.Scale))",
00690         isInertiaFromImpulseExpression.data(),
00691         target.data());
00692
00693     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());
00694
00695     auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);
00696
00697     SetScalarParameter(restingPointExpressionAnimation, s_interval, static_cast<float>(m_interval));
00698     SetScalarParameter(restingPointExpressionAnimation, s_end, static_cast<float>(ActualEnd()));
00699     SetScalarParameter(restingPointExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
00700     restingPointExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);
00701
00702     UpdateRestingPointExpressionAnimationForImpulse(
00703         restingPointExpressionAnimation,
00704         ignoredValue,
00705         actualImpulseApplicableZone);
00706
00707     return restingPointExpressionAnimation;
00708 }
00709
00710 winrt::ExpressionAnimation RepeatedScrollSnapPoint::CreateConditionalExpression(
00711     std::tuple<double, double> actualApplicableZone,
00712     std::tuple<double, double> actualImpulseApplicableZone,
00713     winrt::InteractionTracker const& interactionTracker,
00714     winrt::hstring const& target,
00715     winrt::hstring const& scale,
00716     bool isInertiaFromImpulse)
00717 {
00718     MUX_ASSERT(std::get<0>(actualApplicableZone) == ActualStart());
00719     MUX_ASSERT(std::get<1>(actualApplicableZone) == ActualEnd());
00720
00721     /*
00722     fracTarget = (target / scale - first) / interval       // Unsnapped value in fractional unscaled intervals from first snapping value
00723     prevSnap = ((Floor(fracTarget) * interval) + first)    // First unscaled snapped value before unsnapped value
00724     nextSnap = ((Ceil(fracTarget) * interval) + first)     // First unscaled snapped value after unsnapped value
00725     effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of unscaled applicable zone
00726
00727     Expression:
00728     (
00729      (!IsInertiaFromImpulse && target / scale >= start && target / scale <= end)       // If we are within the start and end in non-impulse mode
00730      ||
00731      (IsInertiaFromImpulse && target / scale >= impStart && target / scale <= impEnd)  // or we are within the impulse start and end in impulse mode
00732     )
00733     &&                                                                                 // and...
00734     (                                                                                  // The location of the repeated snap point just before the natural resting point
00735      (prevSnap + appRange >= target / scale)                                           // Plus the applicable range is greater than the natural resting point
00736      ||                                                                                // or...
00737      (                                                                                 // The location of the repeated snap point just after the natural resting point
00738       (nextSnap - appRange <= target / scale) &&                                       // Minus the applicable range is less than the natural resting point.
00739       (nextSnap <= effectiveEnd)                                                       // And the snap point after the natural resting point is less than or equal to the effective end value
00740      )
00741     )
00742     */
00743
00744     winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
00745     winrt::hstring expression = StringUtil::FormatString(
00746         L"((!%1!s!&&T.%2!s!/T.Scale>=S&&T.%2!s!/T.Scale<=E)||(%1!s!&&T.%2!s!/T.Scale>=iS&&T.%2!s!/T.Scale<=iE))&&(((Floor((T.%2!s!/T.Scale-P)/V)*V)+P+aR>=T.%2!s!/T.Scale)||(((Ceil((T.%2!s!/T.Scale-P)/V)*V)+P-aR<=T.%2!s!/T.Scale)&&((Ceil((T.%2!s!/T.Scale-P)/V)*V)+P<=(%1!s!?iE:E))))",
00747         isInertiaFromImpulseExpression.data(),
00748         target.data());
00749
00750     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());
00751
00752     auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);
00753
00754     SetScalarParameter(conditionExpressionAnimation, s_interval, static_cast<float>(m_interval));
00755     SetScalarParameter(conditionExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
00756     SetScalarParameter(conditionExpressionAnimation, s_start, static_cast<float>(ActualStart()));
00757     SetScalarParameter(conditionExpressionAnimation, s_end, static_cast<float>(ActualEnd()));
00758     SetScalarParameter(conditionExpressionAnimation, s_applicableRange, static_cast<float>(m_specifiedApplicableRange));
00759     conditionExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);
00760
00761     UpdateConditionalExpressionAnimationForImpulse(
00762         conditionExpressionAnimation,
00763         actualImpulseApplicableZone);
00764
00765     return conditionExpressionAnimation;
00766 }
00767
00768 void RepeatedScrollSnapPoint::UpdateConditionalExpressionAnimationForImpulse(
00769     winrt::ExpressionAnimation const& conditionExpressionAnimation,
00770     std::tuple<double, double> actualImpulseApplicableZone) const
00771 {
00772     SetScalarParameter(conditionExpressionAnimation, s_impulseStart, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
00773     SetScalarParameter(conditionExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
00774 }
00775
00776 void RepeatedScrollSnapPoint::UpdateRestingPointExpressionAnimationForImpulse(
00777     winrt::ExpressionAnimation const& restingValueExpressionAnimation,
00778     double ignoredValue,
00779     std::tuple<double, double> actualImpulseApplicableZone) const
00780 {
00781     SetScalarParameter(restingValueExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
00782     SetScalarParameter(restingValueExpressionAnimation, s_impulseIgnoredValue, static_cast<float>(ignoredValue));
00783 }
00784
00785 SnapPointSortPredicate RepeatedScrollSnapPoint::SortPredicate() const
00786 {
00787     // Repeated snap points should be sorted after irregular snap points, so give it a tertiary sort value of 1 (irregular snap points get 0)
00788     return SnapPointSortPredicate{ ActualStart(), ActualEnd(), 1 };
00789 }
00790
00791 std::tuple<double, double> RepeatedScrollSnapPoint::DetermineActualApplicableZone(
00792     const SnapPointBase* previousSnapPoint,
00793     const SnapPointBase* nextSnapPoint)
00794 {
00795     std::tuple<double, double> actualApplicableZoneReturned = std::make_tuple(
00796         DetermineMinActualApplicableZone(previousSnapPoint),
00797         DetermineMaxActualApplicableZone(nextSnapPoint));
00798
00799     // Influence() will not have thrown if either of the adjacent snap points are also repeated snap points which have the same start and end, however this is not allowed.
00800     // We only need to check the nextSnapPoint because of the symmetry in the algorithm.
00801     if (nextSnapPoint && *static_cast<SnapPointBase*>(this) == (nextSnapPoint))
00802     {
00803         // TODO: Provide custom error message
00804         throw winrt::hresult_error(E_INVALIDARG);
00805     }
00806
00807     return actualApplicableZoneReturned;
00808 }
00809
00810 std::tuple<double, double> RepeatedScrollSnapPoint::DetermineActualImpulseApplicableZone(
00811     const SnapPointBase* previousSnapPoint,
00812     const SnapPointBase* nextSnapPoint,
00813     double currentIgnoredValue,
00814     double previousIgnoredValue,
00815     double nextIgnoredValue)
00816 {
00817     return std::make_tuple(
00818         DetermineMinActualImpulseApplicableZone(
00819             previousSnapPoint,
00820             currentIgnoredValue,
00821             previousIgnoredValue),
00822         DetermineMaxActualImpulseApplicableZone(
00823             nextSnapPoint,
00824             currentIgnoredValue,
00825             nextIgnoredValue));
00826 }
00827
00828 double RepeatedScrollSnapPoint::ActualOffset() const
00829 {
00830     return m_offset + m_alignmentAdjustment;
00831 }
00832
00833 double RepeatedScrollSnapPoint::ActualStart() const
00834 {
00835     return m_start + m_alignmentAdjustment;
00836 }
00837
00838 double RepeatedScrollSnapPoint::ActualEnd() const
00839 {
00840     return m_end + m_alignmentAdjustment;
00841 }
00842
00843 double RepeatedScrollSnapPoint::DetermineFirstRepeatedSnapPointValue() const
00844 {
00845     const double actualOffset = ActualOffset();
00846     const double actualStart = ActualStart();
00847
00848     MUX_ASSERT(actualOffset >= actualStart);
00849     MUX_ASSERT(m_interval > 0.0);
00850
00851     return actualOffset - std::floor((actualOffset - actualStart) / m_interval) * m_interval;
00852 }
00853
00854 double RepeatedScrollSnapPoint::DetermineLastRepeatedSnapPointValue() const
00855 {
00856     const double actualOffset = ActualOffset();
00857     const double actualEnd = ActualEnd();
00858
00859     MUX_ASSERT(actualOffset <= m_end);
00860     MUX_ASSERT(m_interval > 0.0);
00861
00862     return actualOffset + std::floor((actualEnd - actualOffset) / m_interval) * m_interval;
00863 }
00864
00865 double RepeatedScrollSnapPoint::DetermineMinActualApplicableZone(
00866     const SnapPointBase* previousSnapPoint) const
00867 {
00868     const double actualStart = ActualStart();
00869
00870     // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
00871     // This call will ensure that we are not in the range of the previous snap point if it is.
00872     if (previousSnapPoint)
00873     {
00874         previousSnapPoint->Influence(actualStart);
00875     }
00876     return actualStart;
00877 }
00878
00879 double RepeatedScrollSnapPoint::DetermineMinActualImpulseApplicableZone(
00880     const SnapPointBase* previousSnapPoint,
00881     double currentIgnoredValue,
00882     double previousIgnoredValue) const
00883 {
00884     if (previousSnapPoint)
00885     {
00886         if (currentIgnoredValue == DetermineFirstRepeatedSnapPointValue())
00887         {
00888             return currentIgnoredValue;
00889         }
00890
00891         if (!isnan(previousIgnoredValue))
00892         {
00893             return previousSnapPoint->ImpulseInfluence(ActualStart(), previousIgnoredValue);
00894         }
00895     }
00896     return ActualStart();
00897 }
00898
00899 double RepeatedScrollSnapPoint::DetermineMaxActualApplicableZone(
00900     const SnapPointBase* nextSnapPoint) const
00901 {
00902     const double actualEnd = ActualEnd();
00903
00904     // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
00905     // This call will ensure that we are not in the range of the next snap point if it is.
00906     if (nextSnapPoint)
00907     {
00908         nextSnapPoint->Influence(actualEnd);
00909     }
00910     return actualEnd;
00911 }
00912
00913 double RepeatedScrollSnapPoint::DetermineMaxActualImpulseApplicableZone(
00914     const SnapPointBase* nextSnapPoint,
00915     double currentIgnoredValue,
00916     double nextIgnoredValue) const
00917 {
00918     if (nextSnapPoint)
00919     {
00920         if (currentIgnoredValue == DetermineLastRepeatedSnapPointValue())
00921         {
00922             return currentIgnoredValue;
00923         }
00924
00925         if (!isnan(nextIgnoredValue))
00926         {
00927             return nextSnapPoint->ImpulseInfluence(ActualEnd(), nextIgnoredValue);
00928         }
00929     }
00930     return ActualEnd();
00931 }
00932
00933 void RepeatedScrollSnapPoint::ValidateConstructorParameters(
00934 #ifdef ApplicableRangeType
00935     bool applicableRangeToo,
00936     double applicableRange,
00937 #endif
00938     double offset,
00939     double interval,
00940     double start,
00941     double end) const
00942 {
00943     if (end <= start)
00944     {
00945         throw winrt::hresult_invalid_argument(L"'end' must be greater than 'start'.");
00946     }
00947
00948     if (offset < start)
00949     {
00950         throw winrt::hresult_invalid_argument(L"'offset' must be greater than or equal to 'start'.");
00951     }
00952
00953     if (offset > end)
00954     {
00955         throw winrt::hresult_invalid_argument(L"'offset' must be smaller than or equal to 'end'.");
00956     }
00957
00958     if (interval <= 0)
00959     {
00960         throw winrt::hresult_invalid_argument(L"'interval' must be strictly positive.");
00961     }
00962
00963 #ifdef ApplicableRangeType
00964     if (applicableRangeToo && applicableRange <= 0)
00965     {
00966         throw winrt::hresult_invalid_argument(L"'applicableRange' must be strictly positive.");
00967     }
00968 #endif
00969 }
00970
00971 double RepeatedScrollSnapPoint::Influence(double edgeOfMidpoint) const
00972 {
00973     const double actualStart = ActualStart();
00974     const double actualEnd = ActualEnd();
00975
00976     if (edgeOfMidpoint <= actualStart)
00977     {
00978         return actualStart;
00979     }
00980     else if (edgeOfMidpoint >= actualEnd)
00981     {
00982         return actualEnd;
00983     }
00984     else
00985     {
00986         // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
00987         // TODO: Provide custom error message
00988         throw winrt::hresult_error(E_INVALIDARG);
00989     }
00990     return 0.0;
00991 }
00992
00993 double RepeatedScrollSnapPoint::ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const
00994 {
00995     if (edgeOfMidpoint <= ActualStart())
00996     {
00997         if (ignoredValue == DetermineFirstRepeatedSnapPointValue())
00998         {
00999             return ignoredValue;
01000         }
01001         return ActualStart();
01002     }
01003     else if (edgeOfMidpoint >= ActualEnd())
01004     {
01005         if (ignoredValue == DetermineLastRepeatedSnapPointValue())
01006         {
01007             return ignoredValue;
01008         }
01009         return ActualEnd();
01010     }
01011     else
01012     {
01013         MUX_ASSERT(false);
01014         return 0.0;
01015     }
01016 }
01017
01018 void RepeatedScrollSnapPoint::Combine(
01019     int& combinationCount,
01020     winrt::SnapPointBase const& snapPoint) const
01021 {
01022     // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
01023     // TODO: Provide custom error message
01024     throw winrt::hresult_error(E_INVALIDARG);
01025 }
01026
01027 int RepeatedScrollSnapPoint::SnapCount() const
01028 {
01029     return static_cast<int>((m_end - m_start) / m_interval);
01030 }
01031
01032 double RepeatedScrollSnapPoint::Evaluate(
01033     std::tuple<double, double> actualApplicableZone,
01034     double value) const
01035 {
01036     if (value >= ActualStart() && value <= ActualEnd())
01037     {
01038         const double firstSnapPointValue = DetermineFirstRepeatedSnapPointValue();
01039         const double passedSnapPoints = std::floor((value - firstSnapPointValue) / m_interval);
01040         const double previousSnapPointValue = (passedSnapPoints * m_interval) + firstSnapPointValue;
01041         const double nextSnapPointValue = previousSnapPointValue + m_interval;
01042
01043         if ((value - previousSnapPointValue) <= (nextSnapPointValue - value))
01044         {
01045             if (previousSnapPointValue + m_specifiedApplicableRange >= value)
01046             {
01047                 return previousSnapPointValue;
01048             }
01049         }
01050         else
01051         {
01052             if (nextSnapPointValue - m_specifiedApplicableRange <= value)
01053             {
01054                 return nextSnapPointValue;
01055             }
01056         }
01057     }
01058     return value;
01059 }
01060
01061 /////////////////////////////////////////////////////////////////////
01062 /////////////////       Zoom Snap Points      ///////////////////////
01063 /////////////////////////////////////////////////////////////////////
01064
01065 // Required for Modern Idl bug, should never be called.
01066 ZoomSnapPointBase::ZoomSnapPointBase()
01067 {
01068     // throw (ERROR_CALL_NOT_IMPLEMENTED);
01069 }
01070
01071 bool ZoomSnapPointBase::OnUpdateViewport(double newViewport)
01072 {
01073     return false;
01074 }
01075
01076 /////////////////////////////////////////////////////////////////////
01077 //////////////     Irregular Zoom Snap Points    ////////////////////
01078 /////////////////////////////////////////////////////////////////////
01079 #include "ZoomSnapPoint.properties.cpp"
01080
01081 ZoomSnapPoint::ZoomSnapPoint(
01082     double snapPointValue)
01083 {
01084     m_value = snapPointValue;
01085 }
01086
01087 #ifdef ApplicableRangeType
01088 ZoomSnapPoint::ZoomSnapPoint(
01089     double snapPointValue,
01090     double applicableRange)
01091 {
01092     if (applicableRange <= 0)
01093     {
01094         throw winrt::hresult_invalid_argument(L"'applicableRange' must be strictly positive.");
01095     }
01096
01097     m_value = snapPointValue;
01098     m_specifiedApplicableRange = applicableRange;
01099     m_actualApplicableZone = std::tuple<double, double>{ snapPointValue - applicableRange, snapPointValue + applicableRange };
01100     m_applicableRangeType = winrt::SnapPointApplicableRangeType::Optional;
01101 }
01102 #endif
01103
01104 double ZoomSnapPoint::Value()
01105 {
01106     return m_value;
01107 }
01108
01109 // For zoom snap points scale == L"1.0".
01110 winrt::ExpressionAnimation ZoomSnapPoint::CreateRestingPointExpression(
01111     double ignoredValue,
01112     std::tuple<double, double> actualImpulseApplicableZone,
01113     winrt::InteractionTracker const& interactionTracker,
01114     winrt::hstring const& target,
01115     winrt::hstring const& scale,
01116     bool isInertiaFromImpulse)
01117 {
01118     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
01119
01120     auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(s_snapPointValue);
01121
01122     SetScalarParameter(restingPointExpressionAnimation, s_snapPointValue, static_cast<float>(m_value));
01123
01124     return restingPointExpressionAnimation;
01125 }
01126
01127 // For zoom snap points scale == L"1.0".
01128 winrt::ExpressionAnimation ZoomSnapPoint::CreateConditionalExpression(
01129     std::tuple<double, double> actualApplicableZone,
01130     std::tuple<double, double> actualImpulseApplicableZone,
01131     winrt::InteractionTracker const& interactionTracker,
01132     winrt::hstring const& target,
01133     winrt::hstring const& scale,
01134     bool isInertiaFromImpulse)
01135 {
01136     winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(L"this.Target");
01137     winrt::hstring targetExpression = GetTargetExpression(target);
01138     winrt::hstring expression = StringUtil::FormatString(
01139         L"%1!s!?(%2!s!>=%5!s!&&%2!s!<=%6!s!):(%2!s!>=%3!s!&&%2!s!<=%4!s!)",
01140         isInertiaFromImpulseExpression.data(),
01141         targetExpression.data(),
01142         s_minApplicableValue.data(),
01143         s_maxApplicableValue.data(),
01144         s_minImpulseApplicableValue.data(),
01145         s_maxImpulseApplicableValue.data());
01146
01147     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());
01148
01149     auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);
01150
01151     SetScalarParameter(conditionExpressionAnimation, s_minApplicableValue, static_cast<float>(std::get<0>(actualApplicableZone)));
01152     SetScalarParameter(conditionExpressionAnimation, s_maxApplicableValue, static_cast<float>(std::get<1>(actualApplicableZone)));
01153
01154     UpdateConditionalExpressionAnimationForImpulse(
01155         conditionExpressionAnimation,
01156         actualImpulseApplicableZone);
01157
01158     return conditionExpressionAnimation;
01159 }
01160
01161 void ZoomSnapPoint::UpdateConditionalExpressionAnimationForImpulse(
01162     winrt::ExpressionAnimation const& conditionExpressionAnimation,
01163     std::tuple<double, double> actualImpulseApplicableZone) const
01164 {
01165     SetScalarParameter(conditionExpressionAnimation, s_minImpulseApplicableValue, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
01166     SetScalarParameter(conditionExpressionAnimation, s_maxImpulseApplicableValue, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
01167 }
01168
01169 void ZoomSnapPoint::UpdateRestingPointExpressionAnimationForImpulse(
01170     winrt::ExpressionAnimation const& restingValueExpressionAnimation,
01171     double ignoredValue,
01172     std::tuple<double, double> actualImpulseApplicableZone) const
01173 {
01174     // An irregular snap point like ZoomSnapPoint is either completely ignored in impulse mode or not ignored at all, unlike repeated snap points
01175     // which can be partially ignored. Its conditional expression depends on the impulse mode, whereas its resting point expression does not,
01176     // thus this method has no job to do.
01177 }
01178
01179 SnapPointSortPredicate ZoomSnapPoint::SortPredicate() const
01180 {
01181     // Irregular snap point should be sorted before repeated snap points so it gives a tertiary sort value of 0 (repeated snap points get 1)
01182     return SnapPointSortPredicate{ m_value, m_value, 0 };
01183 }
01184
01185 std::tuple<double, double> ZoomSnapPoint::DetermineActualApplicableZone(
01186     const SnapPointBase* previousSnapPoint,
01187     const SnapPointBase* nextSnapPoint)
01188 {
01189     return std::make_tuple(
01190         DetermineMinActualApplicableZone(previousSnapPoint),
01191         DetermineMaxActualApplicableZone(nextSnapPoint));
01192 }
01193
01194 std::tuple<double, double> ZoomSnapPoint::DetermineActualImpulseApplicableZone(
01195     const SnapPointBase* previousSnapPoint,
01196     const SnapPointBase* nextSnapPoint,
01197     double currentIgnoredValue,
01198     double previousIgnoredValue,
01199     double nextIgnoredValue)
01200 {
01201     return std::make_tuple(
01202         DetermineMinActualImpulseApplicableZone(
01203             previousSnapPoint,
01204             currentIgnoredValue,
01205             previousIgnoredValue),
01206         DetermineMaxActualImpulseApplicableZone(
01207             nextSnapPoint,
01208             currentIgnoredValue,
01209             nextIgnoredValue));
01210 }
01211
01212 double ZoomSnapPoint::DetermineMinActualApplicableZone(
01213     const SnapPointBase* previousSnapPoint) const
01214 {
01215     // If we are not passed a previousSnapPoint it means we are the first in the list, see if we expand to negative Infinity or stay put.
01216     if (!previousSnapPoint)
01217     {
01218 #ifdef ApplicableRangeType
01219         if (applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
01220         {
01221             return -INFINITY;
01222         }
01223         else
01224         {
01225             return m_value - m_specifiedApplicableRange;
01226         }
01227 #else
01228         return -INFINITY;
01229 #endif
01230     }
01231     // If we are passed a previousSnapPoint then we need to account for its influence on us.
01232     else
01233     {
01234         const double previousMaxInfluence = previousSnapPoint->Influence(m_value);
01235
01236 #ifdef ApplicableRangeType
01237         switch (m_applicableRangeType)
01238         {
01239         case winrt::SnapPointApplicableRangeType::Optional:
01240             return std::max(previousMaxInfluence, m_value - m_specifiedApplicableRange);
01241         case winrt::SnapPointApplicableRangeType::Mandatory:
01242             return previousMaxInfluence;
01243         default:
01244             MUX_ASSERT(false);
01245             return 0.0;
01246         }
01247 #else
01248         return previousMaxInfluence;
01249 #endif
01250     }
01251 }
01252
01253 double ZoomSnapPoint::DetermineMinActualImpulseApplicableZone(
01254     const SnapPointBase* previousSnapPoint,
01255     double currentIgnoredValue,
01256     double previousIgnoredValue) const
01257 {
01258     if (!previousSnapPoint)
01259     {
01260         return -INFINITY;
01261     }
01262     else
01263     {
01264         const double previousMaxInfluence = previousSnapPoint->ImpulseInfluence(m_value, previousIgnoredValue);
01265
01266         if (isnan(currentIgnoredValue))
01267         {
01268             return previousMaxInfluence;
01269         }
01270         else
01271         {
01272             return std::max(previousMaxInfluence, m_value);
01273         }
01274     }
01275 }
01276
01277 double ZoomSnapPoint::DetermineMaxActualApplicableZone(
01278     const SnapPointBase* nextSnapPoint) const
01279 {
01280     // If we are not passed a nextSnapPoint it means we are the last in the list, see if we expand to Infinity or stay put.
01281     if (!nextSnapPoint)
01282     {
01283 #ifdef ApplicableRangeType
01284         if (m_applicableRangeType != winrt::SnapPointApplicableRangeType::Optional)
01285         {
01286             return INFINITY;
01287         }
01288         else
01289         {
01290             return m_value + m_specifiedApplicableRange;
01291         }
01292 #else
01293         return INFINITY;
01294 #endif
01295     }
01296     // If we are passed a nextSnapPoint then we need to account for its influence on us.
01297     else
01298     {
01299         const double nextMinInfluence = nextSnapPoint->Influence(m_value);
01300
01301 #ifdef ApplicableRangeType
01302         switch (m_applicableRangeType)
01303         {
01304         case winrt::SnapPointApplicableRangeType::Optional:
01305             return std::min(m_value + m_specifiedApplicableRange, nextMinInfluence);
01306         case winrt::SnapPointApplicableRangeType::Mandatory:
01307             return nextMinInfluence;
01308         default:
01309             MUX_ASSERT(false);
01310             return 0.0;
01311         }
01312 #else
01313         return nextMinInfluence;
01314 #endif
01315     }
01316 }
01317
01318 double ZoomSnapPoint::DetermineMaxActualImpulseApplicableZone(
01319     const SnapPointBase* nextSnapPoint,
01320     double currentIgnoredValue,
01321     double nextIgnoredValue) const
01322 {
01323     if (!nextSnapPoint)
01324     {
01325         return INFINITY;
01326     }
01327     else
01328     {
01329         const double nextMinInfluence = nextSnapPoint->ImpulseInfluence(m_value, nextIgnoredValue);
01330
01331         if (isnan(currentIgnoredValue))
01332         {
01333             return nextMinInfluence;
01334         }
01335         else
01336         {
01337             return std::min(m_value, nextMinInfluence);
01338         }
01339     }
01340 }
01341
01342 double ZoomSnapPoint::Influence(double edgeOfMidpoint) const
01343 {
01344     const double midPoint = (m_value + edgeOfMidpoint) / 2;
01345
01346 #ifdef ApplicableRangeType
01347     switch (m_applicableRangeType)
01348     {
01349     case winrt::SnapPointApplicableRangeType::Optional:
01350         if (m_value <= edgeOfMidpoint)
01351         {
01352             return std::min(m_value + m_specifiedApplicableRange, midPoint);
01353         }
01354         else
01355         {
01356             return std::max(m_value - m_specifiedApplicableRange, midPoint);
01357         }
01358     case winrt::SnapPointApplicableRangeType::Mandatory:
01359         return midPoint;
01360     default:
01361         MUX_ASSERT(false);
01362         return 0.0;
01363     }
01364 #else
01365     return midPoint;
01366 #endif
01367 }
01368
01369 double ZoomSnapPoint::ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const
01370 {
01371     const double midPoint = (m_value + edgeOfMidpoint) / 2.0;
01372
01373     if (isnan(ignoredValue))
01374     {
01375         return midPoint;
01376     }
01377     else
01378     {
01379         if (m_value <= edgeOfMidpoint)
01380         {
01381             return std::min(m_value, midPoint);
01382         }
01383         else
01384         {
01385             return std::max(m_value, midPoint);
01386         }
01387     }
01388 }
01389
01390 void ZoomSnapPoint::Combine(
01391     int& combinationCount,
01392     winrt::SnapPointBase const& snapPoint) const
01393 {
01394     auto snapPointAsIrregular = snapPoint.try_as<winrt::ZoomSnapPoint>();
01395     if (snapPointAsIrregular)
01396     {
01397 #ifdef ApplicableRangeType
01398         //TODO: The m_specifiedApplicableRange field is never expected to change after creation. A correction will be needed here.
01399         m_specifiedApplicableRange = std::max(snapPointAsIrregular.ApplicableRange(), m_specifiedApplicableRange);
01400 #else
01401         MUX_ASSERT(m_specifiedApplicableRange == INFINITY);
01402 #endif
01403         combinationCount++;
01404     }
01405     else
01406     {
01407         // TODO: Provide custom error message
01408         throw winrt::hresult_error(E_INVALIDARG);
01409     }
01410 }
01411
01412 int ZoomSnapPoint::SnapCount() const
01413 {
01414     return 1;
01415 }
01416
01417 double ZoomSnapPoint::Evaluate(
01418     std::tuple<double, double> actualApplicableZone,
01419     double value) const
01420 {
01421     if (value >= std::get<0>(actualApplicableZone) && value <= std::get<1>(actualApplicableZone))
01422     {
01423         return m_value;
01424     }
01425     return value;
01426 }
01427
01428 /////////////////////////////////////////////////////////////////////
01429 /////////////////    Repeated Snap Points    ////////////////////////
01430 /////////////////////////////////////////////////////////////////////
01431 #include "RepeatedZoomSnapPoint.properties.cpp"
01432
01433 RepeatedZoomSnapPoint::RepeatedZoomSnapPoint(
01434     double offset,
01435     double interval,
01436     double start,
01437     double end)
01438 {
01439     ValidateConstructorParameters(
01440 #ifdef ApplicableRangeType
01441         false /*applicableRangeToo*/,
01442         0 /*applicableRange*/,
01443 #endif
01444         offset,
01445         interval,
01446         start,
01447         end);
01448
01449     m_offset = offset;
01450     m_interval = interval;
01451     m_start = start;
01452     m_end = end;
01453 }
01454
01455 #ifdef ApplicableRangeType
01456 RepeatedZoomSnapPoint::RepeatedZoomSnapPoint(
01457     double offset,
01458     double interval,
01459     double start,
01460     double end,
01461     double applicableRange)
01462 {
01463     ValidateConstructorParameters(
01464         true /*applicableRangeToo*/,
01465         applicableRange,
01466         offset,
01467         interval,
01468         start,
01469         end);
01470
01471     m_offset = offset;
01472     m_interval = interval;
01473     m_start = start;
01474     m_end = end;
01475     m_specifiedApplicableRange = applicableRange;
01476     m_applicableRangeType = winrt::SnapPointApplicableRangeType::Optional;
01477 }
01478 #endif
01479
01480 double RepeatedZoomSnapPoint::Offset()
01481 {
01482     return m_offset;
01483 }
01484
01485 double RepeatedZoomSnapPoint::Interval()
01486 {
01487     return m_interval;
01488 }
01489
01490 double RepeatedZoomSnapPoint::Start()
01491 {
01492     return m_start;
01493 }
01494
01495 double RepeatedZoomSnapPoint::End()
01496 {
01497     return m_end;
01498 }
01499
01500 // For zoom snap points scale == L"1.0".
01501 winrt::ExpressionAnimation RepeatedZoomSnapPoint::CreateRestingPointExpression(
01502     double ignoredValue,
01503     std::tuple<double, double> actualImpulseApplicableZone,
01504     winrt::InteractionTracker const& interactionTracker,
01505     winrt::hstring const& target,
01506     winrt::hstring const& scale,
01507     bool isInertiaFromImpulse)
01508 {
01509     /*
01510     fracTarget = (target - first) / interval               // Unsnapped value in fractional intervals from first snapping value
01511     prevSnap = ((Floor(fracTarget) * interval) + first)    // First snapped value before unsnapped value
01512     nextSnap = ((Ceil(fracTarget) * interval) + first)     // First snapped value after unsnapped value
01513     effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of applicable zone
01514
01515     Expression:
01516      ((Abs(target - prevSnap) >= Abs(target - nextSnap)) && (nextSnap <= effectiveEnd))
01517      ?
01518      // nextSnap value is closer to unsnapped value and within applicable zone.
01519      (
01520       IsInertiaFromImpulse
01521       ?
01522       // Impulse mode.
01523       (
01524        nextSnap == impIgn
01525        ?
01526        (
01527         // Next snapped value is ignored. Pick the previous snapped value if any, else the ignored value.
01528         (impIgn == first ? first : impIgn - interval)
01529        )
01530        :
01531        // Pick next snapped value.
01532        nextSnap
01533       )
01534       :
01535       // Regular mode. Pick next snapped value.
01536       nextSnap
01537      )
01538      :
01539      // prevSnap value is closer to unsnapped value.
01540      (
01541       IsInertiaFromImpulse
01542       ?
01543       // Impulse mode.
01544       (
01545        prevSnap == impIgn
01546        ?
01547        // Previous snapped value is ignored. Pick the next snapped value if any, else the ignored value.
01548        (impIgn + interval <= effectiveEnd ? impIgn + interval : impIgn)
01549        :
01550        (
01551         prevSnap < first i.e. fracTarget < -0.5
01552         ?
01553         // Pick next snapped value as previous snapped value is outside applicable zone.
01554         nextSnap
01555         :
01556         // Pick previous snapped value as it is within applicable zone.
01557         prevSnap
01558        )
01559       )
01560       :
01561       // Regular mode.
01562       (
01563        prevSnap < first i.e. fracTarget < -0.5
01564        ?
01565        // Pick next snapped value as previous snapped value is outside applicable zone.
01566        nextSnap
01567        :
01568        // Pick previous snapped value as it is within applicable zone.
01569        prevSnap
01570       )
01571      )
01572     */
01573
01574     winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
01575     winrt::hstring expression = StringUtil::FormatString(
01576         L"((Abs(T.%2!s!-(Floor((T.%2!s!-P)/V)*V+P))>=Abs(T.%2!s!-(Ceil((T.%2!s!-P)/V)*V+P)))&&(Ceil((T.%2!s!-P)/V)*V+P<=(%1!s!?iE:E)))?(%1!s!?(Ceil((T.%2!s!-P)/V)*V+P==M?(M==P?P:M-V):Ceil((T.%2!s!-P)/V)*V+P):Ceil((T.%2!s!-P)/V)*V+P):(%1!s!?(Floor((T.%2!s!-P)/V)*V+P==M?(M+V<=(%1!s!?iE:E)?(M+V):M):(T.%2!s!<P-0.5*V?Ceil((T.%2!s!-P)/V)*V+P:Floor((T.%2!s!-P)/V)*V+P)):(T.%2!s!<P-0.5*V?Ceil((T.%2!s!-P)/V)*V+P:Floor((T.%2!s!-P)/V)*V+P))",
01577         isInertiaFromImpulseExpression.data(),
01578         target.data());
01579
01580     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());
01581
01582     auto restingPointExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);
01583
01584     SetScalarParameter(restingPointExpressionAnimation, s_interval, static_cast<float>(m_interval));
01585     SetScalarParameter(restingPointExpressionAnimation, s_end, static_cast<float>(m_end));
01586     SetScalarParameter(restingPointExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
01587     restingPointExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);
01588
01589     UpdateRestingPointExpressionAnimationForImpulse(
01590         restingPointExpressionAnimation,
01591         ignoredValue,
01592         actualImpulseApplicableZone);
01593
01594     return restingPointExpressionAnimation;
01595 }
01596
01597 // For zoom snap points scale == L"1.0".
01598 winrt::ExpressionAnimation RepeatedZoomSnapPoint::CreateConditionalExpression(
01599     std::tuple<double, double> actualApplicableZone,
01600     std::tuple<double, double> actualImpulseApplicableZone,
01601     winrt::InteractionTracker const& interactionTracker,
01602     winrt::hstring const& target,
01603     winrt::hstring const& scale,
01604     bool isInertiaFromImpulse)
01605 {
01606     MUX_ASSERT(std::get<0>(actualApplicableZone) == m_start);
01607     MUX_ASSERT(std::get<1>(actualApplicableZone) == m_end);
01608
01609     /*
01610     fracTarget = (target - first) / interval               // Unsnapped value in fractional intervals from first snapping value
01611     prevSnap = ((Floor(fracTarget) * interval) + first)    // First snapped value before unsnapped value
01612     nextSnap = ((Ceil(fracTarget) * interval) + first)     // First snapped value after unsnapped value
01613     effectiveEnd = (IsInertiaFromImpulse ? impEnd : end)   // Regular or impulse upper bound of applicable zone
01614
01615     Expression:
01616     (
01617      (!IsInertiaFromImpulse && target >= start && target <= end)       // If we are within the start and end in non-impulse mode
01618      ||
01619      (IsInertiaFromImpulse && target >= impStart && target <= impEnd)  // or we are within the impulse start and end in impulse mode
01620     )
01621     &&                                                                 // and...
01622     (                                                                  // The location of the repeated snap point just before the natural resting point
01623      (prevSnap + appRange >= target)                                   // Plus the applicable range is greater than the natural resting point
01624      ||                                                                // or...
01625      (                                                                 // The location of the repeated snap point just after the natural resting point
01626       (nextSnap - appRange <= target) &&                               // Minus the applicable range is less than the natural resting point.
01627       (nextSnap <= effectiveEnd)                                       // And the snap point after the natural resting point is less than or equal to the effective end value
01628      )
01629     )
01630     */
01631
01632     winrt::hstring isInertiaFromImpulseExpression = GetIsInertiaFromImpulseExpression(s_interactionTracker.data());
01633     winrt::hstring expression = StringUtil::FormatString(
01634         L"((!%1!s!&&T.%2!s!>=S&&T.%2!s!<=E)||(%1!s!&&T.%2!s!>=iS&&T.%2!s!<=iE))&&((Floor((T.%2!s!-P)/V)*V+P+aR>=T.%2!s!)||((Ceil((T.%2!s!-P)/V)*V+P-aR<=T.%2!s!)&&(Ceil((T.%2!s!-P)/V)*V+P<=(%1!s!?iE:E))))",
01635         isInertiaFromImpulseExpression.data(),
01636         target.data());
01637
01638     SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH_STR, METH_NAME, this, expression.c_str());
01639
01640     auto conditionExpressionAnimation = interactionTracker.Compositor().CreateExpressionAnimation(expression);
01641
01642     SetScalarParameter(conditionExpressionAnimation, s_interval, static_cast<float>(m_interval));
01643     SetScalarParameter(conditionExpressionAnimation, s_first, static_cast<float>(DetermineFirstRepeatedSnapPointValue()));
01644     SetScalarParameter(conditionExpressionAnimation, s_start, static_cast<float>(m_start));
01645     SetScalarParameter(conditionExpressionAnimation, s_end, static_cast<float>(m_end));
01646     SetScalarParameter(conditionExpressionAnimation, s_applicableRange, static_cast<float>(m_specifiedApplicableRange));
01647     conditionExpressionAnimation.SetReferenceParameter(s_interactionTracker, interactionTracker);
01648
01649     UpdateConditionalExpressionAnimationForImpulse(
01650         conditionExpressionAnimation,
01651         actualImpulseApplicableZone);
01652
01653     return conditionExpressionAnimation;
01654 }
01655
01656 void RepeatedZoomSnapPoint::UpdateConditionalExpressionAnimationForImpulse(
01657     winrt::ExpressionAnimation const& conditionExpressionAnimation,
01658     std::tuple<double, double> actualImpulseApplicableZone) const
01659 {
01660     SetScalarParameter(conditionExpressionAnimation, s_impulseStart, static_cast<float>(std::get<0>(actualImpulseApplicableZone)));
01661     SetScalarParameter(conditionExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
01662 }
01663
01664 void RepeatedZoomSnapPoint::UpdateRestingPointExpressionAnimationForImpulse(
01665     winrt::ExpressionAnimation const& restingValueExpressionAnimation,
01666     double ignoredValue,
01667     std::tuple<double, double> actualImpulseApplicableZone) const
01668 {
01669     SetScalarParameter(restingValueExpressionAnimation, s_impulseEnd, static_cast<float>(std::get<1>(actualImpulseApplicableZone)));
01670     SetScalarParameter(restingValueExpressionAnimation, s_impulseIgnoredValue, static_cast<float>(ignoredValue));
01671 }
01672
01673 SnapPointSortPredicate RepeatedZoomSnapPoint::SortPredicate() const
01674 {
01675     // Repeated snap points should be sorted after irregular snap points, so give it a tertiary sort value of 1 (irregular snap points get 0)
01676     return SnapPointSortPredicate{ m_start, m_end, 1 };
01677 }
01678
01679 std::tuple<double, double> RepeatedZoomSnapPoint::DetermineActualApplicableZone(
01680     const SnapPointBase* previousSnapPoint,
01681     const SnapPointBase* nextSnapPoint)
01682 {
01683     std::tuple<double, double> actualApplicableZoneReturned = std::make_tuple(
01684         DetermineMinActualApplicableZone(previousSnapPoint),
01685         DetermineMaxActualApplicableZone(nextSnapPoint));
01686
01687     // Influence() will not have thrown if either of the adjacent snap points are also repeated snap points which have the same start and end, however this is not allowed.
01688     // We only need to check the nextSnapPoint because of the symmetry in the algorithm.
01689     if (nextSnapPoint && *static_cast<SnapPointBase*>(this) == (nextSnapPoint))
01690     {
01691         // TODO: Provide custom error message
01692         throw winrt::hresult_error(E_INVALIDARG);
01693     }
01694
01695     return actualApplicableZoneReturned;
01696 }
01697
01698 std::tuple<double, double> RepeatedZoomSnapPoint::DetermineActualImpulseApplicableZone(
01699     const SnapPointBase* previousSnapPoint,
01700     const SnapPointBase* nextSnapPoint,
01701     double currentIgnoredValue,
01702     double previousIgnoredValue,
01703     double nextIgnoredValue)
01704 {
01705     return std::make_tuple(
01706         DetermineMinActualImpulseApplicableZone(
01707             previousSnapPoint,
01708             currentIgnoredValue,
01709             previousIgnoredValue),
01710         DetermineMaxActualImpulseApplicableZone(
01711             nextSnapPoint,
01712             currentIgnoredValue,
01713             nextIgnoredValue));
01714 }
01715
01716 double RepeatedZoomSnapPoint::DetermineFirstRepeatedSnapPointValue() const
01717 {
01718     MUX_ASSERT(m_offset >= m_start);
01719     MUX_ASSERT(m_interval > 0.0);
01720
01721     return m_offset - std::floor((m_offset - m_start) / m_interval) * m_interval;
01722 }
01723
01724 double RepeatedZoomSnapPoint::DetermineLastRepeatedSnapPointValue() const
01725 {
01726     MUX_ASSERT(m_offset <= m_end);
01727     MUX_ASSERT(m_interval > 0.0);
01728
01729     return m_offset + std::floor((m_end - m_offset) / m_interval) * m_interval;
01730 }
01731
01732 double RepeatedZoomSnapPoint::DetermineMinActualApplicableZone(
01733     const SnapPointBase* previousSnapPoint) const
01734 {
01735     // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
01736     // This call will ensure that we are not in the range of the previous snap point if it is.
01737     if (previousSnapPoint)
01738     {
01739         previousSnapPoint->Influence(m_start);
01740     }
01741     return m_start;
01742 }
01743
01744 double RepeatedZoomSnapPoint::DetermineMinActualImpulseApplicableZone(
01745     const SnapPointBase* previousSnapPoint,
01746     double currentIgnoredValue,
01747     double previousIgnoredValue) const
01748 {
01749     if (previousSnapPoint)
01750     {
01751         if (currentIgnoredValue == DetermineFirstRepeatedSnapPointValue())
01752         {
01753             return currentIgnoredValue;
01754         }
01755
01756         if (!isnan(previousIgnoredValue))
01757         {
01758             return previousSnapPoint->ImpulseInfluence(m_start, previousIgnoredValue);
01759         }
01760     }
01761     return m_start;
01762 }
01763
01764 double RepeatedZoomSnapPoint::DetermineMaxActualApplicableZone(
01765     const SnapPointBase* nextSnapPoint) const
01766 {
01767     // The Influence() method of repeated snap points has a check to ensure the value does not fall within its range.
01768     // This call will ensure that we are not in the range of the next snap point if it is.
01769     if (nextSnapPoint)
01770     {
01771         nextSnapPoint->Influence(m_end);
01772     }
01773     return m_end;
01774 }
01775
01776 double RepeatedZoomSnapPoint::DetermineMaxActualImpulseApplicableZone(
01777     const SnapPointBase* nextSnapPoint,
01778     double currentIgnoredValue,
01779     double nextIgnoredValue) const
01780 {
01781     if (nextSnapPoint)
01782     {
01783         if (currentIgnoredValue == DetermineLastRepeatedSnapPointValue())
01784         {
01785             return currentIgnoredValue;
01786         }
01787
01788         if (!isnan(nextIgnoredValue))
01789         {
01790             return nextSnapPoint->ImpulseInfluence(m_end, nextIgnoredValue);
01791         }
01792     }
01793     return m_end;
01794 }
01795
01796 void RepeatedZoomSnapPoint::ValidateConstructorParameters(
01797 #ifdef ApplicableRangeType
01798     bool applicableRangeToo,
01799     double applicableRange,
01800 #endif
01801     double offset,
01802     double interval,
01803     double start,
01804     double end) const
01805 {
01806     if (end <= start)
01807     {
01808         throw winrt::hresult_invalid_argument(L"'end' must be greater than 'start'.");
01809     }
01810
01811     if (offset < start)
01812     {
01813         throw winrt::hresult_invalid_argument(L"'offset' must be greater than or equal to 'start'.");
01814     }
01815
01816     if (offset > end)
01817     {
01818         throw winrt::hresult_invalid_argument(L"'offset' must be smaller than or equal to 'end'.");
01819     }
01820
01821     if (interval <= 0)
01822     {
01823         throw winrt::hresult_invalid_argument(L"'interval' must be strictly positive.");
01824     }
01825
01826 #ifdef ApplicableRangeType
01827     if (applicableRangeToo && applicableRange <= 0)
01828     {
01829         throw winrt::hresult_invalid_argument(L"'applicableRange' must be strictly positive.");
01830     }
01831 #endif
01832 }
01833
01834 double RepeatedZoomSnapPoint::Influence(double edgeOfMidpoint) const
01835 {
01836     if (edgeOfMidpoint <= m_start)
01837     {
01838         return m_start;
01839     }
01840     else if (edgeOfMidpoint >= m_end)
01841     {
01842         return m_end;
01843     }
01844     else
01845     {
01846         // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
01847         // TODO: Provide custom error message
01848         throw winrt::hresult_error(E_INVALIDARG);
01849     }
01850     return 0.0;
01851 }
01852
01853 double RepeatedZoomSnapPoint::ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const
01854 {
01855     if (edgeOfMidpoint <= m_start)
01856     {
01857         if (ignoredValue == DetermineFirstRepeatedSnapPointValue())
01858         {
01859             return ignoredValue;
01860         }
01861         return m_start;
01862     }
01863     else if (edgeOfMidpoint >= m_end)
01864     {
01865         if (ignoredValue == DetermineLastRepeatedSnapPointValue())
01866         {
01867             return ignoredValue;
01868         }
01869         return m_end;
01870     }
01871     else
01872     {
01873         MUX_ASSERT(false);
01874         return 0.0;
01875     }
01876 }
01877
01878 void RepeatedZoomSnapPoint::Combine(
01879     int& combinationCount,
01880     winrt::SnapPointBase const& snapPoint) const
01881 {
01882     // Snap points are not allowed within the bounds (Start thru End) of repeated snap points
01883     // TODO: Provide custom error message
01884     throw winrt::hresult_error(E_INVALIDARG);
01885 }
01886
01887 int RepeatedZoomSnapPoint::SnapCount() const
01888 {
01889     return static_cast<int>((m_end - m_start) / m_interval);
01890 }
01891
01892 double RepeatedZoomSnapPoint::Evaluate(
01893     std::tuple<double, double> actualApplicableZone,
01894     double value) const
01895 {
01896     if (value >= m_start && value <= m_end)
01897     {
01898         const double firstSnapPointValue = DetermineFirstRepeatedSnapPointValue();
01899         const double passedSnapPoints = std::floor((value - firstSnapPointValue) / m_interval);
01900         const double previousSnapPointValue = (passedSnapPoints * m_interval) + firstSnapPointValue;
01901         const double nextSnapPointValue = previousSnapPointValue + m_interval;
01902
01903         if ((value - previousSnapPointValue) <= (nextSnapPointValue - value))
01904         {
01905             if (previousSnapPointValue + m_specifiedApplicableRange >= value)
01906             {
01907                 return previousSnapPointValue;
01908             }
01909         }
01910         else
01911         {
01912             if (nextSnapPointValue - m_specifiedApplicableRange <= value)
01913             {
01914                 return nextSnapPointValue;
01915             }
01916         }
01917     }
01918     return value;
01919 }
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/TestUI/PipsPagerPage.xaml.cs Source File

  • File List
  • File Members
  • PipsPager
  • TestUI

PipsPagerPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Microsoft.UI.Xaml.Controls;
00006 using System.Collections.Generic;
00007 using System.Linq;
00008 using PipsPagerButtonVisibility = Microsoft.UI.Xaml.Controls.PipsPagerButtonVisibility;
00009 using PipsPagerSelectedIndexChangedEventArgs = Microsoft.UI.Xaml.Controls.PipsPagerSelectedIndexChangedEventArgs;
00010 using Microsoft.UI.Xaml;
00011 using Microsoft.UI.Xaml.Media;
00012 using Microsoft.UI.Xaml.Controls;
00013 using MUXControlsTestApp.Utilities;
00014
00015 namespace MUXControlsTestApp
00016 {
00017     [TopLevelTestPage(Name = "PipsPager")]
00018     public sealed partial class PipsPagerPage : TestPage
00019     {
00020         Button previousPageButton;
00021         Button nextPageButton;
00022         ItemsRepeater repeater;
00023         ItemsRepeater verticalOrientationPipsPagerRepeater;
00024
00025         public List<string> Pictures = new List<string>()
00026         {
00027             "Assets/ingredient1.png",
00028             "Assets/ingredient2.png",
00029             "Assets/ingredient3.png",
00030             "Assets/ingredient4.png",
00031             "Assets/ingredient5.png",
00032             "Assets/ingredient6.png",
00033             "Assets/ingredient7.png",
00034             "Assets/ingredient8.png",
00035         };
00036
00037         public PipsPagerPage()
00038         {
00039             this.InitializeComponent();
00040             this.Loaded += OnLoad;
00041         }
00042
00043         private void OnLoad(object sender, RoutedEventArgs args)
00044         {
00045             var rootPanel = VisualTreeHelper.GetChild(TestPipsPager, 0);
00046             previousPageButton = VisualTreeHelper.GetChild(rootPanel, 0) as Button;
00047             nextPageButton = VisualTreeHelper.GetChild(rootPanel, 2) as Button;
00048             repeater = rootPanel.FindVisualChildByType<ItemsRepeater>();
00049             var rootPanelVerticalPipsPager = VisualTreeHelper.GetChild(TestPipsPagerVerticalOrientation, 0);
00050             verticalOrientationPipsPagerRepeater = rootPanelVerticalPipsPager.FindVisualChildByType<ItemsRepeater>();
00051
00052
00053             PreviousPageButtonVisibilityComboBox.SelectionChanged += OnPreviousPageButtonVisibilityChanged;
00054             NextPageButtonVisibilityComboBox.SelectionChanged += OnNextPageButtonVisibilityChanged;
00055             TestPipsPagerNumberOfPagesComboBox.SelectionChanged += OnNumberOfPagesChanged;
00056             TestPipsPagerMaxVisiblePipsComboBox.SelectionChanged += OnMaxVisiblePipsChanged;
00057             TestPipsPagerOrientationComboBox.SelectionChanged += OnOrientationChanged;
00058             TestPipsPagerWrapModeComboBox.SelectionChanged += OnWrapModeChanged;
00059             TestPipsPager.PointerEntered += TestPipsPager_PointerEntered;
00060             TestPipsPager.PointerExited += TestPipsPager_PointerExited;
00061             TestPipsPager.GotFocus += TestPipsPager_GotFocus;
00062             TestPipsPager.LostFocus += TestPipsPager_LostFocus;
00063             TestPipsPager.PointerCanceled += TestPipsPager_PointerCanceled;
00064             previousPageButton.IsEnabledChanged += OnButtonEnabledChanged;
00065             nextPageButton.IsEnabledChanged += OnButtonEnabledChanged;
00066             repeater.GotFocus += OnRepeaterGotFocus;
00067
00068
00069             PreviousPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(previousPageButton);
00070             NextPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(nextPageButton);
00071
00072             PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
00073             NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;
00074
00075             CurrentNumberOfPagesTextBlock.Text = GetNumberOfPages();
00076             CurrentMaxVisiblePipsTextBlock.Text = $"Current max visual indicators: {TestPipsPager.MaxVisiblePips}";
00077             CurrentOrientationTextBlock.Text = GetCurrentOrientation();
00078         }
00079
00080         private void SkipToLastPage(object sender, RoutedEventArgs args)
00081         {
00082             TestPipsPager.SelectedPageIndex = TestPipsPager.NumberOfPages - 1;
00083         }
00084
00085         private void SkipToFirstPage(object sender, RoutedEventArgs args)
00086         {
00087             TestPipsPager.SelectedPageIndex = 0;
00088         }
00089
00090         private void OnGetPipsPagerButtonSizesClicked(object sender, RoutedEventArgs args)
00091         {
00092             //Button horizontalOrientationButton;
00093             if (repeater.TryGetElement(0) as FrameworkElement is var horizontalOrientationPip && horizontalOrientationPip != null)
00094             {
00095                 HorizontalOrientationPipsPagerButtonWidthTextBlock.Text = $"{ horizontalOrientationPip.ActualWidth}";
00096                 HorizontalOrientationPipsPagerButtonHeightTextBlock.Text = $"{horizontalOrientationPip.ActualHeight}";
00097             }
00098             if (verticalOrientationPipsPagerRepeater.TryGetElement(1) as FrameworkElement is var verticalOrientationPip && verticalOrientationPip != null)
00099             {
00100                 VerticalOrientationPipsPagerButtonWidthTextBlock.Text = $"{verticalOrientationPip.ActualWidth}";
00101                 VerticalOrientationPipsPagerButtonHeightTextBlock.Text = $"{verticalOrientationPip.ActualHeight}";
00102             }
00103         }
00104
00105         private void OnRepeaterGotFocus(object sender, RoutedEventArgs e)
00106         {
00107             FocusedPageIndexTextBlock.Text = $"Current focused page index: {repeater.GetElementIndex((UIElement)e.OriginalSource).ToString()}";
00108         }
00109
00110         private void OnButtonEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
00111         {
00112             if (sender == previousPageButton)
00113             {
00114                 PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
00115             }
00116             else
00117             {
00118                 NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;
00119             }
00120         }
00121
00122         private string GetCurrentOrientation()
00123         {
00124             return $"Current orientation is: {TestPipsPager.Orientation}";
00125         }
00126
00127         private string GetNumberOfPages()
00128         {
00129             string prefix = "Current number of pages: ";
00130             int numberOfPages = TestPipsPager.NumberOfPages;
00131             return numberOfPages > 0 ? $"{prefix}{numberOfPages}" : $"{prefix}Inifinite";
00132         }
00133         private bool IsButtonVisible(Button btn)
00134         {
00135             return btn?.Visibility == Visibility.Visible && btn?.Opacity != 0;
00136         }
00137
00138         private void UpdateButtonVisibilityCheckboxes()
00139         {
00140             PreviousPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(previousPageButton);
00141             NextPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(nextPageButton);
00142         }
00143
00144         private void TestPipsPager_GotFocus(object sender, RoutedEventArgs e)
00145         {
00146             UpdateButtonVisibilityCheckboxes();
00147         }
00148
00149         private void TestPipsPager_LostFocus(object sender, RoutedEventArgs e)
00150         {
00151             UpdateButtonVisibilityCheckboxes();
00152         }
00153
00154         private void TestPipsPager_PointerCanceled(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
00155         {
00156             UpdateButtonVisibilityCheckboxes();
00157         }
00158
00159         private void TestPipsPager_PointerExited(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
00160         {
00161             UpdateButtonVisibilityCheckboxes();
00162         }
00163
00164         private void TestPipsPager_PointerEntered(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
00165         {
00166             UpdateButtonVisibilityCheckboxes();
00167         }
00168
00169         public void OnPreviousPageButtonVisibilityChanged(object sender, SelectionChangedEventArgs e)
00170         {
00171             TestPipsPager.PreviousButtonVisibility = ConvertComboBoxItemToVisibilityEnum((sender as ComboBox).SelectedItem as ComboBoxItem, TestPipsPager.PreviousButtonVisibility);
00172             UpdateButtonVisibilityCheckboxes();
00173         }
00174         public void OnNextPageButtonVisibilityChanged(object sender, SelectionChangedEventArgs e)
00175         {
00176             TestPipsPager.NextButtonVisibility = ConvertComboBoxItemToVisibilityEnum((sender as ComboBox).SelectedItem as ComboBoxItem, TestPipsPager.NextButtonVisibility);
00177             UpdateButtonVisibilityCheckboxes();
00178         }
00179         public void OnNumberOfPagesChanged(object sender, SelectionChangedEventArgs e)
00180         {
00181             TestPipsPager.NumberOfPages = ConvertComboBoxItemToNumberOfPages((sender as ComboBox).SelectedItem as ComboBoxItem);
00182             CurrentNumberOfPagesTextBlock.Text = GetNumberOfPages();
00183         }
00184         public void OnMaxVisiblePipsChanged(object sender, SelectionChangedEventArgs e)
00185         {
00186             TestPipsPager.MaxVisiblePips = ConvertComboBoxItemToNumberOfPages((sender as ComboBox).SelectedItem as ComboBoxItem);
00187             CurrentMaxVisiblePipsTextBlock.Text = $"Current max visual indicators: {TestPipsPager.MaxVisiblePips}";
00188         }
00189
00190         public void OnSelectedIndexChanged(PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args)
00191         {
00192             PreviousPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(previousPageButton);
00193             NextPageButtonIsVisibleCheckBox.IsChecked = IsButtonVisible(nextPageButton);
00194
00195             PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled;
00196             NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled;
00197
00198             CurrentPageIndexTextBlock.Text = $"Current index is: {sender.SelectedPageIndex}";
00199         }
00200
00201         public void OnOrientationChanged(object sender, SelectionChangedEventArgs e)
00202         {
00203             Orientation orientation = TestPipsPager.Orientation;
00204             string selectedItem = ((sender as ComboBox).SelectedItem as ComboBoxItem).Content as string;
00205             if (!Enum.TryParse<Orientation>(selectedItem, out orientation))
00206             {
00207                 System.Diagnostics.Debug.WriteLine("Unable to convert " + selectedItem + " to Orientation Enum");
00208             }
00209             TestPipsPager.Orientation = orientation;
00210             CurrentOrientationTextBlock.Text = GetCurrentOrientation();
00211         }
00212
00213         public void OnWrapModeChanged(object sender, SelectionChangedEventArgs e)
00214         {
00215             TestPipsPager.WrapMode = (sender as ComboBox).SelectedIndex == 0 ? PipsPagerWrapMode.None : PipsPagerWrapMode.Wrap;
00216         }
00217
00218         private PipsPagerButtonVisibility ConvertComboBoxItemToVisibilityEnum(ComboBoxItem item, PipsPagerButtonVisibility defaultValue)
00219         {
00220             PipsPagerButtonVisibility newVisibility = defaultValue;
00221             string selectedItem = item.Content as string;
00222             if (!Enum.TryParse<PipsPagerButtonVisibility>(selectedItem, out newVisibility))
00223             {
00224                 System.Diagnostics.Debug.WriteLine("Unable to convert " + selectedItem + " to PipsPagerButtonVisibility Enum");
00225             }
00226
00227             return newVisibility;
00228         }
00229         private int ConvertComboBoxItemToNumberOfPages(ComboBoxItem item)
00230         {
00231             int numberOfPages = -1;
00232             string digitsOnlyString = new String((item.Content as string).Where(Char.IsDigit).ToArray());
00233             if (!string.IsNullOrEmpty(digitsOnlyString))
00234             {
00235                 Int32.TryParse(digitsOnlyString, out numberOfPages);
00236             }
00237             return numberOfPages;
00238         }
00239
00240         private void GoToExamplesPage(object sender, RoutedEventArgs args)
00241         {
00242             Frame.NavigateWithoutAnimation(typeof(PipsPagerExamples));
00243         }
00244     }
00245 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/RevealTestApi.h Source File

  • File List
  • File Members
  • Lights

RevealTestApi.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "RevealTestApi.g.h"
00007
00008 class RevealTestApi :
00009     public ReferenceTracker<RevealTestApi, winrt::implementation::RevealTestApiT, winrt::composable>
00010 {
00011 public:
00012     winrt::ApplicationTheme TargetTheme();
00013     void TargetTheme(winrt::ApplicationTheme const& value);
00014     winrt::SpotLight BackgroundLight();
00015     winrt::XamlLight BorderLight();
00016     winrt::XamlLight BorderWideLight();
00017
00018     double BackgroundLightMinSize();
00019     void BackgroundLightMinSize(double value);
00020     double BackgroundLightMaxSize();
00021     void BackgroundLightMaxSize(double value);
00022
00023     winrt::SpotLight GetSpotLight(winrt::XamlLight const& value);
00024     winrt::ExpressionAnimation GetHoverLightOffsetExpression(winrt::RevealHoverLight const& value);
00025     winrt::RevealBorderLight GetAsRevealBorderLight(winrt::XamlLight const& value);
00026     winrt::RevealHoverLight GetAsRevealHoverLight(winrt::XamlLight const& value);
00027
00028     bool BorderLight_ShouldBeOn(winrt::RevealBorderLight const& value);
00029     bool HoverLight_ShouldBeOn(winrt::RevealHoverLight const& value);
00030     bool HoverLight_IsPressed(winrt::RevealHoverLight const& value);
00031     bool HoverLight_IsPointerOver(winrt::RevealHoverLight const& value);
00032
00033     RevealTestApi();
00034
00035     static winrt::SpotLight GetBackgroundSpotlightProxy(winrt::ApplicationTheme theme);
00036
00037 private:
00038 #if DBG
00039     static winrt::ICoreWindow::PointerMoved_revoker s_pointerMovedRevoker;
00040     static winrt::SpotLight s_backgroundSpotlightProxy[2];
00041 #endif
00042
00043     winrt::XamlLight GetWindowLightAt(uint32_t i);
00044
00045     winrt::ApplicationTheme m_targetTheme{};
00046 };
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/InteractionTests/AutoSuggestBoxTests.cs Source File

  • File List
  • File Members
  • AutoSuggestBox
  • InteractionTests

AutoSuggestBoxTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using Common;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00015 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00016 using MUXTestInfra.Shared.Infra;
00017
00018 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00019 {
00020     [TestClass]
00021     public class AutoSuggestBox
00022     {
00023         [ClassInitialize]
00024         [TestProperty("RunAs", "User")]
00025         [TestProperty("Classification", "Integration")]
00026         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00027         public static void ClassInitialize(TestContext testContext)
00028         {
00029             TestEnvironment.Initialize(testContext);
00030         }
00031
00032         [TestCleanup]
00033         public void TestCleanup()
00034         {
00035             TestCleanupHelper.Cleanup();
00036         }
00037
00038         [TestMethod]
00039         public void CanSelectSuggestion()
00040         {
00041             using (var setup = new TestSetupHelper("AutoSuggestBox Tests"))
00042             {
00043                 Edit autoSuggestBoxTextBox = new Edit(FindElement.ByNameAndClassName("AutoSuggestBox with suggestions", "TextBox"));
00044                 FocusHelper.SetFocus(autoSuggestBoxTextBox);
00045                 KeyboardHelper.EnterText(autoSuggestBoxTextBox, "test");
00046                 KeyboardHelper.PressKey(Key.Enter);
00047                 InvokeImplementation dolorItem = new InvokeImplementation(FindElement.ByNameAndClassName("dolor", "ListViewItem"));
00048
00049                 using (ValueChangedEventWaiter waiter = new ValueChangedEventWaiter(autoSuggestBoxTextBox, "dolor"))
00050                 {
00051                     dolorItem.Invoke();
00052                 }
00053
00054                 Verify.AreEqual("dolor", autoSuggestBoxTextBox.Value);
00055             }
00056         }
00057
00058         [TestMethod]
00059         public void VerifyAxeScanPasses()
00060         {
00061             using (var setup = new TestSetupHelper("AutoSuggestBox-Axe"))
00062             {
00063                 AxeTestHelper.TestForAxeIssues();
00064             }
00065         }
00066     }
00067 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: RadialGradientBrush/InteractionTests/RadialGradientBrushTests.cs Source File

  • File List
  • File Members
  • RadialGradientBrush
  • InteractionTests

RadialGradientBrushTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using Common;
00006 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using System.Collections.Generic;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class RadialGradientBrushTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("Platform", "Any")]
00029         [TestProperty("MUXControlsTestSuite", "SuiteB")]
00030         public static void ClassInitialize(TestContext testContext)
00031         {
00032             TestEnvironment.Initialize(testContext);
00033         }
00034
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         [TestMethod]
00041         public void AddGradientStopTest()
00042         {
00043             using (var setup = new TestSetupHelper("RadialGradientBrush Tests"))
00044             {
00045                 Log.Comment("Adding GradientStop to RadialGradientBrush");
00046
00047                 Button replaceGradientButton = FindElement.ByName<Button>("ReplaceGradientButton");
00048                 replaceGradientButton.Invoke();
00049
00050                 TextBlock gradientCountTextBlock = FindElement.ByName<TextBlock>("GradientStopCountText");
00051
00052                 int oldStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);
00053
00054                 Button addGradientStopButton = FindElement.ByName<Button>("AddGradientStopButton");
00055                 addGradientStopButton.Invoke();
00056
00057                 int newStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);
00058
00059                 Verify.IsTrue((newStopCount - oldStopCount) == 1);
00060             }
00061         }
00062
00063         [TestMethod]
00064         public void RemoveGradientStopTest()
00065         {
00066             using (var setup = new TestSetupHelper("RadialGradientBrush Tests"))
00067             {
00068                 Log.Comment("Removing GradientStop from RadialGradientBrush");
00069
00070                 Button replaceGradientButton = FindElement.ByName<Button>("ReplaceGradientButton");
00071                 replaceGradientButton.Invoke();
00072
00073                 TextBlock gradientCountTextBlock = FindElement.ByName<TextBlock>("GradientStopCountText");
00074
00075                 int oldStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);
00076
00077                 Button addGradientStopButton = FindElement.ByName<Button>("RemoveGradientStopButton");
00078                 addGradientStopButton.Invoke();
00079
00080                 int newStopCount = Convert.ToInt32(gradientCountTextBlock.DocumentText);
00081
00082                 if (oldStopCount == 0)
00083                 {
00084                     Verify.IsTrue(newStopCount == 0);
00085                 }
00086                 else
00087                 {
00088                     Verify.IsTrue((oldStopCount - newStopCount) == 1);
00089                 }
00090             }
00091         }
00092
00093         [TestMethod]
00094         public void GradientRenderingTest()
00095         {
00096             using (var setup = new TestSetupHelper("RadialGradientBrush Tests"))
00097             {
00098                 Log.Comment("Testing gradient rendering");
00099
00100                 var resultTextBox = new Edit(FindElement.ByName("ColorMatchTestResult"));
00101
00102                 using (var waiter = new ValueChangedEventWaiter(resultTextBox))
00103                 {
00104                     Button generateRenderTargetBitmapButton = FindElement.ByName<Button>("GenerateRenderTargetBitmapButton");
00105                     generateRenderTargetBitmapButton.Invoke();
00106
00107                     waiter.Wait();
00108                 }
00109
00110                 Verify.AreEqual("Passed", resultTextBox.Value);
00111             }
00112         }
00113     }
00114 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItemAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

TabViewItemAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "TabViewItemAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(TabViewItemAutomationPeer)
00012 }
00013
00014 #include "TabViewItemAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/RecyclePoolFactory.cpp Source File

  • File List
  • File Members
  • Repeater

RecyclePoolFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include <pch.h>
00005 #include <common.h>
00006 #include "ItemsRepeater.common.h"
00007 #include "RecyclePoolFactory.h"
00008 #include "RecyclePool.h"
00009
00010 #ifndef MUX_PRERELEASE
00011 GlobalDependencyProperty RecyclePool::s_PoolInstanceProperty = nullptr;
00012 #endif
00013 GlobalDependencyProperty RecyclePool::s_reuseKeyProperty = nullptr;
00014 GlobalDependencyProperty RecyclePool::s_originTemplateProperty = nullptr;
00015
00016 #pragma region IRecyclePoolStatics
00017
00018 winrt::hstring RecyclePool::GetReuseKey(winrt::UIElement const& element)
00019 {
00020     return auto_unbox(element.GetValue(s_reuseKeyProperty));
00021 }
00022
00023 void RecyclePool::SetReuseKey(winrt::UIElement const& element, winrt::hstring const& value)
00024 {
00025     element.SetValue(s_reuseKeyProperty, box_value(value));
00026 }
00027
00028 #ifdef MUX_PRERELEASE
00029 winrt::RecyclePool RecyclePool::GetPoolInstance(winrt::DataTemplate const& dataTemplate)
00030 {
00031     if (!s_PoolInstanceProperty)
00032     {
00033         EnsureProperties();
00034     }
00035
00036     return RecyclePoolProperties::GetPoolInstance(dataTemplate);
00037 }
00038
00039 void RecyclePool::SetPoolInstance(winrt::DataTemplate const& dataTemplate, winrt::RecyclePool const& value)
00040 {
00041     if (!s_PoolInstanceProperty)
00042     {
00043         EnsureProperties();
00044     }
00045
00046     RecyclePoolProperties::SetPoolInstance(dataTemplate, value);
00047 }
00048 #else
00049 winrt::RecyclePool RecyclePool::GetPoolInstance(winrt::DataTemplate const& dataTemplate)
00050 {
00051     if (!s_PoolInstanceProperty)
00052     {
00053         EnsureProperties();
00054     }
00055
00056     return ValueHelper<winrt::RecyclePool>::CastOrUnbox(dataTemplate.GetValue(s_PoolInstanceProperty));
00057 }
00058
00059 void RecyclePool::SetPoolInstance(winrt::DataTemplate const& dataTemplate, winrt::RecyclePool const& value)
00060 {
00061     if (!s_PoolInstanceProperty)
00062     {
00063         EnsureProperties();
00064     }
00065
00066     dataTemplate.SetValue(s_PoolInstanceProperty, ValueHelper<winrt::RecyclePool>::BoxValueIfNecessary(value));
00067 }
00068 #endif
00069
00070 winrt::DataTemplate RecyclePool::GetOriginTemplate(winrt::UIElement const& element)
00071 {
00072     return auto_unbox(element.GetValue(s_originTemplateProperty));
00073 }
00074
00075 void RecyclePool::SetOriginTemplate(winrt::UIElement const& element, winrt::DataTemplate const& value)
00076 {
00077     element.SetValue(s_originTemplateProperty, box_value(value));
00078 }
00079
00080 #pragma endregion
00081
00082 RecyclePool::RecyclePool()
00083 {
00084     RecyclePool::EnsureProperties();
00085 }
00086
00087 /* static */
00088 void RecyclePool::EnsureProperties()
00089 {
00090 #ifdef MUX_PRERELEASE
00091     RecyclePoolProperties::EnsureProperties();
00092 #else
00093     if (!s_PoolInstanceProperty)
00094     {
00095         s_PoolInstanceProperty =
00096             InitializeDependencyProperty(
00097                 L"PoolInstance",
00098                 winrt::name_of<winrt::IInspectable>(),
00099                 winrt::name_of<winrt::ItemsRepeater>(),
00100                 true /* isAttached */,
00101                 ValueHelper<winrt::RecyclePool>::BoxedDefaultValue(),
00102                 nullptr);
00103     }
00104 #endif
00105
00106     if (s_reuseKeyProperty == nullptr)
00107     {
00108         s_reuseKeyProperty =
00109             InitializeDependencyProperty(
00110                 L"ReuseKey",
00111                 winrt::name_of<hstring>(),
00112 #ifdef MUX_PRERELEASE
00113                 winrt::name_of<winrt::RecyclePool>(),
00114 #else
00115                 winrt::name_of<winrt::ItemsRepeater>(),
00116 #endif
00117                 true /* isAttached */,
00118                 box_value(wstring_view(L"")) /* defaultValue */,
00119                 nullptr /* propertyChangedCallback */);
00120     }
00121
00122     if (s_originTemplateProperty == nullptr)
00123     {
00124         s_originTemplateProperty =
00125             InitializeDependencyProperty(
00126                 L"OriginTemplate",
00127                 winrt::name_of<winrt::DataTemplate>(),
00128 #ifdef MUX_PRERELEASE
00129                 winrt::name_of<winrt::RecyclePool>(),
00130 #else
00131                 winrt::name_of<winrt::IInspectable>(),
00132 #endif
00133                 true /* isAttached */,
00134                 nullptr /* defaultValue */,
00135                 nullptr /* propertyChangedCallback */);
00136     }
00137 }
00138
00139 /* static */
00140 void RecyclePool::ClearProperties()
00141 {
00142     s_reuseKeyProperty = nullptr;
00143     s_originTemplateProperty = nullptr;
00144 #ifndef MUX_PRERELEASE
00145     s_PoolInstanceProperty = nullptr;
00146 #else
00147     RecyclePoolProperties::ClearProperties();
00148 #endif
00149 }
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ToggleSplitButton Member List

This is the complete list of members for ToggleSplitButton, including all inherited members.
ClearProperties() | ToggleSplitButtonProperties | [static]
EnsureProperties() | ToggleSplitButtonProperties | [static]
ForwardRefToBaseReferenceTracker(SplitButton) ToggleSplitButton() | ToggleSplitButton |
InternalIsChecked() override | ToggleSplitButton |
IsChecked(bool value) | ToggleSplitButtonProperties |
IsChecked() | ToggleSplitButtonProperties |
IsCheckedChanged(winrt::TypedEventHandler< winrt::ToggleSplitButton, winrt::ToggleSplitButtonIsCheckedChangedEventArgs > const &value) | ToggleSplitButtonProperties |
IsCheckedChanged(winrt::event_token const &token) | ToggleSplitButtonProperties |
IsCheckedProperty() | ToggleSplitButtonProperties | [inline, static]
m_isCheckedChangedEventSource | ToggleSplitButtonProperties |
OnApplyTemplate() | ToggleSplitButton |
OnClickPrimary(const winrt::IInspectable &sender, const winrt::RoutedEventArgs &args) override | ToggleSplitButton |
OnCreateAutomationPeer() override | ToggleSplitButton |
OnIsCheckedChanged() | ToggleSplitButton | [private]
OnIsCheckedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ToggleSplitButtonProperties | [static]
OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &args) | ToggleSplitButton |
s_IsCheckedProperty | ToggleSplitButtonProperties | [static]
Toggle() | ToggleSplitButton |
ToggleSplitButtonProperties() | ToggleSplitButtonProperties |
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PipsPager/TestUI/PipsPagerExamples.xaml.cs Source File

  • File List
  • File Members
  • PipsPager
  • TestUI

PipsPagerExamples.xaml.cs

Go to the documentation of this file.
00001 ﻿using System;
00002 using Microsoft.UI.Xaml.Controls;
00003 using System.Collections.Generic;
00004 using System.Linq;
00005 using PipsPagerSelectedIndexChangedEventArgs = Microsoft.UI.Xaml.Controls.PipsPagerSelectedIndexChangedEventArgs;
00006 using PipsPager = Microsoft.UI.Xaml.Controls.PipsPager;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Media;
00009 using System.Collections.ObjectModel;
00010 using Microsoft.UI.Xaml.Media.Imaging;
00011 using Windows.Foundation;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     public sealed partial class PipsPagerExamples : Page
00016     {
00017         private int MinRowSpacing = 8;
00018         private int TotalNumberOfDisplayedObjects = 50;
00019         private double ButtonListPreviousOffset = 0.0;
00020         private double PersonInfoListPreviousOffset = 0.0;
00021         private ScrollViewer PersonInfoListScrollViewer;
00022         public List<string> Pictures = new List<string>()
00023         {
00024
00025             "Assets/ingredient1.png",
00026             "Assets/ingredient2.png",
00027             "Assets/ingredient3.png",
00028             "Assets/ingredient4.png",
00029             "Assets/ingredient5.png",
00030             "Assets/ingredient6.png",
00031             "Assets/ingredient7.png",
00032             "Assets/ingredient8.png",
00033         };
00034
00035         public PipsPagerExamples()
00036         {
00037             this.InitializeComponent();
00038             PersonInfoList.ItemsSource = CreatePersonInfoList();
00039             ButtonListRepeater.ItemsSource = CreateButtonListItems();
00040             this.Loaded += OnLoaded;
00041         }
00042
00043         private void OnLoaded(object sender, RoutedEventArgs e)
00044         {
00045             ButtonListPager.NumberOfPages = (int)Math.Ceiling(ButtonListScrollViewer.ExtentHeight / ButtonListScrollViewer.ViewportHeight);
00046             SetButtonListRepeaterSize();
00047             PersonInfoListScrollViewer = FindInnerScrollViewer(PersonInfoList);
00048             PersonInfoListScrollViewer.ViewChanged += PersonInfoList_ViewChanged;
00049             PersonInfoListPager.NumberOfPages = (int)Math.Ceiling(PersonInfoListScrollViewer.ExtentHeight / PersonInfoListScrollViewer.ViewportHeight);
00050         }
00051
00052         private void SetButtonListRepeaterSize()
00053         {
00054             DataTemplate dt = ButtonListRepeater.ItemTemplate as DataTemplate;
00055             Image img = VisualTreeHelper.GetChild(dt.LoadContent() as StackPanel, 0) as Image;
00056             img.Source = new BitmapImage(new Uri("ms-appx:/Assets/ingredient1.png"));
00057             img.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
00058             var numberOfPages = (int)Math.Ceiling(ButtonListScrollViewer.ExtentHeight / ButtonListScrollViewer.ViewportHeight);
00059             ButtonListRepeater.Height = ButtonListScrollViewer.ViewportHeight * numberOfPages + MinRowSpacing * (numberOfPages - 1); ;
00060         }
00061
00062         private void PersonInfoListPager_SelectedIndexChanged(PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args)
00063         {
00064             if (PersonInfoListScrollViewer != null)
00065             {
00066                 PersonInfoListScrollViewer.ChangeView(null, sender.SelectedPageIndex * PersonInfoListScrollViewer.ViewportHeight, null);
00067             }
00068         }
00069
00070         private void PersonInfoList_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
00071         {
00072             if (!e.IsIntermediate)
00073             {
00074                 OnViewChanged(PersonInfoListScrollViewer, PersonInfoListPager, ref PersonInfoListPreviousOffset);
00075             }
00076         }
00077
00078         private void ButtonListScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
00079         {
00080             if (!e.IsIntermediate)
00081             {
00082                 OnViewChanged(ButtonListScrollViewer, ButtonListPager, ref ButtonListPreviousOffset, MinRowSpacing);
00083             }
00084         }
00085
00086         private void ButtonListPager_SelectedIndexChanged(PipsPager sender, PipsPagerSelectedIndexChangedEventArgs args)
00087         {
00088             ButtonListScrollViewer.ChangeView(null, sender.SelectedPageIndex * (ButtonListScrollViewer.ViewportHeight + MinRowSpacing), null);
00089         }
00090
00091         private ObservableCollection<PersonInfo> CreatePersonInfoList()
00092         {
00093             ObservableCollection<PersonInfo> items = new ObservableCollection<PersonInfo>();
00094             for (int i = 0; i < 15; i++)
00095             {
00096                 items.Add(new PersonInfo($"RandomName{i}", $"RandomSurname{i}"));
00097             }
00098             return items;
00099         }
00100
00101         private string[] CreateButtonListItems()
00102         {
00103             var rnd = new Random();
00104             var items = new string[TotalNumberOfDisplayedObjects];
00105             for (int i = 0; i < TotalNumberOfDisplayedObjects; i++)
00106             {
00107                 items[i] = $"Assets/ingredient{rnd.Next(1, 100) % 4 + 1}.png";
00108             }
00109             return items;
00110         }
00111
00112         private ScrollViewer FindInnerScrollViewer(ListView lv)
00113         {
00114             Panel p = lv.ItemsPanelRoot;
00115             UIElement parent = VisualTreeHelper.GetParent(p) as UIElement;
00116             while (parent != null && !(parent is ScrollViewer))
00117                 parent = VisualTreeHelper.GetParent(parent) as UIElement;
00118
00119             return parent as ScrollViewer;
00120         }
00121
00122         private void OnViewChanged(ScrollViewer sv, PipsPager pager, ref double previousVerticalOffset, double rowSpacing = 0.0)
00123         {
00124             var newVerticalOffset = sv.VerticalOffset;
00125
00126             if (newVerticalOffset <= previousVerticalOffset)
00127             {
00128                 pager.SelectedPageIndex = (int)Math.Floor(sv.VerticalOffset / (sv.ViewportHeight + rowSpacing));
00129             }
00130             else
00131             {
00132                 pager.SelectedPageIndex = (int)Math.Ceiling(sv.VerticalOffset / (sv.ViewportHeight + rowSpacing));
00133             }
00134
00135             previousVerticalOffset = newVerticalOffset;
00136         }
00137     }
00138
00139     public class PersonInfo
00140     {
00141         public PersonInfo(string name, string surname)
00142         {
00143             FullName = $"{name} {surname}";
00144             Initials = $"{Char.ToUpper(name.ElementAtOrDefault(0))}{Char.ToUpper(surname.ElementAtOrDefault(0))}";
00145         }
00146
00147         public string FullName { get; set; }
00148         public string Initials { get; set; }
00149     }
00150 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

VariableSizedItemsPage Member List

This is the complete list of members for VariableSizedItemsPage, including all inherited members.
AppendEventMessage(string message) | VariableSizedItemsPage | [inline, private]
BtnClearEvents_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetItemsRepeaterVerticalCacheLength_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerChangeViewVerticalOffset_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerChangeViewVerticalScrollPercentage_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerExtentHeight_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerScrollableHeight_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerVerticalOffset_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerVerticalScrollPercentage_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnGetScrollerZoomFactor_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnScrollerChangeViewToVerticalOffset_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnScrollerChangeViewToVerticalOffsetWithAnimation_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnScrollerChangeViewToVerticalScrollPercentage_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnScrollerChangeViewToVerticalScrollPercentageWithAnimation_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnScrollerChangeViewToZoomFactor_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnScrollerChangeViewToZoomFactorWithAnimation_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnSetItemsRepeaterVerticalCacheLength_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnSetScrollerVerticalAnchorRatio_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnSwitchScroller_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
BtnSwitchVariability_Click(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
CmbItemsRepeaterHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | VariableSizedItemsPage | [inline, private]
CmbItemsRepeaterVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e) | VariableSizedItemsPage | [inline, private]
ConvertFromStringToVector2(string value) | VariableSizedItemsPage | [inline, private]
HookScrollersEvents() | VariableSizedItemsPage | [inline, private]
m_changeViewToVerticalOffsetWithAnimationCorrelationId | VariableSizedItemsPage | [private]
m_changeViewToVerticalScrollPercentageWithAnimationCorrelationId | VariableSizedItemsPage | [private]
m_extentHeight | VariableSizedItemsPage | [private]
OnNavigatedFrom(NavigationEventArgs e) | VariableSizedItemsPage | [inline, protected]
ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args) | VariableSizedItemsPage | [inline, private]
ScrollView_ViewChanged(ScrollView sender, object args) | VariableSizedItemsPage | [inline, private]
ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs args) | VariableSizedItemsPage | [inline, private]
ScrollViewer_ViewChanging(object sender, ScrollViewerViewChangingEventArgs args) | VariableSizedItemsPage | [inline, private]
ScrollViewerViewToString(ScrollViewerView scrollViewerView) | VariableSizedItemsPage | [inline, private]
UnhookScrollersEvents() | VariableSizedItemsPage | [inline, private]
UpdateCmbItemsRepeaterHorizontalAlignment() | VariableSizedItemsPage | [inline, private]
UpdateCmbItemsRepeaterVerticalAlignment() | VariableSizedItemsPage | [inline, private]
UpdateExtentHeight() | VariableSizedItemsPage | [inline, private]
UpdateItemsRepeaterVerticalCacheLength() | VariableSizedItemsPage | [inline, private]
UpdateScrollerChangeViewVerticalScrollPercentage() | VariableSizedItemsPage | [inline, private]
UpdateScrollerExtentHeight() | VariableSizedItemsPage | [inline, private]
UpdateScrollerScrollableHeight() | VariableSizedItemsPage | [inline, private]
UpdateScrollerVerticalAnchorRatio() | VariableSizedItemsPage | [inline, private]
UpdateScrollerVerticalOffset() | VariableSizedItemsPage | [inline, private]
UpdateScrollerVerticalScrollPercentage() | VariableSizedItemsPage | [inline, private]
UpdateScrollerZoomFactor() | VariableSizedItemsPage | [inline, private]
VariableSizedItemsPage() | VariableSizedItemsPage | [inline]
VariableSizedItemsPage_Loaded(object sender, RoutedEventArgs e) | VariableSizedItemsPage | [inline, private]
~VariableSizedItemsPage() | VariableSizedItemsPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Transform2DEffect Member List

This is the complete list of members for Transform2DEffect, including all inherited members.
DECLARE_D2D_GUID(CLSID_D2D12DAffineTransform) | Transform2DEffect |
DECLARE_NAMED_PROPERTY_MAPPING({L"InterpolationMode", D2D1_2DAFFINETRANSFORM_PROP_INTERPOLATION_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"BorderMode", D2D1_2DAFFINETRANSFORM_PROP_BORDER_MODE, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"TransformMatrix", D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT},{L"Sharpness", D2D1_2DAFFINETRANSFORM_PROP_SHARPNESS, PropertyMapping::GRAPHICS_EFFECT_PROPERTY_MAPPING_DIRECT}) | Transform2DEffect |
DECLARE_POD_PROPERTY(InterpolationMode, winrt::CanvasImageInterpolation, winrt::CanvasImageInterpolation::Linear, true) | Transform2DEffect |
DECLARE_POD_PROPERTY(BorderMode, winrt::EffectBorderMode, winrt::EffectBorderMode::Soft, true) | Transform2DEffect |
DECLARE_POD_PROPERTY(TransformMatrix, winrt::float3x2,(winrt::float3x2{1, 0, 0, 1, 0, 0}), true) | Transform2DEffect |
DECLARE_POD_PROPERTY(Sharpness, float, 0.0f, value >=0.0f &&value<=1.0f) | Transform2DEffect |
DECLARE_SINGLE_SOURCE(Source) | Transform2DEffect |
GetProperty(UINT index, _Outptr_ abi::IPropertyValue **value) override | Transform2DEffect | [inline]
GetPropertyCount(_Out_ UINT *count) override | Transform2DEffect | [inline]
Generated on Sun Dec 1 2024 20:53:33 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ColumnMajorUniformToLargestGridLayout Member List

This is the complete list of members for ColumnMajorUniformToLargestGridLayout, including all inherited members.
abi_enter() | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
ArrangeOverride(winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &finalSize) | ColumnMajorUniformToLargestGridLayout |
CalculateColumns(int childCount, float maxItemWidth, float availableWidth) | ColumnMajorUniformToLargestGridLayout | [private]
CheckThread() | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
ClearProperties() | ColumnMajorUniformToLargestGridLayoutProperties | [static]
ColumnMajorUniformToLargestGridLayout() | ColumnMajorUniformToLargestGridLayout |
ColumnMajorUniformToLargestGridLayoutProperties() | ColumnMajorUniformToLargestGridLayoutProperties |
ColumnSpacing(double value) | ColumnMajorUniformToLargestGridLayoutProperties |
ColumnSpacing() | ColumnMajorUniformToLargestGridLayoutProperties |
ColumnSpacingProperty() | ColumnMajorUniformToLargestGridLayoutProperties | [inline, static]
DeleteInstanceOnUIThread(std::unique_ptr< ColumnMajorUniformToLargestGridLayout > &&self) noexcept | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline, static]
EnsureProperties() | ColumnMajorUniformToLargestGridLayoutProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
final_release(std::unique_ptr< ColumnMajorUniformToLargestGridLayout > &&self) | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline, static]
GetBase() | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
GetColumns() | ColumnMajorUniformToLargestGridLayout |
GetInner() | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
GetLargerColumns() | ColumnMajorUniformToLargestGridLayout |
GetRows() | ColumnMajorUniformToLargestGridLayout |
IsOnThread() | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
LayoutChanged(winrt::TypedEventHandler< winrt::ColumnMajorUniformToLargestGridLayout, winrt::IInspectable > const &value) | ColumnMajorUniformToLargestGridLayout |
LayoutChanged(winrt::event_token const &token) | ColumnMajorUniformToLargestGridLayout |
m_layoutChangedEventSource | ColumnMajorUniformToLargestGridLayout | [private]
MaxColumns(int value) | ColumnMajorUniformToLargestGridLayoutProperties |
MaxColumns() | ColumnMajorUniformToLargestGridLayoutProperties |
MaxColumnsProperty() | ColumnMajorUniformToLargestGridLayoutProperties | [inline, static]
MeasureOverride(winrt::NonVirtualizingLayoutContext const &context, winrt::Size const &availableSize) | ColumnMajorUniformToLargestGridLayout |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
OnColumnSpacingPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &) | ColumnMajorUniformToLargestGridLayout |
ColumnMajorUniformToLargestGridLayoutProperties::OnColumnSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColumnMajorUniformToLargestGridLayoutProperties | [static]
OnMaxColumnsPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &) | ColumnMajorUniformToLargestGridLayout |
ColumnMajorUniformToLargestGridLayoutProperties::OnMaxColumnsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColumnMajorUniformToLargestGridLayoutProperties | [static]
OnRowSpacingPropertyChanged(const winrt::DependencyPropertyChangedEventArgs &) | ColumnMajorUniformToLargestGridLayout |
ColumnMajorUniformToLargestGridLayoutProperties::OnRowSpacingPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | ColumnMajorUniformToLargestGridLayoutProperties | [static]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< ColumnMajorUniformToLargestGridLayout, winrt::implementation::ColumnMajorUniformToLargestGridLayoutT, NonVirtualizingLayout > | [inline]
RowSpacing(double value) | ColumnMajorUniformToLargestGridLayoutProperties |
RowSpacing() | ColumnMajorUniformToLargestGridLayoutProperties |
RowSpacingProperty() | ColumnMajorUniformToLargestGridLayoutProperties | [inline, static]
s_ColumnSpacingProperty | ColumnMajorUniformToLargestGridLayoutProperties | [static]
s_MaxColumnsProperty | ColumnMajorUniformToLargestGridLayoutProperties | [static]
s_RowSpacingProperty | ColumnMajorUniformToLargestGridLayoutProperties | [static]
SetTestHooksEnabled(bool enabled) | ColumnMajorUniformToLargestGridLayout |
ValidateGreaterThanZero(int value) | ColumnMajorUniformToLargestGridLayout | [static]
Generated on Sun Dec 1 2024 20:52:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeView.h Source File

  • File List
  • File Members
  • TreeView

TreeView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005 #include "TreeViewList.h"
00006 #include "TreeViewNode.h"
00007 #include "TreeViewItemInvokedEventArgs.h"
00008 #include "TreeViewExpandingEventArgs.h"
00009 #include "TreeViewCollapsedEventArgs.h"
00010 #include "TreeViewDragItemsStartingEventArgs.h"
00011 #include "TreeViewDragItemsCompletedEventArgs.h"
00012 #include "TreeViewSelectionChangedEventArgs.h"
00013
00014 #include "TreeView.g.h"
00015 #include "TreeView.properties.h"
00016
00017 class TreeView :
00018     public ReferenceTracker<TreeView, winrt::implementation::TreeViewT>,
00019     public TreeViewProperties
00020 {
00021 public:
00022     TreeView();
00023     winrt::IVector<winrt::TreeViewNode> RootNodes();
00024     const TreeViewList* ListControl() const;
00025     TreeViewList* MutableListControl();
00026
00027     winrt::IInspectable ItemFromContainer(winrt::DependencyObject const& container);
00028     winrt::DependencyObject ContainerFromItem(winrt::IInspectable const& item);
00029     winrt::TreeViewNode NodeFromContainer(winrt::DependencyObject const& container) const;
00030     winrt::DependencyObject ContainerFromNode(winrt::TreeViewNode const& node) const;
00031
00032     void SelectedNode(winrt::TreeViewNode const& node);
00033     winrt::TreeViewNode SelectedNode();
00034     winrt::IVector<winrt::TreeViewNode> SelectedNodes();
00035
00036     winrt::IVector<winrt::IInspectable> SelectedItems();
00037
00038     void UpdateSelection(winrt::TreeViewNode const& node, bool isSelected);
00039     void RaiseSelectionChanged(const winrt::IVector<winrt::IInspectable> addedItems, const winrt::IVector<winrt::IInspectable> removedItems);
00040
00041     void Expand(winrt::TreeViewNode const& value);
00042     void Collapse(winrt::TreeViewNode const& value);
00043     void SelectAll();
00044
00045     void OnItemClick(const winrt::IInspectable& sender, const winrt::ItemClickEventArgs& args);
00046     void OnContainerContentChanging(const winrt::IInspectable& sender, const winrt::ContainerContentChangingEventArgs& args);
00047     void OnNodeExpanding(const winrt::TreeViewNode& sender, const winrt::IInspectable&);
00048     void OnNodeCollapsed(const winrt::TreeViewNode& sender, const winrt::IInspectable&);
00049     void OnListControlDragItemsStarting(const winrt::IInspectable& sender, const winrt::DragItemsStartingEventArgs& args);
00050     void OnListControlDragItemsCompleted(const winrt::IInspectable& sender, const winrt::DragItemsCompletedEventArgs& args);
00051     void OnListControlSelectionChanged(const winrt::IInspectable& sender, const winrt::SelectionChangedEventArgs& args);
00052     void OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00053     void UpdateItemsSelectionMode(bool isMultiSelect);
00054     winrt::TreeViewNode GetAssociatedNode(winrt::IInspectable item);
00055
00056 private:
00057     static void OnPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyPropertyChangedEventArgs& args);
00058
00059     winrt::ItemsSourceView m_itemsDataSource{ nullptr };
00060     winrt::ItemsSourceView::CollectionChanged_revoker m_itemItemsSourceViewChangedRevoker{};
00061     void OnItemsSourceChanged(const winrt::IInspectable& sender, const winrt::NotifyCollectionChangedEventArgs& args);
00062     void SyncRootNodesWithItemsSource();
00063     void OnItemsAdded(int index, int count);
00064     void OnItemsRemoved(int index, int count);
00065     winrt::TreeViewNode GetAssociatedNodeImpl(winrt::IInspectable const& item, winrt::TreeViewNode const& node);
00066
00067 public:
00068     // IFrameworkElementOverrides
00069     void OnApplyTemplate();
00070
00071 private:
00072     tracker_ref<winrt::TreeViewNode> m_rootNode{ this };
00073     tracker_ref<winrt::TreeViewList> m_listControl{ this };
00074     // SelectedNodes vector is initialized in OnApplyTemplate, if developers try to update SelectedNodes in page constructor they'll get an exception since the vector is not ready.
00075     // This pendingSelectedNodes is to temporarily hold the content before SelectedNodes is ready. It gets copied over and cleared in OnApplyTemplate.
00076     tracker_ref<winrt::IVector<winrt::TreeViewNode>> m_pendingSelectedNodes{ this };
00077
00078     event_source<winrt::TypedEventHandler<winrt::ListViewBase, winrt::ContainerContentChangingEventArgs>> m_containerContentChangedSource{ this };
00079
00080     winrt::ListViewBase::ItemClick_revoker m_itemClickRevoker{};
00081     winrt::ListViewBase::ContainerContentChanging_revoker m_containerContentChangingRevoker{};
00082     winrt::ListViewBase::DragItemsStarting_revoker m_dragItemsStartingRevoker{};
00083     winrt::ListViewBase::DragItemsCompleted_revoker m_dragItemsCompletedRevoker{};
00084     winrt::ListViewBase::SelectionChanged_revoker m_selectionChangedRevoker{};
00085 };
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/APITests/ScrollPresenterViewChangeTests.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • APITests

ScrollPresenterViewChangeTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using System;
00007 using System.Collections.Generic;
00008 using System.Diagnostics;
00009 using System.Numerics;
00010 using System.Threading;
00011 using Windows.Foundation;
00012 using Microsoft.UI.Composition;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Controls.Primitives;
00015 using Microsoft.UI.Xaml.Shapes;
00016 using Microsoft.UI.Private.Controls;
00017
00018 using WEX.TestExecution;
00019 using WEX.TestExecution.Markup;
00020 using WEX.Logging.Interop;
00021
00022 using Windows.UI.ViewManagement;
00023
00024 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00025 {
00026     partial class ScrollPresenterTests : ApiTestBase
00027     {
00028         // Enum used in tests that use InterruptViewChange
00029         private enum ViewChangeInterruptionKind
00030         {
00031             OffsetsChangeByOffsetsChange,
00032             OffsetsChangeByZoomFactorChange,
00033             ZoomFactorChangeByOffsetsChange,
00034             ZoomFactorChangeByZoomFactorChange,
00035         }
00036
00037         private const int c_MaxWaitDuration = 5000;
00038         private const int c_MaxStockOffsetsChangeDuration = 1000;
00039         private const int c_MaxStockZoomFactorChangeDuration = 1000;
00040
00041         private uint scrollStartingCount = 0u;
00042         private uint zoomStartingCount = 0u;
00043         private uint viewChangedCount = 0u;
00044
00045         [TestMethod]
00046         [TestProperty("Description", "Changes ScrollPresenter offsets using ScrollTo, ScrollBy, AddScrollVelocity and AnimationMode/SnapPointsMode enum values.")]
00047         public void BasicOffsetChanges()
00048         {
00049             ScrollPresenter scrollPresenter = null;
00050             Rectangle rectangleScrollPresenterContent = null;
00051             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00052
00053             RunOnUIThread.Execute(() =>
00054             {
00055                 rectangleScrollPresenterContent = new Rectangle();
00056                 scrollPresenter = new ScrollPresenter();
00057
00058                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00059             });
00060
00061             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00062
00063             // Jump to absolute offsets
00064             ScrollTo(scrollPresenter, 11.0, 22.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00065             ScrollTo(scrollPresenter, 22.0, 11.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);
00066
00067             // Jump to relative offsets
00068             ScrollBy(scrollPresenter, -4.0, 15.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00069             ScrollBy(scrollPresenter, 15.0, 4.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);
00070
00071             // Animate to absolute offsets
00072             ScrollTo(scrollPresenter, 55.0, 25.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00073             ScrollTo(scrollPresenter, 5.0, 75.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);
00074
00075             // Jump or animate to absolute offsets based on UISettings.AnimationsEnabled
00076             ScrollTo(scrollPresenter, 55.0, 25.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00077
00078             // Animate to relative offsets
00079             ScrollBy(scrollPresenter, 700.0, -8.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00080             ScrollBy(scrollPresenter, -80.0, 200.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);
00081
00082             // Jump or animate to relative offsets based on UISettings.AnimationsEnabled
00083             ScrollBy(scrollPresenter, 80.0, -200.0, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00084
00085             // Flick with additional offsets velocity
00086             AddScrollVelocity(scrollPresenter, horizontalVelocity: -65.0f, verticalVelocity: 80.0f, horizontalInertiaDecayRate: null, verticalInertiaDecayRate: null, hookViewChangingAndChanged: false);
00087
00088             // Flick with additional offsets velocity and custom scroll inertia decay rate
00089             AddScrollVelocity(scrollPresenter, horizontalVelocity: 65.0f, verticalVelocity: -80.0f, horizontalInertiaDecayRate: 0.7f, verticalInertiaDecayRate: 0.8f, hookViewChangingAndChanged: false);
00090
00091             // Do it all again while respecting snap points
00092             ScrollTo(scrollPresenter, 11.0, 22.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
00093             ScrollBy(scrollPresenter, -4.0, 15.0, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
00094             ScrollTo(scrollPresenter, 55.0, 25.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
00095             ScrollBy(scrollPresenter, 700.0, -8.0, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Default, hookViewChangingAndChanged: false);
00096         }
00097
00098         [TestMethod]
00099         [TestProperty("Description", "Changes ScrollPresenter zoomFactor using ZoomTo, ZoomBy, AddZoomVelocity and AnimationMode enum values.")]
00100         public void BasicZoomFactorChanges()
00101         {
00102             ScrollPresenter scrollPresenter = null;
00103             Rectangle rectangleScrollPresenterContent = null;
00104             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00105
00106             RunOnUIThread.Execute(() =>
00107             {
00108                 rectangleScrollPresenterContent = new Rectangle();
00109                 scrollPresenter = new ScrollPresenter();
00110
00111                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00112             });
00113
00114             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00115
00116             // Jump to absolute zoomFactor
00117             ZoomTo(scrollPresenter, 2.0f, 22.0f, 33.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore);
00118             ZoomTo(scrollPresenter, 5.0f, 33.0f, 22.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);
00119
00120             // Jump to relative zoomFactor
00121             ZoomBy(scrollPresenter, 1.0f, 55.0f, 66.0f, ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00122             ZoomBy(scrollPresenter, 1.0f, 66.0f, 55.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: false);
00123
00124             // Animate to absolute zoomFactor
00125             ZoomTo(scrollPresenter, 4.0f, -40.0f, -25.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00126             ZoomTo(scrollPresenter, 6.0f, 25.0f, 40.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);
00127
00128             // Jump or animate to absolute zoomFactor based on UISettings.AnimationsEnabled
00129             ZoomTo(scrollPresenter, 3.0f, 10.0f, 20.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00130
00131             // Animate to relative zoomFactor
00132             ZoomBy(scrollPresenter, -2.0f, 100.0f, 200.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00133             ZoomBy(scrollPresenter, 1.0f, 100.0f, 200.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false, isAnimationsEnabledOverride: true);
00134
00135             // Jump or animate to relative zoomFactor based on UISettings.AnimationsEnabled
00136             ZoomBy(scrollPresenter, 2.0f, 200.0f, 100.0f, ScrollingAnimationMode.Auto, ScrollingSnapPointsMode.Ignore, hookViewChangingAndChanged: false);
00137
00138             // Flick with additional zoomFactor velocity
00139             AddZoomVelocity(scrollPresenter, zoomFactorVelocity: 2.0f, inertiaDecayRate: null, centerPointX: -50.0f, centerPointY: 800.0f, waitForViewChangeCompletion: true, hookViewChangingAndChanged: false);
00140
00141             // Flick with additional zoomFactor velocity and custom zoomFactor inertia decay rate
00142             AddZoomVelocity(scrollPresenter, zoomFactorVelocity: -2.0f, inertiaDecayRate: 0.75f, centerPointX: -50.0f, centerPointY: 800.0f, waitForViewChangeCompletion: true, hookViewChangingAndChanged: false);
00143         }
00144
00145         [TestMethod]
00146         [TestProperty("Description", "Changes ScrollPresenter offsets using AddScrollVelocity multiple times with various inertia decay rates.")]
00147         public void SuccessiveAdditionalScrollVelocities()
00148         {
00149             ScrollPresenter scrollPresenter = null;
00150             Rectangle rectangleScrollPresenterContent = null;
00151             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00152             AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
00153             AutoResetEvent scrollPresenterViewChangeOperationEvent1 = new AutoResetEvent(false);
00154             AutoResetEvent scrollPresenterViewChangeOperationEvent2 = new AutoResetEvent(false);
00155             bool viewChanged = false;
00156
00157             RunOnUIThread.Execute(() =>
00158             {
00159                 rectangleScrollPresenterContent = new Rectangle();
00160                 scrollPresenter = new ScrollPresenter();
00161
00162                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00163
00164                 scrollPresenter.ViewChanged += (sender, args) =>
00165                 {
00166                     Log.Comment($"ViewChanged - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00167
00168                     if (!viewChanged)
00169                     {
00170                         viewChanged = true;
00171
00172                         Log.Comment("Setting view changed event");
00173                         scrollPresenterViewChangedEvent.Set();
00174                     }
00175                 };
00176
00177                 scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
00178                 {
00179                     ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00180
00181                     Log.Comment("ScrollCompleted: AddScrollVelocity ScrollChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
00182
00183                     if (args.CorrelationId == 1)
00184                     {
00185                         Log.Comment("Setting first view change completion event");
00186                         scrollPresenterViewChangeOperationEvent1.Set();
00187                     }
00188                     else if (args.CorrelationId == 2)
00189                     {
00190                         Log.Comment("Setting second view change completion event");
00191                         scrollPresenterViewChangeOperationEvent2.Set();
00192                     }
00193                 };
00194             });
00195
00196             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00197
00198             // Add scroll velocity with very small inertia decay rate
00199             AddScrollVelocity(scrollPresenter, horizontalVelocity: 50.0f, verticalVelocity: 60.0f, horizontalInertiaDecayRate: 0.0007f, verticalInertiaDecayRate: 0.0008f, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);
00200
00201             // Waiting for first view changed event
00202             WaitForEvent("Waiting for first ViewChanged event", scrollPresenterViewChangedEvent);
00203
00204             // Add scroll velocity with default inertia decay rate
00205             AddScrollVelocity(scrollPresenter, horizontalVelocity: 170.0f, verticalVelocity: 180.0f, horizontalInertiaDecayRate: null, verticalInertiaDecayRate: null, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);
00206
00207             // Waiting for first view change completion
00208             WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvent1);
00209
00210             // Waiting for second view change completion
00211             WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvent2);
00212
00213             RunOnUIThread.Execute(() =>
00214             {
00215                 Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
00216
00217                 Verify.IsLessThan(Math.Abs(scrollPresenter.HorizontalOffset - 72.0), 10.0);
00218                 Verify.IsLessThan(Math.Abs(scrollPresenter.VerticalOffset - 80.0), 10.0);
00219                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00220             });
00221         }
00222
00223         [TestMethod]
00224         [TestProperty("Description", "Changes ScrollPresenter zoomFactor using AddZoomVelocity multiple times with various inertia decay rates.")]
00225         public void SuccessiveAdditionalZoomVelocities()
00226         {
00227             ScrollPresenter scrollPresenter = null;
00228             Rectangle rectangleScrollPresenterContent = null;
00229             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00230             AutoResetEvent scrollPresenterViewChangedEvent = new AutoResetEvent(false);
00231             AutoResetEvent scrollPresenterViewChangeOperationEvent1 = new AutoResetEvent(false);
00232             AutoResetEvent scrollPresenterViewChangeOperationEvent2 = new AutoResetEvent(false);
00233             bool viewChanged = false;
00234
00235             RunOnUIThread.Execute(() =>
00236             {
00237                 rectangleScrollPresenterContent = new Rectangle();
00238                 scrollPresenter = new ScrollPresenter();
00239
00240                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00241
00242                 scrollPresenter.ViewChanged += (sender, args) =>
00243                 {
00244                     Log.Comment($"ViewChanged - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00245
00246                     if (!viewChanged)
00247                     {
00248                         viewChanged = true;
00249
00250                         Log.Comment("Setting view changed event");
00251                         scrollPresenterViewChangedEvent.Set();
00252                     }
00253                 };
00254
00255                 scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
00256                 {
00257                     ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);
00258
00259                     Log.Comment("ZoomCompleted: AddZoomVelocity ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
00260
00261                     if (args.CorrelationId == 1)
00262                     {
00263                         Log.Comment("Setting first view change completion event");
00264                         scrollPresenterViewChangeOperationEvent1.Set();
00265                     }
00266                     else if (args.CorrelationId == 2)
00267                     {
00268                         Log.Comment("Setting second view change completion event");
00269                         scrollPresenterViewChangeOperationEvent2.Set();
00270                     }
00271                 };
00272             });
00273
00274             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00275
00276             // Add zoomFactor velocity with very small inertia decay rate
00277             AddZoomVelocity(scrollPresenter, zoomFactorVelocity: 0.4f, inertiaDecayRate: 0.0001f, centerPointX: 0.0f, centerPointY: 0.0f, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);
00278
00279             // Waiting for first view changed event
00280             WaitForEvent("Waiting for first ViewChanged event", scrollPresenterViewChangedEvent);
00281
00282             // Add zoomFactor velocity with default inertia decay rate
00283             AddZoomVelocity(scrollPresenter, zoomFactorVelocity: 0.6f, inertiaDecayRate: null, centerPointX: 0.0f, centerPointY: 0.0f, waitForViewChangeCompletion: false, hookViewChangingAndChanged: false);
00284
00285             // Waiting for first view change completion
00286             WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvent1);
00287
00288             // Waiting for second view change completion
00289             WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvent2);
00290
00291             RunOnUIThread.Execute(() =>
00292             {
00293                 Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
00294
00295                 Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
00296                 Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
00297                 Verify.IsLessThan(Math.Abs(scrollPresenter.ZoomFactor - 1.26f), 0.1f);
00298             });
00299         }
00300
00301         [TestMethod]
00302         [TestProperty("Description", "Cancels an animated offsets change.")]
00303         public void BasicOffsetsChangeCancelation()
00304         {
00305             ScrollPresenter scrollPresenter = null;
00306             Rectangle rectangleScrollPresenterContent = null;
00307             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00308             AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
00309             ScrollPresenterOperation operation = null;
00310
00311             RunOnUIThread.Execute(() =>
00312             {
00313                 rectangleScrollPresenterContent = new Rectangle();
00314                 scrollPresenter = new ScrollPresenter();
00315
00316                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00317             });
00318
00319             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00320
00321             RunOnUIThread.Execute(() =>
00322             {
00323                 operation = StartScrollTo(
00324                     scrollPresenter,
00325                     600.0,
00326                     400.0,
00327                     ScrollingAnimationMode.Enabled,
00328                     ScrollingSnapPointsMode.Ignore,
00329                     scrollPresenterViewChangeOperationEvent);
00330
00331                 bool operationCanceled = false;
00332
00333                 scrollPresenter.ViewChanged += (sender, args) =>
00334                 {
00335                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00336
00337                     if ((sender.HorizontalOffset >= 150.0 || sender.VerticalOffset >= 100.0) && !operationCanceled)
00338                     {
00339                         Log.Comment("Canceling view change");
00340                         operationCanceled = true;
00341                         sender.ScrollBy(0, 0, new ScrollingScrollOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00342                     }
00343                 };
00344             });
00345
00346             WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
00347
00348             RunOnUIThread.Execute(() =>
00349             {
00350                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00351                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00352
00353                 Verify.IsTrue(scrollPresenter.HorizontalOffset < 600.0);
00354                 Verify.IsTrue(scrollPresenter.VerticalOffset < 400.0);
00355                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00356                 Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operation.Result);
00357             });
00358         }
00359
00360         [TestMethod]
00361         [TestProperty("Description", "Cancels an animated zoomFactor change.")]
00362         public void BasicZoomFactorChangeCancelation()
00363         {
00364             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00365             {
00366                 ScrollPresenter scrollPresenter = null;
00367                 Rectangle rectangleScrollPresenterContent = null;
00368                 AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00369                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
00370                 ScrollPresenterOperation operation = null;
00371
00372                 RunOnUIThread.Execute(() =>
00373                 {
00374                     rectangleScrollPresenterContent = new Rectangle();
00375                     scrollPresenter = new ScrollPresenter();
00376                     scrollPresenter.Name = "scr";
00377
00378                     SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00379                 });
00380
00381                 WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00382
00383                 RunOnUIThread.Execute(() =>
00384                 {
00385                     operation = StartZoomTo(
00386                         scrollPresenter,
00387                         8.0f,
00388                         100.0f,
00389                         150.0f,
00390                         ScrollingAnimationMode.Enabled,
00391                         ScrollingSnapPointsMode.Ignore,
00392                         scrollPresenterViewChangeOperationEvent);
00393
00394                     bool operationCanceled = false;
00395
00396                     scrollPresenter.ViewChanged += (sender, args) =>
00397                     {
00398                         Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00399
00400                         if (sender.ZoomFactor >= 2.0 && !operationCanceled)
00401                         {
00402                             Log.Comment("Canceling view change");
00403                             operationCanceled = true;
00404                             sender.ZoomBy(0, Vector2.Zero, new ScrollingZoomOptions(ScrollingAnimationMode.Disabled, ScrollingSnapPointsMode.Ignore));
00405                         }
00406                     };
00407                 });
00408
00409                 WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
00410
00411                 RunOnUIThread.Execute(() =>
00412                 {
00413                     Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00414                         scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00415
00416                     Verify.IsTrue(scrollPresenter.ZoomFactor < 8.0f);
00417                     Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operation.Result);
00418                 });
00419             }
00420         }
00421
00422         [TestMethod]
00423         [TestProperty("Description", "Checks to make sure the exposed startPosition, endPosition, StartZoomFactor, and EndZoomFactor " +
00424             "on ScrollingScrollAnimationStartingEventArgs and ScrollingZoomAnimationStartingEventArgs respectively are accurate.")]
00425         public void ValidateScrollAnimationStartingAndZoomFactorEventArgsHaveValidStartAndEndPositions()
00426         {
00427             int numOffsetChanges = 0;
00428             int numZoomFactorChanges = 0;
00429             ScrollPresenter scrollPresenter = null;
00430             Rectangle rectangleScrollPresenterContent = null;
00431             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00432             Point newPosition1 = new Point(100, 150);
00433             Point newPosition2 = new Point(50, 100);
00434             float newZoomFactor1 = 2.0f;
00435             float newZoomFactor2 = 0.5f;
00436
00437             RunOnUIThread.Execute(() =>
00438             {
00439                 rectangleScrollPresenterContent = new Rectangle();
00440                 scrollPresenter = new ScrollPresenter();
00441
00442                 SetupDefaultUI(
00443                     scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00444             });
00445
00446             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00447
00448             RunOnUIThread.Execute(() =>
00449             {
00450                 Log.Comment("Attach to ScrollAnimationStarting");
00451
00452                 scrollPresenter.ZoomAnimationStarting += (ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs e) =>
00453                 {
00454                     Log.Comment("ScrollPresenter.ZoomAnimationStarting event handler");
00455                     if (numZoomFactorChanges == 0)
00456                     {
00457                         Verify.AreEqual(2.0f, e.EndZoomFactor);
00458                         Verify.AreEqual(1.0f, e.StartZoomFactor);
00459                         numZoomFactorChanges++;
00460                     }
00461                     else
00462                     {
00463                         Verify.AreEqual(0.5f, e.EndZoomFactor);
00464                         Verify.AreEqual(2.0f, e.StartZoomFactor);
00465                     }
00466                 };
00467
00468                 scrollPresenter.ScrollAnimationStarting += (ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs e) =>
00469                 {
00470                     Log.Comment("ScrollPresenter.ScrollAnimationStarting event handler");
00471                     if (numOffsetChanges == 0)
00472                     {
00473                         Verify.AreEqual(100.0f, e.EndPosition.X);
00474                         Verify.AreEqual(150.0f, e.EndPosition.Y);
00475                         Verify.AreEqual(0.0f, e.StartPosition.X);
00476                         Verify.AreEqual(0.0f, e.StartPosition.Y);
00477
00478                         numOffsetChanges++;
00479                     }
00480                     else
00481                     {
00482                         Verify.AreEqual(50.0f, e.EndPosition.X);
00483                         Verify.AreEqual(100.0f, e.EndPosition.Y);
00484                         Verify.AreEqual(100.0f, e.StartPosition.X);
00485                         Verify.AreEqual(150.0f, e.StartPosition.Y);
00486
00487                         numOffsetChanges++;
00488                     }
00489                 };
00490             });
00491
00492             Log.Comment("Animating to absolute Offset");
00493             ScrollTo(scrollPresenter, newPosition1.X, newPosition1.Y, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);
00494
00495             Log.Comment("Animating to absolute Offset");
00496             ScrollTo(scrollPresenter, newPosition2.X, newPosition2.Y, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);
00497
00498             Log.Comment("Animating to absolute zoomFactor");
00499             ZoomTo(scrollPresenter, newZoomFactor1, 100.0f, 200.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);
00500
00501             Log.Comment("Animating to absolute zoomFactor");
00502             ZoomTo(scrollPresenter, newZoomFactor2, 100.0f, 200.0f, ScrollingAnimationMode.Enabled, ScrollingSnapPointsMode.Ignore);
00503
00504         }
00505
00506         [TestMethod]
00507         [TestProperty("Description", "Performs an animated offsets change with an overridden duration.")]
00508         public void OffsetsChangeWithCustomDuration()
00509         {
00510             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00511             {
00512                 ScrollPresenter scrollPresenter = null;
00513                 Rectangle rectangleScrollPresenterContent = null;
00514                 AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00515                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
00516                 ScrollPresenterOperation operation = null;
00517
00518                 RunOnUIThread.Execute(() =>
00519                 {
00520                     rectangleScrollPresenterContent = new Rectangle();
00521                     scrollPresenter = new ScrollPresenter();
00522
00523                     SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00524                 });
00525
00526                 WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00527
00528                 RunOnUIThread.Execute(() =>
00529                 {
00530                     scrollPresenter.ScrollStarting += (sender, args) =>
00531                     {
00532                         Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00533                     };
00534
00535                     scrollPresenter.ZoomStarting += (sender, args) =>
00536                     {
00537                         Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00538                     };
00539
00540                     scrollPresenter.ViewChanged += (sender, args) =>
00541                     {
00542                         Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00543                     };
00544
00545                     scrollPresenter.ScrollAnimationStarting += (sender, args) =>
00546                     {
00547                         Log.Comment("ScrollAnimationStarting - OffsetsChangeCorrelationId={0}", args.CorrelationId);
00548                         Verify.IsNotNull(args.Animation);
00549                         Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;
00550                         Verify.IsNotNull(stockKeyFrameAnimation);
00551                         Log.Comment("Stock duration={0} msec.", stockKeyFrameAnimation.Duration.TotalMilliseconds);
00552                         Verify.AreEqual(c_MaxStockOffsetsChangeDuration, stockKeyFrameAnimation.Duration.TotalMilliseconds);
00553                         stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(10);
00554                     };
00555
00556                     operation = StartScrollTo(
00557                         scrollPresenter,
00558                         600.0,
00559                         400.0,
00560                         ScrollingAnimationMode.Enabled,
00561                         ScrollingSnapPointsMode.Ignore,
00562                         scrollPresenterViewChangeOperationEvent);
00563                 });
00564
00565                 WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
00566
00567                 RunOnUIThread.Execute(() =>
00568                 {
00569                     Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
00570                     Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
00571                     Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
00572                     Log.Comment($"Final viewChangedCount={viewChangedCount}");
00573
00574                     Verify.AreEqual(600.0, scrollPresenter.HorizontalOffset);
00575                     Verify.AreEqual(400.0, scrollPresenter.VerticalOffset);
00576                     Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00577
00578                     Verify.AreEqual(0u, scrollStartingCount);
00579                     Verify.AreEqual(0u, zoomStartingCount);
00580                     Verify.IsLessThanOrEqual(viewChangedCount, 2u);
00581
00582                     Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
00583                 });
00584             }
00585         }
00586
00587         [TestMethod]
00588         [TestProperty("Description", "Performs an animated zoomFactor change with an overridden duration.")]
00589         public void ZoomFactorChangeWithCustomDuration()
00590         {
00591             using (PrivateLoggingHelper privateLoggingHelper = new PrivateLoggingHelper("ScrollPresenter"))
00592             {
00593                 ScrollPresenter scrollPresenter = null;
00594                 Rectangle rectangleScrollPresenterContent = null;
00595                 AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00596                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
00597                 ScrollPresenterOperation operation = null;
00598
00599                 RunOnUIThread.Execute(() =>
00600                 {
00601                     rectangleScrollPresenterContent = new Rectangle();
00602                     scrollPresenter = new ScrollPresenter();
00603
00604                     SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00605                 });
00606
00607                 WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00608
00609                 RunOnUIThread.Execute(() =>
00610                 {
00611                     scrollPresenter.ScrollStarting += (sender, args) =>
00612                     {
00613                         Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00614                     };
00615
00616                     scrollPresenter.ZoomStarting += (sender, args) =>
00617                     {
00618                         Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00619                     };
00620
00621                     scrollPresenter.ViewChanged += (sender, args) =>
00622                     {
00623                         Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00624                     };
00625
00626                     scrollPresenter.ZoomAnimationStarting += (sender, args) =>
00627                     {
00628                         Log.Comment("ZoomAnimationStarting - ZoomFactorChangeCorrelationId={0}", args.CorrelationId);
00629                         Verify.IsNotNull(args.Animation);
00630                         ScalarKeyFrameAnimation stockKeyFrameAnimation = args.Animation as ScalarKeyFrameAnimation;
00631                         Verify.IsNotNull(stockKeyFrameAnimation);
00632                         Log.Comment("Stock duration={0} msec.", stockKeyFrameAnimation.Duration.TotalMilliseconds);
00633                         Verify.AreEqual(c_MaxStockZoomFactorChangeDuration, stockKeyFrameAnimation.Duration.TotalMilliseconds);
00634                         stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(10);
00635                     };
00636
00637                     operation = StartZoomTo(
00638                         scrollPresenter,
00639                         8.0f,
00640                         100.0f,
00641                         150.0f,
00642                         ScrollingAnimationMode.Enabled,
00643                         ScrollingSnapPointsMode.Ignore,
00644                         scrollPresenterViewChangeOperationEvent);
00645                 });
00646
00647                 WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
00648
00649                 RunOnUIThread.Execute(() =>
00650                 {
00651                     Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
00652                     Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
00653                     Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
00654                     Log.Comment($"Final viewChangedCount={viewChangedCount}");
00655
00656                     Verify.IsLessThan(Math.Abs(scrollPresenter.HorizontalOffset - 700.0), 0.01);
00657                     Verify.IsLessThan(Math.Abs(scrollPresenter.VerticalOffset - 1050.0), 0.01);
00658                     Verify.AreEqual(8.0f, scrollPresenter.ZoomFactor);
00659
00660                     Verify.AreEqual(0u, scrollStartingCount);
00661                     Verify.AreEqual(0u, zoomStartingCount);
00662                     Verify.IsLessThanOrEqual(viewChangedCount, 2u);
00663
00664                     Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
00665                 });
00666             }
00667         }
00668
00669         [TestMethod]
00670         [TestProperty("Description", "Requests a view change just before unloading scrollPresenter.")]
00671         public void InterruptViewChangeWithUnloading()
00672         {
00673             ScrollPresenter scrollPresenter = null;
00674             Rectangle rectangleScrollPresenterContent = null;
00675             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00676             AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
00677             ScrollPresenterOperation operation = null;
00678
00679             RunOnUIThread.Execute(() =>
00680             {
00681                 rectangleScrollPresenterContent = new Rectangle();
00682                 scrollPresenter = new ScrollPresenter();
00683
00684                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, setAsContentRoot: true);
00685             });
00686
00687             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00688
00689             RunOnUIThread.Execute(() =>
00690             {
00691                 scrollPresenter.ScrollStarting += (sender, args) =>
00692                 {
00693                     Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00694                 };
00695
00696                 scrollPresenter.ZoomStarting += (sender, args) =>
00697                 {
00698                     Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00699                 };
00700
00701                 scrollPresenter.ViewChanged += (sender, args) =>
00702                 {
00703                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00704                 };
00705
00706                 operation = StartScrollTo(
00707                     scrollPresenter,
00708                     600.0,
00709                     400.0,
00710                     ScrollingAnimationMode.Disabled,
00711                     ScrollingSnapPointsMode.Ignore,
00712                     scrollPresenterViewChangeOperationEvent);
00713
00714                 Log.Comment("Resetting window content to unparent ScrollPresenter");
00715                 Content = null;
00716             });
00717
00718             WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
00719
00720             RunOnUIThread.Execute(() =>
00721             {
00722                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00723                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00724
00725                 Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
00726                 Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
00727                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00728                 Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operation.Result);
00729             });
00730         }
00731
00732         [TestMethod]
00733         [TestProperty("Description", "Interrupts an animated offsets change with another one.")]
00734         public void InterruptOffsetsChangeWithOffsetsChange()
00735         {
00736             InterruptViewChange(ViewChangeInterruptionKind.OffsetsChangeByOffsetsChange);
00737         }
00738
00739         [TestMethod]
00740         [TestProperty("Description", "Interrupts an animated offsets change with a zoomFactor change.")]
00741         public void InterruptOffsetsChangeWithZoomFactorChange()
00742         {
00743             InterruptViewChange(ViewChangeInterruptionKind.OffsetsChangeByZoomFactorChange);
00744         }
00745
00746         [TestMethod]
00747         [TestProperty("Description", "Interrupts an animated zoomFactor change with an offsets change.")]
00748         public void InterruptZoomFactorChangeWithOffsetsChange()
00749         {
00750             InterruptViewChange(ViewChangeInterruptionKind.ZoomFactorChangeByOffsetsChange);
00751         }
00752
00753         [TestMethod]
00754         [TestProperty("Description", "Interrupts an animated zoomFactor change with another one.")]
00755         public void InterruptZoomFactorChangeWithZoomFactorChange()
00756         {
00757             InterruptViewChange(ViewChangeInterruptionKind.ZoomFactorChangeByZoomFactorChange);
00758         }
00759
00760         [TestMethod]
00761         [TestProperty("Description", "Attempts an offsets change while there is no content.")]
00762         public void OffsetsChangeWithNoContent()
00763         {
00764             ScrollPresenter scrollPresenter = null;
00765             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00766             AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
00767             ScrollPresenterOperation operation = null;
00768
00769             RunOnUIThread.Execute(() =>
00770             {
00771                 scrollPresenter = new ScrollPresenter();
00772
00773                 SetupDefaultUI(scrollPresenter, null /*rectangleScrollPresenterContent*/, scrollPresenterLoadedEvent);
00774             });
00775
00776             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00777
00778             RunOnUIThread.Execute(() =>
00779             {
00780                 operation = StartScrollTo(
00781                     scrollPresenter,
00782                     600.0,
00783                     400.0,
00784                     ScrollingAnimationMode.Enabled,
00785                     ScrollingSnapPointsMode.Ignore,
00786                     scrollPresenterViewChangeOperationEvent);
00787             });
00788
00789             WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
00790
00791             RunOnUIThread.Execute(() =>
00792             {
00793                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00794                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00795
00796                 Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
00797                 Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
00798                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00799                 Verify.AreEqual(ScrollPresenterViewChangeResult.Ignored, operation.Result);
00800             });
00801         }
00802
00803         [TestMethod]
00804         [TestProperty("Description", "Attempts a zoomFactor change while there is no content.")]
00805         public void ZoomFactorChangeWithNoContent()
00806         {
00807             ScrollPresenter scrollPresenter = null;
00808             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00809             AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
00810             ScrollPresenterOperation operation = null;
00811
00812             RunOnUIThread.Execute(() =>
00813             {
00814                 scrollPresenter = new ScrollPresenter();
00815
00816                 SetupDefaultUI(scrollPresenter, null /*rectangleScrollPresenterContent*/, scrollPresenterLoadedEvent);
00817             });
00818
00819             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00820
00821             RunOnUIThread.Execute(() =>
00822             {
00823                 operation = StartZoomTo(
00824                     scrollPresenter,
00825                     8.0f,
00826                     100.0f,
00827                     150.0f,
00828                     ScrollingAnimationMode.Enabled,
00829                     ScrollingSnapPointsMode.Ignore,
00830                     scrollPresenterViewChangeOperationEvent);
00831             });
00832
00833             WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
00834
00835             RunOnUIThread.Execute(() =>
00836             {
00837                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00838                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00839
00840                 Verify.AreEqual(0.0, scrollPresenter.HorizontalOffset);
00841                 Verify.AreEqual(0.0, scrollPresenter.VerticalOffset);
00842                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00843                 Verify.AreEqual(ScrollPresenterViewChangeResult.Ignored, operation.Result);
00844             });
00845         }
00846
00847         [TestMethod]
00848         [TestProperty("Description", "Performs consecutive non-animated offsets changes.")]
00849         public void ConsecutiveOffsetJumps()
00850         {
00851             ConsecutiveOffsetJumps(waitForFirstCompletion: true);
00852             ConsecutiveOffsetJumps(waitForFirstCompletion: false);
00853         }
00854
00855         private void ConsecutiveOffsetJumps(bool waitForFirstCompletion)
00856         {
00857             ScrollPresenter scrollPresenter = null;
00858             Rectangle rectangleScrollPresenterContent = null;
00859             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00860             AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
00861             ScrollPresenterOperation[] operations = null;
00862
00863             RunOnUIThread.Execute(() =>
00864             {
00865                 rectangleScrollPresenterContent = new Rectangle();
00866                 scrollPresenter = new ScrollPresenter();
00867
00868                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00869             });
00870
00871             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
00872
00873             RunOnUIThread.Execute(() =>
00874             {
00875                 scrollPresenterViewChangeOperationEvents = new AutoResetEvent[3];
00876                 scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
00877                 scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);
00878                 scrollPresenterViewChangeOperationEvents[2] = new AutoResetEvent(false);
00879
00880                 operations = new ScrollPresenterOperation[3];
00881
00882                 scrollPresenter.ScrollStarting += (sender, args) =>
00883                 {
00884                     Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00885                 };
00886
00887                 scrollPresenter.ZoomStarting += (sender, args) =>
00888                 {
00889                     Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
00890                 };
00891
00892                 scrollPresenter.ViewChanged += (sender, args) =>
00893                 {
00894                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
00895                 };
00896
00897                 operations[0] = StartScrollTo(
00898                     scrollPresenter,
00899                     600.0,
00900                     400.0,
00901                     ScrollingAnimationMode.Disabled,
00902                     ScrollingSnapPointsMode.Ignore,
00903                     scrollPresenterViewChangeOperationEvents[0]);
00904
00905                 if (!waitForFirstCompletion)
00906                 {
00907                     operations[1] = StartScrollTo(
00908                         scrollPresenter,
00909                         500.0,
00910                         300.0,
00911                         ScrollingAnimationMode.Disabled,
00912                         ScrollingSnapPointsMode.Ignore,
00913                         scrollPresenterViewChangeOperationEvents[1]);
00914                 }
00915             });
00916
00917             WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
00918
00919             if (waitForFirstCompletion)
00920             {
00921                 RunOnUIThread.Execute(() =>
00922                 {
00923                     operations[1] = StartScrollTo(
00924                         scrollPresenter,
00925                         500.0,
00926                         300.0,
00927                         ScrollingAnimationMode.Disabled,
00928                         ScrollingSnapPointsMode.Ignore,
00929                         scrollPresenterViewChangeOperationEvents[1]);
00930                 });
00931             }
00932
00933             WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);
00934
00935             RunOnUIThread.Execute(() =>
00936             {
00937                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00938                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00939
00940                 Verify.AreEqual(500.0, scrollPresenter.HorizontalOffset);
00941                 Verify.AreEqual(300.0, scrollPresenter.VerticalOffset);
00942                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00943                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
00944                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
00945
00946                 // Jump to the same offsets.
00947                 operations[2] = StartScrollTo(
00948                     scrollPresenter,
00949                     500.0,
00950                     300.0,
00951                     ScrollingAnimationMode.Disabled,
00952                     ScrollingSnapPointsMode.Ignore,
00953                     scrollPresenterViewChangeOperationEvents[2]);
00954             });
00955
00956             WaitForEvent("Waiting for third view change completion", scrollPresenterViewChangeOperationEvents[2]);
00957
00958             RunOnUIThread.Execute(() =>
00959             {
00960                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
00961                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
00962
00963                 Verify.AreEqual(500.0, scrollPresenter.HorizontalOffset);
00964                 Verify.AreEqual(300.0, scrollPresenter.VerticalOffset);
00965                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
00966                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[2].Result);
00967             });
00968         }
00969
00970         [TestMethod]
00971         [TestProperty("Description", "Performs consecutive non-animated zoomFactor changes.")]
00972         public void ConsecutiveZoomFactorJumps()
00973         {
00974             ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: false, waitForFirstCompletion: true);
00975             ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: true, waitForFirstCompletion: true);
00976             ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: false, waitForFirstCompletion: true);
00977             ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: true, waitForFirstCompletion: true);
00978             ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: false, waitForFirstCompletion: false);
00979             ConsecutiveZoomFactorJumps(isFirstZoomRelative: false, isSecondZoomRelative: true, waitForFirstCompletion: false);
00980             ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: false, waitForFirstCompletion: false);
00981             ConsecutiveZoomFactorJumps(isFirstZoomRelative: true, isSecondZoomRelative: true, waitForFirstCompletion: false);
00982         }
00983
00984         private void ConsecutiveZoomFactorJumps(bool isFirstZoomRelative, bool isSecondZoomRelative, bool waitForFirstCompletion)
00985         {
00986             ScrollPresenter scrollPresenter = null;
00987             Rectangle rectangleScrollPresenterContent = null;
00988             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
00989             AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
00990             ScrollPresenterOperation[] operations = null;
00991
00992             RunOnUIThread.Execute(() =>
00993             {
00994                 rectangleScrollPresenterContent = new Rectangle();
00995                 scrollPresenter = new ScrollPresenter();
00996
00997                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
00998             });
00999
01000             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01001
01002             RunOnUIThread.Execute(() =>
01003             {
01004                 scrollPresenterViewChangeOperationEvents = new AutoResetEvent[3];
01005                 scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
01006                 scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);
01007                 scrollPresenterViewChangeOperationEvents[2] = new AutoResetEvent(false);
01008
01009                 operations = new ScrollPresenterOperation[3];
01010
01011                 scrollPresenter.ScrollStarting += (sender, args) =>
01012                 {
01013                     Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01014                 };
01015
01016                 scrollPresenter.ZoomStarting += (sender, args) =>
01017                 {
01018                     Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01019                 };
01020
01021                 scrollPresenter.ViewChanged += (sender, args) =>
01022                 {
01023                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01024                 };
01025
01026                 if (isFirstZoomRelative)
01027                 {
01028                     operations[0] = StartZoomBy(
01029                         scrollPresenter,
01030                         7.0f,
01031                         150.0f,
01032                         120.0f,
01033                         ScrollingAnimationMode.Disabled,
01034                         ScrollingSnapPointsMode.Ignore,
01035                         scrollPresenterViewChangeOperationEvents[0]);
01036                 }
01037                 else
01038                 {
01039                     operations[0] = StartZoomTo(
01040                         scrollPresenter,
01041                         8.0f,
01042                         150.0f,
01043                         120.0f,
01044                         ScrollingAnimationMode.Disabled,
01045                         ScrollingSnapPointsMode.Ignore,
01046                         scrollPresenterViewChangeOperationEvents[0]);
01047                 }
01048             });
01049
01050             if (waitForFirstCompletion)
01051             {
01052                 WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
01053             }
01054
01055             RunOnUIThread.Execute(() =>
01056             {
01057                 if (isFirstZoomRelative)
01058                 {
01059                     operations[1] = StartZoomBy(
01060                         scrollPresenter,
01061                         -1.0f,
01062                         10.0f,
01063                         90.0f,
01064                         ScrollingAnimationMode.Disabled,
01065                         ScrollingSnapPointsMode.Ignore,
01066                         scrollPresenterViewChangeOperationEvents[1]);
01067                 }
01068                 else
01069                 {
01070                     operations[1] = StartZoomTo(
01071                         scrollPresenter,
01072                         7.0f,
01073                         10.0f,
01074                         90.0f,
01075                         ScrollingAnimationMode.Disabled,
01076                         ScrollingSnapPointsMode.Ignore,
01077                         scrollPresenterViewChangeOperationEvents[1]);
01078                 }
01079             });
01080
01081             if (!waitForFirstCompletion)
01082             {
01083                 WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
01084             }
01085             WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);
01086
01087             RunOnUIThread.Execute(() =>
01088             {
01089                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
01090                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
01091
01092                 Verify.AreEqual(917.5, scrollPresenter.HorizontalOffset);
01093                 Verify.AreEqual(723.75, scrollPresenter.VerticalOffset);
01094                 Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
01095                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
01096                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
01097
01098                 // Jump to the same zoomFactor
01099                 operations[2] = StartZoomTo(
01100                     scrollPresenter,
01101                     7.0f,
01102                     10.0f,
01103                     90.0f,
01104                     ScrollingAnimationMode.Disabled,
01105                     ScrollingSnapPointsMode.Ignore,
01106                     scrollPresenterViewChangeOperationEvents[2]);
01107             });
01108
01109             WaitForEvent("Waiting for third view change completion", scrollPresenterViewChangeOperationEvents[2]);
01110
01111             RunOnUIThread.Execute(() =>
01112             {
01113                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
01114                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
01115
01116                 Verify.AreEqual(917.5, scrollPresenter.HorizontalOffset);
01117                 Verify.AreEqual(723.75, scrollPresenter.VerticalOffset);
01118                 Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
01119                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[2].Result);
01120             });
01121         }
01122
01123         [TestMethod]
01124         [TestProperty("Description", "Performs consecutive non-animated offsets and zoom factor changes.")]
01125         public void ConsecutiveScrollAndZoomJumps()
01126         {
01127             ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: false, waitForFirstCompletion: true);
01128             ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: true, waitForFirstCompletion: true);
01129             ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: false, waitForFirstCompletion: true);
01130             ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: true, waitForFirstCompletion: true);
01131             ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: false, waitForFirstCompletion: false);
01132             ConsecutiveScrollAndZoomJumps(isScrollRelative: false, isZoomRelative: true, waitForFirstCompletion: false);
01133             ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: false, waitForFirstCompletion: false);
01134             ConsecutiveScrollAndZoomJumps(isScrollRelative: true, isZoomRelative: true, waitForFirstCompletion: false);
01135         }
01136
01137         private void ConsecutiveScrollAndZoomJumps(bool isScrollRelative, bool isZoomRelative, bool waitForFirstCompletion)
01138         {
01139             ScrollPresenter scrollPresenter = null;
01140             Rectangle rectangleScrollPresenterContent = null;
01141             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
01142             AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
01143             ScrollPresenterOperation[] operations = null;
01144
01145             RunOnUIThread.Execute(() =>
01146             {
01147                 rectangleScrollPresenterContent = new Rectangle();
01148                 scrollPresenter = new ScrollPresenter();
01149
01150                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
01151             });
01152
01153             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01154
01155             RunOnUIThread.Execute(() =>
01156             {
01157                 scrollPresenterViewChangeOperationEvents = new AutoResetEvent[2];
01158                 scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
01159                 scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);
01160
01161                 operations = new ScrollPresenterOperation[2];
01162
01163                 scrollPresenter.ScrollStarting += (sender, args) =>
01164                 {
01165                     Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01166                 };
01167
01168                 scrollPresenter.ZoomStarting += (sender, args) =>
01169                 {
01170                     Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01171                 };
01172
01173                 scrollPresenter.ViewChanged += (sender, args) =>
01174                 {
01175                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01176                 };
01177
01178                 if (isScrollRelative)
01179                 {
01180                     operations[0] = StartScrollBy(
01181                         scrollPresenter,
01182                         80.0,
01183                         35.0,
01184                         ScrollingAnimationMode.Disabled,
01185                         ScrollingSnapPointsMode.Ignore,
01186                         scrollPresenterViewChangeOperationEvents[0]);
01187                 }
01188                 else
01189                 {
01190                     operations[0] = StartScrollTo(
01191                         scrollPresenter,
01192                         80.0,
01193                         35.0,
01194                         ScrollingAnimationMode.Disabled,
01195                         ScrollingSnapPointsMode.Ignore,
01196                         scrollPresenterViewChangeOperationEvents[0]);
01197                 }
01198             });
01199
01200             if (waitForFirstCompletion)
01201             {
01202                 WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
01203             }
01204
01205             RunOnUIThread.Execute(() =>
01206             {
01207                 if (isZoomRelative)
01208                 {
01209                     operations[1] = StartZoomBy(
01210                         scrollPresenter,
01211                         2.0f,
01212                         10.0f,
01213                         90.0f,
01214                         ScrollingAnimationMode.Disabled,
01215                         ScrollingSnapPointsMode.Ignore,
01216                         scrollPresenterViewChangeOperationEvents[1]);
01217                 }
01218                 else
01219                 {
01220                     operations[1] = StartZoomTo(
01221                         scrollPresenter,
01222                         3.0f,
01223                         10.0f,
01224                         90.0f,
01225                         ScrollingAnimationMode.Disabled,
01226                         ScrollingSnapPointsMode.Ignore,
01227                         scrollPresenterViewChangeOperationEvents[1]);
01228                 }
01229             });
01230
01231             if (!waitForFirstCompletion)
01232             {
01233                 WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
01234             }
01235             WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);
01236
01237             RunOnUIThread.Execute(() =>
01238             {
01239                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
01240                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
01241
01242                 Verify.AreEqual(260.0, scrollPresenter.HorizontalOffset);
01243                 Verify.AreEqual(285.0, scrollPresenter.VerticalOffset);
01244                 Verify.AreEqual(3.0f, scrollPresenter.ZoomFactor);
01245                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
01246                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
01247             });
01248         }
01249
01250         [TestMethod]
01251         [TestProperty("Description", "Performs consecutive non-animated zoom factor and offsets changes.")]
01252         public void ConsecutiveZoomAndScrollJumps()
01253         {
01254             ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: false, waitForFirstCompletion: true);
01255             ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: true, waitForFirstCompletion: true);
01256             ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: false, waitForFirstCompletion: true);
01257             ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: true, waitForFirstCompletion: true);
01258             ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: false, waitForFirstCompletion: false);
01259             ConsecutiveZoomAndScrollJumps(isZoomRelative: false, isScrollRelative: true, waitForFirstCompletion: false);
01260             ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: false, waitForFirstCompletion: false);
01261             ConsecutiveZoomAndScrollJumps(isZoomRelative: true, isScrollRelative: true, waitForFirstCompletion: false);
01262         }
01263
01264         private void ConsecutiveZoomAndScrollJumps(bool isZoomRelative, bool isScrollRelative, bool waitForFirstCompletion)
01265         {
01266             ScrollPresenter scrollPresenter = null;
01267             Rectangle rectangleScrollPresenterContent = null;
01268             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
01269             AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
01270             ScrollPresenterOperation[] operations = null;
01271
01272             RunOnUIThread.Execute(() =>
01273             {
01274                 rectangleScrollPresenterContent = new Rectangle();
01275                 scrollPresenter = new ScrollPresenter();
01276
01277                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
01278             });
01279
01280             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01281
01282             RunOnUIThread.Execute(() =>
01283             {
01284                 scrollPresenterViewChangeOperationEvents = new AutoResetEvent[2];
01285                 scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
01286                 scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);
01287
01288                 operations = new ScrollPresenterOperation[2];
01289
01290                 scrollPresenter.ScrollStarting += (sender, args) =>
01291                 {
01292                     Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01293                 };
01294
01295                 scrollPresenter.ZoomStarting += (sender, args) =>
01296                 {
01297                     Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01298                 };
01299
01300                 scrollPresenter.ViewChanged += (sender, args) =>
01301                 {
01302                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01303                 };
01304
01305                 if (isZoomRelative)
01306                 {
01307                     operations[0] = StartZoomBy(
01308                         scrollPresenter,
01309                         2.0f,
01310                         10.0f,
01311                         90.0f,
01312                         ScrollingAnimationMode.Disabled,
01313                         ScrollingSnapPointsMode.Ignore,
01314                         scrollPresenterViewChangeOperationEvents[0]);
01315                 }
01316                 else
01317                 {
01318                     operations[0] = StartZoomTo(
01319                         scrollPresenter,
01320                         3.0f,
01321                         10.0f,
01322                         90.0f,
01323                         ScrollingAnimationMode.Disabled,
01324                         ScrollingSnapPointsMode.Ignore,
01325                         scrollPresenterViewChangeOperationEvents[0]);
01326                 }
01327             });
01328
01329             if (waitForFirstCompletion)
01330             {
01331                 WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
01332             }
01333
01334             RunOnUIThread.Execute(() =>
01335             {
01336                 if (isScrollRelative)
01337                 {
01338                     operations[1] = StartScrollBy(
01339                         scrollPresenter,
01340                         80.0,
01341                         35.0,
01342                         ScrollingAnimationMode.Disabled,
01343                         ScrollingSnapPointsMode.Ignore,
01344                         scrollPresenterViewChangeOperationEvents[1]);
01345                 }
01346                 else
01347                 {
01348                     operations[1] = StartScrollTo(
01349                         scrollPresenter,
01350                         80.0,
01351                         35.0,
01352                         ScrollingAnimationMode.Disabled,
01353                         ScrollingSnapPointsMode.Ignore,
01354                         scrollPresenterViewChangeOperationEvents[1]);
01355                 }
01356             });
01357
01358             if (!waitForFirstCompletion)
01359             {
01360                 WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
01361             }
01362             WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);
01363
01364             RunOnUIThread.Execute(() =>
01365             {
01366                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
01367                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
01368
01369                 if (isScrollRelative)
01370                 {
01371                     Verify.AreEqual(100.0, scrollPresenter.HorizontalOffset);
01372                     Verify.AreEqual(215.0, scrollPresenter.VerticalOffset);
01373                 }
01374                 else
01375                 {
01376                     Verify.AreEqual(80.0, scrollPresenter.HorizontalOffset);
01377                     Verify.AreEqual(35.0, scrollPresenter.VerticalOffset);
01378                 }
01379                 Verify.AreEqual(3.0f, scrollPresenter.ZoomFactor);
01380                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[0].Result);
01381                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
01382             });
01383         }
01384
01385         [TestMethod]
01386         [TestProperty("Description", "Requests a non-animated offsets change before loading scrollPresenter.")]
01387         public void SetOffsetsBeforeLoading()
01388         {
01389             ChangeOffsetsBeforeLoading(false /*animate*/);
01390         }
01391
01392         [TestMethod]
01393         [TestProperty("Description", "Requests an animated offsets change before loading scrollPresenter.")]
01394         public void AnimateOffsetsBeforeLoading()
01395         {
01396             ChangeOffsetsBeforeLoading(true /*animate*/);
01397         }
01398
01399         [TestMethod]
01400         [TestProperty("Description", "Requests a non-animated zoomFactor change before loading scrollPresenter.")]
01401         public void SetZoomFactorBeforeLoading()
01402         {
01403             ChangeZoomFactorBeforeLoading(false /*animate*/);
01404         }
01405
01406         [TestMethod]
01407         [TestProperty("Description", "Requests an animated zoomFactor change before loading scrollPresenter.")]
01408         public void AnimateZoomFactorBeforeLoading()
01409         {
01410             ChangeZoomFactorBeforeLoading(true /*animate*/);
01411         }
01412
01413         [TestMethod]
01414         [TestProperty("Description", "Requests a non-animated offset change immediately after increasing content size.")]
01415         public void OffsetJumpAfterContentResizing()
01416         {
01417             ScrollPresenter scrollPresenter = null;
01418             Rectangle rectangleScrollPresenterContent = null;
01419             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
01420
01421             RunOnUIThread.Execute(() =>
01422             {
01423                 rectangleScrollPresenterContent = new Rectangle();
01424                 scrollPresenter = new ScrollPresenter();
01425
01426                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
01427             });
01428
01429             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01430
01431             RunOnUIThread.Execute(() =>
01432             {
01433                 rectangleScrollPresenterContent.Width = c_defaultUIScrollPresenterContentWidth + 200.0;
01434             });
01435
01436             // Jump to absolute offsets
01437             ScrollTo(
01438                 scrollPresenter,
01439                 c_defaultUIScrollPresenterContentWidth + 200.0 - c_defaultUIScrollPresenterWidth,
01440                 c_defaultVerticalOffset,
01441                 ScrollingAnimationMode.Disabled,
01442                 ScrollingSnapPointsMode.Ignore);
01443         }
01444
01445         private void ChangeOffsetsBeforeLoading(bool animate)
01446         {
01447             ScrollPresenter scrollPresenter = null;
01448             Rectangle rectangleScrollPresenterContent = null;
01449             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
01450             AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
01451             ScrollPresenterOperation operation = null;
01452
01453             RunOnUIThread.Execute(() =>
01454             {
01455                 rectangleScrollPresenterContent = new Rectangle();
01456                 scrollPresenter = new ScrollPresenter();
01457
01458                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, false /*setAsContentRoot*/);
01459
01460                 scrollPresenter.ScrollStarting += (sender, args) =>
01461                 {
01462                     Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01463                 };
01464
01465                 scrollPresenter.ZoomStarting += (sender, args) =>
01466                 {
01467                     Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01468                 };
01469
01470                 scrollPresenter.ViewChanged += (sender, args) =>
01471                 {
01472                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01473                 };
01474
01475                 operation = StartScrollTo(
01476                     scrollPresenter,
01477                     600.0,
01478                     400.0,
01479                     animate ? ScrollingAnimationMode.Enabled : ScrollingAnimationMode.Disabled,
01480                     ScrollingSnapPointsMode.Ignore,
01481                     scrollPresenterViewChangeOperationEvent);
01482
01483                 Log.Comment("Setting window content");
01484                 Content = scrollPresenter;
01485             });
01486
01487             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01488
01489             WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
01490
01491             RunOnUIThread.Execute(() =>
01492             {
01493                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
01494                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
01495
01496                 Verify.AreEqual(600.0, scrollPresenter.HorizontalOffset);
01497                 Verify.AreEqual(400.0, scrollPresenter.VerticalOffset);
01498                 Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
01499                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
01500             });
01501         }
01502
01503         private void ChangeZoomFactorBeforeLoading(bool animate)
01504         {
01505             ScrollPresenter scrollPresenter = null;
01506             Rectangle rectangleScrollPresenterContent = null;
01507             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
01508             AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
01509             ScrollPresenterOperation operation = null;
01510
01511             RunOnUIThread.Execute(() =>
01512             {
01513                 rectangleScrollPresenterContent = new Rectangle();
01514                 scrollPresenter = new ScrollPresenter();
01515
01516                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent, false /*setAsContentRoot*/);
01517
01518                 scrollPresenter.ScrollStarting += (sender, args) =>
01519                 {
01520                     Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01521                 };
01522
01523                 scrollPresenter.ZoomStarting += (sender, args) =>
01524                 {
01525                     Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01526                 };
01527
01528                 scrollPresenter.ViewChanged += (sender, args) =>
01529                 {
01530                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01531                 };
01532
01533                 operation = StartZoomTo(
01534                     scrollPresenter,
01535                     8.0f,
01536                     100.0f,
01537                     150.0f,
01538                     animate ? ScrollingAnimationMode.Enabled : ScrollingAnimationMode.Disabled,
01539                     ScrollingSnapPointsMode.Ignore,
01540                     scrollPresenterViewChangeOperationEvent);
01541
01542                 Log.Comment("Setting window content");
01543                 Content = scrollPresenter;
01544             });
01545
01546             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
01547
01548             WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
01549
01550             RunOnUIThread.Execute(() =>
01551             {
01552                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
01553                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
01554
01555                 Verify.IsLessThan(Math.Abs(scrollPresenter.HorizontalOffset - 700.0), 0.01);
01556                 Verify.IsLessThan(Math.Abs(scrollPresenter.VerticalOffset - 1050.0), 0.01);
01557                 Verify.AreEqual(8.0f, scrollPresenter.ZoomFactor);
01558                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
01559             });
01560         }
01561
01562         private void ScrollTo(
01563             ScrollPresenter scrollPresenter,
01564             double horizontalOffset,
01565             double verticalOffset,
01566             ScrollingAnimationMode animationMode,
01567             ScrollingSnapPointsMode snapPointsMode,
01568             bool hookViewChangingAndChanged = true,
01569             bool? isAnimationsEnabledOverride = null,
01570             double? expectedFinalHorizontalOffset = null,
01571             double? expectedFinalVerticalOffset = null)
01572         {
01573             using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
01574                 enableAnchorNotifications: false,
01575                 enableInteractionSourcesNotifications: false,
01576                 enableExpressionAnimationStatusNotifications: true,
01577                 isAnimationsEnabledOverride: isAnimationsEnabledOverride))
01578             {
01579                 Log.Comment("Waiting for any pending ExpressionAnimation start/stop notifications to occur");
01580                 CompositionPropertySpy.SynchronouslyTickUIThread(6);
01581
01582                 double? anticipatedHorizontalOffset = null;
01583                 double? anticipatedVerticalOffset = null;
01584                 float? anticipatedZoomFactor = null;
01585                 float originalZoomFactor = 1.0f;
01586                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
01587                 ScrollPresenterOperation operation = null;
01588
01589                 RunOnUIThread.Execute(() =>
01590                 {
01591                     scrollPresenterTestHooksHelper.ResetExpressionAnimationStatusChanges(scrollPresenter);
01592
01593                     if (hookViewChangingAndChanged)
01594                     {
01595                         scrollPresenter.ScrollStarting += (sender, args) =>
01596                         {
01597                             Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01598                             anticipatedHorizontalOffset = args.HorizontalOffset;
01599                             anticipatedVerticalOffset = args.VerticalOffset;
01600                             anticipatedZoomFactor = args.ZoomFactor;
01601                         };
01602
01603                         scrollPresenter.ZoomStarting += (sender, args) =>
01604                         {
01605                             Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01606                             anticipatedHorizontalOffset = args.HorizontalOffset;
01607                             anticipatedVerticalOffset = args.VerticalOffset;
01608                             anticipatedZoomFactor = args.ZoomFactor;
01609                         };
01610
01611                         scrollPresenter.ViewChanged += (sender, args) =>
01612                         {
01613                             Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01614                         };
01615                     }
01616
01617                     originalZoomFactor = scrollPresenter.ZoomFactor;
01618
01619                     if (expectedFinalHorizontalOffset == null)
01620                     {
01621                         expectedFinalHorizontalOffset = horizontalOffset;
01622                     }
01623
01624                     if (expectedFinalVerticalOffset == null)
01625                     {
01626                         expectedFinalVerticalOffset = verticalOffset;
01627                     }
01628
01629                     operation = StartScrollTo(
01630                         scrollPresenter,
01631                         horizontalOffset,
01632                         verticalOffset,
01633                         animationMode,
01634                         snapPointsMode,
01635                         scrollPresenterViewChangeOperationEvent);
01636                 });
01637
01638                 WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
01639
01640                 RunOnUIThread.Execute(() =>
01641                 {
01642                     Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
01643                     Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
01644                     Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
01645                     Log.Comment($"Final viewChangedCount={viewChangedCount}");
01646
01647                     Verify.AreEqual(expectedFinalHorizontalOffset, scrollPresenter.HorizontalOffset);
01648                     Verify.AreEqual(expectedFinalVerticalOffset, scrollPresenter.VerticalOffset);
01649                     Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
01650                     Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
01651                     Verify.AreEqual(0u, zoomStartingCount);
01652
01653                     if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
01654                     {
01655                         Verify.AreEqual(0u, scrollStartingCount);
01656                         Verify.IsFalse(viewChangedCount == 1u);
01657                     }
01658                     else
01659                     {
01660                         Verify.IsLessThanOrEqual(scrollStartingCount, 1u);
01661                         Verify.IsLessThanOrEqual(viewChangedCount, 1u);
01662                         if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
01663                         {
01664                             Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - (double)expectedFinalHorizontalOffset), 0.01);
01665                             Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - (double)expectedFinalVerticalOffset), 0.01);
01666                             Verify.AreEqual((float)anticipatedZoomFactor, originalZoomFactor);
01667                         }
01668                     }
01669                 });
01670
01671                 Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
01672                 CompositionPropertySpy.SynchronouslyTickUIThread(6);
01673
01674                 RunOnUIThread.Execute(() =>
01675                 {
01676                     List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
01677                     ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
01678                     Verify.IsNull(expressionAnimationStatusChanges);
01679                 });
01680             }
01681         }
01682
01683         private void ScrollBy(
01684             ScrollPresenter scrollPresenter,
01685             double horizontalOffsetDelta,
01686             double verticalOffsetDelta,
01687             ScrollingAnimationMode animationMode,
01688             ScrollingSnapPointsMode snapPointsMode,
01689             bool hookViewChangingAndChanged = true,
01690             bool? isAnimationsEnabledOverride = null,
01691             double? expectedFinalHorizontalOffset = null,
01692             double? expectedFinalVerticalOffset = null)
01693         {
01694             using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
01695                 enableAnchorNotifications: false,
01696                 enableInteractionSourcesNotifications: false,
01697                 enableExpressionAnimationStatusNotifications: true,
01698                 isAnimationsEnabledOverride: isAnimationsEnabledOverride))
01699             {
01700                 Log.Comment("Waiting for any pending ExpressionAnimation start/stop notifications to occur");
01701                 CompositionPropertySpy.SynchronouslyTickUIThread(6);
01702
01703                 double? anticipatedHorizontalOffset = null;
01704                 double? anticipatedVerticalOffset = null;
01705                 float? anticipatedZoomFactor = null;
01706                 double originalHorizontalOffset = 0.0;
01707                 double originalVerticalOffset = 0.0;
01708                 float originalZoomFactor = 1.0f;
01709                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
01710                 ScrollPresenterOperation operation = null;
01711
01712                 RunOnUIThread.Execute(() =>
01713                 {
01714                     scrollPresenterTestHooksHelper.ResetExpressionAnimationStatusChanges(scrollPresenter);
01715
01716                     if (hookViewChangingAndChanged)
01717                     {
01718                         scrollPresenter.ScrollStarting += (sender, args) =>
01719                         {
01720                             Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01721                             anticipatedHorizontalOffset = args.HorizontalOffset;
01722                             anticipatedVerticalOffset = args.VerticalOffset;
01723                             anticipatedZoomFactor = args.ZoomFactor;
01724                         };
01725
01726                         scrollPresenter.ZoomStarting += (sender, args) =>
01727                         {
01728                             Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01729                             anticipatedHorizontalOffset = args.HorizontalOffset;
01730                             anticipatedVerticalOffset = args.VerticalOffset;
01731                             anticipatedZoomFactor = args.ZoomFactor;
01732                         };
01733
01734                         scrollPresenter.ViewChanged += (sender, args) =>
01735                         {
01736                             Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01737                         };
01738                     }
01739
01740                     originalHorizontalOffset = scrollPresenter.HorizontalOffset;
01741                     originalVerticalOffset = scrollPresenter.VerticalOffset;
01742                     originalZoomFactor = scrollPresenter.ZoomFactor;
01743
01744                     Log.Comment($"Original HorizontalOffset={originalHorizontalOffset}, VerticalOffset={originalVerticalOffset}, ZoomFactor={originalZoomFactor}");
01745
01746                     if (expectedFinalHorizontalOffset == null)
01747                     {
01748                         expectedFinalHorizontalOffset = horizontalOffsetDelta + originalHorizontalOffset;
01749                     }
01750
01751                     if (expectedFinalVerticalOffset == null)
01752                     {
01753                         expectedFinalVerticalOffset = verticalOffsetDelta + originalVerticalOffset;
01754                     }
01755
01756                     operation = StartScrollBy(
01757                         scrollPresenter,
01758                         horizontalOffsetDelta,
01759                         verticalOffsetDelta,
01760                         animationMode,
01761                         snapPointsMode,
01762                         scrollPresenterViewChangeOperationEvent);
01763                 });
01764
01765                 WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
01766
01767                 RunOnUIThread.Execute(() =>
01768                 {
01769                     Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
01770                     Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
01771                     Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
01772                     Log.Comment($"Final viewChangedCount={viewChangedCount}");
01773
01774                     Verify.AreEqual(expectedFinalHorizontalOffset, scrollPresenter.HorizontalOffset);
01775                     Verify.AreEqual(expectedFinalVerticalOffset, scrollPresenter.VerticalOffset);
01776                     Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
01777                     Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
01778                     Verify.AreEqual(0u, zoomStartingCount);
01779
01780                     if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
01781                     {
01782                         Verify.AreEqual(0u, scrollStartingCount);
01783                         Verify.IsGreaterThan(viewChangedCount, 1u);
01784                     }
01785                     else
01786                     {
01787                         Verify.AreEqual(1u, scrollStartingCount);
01788                         Verify.AreEqual(1u, viewChangedCount);
01789                         if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
01790                         {
01791                             Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - (double)expectedFinalHorizontalOffset), 0.01);
01792                             Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - (double)expectedFinalVerticalOffset), 0.01);
01793                             Verify.AreEqual((float)anticipatedZoomFactor, originalZoomFactor);
01794                         }
01795                     }
01796                 });
01797
01798                 Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
01799                 CompositionPropertySpy.SynchronouslyTickUIThread(6);
01800
01801                 RunOnUIThread.Execute(() =>
01802                 {
01803                     List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
01804                     ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
01805                     Verify.IsNull(expressionAnimationStatusChanges);
01806                 });
01807             }
01808         }
01809
01810         private void AddScrollVelocity(
01811             ScrollPresenter scrollPresenter,
01812             float horizontalVelocity,
01813             float verticalVelocity,
01814             float? horizontalInertiaDecayRate,
01815             float? verticalInertiaDecayRate,
01816             bool waitForViewChangeCompletion = true,
01817             bool hookViewChangingAndChanged = true)
01818         {
01819             using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
01820                 enableAnchorNotifications: false,
01821                 enableInteractionSourcesNotifications: false,
01822                 enableExpressionAnimationStatusNotifications: true))
01823             {
01824                 Log.Comment("Waiting for any pending ExpressionAnimation start/stop notifications to occur");
01825                 CompositionPropertySpy.SynchronouslyTickUIThread(6);
01826
01827                 double originalHorizontalOffset = 0.0;
01828                 double originalVerticalOffset = 0.0;
01829                 float originalZoomFactor = 1.0f;
01830                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
01831                 ScrollPresenterOperation operation = null;
01832
01833                 RunOnUIThread.Execute(() =>
01834                 {
01835                     scrollPresenterTestHooksHelper.ResetExpressionAnimationStatusChanges(scrollPresenter);
01836
01837                     if (hookViewChangingAndChanged)
01838                     {
01839                         scrollPresenter.ScrollStarting += (sender, args) =>
01840                         {
01841                             Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01842                         };
01843
01844                         scrollPresenter.ZoomStarting += (sender, args) =>
01845                         {
01846                             Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
01847                         };
01848
01849                         scrollPresenter.ViewChanged += (sender, args) =>
01850                         {
01851                             Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
01852                         };
01853                     }
01854
01855                     originalHorizontalOffset = scrollPresenter.HorizontalOffset;
01856                     originalVerticalOffset = scrollPresenter.VerticalOffset;
01857                     originalZoomFactor = scrollPresenter.ZoomFactor;
01858
01859                     Log.Comment($"Original HorizontalOffset={originalHorizontalOffset}, VerticalOffset={originalVerticalOffset}, ZoomFactor={originalZoomFactor}");
01860
01861                     operation = StartAddScrollVelocity(
01862                         scrollPresenter,
01863                         horizontalVelocity,
01864                         verticalVelocity,
01865                         horizontalInertiaDecayRate,
01866                         verticalInertiaDecayRate,
01867                         scrollPresenterViewChangeOperationEvent);
01868                 });
01869
01870                 if (waitForViewChangeCompletion)
01871                 {
01872                     WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
01873
01874                     RunOnUIThread.Execute(() =>
01875                     {
01876                         Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
01877                             scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
01878
01879                         if (horizontalVelocity > 0)
01880                             Verify.IsTrue(originalHorizontalOffset < scrollPresenter.HorizontalOffset);
01881                         else if (horizontalVelocity < 0)
01882                             Verify.IsTrue(originalHorizontalOffset > scrollPresenter.HorizontalOffset);
01883                         else
01884                             Verify.IsTrue(originalHorizontalOffset == scrollPresenter.HorizontalOffset);
01885                         if (verticalVelocity > 0)
01886                             Verify.IsTrue(originalVerticalOffset < scrollPresenter.VerticalOffset);
01887                         else if (verticalVelocity < 0)
01888                             Verify.IsTrue(originalVerticalOffset > scrollPresenter.VerticalOffset);
01889                         else
01890                             Verify.IsTrue(originalVerticalOffset == scrollPresenter.VerticalOffset);
01891                         Verify.AreEqual(originalZoomFactor, scrollPresenter.ZoomFactor);
01892                         Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
01893                     });
01894
01895                     Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
01896                     CompositionPropertySpy.SynchronouslyTickUIThread(6);
01897
01898                     RunOnUIThread.Execute(() =>
01899                     {
01900                         List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
01901                         ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
01902                         Verify.IsNull(expressionAnimationStatusChanges);
01903                     });
01904                 }
01905             }
01906         }
01907
01908         private ScrollPresenterOperation StartScrollTo(
01909             ScrollPresenter scrollPresenter,
01910             double horizontalOffset,
01911             double verticalOffset,
01912             ScrollingAnimationMode animationMode,
01913             ScrollingSnapPointsMode snapPointsMode,
01914             AutoResetEvent scrollPresenterViewChangeOperationEvent)
01915         {
01916             Log.Comment("ScrollTo - horizontalOffset={0}, verticalOffset={1}, animationMode={2}, snapPointsMode={3}",
01917                 horizontalOffset, verticalOffset, animationMode, snapPointsMode);
01918
01919             scrollStartingCount = 0u;
01920             zoomStartingCount = 0u;
01921             viewChangedCount = 0u;
01922             ScrollPresenterOperation operation = new ScrollPresenterOperation();
01923
01924             operation.CorrelationId = scrollPresenter.ScrollTo(
01925                 horizontalOffset,
01926                 verticalOffset,
01927                 new ScrollingScrollOptions(animationMode, snapPointsMode));
01928
01929             if (operation.CorrelationId == -1)
01930             {
01931                 scrollPresenterViewChangeOperationEvent.Set();
01932             }
01933             else
01934             {
01935                 scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
01936                 {
01937                     if (args.CorrelationId == operation.CorrelationId)
01938                     {
01939                         ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
01940
01941                         Log.Comment("ScrollCompleted: ScrollTo OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
01942                         operation.Result = result;
01943
01944                         Log.Comment("Setting completion event");
01945                         scrollPresenterViewChangeOperationEvent.Set();
01946                     }
01947                 };
01948             }
01949
01950             return operation;
01951         }
01952
01953         private ScrollPresenterOperation StartScrollBy(
01954             ScrollPresenter scrollPresenter,
01955             double horizontalOffsetDelta,
01956             double verticalOffsetDelta,
01957             ScrollingAnimationMode animationMode,
01958             ScrollingSnapPointsMode snapPointsMode,
01959             AutoResetEvent scrollPresenterViewChangeOperationEvent)
01960         {
01961             Log.Comment("ScrollBy - horizontalOffsetDelta={0}, verticalOffsetDelta={1}, animationMode={2}, snapPointsMode={3}",
01962                 horizontalOffsetDelta, verticalOffsetDelta, animationMode, snapPointsMode);
01963
01964             scrollStartingCount = 0u;
01965             zoomStartingCount = 0u;
01966             viewChangedCount = 0u;
01967             ScrollPresenterOperation operation = new ScrollPresenterOperation();
01968
01969             operation.CorrelationId = scrollPresenter.ScrollBy(
01970                 horizontalOffsetDelta,
01971                 verticalOffsetDelta,
01972                 new ScrollingScrollOptions(animationMode, snapPointsMode));
01973
01974             if (operation.CorrelationId == -1)
01975             {
01976                 scrollPresenterViewChangeOperationEvent.Set();
01977             }
01978             else
01979             {
01980                 scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
01981                 {
01982                     if (args.CorrelationId == operation.CorrelationId)
01983                     {
01984                         ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
01985
01986                         Log.Comment("ScrollCompleted: ScrollBy OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
01987                         operation.Result = result;
01988
01989                         Log.Comment("Setting completion event");
01990                         scrollPresenterViewChangeOperationEvent.Set();
01991                     }
01992                 };
01993             }
01994
01995             return operation;
01996         }
01997
01998         private ScrollPresenterOperation StartAddScrollVelocity(
01999             ScrollPresenter scrollPresenter,
02000             float horizontalVelocity,
02001             float verticalVelocity,
02002             float? horizontalInertiaDecayRate,
02003             float? verticalInertiaDecayRate,
02004             AutoResetEvent scrollPresenterViewChangeOperationEvent)
02005         {
02006             Log.Comment("AddScrollVelocity - horizontalVelocity={0}, verticalVelocity={1}, horizontalInertiaDecayRate={2}, verticalInertiaDecayRate={3}",
02007                 horizontalVelocity, verticalVelocity, horizontalInertiaDecayRate, verticalInertiaDecayRate);
02008
02009             Vector2? inertiaDecayRate = null;
02010
02011             if (horizontalInertiaDecayRate != null && verticalInertiaDecayRate != null)
02012             {
02013                 inertiaDecayRate = new Vector2((float)horizontalInertiaDecayRate, (float)verticalInertiaDecayRate);
02014             }
02015
02016             scrollStartingCount = 0u;
02017             zoomStartingCount = 0u;
02018             viewChangedCount = 0u;
02019             ScrollPresenterOperation operation = new ScrollPresenterOperation();
02020
02021             operation.CorrelationId = scrollPresenter.AddScrollVelocity(
02022                     new Vector2(horizontalVelocity, verticalVelocity),
02023                     inertiaDecayRate);
02024
02025             if (operation.CorrelationId == -1)
02026             {
02027                 scrollPresenterViewChangeOperationEvent.Set();
02028             }
02029             else
02030             {
02031                 scrollPresenter.ScrollCompleted += (ScrollPresenter sender, ScrollingScrollCompletedEventArgs args) =>
02032                 {
02033                     if (args.CorrelationId == operation.CorrelationId)
02034                     {
02035                         ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
02036
02037                         Log.Comment("ScrollCompleted: AddScrollVelocity OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
02038                         operation.Result = result;
02039
02040                         Log.Comment("Setting completion event");
02041                         scrollPresenterViewChangeOperationEvent.Set();
02042                     }
02043                 };
02044             }
02045
02046             return operation;
02047         }
02048
02049         private void ZoomTo(
02050             ScrollPresenter scrollPresenter,
02051             float zoomFactor,
02052             float centerPointX,
02053             float centerPointY,
02054             ScrollingAnimationMode animationMode,
02055             ScrollingSnapPointsMode snapPointsMode,
02056             bool hookViewChangingAndChanged = true,
02057             bool? isAnimationsEnabledOverride = null)
02058         {
02059             using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
02060                 enableAnchorNotifications: false,
02061                 enableInteractionSourcesNotifications: false,
02062                 enableExpressionAnimationStatusNotifications: true,
02063                 isAnimationsEnabledOverride: isAnimationsEnabledOverride))
02064             {
02065                 double? anticipatedHorizontalOffset = null;
02066                 double? anticipatedVerticalOffset = null;
02067                 float? anticipatedZoomFactor = null;
02068                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
02069                 ScrollPresenterOperation operation = null;
02070
02071                 RunOnUIThread.Execute(() =>
02072                 {
02073                     if (hookViewChangingAndChanged)
02074                     {
02075                         scrollPresenter.ScrollStarting += (sender, args) =>
02076                         {
02077                             Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
02078                             anticipatedHorizontalOffset = args.HorizontalOffset;
02079                             anticipatedVerticalOffset = args.VerticalOffset;
02080                             anticipatedZoomFactor = args.ZoomFactor;
02081                         };
02082
02083                         scrollPresenter.ZoomStarting += (sender, args) =>
02084                         {
02085                             Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
02086                             anticipatedHorizontalOffset = args.HorizontalOffset;
02087                             anticipatedVerticalOffset = args.VerticalOffset;
02088                             anticipatedZoomFactor = args.ZoomFactor;
02089                         };
02090
02091                         scrollPresenter.ViewChanged += (sender, args) =>
02092                         {
02093                             Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
02094                         };
02095                     }
02096
02097                     operation = StartZoomTo(
02098                         scrollPresenter,
02099                         zoomFactor,
02100                         centerPointX,
02101                         centerPointY,
02102                         animationMode,
02103                         snapPointsMode,
02104                         scrollPresenterViewChangeOperationEvent);
02105                 });
02106
02107                 WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
02108
02109                 RunOnUIThread.Execute(() =>
02110                 {
02111                     Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
02112                     Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
02113                     Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
02114                     Log.Comment($"Final viewChangedCount={viewChangedCount}");
02115
02116                     Verify.AreEqual(zoomFactor, scrollPresenter.ZoomFactor);
02117                     Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
02118                     Verify.AreEqual(0u, scrollStartingCount);
02119
02120                     if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
02121                     {
02122                         Verify.AreEqual(0u, zoomStartingCount);
02123                         Verify.IsGreaterThan(viewChangedCount, 1u);
02124                     }
02125                     else
02126                     {
02127                         Verify.AreEqual(1u, zoomStartingCount);
02128                         Verify.AreEqual(1u, viewChangedCount);
02129                         if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
02130                         {
02131                             Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - scrollPresenter.HorizontalOffset), 0.01);
02132                             Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - scrollPresenter.VerticalOffset), 0.01);
02133                             Verify.IsLessThan(Math.Abs((float)anticipatedZoomFactor - scrollPresenter.ZoomFactor), 0.001f);
02134                         }
02135                     }
02136                 });
02137
02138                 Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
02139                 CompositionPropertySpy.SynchronouslyTickUIThread(6);
02140
02141                 RunOnUIThread.Execute(() =>
02142                 {
02143                     List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
02144                     ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
02145                     VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(expressionAnimationStatusChanges);
02146                 });
02147             }
02148         }
02149
02150         private void ZoomBy(
02151             ScrollPresenter scrollPresenter,
02152             float zoomFactorDelta,
02153             float centerPointX,
02154             float centerPointY,
02155             ScrollingAnimationMode animationMode,
02156             ScrollingSnapPointsMode snapPointsMode,
02157             bool hookViewChangingAndChanged = true,
02158             bool? isAnimationsEnabledOverride = null)
02159         {
02160             using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
02161                 enableAnchorNotifications: false,
02162                 enableInteractionSourcesNotifications: false,
02163                 enableExpressionAnimationStatusNotifications: true,
02164                 isAnimationsEnabledOverride: isAnimationsEnabledOverride))
02165             {
02166                 double? anticipatedHorizontalOffset = null;
02167                 double? anticipatedVerticalOffset = null;
02168                 float? anticipatedZoomFactor = null;
02169                 float originalZoomFactor = 1.0f;
02170                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
02171                 ScrollPresenterOperation operation = null;
02172
02173                 RunOnUIThread.Execute(() =>
02174                 {
02175                     if (hookViewChangingAndChanged)
02176                     {
02177                         scrollPresenter.ScrollStarting += (sender, args) =>
02178                         {
02179                             Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
02180                             anticipatedHorizontalOffset = args.HorizontalOffset;
02181                             anticipatedVerticalOffset = args.VerticalOffset;
02182                             anticipatedZoomFactor = args.ZoomFactor;
02183                         };
02184
02185                         scrollPresenter.ZoomStarting += (sender, args) =>
02186                         {
02187                             Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
02188                             anticipatedHorizontalOffset = args.HorizontalOffset;
02189                             anticipatedVerticalOffset = args.VerticalOffset;
02190                             anticipatedZoomFactor = args.ZoomFactor;
02191                         };
02192
02193                         scrollPresenter.ViewChanged += (sender, args) =>
02194                         {
02195                             Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
02196                         };
02197                     }
02198
02199                     originalZoomFactor = scrollPresenter.ZoomFactor;
02200
02201                     Log.Comment($"Original HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={originalZoomFactor}");
02202
02203                     operation = StartZoomBy(
02204                         scrollPresenter,
02205                         zoomFactorDelta,
02206                         centerPointX,
02207                         centerPointY,
02208                         animationMode,
02209                         snapPointsMode,
02210                         scrollPresenterViewChangeOperationEvent);
02211                 });
02212
02213                 WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
02214
02215                 RunOnUIThread.Execute(() =>
02216                 {
02217                     Log.Comment($"Final HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={scrollPresenter.ZoomFactor}");
02218                     Log.Comment($"Final scrollStartingCount={scrollStartingCount}");
02219                     Log.Comment($"Final zoomStartingCount={zoomStartingCount}");
02220                     Log.Comment($"Final viewChangedCount={viewChangedCount}");
02221
02222                     Verify.AreEqual(zoomFactorDelta + originalZoomFactor, scrollPresenter.ZoomFactor);
02223                     Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
02224                     Verify.AreEqual(0u, scrollStartingCount);
02225
02226                     if (GetEffectiveIsAnimationEnabled(animationMode, isAnimationsEnabledOverride))
02227                     {
02228                         Verify.AreEqual(0u, zoomStartingCount);
02229                         Verify.IsGreaterThan(viewChangedCount, 1u);
02230                     }
02231                     else
02232                     {
02233                         Verify.AreEqual(1u, zoomStartingCount);
02234                         Verify.AreEqual(1u, viewChangedCount);
02235                         if (anticipatedHorizontalOffset != null && anticipatedVerticalOffset != null && anticipatedZoomFactor != null)
02236                         {
02237                             Verify.IsLessThan(Math.Abs((double)anticipatedHorizontalOffset - scrollPresenter.HorizontalOffset), 0.01);
02238                             Verify.IsLessThan(Math.Abs((double)anticipatedVerticalOffset - scrollPresenter.VerticalOffset), 0.01);
02239                             Verify.IsLessThan(Math.Abs((float)anticipatedZoomFactor - scrollPresenter.ZoomFactor), 0.001f);
02240                         }
02241                     }
02242                 });
02243
02244                 Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
02245                 CompositionPropertySpy.SynchronouslyTickUIThread(6);
02246
02247                 RunOnUIThread.Execute(() =>
02248                 {
02249                     List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
02250                     ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
02251                     VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(expressionAnimationStatusChanges);
02252                 });
02253             }
02254         }
02255
02256         private void AddZoomVelocity(
02257             ScrollPresenter scrollPresenter,
02258             float zoomFactorVelocity,
02259             float? inertiaDecayRate,
02260             float centerPointX,
02261             float centerPointY,
02262             bool waitForViewChangeCompletion = true,
02263             bool hookViewChangingAndChanged = true)
02264         {
02265             using (ScrollPresenterTestHooksHelper scrollPresenterTestHooksHelper = new ScrollPresenterTestHooksHelper(
02266                 enableAnchorNotifications: false,
02267                 enableInteractionSourcesNotifications: false,
02268                 enableExpressionAnimationStatusNotifications: true))
02269             {
02270                 float originalZoomFactor = 1.0f;
02271                 AutoResetEvent scrollPresenterViewChangeOperationEvent = new AutoResetEvent(false);
02272                 ScrollPresenterOperation operation = null;
02273
02274                 RunOnUIThread.Execute(() =>
02275                 {
02276                     if (hookViewChangingAndChanged)
02277                     {
02278                         scrollPresenter.ScrollStarting += (sender, args) =>
02279                         {
02280                             Log.Comment($"ScrollStarting scrollStartingCount={++scrollStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
02281                         };
02282
02283                         scrollPresenter.ZoomStarting += (sender, args) =>
02284                         {
02285                             Log.Comment($"ZoomStarting zoomStartingCount={++zoomStartingCount} - HorizontalOffset={args.HorizontalOffset}, VerticalOffset={args.VerticalOffset}, ZoomFactor={args.ZoomFactor}");
02286                         };
02287
02288                         scrollPresenter.ViewChanged += (sender, args) =>
02289                         {
02290                             Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
02291                         };
02292                     }
02293
02294                     originalZoomFactor = scrollPresenter.ZoomFactor;
02295
02296                     Log.Comment($"Original HorizontalOffset={scrollPresenter.HorizontalOffset}, VerticalOffset={scrollPresenter.VerticalOffset}, ZoomFactor={originalZoomFactor}");
02297
02298                     operation = StartAddZoomVelocity(
02299                         scrollPresenter,
02300                         zoomFactorVelocity,
02301                         inertiaDecayRate,
02302                         centerPointX,
02303                         centerPointY,
02304                         scrollPresenterViewChangeOperationEvent);
02305                 });
02306
02307                 if (waitForViewChangeCompletion)
02308                 {
02309                     WaitForEvent("Waiting for view change completion", scrollPresenterViewChangeOperationEvent);
02310
02311                     RunOnUIThread.Execute(() =>
02312                     {
02313                         Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
02314                             scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
02315
02316                         if (zoomFactorVelocity > 0)
02317                             Verify.IsTrue(originalZoomFactor < scrollPresenter.ZoomFactor);
02318                         else if (zoomFactorVelocity < 0)
02319                             Verify.IsTrue(originalZoomFactor > scrollPresenter.ZoomFactor);
02320                         else
02321                             Verify.IsTrue(originalZoomFactor == scrollPresenter.ZoomFactor);
02322                         Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operation.Result);
02323                     });
02324
02325                     Log.Comment("Waiting for any ExpressionAnimation start/stop notification");
02326                     CompositionPropertySpy.SynchronouslyTickUIThread(6);
02327
02328                     RunOnUIThread.Execute(() =>
02329                     {
02330                         List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges = scrollPresenterTestHooksHelper.GetExpressionAnimationStatusChanges(scrollPresenter);
02331                         ScrollPresenterTestHooksHelper.LogExpressionAnimationStatusChanges(expressionAnimationStatusChanges);
02332                         VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(expressionAnimationStatusChanges);
02333                     });
02334                 }
02335             }
02336         }
02337
02338         private ScrollPresenterOperation StartZoomTo(
02339             ScrollPresenter scrollPresenter,
02340             float zoomFactor,
02341             float centerPointX,
02342             float centerPointY,
02343             ScrollingAnimationMode animationMode,
02344             ScrollingSnapPointsMode snapPointsMode,
02345             AutoResetEvent scrollPresenterViewChangeOperationEvent)
02346         {
02347             Log.Comment("ZoomTo - zoomFactor={0}, centerPoint=({1},{2}), animationMode={3}, snapPointsMode={4}",
02348                 zoomFactor, centerPointX, centerPointY, animationMode, snapPointsMode);
02349
02350             scrollStartingCount = 0u;
02351             zoomStartingCount = 0u;
02352             viewChangedCount = 0u;
02353             ScrollPresenterOperation operation = new ScrollPresenterOperation();
02354
02355             operation.CorrelationId = scrollPresenter.ZoomTo(
02356                 zoomFactor,
02357                 new Vector2(centerPointX, centerPointY),
02358                 new ScrollingZoomOptions(animationMode, snapPointsMode));
02359
02360             if (operation.CorrelationId == -1)
02361             {
02362                 scrollPresenterViewChangeOperationEvent.Set();
02363             }
02364             else
02365             {
02366                 scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
02367                 {
02368                     if (args.CorrelationId == operation.CorrelationId)
02369                     {
02370                         ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);
02371
02372                         Log.Comment("ZoomCompleted: ZoomTo ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
02373                         operation.Result = result;
02374
02375                         Log.Comment("Setting completion event");
02376                         scrollPresenterViewChangeOperationEvent.Set();
02377                     }
02378                 };
02379             }
02380
02381             return operation;
02382         }
02383
02384         private ScrollPresenterOperation StartZoomBy(
02385             ScrollPresenter scrollPresenter,
02386             float zoomFactorDelta,
02387             float centerPointX,
02388             float centerPointY,
02389             ScrollingAnimationMode animationMode,
02390             ScrollingSnapPointsMode snapPointsMode,
02391             AutoResetEvent scrollPresenterViewChangeOperationEvent)
02392         {
02393             Log.Comment("ZoomBy - zoomFactorDelta={0}, centerPoint=({1},{2}), animationMode={3}, snapPointsMode={4}",
02394                 zoomFactorDelta, centerPointX, centerPointY, animationMode, snapPointsMode);
02395
02396             scrollStartingCount = 0u;
02397             zoomStartingCount = 0u;
02398             viewChangedCount = 0u;
02399             ScrollPresenterOperation operation = new ScrollPresenterOperation();
02400
02401             operation.CorrelationId = scrollPresenter.ZoomBy(
02402                 zoomFactorDelta,
02403                 new Vector2(centerPointX, centerPointY),
02404                 new ScrollingZoomOptions(animationMode, snapPointsMode));
02405
02406             if (operation.CorrelationId == -1)
02407             {
02408                 scrollPresenterViewChangeOperationEvent.Set();
02409             }
02410             else
02411             {
02412                 scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
02413                 {
02414                     if (args.CorrelationId == operation.CorrelationId)
02415                     {
02416                         ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);
02417
02418                         Log.Comment("ZoomCompleted: ZoomBy ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
02419                         operation.Result = result;
02420
02421                         Log.Comment("Setting completion event");
02422                         scrollPresenterViewChangeOperationEvent.Set();
02423                     }
02424                 };
02425             }
02426
02427             return operation;
02428         }
02429
02430         private ScrollPresenterOperation StartAddZoomVelocity(
02431             ScrollPresenter scrollPresenter,
02432             float zoomFactorVelocity,
02433             float? inertiaDecayRate,
02434             float centerPointX,
02435             float centerPointY,
02436             AutoResetEvent scrollPresenterViewChangeOperationEvent)
02437         {
02438             Log.Comment("AddZoomVelocity - zoomFactorVelocity={0}, inertiaDecayRate={1}, centerPoint=({2},{3})",
02439                 zoomFactorVelocity, inertiaDecayRate, centerPointX, centerPointY);
02440
02441             scrollStartingCount = 0u;
02442             zoomStartingCount = 0u;
02443             viewChangedCount = 0u;
02444             ScrollPresenterOperation operation = new ScrollPresenterOperation();
02445
02446             operation.CorrelationId = scrollPresenter.AddZoomVelocity(
02447                 zoomFactorVelocity, new Vector2(centerPointX, centerPointY), inertiaDecayRate);
02448
02449             if (operation.CorrelationId == -1)
02450             {
02451                 scrollPresenterViewChangeOperationEvent.Set();
02452             }
02453             else
02454             {
02455                 scrollPresenter.ZoomCompleted += (ScrollPresenter sender, ScrollingZoomCompletedEventArgs args) =>
02456                 {
02457                     if (args.CorrelationId == operation.CorrelationId)
02458                     {
02459                         ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetZoomCompletedResult(args);
02460
02461                         Log.Comment("ZoomCompleted: AddZoomVelocity ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
02462                         operation.Result = result;
02463
02464                         Log.Comment("Setting completion event");
02465                         scrollPresenterViewChangeOperationEvent.Set();
02466                     }
02467                 };
02468             }
02469             return operation;
02470         }
02471
02472         private void InterruptViewChange(
02473             ViewChangeInterruptionKind viewChangeInterruptionKind)
02474         {
02475             bool viewChangeInterruptionDone = false;
02476             bool changeOffsetsFirst =
02477                 viewChangeInterruptionKind == ViewChangeInterruptionKind.OffsetsChangeByOffsetsChange || viewChangeInterruptionKind == ViewChangeInterruptionKind.OffsetsChangeByZoomFactorChange;
02478             bool changeOffsetsSecond =
02479                 viewChangeInterruptionKind == ViewChangeInterruptionKind.OffsetsChangeByOffsetsChange || viewChangeInterruptionKind == ViewChangeInterruptionKind.ZoomFactorChangeByOffsetsChange;
02480             ScrollPresenter scrollPresenter = null;
02481             Rectangle rectangleScrollPresenterContent = null;
02482             AutoResetEvent scrollPresenterLoadedEvent = new AutoResetEvent(false);
02483             AutoResetEvent[] scrollPresenterViewChangeOperationEvents = null;
02484             ScrollPresenterOperation[] operations = null;
02485
02486             RunOnUIThread.Execute(() =>
02487             {
02488                 rectangleScrollPresenterContent = new Rectangle();
02489                 scrollPresenter = new ScrollPresenter();
02490
02491                 SetupDefaultUI(scrollPresenter, rectangleScrollPresenterContent, scrollPresenterLoadedEvent);
02492             });
02493
02494             WaitForEvent("Waiting for Loaded event", scrollPresenterLoadedEvent);
02495
02496             RunOnUIThread.Execute(() =>
02497             {
02498                 scrollPresenterViewChangeOperationEvents = new AutoResetEvent[2];
02499                 scrollPresenterViewChangeOperationEvents[0] = new AutoResetEvent(false);
02500                 scrollPresenterViewChangeOperationEvents[1] = new AutoResetEvent(false);
02501
02502                 operations = new ScrollPresenterOperation[2];
02503                 operations[0] = null;
02504                 operations[1] = null;
02505
02506                 scrollPresenter.ViewChanged += (sender, args) =>
02507                 {
02508                     Log.Comment($"ViewChanged viewChangedCount={++viewChangedCount} - HorizontalOffset={sender.HorizontalOffset}, VerticalOffset={sender.VerticalOffset}, ZoomFactor={sender.ZoomFactor}");
02509
02510                     if (viewChangedCount == 3u && !viewChangeInterruptionDone)
02511                     {
02512                         viewChangeInterruptionDone = true;
02513                         if (changeOffsetsSecond)
02514                         {
02515                             operations[1] = StartScrollTo(
02516                                 scrollPresenter,
02517                                 500.0,
02518                                 300.0,
02519                                 ScrollingAnimationMode.Enabled,
02520                                 ScrollingSnapPointsMode.Ignore,
02521                                 scrollPresenterViewChangeOperationEvents[1]);
02522                         }
02523                         else
02524                         {
02525                             operations[1] = StartZoomTo(
02526                                 scrollPresenter,
02527                                 7.0f,
02528                                 70.0f,
02529                                 50.0f,
02530                                 ScrollingAnimationMode.Enabled,
02531                                 ScrollingSnapPointsMode.Ignore,
02532                                 scrollPresenterViewChangeOperationEvents[1]);
02533                         }
02534                     }
02535                 };
02536
02537                 if (changeOffsetsFirst)
02538                 {
02539                     operations[0] = StartScrollTo(
02540                         scrollPresenter,
02541                         600.0,
02542                         400.0,
02543                         ScrollingAnimationMode.Enabled,
02544                         ScrollingSnapPointsMode.Ignore,
02545                         scrollPresenterViewChangeOperationEvents[0]);
02546                 }
02547                 else
02548                 {
02549                     operations[0] = StartZoomTo(
02550                         scrollPresenter,
02551                         8.0f,
02552                         100.0f,
02553                         150.0f,
02554                         ScrollingAnimationMode.Enabled,
02555                         ScrollingSnapPointsMode.Ignore,
02556                         scrollPresenterViewChangeOperationEvents[0]);
02557                 }
02558             });
02559
02560             WaitForEvent("Waiting for first view change completion", scrollPresenterViewChangeOperationEvents[0]);
02561
02562             WaitForEvent("Waiting for second view change completion", scrollPresenterViewChangeOperationEvents[1]);
02563
02564             RunOnUIThread.Execute(() =>
02565             {
02566                 Log.Comment("Final HorizontalOffset={0}, VerticalOffset={1}, ZoomFactor={2}",
02567                     scrollPresenter.HorizontalOffset, scrollPresenter.VerticalOffset, scrollPresenter.ZoomFactor);
02568
02569                 if (changeOffsetsFirst && changeOffsetsSecond)
02570                 {
02571                     Verify.AreEqual(500.0, scrollPresenter.HorizontalOffset);
02572                     Verify.AreEqual(300.0, scrollPresenter.VerticalOffset);
02573                     Verify.AreEqual(1.0f, scrollPresenter.ZoomFactor);
02574                 }
02575                 if (changeOffsetsFirst && !changeOffsetsSecond)
02576                 {
02577                     Verify.IsGreaterThanOrEqual(scrollPresenter.HorizontalOffset, 600.0);
02578                     Verify.IsGreaterThanOrEqual(scrollPresenter.VerticalOffset, 400.0);
02579                     Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
02580                 }
02581                 if (!changeOffsetsFirst && changeOffsetsSecond)
02582                 {
02583                     Verify.IsGreaterThanOrEqual(scrollPresenter.HorizontalOffset, 500.0);
02584                     Verify.IsGreaterThanOrEqual(scrollPresenter.VerticalOffset, 300.0);
02585                     Verify.AreEqual(8.0f, scrollPresenter.ZoomFactor);
02586                 }
02587                 if (!changeOffsetsFirst && !changeOffsetsSecond)
02588                 {
02589                     Verify.AreEqual(7.0f, scrollPresenter.ZoomFactor);
02590                 }
02591
02592                 Verify.AreEqual(ScrollPresenterViewChangeResult.Interrupted, operations[0].Result);
02593                 Verify.AreEqual(ScrollPresenterViewChangeResult.Completed, operations[1].Result);
02594             });
02595         }
02596
02597         private void WaitForEvent(string logComment, EventWaitHandle eventWaitHandle)
02598         {
02599             Log.Comment(logComment);
02600             if (Debugger.IsAttached)
02601             {
02602                 eventWaitHandle.WaitOne();
02603             }
02604             else
02605             {
02606                 if (!eventWaitHandle.WaitOne(TimeSpan.FromMilliseconds(c_MaxWaitDuration)))
02607                 {
02608                     throw new Exception("Timeout expiration in WaitForEvent.");
02609                 }
02610             }
02611         }
02612
02613         private void VerifyExpressionAnimationStatusChangesForTranslationAndZoomFactorSuspension(List<ExpressionAnimationStatusChange> expressionAnimationStatusChanges)
02614         {
02615             // Facades are enabled. The translation and zoom factor animations are expected to be interrupted momentarily.
02616             Verify.IsNotNull(expressionAnimationStatusChanges);
02617             Verify.AreEqual(4, expressionAnimationStatusChanges.Count);
02618
02619             Verify.IsFalse(expressionAnimationStatusChanges[0].IsExpressionAnimationStarted);
02620             Verify.IsFalse(expressionAnimationStatusChanges[1].IsExpressionAnimationStarted);
02621             Verify.IsTrue(expressionAnimationStatusChanges[2].IsExpressionAnimationStarted);
02622             Verify.IsTrue(expressionAnimationStatusChanges[3].IsExpressionAnimationStarted);
02623
02624             Verify.AreEqual("Translation", expressionAnimationStatusChanges[0].PropertyName);
02625             Verify.AreEqual("Scale", expressionAnimationStatusChanges[1].PropertyName);
02626             Verify.AreEqual("Translation", expressionAnimationStatusChanges[2].PropertyName);
02627             Verify.AreEqual("Scale", expressionAnimationStatusChanges[3].PropertyName);
02628         }
02629
02630         private bool GetEffectiveIsAnimationEnabled(ScrollingAnimationMode animationMode, bool? isAnimationsEnabledOverride)
02631         {
02632             switch (animationMode)
02633             {
02634                 case ScrollingAnimationMode.Auto:
02635                     switch (isAnimationsEnabledOverride)
02636                     {
02637                         case null:
02638                             return new UISettings().AnimationsEnabled;
02639                         default:
02640                             return isAnimationsEnabledOverride.Value;
02641                     }
02642                 case ScrollingAnimationMode.Enabled:
02643                     return true;
02644             }
02645
02646             return false;
02647         }
02648
02649         private class ScrollPresenterOperation
02650         {
02651             public ScrollPresenterOperation()
02652             {
02653                 Result = ScrollPresenterViewChangeResult.Ignored;
02654                 CorrelationId = -1;
02655             }
02656
02657             public ScrollPresenterViewChangeResult Result
02658             {
02659                 get;
02660                 set;
02661             }
02662
02663             public int CorrelationId
02664             {
02665                 get;
02666                 set;
02667             }
02668         }
02669     }
02670 }
Generated on Sun Dec 1 2024 20:52:13 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommonStyles/TestUI/BorderThicknessPage.xaml.cs Source File

  • File List
  • File Members
  • CommonStyles
  • TestUI

BorderThicknessPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     [TopLevelTestPage(Name = "BorderThickness")]
00007     public sealed partial class BorderThicknessPage : TestPage
00008     {
00009         public BorderThicknessPage()
00010         {
00011             this.InitializeComponent();
00012         }
00013     }
00014 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RatingControlPage Member List

This is the complete list of members for RatingControlPage, including all inherited members.
_aqua | RatingControlPage | [private]
_dt | RatingControlPage | [private]
_secondTextBlockUI | RatingControlPage | [private]
_tomato | RatingControlPage | [private]
AnimatedValuesSpy | RatingControlPage | [private]
Button_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
ChangeCustomImagesTwoType_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
CheckSpyingTicksRequirement() | RatingControlPage | [inline, private]
CollapsedRatingControlButton_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
ColorFlipButton_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
CompositionTarget_Rendering(object sender, object e) | RatingControlPage | [inline, private]
CustomImages_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
CustomImagesTwo_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
DisabledFallbackRating_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
DisabledImageFallbackRating_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
DispatcherTimer_Tick(object sender, object e) | RatingControlPage | [inline, private]
IsRenderingHooked | RatingControlPage | [private]
MagicDisengager_ValueChanged(RatingControl sender, object args) | RatingControlPage | [inline, private]
MakeTheAboveRatingSquares_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
MaxRating9Unset_ValueChanged(RatingControl sender, object args) | RatingControlPage | [inline, private]
MyRatingIsClearEnabled_ValueChanged(RatingControl sender, object args) | RatingControlPage | [inline, private]
MyRatingReadOnly_ValueChanged(RatingControl sender, object args) | RatingControlPage | [inline, private]
NoFallbackRating_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
OnNavigatingFrom(NavigatingCancelEventArgs e) | RatingControlPage | [inline, protected]
PerformGlyphVerification(RatingControl rc, String expectedGlyph, TextBlock resultTb, String stackPanelName, SolidColorBrush expectedColor=null) | RatingControlPage | [inline, private]
PerformImageVerification(RatingControl rc, String expectedUri, TextBlock resultTb, String stackPanelName, SolidColorBrush expectedColor=null) | RatingControlPage | [inline, private]
PlaceholderFallbackRating_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
PlaceholderImageFallbackRating_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
PointerOverFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e) | RatingControlPage | [inline, private]
PointerOverImageFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e) | RatingControlPage | [inline, private]
PointerOverPlaceholderFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e) | RatingControlPage | [inline, private]
PointerOverPlaceholderImageFallbackRating_PointerMoved(object sender, PointerRoutedEventArgs e) | RatingControlPage | [inline, private]
RatingBindingSampleButton_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
RatingControlPage() | RatingControlPage | [inline]
RatingControlPage_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
RatingXBindSampleButton_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
ResetSpyOutput() | RatingControlPage | [inline, private]
ScaleAnimation | RatingControlPage | [private]
SearchVisualTree(DependencyObject root, string name) | RatingControlPage | [inline, private]
SetupAnimatedValuesSpy() | RatingControlPage | [inline, private]
SpyAnimatedValues() | RatingControlPage | [inline, private]
StartAnimatedValuesSpy() | RatingControlPage | [inline, private]
StopAnimatedValuesSpy() | RatingControlPage | [inline, private]
TestRatingControl_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
TestRatingControl_ValueChanged(RatingControl sender, object args) | RatingControlPage | [inline, private]
TestRatingControlButton_Click(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
ThemeResourceNameToColorBrush(String themeResource) | RatingControlPage | [inline, private]
TickForValuesSpy() | RatingControlPage | [inline, private]
UIThreadTicksForValuesSpy | RatingControlPage | [private]
UnsetFallbackRating_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
UnsetImageFallbackRating_Loaded(object sender, RoutedEventArgs e) | RatingControlPage | [inline, private]
ValueChangeInMarkup_ValueChanged(RatingControl sender, object args) | RatingControlPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TitleBarProperties Member List

This is the complete list of members for TitleBarProperties, including all inherited members.
BackRequested(winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const &value) | TitleBarProperties |
BackRequested(winrt::event_token const &token) | TitleBarProperties |
ClearProperties() | TitleBarProperties | [static]
Content(winrt::IInspectable const &value) | TitleBarProperties |
Content() | TitleBarProperties |
ContentProperty() | TitleBarProperties | [inline, static]
EnsureProperties() | TitleBarProperties | [static]
Footer(winrt::IInspectable const &value) | TitleBarProperties |
Footer() | TitleBarProperties |
FooterProperty() | TitleBarProperties | [inline, static]
Header(winrt::IInspectable const &value) | TitleBarProperties |
Header() | TitleBarProperties |
HeaderProperty() | TitleBarProperties | [inline, static]
IconSource(winrt::IconSource const &value) | TitleBarProperties |
IconSource() | TitleBarProperties |
IconSourceProperty() | TitleBarProperties | [inline, static]
IsBackButtonVisible(bool value) | TitleBarProperties |
IsBackButtonVisible() | TitleBarProperties |
IsBackButtonVisibleProperty() | TitleBarProperties | [inline, static]
IsBackEnabled(bool value) | TitleBarProperties |
IsBackEnabled() | TitleBarProperties |
IsBackEnabledProperty() | TitleBarProperties | [inline, static]
IsPaneToggleButtonVisible(bool value) | TitleBarProperties |
IsPaneToggleButtonVisible() | TitleBarProperties |
IsPaneToggleButtonVisibleProperty() | TitleBarProperties | [inline, static]
m_backRequestedEventSource | TitleBarProperties |
m_paneToggleRequestedEventSource | TitleBarProperties |
OnContentPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnFooterPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnHeaderPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnIconSourcePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnIsBackButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnIsBackEnabledPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnIsPaneToggleButtonVisiblePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnSubtitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnTemplateSettingsPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
OnTitlePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | TitleBarProperties | [static]
PaneToggleRequested(winrt::TypedEventHandler< winrt::TitleBar, winrt::IInspectable > const &value) | TitleBarProperties |
PaneToggleRequested(winrt::event_token const &token) | TitleBarProperties |
s_ContentProperty | TitleBarProperties | [static]
s_FooterProperty | TitleBarProperties | [static]
s_HeaderProperty | TitleBarProperties | [static]
s_IconSourceProperty | TitleBarProperties | [static]
s_IsBackButtonVisibleProperty | TitleBarProperties | [static]
s_IsBackEnabledProperty | TitleBarProperties | [static]
s_IsPaneToggleButtonVisibleProperty | TitleBarProperties | [static]
s_SubtitleProperty | TitleBarProperties | [static]
s_TemplateSettingsProperty | TitleBarProperties | [static]
s_TitleProperty | TitleBarProperties | [static]
Subtitle(winrt::hstring const &value) | TitleBarProperties |
Subtitle() | TitleBarProperties |
SubtitleProperty() | TitleBarProperties | [inline, static]
TemplateSettings(winrt::TitleBarTemplateSettings const &value) | TitleBarProperties |
TemplateSettings() | TitleBarProperties |
TemplateSettingsProperty() | TitleBarProperties | [inline, static]
Title(winrt::hstring const &value) | TitleBarProperties |
Title() | TitleBarProperties |
TitleBarProperties() | TitleBarProperties |
TitleProperty() | TitleBarProperties | [inline, static]
Generated on Sun Dec 1 2024 20:53:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Reveal/TestUI/RevealScenarioList.xaml.cs Source File

  • File List
  • File Members
  • Materials
  • Reveal
  • TestUI

RevealScenarioList.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Collections.ObjectModel;
00007 using System.IO;
00008 using System.Linq;
00009 using System.Runtime.InteropServices.WindowsRuntime;
00010 using Windows.Foundation;
00011 using Windows.Foundation.Collections;
00012 using Microsoft.UI.Xaml;
00013 using Microsoft.UI.Xaml.Controls;
00014 using Microsoft.UI.Xaml.Controls.Primitives;
00015 using Microsoft.UI.Xaml.Data;
00016 using Microsoft.UI.Xaml.Input;
00017 using Microsoft.UI.Xaml.Media;
00018 using Microsoft.UI.Xaml.Media.Imaging;
00019 using Microsoft.UI.Xaml.Navigation;
00020 using MUXControlsTestApp.Utilities;
00021
00022 namespace MUXControlsTestApp
00023 {
00024     public sealed partial class RevealScenarioList : TestPage
00025     {
00026         private ObservableCollection<RevealGridItem> listSource;
00027         private ObservableCollection<RevealBackgroundItem> backgroundTypeSource;
00028
00029         public RevealScenarioList()
00030         {
00031             this.InitializeComponent();
00032
00033             listSource = RevealGridItem.GetItems();
00034             backgroundTypeSource = RevealBackgroundItem.GetItems();
00035         }
00036
00037         private void BackgroundComboBoxChanged(object sender, SelectionChangedEventArgs e)
00038         {
00039             ComboBox box = (ComboBox)sender;
00040             RevealBackgroundItem item = (RevealBackgroundItem)box.SelectedItem;
00041             VisualStateManager.GoToState(this, item.Name, false);
00042         }
00043     }
00044
00045 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterMousePanningPage Member List

This is the complete list of members for ScrollPresenterMousePanningPage, including all inherited members.
_isInConstantVelocityPan | ScrollPresenterMousePanningPage | [private]
_isInMousePan | ScrollPresenterMousePanningPage | [private]
_isMiddleButtonPressed | ScrollPresenterMousePanningPage | [private]
_preConstantVelocityPanPosition | ScrollPresenterMousePanningPage | [private]
_preMousePanHorizontalOffset | ScrollPresenterMousePanningPage | [private]
_preMousePanPosition | ScrollPresenterMousePanningPage | [private]
_preMousePanVerticalOffset | ScrollPresenterMousePanningPage | [private]
BtnClearEvents_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ScrollPresenterMousePanningPage | [inline, private]
LogEvent(string log) | ScrollPresenterMousePanningPage | [inline, private]
ScrollPresenter_PointerCanceled(object sender, PointerRoutedEventArgs e) | ScrollPresenterMousePanningPage | [inline, private]
ScrollPresenter_PointerCaptureLost(object sender, PointerRoutedEventArgs e) | ScrollPresenterMousePanningPage | [inline, private]
ScrollPresenter_PointerMoved(object sender, PointerRoutedEventArgs e) | ScrollPresenterMousePanningPage | [inline, private]
ScrollPresenter_PointerPressed(object sender, PointerRoutedEventArgs e) | ScrollPresenterMousePanningPage | [inline, private]
ScrollPresenter_PointerReleased(object sender, PointerRoutedEventArgs e) | ScrollPresenterMousePanningPage | [inline, private]
ScrollPresenterMousePanningPage() | ScrollPresenterMousePanningPage | [inline]
StartConstantVelocityPan() | ScrollPresenterMousePanningPage | [inline, private]
StopConstantVelocityPan() | ScrollPresenterMousePanningPage | [inline, private]
StopMousePan() | ScrollPresenterMousePanningPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:30 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewBackRequestedEventArgs.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewBackRequestedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewBackRequestedEventArgs.g.h"
00007
00008 class NavigationViewBackRequestedEventArgs :
00009     public winrt::implementation::NavigationViewBackRequestedEventArgsT<NavigationViewBackRequestedEventArgs>
00010 {};
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ScrollViewTestHooks.properties.cpp Source File

  • File List
  • File Members
  • Generated

ScrollViewTestHooks.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ScrollViewTestHooks.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ScrollViewTestHooks)
00012 }
00013
00014 #include "ScrollViewTestHooks.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:53 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Interactions/ButtonInteraction/TestUI/ButtonInteractionPage.xaml.cs Source File

  • File List
  • File Members
  • Interactions
  • ButtonInteraction
  • TestUI

ButtonInteractionPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005
00006 using Microsoft.UI.Xaml;
00007 using Microsoft.UI.Xaml.Automation;
00008
00009 using Microsoft.UI.Private.Controls;
00010 using Microsoft.UI.Xaml.Media;
00011 using Windows.UI;
00012
00013 namespace MUXControlsTestApp
00014 {
00015     [TopLevelTestPage(Name = "ButtonInteraction", Icon = "Button.png")]
00016     public sealed partial class ButtonInteractionPage : TestPage
00017     {
00018         private uint _invokeCount = 0;
00019
00020         public ButtonInteractionPage()
00021         {
00022             this.InitializeComponent();
00023
00024             Interaction = new ButtonInteraction();
00025             Interaction.Invoked += OnTargetElementInvoked;
00026             Interaction.PropertyChanged += OnInteractionPropertyChanged;
00027
00028             targetElement.Interactions.Add(Interaction);
00029         }
00030
00031         public ButtonInteraction Interaction
00032         {
00033             get;
00034             private set;
00035         }
00036
00037         private void OnInvokeModeChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
00038         {
00039             if (Interaction != null)
00040             {
00041                 Interaction.InvokeMode = (ButtonInteractionInvokeMode)invokeModeCB.SelectedIndex;
00042             }
00043         }
00044
00045         private void OnInteractionPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
00046         {
00047             if (e.PropertyName == "IsPressing")
00048             {
00049                 UpdateRectVisualState();
00050                 isPressingTB.Text = Interaction.IsPressing ? "True" : "False";
00051             }
00052             else if (e.PropertyName == "IsHovering")
00053             {
00054                 UpdateRectVisualState();
00055                 isHoveringTB.Text = Interaction.IsHovering ? "True" : "False";
00056             }
00057         }
00058
00059         private void OnResetInvokeCountClick(object sender, RoutedEventArgs e)
00060         {
00061             _invokeCount = 0;
00062             invokeCountTB.Text = "0";
00063         }
00064
00065         private void OnTargetElementInvoked(ButtonInteraction sender, ButtonInteractionInvokedEventArgs args)
00066         {
00067             invokeCountTB.Text = string.Format("{0}", ++_invokeCount);
00068         }
00069
00070         private void UpdateRectVisualState()
00071         {
00072             if (Interaction.IsPressing)
00073             {
00074                 rect.Fill = new SolidColorBrush(Microsoft.UI.Colors.YellowGreen);
00075             }
00076             else if (Interaction.IsHovering)
00077             {
00078                 rect.Fill = new SolidColorBrush(Microsoft.UI.Colors.OrangeRed);
00079             }
00080             else
00081             {
00082                 rect.Fill = new SolidColorBrush(Microsoft.UI.Colors.Orange);
00083             }
00084         }
00085     }
00086 }
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioButtonsTestHooks Member List

This is the complete list of members for RadioButtonsTestHooks, including all inherited members.
EnsureGlobalTestHooks() | RadioButtonsTestHooks | [static]
GetColumns(const winrt::RadioButtons &radioButtons) | RadioButtonsTestHooks | [static]
GetGlobalTestHooks() | RadioButtonsTestHooks | [inline, static]
GetLargerColumns(const winrt::RadioButtons &radioButtons) | RadioButtonsTestHooks | [static]
GetRows(const winrt::RadioButtons &radioButtons) | RadioButtonsTestHooks | [static]
LayoutChanged(winrt::TypedEventHandler< winrt::RadioButtons, winrt::IInspectable > const &value) | RadioButtonsTestHooks | [static]
LayoutChanged(winrt::event_token const &token) | RadioButtonsTestHooks | [static]
m_layoutChangedEventSource | RadioButtonsTestHooks | [private]
NotifyLayoutChanged(const winrt::RadioButtons &sender) | RadioButtonsTestHooks | [static]
s_testHooks | RadioButtonsTestHooks | [private, static]
SetTestHooksEnabled(const winrt::RadioButtons &radioButtons, bool enabled) | RadioButtonsTestHooks | [static]
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ISepiaEffect Member List

This is the complete list of members for ISepiaEffect, including all inherited members.
AlphaMode([out, retval] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode *value) | ISepiaEffect
AlphaMode([in] Microsoft.UI.Private.Composition.Effects.CanvasAlphaMode value) | ISepiaEffect
Intensity([out, retval] float *value) | ISepiaEffect
Intensity([in] float value) | ISepiaEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ISepiaEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ISepiaEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBarTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

CommandBarFlyoutCommandBarTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class CommandBarFlyoutCommandBarTemplateSettingsProperties
00008 {
00009 public:
00010     CommandBarFlyoutCommandBarTemplateSettingsProperties();
00011
00012     void CloseAnimationEndPosition(double value);
00013     double CloseAnimationEndPosition();
00014
00015     void ContentClipRect(winrt::Rect const& value);
00016     winrt::Rect ContentClipRect();
00017
00018     void CurrentWidth(double value);
00019     double CurrentWidth();
00020
00021     void ExpandDownAnimationEndPosition(double value);
00022     double ExpandDownAnimationEndPosition();
00023
00024     void ExpandDownAnimationHoldPosition(double value);
00025     double ExpandDownAnimationHoldPosition();
00026
00027     void ExpandDownAnimationStartPosition(double value);
00028     double ExpandDownAnimationStartPosition();
00029
00030     void ExpandDownOverflowVerticalPosition(double value);
00031     double ExpandDownOverflowVerticalPosition();
00032
00033     void ExpandedWidth(double value);
00034     double ExpandedWidth();
00035
00036     void ExpandUpAnimationEndPosition(double value);
00037     double ExpandUpAnimationEndPosition();
00038
00039     void ExpandUpAnimationHoldPosition(double value);
00040     double ExpandUpAnimationHoldPosition();
00041
00042     void ExpandUpAnimationStartPosition(double value);
00043     double ExpandUpAnimationStartPosition();
00044
00045     void ExpandUpOverflowVerticalPosition(double value);
00046     double ExpandUpOverflowVerticalPosition();
00047
00048     void OpenAnimationEndPosition(double value);
00049     double OpenAnimationEndPosition();
00050
00051     void OpenAnimationStartPosition(double value);
00052     double OpenAnimationStartPosition();
00053
00054     void OverflowContentClipRect(winrt::Rect const& value);
00055     winrt::Rect OverflowContentClipRect();
00056
00057     void WidthExpansionAnimationEndPosition(double value);
00058     double WidthExpansionAnimationEndPosition();
00059
00060     void WidthExpansionAnimationStartPosition(double value);
00061     double WidthExpansionAnimationStartPosition();
00062
00063     void WidthExpansionDelta(double value);
00064     double WidthExpansionDelta();
00065
00066     void WidthExpansionMoreButtonAnimationEndPosition(double value);
00067     double WidthExpansionMoreButtonAnimationEndPosition();
00068
00069     void WidthExpansionMoreButtonAnimationStartPosition(double value);
00070     double WidthExpansionMoreButtonAnimationStartPosition();
00071
00072     static winrt::DependencyProperty CloseAnimationEndPositionProperty() { return s_CloseAnimationEndPositionProperty; }
00073     static winrt::DependencyProperty ContentClipRectProperty() { return s_ContentClipRectProperty; }
00074     static winrt::DependencyProperty CurrentWidthProperty() { return s_CurrentWidthProperty; }
00075     static winrt::DependencyProperty ExpandDownAnimationEndPositionProperty() { return s_ExpandDownAnimationEndPositionProperty; }
00076     static winrt::DependencyProperty ExpandDownAnimationHoldPositionProperty() { return s_ExpandDownAnimationHoldPositionProperty; }
00077     static winrt::DependencyProperty ExpandDownAnimationStartPositionProperty() { return s_ExpandDownAnimationStartPositionProperty; }
00078     static winrt::DependencyProperty ExpandDownOverflowVerticalPositionProperty() { return s_ExpandDownOverflowVerticalPositionProperty; }
00079     static winrt::DependencyProperty ExpandedWidthProperty() { return s_ExpandedWidthProperty; }
00080     static winrt::DependencyProperty ExpandUpAnimationEndPositionProperty() { return s_ExpandUpAnimationEndPositionProperty; }
00081     static winrt::DependencyProperty ExpandUpAnimationHoldPositionProperty() { return s_ExpandUpAnimationHoldPositionProperty; }
00082     static winrt::DependencyProperty ExpandUpAnimationStartPositionProperty() { return s_ExpandUpAnimationStartPositionProperty; }
00083     static winrt::DependencyProperty ExpandUpOverflowVerticalPositionProperty() { return s_ExpandUpOverflowVerticalPositionProperty; }
00084     static winrt::DependencyProperty OpenAnimationEndPositionProperty() { return s_OpenAnimationEndPositionProperty; }
00085     static winrt::DependencyProperty OpenAnimationStartPositionProperty() { return s_OpenAnimationStartPositionProperty; }
00086     static winrt::DependencyProperty OverflowContentClipRectProperty() { return s_OverflowContentClipRectProperty; }
00087     static winrt::DependencyProperty WidthExpansionAnimationEndPositionProperty() { return s_WidthExpansionAnimationEndPositionProperty; }
00088     static winrt::DependencyProperty WidthExpansionAnimationStartPositionProperty() { return s_WidthExpansionAnimationStartPositionProperty; }
00089     static winrt::DependencyProperty WidthExpansionDeltaProperty() { return s_WidthExpansionDeltaProperty; }
00090     static winrt::DependencyProperty WidthExpansionMoreButtonAnimationEndPositionProperty() { return s_WidthExpansionMoreButtonAnimationEndPositionProperty; }
00091     static winrt::DependencyProperty WidthExpansionMoreButtonAnimationStartPositionProperty() { return s_WidthExpansionMoreButtonAnimationStartPositionProperty; }
00092
00093     static GlobalDependencyProperty s_CloseAnimationEndPositionProperty;
00094     static GlobalDependencyProperty s_ContentClipRectProperty;
00095     static GlobalDependencyProperty s_CurrentWidthProperty;
00096     static GlobalDependencyProperty s_ExpandDownAnimationEndPositionProperty;
00097     static GlobalDependencyProperty s_ExpandDownAnimationHoldPositionProperty;
00098     static GlobalDependencyProperty s_ExpandDownAnimationStartPositionProperty;
00099     static GlobalDependencyProperty s_ExpandDownOverflowVerticalPositionProperty;
00100     static GlobalDependencyProperty s_ExpandedWidthProperty;
00101     static GlobalDependencyProperty s_ExpandUpAnimationEndPositionProperty;
00102     static GlobalDependencyProperty s_ExpandUpAnimationHoldPositionProperty;
00103     static GlobalDependencyProperty s_ExpandUpAnimationStartPositionProperty;
00104     static GlobalDependencyProperty s_ExpandUpOverflowVerticalPositionProperty;
00105     static GlobalDependencyProperty s_OpenAnimationEndPositionProperty;
00106     static GlobalDependencyProperty s_OpenAnimationStartPositionProperty;
00107     static GlobalDependencyProperty s_OverflowContentClipRectProperty;
00108     static GlobalDependencyProperty s_WidthExpansionAnimationEndPositionProperty;
00109     static GlobalDependencyProperty s_WidthExpansionAnimationStartPositionProperty;
00110     static GlobalDependencyProperty s_WidthExpansionDeltaProperty;
00111     static GlobalDependencyProperty s_WidthExpansionMoreButtonAnimationEndPositionProperty;
00112     static GlobalDependencyProperty s_WidthExpansionMoreButtonAnimationStartPositionProperty;
00113
00114     static void EnsureProperties();
00115     static void ClearProperties();
00116 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: MonochromaticOverlayPresenter/MonochromaticOverlayPresenter.cpp Source File

  • File List
  • File Members
  • MonochromaticOverlayPresenter

MonochromaticOverlayPresenter.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MonochromaticOverlayPresenter.h"
00007 #include "RuntimeProfiler.h"
00008 #include "ResourceAccessor.h"
00009
00010 struct XamlCompBrush : winrt::Microsoft::UI::Xaml::Media::XamlCompositionBrushBaseT<XamlCompBrush>
00011 {
00012     void SetCompositionBrush(winrt::CompositionBrush const& brush)
00013     {
00014         CompositionBrush(brush);
00015     }
00016 };
00017
00018 MonochromaticOverlayPresenter::MonochromaticOverlayPresenter()
00019 {
00020     SizeChanged([this](auto&&...) {
00021         InvalidateBrush();
00022         });
00023 }
00024
00025 void MonochromaticOverlayPresenter::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00026 {
00027     winrt::IDependencyProperty property = args.Property();
00028
00029     InvalidateBrush();
00030 }
00031
00032 void MonochromaticOverlayPresenter::InvalidateBrush()
00033 {
00034     // Delay brush updates until Tick to coalesce changes and avoid rebuilding the effect when we don't need to.
00035     if (!_needsBrushUpdate)
00036     {
00037         _needsBrushUpdate = true;
00038         SharedHelpers::QueueCallbackForCompositionRendering([weakThis = get_weak(), this]() {
00039             if (weakThis.get())
00040             {
00041                 UpdateBrush();
00042             }
00043             _needsBrushUpdate = false;
00044         });
00045     }
00046 }
00047
00048 void MonochromaticOverlayPresenter::UpdateBrush()
00049 {
00050     if (auto targetElement = SourceElement())
00051     {
00052         auto const newColor = ReplacementColor();
00053         if (_replacementColor != newColor)
00054         {
00055             _replacementColor = newColor;
00056             _effectFactory = nullptr;
00057         }
00058
00059         auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00060
00061         if (!_effectFactory)
00062         {
00063             // Build an effect that takes the source image and uses the alpha channel and replaces all other channels with
00064             // the ReplacementColor's RGB.
00065             auto colorMatrixEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorMatrixEffect>();
00066             colorMatrixEffect->Source(winrt::CompositionEffectSourceParameter{ L"source" });
00067             winrt::Microsoft::UI::Private::Composition::Effects::Matrix5x4 colorMatrix = {};
00068
00069             // If the ReplacementColor is not transparent then use the RGB values as the new color. Otherwise
00070             // just show the target by using an Identity colorMatrix.
00071             if (_replacementColor.A != 0)
00072             {
00073                 colorMatrix.M51 = (float)((_replacementColor.R / 255.0));
00074                 colorMatrix.M52 = (float)((_replacementColor.G / 255.0));
00075                 colorMatrix.M53 = (float)((_replacementColor.B / 255.0));
00076                 colorMatrix.M44 = 1;
00077             }
00078             else
00079             {
00080                 colorMatrix.M11 = colorMatrix.M22 = colorMatrix.M33 = colorMatrix.M44 = 1;
00081             }
00082             colorMatrixEffect->ColorMatrix(colorMatrix);
00083
00084             _effectFactory = compositor.CreateEffectFactory(*colorMatrixEffect);
00085         }
00086
00087         auto const actualSize = winrt::float2{ (float)ActualWidth(), (float)ActualHeight() };
00088         auto transform = TransformToVisual(targetElement);
00089         auto const offset = transform.TransformPoint(winrt::Point{ 0, 0 });
00090
00091         // Create a VisualSurface positioned at the same location as this control and feed that
00092         // through the color effect.
00093         auto surfaceBrush = compositor.CreateSurfaceBrush();
00094         surfaceBrush.Stretch(winrt::CompositionStretch::None);
00095         auto surface = compositor.CreateVisualSurface();
00096
00097         // Select the source visual and the offset/size of this control in that element's space.
00098         surface.SourceVisual(winrt::ElementCompositionPreview::GetElementVisual(targetElement));
00099         surface.SourceOffset({ offset.X, offset.Y });
00100         surface.SourceSize(actualSize);
00101         surfaceBrush.Surface(surface);
00102         surfaceBrush.Stretch(winrt::CompositionStretch::None);
00103         auto compBrush = _effectFactory.CreateBrush();
00104         compBrush.SetSourceParameter(L"source", surfaceBrush);
00105
00106         auto visual = compositor.CreateSpriteVisual();
00107         visual.Size(actualSize);
00108         visual.Brush(compBrush);
00109
00110         winrt::ElementCompositionPreview::SetElementChildVisual(*this, visual);
00111     }
00112
00113 }
Generated on Sun Dec 1 2024 20:52:00 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SelectorBar/SelectorBarTestHooksFactory.cpp Source File

  • File List
  • File Members
  • SelectorBar

SelectorBarTestHooksFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SelectorBarTestHooksFactory.h"
00007
00008 #include "SelectorBarTestHooks.properties.cpp"
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemsViewPage Member List

This is the complete list of members for ItemsViewPage, including all inherited members.
CmbItemsViewOutputDebugStringLevel_SelectionChanged(object sender, SelectionChangedEventArgs e) | ItemsViewPage | [inline, private]
ItemsViewPage() | ItemsViewPage | [inline]
Generated on Sun Dec 1 2024 20:54:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

InfoBarPanel Member List

This is the complete list of members for InfoBarPanel, including all inherited members.
abi_enter() | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
ArrangeOverride(winrt::Size const &finalSize) | InfoBarPanel |
CheckThread() | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
ClearProperties() | InfoBarPanelProperties | [static]
DeleteInstanceOnUIThread(std::unique_ptr< InfoBarPanel > &&self) noexcept | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline, static]
EnsureProperties() | InfoBarPanelProperties | [static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
final_release(std::unique_ptr< InfoBarPanel > &&self) | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline, static]
GetBase() | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
GetHorizontalOrientationMargin(winrt::DependencyObject const &target) | InfoBarPanelProperties | [static]
GetInner() | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
GetVerticalOrientationMargin(winrt::DependencyObject const &target) | InfoBarPanelProperties | [static]
HorizontalOrientationMarginProperty() | InfoBarPanelProperties | [inline, static]
HorizontalOrientationPadding(winrt::Thickness const &value) | InfoBarPanelProperties |
HorizontalOrientationPadding() | InfoBarPanelProperties |
HorizontalOrientationPaddingProperty() | InfoBarPanelProperties | [inline, static]
InfoBarPanelProperties() | InfoBarPanelProperties |
IsOnThread() | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
MeasureOverride(winrt::Size const &availableSize) | InfoBarPanel |
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< InfoBarPanel, winrt::implementation::InfoBarPanelT > | [inline]
s_HorizontalOrientationMarginProperty | InfoBarPanelProperties | [static]
s_HorizontalOrientationPaddingProperty | InfoBarPanelProperties | [static]
s_VerticalOrientationMarginProperty | InfoBarPanelProperties | [static]
s_VerticalOrientationPaddingProperty | InfoBarPanelProperties | [static]
SetHorizontalOrientationMargin(winrt::DependencyObject const &target, winrt::Thickness const &value) | InfoBarPanelProperties | [static]
SetVerticalOrientationMargin(winrt::DependencyObject const &target, winrt::Thickness const &value) | InfoBarPanelProperties | [static]
VerticalOrientationMarginProperty() | InfoBarPanelProperties | [inline, static]
VerticalOrientationPadding(winrt::Thickness const &value) | InfoBarPanelProperties |
VerticalOrientationPadding() | InfoBarPanelProperties |
VerticalOrientationPaddingProperty() | InfoBarPanelProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:48 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewItemPresenterTemplateSettingsProperties Member List

This is the complete list of members for NavigationViewItemPresenterTemplateSettingsProperties, including all inherited members.
ClearProperties() | NavigationViewItemPresenterTemplateSettingsProperties | [static]
EnsureProperties() | NavigationViewItemPresenterTemplateSettingsProperties | [static]
IconWidth(double value) | NavigationViewItemPresenterTemplateSettingsProperties |
IconWidth() | NavigationViewItemPresenterTemplateSettingsProperties |
IconWidthProperty() | NavigationViewItemPresenterTemplateSettingsProperties | [inline, static]
NavigationViewItemPresenterTemplateSettingsProperties() | NavigationViewItemPresenterTemplateSettingsProperties |
s_IconWidthProperty | NavigationViewItemPresenterTemplateSettingsProperties | [static]
s_SmallerIconWidthProperty | NavigationViewItemPresenterTemplateSettingsProperties | [static]
SmallerIconWidth(double value) | NavigationViewItemPresenterTemplateSettingsProperties |
SmallerIconWidth() | NavigationViewItemPresenterTemplateSettingsProperties |
SmallerIconWidthProperty() | NavigationViewItemPresenterTemplateSettingsProperties | [inline, static]
Generated on Sun Dec 1 2024 20:52:58 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: CommandBarFlyout/InteractionTests/TextCommandBarFlyoutTests.cs Source File

  • File List
  • File Members
  • CommandBarFlyout
  • InteractionTests

TextCommandBarFlyoutTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00009
00010 using WEX.TestExecution;
00011 using WEX.TestExecution.Markup;
00012 using WEX.Logging.Interop;
00013
00014 using Microsoft.Windows.Apps.Test.Automation;
00015 using Microsoft.Windows.Apps.Test.Foundation;
00016 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00017 using Microsoft.Windows.Apps.Test.Foundation.Patterns;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests
00021 {
00022     [TestClass]
00023     public class TextCommandBarFlyoutTests
00024     {
00025         [ClassInitialize]
00026         [TestProperty("RunAs", "User")]
00027         [TestProperty("Classification", "Integration")]
00028         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00029         public static void ClassInitialize(TestContext testContext)
00030         {
00031             TestEnvironment.Initialize(testContext);
00032         }
00033
00034         [TestCleanup]
00035         public void TestCleanup()
00036         {
00037             TestCleanupHelper.Cleanup();
00038         }
00039
00040         internal class TextCommandBarFlyoutTestSetupHelper : TestSetupHelper
00041         {
00042             public TextCommandBarFlyoutTestSetupHelper(string languageOverride = "")
00043                 : base(new[] { "CommandBarFlyout Tests", "TextCommandBarFlyout Tests" }, new TestSetupHelperOptions{ LanguageOverride = languageOverride})
00044             {
00045                 FindElement.ById<Button>("ClearClipboardContentsButton").InvokeAndWait();
00046             }
00047         }
00048
00049         [TestMethod]
00050         [TestProperty("TestSuite", "A")]
00051         public void CanCutTextFromTextBox()
00052         {
00053             CanCutCopyTextFrom("TextBox", cutText: true);
00054         }
00055
00056         [TestMethod]
00057         [TestProperty("TestSuite", "A")]
00058         public void CanCutTextFromRichEditBox()
00059         {
00060             CanCutCopyTextFrom("RichEditBox", cutText: true);
00061         }
00062
00063         [TestMethod]
00064         [TestProperty("TestSuite", "A")]
00065         public void CanCopyTextFromTextBox()
00066         {
00067             CanCutCopyTextFrom("TextBox", cutText: false);
00068         }
00069
00070         [TestMethod]
00071         [TestProperty("TestSuite", "A")]
00072         public void CanCopyTextFromTextBlock()
00073         {
00074             CanCutCopyTextFrom("TextBlock", cutText: false);
00075         }
00076
00077         [TestMethod]
00078         [TestProperty("TestSuite", "A")]
00079         public void CanCopyTextFromRichEditBox()
00080         {
00081             CanCutCopyTextFrom("RichEditBox", cutText: false);
00082         }
00083
00084         [TestMethod]
00085         [TestProperty("TestSuite", "A")]
00086         public void CanCopyTextFromRichTextBlock()
00087         {
00088             CanCutCopyTextFrom("RichTextBlock", cutText: false);
00089         }
00090
00091         private void CanCutCopyTextFrom(string textControlName, bool cutText)
00092         {
00093             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00094             {
00095                 string initialTextControlContents = FindElement.ById(textControlName).GetText();
00096
00097                 Log.Comment("Selecting all text in the {0}.", textControlName);
00098                 FindElement.ById<Button>(string.Format("{0}SelectAllButton", textControlName)).InvokeAndWait();
00099
00100                 OpenFlyoutOn(textControlName, asTransient: false);
00101
00102                 Log.Comment("{0} selected text.", cutText ? "Cutting" : "Copying");
00103                 FindElement.ByName<Button>(cutText ? "Cut" : "Copy").InvokeAndWait();
00104
00105                 string textControlContents = FindElement.ById(textControlName).GetText();
00106
00107                 Log.Comment("{0} contents are now {1}", textControlName, textControlContents);
00108                 Verify.IsNotNull(textControlContents);
00109
00110                 if (cutText)
00111                 {
00112                     Verify.AreEqual(string.Empty, textControlContents);
00113                 }
00114                 else
00115                 {
00116                     Verify.AreEqual(initialTextControlContents, textControlContents);
00117                 }
00118             }
00119         }
00120
00121         [TestMethod]
00122         [TestProperty("TestSuite", "A")]
00123         public void CanPasteTextToTextBox()
00124         {
00125             CanPasteTextTo("TextBox");
00126         }
00127
00128         [TestMethod]
00129         [TestProperty("TestSuite", "A")]
00130         public void CanPasteTextToRichEditBox()
00131         {
00132             CanPasteTextTo("RichEditBox");
00133         }
00134
00135         [TestMethod]
00136         [TestProperty("TestSuite", "A")]
00137         public void CanPasteTextToPasswordBox()
00138         {
00139             CanPasteTextTo("PasswordBox");
00140         }
00141
00142         private void CanPasteTextTo(string textControlName)
00143         {
00144             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00145             {
00146                 Log.Comment("Loading the clipboard with text.", textControlName);
00147                 FindElement.ById<Button>("SetClipboardContentsButton").InvokeAndWait();
00148
00149                 if (textControlName != "PasswordBox")
00150                 {
00151                     Log.Comment("Selecting all text in the {0}.", textControlName);
00152                     FindElement.ById<Button>(string.Format("{0}SelectAllButton", textControlName)).InvokeAndWait();
00153                 }
00154                 else
00155                 {
00156                     Log.Comment("Deleting all text in the {0}.", textControlName);
00157
00158                     // PasswordBox does not raise the ValueChanged UIA event, so we can't use SetValueAndWait in that case.
00159                     FindElement.ById<Edit>(textControlName).SetValue(string.Empty);
00160                     Wait.ForIdle();
00161                 }
00162
00163                 OpenFlyoutOn(textControlName, asTransient: false);
00164
00165                 Log.Comment("Pasting selected text.");
00166                 FindElement.ByName<Button>("Paste").InvokeAndWait();
00167
00168                 string textControlContents = FindElement.ById(textControlName).GetText();
00169                 string expectedString = "Automatically set clipboard text";
00170
00171                 if (textControlName == "PasswordBox")
00172                 {
00173                     string obfuscatedString = string.Empty;
00174
00175                     for (int i = 0; i < expectedString.Length; i++)
00176                     {
00177                         obfuscatedString += "\u25CF";
00178                     }
00179
00180                     expectedString = obfuscatedString;
00181                 }
00182
00183                 Log.Comment("{0} contents are now {1}", textControlName, textControlContents);
00184                 Verify.AreEqual(expectedString, textControlContents);
00185             }
00186         }
00187
00188         [TestMethod]
00189         [TestProperty("TestSuite", "B")]
00190         public void CanBoldTextInARichEditBox()
00191         {
00192             CanStyleTextInARichEditBox("Bold", "\\b ", "\\b0 ");
00193         }
00194
00195         [TestMethod]
00196         [TestProperty("TestSuite", "B")]
00197         public void CanItalicizeTextInARichEditBox()
00198         {
00199             CanStyleTextInARichEditBox("Italic", "\\i ", "\\i0 ");
00200         }
00201
00202         [TestMethod]
00203         [TestProperty("TestSuite", "B")]
00204         public void CanUnderlineTextInARichEditBox()
00205         {
00206             CanStyleTextInARichEditBox("Underline", "\\ul ", "\\ulnone ");
00207         }
00208
00209         private void CanStyleTextInARichEditBox(string styleName, string styleStart, string styleEnd)
00210         {
00211             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00212             {
00213                 Log.Comment("Getting initial RichEditBox RTF content.");
00214                 FindElement.ById<Button>(string.Format("GetRichEditBoxRtfContentButton")).InvokeAndWait();
00215                 string textControlContents = FindElement.ById("StatusReportingTextBox").GetText();
00216                 Log.Comment("Content is '{0}'", textControlContents.Replace(Environment.NewLine, " "));
00217
00218                 Log.Comment("Ensuring RichEditBox initially has no {0} content.", styleName.ToLower());
00219                 Verify.IsFalse(textControlContents.Contains(styleStart));
00220                 Verify.IsFalse(textControlContents.Contains(styleEnd));
00221
00222                 var richedit = FindElement.ById<Edit>("RichEditBox");
00223
00224                 FocusAndSelectText(richedit, "ergo");
00225                 OpenFlyoutOn("RichEditBox", asTransient: true);
00226
00227                 var toggleFormatButton = FindElement.ByName<ToggleButton>(styleName);
00228                 Verify.AreEqual(ToggleState.Off, toggleFormatButton.ToggleState);
00229
00230                 Log.Comment("Making text {0}.", styleName.ToLower());
00231                 toggleFormatButton.ToggleAndWait();
00232                 VerifyRichEditBoxHasContent(string.Format("Lorem ipsum {0}ergo{1} sum", styleStart, styleEnd));
00233
00234                 DismissFlyout();
00235
00236                 Log.Comment("Select mixed format text");
00237                 // Note, in this case the selection starts in unstyled text ("sum") and includes styled text ("ergo"). The next case covers
00238                 // starting in styled text and including unstyled text
00239                 FocusAndSelectText(richedit, "sum ergo");
00240
00241                 Log.Comment("Showing flyout should not change bold status");
00242                 OpenFlyoutOn("RichEditBox", asTransient: true);
00243                 Verify.AreEqual(ToggleState.Off, toggleFormatButton.ToggleState);
00244                 VerifyRichEditBoxHasContent(string.Format("Lorem ipsum {0}ergo{1} sum", styleStart, styleEnd));
00245
00246                 Log.Comment("Apply formatting to new selection");
00247                 toggleFormatButton.ToggleAndWait();
00248                 VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo{1} sum", styleStart, styleEnd));
00249
00250                 DismissFlyout();
00251
00252                 Log.Comment("Select mixed format text");
00253                 FocusAndSelectText(richedit, "ergo su");
00254                 OpenFlyoutOn("RichEditBox", asTransient: true);
00255                 Verify.AreEqual(ToggleState.Off, toggleFormatButton.ToggleState);
00256                 VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo{1} sum", styleStart, styleEnd));
00257
00258                 toggleFormatButton.ToggleAndWait();
00259                 VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo su{1}m", styleStart, styleEnd));
00260
00261                 DismissFlyout();
00262                 FocusAndSelectText(richedit, "ergo");
00263                 OpenFlyoutOn("RichEditBox", asTransient: true);
00264                 Verify.AreEqual(ToggleState.On, toggleFormatButton.ToggleState);
00265                 VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum ergo su{1}m", styleStart, styleEnd));
00266
00267                 toggleFormatButton.ToggleAndWait();
00268                 VerifyRichEditBoxHasContent(string.Format("Lorem ip{0}sum {1}ergo{0} su{1}m", styleStart, styleEnd));
00269             }
00270         }
00271
00272         private void FocusAndSelectText(Edit editControl, string textToSelect)
00273         {
00274             Log.Comment("Selecting text '{0}' in editControl '{1}'", textToSelect, editControl.Name);
00275
00276             FocusHelper.SetFocus(editControl);
00277             Wait.ForIdle();
00278             editControl.DocumentRange.FindText(textToSelect, false /*backwards*/, false /*ignorecase*/).Select();
00279             Wait.ForIdle();
00280         }
00281
00282         private static void VerifyRichEditBoxHasContent(string expectedContent)
00283         {
00284             Log.Comment("Ensuring RichEditBox contains string '{0}'.", expectedContent);
00285
00286             Log.Comment("Getting RichEditBox RTF content.");
00287             FindElement.ById<Button>(string.Format("GetRichEditBoxRtfContentButton")).InvokeAndWait();
00288             var textControlContents = FindElement.ById("StatusReportingTextBox").GetText();
00289             Log.Comment("Content is '{0}'", textControlContents.Replace(Environment.NewLine, " "));
00290
00291             Verify.IsTrue(textControlContents.Contains(expectedContent));
00292         }
00293
00294         private static void DismissFlyout()
00295         {
00296             var statusReportingTextBox = FindElement.ById("StatusReportingTextBox");
00297             InputHelper.LeftClick(statusReportingTextBox);
00298             Wait.ForIdle();
00299         }
00300
00301         [TestMethod]
00302         [TestProperty("TestSuite", "B")]
00303         public void CanUndoAndRedoInTextBox()
00304         {
00305             CanUndoAndRedoIn("TextBox");
00306         }
00307
00308         [TestMethod]
00309         [TestProperty("TestSuite", "B")]
00310         public void CanUndoAndRedoInRichEditBox()
00311         {
00312             CanUndoAndRedoIn("RichEditBox");
00313         }
00314
00315         private void CanUndoAndRedoIn(string textControlName)
00316         {
00317             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00318             {
00319                 UIObject textControl = FindElement.ById(textControlName);
00320                 ValueImplementation textControlAsValue = new ValueImplementation(textControl);
00321
00322                 string initialString = textControl.GetText();
00323                 Log.Comment("Initial contents of {0} are '{1}'", textControlName, initialString);
00324
00325                 Log.Comment("Selecting all text in the {0}.", textControlName);
00326                 FindElement.ById<Button>(string.Format("{0}SelectAllButton", textControlName)).InvokeAndWait();
00327
00328                 Log.Comment("Giving the {0} focus.", textControlName);
00329                 FocusHelper.SetFocus(textControl);
00330
00331                 Log.Comment("Typing 'hello' into the {0}.", textControlName);
00332                 TextInput.SendText("hello");
00333                 Wait.ForIdle();
00334
00335                 string finalString = textControl.GetText();
00336                 Log.Comment("Contents of {0} are now '{1}'", textControlName, finalString);
00337
00338                 Log.Comment("Opening TextCommandBarFlyout.");
00339                 OpenFlyoutOn(textControlName, asTransient: false);
00340
00341                 using (ValueChangedEventWaiter waiter = textControlAsValue.IsAvailable ? new ValueChangedEventWaiter(new Edit(textControl), initialString) : null)
00342                 {
00343                     Log.Comment("Undoing text entry.");
00344                     FindElement.ByName<Button>("Undo").InvokeAndWait();
00345                 }
00346
00347                 Log.Comment("Contents of {0} are now '{1}'", textControlName, textControl.GetText());
00348                 Verify.AreEqual(initialString, textControl.GetText());
00349
00350                 Log.Comment("Reopening TextCommandBarFlyout.");
00351                 OpenFlyoutOn(textControlName, asTransient: false);
00352
00353                 using (ValueChangedEventWaiter waiter = textControlAsValue.IsAvailable ? new ValueChangedEventWaiter(new Edit(textControl), finalString) : null)
00354                 {
00355                     Log.Comment("Redoing text entry.");
00356                     FindElement.ByName<Button>("Redo").InvokeAndWait();
00357                 }
00358
00359                 Log.Comment("Contents of {0} are now '{1}'", textControlName, textControl.GetText());
00360                 Verify.AreEqual(finalString, textControl.GetText());
00361             }
00362         }
00363
00364         [TestMethod]
00365         [TestProperty("TestSuite", "B")]
00366         public void CanSelectAllInTextBox()
00367         {
00368             CanSelectAllIn("TextBox");
00369         }
00370
00371         [TestMethod]
00372         [TestProperty("TestSuite", "B")]
00373         public void CanSelectAllInTextBlock()
00374         {
00375             CanSelectAllIn("TextBlock");
00376         }
00377
00378         [TestMethod]
00379         [TestProperty("TestSuite", "B")]
00380         public void CanSelectAllInRichEditBox()
00381         {
00382             CanSelectAllIn("RichEditBox");
00383         }
00384
00385         [TestMethod]
00386         [TestProperty("TestSuite", "B")]
00387         public void CanSelectAllInRichTextBlock()
00388         {
00389             CanSelectAllIn("RichTextBlock");
00390         }
00391
00392         [TestMethod]
00393         [TestProperty("TestSuite", "C")]
00394         public void CanSelectAllInPasswordBox()
00395         {
00396             CanSelectAllIn("PasswordBox");
00397         }
00398
00399         private void CanSelectAllIn(string textControlName)
00400         {
00401             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00402             {
00403                 OpenFlyoutOn(textControlName, asTransient: false);
00404
00405                 Log.Comment("Selecting all text in the {0}.", textControlName);
00406                 FindElement.ByName<Button>("Select All").InvokeAndWait();
00407
00408                 string textControlSelectionContents = FindElement.ById(textControlName).GetTextSelection();
00409
00410                 Log.Comment("{0} selection contents are now {1}", textControlName, textControlSelectionContents);
00411
00412                 string expectedString = "Lorem ipsum ergo sum";
00413
00414                 if (textControlName == "PasswordBox")
00415                 {
00416                     string obfuscatedString = string.Empty;
00417
00418                     for (int i = 0; i < expectedString.Length; i++)
00419                     {
00420                         obfuscatedString += "\u25CF";
00421                     }
00422
00423                     expectedString = obfuscatedString;
00424                 }
00425
00426                 Verify.AreEqual(expectedString, textControlSelectionContents);
00427             }
00428         }
00429
00430         [TestMethod]
00431         [TestProperty("TestSuite", "C")]
00432         [TestProperty("Ignore", "True")] // Test is disabled because the logic to restore focus seems to have regressed. Tracked by microsoft-ui-xaml#774
00433         public void ValidateKeyboarding()
00434         {
00435             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00436             {
00437                 Log.Comment("Give focus to the TextBox.");
00438                 var textBox = FindElement.ById("TextBox");
00439                 FocusHelper.SetFocus(textBox);
00440
00441                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Select All")))
00442                 {
00443                     Log.Comment("Use Shift+F10 to bring up the context menu. The Select All button should get focus.");
00444                     KeyboardHelper.PressKey(Key.F10, ModifierKey.Shift);
00445                     waiter.Wait();
00446                 }
00447
00448                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromId("TextBox")))
00449                 {
00450                     Log.Comment("Use Escape to close the context menu.");
00451                     KeyboardHelper.PressKey(Key.Escape);
00452                     textBox.SetFocus();
00453
00454                     waiter.Wait();
00455                 }
00456
00457                 Log.Comment("Give focus to the RichEditBox.");
00458                 var richEditBox = FindElement.ById("RichEditBox");
00459                 FocusHelper.SetFocus(richEditBox);
00460
00461                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Bold")))
00462                 {
00463                     Log.Comment("Use Shift+F10 to bring up the context menu. The Bold button should get focus.");
00464                     KeyboardHelper.PressKey(Key.F10, ModifierKey.Shift);
00465                     waiter.Wait();
00466                 }
00467
00468                 Log.Comment("Press the spacebar to invoke the bold button. Focus should stay in the flyout.");
00469                 KeyboardHelper.PressKey(Key.Space);
00470                 Wait.ForIdle();
00471
00472                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("More app bar")))
00473                 {
00474                     Log.Comment("Press the right arrow key three times.  The '...' button should get focus.");
00475                     KeyboardHelper.PressKey(Key.Right, ModifierKey.None, numPresses: 3);
00476                     waiter.Wait();
00477                 }
00478
00479                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Select All")))
00480                 {
00481                     Log.Comment("Press the down arrow key twice.  The Select All button should get focus.");
00482                     KeyboardHelper.PressKey(Key.Down, ModifierKey.None, numPresses: 2);
00483                     waiter.Wait();
00484                 }
00485
00486                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromId("RichEditBox")))
00487                 {
00488                     Log.Comment("Use Escape to close the context menu.");
00489                     KeyboardHelper.PressKey(Key.Escape);
00490                     richEditBox.SetFocus();
00491
00492                     waiter.Wait();
00493                 }
00494             }
00495         }
00496
00497         [TestMethod]
00498         [TestProperty("TestSuite", "C")]
00499         public void ValidateProofingMenu()
00500         {
00501             using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
00502             {
00503                 Edit textBox = FindElement.ById<Edit>("TextBox");
00504
00505                 Log.Comment("Type \"asdf\" plus a space to create a misspelled word.");
00506                 KeyboardHelper.EnterText(textBox, "asdf ", useKeyboard: true);
00507
00508                 // We know that the word appears at the start of the text box's content,
00509                 // so we'll use a point 10 pixels from the text box's left edge as a point
00510                 // known to be within the word's bounding box.
00511                 Log.Comment("Right-click on the word's location in the text box to get the proofing menu.");
00512                 InputHelper.RightClick(textBox, 10, textBox.BoundingRectangle.Height / 2);
00513
00514                 Log.Comment("Find the first element in the proofing menu to fix the spelling error.");
00515                 var proofingItem = new MenuItem(FindElement.ByClassName("MenuFlyoutItem"));
00516                 Log.Comment($"Invoke {proofingItem}");
00517                 proofingItem.InvokeAndWait();
00518
00519                 Verify.AreEqual($"{proofingItem.Name} ", textBox.Value);
00520             }
00521         }
00522
00523         [TestMethod]
00524         [TestProperty("TestSuite", "C")]
00525         public void ValidateRightClickOnEmptyTextBoxDoesNotShowFlyout()
00526         {
00527             using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
00528             {
00529                 Log.Comment("Clear the clipboard.");
00530                 FindElement.ById<Button>("ClearClipboardContentsButton").InvokeAndWait();
00531
00532                 Log.Comment("Right-click on the text box.");
00533                 InputHelper.RightClick(FindElement.ById("TextBox"));
00534
00535                 Log.Comment("Count the number of open popups.");
00536                 FindElement.ById<Button>("CountPopupsButton").InvokeAndWait();
00537
00538                 Verify.AreEqual("0", FindElement.ById<Edit>("PopupCountTextBox").Value);
00539             }
00540         }
00541
00542         [TestMethod]
00543         [TestProperty("TestSuite", "C")]
00544         public void ValidateRichTextBlockOverflowUsesSourceFlyouts()
00545         {
00546             using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
00547             {
00548                 Log.Comment("Right-click on the rich text block.");
00549                 InputHelper.RightClick(FindElement.ById("RichTextBlock"), 10, 10);
00550
00551                 Log.Comment("Select all the text.");
00552                 FindElement.ByName<Button>("Select All").InvokeAndWait();
00553
00554                 Log.Comment("Now right-click on the rich text block overflow.");
00555                 InputHelper.RightClick(FindElement.ById("RichTextBlockOverflow"), 10, 10);
00556
00557                 Log.Comment("The copy option should be available now, because the rich text block's overflow element delegates to the rich text block.");
00558                 FindElement.ByName<Button>("Copy").InvokeAndWait();
00559             }
00560         }
00561
00562         [TestMethod]
00563         [TestProperty("TestSuite", "C")]
00564         public void ValidateUnhandledKeysOnNonTransientFlyoutDoNotCloseFlyout()
00565         {
00566             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00567             {
00568                 Log.Comment("Give focus to the RichEditBox.");
00569                 FocusHelper.SetFocus(FindElement.ById("RichEditBox"));
00570
00571                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromName("Bold")))
00572                 {
00573                     Log.Comment("Double-tap to select a word and bring up the context menu. The Bold button should get focus.");
00574                     KeyboardHelper.PressKey(Key.F10, ModifierKey.Shift);
00575                     waiter.Wait();
00576                 }
00577
00578                 Log.Comment("Press the down arrow key. Focus should stay in the flyout.");
00579                 KeyboardHelper.PressKey(Key.Down);
00580                 Wait.ForIdle();
00581
00582                 Log.Comment("Press the up arrow key. Focus should stay in the flyout.");
00583                 KeyboardHelper.PressKey(Key.Up);
00584                 Wait.ForIdle();
00585
00586                 using (var waiter = new FocusAcquiredWaiter(UICondition.CreateFromId("RichEditBox")))
00587                 {
00588                     Log.Comment("Use Escape to close the context menu. The RichEditBox should now have focus.");
00589                     KeyboardHelper.PressKey(Key.Escape);
00590                     waiter.Wait();
00591                 }
00592             }
00593         }
00594
00595         [TestMethod]
00596         [TestProperty("TestSuite", "C")]
00597         public void VerifyTextCommandBarRemainsOpenWithItems()
00598         {
00599             using (var setup = new TestSetupHelper(new[] { "CommandBarFlyout Tests", "Extra CommandBarFlyout Tests" }))
00600             {
00601                 Log.Comment("Clear the clipboard.");
00602                 FindElement.ById<Button>("ClearClipboardContentsButton").InvokeAndWait();
00603
00604                 Log.Comment("Right-click on the text box with additional items.");
00605                 FindElement.ByName("TextBoxWithAdditionalItems").Click(PointerButtons.Secondary, 20, 20);
00606
00607                 Wait.ForIdle();
00608
00609                 Log.Comment("Count the number of open popups.");
00610                 FindElement.ById<Button>("CountPopupsButton").InvokeAndWait();
00611
00612                 Verify.AreEqual("1", FindElement.ById<Edit>("CustomButtonsOpenCount").Value);
00613             }
00614         }
00615
00616         [TestMethod]
00617         [TestProperty("TestSuite", "C")]
00618         public void ValidateSelectionFlyoutDoesNotTakeFocus()
00619         {
00620             using (var setup = new TextCommandBarFlyoutTestSetupHelper())
00621             {
00622                 // RichEditBox only implements the Text pattern, which the "TextBlock" MITA type exposes.
00623                 var richEditBox = new TextBlock(FindElement.ById("RichEditBox"));
00624                 var fillWithTextButton = new Button(FindElement.ById("RichEditBoxFillWithTextButton"));
00625
00626                 Log.Comment("Give focus to the RichEditBox.");
00627                 FocusHelper.SetFocus(richEditBox);
00628
00629                 Log.Comment("Enter enough text to guarantee that double-tapping the RichEditBox will select text.");
00630                 fillWithTextButton.InvokeAndWait();
00631
00632                 Log.Comment("Double-click to select the text and bring up the selection menu. The CommandBarFlyout should appear, but should not take focus.");
00633                 InputHelper.LeftDoubleClick(richEditBox);
00634                 Wait.ForIdle();
00635
00636                 var boldButton = FindElement.ByName("Bold");
00637                 Verify.IsNotNull(boldButton);
00638                 Verify.IsFalse(boldButton.HasKeyboardFocus);
00639
00640                 Log.Comment("Press backspace to delete the selected text. This should work because the RichEditBox should still have focus.");
00641                 KeyboardHelper.PressKey(Key.Backspace);
00642                 Wait.ForIdle();
00643
00644                 Verify.AreEqual(string.Empty, richEditBox.DocumentText);
00645
00646                 Log.Comment("Enter text again.");
00647                 fillWithTextButton.InvokeAndWait();
00648
00649                 Log.Comment("Double-click to select the text and bring up the selection menu. The CommandBarFlyout should appear, but should not take focus.");
00650                 InputHelper.LeftDoubleClick(richEditBox);
00651                 Wait.ForIdle();
00652
00653                 boldButton = FindElement.ByName("Bold");
00654                 Verify.IsNotNull(boldButton);
00655                 Verify.IsFalse(boldButton.HasKeyboardFocus);
00656
00657                 Log.Comment("Press the A key to overwrite the selected text.");
00658                 richEditBox.SendKeys("a");
00659                 Wait.ForIdle();
00660
00661                 Verify.AreEqual("a", richEditBox.DocumentText);
00662             }
00663         }
00664
00665         private void OpenFlyoutOn(string textControlName, bool asTransient)
00666         {
00667             Log.Comment("Opening text control flyout on the {0} in {1} mode.", textControlName, asTransient ? "transient" : "standard");
00668             FindElement.ById<Button>(string.Format("Show{1}TextControlFlyoutOn{0}Button", textControlName, asTransient ? string.Empty : "Standard")).InvokeAndWait();
00669         }
00670     }
00671 }
Generated on Sun Dec 1 2024 20:51:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/CustomProperty.h Source File

  • File List
  • File Members
  • Repeater

CustomProperty.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "common.h"
00007
00008 class CustomProperty :
00009     public winrt::implements<CustomProperty, winrt::ICustomProperty>
00010 {
00011 public:
00012     CustomProperty(
00013         winrt::hstring const& name,
00014         winrt::TypeName const& typeName,
00015         std::function<winrt::IInspectable(winrt::IInspectable const&)>,
00016         std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> m_setter);
00017
00018     bool CanRead();
00019     bool CanWrite();
00020     winrt::hstring Name();
00021     winrt::TypeName Type();
00022
00023     winrt::IInspectable GetIndexedValue(winrt::IInspectable const& target, winrt::IInspectable const& index);
00024     void SetIndexedValue(winrt::IInspectable const& target, winrt::IInspectable const& value, winrt::IInspectable const& index);
00025
00026     winrt::IInspectable GetValue(winrt::IInspectable const& target);
00027     void SetValue(winrt::IInspectable const& target, winrt::IInspectable const& value);
00028
00029 private:
00030     winrt::hstring m_name{};
00031     winrt::TypeName m_typeName{};
00032     std::function<winrt::IInspectable(winrt::IInspectable const&)> m_getter;
00033     std::function<void(winrt::IInspectable const&, winrt::IInspectable const&)> m_setter;
00034 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/CustomItemsSourceView.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common

CustomItemsSourceView.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections;
00006 using System.Collections.Specialized;
00007 using Microsoft.UI.Xaml;
00008 using Microsoft.UI.Xaml.Controls;
00009
00010 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common
00011 {
00012     public class CustomItemsSourceView :  IList, INotifyCollectionChanged
00013     {
00014         #region IList
00015
00016         public int Count
00017         {
00018             get
00019             {
00020                 return GetSizeCore();
00021             }
00022         }
00023
00024         public object this[int index]
00025         {
00026             get { return GetAtCore(index); }
00027             set { throw new NotImplementedException(); }
00028         }
00029
00030
00031         public bool IsFixedSize
00032         {
00033             get { throw new NotImplementedException(); }
00034         }
00035
00036         public bool IsReadOnly
00037         {
00038             get { throw new NotImplementedException(); }
00039         }
00040
00041         public bool IsSynchronized
00042         {
00043             get { throw new NotImplementedException(); }
00044         }
00045
00046         public object SyncRoot
00047         {
00048             get { throw new NotImplementedException(); }
00049         }
00050
00051         public int Add(object value)
00052         {
00053             throw new NotImplementedException();
00054         }
00055
00056         public void Clear()
00057         {
00058             throw new NotImplementedException();
00059         }
00060
00061         public bool Contains(object value)
00062         {
00063             throw new NotImplementedException();
00064         }
00065
00066         public void CopyTo(Array array, int index)
00067         {
00068             throw new NotImplementedException();
00069         }
00070
00071         public IEnumerator GetEnumerator()
00072         {
00073             throw new NotImplementedException();
00074         }
00075
00076         public int IndexOf(object value)
00077         {
00078             throw new NotImplementedException();
00079         }
00080
00081         public void Insert(int index, object value)
00082         {
00083             throw new NotImplementedException();
00084         }
00085
00086         public void Remove(object value)
00087         {
00088             throw new NotImplementedException();
00089         }
00090
00091         public void RemoveAt(int index)
00092         {
00093             throw new NotImplementedException();
00094         }
00095
00096         #endregion
00097
00098         #region INotifyCollectionChanged
00099
00100         public event NotifyCollectionChangedEventHandler CollectionChanged;
00101
00102         #endregion
00103
00104         protected virtual int GetSizeCore()
00105         {
00106             throw new NotImplementedException();
00107         }
00108
00109         protected virtual object GetAtCore(int index)
00110         {
00111             throw new NotImplementedException();
00112         }
00113
00114         protected void OnItemsSourceChanged(NotifyCollectionChangedEventArgs args)
00115         {
00116             CollectionChanged(this, args);
00117         }
00118     }
00119
00120     public class CustomItemsSourceViewWithUniqueIdMapping: CustomItemsSourceView, IKeyIndexMapping
00121     {
00122         #region IKeyIndexMapping
00123
00124         public string KeyFromIndex(int index)
00125         {
00126             return KeyFromIndexCore(index);
00127         }
00128
00129         public int IndexFromKey(string id)
00130         {
00131             return IndexFromKey(id);
00132         }
00133
00134         #endregion
00135
00136         protected virtual string KeyFromIndexCore(int index)
00137         {
00138             throw new NotImplementedException();
00139         }
00140
00141         protected virtual int IndexFromKeyCore(string id)
00142         {
00143             throw new NotImplementedException();
00144         }
00145     }
00146 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemCollapsedEventArgs.h Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemCollapsedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "NavigationViewItemCollapsedEventArgs.g.h"
00007
00008 class NavigationViewItemCollapsedEventArgs :
00009     public ReferenceTracker<NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable>
00010 {
00011 public:
00012     NavigationViewItemCollapsedEventArgs(const winrt::NavigationView& navigationView);
00013
00014     winrt::NavigationViewItemBase CollapsedItemContainer();
00015     void CollapsedItemContainer(winrt::NavigationViewItemBase const& value);
00016
00017     winrt::IInspectable CollapsedItem();
00018
00019 private:
00020     tracker_ref<winrt::NavigationViewItemBase> m_collapsedItemContainer{ this };
00021     tracker_ref<winrt::IInspectable> m_collapsedItem{ this };
00022     tracker_ref<winrt::NavigationView> m_navigationView{ this };
00023 };
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: AutoSuggestBox/APITests/AutoSuggestBoxTests.cs Source File

  • File List
  • File Members
  • AutoSuggestBox
  • APITests

AutoSuggestBoxTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using MUXControlsTestApp.Utilities;
00006 using Microsoft.UI.Xaml.Controls;
00007 using Microsoft.UI.Xaml.Media;
00008 using System.Linq;
00009 using System.Collections.Generic;
00010 using MUXControlsTestApp;
00011
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests
00017 {
00018     [TestClass]
00019     public class AutoSuggestBoxTests : ApiTestBase
00020     {
00021         [TestMethod]
00022         [TestProperty("Ignore", "True")] // TODO 29616803: Disabled after converting MUXControlsTestApp to a desktop .NET 5 app.  Re-enable when fixed.
00023         public void VerifyAutoSuggestBoxCornerRadius()
00024         {
00025             var autoSuggestBox = SetupAutoSuggestBox();
00026
00027             RunOnUIThread.Execute(() =>
00028             {
00029                 autoSuggestBox.CornerRadius = new CornerRadius(2);
00030                 autoSuggestBox.Focus(FocusState.Keyboard);
00031                 autoSuggestBox.Text = "123";
00032                 autoSuggestBox.MaxHeight = 32;
00033             });
00034             IdleSynchronizer.Wait();
00035
00036             RunOnUIThread.Execute(() =>
00037             {
00038                 var textBox = TestUtilities.FindDescendents<TextBox>(autoSuggestBox).Where(e => e.Name == "TextBox").Single();
00039
00040                 // Flyout might open differently and as such flip corner radii values
00041                 Verify.IsTrue(new CornerRadius(2, 2, 0, 0) == textBox.CornerRadius || new CornerRadius(0,0,2,2) == textBox.CornerRadius);
00042
00043                 var overlayCornerRadius = new CornerRadius(0, 0, 0, 0);
00044                 var radius = App.Current.Resources["OverlayCornerRadius"];
00045                 if (radius != null)
00046                 {
00047                     overlayCornerRadius = (CornerRadius)radius;
00048                 }
00049                 var popup = VisualTreeHelper.GetOpenPopupsForXamlRoot(autoSuggestBox.XamlRoot).Last();
00050                 var popupBorder = popup.Child as Border;
00051
00052                 // Flyout might open differently and as such flip corner radii values
00053                 Verify.IsTrue(new CornerRadius(0, 0, overlayCornerRadius.BottomRight, overlayCornerRadius.BottomLeft) == popupBorder.CornerRadius
00054                     || new CornerRadius(overlayCornerRadius.TopRight, overlayCornerRadius.TopLeft, 0, 0) == popupBorder.CornerRadius);
00055             });
00056         }
00057
00058         [TestMethod]
00059         public void VerifyVisualTree()
00060         {
00061             var autoSuggestBox = SetupAutoSuggestBox();
00062             VisualTreeTestHelper.VerifyVisualTree(root: autoSuggestBox, verificationFileNamePrefix: "AutoSuggestBox");
00063         }
00064
00065         private AutoSuggestBox SetupAutoSuggestBox()
00066         {
00067             AutoSuggestBox autoSuggestBox = null;
00068             RunOnUIThread.Execute(() =>
00069             {
00070                 autoSuggestBox = new AutoSuggestBox();
00071                 List<string> suggestions = new List<string>
00072                 {
00073                     "Item 1", "Item 2", "Item 3"
00074                 };
00075                 autoSuggestBox.ItemsSource = suggestions;
00076                 autoSuggestBox.Width = 400;
00077             });
00078             TestUtilities.SetAsVisualTreeRoot(autoSuggestBox);
00079             Verify.IsNotNull(autoSuggestBox);
00080             return autoSuggestBox;
00081         }
00082
00083     }
00084 }
Generated on Sun Dec 1 2024 20:51:44 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter/ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp Source File

  • File List
  • File Members
  • PullToRefresh
  • ScrollViewerIRefreshInfoProviderAdapter

ScrollViewerIRefreshInfoProviderDefaultAnimationHandler.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ViewModel.h"
00007 #include "TreeViewNode.h"
00008 #include "VectorChangedEventArgs.h"
00009 #include "ScrollViewerIRefreshInfoProviderAdapter.h"
00010 #include "PTRTracing.h"
00011
00012 #define REFRESH_ANIMATION_DURATION 100ms
00013 #define REFRESH_VISUALIZER_OVERPAN_RATIO 0.4
00014
00015 // Implementors of the IAdapterAnimationHandler interface are responsible for implementing the
00016 // 3 well defined component level animations in a PTR scenario. The three animations involved
00017 // in PTR include the expression animation used to have the RefreshVisualizer and its
00018 // InfoProvider follow the users finger, the animation used to show the RefreshVisualizer
00019 // when a refresh is requested, and the animation used to hide the refreshVisualizer when the
00020 // refresh is completed.
00021
00022 // The interaction tracker set up by the Adapter has to be assembled in a very particular way.
00023 // Factoring out this functionality is a way to expose the animation for
00024 // Alteration without having to expose the "delicate" interaction tracker.
00025
00026 ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::ScrollViewerIRefreshInfoProviderDefaultAnimationHandler(const winrt::UIElement&  container, const winrt::RefreshPullDirection& refreshPullDirection)
00027 {
00028     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00029     if (container)
00030     {
00031         auto containerVisual = winrt::ElementCompositionPreview::GetElementVisual(container);
00032         m_compositor = containerVisual.Compositor();
00033         containerVisual.Clip(m_compositor.CreateInsetClip(0.0f, 0.0f, 0.0f, 0.0f));
00034     }
00035     m_refreshPullDirection = refreshPullDirection;
00036 }
00037
00038 ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::~ScrollViewerIRefreshInfoProviderDefaultAnimationHandler()
00039 {
00040     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00041     if (m_refreshCompletedScopedBatch)
00042     {
00043         m_refreshCompletedScopedBatch.Completed(m_compositionScopedBatchCompletedEventToken);
00044     }
00045 }
00046
00047 void ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::InteractionTrackerAnimation(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider, const winrt::InteractionTracker& interactionTracker)
00048 {
00049     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00050     ValidateAndStoreParameters(refreshVisualizer, infoProvider, interactionTracker);
00051
00052     if (!interactionTracker)
00053     {
00054         m_interactionTracker = nullptr;
00055         return;
00056     }
00057
00058     if ((!m_refreshVisualizerVisualOffsetAnimation || !m_infoProviderOffsetAnimation || m_interactionAnimationNeedsUpdating) && m_compositor)
00059     {
00060         switch (m_refreshPullDirection)
00061         {
00062         case winrt::RefreshPullDirection::TopToBottom:
00063             m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
00064                 L"-refreshVisualizerVisual.Size.Y + min(refreshVisualizerVisual.Size.Y, -interactionTracker.Position.Y)");
00065
00066             m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
00067                 L"min(refreshVisualizerVisual.Size.Y, max(-interactionTracker.Position.Y, -refreshVisualizerVisual.Size.Y * 0.4))");
00068
00069             break;
00070         case winrt::RefreshPullDirection::BottomToTop:
00071             m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
00072                 L"refreshVisualizerVisual.Size.Y - min(refreshVisualizerVisual.Size.Y, interactionTracker.Position.Y)");
00073
00074             m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
00075                 L"max(-refreshVisualizerVisual.Size.Y, min(-interactionTracker.Position.Y, refreshVisualizerVisual.Size.Y * 0.4))");
00076
00077             break;
00078         case winrt::RefreshPullDirection::LeftToRight:
00079             m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
00080                 L"-refreshVisualizerVisual.Size.X + min(refreshVisualizerVisual.Size.X, -interactionTracker.Position.X)");
00081
00082             m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
00083                 L"min(refreshVisualizerVisual.Size.X, max(-interactionTracker.Position.X, -refreshVisualizerVisual.Size.X * 0.4))");
00084
00085             break;
00086         case winrt::RefreshPullDirection::RightToLeft:
00087             m_refreshVisualizerVisualOffsetAnimation = m_compositor.CreateExpressionAnimation(
00088                 L"refreshVisualizerVisual.Size.X - min(refreshVisualizerVisual.Size.X, interactionTracker.Position.X)");
00089
00090             m_infoProviderOffsetAnimation = m_compositor.CreateExpressionAnimation(
00091                 L"max(-refreshVisualizerVisual.Size.X, min(-interactionTracker.Position.X, refreshVisualizerVisual.Size.X * 0.4))");
00092
00093             break;
00094         default:
00095             MUX_ASSERT(false);
00096         }
00097
00098         m_refreshVisualizerVisualOffsetAnimation.SetReferenceParameter(L"refreshVisualizerVisual", m_refreshVisualizerVisual);
00099         m_refreshVisualizerVisualOffsetAnimation.SetReferenceParameter(L"interactionTracker", m_interactionTracker);
00100
00101         m_infoProviderOffsetAnimation.SetReferenceParameter(L"refreshVisualizerVisual", m_refreshVisualizerVisual);
00102         m_infoProviderOffsetAnimation.SetReferenceParameter(L"infoProviderVisual", m_infoProviderVisual);
00103         m_infoProviderOffsetAnimation.SetReferenceParameter(L"interactionTracker", m_interactionTracker);
00104
00105         m_interactionAnimationNeedsUpdating = false;
00106     }
00107
00108     if (m_refreshVisualizerVisualOffsetAnimation && m_infoProviderOffsetAnimation)
00109     {
00110         m_refreshVisualizerVisual.Offset(winrt::float3(0.0f));
00111         m_infoProviderVisual.Offset(winrt::float3(0.0f));
00112         m_refreshVisualizerVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });
00113         m_infoProviderVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });
00114
00115         winrt::hstring animatedProperty = getAnimatedPropertyName();
00116
00117         m_refreshVisualizerVisual.StartAnimation(animatedProperty, m_refreshVisualizerVisualOffsetAnimation);
00118         m_infoProviderVisual.StartAnimation(animatedProperty, m_infoProviderOffsetAnimation);
00119     }
00120 }
00121
00122 void ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::RefreshRequestedAnimation(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider, double executionRatio)
00123 {
00124     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00125     ValidateAndStoreParameters(refreshVisualizer, infoProvider, nullptr);
00126
00127     if ((!m_refreshVisualizerRefreshRequestedAnimation || !m_infoProviderRefreshRequestedAnimation || m_refreshRequestedAnimationNeedsUpdating) && m_compositor)
00128     {
00129         m_refreshVisualizerRefreshRequestedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
00130         m_refreshVisualizerRefreshRequestedAnimation.Duration(REFRESH_ANIMATION_DURATION);
00131         m_infoProviderRefreshRequestedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
00132         m_infoProviderRefreshRequestedAnimation.Duration(REFRESH_ANIMATION_DURATION);
00133         switch (m_refreshPullDirection)
00134         {
00135         case winrt::RefreshPullDirection::TopToBottom:
00136             m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().y * (1 - (float)executionRatio)));
00137             m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().y * (float)executionRatio);
00138             break;
00139         case winrt::RefreshPullDirection::BottomToTop:
00140             m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().y * (1 - (float)executionRatio));
00141             m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, -m_refreshVisualizerVisual.Size().y * (float)executionRatio);
00142             break;
00143         case winrt::RefreshPullDirection::LeftToRight:
00144             m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().x * (1 - (float)executionRatio)));
00145             m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().x * (float)executionRatio);
00146             break;
00147         case winrt::RefreshPullDirection::RightToLeft:
00148             m_refreshVisualizerRefreshRequestedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().x * (1 - (float)executionRatio));
00149             m_infoProviderRefreshRequestedAnimation.InsertKeyFrame(1.0f, -m_refreshVisualizerVisual.Size().x * (float)executionRatio);
00150             break;
00151         default:
00152             MUX_ASSERT(false);
00153         }
00154         m_refreshRequestedAnimationNeedsUpdating = false;
00155     }
00156
00157     if (m_refreshVisualizerRefreshRequestedAnimation && m_infoProviderRefreshRequestedAnimation)
00158     {
00159         winrt::hstring animatedProperty = getAnimatedPropertyName();
00160
00161         m_refreshVisualizerVisual.StartAnimation(animatedProperty, m_refreshVisualizerRefreshRequestedAnimation);
00162         m_infoProviderVisual.StartAnimation(animatedProperty, m_infoProviderRefreshRequestedAnimation);
00163     }
00164 }
00165
00166 void ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::RefreshCompletedAnimation(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider)
00167 {
00168     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00169     ValidateAndStoreParameters(refreshVisualizer, infoProvider, nullptr);
00170
00171     if ((!m_refreshVisualizerRefreshCompletedAnimation || !m_infoProviderRefreshCompletedAnimation || m_refreshCompletedAnimationNeedsUpdating) && m_compositor)
00172     {
00173         m_refreshVisualizerRefreshCompletedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
00174         m_refreshVisualizerRefreshCompletedAnimation.Duration(REFRESH_ANIMATION_DURATION);
00175         m_infoProviderRefreshCompletedAnimation = m_compositor.CreateScalarKeyFrameAnimation();
00176         m_infoProviderRefreshCompletedAnimation.Duration(REFRESH_ANIMATION_DURATION);
00177         m_infoProviderRefreshCompletedAnimation.InsertKeyFrame(1.0f, 0.0f);
00178
00179         switch (m_refreshPullDirection)
00180         {
00181         case winrt::RefreshPullDirection::TopToBottom:
00182             m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().y));
00183             break;
00184         case winrt::RefreshPullDirection::BottomToTop:
00185             m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().y);
00186             break;
00187         case winrt::RefreshPullDirection::LeftToRight:
00188             m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, -(m_refreshVisualizerVisual.Size().x));
00189             break;
00190         case winrt::RefreshPullDirection::RightToLeft:
00191             m_refreshVisualizerRefreshCompletedAnimation.InsertKeyFrame(1.0f, m_refreshVisualizerVisual.Size().x);
00192             break;
00193         default:
00194             MUX_ASSERT(false);
00195         }
00196         m_refreshCompletedAnimationNeedsUpdating = false;
00197     }
00198
00199     if (m_compositor)
00200     {
00201         m_refreshCompletedScopedBatch = m_compositor.CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
00202         m_compositionScopedBatchCompletedEventToken = m_refreshCompletedScopedBatch.Completed({ this, &ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::RefreshCompletedBatchCompleted });
00203     }
00204
00205     if (m_refreshVisualizerRefreshCompletedAnimation && m_infoProviderRefreshCompletedAnimation)
00206     {
00207         winrt::hstring animatedProperty = getAnimatedPropertyName();
00208
00209         m_refreshVisualizerVisual.StartAnimation(animatedProperty, m_refreshVisualizerRefreshCompletedAnimation);
00210         m_infoProviderVisual.StartAnimation(animatedProperty, m_infoProviderRefreshCompletedAnimation);
00211     }
00212
00213     if (m_refreshCompletedScopedBatch)
00214     {
00215         m_refreshCompletedScopedBatch.End();
00216     }
00217 }
00218
00219 //PrivateHelpers
00220 void ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::ValidateAndStoreParameters(const winrt::UIElement& refreshVisualizer, const winrt::UIElement& infoProvider, const winrt::InteractionTracker& interactionTracker)
00221 {
00222     if (refreshVisualizer && m_refreshVisualizer.get() != refreshVisualizer)
00223     {
00224
00225         m_refreshVisualizerVisual = winrt::ElementCompositionPreview::GetElementVisual(refreshVisualizer);
00226         m_refreshVisualizer.set(refreshVisualizer);
00227         m_interactionAnimationNeedsUpdating = true;
00228         m_refreshRequestedAnimationNeedsUpdating = true;
00229         m_refreshCompletedAnimationNeedsUpdating = true;
00230
00231         winrt::ElementCompositionPreview::SetIsTranslationEnabled(refreshVisualizer, true);
00232         m_refreshVisualizerVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });
00233
00234         if (!m_compositor)
00235         {
00236             m_compositor = m_refreshVisualizerVisual.Compositor();
00237         }
00238     }
00239
00240     if (infoProvider && m_infoProvider.get() != infoProvider)
00241     {
00242         m_infoProviderVisual = winrt::ElementCompositionPreview::GetElementVisual(infoProvider);
00243         m_infoProvider.set(infoProvider);
00244         m_interactionAnimationNeedsUpdating = true;
00245         m_refreshRequestedAnimationNeedsUpdating = true;
00246         m_refreshCompletedAnimationNeedsUpdating = true;
00247
00248         winrt::ElementCompositionPreview::SetIsTranslationEnabled(infoProvider, true);
00249         m_infoProviderVisual.Properties().InsertVector3(L"Translation", { 0.0f, 0.0f, 0.0f });
00250
00251         if (!m_compositor)
00252         {
00253             m_compositor = m_infoProviderVisual.Compositor();
00254         }
00255     }
00256
00257     if (interactionTracker && m_interactionTracker != interactionTracker)
00258     {
00259         m_interactionTracker = interactionTracker;
00260         m_interactionAnimationNeedsUpdating = true;
00261         m_refreshRequestedAnimationNeedsUpdating = true;
00262         m_refreshCompletedAnimationNeedsUpdating = true;
00263     }
00264 }
00265
00266 void ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::RefreshCompletedBatchCompleted(const winrt::IInspectable& /*sender*/, const winrt::CompositionBatchCompletedEventArgs& /*args*/)
00267 {
00268     PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
00269     m_refreshCompletedScopedBatch.Completed(m_compositionScopedBatchCompletedEventToken);
00270     InteractionTrackerAnimation(m_refreshVisualizer.get(), m_infoProvider.get(), m_interactionTracker);
00271 }
00272
00273 bool ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::IsOrientationVertical()
00274 {
00275     return (m_refreshPullDirection == winrt::RefreshPullDirection::TopToBottom || m_refreshPullDirection == winrt::RefreshPullDirection::BottomToTop);
00276 }
00277
00278 winrt::hstring ScrollViewerIRefreshInfoProviderDefaultAnimationHandler::getAnimatedPropertyName()
00279 {
00280     winrt::hstring animatedProperty = L"";
00281     animatedProperty = static_cast<std::wstring>(animatedProperty) + L"Translation";
00282
00283     if (IsOrientationVertical())
00284     {
00285         animatedProperty = static_cast<std::wstring>(animatedProperty) + L".Y";
00286     }
00287     else
00288     {
00289         animatedProperty = static_cast<std::wstring>(animatedProperty) + L".X";
00290     }
00291
00292     return animatedProperty;
00293 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/APITests/Common/Mocks/MockNonVirtualizingLayout.cs Source File

  • File List
  • File Members
  • Repeater
  • APITests
  • Common
  • Mocks

MockNonVirtualizingLayout.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Windows.Foundation;
00007 using Microsoft.UI.Xaml.Controls;
00008 using Microsoft.UI.Xaml.Controls;
00009
00010 namespace Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common.Mocks
00011 {
00012     class MockNonVirtualizingLayout : NonVirtualizingLayout
00013     {
00014         public Func<Size, NonVirtualizingLayoutContext, Size> MeasureLayoutFunc { get; set; }
00015         public Func<Size, NonVirtualizingLayoutContext, Size> ArrangeLayoutFunc { get; set; }
00016
00017         public new void InvalidateMeasure()
00018         {
00019             base.InvalidateMeasure();
00020         }
00021
00022         protected override Size MeasureOverride(NonVirtualizingLayoutContext context, Size availableSize)
00023         {
00024             return MeasureLayoutFunc != null ? MeasureLayoutFunc(availableSize, context) : default(Size);
00025         }
00026
00027         protected override Size ArrangeOverride(NonVirtualizingLayoutContext context, Size finalSize)
00028         {
00029             return ArrangeLayoutFunc != null ? ArrangeLayoutFunc(finalSize, context) : default(Size);
00030         }
00031     }
00032 }
Generated on Sun Dec 1 2024 20:52:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RadioButtonsAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

RadioButtonsAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RadioButtonsAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(RadioButtonsAutomationPeer)
00012 }
00013
00014 #include "RadioButtonsAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/SelectionTests.cs Source File

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests

SelectionTests.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using Common;
00005 using System;
00006 using System.Collections.Generic;
00007 using System.Linq;
00008 using System.Threading.Tasks;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00010 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00011
00012 using WEX.TestExecution;
00013 using WEX.TestExecution.Markup;
00014 using WEX.Logging.Interop;
00015
00016 using Microsoft.Windows.Apps.Test.Automation;
00017 using Microsoft.Windows.Apps.Test.Foundation;
00018 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00019 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00020
00021 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.NavigationViewTests
00022 {
00023     [TestClass]
00024     public class SelectionTests : NavigationViewTestsBase
00025     {
00026
00027         [ClassInitialize]
00028         [TestProperty("RunAs", "User")]
00029         [TestProperty("Classification", "Integration")]
00030         [TestProperty("TestPass:IncludeOnlyOn", "Desktop")]
00031         [TestProperty("MUXControlsTestEnabledForPhone", "True")]
00032         public static void ClassInitialize(TestContext testContext)
00033         {
00034             TestEnvironment.Initialize(testContext);
00035         }
00036
00037         [TestMethod]
00038         [TestProperty("Ignore", "True")]
00039         // Disabled due to: Multiple unreliable NavigationView tests #134
00040         public void SuppressSelectionItemInvokeTest()
00041         {
00042             using (IDisposable page1 = new TestSetupHelper("NavigationView Tests"),
00043                  page2 = new TestSetupHelper("Top NavigationView Store Test"))
00044             {
00045                 var removeItemButton = new Button(FindElement.ById("RemoveItemButton"));
00046                 var addItemSuppressSelectionButton = new Button(FindElement.ById("AddItemSuppressSelectionButton"));
00047                 var clearItemInvokedTextButton = new Button(FindElement.ById("ClearItemInvokedTextButton"));
00048
00049                 removeItemButton.Click();
00050                 Wait.ForIdle();
00051                 removeItemButton.Click();
00052                 Wait.ForIdle();
00053                 removeItemButton.Click();
00054                 Wait.ForIdle();
00055                 addItemSuppressSelectionButton.Click();
00056                 Wait.ForIdle();
00057
00058                 VerifyElement.Found("sup-selection-nav-item-0", FindBy.Id);
00059                 var supSelectItem0 = TryFindElement.ById("sup-selection-nav-item-0");
00060                 supSelectItem0.Click();
00061                 Wait.ForIdle();
00062
00063                 var itemInvokedText = TryFindElement.ById("ItemInvokedText");
00064                 Verify.AreEqual("New Menu Item S.S", itemInvokedText.GetText());
00065
00066                 clearItemInvokedTextButton.Click();
00067                 Wait.ForIdle();
00068                 Verify.AreEqual(string.Empty, itemInvokedText.GetText());
00069
00070                 UIObject moreButton = null;
00071                 Log.Comment("Adding items until the More button shows up.");
00072
00073                 while (moreButton == null)
00074                 {
00075                     moreButton = TryFindElement.ById("TopNavOverflowButton");
00076
00077                     if (moreButton == null)
00078                     {
00079                         addItemSuppressSelectionButton.Click();
00080                         Log.Comment("Item added.");
00081                         Wait.ForIdle();
00082                     }
00083                 }
00084
00085                 moreButton.Click();
00086                 Wait.ForIdle();
00087
00088                 var firstChildOverflow = GetTopNavigationItems(TopNavPosition.Overflow)[0];
00089                 firstChildOverflow.Click();
00090                 Wait.ForIdle();
00091
00092                 itemInvokedText = TryFindElement.ById("ItemInvokedText");
00093                 Verify.AreEqual("New Menu Item S.S", itemInvokedText.GetText());
00094             }
00095         }
00096
00097         [TestMethod]
00098         public void SelectionFollowFocusTest()
00099         {
00100             var testScenarios = RegressionTestScenario.BuildTopNavRegressionTestScenarios();
00101             foreach (var testScenario in testScenarios)
00102             {
00103                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00104                 {
00105
00106                     Log.Comment("Check SelectionFollowFocus");
00107                     CheckBox selectionFollowFocusCheckbox = new CheckBox(FindElement.ById("SelectionFollowFocusCheckbox"));
00108                     selectionFollowFocusCheckbox.Check();
00109                     Wait.ForIdle();
00110
00111                     UIObject firstItem = FindElement.ByName("Apps");
00112                     UIObject secondItem = FindElement.ByName("Games");
00113
00114                     Log.Comment("Verify the second item is not already selected");
00115                     Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00116
00117                     firstItem.Click();
00118                     Wait.ForIdle();
00119
00120                     Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00121
00122                     Log.Comment("Move focus to the second item by pressing down(left nav)/right(right nav) arrow once");
00123                     var key = Key.Right;
00124                     if (testScenario.IsLeftNavTest)
00125                     {
00126                         key = Key.Down;
00127                     }
00128                     KeyboardHelper.PressKey(key);
00129                     Wait.ForIdle();
00130
00131                     Log.Comment("Verify second item is selected and has focus because of SelectionFollowFocus");
00132                     Verify.IsTrue(secondItem.HasKeyboardFocus);
00133                     Verify.IsTrue(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00134
00135                     ClickClearSelectionButton();
00136                     Log.Comment("second item is unselected");
00137                     Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00138                 }
00139             }
00140         }
00141
00142         [TestMethod]
00143         public void MenuItemAutomationSelectionTest()
00144         {
00145             // On RS2 scrollviewer handles arrow keys and this causes an issue with the current setup of the "NavigationView Test" test page
00146             // used for the left NavigationView test. So instead we now execute this test on the "NavigationView Regression Test" test page for
00147             // left navigation.
00148             (string testPageName, bool isLeftNavTest)[] testScenarios = new (string, bool)[]
00149                 { ("NavigationView Regression Test", true), ("NavigationView TopNav Test", false) };
00150
00151             foreach (var testScenario in testScenarios)
00152             {
00153                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.testPageName }))
00154                 {
00155                     UIObject firstItem = FindElement.ByName("Home");
00156                     UIObject secondItem = FindElement.ByName("Apps");
00157                     UIObject thirdItem = FindElement.ByName("Games");
00158
00159                     Log.Comment("Verify the second item is not already selected");
00160                     Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00161
00162                     firstItem.SetFocus();
00163                     AutomationElement firstItemAE = AutomationElement.FocusedElement;
00164                     SelectionItemPattern firstItemSIP = firstItemAE.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;
00165
00166                     Log.Comment("Move focus to the second item by pressing down(left nav)/right(right nav) arrow once");
00167                     var key = Key.Right;
00168                     if (testScenario.isLeftNavTest)
00169                     {
00170                         key = Key.Down;
00171                     }
00172                     KeyboardHelper.PressKey(key);
00173                     Wait.ForIdle();
00174                     Verify.IsTrue(secondItem.HasKeyboardFocus);
00175
00176                     AutomationElement secondItemAE = AutomationElement.FocusedElement;
00177                     SelectionItemPattern secondItemSIP = secondItemAE.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;
00178
00179                     Log.Comment("Select the second item using SelectionItemPattern.Select and verify");
00180                     secondItemSIP.Select();
00181                     Wait.ForIdle();
00182                     Verify.IsTrue(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00183
00184                     Log.Comment("Deselect the second item");
00185                     firstItemSIP.Select();
00186                     Wait.ForIdle();
00187                     Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00188
00189
00190                     Log.Comment("Select the second item using SelectionItemPattern.AddToSelection and verify");
00191                     secondItemSIP.AddToSelection();
00192                     Wait.ForIdle();
00193                     Verify.IsTrue(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00194
00195                     ClickClearSelectionButton();
00196                     Log.Comment("second item is unselected");
00197                     Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00198                 }
00199             }
00200         }
00201
00202         [TestMethod]
00203         public void SettingsCanBeUnselected()
00204         {
00205             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00206             {
00207                 var readSettingsSelectedButton = new Button(FindElement.ByName("ReadSettingsSelected"));
00208                 var SettingsSelectionStateTextBlock = new TextBlock(FindElement.ByName("SettingsSelectedState"));
00209
00210                 Log.Comment("Bring Settings into view.");
00211                 FindElement.ByName<Button>("BringSettingsIntoViewButton").Invoke();
00212                 Wait.ForIdle();
00213
00214                 var settings = new Button(FindElement.ByName("Settings"));
00215                 settings.Click();
00216                 Wait.ForIdle();
00217
00218                 Log.Comment("Verify the top settings item is selected.");
00219                 readSettingsSelectedButton.Invoke();
00220                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "True");
00221
00222                 ClickClearSelectionButton();
00223
00224                 Log.Comment("Verify the top settings item is unselected.");
00225                 readSettingsSelectedButton.Invoke();
00226                 Verify.AreEqual(SettingsSelectionStateTextBlock.GetText(), "False");
00227             }
00228         }
00229
00230         [TestMethod]
00231         public void VerifyDeselectionDisabled()
00232         {
00233             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00234             foreach (var testScenario in testScenarios)
00235             {
00236                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00237                 {
00238                     UIObject homeItem = FindElement.ByName("Home");
00239                     Verify.IsNotNull(homeItem);
00240                     Verify.IsTrue(Convert.ToBoolean(homeItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00241
00242                     KeyboardHelper.PressDownModifierKey(ModifierKey.Control);
00243                     homeItem.Click(); // Explicitly testing ctrl+click here
00244                     Wait.ForIdle();
00245                     Verify.IsTrue(Convert.ToBoolean(homeItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00246                     KeyboardHelper.ReleaseModifierKey(ModifierKey.Control);
00247                 }
00248             }
00249         }
00250
00251         [TestMethod]
00252         public void CanSelectNavigationViewItemWithChildren()
00253         {
00254             var testScenarios = RegressionTestScenario.BuildHierarchicalNavRegressionTestScenarios();
00255             foreach (var testScenario in testScenarios)
00256             {
00257                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", testScenario.TestPageName }))
00258                 {
00259                     TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("SelectedItemLabel"));
00260
00261                     Log.Comment("Verify that first menu item is not expanded.");
00262                     var firstItem = FindElement.ByName("Menu Item 6 (Selectable)");
00263                     var childItem = FindElement.ByName("Menu Item 7 (Selectable)");
00264                     Verify.IsNull(childItem);
00265                     Verify.AreEqual(displayModeTextBox.DocumentText, "uninitialized");
00266
00267                     InputHelper.LeftClick(firstItem);
00268                     Wait.ForIdle();
00269
00270                     var getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));
00271                     getSelectItemButton.Invoke();
00272                     Wait.ForIdle();
00273
00274                     childItem = FindElement.ByName("Menu Item 7 (Selectable)");
00275                     Verify.IsNotNull(childItem, "Child item should be visible after expanding parent item.");
00276                     Verify.AreEqual(displayModeTextBox.DocumentText, "Menu Item 6 (Selectable)");
00277
00278                 }
00279             }
00280         }
00281
00282         [TestMethod]
00283         public void SelectingNonTopLevelItemInOverflow()
00284         {
00285             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
00286             {
00287                 TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("SelectedItemLabel"));
00288
00289                 Log.Comment("Put NavigationView into Top Mode.");
00290                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00291                 panelDisplayModeComboBox.SelectItemByName("Top");
00292                 Wait.ForIdle();
00293
00294                 InvokeOverflowButton();
00295
00296                 Log.Comment("Invoke 'Menu Item 29 (Selectable)'.");
00297                 var item = FindElement.ByName("Menu Item 29 (Selectable)");
00298                 InputHelper.LeftClick(item);
00299                 Wait.ForIdle();
00300
00301                 Log.Comment("Invoke 'Menu Item 30 (Selectable)'.");
00302                 item = FindElement.ByName("Menu Item 30 (Selectable)");
00303                 InputHelper.LeftClick(item);
00304                 Wait.ForIdle();
00305
00306                 Log.Comment("Invoke 'Menu Item 31");
00307                 item = FindElement.ByName("Menu Item 31");
00308                 InputHelper.LeftClick(item);
00309                 Wait.ForIdle();
00310
00311                 Log.Comment("Invoke GetSelectedItemLabelButton and verify selected item is correct.");
00312                 var getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));
00313                 getSelectItemButton.Invoke();
00314                 Wait.ForIdle();
00315                 Verify.AreEqual(displayModeTextBox.DocumentText, "Menu Item 31");
00316             }
00317         }
00318
00319         [TestMethod]
00320         public void VerifySelectedItemInInvokedItem()
00321         {
00322             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00323             {
00324                 var invokedItem = FindElement.ByName("Music");
00325
00326                 invokedItem.Click();
00327
00328                 Wait.ForIdle();
00329
00330                 var result = new TextBlock(FindElement.ByName("InvokedItemState"));
00331                 Log.Comment("Verify item is selected when Invoked event got raised");
00332                 Verify.AreEqual("ItemWasSelectedInItemInvoked", result.GetText());
00333
00334                 invokedItem.Click();
00335
00336                 Wait.ForIdle();
00337
00338                 Log.Comment("Verify item invoked was raised despite item already selected");
00339                 result = new TextBlock(FindElement.ByName("InvokedItemState"));
00340                 Verify.AreEqual("ItemWasInvokedSecomdTimeWithCorrectSelection", result.GetText());
00341             }
00342         }
00343
00344         [TestMethod]
00345         public void VerifySelectionItemPatternDoesInvoke()
00346         {
00347             // When using UIA SelectionItem pattern to select a navview item, this should also trigger an
00348             // invoke on the item.
00349             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00350             {
00351                 var musicItem = FindElement.ByName("Music");
00352                 var lvi = new ListViewItem(musicItem);
00353
00354                 lvi.Select();
00355                 Wait.ForIdle();
00356
00357                 Log.Comment("Verify item was invoked");
00358                 var result = new TextBlock(FindElement.ByName("InvokedItemState"));
00359                 Verify.AreEqual("ItemWasSelectedInItemInvoked", result.GetText());
00360
00361                 Log.Comment("Verify item got selected");
00362                 Verify.IsTrue(Convert.ToBoolean(musicItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00363             }
00364         }
00365
00366         [TestMethod]
00367         public void VerifyNavigationViewItemIsSelectedWorks()
00368         {
00369             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Init Test" }))
00370             {
00371                 Log.Comment("Verify the 1st NavItem.IsSelected=true works");
00372                 UIObject item1 = FindElement.ByName("Albums");
00373                 Verify.IsNotNull(item1);
00374                 Verify.IsTrue(Convert.ToBoolean(item1.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00375
00376                 Log.Comment("Verify the 2nd NavItem.IsSelected=true is ignored");
00377                 UIObject item2 = FindElement.ByName("People");
00378                 Verify.IsNotNull(item2);
00379                 Verify.IsFalse(Convert.ToBoolean(item2.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00380             }
00381         }
00382
00383         [TestMethod]
00384         public void VerifyNoCrashWhenSelectedItemIsInvalidItem()
00385         {
00386             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "Top NavigationView Test" }))
00387             {
00388
00389                 Button setInvalidSelectedItemButton = new Button(FindElement.ById("SetInvalidSelectedItem"));
00390                 var apps = new Button(FindElement.ById("AppsItem"));
00391
00392                 var invokeResult = new Edit(FindElement.ById("ItemInvokedResult"));
00393                 var selectResult = new Edit(FindElement.ById("SelectionChangedResult"));
00394
00395                 // Select apps
00396                 using (var waiter = new ValueChangedEventWaiter(invokeResult))
00397                 {
00398                     apps.Click();
00399                     waiter.Wait();
00400                 }
00401
00402                 Verify.AreEqual(selectResult.Value, "Apps");
00403
00404                 setInvalidSelectedItemButton.Click();
00405                 Wait.ForIdle();
00406
00407                 Verify.AreEqual(selectResult.Value, "Null");
00408             }
00409         }
00410
00411         [TestMethod]
00412         public void CheckSelectedItemEdgeCase()
00413         {
00414             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "SelectedItem edge case test" }))
00415             {
00416                 Button button = new Button(FindElement.ByName("CopyStatusButton"));
00417                 TextBlock textBlock = new TextBlock(FindElement.ByName("StatusTextBlock"));
00418
00419                 button.Invoke();
00420                 Wait.ForIdle();
00421                 Verify.AreEqual("False True", textBlock.DocumentText);
00422             }
00423         }
00424
00425         [TestMethod]
00426         public void CanSelectItemInFlyoutAndNVIGetsCollapsedOnFlyoutClose()
00427         {
00428             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
00429             {
00430                 Log.Comment("Put NavigationView into Left Compact Mode.");
00431                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00432                 panelDisplayModeComboBox.SelectItemByName("LeftCompact");
00433                 Wait.ForIdle();
00434
00435                 TextBlock displayModeTextBox = new TextBlock(FindElement.ByName("SelectedItemLabel"));
00436                 Verify.AreEqual(displayModeTextBox.DocumentText, "uninitialized");
00437
00438                 Log.Comment("Select Menu Item 11 which should open flyout.");
00439                 var item = FindElement.ByName("Menu Item 11");
00440                 InputHelper.LeftClick(item);
00441                 Wait.ForIdle();
00442
00443                 Log.Comment("Select Menu Item 12 which should keep flyout open.");
00444                 item = FindElement.ByName("Menu Item 12");
00445                 InputHelper.LeftClick(item);
00446                 Wait.ForIdle();
00447
00448                 Verify.IsNotNull(FindElement.ById("ChildrenFlyout"), "Flyout should still be open.");
00449
00450                 Log.Comment("Select Menu Item 14.");
00451                 item = FindElement.ByName("Menu Item 14");
00452                 InputHelper.LeftClick(item);
00453                 Wait.ForIdle();
00454
00455                 // Refresh the cache to make sure that the flyout object we are going to be searching for
00456                 // does not return as a false positive due to the caching mechanism.
00457                 ElementCache.Refresh();
00458                 Verify.IsNull(FindElement.ById("ChildrenFlyout"), "Flyout should be closed.");
00459
00460                 Log.Comment("Verify that the correct item has been selected");
00461                 var getSelectItemButton = new Button(FindElement.ByName("GetSelectedItemLabelButton"));
00462                 getSelectItemButton.Invoke();
00463                 Wait.ForIdle();
00464                 Verify.AreEqual(displayModeTextBox.DocumentText, "Menu Item 14");
00465
00466                 Log.Comment("Verify that parent has been collapsed");
00467                 TextBlock textBlockCollapsedItem = new TextBlock(FindElement.ByName("TextBlockCollapsedItem"));
00468                 Verify.AreEqual(textBlockCollapsedItem.DocumentText, "Menu Item 11");
00469             }
00470         }
00471
00472         [TestMethod]
00473         public void VerifyDataContextCanBeUsedForNavigation()
00474         {
00475             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationViewPageDataContext" }))
00476             {
00477                 TextBlock navViewSelectedDataContext = new TextBlock(FindElement.ByName("NavViewSelectedDataContext"));
00478                 Verify.IsTrue(navViewSelectedDataContext.GetText() == "Item #0_DataContext");
00479
00480                 Log.Comment("Click Item #3");
00481                 var menuItem = FindElement.ByName("Item #3");
00482                 InputHelper.LeftClick(menuItem);
00483                 Wait.ForIdle();
00484
00485                 Verify.IsTrue(navViewSelectedDataContext.GetText() == "Item #3_DataContext");
00486             }
00487         }
00488
00489         [TestMethod]
00490         public void DisplayModeChangeSelectionEventTest()
00491         {
00492             var testScenarios = RegressionTestScenario.BuildLeftNavRegressionTestScenarios();
00493             foreach (var testScenario in testScenarios)
00494             {
00495                 using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00496                 {
00497                     Button clearSelectedItem = new Button(FindElement.ById("ClearSelectionChangeIndicatorButton"));
00498                     TextBlock selectionRaisedIndicator = new TextBlock(FindElement.ById("SelectionChangedRaised"));
00499
00500                     ComboBox selectedItem = new ComboBox(FindElement.ById("SelectedItemCombobox"));
00501                     selectedItem.SelectItemByName("Settings");
00502                     Verify.AreEqual("True", selectionRaisedIndicator.GetText());
00503
00504                     ComboBox displayMode = new ComboBox(FindElement.ById("PaneDisplayModeCombobox"));
00505                     clearSelectedItem.InvokeAndWait();
00506                     displayMode.SelectItemByName("Top");
00507                     Verify.AreEqual("False", selectionRaisedIndicator.GetText());
00508                     Wait.ForIdle();
00509
00510
00511                     displayMode.SelectItemByName("Left");
00512                     Wait.ForIdle();
00513                     Verify.AreEqual("False", selectionRaisedIndicator.GetText());
00514                 }
00515             }
00516         }
00517
00518         [TestMethod]
00519         public void ModifyCollectionOnItemInvokeTest()
00520         {
00521
00522             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationViewMenuItemsSourcePage" }))
00523             {
00524                 Log.Comment("Verifying adding and then removing an item on invoke does not crash.");
00525                 var menuItem = FindElement.ByName("Fifth Item");
00526                 InputHelper.LeftClick(menuItem);
00527                 Wait.ForIdle();
00528
00529                 var newMenuItem = FindElement.ByName("Menu Item NEW");
00530                 Verify.IsNotNull(newMenuItem, "A new menu item should have been added to the list.");
00531             }
00532         }
00533
00534         [TestMethod]
00535         public void VerifySettingCustomSelectedItemInConstructorWorks()
00536         {
00537             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationViewCustomMenuItemPage" }))
00538             {
00539                 Log.Comment("Verifying first item is selected.");
00540                 var firstItem = FindElement.ById("nvi1");
00541                 Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00542
00543                 var secondItem = FindElement.ById("nvi2");
00544                 Verify.IsFalse(Convert.ToBoolean(secondItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00545
00546                 var thirdItem = FindElement.ById("nvi3");
00547                 Verify.IsFalse(Convert.ToBoolean(thirdItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00548             }
00549         }
00550
00551         [TestMethod]
00552         public void VerifyNVIItemsRepeaterIsLoadedAfterSelectionSetInMarkup()
00553         {
00554             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "HierarchicalNavigationView Markup Test" }))
00555             {
00556                 Log.Comment("Verifying first item is selected.");
00557                 var firstItem = FindElement.ById("MI1");
00558                 Verify.IsTrue(Convert.ToBoolean(firstItem.GetProperty(UIProperty.Get("SelectionItem.IsSelected"))));
00559
00560                 Log.Comment("Clicking on first item to expand it.");
00561                 InputHelper.LeftClick(firstItem);
00562                 Wait.ForIdle();
00563
00564                 Log.Comment("Verifying children are shown.");
00565                 var secondItem = FindElement.ById("MI2");
00566                 Verify.IsNotNull(secondItem, "Second item should be visible after expanding parent item.");
00567             }
00568         }
00569     }
00570 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/TestUI/ScrollPresenterBringIntoViewPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollPresenter
  • TestUI

ScrollPresenterBringIntoViewPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using Windows.Foundation;
00008 using Microsoft.UI.Composition;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using Microsoft.UI.Xaml.Controls.Primitives;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Navigation;
00014 using Microsoft.UI.Private.Controls;
00015 using Microsoft.UI.Xaml.Tests.MUXControls.ApiTests.RepeaterTests.Common;
00016 using Microsoft.UI.Dispatching;
00017
00018 namespace MUXControlsTestApp
00019 {
00020     public sealed partial class ScrollPresenterBringIntoViewPage : TestPage
00021     {
00022         private SampleDataSource dataSource = null;
00023         private Object asyncEventReportingLock = new Object();
00024         private List<string> lstAsyncEventMessage = new List<string>();
00025
00026         public ScrollPresenterBringIntoViewPage()
00027         {
00028             InitializeComponent();
00029
00030             Loaded += ScrollPresenterBringIntoViewPage_Loaded;
00031
00032             dataSource = new SampleDataSource(
00033                 this,
00034                 Enumerable.Range(0, 16).Select(i => string.Format("Item{0}", i)).ToList());
00035
00036             repeater1.ItemTemplate = repeater1ElementFactory;
00037             repeater1.ItemsSource = dataSource;
00038             repeater1.ElementPrepared += Repeater_ElementPrepared;
00039
00040             repeater2.ItemTemplate = repeater2ElementFactory;
00041             repeater2.ItemsSource = dataSource;
00042             repeater2.ElementPrepared += Repeater_ElementPrepared;
00043
00044             repeater3.ItemTemplate = repeater3ElementFactory;
00045             repeater3.ItemsSource = dataSource;
00046             repeater3.ElementPrepared += Repeater_ElementPrepared;
00047
00048             repeater4.ItemTemplate = repeater4ElementFactory;
00049             repeater4.ItemsSource = dataSource;
00050             repeater4.ElementPrepared += Repeater_ElementPrepared;
00051         }
00052
00053         private void Repeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
00054         {
00055             try
00056             {
00057                 Border b = args.Element as Border;
00058                 b.Name = "B" + args.Index;
00059
00060                 TextBox txt = b.Child as TextBox;
00061                 txt.Name = txt.Text;
00062
00063                 if (args.Index == 7)
00064                 {
00065                     b.Visibility = Visibility.Collapsed;
00066                 }
00067             }
00068             catch (Exception ex)
00069             {
00070                 txtExceptionReport.Text = ex.ToString();
00071             }
00072         }
00073
00074         protected override void OnNavigatedFrom(NavigationEventArgs e)
00075         {
00076             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00077             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00078
00079             base.OnNavigatedFrom(e);
00080         }
00081
00082         private void ScrollPresenterBringIntoViewPage_Loaded(object sender, RoutedEventArgs e)
00083         {
00084             try
00085             {
00086                 if (chkLogScrollPresenterMessages.IsChecked == true)
00087                 {
00088                     MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00089                     MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00090                 }
00091
00092                 if (chkLogScrollPresenterEvents.IsChecked == true)
00093                 {
00094                     HookScrollPresenterEvents(innerScrollPresenter);
00095                     HookScrollPresenterEvents(innerScrollPresenter2);
00096                     HookScrollPresenterEvents(innerScrollPresenter3);
00097                     HookScrollPresenterEvents(outerScrollPresenter);
00098                     HookScrollPresenterEvents(outerScrollPresenter2);
00099                     HookScrollPresenterEvents(outerScrollPresenter3);
00100                     HookScrollViewerEvents(innerScrollViewer);
00101                     HookScrollViewerEvents(innerScrollViewer2);
00102                     HookScrollViewerEvents(outerScrollViewer);
00103                     HookScrollViewerEvents(outerScrollViewer2);
00104                 }
00105             }
00106             catch (Exception ex)
00107             {
00108                 txtExceptionReport.Text = ex.ToString();
00109                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00110             }
00111         }
00112
00113         private void ScrollPresenter_BringingIntoView(ScrollPresenter sender, ScrollingBringingIntoViewEventArgs args)
00114         {
00115             string asyncEventMessage = "BringingIntoView ScrollPresenter=" + sender.Name;
00116             asyncEventMessage += ", TargetHorizontalOffset=" + args.TargetHorizontalOffset + ", TargetVerticalOffset=" + args.TargetVerticalOffset;
00117             asyncEventMessage += ", OffsetsChangeCorrelationId=" + args.CorrelationId;
00118             asyncEventMessage += ", SnapPointsMode=" + args.SnapPointsMode;
00119             asyncEventMessage += ", RequestEventArgs.AnimationDesired=" + args.RequestEventArgs.AnimationDesired + ", RequestEventArgs.Handled=" + args.RequestEventArgs.Handled;
00120             asyncEventMessage += ", RequestEventArgs.HorizontalAlignmentRatio=" + args.RequestEventArgs.HorizontalAlignmentRatio + ", RequestEventArgs.VerticalAlignmentRatio=" + args.RequestEventArgs.VerticalAlignmentRatio;
00121             asyncEventMessage += ", RequestEventArgs.HorizontalOffset=" + args.RequestEventArgs.HorizontalOffset + ", RequestEventArgs.VerticalOffset=" + args.RequestEventArgs.VerticalOffset;
00122             asyncEventMessage += ", RequestEventArgs.TargetRect=" + args.RequestEventArgs.TargetRect + ", RequestEventArgs.TargetElement=" + (args.RequestEventArgs.TargetElement as FrameworkElement).Name;
00123             asyncEventMessage += ", OriginalSource=";
00124             if (args.RequestEventArgs.OriginalSource == null)
00125                 asyncEventMessage += "null";
00126             else
00127                 asyncEventMessage += (args.RequestEventArgs.OriginalSource as FrameworkElement).Name;
00128             AppendAsyncEventMessage(asyncEventMessage);
00129
00130             args.SnapPointsMode = chkIgnoreSnapPoints.IsChecked == true ? ScrollingSnapPointsMode.Ignore : ScrollingSnapPointsMode.Default;
00131
00132             if (chkCancelOperationInBringingIntoView.IsChecked == true)
00133             {
00134                 args.Cancel = true;
00135             }
00136         }
00137
00138         private void ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
00139         {
00140             try
00141             {
00142                 if (chkLogBringIntoViewRequestedEvents.IsChecked == true)
00143                 {
00144                     AppendAsyncEventMessage("ScrollAnimationStarting ScrollPresenter=" + sender.Name + ", OffsetsChangeCorrelationId=" + args.CorrelationId);
00145                 }
00146
00147                 Vector3KeyFrameAnimation stockKeyFrameAnimation = args.Animation as Vector3KeyFrameAnimation;
00148
00149                 if (stockKeyFrameAnimation != null)
00150                 {
00151                     TextBox txtStockOffsetsChangeDuration = null;
00152                     string overriddenOffsetsChangeDuration = string.Empty;
00153
00154                     if (sender == innerScrollPresenter || sender == innerScrollPresenter2)
00155                     {
00156                         txtStockOffsetsChangeDuration = txtInnerStockOffsetsChangeDuration;
00157                         overriddenOffsetsChangeDuration = txtInnerOverriddenOffsetsChangeDuration.Text;
00158                     }
00159                     else
00160                     {
00161                         txtStockOffsetsChangeDuration = txtOuterStockOffsetsChangeDuration;
00162                         overriddenOffsetsChangeDuration = txtOuterOverriddenOffsetsChangeDuration.Text;
00163                     }
00164
00165                     txtStockOffsetsChangeDuration.Text = stockKeyFrameAnimation.Duration.TotalMilliseconds.ToString();
00166
00167                     if (!string.IsNullOrWhiteSpace(overriddenOffsetsChangeDuration))
00168                     {
00169                         double durationOverride = Convert.ToDouble(overriddenOffsetsChangeDuration);
00170                         stockKeyFrameAnimation.Duration = TimeSpan.FromMilliseconds(durationOverride);
00171                     }
00172                 }
00173             }
00174             catch (Exception ex)
00175             {
00176                 txtExceptionReport.Text = ex.ToString();
00177                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00178             }
00179         }
00180
00181         private void FrameworkElement_BringIntoViewRequested(UIElement sender, BringIntoViewRequestedEventArgs args)
00182         {
00183             string asyncEventMessage = "BringIntoViewRequested Sender=" + (sender as FrameworkElement).Name;
00184             asyncEventMessage += ", AnimationDesired=" + args.AnimationDesired + ", Handled=" + args.Handled;
00185             asyncEventMessage += ", HorizontalAlignmentRatio=" + args.HorizontalAlignmentRatio + ", VerticalAlignmentRatio=" + args.VerticalAlignmentRatio;
00186             asyncEventMessage += ", HorizontalOffset=" + args.HorizontalOffset + ", VerticalOffset=" + args.VerticalOffset;
00187             asyncEventMessage += ", TargetRect=" + args.TargetRect + ", TargetElement=" + (args.TargetElement as FrameworkElement).Name;
00188             asyncEventMessage += ", OriginalSource=";
00189             if (args.OriginalSource == null)
00190                 asyncEventMessage += "null";
00191             else
00192                 asyncEventMessage += (args.OriginalSource as FrameworkElement).Name;
00193             AppendAsyncEventMessage(asyncEventMessage);
00194         }
00195
00196         private void ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args)
00197         {
00198             AppendAsyncEventMessage("ExtentChanged ScrollPresenter=" + sender.Name + ", ExtentWidth=" + sender.ExtentWidth.ToString() + ", ExtentHeight=" + sender.ExtentHeight.ToString());
00199         }
00200
00201         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
00202         {
00203             AppendAsyncEventMessage("StateChanged ScrollPresenter=" + sender.Name + ", State=" + sender.State.ToString());
00204         }
00205
00206         private void ScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
00207         {
00208             AppendAsyncEventMessage("ViewChanged ScrollPresenter=" + sender.Name + ", H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset.ToString() + ", ZF=" + sender.ZoomFactor.ToString());
00209         }
00210
00211         private void ScrollPresenter_ScrollCompleted(ScrollPresenter sender, ScrollingScrollCompletedEventArgs args)
00212         {
00213             ScrollPresenterViewChangeResult result = ScrollPresenterTestHooks.GetScrollCompletedResult(args);
00214
00215             AppendAsyncEventMessage("ScrollCompleted ScrollPresenter=" + sender.Name + ", OffsetsChangeCorrelationId=" + args.CorrelationId + ", Result=" + result);
00216         }
00217
00218         private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
00219         {
00220             ScrollViewer sv = sender as ScrollViewer;
00221             AppendAsyncEventMessage("ViewChanged ScrollViewer=" + sv.Name + ", H=" + sv.HorizontalOffset + ", V=" + sv.VerticalOffset + ", S=" + sv.ZoomFactor);
00222         }
00223
00224         private void BtnStartBringIntoView_Click(object sender, RoutedEventArgs e)
00225         {
00226             try
00227             {
00228                 txtInnerStockOffsetsChangeDuration.Text = string.Empty;
00229                 txtOuterStockOffsetsChangeDuration.Text = string.Empty;
00230
00231                 FrameworkElement targetElement = null;
00232                 ItemsRepeater repeater = null;
00233
00234                 switch (cmbNestingCombination.SelectedIndex)
00235                 {
00236                     case 0: //ScrollPresenterInScrollPresenter (1)
00237                         repeater = repeater1;
00238                         break;
00239
00240                     case 2: //ScrollPresenterInScrollViewer
00241                         repeater = repeater2;
00242                         break;
00243
00244                     case 3: //ScrollViewerInScrollPresenter
00245                         repeater = repeater3;
00246                         break;
00247
00248                     case 4: //ScrollViewerInScrollViewer
00249                         repeater = repeater4;
00250                         break;
00251                 }
00252
00253                 Border border = null;
00254
00255                 if (repeater != null)
00256                 {
00257                     border = repeater.TryGetElement(Convert.ToInt16(txtTargetElement.Text)) as Border;
00258                 }
00259                 else
00260                 {
00261                     // case ScrollPresenterInScrollPresenter (2)
00262                     border = (innerScrollPresenter3.Content as StackPanel).Children[Convert.ToInt16(txtTargetElement.Text)] as Border;
00263                 }
00264
00265                 if (border != null)
00266                 {
00267                     targetElement = border.Child as FrameworkElement;
00268
00269                     if (targetElement != null)
00270                     {
00271                         BringIntoViewOptions options = new BringIntoViewOptions();
00272
00273                         options.AnimationDesired = cmbAnimationDesired.SelectedIndex == 0;
00274                         options.HorizontalAlignmentRatio = Convert.ToDouble(txtHorizontalAlignmentRatio.Text);
00275                         options.VerticalAlignmentRatio = Convert.ToDouble(txtVerticalAlignmentRatio.Text);
00276                         options.HorizontalOffset = Convert.ToDouble(txtHorizontalOffset.Text);
00277                         options.VerticalOffset = Convert.ToDouble(txtVerticalOffset.Text);
00278
00279                         if (chkIgnoreSnapPoints.IsChecked == false)
00280                         {
00281                             ScrollPresenter scrollPresenter1 = null;
00282                             ScrollPresenter scrollPresenter2 = null;
00283
00284                             switch (cmbNestingCombination.SelectedIndex)
00285                             {
00286                                 case 0: //ScrollPresenterInScrollPresenter (1)
00287                                     scrollPresenter1 = outerScrollPresenter;
00288                                     scrollPresenter2 = innerScrollPresenter;
00289                                     break;
00290
00291                                 case 1: //ScrollPresenterInScrollPresenter (2)
00292                                     scrollPresenter1 = outerScrollPresenter3;
00293                                     scrollPresenter2 = innerScrollPresenter3;
00294                                     break;
00295
00296                                 case 2: //ScrollPresenterInScrollViewer
00297                                     scrollPresenter1 = innerScrollPresenter2;
00298                                     break;
00299
00300                                 case 3: //ScrollViewerInScrollPresenter
00301                                     scrollPresenter1 = outerScrollPresenter2;
00302                                     break;
00303                             }
00304
00305                             if (scrollPresenter1 != null)
00306                             {
00307                                 RefreshSnapPoints(scrollPresenter1, scrollPresenter1.Content as StackPanel);
00308                             }
00309
00310                             if (scrollPresenter2 != null)
00311                             {
00312                                 RefreshSnapPoints(scrollPresenter2, scrollPresenter2.Content as StackPanel);
00313                             }
00314                         }
00315
00316                         if (chkLogBringIntoViewRequestedEvents.IsChecked == true)
00317                         {
00318                             AppendAsyncEventMessage("Invoking StartBringIntoView on " + targetElement.Name);
00319                         }
00320                         targetElement.StartBringIntoView(options);
00321                     }
00322                 }
00323
00324                 if (targetElement == null && chkLogBringIntoViewRequestedEvents.IsChecked == true)
00325                 {
00326                     AppendAsyncEventMessage("TargetElement not found");
00327                 }
00328             }
00329             catch (Exception ex)
00330             {
00331                 txtExceptionReport.Text = ex.ToString();
00332                 lstScrollPresenterEvents.Items.Add(ex.ToString());
00333             }
00334         }
00335
00336         private void CmbNestingCombination_SelectionChanged(object sender, SelectionChangedEventArgs e)
00337         {
00338             if (outerScrollPresenter == null ||
00339                 outerScrollPresenter2 == null ||
00340                 outerScrollPresenter3 == null ||
00341                 outerScrollViewer == null ||
00342                 outerScrollViewer2 == null) return;
00343
00344             switch (cmbNestingCombination.SelectedIndex)
00345             {
00346                 case 0: //ScrollPresenterInScrollPresenter (1)
00347                     outerScrollPresenter.Visibility = Visibility.Visible;
00348                     outerScrollViewer.Visibility = Visibility.Collapsed;
00349                     outerScrollPresenter2.Visibility = Visibility.Collapsed;
00350                     outerScrollViewer2.Visibility = Visibility.Collapsed;
00351                     outerScrollPresenter3.Visibility = Visibility.Collapsed;
00352                     break;
00353
00354                 case 1: //ScrollPresenterInScrollPresenter (2)
00355                     outerScrollPresenter.Visibility = Visibility.Collapsed;
00356                     outerScrollViewer.Visibility = Visibility.Collapsed;
00357                     outerScrollPresenter2.Visibility = Visibility.Collapsed;
00358                     outerScrollViewer2.Visibility = Visibility.Collapsed;
00359                     outerScrollPresenter3.Visibility = Visibility.Visible;
00360                     break;
00361
00362                 case 2: //ScrollPresenterInScrollViewer
00363                     outerScrollPresenter.Visibility = Visibility.Collapsed;
00364                     outerScrollViewer.Visibility = Visibility.Visible;
00365                     outerScrollPresenter2.Visibility = Visibility.Collapsed;
00366                     outerScrollViewer2.Visibility = Visibility.Collapsed;
00367                     outerScrollPresenter3.Visibility = Visibility.Collapsed;
00368                     break;
00369
00370                 case 3: //ScrollViewerInScrollPresenter
00371                     outerScrollPresenter.Visibility = Visibility.Collapsed;
00372                     outerScrollViewer.Visibility = Visibility.Collapsed;
00373                     outerScrollPresenter2.Visibility = Visibility.Visible;
00374                     outerScrollViewer2.Visibility = Visibility.Collapsed;
00375                     outerScrollPresenter3.Visibility = Visibility.Collapsed;
00376                     break;
00377
00378                 case 4: //ScrollViewerInScrollViewer
00379                     outerScrollPresenter.Visibility = Visibility.Collapsed;
00380                     outerScrollViewer.Visibility = Visibility.Collapsed;
00381                     outerScrollPresenter2.Visibility = Visibility.Collapsed;
00382                     outerScrollViewer2.Visibility = Visibility.Visible;
00383                     outerScrollPresenter3.Visibility = Visibility.Collapsed;
00384                     break;
00385             }
00386         }
00387
00388         private void ChkLogBringIntoViewRequestedEvents_Checked(object sender, RoutedEventArgs e)
00389         {
00390             HookBringIntoViewEvents();
00391
00392             txtInnerStockOffsetsChangeDuration.IsEnabled = true;
00393             txtInnerOverriddenOffsetsChangeDuration.IsEnabled = true;
00394             txtOuterStockOffsetsChangeDuration.IsEnabled = true;
00395             txtOuterOverriddenOffsetsChangeDuration.IsEnabled = true;
00396             chkCancelOperationInBringingIntoView.IsEnabled = true;
00397         }
00398
00399         private void ChkLogBringIntoViewRequestedEvents_Unchecked(object sender, RoutedEventArgs e)
00400         {
00401             UnhookBringIntoViewEvents();
00402
00403             txtInnerStockOffsetsChangeDuration.IsEnabled = false;
00404             txtInnerOverriddenOffsetsChangeDuration.IsEnabled = false;
00405             txtOuterStockOffsetsChangeDuration.IsEnabled = false;
00406             txtOuterOverriddenOffsetsChangeDuration.IsEnabled = false;
00407             chkCancelOperationInBringingIntoView.IsEnabled = false;
00408         }
00409
00410         private void HookBringIntoViewEvents()
00411         {
00412             if (innerScrollPresenter != null)
00413             {
00414                 innerScrollPresenter.BringingIntoView += ScrollPresenter_BringingIntoView;
00415                 innerScrollPresenter2.BringingIntoView += ScrollPresenter_BringingIntoView;
00416                 innerScrollPresenter3.BringingIntoView += ScrollPresenter_BringingIntoView;
00417                 outerScrollPresenter.BringingIntoView += ScrollPresenter_BringingIntoView;
00418                 outerScrollPresenter2.BringingIntoView += ScrollPresenter_BringingIntoView;
00419                 outerScrollPresenter3.BringingIntoView += ScrollPresenter_BringingIntoView;
00420
00421                 innerScrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00422                 innerScrollPresenter2.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00423                 innerScrollPresenter3.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00424                 outerScrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00425                 outerScrollPresenter2.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00426                 outerScrollPresenter3.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
00427
00428                 innerScrollPresenter.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00429                 innerScrollPresenter2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00430                 innerScrollPresenter3.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00431                 outerScrollPresenter.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00432                 outerScrollPresenter2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00433                 outerScrollPresenter3.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00434
00435                 outerScrollViewer.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00436                 innerScrollViewer.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00437
00438                 outerScrollViewer2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00439                 innerScrollViewer2.BringIntoViewRequested += FrameworkElement_BringIntoViewRequested;
00440             }
00441         }
00442
00443         private void UnhookBringIntoViewEvents()
00444         {
00445             if (innerScrollPresenter != null)
00446             {
00447                 innerScrollPresenter.BringingIntoView -= ScrollPresenter_BringingIntoView;
00448                 innerScrollPresenter2.BringingIntoView -= ScrollPresenter_BringingIntoView;
00449                 innerScrollPresenter3.BringingIntoView -= ScrollPresenter_BringingIntoView;
00450                 outerScrollPresenter.BringingIntoView -= ScrollPresenter_BringingIntoView;
00451                 outerScrollPresenter2.BringingIntoView -= ScrollPresenter_BringingIntoView;
00452                 outerScrollPresenter3.BringingIntoView -= ScrollPresenter_BringingIntoView;
00453
00454                 innerScrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00455                 innerScrollPresenter2.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00456                 innerScrollPresenter3.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00457                 outerScrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00458                 outerScrollPresenter2.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00459                 outerScrollPresenter3.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
00460
00461                 innerScrollPresenter.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00462                 innerScrollPresenter2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00463                 innerScrollPresenter3.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00464                 outerScrollPresenter.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00465                 outerScrollPresenter2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00466                 outerScrollPresenter3.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00467
00468                 outerScrollViewer.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00469                 innerScrollViewer.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00470
00471                 outerScrollViewer2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00472                 innerScrollViewer2.BringIntoViewRequested -= FrameworkElement_BringIntoViewRequested;
00473             }
00474         }
00475
00476         private void ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e)
00477         {
00478             HookScrollPresenterEvents(innerScrollPresenter);
00479             HookScrollPresenterEvents(innerScrollPresenter2);
00480             HookScrollPresenterEvents(innerScrollPresenter3);
00481             HookScrollPresenterEvents(outerScrollPresenter);
00482             HookScrollPresenterEvents(outerScrollPresenter2);
00483             HookScrollPresenterEvents(outerScrollPresenter3);
00484             HookScrollViewerEvents(innerScrollViewer);
00485             HookScrollViewerEvents(innerScrollViewer2);
00486             HookScrollViewerEvents(outerScrollViewer);
00487             HookScrollViewerEvents(outerScrollViewer2);
00488         }
00489
00490         private void ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e)
00491         {
00492             UnhookScrollPresenterEvents(innerScrollPresenter);
00493             UnhookScrollPresenterEvents(innerScrollPresenter2);
00494             UnhookScrollPresenterEvents(innerScrollPresenter3);
00495             UnhookScrollPresenterEvents(outerScrollPresenter);
00496             UnhookScrollPresenterEvents(outerScrollPresenter2);
00497             UnhookScrollPresenterEvents(outerScrollPresenter3);
00498             UnhookScrollViewerEvents(innerScrollViewer);
00499             UnhookScrollViewerEvents(innerScrollViewer2);
00500             UnhookScrollViewerEvents(outerScrollViewer);
00501             UnhookScrollViewerEvents(outerScrollViewer2);
00502         }
00503
00504         private void HookScrollPresenterEvents(ScrollPresenter scrollPresenter)
00505         {
00506             scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
00507             scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
00508             scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
00509             scrollPresenter.ScrollCompleted += ScrollPresenter_ScrollCompleted;
00510         }
00511
00512         private void UnhookScrollPresenterEvents(ScrollPresenter scrollPresenter)
00513         {
00514             scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
00515             scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
00516             scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
00517             scrollPresenter.ScrollCompleted -= ScrollPresenter_ScrollCompleted;
00518         }
00519
00520         private void HookScrollViewerEvents(ScrollViewer scrollViewer)
00521         {
00522             scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
00523         }
00524
00525         private void UnhookScrollViewerEvents(ScrollViewer scrollViewer)
00526         {
00527             scrollViewer.ViewChanged -= ScrollViewer_ViewChanged;
00528         }
00529
00530         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
00531         {
00532             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
00533             MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
00534         }
00535
00536         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
00537         {
00538             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00539             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00540         }
00541
00542         private void BtnClearScrollPresenterEvents_Click(object sender, RoutedEventArgs e)
00543         {
00544             lstScrollPresenterEvents.Items.Clear();
00545         }
00546
00547         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
00548         {
00549             txtExceptionReport.Text = string.Empty;
00550         }
00551
00552         private void RefreshSnapPoints(ScrollPresenter scrollPresenter, StackPanel stackPanel)
00553         {
00554             if (scrollPresenter != null && stackPanel != null && stackPanel.Children.Count > 0)
00555             {
00556                 AppendAsyncEventMessage("Populating snap points for " + scrollPresenter.Name + ":");
00557
00558                 ScrollSnapPoint scrollSnapPoint;
00559                 GeneralTransform gt = stackPanel.TransformToVisual(scrollPresenter.Content);
00560                 Point stackPanelOriginPoint = new Point();
00561                 stackPanelOriginPoint = gt.TransformPoint(stackPanelOriginPoint);
00562
00563                 if (stackPanel.Orientation == Orientation.Horizontal)
00564                 {
00565                     scrollPresenter.HorizontalSnapPoints.Clear();
00566
00567                     scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.X, ScrollSnapPointsAlignment.Near);
00568                     AppendAsyncEventMessage("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.X);
00569                     scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
00570                 }
00571                 else
00572                 {
00573                     scrollPresenter.VerticalSnapPoints.Clear();
00574
00575                     scrollSnapPoint = new ScrollSnapPoint(stackPanelOriginPoint.Y, ScrollSnapPointsAlignment.Near);
00576                     AppendAsyncEventMessage("Adding vertical snap point to " + scrollPresenter.Name + " at value " + stackPanelOriginPoint.Y);
00577                     scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
00578                 }
00579
00580                 foreach (UIElement child in stackPanel.Children)
00581                 {
00582                     FrameworkElement childAsFE = child as FrameworkElement;
00583
00584                     if (childAsFE != null)
00585                     {
00586                         gt = childAsFE.TransformToVisual(stackPanel);
00587                         Point childOriginPoint = new Point();
00588                         childOriginPoint = gt.TransformPoint(childOriginPoint);
00589
00590                         double snapPointValue = 0.0;
00591                         Thickness margin = childAsFE.Margin;
00592
00593                         if (stackPanel.Orientation == Orientation.Horizontal)
00594                         {
00595                             snapPointValue = margin.Right + childAsFE.ActualWidth + childOriginPoint.X;
00596                             if (snapPointValue <= scrollPresenter.ScrollableWidth)
00597                             {
00598                                 scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
00599                                 AppendAsyncEventMessage("Adding horizontal snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
00600                                 scrollPresenter.HorizontalSnapPoints.Add(scrollSnapPoint);
00601                             }
00602                             else
00603                             {
00604                                 break;
00605                             }
00606                         }
00607                         else
00608                         {
00609                             snapPointValue = margin.Bottom + childAsFE.ActualHeight + childOriginPoint.Y;
00610                             if (snapPointValue <= scrollPresenter.ScrollableHeight)
00611                             {
00612                                 scrollSnapPoint = new ScrollSnapPoint(snapPointValue, ScrollSnapPointsAlignment.Near);
00613                                 AppendAsyncEventMessage("Adding vertical snap point to " + scrollPresenter.Name + " at value " + snapPointValue);
00614                                 scrollPresenter.VerticalSnapPoints.Add(scrollSnapPoint);
00615                             }
00616                             else
00617                             {
00618                                 break;
00619                             }
00620                         }
00621                     }
00622
00623                     RefreshSnapPoints(scrollPresenter, child as StackPanel);
00624                 }
00625             }
00626         }
00627
00628         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
00629         {
00630             string msg = args.Message.Substring(0, args.Message.Length - 1);
00631             string senderName = string.Empty;
00632
00633             try
00634             {
00635                 FrameworkElement fe = sender as FrameworkElement;
00636
00637                 if (fe != null)
00638                 {
00639                     senderName = "s:" + fe.Name + ", ";
00640                 }
00641             }
00642             catch
00643             {
00644                 AppendAsyncEventMessage("Warning: Failure while accessing sender's Name");
00645             }
00646
00647             if (args.IsVerboseLevel)
00648             {
00649                 AppendAsyncEventMessage("Verbose: " + senderName + "m:" + msg);
00650             }
00651             else
00652             {
00653                 AppendAsyncEventMessage("Info: " + senderName + "m:" + msg);
00654             }
00655         }
00656
00657         private void AppendAsyncEventMessage(string asyncEventMessage)
00658         {
00659             lock (asyncEventReportingLock)
00660             {
00661                 while (asyncEventMessage.Length > 0)
00662                 {
00663                     string msgHead = asyncEventMessage;
00664
00665                     if (asyncEventMessage.Length > 110)
00666                     {
00667                         int commaIndex = asyncEventMessage.IndexOf(',', 110);
00668                         if (commaIndex != -1)
00669                         {
00670                             msgHead = asyncEventMessage.Substring(0, commaIndex);
00671                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
00672                         }
00673                         else
00674                         {
00675                             asyncEventMessage = string.Empty;
00676                         }
00677                     }
00678                     else
00679                     {
00680                         asyncEventMessage = string.Empty;
00681                     }
00682
00683                     lstAsyncEventMessage.Add(msgHead);
00684                 }
00685
00686                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
00687             }
00688         }
00689
00690         private void AppendAsyncEventMessage()
00691         {
00692             lock (asyncEventReportingLock)
00693             {
00694                 foreach (string asyncEventMessage in lstAsyncEventMessage)
00695                 {
00696                     lstScrollPresenterEvents.Items.Add(asyncEventMessage);
00697                 }
00698                 lstAsyncEventMessage.Clear();
00699             }
00700         }
00701
00702         private class SampleDataSource : CustomItemsSourceViewWithUniqueIdMapping
00703         {
00704             List<string> _inner;
00705
00706             public SampleDataSource(ScrollPresenterBringIntoViewPage owner, List<string> source)
00707             {
00708                 Owner = owner;
00709                 Inner = source;
00710             }
00711
00712             protected override int GetSizeCore()
00713             {
00714                 return Inner.Count;
00715             }
00716
00717             public List<string> Inner
00718             {
00719                 get
00720                 {
00721                     return _inner;
00722                 }
00723
00724                 set
00725                 {
00726                     _inner = value;
00727                 }
00728             }
00729
00730             private ScrollPresenterBringIntoViewPage Owner
00731             {
00732                 get;
00733                 set;
00734             }
00735
00736             protected override object GetAtCore(int index)
00737             {
00738                 return Inner[index];
00739             }
00740
00741             protected override string KeyFromIndexCore(int index)
00742             {
00743                 // data is the same as its unique id
00744                 return Inner[index].ToString();
00745             }
00746         }
00747     }
00748 }
Generated on Sun Dec 1 2024 20:52:16 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollControllerScrollByRequestedEventArgs Member List

This is the complete list of members for ScrollControllerScrollByRequestedEventArgs, including all inherited members.
CorrelationId() const | ScrollControllerScrollByRequestedEventArgs |
CorrelationId(int32_t correlationId) | ScrollControllerScrollByRequestedEventArgs |
OffsetDelta() const | ScrollControllerScrollByRequestedEventArgs |
Options() const | ScrollControllerScrollByRequestedEventArgs |
ScrollControllerScrollByRequestedEventArgs(double offsetDelta, winrt::ScrollingScrollOptions const &options) | ScrollControllerScrollByRequestedEventArgs |
~ScrollControllerScrollByRequestedEventArgs() | ScrollControllerScrollByRequestedEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TreeView/TreeViewDragItemsStartingEventArgs.h Source File

  • File List
  • File Members
  • TreeView

TreeViewDragItemsStartingEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "TreeViewDragItemsStartingEventArgs.g.h"
00005
00006 using winrt::Windows::ApplicationModel::DataTransfer::DataPackage;
00007
00008 class TreeViewDragItemsStartingEventArgs :
00009     public ReferenceTracker<TreeViewDragItemsStartingEventArgs, winrt::implementation::TreeViewDragItemsStartingEventArgsT, winrt::composing, winrt::composable>
00010 {
00011 public:
00012     TreeViewDragItemsStartingEventArgs(const winrt::DragItemsStartingEventArgs& args);
00013     bool Cancel() const;
00014     void Cancel(const bool value);
00015     DataPackage Data() const;
00016     winrt::IVector<winrt::IInspectable> Items();
00017
00018 private:
00019     winrt::DragItemsStartingEventArgs m_dragItemsStartingEventArgs;
00020 };
Generated on Sun Dec 1 2024 20:52:21 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnnotatedScrollBarSummaryPage Member List

This is the complete list of members for AnnotatedScrollBarSummaryPage, including all inherited members.
_cancelScrolling | AnnotatedScrollBarSummaryPage | [private]
_detailLabelContent | AnnotatedScrollBarSummaryPage | [private]
_lastRequestedDetailLabelOffset | AnnotatedScrollBarSummaryPage | [private]
_lastScrollOffset | AnnotatedScrollBarSummaryPage | [private]
_numLabels | AnnotatedScrollBarSummaryPage | [private]
_offsetBetweenLabels | AnnotatedScrollBarSummaryPage | [private]
_useLongLabels | AnnotatedScrollBarSummaryPage | [private]
AnnotatedScrollBar_DetailLabelRequested(object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs args) | AnnotatedScrollBarSummaryPage | [inline]
AnnotatedScrollbar_Scrolling(AnnotatedScrollBar sender, AnnotatedScrollBarScrollingEventArgs args) | AnnotatedScrollBarSummaryPage | [inline, private]
AnnotatedScrollBarPage_Loaded(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
AnnotatedScrollBarSummaryPage() | AnnotatedScrollBarSummaryPage | [inline]
BtnGetDetailLabelContent_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetLastRequestedDetailLabelOffset_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetMaximum_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetMinimum_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetNumLabels_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetOffsetBetweenLabels_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetSmallChange_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetValue_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnGetViewportSize_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnPrePopulateLabels_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnSetDetailLabelContent_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnSetMaximum_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnSetMinimum_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnSetNumLabels_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnSetOffsetBetweenLabels_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnSetSmallChange_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
BtnSetViewportSize_Click(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
cancelScrollingEvent_Checked(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
cancelScrollingEvent_Unchecked(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
CmbDetailLabelTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
CmbItemsSource_SelectionChanged(object sender, SelectionChangedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
CmbItemTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
CmbLabelTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
GetSquareColor(int squareNum) | AnnotatedScrollBarSummaryPage | [inline, private]
isDetailLabelEnabled_Checked(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
isDetailLabelEnabled_Unchecked(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
LabelCollection | AnnotatedScrollBarSummaryPage |
PopulateLabels(int numLabels, double offsetBetweenLabels) | AnnotatedScrollBarSummaryPage | [inline, private]
PopulateSquares(int rows) | AnnotatedScrollBarSummaryPage | [inline, private]
SquareCollection | AnnotatedScrollBarSummaryPage |
useLongLabelContent_Checked(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
useLongLabelContent_Unchecked(object sender, RoutedEventArgs e) | AnnotatedScrollBarSummaryPage | [inline, private]
~AnnotatedScrollBarSummaryPage() | AnnotatedScrollBarSummaryPage | [inline, private]
Generated on Sun Dec 1 2024 20:53:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

AnimatedSettingsVisualSource Member List

This is the complete list of members for AnimatedSettingsVisualSource, including all inherited members.
ColorAsVector4(winrt::Windows::UI::Color color) | AnimatedSettingsVisualSource | [private, static]
Duration() | AnimatedSettingsVisualSource |
EnsureThemeProperties(winrt::Microsoft::UI::Composition::Compositor compositor) | AnimatedSettingsVisualSource | [private]
Foreground() | AnimatedSettingsVisualSource | [inline]
Foreground(winrt::Windows::UI::Color value) | AnimatedSettingsVisualSource |
FrameCount() | AnimatedSettingsVisualSource |
Framerate() | AnimatedSettingsVisualSource |
FrameToProgress(double frameNumber) | AnimatedSettingsVisualSource |
Markers() | AnimatedSettingsVisualSource |
SetColorProperty(hstring const &propertyName, winrt::Windows::UI::Color value) | AnimatedSettingsVisualSource |
SetScalarProperty(hstring const &propertyName, double value) | AnimatedSettingsVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor) | AnimatedSettingsVisualSource |
TryCreateAnimatedVisual(winrt::Microsoft::UI::Composition::Compositor const &compositor, winrt::Windows::Foundation::IInspectable &diagnostics) | AnimatedSettingsVisualSource |
Generated on Sun Dec 1 2024 20:52:41 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ProgressRing/ProgressRing.h Source File

  • File List
  • File Members
  • ProgressRing

ProgressRing.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "AnimatedVisuals/ProgressRingIndeterminate.h"
00010 #include "AnimatedVisuals/ProgressRingDeterminate.h"
00011
00012 #include "ProgressRingTemplateSettings.h"
00013 #include "ProgressRing.g.h"
00014 #include "ProgressRing.properties.h"
00015
00016 class ProgressRing :
00017     public ReferenceTracker<ProgressRing, winrt::implementation::ProgressRingT>,
00018     public ProgressRingProperties
00019 {
00020
00021 public:
00022     ProgressRing();
00023
00024     winrt::AutomationPeer OnCreateAutomationPeer();
00025
00026     void OnApplyTemplate();
00027
00028     void OnIsIndeterminatePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00029     void OnIsActivePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00030     void OnDeterminateSourcePropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00031     void OnIndeterminateSourcePropertyChanged(winrt::DependencyPropertyChangedEventArgs const& args);
00032     void OnForegroundPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00033     void OnForegroundColorPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00034     void OnBackgroundPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00035     void OnBackgroundColorPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&);
00036
00037     void OnValuePropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00038     void OnMaximumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00039     void OnMinimumPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args);
00040
00041 private:
00042     void SetAnimatedVisualPlayerSource();
00043     void SetLottieForegroundColor(const winrt::IAnimatedVisualSource);
00044     void SetLottieBackgroundColor(const winrt::IAnimatedVisualSource);
00045     void OnSizeChanged(const winrt::IInspectable&, const winrt::IInspectable&);
00046     void OnLoaded(const winrt::IInspectable&, const winrt::IInspectable&);
00047     void UpdateStates();
00048     void ApplyTemplateSettings();
00049     void UpdateLottieProgress();
00050
00051     void CoerceMinimum();
00052     void CoerceMaximum();
00053     void CoerceValue();
00054     bool IsInBounds(double value);
00055
00056     tracker_ref<winrt::Grid> m_layoutRoot{ this };
00057     tracker_ref<winrt::AnimatedVisualPlayer> m_player{ this };
00058
00059     PropertyChanged_revoker m_foregroundColorPropertyChangedRevoker{};
00060     PropertyChanged_revoker m_backgroundColorPropertyChangedRevoker{};
00061
00062     double m_oldValue{ 0 };
00063     bool m_rangeBasePropertyUpdating{ false };
00064 };
Generated on Sun Dec 1 2024 20:52:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsSourceViewFactory.h Source File

  • File List
  • File Members
  • Repeater

ItemsSourceViewFactory.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsSourceView.h"
00007 #include "InspectingDataSource.h"
00008
00009 class ItemsSourceViewFactory :
00010     public winrt::implements<ItemsSourceViewFactory, winrt::IActivationFactory, winrt::IItemsSourceViewFactory>
00011 {
00012 public:
00013
00014     hstring GetRuntimeClassName() const
00015     {
00016         return hstring{ winrt::name_of<winrt::ItemsSourceView>() };
00017     }
00018
00019     winrt::IInspectable ActivateInstance() const
00020     {
00021         throw winrt::hresult_not_implemented();
00022     }
00023
00024     // ItemsSourceView's ctor creates an instance of the derived type InspectingDataSource.
00025     winrt::ItemsSourceView CreateInstance(winrt::IInspectable const& source, winrt::IInspectable const& baseInterface, winrt::IInspectable & innerInterface)
00026     {
00027         assert(!baseInterface);
00028         assert(!innerInterface);
00029         auto result = winrt::make<InspectingDataSource>(source);
00030         innerInterface = result;
00031         return result;
00032     }
00033 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

HashMap< K, V >::Iterator::KeyValuePair Member List

This is the complete list of members for HashMap< K, V >::Iterator::KeyValuePair, including all inherited members.
abi_enter() | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
CheckThread() | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
DeleteInstanceOnUIThread(std::unique_ptr< KeyValuePair > &&self) noexcept | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline, static]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
final_release(std::unique_ptr< KeyValuePair > &&self) | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline, static]
GetBase() | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
GetInner() | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
IsOnThread() | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
Key() | HashMap< K, V >::Iterator::KeyValuePair | [inline]
KeyValuePair(K const &key, V const &value) | HashMap< K, V >::Iterator::KeyValuePair | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< KeyValuePair, reference_tracker_implements_t< winrt::IKeyValuePair< K, V > >::type > | [inline]
Value() | HashMap< K, V >::Iterator::KeyValuePair | [inline]
Generated on Sun Dec 1 2024 20:52:47 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: InkToolBar/InkToolBarMenuButtonAutomationPeer.h Source File

  • File List
  • File Members
  • InkToolBar

InkToolBarMenuButtonAutomationPeer.h

Go to the documentation of this file.
00001 // AUTOGENERATED_FOR_WINRT
00002 // Copyright (c) Microsoft Corporation. All rights reserved.
00003 // Licensed under the MIT License. See LICENSE in the project root for license information.
00004
00005 #pragma once
00006
00007 #include "pch.h"
00008 #include "common.h"
00009
00010 #include "InkToolBarMenuButtonAutomationPeer.g.h"
00011
00012 class InkToolBarMenuButtonAutomationPeer :
00013     public ReferenceTracker<InkToolBarMenuButtonAutomationPeer, winrt::implementation::InkToolBarMenuButtonAutomationPeerT>
00014 {
00015 public:
00016     InkToolBarMenuButtonAutomationPeer(winrt::InkToolBarMenuButton owner) {};
00017 };
00018
Generated on Sun Dec 1 2024 20:51:56 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamples/VirtualLayoutPages/PinterestLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamples
  • VirtualLayoutPages

PinterestLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utils;
00005 using System;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Specialized;
00008 using System.Linq;
00009 using Microsoft.UI.Xaml;
00010 using Microsoft.UI.Xaml.Controls;
00011 using MUXControlsTestApp.Samples.Model;
00012
00013 namespace MUXControlsTestApp.Samples
00014 {
00015     public sealed partial class PinterestLayoutSamplePage : Page
00016     {
00017         private string _lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam laoreet erat vel massa rutrum, eget mollis massa vulputate. Vivamus semper augue leo, eget faucibus nulla mattis nec. Donec scelerisque lacus at dui ultricies, eget auctor ipsum placerat. Integer aliquet libero sed nisi eleifend, nec rutrum arcu lacinia. Sed a sem et ante gravida congue sit amet ut augue. Donec quis pellentesque urna, non finibus metus. Proin sed ornare tellus.";
00018
00019         public PinterestLayoutSamplePage()
00020         {
00021             this.InitializeComponent();
00022             repeater.ItemTemplate = elementFactory;
00023
00024             var rnd = new Random();
00025             var data = new ObservableCollection<Recipe>(Enumerable.Range(0, 300).Select(k =>
00026                            new Recipe
00027                            {
00028                                ImageUri = new Uri(string.Format("ms-appx:///Images/recipe{0}.png", k % 8 + 1)),
00029                                Description = k + " - " + _lorem.Substring(0, rnd.Next(50, 350))
00030                            }));
00031
00032             repeater.ItemsSource = data;
00033             bringIntoView.Click += BringIntoView_Click;
00034         }
00035
00036         private void BringIntoView_Click(object sender, RoutedEventArgs e)
00037         {
00038             int index = 0;
00039             if (int.TryParse(tb.Text, out index))
00040             {
00041                 if (index >= 0 && index < repeater.ItemsSourceView.Count)
00042                 {
00043                     var anchor = repeater.GetOrCreateElement(index);
00044                     anchor.StartBringIntoView();
00045                 }
00046             }
00047         }
00048     }
00049 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/RatingItemFontInfo.properties.cpp Source File

  • File List
  • File Members
  • Generated

RatingItemFontInfo.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "RatingItemFontInfo.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(RatingItemFontInfo)
00012 }
00013
00014 #include "RatingItemFontInfo.g.cpp"
00015
00016 GlobalDependencyProperty RatingItemFontInfoProperties::s_DisabledGlyphProperty{ nullptr };
00017 GlobalDependencyProperty RatingItemFontInfoProperties::s_GlyphProperty{ nullptr };
00018 GlobalDependencyProperty RatingItemFontInfoProperties::s_PlaceholderGlyphProperty{ nullptr };
00019 GlobalDependencyProperty RatingItemFontInfoProperties::s_PointerOverGlyphProperty{ nullptr };
00020 GlobalDependencyProperty RatingItemFontInfoProperties::s_PointerOverPlaceholderGlyphProperty{ nullptr };
00021 GlobalDependencyProperty RatingItemFontInfoProperties::s_UnsetGlyphProperty{ nullptr };
00022
00023 RatingItemFontInfoProperties::RatingItemFontInfoProperties()
00024 {
00025     EnsureProperties();
00026 }
00027
00028 void RatingItemFontInfoProperties::EnsureProperties()
00029 {
00030     if (!s_DisabledGlyphProperty)
00031     {
00032         s_DisabledGlyphProperty =
00033             InitializeDependencyProperty(
00034                 L"DisabledGlyph",
00035                 winrt::name_of<winrt::hstring>(),
00036                 winrt::name_of<winrt::RatingItemFontInfo>(),
00037                 false /* isAttached */,
00038                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00039                 nullptr);
00040     }
00041     if (!s_GlyphProperty)
00042     {
00043         s_GlyphProperty =
00044             InitializeDependencyProperty(
00045                 L"Glyph",
00046                 winrt::name_of<winrt::hstring>(),
00047                 winrt::name_of<winrt::RatingItemFontInfo>(),
00048                 false /* isAttached */,
00049                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00050                 nullptr);
00051     }
00052     if (!s_PlaceholderGlyphProperty)
00053     {
00054         s_PlaceholderGlyphProperty =
00055             InitializeDependencyProperty(
00056                 L"PlaceholderGlyph",
00057                 winrt::name_of<winrt::hstring>(),
00058                 winrt::name_of<winrt::RatingItemFontInfo>(),
00059                 false /* isAttached */,
00060                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00061                 nullptr);
00062     }
00063     if (!s_PointerOverGlyphProperty)
00064     {
00065         s_PointerOverGlyphProperty =
00066             InitializeDependencyProperty(
00067                 L"PointerOverGlyph",
00068                 winrt::name_of<winrt::hstring>(),
00069                 winrt::name_of<winrt::RatingItemFontInfo>(),
00070                 false /* isAttached */,
00071                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00072                 nullptr);
00073     }
00074     if (!s_PointerOverPlaceholderGlyphProperty)
00075     {
00076         s_PointerOverPlaceholderGlyphProperty =
00077             InitializeDependencyProperty(
00078                 L"PointerOverPlaceholderGlyph",
00079                 winrt::name_of<winrt::hstring>(),
00080                 winrt::name_of<winrt::RatingItemFontInfo>(),
00081                 false /* isAttached */,
00082                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00083                 nullptr);
00084     }
00085     if (!s_UnsetGlyphProperty)
00086     {
00087         s_UnsetGlyphProperty =
00088             InitializeDependencyProperty(
00089                 L"UnsetGlyph",
00090                 winrt::name_of<winrt::hstring>(),
00091                 winrt::name_of<winrt::RatingItemFontInfo>(),
00092                 false /* isAttached */,
00093                 ValueHelper<winrt::hstring>::BoxedDefaultValue(),
00094                 nullptr);
00095     }
00096 }
00097
00098 void RatingItemFontInfoProperties::ClearProperties()
00099 {
00100     s_DisabledGlyphProperty = nullptr;
00101     s_GlyphProperty = nullptr;
00102     s_PlaceholderGlyphProperty = nullptr;
00103     s_PointerOverGlyphProperty = nullptr;
00104     s_PointerOverPlaceholderGlyphProperty = nullptr;
00105     s_UnsetGlyphProperty = nullptr;
00106 }
00107
00108 void RatingItemFontInfoProperties::DisabledGlyph(winrt::hstring const& value)
00109 {
00110     [[gsl::suppress(con)]]
00111     {
00112     static_cast<RatingItemFontInfo*>(this)->SetValue(s_DisabledGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00113     }
00114 }
00115
00116 winrt::hstring RatingItemFontInfoProperties::DisabledGlyph()
00117 {
00118     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_DisabledGlyphProperty));
00119 }
00120
00121 void RatingItemFontInfoProperties::Glyph(winrt::hstring const& value)
00122 {
00123     [[gsl::suppress(con)]]
00124     {
00125     static_cast<RatingItemFontInfo*>(this)->SetValue(s_GlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00126     }
00127 }
00128
00129 winrt::hstring RatingItemFontInfoProperties::Glyph()
00130 {
00131     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_GlyphProperty));
00132 }
00133
00134 void RatingItemFontInfoProperties::PlaceholderGlyph(winrt::hstring const& value)
00135 {
00136     [[gsl::suppress(con)]]
00137     {
00138     static_cast<RatingItemFontInfo*>(this)->SetValue(s_PlaceholderGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00139     }
00140 }
00141
00142 winrt::hstring RatingItemFontInfoProperties::PlaceholderGlyph()
00143 {
00144     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_PlaceholderGlyphProperty));
00145 }
00146
00147 void RatingItemFontInfoProperties::PointerOverGlyph(winrt::hstring const& value)
00148 {
00149     [[gsl::suppress(con)]]
00150     {
00151     static_cast<RatingItemFontInfo*>(this)->SetValue(s_PointerOverGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00152     }
00153 }
00154
00155 winrt::hstring RatingItemFontInfoProperties::PointerOverGlyph()
00156 {
00157     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_PointerOverGlyphProperty));
00158 }
00159
00160 void RatingItemFontInfoProperties::PointerOverPlaceholderGlyph(winrt::hstring const& value)
00161 {
00162     [[gsl::suppress(con)]]
00163     {
00164     static_cast<RatingItemFontInfo*>(this)->SetValue(s_PointerOverPlaceholderGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00165     }
00166 }
00167
00168 winrt::hstring RatingItemFontInfoProperties::PointerOverPlaceholderGlyph()
00169 {
00170     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_PointerOverPlaceholderGlyphProperty));
00171 }
00172
00173 void RatingItemFontInfoProperties::UnsetGlyph(winrt::hstring const& value)
00174 {
00175     [[gsl::suppress(con)]]
00176     {
00177     static_cast<RatingItemFontInfo*>(this)->SetValue(s_UnsetGlyphProperty, ValueHelper<winrt::hstring>::BoxValueIfNecessary(value));
00178     }
00179 }
00180
00181 winrt::hstring RatingItemFontInfoProperties::UnsetGlyph()
00182 {
00183     return ValueHelper<winrt::hstring>::CastOrUnbox(static_cast<RatingItemFontInfo*>(this)->GetValue(s_UnsetGlyphProperty));
00184 }
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/LinedFlowLayout.h Source File

  • File List
  • File Members
  • Repeater

LinedFlowLayout.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ElementManager.h"
00007 #include "VirtualizingLayout.h"
00008 #include "LinedFlowLayoutTrace.h"
00009 #include "LinedFlowLayout.g.h"
00010 #include "LinedFlowLayout.properties.h"
00011 #include "LinedFlowLayoutItemAspectRatios.h"
00012
00013 class LinedFlowLayout :
00014     public ReferenceTracker<LinedFlowLayout, winrt::implementation::LinedFlowLayoutT, VirtualizingLayout>,
00015     public LinedFlowLayoutProperties
00016 {
00017 public:
00018     LinedFlowLayout();
00019     ~LinedFlowLayout();
00020
00021     // Properties' default values.
00022     static constexpr winrt::LinedFlowLayoutItemsJustification s_defaultItemsJustification{ winrt::LinedFlowLayoutItemsJustification::Start };
00023     static constexpr winrt::LinedFlowLayoutItemsStretch s_defaultItemsStretch{ winrt::LinedFlowLayoutItemsStretch::None };
00024     static constexpr double s_defaultActualLineHeight{ 0.0 };
00025     static constexpr double s_defaultLineSpacing{ 0.0 };
00026     static constexpr double s_defaultLineHeight{ std::numeric_limits<double>::quiet_NaN() };
00027     static constexpr double s_defaultMinItemSpacing{ 0.0 };
00028
00029 #pragma region ILayoutOverrides
00030     winrt::ItemCollectionTransitionProvider CreateDefaultItemTransitionProvider() override;
00031 #pragma endregion
00032
00033 #pragma region IVirtualizingLayoutOverrides
00034     void InitializeForContextCore(
00035         winrt::VirtualizingLayoutContext const& context);
00036     void UninitializeForContextCore(
00037         winrt::VirtualizingLayoutContext const& context);
00038
00039     winrt::Size MeasureOverride(
00040         winrt::VirtualizingLayoutContext const& context,
00041         winrt::Size const& availableSize);
00042     winrt::Size ArrangeOverride(
00043         winrt::VirtualizingLayoutContext const& context,
00044         winrt::Size const& finalSize);
00045
00046     void OnItemsChangedCore(
00047         winrt::VirtualizingLayoutContext const& context,
00048         winrt::IInspectable const& source,
00049         winrt::NotifyCollectionChangedEventArgs const& args);
00050 #pragma endregion
00051
00052     void SetDesiredAspectRatios(winrt::array_view<double const> const& values)
00053     {
00054         m_itemsInfoDesiredAspectRatiosForFastPath = { values.begin(), values.end() };
00055     }
00056
00057     void SetMinWidths(winrt::array_view<double const> const& values)
00058     {
00059         m_itemsInfoMinWidthsForFastPath = { values.begin(), values.end() };
00060     }
00061
00062     void SetMaxWidths(winrt::array_view<double const> const& values)
00063     {
00064         m_itemsInfoMaxWidthsForFastPath = { values.begin(), values.end() };
00065     }
00066
00067     int RequestedRangeStartIndex();
00068     int RequestedRangeLength();
00069
00070     void InvalidateItemsInfo();
00071
00072     int32_t LockItemToLine(
00073         int32_t itemIndex);
00074
00075     void OnPropertyChanged(
00076         winrt::DependencyPropertyChangedEventArgs const& args);
00077
00078 #pragma region LayoutsTestHooks
00079     int FirstRealizedItemIndexDbg() const
00080     {
00081         if (!m_wasInitializedForContext)
00082         {
00083             return -1;
00084         }
00085
00086         return m_elementManager.GetFirstRealizedDataIndex();
00087     };
00088
00089     int LastRealizedItemIndexDbg() const
00090     {
00091         if (!m_wasInitializedForContext)
00092         {
00093             return -1;
00094         }
00095
00096         const int realizedElementCount = m_elementManager.GetRealizedElementCount();
00097         return realizedElementCount == 0 ? -1 : m_elementManager.GetFirstRealizedDataIndex() + realizedElementCount - 1;
00098     };
00099
00100     int FirstFrozenItemIndexDbg() const
00101     {
00102         return m_firstFrozenItemIndex;
00103     };
00104
00105     int LastFrozenItemIndexDbg() const
00106     {
00107         return m_lastFrozenItemIndex;
00108     };
00109
00110     double AverageItemAspectRatioDbg() const
00111     {
00112         return m_averageItemAspectRatioDbg;
00113     };
00114
00115     double ForcedAverageItemAspectRatioDbg() const
00116     {
00117         return m_forcedAverageItemAspectRatioDbg;
00118     };
00119
00120     void ForcedAverageItemAspectRatioDbg(
00121         double forcedAverageItemAspectRatio)
00122     {
00123         if (m_forcedAverageItemAspectRatioDbg != forcedAverageItemAspectRatio)
00124         {
00125             m_forcedAverageItemAspectRatioDbg = forcedAverageItemAspectRatio;
00126             InvalidateLayout();
00127         }
00128     };
00129
00130     double ForcedAverageItemsPerLineDividerDbg() const
00131     {
00132         return m_forcedAverageItemsPerLineDividerDbg;
00133     };
00134
00135     void ForcedAverageItemsPerLineDividerDbg(
00136         double forcedAverageItemsPerLineDivider)
00137     {
00138         if (m_forcedAverageItemsPerLineDividerDbg != forcedAverageItemsPerLineDivider)
00139         {
00140             m_forcedAverageItemsPerLineDividerDbg = forcedAverageItemsPerLineDivider;
00141             InvalidateLayout();
00142         }
00143     };
00144
00145     double ForcedWrapMultiplierDbg() const
00146     {
00147         return m_forcedWrapMultiplierDbg;
00148     };
00149
00150     // Allows to change LinedFlowLayout::GetItemWidthMultiplierThreshold()'s return value for testing purposes.
00151     void ForcedWrapMultiplierDbg(
00152         double forcedWrapMultiplier)
00153     {
00154         if (m_forcedWrapMultiplierDbg != forcedWrapMultiplier)
00155         {
00156             m_forcedWrapMultiplierDbg = forcedWrapMultiplier;
00157             InvalidateLayout();
00158         }
00159     };
00160
00161     bool IsFastPathSupportedDbg() const
00162     {
00163         return m_isFastPathSupportedDbg;
00164     };
00165
00166     // Allows the fall path layout to be turned off for testing purposes.
00167     // This allows for instance to provide sizing information for an entire
00168     // small source collection and still exercise the regular path.
00169     void IsFastPathSupportedDbg(
00170         bool isFastPathSupported)
00171     {
00172         if (m_isFastPathSupportedDbg != isFastPathSupported)
00173         {
00174             m_isFastPathSupportedDbg = isFastPathSupported;
00175
00176             if (UsesFastPathLayout())
00177             {
00178                 ResetItemsInfo();
00179             }
00180
00181             InvalidateLayout();
00182         }
00183     };
00184
00185     void InvalidateLayout(
00186         bool forceRelayout = true,
00187         bool resetItemsInfo = false,
00188         bool invalidateMeasure = true);
00189
00190     int LogItemIndexDbg() const
00191     {
00192         return m_logItemIndexDbg;
00193     };
00194
00195     void LogItemIndexDbg(
00196         int logItemIndex)
00197     {
00198         m_logItemIndexDbg = logItemIndex;
00199     };
00200
00201     double RawAverageItemsPerLineDbg() const
00202     {
00203         return m_averageItemsPerLine.first;
00204     };
00205
00206     double SnappedAverageItemsPerLineDbg() const
00207     {
00208         return m_averageItemsPerLine.second;
00209     };
00210
00211     int GetLineIndexDbg(int itemIndex) const
00212     {
00213         return GetLineIndex(itemIndex, UsesFastPathLayout());
00214     }
00215
00216     void ClearItemAspectRatios();
00217     void UnlockItems();
00218 #pragma endregion
00219
00220 private:
00221     // Structs
00222     struct ItemsInfo
00223     {
00224     public:
00225         int m_itemsRangeStartIndex{ -1 };
00226         int m_itemsRangeLength{ -1 };
00227         double m_minWidth{ -1.0 };
00228         double m_maxWidth{ -1.0 };
00229     };
00230
00231     struct ItemsLayout
00232     {
00233     public:
00234         std::vector<int> m_lineItemCounts{};
00235         std::vector<double> m_lineItemWidths{};
00236         double m_availableLineItemsWidth{};
00237         double m_drawback{};
00238         double m_smallestHeadItemWidth{};
00239         double m_smallestTailItemWidth{};
00240         double m_bestEqualizingHeadItemDrawbackImprovement{};
00241         double m_bestEqualizingTailItemDrawbackImprovement{};
00242         int m_smallestHeadItemIndex{};
00243         int m_smallestTailItemIndex{};
00244         int m_smallestHeadLineIndex{};
00245         int m_smallestTailLineIndex{};
00246         int m_bestEqualizingHeadItemIndex{};
00247         int m_bestEqualizingTailItemIndex{};
00248         int m_bestEqualizingHeadLineIndex{};
00249         int m_bestEqualizingTailLineIndex{};
00250     };
00251
00252     // Constants
00253     static constexpr std::wstring_view s_cannotShareLinedFlowLayout{ L"LinedFlowLayout cannot be shared."sv };
00254     static constexpr int s_measureCountdownStart{ 5 };
00255
00256     static constexpr ItemsInfo s_emptyItemsInfo{
00257         -1 /*itemsRangeStartIndex*/,
00258         -1 /*itemsRangeLength*/,
00259         -1.0f /*minWidth*/,
00260         -1.0f /*maxWidth*/
00261     };
00262
00263     // Methods
00264     void ArrangeConstrainedLines(
00265         winrt::VirtualizingLayoutContext const& context);
00266
00267     void ArrangeUnconstrainedLine(
00268         winrt::VirtualizingLayoutContext const& context);
00269
00270     bool ComputeFrozenItemsAndLayout(
00271         winrt::VirtualizingLayoutContext const& context,
00272         std::vector<int>& oldLineItemCounts,
00273         std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementAvailableWidths,
00274         std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementDesiredWidths,
00275         double scrollViewport,
00276         double scrollOffset,
00277         double lineSpacing,
00278         double actualLineHeight,
00279         float availableWidth,
00280         float nearSizedItemsRect,
00281         float farSizedItemsRect,
00282         float nearRealizationRect,
00283         float farRealizationRect,
00284         int lineCount,
00285         int sizedLineCount,
00286         int unsizedNearItemCount,
00287         int sizedItemCount,
00288         int firstStillSizedLineIndex,
00289         int lastStillSizedLineIndex,
00290         int firstStillSizedItemIndex,
00291         int lastStillSizedItemIndex);
00292
00293     bool ComputeFrozenItemsRange(
00294         double scrollViewport,
00295         double scrollOffset,
00296         double lineSpacing,
00297         double actualLineHeight,
00298         int lineCount,
00299         int beginSizedLineIndex,
00300         int endSizedLineIndex,
00301         int beginSizedItemIndex,
00302         int endSizedItemIndex,
00303         int& adjustedBeginSizedItemIndex,
00304         int& adjustedEndSizedItemIndex);
00305
00306     float ComputeItemsLayoutFastPath(
00307         float availableWidth,
00308         double actualLineHeight);
00309
00310     void ComputeItemsLayoutRegularPath(
00311         float availableWidth,
00312         double scrollViewport,
00313         double lineSpacing,
00314         double actualLineHeight,
00315         int beginSizedLineIndex,
00316         int endSizedLineIndex,
00317         int beginSizedItemIndex,
00318         int endSizedItemIndex,
00319         int beginLineVectorIndex,
00320         bool isLastSizedLineStretchEnabled);
00321
00322     void ComputeItemsLayoutDrawback(
00323         double availableWidth,
00324         bool isLastSizedLineStretchEnabled,
00325         ItemsLayout& itemsLayout) const;
00326
00327     void ComputeItemsLayoutWithLockedItems(
00328         ItemsLayout& itemsLayout,
00329         double availableWidth,
00330         double minItemSpacing,
00331         double actualLineHeight,
00332         double averageAspectRatio,
00333         int beginSizedLineIndex,
00334         int endSizedLineIndex,
00335         int beginSizedItemIndex,
00336         int endSizedItemIndex,
00337         int beginLineVectorIndex,
00338         bool isLastSizedLineStretchEnabled);
00339
00340     double ComputeLineExpandFactor(
00341         bool forward,
00342         int sizedItemIndex,
00343         int lineItemsCount,
00344         double lineItemsWidth,
00345         double availableWidth,
00346         double minItemSpacings,
00347         double actualLineHeight,
00348         double averageAspectRatio);
00349
00350     double ComputeLineShrinkFactor(
00351         bool forward,
00352         int sizedItemIndex,
00353         int lineItemsCount,
00354         double lineItemsWidth,
00355         double availableWidth,
00356         double minItemSpacings,
00357         double actualLineHeight,
00358         double averageAspectRatio);
00359
00360     void CopyItemsInfo(
00361         std::vector<double> const& oldItemsInfoDesiredAspectRatios,
00362         std::vector<double> const& oldItemsInfoMinWidths,
00363         std::vector<double> const& oldItemsInfoMaxWidths,
00364         std::vector<float> const& oldItemsInfoArrangeWidths,
00365         int oldStart,
00366         int newStart,
00367         int copyCount);
00368
00369     void EnsureAndMeasureItemRange(
00370         winrt::VirtualizingLayoutContext const& context,
00371         float availableWidth,
00372         double actualLineHeight,
00373         bool forward,
00374         int beginRealizedItemIndex,
00375         int endRealizedItemIndex);
00376
00377     void EnsureAndResizeItemAspectRatios(
00378         double scrollViewport,
00379         double actualLineHeight,
00380         double lineSpacing);
00381
00382     void EnsureElementAvailableWidths();
00383
00384     void EnsureElementDesiredWidths();
00385
00386     void EnsureElementRealized(
00387         bool forward,
00388         int itemIndex);
00389
00390     void EnsureItemAspectRatios();
00391
00392     void EnsureItemRange(
00393         bool forward,
00394         int beginRealizedItemIndex,
00395         int endRealizedItemIndex);
00396
00397     void EnsureItemRangeFastPath(
00398         winrt::VirtualizingLayoutContext const& context,
00399         double actualLineHeight);
00400
00401     void EnsureItemsInfoDesiredAspectRatios(
00402         int itemCount);
00403
00404     void EnsureItemsInfoMinWidths(
00405         int itemCount);
00406
00407     void EnsureItemsInfoMaxWidths(
00408         int itemCount);
00409
00410     void EnsureItemsInfoArrangeWidths(
00411         int itemCount);
00412
00413     void EnsureLineItemCounts(
00414         int lineCount);
00415
00416     void ExitRegularPath();
00417
00418     double GetArrangeWidth(
00419         double desiredAspectRatio,
00420         double minWidth,
00421         double maxWidth,
00422         double actualLineHeight,
00423         double scaleFactor) const;
00424
00425     float GetArrangeWidthFromItemsInfo(
00426         int sizedItemIndex,
00427         double actualLineHeight,
00428         double averageAspectRatio,
00429         double scaleFactor = 1.0) const;
00430
00431     double GetAverageAspectRatio(
00432         float availableWidth,
00433         double actualLineHeight) const;
00434
00435     double GetAverageAspectRatioFromStorage() const;
00436
00437     std::pair<double, double> GetAverageItemsPerLine(
00438         float availableWidth);
00439
00440     double GetDesiredAspectRatioFromItemsInfo(
00441         int itemIndex,
00442         bool usesFastPathLayout) const;
00443
00444     winrt::Size GetDesiredSizeForAvailableSize(
00445         int itemIndex,
00446         winrt::UIElement const& element,
00447         winrt::Size availableSize,
00448         double actualLineHeightToRestore);
00449
00450     void GetFirstAndLastDisplayedLineIndexes(
00451         double scrollViewport,
00452         double scrollOffset,
00453         double padding,
00454         double lineSpacing,
00455         double actualLineHeight,
00456         int lineCount,
00457         bool forFullyDisplayedLines,
00458         int* firstDisplayedLineIndex,
00459         int* lastDisplayedLineIndex) const;
00460
00461     void GetFirstFullyRealizedLineIndex(
00462         int* firstFullyRealizedLineIndex,
00463         int* firstItemInFullyRealizedLine) const;
00464
00465     int GetFirstItemIndexInLineIndex(
00466         int lineVectorIndex) const;
00467
00468     int GetFrozenLineIndexFromFrozenItemIndex(
00469         int frozenItemIndex) const;
00470
00471     double GetItemDrawbackImprovement(
00472         double movingWidth,
00473         double availableWidth,
00474         double currentLineItemsWidth,
00475         double neighborLineItemsWidth,
00476         int currentLineIndex,
00477         int neighborLineIndex);
00478
00479     int GetItemLineIndex(
00480         winrt::UIElement const& element);
00481
00482     void GetItemsInfoRequestedRange(
00483         winrt::VirtualizingLayoutContext const& context,
00484         float availableWidth,
00485         double actualLineHeight,
00486         int* itemsRangeStartIndex,
00487         int* itemsRangeRequestedLength);
00488
00489     double GetItemWidthMultiplierThreshold() const;
00490
00491     ItemsLayout GetItemsLayout(
00492         std::map<int, int>* internalLockedItemIndexes,
00493         double scrollViewport,
00494         double availableWidth,
00495         double adjustedAvailableWidth,
00496         double averageLineItemsWidth,
00497         double averageAspectRatio,
00498         double lineSpacing,
00499         double actualLineHeight,
00500         int beginSizedLineIndex,
00501         int endSizedLineIndex,
00502         int beginSizedItemIndex,
00503         int endSizedItemIndex,
00504         int beginLineVectorIndex,
00505         bool isLastSizedLineStretchEnabled);
00506
00507     float GetItemsRangeArrangeWidth(
00508         int beginSizedItemIndex,
00509         int endSizedItemIndex,
00510         bool usesArrangeWidthInfo);
00511
00512     int GetLastItemIndexInLineIndex(
00513         int lineVectorIndex) const;
00514
00515     int GetLineCount(
00516         double averageItemsPerLine) const;
00517
00518     int GetLineIndex(
00519         int itemIndex,
00520         bool usesFastPathLayout) const;
00521
00522     int GetLineIndexFromAverageItemsPerLine(
00523         int itemIndex,
00524         double averageItemsPerLine) const;
00525
00526     float GetLinesDesiredWidth();
00527
00528     double GetMaxWidthFromItemsInfo(
00529         int itemIndex) const;
00530
00531     double GetMinWidthFromItemsInfo(
00532         int itemIndex) const;
00533
00534     void GetNextLockedItem(
00535         std::map<int, int>* internalLockedItemIndexes,
00536         bool forward,
00537         int beginLineIndex,
00538         int endLineIndex,
00539         int itemIndex,
00540         int* lockedItemIndex,
00541         int* lockedLineIndex) const;
00542
00543     float GetRealizationRectHeightDeficit(
00544         winrt::VirtualizingLayoutContext const& context,
00545         double actualLineHeight,
00546         double lineSpacing) const;
00547
00548     void GetRealizedItemsFromSizedItems(
00549         int realizedLineCount,
00550         int lineCount,
00551         int* unrealizedNearItemCount,
00552         int* realizedItemCount) const;
00553
00554     double GetRoundedDouble(
00555         double value) const;
00556
00557     float GetRoundedFloat(
00558         float value) const;
00559
00560     float GetSizedItemsRectHeight(
00561         winrt::VirtualizingLayoutContext const& context,
00562         double actualLineHeight,
00563         double lineSpacing) const;
00564
00565     void InitializeForRelayout(
00566         int sizedLineCount,
00567         int& firstStillSizedLineIndex,
00568         int& lastStillSizedLineIndex,
00569         int& firstStillSizedItemIndex,
00570         int& lastStillSizedItemIndex);
00571
00572     void InvalidateMeasureAsync();
00573
00574     void InvalidateMeasureTimerStart(
00575         int tickCount);
00576     void InvalidateMeasureTimerStop(
00577         bool isForDestructor);
00578
00579     void InvalidateMeasureTimerTick(
00580         winrt::IInspectable const& sender,
00581         winrt::IInspectable const& args);
00582
00583     bool IsItemsLayoutContractionWorthy(
00584         ItemsLayout const& itemsLayout);
00585
00586     bool IsItemsLayoutEqualizationWorthy(
00587         ItemsLayout const& itemsLayout,
00588         bool withHeadItem);
00589
00590     bool IsItemsLayoutExpansionWorthy(
00591         ItemsLayout const& itemsLayout);
00592
00593     bool IsLockedItem(
00594         bool forward,
00595         int beginLineIndex,
00596         int endLineIndex,
00597         int itemIndex);
00598
00599     bool IsVirtualizingContext(
00600         winrt::VirtualizingLayoutContext const& context) const;
00601
00602     std::tuple<bool, bool, bool> ItemRangesHaveNewDesiredWidths(
00603         std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> oldElementDesiredWidths,
00604         int beginRealizedItemIndex,
00605         int endRealizedItemIndex);
00606
00607     int LineItemsCountTotal(
00608         int expectedTotal);
00609
00610     bool LineHasLockedItem(
00611         int lineIndex,
00612         bool before,
00613         int itemIndex);
00614
00615     bool LineHasInternalLockedItem(
00616         std::map<int, int> const& internalLockedItemIndexes,
00617         int lineIndex,
00618         bool before,
00619         int itemIndex) const;
00620
00621     bool LockItemToLineInternal(
00622         std::map<int, int>& internalLockedItemIndexes,
00623         int beginSizedLineIndex,
00624         int endSizedLineIndex,
00625         int beginSizedItemIndex,
00626         int endSizedItemIndex,
00627         int lineIndex,
00628         int itemIndex);
00629
00630     std::tuple<int, float, ItemsInfo> MeasureConstrainedLinesFastPath(
00631         winrt::VirtualizingLayoutContext const& context,
00632         float availableWidth,
00633         double actualLineHeight,
00634         bool forceLayoutWithoutItemsInfoRequest);
00635
00636     int MeasureConstrainedLinesRegularPath(
00637         winrt::VirtualizingLayoutContext const& context,
00638         ItemsInfo const& itemsInfo,
00639         float availableWidth,
00640         double actualLineHeight);
00641
00642     int MeasureConstrainedLines(
00643         winrt::VirtualizingLayoutContext const& context,
00644         std::set<double> const& averageItemsPerLineProcessed,
00645         ItemsInfo const& itemsInfo,
00646         bool forceRelayout,
00647         float availableWidth,
00648         float nearRealizationRect,
00649         float farRealizationRect,
00650         double scrollViewport,
00651         double scrollOffset,
00652         double actualLineHeight,
00653         std::pair<double, double>* newAverageItemsPerLine);
00654
00655     void MeasureItemRange(
00656         double actualLineHeight,
00657         int beginRealizedItemIndex,
00658         int endRealizedItemIndex);
00659
00660     void MeasureItemRangeRegularPath(
00661         std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> elementAvailableWidths,
00662         double actualLineHeight,
00663         int beginRealizedItemIndex,
00664         int endRealizedItemIndex);
00665
00666     float MeasureUnconstrainedLine(
00667         winrt::VirtualizingLayoutContext const& context);
00668
00669     void NotifyLinedFlowLayoutInvalidatedDbg(
00670         winrt::LinedFlowLayoutInvalidationTrigger const& invalidationTrigger);
00671
00672     void NotifyLinedFlowLayoutItemLockedDbg(
00673         int itemIndex,
00674         int lineIndex);
00675
00676     ItemsInfo RaiseItemsInfoRequested(
00677         int itemsRangeStartIndex,
00678         int itemsRangeRequestedLength);
00679
00680     bool RequestItemsInfo(
00681         ItemsInfo const& itemsInfo,
00682         int beginSizedItemIndex,
00683         int endSizedItemIndex);
00684
00685     void ResetItemsInfo();
00686     void ResetItemsInfoForFastPath();
00687     void ResetLinesInfo();
00688     void ResetSizedLines();
00689
00690     void SetArrangeWidthFromItemsInfo(
00691         int itemIndex,
00692         float arrangeWidth);
00693
00694     void SetAverageItemsPerLine(
00695         std::pair<double, double> averageItemsPerLine,
00696         bool unlockItems = true);
00697
00698     void SetDesiredAspectRatioFromItemsInfo(
00699         int itemIndex,
00700         double desiredAspectRatio);
00701
00702     float SetItemRangeArrangeWidth(
00703         int beginItemIndex,
00704         int endItemIndex,
00705         double actualLineHeight,
00706         double averageAspectRatio,
00707         double scaleFactor = 1.0);
00708
00709     std::pair<double, double> SnapAverageItemsPerLine(
00710         double oldAverageItemsPerLineRaw,
00711         double newAverageItemsPerLineRaw) const;
00712     double SnapToPower(
00713         double value,
00714         double valuePower) const;
00715
00716     bool UpdateActualLineHeight(
00717         winrt::VirtualizingLayoutContext const& context,
00718         winrt::Size const& availableSize);
00719
00720     void UpdateAspectRatiosWithItemsInfo();
00721
00722     bool UpdateItemsInfo(
00723         ItemsInfo const& itemsInfo,
00724         int oldFirstItemsInfoIndex,
00725         int oldLastItemsInfoIndex);
00726
00727     void UpdateRoundingScaleFactor(
00728         winrt::UIElement const& xamlRootReference);
00729
00730     bool UsesArrangeWidthInfo() const;
00731     bool UsesFastPathLayout() const;
00732
00733 #ifdef DBG
00734     static winrt::hstring DependencyPropertyToStringDbg(
00735         winrt::IDependencyProperty const& dependencyProperty);
00736     void LogElementManagerDbg();
00737     void LogItemsInfoDbg(
00738         int itemsRangeStartIndex,
00739         int itemsRangeRequestedLength,
00740         ItemsInfo const& itemsInfo);
00741     void LogItemsLayoutDbg(
00742         ItemsLayout const& itemsLayout,
00743         double averageLineItemsWidth) const;
00744     void LogLayoutDbg();
00745     void LogVirtualizingLayoutContextDbg(
00746         winrt::VirtualizingLayoutContext const& context) const;
00747     void VerifyInternalLockedItemsDbg(
00748         std::map<int, int> const& internalLockedItemIndexes,
00749         int beginSizedLineIndex,
00750         int endSizedLineIndex,
00751         int beginSizedItemIndex,
00752         int endSizedItemIndex);
00753     void VerifyLockedItemsDbg();
00754 #endif
00755
00756     // Fields
00757
00758     ::ElementManager m_elementManager{ this, false };
00759
00760     // Data structure for storing item desired aspect ratios.
00761     std::unique_ptr<LinedFlowLayoutItemAspectRatios> m_aspectRatios{ nullptr };
00762
00763     // Map keeping track of the locked items.
00764     // Key:   index of locked item
00765     // Value: index of line holding the locked item
00766     std::map<int, int> m_lockedItemIndexes;
00767
00768     // Element index used in bring-into-view operations to disconnected items.
00769     int m_anchorIndex{ -1 };
00770     int m_anchorIndexRetentionCountdown{ 0 };
00771
00772     // Keep track of the measured items width. The heights are always equal to LineHeight.
00773     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> m_elementAvailableWidths;
00774     std::shared_ptr<std::map<tracker_ref<winrt::UIElement>, float>> m_elementDesiredWidths;
00775
00776     std::vector<int> m_lineItemCounts;
00777     std::vector<float> m_itemsInfoArrangeWidths;
00778
00779     // Items info collected through the ItemsInfoRequested event:
00780     // - Used only by the regular path layout:
00781     std::vector<double> m_itemsInfoDesiredAspectRatiosForRegularPath;
00782     std::vector<double> m_itemsInfoMinWidthsForRegularPath;
00783     std::vector<double> m_itemsInfoMaxWidthsForRegularPath;
00784     int m_itemsInfoFirstIndex{ -1 }; // Indicates the index of the first element represented in the 4 vectors above.
00785     // - Used only by the fast path layout
00786     winrt::com_array<double> m_itemsInfoDesiredAspectRatiosForFastPath{};
00787     winrt::com_array<double> m_itemsInfoMinWidthsForFastPath{};
00788     winrt::com_array<double> m_itemsInfoMaxWidthsForFastPath{};
00789     // - Used by both layout paths:
00790     double m_itemsInfoMinWidth{ -1.0 };
00791     double m_itemsInfoMaxWidth{ -1.0 };
00792     // Note that the std::vector<double> vectors are used in the regular path because information gathered by successive ItemsInfoRequested occurrences
00793     // is stitched together in those vectors. This allows to only request information for a fraction of the sized items belonging to 5 viewports
00794     // in each ItemsInfoRequested event.
00795     // The fast path is only using cheaper temporary winrt::com_array<double> arrays because no such stitching is performed. Information is gathered for
00796     // the entire source collection and the arrays are discarded at the end of the measure path.
00797
00798     // This countdown is used during initial loading in order to clamp the average aspect ratio between
00799     // 2/3 and 3/2 to avoid extranuous item realizations while the first items are still unpopulated.
00800     // It also allows a progressive expansion of the effective CacheLength to the minimum of 4 when
00801     // the ItemsRepeater's value is smaller than that.
00802     int m_measureCountdown{ s_measureCountdownStart };
00803
00804     int m_itemCount{ 0 };
00805     int m_unsizedNearLineCount{ -1 };
00806     int m_unrealizedNearLineCount{ -1 };
00807     int m_firstSizedLineIndex{ -1 };
00808     int m_lastSizedLineIndex{ -1 };
00809     int m_firstSizedItemIndex{ -1 };
00810     int m_lastSizedItemIndex{ -1 };
00811     int m_firstFrozenLineIndex{ -1 };
00812     int m_lastFrozenLineIndex{ -1 };
00813     int m_firstFrozenItemIndex{ -1 };
00814     int m_lastFrozenItemIndex{ -1 };
00815     int m_invalidateMeasureTimerTickCount{ 0 };
00816     bool m_isVirtualizingContext{ false };
00817     bool m_wasInitializedForContext{ false };
00818     bool m_forceRelayout{ false };
00819     bool m_isFirstOrLastItemLocked{ false };
00820     float m_previousAvailableWidth{ 0.0f };
00821     float m_maxLineWidth{ 0.0f };
00822     double m_roundingScaleFactor{ 1.0 };
00823
00824     // First double is the 'raw' average-items-per-line value that was snapped to the second double.
00825     // Second double is the 'snapped' average-items-per-line value starting from the raw first double.
00826     // The snapping is to a power of 1.1.
00827     std::pair<double, double> m_averageItemsPerLine;
00828
00829     // Timer used to trigger an asynchronous measure pass when no items info was provided by the ItemsInfoRequested event.
00830     // It is started after an item was realized or when the timer expires and m_invalidateMeasureTimerTickCount is still
00831     // smaller than 7. The interval begins at 100ms and is then increased by 50% each time it is re-started, until
00832     // m_invalidateMeasureTimerTickCount reaches 7. By then the interval is 1.7s and the total time elapsed is about 5s
00833     // when the timer is no longer re-started.
00834     winrt::DispatcherTimer m_invalidateMeasureTimer{ nullptr };
00835
00836     // Fields used to support the LayoutsTestHooks
00837     int m_logItemIndexDbg{ -1 };
00838     double m_averageItemAspectRatioDbg{ 0.0 };
00839     double m_forcedAverageItemAspectRatioDbg{ 0.0 };
00840     double m_forcedAverageItemsPerLineDividerDbg{ 0.0 };
00841     double m_forcedWrapMultiplierDbg{ 0.0 };
00842     bool m_isFastPathSupportedDbg{ true };
00843
00844 #ifdef DBG
00845     // Other debug fields
00846     int m_previousFirstDisplayedArrangedLineIndexDbg{ -1 };
00847     int m_previousLastDisplayedArrangedLineIndexDbg{ -1 };
00848 #endif
00849 };
Generated on Sun Dec 1 2024 20:52:09 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollingZoomStartingEventArgs Member List

This is the complete list of members for ScrollingZoomStartingEventArgs, including all inherited members.
CorrelationId() const | ScrollingZoomStartingEventArgs |
HorizontalOffset() const | ScrollingZoomStartingEventArgs |
ScrollingZoomStartingEventArgs() | ScrollingZoomStartingEventArgs | [inline]
SetCorrelationId(int32_t correlationId) | ScrollingZoomStartingEventArgs |
SetHorizontalOffset(double horizontalOffset) | ScrollingZoomStartingEventArgs |
SetVerticalOffset(double verticalOffset) | ScrollingZoomStartingEventArgs |
SetZoomFactor(float zoomFactor) | ScrollingZoomStartingEventArgs |
VerticalOffset() const | ScrollingZoomStartingEventArgs |
ZoomFactor() const | ScrollingZoomStartingEventArgs |
~ScrollingZoomStartingEventArgs() | ScrollingZoomStartingEventArgs | [inline]
Generated on Sun Dec 1 2024 20:53:07 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SnapPointWrapper< T > Member List

This is the complete list of members for SnapPointWrapper< T >, including all inherited members.
ActualApplicableZone() const | SnapPointWrapper< T > |
CombinationCount() const | SnapPointWrapper< T > |
Combine(const SnapPointWrapper< T > *snapPointWrapper) | SnapPointWrapper< T > |
CreateConditionalExpression(winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | SnapPointWrapper< T > |
CreateRestingPointExpression(winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse) | SnapPointWrapper< T > |
DetermineActualApplicableZone(const SnapPointWrapper< T > *previousSnapPointWrapper, const SnapPointWrapper< T > *nextSnapPointWrapper, bool forImpulseOnly) | SnapPointWrapper< T > |
Evaluate(double value) const | SnapPointWrapper< T > |
GetSnapPointFromWrapper(std::shared_ptr< SnapPointWrapper< T >> snapPointWrapper) | SnapPointWrapper< T > | [static]
GetSnapPointFromWrapper(const SnapPointWrapper< T > *snapPointWrapper) | SnapPointWrapper< T > | [private, static]
GetUpdatedExpressionAnimationsForImpulse() | SnapPointWrapper< T > |
m_snapPoint | SnapPointWrapper< T > | [private]
ResetIgnoredValue() | SnapPointWrapper< T > |
SetIgnoredValue(double ignoredValue) | SnapPointWrapper< T > |
SnapPoint() const | SnapPointWrapper< T > |
SnapPointWrapper(T const &snapPoint) | SnapPointWrapper< T > |
SnapsAt(double value) const | SnapPointWrapper< T > |
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/UniformGridLayoutState.properties.cpp Source File

  • File List
  • File Members
  • Generated

UniformGridLayoutState.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "UniformGridLayoutState.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(UniformGridLayoutState)
00012 }
00013
00014 #include "UniformGridLayoutState.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/DataModel/Recipe.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • DataModel

Recipe.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.ComponentModel;
00006 using Microsoft.UI.Xaml.Media.Imaging;
00007
00008 namespace MUXControlsTestApp.Samples.Model
00009 {
00010     public class Recipe : INotifyPropertyChanged
00011     {
00012         private BitmapImage _bitmapImage;
00013         private Uri _imageUri;
00014         private int _id;
00015         private string _description;
00016
00017         public BitmapImage BitmapImage
00018         {
00019             get
00020             {
00021                 return _bitmapImage;
00022             }
00023             set
00024             {
00025                 if (value != _bitmapImage)
00026                 {
00027                     _bitmapImage = value;
00028                     OnPropertyChanged("BitmapImage");
00029                 }
00030             }
00031         }
00032
00033         public Uri ImageUri
00034         {
00035             get
00036             {
00037                 return _imageUri;
00038             }
00039             set
00040             {
00041                 if (value != _imageUri)
00042                 {
00043                     _imageUri = value;
00044                     OnPropertyChanged("ImageUri");
00045                 }
00046             }
00047         }
00048
00049         public int Id
00050         {
00051             get
00052             {
00053                 return _id;
00054             }
00055             set
00056             {
00057                 if (value != _id)
00058                 {
00059                     _id = value;
00060                     OnPropertyChanged("Id");
00061                 }
00062             }
00063         }
00064
00065         public string Description
00066         {
00067             get
00068             {
00069                 return _description;
00070             }
00071             set
00072             {
00073                 if (value != _description)
00074                 {
00075                     _description = value;
00076                     OnPropertyChanged("Description");
00077                 }
00078             }
00079         }
00080
00081         public event PropertyChangedEventHandler PropertyChanged;
00082
00083         private void OnPropertyChanged(string propertyName)
00084         {
00085             if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); }
00086         }
00087
00088         public override string ToString()
00089         {
00090             return Description;
00091         }
00092
00093         public double AspectRatio
00094         {
00095             get
00096             {
00097                 if (_bitmapImage != null)
00098                 {
00099                     if (_bitmapImage.PixelWidth == 0 || _bitmapImage.PixelHeight == 0)
00100                     {
00101                         return GetKnownAspectRatioFromLocalPath(_bitmapImage.UriSource.LocalPath.ToString());
00102                     }
00103                     else
00104                     {
00105                         return (double)_bitmapImage.PixelWidth / _bitmapImage.PixelHeight;
00106                     }
00107                 }
00108
00109                 if (_imageUri != null)
00110                 {
00111                     return GetKnownAspectRatioFromLocalPath(_imageUri.LocalPath.ToString());
00112                 }
00113
00114                 return 0.0;
00115             }
00116         }
00117
00118         public static double GetKnownAspectRatioFromIndex(int index)
00119         {
00120             string imageName = "vette" + index + ".jpg";
00121
00122             return GetKnownAspectRatioFromImageName(imageName);
00123         }
00124
00125         private static double GetKnownAspectRatioFromLocalPath(string localPath)
00126         {
00127             string imageName = localPath.Substring(8);
00128
00129             return GetKnownAspectRatioFromImageName(imageName);
00130         }
00131
00132         private static double GetKnownAspectRatioFromImageName(string imageName)
00133         {
00134             switch (imageName)
00135             {
00136                 case "vette1.jpg":
00137                 case "vette2.jpg":
00138                 case "vette3.jpg":
00139                 case "vette7.jpg":
00140                 case "vette8.jpg":
00141                 case "vette9.jpg":
00142                 case "vette10.jpg":
00143                 case "vette11.jpg":
00144                 case "vette14.jpg":
00145                 case "vette15.jpg":
00146                 case "vette19.jpg":
00147                 case "vette21.jpg":
00148                 case "vette22.jpg":
00149                 case "vette25.jpg":
00150                 case "vette29.jpg":
00151                 case "vette30.jpg":
00152                 case "vette31.jpg":
00153                 case "vette33.jpg":
00154                 case "vette34.jpg":
00155                 case "vette37.jpg":
00156                 case "vette40.jpg":
00157                 case "vette41.jpg":
00158                 case "vette42.jpg":
00159                 case "vette43.jpg":
00160                 case "vette46.jpg":
00161                 case "vette51.jpg":
00162                 case "vette52.jpg":
00163                 case "vette55.jpg":
00164                 case "vette58.jpg":
00165                 case "vette68.jpg":
00166                 case "vette69.jpg":
00167                 case "vette71.jpg":
00168                 case "vette73.jpg":
00169                 case "vette74.jpg":
00170                 case "vette75.jpg":
00171                 case "vette76.jpg":
00172                 case "vette78.jpg":
00173                 case "vette79.jpg":
00174                 case "vette80.jpg":
00175                 case "vette81.jpg":
00176                 case "vette82.jpg":
00177                 case "vette84.jpg":
00178                 case "vette85.jpg":
00179                 case "vette87.jpg":
00180                 case "vette90.jpg":
00181                 case "vette91.jpg":
00182                 case "vette92.jpg":
00183                 case "vette94.jpg":
00184                 case "vette95.jpg":
00185                 case "vette96.jpg":
00186                 case "vette97.jpg":
00187                 case "vette100.jpg":
00188                 case "vette101.jpg":
00189                 case "vette102.jpg":
00190                 case "vette103.jpg":
00191                 case "vette104.jpg":
00192                 case "vette105.jpg":
00193                 case "vette106.jpg":
00194                 case "vette107.jpg":
00195                 case "vette108.jpg":
00196                 case "vette110.jpg":
00197                 case "vette112.jpg":
00198                 case "vette113.jpg":
00199                 case "vette114.jpg":
00200                 case "vette115.jpg":
00201                 case "vette116.jpg":
00202                 case "vette117.jpg":
00203                 case "vette118.jpg":
00204                 case "vette119.jpg":
00205                 case "vette120.jpg":
00206                 case "vette123.jpg":
00207                     return 404.0 / 303.0;
00208                 case "vette4.jpg":
00209                     return 71.0 / 404.0;
00210                 case "vette5.jpg":
00211                 case "vette12.jpg":
00212                 case "vette13.jpg":
00213                 case "vette16.jpg":
00214                 case "vette23.jpg":
00215                 case "vette24.jpg":
00216                 case "vette28.jpg":
00217                 case "vette38.jpg":
00218                 case "vette39.jpg":
00219                 case "vette44.jpg":
00220                 case "vette45.jpg":
00221                 case "vette49.jpg":
00222                 case "vette50.jpg":
00223                 case "vette53.jpg":
00224                 case "vette54.jpg":
00225                 case "vette56.jpg":
00226                 case "vette57.jpg":
00227                 case "vette59.jpg":
00228                 case "vette60.jpg":
00229                 case "vette61.jpg":
00230                 case "vette62.jpg":
00231                 case "vette63.jpg":
00232                 case "vette64.jpg":
00233                 case "vette65.jpg":
00234                 case "vette66.jpg":
00235                 case "vette67.jpg":
00236                 case "vette70.jpg":
00237                 case "vette72.jpg":
00238                 case "vette83.jpg":
00239                 case "vette93.jpg":
00240                 case "vette98.jpg":
00241                 case "vette99.jpg":
00242                 case "vette109.jpg":
00243                 case "vette111.jpg":
00244                 case "vette121.jpg":
00245                 case "vette122.jpg":
00246                 case "vette124.jpg":
00247                 case "vette125.jpg":
00248                     return 303.0 / 404.0;
00249                 case "vette6.jpg":
00250                     return 404.0 / 175.0;
00251                 case "vette17.jpg":
00252                     return 212.0 / 404.0;
00253                 case "vette18.jpg":
00254                     return 404.0 / 153.0;
00255                 case "vette20.jpg":
00256                     return 364.0 / 303.0;
00257                 case "vette26.jpg":
00258                     return 404.0 / 238.0;
00259                 case "vette27.jpg":
00260                     return 275.0 / 404.0;
00261                 case "vette32.jpg":
00262                     return 404.0 / 212.0;
00263                 case "vette35.jpg":
00264                     return 404.0 / 190.0;
00265                 case "vette36.jpg":
00266                     return 193.0 / 404.0;
00267                 case "vette47.jpg":
00268                     return 119.0 / 404.0;
00269                 case "vette48.jpg":
00270                     return 188.0 / 404.0;
00271                 case "vette77.jpg":
00272                     return 281.0 / 404.0;
00273                 case "vette86.jpg":
00274                     return 404.0 / 98.0;
00275                 case "vette88.jpg":
00276                     return 404.0 / 141.0;
00277                 case "vette89.jpg":
00278                     return 221.0 / 404.0;
00279                 case "vette126.jpg":
00280                     return 151.0 / 404.0;
00281                 case "Rect0.png":
00282                     return 1.75; // 337.0 / 193.0
00283                 case "Rect1.png":
00284                     return 1.5;  // 289.0 / 193.0
00285                 case "Rect2.png":
00286                     return 1.25; // 241.0 / 193.0
00287                 case "Rect3.png":
00288                     return 1.0;  // 193.0 / 193.0
00289                 case "Rect4.png":
00290                     return 0.75; // 145.0 / 193.0;
00291                 case "Rect5.png":
00292                     return 0.5;  //  97.0 / 193.0;
00293             }
00294             return 1.0;
00295         }
00296     }
00297 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ImageIconPage Member List

This is the complete list of members for ImageIconPage, including all inherited members.
ImageIconPage() | ImageIconPage | [inline]
ToggleButton_Checked(object sender, RoutedEventArgs e) | ImageIconPage | [inline, private]
ToggleButton_Unchecked(object sender, RoutedEventArgs e) | ImageIconPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SplitViewPage Member List

This is the complete list of members for SplitViewPage, including all inherited members.
DisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | SplitViewPage | [inline, private]
Pane_Closed(SplitView sender, object e) | SplitViewPage | [inline, private]
Pane_Opened(SplitView sender, object e) | SplitViewPage | [inline, private]
PaneOpenCheckbox_CheckChanged(object sender, RoutedEventArgs e) | SplitViewPage | [inline, private]
PanePlacement_Toggled(object sender, RoutedEventArgs e) | SplitViewPage | [inline, private]
SplitViewPage() | SplitViewPage | [inline]
Generated on Sun Dec 1 2024 20:54:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SwipeControlTests Member List

This is the complete list of members for SwipeControlTests, including all inherited members.
MarkupDefinedSwipeItemDoesNotCrash() | SwipeControlTests | [inline]
SwipeControlCanOnlyBeHorizontalOrVertical() | SwipeControlTests | [inline]
SwipeControlCanOnlyBeHorizontalOrVerticalAfterRendering() | SwipeControlTests | [inline]
SwipeControlTest() | SwipeControlTests | [inline]
SwipeItemsExecuteThrowsExceptionWhenMoreThanOneItemAreAdded() | SwipeControlTests | [inline]
SwipeItemsTest() | SwipeControlTests | [inline]
SwipeItemTest() | SwipeControlTests | [inline]
Generated on Sun Dec 1 2024 20:53:38 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TitleBarTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

TitleBarTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TitleBarTemplateSettingsProperties
00008 {
00009 public:
00010     TitleBarTemplateSettingsProperties();
00011
00012     void IconElement(winrt::IconElement const& value);
00013     winrt::IconElement IconElement();
00014
00015     static winrt::DependencyProperty IconElementProperty() { return s_IconElementProperty; }
00016
00017     static GlobalDependencyProperty s_IconElementProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SplitButton/SplitButtonAutomationPeer.idl Source File

  • File List
  • File Members
  • SplitButton

SplitButtonAutomationPeer.idl

Go to the documentation of this file.
00001 ﻿namespace MU_XAP_NAMESPACE
00002 {
00003
00004 [MUX_PUBLIC]
00005 [webhosthidden]
00006 unsealed runtimeclass SplitButtonAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer,
00007 Microsoft.UI.Xaml.Automation.Provider.IExpandCollapseProvider,
00008 Microsoft.UI.Xaml.Automation.Provider.IInvokeProvider
00009 {
00010     SplitButtonAutomationPeer(MU_XC_NAMESPACE.SplitButton owner);
00011 }
00012
00013 [MUX_PUBLIC]
00014 [webhosthidden]
00015 unsealed runtimeclass ToggleSplitButtonAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer,
00016 Microsoft.UI.Xaml.Automation.Provider.IExpandCollapseProvider,
00017 Microsoft.UI.Xaml.Automation.Provider.IToggleProvider
00018 {
00019     ToggleSplitButtonAutomationPeer(MU_XC_NAMESPACE.ToggleSplitButton owner);
00020 }
00021
00022 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBarAutomationProperties.properties.h Source File

  • File List
  • File Members
  • Generated

CommandBarFlyoutCommandBarAutomationProperties.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class CommandBarFlyoutCommandBarAutomationPropertiesProperties
00008 {
00009 public:
00010     CommandBarFlyoutCommandBarAutomationPropertiesProperties();
00011
00012     static void SetControlType(winrt::UIElement const& target, winrt::AutomationControlType const& value);
00013     static winrt::AutomationControlType GetControlType(winrt::UIElement const& target);
00014
00015     static winrt::DependencyProperty ControlTypeProperty() { return s_ControlTypeProperty; }
00016
00017     static GlobalDependencyProperty s_ControlTypeProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/PipsPagerAutomationPeer.properties.cpp Source File

  • File List
  • File Members
  • Generated

PipsPagerAutomationPeer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "PipsPagerAutomationPeer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Automation::Peers
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(PipsPagerAutomationPeer)
00012 }
00013
00014 #include "PipsPagerAutomationPeer.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:52 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemsSourceView.properties.cpp Source File

  • File List
  • File Members
  • Generated

ItemsSourceView.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ItemsSourceView.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(ItemsSourceView)
00012 }
00013
00014 #include "ItemsSourceView.g.cpp"
00015
00016
00017 ItemsSourceViewProperties::ItemsSourceViewProperties()
00018     : m_collectionChangedEventSource{static_cast<ItemsSourceView*>(this)}
00019 {
00020 }
00021
00022 void ItemsSourceViewProperties::EnsureProperties()
00023 {
00024 }
00025
00026 void ItemsSourceViewProperties::ClearProperties()
00027 {
00028 }
00029
00030 winrt::event_token ItemsSourceViewProperties::CollectionChanged(winrt::NotifyCollectionChangedEventHandler const& value)
00031 {
00032     return m_collectionChangedEventSource.add(value);
00033 }
00034
00035 void ItemsSourceViewProperties::CollectionChanged(winrt::event_token const& token)
00036 {
00037     m_collectionChangedEventSource.remove(token);
00038 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SelectedItemInfo Member List

This is the complete list of members for SelectedItemInfo, including all inherited members.
Node | SelectedItemInfo
Path | SelectedItemInfo
Generated on Sun Dec 1 2024 20:53:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ListViewBackgroundPage Member List

This is the complete list of members for ListViewBackgroundPage, including all inherited members.
btnChangeListViewStyle_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) | ListViewBackgroundPage | [inline, private]
CustomListViewStyle | ListViewBackgroundPage | [private]
Ingredients | ListViewBackgroundPage | [private]
ListViewBackgroundPage() | ListViewBackgroundPage | [inline]
PopulateData() | ListViewBackgroundPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterWithBiDirectionalScrollControllerPage Member List

This is the complete list of members for ScrollPresenterWithBiDirectionalScrollControllerPage, including all inherited members.
BiDirectionalScrollController_LogMessage(BiDirectionalScrollController sender, string args) | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline, private]
BtnClearLog_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline, private]
BtnResetScrollPresenterScrollControllers_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline, private]
BtnSetScrollPresenterScrollControllers_Click(object sender, RoutedEventArgs e) | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline, private]
ChkIsBiDirectionalScrollControllerRailEnabled_Checked(object sender, RoutedEventArgs e) | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline, private]
ChkIsBiDirectionalScrollControllerRailEnabled_Unchecked(object sender, RoutedEventArgs e) | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline, private]
LogMessage(string message) | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline, private]
ScrollPresenterWithBiDirectionalScrollControllerPage() | ScrollPresenterWithBiDirectionalScrollControllerPage | [inline]
Generated on Sun Dec 1 2024 20:54:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationView_InteractionTests/NavigationViewTestsBase.cs Source File

  • File List
  • File Members
  • NavigationView
  • NavigationView_InteractionTests

NavigationViewTestsBase.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003 using Common;
00004 using System;
00005 using System.Collections.Generic;
00006 using System.Linq;
00007 using System.Threading.Tasks;
00008 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Infra;
00009 using Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.Common;
00010
00011 using WEX.TestExecution;
00012 using WEX.TestExecution.Markup;
00013 using WEX.Logging.Interop;
00014
00015 using Microsoft.Windows.Apps.Test.Automation;
00016 using Microsoft.Windows.Apps.Test.Foundation;
00017 using Microsoft.Windows.Apps.Test.Foundation.Controls;
00018 using Microsoft.Windows.Apps.Test.Foundation.Waiters;
00019
00020 namespace Microsoft.UI.Xaml.Tests.MUXControls.InteractionTests.NavigationViewTests
00021 {
00022     public class NavigationViewTestsBase
00023     {
00024         protected const string minimal = "Minimal";
00025         protected const string compact = "Compact";
00026         protected const string expanded = "Expanded";
00027
00028         protected enum ControlWidth { Narrow, Medium, Wide }
00029         protected enum ControlHeight { Default, Small }
00030         protected enum Threshold { Low, High }
00031         protected enum ComboBoxName { CompactModeComboBox, ExpandedModeComboBox }
00032         protected enum TopNavPosition { Primary, Overflow }
00033         protected enum PaneOpenStatus { Opened, Closed }
00034
00035         [TestCleanup]
00036         public void TestCleanup()
00037         {
00038             TestCleanupHelper.Cleanup();
00039         }
00040
00041         protected void SetNavViewWidth(ControlWidth width)
00042         {
00043             ComboBox widthComboBox = new ComboBox(FindElement.ByName("WidthComboBox"));
00044             string currentWidth = "unset";
00045
00046             if (widthComboBox.Selection.Count > 0)
00047             {
00048                 ComboBoxItem selectedComboBoxItem = widthComboBox.Selection[0];
00049                 currentWidth = selectedComboBoxItem.Name;
00050                 Log.Comment("Current width " + currentWidth);
00051             }
00052             string widthString = width.ToString();
00053
00054             if (currentWidth != widthString)
00055             {
00056                 Wait.ForIdle();
00057                 Log.Comment("Changing to width " + widthString);
00058                 widthComboBox.SelectItemByName(widthString);
00059             }
00060         }
00061
00062         protected void SetNavViewHeight(ControlHeight height)
00063         {
00064             ComboBox heightComboBox = new ComboBox(FindElement.ByName("HeightCombobox"));
00065             string currentHeight = "Default";
00066
00067             if (heightComboBox.Selection.Count > 0)
00068             {
00069                 ComboBoxItem selectedComboBoxItem = heightComboBox.Selection[0];
00070                 currentHeight = selectedComboBoxItem.Name;
00071                 Log.Comment("Current height " + currentHeight);
00072             }
00073
00074             Log.Comment("Changing height to " + height.ToString());
00075             heightComboBox.SelectItemByName(height.ToString());
00076         }
00077
00078         protected void SetThreshold(Threshold threshold, ComboBoxName name)
00079         {
00080             ComboBox thresholdComboBox = new ComboBox(FindElement.ByName(name.ToString()));
00081             string currentThreshold = "unset";
00082
00083             if (thresholdComboBox.Selection.Count > 0)
00084             {
00085                 ComboBoxItem selectedComboBoxItem = thresholdComboBox.Selection[0];
00086                 currentThreshold = selectedComboBoxItem.Name;
00087                 Log.Comment("Current threshold " + currentThreshold);
00088             }
00089             string thresholdString = threshold.ToString();
00090
00091             if (currentThreshold != thresholdString)
00092             {
00093                 Log.Comment("Changing to width " + thresholdString);
00094                 thresholdComboBox.SelectItemByName(thresholdString);
00095             }
00096         }
00097
00098         protected void ClickClearSelectionButton()
00099         {
00100             Log.Comment("Clear the selection by set NavView.SelectedItem to null");
00101             var ClearSelectedItemButton = new Button(FindElement.ByName("ClearSelectedItemButton"));
00102             ClearSelectedItemButton.Invoke();
00103             Wait.ForIdle();
00104         }
00105
00106         protected void WaitAndAssertPaneStatus(PaneOpenStatus status)
00107         {
00108             string expectString = status == PaneOpenStatus.Opened ? "Opened" : "Closed";
00109             var eventTextBlock = new TextBlock(FindElement.ByName("PaneOpenedOrClosedEvent"));
00110
00111             Log.Comment("PaneOpenedOrClosedEvent before wait: " + eventTextBlock.GetText());
00112             TestEnvironment.VerifyAreEqualWithRetry(100, // wait max to 5s
00113                 () => expectString,
00114                 () => eventTextBlock.GetText());
00115         }
00116
00117         protected void EnsurePaneHeaderCanBeModifiedHelper(RegressionTestType navviewMode)
00118         {
00119             if (navviewMode == RegressionTestType.TopNav)
00120             {
00121                 var flipOrientationButton = new Button(FindElement.ByName("FlipOrientationButton"));
00122                 flipOrientationButton.Invoke();
00123                 Wait.ForIdle();
00124             }
00125
00126             var changePaneHeaderbutton = new Button(FindElement.ByName("ChangePaneHeader"));
00127             changePaneHeaderbutton.Invoke();
00128             Wait.ForIdle();
00129
00130             UIObject paneHeaderContent = null;
00131
00132             if (navviewMode == RegressionTestType.TopNav)
00133             {
00134                 paneHeaderContent = FindElement.ById("PaneHeaderOnTopPane");
00135             }
00136             else
00137             {
00138                 paneHeaderContent = FindElement.ById("PaneHeaderContentBorder");
00139             }
00140
00141             TextBlock text = new TextBlock(paneHeaderContent.FirstChild);
00142             Verify.AreEqual("Modified Pane Header", text.DocumentText);
00143
00144             if (navviewMode == RegressionTestType.LeftNav)
00145             {
00146                 // In Closed Compact mode, the PaneHeader should not be visible:
00147
00148                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00149                 panelDisplayModeComboBox.SelectItemByName("LeftCompact");
00150                 Wait.ForIdle();
00151
00152                 EnsureNavViewClosed();
00153
00154                 ElementCache.Clear();
00155                 VerifyElement.NotFound("PaneHeaderContentBorder", FindBy.Name);
00156             }
00157         }
00158
00159         protected void EnsureNavViewClosed()
00160         {
00161             CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00162             if (isPaneOpenCheckBox.ToggleState == ToggleState.On)
00163             {
00164                 using (var waiter = isPaneOpenCheckBox.GetToggledWaiter())
00165                 {
00166                     isPaneOpenCheckBox.Uncheck();
00167                     waiter.Wait();
00168                 }
00169             }
00170             Wait.ForIdle();
00171         }
00172
00173         protected List<UIObject> GetTopNavigationItems(TopNavPosition position)
00174         {
00175             string hostId = position == TopNavPosition.Overflow ? "TopNavMenuItemsOverflowHost" : "TopNavMenuItemsHost";
00176             List<UIObject> collection = new List<UIObject>();
00177
00178             var host = TryFindElement.ById(hostId);
00179             if (host != null)
00180             {
00181                 collection.AddRange(host.Children);
00182             }
00183             else
00184             {
00185                 Log.Warning("Can't find container " + hostId);
00186             }
00187             return collection;
00188         }
00189
00190         protected void InvokeOverflowButton()
00191         {
00192             Log.Comment("Invoke More button to open/close Overflow menu");
00193             var moreButton = TryFindElement.ById("TopNavOverflowButton");
00194             Verify.IsNotNull(moreButton, "Overflow button should exist");
00195             new Button(moreButton).InvokeAndWait();
00196         }
00197         protected bool IsItemInTopNavPrimaryList(string text)
00198         {
00199             var list = TryFindElement.ById("TopNavMenuItemsHost");
00200             Verify.IsTrue(list != null, "TopNavMenuItemsHost exists");
00201             foreach (var item in list.Children)
00202             {
00203                 if (item != null)
00204                 {
00205                     foreach (var v in new List<string> { item.AutomationId, item.ClassName, item.Name })
00206                     {
00207                         if (v != null && v.Contains(text))
00208                         {
00209                             return true;
00210                         }
00211                     }
00212                 }
00213             }
00214             return false;
00215         }
00216
00217         protected void PaneOpenCloseTestCaseRetry(int retryNumber, Action action)
00218         {
00219             for (int i = 0; i < retryNumber; i++)
00220             {
00221                 try
00222                 {
00223                     if (i > 0)
00224                     {
00225                         Log.Comment("Retry on " + i);
00226                     }
00227                     action();
00228                     return;
00229                 }
00230                 catch (Exception e)
00231                 {
00232                     CheckBox isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00233                     Log.Comment("IsPaneOpenCheckBox toggle status: " + isPaneOpenCheckBox.ToggleState);
00234
00235                     Edit closingCounts = new Edit(FindElement.ByName("ClosingEventCountTextBlock"));
00236                     Log.Comment("ClosingEventCountTextBlock text: " + closingCounts.GetText());
00237
00238                     TextBlock eventTextBlock = new TextBlock(FindElement.ByName("PaneOpenedOrClosedEvent"));
00239                     Log.Comment("PaneOpenedOrClosedEvent text: " + eventTextBlock.GetText());
00240
00241                     Log.Comment(e.Message);
00242                 }
00243             }
00244
00245             throw new Exception("Reach max number of retry " + retryNumber);
00246         }
00247
00248         protected string UIObjectToString(UIObject uIObject)
00249         {
00250             return (uIObject == null) ? "" :
00251                 string.Join("/",
00252                     new[] { uIObject.Name, uIObject.ClassName, uIObject.AutomationId }.
00253                         Where(s => s != null));
00254         }
00255
00256         protected bool UIObjectContains(UIObject uIObject, string itemName)
00257         {
00258             return UIObjectToString(uIObject).Contains(itemName);
00259         }
00260
00261         protected void OpenOverflowMenuAndInvokeItem(string itemName)
00262         {
00263             InvokeOverflowButton();
00264
00265             var host = TryFindElement.ById("TopNavMenuItemsOverflowHost");
00266             Verify.IsNotNull(host, "Overflow menu should be opened");
00267
00268             var overflowItems = GetTopNavigationItems(TopNavPosition.Overflow);
00269             var items = overflowItems.
00270                 Where(item => UIObjectContains(item, itemName));
00271
00272             var count = items.Count();
00273             if (count == 0)
00274             {
00275                 Log.Comment("Items in overflow: ", String.Join("@", overflowItems.Select(item => UIObjectToString(item))));
00276             }
00277             Verify.IsTrue(count > 0, "There should be at least one item match with " + itemName);
00278
00279             if (count > 1)
00280             {
00281                 Log.Warning("There is more than one item match with" + itemName + " and first item is invoked");
00282             }
00283
00284             var itemToBeClicked = items.ElementAt(0);
00285             Log.Comment("Invoke the item " + UIObjectToString(itemToBeClicked));
00286             new Button(itemToBeClicked).Click();
00287             Wait.ForIdle();
00288             //When a overflow item is clicked, NavView depends on another UI ticket to update the layout.
00289             Wait.ForSeconds(1);
00290             Wait.ForIdle();
00291         }
00292
00293         protected void InvokeNavigationViewAccessKeyAndVerifyKeyTipPlacement(string expectedKeyTipTargetElementId)
00294         {
00295             string keyTipText = "H";
00296             Log.Comment("Send AccessKey to invoke toggle button for left nav or more button for top nav");
00297             KeyboardHelper.PressDownModifierKey(ModifierKey.Alt);
00298             KeyboardHelper.ReleaseModifierKey(ModifierKey.Alt);
00299             Wait.ForIdle();
00300
00301             // Verify that KeyTip appears near the target element.
00302             var keytip = TryFindElement.ByName(keyTipText);
00303             Verify.IsNotNull(keytip, "keytip");
00304             var keyTipPopup = keytip.Parent;
00305             Verify.IsNotNull(keyTipPopup, "keyTipPopup");
00306             var keyTipBounds = keyTipPopup.BoundingRectangle;
00307             Log.Comment("KeyTip bounds are: " + keyTipBounds);
00308
00309             var target = FindElement.ById(expectedKeyTipTargetElementId);
00310             var targetBounds = target.BoundingRectangle;
00311             Log.Comment("Target bounds are: " + targetBounds);
00312             targetBounds.Inflate(20, 20);
00313
00314             Verify.IsTrue(keyTipBounds.IntersectsWith(targetBounds), "KeyTip bounds should be close to target bounds.");
00315
00316             // Invoke the AccessKey:
00317             TextInput.SendText(keyTipText);
00318             Wait.ForIdle();
00319         }
00320         protected void VerifyBackAndCloseButtonsVisibility(bool inLeftMinimalPanelDisplayMode)
00321         {
00322             using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Test" }))
00323             {
00324                 var displayModeTextBox = new TextBlock(FindElement.ByName("DisplayModeTextBox"));
00325                 var panelDisplayModeComboBox = new ComboBox(FindElement.ByName("PaneDisplayModeCombobox"));
00326                 var isPaneOpenCheckBox = new CheckBox(FindElement.ById("IsPaneOpenCheckBox"));
00327
00328                 Verify.AreEqual(expanded, displayModeTextBox.DocumentText, "Original DisplayMode expected to be Expanded");
00329
00330                 if (inLeftMinimalPanelDisplayMode)
00331                 {
00332                     Log.Comment("Set PaneDisplayMode to LeftMinimal");
00333                     panelDisplayModeComboBox.SelectItemByName("LeftMinimal");
00334                     Wait.ForIdle();
00335
00336                     Log.Comment("Verify Pane is closed automatically when PaneDisplayMode becomes LeftMinimal");
00337                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False when PaneDisplayMode becomes LeftMinimal");
00338                 }
00339                 else
00340                 {
00341                     Log.Comment("Set PaneDisplayMode to Auto");
00342                     panelDisplayModeComboBox.SelectItemByName("Auto");
00343                     Wait.ForIdle();
00344
00345                     Log.Comment("Verify Pane remains open when PaneDisplayMode becomes Auto");
00346                     Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to remain True when PaneDisplayMode becomes Auto");
00347
00348                     Log.Comment("Verify back button is visible when pane is open in Expanded DisplayMode");
00349                     VerifyElement.Found("NavigationViewBackButton", FindBy.Id);
00350
00351                     Log.Comment("Verify close button is not visible when pane is open in Expanded DisplayMode");
00352                     VerifyElement.NotFound("NavigationViewCloseButton", FindBy.Id);
00353
00354                     Log.Comment("Decrease the width of the control from Wide to Narrow and force pane closure");
00355                     SetNavViewWidth(ControlWidth.Narrow);
00356                     Wait.ForIdle();
00357                     Verify.AreEqual(ToggleState.Off, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be False after decreasing width");
00358                     Verify.AreEqual(minimal, displayModeTextBox.DocumentText);
00359                 }
00360
00361                 Log.Comment("Verify toggle-pane button is visible when pane is closed");
00362                 VerifyElement.Found("TogglePaneButton", FindBy.Id);
00363
00364                 Log.Comment("Verify back button is visible when pane is closed");
00365                 VerifyElement.Found("NavigationViewBackButton", FindBy.Id);
00366
00367                 Log.Comment("Verify close button is not visible when pane is closed");
00368                 VerifyElement.NotFound("NavigationViewCloseButton", FindBy.Id);
00369
00370                 Log.Comment("Open the pane");
00371                 isPaneOpenCheckBox.Check();
00372                 Wait.ForIdle();
00373
00374                 Verify.AreEqual(ToggleState.On, isPaneOpenCheckBox.ToggleState, "IsPaneOpen expected to be True");
00375
00376                 Log.Comment("Verify toggle-pane button is visible when pane is open");
00377                 VerifyElement.Found("TogglePaneButton", FindBy.Id);
00378
00379                 Log.Comment("Verify back button is not visible when pane is open");
00380                 VerifyElement.NotFound("NavigationViewBackButton", FindBy.Id);
00381
00382                 Log.Comment("Verify close button is visible when pane is open");
00383                 VerifyElement.Found("NavigationViewCloseButton", FindBy.Id);
00384
00385                 Button closeButton = new Button(FindElement.ById("NavigationViewCloseButton"));
00386                 Verify.IsNotNull(closeButton);
00387                 Verify.IsTrue(closeButton.IsEnabled, "Close button is expected to be enabled");
00388
00389                 CheckBox backButtonVisibilityCheckbox = new CheckBox(FindElement.ByName("BackButtonVisibilityCheckbox"));
00390
00391                 backButtonVisibilityCheckbox.Uncheck();
00392                 Wait.ForIdle();
00393
00394                 Log.Comment("Verify back button is not visible when pane is open");
00395                 VerifyElement.NotFound("NavigationViewBackButton", FindBy.Id);
00396
00397                 Log.Comment("Verify close button is no longer visible when pane is open");
00398                 VerifyElement.NotFound("NavigationViewCloseButton", FindBy.Id);
00399             }
00400         }
00401
00402     }
00403
00404     [Flags]
00405     public enum RegressionTestType
00406     {
00407         LeftNav = 1,
00408         TopNav = 2,
00409         LeftNavRS4 = 4,
00410         HierarchyMarkup = 8,
00411         HierarchyDatabinding = 16
00412     }
00413
00414     public class RegressionTestScenario
00415     {
00416         private RegressionTestScenario(string testPagename, bool isLeftnavTest, bool isUsingRS4Style)
00417         {
00418             TestPageName = testPagename;
00419             IsLeftNavTest = isLeftnavTest;
00420             IsUsingRS4Style = isUsingRS4Style;
00421         }
00422         public string TestPageName { get; private set; }
00423         public bool IsLeftNavTest { get; private set; }
00424         public bool IsUsingRS4Style { get; private set; }
00425         public static List<RegressionTestScenario> BuildLeftNavRegressionTestScenarios()
00426         {
00427             return BuildTestScenarios(RegressionTestType.LeftNav);
00428         }
00429         public static List<RegressionTestScenario> BuildAllRegressionTestScenarios()
00430         {
00431             return BuildTestScenarios(RegressionTestType.LeftNav | RegressionTestType.TopNav);
00432         }
00433         public static List<RegressionTestScenario> BuildTopNavRegressionTestScenarios()
00434         {
00435             return BuildTestScenarios(RegressionTestType.LeftNav | RegressionTestType.TopNav);
00436         }
00437         public static List<RegressionTestScenario> BuildHierarchicalNavRegressionTestScenarios()
00438         {
00439             return BuildTestScenarios(RegressionTestType.HierarchyMarkup | RegressionTestType.HierarchyDatabinding);
00440         }
00441         private static List<RegressionTestScenario> BuildTestScenarios(RegressionTestType types)
00442         {
00443             Dictionary<RegressionTestType, RegressionTestScenario> map =
00444                 new Dictionary<RegressionTestType, RegressionTestScenario>
00445             {
00446                     { RegressionTestType.LeftNav, new RegressionTestScenario("NavigationView Test", isLeftnavTest: true, isUsingRS4Style: false)},
00447                     { RegressionTestType.TopNav, new RegressionTestScenario("NavigationView TopNav Test", isLeftnavTest: false, isUsingRS4Style: false)},
00448                     { RegressionTestType.HierarchyMarkup, new RegressionTestScenario("HierarchicalNavigationView Markup Test", isLeftnavTest: false, isUsingRS4Style: false)},
00449                     { RegressionTestType.HierarchyDatabinding, new RegressionTestScenario("HierarchicalNavigationView DataBinding Test", isLeftnavTest: false, isUsingRS4Style: false)},
00450             };
00451
00452             List<RegressionTestScenario> scenarios = new List<RegressionTestScenario>();
00453             foreach (RegressionTestType type in Enum.GetValues(typeof(RegressionTestType)))
00454             {
00455                 if (types.HasFlag(type))
00456                 {
00457                     scenarios.Add(map[type]);
00458                 }
00459             }
00460             return scenarios;
00461         }
00462     }
00463 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/ScrollViewTestHooksFactory.cpp Source File

  • File List
  • File Members
  • ScrollView

ScrollViewTestHooksFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ScrollViewTestHooksFactory.h"
00007
00008 #include "ScrollViewTestHooks.properties.cpp"
Generated on Sun Dec 1 2024 20:52:17 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CornerRadiusFilterConverter.properties.h Source File

  • File List
  • File Members
  • Generated

CornerRadiusFilterConverter.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class CornerRadiusFilterConverterProperties
00008 {
00009 public:
00010     CornerRadiusFilterConverterProperties();
00011
00012     void Filter(winrt::CornerRadiusFilterKind const& value);
00013     winrt::CornerRadiusFilterKind Filter();
00014
00015     void Scale(double value);
00016     double Scale();
00017
00018     static winrt::DependencyProperty FilterProperty() { return s_FilterProperty; }
00019     static winrt::DependencyProperty ScaleProperty() { return s_ScaleProperty; }
00020
00021     static GlobalDependencyProperty s_FilterProperty;
00022     static GlobalDependencyProperty s_ScaleProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/TestUI/Samples/LayoutSamplePages/NonVirtual/NonVirtualStackLayoutSamplePage.xaml.cs Source File

  • File List
  • File Members
  • Repeater
  • TestUI
  • Samples
  • LayoutSamplePages
  • NonVirtual

NonVirtualStackLayoutSamplePage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using MUXControlsTestApp.Utils;
00005 using System;
00006 using System.Collections.ObjectModel;
00007 using System.Collections.Specialized;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using System.Linq;
00011
00012 namespace MUXControlsTestApp.Samples
00013 {
00014     public sealed partial class NonVirtualStackLayoutSamplePage : Page
00015     {
00016         public NonVirtualStackLayoutSamplePage()
00017         {
00018             this.InitializeComponent();
00019             repeater.ItemsSource = Enumerable.Range(0, 10);
00020         }
00021     }
00022 }
Generated on Sun Dec 1 2024 20:52:10 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ChildrenInTabFocusOrderIterable.h Source File

  • File List
  • File Members
  • Repeater

ChildrenInTabFocusOrderIterable.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 class ChildrenInTabFocusOrderIterable :
00007     public ReferenceTracker<
00008         ChildrenInTabFocusOrderIterable,
00009         reference_tracker_implements_t<winrt::IIterable<winrt::DependencyObject>>::type>
00010 {
00011 public:
00012     ChildrenInTabFocusOrderIterable(const winrt::ItemsRepeater& repeater);
00013
00014 #pragma region IIterable implementation
00015     winrt::IIterator<winrt::DependencyObject> First();
00016 #pragma endregion
00017
00018
00019 private:
00020     class ChildrenInTabFocusOrderIterator :
00021         public winrt::implements<ChildrenInTabFocusOrderIterator, winrt::IIterator<winrt::DependencyObject>>
00022     {
00023     public:
00024         ChildrenInTabFocusOrderIterator(const winrt::ItemsRepeater& repeater);
00025
00026 #pragma region IIterable implementation
00027         winrt::DependencyObject Current();
00028         bool HasCurrent()
00029         {
00030             return (m_index < static_cast<int>(m_realizedChildren.size()));
00031         }
00032         bool MoveNext()
00033         {
00034             if (m_index < static_cast<int>(m_realizedChildren.size()))
00035             {
00036                 ++m_index;
00037                 return (m_index < static_cast<int>(m_realizedChildren.size()));
00038             }
00039             else
00040             {
00041                 throw winrt::hresult_out_of_bounds();
00042             }
00043
00044             return false;
00045         }
00046
00047         uint32_t GetMany(winrt::array_view<winrt::DependencyObject> values)
00048         {
00049             uint32_t howMany = 0;
00050             if (HasCurrent())
00051             {
00052                 do
00053                 {
00054                     if (howMany >= values.size()) break;
00055
00056                     values[howMany] = Current();
00057                     howMany++;
00058                 } while (MoveNext());
00059             }
00060
00061             return howMany;
00062         }
00063 #pragma endregion
00064
00065     private:
00066         std::vector<std::pair<int /* index */, winrt::UIElement>> m_realizedChildren;
00067         int m_index = 0;
00068     };
00069
00070
00071     tracker_ref<winrt::ItemsRepeater> m_repeater{ this };
00072 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ILinearTransferEffect Member List

This is the complete list of members for ILinearTransferEffect, including all inherited members.
AlphaDisable([out, retval] boolean *value) | ILinearTransferEffect
AlphaDisable([in] boolean value) | ILinearTransferEffect
AlphaOffset([out, retval] float *value) | ILinearTransferEffect
AlphaOffset([in] float value) | ILinearTransferEffect
AlphaSlope([out, retval] float *value) | ILinearTransferEffect
AlphaSlope([in] float value) | ILinearTransferEffect
BlueDisable([out, retval] boolean *value) | ILinearTransferEffect
BlueDisable([in] boolean value) | ILinearTransferEffect
BlueOffset([out, retval] float *value) | ILinearTransferEffect
BlueOffset([in] float value) | ILinearTransferEffect
BlueSlope([out, retval] float *value) | ILinearTransferEffect
BlueSlope([in] float value) | ILinearTransferEffect
ClampOutput([out, retval] boolean *value) | ILinearTransferEffect
ClampOutput([in] boolean value) | ILinearTransferEffect
GreenDisable([out, retval] boolean *value) | ILinearTransferEffect
GreenDisable([in] boolean value) | ILinearTransferEffect
GreenOffset([out, retval] float *value) | ILinearTransferEffect
GreenOffset([in] float value) | ILinearTransferEffect
GreenSlope([out, retval] float *value) | ILinearTransferEffect
GreenSlope([in] float value) | ILinearTransferEffect
RedDisable([out, retval] boolean *value) | ILinearTransferEffect
RedDisable([in] boolean value) | ILinearTransferEffect
RedOffset([out, retval] float *value) | ILinearTransferEffect
RedOffset([in] float value) | ILinearTransferEffect
RedSlope([out, retval] float *value) | ILinearTransferEffect
RedSlope([in] float value) | ILinearTransferEffect
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | ILinearTransferEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | ILinearTransferEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollView/TestUI/ScrollViewDynamicPage.xaml.cs Source File

  • File List
  • File Members
  • ScrollView
  • TestUI

ScrollViewDynamicPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 using System;
00005 using System.Collections.Generic;
00006 using Windows.Foundation;
00007 using Windows.UI;
00008 using Microsoft.UI.Xaml;
00009 using Microsoft.UI.Xaml.Controls;
00010 using Microsoft.UI.Xaml.Controls.Primitives;
00011 using Microsoft.UI.Xaml.Input;
00012 using Microsoft.UI.Xaml.Media;
00013 using Microsoft.UI.Xaml.Media.Imaging;
00014 using Microsoft.UI.Xaml.Navigation;
00015 using Microsoft.UI.Xaml.Shapes;
00016 using Microsoft.UI.Private.Controls;
00017 using Microsoft.UI.Dispatching;
00018
00019 namespace MUXControlsTestApp
00020 {
00021     public sealed partial class ScrollViewDynamicPage : TestPage
00022     {
00023         private Object asyncEventReportingLock = new Object();
00024         private List<string> lstAsyncEventMessage = new List<string>();
00025         private Image largeImg;
00026         private Image wuxLargeImg;
00027         private Rectangle rectangle = null;
00028         private Rectangle wuxRectangle = null;
00029         private Button button = null;
00030         private Button wuxButton = null;
00031         private Border border = null;
00032         private Border wuxBorder = null;
00033         private StackPanel sp1 = null;
00034         private StackPanel wuxSp1 = null;
00035         private StackPanel sp2 = null;
00036         private StackPanel wuxSp2 = null;
00037         private Viewbox viewbox = null;
00038         private Viewbox wuxViewbox = null;
00039         private ScrollView scrollView = null;
00040         private PointerEventHandler contentPointerWheelChangedEventHandler = null;
00041         private PointerEventHandler scrollPresenterPointerWheelChangedEventHandler = null;
00042         private PointerEventHandler scrollViewPointerWheelChangedEventHandler = null;
00043
00044         public ScrollViewDynamicPage()
00045         {
00046             this.InitializeComponent();
00047             this.Loaded += ScrollViewDynamicPage_Loaded;
00048             CreateChildren();
00049         }
00050
00051         ~ScrollViewDynamicPage()
00052         {
00053         }
00054
00055         protected override void OnNavigatedFrom(NavigationEventArgs e)
00056         {
00057             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00058             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
00059
00060             MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
00061
00062             base.OnNavigatedFrom(e);
00063         }
00064
00065         private void ScrollViewDynamicPage_Loaded(object sender, RoutedEventArgs args)
00066         {
00067             UseScrollView(this.markupScrollView);
00068         }
00069
00070         private void ChkScrollViewProperties_Checked(object sender, RoutedEventArgs e)
00071         {
00072             if (grdScrollViewProperties != null)
00073                 grdScrollViewProperties.Visibility = Visibility.Visible;
00074         }
00075
00076         private void ChkScrollViewProperties_Unchecked(object sender, RoutedEventArgs e)
00077         {
00078             if (grdScrollViewProperties != null)
00079                 grdScrollViewProperties.Visibility = Visibility.Collapsed;
00080         }
00081
00082         private void ChkScrollPresenterClonedProperties_Checked(object sender, RoutedEventArgs e)
00083         {
00084             if (grdScrollPresenterClonedProperties != null)
00085                 grdScrollPresenterClonedProperties.Visibility = Visibility.Visible;
00086         }
00087
00088         private void ChkScrollPresenterClonedProperties_Unchecked(object sender, RoutedEventArgs e)
00089         {
00090             if (grdScrollPresenterClonedProperties != null)
00091                 grdScrollPresenterClonedProperties.Visibility = Visibility.Collapsed;
00092         }
00093
00094         private void ChkContentProperties_Checked(object sender, RoutedEventArgs e)
00095         {
00096             if (grdContentProperties != null)
00097                 grdContentProperties.Visibility = Visibility.Visible;
00098         }
00099
00100         private void ChkContentProperties_Unchecked(object sender, RoutedEventArgs e)
00101         {
00102             if (grdContentProperties != null)
00103                 grdContentProperties.Visibility = Visibility.Collapsed;
00104         }
00105
00106         private void ChkLogs_Checked(object sender, RoutedEventArgs e)
00107         {
00108             if (grdLogs != null)
00109                 grdLogs.Visibility = Visibility.Visible;
00110         }
00111
00112         private void ChkLogs_Unchecked(object sender, RoutedEventArgs e)
00113         {
00114             if (grdLogs != null)
00115                 grdLogs.Visibility = Visibility.Collapsed;
00116         }
00117
00118         private void BtnGetContentOrientation_Click(object sender, RoutedEventArgs e)
00119         {
00120             UpdateContentOrientation();
00121         }
00122
00123         private void BtnGetHorizontalScrollMode_Click(object sender, RoutedEventArgs e)
00124         {
00125             UpdateHorizontalScrollMode();
00126         }
00127
00128         private void BtnGetHorizontalScrollChainMode_Click(object sender, RoutedEventArgs e)
00129         {
00130             UpdateHorizontalScrollChainMode();
00131         }
00132
00133         private void BtnGetHorizontalScrollRailMode_Click(object sender, RoutedEventArgs e)
00134         {
00135             UpdateHorizontalScrollRailMode();
00136         }
00137
00138         private void BtnGetVerticalScrollMode_Click(object sender, RoutedEventArgs e)
00139         {
00140             UpdateVerticalScrollMode();
00141         }
00142
00143         private void BtnGetVerticalScrollChainMode_Click(object sender, RoutedEventArgs e)
00144         {
00145             UpdateVerticalScrollChainMode();
00146         }
00147
00148         private void BtnGetVerticalScrollRailMode_Click(object sender, RoutedEventArgs e)
00149         {
00150             UpdateVerticalScrollRailMode();
00151         }
00152
00153         private void BtnGetZoomMode_Click(object sender, RoutedEventArgs e)
00154         {
00155             UpdateZoomMode();
00156         }
00157
00158         private void BtnGetZoomChainMode_Click(object sender, RoutedEventArgs e)
00159         {
00160             UpdateZoomChainMode();
00161         }
00162
00163         private void BtnGetIgnoredInputKinds_Click(object sender, RoutedEventArgs e)
00164         {
00165             UpdateIgnoredInputKinds();
00166         }
00167
00168         private void BtnGetMinZoomFactor_Click(object sender, RoutedEventArgs e)
00169         {
00170             UpdateMinZoomFactor();
00171         }
00172
00173         private void BtnGetMaxZoomFactor_Click(object sender, RoutedEventArgs e)
00174         {
00175             UpdateMaxZoomFactor();
00176         }
00177
00178         private void BtnSetContentOrientation_Click(object sender, RoutedEventArgs e)
00179         {
00180             try
00181             {
00182                 ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
00183                 scrollView.ContentOrientation = co;
00184
00185                 switch (co)
00186                 {
00187                     case ScrollingContentOrientation.Horizontal:
00188                         wuxScrollViewer.HorizontalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.HorizontalScrollBarVisibility);
00189                         wuxScrollViewer.VerticalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
00190                         break;
00191                     case ScrollingContentOrientation.Vertical:
00192                         wuxScrollViewer.HorizontalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
00193                         wuxScrollViewer.VerticalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.VerticalScrollBarVisibility);
00194                         break;
00195                     case ScrollingContentOrientation.Both:
00196                         wuxScrollViewer.HorizontalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.HorizontalScrollBarVisibility);
00197                         wuxScrollViewer.VerticalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.VerticalScrollBarVisibility);
00198                         break;
00199                     case ScrollingContentOrientation.None:
00200                         wuxScrollViewer.HorizontalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
00201                         wuxScrollViewer.VerticalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
00202                         break;
00203                 }
00204             }
00205             catch (Exception ex)
00206             {
00207                 txtExceptionReport.Text = ex.ToString();
00208                 lstLogs.Items.Add(ex.ToString());
00209             }
00210         }
00211
00212         private void BtnSetHorizontalScrollMode_Click(object sender, RoutedEventArgs e)
00213         {
00214             try
00215             {
00216                 ScrollingScrollMode ssm = (ScrollingScrollMode)cmbHorizontalScrollMode.SelectedIndex;
00217                 scrollView.HorizontalScrollMode = ssm;
00218
00219                 wuxScrollViewer.HorizontalScrollMode = MuxScrollModeToWuxScrollMode(ssm);
00220             }
00221             catch (Exception ex)
00222             {
00223                 txtExceptionReport.Text = ex.ToString();
00224                 lstLogs.Items.Add(ex.ToString());
00225             }
00226         }
00227
00228         private void BtnSetHorizontalScrollChainMode_Click(object sender, RoutedEventArgs e)
00229         {
00230             try
00231             {
00232                 ScrollingChainMode scm = (ScrollingChainMode)cmbHorizontalScrollChainMode.SelectedIndex;
00233                 scrollView.HorizontalScrollChainMode = scm;
00234             }
00235             catch (Exception ex)
00236             {
00237                 txtExceptionReport.Text = ex.ToString();
00238                 lstLogs.Items.Add(ex.ToString());
00239             }
00240         }
00241
00242         private void BtnSetHorizontalScrollRailMode_Click(object sender, RoutedEventArgs e)
00243         {
00244             try
00245             {
00246                 ScrollingRailMode srm = (ScrollingRailMode)cmbHorizontalScrollRailMode.SelectedIndex;
00247                 scrollView.HorizontalScrollRailMode = srm;
00248
00249                 wuxScrollViewer.IsHorizontalRailEnabled = MuxRailModeToWuxRailMode(srm);
00250             }
00251             catch (Exception ex)
00252             {
00253                 txtExceptionReport.Text = ex.ToString();
00254                 lstLogs.Items.Add(ex.ToString());
00255             }
00256         }
00257
00258         private void BtnSetVerticalScrollMode_Click(object sender, RoutedEventArgs e)
00259         {
00260             try
00261             {
00262                 ScrollingScrollMode ssm = (ScrollingScrollMode)cmbVerticalScrollMode.SelectedIndex;
00263                 scrollView.VerticalScrollMode = ssm;
00264
00265                 wuxScrollViewer.VerticalScrollMode = MuxScrollModeToWuxScrollMode(ssm);
00266             }
00267             catch (Exception ex)
00268             {
00269                 txtExceptionReport.Text = ex.ToString();
00270                 lstLogs.Items.Add(ex.ToString());
00271             }
00272         }
00273
00274         private void BtnSetVerticalScrollChainMode_Click(object sender, RoutedEventArgs e)
00275         {
00276             try
00277             {
00278                 ScrollingChainMode scm = (ScrollingChainMode)cmbVerticalScrollChainMode.SelectedIndex;
00279                 scrollView.VerticalScrollChainMode = scm;
00280             }
00281             catch (Exception ex)
00282             {
00283                 txtExceptionReport.Text = ex.ToString();
00284                 lstLogs.Items.Add(ex.ToString());
00285             }
00286         }
00287
00288         private void BtnSetVerticalScrollRailMode_Click(object sender, RoutedEventArgs e)
00289         {
00290             try
00291             {
00292                 ScrollingRailMode srm = (ScrollingRailMode)cmbVerticalScrollRailMode.SelectedIndex;
00293                 scrollView.VerticalScrollRailMode = srm;
00294
00295                 wuxScrollViewer.IsVerticalRailEnabled = MuxRailModeToWuxRailMode(srm);
00296             }
00297             catch (Exception ex)
00298             {
00299                 txtExceptionReport.Text = ex.ToString();
00300                 lstLogs.Items.Add(ex.ToString());
00301             }
00302         }
00303
00304         private void BtnSetZoomMode_Click(object sender, RoutedEventArgs e)
00305         {
00306             try
00307             {
00308                 ScrollingZoomMode szm = (ScrollingZoomMode)cmbZoomMode.SelectedIndex;
00309                 scrollView.ZoomMode = szm;
00310
00311                 wuxScrollViewer.ZoomMode = MuxZoomModeToWuxZoomMode(szm);
00312             }
00313             catch (Exception ex)
00314             {
00315                 txtExceptionReport.Text = ex.ToString();
00316                 lstLogs.Items.Add(ex.ToString());
00317             }
00318         }
00319
00320         private void BtnSetZoomChainMode_Click(object sender, RoutedEventArgs e)
00321         {
00322             try
00323             {
00324                 ScrollingChainMode scm = (ScrollingChainMode)cmbZoomChainMode.SelectedIndex;
00325                 scrollView.ZoomChainMode = scm;
00326             }
00327             catch (Exception ex)
00328             {
00329                 txtExceptionReport.Text = ex.ToString();
00330                 lstLogs.Items.Add(ex.ToString());
00331             }
00332         }
00333
00334         private void BtnSetIgnoredInputKinds_Click(object sender, RoutedEventArgs e)
00335         {
00336             try
00337             {
00338                 ScrollingInputKinds ignoredInputKinds;
00339
00340                 switch (cmbIgnoredInputKinds.SelectedIndex)
00341                 {
00342                     case 0:
00343                         ignoredInputKinds = ScrollingInputKinds.None;
00344                         break;
00345                     case 1:
00346                         ignoredInputKinds = ScrollingInputKinds.Touch;
00347                         break;
00348                     case 2:
00349                         ignoredInputKinds = ScrollingInputKinds.Pen;
00350                         break;
00351                     case 3:
00352                         ignoredInputKinds = ScrollingInputKinds.MouseWheel;
00353                         break;
00354                     case 4:
00355                         ignoredInputKinds = ScrollingInputKinds.Keyboard;
00356                         break;
00357                     case 5:
00358                         ignoredInputKinds = ScrollingInputKinds.Gamepad;
00359                         break;
00360                     default:
00361                         ignoredInputKinds = ScrollingInputKinds.All;
00362                         break;
00363                 }
00364
00365                 scrollView.IgnoredInputKinds = ignoredInputKinds;
00366             }
00367             catch (Exception ex)
00368             {
00369                 txtExceptionReport.Text = ex.ToString();
00370                 lstLogs.Items.Add(ex.ToString());
00371             }
00372         }
00373
00374         private void BtnSetMinZoomFactor_Click(object sender, RoutedEventArgs e)
00375         {
00376             try
00377             {
00378                 scrollView.MinZoomFactor = Convert.ToDouble(txtMinZoomFactor.Text);
00379
00380                 wuxScrollViewer.MinZoomFactor = (float)scrollView.MinZoomFactor;
00381             }
00382             catch (Exception ex)
00383             {
00384                 txtExceptionReport.Text = ex.ToString();
00385                 lstLogs.Items.Add(ex.ToString());
00386             }
00387         }
00388
00389         private void BtnSetMaxZoomFactor_Click(object sender, RoutedEventArgs e)
00390         {
00391             try
00392             {
00393                 scrollView.MaxZoomFactor = Convert.ToDouble(txtMaxZoomFactor.Text);
00394
00395                 wuxScrollViewer.MaxZoomFactor = (float)scrollView.MaxZoomFactor;
00396             }
00397             catch (Exception ex)
00398             {
00399                 txtExceptionReport.Text = ex.ToString();
00400                 lstLogs.Items.Add(ex.ToString());
00401             }
00402         }
00403
00404         private void BtnGetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
00405         {
00406             UpdateHorizontalAnchorRatio();
00407         }
00408
00409         private void BtnSetHorizontalAnchorRatio_Click(object sender, RoutedEventArgs e)
00410         {
00411             try
00412             {
00413                 scrollView.HorizontalAnchorRatio = Convert.ToDouble(txtHorizontalAnchorRatio.Text);
00414
00415                 wuxScrollViewer.HorizontalAnchorRatio = scrollView.HorizontalAnchorRatio;
00416             }
00417             catch (Exception ex)
00418             {
00419                 txtExceptionReport.Text = ex.ToString();
00420                 lstLogs.Items.Add(ex.ToString());
00421             }
00422         }
00423
00424         private void BtnGetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
00425         {
00426             UpdateVerticalAnchorRatio();
00427         }
00428
00429         private void BtnSetVerticalAnchorRatio_Click(object sender, RoutedEventArgs e)
00430         {
00431             try
00432             {
00433                 scrollView.VerticalAnchorRatio = Convert.ToDouble(txtVerticalAnchorRatio.Text);
00434
00435                 wuxScrollViewer.VerticalAnchorRatio = scrollView.VerticalAnchorRatio;
00436             }
00437             catch (Exception ex)
00438             {
00439                 txtExceptionReport.Text = ex.ToString();
00440                 lstLogs.Items.Add(ex.ToString());
00441             }
00442         }
00443
00444         private void BtnGetHorizontalOffset_Click(object sender, RoutedEventArgs e)
00445         {
00446             UpdateHorizontalOffset();
00447         }
00448
00449         private void BtnGetVerticalOffset_Click(object sender, RoutedEventArgs e)
00450         {
00451             UpdateVerticalOffset();
00452         }
00453
00454         private void BtnGetZoomFactor_Click(object sender, RoutedEventArgs e)
00455         {
00456             UpdateZoomFactor();
00457         }
00458
00459         private void BtnGetExtentWidth_Click(object sender, RoutedEventArgs e)
00460         {
00461             UpdateExtentWidth();
00462         }
00463
00464         private void BtnGetExtentHeight_Click(object sender, RoutedEventArgs e)
00465         {
00466             UpdateExtentHeight();
00467         }
00468
00469         private void BtnGetComputedHorizontalScrollMode_Click(object sender, RoutedEventArgs e)
00470         {
00471             UpdateTblComputedHorizontalScrollMode();
00472         }
00473
00474         private void BtnGetComputedVerticalScrollMode_Click(object sender, RoutedEventArgs e)
00475         {
00476             UpdateTblComputedVerticalScrollMode();
00477         }
00478
00479         private void UpdateTblComputedHorizontalScrollMode()
00480         {
00481             try
00482             {
00483                 tblComputedHorizontalScrollMode.Text = scrollView.ComputedHorizontalScrollMode.ToString();
00484             }
00485             catch (Exception ex)
00486             {
00487                 txtExceptionReport.Text = ex.ToString();
00488                 lstLogs.Items.Add(ex.ToString());
00489             }
00490         }
00491
00492         private void UpdateTblComputedVerticalScrollMode()
00493         {
00494             try
00495             {
00496                 tblComputedVerticalScrollMode.Text = scrollView.ComputedVerticalScrollMode.ToString();
00497             }
00498             catch (Exception ex)
00499             {
00500                 txtExceptionReport.Text = ex.ToString();
00501                 lstLogs.Items.Add(ex.ToString());
00502             }
00503         }
00504
00505         private void UpdateCmbHorizontalScrollBarVisibility()
00506         {
00507             try
00508             {
00509                 cmbHorizontalScrollBarVisibility.SelectedIndex = (int)scrollView.HorizontalScrollBarVisibility;
00510             }
00511             catch (Exception ex)
00512             {
00513                 txtExceptionReport.Text = ex.ToString();
00514                 lstLogs.Items.Add(ex.ToString());
00515             }
00516         }
00517
00518         private void UpdateCmbVerticalScrollBarVisibility()
00519         {
00520             try
00521             {
00522                 cmbVerticalScrollBarVisibility.SelectedIndex = (int)scrollView.VerticalScrollBarVisibility;
00523             }
00524             catch (Exception ex)
00525             {
00526                 txtExceptionReport.Text = ex.ToString();
00527                 lstLogs.Items.Add(ex.ToString());
00528             }
00529         }
00530
00531         private void UpdateCmbXYFocusKeyboardNavigation()
00532         {
00533             try
00534             {
00535                 cmbXYFocusKeyboardNavigation.SelectedIndex = (int)scrollView.XYFocusKeyboardNavigation;
00536             }
00537             catch (Exception ex)
00538             {
00539                 txtExceptionReport.Text = ex.ToString();
00540                 lstLogs.Items.Add(ex.ToString());
00541             }
00542         }
00543
00544         private void UpdateHorizontalAnchorRatio()
00545         {
00546             txtHorizontalAnchorRatio.Text = scrollView.HorizontalAnchorRatio.ToString();
00547         }
00548
00549         private void UpdateVerticalAnchorRatio()
00550         {
00551             txtVerticalAnchorRatio.Text = scrollView.VerticalAnchorRatio.ToString();
00552         }
00553
00554         private void UpdateHorizontalOffset()
00555         {
00556             txtHorizontalOffset.Text = scrollView.HorizontalOffset.ToString();
00557         }
00558
00559         private void UpdateVerticalOffset()
00560         {
00561             txtVerticalOffset.Text = scrollView.VerticalOffset.ToString();
00562         }
00563
00564         private void UpdateZoomFactor()
00565         {
00566             txtZoomFactor.Text = scrollView.ZoomFactor.ToString();
00567         }
00568
00569         private void UpdateExtentWidth()
00570         {
00571             txtExtentWidth.Text = scrollView.ExtentWidth.ToString();
00572
00573             if (Math.Abs(scrollView.ExtentWidth - wuxScrollViewer.ExtentWidth / wuxScrollViewer.ZoomFactor) > 0.0001)
00574             {
00575                 lstLogs.Items.Add($"muxScrollView.ExtentWidth={scrollView.ExtentWidth} != wuxScrollViewer.ExtentWidth/wuxScrollViewer.ZoomFactor={wuxScrollViewer.ExtentWidth / wuxScrollViewer.ZoomFactor}");
00576             }
00577         }
00578
00579         private void UpdateExtentHeight()
00580         {
00581             txtExtentHeight.Text = scrollView.ExtentHeight.ToString();
00582
00583             if (Math.Abs(scrollView.ExtentHeight - wuxScrollViewer.ExtentHeight / wuxScrollViewer.ZoomFactor) > 0.0001)
00584             {
00585                 lstLogs.Items.Add($"muxScrollView.ExtentHeight={scrollView.ExtentHeight} != wuxScrollViewer.ExtentHeight/wuxScrollViewer.ZoomFactor={wuxScrollViewer.ExtentHeight / wuxScrollViewer.ZoomFactor}");
00586             }
00587         }
00588
00589         private void BtnGetWidth_Click(object sender, RoutedEventArgs e)
00590         {
00591             UpdateWidth();
00592         }
00593
00594         private void BtnSetWidth_Click(object sender, RoutedEventArgs e)
00595         {
00596             try
00597             {
00598                 scrollView.Width = Convert.ToDouble(txtWidth.Text);
00599
00600                 wuxScrollViewer.Width = scrollView.Width;
00601             }
00602             catch (Exception ex)
00603             {
00604                 txtExceptionReport.Text = ex.ToString();
00605                 lstLogs.Items.Add(ex.ToString());
00606             }
00607         }
00608
00609         private void BtnGetHeight_Click(object sender, RoutedEventArgs e)
00610         {
00611             UpdateHeight();
00612         }
00613
00614         private void BtnSetHeight_Click(object sender, RoutedEventArgs e)
00615         {
00616             try
00617             {
00618                 scrollView.Height = Convert.ToDouble(txtHeight.Text);
00619
00620                 wuxScrollViewer.Height = scrollView.Height;
00621             }
00622             catch (Exception ex)
00623             {
00624                 txtExceptionReport.Text = ex.ToString();
00625                 lstLogs.Items.Add(ex.ToString());
00626             }
00627         }
00628
00629         private void CmbBackground_SelectionChanged(object sender, SelectionChangedEventArgs e)
00630         {
00631             switch (cmbBackground.SelectedIndex)
00632             {
00633                 case 0:
00634                     scrollView.Background = null;
00635                     break;
00636                 case 1:
00637                     scrollView.Background = new SolidColorBrush(Microsoft.UI.Colors.Transparent);
00638                     break;
00639                 case 2:
00640                     scrollView.Background = new SolidColorBrush(Microsoft.UI.Colors.AliceBlue);
00641                     break;
00642                 case 3:
00643                     scrollView.Background = new SolidColorBrush(Microsoft.UI.Colors.Aqua);
00644                     break;
00645             }
00646
00647             wuxScrollViewer.Background = scrollView.Background;
00648         }
00649
00650         private void CmbContent_SelectionChanged(object sender, SelectionChangedEventArgs e)
00651         {
00652             try
00653             {
00654                 FrameworkElement currentContent = scrollView.Content as FrameworkElement;
00655
00656                 if (currentContent != null && contentPointerWheelChangedEventHandler != null)
00657                 {
00658                     currentContent.RemoveHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler);
00659                 }
00660
00661                 FrameworkElement newContent = null;
00662                 FrameworkElement wuxNewContent = null;
00663
00664                 switch (cmbContent.SelectedIndex)
00665                 {
00666                     case 1:
00667                         newContent = smallImg;
00668                         wuxNewContent = wuxSmallImg;
00669                         break;
00670                     case 2:
00671                         newContent = largeImg;
00672                         wuxNewContent = wuxLargeImg;
00673                         break;
00674                     case 3:
00675                         newContent = rectangle;
00676                         wuxNewContent = wuxRectangle;
00677                         break;
00678                     case 4:
00679                         newContent = button;
00680                         wuxNewContent = wuxButton;
00681                         break;
00682                     case 5:
00683                         newContent = border;
00684                         wuxNewContent = wuxBorder;
00685                         break;
00686                     case 6:
00687                         newContent = sp1;
00688                         wuxNewContent = wuxSp1;
00689                         break;
00690                     case 7:
00691                         newContent = sp2;
00692                         wuxNewContent = wuxSp2;
00693                         break;
00694                     case 8:
00695                         newContent = viewbox;
00696                         wuxNewContent = wuxViewbox;
00697                         break;
00698                     case 9:
00699                         newContent = spH1;
00700                         wuxNewContent = wuxSpH1;
00701                         break;
00702                 }
00703
00704                 if (chkPreserveProperties.IsChecked == true && currentContent != null && newContent != null && wuxNewContent != null)
00705                 {
00706                     newContent.MinWidth = currentContent.MinWidth;
00707                     newContent.Width = currentContent.Width;
00708                     newContent.MaxWidth = currentContent.MaxWidth;
00709                     newContent.MinHeight = currentContent.MinHeight;
00710                     newContent.Height = currentContent.Height;
00711                     newContent.MaxHeight = currentContent.MaxHeight;
00712                     newContent.Margin = currentContent.Margin;
00713                     newContent.HorizontalAlignment = currentContent.HorizontalAlignment;
00714                     newContent.VerticalAlignment = currentContent.VerticalAlignment;
00715
00716                     if (currentContent is Control && newContent is Control)
00717                     {
00718                         ((Control)newContent).Padding = ((Control)currentContent).Padding;
00719                     }
00720
00721                     wuxNewContent.MinWidth = currentContent.MinWidth;
00722                     wuxNewContent.Width = currentContent.Width;
00723                     wuxNewContent.MaxWidth = currentContent.MaxWidth;
00724                     wuxNewContent.MinHeight = currentContent.MinHeight;
00725                     wuxNewContent.Height = currentContent.Height;
00726                     wuxNewContent.MaxHeight = currentContent.MaxHeight;
00727                     wuxNewContent.Margin = currentContent.Margin;
00728                     wuxNewContent.HorizontalAlignment = currentContent.HorizontalAlignment;
00729                     wuxNewContent.VerticalAlignment = currentContent.VerticalAlignment;
00730
00731                     if (currentContent is Control && wuxNewContent is Control)
00732                     {
00733                         ((Control)wuxNewContent).Padding = ((Control)currentContent).Padding;
00734                     }
00735                 }
00736
00737                 scrollView.Content = newContent;
00738
00739                 if (newContent != null && chkLogScrollPresenterEvents.IsChecked == true)
00740                 {
00741                     if (contentPointerWheelChangedEventHandler == null)
00742                     {
00743                         contentPointerWheelChangedEventHandler = new PointerEventHandler(Content_PointerWheelChanged);
00744                     }
00745
00746                     newContent.AddHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler, true);
00747                 }
00748
00749                 wuxScrollViewer.Content = wuxNewContent;
00750             }
00751             catch (Exception ex)
00752             {
00753                 txtExceptionReport.Text = ex.ToString();
00754                 lstLogs.Items.Add(ex.ToString());
00755
00756                 UpdateContent();
00757             }
00758         }
00759
00760         private void BtnGetCurrentAnchor_Click(object sender, RoutedEventArgs e)
00761         {
00762             try
00763             {
00764                 if (scrollView.CurrentAnchor == null)
00765                 {
00766                     txtCurrentAnchor.Text = "null";
00767                 }
00768                 else
00769                 {
00770                     FrameworkElement currentAnchorAsFE = scrollView.CurrentAnchor as FrameworkElement;
00771
00772                     txtCurrentAnchor.Text = currentAnchorAsFE == null ? "UIElement" : currentAnchorAsFE.Name;
00773                 }
00774             }
00775             catch (Exception ex)
00776             {
00777                 txtExceptionReport.Text = ex.ToString();
00778                 lstLogs.Items.Add(ex.ToString());
00779             }
00780         }
00781
00782         private void CmbHorizontalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e)
00783         {
00784             try
00785             {
00786                 scrollView.HorizontalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbHorizontalScrollBarVisibility.SelectedIndex;
00787
00788                 ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
00789                 switch (co)
00790                 {
00791                     case ScrollingContentOrientation.Vertical:
00792                     case ScrollingContentOrientation.None:
00793                         wuxScrollViewer.HorizontalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
00794                         break;
00795                     default:
00796                         wuxScrollViewer.HorizontalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.HorizontalScrollBarVisibility);
00797                         break;
00798                 }
00799             }
00800             catch (Exception ex)
00801             {
00802                 txtExceptionReport.Text = ex.ToString();
00803                 lstLogs.Items.Add(ex.ToString());
00804             }
00805         }
00806
00807         private void CmbVerticalScrollBarVisibility_SelectionChanged(object sender, SelectionChangedEventArgs e)
00808         {
00809             try
00810             {
00811                 scrollView.VerticalScrollBarVisibility = (ScrollingScrollBarVisibility)cmbVerticalScrollBarVisibility.SelectedIndex;
00812
00813                 ScrollingContentOrientation co = (ScrollingContentOrientation)cmbContentOrientation.SelectedIndex;
00814                 switch (co)
00815                 {
00816                     case ScrollingContentOrientation.Horizontal:
00817                     case ScrollingContentOrientation.None:
00818                         wuxScrollViewer.VerticalScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Disabled;
00819                         break;
00820                     default:
00821                         wuxScrollViewer.VerticalScrollBarVisibility = MuxScrollBarVisibilityToWuxScrollBarVisibility(scrollView.VerticalScrollBarVisibility);
00822                         break;
00823                 }
00824             }
00825             catch (Exception ex)
00826             {
00827                 txtExceptionReport.Text = ex.ToString();
00828                 lstLogs.Items.Add(ex.ToString());
00829             }
00830         }
00831
00832         private void CmbXYFocusKeyboardNavigation_SelectionChanged(object sender, SelectionChangedEventArgs e)
00833         {
00834             try
00835             {
00836                 scrollView.XYFocusKeyboardNavigation = (XYFocusKeyboardNavigationMode)cmbXYFocusKeyboardNavigation.SelectedIndex;
00837
00838                 wuxScrollViewer.XYFocusKeyboardNavigation = scrollView.XYFocusKeyboardNavigation;
00839             }
00840             catch (Exception ex)
00841             {
00842                 txtExceptionReport.Text = ex.ToString();
00843                 lstLogs.Items.Add(ex.ToString());
00844             }
00845         }
00846
00847         private void BtnGetMargin_Click(object sender, RoutedEventArgs e)
00848         {
00849             UpdateMargin();
00850         }
00851
00852         private void BtnSetMargin_Click(object sender, RoutedEventArgs e)
00853         {
00854             try
00855             {
00856                 scrollView.Margin = GetThicknessFromString(txtMargin.Text);
00857
00858                 wuxScrollViewer.Margin = scrollView.Margin;
00859             }
00860             catch (Exception ex)
00861             {
00862                 txtExceptionReport.Text = ex.ToString();
00863                 lstLogs.Items.Add(ex.ToString());
00864             }
00865         }
00866
00867         private void BtnGetPadding_Click(object sender, RoutedEventArgs e)
00868         {
00869             UpdatePadding();
00870         }
00871
00872         private void BtnSetPadding_Click(object sender, RoutedEventArgs e)
00873         {
00874             try
00875             {
00876                 scrollView.Padding = GetThicknessFromString(txtPadding.Text);
00877
00878                 wuxScrollViewer.Padding = scrollView.Padding;
00879             }
00880             catch (Exception ex)
00881             {
00882                 txtExceptionReport.Text = ex.ToString();
00883                 lstLogs.Items.Add(ex.ToString());
00884             }
00885         }
00886
00887         private void ChkIsEnabled_Checked(object sender, RoutedEventArgs e)
00888         {
00889             scrollView.IsEnabled = true;
00890
00891             wuxScrollViewer.IsEnabled = true;
00892         }
00893
00894         private void ChkIsEnabled_Unchecked(object sender, RoutedEventArgs e)
00895         {
00896             scrollView.IsEnabled = false;
00897
00898             wuxScrollViewer.IsEnabled = false;
00899         }
00900
00901         private void ChkIsTabStop_Checked(object sender, RoutedEventArgs e)
00902         {
00903             scrollView.IsTabStop = true;
00904
00905             wuxScrollViewer.IsTabStop = true;
00906         }
00907
00908         private void ChkIsTabStop_Unchecked(object sender, RoutedEventArgs e)
00909         {
00910             scrollView.IsTabStop = false;
00911
00912             wuxScrollViewer.IsTabStop = false;
00913         }
00914
00915         private void BtnGetContentMinWidth_Click(object sender, RoutedEventArgs e)
00916         {
00917             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
00918                 txtContentMinWidth.Text = string.Empty;
00919             else
00920                 txtContentMinWidth.Text = ((FrameworkElement)scrollView.Content).MinWidth.ToString();
00921         }
00922
00923         private void BtnGetContentWidth_Click(object sender, RoutedEventArgs e)
00924         {
00925             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
00926                 txtContentWidth.Text = string.Empty;
00927             else
00928                 txtContentWidth.Text = ((FrameworkElement)scrollView.Content).Width.ToString();
00929         }
00930
00931         private void BtnGetContentMaxWidth_Click(object sender, RoutedEventArgs e)
00932         {
00933             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
00934                 txtContentMaxWidth.Text = string.Empty;
00935             else
00936                 txtContentMaxWidth.Text = ((FrameworkElement)scrollView.Content).MaxWidth.ToString();
00937         }
00938
00939         private void BtnSetContentMinWidth_Click(object sender, RoutedEventArgs e)
00940         {
00941             try
00942             {
00943                 double minWidth = Convert.ToDouble(txtContentMinWidth.Text);
00944
00945                 if (scrollView.Content is FrameworkElement)
00946                 {
00947                     ((FrameworkElement)scrollView.Content).MinWidth = minWidth;
00948                 }
00949
00950                 if (wuxScrollViewer.Content is FrameworkElement)
00951                 {
00952                     ((FrameworkElement)wuxScrollViewer.Content).MinWidth = minWidth;
00953                 }
00954             }
00955             catch (Exception ex)
00956             {
00957                 txtExceptionReport.Text = ex.ToString();
00958                 lstLogs.Items.Add(ex.ToString());
00959             }
00960         }
00961
00962         private void BtnSetContentWidth_Click(object sender, RoutedEventArgs e)
00963         {
00964             try
00965             {
00966                 double width = Convert.ToDouble(txtContentWidth.Text);
00967
00968                 if (scrollView.Content is FrameworkElement)
00969                 {
00970                     ((FrameworkElement)scrollView.Content).Width = width;
00971                 }
00972
00973                 if (wuxScrollViewer.Content is FrameworkElement)
00974                 {
00975                     ((FrameworkElement)wuxScrollViewer.Content).Width = width;
00976                 }
00977             }
00978             catch (Exception ex)
00979             {
00980                 txtExceptionReport.Text = ex.ToString();
00981                 lstLogs.Items.Add(ex.ToString());
00982             }
00983         }
00984
00985         private void BtnSetContentMaxWidth_Click(object sender, RoutedEventArgs e)
00986         {
00987             try
00988             {
00989                 double maxWidth = Convert.ToDouble(txtContentMaxWidth.Text);
00990
00991                 if (scrollView.Content is FrameworkElement)
00992                 {
00993                     ((FrameworkElement)scrollView.Content).MaxWidth = maxWidth;
00994                 }
00995
00996                 if (wuxScrollViewer.Content is FrameworkElement)
00997                 {
00998                     ((FrameworkElement)wuxScrollViewer.Content).MaxWidth = maxWidth;
00999                 }
01000             }
01001             catch (Exception ex)
01002             {
01003                 txtExceptionReport.Text = ex.ToString();
01004                 lstLogs.Items.Add(ex.ToString());
01005             }
01006         }
01007
01008         private void BtnGetContentMinHeight_Click(object sender, RoutedEventArgs e)
01009         {
01010             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
01011                 txtContentMinHeight.Text = string.Empty;
01012             else
01013                 txtContentMinHeight.Text = ((FrameworkElement)scrollView.Content).MinHeight.ToString();
01014         }
01015
01016         private void BtnGetContentHeight_Click(object sender, RoutedEventArgs e)
01017         {
01018             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
01019                 txtContentHeight.Text = string.Empty;
01020             else
01021                 txtContentHeight.Text = ((FrameworkElement)scrollView.Content).Height.ToString();
01022         }
01023
01024         private void BtnGetContentMaxHeight_Click(object sender, RoutedEventArgs e)
01025         {
01026             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
01027                 txtContentMaxHeight.Text = string.Empty;
01028             else
01029                 txtContentMaxHeight.Text = ((FrameworkElement)scrollView.Content).MaxHeight.ToString();
01030         }
01031
01032         private void BtnSetContentMinHeight_Click(object sender, RoutedEventArgs e)
01033         {
01034             try
01035             {
01036                 double minHeight = Convert.ToDouble(txtContentMinHeight.Text);
01037
01038                 if (scrollView.Content is FrameworkElement)
01039                 {
01040                     ((FrameworkElement)scrollView.Content).MinHeight = minHeight;
01041                 }
01042
01043                 if (wuxScrollViewer.Content is FrameworkElement)
01044                 {
01045                     ((FrameworkElement)wuxScrollViewer.Content).MinHeight = minHeight;
01046                 }
01047             }
01048             catch (Exception ex)
01049             {
01050                 txtExceptionReport.Text = ex.ToString();
01051                 lstLogs.Items.Add(ex.ToString());
01052             }
01053         }
01054
01055         private void BtnSetContentHeight_Click(object sender, RoutedEventArgs e)
01056         {
01057             try
01058             {
01059                 double height = Convert.ToDouble(txtContentHeight.Text);
01060
01061                 if (scrollView.Content is FrameworkElement)
01062                 {
01063                     ((FrameworkElement)scrollView.Content).Height = height;
01064                 }
01065
01066                 if (wuxScrollViewer.Content is FrameworkElement)
01067                 {
01068                     ((FrameworkElement)wuxScrollViewer.Content).Height = height;
01069                 }
01070             }
01071             catch (Exception ex)
01072             {
01073                 txtExceptionReport.Text = ex.ToString();
01074                 lstLogs.Items.Add(ex.ToString());
01075             }
01076         }
01077
01078         private void BtnSetContentMaxHeight_Click(object sender, RoutedEventArgs e)
01079         {
01080             try
01081             {
01082                 double maxHeight = Convert.ToDouble(txtContentMaxHeight.Text);
01083
01084                 if (scrollView.Content is FrameworkElement)
01085                 {
01086                     ((FrameworkElement)scrollView.Content).MaxHeight = maxHeight;
01087                 }
01088
01089                 if (wuxScrollViewer.Content is FrameworkElement)
01090                 {
01091                     ((FrameworkElement)wuxScrollViewer.Content).MaxHeight = maxHeight;
01092                 }
01093             }
01094             catch (Exception ex)
01095             {
01096                 txtExceptionReport.Text = ex.ToString();
01097                 lstLogs.Items.Add(ex.ToString());
01098             }
01099         }
01100
01101         private void BtnGetContentMargin_Click(object sender, RoutedEventArgs e)
01102         {
01103             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
01104                 txtContentMargin.Text = string.Empty;
01105             else
01106                 txtContentMargin.Text = ((FrameworkElement)scrollView.Content).Margin.ToString();
01107         }
01108
01109         private void BtnSetContentMargin_Click(object sender, RoutedEventArgs e)
01110         {
01111             try
01112             {
01113                 Thickness margin = GetThicknessFromString(txtContentMargin.Text);
01114
01115                 if (scrollView.Content is FrameworkElement)
01116                 {
01117                     ((FrameworkElement)scrollView.Content).Margin = margin;
01118                 }
01119
01120                 if (wuxScrollViewer.Content is FrameworkElement)
01121                 {
01122                     ((FrameworkElement)wuxScrollViewer.Content).Margin = margin;
01123                 }
01124             }
01125             catch (Exception ex)
01126             {
01127                 txtExceptionReport.Text = ex.ToString();
01128                 lstLogs.Items.Add(ex.ToString());
01129             }
01130         }
01131
01132         private void BtnGetContentPadding_Click(object sender, RoutedEventArgs e)
01133         {
01134             if (scrollView.Content == null || !(scrollView.Content is Control || scrollView.Content is Border || scrollView.Content is StackPanel))
01135                 txtContentPadding.Text = string.Empty;
01136             else if (scrollView.Content is Control)
01137                 txtContentPadding.Text = ((Control)scrollView.Content).Padding.ToString();
01138             else if (scrollView.Content is Border)
01139                 txtContentPadding.Text = ((Border)scrollView.Content).Padding.ToString();
01140             else
01141                 txtContentPadding.Text = ((StackPanel)scrollView.Content).Padding.ToString();
01142         }
01143
01144         private void BtnSetContentPadding_Click(object sender, RoutedEventArgs e)
01145         {
01146             try
01147             {
01148                 Thickness padding = GetThicknessFromString(txtContentPadding.Text);
01149
01150                 if (scrollView.Content is Control)
01151                 {
01152                     ((Control)scrollView.Content).Padding = padding;
01153                 }
01154                 else if (scrollView.Content is Border)
01155                 {
01156                     ((Border)scrollView.Content).Padding = padding;
01157                 }
01158                 else if (scrollView.Content is StackPanel)
01159                 {
01160                     ((StackPanel)scrollView.Content).Padding = padding;
01161                 }
01162
01163                 if (wuxScrollViewer.Content is Control)
01164                 {
01165                     ((Control)wuxScrollViewer.Content).Padding = padding;
01166                 }
01167                 else if (wuxScrollViewer.Content is Border)
01168                 {
01169                     ((Border)wuxScrollViewer.Content).Padding = padding;
01170                 }
01171                 else if (wuxScrollViewer.Content is StackPanel)
01172                 {
01173                     ((StackPanel)wuxScrollViewer.Content).Padding = padding;
01174                 }
01175             }
01176             catch (Exception ex)
01177             {
01178                 txtExceptionReport.Text = ex.ToString();
01179                 lstLogs.Items.Add(ex.ToString());
01180             }
01181         }
01182
01183         private void BtnGetContentActualWidth_Click(object sender, RoutedEventArgs e)
01184         {
01185             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
01186                 txtContentActualWidth.Text = string.Empty;
01187             else
01188             {
01189                 txtContentActualWidth.Text = (scrollView.Content as FrameworkElement).ActualWidth.ToString();
01190
01191                 if ((scrollView.Content as FrameworkElement).ActualWidth != (wuxScrollViewer.Content as FrameworkElement).ActualWidth)
01192                 {
01193                     lstLogs.Items.Add($"muxScrollView.Content.ActualWidth={(scrollView.Content as FrameworkElement).ActualWidth} != wuxScrollViewer.Content.ActualWidth={(wuxScrollViewer.Content as FrameworkElement).ActualWidth}");
01194                 }
01195             }
01196         }
01197
01198         private void BtnGetContentActualHeight_Click(object sender, RoutedEventArgs e)
01199         {
01200             if (scrollView.Content == null || !(scrollView.Content is FrameworkElement))
01201                 txtContentActualHeight.Text = string.Empty;
01202             else
01203             {
01204                 txtContentActualHeight.Text = (scrollView.Content as FrameworkElement).ActualHeight.ToString();
01205
01206                 if ((scrollView.Content as FrameworkElement).ActualHeight != (wuxScrollViewer.Content as FrameworkElement).ActualHeight)
01207                 {
01208                     lstLogs.Items.Add($"muxScrollView.Content.ActualHeight={(scrollView.Content as FrameworkElement).ActualHeight} != wuxScrollViewer.Content.ActualHeight={(wuxScrollViewer.Content as FrameworkElement).ActualHeight}");
01209                 }
01210             }
01211         }
01212
01213         private void BtnGetContentDesiredSize_Click(object sender, RoutedEventArgs e)
01214         {
01215             if (scrollView.Content == null)
01216                 txtContentDesiredSize.Text = string.Empty;
01217             else
01218             {
01219                 txtContentDesiredSize.Text = scrollView.Content.DesiredSize.ToString();
01220
01221                 if (scrollView.Content.DesiredSize != (wuxScrollViewer.Content as UIElement).DesiredSize)
01222                 {
01223                     lstLogs.Items.Add($"muxScrollView.Content.DesiredSize={scrollView.Content.DesiredSize} != wuxScrollViewer.Content.DesiredSize={(wuxScrollViewer.Content as UIElement).DesiredSize}");
01224                 }
01225             }
01226         }
01227
01228         private void BtnGetContentRenderSize_Click(object sender, RoutedEventArgs e)
01229         {
01230             if (scrollView.Content == null)
01231                 txtContentRenderSize.Text = string.Empty;
01232             else
01233             {
01234                 txtContentRenderSize.Text = scrollView.Content.RenderSize.ToString();
01235
01236                 if (scrollView.Content.RenderSize != (wuxScrollViewer.Content as UIElement).RenderSize)
01237                 {
01238                     lstLogs.Items.Add($"muxScrollView.Content.RenderSize={scrollView.Content.RenderSize} != wuxScrollViewer.Content.RenderSize={(wuxScrollViewer.Content as UIElement).RenderSize}");
01239                 }
01240             }
01241         }
01242
01243         private void CmbContentHorizontalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
01244         {
01245             try
01246             {
01247                 if (scrollView.Content is FrameworkElement)
01248                 {
01249                     ((FrameworkElement)scrollView.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
01250                 }
01251
01252                 if (wuxScrollViewer.Content is FrameworkElement)
01253                 {
01254                     wuxScrollViewer.HorizontalContentAlignment =
01255                     ((FrameworkElement)wuxScrollViewer.Content).HorizontalAlignment = (HorizontalAlignment)cmbContentHorizontalAlignment.SelectedIndex;
01256                 }
01257             }
01258             catch (Exception ex)
01259             {
01260                 txtExceptionReport.Text = ex.ToString();
01261                 lstLogs.Items.Add(ex.ToString());
01262             }
01263         }
01264
01265         private void CmbContentVerticalAlignment_SelectionChanged(object sender, SelectionChangedEventArgs e)
01266         {
01267             try
01268             {
01269                 if (scrollView.Content is FrameworkElement)
01270                 {
01271                     ((FrameworkElement)scrollView.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
01272                 }
01273
01274                 if (wuxScrollViewer.Content is FrameworkElement)
01275                 {
01276                     wuxScrollViewer.VerticalContentAlignment =
01277                     ((FrameworkElement)wuxScrollViewer.Content).VerticalAlignment = (VerticalAlignment)cmbContentVerticalAlignment.SelectedIndex;
01278                 }
01279             }
01280             catch (Exception ex)
01281             {
01282                 txtExceptionReport.Text = ex.ToString();
01283                 lstLogs.Items.Add(ex.ToString());
01284             }
01285         }
01286
01287         private void CmbContentManipulationMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
01288         {
01289             try
01290             {
01291                 if (scrollView.Content is FrameworkElement)
01292                 {
01293                     switch (cmbContentManipulationMode.SelectedIndex)
01294                     {
01295                         case 0:
01296                             scrollView.Content.ManipulationMode = ManipulationModes.System;
01297                             break;
01298                         case 1:
01299                             scrollView.Content.ManipulationMode = ManipulationModes.None;
01300                             break;
01301                     }
01302                 }
01303
01304                 if (wuxScrollViewer.Content is FrameworkElement)
01305                 {
01306                     switch (cmbContentManipulationMode.SelectedIndex)
01307                     {
01308                         case 0:
01309                             (wuxScrollViewer.Content as FrameworkElement).ManipulationMode = ManipulationModes.System;
01310                             break;
01311                         case 1:
01312                             (wuxScrollViewer.Content as FrameworkElement).ManipulationMode = ManipulationModes.None;
01313                             break;
01314                     }
01315                 }
01316             }
01317             catch (Exception ex)
01318             {
01319                 txtExceptionReport.Text = ex.ToString();
01320                 lstLogs.Items.Add(ex.ToString());
01321             }
01322         }
01323
01324         private void CmbSnapPointKind_SelectionChanged(object sender, SelectionChangedEventArgs e)
01325         {
01326             if (cmbSnapPointAlignment != null)
01327             {
01328                 cmbSnapPointAlignment.IsEnabled = cmbSnapPointKind.SelectedIndex != 2;
01329             }
01330         }
01331
01332         private void BtnAddIrregularSnapPoint_Click(object sender, RoutedEventArgs e)
01333         {
01334             try
01335             {
01336                 if (scrollView != null)
01337                 {
01338                     ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
01339
01340                     if (scrollPresenter != null)
01341                     {
01342                         if (cmbSnapPointKind.SelectedIndex == 0)
01343                         {
01344                             ScrollSnapPoint snapPoint = new ScrollSnapPoint(
01345                                 Convert.ToSingle(txtIrregularSnapPointValue.Text),
01346                                 (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
01347                             if (cmbSnapPointKind.SelectedIndex == 0)
01348                             {
01349                                 scrollPresenter.VerticalSnapPoints.Add(snapPoint);
01350                             }
01351                             else
01352                             {
01353                                 scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
01354                             }
01355                         }
01356                         else if (cmbSnapPointKind.SelectedIndex == 2)
01357                         {
01358                             ZoomSnapPoint snapPoint = new ZoomSnapPoint(
01359                                 Convert.ToSingle(txtIrregularSnapPointValue.Text));
01360                             scrollPresenter.ZoomSnapPoints.Add(snapPoint);
01361                         }
01362                     }
01363                 }
01364             }
01365             catch (Exception ex)
01366             {
01367                 txtExceptionReport.Text = ex.ToString();
01368                 lstLogs.Items.Add(ex.ToString());
01369             }
01370         }
01371
01372         private void BtnAddRepeatedSnapPoint_Click(object sender, RoutedEventArgs e)
01373         {
01374             try
01375             {
01376                 if (scrollView != null)
01377                 {
01378                     ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
01379
01380                     if (scrollPresenter != null)
01381                     {
01382                         if (cmbSnapPointKind.SelectedIndex == 0 || cmbSnapPointKind.SelectedIndex == 1)
01383                         {
01384                             RepeatedScrollSnapPoint snapPoint = new RepeatedScrollSnapPoint(
01385                                 Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
01386                                 Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
01387                                 Convert.ToDouble(txtRepeatedSnapPointStart.Text),
01388                                 Convert.ToDouble(txtRepeatedSnapPointEnd.Text),
01389                                 (ScrollSnapPointsAlignment)cmbSnapPointAlignment.SelectedIndex);
01390                             if (cmbSnapPointKind.SelectedIndex == 0)
01391                             {
01392                                 scrollPresenter.VerticalSnapPoints.Add(snapPoint);
01393                             }
01394                             else
01395                             {
01396                                 scrollPresenter.HorizontalSnapPoints.Add(snapPoint);
01397                             }
01398                         }
01399                         else if (cmbSnapPointKind.SelectedIndex == 2)
01400                         {
01401                             RepeatedZoomSnapPoint snapPoint = new RepeatedZoomSnapPoint(
01402                                 Convert.ToDouble(txtRepeatedSnapPointOffset.Text),
01403                                 Convert.ToDouble(txtRepeatedSnapPointInterval.Text),
01404                                 Convert.ToDouble(txtRepeatedSnapPointStart.Text),
01405                                 Convert.ToDouble(txtRepeatedSnapPointEnd.Text));
01406                             scrollPresenter.ZoomSnapPoints.Add(snapPoint);
01407                         }
01408                     }
01409                 }
01410             }
01411             catch (Exception ex)
01412             {
01413                 txtExceptionReport.Text = ex.ToString();
01414                 lstLogs.Items.Add(ex.ToString());
01415             }
01416         }
01417
01418         private void BtnClearSnapPoints_Click(object sender, RoutedEventArgs e)
01419         {
01420             try
01421             {
01422                 if (scrollView != null)
01423                 {
01424                     ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
01425
01426                     if (scrollPresenter != null)
01427                     {
01428                         if (cmbSnapPointKind.SelectedIndex == 0)
01429                         {
01430                             scrollPresenter.VerticalSnapPoints.Clear();
01431                         }
01432                         else if (cmbSnapPointKind.SelectedIndex == 1)
01433                         {
01434                             scrollPresenter.HorizontalSnapPoints.Clear();
01435                         }
01436                         else if (cmbSnapPointKind.SelectedIndex == 2)
01437                         {
01438                             scrollPresenter.ZoomSnapPoints.Clear();
01439                         }
01440                     }
01441                 }
01442             }
01443             catch (Exception ex)
01444             {
01445                 txtExceptionReport.Text = ex.ToString();
01446                 lstLogs.Items.Add(ex.ToString());
01447             }
01448         }
01449
01450         private void UpdateCmbContentHorizontalAlignment()
01451         {
01452             try
01453             {
01454                 if (scrollView.Content is FrameworkElement)
01455                 {
01456                     cmbContentHorizontalAlignment.SelectedIndex = (int)((FrameworkElement)scrollView.Content).HorizontalAlignment;
01457                 }
01458             }
01459             catch (Exception ex)
01460             {
01461                 txtExceptionReport.Text = ex.ToString();
01462                 lstLogs.Items.Add(ex.ToString());
01463             }
01464         }
01465
01466         private void UpdateCmbContentVerticalAlignment()
01467         {
01468             try
01469             {
01470                 if (scrollView.Content is FrameworkElement)
01471                 {
01472                     cmbContentVerticalAlignment.SelectedIndex = (int)((FrameworkElement)scrollView.Content).VerticalAlignment;
01473                 }
01474             }
01475             catch (Exception ex)
01476             {
01477                 txtExceptionReport.Text = ex.ToString();
01478                 lstLogs.Items.Add(ex.ToString());
01479             }
01480         }
01481
01482         private void UpdateCmbContentManipulationMode()
01483         {
01484             try
01485             {
01486                 if (scrollView.Content != null)
01487                 {
01488                     switch (scrollView.Content.ManipulationMode)
01489                     {
01490                         case ManipulationModes.System:
01491                             cmbContentManipulationMode.SelectedIndex = 0;
01492                             break;
01493                         case ManipulationModes.None:
01494                             cmbContentManipulationMode.SelectedIndex = 1;
01495                             break;
01496                     }
01497                 }
01498             }
01499             catch (Exception ex)
01500             {
01501                 txtExceptionReport.Text = ex.ToString();
01502                 lstLogs.Items.Add(ex.ToString());
01503             }
01504         }
01505
01506         private void UpdateContentOrientation()
01507         {
01508             try
01509             {
01510                 cmbContentOrientation.SelectedIndex = (int)scrollView.ContentOrientation;
01511             }
01512             catch (Exception ex)
01513             {
01514                 txtExceptionReport.Text = ex.ToString();
01515                 lstLogs.Items.Add(ex.ToString());
01516             }
01517         }
01518
01519         private void UpdateHorizontalScrollMode()
01520         {
01521             try
01522             {
01523                 cmbHorizontalScrollMode.SelectedIndex = (int)scrollView.HorizontalScrollMode;
01524             }
01525             catch (Exception ex)
01526             {
01527                 txtExceptionReport.Text = ex.ToString();
01528                 lstLogs.Items.Add(ex.ToString());
01529             }
01530         }
01531
01532         private void UpdateHorizontalScrollChainMode()
01533         {
01534             try
01535             {
01536                 cmbHorizontalScrollChainMode.SelectedIndex = (int)scrollView.HorizontalScrollChainMode;
01537             }
01538             catch (Exception ex)
01539             {
01540                 txtExceptionReport.Text = ex.ToString();
01541                 lstLogs.Items.Add(ex.ToString());
01542             }
01543         }
01544
01545         private void UpdateHorizontalScrollRailMode()
01546         {
01547             try
01548             {
01549                 cmbHorizontalScrollRailMode.SelectedIndex = (int)scrollView.HorizontalScrollRailMode;
01550             }
01551             catch (Exception ex)
01552             {
01553                 txtExceptionReport.Text = ex.ToString();
01554                 lstLogs.Items.Add(ex.ToString());
01555             }
01556         }
01557
01558         private void UpdateVerticalScrollMode()
01559         {
01560             try
01561             {
01562                 cmbVerticalScrollMode.SelectedIndex = (int)scrollView.VerticalScrollMode;
01563             }
01564             catch (Exception ex)
01565             {
01566                 txtExceptionReport.Text = ex.ToString();
01567                 lstLogs.Items.Add(ex.ToString());
01568             }
01569         }
01570
01571         private void UpdateVerticalScrollChainMode()
01572         {
01573             try
01574             {
01575                 cmbVerticalScrollChainMode.SelectedIndex = (int)scrollView.VerticalScrollChainMode;
01576             }
01577             catch (Exception ex)
01578             {
01579                 txtExceptionReport.Text = ex.ToString();
01580                 lstLogs.Items.Add(ex.ToString());
01581             }
01582         }
01583
01584         private void UpdateVerticalScrollRailMode()
01585         {
01586             try
01587             {
01588                 cmbVerticalScrollRailMode.SelectedIndex = (int)scrollView.VerticalScrollRailMode;
01589             }
01590             catch (Exception ex)
01591             {
01592                 txtExceptionReport.Text = ex.ToString();
01593                 lstLogs.Items.Add(ex.ToString());
01594             }
01595         }
01596
01597         private void UpdateZoomMode()
01598         {
01599             try
01600             {
01601                 cmbZoomMode.SelectedIndex = (int)scrollView.ZoomMode;
01602             }
01603             catch (Exception ex)
01604             {
01605                 txtExceptionReport.Text = ex.ToString();
01606                 lstLogs.Items.Add(ex.ToString());
01607             }
01608         }
01609
01610         private void UpdateMinZoomFactor()
01611         {
01612             try
01613             {
01614                 txtMinZoomFactor.Text = scrollView.MinZoomFactor.ToString();
01615             }
01616             catch (Exception ex)
01617             {
01618                 txtExceptionReport.Text = ex.ToString();
01619                 lstLogs.Items.Add(ex.ToString());
01620             }
01621         }
01622
01623         private void UpdateMaxZoomFactor()
01624         {
01625             try
01626             {
01627                 txtMaxZoomFactor.Text = scrollView.MaxZoomFactor.ToString();
01628             }
01629             catch (Exception ex)
01630             {
01631                 txtExceptionReport.Text = ex.ToString();
01632                 lstLogs.Items.Add(ex.ToString());
01633             }
01634         }
01635
01636         private void UpdateZoomChainMode()
01637         {
01638             try
01639             {
01640                 cmbZoomChainMode.SelectedIndex = (int)scrollView.ZoomChainMode;
01641             }
01642             catch (Exception ex)
01643             {
01644                 txtExceptionReport.Text = ex.ToString();
01645                 lstLogs.Items.Add(ex.ToString());
01646             }
01647         }
01648
01649         private void UpdateIgnoredInputKinds()
01650         {
01651             try
01652             {
01653                 switch (scrollView.IgnoredInputKinds)
01654                 {
01655                     case ScrollingInputKinds.None:
01656                         cmbIgnoredInputKinds.SelectedIndex = 0;
01657                         break;
01658                     case ScrollingInputKinds.Touch:
01659                         cmbIgnoredInputKinds.SelectedIndex = 1;
01660                         break;
01661                     case ScrollingInputKinds.Pen:
01662                         cmbIgnoredInputKinds.SelectedIndex = 2;
01663                         break;
01664                     case ScrollingInputKinds.MouseWheel:
01665                         cmbIgnoredInputKinds.SelectedIndex = 3;
01666                         break;
01667                     case ScrollingInputKinds.Keyboard:
01668                         cmbIgnoredInputKinds.SelectedIndex = 4;
01669                         break;
01670                     case ScrollingInputKinds.Gamepad:
01671                         cmbIgnoredInputKinds.SelectedIndex = 5;
01672                         break;
01673                     case ScrollingInputKinds.All:
01674                         cmbIgnoredInputKinds.SelectedIndex = 6;
01675                         break;
01676                     default:
01677                         lstLogs.Items.Add("Unexpected IgnoredInputKinds value.");
01678                         break;
01679                 }
01680             }
01681             catch (Exception ex)
01682             {
01683                 txtExceptionReport.Text = ex.ToString();
01684                 lstLogs.Items.Add(ex.ToString());
01685             }
01686         }
01687
01688         private void UpdateWidth()
01689         {
01690             txtWidth.Text = scrollView.Width.ToString();
01691         }
01692
01693         private void UpdateHeight()
01694         {
01695             txtHeight.Text = scrollView.Height.ToString();
01696         }
01697
01698         private void UpdateBackground()
01699         {
01700             if (scrollView.Background == null)
01701             {
01702                 cmbBackground.SelectedIndex = 0;
01703             }
01704             else if ((scrollView.Background as SolidColorBrush).Color == Microsoft.UI.Colors.Transparent)
01705             {
01706                 cmbBackground.SelectedIndex = 1;
01707             }
01708             else if ((scrollView.Background as SolidColorBrush).Color == Microsoft.UI.Colors.AliceBlue)
01709             {
01710                 cmbBackground.SelectedIndex = 2;
01711             }
01712             else if ((scrollView.Background as SolidColorBrush).Color == Microsoft.UI.Colors.Aqua)
01713             {
01714                 cmbBackground.SelectedIndex = 3;
01715             }
01716         }
01717
01718         private void UpdateContent()
01719         {
01720             if (scrollView.Content == null)
01721             {
01722                 cmbContent.SelectedIndex = 0;
01723             }
01724             else if (scrollView.Content is Image)
01725             {
01726                 if (((scrollView.Content as Image).Source as BitmapImage).UriSource.AbsolutePath.ToLower().Contains("large"))
01727                 {
01728                     cmbContent.SelectedIndex = 2;
01729                 }
01730                 else
01731                 {
01732                     cmbContent.SelectedIndex = 1;
01733                 }
01734             }
01735             else if (scrollView.Content is Rectangle)
01736             {
01737                 cmbContent.SelectedIndex = 3;
01738             }
01739             else if (scrollView.Content is Button)
01740             {
01741                 cmbContent.SelectedIndex = 4;
01742             }
01743             else if (scrollView.Content is Border)
01744             {
01745                 cmbContent.SelectedIndex = 5;
01746             }
01747             else if (scrollView.Content is StackPanel)
01748             {
01749                 if ((scrollView.Content as StackPanel).Children.Count == 2)
01750                 {
01751                     cmbContent.SelectedIndex = 6;
01752                 }
01753                 else
01754                 {
01755                     cmbContent.SelectedIndex = 7;
01756                 }
01757             }
01758             else if (scrollView.Content is Viewbox)
01759             {
01760                 cmbContent.SelectedIndex = 8;
01761             }
01762         }
01763
01764         private void UpdateMargin()
01765         {
01766             txtMargin.Text = scrollView.Margin.ToString();
01767         }
01768
01769         private void UpdatePadding()
01770         {
01771             txtPadding.Text = scrollView.Padding.ToString();
01772         }
01773
01774         private void CreateChildren()
01775         {
01776             largeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
01777             LinearGradientBrush lgb = new LinearGradientBrush() { StartPoint = new Point(0, 0), EndPoint = new Point(1, 1) };
01778             GradientStop gs = new GradientStop() { Color = Microsoft.UI.Colors.Blue, Offset = 0.0 };
01779             lgb.GradientStops.Add(gs);
01780             gs = new GradientStop() { Color = Microsoft.UI.Colors.White, Offset = 0.5 };
01781             lgb.GradientStops.Add(gs);
01782             gs = new GradientStop() { Color = Microsoft.UI.Colors.Red, Offset = 1.0 };
01783             lgb.GradientStops.Add(gs);
01784             rectangle = new Rectangle() { Fill = lgb };
01785             rectangle.Name = "rect";
01786             button = new Button() { Content = "Button" };
01787             button.Name = "btn";
01788             Rectangle borderChild = new Rectangle() { Fill = lgb };
01789             border = new Border() { BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse), BorderThickness = new Thickness(5), Child = borderChild };
01790             border.Name = "bdr";
01791
01792             sp1 = new StackPanel();
01793             sp1.Name = "sp1";
01794             Button button1 = new Button() { Content = "Button1" };
01795             button1.Name = "btn1";
01796             button1.Margin = new Thickness(50);
01797             Button button2 = new Button() { Content = "Button2" };
01798             button2.Name = "btn2";
01799             button2.Margin = new Thickness(50);
01800             sp1.Children.Add(button1);
01801             sp1.Children.Add(button2);
01802
01803             sp2 = new StackPanel();
01804             sp2.Name = "sp2";
01805             sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Indigo) });
01806             sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Orange) });
01807             sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple) });
01808             sp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Goldenrod) });
01809
01810             viewbox = new Viewbox();
01811             viewbox.Name = "viewbox";
01812             Rectangle viewboxChild = new Rectangle() { Fill = lgb, Width = 600, Height = 400 };
01813             viewbox.Child = viewboxChild;
01814
01815             wuxLargeImg = new Image() { Source = new BitmapImage(new Uri("ms-appx:/Assets/LargeWisteria.jpg")) };
01816             wuxRectangle = new Rectangle() { Fill = lgb };
01817             wuxRectangle.Name = "wuxRect";
01818             wuxButton = new Button() { Content = "Button" };
01819             wuxButton.Name = "wuxBtn";
01820             borderChild = new Rectangle() { Fill = lgb };
01821             wuxBorder = new Border() { BorderBrush = new SolidColorBrush(Microsoft.UI.Colors.Chartreuse), BorderThickness = new Thickness(5), Child = borderChild };
01822             wuxBorder.Name = "wuxBdr";
01823
01824             wuxSp1 = new StackPanel();
01825             wuxSp1.Name = "wuxSp1";
01826             button1 = new Button() { Content = "Button1" };
01827             button1.Name = "wuxBtn1";
01828             button1.Margin = new Thickness(50);
01829             button2 = new Button() { Content = "Button2" };
01830             button2.Name = "wuxBtn2";
01831             button2.Margin = new Thickness(50);
01832             wuxSp1.Children.Add(button1);
01833             wuxSp1.Children.Add(button2);
01834
01835             wuxSp2 = new StackPanel();
01836             wuxSp2.Name = "wuxSp2";
01837             wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Indigo) });
01838             wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Orange) });
01839             wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Purple) });
01840             wuxSp2.Children.Add(new Rectangle() { Height = 200, Fill = new SolidColorBrush(Microsoft.UI.Colors.Goldenrod) });
01841
01842             wuxViewbox = new Viewbox();
01843             wuxViewbox.Name = "wuxViewbox";
01844             viewboxChild = new Rectangle() { Fill = lgb, Width = 600, Height = 400 };
01845             wuxViewbox.Child = viewboxChild;
01846
01847             rootGrid.Children.RemoveAt(rootGrid.Children.Count - 1);
01848             rootGrid.Children.RemoveAt(rootGrid.Children.Count - 1);
01849
01850             spH1.Visibility = Visibility.Visible;
01851             wuxSpH1.Visibility = Visibility.Visible;
01852         }
01853
01854         private Thickness GetThicknessFromString(string thickness)
01855         {
01856             string[] lengths = thickness.Split(',');
01857             if (lengths.Length < 4)
01858                 return new Thickness(Convert.ToDouble(lengths[0]));
01859             else
01860                 return new Thickness(
01861                     Convert.ToDouble(lengths[0]), Convert.ToDouble(lengths[1]), Convert.ToDouble(lengths[2]), Convert.ToDouble(lengths[3]));
01862         }
01863
01864         private void UseScrollView(ScrollView sv2)
01865         {
01866             if (scrollView == sv2 || sv2 == null)
01867                 return;
01868
01869             try
01870             {
01871                 if (scrollView == null && (chkLogScrollViewMessages.IsChecked == true || chkLogScrollPresenterMessages.IsChecked == true))
01872                 {
01873                     MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
01874
01875                     if (chkLogScrollPresenterMessages.IsChecked == true)
01876                     {
01877                         MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01878                     }
01879                     if (chkLogScrollViewMessages.IsChecked == true)
01880                     {
01881                         MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
01882                     }
01883                 }
01884
01885                 if (scrollView != null)
01886                 {
01887                     scrollView.GettingFocus -= ScrollView_GettingFocus;
01888                     scrollView.GotFocus -= ScrollView_GotFocus;
01889                     scrollView.LosingFocus -= ScrollView_LosingFocus;
01890                     scrollView.LostFocus -= ScrollView_LostFocus;
01891
01892                     if (chkLogScrollViewEvents.IsChecked == true)
01893                     {
01894                         scrollView.ExtentChanged -= ScrollView_ExtentChanged;
01895                         scrollView.StateChanged -= ScrollView_StateChanged;
01896                         scrollView.ViewChanged -= ScrollView_ViewChanged;
01897                         scrollView.ScrollStarting -= ScrollView_ScrollStarting;
01898                         scrollView.ZoomStarting -= ScrollView_ZoomStarting;
01899                         scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
01900                         scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
01901                         if (scrollViewPointerWheelChangedEventHandler != null)
01902                         {
01903                             scrollView.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler);
01904                         }
01905                     }
01906
01907                     ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
01908
01909                     if (scrollPresenter != null && chkLogScrollPresenterEvents.IsChecked == true)
01910                     {
01911                         scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
01912                         scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
01913                         scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
01914                         scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
01915                         scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
01916                         scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
01917                         scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
01918                         if (scrollPresenterPointerWheelChangedEventHandler != null)
01919                         {
01920                             scrollPresenter.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler);
01921                         }
01922                     }
01923                 }
01924
01925                 scrollView = sv2;
01926
01927                 UpdateContentOrientation();
01928                 UpdateHorizontalScrollMode();
01929                 UpdateHorizontalScrollChainMode();
01930                 UpdateHorizontalScrollRailMode();
01931                 UpdateVerticalScrollMode();
01932                 UpdateVerticalScrollChainMode();
01933                 UpdateVerticalScrollRailMode();
01934                 UpdateZoomMode();
01935                 UpdateZoomChainMode();
01936                 UpdateIgnoredInputKinds();
01937                 UpdateMinZoomFactor();
01938                 UpdateMaxZoomFactor();
01939
01940                 UpdateWidth();
01941                 UpdateHeight();
01942                 UpdateBackground();
01943                 UpdateContent();
01944                 UpdateMargin();
01945                 UpdatePadding();
01946
01947                 UpdateCmbHorizontalScrollBarVisibility();
01948                 UpdateCmbVerticalScrollBarVisibility();
01949                 UpdateCmbXYFocusKeyboardNavigation();
01950                 UpdateHorizontalAnchorRatio();
01951                 UpdateVerticalAnchorRatio();
01952                 UpdateHorizontalOffset();
01953                 UpdateVerticalOffset();
01954                 UpdateZoomFactor();
01955                 UpdateExtentWidth();
01956                 UpdateExtentHeight();
01957                 UpdateTblComputedHorizontalScrollMode();
01958                 UpdateTblComputedVerticalScrollMode();
01959                 UpdateCmbContentHorizontalAlignment();
01960                 UpdateCmbContentVerticalAlignment();
01961                 UpdateCmbContentManipulationMode();
01962
01963                 chkIsEnabled.IsChecked = scrollView.IsEnabled;
01964                 chkIsTabStop.IsChecked = scrollView.IsTabStop;
01965
01966                 if (scrollView != null)
01967                 {
01968                     scrollView.GettingFocus += ScrollView_GettingFocus;
01969                     scrollView.GotFocus += ScrollView_GotFocus;
01970                     scrollView.LosingFocus += ScrollView_LosingFocus;
01971                     scrollView.LostFocus += ScrollView_LostFocus;
01972
01973                     if (chkLogScrollViewEvents.IsChecked == true)
01974                     {
01975                         scrollView.ExtentChanged += ScrollView_ExtentChanged;
01976                         scrollView.StateChanged += ScrollView_StateChanged;
01977                         scrollView.ViewChanged += ScrollView_ViewChanged;
01978                         scrollView.ScrollStarting += ScrollView_ScrollStarting;
01979                         scrollView.ZoomStarting += ScrollView_ZoomStarting;
01980                         scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
01981                         scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
01982                         if (scrollViewPointerWheelChangedEventHandler == null)
01983                         {
01984                             scrollViewPointerWheelChangedEventHandler = new PointerEventHandler(ScrollView_PointerWheelChanged);
01985                         }
01986                         scrollView.AddHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler, true);
01987                     }
01988
01989                     ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
01990
01991                     if (scrollPresenter != null && chkLogScrollPresenterEvents.IsChecked == true)
01992                     {
01993                         scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
01994                         scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
01995                         scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
01996                         scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
01997                         scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
01998                         scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
01999                         scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
02000                         if (scrollPresenterPointerWheelChangedEventHandler == null)
02001                         {
02002                             scrollPresenterPointerWheelChangedEventHandler = new PointerEventHandler(ScrollPresenter_PointerWheelChanged);
02003                         }
02004                         scrollPresenter.AddHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler, true);
02005                     }
02006                 }
02007             }
02008             catch (Exception ex)
02009             {
02010                 txtExceptionReport.Text = ex.ToString();
02011                 lstLogs.Items.Add(ex.ToString());
02012             }
02013         }
02014
02015         private Microsoft.UI.Xaml.Controls.ScrollBarVisibility MuxScrollBarVisibilityToWuxScrollBarVisibility(ScrollingScrollBarVisibility muxScrollBarVisibility)
02016         {
02017             switch (muxScrollBarVisibility)
02018             {
02019                 case ScrollingScrollBarVisibility.Auto:
02020                     return Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Auto;
02021                 case ScrollingScrollBarVisibility.Hidden:
02022                     return Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Hidden;
02023                 default:
02024                     return Microsoft.UI.Xaml.Controls.ScrollBarVisibility.Visible;
02025             }
02026         }
02027
02028         private Microsoft.UI.Xaml.Controls.ScrollMode MuxScrollModeToWuxScrollMode(ScrollingScrollMode muxScrollMode)
02029         {
02030             switch (muxScrollMode)
02031             {
02032                 case ScrollingScrollMode.Disabled:
02033                     return Microsoft.UI.Xaml.Controls.ScrollMode.Disabled;
02034                 default:
02035                     return Microsoft.UI.Xaml.Controls.ScrollMode.Enabled;
02036             }
02037         }
02038
02039         private Microsoft.UI.Xaml.Controls.ZoomMode MuxZoomModeToWuxZoomMode(ScrollingZoomMode muxZoomMode)
02040         {
02041             switch (muxZoomMode)
02042             {
02043                 case ScrollingZoomMode.Disabled:
02044                     return Microsoft.UI.Xaml.Controls.ZoomMode.Disabled;
02045                 default:
02046                     return Microsoft.UI.Xaml.Controls.ZoomMode.Enabled;
02047             }
02048         }
02049
02050         private bool MuxRailModeToWuxRailMode(ScrollingRailMode muxRailingMode)
02051         {
02052             switch (muxRailingMode)
02053             {
02054                 case ScrollingRailMode.Disabled:
02055                     return false;
02056                 default:
02057                     return true;
02058             }
02059         }
02060
02061         private void Content_PointerWheelChanged(object sender, PointerRoutedEventArgs args)
02062         {
02063             AppendAsyncEventMessage($"Content.PointerWheelChanged args.Handled={args.Handled}");
02064         }
02065
02066         private void ScrollView_GettingFocus(UIElement sender, Microsoft.UI.Xaml.Input.GettingFocusEventArgs args)
02067         {
02068             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
02069             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
02070             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
02071             string newFEName = (newFE == null) ? "null" : newFE.Name;
02072
02073             AppendAsyncEventMessage("ScrollView.GettingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
02074         }
02075
02076         private void ScrollView_LostFocus(object sender, RoutedEventArgs e)
02077         {
02078             AppendAsyncEventMessage("ScrollView.LostFocus");
02079         }
02080
02081         private void ScrollView_LosingFocus(UIElement sender, Microsoft.UI.Xaml.Input.LosingFocusEventArgs args)
02082         {
02083             FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement;
02084             string oldFEName = (oldFE == null) ? "null" : oldFE.Name;
02085             FrameworkElement newFE = args.NewFocusedElement as FrameworkElement;
02086             string newFEName = (newFE == null) ? "null" : newFE.Name;
02087
02088             AppendAsyncEventMessage("ScrollView.LosingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName);
02089         }
02090
02091         private void ScrollView_GotFocus(object sender, RoutedEventArgs e)
02092         {
02093             AppendAsyncEventMessage("ScrollView.GotFocus");
02094         }
02095
02096         private void ScrollPresenter_ExtentChanged(ScrollPresenter sender, object args)
02097         {
02098             AppendAsyncEventMessage("ScrollPresenter.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
02099         }
02100
02101         private void ScrollPresenter_StateChanged(ScrollPresenter sender, object args)
02102         {
02103             AppendAsyncEventMessage("ScrollPresenter.StateChanged " + sender.State.ToString());
02104         }
02105
02106         private void ScrollPresenter_ViewChanged(ScrollPresenter sender, object args)
02107         {
02108             AppendAsyncEventMessage("ScrollPresenter.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
02109         }
02110
02111         private void ScrollPresenter_ScrollStarting(ScrollPresenter sender, ScrollingScrollStartingEventArgs args)
02112         {
02113             AppendAsyncEventMessage($"ScrollPresenter.ScrollStarting OffsetsChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
02114         }
02115
02116         private void ScrollPresenter_ZoomStarting(ScrollPresenter sender, ScrollingZoomStartingEventArgs args)
02117         {
02118             AppendAsyncEventMessage($"ScrollPresenter.ZoomStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
02119         }
02120
02121         private void ScrollPresenter_ScrollAnimationStarting(ScrollPresenter sender, ScrollingScrollAnimationStartingEventArgs args)
02122         {
02123             AppendAsyncEventMessage("ScrollPresenter.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId + " SP=(" + args.StartPosition.X + "," + args.StartPosition.Y + ") EP=(" + args.EndPosition.X + "," + args.EndPosition.Y + ")");
02124         }
02125
02126         private void ScrollPresenter_ZoomAnimationStarting(ScrollPresenter sender, ScrollingZoomAnimationStartingEventArgs args)
02127         {
02128             AppendAsyncEventMessage("ScrollPresenter.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint + ", SZF=" + args.StartZoomFactor + ", EZF=" + args.EndZoomFactor);
02129         }
02130
02131         private void ScrollPresenter_PointerWheelChanged(object sender, PointerRoutedEventArgs args)
02132         {
02133             AppendAsyncEventMessage($"ScrollPresenter.PointerWheelChanged args.Handled={args.Handled}");
02134         }
02135
02136         private void ScrollView_ExtentChanged(ScrollView sender, object args)
02137         {
02138             AppendAsyncEventMessage("ScrollView.ExtentChanged ExtentWidth=" + sender.ExtentWidth + ", ExtentHeight=" + sender.ExtentHeight);
02139         }
02140
02141         private void ScrollView_StateChanged(ScrollView sender, object args)
02142         {
02143             AppendAsyncEventMessage("ScrollView.StateChanged " + sender.State.ToString());
02144         }
02145
02146         private void ScrollView_ViewChanged(ScrollView sender, object args)
02147         {
02148             AppendAsyncEventMessage("ScrollView.ViewChanged H=" + sender.HorizontalOffset.ToString() + ", V=" + sender.VerticalOffset + ", ZF=" + sender.ZoomFactor);
02149         }
02150
02151         private void ScrollView_ScrollStarting(ScrollView sender, ScrollingScrollStartingEventArgs args)
02152         {
02153             AppendAsyncEventMessage($"ScrollView.ScrollStarting OffsetsChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
02154         }
02155
02156         private void ScrollView_ZoomStarting(ScrollView sender, ScrollingZoomStartingEventArgs args)
02157         {
02158             AppendAsyncEventMessage($"ScrollView.ZoomStarting ZoomFactorChangeCorrelationId={args.CorrelationId}, H={args.HorizontalOffset}, V={args.VerticalOffset}, ZF={args.ZoomFactor}");
02159         }
02160
02161         private void ScrollView_ScrollAnimationStarting(ScrollView sender, ScrollingScrollAnimationStartingEventArgs args)
02162         {
02163             AppendAsyncEventMessage("ScrollView.ScrollAnimationStarting OffsetsChangeCorrelationId=" + args.CorrelationId);
02164         }
02165
02166         private void ScrollView_ZoomAnimationStarting(ScrollView sender, ScrollingZoomAnimationStartingEventArgs args)
02167         {
02168             AppendAsyncEventMessage("ScrollView.ZoomAnimationStarting ZoomFactorChangeCorrelationId=" + args.CorrelationId + ", CenterPoint=" + args.CenterPoint);
02169         }
02170
02171         private void ScrollView_PointerWheelChanged(object sender, PointerRoutedEventArgs args)
02172         {
02173             AppendAsyncEventMessage($"ScrollView.PointerWheelChanged args.Handled={args.Handled}");
02174         }
02175
02176         private void BtnClearLogs_Click(object sender, RoutedEventArgs e)
02177         {
02178             lstLogs.Items.Clear();
02179         }
02180
02181         private void ChkLogContentEvents_Checked(object sender, RoutedEventArgs e)
02182         {
02183             if (scrollView != null)
02184             {
02185                 ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
02186
02187                 if (scrollPresenter != null)
02188                 {
02189                     UIElement content = scrollPresenter.Content;
02190
02191                     if (content != null)
02192                     {
02193                         if (contentPointerWheelChangedEventHandler == null)
02194                         {
02195                             contentPointerWheelChangedEventHandler = new PointerEventHandler(Content_PointerWheelChanged);
02196                         }
02197
02198                         content.AddHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler, true);
02199                     }
02200                 }
02201             }
02202         }
02203
02204         private void ChkLogContentEvents_Unchecked(object sender, RoutedEventArgs e)
02205         {
02206             if (scrollView != null && contentPointerWheelChangedEventHandler != null)
02207             {
02208                 ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
02209
02210                 if (scrollPresenter != null)
02211                 {
02212                     UIElement content = scrollPresenter.Content;
02213
02214                     if (content != null)
02215                     {
02216                         content.RemoveHandler(UIElement.PointerWheelChangedEvent, contentPointerWheelChangedEventHandler);
02217                     }
02218                 }
02219             }
02220         }
02221
02222         private void ChkLogScrollPresenterEvents_Checked(object sender, RoutedEventArgs e)
02223         {
02224             if (scrollView != null)
02225             {
02226                 ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
02227
02228                 if (scrollPresenter != null)
02229                 {
02230                     scrollPresenter.ExtentChanged += ScrollPresenter_ExtentChanged;
02231                     scrollPresenter.StateChanged += ScrollPresenter_StateChanged;
02232                     scrollPresenter.ViewChanged += ScrollPresenter_ViewChanged;
02233                     scrollPresenter.ScrollStarting += ScrollPresenter_ScrollStarting;
02234                     scrollPresenter.ZoomStarting += ScrollPresenter_ZoomStarting;
02235                     scrollPresenter.ScrollAnimationStarting += ScrollPresenter_ScrollAnimationStarting;
02236                     scrollPresenter.ZoomAnimationStarting += ScrollPresenter_ZoomAnimationStarting;
02237                     if (scrollPresenterPointerWheelChangedEventHandler == null)
02238                     {
02239                         scrollPresenterPointerWheelChangedEventHandler = new PointerEventHandler(ScrollPresenter_PointerWheelChanged);
02240                     }
02241                     scrollPresenter.AddHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler, true);
02242                 }
02243             }
02244         }
02245
02246         private void ChkLogScrollPresenterEvents_Unchecked(object sender, RoutedEventArgs e)
02247         {
02248             if (scrollView != null)
02249             {
02250                 ScrollPresenter scrollPresenter = scrollView.ScrollPresenter;
02251
02252                 if (scrollPresenter != null)
02253                 {
02254                     scrollPresenter.ExtentChanged -= ScrollPresenter_ExtentChanged;
02255                     scrollPresenter.StateChanged -= ScrollPresenter_StateChanged;
02256                     scrollPresenter.ViewChanged -= ScrollPresenter_ViewChanged;
02257                     scrollPresenter.ScrollStarting -= ScrollPresenter_ScrollStarting;
02258                     scrollPresenter.ZoomStarting -= ScrollPresenter_ZoomStarting;
02259                     scrollPresenter.ScrollAnimationStarting -= ScrollPresenter_ScrollAnimationStarting;
02260                     scrollPresenter.ZoomAnimationStarting -= ScrollPresenter_ZoomAnimationStarting;
02261                     if (scrollPresenterPointerWheelChangedEventHandler != null)
02262                     {
02263                         scrollPresenter.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollPresenterPointerWheelChangedEventHandler);
02264                     }
02265                 }
02266             }
02267         }
02268
02269         private void ChkLogScrollViewEvents_Checked(object sender, RoutedEventArgs e)
02270         {
02271             if (scrollView != null)
02272             {
02273                 scrollView.ExtentChanged += ScrollView_ExtentChanged;
02274                 scrollView.StateChanged += ScrollView_StateChanged;
02275                 scrollView.ViewChanged += ScrollView_ViewChanged;
02276                 scrollView.ScrollStarting += ScrollView_ScrollStarting;
02277                 scrollView.ZoomStarting += ScrollView_ZoomStarting;
02278                 scrollView.ScrollAnimationStarting += ScrollView_ScrollAnimationStarting;
02279                 scrollView.ZoomAnimationStarting += ScrollView_ZoomAnimationStarting;
02280                 if (scrollViewPointerWheelChangedEventHandler == null)
02281                 {
02282                     scrollViewPointerWheelChangedEventHandler = new PointerEventHandler(ScrollView_PointerWheelChanged);
02283                 }
02284                 scrollView.AddHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler, true);
02285             }
02286         }
02287
02288         private void ChkLogScrollViewEvents_Unchecked(object sender, RoutedEventArgs e)
02289         {
02290             if (scrollView != null)
02291             {
02292                 scrollView.ExtentChanged -= ScrollView_ExtentChanged;
02293                 scrollView.StateChanged -= ScrollView_StateChanged;
02294                 scrollView.ViewChanged -= ScrollView_ViewChanged;
02295                 scrollView.ScrollStarting -= ScrollView_ScrollStarting;
02296                 scrollView.ZoomStarting -= ScrollView_ZoomStarting;
02297                 scrollView.ScrollAnimationStarting -= ScrollView_ScrollAnimationStarting;
02298                 scrollView.ZoomAnimationStarting -= ScrollView_ZoomAnimationStarting;
02299                 if (scrollViewPointerWheelChangedEventHandler != null)
02300                 {
02301                     scrollView.RemoveHandler(UIElement.PointerWheelChangedEvent, scrollViewPointerWheelChangedEventHandler);
02302                 }
02303             }
02304         }
02305
02306         private void ChkLogScrollPresenterMessages_Checked(object sender, RoutedEventArgs e)
02307         {
02308             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
02309             if (chkLogScrollViewMessages.IsChecked == false)
02310                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
02311         }
02312
02313         private void ChkLogScrollPresenterMessages_Unchecked(object sender, RoutedEventArgs e)
02314         {
02315             MUXControlsTestHooks.SetLoggingLevelForType("ScrollPresenter", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
02316             if (chkLogScrollViewMessages.IsChecked == false)
02317                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
02318         }
02319
02320         private void ChkLogScrollViewMessages_Checked(object sender, RoutedEventArgs e)
02321         {
02322             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: true, isLoggingVerboseLevel: true);
02323             if (chkLogScrollPresenterMessages.IsChecked == false)
02324                 MUXControlsTestHooks.LoggingMessage += MUXControlsTestHooks_LoggingMessage;
02325         }
02326
02327         private void ChkLogScrollViewMessages_Unchecked(object sender, RoutedEventArgs e)
02328         {
02329             MUXControlsTestHooks.SetLoggingLevelForType("ScrollView", isLoggingInfoLevel: false, isLoggingVerboseLevel: false);
02330             if (chkLogScrollPresenterMessages.IsChecked == false)
02331                 MUXControlsTestHooks.LoggingMessage -= MUXControlsTestHooks_LoggingMessage;
02332         }
02333
02334         private void ChkAutoHideScrollControllers_Indeterminate(object sender, RoutedEventArgs e)
02335         {
02336             ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, null);
02337         }
02338
02339         private void ChkAutoHideScrollControllers_Checked(object sender, RoutedEventArgs e)
02340         {
02341             ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, true);
02342         }
02343
02344         private void ChkAutoHideScrollControllers_Unchecked(object sender, RoutedEventArgs e)
02345         {
02346             ScrollViewTestHooks.SetAutoHideScrollControllers(scrollView, false);
02347         }
02348
02349         private void MUXControlsTestHooks_LoggingMessage(object sender, MUXControlsTestHooksLoggingMessageEventArgs args)
02350         {
02351             // Cut off the terminating new line.
02352             string msg = args.Message.Substring(0, args.Message.Length - 1);
02353             string asyncEventMessage = string.Empty;
02354             string senderName = string.Empty;
02355
02356             try
02357             {
02358                 FrameworkElement fe = sender as FrameworkElement;
02359
02360                 if (fe != null)
02361                 {
02362                     senderName = "s:" + fe.Name + ", ";
02363                 }
02364             }
02365             catch
02366             {
02367             }
02368
02369             if (args.IsVerboseLevel)
02370             {
02371                 asyncEventMessage = "Verbose: " + senderName + "m:" + msg;
02372             }
02373             else
02374             {
02375                 asyncEventMessage = "Info: " + senderName + "m:" + msg;
02376             }
02377
02378             AppendAsyncEventMessage(asyncEventMessage);
02379         }
02380
02381         private void AppendAsyncEventMessage(string asyncEventMessage)
02382         {
02383             lock (asyncEventReportingLock)
02384             {
02385                 while (asyncEventMessage.Length > 0)
02386                 {
02387                     string msgHead = asyncEventMessage;
02388
02389                     if (asyncEventMessage.Length > 110)
02390                     {
02391                         int commaIndex = asyncEventMessage.IndexOf(',', 110);
02392                         if (commaIndex != -1)
02393                         {
02394                             msgHead = asyncEventMessage.Substring(0, commaIndex);
02395                             asyncEventMessage = asyncEventMessage.Substring(commaIndex + 1);
02396                         }
02397                         else
02398                         {
02399                             asyncEventMessage = string.Empty;
02400                         }
02401                     }
02402                     else
02403                     {
02404                         asyncEventMessage = string.Empty;
02405                     }
02406
02407                     lstAsyncEventMessage.Add(msgHead);
02408                 }
02409
02410                 var ignored = this.DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, AppendAsyncEventMessage);
02411             }
02412         }
02413
02414         private void AppendAsyncEventMessage()
02415         {
02416             lock (asyncEventReportingLock)
02417             {
02418                 foreach (string asyncEventMessage in lstAsyncEventMessage)
02419                 {
02420                     lstLogs.Items.Add(asyncEventMessage);
02421                 }
02422                 lstAsyncEventMessage.Clear();
02423             }
02424         }
02425
02426         private void BtnClearExceptionReport_Click(object sender, RoutedEventArgs e)
02427         {
02428             txtExceptionReport.Text = string.Empty;
02429         }
02430     }
02431 }
Generated on Sun Dec 1 2024 20:52:18 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/DisplayRegionHelperTestApi.properties.cpp Source File

  • File List
  • File Members
  • Generated

DisplayRegionHelperTestApi.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "DisplayRegionHelperTestApi.h"
00008
00009 namespace winrt::Microsoft::UI::Private::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(DisplayRegionHelperTestApi)
00012 }
00013
00014 #include "DisplayRegionHelperTestApi.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/UniformGridLayout.properties.h Source File

  • File List
  • File Members
  • Generated

UniformGridLayout.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class UniformGridLayoutProperties
00008 {
00009 public:
00010     UniformGridLayoutProperties();
00011
00012     void ItemsJustification(winrt::UniformGridLayoutItemsJustification const& value);
00013     winrt::UniformGridLayoutItemsJustification ItemsJustification();
00014
00015     void ItemsStretch(winrt::UniformGridLayoutItemsStretch const& value);
00016     winrt::UniformGridLayoutItemsStretch ItemsStretch();
00017
00018     void MaximumRowsOrColumns(int value);
00019     int MaximumRowsOrColumns();
00020
00021     void MinColumnSpacing(double value);
00022     double MinColumnSpacing();
00023
00024     void MinItemHeight(double value);
00025     double MinItemHeight();
00026
00027     void MinItemWidth(double value);
00028     double MinItemWidth();
00029
00030     void MinRowSpacing(double value);
00031     double MinRowSpacing();
00032
00033     void Orientation(winrt::Orientation const& value);
00034     winrt::Orientation Orientation();
00035
00036     static winrt::DependencyProperty ItemsJustificationProperty() { return s_ItemsJustificationProperty; }
00037     static winrt::DependencyProperty ItemsStretchProperty() { return s_ItemsStretchProperty; }
00038     static winrt::DependencyProperty MaximumRowsOrColumnsProperty() { return s_MaximumRowsOrColumnsProperty; }
00039     static winrt::DependencyProperty MinColumnSpacingProperty() { return s_MinColumnSpacingProperty; }
00040     static winrt::DependencyProperty MinItemHeightProperty() { return s_MinItemHeightProperty; }
00041     static winrt::DependencyProperty MinItemWidthProperty() { return s_MinItemWidthProperty; }
00042     static winrt::DependencyProperty MinRowSpacingProperty() { return s_MinRowSpacingProperty; }
00043     static winrt::DependencyProperty OrientationProperty() { return s_OrientationProperty; }
00044
00045     static GlobalDependencyProperty s_ItemsJustificationProperty;
00046     static GlobalDependencyProperty s_ItemsStretchProperty;
00047     static GlobalDependencyProperty s_MaximumRowsOrColumnsProperty;
00048     static GlobalDependencyProperty s_MinColumnSpacingProperty;
00049     static GlobalDependencyProperty s_MinItemHeightProperty;
00050     static GlobalDependencyProperty s_MinItemWidthProperty;
00051     static GlobalDependencyProperty s_MinRowSpacingProperty;
00052     static GlobalDependencyProperty s_OrientationProperty;
00053
00054     static void EnsureProperties();
00055     static void ClearProperties();
00056
00057     static void OnItemsJustificationPropertyChanged(
00058         winrt::DependencyObject const& sender,
00059         winrt::DependencyPropertyChangedEventArgs const& args);
00060
00061     static void OnItemsStretchPropertyChanged(
00062         winrt::DependencyObject const& sender,
00063         winrt::DependencyPropertyChangedEventArgs const& args);
00064
00065     static void OnMaximumRowsOrColumnsPropertyChanged(
00066         winrt::DependencyObject const& sender,
00067         winrt::DependencyPropertyChangedEventArgs const& args);
00068
00069     static void OnMinColumnSpacingPropertyChanged(
00070         winrt::DependencyObject const& sender,
00071         winrt::DependencyPropertyChangedEventArgs const& args);
00072
00073     static void OnMinItemHeightPropertyChanged(
00074         winrt::DependencyObject const& sender,
00075         winrt::DependencyPropertyChangedEventArgs const& args);
00076
00077     static void OnMinItemWidthPropertyChanged(
00078         winrt::DependencyObject const& sender,
00079         winrt::DependencyPropertyChangedEventArgs const& args);
00080
00081     static void OnMinRowSpacingPropertyChanged(
00082         winrt::DependencyObject const& sender,
00083         winrt::DependencyPropertyChangedEventArgs const& args);
00084
00085     static void OnOrientationPropertyChanged(
00086         winrt::DependencyObject const& sender,
00087         winrt::DependencyPropertyChangedEventArgs const& args);
00088 };
Generated on Sun Dec 1 2024 20:51:55 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Entry Member List

This is the complete list of members for Entry, including all inherited members.
createXamlTypeCallback | Entry
typeName | Entry
xamlType | Entry
Generated on Sun Dec 1 2024 20:53:31 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TargetElement Member List

This is the complete list of members for TargetElement, including all inherited members.
OnCreateAutomationPeer() | TargetElement | [inline, protected]
TargetElement() | TargetElement | [inline]
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ItemsView/ItemsViewSelectionChangedEventArgs.h Source File

  • File List
  • File Members
  • ItemsView

ItemsViewSelectionChangedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsViewSelectionChangedEventArgs.g.h"
00007
00008 class ItemsViewSelectionChangedEventArgs :
00009     public winrt::implementation::ItemsViewSelectionChangedEventArgsT<ItemsViewSelectionChangedEventArgs>
00010 {
00011 };
Generated on Sun Dec 1 2024 20:51:57 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Lights/MaterialHelperTestApiFactory.cpp Source File

  • File List
  • File Members
  • Lights

MaterialHelperTestApiFactory.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MaterialHelper.h"
00007 #include "MaterialHelperTestApiFactory.h"
00008
00009 bool MaterialHelperTestApi::IgnoreAreEffectsFast()
00010 {
00011     return MaterialHelper::IgnoreAreEffectsFast();
00012 }
00013
00014 void MaterialHelperTestApi::IgnoreAreEffectsFast(bool value)
00015 {
00016     MaterialHelper::IgnoreAreEffectsFast(value);
00017 }
00018
00019 bool MaterialHelperTestApi::SimulateDisabledByPolicy()
00020 {
00021     return MaterialHelper::SimulateDisabledByPolicy();
00022 }
00023
00024 void MaterialHelperTestApi::SimulateDisabledByPolicy(bool value)
00025 {
00026     MaterialHelper::SimulateDisabledByPolicy(value);
00027 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/Acrylic/AcrylicBrush.cpp Source File

  • File List
  • File Members
  • Materials
  • Acrylic

AcrylicBrush.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "AcrylicBrush.h"
00007 #include "AcrylicBrushFactory.h"
00008 #include "ColorConversion.h"
00009 #include "ResourceAccessor.h"
00010 #include "SharedHelpers.h"
00011 #include "Vector.h"
00012 #include "RuntimeProfiler.h"
00013
00014 #include "AcrylicBrush.g.cpp"
00015
00016 AcrylicBrush::AcrylicBrush()
00017 {
00018     //  Logging usage telemetry
00019     __RP_Marker_ClassById(RuntimeProfiler::ProfId_Acrylic);
00020 }
00021
00022 AcrylicBrush::~AcrylicBrush()
00023 {
00024     if (m_noiseChangedToken.value)
00025     {
00026         MaterialHelper::NoiseChanged(m_noiseChangedToken);
00027         m_noiseChangedToken.value = 0;
00028     }
00029 }
00030
00031 void AcrylicBrush::OnConnected()
00032 {
00033     // XCBB will use Fallback rendering, so do not run derived Brush code.
00034     if (SharedHelpers::IsInDesignMode()) { return; }
00035
00036     m_fallbackColorChangedToken.value = RegisterPropertyChangedCallback(
00037         winrt::XamlCompositionBrushBase::FallbackColorProperty(), { this, &AcrylicBrush::OnFallbackColorChanged });
00038
00039     // NOTE: This will call back the status changed callback so do it before setting isConnected = true so we don't run UpdateAcrylicStatus again.
00040     m_materialPolicyChangedToken = MaterialHelper::PolicyChanged([this](auto sender, auto args) { OnMaterialPolicyStatusChanged(sender, args); });
00041
00042     // Stay subscribed to NoiseChanged events when brush disconnected so that it gets marked to pick up new noise when (and if) it gets reconnected.
00043     if (!m_noiseChangedToken.value)
00044     {
00045         m_noiseChangedToken = MaterialHelper::NoiseChanged([this](auto sender) { OnNoiseChanged(sender); });
00046     }
00047
00048     m_isConnected = true;
00049     UpdateAcrylicStatus();
00050 }
00051
00052 void AcrylicBrush::OnDisconnected()
00053 {
00054     if (SharedHelpers::IsInDesignMode()) { return; }
00055
00056     m_isConnected = false;
00057     m_isUsingAcrylicBrush = false;
00058     CancelFallbackAnimationCompleteWait();
00059
00060     if (m_brush)
00061     {
00062         m_brush.Close();
00063         m_brush = nullptr;
00064         CompositionBrush(nullptr);
00065     }
00066
00067     // Release our reference on the noise, but don't close - it's managed by MaterialHelper
00068     if (m_noiseBrush)
00069     {
00070         m_noiseBrush = nullptr;
00071     }
00072
00073     MaterialHelper::PolicyChanged(m_materialPolicyChangedToken);
00074     m_materialPolicyChangedToken.value = 0;
00075
00076     UnregisterPropertyChangedCallback(winrt::XamlCompositionBrushBase::FallbackColorProperty(), m_fallbackColorChangedToken.value);
00077     m_fallbackColorChangedToken.value = 0;
00078 }
00079
00080 winrt::CompositionAnimation AcrylicBrush::MakeColorAnimation(const winrt::Color& color, const winrt::TimeSpan& duration, const winrt::Compositor& compositor)
00081 {
00082     auto animation = compositor.CreateColorKeyFrameAnimation();
00083     animation.InsertKeyFrame(1.0, color);
00084     if (SharedHelpers::IsAnimationsEnabled())
00085     {
00086         animation.Duration(duration.count() == 0 ? winrt::TimeSpan::duration(1 * 10000) : duration);     // Zero duration KeyFrameAnimations not supported, use 1ms duration in that case.
00087     }
00088     else
00089     {
00090         animation.Duration(1ms); // shortest allowed to minimize CPU use
00091     }
00092     return animation;
00093 }
00094
00095 winrt::CompositionAnimation AcrylicBrush::MakeFloatAnimation(
00096     float fromValue,
00097     float toValue,
00098     const winrt::TimeSpan& duration,
00099     const winrt::CompositionEasingFunction& easing,
00100     const winrt::Compositor& compositor)
00101 {
00102     auto animation = compositor.CreateScalarKeyFrameAnimation();
00103     animation.InsertKeyFrame(0.0, fromValue);
00104     animation.InsertKeyFrame(1.0, toValue, easing);
00105     animation.Duration(SharedHelpers::IsAnimationsEnabled() ? duration : 1ms); // 1m is shortest allowed, minimize CPU use
00106     return animation;
00107 }
00108
00109 void AcrylicBrush::PlayCrossFadeAnimation(const winrt::CompositionBrush& brush, float acrylicStart, float acrylicEnd)
00110 {
00111     const auto switchDuration = 167ms;
00112     auto compositor = brush.Compositor();
00113     auto easing = compositor.CreateCubicBezierEasingFunction({ 0.5f, 0.0f }, { 0.0f, 0.9f });
00114
00115     brush.StartAnimation(L"FadeInOut.Weight", MakeFloatAnimation(acrylicStart, acrylicEnd, switchDuration, easing, compositor));
00116 }
00117
00118 void AcrylicBrush::OnFallbackColorChanged(const winrt::DependencyObject& /*sender*/, const winrt::DependencyProperty& /*args*/)
00119 {
00120     // FallbackColor is used by AcrylicBrush to determine the solid color to use when we experience fallback due to policy.
00121     // If it changes dynamically and we're using the fallback brush, make sure we update it now.
00122     if (m_brush)
00123     {
00124         if (!m_isUsingOpaqueBrush && (m_isUsingAcrylicBrush || m_isWaitingForFallbackAnimationComplete))
00125         {
00126             auto opaqueFallbackColor = FallbackColor();
00127             opaqueFallbackColor.A = 0xFF; // ensure it is opaque
00128             m_brush.Properties().InsertColor(OpaqueFallbackColorColor, opaqueFallbackColor);
00129         }
00130
00131         if (m_isUsingAcrylicBrush && !m_isWaitingForFallbackAnimationComplete)
00132         {
00133             // It's AcrylicBrush but not crossfading effect, then do nothing because effect doesn't includes FallbackColor.Color
00134         }
00135         else
00136         {
00137             m_brush.StartAnimation(
00138                 (m_isUsingAcrylicBrush || m_isWaitingForFallbackAnimationComplete) ? FallbackColorColor : L"Color",
00139                 MakeColorAnimation(FallbackColor(), TintTransitionDuration(), m_brush.Compositor()));
00140         }
00141     }
00142 }
00143
00144 void AcrylicBrush::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00145 {
00146     auto property = args.Property();
00147
00148     if (property == s_TintColorProperty ||
00149         property == s_TintOpacityProperty ||
00150         property == s_TintLuminosityOpacityProperty)
00151     {
00152         const bool shouldUseOpaqueBrush = GetEffectiveTintColor().A == 255;
00153
00154         // If tint transparency status changed, we need to update the effect chain
00155         if (m_isUsingOpaqueBrush != shouldUseOpaqueBrush)
00156         {
00157             UpdateAcrylicBrush();
00158         }
00159
00160         if (m_brush && (m_isUsingAcrylicBrush || m_isWaitingForFallbackAnimationComplete))
00161         {
00162             if (property != s_TintLuminosityOpacityProperty)
00163             {
00164                 // This only needs to update if TintColor or TintOpacity changed
00165                 const auto newColor = GetEffectiveTintColor();
00166                 m_brush.StartAnimation(TintColorColor, MakeColorAnimation(newColor, TintTransitionDuration(), m_brush.Compositor()));
00167             }
00168
00169             if (!shouldUseOpaqueBrush)
00170             {
00171                 // Update luminosity any time any of the three properties change
00172                 const auto newLuminosityColor = GetEffectiveLuminosityColor();
00173                 m_brush.StartAnimation(LuminosityColorColor, MakeColorAnimation(newLuminosityColor, TintTransitionDuration(), m_brush.Compositor()));
00174             }
00175         }
00176
00177         if (property == s_TintLuminosityOpacityProperty)
00178         {
00179             //  Logging usage telemetry
00180             __RP_Marker_ClassMemberById(RuntimeProfiler::ProfId_Acrylic, RuntimeProfiler::ProfMemberId_Acrylic_TintLuminosityOpacity_Changed);
00181         }
00182     }
00183     else if (property == s_AlwaysUseFallbackProperty)
00184     {
00185         UpdateAcrylicBrush();
00186     }
00187 }
00188
00189 winrt::Color AcrylicBrush::GetEffectiveTintColor()
00190 {
00191     winrt::Color tintColor = TintColor();
00192     const double tintOpacity = TintOpacity();
00193
00194     // Update tintColor's alpha with the combined opacity value
00195     // If LuminosityOpacity was specified, we don't intervene into users parameters
00196     if (TintLuminosityOpacity() != nullptr)
00197     {
00198         tintColor.A = static_cast<uint8_t>(round(tintColor.A * tintOpacity));
00199     }
00200     else
00201     {
00202         const double tintOpacityModifier = GetTintOpacityModifier(tintColor);
00203         tintColor.A = static_cast<uint8_t>(round(tintColor.A * tintOpacity * tintOpacityModifier));
00204     }
00205
00206     return tintColor;
00207 }
00208
00209 double GetTintOpacityModifier(winrt::Color tintColor)
00210 {
00211     // This method supresses the maximum allowable tint opacity depending on the luminosity and saturation of a color by
00212     // compressing the range of allowable values - for example, a user-defined value of 100% will be mapped to 45% for pure
00213     // white (100% luminosity), 85% for pure black (0% luminosity), and 90% for pure gray (50% luminosity).  The intensity of
00214     // the effect increases linearly as luminosity deviates from 50%.  After this effect is calculated, we cancel it out
00215     // linearly as saturation increases from zero.
00216
00217     const double midPoint = 0.50; // Mid point of HsvV range that these calculations are based on. This is here for easy tuning.
00218
00219     const double whiteMaxOpacity = 0.45; // 100% luminosity
00220     const double midPointMaxOpacity = 0.90; // 50% luminosity
00221     const double blackMaxOpacity = 0.85; // 0% luminosity
00222
00223     const Rgb rgb = RgbFromColor(tintColor);
00224     const Hsv hsv = RgbToHsv(rgb);
00225
00226     double opacityModifier = midPointMaxOpacity;
00227
00228     if (hsv.v != midPoint)
00229     {
00230         // Determine maximum suppression amount
00231         double lowestMaxOpacity = midPointMaxOpacity;
00232         double maxDeviation = midPoint;
00233
00234         if (hsv.v > midPoint)
00235         {
00236             lowestMaxOpacity = whiteMaxOpacity; // At white (100% hsvV)
00237             maxDeviation = 1 - maxDeviation;
00238         }
00239         else if (hsv.v < midPoint)
00240         {
00241             lowestMaxOpacity = blackMaxOpacity; // At black (0% hsvV)
00242         }
00243
00244         double maxOpacitySuppression = midPointMaxOpacity - lowestMaxOpacity;
00245
00246         // Determine normalized deviation from the midpoint
00247         const double deviation = abs(hsv.v - midPoint);
00248         const double normalizedDeviation = deviation / maxDeviation;
00249
00250         // If we have saturation, reduce opacity suppression to allow that color to come through more
00251         if (hsv.s > 0)
00252         {
00253             // Dampen opacity suppression based on how much saturation there is
00254             maxOpacitySuppression *= std::max(1 - (hsv.s * 2), 0.0);
00255         }
00256
00257         const double opacitySuppression = maxOpacitySuppression * normalizedDeviation;
00258
00259         opacityModifier = midPointMaxOpacity - opacitySuppression;
00260     }
00261
00262     return opacityModifier;
00263 }
00264
00265 winrt::Color AcrylicBrush::GetEffectiveLuminosityColor()
00266 {
00267     winrt::Color tintColor = TintColor();
00268     const double tintOpacity = TintOpacity();
00269
00270     // Purposely leaving out tint opacity modifier here because GetLuminosityColor needs the *original* tint opacity set by the user.
00271     tintColor.A = static_cast<uint8_t>(round(tintColor.A * tintOpacity));
00272
00273     winrt::IReference<double> luminosityOpacity = TintLuminosityOpacity();
00274
00275     return GetLuminosityColor(tintColor, luminosityOpacity);
00276 }
00277
00278 // The tintColor passed into this method should be the original, unmodified color created using user values for TintColor + TintOpacity
00279 winrt::Color GetLuminosityColor(winrt::Color tintColor, winrt::IReference<double> luminosityOpacity)
00280 {
00281     const Rgb rgbTintColor = RgbFromColor(tintColor);
00282
00283     // If luminosity opacity is specified, just use the values as is
00284     if (luminosityOpacity != nullptr)
00285     {
00286         return ColorFromRgba(rgbTintColor, std::clamp(luminosityOpacity.GetDouble(), 0.0, 1.0));
00287     }
00288     else
00289     {
00290         // To create the Luminosity blend input color without luminosity opacity,
00291         // we're taking the TintColor input, converting to HSV, and clamping the V between these values
00292         const double minHsvV = 0.125;
00293         const double maxHsvV = 0.965;
00294
00295         const Hsv hsvTintColor = RgbToHsv(rgbTintColor);
00296
00297         const auto clampedHsvV = std::clamp(hsvTintColor.v, minHsvV, maxHsvV);
00298
00299         const Hsv hsvLuminosityColor = Hsv(hsvTintColor.h, hsvTintColor.s, clampedHsvV);
00300         const Rgb rgbLuminosityColor = HsvToRgb(hsvLuminosityColor);
00301
00302         // Now figure out luminosity opacity
00303         // Map original *tint* opacity to this range
00304         const double minLuminosityOpacity = 0.15;
00305         const double maxLuminosityOpacity = 1.03;
00306
00307         const double luminosityOpacityRangeMax = maxLuminosityOpacity - minLuminosityOpacity;
00308         const double mappedTintOpacity = ((tintColor.A / 255.0) * luminosityOpacityRangeMax) + minLuminosityOpacity;
00309
00310         // Finally, combine the luminosity opacity and the HsvV-clamped tint color
00311         return ColorFromRgba(rgbLuminosityColor, std::min(mappedTintOpacity, 1.0));
00312     }
00313
00314 }
00315
00316 void AcrylicBrush::EnsureNoiseBrush()
00317 {
00318     auto noiseBrush = MaterialHelper::GetNoiseBrush();
00319     if (noiseBrush != m_noiseBrush)
00320     {
00321         m_noiseBrush = noiseBrush;
00322     }
00323
00324     m_noiseChanged = false;
00325 }
00326
00327 void AcrylicBrush::PolicyStatusChangedHelper(bool isDisabledByMaterialPolicy)
00328 {
00329     m_isDisabledByMaterialPolicy = isDisabledByMaterialPolicy;
00330     if (m_isConnected)
00331     {
00332         UpdateAcrylicStatus();
00333     }
00334 }
00335 void AcrylicBrush::OnMaterialPolicyStatusChanged(const com_ptr<MaterialHelperBase>& sender, bool isDisabledByMaterialPolicy)
00336 {
00337     PolicyStatusChangedHelper(isDisabledByMaterialPolicy);
00338 }
00339
00340 void AcrylicBrush::OnNoiseChanged(const com_ptr<MaterialHelperBase>& sender)
00341 {
00342     m_noiseChanged = true;
00343     if (m_isConnected)
00344     {
00345         UpdateAcrylicStatus();
00346     }
00347 }
00348
00349 void AcrylicBrush::UpdateAcrylicStatus()
00350 {
00351     UpdateAcrylicBrush();
00352 }
00353
00354 winrt::CompositionEffectBrush AcrylicBrush::CreateAcrylicBrushWorker(
00355     const winrt::Compositor& compositor,
00356     bool useCrossFadeEffect,
00357     winrt::Color initialTintColor,
00358     winrt::Color initialLuminosityColor,
00359     winrt::Color initialFallbackColor,
00360     bool shouldBrushBeOpaque,
00361     bool useCache)
00362 {
00363     auto effectFactory = GetOrCreateAcrylicBrushCompositionEffectFactory(
00364         compositor, shouldBrushBeOpaque, useCrossFadeEffect,
00365         initialTintColor, initialLuminosityColor, initialFallbackColor, useCache);
00366
00367     // Create the Comp effect Brush
00368     winrt::CompositionEffectBrush acrylicBrush = effectFactory.CreateBrush();
00369
00370     // Set the backdrop source
00371     if (!shouldBrushBeOpaque)
00372     {
00373         auto backdropBrush = compositor.CreateBackdropBrush();
00374         acrylicBrush.SetSourceParameter(L"Backdrop", backdropBrush);
00375     }
00376
00377     return acrylicBrush;
00378 }
00379
00380 winrt::IGraphicsEffect AcrylicBrush::CombineNoiseWithTintEffect_Luminosity(
00381     const winrt::IGraphicsEffectSource& blurredSource,
00382     const winrt::Microsoft::UI::Private::Composition::Effects::ColorSourceEffect& tintColorEffect,
00383     const winrt::Color initialLuminosityColor,
00384     std::vector<winrt::hstring>& animatedProperties
00385 )
00386 {
00387     animatedProperties.push_back(winrt::hstring(LuminosityColorColor));
00388
00389     // Apply luminosity:
00390
00391     // Luminosity Color
00392     auto luminosityColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
00393     luminosityColorEffect->Name(L"LuminosityColor");
00394     luminosityColorEffect->Color(initialLuminosityColor);
00395
00396     // Luminosity blend
00397     auto luminosityBlendEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::BlendEffect>();
00398     // NOTE: There is currently a bug where the names of BlendEffectMode::Luminosity and BlendEffectMode::Color are flipped.
00399     // This should be changed to Luminosity when/if the bug is fixed.
00400     luminosityBlendEffect->Mode(winrt::BlendEffectMode::Color);
00401     luminosityBlendEffect->Background(blurredSource);
00402     luminosityBlendEffect->Foreground(*luminosityColorEffect);
00403
00404     // Apply tint:
00405
00406     // Color blend
00407     auto colorBlendEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::BlendEffect>();
00408     // NOTE: There is currently a bug where the names of BlendEffectMode::Luminosity and BlendEffectMode::Color are flipped.
00409     // This should be changed to Color when/if the bug is fixed.
00410     colorBlendEffect->Mode(winrt::BlendEffectMode::Luminosity);
00411     colorBlendEffect->Background(*luminosityBlendEffect);
00412     colorBlendEffect->Foreground(tintColorEffect);
00413
00414     return *colorBlendEffect;
00415 }
00416
00417 // ******************************About the Luminosity-based Acrylic Recipe *****************************
00418 //
00419 // In 19H1, the Acryic recipe was altered to improve integration of Acrylic surfaces with Shadows using
00420 // a Luminosity effect. Without this a ThemeShadow cast by an Acrylic surface was visible through it
00421 // as a dark blur, resulting in a muddied appearence that did not match the Acrylic exppectations.
00422 // A Luminosity effect is now used to reduce contrast in the Acrylic source and minimize the
00423 // shadow's contribution to Acrylic output. See comment on Luminosity in recipe description below for details.
00424 //
00425 // For perf reason, CrossFadeEffect is only used in animation transition between Acrylic<->Fallback
00426 //
00427 // *************************** Shadow-friendly Luminosity-based Recipe *********************************
00428 //
00429 //  <CrossFadeEffect>           <!-- Animates between fallback color and acrylic -->
00430 //
00431 //      <ColorSourceEffect />   <!-- Fallback color -->
00432 //
00433 //      <CompositeEffect>           <!-- Provides noise for acrylic -->
00434 //
00435 //          <OpacityEffect>     <!-- Noise texture with wrap and alpha -->
00436 //              <BorderEffect>
00437 //                  <Noise texture in a brush />
00438 //              </BorderEffect>
00439 //          </OpacityEffect>
00440 //
00441 //        <!-- There's an option here. It's either a tinted backdrop: -->
00442 //          <BlendEffect (Color)>       <!-- Tint -->
00443 //
00444 //              <ColorSourceEffect />   <!-- Tint color -->
00445 //
00446 //              <BlendEffect (Luminosity)>               <!-- Luminosity:  The luminosity blend effect takes the color (Hue and Saturation) values from our blurred
00447 //                                                            backdrop, but gets the lightness (Luminosity) value from a solid color layer. The color
00448 //                                                            we use is made up of the RGB values of the Tint color, and the A value is set to "luminosity opacity".
00449 //                                                            The purpose is to reduce contrast - allowing colors to come through, but blocking sharp differences
00450 //                                                            in brightness (such as those caused by shadows).
00451 //                                                            More on luminosity blend here:
00452 //                                                            https://www.photoshopessentials.com/photo-editing/layer-blend-modes/luminosity/ -->
00453 //                  <ColorSourceEffect />   <!-- Luminosity color -->
00454 //
00455 //                <!-- There's another option here. It's either a blurred backdrop: -->
00456 //                  <Blur>
00457 //                      <Backdrop in a brush/>
00458 //                  </Blur>
00459 //                <!-- ...or a pre-blurred backdrop was provided by the shell, which we use directly:  [Not supported on WinUI 3] -->
00460 //                  <Backdrop in a brush/>
00461 //
00462 //              </BlendEffect (Luminosity)>
00463 //
00464 //          </BlendEffect (Color)>
00465 //
00466 //        <!-- ...or it's just a solid tint color: -->
00467 //          <ColorSourceEffect />   <!-- Tint color -->
00468 //
00469 //      </CompositeEffect>
00470 //
00471 //  </CrossFadeEffect>
00472 winrt::CompositionEffectFactory AcrylicBrush::CreateAcrylicBrushCompositionEffectFactory(
00473     const winrt::Compositor& compositor,
00474     bool shouldBrushBeOpaque,
00475     bool useCrossFadeEffect,
00476     winrt::Color initialTintColor,
00477     winrt::Color initialLuminosityColor,
00478     winrt::Color initialFallbackColor)
00479 {
00480     winrt::CompositionEffectFactory effectFactory{ nullptr };
00481
00482     // The part of the effect graph below the noise layer. This is either a semi-transparent tint (common) or an opaque tint (uncommon).
00483     // Opaque tint may be used by apps wishing add the complexity of noise to their brand color, for example.
00484     winrt::IGraphicsEffect tintOutput;
00485
00486     // Tint Color - either used directly or in a Color blend over a blurred backdrop
00487     auto tintColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
00488     tintColorEffect->Name(L"TintColor");
00489     tintColorEffect->Color(initialTintColor);
00490
00491     std::vector<winrt::hstring> animatedProperties;
00492     animatedProperties.push_back(winrt::hstring{ TintColorColor });
00493
00494     if (shouldBrushBeOpaque)
00495     {
00496         tintOutput = *tintColorEffect;
00497     }
00498     else
00499     {
00500         // Load the backdrop in a brush, blending on an opaque FallbackColor background to
00501         // ensure it is fully opaque. We need it to be opaque to ensure the blur works properly
00502         // (since otherwise it will "blur" with transparent, which results in minimal blur).
00503         winrt::CompositionEffectSourceParameter backdropEffectSourceParameter{ L"Backdrop" };
00504
00505         auto opaqueFallbackColor = initialFallbackColor;
00506         opaqueFallbackColor.A = 0xFF; // ensure it is opaque
00507
00508         auto fallbackColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
00509         fallbackColorEffect->Name(L"OpaqueFallbackColor");
00510         fallbackColorEffect->Color(opaqueFallbackColor);
00511         animatedProperties.push_back(winrt::hstring{ OpaqueFallbackColorColor });
00512
00513         // Blend the backdrop on top of the opaque FallbackColor
00514         auto blendedBackdropEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CompositeStepEffect>();
00515         blendedBackdropEffect->Mode(winrt::CanvasComposite::SourceOver);
00516         blendedBackdropEffect->Destination(*fallbackColorEffect);
00517         blendedBackdropEffect->Source(backdropEffectSourceParameter);
00518         winrt::IGraphicsEffectSource blurEffectInput = *blendedBackdropEffect;
00519
00520         // Apply a blur to the backdrop
00521         auto gaussianBlurEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::GaussianBlurEffect>();
00522         gaussianBlurEffect->Name(L"Blur");
00523         gaussianBlurEffect->BorderMode(winrt::EffectBorderMode::Hard);
00524         gaussianBlurEffect->BlurAmount(sc_blurRadius);
00525         gaussianBlurEffect->Source(blurEffectInput);
00526         winrt::IGraphicsEffectSource blurredSource = *gaussianBlurEffect;
00527
00528         tintOutput = CombineNoiseWithTintEffect_Luminosity(blurredSource, *tintColorEffect, initialLuminosityColor, animatedProperties);
00529     }
00530
00531     // Create noise with alpha and wrap:
00532     // Noise image BorderEffect (infinitely tiles noise image)
00533     auto noiseBorderEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::BorderEffect>();
00534     noiseBorderEffect->ExtendX(winrt::CanvasEdgeBehavior::Wrap);
00535     noiseBorderEffect->ExtendY(winrt::CanvasEdgeBehavior::Wrap);
00536     winrt::CompositionEffectSourceParameter noiseEffectSourceParameter{ L"Noise" };
00537     noiseBorderEffect->Source(noiseEffectSourceParameter);
00538     // OpacityEffect applied to wrapped noise
00539     auto noiseOpacityEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::OpacityEffect>();
00540     noiseOpacityEffect->Name(L"NoiseOpacity");
00541     noiseOpacityEffect->Opacity(sc_noiseOpacity);
00542     noiseOpacityEffect->Source(*noiseBorderEffect);
00543
00544     // Blend noise on top of tint
00545     auto blendEffectOuter = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CompositeStepEffect>();
00546     blendEffectOuter->Mode(winrt::CanvasComposite::SourceOver);
00547     blendEffectOuter->Destination(tintOutput);
00548     blendEffectOuter->Source(*noiseOpacityEffect);
00549
00550     if (useCrossFadeEffect)
00551     {
00552         // Fallback color
00553         auto fallbackColorEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::ColorSourceEffect>();
00554         fallbackColorEffect->Name(L"FallbackColor");
00555         fallbackColorEffect->Color(initialFallbackColor);
00556
00557         // CrossFade with the fallback color. Weight = 0 means full fallback, 1 means full acrylic.
00558         auto fadeInOutEffect = winrt::make_self<Microsoft::UI::Private::Composition::Effects::CrossFadeEffect>();
00559         fadeInOutEffect->Name(L"FadeInOut");
00560         fadeInOutEffect->Source1(*fallbackColorEffect);
00561         fadeInOutEffect->Source2(*blendEffectOuter);
00562         fadeInOutEffect->Weight(1.0f);
00563
00564         animatedProperties.push_back(winrt::hstring{ FallbackColorColor });
00565         animatedProperties.push_back(L"FadeInOut.Weight");
00566         effectFactory = compositor.CreateEffectFactory(*fadeInOutEffect, animatedProperties);
00567     }
00568     else
00569     {
00570         effectFactory = compositor.CreateEffectFactory(*blendEffectOuter, animatedProperties);
00571     }
00572
00573     return effectFactory;
00574 }
00575
00576 winrt::CompositionEffectFactory AcrylicBrush::GetOrCreateAcrylicBrushCompositionEffectFactory(
00577     const winrt::Compositor& compositor,
00578     bool shouldBrushBeOpaque,
00579     bool useCrossFadeEffect,
00580     winrt::Color initialTintColor,
00581     winrt::Color initialLuminosityColor,
00582     winrt::Color initialFallbackColor,
00583     bool useCache)
00584 {
00585     return MaterialHelper::GetOrCreateAcrylicBrushCompositionEffectFactoryFromCache(
00586         compositor,
00587         shouldBrushBeOpaque,
00588         useCrossFadeEffect,
00589         useCache,
00590         [&compositor, shouldBrushBeOpaque,
00591         useCrossFadeEffect, initialTintColor, initialLuminosityColor,
00592         initialFallbackColor]() {
00593             return CreateAcrylicBrushCompositionEffectFactory(
00594                 compositor,
00595                 shouldBrushBeOpaque,
00596                 useCrossFadeEffect,
00597                 initialTintColor,
00598                 initialLuminosityColor,
00599                 initialFallbackColor); }
00600     );
00601 }
00602
00603 void AcrylicBrush::CreateAcrylicBrush(bool useCrossFadeEffect, bool forceCreateAcrylicBrush)
00604 {
00605     // Forget about any pending animation state when recreating the brush.
00606     CancelFallbackAnimationCompleteWait();
00607
00608     const auto compositor = winrt::CompositionTarget::GetCompositorForCurrentThread();
00609
00610     const auto fallbackColor = FallbackColor();
00611     //if forceCreateAcrylicBrush=true, m_isUsingAcrylicBrush is ignored.
00612     if (forceCreateAcrylicBrush || m_isUsingAcrylicBrush)
00613     {
00614         EnsureNoiseBrush();
00615
00616         const winrt::Color tintColor = GetEffectiveTintColor();
00617         const winrt::Color luminosityColor = GetEffectiveLuminosityColor();
00618
00619         m_isUsingOpaqueBrush = tintColor.A == 255;
00620
00621         // use cache for AcrylicBrushEffectFactory
00622         const auto acrylicBrush = CreateAcrylicBrushWorker(
00623             compositor,
00624             useCrossFadeEffect,
00625             tintColor,
00626             luminosityColor,
00627             fallbackColor,
00628             m_isUsingOpaqueBrush,
00629             true /* useCache */);
00630
00631
00632         // Set noise image source
00633         MUX_ASSERT(m_noiseBrush);
00634         acrylicBrush.SetSourceParameter(L"Noise", m_noiseBrush);
00635         acrylicBrush.Properties().InsertColor(TintColorColor, tintColor);
00636
00637         if (!m_isUsingOpaqueBrush)
00638         {
00639             acrylicBrush.Properties().InsertColor(LuminosityColorColor, luminosityColor);
00640
00641             auto opaqueFallbackColor = FallbackColor();
00642             opaqueFallbackColor.A = 0xFF; // ensure it is opaque
00643             acrylicBrush.Properties().InsertColor(OpaqueFallbackColorColor, opaqueFallbackColor);
00644         }
00645
00646         if (useCrossFadeEffect)
00647         {
00648             acrylicBrush.Properties().InsertColor(FallbackColorColor, fallbackColor);
00649         }
00650
00651         // Update the AcrylicBrush
00652         m_brush = acrylicBrush;
00653     }
00654     else
00655     {
00656         m_brush = compositor.CreateColorBrush(fallbackColor);
00657     }
00658
00659     CompositionBrush(m_brush);
00660 }
00661
00662 void AcrylicBrush::UpdateAcrylicBrush()
00663 {
00664     if (m_isConnected)
00665     {
00666         bool isUsingAcrylicBrush = true;
00667         const bool alwaysUseFallback = AlwaysUseFallback();
00668         const bool shouldUseOpaqueBrush = GetEffectiveTintColor().A == 255;
00669
00670         if (m_isDisabledByMaterialPolicy || alwaysUseFallback)
00671         {
00672             isUsingAcrylicBrush = false;
00673         }
00674
00675         // Covers cases where we need a new brush (no animations)
00676         if (!m_brush ||                                         // Create brush for the first time
00677             m_noiseChanged ||                                   // Recreate brush with new noise
00678             (m_isUsingOpaqueBrush != shouldUseOpaqueBrush))      // Recreate the brush with (or without) the opaque tint optimization
00679         {
00680             m_isUsingAcrylicBrush = isUsingAcrylicBrush;
00681
00682             CreateAcrylicBrush(false /* useCrossFadeEffect */);
00683         }
00684         // Covers cases were we switch between fallback and acrylic (needs animations)
00685         else
00686         {
00687             // Same source type, see if we need to switch to/from acrylic brush.
00688             if (m_isUsingAcrylicBrush != isUsingAcrylicBrush)
00689             {
00690                 // When we're all done make sure that we recreate the brush to be just a solid color brush.
00691                 auto strongThis = get_strong();
00692
00693                 if (m_isWaitingForFallbackAnimationComplete)
00694                 {
00695                     CancelFallbackAnimationCompleteWait();
00696                 }
00697
00698                 // After cancel animation, AcrylicBrush doesn't have crossfading effects
00699                 // So we make a new AcrylicBrush with crosssfading effects anyway.
00700                 CreateAcrylicBrush(true /* useCrossFadeEffect */, true /* forceCreateAcrylicBrush */);
00701
00702                 m_isUsingAcrylicBrush = isUsingAcrylicBrush;
00703
00704                 m_isWaitingForFallbackAnimationComplete = true;
00705
00706                 float acrylicStart = 0.0f;
00707                 float acrylicEnd = 0.0f;
00708
00709                 if (m_isUsingAcrylicBrush)
00710                 {
00711                     // Fallback -> Acrylic Transition. Create the Acrlyic Brush and animate it from fallback color to acrylic effect.
00712                     acrylicEnd = 1.0f;
00713                 }
00714                 else
00715                 {
00716                     // Acrylic -> Fallback transition. Animate acrylic to the fallback color, then create the fallback brush.
00717                     acrylicStart = 1.0f;
00718                 }
00719
00720                 CreateAnimation(m_brush,
00721                     m_waitingForFallbackAnimationCompleteBatch,
00722                     m_waitingForFallbackAnimationCompleteToken,
00723                     acrylicStart,
00724                     acrylicEnd,
00725                     [strongThis](auto sender, auto args)
00726                     {
00727                         strongThis->CancelFallbackAnimationCompleteWait();
00728
00729                         // When the animation completes, go create the non crossfading acrylic brush.
00730                         strongThis->CreateAcrylicBrush(false /* useCrossFadeEffect */);
00731                     });
00732             }
00733         }
00734     }
00735 }
00736
00737 void AcrylicBrush::CreateAnimation(
00738     const winrt::CompositionBrush& brush,
00739     winrt::CompositionScopedBatch& scopedBatch,
00740     winrt::event_token& token,
00741     float acrylicStart,
00742     float acrylicEnd,
00743     const winrt::TypedEventHandler<winrt::IInspectable, winrt::CompositionBatchCompletedEventArgs>& handler)
00744 {
00745     const auto newScopedBatch = brush.Compositor().CreateScopedBatch(winrt::CompositionBatchTypes::Animation);
00746     PlayCrossFadeAnimation(brush, acrylicStart, acrylicEnd);
00747     newScopedBatch.End();
00748
00749     scopedBatch = newScopedBatch;
00750     token = newScopedBatch.Completed(handler);
00751 }
00752
00753 void AcrylicBrush::CancelFallbackAnimationCompleteWait()
00754 {
00755     m_isWaitingForFallbackAnimationComplete = false;
00756
00757     if (m_waitingForFallbackAnimationCompleteBatch)
00758     {
00759         m_waitingForFallbackAnimationCompleteBatch.Completed(m_waitingForFallbackAnimationCompleteToken);
00760         m_waitingForFallbackAnimationCompleteBatch = nullptr;
00761         m_waitingForFallbackAnimationCompleteToken = {};
00762     }
00763 }
00764
00765 void AcrylicBrush::CoerceToZeroOneRange(double& value)
00766 {
00767     if (!isnan(value))
00768     {
00769         value = std::clamp(value, 0.0, 1.0);
00770     }
00771 }
00772
00773 void AcrylicBrush::CoerceToZeroOneRange_Nullable(winrt::IReference<double>& value)
00774 {
00775     if (value && !isnan(value.Value()))
00776     {
00777         value = std::clamp(value.Value(), 0.0, 1.0);
00778     }
00779 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewBackRequestedEventArgs.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewBackRequestedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewBackRequestedEventArgs.h"
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ItemContainer.properties.cpp Source File

  • File List
  • File Members
  • Generated

ItemContainer.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "ItemContainer.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithDPFactory(ItemContainer)
00012 }
00013
00014 #include "ItemContainer.g.cpp"
00015
00016 GlobalDependencyProperty ItemContainerProperties::s_CanUserInvokeProperty{ nullptr };
00017 GlobalDependencyProperty ItemContainerProperties::s_CanUserSelectProperty{ nullptr };
00018 GlobalDependencyProperty ItemContainerProperties::s_ChildProperty{ nullptr };
00019 GlobalDependencyProperty ItemContainerProperties::s_IsSelectedProperty{ nullptr };
00020 GlobalDependencyProperty ItemContainerProperties::s_MultiSelectModeProperty{ nullptr };
00021
00022 ItemContainerProperties::ItemContainerProperties()
00023     : m_itemInvokedEventSource{static_cast<ItemContainer*>(this)}
00024 {
00025     EnsureProperties();
00026 }
00027
00028 void ItemContainerProperties::EnsureProperties()
00029 {
00030 #ifdef MUX_PRERELEASE
00031     if (!s_CanUserInvokeProperty)
00032     {
00033         s_CanUserInvokeProperty =
00034             InitializeDependencyProperty(
00035                 L"CanUserInvoke",
00036                 winrt::name_of<winrt::ItemContainerUserInvokeMode>(),
00037                 winrt::name_of<winrt::ItemContainer>(),
00038                 false /* isAttached */,
00039                 ValueHelper<winrt::ItemContainerUserInvokeMode>::BoxValueIfNecessary(winrt::ItemContainerUserInvokeMode::Auto),
00040                 winrt::PropertyChangedCallback(&OnCanUserInvokePropertyChanged));
00041     }
00042 #endif
00043 #ifdef MUX_PRERELEASE
00044     if (!s_CanUserSelectProperty)
00045     {
00046         s_CanUserSelectProperty =
00047             InitializeDependencyProperty(
00048                 L"CanUserSelect",
00049                 winrt::name_of<winrt::ItemContainerUserSelectMode>(),
00050                 winrt::name_of<winrt::ItemContainer>(),
00051                 false /* isAttached */,
00052                 ValueHelper<winrt::ItemContainerUserSelectMode>::BoxValueIfNecessary(winrt::ItemContainerUserSelectMode::Auto),
00053                 winrt::PropertyChangedCallback(&OnCanUserSelectPropertyChanged));
00054     }
00055 #endif
00056     if (!s_ChildProperty)
00057     {
00058         s_ChildProperty =
00059             InitializeDependencyProperty(
00060                 L"Child",
00061                 winrt::name_of<winrt::UIElement>(),
00062                 winrt::name_of<winrt::ItemContainer>(),
00063                 false /* isAttached */,
00064                 ValueHelper<winrt::UIElement>::BoxedDefaultValue(),
00065                 winrt::PropertyChangedCallback(&OnChildPropertyChanged));
00066     }
00067     if (!s_IsSelectedProperty)
00068     {
00069         s_IsSelectedProperty =
00070             InitializeDependencyProperty(
00071                 L"IsSelected",
00072                 winrt::name_of<bool>(),
00073                 winrt::name_of<winrt::ItemContainer>(),
00074                 false /* isAttached */,
00075                 ValueHelper<bool>::BoxValueIfNecessary(false),
00076                 winrt::PropertyChangedCallback(&OnIsSelectedPropertyChanged));
00077     }
00078 #ifdef MUX_PRERELEASE
00079     if (!s_MultiSelectModeProperty)
00080     {
00081         s_MultiSelectModeProperty =
00082             InitializeDependencyProperty(
00083                 L"MultiSelectMode",
00084                 winrt::name_of<winrt::ItemContainerMultiSelectMode>(),
00085                 winrt::name_of<winrt::ItemContainer>(),
00086                 false /* isAttached */,
00087                 ValueHelper<winrt::ItemContainerMultiSelectMode>::BoxValueIfNecessary(winrt::ItemContainerMultiSelectMode::Auto),
00088                 winrt::PropertyChangedCallback(&OnMultiSelectModePropertyChanged));
00089     }
00090 #endif
00091 }
00092
00093 void ItemContainerProperties::ClearProperties()
00094 {
00095     s_CanUserInvokeProperty = nullptr;
00096     s_CanUserSelectProperty = nullptr;
00097     s_ChildProperty = nullptr;
00098     s_IsSelectedProperty = nullptr;
00099     s_MultiSelectModeProperty = nullptr;
00100 }
00101
00102 void ItemContainerProperties::OnCanUserInvokePropertyChanged(
00103     winrt::DependencyObject const& sender,
00104     winrt::DependencyPropertyChangedEventArgs const& args)
00105 {
00106     auto owner = sender.as<winrt::ItemContainer>();
00107     winrt::get_self<ItemContainer>(owner)->OnPropertyChanged(args);
00108 }
00109
00110 void ItemContainerProperties::OnCanUserSelectPropertyChanged(
00111     winrt::DependencyObject const& sender,
00112     winrt::DependencyPropertyChangedEventArgs const& args)
00113 {
00114     auto owner = sender.as<winrt::ItemContainer>();
00115     winrt::get_self<ItemContainer>(owner)->OnPropertyChanged(args);
00116 }
00117
00118 void ItemContainerProperties::OnChildPropertyChanged(
00119     winrt::DependencyObject const& sender,
00120     winrt::DependencyPropertyChangedEventArgs const& args)
00121 {
00122     auto owner = sender.as<winrt::ItemContainer>();
00123     winrt::get_self<ItemContainer>(owner)->OnPropertyChanged(args);
00124 }
00125
00126 void ItemContainerProperties::OnIsSelectedPropertyChanged(
00127     winrt::DependencyObject const& sender,
00128     winrt::DependencyPropertyChangedEventArgs const& args)
00129 {
00130     auto owner = sender.as<winrt::ItemContainer>();
00131     winrt::get_self<ItemContainer>(owner)->OnPropertyChanged(args);
00132 }
00133
00134 void ItemContainerProperties::OnMultiSelectModePropertyChanged(
00135     winrt::DependencyObject const& sender,
00136     winrt::DependencyPropertyChangedEventArgs const& args)
00137 {
00138     auto owner = sender.as<winrt::ItemContainer>();
00139     winrt::get_self<ItemContainer>(owner)->OnPropertyChanged(args);
00140 }
00141
00142 void ItemContainerProperties::CanUserInvoke(winrt::ItemContainerUserInvokeMode const& value)
00143 {
00144     [[gsl::suppress(con)]]
00145     {
00146     static_cast<ItemContainer*>(this)->SetValue(s_CanUserInvokeProperty, ValueHelper<winrt::ItemContainerUserInvokeMode>::BoxValueIfNecessary(value));
00147     }
00148 }
00149
00150 winrt::ItemContainerUserInvokeMode ItemContainerProperties::CanUserInvoke()
00151 {
00152     return ValueHelper<winrt::ItemContainerUserInvokeMode>::CastOrUnbox(static_cast<ItemContainer*>(this)->GetValue(s_CanUserInvokeProperty));
00153 }
00154
00155 void ItemContainerProperties::CanUserSelect(winrt::ItemContainerUserSelectMode const& value)
00156 {
00157     [[gsl::suppress(con)]]
00158     {
00159     static_cast<ItemContainer*>(this)->SetValue(s_CanUserSelectProperty, ValueHelper<winrt::ItemContainerUserSelectMode>::BoxValueIfNecessary(value));
00160     }
00161 }
00162
00163 winrt::ItemContainerUserSelectMode ItemContainerProperties::CanUserSelect()
00164 {
00165     return ValueHelper<winrt::ItemContainerUserSelectMode>::CastOrUnbox(static_cast<ItemContainer*>(this)->GetValue(s_CanUserSelectProperty));
00166 }
00167
00168 void ItemContainerProperties::Child(winrt::UIElement const& value)
00169 {
00170     [[gsl::suppress(con)]]
00171     {
00172     static_cast<ItemContainer*>(this)->SetValue(s_ChildProperty, ValueHelper<winrt::UIElement>::BoxValueIfNecessary(value));
00173     }
00174 }
00175
00176 winrt::UIElement ItemContainerProperties::Child()
00177 {
00178     return ValueHelper<winrt::UIElement>::CastOrUnbox(static_cast<ItemContainer*>(this)->GetValue(s_ChildProperty));
00179 }
00180
00181 void ItemContainerProperties::IsSelected(bool value)
00182 {
00183     [[gsl::suppress(con)]]
00184     {
00185     static_cast<ItemContainer*>(this)->SetValue(s_IsSelectedProperty, ValueHelper<bool>::BoxValueIfNecessary(value));
00186     }
00187 }
00188
00189 bool ItemContainerProperties::IsSelected()
00190 {
00191     return ValueHelper<bool>::CastOrUnbox(static_cast<ItemContainer*>(this)->GetValue(s_IsSelectedProperty));
00192 }
00193
00194 void ItemContainerProperties::MultiSelectMode(winrt::ItemContainerMultiSelectMode const& value)
00195 {
00196     [[gsl::suppress(con)]]
00197     {
00198     static_cast<ItemContainer*>(this)->SetValue(s_MultiSelectModeProperty, ValueHelper<winrt::ItemContainerMultiSelectMode>::BoxValueIfNecessary(value));
00199     }
00200 }
00201
00202 winrt::ItemContainerMultiSelectMode ItemContainerProperties::MultiSelectMode()
00203 {
00204     return ValueHelper<winrt::ItemContainerMultiSelectMode>::CastOrUnbox(static_cast<ItemContainer*>(this)->GetValue(s_MultiSelectModeProperty));
00205 }
00206
00207 winrt::event_token ItemContainerProperties::ItemInvoked(winrt::TypedEventHandler<winrt::ItemContainer, winrt::ItemContainerInvokedEventArgs> const& value)
00208 {
00209     return m_itemInvokedEventSource.add(value);
00210 }
00211
00212 void ItemContainerProperties::ItemInvoked(winrt::event_token const& token)
00213 {
00214     m_itemInvokedEventSource.remove(token);
00215 }
Generated on Sun Dec 1 2024 20:51:50 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioMenuFlyoutItemProperties Member List

This is the complete list of members for RadioMenuFlyoutItemProperties, including all inherited members.
AreCheckStatesEnabledProperty() | RadioMenuFlyoutItemProperties | [inline, static]
ClearProperties() | RadioMenuFlyoutItemProperties | [static]
EnsureProperties() | RadioMenuFlyoutItemProperties | [static]
GetAreCheckStatesEnabled(winrt::MenuFlyoutSubItem const &target) | RadioMenuFlyoutItemProperties | [static]
GroupName(winrt::hstring const &value) | RadioMenuFlyoutItemProperties |
GroupName() | RadioMenuFlyoutItemProperties |
GroupNameProperty() | RadioMenuFlyoutItemProperties | [inline, static]
IsChecked(bool value) | RadioMenuFlyoutItemProperties |
IsChecked() | RadioMenuFlyoutItemProperties |
IsCheckedProperty() | RadioMenuFlyoutItemProperties | [inline, static]
OnGroupNamePropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioMenuFlyoutItemProperties | [static]
OnIsCheckedPropertyChanged(winrt::DependencyObject const &sender, winrt::DependencyPropertyChangedEventArgs const &args) | RadioMenuFlyoutItemProperties | [static]
RadioMenuFlyoutItemProperties() | RadioMenuFlyoutItemProperties |
s_AreCheckStatesEnabledProperty | RadioMenuFlyoutItemProperties | [static]
s_GroupNameProperty | RadioMenuFlyoutItemProperties | [static]
s_IsCheckedProperty | RadioMenuFlyoutItemProperties | [static]
SetAreCheckStatesEnabled(winrt::MenuFlyoutSubItem const &target, bool value) | RadioMenuFlyoutItemProperties | [static]
Generated on Sun Dec 1 2024 20:53:03 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NavigationViewTopNavPage Member List

This is the complete list of members for NavigationViewTopNavPage, including all inherited members.
AddFooterItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
AddItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
AutoSuggestCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
AutoSuggestCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
BackButtonEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
BackButtonEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
BackButtonVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
BackButtonVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
BackRequestedStateResetButton_Click(object sender, RoutedEventArgs args) | NavigationViewTopNavPage | [inline, private]
ChangeContent_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ChangePaneTitle_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ClearMenuButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ClearSelectedItem_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ClosingEventCountResetButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
CompactModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavPage | [inline, private]
CompactPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavPage | [inline, private]
CopyGamesLabelButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
CopyVolumeToolTipButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ExpandedModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavPage | [inline, private]
FindAndGiveAutomationNameToVisualChild(string childName) | NavigationViewTopNavPage | [inline, private]
FlipOrientation_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
GetOverflowMenuCornerRadiusButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
HeaderVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
HeaderVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
HeightCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavPage | [inline, private]
m_closedEventsFired | NavigationViewTopNavPage | [private]
m_closingEventsFired | NavigationViewTopNavPage | [private]
m_initializeComponentComplete | NavigationViewTopNavPage | [private]
m_newFooterItemIndex | NavigationViewTopNavPage | [private]
m_newItemIndex | NavigationViewTopNavPage | [private]
MoviesEnabledCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
MoviesEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
NavigationViewTopNavPage() | NavigationViewTopNavPage | [inline]
NavigationViewTopNavPage_Loaded(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
NavView_BackRequested(NavigationView nv, NavigationViewBackRequestedEventArgs args) | NavigationViewTopNavPage | [inline, private]
NavView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args) | NavigationViewTopNavPage | [inline, private]
NavView_PaneClosed(NavigationView sender, object args) | NavigationViewTopNavPage | [inline, private]
NavView_PaneClosing(NavigationView sender, NavigationViewPaneClosingEventArgs args) | NavigationViewTopNavPage | [inline, private]
NavView_PaneOpened(NavigationView sender, object args) | NavigationViewTopNavPage | [inline, private]
NavView_PaneOpening(NavigationView sender, object args) | NavigationViewTopNavPage | [inline, private]
NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) | NavigationViewTopNavPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | NavigationViewTopNavPage | [inline, protected]
OpenPaneButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
OpenPaneLength_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavPage | [inline, private]
PaneToggleButtonVisiblityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
PaneToggleButtonVisiblityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
RemoveFooterItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
RemoveItemButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ScrambleButton_Click(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
SelectedItemCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavPage | [inline, private]
SelectionFollowFocus_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
SelectionFollowFocus_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
SetHeaderButton_Click(object sender, RoutedEventArgs args) | NavigationViewTopNavPage | [inline, private]
SettingsItemVisibilityCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
SettingsItemVisibilityCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
TestFrameCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
TestFrameCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
TestPage_Loaded(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
TitleBarCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
TitleBarCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ToggleBackgroundChanged(DependencyObject o, DependencyProperty p) | NavigationViewTopNavPage | [inline, private]
ToggleButtonStyleCheckbox_Checked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
ToggleButtonStyleCheckbox_Unchecked(object sender, RoutedEventArgs e) | NavigationViewTopNavPage | [inline, private]
UpdateToggleBackgroundColor(Button toggleButton) | NavigationViewTopNavPage | [inline, private]
WidthCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | NavigationViewTopNavPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:22 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

Expander Member List

This is the complete list of members for Expander, including all inherited members.
_expandCollapsePattern | Expander | [private]
_factory | Expander | [private, static]
Collapse() | Expander | [inline]
CollapseAndWait() | Expander | [inline]
Expand() | Expander | [inline]
ExpandAndWait() | Expander | [inline]
ExpandCollapseState | Expander |
Expander(UIObject uiObject) | Expander | [inline]
Factory | Expander | [static]
GetCollapsedWaiter() | Expander | [inline]
GetExpandedWaiter() | Expander | [inline]
Initialize() | Expander | [inline, private]
Generated on Sun Dec 1 2024 20:53:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

NullSelector Member List

This is the complete list of members for NullSelector, including all inherited members.
CanSelect(winrt::IndexPath const &index) | SelectorBase | [protected, virtual]
Clear() | SelectorBase | [virtual]
DeselectWithAnchorPreservation(int index) | SelectorBase |
GetSelectionModel() | SelectorBase | [inline, protected]
IsSelected(winrt::IndexPath const &index) | SelectorBase | [protected]
NullSelector() | NullSelector |
OnFocusedAction(winrt::IndexPath const &index, bool ctrl, bool shift) | SelectorBase | [inline, virtual]
OnInteractedAction(winrt::IndexPath const &index, bool ctrl, bool shift) | SelectorBase | [inline, virtual]
SelectAll() | SelectorBase | [virtual]
SelectorBase() | SelectorBase |
SetSelectionModel(winrt::SelectionModel const &selectionModel) | SelectorBase |
~NullSelector() | NullSelector |
~SelectorBase() | SelectorBase |
Generated on Sun Dec 1 2024 20:52:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTearOutWindowWithDataItems Member List

This is the complete list of members for TabViewTearOutWindowWithDataItems, including all inherited members.
DefaultWindowSize | TabViewTearOutWindowWithDataItems | [static]
OnExternalTornOutTabsDropped(TabView _, TabViewExternalTornOutTabsDroppedEventArgs args) | TabViewTearOutWindowWithDataItems | [inline, private]
OnExternalTornOutTabsDropping(TabView _, TabViewExternalTornOutTabsDroppingEventArgs args) | TabViewTearOutWindowWithDataItems | [inline, private]
OnTabTearOutRequested(TabView _, TabViewTabTearOutRequestedEventArgs args) | TabViewTearOutWindowWithDataItems | [inline, private]
OnTabTearOutWindowRequested(TabView _, TabViewTabTearOutWindowRequestedEventArgs args) | TabViewTearOutWindowWithDataItems | [inline, private]
StringList | TabViewTearOutWindowWithDataItems |
TabViewTearOutWindowWithDataItems() | TabViewTearOutWindowWithDataItems | [inline]
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

WebView2RenderingVerifier::NativeMethods::RECT Member List

This is the complete list of members for WebView2RenderingVerifier::NativeMethods::RECT, including all inherited members.
Bottom | WebView2RenderingVerifier::NativeMethods::RECT
Left | WebView2RenderingVerifier::NativeMethods::RECT
Right | WebView2RenderingVerifier::NativeMethods::RECT
Top | WebView2RenderingVerifier::NativeMethods::RECT
Generated on Sun Dec 1 2024 20:54:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/TabViewItemTemplateSettings.properties.h Source File

  • File List
  • File Members
  • Generated

TabViewItemTemplateSettings.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class TabViewItemTemplateSettingsProperties
00008 {
00009 public:
00010     TabViewItemTemplateSettingsProperties();
00011
00012     void IconElement(winrt::IconElement const& value);
00013     winrt::IconElement IconElement();
00014
00015     void TabGeometry(winrt::Geometry const& value);
00016     winrt::Geometry TabGeometry();
00017
00018     static winrt::DependencyProperty IconElementProperty() { return s_IconElementProperty; }
00019     static winrt::DependencyProperty TabGeometryProperty() { return s_TabGeometryProperty; }
00020
00021     static GlobalDependencyProperty s_IconElementProperty;
00022     static GlobalDependencyProperty s_TabGeometryProperty;
00023
00024     static void EnsureProperties();
00025     static void ClearProperties();
00026 };
Generated on Sun Dec 1 2024 20:51:54 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

HierarchicalNavigationViewMarkup Member List

This is the complete list of members for HierarchicalNavigationViewMarkup, including all inherited members.
AddChildItemToMI19(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
BuildIsChildSelectedString(IList< object > items, string itemstring) | HierarchicalNavigationViewMarkup | [inline, private]
ClickedItem(object sender, NavigationViewItemInvokedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
CollapseSelectedItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
CreateMenuItem(string title) | HierarchicalNavigationViewMarkup | [inline, private]
GetMenuItem1ChildrenFlyoutCornerRadiusButton_Click(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
HierarchicalNavigationViewMarkup() | HierarchicalNavigationViewMarkup | [inline]
NavView_PaneClosed(NavigationView sender, object args) | HierarchicalNavigationViewMarkup | [inline, private]
NavView_PaneOpened(NavigationView sender, object args) | HierarchicalNavigationViewMarkup | [inline, private]
OnCheckedIsSettingsVisible(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
OnItemCollapsed(object sender, NavigationViewItemCollapsedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
OnItemExpanding(object sender, NavigationViewItemExpandingEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
OnUncheckedIsSettingsVisible(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
PaneDisplayModeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
PrintSelectedItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
PrintTopLevelIsChildSelectedItems(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
RemoveSecondMenuItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
SelectSecondItem(object sender, RoutedEventArgs e) | HierarchicalNavigationViewMarkup | [inline, private]
Generated on Sun Dec 1 2024 20:54:05 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: SwipeControl/SwipeTestHooks.cpp Source File

  • File List
  • File Members
  • SwipeControl

SwipeTestHooks.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "SwipeTestHooksFactory.h"
00007
00008 com_ptr<SwipeTestHooks> SwipeTestHooks::s_testHooks{};
00009
00010 com_ptr<SwipeTestHooks> SwipeTestHooks::EnsureGlobalTestHooks()
00011 {
00012     static bool s_initialized = []() {
00013         s_testHooks = winrt::make_self<SwipeTestHooks>();
00014         return true;
00015     }();
00016     return s_testHooks;
00017 }
00018
00019 winrt::SwipeControl SwipeTestHooks::GetLastInteractedWithSwipeControl()
00020 {
00021     return SwipeControl::GetLastInteractedWithSwipeControl();
00022 }
00023
00024 bool SwipeTestHooks::GetIsOpen(const winrt::SwipeControl& swipeControl)
00025 {
00026     if (swipeControl)
00027     {
00028         return winrt::get_self<SwipeControl>(swipeControl)->GetIsOpen();
00029     }
00030     else
00031     {
00032         if (auto lastInteractedWithSwipeControl = SwipeControl::GetLastInteractedWithSwipeControl())
00033         {
00034             return winrt::get_self<SwipeControl>(lastInteractedWithSwipeControl)->GetIsOpen();
00035         }
00036         return false;
00037     }
00038 }
00039
00040 bool SwipeTestHooks::GetIsIdle(const winrt::SwipeControl& swipeControl)
00041 {
00042     if (swipeControl)
00043     {
00044         return winrt::get_self<SwipeControl>(swipeControl)->GetIsIdle();
00045     }
00046     else
00047     {
00048         if (auto lastInteractedWithSwipeControl = SwipeControl::GetLastInteractedWithSwipeControl())
00049         {
00050             return winrt::get_self<SwipeControl>(lastInteractedWithSwipeControl)->GetIsIdle();
00051         }
00052         return false;
00053     }
00054 }
00055
00056 void SwipeTestHooks::NotifyLastInteractedWithSwipeControlChanged()
00057 {
00058     auto hooks = EnsureGlobalTestHooks();
00059     if (hooks->m_lastInteractedWithSwipeControlChangedEventSource)
00060     {
00061         hooks->m_lastInteractedWithSwipeControlChangedEventSource(nullptr, nullptr);
00062     }
00063 }
00064
00065 winrt::event_token SwipeTestHooks::LastInteractedWithSwipeControlChanged(winrt::TypedEventHandler<winrt::IInspectable, winrt::IInspectable> const& value)
00066 {
00067     auto hooks = EnsureGlobalTestHooks();
00068     return hooks->m_lastInteractedWithSwipeControlChangedEventSource.add(value);
00069 }
00070
00071 void SwipeTestHooks::LastInteractedWithSwipeControlChanged(winrt::event_token const& token)
00072 {
00073     auto hooks = EnsureGlobalTestHooks();
00074     hooks->m_lastInteractedWithSwipeControlChangedEventSource.remove(token);
00075 }
00076
00077 void SwipeTestHooks::NotifyOpenedStatusChanged(const winrt::SwipeControl& sender)
00078 {
00079     auto hooks = EnsureGlobalTestHooks();
00080     if (hooks->m_openedStatusChangedEventSource)
00081     {
00082         hooks->m_openedStatusChangedEventSource(sender, nullptr);
00083     }
00084 }
00085
00086 winrt::event_token SwipeTestHooks::OpenedStatusChanged(winrt::TypedEventHandler<winrt::SwipeControl, winrt::IInspectable> const& value)
00087 {
00088     auto hooks = EnsureGlobalTestHooks();
00089     return hooks->m_openedStatusChangedEventSource.add(value);
00090 }
00091
00092 void SwipeTestHooks::OpenedStatusChanged(winrt::event_token const& token)
00093 {
00094     auto hooks = EnsureGlobalTestHooks();
00095     hooks->m_openedStatusChangedEventSource.remove(token);
00096 }
00097
00098 void SwipeTestHooks::NotifyIdleStatusChanged(const winrt::SwipeControl& sender)
00099 {
00100     auto hooks = EnsureGlobalTestHooks();
00101     if (hooks->m_idleStatusChangedEventSource)
00102     {
00103         hooks->m_idleStatusChangedEventSource(sender, nullptr);
00104     }
00105 }
00106
00107 winrt::event_token SwipeTestHooks::IdleStatusChanged(winrt::TypedEventHandler<winrt::SwipeControl, winrt::IInspectable> const& value)
00108 {
00109     auto hooks = EnsureGlobalTestHooks();
00110     return hooks->m_idleStatusChangedEventSource.add(value);
00111 }
00112
00113 void SwipeTestHooks::IdleStatusChanged(winrt::event_token const& token)
00114 {
00115     auto hooks = EnsureGlobalTestHooks();
00116     hooks->m_idleStatusChangedEventSource.remove(token);
00117 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemCollectionTransitionCompletedEventArgs.h Source File

  • File List
  • File Members
  • Repeater

ItemCollectionTransitionCompletedEventArgs.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "pch.h"
00007 #include "common.h"
00008
00009 #include "ItemCollectionTransitionCompletedEventArgs.g.h"
00010
00011 class ItemCollectionTransitionCompletedEventArgs :
00012     public ReferenceTracker<ItemCollectionTransitionCompletedEventArgs, winrt::implementation::ItemCollectionTransitionCompletedEventArgsT, winrt::composing, winrt::composable>
00013 {
00014 public:
00015     ItemCollectionTransitionCompletedEventArgs(winrt::ItemCollectionTransition const& transition);
00016
00017     winrt::ItemCollectionTransition Transition() { return m_transition.safe_get(); }
00018     winrt::UIElement Element();
00019
00020 private:
00021     tracker_ref<winrt::ItemCollectionTransition> m_transition{ this };
00022 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: NavigationView/NavigationViewItemCollapsedEventArgs.cpp Source File

  • File List
  • File Members
  • NavigationView

NavigationViewItemCollapsedEventArgs.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "NavigationViewItemCollapsedEventArgs.h"
00007
00008 NavigationViewItemCollapsedEventArgs::NavigationViewItemCollapsedEventArgs(const winrt::NavigationView& navigationView)
00009 {
00010     m_navigationView.set(navigationView);
00011 }
00012
00013 winrt::NavigationViewItemBase NavigationViewItemCollapsedEventArgs::CollapsedItemContainer()
00014 {
00015     return m_collapsedItemContainer.get();
00016 }
00017
00018 void NavigationViewItemCollapsedEventArgs::CollapsedItemContainer(winrt::NavigationViewItemBase const& value)
00019 {
00020     m_collapsedItemContainer.set(value);
00021 }
00022
00023 winrt::IInspectable NavigationViewItemCollapsedEventArgs::CollapsedItem()
00024 {
00025     if (auto const collapsedItem = m_collapsedItem.get())
00026     {
00027         return collapsedItem;
00028     }
00029
00030     if (auto const nv = m_navigationView.get())
00031     {
00032         m_collapsedItem.set(nv.MenuItemFromContainer(m_collapsedItemContainer.get()));
00033         return m_collapsedItem.get();
00034     }
00035
00036     return nullptr;
00037 }
Generated on Sun Dec 1 2024 20:52:02 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Materials/MicaBackdrop/MicaBackdrop.cpp Source File

  • File List
  • File Members
  • Materials
  • MicaBackdrop

MicaBackdrop.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "MicaBackdrop.h"
00007
00008 void MicaBackdrop::OnTargetConnected(ICompositionSupportsSystemBackdrop target, winrt::Microsoft::UI::Xaml::XamlRoot xamlRoot)
00009 {
00010     __super::OnTargetConnected(target, xamlRoot);
00011
00012     auto newController = MicaController();
00013     newController.Kind(Kind());
00014     auto systemBackdrop = this->try_as<winrt::Microsoft::UI::Xaml::Media::SystemBackdrop>();
00015     auto configuration = systemBackdrop.GetDefaultSystemBackdropConfiguration(target, xamlRoot);
00016     m_controllers.push_back(std::make_unique<ControllerEntry>(target, newController, configuration));
00017 }
00018
00019 void MicaBackdrop::OnTargetDisconnected(ICompositionSupportsSystemBackdrop target)
00020 {
00021     __super::OnTargetDisconnected(target);
00022
00023     auto entryIterator = std::find_if(
00024         m_controllers.begin(),
00025         m_controllers.end(),
00026         [target](const std::unique_ptr<ControllerEntry>& entry){ return entry->m_target == target; });
00027     MUX_ASSERT(entryIterator != m_controllers.end());
00028     m_controllers.erase(entryIterator);
00029 }
00030
00031 void MicaBackdrop::OnPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& args)
00032 {
00033     const winrt::IDependencyProperty& property = args.Property();
00034
00035     if (property == s_KindProperty)
00036     {
00037         // If no controller exists, Kind will get set as part of OnTargetConnected
00038         for (const std::unique_ptr<ControllerEntry>& entry : m_controllers)
00039         {
00040             entry->m_controller.Kind(Kind());
00041         }
00042     }
00043 }
00044
00045 MicaBackdrop::ControllerEntry::ControllerEntry(ICompositionSupportsSystemBackdrop target, MicaController controller, SystemBackdropConfiguration configuration)
00046     : m_target(target)
00047     , m_controller(controller)
00048 {
00049     controller.AddSystemBackdropTarget(target);
00050     controller.SetSystemBackdropConfiguration(configuration);
00051 }
00052
00053 MicaBackdrop::ControllerEntry::~ControllerEntry()
00054 {
00055     m_controller.RemoveSystemBackdropTarget(m_target);
00056     m_controller.Close();
00057     m_controller = nullptr;
00058 }
Generated on Sun Dec 1 2024 20:51:59 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp Source File

  • File List
  • File Members
  • Generated

LinedFlowLayoutItemCollectionTransitionProvider.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "LinedFlowLayoutItemCollectionTransitionProvider.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls
00010 {
00011     CppWinRTActivatableClassWithBasicFactory(LinedFlowLayoutItemCollectionTransitionProvider)
00012 }
00013
00014 #include "LinedFlowLayoutItemCollectionTransitionProvider.g.cpp"
00015
00016
Generated on Sun Dec 1 2024 20:51:51 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

SnapPointBase Member List

This is the complete list of members for SnapPointBase, including all inherited members.
abi_enter() | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
CheckThread() | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
Combine(int &combinationCount, winrt::SnapPointBase const &snapPoint) const =0 | SnapPointBase | [pure virtual]
CreateConditionalExpression(std::tuple< double, double > actualApplicableZone, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)=0 | SnapPointBase | [pure virtual]
CreateRestingPointExpression(double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone, winrt::InteractionTracker const &interactionTracker, winrt::hstring const &target, winrt::hstring const &scale, bool isInertiaFromImpulse)=0 | SnapPointBase | [pure virtual]
DeleteInstanceOnUIThread(std::unique_ptr< SnapPointBase > &&self) noexcept | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline, static]
DetermineActualApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint)=0 | SnapPointBase | [pure virtual]
DetermineActualImpulseApplicableZone(const SnapPointBase *previousSnapPoint, const SnapPointBase *nextSnapPoint, double currentIgnoredValue, double previousIgnoredValue, double nextIgnoredValue)=0 | SnapPointBase | [pure virtual]
EnsureReferenceTrackerInterfaces() | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
Evaluate(std::tuple< double, double > actualApplicableZone, double value) const =0 | SnapPointBase | [pure virtual]
final_release(std::unique_ptr< SnapPointBase > &&self) | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline, static]
GetBase() | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
GetInner() | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
GetIsInertiaFromImpulseExpression(winrt::hstring const &target) const | SnapPointBase | [protected]
GetTargetExpression(winrt::hstring const &target) const | SnapPointBase | [protected]
ImpulseInfluence(double edgeOfMidpoint, double ignoredValue) const =0 | SnapPointBase | [pure virtual]
Influence(double edgeOfMidpoint) const =0 | SnapPointBase | [pure virtual]
IsOnThread() | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
NonDelegatingQueryInterface(winrt::guid const &riid, void **value) noexcept | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
OnUpdateViewport(double newViewport)=0 | SnapPointBase | [pure virtual]
operator<(const SnapPointBase *snapPoint) | SnapPointBase |
operator==(const SnapPointBase *snapPoint) | SnapPointBase |
QueryInterface(GUID const &id_abi, void **object) noexcept | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
ReferenceTracker(Args &&...args) | ReferenceTracker< SnapPointBase, winrt::implementation::SnapPointBaseT, winrt::composable, winrt::composing > | [inline]
SetBooleanParameter(winrt::ExpressionAnimation const &expressionAnimation, wstring_view const &booleanName, bool booleanValue) const | SnapPointBase |
SetScalarParameter(winrt::ExpressionAnimation const &expressionAnimation, wstring_view const &scalarName, float scalarValue) const | SnapPointBase |
SnapCount() const =0 | SnapPointBase | [pure virtual]
SnapsAt(std::tuple< double, double > actualApplicableZone, double value) const | SnapPointBase |
SortPredicate() const =0 | SnapPointBase | [pure virtual]
UpdateConditionalExpressionAnimationForImpulse(winrt::ExpressionAnimation const &conditionExpressionAnimation, std::tuple< double, double > actualImpulseApplicableZone) const =0 | SnapPointBase | [pure virtual]
UpdateRestingPointExpressionAnimationForImpulse(winrt::ExpressionAnimation const &restingValueExpressionAnimation, double ignoredValue, std::tuple< double, double > actualImpulseApplicableZone) const =0 | SnapPointBase | [pure virtual]
Generated on Sun Dec 1 2024 20:53:11 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

PipsPagerTemplateSettings Member List

This is the complete list of members for PipsPagerTemplateSettings, including all inherited members.
ClearProperties() | PipsPagerTemplateSettingsProperties | [static]
EnsureProperties() | PipsPagerTemplateSettingsProperties | [static]
PipsPagerItems(winrt::IVector< int > const &value) | PipsPagerTemplateSettingsProperties |
PipsPagerItems() | PipsPagerTemplateSettingsProperties |
PipsPagerItemsProperty() | PipsPagerTemplateSettingsProperties | [inline, static]
PipsPagerTemplateSettingsProperties() | PipsPagerTemplateSettingsProperties |
s_PipsPagerItemsProperty | PipsPagerTemplateSettingsProperties | [static]
Generated on Sun Dec 1 2024 20:53:01 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/ItemsSourceView.h Source File

  • File List
  • File Members
  • Repeater

ItemsSourceView.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ItemsSourceView.g.h"
00007
00008 class ItemsSourceView :
00009     public ReferenceTracker<ItemsSourceView, winrt::implementation::ItemsSourceViewT, winrt::composing>
00010 {
00011 public:
00012
00013 #pragma region ItemsSourceView
00014     int32_t Count();
00015     winrt::IInspectable GetAt(int index);
00016
00017     bool HasKeyIndexMapping();
00018     winrt::hstring KeyFromIndex(int index);
00019     int IndexFromKey(winrt::hstring const& id);
00020     int IndexOf(winrt::IInspectable const& value);
00021
00022     winrt::event_token CollectionChanged(winrt::NotifyCollectionChangedEventHandler const& value);
00023     void CollectionChanged(winrt::event_token const& token);
00024 #pragma endregion
00025
00026
00027 #pragma region Consume API for internal use only.
00028     void OnItemsSourceChanged(winrt::NotifyCollectionChangedEventArgs const& args);
00029
00030     virtual int32_t GetSizeCore();
00031     virtual winrt::IInspectable GetAtCore(int index);
00032
00033     virtual bool HasKeyIndexMappingCore();
00034     virtual winrt::hstring KeyFromIndexCore(int index);
00035     virtual int IndexFromKeyCore(winrt::hstring const& id);
00036     virtual int IndexOfCore(winrt::IInspectable const& value);
00037 #pragma endregion
00038
00039 private:
00040     event_source<winrt::NotifyCollectionChangedEventHandler> m_collectionChangedEventSource{ this };
00041     int m_cachedSize{ -1 };
00042 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

IInvertEffect Member List

This is the complete list of members for IInvertEffect, including all inherited members.
Source([out, retval] Windows.Graphics.Effects.IGraphicsEffectSource **source) | IInvertEffect
Source([in] Windows.Graphics.Effects.IGraphicsEffectSource *source) | IInvertEffect
Generated on Sun Dec 1 2024 20:53:32 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TabViewTearOutWindowWithoutDataItems Member List

This is the complete list of members for TabViewTearOutWindowWithoutDataItems, including all inherited members.
DefaultWindowSize | TabViewTearOutWindowWithoutDataItems | [static]
OnExternalTornOutTabsDropped(TabView tabView, TabViewExternalTornOutTabsDroppedEventArgs args) | TabViewTearOutWindowWithoutDataItems | [inline, private]
OnExternalTornOutTabsDropping(TabView _, TabViewExternalTornOutTabsDroppingEventArgs args) | TabViewTearOutWindowWithoutDataItems | [inline, private]
OnTabTearOutRequested(TabView tabView, TabViewTabTearOutRequestedEventArgs args) | TabViewTearOutWindowWithoutDataItems | [inline, private]
OnTabTearOutWindowRequested(TabView _, TabViewTabTearOutWindowRequestedEventArgs args) | TabViewTearOutWindowWithoutDataItems | [inline, private]
TabViewTearOutWindowWithoutDataItems() | TabViewTearOutWindowWithoutDataItems | [inline]
tearOutWindow | TabViewTearOutWindowWithoutDataItems | [private]
Generated on Sun Dec 1 2024 20:54:39 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ElementFactory Member List

This is the complete list of members for ElementFactory, including all inherited members.
GetElement(winrt::ElementFactoryGetArgs const &args) | ElementFactory |
GetElementCore(winrt::ElementFactoryGetArgs const &args) | ElementFactory | [virtual]
NonDelegatingAddRef() | ElementFactory | [inline, virtual]
NonDelegatingQueryInterface(const winrt::guid &id, void **object) | ElementFactory | [inline, virtual]
NonDelegatingRelease() | ElementFactory | [inline, virtual]
RecycleElement(winrt::ElementFactoryRecycleArgs const &args) | ElementFactory |
RecycleElementCore(winrt::ElementFactoryRecycleArgs const &args) | ElementFactory | [virtual]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RevealRegressionTestsPage Member List

This is the complete list of members for RevealRegressionTestsPage, including all inherited members.
_test1_RevealButton | RevealRegressionTestsPage | [private]
_test1_RevealButton_Click(object sender, RoutedEventArgs e) | RevealRegressionTestsPage | [inline, private]
AddBackRevealButton_Click(object sender, RoutedEventArgs e) | RevealRegressionTestsPage | [inline, private]
AddRevealButton_Click(object sender, RoutedEventArgs e) | RevealRegressionTestsPage | [inline, private]
GetElementForHoverLight(object element) | RevealRegressionTestsPage | [inline, private]
OnNavigatedFrom(NavigationEventArgs e) | RevealRegressionTestsPage | [inline, protected]
RemoveRevealButton_Click(object sender, RoutedEventArgs e) | RevealRegressionTestsPage | [inline, private]
RevealButton_Click(object sender, RoutedEventArgs e) | RevealRegressionTestsPage | [inline, private]
RevealRegressionTestsPage() | RevealRegressionTestsPage | [inline]
SimluateDisabledByPolicyToggleButton_Checked(object sender, RoutedEventArgs e) | RevealRegressionTestsPage | [inline, private]
SimluateDisabledByPolicyToggleButton_Unchecked(object sender, RoutedEventArgs e) | RevealRegressionTestsPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:25 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewSample Member List

This is the complete list of members for TreeViewSample, including all inherited members.
_data | TreeViewSample | [private, static]
Button_Click(object sender, RoutedEventArgs e) | TreeViewSample | [inline, private]
clear_Click(object sender, RoutedEventArgs e) | TreeViewSample | [inline, private]
ElementFactory_SelectTemplateKey(RecyclingElementFactory sender, SelectTemplateEventArgs args) | TreeViewSample | [inline, private]
GetData() | TreeViewSample | [inline, private]
GetLeafIndex() | TreeViewSample | [inline, private]
GetParentData() | TreeViewSample | [inline, private]
insert_Click(object sender, RoutedEventArgs e) | TreeViewSample | [inline, private]
OnBackClicked(object sender, RoutedEventArgs e) | TreeViewSample | [inline, private]
OnElementIndexChanged(ItemsRepeater sender, ItemsRepeaterElementIndexChangedEventArgs args) | TreeViewSample | [inline, private]
OnMultipleSelectionClicked(object sender, RoutedEventArgs e) | TreeViewSample | [inline, private]
remove_Click(object sender, RoutedEventArgs e) | TreeViewSample | [inline, private]
Repeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args) | TreeViewSample | [inline, private]
SelectionModel_PropertyChanged(object sender, PropertyChangedEventArgs e) | TreeViewSample | [inline, private]
TreeViewSample() | TreeViewSample | [inline]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/ImageIconSource.properties.h Source File

  • File List
  • File Members
  • Generated

ImageIconSource.properties.h

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #pragma once
00006
00007 class ImageIconSourceProperties
00008 {
00009 public:
00010     ImageIconSourceProperties();
00011
00012     void ImageSource(winrt::ImageSource const& value);
00013     winrt::ImageSource ImageSource();
00014
00015     static winrt::DependencyProperty ImageSourceProperty() { return s_ImageSourceProperty; }
00016
00017     static GlobalDependencyProperty s_ImageSourceProperty;
00018
00019     static void EnsureProperties();
00020     static void ClearProperties();
00021 };
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Generated/CommandBarFlyoutCommandBar.properties.cpp Source File

  • File List
  • File Members
  • Generated

CommandBarFlyoutCommandBar.properties.cpp

Go to the documentation of this file.
00001 // Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
00005 #include "pch.h"
00006 #include "common.h"
00007 #include "CommandBarFlyoutCommandBar.h"
00008
00009 namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
00010 {
00011     CppWinRTActivatableClassWithDPFactory(CommandBarFlyoutCommandBar)
00012 }
00013
00014 #include "CommandBarFlyoutCommandBar.g.cpp"
00015
00016 GlobalDependencyProperty CommandBarFlyoutCommandBarProperties::s_FlyoutTemplateSettingsProperty{ nullptr };
00017 GlobalDependencyProperty CommandBarFlyoutCommandBarProperties::s_SystemBackdropProperty{ nullptr };
00018
00019 CommandBarFlyoutCommandBarProperties::CommandBarFlyoutCommandBarProperties()
00020 {
00021     EnsureProperties();
00022 }
00023
00024 void CommandBarFlyoutCommandBarProperties::EnsureProperties()
00025 {
00026     if (!s_FlyoutTemplateSettingsProperty)
00027     {
00028         s_FlyoutTemplateSettingsProperty =
00029             InitializeDependencyProperty(
00030                 L"FlyoutTemplateSettings",
00031                 winrt::name_of<winrt::CommandBarFlyoutCommandBarTemplateSettings>(),
00032                 winrt::name_of<winrt::CommandBarFlyoutCommandBar>(),
00033                 false /* isAttached */,
00034                 ValueHelper<winrt::CommandBarFlyoutCommandBarTemplateSettings>::BoxedDefaultValue(),
00035                 nullptr);
00036     }
00037     if (!s_SystemBackdropProperty)
00038     {
00039         s_SystemBackdropProperty =
00040             InitializeDependencyProperty(
00041                 L"SystemBackdrop",
00042                 winrt::name_of<winrt::SystemBackdrop>(),
00043                 winrt::name_of<winrt::CommandBarFlyoutCommandBar>(),
00044                 false /* isAttached */,
00045                 ValueHelper<winrt::SystemBackdrop>::BoxedDefaultValue(),
00046                 winrt::PropertyChangedCallback(&OnSystemBackdropPropertyChanged));
00047     }
00048 }
00049
00050 void CommandBarFlyoutCommandBarProperties::ClearProperties()
00051 {
00052     s_FlyoutTemplateSettingsProperty = nullptr;
00053     s_SystemBackdropProperty = nullptr;
00054 }
00055
00056 void CommandBarFlyoutCommandBarProperties::OnSystemBackdropPropertyChanged(
00057     winrt::DependencyObject const& sender,
00058     winrt::DependencyPropertyChangedEventArgs const& args)
00059 {
00060     auto owner = sender.as<winrt::CommandBarFlyoutCommandBar>();
00061     winrt::get_self<CommandBarFlyoutCommandBar>(owner)->OnPropertyChanged(args);
00062 }
00063
00064 void CommandBarFlyoutCommandBarProperties::FlyoutTemplateSettings(winrt::CommandBarFlyoutCommandBarTemplateSettings const& value)
00065 {
00066     [[gsl::suppress(con)]]
00067     {
00068     static_cast<CommandBarFlyoutCommandBar*>(this)->SetValue(s_FlyoutTemplateSettingsProperty, ValueHelper<winrt::CommandBarFlyoutCommandBarTemplateSettings>::BoxValueIfNecessary(value));
00069     }
00070 }
00071
00072 winrt::CommandBarFlyoutCommandBarTemplateSettings CommandBarFlyoutCommandBarProperties::FlyoutTemplateSettings()
00073 {
00074     return ValueHelper<winrt::CommandBarFlyoutCommandBarTemplateSettings>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBar*>(this)->GetValue(s_FlyoutTemplateSettingsProperty));
00075 }
00076
00077 void CommandBarFlyoutCommandBarProperties::SystemBackdrop(winrt::SystemBackdrop const& value)
00078 {
00079     [[gsl::suppress(con)]]
00080     {
00081     static_cast<CommandBarFlyoutCommandBar*>(this)->SetValue(s_SystemBackdropProperty, ValueHelper<winrt::SystemBackdrop>::BoxValueIfNecessary(value));
00082     }
00083 }
00084
00085 winrt::SystemBackdrop CommandBarFlyoutCommandBarProperties::SystemBackdrop()
00086 {
00087     return ValueHelper<winrt::SystemBackdrop>::CastOrUnbox(static_cast<CommandBarFlyoutCommandBar*>(this)->GetValue(s_SystemBackdropProperty));
00088 }
Generated on Sun Dec 1 2024 20:51:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: TabView/TabViewListView.cpp Source File

  • File List
  • File Members
  • TabView

TabViewListView.cpp

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #include "pch.h"
00005 #include "common.h"
00006 #include "ResourceAccessor.h"
00007 #include "Utils.h"
00008 #include "TabViewListView.h"
00009 #include "TabViewItem.h"
00010 #include "TabView.h"
00011 #include "SharedHelpers.h"
00012
00013 #include "TabViewListView.properties.cpp"
00014
00015 TabViewListView::TabViewListView()
00016 {
00017     SetDefaultStyleKey(this);
00018
00019     ContainerContentChanging({ this, &TabViewListView::OnContainerContentChanging });
00020
00021     RegisterPropertyChangedCallback(winrt::Selector::SelectedIndexProperty(), { this, &TabViewListView::OnSelectedIndexPropertyChanged });
00022 }
00023
00024 void TabViewListView::OnSelectedIndexPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
00025 {
00026     UpdateBottomBorderVisualState();
00027 }
00028
00029 // IItemsControlOverrides
00030
00031 winrt::DependencyObject TabViewListView::GetContainerForItemOverride()
00032 {
00033     return winrt::make<TabViewItem>();
00034 }
00035
00036 bool TabViewListView::IsItemItsOwnContainerOverride(winrt::IInspectable const& args)
00037 {
00038     bool isItemItsOwnContainer = false;
00039     if (const auto item = args.try_as<winrt::TabViewItem>())
00040     {
00041         isItemItsOwnContainer = static_cast<bool>(item);
00042     }
00043     return isItemItsOwnContainer;
00044 }
00045
00046 void TabViewListView::OnItemsChanged(winrt::IInspectable const& item)
00047 {
00048     __super::OnItemsChanged(item);
00049
00050     if (const auto tabView = SharedHelpers::GetAncestorOfType<winrt::TabView>(winrt::VisualTreeHelper::GetParent(*this)))
00051     {
00052         const auto internalTabView = winrt::get_self<TabView>(tabView);
00053         internalTabView->OnItemsChanged(item);
00054     }
00055     UpdateBottomBorderVisualState();
00056 }
00057
00058 void TabViewListView::PrepareContainerForItemOverride(const winrt::DependencyObject& element, const winrt::IInspectable& item)
00059 {
00060     const auto itemContainer = element.as<winrt::TabViewItem>();
00061     const auto tvi = winrt::get_self<TabViewItem>(itemContainer);
00062
00063     // Due to virtualization, a TabViewItem might be recycled to display a different tab data item.
00064     // In that case, there is no need to set the TabWidthMode of the TabViewItem or its parent TabView
00065     // as they are already set correctly here.
00066     //
00067     // We know we are currently looking at a TabViewItem being recycled if its parent TabView has already been set.
00068     auto parentTabView = tvi->GetParentTabView();
00069
00070     if (!parentTabView)
00071     {
00072         if (const auto tabView = SharedHelpers::GetAncestorOfType<winrt::TabView>(winrt::VisualTreeHelper::GetParent(*this)))
00073         {
00074             tvi->OnTabViewWidthModeChanged(tabView.TabWidthMode());
00075             tvi->SetParentTabView(tabView);
00076
00077             parentTabView = tabView;
00078         }
00079     }
00080
00081     if (parentTabView)
00082     {
00083         auto parentTabViewImpl = winrt::get_self<TabView>(parentTabView);
00084         parentTabViewImpl->UpdateTabWidths();
00085     }
00086
00087     __super::PrepareContainerForItemOverride(element, item);
00088 }
00089
00090 void TabViewListView::OnContainerContentChanging(const winrt::IInspectable& sender, const winrt::Microsoft::UI::Xaml::Controls::ContainerContentChangingEventArgs& args)
00091 {
00092     if (const auto tabView = SharedHelpers::GetAncestorOfType<winrt::TabView>(winrt::VisualTreeHelper::GetParent(*this)))
00093     {
00094         const auto internalTabView = winrt::get_self<TabView>(tabView);
00095         internalTabView->UpdateTabContent();
00096     }
00097 }
00098
00099 void TabViewListView::UpdateBottomBorderVisualState()
00100 {
00101     winrt::VisualStateManager::GoToState(
00102         *this,
00103         (SelectedIndex() == 0) ? L"LeftBottomBorderLineShort" : L"LeftBottomBorderLineNormal",
00104         false /*useTransitions*/);
00105
00106     winrt::VisualStateManager::GoToState(
00107         *this,
00108         (SelectedIndex() == (int)(Items().Size() - 1)) ? L"RightBottomBorderLineShort" : L"RightBottomBorderLineNormal",
00109         false /*useTransitions*/);
00110 }
Generated on Sun Dec 1 2024 20:52:19 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Repeater/IndexRange.h Source File

  • File List
  • File Members
  • Repeater

IndexRange.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 // Inclusive range [start, end]
00007 struct IndexRange
00008 {
00009 public:
00010     IndexRange() = default;
00011     IndexRange(int begin, int end);
00012     int Begin() const;
00013     int End() const;
00014     bool Contains(int index) const;
00015     bool Split(int splitIndex, IndexRange& before, IndexRange& after);
00016     bool Intersects(const IndexRange& other) const;
00017     bool operator==(const IndexRange& rhs) const;
00018
00019 private:
00020     // Invariant: m_end >= m_begin
00021     int m_begin = -1;
00022     int m_end = -1;
00023 };
Generated on Sun Dec 1 2024 20:52:08 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

BoolToVisibilityConverter Member List

This is the complete list of members for BoolToVisibilityConverter, including all inherited members.
Convert(object value, Type targetType, object parameter, string language) | BoolToVisibilityConverter | [inline]
ConvertBack(object value, Type targetType, object parameter, string language) | BoolToVisibilityConverter | [inline]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RoutedEventHandler_revoker Member List

This is the complete list of members for RoutedEventHandler_revoker, including all inherited members.
m_object | RoutedEventHandler_revoker | [private]
move_from(RoutedEventHandler_revoker &other) | RoutedEventHandler_revoker | [inline, private]
nullptr | RoutedEventHandler_revoker | [private]
operator bool() const noexcept | RoutedEventHandler_revoker | [inline, explicit]
operator=(RoutedEventHandler_revoker const &) | RoutedEventHandler_revoker |
operator=(RoutedEventHandler_revoker &&other) noexcept | RoutedEventHandler_revoker | [inline]
revoke() noexcept | RoutedEventHandler_revoker | [inline]
RoutedEventHandler_revoker() noexcept | RoutedEventHandler_revoker |
RoutedEventHandler_revoker(RoutedEventHandler_revoker const &) | RoutedEventHandler_revoker |
RoutedEventHandler_revoker(RoutedEventHandler_revoker &&other) noexcept | RoutedEventHandler_revoker | [inline]
RoutedEventHandler_revoker(winrt::UIElement const &object, winrt::RoutedEvent event, winrt::IInspectable handler) | RoutedEventHandler_revoker | [inline]
~RoutedEventHandler_revoker() noexcept | RoutedEventHandler_revoker | [inline]
Generated on Sun Dec 1 2024 20:53:06 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ButtonInteractionProperties Member List

This is the complete list of members for ButtonInteractionProperties, including all inherited members.
ButtonInteractionProperties() | ButtonInteractionProperties |
ClearProperties() | ButtonInteractionProperties | [static]
EnsureProperties() | ButtonInteractionProperties | [static]
Invoked(winrt::TypedEventHandler< winrt::ButtonInteraction, winrt::ButtonInteractionInvokedEventArgs > const &value) | ButtonInteractionProperties |
Invoked(winrt::event_token const &token) | ButtonInteractionProperties |
m_invokedEventSource | ButtonInteractionProperties |
m_propertyChangedEventSource | ButtonInteractionProperties |
PropertyChanged(winrt::PropertyChangedEventHandler const &value) | ButtonInteractionProperties |
PropertyChanged(winrt::event_token const &token) | ButtonInteractionProperties |
Generated on Sun Dec 1 2024 20:52:43 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

event< T > Member List

This is the complete list of members for event< T >, including all inherited members.
add(const T &value) | event_base< event< T >, T, T > | [inline]
event_base(const event_base &) | event_base< event< T >, T, T > |
event_base() | event_base< event< T >, T, T > |
m_handlers | event_base< event< T >, T, T > | [protected]
operator bool() const noexcept | event_base< event< T >, T, T > | [inline, explicit]
operator()(A const &...args) const | event_base< event< T >, T, T > | [inline]
operator=(const event_base &) | event_base< event< T >, T, T > |
remove(const winrt::event_token token) | event_base< event< T >, T, T > | [inline]
unwrap(const T &value) const | NonReferenceTrackerStorageHelper< T > | [inline]
wrap(const T &value) const | NonReferenceTrackerStorageHelper< T > | [inline]
~event_base() | event_base< event< T >, T, T > | [inline]
Generated on Sun Dec 1 2024 20:52:46 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

TreeViewItem Member List

This is the complete list of members for TreeViewItem, including all inherited members.
GetIndexPath() | TreeViewItem | [inline, private]
IsRealized(IndexPath indexPath) | TreeViewItem | [inline, private, static]
IsSelected | TreeViewItem |
IsSelectedProperty | TreeViewItem | [static]
OnCreateAutomationPeer() | TreeViewItem | [inline, protected]
OnKeyUp(KeyRoutedEventArgs e) | TreeViewItem | [inline, protected]
OnPointerPressed(PointerRoutedEventArgs e) | TreeViewItem | [inline, protected]
OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) | TreeViewItem | [inline, private, static]
OnselectionModelChanged(object sender, PropertyChangedEventArgs e) | TreeViewItem | [inline, private]
RepeatedIndex | TreeViewItem |
RepeatedIndexProperty | TreeViewItem | [static]
Select(bool select) | TreeViewItem | [inline]
SelectionModel | TreeViewItem |
SelectionModelProperty | TreeViewItem | [static]
TreeViewItem() | TreeViewItem | [inline]
Generated on Sun Dec 1 2024 20:54:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ItemTemplateTests Member List

This is the complete list of members for ItemTemplateTests, including all inherited members.
CreateAndInitializeRepeater(object itemsSource, Layout layout, object elementFactory, ref ItemsRepeater repeater) | ItemTemplateTests | [inline, private]
GetAllElementsFromPool(RecyclePool pool, string key="") | ItemTemplateTests | [inline, private]
ValidateBindingAndTemplateSelection() | ItemTemplateTests | [inline]
ValidateCorrectSizeWhenEmptyDataTemplateInSelector() | ItemTemplateTests | [inline]
ValidateCustomElementFactory() | ItemTemplateTests | [inline]
ValidateCustomRecyclingElementFactory() | ItemTemplateTests | [inline]
ValidateDataTemplateAsItemTemplate() | ItemTemplateTests | [inline]
ValidateDataTemplateSelectorAsItemTemplate() | ItemTemplateTests | [inline]
ValidateDataTemplateWithElementNameBinding() | ItemTemplateTests | [inline]
ValidateDataTemplateWithElementNameBinding(bool useNestedElements) | ItemTemplateTests | [inline, private]
ValidateDataTemplateWithNestedElementNameBinding() | ItemTemplateTests | [inline]
ValidateNoSizeWhenEmptyDataTemplate() | ItemTemplateTests | [inline]
ValidateNullItemTemplateAndContainerInItems() | ItemTemplateTests | [inline]
ValidateRecycling() | ItemTemplateTests | [inline]
ValidateRecyclingElementFactoryWithSingleTemplate() | ItemTemplateTests | [inline]
ValidateReyclingElementFactoryWithNoTemplate() | ItemTemplateTests | [inline]
ValidateTemplateSwitchingRefreshesElements(Layout layout) | ItemTemplateTests | [inline]
ValidateTemplateSwitchingRefreshesElementsNonVirtualizingLayout() | ItemTemplateTests | [inline]
ValidateTemplateSwitchingRefreshesElementsVirtualizingLayout() | ItemTemplateTests | [inline]
VerifyNullTemplateGivesMeaningfullError() | ItemTemplateTests | [inline]
VerifySelectTemplateLayoutFallback() | ItemTemplateTests | [inline]
Generated on Sun Dec 1 2024 20:53:40 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml.cs Source File

  • File List
  • File Members
  • ParallaxView
  • TestUI

ParallaxViewStackPanelPage.xaml.cs

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 namespace MUXControlsTestApp
00005 {
00006     public sealed partial class ParallaxViewStackPanelPage : TestPage
00007     {
00008         public ParallaxViewStackPanelPage()
00009         {
00010             this.InitializeComponent();
00011         }
00012     }
00013 }
Generated on Sun Dec 1 2024 20:52:04 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: ScrollPresenter/ScrollPresenterAutomationPeer.h Source File

  • File List
  • File Members
  • ScrollPresenter

ScrollPresenterAutomationPeer.h

Go to the documentation of this file.
00001 ﻿// Copyright (c) Microsoft Corporation. All rights reserved.
00002 // Licensed under the MIT License. See LICENSE in the project root for license information.
00003
00004 #pragma once
00005
00006 #include "ScrollPresenter.h"
00007
00008 #include "ScrollPresenterAutomationPeer.g.h"
00009
00010 class ScrollPresenterAutomationPeer :
00011     public ReferenceTracker<ScrollPresenterAutomationPeer, winrt::implementation::ScrollPresenterAutomationPeerT, winrt::IScrollProvider>
00012 {
00013 public:
00014     ScrollPresenterAutomationPeer(winrt::ScrollPresenter const& owner);
00015
00016     ~ScrollPresenterAutomationPeer()
00017     {
00018         SCROLLPRESENTER_TRACE_VERBOSE(nullptr, TRACE_MSG_METH, METH_NAME, this);
00019     }
00020
00021     // IAutomationPeerOverrides methods
00022     winrt::AutomationControlType GetAutomationControlTypeCore();
00023     winrt::IInspectable GetPatternCore(winrt::PatternInterface const& patternInterface);
00024
00025     // IScrollProvider properties and methods
00026     void Scroll(winrt::ScrollAmount const& horizontalAmount, winrt::ScrollAmount const& verticalAmount);
00027     void SetScrollPercent(double horizontalPercent, double verticalPercent);
00028     double HorizontalScrollPercent();
00029     double VerticalScrollPercent();
00030     double HorizontalViewSize();
00031     double VerticalViewSize();
00032     bool HorizontallyScrollable();
00033     bool VerticallyScrollable();
00034
00035     void UpdateScrollPatternProperties();
00036
00037 private:
00038     double get_HorizontalScrollPercentImpl();
00039     double get_VerticalScrollPercentImpl();
00040     double get_HorizontalViewSizeImpl();
00041     double get_VerticalViewSizeImpl();
00042     bool get_HorizontallyScrollableImpl();
00043     bool get_VerticallyScrollableImpl();
00044
00045     winrt::IInspectable GetPatternCoreImpl(winrt::PatternInterface patternInterface);
00046     winrt::ScrollPresenter GetScrollPresenter();
00047
00048     static double GetViewPercent(double zoomedExtent, double viewport);
00049     static double GetScrollPercent(double zoomedExtent, double viewport, double offset);
00050
00051 private:
00052     double m_horizontalScrollPercent{ winrt::ScrollPatternIdentifiers::NoScroll() };
00053     double m_verticalScrollPercent{ winrt::ScrollPatternIdentifiers::NoScroll() };
00054     double m_horizontalViewSize{ s_maximumPercent };
00055     double m_verticalViewSize{ s_maximumPercent };
00056     bool m_horizontallyScrollable{ false };
00057     bool m_verticallyScrollable{ false };
00058
00059     static double s_minimumPercent;
00060     static double s_maximumPercent;
00061     static double s_noScroll;
00062 };
Generated on Sun Dec 1 2024 20:52:15 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

ScrollPresenterTestsBase Member List

This is the complete list of members for ScrollPresenterTestsBase, including all inherited members.
ClearTraces() | ScrollPresenterTestsBase | [inline, protected]
LogAndClearTraces() | ScrollPresenterTestsBase | [inline, protected]
LogAndClearTraces(bool recordWarning) | ScrollPresenterTestsBase | [inline, protected]
LogTraces() | ScrollPresenterTestsBase | [inline, protected]
LogTraces(bool recordWarning) | ScrollPresenterTestsBase | [inline, protected]
SetLoggingLevel(bool isPrivateLoggingEnabled) | ScrollPresenterTestsBase | [inline, protected]
SetOutputDebugStringLevel(string outputDebugStringLevel) | ScrollPresenterTestsBase | [inline, protected]
WaitForEditValue(string editName, string editValue, double secondsTimeout=2.0, bool throwOnError=true) | ScrollPresenterTestsBase | [inline, protected]
Generated on Sun Dec 1 2024 20:53:49 for WinUi3-Templates by doxygen 1.7.1


WinUi3-Templates: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members

RadioMenuFlyoutItemPage Member List

This is the complete list of members for RadioMenuFlyoutItemPage, including all inherited members.
IsCheckedChanged(DependencyObject o, DependencyProperty p) | RadioMenuFlyoutItemPage | [inline, private]
itemStates | RadioMenuFlyoutItemPage | [private]
RadioMenuFlyoutItemPage() | RadioMenuFlyoutItemPage | [inline]
RegisterItem(MenuFlyoutItemBase item) | RadioMenuFlyoutItemPage | [inline, private]
UpdateTextState(RadioMenuFlyoutItem item, TextBlock textBlock) | RadioMenuFlyoutItemPage | [inline, private]
Generated on Sun Dec 1 2024 20:54:24 for WinUi3-Templates by doxygen 1.7.1